From 2e0ca713dcee6d41b151f82c0e0188ca583b3a71 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Sat, 20 Jan 2024 15:38:20 +0000 Subject: [PATCH 1/6] fix rename.py --- tools/rename.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/rename.py b/tools/rename.py index 05df53dca33..56fa3d8cc0d 100755 --- a/tools/rename.py +++ b/tools/rename.py @@ -82,7 +82,7 @@ def handle_file(f_path, try_rename_file=False): for f_name in files: c_files.append(os.path.join(root, f_name)) for f_path in tqdm(c_files): - if f_name.endswith(".c") or f_name.endswith(".h"): + if f_path.endswith(".c") or f_path.endswith(".h") or f_path.endswith(".yaml"): handle_file(f_path, True) # Walk through include files and rename stuff @@ -111,6 +111,3 @@ def handle_file(f_path, try_rename_file=False): # splat.yaml handle_file(os.path.join(root_dir, "ver", "current", "splat.yaml")) - -# effects.yaml -handle_file(os.path.join(root_dir, "ver", "current", "effects.yaml")) From 445112c94557a0a9570d54a9506491e11c2e56e7 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Sat, 20 Jan 2024 15:41:11 +0000 Subject: [PATCH 2/6] update doxygen EVT_CALL->Call --- docs/doxytheme/theme.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/doxytheme/theme.js b/docs/doxytheme/theme.js index c5b7229ac84..e0d21b20e55 100644 --- a/docs/doxytheme/theme.js +++ b/docs/doxytheme/theme.js @@ -1,4 +1,4 @@ -// Make @evtapi prototype use EVT_CALL and params +// Make @evtapi prototype use Call and params for (const item of document.querySelectorAll(".memitem:has(.evtapi)")) { // appears 2 children before item const id = item.previousElementSibling.previousElementSibling.id @@ -12,7 +12,7 @@ for (const item of document.querySelectorAll(".memitem:has(.evtapi)")) { params.push(param.textContent.trim()) } - const proto = `EVT_CALL(${params.join(", ")})` + const proto = `Call(${params.join(", ")})` tbody.innerHTML = `${proto}` // Find its link From 764784babdee0b71f82be5b8cb38dc5baaadb5c9 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Sat, 20 Jan 2024 15:55:13 +0000 Subject: [PATCH 3/6] support passing files to rename.py --- tools/rename.py | 146 +++++++++++++++++++++++++++--------------------- 1 file changed, 83 insertions(+), 63 deletions(-) diff --git a/tools/rename.py b/tools/rename.py index 56fa3d8cc0d..aacc02069d2 100755 --- a/tools/rename.py +++ b/tools/rename.py @@ -48,66 +48,86 @@ def handle_file(f_path, try_rename_file=False): f.write(f_text) -# Read input file -# One valid whitespace-separated find-replace pair is given per line -with open(os.path.join(script_dir, "to_rename.txt")) as f: - renames_text = f.readlines() - -# Create dict of old -> new names -for line in renames_text: - split = line.split() - if len(split) == 2: - if split[0] and split[1]: - renames[split[0]] = split[1] - patterns.append(split[0]) - elif len(split) != 0: - raise Exception('input contains invalid rename pattern: \n"' + line.strip() + '"') - -ac = ahocorasick_rs.AhoCorasick(patterns, matchkind=MATCHKIND_LEFTMOST_LONGEST) - -# Walk through asm files and rename stuff -print("Walking through asm files") -asm_files = [] -for root, dirs, files in os.walk(asm_dir): - for f_name in files: - asm_files.append(os.path.join(root, f_name)) -for f_path in tqdm(asm_files): - if f_path.endswith(".s"): - handle_file(f_path, True) - -# Walk through src files and rename stuff -print("Walking through src files") -c_files = [] -for root, dirs, files in os.walk(src_dir): - for f_name in files: - c_files.append(os.path.join(root, f_name)) -for f_path in tqdm(c_files): - if f_path.endswith(".c") or f_path.endswith(".h") or f_path.endswith(".yaml"): - handle_file(f_path, True) - -# Walk through include files and rename stuff -print("Walking through include files") -for root, dirs, files in os.walk(include_dir): - for f_name in files: - f_path = os.path.join(root, f_name) - - handle_file(f_path) - -# Delete old versions of newly saved files -print("Deleting old files") -for d in deletes: - os.remove(d) - -# Walk through asm dirs and rename stuff -print("Walking through asm dirs") -for root, dirs, files in os.walk(asm_dir): - for dir_name in dirs: - for rename in renames: - if rename == dir_name: - os.rename(os.path.join(root, dir_name), os.path.join(root, renames[rename])) - -# Rename stuff in symbol_addrs.txt -handle_file(os.path.join(root_dir, "ver", "current", "symbol_addrs.txt")) - -# splat.yaml -handle_file(os.path.join(root_dir, "ver", "current", "splat.yaml")) +def apply_renames(file_path: str): + global ac + + # Read input file + # One valid whitespace-separated find-replace pair is given per line + with open(file_path) as f: + renames_text = f.readlines() + + # Create dict of old -> new names + for line in renames_text: + split = line.split() + if len(split) == 2: + if split[0] and split[1]: + renames[split[0]] = split[1] + patterns.append(split[0]) + elif len(split) != 0: + raise Exception('input contains invalid rename pattern: \n"' + line.strip() + '"') + + ac = ahocorasick_rs.AhoCorasick(patterns, matchkind=MATCHKIND_LEFTMOST_LONGEST) + + # Walk through asm files and rename stuff + print("Walking through asm files") + asm_files = [] + for root, dirs, files in os.walk(asm_dir): + for f_name in files: + asm_files.append(os.path.join(root, f_name)) + for f_path in tqdm(asm_files): + if f_path.endswith(".s"): + handle_file(f_path, True) + + # Walk through src files and rename stuff + print("Walking through src files") + c_files = [] + for root, dirs, files in os.walk(src_dir): + for f_name in files: + c_files.append(os.path.join(root, f_name)) + for f_path in tqdm(c_files): + if f_path.endswith(".c") or f_path.endswith(".h") or f_path.endswith(".yaml"): + handle_file(f_path, True) + + # Walk through include files and rename stuff + print("Walking through include files") + for root, dirs, files in os.walk(include_dir): + for f_name in files: + f_path = os.path.join(root, f_name) + + handle_file(f_path) + + # Delete old versions of newly saved files + print("Deleting old files") + for d in deletes: + os.remove(d) + + # Walk through asm dirs and rename stuff + print("Walking through asm dirs") + for root, dirs, files in os.walk(asm_dir): + for dir_name in dirs: + for rename in renames: + if rename == dir_name: + os.rename(os.path.join(root, dir_name), os.path.join(root, renames[rename])) + + # Rename stuff in symbol_addrs.txt + handle_file(os.path.join(root_dir, "ver", "current", "symbol_addrs.txt")) + + # splat.yaml + handle_file(os.path.join(root_dir, "ver", "current", "splat.yaml")) + + +if __name__ == "__main__": + from sys import argv + + for arg in argv[1:]: + if arg == "--help": + print("Usage: python3 rename.py [path/to/to_rename.txt...]") + exit(0) + + paths = [] + if len(argv) > 1: + paths = argv[1:] + else: + paths = [os.path.join(script_dir, "to_rename.txt")] + for path in paths: + apply_renames(path) From 3db554e16bc300418e2e96de7de2f8c985f78cf6 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Sat, 20 Jan 2024 15:56:12 +0000 Subject: [PATCH 4/6] remove EVT macro prefix and make them PascalCase --- include/script_api/common.h | 2 +- include/script_api/macros.h | 554 +- src/38F00.c | 138 +- src/battle/16C8E0.c | 80 +- src/battle/190B20.c | 90 +- src/battle/area/arn/actor/tubba_blubba.c | 808 +-- src/battle/area/arn/actor/tubbas_heart.c | 884 +-- src/battle/area/dgb/actor/tubba_blubba.c | 1032 ++-- src/battle/area/dig/actor/tubba_blubba.c | 714 +-- src/battle/area/dig/script/dig_01.c | 22 +- src/battle/area/dig/script/dig_02.c | 30 +- src/battle/area/dig/script/dig_03.c | 22 +- src/battle/area/dig/script/dig_04.c | 20 +- src/battle/area/dig/script/dig_05.c | 22 +- src/battle/area/flo2/actor/huff_n_puff.c | 4796 ++++++++-------- src/battle/area/flo2/actor/monty_mole_boss.c | 462 +- src/battle/area/flo2/actor/spike.c | 506 +- src/battle/area/flo2/actor/tuff_puff.c | 480 +- src/battle/area/hos/actor/goombario_tutor.c | 840 +-- src/battle/area/hos/actor/magikoopa.c | 3518 ++++++------ .../area/isk_part_2/actor/chain_chomp.c | 1252 ++--- src/battle/area/isk_part_2/actor/tutankoopa.c | 1840 +++--- src/battle/area/iwa/actor/buzzar.c | 2016 +++---- src/battle/area/kgr/actor/fuzzipede.c | 1590 +++--- src/battle/area/kkj/actor/kammy_koopa.c | 620 +-- .../area/kmr_part_2/actor/blue_goomba_1.c | 798 +-- .../area/kmr_part_2/actor/blue_goomba_2.c | 680 +-- .../area/kmr_part_2/actor/goomba_king.c | 1178 ++-- .../area/kmr_part_2/actor/goomnut_tree.c | 538 +- .../area/kmr_part_2/actor/red_goomba_1.c | 772 +-- .../area/kmr_part_2/actor/red_goomba_2.c | 680 +-- .../area/kmr_part_3/actor/egg_jr_troopa.c | 740 +-- .../area/kmr_part_3/actor/final_jr_troopa.c | 2564 ++++----- src/battle/area/kmr_part_3/actor/jr_troopa.c | 708 +-- .../area/kmr_part_3/actor/mage_jr_troopa.c | 842 +-- .../area/kmr_part_3/actor/para_jr_troopa.c | 888 +-- .../kmr_part_3/actor/spiked_para_jr_troopa.c | 1046 ++-- .../kmr_part_3/actor/tutorial_paragoomba.c | 776 +-- .../kmr_part_3/actor/tutorial_spiked_goomba.c | 810 +-- src/battle/area/kpa2/actor/final_bowser_1.c | 2712 ++++----- src/battle/area/kpa2/actor/final_bowser_2.c | 3086 +++++------ src/battle/area/kpa2/actor/hallway_bowser.c | 2810 +++++----- src/battle/area/kpa2/actor/intro_bowser.c | 966 ++-- src/battle/area/kpa2/actor/unused_bowser.c | 926 ++-- src/battle/area/kpa4/actor/bombshell_bill.c | 390 +- .../area/kpa4/actor/bombshell_blaster.c | 214 +- src/battle/area/kzn2/actor/lava_bud.c | 1286 ++--- src/battle/area/kzn2/actor/lava_piranha.c | 2820 +++++----- src/battle/area/kzn2/actor/petit_piranha.c | 534 +- .../area/kzn2/actor/petit_piranha_bomb.c | 40 +- src/battle/area/mac/actor/chan.c | 1542 +++--- src/battle/area/mac/actor/lee.c | 928 ++-- src/battle/area/mac/actor/lee_bombette.inc.c | 486 +- src/battle/area/mac/actor/lee_bow.inc.c | 664 +-- src/battle/area/mac/actor/lee_goombario.inc.c | 820 +-- src/battle/area/mac/actor/lee_kooper.inc.c | 784 +-- .../area/mac/actor/lee_lakilester.inc.c | 542 +- src/battle/area/mac/actor/lee_parakarry.inc.c | 480 +- src/battle/area/mac/actor/lee_sushie.inc.c | 734 +-- src/battle/area/mac/actor/lee_watt.inc.c | 460 +- src/battle/area/mac/actor/master1.c | 588 +- src/battle/area/mac/actor/master2.c | 1000 ++-- src/battle/area/mac/actor/master3.c | 1718 +++--- src/battle/area/nok/actor/kent_c_koopa.c | 1732 +++--- src/battle/area/omo2/actor/general_guy.c | 818 +-- src/battle/area/omo2/actor/light_bulb.c | 154 +- src/battle/area/omo2/actor/toy_tank.c | 1292 ++--- src/battle/area/omo2_1/actor/shy_squad.c | 2084 +++---- src/battle/area/omo2_2/actor/stilt_guy.c | 2024 +++---- src/battle/area/omo2_3/actor/shy_stack.c | 2214 ++++---- src/battle/area/omo2_4/actor/signal_guy.c | 192 +- .../area/omo2_5/actor/shy_squad_redux.c | 1722 +++--- src/battle/area/omo2_6/actor/shy_squad_stub.c | 130 +- .../area/omo3/actor/big_lantern_ghost.c | 1100 ++-- src/battle/area/pra2/actor/crystal_bit.c | 320 +- src/battle/area/pra2/actor/crystal_king.c | 3436 ++++++------ src/battle/area/sam2/actor/monstar.c | 896 +-- src/battle/area/tik2/actor/blooper.c | 860 +-- src/battle/area/tik2/actor/blooper_baby.c | 1052 ++-- src/battle/area/tik2/actor/electro_blooper.c | 1312 ++--- src/battle/area/tik2/actor/super_blooper.c | 1332 ++--- .../trd_part_2/actor/common_koopa_bros.inc.c | 1274 ++--- .../area/trd_part_2/actor/fake_bowser.c | 4928 ++++++++--------- src/battle/area/trd_part_3/actor/eldstar.c | 312 +- src/battle/camera.c | 116 +- src/battle/common/actor/albino_dino.inc.c | 416 +- src/battle/common/actor/amazy_dayzee.inc.c | 522 +- src/battle/common/actor/anti_guy.inc.c | 754 +-- src/battle/common/actor/bandit.inc.c | 980 ++-- src/battle/common/actor/bill_blaster.inc.c | 214 +- src/battle/common/actor/bob_omb.inc.c | 1050 ++-- src/battle/common/actor/bony_beetle.inc.c | 1904 +++---- src/battle/common/actor/bullet_bill.inc.c | 390 +- src/battle/common/actor/buzzy_beetle.inc.c | 1326 ++--- src/battle/common/actor/bzzap.inc.c | 1094 ++-- src/battle/common/actor/cleft.inc.c | 816 +-- src/battle/common/actor/clubba.inc.c | 366 +- src/battle/common/actor/crazee_dayzee.inc.c | 544 +- src/battle/common/actor/dark_koopa.inc.c | 1404 ++--- src/battle/common/actor/dark_paratroopa.inc.c | 2250 ++++---- src/battle/common/actor/dry_bones.inc.c | 748 +-- src/battle/common/actor/duplighost.inc.c | 1044 ++-- .../actor/duplighost/ghost_bombette.inc.c | 518 +- .../common/actor/duplighost/ghost_bow.inc.c | 610 +- .../actor/duplighost/ghost_goombario.inc.c | 806 +-- .../actor/duplighost/ghost_kooper.inc.c | 764 +-- .../actor/duplighost/ghost_lakilester.inc.c | 522 +- .../actor/duplighost/ghost_parakarry.inc.c | 452 +- .../actor/duplighost/ghost_sushie.inc.c | 706 +-- .../common/actor/duplighost/ghost_watt.inc.c | 422 +- src/battle/common/actor/ember.inc.c | 1170 ++-- src/battle/common/actor/forest_fuzzy.inc.c | 1068 ++-- src/battle/common/actor/frost_piranha.inc.c | 720 +-- src/battle/common/actor/fuzzy.inc.c | 674 +-- src/battle/common/actor/gloomba.inc.c | 670 +-- src/battle/common/actor/goomba.inc.c | 670 +-- src/battle/common/actor/gray_magikoopa.inc.c | 1296 ++--- src/battle/common/actor/green_magikoopa.inc.c | 1296 ++--- src/battle/common/actor/groove_guy.inc.c | 1286 ++--- src/battle/common/actor/gulpit.inc.c | 682 +-- src/battle/common/actor/gulpit_rocks.inc.c | 160 +- src/battle/common/actor/hammer_bro.inc.c | 816 +-- src/battle/common/actor/hurt_plant.inc.c | 476 +- src/battle/common/actor/hyper_cleft.inc.c | 1344 ++--- src/battle/common/actor/hyper_goomba.inc.c | 1150 ++-- .../common/actor/hyper_paragoomba.inc.c | 2362 ++++---- src/battle/common/actor/jungle_fuzzy.inc.c | 1410 ++--- src/battle/common/actor/koopa_troopa.inc.c | 918 +-- src/battle/common/actor/koopatrol.inc.c | 2242 ++++---- src/battle/common/actor/lakitu.inc.c | 880 +-- src/battle/common/actor/lava_bubble.inc.c | 990 ++-- src/battle/common/actor/m_bush.inc.c | 374 +- src/battle/common/actor/magikoopa.inc.c | 3570 ++++++------ src/battle/common/actor/medi_guy.inc.c | 626 +-- src/battle/common/actor/monty_mole.inc.c | 462 +- src/battle/common/actor/paragloomba.inc.c | 1348 ++--- src/battle/common/actor/paragoomba.inc.c | 678 +-- src/battle/common/actor/paratroopa.inc.c | 1764 +++--- src/battle/common/actor/piranha_plant.inc.c | 506 +- src/battle/common/actor/pokey.inc.c | 2360 ++++---- src/battle/common/actor/pokey_mummy.inc.c | 1546 +++--- src/battle/common/actor/putrid_piranha.inc.c | 710 +-- src/battle/common/actor/pyro_guy.inc.c | 422 +- src/battle/common/actor/red_magikoopa.inc.c | 1296 ++--- src/battle/common/actor/ruff_puff.inc.c | 468 +- src/battle/common/actor/shy_guy_base.inc.c | 754 +-- src/battle/common/actor/sky_guy.inc.c | 1414 ++--- src/battle/common/actor/slot_machine.inc.c | 690 +-- src/battle/common/actor/spear_guy.inc.c | 2436 ++++---- src/battle/common/actor/spike_top.inc.c | 1332 ++--- src/battle/common/actor/spiked_gloomba.inc.c | 712 +-- src/battle/common/actor/spiked_goomba.inc.c | 712 +-- src/battle/common/actor/spiny.inc.c | 694 +-- src/battle/common/actor/spy_guy.inc.c | 920 +-- src/battle/common/actor/stone_chomp.inc.c | 950 ++-- src/battle/common/actor/swooper.inc.c | 932 ++-- src/battle/common/actor/swoopula.inc.c | 2112 +++---- src/battle/common/actor/whacka.inc.c | 394 +- src/battle/common/actor/white_clubba.inc.c | 484 +- src/battle/common/actor/white_magikoopa.inc.c | 1816 +++--- .../common/actor/yellow_magikoopa.inc.c | 1306 ++--- src/battle/common/move/HammerSupport.inc.c | 1086 ++-- src/battle/common/move/JumpSupport.inc.c | 620 +-- src/battle/common/move/StarBeamSupport.inc.c | 26 +- src/battle/common/move/StarPowerSupport.inc.c | 446 +- src/battle/common/move/UseItem.inc.c | 172 +- src/battle/common/stage/area_arn/arn_01.inc.c | 10 +- src/battle/common/stage/area_arn/arn_02.inc.c | 38 +- src/battle/common/stage/area_arn/arn_03.inc.c | 10 +- src/battle/common/stage/area_arn/arn_04.inc.c | 12 +- src/battle/common/stage/area_arn/arn_05.inc.c | 12 +- src/battle/common/stage/area_arn/arn_06.inc.c | 10 +- src/battle/common/stage/area_dgb/dgb_01.inc.c | 10 +- src/battle/common/stage/area_dgb/dgb_02.inc.c | 10 +- src/battle/common/stage/area_dgb/dgb_03.inc.c | 10 +- src/battle/common/stage/area_dgb/dgb_04.inc.c | 10 +- src/battle/common/stage/area_dgb/dgb_05.inc.c | 10 +- src/battle/common/stage/area_flo/flo_01.inc.c | 22 +- .../common/stage/area_flo/flo_01b.inc.c | 22 +- .../common/stage/area_flo/flo_01c.inc.c | 24 +- src/battle/common/stage/area_flo/flo_02.inc.c | 22 +- .../common/stage/area_flo/flo_02b.inc.c | 24 +- .../common/stage/area_flo/flo_02c.inc.c | 24 +- src/battle/common/stage/area_flo/flo_03.inc.c | 306 +- src/battle/common/stage/area_flo/flo_04.inc.c | 116 +- src/battle/common/stage/area_flo/flo_05.inc.c | 14 +- src/battle/common/stage/area_flo/flo_06.inc.c | 14 +- src/battle/common/stage/area_hos/hos_00.inc.c | 104 +- src/battle/common/stage/area_hos/hos_01.inc.c | 286 +- src/battle/common/stage/area_hos/hos_02.inc.c | 166 +- src/battle/common/stage/area_isk/isk_00.inc.c | 12 +- src/battle/common/stage/area_isk/isk_01.inc.c | 12 +- src/battle/common/stage/area_isk/isk_02.inc.c | 12 +- .../common/stage/area_isk/isk_02b.inc.c | 24 +- .../common/stage/area_isk/isk_02c.inc.c | 16 +- src/battle/common/stage/area_isk/isk_03.inc.c | 12 +- .../common/stage/area_isk/isk_03b.inc.c | 12 +- src/battle/common/stage/area_isk/isk_04.inc.c | 16 +- src/battle/common/stage/area_isk/isk_05.inc.c | 16 +- src/battle/common/stage/area_isk/isk_06.inc.c | 16 +- .../common/stage/area_isk/isk_06b.inc.c | 18 +- src/battle/common/stage/area_isk/isk_07.inc.c | 16 +- src/battle/common/stage/area_isk/isk_08.inc.c | 16 +- src/battle/common/stage/area_iwa/iwa_01.inc.c | 12 +- .../common/stage/area_iwa/iwa_01b.inc.c | 12 +- src/battle/common/stage/area_iwa/iwa_02.inc.c | 10 +- src/battle/common/stage/area_jan/jan_00.inc.c | 26 +- src/battle/common/stage/area_jan/jan_01.inc.c | 36 +- .../common/stage/area_jan/jan_01b.inc.c | 36 +- src/battle/common/stage/area_jan/jan_02.inc.c | 12 +- src/battle/common/stage/area_jan/jan_03.inc.c | 14 +- .../common/stage/area_jan/jan_03b.inc.c | 14 +- src/battle/common/stage/area_jan/jan_04.inc.c | 14 +- .../common/stage/area_jan/jan_04b.inc.c | 14 +- src/battle/common/stage/area_kgr/kgr_01.inc.c | 78 +- src/battle/common/stage/area_kkj/kkj_01.inc.c | 10 +- src/battle/common/stage/area_kkj/kkj_02.inc.c | 66 +- src/battle/common/stage/area_kmr/kmr_02.inc.c | 10 +- src/battle/common/stage/area_kmr/kmr_03.inc.c | 22 +- src/battle/common/stage/area_kmr/kmr_04.inc.c | 22 +- src/battle/common/stage/area_kmr/kmr_05.inc.c | 12 +- .../common/stage/area_kmr/kmr_05b.inc.c | 14 +- src/battle/common/stage/area_kmr/kmr_06.inc.c | 24 +- src/battle/common/stage/area_kpa/kpa_01.inc.c | 52 +- .../common/stage/area_kpa/kpa_01b.inc.c | 46 +- src/battle/common/stage/area_kpa/kpa_02.inc.c | 52 +- src/battle/common/stage/area_kpa/kpa_03.inc.c | 14 +- src/battle/common/stage/area_kpa/kpa_04.inc.c | 64 +- .../common/stage/area_kpa/kpa_04b.inc.c | 62 +- .../common/stage/area_kpa/kpa_04c.inc.c | 64 +- src/battle/common/stage/area_kpa/kpa_05.inc.c | 12 +- src/battle/common/stage/area_kpa/kpa_07.inc.c | 42 +- src/battle/common/stage/area_kpa/kpa_08.inc.c | 12 +- src/battle/common/stage/area_kpa/kpa_09.inc.c | 12 +- src/battle/common/stage/area_kpa/kpa_11.inc.c | 12 +- src/battle/common/stage/area_kpa/kpa_13.inc.c | 36 +- src/battle/common/stage/area_kpa/kpa_14.inc.c | 36 +- .../common/stage/area_kzn/Decorations.inc.c | 110 +- src/battle/common/stage/area_kzn/kzn_01.inc.c | 14 +- .../common/stage/area_kzn/kzn_01b.inc.c | 12 +- src/battle/common/stage/area_kzn/kzn_02.inc.c | 64 +- src/battle/common/stage/area_kzn/kzn_04.inc.c | 76 +- .../common/stage/area_kzn/kzn_04b.inc.c | 76 +- .../common/stage/area_kzn/kzn_04c.inc.c | 64 +- src/battle/common/stage/area_kzn/kzn_05.inc.c | 166 +- src/battle/common/stage/area_mac/mac_01.inc.c | 42 +- src/battle/common/stage/area_mac/mac_02.inc.c | 16 +- src/battle/common/stage/area_mim/mim_01.inc.c | 12 +- src/battle/common/stage/area_nok/nok_01.inc.c | 66 +- src/battle/common/stage/area_nok/nok_02.inc.c | 104 +- src/battle/common/stage/area_nok/nok_03.inc.c | 10 +- src/battle/common/stage/area_nok/nok_04.inc.c | 10 +- src/battle/common/stage/area_omo/omo_01.inc.c | 46 +- src/battle/common/stage/area_omo/omo_02.inc.c | 12 +- src/battle/common/stage/area_omo/omo_03.inc.c | 14 +- .../common/stage/area_omo/omo_03b.inc.c | 12 +- src/battle/common/stage/area_omo/omo_04.inc.c | 30 +- src/battle/common/stage/area_omo/omo_05.inc.c | 16 +- .../common/stage/area_omo/omo_05b.inc.c | 16 +- src/battle/common/stage/area_omo/omo_06.inc.c | 84 +- src/battle/common/stage/area_omo/omo_07.inc.c | 12 +- src/battle/common/stage/area_pra/pra_01.inc.c | 14 +- src/battle/common/stage/area_pra/pra_02.inc.c | 34 +- src/battle/common/stage/area_pra/pra_03.inc.c | 12 +- .../common/stage/area_pra/pra_03b.inc.c | 14 +- .../common/stage/area_pra/pra_03c.inc.c | 16 +- src/battle/common/stage/area_pra/pra_04.inc.c | 34 +- src/battle/common/stage/area_sam/sam_01.inc.c | 46 +- src/battle/common/stage/area_sam/sam_02.inc.c | 50 +- .../common/stage/area_sam/sam_02b.inc.c | 16 +- .../common/stage/area_sam/sam_02c.inc.c | 18 +- .../common/stage/area_sam/sam_02d.inc.c | 20 +- src/battle/common/stage/area_sam/sam_03.inc.c | 46 +- src/battle/common/stage/area_sam/sam_04.inc.c | 12 +- src/battle/common/stage/area_sbk/sbk_02.inc.c | 60 +- src/battle/common/stage/area_tik/tik_01.inc.c | 26 +- src/battle/common/stage/area_tik/tik_02.inc.c | 26 +- src/battle/common/stage/area_tik/tik_03.inc.c | 16 +- src/battle/common/stage/area_tik/tik_04.inc.c | 62 +- src/battle/common/stage/area_tik/tik_05.inc.c | 32 +- src/battle/common/stage/area_trd/trd_00.inc.c | 12 +- src/battle/common/stage/area_trd/trd_01.inc.c | 12 +- src/battle/common/stage/area_trd/trd_02.inc.c | 40 +- .../common/stage/area_trd/trd_02b.inc.c | 44 +- .../common/stage/area_trd/trd_02c.inc.c | 16 +- .../common/stage/area_trd/trd_02d.inc.c | 24 +- src/battle/common/stage/area_trd/trd_03.inc.c | 26 +- src/battle/common/stage/area_trd/trd_04.inc.c | 22 +- src/battle/common/stage/area_trd/trd_05.inc.c | 46 +- .../common/stage/area_trd/trd_05b.inc.c | 32 +- .../common/stage/area_trd/trd_05c.inc.c | 48 +- .../common/stage/area_trd/trd_05d.inc.c | 46 +- .../common/stage/area_trd/trd_05e.inc.c | 28 +- .../common/stage/area_trd/trd_05f.inc.c | 32 +- .../common/stage/lib/BeachEffects.inc.c | 182 +- src/battle/common/stage/lib/DripVolumes.inc.c | 256 +- .../common/stage/lib/MovingClouds.inc.c | 110 +- .../common/stage/lib/RandomFlowers.inc.c | 90 +- src/battle/common/stage/lib/Snowflakes.inc.c | 96 +- .../common/stage/lib/TexturePanner.inc.c | 88 +- .../common/stage/lib/WaterEffects.inc.c | 464 +- src/battle/dmg_player.c | 50 +- src/battle/level_up.c | 230 +- src/battle/move/hammer/attack.c | 652 +-- src/battle/move/hammer/auto_smash.c | 234 +- src/battle/move/hammer/d_down_pound.c | 234 +- src/battle/move/hammer/hammer_charge_0.c | 544 +- src/battle/move/hammer/hammer_charge_1.c | 550 +- src/battle/move/hammer/hammer_charge_2.c | 538 +- src/battle/move/hammer/hammer_throw.c | 754 +-- src/battle/move/hammer/mega_quake.c | 340 +- src/battle/move/hammer/mega_smash.c | 186 +- src/battle/move/hammer/power_quake.c | 296 +- src/battle/move/hammer/power_smash.c | 176 +- src/battle/move/hammer/quake_hammer.c | 266 +- src/battle/move/hammer/shell_crack.c | 188 +- src/battle/move/hammer/shrink_smash.c | 232 +- src/battle/move/hammer/spin_smash.c | 756 +-- src/battle/move/hammer/super_smash.c | 178 +- src/battle/move/item/coconut.c | 88 +- src/battle/move/item/dizzy_dial.c | 98 +- src/battle/move/item/dried_shroom.c | 44 +- src/battle/move/item/dusty_hammer.c | 88 +- src/battle/move/item/egg_missile.c | 84 +- src/battle/move/item/electro_pop.c | 62 +- src/battle/move/item/fire_flower.c | 122 +- src/battle/move/item/food.c | 272 +- src/battle/move/item/fright_jar.c | 106 +- src/battle/move/item/hustle_drink.c | 154 +- src/battle/move/item/insecticide_herb.c | 120 +- src/battle/move/item/life_shroom.c | 214 +- src/battle/move/item/mushroom.c | 252 +- src/battle/move/item/mystery.c | 90 +- src/battle/move/item/pebble.c | 88 +- src/battle/move/item/please_come_back.c | 24 +- src/battle/move/item/pow_block.c | 148 +- src/battle/move/item/repel_gel.c | 36 +- src/battle/move/item/shooting_star.c | 140 +- src/battle/move/item/sleepy_sheep.c | 294 +- src/battle/move/item/snowman_doll.c | 134 +- src/battle/move/item/stone_cap.c | 26 +- src/battle/move/item/stop_watch.c | 66 +- src/battle/move/item/strange_cake.c | 158 +- src/battle/move/item/super_soda.c | 222 +- src/battle/move/item/tasty_tonic.c | 74 +- src/battle/move/item/thunder_bolt.c | 64 +- src/battle/move/item/thunder_rage.c | 76 +- src/battle/move/item/ultra_shroom.c | 50 +- src/battle/move/item/unknown_item.c | 46 +- src/battle/move/item/volt_shroom.c | 40 +- src/battle/move/jump/attack.c | 984 ++-- src/battle/move/jump/auto_jump.c | 350 +- src/battle/move/jump/auto_multibounce.c | 866 +-- src/battle/move/jump/d_down_jump.c | 366 +- src/battle/move/jump/demo_power_bounce.c | 824 +-- src/battle/move/jump/dizzy_stomp.c | 324 +- src/battle/move/jump/earthquake_jump.c | 1340 ++--- src/battle/move/jump/jump_charge_0.c | 112 +- src/battle/move/jump/jump_charge_1.c | 114 +- src/battle/move/jump/jump_charge_2.c | 110 +- src/battle/move/jump/mega_jump.c | 208 +- src/battle/move/jump/multibounce.c | 920 +-- src/battle/move/jump/power_bounce.c | 862 +-- src/battle/move/jump/power_jump.c | 196 +- src/battle/move/jump/shrink_stomp.c | 324 +- src/battle/move/jump/sleep_stomp.c | 324 +- src/battle/move/jump/super_jump.c | 198 +- src/battle/move/star_power/chill_out.c | 170 +- src/battle/move/star_power/focus.c | 96 +- src/battle/move/star_power/lullaby.c | 60 +- src/battle/move/star_power/peach_beam.c | 74 +- src/battle/move/star_power/peach_focus.c | 146 +- src/battle/move/star_power/peach_focus_alt.c | 64 +- src/battle/move/star_power/refresh.c | 66 +- src/battle/move/star_power/smooch.c | 282 +- src/battle/move/star_power/star_beam.c | 74 +- src/battle/move/star_power/star_storm.c | 122 +- src/battle/move/star_power/time_out.c | 60 +- src/battle/move/star_power/up_and_away.c | 208 +- src/battle/partner/bombette.c | 2098 +++---- src/battle/partner/bow.c | 1894 +++---- src/battle/partner/goombario.c | 1832 +++--- src/battle/partner/goompa.c | 174 +- src/battle/partner/kooper.c | 2120 +++---- src/battle/partner/lakilester.c | 1480 ++--- src/battle/partner/parakarry.c | 1110 ++-- src/battle/partner/sushie.c | 1428 ++--- src/battle/partner/twink.c | 286 +- src/battle/partner/watt.c | 1578 +++--- src/battle/player_events.c | 2218 ++++---- src/battle/standard_events.c | 3782 ++++++------- src/battle/use_items.c | 10 +- src/common/MakeSun.inc.c | 10 +- src/common/foliage.inc.c | 338 +- src/encounter.c | 170 +- src/entity/Chest.c | 64 +- src/evt/audio_api.c | 6 +- src/evt/cam_api.c | 16 +- src/evt/evt.c | 2 +- src/evt/fx_api.c | 6 +- src/world/area_arn/arn_02/arn_02_1_music.c | 22 +- src/world/area_arn/arn_02/arn_02_2_main.c | 30 +- src/world/area_arn/arn_02/arn_02_3_entity.c | 20 +- src/world/area_arn/arn_03/arn_03_1_music.c | 22 +- src/world/area_arn/arn_03/arn_03_2_main.c | 92 +- src/world/area_arn/arn_03/arn_03_3_npc.c | 712 +-- src/world/area_arn/arn_03/arn_03_4_entity.c | 10 +- src/world/area_arn/arn_04/arn_04_1_music.c | 22 +- src/world/area_arn/arn_04/arn_04_2_main.c | 30 +- src/world/area_arn/arn_04/arn_04_4_entity.c | 18 +- src/world/area_arn/arn_05/arn_05_1_music.c | 26 +- src/world/area_arn/arn_05/arn_05_2_main.c | 58 +- src/world/area_arn/arn_05/arn_05_3_npc.c | 1010 ++-- src/world/area_arn/arn_05/arn_05_4_entity.c | 6 +- src/world/area_arn/arn_07/arn_07_1_music.c | 36 +- src/world/area_arn/arn_07/arn_07_2_main.c | 630 +-- src/world/area_arn/arn_07/arn_07_3_windmill.c | 74 +- src/world/area_arn/arn_07/arn_07_4_entity.c | 72 +- src/world/area_arn/arn_07/arn_07_5_npc.c | 962 ++-- src/world/area_arn/arn_08/arn_08_1_music.c | 22 +- src/world/area_arn/arn_08/arn_08_2_main.c | 204 +- src/world/area_arn/arn_08/arn_08_3_well.c | 44 +- src/world/area_arn/arn_08/arn_08_4_gears.c | 30 +- src/world/area_arn/arn_08/arn_08_5_demo.c | 184 +- src/world/area_arn/arn_08/arn_08_6_npc.c | 60 +- src/world/area_arn/arn_08/arn_08_7_entity.c | 10 +- src/world/area_arn/arn_09/arn_09_1_music.c | 20 +- src/world/area_arn/arn_09/arn_09_2_main.c | 52 +- src/world/area_arn/arn_09/arn_09_3_entity.c | 40 +- src/world/area_arn/arn_09/arn_09_4_launch.c | 30 +- src/world/area_arn/arn_09/arn_09_5_npc.c | 44 +- src/world/area_arn/arn_10/arn_10_1_music.c | 20 +- src/world/area_arn/arn_10/arn_10_2_main.c | 58 +- src/world/area_arn/arn_10/arn_10_3_npc.c | 88 +- src/world/area_arn/arn_10/arn_10_4_entity.c | 18 +- src/world/area_arn/arn_11/arn_11_1_music.c | 20 +- src/world/area_arn/arn_11/arn_11_2_main.c | 164 +- src/world/area_arn/arn_11/arn_11_3_npc.c | 240 +- src/world/area_arn/arn_12/arn_12_1_music.c | 20 +- src/world/area_arn/arn_12/arn_12_2_main.c | 56 +- src/world/area_arn/arn_12/arn_12_3_npc.c | 90 +- src/world/area_arn/arn_12/arn_12_4_entity.c | 18 +- src/world/area_arn/arn_13/arn_13_1_music.c | 20 +- src/world/area_arn/arn_13/arn_13_2_main.c | 58 +- src/world/area_arn/arn_13/arn_13_3_npc.c | 90 +- src/world/area_arn/arn_13/arn_13_4_entity.c | 18 +- src/world/area_dgb/dgb_00/dgb_00_1_music.c | 22 +- src/world/area_dgb/dgb_00/dgb_00_2_main.c | 150 +- src/world/area_dgb/dgb_00/dgb_00_3_npc.c | 958 ++-- src/world/area_dgb/dgb_00/dgb_00_4_entity.c | 6 +- src/world/area_dgb/dgb_01/dgb_01_1_music.c | 22 +- src/world/area_dgb/dgb_01/dgb_01_2_main.c | 328 +- src/world/area_dgb/dgb_01/dgb_01_3_bridges.c | 368 +- src/world/area_dgb/dgb_01/dgb_01_4_entity.c | 72 +- src/world/area_dgb/dgb_01/dgb_01_5_npc.c | 398 +- src/world/area_dgb/dgb_02/dgb_02_1_music.c | 20 +- src/world/area_dgb/dgb_02/dgb_02_2_main.c | 182 +- src/world/area_dgb/dgb_03/dgb_03_1_music.c | 20 +- src/world/area_dgb/dgb_03/dgb_03_2_main.c | 256 +- src/world/area_dgb/dgb_03/dgb_03_3_clock.c | 234 +- src/world/area_dgb/dgb_03/dgb_03_4_entity.c | 74 +- src/world/area_dgb/dgb_03/dgb_03_5_npc.c | 12 +- src/world/area_dgb/dgb_04/dgb_04_1_music.c | 20 +- src/world/area_dgb/dgb_04/dgb_04_2_main.c | 108 +- src/world/area_dgb/dgb_04/dgb_04_4_entity.c | 4 +- src/world/area_dgb/dgb_05/dgb_05_1_music.c | 20 +- src/world/area_dgb/dgb_05/dgb_05_2_main.c | 76 +- src/world/area_dgb/dgb_05/dgb_05_3_hole.c | 16 +- src/world/area_dgb/dgb_05/dgb_05_4_entity.c | 10 +- src/world/area_dgb/dgb_06/dgb_06_1_music.c | 20 +- src/world/area_dgb/dgb_06/dgb_06_2_main.c | 76 +- src/world/area_dgb/dgb_06/dgb_06_3_entity.c | 12 +- src/world/area_dgb/dgb_06/dgb_06_4_npc.c | 30 +- src/world/area_dgb/dgb_07/dgb_07_1_music.c | 20 +- src/world/area_dgb/dgb_07/dgb_07_2_main.c | 70 +- src/world/area_dgb/dgb_07/dgb_07_3_entity.c | 10 +- src/world/area_dgb/dgb_08/dgb_08_1_music.c | 20 +- src/world/area_dgb/dgb_08/dgb_08_2_main.c | 116 +- src/world/area_dgb/dgb_08/dgb_08_3_npc.c | 320 +- src/world/area_dgb/dgb_08/dgb_08_4_entity.c | 4 +- src/world/area_dgb/dgb_09/dgb_09_1_music.c | 20 +- src/world/area_dgb/dgb_09/dgb_09_2_main.c | 166 +- .../area_dgb/dgb_09/dgb_09_3_breakable.c | 48 +- src/world/area_dgb/dgb_09/dgb_09_4_npc.c | 14 +- src/world/area_dgb/dgb_10/dgb_10_1_music.c | 20 +- src/world/area_dgb/dgb_10/dgb_10_2_main.c | 88 +- src/world/area_dgb/dgb_10/dgb_10_3_hole.c | 20 +- src/world/area_dgb/dgb_10/dgb_10_4_entity.c | 46 +- src/world/area_dgb/dgb_11/dgb_11_1_music.c | 20 +- src/world/area_dgb/dgb_11/dgb_11_2_main.c | 120 +- src/world/area_dgb/dgb_11/dgb_11_3_entity.c | 184 +- src/world/area_dgb/dgb_12/dgb_12_1_music.c | 20 +- src/world/area_dgb/dgb_12/dgb_12_2_main.c | 66 +- src/world/area_dgb/dgb_12/dgb_12_3_spikes.c | 88 +- src/world/area_dgb/dgb_12/dgb_12_4_entity.c | 10 +- src/world/area_dgb/dgb_13/dgb_13_1_music.c | 20 +- src/world/area_dgb/dgb_13/dgb_13_2_main.c | 30 +- src/world/area_dgb/dgb_13/dgb_13_3_entity.c | 18 +- src/world/area_dgb/dgb_13/dgb_13_4_drawer.c | 124 +- src/world/area_dgb/dgb_14/dgb_14_1_music.c | 20 +- src/world/area_dgb/dgb_14/dgb_14_2_main.c | 116 +- src/world/area_dgb/dgb_14/dgb_14_3_entity.c | 8 +- src/world/area_dgb/dgb_15/dgb_15_1_music.c | 28 +- src/world/area_dgb/dgb_15/dgb_15_2_main.c | 162 +- src/world/area_dgb/dgb_15/dgb_15_3_npc.c | 224 +- src/world/area_dgb/dgb_15/dgb_15_4_entity.c | 72 +- src/world/area_dgb/dgb_16/dgb_16_1_music.c | 20 +- src/world/area_dgb/dgb_16/dgb_16_2_main.c | 78 +- src/world/area_dgb/dgb_16/dgb_16_3_entity.c | 6 +- src/world/area_dgb/dgb_17/dgb_17_1_music.c | 20 +- src/world/area_dgb/dgb_17/dgb_17_2_main.c | 118 +- src/world/area_dgb/dgb_17/dgb_17_3_entity.c | 8 +- src/world/area_dgb/dgb_18/dgb_18_1_music.c | 20 +- src/world/area_dgb/dgb_18/dgb_18_2_main.c | 66 +- src/world/area_dgb/dgb_18/dgb_18_3_npc.c | 840 +-- src/world/area_dgb/dgb_18/dgb_18_4_entity.c | 20 +- src/world/area_dro/dro_01/dro_01_1_music.c | 22 +- src/world/area_dro/dro_01/dro_01_2_main.c | 204 +- src/world/area_dro/dro_01/dro_01_3_npc.c | 234 +- src/world/area_dro/dro_01/dro_01_4_shop.c | 148 +- src/world/area_dro/dro_01/dro_01_5_rooms.c | 346 +- src/world/area_dro/dro_01/dro_01_6_entity.c | 36 +- src/world/area_dro/dro_01/dro_01_7_foliage.c | 10 +- src/world/area_dro/dro_01/npc_composer.c | 130 +- src/world/area_dro/dro_01/npc_hint_dryite.c | 192 +- .../dro_01/npc_hint_dryite_companion.c | 58 +- src/world/area_dro/dro_01/npc_shop_owner.c | 186 +- src/world/area_dro/dro_02/dro_02_1_music.c | 34 +- src/world/area_dro/dro_02/dro_02_2_entity.c | 10 +- src/world/area_dro/dro_02/dro_02_3_main.c | 162 +- src/world/area_dro/dro_02/dro_02_4_rooms.c | 374 +- src/world/area_dro/dro_02/dro_02_5_npc.c | 458 +- src/world/area_dro/dro_02/npc_merlee.c | 448 +- src/world/area_dro/dro_02/npc_moustafa.c | 492 +- src/world/area_end/end_00/end_00_1_main.c | 24 +- src/world/area_end/end_00/end_00_2_credits.c | 24 +- .../area_end/end_00/end_00_3_parade_setup.c | 1172 ++-- src/world/area_end/end_00/end_00_4_allies.c | 310 +- src/world/area_end/end_00/end_00_5_koopas.c | 534 +- src/world/area_end/end_00/end_00_6_caravan.c | 424 +- src/world/area_end/end_00/end_00_7_boos.c | 442 +- src/world/area_end/end_00/end_00_8_yoshis.c | 92 +- .../area_end/end_00/end_00_9_huff_n_puff.c | 834 +-- .../area_end/end_00/end_00_A_crystal_king.c | 332 +- src/world/area_end/end_00/end_00_B_bowser.c | 410 +- src/world/area_end/end_01/end_01_1_main.c | 22 +- src/world/area_end/end_01/end_01_2_credits.c | 18 +- .../area_end/end_01/end_01_3_parade_setup.c | 650 +-- .../area_end/end_01/end_01_4_opera_float.c | 380 +- .../area_end/end_01/end_01_5_flower_float.c | 326 +- .../area_end/end_01/end_01_6_shyguy_float.c | 676 +-- .../area_end/end_01/end_01_7_peach_float.c | 522 +- src/world/area_flo/common/DroppingVine.inc.c | 112 +- .../area_flo/common/FlowerSpawnRegion.inc.c | 88 +- src/world/area_flo/common/LogBridge.inc.c | 108 +- src/world/area_flo/flo_00/flo_00_1_music.c | 66 +- src/world/area_flo/flo_00/flo_00_2_main.c | 362 +- src/world/area_flo/flo_00/flo_00_3_npc.c | 1080 ++-- src/world/area_flo/flo_00/flo_00_4_epilogue.c | 94 +- .../area_flo/flo_00/flo_00_5_beanstalk.c | 1124 ++-- src/world/area_flo/flo_00/flo_00_6_entity.c | 10 +- src/world/area_flo/flo_03/flo_03_1_music.c | 70 +- src/world/area_flo/flo_03/flo_03_2_main.c | 62 +- src/world/area_flo/flo_03/flo_03_3_npc.c | 1246 ++--- src/world/area_flo/flo_03/flo_03_4_foliage.c | 14 +- src/world/area_flo/flo_03/flo_03_5_entity.c | 12 +- src/world/area_flo/flo_07/flo_07_1_music.c | 44 +- src/world/area_flo/flo_07/flo_07_2_main.c | 72 +- src/world/area_flo/flo_07/flo_07_3_npc.c | 372 +- src/world/area_flo/flo_08/flo_08_1_music.c | 16 +- src/world/area_flo/flo_08/flo_08_2_entity.c | 6 +- src/world/area_flo/flo_08/flo_08_3_main.c | 112 +- src/world/area_flo/flo_08/flo_08_4_npc.c | 318 +- src/world/area_flo/flo_08/flo_08_5_foliage.c | 14 +- src/world/area_flo/flo_08/flo_08_6_vines.c | 4 +- src/world/area_flo/flo_09/flo_09_1_music.c | 16 +- src/world/area_flo/flo_09/flo_09_2_main.c | 42 +- src/world/area_flo/flo_09/flo_09_3_vines.c | 4 +- src/world/area_flo/flo_09/flo_09_4_foliage.c | 106 +- src/world/area_flo/flo_09/flo_09_5_npc.c | 78 +- src/world/area_flo/flo_10/flo_10_1_music.c | 48 +- src/world/area_flo/flo_10/flo_10_2_entity.c | 10 +- src/world/area_flo/flo_10/flo_10_3_main.c | 66 +- src/world/area_flo/flo_10/flo_10_4_fountain.c | 474 +- src/world/area_flo/flo_10/flo_10_5_npc.c | 346 +- src/world/area_flo/flo_10/flo_10_6_waterfx.c | 4 +- src/world/area_flo/flo_10/flo_10_7_foliage.c | 10 +- src/world/area_flo/flo_11/flo_11_1_music.c | 16 +- src/world/area_flo/flo_11/flo_11_2_main.c | 126 +- src/world/area_flo/flo_11/flo_11_3_npc.c | 526 +- src/world/area_flo/flo_11/flo_11_4_entity.c | 8 +- src/world/area_flo/flo_12/flo_12_1_music.c | 42 +- src/world/area_flo/flo_12/flo_12_2_main.c | 48 +- src/world/area_flo/flo_12/flo_12_3_npc.c | 316 +- src/world/area_flo/flo_13/flo_13_1_music.c | 92 +- src/world/area_flo/flo_13/flo_13_2_entity.c | 26 +- src/world/area_flo/flo_13/flo_13_3_main.c | 42 +- src/world/area_flo/flo_13/flo_13_4_npc.c | 916 +-- src/world/area_flo/flo_14/flo_14_1_music.c | 16 +- src/world/area_flo/flo_14/flo_14_2_main.c | 112 +- src/world/area_flo/flo_14/flo_14_3_bubbles.c | 468 +- src/world/area_flo/flo_14/flo_14_4_npc.c | 102 +- src/world/area_flo/flo_14/flo_14_5_entity.c | 6 +- src/world/area_flo/flo_14/flo_14_6_logs.c | 4 +- src/world/area_flo/flo_15/flo_15_1_music.c | 26 +- src/world/area_flo/flo_15/flo_15_2_main.c | 44 +- src/world/area_flo/flo_15/flo_15_3_npc.c | 348 +- src/world/area_flo/flo_15/flo_15_4_entity.c | 18 +- src/world/area_flo/flo_15/flo_15_5_stairs.c | 128 +- src/world/area_flo/flo_16/flo_16_1_music.c | 16 +- src/world/area_flo/flo_16/flo_16_2_main.c | 104 +- src/world/area_flo/flo_16/flo_16_3_vines.c | 6 +- src/world/area_flo/flo_16/flo_16_4_entity.c | 80 +- src/world/area_flo/flo_16/flo_16_6_puzzle.c | 428 +- src/world/area_flo/flo_17/flo_17_1_music.c | 16 +- src/world/area_flo/flo_17/flo_17_2_main.c | 166 +- src/world/area_flo/flo_17/flo_17_3_logs.c | 4 +- src/world/area_flo/flo_17/flo_17_5_entity.c | 10 +- src/world/area_flo/flo_18/flo_18_1_music.c | 18 +- src/world/area_flo/flo_18/flo_18_2_main.c | 94 +- src/world/area_flo/flo_18/flo_18_3_machine.c | 1346 ++--- src/world/area_flo/flo_18/flo_18_4_npc.c | 892 +-- src/world/area_flo/flo_18/flo_18_5_foliage.c | 4 +- src/world/area_flo/flo_19/flo_19_1_music.c | 38 +- src/world/area_flo/flo_19/flo_19_2_entity.c | 6 +- src/world/area_flo/flo_19/flo_19_3_main.c | 92 +- src/world/area_flo/flo_19/flo_19_4_clouds.c | 296 +- .../area_flo/flo_19/flo_19_5_beanstalk.c | 634 +-- src/world/area_flo/flo_21/flo_21_1_music.c | 14 +- src/world/area_flo/flo_21/flo_21_2_main.c | 188 +- src/world/area_flo/flo_21/flo_21_3_clouds.c | 98 +- src/world/area_flo/flo_21/flo_21_4_npc.c | 904 +-- src/world/area_flo/flo_22/flo_22_1_music.c | 16 +- src/world/area_flo/flo_22/flo_22_2_main.c | 42 +- src/world/area_flo/flo_22/flo_22_3_npc.c | 162 +- src/world/area_flo/flo_22/flo_22_4_well.c | 218 +- src/world/area_flo/flo_22/flo_22_5_foliage.c | 16 +- src/world/area_flo/flo_23/flo_23_1_music.c | 16 +- src/world/area_flo/flo_23/flo_23_2_main.c | 40 +- src/world/area_flo/flo_23/flo_23_3_npc.c | 282 +- src/world/area_flo/flo_23/flo_23_4_entity.c | 16 +- src/world/area_flo/flo_24/flo_24_1_music.c | 20 +- src/world/area_flo/flo_24/flo_24_2_main.c | 72 +- src/world/area_flo/flo_24/flo_24_3_foliage.c | 14 +- src/world/area_flo/flo_24/flo_24_4_water.c | 152 +- src/world/area_flo/flo_24/flo_24_5_entity.c | 16 +- src/world/area_flo/flo_25/flo_25_1_music.c | 16 +- src/world/area_flo/flo_25/flo_25_2_main.c | 44 +- src/world/area_flo/flo_25/flo_25_3_npc.c | 282 +- src/world/area_flo/flo_25/flo_25_4_entity.c | 8 +- src/world/area_flo/flo_25/flo_25_5_foliage.c | 14 +- src/world/area_flo/flo_25/flo_25_6_vine.c | 4 +- src/world/area_gv/gv_01/gv_01_1_main.c | 424 +- src/world/area_hos/common/FallingStars.inc.c | 162 +- src/world/area_hos/hos_00/hos_00_1_music.c | 118 +- src/world/area_hos/hos_00/hos_00_2_main.c | 148 +- src/world/area_hos/hos_00/hos_00_3_unused.c | 16 +- src/world/area_hos/hos_00/hos_00_4_npc.c | 162 +- src/world/area_hos/hos_00/hos_00_5_entity.c | 36 +- src/world/area_hos/hos_00/hos_00_6_scenes.c | 896 +-- .../area_hos/hos_00/hos_00_7_shade_gfx.c | 8 +- src/world/area_hos/hos_01/hos_01_1_music.c | 12 +- src/world/area_hos/hos_01/hos_01_2_main.c | 256 +- src/world/area_hos/hos_01/hos_01_3_model_fx.c | 264 +- src/world/area_hos/hos_01/hos_01_4_npc.c | 822 +-- src/world/area_hos/hos_01/hos_01_5_entity.c | 10 +- src/world/area_hos/hos_01/hos_01_6_star_way.c | 264 +- src/world/area_hos/hos_02/hos_02_1_music.c | 12 +- src/world/area_hos/hos_02/hos_02_2_main.c | 206 +- src/world/area_hos/hos_02/hos_02_3_model_fx.c | 390 +- src/world/area_hos/hos_02/hos_02_4_unused.c | 4 +- src/world/area_hos/hos_02/hos_02_6_descent.c | 70 +- src/world/area_hos/hos_03/hos_03_1_music.c | 12 +- src/world/area_hos/hos_03/hos_03_2_main.c | 136 +- src/world/area_hos/hos_03/hos_03_3_model_fx.c | 72 +- src/world/area_hos/hos_03/hos_03_4_rooms.c | 130 +- src/world/area_hos/hos_03/hos_03_5_foliage.c | 214 +- src/world/area_hos/hos_03/hos_03_6_npc.c | 170 +- src/world/area_hos/hos_03/hos_03_7_shop.c | 24 +- src/world/area_hos/hos_03/hos_03_8_entity.c | 8 +- src/world/area_hos/hos_04/hos_04_1_music.c | 42 +- src/world/area_hos/hos_04/hos_04_2_main.c | 178 +- .../area_hos/hos_04/hos_04_3_fountains.c | 34 +- src/world/area_hos/hos_04/hos_04_4_unused.c | 20 +- src/world/area_hos/hos_04/hos_04_6_intro.c | 134 +- src/world/area_hos/hos_04/hos_04_7_starship.c | 528 +- src/world/area_hos/hos_04/hos_04_8_narrator.c | 14 +- src/world/area_hos/hos_05/hos_05_1_music.c | 44 +- src/world/area_hos/hos_05/hos_05_2_main.c | 80 +- src/world/area_hos/hos_05/hos_05_3_misc.c | 238 +- src/world/area_hos/hos_05/hos_05_4_npc.c | 576 +- src/world/area_hos/hos_05/hos_05_5_intro.c | 1534 ++--- src/world/area_hos/hos_05/hos_05_6_narrator.c | 14 +- src/world/area_hos/hos_05/hos_05_7_model_fx.c | 314 +- .../area_hos/hos_05/hos_05_8_star_ship.c | 338 +- src/world/area_hos/hos_06/hos_06_1_entity.c | 8 +- src/world/area_hos/hos_06/hos_06_2_main.c | 98 +- src/world/area_hos/hos_06/hos_06_3_merlow.c | 202 +- src/world/area_hos/hos_06/hos_06_4_rooms.c | 160 +- .../area_hos/hos_06/hos_06_5_merluvlee.c | 414 +- src/world/area_hos/hos_06/hos_06_6_chest.c | 134 +- src/world/area_hos/hos_10/hos_10_1_music.c | 36 +- src/world/area_hos/hos_10/hos_10_2_npc1.c | 54 +- src/world/area_hos/hos_10/hos_10_3_npc2.c | 50 +- src/world/area_hos/hos_10/hos_10_4_main.c | 70 +- src/world/area_hos/hos_10/hos_10_5_intro.c | 234 +- .../area_hos/hos_10/hos_10_6_pre_title.c | 138 +- src/world/area_hos/hos_10/hos_10_7_ending.c | 734 +-- src/world/area_hos/hos_20/hos_20_1_main.c | 80 +- src/world/area_hos/hos_20/hos_20_2_starship.c | 412 +- src/world/area_isk/isk_01/isk_01_1_music.c | 56 +- src/world/area_isk/isk_01/isk_01_2_main.c | 50 +- src/world/area_isk/isk_01/isk_01_3_haze.c | 30 +- src/world/area_isk/isk_01/isk_01_4_entity.c | 6 +- src/world/area_isk/isk_02/isk_02_1_main.c | 50 +- src/world/area_isk/isk_02/isk_02_2_lock.c | 80 +- src/world/area_isk/isk_02/isk_02_3_ambush.c | 184 +- src/world/area_isk/isk_02/isk_02_4_entity.c | 12 +- src/world/area_isk/isk_02/isk_02_5_npc.c | 120 +- src/world/area_isk/isk_03/isk_03_1_main.c | 62 +- src/world/area_isk/isk_03/isk_03_2_sand.c | 508 +- src/world/area_isk/isk_03/isk_03_3_entity.c | 10 +- src/world/area_isk/isk_03/isk_03_4_switch.c | 96 +- src/world/area_isk/isk_04/isk_04_1_music.c | 56 +- src/world/area_isk/isk_04/isk_04_2_main.c | 56 +- .../area_isk/isk_04/isk_04_3_obstructions.c | 116 +- src/world/area_isk/isk_04/isk_04_4_entity.c | 16 +- src/world/area_isk/isk_04/isk_04_6_demo.c | 242 +- src/world/area_isk/isk_05/isk_05_1_main.c | 74 +- src/world/area_isk/isk_05/isk_05_2_entity.c | 26 +- src/world/area_isk/isk_05/isk_05_3_npc.c | 208 +- src/world/area_isk/isk_06/isk_06_1_main.c | 58 +- src/world/area_isk/isk_06/isk_06_2_entity.c | 12 +- src/world/area_isk/isk_06/isk_06_3_sand.c | 572 +- src/world/area_isk/isk_06/isk_06_4_switch.c | 96 +- src/world/area_isk/isk_07/isk_07_1_main.c | 56 +- src/world/area_isk/isk_07/isk_07_2_entity.c | 68 +- src/world/area_isk/isk_07/isk_07_3_npc.c | 238 +- src/world/area_isk/isk_07/isk_07_4_stairs.c | 114 +- src/world/area_isk/isk_07/isk_07_5_lock.c | 150 +- src/world/area_isk/isk_07/isk_07_6_switch.c | 76 +- src/world/area_isk/isk_07/isk_07_7_ambush.c | 238 +- src/world/area_isk/isk_08/isk_08_1_main.c | 50 +- src/world/area_isk/isk_08/isk_08_3_entity.c | 90 +- src/world/area_isk/isk_09/isk_09_1_music.c | 66 +- src/world/area_isk/isk_09/isk_09_2_main.c | 28 +- src/world/area_isk/isk_09/isk_09_3_entity.c | 146 +- src/world/area_isk/isk_09/isk_09_4_stairs.c | 398 +- src/world/area_isk/isk_09/isk_09_5_switch.c | 292 +- src/world/area_isk/isk_10/isk_10_1_main.c | 48 +- src/world/area_isk/isk_10/isk_10_2_entity.c | 64 +- src/world/area_isk/isk_10/isk_10_3_bombable.c | 126 +- src/world/area_isk/isk_11/isk_11_1_music.c | 54 +- src/world/area_isk/isk_11/isk_11_2_main.c | 94 +- src/world/area_isk/isk_11/isk_11_3_entity.c | 32 +- src/world/area_isk/isk_11/isk_11_4_scene.c | 364 +- src/world/area_isk/isk_11/isk_11_5_puzzle.c | 548 +- src/world/area_isk/isk_11/isk_11_6_lock.c | 80 +- src/world/area_isk/isk_12/isk_12_1_main.c | 62 +- src/world/area_isk/isk_12/isk_12_2_entity.c | 32 +- src/world/area_isk/isk_12/isk_12_3_sand.c | 506 +- src/world/area_isk/isk_12/isk_12_4_switch.c | 326 +- src/world/area_isk/isk_13/isk_13_1_main.c | 42 +- src/world/area_isk/isk_13/isk_13_2_entity.c | 28 +- src/world/area_isk/isk_13/isk_13_3_npc.c | 186 +- src/world/area_isk/isk_14/isk_14_1_main.c | 42 +- src/world/area_isk/isk_14/isk_14_2_entity.c | 28 +- src/world/area_isk/isk_14/isk_14_3_npc.c | 144 +- src/world/area_isk/isk_16/isk_16_1_main.c | 186 +- src/world/area_isk/isk_16/isk_16_2_npc.c | 66 +- src/world/area_isk/isk_16/isk_16_3_boss.c | 472 +- src/world/area_isk/isk_16/isk_16_4_entity.c | 12 +- src/world/area_isk/isk_18/isk_18_1_main.c | 56 +- src/world/area_isk/isk_18/isk_18_3_entity.c | 16 +- src/world/area_isk/isk_19/isk_19_1_music.c | 54 +- src/world/area_isk/isk_19/isk_19_2_main.c | 46 +- src/world/area_isk/isk_19/isk_19_3_entity.c | 10 +- src/world/area_iwa/iwa_00/iwa_00_1_main.c | 58 +- src/world/area_iwa/iwa_00/iwa_00_2_entity.c | 32 +- src/world/area_iwa/iwa_00/iwa_00_3_npc.c | 368 +- src/world/area_iwa/iwa_00/iwa_00_4_slide.c | 86 +- src/world/area_iwa/iwa_01/iwa_01_1_main.c | 114 +- src/world/area_iwa/iwa_01/iwa_01_2_entity.c | 18 +- src/world/area_iwa/iwa_01/iwa_01_3_splash.c | 10 +- src/world/area_iwa/iwa_01/iwa_01_5_slide.c | 172 +- src/world/area_iwa/iwa_02/iwa_02_1_main.c | 34 +- src/world/area_iwa/iwa_02/iwa_02_2_entity.c | 12 +- src/world/area_iwa/iwa_02/iwa_02_3_npc.c | 94 +- src/world/area_iwa/iwa_03/iwa_03_1_main.c | 32 +- src/world/area_iwa/iwa_03/iwa_03_2_entity.c | 102 +- src/world/area_iwa/iwa_03/iwa_03_4_slide.c | 88 +- src/world/area_iwa/iwa_04/iwa_04_1_music.c | 6 +- src/world/area_iwa/iwa_04/iwa_04_2_main.c | 50 +- src/world/area_iwa/iwa_04/iwa_04_3_entity.c | 74 +- src/world/area_iwa/iwa_04/iwa_04_4_npc.c | 478 +- src/world/area_iwa/iwa_10/iwa_10_1_music.c | 26 +- src/world/area_iwa/iwa_10/iwa_10_2_main.c | 122 +- src/world/area_iwa/iwa_10/iwa_10_3_npc.c | 166 +- src/world/area_iwa/iwa_10/iwa_10_4_train.c | 1058 ++-- src/world/area_iwa/iwa_10/iwa_10_5_entity.c | 28 +- .../area_iwa/iwa_10/iwa_10_6_parakarry.c | 558 +- src/world/area_iwa/iwa_10/iwa_10_8_foliage.c | 20 +- src/world/area_iwa/iwa_11/iwa_11_1_music.c | 6 +- src/world/area_iwa/iwa_11/iwa_11_2_main.c | 84 +- src/world/area_iwa/iwa_11/iwa_11_3_train.c | 736 +-- src/world/area_iwa/iwa_11/iwa_11_4_scenery.c | 54 +- src/world/area_iwa/iwa_11/iwa_11_5_npc.c | 22 +- src/world/area_jan/common/MoveBushTemplates.h | 90 +- src/world/area_jan/common/PullVine.inc.c | 278 +- src/world/area_jan/jan_00/jan_00_0_header.c | 8 +- src/world/area_jan/jan_00/jan_00_1_main.c | 76 +- src/world/area_jan/jan_00/jan_00_2_npc.c | 762 +-- src/world/area_jan/jan_00/jan_00_3_entity.c | 24 +- src/world/area_jan/jan_00/jan_00_4_whale.c | 538 +- src/world/area_jan/jan_00/jan_00_5_foliage.c | 12 +- src/world/area_jan/jan_01/jan_01_1_music.c | 8 +- src/world/area_jan/jan_01/jan_01_2_main.c | 62 +- src/world/area_jan/jan_01/jan_01_3_npc.c | 486 +- src/world/area_jan/jan_01/jan_01_4_entity.c | 24 +- src/world/area_jan/jan_01/jan_01_5_foliage.c | 66 +- src/world/area_jan/jan_02/jan_02_1_music.c | 26 +- src/world/area_jan/jan_02/jan_02_2_main.c | 90 +- src/world/area_jan/jan_02/jan_02_3_npc.c | 646 +-- src/world/area_jan/jan_02/jan_02_4_entity.c | 8 +- src/world/area_jan/jan_02/jan_02_5_foliage.c | 32 +- src/world/area_jan/jan_03/jan_03_1_music.c | 24 +- src/world/area_jan/jan_03/jan_03_2_main.c | 158 +- src/world/area_jan/jan_03/jan_03_3_shop.c | 26 +- src/world/area_jan/jan_03/jan_03_4_npc.c | 1024 ++-- src/world/area_jan/jan_03/jan_03_5_entity.c | 90 +- src/world/area_jan/jan_03/jan_03_6_rooms.c | 100 +- src/world/area_jan/jan_03/jan_03_7_foliage.c | 14 +- src/world/area_jan/jan_04/jan_04_10_demo.c | 188 +- src/world/area_jan/jan_04/jan_04_1_music.c | 40 +- src/world/area_jan/jan_04/jan_04_2_main.c | 126 +- src/world/area_jan/jan_04/jan_04_3_entity.c | 18 +- src/world/area_jan/jan_04/jan_04_4_npc.c | 440 +- src/world/area_jan/jan_04/jan_04_5_unused.c | 46 +- src/world/area_jan/jan_04/jan_04_6_trees.c | 22 +- src/world/area_jan/jan_04/jan_04_7_scenes.c | 140 +- src/world/area_jan/jan_04/jan_04_8_treasure.c | 170 +- src/world/area_jan/jan_04/jan_04_9_bushes.c | 44 +- src/world/area_jan/jan_05/jan_05_1_music.c | 8 +- src/world/area_jan/jan_05/jan_05_2_main.c | 70 +- src/world/area_jan/jan_05/jan_05_3_log.c | 258 +- src/world/area_jan/jan_05/jan_05_4_bushes.c | 94 +- src/world/area_jan/jan_05/jan_05_5_npc.c | 376 +- src/world/area_jan/jan_05/jan_05_6_trees.c | 36 +- src/world/area_jan/jan_05/jan_05_7_entity.c | 12 +- src/world/area_jan/jan_06/jan_06_1_main.c | 154 +- src/world/area_jan/jan_06/jan_06_2_statue.c | 216 +- src/world/area_jan/jan_06/jan_06_3_log.c | 258 +- src/world/area_jan/jan_06/jan_06_4_trees.c | 16 +- src/world/area_jan/jan_06/jan_06_5_entity.c | 8 +- src/world/area_jan/jan_06/jan_06_7_bushes.c | 60 +- src/world/area_jan/jan_07/jan_07_1_music.c | 8 +- src/world/area_jan/jan_07/jan_07_2_main.c | 30 +- src/world/area_jan/jan_07/jan_07_3_npc.c | 512 +- src/world/area_jan/jan_07/jan_07_4_trees.c | 10 +- src/world/area_jan/jan_07/jan_07_5_bushes.c | 20 +- src/world/area_jan/jan_08/jan_08_1_music.c | 8 +- src/world/area_jan/jan_08/jan_08_2_main.c | 62 +- src/world/area_jan/jan_08/jan_08_3_bushes.c | 196 +- src/world/area_jan/jan_08/jan_08_4_entity.c | 18 +- src/world/area_jan/jan_08/jan_08_5_npc.c | 234 +- src/world/area_jan/jan_08/jan_08_6_trees.c | 22 +- src/world/area_jan/jan_09/jan_09_1_main.c | 110 +- src/world/area_jan/jan_09/jan_09_2_bushes.c | 358 +- src/world/area_jan/jan_09/jan_09_4_trees.c | 22 +- src/world/area_jan/jan_09/jan_09_5_entity.c | 8 +- src/world/area_jan/jan_10/jan_10_1_music.c | 8 +- src/world/area_jan/jan_10/jan_10_2_main.c | 50 +- src/world/area_jan/jan_10/jan_10_3_npc.c | 172 +- src/world/area_jan/jan_10/jan_10_4_log.c | 258 +- src/world/area_jan/jan_10/jan_10_5_trees.c | 24 +- src/world/area_jan/jan_10/jan_10_6_bushes.c | 28 +- src/world/area_jan/jan_10/jan_10_7_entity.c | 6 +- src/world/area_jan/jan_11/jan_11_1_music.c | 8 +- src/world/area_jan/jan_11/jan_11_2_main.c | 44 +- src/world/area_jan/jan_11/jan_11_3_npc.c | 190 +- src/world/area_jan/jan_12/jan_12_1_main.c | 38 +- src/world/area_jan/jan_12/jan_12_2_vines.c | 78 +- src/world/area_jan/jan_12/jan_12_3_trees.c | 16 +- src/world/area_jan/jan_12/jan_12_4_entity.c | 12 +- src/world/area_jan/jan_13/jan_13_1_main.c | 36 +- src/world/area_jan/jan_13/jan_13_2_puzzle.c | 1146 ++-- src/world/area_jan/jan_13/jan_13_3_trees.c | 16 +- src/world/area_jan/jan_13/jan_13_4_entity.c | 12 +- src/world/area_jan/jan_14/jan_14_1_main.c | 36 +- src/world/area_jan/jan_14/jan_14_2_vines.c | 196 +- src/world/area_jan/jan_14/jan_14_3_trees.c | 34 +- src/world/area_jan/jan_14/jan_14_4_npc.c | 46 +- src/world/area_jan/jan_15/jan_15_1_main.c | 58 +- src/world/area_jan/jan_15/jan_15_2_npc.c | 318 +- src/world/area_jan/jan_15/jan_15_3_trees.c | 16 +- src/world/area_jan/jan_15/jan_15_4_entity.c | 10 +- src/world/area_jan/jan_16/jan_16_1_music.c | 32 +- src/world/area_jan/jan_16/jan_16_2_main.c | 254 +- src/world/area_jan/jan_16/jan_16_3_npc.c | 372 +- src/world/area_jan/jan_16/jan_16_4_entity.c | 8 +- src/world/area_jan/jan_16/jan_16_5_bushes.c | 20 +- src/world/area_jan/jan_17/jan_17_1_music.c | 16 +- src/world/area_jan/jan_17/jan_17_2_main.c | 48 +- src/world/area_jan/jan_17/jan_17_3_entity.c | 8 +- src/world/area_jan/jan_18/jan_18_1_music.c | 6 +- src/world/area_jan/jan_18/jan_18_2_main.c | 32 +- src/world/area_jan/jan_18/jan_18_3_entity.c | 6 +- src/world/area_jan/jan_19/jan_19_1_music.c | 6 +- src/world/area_jan/jan_19/jan_19_2_main.c | 34 +- src/world/area_jan/jan_19/jan_19_3_entity.c | 8 +- src/world/area_jan/jan_22/jan_22_1_music.c | 72 +- src/world/area_jan/jan_22/jan_22_2_main.c | 226 +- src/world/area_jan/jan_22/jan_22_3_npc.c | 2544 ++++----- src/world/area_jan/jan_22/jan_22_4_entity.c | 24 +- src/world/area_jan/jan_22/jan_22_5_zipline.c | 284 +- src/world/area_jan/jan_22/jan_22_6_bushes.c | 126 +- src/world/area_jan/jan_22/jan_22_7_trees.c | 16 +- src/world/area_jan/jan_23/jan_23_1_music.c | 6 +- src/world/area_jan/jan_23/jan_23_2_main.c | 192 +- src/world/area_jan/jan_23/jan_23_3_npc.c | 1050 ++-- src/world/area_kgr/kgr_01/kgr_01_1_main.c | 34 +- src/world/area_kgr/kgr_01/kgr_01_2_wiggle.c | 40 +- src/world/area_kgr/kgr_01/kgr_01_3_extra.c | 42 +- src/world/area_kgr/kgr_02/kgr_02_1_main.c | 28 +- src/world/area_kgr/kgr_02/kgr_02_3_npc.c | 460 +- src/world/area_kgr/kgr_02/kgr_02_4_extra.c | 42 +- src/world/area_kkj/kkj_00/kkj_00_1_music.c | 30 +- src/world/area_kkj/kkj_00/kkj_00_2_main.c | 222 +- .../area_kkj/kkj_00/kkj_00_3_npc_intro.c | 362 +- .../area_kkj/kkj_00/kkj_00_4_scene_intro.c | 82 +- .../area_kkj/kkj_00/kkj_00_5_npc_ending.c | 48 +- .../area_kkj/kkj_00/kkj_00_6_scene_ending.c | 382 +- src/world/area_kkj/kkj_01/kkj_01_1_music.c | 16 +- src/world/area_kkj/kkj_01/kkj_01_2_main.c | 218 +- src/world/area_kkj/kkj_01/kkj_01_3_npc.c | 392 +- src/world/area_kkj/kkj_02/kkj_02_1_music.c | 22 +- src/world/area_kkj/kkj_02/kkj_02_2_main.c | 56 +- src/world/area_kkj/kkj_02/kkj_02_3_npc.c | 24 +- src/world/area_kkj/kkj_03/kkj_03_1_music.c | 24 +- src/world/area_kkj/kkj_03/kkj_03_2_main.c | 66 +- src/world/area_kkj/kkj_03/kkj_03_4_scenes.c | 266 +- src/world/area_kkj/kkj_10/kkj_10_1_main.c | 296 +- src/world/area_kkj/kkj_10/kkj_10_2_entity.c | 64 +- .../area_kkj/kkj_10/kkj_10_3_npcs_early.c | 194 +- .../area_kkj/kkj_10/kkj_10_4_npcs_later.c | 282 +- src/world/area_kkj/kkj_11/kkj_11_1_main.c | 360 +- src/world/area_kkj/kkj_11/kkj_11_2_entity.c | 64 +- src/world/area_kkj/kkj_11/kkj_11_3_scene.c | 110 +- src/world/area_kkj/kkj_11/kkj_11_4_demo.c | 424 +- .../area_kkj/kkj_11/kkj_11_5_npcs_early.c | 376 +- .../area_kkj/kkj_11/kkj_11_6_npcs_later.c | 496 +- src/world/area_kkj/kkj_12/kkj_12_1_main.c | 82 +- src/world/area_kkj/kkj_12/kkj_12_2_npc.c | 318 +- src/world/area_kkj/kkj_13/kkj_13_1_music.c | 32 +- src/world/area_kkj/kkj_13/kkj_13_2_main.c | 114 +- .../area_kkj/kkj_13/kkj_13_3_npcs_finale.c | 506 +- .../area_kkj/kkj_13/kkj_13_4_npcs_intro.c | 38 +- .../area_kkj/kkj_13/kkj_13_5_intro_scenes.c | 696 +-- .../area_kkj/kkj_14/kkj_14_10_chapter2.c | 426 +- .../area_kkj/kkj_14/kkj_14_11_chapter3.c | 96 +- .../area_kkj/kkj_14/kkj_14_12_chapter4.c | 36 +- .../area_kkj/kkj_14/kkj_14_13_chapter5.c | 86 +- .../area_kkj/kkj_14/kkj_14_14_chapter6.c | 60 +- .../area_kkj/kkj_14/kkj_14_15_chapter7.c | 790 +-- src/world/area_kkj/kkj_14/kkj_14_1_music.c | 30 +- src/world/area_kkj/kkj_14/kkj_14_2_main.c | 350 +- .../area_kkj/kkj_14/kkj_14_3_interactables.c | 742 +-- .../area_kkj/kkj_14/kkj_14_4_npc_guards.c | 332 +- src/world/area_kkj/kkj_14/kkj_14_8_chapter0.c | 908 +-- src/world/area_kkj/kkj_14/kkj_14_9_chapter1.c | 88 +- src/world/area_kkj/kkj_15/kkj_15_1_music.c | 32 +- src/world/area_kkj/kkj_15/kkj_15_2_main.c | 208 +- .../area_kkj/kkj_15/kkj_15_3_rotating_wall.c | 188 +- src/world/area_kkj/kkj_15/kkj_15_4_chapter0.c | 754 +-- src/world/area_kkj/kkj_15/kkj_15_5_chapter1.c | 610 +- src/world/area_kkj/kkj_15/kkj_15_6_chapter2.c | 48 +- src/world/area_kkj/kkj_15/kkj_15_7_chapter3.c | 600 +- src/world/area_kkj/kkj_16/kkj_16_1_main.c | 104 +- .../area_kkj/kkj_16/kkj_16_2_npcs_early.c | 264 +- .../area_kkj/kkj_16/kkj_16_3_npcs_later.c | 258 +- src/world/area_kkj/kkj_16/kkj_16_4_stealth.c | 490 +- src/world/area_kkj/kkj_16/kkj_16_5_entity.c | 38 +- src/world/area_kkj/kkj_17/kkj_17_1_main.c | 64 +- src/world/area_kkj/kkj_17/kkj_17_2_entity.c | 36 +- src/world/area_kkj/kkj_17/kkj_17_3_chest.c | 246 +- src/world/area_kkj/kkj_18/kkj_18_1_music.c | 10 +- src/world/area_kkj/kkj_18/kkj_18_2_main.c | 176 +- src/world/area_kkj/kkj_18/kkj_18_3_npc.c | 64 +- src/world/area_kkj/kkj_18/kkj_18_4_gourmet.c | 1162 ++-- src/world/area_kkj/kkj_19/kkj_19_1_music.c | 24 +- src/world/area_kkj/kkj_19/kkj_19_2_main.c | 102 +- .../area_kkj/kkj_19/kkj_19_3_npcs_intro.c | 26 +- .../area_kkj/kkj_19/kkj_19_4_npcs_peach.c | 46 +- src/world/area_kkj/kkj_19/kkj_19_5_baking.c | 2076 +++---- src/world/area_kkj/kkj_20/kkj_20_1_music.c | 12 +- src/world/area_kkj/kkj_20/kkj_20_2_main.c | 56 +- src/world/area_kkj/kkj_20/kkj_20_3_entity.c | 34 +- src/world/area_kkj/kkj_20/kkj_20_4_npc.c | 586 +- src/world/area_kkj/kkj_21/kkj_21_1_main.c | 60 +- src/world/area_kkj/kkj_22/kkj_22_1_music.c | 10 +- src/world/area_kkj/kkj_22/kkj_22_2_main.c | 46 +- src/world/area_kkj/kkj_23/kkj_23_1_music.c | 10 +- src/world/area_kkj/kkj_23/kkj_23_2_main.c | 102 +- .../area_kkj/kkj_23/kkj_23_3_npcs_finale.c | 230 +- .../area_kkj/kkj_23/kkj_23_4_npcs_peach.c | 156 +- src/world/area_kkj/kkj_23/kkj_23_5_scene.c | 612 +- src/world/area_kkj/kkj_24/kkj_24_1_music.c | 10 +- src/world/area_kkj/kkj_24/kkj_24_2_main.c | 70 +- src/world/area_kkj/kkj_24/kkj_24_3_entity.c | 6 +- src/world/area_kkj/kkj_25/kkj_25_1_main.c | 240 +- .../area_kkj/kkj_25/kkj_25_2_npc_initial.c | 190 +- .../area_kkj/kkj_25/kkj_25_3_npc_midpoint.c | 204 +- .../area_kkj/kkj_25/kkj_25_4_npc_final.c | 66 +- src/world/area_kkj/kkj_25/kkj_25_5_arena.c | 1022 ++-- .../area_kkj/kkj_25/kkj_25_6_peach_free.c | 380 +- .../area_kkj/kkj_25/kkj_25_7_kammy_defeated.c | 734 +-- .../kkj_25/kkj_25_8_bowser_defeated.c | 746 +-- src/world/area_kkj/kkj_25/kkj_25_9_entity.c | 16 +- src/world/area_kkj/kkj_26/kkj_26_1_main.c | 110 +- src/world/area_kkj/kkj_26/kkj_26_2_scenes.c | 140 +- src/world/area_kkj/kkj_26/kkj_26_3_demo.c | 100 +- src/world/area_kkj/kkj_27/kkj_27_1_music.c | 32 +- src/world/area_kkj/kkj_27/kkj_27_2_main.c | 64 +- .../area_kkj/kkj_27/kkj_27_3_rotating_wall.c | 196 +- src/world/area_kkj/kkj_28/kkj_28_1_main.c | 52 +- src/world/area_kkj/kkj_29/kkj_29_1_main.c | 84 +- src/world/area_kkj/kkj_29/kkj_29_2_npc.c | 24 +- src/world/area_kkj/kkj_29/kkj_29_3_quiz.c | 2236 ++++---- src/world/area_kmr/kmr_00/kmr_00_1_music.c | 12 +- src/world/area_kmr/kmr_00/kmr_00_2_main.c | 54 +- src/world/area_kmr/kmr_00/kmr_00_3_revival.c | 816 +-- src/world/area_kmr/kmr_00/kmr_00_4_npc.c | 128 +- src/world/area_kmr/kmr_00/kmr_00_5_entity.c | 8 +- src/world/area_kmr/kmr_02/kmr_02_1_music.c | 54 +- src/world/area_kmr/kmr_02/kmr_02_2_main.c | 302 +- src/world/area_kmr/kmr_02/kmr_02_3_npc.c | 3100 +++++------ src/world/area_kmr/kmr_02/kmr_02_4_rooms_1.c | 476 +- src/world/area_kmr/kmr_02/kmr_02_5_entity.c | 186 +- src/world/area_kmr/kmr_02/kmr_02_6_rooms_2.c | 146 +- src/world/area_kmr/kmr_02/kmr_02_7_kammy.c | 598 +- src/world/area_kmr/kmr_02/kmr_02_8_foliage.c | 24 +- .../area_kmr/kmr_02/wander_territories.inc.c | 6 +- src/world/area_kmr/kmr_03/kmr_03_1_music.c | 6 +- src/world/area_kmr/kmr_03/kmr_03_2_main.c | 48 +- src/world/area_kmr/kmr_03/kmr_03_3_npc.c | 262 +- src/world/area_kmr/kmr_03/kmr_03_4_entity.c | 82 +- src/world/area_kmr/kmr_03/kmr_03_5_foliage.c | 46 +- .../area_kmr/kmr_03/kmr_03_6_fall_down.c | 170 +- src/world/area_kmr/kmr_04/kmr_04_1_music.c | 22 +- src/world/area_kmr/kmr_04/kmr_04_2_main.c | 66 +- src/world/area_kmr/kmr_04/kmr_04_3_npc.c | 416 +- src/world/area_kmr/kmr_04/kmr_04_4_entity.c | 32 +- src/world/area_kmr/kmr_04/kmr_04_5_foliage.c | 290 +- src/world/area_kmr/kmr_05/kmr_05_1_music.c | 6 +- src/world/area_kmr/kmr_05/kmr_05_2_main.c | 58 +- src/world/area_kmr/kmr_05/kmr_05_3_npc.c | 120 +- src/world/area_kmr/kmr_05/kmr_05_4_entity.c | 6 +- src/world/area_kmr/kmr_05/kmr_05_5_foliage.c | 56 +- src/world/area_kmr/kmr_06/kmr_06_1_music.c | 6 +- src/world/area_kmr/kmr_06/kmr_06_2_main.c | 36 +- src/world/area_kmr/kmr_06/kmr_06_4_entity.c | 10 +- .../area_kmr/kmr_06/kmr_06_5_sticker_sign.c | 74 +- src/world/area_kmr/kmr_07/kmr_07_1_music.c | 6 +- src/world/area_kmr/kmr_07/kmr_07_2_main.c | 64 +- src/world/area_kmr/kmr_07/kmr_07_3_npc.c | 338 +- src/world/area_kmr/kmr_07/kmr_07_4_entity.c | 10 +- src/world/area_kmr/kmr_09/kmr_09_1_music.c | 6 +- src/world/area_kmr/kmr_09/kmr_09_2_main.c | 38 +- src/world/area_kmr/kmr_09/kmr_09_3_npc.c | 130 +- src/world/area_kmr/kmr_09/kmr_09_4_entity.c | 14 +- src/world/area_kmr/kmr_10/kmr_10_1_music.c | 6 +- src/world/area_kmr/kmr_10/kmr_10_2_main.c | 56 +- src/world/area_kmr/kmr_10/kmr_10_3_npc.c | 6 +- src/world/area_kmr/kmr_10/kmr_10_4_entity.c | 118 +- src/world/area_kmr/kmr_10/kmr_10_5_foliage.c | 14 +- src/world/area_kmr/kmr_11/kmr_11_1_music.c | 6 +- src/world/area_kmr/kmr_11/kmr_11_2_main.c | 188 +- src/world/area_kmr/kmr_11/kmr_11_3_scenes.c | 776 +-- src/world/area_kmr/kmr_11/kmr_11_4_npc.c | 456 +- src/world/area_kmr/kmr_11/kmr_11_5_entity.c | 146 +- src/world/area_kmr/kmr_11/kmr_11_6_kammy.c | 96 +- src/world/area_kmr/kmr_11/kmr_11_7_foliage.c | 28 +- src/world/area_kmr/kmr_12/kmr_12_1_music.c | 6 +- src/world/area_kmr/kmr_12/kmr_12_2_main.c | 32 +- src/world/area_kmr/kmr_12/kmr_12_3_npc.c | 140 +- src/world/area_kmr/kmr_12/kmr_12_4_entity.c | 32 +- src/world/area_kmr/kmr_20/kmr_20_10_npc.c | 1258 ++--- .../area_kmr/kmr_20/kmr_20_11_npc_intro.c | 740 +-- .../area_kmr/kmr_20/kmr_20_12_npc_epilogue.c | 486 +- src/world/area_kmr/kmr_20/kmr_20_13_records.c | 38 +- src/world/area_kmr/kmr_20/kmr_20_1_music.c | 56 +- src/world/area_kmr/kmr_20/kmr_20_2_main.c | 170 +- src/world/area_kmr/kmr_20/kmr_20_3_rooms.c | 138 +- .../area_kmr/kmr_20/kmr_20_4_documents.c | 276 +- src/world/area_kmr/kmr_20/kmr_20_5_entity.c | 220 +- src/world/area_kmr/kmr_20/kmr_20_6_trees.c | 10 +- src/world/area_kmr/kmr_20/kmr_20_7_bushes.c | 24 +- src/world/area_kmr/kmr_20/kmr_20_8_bed.c | 318 +- .../area_kmr/kmr_20/kmr_20_9_npc_scenes.c | 24 +- src/world/area_kmr/kmr_21/kmr_21_1_main.c | 134 +- src/world/area_kmr/kmr_22/kmr_22_1_main.c | 184 +- src/world/area_kmr/kmr_22/npc/chapter_1.inc.c | 16 +- src/world/area_kmr/kmr_22/npc/chapter_2.inc.c | 50 +- src/world/area_kmr/kmr_22/npc/chapter_3.inc.c | 16 +- src/world/area_kmr/kmr_22/npc/chapter_4.inc.c | 24 +- src/world/area_kmr/kmr_22/npc/chapter_5.inc.c | 8 +- src/world/area_kmr/kmr_22/npc/chapter_6.inc.c | 54 +- src/world/area_kmr/kmr_22/npc/chapter_7.inc.c | 40 +- src/world/area_kmr/kmr_22/npc/chapter_8.inc.c | 8 +- .../area_kmr/kmr_22/npc/lava_piranha.inc.c | 406 +- src/world/area_kmr/kmr_23/kmr_23_1_main.c | 144 +- src/world/area_kmr/kmr_23/kmr_23_2_npc.c | 134 +- src/world/area_kmr/kmr_24/kmr_24_1_main.c | 94 +- src/world/area_kmr/kmr_30/kmr_30_1_main.c | 26 +- src/world/area_kmr/kmr_30/kmr_30_3_the_end.c | 338 +- src/world/area_kpa/kpa_01/kpa_01_1_music.c | 10 +- src/world/area_kpa/kpa_01/kpa_01_2_main.c | 84 +- src/world/area_kpa/kpa_01/kpa_01_4_entity.c | 8 +- src/world/area_kpa/kpa_03/kpa_03_1_music.c | 8 +- src/world/area_kpa/kpa_03/kpa_03_2_main.c | 38 +- src/world/area_kpa/kpa_03/kpa_03_4_entity.c | 80 +- src/world/area_kpa/kpa_04/kpa_04_1_music.c | 16 +- src/world/area_kpa/kpa_04/kpa_04_2_main.c | 34 +- src/world/area_kpa/kpa_04/kpa_04_3_statues.c | 234 +- src/world/area_kpa/kpa_08/kpa_08_1_music.c | 16 +- src/world/area_kpa/kpa_08/kpa_08_2_main.c | 56 +- src/world/area_kpa/kpa_08/kpa_08_3_entity.c | 156 +- src/world/area_kpa/kpa_09/kpa_09_1_music.c | 16 +- src/world/area_kpa/kpa_09/kpa_09_2_main.c | 64 +- src/world/area_kpa/kpa_09/kpa_09_3_entity.c | 156 +- src/world/area_kpa/kpa_10/kpa_10_1_music.c | 16 +- src/world/area_kpa/kpa_10/kpa_10_2_main.c | 58 +- src/world/area_kpa/kpa_10/kpa_10_4_entity.c | 10 +- src/world/area_kpa/kpa_100/kpa_100_1_music.c | 16 +- src/world/area_kpa/kpa_100/kpa_100_2_main.c | 26 +- src/world/area_kpa/kpa_100/kpa_100_3_entity.c | 6 +- src/world/area_kpa/kpa_101/kpa_101_1_music.c | 16 +- src/world/area_kpa/kpa_101/kpa_101_2_main.c | 28 +- src/world/area_kpa/kpa_101/kpa_101_3_entity.c | 6 +- src/world/area_kpa/kpa_102/kpa_102_1_music.c | 16 +- src/world/area_kpa/kpa_102/kpa_102_2_main.c | 124 +- src/world/area_kpa/kpa_11/kpa_11_1_music.c | 18 +- src/world/area_kpa/kpa_11/kpa_11_2_main.c | 154 +- src/world/area_kpa/kpa_11/kpa_11_3_entity.c | 16 +- src/world/area_kpa/kpa_11/kpa_11_4_npc.c | 52 +- src/world/area_kpa/kpa_111/kpa_111_1_music.c | 16 +- src/world/area_kpa/kpa_111/kpa_111_2_main.c | 58 +- .../area_kpa/kpa_111/kpa_111_3_statues.c | 234 +- src/world/area_kpa/kpa_111/kpa_111_5_entity.c | 12 +- src/world/area_kpa/kpa_112/kpa_112_1_music.c | 16 +- src/world/area_kpa/kpa_112/kpa_112_2_main.c | 26 +- src/world/area_kpa/kpa_113/kpa_113_1_music.c | 16 +- src/world/area_kpa/kpa_113/kpa_113_2_main.c | 66 +- src/world/area_kpa/kpa_113/kpa_113_3_entity.c | 64 +- .../area_kpa/kpa_113/kpa_113_4_statues.c | 236 +- src/world/area_kpa/kpa_114/kpa_114_1_music.c | 16 +- src/world/area_kpa/kpa_114/kpa_114_2_main.c | 48 +- src/world/area_kpa/kpa_114/kpa_114_3_entity.c | 6 +- src/world/area_kpa/kpa_115/kpa_115_1_music.c | 16 +- src/world/area_kpa/kpa_115/kpa_115_2_main.c | 32 +- .../area_kpa/kpa_115/kpa_115_3_statues.c | 250 +- src/world/area_kpa/kpa_116/kpa_116_1_music.c | 16 +- src/world/area_kpa/kpa_116/kpa_116_2_main.c | 26 +- src/world/area_kpa/kpa_117/kpa_117_1_music.c | 16 +- src/world/area_kpa/kpa_117/kpa_117_2_main.c | 30 +- src/world/area_kpa/kpa_118/kpa_118_1_music.c | 16 +- src/world/area_kpa/kpa_118/kpa_118_2_main.c | 26 +- src/world/area_kpa/kpa_119/kpa_119_1_music.c | 16 +- src/world/area_kpa/kpa_119/kpa_119_2_entity.c | 6 +- src/world/area_kpa/kpa_119/kpa_119_3_main.c | 28 +- src/world/area_kpa/kpa_12/kpa_12_1_music.c | 22 +- src/world/area_kpa/kpa_12/kpa_12_2_main.c | 160 +- .../area_kpa/kpa_12/kpa_12_3_platforms.c | 328 +- src/world/area_kpa/kpa_121/kpa_121_1_music.c | 16 +- src/world/area_kpa/kpa_121/kpa_121_2_main.c | 88 +- src/world/area_kpa/kpa_13/kpa_13_1_music.c | 22 +- src/world/area_kpa/kpa_13/kpa_13_2_main.c | 114 +- src/world/area_kpa/kpa_13/kpa_13_3_entity.c | 24 +- .../area_kpa/kpa_13/kpa_13_4_platforms.c | 286 +- src/world/area_kpa/kpa_130/kpa_130_1_music.c | 16 +- src/world/area_kpa/kpa_130/kpa_130_2_main.c | 62 +- src/world/area_kpa/kpa_130/kpa_130_3_npc.c | 130 +- src/world/area_kpa/kpa_133/kpa_133_1_music.c | 16 +- src/world/area_kpa/kpa_133/kpa_133_2_main.c | 146 +- src/world/area_kpa/kpa_133/kpa_133_3_entity.c | 204 +- src/world/area_kpa/kpa_133/kpa_133_4_npc.c | 6 +- src/world/area_kpa/kpa_133/kpa_133_5_water.c | 64 +- src/world/area_kpa/kpa_133/kpa_133_6.c | 20 +- src/world/area_kpa/kpa_134/kpa_134_1_music.c | 16 +- src/world/area_kpa/kpa_134/kpa_134_2_main.c | 148 +- src/world/area_kpa/kpa_134/kpa_134_3_chains.c | 868 +-- src/world/area_kpa/kpa_134/kpa_134_4_npc.c | 6 +- src/world/area_kpa/kpa_134/kpa_134_5_panels.c | 118 +- src/world/area_kpa/kpa_134/kpa_134_6_entity.c | 140 +- src/world/area_kpa/kpa_14/kpa_14_1_music.c | 26 +- src/world/area_kpa/kpa_14/kpa_14_2_main.c | 396 +- src/world/area_kpa/kpa_14/kpa_14_3_entity.c | 84 +- .../area_kpa/kpa_14/kpa_14_4_platforms.c | 112 +- src/world/area_kpa/kpa_15/kpa_15_1_music.c | 22 +- src/world/area_kpa/kpa_15/kpa_15_2_main.c | 72 +- src/world/area_kpa/kpa_15/kpa_15_3_entity.c | 10 +- src/world/area_kpa/kpa_16/kpa_16_1_music.c | 22 +- src/world/area_kpa/kpa_16/kpa_16_2_main.c | 184 +- src/world/area_kpa/kpa_16/kpa_16_3_entity.c | 12 +- src/world/area_kpa/kpa_16/kpa_16_4_npc.c | 494 +- src/world/area_kpa/kpa_17/kpa_17_1_music.c | 18 +- src/world/area_kpa/kpa_17/kpa_17_2_entity.c | 16 +- src/world/area_kpa/kpa_17/kpa_17_3_main.c | 86 +- src/world/area_kpa/kpa_17/kpa_17_4_npc.c | 308 +- src/world/area_kpa/kpa_32/kpa_32_1_music.c | 16 +- src/world/area_kpa/kpa_32/kpa_32_2_entity.c | 6 +- src/world/area_kpa/kpa_32/kpa_32_3_main.c | 164 +- src/world/area_kpa/kpa_33/kpa_33_1_music.c | 16 +- src/world/area_kpa/kpa_33/kpa_33_2_entity.c | 6 +- src/world/area_kpa/kpa_33/kpa_33_3_main.c | 164 +- src/world/area_kpa/kpa_40/kpa_40_1_music.c | 16 +- src/world/area_kpa/kpa_40/kpa_40_2_main.c | 70 +- src/world/area_kpa/kpa_41/kpa_41_1_music.c | 16 +- src/world/area_kpa/kpa_41/kpa_41_2_main.c | 126 +- src/world/area_kpa/kpa_50/kpa_50_1_music.c | 18 +- src/world/area_kpa/kpa_50/kpa_50_2_main.c | 60 +- src/world/area_kpa/kpa_51/kpa_51_1_music.c | 16 +- src/world/area_kpa/kpa_51/kpa_51_2_main.c | 64 +- src/world/area_kpa/kpa_52/kpa_52_1_music.c | 16 +- src/world/area_kpa/kpa_52/kpa_52_2_entity.c | 64 +- src/world/area_kpa/kpa_52/kpa_52_3_main.c | 74 +- src/world/area_kpa/kpa_53/kpa_53_1_music.c | 16 +- src/world/area_kpa/kpa_53/kpa_53_2_main.c | 70 +- src/world/area_kpa/kpa_53/kpa_53_3_npc.c | 544 +- src/world/area_kpa/kpa_53/kpa_53_4_entity.c | 6 +- src/world/area_kpa/kpa_60/kpa_60_1_music.c | 20 +- src/world/area_kpa/kpa_60/kpa_60_2_entity.c | 68 +- src/world/area_kpa/kpa_60/kpa_60_3_main.c | 350 +- src/world/area_kpa/kpa_60/kpa_60_4_scenes.c | 170 +- src/world/area_kpa/kpa_61/kpa_61_1_music.c | 16 +- src/world/area_kpa/kpa_61/kpa_61_2_main.c | 100 +- src/world/area_kpa/kpa_61/kpa_61_4_entity.c | 18 +- src/world/area_kpa/kpa_62/kpa_62_1_music.c | 26 +- src/world/area_kpa/kpa_62/kpa_62_2_entity.c | 68 +- src/world/area_kpa/kpa_62/kpa_62_3_main.c | 364 +- src/world/area_kpa/kpa_63/kpa_63_1_music.c | 46 +- src/world/area_kpa/kpa_63/kpa_63_2_entity.c | 6 +- src/world/area_kpa/kpa_63/kpa_63_3_main.c | 140 +- src/world/area_kpa/kpa_63/kpa_63_4_scenes.c | 370 +- src/world/area_kpa/kpa_70/kpa_70_1_music.c | 18 +- src/world/area_kpa/kpa_70/kpa_70_2_main.c | 154 +- src/world/area_kpa/kpa_81/kpa_81_1_music.c | 16 +- src/world/area_kpa/kpa_81/kpa_81_2_main.c | 210 +- src/world/area_kpa/kpa_81/kpa_81_3_npc.c | 396 +- src/world/area_kpa/kpa_82/kpa_82_1_music.c | 16 +- src/world/area_kpa/kpa_82/kpa_82_2_main.c | 142 +- src/world/area_kpa/kpa_82/kpa_82_3_npc.c | 1576 +++--- src/world/area_kpa/kpa_83/kpa_83_1_music.c | 16 +- src/world/area_kpa/kpa_83/kpa_83_2_main.c | 122 +- src/world/area_kpa/kpa_83/kpa_83_3_npc.c | 872 +-- src/world/area_kpa/kpa_90/kpa_90_1_music.c | 16 +- src/world/area_kpa/kpa_90/kpa_90_2_main.c | 26 +- src/world/area_kpa/kpa_91/kpa_91_1_music.c | 16 +- src/world/area_kpa/kpa_91/kpa_91_2_main.c | 74 +- src/world/area_kpa/kpa_91/kpa_91_3_npc.c | 270 +- src/world/area_kpa/kpa_91/kpa_91_4_entity.c | 70 +- src/world/area_kpa/kpa_94/kpa_94_1_music.c | 16 +- src/world/area_kpa/kpa_94/kpa_94_2_main.c | 30 +- src/world/area_kpa/kpa_95/kpa_95_1_music.c | 16 +- src/world/area_kpa/kpa_95/kpa_95_2_entity.c | 70 +- src/world/area_kpa/kpa_95/kpa_95_3_main.c | 68 +- src/world/area_kpa/kpa_95/kpa_95_4_npc.c | 270 +- src/world/area_kpa/kpa_96/kpa_96_1_music.c | 16 +- src/world/area_kpa/kpa_96/kpa_96_2_main.c | 40 +- src/world/area_kpa/kpa_96/kpa_96_3_npc.c | 94 +- .../area_kzn/common/SmokeTexPanners.inc.c | 28 +- src/world/area_kzn/common/SpinyTromp.inc.c | 96 +- src/world/area_kzn/kzn_01/kzn_01_1_main.c | 42 +- src/world/area_kzn/kzn_01/kzn_01_2_npc.c | 74 +- src/world/area_kzn/kzn_02/kzn_02_1_main.c | 162 +- .../area_kzn/kzn_02/kzn_02_2_platforms.c | 764 +-- src/world/area_kzn/kzn_02/kzn_02_3_npc.c | 268 +- src/world/area_kzn/kzn_02/kzn_02_4_demo.c | 96 +- src/world/area_kzn/kzn_03/kzn_03_1_main.c | 104 +- src/world/area_kzn/kzn_03/kzn_03_2_npc.c | 240 +- src/world/area_kzn/kzn_03/kzn_03_3_entity.c | 208 +- src/world/area_kzn/kzn_03/kzn_03_4_ziplines.c | 266 +- src/world/area_kzn/kzn_04/kzn_04_1_main.c | 38 +- src/world/area_kzn/kzn_04/kzn_04_2_entity.c | 4 +- src/world/area_kzn/kzn_04/kzn_04_3_npc.c | 130 +- src/world/area_kzn/kzn_05/kzn_05_1_main.c | 32 +- src/world/area_kzn/kzn_06/kzn_06_1_main.c | 82 +- src/world/area_kzn/kzn_06/kzn_06_2_entity.c | 46 +- src/world/area_kzn/kzn_06/kzn_06_3_extra.c | 206 +- src/world/area_kzn/kzn_07/kzn_07_1_music.c | 18 +- src/world/area_kzn/kzn_07/kzn_07_2_main.c | 82 +- src/world/area_kzn/kzn_07/kzn_07_3_entity.c | 60 +- src/world/area_kzn/kzn_08/kzn_08_1_main.c | 196 +- src/world/area_kzn/kzn_08/kzn_08_2_entity.c | 10 +- src/world/area_kzn/kzn_08/kzn_08_4_extra.c | 10 +- src/world/area_kzn/kzn_09/kzn_09_1_main.c | 36 +- src/world/area_kzn/kzn_09/kzn_09_2_entity.c | 8 +- src/world/area_kzn/kzn_09/kzn_09_3_zipline.c | 244 +- src/world/area_kzn/kzn_09/kzn_09_4_npc.c | 370 +- src/world/area_kzn/kzn_10/kzn_10_1_main.c | 64 +- src/world/area_kzn/kzn_10/kzn_10_2_tromp.c | 474 +- src/world/area_kzn/kzn_11/kzn_11_1_main.c | 110 +- .../area_kzn/kzn_11/kzn_11_2_platforms.c | 248 +- src/world/area_kzn/kzn_11/kzn_11_3_npc.c | 130 +- src/world/area_kzn/kzn_17/kzn_17_1_main.c | 46 +- src/world/area_kzn/kzn_17/kzn_17_2_entity.c | 106 +- src/world/area_kzn/kzn_17/kzn_17_3_npc.c | 166 +- src/world/area_kzn/kzn_17/kzn_17_4_tromp.c | 278 +- src/world/area_kzn/kzn_18/kzn_18_1_main.c | 130 +- src/world/area_kzn/kzn_18/kzn_18_2_npc.c | 248 +- src/world/area_kzn/kzn_18/kzn_18_3_entity.c | 12 +- src/world/area_kzn/kzn_19/kzn_19_1_music.c | 32 +- src/world/area_kzn/kzn_19/kzn_19_2_main.c | 364 +- src/world/area_kzn/kzn_19/kzn_19_4_npc.c | 1062 ++-- src/world/area_kzn/kzn_19/kzn_19_5_eruption.c | 156 +- src/world/area_kzn/kzn_19/kzn_19_6_entity.c | 12 +- src/world/area_kzn/kzn_20/kzn_20_1_music.c | 24 +- src/world/area_kzn/kzn_20/kzn_20_2_main.c | 288 +- src/world/area_kzn/kzn_20/kzn_20_3_npc.c | 818 +-- src/world/area_kzn/kzn_22/kzn_22_1_music.c | 14 +- src/world/area_kzn/kzn_22/kzn_22_2_main.c | 242 +- src/world/area_kzn/kzn_22/kzn_22_3_entity.c | 10 +- src/world/area_kzn/kzn_22/kzn_22_4_npc.c | 378 +- src/world/area_kzn/kzn_23/kzn_23_1_music.c | 8 +- src/world/area_kzn/kzn_23/kzn_23_2_main.c | 114 +- src/world/area_kzn/kzn_23/kzn_23_3_npc.c | 288 +- .../area_mac/mac_00/mac_00_10_shared_npc.c | 958 ++-- .../area_mac/mac_00/mac_00_11_intro_npc.c | 16 +- src/world/area_mac/mac_00/mac_00_12_intro.c | 164 +- .../area_mac/mac_00/mac_00_13_epilogue_npc.c | 142 +- .../area_mac/mac_00/mac_00_14_epilogue.c | 166 +- src/world/area_mac/mac_00/mac_00_1_music.c | 42 +- src/world/area_mac/mac_00/mac_00_2_main.c | 168 +- src/world/area_mac/mac_00/mac_00_3_entity.c | 22 +- src/world/area_mac/mac_00/mac_00_4_rooms.c | 294 +- src/world/area_mac/mac_00/mac_00_5_npc.c | 268 +- src/world/area_mac/mac_00/mac_00_6_shop.c | 24 +- .../area_mac/mac_00/mac_00_7_music_mix.c | 24 +- src/world/area_mac/mac_00/mac_00_8_demo.c | 214 +- .../area_mac/mac_00/mac_00_9_water_gfx.c | 10 +- .../area_mac/mac_00/npc/dojo_members.inc.c | 510 +- .../area_mac/mac_00/npc/russ_and_thief.inc.c | 378 +- .../area_mac/mac_00/npc/trading_toad.inc.c | 90 +- .../mac_00/npc/waterfront_family.inc.c | 400 +- .../area_mac/mac_01/mac_01_11_epilogue_npc.c | 156 +- src/world/area_mac/mac_01/mac_01_12_intro.c | 92 +- src/world/area_mac/mac_01/mac_01_13_foliage.c | 16 +- src/world/area_mac/mac_01/mac_01_1_music.c | 64 +- src/world/area_mac/mac_01/mac_01_2_main.c | 318 +- src/world/area_mac/mac_01/mac_01_3_entity.c | 22 +- src/world/area_mac/mac_01/mac_01_4_rooms.c | 302 +- src/world/area_mac/mac_01/mac_01_5_shop.c | 178 +- .../mac_01/mac_01_6_crystal_ball_gfx.c | 20 +- src/world/area_mac/mac_01/mac_01_7_bulletin.c | 84 +- .../area_mac/mac_01/mac_01_8_music_mix.c | 32 +- src/world/area_mac/mac_01/mac_01_9_npc.c | 2992 +++++----- .../area_mac/mac_01/npc/flower_gate.inc.c | 1352 ++--- .../area_mac/mac_01/npc/post_office.inc.c | 428 +- .../area_mac/mac_01/npc/read_fortune.inc.c | 690 +-- .../area_mac/mac_01/npc/rowf_and_rhuff.inc.c | 974 ++-- src/world/area_mac/mac_02/mac_02_1_music.c | 16 +- src/world/area_mac/mac_02/mac_02_2_main.c | 170 +- src/world/area_mac/mac_02/mac_02_3_rooms.c | 148 +- src/world/area_mac/mac_02/mac_02_4_foliage.c | 28 +- src/world/area_mac/mac_02/mac_02_5_entity.c | 92 +- .../area_mac/mac_02/mac_02_7_music_mix.c | 20 +- src/world/area_mac/mac_02/npc/bootler.inc.c | 244 +- src/world/area_mac/mac_02/npc/bubulb.inc.c | 88 +- .../mac_02/npc/cooking_apprentice.inc.c | 82 +- src/world/area_mac/mac_02/npc/fice_t.inc.c | 124 +- .../area_mac/mac_02/npc/shyguy_thief.inc.c | 152 +- src/world/area_mac/mac_02/npc/tayce_t.inc.c | 474 +- src/world/area_mac/mac_02/npc/toad_1.inc.c | 138 +- src/world/area_mac/mac_02/npc/toad_2.inc.c | 72 +- src/world/area_mac/mac_02/npc/toad_3.inc.c | 82 +- src/world/area_mac/mac_02/npc/toad_4.inc.c | 72 +- src/world/area_mac/mac_02/npc/toad_kid.inc.c | 52 +- src/world/area_mac/mac_03/mac_03_1_music.c | 16 +- src/world/area_mac/mac_03/mac_03_2_main.c | 138 +- src/world/area_mac/mac_03/mac_03_3_train.c | 1106 ++-- src/world/area_mac/mac_03/mac_03_4_npc.c | 904 +-- src/world/area_mac/mac_03/mac_03_5_entity.c | 54 +- src/world/area_mac/mac_03/mac_03_6_foliage.c | 94 +- src/world/area_mac/mac_03/mac_03_7_oinks.c | 920 +-- src/world/area_mac/mac_03/mac_03_8_demo.c | 272 +- src/world/area_mac/mac_04/mac_04_1_music.c | 30 +- src/world/area_mac/mac_04/mac_04_2_main.c | 152 +- src/world/area_mac/mac_04/mac_04_3_rooms.c | 314 +- src/world/area_mac/mac_04/mac_04_4_foliage.c | 22 +- src/world/area_mac/mac_04/mac_04_5_shop.c | 24 +- src/world/area_mac/mac_04/mac_04_6_npc.c | 170 +- .../area_mac/mac_04/mac_04_7_wish_scene.c | 44 +- src/world/area_mac/mac_04/mac_04_8_entity.c | 422 +- .../area_mac/mac_04/mac_04_9_music_mix.c | 14 +- .../area_mac/mac_04/npc_chet_rippo.inc.c | 234 +- .../area_mac/mac_04/npc_goomba_family.inc.c | 92 +- .../area_mac/mac_04/npc_gossip_trio.inc.c | 144 +- src/world/area_mac/mac_04/npc_harry_t.inc.c | 98 +- src/world/area_mac/mac_04/npc_muskular.inc.c | 394 +- .../area_mac/mac_04/npc_new_residents.inc.c | 156 +- src/world/area_mac/mac_04/npc_toad_01.inc.c | 76 +- src/world/area_mac/mac_04/npc_toad_02.inc.c | 76 +- src/world/area_mac/mac_04/npc_toad_03.inc.c | 76 +- src/world/area_mac/mac_04/npc_toad_kids.inc.c | 144 +- .../area_mac/mac_04/npc_toadette_03.inc.c | 114 +- .../area_mac/mac_04/npc_toybox_shyguy.inc.c | 426 +- src/world/area_mac/mac_04/npc_twink.inc.c | 152 +- src/world/area_mac/mac_05/mac_05_1_music.c | 54 +- src/world/area_mac/mac_05/mac_05_2_entity.c | 38 +- src/world/area_mac/mac_05/mac_05_3_main.c | 284 +- src/world/area_mac/mac_05/mac_05_4_npc.c | 3184 +++++------ src/world/area_mac/mac_05/mac_05_5_whale.c | 578 +- src/world/area_mac/mac_05/mac_05_6_rooms.c | 114 +- .../area_mac/mac_05/mac_05_7_club64_sign.c | 10 +- src/world/area_mac/mac_06/mac_06_1_main.c | 72 +- src/world/area_mac/mac_06/mac_06_2_whale.c | 570 +- src/world/area_mac/mac_06/mac_06_3_npc.c | 468 +- src/world/area_mac/machi/machi_2_main.c | 66 +- src/world/area_mac/machi/machi_3_entity.c | 40 +- .../area_mac/machi/machi_4_goomba_king.c | 26 +- src/world/area_mac/machi/machi_5_npc.c | 108 +- src/world/area_mac/machi/machi_6_misstar.c | 88 +- src/world/area_mac/machi/machi_7_partner.c | 54 +- src/world/area_mgm/mgm_00/mgm_00_1_main.c | 142 +- src/world/area_mgm/mgm_00/mgm_00_2_npc.c | 348 +- .../area_mgm/mgm_00/mgm_00_3_scoreboard.c | 40 +- src/world/area_mgm/mgm_01/mgm_01_1_main.c | 64 +- src/world/area_mgm/mgm_01/mgm_01_2_npc.c | 494 +- src/world/area_mgm/mgm_01/mgm_01_3_entity.c | 20 +- src/world/area_mgm/mgm_02/mgm_02_1_main.c | 50 +- src/world/area_mgm/mgm_02/mgm_02_2_npc.c | 1492 ++--- src/world/area_mgm/mgm_03/mgm_03_1_main.c | 8 +- src/world/area_mim/common/AnimateGates.inc.c | 210 +- src/world/area_mim/common/SetupGates.inc.c | 52 +- src/world/area_mim/common/SupportGates.inc.c | 122 +- src/world/area_mim/common/UseGates.inc.c | 72 +- src/world/area_mim/mim_01/mim_01_1_music.c | 8 +- src/world/area_mim/mim_01/mim_01_2_main.c | 54 +- src/world/area_mim/mim_01/mim_01_3_entity.c | 32 +- src/world/area_mim/mim_01/mim_01_4_hint.c | 212 +- src/world/area_mim/mim_01/mim_01_5_gate.c | 526 +- src/world/area_mim/mim_02/mim_02_1_music.c | 8 +- src/world/area_mim/mim_02/mim_02_2_main.c | 50 +- src/world/area_mim/mim_02/mim_02_3_npc.c | 266 +- src/world/area_mim/mim_02/mim_02_4_gate.c | 134 +- src/world/area_mim/mim_02/mim_02_5_hint.c | 56 +- src/world/area_mim/mim_03/mim_03_1_music.c | 8 +- src/world/area_mim/mim_03/mim_03_2_main.c | 74 +- src/world/area_mim/mim_03/mim_03_3_entity.c | 4 +- src/world/area_mim/mim_03/mim_03_4_hint.c | 240 +- src/world/area_mim/mim_03/mim_03_6_npc.c | 66 +- src/world/area_mim/mim_04/mim_04_1_music.c | 8 +- src/world/area_mim/mim_04/mim_04_2_main.c | 50 +- src/world/area_mim/mim_04/mim_04_3_entity.c | 4 +- src/world/area_mim/mim_04/mim_04_4_hint.c | 48 +- src/world/area_mim/mim_04/mim_04_6_npc.c | 82 +- src/world/area_mim/mim_05/mim_05_1_music.c | 8 +- src/world/area_mim/mim_05/mim_05_2_main.c | 50 +- src/world/area_mim/mim_05/mim_05_3_entity.c | 4 +- src/world/area_mim/mim_05/mim_05_4_hint.c | 212 +- src/world/area_mim/mim_06/mim_06_1_music.c | 8 +- src/world/area_mim/mim_06/mim_06_2_main.c | 50 +- src/world/area_mim/mim_06/mim_06_3_entity.c | 4 +- src/world/area_mim/mim_06/mim_06_4_hint.c | 292 +- src/world/area_mim/mim_07/mim_07_1_music.c | 14 +- src/world/area_mim/mim_07/mim_07_2_main.c | 78 +- src/world/area_mim/mim_07/mim_07_3_entity.c | 32 +- src/world/area_mim/mim_07/mim_07_4_hint.c | 86 +- src/world/area_mim/mim_07/mim_07_5_gate.c | 472 +- src/world/area_mim/mim_07/mim_07_6_npc.c | 252 +- src/world/area_mim/mim_08/mim_08_1_music.c | 8 +- src/world/area_mim/mim_08/mim_08_2_main.c | 106 +- src/world/area_mim/mim_08/mim_08_3_entity.c | 8 +- src/world/area_mim/mim_08/mim_08_5_npc.c | 30 +- src/world/area_mim/mim_09/mim_09_1_music.c | 8 +- src/world/area_mim/mim_09/mim_09_2_main.c | 72 +- src/world/area_mim/mim_09/mim_09_3_entity.c | 8 +- src/world/area_mim/mim_09/mim_09_4_hint.c | 170 +- src/world/area_mim/mim_10/mim_10_1_music.c | 106 +- src/world/area_mim/mim_10/mim_10_2_entity.c | 6 +- src/world/area_mim/mim_10/mim_10_3_main.c | 84 +- src/world/area_mim/mim_10/mim_10_4_npc.c | 310 +- src/world/area_mim/mim_11/mim_11_1_music.c | 18 +- src/world/area_mim/mim_11/mim_11_2_main.c | 318 +- src/world/area_mim/mim_11/mim_11_3_gate.c | 340 +- src/world/area_mim/mim_11/mim_11_4_entity.c | 38 +- src/world/area_mim/mim_11/mim_11_5_npc.c | 40 +- src/world/area_mim/mim_11/mim_11_6_foliage.c | 20 +- src/world/area_mim/mim_12/mim_12_1_music.c | 56 +- src/world/area_mim/mim_12/mim_12_2_entity.c | 8 +- src/world/area_mim/mim_12/mim_12_3_main.c | 62 +- src/world/area_mim/mim_12/mim_12_4_npc.c | 8 +- src/world/area_mim/mim_12/mim_12_5_gate.c | 500 +- src/world/area_nok/common/GetIntoShell.inc.c | 30 +- src/world/area_nok/nok_01/nok_01_1_music.c | 104 +- src/world/area_nok/nok_01/nok_01_2_main.c | 204 +- src/world/area_nok/nok_01/nok_01_3_entity.c | 18 +- src/world/area_nok/nok_01/nok_01_4_npc.c | 438 +- src/world/area_nok/nok_01/nok_01_5_shop.c | 24 +- src/world/area_nok/nok_01/nok_01_6_rooms.c | 384 +- src/world/area_nok/nok_01/nok_01_7_radio.c | 134 +- src/world/area_nok/nok_01/nok_01_8_foliage.c | 110 +- src/world/area_nok/nok_01/npcs_crisis.inc.c | 1020 ++-- src/world/area_nok/nok_01/npcs_normal.inc.c | 470 +- .../area_nok/nok_02/nok_02_10_epilogue.c | 64 +- src/world/area_nok/nok_02/nok_02_1_music.c | 14 +- src/world/area_nok/nok_02/nok_02_2_main.c | 232 +- src/world/area_nok/nok_02/nok_02_3_entity.c | 66 +- src/world/area_nok/nok_02/nok_02_4_rooms.c | 530 +- .../area_nok/nok_02/nok_02_5_bookshelf.c | 10 +- src/world/area_nok/nok_02/nok_02_6_npc.c | 942 ++-- src/world/area_nok/nok_02/nok_02_7_demo.c | 296 +- .../area_nok/nok_02/nok_02_8_koot_favors.c | 382 +- src/world/area_nok/nok_02/nok_02_9_foliage.c | 94 +- src/world/area_nok/nok_02/npcs_crisis.inc.c | 606 +- src/world/area_nok/nok_02/npcs_normal.inc.c | 640 +-- src/world/area_nok/nok_03/nok_03_1_music.c | 16 +- src/world/area_nok/nok_03/nok_03_2_main.c | 124 +- src/world/area_nok/nok_03/nok_03_3_entity.c | 6 +- src/world/area_nok/nok_03/nok_03_4_npc.c | 200 +- src/world/area_nok/nok_04/nok_04_1_music.c | 30 +- src/world/area_nok/nok_04/nok_04_2_main.c | 52 +- src/world/area_nok/nok_04/nok_04_3_entity.c | 4 +- src/world/area_nok/nok_04/nok_04_4_npc.c | 2222 ++++---- src/world/area_nok/nok_11/nok_11_1_music.c | 12 +- src/world/area_nok/nok_11/nok_11_2_main.c | 180 +- src/world/area_nok/nok_11/nok_11_3_entity.c | 24 +- src/world/area_nok/nok_11/nok_11_4_npc.c | 818 +-- src/world/area_nok/nok_12/nok_12_1_music.c | 8 +- src/world/area_nok/nok_12/nok_12_2_main.c | 210 +- src/world/area_nok/nok_12/nok_12_3_entity.c | 100 +- src/world/area_nok/nok_12/nok_12_4_bridge.c | 260 +- src/world/area_nok/nok_12/nok_12_5_foliage.c | 10 +- src/world/area_nok/nok_12/nok_12_6_npc.c | 140 +- src/world/area_nok/nok_12/nok_12_7_demo.c | 254 +- src/world/area_nok/nok_13/nok_13_1_music.c | 8 +- src/world/area_nok/nok_13/nok_13_2_main.c | 160 +- src/world/area_nok/nok_13/nok_13_3_entity.c | 100 +- src/world/area_nok/nok_13/nok_13_5.c | 30 +- src/world/area_nok/nok_14/nok_14_1_music.c | 8 +- src/world/area_nok/nok_14/nok_14_2_main.c | 170 +- src/world/area_nok/nok_14/nok_14_3_entity.c | 124 +- src/world/area_nok/nok_14/nok_14_4_bridge.c | 280 +- src/world/area_nok/nok_14/nok_14_5_npc.c | 76 +- src/world/area_nok/nok_15/nok_15_1_music.c | 8 +- src/world/area_nok/nok_15/nok_15_2_main.c | 178 +- src/world/area_nok/nok_15/nok_15_3_entity.c | 6 +- src/world/area_nok/nok_15/nok_15_5_foliage.c | 10 +- src/world/area_obk/common/TrafficBoos.inc.c | 24 +- src/world/area_obk/obk_01/obk_01_1_music.c | 16 +- src/world/area_obk/obk_01/obk_01_2_main.c | 350 +- .../area_obk/obk_01/obk_01_3_chandelier.c | 592 +- src/world/area_obk/obk_01/obk_01_4_portrait.c | 418 +- .../area_obk/obk_01/obk_01_5_jump_scare.c | 76 +- src/world/area_obk/obk_01/obk_01_6_npc.c | 138 +- src/world/area_obk/obk_01/obk_01_7_entity.c | 8 +- src/world/area_obk/obk_02/obk_02_1_music.c | 14 +- src/world/area_obk/obk_02/obk_02_2_main.c | 296 +- src/world/area_obk/obk_02/obk_02_3_npc.c | 12 +- src/world/area_obk/obk_02/obk_02_4_bombable.c | 46 +- src/world/area_obk/obk_02/obk_02_5_clock.c | 56 +- src/world/area_obk/obk_02/obk_02_6_entity.c | 96 +- src/world/area_obk/obk_03/obk_03_1_music.c | 14 +- src/world/area_obk/obk_03/obk_03_2_main.c | 136 +- src/world/area_obk/obk_03/obk_03_3_shop.c | 44 +- src/world/area_obk/obk_03/obk_03_4_entity.c | 274 +- src/world/area_obk/obk_03/obk_03_5_stairs.c | 322 +- src/world/area_obk/obk_03/obk_03_6_npc.c | 48 +- .../area_obk/obk_03/obk_03_7_rocking_chair.c | 12 +- src/world/area_obk/obk_04/obk_04_1_music.c | 24 +- src/world/area_obk/obk_04/obk_04_2_entity.c | 62 +- src/world/area_obk/obk_04/obk_04_3_npc.c | 418 +- src/world/area_obk/obk_04/obk_04_4_main.c | 146 +- src/world/area_obk/obk_04/obk_04_5_hole.c | 12 +- src/world/area_obk/obk_04/obk_04_6_game.c | 698 +-- src/world/area_obk/obk_05/obk_05_1_music.c | 14 +- src/world/area_obk/obk_05/obk_05_2_main.c | 148 +- .../area_obk/obk_05/obk_05_3_rocking_chair.c | 18 +- src/world/area_obk/obk_05/obk_05_4_hole.c | 12 +- src/world/area_obk/obk_05/obk_05_5_npc.c | 12 +- src/world/area_obk/obk_05/obk_05_6_entity.c | 26 +- src/world/area_obk/obk_06/obk_06_1_music.c | 14 +- src/world/area_obk/obk_06/obk_06_2_main.c | 44 +- src/world/area_obk/obk_06/obk_06_3_bombable.c | 46 +- src/world/area_obk/obk_06/obk_06_4_entity.c | 34 +- src/world/area_obk/obk_07/obk_07_1_music.c | 14 +- src/world/area_obk/obk_07/obk_07_2_main.c | 110 +- src/world/area_obk/obk_07/obk_07_3_entity.c | 26 +- .../area_obk/obk_07/obk_07_4_fireplace.c | 156 +- src/world/area_obk/obk_07/obk_07_5_npc.c | 28 +- .../area_obk/obk_07/obk_07_6_phonograph.c | 980 ++-- src/world/area_obk/obk_08/obk_08_1_music.c | 14 +- src/world/area_obk/obk_08/obk_08_2_main.c | 92 +- src/world/area_obk/obk_08/obk_08_3_cabinets.c | 500 +- src/world/area_obk/obk_08/obk_08_4_entity.c | 298 +- src/world/area_obk/obk_08/obk_08_5_npc.c | 394 +- src/world/area_obk/obk_08/obk_08_6_game.c | 648 +-- src/world/area_obk/obk_09/obk_09_1_music.c | 30 +- src/world/area_obk/obk_09/obk_09_2_main.c | 130 +- src/world/area_obk/obk_09/obk_09_3_meet_bow.c | 364 +- src/world/area_obk/obk_09/obk_09_4_npc.c | 114 +- src/world/area_obk/obk_09/obk_09_6_epilogue.c | 100 +- src/world/area_omo/common/RockingHorse.inc.c | 6 +- src/world/area_omo/common/ToyTrain.inc.c | 1128 ++-- .../common/TrainStationSwitches.inc.c | 334 +- src/world/area_omo/omo_01/omo_01_1_music.c | 6 +- src/world/area_omo/omo_01/omo_01_2_main.c | 36 +- src/world/area_omo/omo_01/omo_01_3_gizmos.c | 130 +- src/world/area_omo/omo_01/omo_01_4_npc.c | 196 +- src/world/area_omo/omo_01/omo_01_5_entity.c | 22 +- src/world/area_omo/omo_02/omo_02_1_music.c | 6 +- src/world/area_omo/omo_02/omo_02_2_main.c | 34 +- src/world/area_omo/omo_02/omo_02_3_entity.c | 78 +- src/world/area_omo/omo_02/omo_02_4_gizmos.c | 126 +- .../area_omo/omo_02/omo_02_5_barricade.c | 546 +- src/world/area_omo/omo_02/omo_02_6_npc.c | 328 +- src/world/area_omo/omo_03/omo_03_1_music.c | 32 +- src/world/area_omo/omo_03/omo_03_2_main.c | 128 +- src/world/area_omo/omo_03/omo_03_3_gizmos.c | 218 +- src/world/area_omo/omo_03/omo_03_4_entity.c | 148 +- src/world/area_omo/omo_03/omo_03_5_npc.c | 192 +- src/world/area_omo/omo_03/omo_03_6_train.c | 754 +-- .../area_omo/omo_03/omo_03_7_train_drop.c | 240 +- src/world/area_omo/omo_03/omo_03_8_epilogue.c | 80 +- src/world/area_omo/omo_04/omo_04_1_music.c | 14 +- src/world/area_omo/omo_04/omo_04_2_main.c | 70 +- src/world/area_omo/omo_04/omo_04_3_gizmos.c | 102 +- src/world/area_omo/omo_04/omo_04_4_entity.c | 200 +- src/world/area_omo/omo_04/omo_04_5_npc.c | 106 +- src/world/area_omo/omo_04/omo_04_6_scenes.c | 396 +- src/world/area_omo/omo_05/omo_05_1_music.c | 6 +- src/world/area_omo/omo_05/omo_05_2_main.c | 56 +- src/world/area_omo/omo_05/omo_05_3_gizmos.c | 150 +- src/world/area_omo/omo_05/omo_05_4_npc.c | 658 +-- src/world/area_omo/omo_05/omo_05_5_entity.c | 30 +- src/world/area_omo/omo_06/omo_06_1_music.c | 28 +- src/world/area_omo/omo_06/omo_06_2_main.c | 92 +- src/world/area_omo/omo_06/omo_06_3_gizmos.c | 198 +- src/world/area_omo/omo_06/omo_06_4_train.c | 538 +- src/world/area_omo/omo_06/omo_06_5_npc.c | 62 +- src/world/area_omo/omo_06/omo_06_6_entity.c | 34 +- src/world/area_omo/omo_07/omo_07_1_music.c | 14 +- src/world/area_omo/omo_07/omo_07_2_main.c | 74 +- src/world/area_omo/omo_07/omo_07_3_gizmos.c | 78 +- src/world/area_omo/omo_07/omo_07_4_npc.c | 522 +- src/world/area_omo/omo_07/omo_07_5_entity.c | 140 +- src/world/area_omo/omo_07/omo_07_6_scenes.c | 198 +- src/world/area_omo/omo_08/omo_08_1_music.c | 26 +- src/world/area_omo/omo_08/omo_08_2_main.c | 86 +- src/world/area_omo/omo_08/omo_08_3_boxes.c | 1322 ++--- src/world/area_omo/omo_08/omo_08_4_train.c | 510 +- src/world/area_omo/omo_08/omo_08_5_entity.c | 14 +- src/world/area_omo/omo_08/omo_08_6_npc.c | 146 +- src/world/area_omo/omo_09/omo_09_1_music.c | 14 +- src/world/area_omo/omo_09/omo_09_2_main.c | 94 +- .../area_omo/omo_09/omo_09_3_conveyors.c | 50 +- .../area_omo/omo_09/omo_09_4_slot_machine.c | 1384 ++--- src/world/area_omo/omo_09/omo_09_5_gizmos.c | 224 +- src/world/area_omo/omo_09/omo_09_6_entity.c | 66 +- src/world/area_omo/omo_09/omo_09_7_npc.c | 302 +- src/world/area_omo/omo_09/omo_09_8_scenes.c | 198 +- src/world/area_omo/omo_10/omo_10_1_music.c | 28 +- src/world/area_omo/omo_10/omo_10_2_main.c | 90 +- src/world/area_omo/omo_10/omo_10_3_gizmos.c | 120 +- src/world/area_omo/omo_10/omo_10_4_train.c | 474 +- src/world/area_omo/omo_10/omo_10_5_npc.c | 42 +- src/world/area_omo/omo_10/omo_10_6_entity.c | 16 +- src/world/area_omo/omo_11/omo_11_1_music.c | 6 +- src/world/area_omo/omo_11/omo_11_2_main.c | 32 +- src/world/area_omo/omo_11/omo_11_3_gizmos.c | 206 +- src/world/area_omo/omo_11/omo_11_4_entity.c | 30 +- src/world/area_omo/omo_12/omo_12_1_music.c | 48 +- src/world/area_omo/omo_12/omo_12_2_main.c | 50 +- src/world/area_omo/omo_12/omo_12_3_npc.c | 1002 ++-- src/world/area_omo/omo_13/omo_13_1_music.c | 6 +- src/world/area_omo/omo_13/omo_13_2_main.c | 38 +- src/world/area_omo/omo_13/omo_13_3_gizmos.c | 106 +- src/world/area_omo/omo_13/omo_13_4_npc.c | 278 +- src/world/area_omo/omo_13/omo_13_5_entity.c | 18 +- src/world/area_omo/omo_14/omo_14_1_music.c | 6 +- src/world/area_omo/omo_14/omo_14_2_main.c | 46 +- src/world/area_omo/omo_14/omo_14_3_npc.c | 526 +- src/world/area_omo/omo_15/omo_15_1_music.c | 20 +- src/world/area_omo/omo_15/omo_15_2_main.c | 162 +- src/world/area_omo/omo_15/omo_15_3_npc.c | 526 +- src/world/area_omo/omo_16/omo_16_1_main.c | 18 +- src/world/area_omo/omo_16/omo_16_2_train.c | 260 +- src/world/area_omo/omo_17/omo_17_1_main.c | 52 +- src/world/area_omo/omo_17/omo_17_2_gizmos.c | 64 +- src/world/area_omo/omo_17/omo_17_3_train.c | 116 +- src/world/area_omo/omo_17/omo_17_4_npc.c | 12 +- src/world/area_omo/omo_17/omo_17_5_entity.c | 20 +- src/world/area_osr/osr_00/osr_00_1_music.c | 28 +- src/world/area_osr/osr_00/osr_00_2_main.c | 112 +- .../area_osr/osr_00/osr_00_4_npc_epilogue.c | 190 +- src/world/area_osr/osr_00/osr_00_5_scenes.c | 86 +- src/world/area_osr/osr_01/osr_01_1_music.c | 32 +- src/world/area_osr/osr_01/osr_01_2_main.c | 72 +- src/world/area_osr/osr_01/osr_01_3_npc.c | 154 +- src/world/area_osr/osr_02/osr_02_1_main.c | 208 +- src/world/area_osr/osr_02/osr_02_2_entity.c | 22 +- src/world/area_osr/osr_02/osr_02_3_npc.c | 742 +-- .../area_osr/osr_02/osr_02_4_npc_peach.c | 94 +- src/world/area_osr/osr_03/osr_03_1_main.c | 156 +- src/world/area_osr/osr_03/osr_03_3_intro.c | 498 +- src/world/area_osr/osr_03/osr_03_4_starship.c | 158 +- .../area_osr/osr_03/osr_03_5_interlude.c | 234 +- src/world/area_osr/osr_03/osr_03_6_ending.c | 218 +- src/world/area_osr/osr_04/osr_04_1_main.c | 60 +- src/world/area_osr/osr_04/osr_04_2_assault.c | 984 ++-- src/world/area_pra/common/GlassShimmer.inc.c | 34 +- .../area_pra/common/Reflection.data.inc.c | 70 +- src/world/area_pra/pra_01/pra_01_1_music.c | 16 +- src/world/area_pra/pra_01/pra_01_2_main.c | 220 +- src/world/area_pra/pra_01/pra_01_3_npc.c | 308 +- src/world/area_pra/pra_01/pra_01_4_entity.c | 4 +- src/world/area_pra/pra_02/pra_02_1_music.c | 6 +- src/world/area_pra/pra_02/pra_02_2_main.c | 568 +- src/world/area_pra/pra_02/pra_02_3_npc.c | 4 +- src/world/area_pra/pra_02/pra_02_4_entity.c | 414 +- src/world/area_pra/pra_03/pra_03_1_music.c | 8 +- src/world/area_pra/pra_03/pra_03_2_main.c | 118 +- src/world/area_pra/pra_03/pra_03_3_entity.c | 90 +- src/world/area_pra/pra_04/pra_04_1_music.c | 8 +- src/world/area_pra/pra_04/pra_04_2_main.c | 104 +- src/world/area_pra/pra_04/pra_04_3_entity.c | 110 +- src/world/area_pra/pra_05/pra_05_1_music.c | 8 +- src/world/area_pra/pra_05/pra_05_2_main.c | 82 +- src/world/area_pra/pra_05/pra_05_3_entity.c | 10 +- src/world/area_pra/pra_06/pra_06_1_music.c | 8 +- src/world/area_pra/pra_06/pra_06_2_main.c | 82 +- src/world/area_pra/pra_06/pra_06_3_entity.c | 6 +- src/world/area_pra/pra_09/pra_09_1_music.c | 8 +- src/world/area_pra/pra_09/pra_09_2_main.c | 134 +- src/world/area_pra/pra_09/pra_09_3_npc.c | 1352 ++--- src/world/area_pra/pra_10/pra_10_1_music.c | 8 +- src/world/area_pra/pra_10/pra_10_2_main.c | 124 +- src/world/area_pra/pra_10/pra_10_3_npc.c | 6 +- src/world/area_pra/pra_11/pra_11_1_music.c | 8 +- src/world/area_pra/pra_11/pra_11_2_main.c | 50 +- src/world/area_pra/pra_11/pra_11_3_entity.c | 10 +- src/world/area_pra/pra_12/pra_12_1_music.c | 8 +- src/world/area_pra/pra_12/pra_12_2_main.c | 82 +- src/world/area_pra/pra_12/pra_12_3_entity.c | 10 +- src/world/area_pra/pra_13/pra_13_1_music.c | 6 +- src/world/area_pra/pra_13/pra_13_2_main.c | 266 +- src/world/area_pra/pra_13/pra_13_3_npc.c | 270 +- src/world/area_pra/pra_14/pra_14_1_music.c | 8 +- src/world/area_pra/pra_14/pra_14_2_main.c | 102 +- src/world/area_pra/pra_14/pra_14_3_entity.c | 12 +- src/world/area_pra/pra_15/pra_15_1_music.c | 8 +- src/world/area_pra/pra_15/pra_15_2_main.c | 46 +- src/world/area_pra/pra_15/pra_15_3_entity.c | 6 +- src/world/area_pra/pra_16/pra_16_1_music.c | 6 +- src/world/area_pra/pra_16/pra_16_2_main.c | 278 +- src/world/area_pra/pra_18/pra_18_1_music.c | 8 +- src/world/area_pra/pra_18/pra_18_2_main.c | 220 +- src/world/area_pra/pra_18/pra_18_3_npc.c | 510 +- src/world/area_pra/pra_19/pra_19_1_music.c | 8 +- src/world/area_pra/pra_19/pra_19_2_main.c | 112 +- src/world/area_pra/pra_19/pra_19_3_npc.c | 1580 +++--- src/world/area_pra/pra_20/pra_20_1_music.c | 8 +- src/world/area_pra/pra_20/pra_20_2_main.c | 286 +- src/world/area_pra/pra_21/pra_21_1_music.c | 8 +- src/world/area_pra/pra_21/pra_21_2_main.c | 146 +- src/world/area_pra/pra_21/pra_21_3_entity.c | 104 +- src/world/area_pra/pra_22/pra_22_1_music.c | 8 +- src/world/area_pra/pra_22/pra_22_2_main.c | 376 +- src/world/area_pra/pra_22/pra_22_3_entity.c | 104 +- src/world/area_pra/pra_27/pra_27_1_music.c | 8 +- src/world/area_pra/pra_27/pra_27_2_main.c | 74 +- src/world/area_pra/pra_27/pra_27_3_entity.c | 10 +- src/world/area_pra/pra_28/pra_28_1_music.c | 8 +- src/world/area_pra/pra_28/pra_28_2_main.c | 74 +- src/world/area_pra/pra_28/pra_28_3_entity.c | 10 +- src/world/area_pra/pra_29/pra_29_1_music.c | 8 +- src/world/area_pra/pra_29/pra_29_2_entity.c | 16 +- src/world/area_pra/pra_29/pra_29_3_main.c | 272 +- src/world/area_pra/pra_29/pra_29_4_bridge.c | 106 +- src/world/area_pra/pra_31/pra_31_1_music.c | 8 +- src/world/area_pra/pra_31/pra_31_2_npc.c | 230 +- src/world/area_pra/pra_31/pra_31_3_main.c | 140 +- src/world/area_pra/pra_31/pra_31_4_puzzle.c | 510 +- src/world/area_pra/pra_32/pra_32_1_music.c | 16 +- src/world/area_pra/pra_32/pra_32_2_main.c | 300 +- src/world/area_pra/pra_32/pra_32_3_npc.c | 428 +- src/world/area_pra/pra_33/pra_33_1_music.c | 8 +- src/world/area_pra/pra_33/pra_33_2_main.c | 166 +- src/world/area_pra/pra_33/pra_33_3_entity.c | 106 +- src/world/area_pra/pra_34/pra_34_1_music.c | 8 +- src/world/area_pra/pra_34/pra_34_2_main.c | 332 +- src/world/area_pra/pra_34/pra_34_3_entity.c | 30 +- src/world/area_pra/pra_35/pra_35_1_music.c | 8 +- src/world/area_pra/pra_35/pra_35_2_main.c | 160 +- src/world/area_pra/pra_35/pra_35_3_npc.c | 6 +- src/world/area_pra/pra_35/pra_35_4_entity.c | 10 +- src/world/area_pra/pra_36/pra_36_1_music.c | 8 +- src/world/area_pra/pra_36/pra_36_2_main.c | 130 +- src/world/area_pra/pra_36/pra_36_3_npc.c | 6 +- src/world/area_pra/pra_37/pra_37_1_music.c | 8 +- src/world/area_pra/pra_37/pra_37_2_main.c | 130 +- src/world/area_pra/pra_37/pra_37_3_npc.c | 6 +- src/world/area_pra/pra_38/pra_38_1_music.c | 8 +- src/world/area_pra/pra_38/pra_38_2_main.c | 130 +- src/world/area_pra/pra_38/pra_38_3_npc.c | 6 +- src/world/area_pra/pra_39/pra_39_1_music.c | 8 +- src/world/area_pra/pra_39/pra_39_2_main.c | 130 +- src/world/area_pra/pra_39/pra_39_3_npc.c | 6 +- src/world/area_pra/pra_40/pra_40_1_music.c | 8 +- src/world/area_pra/pra_40/pra_40_2_main.c | 72 +- src/world/area_pra/pra_40/pra_40_3_entity.c | 8 +- .../area_sam/common/ManageSnowfall.inc.c | 30 +- src/world/area_sam/sam_01/sam_01_1_music.c | 20 +- src/world/area_sam/sam_01/sam_01_2_main.c | 172 +- src/world/area_sam/sam_01/sam_01_3_rooms.c | 378 +- src/world/area_sam/sam_01/sam_01_4_npc.c | 1008 ++-- src/world/area_sam/sam_01/sam_01_5_scenes.c | 1420 ++--- src/world/area_sam/sam_01/sam_01_6_entity.c | 28 +- src/world/area_sam/sam_02/sam_02_1_music.c | 26 +- src/world/area_sam/sam_02/sam_02_2_main.c | 208 +- src/world/area_sam/sam_02/sam_02_3_rooms.c | 196 +- src/world/area_sam/sam_02/sam_02_4_npc.c | 592 +- src/world/area_sam/sam_02/sam_02_5_entity.c | 26 +- src/world/area_sam/sam_02/sam_02_6_shop.c | 50 +- src/world/area_sam/sam_03/sam_03_1_music.c | 6 +- src/world/area_sam/sam_03/sam_03_2_main.c | 50 +- src/world/area_sam/sam_03/sam_03_3_npc1.c | 232 +- src/world/area_sam/sam_04/sam_04_1_music.c | 6 +- src/world/area_sam/sam_04/sam_04_2_main.c | 200 +- src/world/area_sam/sam_04/sam_04_3_snowmen.c | 824 +-- src/world/area_sam/sam_04/sam_04_4_npc.c | 266 +- src/world/area_sam/sam_04/sam_04_5_entity.c | 14 +- src/world/area_sam/sam_05/sam_05_1_music.c | 6 +- src/world/area_sam/sam_05/sam_05_2_main.c | 52 +- src/world/area_sam/sam_05/sam_05_3_entity.c | 10 +- src/world/area_sam/sam_05/sam_05_4_npc.c | 78 +- src/world/area_sam/sam_05/sam_05_5_scenes.c | 454 +- src/world/area_sam/sam_06/sam_06_1_music.c | 12 +- src/world/area_sam/sam_06/sam_06_2_main.c | 164 +- src/world/area_sam/sam_06/sam_06_3_rooms.c | 214 +- src/world/area_sam/sam_06/sam_06_4_npc.c | 1310 ++--- src/world/area_sam/sam_06/sam_06_5_entity.c | 10 +- src/world/area_sam/sam_07/sam_07_1_music.c | 6 +- src/world/area_sam/sam_07/sam_07_2_main.c | 64 +- src/world/area_sam/sam_07/sam_07_3_entity.c | 30 +- .../area_sam/sam_07/sam_07_4_frozen_pit.c | 220 +- src/world/area_sam/sam_08/sam_08_1_music.c | 6 +- src/world/area_sam/sam_08/sam_08_2_main.c | 48 +- src/world/area_sam/sam_08/sam_08_3_entity.c | 14 +- src/world/area_sam/sam_08/sam_08_4_npc.c | 222 +- src/world/area_sam/sam_08/sam_08_5_scenes.c | 1092 ++-- src/world/area_sam/sam_09/sam_09_1_music.c | 6 +- src/world/area_sam/sam_09/sam_09_2_main.c | 36 +- src/world/area_sam/sam_09/sam_09_3_entity.c | 4 +- src/world/area_sam/sam_09/sam_09_4_sockets.c | 450 +- src/world/area_sam/sam_10/sam_10_1_music.c | 6 +- src/world/area_sam/sam_10/sam_10_2_main.c | 60 +- src/world/area_sam/sam_10/sam_10_3_entity.c | 46 +- src/world/area_sam/sam_10/sam_10_4_stairs.c | 434 +- src/world/area_sam/sam_11/sam_11_1_music.c | 20 +- src/world/area_sam/sam_11/sam_11_2_main.c | 170 +- src/world/area_sam/sam_11/sam_11_3_rooms.c | 350 +- src/world/area_sam/sam_11/sam_11_4_entity.c | 560 +- src/world/area_sam/sam_11/sam_11_5_npc.c | 1202 ++-- src/world/area_sam/sam_11/sam_11_6_pond.c | 774 +-- .../area_sam/sam_11/sam_11_7_staircase.c | 184 +- src/world/area_sam/sam_12/sam_12_1_music.c | 6 +- src/world/area_sam/sam_12/sam_12_2_main.c | 36 +- src/world/area_sam/sam_12/sam_12_3_npc.c | 10 +- src/world/area_sam/sam_12/sam_12_4_scenes.c | 382 +- src/world/area_sam/sam_12/sam_12_5_entity.c | 18 +- src/world/area_sbk/sbk_00/sbk_00_1_main.c | 36 +- src/world/area_sbk/sbk_00/sbk_00_3_entity.c | 12 +- src/world/area_sbk/sbk_01/sbk_01_1_main.c | 36 +- src/world/area_sbk/sbk_02/sbk_02_1_music.c | 20 +- src/world/area_sbk/sbk_02/sbk_02_2_main.c | 120 +- src/world/area_sbk/sbk_02/sbk_02_3_ruins.c | 1212 ++-- src/world/area_sbk/sbk_02/sbk_02_4_npc.c | 414 +- src/world/area_sbk/sbk_02/sbk_02_5_entity.c | 10 +- src/world/area_sbk/sbk_03/sbk_03_1_main.c | 36 +- src/world/area_sbk/sbk_04/sbk_04_1_main.c | 36 +- src/world/area_sbk/sbk_05/sbk_05_1_main.c | 58 +- src/world/area_sbk/sbk_05/sbk_05_2_entity.c | 6 +- src/world/area_sbk/sbk_06/sbk_06_1_main.c | 38 +- src/world/area_sbk/sbk_06/sbk_06_3_foliage.c | 10 +- src/world/area_sbk/sbk_06/sbk_06_4_entity.c | 18 +- src/world/area_sbk/sbk_10/sbk_10_1_main.c | 36 +- src/world/area_sbk/sbk_10/sbk_10_2_entity.c | 8 +- src/world/area_sbk/sbk_11/sbk_11_1_main.c | 38 +- src/world/area_sbk/sbk_12/sbk_12_1_main.c | 38 +- src/world/area_sbk/sbk_13/sbk_13_1_main.c | 38 +- src/world/area_sbk/sbk_14/sbk_14_1_main.c | 58 +- src/world/area_sbk/sbk_14/sbk_14_2_entity.c | 32 +- src/world/area_sbk/sbk_15/sbk_15_1_main.c | 38 +- src/world/area_sbk/sbk_16/sbk_16_1_main.c | 36 +- src/world/area_sbk/sbk_16/sbk_16_2_foliage.c | 16 +- src/world/area_sbk/sbk_20/sbk_20_1_main.c | 38 +- src/world/area_sbk/sbk_20/sbk_20_2_entity.c | 90 +- src/world/area_sbk/sbk_21/sbk_21_1_main.c | 36 +- src/world/area_sbk/sbk_22/sbk_22_1_main.c | 40 +- src/world/area_sbk/sbk_22/sbk_22_3_entity.c | 24 +- src/world/area_sbk/sbk_23/sbk_23_1_main.c | 38 +- src/world/area_sbk/sbk_23/sbk_23_2_entity.c | 20 +- src/world/area_sbk/sbk_24/sbk_24_1_main.c | 60 +- src/world/area_sbk/sbk_24/sbk_24_3_entity.c | 8 +- src/world/area_sbk/sbk_24/sbk_24_4_foliage.c | 22 +- src/world/area_sbk/sbk_25/sbk_25_1_main.c | 42 +- src/world/area_sbk/sbk_25/sbk_25_3_foliage.c | 16 +- src/world/area_sbk/sbk_25/sbk_25_4_entity.c | 22 +- src/world/area_sbk/sbk_26/sbk_26_1_main.c | 38 +- src/world/area_sbk/sbk_26/sbk_26_3_foliage.c | 10 +- src/world/area_sbk/sbk_30/sbk_30_1_music.c | 22 +- src/world/area_sbk/sbk_30/sbk_30_2_main.c | 152 +- src/world/area_sbk/sbk_30/sbk_30_3_npc.c | 432 +- src/world/area_sbk/sbk_30/sbk_30_4_foliage.c | 18 +- src/world/area_sbk/sbk_31/sbk_31_1_main.c | 38 +- src/world/area_sbk/sbk_32/sbk_32_1_main.c | 58 +- src/world/area_sbk/sbk_33/sbk_33_1_entity.c | 24 +- src/world/area_sbk/sbk_33/sbk_33_2_main.c | 38 +- src/world/area_sbk/sbk_34/sbk_34_1_main.c | 40 +- src/world/area_sbk/sbk_34/sbk_34_2_npc.c | 90 +- src/world/area_sbk/sbk_34/sbk_34_3_foliage.c | 10 +- src/world/area_sbk/sbk_35/sbk_35_1_main.c | 40 +- src/world/area_sbk/sbk_35/sbk_35_3_foliage.c | 22 +- src/world/area_sbk/sbk_36/sbk_36_1_main.c | 40 +- src/world/area_sbk/sbk_36/sbk_36_2_foliage.c | 58 +- src/world/area_sbk/sbk_36/sbk_36_3_entity.c | 24 +- src/world/area_sbk/sbk_40/sbk_40_1_main.c | 38 +- src/world/area_sbk/sbk_40/sbk_40_3_entity.c | 14 +- src/world/area_sbk/sbk_41/sbk_41_1_main.c | 38 +- src/world/area_sbk/sbk_41/sbk_41_2_entity.c | 20 +- src/world/area_sbk/sbk_42/sbk_42_1_main.c | 38 +- src/world/area_sbk/sbk_43/sbk_43_1_main.c | 38 +- src/world/area_sbk/sbk_43/sbk_43_2_entity.c | 8 +- src/world/area_sbk/sbk_44/sbk_44_1_main.c | 38 +- src/world/area_sbk/sbk_45/sbk_45_1_main.c | 58 +- src/world/area_sbk/sbk_45/sbk_45_2_entity.c | 12 +- src/world/area_sbk/sbk_46/sbk_46_1_main.c | 40 +- src/world/area_sbk/sbk_46/sbk_46_3_foliage.c | 22 +- src/world/area_sbk/sbk_46/sbk_46_4_entity.c | 12 +- src/world/area_sbk/sbk_50/sbk_50_1_main.c | 34 +- src/world/area_sbk/sbk_51/sbk_51_1_main.c | 38 +- src/world/area_sbk/sbk_52/sbk_52_1_main.c | 38 +- src/world/area_sbk/sbk_52/sbk_52_2_entity.c | 12 +- src/world/area_sbk/sbk_53/sbk_53_1_main.c | 38 +- src/world/area_sbk/sbk_54/sbk_54_1_main.c | 38 +- src/world/area_sbk/sbk_54/sbk_54_2_entity.c | 20 +- src/world/area_sbk/sbk_55/sbk_55_1_main.c | 42 +- src/world/area_sbk/sbk_55/sbk_55_3_foliage.c | 10 +- src/world/area_sbk/sbk_55/sbk_55_4_entity.c | 10 +- src/world/area_sbk/sbk_56/sbk_56_1_main.c | 118 +- src/world/area_sbk/sbk_56/sbk_56_2_entity.c | 6 +- src/world/area_sbk/sbk_56/sbk_56_3_foliage.c | 72 +- src/world/area_sbk/sbk_60/sbk_60_1_main.c | 34 +- src/world/area_sbk/sbk_61/sbk_61_1_main.c | 36 +- src/world/area_sbk/sbk_61/sbk_61_2_entity.c | 8 +- src/world/area_sbk/sbk_62/sbk_62_1_main.c | 36 +- src/world/area_sbk/sbk_63/sbk_63_1_main.c | 36 +- src/world/area_sbk/sbk_64/sbk_64_1_main.c | 36 +- src/world/area_sbk/sbk_64/sbk_64_2_entity.c | 8 +- src/world/area_sbk/sbk_65/sbk_65_1_main.c | 34 +- src/world/area_sbk/sbk_66/sbk_66_1_main.c | 38 +- src/world/area_sbk/sbk_66/sbk_66_3_foliage.c | 22 +- src/world/area_sbk/sbk_66/sbk_66_4_entity.c | 28 +- src/world/area_sbk/sbk_99/sbk_99_1_main.c | 56 +- src/world/area_sbk/sbk_99/sbk_99_2_entity.c | 8 +- src/world/area_tik/common/DripVolumes.inc.c | 254 +- src/world/area_tik/common/Flotsam.inc.c | 44 +- src/world/area_tik/tik_01/tik_01_1_music.c | 12 +- src/world/area_tik/tik_01/tik_01_2_main.c | 70 +- src/world/area_tik/tik_01/tik_01_3_drips.c | 8 +- src/world/area_tik/tik_01/tik_01_4_entity.c | 126 +- src/world/area_tik/tik_01/tik_01_5_npc.c | 152 +- src/world/area_tik/tik_02/tik_02_1_music.c | 12 +- src/world/area_tik/tik_02/tik_02_2_main.c | 68 +- src/world/area_tik/tik_02/tik_02_3_entity.c | 10 +- src/world/area_tik/tik_02/tik_02_4_drips.c | 8 +- src/world/area_tik/tik_02/tik_02_5_npc.c | 188 +- src/world/area_tik/tik_03/tik_03_1_music.c | 6 +- src/world/area_tik/tik_03/tik_03_2_main.c | 104 +- src/world/area_tik/tik_03/tik_03_3_drips.c | 8 +- .../area_tik/tik_03/tik_03_4_platforms.c | 110 +- src/world/area_tik/tik_03/tik_03_5_entity.c | 16 +- src/world/area_tik/tik_03/tik_03_6_demo.c | 84 +- src/world/area_tik/tik_04/tik_04_1_music.c | 6 +- src/world/area_tik/tik_04/tik_04_2_main.c | 72 +- src/world/area_tik/tik_04/tik_04_3_drips.c | 8 +- .../area_tik/tik_04/tik_04_4_platforms.c | 140 +- src/world/area_tik/tik_04/tik_04_5_npc.c | 72 +- src/world/area_tik/tik_05/tik_05_1_music.c | 6 +- src/world/area_tik/tik_05/tik_05_2_main.c | 50 +- src/world/area_tik/tik_05/tik_05_3_drips.c | 8 +- src/world/area_tik/tik_05/tik_05_4_entity.c | 90 +- src/world/area_tik/tik_06/tik_06_1_music.c | 6 +- src/world/area_tik/tik_06/tik_06_2_main.c | 138 +- src/world/area_tik/tik_06/tik_06_3_drips.c | 8 +- src/world/area_tik/tik_06/tik_06_4_entity.c | 110 +- src/world/area_tik/tik_07/tik_07_1_music.c | 6 +- src/world/area_tik/tik_07/tik_07_2_main.c | 62 +- src/world/area_tik/tik_07/tik_07_3_entity.c | 6 +- src/world/area_tik/tik_07/tik_07_4_drips.c | 8 +- .../area_tik/tik_07/tik_07_5_platforms.c | 110 +- src/world/area_tik/tik_08/tik_08_1_music.c | 12 +- src/world/area_tik/tik_08/tik_08_2_main.c | 104 +- src/world/area_tik/tik_08/tik_08_3_drips.c | 8 +- src/world/area_tik/tik_08/tik_08_4_entity.c | 74 +- src/world/area_tik/tik_08/tik_08_5_npc.c | 182 +- src/world/area_tik/tik_09/tik_09_1_music.c | 6 +- src/world/area_tik/tik_09/tik_09_2_main.c | 190 +- src/world/area_tik/tik_09/tik_09_3_drips.c | 8 +- src/world/area_tik/tik_09/tik_09_4_entity.c | 112 +- src/world/area_tik/tik_09/tik_09_5_npc.c | 72 +- src/world/area_tik/tik_10/tik_10_1_music.c | 6 +- src/world/area_tik/tik_10/tik_10_2_main.c | 38 +- src/world/area_tik/tik_10/tik_10_3_drips.c | 8 +- src/world/area_tik/tik_10/tik_10_4_entity.c | 26 +- src/world/area_tik/tik_12/tik_12_1_music.c | 6 +- src/world/area_tik/tik_12/tik_12_2_main.c | 46 +- src/world/area_tik/tik_12/tik_12_3_drips.c | 8 +- src/world/area_tik/tik_12/tik_12_4_entity.c | 48 +- src/world/area_tik/tik_14/tik_14_1_music.c | 6 +- src/world/area_tik/tik_14/tik_14_2_main.c | 66 +- src/world/area_tik/tik_14/tik_14_3_drips.c | 8 +- src/world/area_tik/tik_14/tik_14_4_entity.c | 40 +- src/world/area_tik/tik_15/tik_15_1_music.c | 6 +- src/world/area_tik/tik_15/tik_15_2_main.c | 56 +- src/world/area_tik/tik_15/tik_15_3_entity.c | 40 +- src/world/area_tik/tik_15/tik_15_4_drips.c | 8 +- src/world/area_tik/tik_15/tik_15_5_npc.c | 118 +- src/world/area_tik/tik_17/tik_17_1_music.c | 14 +- src/world/area_tik/tik_17/tik_17_2_entity.c | 4 +- src/world/area_tik/tik_17/tik_17_3_main.c | 72 +- src/world/area_tik/tik_18/tik_18_1_music.c | 6 +- src/world/area_tik/tik_18/tik_18_2_main.c | 62 +- src/world/area_tik/tik_18/tik_18_3_drips.c | 8 +- src/world/area_tik/tik_18/tik_18_4_npc.c | 82 +- src/world/area_tik/tik_18/tik_18_5_entity.c | 32 +- src/world/area_tik/tik_19/tik_19_1_music.c | 6 +- src/world/area_tik/tik_19/tik_19_2_main.c | 66 +- src/world/area_tik/tik_19/tik_19_3_entity.c | 4 +- src/world/area_tik/tik_20/tik_20_1_music.c | 6 +- src/world/area_tik/tik_20/tik_20_2_main.c | 106 +- src/world/area_tik/tik_20/tik_20_4_entity.c | 8 +- src/world/area_tik/tik_21/tik_21_1_music.c | 6 +- src/world/area_tik/tik_21/tik_21_2_main.c | 130 +- src/world/area_tik/tik_21/tik_21_3_entity.c | 24 +- src/world/area_tik/tik_22/tik_22_1_music.c | 14 +- src/world/area_tik/tik_22/tik_22_2_main.c | 102 +- src/world/area_tik/tik_23/tik_23_1_music.c | 6 +- src/world/area_tik/tik_23/tik_23_2_main.c | 92 +- src/world/area_tik/tik_23/tik_23_3_entity.c | 40 +- src/world/area_tik/tik_24/tik_24_1_music.c | 6 +- src/world/area_tik/tik_24/tik_24_2_main.c | 58 +- src/world/area_tik/tik_24/tik_24_3_drips.c | 8 +- src/world/area_tik/tik_24/tik_24_4_entity.c | 46 +- src/world/area_tik/tik_25/tik_25_1_music.c | 16 +- src/world/area_tik/tik_25/tik_25_2_main.c | 44 +- src/world/area_tik/tik_25/tik_25_3_entity.c | 196 +- src/world/area_trd/trd_00/trd_00_0_header.c | 26 +- src/world/area_trd/trd_00/trd_00_1_main.c | 252 +- src/world/area_trd/trd_00/trd_00_2_entity.c | 20 +- src/world/area_trd/trd_00/trd_00_3_npc.c | 526 +- src/world/area_trd/trd_01/trd_01_0_header.c | 8 +- src/world/area_trd/trd_01/trd_01_1_main.c | 618 +-- src/world/area_trd/trd_01/trd_01_2_entity.c | 128 +- src/world/area_trd/trd_01/trd_01_3_npc.c | 224 +- src/world/area_trd/trd_02/trd_02_0_header.c | 8 +- src/world/area_trd/trd_02/trd_02_1_main.c | 312 +- src/world/area_trd/trd_02/trd_02_2_entity.c | 78 +- src/world/area_trd/trd_03/trd_03_0_header.c | 24 +- src/world/area_trd/trd_03/trd_03_1_main.c | 352 +- src/world/area_trd/trd_03/trd_03_2_entity.c | 20 +- src/world/area_trd/trd_03/trd_03_3_npc.c | 292 +- src/world/area_trd/trd_03/trd_03_4_puzzle.c | 482 +- src/world/area_trd/trd_04/trd_04_0_header.c | 8 +- src/world/area_trd/trd_04/trd_04_1_main.c | 444 +- src/world/area_trd/trd_04/trd_04_2_entity.c | 218 +- src/world/area_trd/trd_04/trd_04_3_npc.c | 36 +- src/world/area_trd/trd_05/trd_05_0_header.c | 24 +- src/world/area_trd/trd_05/trd_05_1_main.c | 178 +- src/world/area_trd/trd_05/trd_05_2_entity.c | 12 +- src/world/area_trd/trd_05/trd_05_3_trap.c | 430 +- src/world/area_trd/trd_05/trd_05_4_npc.c | 354 +- src/world/area_trd/trd_06/trd_06_0_header.c | 34 +- src/world/area_trd/trd_06/trd_06_1_main.c | 286 +- src/world/area_trd/trd_06/trd_06_2_falling.c | 360 +- .../area_trd/trd_06/trd_06_3_npc_prisoners.c | 540 +- .../area_trd/trd_06/trd_06_4_npc_koopa_bros.c | 30 +- src/world/area_trd/trd_06/trd_06_5_entity.c | 6 +- src/world/area_trd/trd_07/trd_07_0_header.c | 8 +- src/world/area_trd/trd_07/trd_07_1_main.c | 64 +- src/world/area_trd/trd_07/trd_07_2_npc.c | 48 +- .../area_trd/trd_07/trd_07_3_magic_doors.c | 524 +- src/world/area_trd/trd_08/trd_08_0_header.c | 8 +- src/world/area_trd/trd_08/trd_08_1_main.c | 68 +- src/world/area_trd/trd_08/trd_08_2_entity.c | 6 +- src/world/area_trd/trd_08/trd_08_3_npc.c | 134 +- src/world/area_trd/trd_09/trd_09_0_header.c | 24 +- src/world/area_trd/trd_09/trd_09_1_main.c | 98 +- src/world/area_trd/trd_09/trd_09_2_entity.c | 26 +- src/world/area_trd/trd_09/trd_09_3_npc.c | 768 +-- src/world/area_trd/trd_09/trd_09_4_demo.c | 150 +- src/world/area_trd/trd_10/trd_10_0_header.c | 22 +- src/world/area_trd/trd_10/trd_10_1_main.c | 242 +- src/world/area_trd/trd_10/trd_10_2_npc.c | 400 +- .../area_trd/trd_10/trd_10_3_fake_bowser.c | 114 +- src/world/area_tst/tst_01/tst_01_1_main.c | 32 +- src/world/area_tst/tst_01/tst_01_2_entity.c | 16 +- src/world/area_tst/tst_02/tst_02_1_main.c | 32 +- src/world/area_tst/tst_02/tst_02_2_entity.c | 18 +- src/world/area_tst/tst_03/tst_03_1_main.c | 46 +- src/world/area_tst/tst_03/tst_03_2_entity.c | 46 +- src/world/area_tst/tst_04/tst_04_1_main.c | 160 +- src/world/area_tst/tst_04/tst_04_2_entity.c | 6 +- .../area_tst/tst_04/tst_04_3_reflection.c | 12 +- src/world/area_tst/tst_04/tst_04_4_npc.c | 28 +- src/world/area_tst/tst_10/tst_10_1_main.c | 128 +- src/world/area_tst/tst_11/tst_11_1_main.c | 12 +- src/world/area_tst/tst_11/tst_11_2_extra.c | 12 +- src/world/area_tst/tst_12/tst_12_1_main.c | 116 +- src/world/area_tst/tst_13/tst_13_1_main.c | 88 +- src/world/area_tst/tst_20/tst_20_1_main.c | 10 +- src/world/common/atomic/BetaFloorPanels.inc.c | 280 +- src/world/common/atomic/CreateDarkness.inc.c | 10 +- src/world/common/atomic/MarioSalute.inc.c | 12 +- src/world/common/atomic/TexturePan.h | 26 +- src/world/common/atomic/TexturePan.inc.c | 28 +- src/world/common/atomic/ToadHouse.data.inc.c | 182 +- .../common/atomic/ToadHouseHos.data.inc.c | 182 +- src/world/common/complete/GiveReward.inc.c | 72 +- src/world/common/complete/KeyItemChoice.inc.c | 66 +- .../common/complete/LetterDelivery.inc.c | 234 +- .../common/complete/NormalItemChoice.inc.c | 64 +- src/world/common/complete/Quizmo.inc.c | 1166 ++-- src/world/common/enemy/AlbinoDino.inc.c | 4 +- src/world/common/enemy/AmazyDayzee.inc.c | 24 +- src/world/common/enemy/Bandit.inc.c | 90 +- src/world/common/enemy/Bobomb_Guard.inc.c | 6 +- src/world/common/enemy/Bobomb_Wander.inc.c | 6 +- src/world/common/enemy/Bzzap.inc.c | 14 +- src/world/common/enemy/Cleft.inc.c | 6 +- src/world/common/enemy/Clubba_Multi.inc.c | 88 +- src/world/common/enemy/CrazyDayzee.inc.c | 6 +- .../common/enemy/DarkTroopa_Wander.inc.c | 14 +- src/world/common/enemy/DryBones.inc.c | 120 +- .../common/enemy/Duplighost_Patrol.inc.c | 6 +- .../common/enemy/Duplighost_Wander.inc.c | 6 +- src/world/common/enemy/Ember.inc.c | 14 +- src/world/common/enemy/FlyingMagikoopa.inc.c | 94 +- .../common/enemy/ForestFuzzy_Wander.inc.c | 8 +- .../common/enemy/FrostClubba_Multi.inc.c | 88 +- src/world/common/enemy/FrostPiranha.inc.c | 64 +- src/world/common/enemy/Fuzzy_Wander.inc.c | 8 +- src/world/common/enemy/Gloomba_Wander.inc.c | 6 +- src/world/common/enemy/GoombaBros_Guard.inc.c | 6 +- src/world/common/enemy/Goomba_Wander.inc.c | 6 +- src/world/common/enemy/GrooveGuy.inc.c | 6 +- src/world/common/enemy/Gulpit.inc.c | 34 +- .../common/enemy/HammerBros_Wander.inc.c | 118 +- src/world/common/enemy/HeartPlant.inc.c | 54 +- src/world/common/enemy/HurtPlant.inc.c | 80 +- src/world/common/enemy/HyperCleft.inc.c | 6 +- .../common/enemy/HyperGoomba_Patrol.inc.c | 6 +- .../common/enemy/HyperGoomba_Wander.inc.c | 6 +- src/world/common/enemy/HyperParagoomba.inc.c | 14 +- .../common/enemy/JungleFuzzy_Wander.inc.c | 8 +- src/world/common/enemy/Kammy_Guard.inc.c | 6 +- .../common/enemy/KoopaTroopa_Patrol.inc.c | 12 +- .../common/enemy/KoopaTroopa_Wander.inc.c | 14 +- src/world/common/enemy/Koopatrol_Patrol.inc.c | 12 +- src/world/common/enemy/Koopatrol_Wander.inc.c | 14 +- .../common/enemy/Lakitu_SpinySpawner.inc.c | 60 +- src/world/common/enemy/LavaBubble.inc.c | 14 +- src/world/common/enemy/MBush.inc.c | 152 +- src/world/common/enemy/Magikoopa.inc.c | 116 +- .../common/enemy/MontyMole_GroundAmbush.inc.c | 92 +- .../common/enemy/MontyMole_StoneThrower.inc.c | 124 +- .../common/enemy/MontyMole_WallAmbush.inc.c | 106 +- .../common/enemy/Paragloomba_Wander.inc.c | 14 +- .../common/enemy/Paragoomba_Wander.inc.c | 14 +- src/world/common/enemy/Paratroopa.inc.c | 14 +- src/world/common/enemy/PiranhaPlant.inc.c | 64 +- src/world/common/enemy/Pokey.inc.c | 8 +- src/world/common/enemy/PokeyMummy.inc.c | 8 +- src/world/common/enemy/PutridPiranha.inc.c | 64 +- src/world/common/enemy/PyroGuy.inc.c | 6 +- src/world/common/enemy/RuffPuff.inc.c | 14 +- src/world/common/enemy/Sentinel.inc.c | 166 +- .../common/enemy/ShyGuy_AvoidPlayer.inc.c | 6 +- src/world/common/enemy/ShyGuy_Guard.inc.c | 6 +- src/world/common/enemy/ShyGuy_Patrol.inc.c | 12 +- src/world/common/enemy/ShyGuy_Wander.inc.c | 6 +- src/world/common/enemy/SkyGuy.inc.c | 14 +- src/world/common/enemy/SpearGuy_Patrol.inc.c | 6 +- src/world/common/enemy/SpearGuy_Wander.inc.c | 60 +- src/world/common/enemy/SpikeTop.inc.c | 72 +- .../common/enemy/SpikedGloomba_Wander.inc.c | 6 +- .../common/enemy/SpikedGoomba_Patrol.inc.c | 6 +- .../common/enemy/SpikedGoomba_Wander.inc.c | 6 +- src/world/common/enemy/Spiny.inc.c | 14 +- src/world/common/enemy/SpyGuy.inc.c | 122 +- src/world/common/enemy/StoneChomp.inc.c | 96 +- src/world/common/enemy/Swooper.inc.c | 12 +- .../common/enemy/TubbaBlubba_Patrol.inc.c | 6 +- .../common/enemy/ai/GenericHitboxDefeat.inc.c | 26 +- src/world/common/entity/Chest.inc.c | 86 +- src/world/common/entity/Pipe.inc.c | 482 +- src/world/common/entity/SuperBlock.inc.c | 228 +- src/world/common/npc/Boo_Patrol.inc.c | 6 +- src/world/common/npc/Boo_Wander.inc.c | 6 +- src/world/common/npc/Bubulb.inc.c | 4 +- src/world/common/npc/Bubulb_Patrol.inc.c | 6 +- src/world/common/npc/Dryite_Patrol.inc.c | 6 +- src/world/common/npc/Dryite_Wander.inc.c | 6 +- .../common/npc/GoombaFamily_Wander.inc.c | 6 +- .../common/npc/KoopaWithoutShell_Patrol.inc.c | 6 +- .../common/npc/KoopaWithoutShell_Wander.inc.c | 6 +- src/world/common/npc/Koopa_Wander.inc.c | 6 +- src/world/common/npc/Merlar.inc.c | 14 +- src/world/common/npc/Penguin_Wander.inc.c | 6 +- src/world/common/npc/RaphaelRaven.inc.c | 6 +- src/world/common/npc/StarRod.inc.c | 4 +- src/world/common/npc/StarSpirit_Wander.inc.c | 14 +- src/world/common/npc/Toad_Guard.inc.c | 6 +- src/world/common/npc/Toad_Patrol.inc.c | 6 +- src/world/common/npc/Toad_Wander.inc.c | 6 +- src/world/common/npc/TrainToad.inc.c | 4 +- src/world/common/npc/TubbasHeart.inc.c | 8 +- src/world/common/npc/YoshiKid_Patrol.inc.c | 6 +- src/world/common/npc/Yoshi_Patrol.inc.c | 6 +- .../common/todo/StarSpiritEffectFunc.inc.c | 14 +- .../dead/area_flo/flo_00/flo_00_1_music.c | 66 +- .../dead/area_flo/flo_00/flo_00_2_main.c | 362 +- src/world/dead/area_flo/flo_00/flo_00_3_npc.c | 1080 ++-- .../dead/area_flo/flo_00/flo_00_4_epilogue.c | 94 +- .../dead/area_flo/flo_00/flo_00_5_beanstalk.c | 1124 ++-- .../dead/area_flo/flo_00/flo_00_6_entity.c | 10 +- .../dead/area_flo/flo_03/flo_03_1_music.c | 70 +- .../dead/area_flo/flo_03/flo_03_2_main.c | 62 +- src/world/dead/area_flo/flo_03/flo_03_3_npc.c | 1250 ++--- .../dead/area_flo/flo_03/flo_03_4_foliage.c | 14 +- .../dead/area_flo/flo_03/flo_03_5_entity.c | 12 +- .../dead/area_flo/flo_07/flo_07_1_music.c | 44 +- .../dead/area_flo/flo_07/flo_07_2_main.c | 72 +- src/world/dead/area_flo/flo_07/flo_07_3_npc.c | 372 +- .../dead/area_flo/flo_08/flo_08_1_music.c | 16 +- .../dead/area_flo/flo_08/flo_08_2_entity.c | 6 +- .../dead/area_flo/flo_08/flo_08_3_main.c | 112 +- src/world/dead/area_flo/flo_08/flo_08_4_npc.c | 318 +- .../dead/area_flo/flo_08/flo_08_5_foliage.c | 14 +- .../dead/area_flo/flo_08/flo_08_6_vines.c | 4 +- .../dead/area_flo/flo_09/flo_09_1_music.c | 16 +- .../dead/area_flo/flo_09/flo_09_2_main.c | 42 +- .../dead/area_flo/flo_09/flo_09_3_vines.c | 4 +- .../dead/area_flo/flo_09/flo_09_4_foliage.c | 106 +- src/world/dead/area_flo/flo_09/flo_09_5_npc.c | 78 +- .../dead/area_flo/flo_10/flo_10_1_music.c | 48 +- .../dead/area_flo/flo_10/flo_10_2_entity.c | 10 +- .../dead/area_flo/flo_10/flo_10_3_main.c | 66 +- .../dead/area_flo/flo_10/flo_10_4_fountain.c | 474 +- src/world/dead/area_flo/flo_10/flo_10_5_npc.c | 346 +- .../dead/area_flo/flo_10/flo_10_6_waterfx.c | 4 +- .../dead/area_flo/flo_10/flo_10_7_foliage.c | 10 +- .../dead/area_flo/flo_11/flo_11_1_music.c | 16 +- .../dead/area_flo/flo_11/flo_11_2_main.c | 126 +- src/world/dead/area_flo/flo_11/flo_11_3_npc.c | 526 +- .../dead/area_flo/flo_11/flo_11_4_entity.c | 8 +- .../dead/area_flo/flo_12/flo_12_1_music.c | 42 +- .../dead/area_flo/flo_12/flo_12_2_main.c | 48 +- src/world/dead/area_flo/flo_12/flo_12_3_npc.c | 316 +- .../dead/area_flo/flo_13/flo_13_1_music.c | 92 +- .../dead/area_flo/flo_13/flo_13_2_entity.c | 26 +- .../dead/area_flo/flo_13/flo_13_3_main.c | 42 +- src/world/dead/area_flo/flo_13/flo_13_4_npc.c | 916 +-- .../dead/area_flo/flo_14/flo_14_1_music.c | 16 +- .../dead/area_flo/flo_14/flo_14_2_main.c | 112 +- .../dead/area_flo/flo_14/flo_14_3_bubbles.c | 468 +- src/world/dead/area_flo/flo_14/flo_14_4_npc.c | 102 +- .../dead/area_flo/flo_14/flo_14_5_entity.c | 6 +- .../dead/area_flo/flo_14/flo_14_6_logs.c | 4 +- .../dead/area_flo/flo_15/flo_15_1_music.c | 26 +- .../dead/area_flo/flo_15/flo_15_2_main.c | 44 +- src/world/dead/area_flo/flo_15/flo_15_3_npc.c | 348 +- .../dead/area_flo/flo_15/flo_15_4_entity.c | 18 +- .../dead/area_flo/flo_15/flo_15_5_stairs.c | 128 +- .../dead/area_flo/flo_16/flo_16_1_music.c | 16 +- .../dead/area_flo/flo_16/flo_16_2_main.c | 104 +- .../dead/area_flo/flo_16/flo_16_3_vines.c | 6 +- .../dead/area_flo/flo_16/flo_16_4_entity.c | 80 +- .../dead/area_flo/flo_16/flo_16_6_puzzle.c | 428 +- .../dead/area_flo/flo_17/flo_17_1_music.c | 16 +- .../dead/area_flo/flo_17/flo_17_2_main.c | 166 +- .../dead/area_flo/flo_17/flo_17_3_logs.c | 4 +- .../dead/area_flo/flo_17/flo_17_5_entity.c | 10 +- .../dead/area_flo/flo_18/flo_18_1_music.c | 18 +- .../dead/area_flo/flo_18/flo_18_2_main.c | 94 +- .../dead/area_flo/flo_18/flo_18_3_machine.c | 1352 ++--- src/world/dead/area_flo/flo_18/flo_18_4_npc.c | 892 +-- .../dead/area_flo/flo_18/flo_18_5_foliage.c | 4 +- .../dead/area_flo/flo_19/flo_19_1_music.c | 38 +- .../dead/area_flo/flo_19/flo_19_2_entity.c | 6 +- .../dead/area_flo/flo_19/flo_19_3_main.c | 106 +- .../dead/area_flo/flo_19/flo_19_4_clouds.c | 300 +- .../dead/area_flo/flo_19/flo_19_5_beanstalk.c | 634 +-- .../dead/area_kzn/kzn_11/kzn_11_1_main.c | 110 +- .../dead/area_kzn/kzn_11/kzn_11_2_platforms.c | 248 +- src/world/dead/area_kzn/kzn_11/kzn_11_3_npc.c | 130 +- .../dead/area_kzn/kzn_17/kzn_17_1_main.c | 46 +- .../dead/area_kzn/kzn_17/kzn_17_2_entity.c | 106 +- src/world/dead/area_kzn/kzn_17/kzn_17_3_npc.c | 166 +- .../dead/area_kzn/kzn_17/kzn_17_4_tromp.c | 278 +- .../dead/area_kzn/kzn_18/kzn_18_1_main.c | 130 +- src/world/dead/area_kzn/kzn_18/kzn_18_2_npc.c | 248 +- .../dead/area_kzn/kzn_18/kzn_18_3_entity.c | 12 +- .../dead/area_kzn/kzn_19/kzn_19_1_music.c | 32 +- .../dead/area_kzn/kzn_19/kzn_19_2_main.c | 364 +- src/world/dead/area_kzn/kzn_19/kzn_19_4_npc.c | 1062 ++-- .../dead/area_kzn/kzn_19/kzn_19_5_eruption.c | 156 +- .../dead/area_kzn/kzn_19/kzn_19_6_entity.c | 12 +- .../dead/area_kzn/kzn_20/kzn_20_1_music.c | 24 +- .../dead/area_kzn/kzn_20/kzn_20_2_main.c | 288 +- src/world/dead/area_kzn/kzn_20/kzn_20_3_npc.c | 818 +-- .../dead/area_kzn/kzn_22/kzn_22_1_music.c | 14 +- .../dead/area_kzn/kzn_22/kzn_22_2_main.c | 242 +- .../dead/area_kzn/kzn_22/kzn_22_3_entity.c | 10 +- src/world/dead/area_kzn/kzn_22/kzn_22_4_npc.c | 378 +- .../dead/area_kzn/kzn_23/kzn_23_1_music.c | 8 +- .../dead/area_kzn/kzn_23/kzn_23_2_main.c | 114 +- src/world/dead/area_kzn/kzn_23/kzn_23_3_npc.c | 288 +- src/world/partner/bombette.c | 24 +- src/world/partner/bow.c | 24 +- src/world/partner/goombaria.c | 24 +- src/world/partner/goombario.c | 48 +- src/world/partner/goompa.c | 24 +- src/world/partner/kooper.c | 24 +- src/world/partner/lakilester.c | 30 +- src/world/partner/parakarry.c | 24 +- src/world/partner/sushie.c | 30 +- src/world/partner/twink.c | 24 +- src/world/partner/watt.c | 30 +- src/world/script_api/enter_exit.c | 448 +- src/world/script_api/push_blocks.c | 114 +- src/world/script_api/rooms.c | 792 +-- src/world/script_api/shops.c | 76 +- src/world_use_item.c | 176 +- ...ros_remove_prefix_and_make_pascal_case.txt | 96 + 2346 files changed, 259918 insertions(+), 259822 deletions(-) create mode 100644 tools/renames/0_evt_macros_remove_prefix_and_make_pascal_case.txt diff --git a/include/script_api/common.h b/include/script_api/common.h index bd380e906a5..f4e6d79e24f 100644 --- a/include/script_api/common.h +++ b/include/script_api/common.h @@ -1325,7 +1325,7 @@ API_CALLABLE(AssignPanelFlag); /// @evtapi API_CALLABLE(AssignCrateFlag); -/// Removes a trigger previously bound with \ref EVT_BIND_TRIGGER. +/// Removes a trigger previously bound with \ref BindTrigger. /// @evtapi /// @param triggerPtr API_CALLABLE(DeleteTrigger); diff --git a/include/script_api/macros.h b/include/script_api/macros.h index 1c784174900..cfa730b9b63 100644 --- a/include/script_api/macros.h +++ b/include/script_api/macros.h @@ -8,8 +8,8 @@ /// Expressions in EVT instructions should be one of the following types: /// - Integer literals (as-is, s32) -/// - Float literals (EVT_FLOAT) - cast to int where a float is not accepted -/// - Pointers, string literals (EVT_PTR) +/// - Float literals (Float) - cast to int where a float is not accepted +/// - Pointers, string literals (Ref) /// - Variables (LW, GW, LSW, GSW, UW) /// - Flags (LF, GF, LSWF, GSWF, UF) /// This is implemented in `evt_get_variable` and `evt_get_float_variable`. @@ -43,21 +43,21 @@ #define EVT_LIMIT -270000000 // TODO better name // This fixes an issue with fixed point numbers not being correct. Potentially a truncation vs round difference. -#define EVT_FLOAT_ROUND(x) ((x) >=0 ? (f64)((x) + 0.9) : (f64)(x)) -#define EVT_FLOAT(DOUBLE) ((Bytecode)EVT_FLOAT_ROUND(((DOUBLE) * 1024.0f)) - EVT_FIXED_OFFSET) +#define Float_ROUND(x) ((x) >=0 ? (f64)((x) + 0.9) : (f64)(x)) +#define Float(DOUBLE) ((Bytecode)Float_ROUND(((DOUBLE) * 1024.0f)) - EVT_FIXED_OFFSET) -/// Progammatically converts EVT_FLOAT --> f32 +/// Progammatically converts Float --> f32 #define EVT_FIXED_TO_FLOAT(x) ({f32 var = (x) + EVT_FIXED_OFFSET; var /= 1024.0f; var;}) -/// Progammatically converts f32 --> EVT_FLOAT -#define EVT_FLOAT_TO_FIXED(x) (((x) * 1024.0f) + -EVT_FIXED_OFFSET) +/// Progammatically converts f32 --> Float +#define Float_TO_FIXED(x) (((x) * 1024.0f) + -EVT_FIXED_OFFSET) /// Address/pointer constant. -#define EVT_PTR(sym) ((Bytecode) &(sym)) +#define Ref(sym) ((Bytecode) &(sym)) /// Local Word. A variable local to the current thread. -/// LWs are copied to any threads created by this one (EVT_EXEC, EVT_EXEC_WAIT, EVT_THREAD, EVT_CHILD_THREAD). -/// Additionally, EVT_EXEC_WAIT copies LWs back from the spawned thread when it completes. +/// LWs are copied to any threads created by this one (Exec, ExecWait, Thread, ChildThread). +/// Additionally, ExecWait copies LWs back from the spawned thread when it completes. /// /// Range: `0 <= v < 0x10` #define LocalVar(INDEX) ((INDEX) - EVT_LOCAL_VAR_OFFSET) @@ -69,8 +69,8 @@ #define MapVar(INDEX) ((INDEX) - EVT_MAP_VAR_OFFSET) /// Local Flag. A boolean variable local to the current thread. -/// LFs are copied to any threads created by this one (EVT_EXEC, EVT_EXEC_WAIT, EVT_THREAD, EVT_CHILD_THREAD). -/// Additionally, EVT_EXEC_WAIT copies LFs back from the spawned thread when it completes. +/// LFs are copied to any threads created by this one (Exec, ExecWait, Thread, ChildThread). +/// Additionally, ExecWait copies LFs back from the spawned thread when it completes. /// /// Range: `0 <= v < 0x60` #define LocalFlag(INDEX) ((INDEX) - EVT_LOCAL_FLAG_OFFSET) @@ -111,20 +111,20 @@ #define GameByte(INDEX) ((INDEX) - EVT_GAME_BYTE_OFFSET) /// User Word. A variable stored within the current thread's array. -/// You can load an array with EVT_USE_ARRAY or temporarily allocate one with EVT_MALLOC_ARRAY, then get/set values with +/// You can load an array with UseArray or temporarily allocate one with MallocArray, then get/set values with /// the `ArrayVar(index)` macro. /// /// Range: `0 <= v` #define ArrayVar(INDEX) ((INDEX) - EVT_ARRAY_VAR_OFFSET) /// User Flag. A boolean variable stored within the current thread's flag array. -/// The flag array is distinct from the word array (unlike EVT_USE_BUF and EVT_USE_FBUF). +/// The flag array is distinct from the word array (unlike UseBuf and UseFBuf). /// /// Range: `0 <= v` #define ArrayFlag(INDEX) ((INDEX) - EVT_ARRAY_FLAG_OFFSET) -/// An entity index. Entities are assigned indices in the order they are created with EVT_CALL(MakeEntity, ...). -/// Supported in EVT_BIND_TRIGGER and EVT_BIND_PADLOCK only. +/// An entity index. Entities are assigned indices in the order they are created with Call(MakeEntity, ...). +/// Supported in BindTrigger and BindPadlock only. #define EVT_ENTITY_ID_BIT 0x4000 #define EVT_ENTITY_INDEX(entityIndex) ((entityIndex) + EVT_ENTITY_ID_BIT) @@ -181,16 +181,16 @@ /// On each frame, the EVT manager will continue executing commands in all threads until a blocking command is /// encountered. This means that if you have a thread that loops but does not block between iterations, the game will -/// freeze! Avoid this by inserting a blocking command such as EVT_WAIT(1) in the loop body. +/// freeze! Avoid this by inserting a blocking command such as Wait(1) in the loop body. /// /// Also note that threads are never executed in parallel. If your EVT script lacks blocking commands, it will be /// executed all in one go, and race conditions cannot occur. /// /// The following subset of EVT commands are blocking: -/// - EVT_EXEC_WAIT -/// - EVT_WAIT -/// - EVT_WAIT_SECONDS -/// - EVT_CALL (if function returns ApiStatus_BLOCK) +/// - ExecWait +/// - Wait +/// - Wait_SECONDS +/// - Call (if function returns ApiStatus_BLOCK) /// In EVT scripts, instructions are stored contiguously in the following structs: /// struct { @@ -222,239 +222,239 @@ #endif /// Signals the end of EVT script data. A script missing this will likely crash on load. -#define EVT_END EVT_CMD(EVT_OP_END), +#define End EVT_CMD(EVT_OP_END), /// Kills the current EVT thread. /// A script missing a return will live - but do nothing - forever, or until something else kills it (e.g. leaving the map). -#define EVT_RETURN EVT_CMD(EVT_OP_RETURN), +#define Return EVT_CMD(EVT_OP_RETURN), /// Jumps to a given instruction pointer and begins execution from there. /// You can jump to a different EVT source and labels etc. will be loaded as expected. /// The timescale for the current thread is also reset to the global default. -#define EVT_JUMP(EVT_SOURCE) EVT_CMD(EVT_OP_JUMP, (Bytecode) EVT_SOURCE), +#define Jump(EVT_SOURCE) EVT_CMD(EVT_OP_JUMP, (Bytecode) EVT_SOURCE), -/// Marks this point in the script as a EVT_GOTO target. +/// Marks this point in the script as a Goto target. /// /// Range: `0 <= LABEL_ID <= 0x16` -#define EVT_LABEL(LABEL_ID) EVT_CMD(EVT_OP_LABEL, LABEL_ID), +#define Label(LABEL_ID) EVT_CMD(EVT_OP_LABEL, LABEL_ID), /// Moves execution to the given label. /// /// Range: `0 <= LABEL_ID <= 0x16` -#define EVT_GOTO(LABEL_ID) EVT_CMD(EVT_OP_GOTO, LABEL_ID), +#define Goto(LABEL_ID) EVT_CMD(EVT_OP_GOTO, LABEL_ID), /// Marks the beginning of a loop. /// -/// EVT_LOOP(TIMES) +/// Loop(TIMES) /// ... -/// EVT_END_LOOP +/// EndLoop /// /// The variable or value given in `TIMES` is decremented upon each loop iteration. /// After the "1" iteration completes, the loop exits. -/// Use EVT_LOOP(0) for an infinite loop; make sure it breaks or blocks to avoid a freeze. +/// Use Loop(0) for an infinite loop; make sure it breaks or blocks to avoid a freeze. /// /// Up to 8 loops may be nested within a single script. -#define EVT_LOOP(TIMES) EVT_CMD(EVT_OP_LOOP, TIMES), +#define Loop(TIMES) EVT_CMD(EVT_OP_LOOP, TIMES), /// Marks the end of a loop. -#define EVT_END_LOOP EVT_CMD(EVT_OP_END_LOOP), +#define EndLoop EVT_CMD(EVT_OP_END_LOOP), /// Breaks out of the innermost loop. -#define EVT_BREAK_LOOP EVT_CMD(EVT_OP_BREAK_LOOP), +#define BreakLoop EVT_CMD(EVT_OP_BREAK_LOOP), /// Blocks for the given number of frames. -#define EVT_WAIT(NUM_FRAMES) EVT_CMD(EVT_OP_WAIT_FRAMES, NUM_FRAMES), +#define Wait(NUM_FRAMES) EVT_CMD(EVT_OP_WAIT_FRAMES, NUM_FRAMES), /// Blocks for the given number of seconds. -#define EVT_WAIT_SECS(NUM_SECONDS) EVT_CMD(EVT_OP_WAIT_SECS, NUM_SECONDS), +#define WaitSecs(NUM_SECONDS) EVT_CMD(EVT_OP_WAIT_SECS, NUM_SECONDS), /// Marks the beginning of an if statement that only executes if `LVAR == RVAR`. /// -/// EVT_IF_EQ(LVAR, RVAR) +/// IfEq(LVAR, RVAR) /// ... -/// EVT_ELSE +/// Else /// ... -/// EVT_END_IF +/// EndIf /// -/// The EVT_ELSE block is optional. -#define EVT_IF_EQ(LVAR, RVAR) EVT_CMD(EVT_OP_IF_EQ, LVAR, RVAR), +/// The Else block is optional. +#define IfEq(LVAR, RVAR) EVT_CMD(EVT_OP_IF_EQ, LVAR, RVAR), /// Marks the beginning of an if statement that only executes if `LVAR != RVAR`. -#define EVT_IF_NE(LVAR, RVAR) EVT_CMD(EVT_OP_IF_NE, LVAR, RVAR), +#define IfNe(LVAR, RVAR) EVT_CMD(EVT_OP_IF_NE, LVAR, RVAR), /// Marks the beginning of an if statement that only executes if `LVAR < RVAR`. -#define EVT_IF_LT(LVAR, RVAR) EVT_CMD(EVT_OP_IF_LT, LVAR, RVAR), +#define IfLt(LVAR, RVAR) EVT_CMD(EVT_OP_IF_LT, LVAR, RVAR), /// Marks the beginning of an if statement that only executes if `LVAR <= RVAR`. -#define EVT_IF_GT(LVAR, RVAR) EVT_CMD(EVT_OP_IF_GT, LVAR, RVAR), +#define IfGt(LVAR, RVAR) EVT_CMD(EVT_OP_IF_GT, LVAR, RVAR), /// Marks the beginning of an if statement that only executes if `LVAR > RVAR`. -#define EVT_IF_LE(LVAR, RVAR) EVT_CMD(EVT_OP_IF_LE, LVAR, RVAR), +#define IfLe(LVAR, RVAR) EVT_CMD(EVT_OP_IF_LE, LVAR, RVAR), /// Marks the beginning of an if statement that only executes if `LVAR >= RVAR`. -#define EVT_IF_GE(LVAR, RVAR) EVT_CMD(EVT_OP_IF_GE, LVAR, RVAR), +#define IfGe(LVAR, RVAR) EVT_CMD(EVT_OP_IF_GE, LVAR, RVAR), /// Marks the beginning of an if statement that only executes if the RVAR flag is set on LVAR, /// i.e. `(LVAR & RVAR) != 1`. -#define EVT_IF_FLAG(LVAR, RVAR) EVT_CMD(EVT_OP_IF_FLAG, LVAR, RVAR), +#define IfFlag(LVAR, RVAR) EVT_CMD(EVT_OP_IF_FLAG, LVAR, RVAR), /// Marks the beginning of an if statement that only executes if the RVAR flag is unset on LVAR, /// i.e. `(LVAR & RVAR) == 0`. -#define EVT_IF_NOT_FLAG(LVAR, RVAR) EVT_CMD(EVT_OP_IF_NOT_FLAG, LVAR, RVAR), +#define IfNotFlag(LVAR, RVAR) EVT_CMD(EVT_OP_IF_NOT_FLAG, LVAR, RVAR), /// Marks the end of an if statement and the start of the else block. -#define EVT_ELSE EVT_CMD(EVT_OP_ELSE), +#define Else EVT_CMD(EVT_OP_ELSE), /// Marks the end of an if statement or an else block. -#define EVT_END_IF EVT_CMD(EVT_OP_END_IF), +#define EndIf EVT_CMD(EVT_OP_END_IF), /// Marks the start of a switch statement. /// -/// EVT_SWITCH(LVAR) -/// EVT_CASE_EQ(RVAR) +/// Switch(LVAR) +/// CaseEq(RVAR) /// ... -/// EVT_END_SWITCH +/// EndSwitch /// /// Unlike C, EVT switch statements do not have fallthrough by default. -/// If you want to opt-in to fallthrough, use EVT_CASE_OR_EQ. +/// If you want to opt-in to fallthrough, use CaseOrEq. /// /// Up to 8 switch statements may be nested within a single script. -#define EVT_SWITCH(LVAR) EVT_CMD(EVT_OP_SWITCH, LVAR), +#define Switch(LVAR) EVT_CMD(EVT_OP_SWITCH, LVAR), /// Marks the start of a switch statement where the given value is treated as-is instead of using evt_get_variable. -/// That is, `EVT_SWITCH_CONST(LocalVar(0))` will switch over the value `0xFE363C80` instead of the value contained +/// That is, `SwitchConst(LocalVar(0))` will switch over the value `0xFE363C80` instead of the value contained /// within `LocalVar(0)`. -#define EVT_SWITCH_CONST(LCONST) EVT_CMD(EVT_OP_SWITCH_CONST, LCONST), +#define SwitchConst(LCONST) EVT_CMD(EVT_OP_SWITCH_CONST, LCONST), /// Marks the start of a switch case that executes only if `LVAR == RVAR`. It also marks the end of any previous case. -#define EVT_CASE_EQ(RVAR) EVT_CMD(EVT_OP_CASE_EQ, RVAR), +#define CaseEq(RVAR) EVT_CMD(EVT_OP_CASE_EQ, RVAR), /// Marks the start of a switch case that executes only if `LVAR != RVAR`. It also marks the end of any previous case. -#define EVT_CASE_NE(RVAR) EVT_CMD(EVT_OP_CASE_NE, RVAR), +#define CaseNe(RVAR) EVT_CMD(EVT_OP_CASE_NE, RVAR), /// Marks the start of a switch case that executes only if `LVAR < RVAR`. It also marks the end of any previous case. -#define EVT_CASE_LT(RVAR) EVT_CMD(EVT_OP_CASE_LT, RVAR), +#define CaseLt(RVAR) EVT_CMD(EVT_OP_CASE_LT, RVAR), /// Marks the start of a switch case that executes only if `LVAR <= RVAR`. It also marks the end of any previous case. -#define EVT_CASE_GT(RVAR) EVT_CMD(EVT_OP_CASE_GT, RVAR), +#define CaseGt(RVAR) EVT_CMD(EVT_OP_CASE_GT, RVAR), /// Marks the start of a switch case that executes only if `LVAR > RVAR`. It also marks the end of any previous case. -#define EVT_CASE_LE(RVAR) EVT_CMD(EVT_OP_CASE_LE, RVAR), +#define CaseLe(RVAR) EVT_CMD(EVT_OP_CASE_LE, RVAR), /// Marks the start of a switch case that executes only if `LVAR >= RVAR`. It also marks the end of any previous case. -#define EVT_CASE_GE(RVAR) EVT_CMD(EVT_OP_CASE_GE, RVAR), +#define CaseGe(RVAR) EVT_CMD(EVT_OP_CASE_GE, RVAR), /// Marks the start of a switch case that executes unconditionally. It also marks the end of any previous case. -#define EVT_CASE_DEFAULT EVT_CMD(EVT_OP_CASE_DEFAULT), +#define CaseDefault EVT_CMD(EVT_OP_CASE_DEFAULT), /// Marks the start of a switch case that executes only if `LVAR == RVAR`. It also marks the end of any previous case. -/// Unlike EVT_CASE_EQ, EVT_CASE_OR_EQ will fallthrough to the next case until EVT_END_CASE_GROUP is reached. -#define EVT_CASE_OR_EQ(RVAR) EVT_CMD(EVT_OP_CASE_OR_EQ, RVAR), +/// Unlike CaseEq, CaseOrEq will fallthrough to the next case until EndCaseGroup is reached. +#define CaseOrEq(RVAR) EVT_CMD(EVT_OP_CASE_OR_EQ, RVAR), /// Marks the start of a switch case that executes only if `LVAR == RVAR`. It also marks the end of any previous case. -/// Similar to EVT_CASE_OR_EQ, EVT_CASE_AND_EQ has fallthrough. However, if `LVAR != RVAR`, fallthrough does not apply. -#define EVT_CASE_AND_EQ(RVAR) EVT_CMD(EVT_OP_CASE_AND_EQ, RVAR), +/// Similar to CaseOrEq, CaseAndEq has fallthrough. However, if `LVAR != RVAR`, fallthrough does not apply. +#define CaseAndEq(RVAR) EVT_CMD(EVT_OP_CASE_AND_EQ, RVAR), /// Marks the start of a switch case that executes only if the `RVAR` flag is set on `LVAR`, i.e. `(LVAR & RVAR) != 1`. /// It also marks the end of any previous case. -#define EVT_CASE_FLAG(RVAR) EVT_CMD(EVT_OP_CASE_FLAG, RVAR), +#define CaseFlag(RVAR) EVT_CMD(EVT_OP_CASE_FLAG, RVAR), -/// Marks the end of a switch case group (EVT_CASE_OR_EQ and/or EVT_CASE_AND_EQ), stopping fallthrough. -#define EVT_END_CASE_GROUP EVT_CMD(EVT_OP_END_CASE_GROUP), +/// Marks the end of a switch case group (CaseOrEq and/or CaseAndEq), stopping fallthrough. +#define EndCaseGroup EVT_CMD(EVT_OP_END_CASE_GROUP), /// Marks the start of a switch case that executes only if `MIN <= LVAR <= MAX` (inclusive). /// It also marks the end of any previous case. -#define EVT_CASE_RANGE(MIN, MAX) EVT_CMD(EVT_OP_CASE_RANGE, MIN, MAX), +#define CaseRange(MIN, MAX) EVT_CMD(EVT_OP_CASE_RANGE, MIN, MAX), /// Marks the end of a switch case -#define EVT_BREAK_SWITCH EVT_CMD(EVT_OP_BREAK_SWITCH), +#define BreakSwitch EVT_CMD(EVT_OP_BREAK_SWITCH), /// Marks the end of a switch statement and any case. -#define EVT_END_SWITCH EVT_CMD(EVT_OP_END_SWITCH), +#define EndSwitch EVT_CMD(EVT_OP_END_SWITCH), /// Sets the given variable to a given value casted to an integer. -#define EVT_SET(VAR, INT_VALUE) EVT_CMD(EVT_OP_SET, VAR, (Bytecode) INT_VALUE), +#define Set(VAR, INT_VALUE) EVT_CMD(EVT_OP_SET, VAR, (Bytecode) INT_VALUE), /// Sets the given variable to a given value, skipping the evt_get_variable call. -/// That is, `EVT_SET_CONST(LocalVar(0), LocalVar(1))` will set `LocalVar(0)` to `0xFE363C81` instead of copying the value of +/// That is, `SetConst(LocalVar(0), LocalVar(1))` will set `LocalVar(0)` to `0xFE363C81` instead of copying the value of /// `LocalVar(1)` into `LocalVar(0)`. -#define EVT_SET_CONST(VAR, CONST) EVT_CMD(EVT_OP_SET_CONST, VAR, (Bytecode) CONST), +#define SetConst(VAR, CONST) EVT_CMD(EVT_OP_SET_CONST, VAR, (Bytecode) CONST), -/// Sets the given variable to a given value, but supports EVT_FLOATs. -#define EVT_SETF(VAR, FLOAT_VALUE) EVT_CMD(EVT_OP_SETF, VAR, FLOAT_VALUE), +/// Sets the given variable to a given value, but supports Floats. +#define SetF(VAR, FLOAT_VALUE) EVT_CMD(EVT_OP_SETF, VAR, FLOAT_VALUE), // Basic arithmetic operations. -#define EVT_ADD(VAR, INT_VALUE) EVT_CMD(EVT_OP_ADD, VAR, INT_VALUE), -#define EVT_SUB(VAR, INT_VALUE) EVT_CMD(EVT_OP_SUB, VAR, INT_VALUE), -#define EVT_MUL(VAR, INT_VALUE) EVT_CMD(EVT_OP_MUL, VAR, INT_VALUE), -#define EVT_DIV(VAR, INT_VALUE) EVT_CMD(EVT_OP_DIV, VAR, INT_VALUE), -#define EVT_MOD(VAR, INT_VALUE) EVT_CMD(EVT_OP_MOD, VAR, INT_VALUE), +#define Add(VAR, INT_VALUE) EVT_CMD(EVT_OP_ADD, VAR, INT_VALUE), +#define Sub(VAR, INT_VALUE) EVT_CMD(EVT_OP_SUB, VAR, INT_VALUE), +#define Mul(VAR, INT_VALUE) EVT_CMD(EVT_OP_MUL, VAR, INT_VALUE), +#define Div(VAR, INT_VALUE) EVT_CMD(EVT_OP_DIV, VAR, INT_VALUE), +#define Mod(VAR, INT_VALUE) EVT_CMD(EVT_OP_MOD, VAR, INT_VALUE), // Basic floating-point arithmetic operations. -#define EVT_ADDF(VAR, FLOAT_VALUE) EVT_CMD(EVT_OP_ADDF, VAR, FLOAT_VALUE), -#define EVT_SUBF(VAR, FLOAT_VALUE) EVT_CMD(EVT_OP_SUBF, VAR, FLOAT_VALUE), -#define EVT_MULF(VAR, FLOAT_VALUE) EVT_CMD(EVT_OP_MULF, VAR, FLOAT_VALUE), -#define EVT_DIVF(VAR, FLOAT_VALUE) EVT_CMD(EVT_OP_DIVF, VAR, FLOAT_VALUE), +#define AddF(VAR, FLOAT_VALUE) EVT_CMD(EVT_OP_ADDF, VAR, FLOAT_VALUE), +#define SubF(VAR, FLOAT_VALUE) EVT_CMD(EVT_OP_SUBF, VAR, FLOAT_VALUE), +#define MulF(VAR, FLOAT_VALUE) EVT_CMD(EVT_OP_MULF, VAR, FLOAT_VALUE), +#define DivF(VAR, FLOAT_VALUE) EVT_CMD(EVT_OP_DIVF, VAR, FLOAT_VALUE), /// Loads a s32 pointer for use with subsequent EVT_BUF_READ commands. -#define EVT_USE_BUF(INT_PTR) EVT_CMD(EVT_OP_USE_BUF, (Bytecode) INT_PTR), +#define UseBuf(INT_PTR) EVT_CMD(EVT_OP_USE_BUF, (Bytecode) INT_PTR), /// Consumes the next s32 from the buffer and stores it in the given variable. -#define EVT_BUF_READ1(VAR) EVT_CMD(EVT_OP_BUF_READ1, VAR), +#define BufRead1(VAR) EVT_CMD(EVT_OP_BUF_READ1, VAR), /// Consumes the next two s32s from the buffer and stores them in the given variables. -#define EVT_BUF_READ2(VAR1, VAR2) EVT_CMD(EVT_OP_BUF_READ2, VAR1, VAR2), +#define BufRead2(VAR1, VAR2) EVT_CMD(EVT_OP_BUF_READ2, VAR1, VAR2), /// Consumes the next three s32s from the buffer and stores them in the given variables. -#define EVT_BUF_READ3(VAR1, VAR2, VAR3) EVT_CMD(EVT_OP_BUF_READ3, VAR1, VAR2, VAR3), +#define BufRead3(VAR1, VAR2, VAR3) EVT_CMD(EVT_OP_BUF_READ3, VAR1, VAR2, VAR3), /// Consumes the next four s32s from the buffer and stores them in the given variables. -#define EVT_BUF_READ4(VAR1, VAR2, VAR3, VAR4) EVT_CMD(EVT_OP_BUF_READ4, VAR1, VAR2, VAR3, VAR4), +#define BufRead4(VAR1, VAR2, VAR3, VAR4) EVT_CMD(EVT_OP_BUF_READ4, VAR1, VAR2, VAR3, VAR4), /// Gets the s32 at the given offset of the buffer and stores it in the given variable, without consuming it. -#define EVT_BUF_PEEK(OFFSET, VAR) EVT_CMD(EVT_OP_BUF_PEEK, OFFSET, VAR), +#define BufPeek(OFFSET, VAR) EVT_CMD(EVT_OP_BUF_PEEK, OFFSET, VAR), -/// Identical to EVT_USE_BUF. Beware that the int buffer and the float buffer are not distinct. -#define EVT_USE_FBUF(FLOAT_PTR) EVT_CMD(EVT_OP_USE_FBUF, (Bytecode) FLOAT_PTR), +/// Identical to UseBuf. Beware that the int buffer and the float buffer are not distinct. +#define UseFBuf(FLOAT_PTR) EVT_CMD(EVT_OP_USE_FBUF, (Bytecode) FLOAT_PTR), /// Consumes the next f32 from the buffer and stores it in the given variable. -#define EVT_FBUF_READ1(VAR) EVT_CMD(EVT_OP_FBUF_READ1, VAR), +#define FBufRead1(VAR) EVT_CMD(EVT_OP_FBUF_READ1, VAR), /// Consumes the next two f32s from the buffer and stores them in the given variables. -#define EVT_FBUF_READ2(VAR1, VAR2) EVT_CMD(EVT_OP_FBUF_READ2, VAR1, VAR2), +#define FBufRead2(VAR1, VAR2) EVT_CMD(EVT_OP_FBUF_READ2, VAR1, VAR2), /// Consumes the next three f32s from the buffer and stores them in the given variables. -#define EVT_FBUF_READ3(VAR1, VAR2, VAR3) EVT_CMD(EVT_OP_FBUF_READ3, VAR1, VAR2, VAR3), +#define FBufRead3(VAR1, VAR2, VAR3) EVT_CMD(EVT_OP_FBUF_READ3, VAR1, VAR2, VAR3), /// Consumes the next four f32s from the buffer and stores them in the given variables. -#define EVT_FBUF_READ4(VAR1, VAR2, VAR3, VAR4) EVT_CMD(EVT_OP_FBUF_READ4, VAR1, VAR2, VAR3, VAR4), +#define FBufRead4(VAR1, VAR2, VAR3, VAR4) EVT_CMD(EVT_OP_FBUF_READ4, VAR1, VAR2, VAR3, VAR4), /// Gets the f32 at the given offset of the buffer and stores it in the given variable, without consuming it. -#define EVT_FBUF_PEEK(OFFSET, VAR) EVT_CMD(EVT_OP_FBUF_PEEK, OFFSET, VAR), +#define FBufPeek(OFFSET, VAR) EVT_CMD(EVT_OP_FBUF_PEEK, OFFSET, VAR), /// Loads an s32 array pointer into the current thread for use with `ArrayVar(INDEX)`. -#define EVT_USE_ARRAY(INT_PTR) EVT_CMD(EVT_OP_USE_ARRAY, (Bytecode) INT_PTR), +#define UseArray(INT_PTR) EVT_CMD(EVT_OP_USE_ARRAY, (Bytecode) INT_PTR), /// Loads an s32 array pointer into the current thread for use with `UF(INDEX)`. /// Flags are stored in a 'packed' structure where indices refer to bits. -#define EVT_USE_FLAG_ARRAY(PACKED_FLAGS_PTR) EVT_CMD(EVT_OP_USE_FLAG_ARRAY, (Bytecode) PACKED_FLAGS_PTR), +#define UseFlagArray(PACKED_FLAGS_PTR) EVT_CMD(EVT_OP_USE_FLAG_ARRAY, (Bytecode) PACKED_FLAGS_PTR), /// Allocates a new array of the given size for use with `ArrayVar(INDEX)`. /// EVT scripts do not have to worry about freeing this array. -#define EVT_MALLOC_ARRAY(SIZE, OUT_PTR_VAR) EVT_CMD(EVT_OP_MALLOC_ARRAY, SIZE, OUT_PTR_VAR), +#define MallocArray(SIZE, OUT_PTR_VAR) EVT_CMD(EVT_OP_MALLOC_ARRAY, SIZE, OUT_PTR_VAR), /// `VAR &= VALUE` -#define EVT_BITWISE_AND(VAR, VALUE) EVT_CMD(EVT_OP_BITWISE_AND, VAR, VALUE), +#define BitwiseAnd(VAR, VALUE) EVT_CMD(EVT_OP_BITWISE_AND, VAR, VALUE), /// `VAR &= CONST`, but CONST is treated as-is rather than dereferenced with evt_get_variable. -#define EVT_BITWISE_AND_CONST(VAR, CONST) EVT_CMD(EVT_OP_BITWISE_AND_CONST, VAR, CONST), +#define BitwiseAndConst(VAR, CONST) EVT_CMD(EVT_OP_BITWISE_AND_CONST, VAR, CONST), /// `VAR |= VALUE` -#define EVT_BITWISE_OR(VAR, VALUE) EVT_CMD(EVT_OP_BITWISE_OR, VAR, VALUE), +#define BitwiseOr(VAR, VALUE) EVT_CMD(EVT_OP_BITWISE_OR, VAR, VALUE), /// `VAR |= CONST`, but CONST is treated as-is rather than dereferenced with evt_get_variable. -#define EVT_BITWISE_OR_CONST(VAR, CONST) EVT_CMD(EVT_OP_BITWISE_OR_CONST, VAR, CONST), +#define BitwiseOrConst(VAR, CONST) EVT_CMD(EVT_OP_BITWISE_OR_CONST, VAR, CONST), /// Launches a new thread. /// The following values are copied from the current thread to the new thread: @@ -464,12 +464,12 @@ /// - Flag array pointer /// - Priority /// - Group -#define EVT_EXEC(EVT_SOURCE) EVT_CMD(EVT_OP_EXEC, (Bytecode) EVT_SOURCE), +#define Exec(EVT_SOURCE) EVT_CMD(EVT_OP_EXEC, (Bytecode) EVT_SOURCE), -/// Identical to EVT_EXEC, but the newly-launched thread ID is stored in OUTVAR. -/// The other thread may be interacted with using EVT_KILL_THREAD, EVT_SUSPEND_THREAD, EVT_RESUME_THREAD, and -/// EVT_IS_THREAD_RUNNING. -#define EVT_EXEC_GET_TID(EVT_SOURCE, OUTVAR) EVT_CMD(EVT_OP_EXEC_GET_TID, (Bytecode) EVT_SOURCE, OUTVAR), +/// Identical to Exec, but the newly-launched thread ID is stored in OUTVAR. +/// The other thread may be interacted with using KillThread, SuspendThread, ResumeThread, and +/// IsThreadRunning. +#define ExecGetTID(EVT_SOURCE, OUTVAR) EVT_CMD(EVT_OP_EXEC_GET_TID, (Bytecode) EVT_SOURCE, OUTVAR), /// Launches a new child thread. /// Blocks for at least one frame unless the child thread is made to have a higher priority than the parent. @@ -483,8 +483,8 @@ /// - Group /// /// Child threads are killed, suspended, and resumed as their parents are, for example, a different thread using -/// EVT_KILL_THREAD to kill a parent thread would also kill its child thread(s) launched by this command. -#define EVT_EXEC_WAIT(EVT_SOURCE) EVT_CMD(EVT_OP_EXEC_WAIT, (Bytecode) EVT_SOURCE), +/// KillThread to kill a parent thread would also kill its child thread(s) launched by this command. +#define ExecWait(EVT_SOURCE) EVT_CMD(EVT_OP_EXEC_WAIT, (Bytecode) EVT_SOURCE), /// Sets up a script to launch when a particular event is triggered. /// @@ -508,71 +508,71 @@ /// - Pointer to a Vec3f (for TRIGGER_POINT_BOMB only) /// /// Only one thread will run for a trigger at once. -#define EVT_BIND_TRIGGER(EVT_SOURCE, TRIGGER, COLLIDER_ID, UNK_A3, TRIGGER_PTR_OUTVAR) \ +#define BindTrigger(EVT_SOURCE, TRIGGER, COLLIDER_ID, UNK_A3, TRIGGER_PTR_OUTVAR) \ EVT_CMD(EVT_OP_BIND_TRIGGER, (Bytecode) EVT_SOURCE, TRIGGER, (Bytecode) COLLIDER_ID, UNK_A3, TRIGGER_PTR_OUTVAR), -/// Similar to EVT_BIND_TRIGGER, but also takes arguments for the item list to show. -#define EVT_BIND_PADLOCK(EVT_SOURCE, TRIGGER, COLLIDER_ID, ITEM_LIST, UNK_A3, TRIGGER_PTR_OUTVAR) \ +/// Similar to BindTrigger, but also takes arguments for the item list to show. +#define BindPadlock(EVT_SOURCE, TRIGGER, COLLIDER_ID, ITEM_LIST, UNK_A3, TRIGGER_PTR_OUTVAR) \ EVT_CMD(EVT_OP_BIND_PADLOCK, (Bytecode) EVT_SOURCE, TRIGGER, COLLIDER_ID, (Bytecode) ITEM_LIST, UNK_A3, TRIGGER_PTR_OUTVAR), /// Unbinds the current thread from the trigger it was bound to, if any. -#define EVT_UNBIND EVT_CMD(EVT_OP_UNBIND), +#define Unbind EVT_CMD(EVT_OP_UNBIND), /// Kills a thread by its thread ID. -#define EVT_KILL_THREAD(TID) EVT_CMD(EVT_OP_KILL_THREAD, TID), +#define KillThread(TID) EVT_CMD(EVT_OP_KILL_THREAD, TID), /// Sets the current thread's priority. Higher-priority threads execute before lower-priority threads on each frame. -#define EVT_SET_PRIORITY(PRIORITY) EVT_CMD(EVT_OP_SET_PRIORITY, PRIORITY), +#define SetPriority(PRIORITY) EVT_CMD(EVT_OP_SET_PRIORITY, PRIORITY), -/// Sets the current thread's timescale. This is a multiplier applied to EVT_WAIT and EVT_WAIT_SECONDS. -#define EVT_SET_TIMESCALE(TIMESCALE) EVT_CMD(EVT_OP_SET_TIMESCALE, TIMESCALE), +/// Sets the current thread's timescale. This is a multiplier applied to Wait and Wait_SECONDS. +#define SetTimescale(TIMESCALE) EVT_CMD(EVT_OP_SET_TIMESCALE, TIMESCALE), /// Sets the current thread's group. Group value meanings are currently not known. -#define EVT_SET_GROUP(GROUP) EVT_CMD(EVT_OP_SET_GROUP, GROUP), +#define SetGroup(GROUP) EVT_CMD(EVT_OP_SET_GROUP, GROUP), /// Suspends all threads in a group. -#define EVT_SUSPEND_GROUP(GROUP) EVT_CMD(EVT_OP_SUSPEND_GROUP, GROUP), +#define SuspendGroup(GROUP) EVT_CMD(EVT_OP_SUSPEND_GROUP, GROUP), /// Resumes all threads in a group. -#define EVT_RESUME_GROUP(GROUP) EVT_CMD(EVT_OP_RESUME_GROUP, GROUP), +#define ResumeGroup(GROUP) EVT_CMD(EVT_OP_RESUME_GROUP, GROUP), /// Suspends all threads in a group, except the current thread. -#define EVT_SUSPEND_OTHERS(GROUP) EVT_CMD(EVT_OP_SUSPEND_OTHERS, GROUP), +#define SuspendOthers(GROUP) EVT_CMD(EVT_OP_SUSPEND_OTHERS, GROUP), /// Resumes all threads in a group, except the current thread. -#define EVT_RESUME_OTHERS(GROUP) EVT_CMD(EVT_OP_RESUME_OTHERS, GROUP), +#define ResumeOthers(GROUP) EVT_CMD(EVT_OP_RESUME_OTHERS, GROUP), /// Suspends all threads in a group, except the current thread. -#define EVT_SUSPEND_THREAD(TID) EVT_CMD(EVT_OP_SUSPEND_THREAD, TID), +#define SuspendThread(TID) EVT_CMD(EVT_OP_SUSPEND_THREAD, TID), /// Resumes a thread by its thread ID. -#define EVT_RESUME_THREAD(TID) EVT_CMD(EVT_OP_RESUME_THREAD, TID), +#define ResumeThread(TID) EVT_CMD(EVT_OP_RESUME_THREAD, TID), /// Sets OUTVAR to TRUE/FALSE depending on whether a thread with the given ID exists (i.e. has not been killed). -#define EVT_IS_THREAD_RUNNING(TID, OUTVAR) EVT_CMD(EVT_OP_IS_THREAD_RUNNING, TID, OUTVAR), +#define IsThreadRunning(TID, OUTVAR) EVT_CMD(EVT_OP_IS_THREAD_RUNNING, TID, OUTVAR), -/// Marks the start of a thread block. Commands between this and a matching EVT_END_THREAD +/// Marks the start of a thread block. Commands between this and a matching EndThread /// will be executed on their own, new thread instead of on the current thread. -#define EVT_THREAD EVT_CMD(EVT_OP_THREAD), +#define Thread EVT_CMD(EVT_OP_THREAD), /// Marks the end of a thread block. -#define EVT_END_THREAD EVT_CMD(EVT_OP_END_THREAD), +#define EndThread EVT_CMD(EVT_OP_END_THREAD), -/// Marks the start of a child thread block. Commands between this and a matching EVT_END_CHILD_THREAD +/// Marks the start of a child thread block. Commands between this and a matching EndChildThread /// will be executed as a new child thread instead of on the current thread. /// /// Child threads are killed if the parent thread dies, so the following script does NOT set the player's position: /// -/// EVT_CHILD_THREAD -/// EVT_WAIT_SECONDS(1) // child thread will be killed whilst waiting -/// EVT_CALL(SetPlayerPos, NPC_DISPOSE_LOCATION) // will not be executed -/// EVT_END_CHILD_THREAD -/// EVT_RETURN // parent thread dies +/// ChildThread +/// Wait_SECONDS(1) // child thread will be killed whilst waiting +/// Call(SetPlayerPos, NPC_DISPOSE_LOCATION) // will not be executed +/// EndChildThread +/// Return // parent thread dies /// -#define EVT_CHILD_THREAD EVT_CMD(EVT_OP_CHILD_THREAD), +#define ChildThread EVT_CMD(EVT_OP_CHILD_THREAD), /// Marks the end of a child thread block. -#define EVT_END_CHILD_THREAD EVT_CMD(EVT_OP_END_CHILD_THREAD), +#define EndChildThread EVT_CMD(EVT_OP_END_CHILD_THREAD), /// Calls a given C EVT API function with any number of arguments. /// @@ -582,16 +582,16 @@ /// /// This function could then be called with the following command: /// -/// EVT_CALL(ApiFunction) +/// Call(ApiFunction) /// /// The given arguments can be accessed from the API function using `thread->ptrReadPos`. -#define EVT_CALL(FUNC, ARGS...) EVT_CMD(EVT_OP_CALL, (Bytecode) FUNC, ##ARGS), +#define Call(FUNC, ARGS...) EVT_CMD(EVT_OP_CALL, (Bytecode) FUNC, ##ARGS), /// Does nothing in release version #define EVT_DEBUG_LOG(STRING) EVT_CMD(EVT_OP_DEBUG_LOG, STRING), /// Prints variable name and value -#define EVT_DEBUG_PRINT_VAR(VAR) EVT_CMD(EVT_OP_DEBUG_PRINT_VAR, VAR), +#define DebugPrintVar(VAR) EVT_CMD(EVT_OP_DEBUG_PRINT_VAR, VAR), /****** VECTOR OPERATIONS *********************************************************************************************/ @@ -622,146 +622,146 @@ OPERATION(MUT_BASE + 1, AMT_BASE + 1) \ OPERATION(MUT_BASE + 2, AMT_BASE + 2) -#define EVT_VEC2I_SET(baseVar, x, y) EVT_VEC2_OP(EVT_SET, baseVar, x, y) -#define EVT_VEC2F_SET(baseVar, x, y) EVT_VEC2_OP(EVT_SETF, baseVar, x, y) -#define EVT_VEC3I_SET(baseVar, x, y, z) EVT_VEC3_OP(EVT_SET, baseVar, x, y, z) -#define EVT_VEC3F_SET(baseVar, x, y, z) EVT_VEC3_OP(EVT_SETF, baseVar, x, y, z) +#define EVT_VEC2I_SET(baseVar, x, y) EVT_VEC2_OP(Set, baseVar, x, y) +#define EVT_VEC2F_SET(baseVar, x, y) EVT_VEC2_OP(SetF, baseVar, x, y) +#define EVT_VEC3I_SET(baseVar, x, y, z) EVT_VEC3_OP(Set, baseVar, x, y, z) +#define EVT_VEC3F_SET(baseVar, x, y, z) EVT_VEC3_OP(SetF, baseVar, x, y, z) -#define EVT_VEC2I_VSET(baseVar, baseSrc) EVT_VEC2_VOP(EVT_SET, baseVar, baseSrc) -#define EVT_VEC2F_VSET(baseVar, baseSrc) EVT_VEC2_VOP(EVT_SETF, baseVar, baseSrc) -#define EVT_VEC3I_VSET(baseVar, baseSrc) EVT_VEC3_VOP(EVT_SET, baseVar, baseSrc) -#define EVT_VEC3F_VSET(baseVar, baseSrc) EVT_VEC3_VOP(EVT_SETF, baseVar, baseSrc) +#define EVT_VEC2I_VSET(baseVar, baseSrc) EVT_VEC2_VOP(Set, baseVar, baseSrc) +#define EVT_VEC2F_VSET(baseVar, baseSrc) EVT_VEC2_VOP(SetF, baseVar, baseSrc) +#define EVT_VEC3I_VSET(baseVar, baseSrc) EVT_VEC3_VOP(Set, baseVar, baseSrc) +#define EVT_VEC3F_VSET(baseVar, baseSrc) EVT_VEC3_VOP(SetF, baseVar, baseSrc) -#define EVT_VEC2I_ADD(baseVar, x, y) EVT_VEC2_OP(EVT_ADD, baseVar, x, y) -#define EVT_VEC2F_ADD(baseVar, x, y) EVT_VEC2_OP(EVT_ADDF, baseVar, x, y) -#define EVT_VEC3I_ADD(baseVar, x, y, z) EVT_VEC3_OP(EVT_ADD, baseVar, x, y, z) -#define EVT_VEC3F_ADD(baseVar, x, y, z) EVT_VEC3_OP(EVT_ADDF, baseVar, x, y, z) +#define EVT_VEC2I_ADD(baseVar, x, y) EVT_VEC2_OP(Add, baseVar, x, y) +#define EVT_VEC2F_ADD(baseVar, x, y) EVT_VEC2_OP(AddF, baseVar, x, y) +#define EVT_VEC3I_ADD(baseVar, x, y, z) EVT_VEC3_OP(Add, baseVar, x, y, z) +#define EVT_VEC3F_ADD(baseVar, x, y, z) EVT_VEC3_OP(AddF, baseVar, x, y, z) -#define EVT_VEC2I_VADD(baseVar, baseAmt) EVT_VEC2_VOP(EVT_ADD, baseVar, baseAmt) -#define EVT_VEC2F_VADD(baseVar, baseAmt) EVT_VEC2_VOP(EVT_ADDF, baseVar, baseAmt) -#define EVT_VEC3I_VADD(baseVar, baseAmt) EVT_VEC3_VOP(EVT_ADD, baseVar, baseAmt) -#define EVT_VEC3F_VADD(baseVar, baseAmt) EVT_VEC3_VOP(EVT_ADDF, baseVar, baseAmt) +#define EVT_VEC2I_VADD(baseVar, baseAmt) EVT_VEC2_VOP(Add, baseVar, baseAmt) +#define EVT_VEC2F_VADD(baseVar, baseAmt) EVT_VEC2_VOP(AddF, baseVar, baseAmt) +#define EVT_VEC3I_VADD(baseVar, baseAmt) EVT_VEC3_VOP(Add, baseVar, baseAmt) +#define EVT_VEC3F_VADD(baseVar, baseAmt) EVT_VEC3_VOP(AddF, baseVar, baseAmt) -#define EVT_VEC2I_SUB(baseVar, x, y) EVT_VEC2_OP(EVT_SUB, baseVar, x, y) -#define EVT_VEC2F_SUB(baseVar, x, y) EVT_VEC2_OP(EVT_SUBF, baseVar, x, y) -#define EVT_VEC3I_SUB(baseVar, x, y, z) EVT_VEC3_OP(EVT_SUB, baseVar, x, y, z) -#define EVT_VEC3F_SUB(baseVar, x, y, z) EVT_VEC3_OP(EVT_SUBF, baseVar, x, y, z) +#define EVT_VEC2I_SUB(baseVar, x, y) EVT_VEC2_OP(Sub, baseVar, x, y) +#define EVT_VEC2F_SUB(baseVar, x, y) EVT_VEC2_OP(SubF, baseVar, x, y) +#define EVT_VEC3I_SUB(baseVar, x, y, z) EVT_VEC3_OP(Sub, baseVar, x, y, z) +#define EVT_VEC3F_SUB(baseVar, x, y, z) EVT_VEC3_OP(SubF, baseVar, x, y, z) -#define EVT_VEC2I_VSUB(baseVar, baseAmt) EVT_VEC2_VOP(EVT_SUB, baseVar, baseAmt) -#define EVT_VEC2F_VSUB(baseVar, baseAmt) EVT_VEC2_VOP(EVT_SUBF, baseVar, baseAmt) -#define EVT_VEC3I_VSUB(baseVar, baseAmt) EVT_VEC3_VOP(EVT_SUB, baseVar, baseAmt) -#define EVT_VEC3F_VSUB(baseVar, baseAmt) EVT_VEC3_VOP(EVT_SUBF, baseVar, baseAmt) +#define EVT_VEC2I_VSUB(baseVar, baseAmt) EVT_VEC2_VOP(Sub, baseVar, baseAmt) +#define EVT_VEC2F_VSUB(baseVar, baseAmt) EVT_VEC2_VOP(SubF, baseVar, baseAmt) +#define EVT_VEC3I_VSUB(baseVar, baseAmt) EVT_VEC3_VOP(Sub, baseVar, baseAmt) +#define EVT_VEC3F_VSUB(baseVar, baseAmt) EVT_VEC3_VOP(SubF, baseVar, baseAmt) /****** COMMON SCRIPTS ************************************************************************************************/ -#define EVT_IF_TRUE(b) EVT_IF_NE(b, 0) -#define EVT_IF_FALSE(b) EVT_IF_EQ(b, 0) +#define IfTrue(b) IfNe(b, 0) +#define IfFalse(b) IfEq(b, 0) #define EVT_EXIT_WALK(walkDistance, exitIdx, map, entryIdx) \ { \ - EVT_SET_GROUP(EVT_GROUP_1B) \ - EVT_CALL(UseExitHeading, walkDistance, exitIdx) \ - EVT_EXEC(ExitWalk) \ - EVT_CALL(GotoMap, EVT_PTR(map), entryIdx) \ - EVT_WAIT(100) \ - EVT_RETURN \ - EVT_END \ + SetGroup(EVT_GROUP_1B) \ + Call(UseExitHeading, walkDistance, exitIdx) \ + Exec(ExitWalk) \ + Call(GotoMap, Ref(map), entryIdx) \ + Wait(100) \ + Return \ + End \ } // alternate version of EVT_EXIT_WALK used on Pleasant Path which does not join EVT_GROUP_1B #define EVT_EXIT_WALK_NOK(walkDistance, exitIdx, map, entryIdx) \ { \ - EVT_CALL(UseExitHeading, walkDistance, exitIdx) \ - EVT_EXEC(ExitWalk) \ - EVT_CALL(GotoMap, EVT_PTR(map), entryIdx) \ - EVT_WAIT(100) \ - EVT_RETURN \ - EVT_END \ + Call(UseExitHeading, walkDistance, exitIdx) \ + Exec(ExitWalk) \ + Call(GotoMap, Ref(map), entryIdx) \ + Wait(100) \ + Return \ + End \ } // alternate version of EVT_EXIT_WALK which includes a call to DisablePlayerInput #define EVT_EXIT_WALK_FIXED(walkDistance, exitIdx, map, entryIdx) \ { \ - EVT_SET_GROUP(EVT_GROUP_1B) \ - EVT_CALL(DisablePlayerInput, TRUE) \ - EVT_CALL(UseExitHeading, walkDistance, exitIdx) \ - EVT_EXEC(ExitWalk) \ - EVT_CALL(GotoMap, EVT_PTR(map), entryIdx) \ - EVT_WAIT(100) \ - EVT_RETURN \ - EVT_END \ + SetGroup(EVT_GROUP_1B) \ + Call(DisablePlayerInput, TRUE) \ + Call(UseExitHeading, walkDistance, exitIdx) \ + Exec(ExitWalk) \ + Call(GotoMap, Ref(map), entryIdx) \ + Wait(100) \ + Return \ + End \ } #define EVT_EXIT_SINGLE_DOOR(exitIdx, map, entryIdx, colliderID, modelID, swingDir) \ { \ - EVT_SET_GROUP(EVT_GROUP_1B) \ - EVT_CALL(DisablePlayerInput, TRUE) \ - EVT_SET(LVar0, exitIdx) \ - EVT_SET(LVar1, colliderID) \ - EVT_SET(LVar2, modelID) \ - EVT_SET(LVar3, swingDir) \ - EVT_EXEC(ExitSingleDoor) \ - EVT_WAIT(17) \ - EVT_CALL(GotoMap, EVT_PTR(map), entryIdx) \ - EVT_WAIT(100) \ - EVT_RETURN \ - EVT_END \ + SetGroup(EVT_GROUP_1B) \ + Call(DisablePlayerInput, TRUE) \ + Set(LVar0, exitIdx) \ + Set(LVar1, colliderID) \ + Set(LVar2, modelID) \ + Set(LVar3, swingDir) \ + Exec(ExitSingleDoor) \ + Wait(17) \ + Call(GotoMap, Ref(map), entryIdx) \ + Wait(100) \ + Return \ + End \ } #define EVT_EXIT_SPLIT_SINGLE_DOOR(exitIdx, map, entryIdx, colliderID, topModelID, bottomModelID, swingDir) \ { \ - EVT_SET_GROUP(EVT_GROUP_1B) \ - EVT_CALL(DisablePlayerInput, TRUE) \ - EVT_SET(LVar0, exitIdx) \ - EVT_SET(LVar1, colliderID) \ - EVT_SET(LVar2, topModelID) \ - EVT_SET(LVar4, bottomModelID) \ - EVT_SET(LVar3, swingDir) \ - EVT_EXEC(ExitSplitSingleDoor) \ - EVT_WAIT(17) \ - EVT_CALL(GotoMap, EVT_PTR(map), entryIdx) \ - EVT_WAIT(100) \ - EVT_RETURN \ - EVT_END \ + SetGroup(EVT_GROUP_1B) \ + Call(DisablePlayerInput, TRUE) \ + Set(LVar0, exitIdx) \ + Set(LVar1, colliderID) \ + Set(LVar2, topModelID) \ + Set(LVar4, bottomModelID) \ + Set(LVar3, swingDir) \ + Exec(ExitSplitSingleDoor) \ + Wait(17) \ + Call(GotoMap, Ref(map), entryIdx) \ + Wait(100) \ + Return \ + End \ } #define EVT_EXIT_DOUBLE_DOOR(exitIdx, map, entryIdx, colliderID, leftDoorModelID, rightDoorModelID) \ { \ - EVT_SET_GROUP(EVT_GROUP_1B) \ - EVT_CALL(DisablePlayerInput, TRUE) \ - EVT_SET(LVar0, exitIdx) \ - EVT_SET(LVar1, colliderID) \ - EVT_SET(LVar2, leftDoorModelID) \ - EVT_SET(LVar3, rightDoorModelID) \ - EVT_EXEC(ExitDoubleDoor) \ - EVT_WAIT(17) \ - EVT_CALL(GotoMap, EVT_PTR(map), entryIdx) \ - EVT_WAIT(100) \ - EVT_RETURN \ - EVT_END \ + SetGroup(EVT_GROUP_1B) \ + Call(DisablePlayerInput, TRUE) \ + Set(LVar0, exitIdx) \ + Set(LVar1, colliderID) \ + Set(LVar2, leftDoorModelID) \ + Set(LVar3, rightDoorModelID) \ + Exec(ExitDoubleDoor) \ + Wait(17) \ + Call(GotoMap, Ref(map), entryIdx) \ + Wait(100) \ + Return \ + End \ } // only set perspective to standard values -#define EVT_SETUP_CAMERA_MINIMAL() \ - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - -#define EVT_SETUP_CAMERA_DEFAULT() \ - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) \ - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) \ - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - -#define EVT_SETUP_CAMERA_NO_LEAD() \ - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) \ - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) \ - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) \ - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - -// same as EVT_SETUP_CAMERA_NO_LEAD with calls reordered -#define EVT_SETUP_CAMERA_ALT_NO_LEAD() \ - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) \ - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) \ - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) \ - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) +#define SetUP_CAMERA_MINIMAL() \ + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + +#define SetUP_CAMERA_DEFAULT() \ + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) \ + Call(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) \ + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + +#define SetUP_CAMERA_NO_LEAD() \ + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) \ + Call(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) \ + Call(SetCamEnabled, CAM_DEFAULT, TRUE) \ + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + +// same as SetUP_CAMERA_NO_LEAD with calls reordered +#define SetUP_CAMERA_ALT_NO_LEAD() \ + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) \ + Call(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) \ + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) \ + Call(SetCamEnabled, CAM_DEFAULT, TRUE) // allow macros with variable number of arguments // see https://stackoverflow.com/questions/11761703/overloading-macro-on-number-of-arguments @@ -790,34 +790,34 @@ #define _VFUNC(name, n) _VFUNC_(name, n) #define VFUNC(func, args...) _VFUNC(func, __NARG__(args)) (args) -#define EVT_PLAY_EFFECT(args...) VFUNC(EVT_PLAY_EFFECT, args) -#define EVT_PLAY_EFFECT1(effect) \ - EVT_CALL(PlayEffect, effect, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) -#define EVT_PLAY_EFFECT2(effect, subtype) \ - EVT_CALL(PlayEffect, effect, subtype, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) -#define EVT_PLAY_EFFECT3(effect, subtype, a) \ - EVT_CALL(PlayEffect, effect, subtype, a, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) -#define EVT_PLAY_EFFECT4(effect, subtype, a, b) \ - EVT_CALL(PlayEffect, effect, subtype, a, b, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) -#define EVT_PLAY_EFFECT5(effect, subtype, a, b, c) \ - EVT_CALL(PlayEffect, effect, subtype, a, b, c, 0, 0, 0, 0, 0, 0, 0, 0, 0) -#define EVT_PLAY_EFFECT6(effect, subtype, a, b, c, d) \ - EVT_CALL(PlayEffect, effect, subtype, a, b, c, d, 0, 0, 0, 0, 0, 0, 0, 0) -#define EVT_PLAY_EFFECT7(effect, subtype, a, b, c, d, e) \ - EVT_CALL(PlayEffect, effect, subtype, a, b, c, d, e, 0, 0, 0, 0, 0, 0, 0) -#define EVT_PLAY_EFFECT8(effect, subtype, a, b, c, d, e, f) \ - EVT_CALL(PlayEffect, effect, subtype, a, b, c, d, e, f, 0, 0, 0, 0, 0, 0) -#define EVT_PLAY_EFFECT9(effect, subtype, a, b, c, d, e, f, g) \ - EVT_CALL(PlayEffect, effect, subtype, a, b, c, d, e, f, g, 0, 0, 0, 0, 0) -#define EVT_PLAY_EFFECT10(effect, subtype, a, b, c, d, e, f, g, h) \ - EVT_CALL(PlayEffect, effect, subtype, a, b, c, d, e, f, g, h, 0, 0, 0, 0) -#define EVT_PLAY_EFFECT11(effect, subtype, a, b, c, d, e, f, g, h, i) \ - EVT_CALL(PlayEffect, effect, subtype, a, b, c, d, e, f, g, h, i, 0, 0, 0) -#define EVT_PLAY_EFFECT12(effect, subtype, a, b, c, d, e, f, g, h, i, j) \ - EVT_CALL(PlayEffect, effect, subtype, a, b, c, d, e, f, g, h, i, j, 0, 0) -#define EVT_PLAY_EFFECT13(effect, subtype, a, b, c, d, e, f, g, h, i, j, k) \ - EVT_CALL(PlayEffect, effect, subtype, a, b, c, d, e, f, g, h, i, j, k, 0) -#define EVT_PLAY_EFFECT14(effect, subtype, a, b, c, d, e, f, g, h, i, j, k, l) \ - EVT_CALL(PlayEffect, effect, subtype, a, b, c, d, e, f, g, h, i, j, k, l) +#define PlayEffect(args...) VFUNC(PlayEffect, args) +#define PlayEffect1(effect) \ + Call(PlayEffect, effect, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) +#define PlayEffect2(effect, subtype) \ + Call(PlayEffect, effect, subtype, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) +#define PlayEffect3(effect, subtype, a) \ + Call(PlayEffect, effect, subtype, a, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) +#define PlayEffect4(effect, subtype, a, b) \ + Call(PlayEffect, effect, subtype, a, b, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) +#define PlayEffect5(effect, subtype, a, b, c) \ + Call(PlayEffect, effect, subtype, a, b, c, 0, 0, 0, 0, 0, 0, 0, 0, 0) +#define PlayEffect6(effect, subtype, a, b, c, d) \ + Call(PlayEffect, effect, subtype, a, b, c, d, 0, 0, 0, 0, 0, 0, 0, 0) +#define PlayEffect7(effect, subtype, a, b, c, d, e) \ + Call(PlayEffect, effect, subtype, a, b, c, d, e, 0, 0, 0, 0, 0, 0, 0) +#define PlayEffect8(effect, subtype, a, b, c, d, e, f) \ + Call(PlayEffect, effect, subtype, a, b, c, d, e, f, 0, 0, 0, 0, 0, 0) +#define PlayEffect9(effect, subtype, a, b, c, d, e, f, g) \ + Call(PlayEffect, effect, subtype, a, b, c, d, e, f, g, 0, 0, 0, 0, 0) +#define PlayEffect10(effect, subtype, a, b, c, d, e, f, g, h) \ + Call(PlayEffect, effect, subtype, a, b, c, d, e, f, g, h, 0, 0, 0, 0) +#define PlayEffect11(effect, subtype, a, b, c, d, e, f, g, h, i) \ + Call(PlayEffect, effect, subtype, a, b, c, d, e, f, g, h, i, 0, 0, 0) +#define PlayEffect12(effect, subtype, a, b, c, d, e, f, g, h, i, j) \ + Call(PlayEffect, effect, subtype, a, b, c, d, e, f, g, h, i, j, 0, 0) +#define PlayEffect13(effect, subtype, a, b, c, d, e, f, g, h, i, j, k) \ + Call(PlayEffect, effect, subtype, a, b, c, d, e, f, g, h, i, j, k, 0) +#define PlayEffect14(effect, subtype, a, b, c, d, e, f, g, h, i, j, k, l) \ + Call(PlayEffect, effect, subtype, a, b, c, d, e, f, g, h, i, j, k, l) #endif diff --git a/src/38F00.c b/src/38F00.c index fd36d3136c9..cde0b3665a6 100644 --- a/src/38F00.c +++ b/src/38F00.c @@ -5,84 +5,84 @@ API_CALLABLE(func_8005DD54); API_CALLABLE(func_8005DDF0); EvtScript EVS_800936C0 = { - EVT_CALL(func_8005DB00) - EVT_RETURN - EVT_END + Call(func_8005DB00) + Return + End }; EvtScript EVS_NpcHitRecoil = { - EVT_CALL(SetNpcAnimation, NPC_SELF, LVar0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar3, LVar2) - EVT_SET(LVar1, LVar3) - EVT_ADD(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_SET(LVar1, LVar3) - EVT_ADD(LVar1, 4) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_SET(LVar1, LVar3) - EVT_ADD(LVar1, 16) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_SET(LVar1, LVar3) - EVT_ADD(LVar1, 8) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_SET(LVar1, LVar3) - EVT_ADD(LVar1, 20) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_SET(LVar1, LVar3) - EVT_ADD(LVar1, 8) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_SET(LVar1, LVar3) - EVT_ADD(LVar1, 12) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_SET(LVar1, LVar3) - EVT_ADD(LVar1, 6) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_SET(LVar1, LVar3) - EVT_ADD(LVar1, 0) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, LVar0) + Call(GetNpcPos, NPC_SELF, LVar0, LVar3, LVar2) + Set(LVar1, LVar3) + Add(LVar1, 1) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + Set(LVar1, LVar3) + Add(LVar1, 4) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + Set(LVar1, LVar3) + Add(LVar1, 16) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + Set(LVar1, LVar3) + Add(LVar1, 8) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + Set(LVar1, LVar3) + Add(LVar1, 20) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + Set(LVar1, LVar3) + Add(LVar1, 8) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + Set(LVar1, LVar3) + Add(LVar1, 12) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + Set(LVar1, LVar3) + Add(LVar1, 6) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + Set(LVar1, LVar3) + Add(LVar1, 0) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + Return + End }; EvtScript D_800939A4 = { - EVT_RETURN - EVT_END + Return + End }; EvtScript D_800939B4 = { - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetSelfVar, 0, 1) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(D_800939A4)) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY | NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING | NPC_FLAG_JUMPING, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, LVar2) - EVT_SET(LVar0, 0) - EVT_LOOP(30) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, LVar0, 0) - EVT_CALL(func_8005DD54) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_COLOR, LVar2, LVar2, LVar2, 0) - EVT_ADD(LVar0, 30) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_COLOR, 255, 255, 255, 0) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, FALSE) - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(func_8005DDF0) - EVT_CALL(BindNpcAI, NPC_SELF, LVar1) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Call(SetSelfVar, 0, 1) + Call(BindNpcAI, NPC_SELF, Ref(D_800939A4)) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY | NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING | NPC_FLAG_JUMPING, FALSE) + Call(SetNpcAnimation, NPC_SELF, LVar2) + Set(LVar0, 0) + Loop(30) + Call(SetNpcRotation, NPC_SELF, 0, LVar0, 0) + Call(func_8005DD54) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_COLOR, LVar2, LVar2, LVar2, 0) + Add(LVar0, 30) + Wait(1) + EndLoop + Call(SetNpcRotation, NPC_SELF, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_COLOR, 255, 255, 255, 0) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, FALSE) + Call(SetSelfVar, 0, 0) + Call(func_8005DDF0) + Call(BindNpcAI, NPC_SELF, LVar1) + EndIf + Return + End }; API_CALLABLE(func_8005DB00) { diff --git a/src/battle/16C8E0.c b/src/battle/16C8E0.c index 29abaeb21ab..d9663cc05df 100644 --- a/src/battle/16C8E0.c +++ b/src/battle/16C8E0.c @@ -51,49 +51,49 @@ HudScript* bHPDigitHudScripts[] = { s32 BattleScreenFadeAmt = 255; EvtScript BtlPutPartnerAway = { - EVT_CALL(DispatchEvent, ACTOR_PARTNER, EVENT_PUT_PARTNER_AWAY) - EVT_CHILD_THREAD - EVT_SETF(LVar0, EVT_FLOAT(1.0)) - EVT_LOOP(10) - EVT_CALL(SetActorScale, ACTOR_PARTNER, LVar0, LVar0, EVT_FLOAT(1.0)) - EVT_SUBF(LVar0, EVT_FLOAT(0.1)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(EnablePartnerBlur) - EVT_CALL(PlaySoundAtActor, 0, SOUND_PARTNER_GET_OUT) - EVT_CALL(GetActorPos, 0, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 25) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 10, 0, 0, 1) - EVT_CALL(DisablePartnerBlur) - EVT_RETURN - EVT_END + Call(DispatchEvent, ACTOR_PARTNER, EVENT_PUT_PARTNER_AWAY) + ChildThread + SetF(LVar0, Float(1.0)) + Loop(10) + Call(SetActorScale, ACTOR_PARTNER, LVar0, LVar0, Float(1.0)) + SubF(LVar0, Float(0.1)) + Wait(1) + EndLoop + EndChildThread + Call(EnablePartnerBlur) + Call(PlaySoundAtActor, 0, SOUND_PARTNER_GET_OUT) + Call(GetActorPos, 0, LVar0, LVar1, LVar2) + Add(LVar1, 25) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.0)) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 10, 0, 0, 1) + Call(DisablePartnerBlur) + Return + End }; EvtScript BtlBringPartnerOut = { - EVT_CHILD_THREAD - EVT_SETF(LVar0, EVT_FLOAT(0.1)) - EVT_LOOP(20) - EVT_CALL(SetActorScale, ACTOR_PARTNER, LVar0, LVar0, EVT_FLOAT(1.0)) - EVT_ADDF(LVar0, EVT_FLOAT(0.05)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_CHILD_THREAD - EVT_CALL(PlaySoundAtActor, 0, SOUND_PARTNER_PUT_AWAY) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.0)) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 20, 0, 0, 1) - EVT_ELSE - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 20, 0, 0, 1) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_RETURN - EVT_END + ChildThread + SetF(LVar0, Float(0.1)) + Loop(20) + Call(SetActorScale, ACTOR_PARTNER, LVar0, LVar0, Float(1.0)) + AddF(LVar0, Float(0.05)) + Wait(1) + EndLoop + Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) + EndChildThread + Call(PlaySoundAtActor, 0, SOUND_PARTNER_PUT_AWAY) + Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.0)) + IfEq(LVar1, 0) + Call(JumpToGoal, ACTOR_PARTNER, 20, 0, 0, 1) + Else + Call(JumpToGoal, ACTOR_PARTNER, 20, 0, 0, 1) + EndIf + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Return + End }; extern HudScript HES_HPBar; diff --git a/src/battle/190B20.c b/src/battle/190B20.c index 139a39e81d1..e3aba6fe25b 100644 --- a/src/battle/190B20.c +++ b/src/battle/190B20.c @@ -7,16 +7,16 @@ #include "sprite.h" EvtScript D_80293820 = { - EVT_WAIT(LVar0) - EVT_LOOP(4) - EVT_CALL(SetBattleCamParam, 4, 11) - EVT_WAIT(1) - EVT_CALL(SetBattleCamParam, 4, 5) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetBattleCamParam, 4, 8) - EVT_RETURN - EVT_END + Wait(LVar0) + Loop(4) + Call(SetBattleCamParam, 4, 11) + Wait(1) + Call(SetBattleCamParam, 4, 5) + Wait(1) + EndLoop + Call(SetBattleCamParam, 4, 8) + Return + End }; f32 D_802938A4 = 0.0f; @@ -3113,71 +3113,71 @@ void show_foreground_models(void) { #include "common/StartRumbleWithParams.inc.c" EvtScript EVS_BattleRumble_Long = { - EVT_CALL(N(StartRumbleWithParams), 256, 30) - EVT_CALL(N(StartRumbleWithParams), 200, 15) - EVT_CALL(N(StartRumbleWithParams), 50, 15) - EVT_RETURN - EVT_END + Call(N(StartRumbleWithParams), 256, 30) + Call(N(StartRumbleWithParams), 200, 15) + Call(N(StartRumbleWithParams), 50, 15) + Return + End }; EvtScript EVS_BattleRumble_HitMin = { - EVT_CALL(N(StartRumbleWithParams), 100, 20) - EVT_RETURN - EVT_END + Call(N(StartRumbleWithParams), 100, 20) + Return + End }; EvtScript EVS_BattleRumble_HitLight = { - EVT_CALL(N(StartRumbleWithParams), 150, 20) - EVT_RETURN - EVT_END + Call(N(StartRumbleWithParams), 150, 20) + Return + End }; EvtScript EVS_BattleRumble_HitHeavy = { - EVT_CALL(N(StartRumbleWithParams), 200, 30) - EVT_RETURN - EVT_END + Call(N(StartRumbleWithParams), 200, 30) + Return + End }; EvtScript EVS_BattleRumble_HitExtreme = { - EVT_CALL(N(StartRumbleWithParams), 256, 40) - EVT_RETURN - EVT_END + Call(N(StartRumbleWithParams), 256, 40) + Return + End }; EvtScript EVS_BattleRumble_HitMax = { - EVT_CALL(N(StartRumbleWithParams), 256, 60) - EVT_RETURN - EVT_END + Call(N(StartRumbleWithParams), 256, 60) + Return + End }; EvtScript EVS_BattleRumble_PlayerMin = { - EVT_CALL(N(StartRumbleWithParams), 100, 20) - EVT_RETURN - EVT_END + Call(N(StartRumbleWithParams), 100, 20) + Return + End }; EvtScript EVS_BattleRumble_PlayerLight = { - EVT_CALL(N(StartRumbleWithParams), 150, 20) - EVT_RETURN - EVT_END + Call(N(StartRumbleWithParams), 150, 20) + Return + End }; EvtScript EVS_BattleRumble_PlayerHeavy = { - EVT_CALL(N(StartRumbleWithParams), 200, 30) - EVT_RETURN - EVT_END + Call(N(StartRumbleWithParams), 200, 30) + Return + End }; EvtScript EVS_BattleRumble_PlayerExtreme = { - EVT_CALL(N(StartRumbleWithParams), 256, 40) - EVT_RETURN - EVT_END + Call(N(StartRumbleWithParams), 256, 40) + Return + End }; EvtScript EVS_BattleRumble_PlayerMax = { - EVT_CALL(N(StartRumbleWithParams), 256, 60) - EVT_RETURN - EVT_END + Call(N(StartRumbleWithParams), 256, 60) + Return + End }; void start_rumble_type(u32 type) { diff --git a/src/battle/area/arn/actor/tubba_blubba.c b/src/battle/area/arn/actor/tubba_blubba.c index a16ad993e1c..70613f89ba4 100644 --- a/src/battle/area/arn/actor/tubba_blubba.c +++ b/src/battle/area/arn/actor/tubba_blubba.c @@ -108,435 +108,435 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused, 0) - EVT_EXEC(N(EVS_PlayFootstepQuaking)) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_Unused, 0) + Exec(N(EVS_PlayFootstepQuaking)) + Return + End }; EvtScript N(EVS_PlayFootstepQuaking) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(ActorExists, ACTOR_SELF, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_IF_EQ(LVar0, ANIM_BattleTubba_Anim06) - EVT_GOTO(1) - EVT_END_IF - EVT_IF_EQ(LVar0, ANIM_BattleTubba_Anim07) - EVT_GOTO(1) - EVT_END_IF - EVT_GOTO(0) - EVT_LABEL(1) - EVT_CALL(StartRumble, BTL_RUMBLE_LONG) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Call(ActorExists, ACTOR_SELF, LVar0) + IfEq(LVar0, FALSE) + Return + EndIf + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Goto(0) + EndIf + Call(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) + IfEq(LVar0, ANIM_BattleTubba_Anim06) + Goto(1) + EndIf + IfEq(LVar0, ANIM_BattleTubba_Anim07) + Goto(1) + EndIf + Goto(0) + Label(1) + Call(StartRumble, BTL_RUMBLE_LONG) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_DummyCheck) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unused, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_Unused, LVar0) + IfEq(LVar0, 0) + Return + EndIf + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_SET(LVar1, ANIM_BattleTubba_Anim01) - EVT_EXEC_WAIT(N(EVS_DummyCheck)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_SET(LVar1, ANIM_BattleTubba_Anim06) - EVT_EXEC_WAIT(N(EVS_DummyCheck)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_SET(LVar1, ANIM_BattleTubba_Anim01) - EVT_EXEC_WAIT(N(EVS_DummyCheck)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_RETURN - EVT_END + Set(LVar1, ANIM_BattleTubba_Anim01) + ExecWait(N(EVS_DummyCheck)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Set(LVar1, ANIM_BattleTubba_Anim06) + ExecWait(N(EVS_DummyCheck)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Set(LVar1, ANIM_BattleTubba_Anim01) + ExecWait(N(EVS_DummyCheck)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) + Call(SetActorYaw, ACTOR_SELF, 0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVarA) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleTubba_Anim14) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleTubba_Anim14) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleTubba_Anim14) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleTubba_Anim14) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleTubba_Anim14) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleTubba_Anim14) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleTubba_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleTubba_Anim14) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleTubba_Anim14) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleTubba_Anim14) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleTubba_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVarA) + Switch(LVarA) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleTubba_Anim14) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleTubba_Anim14) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleTubba_Anim14) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleTubba_Anim14) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SHOCK_HIT) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleTubba_Anim14) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleTubba_Anim14) + ExecWait(EVS_Enemy_Knockback) + ExecWait(N(EVS_ReturnHome)) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleTubba_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_SHOCK_DEATH) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleTubba_Anim14) + ExecWait(EVS_Enemy_ShockHit) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleTubba_Anim14) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleTubba_Anim14) + ExecWait(EVS_Enemy_SpinSmashHit) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleTubba_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 60) - EVT_EXEC_WAIT(N(EVS_Attack_SlamFist)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_BodySlam)) - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(RandInt, 100, LVar0) + IfLt(LVar0, 60) + ExecWait(N(EVS_Attack_SlamFist)) + Else + ExecWait(N(EVS_Attack_BodySlam)) + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_SlamFist) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 150) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_SET(LVar1, ANIM_BattleTubba_Anim06) - EVT_EXEC_WAIT(N(EVS_DummyCheck)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_NOT_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_ELSE - EVT_CALL(AddGoalPos, ACTOR_SELF, 20, 0, 0) - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim15) - EVT_WAIT(8) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_SWIPE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim16) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim17) - EVT_WAIT(3) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, LVar0, LVar1, LVar2, 0, 0) - EVT_THREAD - EVT_CALL(StartRumble, BTL_RUMBLE_LONG) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(15.0)) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) - EVT_END_IF - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SHOCKWAVE, 0, LVar0, 0, LVar2, 0) - EVT_WAIT(30) - EVT_SET(LVar1, ANIM_BattleTubba_Anim01) - EVT_EXEC_WAIT(N(EVS_DummyCheck)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_NOT_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SHOCKWAVE, 1, LVar0, 0, LVar2, 0) - EVT_END_IF - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_IF_NOT_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_CALL(SetDamageSource, DMG_SRC_TUBBA_SMASH) - EVT_END_IF - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, DMG_FIST_POUND, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 200) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(MoveBattleCamOver, 30) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_WAIT(30) - EVT_SET(LVar1, ANIM_BattleTubba_Anim01) - EVT_EXEC_WAIT(N(EVS_DummyCheck)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(YieldTurn) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 150) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Set(LVar1, ANIM_BattleTubba_Anim06) + ExecWait(N(EVS_DummyCheck)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfNotFlag(LVar5, STATUS_FLAG_SHRINK) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Else + Call(AddGoalPos, ACTOR_SELF, 20, 0, 0) + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim15) + Wait(8) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_SWIPE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim16) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim17) + Wait(3) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + PlayEffect(EFFECT_LANDING_DUST, 4, LVar0, LVar1, LVar2, 0, 0) + Thread + Call(StartRumble, BTL_RUMBLE_LONG) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(15.0)) + EndThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) + EndIf + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SHOCKWAVE, 0, LVar0, 0, LVar2, 0) + Wait(30) + Set(LVar1, ANIM_BattleTubba_Anim01) + ExecWait(N(EVS_DummyCheck)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + ExecWait(N(EVS_ReturnHome)) + Return + EndCaseGroup + CaseDefault + EndSwitch + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfNotFlag(LVar5, STATUS_FLAG_SHRINK) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SHOCKWAVE, 1, LVar0, 0, LVar2, 0) + EndIf + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + IfNotFlag(LVar5, STATUS_FLAG_SHRINK) + Call(SetDamageSource, DMG_SRC_TUBBA_SMASH) + EndIf + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, DMG_FIST_POUND, BS_FLAGS1_TRIGGER_EVENTS) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 200) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(MoveBattleCamOver, 30) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Wait(30) + Set(LVar1, ANIM_BattleTubba_Anim01) + ExecWait(N(EVS_DummyCheck)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(YieldTurn) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_Attack_BodySlam) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 150) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_SET(LVar1, ANIM_BattleTubba_Anim06) - EVT_EXEC_WAIT(N(EVS_DummyCheck)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 70, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim0A) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim0B) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_LARGE_ACTOR_JUMP, 0) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_THREAD - EVT_WAIT(12) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim0C) - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 15) - EVT_SET(LVar1, 0) - EVT_ADD(LVar2, 5) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 23, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) - EVT_PLAY_EFFECT(EFFECT_SHOCKWAVE, 0, LVar0, 0, LVar2, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim0D) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(StartRumble, BTL_RUMBLE_LONG) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_END_THREAD - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_ADD(LVar2, 5) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(StartRumble, BTL_RUMBLE_LONG) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim0E) - EVT_WAIT(4) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_THREAD - EVT_WAIT(9) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim0C) - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_END_SWITCH - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_NOT_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_CALL(SetDamageSource, DMG_SRC_CRUSH) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) - EVT_END_IF - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, DMG_BODY_SLAM, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 200) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(MoveBattleCamOver, 30) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_ATK_BLOCKED) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_STONE) - EVT_CALL(LandJump, ACTOR_SELF) - EVT_ELSE - EVT_GOTO(1) - EVT_END_IF - EVT_ELSE - EVT_GOTO(1) - EVT_END_IF - EVT_LABEL(0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SHOCKWAVE, 0, LVar0, 0, LVar2, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim0D) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(StartRumble, BTL_RUMBLE_LONG) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_END_THREAD - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_ADD(LVar2, 5) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(StartRumble, BTL_RUMBLE_LONG) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) - EVT_GOTO(2) - EVT_LABEL(1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_NOT_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_WAIT(3) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SHOCKWAVE, 1, LVar0, 0, LVar2, 0) - EVT_CALL(StartRumble, BTL_RUMBLE_LONG) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_END_IF - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_THREAD - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim0E) - EVT_END_THREAD - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_IF_NOT_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_CALL(StartRumble, BTL_RUMBLE_LONG) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) - EVT_WAIT(8) - EVT_END_IF - EVT_LABEL(2) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(YieldTurn) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 150) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Set(LVar1, ANIM_BattleTubba_Anim06) + ExecWait(N(EVS_DummyCheck)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 70, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim0A) + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim0B) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_LARGE_ACTOR_JUMP, 0) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Thread + Wait(12) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim0C) + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 15) + Set(LVar1, 0) + Add(LVar2, 5) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 23, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) + PlayEffect(EFFECT_SHOCKWAVE, 0, LVar0, 0, LVar2, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim0D) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) + EndThread + Thread + Call(StartRumble, BTL_RUMBLE_LONG) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + EndThread + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Set(LVar1, 0) + Add(LVar2, 5) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(StartRumble, BTL_RUMBLE_LONG) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim0E) + Wait(4) + ExecWait(N(EVS_ReturnHome)) + Return + EndCaseGroup + CaseDefault + Thread + Wait(9) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim0C) + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + EndSwitch + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfNotFlag(LVar5, STATUS_FLAG_SHRINK) + Call(SetDamageSource, DMG_SRC_CRUSH) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) + EndIf + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, DMG_BODY_SLAM, BS_FLAGS1_TRIGGER_EVENTS) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 200) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(MoveBattleCamOver, 30) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfFlag(LVar5, STATUS_FLAG_SHRINK) + Goto(1) + EndIf + Call(GetBattleFlags, LVar0) + IfNotFlag(LVar0, BS_FLAGS1_ATK_BLOCKED) + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_STONE) + Call(LandJump, ACTOR_SELF) + Else + Goto(1) + EndIf + Else + Goto(1) + EndIf + Label(0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SHOCKWAVE, 0, LVar0, 0, LVar2, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim0D) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) + EndThread + Thread + Call(StartRumble, BTL_RUMBLE_LONG) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + EndThread + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Set(LVar1, 0) + Add(LVar2, 5) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(StartRumble, BTL_RUMBLE_LONG) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) + Goto(2) + Label(1) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfNotFlag(LVar5, STATUS_FLAG_SHRINK) + Wait(3) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SHOCKWAVE, 1, LVar0, 0, LVar2, 0) + Call(StartRumble, BTL_RUMBLE_LONG) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + EndIf + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Thread + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim0E) + EndThread + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + IfNotFlag(LVar5, STATUS_FLAG_SHRINK) + Call(StartRumble, BTL_RUMBLE_LONG) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) + Wait(8) + EndIf + Label(2) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(YieldTurn) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_Death) = { - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim14) - EVT_CALL(ActorSpeak, MSG_CH3_00C9, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim14, ANIM_BattleTubba_Anim14) - EVT_SET(LVar0, 1) - EVT_SET(LVar1, ANIM_BattleTubba_Anim14) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim14) + Call(ActorSpeak, MSG_CH3_00C9, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim14, ANIM_BattleTubba_Anim14) + Set(LVar0, 1) + Set(LVar1, ANIM_BattleTubba_Anim14) + ExecWait(EVS_Enemy_Death) + Return + End }; diff --git a/src/battle/area/arn/actor/tubbas_heart.c b/src/battle/area/arn/actor/tubbas_heart.c index be009d6420e..2df857e1b29 100644 --- a/src/battle/area/arn/actor/tubbas_heart.c +++ b/src/battle/area/arn/actor/tubbas_heart.c @@ -150,18 +150,18 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_NextMove_Charge) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ChargeLevel, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Flags, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ChargeTaunt, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ChargedEffectID, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SwarmCount, 0) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetPartTargetFlagBits, ACTOR_SELF, PRT_TARGET, ACTOR_PART_TARGET_NO_SMASH, TRUE) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_NextMove_Charge) + Call(SetActorVar, ACTOR_SELF, AVAR_ChargeLevel, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Flags, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_ChargeTaunt, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_ChargedEffectID, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_SwarmCount, 0) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetPartTargetFlagBits, ACTOR_SELF, PRT_TARGET, ACTOR_PART_TARGET_NO_SMASH, TRUE) + Return + End }; API_CALLABLE(N(UpdateChargeEffectPos)) { @@ -182,459 +182,459 @@ API_CALLABLE(N(UpdateChargeEffectPos)) { } EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(ActorExists, ACTOR_SELF, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChargedEffectID, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar4) - EVT_IF_NOT_FLAG(LVar4, STATUS_FLAG_SHRINK) - EVT_ADD(LVar2, 15) - EVT_SETF(LVar4, EVT_FLOAT(1.0)) - EVT_ELSE - EVT_ADD(LVar2, 6) - EVT_SETF(LVar4, EVT_FLOAT(0.4)) - EVT_END_IF - EVT_CALL(N(UpdateChargeEffectPos), LVar0, LVar1, LVar2, LVar3, LVar4) - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(ActorExists, ACTOR_SELF, LVar0) + IfNe(LVar0, FALSE) + Call(GetActorVar, ACTOR_SELF, AVAR_ChargedEffectID, LVar0) + IfNe(LVar0, 0) + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Call(GetStatusFlags, ACTOR_SELF, LVar4) + IfNotFlag(LVar4, STATUS_FLAG_SHRINK) + Add(LVar2, 15) + SetF(LVar4, Float(1.0)) + Else + Add(LVar2, 6) + SetF(LVar4, Float(0.4)) + EndIf + Call(N(UpdateChargeEffectPos), LVar0, LVar1, LVar2, LVar3, LVar4) + EndIf + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_SelectAnimation) = { - EVT_SET(LVar1, ANIM_TubbasHeart_Anim0E) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChargeLevel, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_SET(LVar1, ANIM_TubbasHeart_Anim0B) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVar1, ANIM_TubbasHeart_Anim0E) + Call(GetActorVar, ACTOR_SELF, AVAR_ChargeLevel, LVar0) + IfNe(LVar0, 0) + Set(LVar1, ANIM_TubbasHeart_Anim0B) + EndIf + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_EXEC_WAIT(N(EVS_SelectAnimation)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CASE_OR_EQ(EVENT_BURN_HIT) - EVT_CASE_OR_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TubbasHeart_Anim10) - EVT_SET_CONST(LVar2, ANIM_TubbasHeart_Anim11) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_EXEC_WAIT(N(EVS_SelectAnimation)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_OR_EQ(EVENT_SHOCK_HIT) - EVT_CASE_OR_EQ(EVENT_SHOCK_DEATH) - EVT_EXEC_WAIT(N(EVS_SelectAnimation)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_EXEC_WAIT(N(EVS_SelectAnimation)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim03) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET(LVar1, ANIM_TubbasHeart_Anim01) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChargeLevel, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_SET(LVar1, ANIM_TubbasHeart_Anim0B) - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_DEATH) - EVT_EXEC_WAIT(N(EVS_SelectAnimation)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_EXEC_WAIT(N(EVS_SelectAnimation)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIKE_CONTACT) - EVT_CASE_EQ(EVENT_BURN_CONTACT) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim03) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TubbasHeart_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_IF_LE(LVar0, 5) - EVT_EXEC_WAIT(N(EVS_FleeFromBattle)) - EVT_RETURN - EVT_ELSE - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + ExecWait(N(EVS_SelectAnimation)) + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + CaseOrEq(EVENT_BURN_HIT) + CaseOrEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TubbasHeart_Anim10) + SetConst(LVar2, ANIM_TubbasHeart_Anim11) + ExecWait(EVS_Enemy_BurnHit) + EndCaseGroup + CaseEq(EVENT_SPIN_SMASH_HIT) + ExecWait(N(EVS_SelectAnimation)) + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseOrEq(EVENT_SHOCK_HIT) + CaseOrEq(EVENT_SHOCK_DEATH) + ExecWait(N(EVS_SelectAnimation)) + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_ShockHit) + ExecWait(N(EVS_SelectAnimation)) + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_Knockback) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim03) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + Set(LVar1, ANIM_TubbasHeart_Anim01) + Call(GetActorVar, ACTOR_SELF, AVAR_ChargeLevel, LVar0) + IfNe(LVar0, 0) + Set(LVar1, ANIM_TubbasHeart_Anim0B) + EndIf + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseOrEq(EVENT_DEATH) + ExecWait(N(EVS_SelectAnimation)) + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_SPIN_SMASH_DEATH) + ExecWait(N(EVS_SelectAnimation)) + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIKE_CONTACT) + CaseEq(EVENT_BURN_CONTACT) + CaseEq(EVENT_END_FIRST_STRIKE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim03) + ExecWait(N(EVS_ReturnHome)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TubbasHeart_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseDefault + EndSwitch + Call(GetActorHP, ACTOR_SELF, LVar0) + IfLe(LVar0, 5) + ExecWait(N(EVS_FleeFromBattle)) + Return + Else + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + EndIf + Return + End }; EvtScript N(EVS_FleeFromBattle) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 40) - EVT_WAIT(40) - EVT_CALL(ActorSpeak, MSG_CH3_00C6, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim0D, ANIM_TubbasHeart_Anim0D) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 25) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_DISABLE_CELEBRATION | BS_FLAGS1_BATTLE_FLED, TRUE) - EVT_CALL(SetEndBattleFadeOutRate, 20) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 40) + Wait(40) + Call(ActorSpeak, MSG_CH3_00C6, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim0D, ANIM_TubbasHeart_Anim0D) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 25) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Call(SetBattleFlagBits, BS_FLAGS1_DISABLE_CELEBRATION | BS_FLAGS1_BATTLE_FLED, TRUE) + Call(SetEndBattleFadeOutRate, 20) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 45) - EVT_SET(LVar1, 0) - EVT_EXEC_WAIT(EVS_Enemy_HopToPos) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim01) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_RETURN - EVT_END + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 45) + Set(LVar1, 0) + ExecWait(EVS_Enemy_HopToPos) + Call(SetGoalToHome, ACTOR_SELF) + Call(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim01) + Call(SetActorYaw, ACTOR_SELF, 0) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_NE(LVar0, HIT_RESULT_MISS) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) - EVT_IF_NOT_FLAG(LVar0, AVAL_Flag_TauntBow) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_EQ(LVar0, PARTNER_BOW) - EVT_CALL(EnableBattleStatusBar, FALSE) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + IfNe(LVar0, HIT_RESULT_MISS) + Call(GetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) + IfNotFlag(LVar0, AVAL_Flag_TauntBow) + Call(GetCurrentPartnerID, LVar0) + IfEq(LVar0, PARTNER_BOW) + Call(EnableBattleStatusBar, FALSE) //@bug -- meant to OR 3 with value of AVAR_Flags, not PARTNER_BOW - EVT_BITWISE_OR_CONST(LVar0, AVAL_Flag_TauntBow | AVAL_Flag_HidStatusBar) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 40) - EVT_WAIT(40) - EVT_CALL(ActorSpeak, MSG_CH3_00C3, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim0B, ANIM_TubbasHeart_Anim01) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_PARTNER) - EVT_CALL(MoveBattleCamOver, 25) - EVT_WAIT(25) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, 1, ANIM_BattleBow_Talk) - EVT_CALL(ActorSpeak, MSG_CH3_00C4, ACTOR_PARTNER, 1, ANIM_BattleBow_Talk, ANIM_BattleBow_Idle) - EVT_CALL(SetAnimation, ACTOR_PARTNER, 1, ANIM_BattleBow_Laugh) - EVT_CALL(EndActorSpeech, ACTOR_PARTNER, 1, -1, -1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) - EVT_IF_EQ(LVar0, AVAL_NextMove_Charge) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChargeTaunt, LVar0) - EVT_IF_TRUE(LVar0) - EVT_CALL(EnableBattleStatusBar, TRUE) - EVT_END_IF - EVT_ELSE - EVT_CALL(EnableBattleStatusBar, TRUE) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_NextMove_Charge) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChargeTaunt, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ChargeTaunt, TRUE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 40) - EVT_WAIT(40) - EVT_CALL(ActorSpeak, MSG_CH3_00C5, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim0B, ANIM_TubbasHeart_Anim01) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_Move_Charge)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_NextMove_Swarm) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) - EVT_IF_FLAG(LVar0, AVAL_Flag_HidStatusBar) - EVT_CALL(EnableBattleStatusBar, TRUE) - EVT_END_IF - EVT_CASE_EQ(AVAL_NextMove_Swarm) - EVT_EXEC_WAIT(N(EVS_Attack_DarkSwarm)) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChargeLevel, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_SwarmCount, LVar1) - EVT_ADD(LVar1, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SwarmCount, LVar1) - EVT_IF_GE(LVar1, 2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_NextMove_Leap) - EVT_ELSE - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_NextMove_Charge) - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(AVAL_NextMove_Leap) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_NextMove_Charge) - EVT_EXEC_WAIT(N(EVS_Attack_Leap)) - EVT_END_SWITCH - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) - EVT_BITWISE_AND_CONST(LVar0, ~AVAL_Flag_HidStatusBar) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + BitwiseOrConst(LVar0, AVAL_Flag_TauntBow | AVAL_Flag_HidStatusBar) + Call(SetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 40) + Wait(40) + Call(ActorSpeak, MSG_CH3_00C3, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim0B, ANIM_TubbasHeart_Anim01) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_PARTNER) + Call(MoveBattleCamOver, 25) + Wait(25) + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(SetAnimation, ACTOR_PARTNER, 1, ANIM_BattleBow_Talk) + Call(ActorSpeak, MSG_CH3_00C4, ACTOR_PARTNER, 1, ANIM_BattleBow_Talk, ANIM_BattleBow_Idle) + Call(SetAnimation, ACTOR_PARTNER, 1, ANIM_BattleBow_Laugh) + Call(EndActorSpeech, ACTOR_PARTNER, 1, -1, -1) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Call(MoveBattleCamOver, 30) + Call(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) + IfEq(LVar0, AVAL_NextMove_Charge) + Call(GetActorVar, ACTOR_SELF, AVAR_ChargeTaunt, LVar0) + IfTrue(LVar0) + Call(EnableBattleStatusBar, TRUE) + EndIf + Else + Call(EnableBattleStatusBar, TRUE) + EndIf + EndIf + EndIf + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) + Switch(LVar0) + CaseEq(AVAL_NextMove_Charge) + Call(GetActorVar, ACTOR_SELF, AVAR_ChargeTaunt, LVar0) + IfEq(LVar0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_ChargeTaunt, TRUE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 40) + Wait(40) + Call(ActorSpeak, MSG_CH3_00C5, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim0B, ANIM_TubbasHeart_Anim01) + EndIf + ExecWait(N(EVS_Move_Charge)) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_NextMove_Swarm) + Call(GetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) + IfFlag(LVar0, AVAL_Flag_HidStatusBar) + Call(EnableBattleStatusBar, TRUE) + EndIf + CaseEq(AVAL_NextMove_Swarm) + ExecWait(N(EVS_Attack_DarkSwarm)) + Call(GetActorVar, ACTOR_SELF, AVAR_ChargeLevel, LVar0) + IfEq(LVar0, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_SwarmCount, LVar1) + Add(LVar1, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_SwarmCount, LVar1) + IfGe(LVar1, 2) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_NextMove_Leap) + Else + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_NextMove_Charge) + EndIf + EndIf + CaseEq(AVAL_NextMove_Leap) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_NextMove_Charge) + ExecWait(N(EVS_Attack_Leap)) + EndSwitch + Call(GetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) + BitwiseAndConst(LVar0, ~AVAL_Flag_HidStatusBar) + Call(SetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_Leap) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim03) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 45) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_EXEC_WAIT(EVS_Enemy_HopToPos) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim01) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim16) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim15) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim03) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.3)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) - EVT_END_SWITCH - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_LEAP, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SET(LVarF, LVar0) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim01) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) - EVT_WAIT(8) - EVT_IF_EQ(LVarF, HIT_RESULT_10) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim03) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim03) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 45) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + ExecWait(EVS_Enemy_HopToPos) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim01) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim16) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim15) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Sub(LVar0, 10) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim03) + ExecWait(N(EVS_ReturnHome)) + Return + EndCaseGroup + CaseDefault + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.3)) + Call(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) + EndSwitch + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_LEAP, BS_FLAGS1_TRIGGER_EVENTS) + Set(LVarF, LVar0) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim01) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Add(LVar0, 10) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) + Wait(8) + IfEq(LVarF, HIT_RESULT_10) + Return + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim03) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_Move_Charge) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 85, 50, 0) - EVT_CALL(SetBattleCamZoom, 280) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 40) - EVT_WAIT(40) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim0B) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar4) - EVT_IF_NOT_FLAG(LVar4, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 15) - EVT_SETF(LVar3, EVT_FLOAT(1.0)) - EVT_ELSE - EVT_ADD(LVar1, 6) - EVT_SETF(LVar3, EVT_FLOAT(0.4)) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_GATHER_MAGIC, 1, LVar0, LVar1, LVar2, LVar3, 60, 0) - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 6, LVar0, LVar1, LVar2, LVar3, 60, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_TUBBAS_HEART_CHARGE) - EVT_WAIT(60) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ChargeLevel, 1) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar4) - EVT_IF_NOT_FLAG(LVar4, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 15) - EVT_SETF(LVar3, EVT_FLOAT(1.0)) - EVT_ELSE - EVT_ADD(LVar1, 6) - EVT_SETF(LVar3, EVT_FLOAT(0.4)) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 3, LVar0, LVar1, LVar2, LVar3, 0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ChargedEffectID, LVarF) - EVT_CALL(EnableActorGlow, ACTOR_SELF, TRUE) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ChargedAnims))) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 85, 50, 0) + Call(SetBattleCamZoom, 280) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 40) + Wait(40) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim0B) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar4) + IfNotFlag(LVar4, STATUS_FLAG_SHRINK) + Add(LVar1, 15) + SetF(LVar3, Float(1.0)) + Else + Add(LVar1, 6) + SetF(LVar3, Float(0.4)) + EndIf + PlayEffect(EFFECT_GATHER_MAGIC, 1, LVar0, LVar1, LVar2, LVar3, 60, 0) + PlayEffect(EFFECT_ENERGY_IN_OUT, 6, LVar0, LVar1, LVar2, LVar3, 60, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_TUBBAS_HEART_CHARGE) + Wait(60) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_ChargeLevel, 1) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar4) + IfNotFlag(LVar4, STATUS_FLAG_SHRINK) + Add(LVar1, 15) + SetF(LVar3, Float(1.0)) + Else + Add(LVar1, 6) + SetF(LVar3, Float(0.4)) + EndIf + PlayEffect(EFFECT_ENERGY_IN_OUT, 3, LVar0, LVar1, LVar2, LVar3, 0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_ChargedEffectID, LVarF) + Call(EnableActorGlow, ACTOR_SELF, TRUE) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ChargedAnims))) + Return + End }; EvtScript N(EVS_Attack_DarkSwarm) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 85, 50, 0) - EVT_CALL(SetBattleCamZoom, 280) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim0C) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 16) - EVT_ELSE - EVT_ADD(LVar1, 6) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 45, 0) - EVT_WAIT(60) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim0B) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) - EVT_END_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChargeLevel, LVar0) - EVT_SUB(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ChargeLevel, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChargedEffectID, LVar0) - EVT_CALL(RemoveEffect, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ChargedEffectID, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_END_IF - EVT_CALL(PlaySound, SOUND_TUBBAS_HEART_SWARM_ATTACK) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 5) - EVT_PLAY_EFFECT(EFFECT_TUBBA_HEART_ATTACK, FX_HEART_SWARM_MISS, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 200, 0) - EVT_WAIT(145) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_ELSE - EVT_END_IF - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 5) - EVT_PLAY_EFFECT(EFFECT_TUBBA_HEART_ATTACK, FX_HEART_SWARM_HIT, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 200, 0) - EVT_THREAD - EVT_WAIT(160) - EVT_CALL(PlaySound, SOUND_TUBBAS_HEART_SWARM_VANISH) - EVT_END_THREAD - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Flail) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(SetBattleCamOffsetZ, 35) - EVT_CALL(MoveBattleCamOver, 50) - EVT_WAIT(56) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_SQUEEZE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Leeching) - EVT_WAIT(37) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_SQUEEZE) - EVT_WAIT(22) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_TUBBAS_HEART_SWARM_DISPERSE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SWARM, BS_FLAGS1_TRIGGER_EVENTS) - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 85, 50, 0) + Call(SetBattleCamZoom, 280) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim0C) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar1, 16) + Else + Add(LVar1, 6) + EndIf + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, Float(1.0), 45, 0) + Wait(60) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TubbasHeart_Anim0B) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) + EndThread + Call(GetActorVar, ACTOR_SELF, AVAR_ChargeLevel, LVar0) + Sub(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_ChargeLevel, LVar0) + IfEq(LVar0, 0) + Call(EnableActorGlow, ACTOR_SELF, FALSE) + Call(GetActorVar, ACTOR_SELF, AVAR_ChargedEffectID, LVar0) + Call(RemoveEffect, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_ChargedEffectID, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + EndIf + Call(PlaySound, SOUND_TUBBAS_HEART_SWARM_ATTACK) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 5) + PlayEffect(EFFECT_TUBBA_HEART_ATTACK, FX_HEART_SWARM_MISS, LVar0, LVar1, LVar2, Float(1.0), 200, 0) + Wait(145) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + Else + EndIf + Return + EndCaseGroup + EndSwitch + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 5) + PlayEffect(EFFECT_TUBBA_HEART_ATTACK, FX_HEART_SWARM_HIT, LVar0, LVar1, LVar2, Float(1.0), 200, 0) + Thread + Wait(160) + Call(PlaySound, SOUND_TUBBAS_HEART_SWARM_VANISH) + EndThread + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Flail) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 300) + Call(SetBattleCamOffsetZ, 35) + Call(MoveBattleCamOver, 50) + Wait(56) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_SQUEEZE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Leeching) + Wait(37) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_SQUEEZE) + Wait(22) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_TUBBAS_HEART_SWARM_DISPERSE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SWARM, BS_FLAGS1_TRIGGER_EVENTS) + Return + End }; diff --git a/src/battle/area/dgb/actor/tubba_blubba.c b/src/battle/area/dgb/actor/tubba_blubba.c index 7c15df8cc7b..f87ea73f547 100644 --- a/src/battle/area/dgb/actor/tubba_blubba.c +++ b/src/battle/area/dgb/actor/tubba_blubba.c @@ -114,547 +114,547 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_InvunerableTaunt, AVAL_Taunt_None) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_TUBBA_BEGAN_NAPPING) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CaughtYouTaunt, FALSE) - EVT_ELSE - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CaughtYouTaunt, TRUE) - EVT_END_IF - EVT_EXEC_GET_TID(N(EVS_PlayFootstepQuaking), LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_QuakingScriptID, LVar0) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_InvunerableTaunt, AVAL_Taunt_None) + IfGe(GB_StoryProgress, STORY_CH3_TUBBA_BEGAN_NAPPING) + Call(SetActorVar, ACTOR_SELF, AVAR_CaughtYouTaunt, FALSE) + Else + Call(SetActorVar, ACTOR_SELF, AVAR_CaughtYouTaunt, TRUE) + EndIf + ExecGetTID(N(EVS_PlayFootstepQuaking), LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_QuakingScriptID, LVar0) + Return + End }; EvtScript N(EVS_PlayFootstepQuaking) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(ActorExists, ACTOR_SELF, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_IF_EQ(LVar0, ANIM_BattleTubba_Anim06) - EVT_GOTO(1) - EVT_END_IF - EVT_IF_EQ(LVar0, ANIM_BattleTubba_Anim07) - EVT_GOTO(1) - EVT_END_IF - EVT_GOTO(0) - EVT_LABEL(1) - EVT_CALL(StartRumble, BTL_RUMBLE_LONG) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Call(ActorExists, ACTOR_SELF, LVar0) + IfEq(LVar0, FALSE) + Return + EndIf + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Goto(0) + EndIf + Call(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) + IfEq(LVar0, ANIM_BattleTubba_Anim06) + Goto(1) + EndIf + IfEq(LVar0, ANIM_BattleTubba_Anim07) + Goto(1) + EndIf + Goto(0) + Label(1) + Call(StartRumble, BTL_RUMBLE_LONG) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CaughtYouTaunt, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(EnableBattleStatusBar, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CaughtYouTaunt, TRUE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 75) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 380) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(ActorSpeak, MSG_CH3_0102, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim09, ANIM_BattleTubba_Anim02) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim15) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim16) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim02) - EVT_END_THREAD - EVT_CALL(EndActorSpeech, ACTOR_SELF, PRT_MAIN, -1, -1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(EnableBattleStatusBar, TRUE) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) + Call(GetActorVar, ACTOR_SELF, AVAR_CaughtYouTaunt, LVar0) + IfEq(LVar0, 0) + Call(EnableBattleStatusBar, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_CaughtYouTaunt, TRUE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 75) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 380) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 20) + Call(ActorSpeak, MSG_CH3_0102, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim09, ANIM_BattleTubba_Anim02) + Thread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim15) + Wait(4) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim16) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim02) + EndThread + Call(EndActorSpeech, ACTOR_SELF, PRT_MAIN, -1, -1) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(EnableBattleStatusBar, TRUE) + EndIf + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim02) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim07) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim02) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim02) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim07) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim02) + Call(SetActorYaw, ACTOR_SELF, 0) + Return + End }; EvtScript N(EVS_PrepareTaunt) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_InvunerableTaunt, LVar1) - EVT_IF_EQ(LVar1, AVAL_Taunt_None) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_InvunerableTaunt, AVAL_Taunt_Ready) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_InvunerableTaunt, LVar1) + IfEq(LVar1, AVAL_Taunt_None) + Call(SetActorVar, ACTOR_SELF, AVAR_InvunerableTaunt, AVAL_Taunt_Ready) + EndIf + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_EXEC_WAIT(N(EVS_PrepareTaunt)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleTubba_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CASE_OR_EQ(EVENT_BURN_HIT) - EVT_CASE_OR_EQ(EVENT_BURN_DEATH) - EVT_EXEC_WAIT(N(EVS_PrepareTaunt)) - EVT_WAIT(20) - EVT_WAIT(15) - EVT_IF_EQ(LVar0, EVENT_BURN_DEATH) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleTubba_Anim14) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_EXEC_WAIT(N(EVS_PrepareTaunt)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleTubba_Anim14) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleTubba_Anim14) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleTubba_Anim14) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_EXEC_WAIT(N(EVS_PrepareTaunt)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleTubba_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_SHOCK_DEATH) - EVT_CASE_OR_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleTubba_Anim14) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleTubba_Anim14) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleTubba_Anim14) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleTubba_Anim14) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIKE_CONTACT) - EVT_CASE_EQ(EVENT_BURN_CONTACT) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleTubba_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + ExecWait(N(EVS_PrepareTaunt)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleTubba_Anim02) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + CaseOrEq(EVENT_BURN_HIT) + CaseOrEq(EVENT_BURN_DEATH) + ExecWait(N(EVS_PrepareTaunt)) + Wait(20) + Wait(15) + IfEq(LVar0, EVENT_BURN_DEATH) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleTubba_Anim14) + ExecWait(EVS_Enemy_Death) + Return + EndIf + EndCaseGroup + CaseEq(EVENT_SPIN_SMASH_HIT) + ExecWait(N(EVS_PrepareTaunt)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleTubba_Anim14) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleTubba_Anim14) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleTubba_Anim14) + ExecWait(EVS_Enemy_Knockback) + ExecWait(N(EVS_ReturnHome)) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + ExecWait(N(EVS_PrepareTaunt)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleTubba_Anim02) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseOrEq(EVENT_SHOCK_DEATH) + CaseOrEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleTubba_Anim14) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleTubba_Anim14) + ExecWait(EVS_Enemy_Death) + Return + EndCaseGroup + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleTubba_Anim14) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleTubba_Anim14) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIKE_CONTACT) + CaseEq(EVENT_BURN_CONTACT) + CaseEq(EVENT_END_FIRST_STRIKE) + ExecWait(N(EVS_ReturnHome)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleTubba_Anim02) + ExecWait(EVS_Enemy_Recover) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim07) - EVT_CALL(SetGoalPos, ACTOR_SELF, 0, 0, 0) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim01) - EVT_WAIT(30) - EVT_SET(LVar0, 0) - EVT_LOOP(12) - EVT_ADD(LVar0, 15) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(10) - EVT_SET(LVar0, 180) - EVT_LOOP(12) - EVT_SUB(LVar0, 15) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim02) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 80) - EVT_PLAY_EFFECT(EFFECT_EMOTE, EMOTE_QUESTION, 0, LVar0, LVar1, LVar2, 30, 315, 30, 0, 0) - EVT_WAIT(40) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim01) - EVT_SET(LVar0, 0) - EVT_LOOP(15) - EVT_ADD(LVar0, 12) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim06) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar0, 220) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_QuakingScriptID, LVar0) - EVT_KILL_THREAD(LVar0) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_DISABLE_CELEBRATION | BS_FLAGS1_BATTLE_FLED, TRUE) - EVT_CALL(SetEndBattleFadeOutRate, 10) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_InvunerableTaunt, LVar0) - EVT_IF_EQ(LVar0, AVAL_Taunt_Ready) - EVT_CALL(EnableBattleStatusBar, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_InvunerableTaunt, AVAL_Taunt_Done) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 75) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 380) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(ActorSpeak, MSG_CH3_0103, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim09, ANIM_BattleTubba_Anim02) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim15) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim16) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim02) - EVT_END_THREAD - EVT_CALL(EndActorSpeech, ACTOR_SELF, PRT_MAIN, -1, -1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim01) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(EnableBattleStatusBar, TRUE) - EVT_END_IF - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 60) - EVT_EXEC_WAIT(N(EVS_Attack_SlamFist)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_BodySlam)) - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, HIT_RESULT_MISS) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim07) + Call(SetGoalPos, ACTOR_SELF, 0, 0, 0) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim01) + Wait(30) + Set(LVar0, 0) + Loop(12) + Add(LVar0, 15) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + Wait(10) + Set(LVar0, 180) + Loop(12) + Sub(LVar0, 15) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim02) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 80) + PlayEffect(EFFECT_EMOTE, EMOTE_QUESTION, 0, LVar0, LVar1, LVar2, 30, 315, 30, 0, 0) + Wait(40) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim01) + Set(LVar0, 0) + Loop(15) + Add(LVar0, 12) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim06) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar0, 220) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(GetActorVar, ACTOR_SELF, AVAR_QuakingScriptID, LVar0) + KillThread(LVar0) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Call(SetBattleFlagBits, BS_FLAGS1_DISABLE_CELEBRATION | BS_FLAGS1_BATTLE_FLED, TRUE) + Call(SetEndBattleFadeOutRate, 10) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_InvunerableTaunt, LVar0) + IfEq(LVar0, AVAL_Taunt_Ready) + Call(EnableBattleStatusBar, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_InvunerableTaunt, AVAL_Taunt_Done) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 75) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 380) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(ActorSpeak, MSG_CH3_0103, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim09, ANIM_BattleTubba_Anim02) + Thread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim15) + Wait(4) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim16) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim02) + EndThread + Call(EndActorSpeech, ACTOR_SELF, PRT_MAIN, -1, -1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim01) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(EnableBattleStatusBar, TRUE) + EndIf + Call(RandInt, 100, LVar0) + IfLt(LVar0, 60) + ExecWait(N(EVS_Attack_SlamFist)) + Else + ExecWait(N(EVS_Attack_BodySlam)) + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_SlamFist) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 150) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim07) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_IF_NOT_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_ELSE - EVT_CALL(AddGoalPos, ACTOR_SELF, 20, 0, 0) - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim15) - EVT_WAIT(8) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_SWIPE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim16) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim17) - EVT_WAIT(3) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, LVar0, LVar1, LVar2, 0, 0) - EVT_PLAY_EFFECT(EFFECT_SHOCKWAVE, 1, LVar0, LVar1, LVar2, 0) - EVT_THREAD - EVT_CALL(StartRumble, BTL_RUMBLE_LONG) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(15.0)) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) - EVT_END_IF - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_WAIT(10) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim02) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_NOT_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SHOCKWAVE, 1, LVar0, 0, LVar2, 0) - EVT_END_IF - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_IF_NOT_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_CALL(SetDamageSource, DMG_SRC_TUBBA_SMASH) - EVT_END_IF - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_FIST_POUND, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 200) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(MoveBattleCamOver, 30) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim02) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_IF_EQ(LVarF, HIT_RESULT_10) - EVT_RETURN - EVT_END_IF - EVT_CALL(YieldTurn) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 150) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim07) + Call(SetGoalToTarget, ACTOR_SELF) + IfNotFlag(LVar5, STATUS_FLAG_SHRINK) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Else + Call(AddGoalPos, ACTOR_SELF, 20, 0, 0) + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim15) + Wait(8) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_SWIPE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim16) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim17) + Wait(3) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + PlayEffect(EFFECT_LANDING_DUST, 4, LVar0, LVar1, LVar2, 0, 0) + PlayEffect(EFFECT_SHOCKWAVE, 1, LVar0, LVar1, LVar2, 0) + Thread + Call(StartRumble, BTL_RUMBLE_LONG) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(15.0)) + EndThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) + EndIf + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Wait(10) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim02) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + ExecWait(N(EVS_ReturnHome)) + Return + EndCaseGroup + CaseDefault + EndSwitch + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfNotFlag(LVar5, STATUS_FLAG_SHRINK) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SHOCKWAVE, 1, LVar0, 0, LVar2, 0) + EndIf + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + IfNotFlag(LVar5, STATUS_FLAG_SHRINK) + Call(SetDamageSource, DMG_SRC_TUBBA_SMASH) + EndIf + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_FIST_POUND, BS_FLAGS1_TRIGGER_EVENTS) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 200) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(MoveBattleCamOver, 30) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim02) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + IfEq(LVarF, HIT_RESULT_10) + Return + EndIf + Call(YieldTurn) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_Attack_BodySlam) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 180) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim07) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 70, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim0F) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim10) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_LARGE_ACTOR_JUMP, 0) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_THREAD - EVT_WAIT(12) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim11) - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 15) - EVT_SET(LVar1, 0) - EVT_ADD(LVar2, 5) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 23, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim12) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(StartRumble, BTL_RUMBLE_LONG) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_END_THREAD - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_ADD(LVar2, 5) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(StartRumble, BTL_RUMBLE_LONG) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim13) - EVT_WAIT(4) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_THREAD - EVT_WAIT(12) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim11) - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_END_SWITCH - EVT_WAIT(2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_NOT_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_CALL(SetDamageSource, DMG_SRC_CRUSH) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) - EVT_END_IF - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_BODY_SLAM, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 200) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(MoveBattleCamOver, 30) - EVT_SET(LVarF, LVar0) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_ATK_BLOCKED) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_STONE) - EVT_CALL(LandJump, ACTOR_SELF) - EVT_ELSE - EVT_GOTO(1) - EVT_END_IF - EVT_ELSE - EVT_GOTO(1) - EVT_END_IF - EVT_LABEL(0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SHOCKWAVE, 0, LVar0, 0, LVar2, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim0D) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(StartRumble, BTL_RUMBLE_LONG) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_END_THREAD - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_ADD(LVar2, 5) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(StartRumble, BTL_RUMBLE_LONG) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) - EVT_GOTO(2) - EVT_LABEL(1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_NOT_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_WAIT(3) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SHOCKWAVE, 1, LVar0, 0, LVar2, 0) - EVT_CALL(StartRumble, BTL_RUMBLE_LONG) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_END_IF - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_THREAD - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim0E) - EVT_END_THREAD - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_IF_NOT_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_CALL(StartRumble, BTL_RUMBLE_LONG) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) - EVT_WAIT(8) - EVT_END_IF - EVT_LABEL(2) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_IF_EQ(LVarF, HIT_RESULT_10) - EVT_RETURN - EVT_END_IF - EVT_CALL(YieldTurn) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 180) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim07) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 70, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim0F) + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim10) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_LARGE_ACTOR_JUMP, 0) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Thread + Wait(12) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim11) + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 15) + Set(LVar1, 0) + Add(LVar2, 5) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 23, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim12) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) + EndThread + Thread + Call(StartRumble, BTL_RUMBLE_LONG) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + EndThread + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Set(LVar1, 0) + Add(LVar2, 5) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(StartRumble, BTL_RUMBLE_LONG) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim13) + Wait(4) + ExecWait(N(EVS_ReturnHome)) + Return + EndCaseGroup + CaseDefault + Thread + Wait(12) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim11) + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + EndSwitch + Wait(2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfNotFlag(LVar5, STATUS_FLAG_SHRINK) + Call(SetDamageSource, DMG_SRC_CRUSH) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) + EndIf + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_BODY_SLAM, BS_FLAGS1_TRIGGER_EVENTS) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 200) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(MoveBattleCamOver, 30) + Set(LVarF, LVar0) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfFlag(LVar5, STATUS_FLAG_SHRINK) + Goto(1) + EndIf + Call(GetBattleFlags, LVar0) + IfNotFlag(LVar0, BS_FLAGS1_ATK_BLOCKED) + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_STONE) + Call(LandJump, ACTOR_SELF) + Else + Goto(1) + EndIf + Else + Goto(1) + EndIf + Label(0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SHOCKWAVE, 0, LVar0, 0, LVar2, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim0D) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) + EndThread + Thread + Call(StartRumble, BTL_RUMBLE_LONG) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + EndThread + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Set(LVar1, 0) + Add(LVar2, 5) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(StartRumble, BTL_RUMBLE_LONG) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) + Goto(2) + Label(1) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfNotFlag(LVar5, STATUS_FLAG_SHRINK) + Wait(3) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SHOCKWAVE, 1, LVar0, 0, LVar2, 0) + Call(StartRumble, BTL_RUMBLE_LONG) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + EndIf + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Thread + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim0E) + EndThread + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + IfNotFlag(LVar5, STATUS_FLAG_SHRINK) + Call(StartRumble, BTL_RUMBLE_LONG) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) + Wait(8) + EndIf + Label(2) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + IfEq(LVarF, HIT_RESULT_10) + Return + EndIf + Call(YieldTurn) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/battle/area/dig/actor/tubba_blubba.c b/src/battle/area/dig/actor/tubba_blubba.c index e34bdca82d3..4b9ddbb0776 100644 --- a/src/battle/area/dig/actor/tubba_blubba.c +++ b/src/battle/area/dig/actor/tubba_blubba.c @@ -113,385 +113,385 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_InvunerableTaunt, AVAL_Taunt_None) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CaughtYouTaunt, FALSE) - EVT_EXEC_GET_TID(N(EVS_PlayFootstepQuaking), LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_QuakingScriptID, LVar0) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_InvunerableTaunt, AVAL_Taunt_None) + Call(SetActorVar, ACTOR_SELF, AVAR_CaughtYouTaunt, FALSE) + ExecGetTID(N(EVS_PlayFootstepQuaking), LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_QuakingScriptID, LVar0) + Return + End }; EvtScript N(EVS_PlayFootstepQuaking) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(ActorExists, ACTOR_SELF, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_IF_EQ(LVar0, ANIM_BattleTubba_Anim06) - EVT_GOTO(1) - EVT_END_IF - EVT_IF_EQ(LVar0, ANIM_BattleTubba_Anim07) - EVT_GOTO(1) - EVT_END_IF - EVT_GOTO(0) - EVT_LABEL(1) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Call(ActorExists, ACTOR_SELF, LVar0) + IfEq(LVar0, 0) + Return + EndIf + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Goto(0) + EndIf + Call(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) + IfEq(LVar0, ANIM_BattleTubba_Anim06) + Goto(1) + EndIf + IfEq(LVar0, ANIM_BattleTubba_Anim07) + Goto(1) + EndIf + Goto(0) + Label(1) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim02) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim07) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim02) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim02) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim07) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim02) + Call(SetActorYaw, ACTOR_SELF, 0) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim07) - EVT_CALL(SetGoalPos, ACTOR_SELF, 0, 0, 0) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim01) - EVT_WAIT(30) - EVT_SET(LVar0, 0) - EVT_LOOP(12) - EVT_ADD(LVar0, 15) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(10) - EVT_SET(LVar0, 180) - EVT_LOOP(12) - EVT_SUB(LVar0, 15) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim02) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 80) - EVT_PLAY_EFFECT(EFFECT_EMOTE, EMOTE_QUESTION, 0, LVar0, LVar1, LVar2, 30, 315, 30, 0, 0) - EVT_WAIT(40) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim01) - EVT_SET(LVar0, 0) - EVT_LOOP(15) - EVT_ADD(LVar0, 12) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim06) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar0, 220) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_QuakingScriptID, LVar0) - EVT_KILL_THREAD(LVar0) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_DISABLE_CELEBRATION | BS_FLAGS1_BATTLE_FLED, TRUE) - EVT_CALL(SetEndBattleFadeOutRate, 10) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_InvunerableTaunt, LVar0) - EVT_IF_EQ(LVar0, AVAL_Taunt_Ready) - EVT_CALL(EnableBattleStatusBar, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_InvunerableTaunt, AVAL_Taunt_Done) - EVT_CALL(ActorSpeak, MSG_CH3_0103, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim09, ANIM_BattleTubba_Anim02) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim15) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim16) - EVT_WAIT(15) - EVT_END_THREAD - EVT_CALL(EndActorSpeech, ACTOR_SELF, PRT_MAIN, -1, -1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim01) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(EnableBattleStatusBar, TRUE) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_Attack_BodySlam)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, HIT_RESULT_MISS) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim07) + Call(SetGoalPos, ACTOR_SELF, 0, 0, 0) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim01) + Wait(30) + Set(LVar0, 0) + Loop(12) + Add(LVar0, 15) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + Wait(10) + Set(LVar0, 180) + Loop(12) + Sub(LVar0, 15) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim02) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 80) + PlayEffect(EFFECT_EMOTE, EMOTE_QUESTION, 0, LVar0, LVar1, LVar2, 30, 315, 30, 0, 0) + Wait(40) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim01) + Set(LVar0, 0) + Loop(15) + Add(LVar0, 12) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim06) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar0, 220) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(GetActorVar, ACTOR_SELF, AVAR_QuakingScriptID, LVar0) + KillThread(LVar0) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Call(SetBattleFlagBits, BS_FLAGS1_DISABLE_CELEBRATION | BS_FLAGS1_BATTLE_FLED, TRUE) + Call(SetEndBattleFadeOutRate, 10) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_InvunerableTaunt, LVar0) + IfEq(LVar0, AVAL_Taunt_Ready) + Call(EnableBattleStatusBar, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_InvunerableTaunt, AVAL_Taunt_Done) + Call(ActorSpeak, MSG_CH3_0103, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim09, ANIM_BattleTubba_Anim02) + Thread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim15) + Wait(4) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim16) + Wait(15) + EndThread + Call(EndActorSpeech, ACTOR_SELF, PRT_MAIN, -1, -1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim01) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(EnableBattleStatusBar, TRUE) + EndIf + ExecWait(N(EVS_Attack_BodySlam)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_SlamFist) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 150) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim07) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_IF_NOT_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_ELSE - EVT_CALL(AddGoalPos, ACTOR_SELF, 20, 0, 0) - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim15) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim16) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim17) - EVT_WAIT(3) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, LVar0, LVar1, LVar2, 0, 0) - EVT_PLAY_EFFECT(EFFECT_SHOCKWAVE, 1, LVar0, LVar1, LVar2, 0) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(15.0)) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) - EVT_END_IF - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim02) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_NOT_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SHOCKWAVE, 1, LVar0, 0, LVar2, 0) - EVT_END_IF - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_IF_NOT_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_CALL(SetDamageSource, DMG_SRC_TUBBA_SMASH) - EVT_END_IF - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_FIST_POUND, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim02) - EVT_IF_EQ(LVarF, 10) - EVT_RETURN - EVT_END_IF - EVT_CALL(YieldTurn) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 150) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim07) + Call(SetGoalToTarget, ACTOR_SELF) + IfNotFlag(LVar5, STATUS_FLAG_SHRINK) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Else + Call(AddGoalPos, ACTOR_SELF, 20, 0, 0) + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim15) + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim16) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim17) + Wait(3) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + PlayEffect(EFFECT_LANDING_DUST, 4, LVar0, LVar1, LVar2, 0, 0) + PlayEffect(EFFECT_SHOCKWAVE, 1, LVar0, LVar1, LVar2, 0) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(15.0)) + EndThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) + EndIf + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim02) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + ExecWait(N(EVS_ReturnHome)) + Return + EndCaseGroup + CaseDefault + EndSwitch + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfNotFlag(LVar5, STATUS_FLAG_SHRINK) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SHOCKWAVE, 1, LVar0, 0, LVar2, 0) + EndIf + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + IfNotFlag(LVar5, STATUS_FLAG_SHRINK) + Call(SetDamageSource, DMG_SRC_TUBBA_SMASH) + EndIf + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_FIST_POUND, BS_FLAGS1_TRIGGER_EVENTS) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim02) + IfEq(LVarF, 10) + Return + EndIf + Call(YieldTurn) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_Attack_BodySlam) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 180) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim07) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 70, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim0F) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim10) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_THREAD - EVT_WAIT(12) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim11) - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 15) - EVT_SET(LVar1, 0) - EVT_ADD(LVar2, 5) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(PlaySound, SOUND_ACTOR_JUMP) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 23, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim12) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_END_THREAD - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_ADD(LVar2, 5) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim13) - EVT_WAIT(4) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_THREAD - EVT_WAIT(12) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim11) - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(PlaySound, SOUND_ACTOR_JUMP) - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_END_SWITCH - EVT_WAIT(2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_NOT_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_CALL(SetDamageSource, DMG_SRC_CRUSH) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) - EVT_END_IF - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_BODY_SLAM, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_SET(LVarF, LVar0) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_ATK_BLOCKED) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_STONE) - EVT_CALL(LandJump, ACTOR_SELF) - EVT_ELSE - EVT_GOTO(1) - EVT_END_IF - EVT_ELSE - EVT_GOTO(1) - EVT_END_IF - EVT_LABEL(0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SHOCKWAVE, 0, LVar0, 0, LVar2, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim0D) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_END_THREAD - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_ADD(LVar2, 5) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) - EVT_GOTO(2) - EVT_LABEL(1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_NOT_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_WAIT(3) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SHOCKWAVE, 1, LVar0, 0, LVar2, 0) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_END_IF - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_THREAD - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim0E) - EVT_END_THREAD - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_IF_NOT_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) - EVT_WAIT(8) - EVT_END_IF - EVT_LABEL(2) - EVT_IF_EQ(LVarF, 10) - EVT_RETURN - EVT_END_IF - EVT_CALL(YieldTurn) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 180) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim07) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 70, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim0F) + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim10) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Thread + Wait(12) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim11) + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 15) + Set(LVar1, 0) + Add(LVar2, 5) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(PlaySound, SOUND_ACTOR_JUMP) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 23, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim12) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) + EndThread + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + EndThread + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Set(LVar1, 0) + Add(LVar2, 5) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim13) + Wait(4) + ExecWait(N(EVS_ReturnHome)) + Return + EndCaseGroup + CaseDefault + Thread + Wait(12) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim11) + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(PlaySound, SOUND_ACTOR_JUMP) + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + EndSwitch + Wait(2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfNotFlag(LVar5, STATUS_FLAG_SHRINK) + Call(SetDamageSource, DMG_SRC_CRUSH) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) + EndIf + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_BODY_SLAM, BS_FLAGS1_TRIGGER_EVENTS) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Set(LVarF, LVar0) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfFlag(LVar5, STATUS_FLAG_SHRINK) + Goto(1) + EndIf + Call(GetBattleFlags, LVar0) + IfNotFlag(LVar0, BS_FLAGS1_ATK_BLOCKED) + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_STONE) + Call(LandJump, ACTOR_SELF) + Else + Goto(1) + EndIf + Else + Goto(1) + EndIf + Label(0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SHOCKWAVE, 0, LVar0, 0, LVar2, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim0D) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) + EndThread + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + EndThread + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Set(LVar1, 0) + Add(LVar2, 5) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) + Goto(2) + Label(1) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfNotFlag(LVar5, STATUS_FLAG_SHRINK) + Wait(3) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SHOCKWAVE, 1, LVar0, 0, LVar2, 0) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + EndIf + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Thread + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleTubba_Anim0E) + EndThread + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + IfNotFlag(LVar5, STATUS_FLAG_SHRINK) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 60, 8, 10, 20, 0) + Wait(8) + EndIf + Label(2) + IfEq(LVarF, 10) + Return + EndIf + Call(YieldTurn) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/battle/area/dig/script/dig_01.c b/src/battle/area/dig/script/dig_01.c index 0aa8038473a..b86df3f800e 100644 --- a/src/battle/area/dig/script/dig_01.c +++ b/src/battle/area/dig/script/dig_01.c @@ -24,15 +24,15 @@ API_CALLABLE(N(SetupDemoPlayerMove)) { } EvtScript NAMESPACE = { - EVT_WAIT(3) - EVT_CALL(SetCamViewport, CAM_BATTLE, 29, 20, 262, 177) - EVT_CALL(EnableBattleStatusBar, FALSE) - EVT_SET(LVar0, 15) - EVT_CALL(N(SetDemoBattleBeginDelay)) - EVT_CALL(WaitForState, BATTLE_STATE_PLAYER_MENU) - EVT_CALL(N(SetupDemoPlayerMove)) - EVT_CALL(SetBattleState, BATTLE_STATE_PLAYER_MOVE) - EVT_WAIT(10000) - EVT_RETURN - EVT_END + Wait(3) + Call(SetCamViewport, CAM_BATTLE, 29, 20, 262, 177) + Call(EnableBattleStatusBar, FALSE) + Set(LVar0, 15) + Call(N(SetDemoBattleBeginDelay)) + Call(WaitForState, BATTLE_STATE_PLAYER_MENU) + Call(N(SetupDemoPlayerMove)) + Call(SetBattleState, BATTLE_STATE_PLAYER_MOVE) + Wait(10000) + Return + End }; diff --git a/src/battle/area/dig/script/dig_02.c b/src/battle/area/dig/script/dig_02.c index 2b7e6edc184..8b071366a77 100644 --- a/src/battle/area/dig/script/dig_02.c +++ b/src/battle/area/dig/script/dig_02.c @@ -22,19 +22,19 @@ API_CALLABLE(N(SetupDemoPlayerMove)) { } EvtScript NAMESPACE = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 1) - EVT_WAIT(3) - EVT_CALL(SetCamViewport, CAM_BATTLE, 29, 20, 262, 177) - EVT_CALL(EnableBattleStatusBar, FALSE) - EVT_CALL(WaitForState, BATTLE_STATE_PLAYER_MENU) - EVT_CALL(N(SetupDemoPlayerMove)) - EVT_CALL(SetBattleState, BATTLE_STATE_PLAYER_MOVE) - EVT_WAIT(130) - EVT_LOOP(30) - EVT_CALL(SetCommandAutoSuccess, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 1) + Wait(3) + Call(SetCamViewport, CAM_BATTLE, 29, 20, 262, 177) + Call(EnableBattleStatusBar, FALSE) + Call(WaitForState, BATTLE_STATE_PLAYER_MENU) + Call(N(SetupDemoPlayerMove)) + Call(SetBattleState, BATTLE_STATE_PLAYER_MOVE) + Wait(130) + Loop(30) + Call(SetCommandAutoSuccess, FALSE) + Wait(1) + EndLoop + Return + End }; diff --git a/src/battle/area/dig/script/dig_03.c b/src/battle/area/dig/script/dig_03.c index 69a76261955..ccdd29f5a52 100644 --- a/src/battle/area/dig/script/dig_03.c +++ b/src/battle/area/dig/script/dig_03.c @@ -22,15 +22,15 @@ API_CALLABLE(N(SetupDemoPlayerMove)) { } EvtScript NAMESPACE = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 1) - EVT_WAIT(3) - EVT_CALL(SetCamViewport, CAM_BATTLE, 29, 20, 262, 177) - EVT_CALL(EnableBattleStatusBar, FALSE) - EVT_CALL(WaitForState, BATTLE_STATE_PLAYER_MENU) - EVT_CALL(N(SetupDemoPlayerMove)) - EVT_CALL(SetBattleState, BATTLE_STATE_PARTNER_MOVE) - EVT_WAIT(90) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 1) + Wait(3) + Call(SetCamViewport, CAM_BATTLE, 29, 20, 262, 177) + Call(EnableBattleStatusBar, FALSE) + Call(WaitForState, BATTLE_STATE_PLAYER_MENU) + Call(N(SetupDemoPlayerMove)) + Call(SetBattleState, BATTLE_STATE_PARTNER_MOVE) + Wait(90) + Return + End }; diff --git a/src/battle/area/dig/script/dig_04.c b/src/battle/area/dig/script/dig_04.c index 929f34042e5..507d72eff48 100644 --- a/src/battle/area/dig/script/dig_04.c +++ b/src/battle/area/dig/script/dig_04.c @@ -27,14 +27,14 @@ API_CALLABLE(N(SetupDemoPlayerMove)) { } EvtScript NAMESPACE = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 1) - EVT_WAIT(3) - EVT_CALL(SetCamViewport, CAM_BATTLE, 29, 20, 262, 177) - EVT_CALL(EnableBattleStatusBar, FALSE) - EVT_CALL(WaitForState, BATTLE_STATE_PLAYER_MENU) - EVT_CALL(N(SetupDemoPlayerMove)) - EVT_CALL(SetBattleState, BATTLE_STATE_PLAYER_MOVE) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 1) + Wait(3) + Call(SetCamViewport, CAM_BATTLE, 29, 20, 262, 177) + Call(EnableBattleStatusBar, FALSE) + Call(WaitForState, BATTLE_STATE_PLAYER_MENU) + Call(N(SetupDemoPlayerMove)) + Call(SetBattleState, BATTLE_STATE_PLAYER_MOVE) + Return + End }; diff --git a/src/battle/area/dig/script/dig_05.c b/src/battle/area/dig/script/dig_05.c index 6fea8810aaf..a2293614d73 100644 --- a/src/battle/area/dig/script/dig_05.c +++ b/src/battle/area/dig/script/dig_05.c @@ -5,15 +5,15 @@ #include "common/SetDemoBattleBeginDelay.inc.c" EvtScript NAMESPACE = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 1) - EVT_WAIT(3) - EVT_CALL(SetCamViewport, CAM_BATTLE, 29, 20, 262, 177) - EVT_CALL(EnableBattleStatusBar, FALSE) - EVT_SET(LVar0, 5) - EVT_CALL(N(SetDemoBattleBeginDelay)) - EVT_CALL(WaitForState, BATTLE_STATE_PLAYER_MENU) - EVT_CALL(SetBattleState, BATTLE_STATE_NEXT_ENEMY) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 1) + Wait(3) + Call(SetCamViewport, CAM_BATTLE, 29, 20, 262, 177) + Call(EnableBattleStatusBar, FALSE) + Set(LVar0, 5) + Call(N(SetDemoBattleBeginDelay)) + Call(WaitForState, BATTLE_STATE_PLAYER_MENU) + Call(SetBattleState, BATTLE_STATE_NEXT_ENEMY) + Return + End }; diff --git a/src/battle/area/flo2/actor/huff_n_puff.c b/src/battle/area/flo2/actor/huff_n_puff.c index c0aa101ef3d..042a760005f 100644 --- a/src/battle/area/flo2/actor/huff_n_puff.c +++ b/src/battle/area/flo2/actor/huff_n_puff.c @@ -474,125 +474,125 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Basic_1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ChildBits, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_WobbleMode, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ScaleX, 100) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ScaleY, 100) - EVT_EXEC_WAIT(N(EVS_UpdateSize)) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Basic_1) + Call(SetActorVar, ACTOR_SELF, AVAR_ChildBits, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_WobbleMode, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_ScaleX, 100) + Call(SetActorVar, ACTOR_SELF, AVAR_ScaleY, 100) + ExecWait(N(EVS_UpdateSize)) + Return + End }; EvtScript N(EVS_UpdateSize) = { - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_ScaleX, LVar0) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_ScaleY, LVar1) - EVT_MUL(LVar0, 145) - EVT_MUL(LVar1, 135) - EVT_DIV(LVar0, 100) - EVT_DIV(LVar1, 100) - EVT_CALL(SetActorSize, ACTOR_HUFF_N_PUFF, LVar1, LVar0) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_ScaleX, LVar0) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_ScaleY, LVar1) - EVT_MUL(LVar0, -10) - EVT_MUL(LVar1, 40) - EVT_DIV(LVar0, 100) - EVT_DIV(LVar1, 100) - EVT_CALL(SetTargetOffset, ACTOR_HUFF_N_PUFF, PRT_MAIN, LVar0, LVar1) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_ScaleX, LVar0) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_ScaleY, LVar1) - EVT_MUL(LVar0, -15) - EVT_MUL(LVar1, -50) - EVT_DIV(LVar0, 100) - EVT_DIV(LVar1, 100) - EVT_CALL(SetProjectileTargetOffset, ACTOR_HUFF_N_PUFF, PRT_MAIN, LVar0, LVar1) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_ScaleX, LVar0) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_ScaleY, LVar1) - EVT_MUL(LVar0, -17) - EVT_MUL(LVar1, -31) - EVT_DIV(LVar0, 100) - EVT_DIV(LVar1, 100) - EVT_CALL(N(SetHealthBarPos), LVar0, LVar1) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_ScaleX, LVar0) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_ScaleY, LVar1) + Mul(LVar0, 145) + Mul(LVar1, 135) + Div(LVar0, 100) + Div(LVar1, 100) + Call(SetActorSize, ACTOR_HUFF_N_PUFF, LVar1, LVar0) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_ScaleX, LVar0) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_ScaleY, LVar1) + Mul(LVar0, -10) + Mul(LVar1, 40) + Div(LVar0, 100) + Div(LVar1, 100) + Call(SetTargetOffset, ACTOR_HUFF_N_PUFF, PRT_MAIN, LVar0, LVar1) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_ScaleX, LVar0) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_ScaleY, LVar1) + Mul(LVar0, -15) + Mul(LVar1, -50) + Div(LVar0, 100) + Div(LVar1, 100) + Call(SetProjectileTargetOffset, ACTOR_HUFF_N_PUFF, PRT_MAIN, LVar0, LVar1) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_ScaleX, LVar0) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_ScaleY, LVar1) + Mul(LVar0, -17) + Mul(LVar1, -31) + Div(LVar0, 100) + Div(LVar1, 100) + Call(N(SetHealthBarPos), LVar0, LVar1) + Return + End }; EvtScript N(EVS_UpdateChargedJitter) = { - EVT_SET(LFlag0, FALSE) - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_LABEL(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_Move_PreCharge_1) - EVT_CASE_OR_EQ(AVAL_Move_Charged_1) - EVT_CASE_OR_EQ(AVAL_Move_PreCharge_3) - EVT_CASE_OR_EQ(AVAL_Move_Charged_3) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(RandInt, 2, LVarA) - EVT_CALL(RandInt, 2, LVarB) - EVT_SET(LFlag0, TRUE) - EVT_ELSE - EVT_MUL(LVarA, -1) - EVT_MUL(LVarB, -1) - EVT_SET(LFlag0, FALSE) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(AVAL_Move_PreCharge_2) - EVT_CASE_OR_EQ(AVAL_Move_Charged_2) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(RandInt, 1, LVarA) - EVT_SET(LFlag0, TRUE) - EVT_ELSE - EVT_MUL(LVarA, -1) - EVT_SET(LFlag0, FALSE) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetActorDispOffset, ACTOR_SELF, LVarA, LVarB, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LFlag0, FALSE) + Set(LVarA, 0) + Set(LVarB, 0) + Label(0) + Call(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_Move_PreCharge_1) + CaseOrEq(AVAL_Move_Charged_1) + CaseOrEq(AVAL_Move_PreCharge_3) + CaseOrEq(AVAL_Move_Charged_3) + IfEq(LFlag0, FALSE) + Call(RandInt, 2, LVarA) + Call(RandInt, 2, LVarB) + Set(LFlag0, TRUE) + Else + Mul(LVarA, -1) + Mul(LVarB, -1) + Set(LFlag0, FALSE) + EndIf + EndCaseGroup + CaseOrEq(AVAL_Move_PreCharge_2) + CaseOrEq(AVAL_Move_Charged_2) + IfEq(LFlag0, FALSE) + Call(RandInt, 1, LVarA) + Set(LFlag0, TRUE) + Else + Mul(LVarA, -1) + Set(LFlag0, FALSE) + EndIf + EndCaseGroup + EndSwitch + Call(SetActorDispOffset, ACTOR_SELF, LVarA, LVarB, 0) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_SET(LVarF, 0) - EVT_LOOP(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_WobbleMode, LVarA) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(0) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, EVT_FLOAT(0.97), EVT_FLOAT(1.03), 15, 0, 0) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar1, EVT_FLOAT(1.03), EVT_FLOAT(0.97), 15, 0, 0) - EVT_ADD(LVarF, 1) - EVT_CASE_EQ(1) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, EVT_FLOAT(0.95), EVT_FLOAT(1.05), 15, 0, 0) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar1, EVT_FLOAT(1.05), EVT_FLOAT(0.95), 15, 0, 0) - EVT_ADD(LVarF, 3) - EVT_CASE_EQ(2) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, EVT_FLOAT(0.9), EVT_FLOAT(1.1), 15, 0, 0) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar1, EVT_FLOAT(1.1), EVT_FLOAT(0.9), 15, 0, 0) - EVT_ADD(LVarF, 5) - EVT_END_SWITCH - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar3) - EVT_DIVF(LVar2, EVT_FLOAT(100.0)) - EVT_DIVF(LVar3, EVT_FLOAT(100.0)) - EVT_MULF(LVar1, LVar2) - EVT_MULF(LVar0, LVar3) - EVT_CALL(SetActorScale, ACTOR_SELF, LVar1, LVar0, EVT_FLOAT(1.0)) - EVT_IF_GE(LVarF, 30) - EVT_SET(LVarF, 0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVarF, 0) + Loop(0) + Call(GetActorVar, ACTOR_SELF, AVAR_WobbleMode, LVarA) + Switch(LVarA) + CaseEq(0) + Call(N(CosInterpMinMax), LVarF, LVar0, Float(0.97), Float(1.03), 15, 0, 0) + Call(N(CosInterpMinMax), LVarF, LVar1, Float(1.03), Float(0.97), 15, 0, 0) + Add(LVarF, 1) + CaseEq(1) + Call(N(CosInterpMinMax), LVarF, LVar0, Float(0.95), Float(1.05), 15, 0, 0) + Call(N(CosInterpMinMax), LVarF, LVar1, Float(1.05), Float(0.95), 15, 0, 0) + Add(LVarF, 3) + CaseEq(2) + Call(N(CosInterpMinMax), LVarF, LVar0, Float(0.9), Float(1.1), 15, 0, 0) + Call(N(CosInterpMinMax), LVarF, LVar1, Float(1.1), Float(0.9), 15, 0, 0) + Add(LVarF, 5) + EndSwitch + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar2) + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar3) + DivF(LVar2, Float(100.0)) + DivF(LVar3, Float(100.0)) + MulF(LVar1, LVar2) + MulF(LVar0, LVar3) + Call(SetActorScale, ACTOR_SELF, LVar1, LVar0, Float(1.0)) + IfGe(LVarF, 30) + Set(LVarF, 0) + EndIf + Wait(1) + EndLoop + Return + End }; Vec3i N(SummonPos) = { NPC_DISPOSE_LOCATION }; @@ -606,2531 +606,2531 @@ Formation N(LargeTuffFormation) = { }; EvtScript N(EVS_TrySpawningRuffPuff) = { - EVT_USE_ARRAY(N(RuffPuffDataBuffer)) - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar9) - EVT_IF_LE(LVar9, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) - EVT_IF_GT(LVar9, 8) - EVT_SET(LVar9, 8) - EVT_END_IF - EVT_ELSE - EVT_IF_GT(LVar9, 4) - EVT_SET(LVar9, 4) - EVT_END_IF - EVT_END_IF - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_DEATH) - EVT_CASE_OR_EQ(EVENT_BURN_DEATH) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar0) - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar8) - EVT_MUL(LVar8, 1) - EVT_SUB(LVar0, LVar8) - EVT_IF_LT(LVar0, 50) - EVT_SET(LVar0, 50) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar0) - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar8) - EVT_MUL(LVar8, 1) - EVT_SUB(LVar0, LVar8) - EVT_IF_LT(LVar0, 50) - EVT_SET(LVar0, 50) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar0) - EVT_EXEC_WAIT(N(EVS_UpdateSize)) - EVT_SET(LVarA, 0) - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) - EVT_SET(LVar0, LVar9) - EVT_IF_GT(LVar0, 1) - EVT_SET(LVarA, LVar0) - EVT_DIV(LVarA, 2) - EVT_SET(LVar9, LVar0) - EVT_MOD(LVar9, 2) - EVT_ADD(LVar9, LVarA) - EVT_END_IF - EVT_END_IF - EVT_LOOP(LVar9) - EVT_CALL(N(SetTuffPuffPriority)) - EVT_IF_GT(LVarA, 0) - EVT_SUB(LVarA, 1) - EVT_CALL(SummonEnemy, EVT_PTR(N(LargeTuffFormation)), FALSE) - EVT_CALL(SetActorVar, LVar0, AVAR_TuffPuff_HealValue, 2) - EVT_ELSE - EVT_CALL(SummonEnemy, EVT_PTR(N(SmallTuffFormation)), FALSE) - EVT_CALL(SetActorVar, LVar0, AVAR_TuffPuff_HealValue, 1) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar1) - EVT_CALL(N(FindPlaceForTuffPuff), LVar1, LVar2) - EVT_SWITCH(LVar2) + UseArray(N(RuffPuffDataBuffer)) + Call(GetLastDamage, ACTOR_SELF, LVar9) + IfLe(LVar9, 0) + Return + EndIf + Call(GetBattleFlags, LVar0) + IfFlag(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) + IfGt(LVar9, 8) + Set(LVar9, 8) + EndIf + Else + IfGt(LVar9, 4) + Set(LVar9, 4) + EndIf + EndIf + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_DEATH) + CaseOrEq(EVENT_BURN_DEATH) + Return + EndCaseGroup + EndSwitch + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar0) + Call(GetLastDamage, ACTOR_SELF, LVar8) + Mul(LVar8, 1) + Sub(LVar0, LVar8) + IfLt(LVar0, 50) + Set(LVar0, 50) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar0) + Call(GetLastDamage, ACTOR_SELF, LVar8) + Mul(LVar8, 1) + Sub(LVar0, LVar8) + IfLt(LVar0, 50) + Set(LVar0, 50) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar0) + ExecWait(N(EVS_UpdateSize)) + Set(LVarA, 0) + Call(GetBattleFlags, LVar0) + IfFlag(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) + Set(LVar0, LVar9) + IfGt(LVar0, 1) + Set(LVarA, LVar0) + Div(LVarA, 2) + Set(LVar9, LVar0) + Mod(LVar9, 2) + Add(LVar9, LVarA) + EndIf + EndIf + Loop(LVar9) + Call(N(SetTuffPuffPriority)) + IfGt(LVarA, 0) + Sub(LVarA, 1) + Call(SummonEnemy, Ref(N(LargeTuffFormation)), FALSE) + Call(SetActorVar, LVar0, AVAR_TuffPuff_HealValue, 2) + Else + Call(SummonEnemy, Ref(N(SmallTuffFormation)), FALSE) + Call(SetActorVar, LVar0, AVAR_TuffPuff_HealValue, 1) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar1) + Call(N(FindPlaceForTuffPuff), LVar1, LVar2) + Switch(LVar2) #define HNP_REGISTER_CHILD(idx) \ - EVT_CASE_EQ(1 << idx) \ - EVT_BITWISE_OR_CONST(LVar1, 1 << idx) \ - EVT_SET(LVar2, idx) \ - EVT_SET(ArrayVar(idx), LVar0) + CaseEq(1 << idx) \ + BitwiseOrConst(LVar1, 1 << idx) \ + Set(LVar2, idx) \ + Set(ArrayVar(idx), LVar0) // try registering the child with each position, until we find the one on LVar2 FOR_CHILDREN_ORDERED(HNP_REGISTER_CHILD) - EVT_CASE_DEFAULT - EVT_SET(LVar2, -1) - EVT_END_SWITCH - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar1) - EVT_CALL(PlaySoundAtActor, LVar0, SOUND_OPEN_SHELL) - EVT_THREAD - EVT_SET(LVar3, LVar0) - EVT_CALL(MakeLerp, 150, 255, 15, EASING_QUADRATIC_IN) - EVT_LABEL(123) - EVT_CALL(UpdateLerp) - EVT_CALL(SetPartAlpha, LVar3, 1, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(123) - EVT_END_IF - EVT_CALL(SetPartAlpha, LVar3, 1, 255) - EVT_END_THREAD - EVT_IF_NE(LVar2, -1) - EVT_CALL(CopyStatusEffects, ACTOR_SELF, LVar0) - EVT_CALL(CopyBuffs, ACTOR_SELF, LVar0) - EVT_CALL(SetActorVar, LVar0, AVAR_TuffPuff_Index, LVar2) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_CALL(SetActorPos, LVar0, LVar3, LVar4, LVar5) - EVT_ADD(LVar3, -5) - EVT_ADD(LVar4, 0) - EVT_ADD(LVar5, 0) - EVT_MUL(LVar2, 36) - EVT_ADD(LVar2, 0) - EVT_CALL(N(SetTuffPuffPos), LVar3, LVar4, LVar5, LVar2, EVT_FLOAT(0.0), EVT_FLOAT(50.0)) - EVT_THREAD - EVT_CALL(SetActorJumpGravity, LVar0, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, LVar0, LVar3, LVar4, LVar5) - EVT_CALL(JumpToGoal, LVar0, 30, FALSE, FALSE, FALSE) - EVT_CALL(ForceHomePos, LVar0, LVar3, LVar4, LVar5) - EVT_CALL(HPBarToHome, LVar0) - EVT_END_THREAD - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_CALL(SetActorPos, LVar0, LVar3, LVar4, LVar5) - EVT_CALL(RandInt, 200, LVar6) - EVT_SUB(LVar6, 100) - EVT_ADD(LVar3, LVar6) - EVT_ADD(LVar5, 10) - EVT_THREAD - EVT_CALL(SetActorJumpGravity, LVar0, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, LVar0, LVar3, -30, LVar5) - EVT_CALL(JumpToGoal, LVar0, 40, FALSE, FALSE, FALSE) - EVT_CALL(RemoveActor, LVar0) - EVT_END_THREAD - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + CaseDefault + Set(LVar2, -1) + EndSwitch + Call(SetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar1) + Call(PlaySoundAtActor, LVar0, SOUND_OPEN_SHELL) + Thread + Set(LVar3, LVar0) + Call(MakeLerp, 150, 255, 15, EASING_QUADRATIC_IN) + Label(123) + Call(UpdateLerp) + Call(SetPartAlpha, LVar3, 1, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(123) + EndIf + Call(SetPartAlpha, LVar3, 1, 255) + EndThread + IfNe(LVar2, -1) + Call(CopyStatusEffects, ACTOR_SELF, LVar0) + Call(CopyBuffs, ACTOR_SELF, LVar0) + Call(SetActorVar, LVar0, AVAR_TuffPuff_Index, LVar2) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Call(SetActorPos, LVar0, LVar3, LVar4, LVar5) + Add(LVar3, -5) + Add(LVar4, 0) + Add(LVar5, 0) + Mul(LVar2, 36) + Add(LVar2, 0) + Call(N(SetTuffPuffPos), LVar3, LVar4, LVar5, LVar2, Float(0.0), Float(50.0)) + Thread + Call(SetActorJumpGravity, LVar0, Float(0.8)) + Call(SetGoalPos, LVar0, LVar3, LVar4, LVar5) + Call(JumpToGoal, LVar0, 30, FALSE, FALSE, FALSE) + Call(ForceHomePos, LVar0, LVar3, LVar4, LVar5) + Call(HPBarToHome, LVar0) + EndThread + Else + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Call(SetActorPos, LVar0, LVar3, LVar4, LVar5) + Call(RandInt, 200, LVar6) + Sub(LVar6, 100) + Add(LVar3, LVar6) + Add(LVar5, 10) + Thread + Call(SetActorJumpGravity, LVar0, Float(0.8)) + Call(SetGoalPos, LVar0, LVar3, -30, LVar5) + Call(JumpToGoal, LVar0, 40, FALSE, FALSE, FALSE) + Call(RemoveActor, LVar0) + EndThread + EndIf + EndLoop + Return + End }; EvtScript N(EVS_HuffNPuff_Hit) = { - EVT_EXEC_WAIT(N(EVS_TrySpawningRuffPuff)) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_Move_Charged_1) - EVT_CASE_OR_EQ(AVAL_Move_Charged_2) - EVT_CASE_OR_EQ(AVAL_Move_Charged_3) - EVT_SET_CONST(LVar2, ANIM_HuffNPuff_Anim11) - EVT_SET_CONST(LVar3, ANIM_HuffNPuff_Anim12) - EVT_SET_CONST(LVar4, ANIM_HuffNPuff_Anim13) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SET_CONST(LVar2, ANIM_HuffNPuff_Anim07) - EVT_SET_CONST(LVar3, ANIM_HuffNPuff_Anim08) - EVT_SET_CONST(LVar4, ANIM_HuffNPuff_Anim09) - EVT_END_SWITCH - EVT_THREAD - EVT_SET(LVar0, PRT_MAIN) - EVT_SET(LVar1, LVar2) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, PRT_FACE) - EVT_SET(LVar1, LVar3) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, PRT_ARMS) - EVT_SET(LVar1, LVar4) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_THREAD - EVT_WAIT(30) - EVT_RETURN - EVT_END + ExecWait(N(EVS_TrySpawningRuffPuff)) + Call(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_Move_Charged_1) + CaseOrEq(AVAL_Move_Charged_2) + CaseOrEq(AVAL_Move_Charged_3) + SetConst(LVar2, ANIM_HuffNPuff_Anim11) + SetConst(LVar3, ANIM_HuffNPuff_Anim12) + SetConst(LVar4, ANIM_HuffNPuff_Anim13) + EndCaseGroup + CaseDefault + SetConst(LVar2, ANIM_HuffNPuff_Anim07) + SetConst(LVar3, ANIM_HuffNPuff_Anim08) + SetConst(LVar4, ANIM_HuffNPuff_Anim09) + EndSwitch + Thread + Set(LVar0, PRT_MAIN) + Set(LVar1, LVar2) + ExecWait(EVS_Enemy_Hit) + EndThread + Thread + Set(LVar0, PRT_FACE) + Set(LVar1, LVar3) + ExecWait(EVS_Enemy_Hit) + EndThread + Thread + Set(LVar0, PRT_ARMS) + Set(LVar1, LVar4) + ExecWait(EVS_Enemy_Hit) + EndThread + Wait(30) + Return + End }; EvtScript N(EVS_HuffNPuff_Death) = { - EVT_USE_ARRAY(N(RuffPuffDataBuffer)) - EVT_LABEL(0) - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS1_EXECUTING_MOVE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) + UseArray(N(RuffPuffDataBuffer)) + Label(0) + Call(GetBattleFlags, LVar0) + IfFlag(LVar0, BS_FLAGS1_EXECUTING_MOVE) + Wait(1) + Goto(0) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) #define HNP_KILL_CHILD(idx) \ - EVT_IF_FLAG(LVar0, 1 << idx) \ - EVT_CALL(SetDamageSource, DMG_SRC_DEFAULT) \ - EVT_CALL(DispatchEvent, ArrayVar(idx), EVENT_DEATH) \ - EVT_END_IF + IfFlag(LVar0, 1 << idx) \ + Call(SetDamageSource, DMG_SRC_DEFAULT) \ + Call(DispatchEvent, ArrayVar(idx), EVENT_DEATH) \ + EndIf // kill any remaining Tuff Puffs FOR_CHILDREN_ORDERED(HNP_KILL_CHILD) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_Move_Charged_1) - EVT_CASE_OR_EQ(AVAL_Move_Charged_2) - EVT_CASE_OR_EQ(AVAL_Move_Charged_3) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChargedJitterScriptID, LVar0) - EVT_KILL_THREAD(LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChargedStaticEffect, LVar0) - EVT_CALL(RemoveEffect, LVar0) - EVT_CALL(StopSound, SOUND_CHARGE_LIGHTNING) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim08) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim09) - EVT_SET(LVar0, PRT_MAIN) - EVT_SET(LVar1, ANIM_HuffNPuff_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_Move_Charged_1) + CaseOrEq(AVAL_Move_Charged_2) + CaseOrEq(AVAL_Move_Charged_3) + Call(GetActorVar, ACTOR_SELF, AVAR_ChargedJitterScriptID, LVar0) + KillThread(LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_ChargedStaticEffect, LVar0) + Call(RemoveEffect, LVar0) + Call(StopSound, SOUND_CHARGE_LIGHTNING) + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim08) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim09) + Set(LVar0, PRT_MAIN) + Set(LVar1, ANIM_HuffNPuff_Anim07) + ExecWait(EVS_Enemy_Death) + Return + End }; EvtScript N(EVS_HuffNPuff_BurnHit) = { - EVT_EXEC_WAIT(N(EVS_TrySpawningRuffPuff)) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_Move_Charged_1) - EVT_CASE_OR_EQ(AVAL_Move_Charged_2) - EVT_CASE_OR_EQ(AVAL_Move_Charged_3) - EVT_SET_CONST(LVar2, ANIM_HuffNPuff_Anim11) - EVT_SET_CONST(LVar3, ANIM_HuffNPuff_Anim12) - EVT_SET_CONST(LVar4, ANIM_HuffNPuff_Anim13) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SET_CONST(LVar2, ANIM_HuffNPuff_Anim23) - EVT_SET_CONST(LVar3, ANIM_HuffNPuff_Anim24) - EVT_SET_CONST(LVar4, ANIM_HuffNPuff_Anim25) - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, LVar3) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, LVar4) - EVT_WAIT(20) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_Move_Charged_1) - EVT_CASE_OR_EQ(AVAL_Move_Charged_2) - EVT_CASE_OR_EQ(AVAL_Move_Charged_3) - EVT_SET_CONST(LVar2, ANIM_HuffNPuff_Anim11) - EVT_SET_CONST(LVar3, ANIM_HuffNPuff_Anim12) - EVT_SET_CONST(LVar4, ANIM_HuffNPuff_Anim13) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SET_CONST(LVar2, ANIM_HuffNPuff_Anim26) - EVT_SET_CONST(LVar3, ANIM_HuffNPuff_Anim27) - EVT_SET_CONST(LVar4, ANIM_HuffNPuff_Anim28) - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, LVar3) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, LVar4) - EVT_WAIT(10) - EVT_RETURN - EVT_END + ExecWait(N(EVS_TrySpawningRuffPuff)) + Call(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_Move_Charged_1) + CaseOrEq(AVAL_Move_Charged_2) + CaseOrEq(AVAL_Move_Charged_3) + SetConst(LVar2, ANIM_HuffNPuff_Anim11) + SetConst(LVar3, ANIM_HuffNPuff_Anim12) + SetConst(LVar4, ANIM_HuffNPuff_Anim13) + EndCaseGroup + CaseDefault + SetConst(LVar2, ANIM_HuffNPuff_Anim23) + SetConst(LVar3, ANIM_HuffNPuff_Anim24) + SetConst(LVar4, ANIM_HuffNPuff_Anim25) + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, LVar3) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, LVar4) + Wait(20) + Call(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_Move_Charged_1) + CaseOrEq(AVAL_Move_Charged_2) + CaseOrEq(AVAL_Move_Charged_3) + SetConst(LVar2, ANIM_HuffNPuff_Anim11) + SetConst(LVar3, ANIM_HuffNPuff_Anim12) + SetConst(LVar4, ANIM_HuffNPuff_Anim13) + EndCaseGroup + CaseDefault + SetConst(LVar2, ANIM_HuffNPuff_Anim26) + SetConst(LVar3, ANIM_HuffNPuff_Anim27) + SetConst(LVar4, ANIM_HuffNPuff_Anim28) + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, LVar3) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, LVar4) + Wait(10) + Return + End }; EvtScript N(EVS_HuffNPuff_BurnDeath) = { - EVT_USE_ARRAY(N(RuffPuffDataBuffer)) - EVT_LABEL(0) - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS1_EXECUTING_MOVE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) + UseArray(N(RuffPuffDataBuffer)) + Label(0) + Call(GetBattleFlags, LVar0) + IfFlag(LVar0, BS_FLAGS1_EXECUTING_MOVE) + Wait(1) + Goto(0) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) #define HNP_KILL_CHILD(idx) \ - EVT_IF_FLAG(LVar0, 1 << idx) \ - EVT_CALL(DispatchEvent, ArrayVar(idx), EVENT_DEATH) \ - EVT_END_IF + IfFlag(LVar0, 1 << idx) \ + Call(DispatchEvent, ArrayVar(idx), EVENT_DEATH) \ + EndIf // kill any remaining Tuff Puffs FOR_CHILDREN_ORDERED(HNP_KILL_CHILD) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_Move_Charged_1) - EVT_CASE_OR_EQ(AVAL_Move_Charged_2) - EVT_CASE_OR_EQ(AVAL_Move_Charged_3) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChargedJitterScriptID, LVar0) - EVT_KILL_THREAD(LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChargedStaticEffect, LVar0) - EVT_CALL(RemoveEffect, LVar0) - EVT_CALL(StopSound, SOUND_CHARGE_LIGHTNING) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim27) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim28) - EVT_SET(LVar0, PRT_MAIN) - EVT_SET(LVar1, ANIM_HuffNPuff_Anim26) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_Move_Charged_1) + CaseOrEq(AVAL_Move_Charged_2) + CaseOrEq(AVAL_Move_Charged_3) + Call(GetActorVar, ACTOR_SELF, AVAR_ChargedJitterScriptID, LVar0) + KillThread(LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_ChargedStaticEffect, LVar0) + Call(RemoveEffect, LVar0) + Call(StopSound, SOUND_CHARGE_LIGHTNING) + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim27) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim28) + Set(LVar0, PRT_MAIN) + Set(LVar1, ANIM_HuffNPuff_Anim26) + ExecWait(EVS_Enemy_Death) + Return + End }; EvtScript N(EVS_HuffNPuff_NoDamage) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_Move_Charged_1) - EVT_CASE_OR_EQ(AVAL_Move_Charged_2) - EVT_CASE_OR_EQ(AVAL_Move_Charged_3) - EVT_SET_CONST(LVar2, ANIM_HuffNPuff_Anim11) - EVT_SET_CONST(LVar3, ANIM_HuffNPuff_Anim12) - EVT_SET_CONST(LVar4, ANIM_HuffNPuff_Anim13) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SET_CONST(LVar2, ANIM_HuffNPuff_Anim01) - EVT_SET_CONST(LVar3, ANIM_HuffNPuff_Anim02) - EVT_SET_CONST(LVar4, ANIM_HuffNPuff_Anim03) - EVT_END_SWITCH - EVT_THREAD - EVT_SET(LVar0, PRT_MAIN) - EVT_SET(LVar1, LVar2) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, PRT_FACE) - EVT_SET(LVar1, LVar3) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, PRT_ARMS) - EVT_SET(LVar1, LVar4) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_THREAD - EVT_WAIT(30) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_Move_Charged_1) + CaseOrEq(AVAL_Move_Charged_2) + CaseOrEq(AVAL_Move_Charged_3) + SetConst(LVar2, ANIM_HuffNPuff_Anim11) + SetConst(LVar3, ANIM_HuffNPuff_Anim12) + SetConst(LVar4, ANIM_HuffNPuff_Anim13) + EndCaseGroup + CaseDefault + SetConst(LVar2, ANIM_HuffNPuff_Anim01) + SetConst(LVar3, ANIM_HuffNPuff_Anim02) + SetConst(LVar4, ANIM_HuffNPuff_Anim03) + EndSwitch + Thread + Set(LVar0, PRT_MAIN) + Set(LVar1, LVar2) + ExecWait(EVS_Enemy_NoDamageHit) + EndThread + Thread + Set(LVar0, PRT_FACE) + Set(LVar1, LVar3) + ExecWait(EVS_Enemy_NoDamageHit) + EndThread + Thread + Set(LVar0, PRT_ARMS) + Set(LVar1, LVar4) + ExecWait(EVS_Enemy_NoDamageHit) + EndThread + Wait(30) + Return + End }; EvtScript N(EVS_IncreaseWobble) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_WobbleMode, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_WobbleMode, 1) - EVT_CASE_EQ(1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_WobbleMode, 2) - EVT_CASE_EQ(2) + Call(GetActorVar, ACTOR_SELF, AVAR_WobbleMode, LVar0) + Switch(LVar0) + CaseEq(0) + Call(SetActorVar, ACTOR_SELF, AVAR_WobbleMode, 1) + CaseEq(1) + Call(SetActorVar, ACTOR_SELF, AVAR_WobbleMode, 2) + CaseEq(2) // can't increase any more - EVT_END_SWITCH - EVT_RETURN - EVT_END + EndSwitch + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_EXEC_WAIT(N(EVS_IncreaseWobble)) - EVT_EXEC_WAIT(N(EVS_HuffNPuff_Hit)) - EVT_CASE_EQ(EVENT_HIT) - EVT_EXEC_WAIT(N(EVS_IncreaseWobble)) - EVT_EXEC_WAIT(N(EVS_HuffNPuff_Hit)) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_BITWISE_AND_CONST(LVar0, ~AVAR_Flag_DamageCombo) - EVT_CALL(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_WobbleMode, 0) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_EXEC_WAIT(N(EVS_IncreaseWobble)) - EVT_EXEC_WAIT(N(EVS_HuffNPuff_BurnHit)) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_BITWISE_AND_CONST(LVar0, ~AVAR_Flag_DamageCombo) - EVT_CALL(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_WobbleMode, 0) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_EXEC_WAIT(N(EVS_IncreaseWobble)) - EVT_EXEC_WAIT(N(EVS_HuffNPuff_BurnHit)) - EVT_EXEC_WAIT(N(EVS_HuffNPuff_BurnDeath)) - EVT_RETURN - EVT_CASE_EQ(EVENT_ZERO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_HuffNPuff_NoDamage)) - EVT_CASE_EQ(EVENT_IMMUNE) - EVT_EXEC_WAIT(N(EVS_HuffNPuff_NoDamage)) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_BITWISE_AND_CONST(LVar0, ~AVAR_Flag_DamageCombo) - EVT_CALL(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_CASE_EQ(EVENT_DEATH) - EVT_EXEC_WAIT(N(EVS_IncreaseWobble)) - EVT_EXEC_WAIT(N(EVS_HuffNPuff_Hit)) - EVT_EXEC_WAIT(N(EVS_HuffNPuff_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_EXEC_WAIT(N(EVS_IncreaseWobble)) - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_EXEC_WAIT(N(EVS_HuffNPuff_NoDamage)) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_BITWISE_AND_CONST(LVar0, ~AVAR_Flag_DamageCombo) - EVT_CALL(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_WobbleMode, 0) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + ExecWait(N(EVS_IncreaseWobble)) + ExecWait(N(EVS_HuffNPuff_Hit)) + CaseEq(EVENT_HIT) + ExecWait(N(EVS_IncreaseWobble)) + ExecWait(N(EVS_HuffNPuff_Hit)) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + BitwiseAndConst(LVar0, ~AVAR_Flag_DamageCombo) + Call(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_WobbleMode, 0) + CaseEq(EVENT_BURN_HIT) + ExecWait(N(EVS_IncreaseWobble)) + ExecWait(N(EVS_HuffNPuff_BurnHit)) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + BitwiseAndConst(LVar0, ~AVAR_Flag_DamageCombo) + Call(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_WobbleMode, 0) + CaseEq(EVENT_BURN_DEATH) + ExecWait(N(EVS_IncreaseWobble)) + ExecWait(N(EVS_HuffNPuff_BurnHit)) + ExecWait(N(EVS_HuffNPuff_BurnDeath)) + Return + CaseEq(EVENT_ZERO_DAMAGE) + ExecWait(N(EVS_HuffNPuff_NoDamage)) + CaseEq(EVENT_IMMUNE) + ExecWait(N(EVS_HuffNPuff_NoDamage)) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + BitwiseAndConst(LVar0, ~AVAR_Flag_DamageCombo) + Call(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + CaseEq(EVENT_DEATH) + ExecWait(N(EVS_IncreaseWobble)) + ExecWait(N(EVS_HuffNPuff_Hit)) + ExecWait(N(EVS_HuffNPuff_Death)) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + ExecWait(N(EVS_IncreaseWobble)) + CaseEq(EVENT_AIR_LIFT_FAILED) + ExecWait(N(EVS_HuffNPuff_NoDamage)) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + BitwiseAndConst(LVar0, ~AVAR_Flag_DamageCombo) + Call(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_WobbleMode, 0) + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Dialogue_PummelPermission) = { - EVT_USE_ARRAY(N(RuffPuffDataBuffer)) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) + UseArray(N(RuffPuffDataBuffer)) + Call(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) #define HNP_GET_SPEAKER(idx) \ - EVT_IF_FLAG(LVar0, 1 << idx) \ - EVT_SET(LVar0, ArrayVar(idx)) \ - EVT_GOTO(0) \ - EVT_END_IF + IfFlag(LVar0, 1 << idx) \ + Set(LVar0, ArrayVar(idx)) \ + Goto(0) \ + EndIf // select the first available Tuff Puff FOR_CHILDREN_SCATTERED(HNP_GET_SPEAKER) - EVT_GOTO(1) + Goto(1) // found a Tuff Puff to speak - EVT_LABEL(0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_08) - EVT_CALL(BattleCamTargetActor, LVar0) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(SetBattleCamOffsetZ, -10) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_CALL(UseIdleAnimation, LVar0, FALSE) - EVT_CALL(GetActorVar, LVar0, AVAR_TuffPuff_IsLarge, LVar1) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(SetAnimation, LVar0, 1, ANIM_TuffPuff_Anim09) - EVT_CALL(ActorSpeak, MSG_CH6_00CF, LVar0, 1, ANIM_TuffPuff_Anim14, ANIM_TuffPuff_Anim02) - EVT_ELSE - EVT_CALL(ActorSpeak, MSG_CH6_00CF, LVar0, 1, ANIM_TuffPuff_Anim15, ANIM_TuffPuff_Anim03) - EVT_END_IF - EVT_CALL(UseIdleAnimation, LVar0, TRUE) - EVT_WAIT(20) + Label(0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_08) + Call(BattleCamTargetActor, LVar0) + Call(SetBattleCamZoom, 300) + Call(SetBattleCamOffsetZ, -10) + Call(MoveBattleCamOver, 30) + Wait(30) + Call(UseIdleAnimation, LVar0, FALSE) + Call(GetActorVar, LVar0, AVAR_TuffPuff_IsLarge, LVar1) + IfEq(LVar1, 0) + Call(SetAnimation, LVar0, 1, ANIM_TuffPuff_Anim09) + Call(ActorSpeak, MSG_CH6_00CF, LVar0, 1, ANIM_TuffPuff_Anim14, ANIM_TuffPuff_Anim02) + Else + Call(ActorSpeak, MSG_CH6_00CF, LVar0, 1, ANIM_TuffPuff_Anim15, ANIM_TuffPuff_Anim03) + EndIf + Call(UseIdleAnimation, LVar0, TRUE) + Wait(20) // Huff N Puff replies - EVT_LABEL(1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_08) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamZoom, 180) - EVT_CALL(SetBattleCamOffsetZ, -10) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim2D) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim2E) - EVT_CALL(ActorSpeak, MSG_CH6_00D0, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim2C, ANIM_HuffNPuff_Anim01) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim02) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim03) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_RETURN - EVT_END + Label(1) + Call(UseBattleCamPreset, BTL_CAM_PRESET_08) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamZoom, 180) + Call(SetBattleCamOffsetZ, -10) + Call(MoveBattleCamOver, 30) + Wait(30) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim2D) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim2E) + Call(ActorSpeak, MSG_CH6_00D0, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim2C, ANIM_HuffNPuff_Anim01) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim02) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim03) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Return + End }; EvtScript N(EVS_Dialogue_FullPower) = { - EVT_USE_ARRAY(N(RuffPuffDataBuffer)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_08) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamZoom, 180) - EVT_CALL(SetBattleCamOffsetZ, -10) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim2D) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim2E) - EVT_CALL(ActorSpeak, MSG_CH6_00D1, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim2C, ANIM_HuffNPuff_Anim01) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim02) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim03) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) + UseArray(N(RuffPuffDataBuffer)) + Call(UseBattleCamPreset, BTL_CAM_PRESET_08) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamZoom, 180) + Call(SetBattleCamOffsetZ, -10) + Call(MoveBattleCamOver, 30) + Wait(30) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim2D) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim2E) + Call(ActorSpeak, MSG_CH6_00D1, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim2C, ANIM_HuffNPuff_Anim01) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim02) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim03) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Call(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) #define HNP_GET_SPEAKER(idx) \ - EVT_IF_FLAG(LVar0, 1 << idx) \ - EVT_SET(LVar0, ArrayVar(idx)) \ - EVT_GOTO(0) \ - EVT_END_IF + IfFlag(LVar0, 1 << idx) \ + Set(LVar0, ArrayVar(idx)) \ + Goto(0) \ + EndIf // select the first available Tuff Puff FOR_CHILDREN_SCATTERED(HNP_GET_SPEAKER) - EVT_GOTO(1) + Goto(1) // found a Tuff Puff to speak - EVT_LABEL(0) - EVT_CALL(BattleCamTargetActor, LVar0) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(SetBattleCamOffsetZ, -10) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_CALL(GetActorPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_IF_LT(LVar1, LVar4) - EVT_SETF(LVar7, EVT_FLOAT(0.0)) - EVT_LOOP(10) - EVT_ADDF(LVar7, EVT_FLOAT(18.0)) - EVT_CALL(SetActorYaw, LVar0, LVar7) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_IF - EVT_CALL(UseIdleAnimation, LVar0, FALSE) - EVT_CALL(GetActorVar, LVar0, AVAR_TuffPuff_IsLarge, LVar1) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(SetAnimation, LVar0, 1, ANIM_TuffPuff_Anim09) - EVT_CALL(ActorSpeak, MSG_CH6_00D2, LVar0, 1, ANIM_TuffPuff_Anim14, ANIM_TuffPuff_Anim02) - EVT_ELSE - EVT_CALL(ActorSpeak, MSG_CH6_00D2, LVar0, 1, ANIM_TuffPuff_Anim15, ANIM_TuffPuff_Anim03) - EVT_END_IF - EVT_CALL(UseIdleAnimation, LVar0, TRUE) - EVT_CALL(GetActorPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_IF_LT(LVar1, LVar4) - EVT_SETF(LVar7, EVT_FLOAT(180.0)) - EVT_LOOP(10) - EVT_SUBF(LVar7, EVT_FLOAT(18.0)) - EVT_CALL(SetActorYaw, LVar0, LVar7) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_IF + Label(0) + Call(BattleCamTargetActor, LVar0) + Call(SetBattleCamZoom, 300) + Call(SetBattleCamOffsetZ, -10) + Call(MoveBattleCamOver, 30) + Wait(30) + Call(GetActorPos, LVar0, LVar1, LVar2, LVar3) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + IfLt(LVar1, LVar4) + SetF(LVar7, Float(0.0)) + Loop(10) + AddF(LVar7, Float(18.0)) + Call(SetActorYaw, LVar0, LVar7) + Wait(1) + EndLoop + EndIf + Call(UseIdleAnimation, LVar0, FALSE) + Call(GetActorVar, LVar0, AVAR_TuffPuff_IsLarge, LVar1) + IfEq(LVar1, 0) + Call(SetAnimation, LVar0, 1, ANIM_TuffPuff_Anim09) + Call(ActorSpeak, MSG_CH6_00D2, LVar0, 1, ANIM_TuffPuff_Anim14, ANIM_TuffPuff_Anim02) + Else + Call(ActorSpeak, MSG_CH6_00D2, LVar0, 1, ANIM_TuffPuff_Anim15, ANIM_TuffPuff_Anim03) + EndIf + Call(UseIdleAnimation, LVar0, TRUE) + Call(GetActorPos, LVar0, LVar1, LVar2, LVar3) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + IfLt(LVar1, LVar4) + SetF(LVar7, Float(180.0)) + Loop(10) + SubF(LVar7, Float(18.0)) + Call(SetActorYaw, LVar0, LVar7) + Wait(1) + EndLoop + EndIf // done speaking - EVT_LABEL(1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_RETURN - EVT_END + Label(1) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Return + End }; EvtScript N(EVS_Dialogue_PraiseHuff) = { - EVT_USE_ARRAY(N(RuffPuffDataBuffer)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_08) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamZoom, 180) - EVT_CALL(SetBattleCamOffsetZ, -10) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim18) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim19) - EVT_CALL(ActorSpeak, MSG_CH6_00D3, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim17, ANIM_HuffNPuff_Anim17) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim02) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim03) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) + UseArray(N(RuffPuffDataBuffer)) + Call(UseBattleCamPreset, BTL_CAM_PRESET_08) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamZoom, 180) + Call(SetBattleCamOffsetZ, -10) + Call(MoveBattleCamOver, 30) + Wait(30) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim18) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim19) + Call(ActorSpeak, MSG_CH6_00D3, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim17, ANIM_HuffNPuff_Anim17) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim02) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim03) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Call(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) #define HNP_GET_SPEAKER(idx) \ - EVT_IF_FLAG(LVar0, 1 << idx) \ - EVT_SET(LVar0, ArrayVar(idx)) \ - EVT_GOTO(0) \ - EVT_END_IF + IfFlag(LVar0, 1 << idx) \ + Set(LVar0, ArrayVar(idx)) \ + Goto(0) \ + EndIf // select the first available Tuff Puff FOR_CHILDREN_SCATTERED(HNP_GET_SPEAKER) - EVT_GOTO(1) + Goto(1) // found a Tuff Puff to speak - EVT_LABEL(0) - EVT_CALL(BattleCamTargetActor, LVar0) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(SetBattleCamOffsetZ, -10) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_CALL(GetActorPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_IF_LT(LVar1, LVar4) - EVT_SETF(LVar7, EVT_FLOAT(0.0)) - EVT_LOOP(10) - EVT_ADDF(LVar7, EVT_FLOAT(18.0)) - EVT_CALL(SetActorYaw, LVar0, LVar7) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_IF - EVT_CALL(UseIdleAnimation, LVar0, FALSE) - EVT_CALL(GetActorVar, LVar0, AVAR_TuffPuff_IsLarge, LVar1) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(ActorSpeak, MSG_CH6_00D4, LVar0, 1, ANIM_TuffPuff_Anim14, ANIM_TuffPuff_Anim02) - EVT_ELSE - EVT_CALL(ActorSpeak, MSG_CH6_00D4, LVar0, 1, ANIM_TuffPuff_Anim15, ANIM_TuffPuff_Anim03) - EVT_END_IF - EVT_CALL(UseIdleAnimation, LVar0, TRUE) - EVT_CALL(GetActorPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_IF_LT(LVar1, LVar4) - EVT_SETF(LVar7, EVT_FLOAT(180.0)) - EVT_LOOP(10) - EVT_SUBF(LVar7, EVT_FLOAT(18.0)) - EVT_CALL(SetActorYaw, LVar0, LVar7) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_IF + Label(0) + Call(BattleCamTargetActor, LVar0) + Call(SetBattleCamZoom, 300) + Call(SetBattleCamOffsetZ, -10) + Call(MoveBattleCamOver, 30) + Wait(30) + Call(GetActorPos, LVar0, LVar1, LVar2, LVar3) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + IfLt(LVar1, LVar4) + SetF(LVar7, Float(0.0)) + Loop(10) + AddF(LVar7, Float(18.0)) + Call(SetActorYaw, LVar0, LVar7) + Wait(1) + EndLoop + EndIf + Call(UseIdleAnimation, LVar0, FALSE) + Call(GetActorVar, LVar0, AVAR_TuffPuff_IsLarge, LVar1) + IfEq(LVar1, 0) + Call(ActorSpeak, MSG_CH6_00D4, LVar0, 1, ANIM_TuffPuff_Anim14, ANIM_TuffPuff_Anim02) + Else + Call(ActorSpeak, MSG_CH6_00D4, LVar0, 1, ANIM_TuffPuff_Anim15, ANIM_TuffPuff_Anim03) + EndIf + Call(UseIdleAnimation, LVar0, TRUE) + Call(GetActorPos, LVar0, LVar1, LVar2, LVar3) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + IfLt(LVar1, LVar4) + SetF(LVar7, Float(180.0)) + Loop(10) + SubF(LVar7, Float(18.0)) + Call(SetActorYaw, LVar0, LVar7) + Wait(1) + EndLoop + EndIf // done speaking - EVT_LABEL(1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_RETURN - EVT_END + Label(1) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Return + End }; EvtScript N(EVS_Dialogue_Concerned) = { - EVT_USE_ARRAY(N(RuffPuffDataBuffer)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_08) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamZoom, 180) - EVT_CALL(SetBattleCamOffsetZ, -10) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim24) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim25) - EVT_CALL(ActorSpeak, MSG_CH6_00D5, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim23, ANIM_HuffNPuff_Anim23) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim02) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim03) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) + UseArray(N(RuffPuffDataBuffer)) + Call(UseBattleCamPreset, BTL_CAM_PRESET_08) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamZoom, 180) + Call(SetBattleCamOffsetZ, -10) + Call(MoveBattleCamOver, 30) + Wait(30) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim24) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim25) + Call(ActorSpeak, MSG_CH6_00D5, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim23, ANIM_HuffNPuff_Anim23) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim02) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim03) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Call(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) #define HNP_GET_SPEAKER(idx) \ - EVT_IF_FLAG(LVar0, 1 << idx) \ - EVT_SET(LVar0, ArrayVar(idx)) \ - EVT_GOTO(0) \ - EVT_END_IF + IfFlag(LVar0, 1 << idx) \ + Set(LVar0, ArrayVar(idx)) \ + Goto(0) \ + EndIf // select the first available Tuff Puff FOR_CHILDREN_SCATTERED(HNP_GET_SPEAKER) - EVT_GOTO(1) + Goto(1) // found a Tuff Puff to speak - EVT_LABEL(0) - EVT_CALL(BattleCamTargetActor, LVar0) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(SetBattleCamOffsetZ, -10) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_CALL(UseIdleAnimation, LVar0, FALSE) - EVT_CALL(GetActorVar, LVar0, AVAR_TuffPuff_IsLarge, LVar1) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(ActorSpeak, MSG_CH6_00D6, LVar0, 1, ANIM_TuffPuff_Anim14, ANIM_TuffPuff_Anim02) - EVT_ELSE - EVT_CALL(ActorSpeak, MSG_CH6_00D6, LVar0, 1, ANIM_TuffPuff_Anim15, ANIM_TuffPuff_Anim03) - EVT_END_IF - EVT_CALL(UseIdleAnimation, LVar0, TRUE) + Label(0) + Call(BattleCamTargetActor, LVar0) + Call(SetBattleCamZoom, 300) + Call(SetBattleCamOffsetZ, -10) + Call(MoveBattleCamOver, 30) + Wait(30) + Call(UseIdleAnimation, LVar0, FALSE) + Call(GetActorVar, LVar0, AVAR_TuffPuff_IsLarge, LVar1) + IfEq(LVar1, 0) + Call(ActorSpeak, MSG_CH6_00D6, LVar0, 1, ANIM_TuffPuff_Anim14, ANIM_TuffPuff_Anim02) + Else + Call(ActorSpeak, MSG_CH6_00D6, LVar0, 1, ANIM_TuffPuff_Anim15, ANIM_TuffPuff_Anim03) + EndIf + Call(UseIdleAnimation, LVar0, TRUE) // Huff N Puff replies - EVT_LABEL(1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_08) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamZoom, 180) - EVT_CALL(SetBattleCamOffsetZ, -10) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim24) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim25) - EVT_CALL(ActorSpeak, MSG_CH6_00D7, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim23, ANIM_HuffNPuff_Anim23) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim02) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim03) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_RETURN - EVT_END + Label(1) + Call(UseBattleCamPreset, BTL_CAM_PRESET_08) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamZoom, 180) + Call(SetBattleCamOffsetZ, -10) + Call(MoveBattleCamOver, 30) + Wait(30) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim24) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim25) + Call(ActorSpeak, MSG_CH6_00D7, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim23, ANIM_HuffNPuff_Anim23) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim02) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim03) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Return + End }; EvtScript N(EVS_TakeTurn) = { // if charged with less than 5 HP, switch upcoming move to a group slam - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_Move_Charged_1) - EVT_CASE_OR_EQ(AVAL_Move_Charged_2) - EVT_CASE_OR_EQ(AVAL_Move_Charged_3) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_IF_LE(LVar0, 5) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Desperation) - EVT_END_IF - EVT_END_SWITCH + Call(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_Move_Charged_1) + CaseOrEq(AVAL_Move_Charged_2) + CaseOrEq(AVAL_Move_Charged_3) + EndCaseGroup + CaseDefault + Call(GetActorHP, ACTOR_SELF, LVar0) + IfLe(LVar0, 5) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Desperation) + EndIf + EndSwitch // try dialogue before charging for the first time - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Move_PreCharge_1) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_IF_NOT_FLAG(LVar0, AVAL_Dialogue_FullPower) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AVAL_Dialogue_FullPower) - EVT_CALL(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_EXEC_WAIT(N(EVS_Dialogue_FullPower)) - EVT_END_IF - EVT_END_SWITCH + Call(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) + Switch(LVar0) + CaseEq(AVAL_Move_PreCharge_1) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + IfNotFlag(LVar0, AVAL_Dialogue_FullPower) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + BitwiseOrConst(LVar0, AVAL_Dialogue_FullPower) + Call(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + ExecWait(N(EVS_Dialogue_FullPower)) + EndIf + EndSwitch // try Tuff Puff swarm attack - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_IF_NOT_FLAG(LVar0, AVAL_Dialogue_Request) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AVAL_Dialogue_Request) - EVT_CALL(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_EXEC_WAIT(N(EVS_Dialogue_PummelPermission)) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_Attack_TuffPuffSwarm)) - EVT_END_IF - EVT_CALL(GetPlayerHP, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF + Call(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) + IfNe(LVar0, 0) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + IfNotFlag(LVar0, AVAL_Dialogue_Request) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + BitwiseOrConst(LVar0, AVAL_Dialogue_Request) + Call(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + ExecWait(N(EVS_Dialogue_PummelPermission)) + EndIf + ExecWait(N(EVS_Attack_TuffPuffSwarm)) + EndIf + Call(GetPlayerHP, LVar0) + IfEq(LVar0, 0) + Return + EndIf // try dialogue before first group slam - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Move_Desperation) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_IF_NOT_FLAG(LVar0, AVAL_Dialogue_Concerned) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AVAL_Dialogue_Concerned) - EVT_CALL(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_EXEC_WAIT(N(EVS_Dialogue_Concerned)) - EVT_END_IF - EVT_END_SWITCH + Call(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) + Switch(LVar0) + CaseEq(AVAL_Move_Desperation) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + IfNotFlag(LVar0, AVAL_Dialogue_Concerned) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + BitwiseOrConst(LVar0, AVAL_Dialogue_Concerned) + Call(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + ExecWait(N(EVS_Dialogue_Concerned)) + EndIf + EndSwitch // select move according to fixed rotation through states - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Move_Basic_1) - EVT_EXEC_WAIT(N(EVS_Move_HealOrSlam)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Breath_1) - EVT_CASE_EQ(AVAL_Move_Breath_1) - EVT_EXEC_WAIT(N(EVS_Move_HurricaneBreath)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Basic_2) - EVT_CASE_EQ(AVAL_Move_Basic_2) - EVT_EXEC_WAIT(N(EVS_Move_HealOrSlam)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_PreCharge_1) - EVT_CASE_EQ(AVAL_Move_PreCharge_1) - EVT_EXEC_WAIT(N(EVS_Move_ChargeForGround)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Charged_1) - EVT_CASE_EQ(AVAL_Move_Charged_1) - EVT_EXEC_WAIT(N(EVS_Attack_GroundLightning)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Basic_3) - EVT_CASE_EQ(AVAL_Move_Basic_3) - EVT_EXEC_WAIT(N(EVS_Move_HealOrSlam)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Breath_2) - EVT_CASE_EQ(AVAL_Move_Breath_2) - EVT_EXEC_WAIT(N(EVS_Move_HurricaneBreath)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_PreCharge_2) - EVT_CASE_EQ(AVAL_Move_PreCharge_2) - EVT_EXEC_WAIT(N(EVS_Move_ChargeForDirect)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Charged_2) - EVT_CASE_EQ(AVAL_Move_Charged_2) - EVT_EXEC_WAIT(N(EVS_Attack_DirectLightning)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Basic_4) - EVT_CASE_EQ(AVAL_Move_Basic_4) - EVT_EXEC_WAIT(N(EVS_Move_HealOrSlam)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_PreCharge_3) - EVT_CASE_EQ(AVAL_Move_PreCharge_3) - EVT_EXEC_WAIT(N(EVS_Move_ChargeForGround)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Charged_3) - EVT_CASE_EQ(AVAL_Move_Charged_3) - EVT_EXEC_WAIT(N(EVS_Attack_GroundLightning)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Basic_1) - EVT_CASE_EQ(AVAL_Move_Desperation) - EVT_EXEC_WAIT(N(EVS_Attack_GroupSlam)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) + Switch(LVar0) + CaseEq(AVAL_Move_Basic_1) + ExecWait(N(EVS_Move_HealOrSlam)) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Breath_1) + CaseEq(AVAL_Move_Breath_1) + ExecWait(N(EVS_Move_HurricaneBreath)) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Basic_2) + CaseEq(AVAL_Move_Basic_2) + ExecWait(N(EVS_Move_HealOrSlam)) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_PreCharge_1) + CaseEq(AVAL_Move_PreCharge_1) + ExecWait(N(EVS_Move_ChargeForGround)) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Charged_1) + CaseEq(AVAL_Move_Charged_1) + ExecWait(N(EVS_Attack_GroundLightning)) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Basic_3) + CaseEq(AVAL_Move_Basic_3) + ExecWait(N(EVS_Move_HealOrSlam)) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Breath_2) + CaseEq(AVAL_Move_Breath_2) + ExecWait(N(EVS_Move_HurricaneBreath)) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_PreCharge_2) + CaseEq(AVAL_Move_PreCharge_2) + ExecWait(N(EVS_Move_ChargeForDirect)) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Charged_2) + CaseEq(AVAL_Move_Charged_2) + ExecWait(N(EVS_Attack_DirectLightning)) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Basic_4) + CaseEq(AVAL_Move_Basic_4) + ExecWait(N(EVS_Move_HealOrSlam)) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_PreCharge_3) + CaseEq(AVAL_Move_PreCharge_3) + ExecWait(N(EVS_Move_ChargeForGround)) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Charged_3) + CaseEq(AVAL_Move_Charged_3) + ExecWait(N(EVS_Attack_GroundLightning)) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Basic_1) + CaseEq(AVAL_Move_Desperation) + ExecWait(N(EVS_Attack_GroupSlam)) + EndSwitch + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) - EVT_CASE_EQ(PHASE_ENEMY_END) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_IF_FLAG(LVar0, AVAR_Flag_LightningHit) - EVT_IF_NOT_FLAG(LVar0, AVAL_Dialogue_Praise) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AVAL_Dialogue_Praise) - EVT_CALL(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_EXEC_WAIT(N(EVS_Dialogue_PraiseHuff)) - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) + CaseEq(PHASE_ENEMY_BEGIN) + CaseEq(PHASE_ENEMY_END) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + IfFlag(LVar0, AVAR_Flag_LightningHit) + IfNotFlag(LVar0, AVAL_Dialogue_Praise) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + BitwiseOrConst(LVar0, AVAL_Dialogue_Praise) + Call(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + ExecWait(N(EVS_Dialogue_PraiseHuff)) + EndIf + EndIf + EndSwitch + Return + End }; EvtScript N(EVS_Attack_BodySlam) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(AddBattleCamZoom, -200) - EVT_CALL(SetBattleCamOffsetZ, -30) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar1) - EVT_SETF(LVar2, EVT_FLOAT(62.5)) - EVT_SETF(LVar3, EVT_FLOAT(47.5)) - EVT_MULF(LVar2, LVar0) - EVT_MULF(LVar3, LVar1) - EVT_DIVF(LVar2, EVT_FLOAT(100.0)) - EVT_DIVF(LVar3, EVT_FLOAT(100.0)) - EVT_CALL(AddGoalPos, ACTOR_SELF, LVar2, LVar3, 0) - EVT_CALL(AddGoalPos, ACTOR_SELF, 0, 20, 0) - EVT_CALL(FlyToGoal, ACTOR_SELF, 40, -20, EASING_SIN_OUT) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LARGE_ACTOR_JUMP) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_01) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim0B) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim0C) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim0D) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar5, LVar6, LVar7) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar5, LVar3, LVar7) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, FALSE, FALSE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(0.8)) - EVT_END_THREAD - EVT_IF_EQ(LVar0, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim04) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim05) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim06) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(AddGoalPos, ACTOR_SELF, -80, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 25, FALSE, FALSE, FALSE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 8, EVT_FLOAT(0.6)) - EVT_END_THREAD - EVT_CALL(AddGoalPos, ACTOR_SELF, -50, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, FALSE, FALSE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 6, EVT_FLOAT(0.4)) - EVT_END_THREAD - EVT_CALL(AddGoalPos, ACTOR_SELF, -30, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_CALL(AddGoalPos, ACTOR_SELF, -20, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim01) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim02) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim03) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(FlyToGoal, ACTOR_SELF, 80, -20, EASING_SIN_OUT) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim0B) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim0C) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim0D) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 0, LVar3, 5) - EVT_CALL(AddGoalPos, ACTOR_SELF, 0, -30, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, FALSE, FALSE) - EVT_CALL(SetDamageSource, DMG_SRC_CRUSH) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar1) - EVT_MUL(LVar0, 100) - EVT_DIV(LVar0, LVar1) - EVT_SWITCH(LVar0) - EVT_CASE_LE(20) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_SHOCK_CONTACT, 0, DMG_SLAM, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_LE(40) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_SHOCK_CONTACT, 0, DMG_SLAM, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_LE(60) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_SHOCK_CONTACT, 0, DMG_SLAM, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_LE(80) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_SHOCK_CONTACT, 0, DMG_SLAM, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_DEFAULT - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_SHOCK_CONTACT, 0, DMG_SLAM, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 20, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_ATK_BLOCKED) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_STONE) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_WAIT(55) - EVT_PLAY_EFFECT(EFFECT_CLOUD_PUFF, LVar0, LVar1, LVar2, 0, 0) - EVT_END_THREAD - EVT_END_IF - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(AddGoalPos, ACTOR_SELF, 30, 0, 0) - EVT_CALL(JumpWithBounce, ACTOR_SELF, 20, EVT_FLOAT(4.0)) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim01) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim02) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim03) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(FlyToGoal, ACTOR_SELF, 40, -20, EASING_SIN_OUT) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(AddBattleCamZoom, -200) + Call(SetBattleCamOffsetZ, -30) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar1) + SetF(LVar2, Float(62.5)) + SetF(LVar3, Float(47.5)) + MulF(LVar2, LVar0) + MulF(LVar3, LVar1) + DivF(LVar2, Float(100.0)) + DivF(LVar3, Float(100.0)) + Call(AddGoalPos, ACTOR_SELF, LVar2, LVar3, 0) + Call(AddGoalPos, ACTOR_SELF, 0, 20, 0) + Call(FlyToGoal, ACTOR_SELF, 40, -20, EASING_SIN_OUT) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LARGE_ACTOR_JUMP) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(UseBattleCamPreset, BTL_CAM_PRESET_01) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim0B) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim0C) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim0D) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar5, LVar6, LVar7) + Call(SetGoalPos, ACTOR_SELF, LVar5, LVar3, LVar7) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, FALSE, FALSE) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(0.8)) + EndThread + IfEq(LVar0, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim04) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim05) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim06) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(AddGoalPos, ACTOR_SELF, -80, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 25, FALSE, FALSE, FALSE) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 8, Float(0.6)) + EndThread + Call(AddGoalPos, ACTOR_SELF, -50, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, FALSE, FALSE) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.4)) + EndThread + Call(AddGoalPos, ACTOR_SELF, -30, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.2)) + EndThread + Call(AddGoalPos, ACTOR_SELF, -20, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim01) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim02) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim03) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetGoalToHome, ACTOR_SELF) + Call(FlyToGoal, ACTOR_SELF, 80, -20, EASING_SIN_OUT) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim0B) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim0C) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim0D) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 0, LVar3, 5) + Call(AddGoalPos, ACTOR_SELF, 0, -30, 0) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, FALSE, FALSE) + Call(SetDamageSource, DMG_SRC_CRUSH) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetActorHP, ACTOR_SELF, LVar0) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar1) + Mul(LVar0, 100) + Div(LVar0, LVar1) + Switch(LVar0) + CaseLe(20) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_SHOCK_CONTACT, 0, DMG_SLAM, BS_FLAGS1_TRIGGER_EVENTS) + CaseLe(40) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_SHOCK_CONTACT, 0, DMG_SLAM, BS_FLAGS1_TRIGGER_EVENTS) + CaseLe(60) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_SHOCK_CONTACT, 0, DMG_SLAM, BS_FLAGS1_TRIGGER_EVENTS) + CaseLe(80) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_SHOCK_CONTACT, 0, DMG_SLAM, BS_FLAGS1_TRIGGER_EVENTS) + CaseDefault + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_SHOCK_CONTACT, 0, DMG_SLAM, BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 20, Float(1.0)) + EndThread + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetBattleFlags, LVar0) + IfNotFlag(LVar0, BS_FLAGS1_ATK_BLOCKED) + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_STONE) + Thread + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 10) + Wait(55) + PlayEffect(EFFECT_CLOUD_PUFF, LVar0, LVar1, LVar2, 0, 0) + EndThread + EndIf + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(AddGoalPos, ACTOR_SELF, 30, 0, 0) + Call(JumpWithBounce, ACTOR_SELF, 20, Float(4.0)) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim01) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim02) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim03) + Call(SetGoalToHome, ACTOR_SELF) + Call(FlyToGoal, ACTOR_SELF, 40, -20, EASING_SIN_OUT) + EndCaseGroup + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_RuffPuff_Inhale) = { - EVT_USE_ARRAY(N(RuffPuffDataBuffer)) - EVT_CALL(SetOwnerID, LVar0) // note: ownership transferred to Tuff Puff actor here - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar2, LVar3, LVar4) - EVT_CALL(GetActorPos, ACTOR_HUFF_N_PUFF, LVar5, LVar6, LVar7) - EVT_ADD(LVar5, -13) - EVT_ADD(LVar6, 0) - EVT_ADD(LVar7, 0) - EVT_CALL(N(MakeSuctionPath), LVar1, LVar2, LVar3, LVar4, LVar5, LVar6, LVar7) - EVT_THREAD - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TuffPuff_WobbleMode, 1) - EVT_WAIT(10) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TuffPuff_WobbleMode, 2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TuffPuff_IsLarge, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TuffPuff_Anim12) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TuffPuff_Anim13) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(15) - EVT_THREAD - EVT_WAIT(35) - EVT_CALL(MakeLerp, 255, 0, 10, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_END_THREAD - EVT_SWITCH(LVar1) + UseArray(N(RuffPuffDataBuffer)) + Call(SetOwnerID, LVar0) // note: ownership transferred to Tuff Puff actor here + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar2, LVar3, LVar4) + Call(GetActorPos, ACTOR_HUFF_N_PUFF, LVar5, LVar6, LVar7) + Add(LVar5, -13) + Add(LVar6, 0) + Add(LVar7, 0) + Call(N(MakeSuctionPath), LVar1, LVar2, LVar3, LVar4, LVar5, LVar6, LVar7) + Thread + Call(SetActorVar, ACTOR_SELF, AVAR_TuffPuff_WobbleMode, 1) + Wait(10) + Call(SetActorVar, ACTOR_SELF, AVAR_TuffPuff_WobbleMode, 2) + Call(GetActorVar, ACTOR_SELF, AVAR_TuffPuff_IsLarge, LVar0) + IfEq(LVar0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TuffPuff_Anim12) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TuffPuff_Anim13) + EndIf + EndThread + Wait(15) + Thread + Wait(35) + Call(MakeLerp, 255, 0, 10, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) + EndThread + Switch(LVar1) #define HNP_LOAD_SUCTION_PATH(idx) \ - EVT_CASE_EQ(idx) \ - EVT_CALL(LoadPath, 40, EVT_PTR(N(SuctionPaths)[idx]), 3, EASING_QUADRATIC_IN) + CaseEq(idx) \ + Call(LoadPath, 40, Ref(N(SuctionPaths)[idx]), 3, EASING_QUADRATIC_IN) // select the suction path for this Tuff Puff FOR_CHILDREN_ORDERED(HNP_LOAD_SUCTION_PATH) - EVT_END_SWITCH - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVarA) - EVT_MUL(LVarA, 1) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_ScaleX, LVar0) - EVT_ADD(LVar0, LVarA) - EVT_IF_GT(LVar0, 100) - EVT_SET(LVar0, 100) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_ScaleX, LVar0) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_ScaleY, LVar0) - EVT_ADD(LVar0, LVarA) - EVT_IF_GT(LVar0, 100) - EVT_SET(LVar0, 100) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_ScaleY, LVar0) - EVT_EXEC_WAIT(N(EVS_UpdateSize)) - EVT_WAIT(10) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + EndSwitch + Label(0) + Call(GetNextPathPos) + Call(SetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(0) + EndIf + Call(GetEnemyMaxHP, ACTOR_SELF, LVarA) + Mul(LVarA, 1) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_ScaleX, LVar0) + Add(LVar0, LVarA) + IfGt(LVar0, 100) + Set(LVar0, 100) + EndIf + Call(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_ScaleX, LVar0) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_ScaleY, LVar0) + Add(LVar0, LVarA) + IfGt(LVar0, 100) + Set(LVar0, 100) + EndIf + Call(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_ScaleY, LVar0) + ExecWait(N(EVS_UpdateSize)) + Wait(10) + Call(RemoveActor, ACTOR_SELF) + Return + End }; EvtScript N(EVS_Move_HealOrSlam) = { - EVT_USE_ARRAY(N(RuffPuffDataBuffer)) + UseArray(N(RuffPuffDataBuffer)) // use basic attack if no Tuff Puffs are present - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar9) - EVT_IF_EQ(LVar9, 0) - EVT_EXEC_WAIT(N(EVS_Attack_BodySlam)) - EVT_RETURN - EVT_END_IF - EVT_SET(LVarA, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar9) + IfEq(LVar9, 0) + ExecWait(N(EVS_Attack_BodySlam)) + Return + EndIf + Set(LVarA, 0) #define HNP_ADD_HEAL_VALUE(idx) \ - EVT_IF_FLAG(LVar9, 1 << idx) \ - EVT_CALL(GetActorVar, ArrayVar(idx), AVAR_TuffPuff_HealValue, LVarB) \ - EVT_ADD(LVarA, LVarB) \ - EVT_END_IF + IfFlag(LVar9, 1 << idx) \ + Call(GetActorVar, ArrayVar(idx), AVAR_TuffPuff_HealValue, LVarB) \ + Add(LVarA, LVarB) \ + EndIf // add heal values from Tuff Puffs FOR_CHILDREN_ORDERED(HNP_ADD_HEAL_VALUE) // 50% chance to use basic attack if healing would give 2 or less HP and Huff has healed before - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_IF_FLAG(LVar0, AVAL_Flag_HasHealed) - EVT_IF_LE(LVarA, 2) - EVT_CALL(RandInt, 100, LVarB) - EVT_IF_LT(LVarB, 50) - EVT_EXEC_WAIT(N(EVS_Attack_BodySlam)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HUFF_N_PUFF_INHALE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim1A) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim1B) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim1C) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -13) - EVT_ADD(LVar1, 0) - EVT_ADD(LVar2, 0) - EVT_CALL(N(HuffPuffBreath), 0, LVar0, LVar1, LVar2, EVT_FLOAT(180.0), EVT_FLOAT(-1.0), EVT_FLOAT(1.2), 0, LVar8) - EVT_CALL(N(StartRumbleWithParams), 80, 220) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 110, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_WAIT(20) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BIG_POWER_UP) - EVT_SET(LVar1, 0) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + IfFlag(LVar0, AVAL_Flag_HasHealed) + IfLe(LVarA, 2) + Call(RandInt, 100, LVarB) + IfLt(LVarB, 50) + ExecWait(N(EVS_Attack_BodySlam)) + Return + EndIf + EndIf + EndIf + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HUFF_N_PUFF_INHALE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim1A) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim1B) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim1C) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, -13) + Add(LVar1, 0) + Add(LVar2, 0) + Call(N(HuffPuffBreath), 0, LVar0, LVar1, LVar2, Float(180.0), Float(-1.0), Float(1.2), 0, LVar8) + Call(N(StartRumbleWithParams), 80, 220) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 110, Float(0.3)) + EndThread + Wait(20) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BIG_POWER_UP) + Set(LVar1, 0) #define HNP_INHALE_CHILD(idx) \ - EVT_IF_FLAG(LVar9, 1 << idx) \ - EVT_SET(LVar0, ArrayVar(idx)) \ - EVT_EXEC_GET_TID(N(EVS_RuffPuff_Inhale), LVar7) \ - EVT_ADD(LVar1, 1) \ - EVT_WAIT(5) \ - EVT_END_IF + IfFlag(LVar9, 1 << idx) \ + Set(LVar0, ArrayVar(idx)) \ + ExecGetTID(N(EVS_RuffPuff_Inhale), LVar7) \ + Add(LVar1, 1) \ + Wait(5) \ + EndIf // inhale each Tuff Puff FOR_CHILDREN_SCATTERED(HNP_INHALE_CHILD) - EVT_LABEL(0) - EVT_IS_THREAD_RUNNING(LVar7, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(RemoveEffect, LVar8) - EVT_CALL(StopSound, SOUND_HUFF_N_PUFF_INHALE) - EVT_CALL(StopSound, SOUND_BIG_POWER_UP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim17) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim18) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim19) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar3) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, LVar3, 0) - EVT_ADD(LVar0, 20) - EVT_PLAY_EFFECT(EFFECT_RECOVER, 0, LVar0, LVar1, LVar2, LVarA, 0) - EVT_CALL(GetActorHP, ACTOR_SELF, LVarB) - EVT_ADD(LVarB, LVarA) - EVT_CALL(SetEnemyHP, ACTOR_SELF, LVarB) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ChildBits, 0) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AVAL_Flag_HasHealed) - EVT_CALL(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Label(0) + IsThreadRunning(LVar7, LVar0) + Wait(1) + IfEq(LVar0, 1) + Goto(0) + EndIf + Call(RemoveEffect, LVar8) + Call(StopSound, SOUND_HUFF_N_PUFF_INHALE) + Call(StopSound, SOUND_BIG_POWER_UP) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim17) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim18) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim19) + Thread + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) + EndThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar3) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, LVar3, 0) + Add(LVar0, 20) + PlayEffect(EFFECT_RECOVER, 0, LVar0, LVar1, LVar2, LVarA, 0) + Call(GetActorHP, ACTOR_SELF, LVarB) + Add(LVarB, LVarA) + Call(SetEnemyHP, ACTOR_SELF, LVarB) + Call(SetActorVar, ACTOR_SELF, AVAR_ChildBits, 0) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + BitwiseOrConst(LVar0, AVAL_Flag_HasHealed) + Call(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Move_HurricaneBreath) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim1A) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim1B) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim1C) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar3) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar4) - EVT_MULF(LVar3, EVT_FLOAT(-13.0)) - EVT_MULF(LVar4, EVT_FLOAT(0.0)) - EVT_DIVF(LVar3, EVT_FLOAT(100.0)) - EVT_DIVF(LVar4, EVT_FLOAT(100.0)) - EVT_ADD(LVar0, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_PLAY_EFFECT(EFFECT_HUFF_PUFF_BREATH, 1, LVar0, LVar1, LVar2, EVT_FLOAT(190.0), EVT_FLOAT(-1.0), EVT_FLOAT(1.5), 100, 0) - EVT_CALL(N(StartRumbleWithParams), 80, 150) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 75, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar2) - EVT_SET(LVar3, LVar2) - EVT_ADD(LVar3, 25) - EVT_CALL(MakeLerp, LVar2, LVar3, 90, EASING_SIN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar2) - EVT_SET(LVar3, LVar2) - EVT_ADD(LVar3, 25) - EVT_CALL(MakeLerp, LVar2, LVar3, 90, EASING_SIN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HUFF_N_PUFF_INHALE) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BIG_POWER_UP) - EVT_END_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(SetBattleCamOffsetZ, 20) - EVT_CALL(MoveBattleCamOver, 180) - EVT_WAIT(90) - EVT_CALL(StopSound, SOUND_HUFF_N_PUFF_INHALE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim1D) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim1D) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim1E) - EVT_WAIT(60) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim21) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim22) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_WIND_LOOP) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 15) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SET(LVarA, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar2) - EVT_SET(LVar3, LVar2) - EVT_SUB(LVar3, 25) - EVT_CALL(MakeLerp, LVar2, LVar3, 40, EASING_CUBIC_IN) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar2) - EVT_SET(LVar3, LVar2) - EVT_SUB(LVar3, 25) - EVT_CALL(MakeLerp, LVar2, LVar3, 40, EASING_CUBIC_IN) - EVT_LABEL(3) - EVT_CALL(UpdateLerp) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(3) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar3) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar4) - EVT_MULF(LVar3, EVT_FLOAT(-20.0)) - EVT_MULF(LVar4, EVT_FLOAT(-20.0)) - EVT_DIVF(LVar3, EVT_FLOAT(100.0)) - EVT_DIVF(LVar4, EVT_FLOAT(100.0)) - EVT_ADD(LVar0, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_PLAY_EFFECT(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, EVT_FLOAT(190.0), EVT_FLOAT(1.5), EVT_FLOAT(1.0), 40, 0) - EVT_CALL(N(StartRumbleWithParams), 80, 60) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 30, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_LOOP(10) - EVT_CALL(RandInt, 150, LVar3) - EVT_CALL(RandInt, 100, LVar4) - EVT_ADD(LVar3, 50) - EVT_SETF(LVar4, EVT_FLOAT(5.0)) - EVT_CALL(RandInt, 4, LVar5) - EVT_ADDF(LVar4, LVar5) - EVT_DIVF(LVar4, EVT_FLOAT(10.0)) - EVT_SETF(LVar5, EVT_FLOAT(100.0)) - EVT_CALL(RandInt, 40, LVar6) - EVT_ADDF(LVar5, LVar6) - EVT_DIVF(LVar5, EVT_FLOAT(10.0)) - EVT_PLAY_EFFECT(EFFECT_MOVING_CLOUD, 0, 200, LVar3, 5, -200, LVar4, 5, LVar5, LVar4, 0) - EVT_CALL(RandInt, 5, LVar0) - EVT_ADD(LVar0, 5) - EVT_WAIT(LVar0) - EVT_END_LOOP - EVT_WAIT(20) - EVT_CALL(StopSound, SOUND_HEAVY_WIND_LOOP) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim04) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim05) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim06) - EVT_WAIT(20) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_STONE) - EVT_CALL(ShowMessageBox, BTL_MSG_ACTION_TIP_MASH_BUTTON, 180) - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_WHIRLWIND) - EVT_CALL(action_command_whirlwind_init, 0) - EVT_CALL(SetupMashMeter, 5, 20, 40, 60, 80, 100) - EVT_WAIT(10) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_CALL(action_command_whirlwind_start, 0, 200 * DT, 3) - EVT_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar2) - EVT_SET(LVar3, LVar2) - EVT_SUB(LVar3, 25) - EVT_CALL(MakeLerp, LVar2, LVar3, 200, EASING_CUBIC_IN) - EVT_LABEL(4) - EVT_CALL(UpdateLerp) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(4) - EVT_END_IF - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar2) - EVT_SET(LVar3, LVar2) - EVT_SUB(LVar3, 25) - EVT_CALL(MakeLerp, LVar2, LVar3, 200, EASING_CUBIC_IN) - EVT_LABEL(5) - EVT_CALL(UpdateLerp) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(5) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar3) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar4) - EVT_MULF(LVar3, EVT_FLOAT(-20.0)) - EVT_MULF(LVar4, EVT_FLOAT(-20.0)) - EVT_DIVF(LVar3, EVT_FLOAT(100.0)) - EVT_DIVF(LVar4, EVT_FLOAT(100.0)) - EVT_ADD(LVar0, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_PLAY_EFFECT(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, EVT_FLOAT(190.0), EVT_FLOAT(1.5), EVT_FLOAT(1.0), 200, 0) - EVT_CALL(N(StartRumbleWithParams), 100, 350) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 175, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(25) - EVT_CALL(RandInt, 150, LVar3) - EVT_CALL(RandInt, 100, LVar4) - EVT_ADD(LVar3, 50) - EVT_SETF(LVar4, EVT_FLOAT(5.0)) - EVT_CALL(RandInt, 4, LVar5) - EVT_ADDF(LVar4, LVar5) - EVT_DIVF(LVar4, EVT_FLOAT(10.0)) - EVT_SETF(LVar5, EVT_FLOAT(100.0)) - EVT_CALL(RandInt, 40, LVar6) - EVT_ADDF(LVar5, LVar6) - EVT_DIVF(LVar5, EVT_FLOAT(10.0)) - EVT_PLAY_EFFECT(EFFECT_MOVING_CLOUD, 0, 200, LVar3, 5, -200, LVar4, 5, LVar5, LVar4, 0) - EVT_CALL(RandInt, 5, LVar0) - EVT_ADD(LVar0, 5) - EVT_WAIT(LVar0) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, 7200, 200, EASING_SIN_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GetActionQuality, LVar1) - EVT_ELSE - EVT_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar2) - EVT_SET(LVar3, LVar2) - EVT_SUB(LVar3, 25) - EVT_CALL(MakeLerp, LVar2, LVar3, 100, EASING_CUBIC_IN) - EVT_LABEL(6) - EVT_CALL(UpdateLerp) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(6) - EVT_END_IF - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar2) - EVT_SET(LVar3, LVar2) - EVT_SUB(LVar3, 25) - EVT_CALL(MakeLerp, LVar2, LVar3, 100, EASING_CUBIC_IN) - EVT_LABEL(7) - EVT_CALL(UpdateLerp) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(7) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar3) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar4) - EVT_MULF(LVar3, EVT_FLOAT(-20.0)) - EVT_MULF(LVar4, EVT_FLOAT(-20.0)) - EVT_DIVF(LVar3, EVT_FLOAT(100.0)) - EVT_DIVF(LVar4, EVT_FLOAT(100.0)) - EVT_ADD(LVar0, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_PLAY_EFFECT(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, EVT_FLOAT(190.0), EVT_FLOAT(1.5), EVT_FLOAT(1.0), 100, 0) - EVT_CALL(N(StartRumbleWithParams), 100, 200) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 100, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(15) - EVT_CALL(RandInt, 150, LVar3) - EVT_CALL(RandInt, 100, LVar4) - EVT_ADD(LVar3, 50) - EVT_SETF(LVar4, EVT_FLOAT(5.0)) - EVT_CALL(RandInt, 4, LVar5) - EVT_ADDF(LVar4, LVar5) - EVT_DIVF(LVar4, EVT_FLOAT(10.0)) - EVT_SETF(LVar5, EVT_FLOAT(100.0)) - EVT_CALL(RandInt, 40, LVar6) - EVT_ADDF(LVar5, LVar6) - EVT_DIVF(LVar5, EVT_FLOAT(10.0)) - EVT_PLAY_EFFECT(EFFECT_MOVING_CLOUD, 0, 200, LVar3, 5, -200, LVar4, 5, LVar5, LVar4, 0) - EVT_CALL(RandInt, 5, LVar0) - EVT_ADD(LVar0, 5) - EVT_WAIT(LVar0) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(110) - EVT_SET(LVar1, 0) - EVT_END_IF - EVT_CALL(StopSound, SOUND_HEAVY_WIND_LOOP) - EVT_WAIT(2) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_WIND_6, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(1) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_WIND_5, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_WIND_4, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(3) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_WIND_3, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(4) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_WIND_2, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_DEFAULT - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_WIND_1, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim01) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim02) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim03) - EVT_WAIT(20) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim1A) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim1B) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim1C) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar3) + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar4) + MulF(LVar3, Float(-13.0)) + MulF(LVar4, Float(0.0)) + DivF(LVar3, Float(100.0)) + DivF(LVar4, Float(100.0)) + Add(LVar0, LVar3) + Add(LVar1, LVar4) + PlayEffect(EFFECT_HUFF_PUFF_BREATH, 1, LVar0, LVar1, LVar2, Float(190.0), Float(-1.0), Float(1.5), 100, 0) + Call(N(StartRumbleWithParams), 80, 150) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 75, Float(0.3)) + EndThread + Thread + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar2) + Set(LVar3, LVar2) + Add(LVar3, 25) + Call(MakeLerp, LVar2, LVar3, 90, EASING_SIN_OUT) + Label(0) + Call(UpdateLerp) + Call(SetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + EndThread + Thread + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar2) + Set(LVar3, LVar2) + Add(LVar3, 25) + Call(MakeLerp, LVar2, LVar3, 90, EASING_SIN_OUT) + Label(1) + Call(UpdateLerp) + Call(SetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + EndThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HUFF_N_PUFF_INHALE) + Thread + Wait(15) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BIG_POWER_UP) + EndThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 300) + Call(SetBattleCamOffsetZ, 20) + Call(MoveBattleCamOver, 180) + Wait(90) + Call(StopSound, SOUND_HUFF_N_PUFF_INHALE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim1D) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim1D) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim1E) + Wait(60) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim20) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim21) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim22) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_WIND_LOOP) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 15) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Set(LVarA, LVar0) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Thread + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar2) + Set(LVar3, LVar2) + Sub(LVar3, 25) + Call(MakeLerp, LVar2, LVar3, 40, EASING_CUBIC_IN) + Label(2) + Call(UpdateLerp) + Call(SetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(2) + EndIf + EndThread + Thread + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar2) + Set(LVar3, LVar2) + Sub(LVar3, 25) + Call(MakeLerp, LVar2, LVar3, 40, EASING_CUBIC_IN) + Label(3) + Call(UpdateLerp) + Call(SetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(3) + EndIf + EndThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar3) + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar4) + MulF(LVar3, Float(-20.0)) + MulF(LVar4, Float(-20.0)) + DivF(LVar3, Float(100.0)) + DivF(LVar4, Float(100.0)) + Add(LVar0, LVar3) + Add(LVar1, LVar4) + PlayEffect(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, Float(190.0), Float(1.5), Float(1.0), 40, 0) + Call(N(StartRumbleWithParams), 80, 60) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 30, Float(0.3)) + EndThread + Loop(10) + Call(RandInt, 150, LVar3) + Call(RandInt, 100, LVar4) + Add(LVar3, 50) + SetF(LVar4, Float(5.0)) + Call(RandInt, 4, LVar5) + AddF(LVar4, LVar5) + DivF(LVar4, Float(10.0)) + SetF(LVar5, Float(100.0)) + Call(RandInt, 40, LVar6) + AddF(LVar5, LVar6) + DivF(LVar5, Float(10.0)) + PlayEffect(EFFECT_MOVING_CLOUD, 0, 200, LVar3, 5, -200, LVar4, 5, LVar5, LVar4, 0) + Call(RandInt, 5, LVar0) + Add(LVar0, 5) + Wait(LVar0) + EndLoop + Wait(20) + Call(StopSound, SOUND_HEAVY_WIND_LOOP) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim04) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim05) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim06) + Wait(20) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_STONE) + Call(ShowMessageBox, BTL_MSG_ACTION_TIP_MASH_BUTTON, 180) + Call(ShowActionHud, TRUE) + Call(LoadActionCommand, ACTION_COMMAND_WHIRLWIND) + Call(action_command_whirlwind_init, 0) + Call(SetupMashMeter, 5, 20, 40, 60, 80, 100) + Wait(10) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + Call(action_command_whirlwind_start, 0, 200 * DT, 3) + Thread + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar2) + Set(LVar3, LVar2) + Sub(LVar3, 25) + Call(MakeLerp, LVar2, LVar3, 200, EASING_CUBIC_IN) + Label(4) + Call(UpdateLerp) + Call(SetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(4) + EndIf + EndThread + Thread + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar2) + Set(LVar3, LVar2) + Sub(LVar3, 25) + Call(MakeLerp, LVar2, LVar3, 200, EASING_CUBIC_IN) + Label(5) + Call(UpdateLerp) + Call(SetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(5) + EndIf + EndThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar3) + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar4) + MulF(LVar3, Float(-20.0)) + MulF(LVar4, Float(-20.0)) + DivF(LVar3, Float(100.0)) + DivF(LVar4, Float(100.0)) + Add(LVar0, LVar3) + Add(LVar1, LVar4) + PlayEffect(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, Float(190.0), Float(1.5), Float(1.0), 200, 0) + Call(N(StartRumbleWithParams), 100, 350) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 175, Float(0.3)) + EndThread + Thread + Loop(25) + Call(RandInt, 150, LVar3) + Call(RandInt, 100, LVar4) + Add(LVar3, 50) + SetF(LVar4, Float(5.0)) + Call(RandInt, 4, LVar5) + AddF(LVar4, LVar5) + DivF(LVar4, Float(10.0)) + SetF(LVar5, Float(100.0)) + Call(RandInt, 40, LVar6) + AddF(LVar5, LVar6) + DivF(LVar5, Float(10.0)) + PlayEffect(EFFECT_MOVING_CLOUD, 0, 200, LVar3, 5, -200, LVar4, 5, LVar5, LVar4, 0) + Call(RandInt, 5, LVar0) + Add(LVar0, 5) + Wait(LVar0) + EndLoop + EndThread + Call(MakeLerp, 0, 7200, 200, EASING_SIN_OUT) + Label(10) + Call(UpdateLerp) + Call(SetActorYaw, ACTOR_PLAYER, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(GetActionQuality, LVar1) + Else + Thread + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar2) + Set(LVar3, LVar2) + Sub(LVar3, 25) + Call(MakeLerp, LVar2, LVar3, 100, EASING_CUBIC_IN) + Label(6) + Call(UpdateLerp) + Call(SetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(6) + EndIf + EndThread + Thread + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar2) + Set(LVar3, LVar2) + Sub(LVar3, 25) + Call(MakeLerp, LVar2, LVar3, 100, EASING_CUBIC_IN) + Label(7) + Call(UpdateLerp) + Call(SetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(7) + EndIf + EndThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar3) + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar4) + MulF(LVar3, Float(-20.0)) + MulF(LVar4, Float(-20.0)) + DivF(LVar3, Float(100.0)) + DivF(LVar4, Float(100.0)) + Add(LVar0, LVar3) + Add(LVar1, LVar4) + PlayEffect(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, Float(190.0), Float(1.5), Float(1.0), 100, 0) + Call(N(StartRumbleWithParams), 100, 200) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 100, Float(0.3)) + EndThread + Thread + Loop(15) + Call(RandInt, 150, LVar3) + Call(RandInt, 100, LVar4) + Add(LVar3, 50) + SetF(LVar4, Float(5.0)) + Call(RandInt, 4, LVar5) + AddF(LVar4, LVar5) + DivF(LVar4, Float(10.0)) + SetF(LVar5, Float(100.0)) + Call(RandInt, 40, LVar6) + AddF(LVar5, LVar6) + DivF(LVar5, Float(10.0)) + PlayEffect(EFFECT_MOVING_CLOUD, 0, 200, LVar3, 5, -200, LVar4, 5, LVar5, LVar4, 0) + Call(RandInt, 5, LVar0) + Add(LVar0, 5) + Wait(LVar0) + EndLoop + EndThread + Wait(110) + Set(LVar1, 0) + EndIf + Call(StopSound, SOUND_HEAVY_WIND_LOOP) + Wait(2) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Switch(LVar1) + CaseEq(0) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_WIND_6, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(1) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_WIND_5, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_WIND_4, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(3) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_WIND_3, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(4) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_WIND_2, BS_FLAGS1_TRIGGER_EVENTS) + CaseDefault + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_WIND_1, BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim01) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim02) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim03) + Wait(20) + EndCaseGroup + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Move_ChargeForGround) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_EXEC_GET_TID(N(EVS_UpdateChargedJitter), LVarA) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ChargedJitterScriptID, LVarA) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 400) - EVT_CALL(SetBattleCamOffsetZ, 5) - EVT_CALL(MoveBattleCamOver, 60) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim11) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim12) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim13) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ChargedBodyAnims))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_FACE, EVT_PTR(N(ChargedFaceAnims))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_ARMS, EVT_PTR(N(ChargedArmAnims))) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ELECTRIFIED, TRUE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CHARGE_LIGHTNING) - EVT_CALL(N(StartRumbleWithParams), 70, 120) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 60, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar3) - EVT_DIVF(LVar3, EVT_FLOAT(100.0)) - EVT_CALL(N(MakeSnakingStatic), LVar0, LVar1, LVar2, LVar3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ChargedStaticEffect, LVar0) - EVT_WAIT(60) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + ExecGetTID(N(EVS_UpdateChargedJitter), LVarA) + Call(SetActorVar, ACTOR_SELF, AVAR_ChargedJitterScriptID, LVarA) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 400) + Call(SetBattleCamOffsetZ, 5) + Call(MoveBattleCamOver, 60) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim11) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim12) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim13) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ChargedBodyAnims))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_FACE, Ref(N(ChargedFaceAnims))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_ARMS, Ref(N(ChargedArmAnims))) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ELECTRIFIED, TRUE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CHARGE_LIGHTNING) + Call(N(StartRumbleWithParams), 70, 120) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 60, Float(0.3)) + EndThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar3) + DivF(LVar3, Float(100.0)) + Call(N(MakeSnakingStatic), LVar0, LVar1, LVar2, LVar3) + Call(SetActorVar, ACTOR_SELF, AVAR_ChargedStaticEffect, LVar0) + Wait(60) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Wait(30) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_GroundLightning) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 400) - EVT_CALL(SetBattleCamOffsetZ, 5) - EVT_CALL(MoveBattleCamOver, 60) - EVT_CALL(N(StartRumbleWithParams), 70, 100) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 100, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_CALL(N(UnkBackgroundFunc3)) - EVT_CALL(MakeLerp, 0, 200, 60, EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetBackgroundAlpha), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChargedJitterScriptID, LVarA) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChargedStaticEffect, LVar0) - EVT_CALL(RemoveEffect, LVar0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(BodyAnims))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_FACE, EVT_PTR(N(FaceAnims))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_ARMS, EVT_PTR(N(ArmAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim0E) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim0F) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim10) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ELECTRIFIED, FALSE) - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(MakeLerp, 200, 0, 30, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetBackgroundAlpha), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(StopSound, SOUND_CHARGE_LIGHTNING) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HUFF_N_PUFF_LIGHTNING_BLAST) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 10) - EVT_SET(LVar3, LVar0) - EVT_SUB(LVar3, 30) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, 1, LVar2, EVT_FLOAT(3.0), 30, 0) - EVT_WAIT(5) - EVT_CALL(N(StartRumbleWithParams), 256, 30) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(5.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(4.0)) - EVT_END_THREAD - EVT_SETF(LVar6, EVT_FLOAT(0.0)) - EVT_LOOP(10) - EVT_SET(LVar4, LVar3) - EVT_SET(LVar5, LVar2) - EVT_ADDF(LVar6, EVT_FLOAT(36.0)) - EVT_CALL(AddVectorPolar, LVar4, LVar5, EVT_FLOAT(300.0), LVar6) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar3, 1, LVar2, LVar4, 1, LVar5, EVT_FLOAT(4.0), 30, 0) - EVT_END_LOOP - EVT_WAIT(10) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_IF_EQ(LVar0, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim04) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim05) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim06) - EVT_WAIT(20) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_WAIT(2) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_GROUND_LIGHTNING, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(GetLastDamage, ACTOR_PLAYER, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AVAR_Flag_LightningHit) - EVT_CALL(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_END_IF - EVT_WAIT(20) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 400) + Call(SetBattleCamOffsetZ, 5) + Call(MoveBattleCamOver, 60) + Call(N(StartRumbleWithParams), 70, 100) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 100, Float(0.3)) + EndThread + Call(N(UnkBackgroundFunc3)) + Call(MakeLerp, 0, 200, 60, EASING_LINEAR) + Label(0) + Call(UpdateLerp) + Call(N(SetBackgroundAlpha), LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(GetActorVar, ACTOR_SELF, AVAR_ChargedJitterScriptID, LVarA) + KillThread(LVarA) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_ChargedStaticEffect, LVar0) + Call(RemoveEffect, LVar0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(BodyAnims))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_FACE, Ref(N(FaceAnims))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_ARMS, Ref(N(ArmAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim0E) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim0F) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim10) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ELECTRIFIED, FALSE) + Thread + Wait(20) + Call(MakeLerp, 200, 0, 30, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(N(SetBackgroundAlpha), LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + EndThread + Call(StopSound, SOUND_CHARGE_LIGHTNING) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HUFF_N_PUFF_LIGHTNING_BLAST) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar2, 10) + Set(LVar3, LVar0) + Sub(LVar3, 30) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, 1, LVar2, Float(3.0), 30, 0) + Wait(5) + Call(N(StartRumbleWithParams), 256, 30) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(5.0)) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(4.0)) + EndThread + SetF(LVar6, Float(0.0)) + Loop(10) + Set(LVar4, LVar3) + Set(LVar5, LVar2) + AddF(LVar6, Float(36.0)) + Call(AddVectorPolar, LVar4, LVar5, Float(300.0), LVar6) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar3, 1, LVar2, LVar4, 1, LVar5, Float(4.0), 30, 0) + EndLoop + Wait(10) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + IfEq(LVar0, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim04) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim05) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim06) + Wait(20) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Wait(2) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_GROUND_LIGHTNING, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(GetLastDamage, ACTOR_PLAYER, LVar0) + IfGt(LVar0, 0) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + BitwiseOrConst(LVar0, AVAR_Flag_LightningHit) + Call(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + EndIf + Wait(20) + EndCaseGroup + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Move_ChargeForDirect) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_EXEC_GET_TID(N(EVS_UpdateChargedJitter), LVarA) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ChargedJitterScriptID, LVarA) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 400) - EVT_CALL(SetBattleCamOffsetZ, 5) - EVT_CALL(MoveBattleCamOver, 60) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim11) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim12) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim13) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ChargedBodyAnims))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_FACE, EVT_PTR(N(ChargedFaceAnims))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_ARMS, EVT_PTR(N(ChargedArmAnims))) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ELECTRIFIED, TRUE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CHARGE_LIGHTNING) - EVT_CALL(N(StartRumbleWithParams), 70, 120) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 60, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar3) - EVT_DIVF(LVar3, EVT_FLOAT(100.0)) - EVT_CALL(N(MakeSnakingStatic), LVar0, LVar1, LVar2, LVar3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ChargedStaticEffect, LVar0) - EVT_WAIT(60) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + ExecGetTID(N(EVS_UpdateChargedJitter), LVarA) + Call(SetActorVar, ACTOR_SELF, AVAR_ChargedJitterScriptID, LVarA) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 400) + Call(SetBattleCamOffsetZ, 5) + Call(MoveBattleCamOver, 60) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim11) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim12) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim13) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ChargedBodyAnims))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_FACE, Ref(N(ChargedFaceAnims))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_ARMS, Ref(N(ChargedArmAnims))) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ELECTRIFIED, TRUE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CHARGE_LIGHTNING) + Call(N(StartRumbleWithParams), 70, 120) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 60, Float(0.3)) + EndThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar3) + DivF(LVar3, Float(100.0)) + Call(N(MakeSnakingStatic), LVar0, LVar1, LVar2, LVar3) + Call(SetActorVar, ACTOR_SELF, AVAR_ChargedStaticEffect, LVar0) + Wait(60) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Wait(30) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + Return + End }; EvtScript N(EVS_Attack_DirectLightning) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(AddBattleCamZoom, -100) - EVT_CALL(SetBattleCamOffsetZ, 50) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(N(StartRumbleWithParams), 70, 80) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 40, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(UnkBackgroundFunc3)) - EVT_CALL(MakeLerp, 0, 200, 40, EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetBackgroundAlpha), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(40) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChargedStaticEffect, LVarA) - EVT_CALL(N(SetSnakingStaticPos), LVarA, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar1) - EVT_SETF(LVar2, EVT_FLOAT(72.5)) - EVT_SETF(LVar3, EVT_FLOAT(67.5)) - EVT_MULF(LVar2, LVar0) - EVT_MULF(LVar3, LVar1) - EVT_DIVF(LVar2, EVT_FLOAT(100.0)) - EVT_DIVF(LVar3, EVT_FLOAT(100.0)) - EVT_CALL(AddGoalPos, ACTOR_SELF, 0, LVar3, 0) - EVT_CALL(AddGoalPos, ACTOR_SELF, 20, 40, 0) - EVT_CALL(FlyToGoal, ACTOR_SELF, 40, -20, EASING_SIN_OUT) - EVT_WAIT(30) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChargedJitterScriptID, LVarA) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChargedStaticEffect, LVar0) - EVT_CALL(RemoveEffect, LVar0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(BodyAnims))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_FACE, EVT_PTR(N(FaceAnims))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_ARMS, EVT_PTR(N(ArmAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim0E) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim0F) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim10) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ELECTRIFIED, FALSE) - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(MakeLerp, 200, 0, 30, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetBackgroundAlpha), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(StopSound, SOUND_CHARGE_LIGHTNING) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HUFF_N_PUFF_FIRE_LIGHTNING) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(HIT_RESULT_LUCKY) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_SUB(LVarC, 10) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVarD, LVarE, LVarF) - EVT_SUB(LVarD, 100) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVarA, LVarB, LVarC, LVarD, 0, LVarF, EVT_FLOAT(1.5), 20, 0) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim04) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim05) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim06) - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(FlyToGoal, ACTOR_SELF, 40, -20, EASING_SIN_OUT) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_CASE_EQ(HIT_RESULT_MISS) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 10) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 4) - EVT_ADD(LVar4, 10) - EVT_ADD(LVar5, 1) - EVT_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar6) - EVT_SETF(LVar7, EVT_FLOAT(0.725)) - EVT_SETF(LVar8, EVT_FLOAT(0.242)) - EVT_MULF(LVar7, LVar6) - EVT_MULF(LVar8, LVar6) - EVT_SUBF(LVar0, LVar7) - EVT_SETF(LVar9, LVar8) - EVT_MULF(LVar9, 3) - EVT_ADDF(LVar9, LVar0) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar9, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.2), 10, 0) - EVT_WAIT(3) - EVT_SETF(LVar9, LVar8) - EVT_MULF(LVar9, 1) - EVT_ADDF(LVar9, LVar0) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar9, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.2), 10, 0) - EVT_WAIT(3) - EVT_SETF(LVar9, LVar8) - EVT_MULF(LVar9, 4) - EVT_ADDF(LVar9, LVar0) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar9, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.2), 10, 0) - EVT_WAIT(3) - EVT_SETF(LVar9, LVar8) - EVT_MULF(LVar9, 2) - EVT_ADDF(LVar9, LVar0) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar9, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.2), 10, 0) - EVT_WAIT(3) - EVT_SETF(LVar9, LVar8) - EVT_MULF(LVar9, 5) - EVT_ADDF(LVar9, LVar0) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar9, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.2), 10, 0) - EVT_END_THREAD - EVT_WAIT(2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim04) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim05) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim06) - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(FlyToGoal, ACTOR_SELF, 40, -20, EASING_SIN_OUT) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 10) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 4) - EVT_ADD(LVar4, 10) - EVT_ADD(LVar5, 1) - EVT_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar6) - EVT_SETF(LVar7, EVT_FLOAT(0.725)) - EVT_SETF(LVar8, EVT_FLOAT(0.242)) - EVT_MULF(LVar7, LVar6) - EVT_MULF(LVar8, LVar6) - EVT_SUBF(LVar0, LVar7) - EVT_SETF(LVar9, LVar8) - EVT_MULF(LVar9, 3) - EVT_ADDF(LVar9, LVar0) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar9, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.2), 10, 0) - EVT_WAIT(3) - EVT_SETF(LVar9, LVar8) - EVT_MULF(LVar9, 1) - EVT_ADDF(LVar9, LVar0) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar9, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.2), 10, 0) - EVT_WAIT(3) - EVT_SETF(LVar9, LVar8) - EVT_MULF(LVar9, 4) - EVT_ADDF(LVar9, LVar0) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar9, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.2), 10, 0) - EVT_WAIT(3) - EVT_SETF(LVar9, LVar8) - EVT_MULF(LVar9, 2) - EVT_ADDF(LVar9, LVar0) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar9, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.2), 10, 0) - EVT_WAIT(3) - EVT_SETF(LVar9, LVar8) - EVT_MULF(LVar9, 5) - EVT_ADDF(LVar9, LVar0) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar9, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.2), 10, 0) - EVT_END_THREAD - EVT_WAIT(2) - EVT_WAIT(2) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_DIRECT_LIGHTNING, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim01) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim02) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim03) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(FlyToGoal, ACTOR_SELF, 40, -20, EASING_SIN_OUT) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(AddBattleCamZoom, -100) + Call(SetBattleCamOffsetZ, 50) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(N(StartRumbleWithParams), 70, 80) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 40, Float(0.3)) + EndThread + Thread + Call(N(UnkBackgroundFunc3)) + Call(MakeLerp, 0, 200, 40, EASING_LINEAR) + Label(0) + Call(UpdateLerp) + Call(N(SetBackgroundAlpha), LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + EndThread + Thread + Loop(40) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorVar, ACTOR_SELF, AVAR_ChargedStaticEffect, LVarA) + Call(N(SetSnakingStaticPos), LVarA, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar1) + SetF(LVar2, Float(72.5)) + SetF(LVar3, Float(67.5)) + MulF(LVar2, LVar0) + MulF(LVar3, LVar1) + DivF(LVar2, Float(100.0)) + DivF(LVar3, Float(100.0)) + Call(AddGoalPos, ACTOR_SELF, 0, LVar3, 0) + Call(AddGoalPos, ACTOR_SELF, 20, 40, 0) + Call(FlyToGoal, ACTOR_SELF, 40, -20, EASING_SIN_OUT) + Wait(30) + Call(GetActorVar, ACTOR_SELF, AVAR_ChargedJitterScriptID, LVarA) + KillThread(LVarA) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_ChargedStaticEffect, LVar0) + Call(RemoveEffect, LVar0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(BodyAnims))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_FACE, Ref(N(FaceAnims))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_ARMS, Ref(N(ArmAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim0E) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim0F) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim10) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ELECTRIFIED, FALSE) + Thread + Wait(20) + Call(MakeLerp, 200, 0, 30, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(N(SetBackgroundAlpha), LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + EndThread + Call(StopSound, SOUND_CHARGE_LIGHTNING) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HUFF_N_PUFF_FIRE_LIGHTNING) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseEq(HIT_RESULT_LUCKY) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Sub(LVarC, 10) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVarD, LVarE, LVarF) + Sub(LVarD, 100) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVarA, LVarB, LVarC, LVarD, 0, LVarF, Float(1.5), 20, 0) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim04) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim05) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim06) + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetGoalToHome, ACTOR_SELF) + Call(FlyToGoal, ACTOR_SELF, 40, -20, EASING_SIN_OUT) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + CaseEq(HIT_RESULT_MISS) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar2, 10) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) + Sub(LVar3, 4) + Add(LVar4, 10) + Add(LVar5, 1) + Thread + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar6) + SetF(LVar7, Float(0.725)) + SetF(LVar8, Float(0.242)) + MulF(LVar7, LVar6) + MulF(LVar8, LVar6) + SubF(LVar0, LVar7) + SetF(LVar9, LVar8) + MulF(LVar9, 3) + AddF(LVar9, LVar0) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar9, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.2), 10, 0) + Wait(3) + SetF(LVar9, LVar8) + MulF(LVar9, 1) + AddF(LVar9, LVar0) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar9, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.2), 10, 0) + Wait(3) + SetF(LVar9, LVar8) + MulF(LVar9, 4) + AddF(LVar9, LVar0) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar9, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.2), 10, 0) + Wait(3) + SetF(LVar9, LVar8) + MulF(LVar9, 2) + AddF(LVar9, LVar0) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar9, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.2), 10, 0) + Wait(3) + SetF(LVar9, LVar8) + MulF(LVar9, 5) + AddF(LVar9, LVar0) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar9, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.2), 10, 0) + EndThread + Wait(2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim04) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim05) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim06) + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetGoalToHome, ACTOR_SELF) + Call(FlyToGoal, ACTOR_SELF, 40, -20, EASING_SIN_OUT) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndSwitch + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar2, 10) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) + Sub(LVar3, 4) + Add(LVar4, 10) + Add(LVar5, 1) + Thread + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar6) + SetF(LVar7, Float(0.725)) + SetF(LVar8, Float(0.242)) + MulF(LVar7, LVar6) + MulF(LVar8, LVar6) + SubF(LVar0, LVar7) + SetF(LVar9, LVar8) + MulF(LVar9, 3) + AddF(LVar9, LVar0) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar9, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.2), 10, 0) + Wait(3) + SetF(LVar9, LVar8) + MulF(LVar9, 1) + AddF(LVar9, LVar0) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar9, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.2), 10, 0) + Wait(3) + SetF(LVar9, LVar8) + MulF(LVar9, 4) + AddF(LVar9, LVar0) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar9, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.2), 10, 0) + Wait(3) + SetF(LVar9, LVar8) + MulF(LVar9, 2) + AddF(LVar9, LVar0) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar9, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.2), 10, 0) + Wait(3) + SetF(LVar9, LVar8) + MulF(LVar9, 5) + AddF(LVar9, LVar0) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar9, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.2), 10, 0) + EndThread + Wait(2) + Wait(2) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_DIRECT_LIGHTNING, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim01) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim02) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim03) + Call(SetGoalToHome, ACTOR_SELF) + Call(FlyToGoal, ACTOR_SELF, 40, -20, EASING_SIN_OUT) + EndCaseGroup + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_GroupSlam) = { - EVT_USE_ARRAY(N(RuffPuffDataBuffer)) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 400) - EVT_CALL(SetBattleCamOffsetZ, 5) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HUFF_N_PUFF_REAR_UP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim1A) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim1B) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim1C) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim1D) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim1E) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim1F) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HUFF_N_PUFF_JIGGLE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar1) - EVT_SET(LVarF, 0) - EVT_LOOP(20) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.3), 10, 0, 0) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.7), 10, 0, 0) - EVT_MULF(LVar2, LVar0) - EVT_MULF(LVar3, LVar1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar3) - EVT_ADD(LVarF, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HUFF_N_PUFF_JIGGLE) - EVT_LOOP(20) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.2), 10, 0, 0) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.8), 10, 0, 0) - EVT_MULF(LVar2, LVar0) - EVT_MULF(LVar3, LVar1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar3) - EVT_ADD(LVarF, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar1) - EVT_SET(LVar9, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_ADD(LVarB, 150) + UseArray(N(RuffPuffDataBuffer)) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 400) + Call(SetBattleCamOffsetZ, 5) + Call(MoveBattleCamOver, 30) + Wait(30) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HUFF_N_PUFF_REAR_UP) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim1A) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim1B) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim1C) + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim1D) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim1E) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim1F) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HUFF_N_PUFF_JIGGLE) + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar1) + Set(LVarF, 0) + Loop(20) + Call(N(CosInterpMinMax), LVarF, LVar2, Float(1.0), Float(1.3), 10, 0, 0) + Call(N(CosInterpMinMax), LVarF, LVar3, Float(1.0), Float(0.7), 10, 0, 0) + MulF(LVar2, LVar0) + MulF(LVar3, LVar1) + Call(SetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar2) + Call(SetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar3) + Add(LVarF, 1) + Wait(1) + EndLoop + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HUFF_N_PUFF_JIGGLE) + Loop(20) + Call(N(CosInterpMinMax), LVarF, LVar2, Float(1.0), Float(1.2), 10, 0, 0) + Call(N(CosInterpMinMax), LVarF, LVar3, Float(1.0), Float(0.8), 10, 0, 0) + MulF(LVar2, LVar0) + MulF(LVar3, LVar1) + Call(SetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar2) + Call(SetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar3) + Add(LVarF, 1) + Wait(1) + EndLoop + Call(SetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar1) + Set(LVar9, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Add(LVarB, 150) #define HNP_GROUP_ASCEND(idx) \ - EVT_IF_FLAG(LVar0, 1 << idx) \ - EVT_CALL(UseIdleAnimation, ArrayVar(idx), FALSE) \ - EVT_CALL(GetActorVar, ArrayVar(idx), AVAR_TuffPuff_IsLarge, LVar1) \ - EVT_IF_EQ(LVar1, 0) \ - EVT_CALL(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim09) \ - EVT_ELSE \ - EVT_CALL(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim0B) \ - EVT_END_IF \ - EVT_THREAD \ - EVT_MOD(LVar9, 2) \ - EVT_IF_EQ(LVar9, 0) \ - EVT_CALL(PlaySoundAtActor, ArrayVar(idx), SOUND_RUFF_PUFF_FLY_A) \ - EVT_ELSE \ - EVT_CALL(PlaySoundAtActor, ArrayVar(idx), SOUND_RUFF_PUFF_FLY_B) \ - EVT_END_IF \ - EVT_CALL(GetActorPos, ArrayVar(idx), LVarD, LVarE, LVarF) \ - EVT_CALL(SetGoalPos, ArrayVar(idx), LVarA, LVarB, LVarF) \ - EVT_CALL(FlyToGoal, ArrayVar(idx), 20, 10, EASING_QUADRATIC_IN) \ - EVT_SET(LVarD, LVarA) \ - EVT_SET(LVarE, LVarC) \ - EVT_SET(LVarF, idx) \ - EVT_MUL(LVarF, 36) \ - EVT_ADD(LVarF, -90) \ - EVT_CALL(AddVectorPolar, LVarD, LVarE, EVT_FLOAT(60.0), LVarF) \ - EVT_CALL(SetActorPos, ArrayVar(idx), LVarD, LVarB, LVarE) \ - EVT_END_THREAD \ - EVT_ADD(LVar9, 1) \ - EVT_WAIT(8) \ - EVT_END_IF + IfFlag(LVar0, 1 << idx) \ + Call(UseIdleAnimation, ArrayVar(idx), FALSE) \ + Call(GetActorVar, ArrayVar(idx), AVAR_TuffPuff_IsLarge, LVar1) \ + IfEq(LVar1, 0) \ + Call(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim09) \ + Else \ + Call(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim0B) \ + EndIf \ + Thread \ + Mod(LVar9, 2) \ + IfEq(LVar9, 0) \ + Call(PlaySoundAtActor, ArrayVar(idx), SOUND_RUFF_PUFF_FLY_A) \ + Else \ + Call(PlaySoundAtActor, ArrayVar(idx), SOUND_RUFF_PUFF_FLY_B) \ + EndIf \ + Call(GetActorPos, ArrayVar(idx), LVarD, LVarE, LVarF) \ + Call(SetGoalPos, ArrayVar(idx), LVarA, LVarB, LVarF) \ + Call(FlyToGoal, ArrayVar(idx), 20, 10, EASING_QUADRATIC_IN) \ + Set(LVarD, LVarA) \ + Set(LVarE, LVarC) \ + Set(LVarF, idx) \ + Mul(LVarF, 36) \ + Add(LVarF, -90) \ + Call(AddVectorPolar, LVarD, LVarE, Float(60.0), LVarF) \ + Call(SetActorPos, ArrayVar(idx), LVarD, LVarB, LVarE) \ + EndThread \ + Add(LVar9, 1) \ + Wait(8) \ + EndIf // have each Tuff Puff ascend above the battlefield FOR_CHILDREN_SCATTERED(HNP_GROUP_ASCEND) - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 10, EASING_QUADRATIC_IN) - EVT_WAIT(75) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(FlyToGoal, ACTOR_SELF, 30, 10, EASING_QUADRATIC_IN) + Wait(75) + Call(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) #define HNP_GROUP_DROP(idx) \ - EVT_IF_FLAG(LVar0, 1 << idx) \ - EVT_THREAD \ - EVT_CALL(GetActorPos, ArrayVar(idx), LVar1, LVar2, LVar3) \ - EVT_CALL(GetActorVar, ArrayVar(idx), AVAR_TuffPuff_IsLarge, LVar4) \ - EVT_IF_EQ(LVar4, 0) \ - EVT_SET(LVar2, 10) \ - EVT_ELSE \ - EVT_SET(LVar2, 14) \ - EVT_END_IF \ - EVT_CALL(SetActorSounds, ArrayVar(idx), ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) \ - EVT_CALL(SetGoalPos, ArrayVar(idx), LVar1, LVar2, LVar3) \ - EVT_CALL(FlyToGoal, ArrayVar(idx), 20, 0, EASING_CUBIC_IN) \ - EVT_CALL(ResetActorSounds, ArrayVar(idx), ACTOR_SOUND_FLY) \ - EVT_END_THREAD \ - EVT_END_IF + IfFlag(LVar0, 1 << idx) \ + Thread \ + Call(GetActorPos, ArrayVar(idx), LVar1, LVar2, LVar3) \ + Call(GetActorVar, ArrayVar(idx), AVAR_TuffPuff_IsLarge, LVar4) \ + IfEq(LVar4, 0) \ + Set(LVar2, 10) \ + Else \ + Set(LVar2, 14) \ + EndIf \ + Call(SetActorSounds, ArrayVar(idx), ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) \ + Call(SetGoalPos, ArrayVar(idx), LVar1, LVar2, LVar3) \ + Call(FlyToGoal, ArrayVar(idx), 20, 0, EASING_CUBIC_IN) \ + Call(ResetActorSounds, ArrayVar(idx), ACTOR_SOUND_FLY) \ + EndThread \ + EndIf // have each Tuff Puff drop down from the sky FOR_CHILDREN_ORDERED(HNP_GROUP_DROP) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_FALLING) - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar4) - EVT_MUL(LVar4, 95) - EVT_DIV(LVar4, 200) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar1, LVar4, LVar3) - EVT_CALL(FlyToGoal, ACTOR_SELF, 20, 0, EASING_CUBIC_IN) - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SHOCKWAVE, 3, LVar0, 0, LVar2, 0) - EVT_THREAD - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar1, LVar4, LVar3, 60, 8, 0, 30, 0) - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar1, LVar4, LVar3, 60, 8, 33, 30, 0) - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar1, LVar4, LVar3, 60, 8, 66, 30, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 20, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar1) - EVT_SET(LVarF, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HUFF_N_PUFF_WOBBLE) - EVT_LOOP(20) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.5), 10, 0, 0) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.5), 10, 0, 0) - EVT_MULF(LVar2, LVar0) - EVT_MULF(LVar3, LVar1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar3) - EVT_ADD(LVarF, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HUFF_N_PUFF_WOBBLE) - EVT_LOOP(20) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.2), 10, 0, 0) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.8), 10, 0, 0) - EVT_MULF(LVar2, LVar0) - EVT_MULF(LVar3, LVar1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar3) - EVT_ADD(LVarF, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar1) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(40) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar3) - EVT_MUL(LVar3, 95) - EVT_DIV(LVar3, 200) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Thread + Wait(3) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_FALLING) + EndThread + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar4) + Mul(LVar4, 95) + Div(LVar4, 200) + Call(SetGoalPos, ACTOR_SELF, LVar1, LVar4, LVar3) + Call(FlyToGoal, ACTOR_SELF, 20, 0, EASING_CUBIC_IN) + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SHOCKWAVE, 3, LVar0, 0, LVar2, 0) + Thread + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar1, LVar4, LVar3, 60, 8, 0, 30, 0) + Wait(2) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar1, LVar4, LVar3, 60, 8, 33, 30, 0) + Wait(2) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar1, LVar4, LVar3, 60, 8, 66, 30, 0) + EndThread + Thread + Call(ShakeCam, CAM_BATTLE, 0, 20, Float(1.0)) + EndThread + Thread + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar1) + Set(LVarF, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HUFF_N_PUFF_WOBBLE) + Loop(20) + Call(N(CosInterpMinMax), LVarF, LVar2, Float(1.0), Float(1.5), 10, 0, 0) + Call(N(CosInterpMinMax), LVarF, LVar3, Float(1.0), Float(0.5), 10, 0, 0) + MulF(LVar2, LVar0) + MulF(LVar3, LVar1) + Call(SetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar2) + Call(SetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar3) + Add(LVarF, 1) + Wait(1) + EndLoop + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HUFF_N_PUFF_WOBBLE) + Loop(20) + Call(N(CosInterpMinMax), LVarF, LVar2, Float(1.0), Float(1.2), 10, 0, 0) + Call(N(CosInterpMinMax), LVarF, LVar3, Float(1.0), Float(0.8), 10, 0, 0) + MulF(LVar2, LVar0) + MulF(LVar3, LVar1) + Call(SetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar2) + Call(SetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar3) + Add(LVarF, 1) + Wait(1) + EndLoop + Call(SetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar1) + EndThread + Thread + Loop(40) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar3) + Mul(LVar3, 95) + Div(LVar3, 200) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(1) + EndLoop + EndThread + Call(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) #define HNP_IMPACT_JIGGLE(idx) \ - EVT_IF_FLAG(LVar0, 1 << idx) \ - EVT_THREAD \ - EVT_CALL(GetActorVar, ArrayVar(idx), AVAR_TuffPuff_ScaleX, LVar0) \ - EVT_CALL(GetActorVar, ArrayVar(idx), AVAR_TuffPuff_ScaleY, LVar1) \ - EVT_SET(LVarF, 0) \ - EVT_LOOP(20) \ - EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.5), 10, 0, 0) \ - EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.5), 10, 0, 0) \ - EVT_MULF(LVar2, LVar0) \ - EVT_MULF(LVar3, LVar1) \ - EVT_CALL(SetActorVar, ArrayVar(idx), AVAR_TuffPuff_ScaleX, LVar2) \ - EVT_CALL(SetActorVar, ArrayVar(idx), AVAR_TuffPuff_ScaleY, LVar3) \ - EVT_ADD(LVarF, 1) \ - EVT_WAIT(1) \ - EVT_END_LOOP \ - EVT_LOOP(20) \ - EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.2), 10, 0, 0) \ - EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.8), 10, 0, 0) \ - EVT_MULF(LVar2, LVar0) \ - EVT_MULF(LVar3, LVar1) \ - EVT_CALL(SetActorVar, ArrayVar(idx), AVAR_TuffPuff_ScaleX, LVar2) \ - EVT_CALL(SetActorVar, ArrayVar(idx), AVAR_TuffPuff_ScaleY, LVar3) \ - EVT_ADD(LVarF, 1) \ - EVT_WAIT(1) \ - EVT_END_LOOP \ - EVT_CALL(SetActorVar, ArrayVar(idx), AVAR_TuffPuff_ScaleX, LVar0) \ - EVT_CALL(SetActorVar, ArrayVar(idx), AVAR_TuffPuff_ScaleY, LVar1) \ - EVT_END_THREAD \ - EVT_THREAD \ - EVT_LOOP(40) \ - EVT_CALL(GetActorPos, ArrayVar(idx), LVar0, LVar1, LVar2) \ - EVT_CALL(GetActorVar, ArrayVar(idx), AVAR_TuffPuff_ScaleY, LVar3) \ - EVT_CALL(GetActorVar, ArrayVar(idx), AVAR_TuffPuff_IsLarge, LVar4) \ - EVT_IF_EQ(LVar4, 0) \ - EVT_MUL(LVar3, 20) \ - EVT_ELSE \ - EVT_MUL(LVar3, 28) \ - EVT_END_IF \ - EVT_DIV(LVar3, 200) \ - EVT_CALL(SetActorPos, ArrayVar(idx), LVar0, LVar3, LVar2) \ - EVT_WAIT(1) \ - EVT_END_LOOP \ - EVT_END_THREAD \ - EVT_END_IF + IfFlag(LVar0, 1 << idx) \ + Thread \ + Call(GetActorVar, ArrayVar(idx), AVAR_TuffPuff_ScaleX, LVar0) \ + Call(GetActorVar, ArrayVar(idx), AVAR_TuffPuff_ScaleY, LVar1) \ + Set(LVarF, 0) \ + Loop(20) \ + Call(N(CosInterpMinMax), LVarF, LVar2, Float(1.0), Float(1.5), 10, 0, 0) \ + Call(N(CosInterpMinMax), LVarF, LVar3, Float(1.0), Float(0.5), 10, 0, 0) \ + MulF(LVar2, LVar0) \ + MulF(LVar3, LVar1) \ + Call(SetActorVar, ArrayVar(idx), AVAR_TuffPuff_ScaleX, LVar2) \ + Call(SetActorVar, ArrayVar(idx), AVAR_TuffPuff_ScaleY, LVar3) \ + Add(LVarF, 1) \ + Wait(1) \ + EndLoop \ + Loop(20) \ + Call(N(CosInterpMinMax), LVarF, LVar2, Float(1.0), Float(1.2), 10, 0, 0) \ + Call(N(CosInterpMinMax), LVarF, LVar3, Float(1.0), Float(0.8), 10, 0, 0) \ + MulF(LVar2, LVar0) \ + MulF(LVar3, LVar1) \ + Call(SetActorVar, ArrayVar(idx), AVAR_TuffPuff_ScaleX, LVar2) \ + Call(SetActorVar, ArrayVar(idx), AVAR_TuffPuff_ScaleY, LVar3) \ + Add(LVarF, 1) \ + Wait(1) \ + EndLoop \ + Call(SetActorVar, ArrayVar(idx), AVAR_TuffPuff_ScaleX, LVar0) \ + Call(SetActorVar, ArrayVar(idx), AVAR_TuffPuff_ScaleY, LVar1) \ + EndThread \ + Thread \ + Loop(40) \ + Call(GetActorPos, ArrayVar(idx), LVar0, LVar1, LVar2) \ + Call(GetActorVar, ArrayVar(idx), AVAR_TuffPuff_ScaleY, LVar3) \ + Call(GetActorVar, ArrayVar(idx), AVAR_TuffPuff_IsLarge, LVar4) \ + IfEq(LVar4, 0) \ + Mul(LVar3, 20) \ + Else \ + Mul(LVar3, 28) \ + EndIf \ + Div(LVar3, 200) \ + Call(SetActorPos, ArrayVar(idx), LVar0, LVar3, LVar2) \ + Wait(1) \ + EndLoop \ + EndThread \ + EndIf // have each Tuff Puff oscillate after slamming into the ground FOR_CHILDREN_ORDERED(HNP_IMPACT_JIGGLE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SET(LVarA, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_WAIT(100) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim04) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim05) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim06) - EVT_WAIT(20) - EVT_SET(LVarA, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Set(LVarA, LVar0) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Wait(100) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HuffNPuff_Anim04) + Call(SetAnimation, ACTOR_SELF, PRT_FACE, ANIM_HuffNPuff_Anim05) + Call(SetAnimation, ACTOR_SELF, PRT_ARMS, ANIM_HuffNPuff_Anim06) + Wait(20) + Set(LVarA, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) #define HNP_RETURN_HOME(idx) \ - EVT_IF_FLAG(LVar0, 1 << idx) \ - EVT_THREAD \ - EVT_MOD(LVarA, 2) \ - EVT_IF_EQ(LVarA, 0) \ - EVT_CALL(PlaySoundAtActor, ArrayVar(idx), SOUND_RUFF_PUFF_FLY_A) \ - EVT_ELSE \ - EVT_CALL(PlaySoundAtActor, ArrayVar(idx), SOUND_RUFF_PUFF_FLY_B) \ - EVT_END_IF \ - EVT_CALL(SetGoalToHome, ArrayVar(idx)) \ - EVT_CALL(FlyToGoal, ArrayVar(idx), 20, -10, EASING_SIN_OUT) \ - EVT_END_THREAD \ - EVT_ADD(LVarA, 1) \ - EVT_WAIT(8) \ - EVT_END_IF + IfFlag(LVar0, 1 << idx) \ + Thread \ + Mod(LVarA, 2) \ + IfEq(LVarA, 0) \ + Call(PlaySoundAtActor, ArrayVar(idx), SOUND_RUFF_PUFF_FLY_A) \ + Else \ + Call(PlaySoundAtActor, ArrayVar(idx), SOUND_RUFF_PUFF_FLY_B) \ + EndIf \ + Call(SetGoalToHome, ArrayVar(idx)) \ + Call(FlyToGoal, ArrayVar(idx), 20, -10, EASING_SIN_OUT) \ + EndThread \ + Add(LVarA, 1) \ + Wait(8) \ + EndIf // have each Tuff Puff return to their home position FOR_CHILDREN_SCATTERED(HNP_RETURN_HOME) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(FlyToGoal, ACTOR_SELF, 20, -10, EASING_SIN_OUT) - EVT_WAIT(15) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_SET(LVarA, DMG_GROUP_SLAM_BASE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) + Call(SetGoalToHome, ACTOR_SELF) + Call(FlyToGoal, ACTOR_SELF, 20, -10, EASING_SIN_OUT) + Wait(15) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Set(LVarA, DMG_GROUP_SLAM_BASE) + Call(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) #define HNP_ADD_CHILD(idx) \ - EVT_IF_FLAG(LVar0, 1 << idx) \ - EVT_ADD(LVarA, 1) \ - EVT_END_IF + IfFlag(LVar0, 1 << idx) \ + Add(LVarA, 1) \ + EndIf // add 1 damage for each Tuff Puff FOR_CHILDREN_ORDERED(HNP_ADD_CHILD) - EVT_WAIT(2) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_NO_CONTACT, 0, 0, LVarA, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_WAIT(50) - EVT_SET(LVarA, 0) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(FlyToGoal, ACTOR_SELF, 20, -10, EASING_SIN_OUT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) + Wait(2) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_NO_CONTACT, 0, 0, LVarA, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Wait(50) + Set(LVarA, 0) + Call(SetGoalToHome, ACTOR_SELF) + Call(FlyToGoal, ACTOR_SELF, 20, -10, EASING_SIN_OUT) + Call(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) #define HNP_RETURN_HOME(idx) \ - EVT_IF_FLAG(LVar0, 1 << idx) \ - EVT_THREAD \ - EVT_MOD(LVarA, 2) \ - EVT_IF_EQ(LVarA, 0) \ - EVT_CALL(PlaySoundAtActor, ArrayVar(idx), SOUND_RUFF_PUFF_FLY_A) \ - EVT_ELSE \ - EVT_CALL(PlaySoundAtActor, ArrayVar(idx), SOUND_RUFF_PUFF_FLY_B) \ - EVT_END_IF \ - EVT_CALL(SetGoalToHome, ArrayVar(idx)) \ - EVT_CALL(FlyToGoal, ArrayVar(idx), 20, -10, EASING_SIN_OUT) \ - EVT_END_THREAD \ - EVT_ADD(LVarA, 1) \ - EVT_WAIT(8) \ - EVT_END_IF + IfFlag(LVar0, 1 << idx) \ + Thread \ + Mod(LVarA, 2) \ + IfEq(LVarA, 0) \ + Call(PlaySoundAtActor, ArrayVar(idx), SOUND_RUFF_PUFF_FLY_A) \ + Else \ + Call(PlaySoundAtActor, ArrayVar(idx), SOUND_RUFF_PUFF_FLY_B) \ + EndIf \ + Call(SetGoalToHome, ArrayVar(idx)) \ + Call(FlyToGoal, ArrayVar(idx), 20, -10, EASING_SIN_OUT) \ + EndThread \ + Add(LVarA, 1) \ + Wait(8) \ + EndIf // make each Tuff Puff return home FOR_CHILDREN_SCATTERED(HNP_RETURN_HOME) - EVT_WAIT(20) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Wait(20) + EndCaseGroup + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TuffPuff_SqueezePlayer) = { - EVT_IF_EQ(LVar3, 0) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_SET(LVarA, LVar1) - EVT_SET(LVarB, LVar2) - EVT_DIV(LVarB, 2) - EVT_ADD(LVarB, 1) - EVT_CALL(SetOwnerID, LVar1) // note: ownership transferred to Tuff Puff actor here - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 500) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TuffPuff_WobbleMode, 1) - EVT_ELSE - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TuffPuff_WobbleMode, 2) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_CALL(GetDist2D, LVarD, LVar0, LVar2, LVar3, LVar5) - EVT_CALL(N(Atan2), LVarE, LVar0, LVar2, LVar3, LVar5) - EVT_SET(LVarF, 0) - EVT_LOOP(0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SQUEEZE) - EVT_SET(LVarF, 0) - EVT_SET(LVarC, LVarB) - EVT_ADD(LVarC, LVarB) - EVT_SET(LVar9, LVarC) - EVT_LOOP(LVarC) - EVT_CALL(N(UpdateLerp), EASING_CUBIC_OUT, EVT_FLOAT(100.0), EVT_FLOAT(40.0), LVarF, LVar9, LVar0) - EVT_MULF(LVar0, LVarD) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar1, LVar2, LVar3) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(AddVectorPolar, LVar1, LVar3, LVar0, LVarE) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar1, LVar5, LVar3) - EVT_ADD(LVarF, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(5) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AVAR_Flag_WaitForChild) - EVT_CALL(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_END_IF - EVT_SET(LVarF, 0) - EVT_SET(LVarC, LVarB) - EVT_LOOP(LVarC) - EVT_CALL(N(UpdateLerp), EASING_QUARTIC_OUT, EVT_FLOAT(40.0), EVT_FLOAT(100.0), LVarF, LVarB, LVar0) - EVT_MULF(LVar0, LVarD) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar1, LVar2, LVar3) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(AddVectorPolar, LVar1, LVar3, LVar0, LVarE) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar1, LVar5, LVar3) - EVT_ADD(LVarF, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(10) - EVT_END_LOOP - EVT_RETURN - EVT_END + IfEq(LVar3, 0) + Set(LFlag0, TRUE) + EndIf + Set(LVarA, LVar1) + Set(LVarB, LVar2) + Div(LVarB, 2) + Add(LVarB, 1) + Call(SetOwnerID, LVar1) // note: ownership transferred to Tuff Puff actor here + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 500) + Call(SetActorVar, ACTOR_SELF, AVAR_TuffPuff_WobbleMode, 1) + Else + Call(SetActorVar, ACTOR_SELF, AVAR_TuffPuff_WobbleMode, 2) + EndIf + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Call(GetDist2D, LVarD, LVar0, LVar2, LVar3, LVar5) + Call(N(Atan2), LVarE, LVar0, LVar2, LVar3, LVar5) + Set(LVarF, 0) + Loop(0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SQUEEZE) + Set(LVarF, 0) + Set(LVarC, LVarB) + Add(LVarC, LVarB) + Set(LVar9, LVarC) + Loop(LVarC) + Call(N(UpdateLerp), EASING_CUBIC_OUT, Float(100.0), Float(40.0), LVarF, LVar9, LVar0) + MulF(LVar0, LVarD) + DivF(LVar0, Float(100.0)) + Call(GetActorPos, ACTOR_PLAYER, LVar1, LVar2, LVar3) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(AddVectorPolar, LVar1, LVar3, LVar0, LVarE) + Call(SetActorPos, ACTOR_SELF, LVar1, LVar5, LVar3) + Add(LVarF, 1) + Wait(1) + EndLoop + Wait(5) + IfEq(LFlag0, TRUE) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + BitwiseOrConst(LVar0, AVAR_Flag_WaitForChild) + Call(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + EndIf + Set(LVarF, 0) + Set(LVarC, LVarB) + Loop(LVarC) + Call(N(UpdateLerp), EASING_QUARTIC_OUT, Float(40.0), Float(100.0), LVarF, LVarB, LVar0) + MulF(LVar0, LVarD) + DivF(LVar0, Float(100.0)) + Call(GetActorPos, ACTOR_PLAYER, LVar1, LVar2, LVar3) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(AddVectorPolar, LVar1, LVar3, LVar0, LVarE) + Call(SetActorPos, ACTOR_SELF, LVar1, LVar5, LVar3) + Add(LVarF, 1) + Wait(1) + EndLoop + Wait(10) + EndLoop + Return + End }; EvtScript N(EVS_Attack_TuffPuffSwarm) = { - EVT_USE_ARRAY(N(RuffPuffDataBuffer)) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) + UseArray(N(RuffPuffDataBuffer)) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) #define HNP_SWARM_MOVE_UP(idx) \ - EVT_IF_FLAG(LVar0, 1 << idx) \ - EVT_THREAD \ - EVT_CALL(GetActorPos, ArrayVar(idx), LVar1, LVar2, LVar3) \ - EVT_ADD(LVar2, 15) \ - EVT_CALL(SetGoalPos, ArrayVar(idx), LVar1, LVar2, LVar3) \ - EVT_CALL(FlyToGoal, ArrayVar(idx), 20, 0, EASING_LINEAR) \ - EVT_WAIT(3) \ - EVT_END_THREAD \ - EVT_END_IF + IfFlag(LVar0, 1 << idx) \ + Thread \ + Call(GetActorPos, ArrayVar(idx), LVar1, LVar2, LVar3) \ + Add(LVar2, 15) \ + Call(SetGoalPos, ArrayVar(idx), LVar1, LVar2, LVar3) \ + Call(FlyToGoal, ArrayVar(idx), 20, 0, EASING_LINEAR) \ + Wait(3) \ + EndThread \ + EndIf // each Tuff Puff moves up slightly FOR_CHILDREN_SCATTERED(HNP_SWARM_MOVE_UP) - EVT_WAIT(20) - EVT_SET(LVarA, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) + Wait(20) + Set(LVarA, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) #define HNP_ADD_CHILD(idx) \ - EVT_IF_FLAG(LVar0, 1 << idx) \ - EVT_ADD(LVarA, 1) \ - EVT_END_IF + IfFlag(LVar0, 1 << idx) \ + Add(LVarA, 1) \ + EndIf // count the number of Tuff Puffs to compute radial spacing around the player FOR_CHILDREN_ORDERED(HNP_ADD_CHILD) // radial increment will be stored in LVarB - EVT_SETF(LVarB, EVT_FLOAT(360.0)) - EVT_DIVF(LVarB, LVarA) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(SetBattleCamOffsetZ, 35) - EVT_CALL(MoveBattleCamOver, 60) - EVT_END_THREAD - EVT_SET(LVarA, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) + SetF(LVarB, Float(360.0)) + DivF(LVarB, LVarA) + Thread + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 300) + Call(SetBattleCamOffsetZ, 35) + Call(MoveBattleCamOver, 60) + EndThread + Set(LVarA, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) #define HNP_SWARM_SURROUND_PLAYER(idx) \ - EVT_IF_FLAG(LVar0, 1 << idx) \ - EVT_CALL(UseIdleAnimation, ArrayVar(idx), FALSE) \ - EVT_CALL(SetPartAlpha, ArrayVar(idx), 1, 254) \ - EVT_CALL(GetActorVar, ArrayVar(idx), AVAR_TuffPuff_IsLarge, LVar1) \ - EVT_IF_EQ(LVar1, 0) \ - EVT_CALL(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim09) \ - EVT_ELSE \ - EVT_CALL(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim0B) \ - EVT_END_IF \ - EVT_THREAD \ - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar1, LVar2, LVar3) \ - EVT_MULF(LVarB, LVarA) \ - EVT_ADDF(LVarB, EVT_FLOAT(100.0)) \ - EVT_CALL(AddVectorPolar, LVar1, LVar3, EVT_FLOAT(20.0), LVarB) \ - EVT_CALL(RandInt, 20, LVar4) \ - EVT_SUB(LVar4, 10) \ - EVT_ADD(LVar4, 19) \ - EVT_ADD(LVar2, LVar4) \ - EVT_MOD(LVarA, 2) \ - EVT_IF_EQ(LVarA, 0) \ - EVT_CALL(PlaySoundAtActor, ArrayVar(idx), SOUND_RUFF_PUFF_FLY_A) \ - EVT_ELSE \ - EVT_CALL(PlaySoundAtActor, ArrayVar(idx), SOUND_RUFF_PUFF_FLY_B) \ - EVT_END_IF \ - EVT_CALL(SetGoalPos, ArrayVar(idx), LVar1, LVar2, LVar3) \ - EVT_CALL(FlyToGoal, ArrayVar(idx), 30, -10, EASING_SIN_OUT) \ - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar4, LVar5, LVar6) \ - EVT_IF_LT(LVar1, LVar4) \ - EVT_CALL(SetActorYaw, ArrayVar(idx), 180) \ - EVT_END_IF \ - EVT_END_THREAD \ - EVT_ADD(LVarA, 1) \ - EVT_WAIT(4) \ - EVT_END_IF + IfFlag(LVar0, 1 << idx) \ + Call(UseIdleAnimation, ArrayVar(idx), FALSE) \ + Call(SetPartAlpha, ArrayVar(idx), 1, 254) \ + Call(GetActorVar, ArrayVar(idx), AVAR_TuffPuff_IsLarge, LVar1) \ + IfEq(LVar1, 0) \ + Call(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim09) \ + Else \ + Call(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim0B) \ + EndIf \ + Thread \ + Call(GetActorPos, ACTOR_PLAYER, LVar1, LVar2, LVar3) \ + MulF(LVarB, LVarA) \ + AddF(LVarB, Float(100.0)) \ + Call(AddVectorPolar, LVar1, LVar3, Float(20.0), LVarB) \ + Call(RandInt, 20, LVar4) \ + Sub(LVar4, 10) \ + Add(LVar4, 19) \ + Add(LVar2, LVar4) \ + Mod(LVarA, 2) \ + IfEq(LVarA, 0) \ + Call(PlaySoundAtActor, ArrayVar(idx), SOUND_RUFF_PUFF_FLY_A) \ + Else \ + Call(PlaySoundAtActor, ArrayVar(idx), SOUND_RUFF_PUFF_FLY_B) \ + EndIf \ + Call(SetGoalPos, ArrayVar(idx), LVar1, LVar2, LVar3) \ + Call(FlyToGoal, ArrayVar(idx), 30, -10, EASING_SIN_OUT) \ + Call(GetActorPos, ACTOR_PLAYER, LVar4, LVar5, LVar6) \ + IfLt(LVar1, LVar4) \ + Call(SetActorYaw, ArrayVar(idx), 180) \ + EndIf \ + EndThread \ + Add(LVarA, 1) \ + Wait(4) \ + EndIf // move each Tuff Puff to a position surrounding the player FOR_CHILDREN_SCATTERED(HNP_SWARM_SURROUND_PLAYER) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_01) - EVT_SET(LVar9, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_PRESET_01) + Set(LVar9, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) #define HNP_ADD_CHILD(idx) \ - EVT_IF_FLAG(LVar0, 1 << idx) \ - EVT_ADD(LVar9, 1) \ - EVT_END_IF + IfFlag(LVar0, 1 << idx) \ + Add(LVar9, 1) \ + EndIf // count the number of Tuff Puffs FOR_CHILDREN_ORDERED(HNP_ADD_CHILD) - EVT_SET(LVarA, 30 * DT) - EVT_SUB(LVarA, LVar9) - EVT_SET(LVar3, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) + Set(LVarA, 30 * DT) + Sub(LVarA, LVar9) + Set(LVar3, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) #define HNP_SQUEEZE_PLAYER(idx) \ - EVT_IF_FLAG(LVar0, 1 << idx) \ - EVT_SET(LVar1, ArrayVar(idx)) \ - EVT_SET(LVar2, LVarA) \ - EVT_EXEC_GET_TID(N(EVS_TuffPuff_SqueezePlayer), ArrayVar(idx + MAX_RUFF_PUFFS)) \ - EVT_ADD(LVar3, 1) \ - EVT_END_IF + IfFlag(LVar0, 1 << idx) \ + Set(LVar1, ArrayVar(idx)) \ + Set(LVar2, LVarA) \ + ExecGetTID(N(EVS_TuffPuff_SqueezePlayer), ArrayVar(idx + MAX_RUFF_PUFFS)) \ + Add(LVar3, 1) \ + EndIf // have each Tuff Puff squeeze the player FOR_CHILDREN_ORDERED(HNP_SQUEEZE_PLAYER) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_LABEL(0) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_IF_NOT_FLAG(LVar0, AVAR_Flag_WaitForChild) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_BITWISE_AND_CONST(LVar0, ~AVAR_Flag_WaitForChild) - EVT_CALL(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Label(0) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + IfNotFlag(LVar0, AVAR_Flag_WaitForChild) + Wait(1) + Goto(0) + EndIf + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + BitwiseAndConst(LVar0, ~AVAR_Flag_WaitForChild) + Call(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) #define HNP_SCATTER_PUFF(idx) \ - EVT_IF_FLAG(LVar0, 1 << idx) \ - EVT_KILL_THREAD(ArrayVar(idx + MAX_RUFF_PUFFS)) \ - EVT_CALL(GetActorVar, ArrayVar(idx), AVAR_TuffPuff_IsLarge, LVar1) \ - EVT_IF_EQ(LVar1, 0) \ - EVT_CALL(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim12) \ - EVT_ELSE \ - EVT_CALL(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim13) \ - EVT_END_IF \ - EVT_THREAD \ - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) \ - EVT_CALL(GetActorPos, ArrayVar(idx), LVar3, LVar4, LVar5) \ - EVT_CALL(N(Atan2), LVar6, LVar0, LVar2, LVar3, LVar5) \ - EVT_DIVF(LVar6, EVT_FLOAT(2.0)) \ - EVT_ADDF(LVar6, EVT_FLOAT(90.0)) \ - EVT_CALL(AddVectorPolar, LVar0, LVar1, EVT_FLOAT(70.0), LVar6) \ - EVT_CALL(SetActorJumpGravity, ArrayVar(idx), EVT_FLOAT(1.0)) \ - EVT_CALL(SetGoalPos, ArrayVar(idx), LVar0, LVar1, LVar2) \ - EVT_CALL(JumpToGoal, ArrayVar(idx), 20, FALSE, FALSE, FALSE) \ - EVT_END_THREAD \ - EVT_END_IF + IfFlag(LVar0, 1 << idx) \ + KillThread(ArrayVar(idx + MAX_RUFF_PUFFS)) \ + Call(GetActorVar, ArrayVar(idx), AVAR_TuffPuff_IsLarge, LVar1) \ + IfEq(LVar1, 0) \ + Call(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim12) \ + Else \ + Call(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim13) \ + EndIf \ + Thread \ + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) \ + Call(GetActorPos, ArrayVar(idx), LVar3, LVar4, LVar5) \ + Call(N(Atan2), LVar6, LVar0, LVar2, LVar3, LVar5) \ + DivF(LVar6, Float(2.0)) \ + AddF(LVar6, Float(90.0)) \ + Call(AddVectorPolar, LVar0, LVar1, Float(70.0), LVar6) \ + Call(SetActorJumpGravity, ArrayVar(idx), Float(1.0)) \ + Call(SetGoalPos, ArrayVar(idx), LVar0, LVar1, LVar2) \ + Call(JumpToGoal, ArrayVar(idx), 20, FALSE, FALSE, FALSE) \ + EndThread \ + EndIf // throw each Tuff Puff away in a large fan pattern FOR_CHILDREN_ORDERED(HNP_SCATTER_PUFF) - EVT_WAIT(15) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(20) - EVT_SET(LVarA, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) + Wait(15) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(20) + Set(LVarA, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) #define HNP_RETURN_HOME(idx) \ - EVT_IF_FLAG(LVar0, 1 << idx) \ - EVT_CALL(GetActorVar, ArrayVar(idx), AVAR_TuffPuff_IsLarge, LVar1) \ - EVT_IF_EQ(LVar1, 0) \ - EVT_CALL(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim06) \ - EVT_ELSE \ - EVT_CALL(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim07) \ - EVT_END_IF \ - EVT_THREAD \ - EVT_CALL(SetActorVar, ArrayVar(idx), AVAR_TuffPuff_WobbleMode, 0) \ - EVT_MOD(LVarA, 2) \ - EVT_IF_EQ(LVarA, 0) \ - EVT_CALL(PlaySoundAtActor, ArrayVar(idx), SOUND_RUFF_PUFF_FLY_A) \ - EVT_ELSE \ - EVT_CALL(PlaySoundAtActor, ArrayVar(idx), SOUND_RUFF_PUFF_FLY_B) \ - EVT_END_IF \ - EVT_CALL(SetGoalToHome, ArrayVar(idx)) \ - EVT_CALL(FlyToGoal, ArrayVar(idx), 30, 10, EASING_SIN_OUT) \ - EVT_CALL(SetPartAlpha, ArrayVar(idx), 1, 255) \ - EVT_CALL(SetActorYaw, ArrayVar(idx), 0) \ - EVT_CALL(GetActorVar, ArrayVar(idx), AVAR_TuffPuff_IsLarge, LVar1) \ - EVT_IF_EQ(LVar1, 0) \ - EVT_CALL(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim02) \ - EVT_ELSE \ - EVT_CALL(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim03) \ - EVT_END_IF \ - EVT_END_THREAD \ - EVT_ADD(LVarA, 1) \ - EVT_WAIT(4) \ - EVT_END_IF + IfFlag(LVar0, 1 << idx) \ + Call(GetActorVar, ArrayVar(idx), AVAR_TuffPuff_IsLarge, LVar1) \ + IfEq(LVar1, 0) \ + Call(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim06) \ + Else \ + Call(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim07) \ + EndIf \ + Thread \ + Call(SetActorVar, ArrayVar(idx), AVAR_TuffPuff_WobbleMode, 0) \ + Mod(LVarA, 2) \ + IfEq(LVarA, 0) \ + Call(PlaySoundAtActor, ArrayVar(idx), SOUND_RUFF_PUFF_FLY_A) \ + Else \ + Call(PlaySoundAtActor, ArrayVar(idx), SOUND_RUFF_PUFF_FLY_B) \ + EndIf \ + Call(SetGoalToHome, ArrayVar(idx)) \ + Call(FlyToGoal, ArrayVar(idx), 30, 10, EASING_SIN_OUT) \ + Call(SetPartAlpha, ArrayVar(idx), 1, 255) \ + Call(SetActorYaw, ArrayVar(idx), 0) \ + Call(GetActorVar, ArrayVar(idx), AVAR_TuffPuff_IsLarge, LVar1) \ + IfEq(LVar1, 0) \ + Call(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim02) \ + Else \ + Call(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim03) \ + EndIf \ + EndThread \ + Add(LVarA, 1) \ + Wait(4) \ + EndIf // have each Tuff Puff fly back to its home position FOR_CHILDREN_SCATTERED(HNP_RETURN_HOME) - EVT_WAIT(50) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAG_STONE) - EVT_WAIT(10) - EVT_SET(LVar3, 0) - EVT_LOOP(0) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_IF_FLAG(LVar0, AVAR_Flag_WaitForChild) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_BITWISE_AND_CONST(LVar0, ~AVAR_Flag_WaitForChild) - EVT_CALL(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_WAIT(2) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, 0, 1, BS_FLAGS1_NICE_HIT) - EVT_ADD(LVar3, 1) - EVT_END_IF - EVT_IF_GT(LVar3, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_ELSE - EVT_CALL(ShowMessageBox, BTL_MSG_ACTION_TIP_MASH_BUTTON, 180) - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_STOP_LEECH) - EVT_CALL(action_command_stop_leech_init) - EVT_CALL(SetupMashMeter, 1, 25, 0, 0, 0, 0) - EVT_WAIT(10) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_CALL(action_command_stop_leech_start, 0, 32767, 3) - EVT_SET(LVarB, LVarA) - EVT_DIV(LVarB, 2) - EVT_WAIT(LVarB) - EVT_SET(LVarD, 0) - EVT_LOOP(0) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_IF_FLAG(LVar0, AVAR_Flag_WaitForChild) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_BITWISE_AND_CONST(LVar0, ~AVAR_Flag_WaitForChild) - EVT_CALL(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) - EVT_WAIT(2) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_UNBLOCKABLE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, 0, 2, BS_FLAGS1_NICE_HIT) - EVT_ADD(LVarD, 1) - EVT_END_IF - EVT_CALL(GetActionSuccessCopy, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(GetLastDamage, ACTOR_PLAYER, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_IF_GT(LVarD, 1) - EVT_CALL(func_80269470) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_CALL(GetPlayerHP, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(func_80269470) - EVT_BREAK_LOOP - EVT_END_IF - EVT_IF_GE(LVarD, 20) - EVT_CALL(func_80269470) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(func_80269470) - EVT_END_IF - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) + Wait(50) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(GetStatusFlags, ACTOR_PLAYER, LVar1) + IfFlag(LVar1, STATUS_FLAG_STONE) + Wait(10) + Set(LVar3, 0) + Loop(0) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + IfFlag(LVar0, AVAR_Flag_WaitForChild) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + BitwiseAndConst(LVar0, ~AVAR_Flag_WaitForChild) + Call(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + Wait(2) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, 0, 1, BS_FLAGS1_NICE_HIT) + Add(LVar3, 1) + EndIf + IfGt(LVar3, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + Else + Call(ShowMessageBox, BTL_MSG_ACTION_TIP_MASH_BUTTON, 180) + Call(ShowActionHud, TRUE) + Call(LoadActionCommand, ACTION_COMMAND_STOP_LEECH) + Call(action_command_stop_leech_init) + Call(SetupMashMeter, 1, 25, 0, 0, 0, 0) + Wait(10) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + Call(action_command_stop_leech_start, 0, 32767, 3) + Set(LVarB, LVarA) + Div(LVarB, 2) + Wait(LVarB) + Set(LVarD, 0) + Loop(0) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + IfFlag(LVar0, AVAR_Flag_WaitForChild) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + BitwiseAndConst(LVar0, ~AVAR_Flag_WaitForChild) + Call(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_Flags, LVar0) + Wait(2) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_UNBLOCKABLE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, 0, 2, BS_FLAGS1_NICE_HIT) + Add(LVarD, 1) + EndIf + Call(GetActionSuccessCopy, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Call(GetLastDamage, ACTOR_PLAYER, LVar0) + IfEq(LVar0, 0) + IfGt(LVarD, 1) + Call(func_80269470) + BreakLoop + EndIf + EndIf + Call(GetPlayerHP, LVar0) + IfEq(LVar0, 0) + Call(func_80269470) + BreakLoop + EndIf + IfGe(LVarD, 20) + Call(func_80269470) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(func_80269470) + EndIf + Switch(LVarA) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) #define HNP_SCATTER_PUFF(idx) \ - EVT_IF_FLAG(LVar0, 1 << idx) \ - EVT_KILL_THREAD(ArrayVar(idx + MAX_RUFF_PUFFS)) \ - EVT_CALL(GetActorVar, ArrayVar(idx), AVAR_TuffPuff_IsLarge, LVar1) \ - EVT_IF_EQ(LVar1, 0) \ - EVT_CALL(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim12) \ - EVT_ELSE \ - EVT_CALL(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim13) \ - EVT_END_IF \ - EVT_THREAD \ - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) \ - EVT_CALL(GetActorPos, ArrayVar(idx), LVar3, LVar4, LVar5) \ - EVT_CALL(N(Atan2), LVar6, LVar0, LVar2, LVar3, LVar5) \ - EVT_DIVF(LVar6, EVT_FLOAT(2.0)) \ - EVT_ADDF(LVar6, EVT_FLOAT(90.0)) \ - EVT_CALL(AddVectorPolar, LVar0, LVar1, EVT_FLOAT(70.0), LVar6) \ - EVT_CALL(SetActorJumpGravity, ArrayVar(idx), EVT_FLOAT(1.0)) \ - EVT_CALL(SetGoalPos, ArrayVar(idx), LVar0, LVar1, LVar2) \ - EVT_CALL(JumpToGoal, ArrayVar(idx), 20, FALSE, FALSE, FALSE) \ - EVT_END_THREAD \ - EVT_END_IF + IfFlag(LVar0, 1 << idx) \ + KillThread(ArrayVar(idx + MAX_RUFF_PUFFS)) \ + Call(GetActorVar, ArrayVar(idx), AVAR_TuffPuff_IsLarge, LVar1) \ + IfEq(LVar1, 0) \ + Call(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim12) \ + Else \ + Call(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim13) \ + EndIf \ + Thread \ + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) \ + Call(GetActorPos, ArrayVar(idx), LVar3, LVar4, LVar5) \ + Call(N(Atan2), LVar6, LVar0, LVar2, LVar3, LVar5) \ + DivF(LVar6, Float(2.0)) \ + AddF(LVar6, Float(90.0)) \ + Call(AddVectorPolar, LVar0, LVar1, Float(70.0), LVar6) \ + Call(SetActorJumpGravity, ArrayVar(idx), Float(1.0)) \ + Call(SetGoalPos, ArrayVar(idx), LVar0, LVar1, LVar2) \ + Call(JumpToGoal, ArrayVar(idx), 20, FALSE, FALSE, FALSE) \ + EndThread \ + EndIf // throw each Tuff Puff away in a large fan pattern FOR_CHILDREN_ORDERED(HNP_SCATTER_PUFF) - EVT_CALL(GetPlayerHP, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_WAIT(1) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_STONE) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(20) - EVT_ADD(LVar0, 54) - EVT_MOD(LVar0, 360) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 0) - EVT_END_THREAD - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_Land) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.5)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 20, 0, 1) - EVT_ELSE - EVT_WAIT(20) - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_ELSE - EVT_WAIT(20) - EVT_END_IF - EVT_WAIT(15) - EVT_SET(LVarA, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) + Call(GetPlayerHP, LVar0) + IfNe(LVar0, 0) + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Wait(1) + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_STONE) + Thread + Set(LVar0, 0) + Loop(20) + Add(LVar0, 54) + Mod(LVar0, 360) + Call(SetActorYaw, ACTOR_PLAYER, LVar0) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_PLAYER, 0) + EndThread + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_Land) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.5)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 20, 0, 1) + Else + Wait(20) + EndIf + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Else + Wait(20) + EndIf + Wait(15) + Set(LVarA, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_ChildBits, LVar0) #define HNP_RETURN_HOME(idx) \ - EVT_IF_FLAG(LVar0, 1 << idx) \ - EVT_CALL(GetActorVar, ArrayVar(idx), AVAR_TuffPuff_IsLarge, LVar1) \ - EVT_IF_EQ(LVar1, 0) \ - EVT_CALL(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim06) \ - EVT_ELSE \ - EVT_CALL(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim07) \ - EVT_END_IF \ - EVT_THREAD \ - EVT_CALL(SetActorVar, ArrayVar(idx), AVAR_TuffPuff_WobbleMode, 0) \ - EVT_MOD(LVarA, 2) \ - EVT_IF_EQ(LVarA, 0) \ - EVT_CALL(PlaySoundAtActor, ArrayVar(idx), SOUND_RUFF_PUFF_FLY_A) \ - EVT_ELSE \ - EVT_CALL(PlaySoundAtActor, ArrayVar(idx), SOUND_RUFF_PUFF_FLY_B) \ - EVT_END_IF \ - EVT_CALL(SetGoalToHome, ArrayVar(idx)) \ - EVT_CALL(FlyToGoal, ArrayVar(idx), 30, 10, EASING_SIN_OUT) \ - EVT_CALL(SetPartAlpha, ArrayVar(idx), 1, 255) \ - EVT_CALL(SetActorYaw, ArrayVar(idx), 0) \ - EVT_CALL(GetActorVar, ArrayVar(idx), AVAR_TuffPuff_IsLarge, LVar1) \ - EVT_IF_EQ(LVar1, 0) \ - EVT_CALL(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim02) \ - EVT_ELSE \ - EVT_CALL(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim03) \ - EVT_END_IF \ - EVT_END_THREAD \ - EVT_ADD(LVarA, 1) \ - EVT_WAIT(4) \ - EVT_END_IF + IfFlag(LVar0, 1 << idx) \ + Call(GetActorVar, ArrayVar(idx), AVAR_TuffPuff_IsLarge, LVar1) \ + IfEq(LVar1, 0) \ + Call(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim06) \ + Else \ + Call(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim07) \ + EndIf \ + Thread \ + Call(SetActorVar, ArrayVar(idx), AVAR_TuffPuff_WobbleMode, 0) \ + Mod(LVarA, 2) \ + IfEq(LVarA, 0) \ + Call(PlaySoundAtActor, ArrayVar(idx), SOUND_RUFF_PUFF_FLY_A) \ + Else \ + Call(PlaySoundAtActor, ArrayVar(idx), SOUND_RUFF_PUFF_FLY_B) \ + EndIf \ + Call(SetGoalToHome, ArrayVar(idx)) \ + Call(FlyToGoal, ArrayVar(idx), 30, 10, EASING_SIN_OUT) \ + Call(SetPartAlpha, ArrayVar(idx), 1, 255) \ + Call(SetActorYaw, ArrayVar(idx), 0) \ + Call(GetActorVar, ArrayVar(idx), AVAR_TuffPuff_IsLarge, LVar1) \ + IfEq(LVar1, 0) \ + Call(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim02) \ + Else \ + Call(SetAnimation, ArrayVar(idx), 1, ANIM_TuffPuff_Anim03) \ + EndIf \ + EndThread \ + Add(LVarA, 1) \ + Wait(4) \ + EndIf // have each Tuff Puff fly back to its home position FOR_CHILDREN_SCATTERED(HNP_RETURN_HOME) - EVT_WAIT(50) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Wait(50) + EndCaseGroup + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/area/flo2/actor/monty_mole_boss.c b/src/battle/area/flo2/actor/monty_mole_boss.c index c3d3fbfce9c..eb9ca4dcd58 100644 --- a/src/battle/area/flo2/actor/monty_mole_boss.c +++ b/src/battle/area/flo2/actor/monty_mole_boss.c @@ -163,12 +163,12 @@ ActorPartBlueprint N(HoleParts)[] = { }; EvtScript N(EVS_Hole_Init) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IN_Hole_Small, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_IN_Hole_Small, LVar0) + IfEq(LVar0, 1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(0.4), Float(0.4), Float(0.4)) + EndIf + Return + End }; ActorBlueprint N(hole) = { @@ -205,242 +205,242 @@ Formation N(SmallHoleFormation) = { }; EvtScript N(EVS_CreateEmptyHole) = { - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SummonEnemy, EVT_PTR(N(SmallHoleFormation)), FALSE) - EVT_ELSE - EVT_CALL(SummonEnemy, EVT_PTR(N(HoleFormation)), FALSE) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_SUB(LVar3, 1) - EVT_CALL(SetActorPos, LVar0, LVar1, LVar2, LVar3) - EVT_RETURN - EVT_END + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SummonEnemy, Ref(N(SmallHoleFormation)), FALSE) + Else + Call(SummonEnemy, Ref(N(HoleFormation)), FALSE) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Sub(LVar3, 1) + Call(SetActorPos, LVar0, LVar1, LVar2, LVar3) + Return + End }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastElement, LVarE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_IF_FLAG(LVarE, DAMAGE_TYPE_SMASH) - EVT_CHILD_THREAD - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim07) - EVT_END_CHILD_THREAD - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MontyMole_Dark_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim08) - EVT_WAIT(10) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MontyMole_Dark_Anim05) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MontyMole_Dark_Anim0A) - EVT_SET_CONST(LVar2, ANIM_MontyMole_Dark_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MontyMole_Dark_Anim0A) - EVT_SET_CONST(LVar2, ANIM_MontyMole_Dark_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_CreateEmptyHole)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MontyMole_Dark_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CALL(GetLastElement, LVar0) - EVT_IF_FLAG(LVar0, DAMAGE_TYPE_SMASH) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim11) - EVT_WAIT(80) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim10) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim14) - EVT_WAIT(20) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MontyMole_Dark_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MontyMole_Dark_Anim05) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim06) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_CreateEmptyHole)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MontyMole_Dark_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim06) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim07) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim08) - EVT_WAIT(8) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim06) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim07) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim08) - EVT_WAIT(15) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TARGET_ONLY | ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(EmptyHoleAnims))) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MontyMole_Dark_Anim05) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_EXEC_WAIT(N(EVS_CreateEmptyHole)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -5, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim19) - EVT_ELSE - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -9, 0) - EVT_ELSE - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -23, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim09) - EVT_END_IF - EVT_WAIT(1000) - EVT_RETURN - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim11) - EVT_WAIT(40) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim10) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim14) - EVT_WAIT(20) - EVT_CASE_EQ(EVENT_UP_AND_AWAY) - EVT_EXEC_WAIT(N(EVS_CreateEmptyHole)) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastElement, LVarE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + IfFlag(LVarE, DAMAGE_TYPE_SMASH) + ChildThread + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim07) + EndChildThread + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MontyMole_Dark_Anim06) + ExecWait(EVS_Enemy_Hit) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim08) + Wait(10) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MontyMole_Dark_Anim05) + ExecWait(EVS_Enemy_Hit) + EndIf + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MontyMole_Dark_Anim0A) + SetConst(LVar2, ANIM_MontyMole_Dark_Anim0B) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MontyMole_Dark_Anim0A) + SetConst(LVar2, ANIM_MontyMole_Dark_Anim0B) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_CreateEmptyHole)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MontyMole_Dark_Anim0C) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + Call(GetLastElement, LVar0) + IfFlag(LVar0, DAMAGE_TYPE_SMASH) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim11) + Wait(80) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim10) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim14) + Wait(20) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MontyMole_Dark_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MontyMole_Dark_Anim05) + ExecWait(EVS_Enemy_Hit) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim06) + Wait(10) + ExecWait(N(EVS_CreateEmptyHole)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MontyMole_Dark_Anim09) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim06) + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim07) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim08) + Wait(8) + CaseEq(EVENT_SCARE_AWAY) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim06) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim07) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim08) + Wait(15) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TARGET_ONLY | ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(EmptyHoleAnims))) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MontyMole_Dark_Anim05) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + ExecWait(N(EVS_CreateEmptyHole)) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(SetActorDispOffset, ACTOR_SELF, 0, -5, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim19) + Else + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetActorDispOffset, ACTOR_SELF, 0, -9, 0) + Else + Call(SetActorDispOffset, ACTOR_SELF, 0, -23, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim09) + EndIf + Wait(1000) + Return + CaseEq(EVENT_AIR_LIFT_FAILED) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim11) + Wait(40) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim10) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim14) + Wait(20) + CaseEq(EVENT_UP_AND_AWAY) + ExecWait(N(EVS_CreateEmptyHole)) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 1) - EVT_END_IF - EVT_CHILD_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) - EVT_END_CHILD_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim04) - EVT_WAIT(37) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_ROCK, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_ROCK, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_ROCK, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_ELSE - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_ROCK, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_ROCK, SOUND_MOLE_THROW) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_ROCK, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 100) - EVT_SET(LVar1, -5) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_ROCK, EVT_FLOAT(12.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_ROCK, EVT_FLOAT(0.1)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ROCK, ANIM_MontyMole_Dark_Anim0F) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_ROCK, LVar0, LVar1, LVar2, 0, 30, EASING_LINEAR) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_ROCK, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(YieldTurn) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_ROCK, EVT_FLOAT(12.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_ROCK, EVT_FLOAT(0.1)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ROCK, ANIM_MontyMole_Dark_Anim0F) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_ROCK, LVar0, LVar1, LVar2, 0, 20, EASING_LINEAR) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 55) - EVT_SET(LVar1, 0) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_ROCK, EVT_FLOAT(6.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_ROCK, EVT_FLOAT(0.1)) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_ROCK, LVar0, LVar1, LVar2, 0, 25, EASING_LINEAR) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_ROCK, EVT_FLOAT(4.0)) - EVT_SUB(LVar0, 20) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_ROCK, LVar0, LVar1, LVar2, 0, 21, EASING_LINEAR) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_ROCK, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 1) + EndIf + ChildThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) + Wait(20) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) + EndChildThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Dark_Anim04) + Wait(37) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(SetPartPos, ACTOR_SELF, PRT_ROCK, LVar0, LVar1, LVar2) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_ROCK, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartScale, ACTOR_SELF, PRT_ROCK, Float(0.4), Float(0.4), Float(0.4)) + Else + Call(SetPartScale, ACTOR_SELF, PRT_ROCK, Float(1.0), Float(1.0), Float(1.0)) + EndIf + Call(PlaySoundAtPart, ACTOR_SELF, PRT_ROCK, SOUND_MOLE_THROW) + Call(SetPartSounds, ACTOR_SELF, PRT_ROCK, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 100) + Set(LVar1, -5) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_ROCK, Float(12.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_ROCK, Float(0.1)) + Call(SetAnimation, ACTOR_SELF, PRT_ROCK, ANIM_MontyMole_Dark_Anim0F) + Call(FlyPartTo, ACTOR_SELF, PRT_ROCK, LVar0, LVar1, LVar2, 0, 30, EASING_LINEAR) + Call(SetPartFlagBits, ACTOR_SELF, PRT_ROCK, ACTOR_PART_FLAG_INVISIBLE, TRUE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(YieldTurn) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_ROCK, Float(12.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_ROCK, Float(0.1)) + Call(SetAnimation, ACTOR_SELF, PRT_ROCK, ANIM_MontyMole_Dark_Anim0F) + Call(FlyPartTo, ACTOR_SELF, PRT_ROCK, LVar0, LVar1, LVar2, 0, 20, EASING_LINEAR) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Sub(LVar0, 55) + Set(LVar1, 0) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_ROCK, Float(6.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_ROCK, Float(0.1)) + Call(FlyPartTo, ACTOR_SELF, PRT_ROCK, LVar0, LVar1, LVar2, 0, 25, EASING_LINEAR) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_ROCK, Float(4.0)) + Sub(LVar0, 20) + Call(FlyPartTo, ACTOR_SELF, PRT_ROCK, LVar0, LVar1, LVar2, 0, 21, EASING_LINEAR) + Call(SetPartFlagBits, ACTOR_SELF, PRT_ROCK, ACTOR_PART_FLAG_INVISIBLE, TRUE) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/area/flo2/actor/spike.c b/src/battle/area/flo2/actor/spike.c index 063682ff42d..2e359b014d7 100644 --- a/src/battle/area/flo2/actor/spike.c +++ b/src/battle/area/flo2/actor/spike.c @@ -116,272 +116,272 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 0, EASING_SIN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_Idle) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(7.0)) + Call(FlyToGoal, ACTOR_SELF, 0, 0, EASING_SIN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_Idle) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleLakilester_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleLakilester_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Dead) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Dead) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Dead) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0) - EVT_CALL(HPBarToCurrent, ACTOR_SELF) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Run) - EVT_SET_CONST(LVar2, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_BurnHurt) + SetConst(LVar2, ANIM_BattleLakilester_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_BurnHurt) + SetConst(LVar2, ANIM_BattleLakilester_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Dead) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Enemy_Knockback) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Dead) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Dead) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + Call(SetActorPos, ACTOR_SELF, 20, 0, 0) + Call(HPBarToCurrent, ACTOR_SELF) + CaseEq(EVENT_END_FIRST_STRIKE) + ExecWait(N(EVS_ReturnHome)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Run) + SetConst(LVar2, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_SpinyToss) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_Run) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, 20, 30, LVar2) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_Idle) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, -1) - EVT_ADD(LVar1, 4) - EVT_ADD(LVar2, 2) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_SPINY_BALL, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_ELSE - EVT_ADD(LVar0, -3) - EVT_ADD(LVar1, 10) - EVT_ADD(LVar2, 5) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_SPINY_BALL, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_SPINY_BALL, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SPINY_BALL, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPINY_BALL, ANIM_BattleLakilester_Spiny) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_LiftSpiny) - EVT_LOOP(4) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_ADDF(LVar1, EVT_FLOAT(2.4)) - EVT_ELSE - EVT_ADD(LVar1, 6) - EVT_END_IF - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_SPINY_BALL, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, -3) - EVT_ADD(LVar1, 16) - EVT_ADD(LVar2, 2) - EVT_SETF(LVar3, EVT_FLOAT(0.4)) - EVT_ELSE - EVT_ADD(LVar0, -8) - EVT_ADD(LVar1, 40) - EVT_ADD(LVar2, 5) - EVT_SETF(LVar3, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 0, LVar0, LVar1, LVar2, LVar3, 30, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPIKE_SUMMON_SPINY) - EVT_THREAD - EVT_LOOP(15) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 1, 0, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_SPINY_BALL, 1, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, -1, 0, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_SPINY_BALL, -1, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_SPINY_BALL, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_HoldSpiny) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_StrainHoldSpiny) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_ThrowSpiny) - EVT_WAIT(3) - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_SPINY_BALL, SOUND_SPIKE_THROW_SPINY) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_SPINY_BALL, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPINY_BALL, ANIM_BattleLakilester_SpinySpin) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_SPINY_BALL, EVT_FLOAT(1.5)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RandInt, 100, LVar3) - EVT_SUB(LVar3, 50) - EVT_ADD(LVar0, LVar3) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_SPINY_BALL, LVar0, 0, LVar2, 20, TRUE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_THREAD - EVT_ADD(LVar0, -50) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_SPINY_BALL, LVar0, 0, LVar2, 15, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SPINY_BALL, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_END_THREAD - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(YieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPINY_BALL, ANIM_BattleLakilester_SpinySpin) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_SPINY_BALL, EVT_FLOAT(1.5)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_SPINY_BALL, LVar0, LVar1, LVar2, 20, TRUE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_THREAD - EVT_ADD(LVar0, -50) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_SPINY_BALL, LVar0, 0, LVar2, 15, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SPINY_BALL, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_END_THREAD - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SPINY_TOSS, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(15) - EVT_CALL(YieldTurn) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_Run) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, 20, 30, LVar2) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_Idle) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Add(LVar0, -1) + Add(LVar1, 4) + Add(LVar2, 2) + Call(SetPartScale, ACTOR_SELF, PRT_SPINY_BALL, Float(0.4), Float(0.4), Float(0.4)) + Else + Add(LVar0, -3) + Add(LVar1, 10) + Add(LVar2, 5) + Call(SetPartScale, ACTOR_SELF, PRT_SPINY_BALL, Float(1.0), Float(1.0), Float(1.0)) + EndIf + Call(SetPartPos, ACTOR_SELF, PRT_SPINY_BALL, LVar0, LVar1, LVar2) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SPINY_BALL, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_SPINY_BALL, ANIM_BattleLakilester_Spiny) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_LiftSpiny) + Loop(4) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + AddF(LVar1, Float(2.4)) + Else + Add(LVar1, 6) + EndIf + Call(SetPartPos, ACTOR_SELF, PRT_SPINY_BALL, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Add(LVar0, -3) + Add(LVar1, 16) + Add(LVar2, 2) + SetF(LVar3, Float(0.4)) + Else + Add(LVar0, -8) + Add(LVar1, 40) + Add(LVar2, 5) + SetF(LVar3, Float(1.0)) + EndIf + PlayEffect(EFFECT_ENERGY_IN_OUT, 0, LVar0, LVar1, LVar2, LVar3, 30, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPIKE_SUMMON_SPINY) + Thread + Loop(15) + Call(SetActorDispOffset, ACTOR_SELF, 1, 0, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_SPINY_BALL, 1, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, -1, 0, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_SPINY_BALL, -1, 0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_SPINY_BALL, 0, 0, 0) + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_HoldSpiny) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_StrainHoldSpiny) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_ThrowSpiny) + Wait(3) + Call(PlaySoundAtPart, ACTOR_SELF, PRT_SPINY_BALL, SOUND_SPIKE_THROW_SPINY) + Call(SetPartSounds, ACTOR_SELF, PRT_SPINY_BALL, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetAnimation, ACTOR_SELF, PRT_SPINY_BALL, ANIM_BattleLakilester_SpinySpin) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_SPINY_BALL, Float(1.5)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RandInt, 100, LVar3) + Sub(LVar3, 50) + Add(LVar0, LVar3) + Call(JumpPartTo, ACTOR_SELF, PRT_SPINY_BALL, LVar0, 0, LVar2, 20, TRUE) + Call(ResetAllActorSounds, ACTOR_SELF) + Thread + Add(LVar0, -50) + Call(JumpPartTo, ACTOR_SELF, PRT_SPINY_BALL, LVar0, 0, LVar2, 15, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SPINY_BALL, ACTOR_PART_FLAG_INVISIBLE, TRUE) + EndThread + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(15) + Call(YieldTurn) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorYaw, ACTOR_SELF, 180) + ExecWait(N(EVS_ReturnHome)) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_SPINY_BALL, ANIM_BattleLakilester_SpinySpin) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_SPINY_BALL, Float(1.5)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpPartTo, ACTOR_SELF, PRT_SPINY_BALL, LVar0, LVar1, LVar2, 20, TRUE) + Call(ResetAllActorSounds, ACTOR_SELF) + Thread + Add(LVar0, -50) + Call(JumpPartTo, ACTOR_SELF, PRT_SPINY_BALL, LVar0, 0, LVar2, 15, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SPINY_BALL, ACTOR_PART_FLAG_INVISIBLE, TRUE) + EndThread + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SPINY_TOSS, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(15) + Call(YieldTurn) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_EXEC_WAIT(N(EVS_Attack_SpinyToss)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_Attack_SpinyToss)) + Return + End }; diff --git a/src/battle/area/flo2/actor/tuff_puff.c b/src/battle/area/flo2/actor/tuff_puff.c index ac186af00cc..f23fc4f6634 100644 --- a/src/battle/area/flo2/actor/tuff_puff.c +++ b/src/battle/area/flo2/actor/tuff_puff.c @@ -140,262 +140,262 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IN_IsLarge, LVar0) - EVT_IF_FALSE(LVar0) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -9) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_TARGET, -1, -9) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -1, 9) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_TARGET, -1, -41) - EVT_CALL(SetActorSize, ACTOR_SELF, 20, 25) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(SmallAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TuffPuff_Anim02) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsLarge, FALSE) - EVT_ELSE - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -8, -13) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_TARGET, -8, -13) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 1, 14) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_TARGET, 1, -36) - EVT_CALL(SetActorSize, ACTOR_SELF, 28, 35) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(LargeAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TuffPuff_Anim03) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsLarge, TRUE) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_WobbleMode, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ScaleX, 100) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ScaleY, 100) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(GetActorVar, ACTOR_SELF, AVAR_IN_IsLarge, LVar0) + IfFalse(LVar0) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -9) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_TARGET, -1, -9) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -1, 9) + Call(SetTargetOffset, ACTOR_SELF, PRT_TARGET, -1, -41) + Call(SetActorSize, ACTOR_SELF, 20, 25) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(SmallAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TuffPuff_Anim02) + Call(SetActorVar, ACTOR_SELF, AVAR_IsLarge, FALSE) + Else + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -8, -13) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_TARGET, -8, -13) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 1, 14) + Call(SetTargetOffset, ACTOR_SELF, PRT_TARGET, 1, -36) + Call(SetActorSize, ACTOR_SELF, 28, 35) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(LargeAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TuffPuff_Anim03) + Call(SetActorVar, ACTOR_SELF, AVAR_IsLarge, TRUE) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_WobbleMode, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_ScaleX, 100) + Call(SetActorVar, ACTOR_SELF, AVAR_ScaleY, 100) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_RETURN - EVT_END + Return + End }; #include "common/CosInterpMinMax.inc.c" EvtScript N(EVS_Idle) = { - EVT_SET(LVarF, 0) - EVT_LOOP(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_WobbleMode, LVarA) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(0) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, EVT_FLOAT(0.97), EVT_FLOAT(1.03), 15, 0, 0) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar1, EVT_FLOAT(1.03), EVT_FLOAT(0.97), 15, 0, 0) - EVT_ADD(LVarF, 1) - EVT_CASE_EQ(1) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, EVT_FLOAT(0.95), EVT_FLOAT(1.05), 15, 0, 0) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar1, EVT_FLOAT(1.05), EVT_FLOAT(0.95), 15, 0, 0) - EVT_ADD(LVarF, 3) - EVT_CASE_EQ(2) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, EVT_FLOAT(0.9), EVT_FLOAT(1.1), 15, 0, 0) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar1, EVT_FLOAT(1.1), EVT_FLOAT(0.9), 15, 0, 0) - EVT_ADD(LVarF, 5) - EVT_END_SWITCH - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar3) - EVT_DIVF(LVar2, EVT_FLOAT(100.0)) - EVT_DIVF(LVar3, EVT_FLOAT(100.0)) - EVT_MULF(LVar1, LVar2) - EVT_MULF(LVar0, LVar3) - EVT_CALL(SetActorScale, ACTOR_SELF, LVar1, LVar0, EVT_FLOAT(1.0)) - EVT_IF_GE(LVarF, 30) - EVT_SET(LVarF, 0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVarF, 0) + Loop(0) + Call(GetActorVar, ACTOR_SELF, AVAR_WobbleMode, LVarA) + Switch(LVarA) + CaseEq(0) + Call(N(CosInterpMinMax), LVarF, LVar0, Float(0.97), Float(1.03), 15, 0, 0) + Call(N(CosInterpMinMax), LVarF, LVar1, Float(1.03), Float(0.97), 15, 0, 0) + Add(LVarF, 1) + CaseEq(1) + Call(N(CosInterpMinMax), LVarF, LVar0, Float(0.95), Float(1.05), 15, 0, 0) + Call(N(CosInterpMinMax), LVarF, LVar1, Float(1.05), Float(0.95), 15, 0, 0) + Add(LVarF, 3) + CaseEq(2) + Call(N(CosInterpMinMax), LVarF, LVar0, Float(0.9), Float(1.1), 15, 0, 0) + Call(N(CosInterpMinMax), LVarF, LVar1, Float(1.1), Float(0.9), 15, 0, 0) + Add(LVarF, 5) + EndSwitch + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleX, LVar2) + Call(GetActorVar, ACTOR_SELF, AVAR_ScaleY, LVar3) + DivF(LVar2, Float(100.0)) + DivF(LVar3, Float(100.0)) + MulF(LVar1, LVar2) + MulF(LVar0, LVar3) + Call(SetActorScale, ACTOR_SELF, LVar1, LVar0, Float(1.0)) + IfGe(LVarF, 30) + Set(LVarF, 0) + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(onDeath) = { - EVT_CALL(ActorExists, ACTOR_HUFF_N_PUFF, LVar0) - EVT_IF_FALSE(LVar0) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Index, LVar0) - EVT_CALL(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_HuffNPuff_Flags, LVar1) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_BITWISE_AND_CONST(LVar1, ~(1 << 0)) - EVT_CASE_EQ(1) - EVT_BITWISE_AND_CONST(LVar1, ~(1 << 1)) - EVT_CASE_EQ(2) - EVT_BITWISE_AND_CONST(LVar1, ~(1 << 2)) - EVT_CASE_EQ(3) - EVT_BITWISE_AND_CONST(LVar1, ~(1 << 3)) - EVT_CASE_EQ(4) - EVT_BITWISE_AND_CONST(LVar1, ~(1 << 4)) - EVT_CASE_EQ(5) - EVT_BITWISE_AND_CONST(LVar1, ~(1 << 5)) - EVT_CASE_EQ(6) - EVT_BITWISE_AND_CONST(LVar1, ~(1 << 6)) - EVT_CASE_EQ(7) - EVT_BITWISE_AND_CONST(LVar1, ~(1 << 7)) - EVT_CASE_EQ(8) - EVT_BITWISE_AND_CONST(LVar1, ~(1 << 8)) - EVT_CASE_EQ(9) - EVT_BITWISE_AND_CONST(LVar1, ~(1 << 9)) - EVT_END_SWITCH - EVT_CALL(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_WobbleMode, LVar1) - EVT_RETURN - EVT_END + Call(ActorExists, ACTOR_HUFF_N_PUFF, LVar0) + IfFalse(LVar0) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Index, LVar0) + Call(GetActorVar, ACTOR_HUFF_N_PUFF, AVAR_HuffNPuff_Flags, LVar1) + Switch(LVar0) + CaseEq(0) + BitwiseAndConst(LVar1, ~(1 << 0)) + CaseEq(1) + BitwiseAndConst(LVar1, ~(1 << 1)) + CaseEq(2) + BitwiseAndConst(LVar1, ~(1 << 2)) + CaseEq(3) + BitwiseAndConst(LVar1, ~(1 << 3)) + CaseEq(4) + BitwiseAndConst(LVar1, ~(1 << 4)) + CaseEq(5) + BitwiseAndConst(LVar1, ~(1 << 5)) + CaseEq(6) + BitwiseAndConst(LVar1, ~(1 << 6)) + CaseEq(7) + BitwiseAndConst(LVar1, ~(1 << 7)) + CaseEq(8) + BitwiseAndConst(LVar1, ~(1 << 8)) + CaseEq(9) + BitwiseAndConst(LVar1, ~(1 << 9)) + EndSwitch + Call(SetActorVar, ACTOR_HUFF_N_PUFF, AVAR_WobbleMode, LVar1) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar1) - EVT_IF_FALSE(LVar1) - EVT_SET_CONST(LVar1, ANIM_TuffPuff_Anim0C) - EVT_ELSE - EVT_SET_CONST(LVar1, ANIM_TuffPuff_Anim0D) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar1) - EVT_IF_FALSE(LVar1) - EVT_SET_CONST(LVar1, ANIM_TuffPuff_Anim0C) - EVT_ELSE - EVT_SET_CONST(LVar1, ANIM_TuffPuff_Anim0D) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET(LVar0, 1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar1) - EVT_IF_FALSE(LVar1) - EVT_SET_CONST(LVar1, ANIM_TuffPuff_Anim0E) - EVT_ELSE - EVT_SET_CONST(LVar1, ANIM_TuffPuff_Anim10) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar2) - EVT_IF_FALSE(LVar2) - EVT_SET_CONST(LVar2, ANIM_TuffPuff_Anim0F) - EVT_ELSE - EVT_SET_CONST(LVar2, ANIM_TuffPuff_Anim11) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET(LVar0, 1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar1) - EVT_IF_FALSE(LVar1) - EVT_SET_CONST(LVar1, ANIM_TuffPuff_Anim0E) - EVT_ELSE - EVT_SET_CONST(LVar1, ANIM_TuffPuff_Anim10) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar2) - EVT_IF_FALSE(LVar2) - EVT_SET_CONST(LVar2, ANIM_TuffPuff_Anim0F) - EVT_ELSE - EVT_SET_CONST(LVar2, ANIM_TuffPuff_Anim11) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(onDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar1) - EVT_IF_FALSE(LVar1) - EVT_SET_CONST(LVar1, ANIM_TuffPuff_Anim0F) - EVT_ELSE - EVT_SET_CONST(LVar1, ANIM_TuffPuff_Anim11) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_ZERO_DAMAGE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar1) - EVT_IF_FALSE(LVar1) - EVT_SET_CONST(LVar1, ANIM_TuffPuff_Anim02) - EVT_ELSE - EVT_SET_CONST(LVar1, ANIM_TuffPuff_Anim03) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar1) - EVT_IF_FALSE(LVar1) - EVT_SET_CONST(LVar1, ANIM_TuffPuff_Anim02) - EVT_ELSE - EVT_SET_CONST(LVar1, ANIM_TuffPuff_Anim03) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar1) - EVT_IF_FALSE(LVar1) - EVT_SET_CONST(LVar1, ANIM_TuffPuff_Anim0C) - EVT_ELSE - EVT_SET_CONST(LVar1, ANIM_TuffPuff_Anim0D) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(onDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar1) - EVT_IF_FALSE(LVar1) - EVT_SET_CONST(LVar1, ANIM_TuffPuff_Anim0C) - EVT_ELSE - EVT_SET_CONST(LVar1, ANIM_TuffPuff_Anim0D) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar1) - EVT_IF_FALSE(LVar1) - EVT_SET_CONST(LVar1, ANIM_TuffPuff_Anim02) - EVT_ELSE - EVT_SET_CONST(LVar1, ANIM_TuffPuff_Anim03) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar1) - EVT_IF_FALSE(LVar1) - EVT_SET_CONST(LVar1, ANIM_TuffPuff_Anim06) - EVT_ELSE - EVT_SET_CONST(LVar1, ANIM_TuffPuff_Anim07) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_EXEC_WAIT(N(onDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar1) - EVT_IF_FALSE(LVar1) - EVT_SET_CONST(LVar1, ANIM_TuffPuff_Anim0C) - EVT_ELSE - EVT_SET_CONST(LVar1, ANIM_TuffPuff_Anim0D) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar1) - EVT_IF_FALSE(LVar1) - EVT_SET_CONST(LVar1, ANIM_TuffPuff_Anim02) - EVT_ELSE - EVT_SET_CONST(LVar1, ANIM_TuffPuff_Anim03) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar1) + IfFalse(LVar1) + SetConst(LVar1, ANIM_TuffPuff_Anim0C) + Else + SetConst(LVar1, ANIM_TuffPuff_Anim0D) + EndIf + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar1) + IfFalse(LVar1) + SetConst(LVar1, ANIM_TuffPuff_Anim0C) + Else + SetConst(LVar1, ANIM_TuffPuff_Anim0D) + EndIf + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_BURN_HIT) + Set(LVar0, 1) + Call(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar1) + IfFalse(LVar1) + SetConst(LVar1, ANIM_TuffPuff_Anim0E) + Else + SetConst(LVar1, ANIM_TuffPuff_Anim10) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar2) + IfFalse(LVar2) + SetConst(LVar2, ANIM_TuffPuff_Anim0F) + Else + SetConst(LVar2, ANIM_TuffPuff_Anim11) + EndIf + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + Set(LVar0, 1) + Call(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar1) + IfFalse(LVar1) + SetConst(LVar1, ANIM_TuffPuff_Anim0E) + Else + SetConst(LVar1, ANIM_TuffPuff_Anim10) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar2) + IfFalse(LVar2) + SetConst(LVar2, ANIM_TuffPuff_Anim0F) + Else + SetConst(LVar2, ANIM_TuffPuff_Anim11) + EndIf + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(onDeath)) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar1) + IfFalse(LVar1) + SetConst(LVar1, ANIM_TuffPuff_Anim0F) + Else + SetConst(LVar1, ANIM_TuffPuff_Anim11) + EndIf + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_ZERO_DAMAGE) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar1) + IfFalse(LVar1) + SetConst(LVar1, ANIM_TuffPuff_Anim02) + Else + SetConst(LVar1, ANIM_TuffPuff_Anim03) + EndIf + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar1) + IfFalse(LVar1) + SetConst(LVar1, ANIM_TuffPuff_Anim02) + Else + SetConst(LVar1, ANIM_TuffPuff_Anim03) + EndIf + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar1) + IfFalse(LVar1) + SetConst(LVar1, ANIM_TuffPuff_Anim0C) + Else + SetConst(LVar1, ANIM_TuffPuff_Anim0D) + EndIf + ExecWait(EVS_Enemy_Hit) + ExecWait(N(onDeath)) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar1) + IfFalse(LVar1) + SetConst(LVar1, ANIM_TuffPuff_Anim0C) + Else + SetConst(LVar1, ANIM_TuffPuff_Anim0D) + EndIf + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar1) + IfFalse(LVar1) + SetConst(LVar1, ANIM_TuffPuff_Anim02) + Else + SetConst(LVar1, ANIM_TuffPuff_Anim03) + EndIf + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar1) + IfFalse(LVar1) + SetConst(LVar1, ANIM_TuffPuff_Anim06) + Else + SetConst(LVar1, ANIM_TuffPuff_Anim07) + EndIf + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + ExecWait(N(onDeath)) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar1) + IfFalse(LVar1) + SetConst(LVar1, ANIM_TuffPuff_Anim0C) + Else + SetConst(LVar1, ANIM_TuffPuff_Anim0D) + EndIf + ExecWait(EVS_Enemy_BlowAway) + Return + CaseEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_IsLarge, LVar1) + IfFalse(LVar1) + SetConst(LVar1, ANIM_TuffPuff_Anim02) + Else + SetConst(LVar1, ANIM_TuffPuff_Anim03) + EndIf + ExecWait(EVS_Enemy_NoDamageHit) + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) // do nothing - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/area/hos/actor/goombario_tutor.c b/src/battle/area/hos/actor/goombario_tutor.c index 984316bf243..eae6c9b7352 100644 --- a/src/battle/area/hos/actor/goombario_tutor.c +++ b/src/battle/area/hos/actor/goombario_tutor.c @@ -102,183 +102,183 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FirstTurn, TRUE) - EVT_EXEC(N(EVS_ManageTutorial)) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_FirstTurn, TRUE) + Exec(N(EVS_ManageTutorial)) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_FirstTurn, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_CALL(RandInt, 2, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(ActorSpeak, MSG_HOS_002D, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_HurtStill, ANIM_BattleGoombario_Walk) - EVT_CASE_EQ(1) - EVT_CALL(ActorSpeak, MSG_HOS_002E, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_HurtStill, ANIM_BattleGoombario_Walk) - EVT_CASE_EQ(2) - EVT_END_SWITCH - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_30) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(1000) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Thread + Call(FreezeBattleState, TRUE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT) + Call(GetActorVar, ACTOR_SELF, AVAR_FirstTurn, LVar0) + IfEq(LVar0, FALSE) + Call(RandInt, 2, LVar0) + Switch(LVar0) + CaseEq(0) + Call(ActorSpeak, MSG_HOS_002D, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_HurtStill, ANIM_BattleGoombario_Walk) + CaseEq(1) + Call(ActorSpeak, MSG_HOS_002E, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_HurtStill, ANIM_BattleGoombario_Walk) + CaseEq(2) + EndSwitch + EndIf + EndSwitch + Call(FreezeBattleState, FALSE) + EndThread + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_30) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + ExecWait(EVS_Enemy_Hit) + Wait(1000) + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 400) - EVT_CALL(SetBattleCamOffsetZ, 40) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Run) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_66) - EVT_CALL(SetBattleCamZoom, 400) - EVT_CALL(SetBattleCamOffsetZ, 40) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -10, 0, 0) - EVT_CALL(GetBattleFlags2, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS2_DOING_JUMP_TUTORIAL) - EVT_CALL(AddGoalPos, ACTOR_SELF, 5, 10, 0) - EVT_END_IF - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.1)) - EVT_THREAD - EVT_WAIT(4) - EVT_SET(LVar0, 0) - EVT_LOOP(4) - EVT_ADD(LVar0, 45) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(ShowActionHud, TRUE) - EVT_WAIT(10) - EVT_CALL(action_command_jump_start, 12, 3) - EVT_END_THREAD - EVT_CALL(PlaySound, SOUND_ACTOR_JUMP) - EVT_CALL(JumpToGoal, ACTOR_SELF, 22, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(GetActionCommandMode, LVar0) - EVT_IF_EQ(LVar0, ACTION_COMMAND_MODE_TUTORIAL) - EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL_WAIT_INPUT) - EVT_LOOP(0) - EVT_CALL(GetActionCommandMode, LVar0) - EVT_IF_LT(LVar0, ACTION_COMMAND_MODE_TUTORIAL) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_FirstTurn, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_CALL(SetDamageSource, DMG_SRC_TUTORIAL_GOOMBARIO) - EVT_END_IF - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(CloseActionCommandInfo) - EVT_SET(LVarF, LVar0) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 10) - EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) - EVT_WAIT(8) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Run) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 400) + Call(SetBattleCamOffsetZ, 40) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Run) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) + Call(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk) + Call(UseBattleCamPreset, BTL_CAM_PRESET_66) + Call(SetBattleCamZoom, 400) + Call(SetBattleCamOffsetZ, 40) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -10, 0, 0) + Call(GetBattleFlags2, LVar0) + IfFlag(LVar0, BS_FLAGS2_DOING_JUMP_TUTORIAL) + Call(AddGoalPos, ACTOR_SELF, 5, 10, 0) + EndIf + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.1)) + Thread + Wait(4) + Set(LVar0, 0) + Loop(4) + Add(LVar0, 45) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk) + EndThread + Thread + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(ShowActionHud, TRUE) + Wait(10) + Call(action_command_jump_start, 12, 3) + EndThread + Call(PlaySound, SOUND_ACTOR_JUMP) + Call(JumpToGoal, ACTOR_SELF, 22, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0)) + Wait(1) + Call(GetActionCommandMode, LVar0) + IfEq(LVar0, ACTION_COMMAND_MODE_TUTORIAL) + Call(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL_WAIT_INPUT) + Loop(0) + Call(GetActionCommandMode, LVar0) + IfLt(LVar0, ACTION_COMMAND_MODE_TUTORIAL) + BreakLoop + EndIf + Wait(1) + EndLoop + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_FirstTurn, LVar0) + IfEq(LVar0, TRUE) + Call(SetDamageSource, DMG_SRC_TUTORIAL_GOOMBARIO) + EndIf + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS) + Call(CloseActionCommandInfo) + Set(LVarF, LVar0) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Sub(LVar0, 10) + Call(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) + Wait(8) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Run) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; API_CALLABLE(N(SetPartnerGoombario)) { @@ -289,258 +289,258 @@ API_CALLABLE(N(SetPartnerGoombario)) { } EvtScript N(EVS_ManageTutorial) = { - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_TUTORIAL_BATTLE, TRUE) - EVT_CALL(EnableBattleStatusBar, FALSE) - EVT_CALL(WaitForState, BATTLE_STATE_PLAYER_MENU) - EVT_WAIT(15) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_PARTNER, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 10, FALSE, FALSE, FALSE) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(ActorSpeak, MSG_HOS_0019, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_CALL(SetBattleMenuEnabledFlags, BTL_MENU_ENABLED_JUMP) - EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL) - EVT_CALL(WaitForState, BATTLE_STATE_PLAYER_MOVE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(15) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, -73, 40, 202) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 20, 20, EASING_COS_IN_OUT) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(ActorSpeak, MSG_HOS_001A, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_LEARNED) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_CALL(SetMessageBoxDuration, -1) - EVT_THREAD - EVT_LOOP(15) - EVT_CALL(SetMessageBoxDuration, 35) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(15) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 20, 20, EASING_COS_IN_OUT) - EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL) - EVT_CALL(WaitForState, BATTLE_STATE_0) - EVT_CALL(SetBattleFlagBits2, BS_FLAGS2_DOING_JUMP_TUTORIAL, TRUE) - EVT_LOOP(0) - EVT_CALL(GetActionCommandMode, LVar0) - EVT_IF_NE(LVar0, ACTION_COMMAND_MODE_TUTORIAL) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP + Call(SetBattleFlagBits, BS_FLAGS1_TUTORIAL_BATTLE, TRUE) + Call(EnableBattleStatusBar, FALSE) + Call(WaitForState, BATTLE_STATE_PLAYER_MENU) + Wait(15) + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(EnableIdleScript, ACTOR_PARTNER, IDLE_SCRIPT_DISABLE) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.0)) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, FALSE, FALSE) + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(ActorSpeak, MSG_HOS_0019, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Call(SetBattleMenuEnabledFlags, BTL_MENU_ENABLED_JUMP) + Call(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL) + Call(WaitForState, BATTLE_STATE_PLAYER_MOVE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(15) + Call(SetGoalPos, ACTOR_PARTNER, -73, 40, 202) + Call(FlyToGoal, ACTOR_PARTNER, 20, 20, EASING_COS_IN_OUT) + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(ActorSpeak, MSG_HOS_001A, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Call(SetActionCommandMode, ACTION_COMMAND_MODE_LEARNED) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + Call(SetMessageBoxDuration, -1) + Thread + Loop(15) + Call(SetMessageBoxDuration, 35) + Wait(1) + EndLoop + EndThread + Wait(15) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(FlyToGoal, ACTOR_PARTNER, 20, 20, EASING_COS_IN_OUT) + Call(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL) + Call(WaitForState, BATTLE_STATE_0) + Call(SetBattleFlagBits2, BS_FLAGS2_DOING_JUMP_TUTORIAL, TRUE) + Loop(0) + Call(GetActionCommandMode, LVar0) + IfNe(LVar0, ACTION_COMMAND_MODE_TUTORIAL) + BreakLoop + EndIf + Wait(1) + EndLoop // 'Press [A] at exactly this moment.' - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(ActorSpeak, MSG_HOS_001B, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) - EVT_LOOP(0) - EVT_CALL(CheckButtonDown, BUTTON_A, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(0) - EVT_CALL(CheckButtonPress, BUTTON_A, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EndActorSpeech, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_CALL(SetActionSuccess, 1) - EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_LEARNED) - EVT_CALL(WaitForState, BATTLE_STATE_BEGIN_PARTNER_TURN) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(15) + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(ActorSpeak, MSG_HOS_001B, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) + Loop(0) + Call(CheckButtonDown, BUTTON_A, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Loop(0) + Call(CheckButtonPress, BUTTON_A, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(EndActorSpeech, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Call(SetActionSuccess, 1) + Call(SetActionCommandMode, ACTION_COMMAND_MODE_LEARNED) + Call(WaitForState, BATTLE_STATE_BEGIN_PARTNER_TURN) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(15) // 'When you see "Nice" appear ...' - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(ActorSpeak, MSG_HOS_001D, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_CALL(WaitForState, BATTLE_STATE_9) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(15) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(ActorSpeak, MSG_HOS_001E, ACTOR_ENEMY0, 1, ANIM_BattleGoombario_Talk, ANIM_BattleGoombario_Idle) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL) - EVT_CALL(WaitForState, BATTLE_STATE_0) - EVT_LOOP(0) - EVT_CALL(GetActionCommandMode, LVar0) - EVT_IF_NE(LVar0, ACTION_COMMAND_MODE_TUTORIAL) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(ActorSpeak, MSG_HOS_001F, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) - EVT_LOOP(0) - EVT_CALL(CheckButtonDown, BUTTON_A, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(0) - EVT_CALL(CheckButtonPress, BUTTON_A, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EndActorSpeech, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_CALL(SetActionSuccess, 1) - EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL_BLOCK) - EVT_CALL(WaitForState, BATTLE_STATE_END_TURN) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(15) - EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_LEARNED) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(ActorSpeak, MSG_HOS_0020, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_CALL(WaitForState, BATTLE_STATE_PLAYER_MENU) - EVT_CALL(SetBattleMenuEnabledFlags, BTL_MENU_ENABLED_SMASH) - EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL) - EVT_CALL(WaitForState, BATTLE_STATE_PLAYER_MOVE) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(ActorSpeak, MSG_HOS_0022, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) - EVT_LOOP(0) - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(0) - EVT_CALL(CheckButtonPress, BUTTON_STICK_LEFT, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EndActorSpeech, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_LEARNED) - EVT_CALL(WaitForState, BATTLE_STATE_0) - EVT_WAIT(5) - EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL) - EVT_LOOP(0) - EVT_CALL(GetActionCommandMode, LVar0) - EVT_IF_NE(LVar0, ACTION_COMMAND_MODE_TUTORIAL) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL_BLOCK) - EVT_CALL(PauseTakeTurn, ACTOR_PLAYER) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(ActorSpeak, MSG_HOS_0023, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) - EVT_LOOP(0) - EVT_CALL(CheckButtonPress, BUTTON_STICK_LEFT, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EndActorSpeech, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL) - EVT_CALL(ResumeTakeTurn, ACTOR_PLAYER) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(0) - EVT_CALL(GetActionQuality, LVar0) - EVT_IF_EQ(LVar0, 3) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(ActorSpeak, MSG_HOS_0024, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) - EVT_LOOP(0) - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EndActorSpeech, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_CALL(SetActionSuccess, 1) - EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_LEARNED) - EVT_CALL(WaitForState, BATTLE_STATE_BEGIN_PARTNER_TURN) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(15) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(ActorSpeak, MSG_HOS_0025, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_CALL(SetActorFlagBits, ACTOR_ENEMY0, ACTOR_FLAG_NO_ATTACK, TRUE) - EVT_CALL(WaitForState, BATTLE_STATE_0) - EVT_CALL(WaitForState, BATTLE_STATE_PLAYER_MENU) - EVT_CALL(ShowBattleChoice, MSG_Choice_001D) - EVT_CALL(EndActorSpeech, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(ActorSpeak, MSG_HOS_0027, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) - EVT_GOTO(100) - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(ActorSpeak, MSG_HOS_0028, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FirstTurn, FALSE) - EVT_CALL(SetBattleFlagBits2, BS_FLAGS2_DOING_JUMP_TUTORIAL, FALSE) - EVT_LABEL(10) - EVT_CALL(SetBattleMenuEnabledFlags, BTL_MENU_ENABLED_JUMP | BTL_MENU_ENABLED_SMASH | BTL_MENU_ENABLED_STRATEGIES) - EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL) - EVT_CALL(WaitForState, BATTLE_STATE_PLAYER_MOVE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar0, BTL_MENU_TYPE_STRATEGIES) - EVT_GOTO(99) - EVT_END_IF - EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_LEARNED) - EVT_CALL(WaitForState, BATTLE_STATE_BEGIN_PARTNER_TURN) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(GetActionResult, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ACTION_RESULT_EARLY) - EVT_CALL(ActorSpeak, MSG_HOS_002A, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) - EVT_CASE_EQ(ACTION_RESULT_FAIL) - EVT_CALL(ActorSpeak, MSG_HOS_002B, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) - EVT_CASE_EQ(ACTION_RESULT_SUCCESS) - EVT_CALL(ActorSpeak, MSG_HOS_0029, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_CALL(SetEnemyHP, ACTOR_ENEMY0, 99) - EVT_CALL(SetActorFlagBits, ACTOR_ENEMY0, ACTOR_FLAG_NO_ATTACK, FALSE) - EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_LEARNED) - EVT_CALL(WaitForState, BATTLE_STATE_END_TURN) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(GetBlockResult, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(BLOCK_RESULT_EARLY) - EVT_CALL(ActorSpeak, MSG_HOS_002A, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) - EVT_CASE_EQ(BLOCK_RESULT_FAIL) - EVT_CALL(ActorSpeak, MSG_HOS_002B, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) - EVT_CASE_EQ(BLOCK_RESULT_SUCCESS) - EVT_CALL(ActorSpeak, MSG_HOS_0029, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_CALL(WaitForState, BATTLE_STATE_PLAYER_MENU) - EVT_GOTO(10) - EVT_LABEL(99) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(ActorSpeak, MSG_HOS_002C, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) - EVT_LABEL(100) - EVT_CALL(WaitForState, BATTLE_STATE_0) - EVT_CALL(SetBattleState, BATTLE_STATE_END_TRAINING_BATTLE) - EVT_CALL(N(SetPartnerGoombario)) - EVT_WAIT(10000) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(ActorSpeak, MSG_HOS_001D, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Call(WaitForState, BATTLE_STATE_9) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(15) + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(ActorSpeak, MSG_HOS_001E, ACTOR_ENEMY0, 1, ANIM_BattleGoombario_Talk, ANIM_BattleGoombario_Idle) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Call(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL) + Call(WaitForState, BATTLE_STATE_0) + Loop(0) + Call(GetActionCommandMode, LVar0) + IfNe(LVar0, ACTION_COMMAND_MODE_TUTORIAL) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(ActorSpeak, MSG_HOS_001F, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) + Loop(0) + Call(CheckButtonDown, BUTTON_A, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Loop(0) + Call(CheckButtonPress, BUTTON_A, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(EndActorSpeech, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Call(SetActionSuccess, 1) + Call(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL_BLOCK) + Call(WaitForState, BATTLE_STATE_END_TURN) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(15) + Call(SetActionCommandMode, ACTION_COMMAND_MODE_LEARNED) + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(ActorSpeak, MSG_HOS_0020, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Call(WaitForState, BATTLE_STATE_PLAYER_MENU) + Call(SetBattleMenuEnabledFlags, BTL_MENU_ENABLED_SMASH) + Call(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL) + Call(WaitForState, BATTLE_STATE_PLAYER_MOVE) + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(ActorSpeak, MSG_HOS_0022, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) + Loop(0) + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Loop(0) + Call(CheckButtonPress, BUTTON_STICK_LEFT, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(EndActorSpeech, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Call(SetActionCommandMode, ACTION_COMMAND_MODE_LEARNED) + Call(WaitForState, BATTLE_STATE_0) + Wait(5) + Call(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL) + Loop(0) + Call(GetActionCommandMode, LVar0) + IfNe(LVar0, ACTION_COMMAND_MODE_TUTORIAL) + BreakLoop + EndIf + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfEq(LVar0, 0) + Call(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL_BLOCK) + Call(PauseTakeTurn, ACTOR_PLAYER) + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(ActorSpeak, MSG_HOS_0023, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) + Loop(0) + Call(CheckButtonPress, BUTTON_STICK_LEFT, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(EndActorSpeech, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Call(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL) + Call(ResumeTakeTurn, ACTOR_PLAYER) + EndIf + Wait(1) + EndLoop + Loop(0) + Call(GetActionQuality, LVar0) + IfEq(LVar0, 3) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(ActorSpeak, MSG_HOS_0024, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) + Loop(0) + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(EndActorSpeech, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Call(SetActionSuccess, 1) + Call(SetActionCommandMode, ACTION_COMMAND_MODE_LEARNED) + Call(WaitForState, BATTLE_STATE_BEGIN_PARTNER_TURN) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(15) + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(ActorSpeak, MSG_HOS_0025, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Call(SetActorFlagBits, ACTOR_ENEMY0, ACTOR_FLAG_NO_ATTACK, TRUE) + Call(WaitForState, BATTLE_STATE_0) + Call(WaitForState, BATTLE_STATE_PLAYER_MENU) + Call(ShowBattleChoice, MSG_Choice_001D) + Call(EndActorSpeech, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) + IfEq(LVar0, 1) + Call(ActorSpeak, MSG_HOS_0027, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) + Goto(100) + EndIf + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(ActorSpeak, MSG_HOS_0028, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_FirstTurn, FALSE) + Call(SetBattleFlagBits2, BS_FLAGS2_DOING_JUMP_TUTORIAL, FALSE) + Label(10) + Call(SetBattleMenuEnabledFlags, BTL_MENU_ENABLED_JUMP | BTL_MENU_ENABLED_SMASH | BTL_MENU_ENABLED_STRATEGIES) + Call(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL) + Call(WaitForState, BATTLE_STATE_PLAYER_MOVE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + IfEq(LVar0, BTL_MENU_TYPE_STRATEGIES) + Goto(99) + EndIf + Call(SetActionCommandMode, ACTION_COMMAND_MODE_LEARNED) + Call(WaitForState, BATTLE_STATE_BEGIN_PARTNER_TURN) + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(GetActionResult, LVar0) + Switch(LVar0) + CaseEq(ACTION_RESULT_EARLY) + Call(ActorSpeak, MSG_HOS_002A, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) + CaseEq(ACTION_RESULT_FAIL) + Call(ActorSpeak, MSG_HOS_002B, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) + CaseEq(ACTION_RESULT_SUCCESS) + Call(ActorSpeak, MSG_HOS_0029, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) + EndSwitch + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Call(SetEnemyHP, ACTOR_ENEMY0, 99) + Call(SetActorFlagBits, ACTOR_ENEMY0, ACTOR_FLAG_NO_ATTACK, FALSE) + Call(SetActionCommandMode, ACTION_COMMAND_MODE_LEARNED) + Call(WaitForState, BATTLE_STATE_END_TURN) + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(GetBlockResult, LVar0) + Switch(LVar0) + CaseEq(BLOCK_RESULT_EARLY) + Call(ActorSpeak, MSG_HOS_002A, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) + CaseEq(BLOCK_RESULT_FAIL) + Call(ActorSpeak, MSG_HOS_002B, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) + CaseEq(BLOCK_RESULT_SUCCESS) + Call(ActorSpeak, MSG_HOS_0029, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) + EndSwitch + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Call(WaitForState, BATTLE_STATE_PLAYER_MENU) + Goto(10) + Label(99) + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(ActorSpeak, MSG_HOS_002C, ACTOR_PARTNER, 1, ANIM_Twink_Talk, ANIM_Twink_Fly) + Label(100) + Call(WaitForState, BATTLE_STATE_0) + Call(SetBattleState, BATTLE_STATE_END_TRAINING_BATTLE) + Call(N(SetPartnerGoombario)) + Wait(10000) + Return + End }; diff --git a/src/battle/area/hos/actor/magikoopa.c b/src/battle/area/hos/actor/magikoopa.c index 47ca8837695..0c552137cee 100644 --- a/src/battle/area/hos/actor/magikoopa.c +++ b/src/battle/area/hos/actor/magikoopa.c @@ -263,993 +263,993 @@ s32 N(BroomAnims)[] = { #include "common/ShrinkActor.inc.c" EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; #include "common/GetSelectedMoveID.inc.c" EvtScript N(EVS_KnockDownCheck) = { - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_PARTNER_ACTING) - EVT_IF_FLAG(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE) - EVT_END_IF - EVT_ELSE - EVT_CALL(N(GetSelectedMoveID), LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(MOVE_HEADBONK1) - EVT_CASE_OR_EQ(MOVE_HEADBONK2) - EVT_CASE_OR_EQ(MOVE_HEADBONK3) - EVT_CASE_OR_EQ(MOVE_MULTIBONK) - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetBattleFlags, LVar0) + IfNotFlag(LVar0, BS_FLAGS1_PARTNER_ACTING) + IfFlag(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE) + EndIf + Else + Call(N(GetSelectedMoveID), LVar0) + Switch(LVar0) + CaseOrEq(MOVE_HEADBONK1) + CaseOrEq(MOVE_HEADBONK2) + CaseOrEq(MOVE_HEADBONK3) + CaseOrEq(MOVE_MULTIBONK) + Call(GetBattleFlags, LVar0) + IfFlag(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE) + EndIf + EndCaseGroup + EndSwitch + EndIf + Return + End }; #include "common/battle/SetAbsoluteStatusOffsets.inc.c" #include "common/StartRumbleWithParams.inc.c" EvtScript N(EVS_KnockDown) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim04) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetLastElement, LVar0) - EVT_IF_FLAG(LVar0, DAMAGE_TYPE_POW) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim04) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_LABEL(0) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_BROOM, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_END_IF - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 1) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_BROOM, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(N(StartRumbleWithParams), 150, 10) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(0.7)) - EVT_END_THREAD - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar3) - EVT_IF_EQ(LVar3, EVENT_15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim04) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_ADD(LVar4, 10) - EVT_ADD(LVar5, 5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 10, 0) - EVT_END_IF - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_LOOP(20) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorType, ACTOR_SELF, ACTOR_TYPE_MAGIKOOPA_BOSS) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(StatusTable))) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 32) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(GetIndexFromPos, ACTOR_SELF, LVar0) - EVT_MOD(LVar0, 4) - EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVar0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, LVar0) + IfEq(LVar0, 1) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim04) + Goto(0) + EndIf + Call(GetLastElement, LVar0) + IfFlag(LVar0, DAMAGE_TYPE_POW) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim04) + Goto(0) + EndIf + Return + Label(0) + Call(HideHealthBar, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartScale, ACTOR_SELF, PRT_BROOM, Float(0.4), Float(0.4), Float(0.4)) + EndIf + Call(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar2, 1) + Call(SetPartPos, ACTOR_SELF, PRT_BROOM, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(N(StartRumbleWithParams), 150, 10) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.7)) + EndThread + Call(GetLastEvent, ACTOR_SELF, LVar3) + IfEq(LVar3, EVENT_15) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim04) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Add(LVar4, 10) + Add(LVar5, 5) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, Float(1.0), 10, 0) + EndIf + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Loop(20) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorType, ACTOR_SELF, ACTOR_TYPE_MAGIKOOPA_BOSS) + Call(SetStatusTable, ACTOR_SELF, Ref(N(StatusTable))) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 32) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(GetIndexFromPos, ACTOR_SELF, LVar0) + Mod(LVar0, 4) + Call(SetGoalToIndex, ACTOR_SELF, LVar0) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Return + End }; EvtScript N(EVS_Flee) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_IF_NE(LVar0, EVENT_SCARE_AWAY) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_01) - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_WAIT(10) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 200) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(YieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_EXEC_WAIT(EVS_ForceNextTarget) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(HideHealthBar, ACTOR_SELF) + Call(GetLastEvent, ACTOR_SELF, LVar0) + IfNe(LVar0, EVENT_SCARE_AWAY) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_PRESET_01) + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(1.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Wait(10) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetActorSpeed, ACTOR_SELF, Float(10.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 200) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(YieldTurn) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ExecWait(EVS_ForceNextTarget) + Call(HideHealthBar, ACTOR_SELF) + Call(RemoveActor, ACTOR_SELF) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) - EVT_BITWISE_AND_CONST(LVar0, ~AVAL_HitType_Combo) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) + BitwiseAndConst(LVar0, ~AVAL_HitType_Combo) + Call(SetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) + Return + End }; EvtScript N(EVS_Init) = { - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsClone, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HealAllCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HealOneCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_AttackBoostCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_DefenseBoostCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ElectrifyCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TransparifyCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CloneActorID, -1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_None) - EVT_RETURN - EVT_END + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar0) + IfEq(LVar0, 0) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_IsClone, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_HealAllCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_HealOneCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_AttackBoostCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_DefenseBoostCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_ElectrifyCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_TransparifyCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_CloneActorID, -1) + Call(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_None) + Return + End }; EvtScript N(EVS_Flying_Init) = { - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_Flying_HandleEvent))) - EVT_CALL(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsClone, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HealAllCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HealOneCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_AttackBoostCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_DefenseBoostCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ElectrifyCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TransparifyCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CloneActorID, -1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_None) - EVT_RETURN - EVT_END + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_Flying_HandleEvent))) + Call(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar0) + IfEq(LVar0, 0) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_IsClone, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_HealAllCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_HealOneCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_AttackBoostCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_DefenseBoostCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_ElectrifyCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_TransparifyCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_CloneActorID, -1) + Call(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_None) + Return + End }; EvtScript N(EVS_RemoveClone) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsClone, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CloneActorID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) - EVT_CALL(GetLastElement, LVarA) - EVT_IF_FLAG(LVarA, DAMAGE_TYPE_MULTIPLE_POPUPS) - EVT_LABEL(0) - EVT_CALL(GetBattleFlags, LVarA) - EVT_IF_FLAG(LVarA, BS_FLAGS1_EXECUTING_MOVE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CloneActorID, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CloneActorID, -1) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, ACTOR_FLAG_FLYING) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_FLYING, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_ELSE - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_GROUND, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_END_IF - EVT_CALL(GetActorPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(RemoveActor, LVar0) - EVT_THREAD - EVT_ADD(LVar3, 2) - EVT_LOOP(2) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0) - EVT_WAIT(2) - EVT_END_LOOP - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_IsClone, LVar0) + IfEq(LVar0, 1) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_CloneActorID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, 0) + Return + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) + Call(GetLastElement, LVarA) + IfFlag(LVarA, DAMAGE_TYPE_MULTIPLE_POPUPS) + Label(0) + Call(GetBattleFlags, LVarA) + IfFlag(LVarA, BS_FLAGS1_EXECUTING_MOVE) + Wait(1) + Goto(0) + EndIf + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_CloneActorID, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_CloneActorID, -1) + Call(GetActorFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, ACTOR_FLAG_FLYING) + Call(SetPartEventBits, ACTOR_SELF, PRT_FLYING, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + Else + Call(SetPartEventBits, ACTOR_SELF, PRT_GROUND, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + EndIf + Call(GetActorPos, LVar0, LVar1, LVar2, LVar3) + Call(RemoveActor, LVar0) + Thread + Add(LVar3, 2) + Loop(2) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0) + Wait(2) + EndLoop + EndThread + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AVAL_HitType_Combo) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CASE_OR_EQ(EVENT_UP_AND_AWAY) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim05) - EVT_SET_CONST(LVar2, ANIM_Magikoopa_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim05) - EVT_SET_CONST(LVar2, ANIM_Magikoopa_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_ZERO_DAMAGE) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) - EVT_IF_FLAG(LVar0, AVAL_HitType_Combo) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_END_IF - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim04) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, 0, 2, 0) - EVT_ELSE - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, -4, 5, 0) - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(EVENT_STAR_BEAM) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + Call(GetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) + BitwiseOrConst(LVar0, AVAL_HitType_Combo) + Call(SetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim04) + ExecWait(EVS_Enemy_Hit) + CaseOrEq(EVENT_HIT) + CaseOrEq(EVENT_UP_AND_AWAY) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim04) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_RemoveClone)) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim05) + SetConst(LVar2, ANIM_Magikoopa_Anim06) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_RemoveClone)) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim05) + SetConst(LVar2, ANIM_Magikoopa_Anim06) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_RemoveClone)) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim06) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + ExecWait(N(EVS_RemoveClone)) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + ExecWait(N(EVS_RemoveClone)) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_ZERO_DAMAGE) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + Call(GetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) + IfFlag(LVar0, AVAL_HitType_Combo) + ExecWait(N(EVS_RemoveClone)) + Return + EndIf + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNe(LVar0, 0) + ExecWait(N(EVS_RemoveClone)) + EndIf + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim04) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_RemoveClone)) + Wait(10) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + ExecWait(N(EVS_RemoveClone)) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim04) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) + ExecWait(N(EVS_Flee)) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim02) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + ExecWait(N(EVS_RemoveClone)) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, 0, 2, 0) + Else + Call(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, -4, 5, 0) + EndIf + EndIf + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim04) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(EVENT_STAR_BEAM) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim04) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_RemoveClone)) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Flying_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_FLYING, 255) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AVAL_HitType_Combo) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) - EVT_EXEC_WAIT(N(EVS_KnockDownCheck)) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CASE_OR_EQ(EVENT_FALL_TRIGGER) - EVT_EXEC_WAIT(N(EVS_KnockDownCheck)) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_UP_AND_AWAY) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_CASE_OR_EQ(EVENT_BURN_HIT) - EVT_CASE_OR_EQ(EVENT_15) - EVT_EXEC_WAIT(N(EVS_KnockDownCheck)) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim05) - EVT_SET_CONST(LVar2, ANIM_FlyingMagikoopa_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim05) - EVT_SET_CONST(LVar2, ANIM_FlyingMagikoopa_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_ZERO_DAMAGE) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) - EVT_IF_FLAG(LVar0, AVAL_HitType_Combo) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_END_IF - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0) - EVT_CALL(HPBarToCurrent, ACTOR_SELF) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim04) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -3, 0, 0) - EVT_ELSE - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -15, 0, 0) - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(EVENT_STAR_BEAM) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetPartAlpha, ACTOR_SELF, PRT_FLYING, 255) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + Call(GetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) + BitwiseOrConst(LVar0, AVAL_HitType_Combo) + Call(SetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) + ExecWait(N(EVS_KnockDownCheck)) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim04) + ExecWait(EVS_Enemy_Hit) + CaseOrEq(EVENT_HIT) + CaseOrEq(EVENT_FALL_TRIGGER) + ExecWait(N(EVS_KnockDownCheck)) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim04) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_RemoveClone)) + ExecWait(N(EVS_KnockDown)) + EndCaseGroup + CaseEq(EVENT_UP_AND_AWAY) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim04) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_RemoveClone)) + CaseOrEq(EVENT_BURN_HIT) + CaseOrEq(EVENT_15) + ExecWait(N(EVS_KnockDownCheck)) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim05) + SetConst(LVar2, ANIM_FlyingMagikoopa_Anim06) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_RemoveClone)) + ExecWait(N(EVS_KnockDown)) + EndCaseGroup + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim05) + SetConst(LVar2, ANIM_FlyingMagikoopa_Anim06) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_RemoveClone)) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim06) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + ExecWait(N(EVS_RemoveClone)) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + ExecWait(N(EVS_RemoveClone)) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_ZERO_DAMAGE) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + Call(GetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) + IfFlag(LVar0, AVAL_HitType_Combo) + ExecWait(N(EVS_RemoveClone)) + Return + EndIf + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNe(LVar0, 0) + ExecWait(N(EVS_RemoveClone)) + EndIf + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim04) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_RemoveClone)) + Wait(10) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + Call(SetActorPos, ACTOR_SELF, 20, 0, 0) + Call(HPBarToCurrent, ACTOR_SELF) + CaseEq(EVENT_END_FIRST_STRIKE) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + ExecWait(N(EVS_RemoveClone)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim04) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) + ExecWait(N(EVS_Flee)) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim02) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + ExecWait(N(EVS_RemoveClone)) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -3, 0, 0) + Else + Call(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -15, 0, 0) + EndIf + EndIf + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim04) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(EVENT_STAR_BEAM) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim04) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_RemoveClone)) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; // (in) LVarB: actorID to heal EvtScript N(EVS_Move_HealOne) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_HealOne) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_HealOneCount, 1) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 6) - EVT_ADD(LVar1, 12) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 16) - EVT_ADD(LVar1, 31) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 12) - EVT_ADD(LVar1, 14) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 36) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) - EVT_END_IF - EVT_WAIT(5) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, LVarB, SOUND_RECOVER_HEART) - EVT_CALL(PlaySoundAtActor, LVarB, SOUND_HEART_BOUNCE) - EVT_WAIT(30) - EVT_CALL(PlaySoundAtActor, LVarB, SOUND_STAR_BOUNCE_A) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(HealActor, LVarB, HEAL_AMT_ONE, FALSE) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_CALL(WaitForBuffDone) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_HealOne) + Call(AddActorVar, ACTOR_SELF, AVAR_HealOneCount, 1) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) + EndIf + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 6) + Add(LVar1, 12) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 16) + Add(LVar1, 31) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 12) + Add(LVar1, 14) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 30) + Add(LVar1, 36) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + EndIf + Wait(30) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) + EndIf + Wait(5) + Thread + Wait(5) + Call(PlaySoundAtActor, LVarB, SOUND_RECOVER_HEART) + Call(PlaySoundAtActor, LVarB, SOUND_HEART_BOUNCE) + Wait(30) + Call(PlaySoundAtActor, LVarB, SOUND_STAR_BOUNCE_A) + EndThread + Thread + Call(FreezeBattleState, TRUE) + Call(HealActor, LVarB, HEAL_AMT_ONE, FALSE) + Call(FreezeBattleState, FALSE) + EndThread + Call(WaitForBuffDone) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Wait(10) + Call(YieldTurn) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Move_HealAll) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_HealAll) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_HealAllCount, 1) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 6) - EVT_ADD(LVar1, 12) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 16) - EVT_ADD(LVar1, 31) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 12) - EVT_ADD(LVar1, 14) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 36) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetOriginalActorType, LVar0, LVar1) - EVT_IF_EQ(LVar1, ACTOR_TYPE_DRY_BONES) - EVT_CALL(GetActorVar, LVar0, AVAR_DryBones_Collapsed, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, LVar0, SOUND_RECOVER_HEART) - EVT_CALL(PlaySoundAtActor, LVar0, SOUND_HEART_BOUNCE) - EVT_WAIT(30) - EVT_CALL(PlaySoundAtActor, LVar0, SOUND_STAR_BOUNCE_A) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(HealActor, LVar0, HEAL_AMT_ALL, TRUE) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(WaitForBuffDone) - EVT_WAIT(1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_HealAll) + Call(AddActorVar, ACTOR_SELF, AVAR_HealAllCount, 1) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) + EndIf + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 6) + Add(LVar1, 12) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 16) + Add(LVar1, 31) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 12) + Add(LVar1, 14) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 30) + Add(LVar1, 36) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + EndIf + Wait(30) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) + EndIf + Wait(5) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Set(LFlag0, FALSE) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetOriginalActorType, LVar0, LVar1) + IfEq(LVar1, ACTOR_TYPE_DRY_BONES) + Call(GetActorVar, LVar0, AVAR_DryBones_Collapsed, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + EndIf + EndIf + IfEq(LFlag0, FALSE) + Thread + Wait(5) + Call(PlaySoundAtActor, LVar0, SOUND_RECOVER_HEART) + Call(PlaySoundAtActor, LVar0, SOUND_HEART_BOUNCE) + Wait(30) + Call(PlaySoundAtActor, LVar0, SOUND_STAR_BOUNCE_A) + EndThread + Thread + Call(FreezeBattleState, TRUE) + Call(HealActor, LVar0, HEAL_AMT_ALL, TRUE) + Call(FreezeBattleState, FALSE) + EndThread + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Call(WaitForBuffDone) + Wait(1) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Wait(10) + Call(YieldTurn) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_MagicBlast) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_MagicBlast) - EVT_SET(LFlag0, FALSE) - EVT_SET(LFlag1, FALSE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_SET(LFlag0, TRUE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CloneActorID, LVarA) - EVT_END_IF - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_SET(LFlag1, TRUE) - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, LVarA, FALSE) - EVT_END_IF - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 1) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) - EVT_IF_EQ(LFlag1, FALSE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_Magikoopa_Anim02) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 17) - EVT_ADD(LVar1, 33) - EVT_PLAY_EFFECT(EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.5), 30, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 6) - EVT_ADD(LVar1, 13) - EVT_ELSE - EVT_SUB(LVar0, 17) - EVT_ADD(LVar1, 33) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.5), 30, 0) - EVT_ELSE - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_FlyingMagikoopa_Anim02) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 36) - EVT_PLAY_EFFECT(EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.5), 30, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 12) - EVT_ADD(LVar1, 14) - EVT_ELSE - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 36) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.5), 30, 0) - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar9, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar9) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(PlaySoundAtActor, LVarA, SOUND_SPELL_CAST2) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) - EVT_IF_EQ(LFlag1, FALSE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_Magikoopa_Anim03) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim03) - EVT_ELSE - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_FlyingMagikoopa_Anim03) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim03) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_SUB(LVar4, 50) - EVT_SET(LVar5, 0) - EVT_IF_EQ(LFlag1, FALSE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 30) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 8) - EVT_ADD(LVar1, 8) - EVT_ELSE - EVT_SUB(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_END_IF - EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 30) - EVT_ELSE - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 30) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 8) - EVT_ADD(LVar1, 8) - EVT_ELSE - EVT_SUB(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_END_IF - EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 30) - EVT_END_IF - EVT_WAIT(50) - EVT_IF_EQ(LVar9, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(YieldTurn) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, LVarA, TRUE) - EVT_END_IF - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(PlaySoundAtActor, LVarA, SOUND_SPELL_CAST2) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) - EVT_IF_EQ(LFlag1, FALSE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_Magikoopa_Anim03) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim03) - EVT_ELSE - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_FlyingMagikoopa_Anim03) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim03) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_IF_EQ(LFlag1, FALSE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 20) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 8) - EVT_ADD(LVar1, 8) - EVT_ELSE - EVT_SUB(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_END_IF - EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 20) - EVT_ELSE - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 20) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 8) - EVT_ADD(LVar1, 8) - EVT_ELSE - EVT_SUB(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_END_IF - EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 20) - EVT_END_IF - EVT_WAIT(18) - EVT_IF_EQ(LFlag0, TRUE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, 0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_ELSE - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_MAGIC_BLAST, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_IF - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_WAIT(20) - EVT_CALL(YieldTurn) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, LVarA, TRUE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_MagicBlast) + Set(LFlag0, FALSE) + Set(LFlag1, FALSE) + Call(GetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, LVar0) + IfEq(LVar0, 1) + Set(LFlag0, TRUE) + Call(GetActorVar, ACTOR_SELF, AVAR_CloneActorID, LVarA) + EndIf + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, ACTOR_FLAG_FLYING) + Set(LFlag1, TRUE) + EndIf + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, LVarA, FALSE) + EndIf + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 1) + Else + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) + IfEq(LFlag1, FALSE) + IfEq(LFlag0, TRUE) + Call(SetAnimation, LVarA, 1, ANIM_Magikoopa_Anim02) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Sub(LVar0, 17) + Add(LVar1, 33) + PlayEffect(EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, Float(0.5), 30, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + Sub(LVar0, 6) + Add(LVar1, 13) + Else + Sub(LVar0, 17) + Add(LVar1, 33) + EndIf + PlayEffect(EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, Float(0.5), 30, 0) + Else + IfEq(LFlag0, TRUE) + Call(SetAnimation, LVarA, 1, ANIM_FlyingMagikoopa_Anim02) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Add(LVar1, 36) + PlayEffect(EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, Float(0.5), 30, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + Sub(LVar0, 12) + Add(LVar1, 14) + Else + Sub(LVar0, 30) + Add(LVar1, 36) + EndIf + PlayEffect(EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, Float(0.5), 30, 0) + EndIf + Wait(30) + Call(EnemyTestTarget, ACTOR_SELF, LVar9, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar9) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + IfEq(LFlag0, TRUE) + Call(PlaySoundAtActor, LVarA, SOUND_SPELL_CAST2) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) + IfEq(LFlag1, FALSE) + IfEq(LFlag0, TRUE) + Call(SetAnimation, LVarA, 1, ANIM_Magikoopa_Anim03) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim03) + Else + IfEq(LFlag0, TRUE) + Call(SetAnimation, LVarA, 1, ANIM_FlyingMagikoopa_Anim03) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim03) + EndIf + Wait(5) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Sub(LVar4, 50) + Set(LVar5, 0) + IfEq(LFlag1, FALSE) + IfEq(LFlag0, TRUE) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Add(LVar1, 20) + Call(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 30) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + Sub(LVar0, 8) + Add(LVar1, 8) + Else + Sub(LVar0, 20) + Add(LVar1, 20) + EndIf + Call(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 30) + Else + IfEq(LFlag0, TRUE) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Add(LVar1, 20) + Call(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 30) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + Sub(LVar0, 8) + Add(LVar1, 8) + Else + Sub(LVar0, 20) + Add(LVar1, 20) + EndIf + Call(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 30) + EndIf + Wait(50) + IfEq(LVar9, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(15) + Call(YieldTurn) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, LVarA, TRUE) + EndIf + Return + EndCaseGroup + EndSwitch + IfEq(LFlag0, TRUE) + Call(PlaySoundAtActor, LVarA, SOUND_SPELL_CAST2) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) + IfEq(LFlag1, FALSE) + IfEq(LFlag0, TRUE) + Call(SetAnimation, LVarA, 1, ANIM_Magikoopa_Anim03) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim03) + Else + IfEq(LFlag0, TRUE) + Call(SetAnimation, LVarA, 1, ANIM_FlyingMagikoopa_Anim03) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim03) + EndIf + Wait(5) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + IfEq(LFlag1, FALSE) + IfEq(LFlag0, TRUE) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Add(LVar1, 20) + Call(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 20) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + Sub(LVar0, 8) + Add(LVar1, 8) + Else + Sub(LVar0, 20) + Add(LVar1, 20) + EndIf + Call(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 20) + Else + IfEq(LFlag0, TRUE) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Add(LVar1, 20) + Call(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 20) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + Sub(LVar0, 8) + Add(LVar1, 8) + Else + Sub(LVar0, 20) + Add(LVar1, 20) + EndIf + Call(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 20) + EndIf + Wait(18) + IfEq(LFlag0, TRUE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, 0, BS_FLAGS1_TRIGGER_EVENTS) + Else + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_MAGIC_BLAST, BS_FLAGS1_TRIGGER_EVENTS) + EndIf + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Wait(20) + Call(YieldTurn) + EndCaseGroup + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, LVarA, TRUE) + EndIf + Return + End }; EvtScript N(EVS_GetAvailableColumn) = { - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetIndexFromHome, LVar0, LVar1) - EVT_MOD(LVar1, 4) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_SET(LFlagB, TRUE) - EVT_CASE_EQ(1) - EVT_SET(LFlagC, TRUE) - EVT_CASE_EQ(2) - EVT_SET(LFlagD, TRUE) - EVT_CASE_EQ(3) - EVT_SET(LFlagE, TRUE) - EVT_END_SWITCH - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_SET(LVar0, -1) - EVT_CALL(GetIndexFromHome, ACTOR_SELF, LVar1) - EVT_MOD(LVar1, 4) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_IF_EQ(LFlagC, FALSE) - EVT_SET(LVar0, 1) - EVT_END_IF - EVT_CASE_EQ(1) - EVT_IF_EQ(LFlagB, FALSE) - EVT_SET(LVar0, 0) - EVT_END_IF - EVT_IF_EQ(LFlagD, FALSE) - EVT_SET(LVar0, 2) - EVT_END_IF - EVT_CASE_EQ(2) - EVT_IF_EQ(LFlagC, FALSE) - EVT_SET(LVar0, 1) - EVT_END_IF - EVT_IF_EQ(LFlagE, FALSE) - EVT_SET(LVar0, 3) - EVT_END_IF - EVT_CASE_EQ(3) - EVT_IF_EQ(LFlagD, FALSE) - EVT_SET(LVar0, 2) - EVT_END_IF - EVT_END_SWITCH - EVT_IF_NE(LVar0, -1) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, ACTOR_FLAG_FLYING) - EVT_ADD(LVar0, 4) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetIndexFromHome, LVar0, LVar1) + Mod(LVar1, 4) + Switch(LVar1) + CaseEq(0) + Set(LFlagB, TRUE) + CaseEq(1) + Set(LFlagC, TRUE) + CaseEq(2) + Set(LFlagD, TRUE) + CaseEq(3) + Set(LFlagE, TRUE) + EndSwitch + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Set(LVar0, -1) + Call(GetIndexFromHome, ACTOR_SELF, LVar1) + Mod(LVar1, 4) + Switch(LVar1) + CaseEq(0) + IfEq(LFlagC, FALSE) + Set(LVar0, 1) + EndIf + CaseEq(1) + IfEq(LFlagB, FALSE) + Set(LVar0, 0) + EndIf + IfEq(LFlagD, FALSE) + Set(LVar0, 2) + EndIf + CaseEq(2) + IfEq(LFlagC, FALSE) + Set(LVar0, 1) + EndIf + IfEq(LFlagE, FALSE) + Set(LVar0, 3) + EndIf + CaseEq(3) + IfEq(LFlagD, FALSE) + Set(LVar0, 2) + EndIf + EndSwitch + IfNe(LVar0, -1) + Call(GetActorFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, ACTOR_FLAG_FLYING) + Add(LVar0, 4) + EndIf + EndIf + Return + End }; EvtScript N(EVS_Clone_HandleEvent) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_Clone_Init) = { - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_Clone_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsClone, TRUE) - EVT_RETURN - EVT_END + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_Clone_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_IsClone, TRUE) + Return + End }; EvtScript N(EVS_FlyingClone_Init) = { - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_Clone_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsClone, TRUE) - EVT_RETURN - EVT_END + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_Clone_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_IsClone, TRUE) + Return + End }; s32 N(CloneDefense)[] = { @@ -1399,557 +1399,557 @@ Formation N(FlyingCloneFormation) = { }; EvtScript N(EVS_Move_MakeClone) = { - EVT_CALL(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_MakeClone) - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SummonEnemy, EVT_PTR(N(CloneFormation)), FALSE) - EVT_ELSE - EVT_CALL(SummonEnemy, EVT_PTR(N(FlyingCloneFormation)), FALSE) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CloneActorID, LVar0) - EVT_SET(LVarA, LVar0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(EnableIdleScript, LVarA, IDLE_SCRIPT_DISABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(UseIdleAnimation, LVarA, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 25) - EVT_WAIT(25) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST3) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_Magikoopa_Anim02) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 23) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_FlyingMagikoopa_Anim02) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 23) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 1, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 30, 0) - EVT_WAIT(10) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(EnableIdleScript, LVar9, IDLE_SCRIPT_ENABLE) - EVT_WAIT(30) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, -3) - EVT_CALL(SetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_SET(LVar9, LVarA) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST4) - EVT_CALL(PlaySoundAtActor, LVar9, SOUND_SPELL_CAST4) - EVT_CALL(SetPartFlagBits, LVar9, 1, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 500) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_EXEC_WAIT(N(EVS_GetAvailableColumn)) - EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVar0) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 0, EASING_LINEAR) - EVT_ELSE - EVT_CALL(SetActorSpeed, LVar9, EVT_FLOAT(2.0)) - EVT_EXEC_WAIT(N(EVS_GetAvailableColumn)) - EVT_CALL(SetGoalToIndex, LVar9, LVar0) - EVT_CALL(FlyToGoal, LVar9, 0, 0, EASING_LINEAR) - EVT_END_IF - EVT_CALL(SetPartFlagBits, LVar9, 1, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_CALL(SetEnemyHP, LVar9, LVar0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(GetActorPos, LVar9, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, LVar9, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, LVar9) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_GROUND, ACTOR_EVENT_FLAG_ATTACK_CHARGED, TRUE) - EVT_ELSE - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_FLYING, ACTOR_EVENT_FLAG_ATTACK_CHARGED, TRUE) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) - EVT_CALL(SetAnimation, LVar9, 1, ANIM_Magikoopa_Anim01) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) - EVT_CALL(SetAnimation, LVar9, 1, ANIM_FlyingMagikoopa_Anim01) - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_CALL(UseIdleAnimation, LVar9, TRUE) - EVT_RETURN - EVT_END + Call(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) + IfEq(LVar0, 1) + ExecWait(N(EVS_Flee)) + Return + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_MakeClone) + Set(LFlag0, FALSE) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, ACTOR_FLAG_FLYING) + Set(LFlag0, TRUE) + EndIf + IfEq(LFlag0, FALSE) + Call(SummonEnemy, Ref(N(CloneFormation)), FALSE) + Else + Call(SummonEnemy, Ref(N(FlyingCloneFormation)), FALSE) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_CloneActorID, LVar0) + Set(LVarA, LVar0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(EnableIdleScript, LVarA, IDLE_SCRIPT_DISABLE) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(UseIdleAnimation, LVarA, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 25) + Wait(25) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST3) + IfEq(LFlag0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) + Call(SetAnimation, LVarA, 1, ANIM_Magikoopa_Anim02) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 23) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) + Call(SetAnimation, LVarA, 1, ANIM_FlyingMagikoopa_Anim02) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 23) + EndIf + PlayEffect(EFFECT_ENERGY_IN_OUT, 1, LVar0, LVar1, LVar2, Float(1.0), 30, 0) + Wait(10) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(EnableIdleScript, LVar9, IDLE_SCRIPT_ENABLE) + Wait(30) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar2, -3) + Call(SetActorPos, LVarA, LVar0, LVar1, LVar2) + Set(LVar9, LVarA) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST4) + Call(PlaySoundAtActor, LVar9, SOUND_SPELL_CAST4) + Call(SetPartFlagBits, LVar9, 1, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 500) + Call(SetActorSpeed, ACTOR_SELF, Float(2.0)) + ExecWait(N(EVS_GetAvailableColumn)) + Call(SetGoalToIndex, ACTOR_SELF, LVar0) + Call(FlyToGoal, ACTOR_SELF, 0, 0, EASING_LINEAR) + Else + Call(SetActorSpeed, LVar9, Float(2.0)) + ExecWait(N(EVS_GetAvailableColumn)) + Call(SetGoalToIndex, LVar9, LVar0) + Call(FlyToGoal, LVar9, 0, 0, EASING_LINEAR) + EndIf + Call(SetPartFlagBits, LVar9, 1, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) + Call(GetActorHP, ACTOR_SELF, LVar0) + Call(SetEnemyHP, LVar9, LVar0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Call(GetActorPos, LVar9, LVar0, LVar1, LVar2) + Call(ForceHomePos, LVar9, LVar0, LVar1, LVar2) + Call(HPBarToHome, LVar9) + IfEq(LFlag0, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_GROUND, ACTOR_EVENT_FLAG_ATTACK_CHARGED, TRUE) + Else + Call(SetPartEventBits, ACTOR_SELF, PRT_FLYING, ACTOR_EVENT_FLAG_ATTACK_CHARGED, TRUE) + EndIf + IfEq(LFlag0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) + Call(SetAnimation, LVar9, 1, ANIM_Magikoopa_Anim01) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) + Call(SetAnimation, LVar9, 1, ANIM_FlyingMagikoopa_Anim01) + EndIf + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Call(UseIdleAnimation, LVar9, TRUE) + Return + End }; #include "common/battle/CheckMagikoopaCastTarget.inc.c" EvtScript N(EVS_Move_TryBoostAttack) = { - EVT_SET(LFlag0, FALSE) - EVT_LABEL(10) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetIndexFromHome, LVar0, LVar1) - EVT_CALL(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar2) - EVT_IF_GT(LVar1, LVar2) - EVT_CALL(N(CheckMagikoopaCastTarget), LVar0, LVar3) - EVT_IF_EQ(LVar3, 0) - EVT_CALL(GetActorAttackBoost, LVar0, LVar4) - EVT_IF_LT(LVar4, MAX_ATTACK_BOOST) - EVT_SET(LVar8, LVar0) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar1) - EVT_GOTO(100) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_SET(LFlag0, TRUE) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_Attack_MagicBlast)) - EVT_RETURN + Set(LFlag0, FALSE) + Label(10) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetIndexFromHome, LVar0, LVar1) + Call(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar2) + IfGt(LVar1, LVar2) + Call(N(CheckMagikoopaCastTarget), LVar0, LVar3) + IfEq(LVar3, 0) + Call(GetActorAttackBoost, LVar0, LVar4) + IfLt(LVar4, MAX_ATTACK_BOOST) + Set(LVar8, LVar0) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar1) + Goto(100) + EndIf + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + IfEq(LFlag0, FALSE) + Set(LFlag0, TRUE) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) + Goto(10) + EndIf + Call(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) + IfEq(LVar0, 1) + ExecWait(N(EVS_Flee)) + Return + EndIf + ExecWait(N(EVS_Attack_MagicBlast)) + Return // found target - EVT_LABEL(100) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_BoostAttack) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_AttackBoostCount, 1) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 6) - EVT_ADD(LVar1, 12) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 16) - EVT_ADD(LVar1, 31) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 12) - EVT_ADD(LVar1, 14) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 36) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) - EVT_END_IF - EVT_WAIT(5) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, LVar8, SOUND_MAGIKOOPA_POWER_UP) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(BoostAttack, LVar8, ATTACK_BOOST_AMT) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_CALL(WaitForBuffDone) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Label(100) + Call(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_BoostAttack) + Call(AddActorVar, ACTOR_SELF, AVAR_AttackBoostCount, 1) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) + EndIf + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 6) + Add(LVar1, 12) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 16) + Add(LVar1, 31) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 12) + Add(LVar1, 14) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 30) + Add(LVar1, 36) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + EndIf + Wait(30) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) + EndIf + Wait(5) + Thread + Wait(10) + Call(PlaySoundAtActor, LVar8, SOUND_MAGIKOOPA_POWER_UP) + EndThread + Thread + Call(FreezeBattleState, TRUE) + Call(BoostAttack, LVar8, ATTACK_BOOST_AMT) + Call(FreezeBattleState, FALSE) + EndThread + Call(WaitForBuffDone) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(10) + Call(YieldTurn) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Move_TryBoostDefense) = { - EVT_SET(LFlag0, FALSE) - EVT_LABEL(10) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetIndexFromHome, LVar0, LVar1) - EVT_CALL(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar2) - EVT_IF_GT(LVar1, LVar2) - EVT_CALL(N(CheckMagikoopaCastTarget), LVar0, LVar3) - EVT_IF_EQ(LVar3, 0) - EVT_CALL(GetActorDefenseBoost, LVar0, LVar4) - EVT_IF_LT(LVar4, MAX_DEFENSE_BOOST) - EVT_SET(LVar8, LVar0) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar1) - EVT_GOTO(100) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_SET(LFlag0, TRUE) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_Attack_MagicBlast)) - EVT_RETURN + Set(LFlag0, FALSE) + Label(10) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetIndexFromHome, LVar0, LVar1) + Call(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar2) + IfGt(LVar1, LVar2) + Call(N(CheckMagikoopaCastTarget), LVar0, LVar3) + IfEq(LVar3, 0) + Call(GetActorDefenseBoost, LVar0, LVar4) + IfLt(LVar4, MAX_DEFENSE_BOOST) + Set(LVar8, LVar0) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar1) + Goto(100) + EndIf + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + IfEq(LFlag0, FALSE) + Set(LFlag0, TRUE) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) + Goto(10) + EndIf + Call(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) + IfEq(LVar0, 1) + ExecWait(N(EVS_Flee)) + Return + EndIf + ExecWait(N(EVS_Attack_MagicBlast)) + Return // found target - EVT_LABEL(100) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_BoostDefense) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_DefenseBoostCount, 1) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 6) - EVT_ADD(LVar1, 12) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 16) - EVT_ADD(LVar1, 31) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 12) - EVT_ADD(LVar1, 14) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 36) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) - EVT_END_IF - EVT_WAIT(5) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, LVar8, SOUND_MAGIKOOPA_POWER_UP) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(BoostDefense, LVar8, DEFENSE_BOOST_AMT) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_CALL(WaitForBuffDone) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Label(100) + Call(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_BoostDefense) + Call(AddActorVar, ACTOR_SELF, AVAR_DefenseBoostCount, 1) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) + EndIf + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 6) + Add(LVar1, 12) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 16) + Add(LVar1, 31) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 12) + Add(LVar1, 14) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 30) + Add(LVar1, 36) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + EndIf + Wait(30) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) + EndIf + Wait(5) + Thread + Wait(10) + Call(PlaySoundAtActor, LVar8, SOUND_MAGIKOOPA_POWER_UP) + EndThread + Thread + Call(FreezeBattleState, TRUE) + Call(BoostDefense, LVar8, DEFENSE_BOOST_AMT) + Call(FreezeBattleState, FALSE) + EndThread + Call(WaitForBuffDone) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(10) + Call(YieldTurn) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Move_TryElectrify) = { - EVT_SET(LFlag0, FALSE) - EVT_LABEL(10) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetIndexFromHome, LVar0, LVar1) - EVT_CALL(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar2) - EVT_IF_GT(LVar1, LVar2) - EVT_CALL(N(CheckMagikoopaCastTarget), LVar0, LVar3) - EVT_IF_EQ(LVar3, 0) - EVT_CALL(GetStatusFlags, LVar0, LVar4) - EVT_IF_NOT_FLAG(LVar4, STATUS_FLAG_STATIC | STATUS_FLAG_TRANSPARENT) - EVT_SET(LVar8, LVar0) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar1) - EVT_GOTO(100) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_SET(LFlag0, TRUE) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_Attack_MagicBlast)) - EVT_RETURN + Set(LFlag0, FALSE) + Label(10) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetIndexFromHome, LVar0, LVar1) + Call(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar2) + IfGt(LVar1, LVar2) + Call(N(CheckMagikoopaCastTarget), LVar0, LVar3) + IfEq(LVar3, 0) + Call(GetStatusFlags, LVar0, LVar4) + IfNotFlag(LVar4, STATUS_FLAG_STATIC | STATUS_FLAG_TRANSPARENT) + Set(LVar8, LVar0) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar1) + Goto(100) + EndIf + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + IfEq(LFlag0, FALSE) + Set(LFlag0, TRUE) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) + Goto(10) + EndIf + Call(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) + IfEq(LVar0, 1) + ExecWait(N(EVS_Flee)) + Return + EndIf + ExecWait(N(EVS_Attack_MagicBlast)) + Return // found target - EVT_LABEL(100) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_Electrify) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_ElectrifyCount, 1) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_ELECTRIFY) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 6) - EVT_ADD(LVar1, 12) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 16) - EVT_ADD(LVar1, 31) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 12) - EVT_ADD(LVar1, 14) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 36) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) - EVT_END_IF - EVT_WAIT(5) - EVT_THREAD - EVT_WAIT(10) - EVT_LOOP(4) - EVT_CALL(PlaySoundAtActor, LVar8, SOUND_ELECTRIC_BUZZ) - EVT_CALL(RandInt, 3, LVar0) - EVT_ADD(LVar0, 3) - EVT_WAIT(LVar0) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(ElectrifyActor, LVar8, ELECTRIFY_TURNS) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_CALL(WaitForBuffDone) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Label(100) + Call(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_Electrify) + Call(AddActorVar, ACTOR_SELF, AVAR_ElectrifyCount, 1) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) + EndIf + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_ELECTRIFY) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 6) + Add(LVar1, 12) + Sub(LVar2, 2) + PlayEffect(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 16) + Add(LVar1, 31) + Sub(LVar2, 2) + PlayEffect(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 12) + Add(LVar1, 14) + Sub(LVar2, 2) + PlayEffect(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 30) + Add(LVar1, 36) + Sub(LVar2, 2) + PlayEffect(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + EndIf + Wait(30) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) + EndIf + Wait(5) + Thread + Wait(10) + Loop(4) + Call(PlaySoundAtActor, LVar8, SOUND_ELECTRIC_BUZZ) + Call(RandInt, 3, LVar0) + Add(LVar0, 3) + Wait(LVar0) + EndLoop + EndThread + Thread + Call(FreezeBattleState, TRUE) + Call(ElectrifyActor, LVar8, ELECTRIFY_TURNS) + Call(FreezeBattleState, FALSE) + EndThread + Call(WaitForBuffDone) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(10) + Call(YieldTurn) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Move_TryTransparent) = { - EVT_SET(LFlag0, FALSE) - EVT_LABEL(10) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetIndexFromHome, LVar0, LVar1) - EVT_CALL(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar2) - EVT_IF_GT(LVar1, LVar2) - EVT_CALL(N(CheckMagikoopaCastTarget), LVar0, LVar3) - EVT_IF_EQ(LVar3, 0) - EVT_CALL(GetStatusFlags, LVar0, LVar4) - EVT_IF_NOT_FLAG(LVar4, STATUS_FLAG_STATIC | STATUS_FLAG_TRANSPARENT) - EVT_SET(LVar8, LVar0) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar1) - EVT_GOTO(100) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_SET(LFlag0, TRUE) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_Attack_MagicBlast)) - EVT_RETURN + Set(LFlag0, FALSE) + Label(10) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetIndexFromHome, LVar0, LVar1) + Call(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar2) + IfGt(LVar1, LVar2) + Call(N(CheckMagikoopaCastTarget), LVar0, LVar3) + IfEq(LVar3, 0) + Call(GetStatusFlags, LVar0, LVar4) + IfNotFlag(LVar4, STATUS_FLAG_STATIC | STATUS_FLAG_TRANSPARENT) + Set(LVar8, LVar0) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar1) + Goto(100) + EndIf + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + IfEq(LFlag0, FALSE) + Set(LFlag0, TRUE) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) + Goto(10) + EndIf + Call(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) + IfEq(LVar0, 1) + ExecWait(N(EVS_Flee)) + Return + EndIf + ExecWait(N(EVS_Attack_MagicBlast)) + Return // found target - EVT_LABEL(100) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_Transparify) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_TransparifyCount, 1) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 6) - EVT_ADD(LVar1, 12) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 6, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 16) - EVT_ADD(LVar1, 31) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 6, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 12) - EVT_ADD(LVar1, 14) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 6, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 36) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 6, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) - EVT_END_IF - EVT_WAIT(5) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, LVar8, SOUND_MAGIKOOPA_VANISH) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(VanishActor, LVar8, TRANSPARIFY_TURNS) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_CALL(WaitForBuffDone) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Label(100) + Call(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_Transparify) + Call(AddActorVar, ACTOR_SELF, AVAR_TransparifyCount, 1) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) + EndIf + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 6) + Add(LVar1, 12) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 6, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 16) + Add(LVar1, 31) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 6, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 12) + Add(LVar1, 14) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 6, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 30) + Add(LVar1, 36) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 6, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + EndIf + Wait(30) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) + EndIf + Wait(5) + Thread + Wait(10) + Call(PlaySoundAtActor, LVar8, SOUND_MAGIKOOPA_VANISH) + EndThread + Thread + Call(FreezeBattleState, TRUE) + Call(VanishActor, LVar8, TRANSPARIFY_TURNS) + Call(FreezeBattleState, FALSE) + EndThread + Call(WaitForBuffDone) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(10) + Call(YieldTurn) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { @@ -1960,307 +1960,307 @@ EvtScript N(EVS_TakeTurn) = { #define LBL_LOOP_CHOOSE_BEST_HEAL 11 #define LBL_TRY_MOVES 20 #define LBL_CHOOSE_MOVE 123 - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_Attack_MagicBlast)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(LBL_TRY_MOVES) - EVT_END_IF + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + ExecWait(N(EVS_Attack_MagicBlast)) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, LVar0) + IfEq(LVar0, 1) + Goto(LBL_TRY_MOVES) + EndIf // first (dummy) heal check - EVT_SET(LVarA, 0) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(LBL_LOOP_COUNT_INJURED_1) - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetOriginalActorType, LVar0, LVar1) - EVT_IF_EQ(LVar1, ACTOR_TYPE_DRY_BONES) - EVT_CALL(GetActorVar, LVar0, AVAR_DryBones_Collapsed, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_CALL(GetActorHP, LVar0, LVar2) - EVT_CALL(GetEnemyMaxHP, LVar0, LVar3) - EVT_MULF(LVar2, EVT_FLOAT(100.0)) - EVT_DIVF(LVar2, LVar3) - EVT_IF_EQ(LFlag0, FALSE) // collapsed dry bones check - EVT_IF_LE(LVar2, HEAL_THRESHOLD_1) // HP% check - EVT_CALL(RandInt, 99, LVar4) - EVT_ADD(LVar4, 1) - EVT_IF_LT(LVar4, HEAL_CHANCE_1) // chance to ignore actor - EVT_ADD(LVarA, 1) - EVT_SET(LVarB, LVar0) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(LBL_LOOP_COUNT_INJURED_1) - EVT_END_IF - EVT_IF_GT(LVarA, 0) - EVT_GOTO(LBL_TRY_HEALING) - EVT_END_IF + Set(LVarA, 0) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(LBL_LOOP_COUNT_INJURED_1) + Set(LFlag0, FALSE) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetOriginalActorType, LVar0, LVar1) + IfEq(LVar1, ACTOR_TYPE_DRY_BONES) + Call(GetActorVar, LVar0, AVAR_DryBones_Collapsed, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + EndIf + EndIf + Call(GetActorHP, LVar0, LVar2) + Call(GetEnemyMaxHP, LVar0, LVar3) + MulF(LVar2, Float(100.0)) + DivF(LVar2, LVar3) + IfEq(LFlag0, FALSE) // collapsed dry bones check + IfLe(LVar2, HEAL_THRESHOLD_1) // HP% check + Call(RandInt, 99, LVar4) + Add(LVar4, 1) + IfLt(LVar4, HEAL_CHANCE_1) // chance to ignore actor + Add(LVarA, 1) + Set(LVarB, LVar0) + EndIf + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(LBL_LOOP_COUNT_INJURED_1) + EndIf + IfGt(LVarA, 0) + Goto(LBL_TRY_HEALING) + EndIf // second (dummy) heal check - EVT_SET(LVarA, 0) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(LBL_LOOP_COUNT_INJURED_2) - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetOriginalActorType, LVar0, LVar1) - EVT_IF_EQ(LVar1, ACTOR_TYPE_DRY_BONES) - EVT_CALL(GetActorVar, LVar0, AVAR_DryBones_Collapsed, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_CALL(GetActorHP, LVar0, LVar2) - EVT_CALL(GetEnemyMaxHP, LVar0, LVar3) - EVT_MULF(LVar2, EVT_FLOAT(100.0)) - EVT_DIVF(LVar2, LVar3) - EVT_IF_EQ(LFlag0, FALSE) // collapsed dry bones check - EVT_IF_LE(LVar2, HEAL_THRESHOLD_2) // HP% check - EVT_CALL(RandInt, 99, LVar4) - EVT_ADD(LVar4, 1) - EVT_IF_LT(LVar4, HEAL_CHANCE_2) // chance to ignore actor - EVT_ADD(LVarA, 1) - EVT_SET(LVarB, LVar0) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(LBL_LOOP_COUNT_INJURED_2) - EVT_END_IF - EVT_IF_GT(LVarA, 0) - EVT_GOTO(LBL_TRY_HEALING) - EVT_END_IF + Set(LVarA, 0) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(LBL_LOOP_COUNT_INJURED_2) + Set(LFlag0, FALSE) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetOriginalActorType, LVar0, LVar1) + IfEq(LVar1, ACTOR_TYPE_DRY_BONES) + Call(GetActorVar, LVar0, AVAR_DryBones_Collapsed, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + EndIf + EndIf + Call(GetActorHP, LVar0, LVar2) + Call(GetEnemyMaxHP, LVar0, LVar3) + MulF(LVar2, Float(100.0)) + DivF(LVar2, LVar3) + IfEq(LFlag0, FALSE) // collapsed dry bones check + IfLe(LVar2, HEAL_THRESHOLD_2) // HP% check + Call(RandInt, 99, LVar4) + Add(LVar4, 1) + IfLt(LVar4, HEAL_CHANCE_2) // chance to ignore actor + Add(LVarA, 1) + Set(LVarB, LVar0) + EndIf + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(LBL_LOOP_COUNT_INJURED_2) + EndIf + IfGt(LVarA, 0) + Goto(LBL_TRY_HEALING) + EndIf // third (dummy) heal check - EVT_SET(LVarA, 0) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(LBL_LOOP_COUNT_INJURED_3) - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetOriginalActorType, LVar0, LVar1) - EVT_IF_EQ(LVar1, ACTOR_TYPE_DRY_BONES) - EVT_CALL(GetActorVar, LVar0, AVAR_DryBones_Collapsed, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_CALL(GetActorHP, LVar0, LVar2) - EVT_CALL(GetEnemyMaxHP, LVar0, LVar3) - EVT_MULF(LVar2, EVT_FLOAT(100.0)) - EVT_DIVF(LVar2, LVar3) - EVT_IF_EQ(LFlag0, FALSE) // collapsed dry bones check - EVT_IF_LE(LVar2, HEAL_THRESHOLD_3) // HP% check - EVT_CALL(RandInt, 99, LVar4) - EVT_ADD(LVar4, 1) - EVT_IF_LT(LVar4, HEAL_CHANCE_3) // chance to ignore actor - EVT_ADD(LVarA, 1) - EVT_SET(LVarB, LVar0) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(LBL_LOOP_COUNT_INJURED_3) - EVT_END_IF - EVT_IF_GT(LVarA, 0) - EVT_GOTO(LBL_TRY_HEALING) - EVT_END_IF - EVT_GOTO(LBL_TRY_MOVES) + Set(LVarA, 0) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(LBL_LOOP_COUNT_INJURED_3) + Set(LFlag0, FALSE) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetOriginalActorType, LVar0, LVar1) + IfEq(LVar1, ACTOR_TYPE_DRY_BONES) + Call(GetActorVar, LVar0, AVAR_DryBones_Collapsed, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + EndIf + EndIf + Call(GetActorHP, LVar0, LVar2) + Call(GetEnemyMaxHP, LVar0, LVar3) + MulF(LVar2, Float(100.0)) + DivF(LVar2, LVar3) + IfEq(LFlag0, FALSE) // collapsed dry bones check + IfLe(LVar2, HEAL_THRESHOLD_3) // HP% check + Call(RandInt, 99, LVar4) + Add(LVar4, 1) + IfLt(LVar4, HEAL_CHANCE_3) // chance to ignore actor + Add(LVarA, 1) + Set(LVarB, LVar0) + EndIf + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(LBL_LOOP_COUNT_INJURED_3) + EndIf + IfGt(LVarA, 0) + Goto(LBL_TRY_HEALING) + EndIf + Goto(LBL_TRY_MOVES) // try healing spells - EVT_LABEL(LBL_TRY_HEALING) - EVT_CALL(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_END_IF + Label(LBL_TRY_HEALING) + Call(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) + IfEq(LVar0, 1) + ExecWait(N(EVS_Flee)) + Return + EndIf // single healing target available - EVT_IF_EQ(LVarA, 1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HealOneCount, LVar0) - EVT_IF_LT(LVar0, MAX_HEAL_ONE) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, HEAL_ONE_CHANCE) - EVT_EXEC_WAIT(N(EVS_Move_HealOne)) - EVT_RETURN - EVT_END_IF - EVT_ELSE - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HealAllCount, LVar0) - EVT_IF_LT(LVar0, MAX_HEAL_ALL) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, HEAL_ALL_CHANCE) - EVT_EXEC_WAIT(N(EVS_Move_HealAll)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_ELSE + IfEq(LVarA, 1) + Call(GetActorVar, ACTOR_SELF, AVAR_HealOneCount, LVar0) + IfLt(LVar0, MAX_HEAL_ONE) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, HEAL_ONE_CHANCE) + ExecWait(N(EVS_Move_HealOne)) + Return + EndIf + Else + Call(GetActorVar, ACTOR_SELF, AVAR_HealAllCount, LVar0) + IfLt(LVar0, MAX_HEAL_ALL) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, HEAL_ALL_CHANCE) + ExecWait(N(EVS_Move_HealAll)) + Return + EndIf + EndIf + EndIf + Else // multiple injured actors were found - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HealAllCount, LVar0) - EVT_IF_LT(LVar0, MAX_HEAL_ALL) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, HEAL_ALL_CHANCE) - EVT_EXEC_WAIT(N(EVS_Move_HealAll)) - EVT_RETURN - EVT_END_IF - EVT_ELSE + Call(GetActorVar, ACTOR_SELF, AVAR_HealAllCount, LVar0) + IfLt(LVar0, MAX_HEAL_ALL) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, HEAL_ALL_CHANCE) + ExecWait(N(EVS_Move_HealAll)) + Return + EndIf + Else // choose actor with least HP% - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HealOneCount, LVar0) - EVT_IF_LT(LVar0, MAX_HEAL_ONE) - EVT_SETF(LVar9, EVT_FLOAT(100.0)) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(LBL_LOOP_CHOOSE_BEST_HEAL) - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetOriginalActorType, LVar0, LVar1) - EVT_IF_EQ(LVar1, ACTOR_TYPE_DRY_BONES) - EVT_CALL(GetActorVar, LVar0, AVAR_DryBones_Collapsed, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_CALL(GetActorHP, LVar0, LVar2) - EVT_CALL(GetEnemyMaxHP, LVar0, LVar3) - EVT_MULF(LVar2, EVT_FLOAT(100.0)) - EVT_DIVF(LVar2, LVar3) - EVT_IF_EQ(LFlag0, FALSE) - EVT_IF_LE(LVar2, LVar9) - EVT_SETF(LVar9, LVar2) - EVT_SET(LVarB, LVar0) - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(LBL_LOOP_CHOOSE_BEST_HEAL) - EVT_END_IF - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, HEAL_ONE_CHANCE) - EVT_EXEC_WAIT(N(EVS_Move_HealOne)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF + Call(GetActorVar, ACTOR_SELF, AVAR_HealOneCount, LVar0) + IfLt(LVar0, MAX_HEAL_ONE) + SetF(LVar9, Float(100.0)) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(LBL_LOOP_CHOOSE_BEST_HEAL) + Set(LFlag0, FALSE) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetOriginalActorType, LVar0, LVar1) + IfEq(LVar1, ACTOR_TYPE_DRY_BONES) + Call(GetActorVar, LVar0, AVAR_DryBones_Collapsed, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + EndIf + EndIf + Call(GetActorHP, LVar0, LVar2) + Call(GetEnemyMaxHP, LVar0, LVar3) + MulF(LVar2, Float(100.0)) + DivF(LVar2, LVar3) + IfEq(LFlag0, FALSE) + IfLe(LVar2, LVar9) + SetF(LVar9, LVar2) + Set(LVarB, LVar0) + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(LBL_LOOP_CHOOSE_BEST_HEAL) + EndIf + Call(RandInt, 1000, LVar0) + IfLt(LVar0, HEAL_ONE_CHANCE) + ExecWait(N(EVS_Move_HealOne)) + Return + EndIf + EndIf + EndIf + EndIf // check various buffs and attacks - EVT_LABEL(LBL_TRY_MOVES) - EVT_SET(LVarA, 100) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 0) - EVT_SET(LVarD, 0) - EVT_SET(LVarE, 0) - EVT_SET(LVarF, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_SET(LVarA, 100) // only magic blast - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 0) - EVT_SET(LVarD, 0) - EVT_SET(LVarE, 0) - EVT_SET(LVarF, 0) - EVT_GOTO(LBL_CHOOSE_MOVE) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_GetAvailableColumn)) - EVT_IF_EQ(LVar0, -1) - EVT_SET(LVarB, 0) - EVT_END_IF - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_SET(LVarB, 0) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_LastMove, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_LastMove_BoostAttack) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_AttackBoostCount, LVar1) - EVT_IF_LT(LVar1, MAX_ATTACK_BOOST) - EVT_CALL(RandInt, 99, LVar0) - EVT_ADD(LVar0, 1) - EVT_IF_LE(LVar0, 0) - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 100) // only boost attack - EVT_SET(LVarD, 0) - EVT_SET(LVarE, 0) - EVT_SET(LVarF, 0) - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(AVAL_LastMove_BoostDefense) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_DefenseBoostCount, LVar1) - EVT_IF_LT(LVar1, MAX_DEFENSE_BOOST) - EVT_CALL(RandInt, 99, LVar0) - EVT_ADD(LVar0, 1) - EVT_IF_LE(LVar0, 0) - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 0) - EVT_SET(LVarD, 100) // only boost defense - EVT_SET(LVarE, 0) - EVT_SET(LVarF, 0) - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH + Label(LBL_TRY_MOVES) + Set(LVarA, 100) + Set(LVarB, 0) + Set(LVarC, 0) + Set(LVarD, 0) + Set(LVarE, 0) + Set(LVarF, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, LVar0) + IfEq(LVar0, 1) + Set(LVarA, 100) // only magic blast + Set(LVarB, 0) + Set(LVarC, 0) + Set(LVarD, 0) + Set(LVarE, 0) + Set(LVarF, 0) + Goto(LBL_CHOOSE_MOVE) + Else + ExecWait(N(EVS_GetAvailableColumn)) + IfEq(LVar0, -1) + Set(LVarB, 0) + EndIf + EndIf + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNe(LVar0, 0) + Set(LVarB, 0) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_LastMove, LVar0) + Switch(LVar0) + CaseEq(AVAL_LastMove_BoostAttack) + Call(GetActorVar, ACTOR_SELF, AVAR_AttackBoostCount, LVar1) + IfLt(LVar1, MAX_ATTACK_BOOST) + Call(RandInt, 99, LVar0) + Add(LVar0, 1) + IfLe(LVar0, 0) + Set(LVarA, 0) + Set(LVarB, 0) + Set(LVarC, 100) // only boost attack + Set(LVarD, 0) + Set(LVarE, 0) + Set(LVarF, 0) + EndIf + EndIf + CaseEq(AVAL_LastMove_BoostDefense) + Call(GetActorVar, ACTOR_SELF, AVAR_DefenseBoostCount, LVar1) + IfLt(LVar1, MAX_DEFENSE_BOOST) + Call(RandInt, 99, LVar0) + Add(LVar0, 1) + IfLe(LVar0, 0) + Set(LVarA, 0) + Set(LVarB, 0) + Set(LVarC, 0) + Set(LVarD, 100) // only boost defense + Set(LVarE, 0) + Set(LVarF, 0) + EndIf + EndIf + EndSwitch // set weights to zero for anything we cant cast anymore - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_AttackBoostCount, LVar0) - EVT_IF_GE(LVar0, MAX_ATTACK_BOOST) - EVT_SET(LVarC, 0) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_DefenseBoostCount, LVar0) - EVT_IF_GE(LVar0, MAX_DEFENSE_BOOST) - EVT_SET(LVarD, 0) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ElectrifyCount, LVar0) - EVT_IF_GE(LVar0, MAX_ELECTRIFY) - EVT_SET(LVarE, 0) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TransparifyCount, LVar0) - EVT_IF_GE(LVar0, MAX_TRANSPARIFY) - EVT_SET(LVarF, 0) - EVT_END_IF + Call(GetActorVar, ACTOR_SELF, AVAR_AttackBoostCount, LVar0) + IfGe(LVar0, MAX_ATTACK_BOOST) + Set(LVarC, 0) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_DefenseBoostCount, LVar0) + IfGe(LVar0, MAX_DEFENSE_BOOST) + Set(LVarD, 0) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_ElectrifyCount, LVar0) + IfGe(LVar0, MAX_ELECTRIFY) + Set(LVarE, 0) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_TransparifyCount, LVar0) + IfGe(LVar0, MAX_TRANSPARIFY) + Set(LVarF, 0) + EndIf // make a weighted choice - EVT_LABEL(LBL_CHOOSE_MOVE) - EVT_SET(LVar9, 0) - EVT_ADD(LVar9, LVarA) - EVT_ADD(LVar9, LVarB) - EVT_ADD(LVar9, LVarC) - EVT_ADD(LVar9, LVarD) - EVT_ADD(LVar9, LVarE) - EVT_ADD(LVar9, LVarF) - EVT_SUB(LVar9, 1) - EVT_CALL(RandInt, LVar9, LVar0) - EVT_ADD(LVar0, 1) - EVT_IF_LE(LVar0, LVarA) - EVT_EXEC_WAIT(N(EVS_Attack_MagicBlast)) - EVT_RETURN - EVT_END_IF - EVT_ADD(LVarA, LVarB) - EVT_IF_LE(LVar0, LVarA) - EVT_EXEC_WAIT(N(EVS_Move_MakeClone)) - EVT_RETURN - EVT_END_IF - EVT_ADD(LVarA, LVarC) - EVT_IF_LE(LVar0, LVarA) - EVT_EXEC_WAIT(N(EVS_Move_TryBoostAttack)) - EVT_RETURN - EVT_END_IF - EVT_ADD(LVarA, LVarD) - EVT_IF_LE(LVar0, LVarA) - EVT_EXEC_WAIT(N(EVS_Move_TryBoostDefense)) - EVT_RETURN - EVT_END_IF - EVT_ADD(LVarA, LVarE) - EVT_IF_LE(LVar0, LVarA) - EVT_EXEC_WAIT(N(EVS_Move_TryElectrify)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_Move_TryTransparent)) - EVT_RETURN - EVT_END + Label(LBL_CHOOSE_MOVE) + Set(LVar9, 0) + Add(LVar9, LVarA) + Add(LVar9, LVarB) + Add(LVar9, LVarC) + Add(LVar9, LVarD) + Add(LVar9, LVarE) + Add(LVar9, LVarF) + Sub(LVar9, 1) + Call(RandInt, LVar9, LVar0) + Add(LVar0, 1) + IfLe(LVar0, LVarA) + ExecWait(N(EVS_Attack_MagicBlast)) + Return + EndIf + Add(LVarA, LVarB) + IfLe(LVar0, LVarA) + ExecWait(N(EVS_Move_MakeClone)) + Return + EndIf + Add(LVarA, LVarC) + IfLe(LVar0, LVarA) + ExecWait(N(EVS_Move_TryBoostAttack)) + Return + EndIf + Add(LVarA, LVarD) + IfLe(LVar0, LVarA) + ExecWait(N(EVS_Move_TryBoostDefense)) + Return + EndIf + Add(LVarA, LVarE) + IfLe(LVar0, LVarA) + ExecWait(N(EVS_Move_TryElectrify)) + Return + EndIf + ExecWait(N(EVS_Move_TryTransparent)) + Return + End }; diff --git a/src/battle/area/isk_part_2/actor/chain_chomp.c b/src/battle/area/isk_part_2/actor/chain_chomp.c index 45d88ec58ef..1cf2271d294 100644 --- a/src/battle/area/isk_part_2/actor/chain_chomp.c +++ b/src/battle/area/isk_part_2/actor/chain_chomp.c @@ -283,589 +283,589 @@ API_CALLABLE(func_8021866C_4EFB0C) { } EvtScript N(EVS_Init) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_EnableChainSounds, FALSE) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_TARGET, LVar0, LVar1, LVar2) - EVT_SET(LVar0, PRT_CHAIN_1) - EVT_LOOP(1 + (PRT_CHAIN_8 - PRT_CHAIN_1)) - EVT_CALL(SetPartSize, ACTOR_SELF, LVar0, 16, 16) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_CALL(N(ChompChainInit)) - EVT_EXEC(N(EVS_UpdateChain)) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_EnableChainSounds, FALSE) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_TARGET, LVar0, LVar1, LVar2) + Set(LVar0, PRT_CHAIN_1) + Loop(1 + (PRT_CHAIN_8 - PRT_CHAIN_1)) + Call(SetPartSize, ACTOR_SELF, LVar0, 16, 16) + Add(LVar0, 1) + EndLoop + Call(N(ChompChainInit)) + Exec(N(EVS_UpdateChain)) + Return + End }; EvtScript N(EVS_UpdateTargetPartPos) = { - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_TARGET, LVar0, LVar1, LVar2) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_TARGET, 0, 24) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_TARGET, 0, 0) - EVT_ELSE - EVT_CALL(SetIdleGoalToHome, ACTOR_SELF) - EVT_CALL(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_TARGET, LVar0, LVar1, LVar2) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_TARGET, -13, 40) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_TARGET, 0, -14) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_TARGET, LVar0, LVar1, LVar2) + Call(SetTargetOffset, ACTOR_SELF, PRT_TARGET, 0, 24) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_TARGET, 0, 0) + Else + Call(SetIdleGoalToHome, ACTOR_SELF) + Call(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_TARGET, LVar0, LVar1, LVar2) + Call(SetTargetOffset, ACTOR_SELF, PRT_TARGET, -13, 40) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_TARGET, 0, -14) + EndIf + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_LOOP(0) - EVT_EXEC_WAIT(N(EVS_UpdateTargetPartPos)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(SlowBiteAnims))) - EVT_CALL(SetActorIdleJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleGoalToHome, ACTOR_SELF) - EVT_CALL(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_CALL(SetActorIdleJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleJumpToGoal, ACTOR_SELF, 11, 1) - EVT_LOOP(0) - EVT_EXEC_WAIT(N(EVS_UpdateTargetPartPos)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorIdleJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleGoalToHome, ACTOR_SELF) - EVT_CALL(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleJumpToGoal, ACTOR_SELF, 6, 1) - EVT_CALL(RandInt, 10, LVar0) - EVT_ADD(LVar0, 1) - EVT_WAIT(LVar0) - EVT_LOOP(0) - EVT_EXEC_WAIT(N(EVS_UpdateTargetPartPos)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(BiteAnims))) - EVT_CALL(SetActorIdleJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetIdleGoalToHome, ACTOR_SELF) - EVT_CALL(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleJumpToGoal, ACTOR_SELF, 15, 1) - EVT_LOOP(0) - EVT_EXEC_WAIT(N(EVS_UpdateTargetPartPos)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(SlowBiteAnims))) - EVT_CALL(SetActorIdleJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetIdleGoalToHome, ACTOR_SELF) - EVT_CALL(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleJumpToGoal, ACTOR_SELF, 12, 1) - EVT_LOOP(0) - EVT_EXEC_WAIT(N(EVS_UpdateTargetPartPos)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorIdleJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetIdleGoalToHome, ACTOR_SELF) - EVT_CALL(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleJumpToGoal, ACTOR_SELF, 9, 1) - EVT_LOOP(0) - EVT_EXEC_WAIT(N(EVS_UpdateTargetPartPos)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(QuickBiteAnims))) - EVT_CALL(SetActorIdleJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetIdleGoalToHome, ACTOR_SELF) - EVT_CALL(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleJumpToGoal, ACTOR_SELF, 6, 1) - EVT_CALL(RandInt, 10, LVar0) - EVT_ADD(LVar0, 10) - EVT_WAIT(LVar0) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Loop(0) + ExecWait(N(EVS_UpdateTargetPartPos)) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(SlowBiteAnims))) + Call(SetActorIdleJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetIdleGoalToHome, ACTOR_SELF) + Call(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 10) + Call(SetActorIdleJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleJumpToGoal, ACTOR_SELF, 11, 1) + Loop(0) + ExecWait(N(EVS_UpdateTargetPartPos)) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetActorIdleJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetIdleGoalToHome, ACTOR_SELF) + Call(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleJumpToGoal, ACTOR_SELF, 6, 1) + Call(RandInt, 10, LVar0) + Add(LVar0, 1) + Wait(LVar0) + Loop(0) + ExecWait(N(EVS_UpdateTargetPartPos)) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(BiteAnims))) + Call(SetActorIdleJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetIdleGoalToHome, ACTOR_SELF) + Call(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleJumpToGoal, ACTOR_SELF, 15, 1) + Loop(0) + ExecWait(N(EVS_UpdateTargetPartPos)) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(SlowBiteAnims))) + Call(SetActorIdleJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetIdleGoalToHome, ACTOR_SELF) + Call(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleJumpToGoal, ACTOR_SELF, 12, 1) + Loop(0) + ExecWait(N(EVS_UpdateTargetPartPos)) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetActorIdleJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetIdleGoalToHome, ACTOR_SELF) + Call(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleJumpToGoal, ACTOR_SELF, 9, 1) + Loop(0) + ExecWait(N(EVS_UpdateTargetPartPos)) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(QuickBiteAnims))) + Call(SetActorIdleJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetIdleGoalToHome, ACTOR_SELF) + Call(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleJumpToGoal, ACTOR_SELF, 6, 1) + Call(RandInt, 10, LVar0) + Add(LVar0, 10) + Wait(LVar0) + Goto(0) + Return + End }; EvtScript N(EVS_UpdateChain) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(ActorExists, ACTOR_CHOMP, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(N(ChompChainUpdate), LVar2) - EVT_GOTO(0) - EVT_END_IF - EVT_LABEL(1) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Call(ActorExists, ACTOR_CHOMP, LVar0) + IfEq(LVar0, TRUE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(N(ChompChainUpdate), LVar2) + Goto(0) + EndIf + Label(1) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SET(LVarF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ChainChomp_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ChainChomp_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ChainChomp_Hurt) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ChainChomp_Hurt) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_WAIT(10) - EVT_CALL(SetActorVar, ACTOR_TUTANKOOPA, AVAR_Tutankoopa_NextSummonTime, 2) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ChainChomp_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ChainChomp_Hurt) - EVT_EXEC_WAIT(N(EVS_Chomp_SpinSmashHit)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ChainChomp_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ChainChomp_Hurt) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4)) - EVT_CALL(AddGoalPos, ACTOR_SELF, 30, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) - EVT_CALL(AddGoalPos, ACTOR_SELF, 15, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) - EVT_CALL(AddGoalPos, ACTOR_SELF, 5, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ChainChomp_SlowBite) - EVT_EXEC_WAIT(N(EVS_Chomp_HopHome)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_THREAD - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_TARGET, LVar0, LVar1, LVar2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_EnableChainSounds, FALSE) - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_SUB(LVar1, 10) - EVT_ADD(LVar2, 4) - EVT_ELSE - EVT_SUB(LVar1, 5) - EVT_ADD(LVar2, 11) - EVT_END_IF - EVT_CALL(SetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ChainChomp_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ChainChomp_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ChainChomp_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ChainChomp_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ChainChomp_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_EnableChainSounds, FALSE) - EVT_WAIT(10) - EVT_CALL(SetActorVar, ACTOR_TUTANKOOPA, AVAR_Tutankoopa_NextSummonTime, 2) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ChainChomp_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ChainChomp_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_CALL(SetActorVar, ACTOR_TUTANKOOPA, AVAR_Tutankoopa_NextSummonTime, 2) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ChainChomp_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ChainChomp_Hurt) - EVT_EXEC_WAIT(N(EVS_Chomp_SpinSmashHit)) - EVT_CALL(SetActorVar, ACTOR_TUTANKOOPA, AVAR_Tutankoopa_NextSummonTime, 2) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ChainChomp_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ChainChomp_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_IF_NE(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(FallToGoal, ACTOR_SELF, 11) - EVT_END_IF - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Set(LVarF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ChainChomp_Hurt) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ChainChomp_Hurt) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ChainChomp_Hurt) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ChainChomp_Hurt) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + Wait(10) + Call(SetActorVar, ACTOR_TUTANKOOPA, AVAR_Tutankoopa_NextSummonTime, 2) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ChainChomp_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ChainChomp_Hurt) + ExecWait(N(EVS_Chomp_SpinSmashHit)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ChainChomp_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ChainChomp_Hurt) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.4)) + Call(AddGoalPos, ACTOR_SELF, 30, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) + Call(AddGoalPos, ACTOR_SELF, 15, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) + Call(AddGoalPos, ACTOR_SELF, 5, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ChainChomp_SlowBite) + ExecWait(N(EVS_Chomp_HopHome)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndThread + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_TARGET, LVar0, LVar1, LVar2) + Call(SetActorVar, ACTOR_SELF, AVAR_EnableChainSounds, FALSE) + CaseEq(EVENT_BEGIN_AIR_LIFT) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar1, LVar2, LVar3) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Sub(LVar1, 10) + Add(LVar2, 4) + Else + Sub(LVar1, 5) + Add(LVar2, 11) + EndIf + Call(SetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ChainChomp_Hurt) + ExecWait(EVS_Enemy_AirLift) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ChainChomp_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ChainChomp_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ChainChomp_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ChainChomp_Hurt) + ExecWait(EVS_Enemy_ShockHit) + Call(SetActorVar, ACTOR_SELF, AVAR_EnableChainSounds, FALSE) + Wait(10) + Call(SetActorVar, ACTOR_TUTANKOOPA, AVAR_Tutankoopa_NextSummonTime, 2) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ChainChomp_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ChainChomp_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + Call(SetActorVar, ACTOR_TUTANKOOPA, AVAR_Tutankoopa_NextSummonTime, 2) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ChainChomp_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ChainChomp_Hurt) + ExecWait(N(EVS_Chomp_SpinSmashHit)) + Call(SetActorVar, ACTOR_TUTANKOOPA, AVAR_Tutankoopa_NextSummonTime, 2) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ChainChomp_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ChainChomp_Idle) + ExecWait(EVS_Enemy_Recover) + CaseDefault + EndSwitch + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + IfNe(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(FallToGoal, ACTOR_SELF, 11) + EndIf + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Chomp_SpinSmashHit) = { - EVT_CALL(ActorExists, ACTOR_TUTANKOOPA, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_TUTANKOOPA, AVAR_Tutankoopa_Stunned, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(1) - EVT_END_IF - EVT_LABEL(0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ChainChomp_Hurt) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_TUTANKOOPA) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 20, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.1)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.1)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, 150, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_END_THREAD - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, 130, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(15) - EVT_GOTO(10) - EVT_LABEL(1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ChainChomp_Hurt) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.1)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, 135, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_END_THREAD - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, 105, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(15) - EVT_LABEL(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ChainChomp_Idle) - EVT_EXEC_WAIT(N(EVS_Chomp_HopHome)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Idle) - EVT_RETURN - EVT_END + Call(ActorExists, ACTOR_TUTANKOOPA, LVar0) + IfEq(LVar0, FALSE) + Goto(1) + EndIf + Call(GetActorVar, ACTOR_TUTANKOOPA, AVAR_Tutankoopa_Stunned, LVar0) + IfEq(LVar0, 0) + Goto(1) + EndIf + Label(0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ChainChomp_Hurt) + Call(SetTargetActor, ACTOR_SELF, ACTOR_TUTANKOOPA) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, 20, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.1)) + Call(SetActorSpeed, ACTOR_SELF, Float(7.0)) + Call(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + EndThread + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.1)) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, 150, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) + Thread + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndIf + EndThread + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetGoalPos, ACTOR_SELF, 130, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Thread + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndIf + EndThread + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(15) + Goto(10) + Label(1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ChainChomp_Hurt) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.1)) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, 135, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) + Thread + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndIf + EndThread + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetGoalPos, ACTOR_SELF, 105, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Thread + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndIf + EndThread + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(15) + Label(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ChainChomp_Idle) + ExecWait(N(EVS_Chomp_HopHome)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Idle) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_EnableChainSounds, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_ADD(LVar0, 45) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) - EVT_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ChainChomp_SlowBite) - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HURT) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(PlaySound, SOUND_ACTOR_HURT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ChainChomp_Idle) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) - EVT_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 25) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) - EVT_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_END_THREAD - EVT_SUB(LVar0, 15) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) - EVT_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ChainChomp_Bite) - EVT_WAIT(20) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ChainChomp_Idle) - EVT_EXEC_WAIT(N(EVS_Chomp_HopHome)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ChainChomp_Idle) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_EnableChainSounds, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ChainChomp_Idle) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, 4) - EVT_ELSE - EVT_ADD(LVar0, 10) - EVT_END_IF - EVT_SET(LVar1, 27) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.2)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_WAIT(2) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_TARGET, LVar0, LVar1, LVar2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, DMG_CHOMP_BITE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVarF) - EVT_CASE_DEFAULT - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ChainChomp_Bite) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) - EVT_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_END_THREAD - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) - EVT_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_END_THREAD - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) - EVT_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_END_THREAD - EVT_SUB(LVar0, 10) - EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) - EVT_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ChainChomp_Idle) - EVT_WAIT(8) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_IF_EQ(LVarF, HIT_RESULT_10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_TARGET, LVar0, LVar1, LVar2) - EVT_RETURN - EVT_END_IF - EVT_CALL(YieldTurn) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ChainChomp_Idle) - EVT_EXEC_WAIT(N(EVS_Chomp_HopHome)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ChainChomp_Idle) - EVT_END_SWITCH - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_EnableChainSounds, FALSE) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_EnableChainSounds, TRUE) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Add(LVar0, 45) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) + Thread + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndIf + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ChainChomp_SlowBite) + Wait(15) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HURT) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(PlaySound, SOUND_ACTOR_HURT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ChainChomp_Idle) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) + Thread + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndIf + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 25) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) + Thread + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndIf + EndThread + Sub(LVar0, 15) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) + Thread + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndIf + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ChainChomp_Bite) + Wait(20) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ChainChomp_Idle) + ExecWait(N(EVS_Chomp_HopHome)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ChainChomp_Idle) + Call(HPBarToHome, ACTOR_SELF) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_EnableChainSounds, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Return + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ChainChomp_Idle) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Add(LVar0, 4) + Else + Add(LVar0, 10) + EndIf + Set(LVar1, 27) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.2)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Wait(2) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_TARGET, LVar0, LVar1, LVar2) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, DMG_CHOMP_BITE, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVarF) + CaseDefault + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ChainChomp_Bite) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) + Thread + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndIf + EndThread + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) + Thread + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndIf + EndThread + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) + Thread + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndIf + EndThread + Sub(LVar0, 10) + Call(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) + Thread + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndIf + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ChainChomp_Idle) + Wait(8) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + IfEq(LVarF, HIT_RESULT_10) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_TARGET, LVar0, LVar1, LVar2) + Return + EndIf + Call(YieldTurn) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ChainChomp_Idle) + ExecWait(N(EVS_Chomp_HopHome)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ChainChomp_Idle) + EndSwitch + Call(SetActorVar, ACTOR_SELF, AVAR_EnableChainSounds, FALSE) + Call(HPBarToHome, ACTOR_SELF) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; // Custom version of EVS_Enemy_HopHome // (in) LVar0: part idx // (in) LVar1: hopping animID EvtScript N(EVS_Chomp_HopHome) = { - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ChainChomp_Bite) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_EXEC_WAIT(N(EVS_Chomp_HopToPos)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_TARGET, LVar0, LVar1, LVar2) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ChainChomp_Bite) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + ExecWait(N(EVS_Chomp_HopToPos)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_TARGET, LVar0, LVar1, LVar2) + Call(SetActorYaw, ACTOR_SELF, 0) + Return + End }; // Custom version of EVS_Enemy_HopToPos @@ -873,71 +873,71 @@ EvtScript N(EVS_Chomp_HopHome) = { // (in) LVar1: target posY // (in) LVar2: target posZ EvtScript N(EVS_Chomp_HopToPos) = { - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_IF_LT(LVar3, LVar0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_ELSE - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_END_IF - EVT_LABEL(0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_IF_EQ(LVar3, LVar0) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_LT(LVar3, LVar0) - EVT_SET(LVar4, LVar0) - EVT_SUB(LVar4, LVar3) - EVT_IF_LT(LVar4, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) - EVT_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_END_THREAD - EVT_ELSE - EVT_SET(LVar4, LVar3) - EVT_ADD(LVar3, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar3, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) - EVT_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_END_THREAD - EVT_END_IF - EVT_ELSE - EVT_SET(LVar4, LVar3) - EVT_SUB(LVar4, LVar0) - EVT_IF_LT(LVar4, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) - EVT_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_END_THREAD - EVT_ELSE - EVT_SUB(LVar3, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar3, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) - EVT_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_END_THREAD - EVT_END_IF - EVT_END_IF - EVT_GOTO(0) - EVT_LABEL(10) - EVT_RETURN - EVT_END + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + IfLt(LVar3, LVar0) + Call(SetActorYaw, ACTOR_SELF, 180) + Else + Call(SetActorYaw, ACTOR_SELF, 0) + EndIf + Label(0) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + IfEq(LVar3, LVar0) + Goto(10) + EndIf + IfLt(LVar3, LVar0) + Set(LVar4, LVar0) + Sub(LVar4, LVar3) + IfLt(LVar4, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) + Thread + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndIf + EndThread + Else + Set(LVar4, LVar3) + Add(LVar3, 30) + Call(SetGoalPos, ACTOR_SELF, LVar3, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) + Thread + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndIf + EndThread + EndIf + Else + Set(LVar4, LVar3) + Sub(LVar4, LVar0) + IfLt(LVar4, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) + Thread + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndIf + EndThread + Else + Sub(LVar3, 30) + Call(SetGoalPos, ACTOR_SELF, LVar3, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) + Thread + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndIf + EndThread + EndIf + EndIf + Goto(0) + Label(10) + Return + End }; diff --git a/src/battle/area/isk_part_2/actor/tutankoopa.c b/src/battle/area/isk_part_2/actor/tutankoopa.c index e69f9b7acf3..1361960294c 100644 --- a/src/battle/area/isk_part_2/actor/tutankoopa.c +++ b/src/battle/area/isk_part_2/actor/tutankoopa.c @@ -274,681 +274,681 @@ API_CALLABLE(SpawnFallingRock) { } EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(ForceHomePos, ACTOR_SELF, 97, 70, 15) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_SHELL_1, 70, 70, 3) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_SHELL_2, 80, 70, -7) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_SHELL_3, 60, 70, -7) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Stunned, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Toss) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_StunState, AVAL_State_Normal) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasSummoned, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Dialogue_Recover, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShellsLeft, 3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_DebrisDropState, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unknown, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_DoneFirstStrike, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_UsedSpikeTaunt, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextSummonTime, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HittingSelf, FALSE) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(HPBarToHome, ACTOR_SELF) + Call(ForceHomePos, ACTOR_SELF, 97, 70, 15) + Call(SetPartPos, ACTOR_SELF, PRT_SHELL_1, 70, 70, 3) + Call(SetPartPos, ACTOR_SELF, PRT_SHELL_2, 80, 70, -7) + Call(SetPartPos, ACTOR_SELF, PRT_SHELL_3, 60, 70, -7) + Call(SetActorVar, ACTOR_SELF, AVAR_Stunned, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Toss) + Call(SetActorVar, ACTOR_SELF, AVAR_StunState, AVAL_State_Normal) + Call(SetActorVar, ACTOR_SELF, AVAR_HasSummoned, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_Dialogue_Recover, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_ShellsLeft, 3) + Call(SetActorVar, ACTOR_SELF, AVAR_DebrisDropState, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Unknown, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_DoneFirstStrike, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_UsedSpikeTaunt, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_NextSummonTime, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_HittingSelf, FALSE) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Stunned, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_DIZZY) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_TARGET, -10, 22) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_TARGET, 2, -8) - EVT_CALL(N(SetAbsoluteStatusOffsets), -25, 15, 0, 20) - EVT_ELSE - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_TARGET, 0, 39) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_TARGET, -5, -15) - EVT_CALL(N(SetAbsoluteStatusOffsets), -17, 23, 11, 32) - EVT_END_IF - EVT_CASE_EQ(1) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_TARGET, -10, 22) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_TARGET, 2, -8) - EVT_CALL(N(SetAbsoluteStatusOffsets), -25, 15, 0, 20) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetActorVar, ACTOR_SELF, AVAR_Stunned, LVar0) + Switch(LVar0) + CaseEq(0) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_DIZZY) + Call(SetTargetOffset, ACTOR_SELF, PRT_TARGET, -10, 22) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_TARGET, 2, -8) + Call(N(SetAbsoluteStatusOffsets), -25, 15, 0, 20) + Else + Call(SetTargetOffset, ACTOR_SELF, PRT_TARGET, 0, 39) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_TARGET, -5, -15) + Call(N(SetAbsoluteStatusOffsets), -17, 23, 11, 32) + EndIf + CaseEq(1) + Call(SetTargetOffset, ACTOR_SELF, PRT_TARGET, -10, 22) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_TARGET, 2, -8) + Call(N(SetAbsoluteStatusOffsets), -25, 15, 0, 20) + EndSwitch + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(GetLastElement, LVarE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Tutankoopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Tutankoopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(GetLastElement, LVarE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Tutankoopa_Hurt) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Tutankoopa_Hurt) + ExecWait(EVS_Enemy_Hit) // if damage is from "debris drop" backfiring, fall down and become stunned - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HittingSelf, LVar2) - EVT_IF_TRUE(LVar2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HittingSelf, FALSE) - EVT_EXEC_WAIT(N(EVS_TemporaryKnockout)) - EVT_END_IF - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET(LVar0, PRT_MAIN) - EVT_SET(LVar1, ANIM_Tutankoopa_BurnHurt) - EVT_SET(LVar2, ANIM_Tutankoopa_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET(LVar0, PRT_MAIN) - EVT_SET(LVar1, ANIM_Tutankoopa_BurnHurt) - EVT_SET(LVar2, ANIM_Tutankoopa_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Tutankoopa_BurnStill) - EVT_EXEC_WAIT(N(EVS_Tutankoopa_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_EXEC_WAIT(N(EVS_Tutankoopa_SpinSmashHit)) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Tutankoopa_Glare) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Tutankoopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Tutankoopa_Run) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Stunned, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_StunState, LVar1) - EVT_IF_NE(LVar1, AVAL_State_Normal) - EVT_SET_CONST(LVar1, ANIM_Tutankoopa_Dizzy) - EVT_ELSE - EVT_SET_CONST(LVar1, ANIM_Tutankoopa_Idle) - EVT_END_IF - EVT_ELSE - EVT_SET_CONST(LVar1, ANIM_Tutankoopa_Idle) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIKE_TAUNT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_StunState, LVar1) - EVT_IF_EQ(LVar1, AVAL_State_Normal) - EVT_IF_FLAG(LVarE, DAMAGE_TYPE_JUMP) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_UsedSpikeTaunt, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_UsedSpikeTaunt, TRUE) - EVT_WAIT(60) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CASE_OR_EQ(EVENT_SHOCK_DEATH) - EVT_CASE_OR_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Tutankoopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Tutankoopa_Hurt) - EVT_EXEC_WAIT(N(EVS_Tutankoopa_Death)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_EXEC_WAIT(N(EVS_Tutankoopa_SpinSmashHit)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Tutankoopa_Hurt) - EVT_EXEC_WAIT(N(EVS_Tutankoopa_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIKE_CONTACT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Hurt) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Idle) - EVT_CASE_EQ(EVENT_BURN_CONTACT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Hurt) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Idle) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Tutankoopa_Idle) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Tutankoopa_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_HittingSelf, LVar2) + IfTrue(LVar2) + Call(SetActorVar, ACTOR_SELF, AVAR_HittingSelf, FALSE) + ExecWait(N(EVS_TemporaryKnockout)) + EndIf + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + CaseEq(EVENT_BURN_HIT) + Set(LVar0, PRT_MAIN) + Set(LVar1, ANIM_Tutankoopa_BurnHurt) + Set(LVar2, ANIM_Tutankoopa_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + Set(LVar0, PRT_MAIN) + Set(LVar1, ANIM_Tutankoopa_BurnHurt) + Set(LVar2, ANIM_Tutankoopa_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Tutankoopa_BurnStill) + ExecWait(N(EVS_Tutankoopa_Death)) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + ExecWait(N(EVS_Tutankoopa_SpinSmashHit)) + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Tutankoopa_Glare) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Tutankoopa_Hurt) + ExecWait(EVS_Enemy_Knockback) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Tutankoopa_Run) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Stunned, LVar1) + IfEq(LVar1, TRUE) + Call(GetActorVar, ACTOR_SELF, AVAR_StunState, LVar1) + IfNe(LVar1, AVAL_State_Normal) + SetConst(LVar1, ANIM_Tutankoopa_Dizzy) + Else + SetConst(LVar1, ANIM_Tutankoopa_Idle) + EndIf + Else + SetConst(LVar1, ANIM_Tutankoopa_Idle) + EndIf + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_SPIKE_TAUNT) + Call(GetActorVar, ACTOR_SELF, AVAR_StunState, LVar1) + IfEq(LVar1, AVAL_State_Normal) + IfFlag(LVarE, DAMAGE_TYPE_JUMP) + Call(GetActorVar, ACTOR_SELF, AVAR_UsedSpikeTaunt, LVar0) + IfEq(LVar0, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_UsedSpikeTaunt, TRUE) + Wait(60) + EndIf + EndIf + EndIf + CaseOrEq(EVENT_SHOCK_DEATH) + CaseOrEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Tutankoopa_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Tutankoopa_Hurt) + ExecWait(N(EVS_Tutankoopa_Death)) + Return + EndCaseGroup + CaseEq(EVENT_SPIN_SMASH_DEATH) + ExecWait(N(EVS_Tutankoopa_SpinSmashHit)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Tutankoopa_Hurt) + ExecWait(N(EVS_Tutankoopa_Death)) + Return + CaseEq(EVENT_SPIKE_CONTACT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Hurt) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Idle) + CaseEq(EVENT_BURN_CONTACT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Hurt) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Idle) + CaseEq(EVENT_END_FIRST_STRIKE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Tutankoopa_Idle) + ExecWait(EVS_Enemy_ReturnHome) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Tutankoopa_Idle) + ExecWait(EVS_Enemy_Recover) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Tutankoopa_SpinSmashHit) = { - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Hurt) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.1)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, 150, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) - EVT_SUB(LVar1, 20) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.1)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, 130, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Fall) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Levitate) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Run) - EVT_CALL(RunToGoal, ACTOR_SELF, 10, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Idle) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Hurt) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.1)) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(SetGoalPos, ACTOR_SELF, 150, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) + Sub(LVar1, 20) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.1)) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetGoalPos, ACTOR_SELF, 130, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Fall) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Levitate) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Run) + Call(RunToGoal, ACTOR_SELF, 10, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Idle) + Return + End }; EvtScript N(EVS_TemporaryKnockout) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Stunned, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_WITHER) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Hurt) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.9)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_SET(LVar1, 0) - EVT_ADD(LVar2, 24) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.1), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0), EVT_FLOAT(0.7), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(StartRumble, BTL_RUMBLE_LONG) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_COLLAPSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Fall) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 40) - EVT_PLAY_EFFECT(EFFECT_STARS_ORBITING, 0, LVar0, LVar1, LVar2, 20, 4, LVarF, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Dizzy) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_KNOCKOUT_CHIRPING) - EVT_WAIT(30) - EVT_CALL(RemoveEffect, LVarF) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Stunned, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unknown, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_StunState, AVAL_State_Stunned) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(FallenAnims))) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_Stunned, LVar0) + IfEq(LVar0, TRUE) + Return + EndIf + Call(HideHealthBar, ACTOR_SELF) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_WITHER) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Hurt) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.9)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 10) + Set(LVar1, 0) + Add(LVar2, 24) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Thread + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.1), Float(0.5), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.0), Float(0.7), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.0), Float(1.0), Float(1.0)) + EndThread + Call(StartRumble, BTL_RUMBLE_LONG) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_COLLAPSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Fall) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 40) + PlayEffect(EFFECT_STARS_ORBITING, 0, LVar0, LVar1, LVar2, 20, 4, LVarF, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Dizzy) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_KNOCKOUT_CHIRPING) + Wait(30) + Call(RemoveEffect, LVarF) + Call(SetActorVar, ACTOR_SELF, AVAR_Stunned, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_Unknown, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_StunState, AVAL_State_Stunned) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(FallenAnims))) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_LABEL(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Stunned, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_CALL(ActorExists, ACTOR_CHOMP, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NextSummonTime, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_Move_SummonChomp)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_ELSE - EVT_SUB(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextSummonTime, LVar0) - EVT_END_IF - EVT_END_IF + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Label(0) + Call(GetActorVar, ACTOR_SELF, AVAR_Stunned, LVar0) + IfEq(LVar0, FALSE) + Call(ActorExists, ACTOR_CHOMP, LVar0) + IfEq(LVar0, FALSE) + Call(GetActorVar, ACTOR_SELF, AVAR_NextSummonTime, LVar0) + IfEq(LVar0, 0) + ExecWait(N(EVS_Move_SummonChomp)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + Else + Sub(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_NextSummonTime, LVar0) + EndIf + EndIf // override to only use "drop debris" while shrunk - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_DropDebris) - EVT_END_IF + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_DropDebris) + EndIf // select next attack, alternating between "throw shell" and "drop debris" when possible - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Move_Toss) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ShellsLeft, LVar0) - EVT_IF_EQ(LVar0, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) + Switch(LVar0) + CaseEq(AVAL_Move_Toss) + Call(GetActorVar, ACTOR_SELF, AVAR_ShellsLeft, LVar0) + IfEq(LVar0, 0) // always use "drop debris" after all shells are gone - EVT_EXEC_WAIT(N(EVS_Attack_DropDebris)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_DropDebris) - EVT_ELSE + ExecWait(N(EVS_Attack_DropDebris)) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_DropDebris) + Else // throw a shell if not shrunk - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_EXEC_WAIT(N(EVS_Attack_ThrowShell)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_DropDebris) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_DropDebris)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Toss) - EVT_END_IF - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Toss) - EVT_EXEC_WAIT(N(EVS_Attack_DropDebris)) - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_ELSE - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unknown, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_StunState, AVAL_State_Normal) - EVT_EXEC_WAIT(N(EVS_GetBackUp)) - EVT_EXEC_WAIT(N(EVS_LevitateToHomePos)) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_RETURN - EVT_END + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + ExecWait(N(EVS_Attack_ThrowShell)) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_DropDebris) + Else + ExecWait(N(EVS_Attack_DropDebris)) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Toss) + EndIf + EndIf + CaseDefault + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Toss) + ExecWait(N(EVS_Attack_DropDebris)) + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + Else + Call(SetActorVar, ACTOR_SELF, AVAR_Unknown, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_StunState, AVAL_State_Normal) + ExecWait(N(EVS_GetBackUp)) + ExecWait(N(EVS_LevitateToHomePos)) + Goto(0) + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + Return + End }; EvtScript N(EVS_Attack_ThrowShell) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ShellsLeft, LVar0) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetActorVar, ACTOR_SELF, AVAR_ShellsLeft, LVar0) // get actor part for the Nth remaining shell - EVT_SWITCH(LVar0) - EVT_CASE_EQ(1) - EVT_SET(LVar9, PRT_SHELL_3) - EVT_CASE_EQ(2) - EVT_SET(LVar9, PRT_SHELL_2) - EVT_CASE_EQ(3) - EVT_SET(LVar9, PRT_SHELL_1) - EVT_CASE_DEFAULT - EVT_RETURN - EVT_END_SWITCH - EVT_SUB(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShellsLeft, LVar0) + Switch(LVar0) + CaseEq(1) + Set(LVar9, PRT_SHELL_3) + CaseEq(2) + Set(LVar9, PRT_SHELL_2) + CaseEq(3) + Set(LVar9, PRT_SHELL_1) + CaseDefault + Return + EndSwitch + Sub(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_ShellsLeft, LVar0) // begin the attack - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_15) - EVT_CALL(SetBattleCamZoom, 320) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(BattleCamTargetActorPart, ACTOR_SELF, LVar9) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Run) - EVT_CALL(GetPartOffset, ACTOR_SELF, LVar9, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_SUB(LVar2, 3) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 10, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Idle) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Lift) - EVT_WAIT(7) - EVT_CALL(GetPartOffset, ACTOR_SELF, LVar9, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_ADD(LVar1, 40) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVar9, EVT_FLOAT(0.8)) - EVT_CALL(JumpPartTo, ACTOR_SELF, LVar9, LVar0, LVar1, LVar2, 5, TRUE) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar9, ANIM_BuzzyBeetle_Anim05) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_TOSS) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Toss) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, LVar9, EVT_FLOAT(14.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVar9, EVT_FLOAT(0.2)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 50) - EVT_SET(LVar1, -5) - EVT_CALL(FlyPartTo, ACTOR_SELF, LVar9, LVar0, LVar1, LVar2, 0, 30, EASING_LINEAR) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 65) - EVT_SET(LVar1, -5) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, LVar9, EVT_FLOAT(6.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVar9, EVT_FLOAT(0.1)) - EVT_CALL(FlyPartTo, ACTOR_SELF, LVar9, LVar0, LVar1, LVar2, 0, 15, EASING_LINEAR) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar9, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Run) - EVT_CALL(RunToGoal, ACTOR_SELF, 10, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Idle) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Toss) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, LVar9, EVT_FLOAT(14.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVar9, EVT_FLOAT(0.2)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVar9, EVT_FLOAT(0.2)) - EVT_CALL(FlyPartTo, ACTOR_SELF, LVar9, LVar0, LVar1, LVar2, 0, 30, EASING_LINEAR) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar8, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_THROW_SHELL, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 55) - EVT_SET(LVar1, 0) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, LVar9, EVT_FLOAT(6.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVar9, EVT_FLOAT(0.1)) - EVT_CALL(FlyPartTo, ACTOR_SELF, LVar9, LVar0, LVar1, LVar2, 0, 25, EASING_LINEAR) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, LVar9, EVT_FLOAT(4.0)) - EVT_SUB(LVar0, 20) - EVT_CALL(FlyPartTo, ACTOR_SELF, LVar9, LVar0, LVar1, LVar2, 0, 21, EASING_LINEAR) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar9, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(19) - EVT_IF_EQ(LVar8, HIT_RESULT_10) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Run) - EVT_CALL(RunToGoal, ACTOR_SELF, 10, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Idle) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_PRESET_15) + Call(SetBattleCamZoom, 320) + Call(SetBattleCamOffsetZ, 0) + Call(BattleCamTargetActorPart, ACTOR_SELF, LVar9) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Run) + Call(GetPartOffset, ACTOR_SELF, LVar9, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Sub(LVar2, 3) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 10, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Idle) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Lift) + Wait(7) + Call(GetPartOffset, ACTOR_SELF, LVar9, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Add(LVar1, 40) + Call(SetPartJumpGravity, ACTOR_SELF, LVar9, Float(0.8)) + Call(JumpPartTo, ACTOR_SELF, LVar9, LVar0, LVar1, LVar2, 5, TRUE) + Wait(8) + Call(SetAnimation, ACTOR_SELF, LVar9, ANIM_BuzzyBeetle_Anim05) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_TOSS) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Toss) + Call(SetPartMoveSpeed, ACTOR_SELF, LVar9, Float(14.0)) + Call(SetPartJumpGravity, ACTOR_SELF, LVar9, Float(0.2)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 50) + Set(LVar1, -5) + Call(FlyPartTo, ACTOR_SELF, LVar9, LVar0, LVar1, LVar2, 0, 30, EASING_LINEAR) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Sub(LVar0, 65) + Set(LVar1, -5) + Call(SetPartMoveSpeed, ACTOR_SELF, LVar9, Float(6.0)) + Call(SetPartJumpGravity, ACTOR_SELF, LVar9, Float(0.1)) + Call(FlyPartTo, ACTOR_SELF, LVar9, LVar0, LVar1, LVar2, 0, 15, EASING_LINEAR) + Call(SetPartFlagBits, ACTOR_SELF, LVar9, ACTOR_PART_FLAG_INVISIBLE, TRUE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetGoalToHome, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Run) + Call(RunToGoal, ACTOR_SELF, 10, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Idle) + Return + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Toss) + Call(SetPartMoveSpeed, ACTOR_SELF, LVar9, Float(14.0)) + Call(SetPartJumpGravity, ACTOR_SELF, LVar9, Float(0.2)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartJumpGravity, ACTOR_SELF, LVar9, Float(0.2)) + Call(FlyPartTo, ACTOR_SELF, LVar9, LVar0, LVar1, LVar2, 0, 30, EASING_LINEAR) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar8, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_THROW_SHELL, BS_FLAGS1_TRIGGER_EVENTS) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Sub(LVar0, 55) + Set(LVar1, 0) + Call(SetPartMoveSpeed, ACTOR_SELF, LVar9, Float(6.0)) + Call(SetPartJumpGravity, ACTOR_SELF, LVar9, Float(0.1)) + Call(FlyPartTo, ACTOR_SELF, LVar9, LVar0, LVar1, LVar2, 0, 25, EASING_LINEAR) + Call(SetPartMoveSpeed, ACTOR_SELF, LVar9, Float(4.0)) + Sub(LVar0, 20) + Call(FlyPartTo, ACTOR_SELF, LVar9, LVar0, LVar1, LVar2, 0, 21, EASING_LINEAR) + Call(SetPartFlagBits, ACTOR_SELF, LVar9, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(19) + IfEq(LVar8, HIT_RESULT_10) + Return + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Run) + Call(RunToGoal, ACTOR_SELF, 10, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Idle) + Return + End }; EvtScript N(EVS_Attack_DropDebris) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_15) - EVT_CALL(SetBattleCamZoom, 350) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 40) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_DebrisDropState, LVar0) - EVT_IF_EQ(LVar0, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_15) + Call(SetBattleCamZoom, 350) + Call(SetBattleCamOffsetZ, 0) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 40) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetActorVar, ACTOR_SELF, AVAR_DebrisDropState, LVar0) + IfEq(LVar0, 0) // first use only - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(ActorSpeak, MSG_CH2_00E5, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Shout, ANIM_Tutankoopa_Shout) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_TUTANKOOPA_MAGIC) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Shout) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_HIEROGLYPHS, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 45, 0) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 70) - EVT_CALL(PlaySound, SOUND_SPOOKY_LEVITATE) - EVT_PLAY_EFFECT(EFFECT_CHOMP_DROP, 0, 0, 60, 0, EVT_FLOAT(0.2), 0, EVT_FLOAT(1.4), 255, EVT_FLOAT(0.1), 150, 0) - EVT_WAIT(15) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED | STATUS_FLAG_TRANSPARENT) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Flail) - EVT_WAIT(49) - EVT_CALL(PlaySound, SOUND_HEAVY_NPC_FALLING) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Toss) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Crouch) - EVT_WAIT(5) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) - EVT_CALL(PlaySound, SOUND_HEAVY_NPC_LANDING) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(4.0)) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Question) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_EMOTE, EMOTE_QUESTION, 0, LVar0, LVar1, LVar2, 20, 315, 30, 0, 0) - EVT_CALL(PlaySound, SOUND_ILLUSION_DISSOLVE) - EVT_ELSE - EVT_WAIT(50) - EVT_CALL(PlaySound, SOUND_HEAVY_NPC_FALLING) - EVT_WAIT(18) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) - EVT_CALL(PlaySound, SOUND_HEAVY_NPC_LANDING) - EVT_WAIT(20) - EVT_CALL(PlaySound, SOUND_ILLUSION_DISSOLVE) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_DebrisDropState, LVar0) - EVT_SWITCH(LVar0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_13) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(ActorSpeak, MSG_CH2_00E5, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Shout, ANIM_Tutankoopa_Shout) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_TUTANKOOPA_MAGIC) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Shout) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 20) + PlayEffect(EFFECT_HIEROGLYPHS, 0, LVar0, LVar1, LVar2, Float(1.0), 45, 0) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 70) + Call(PlaySound, SOUND_SPOOKY_LEVITATE) + PlayEffect(EFFECT_CHOMP_DROP, 0, 0, 60, 0, Float(0.2), 0, Float(1.4), 255, Float(0.1), 150, 0) + Wait(15) + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED | STATUS_FLAG_TRANSPARENT) + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Flail) + Wait(49) + Call(PlaySound, SOUND_HEAVY_NPC_FALLING) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Toss) + Wait(8) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Crouch) + Wait(5) + Call(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) + Call(PlaySound, SOUND_HEAVY_NPC_LANDING) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(4.0)) + Wait(20) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Question) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 20) + PlayEffect(EFFECT_EMOTE, EMOTE_QUESTION, 0, LVar0, LVar1, LVar2, 20, 315, 30, 0, 0) + Call(PlaySound, SOUND_ILLUSION_DISSOLVE) + Else + Wait(50) + Call(PlaySound, SOUND_HEAVY_NPC_FALLING) + Wait(18) + Call(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) + Call(PlaySound, SOUND_HEAVY_NPC_LANDING) + Wait(20) + Call(PlaySound, SOUND_ILLUSION_DISSOLVE) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_DebrisDropState, LVar0) + Switch(LVar0) // first use: target player - EVT_CASE_EQ(0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_DebrisDropState, 1) - EVT_EXEC_WAIT(N(EVS_DropDebris_Players)) + CaseEq(0) + Call(SetActorVar, ACTOR_SELF, AVAR_DebrisDropState, 1) + ExecWait(N(EVS_DropDebris_Players)) // second use: target self if damage is survivable - EVT_CASE_EQ(1) - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_DebrisDropState, 2) - EVT_IF_GT(LVar0, DMG_DROP_DEBRIS_SELF) - EVT_EXEC_WAIT(N(EVS_DropDebris_Self)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_DropDebris_Players)) - EVT_END_IF + CaseEq(1) + Call(GetActorHP, ACTOR_SELF, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_DebrisDropState, 2) + IfGt(LVar0, DMG_DROP_DEBRIS_SELF) + ExecWait(N(EVS_DropDebris_Self)) + Else + ExecWait(N(EVS_DropDebris_Players)) + EndIf // subsequent use: 50% chance to target player or target self while damage is survivable - EVT_CASE_DEFAULT - EVT_CALL(RandInt, 2, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_IF_GT(LVar0, DMG_DROP_DEBRIS_SELF) - EVT_EXEC_WAIT(N(EVS_DropDebris_Self)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_DropDebris_Players)) - EVT_END_IF - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_DropDebris_Players)) - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + CaseDefault + Call(RandInt, 2, LVar0) + IfEq(LVar0, 0) + Call(GetActorHP, ACTOR_SELF, LVar0) + IfGt(LVar0, DMG_DROP_DEBRIS_SELF) + ExecWait(N(EVS_DropDebris_Self)) + Else + ExecWait(N(EVS_DropDebris_Players)) + EndIf + Else + ExecWait(N(EVS_DropDebris_Players)) + EndIf + EndSwitch + Return + End }; EvtScript N(EVS_DropDebris_Self) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_TUTANKOOPA) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar3, 170) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_DEBRIS_3, LVar0, LVar3, LVar2) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DEBRIS_3, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_DEBRIS_3, ANIM_Tutankoopa_RockStill) - EVT_CALL(PlaySound, SOUND_TUTANKOOPA_DEBRIS_FALL) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_DEBRIS_3, EVT_FLOAT(8.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_DEBRIS_3, EVT_FLOAT(0.3)) - EVT_CALL(FallPartTo, ACTOR_SELF, PRT_DEBRIS_3, LVar0, LVar1, LVar2, 20) - EVT_THREAD - EVT_LOOP(20) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DEBRIS_3, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DEBRIS_3, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_ThumbsUp) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HittingSelf, TRUE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, DMG_DROP_DEBRIS_SELF, BS_FLAGS1_TRIGGER_EVENTS) - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_TUTANKOOPA) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar3, 170) + Call(SetPartPos, ACTOR_SELF, PRT_DEBRIS_3, LVar0, LVar3, LVar2) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DEBRIS_3, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_DEBRIS_3, ANIM_Tutankoopa_RockStill) + Call(PlaySound, SOUND_TUTANKOOPA_DEBRIS_FALL) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_DEBRIS_3, Float(8.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_DEBRIS_3, Float(0.3)) + Call(FallPartTo, ACTOR_SELF, PRT_DEBRIS_3, LVar0, LVar1, LVar2, 20) + Thread + Loop(20) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DEBRIS_3, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DEBRIS_3, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + EndLoop + EndThread + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_ThumbsUp) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_HittingSelf, TRUE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, DMG_DROP_DEBRIS_SELF, BS_FLAGS1_TRIGGER_EVENTS) + Return + End }; EvtScript N(EVS_DropDebris_Players) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_THREAD - EVT_LOOP(6) - EVT_CALL(RandInt, 120, LVar0) - EVT_SUB(LVar0, 150) - EVT_CALL(RandInt, 90, LVar1) - EVT_SUB(LVar0, 40) - EVT_CALL(PlaySound, SOUND_TUTANKOOPA_DEBRIS_FALL) - EVT_CALL(SpawnFallingRock, LVar0, 0, LVar1) - EVT_CALL(RandInt, 5, LVar0) - EVT_ADD(LVar0, 5) - EVT_WAIT(LVar0) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarB, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarB) - EVT_CASE_EQ(HIT_RESULT_MISS) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_CALL(FreezeBattleState, TRUE) - EVT_THREAD - EVT_CALL(PlaySound, SOUND_TUTANKOOPA_DEBRIS_FALL) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_SET(LVar1, 0) - EVT_SET(LVar3, 170) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_DEBRIS_1, LVar0, LVar3, LVar2) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DEBRIS_1, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_DEBRIS_1, ANIM_Tutankoopa_RockStill) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_DEBRIS_1, EVT_FLOAT(8.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_DEBRIS_1, EVT_FLOAT(0.3)) - EVT_CALL(FallPartTo, ACTOR_SELF, PRT_DEBRIS_1, LVar0, LVar1, LVar2, 20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_DEBRIS_1, ANIM_Tutankoopa_RockShatter) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(25) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_SUB(LVar4, 5) - EVT_ADD(LVar5, 5) - EVT_SET(LVar7, 170) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_DEBRIS_2, LVar4, LVar7, LVar6) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DEBRIS_2, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_DEBRIS_2, ANIM_Tutankoopa_RockStill) - EVT_CALL(PlaySound, SOUND_TUTANKOOPA_DEBRIS_FALL) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_DEBRIS_2, EVT_FLOAT(8.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_DEBRIS_2, EVT_FLOAT(0.3)) - EVT_CALL(FallPartTo, ACTOR_SELF, PRT_DEBRIS_2, LVar4, LVar5, LVar6, 20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_DEBRIS_1, ANIM_Tutankoopa_RockShatter) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_DROP_DEBRIS_PARTNER, BS_FLAGS1_TRIGGER_EVENTS) - EVT_WAIT(20) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DEBRIS_2, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(FreezeBattleState, FALSE) - EVT_RETURN - EVT_END_SWITCH - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_THREAD - EVT_LOOP(6) - EVT_CALL(RandInt, 120, LVar0) - EVT_SUB(LVar0, 150) - EVT_CALL(RandInt, 90, LVar1) - EVT_SUB(LVar0, 40) - EVT_CALL(PlaySound, SOUND_TUTANKOOPA_DEBRIS_FALL) - EVT_CALL(SpawnFallingRock, LVar0, 0, LVar1) - EVT_CALL(RandInt, 5, LVar0) - EVT_ADD(LVar0, 5) - EVT_WAIT(LVar0) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_THREAD - EVT_WAIT(25) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_SUB(LVar4, 5) - EVT_ADD(LVar5, 5) - EVT_SET(LVar7, 170) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_DEBRIS_2, LVar4, LVar7, LVar6) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DEBRIS_2, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_DEBRIS_2, ANIM_Tutankoopa_RockStill) - EVT_CALL(PlaySound, SOUND_TUTANKOOPA_DEBRIS_FALL) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_DEBRIS_2, EVT_FLOAT(8.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_DEBRIS_2, EVT_FLOAT(0.3)) - EVT_CALL(FallPartTo, ACTOR_SELF, PRT_DEBRIS_2, LVar4, LVar5, LVar6, 20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_DEBRIS_1, ANIM_Tutankoopa_RockShatter) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_DROP_DEBRIS_PARTNER, BS_FLAGS1_TRIGGER_EVENTS) - EVT_WAIT(20) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DEBRIS_2, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_CALL(PlaySound, SOUND_TUTANKOOPA_DEBRIS_FALL) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_ADD(LVar1, 5) - EVT_SET(LVar3, 170) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_DEBRIS_1, LVar0, LVar3, LVar2) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DEBRIS_1, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_DEBRIS_1, ANIM_Tutankoopa_RockStill) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_DEBRIS_1, EVT_FLOAT(8.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_DEBRIS_1, EVT_FLOAT(0.3)) - EVT_CALL(FallPartTo, ACTOR_SELF, PRT_DEBRIS_1, LVar0, LVar1, LVar2, 20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_DEBRIS_1, ANIM_Tutankoopa_RockShatter) - EVT_WAIT(2) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_DROP_DEBRIS_PLAYER, BS_FLAGS1_TRIGGER_EVENTS) - EVT_WAIT(19) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DEBRIS_1, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_IF_EQ(LVar0, HIT_RESULT_10) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Thread + Loop(6) + Call(RandInt, 120, LVar0) + Sub(LVar0, 150) + Call(RandInt, 90, LVar1) + Sub(LVar0, 40) + Call(PlaySound, SOUND_TUTANKOOPA_DEBRIS_FALL) + Call(SpawnFallingRock, LVar0, 0, LVar1) + Call(RandInt, 5, LVar0) + Add(LVar0, 5) + Wait(LVar0) + EndLoop + EndThread + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(EnemyTestTarget, ACTOR_SELF, LVarB, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarB) + CaseEq(HIT_RESULT_MISS) + Return + CaseDefault + Call(FreezeBattleState, TRUE) + Thread + Call(PlaySound, SOUND_TUTANKOOPA_DEBRIS_FALL) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Set(LVar1, 0) + Set(LVar3, 170) + Call(SetPartPos, ACTOR_SELF, PRT_DEBRIS_1, LVar0, LVar3, LVar2) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DEBRIS_1, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_DEBRIS_1, ANIM_Tutankoopa_RockStill) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_DEBRIS_1, Float(8.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_DEBRIS_1, Float(0.3)) + Call(FallPartTo, ACTOR_SELF, PRT_DEBRIS_1, LVar0, LVar1, LVar2, 20) + Call(SetAnimation, ACTOR_SELF, PRT_DEBRIS_1, ANIM_Tutankoopa_RockShatter) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + EndThread + Wait(25) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Sub(LVar4, 5) + Add(LVar5, 5) + Set(LVar7, 170) + Call(SetPartPos, ACTOR_SELF, PRT_DEBRIS_2, LVar4, LVar7, LVar6) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DEBRIS_2, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_DEBRIS_2, ANIM_Tutankoopa_RockStill) + Call(PlaySound, SOUND_TUTANKOOPA_DEBRIS_FALL) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_DEBRIS_2, Float(8.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_DEBRIS_2, Float(0.3)) + Call(FallPartTo, ACTOR_SELF, PRT_DEBRIS_2, LVar4, LVar5, LVar6, 20) + Call(SetAnimation, ACTOR_SELF, PRT_DEBRIS_1, ANIM_Tutankoopa_RockShatter) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_DROP_DEBRIS_PARTNER, BS_FLAGS1_TRIGGER_EVENTS) + Wait(20) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DEBRIS_2, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(FreezeBattleState, FALSE) + Return + EndSwitch + Return + EndCaseGroup + EndSwitch + Thread + Loop(6) + Call(RandInt, 120, LVar0) + Sub(LVar0, 150) + Call(RandInt, 90, LVar1) + Sub(LVar0, 40) + Call(PlaySound, SOUND_TUTANKOOPA_DEBRIS_FALL) + Call(SpawnFallingRock, LVar0, 0, LVar1) + Call(RandInt, 5, LVar0) + Add(LVar0, 5) + Wait(LVar0) + EndLoop + EndThread + Call(FreezeBattleState, TRUE) + Thread + Wait(25) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Sub(LVar4, 5) + Add(LVar5, 5) + Set(LVar7, 170) + Call(SetPartPos, ACTOR_SELF, PRT_DEBRIS_2, LVar4, LVar7, LVar6) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DEBRIS_2, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_DEBRIS_2, ANIM_Tutankoopa_RockStill) + Call(PlaySound, SOUND_TUTANKOOPA_DEBRIS_FALL) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_DEBRIS_2, Float(8.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_DEBRIS_2, Float(0.3)) + Call(FallPartTo, ACTOR_SELF, PRT_DEBRIS_2, LVar4, LVar5, LVar6, 20) + Call(SetAnimation, ACTOR_SELF, PRT_DEBRIS_1, ANIM_Tutankoopa_RockShatter) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_DROP_DEBRIS_PARTNER, BS_FLAGS1_TRIGGER_EVENTS) + Wait(20) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DEBRIS_2, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(FreezeBattleState, FALSE) + EndThread + Call(PlaySound, SOUND_TUTANKOOPA_DEBRIS_FALL) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Add(LVar1, 5) + Set(LVar3, 170) + Call(SetPartPos, ACTOR_SELF, PRT_DEBRIS_1, LVar0, LVar3, LVar2) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DEBRIS_1, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_DEBRIS_1, ANIM_Tutankoopa_RockStill) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_DEBRIS_1, Float(8.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_DEBRIS_1, Float(0.3)) + Call(FallPartTo, ACTOR_SELF, PRT_DEBRIS_1, LVar0, LVar1, LVar2, 20) + Call(SetAnimation, ACTOR_SELF, PRT_DEBRIS_1, ANIM_Tutankoopa_RockShatter) + Wait(2) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_DROP_DEBRIS_PLAYER, BS_FLAGS1_TRIGGER_EVENTS) + Wait(19) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DEBRIS_1, ACTOR_PART_FLAG_INVISIBLE, TRUE) + IfEq(LVar0, HIT_RESULT_10) + Return + EndIf + Return + End }; Vec3i N(SummonedChompPos) = { 190, 0, 0 }; @@ -958,308 +958,308 @@ Formation N(SummonedChomp) = { }; EvtScript N(EVS_Move_SummonChomp) = { - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HasSummoned, LVar0) - EVT_IF_FALSE(LVar0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Shout) - EVT_CALL(ActorSpeak, MSG_CH2_00E6, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Shout, ANIM_Tutankoopa_Shout) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Shout) - EVT_CALL(ActorSpeak, MSG_CH2_00E7, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Shout, ANIM_Tutankoopa_Shout) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Idle) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Stunned, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetBattleCamZoom, 225) - EVT_CALL(SetBattleCamOffsetZ, -30) - EVT_CALL(MoveBattleCamOver, 40) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetBattleCamZoom, 200) - EVT_CALL(SetBattleCamOffsetZ, 35) - EVT_CALL(MoveBattleCamOver, 40) - EVT_END_IF + Call(GetStatusFlags, ACTOR_SELF, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_HasSummoned, LVar0) + IfFalse(LVar0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_13) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Shout) + Call(ActorSpeak, MSG_CH2_00E6, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Shout, ANIM_Tutankoopa_Shout) + Else + Call(UseBattleCamPreset, BTL_CAM_PRESET_13) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Shout) + Call(ActorSpeak, MSG_CH2_00E7, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Shout, ANIM_Tutankoopa_Shout) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Idle) + Call(GetActorVar, ACTOR_SELF, AVAR_Stunned, LVar0) + IfEq(LVar0, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_13) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetBattleCamZoom, 225) + Call(SetBattleCamOffsetZ, -30) + Call(MoveBattleCamOver, 40) + Else + Call(UseBattleCamPreset, BTL_CAM_PRESET_13) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetBattleCamZoom, 200) + Call(SetBattleCamOffsetZ, 35) + Call(MoveBattleCamOver, 40) + EndIf // open the gate - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_GateOpenAmount, 0) - EVT_THREAD + Call(SetActorVar, ACTOR_SELF, AVAR_GateOpenAmount, 0) + Thread // rumble while gate is opening - EVT_LABEL(0) - EVT_CALL(StartRumble, BTL_RUMBLE_LONG) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_WAIT(1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_GateOpenAmount, LVar0) - EVT_IF_LT(LVar0, 60) - EVT_GOTO(0) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(PlaySound, SOUND_LARGE_GATE_OPEN) - EVT_LABEL(10) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_GateOpenAmount, LVarD) - EVT_CALL(TranslateModel, 31, 0, LVarD, 0) - EVT_ADD(LVarD, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_GateOpenAmount, LVarD) - EVT_WAIT(1) - EVT_IF_LT(LVarD, 60) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(StopSound, SOUND_LARGE_GATE_OPEN) - EVT_WAIT(10) + Label(0) + Call(StartRumble, BTL_RUMBLE_LONG) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Wait(1) + Call(GetActorVar, ACTOR_SELF, AVAR_GateOpenAmount, LVar0) + IfLt(LVar0, 60) + Goto(0) + EndIf + EndThread + Call(PlaySound, SOUND_LARGE_GATE_OPEN) + Label(10) + Call(GetActorVar, ACTOR_SELF, AVAR_GateOpenAmount, LVarD) + Call(TranslateModel, 31, 0, LVarD, 0) + Add(LVarD, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_GateOpenAmount, LVarD) + Wait(1) + IfLt(LVarD, 60) + Goto(10) + EndIf + Call(StopSound, SOUND_LARGE_GATE_OPEN) + Wait(10) // create the chomp and have him exit the gate - EVT_CALL(SummonEnemy, EVT_PTR(N(SummonedChomp)), FALSE) - EVT_SET(LVarB, LVar0) - EVT_SET(LVar0, 165) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, -30) - EVT_CALL(SetActorPos, LVarB, LVar0, LVar1, LVar2) - EVT_CALL(SetActorDispOffset, LVarB, 0, 0, 0) - EVT_CALL(UseIdleAnimation, LVarB, FALSE) - EVT_CALL(EnableIdleScript, LVarB, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetAnimation, LVarB, 1, ANIM_ChainChomp_SlowBite) - EVT_CALL(SetActorSpeed, LVarB, EVT_FLOAT(6.0)) - EVT_CALL(SetActorJumpGravity, LVarB, EVT_FLOAT(0.8)) - EVT_SET(LVar0, 90) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, -30) - EVT_SET(LVar3, 8) - EVT_SET(LVar4, 30) - EVT_EXEC_WAIT(N(EVS_SummonedChompHop)) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HasSummoned, LVar5) - EVT_IF_FALSE(LVar5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamZoom, 160) - EVT_CALL(GetActorPos, LVarB, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 60) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(MoveBattleCamOver, 8) - EVT_LOOP(3) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamZoom, 150) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(MoveBattleCamOver, 5) - EVT_WAIT(4) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_BITE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamZoom, 200) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(MoveBattleCamOver, 5) - EVT_WAIT(4) - EVT_END_LOOP - EVT_ELSE - EVT_WAIT(8) - EVT_CALL(SetGoalPos, LVarB, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, LVarB, 8, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_THREAD - EVT_CALL(SetGoalPos, LVarB, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, LVarB, 8, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_THREAD - EVT_WAIT(8) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(SetActorSpeed, LVarB, EVT_FLOAT(3.0)) - EVT_CALL(SetActorJumpGravity, LVarB, EVT_FLOAT(0.8)) - EVT_SET(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 20) - EVT_SET(LVar3, 8) - EVT_SET(LVar4, 20) - EVT_EXEC_WAIT(N(EVS_SummonedChompHop)) - EVT_CALL(GetActorPos, LVarB, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, LVarB, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, LVarB, 2, LVar0, LVar1, LVar2) // references partID from chain_chomp - EVT_CALL(HPBarToHome, LVarB) - EVT_CALL(SetActorSpeed, LVarB, EVT_FLOAT(6.0)) - EVT_CALL(SetActorJumpGravity, LVarB, EVT_FLOAT(0.8)) - EVT_CALL(EnableIdleScript, LVarB, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, LVarB, TRUE) + Call(SummonEnemy, Ref(N(SummonedChomp)), FALSE) + Set(LVarB, LVar0) + Set(LVar0, 165) + Set(LVar1, 0) + Set(LVar2, -30) + Call(SetActorPos, LVarB, LVar0, LVar1, LVar2) + Call(SetActorDispOffset, LVarB, 0, 0, 0) + Call(UseIdleAnimation, LVarB, FALSE) + Call(EnableIdleScript, LVarB, IDLE_SCRIPT_DISABLE) + Call(SetAnimation, LVarB, 1, ANIM_ChainChomp_SlowBite) + Call(SetActorSpeed, LVarB, Float(6.0)) + Call(SetActorJumpGravity, LVarB, Float(0.8)) + Set(LVar0, 90) + Set(LVar1, 0) + Set(LVar2, -30) + Set(LVar3, 8) + Set(LVar4, 30) + ExecWait(N(EVS_SummonedChompHop)) + Call(GetActorVar, ACTOR_SELF, AVAR_HasSummoned, LVar5) + IfFalse(LVar5) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamZoom, 160) + Call(GetActorPos, LVarB, LVar0, LVar1, LVar2) + Set(LVar1, 60) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(MoveBattleCamOver, 8) + Loop(3) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamZoom, 150) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(MoveBattleCamOver, 5) + Wait(4) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_BITE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamZoom, 200) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(MoveBattleCamOver, 5) + Wait(4) + EndLoop + Else + Wait(8) + Call(SetGoalPos, LVarB, LVar0, LVar1, LVar2) + Call(JumpToGoal, LVarB, 8, FALSE, TRUE, FALSE) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndThread + Call(SetGoalPos, LVarB, LVar0, LVar1, LVar2) + Call(JumpToGoal, LVarB, 8, FALSE, TRUE, FALSE) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndThread + Wait(8) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Call(SetActorSpeed, LVarB, Float(3.0)) + Call(SetActorJumpGravity, LVarB, Float(0.8)) + Set(LVar0, 20) + Set(LVar1, 0) + Set(LVar2, 20) + Set(LVar3, 8) + Set(LVar4, 20) + ExecWait(N(EVS_SummonedChompHop)) + Call(GetActorPos, LVarB, LVar0, LVar1, LVar2) + Call(ForceHomePos, LVarB, LVar0, LVar1, LVar2) + Call(SetPartPos, LVarB, 2, LVar0, LVar1, LVar2) // references partID from chain_chomp + Call(HPBarToHome, LVarB) + Call(SetActorSpeed, LVarB, Float(6.0)) + Call(SetActorJumpGravity, LVarB, Float(0.8)) + Call(EnableIdleScript, LVarB, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, LVarB, TRUE) // close the gate - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_GateOpenAmount, 60) - EVT_THREAD + Call(SetActorVar, ACTOR_SELF, AVAR_GateOpenAmount, 60) + Thread // rumble while gate is opening - EVT_LABEL(40) - EVT_CALL(StartRumble, BTL_RUMBLE_LONG) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_WAIT(1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_GateOpenAmount, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_GOTO(40) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(PlaySound, SOUND_LARGE_GATE_OPEN) - EVT_LABEL(50) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_GateOpenAmount, LVarD) - EVT_CALL(TranslateModel, 31, 0, LVarD, 0) - EVT_SUB(LVarD, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_GateOpenAmount, LVarD) - EVT_WAIT(1) - EVT_IF_GT(LVarD, 0) - EVT_GOTO(50) - EVT_END_IF - EVT_CALL(StopSound, SOUND_LARGE_GATE_OPEN) - EVT_CALL(PlaySound, SOUND_LARGE_GATE_CLOSE) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.5)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasSummoned, TRUE) - EVT_RETURN - EVT_END + Label(40) + Call(StartRumble, BTL_RUMBLE_LONG) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Wait(1) + Call(GetActorVar, ACTOR_SELF, AVAR_GateOpenAmount, LVar0) + IfNe(LVar0, 0) + Goto(40) + EndIf + EndThread + Call(PlaySound, SOUND_LARGE_GATE_OPEN) + Label(50) + Call(GetActorVar, ACTOR_SELF, AVAR_GateOpenAmount, LVarD) + Call(TranslateModel, 31, 0, LVarD, 0) + Sub(LVarD, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_GateOpenAmount, LVarD) + Wait(1) + IfGt(LVarD, 0) + Goto(50) + EndIf + Call(StopSound, SOUND_LARGE_GATE_OPEN) + Call(PlaySound, SOUND_LARGE_GATE_CLOSE) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.5)) + Call(SetActorVar, ACTOR_SELF, AVAR_HasSummoned, TRUE) + Return + End }; EvtScript N(EVS_SummonedChompHop) = { - EVT_LABEL(20) - EVT_CALL(GetActorPos, LVarB, LVar5, LVar6, LVar7) - EVT_IF_EQ(LVar5, LVar0) - EVT_GOTO(30) - EVT_END_IF - EVT_SET(LVar6, LVar5) - EVT_SUB(LVar6, LVar0) - EVT_IF_LT(LVar6, LVar4) - EVT_CALL(SetGoalPos, LVarB, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, LVarB, LVar3, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_THREAD - EVT_ELSE - EVT_SUB(LVar5, LVar4) - EVT_CALL(SetGoalPos, LVarB, LVar5, LVar1, LVar2) - EVT_CALL(JumpToGoal, LVarB, LVar3, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_THREAD - EVT_END_IF - EVT_GOTO(20) - EVT_LABEL(30) - EVT_RETURN - EVT_END + Label(20) + Call(GetActorPos, LVarB, LVar5, LVar6, LVar7) + IfEq(LVar5, LVar0) + Goto(30) + EndIf + Set(LVar6, LVar5) + Sub(LVar6, LVar0) + IfLt(LVar6, LVar4) + Call(SetGoalPos, LVarB, LVar0, LVar1, LVar2) + Call(JumpToGoal, LVarB, LVar3, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndThread + Else + Sub(LVar5, LVar4) + Call(SetGoalPos, LVarB, LVar5, LVar1, LVar2) + Call(JumpToGoal, LVarB, LVar3, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CHAIN_CHOMP_THUD) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndThread + EndIf + Goto(20) + Label(30) + Return + End }; EvtScript N(EVS_LevitateToHomePos) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unknown, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_TUTANKOOPA_MAGIC) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Levitate) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_HIEROGLYPHS, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 45, 0) - EVT_WAIT(45) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 60) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_TUTANKOOPA_LEVITATE) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.1)) - EVT_CALL(SetGoalPos, ACTOR_SELF, 97, 70, 15) - EVT_CALL(JumpToGoal, ACTOR_SELF, 45, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_B) - EVT_END_THREAD - EVT_WAIT(5) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Stunned, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_Unknown, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_13) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_TUTANKOOPA_MAGIC) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Levitate) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 20) + PlayEffect(EFFECT_HIEROGLYPHS, 0, LVar0, LVar1, LVar2, Float(1.0), 45, 0) + Wait(45) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 60) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_TUTANKOOPA_LEVITATE) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.1)) + Call(SetGoalPos, ACTOR_SELF, 97, 70, 15) + Call(JumpToGoal, ACTOR_SELF, 45, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) + Thread + Wait(1) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_B) + EndThread + Wait(5) + Call(SetActorVar, ACTOR_SELF, AVAR_Stunned, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Return + End }; EvtScript N(EVS_GetBackUp) = { - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Levitate) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_B) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Idle) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_WAIT(10) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Dialogue_Recover, LVar0) - EVT_IF_FALSE(LVar0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(ActorSpeak, MSG_CH2_00E4, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Talk, ANIM_Tutankoopa_Idle) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Dialogue_Recover, TRUE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Levitate) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) + Thread + Wait(1) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_B) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Idle) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Wait(10) + Call(GetActorVar, ACTOR_SELF, AVAR_Dialogue_Recover, LVar0) + IfFalse(LVar0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_13) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(ActorSpeak, MSG_CH2_00E4, ACTOR_SELF, PRT_MAIN, ANIM_Tutankoopa_Talk, ANIM_Tutankoopa_Idle) + Call(SetActorVar, ACTOR_SELF, AVAR_Dialogue_Recover, TRUE) + EndIf + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_DoneFirstStrike, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_DoneFirstStrike, TRUE) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) + Call(GetActorVar, ACTOR_SELF, AVAR_DoneFirstStrike, LVar0) + Switch(LVar0) + CaseEq(0) + Call(SetActorVar, ACTOR_SELF, AVAR_DoneFirstStrike, TRUE) + EndSwitch + EndSwitch + Return + End }; // kills the summoned chomp before dying EvtScript N(EVS_Tutankoopa_Death) = { - EVT_CALL(ActorExists, ACTOR_CHOMP, LVar2) - EVT_IF_NE(LVar2, FALSE) - EVT_CALL(GetActorHP, ACTOR_CHOMP, LVar2) - EVT_IF_NE(LVar2, 0) - EVT_THREAD - EVT_CALL(HideHealthBar, ACTOR_CHOMP) - EVT_CALL(EnableIdleScript, ACTOR_CHOMP, IDLE_SCRIPT_DISABLE) - EVT_CALL(UseIdleAnimation, ACTOR_CHOMP, FALSE) - EVT_CALL(SetAnimation, ACTOR_CHOMP, PRT_MAIN, ANIM_ChainChomp_Hurt) - EVT_WAIT(10) - EVT_SET(LVar2, 0) - EVT_LOOP(24) - EVT_CALL(SetActorYaw, ACTOR_CHOMP, LVar2) - EVT_ADD(LVar2, 30) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_CHOMP, 0) - EVT_CALL(GetActorPos, ACTOR_CHOMP, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_CHOMP, SOUND_ACTOR_DEATH) - EVT_SET(LVar3, 0) - EVT_LOOP(12) - EVT_CALL(SetActorRotation, ACTOR_CHOMP, LVar3, 0, 0) - EVT_ADD(LVar3, 8) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(RemoveActor, ACTOR_CHOMP) - EVT_END_THREAD - EVT_END_IF - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_DeathWithoutRemove) - EVT_LABEL(0) - EVT_CALL(ActorExists, ACTOR_CHOMP, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(ActorExists, ACTOR_CHOMP, LVar2) + IfNe(LVar2, FALSE) + Call(GetActorHP, ACTOR_CHOMP, LVar2) + IfNe(LVar2, 0) + Thread + Call(HideHealthBar, ACTOR_CHOMP) + Call(EnableIdleScript, ACTOR_CHOMP, IDLE_SCRIPT_DISABLE) + Call(UseIdleAnimation, ACTOR_CHOMP, FALSE) + Call(SetAnimation, ACTOR_CHOMP, PRT_MAIN, ANIM_ChainChomp_Hurt) + Wait(10) + Set(LVar2, 0) + Loop(24) + Call(SetActorYaw, ACTOR_CHOMP, LVar2) + Add(LVar2, 30) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_CHOMP, 0) + Call(GetActorPos, ACTOR_CHOMP, LVar0, LVar1, LVar2) + Add(LVar1, 10) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) + Call(PlaySoundAtActor, ACTOR_CHOMP, SOUND_ACTOR_DEATH) + Set(LVar3, 0) + Loop(12) + Call(SetActorRotation, ACTOR_CHOMP, LVar3, 0, 0) + Add(LVar3, 8) + Wait(1) + EndLoop + Call(RemoveActor, ACTOR_CHOMP) + EndThread + EndIf + EndIf + ExecWait(EVS_Enemy_DeathWithoutRemove) + Label(0) + Call(ActorExists, ACTOR_CHOMP, LVar0) + IfNe(LVar0, FALSE) + Wait(1) + Goto(0) + EndIf + Call(RemoveActor, ACTOR_SELF) + Return + End }; diff --git a/src/battle/area/iwa/actor/buzzar.c b/src/battle/area/iwa/actor/buzzar.c index 60b3d929563..9efe30c5bff 100644 --- a/src/battle/area/iwa/actor/buzzar.c +++ b/src/battle/area/iwa/actor/buzzar.c @@ -182,1056 +182,1056 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused_1, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_WindBlast) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused_2, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused_3, 0) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 40) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_Unused_1, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_WindBlast) + Call(SetActorVar, ACTOR_SELF, AVAR_Unused_2, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Unused_3, 0) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 40) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_RETURN - EVT_RETURN - EVT_END + Return + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Buzzar_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Buzzar_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_DummyHit)) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Buzzar_Anim0B) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Buzzar_Anim0B) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Buzzar_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Buzzar_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_WindBlast) - EVT_EXEC_WAIT(N(EVS_FlyToHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Buzzar_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Buzzar_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Buzzar_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Buzzar_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Buzzar_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Buzzar_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Buzzar_Anim0B) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Buzzar_Anim0B) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_DummyHit)) + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Buzzar_Anim0B) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Buzzar_Anim0B) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Buzzar_Anim0B) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Buzzar_Anim0B) + ExecWait(EVS_Enemy_ShockHit) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_WindBlast) + ExecWait(N(EVS_FlyToHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Buzzar_Anim0B) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Buzzar_Anim0B) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Buzzar_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Buzzar_Anim0B) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Buzzar_Anim0B) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Buzzar_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_ClawSwipe) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Move_WindBlast) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_GrappleThenSwipe) - EVT_EXEC_WAIT(N(EVS_Attack_WindBlast)) - EVT_CASE_EQ(AVAL_Move_ClawSwipe) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_GrappleThenFling) - EVT_EXEC_WAIT(N(EVS_Attack_ClawSwipe)) - EVT_CASE_EQ(AVAL_Move_FlingFeather) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_GrappleThenWind) - EVT_EXEC_WAIT(N(EVS_Attack_FeatherFling)) - EVT_CASE_DEFAULT - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) - EVT_IF_EQ(LVar0, AVAL_Move_GrappleThenWind) - EVT_SET(LVar0, AVAL_Move_WindBlast) - EVT_ELSE - EVT_ADD(LVar0, 1) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) - EVT_EXEC_WAIT(N(EVS_Attack_GrappleDrop)) - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_ClawSwipe) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) + Switch(LVar0) + CaseEq(AVAL_Move_WindBlast) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_GrappleThenSwipe) + ExecWait(N(EVS_Attack_WindBlast)) + CaseEq(AVAL_Move_ClawSwipe) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_GrappleThenFling) + ExecWait(N(EVS_Attack_ClawSwipe)) + CaseEq(AVAL_Move_FlingFeather) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_GrappleThenWind) + ExecWait(N(EVS_Attack_FeatherFling)) + CaseDefault + Call(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) + IfEq(LVar0, AVAL_Move_GrappleThenWind) + Set(LVar0, AVAL_Move_WindBlast) + Else + Add(LVar0, 1) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) + ExecWait(N(EVS_Attack_GrappleDrop)) + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/StartRumbleWithParams.inc.c" EvtScript N(EVS_Attack_WindBlast) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13) - EVT_CALL(SetBattleCamZoom, 180) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 120) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 70, LVar2) - EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim01) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim02) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim0D) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim16) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim17) - EVT_LOOP(0) - EVT_CALL(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim02) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_COS_IN_OUT) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_NO_CONTACT, 0, 1, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(HIT_RESULT_MISS) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_NO_CONTACT, 0, 1, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(HIT_RESULT_MISS) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim11) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim13) - EVT_WAIT(6) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_WHIRLWIND) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 50) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 90, EVT_FLOAT(0.5)) - EVT_END_THREAD - EVT_CALL(N(StartRumbleWithParams), 70, 100) - EVT_THREAD - EVT_LOOP(20) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_PLAY_EFFECT(EFFECT_WINDY_LEAVES, 2, LVar0, 10, LVar2, 0) - EVT_WAIT(3) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(60) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim01) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(25) - EVT_EXEC_WAIT(N(EVS_FlyToHome)) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(ShowMessageBox, BTL_MSG_ACTION_TIP_REDUCE_DAMAGE, 90) - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_WHIRLWIND) - EVT_CALL(action_command_whirlwind_init, 1) - EVT_CALL(SetupMashMeter, 3, 40, 70, 100, 0, 0) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim11) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim13) - EVT_WAIT(6) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_WHIRLWIND) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_CALL(action_command_whirlwind_start, 0, 88 * DT, 3) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, -25, 60, 0) - EVT_CALL(SetBattleCamZoom, 460) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 50) - EVT_CALL(N(StartRumbleWithParams), 70, 130) - EVT_THREAD - EVT_LOOP(30) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_PLAY_EFFECT(EFFECT_WINDY_LEAVES, 2, LVar0, 10, LVar2, 0) - EVT_WAIT(3) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 90, EVT_FLOAT(0.5)) - EVT_END_THREAD - EVT_CALL(ActorExists, ACTOR_PARTNER, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_THREAD - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 3) - EVT_LOOP(93) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, LVar0) - EVT_ADD(LVar0, LVar1) - EVT_ADD(LVar1, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_PARTNER, 0) - EVT_END_THREAD - EVT_END_IF - EVT_WAIT(90) - EVT_CALL(GetActionQuality, LVar1) - EVT_CALL(ActorExists, ACTOR_PARTNER, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_WAIT(3) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_UNBLOCKABLE | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim01) - EVT_WAIT(25) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_EXEC_WAIT(N(EVS_FlyToHome)) - EVT_RETURN - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(ShowMessageBox, BTL_MSG_ACTION_TIP_REDUCE_DAMAGE, 90) - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_WHIRLWIND) - EVT_CALL(action_command_whirlwind_init, 1) - EVT_CALL(SetupMashMeter, 3, 40, 70, 100, 0, 0) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim11) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim13) - EVT_WAIT(6) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_WHIRLWIND) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_CALL(action_command_whirlwind_start, 0, 88 * DT, 3) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, -25, 60, 0) - EVT_CALL(SetBattleCamZoom, 460) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 50) - EVT_CALL(N(StartRumbleWithParams), 70, 130) - EVT_THREAD - EVT_LOOP(30) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_PLAY_EFFECT(EFFECT_WINDY_LEAVES, 2, LVar0, 10, LVar2, 0) - EVT_WAIT(3) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 90, EVT_FLOAT(0.5)) - EVT_END_THREAD - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar1) - EVT_IF_NOT_FLAG(LVar1, STATUS_FLAG_STONE) - EVT_THREAD - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_FallBack) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 3) - EVT_LOOP(90) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, LVar0) - EVT_ADD(LVar0, LVar1) - EVT_ADD(LVar1, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 0) - EVT_END_THREAD - EVT_END_IF - EVT_CALL(ActorExists, ACTOR_PARTNER, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_THREAD - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 3) - EVT_LOOP(93) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, LVar0) - EVT_ADD(LVar0, LVar1) - EVT_ADD(LVar1, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_PARTNER, 0) - EVT_END_THREAD - EVT_END_IF - EVT_CALL(FreezeBattleState, TRUE) - EVT_WAIT(90) - EVT_CALL(GetActionQuality, LVar1) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_UNBLOCKABLE | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(ActorExists, ACTOR_PARTNER, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_WAIT(3) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_UNBLOCKABLE | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim01) - EVT_WAIT(25) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_EXEC_WAIT(N(EVS_FlyToHome)) - EVT_CALL(FreezeBattleState, FALSE) - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_PRESET_13) + Call(SetBattleCamZoom, 180) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 120) + Call(SetActorSpeed, ACTOR_SELF, Float(1.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, 70, LVar2) + Call(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) + Switch(LVar0) + CaseOrEq(ANIM_Buzzar_Anim01) + CaseOrEq(ANIM_Buzzar_Anim02) + CaseOrEq(ANIM_Buzzar_Anim0D) + CaseOrEq(ANIM_Buzzar_Anim16) + CaseOrEq(ANIM_Buzzar_Anim17) + Loop(0) + Call(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim02) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_COS_IN_OUT) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_NO_CONTACT, 0, 1, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVarA) + CaseEq(HIT_RESULT_MISS) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_NO_CONTACT, 0, 1, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVarA) + CaseEq(HIT_RESULT_MISS) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim11) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim13) + Wait(6) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_WHIRLWIND) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 50) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 90, Float(0.5)) + EndThread + Call(N(StartRumbleWithParams), 70, 100) + Thread + Loop(20) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 10) + PlayEffect(EFFECT_WINDY_LEAVES, 2, LVar0, 10, LVar2, 0) + Wait(3) + EndLoop + EndThread + Wait(60) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim01) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(25) + ExecWait(N(EVS_FlyToHome)) + Return + CaseDefault + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(ShowMessageBox, BTL_MSG_ACTION_TIP_REDUCE_DAMAGE, 90) + Call(ShowActionHud, TRUE) + Call(LoadActionCommand, ACTION_COMMAND_WHIRLWIND) + Call(action_command_whirlwind_init, 1) + Call(SetupMashMeter, 3, 40, 70, 100, 0, 0) + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim11) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim13) + Wait(6) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_WHIRLWIND) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + Call(action_command_whirlwind_start, 0, 88 * DT, 3) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, -25, 60, 0) + Call(SetBattleCamZoom, 460) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 50) + Call(N(StartRumbleWithParams), 70, 130) + Thread + Loop(30) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 10) + PlayEffect(EFFECT_WINDY_LEAVES, 2, LVar0, 10, LVar2, 0) + Wait(3) + EndLoop + EndThread + Thread + Call(ShakeCam, CAM_BATTLE, 0, 90, Float(0.5)) + EndThread + Call(ActorExists, ACTOR_PARTNER, LVar0) + IfEq(LVar0, TRUE) + Thread + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Set(LVar0, 0) + Set(LVar1, 3) + Loop(93) + Call(SetActorYaw, ACTOR_PARTNER, LVar0) + Add(LVar0, LVar1) + Add(LVar1, 1) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_PARTNER, 0) + EndThread + EndIf + Wait(90) + Call(GetActionQuality, LVar1) + Call(ActorExists, ACTOR_PARTNER, LVar0) + IfEq(LVar0, TRUE) + Wait(3) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_UNBLOCKABLE | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_TRIGGER_EVENTS) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim01) + Wait(25) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + ExecWait(N(EVS_FlyToHome)) + Return + EndSwitch + CaseDefault + EndSwitch + Call(ShowMessageBox, BTL_MSG_ACTION_TIP_REDUCE_DAMAGE, 90) + Call(ShowActionHud, TRUE) + Call(LoadActionCommand, ACTION_COMMAND_WHIRLWIND) + Call(action_command_whirlwind_init, 1) + Call(SetupMashMeter, 3, 40, 70, 100, 0, 0) + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim11) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim13) + Wait(6) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_WHIRLWIND) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + Call(action_command_whirlwind_start, 0, 88 * DT, 3) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, -25, 60, 0) + Call(SetBattleCamZoom, 460) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 50) + Call(N(StartRumbleWithParams), 70, 130) + Thread + Loop(30) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 10) + PlayEffect(EFFECT_WINDY_LEAVES, 2, LVar0, 10, LVar2, 0) + Wait(3) + EndLoop + EndThread + Thread + Call(ShakeCam, CAM_BATTLE, 0, 90, Float(0.5)) + EndThread + Call(GetStatusFlags, ACTOR_PLAYER, LVar1) + IfNotFlag(LVar1, STATUS_FLAG_STONE) + Thread + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_FallBack) + Set(LVar0, 0) + Set(LVar1, 3) + Loop(90) + Call(SetActorYaw, ACTOR_PLAYER, LVar0) + Add(LVar0, LVar1) + Add(LVar1, 1) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_PLAYER, 0) + EndThread + EndIf + Call(ActorExists, ACTOR_PARTNER, LVar0) + IfEq(LVar0, TRUE) + Thread + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Set(LVar0, 0) + Set(LVar1, 3) + Loop(93) + Call(SetActorYaw, ACTOR_PARTNER, LVar0) + Add(LVar0, LVar1) + Add(LVar1, 1) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_PARTNER, 0) + EndThread + EndIf + Call(FreezeBattleState, TRUE) + Wait(90) + Call(GetActionQuality, LVar1) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_UNBLOCKABLE | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_TRIGGER_EVENTS) + Call(ActorExists, ACTOR_PARTNER, LVar0) + IfEq(LVar0, TRUE) + Wait(3) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_UNBLOCKABLE | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_TRIGGER_EVENTS) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim01) + Wait(25) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + ExecWait(N(EVS_FlyToHome)) + Call(FreezeBattleState, FALSE) + Return + End }; EvtScript N(EVS_Attack_FeatherFling) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_05) - EVT_CALL(SetBattleCamZoom, 180) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 40) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 90, 35, 0) - EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim01) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim02) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim0D) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim16) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim17) - EVT_LOOP(0) - EVT_CALL(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim02) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -15, EASING_COS_IN_OUT) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -30) - EVT_ADD(LVar1, 25) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_FEATHER_1, LVar0, LVar1, LVar2) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -30) - EVT_ADD(LVar1, 35) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_FEATHER_2, LVar0, LVar1, LVar2) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -20) - EVT_ADD(LVar1, 25) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_FEATHER_3, LVar0, LVar1, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim0E) - EVT_WAIT(15) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 24) - EVT_ADD(LVar1, 24) - EVT_PLAY_EFFECT(EFFECT_SHINY_FLARE, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.6), 0, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SMALL_LENS_FLARE) - EVT_WAIT(10) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_FEATHER_1, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_FEATHER_2, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_FEATHER_3, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim01) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim10) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_FEATHER_1, 0, 0, -45) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_FEATHER_2, 0, 0, -45) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_FEATHER_3, 0, 0, -45) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FEATHER_1, ANIM_Buzzar_Anim14) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FEATHER_2, ANIM_Buzzar_Anim14) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FEATHER_3, ANIM_Buzzar_Anim14) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FEATHER_1, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FEATHER_2, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FEATHER_3, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_FEATHER_1, EVT_FLOAT(6.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_FEATHER_1, EVT_FLOAT(0.1)) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_FEATHER_2, EVT_FLOAT(6.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_FEATHER_2, EVT_FLOAT(0.1)) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_FEATHER_3, EVT_FLOAT(6.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_FEATHER_3, EVT_FLOAT(0.1)) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_THROW) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_THREAD - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RandInt, 10, LVar3) - EVT_SUB(LVar3, 30) - EVT_ADD(LVar0, LVar3) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_FEATHER_2, LVar0, 5, LVar2, 9, 0, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FEATHER_2, ANIM_Buzzar_Anim15) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RandInt, 10, LVar3) - EVT_SUB(LVar3, 40) - EVT_ADD(LVar0, LVar3) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_FEATHER_3, LVar0, 5, LVar2, 9, 0, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FEATHER_3, ANIM_Buzzar_Anim15) - EVT_END_THREAD - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_FEATHER_1, LVar0, 5, LVar2, 9, 0, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FEATHER_1, ANIM_Buzzar_Anim15) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FEATHER_1, ANIM_Buzzar_Anim14) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FEATHER_2, ANIM_Buzzar_Anim14) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FEATHER_3, ANIM_Buzzar_Anim14) - EVT_WAIT(20) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FEATHER_1, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FEATHER_2, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FEATHER_3, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_1, FALSE) - EVT_WAIT(10) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_FlyToHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_THREAD - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RandInt, 10, LVar3) - EVT_SUB(LVar3, 10) - EVT_ADD(LVar1, LVar3) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_FEATHER_2, LVar0, LVar1, LVar2, 6, 0, EASING_LINEAR) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RandInt, 10, LVar3) - EVT_ADD(LVar3, 10) - EVT_ADD(LVar1, LVar3) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_FEATHER_3, LVar0, LVar1, LVar2, 6, 0, EASING_LINEAR) - EVT_END_THREAD - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_FEATHER_1, LVar0, LVar1, LVar2, 6, 0, EASING_LINEAR) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_FEATHER, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SET(LVarF, LVar0) - EVT_SWITCH(LVarF) - EVT_CASE_DEFAULT - EVT_THREAD - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_FEATHER_2, 0, 45, 90) - EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_FEATHER_2, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 40) - EVT_SET(LVar1, 2) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_FEATHER_2, EVT_FLOAT(1.5)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_FEATHER_2, LVar0, LVar1, LVar2, 10, TRUE) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_FEATHER_2, 0, 80, 90) - EVT_WAIT(8) - EVT_LOOP(15) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FEATHER_2, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FEATHER_2, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_FEATHER_3, 0, 45, -90) - EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_FEATHER_3, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_SET(LVar1, 4) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_FEATHER_3, EVT_FLOAT(1.5)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_FEATHER_3, LVar0, LVar1, LVar2, 10, TRUE) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_FEATHER_3, 0, 90, -90) - EVT_WAIT(8) - EVT_LOOP(15) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FEATHER_3, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FEATHER_3, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_FEATHER_1, 0, 45, -90) - EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_FEATHER_1, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_SET(LVar1, 4) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_FEATHER_1, EVT_FLOAT(1.5)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_FEATHER_1, LVar0, LVar1, LVar2, 10, TRUE) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_FEATHER_1, 0, 90, -90) - EVT_WAIT(8) - EVT_LOOP(15) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FEATHER_1, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FEATHER_1, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(30) - EVT_CALL(YieldTurn) - EVT_EXEC_WAIT(N(EVS_FlyToHome)) - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_PRESET_05) + Call(SetBattleCamZoom, 180) + Call(SetBattleCamOffsetZ, 0) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 40) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 90, 35, 0) + Call(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) + Switch(LVar0) + CaseOrEq(ANIM_Buzzar_Anim01) + CaseOrEq(ANIM_Buzzar_Anim02) + CaseOrEq(ANIM_Buzzar_Anim0D) + CaseOrEq(ANIM_Buzzar_Anim16) + CaseOrEq(ANIM_Buzzar_Anim17) + Loop(0) + Call(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim02) + Call(FlyToGoal, ACTOR_SELF, 0, -15, EASING_COS_IN_OUT) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, -30) + Add(LVar1, 25) + Call(SetPartPos, ACTOR_SELF, PRT_FEATHER_1, LVar0, LVar1, LVar2) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, -30) + Add(LVar1, 35) + Call(SetPartPos, ACTOR_SELF, PRT_FEATHER_2, LVar0, LVar1, LVar2) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, -20) + Add(LVar1, 25) + Call(SetPartPos, ACTOR_SELF, PRT_FEATHER_3, LVar0, LVar1, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim0E) + Wait(15) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 24) + Add(LVar1, 24) + PlayEffect(EFFECT_SHINY_FLARE, 0, LVar0, LVar1, LVar2, Float(0.6), 0, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SMALL_LENS_FLARE) + Wait(10) + Call(SetPartSounds, ACTOR_SELF, PRT_FEATHER_1, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(SetPartSounds, ACTOR_SELF, PRT_FEATHER_2, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(SetPartSounds, ACTOR_SELF, PRT_FEATHER_3, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Thread + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim01) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim10) + Call(SetPartRotation, ACTOR_SELF, PRT_FEATHER_1, 0, 0, -45) + Call(SetPartRotation, ACTOR_SELF, PRT_FEATHER_2, 0, 0, -45) + Call(SetPartRotation, ACTOR_SELF, PRT_FEATHER_3, 0, 0, -45) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_FEATHER_1, ANIM_Buzzar_Anim14) + Call(SetAnimation, ACTOR_SELF, PRT_FEATHER_2, ANIM_Buzzar_Anim14) + Call(SetAnimation, ACTOR_SELF, PRT_FEATHER_3, ANIM_Buzzar_Anim14) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FEATHER_1, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FEATHER_2, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FEATHER_3, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_FEATHER_1, Float(6.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_FEATHER_1, Float(0.1)) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_FEATHER_2, Float(6.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_FEATHER_2, Float(0.1)) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_FEATHER_3, Float(6.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_FEATHER_3, Float(0.1)) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_THROW) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Thread + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RandInt, 10, LVar3) + Sub(LVar3, 30) + Add(LVar0, LVar3) + Call(FlyPartTo, ACTOR_SELF, PRT_FEATHER_2, LVar0, 5, LVar2, 9, 0, EASING_LINEAR) + Call(SetAnimation, ACTOR_SELF, PRT_FEATHER_2, ANIM_Buzzar_Anim15) + EndThread + Thread + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RandInt, 10, LVar3) + Sub(LVar3, 40) + Add(LVar0, LVar3) + Call(FlyPartTo, ACTOR_SELF, PRT_FEATHER_3, LVar0, 5, LVar2, 9, 0, EASING_LINEAR) + Call(SetAnimation, ACTOR_SELF, PRT_FEATHER_3, ANIM_Buzzar_Anim15) + EndThread + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Call(FlyPartTo, ACTOR_SELF, PRT_FEATHER_1, LVar0, 5, LVar2, 9, 0, EASING_LINEAR) + Call(SetAnimation, ACTOR_SELF, PRT_FEATHER_1, ANIM_Buzzar_Anim15) + Thread + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_FEATHER_1, ANIM_Buzzar_Anim14) + Call(SetAnimation, ACTOR_SELF, PRT_FEATHER_2, ANIM_Buzzar_Anim14) + Call(SetAnimation, ACTOR_SELF, PRT_FEATHER_3, ANIM_Buzzar_Anim14) + Wait(20) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FEATHER_1, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FEATHER_2, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FEATHER_3, ACTOR_PART_FLAG_INVISIBLE, TRUE) + EndThread + Wait(10) + Call(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_1, FALSE) + Wait(10) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + ExecWait(N(EVS_FlyToHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + CaseDefault + EndSwitch + Call(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_1, FALSE) + Call(SetGoalToTarget, ACTOR_SELF) + Thread + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RandInt, 10, LVar3) + Sub(LVar3, 10) + Add(LVar1, LVar3) + Call(FlyPartTo, ACTOR_SELF, PRT_FEATHER_2, LVar0, LVar1, LVar2, 6, 0, EASING_LINEAR) + EndThread + Thread + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RandInt, 10, LVar3) + Add(LVar3, 10) + Add(LVar1, LVar3) + Call(FlyPartTo, ACTOR_SELF, PRT_FEATHER_3, LVar0, LVar1, LVar2, 6, 0, EASING_LINEAR) + EndThread + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(FlyPartTo, ACTOR_SELF, PRT_FEATHER_1, LVar0, LVar1, LVar2, 6, 0, EASING_LINEAR) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_FEATHER, BS_FLAGS1_TRIGGER_EVENTS) + Set(LVarF, LVar0) + Switch(LVarF) + CaseDefault + Thread + Call(SetPartRotation, ACTOR_SELF, PRT_FEATHER_2, 0, 45, 90) + Call(GetPartOffset, ACTOR_SELF, PRT_FEATHER_2, LVar0, LVar1, LVar2) + Sub(LVar0, 40) + Set(LVar1, 2) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_FEATHER_2, Float(1.5)) + Call(JumpPartTo, ACTOR_SELF, PRT_FEATHER_2, LVar0, LVar1, LVar2, 10, TRUE) + Call(SetPartRotation, ACTOR_SELF, PRT_FEATHER_2, 0, 80, 90) + Wait(8) + Loop(15) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FEATHER_2, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FEATHER_2, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + EndLoop + EndThread + Thread + Call(SetPartRotation, ACTOR_SELF, PRT_FEATHER_3, 0, 45, -90) + Call(GetPartOffset, ACTOR_SELF, PRT_FEATHER_3, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Set(LVar1, 4) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_FEATHER_3, Float(1.5)) + Call(JumpPartTo, ACTOR_SELF, PRT_FEATHER_3, LVar0, LVar1, LVar2, 10, TRUE) + Call(SetPartRotation, ACTOR_SELF, PRT_FEATHER_3, 0, 90, -90) + Wait(8) + Loop(15) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FEATHER_3, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FEATHER_3, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + EndLoop + EndThread + Thread + Call(SetPartRotation, ACTOR_SELF, PRT_FEATHER_1, 0, 45, -90) + Call(GetPartOffset, ACTOR_SELF, PRT_FEATHER_1, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Set(LVar1, 4) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_FEATHER_1, Float(1.5)) + Call(JumpPartTo, ACTOR_SELF, PRT_FEATHER_1, LVar0, LVar1, LVar2, 10, TRUE) + Call(SetPartRotation, ACTOR_SELF, PRT_FEATHER_1, 0, 90, -90) + Wait(8) + Loop(15) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FEATHER_1, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FEATHER_1, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + EndLoop + EndThread + Wait(30) + Call(YieldTurn) + ExecWait(N(EVS_FlyToHome)) + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_LiftMario) = { - EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim01) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim02) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim0D) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim16) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim17) - EVT_LOOP(0) - EVT_CALL(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY_INCREMENT, -8, 0) - EVT_CHILD_THREAD - EVT_LOOP(0) - EVT_CALL(N(StartRumbleWithParams), 100, 10) - EVT_WAIT(10) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(0.1)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 180) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_PLAYER, 99, 0, EASING_LINEAR) - EVT_END_CHILD_THREAD - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.1)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 180) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_SELF, 99, 0, EASING_LINEAR) - EVT_RETURN - EVT_END + Call(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) + Switch(LVar0) + CaseOrEq(ANIM_Buzzar_Anim01) + CaseOrEq(ANIM_Buzzar_Anim02) + CaseOrEq(ANIM_Buzzar_Anim0D) + CaseOrEq(ANIM_Buzzar_Anim16) + CaseOrEq(ANIM_Buzzar_Anim17) + Loop(0) + Call(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + EndCaseGroup + EndSwitch + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY_INCREMENT, -8, 0) + ChildThread + Loop(0) + Call(N(StartRumbleWithParams), 100, 10) + Wait(10) + EndLoop + EndChildThread + ChildThread + Call(SetActorSpeed, ACTOR_PLAYER, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(0.1)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 180) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_PLAYER, 99, 0, EASING_LINEAR) + EndChildThread + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.1)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 180) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_SELF, 99, 0, EASING_LINEAR) + Return + End }; EvtScript N(EVS_Attack_GrappleDrop) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 240) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 45, 55, 0) - EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim01) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim02) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim0D) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim16) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim17) - EVT_LOOP(0) - EVT_CALL(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim02) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_COS_IN_OUT) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 4, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_66) - EVT_CALL(SetBattleCamZoom, 240) - EVT_CALL(SetBattleCamOffsetZ, -10) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_WINDUP) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_DIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -45, -20, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim18) - EVT_CALL(FlyToGoal, ACTOR_SELF, 12, -12, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim01) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_FlyToHome_GrappleFail)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_EQ(HIT_RESULT_IMMUNE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_66) - EVT_CALL(SetBattleCamZoom, 240) - EVT_CALL(SetBattleCamOffsetZ, -10) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_WINDUP) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_DIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -15, -10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim18) - EVT_CALL(FlyToGoal, ACTOR_SELF, 8, -5, EASING_LINEAR) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_DROP, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 40, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim01) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim02) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim0D) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim16) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim17) - EVT_LOOP(0) - EVT_CALL(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY_INCREMENT, -14, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim02) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 0, EASING_LINEAR) - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_EXEC_WAIT(N(EVS_FlyToHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_WAIT(10) - EVT_CALL(UseBattleCamPresetImmediately, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamZoom, 360) - EVT_CALL(MoveBattleCamOver, 30) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamZoom, 360) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 27) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(MoveBattleCamOver, 20) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_WINDUP) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_DIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -15, -10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim18) - EVT_CALL(FlyToGoal, ACTOR_SELF, 8, -5, EASING_LINEAR) - EVT_IF_EQ(LVarA, HIT_RESULT_HIT_STATIC) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_DROP, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_GRAB) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim16) - EVT_CALL(N(StartRumbleWithParams), 180, 20) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Flail) - EVT_CALL(ShowMessageBox, BTL_MSG_ACTION_TIP_BREAK_FREE, 90) - EVT_THREAD - EVT_LOOP(90) - EVT_CALL(SetMessageBoxDuration, 99) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetMessageBoxDuration, 0) - EVT_END_THREAD - EVT_WAIT(20) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_BREAK_FREE) - EVT_CALL(action_command_whirlwind_init) - EVT_CALL(SetupMashMeter, 1, 30, 0, 0, 0, 0) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim17) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_66) - EVT_CALL(SetBattleCamZoom, 240) - EVT_CALL(SetBattleCamOffsetZ, -10) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 60) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(action_command_break_free_start, 0, 60 * DT, 30, 3) - EVT_EXEC_GET_TID(N(EVS_LiftMario), LVarA) - EVT_WAIT(62) - EVT_CALL(GetActionSuccessCopy, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim01) - EVT_WAIT(2) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_Land) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.8)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(PlayerFallToGoal, 15) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_WAIT(8) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_EXEC_WAIT(N(EVS_FlyToHome_GrappleFail)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamZoom, 360) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 50) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(MoveBattleCamOver, 200) - EVT_WAIT(39) - EVT_WAIT(10) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_PanicRun, ANIM_Mario1_PanicRun, ANIM_Mario1_PanicRun) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.2)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(PlayerFallToGoal, 24) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_DROP, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SET(LVarF, LVar0) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim01) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim02) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim0D) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim16) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim17) - EVT_LOOP(0) - EVT_CALL(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY_INCREMENT, -14, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim02) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_EXEC_WAIT(N(EVS_FlyToHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 240) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 45, 55, 0) + Call(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) + Switch(LVar0) + CaseOrEq(ANIM_Buzzar_Anim01) + CaseOrEq(ANIM_Buzzar_Anim02) + CaseOrEq(ANIM_Buzzar_Anim0D) + CaseOrEq(ANIM_Buzzar_Anim16) + CaseOrEq(ANIM_Buzzar_Anim17) + Loop(0) + Call(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim02) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_COS_IN_OUT) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 4, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_66) + Call(SetBattleCamZoom, 240) + Call(SetBattleCamOffsetZ, -10) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_WINDUP) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_DIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -45, -20, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim18) + Call(FlyToGoal, ACTOR_SELF, 12, -12, EASING_LINEAR) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim01) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + ExecWait(N(EVS_FlyToHome_GrappleFail)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + CaseEq(HIT_RESULT_IMMUNE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_66) + Call(SetBattleCamZoom, 240) + Call(SetBattleCamOffsetZ, -10) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_WINDUP) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_DIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -15, -10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim18) + Call(FlyToGoal, ACTOR_SELF, 8, -5, EASING_LINEAR) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_DROP, BS_FLAGS1_TRIGGER_EVENTS) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 40, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) + Switch(LVar0) + CaseOrEq(ANIM_Buzzar_Anim01) + CaseOrEq(ANIM_Buzzar_Anim02) + CaseOrEq(ANIM_Buzzar_Anim0D) + CaseOrEq(ANIM_Buzzar_Anim16) + CaseOrEq(ANIM_Buzzar_Anim17) + Loop(0) + Call(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + EndCaseGroup + EndSwitch + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY_INCREMENT, -14, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim02) + Call(FlyToGoal, ACTOR_SELF, 0, 0, EASING_LINEAR) + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ExecWait(N(EVS_FlyToHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + CaseDefault + EndSwitch + Wait(10) + Call(UseBattleCamPresetImmediately, BTL_CAM_PRESET_19) + Call(SetBattleCamZoom, 360) + Call(MoveBattleCamOver, 30) + Thread + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamZoom, 360) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Set(LVar1, 27) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(MoveBattleCamOver, 20) + EndThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_WINDUP) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_DIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -15, -10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim18) + Call(FlyToGoal, ACTOR_SELF, 8, -5, EASING_LINEAR) + IfEq(LVarA, HIT_RESULT_HIT_STATIC) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_DROP, BS_FLAGS1_TRIGGER_EVENTS) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_GRAB) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim16) + Call(N(StartRumbleWithParams), 180, 20) + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Flail) + Call(ShowMessageBox, BTL_MSG_ACTION_TIP_BREAK_FREE, 90) + Thread + Loop(90) + Call(SetMessageBoxDuration, 99) + Wait(1) + EndLoop + Call(SetMessageBoxDuration, 0) + EndThread + Wait(20) + Call(LoadActionCommand, ACTION_COMMAND_BREAK_FREE) + Call(action_command_whirlwind_init) + Call(SetupMashMeter, 1, 30, 0, 0, 0, 0) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim17) + Call(UseBattleCamPreset, BTL_CAM_PRESET_66) + Call(SetBattleCamZoom, 240) + Call(SetBattleCamOffsetZ, -10) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 60) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + Call(ShowActionHud, TRUE) + Call(action_command_break_free_start, 0, 60 * DT, 30, 3) + ExecGetTID(N(EVS_LiftMario), LVarA) + Wait(62) + Call(GetActionSuccessCopy, LVar0) + IfGt(LVar0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim01) + Wait(2) + KillThread(LVarA) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_Land) + Call(SetActorSpeed, ACTOR_PLAYER, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.8)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(PlayerFallToGoal, 15) + Wait(8) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Wait(8) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ExecWait(N(EVS_FlyToHome_GrappleFail)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndIf + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamZoom, 360) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Set(LVar1, 50) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(MoveBattleCamOver, 200) + Wait(39) + Wait(10) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_PanicRun, ANIM_Mario1_PanicRun, ANIM_Mario1_PanicRun) + Call(SetActorSpeed, ACTOR_PLAYER, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.2)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(PlayerFallToGoal, 24) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_DROP, BS_FLAGS1_TRIGGER_EVENTS) + Set(LVarF, LVar0) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) + Switch(LVar0) + CaseOrEq(ANIM_Buzzar_Anim01) + CaseOrEq(ANIM_Buzzar_Anim02) + CaseOrEq(ANIM_Buzzar_Anim0D) + CaseOrEq(ANIM_Buzzar_Anim16) + CaseOrEq(ANIM_Buzzar_Anim17) + Loop(0) + Call(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + EndCaseGroup + EndSwitch + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY_INCREMENT, -14, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim02) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + ExecWait(N(EVS_FlyToHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_ClawSwipe) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 240) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 60, 15, 0) - EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim01) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim02) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim0D) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim16) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim17) - EVT_LOOP(0) - EVT_CALL(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim02) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -15, EASING_COS_IN_OUT) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_WINDUP) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_DIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -45, -20, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim18) - EVT_CALL(FlyToGoal, ACTOR_SELF, 12, -12, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim01) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_FlyToHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_WINDUP) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_DIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -5, -10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim18) - EVT_CALL(FlyToGoal, ACTOR_SELF, 8, 0, EASING_LINEAR) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SWIPE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SET(LVarF, LVar0) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim01) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim02) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim0D) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim16) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim17) - EVT_LOOP(0) - EVT_CALL(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY_INCREMENT, -14, 0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim02) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 0, EASING_LINEAR) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_EXEC_WAIT(N(EVS_FlyToHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 240) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 60, 15, 0) + Call(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) + Switch(LVar0) + CaseOrEq(ANIM_Buzzar_Anim01) + CaseOrEq(ANIM_Buzzar_Anim02) + CaseOrEq(ANIM_Buzzar_Anim0D) + CaseOrEq(ANIM_Buzzar_Anim16) + CaseOrEq(ANIM_Buzzar_Anim17) + Loop(0) + Call(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim02) + Call(FlyToGoal, ACTOR_SELF, 0, -15, EASING_COS_IN_OUT) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_WINDUP) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_DIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -45, -20, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim18) + Call(FlyToGoal, ACTOR_SELF, 12, -12, EASING_LINEAR) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim01) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + ExecWait(N(EVS_FlyToHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_WINDUP) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BUZZAR_DIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -5, -10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim18) + Call(FlyToGoal, ACTOR_SELF, 8, 0, EASING_LINEAR) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SWIPE, BS_FLAGS1_TRIGGER_EVENTS) + Set(LVarF, LVar0) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) + Switch(LVar0) + CaseOrEq(ANIM_Buzzar_Anim01) + CaseOrEq(ANIM_Buzzar_Anim02) + CaseOrEq(ANIM_Buzzar_Anim0D) + CaseOrEq(ANIM_Buzzar_Anim16) + CaseOrEq(ANIM_Buzzar_Anim17) + Loop(0) + Call(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + EndCaseGroup + EndSwitch + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY_INCREMENT, -14, 0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim02) + Call(FlyToGoal, ACTOR_SELF, 0, 0, EASING_LINEAR) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + ExecWait(N(EVS_FlyToHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_FlyToHome) = { - EVT_EXEC_WAIT(N(EVS_FlyToHome_Impl)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_FlyToHome_Impl)) + Return + End }; EvtScript N(EVS_FlyToHome_GrappleFail) = { - EVT_EXEC_WAIT(N(EVS_FlyToHome_GrappleFail_Impl)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_FlyToHome_GrappleFail_Impl)) + Return + End }; EvtScript N(EVS_FlyToHome_Impl) = { - EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim01) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim02) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim0D) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim16) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim17) - EVT_LOOP(0) - EVT_CALL(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 40) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim01) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY_INCREMENT, -20, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim01) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) + Switch(LVar0) + CaseOrEq(ANIM_Buzzar_Anim01) + CaseOrEq(ANIM_Buzzar_Anim02) + CaseOrEq(ANIM_Buzzar_Anim0D) + CaseOrEq(ANIM_Buzzar_Anim16) + CaseOrEq(ANIM_Buzzar_Anim17) + Loop(0) + Call(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + EndCaseGroup + EndSwitch + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 40) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim01) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY_INCREMENT, -20, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim01) + Call(HPBarToHome, ACTOR_SELF) + Return + End }; EvtScript N(EVS_FlyToHome_GrappleFail_Impl) = { - EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim01) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim02) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim0D) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim16) - EVT_CASE_OR_EQ(ANIM_Buzzar_Anim17) - EVT_LOOP(0) - EVT_CALL(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 40) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim01) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY_INCREMENT, -20, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 45, EASING_LINEAR) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim01) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) + Switch(LVar0) + CaseOrEq(ANIM_Buzzar_Anim01) + CaseOrEq(ANIM_Buzzar_Anim02) + CaseOrEq(ANIM_Buzzar_Anim0D) + CaseOrEq(ANIM_Buzzar_Anim16) + CaseOrEq(ANIM_Buzzar_Anim17) + Loop(0) + Call(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + EndCaseGroup + EndSwitch + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 40) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim01) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY_INCREMENT, -20, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_SELF, 0, 45, EASING_LINEAR) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Buzzar_Anim01) + Call(HPBarToHome, ACTOR_SELF) + Return + End }; EvtScript N(EVS_DummyHit) = { - EVT_RETURN - EVT_RETURN - EVT_END + Return + Return + End }; diff --git a/src/battle/area/kgr/actor/fuzzipede.c b/src/battle/area/kgr/actor/fuzzipede.c index b6ff586aa53..fcbcb3d67ad 100644 --- a/src/battle/area/kgr/actor/fuzzipede.c +++ b/src/battle/area/kgr/actor/fuzzipede.c @@ -146,568 +146,568 @@ ActorBlueprint NAMESPACE = { #include "common/battle/SetAbsoluteStatusOffsets.inc.c" EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_Floor_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CurrentHome, AVAL_Home_Crate) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Taunted, FALSE) - EVT_CALL(SetActorPos, ACTOR_SELF, 125, 33, -15) - EVT_CALL(SetHomePos, ACTOR_SELF, 125, 33, -15) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(SetDarknessMode, BTL_DARKNESS_MODE_1) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_Floor_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_CurrentHome, AVAL_Home_Crate) + Call(SetActorVar, ACTOR_SELF, AVAR_Taunted, FALSE) + Call(SetActorPos, ACTOR_SELF, 125, 33, -15) + Call(SetHomePos, ACTOR_SELF, 125, 33, -15) + Call(HPBarToHome, ACTOR_SELF) + Call(SetDarknessMode, BTL_DARKNESS_MODE_1) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Taunted, LVar0) - EVT_IF_FALSE(LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Taunted, TRUE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_08) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamZoom, 200) - EVT_CALL(SetBattleCamOffsetZ, 10) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_CALL(ActorSpeak, MSG_MAC_Port_009C, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim24, ANIM_Fuzzipede_Anim04) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_Taunted, LVar0) + IfFalse(LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_Taunted, TRUE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_08) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamZoom, 200) + Call(SetBattleCamOffsetZ, 10) + Call(MoveBattleCamOver, 30) + Wait(30) + Call(ActorSpeak, MSG_MAC_Port_009C, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim24, ANIM_Fuzzipede_Anim04) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Wait(30) + EndIf + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HopOntoCrate) = { - EVT_CALL(SetHomePos, ACTOR_SELF, 125, 33, -15) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim0A) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 60) - EVT_SET(LVar1, 0) - EVT_EXEC_WAIT(EVS_Enemy_HopToPos) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim04) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_Floor_HandleEvent))) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING | ACTOR_FLAG_UPSIDE_DOWN, FALSE) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 2, 24) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -2, -10) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_OFFSET, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_OFFSET, ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(SetHomePos, ACTOR_SELF, 125, 33, -15) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetActorSpeed, ACTOR_SELF, Float(7.0)) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim0A) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 60) + Set(LVar1, 0) + ExecWait(EVS_Enemy_HopToPos) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim04) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_Floor_HandleEvent))) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING | ACTOR_FLAG_UPSIDE_DOWN, FALSE) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 2, 24) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -2, -10) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_OFFSET, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_OFFSET, ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(HPBarToHome, ACTOR_SELF) + Return + End }; EvtScript N(EVS_HopToGround) = { - EVT_CALL(SetHomePos, ACTOR_SELF, 60, 0, 15) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim0A) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_EXEC_WAIT(EVS_Enemy_HopToPos) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_Floor_HandleEvent))) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING | ACTOR_FLAG_UPSIDE_DOWN, FALSE) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 2, 24) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -2, -10) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_OFFSET, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_OFFSET, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(SetHomePos, ACTOR_SELF, 60, 0, 15) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetActorSpeed, ACTOR_SELF, Float(7.0)) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim0A) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + ExecWait(EVS_Enemy_HopToPos) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_Floor_HandleEvent))) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING | ACTOR_FLAG_UPSIDE_DOWN, FALSE) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 2, 24) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -2, -10) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_OFFSET, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_OFFSET, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(HPBarToHome, ACTOR_SELF) + Return + End }; EvtScript N(EVS_ClimbOntoCeiling) = { - EVT_CALL(SetHomePos, ACTOR_SELF, 30, 115, -28) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim0A) - EVT_SET(LVar0, 65) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, -15) - EVT_EXEC_WAIT(EVS_Enemy_HopToPos) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_CALL(SetGoalPos, ACTOR_SELF, 125, 33, -15) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, 130, 100, -28) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_CALL(SetGoalPos, ACTOR_SELF, 110, 109, -28) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, 90, 117, -28) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, 70, 120, -28) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, 50, 125, -28) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, 30, 130, -28) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_LOOP(10) - EVT_ADDF(LVar1, EVT_FLOAT(-1.5)) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_SET(LVar0, 0) + Call(SetHomePos, ACTOR_SELF, 30, 115, -28) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetActorSpeed, ACTOR_SELF, Float(7.0)) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim0A) + Set(LVar0, 65) + Set(LVar1, 0) + Set(LVar2, -15) + ExecWait(EVS_Enemy_HopToPos) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Call(SetGoalPos, ACTOR_SELF, 125, 33, -15) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetGoalPos, ACTOR_SELF, 130, 100, -28) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Call(SetGoalPos, ACTOR_SELF, 110, 109, -28) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, 90, 117, -28) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, 70, 120, -28) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, 50, 125, -28) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, 30, 130, -28) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Loop(10) + AddF(LVar1, Float(-1.5)) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + Set(LVar0, 0) // flip over - EVT_LOOP(10) - EVT_ADD(LVar0, 18) - EVT_CALL(SetActorRotation, ACTOR_SELF, LVar0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(HangingAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim06) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_Ceiling_HandleEvent))) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, TRUE) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 2, 24) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 2, 8) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, -25, 10, -30) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_OFFSET, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_OFFSET, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_RETURN - EVT_END + Loop(10) + Add(LVar0, 18) + Call(SetActorRotation, ACTOR_SELF, LVar0, 0, 0) + Wait(1) + EndLoop + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(HangingAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim06) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_Ceiling_HandleEvent))) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, TRUE) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 2, 24) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 2, 8) + Call(N(SetAbsoluteStatusOffsets), -10, -25, 10, -30) + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_OFFSET, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_OFFSET, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(HPBarToHome, ACTOR_SELF) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(HideHealthBar, ACTOR_SELF) + Call(HideHealthBar, ACTOR_SELF) // advance to next home position - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CurrentHome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Home_Crate) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CurrentHome, AVAL_Home_Ceiling1) - EVT_CASE_EQ(AVAL_Home_Ceiling1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CurrentHome, AVAL_Home_Ceiling2) - EVT_CASE_EQ(AVAL_Home_Ceiling2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CurrentHome, AVAL_Home_Ground) - EVT_CASE_EQ(AVAL_Home_Ground) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CurrentHome, AVAL_Home_Ceiling3) - EVT_CASE_EQ(AVAL_Home_Ceiling3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CurrentHome, AVAL_Home_Crate) - EVT_END_SWITCH + Call(GetActorVar, ACTOR_SELF, AVAR_CurrentHome, LVar0) + Switch(LVar0) + CaseEq(AVAL_Home_Crate) + Call(SetActorVar, ACTOR_SELF, AVAR_CurrentHome, AVAL_Home_Ceiling1) + CaseEq(AVAL_Home_Ceiling1) + Call(SetActorVar, ACTOR_SELF, AVAR_CurrentHome, AVAL_Home_Ceiling2) + CaseEq(AVAL_Home_Ceiling2) + Call(SetActorVar, ACTOR_SELF, AVAR_CurrentHome, AVAL_Home_Ground) + CaseEq(AVAL_Home_Ground) + Call(SetActorVar, ACTOR_SELF, AVAR_CurrentHome, AVAL_Home_Ceiling3) + CaseEq(AVAL_Home_Ceiling3) + Call(SetActorVar, ACTOR_SELF, AVAR_CurrentHome, AVAL_Home_Crate) + EndSwitch // move to the current home - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CurrentHome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Home_Crate) - EVT_EXEC_WAIT(N(EVS_HopOntoCrate)) - EVT_CASE_OR_EQ(AVAL_Home_Ceiling1) - EVT_CASE_OR_EQ(AVAL_Home_Ceiling2) - EVT_CASE_OR_EQ(AVAL_Home_Ceiling3) - EVT_EXEC_WAIT(N(EVS_ClimbOntoCeiling)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(AVAL_Home_Ground) - EVT_EXEC_WAIT(N(EVS_HopToGround)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_CurrentHome, LVar0) + Switch(LVar0) + CaseEq(AVAL_Home_Crate) + ExecWait(N(EVS_HopOntoCrate)) + CaseOrEq(AVAL_Home_Ceiling1) + CaseOrEq(AVAL_Home_Ceiling2) + CaseOrEq(AVAL_Home_Ceiling3) + ExecWait(N(EVS_ClimbOntoCeiling)) + EndCaseGroup + CaseEq(AVAL_Home_Ground) + ExecWait(N(EVS_HopToGround)) + EndSwitch + Return + End }; EvtScript N(EVS_Floor_HandleEvent) = { - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim1B) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim1E) - EVT_SET_CONST(LVar2, ANIM_Fuzzipede_Anim1F) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim1E) - EVT_SET_CONST(LVar2, ANIM_Fuzzipede_Anim1F) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim1F) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim1B) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim1B) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim1B) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim1B) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim1B) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim1B) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim1B) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim1B) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_RECEIVE_BUFF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim19) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_01) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzipede_Anim1B) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzipede_Anim1E) + SetConst(LVar2, ANIM_Fuzzipede_Anim1F) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzipede_Anim1E) + SetConst(LVar2, ANIM_Fuzzipede_Anim1F) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzipede_Anim1F) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzipede_Anim1B) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzipede_Anim1B) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzipede_Anim1B) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzipede_Anim1B) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzipede_Anim08) + ExecWait(EVS_Enemy_Knockback) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzipede_Anim1B) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzipede_Anim1B) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzipede_Anim04) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzipede_Anim1B) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzipede_Anim1B) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + Call(SetActorYaw, ACTOR_SELF, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzipede_Anim04) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_RECEIVE_BUFF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim19) + Call(UseBattleCamPreset, BTL_CAM_PRESET_01) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_CeilingHit) = { - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar0) - EVT_IF_LE(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_EXEC_WAIT(N(EVS_LeaveHome)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_Floor_HandleEvent))) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING | ACTOR_FLAG_UPSIDE_DOWN, FALSE) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 2, 24) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -2, -10) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CurrentHome, AVAL_Home_Ground) - EVT_CALL(HPBarToCurrent, ACTOR_SELF) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_ClimbOntoCeiling)) - EVT_WAIT(20) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetLastDamage, ACTOR_SELF, LVar0) + IfLe(LVar0, 0) + Return + EndIf + Call(HideHealthBar, ACTOR_SELF) + ExecWait(N(EVS_LeaveHome)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_Floor_HandleEvent))) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING | ACTOR_FLAG_UPSIDE_DOWN, FALSE) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 2, 24) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -2, -10) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAGS_IMMOBILIZED) + Call(SetActorVar, ACTOR_SELF, AVAR_CurrentHome, AVAL_Home_Ground) + Call(HPBarToCurrent, ACTOR_SELF) + Else + ExecWait(N(EVS_ClimbOntoCeiling)) + Wait(20) + EndIf + Return + End }; EvtScript N(EVS_Ceiling_HandleEvent) = { - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim1C) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim1C) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_CeilingHit)) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim20) - EVT_SET_CONST(LVar2, ANIM_Fuzzipede_Anim21) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_CeilingHit)) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim20) - EVT_SET_CONST(LVar2, ANIM_Fuzzipede_Anim21) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim21) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim1B) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim1B) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim1B) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim1C) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzipede_Anim1C) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzipede_Anim1C) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzipede_Anim1C) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_CeilingHit)) + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzipede_Anim20) + SetConst(LVar2, ANIM_Fuzzipede_Anim21) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_CeilingHit)) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzipede_Anim20) + SetConst(LVar2, ANIM_Fuzzipede_Anim21) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzipede_Anim21) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzipede_Anim1B) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzipede_Anim08) + ExecWait(EVS_Enemy_Knockback) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzipede_Anim1B) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzipede_Anim1B) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzipede_Anim06) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzipede_Anim1C) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzipede_Anim1C) + ExecWait(EVS_Enemy_Death) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_LeaveHome) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CurrentHome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Home_Crate) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 60) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CASE_EQ(AVAL_Home_Ground) + Call(GetActorVar, ACTOR_SELF, AVAR_CurrentHome, LVar0) + Switch(LVar0) + CaseEq(AVAL_Home_Crate) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 60) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + CaseEq(AVAL_Home_Ground) // do nothing - EVT_CASE_OR_EQ(AVAL_Home_Ceiling1) - EVT_CASE_OR_EQ(AVAL_Home_Ceiling2) - EVT_CASE_OR_EQ(AVAL_Home_Ceiling3) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING | ACTOR_FLAG_UPSIDE_DOWN, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim04) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 180) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.002)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SET(LVar1, 11) - EVT_ELSE - EVT_SET(LVar1, 28) - EVT_END_IF - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_THREAD - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0) - EVT_SET(LVar0, 180) - EVT_LOOP(8) - EVT_SUB(LVar0, 22) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + CaseOrEq(AVAL_Home_Ceiling1) + CaseOrEq(AVAL_Home_Ceiling2) + CaseOrEq(AVAL_Home_Ceiling3) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING | ACTOR_FLAG_UPSIDE_DOWN, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim04) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 180) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.002)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Set(LVar1, 11) + Else + Set(LVar1, 28) + EndIf + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0)) + Wait(1) + Thread + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + EndThread + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0) + Set(LVar0, 180) + Loop(8) + Sub(LVar0, 22) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_Attack_Leap) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_EXEC_WAIT(N(EVS_LeaveHome)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim0A) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_EXEC_WAIT(EVS_Enemy_HopToPos) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim12) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FUZZIPEDE_LEAP) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim05) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0) - EVT_LOOP(20) - EVT_ADD(LVar0, 9) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -20, 0, 5) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, -5, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarF, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim04) - EVT_END_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim05) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0) - EVT_LOOP(20) - EVT_ADD(LVar0, 9) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, DMG_LEAP, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim04) - EVT_THREAD - EVT_SET(LVar0, 180) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0) - EVT_LOOP(10) - EVT_SUB(LVar0, 18) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_WAIT(8) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + ExecWait(N(EVS_LeaveHome)) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim0A) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Set(LVar1, 0) + ExecWait(EVS_Enemy_HopToPos) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim12) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FUZZIPEDE_LEAP) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(EnemyTestTarget, ACTOR_SELF, LVarF, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarF) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim05) + Thread + Set(LVar0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0) + Loop(20) + Add(LVar0, 9) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -20, 0, 5) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, -5, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + IfEq(LVarF, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(30) + Call(ResetAllActorSounds, ACTOR_SELF) + Thread + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim04) + EndThread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + ExecWait(N(EVS_ReturnHome)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim05) + Thread + Set(LVar0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0) + Loop(20) + Add(LVar0, 9) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.4)) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0)) + Wait(1) + Call(ResetAllActorSounds, ACTOR_SELF) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, DMG_LEAP, BS_FLAGS1_TRIGGER_EVENTS) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim04) + Thread + Set(LVar0, 180) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0) + Loop(10) + Sub(LVar0, 18) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 10) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Wait(8) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/ItemEntityJumpToPos.inc.c" @@ -716,286 +716,286 @@ EvtScript N(EVS_Attack_Leap) = { #include "common/battle/CheckPlayerCanLoseCommand.inc.c" EvtScript N(EVS_ManageCommandLoss) = { - EVT_LABEL(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CommandLossState, LVarA) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(AVAL_LossState_Idle) + Label(0) + Call(GetActorVar, ACTOR_SELF, AVAR_CommandLossState, LVarA) + Switch(LVarA) + CaseEq(AVAL_LossState_Idle) // do nothing - EVT_CASE_EQ(AVAL_LossState_KnockAway) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar1, LVar2, LVar3) - EVT_SET(LVar2, 0) - EVT_SUB(LVar3, 1) - EVT_CALL(N(DisableRandomAbility), LVar4, LVar5) - EVT_CALL(MakeItemEntity, LVar4, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_ADD(LVar1, 30) - EVT_CALL(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 20, EVT_FLOAT(1.0)) - EVT_ADD(LVar1, 20) - EVT_CALL(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 10, EVT_FLOAT(1.0)) - EVT_ADD(LVar1, 10) - EVT_CALL(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 5, EVT_FLOAT(1.0)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_Idle) - EVT_CASE_EQ(AVAL_LossState_ShowMessage) - EVT_CALL(ShowMessageBox, LVar5, 60) - EVT_SUB(LVar1, 150) - EVT_CALL(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 30, EVT_FLOAT(1.0)) - EVT_CALL(RemoveItemEntity, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_Done) - EVT_RETURN - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + CaseEq(AVAL_LossState_KnockAway) + Call(GetActorPos, ACTOR_PLAYER, LVar1, LVar2, LVar3) + Set(LVar2, 0) + Sub(LVar3, 1) + Call(N(DisableRandomAbility), LVar4, LVar5) + Call(MakeItemEntity, LVar4, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_DECORATION, 0) + Add(LVar1, 30) + Call(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 20, Float(1.0)) + Add(LVar1, 20) + Call(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 10, Float(1.0)) + Add(LVar1, 10) + Call(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 5, Float(1.0)) + Call(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_Idle) + CaseEq(AVAL_LossState_ShowMessage) + Call(ShowMessageBox, LVar5, 60) + Sub(LVar1, 150) + Call(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 30, Float(1.0)) + Call(RemoveItemEntity, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_Done) + Return + EndSwitch + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_Attack_DisableTackle) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_EXEC_WAIT(N(EVS_LeaveHome)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim0A) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 80) - EVT_SET(LVar1, 0) - EVT_EXEC_WAIT(EVS_Enemy_HopToPos) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim12) - EVT_WAIT(30) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FUZZIPEDE_STRIKE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim11) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.002)) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarF, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim04) - EVT_THREAD - EVT_SET(LVar0, 90) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0) - EVT_LOOP(6) - EVT_ADD(LVar0, 15) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_SUB(LVar0, 30) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.3)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_SET(LVar0, 180) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0) - EVT_LOOP(7) - EVT_ADD(LVar0, 25) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_SUB(LVar0, 20) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 7, FALSE, TRUE, FALSE) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim11) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.002)) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 1) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, DMG_DISABLE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_THREAD - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_ATK_BLOCKED) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_CALL(GetLastDamage, ACTOR_PLAYER, LVar0) - EVT_IF_LE(LVar0, 0) - EVT_SET(LFlag0, FALSE) - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_SET(LFlag0, FALSE) - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_STONE | STATUS_FLAG_RIGHT_ON) - EVT_SET(LFlag0, FALSE) - EVT_END_IF - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_KnockAway) - EVT_EXEC(N(EVS_ManageCommandLoss)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim04) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim04) - EVT_WAIT(8) - EVT_LABEL(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CommandLossState, LVar0) - EVT_IF_NE(LVar0, AVAL_LossState_Idle) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_LOOP(3) - EVT_SUB(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_END_LOOP - EVT_WAIT(10) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_ShowMessage) - EVT_PLAY_EFFECT(EFFECT_FIREWORK, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 0, 0) - EVT_CALL(N(StartRumbleWithParams), 200, 10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_COMMAND_LOSS) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim13) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim04) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim04) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim04) - EVT_WAIT(8) - EVT_WAIT(10) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + ExecWait(N(EVS_LeaveHome)) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim0A) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 80) + Set(LVar1, 0) + ExecWait(EVS_Enemy_HopToPos) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim12) + Wait(30) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FUZZIPEDE_STRIKE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(EnemyTestTarget, ACTOR_SELF, LVarF, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarF) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim11) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.002)) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + IfEq(LVarF, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim04) + Thread + Set(LVar0, 90) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0) + Loop(6) + Add(LVar0, 15) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Sub(LVar0, 30) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.3)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Thread + Set(LVar0, 180) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0) + Loop(7) + Add(LVar0, 25) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Sub(LVar0, 20) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 7, FALSE, TRUE, FALSE) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + ExecWait(N(EVS_ReturnHome)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim11) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.002)) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar2, 1) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0)) + Wait(1) + Call(ResetAllActorSounds, ACTOR_SELF) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, DMG_DISABLE, BS_FLAGS1_TRIGGER_EVENTS) + Thread + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + EndThread + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Set(LFlag0, FALSE) + Call(GetBattleFlags, LVar0) + IfNotFlag(LVar0, BS_FLAGS1_ATK_BLOCKED) + Set(LFlag0, TRUE) + EndIf + Call(GetLastDamage, ACTOR_PLAYER, LVar0) + IfLe(LVar0, 0) + Set(LFlag0, FALSE) + EndIf + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Set(LFlag0, FALSE) + EndIf + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfFlag(LVar0, STATUS_FLAG_STONE | STATUS_FLAG_RIGHT_ON) + Set(LFlag0, FALSE) + EndIf + IfEq(LFlag0, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_KnockAway) + Exec(N(EVS_ManageCommandLoss)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim04) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Add(LVar0, 10) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim04) + Wait(8) + Label(0) + Call(GetActorVar, ACTOR_SELF, AVAR_CommandLossState, LVar0) + IfNe(LVar0, AVAL_LossState_Idle) + Wait(1) + Goto(0) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Loop(3) + Sub(LVar0, 10) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + EndLoop + Wait(10) + Call(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_ShowMessage) + PlayEffect(EFFECT_FIREWORK, 0, LVar0, LVar1, LVar2, Float(1.0), 0, 0) + Call(N(StartRumbleWithParams), 200, 10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_COMMAND_LOSS) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim13) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim04) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim04) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Add(LVar0, 10) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim04) + Wait(8) + Wait(10) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Recover) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim12) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim04) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) - EVT_WAIT(30) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_STAR_BOUNCE_A) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(HealActor, ACTOR_SELF, HEAL_AMT, FALSE) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_CALL(WaitForBuffDone) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim12) + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzipede_Anim04) + Thread + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) + Wait(30) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_STAR_BOUNCE_A) + EndThread + Thread + Call(FreezeBattleState, TRUE) + Call(HealActor, ACTOR_SELF, HEAL_AMT, FALSE) + Call(FreezeBattleState, FALSE) + EndThread + Call(WaitForBuffDone) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CurrentHome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_Home_Crate) - EVT_CASE_OR_EQ(AVAL_Home_Ground) + Call(GetActorVar, ACTOR_SELF, AVAR_CurrentHome, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_Home_Crate) + CaseOrEq(AVAL_Home_Ground) // 50% chance to heal when HP < 35% - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar1) - EVT_MUL(LVar0, 100) - EVT_DIV(LVar0, LVar1) - EVT_IF_LE(LVar0, 35) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 500) - EVT_EXEC_WAIT(N(EVS_Recover)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH + Call(GetActorHP, ACTOR_SELF, LVar0) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar1) + Mul(LVar0, 100) + Div(LVar0, LVar1) + IfLe(LVar0, 35) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 500) + ExecWait(N(EVS_Recover)) + Return + EndIf + EndIf + EndCaseGroup + EndSwitch // 50% chance to try disabling a command, if possible - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 500) - EVT_EXEC_WAIT(N(EVS_Attack_Leap)) - EVT_ELSE - EVT_CALL(N(CheckPlayerCanLoseCommand), LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_Attack_DisableTackle)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_Leap)) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 500) + ExecWait(N(EVS_Attack_Leap)) + Else + Call(N(CheckPlayerCanLoseCommand), LVar0) + IfEq(LVar0, 0) + ExecWait(N(EVS_Attack_DisableTackle)) + Else + ExecWait(N(EVS_Attack_Leap)) + EndIf + EndIf + Return + End }; diff --git a/src/battle/area/kkj/actor/kammy_koopa.c b/src/battle/area/kkj/actor/kammy_koopa.c index 9e23daa3ade..fe47a72677c 100644 --- a/src/battle/area/kkj/actor/kammy_koopa.c +++ b/src/battle/area/kkj/actor/kammy_koopa.c @@ -119,15 +119,15 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetBattleFlagBits2, BS_FLAGS2_DONT_STOP_MUSIC, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_PlayerTurnCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Speaking, FALSE) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetBattleFlagBits2, BS_FLAGS2_DONT_STOP_MUSIC, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_PlayerTurnCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Speaking, FALSE) + Return + End }; s32 N(BobPhase) = 0; @@ -143,45 +143,45 @@ API_CALLABLE(N(AddFlightBobbing)) { } EvtScript N(EVS_Idle) = { - EVT_LOOP(0) - EVT_CALL(N(AddFlightBobbing)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(N(AddFlightBobbing)) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKammy_Anim0D) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_CommentOnHit)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKammy_Anim05) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_EXEC_WAIT(N(EVS_CommentOnHit)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKammy_Anim0D) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKammy_Anim0D) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_CommentOnHit)) + EndCaseGroup + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKammy_Anim05) + ExecWait(EVS_Enemy_NoDamageHit) + ExecWait(N(EVS_CommentOnHit)) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKammy_Anim0D) + ExecWait(EVS_Enemy_Hit) + Wait(10) + ExecWait(N(EVS_Death)) + Return + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "world/common/todo/SetEntityPositionF.inc.c" @@ -263,279 +263,279 @@ API_CALLABLE(N(DropBlock)) { } EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKammy_Anim07) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_KAMMY_SUMMON_MAGIC) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 25) - EVT_ADD(LVar1, 40) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, 1, 100, 0) - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 80, 95, 15) - EVT_CALL(SetBattleCamZoom, 340) - EVT_CALL(MoveBattleCamOver, 60) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_KAMMY_SUMMON_BLOCK) - EVT_SUB(LVar0, 15) - EVT_ADD(LVar1, 30) - EVT_SET(LVar3, LVar1) - EVT_ADD(LVar3, 20) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar3, LVar2, EVT_FLOAT(1.0), 60, 0) - EVT_WAIT(20) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar3, LVar2, EVT_FLOAT(1.0), 60, 0) - EVT_WAIT(10) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar3, LVar2, EVT_FLOAT(1.0), 60, 0) - EVT_WAIT(5) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar3, LVar2, EVT_FLOAT(1.0), 60, 0) - EVT_WAIT(3) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar3, LVar2, EVT_FLOAT(1.0), 60, 0) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer1Block), LVar0, LVar1, LVar2, 0, MAKE_ENTITY_END) - EVT_SET(LVar9, LVar0) - EVT_CALL(N(BlockAppear)) - EVT_THREAD - EVT_CALL(N(FadeInScreenBlur)) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_KAMMY_RAISE_OBJECT) - EVT_CALL(N(GetEntityPosition), LVar9, LVar2, LVar3, LVar4) - EVT_CALL(MakeLerp, LVar3, 300, 20, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetEntityPositionF), LVar9, LVar2, LVar0, LVar4) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKammy_Anim08) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, -80, 37, 5) - EVT_CALL(SetBattleCamZoom, 256) - EVT_CALL(MoveBattleCamOver, 1) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CHILD_THREAD - EVT_WAIT(10) - EVT_CALL(AddBattleCamZoom, 100) - EVT_CALL(MoveBattleCamOver, 10) - EVT_WAIT(5) - EVT_CALL(N(FadeOutScreenBlur)) - EVT_END_CHILD_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_KAMMY_LOWER_OBJECT) - EVT_SET(LVar5, LVar1) - EVT_ADD(LVar5, 200) - EVT_CALL(N(SetEntityPositionF), LVar9, LVar0, LVar5, LVar2) - EVT_CALL(N(GetEntityPosition), LVar9, LVar2, LVar3, LVar4) - EVT_CALL(MakeLerp, LVar5, LVar1, 20, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetEntityPositionF), LVar9, LVar2, LVar0, LVar4) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(N(DropBlock)) - EVT_CHILD_THREAD - EVT_CALL(StartRumble, BTL_RUMBLE_HIT_EXTREME) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(6.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(5.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(4.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.2)) - EVT_END_CHILD_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKammy_Anim05) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_BLOCK_DROP, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SET(LVarF, LVar0) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_WAIT(19) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetLastDamage, ACTOR_PARTNER, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 69, 14, -18) - EVT_CALL(SetBattleCamZoom, 340) - EVT_CALL(SetBattleCamOffsetZ, 62) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(FreezeBattleCam, TRUE) - EVT_WAIT(20) - EVT_THREAD - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 10, 5, 0) - EVT_CALL(FlyToGoal, ACTOR_SELF, 6, 0, EASING_LINEAR) - EVT_END_THREAD - EVT_CALL(ActorSpeak, MSG_CH8_009A, ACTOR_SELF, PRT_MAIN, ANIM_BattleKammy_Anim06, ANIM_BattleKammy_Anim05) - EVT_WAIT(10) - EVT_CALL(FreezeBattleCam, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKammy_Anim07) + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_KAMMY_SUMMON_MAGIC) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 25) + Add(LVar1, 40) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, 1, 100, 0) + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 80, 95, 15) + Call(SetBattleCamZoom, 340) + Call(MoveBattleCamOver, 60) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_KAMMY_SUMMON_BLOCK) + Sub(LVar0, 15) + Add(LVar1, 30) + Set(LVar3, LVar1) + Add(LVar3, 20) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar3, LVar2, Float(1.0), 60, 0) + Wait(20) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar3, LVar2, Float(1.0), 60, 0) + Wait(10) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar3, LVar2, Float(1.0), 60, 0) + Wait(5) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar3, LVar2, Float(1.0), 60, 0) + Wait(3) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar3, LVar2, Float(1.0), 60, 0) + Call(MakeEntity, Ref(Entity_Hammer1Block), LVar0, LVar1, LVar2, 0, MAKE_ENTITY_END) + Set(LVar9, LVar0) + Call(N(BlockAppear)) + Thread + Call(N(FadeInScreenBlur)) + EndThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_KAMMY_RAISE_OBJECT) + Call(N(GetEntityPosition), LVar9, LVar2, LVar3, LVar4) + Call(MakeLerp, LVar3, 300, 20, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(N(SetEntityPositionF), LVar9, LVar2, LVar0, LVar4) + Wait(1) + IfNe(LVar1, 1) + BreakLoop + EndIf + EndLoop + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKammy_Anim08) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, -80, 37, 5) + Call(SetBattleCamZoom, 256) + Call(MoveBattleCamOver, 1) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + ChildThread + Wait(10) + Call(AddBattleCamZoom, 100) + Call(MoveBattleCamOver, 10) + Wait(5) + Call(N(FadeOutScreenBlur)) + EndChildThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_KAMMY_LOWER_OBJECT) + Set(LVar5, LVar1) + Add(LVar5, 200) + Call(N(SetEntityPositionF), LVar9, LVar0, LVar5, LVar2) + Call(N(GetEntityPosition), LVar9, LVar2, LVar3, LVar4) + Call(MakeLerp, LVar5, LVar1, 20, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(N(SetEntityPositionF), LVar9, LVar2, LVar0, LVar4) + Wait(1) + IfNe(LVar1, 1) + BreakLoop + EndIf + EndLoop + Call(N(DropBlock)) + ChildThread + Call(StartRumble, BTL_RUMBLE_HIT_EXTREME) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(6.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(5.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(4.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2)) + EndChildThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKammy_Anim05) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_BLOCK_DROP, BS_FLAGS1_TRIGGER_EVENTS) + Set(LVarF, LVar0) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Wait(19) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + EndCaseGroup + EndSwitch + Call(GetLastDamage, ACTOR_PARTNER, LVar0) + IfEq(LVar0, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 69, 14, -18) + Call(SetBattleCamZoom, 340) + Call(SetBattleCamOffsetZ, 62) + Call(MoveBattleCamOver, 20) + Call(FreezeBattleCam, TRUE) + Wait(20) + Thread + Call(SetGoalToHome, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 10, 5, 0) + Call(FlyToGoal, ACTOR_SELF, 6, 0, EASING_LINEAR) + EndThread + Call(ActorSpeak, MSG_CH8_009A, ACTOR_SELF, PRT_MAIN, ANIM_BattleKammy_Anim06, ANIM_BattleKammy_Anim05) + Wait(10) + Call(FreezeBattleCam, FALSE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + EndIf + Wait(10) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PlayerTurnCount, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 69, 14, -18) - EVT_CALL(SetBattleCamZoom, 340) - EVT_CALL(SetBattleCamOffsetZ, 62) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(ActorSpeak, MSG_CH8_0093, ACTOR_SELF, PRT_MAIN, ANIM_BattleKammy_Anim06, ANIM_BattleKammy_Anim05) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, -56, -9, -18) - EVT_CALL(SetBattleCamZoom, 340) - EVT_CALL(SetBattleCamOffsetZ, 62) - EVT_CALL(MoveBattleCamOver, 1) - EVT_WAIT(10) - EVT_CALL(ActorSpeak, MSG_CH8_0094, ACTOR_PARTNER, 1, ANIM_Twink_ShoutAngry, ANIM_Twink_Angry) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, -66, -9, -18) - EVT_CALL(SetBattleCamZoom, 340) - EVT_CALL(SetBattleCamOffsetZ, 62) - EVT_CALL(MoveBattleCamOver, 10) - EVT_WAIT(10) - EVT_CALL(ActorSpeak, MSG_CH8_0095, ACTOR_PLAYER, 1, ANIM_BattleParakarry_EnterShell, ANIM_BattleParakarry_ShellFly) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_PlayerTurnCount, 1) - EVT_END_SWITCH - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) + Call(GetActorVar, ACTOR_SELF, AVAR_PlayerTurnCount, LVar0) + Switch(LVar0) + CaseEq(0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 69, 14, -18) + Call(SetBattleCamZoom, 340) + Call(SetBattleCamOffsetZ, 62) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(ActorSpeak, MSG_CH8_0093, ACTOR_SELF, PRT_MAIN, ANIM_BattleKammy_Anim06, ANIM_BattleKammy_Anim05) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, -56, -9, -18) + Call(SetBattleCamZoom, 340) + Call(SetBattleCamOffsetZ, 62) + Call(MoveBattleCamOver, 1) + Wait(10) + Call(ActorSpeak, MSG_CH8_0094, ACTOR_PARTNER, 1, ANIM_Twink_ShoutAngry, ANIM_Twink_Angry) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, -66, -9, -18) + Call(SetBattleCamZoom, 340) + Call(SetBattleCamOffsetZ, 62) + Call(MoveBattleCamOver, 10) + Wait(10) + Call(ActorSpeak, MSG_CH8_0095, ACTOR_PLAYER, 1, ANIM_BattleParakarry_EnterShell, ANIM_BattleParakarry_ShellFly) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(AddActorVar, ACTOR_SELF, AVAR_PlayerTurnCount, 1) + EndSwitch + CaseEq(PHASE_ENEMY_BEGIN) // do nothing - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_CommentOnHit) = { - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Speaking, TRUE) - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 69, 14, -18) - EVT_CALL(SetBattleCamZoom, 340) - EVT_CALL(SetBattleCamOffsetZ, 62) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(FreezeBattleCam, TRUE) - EVT_WAIT(20) - EVT_CALL(ActorSpeak, MSG_CH8_0097, ACTOR_SELF, PRT_MAIN, ANIM_BattleKammy_Anim09, ANIM_BattleKammy_Anim05) - EVT_WAIT(10) - EVT_CALL(FreezeBattleCam, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CASE_OR_EQ(9) - EVT_CASE_OR_EQ(8) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 69, 14, -18) - EVT_CALL(SetBattleCamZoom, 340) - EVT_CALL(SetBattleCamOffsetZ, 62) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(FreezeBattleCam, TRUE) - EVT_WAIT(20) - EVT_CALL(ActorSpeak, MSG_CH8_0098, ACTOR_SELF, PRT_MAIN, ANIM_BattleKammy_Anim0A, ANIM_BattleKammy_Anim05) - EVT_WAIT(10) - EVT_CALL(FreezeBattleCam, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(7) - EVT_CASE_OR_EQ(6) - EVT_CASE_OR_EQ(5) - EVT_CASE_OR_EQ(4) - EVT_CASE_OR_EQ(3) - EVT_CASE_OR_EQ(2) - EVT_CASE_OR_EQ(1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PlayerTurnCount, LVar0) - EVT_IF_EQ(LVar0, 2) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 69, 14, -18) - EVT_CALL(SetBattleCamZoom, 340) - EVT_CALL(SetBattleCamOffsetZ, 62) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(FreezeBattleCam, TRUE) - EVT_WAIT(20) - EVT_CALL(ActorSpeak, MSG_CH8_0099, ACTOR_SELF, PRT_MAIN, ANIM_BattleKammy_Anim06, ANIM_BattleKammy_Anim05) - EVT_WAIT(10) - EVT_CALL(FreezeBattleCam, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_PlayerTurnCount, 1) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Speaking, FALSE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_CALL(FreezeBattleState, FALSE) - EVT_RETURN - EVT_END + Call(FreezeBattleState, TRUE) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_Speaking, TRUE) + Call(GetActorHP, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 69, 14, -18) + Call(SetBattleCamZoom, 340) + Call(SetBattleCamOffsetZ, 62) + Call(MoveBattleCamOver, 20) + Call(FreezeBattleCam, TRUE) + Wait(20) + Call(ActorSpeak, MSG_CH8_0097, ACTOR_SELF, PRT_MAIN, ANIM_BattleKammy_Anim09, ANIM_BattleKammy_Anim05) + Wait(10) + Call(FreezeBattleCam, FALSE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + CaseOrEq(9) + CaseOrEq(8) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 69, 14, -18) + Call(SetBattleCamZoom, 340) + Call(SetBattleCamOffsetZ, 62) + Call(MoveBattleCamOver, 20) + Call(FreezeBattleCam, TRUE) + Wait(20) + Call(ActorSpeak, MSG_CH8_0098, ACTOR_SELF, PRT_MAIN, ANIM_BattleKammy_Anim0A, ANIM_BattleKammy_Anim05) + Wait(10) + Call(FreezeBattleCam, FALSE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + EndCaseGroup + CaseOrEq(7) + CaseOrEq(6) + CaseOrEq(5) + CaseOrEq(4) + CaseOrEq(3) + CaseOrEq(2) + CaseOrEq(1) + Call(GetActorVar, ACTOR_SELF, AVAR_PlayerTurnCount, LVar0) + IfEq(LVar0, 2) + BreakSwitch + EndIf + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 69, 14, -18) + Call(SetBattleCamZoom, 340) + Call(SetBattleCamOffsetZ, 62) + Call(MoveBattleCamOver, 20) + Call(FreezeBattleCam, TRUE) + Wait(20) + Call(ActorSpeak, MSG_CH8_0099, ACTOR_SELF, PRT_MAIN, ANIM_BattleKammy_Anim06, ANIM_BattleKammy_Anim05) + Wait(10) + Call(FreezeBattleCam, FALSE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(AddActorVar, ACTOR_SELF, AVAR_PlayerTurnCount, 1) + EndCaseGroup + EndSwitch + Call(SetActorVar, ACTOR_SELF, AVAR_Speaking, FALSE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Call(FreezeBattleState, FALSE) + Return + End }; EvtScript N(EVS_Death) = { - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 60) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKammy_Anim02) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 1) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_BROOM, LVar0, LVar1, LVar2) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_COLLAPSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_01) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_KNOCKOUT_CHIRPING) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SEEING_STARS) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKammy_Anim03) - EVT_WAIT(50) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_DISABLE_CELEBRATION | BS_FLAGS1_BATTLE_FLED, TRUE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_CALL(ActorSpeak, MSG_CH8_009B, ACTOR_SELF, PRT_MAIN, ANIM_BattleKammy_Anim03, ANIM_BattleKammy_Anim03) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 60) - EVT_WAIT(40) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_PLAYER_IN_BACK, FALSE) - EVT_RETURN - EVT_END + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(HideHealthBar, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 60) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKammy_Anim02) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar2, 1) + Call(SetPartPos, ACTOR_SELF, PRT_BROOM, LVar0, LVar1, LVar2) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_COLLAPSE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_01) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_KNOCKOUT_CHIRPING) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SEEING_STARS) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKammy_Anim03) + Wait(50) + Call(SetBattleFlagBits, BS_FLAGS1_DISABLE_CELEBRATION | BS_FLAGS1_BATTLE_FLED, TRUE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Call(ActorSpeak, MSG_CH8_009B, ACTOR_SELF, PRT_MAIN, ANIM_BattleKammy_Anim03, ANIM_BattleKammy_Anim03) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 60) + Wait(40) + Call(SetBattleFlagBits, BS_FLAGS1_PLAYER_IN_BACK, FALSE) + Return + End }; diff --git a/src/battle/area/kmr_part_2/actor/blue_goomba_1.c b/src/battle/area/kmr_part_2/actor/blue_goomba_1.c index 1a60db6450d..2c232da0960 100644 --- a/src/battle/area/kmr_part_2/actor/blue_goomba_1.c +++ b/src/battle/area/kmr_part_2/actor/blue_goomba_1.c @@ -122,424 +122,424 @@ s32 N(ShuffleAnims)[] = { }; EvtScript N(EVS_Init_Inner) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn_Inner))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn_Inner))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(10) - EVT_CALL(RandInt, 80, LVar0) - EVT_ADD(LVar0, 80) - EVT_LOOP(LVar0) - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_LOOP(20) - EVT_LABEL(1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_LOOP(80) - EVT_LABEL(2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(10) - EVT_RETURN - EVT_END + Label(10) + Call(RandInt, 80, LVar0) + Add(LVar0, 80) + Loop(LVar0) + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(0) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Loop(20) + Label(1) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(1) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Loop(80) + Label(2) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(2) + EndIf + Wait(1) + EndLoop + Goto(10) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_GoombaBros_Blue_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_GoombaBros_Blue_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_BurnStill) - EVT_EXEC_WAIT(N(EVS_GoombaBros_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt) - EVT_EXEC_WAIT(N(EVS_GoombaBros_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Dizzy) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Idle) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt) - EVT_EXEC_WAIT(N(EVS_GoombaBros_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_STAR_BEAM) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_BurnHurt) + SetConst(LVar2, ANIM_GoombaBros_Blue_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_BurnHurt) + SetConst(LVar2, ANIM_GoombaBros_Blue_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_BurnStill) + ExecWait(N(EVS_GoombaBros_Death)) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Hurt) + ExecWait(N(EVS_GoombaBros_Death)) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Hurt) + ExecWait(EVS_Enemy_Knockback) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Dizzy) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Idle) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Hurt) + ExecWait(N(EVS_GoombaBros_Death)) + Return + CaseEq(EVENT_STAR_BEAM) // do nothing - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt) - EVT_EXEC_WAIT(N(EVS_GoombaBros_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Run) - EVT_SET_CONST(LVar2, ANIM_GoombaBros_Blue_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Idle) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Hurt) + ExecWait(N(EVS_GoombaBros_Death)) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Run) + SetConst(LVar2, ANIM_GoombaBros_Blue_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Idle) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/CalculateArcsinDeg.inc.c" EvtScript N(EVS_TakeTurn_Inner) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Run) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Idle) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Midair) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_SET(LVar1, 10) - EVT_ADD(LVar2, 3) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_SET(LVar3, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Sleep) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Hurt) - EVT_WAIT(5) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Midair) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_THREAD - EVT_WAIT(4) - EVT_SET(LVar0, 180) - EVT_LOOP(4) - EVT_SUB(LVar0, 45) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Dizzy) - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Idle) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_SET(LVar3, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Midair) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_END_SWITCH - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_HEADBONK, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Idle) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Idle) - EVT_WAIT(3) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Run) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Idle) + Call(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Midair) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Set(LVar1, 10) + Add(LVar2, 3) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Thread + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) + Set(LVar0, 0) + Loop(16) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Set(LVar3, LVar6) + Wait(1) + EndLoop + EndThread + Thread + Wait(6) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Sleep) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Hurt) + Wait(5) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Midair) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + Thread + Wait(4) + Set(LVar0, 180) + Loop(4) + Sub(LVar0, 45) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Dizzy) + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(SetActorYaw, ACTOR_SELF, 0) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Idle) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + CaseDefault + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Thread + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) + Set(LVar0, 0) + Loop(16) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Set(LVar3, LVar6) + Wait(1) + EndLoop + EndThread + Thread + Wait(6) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Midair) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0)) + Wait(1) + EndSwitch + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_HEADBONK, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Idle) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Idle) + Wait(3) + Call(YieldTurn) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Init) = { - EVT_EXEC_WAIT(N(EVS_Init_Inner)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_UsedTaunt, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused, 0) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_RETURN - EVT_END + ExecWait(N(EVS_Init_Inner)) + Call(SetActorVar, ACTOR_SELF, AVAR_UsedTaunt, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_Unused, 0) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_UsedTaunt, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_UsedTaunt, TRUE) - EVT_CALL(ActorSpeak, MSG_CH0_00BF, ACTOR_SELF, PRT_MAIN, -1, -1) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_TakeTurn_Inner)) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_UsedTaunt, LVar0) + IfEq(LVar0, FALSE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 30) + Wait(30) + Call(SetActorVar, ACTOR_SELF, AVAR_UsedTaunt, TRUE) + Call(ActorSpeak, MSG_CH0_00BF, ACTOR_SELF, PRT_MAIN, -1, -1) + EndIf + ExecWait(N(EVS_TakeTurn_Inner)) + Return + End }; EvtScript N(EVS_GoombaBros_Death) = { - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_SET(LVar2, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_WAIT(10) - EVT_LOOP(24) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar2) - EVT_ADD(LVar2, 30) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar2, LVar3, LVar4) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar2, LVar3, LVar4, 0, 0, 0, 0, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_DEATH) - EVT_CALL(DropStarPoints, ACTOR_SELF) - EVT_SET(LVar3, 0) - EVT_LOOP(12) - EVT_CALL(SetActorRotation, ACTOR_SELF, LVar3, 0, 0) - EVT_ADD(LVar3, 8) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_ZER0, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_WAIT(30) - EVT_CALL(ActorExists, ACTOR_RED_GOOMBA, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(GetActorHP, ACTOR_RED_GOOMBA, LVar0) - EVT_END_IF - EVT_IF_NE(LVar0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_RED_GOOMBA) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(UseIdleAnimation, ACTOR_RED_GOOMBA, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_RED_GOOMBA, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetAnimation, ACTOR_RED_GOOMBA, PRT_RED_MAIN, ANIM_GoombaBros_Red_CryTalk) - EVT_CALL(ActorSpeak, MSG_CH0_00C1, ACTOR_RED_GOOMBA, PRT_RED_MAIN, -1, -1) - EVT_CALL(EnableIdleScript, ACTOR_RED_GOOMBA, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_RED_GOOMBA, TRUE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_END_IF - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(HideHealthBar, ACTOR_SELF) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Set(LVar2, 0) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Wait(10) + Loop(24) + Call(SetActorYaw, ACTOR_SELF, LVar2) + Add(LVar2, 30) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + Call(GetActorPos, ACTOR_SELF, LVar2, LVar3, LVar4) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar2, LVar3, LVar4, 0, 0, 0, 0, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_DEATH) + Call(DropStarPoints, ACTOR_SELF) + Set(LVar3, 0) + Loop(12) + Call(SetActorRotation, ACTOR_SELF, LVar3, 0, 0) + Add(LVar3, 8) + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_SELF, PRT_ZER0, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) + Wait(30) + Call(ActorExists, ACTOR_RED_GOOMBA, LVar0) + IfEq(LVar0, 1) + Call(GetActorHP, ACTOR_RED_GOOMBA, LVar0) + EndIf + IfNe(LVar0, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_RED_GOOMBA) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(UseIdleAnimation, ACTOR_RED_GOOMBA, FALSE) + Call(EnableIdleScript, ACTOR_RED_GOOMBA, IDLE_SCRIPT_DISABLE) + Call(SetAnimation, ACTOR_RED_GOOMBA, PRT_RED_MAIN, ANIM_GoombaBros_Red_CryTalk) + Call(ActorSpeak, MSG_CH0_00C1, ACTOR_RED_GOOMBA, PRT_RED_MAIN, -1, -1) + Call(EnableIdleScript, ACTOR_RED_GOOMBA, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_RED_GOOMBA, TRUE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Wait(30) + EndIf + Call(RemoveActor, ACTOR_SELF) + Return + End }; diff --git a/src/battle/area/kmr_part_2/actor/blue_goomba_2.c b/src/battle/area/kmr_part_2/actor/blue_goomba_2.c index bbdbb9b221c..c88cbc12671 100644 --- a/src/battle/area/kmr_part_2/actor/blue_goomba_2.c +++ b/src/battle/area/kmr_part_2/actor/blue_goomba_2.c @@ -113,353 +113,353 @@ s32 N(ShuffleAnims)[] = { }; EvtScript N(EVS_Init_Inner) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(10) - EVT_CALL(RandInt, 80, LVar0) - EVT_ADD(LVar0, 80) - EVT_LOOP(LVar0) - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_LOOP(20) - EVT_LABEL(1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_LOOP(80) - EVT_LABEL(2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(10) - EVT_RETURN - EVT_END + Label(10) + Call(RandInt, 80, LVar0) + Add(LVar0, 80) + Loop(LVar0) + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(0) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Loop(20) + Label(1) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(1) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Loop(80) + Label(2) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(2) + EndIf + Wait(1) + EndLoop + Goto(10) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_GoombaBros_Blue_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_GoombaBros_Blue_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Dizzy) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Idle) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_STAR_BEAM) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_BurnHurt) + SetConst(LVar2, ANIM_GoombaBros_Blue_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_BurnHurt) + SetConst(LVar2, ANIM_GoombaBros_Blue_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Hurt) + ExecWait(EVS_Enemy_Knockback) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Dizzy) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Idle) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_STAR_BEAM) // do nothing - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Run) - EVT_SET_CONST(LVar2, ANIM_GoombaBros_Blue_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Blue_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Idle) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Run) + SetConst(LVar2, ANIM_GoombaBros_Blue_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Blue_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Idle) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/CalculateArcsinDeg.inc.c" EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Run) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Idle) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Midair) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_SET(LVar1, 10) - EVT_ADD(LVar2, 3) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_SET(LVar3, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Sleep) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Hurt) - EVT_WAIT(5) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Midair) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_THREAD - EVT_WAIT(4) - EVT_SET(LVar0, 180) - EVT_LOOP(4) - EVT_SUB(LVar0, 45) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Dizzy) - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Idle) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_SET(LVar3, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Midair) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_END_SWITCH - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_HEADBONK, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Idle) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Idle) - EVT_WAIT(3) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Run) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Idle) + Call(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Midair) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Set(LVar1, 10) + Add(LVar2, 3) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Thread + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) + Set(LVar0, 0) + Loop(16) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Set(LVar3, LVar6) + Wait(1) + EndLoop + EndThread + Thread + Wait(6) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Sleep) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Hurt) + Wait(5) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Midair) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + Thread + Wait(4) + Set(LVar0, 180) + Loop(4) + Sub(LVar0, 45) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Dizzy) + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(SetActorYaw, ACTOR_SELF, 0) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Idle) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + CaseDefault + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Thread + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) + Set(LVar0, 0) + Loop(16) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Set(LVar3, LVar6) + Wait(1) + EndLoop + EndThread + Thread + Wait(6) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Midair) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0)) + Wait(1) + EndSwitch + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_HEADBONK, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Idle) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Idle) + Wait(3) + Call(YieldTurn) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Blue_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; API_CALLABLE(N(ReduceLevel)) { @@ -470,9 +470,9 @@ API_CALLABLE(N(ReduceLevel)) { } EvtScript N(EVS_Init) = { - EVT_EXEC_WAIT(N(EVS_Init_Inner)) - EVT_CALL(SetEnemyHP, ACTOR_SELF, 2) - EVT_CALL(N(ReduceLevel)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_Init_Inner)) + Call(SetEnemyHP, ACTOR_SELF, 2) + Call(N(ReduceLevel)) + Return + End }; diff --git a/src/battle/area/kmr_part_2/actor/goomba_king.c b/src/battle/area/kmr_part_2/actor/goomba_king.c index 487ae5907ed..1adef892bc3 100644 --- a/src/battle/area/kmr_part_2/actor/goomba_king.c +++ b/src/battle/area/kmr_part_2/actor/goomba_king.c @@ -176,620 +176,620 @@ API_CALLABLE(N(SpawnImpactDustFX)) { } EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_EXEC_GET_TID(N(EVS_ShakeScreenWhileWalking), LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ScreenShakingScriptID, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused_0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused_1, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IncreaseShaking, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Scene_BeginBattle, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused_5, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TREE_DELAY, 0) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + ExecGetTID(N(EVS_ShakeScreenWhileWalking), LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_ScreenShakingScriptID, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_Unused_0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Unused_1, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_IncreaseShaking, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_Scene_BeginBattle, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_Unused_5, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_TREE_DELAY, 0) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(RandInt, 80, LVar0) - EVT_ADD(LVar0, 80) - EVT_WAIT(LVar0) - EVT_LABEL(1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_WAIT(20) - EVT_LABEL(2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_WAIT(80) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(RandInt, 80, LVar0) + Add(LVar0, 80) + Wait(LVar0) + Label(1) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(1) + EndIf + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Wait(20) + Label(2) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(2) + EndIf + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Wait(80) + Goto(0) + Return + End }; EvtScript A(EVS_Lee_ShockKnockback) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4)) - EVT_CALL(AddGoalPos, ACTOR_SELF, 30, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_B) - EVT_CALL(AddGoalPos, ACTOR_SELF, 15, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_B) - EVT_CALL(AddGoalPos, ACTOR_SELF, 5, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_B) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.4)) + Call(AddGoalPos, ACTOR_SELF, 30, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_B) + Call(AddGoalPos, ACTOR_SELF, 15, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_B) + Call(AddGoalPos, ACTOR_SELF, 5, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_B) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaKing_Dead) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaKing_Dead) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaKing_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_GoombaKing_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaKing_Dead) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaKing_Dead) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaKing_Dead) - EVT_EXEC_WAIT(A(EVS_Lee_ShockKnockback)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaKing_Run) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaKing_Dead) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScreenShakingScriptID, LVar0) - EVT_KILL_THREAD(LVar0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaKing_Dead) - EVT_EXEC_WAIT(N(EVS_GoombaKing_Death)) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaKing_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaKing_Dead) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScreenShakingScriptID, LVar0) - EVT_KILL_THREAD(LVar0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaKing_Dead) - EVT_EXEC_WAIT(N(EVS_GoombaKing_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaKing_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_GoombaKing_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_WAIT(10) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScreenShakingScriptID, LVar0) - EVT_KILL_THREAD(LVar0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaKing_BurnStill) - EVT_EXEC_WAIT(N(EVS_GoombaKing_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaKing_Dead) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ScreenShakingScriptID, LVar0) - EVT_KILL_THREAD(LVar0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaKing_Dead) - EVT_EXEC_WAIT(N(EVS_GoombaKing_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIKE_CONTACT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Dead) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Idle) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaKing_Idle) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaKing_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaKing_Dead) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaKing_Dead) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaKing_BurnHurt) + SetConst(LVar2, ANIM_GoombaKing_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaKing_Dead) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaKing_Dead) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaKing_Dead) + ExecWait(A(EVS_Lee_ShockKnockback)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaKing_Run) + ExecWait(EVS_Enemy_ReturnHome) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaKing_Dead) + ExecWait(EVS_Enemy_ShockHit) + Call(GetActorVar, ACTOR_SELF, AVAR_ScreenShakingScriptID, LVar0) + KillThread(LVar0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaKing_Dead) + ExecWait(N(EVS_GoombaKing_Death)) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaKing_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaKing_Dead) + ExecWait(EVS_Enemy_Hit) + Wait(10) + Call(GetActorVar, ACTOR_SELF, AVAR_ScreenShakingScriptID, LVar0) + KillThread(LVar0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaKing_Dead) + ExecWait(N(EVS_GoombaKing_Death)) + Return + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaKing_BurnHurt) + SetConst(LVar2, ANIM_GoombaKing_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + Wait(10) + Call(GetActorVar, ACTOR_SELF, AVAR_ScreenShakingScriptID, LVar0) + KillThread(LVar0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaKing_BurnStill) + ExecWait(N(EVS_GoombaKing_Death)) + Return + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaKing_Dead) + ExecWait(EVS_Enemy_SpinSmashHit) + Call(GetActorVar, ACTOR_SELF, AVAR_ScreenShakingScriptID, LVar0) + KillThread(LVar0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaKing_Dead) + ExecWait(N(EVS_GoombaKing_Death)) + Return + CaseEq(EVENT_SPIKE_CONTACT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Dead) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Idle) + CaseEq(EVENT_END_FIRST_STRIKE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaKing_Idle) + ExecWait(EVS_Enemy_ReturnHome) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaKing_Idle) + ExecWait(EVS_Enemy_Recover) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorVar, ACTOR_TREE, AVAR_TREE_DELAY, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(RandInt, 100, LVar1) - EVT_IF_LT(LVar1, 60) - EVT_SUB(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_TREE, AVAR_TREE_DELAY, LVar0) - EVT_EXEC_WAIT(N(EVS_Attack_GroundStomp)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_Attack_SpinSwipe)) - EVT_RETURN - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(GetActorVar, ACTOR_TREE, AVAR_TREE_DELAY, LVar0) + IfNe(LVar0, 0) + Call(RandInt, 100, LVar1) + IfLt(LVar1, 60) + Sub(LVar0, 1) + Call(SetActorVar, ACTOR_TREE, AVAR_TREE_DELAY, LVar0) + ExecWait(N(EVS_Attack_GroundStomp)) + Return + EndIf + EndIf + EndIf + ExecWait(N(EVS_Attack_SpinSwipe)) + Return + Return + End }; EvtScript N(EVS_Attack_SpinSwipe) = { - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(AddBattleCamZoom, -100) - EVT_CALL(SetBattleCamOffsetZ, 20) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(AddBattleCamZoom, -100) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_END_IF - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 32, 0, 0) - EVT_ELSE - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 12, 0, 0) - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Run) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Idle) - EVT_WAIT(8) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_GOOMBA_KING_SPIN) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_GOOMBA_KING_SPIN) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Kick) - EVT_SET(LVar0, 0) - EVT_LOOP(20) - EVT_ADD(LVar0, 18) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Dizzy) - EVT_SET(LVar0, 0) - EVT_LOOP(20) - EVT_ADD(LVar0, 18) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Idle) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Run) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Idle) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarA, 0, 0, 0, DMG_SPIN, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Idle) - EVT_SWITCH(LVarA) - EVT_CASE_DEFAULT - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Idle) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Run) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Idle) - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(AddBattleCamZoom, -100) + Call(SetBattleCamOffsetZ, 20) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 30) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Else + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(AddBattleCamZoom, -100) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + EndIf + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 32, 0, 0) + Else + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 12, 0, 0) + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Run) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Idle) + Wait(8) + Thread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_GOOMBA_KING_SPIN) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_GOOMBA_KING_SPIN) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Kick) + Set(LVar0, 0) + Loop(20) + Add(LVar0, 18) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Dizzy) + Set(LVar0, 0) + Loop(20) + Add(LVar0, 18) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Idle) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Run) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Idle) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVarA, 0, 0, 0, DMG_SPIN, BS_FLAGS1_TRIGGER_EVENTS) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Idle) + Switch(LVarA) + CaseDefault + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Idle) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Run) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Idle) + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_GroundStomp) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_15) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 40) - EVT_WAIT(15) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Angry) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_B) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Still) - EVT_THREAD - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_MAX) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(4.0)) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Idle) - EVT_PLAY_EFFECT(EFFECT_DROP_LEAVES, 0, -80, 125, 0, 100, 0) - EVT_PLAY_EFFECT(EFFECT_DROP_LEAVES, 0, -15, 135, 0, 85, 0) - EVT_PLAY_EFFECT(EFFECT_DROP_LEAVES, 0, 100, 103, 0, 70, 0) - EVT_END_THREAD - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_THREAD - EVT_WAIT(12) - EVT_CALL(PlaySoundAtPart, ACTOR_TREE, PRT_TREE_NUT_1, SOUND_FALL_QUICK) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetPartJumpGravity, ACTOR_TREE, PRT_TREE_NUT_1, EVT_FLOAT(1.5)) - EVT_CALL(GetPartOffset, ACTOR_TREE, PRT_TREE_NUT_1, LVar0, LVar1, LVar2) - EVT_CALL(FallPartTo, ACTOR_TREE, PRT_TREE_NUT_1, LVar0, 10, LVar2, 14) - EVT_SUB(LVar0, 12) - EVT_CALL(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_1, LVar0, 10, LVar2, 10, TRUE) - EVT_SUB(LVar0, 7) - EVT_CALL(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_1, LVar0, 10, LVar2, 7, TRUE) - EVT_LOOP(20) - EVT_CALL(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_1, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_1, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySoundAtPart, ACTOR_TREE, PRT_TREE_NUT_2, SOUND_FALL_QUICK) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(SetPartJumpGravity, ACTOR_TREE, PRT_TREE_NUT_2, EVT_FLOAT(1.5)) - EVT_CALL(GetPartOffset, ACTOR_TREE, PRT_TREE_NUT_2, LVar0, LVar1, LVar2) - EVT_CALL(FallPartTo, ACTOR_TREE, PRT_TREE_NUT_2, LVar0, 10, LVar2, 15) - EVT_SUB(LVar0, 12) - EVT_CALL(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_2, LVar0, 10, LVar2, 10, TRUE) - EVT_SUB(LVar0, 7) - EVT_CALL(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_2, LVar0, 10, LVar2, 7, TRUE) - EVT_LOOP(20) - EVT_CALL(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_2, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_2, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(17) - EVT_CALL(PlaySoundAtPart, ACTOR_TREE, PRT_TREE_NUT_3, SOUND_FALL_QUICK) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(SetPartJumpGravity, ACTOR_TREE, PRT_TREE_NUT_3, EVT_FLOAT(1.5)) - EVT_CALL(GetPartOffset, ACTOR_TREE, PRT_TREE_NUT_3, LVar0, LVar1, LVar2) - EVT_CALL(FallPartTo, ACTOR_TREE, PRT_TREE_NUT_3, LVar0, 10, LVar2, 17) - EVT_ADD(LVar0, 12) - EVT_CALL(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_3, LVar0, 10, LVar2, 10, TRUE) - EVT_ADD(LVar0, 7) - EVT_CALL(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_3, LVar0, 10, LVar2, 7, TRUE) - EVT_LOOP(20) - EVT_CALL(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_3, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_3, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(15) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_THREAD - EVT_WAIT(12) - EVT_CALL(PlaySoundAtPart, ACTOR_TREE, PRT_TREE_NUT_1, SOUND_FALL_QUICK) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetPartJumpGravity, ACTOR_TREE, PRT_TREE_NUT_1, EVT_FLOAT(1.5)) - EVT_CALL(GetPartOffset, ACTOR_TREE, PRT_TREE_NUT_1, LVar0, LVar1, LVar2) - EVT_CALL(FallPartTo, ACTOR_TREE, PRT_TREE_NUT_1, LVar0, 35, LVar2, 14) - EVT_SUB(LVar0, 12) - EVT_CALL(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_1, LVar0, 10, LVar2, 10, TRUE) - EVT_SUB(LVar0, 7) - EVT_CALL(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_1, LVar0, 10, LVar2, 7, TRUE) - EVT_LOOP(20) - EVT_CALL(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_1, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_1, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySoundAtPart, ACTOR_TREE, PRT_TREE_NUT_2, SOUND_FALL_QUICK) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(SetPartJumpGravity, ACTOR_TREE, PRT_TREE_NUT_2, EVT_FLOAT(1.5)) - EVT_CALL(GetPartOffset, ACTOR_TREE, PRT_TREE_NUT_2, LVar0, LVar1, LVar2) - EVT_CALL(FallPartTo, ACTOR_TREE, PRT_TREE_NUT_2, LVar0, 10, LVar2, 15) - EVT_SUB(LVar0, 12) - EVT_CALL(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_2, LVar0, 10, LVar2, 10, TRUE) - EVT_SUB(LVar0, 7) - EVT_CALL(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_2, LVar0, 10, LVar2, 7, TRUE) - EVT_LOOP(20) - EVT_CALL(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_2, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_2, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(17) - EVT_CALL(PlaySoundAtPart, ACTOR_TREE, PRT_TREE_NUT_3, SOUND_FALL_QUICK) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(SetPartJumpGravity, ACTOR_TREE, PRT_TREE_NUT_3, EVT_FLOAT(1.5)) - EVT_CALL(GetPartOffset, ACTOR_TREE, PRT_TREE_NUT_3, LVar0, LVar1, LVar2) - EVT_CALL(FallPartTo, ACTOR_TREE, PRT_TREE_NUT_3, LVar0, 10, LVar2, 17) - EVT_ADD(LVar0, 12) - EVT_CALL(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_3, LVar0, 10, LVar2, 10, TRUE) - EVT_ADD(LVar0, 7) - EVT_CALL(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_3, LVar0, 10, LVar2, 7, TRUE) - EVT_LOOP(20) - EVT_CALL(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_3, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_3, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(24) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_STOMP, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(HIT_RESULT_10) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_PRESET_15) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 40) + Wait(15) + Call(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Angry) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_B) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Still) + Thread + Call(StartRumble, BTL_RUMBLE_PLAYER_MAX) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(4.0)) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaKing_Idle) + PlayEffect(EFFECT_DROP_LEAVES, 0, -80, 125, 0, 100, 0) + PlayEffect(EFFECT_DROP_LEAVES, 0, -15, 135, 0, 85, 0) + PlayEffect(EFFECT_DROP_LEAVES, 0, 100, 103, 0, 70, 0) + EndThread + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Thread + Wait(12) + Call(PlaySoundAtPart, ACTOR_TREE, PRT_TREE_NUT_1, SOUND_FALL_QUICK) + EndThread + Thread + Wait(10) + Call(SetPartJumpGravity, ACTOR_TREE, PRT_TREE_NUT_1, Float(1.5)) + Call(GetPartOffset, ACTOR_TREE, PRT_TREE_NUT_1, LVar0, LVar1, LVar2) + Call(FallPartTo, ACTOR_TREE, PRT_TREE_NUT_1, LVar0, 10, LVar2, 14) + Sub(LVar0, 12) + Call(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_1, LVar0, 10, LVar2, 10, TRUE) + Sub(LVar0, 7) + Call(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_1, LVar0, 10, LVar2, 7, TRUE) + Loop(20) + Call(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_1, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + Call(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_1, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + EndLoop + EndThread + Thread + Wait(5) + Call(PlaySoundAtPart, ACTOR_TREE, PRT_TREE_NUT_2, SOUND_FALL_QUICK) + EndThread + Thread + Wait(3) + Call(SetPartJumpGravity, ACTOR_TREE, PRT_TREE_NUT_2, Float(1.5)) + Call(GetPartOffset, ACTOR_TREE, PRT_TREE_NUT_2, LVar0, LVar1, LVar2) + Call(FallPartTo, ACTOR_TREE, PRT_TREE_NUT_2, LVar0, 10, LVar2, 15) + Sub(LVar0, 12) + Call(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_2, LVar0, 10, LVar2, 10, TRUE) + Sub(LVar0, 7) + Call(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_2, LVar0, 10, LVar2, 7, TRUE) + Loop(20) + Call(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_2, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + Call(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_2, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + EndLoop + EndThread + Thread + Wait(17) + Call(PlaySoundAtPart, ACTOR_TREE, PRT_TREE_NUT_3, SOUND_FALL_QUICK) + EndThread + Thread + Wait(15) + Call(SetPartJumpGravity, ACTOR_TREE, PRT_TREE_NUT_3, Float(1.5)) + Call(GetPartOffset, ACTOR_TREE, PRT_TREE_NUT_3, LVar0, LVar1, LVar2) + Call(FallPartTo, ACTOR_TREE, PRT_TREE_NUT_3, LVar0, 10, LVar2, 17) + Add(LVar0, 12) + Call(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_3, LVar0, 10, LVar2, 10, TRUE) + Add(LVar0, 7) + Call(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_3, LVar0, 10, LVar2, 7, TRUE) + Loop(20) + Call(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_3, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + Call(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_3, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + EndLoop + EndThread + Wait(15) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Thread + Wait(12) + Call(PlaySoundAtPart, ACTOR_TREE, PRT_TREE_NUT_1, SOUND_FALL_QUICK) + EndThread + Thread + Wait(10) + Call(SetPartJumpGravity, ACTOR_TREE, PRT_TREE_NUT_1, Float(1.5)) + Call(GetPartOffset, ACTOR_TREE, PRT_TREE_NUT_1, LVar0, LVar1, LVar2) + Call(FallPartTo, ACTOR_TREE, PRT_TREE_NUT_1, LVar0, 35, LVar2, 14) + Sub(LVar0, 12) + Call(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_1, LVar0, 10, LVar2, 10, TRUE) + Sub(LVar0, 7) + Call(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_1, LVar0, 10, LVar2, 7, TRUE) + Loop(20) + Call(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_1, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + Call(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_1, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + EndLoop + EndThread + Thread + Wait(5) + Call(PlaySoundAtPart, ACTOR_TREE, PRT_TREE_NUT_2, SOUND_FALL_QUICK) + EndThread + Thread + Wait(3) + Call(SetPartJumpGravity, ACTOR_TREE, PRT_TREE_NUT_2, Float(1.5)) + Call(GetPartOffset, ACTOR_TREE, PRT_TREE_NUT_2, LVar0, LVar1, LVar2) + Call(FallPartTo, ACTOR_TREE, PRT_TREE_NUT_2, LVar0, 10, LVar2, 15) + Sub(LVar0, 12) + Call(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_2, LVar0, 10, LVar2, 10, TRUE) + Sub(LVar0, 7) + Call(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_2, LVar0, 10, LVar2, 7, TRUE) + Loop(20) + Call(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_2, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + Call(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_2, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + EndLoop + EndThread + Thread + Wait(17) + Call(PlaySoundAtPart, ACTOR_TREE, PRT_TREE_NUT_3, SOUND_FALL_QUICK) + EndThread + Thread + Wait(15) + Call(SetPartJumpGravity, ACTOR_TREE, PRT_TREE_NUT_3, Float(1.5)) + Call(GetPartOffset, ACTOR_TREE, PRT_TREE_NUT_3, LVar0, LVar1, LVar2) + Call(FallPartTo, ACTOR_TREE, PRT_TREE_NUT_3, LVar0, 10, LVar2, 17) + Add(LVar0, 12) + Call(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_3, LVar0, 10, LVar2, 10, TRUE) + Add(LVar0, 7) + Call(JumpPartTo, ACTOR_TREE, PRT_TREE_NUT_3, LVar0, 10, LVar2, 7, TRUE) + Loop(20) + Call(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_3, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + Call(SetPartFlagBits, ACTOR_TREE, PRT_TREE_NUT_3, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + EndLoop + EndThread + Wait(24) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_STOMP, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseEq(HIT_RESULT_10) + Return + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Scene_BeginBattle, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_CALL(EnableBattleStatusBar, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13) - EVT_CALL(BattleCamTargetActor, ACTOR_RED_GOOMBA) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(UseIdleAnimation, ACTOR_RED_GOOMBA, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_RED_GOOMBA, IDLE_SCRIPT_DISABLE) - EVT_CALL(ActorSpeak, MSG_CH0_00CB, ACTOR_RED_GOOMBA, PRT_MAIN, ANIM_GoombaBros_Red_Talk, ANIM_GoombaBros_Red_Talk) - EVT_CALL(EnableIdleScript, ACTOR_RED_GOOMBA, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_RED_GOOMBA, TRUE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13) - EVT_CALL(BattleCamTargetActor, ACTOR_BLUE_GOOMBA) - EVT_CALL(MoveBattleCamOver, 10) - EVT_WAIT(10) - EVT_CALL(UseIdleAnimation, ACTOR_BLUE_GOOMBA, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_BLUE_GOOMBA, IDLE_SCRIPT_DISABLE) - EVT_CALL(ActorSpeak, MSG_CH0_00CC, ACTOR_BLUE_GOOMBA, PRT_MAIN, ANIM_GoombaBros_Blue_Talk, ANIM_GoombaBros_Blue_Talk) - EVT_CALL(EnableIdleScript, ACTOR_BLUE_GOOMBA, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_BLUE_GOOMBA, TRUE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_KING) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(ActorSpeak, MSG_CH0_00CD, ACTOR_KING, PRT_MAIN, ANIM_GoombaKing_Angry, ANIM_GoombaKing_Angry) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Scene_BeginBattle, TRUE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_PLAYER) - EVT_CALL(MoveBattleCamOver, 10) - EVT_WAIT(10) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 180) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Question) - EVT_CALL(ActorSpeak, MSG_CH0_00CE, ACTOR_PARTNER, 0, -1, -1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_NodYes) - EVT_WAIT(15) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 0) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(20) - EVT_CALL(EnableBattleStatusBar, TRUE) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Scene_BeginBattle, LVar0) + IfEq(LVar0, FALSE) + Call(EnableBattleStatusBar, FALSE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_13) + Call(BattleCamTargetActor, ACTOR_RED_GOOMBA) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(UseIdleAnimation, ACTOR_RED_GOOMBA, FALSE) + Call(EnableIdleScript, ACTOR_RED_GOOMBA, IDLE_SCRIPT_DISABLE) + Call(ActorSpeak, MSG_CH0_00CB, ACTOR_RED_GOOMBA, PRT_MAIN, ANIM_GoombaBros_Red_Talk, ANIM_GoombaBros_Red_Talk) + Call(EnableIdleScript, ACTOR_RED_GOOMBA, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_RED_GOOMBA, TRUE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_13) + Call(BattleCamTargetActor, ACTOR_BLUE_GOOMBA) + Call(MoveBattleCamOver, 10) + Wait(10) + Call(UseIdleAnimation, ACTOR_BLUE_GOOMBA, FALSE) + Call(EnableIdleScript, ACTOR_BLUE_GOOMBA, IDLE_SCRIPT_DISABLE) + Call(ActorSpeak, MSG_CH0_00CC, ACTOR_BLUE_GOOMBA, PRT_MAIN, ANIM_GoombaBros_Blue_Talk, ANIM_GoombaBros_Blue_Talk) + Call(EnableIdleScript, ACTOR_BLUE_GOOMBA, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_BLUE_GOOMBA, TRUE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_KING) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(ActorSpeak, MSG_CH0_00CD, ACTOR_KING, PRT_MAIN, ANIM_GoombaKing_Angry, ANIM_GoombaKing_Angry) + Call(SetActorVar, ACTOR_SELF, AVAR_Scene_BeginBattle, TRUE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_PLAYER) + Call(MoveBattleCamOver, 10) + Wait(10) + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(SetActorYaw, ACTOR_PLAYER, 180) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Question) + Call(ActorSpeak, MSG_CH0_00CE, ACTOR_PARTNER, 0, -1, -1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_NodYes) + Wait(15) + Call(SetActorYaw, ACTOR_PLAYER, 0) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(20) + Call(EnableBattleStatusBar, TRUE) + EndIf + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_ShakeScreenWhileWalking) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_IF_NE(LVar0, ANIM_GoombaKing_Run) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_IF_NE(LVar0, ANIM_GoombaKing_Run) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(StartRumble, BTL_RUMBLE_LONG) - EVT_CALL(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IncreaseShaking, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.2)) - EVT_END_IF - EVT_ELSE - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.7)) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Call(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) + IfNe(LVar0, ANIM_GoombaKing_Run) + Goto(0) + EndIf + Call(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) + IfNe(LVar0, ANIM_GoombaKing_Run) + Goto(0) + EndIf + Call(StartRumble, BTL_RUMBLE_LONG) + Call(GetPartAnimNotify, ACTOR_SELF, PRT_MAIN, LVar0) + IfEq(LVar0, 1) + Call(GetActorVar, ACTOR_SELF, AVAR_IncreaseShaking, LVar0) + IfEq(LVar0, FALSE) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2)) + EndIf + Else + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.7)) + EndIf + EndIf + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_GoombaKing_Death) = { - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_SET(LVar2, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_WAIT(10) - EVT_LOOP(24) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar2) - EVT_ADD(LVar2, 30) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar2, LVar3, LVar4) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar2, LVar3, LVar4, 0, 0, 0, 0, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_DEATH) - EVT_CALL(DropStarPoints, ACTOR_SELF) - EVT_SET(LVar3, 0) - EVT_LOOP(12) - EVT_CALL(SetActorRotation, ACTOR_SELF, LVar3, 0, 0) - EVT_ADD(LVar3, 8) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_WAIT(30) - EVT_CALL(ActorExists, ACTOR_RED_GOOMBA, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(GetActorHP, ACTOR_RED_GOOMBA, LVar0) - EVT_END_IF - EVT_IF_NE(LVar0, 0) - EVT_CALL(UseIdleAnimation, ACTOR_RED_GOOMBA, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_RED_GOOMBA, IDLE_SCRIPT_DISABLE) - EVT_CALL(ActorSpeak, MSG_CH0_00CF, ACTOR_RED_GOOMBA, PRT_MAIN, ANIM_GoombaBros_Red_CryTalk, ANIM_GoombaBros_Red_CryTalk) - EVT_CALL(EnableIdleScript, ACTOR_RED_GOOMBA, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_RED_GOOMBA, TRUE) - EVT_END_IF - EVT_CALL(ActorExists, ACTOR_BLUE_GOOMBA, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(GetActorHP, ACTOR_BLUE_GOOMBA, LVar0) - EVT_END_IF - EVT_IF_NE(LVar0, 0) - EVT_CALL(UseIdleAnimation, ACTOR_BLUE_GOOMBA, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_BLUE_GOOMBA, IDLE_SCRIPT_DISABLE) - EVT_CALL(ActorSpeak, MSG_CH0_00D0, ACTOR_BLUE_GOOMBA, PRT_MAIN, ANIM_GoombaBros_Blue_CryTalk, ANIM_GoombaBros_Blue_CryTalk) - EVT_CALL(EnableIdleScript, ACTOR_BLUE_GOOMBA, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_BLUE_GOOMBA, TRUE) - EVT_END_IF - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(HideHealthBar, ACTOR_SELF) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Set(LVar2, 0) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Wait(10) + Loop(24) + Call(SetActorYaw, ACTOR_SELF, LVar2) + Add(LVar2, 30) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + Call(GetActorPos, ACTOR_SELF, LVar2, LVar3, LVar4) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar2, LVar3, LVar4, 0, 0, 0, 0, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_DEATH) + Call(DropStarPoints, ACTOR_SELF) + Set(LVar3, 0) + Loop(12) + Call(SetActorRotation, ACTOR_SELF, LVar3, 0, 0) + Add(LVar3, 8) + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) + Wait(30) + Call(ActorExists, ACTOR_RED_GOOMBA, LVar0) + IfEq(LVar0, 1) + Call(GetActorHP, ACTOR_RED_GOOMBA, LVar0) + EndIf + IfNe(LVar0, 0) + Call(UseIdleAnimation, ACTOR_RED_GOOMBA, FALSE) + Call(EnableIdleScript, ACTOR_RED_GOOMBA, IDLE_SCRIPT_DISABLE) + Call(ActorSpeak, MSG_CH0_00CF, ACTOR_RED_GOOMBA, PRT_MAIN, ANIM_GoombaBros_Red_CryTalk, ANIM_GoombaBros_Red_CryTalk) + Call(EnableIdleScript, ACTOR_RED_GOOMBA, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_RED_GOOMBA, TRUE) + EndIf + Call(ActorExists, ACTOR_BLUE_GOOMBA, LVar0) + IfEq(LVar0, 1) + Call(GetActorHP, ACTOR_BLUE_GOOMBA, LVar0) + EndIf + IfNe(LVar0, 0) + Call(UseIdleAnimation, ACTOR_BLUE_GOOMBA, FALSE) + Call(EnableIdleScript, ACTOR_BLUE_GOOMBA, IDLE_SCRIPT_DISABLE) + Call(ActorSpeak, MSG_CH0_00D0, ACTOR_BLUE_GOOMBA, PRT_MAIN, ANIM_GoombaBros_Blue_CryTalk, ANIM_GoombaBros_Blue_CryTalk) + Call(EnableIdleScript, ACTOR_BLUE_GOOMBA, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_BLUE_GOOMBA, TRUE) + EndIf + Call(RemoveActor, ACTOR_SELF) + Return + End }; diff --git a/src/battle/area/kmr_part_2/actor/goomnut_tree.c b/src/battle/area/kmr_part_2/actor/goomnut_tree.c index ad0701ee144..6094749634e 100644 --- a/src/battle/area/kmr_part_2/actor/goomnut_tree.c +++ b/src/battle/area/kmr_part_2/actor/goomnut_tree.c @@ -157,175 +157,175 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_UnusedStub) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused_0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused_1, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused_2, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused_3, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused_4, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_BigNutDropped, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TREE_DELAY, 1) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_BIG_NUT, 10, 140, 10) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_TREE_NUT_1, -95, 140, 10) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_TREE_NUT_2, -115, 130, 0) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_TREE_NUT_3, -65, 118, 5) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_TREE_NUT_1, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_TREE_NUT_2, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_TREE_NUT_3, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_CALL(SetPartTargetFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_TARGET_NO_DAMAGE, TRUE) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_Unused_0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Unused_1, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Unused_2, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Unused_3, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Unused_4, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_BigNutDropped, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_TREE_DELAY, 1) + Call(SetPartPos, ACTOR_SELF, PRT_BIG_NUT, 10, 140, 10) + Call(SetPartPos, ACTOR_SELF, PRT_TREE_NUT_1, -95, 140, 10) + Call(SetPartPos, ACTOR_SELF, PRT_TREE_NUT_2, -115, 130, 0) + Call(SetPartPos, ACTOR_SELF, PRT_TREE_NUT_3, -65, 118, 5) + Call(SetPartScale, ACTOR_SELF, PRT_TREE_NUT_1, Float(0.5), Float(0.5), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_TREE_NUT_2, Float(0.5), Float(0.5), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_TREE_NUT_3, Float(0.5), Float(0.5), Float(1.0)) + Call(SetPartTargetFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_TARGET_NO_DAMAGE, TRUE) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastElement, LVarE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_TriggerTreeShake)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_EXEC_WAIT(N(EVS_TriggerTreeShake)) - EVT_EXEC_WAIT(N(EVS_DropNutOnGoombas)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_EXEC_WAIT(N(EVS_TriggerTreeShake)) - EVT_EXEC_WAIT(N(EVS_DropNutOnGoombas)) - EVT_CASE_EQ(EVENT_DEATH) - EVT_EXEC_WAIT(N(EVS_TriggerTreeShake)) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_EXEC_WAIT(N(EVS_TriggerTreeShake)) - EVT_CASE_EQ(EVENT_SPIKE_CONTACT) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastElement, LVarE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_ZERO_DAMAGE) + ExecWait(N(EVS_TriggerTreeShake)) + EndCaseGroup + CaseOrEq(EVENT_HIT) + CaseOrEq(EVENT_IMMUNE) + ExecWait(N(EVS_TriggerTreeShake)) + ExecWait(N(EVS_DropNutOnGoombas)) + EndCaseGroup + CaseEq(EVENT_SPIN_SMASH_HIT) + ExecWait(N(EVS_TriggerTreeShake)) + ExecWait(N(EVS_DropNutOnGoombas)) + CaseEq(EVENT_DEATH) + ExecWait(N(EVS_TriggerTreeShake)) + CaseEq(EVENT_SPIN_SMASH_DEATH) + ExecWait(N(EVS_TriggerTreeShake)) + CaseEq(EVENT_SPIKE_CONTACT) + CaseEq(EVENT_SHOCK_HIT) + CaseEq(EVENT_END_FIRST_STRIKE) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; // unclear what values LVar0 could have here EvtScript N(EVS_TakeTurn) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(6) - EVT_RETURN - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CASE_EQ(10) - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(6) + Return + EndSwitch + Switch(LVar0) + CaseEq(0) + CaseEq(10) + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/FoliageTransform.inc.c" EvtScript N(EVS_ShakeTree) = { - EVT_SET_TIMESCALE(EVT_FLOAT(2.0)) - EVT_USE_BUF(LVar0) - EVT_BUF_READ4(LVar1, LVar2, LVar3, LVar4) - EVT_BUF_READ1(LVar5) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar6, LVarF, LVar8) - EVT_CALL(PlaySound, SOUND_SMACK_TREE) - EVT_CALL(PlaySound, SOUND_SHAKE_TREE_LEAVES) - EVT_THREAD - EVT_SET(LFlag0, FALSE) - EVT_IF_NE(LVar1, 0) - EVT_WAIT(1) - EVT_LOOP(5) - EVT_USE_BUF(LVar1) - EVT_BUF_READ1(LVar2) - EVT_LOOP(LVar2) - EVT_BUF_READ1(LVar3) - EVT_CALL(N(TransformFoliage), LVar3, EVT_FLOAT(0.1), EVT_FLOAT(0.2), LVarF, 0) - EVT_IF_EQ(LFlag0, FALSE) - EVT_SET(LFlag0, TRUE) - EVT_CALL(PlaySoundAtModel, LVar3, SOUND_SHAKE_TREE_LEAVES, SOUND_SPACE_DEFAULT) - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(1) - EVT_USE_BUF(LVar1) - EVT_BUF_READ1(LVar2) - EVT_LOOP(LVar2) - EVT_BUF_READ1(LVar3) - EVT_CALL(N(TransformFoliage), LVar3, EVT_FLOAT(0.1), EVT_FLOAT(-0.2), LVarF, 0) - EVT_END_LOOP - EVT_WAIT(1) - EVT_END_LOOP - EVT_USE_BUF(LVar1) - EVT_BUF_READ1(LVar2) - EVT_LOOP(LVar2) - EVT_BUF_READ1(LVar3) - EVT_CALL(TranslateModel, LVar3, 0, 0, 0) - EVT_END_LOOP - EVT_WAIT(1) - EVT_END_IF - EVT_END_THREAD - EVT_THREAD - EVT_SET(LFlag0, FALSE) - EVT_IF_NE(LVar2, 0) - EVT_LOOP(5) - EVT_USE_BUF(LVar2) - EVT_BUF_READ1(LVar3) - EVT_LOOP(LVar3) - EVT_BUF_READ1(LVar4) - EVT_CALL(N(TransformFoliage), LVar4, EVT_FLOAT(0.1), EVT_FLOAT(0.2), LVarF, 0) - EVT_IF_EQ(LFlag0, FALSE) - EVT_SET(LFlag0, TRUE) - EVT_CALL(PlaySoundAtModel, LVar4, SOUND_SMACK_TREE, SOUND_SPACE_DEFAULT) - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(1) - EVT_USE_BUF(LVar2) - EVT_BUF_READ1(LVar3) - EVT_LOOP(LVar3) - EVT_BUF_READ1(LVar4) - EVT_CALL(N(TransformFoliage), LVar4, EVT_FLOAT(0.1), EVT_FLOAT(-0.2), LVarF, 0) - EVT_END_LOOP - EVT_WAIT(1) - EVT_END_LOOP - EVT_USE_BUF(LVar2) - EVT_BUF_READ1(LVar3) - EVT_LOOP(LVar3) - EVT_BUF_READ1(LVar4) - EVT_CALL(TranslateModel, LVar4, 0, 0, 0) - EVT_END_LOOP - EVT_WAIT(1) - EVT_END_IF - EVT_END_THREAD - EVT_THREAD - EVT_IF_NE(LVar4, 0) - EVT_USE_BUF(LVar4) - EVT_BUF_READ1(LVar5) - EVT_LOOP(LVar5) - EVT_BUF_READ3(LVar6, LVar7, LVar8) - EVT_PLAY_EFFECT(EFFECT_DROP_LEAVES, 0, LVar6, LVar7, LVar8, 100, 0) - EVT_END_LOOP - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(15) - EVT_RETURN - EVT_END + SetTimescale(Float(2.0)) + UseBuf(LVar0) + BufRead4(LVar1, LVar2, LVar3, LVar4) + BufRead1(LVar5) + Call(GetActorPos, ACTOR_PLAYER, LVar6, LVarF, LVar8) + Call(PlaySound, SOUND_SMACK_TREE) + Call(PlaySound, SOUND_SHAKE_TREE_LEAVES) + Thread + Set(LFlag0, FALSE) + IfNe(LVar1, 0) + Wait(1) + Loop(5) + UseBuf(LVar1) + BufRead1(LVar2) + Loop(LVar2) + BufRead1(LVar3) + Call(N(TransformFoliage), LVar3, Float(0.1), Float(0.2), LVarF, 0) + IfEq(LFlag0, FALSE) + Set(LFlag0, TRUE) + Call(PlaySoundAtModel, LVar3, SOUND_SHAKE_TREE_LEAVES, SOUND_SPACE_DEFAULT) + EndIf + EndLoop + Wait(1) + UseBuf(LVar1) + BufRead1(LVar2) + Loop(LVar2) + BufRead1(LVar3) + Call(N(TransformFoliage), LVar3, Float(0.1), Float(-0.2), LVarF, 0) + EndLoop + Wait(1) + EndLoop + UseBuf(LVar1) + BufRead1(LVar2) + Loop(LVar2) + BufRead1(LVar3) + Call(TranslateModel, LVar3, 0, 0, 0) + EndLoop + Wait(1) + EndIf + EndThread + Thread + Set(LFlag0, FALSE) + IfNe(LVar2, 0) + Loop(5) + UseBuf(LVar2) + BufRead1(LVar3) + Loop(LVar3) + BufRead1(LVar4) + Call(N(TransformFoliage), LVar4, Float(0.1), Float(0.2), LVarF, 0) + IfEq(LFlag0, FALSE) + Set(LFlag0, TRUE) + Call(PlaySoundAtModel, LVar4, SOUND_SMACK_TREE, SOUND_SPACE_DEFAULT) + EndIf + EndLoop + Wait(1) + UseBuf(LVar2) + BufRead1(LVar3) + Loop(LVar3) + BufRead1(LVar4) + Call(N(TransformFoliage), LVar4, Float(0.1), Float(-0.2), LVarF, 0) + EndLoop + Wait(1) + EndLoop + UseBuf(LVar2) + BufRead1(LVar3) + Loop(LVar3) + BufRead1(LVar4) + Call(TranslateModel, LVar4, 0, 0, 0) + EndLoop + Wait(1) + EndIf + EndThread + Thread + IfNe(LVar4, 0) + UseBuf(LVar4) + BufRead1(LVar5) + Loop(LVar5) + BufRead3(LVar6, LVar7, LVar8) + PlayEffect(EFFECT_DROP_LEAVES, 0, LVar6, LVar7, LVar8, 100, 0) + EndLoop + EndIf + EndThread + Wait(15) + Return + End }; FoliageModelList N(TreeLeaves) = FOLIAGE_MODEL_LIST(MODEL_ha3, MODEL_o306); @@ -346,125 +346,125 @@ ShakeTreeConfig N(Tree) = { }; EvtScript N(EVS_TriggerTreeShake) = { - EVT_SET(LVar0, EVT_PTR(N(Tree))) - EVT_EXEC_WAIT(N(EVS_ShakeTree)) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(Tree))) + ExecWait(N(EVS_ShakeTree)) + Return + End }; EvtScript N(EVS_DropNutOnGoombas) = { - EVT_PLAY_EFFECT(EFFECT_DROP_LEAVES, 0, -25, 120, 0, 90, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_BigNutDropped, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_15) - EVT_CALL(BattleCamTargetActor, ACTOR_KING) - EVT_WAIT(20) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_BigNutDropped, TRUE) - EVT_CALL(ActorExists, ACTOR_KING, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, 10, 0, 10) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BIG_NUT, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_BIG_NUT, SOUND_FALL_QUICK) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_BIG_NUT, EVT_FLOAT(0.8)) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_BIG_NUT, EVT_FLOAT(4.0)) - EVT_CALL(FallPartTo, ACTOR_SELF, PRT_BIG_NUT, 10, 20, 10, 20) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, 30, 20, 10, 10, TRUE) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, 40, 20, 10, 5, TRUE) - EVT_LOOP(20) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BIG_NUT, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BIG_NUT, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END_IF - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_BIG_NUT, SOUND_FALL_QUICK) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_BIG_NUT, EVT_FLOAT(0.8)) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_BIG_NUT, EVT_FLOAT(4.0)) - EVT_CALL(GetStatusFlags, ACTOR_KING, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(FallPartTo, ACTOR_SELF, PRT_BIG_NUT, 10, 80, 10, 10) - EVT_ELSE - EVT_CALL(FallPartTo, ACTOR_SELF, PRT_BIG_NUT, 10, 32, 10, 10) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(SetOwnerTarget, ACTOR_KING, PRT_BIG_NUT) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, ((DAMAGE_TYPE_IGNORE_DEFENSE)), 0, 0, DMG_TO_KING, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(ActorExists, ACTOR_RED_GOOMBA, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 65) - EVT_SET(LVar1, 20) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_BIG_NUT, EVT_FLOAT(0.7)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2, 20, TRUE) - EVT_ADD(LVar0, 12) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2, 8, TRUE) - EVT_LOOP(20) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BIG_NUT, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BIG_NUT, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_RED_GOOMBA, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_RED_GOOMBA, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 50) - EVT_ELSE - EVT_ADD(LVar1, 20) - EVT_END_IF - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_BIG_NUT, EVT_FLOAT(0.7)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2, 20, TRUE) - EVT_CALL(SetOwnerTarget, ACTOR_RED_GOOMBA, PRT_MAIN) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, ((DAMAGE_TYPE_IGNORE_DEFENSE)), 0, 0, DMG_TO_RED_GOOMBA, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(ActorExists, ACTOR_BLUE_GOOMBA, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 35) - EVT_SET(LVar1, 20) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_BIG_NUT, EVT_FLOAT(0.7)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2, 20, TRUE) - EVT_ADD(LVar0, 12) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2, 8, TRUE) - EVT_LOOP(20) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BIG_NUT, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BIG_NUT, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_BLUE_GOOMBA, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_BLUE_GOOMBA, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 50) - EVT_ELSE - EVT_ADD(LVar1, 20) - EVT_END_IF - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_BIG_NUT, EVT_FLOAT(0.7)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2, 20, TRUE) - EVT_CALL(SetOwnerTarget, ACTOR_BLUE_GOOMBA, PRT_MAIN) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, ((DAMAGE_TYPE_IGNORE_DEFENSE)), 0, 0, DMG_TO_BLUE_GOOMBA, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_SET(LVar1, 20) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_BIG_NUT, EVT_FLOAT(0.7)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2, 20, TRUE) - EVT_ADD(LVar0, 12) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2, 8, TRUE) - EVT_LOOP(20) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BIG_NUT, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BIG_NUT, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + PlayEffect(EFFECT_DROP_LEAVES, 0, -25, 120, 0, 90, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_BigNutDropped, LVar0) + IfNe(LVar0, FALSE) + Return + EndIf + Call(UseBattleCamPreset, BTL_CAM_PRESET_15) + Call(BattleCamTargetActor, ACTOR_KING) + Wait(20) + Call(SetActorVar, ACTOR_SELF, AVAR_BigNutDropped, TRUE) + Call(ActorExists, ACTOR_KING, LVar0) + IfEq(LVar0, 0) + Call(SetGoalPos, ACTOR_SELF, 10, 0, 10) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BIG_NUT, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(PlaySoundAtPart, ACTOR_SELF, PRT_BIG_NUT, SOUND_FALL_QUICK) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_BIG_NUT, Float(0.8)) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_BIG_NUT, Float(4.0)) + Call(FallPartTo, ACTOR_SELF, PRT_BIG_NUT, 10, 20, 10, 20) + Call(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, 30, 20, 10, 10, TRUE) + Call(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, 40, 20, 10, 5, TRUE) + Loop(20) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BIG_NUT, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BIG_NUT, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + EndLoop + Return + EndIf + Call(PlaySoundAtPart, ACTOR_SELF, PRT_BIG_NUT, SOUND_FALL_QUICK) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_BIG_NUT, Float(0.8)) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_BIG_NUT, Float(4.0)) + Call(GetStatusFlags, ACTOR_KING, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(FallPartTo, ACTOR_SELF, PRT_BIG_NUT, 10, 80, 10, 10) + Else + Call(FallPartTo, ACTOR_SELF, PRT_BIG_NUT, 10, 32, 10, 10) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Call(SetOwnerTarget, ACTOR_KING, PRT_BIG_NUT) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, ((DAMAGE_TYPE_IGNORE_DEFENSE)), 0, 0, DMG_TO_KING, BS_FLAGS1_TRIGGER_EVENTS) + Call(ActorExists, ACTOR_RED_GOOMBA, LVar0) + IfEq(LVar0, 0) + Call(GetPartOffset, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2) + Add(LVar0, 65) + Set(LVar1, 20) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_BIG_NUT, Float(0.7)) + Call(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2, 20, TRUE) + Add(LVar0, 12) + Call(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2, 8, TRUE) + Loop(20) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BIG_NUT, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BIG_NUT, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + EndLoop + Return + EndIf + Call(GetActorPos, ACTOR_RED_GOOMBA, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_RED_GOOMBA, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar1, 50) + Else + Add(LVar1, 20) + EndIf + Call(SetPartJumpGravity, ACTOR_SELF, PRT_BIG_NUT, Float(0.7)) + Call(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2, 20, TRUE) + Call(SetOwnerTarget, ACTOR_RED_GOOMBA, PRT_MAIN) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, ((DAMAGE_TYPE_IGNORE_DEFENSE)), 0, 0, DMG_TO_RED_GOOMBA, BS_FLAGS1_TRIGGER_EVENTS) + Call(ActorExists, ACTOR_BLUE_GOOMBA, LVar0) + IfEq(LVar0, 0) + Call(GetPartOffset, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2) + Add(LVar0, 35) + Set(LVar1, 20) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_BIG_NUT, Float(0.7)) + Call(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2, 20, TRUE) + Add(LVar0, 12) + Call(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2, 8, TRUE) + Loop(20) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BIG_NUT, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BIG_NUT, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + EndLoop + Return + EndIf + Call(GetActorPos, ACTOR_BLUE_GOOMBA, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_BLUE_GOOMBA, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar1, 50) + Else + Add(LVar1, 20) + EndIf + Call(SetPartJumpGravity, ACTOR_SELF, PRT_BIG_NUT, Float(0.7)) + Call(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2, 20, TRUE) + Call(SetOwnerTarget, ACTOR_BLUE_GOOMBA, PRT_MAIN) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, ((DAMAGE_TYPE_IGNORE_DEFENSE)), 0, 0, DMG_TO_BLUE_GOOMBA, BS_FLAGS1_TRIGGER_EVENTS) + Call(GetPartOffset, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Set(LVar1, 20) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_BIG_NUT, Float(0.7)) + Call(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2, 20, TRUE) + Add(LVar0, 12) + Call(JumpPartTo, ACTOR_SELF, PRT_BIG_NUT, LVar0, LVar1, LVar2, 8, TRUE) + Loop(20) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BIG_NUT, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BIG_NUT, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + EndLoop + Return + End }; diff --git a/src/battle/area/kmr_part_2/actor/red_goomba_1.c b/src/battle/area/kmr_part_2/actor/red_goomba_1.c index f67cd3e033f..14e96d6fe07 100644 --- a/src/battle/area/kmr_part_2/actor/red_goomba_1.c +++ b/src/battle/area/kmr_part_2/actor/red_goomba_1.c @@ -120,408 +120,408 @@ s32 N(IdleAnimations_8021B810)[] = { }; EvtScript N(EVS_Init_Inner) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(10) - EVT_CALL(RandInt, 80, LVar0) - EVT_ADD(LVar0, 80) - EVT_LOOP(LVar0) - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_8021B810))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_LOOP(20) - EVT_LABEL(1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IdleAnimations_8021B810))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_LOOP(80) - EVT_LABEL(2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(10) - EVT_RETURN - EVT_END + Label(10) + Call(RandInt, 80, LVar0) + Add(LVar0, 80) + Loop(LVar0) + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(0) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(IdleAnimations_8021B810))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Loop(20) + Label(1) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(1) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(IdleAnimations_8021B810))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Loop(80) + Label(2) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(2) + EndIf + Wait(1) + EndLoop + Goto(10) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_GoombaBros_Red_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_GoombaBros_Red_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_BurnStill) - EVT_EXEC_WAIT(N(EVS_GoombaBros_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt) - EVT_EXEC_WAIT(N(EVS_GoombaBros_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Dizzy) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Idle) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt) - EVT_EXEC_WAIT(N(EVS_GoombaBros_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_STAR_BEAM) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_BurnHurt) + SetConst(LVar2, ANIM_GoombaBros_Red_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_BurnHurt) + SetConst(LVar2, ANIM_GoombaBros_Red_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_BurnStill) + ExecWait(N(EVS_GoombaBros_Death)) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Hurt) + ExecWait(N(EVS_GoombaBros_Death)) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Hurt) + ExecWait(EVS_Enemy_Knockback) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Dizzy) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Idle) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Hurt) + ExecWait(N(EVS_GoombaBros_Death)) + Return + CaseEq(EVENT_STAR_BEAM) // do nothing - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt) - EVT_EXEC_WAIT(N(EVS_GoombaBros_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Run) - EVT_SET_CONST(LVar2, ANIM_GoombaBros_Red_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Idle) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Hurt) + ExecWait(N(EVS_GoombaBros_Death)) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Run) + SetConst(LVar2, ANIM_GoombaBros_Red_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Idle) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/CalculateArcsinDeg.inc.c" EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Run) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Idle) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Midair) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_SET(LVar1, 10) - EVT_ADD(LVar2, 3) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_SET(LVar3, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Sleep) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Hurt) - EVT_WAIT(5) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Midair) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_THREAD - EVT_WAIT(4) - EVT_SET(LVar0, 180) - EVT_LOOP(4) - EVT_SUB(LVar0, 45) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Dizzy) - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Idle) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_SET(LVar3, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Midair) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_END_SWITCH - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_HEADBONK, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Idle) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Idle) - EVT_WAIT(3) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Run) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Idle) + Call(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Midair) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Set(LVar1, 10) + Add(LVar2, 3) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Thread + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) + Set(LVar0, 0) + Loop(16) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Set(LVar3, LVar6) + Wait(1) + EndLoop + EndThread + Thread + Wait(6) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Sleep) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Hurt) + Wait(5) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Midair) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + Thread + Wait(4) + Set(LVar0, 180) + Loop(4) + Sub(LVar0, 45) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Dizzy) + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(SetActorYaw, ACTOR_SELF, 0) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Idle) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + CaseDefault + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Thread + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) + Set(LVar0, 0) + Loop(16) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Set(LVar3, LVar6) + Wait(1) + EndLoop + EndThread + Thread + Wait(6) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Midair) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0)) + Wait(1) + EndSwitch + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_HEADBONK, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Idle) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Idle) + Wait(3) + Call(YieldTurn) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Init) = { - EVT_EXEC_WAIT(N(EVS_Init_Inner)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused_0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused_1, 0) - EVT_RETURN - EVT_END + ExecWait(N(EVS_Init_Inner)) + Call(SetActorVar, ACTOR_SELF, AVAR_Unused_0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Unused_1, 0) + Return + End }; EvtScript N(EVS_GoombaBros_Death) = { - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_SET(LVar2, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_WAIT(10) - EVT_LOOP(24) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar2) - EVT_ADD(LVar2, 30) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar2, LVar3, LVar4) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar2, LVar3, LVar4, 0, 0, 0, 0, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_DEATH) - EVT_CALL(DropStarPoints, ACTOR_SELF) - EVT_SET(LVar3, 0) - EVT_LOOP(12) - EVT_CALL(SetActorRotation, ACTOR_SELF, LVar3, 0, 0) - EVT_ADD(LVar3, 8) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_ZERO, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_WAIT(30) - EVT_CALL(ActorExists, ACTOR_BLUE_GOOMBA, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(GetActorHP, ACTOR_BLUE_GOOMBA, LVar0) - EVT_END_IF - EVT_IF_NE(LVar0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_BLUE_GOOMBA) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(UseIdleAnimation, ACTOR_BLUE_GOOMBA, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_BLUE_GOOMBA, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetAnimation, ACTOR_BLUE_GOOMBA, PRT_BLUE_MAIN, ANIM_GoombaBros_Blue_CryTalk) - EVT_CALL(ActorSpeak, MSG_CH0_00C0, ACTOR_BLUE_GOOMBA, PRT_BLUE_MAIN, -1, -1) - EVT_CALL(EnableIdleScript, ACTOR_BLUE_GOOMBA, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_BLUE_GOOMBA, TRUE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_END_IF - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(HideHealthBar, ACTOR_SELF) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Set(LVar2, 0) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Wait(10) + Loop(24) + Call(SetActorYaw, ACTOR_SELF, LVar2) + Add(LVar2, 30) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + Call(GetActorPos, ACTOR_SELF, LVar2, LVar3, LVar4) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar2, LVar3, LVar4, 0, 0, 0, 0, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_DEATH) + Call(DropStarPoints, ACTOR_SELF) + Set(LVar3, 0) + Loop(12) + Call(SetActorRotation, ACTOR_SELF, LVar3, 0, 0) + Add(LVar3, 8) + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_SELF, PRT_ZERO, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) + Wait(30) + Call(ActorExists, ACTOR_BLUE_GOOMBA, LVar0) + IfEq(LVar0, 1) + Call(GetActorHP, ACTOR_BLUE_GOOMBA, LVar0) + EndIf + IfNe(LVar0, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_BLUE_GOOMBA) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(UseIdleAnimation, ACTOR_BLUE_GOOMBA, FALSE) + Call(EnableIdleScript, ACTOR_BLUE_GOOMBA, IDLE_SCRIPT_DISABLE) + Call(SetAnimation, ACTOR_BLUE_GOOMBA, PRT_BLUE_MAIN, ANIM_GoombaBros_Blue_CryTalk) + Call(ActorSpeak, MSG_CH0_00C0, ACTOR_BLUE_GOOMBA, PRT_BLUE_MAIN, -1, -1) + Call(EnableIdleScript, ACTOR_BLUE_GOOMBA, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_BLUE_GOOMBA, TRUE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Wait(30) + EndIf + Call(RemoveActor, ACTOR_SELF) + Return + End }; diff --git a/src/battle/area/kmr_part_2/actor/red_goomba_2.c b/src/battle/area/kmr_part_2/actor/red_goomba_2.c index 76300753077..9f904c5e0e1 100644 --- a/src/battle/area/kmr_part_2/actor/red_goomba_2.c +++ b/src/battle/area/kmr_part_2/actor/red_goomba_2.c @@ -113,353 +113,353 @@ s32 N(ShuffleAnims)[] = { }; EvtScript N(EVS_Init_Inner) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(10) - EVT_CALL(RandInt, 80, LVar0) - EVT_ADD(LVar0, 80) - EVT_LOOP(LVar0) - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_LOOP(20) - EVT_LABEL(1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_LOOP(80) - EVT_LABEL(2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(10) - EVT_RETURN - EVT_END + Label(10) + Call(RandInt, 80, LVar0) + Add(LVar0, 80) + Loop(LVar0) + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(0) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Loop(20) + Label(1) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(1) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Loop(80) + Label(2) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(2) + EndIf + Wait(1) + EndLoop + Goto(10) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_GoombaBros_Red_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_GoombaBros_Red_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Dizzy) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Idle) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_STAR_BEAM) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_BurnHurt) + SetConst(LVar2, ANIM_GoombaBros_Red_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_BurnHurt) + SetConst(LVar2, ANIM_GoombaBros_Red_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Hurt) + ExecWait(EVS_Enemy_Knockback) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Dizzy) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Idle) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_STAR_BEAM) // do nothing - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Run) - EVT_SET_CONST(LVar2, ANIM_GoombaBros_Red_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GoombaBros_Red_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Idle) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Run) + SetConst(LVar2, ANIM_GoombaBros_Red_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GoombaBros_Red_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Idle) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/CalculateArcsinDeg.inc.c" EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Run) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Idle) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Midair) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_SET(LVar1, 10) - EVT_ADD(LVar2, 3) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_SET(LVar3, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Sleep) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Hurt) - EVT_WAIT(5) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Midair) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_THREAD - EVT_WAIT(4) - EVT_SET(LVar0, 180) - EVT_LOOP(4) - EVT_SUB(LVar0, 45) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Dizzy) - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Idle) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_SET(LVar3, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Midair) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_END_SWITCH - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_HEADBONK, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Idle) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Idle) - EVT_WAIT(3) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Run) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Idle) + Call(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Midair) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Set(LVar1, 10) + Add(LVar2, 3) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Thread + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) + Set(LVar0, 0) + Loop(16) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Set(LVar3, LVar6) + Wait(1) + EndLoop + EndThread + Thread + Wait(6) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Sleep) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Hurt) + Wait(5) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Midair) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + Thread + Wait(4) + Set(LVar0, 180) + Loop(4) + Sub(LVar0, 45) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Dizzy) + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(SetActorYaw, ACTOR_SELF, 0) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Idle) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + CaseDefault + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Thread + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) + Set(LVar0, 0) + Loop(16) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Set(LVar3, LVar6) + Wait(1) + EndLoop + EndThread + Thread + Wait(6) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Midair) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0)) + Wait(1) + EndSwitch + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_HEADBONK, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Idle) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Idle) + Wait(3) + Call(YieldTurn) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GoombaBros_Red_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; API_CALLABLE(N(ReduceLevel)) { @@ -470,9 +470,9 @@ API_CALLABLE(N(ReduceLevel)) { } EvtScript N(EVS_Init) = { - EVT_EXEC_WAIT(N(EVS_Init_Inner)) - EVT_CALL(SetEnemyHP, ACTOR_SELF, 2) - EVT_CALL(N(ReduceLevel)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_Init_Inner)) + Call(SetEnemyHP, ACTOR_SELF, 2) + Call(N(ReduceLevel)) + Return + End }; diff --git a/src/battle/area/kmr_part_3/actor/egg_jr_troopa.c b/src/battle/area/kmr_part_3/actor/egg_jr_troopa.c index a84c44e96f6..c96495da802 100644 --- a/src/battle/area/kmr_part_3/actor/egg_jr_troopa.c +++ b/src/battle/area/kmr_part_3/actor/egg_jr_troopa.c @@ -124,33 +124,33 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Cam_FocusOnJrTroopa) = { - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_07) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamOffsetZ, 38) - EVT_CALL(SetBattleCamZoom, 256) - EVT_CALL(MoveBattleCamOver, 15) - EVT_RETURN - EVT_END + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(UseBattleCamPreset, BTL_CAM_PRESET_07) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamOffsetZ, 38) + Call(SetBattleCamZoom, 256) + Call(MoveBattleCamOver, 15) + Return + End }; EvtScript N(EVS_Cam_ResetFocus) = { - EVT_CALL(EnableBattleStatusBar, TRUE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 12) - EVT_RETURN - EVT_END + Call(EnableBattleStatusBar, TRUE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 12) + Return + End }; EvtScript N(EVS_Cam_FocusOnGoompa) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_55) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_PRESET_55) + Call(MoveBattleCamOver, 30) + Call(BattleCamTargetActor, ACTOR_SELF) + Return + End }; s32 N(DefeatedAnims)[] = { @@ -159,377 +159,377 @@ s32 N(DefeatedAnims)[] = { }; EvtScript N(EVS_JrTroopa_Death) = { - EVT_SET(LVarA, LVar0) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, LVarA, LVar1) - EVT_WAIT(10) - EVT_CALL(GetDamageSource, LVar5) - EVT_SWITCH(LVar5) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_SLAP_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_FAN_SMACK_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_SLAP_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_SLAP_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_FAN_SMACK_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_SLAP_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_SPIN_SMASH) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SET(LVar2, 0) - EVT_LOOP(24) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar2) - EVT_ADD(LVar2, 30) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_END_SWITCH - EVT_LABEL(0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_ADD(LVar2, 10) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) - EVT_CALL(PlaySound, SOUND_ACTOR_DEATH) - EVT_CALL(DropStarPoints, ACTOR_SELF) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(SetBattleCamZoom, 260) - EVT_CALL(SetBattleCamOffsetZ, 15) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_KNOCKOUT_CHIRPING) - EVT_CALL(SetAnimation, ACTOR_SELF, LVarA, ANIM_JrTroopa_Collapse) - EVT_WAIT(12) - EVT_CALL(SetAnimation, ACTOR_SELF, LVarA, ANIM_JrTroopa_Defeated) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, LVarA, EVT_PTR(N(DefeatedAnims))) - EVT_WAIT(60) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Call(HideHealthBar, ACTOR_SELF) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetAnimation, ACTOR_SELF, LVarA, LVar1) + Wait(10) + Call(GetDamageSource, LVar5) + Switch(LVar5) + CaseOrEq(DMG_SRC_NEXT_SLAP_LEFT) + CaseOrEq(DMG_SRC_NEXT_FAN_SMACK_LEFT) + CaseOrEq(DMG_SRC_LAST_SLAP_LEFT) + CaseOrEq(DMG_SRC_LAST_FAN_SMACK_LEFT) + CaseOrEq(DMG_SRC_NEXT_SLAP_RIGHT) + CaseOrEq(DMG_SRC_NEXT_FAN_SMACK_RIGHT) + CaseOrEq(DMG_SRC_LAST_SLAP_RIGHT) + CaseOrEq(DMG_SRC_LAST_FAN_SMACK_RIGHT) + CaseOrEq(DMG_SRC_SPIN_SMASH) + EndCaseGroup + CaseDefault + Set(LVar2, 0) + Loop(24) + Call(SetActorYaw, ACTOR_SELF, LVar2) + Add(LVar2, 30) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + EndSwitch + Label(0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 10) + Add(LVar2, 10) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) + Call(PlaySound, SOUND_ACTOR_DEATH) + Call(DropStarPoints, ACTOR_SELF) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(SetBattleCamZoom, 260) + Call(SetBattleCamOffsetZ, 15) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 30) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_KNOCKOUT_CHIRPING) + Call(SetAnimation, ACTOR_SELF, LVarA, ANIM_JrTroopa_Collapse) + Wait(12) + Call(SetAnimation, ACTOR_SELF, LVarA, ANIM_JrTroopa_Defeated) + Call(SetIdleAnimations, ACTOR_SELF, LVarA, Ref(N(DefeatedAnims))) + Wait(60) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Return + End }; EvtScript N(EVS_ReenterEgg) = { - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CLOSE_SHELL) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_ADD(LVar2, 5) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, -4, 0, 0) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, 4, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_EnterEgg) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(EggAnims))) - EVT_WAIT(10) - EVT_RETURN - EVT_END + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CLOSE_SHELL) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 10) + Add(LVar2, 5) + PlayEffect(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, -4, 0, 0) + PlayEffect(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, 4, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_EnterEgg) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(EggAnims))) + Wait(10) + Return + End }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShowedNewPower, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_None) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_ShowedNewPower, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_None) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_EXEC_WAIT(N(EVS_SetupHitReaction)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_JrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_HIT) - EVT_EXEC_WAIT(N(EVS_SetupHitReaction)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_JrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_TryHitReaction)) - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_JrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_JrTroopa_Panic) - EVT_EXEC_WAIT(N(EVS_JrTroopa_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET(LVar0, PRT_MAIN) - EVT_SET(LVar1, ANIM_JrTroopa_BurnHurt) - EVT_SET(LVar2, ANIM_JrTroopa_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET(LVar0, PRT_MAIN) - EVT_SET(LVar1, ANIM_JrTroopa_BurnHurt) - EVT_SET(LVar2, ANIM_JrTroopa_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_JrTroopa_BurnStill) - EVT_EXEC_WAIT(N(EVS_JrTroopa_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_EXEC_WAIT(N(EVS_SetupHitReaction)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_JrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_EXEC_WAIT(N(EVS_TryHitReaction)) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_JrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_JrTroopa_Panic) - EVT_EXEC_WAIT(N(EVS_JrTroopa_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_JrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_JrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_JrTroopa_Run) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_EXEC_WAIT(N(EVS_ReenterEgg)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_JrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_JrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_JrTroopa_Panic) - EVT_EXEC_WAIT(N(EVS_JrTroopa_Death)) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_JrTroopa_EggIdle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_JrTroopa_Idle) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_JrTroopa_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + ExecWait(N(EVS_SetupHitReaction)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_JrTroopa_Hurt) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_HIT) + ExecWait(N(EVS_SetupHitReaction)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_JrTroopa_Hurt) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_TryHitReaction)) + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_JrTroopa_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_JrTroopa_Panic) + ExecWait(N(EVS_JrTroopa_Death)) + Return + CaseEq(EVENT_BURN_HIT) + Set(LVar0, PRT_MAIN) + Set(LVar1, ANIM_JrTroopa_BurnHurt) + Set(LVar2, ANIM_JrTroopa_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + Set(LVar0, PRT_MAIN) + Set(LVar1, ANIM_JrTroopa_BurnHurt) + Set(LVar2, ANIM_JrTroopa_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_JrTroopa_BurnStill) + ExecWait(N(EVS_JrTroopa_Death)) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + ExecWait(N(EVS_SetupHitReaction)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_JrTroopa_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + ExecWait(N(EVS_TryHitReaction)) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_JrTroopa_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_JrTroopa_Panic) + ExecWait(N(EVS_JrTroopa_Death)) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_JrTroopa_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_JrTroopa_Hurt) + ExecWait(EVS_Enemy_Knockback) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_JrTroopa_Run) + ExecWait(EVS_Enemy_ReturnHome) + ExecWait(N(EVS_ReenterEgg)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_JrTroopa_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_JrTroopa_Hurt) + ExecWait(EVS_Enemy_Knockback) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_JrTroopa_Panic) + ExecWait(N(EVS_JrTroopa_Death)) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_JrTroopa_EggIdle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_END_FIRST_STRIKE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_JrTroopa_Idle) + ExecWait(EVS_Enemy_ReturnHome) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_JrTroopa_Idle) + ExecWait(EVS_Enemy_Recover) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_SetupHitReaction) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HitReact_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_HitReact_None) - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar1) - EVT_CALL(GetBattleFlags, LVar2) - EVT_IF_NOT_FLAG(LVar2, BS_FLAGS1_PARTNER_ACTING) - EVT_IF_NE(LVar1, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_Ready) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_DOJO) - EVT_CALL(FreezeBattleCam, TRUE) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_HitReact_State, LVar0) + IfEq(LVar0, AVAL_HitReact_None) + Call(GetLastDamage, ACTOR_SELF, LVar1) + Call(GetBattleFlags, LVar2) + IfNotFlag(LVar2, BS_FLAGS1_PARTNER_ACTING) + IfNe(LVar1, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_Ready) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_DOJO) + Call(FreezeBattleCam, TRUE) + EndIf + EndIf + EndIf + EndIf + Return + End }; EvtScript N(EVS_TryHitReaction) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HitReact_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_HitReact_Ready) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_DOJO) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_Done) - EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa)) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_CALL(ActorSpeak, MSG_CH1_012A, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Dizzy, ANIM_JrTroopa_Dizzy) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_PointTalk) - EVT_CALL(EndActorSpeech, ACTOR_SELF, PRT_MAIN, -1, -1) - EVT_EXEC_WAIT(N(EVS_ReenterEgg)) - EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus)) - EVT_ELSE - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_None) - EVT_END_IF - EVT_END_IF - EVT_CALL(FreezeBattleCam, FALSE) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_HitReact_State, LVar0) + IfEq(LVar0, AVAL_HitReact_Ready) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_DOJO) + Call(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_Done) + ExecWait(N(EVS_Cam_FocusOnJrTroopa)) + Call(MoveBattleCamOver, 30) + Wait(30) + Call(ActorSpeak, MSG_CH1_012A, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Dizzy, ANIM_JrTroopa_Dizzy) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_PointTalk) + Call(EndActorSpeech, ACTOR_SELF, PRT_MAIN, -1, -1) + ExecWait(N(EVS_ReenterEgg)) + ExecWait(N(EVS_Cam_ResetFocus)) + Else + Call(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_None) + EndIf + EndIf + Call(FreezeBattleCam, FALSE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_OPEN_SHELL) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle) - EVT_WAIT(20) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Run) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Jump) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Midair) - EVT_THREAD - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Fall) - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_ADD(LVar2, 5) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(2) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 25) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_ChargeArmsUp) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_EXEC_WAIT(N(EVS_ReenterEgg)) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Midair) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Fall) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_LEAP, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_DEFAULT - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle) - EVT_WAIT(10) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Run) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle) - EVT_EXEC_WAIT(N(EVS_ReenterEgg)) - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_OPEN_SHELL) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle) + Wait(20) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Run) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle) + Call(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Jump) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_LUCKY) + CaseOrEq(HIT_RESULT_MISS) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Midair) + Thread + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Fall) + EndThread + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Add(LVar2, 5) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(2) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 25) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_ChargeArmsUp) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + ExecWait(N(EVS_ReenterEgg)) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + Thread + Wait(3) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Midair) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Fall) + EndThread + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_LEAP, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseDefault + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle) + Wait(10) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Run) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle) + ExecWait(N(EVS_ReenterEgg)) + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ShowedNewPower, LVar0) - EVT_IF_FALSE(LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShowedNewPower, TRUE) - EVT_WAIT(15) - EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa)) - EVT_WAIT(10) - EVT_CALL(ActorSpeak, MSG_CH1_0128, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointTapFoot) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_ChargeArmsUp) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_JR_TROOPA_TRANSFORM) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 16) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, 1, 30, 0) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar1, LVar2, 1, 30, 0) - EVT_WAIT(30) - EVT_EXEC_WAIT(N(EVS_ReenterEgg)) - EVT_WAIT(30) - EVT_CALL(ActorSpeak, MSG_CH1_0129, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_EggTalk, ANIM_JrTroopa_EggIdle) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus)) - EVT_ELSE - EVT_END_IF - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) + Call(GetActorVar, ACTOR_SELF, AVAR_ShowedNewPower, LVar0) + IfFalse(LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_ShowedNewPower, TRUE) + Wait(15) + ExecWait(N(EVS_Cam_FocusOnJrTroopa)) + Wait(10) + Call(ActorSpeak, MSG_CH1_0128, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointTapFoot) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_ChargeArmsUp) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_JR_TROOPA_TRANSFORM) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 16) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, 1, 30, 0) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar1, LVar2, 1, 30, 0) + Wait(30) + ExecWait(N(EVS_ReenterEgg)) + Wait(30) + Call(ActorSpeak, MSG_CH1_0129, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_EggTalk, ANIM_JrTroopa_EggIdle) + Wait(10) + ExecWait(N(EVS_Cam_ResetFocus)) + Else + EndIf + CaseEq(PHASE_ENEMY_BEGIN) + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/area/kmr_part_3/actor/final_jr_troopa.c b/src/battle/area/kmr_part_3/actor/final_jr_troopa.c index 5fa81b09ebb..2b06f5d03be 100644 --- a/src/battle/area/kmr_part_3/actor/final_jr_troopa.c +++ b/src/battle/area/kmr_part_3/actor/final_jr_troopa.c @@ -7,7 +7,7 @@ // Invalid value used in some scripts here == -91,999,590 // The closest evt variable for this is MapFlag(-1999590), which is way out of range. -// Looks like it was supposed to be a value for EVT_FLOAT(), but its likewise out of range. +// Looks like it was supposed to be a value for Float(), but its likewise out of range. #define INVALID_VAR 0xFA84329A extern EvtScript N(EVS_Init); @@ -261,86 +261,86 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_SetupFearReaction) = { - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar2) - EVT_IF_FLAG(LVar2, STATUS_FLAGS_IMMOBILIZED) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetBattleFlags, LVar2) - EVT_IF_FLAG(LVar2, BS_FLAGS1_PARTNER_ACTING) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar2, MOVE_SPOOK) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_Ready) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_EMOTE_QUESTION) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 30) - EVT_CALL(ShowEmote, 0, EMOTE_QUESTION, -45, 30, EMOTER_POS, LVar0, LVar1, LVar2, 5) - EVT_WAIT(30) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetStatusFlags, ACTOR_SELF, LVar2) + IfFlag(LVar2, STATUS_FLAGS_IMMOBILIZED) + Return + EndIf + Call(GetBattleFlags, LVar2) + IfFlag(LVar2, BS_FLAGS1_PARTNER_ACTING) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + IfEq(LVar2, MOVE_SPOOK) + Call(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_Ready) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_EMOTE_QUESTION) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 30) + Call(ShowEmote, 0, EMOTE_QUESTION, -45, 30, EMOTER_POS, LVar0, LVar1, LVar2, 5) + Wait(30) + EndIf + EndIf + Return + End }; EvtScript N(EVS_TransformFX) = { - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_JR_TROOPA_TRANSFORM) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 16) - EVT_ELSE - EVT_ADD(LVar1, 6) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, 1, 30, 0) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar1, LVar2, 1, 30, 0) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(32) - EVT_WAIT(1) - EVT_ADD(LVar0, 45) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, LVar0, 0) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(32) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_JR_TROOPA_NEW_POWER) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 40, 0) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, -4, 0, 0) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, -4, 4, 0) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, 4, 0, 0) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, 4, 4, 0) - EVT_RETURN - EVT_END + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_JR_TROOPA_TRANSFORM) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar1, 16) + Else + Add(LVar1, 6) + EndIf + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, 1, 30, 0) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar1, LVar2, 1, 30, 0) + Thread + Set(LVar0, 0) + Loop(32) + Wait(1) + Add(LVar0, 45) + Call(SetActorRotation, ACTOR_SELF, 0, LVar0, 0) + EndLoop + EndThread + Wait(32) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_JR_TROOPA_NEW_POWER) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 15) + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 40, 0) + PlayEffect(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, -4, 0, 0) + PlayEffect(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, -4, 4, 0) + PlayEffect(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, 4, 0, 0) + PlayEffect(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, 4, 4, 0) + Return + End }; EvtScript N(EVS_Cam_FocusOnJrTroopa) = { - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_07) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamOffsetZ, 38) - EVT_CALL(SetBattleCamZoom, 256) - EVT_CALL(MoveBattleCamOver, 15) - EVT_RETURN - EVT_END + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(UseBattleCamPreset, BTL_CAM_PRESET_07) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamOffsetZ, 38) + Call(SetBattleCamZoom, 256) + Call(MoveBattleCamOver, 15) + Return + End }; EvtScript N(EVS_Cam_ResetFocus) = { - EVT_CALL(EnableBattleStatusBar, TRUE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 12) - EVT_RETURN - EVT_END + Call(EnableBattleStatusBar, TRUE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 12) + Return + End }; EvtScript N(EVS_Cam_FocusOnGoompa) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_55) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_PRESET_55) + Call(MoveBattleCamOver, 30) + Call(BattleCamTargetActor, ACTOR_SELF) + Return + End }; s32 N(BaseDefeatedAnims)[] = { @@ -349,842 +349,842 @@ s32 N(BaseDefeatedAnims)[] = { }; EvtScript N(EVS_JrTroopa_BaseDeath) = { - EVT_SET(LVarA, LVar0) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, LVarA, LVar1) - EVT_WAIT(10) - EVT_CALL(GetDamageSource, LVar5) - EVT_SWITCH(LVar5) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_SLAP_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_FAN_SMACK_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_SLAP_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_SLAP_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_FAN_SMACK_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_SLAP_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_SPIN_SMASH) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SET(LVar2, 0) - EVT_LOOP(24) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar2) - EVT_ADD(LVar2, 30) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_END_SWITCH - EVT_LABEL(0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_ADD(LVar2, 10) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) - EVT_CALL(PlaySound, SOUND_ACTOR_DEATH) - EVT_CALL(DropStarPoints, ACTOR_SELF) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(SetBattleCamZoom, 260) - EVT_CALL(SetBattleCamOffsetZ, 15) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_KNOCKOUT_CHIRPING) - EVT_CALL(SetAnimation, ACTOR_SELF, LVarA, ANIM_JrTroopa_Collapse) - EVT_WAIT(12) - EVT_CALL(SetAnimation, ACTOR_SELF, LVarA, ANIM_JrTroopa_Defeated) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, LVarA, EVT_PTR(N(BaseDefeatedAnims))) - EVT_WAIT(60) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Call(HideHealthBar, ACTOR_SELF) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetAnimation, ACTOR_SELF, LVarA, LVar1) + Wait(10) + Call(GetDamageSource, LVar5) + Switch(LVar5) + CaseOrEq(DMG_SRC_NEXT_SLAP_LEFT) + CaseOrEq(DMG_SRC_NEXT_FAN_SMACK_LEFT) + CaseOrEq(DMG_SRC_LAST_SLAP_LEFT) + CaseOrEq(DMG_SRC_LAST_FAN_SMACK_LEFT) + CaseOrEq(DMG_SRC_NEXT_SLAP_RIGHT) + CaseOrEq(DMG_SRC_NEXT_FAN_SMACK_RIGHT) + CaseOrEq(DMG_SRC_LAST_SLAP_RIGHT) + CaseOrEq(DMG_SRC_LAST_FAN_SMACK_RIGHT) + CaseOrEq(DMG_SRC_SPIN_SMASH) + EndCaseGroup + CaseDefault + Set(LVar2, 0) + Loop(24) + Call(SetActorYaw, ACTOR_SELF, LVar2) + Add(LVar2, 30) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + EndSwitch + Label(0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 10) + Add(LVar2, 10) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) + Call(PlaySound, SOUND_ACTOR_DEATH) + Call(DropStarPoints, ACTOR_SELF) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(SetBattleCamZoom, 260) + Call(SetBattleCamOffsetZ, 15) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 30) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_KNOCKOUT_CHIRPING) + Call(SetAnimation, ACTOR_SELF, LVarA, ANIM_JrTroopa_Collapse) + Wait(12) + Call(SetAnimation, ACTOR_SELF, LVarA, ANIM_JrTroopa_Defeated) + Call(SetIdleAnimations, ACTOR_SELF, LVarA, Ref(N(BaseDefeatedAnims))) + Wait(60) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Return + End }; EvtScript N(EVS_Init) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_UnusedBrag, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_DialogueFlags, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_None) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Form, AVAL_Form_Base) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HealsLeft, 5) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_UnusedBrag, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_DialogueFlags, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_None) + Call(SetActorVar, ACTOR_SELF, AVAR_Form, AVAL_Form_Base) + Call(SetActorVar, ACTOR_SELF, AVAR_HealsLeft, 5) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Form, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Form_Flying) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_DIZZY | STATUS_FLAG_SLEEP) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_FLYING, -15, 28) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_FLYING, 4, -6) - EVT_CALL(N(SetAbsoluteStatusOffsets), -25, 27, -1, 27) - EVT_ELSE - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_FLYING, -8, 33) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_FLYING, 0, -6) - EVT_CALL(N(SetAbsoluteStatusOffsets), -22, 30, 2, 28) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(N(SetAbsoluteStatusOffsets), -20, 35, 10, 25) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetActorVar, ACTOR_SELF, AVAR_Form, LVar0) + Switch(LVar0) + CaseEq(AVAL_Form_Flying) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_DIZZY | STATUS_FLAG_SLEEP) + Call(SetTargetOffset, ACTOR_SELF, PRT_FLYING, -15, 28) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_FLYING, 4, -6) + Call(N(SetAbsoluteStatusOffsets), -25, 27, -1, 27) + Else + Call(SetTargetOffset, ACTOR_SELF, PRT_FLYING, -8, 33) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_FLYING, 0, -6) + Call(N(SetAbsoluteStatusOffsets), -22, 30, 2, 28) + EndIf + CaseDefault + Call(N(SetAbsoluteStatusOffsets), -20, 35, 10, 25) + EndSwitch + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVarA) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_SET(LVar1, FORM_ANIM_HURT) - EVT_EXEC_WAIT(N(EVS_GetFormAnims)) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_HIT) - EVT_SET(LVar1, FORM_ANIM_HURT) - EVT_EXEC_WAIT(N(EVS_GetFormAnims)) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_SetupFearReaction)) - EVT_EXEC_WAIT(N(EVS_TryFearReaction)) - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET(LVar1, FORM_ANIM_HURT) - EVT_EXEC_WAIT(N(EVS_GetFormAnims)) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_JrTroopa_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET(LVar1, FORM_ANIM_BURN) - EVT_EXEC_WAIT(N(EVS_GetFormAnims)) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET(LVar1, FORM_ANIM_BURN) - EVT_EXEC_WAIT(N(EVS_GetFormAnims)) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_JrTroopa_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET(LVar1, FORM_ANIM_HURT) - EVT_EXEC_WAIT(N(EVS_GetFormAnims)) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET(LVar1, FORM_ANIM_HURT) - EVT_EXEC_WAIT(N(EVS_GetFormAnims)) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_EXEC_WAIT(N(EVS_JrTroopa_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_FLYING, 0, 0, 0) - EVT_CALL(SetPartRotationOffset, ACTOR_SELF, PRT_FLYING, 0, 0, 0) - EVT_SET(LVar1, FORM_ANIM_HURT) - EVT_EXEC_WAIT(N(EVS_GetFormAnims)) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET(LVar1, FORM_ANIM_HURT) - EVT_EXEC_WAIT(N(EVS_GetFormAnims)) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_FLYING, 0, 0, 0) - EVT_CALL(SetPartRotationOffset, ACTOR_SELF, PRT_FLYING, 0, 0, 0) - EVT_SET(LVar1, FORM_ANIM_HURT) - EVT_EXEC_WAIT(N(EVS_GetFormAnims)) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET(LVar1, FORM_ANIM_HURT) - EVT_EXEC_WAIT(N(EVS_GetFormAnims)) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_EXEC_WAIT(N(EVS_JrTroopa_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_ZERO_DAMAGE) - EVT_SET(LVar1, FORM_ANIM_IMMUNE) - EVT_EXEC_WAIT(N(EVS_GetFormAnims)) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(EVENT_IMMUNE) - EVT_SET(LVar1, FORM_ANIM_IMMUNE) - EVT_EXEC_WAIT(N(EVS_GetFormAnims)) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_EXEC_WAIT(N(EVS_SetupFearReaction)) - EVT_EXEC_WAIT(N(EVS_TryFearReaction)) - EVT_CASE_EQ(EVENT_SPIKE_TAUNT) - EVT_WAIT(10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_SWITCH(LVar3) - EVT_CASE_FLAG(STATUS_FLAG_DIZZY | STATUS_FLAG_SLEEP) - EVT_ADD(LVar0, -13) - EVT_ADD(LVar1, 37) - EVT_CASE_FLAG(STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, -1) - EVT_ADD(LVar1, 14) - EVT_CASE_DEFAULT - EVT_ADD(LVar0, -4) - EVT_ADD(LVar1, 37) - EVT_END_SWITCH - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) - EVT_WAIT(20) - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_SET(LVar1, FORM_ANIM_FLAIL) - EVT_EXEC_WAIT(N(EVS_GetFormAnims)) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_WAIT(1000) - EVT_END_IF - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_SET(LVar1, FORM_ANIM_IMMUNE) - EVT_EXEC_WAIT(N(EVS_GetFormAnims)) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa)) - EVT_SET(LVar1, FORM_ANIM_TALK) - EVT_EXEC_WAIT(N(EVS_GetFormAnims)) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(ActorSpeak, MSG_Menus_019B, ACTOR_SELF, LVar0, -1, -1) - EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus)) - EVT_END_IF - EVT_CASE_EQ(EVENT_SPIKE_CONTACT) - EVT_SET(LVar1, FORM_ANIM_HURT) - EVT_EXEC_WAIT(N(EVS_GetFormAnims)) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_BASE) - EVT_SET_CONST(LVar1, ANIM_JrTroopa_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVarA) + Switch(LVarA) + CaseEq(EVENT_HIT_COMBO) + Set(LVar1, FORM_ANIM_HURT) + ExecWait(N(EVS_GetFormAnims)) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_HIT) + Set(LVar1, FORM_ANIM_HURT) + ExecWait(N(EVS_GetFormAnims)) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_SetupFearReaction)) + ExecWait(N(EVS_TryFearReaction)) + CaseEq(EVENT_DEATH) + Set(LVar1, FORM_ANIM_HURT) + ExecWait(N(EVS_GetFormAnims)) + ExecWait(EVS_Enemy_Hit) + Wait(10) + ExecWait(N(EVS_JrTroopa_Death)) + Return + CaseEq(EVENT_BURN_HIT) + Set(LVar1, FORM_ANIM_BURN) + ExecWait(N(EVS_GetFormAnims)) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + Set(LVar1, FORM_ANIM_BURN) + ExecWait(N(EVS_GetFormAnims)) + ExecWait(EVS_Enemy_BurnHit) + Wait(10) + ExecWait(N(EVS_JrTroopa_Death)) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + Set(LVar1, FORM_ANIM_HURT) + ExecWait(N(EVS_GetFormAnims)) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + Set(LVar1, FORM_ANIM_HURT) + ExecWait(N(EVS_GetFormAnims)) + ExecWait(EVS_Enemy_SpinSmashHit) + ExecWait(N(EVS_JrTroopa_Death)) + Return + CaseEq(EVENT_SHOCK_HIT) + Call(SetPartRotation, ACTOR_SELF, PRT_FLYING, 0, 0, 0) + Call(SetPartRotationOffset, ACTOR_SELF, PRT_FLYING, 0, 0, 0) + Set(LVar1, FORM_ANIM_HURT) + ExecWait(N(EVS_GetFormAnims)) + ExecWait(EVS_Enemy_ShockHit) + Set(LVar1, FORM_ANIM_HURT) + ExecWait(N(EVS_GetFormAnims)) + ExecWait(EVS_Enemy_Knockback) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + Call(SetPartRotation, ACTOR_SELF, PRT_FLYING, 0, 0, 0) + Call(SetPartRotationOffset, ACTOR_SELF, PRT_FLYING, 0, 0, 0) + Set(LVar1, FORM_ANIM_HURT) + ExecWait(N(EVS_GetFormAnims)) + ExecWait(EVS_Enemy_ShockHit) + Set(LVar1, FORM_ANIM_HURT) + ExecWait(N(EVS_GetFormAnims)) + ExecWait(EVS_Enemy_Knockback) + ExecWait(N(EVS_JrTroopa_Death)) + Return + CaseEq(EVENT_ZERO_DAMAGE) + Set(LVar1, FORM_ANIM_IMMUNE) + ExecWait(N(EVS_GetFormAnims)) + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(EVENT_IMMUNE) + Set(LVar1, FORM_ANIM_IMMUNE) + ExecWait(N(EVS_GetFormAnims)) + ExecWait(EVS_Enemy_NoDamageHit) + ExecWait(N(EVS_SetupFearReaction)) + ExecWait(N(EVS_TryFearReaction)) + CaseEq(EVENT_SPIKE_TAUNT) + Wait(10) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + Switch(LVar3) + CaseFlag(STATUS_FLAG_DIZZY | STATUS_FLAG_SLEEP) + Add(LVar0, -13) + Add(LVar1, 37) + CaseFlag(STATUS_FLAG_SHRINK) + Add(LVar0, -1) + Add(LVar1, 14) + CaseDefault + Add(LVar0, -4) + Add(LVar1, 37) + EndSwitch + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) + Wait(20) + CaseEq(EVENT_BEGIN_AIR_LIFT) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Set(LVar1, FORM_ANIM_FLAIL) + ExecWait(N(EVS_GetFormAnims)) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Wait(1000) + EndIf + CaseEq(EVENT_AIR_LIFT_FAILED) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Set(LVar1, FORM_ANIM_IMMUNE) + ExecWait(N(EVS_GetFormAnims)) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Wait(20) + ExecWait(N(EVS_Cam_FocusOnJrTroopa)) + Set(LVar1, FORM_ANIM_TALK) + ExecWait(N(EVS_GetFormAnims)) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(ActorSpeak, MSG_Menus_019B, ACTOR_SELF, LVar0, -1, -1) + ExecWait(N(EVS_Cam_ResetFocus)) + EndIf + CaseEq(EVENT_SPIKE_CONTACT) + Set(LVar1, FORM_ANIM_HURT) + ExecWait(N(EVS_GetFormAnims)) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_END_FIRST_STRIKE) + ExecWait(N(EVS_ReturnHome)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_BASE) + SetConst(LVar1, ANIM_JrTroopa_Idle) + ExecWait(EVS_Enemy_Recover) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Form, LVar0) - EVT_IF_NE(LVar0, AVAL_Form_Mage) - EVT_CALL(GetActorHP, ACTOR_SELF, LVar1) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar2) - EVT_MUL(LVar1, 100) - EVT_DIV(LVar1, LVar2) - EVT_IF_EQ(LVar0, AVAL_Form_Base) - EVT_IF_LT(LVar1, 65) - EVT_EXEC_WAIT(N(EVS_Transform_Flying)) - EVT_END_IF - EVT_ELSE - EVT_IF_LT(LVar1, 35) - EVT_EXEC_WAIT(N(EVS_Transform_Mage)) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_IF_LT(LVar0, 15) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_DialogueFlags, LVar0) - EVT_IF_NOT_FLAG(LVar0, AVAL_Dialogue_LowHP) - EVT_BITWISE_OR_CONST(LVar0, AVAL_Dialogue_LowHP) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_DialogueFlags, LVar0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Form, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Form_Flying) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_Talk) - EVT_CASE_EQ(AVAL_Form_Mage) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAGE, ANIM_MageJrTroopa_Talk) - EVT_CASE_DEFAULT - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Talk) - EVT_END_SWITCH - EVT_CALL(ActorSpeak, MSG_CH8_0060, ACTOR_SELF, PRT_BASE, -1, -1) - EVT_END_IF - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Form, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Form_Flying) - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 50) - EVT_EXEC_WAIT(N(EVS_Attack_Swoop)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_SpikeDive)) - EVT_END_IF - EVT_CASE_EQ(AVAL_Form_Mage) - EVT_CALL(RandInt, 100, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_LT(60) - EVT_EXEC_WAIT(N(EVS_Attack_MagicSpell)) - EVT_CASE_LT(80) - EVT_EXEC_WAIT(N(EVS_Attack_LightningBolt)) - EVT_CASE_DEFAULT - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar1) - EVT_IF_NE(LVar0, LVar1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HealsLeft, LVar2) - EVT_IF_GT(LVar2, 0) - EVT_SUB(LVar2, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HealsLeft, LVar2) - EVT_EXEC_WAIT(N(EVS_Move_HealSelf)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_MagicSpell)) - EVT_END_IF - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_MagicSpell)) - EVT_END_IF - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(N(EVS_Attack_Leap)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_Form, LVar0) + IfNe(LVar0, AVAL_Form_Mage) + Call(GetActorHP, ACTOR_SELF, LVar1) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar2) + Mul(LVar1, 100) + Div(LVar1, LVar2) + IfEq(LVar0, AVAL_Form_Base) + IfLt(LVar1, 65) + ExecWait(N(EVS_Transform_Flying)) + EndIf + Else + IfLt(LVar1, 35) + ExecWait(N(EVS_Transform_Mage)) + EndIf + EndIf + EndIf + Call(GetActorHP, ACTOR_SELF, LVar0) + IfLt(LVar0, 15) + Call(GetActorVar, ACTOR_SELF, AVAR_DialogueFlags, LVar0) + IfNotFlag(LVar0, AVAL_Dialogue_LowHP) + BitwiseOrConst(LVar0, AVAL_Dialogue_LowHP) + Call(SetActorVar, ACTOR_SELF, AVAR_DialogueFlags, LVar0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Call(GetActorVar, ACTOR_SELF, AVAR_Form, LVar0) + Switch(LVar0) + CaseEq(AVAL_Form_Flying) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_Talk) + CaseEq(AVAL_Form_Mage) + Call(SetAnimation, ACTOR_SELF, PRT_MAGE, ANIM_MageJrTroopa_Talk) + CaseDefault + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Talk) + EndSwitch + Call(ActorSpeak, MSG_CH8_0060, ACTOR_SELF, PRT_BASE, -1, -1) + EndIf + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Form, LVar0) + Switch(LVar0) + CaseEq(AVAL_Form_Flying) + Call(RandInt, 100, LVar0) + IfLt(LVar0, 50) + ExecWait(N(EVS_Attack_Swoop)) + Else + ExecWait(N(EVS_Attack_SpikeDive)) + EndIf + CaseEq(AVAL_Form_Mage) + Call(RandInt, 100, LVar0) + Switch(LVar0) + CaseLt(60) + ExecWait(N(EVS_Attack_MagicSpell)) + CaseLt(80) + ExecWait(N(EVS_Attack_LightningBolt)) + CaseDefault + Call(GetActorHP, ACTOR_SELF, LVar0) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar1) + IfNe(LVar0, LVar1) + Call(GetActorVar, ACTOR_SELF, AVAR_HealsLeft, LVar2) + IfGt(LVar2, 0) + Sub(LVar2, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_HealsLeft, LVar2) + ExecWait(N(EVS_Move_HealSelf)) + Else + ExecWait(N(EVS_Attack_MagicSpell)) + EndIf + Else + ExecWait(N(EVS_Attack_MagicSpell)) + EndIf + EndSwitch + CaseDefault + ExecWait(N(EVS_Attack_Leap)) + EndSwitch + Return + End }; EvtScript N(EVS_Transform_Flying) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(ActorSpeak, MSG_CH8_005E, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_TiredTalk, ANIM_JrTroopa_TiredTalk) - EVT_EXEC_WAIT(N(EVS_TransformFX)) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BASE, ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BASE, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) - EVT_WAIT(10) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 20, 60, 0) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_LINEAR) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Form, AVAL_Form_Flying) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(FlyingStatusTable))) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Call(ActorSpeak, MSG_CH8_005E, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_TiredTalk, ANIM_JrTroopa_TiredTalk) + ExecWait(N(EVS_TransformFX)) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BASE, ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BASE, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) + Wait(10) + Call(SetActorSpeed, ACTOR_SELF, Float(2.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Call(SetGoalToHome, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 20, 60, 0) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_LINEAR) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Call(SetActorVar, ACTOR_SELF, AVAR_Form, AVAL_Form_Flying) + Call(SetStatusTable, ACTOR_SELF, Ref(N(FlyingStatusTable))) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, TRUE) + Return + End }; EvtScript N(EVS_Transform_Mage) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(ActorSpeak, MSG_CH8_005F, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_Talk, ANIM_SpikedParaJrTroopa_Talk) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 120) - EVT_EXEC_WAIT(N(EVS_TransformFX)) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAGE, ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAGE, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(FallToGoal, ACTOR_SELF, 10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Form, AVAL_Form_Mage) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(MageStatusTable))) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Call(ActorSpeak, MSG_CH8_005F, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_Talk, ANIM_SpikedParaJrTroopa_Talk) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 120) + ExecWait(N(EVS_TransformFX)) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAGE, ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAGE, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) + Call(SetActorSpeed, ACTOR_SELF, Float(2.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(FallToGoal, ACTOR_SELF, 10) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Call(SetActorVar, ACTOR_SELF, AVAR_Form, AVAL_Form_Mage) + Call(SetStatusTable, ACTOR_SELF, Ref(N(MageStatusTable))) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) + Return + End }; EvtScript N(EVS_Attack_Leap) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Run) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, 0, 0, 8, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarF) - EVT_CASE_EQ(HIT_RESULT_LUCKY) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Charge) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_ChargeTripped) - EVT_END_THREAD - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Trip) - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Defeated) - EVT_END_THREAD - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_SELF, 16, 0, EASING_CUBIC_OUT) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_ChargeArmsUp) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_BASE, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Idle) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_BASE, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_CASE_EQ(HIT_RESULT_MISS) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Run) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_JR_TOOPA_JUMP, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Jump) - EVT_WAIT(2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Midair) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_SET(LVar1, 0) - EVT_ADD(LVar2, 3) - EVT_THREAD - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Fall) - EVT_END_THREAD - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_PanicFast) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Run) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Idle) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Run) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_JR_TOOPA_JUMP, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Jump) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Midair) - EVT_THREAD - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Fall) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, DMG_LEAP, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 10) - EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Idle) - EVT_WAIT(8) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Run) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Idle) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Run) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(EnemyTestTarget, ACTOR_SELF, LVarF, 0, 0, 8, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarF) + CaseEq(HIT_RESULT_LUCKY) + Thread + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Charge) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_ChargeTripped) + EndThread + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Trip) + Thread + Wait(3) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Defeated) + EndThread + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_SELF, 16, 0, EASING_CUBIC_OUT) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_ChargeArmsUp) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_BASE, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorSpeed, ACTOR_SELF, Float(7.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Idle) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_BASE, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + CaseEq(HIT_RESULT_MISS) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Run) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Call(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_JR_TOOPA_JUMP, 0) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Jump) + Wait(2) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Midair) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Set(LVar1, 0) + Add(LVar2, 3) + Thread + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Fall) + EndThread + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_PanicFast) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Sub(LVar0, 10) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Run) + Call(SetActorSpeed, ACTOR_SELF, Float(7.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Idle) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Run) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Call(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_JR_TOOPA_JUMP, 0) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Jump) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Midair) + Thread + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Fall) + EndThread + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, DMG_LEAP, BS_FLAGS1_TRIGGER_EVENTS) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Sub(LVar0, 10) + Call(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Idle) + Wait(8) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(7.0)) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Run) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Idle) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_Swoop) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_FlyFast) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, EASING_LINEAR) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 6, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_66) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_PARAGOOMBA_PREDIVE, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_FlyFast) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_SUB(LVar0, 80) - EVT_SET(LVar1, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_Dive) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_FlyFast) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_BASE, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_Idle) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_BASE, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_66) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_PARAGOOMBA_PREDIVE, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_FlyFast) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_Dive) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SWOOP, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_FlyFast) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) - EVT_WAIT(10) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_FlyFast) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_Idle) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_FlyFast) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(FlyToGoal, ACTOR_SELF, 0, -4, EASING_LINEAR) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 6, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_66) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_PARAGOOMBA_PREDIVE, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_FlyFast) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) + Call(SetGoalToTarget, ACTOR_SELF) + Sub(LVar0, 80) + Set(LVar1, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_Dive) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_FlyFast) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_BASE, 0, ACTOR_DECORATION_SWEAT) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_Idle) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_BASE, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Return + EndCaseGroup + CaseDefault + EndSwitch + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_66) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_PARAGOOMBA_PREDIVE, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_FlyFast) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_Dive) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SWOOP, BS_FLAGS1_TRIGGER_EVENTS) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_FlyFast) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) + Wait(10) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(YieldTurn) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_FlyFast) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_Idle) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_SpikeDive) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CLOSE_SHELL) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_EnterEgg) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_EggIdle) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, 0, 0, 6, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_THREAD - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_SET(LVar1, 12) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_END_THREAD - EVT_SET(LVar0, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_LOOP(20) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_FLYING, 0, 0, LVar0) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_SET(LVar3, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LVarF, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_SUB(LVar1, 40) - EVT_SET(LVar2, 10) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_CALL(JumpToGoal, ACTOR_SELF, 14, FALSE, TRUE, FALSE) - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_LOOP(14) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) - EVT_SET(LVar7, LVar0) - EVT_ADD(LVar7, 180) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_FLYING, 0, 0, LVar7) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_SET(LVar3, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_FLYING, 0, 0, 0) - EVT_CALL(SetPartRotationOffset, ACTOR_SELF, PRT_FLYING, 0, 0, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_OPEN_SHELL) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_ExitEgg) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_FlyFast) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(SetPartRotationOffset, ACTOR_SELF, PRT_FLYING, 0, 12, 0) - EVT_THREAD - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_END_THREAD - EVT_SET(LVar0, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_LOOP(20) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_FLYING, 0, 0, LVar0) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_SET(LVar3, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, DMG_SPIKE_DIVE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, 40) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_CALL(JumpToGoal, ACTOR_SELF, 14, FALSE, TRUE, FALSE) - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_LOOP(14) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) - EVT_SET(LVar7, LVar0) - EVT_ADD(LVar7, 180) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_FLYING, 0, 0, LVar7) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_SET(LVar3, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_FLYING, 0, 0, 0) - EVT_CALL(SetPartRotationOffset, ACTOR_SELF, PRT_FLYING, 0, 0, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_OPEN_SHELL) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_ExitEgg) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_FlyFast) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CLOSE_SHELL) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_EnterEgg) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_EggIdle) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(EnemyTestTarget, ACTOR_SELF, LVarF, 0, 0, 6, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarF) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Thread + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Set(LVar1, 12) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + EndThread + Set(LVar0, 0) + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Loop(20) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) + Call(SetPartRotation, ACTOR_SELF, PRT_FLYING, 0, 0, LVar0) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Set(LVar3, LVar6) + Wait(1) + EndLoop + IfEq(LVarF, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(ResetAllActorSounds, ACTOR_SELF) + Thread + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Sub(LVar1, 40) + Set(LVar2, 10) + Call(SetGoalPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Call(JumpToGoal, ACTOR_SELF, 14, FALSE, TRUE, FALSE) + EndThread + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Loop(14) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) + Set(LVar7, LVar0) + Add(LVar7, 180) + Call(SetPartRotation, ACTOR_SELF, PRT_FLYING, 0, 0, LVar7) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Set(LVar3, LVar6) + Wait(1) + EndLoop + Call(SetPartRotation, ACTOR_SELF, PRT_FLYING, 0, 0, 0) + Call(SetPartRotationOffset, ACTOR_SELF, PRT_FLYING, 0, 0, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_OPEN_SHELL) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_ExitEgg) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_FlyFast) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(FlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + CaseDefault + EndSwitch + Call(SetPartRotationOffset, ACTOR_SELF, PRT_FLYING, 0, 12, 0) + Thread + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + EndThread + Set(LVar0, 0) + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Loop(20) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) + Call(SetPartRotation, ACTOR_SELF, PRT_FLYING, 0, 0, LVar0) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Set(LVar3, LVar6) + Wait(1) + EndLoop + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, DMG_SPIKE_DIVE, BS_FLAGS1_TRIGGER_EVENTS) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(ResetAllActorSounds, ACTOR_SELF) + Thread + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Add(LVar1, 40) + Call(SetGoalPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Call(JumpToGoal, ACTOR_SELF, 14, FALSE, TRUE, FALSE) + EndThread + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Loop(14) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) + Set(LVar7, LVar0) + Add(LVar7, 180) + Call(SetPartRotation, ACTOR_SELF, PRT_FLYING, 0, 0, LVar7) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Set(LVar3, LVar6) + Wait(1) + EndLoop + Call(SetPartRotation, ACTOR_SELF, PRT_FLYING, 0, 0, 0) + Call(SetPartRotationOffset, ACTOR_SELF, PRT_FLYING, 0, 0, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_OPEN_SHELL) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_ExitEgg) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_FlyFast) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(FlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/CalculateArcsinDeg.inc.c" EvtScript N(EVS_Attack_MagicSpell) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAGE, ANIM_MageJrTroopa_RaiseStaff) - EVT_WAIT(8) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 36) - EVT_SETF(LVar5, EVT_FLOAT(1.0)) - EVT_ELSE - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 14) - EVT_SETF(LVar5, INVALID_VAR) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, LVar5, 30, 0) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAGE, ANIM_MageJrTroopa_SwingStaff) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_NO_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(HIT_RESULT_MISS) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 120) - EVT_ADD(LVar4, 20) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_SET(LVar6, -8) - EVT_SET(LVar7, 20) - EVT_SETF(LVar8, EVT_FLOAT(1.0)) - EVT_ELSE - EVT_SET(LVar6, -3) - EVT_SET(LVar7, 8) - EVT_SETF(LVar8, INVALID_VAR) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, LVar6) - EVT_ADD(LVar1, LVar7) - EVT_PLAY_EFFECT(EFFECT_SHAPE_SPELL, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 30, 0) - EVT_WAIT(35) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_CASE_EQ(HIT_RESULT_LUCKY) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 12) - EVT_PLAY_EFFECT(EFFECT_BLAST, 0, LVar0, LVar1, LVar2, EVT_FLOAT(3.0), 30, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAGE, ANIM_MageJrTroopa_BurnStaff) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(40) - EVT_SUB(LVar0, 7) - EVT_ADD(LVar1, 14) - EVT_ADD(LVar2, 4) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2, 0, 0, 0) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAGE, ANIM_MageJrTroopa_Idle) - EVT_END_THREAD - EVT_WAIT(20) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_WAIT(40) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) - EVT_ADD(LVar4, 20) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_SET(LVar6, -8) - EVT_SET(LVar7, 20) - EVT_SETF(LVar8, EVT_FLOAT(1.0)) - EVT_ELSE - EVT_SET(LVar6, -3) - EVT_SET(LVar7, 8) - EVT_SETF(LVar8, INVALID_VAR) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, LVar6) - EVT_ADD(LVar1, LVar7) - EVT_PLAY_EFFECT(EFFECT_SHAPE_SPELL, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 15, 0) - EVT_WAIT(15) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, (DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT), 0, 0, DMG_SPELL, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(SetAnimation, ACTOR_SELF, PRT_MAGE, ANIM_MageJrTroopa_RaiseStaff) + Wait(8) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Set(LVar3, 0) + Set(LVar4, 36) + SetF(LVar5, Float(1.0)) + Else + Set(LVar3, 0) + Set(LVar4, 14) + SetF(LVar5, INVALID_VAR) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, LVar3) + Add(LVar1, LVar4) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, LVar5, 30, 0) + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAGE, ANIM_MageJrTroopa_SwingStaff) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_NO_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseEq(HIT_RESULT_MISS) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) + Call(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) + Sub(LVar3, 120) + Add(LVar4, 20) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Set(LVar6, -8) + Set(LVar7, 20) + SetF(LVar8, Float(1.0)) + Else + Set(LVar6, -3) + Set(LVar7, 8) + SetF(LVar8, INVALID_VAR) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, LVar6) + Add(LVar1, LVar7) + PlayEffect(EFFECT_SHAPE_SPELL, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 30, 0) + Wait(35) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + CaseEq(HIT_RESULT_LUCKY) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 12) + PlayEffect(EFFECT_BLAST, 0, LVar0, LVar1, LVar2, Float(3.0), 30, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAGE, ANIM_MageJrTroopa_BurnStaff) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Wait(40) + Sub(LVar0, 7) + Add(LVar1, 14) + Add(LVar2, 4) + PlayEffect(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2, 0, 0, 0) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAGE, ANIM_MageJrTroopa_Idle) + EndThread + Wait(20) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + Wait(40) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndSwitch + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) + Call(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) + Add(LVar4, 20) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Set(LVar6, -8) + Set(LVar7, 20) + SetF(LVar8, Float(1.0)) + Else + Set(LVar6, -3) + Set(LVar7, 8) + SetF(LVar8, INVALID_VAR) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, LVar6) + Add(LVar1, LVar7) + PlayEffect(EFFECT_SHAPE_SPELL, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 15, 0) + Wait(15) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, (DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT), 0, 0, DMG_SPELL, BS_FLAGS1_TRIGGER_EVENTS) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/Dist3D.inc.c" // Not used? @@ -1194,431 +1194,431 @@ EvtScript N(EVS_Attack_MagicSpell) = { #include "common/SetBackgroundAlpha.inc.c" EvtScript N(EVS_Attack_LightningBolt) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAGE, ANIM_MageJrTroopa_RaiseStaff) - EVT_WAIT(8) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 36) - EVT_SETF(LVar5, EVT_FLOAT(1.0)) - EVT_ELSE - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 14) - EVT_SETF(LVar5, INVALID_VAR) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, LVar5, 30, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 60) - EVT_WAIT(30) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BIG_POWER_UP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAGE, ANIM_MageJrTroopa_SwingStaff) - EVT_CALL(N(UnkBackgroundFunc3)) - EVT_CALL(MakeLerp, 0, 200, 60, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetBackgroundAlpha), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(RandInt, 40, LVar1) - EVT_ADD(LVar0, LVar1) - EVT_ADD(LVar0, 50) - EVT_SET(LVar1, 200) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LIGHTNING_STRIKE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_NO_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(HIT_RESULT_MISS) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, 0, LVar5) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 18, 0) - EVT_WAIT(20) - EVT_CALL(MakeLerp, 200, 0, 60, EASING_LINEAR) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetBackgroundAlpha), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(20) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_CASE_EQ(HIT_RESULT_LUCKY) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RandInt, 40, LVar1) - EVT_SUB(LVar0, LVar1) - EVT_SET(LVar1, 200) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, 0, LVar5, EVT_FLOAT(1.0), 18, 0) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 12) - EVT_PLAY_EFFECT(EFFECT_BLAST, 0, LVar0, LVar1, LVar2, EVT_FLOAT(3.0), 30, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAGE, ANIM_MageJrTroopa_BurnStaff) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(40) - EVT_SUB(LVar0, 7) - EVT_ADD(LVar1, 14) - EVT_ADD(LVar2, 4) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2, 0, 0, 0) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAGE, ANIM_MageJrTroopa_Idle) - EVT_END_THREAD - EVT_WAIT(20) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(MakeLerp, 200, 0, 60, EASING_LINEAR) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetBackgroundAlpha), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(20) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, 0, LVar5) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 18, 0) - EVT_WAIT(14) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, (DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT), 0, SUPPRESS_EVENT_FLAG_10000, DMG_LIGHTNING, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MakeLerp, 200, 0, 60, EASING_LINEAR) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetBackgroundAlpha), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(20) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAGE, ANIM_MageJrTroopa_RaiseStaff) + Wait(8) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Set(LVar3, 0) + Set(LVar4, 36) + SetF(LVar5, Float(1.0)) + Else + Set(LVar3, 0) + Set(LVar4, 14) + SetF(LVar5, INVALID_VAR) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, LVar3) + Add(LVar1, LVar4) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, LVar5, 30, 0) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 60) + Wait(30) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BIG_POWER_UP) + Call(SetAnimation, ACTOR_SELF, PRT_MAGE, ANIM_MageJrTroopa_SwingStaff) + Call(N(UnkBackgroundFunc3)) + Call(MakeLerp, 0, 200, 60, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(N(SetBackgroundAlpha), LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(RandInt, 40, LVar1) + Add(LVar0, LVar1) + Add(LVar0, 50) + Set(LVar1, 200) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LIGHTNING_STRIKE) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_NO_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseEq(HIT_RESULT_MISS) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, 0, LVar5) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.0), 18, 0) + Wait(20) + Call(MakeLerp, 200, 0, 60, EASING_LINEAR) + Label(2) + Call(UpdateLerp) + Call(N(SetBackgroundAlpha), LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(2) + EndIf + Wait(20) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + CaseEq(HIT_RESULT_LUCKY) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RandInt, 40, LVar1) + Sub(LVar0, LVar1) + Set(LVar1, 200) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, 0, LVar5, Float(1.0), 18, 0) + Thread + Wait(10) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 12) + PlayEffect(EFFECT_BLAST, 0, LVar0, LVar1, LVar2, Float(3.0), 30, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAGE, ANIM_MageJrTroopa_BurnStaff) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Wait(40) + Sub(LVar0, 7) + Add(LVar1, 14) + Add(LVar2, 4) + PlayEffect(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2, 0, 0, 0) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAGE, ANIM_MageJrTroopa_Idle) + EndThread + Wait(20) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(MakeLerp, 200, 0, 60, EASING_LINEAR) + Label(2) + Call(UpdateLerp) + Call(N(SetBackgroundAlpha), LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(2) + EndIf + Wait(20) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, 0, LVar5) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.0), 18, 0) + Wait(14) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, (DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT), 0, SUPPRESS_EVENT_FLAG_10000, DMG_LIGHTNING, BS_FLAGS1_TRIGGER_EVENTS) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MakeLerp, 200, 0, 60, EASING_LINEAR) + Label(2) + Call(UpdateLerp) + Call(N(SetBackgroundAlpha), LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(2) + EndIf + Wait(20) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Move_HealSelf) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAGE, ANIM_MageJrTroopa_RaiseStaff) - EVT_WAIT(8) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 36) - EVT_SETF(LVar5, EVT_FLOAT(1.0)) - EVT_ELSE - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 14) - EVT_SETF(LVar5, INVALID_VAR) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, LVar5, 30, 0) - EVT_WAIT(30) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_GATHER_SMALL) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_ADD(LVar2, 50) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 1, LVar1, LVar2, LVar3, 10, 0) - EVT_PLAY_EFFECT(EFFECT_RECOVER, 2, LVar1, LVar2, LVar3, 0, 0) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAGE, ANIM_MageJrTroopa_Idle) - EVT_WAIT(10) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar0) - EVT_MUL(LVar0, 17) - EVT_DIV(LVar0, 100) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) - EVT_WAIT(30) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_STAR_BOUNCE_A) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(HealActor, ACTOR_SELF, LVar0, FALSE) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_WAIT(30) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 30) + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAGE, ANIM_MageJrTroopa_RaiseStaff) + Wait(8) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Set(LVar3, 0) + Set(LVar4, 36) + SetF(LVar5, Float(1.0)) + Else + Set(LVar3, 0) + Set(LVar4, 14) + SetF(LVar5, INVALID_VAR) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, LVar3) + Add(LVar1, LVar4) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, LVar5, 30, 0) + Wait(30) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_GATHER_SMALL) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Add(LVar2, 50) + PlayEffect(EFFECT_SPARKLES, 1, LVar1, LVar2, LVar3, 10, 0) + PlayEffect(EFFECT_RECOVER, 2, LVar1, LVar2, LVar3, 0, 0) + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAGE, ANIM_MageJrTroopa_Idle) + Wait(10) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar0) + Mul(LVar0, 17) + Div(LVar0, 100) + Thread + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) + Wait(30) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_STAR_BOUNCE_A) + EndThread + Thread + Call(FreezeBattleState, TRUE) + Call(HealActor, ACTOR_SELF, LVar0, FALSE) + Call(FreezeBattleState, FALSE) + EndThread + Wait(30) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_DialogueFlags, LVar0) - EVT_IF_NOT_FLAG(LVar0, AVAL_Dialogue_Begin) - EVT_BITWISE_OR_CONST(LVar0, AVAL_Dialogue_Begin) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_DialogueFlags, LVar0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(ActorSpeak, MSG_CH8_005D, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointTalk) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Idle) - EVT_END_IF - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) - EVT_CASE_EQ(PHASE_ENEMY_END) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) //@bug duplicate case, should be PHASE_PLAYER_END - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) + Call(GetActorVar, ACTOR_SELF, AVAR_DialogueFlags, LVar0) + IfNotFlag(LVar0, AVAL_Dialogue_Begin) + BitwiseOrConst(LVar0, AVAL_Dialogue_Begin) + Call(SetActorVar, ACTOR_SELF, AVAR_DialogueFlags, LVar0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Call(ActorSpeak, MSG_CH8_005D, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointTalk) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Idle) + EndIf + CaseEq(PHASE_ENEMY_BEGIN) + CaseEq(PHASE_ENEMY_END) + CaseEq(PHASE_PLAYER_BEGIN) //@bug duplicate case, should be PHASE_PLAYER_END + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_GetFormAnims) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Form, LVar0) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(FORM_ANIM_HURT) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Form_Flying) - EVT_SET(LVar1, ANIM_SpikedParaJrTroopa_Hurt) - EVT_CASE_EQ(AVAL_Form_Mage) - EVT_SET(LVar1, ANIM_MageJrTroopa_Hurt) - EVT_CASE_DEFAULT - EVT_SET(LVar1, ANIM_JrTroopa_Hurt) - EVT_END_SWITCH - EVT_CASE_EQ(FORM_ANIM_BURN) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Form_Flying) - EVT_SET(LVar1, ANIM_SpikedParaJrTroopa_BurnHurt) - EVT_SET(LVar2, ANIM_SpikedParaJrTroopa_BurnStill) - EVT_CASE_EQ(AVAL_Form_Mage) - EVT_SET(LVar1, ANIM_MageJrTroopa_BurnHurt) - EVT_SET(LVar2, ANIM_MageJrTroopa_BurnStill) - EVT_CASE_DEFAULT - EVT_SET(LVar1, ANIM_JrTroopa_BurnHurt) - EVT_SET(LVar2, ANIM_JrTroopa_BurnStill) - EVT_END_SWITCH - EVT_CASE_EQ(FORM_ANIM_FLAIL) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Form_Flying) - EVT_SET(LVar1, ANIM_SpikedParaJrTroopa_Flail) - EVT_CASE_EQ(AVAL_Form_Mage) - EVT_SET(LVar1, ANIM_MageJrTroopa_Flail) - EVT_CASE_DEFAULT - EVT_SET(LVar1, ANIM_JrTroopa_Flail) - EVT_END_SWITCH - EVT_CASE_EQ(FORM_ANIM_TALK) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Form_Flying) - EVT_SET(LVar1, ANIM_SpikedParaJrTroopa_Talk) - EVT_CASE_EQ(AVAL_Form_Mage) - EVT_SET(LVar1, ANIM_MageJrTroopa_Talk) - EVT_CASE_DEFAULT - EVT_SET(LVar1, ANIM_JrTroopa_Talk) - EVT_END_SWITCH - EVT_CASE_EQ(FORM_ANIM_RETURN) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Form_Flying) - EVT_SET(LVar1, ANIM_SpikedParaJrTroopa_FlyFast) - EVT_CASE_EQ(AVAL_Form_Mage) - EVT_SET(LVar1, ANIM_MageJrTroopa_Run) - EVT_CASE_DEFAULT - EVT_SET(LVar1, ANIM_JrTroopa_Run) - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Form_Flying) - EVT_SET(LVar1, ANIM_SpikedParaJrTroopa_Idle) - EVT_CASE_EQ(AVAL_Form_Mage) - EVT_SET(LVar1, ANIM_MageJrTroopa_Idle) - EVT_CASE_DEFAULT - EVT_SET(LVar1, ANIM_JrTroopa_Idle) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_Form, LVar0) + Switch(LVar1) + CaseEq(FORM_ANIM_HURT) + Switch(LVar0) + CaseEq(AVAL_Form_Flying) + Set(LVar1, ANIM_SpikedParaJrTroopa_Hurt) + CaseEq(AVAL_Form_Mage) + Set(LVar1, ANIM_MageJrTroopa_Hurt) + CaseDefault + Set(LVar1, ANIM_JrTroopa_Hurt) + EndSwitch + CaseEq(FORM_ANIM_BURN) + Switch(LVar0) + CaseEq(AVAL_Form_Flying) + Set(LVar1, ANIM_SpikedParaJrTroopa_BurnHurt) + Set(LVar2, ANIM_SpikedParaJrTroopa_BurnStill) + CaseEq(AVAL_Form_Mage) + Set(LVar1, ANIM_MageJrTroopa_BurnHurt) + Set(LVar2, ANIM_MageJrTroopa_BurnStill) + CaseDefault + Set(LVar1, ANIM_JrTroopa_BurnHurt) + Set(LVar2, ANIM_JrTroopa_BurnStill) + EndSwitch + CaseEq(FORM_ANIM_FLAIL) + Switch(LVar0) + CaseEq(AVAL_Form_Flying) + Set(LVar1, ANIM_SpikedParaJrTroopa_Flail) + CaseEq(AVAL_Form_Mage) + Set(LVar1, ANIM_MageJrTroopa_Flail) + CaseDefault + Set(LVar1, ANIM_JrTroopa_Flail) + EndSwitch + CaseEq(FORM_ANIM_TALK) + Switch(LVar0) + CaseEq(AVAL_Form_Flying) + Set(LVar1, ANIM_SpikedParaJrTroopa_Talk) + CaseEq(AVAL_Form_Mage) + Set(LVar1, ANIM_MageJrTroopa_Talk) + CaseDefault + Set(LVar1, ANIM_JrTroopa_Talk) + EndSwitch + CaseEq(FORM_ANIM_RETURN) + Switch(LVar0) + CaseEq(AVAL_Form_Flying) + Set(LVar1, ANIM_SpikedParaJrTroopa_FlyFast) + CaseEq(AVAL_Form_Mage) + Set(LVar1, ANIM_MageJrTroopa_Run) + CaseDefault + Set(LVar1, ANIM_JrTroopa_Run) + EndSwitch + CaseDefault + Switch(LVar0) + CaseEq(AVAL_Form_Flying) + Set(LVar1, ANIM_SpikedParaJrTroopa_Idle) + CaseEq(AVAL_Form_Mage) + Set(LVar1, ANIM_MageJrTroopa_Idle) + CaseDefault + Set(LVar1, ANIM_JrTroopa_Idle) + EndSwitch + EndSwitch + Return + End }; EvtScript N(EVS_JrTroopa_Death) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Form, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Form_Flying) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar1, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_CALL(FallToGoal, ACTOR_SELF, 10) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(HPBarToCurrent, ACTOR_SELF) - EVT_CALL(ShowHealthBar, ACTOR_SELF) - EVT_LABEL(0) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_ADD(LVar2, 10) - EVT_LOOP(3) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) - EVT_WAIT(3) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BASE, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_DefeatedBegin) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(15) - EVT_CALL(PlaySound, SOUND_ACTOR_DEATH) - EVT_CALL(DropStarPoints, ACTOR_SELF) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(SetBattleCamZoom, 260) - EVT_CALL(SetBattleCamOffsetZ, 15) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_KNOCKOUT_CHIRPING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Defeated) - EVT_WAIT(60) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_RETURN - EVT_CASE_EQ(AVAL_Form_Mage) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetDamageSource, LVar5) - EVT_SWITCH(LVar5) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_SLAP_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_FAN_SMACK_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_SLAP_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_SLAP_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_FAN_SMACK_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_SLAP_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_SPIN_SMASH) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SET(LVar2, 0) - EVT_LOOP(24) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar2) - EVT_ADD(LVar2, 30) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_END_SWITCH - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_ADD(LVar2, 10) - EVT_LOOP(3) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) - EVT_WAIT(3) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAGE, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BASE, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_DefeatedBegin) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(15) - EVT_CALL(PlaySound, SOUND_ACTOR_DEATH) - EVT_CALL(DropStarPoints, ACTOR_SELF) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(SetBattleCamZoom, 260) - EVT_CALL(SetBattleCamOffsetZ, 15) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_KNOCKOUT_CHIRPING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Defeated) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_BASE, EVT_PTR(N(DefeatedAnims))) - EVT_WAIT(60) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_SET(LVar1, FORM_ANIM_HURT) - EVT_EXEC_WAIT(N(EVS_GetFormAnims)) - EVT_EXEC_WAIT(N(EVS_JrTroopa_BaseDeath)) - EVT_RETURN - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_Form, LVar0) + Switch(LVar0) + CaseEq(AVAL_Form_Flying) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + IfEq(LVar1, 0) + Goto(0) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) + Call(HideHealthBar, ACTOR_SELF) + Call(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Call(FallToGoal, ACTOR_SELF, 10) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(HPBarToCurrent, ACTOR_SELF) + Call(ShowHealthBar, ACTOR_SELF) + Label(0) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 10) + Add(LVar2, 10) + Loop(3) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) + Wait(3) + EndLoop + EndThread + Call(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BASE, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_DefeatedBegin) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Wait(15) + Call(PlaySound, SOUND_ACTOR_DEATH) + Call(DropStarPoints, ACTOR_SELF) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(SetBattleCamZoom, 260) + Call(SetBattleCamOffsetZ, 15) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 30) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_KNOCKOUT_CHIRPING) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Defeated) + Wait(60) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Return + CaseEq(AVAL_Form_Mage) + Call(HideHealthBar, ACTOR_SELF) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetDamageSource, LVar5) + Switch(LVar5) + CaseOrEq(DMG_SRC_NEXT_SLAP_LEFT) + CaseOrEq(DMG_SRC_NEXT_FAN_SMACK_LEFT) + CaseOrEq(DMG_SRC_LAST_SLAP_LEFT) + CaseOrEq(DMG_SRC_LAST_FAN_SMACK_LEFT) + CaseOrEq(DMG_SRC_NEXT_SLAP_RIGHT) + CaseOrEq(DMG_SRC_NEXT_FAN_SMACK_RIGHT) + CaseOrEq(DMG_SRC_LAST_SLAP_RIGHT) + CaseOrEq(DMG_SRC_LAST_FAN_SMACK_RIGHT) + CaseOrEq(DMG_SRC_SPIN_SMASH) + EndCaseGroup + CaseDefault + Set(LVar2, 0) + Loop(24) + Call(SetActorYaw, ACTOR_SELF, LVar2) + Add(LVar2, 30) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + EndSwitch + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 10) + Add(LVar2, 10) + Loop(3) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) + Wait(3) + EndLoop + EndThread + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAGE, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BASE, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_DefeatedBegin) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Wait(15) + Call(PlaySound, SOUND_ACTOR_DEATH) + Call(DropStarPoints, ACTOR_SELF) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(SetBattleCamZoom, 260) + Call(SetBattleCamOffsetZ, 15) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 30) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_KNOCKOUT_CHIRPING) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Defeated) + Call(SetIdleAnimations, ACTOR_SELF, PRT_BASE, Ref(N(DefeatedAnims))) + Wait(60) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Return + CaseDefault + Set(LVar1, FORM_ANIM_HURT) + ExecWait(N(EVS_GetFormAnims)) + ExecWait(N(EVS_JrTroopa_BaseDeath)) + Return + EndSwitch + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Form, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Form_Flying) - EVT_SET(LVar1, FORM_ANIM_RETURN) - EVT_EXEC_WAIT(N(EVS_GetFormAnims)) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) - EVT_CASE_EQ(AVAL_Form_Mage) - EVT_SET(LVar1, FORM_ANIM_RETURN) - EVT_EXEC_WAIT(N(EVS_GetFormAnims)) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CASE_DEFAULT - EVT_SET(LVar1, FORM_ANIM_RETURN) - EVT_EXEC_WAIT(N(EVS_GetFormAnims)) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(ResetAllActorSounds, ACTOR_SELF) + Call(GetActorVar, ACTOR_SELF, AVAR_Form, LVar0) + Switch(LVar0) + CaseEq(AVAL_Form_Flying) + Set(LVar1, FORM_ANIM_RETURN) + ExecWait(N(EVS_GetFormAnims)) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(FlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) + CaseEq(AVAL_Form_Mage) + Set(LVar1, FORM_ANIM_RETURN) + ExecWait(N(EVS_GetFormAnims)) + ExecWait(EVS_Enemy_ReturnHome) + CaseDefault + Set(LVar1, FORM_ANIM_RETURN) + ExecWait(N(EVS_GetFormAnims)) + ExecWait(EVS_Enemy_ReturnHome) + EndSwitch + Return + End }; EvtScript N(EVS_TryFearReaction) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_SpookReact, LVar0) - EVT_IF_EQ(LVar0, AVAL_SpookReact_Ready) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa)) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Form, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Form_Flying) - EVT_CALL(ActorSpeak, MSG_Menus_019A, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_Talk, ANIM_SpikedParaJrTroopa_Idle) - EVT_CASE_EQ(AVAL_Form_Mage) - EVT_CALL(ActorSpeak, MSG_Menus_019A, ACTOR_SELF, PRT_MAGE, ANIM_MageJrTroopa_Talk, ANIM_MageJrTroopa_PointIdle) - EVT_CASE_DEFAULT - EVT_CALL(ActorSpeak, MSG_Menus_019A, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle) - EVT_END_SWITCH - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_UnusedBrag, LVar0) - EVT_IF_NE(LVar0, TRUE) - EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus)) - EVT_END_IF - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_None) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_SpookReact, LVar0) + IfEq(LVar0, AVAL_SpookReact_Ready) + Wait(10) + ExecWait(N(EVS_Cam_FocusOnJrTroopa)) + Call(GetActorVar, ACTOR_SELF, AVAR_Form, LVar0) + Switch(LVar0) + CaseEq(AVAL_Form_Flying) + Call(ActorSpeak, MSG_Menus_019A, ACTOR_SELF, PRT_FLYING, ANIM_SpikedParaJrTroopa_Talk, ANIM_SpikedParaJrTroopa_Idle) + CaseEq(AVAL_Form_Mage) + Call(ActorSpeak, MSG_Menus_019A, ACTOR_SELF, PRT_MAGE, ANIM_MageJrTroopa_Talk, ANIM_MageJrTroopa_PointIdle) + CaseDefault + Call(ActorSpeak, MSG_Menus_019A, ACTOR_SELF, PRT_BASE, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle) + EndSwitch + Call(GetActorVar, ACTOR_SELF, AVAR_UnusedBrag, LVar0) + IfNe(LVar0, TRUE) + ExecWait(N(EVS_Cam_ResetFocus)) + EndIf + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_None) + Return + End }; diff --git a/src/battle/area/kmr_part_3/actor/jr_troopa.c b/src/battle/area/kmr_part_3/actor/jr_troopa.c index eb35ea4b053..8636be966ba 100644 --- a/src/battle/area/kmr_part_3/actor/jr_troopa.c +++ b/src/battle/area/kmr_part_3/actor/jr_troopa.c @@ -112,33 +112,33 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Cam_FocusOnJrTroopa) = { - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_07) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamOffsetZ, 38) - EVT_CALL(SetBattleCamZoom, 256) - EVT_CALL(MoveBattleCamOver, 15) - EVT_RETURN - EVT_END + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(UseBattleCamPreset, BTL_CAM_PRESET_07) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamOffsetZ, 38) + Call(SetBattleCamZoom, 256) + Call(MoveBattleCamOver, 15) + Return + End }; EvtScript N(EVS_Cam_ResetFocus) = { - EVT_CALL(EnableBattleStatusBar, TRUE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 12) - EVT_RETURN - EVT_END + Call(EnableBattleStatusBar, TRUE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 12) + Return + End }; EvtScript N(EVS_Cam_FocusOnGoompa) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_55) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_PRESET_55) + Call(MoveBattleCamOver, 30) + Call(BattleCamTargetActor, ACTOR_SELF) + Return + End }; s32 N(DefeatedAnims)[] = { @@ -147,356 +147,356 @@ s32 N(DefeatedAnims)[] = { }; EvtScript N(EVS_JrTroopa_Death) = { - EVT_SET(LVarA, LVar0) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, LVarA, LVar1) - EVT_WAIT(10) - EVT_CALL(GetDamageSource, LVar5) - EVT_SWITCH(LVar5) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_SLAP_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_FAN_SMACK_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_SLAP_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_SLAP_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_FAN_SMACK_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_SLAP_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_SPIN_SMASH) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SET(LVar2, 0) - EVT_LOOP(24) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar2) - EVT_ADD(LVar2, 30) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_END_SWITCH - EVT_LABEL(0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_ADD(LVar2, 10) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) - EVT_CALL(PlaySound, SOUND_ACTOR_DEATH) - EVT_CALL(DropStarPoints, ACTOR_SELF) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(SetBattleCamZoom, 260) - EVT_CALL(SetBattleCamOffsetZ, 15) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_KNOCKOUT_CHIRPING) - EVT_CALL(SetAnimation, ACTOR_SELF, LVarA, ANIM_JrTroopa_Collapse) - EVT_WAIT(12) - EVT_CALL(SetAnimation, ACTOR_SELF, LVarA, ANIM_JrTroopa_Defeated) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, LVarA, EVT_PTR(N(DefeatedAnims))) - EVT_WAIT(30) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(15) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 30) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 60) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 90) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 120) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 150) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 180) - EVT_WAIT(5) - EVT_CALL(ActorSpeak, MSG_CH0_00B4, ACTOR_PARTNER, 0, ANIM_Goompa_Talk, ANIM_Goompa_Idle) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 150) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 120) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 90) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 60) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 30) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 0) - EVT_WAIT(5) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Call(HideHealthBar, ACTOR_SELF) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetAnimation, ACTOR_SELF, LVarA, LVar1) + Wait(10) + Call(GetDamageSource, LVar5) + Switch(LVar5) + CaseOrEq(DMG_SRC_NEXT_SLAP_LEFT) + CaseOrEq(DMG_SRC_NEXT_FAN_SMACK_LEFT) + CaseOrEq(DMG_SRC_LAST_SLAP_LEFT) + CaseOrEq(DMG_SRC_LAST_FAN_SMACK_LEFT) + CaseOrEq(DMG_SRC_NEXT_SLAP_RIGHT) + CaseOrEq(DMG_SRC_NEXT_FAN_SMACK_RIGHT) + CaseOrEq(DMG_SRC_LAST_SLAP_RIGHT) + CaseOrEq(DMG_SRC_LAST_FAN_SMACK_RIGHT) + CaseOrEq(DMG_SRC_SPIN_SMASH) + EndCaseGroup + CaseDefault + Set(LVar2, 0) + Loop(24) + Call(SetActorYaw, ACTOR_SELF, LVar2) + Add(LVar2, 30) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + EndSwitch + Label(0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 10) + Add(LVar2, 10) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) + Call(PlaySound, SOUND_ACTOR_DEATH) + Call(DropStarPoints, ACTOR_SELF) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(SetBattleCamZoom, 260) + Call(SetBattleCamOffsetZ, 15) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 30) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_KNOCKOUT_CHIRPING) + Call(SetAnimation, ACTOR_SELF, LVarA, ANIM_JrTroopa_Collapse) + Wait(12) + Call(SetAnimation, ACTOR_SELF, LVarA, ANIM_JrTroopa_Defeated) + Call(SetIdleAnimations, ACTOR_SELF, LVarA, Ref(N(DefeatedAnims))) + Wait(30) + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(15) + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(SetActorYaw, ACTOR_PLAYER, 30) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 60) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 90) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 120) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 150) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 180) + Wait(5) + Call(ActorSpeak, MSG_CH0_00B4, ACTOR_PARTNER, 0, ANIM_Goompa_Talk, ANIM_Goompa_Idle) + Call(SetActorYaw, ACTOR_PLAYER, 150) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 120) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 90) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 60) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 30) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 0) + Wait(5) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Return + End }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Goompa_Introduction_Done, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_Init) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_JrTroopa_PoweredUp, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_AttackDamage, DMG_INITIAL) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_JustGettingStarted, FALSE) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Goompa_Introduction_Done, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_Init) + Call(SetActorVar, ACTOR_SELF, AVAR_JrTroopa_PoweredUp, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_AttackDamage, DMG_INITIAL) + Call(SetActorVar, ACTOR_SELF, AVAR_JustGettingStarted, FALSE) + Return + End }; // unused EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HitReact_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_HitReact_Init) - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar1) - EVT_IF_NE(LVar1, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_Hit) - EVT_END_IF - EVT_END_IF - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_JrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_JrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_JrTroopa_Panic) - EVT_EXEC_WAIT(N(EVS_JrTroopa_Death)) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_JrTroopa_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetActorVar, ACTOR_SELF, AVAR_HitReact_State, LVar0) + IfEq(LVar0, AVAL_HitReact_Init) + Call(GetLastDamage, ACTOR_SELF, LVar1) + IfNe(LVar1, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_Hit) + EndIf + EndIf + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_JrTroopa_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_JrTroopa_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_JrTroopa_Panic) + ExecWait(N(EVS_JrTroopa_Death)) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_JrTroopa_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_TurnCount, 1) - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar1) - EVT_SUB(LVar1, LVar0) - EVT_IF_EQ(LVar1, 3) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_JustGettingStarted, LVar0) - EVT_IF_FALSE(LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_JustGettingStarted, TRUE) - EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa)) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(ActorSpeak, MSG_CH0_00B1, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle) - EVT_END_IF - EVT_END_IF - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Run) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Jump) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_JR_TOOPA_JUMP, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_AttackDamage, LVar1) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, LVar1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(6) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 10) - EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Run) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Midair) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Fall) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_WAIT(2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_AttackDamage, LVar1) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, LVar1, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle) - EVT_WAIT(10) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Run) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(AddActorVar, ACTOR_SELF, AVAR_TurnCount, 1) + Call(GetActorHP, ACTOR_SELF, LVar0) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar1) + Sub(LVar1, LVar0) + IfEq(LVar1, 3) + Call(GetActorVar, ACTOR_SELF, AVAR_JustGettingStarted, LVar0) + IfFalse(LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_JustGettingStarted, TRUE) + ExecWait(N(EVS_Cam_FocusOnJrTroopa)) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(ActorSpeak, MSG_CH0_00B1, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle) + EndIf + EndIf + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Run) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle) + Call(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Jump) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_JR_TOOPA_JUMP, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_AttackDamage, LVar1) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, LVar1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseEq(6) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Sub(LVar0, 10) + Call(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle) + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Run) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle) + Return + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + Thread + Wait(3) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Midair) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Fall) + EndThread + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Wait(2) + Call(GetActorVar, ACTOR_SELF, AVAR_AttackDamage, LVar1) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, LVar1, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle) + Wait(10) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Run) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) // trying showing the scene where Goompa introduces the player to Jr Troopa - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Goompa_Introduction_Done, LVar0) - EVT_IF_FALSE(LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Goompa_Introduction_Done, TRUE) - EVT_WAIT(15) - EVT_CALL(EnableBattleStatusBar, FALSE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_THREAD - EVT_SET(LVar1, 0) - EVT_WAIT(8) - EVT_LOOP(5) - EVT_WAIT(1) - EVT_SUB(LVar1, 36) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, LVar1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Punch) - EVT_CALL(ActorSpeak, MSG_CH0_00AF, ACTOR_PARTNER, 0, ANIM_Goompa_Talk, ANIM_Goompa_Idle) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_NodYes) - EVT_WAIT(10) - EVT_THREAD - EVT_SET(LVar1, 180) - EVT_WAIT(4) - EVT_LOOP(5) - EVT_WAIT(1) - EVT_ADD(LVar1, 36) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, LVar1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(EnableBattleStatusBar, TRUE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 4) - EVT_END_IF - EVT_END_IF /// @bug END_IF with no IF - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Goompa_Introduction_Done, LVar0) + IfFalse(LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_Goompa_Introduction_Done, TRUE) + Wait(15) + Call(EnableBattleStatusBar, FALSE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Thread + Set(LVar1, 0) + Wait(8) + Loop(5) + Wait(1) + Sub(LVar1, 36) + Call(SetActorYaw, ACTOR_PLAYER, LVar1) + EndLoop + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Punch) + Call(ActorSpeak, MSG_CH0_00AF, ACTOR_PARTNER, 0, ANIM_Goompa_Talk, ANIM_Goompa_Idle) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_NodYes) + Wait(10) + Thread + Set(LVar1, 180) + Wait(4) + Loop(5) + Wait(1) + Add(LVar1, 36) + Call(SetActorYaw, ACTOR_PLAYER, LVar1) + EndLoop + EndThread + Wait(10) + Call(EnableBattleStatusBar, TRUE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 4) + EndIf + EndIf /// @bug END_IF with no IF + CaseEq(PHASE_ENEMY_BEGIN) // trying showing the scene where Goompa congratulates the player for dealing damage to Jr Troopa - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HitReact_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_HitReact_Hit) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_Done) - EVT_EXEC_WAIT(N(EVS_Cam_FocusOnGoompa)) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_THREAD - EVT_SET(LVar1, 0) - EVT_LOOP(5) - EVT_WAIT(1) - EVT_SUB(LVar1, 36) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, LVar1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(ActorSpeak, MSG_CH0_00B0, ACTOR_PARTNER, 0, ANIM_Goompa_Talk, ANIM_Goompa_Idle) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_ThumbsUp) - EVT_WAIT(20) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 0) - EVT_WAIT(4) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_END_IF + Call(GetActorVar, ACTOR_SELF, AVAR_HitReact_State, LVar0) + IfEq(LVar0, AVAL_HitReact_Hit) + Call(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_Done) + ExecWait(N(EVS_Cam_FocusOnGoompa)) + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Thread + Set(LVar1, 0) + Loop(5) + Wait(1) + Sub(LVar1, 36) + Call(SetActorYaw, ACTOR_PLAYER, LVar1) + EndLoop + EndThread + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(ActorSpeak, MSG_CH0_00B0, ACTOR_PARTNER, 0, ANIM_Goompa_Talk, ANIM_Goompa_Idle) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_ThumbsUp) + Wait(20) + Call(SetActorYaw, ACTOR_PLAYER, 0) + Wait(4) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + EndIf // trying showing the scene where Jr Troopa powers up - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_JrTroopa_PoweredUp, LVar0) - EVT_IF_FALSE(LVar0) - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_IF_LE(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_JrTroopa_PoweredUp, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(ActorSpeak, MSG_CH0_00B2, ACTOR_PARTNER, 0, ANIM_Goompa_Talk, ANIM_Goompa_Idle) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa)) - EVT_CALL(ActorSpeak, MSG_CH0_00B3, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_JR_TROOPA_TRANSFORM) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_ChargeArmsUp) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 16) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, 1, 30, 0) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar1, LVar2, 1, 30, 0) - EVT_WAIT(30) - EVT_WAIT(20) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_AttackDamage, DMG_FULL_POWER) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle) - EVT_WAIT(20) - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_JrTroopa_PoweredUp, LVar0) + IfFalse(LVar0) + Call(GetActorHP, ACTOR_SELF, LVar0) + IfLe(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_JrTroopa_PoweredUp, TRUE) + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(ActorSpeak, MSG_CH0_00B2, ACTOR_PARTNER, 0, ANIM_Goompa_Talk, ANIM_Goompa_Idle) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + ExecWait(N(EVS_Cam_FocusOnJrTroopa)) + Call(ActorSpeak, MSG_CH0_00B3, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_JR_TROOPA_TRANSFORM) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_ChargeArmsUp) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 16) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, 1, 30, 0) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar1, LVar2, 1, 30, 0) + Wait(30) + Wait(20) + Call(SetActorVar, ACTOR_SELF, AVAR_AttackDamage, DMG_FULL_POWER) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_JrTroopa_Idle) + Wait(20) + EndIf + EndIf + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/area/kmr_part_3/actor/mage_jr_troopa.c b/src/battle/area/kmr_part_3/actor/mage_jr_troopa.c index bb2a742f2c2..231c831ac2c 100644 --- a/src/battle/area/kmr_part_3/actor/mage_jr_troopa.c +++ b/src/battle/area/kmr_part_3/actor/mage_jr_troopa.c @@ -160,461 +160,461 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_SetupFearReaction) = { - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar2) - EVT_IF_FLAG(LVar2, STATUS_FLAGS_IMMOBILIZED) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetBattleFlags, LVar2) - EVT_IF_FLAG(LVar2, BS_FLAGS1_PARTNER_ACTING) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar2, MOVE_SPOOK) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_Ready) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_EMOTE_QUESTION) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 30) - EVT_CALL(ShowEmote, 0, EMOTE_QUESTION, -45, 30, EMOTER_POS, LVar0, LVar1, LVar2, 5) - EVT_WAIT(30) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetStatusFlags, ACTOR_SELF, LVar2) + IfFlag(LVar2, STATUS_FLAGS_IMMOBILIZED) + Return + EndIf + Call(GetBattleFlags, LVar2) + IfFlag(LVar2, BS_FLAGS1_PARTNER_ACTING) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + IfEq(LVar2, MOVE_SPOOK) + Call(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_Ready) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_EMOTE_QUESTION) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 30) + Call(ShowEmote, 0, EMOTE_QUESTION, -45, 30, EMOTER_POS, LVar0, LVar1, LVar2, 5) + Wait(30) + EndIf + EndIf + Return + End }; EvtScript N(EVS_Transform) = { - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_JR_TROOPA_TRANSFORM) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 16) - EVT_ELSE - EVT_ADD(LVar1, 6) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, 1, 30, 0) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar1, LVar2, 1, 30, 0) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(32) - EVT_WAIT(1) - EVT_ADD(LVar0, 45) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, LVar0, 0) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(32) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_JR_TROOPA_NEW_POWER) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 40, 0) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, -4, 0, 0) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, -4, 4, 0) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, 4, 0, 0) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, 4, 4, 0) - EVT_RETURN - EVT_END + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_JR_TROOPA_TRANSFORM) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar1, 16) + Else + Add(LVar1, 6) + EndIf + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, 1, 30, 0) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar1, LVar2, 1, 30, 0) + Thread + Set(LVar0, 0) + Loop(32) + Wait(1) + Add(LVar0, 45) + Call(SetActorRotation, ACTOR_SELF, 0, LVar0, 0) + EndLoop + EndThread + Wait(32) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_JR_TROOPA_NEW_POWER) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 15) + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 40, 0) + PlayEffect(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, -4, 0, 0) + PlayEffect(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, -4, 4, 0) + PlayEffect(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, 4, 0, 0) + PlayEffect(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, 4, 4, 0) + Return + End }; EvtScript N(EVS_Cam_FocusOnJrTroopa) = { - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_07) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamOffsetZ, 38) - EVT_CALL(SetBattleCamZoom, 256) - EVT_CALL(MoveBattleCamOver, 15) - EVT_RETURN - EVT_END + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(UseBattleCamPreset, BTL_CAM_PRESET_07) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamOffsetZ, 38) + Call(SetBattleCamZoom, 256) + Call(MoveBattleCamOver, 15) + Return + End }; EvtScript N(EVS_Cam_ResetFocus) = { - EVT_CALL(EnableBattleStatusBar, TRUE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 12) - EVT_RETURN - EVT_END + Call(EnableBattleStatusBar, TRUE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 12) + Return + End }; EvtScript N(EVS_Cam_FocusOnGoompa) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_55) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_PRESET_55) + Call(MoveBattleCamOver, 30) + Call(BattleCamTargetActor, ACTOR_SELF) + Return + End }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_MagicBrag_State, AVAL_MagicBrag_None) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_DamageBrag_State, AVAL_DamageBrag_None) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_None) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_MagicBrag_State, AVAL_MagicBrag_None) + Call(SetActorVar, ACTOR_SELF, AVAR_DamageBrag_State, AVAL_DamageBrag_None) + Call(SetActorVar, ACTOR_SELF, AVAR_Unused, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_None) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_SET_CONST(LVar0, PRT_BASE) - EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_BASE) - EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_SetupFearReaction)) - EVT_EXEC_WAIT(N(EVS_TryFearReaction)) - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_BASE) - EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_BASE) - EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Still) - EVT_EXEC_WAIT(N(EVS_JrTroopa_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET(LVar0, PRT_BASE) - EVT_SET(LVar1, ANIM_MageJrTroopa_BurnHurt) - EVT_SET(LVar2, ANIM_MageJrTroopa_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET(LVar0, PRT_BASE) - EVT_SET(LVar1, ANIM_MageJrTroopa_BurnHurt) - EVT_SET(LVar2, ANIM_MageJrTroopa_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_BASE) - EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_BurnStill) - EVT_EXEC_WAIT(N(EVS_JrTroopa_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_BASE) - EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_BASE) - EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_BASE) - EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Hurt) - EVT_EXEC_WAIT(N(EVS_JrTroopa_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_BASE) - EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_BASE) - EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_SET_CONST(LVar0, PRT_BASE) - EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Run) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_BASE) - EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_BASE) - EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_SET_CONST(LVar0, PRT_BASE) - EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Still) - EVT_EXEC_WAIT(N(EVS_JrTroopa_Death)) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_BASE) - EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_EXEC_WAIT(N(EVS_SetupFearReaction)) - EVT_EXEC_WAIT(N(EVS_TryFearReaction)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Flail) - EVT_WAIT(1000) - EVT_END_IF - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Flail) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa)) - EVT_CALL(ActorSpeak, MSG_Menus_019B, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Talk, ANIM_MageJrTroopa_PointIdle) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Idle) - EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus)) - EVT_END_IF - EVT_CASE_EQ(EVENT_SPIKE_CONTACT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Hurt) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Idle) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_SET_CONST(LVar0, PRT_BASE) - EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Idle) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_BASE) - EVT_SET_CONST(LVar1, ANIM_MageJrTroopa_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + SetConst(LVar0, PRT_BASE) + SetConst(LVar1, ANIM_MageJrTroopa_Hurt) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_HIT) + SetConst(LVar0, PRT_BASE) + SetConst(LVar1, ANIM_MageJrTroopa_Hurt) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_SetupFearReaction)) + ExecWait(N(EVS_TryFearReaction)) + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_BASE) + SetConst(LVar1, ANIM_MageJrTroopa_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_BASE) + SetConst(LVar1, ANIM_MageJrTroopa_Still) + ExecWait(N(EVS_JrTroopa_Death)) + Return + CaseEq(EVENT_BURN_HIT) + Set(LVar0, PRT_BASE) + Set(LVar1, ANIM_MageJrTroopa_BurnHurt) + Set(LVar2, ANIM_MageJrTroopa_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + Set(LVar0, PRT_BASE) + Set(LVar1, ANIM_MageJrTroopa_BurnHurt) + Set(LVar2, ANIM_MageJrTroopa_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + Wait(10) + SetConst(LVar0, PRT_BASE) + SetConst(LVar1, ANIM_MageJrTroopa_BurnStill) + ExecWait(N(EVS_JrTroopa_Death)) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_BASE) + SetConst(LVar1, ANIM_MageJrTroopa_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_BASE) + SetConst(LVar1, ANIM_MageJrTroopa_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_BASE) + SetConst(LVar1, ANIM_MageJrTroopa_Hurt) + ExecWait(N(EVS_JrTroopa_Death)) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_BASE) + SetConst(LVar1, ANIM_MageJrTroopa_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_BASE) + SetConst(LVar1, ANIM_MageJrTroopa_Hurt) + ExecWait(EVS_Enemy_Knockback) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(ResetAllActorSounds, ACTOR_SELF) + SetConst(LVar0, PRT_BASE) + SetConst(LVar1, ANIM_MageJrTroopa_Run) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_BASE) + SetConst(LVar1, ANIM_MageJrTroopa_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_BASE) + SetConst(LVar1, ANIM_MageJrTroopa_Hurt) + ExecWait(EVS_Enemy_Knockback) + SetConst(LVar0, PRT_BASE) + SetConst(LVar1, ANIM_MageJrTroopa_Still) + ExecWait(N(EVS_JrTroopa_Death)) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_BASE) + SetConst(LVar1, ANIM_MageJrTroopa_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + ExecWait(N(EVS_SetupFearReaction)) + ExecWait(N(EVS_TryFearReaction)) + EndCaseGroup + CaseEq(EVENT_BEGIN_AIR_LIFT) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Flail) + Wait(1000) + EndIf + CaseEq(EVENT_AIR_LIFT_FAILED) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Flail) + Wait(20) + ExecWait(N(EVS_Cam_FocusOnJrTroopa)) + Call(ActorSpeak, MSG_Menus_019B, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Talk, ANIM_MageJrTroopa_PointIdle) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Idle) + ExecWait(N(EVS_Cam_ResetFocus)) + EndIf + CaseEq(EVENT_SPIKE_CONTACT) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Hurt) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Idle) + CaseEq(EVENT_END_FIRST_STRIKE) + SetConst(LVar0, PRT_BASE) + SetConst(LVar1, ANIM_MageJrTroopa_Idle) + ExecWait(EVS_Enemy_ReturnHome) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_BASE) + SetConst(LVar1, ANIM_MageJrTroopa_Idle) + ExecWait(EVS_Enemy_Recover) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_RaiseStaff) - EVT_WAIT(8) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 36) - EVT_SETF(LVar5, EVT_FLOAT(1.0)) - EVT_ELSE - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 14) - EVT_SETF(LVar5, EVT_FLOAT(0.4)) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, LVar5, 30, 0) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_SwingStaff) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_NO_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 120) - EVT_ADD(LVar4, 20) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_SET(LVar6, -8) - EVT_SET(LVar7, 20) - EVT_SETF(LVar8, EVT_FLOAT(1.0)) - EVT_ELSE - EVT_SET(LVar6, -3) - EVT_SET(LVar7, 8) - EVT_SETF(LVar8, EVT_FLOAT(0.4)) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, LVar6) - EVT_ADD(LVar1, LVar7) - EVT_PLAY_EFFECT(EFFECT_SHAPE_SPELL, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 30, 0) - EVT_WAIT(35) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) - EVT_ADD(LVar4, 20) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_SET(LVar6, -8) - EVT_SET(LVar7, 20) - EVT_SETF(LVar8, EVT_FLOAT(1.0)) - EVT_ELSE - EVT_SET(LVar6, -3) - EVT_SET(LVar7, 8) - EVT_SETF(LVar8, EVT_FLOAT(0.4)) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, LVar6) - EVT_ADD(LVar1, LVar7) - EVT_PLAY_EFFECT(EFFECT_SHAPE_SPELL, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 15, 0) - EVT_WAIT(15) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, (DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT), 0, 0, DMG_SPELL, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_DamageBrag_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_DamageBrag_None) - EVT_CALL(GetLastDamage, ACTOR_PLAYER, LVar1) - EVT_IF_NE(LVar1, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_DamageBrag_State, AVAL_DamageBrag_Ready) - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_RaiseStaff) + Wait(8) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Set(LVar3, 0) + Set(LVar4, 36) + SetF(LVar5, Float(1.0)) + Else + Set(LVar3, 0) + Set(LVar4, 14) + SetF(LVar5, Float(0.4)) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, LVar3) + Add(LVar1, LVar4) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, LVar5, 30, 0) + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_SwingStaff) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_NO_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) + Call(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) + Sub(LVar3, 120) + Add(LVar4, 20) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Set(LVar6, -8) + Set(LVar7, 20) + SetF(LVar8, Float(1.0)) + Else + Set(LVar6, -3) + Set(LVar7, 8) + SetF(LVar8, Float(0.4)) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, LVar6) + Add(LVar1, LVar7) + PlayEffect(EFFECT_SHAPE_SPELL, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 30, 0) + Wait(35) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) + Call(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) + Add(LVar4, 20) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Set(LVar6, -8) + Set(LVar7, 20) + SetF(LVar8, Float(1.0)) + Else + Set(LVar6, -3) + Set(LVar7, 8) + SetF(LVar8, Float(0.4)) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, LVar6) + Add(LVar1, LVar7) + PlayEffect(EFFECT_SHAPE_SPELL, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 15, 0) + Wait(15) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, (DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT), 0, 0, DMG_SPELL, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseEq(0) + Call(GetActorVar, ACTOR_SELF, AVAR_DamageBrag_State, LVar0) + IfEq(LVar0, AVAL_DamageBrag_None) + Call(GetLastDamage, ACTOR_PLAYER, LVar1) + IfNe(LVar1, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_DamageBrag_State, AVAL_DamageBrag_Ready) + EndIf + EndIf + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_ENEMY_BEGIN) // trying showing the scene where Jr Troopa brags about his new skills - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_MagicBrag_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_MagicBrag_Ready) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_NOT_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_MagicBrag_State, AVAL_MagicBrag_Done) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_SpookReact, LVar0) - EVT_IF_EQ(LVar0, AVAL_SpookReact_None) - EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa)) - EVT_WAIT(20) - EVT_END_IF - EVT_CALL(ActorSpeak, MSG_CH7_00DD, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Talk, ANIM_MageJrTroopa_PointIdle) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Idle) - EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus)) - EVT_WAIT(20) - EVT_END_IF - EVT_ELSE - EVT_WAIT(20) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_None) - EVT_RETURN - EVT_CASE_EQ(PHASE_ENEMY_END) + Call(GetActorVar, ACTOR_SELF, AVAR_MagicBrag_State, LVar0) + IfEq(LVar0, AVAL_MagicBrag_Ready) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfNotFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Call(SetActorVar, ACTOR_SELF, AVAR_MagicBrag_State, AVAL_MagicBrag_Done) + Call(GetActorVar, ACTOR_SELF, AVAR_SpookReact, LVar0) + IfEq(LVar0, AVAL_SpookReact_None) + ExecWait(N(EVS_Cam_FocusOnJrTroopa)) + Wait(20) + EndIf + Call(ActorSpeak, MSG_CH7_00DD, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Talk, ANIM_MageJrTroopa_PointIdle) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Idle) + ExecWait(N(EVS_Cam_ResetFocus)) + Wait(20) + EndIf + Else + Wait(20) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_None) + Return + CaseEq(PHASE_ENEMY_END) // trying showing the scene where Jr Troopa brgas about dealing damage - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_DamageBrag_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_DamageBrag_Ready) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_DamageBrag_State, AVAL_DamageBrag_Done) - EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa)) - EVT_WAIT(20) - EVT_CALL(ActorSpeak, MSG_CH7_00DE, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Talk, ANIM_MageJrTroopa_PointIdle) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Idle) - EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus)) - EVT_WAIT(10) - EVT_END_IF - EVT_RETURN - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) + Call(GetActorVar, ACTOR_SELF, AVAR_DamageBrag_State, LVar0) + IfEq(LVar0, AVAL_DamageBrag_Ready) + Call(SetActorVar, ACTOR_SELF, AVAR_DamageBrag_State, AVAL_DamageBrag_Done) + ExecWait(N(EVS_Cam_FocusOnJrTroopa)) + Wait(20) + Call(ActorSpeak, MSG_CH7_00DE, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Talk, ANIM_MageJrTroopa_PointIdle) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Idle) + ExecWait(N(EVS_Cam_ResetFocus)) + Wait(10) + EndIf + Return + CaseEq(PHASE_PLAYER_BEGIN) // trying showing the scene where Jr Troopa transforms - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_MagicBrag_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_MagicBrag_None) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_MagicBrag_State, AVAL_MagicBrag_Ready) - EVT_WAIT(15) - EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa)) - EVT_WAIT(10) - EVT_CALL(ActorSpeak, MSG_CH7_00DB, ACTOR_SELF, PRT_MAGE, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointTapFoot) - EVT_WAIT(8) - EVT_EXEC_WAIT(N(EVS_Transform)) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAGE, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BASE, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(15) - EVT_CALL(ActorSpeak, MSG_CH7_00DC, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Talk, ANIM_MageJrTroopa_PointIdle) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Idle) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus)) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_MagicBrag_State, LVar0) + IfEq(LVar0, AVAL_MagicBrag_None) + Call(SetActorVar, ACTOR_SELF, AVAR_MagicBrag_State, AVAL_MagicBrag_Ready) + Wait(15) + ExecWait(N(EVS_Cam_FocusOnJrTroopa)) + Wait(10) + Call(ActorSpeak, MSG_CH7_00DB, ACTOR_SELF, PRT_MAGE, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointTapFoot) + Wait(8) + ExecWait(N(EVS_Transform)) + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAGE, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BASE, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(15) + Call(ActorSpeak, MSG_CH7_00DC, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Talk, ANIM_MageJrTroopa_PointIdle) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Idle) + Wait(10) + ExecWait(N(EVS_Cam_ResetFocus)) + EndIf + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_JrTroopa_Death) = { - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetDamageSource, LVar5) - EVT_SWITCH(LVar5) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_SLAP_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_FAN_SMACK_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_SLAP_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_SLAP_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_FAN_SMACK_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_SLAP_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_SPIN_SMASH) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SET(LVar2, 0) - EVT_LOOP(24) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar2) - EVT_ADD(LVar2, 30) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_END_SWITCH - EVT_LABEL(0) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_ADD(LVar2, 10) - EVT_LOOP(3) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) - EVT_WAIT(3) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BASE, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAGE, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAGE, ANIM_JrTroopa_DefeatedBegin) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(15) - EVT_CALL(PlaySound, SOUND_ACTOR_DEATH) - EVT_CALL(DropStarPoints, ACTOR_SELF) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(SetBattleCamZoom, 260) - EVT_CALL(SetBattleCamOffsetZ, 15) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_KNOCKOUT_CHIRPING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAGE, ANIM_JrTroopa_Defeated) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAGE, EVT_PTR(N(DefeatedAnims))) - EVT_WAIT(60) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_RETURN - EVT_END + Call(HideHealthBar, ACTOR_SELF) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetDamageSource, LVar5) + Switch(LVar5) + CaseOrEq(DMG_SRC_NEXT_SLAP_LEFT) + CaseOrEq(DMG_SRC_NEXT_FAN_SMACK_LEFT) + CaseOrEq(DMG_SRC_LAST_SLAP_LEFT) + CaseOrEq(DMG_SRC_LAST_FAN_SMACK_LEFT) + CaseOrEq(DMG_SRC_NEXT_SLAP_RIGHT) + CaseOrEq(DMG_SRC_NEXT_FAN_SMACK_RIGHT) + CaseOrEq(DMG_SRC_LAST_SLAP_RIGHT) + CaseOrEq(DMG_SRC_LAST_FAN_SMACK_RIGHT) + CaseOrEq(DMG_SRC_SPIN_SMASH) + EndCaseGroup + CaseDefault + Set(LVar2, 0) + Loop(24) + Call(SetActorYaw, ACTOR_SELF, LVar2) + Add(LVar2, 30) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + EndSwitch + Label(0) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 10) + Add(LVar2, 10) + Loop(3) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) + Wait(3) + EndLoop + EndThread + Call(SetPartFlagBits, ACTOR_SELF, PRT_BASE, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAGE, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAGE, ANIM_JrTroopa_DefeatedBegin) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Wait(15) + Call(PlaySound, SOUND_ACTOR_DEATH) + Call(DropStarPoints, ACTOR_SELF) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(SetBattleCamZoom, 260) + Call(SetBattleCamOffsetZ, 15) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 30) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_KNOCKOUT_CHIRPING) + Call(SetAnimation, ACTOR_SELF, PRT_MAGE, ANIM_JrTroopa_Defeated) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAGE, Ref(N(DefeatedAnims))) + Wait(60) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Return + End }; EvtScript N(EVS_TryFearReaction) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_SpookReact, LVar0) - EVT_IF_EQ(LVar0, AVAL_SpookReact_Ready) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa)) - EVT_CALL(ActorSpeak, MSG_Menus_019A, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Talk, ANIM_MageJrTroopa_PointIdle) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Idle) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_MagicBrag_State, LVar0) - EVT_IF_NE(LVar0, AVAL_MagicBrag_Ready) - EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus)) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_SpookReact, LVar0) + IfEq(LVar0, AVAL_SpookReact_Ready) + Wait(10) + ExecWait(N(EVS_Cam_FocusOnJrTroopa)) + Call(ActorSpeak, MSG_Menus_019A, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Talk, ANIM_MageJrTroopa_PointIdle) + Call(SetAnimation, ACTOR_SELF, PRT_BASE, ANIM_MageJrTroopa_Idle) + Call(GetActorVar, ACTOR_SELF, AVAR_MagicBrag_State, LVar0) + IfNe(LVar0, AVAL_MagicBrag_Ready) + ExecWait(N(EVS_Cam_ResetFocus)) + EndIf + EndIf + Return + End }; diff --git a/src/battle/area/kmr_part_3/actor/para_jr_troopa.c b/src/battle/area/kmr_part_3/actor/para_jr_troopa.c index dec415fa382..edb674a1c6d 100644 --- a/src/battle/area/kmr_part_3/actor/para_jr_troopa.c +++ b/src/battle/area/kmr_part_3/actor/para_jr_troopa.c @@ -139,490 +139,490 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_SetupFearReaction) = { - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar2) - EVT_IF_FLAG(LVar2, STATUS_FLAGS_IMMOBILIZED) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetBattleFlags, LVar2) - EVT_IF_FLAG(LVar2, BS_FLAGS1_PARTNER_ACTING) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar2, MOVE_SPOOK) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_Ready) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_EMOTE_QUESTION) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 30) - EVT_CALL(ShowEmote, 0, EMOTE_QUESTION, -45, 30, EMOTER_POS, LVar0, LVar1, LVar2, 5) - EVT_WAIT(30) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetStatusFlags, ACTOR_SELF, LVar2) + IfFlag(LVar2, STATUS_FLAGS_IMMOBILIZED) + Return + EndIf + Call(GetBattleFlags, LVar2) + IfFlag(LVar2, BS_FLAGS1_PARTNER_ACTING) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + IfEq(LVar2, MOVE_SPOOK) + Call(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_Ready) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_EMOTE_QUESTION) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 30) + Call(ShowEmote, 0, EMOTE_QUESTION, -45, 30, EMOTER_POS, LVar0, LVar1, LVar2, 5) + Wait(30) + EndIf + EndIf + Return + End }; EvtScript N(EVS_Transform) = { - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_JR_TROOPA_TRANSFORM) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 16) - EVT_ELSE - EVT_ADD(LVar1, 6) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, 1, 30, 0) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar1, LVar2, 1, 30, 0) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(32) - EVT_WAIT(1) - EVT_ADD(LVar0, 45) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, LVar0, 0) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(32) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_JR_TROOPA_NEW_POWER) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 40, 0) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, -4, 0, 0) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, -4, 4, 0) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, 4, 0, 0) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, 4, 4, 0) - EVT_RETURN - EVT_END + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_JR_TROOPA_TRANSFORM) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar1, 16) + Else + Add(LVar1, 6) + EndIf + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, 1, 30, 0) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar1, LVar2, 1, 30, 0) + Thread + Set(LVar0, 0) + Loop(32) + Wait(1) + Add(LVar0, 45) + Call(SetActorRotation, ACTOR_SELF, 0, LVar0, 0) + EndLoop + EndThread + Wait(32) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_JR_TROOPA_NEW_POWER) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 15) + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 40, 0) + PlayEffect(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, -4, 0, 0) + PlayEffect(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, -4, 4, 0) + PlayEffect(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, 4, 0, 0) + PlayEffect(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, 4, 4, 0) + Return + End }; EvtScript N(EVS_Cam_FocusOnJrTroopa) = { - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_07) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamOffsetZ, 38) - EVT_CALL(SetBattleCamZoom, 256) - EVT_CALL(MoveBattleCamOver, 15) - EVT_RETURN - EVT_END + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(UseBattleCamPreset, BTL_CAM_PRESET_07) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamOffsetZ, 38) + Call(SetBattleCamZoom, 256) + Call(MoveBattleCamOver, 15) + Return + End }; EvtScript N(EVS_Cam_ResetFocus) = { - EVT_CALL(EnableBattleStatusBar, TRUE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 12) - EVT_RETURN - EVT_END + Call(EnableBattleStatusBar, TRUE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 12) + Return + End }; EvtScript N(EVS_Cam_FocusOnGoompa) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_55) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_PRESET_55) + Call(MoveBattleCamOver, 30) + Call(BattleCamTargetActor, ACTOR_SELF) + Return + End }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Transformed, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_None) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_Transformed, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_None) + Return + End }; #include "common/battle/SetAbsoluteStatusOffsets.inc.c" EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_DIZZY | STATUS_FLAG_SLEEP) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_GROUND, -12, 28) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_GROUND, 4, -6) - EVT_CALL(N(SetAbsoluteStatusOffsets), -25, 27, -1, 27) - EVT_ELSE - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_GROUND, -5, 33) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_GROUND, 0, -6) - EVT_CALL(N(SetAbsoluteStatusOffsets), -22, 30, 2, 28) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_DIZZY | STATUS_FLAG_SLEEP) + Call(SetTargetOffset, ACTOR_SELF, PRT_GROUND, -12, 28) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_GROUND, 4, -6) + Call(N(SetAbsoluteStatusOffsets), -25, 27, -1, 27) + Else + Call(SetTargetOffset, ACTOR_SELF, PRT_GROUND, -5, 33) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_GROUND, 0, -6) + Call(N(SetAbsoluteStatusOffsets), -22, 30, 2, 28) + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_SetupFearReaction)) - EVT_EXEC_WAIT(N(EVS_TryFearReaction)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Hurt) - EVT_EXEC_WAIT(N(EVS_JrTroopa_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET(LVar0, PRT_GROUND) - EVT_SET(LVar1, ANIM_ParaJrTroopa_BurnHurt) - EVT_SET(LVar2, ANIM_ParaJrTroopa_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET(LVar0, PRT_GROUND) - EVT_SET(LVar1, ANIM_ParaJrTroopa_BurnHurt) - EVT_SET(LVar2, ANIM_ParaJrTroopa_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_BurnStill) - EVT_EXEC_WAIT(N(EVS_JrTroopa_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Hurt) - EVT_EXEC_WAIT(N(EVS_JrTroopa_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_EXEC_WAIT(N(EVS_JrTroopa_FlyHome)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Idle) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Idle) - EVT_EXEC_WAIT(N(EVS_JrTroopa_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_ZERO_DAMAGE) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_EXEC_WAIT(N(EVS_SetupFearReaction)) - EVT_EXEC_WAIT(N(EVS_TryFearReaction)) - EVT_CASE_EQ(EVENT_SPIKE_CONTACT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Hurt) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_FlyFast) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Idle) - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Flail) - EVT_WAIT(1000) - EVT_END_IF - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Flail) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa)) - EVT_CALL(ActorSpeak, MSG_Menus_019B, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Talk, ANIM_ParaJrTroopa_Talk) - EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus)) - EVT_END_IF - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Idle) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ParaJrTroopa_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ParaJrTroopa_Hurt) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_SetupFearReaction)) + ExecWait(N(EVS_TryFearReaction)) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ParaJrTroopa_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ParaJrTroopa_Hurt) + ExecWait(N(EVS_JrTroopa_Death)) + Return + CaseEq(EVENT_BURN_HIT) + Set(LVar0, PRT_GROUND) + Set(LVar1, ANIM_ParaJrTroopa_BurnHurt) + Set(LVar2, ANIM_ParaJrTroopa_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + Set(LVar0, PRT_GROUND) + Set(LVar1, ANIM_ParaJrTroopa_BurnHurt) + Set(LVar2, ANIM_ParaJrTroopa_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + Wait(10) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ParaJrTroopa_BurnStill) + ExecWait(N(EVS_JrTroopa_Death)) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ParaJrTroopa_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ParaJrTroopa_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ParaJrTroopa_Hurt) + ExecWait(N(EVS_JrTroopa_Death)) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ParaJrTroopa_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ParaJrTroopa_Hurt) + ExecWait(EVS_Enemy_Knockback) + ExecWait(N(EVS_JrTroopa_FlyHome)) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Idle) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ParaJrTroopa_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ParaJrTroopa_Hurt) + ExecWait(EVS_Enemy_Knockback) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ParaJrTroopa_Idle) + ExecWait(N(EVS_JrTroopa_Death)) + Return + CaseEq(EVENT_ZERO_DAMAGE) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ParaJrTroopa_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ParaJrTroopa_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + ExecWait(N(EVS_SetupFearReaction)) + ExecWait(N(EVS_TryFearReaction)) + CaseEq(EVENT_SPIKE_CONTACT) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Hurt) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_FlyFast) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Idle) + CaseEq(EVENT_BEGIN_AIR_LIFT) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Flail) + Wait(1000) + EndIf + CaseEq(EVENT_AIR_LIFT_FAILED) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ParaJrTroopa_Flail) + ExecWait(EVS_Enemy_NoDamageHit) + ExecWait(N(EVS_Cam_FocusOnJrTroopa)) + Call(ActorSpeak, MSG_Menus_019B, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Talk, ANIM_ParaJrTroopa_Talk) + ExecWait(N(EVS_Cam_ResetFocus)) + EndIf + CaseEq(EVENT_END_FIRST_STRIKE) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ParaJrTroopa_Idle) + ExecWait(EVS_Enemy_ReturnHome) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ParaJrTroopa_Idle) + ExecWait(EVS_Enemy_Recover) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Overshoot_Unused) = { - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 10) - EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Idle) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Idle) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_FlyFast) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Idle) - EVT_RETURN - EVT_END + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Sub(LVar0, 10) + Call(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Idle) + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Idle) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_FlyFast) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Idle) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_FlyFast) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, EASING_LINEAR) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 5, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_66) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_PARAGOOMBA_PREDIVE, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_FlyFast) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_SUB(LVar0, 80) - EVT_SET(LVar1, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Dive) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_FlyFast) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_GROUND, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Idle) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_GROUND, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_66) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_PARAGOOMBA_PREDIVE, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_FlyFast) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Dive) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) - EVT_END_SWITCH - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_DIVE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SET(LVarF, LVar0) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_FlyFast) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) - EVT_WAIT(10) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_FlyFast) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Idle) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_FlyFast) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(FlyToGoal, ACTOR_SELF, 0, -4, EASING_LINEAR) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 5, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_66) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_PARAGOOMBA_PREDIVE, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_FlyFast) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) + Call(SetGoalToTarget, ACTOR_SELF) + Sub(LVar0, 80) + Set(LVar1, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Dive) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_FlyFast) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_GROUND, 0, ACTOR_DECORATION_SWEAT) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Idle) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_GROUND, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Return + EndCaseGroup + CaseDefault + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_66) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_PARAGOOMBA_PREDIVE, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_FlyFast) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Dive) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) + EndSwitch + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_DIVE, BS_FLAGS1_TRIGGER_EVENTS) + Set(LVarF, LVar0) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_FlyFast) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) + Wait(10) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(YieldTurn) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_FlyFast) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Idle) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetBattlePhase, LVarF) - EVT_SWITCH(LVarF) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetBattlePhase, LVarF) + Switch(LVarF) + CaseEq(PHASE_PLAYER_BEGIN) // trying showing the scene where Jr Troopa transforms - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Transformed, LVar0) - EVT_IF_FALSE(LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Transformed, TRUE) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamOffsetZ, 35) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_CALL(ActorSpeak, MSG_CH3_0020, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointTapFoot) - EVT_WAIT(8) - EVT_EXEC_WAIT(N(EVS_Transform)) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(30) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 60, LVar2) - EVT_CALL(FlyToGoal, ACTOR_SELF, 45, 0, EASING_LINEAR) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, 60, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_WAIT(8) - EVT_CALL(ActorSpeak, MSG_CH3_0021, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Talk, ANIM_ParaJrTroopa_Idle) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus)) - EVT_END_IF - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_Transformed, LVar0) + IfFalse(LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_Transformed, TRUE) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamOffsetZ, 35) + Call(MoveBattleCamOver, 30) + Wait(30) + Call(ActorSpeak, MSG_CH3_0020, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointTapFoot) + Wait(8) + ExecWait(N(EVS_Transform)) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(30) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, 60, LVar2) + Call(FlyToGoal, ACTOR_SELF, 45, 0, EASING_LINEAR) + Call(ForceHomePos, ACTOR_SELF, LVar0, 60, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Wait(8) + Call(ActorSpeak, MSG_CH3_0021, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Talk, ANIM_ParaJrTroopa_Idle) + Wait(10) + ExecWait(N(EVS_Cam_ResetFocus)) + EndIf + CaseEq(PHASE_ENEMY_BEGIN) + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_JrTroopa_Death) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar1, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_CALL(FallToGoal, ACTOR_SELF, 10) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(HPBarToCurrent, ACTOR_SELF) - EVT_CALL(ShowHealthBar, ACTOR_SELF) - EVT_LABEL(0) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_ADD(LVar2, 10) - EVT_LOOP(3) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) - EVT_WAIT(3) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_DefeatedBegin) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_DEATH) - EVT_CALL(DropStarPoints, ACTOR_SELF) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(SetBattleCamZoom, 260) - EVT_CALL(SetBattleCamOffsetZ, 15) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_KNOCKOUT_CHIRPING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_Defeated) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, EVT_PTR(N(DefeatedAnims))) - EVT_WAIT(60) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + IfEq(LVar1, 0) + Goto(0) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(HideHealthBar, ACTOR_SELF) + Call(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Call(FallToGoal, ACTOR_SELF, 10) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(HPBarToCurrent, ACTOR_SELF) + Call(ShowHealthBar, ACTOR_SELF) + Label(0) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 10) + Add(LVar2, 10) + Loop(3) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) + Wait(3) + EndLoop + EndThread + Call(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_DefeatedBegin) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Wait(15) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_DEATH) + Call(DropStarPoints, ACTOR_SELF) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(SetBattleCamZoom, 260) + Call(SetBattleCamOffsetZ, 15) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 30) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_KNOCKOUT_CHIRPING) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_Defeated) + Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(DefeatedAnims))) + Wait(60) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Return + End }; EvtScript N(EVS_JrTroopa_FlyHome) = { - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_FlyFast) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_SUB(LVar4, LVar1) - EVT_MULF(LVar4, EVT_FLOAT(0.3)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, LVar4, EASING_LINEAR) - EVT_RETURN - EVT_END + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_FlyFast) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Sub(LVar4, LVar1) + MulF(LVar4, Float(0.3)) + Call(FlyToGoal, ACTOR_SELF, 0, LVar4, EASING_LINEAR) + Return + End }; EvtScript N(EVS_TryFearReaction) = { - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_SpookReact, LVar0) - EVT_IF_EQ(LVar0, AVAL_SpookReact_Ready) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_None) - EVT_WAIT(15) - EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa)) - EVT_WAIT(10) - EVT_CALL(ActorSpeak, MSG_Menus_019A, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Talk, ANIM_ParaJrTroopa_Idle) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus)) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(GetActorVar, ACTOR_SELF, AVAR_SpookReact, LVar0) + IfEq(LVar0, AVAL_SpookReact_Ready) + Call(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_None) + Wait(15) + ExecWait(N(EVS_Cam_FocusOnJrTroopa)) + Wait(10) + Call(ActorSpeak, MSG_Menus_019A, ACTOR_SELF, PRT_GROUND, ANIM_ParaJrTroopa_Talk, ANIM_ParaJrTroopa_Idle) + Wait(10) + ExecWait(N(EVS_Cam_ResetFocus)) + EndIf + EndIf + Return + End }; diff --git a/src/battle/area/kmr_part_3/actor/spiked_para_jr_troopa.c b/src/battle/area/kmr_part_3/actor/spiked_para_jr_troopa.c index 5f6cdd5b5a8..a1d4879af5a 100644 --- a/src/battle/area/kmr_part_3/actor/spiked_para_jr_troopa.c +++ b/src/battle/area/kmr_part_3/actor/spiked_para_jr_troopa.c @@ -138,422 +138,422 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_SetupFearReaction) = { - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar2) - EVT_IF_FLAG(LVar2, STATUS_FLAGS_IMMOBILIZED) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetBattleFlags, LVar2) - EVT_IF_FLAG(LVar2, BS_FLAGS1_PARTNER_ACTING) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar2, MOVE_SPOOK) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_Ready) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_EMOTE_QUESTION) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 30) - EVT_CALL(ShowEmote, 0, EMOTE_QUESTION, -45, 30, EMOTER_POS, LVar0, LVar1, LVar2, 5) - EVT_WAIT(30) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetStatusFlags, ACTOR_SELF, LVar2) + IfFlag(LVar2, STATUS_FLAGS_IMMOBILIZED) + Return + EndIf + Call(GetBattleFlags, LVar2) + IfFlag(LVar2, BS_FLAGS1_PARTNER_ACTING) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + IfEq(LVar2, MOVE_SPOOK) + Call(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_Ready) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_EMOTE_QUESTION) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 30) + Call(ShowEmote, 0, EMOTE_QUESTION, -45, 30, EMOTER_POS, LVar0, LVar1, LVar2, 5) + Wait(30) + EndIf + EndIf + Return + End }; EvtScript N(EVS_Transform) = { - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_JR_TROOPA_TRANSFORM) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 16) - EVT_ELSE - EVT_ADD(LVar1, 6) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, 1, 30, 0) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar1, LVar2, 1, 30, 0) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(32) - EVT_WAIT(1) - EVT_ADD(LVar0, 45) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, LVar0, 0) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(32) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_JR_TROOPA_NEW_POWER) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 40, 0) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, -4, 0, 0) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, -4, 4, 0) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, 4, 0, 0) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, 4, 4, 0) - EVT_RETURN - EVT_END + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_JR_TROOPA_TRANSFORM) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar1, 16) + Else + Add(LVar1, 6) + EndIf + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, 1, 30, 0) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar1, LVar2, 1, 30, 0) + Thread + Set(LVar0, 0) + Loop(32) + Wait(1) + Add(LVar0, 45) + Call(SetActorRotation, ACTOR_SELF, 0, LVar0, 0) + EndLoop + EndThread + Wait(32) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_JR_TROOPA_NEW_POWER) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 15) + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 40, 0) + PlayEffect(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, -4, 0, 0) + PlayEffect(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, -4, 4, 0) + PlayEffect(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, 4, 0, 0) + PlayEffect(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, 4, 4, 0) + Return + End }; EvtScript N(EVS_Cam_FocusOnJrTroopa) = { - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_07) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamOffsetZ, 38) - EVT_CALL(SetBattleCamZoom, 256) - EVT_CALL(MoveBattleCamOver, 15) - EVT_RETURN - EVT_END + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(UseBattleCamPreset, BTL_CAM_PRESET_07) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamOffsetZ, 38) + Call(SetBattleCamZoom, 256) + Call(MoveBattleCamOver, 15) + Return + End }; EvtScript N(EVS_Cam_ResetFocus) = { - EVT_CALL(EnableBattleStatusBar, TRUE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 12) - EVT_RETURN - EVT_END + Call(EnableBattleStatusBar, TRUE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 12) + Return + End }; EvtScript N(EVS_Cam_FocusOnGoompa) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_55) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_PRESET_55) + Call(MoveBattleCamOver, 30) + Call(BattleCamTargetActor, ACTOR_SELF) + Return + End }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_LostHalfHP, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_None) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_None) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_LostHalfHP, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_None) + Call(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_None) + Return + End }; #include "common/battle/SetAbsoluteStatusOffsets.inc.c" EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_DIZZY | STATUS_FLAG_SLEEP) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_GROUND, -15, 28) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_GROUND, 4, -6) - EVT_CALL(N(SetAbsoluteStatusOffsets), -25, 27, -1, 27) - EVT_ELSE - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_GROUND, -8, 33) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_GROUND, 0, -6) - EVT_CALL(N(SetAbsoluteStatusOffsets), -22, 30, 2, 28) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_DIZZY | STATUS_FLAG_SLEEP) + Call(SetTargetOffset, ACTOR_SELF, PRT_GROUND, -15, 28) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_GROUND, 4, -6) + Call(N(SetAbsoluteStatusOffsets), -25, 27, -1, 27) + Else + Call(SetTargetOffset, ACTOR_SELF, PRT_GROUND, -8, 33) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_GROUND, 0, -6) + Call(N(SetAbsoluteStatusOffsets), -22, 30, 2, 28) + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_EXEC_WAIT(N(EVS_SetupHitReaction)) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_HIT) - EVT_EXEC_WAIT(N(EVS_SetupHitReaction)) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_TryHitReaction)) - EVT_EXEC_WAIT(N(EVS_SetupFearReaction)) - EVT_EXEC_WAIT(N(EVS_TryFearReaction)) - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_Hurt) - EVT_EXEC_WAIT(N(EVS_JrTroopa_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_EXEC_WAIT(N(EVS_SetupHitReaction)) - EVT_SET(LVar0, 1) - EVT_SET(LVar1, ANIM_SpikedParaJrTroopa_BurnHurt) - EVT_SET(LVar2, ANIM_SpikedParaJrTroopa_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_TryHitReaction)) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_EXEC_WAIT(N(EVS_SetupHitReaction)) - EVT_SET(LVar0, PRT_GROUND) - EVT_SET(LVar1, ANIM_SpikedParaJrTroopa_BurnHurt) - EVT_SET(LVar2, ANIM_SpikedParaJrTroopa_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_BurnStill) - EVT_EXEC_WAIT(N(EVS_JrTroopa_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_EXEC_WAIT(N(EVS_SetupHitReaction)) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_EXEC_WAIT(N(EVS_TryHitReaction)) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_Hurt) - EVT_EXEC_WAIT(N(EVS_JrTroopa_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_EXEC_WAIT(N(EVS_JrTroopa_FlyHome)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Idle) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_Still) - EVT_EXEC_WAIT(N(EVS_JrTroopa_Death)) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_EXEC_WAIT(N(EVS_SetupFearReaction)) - EVT_EXEC_WAIT(N(EVS_TryFearReaction)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIKE_TAUNT) - EVT_WAIT(10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_SWITCH(LVar3) - EVT_CASE_FLAG(STATUS_FLAG_DIZZY | STATUS_FLAG_SLEEP) - EVT_ADD(LVar0, -13) - EVT_ADD(LVar1, 37) - EVT_CASE_FLAG(STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, -1) - EVT_ADD(LVar1, 14) - EVT_CASE_DEFAULT - EVT_ADD(LVar0, -4) - EVT_ADD(LVar1, 37) - EVT_END_SWITCH - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) - EVT_WAIT(20) - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Flail) - EVT_WAIT(1000) - EVT_END_IF - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Flail) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa)) - EVT_CALL(ActorSpeak, MSG_Menus_019B, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Talk, ANIM_SpikedParaJrTroopa_Talk) - EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus)) - EVT_END_IF - EVT_CASE_EQ(EVENT_SPIKE_CONTACT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Hurt) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_FlyFast) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Idle) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_JrTroopa_FlyHome)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Idle) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_SpikedParaJrTroopa_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + ExecWait(N(EVS_SetupHitReaction)) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_SpikedParaJrTroopa_Hurt) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_HIT) + ExecWait(N(EVS_SetupHitReaction)) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_SpikedParaJrTroopa_Hurt) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_TryHitReaction)) + ExecWait(N(EVS_SetupFearReaction)) + ExecWait(N(EVS_TryFearReaction)) + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_SpikedParaJrTroopa_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_SpikedParaJrTroopa_Hurt) + ExecWait(N(EVS_JrTroopa_Death)) + Return + CaseEq(EVENT_BURN_HIT) + ExecWait(N(EVS_SetupHitReaction)) + Set(LVar0, 1) + Set(LVar1, ANIM_SpikedParaJrTroopa_BurnHurt) + Set(LVar2, ANIM_SpikedParaJrTroopa_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_TryHitReaction)) + CaseEq(EVENT_BURN_DEATH) + ExecWait(N(EVS_SetupHitReaction)) + Set(LVar0, PRT_GROUND) + Set(LVar1, ANIM_SpikedParaJrTroopa_BurnHurt) + Set(LVar2, ANIM_SpikedParaJrTroopa_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + Wait(10) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_SpikedParaJrTroopa_BurnStill) + ExecWait(N(EVS_JrTroopa_Death)) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + ExecWait(N(EVS_SetupHitReaction)) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_SpikedParaJrTroopa_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + ExecWait(N(EVS_TryHitReaction)) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_SpikedParaJrTroopa_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_SpikedParaJrTroopa_Hurt) + ExecWait(N(EVS_JrTroopa_Death)) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_SpikedParaJrTroopa_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_SpikedParaJrTroopa_Hurt) + ExecWait(EVS_Enemy_Knockback) + ExecWait(N(EVS_JrTroopa_FlyHome)) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Idle) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_SpikedParaJrTroopa_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_SpikedParaJrTroopa_Hurt) + ExecWait(EVS_Enemy_Knockback) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_SpikedParaJrTroopa_Still) + ExecWait(N(EVS_JrTroopa_Death)) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_SpikedParaJrTroopa_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + ExecWait(N(EVS_SetupFearReaction)) + ExecWait(N(EVS_TryFearReaction)) + EndCaseGroup + CaseEq(EVENT_SPIKE_TAUNT) + Wait(10) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + Switch(LVar3) + CaseFlag(STATUS_FLAG_DIZZY | STATUS_FLAG_SLEEP) + Add(LVar0, -13) + Add(LVar1, 37) + CaseFlag(STATUS_FLAG_SHRINK) + Add(LVar0, -1) + Add(LVar1, 14) + CaseDefault + Add(LVar0, -4) + Add(LVar1, 37) + EndSwitch + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) + Wait(20) + CaseEq(EVENT_BEGIN_AIR_LIFT) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Flail) + Wait(1000) + EndIf + CaseEq(EVENT_AIR_LIFT_FAILED) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Flail) + Wait(20) + ExecWait(N(EVS_Cam_FocusOnJrTroopa)) + Call(ActorSpeak, MSG_Menus_019B, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Talk, ANIM_SpikedParaJrTroopa_Talk) + ExecWait(N(EVS_Cam_ResetFocus)) + EndIf + CaseEq(EVENT_SPIKE_CONTACT) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Hurt) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_FlyFast) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Idle) + CaseEq(EVENT_END_FIRST_STRIKE) + ExecWait(N(EVS_JrTroopa_FlyHome)) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Idle) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_SpikedParaJrTroopa_Idle) + ExecWait(EVS_Enemy_Recover) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_SetupHitReaction) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HitReact_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_HitReact_None) - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar1) - EVT_IF_NE(LVar1, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_Ready) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_HitReact_State, LVar0) + IfEq(LVar0, AVAL_HitReact_None) + Call(GetLastDamage, ACTOR_SELF, LVar1) + IfNe(LVar1, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_Ready) + EndIf + EndIf + Return + End }; EvtScript N(EVS_TryHitReaction) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HitReact_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_HitReact_Ready) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_DOJO) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_Done) - EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa)) - EVT_CALL(ActorSpeak, MSG_MAC_Port_00BC, ACTOR_SELF, PRT_GROUND, -1, -1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Idle) - EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus)) - EVT_ELSE - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_None) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_HitReact_State, LVar0) + IfEq(LVar0, AVAL_HitReact_Ready) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_DOJO) + Call(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_Done) + ExecWait(N(EVS_Cam_FocusOnJrTroopa)) + Call(ActorSpeak, MSG_MAC_Port_00BC, ACTOR_SELF, PRT_GROUND, -1, -1) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Idle) + ExecWait(N(EVS_Cam_ResetFocus)) + Else + Call(SetActorVar, ACTOR_SELF, AVAR_HitReact_State, AVAL_HitReact_None) + EndIf + EndIf + Return + End }; EvtScript N(EVS_Overshoot_Unused) = { - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 10) - EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Idle) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Idle) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_FlyFast) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Idle) - EVT_RETURN - EVT_END + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Sub(LVar0, 10) + Call(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Idle) + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Idle) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_FlyFast) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Idle) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_FlyFast) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, EASING_LINEAR) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 6, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_66) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_PARAGOOMBA_PREDIVE, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_FlyFast) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_SUB(LVar0, 80) - EVT_SET(LVar1, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Dive) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_FlyFast) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_GROUND, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Idle) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_GROUND, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_66) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_PARAGOOMBA_PREDIVE, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_FlyFast) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Dive) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) - EVT_END_SWITCH - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_DIVE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SET(LVarF, LVar0) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_FlyFast) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) - EVT_WAIT(10) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_FlyFast) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Idle) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_FlyFast) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(FlyToGoal, ACTOR_SELF, 0, -4, EASING_LINEAR) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 6, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_66) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_PARAGOOMBA_PREDIVE, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_FlyFast) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) + Call(SetGoalToTarget, ACTOR_SELF) + Sub(LVar0, 80) + Set(LVar1, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Dive) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_FlyFast) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_GROUND, 0, ACTOR_DECORATION_SWEAT) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Idle) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_GROUND, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Return + EndCaseGroup + CaseDefault + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_66) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_PARAGOOMBA_PREDIVE, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_FlyFast) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Dive) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) + EndSwitch + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_DIVE, BS_FLAGS1_TRIGGER_EVENTS) + Set(LVarF, LVar0) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_FlyFast) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) + Wait(10) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(YieldTurn) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_FlyFast) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Idle) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; API_CALLABLE(N(ShowPointerHudElem)) { @@ -579,156 +579,156 @@ API_CALLABLE(N(FreePointerHudElem)) { } EvtScript N(EVS_HandlePhase) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) // trying showing the scene where Jr Troopa loses half his HP - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_LostHalfHP, LVar0) - EVT_IF_FALSE(LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_LostHalfHP, TRUE) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamOffsetZ, 35) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(20) - EVT_CALL(ActorSpeak, MSG_MAC_Port_00B8, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_OutOfBreath, ANIM_JrTroopa_OutOfBreath) - EVT_WAIT(10) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) - EVT_CALL(SetHPBarOffset, ACTOR_SELF, -20, 40) - EVT_CALL(ShowHealthBar, ACTOR_SELF) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar0, 115) - EVT_SET(LVar1, 150) - EVT_CALL(N(ShowPointerHudElem), LVar0, LVar1, LVarA) - EVT_WAIT(10) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar0) - EVT_LABEL(0) - EVT_SUB(LVar0, 1) - EVT_CALL(SetEnemyHP, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_IF_GT(LVar0, 20) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_Panic) - EVT_WAIT(15) - EVT_LOOP(2) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, FALSE) - EVT_WAIT(15) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) - EVT_WAIT(15) - EVT_END_LOOP - EVT_CALL(ActorSpeak, MSG_MAC_Port_00B9, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_Panic, ANIM_JrTroopa_Panic) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, FALSE) - EVT_CALL(N(FreePointerHudElem), LVarA) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(SetHPBarOffset, ACTOR_SELF, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_OutOfBreath) - EVT_WAIT(25) - EVT_CALL(ActorSpeak, MSG_MAC_Port_00BA, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_Transform)) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(20) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 40, 80, 0) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_LINEAR) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_WAIT(10) - EVT_CALL(ActorSpeak, MSG_MAC_Port_00BB, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Talk, ANIM_SpikedParaJrTroopa_Idle) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus)) - EVT_END_IF - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_LostHalfHP, LVar0) + IfFalse(LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_LostHalfHP, TRUE) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamOffsetZ, 35) + Call(MoveBattleCamOver, 30) + Wait(20) + Call(ActorSpeak, MSG_MAC_Port_00B8, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_OutOfBreath, ANIM_JrTroopa_OutOfBreath) + Wait(10) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) + Call(SetHPBarOffset, ACTOR_SELF, -20, 40) + Call(ShowHealthBar, ACTOR_SELF) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar0, 115) + Set(LVar1, 150) + Call(N(ShowPointerHudElem), LVar0, LVar1, LVarA) + Wait(10) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar0) + Label(0) + Sub(LVar0, 1) + Call(SetEnemyHP, ACTOR_SELF, LVar0) + Wait(1) + IfGt(LVar0, 20) + Goto(0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_Panic) + Wait(15) + Loop(2) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, FALSE) + Wait(15) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) + Wait(15) + EndLoop + Call(ActorSpeak, MSG_MAC_Port_00B9, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_Panic, ANIM_JrTroopa_Panic) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, FALSE) + Call(N(FreePointerHudElem), LVarA) + Call(HideHealthBar, ACTOR_SELF) + Call(SetHPBarOffset, ACTOR_SELF, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_OutOfBreath) + Wait(25) + Call(ActorSpeak, MSG_MAC_Port_00BA, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle) + Wait(10) + ExecWait(N(EVS_Transform)) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(20) + Call(SetGoalToHome, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 40, 80, 0) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_LINEAR) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Wait(10) + Call(ActorSpeak, MSG_MAC_Port_00BB, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Talk, ANIM_SpikedParaJrTroopa_Idle) + Wait(10) + ExecWait(N(EVS_Cam_ResetFocus)) + EndIf + CaseEq(PHASE_ENEMY_BEGIN) + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_JrTroopa_Death) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar1, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_CALL(FallToGoal, ACTOR_SELF, 10) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(HPBarToCurrent, ACTOR_SELF) - EVT_CALL(ShowHealthBar, ACTOR_SELF) - EVT_LABEL(0) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_ADD(LVar2, 10) - EVT_LOOP(3) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) - EVT_WAIT(3) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_DefeatedBegin) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(15) - EVT_CALL(PlaySound, SOUND_ACTOR_DEATH) - EVT_CALL(DropStarPoints, ACTOR_SELF) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(SetBattleCamZoom, 260) - EVT_CALL(SetBattleCamOffsetZ, 15) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_KNOCKOUT_CHIRPING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_Defeated) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, EVT_PTR(N(DefeatedAnims))) - EVT_WAIT(60) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + IfEq(LVar1, 0) + Goto(0) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(HideHealthBar, ACTOR_SELF) + Call(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Call(FallToGoal, ACTOR_SELF, 10) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(HPBarToCurrent, ACTOR_SELF) + Call(ShowHealthBar, ACTOR_SELF) + Label(0) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 10) + Add(LVar2, 10) + Loop(3) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) + Wait(3) + EndLoop + EndThread + Call(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_DefeatedBegin) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Wait(15) + Call(PlaySound, SOUND_ACTOR_DEATH) + Call(DropStarPoints, ACTOR_SELF) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(SetBattleCamZoom, 260) + Call(SetBattleCamOffsetZ, 15) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 30) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_KNOCKOUT_CHIRPING) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_JrTroopa_Defeated) + Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(DefeatedAnims))) + Wait(60) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Return + End }; EvtScript N(EVS_JrTroopa_FlyHome) = { - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_FlyFast) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_SUB(LVar4, LVar1) - EVT_MULF(LVar4, EVT_FLOAT(0.3)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, LVar4, EASING_LINEAR) - EVT_RETURN - EVT_END + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_FlyFast) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Sub(LVar4, LVar1) + MulF(LVar4, Float(0.3)) + Call(FlyToGoal, ACTOR_SELF, 0, LVar4, EASING_LINEAR) + Return + End }; EvtScript N(EVS_TryFearReaction) = { - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_SpookReact, LVar0) - EVT_IF_EQ(LVar0, AVAL_SpookReact_Ready) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_None) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_Cam_FocusOnJrTroopa)) - EVT_CALL(ActorSpeak, MSG_Menus_019A, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Talk, ANIM_SpikedParaJrTroopa_Idle) - EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus)) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(GetActorVar, ACTOR_SELF, AVAR_SpookReact, LVar0) + IfEq(LVar0, AVAL_SpookReact_Ready) + Call(SetActorVar, ACTOR_SELF, AVAR_SpookReact, AVAL_SpookReact_None) + Wait(10) + ExecWait(N(EVS_Cam_FocusOnJrTroopa)) + Call(ActorSpeak, MSG_Menus_019A, ACTOR_SELF, PRT_GROUND, ANIM_SpikedParaJrTroopa_Talk, ANIM_SpikedParaJrTroopa_Idle) + ExecWait(N(EVS_Cam_ResetFocus)) + EndIf + EndIf + Return + End }; diff --git a/src/battle/area/kmr_part_3/actor/tutorial_paragoomba.c b/src/battle/area/kmr_part_3/actor/tutorial_paragoomba.c index 8b846b771f6..24dbef08cb1 100644 --- a/src/battle/area/kmr_part_3/actor/tutorial_paragoomba.c +++ b/src/battle/area/kmr_part_3/actor/tutorial_paragoomba.c @@ -199,362 +199,362 @@ s32 N(RightWingAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(10) - EVT_CALL(RandInt, 80, LVar0) - EVT_ADD(LVar0, 80) - EVT_LOOP(LVar0) - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(0.6)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, EVT_PTR(N(ShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) - EVT_LOOP(20) - EVT_LABEL(1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(0.6)) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, EVT_PTR(N(DefaultAnims))) - EVT_LOOP(40) - EVT_LABEL(2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(10) - EVT_RETURN - EVT_END + Label(10) + Call(RandInt, 80, LVar0) + Add(LVar0, 80) + Loop(LVar0) + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(0) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(0.6)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(ShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) + Loop(20) + Label(1) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(1) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(0.6)) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) + Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(DefaultAnims))) + Loop(40) + Label(2) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(2) + EndIf + Wait(1) + EndLoop + Goto(10) + Return + End }; EvtScript N(EVS_Paragoomba_GoHome) = { - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Idle) - EVT_RETURN - EVT_END + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(7.0)) + Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Idle) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(GetEncounterTrigger, LVar0) - EVT_IF_EQ(LVar0, ENCOUNTER_TRIGGER_HAMMER) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_END_IF - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_Paragoomba_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_Paragoomba_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_FALL_TRIGGER) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_CASE_EQ(EVENT_15) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_Paragoomba_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Electrocute) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dizzy) - EVT_EXEC_WAIT(N(EVS_Paragoomba_GoHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Electrocute) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_STAR_BEAM) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0) - EVT_CALL(HPBarToCurrent, ACTOR_SELF) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Run) - EVT_EXEC_WAIT(N(EVS_Paragoomba_GoHome)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Run) - EVT_SET_CONST(LVar2, ANIM_Paragoomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Hurt) + ExecWait(EVS_Enemy_Hit) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(GetEncounterTrigger, LVar0) + IfEq(LVar0, ENCOUNTER_TRIGGER_HAMMER) + ExecWait(N(EVS_KnockDown)) + EndIf + EndIf + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_BurnHurt) + SetConst(LVar2, ANIM_Paragoomba_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_BurnHurt) + SetConst(LVar2, ANIM_Paragoomba_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_FALL_TRIGGER) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Hurt) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_KnockDown)) + CaseEq(EVENT_15) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_BurnHurt) + SetConst(LVar2, ANIM_Paragoomba_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_KnockDown)) + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Electrocute) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Hurt) + ExecWait(EVS_Enemy_Knockback) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dizzy) + ExecWait(N(EVS_Paragoomba_GoHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Electrocute) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_STAR_BEAM) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + Call(SetActorPos, ACTOR_SELF, 20, 0, 0) + Call(HPBarToCurrent, ACTOR_SELF) + CaseEq(EVENT_END_FIRST_STRIKE) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Run) + ExecWait(N(EVS_Paragoomba_GoHome)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Run) + SetConst(LVar2, ANIM_Paragoomba_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Run) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, EASING_LINEAR) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_66) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dive) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_SUB(LVar0, 80) - EVT_SET(LVar1, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dive) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_QUADRATIC_OUT) - EVT_THREAD - EVT_LOOP(4) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_FLY) - EVT_WAIT(4) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Miss) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_FLYING, EVT_FLOAT(3.0)) - EVT_WAIT(10) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_FLYING, EVT_FLOAT(1.0)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Run) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_EXEC_WAIT(N(EVS_Paragoomba_GoHome)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_66) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dive) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dive) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) - EVT_END_SWITCH - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_AIR_KICK, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Run) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_WAIT(5) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Run) - EVT_EXEC_WAIT(N(EVS_Paragoomba_GoHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Run) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(FlyToGoal, ACTOR_SELF, 0, -4, EASING_LINEAR) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_66) + Call(SetBattleCamZoom, 300) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dive) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(SetGoalToTarget, ACTOR_SELF) + Sub(LVar0, 80) + Set(LVar1, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dive) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_QUADRATIC_OUT) + Thread + Loop(4) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_FLY) + Wait(4) + EndLoop + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Miss) + Call(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_FLYING, Float(3.0)) + Wait(10) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(10) + Call(SetAnimationRate, ACTOR_SELF, PRT_FLYING, Float(1.0)) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(YieldTurn) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Run) + Call(SetActorYaw, ACTOR_SELF, 180) + ExecWait(N(EVS_Paragoomba_GoHome)) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + CaseDefault + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_66) + Call(SetBattleCamZoom, 300) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dive) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dive) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) + EndSwitch + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_AIR_KICK, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Run) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) + Call(ResetAllActorSounds, ACTOR_SELF) + Wait(5) + Call(YieldTurn) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Run) + ExecWait(N(EVS_Paragoomba_GoHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/StartRumbleWithParams.inc.c" EvtScript N(EVS_KnockDown) = { - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_PRIMARY_TARGET) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_DUMMY_WING_L, LVar0, LVar1, LVar2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_DUMMY_WING_L, -9, 7, -2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_DUMMY_WING_R, LVar0, LVar1, LVar2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_DUMMY_WING_R, 11, 7, -2) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_IF_EQ(LVar0, EVENT_15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_BurnStill) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hurt) - EVT_END_IF - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(N(StartRumbleWithParams), 100, 10) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar3) - EVT_IF_EQ(LVar3, EVENT_15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hurt) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_ADD(LVar4, 10) - EVT_ADD(LVar5, 5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 10, 0) - EVT_END_IF - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_LOOP(10) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(GetIndexFromHome, ACTOR_SELF, LVar0) - EVT_MOD(LVar0, 4) - EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVar0) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Idle) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(DownedStatusTable))) - EVT_CALL(SetActorType, ACTOR_SELF, ACTOR_TYPE_GOOMBA) - EVT_EXEC_WAIT(A(downed_goomba_tutorial_EVS_Init)) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(HideHealthBar, ACTOR_SELF) + Call(SetPartFlags, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET) + Call(SetPartFlags, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION) + Call(SetPartFlags, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION) + Call(SetPartFlags, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_PRIMARY_TARGET) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_DUMMY_WING_L, LVar0, LVar1, LVar2) + Call(SetPartDispOffset, ACTOR_SELF, PRT_DUMMY_WING_L, -9, 7, -2) + Call(SetPartPos, ACTOR_SELF, PRT_DUMMY_WING_R, LVar0, LVar1, LVar2) + Call(SetPartDispOffset, ACTOR_SELF, PRT_DUMMY_WING_R, 11, 7, -2) + Call(GetLastEvent, ACTOR_SELF, LVar0) + IfEq(LVar0, EVENT_15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_BurnStill) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hurt) + EndIf + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(N(StartRumbleWithParams), 100, 10) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.3)) + EndThread + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) + Call(GetLastEvent, ACTOR_SELF, LVar3) + IfEq(LVar3, EVENT_15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hurt) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Add(LVar4, 10) + Add(LVar5, 5) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, Float(1.0), 10, 0) + EndIf + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Loop(10) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(GetIndexFromHome, ACTOR_SELF, LVar0) + Mod(LVar0, 4) + Call(SetGoalToIndex, ACTOR_SELF, LVar0) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Idle) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) + Call(SetStatusTable, ACTOR_SELF, Ref(N(DownedStatusTable))) + Call(SetActorType, ACTOR_SELF, ACTOR_TYPE_GOOMBA) + ExecWait(A(downed_goomba_tutorial_EVS_Init)) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) + Call(HPBarToHome, ACTOR_SELF) + Call(ResetAllActorSounds, ACTOR_SELF) + Return + End }; // downed paragoombas are handled via a special nested goomba import @@ -568,59 +568,59 @@ EvtScript N(EVS_KnockDown) = { extern EvtScript N(EVS_HandlePhase); EvtScript N(EVS_Init_Tutorial) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Return + End }; EvtScript N(EVS_TutorialScene) = { - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 30) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 60) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 90) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 120) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 150) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 180) - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(ActorSpeak, MSG_CH0_00B8, ACTOR_PARTNER, 0, ANIM_Goompa_Talk, ANIM_Goompa_Idle) - EVT_SET(GF_Tutorial_FlyingEnemy, TRUE) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 150) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 120) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 90) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 60) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 30) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 0) - EVT_WAIT(5) - EVT_RETURN - EVT_END + Call(SetActorYaw, ACTOR_PLAYER, 30) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 60) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 90) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 120) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 150) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 180) + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(ActorSpeak, MSG_CH0_00B8, ACTOR_PARTNER, 0, ANIM_Goompa_Talk, ANIM_Goompa_Idle) + Set(GF_Tutorial_FlyingEnemy, TRUE) + Call(SetActorYaw, ACTOR_PLAYER, 150) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 120) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 90) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 60) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 30) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 0) + Wait(5) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_PARTNER, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) - EVT_IF_EQ(GF_Tutorial_FlyingEnemy, FALSE) - EVT_EXEC_WAIT(N(EVS_TutorialScene)) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_PARTNER, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(EnableIdleScript, ACTOR_PARTNER, IDLE_SCRIPT_DISABLE) + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) + IfEq(GF_Tutorial_FlyingEnemy, FALSE) + ExecWait(N(EVS_TutorialScene)) + EndIf + EndSwitch + Call(EnableIdleScript, ACTOR_PARTNER, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Return + End }; diff --git a/src/battle/area/kmr_part_3/actor/tutorial_spiked_goomba.c b/src/battle/area/kmr_part_3/actor/tutorial_spiked_goomba.c index 1211aebb51b..8f8825fb148 100644 --- a/src/battle/area/kmr_part_3/actor/tutorial_spiked_goomba.c +++ b/src/battle/area/kmr_part_3/actor/tutorial_spiked_goomba.c @@ -114,431 +114,431 @@ s32 N(ShuffleAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(10) - EVT_CALL(RandInt, 80, LVar0) - EVT_ADD(LVar0, 80) - EVT_LOOP(LVar0) - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_LOOP(20) - EVT_LABEL(1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_LOOP(80) - EVT_LABEL(2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(10) - EVT_RETURN - EVT_END + Label(10) + Call(RandInt, 80, LVar0) + Add(LVar0, 80) + Loop(LVar0) + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(0) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Loop(20) + Label(1) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(1) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Loop(80) + Label(2) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(2) + EndIf + Wait(1) + EndLoop + Goto(10) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_BurnEyesClosed) - EVT_SET_CONST(LVar2, ANIM_SpikedGoomba_BurnEyesOpen) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_BurnEyesClosed) - EVT_SET_CONST(LVar2, ANIM_SpikedGoomba_BurnEyesOpen) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_BurnEyesOpen) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Electrocute) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dizzy) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Idle) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Electrocute) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_STAR_BEAM) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Run) - EVT_SET_CONST(LVar2, ANIM_SpikedGoomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIKE_TAUNT) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Laugh) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 10) - EVT_ELSE - EVT_ADD(LVar1, 26) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) - EVT_WAIT(20) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Idle) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_BurnEyesClosed) + SetConst(LVar2, ANIM_SpikedGoomba_BurnEyesOpen) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_BurnEyesClosed) + SetConst(LVar2, ANIM_SpikedGoomba_BurnEyesOpen) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_BurnEyesOpen) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Electrocute) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Hurt) + ExecWait(EVS_Enemy_Knockback) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dizzy) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Idle) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Electrocute) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_STAR_BEAM) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Run) + SetConst(LVar2, ANIM_SpikedGoomba_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseEq(EVENT_SPIKE_TAUNT) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Laugh) + EndIf + Wait(10) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar1, 10) + Else + Add(LVar1, 26) + EndIf + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) + Wait(20) + CaseDefault + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Idle) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/CalculateArcsinDeg.inc.c" EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Run) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Idle) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Midair) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_SET(LVar1, 10) - EVT_ADD(LVar2, 3) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_SET(LVar3, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Sleep) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Hurt) - EVT_WAIT(5) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Midair) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_THREAD - EVT_WAIT(4) - EVT_SET(LVar0, 180) - EVT_LOOP(4) - EVT_SUB(LVar0, 45) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dizzy) - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Idle) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_SET(LVar3, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Midair) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_END_SWITCH - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SPIKEBONK, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Idle) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(GetLastDamage, ACTOR_PLAYER, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Laugh) - EVT_WAIT(15) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Idle) - EVT_WAIT(3) - EVT_END_IF - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Run) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Idle) + Call(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Midair) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Set(LVar1, 10) + Add(LVar2, 3) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Thread + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) + Set(LVar0, 0) + Loop(16) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Set(LVar3, LVar6) + Wait(1) + EndLoop + EndThread + Thread + Wait(6) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Sleep) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Hurt) + Wait(5) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Midair) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + Thread + Wait(4) + Set(LVar0, 180) + Loop(4) + Sub(LVar0, 45) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dizzy) + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(SetActorYaw, ACTOR_SELF, 0) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Idle) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + CaseDefault + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Thread + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) + Set(LVar0, 0) + Loop(16) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Set(LVar3, LVar6) + Wait(1) + EndLoop + EndThread + Thread + Wait(6) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Midair) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0)) + Wait(1) + EndSwitch + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SPIKEBONK, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Idle) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(GetLastDamage, ACTOR_PLAYER, LVar0) + IfGt(LVar0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Laugh) + Wait(15) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Idle) + Wait(3) + EndIf + Call(YieldTurn) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; // everything above this point is identical to spiked_goomba EvtScript N(EVS_Init_Tutorial) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Return + End }; EvtScript N(EVS_TutorialScene) = { - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 30) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 60) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 90) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 120) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 150) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 180) - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(ActorSpeak, MSG_CH0_00B9, ACTOR_PARTNER, 0, ANIM_Goompa_Talk, ANIM_Goompa_Idle) - EVT_SET(GF_Tutorial_SpikyEnemy, TRUE) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 150) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 120) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 90) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 60) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 30) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 0) - EVT_WAIT(5) - EVT_RETURN - EVT_END + Call(SetActorYaw, ACTOR_PLAYER, 30) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 60) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 90) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 120) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 150) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 180) + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(ActorSpeak, MSG_CH0_00B9, ACTOR_PARTNER, 0, ANIM_Goompa_Talk, ANIM_Goompa_Idle) + Set(GF_Tutorial_SpikyEnemy, TRUE) + Call(SetActorYaw, ACTOR_PLAYER, 150) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 120) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 90) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 60) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 30) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 0) + Wait(5) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_PARTNER, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) - EVT_IF_EQ(GF_Tutorial_SpikyEnemy, FALSE) - EVT_EXEC_WAIT(N(EVS_TutorialScene)) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_PARTNER, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(EnableIdleScript, ACTOR_PARTNER, IDLE_SCRIPT_DISABLE) + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) + IfEq(GF_Tutorial_SpikyEnemy, FALSE) + ExecWait(N(EVS_TutorialScene)) + EndIf + EndSwitch + Call(EnableIdleScript, ACTOR_PARTNER, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Return + End }; diff --git a/src/battle/area/kpa2/actor/final_bowser_1.c b/src/battle/area/kpa2/actor/final_bowser_1.c index 642d0e7a70f..47883410fd2 100644 --- a/src/battle/area/kpa2/actor/final_bowser_1.c +++ b/src/battle/area/kpa2/actor/final_bowser_1.c @@ -189,649 +189,649 @@ ActorBlueprint NAMESPACE = { #include "common/GetItemEntityPosition.inc.c" EvtScript N(EVS_Init) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceClawSwipe, 3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceBodySlam, 3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceStarBeam, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_RecoversLeft, 3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_Idle) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CommandLossItemIdx, 0) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.5), EVT_FLOAT(1.5), EVT_FLOAT(1.0)) - EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 1, 150, 0, 0, 0) - EVT_EXEC(N(EVS_AnimateImgFX)) - EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 150, 150, 0, 0) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_BOWSER_AURA) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetBattleFlagBits2, BS_FLAGS2_FINAL_BOWSER_PART_1 | BS_FLAGS2_DONT_STOP_MUSIC, TRUE) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_TurnCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceClawSwipe, 3) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceBodySlam, 3) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceStarBeam, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_RecoversLeft, 3) + Call(SetActorVar, ACTOR_SELF, AVAR_Unused, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_Idle) + Call(SetActorVar, ACTOR_SELF, AVAR_CommandLossItemIdx, 0) + Call(SetActorScale, ACTOR_SELF, Float(1.5), Float(1.5), Float(1.0)) + Call(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 1, 150, 0, 0, 0) + Exec(N(EVS_AnimateImgFX)) + Call(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 150, 150, 0, 0) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_BOWSER_AURA) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetBattleFlagBits2, BS_FLAGS2_FINAL_BOWSER_PART_1 | BS_FLAGS2_DONT_STOP_MUSIC, TRUE) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar3) - EVT_LABEL(0) - EVT_CALL(ActorExists, ACTOR_SELF, LVarB) - EVT_IF_EQ(LVarB, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarB) - EVT_IF_NOT_FLAG(LVarB, STATUS_FLAG_SHRINK) - EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 150, 150, 255, 0) - EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 1, 150, 0, 0, 0) - EVT_ELSE - EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 60, 60, 255, 0) - EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 1, 60, 0, 0, 0) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_PlayFootstepSounds)) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar3) + Label(0) + Call(ActorExists, ACTOR_SELF, LVarB) + IfEq(LVarB, 0) + Return + EndIf + Call(GetStatusFlags, ACTOR_SELF, LVarB) + IfNotFlag(LVarB, STATUS_FLAG_SHRINK) + Call(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 150, 150, 255, 0) + Call(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 1, 150, 0, 0, 0) + Else + Call(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 60, 60, 255, 0) + Call(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 1, 60, 0, 0, 0) + EndIf + ExecWait(N(EVS_PlayFootstepSounds)) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastElement, LVarE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET(LVar0, 1) - EVT_SET(LVar1, ANIM_BattleBowser_BurnHurt) - EVT_SET(LVar2, ANIM_BattleBowser_BurnStill) - EVT_EXEC_WAIT(N(EVS_BurnHit)) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET(LVar0, 1) - EVT_SET(LVar1, ANIM_BattleBowser_BurnHurt) - EVT_SET(LVar2, ANIM_BattleBowser_BurnStill) - EVT_EXEC_WAIT(N(EVS_BurnHit)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_ShockReaction)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_SET(LVar1, ANIM_BattleBowser_Walk) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_ShockReaction)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_SET(LVar1, ANIM_BattleBowser_Walk) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CALL(GetDamageSource, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_OR_EQ(DMG_SRC_SPOOK) - EVT_CASE_OR_EQ(DMG_SRC_FRIGHT_JAR) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Mock) - EVT_WAIT(30) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SET(LVar1, ANIM_BattleBowser_Mock) - EVT_EXEC_WAIT(N(EVS_NoDamageHit)) - EVT_END_SWITCH - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET(LVar1, ANIM_BattleBowser_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(EVENT_SPIKE_TAUNT) - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Jump) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(3.0)) - EVT_CASE_EQ(EVENT_RECEIVE_BUFF) - EVT_CALL(N(FadeBackgroundLighten)) - EVT_CASE_EQ(EVENT_30) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(1000) - EVT_CASE_EQ(EVENT_INVUNERABLE_TAUNT) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_SET(LVar3, 60) - EVT_SET(LVar4, 97) - EVT_ELSE - EVT_SET(LVar3, 24) - EVT_SET(LVar4, 39) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, LVar3) - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, EVT_FLOAT(1.5), 20, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_RearUpLaugh) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 15) - EVT_ADD(LVar1, LVar4) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 420) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_CALL(ActorSpeak, MSG_CH8_0085, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Mock, ANIM_BattleBowser_Mock) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_PLAYER) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PARTNER_KOOPER) - EVT_CALL(ActorSpeak, MSG_CH8_0087, ACTOR_PARTNER, 0, -1, -1) - EVT_CASE_EQ(PARTNER_BOMBETTE) - EVT_CALL(ActorSpeak, MSG_CH8_0088, ACTOR_PARTNER, 0, -1, -1) - EVT_CASE_EQ(PARTNER_PARAKARRY) - EVT_CALL(ActorSpeak, MSG_CH8_0089, ACTOR_PARTNER, 0, -1, -1) - EVT_CASE_EQ(PARTNER_BOW) - EVT_CALL(ActorSpeak, MSG_CH8_008A, ACTOR_PARTNER, 0, -1, -1) - EVT_CASE_EQ(PARTNER_WATT) - EVT_CALL(ActorSpeak, MSG_CH8_008B, ACTOR_PARTNER, 0, -1, -1) - EVT_CASE_EQ(PARTNER_SUSHIE) - EVT_CALL(ActorSpeak, MSG_CH8_008C, ACTOR_PARTNER, 0, -1, -1) - EVT_CASE_EQ(PARTNER_LAKILESTER) - EVT_CALL(ActorSpeak, MSG_CH8_008D, ACTOR_PARTNER, 0, -1, -1) - EVT_CASE_DEFAULT - EVT_CALL(ActorSpeak, MSG_CH8_0086, ACTOR_PARTNER, 0, -1, -1) - EVT_END_SWITCH - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(GetActorHP, ACTOR_SELF, GB_FinalBowserHP) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_DISABLE_CELEBRATION | BS_FLAGS1_BATTLE_FLED, TRUE) - EVT_CALL(SetEndBattleFadeOutRate, 20) - EVT_RETURN - EVT_CASE_EQ(20) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastElement, LVarE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + Set(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_Hit)) + Return + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + Set(LVar0, 1) + Set(LVar1, ANIM_BattleBowser_BurnHurt) + Set(LVar2, ANIM_BattleBowser_BurnStill) + ExecWait(N(EVS_BurnHit)) + CaseEq(EVENT_BURN_DEATH) + Set(LVar0, 1) + Set(LVar1, ANIM_BattleBowser_BurnHurt) + Set(LVar2, ANIM_BattleBowser_BurnStill) + ExecWait(N(EVS_BurnHit)) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + Set(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_Hit)) + Return + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_Hit)) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_ShockReaction)) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Set(LVar1, ANIM_BattleBowser_Walk) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_ShockReaction)) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Set(LVar1, ANIM_BattleBowser_Walk) + ExecWait(N(EVS_ReturnHome)) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + Call(GetDamageSource, LVar2) + Switch(LVar2) + CaseOrEq(DMG_SRC_SPOOK) + CaseOrEq(DMG_SRC_FRIGHT_JAR) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Mock) + Wait(30) + EndCaseGroup + CaseDefault + Set(LVar1, ANIM_BattleBowser_Mock) + ExecWait(N(EVS_NoDamageHit)) + EndSwitch + EndCaseGroup + CaseEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + Set(LVar1, ANIM_BattleBowser_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(EVENT_SPIKE_TAUNT) + CaseEq(EVENT_DEATH) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_Hit)) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Jump) + ExecWait(EVS_Enemy_Recover) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(3.0)) + CaseEq(EVENT_RECEIVE_BUFF) + Call(N(FadeBackgroundLighten)) + CaseEq(EVENT_30) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(1000) + CaseEq(EVENT_INVUNERABLE_TAUNT) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Set(LVar3, 60) + Set(LVar4, 97) + Else + Set(LVar3, 24) + Set(LVar4, 39) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, LVar3) + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, Float(1.5), 20, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_RearUpLaugh) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 15) + Add(LVar1, LVar4) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 420) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 30) + Wait(30) + Call(ActorSpeak, MSG_CH8_0085, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Mock, ANIM_BattleBowser_Mock) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_PLAYER) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(GetCurrentPartnerID, LVar0) + Switch(LVar0) + CaseEq(PARTNER_KOOPER) + Call(ActorSpeak, MSG_CH8_0087, ACTOR_PARTNER, 0, -1, -1) + CaseEq(PARTNER_BOMBETTE) + Call(ActorSpeak, MSG_CH8_0088, ACTOR_PARTNER, 0, -1, -1) + CaseEq(PARTNER_PARAKARRY) + Call(ActorSpeak, MSG_CH8_0089, ACTOR_PARTNER, 0, -1, -1) + CaseEq(PARTNER_BOW) + Call(ActorSpeak, MSG_CH8_008A, ACTOR_PARTNER, 0, -1, -1) + CaseEq(PARTNER_WATT) + Call(ActorSpeak, MSG_CH8_008B, ACTOR_PARTNER, 0, -1, -1) + CaseEq(PARTNER_SUSHIE) + Call(ActorSpeak, MSG_CH8_008C, ACTOR_PARTNER, 0, -1, -1) + CaseEq(PARTNER_LAKILESTER) + Call(ActorSpeak, MSG_CH8_008D, ACTOR_PARTNER, 0, -1, -1) + CaseDefault + Call(ActorSpeak, MSG_CH8_0086, ACTOR_PARTNER, 0, -1, -1) + EndSwitch + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Call(GetActorHP, ACTOR_SELF, GB_FinalBowserHP) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Call(SetBattleFlagBits, BS_FLAGS1_DISABLE_CELEBRATION | BS_FLAGS1_BATTLE_FLED, TRUE) + Call(SetEndBattleFadeOutRate, 20) + Return + CaseEq(20) + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Hit) = { - EVT_EXEC_WAIT(N(EVS_Hit_Inner)) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + ExecWait(N(EVS_Hit_Inner)) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Hit_Inner) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_Hit) + Return + End }; EvtScript N(EVS_Death) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_Hit) + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_Death) + Return + End }; EvtScript N(EVS_NoDamageHit) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_NoDamageHit) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_EXEC_WAIT(N(EVS_TakeTurn_Inner)) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + ExecWait(N(EVS_TakeTurn_Inner)) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Move_UseStarRod) = { - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) - EVT_EXEC_WAIT(N(EVS_StarRodCast)) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) + ExecWait(N(EVS_StarRodCast)) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_SET(LVar0, 1) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVarD, LVarE, LVarF) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(GetDist2D, LVar9, LVarA, LVarC, LVarD, LVarF) - EVT_IF_GE(LVar9, EVT_FLOAT(5.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_END_IF - EVT_IF_EQ(LVarB, 180) - EVT_LOOP(15) - EVT_SUB(LVarB, 12) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVarB) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_IF - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_RETURN - EVT_END + Set(LVar0, 1) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVarD, LVarE, LVarF) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(GetDist2D, LVar9, LVarA, LVarC, LVarD, LVarF) + IfGe(LVar9, Float(5.0)) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + EndIf + IfEq(LVarB, 180) + Loop(15) + Sub(LVarB, 12) + Call(SetActorYaw, ACTOR_SELF, LVarB) + Wait(1) + EndLoop + EndIf + Call(SetActorYaw, ACTOR_SELF, 0) + Return + End }; EvtScript N(EVS_AnimateImgFX) = { - EVT_CALL(N(UpdateEnchantedBowserColors)) - EVT_RETURN - EVT_END + Call(N(UpdateEnchantedBowserColors)) + Return + End }; EvtScript N(EVS_StarRodCast) = { - EVT_CALL(N(FadeBackgroundDarken)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, 22) - EVT_ADD(LVar1, 135) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_GATHER) - EVT_ADD(LVar2, 10) - EVT_CALL(N(StarRodAppearEffect), LVar0, LVar1, LVar2, EVT_FLOAT(2.5), EVT_FLOAT(0.075)) - EVT_END_THREAD - EVT_ELSE - EVT_ADD(LVar0, 9) - EVT_ADD(LVar1, 54) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_GATHER) - EVT_ADD(LVar2, 10) - EVT_CALL(N(StarRodAppearEffect), LVar0, LVar1, LVar2, EVT_FLOAT(2.5), EVT_FLOAT(0.03)) - EVT_END_THREAD - EVT_END_IF - EVT_WAIT(65) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, 22) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_LIGHT_RAYS, 2, LVar0, 135, LVar2, EVT_FLOAT(1.5), LVarF, 0) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, 135, LVar2, EVT_FLOAT(1.0), LVarE, 0) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, 135, LVar2, EVT_FLOAT(1.5), LVarD, 0) - EVT_ELSE - EVT_ADD(LVar0, 9) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_LIGHT_RAYS, 2, LVar0, 54, LVar2, EVT_FLOAT(0.6), LVarF, 0) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, 54, LVar2, EVT_FLOAT(0.4), LVarE, 0) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, 54, LVar2, EVT_FLOAT(0.6), LVarD, 0) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_USE) - EVT_WAIT(30) - EVT_CALL(RemoveEffect, LVarF) - EVT_CALL(RemoveEffect, LVarE) - EVT_CALL(RemoveEffect, LVarD) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED, TRUE) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 1, ACTOR_DECORATION_RADIAL_STAR_EMITTER) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(BoostedDefense))) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(BoostedStatusTable))) - EVT_CALL(N(RemoveChillOut)) - EVT_WAIT(3) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 60) - EVT_ADD(LVar2, 12) - EVT_PLAY_EFFECT(EFFECT_STARS_SHIMMER, 3, LVar0, LVar1, LVar2, 105, 120, 37, 60, 0) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 24) - EVT_ADD(LVar2, 12) - EVT_PLAY_EFFECT(EFFECT_STARS_SHIMMER, 3, LVar0, LVar1, LVar2, 42, 48, 15, 60, 0) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_ENCHANT) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(N(StarRodPowerUpEffect), LVar0, LVar1, LVar2, EVT_FLOAT(1.2)) - EVT_END_THREAD - EVT_WAIT(75) - EVT_THREAD - EVT_CALL(N(FadeBackgroundLighten)) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_RearUpLaugh) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 60) - EVT_ELSE - EVT_ADD(LVar1, 24) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, EVT_FLOAT(1.5), 15, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_SHOCKWAVE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 39) - EVT_WAIT(30) - EVT_RETURN - EVT_END + Call(N(FadeBackgroundDarken)) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar0, 22) + Add(LVar1, 135) + Thread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_GATHER) + Add(LVar2, 10) + Call(N(StarRodAppearEffect), LVar0, LVar1, LVar2, Float(2.5), Float(0.075)) + EndThread + Else + Add(LVar0, 9) + Add(LVar1, 54) + Thread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_GATHER) + Add(LVar2, 10) + Call(N(StarRodAppearEffect), LVar0, LVar1, LVar2, Float(2.5), Float(0.03)) + EndThread + EndIf + Wait(65) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar0, 22) + Sub(LVar2, 3) + PlayEffect(EFFECT_LIGHT_RAYS, 2, LVar0, 135, LVar2, Float(1.5), LVarF, 0) + PlayEffect(EFFECT_BULB_GLOW, 2, LVar0, 135, LVar2, Float(1.0), LVarE, 0) + Sub(LVar2, 3) + PlayEffect(EFFECT_BULB_GLOW, 2, LVar0, 135, LVar2, Float(1.5), LVarD, 0) + Else + Add(LVar0, 9) + Sub(LVar2, 3) + PlayEffect(EFFECT_LIGHT_RAYS, 2, LVar0, 54, LVar2, Float(0.6), LVarF, 0) + PlayEffect(EFFECT_BULB_GLOW, 2, LVar0, 54, LVar2, Float(0.4), LVarE, 0) + Sub(LVar2, 3) + PlayEffect(EFFECT_BULB_GLOW, 2, LVar0, 54, LVar2, Float(0.6), LVarD, 0) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_USE) + Wait(30) + Call(RemoveEffect, LVarF) + Call(RemoveEffect, LVarE) + Call(RemoveEffect, LVarD) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED, TRUE) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 1, ACTOR_DECORATION_RADIAL_STAR_EMITTER) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(BoostedDefense))) + Call(SetStatusTable, ACTOR_SELF, Ref(N(BoostedStatusTable))) + Call(N(RemoveChillOut)) + Wait(3) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 60) + Add(LVar2, 12) + PlayEffect(EFFECT_STARS_SHIMMER, 3, LVar0, LVar1, LVar2, 105, 120, 37, 60, 0) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 24) + Add(LVar2, 12) + PlayEffect(EFFECT_STARS_SHIMMER, 3, LVar0, LVar1, LVar2, 42, 48, 15, 60, 0) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_ENCHANT) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(N(StarRodPowerUpEffect), LVar0, LVar1, LVar2, Float(1.2)) + EndThread + Wait(75) + Thread + Call(N(FadeBackgroundLighten)) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_RearUpLaugh) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar1, 60) + Else + Add(LVar1, 24) + EndIf + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, Float(1.5), 15, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_SHOCKWAVE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 39) + Wait(30) + Return + End }; EvtScript N(EVS_ShockReaction) = { - EVT_IF_NE(LVar1, -1) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar2, LVar3, LVar4) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar5, LVar6, LVar7) - EVT_SET(LVar8, LVar2) - EVT_ADD(LVar8, LVar5) - EVT_DIV(LVar8, 2) - EVT_SET(LVar9, LVar4) - EVT_ADD(LVar9, LVar7) - EVT_DIV(LVar9, 2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar8, 0, LVar9) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_ADD(LVar8, LVar2) - EVT_DIV(LVar8, 2) - EVT_ADD(LVar9, LVar4) - EVT_DIV(LVar9, 2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar8, 0, LVar9) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar2, LVar3, LVar4) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_RETURN - EVT_END + IfNe(LVar1, -1) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.4)) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar2, LVar3, LVar4) + Call(GetActorPos, ACTOR_SELF, LVar5, LVar6, LVar7) + Set(LVar8, LVar2) + Add(LVar8, LVar5) + Div(LVar8, 2) + Set(LVar9, LVar4) + Add(LVar9, LVar7) + Div(LVar9, 2) + Call(SetGoalPos, ACTOR_SELF, LVar8, 0, LVar9) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Add(LVar8, LVar2) + Div(LVar8, 2) + Add(LVar9, LVar4) + Div(LVar9, 2) + Call(SetGoalPos, ACTOR_SELF, LVar8, 0, LVar9) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar2, LVar3, LVar4) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Return + End }; EvtScript N(EVS_PlayFootstepSounds) = { - EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar7) - EVT_IF_NE(LVar7, ANIM_BattleBowser_Walk) - EVT_IF_EQ(LVar3, ANIM_BattleBowser_Walk) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_B) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) - EVT_END_IF - EVT_SET(LVar3, LVar7) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar5, LVar6, LVar7) - EVT_SUB(LVar5, LVar0) - EVT_IF_GT(LVar5, -30) - EVT_IF_LT(LVar5, 30) - EVT_SET(LVar3, LVar7) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_B) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) - EVT_SET(LVar3, LVar7) - EVT_RETURN - EVT_END + Call(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar7) + IfNe(LVar7, ANIM_BattleBowser_Walk) + IfEq(LVar3, ANIM_BattleBowser_Walk) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_B) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) + EndIf + Set(LVar3, LVar7) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Return + EndIf + Call(GetActorPos, ACTOR_SELF, LVar5, LVar6, LVar7) + Sub(LVar5, LVar0) + IfGt(LVar5, -30) + IfLt(LVar5, 30) + Set(LVar3, LVar7) + Return + EndIf + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_B) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) + Set(LVar3, LVar7) + Return + End }; EvtScript N(EVS_Recover) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_RecoversLeft, LVar0) - EVT_SUB(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_RecoversLeft, LVar0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 15) - EVT_ADD(LVar1, 97) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 420) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 40) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 6) - EVT_ADD(LVar1, 39) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 294) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 40) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) - EVT_CALL(N(FadeBackgroundDarken)) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_CAST_RECOVER) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 22) - EVT_ADD(LVar1, 135) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 2, LVar0, LVar1, LVar2, EVT_FLOAT(1.5), 50, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 22) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, 135, LVar2, EVT_FLOAT(0.45), 30, 0) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 9) - EVT_ADD(LVar1, 54) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 2, LVar0, LVar1, LVar2, EVT_FLOAT(0.6), 50, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 9) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, 54, LVar2, EVT_FLOAT(0.18), 30, 0) - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar0) - EVT_MUL(LVar0, 31) - EVT_DIV(LVar0, 100) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) - EVT_WAIT(30) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_STAR_BOUNCE_A) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(HealActor, ACTOR_SELF, LVar0, FALSE) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_RecoversLeft, LVar0) + Sub(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_RecoversLeft, LVar0) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 15) + Add(LVar1, 97) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 420) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 40) + Else + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 6) + Add(LVar1, 39) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 294) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 40) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) + Call(N(FadeBackgroundDarken)) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_CAST_RECOVER) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 22) + Add(LVar1, 135) + Sub(LVar2, 3) + PlayEffect(EFFECT_ENERGY_IN_OUT, 2, LVar0, LVar1, LVar2, Float(1.5), 50, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 22) + Sub(LVar2, 3) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, 135, LVar2, Float(0.45), 30, 0) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 9) + Add(LVar1, 54) + Sub(LVar2, 3) + PlayEffect(EFFECT_ENERGY_IN_OUT, 2, LVar0, LVar1, LVar2, Float(0.6), 50, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 9) + Sub(LVar2, 3) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, 54, LVar2, Float(0.18), 30, 0) + EndIf + Wait(30) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar0) + Mul(LVar0, 31) + Div(LVar0, 100) + Thread + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) + Wait(30) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_STAR_BOUNCE_A) + EndThread + Thread + Call(FreezeBattleState, TRUE) + Call(HealActor, ACTOR_SELF, LVar0, FALSE) + Call(FreezeBattleState, FALSE) + EndThread + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn_Inner) = { - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_TurnCount, 1) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceClawSwipe, 1) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceBodySlam, 1) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, 1) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceStarBeam, 1) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, 1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) - EVT_IF_EQ(LVar0, 2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 15) - EVT_ADD(LVar1, 90) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 420) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 30) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 6) - EVT_ADD(LVar1, 36) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 420) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 30) - EVT_END_IF - EVT_CALL(ActorSpeak, MSG_CH8_0084, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Mock, ANIM_BattleBowser_Mock) - EVT_EXEC_WAIT(N(EVS_Move_UseStarRod)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar1) - EVT_MUL(LVar0, 100) - EVT_DIV(LVar0, LVar1) - EVT_CALL(N(GetPlayerHpPercent), LVar2) - EVT_SUB(LVar2, LVar0) - EVT_IF_GT(LVar2, 25) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_RecoversLeft, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 75) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, LVar0) - EVT_IF_GT(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, 0) - EVT_EXEC_WAIT(N(EVS_Recover)) - EVT_RETURN - EVT_ELSE - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, 0) - EVT_EXEC_WAIT(N(EVS_Recover)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) - EVT_IF_GT(LVar0, 1) - EVT_CALL(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceStarBeam, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(1) - EVT_SET(LVar0, 0) - EVT_CASE_EQ(2) - EVT_SET(LVar0, 0) - EVT_CASE_EQ(3) - EVT_SET(LVar0, 15) - EVT_CASE_DEFAULT - EVT_SET(LVar0, 75) - EVT_END_SWITCH - EVT_CALL(RandInt, 100, LVar1) - EVT_IF_LT(LVar1, LVar0) - EVT_EXEC_WAIT(N(EVS_Move_UseStarRod)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, LVar0) - EVT_IF_LT(LVar0, 3) - EVT_EXEC_WAIT(N(EVS_UseAttack)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_UseAttackOrShockwave)) - EVT_RETURN - EVT_END + Call(AddActorVar, ACTOR_SELF, AVAR_TurnCount, 1) + Call(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceClawSwipe, 1) + Call(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceBodySlam, 1) + Call(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, 1) + Call(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceStarBeam, 1) + Call(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, 1) + Call(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) + IfEq(LVar0, 2) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 15) + Add(LVar1, 90) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 420) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 30) + Else + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 6) + Add(LVar1, 36) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 420) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 30) + EndIf + Call(ActorSpeak, MSG_CH8_0084, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Mock, ANIM_BattleBowser_Mock) + ExecWait(N(EVS_Move_UseStarRod)) + Return + EndIf + Call(GetActorHP, ACTOR_SELF, LVar0) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar1) + Mul(LVar0, 100) + Div(LVar0, LVar1) + Call(N(GetPlayerHpPercent), LVar2) + Sub(LVar2, LVar0) + IfGt(LVar2, 25) + Call(GetActorVar, ACTOR_SELF, AVAR_RecoversLeft, LVar0) + IfNe(LVar0, 0) + Call(RandInt, 100, LVar0) + IfLt(LVar0, 75) + Call(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, LVar0) + IfGt(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, 0) + ExecWait(N(EVS_Recover)) + Return + Else + Call(RandInt, 100, LVar0) + IfLt(LVar0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, 0) + ExecWait(N(EVS_Recover)) + Return + EndIf + EndIf + EndIf + EndIf + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) + IfGt(LVar0, 1) + Call(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar0) + IfNotFlag(LVar0, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) + Call(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceStarBeam, LVar0) + Switch(LVar0) + CaseEq(1) + Set(LVar0, 0) + CaseEq(2) + Set(LVar0, 0) + CaseEq(3) + Set(LVar0, 15) + CaseDefault + Set(LVar0, 75) + EndSwitch + Call(RandInt, 100, LVar1) + IfLt(LVar1, LVar0) + ExecWait(N(EVS_Move_UseStarRod)) + Return + EndIf + EndIf + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, LVar0) + IfLt(LVar0, 3) + ExecWait(N(EVS_UseAttack)) + Return + EndIf + ExecWait(N(EVS_UseAttackOrShockwave)) + Return + End }; EvtScript N(EVS_UseAttackOrShockwave) = { // only use regular attacks for the first few turns - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) - EVT_IF_LE(LVar0, 3) - EVT_EXEC_WAIT(N(EVS_UseAttack)) - EVT_RETURN - EVT_END_IF + Call(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) + IfLe(LVar0, 3) + ExecWait(N(EVS_UseAttack)) + Return + EndIf // use shockwave if it hasn't been used recently - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, LVar0) - EVT_IF_GE(LVar0, 6) - EVT_CALL(RandInt, 30, LVar0) - EVT_IF_LT(LVar0, 20) - EVT_EXEC_WAIT(N(EVS_UseDrainingShockwave)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_LightningBlast)) - EVT_END_IF - EVT_RETURN - EVT_END_IF + Call(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, LVar0) + IfGe(LVar0, 6) + Call(RandInt, 30, LVar0) + IfLt(LVar0, 20) + ExecWait(N(EVS_UseDrainingShockwave)) + Else + ExecWait(N(EVS_Attack_LightningBlast)) + EndIf + Return + EndIf // if either hammer or jump are boosted, try using shockwave - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 75) - EVT_CALL(N(GetJumpHammerCharge), LVar0, LVar1) - EVT_IF_GT(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_UseDrainingShockwave)) - EVT_RETURN - EVT_END_IF - EVT_IF_GT(LVar1, 0) - EVT_EXEC_WAIT(N(EVS_UseDrainingShockwave)) - EVT_RETURN - EVT_END_IF - EVT_END_IF + Call(RandInt, 100, LVar0) + IfLt(LVar0, 75) + Call(N(GetJumpHammerCharge), LVar0, LVar1) + IfGt(LVar0, 0) + ExecWait(N(EVS_UseDrainingShockwave)) + Return + EndIf + IfGt(LVar1, 0) + ExecWait(N(EVS_UseDrainingShockwave)) + Return + EndIf + EndIf // ~27% chance to use regardless - EVT_CALL(RandInt, 110, LVar0) - EVT_IF_LT(LVar0, 30) - EVT_IF_LT(LVar0, 20) - EVT_EXEC_WAIT(N(EVS_UseDrainingShockwave)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_LightningBlast)) - EVT_END_IF - EVT_RETURN - EVT_END_IF + Call(RandInt, 110, LVar0) + IfLt(LVar0, 30) + IfLt(LVar0, 20) + ExecWait(N(EVS_UseDrainingShockwave)) + Else + ExecWait(N(EVS_Attack_LightningBlast)) + EndIf + Return + EndIf // fallback to using a regular attack - EVT_EXEC_WAIT(N(EVS_UseAttack)) - EVT_RETURN - EVT_RETURN - EVT_END + ExecWait(N(EVS_UseAttack)) + Return + Return + End }; EvtScript N(EVS_UseAttack) = { - EVT_CALL(RandInt, 80, LVar0) - EVT_IF_LT(LVar0, 20) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceBodySlam, LVar0) - EVT_IF_GE(LVar0, 2) - EVT_EXEC_WAIT(N(EVS_Attack_BodySlam)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(RandInt, 60, LVar0) - EVT_IF_LT(LVar0, 20) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceClawSwipe, LVar0) - EVT_IF_GE(LVar0, 2) - EVT_EXEC_WAIT(N(EVS_Attack_ClawSwipe)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_Attack_FireBreath)) - EVT_RETURN - EVT_END + Call(RandInt, 80, LVar0) + IfLt(LVar0, 20) + Call(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceBodySlam, LVar0) + IfGe(LVar0, 2) + ExecWait(N(EVS_Attack_BodySlam)) + Return + EndIf + EndIf + Call(RandInt, 60, LVar0) + IfLt(LVar0, 20) + Call(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceClawSwipe, LVar0) + IfGe(LVar0, 2) + ExecWait(N(EVS_Attack_ClawSwipe)) + Return + EndIf + EndIf + ExecWait(N(EVS_Attack_FireBreath)) + Return + End }; #include "common/DisableRandomAbility.inc.c" @@ -840,799 +840,799 @@ EvtScript N(EVS_UseAttack) = { #include "common/UnkLightningBoltFxFunc1.inc.c" EvtScript N(EVS_ManageCommandLoss) = { - EVT_LABEL(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CommandLossState, LVarA) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(AVAL_LossState_Idle) + Label(0) + Call(GetActorVar, ACTOR_SELF, AVAR_CommandLossState, LVarA) + Switch(LVarA) + CaseEq(AVAL_LossState_Idle) // do nothing - EVT_CASE_EQ(AVAL_LossState_KnockAway) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar1, LVar2, LVar3) - EVT_SET(LVar2, 0) - EVT_SUB(LVar3, 1) - EVT_CALL(N(DisableRandomAbility), LVar4, LVar5) - EVT_CALL(MakeItemEntity, LVar4, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CommandLossItemIdx, LVar0) - EVT_ADD(LVar1, 7) - EVT_CALL(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 8, EVT_FLOAT(1.0)) - EVT_ADD(LVar1, 12) - EVT_CALL(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 8, EVT_FLOAT(1.0)) - EVT_ADD(LVar1, 7) - EVT_CALL(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 5, EVT_FLOAT(1.0)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_Idle) - EVT_CASE_EQ(AVAL_LossState_ShowMessage) - EVT_CALL(ShowMessageBox, LVar5, 60) - EVT_CALL(RemoveItemEntity, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_Done) - EVT_RETURN - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + CaseEq(AVAL_LossState_KnockAway) + Call(GetActorPos, ACTOR_PLAYER, LVar1, LVar2, LVar3) + Set(LVar2, 0) + Sub(LVar3, 1) + Call(N(DisableRandomAbility), LVar4, LVar5) + Call(MakeItemEntity, LVar4, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_DECORATION, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_CommandLossItemIdx, LVar0) + Add(LVar1, 7) + Call(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 8, Float(1.0)) + Add(LVar1, 12) + Call(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 8, Float(1.0)) + Add(LVar1, 7) + Call(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 5, Float(1.0)) + Call(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_Idle) + CaseEq(AVAL_LossState_ShowMessage) + Call(ShowMessageBox, LVar5, 60) + Call(RemoveItemEntity, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_Done) + Return + EndSwitch + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_Attack_BodySlam) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceBodySlam, 0) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(SetBattleCamOffsetZ, 54) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 40) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 240) - EVT_CALL(SetBattleCamOffsetZ, 21) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 40) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Walk) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 60, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PreJump) - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Jump) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(3.0)) - EVT_END_THREAD - EVT_SUB(LVar0, 35) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 14, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(2.0)) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(25) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_SET(LVar1, ANIM_BattleBowser_Walk) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(3.0)) - EVT_END_THREAD - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Land) - EVT_CALL(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_IF_FLAG(LVar1, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) - EVT_SET(LVar0, DMG_BOOSTED_BODY_SLAM) - EVT_ELSE - EVT_SET(LVar0, DMG_BODY_SLAM) - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarF) - EVT_IF_NOT_FLAG(LVarF, STATUS_FLAG_SHRINK) - EVT_CALL(SetDamageSource, DMG_SRC_CRUSH) - EVT_END_IF - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SET(LVar0, -1) - EVT_CALL(GetBattleFlags, LVar1) - EVT_IF_NOT_FLAG(LVar1, BS_FLAGS1_ATK_BLOCKED) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar1) - EVT_IF_NOT_FLAG(LVar1, STATUS_FLAG_STONE | STATUS_FLAG_RIGHT_ON) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_NOT_FLAG(LVar1, STATUS_FLAG_SHRINK) - EVT_CALL(N(CanPlayerLoseAction), LVar0) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_IF_NE(LVar0, -1) - EVT_CALL(LandJump, ACTOR_SELF) - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_KnockAway) - EVT_EXEC(N(EVS_ManageCommandLoss)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 52) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) - EVT_THREAD - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(3.0)) - EVT_END_THREAD - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 3, EVT_FLOAT(2.0)) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) - EVT_WAIT(3) - EVT_LABEL(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CommandLossState, LVar0) - EVT_IF_NE(LVar0, AVAL_LossState_Idle) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(8) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Walk) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CommandLossItemIdx, LVar0) - EVT_CALL(N(GetItemEntityPosition), LVar0, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, 38) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(8) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_StompOnce) - EVT_WAIT(2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CommandLossItemIdx, LVar0) - EVT_CALL(N(GetItemEntityPosition), LVar0, LVar1, LVar2, LVar3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_ShowMessage) - EVT_PLAY_EFFECT(EFFECT_FIREWORK, 0, LVar1, 0, LVar3, EVT_FLOAT(0.75), 0, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, LVar1, 0, LVar3, EVT_FLOAT(3.0), 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_StompOnce) - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_FIREWORK, 0, LVar1, 0, LVar3, EVT_FLOAT(0.75), 0, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, LVar1, 0, LVar3, EVT_FLOAT(3.0), 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_StompOnce) - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_FIREWORK, 0, LVar1, 0, LVar3, EVT_FLOAT(0.75), 0, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, LVar1, 0, LVar3, EVT_FLOAT(3.0), 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Mock) - EVT_WAIT(20) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_ELSE - EVT_CALL(GetBattleFlags, LVar1) - EVT_IF_NOT_FLAG(LVar1, BS_FLAGS1_ATK_BLOCKED) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar1) - EVT_IF_NOT_FLAG(LVar1, STATUS_FLAG_STONE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_NOT_FLAG(LVar1, STATUS_FLAG_SHRINK) - EVT_CALL(LandJump, ACTOR_SELF) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) - EVT_THREAD - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(3.0)) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(20) - EVT_END_IF - EVT_IF_EQ(LVarF, 10) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_SET(LVar1, ANIM_BattleBowser_Walk) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceBodySlam, 0) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 300) + Call(SetBattleCamOffsetZ, 54) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 40) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Else + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 240) + Call(SetBattleCamOffsetZ, 21) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 40) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Walk) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 60, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PreJump) + Wait(3) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Jump) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Set(LVar1, 0) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) + Thread + Call(N(StartRumbleWithParams), 80, 14) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(3.0)) + EndThread + Sub(LVar0, 35) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 14, FALSE, TRUE, FALSE) + Thread + Call(N(StartRumbleWithParams), 80, 14) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(2.0)) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) + Wait(3) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(25) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Set(LVar1, ANIM_BattleBowser_Walk) + ExecWait(N(EVS_ReturnHome)) + Return + EndCaseGroup + CaseDefault + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(3.0)) + EndThread + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Land) + Call(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar1) + IfFlag(LVar1, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) + Set(LVar0, DMG_BOOSTED_BODY_SLAM) + Else + Set(LVar0, DMG_BODY_SLAM) + EndIf + Call(GetStatusFlags, ACTOR_SELF, LVarF) + IfNotFlag(LVarF, STATUS_FLAG_SHRINK) + Call(SetDamageSource, DMG_SRC_CRUSH) + EndIf + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) + Set(LVar0, -1) + Call(GetBattleFlags, LVar1) + IfNotFlag(LVar1, BS_FLAGS1_ATK_BLOCKED) + Call(GetStatusFlags, ACTOR_PLAYER, LVar1) + IfNotFlag(LVar1, STATUS_FLAG_STONE | STATUS_FLAG_RIGHT_ON) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfNotFlag(LVar1, STATUS_FLAG_SHRINK) + Call(N(CanPlayerLoseAction), LVar0) + EndIf + EndIf + EndIf + IfNe(LVar0, -1) + Call(LandJump, ACTOR_SELF) + Call(N(StartRumbleWithParams), 80, 14) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) + Call(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_KnockAway) + Exec(N(EVS_ManageCommandLoss)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 52) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) + Thread + Call(N(StartRumbleWithParams), 80, 14) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(3.0)) + EndThread + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Thread + Call(N(StartRumbleWithParams), 80, 14) + Call(ShakeCam, CAM_BATTLE, 0, 3, Float(2.0)) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) + Wait(3) + Label(0) + Call(GetActorVar, ACTOR_SELF, AVAR_CommandLossState, LVar0) + IfNe(LVar0, AVAL_LossState_Idle) + Wait(1) + Goto(0) + EndIf + Wait(8) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Walk) + Call(GetActorVar, ACTOR_SELF, AVAR_CommandLossItemIdx, LVar0) + Call(N(GetItemEntityPosition), LVar0, LVar1, LVar2, LVar3) + Add(LVar1, 38) + Call(SetActorSpeed, ACTOR_SELF, Float(2.0)) + Call(SetGoalPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(8) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_StompOnce) + Wait(2) + Call(GetActorVar, ACTOR_SELF, AVAR_CommandLossItemIdx, LVar0) + Call(N(GetItemEntityPosition), LVar0, LVar1, LVar2, LVar3) + Call(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_ShowMessage) + PlayEffect(EFFECT_FIREWORK, 0, LVar1, 0, LVar3, Float(0.75), 0, 0) + PlayEffect(EFFECT_LANDING_DUST, 1, LVar1, 0, LVar3, Float(3.0), 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) + Wait(4) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_StompOnce) + Wait(2) + PlayEffect(EFFECT_FIREWORK, 0, LVar1, 0, LVar3, Float(0.75), 0, 0) + PlayEffect(EFFECT_LANDING_DUST, 1, LVar1, 0, LVar3, Float(3.0), 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) + Wait(4) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_StompOnce) + Wait(2) + PlayEffect(EFFECT_FIREWORK, 0, LVar1, 0, LVar3, Float(0.75), 0, 0) + PlayEffect(EFFECT_LANDING_DUST, 1, LVar1, 0, LVar3, Float(3.0), 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Mock) + Wait(20) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Else + Call(GetBattleFlags, LVar1) + IfNotFlag(LVar1, BS_FLAGS1_ATK_BLOCKED) + Call(GetStatusFlags, ACTOR_PLAYER, LVar1) + IfNotFlag(LVar1, STATUS_FLAG_STONE) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfNotFlag(LVar1, STATUS_FLAG_SHRINK) + Call(LandJump, ACTOR_SELF) + EndIf + EndIf + EndIf + Call(N(StartRumbleWithParams), 80, 14) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) + Thread + Call(N(StartRumbleWithParams), 80, 14) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(3.0)) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) + Wait(3) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(20) + EndIf + IfEq(LVarF, 10) + Return + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Set(LVar1, ANIM_BattleBowser_Walk) + ExecWait(N(EVS_ReturnHome)) + Return + End }; EvtScript N(EVS_AttackMissed) = { - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Tantrum) - EVT_THREAD - EVT_WAIT(5) - EVT_LOOP(4) - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(2.0)) - EVT_WAIT(4) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Tantrum) + Thread + Wait(5) + Loop(4) + Call(N(StartRumbleWithParams), 80, 14) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(2.0)) + Wait(4) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + EndThread + Return + End }; EvtScript N(EVS_Attack_ClawSwipe) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceClawSwipe, 0) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 200) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 40) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 160) - EVT_CALL(SetBattleCamOffsetZ, 5) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 40) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Walk) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(AddGoalPos, ACTOR_SELF, 60, 0, 0) - EVT_ELSE - EVT_CALL(AddGoalPos, ACTOR_SELF, 24, 0, 0) - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_RearUpMock) - EVT_WAIT(25) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Swipe) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_SWIPE) - EVT_WAIT(3) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_EXEC_WAIT(N(EVS_AttackMissed)) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_WAIT(30) - EVT_ELSE - EVT_WAIT(30) - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_SET(LVar1, ANIM_BattleBowser_Walk) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_IF_FLAG(LVar0, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) - EVT_SET(LVar0, DMG_BOOSTED_CLAW_SWIPE) - EVT_CALL(SetDamageSource, DMG_SRC_LAST_SLAP_LEFT) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 100), LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_ELSE - EVT_SET(LVar0, DMG_CLAW_SWIPE) - EVT_CALL(SetDamageSource, DMG_SRC_LAST_SLAP_LEFT) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 100), LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_IF - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_WAIT(30) - EVT_IF_EQ(LVarF, HIT_RESULT_10) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_SET(LVar1, ANIM_BattleBowser_Walk) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceClawSwipe, 0) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 200) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 40) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Else + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 160) + Call(SetBattleCamOffsetZ, 5) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 40) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Walk) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(AddGoalPos, ACTOR_SELF, 60, 0, 0) + Else + Call(AddGoalPos, ACTOR_SELF, 24, 0, 0) + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_RearUpMock) + Wait(25) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Swipe) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_SWIPE) + Wait(3) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + ExecWait(N(EVS_AttackMissed)) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + Wait(30) + Else + Wait(30) + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Set(LVar1, ANIM_BattleBowser_Walk) + ExecWait(N(EVS_ReturnHome)) + Return + EndCaseGroup + CaseDefault + EndSwitch + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar0) + IfFlag(LVar0, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) + Set(LVar0, DMG_BOOSTED_CLAW_SWIPE) + Call(SetDamageSource, DMG_SRC_LAST_SLAP_LEFT) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 100), LVar0, BS_FLAGS1_TRIGGER_EVENTS) + Else + Set(LVar0, DMG_CLAW_SWIPE) + Call(SetDamageSource, DMG_SRC_LAST_SLAP_LEFT) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 100), LVar0, BS_FLAGS1_TRIGGER_EVENTS) + EndIf + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Wait(30) + IfEq(LVarF, HIT_RESULT_10) + Return + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Set(LVar1, ANIM_BattleBowser_Walk) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_UseDrainingShockwave) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, 0) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 24) - EVT_ADD(LVar1, 97) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 420) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 40) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 9) - EVT_ADD(LVar1, 39) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 375) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 40) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) - EVT_WAIT(10) - EVT_CALL(N(FadeBackgroundDarken)) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_USE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 22) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_LIGHT_RAYS, 2, LVar0, 135, LVar2, EVT_FLOAT(1.0), LVarF, 0) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, 135, LVar2, EVT_FLOAT(1.0), LVarE, 0) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 9) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_LIGHT_RAYS, 2, LVar0, 54, LVar2, EVT_FLOAT(0.4), LVarF, 0) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, 54, LVar2, EVT_FLOAT(0.4), LVarE, 0) - EVT_END_IF - EVT_WAIT(25) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, -45, 60, 0) - EVT_CALL(SetBattleCamZoom, 530) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 80) - EVT_WAIT(10) - EVT_CALL(RemoveEffect, LVarF) - EVT_CALL(RemoveEffect, LVarE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_DRAIN_WAVE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 19) - EVT_SET(LVar1, 55) - EVT_PLAY_EFFECT(EFFECT_ENERGY_SHOCKWAVE, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 60, 0) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 7) - EVT_SET(LVar1, 22) - EVT_PLAY_EFFECT(EFFECT_ENERGY_SHOCKWAVE, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 60, 0) - EVT_END_IF - EVT_THREAD - EVT_CALL(N(FadeBackgroundLighten)) - EVT_END_THREAD - EVT_WAIT(8) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarB, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarB) - EVT_CASE_EQ(HIT_RESULT_MISS) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(30) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_WAIT(2) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_EXEC_WAIT(N(EVS_AttackMissed)) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(2) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, 0) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 24) + Add(LVar1, 97) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 420) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 40) + Else + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 9) + Add(LVar1, 39) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 375) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 40) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) + Wait(10) + Call(N(FadeBackgroundDarken)) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_USE) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 22) + Sub(LVar2, 3) + PlayEffect(EFFECT_LIGHT_RAYS, 2, LVar0, 135, LVar2, Float(1.0), LVarF, 0) + Sub(LVar2, 3) + PlayEffect(EFFECT_BULB_GLOW, 2, LVar0, 135, LVar2, Float(1.0), LVarE, 0) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 9) + Sub(LVar2, 3) + PlayEffect(EFFECT_LIGHT_RAYS, 2, LVar0, 54, LVar2, Float(0.4), LVarF, 0) + Sub(LVar2, 3) + PlayEffect(EFFECT_BULB_GLOW, 2, LVar0, 54, LVar2, Float(0.4), LVarE, 0) + EndIf + Wait(25) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, -45, 60, 0) + Call(SetBattleCamZoom, 530) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 80) + Wait(10) + Call(RemoveEffect, LVarF) + Call(RemoveEffect, LVarE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_DRAIN_WAVE) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 19) + Set(LVar1, 55) + PlayEffect(EFFECT_ENERGY_SHOCKWAVE, 0, LVar0, LVar1, LVar2, Float(1.0), 60, 0) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 7) + Set(LVar1, 22) + PlayEffect(EFFECT_ENERGY_SHOCKWAVE, 0, LVar0, LVar1, LVar2, Float(1.0), 60, 0) + EndIf + Thread + Call(N(FadeBackgroundLighten)) + EndThread + Wait(8) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(EnemyTestTarget, ACTOR_SELF, LVarB, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarB) + CaseEq(HIT_RESULT_MISS) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(30) + Return + CaseDefault + Wait(2) + IfEq(LVarA, HIT_RESULT_LUCKY) + ExecWait(N(EVS_AttackMissed)) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(2) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(SetGoalToTarget, ACTOR_SELF) //// @bug missing a call to GetPartEventFlags, LVar0 is invalid in next block - EVT_IF_FLAG(LVar0, ACTOR_EVENT_FLAG_ENCHANTED) - EVT_SET(LVar1, DMG_BOOSTED_SHOCKWAVE_P) - EVT_ELSE - EVT_SET(LVar1, DMG_SHOCKWAVE_P) - EVT_END_IF - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(RemovePlayerBuffs, PLAYER_BUFF_PARTNER_GLOWING) - EVT_IF_NE(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_END_IF - EVT_WAIT(30) - EVT_RETURN - EVT_END_SWITCH - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(FreezeBattleState, TRUE) - EVT_THREAD - EVT_WAIT(4) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) + IfFlag(LVar0, ACTOR_EVENT_FLAG_ENCHANTED) + Set(LVar1, DMG_BOOSTED_SHOCKWAVE_P) + Else + Set(LVar1, DMG_SHOCKWAVE_P) + EndIf + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_TRIGGER_EVENTS) + Call(RemovePlayerBuffs, PLAYER_BUFF_PARTNER_GLOWING) + IfNe(LVarA, HIT_RESULT_LUCKY) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + EndIf + Wait(30) + Return + EndSwitch + EndCaseGroup + CaseDefault + EndSwitch + Call(FreezeBattleState, TRUE) + Thread + Wait(4) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(SetGoalToTarget, ACTOR_SELF) /// @bug missing a call to GetPartEventFlags, LVar0 is invalid in next block - EVT_IF_FLAG(LVar0, ACTOR_EVENT_FLAG_ENCHANTED) - EVT_SET(LVar1, DMG_BOOSTED_SHOCKWAVE_P) - EVT_ELSE - EVT_SET(LVar1, DMG_SHOCKWAVE_P) - EVT_END_IF - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) + IfFlag(LVar0, ACTOR_EVENT_FLAG_ENCHANTED) + Set(LVar1, DMG_BOOSTED_SHOCKWAVE_P) + Else + Set(LVar1, DMG_SHOCKWAVE_P) + EndIf + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_TRIGGER_EVENTS) + Call(FreezeBattleState, FALSE) + EndThread + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) /// @bug missing a call to GetPartEventFlags, LVar0 is invalid in next block - EVT_IF_FLAG(LVar0, ACTOR_EVENT_FLAG_ENCHANTED) - EVT_SET(LVar1, DMG_BOOSTED_SHOCKWAVE) - EVT_ELSE - EVT_SET(LVar1, DMG_SHOCKWAVE) - EVT_END_IF - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(RemovePlayerBuffs, PLAYER_BUFF_JUMP_CHARGE | PLAYER_BUFF_HAMMER_CHARGE | PLAYER_BUFF_STONE | PLAYER_BUFF_HUSTLE | PLAYER_BUFF_STATIC | PLAYER_BUFF_TRANSPARENT | PLAYER_BUFF_CLOUD_NINE | PLAYER_BUFF_TURBO_CHARGE | PLAYER_BUFF_WATER_BLOCK | PLAYER_BUFF_PARTNER_GLOWING | 0xFFEFC04) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(15) - EVT_IF_EQ(LVarF, HIT_RESULT_10) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + IfFlag(LVar0, ACTOR_EVENT_FLAG_ENCHANTED) + Set(LVar1, DMG_BOOSTED_SHOCKWAVE) + Else + Set(LVar1, DMG_SHOCKWAVE) + EndIf + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_TRIGGER_EVENTS) + Call(RemovePlayerBuffs, PLAYER_BUFF_JUMP_CHARGE | PLAYER_BUFF_HAMMER_CHARGE | PLAYER_BUFF_STONE | PLAYER_BUFF_HUSTLE | PLAYER_BUFF_STATIC | PLAYER_BUFF_TRANSPARENT | PLAYER_BUFF_CLOUD_NINE | PLAYER_BUFF_TURBO_CHARGE | PLAYER_BUFF_WATER_BLOCK | PLAYER_BUFF_PARTNER_GLOWING | 0xFFEFC04) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(15) + IfEq(LVarF, HIT_RESULT_10) + Return + EndIf + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_Attack_FireBreath) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 81) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 400) - EVT_CALL(MoveBattleCamOver, 40) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 56) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 350) - EVT_CALL(MoveBattleCamOver, 40) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PreFireBreath) - EVT_WAIT(35) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_FireBreathStill) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 55) - EVT_WAIT(10) - EVT_CALL(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar3) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar4) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_IF_FLAG(LVar3, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) - EVT_IF_NOT_FLAG(LVar4, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 70) - EVT_ADD(LVar1, 35) - EVT_ELSE - EVT_SUB(LVar0, 28) - EVT_ADD(LVar1, 14) - EVT_END_IF - EVT_ELSE - EVT_IF_NOT_FLAG(LVar4, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 75) - EVT_ADD(LVar1, 49) - EVT_ELSE - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 19) - EVT_END_IF - EVT_END_IF - EVT_ADD(LVar2, 10) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 40) - EVT_SET(LVar4, 20) - EVT_CALL(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar6) - EVT_IF_FLAG(LVar6, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) - EVT_PLAY_EFFECT(EFFECT_FIRE_BREATH, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 50, 1, 24, 0) - EVT_ELSE - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar7) - EVT_IF_NOT_FLAG(LVar7, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, 15) - EVT_ELSE - EVT_ADD(LVar0, 6) - EVT_END_IF - EVT_SUB(LVar3, 10) - EVT_PLAY_EFFECT(EFFECT_FIRE_BREATH, 2, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 50, 1, 24, 0) - EVT_CALL(N(SetBowserFireBreathScales), LVarF) - EVT_END_IF - EVT_THREAD - EVT_CALL(N(StartRumbleWithParams), 50, 148) - EVT_CALL(PlaySound, SOUND_BOWSER_FIRE_BREATH_LOOP) - EVT_WAIT(70) - EVT_CALL(PlaySound, SOUND_BOWSER_FIRE_BREATH_LOOP | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_FireBreathLoop) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostFireBreath) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(30) - EVT_EXEC_WAIT(N(EVS_AttackMissed)) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(30) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_IF_FLAG(LVar0, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) - EVT_SET(LVar0, DMG_BOOSTED_FIRE_BREATH) - EVT_ELSE - EVT_SET(LVar0, DMG_FIRE_BREATH) - EVT_END_IF - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_FIRE, SUPPRESS_EVENT_ALL, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_FireBreathLoop) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostFireBreath) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(30) - EVT_IF_EQ(LVarF, HIT_RESULT_10) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Add(LVar1, 81) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 400) + Call(MoveBattleCamOver, 40) + Else + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Add(LVar1, 56) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 350) + Call(MoveBattleCamOver, 40) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PreFireBreath) + Wait(35) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_FireBreathStill) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 55) + Wait(10) + Call(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar3) + Call(GetStatusFlags, ACTOR_SELF, LVar4) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + IfFlag(LVar3, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) + IfNotFlag(LVar4, STATUS_FLAG_SHRINK) + Sub(LVar0, 70) + Add(LVar1, 35) + Else + Sub(LVar0, 28) + Add(LVar1, 14) + EndIf + Else + IfNotFlag(LVar4, STATUS_FLAG_SHRINK) + Sub(LVar0, 75) + Add(LVar1, 49) + Else + Sub(LVar0, 30) + Add(LVar1, 19) + EndIf + EndIf + Add(LVar2, 10) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Sub(LVar3, 40) + Set(LVar4, 20) + Call(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar6) + IfFlag(LVar6, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) + PlayEffect(EFFECT_FIRE_BREATH, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 50, 1, 24, 0) + Else + Call(GetStatusFlags, ACTOR_SELF, LVar7) + IfNotFlag(LVar7, STATUS_FLAG_SHRINK) + Add(LVar0, 15) + Else + Add(LVar0, 6) + EndIf + Sub(LVar3, 10) + PlayEffect(EFFECT_FIRE_BREATH, 2, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 50, 1, 24, 0) + Call(N(SetBowserFireBreathScales), LVarF) + EndIf + Thread + Call(N(StartRumbleWithParams), 50, 148) + Call(PlaySound, SOUND_BOWSER_FIRE_BREATH_LOOP) + Wait(70) + Call(PlaySound, SOUND_BOWSER_FIRE_BREATH_LOOP | SOUND_ID_TRIGGER_CHANGE_SOUND) + EndThread + Wait(10) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_FireBreathLoop) + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostFireBreath) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(30) + ExecWait(N(EVS_AttackMissed)) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(30) + Return + EndCaseGroup + CaseDefault + EndSwitch + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar0) + IfFlag(LVar0, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) + Set(LVar0, DMG_BOOSTED_FIRE_BREATH) + Else + Set(LVar0, DMG_FIRE_BREATH) + EndIf + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_FIRE, SUPPRESS_EVENT_ALL, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_FireBreathLoop) + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostFireBreath) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(30) + IfEq(LVarF, HIT_RESULT_10) + Return + EndIf + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_BurnHit) = { - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(GetDamageSource, LVar3) - EVT_SWITCH(LVar3) - EVT_CASE_EQ(DMG_SRC_FIRE_SHELL) - EVT_CALL(GetOriginalActorType, ACTOR_SELF, LVar7) - EVT_SWITCH(LVar7) - EVT_CASE_OR_EQ(ACTOR_TYPE_MONTY_MOLE) - EVT_CASE_OR_EQ(ACTOR_TYPE_MONTY_MOLE_BOSS) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.01)) - EVT_ADD(LVar5, 55) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, FALSE, FALSE) - EVT_END_SWITCH - EVT_SET(LVar7, 0) - EVT_LOOP(30) - EVT_ADD(LVar7, 48) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar7) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetOriginalActorType, ACTOR_SELF, LVar7) - EVT_SWITCH(LVar7) - EVT_CASE_OR_EQ(ACTOR_TYPE_MONTY_MOLE) - EVT_CASE_OR_EQ(ACTOR_TYPE_MONTY_MOLE_BOSS) - EVT_WAIT(30) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SUB(LVar5, 55) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_IF_EQ(LVar5, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_ELSE - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, FALSE, FALSE) - EVT_END_IF - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_WAIT(20) - EVT_END_SWITCH - EVT_IF_NE(LVar2, -1) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar2) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar1) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_CALL(GetPartEventFlags, ACTOR_SELF, LVar0, LVar1) - EVT_IF_NOT_FLAG(LVar1, ACTOR_EVENT_FLAG_FIREY | ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorSize, ACTOR_SELF, LVar3, LVar4) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_MULF(LVar3, EVT_FLOAT(0.4)) - EVT_MULF(LVar4, EVT_FLOAT(0.4)) - EVT_END_IF - EVT_DIVF(LVar3, EVT_FLOAT(2.0)) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar5) - EVT_IF_FLAG(LVar5, ACTOR_FLAG_UPSIDE_DOWN) - EVT_SUBF(LVar1, LVar3) - EVT_ELSE - EVT_ADDF(LVar1, LVar3) - EVT_END_IF - EVT_ADDF(LVar2, EVT_FLOAT(5.0)) - EVT_DIVF(LVar3, EVT_FLOAT(10.0)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_MULF(LVar3, EVT_FLOAT(0.4)) - EVT_IF_LT(LVar3, 1) - EVT_SETF(LVar3, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, LVar3, 10, 0) - EVT_END_IF - EVT_CASE_EQ(EVENT_BURN_DEATH) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(GetDamageSource, LVar3) + Switch(LVar3) + CaseEq(DMG_SRC_FIRE_SHELL) + Call(GetOriginalActorType, ACTOR_SELF, LVar7) + Switch(LVar7) + CaseOrEq(ACTOR_TYPE_MONTY_MOLE) + CaseOrEq(ACTOR_TYPE_MONTY_MOLE_BOSS) + EndCaseGroup + CaseDefault + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.01)) + Add(LVar5, 55) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, FALSE, FALSE) + EndSwitch + Set(LVar7, 0) + Loop(30) + Add(LVar7, 48) + Call(SetActorYaw, ACTOR_SELF, LVar7) + Wait(1) + EndLoop + Call(GetOriginalActorType, ACTOR_SELF, LVar7) + Switch(LVar7) + CaseOrEq(ACTOR_TYPE_MONTY_MOLE) + CaseOrEq(ACTOR_TYPE_MONTY_MOLE_BOSS) + Wait(30) + EndCaseGroup + CaseDefault + Sub(LVar5, 55) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + IfEq(LVar5, 0) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Else + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, FALSE, FALSE) + EndIf + EndSwitch + CaseDefault + Wait(20) + EndSwitch + IfNe(LVar2, -1) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar2) + EndIf + Wait(10) + Call(GetLastEvent, ACTOR_SELF, LVar1) + Switch(LVar1) + CaseEq(EVENT_BURN_HIT) + Call(GetPartEventFlags, ACTOR_SELF, LVar0, LVar1) + IfNotFlag(LVar1, ACTOR_EVENT_FLAG_FIREY | ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorSize, ACTOR_SELF, LVar3, LVar4) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfFlag(LVar5, STATUS_FLAG_SHRINK) + MulF(LVar3, Float(0.4)) + MulF(LVar4, Float(0.4)) + EndIf + DivF(LVar3, Float(2.0)) + Call(GetActorFlags, ACTOR_SELF, LVar5) + IfFlag(LVar5, ACTOR_FLAG_UPSIDE_DOWN) + SubF(LVar1, LVar3) + Else + AddF(LVar1, LVar3) + EndIf + AddF(LVar2, Float(5.0)) + DivF(LVar3, Float(10.0)) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfFlag(LVar5, STATUS_FLAG_SHRINK) + MulF(LVar3, Float(0.4)) + IfLt(LVar3, 1) + SetF(LVar3, Float(1.0)) + EndIf + EndIf + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, LVar3, 10, 0) + EndIf + CaseEq(EVENT_BURN_DEATH) // do nothing - EVT_END_SWITCH - EVT_RETURN - EVT_END + EndSwitch + Return + End }; EvtScript N(EVS_Attack_LightningBlast) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_CHARGE_LIGHTNING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) - EVT_CALL(N(FadeBackgroundDarken)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 54) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 2, LVar0, LVar1, LVar2, EVT_FLOAT(1.5), 50, 0) - EVT_WAIT(50) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 22) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_LIGHT_RAYS, 2, LVar0, 135, LVar2, EVT_FLOAT(1.5), LVarF, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_USE) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, 135, LVar2, EVT_FLOAT(1.5), LVarE, 0) - EVT_WAIT(30) - EVT_CALL(RemoveEffect, LVarF) - EVT_CALL(RemoveEffect, LVarE) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 21) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 2, LVar0, LVar1, LVar2, EVT_FLOAT(0.6), 50, 0) - EVT_WAIT(50) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 9) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_LIGHT_RAYS, 2, LVar0, 54, LVar2, EVT_FLOAT(0.6), LVarF, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_USE) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, 54, LVar2, EVT_FLOAT(0.6), LVarE, 0) - EVT_WAIT(30) - EVT_CALL(RemoveEffect, LVarF) - EVT_CALL(RemoveEffect, LVarE) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_LIGHTNING) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_THREAD - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, 0, LVar1) - EVT_CALL(N(UnkLightningBoltFxFunc1), LVar0, LVar1) - EVT_END_THREAD - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_WAIT(10) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_WAIT(20) - EVT_CALL(N(FadeBackgroundLighten)) - EVT_ELSE - EVT_WAIT(20) - EVT_CALL(N(FadeBackgroundLighten)) - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_SET(LVar1, ANIM_BattleBowser_Walk) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_IF_FLAG(LVar0, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) - EVT_SET(LVar0, DMG_BOOSTED_LIGHTNING_BLAST) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_ELSE - EVT_SET(LVar0, DMG_LIGHTNING_BLAST) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_IF - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_WAIT(30) - EVT_CALL(N(FadeBackgroundLighten)) - EVT_IF_EQ(LVarF, HIT_RESULT_10) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_SET(LVar1, ANIM_BattleBowser_Walk) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_13) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_CHARGE_LIGHTNING) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) + Call(N(FadeBackgroundDarken)) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 54) + Sub(LVar2, 3) + PlayEffect(EFFECT_ENERGY_IN_OUT, 2, LVar0, LVar1, LVar2, Float(1.5), 50, 0) + Wait(50) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 22) + Sub(LVar2, 3) + PlayEffect(EFFECT_LIGHT_RAYS, 2, LVar0, 135, LVar2, Float(1.5), LVarF, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_USE) + Sub(LVar2, 3) + PlayEffect(EFFECT_BULB_GLOW, 2, LVar0, 135, LVar2, Float(1.5), LVarE, 0) + Wait(30) + Call(RemoveEffect, LVarF) + Call(RemoveEffect, LVarE) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 21) + Sub(LVar2, 3) + PlayEffect(EFFECT_ENERGY_IN_OUT, 2, LVar0, LVar1, LVar2, Float(0.6), 50, 0) + Wait(50) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 9) + Sub(LVar2, 3) + PlayEffect(EFFECT_LIGHT_RAYS, 2, LVar0, 54, LVar2, Float(0.6), LVarF, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_USE) + Sub(LVar2, 3) + PlayEffect(EFFECT_BULB_GLOW, 2, LVar0, 54, LVar2, Float(0.6), LVarE, 0) + Wait(30) + Call(RemoveEffect, LVarF) + Call(RemoveEffect, LVarE) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_LIGHTNING) + Call(SetGoalToTarget, ACTOR_SELF) + Thread + Call(GetGoalPos, ACTOR_SELF, LVar0, 0, LVar1) + Call(N(UnkLightningBoltFxFunc1), LVar0, LVar1) + EndThread + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Wait(10) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + Wait(20) + Call(N(FadeBackgroundLighten)) + Else + Wait(20) + Call(N(FadeBackgroundLighten)) + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Set(LVar1, ANIM_BattleBowser_Walk) + ExecWait(N(EVS_ReturnHome)) + Return + EndCaseGroup + CaseDefault + EndSwitch + Wait(5) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar0) + IfFlag(LVar0, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) + Set(LVar0, DMG_BOOSTED_LIGHTNING_BLAST) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) + Else + Set(LVar0, DMG_LIGHTNING_BLAST) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) + EndIf + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Wait(30) + Call(N(FadeBackgroundLighten)) + IfEq(LVarF, HIT_RESULT_10) + Return + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Set(LVar1, ANIM_BattleBowser_Walk) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/battle/area/kpa2/actor/final_bowser_2.c b/src/battle/area/kpa2/actor/final_bowser_2.c index 382265f6aac..8f3f33877a2 100644 --- a/src/battle/area/kpa2/actor/final_bowser_2.c +++ b/src/battle/area/kpa2/actor/final_bowser_2.c @@ -233,839 +233,839 @@ API_CALLABLE(N(MakeLightningBolts)) { #include "common/GetItemEntityPosition.inc.c" EvtScript N(EVS_Init) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceClawSwipe, 3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceBodySlam, 3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_Idle) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CommandLossItemIdx, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceStarBeam, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_RecoversLeft, 3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused, 0) - EVT_CALL(SetEnemyHP, ACTOR_SELF, GB_FinalBowserHP) - EVT_IF_LT(GB_FinalBowserHP, 1) - EVT_CALL(SetEnemyHP, ACTOR_SELF, 1) - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.5), EVT_FLOAT(1.5), EVT_FLOAT(1.0)) - EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 1, 150, 0, 0, 0) - EVT_EXEC(N(EVS_AnimateImgFX)) - EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 150, 150, 0, 0) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_BOWSER_AURA) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED, TRUE) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 1, ACTOR_DECORATION_RADIAL_STAR_EMITTER) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(BoostedDefense))) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(BoostedStatusTable))) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetBattleFlagBits2, BS_FLAGS2_DONT_STOP_MUSIC, TRUE) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_TurnCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceClawSwipe, 3) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceBodySlam, 3) + Call(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_Idle) + Call(SetActorVar, ACTOR_SELF, AVAR_CommandLossItemIdx, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceStarBeam, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_RecoversLeft, 3) + Call(SetActorVar, ACTOR_SELF, AVAR_Unused, 0) + Call(SetEnemyHP, ACTOR_SELF, GB_FinalBowserHP) + IfLt(GB_FinalBowserHP, 1) + Call(SetEnemyHP, ACTOR_SELF, 1) + EndIf + Call(SetActorScale, ACTOR_SELF, Float(1.5), Float(1.5), Float(1.0)) + Call(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 1, 150, 0, 0, 0) + Exec(N(EVS_AnimateImgFX)) + Call(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 150, 150, 0, 0) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_BOWSER_AURA) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED, TRUE) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 1, ACTOR_DECORATION_RADIAL_STAR_EMITTER) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(BoostedDefense))) + Call(SetStatusTable, ACTOR_SELF, Ref(N(BoostedStatusTable))) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetBattleFlagBits2, BS_FLAGS2_DONT_STOP_MUSIC, TRUE) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar3) - EVT_LABEL(0) - EVT_CALL(ActorExists, ACTOR_SELF, LVarB) - EVT_IF_EQ(LVarB, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarB) - EVT_IF_NOT_FLAG(LVarB, STATUS_FLAG_SHRINK) - EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 150, 150, 255, 0) - EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 1, 150, 0, 0, 0) - EVT_ELSE - EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 60, 60, 255, 0) - EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 1, 60, 0, 0, 0) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_PlayFootstepSounds)) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar3) + Label(0) + Call(ActorExists, ACTOR_SELF, LVarB) + IfEq(LVarB, 0) + Return + EndIf + Call(GetStatusFlags, ACTOR_SELF, LVarB) + IfNotFlag(LVarB, STATUS_FLAG_SHRINK) + Call(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 150, 150, 255, 0) + Call(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 1, 150, 0, 0, 0) + Else + Call(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 60, 60, 255, 0) + Call(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 1, 60, 0, 0, 0) + EndIf + ExecWait(N(EVS_PlayFootstepSounds)) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableBattleStatusBar, FALSE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 15) - EVT_ADD(LVar1, 90) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 420) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 30) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 6) - EVT_ADD(LVar1, 36) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 420) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 30) - EVT_END_IF - EVT_CALL(ActorSpeak, MSG_CH8_00A6, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Talk, ANIM_BattleBowser_Idle) - EVT_CALL(EnableBattleStatusBar, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_END_IF - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar1) - EVT_MUL(LVar0, 100) - EVT_DIV(LVar0, LVar1) - EVT_IF_LT(LVar0, 50) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) - EVT_IF_NOT_FLAG(LVar0, AVAL_Flag_NotOverYet) - EVT_BITWISE_OR_CONST(LVar0, AVAL_Flag_NotOverYet) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableBattleStatusBar, FALSE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 15) - EVT_ADD(LVar1, 90) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 420) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 30) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 6) - EVT_ADD(LVar1, 36) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 420) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 30) - EVT_END_IF - EVT_CALL(ActorSpeak, MSG_CH8_00A8, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Talk, ANIM_BattleBowser_Idle) - EVT_CALL(EnableBattleStatusBar, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) + Call(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) + IfEq(LVar0, 0) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableBattleStatusBar, FALSE) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 15) + Add(LVar1, 90) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 420) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 30) + Else + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 6) + Add(LVar1, 36) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 420) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 30) + EndIf + Call(ActorSpeak, MSG_CH8_00A6, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Talk, ANIM_BattleBowser_Idle) + Call(EnableBattleStatusBar, TRUE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + EndIf + CaseEq(PHASE_ENEMY_BEGIN) + Call(GetActorHP, ACTOR_SELF, LVar0) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar1) + Mul(LVar0, 100) + Div(LVar0, LVar1) + IfLt(LVar0, 50) + Call(GetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) + IfNotFlag(LVar0, AVAL_Flag_NotOverYet) + BitwiseOrConst(LVar0, AVAL_Flag_NotOverYet) + Call(SetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableBattleStatusBar, FALSE) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 15) + Add(LVar1, 90) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 420) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 30) + Else + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 6) + Add(LVar1, 36) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 420) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 30) + EndIf + Call(ActorSpeak, MSG_CH8_00A8, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Talk, ANIM_BattleBowser_Idle) + Call(EnableBattleStatusBar, TRUE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + EndIf + EndIf + EndSwitch + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastElement, LVarE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET(LVar0, 1) - EVT_SET(LVar1, ANIM_BattleBowser_BurnHurt) - EVT_SET(LVar2, ANIM_BattleBowser_BurnStill) - EVT_EXEC_WAIT(N(EVS_BurnHit)) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET(LVar0, 1) - EVT_SET(LVar1, ANIM_BattleBowser_BurnHurt) - EVT_SET(LVar2, ANIM_BattleBowser_BurnStill) - EVT_EXEC_WAIT(N(EVS_BurnHit)) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_BurnStill) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_ShockReaction)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_SET(LVar1, ANIM_BattleBowser_Walk) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_ShockReaction)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CALL(GetDamageSource, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_OR_EQ(DMG_SRC_SPOOK) - EVT_CASE_OR_EQ(DMG_SRC_FRIGHT_JAR) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Mock) - EVT_WAIT(30) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SET(LVar1, ANIM_BattleBowser_Mock) - EVT_EXEC_WAIT(N(EVS_NoDamageHit)) - EVT_END_SWITCH - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET(LVar1, ANIM_BattleBowser_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(EVENT_SPIKE_TAUNT) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Jump) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(3.0)) - EVT_CASE_EQ(EVENT_RECEIVE_BUFF) - EVT_CALL(N(FadeBackgroundLighten)) - EVT_CASE_EQ(EVENT_30) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(1000) - EVT_CASE_EQ(EVENT_INVUNERABLE_TAUNT) - EVT_SET(LVar1, ANIM_BattleBowser_Idle) - EVT_EXEC_WAIT(N(EVS_NoDamageHit)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_DISABLE_CELEBRATION | BS_FLAGS1_BATTLE_FLED, TRUE) - EVT_CALL(SetEndBattleFadeOutRate, 10) - EVT_RETURN - EVT_CASE_EQ(EVENT_PEACH_BEAM) - EVT_CALL(FreezeBattleCam, TRUE) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_SET(LVar3, 75) - EVT_SET(LVar4, 60) - EVT_ELSE - EVT_SET(LVar3, 30) - EVT_SET(LVar4, 24) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, LVar3) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 75, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, LVar4) - EVT_PLAY_EFFECT(EFFECT_SHIMMER_BURST, 1, LVar0, LVar1, LVar2, EVT_FLOAT(1.05), 50, 0) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceStarBeam, 0) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(NormalDefense))) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(StatusTable))) - EVT_SET(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_Hit_Inner)) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) - EVT_IF_NOT_FLAG(LVar0, AVAL_Flag_PeachBeamRemark) - EVT_BITWISE_OR_CONST(LVar0, AVAL_Flag_PeachBeamRemark) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_SET(LVar3, 90) - EVT_ELSE - EVT_SET(LVar3, 36) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 15) - EVT_ADD(LVar1, LVar3) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 420) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(ActorSpeak, MSG_CH8_00A7, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Hurt, ANIM_BattleBowser_Hurt) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 45) - EVT_END_IF - EVT_CALL(FreezeBattleCam, FALSE) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastElement, LVarE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + Set(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_Hit)) + Return + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(EVS_Enemy_Hit) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_BURN_HIT) + Set(LVar0, 1) + Set(LVar1, ANIM_BattleBowser_BurnHurt) + Set(LVar2, ANIM_BattleBowser_BurnStill) + ExecWait(N(EVS_BurnHit)) + CaseEq(EVENT_BURN_DEATH) + Set(LVar0, 1) + Set(LVar1, ANIM_BattleBowser_BurnHurt) + Set(LVar2, ANIM_BattleBowser_BurnStill) + ExecWait(N(EVS_BurnHit)) + SetConst(LVar1, ANIM_BattleBowser_BurnStill) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + Set(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_Hit)) + Return + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(EVS_Enemy_Hit) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_ShockReaction)) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Set(LVar1, ANIM_BattleBowser_Walk) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_ShockReaction)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_Death)) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + Call(GetDamageSource, LVar2) + Switch(LVar2) + CaseOrEq(DMG_SRC_SPOOK) + CaseOrEq(DMG_SRC_FRIGHT_JAR) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Mock) + Wait(30) + EndCaseGroup + CaseDefault + Set(LVar1, ANIM_BattleBowser_Mock) + ExecWait(N(EVS_NoDamageHit)) + EndSwitch + EndCaseGroup + CaseEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + Set(LVar1, ANIM_BattleBowser_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(EVENT_SPIKE_TAUNT) + CaseEq(EVENT_END_FIRST_STRIKE) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Jump) + ExecWait(EVS_Enemy_Recover) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(3.0)) + CaseEq(EVENT_RECEIVE_BUFF) + Call(N(FadeBackgroundLighten)) + CaseEq(EVENT_30) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(1000) + CaseEq(EVENT_INVUNERABLE_TAUNT) + Set(LVar1, ANIM_BattleBowser_Idle) + ExecWait(N(EVS_NoDamageHit)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Call(SetBattleFlagBits, BS_FLAGS1_DISABLE_CELEBRATION | BS_FLAGS1_BATTLE_FLED, TRUE) + Call(SetEndBattleFadeOutRate, 10) + Return + CaseEq(EVENT_PEACH_BEAM) + Call(FreezeBattleCam, TRUE) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 1) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Set(LVar3, 75) + Set(LVar4, 60) + Else + Set(LVar3, 30) + Set(LVar4, 24) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, LVar3) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 75, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, LVar4) + PlayEffect(EFFECT_SHIMMER_BURST, 1, LVar0, LVar1, LVar2, Float(1.05), 50, 0) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceStarBeam, 0) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(NormalDefense))) + Call(SetStatusTable, ACTOR_SELF, Ref(N(StatusTable))) + Set(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_Hit_Inner)) + Call(GetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) + IfNotFlag(LVar0, AVAL_Flag_PeachBeamRemark) + BitwiseOrConst(LVar0, AVAL_Flag_PeachBeamRemark) + Call(SetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Set(LVar3, 90) + Else + Set(LVar3, 36) + EndIf + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 15) + Add(LVar1, LVar3) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 420) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 30) + Call(ActorSpeak, MSG_CH8_00A7, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Hurt, ANIM_BattleBowser_Hurt) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 45) + EndIf + Call(FreezeBattleCam, FALSE) + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Hit) = { - EVT_EXEC_WAIT(N(EVS_Hit_Inner)) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + ExecWait(N(EVS_Hit_Inner)) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Hit_Inner) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_Hit) + Return + End }; EvtScript N(EVS_Death) = { - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED, FALSE) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 1) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_WAIT(14) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_HurtStill) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 15) - EVT_ADD(LVar1, 67) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 420) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 15) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 6) - EVT_ADD(LVar1, 27) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 420) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 15) - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_POWER_DOWN) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Hurt) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 80, 8, EASING_QUADRATIC_OUT) - EVT_SET(LVar2, 0) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_LABEL(1) - EVT_IF_GE(LVar2, LVar0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_CALL(GetActorScale, ACTOR_SELF, LVar6, LVar6, LVar7) - EVT_CALL(N(MakeLightningBolts), LVar3, LVar4, LVar5, LVar6) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_ELSE - EVT_WAIT(1) - EVT_ADD(LVar2, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(20) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_NOT_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 60) - EVT_ELSE - EVT_ADD(LVar1, 24) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_SHIMMER_BURST, 1, LVar0, LVar1, LVar2, EVT_FLOAT(1.05), 50, 0) - EVT_SET(LVar1, 50) - EVT_IF_GT(LVar1, 0) - EVT_SETF(LVar0, EVT_FLOAT(1.5)) - EVT_LOOP(LVar1) - EVT_SUBF(LVar0, EVT_FLOAT(0.01)) - EVT_CALL(SetActorScale, ACTOR_SELF, LVar0, LVar0, EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(MakeLerp, 0, 0x00001950, 100, EASING_COS_IN_OUT) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_MOD(LVar0, 360) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_HurtStill) - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_COLLAPSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_DefeatedIdle) - EVT_THREAD - EVT_CALL(N(StartRumbleWithParams), 180, 16) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(3.0)) - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, LVar0, LVar1, LVar2, 0, 0) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.1), EVT_FLOAT(0.93), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.2), EVT_FLOAT(0.85), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.25), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.3), EVT_FLOAT(0.75), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.2), EVT_FLOAT(0.87), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.1), EVT_FLOAT(0.9201), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(30) - EVT_CALL(SetActorSize, ACTOR_SELF, 52, 115) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 15) - EVT_ADD(LVar1, 45) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 40) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 6) - EVT_ADD(LVar1, 18) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 40) - EVT_END_IF - EVT_CALL(ActorSpeak, MSG_CH8_00A9, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_DefeatedTalk, ANIM_BattleBowser_DefeatedIdle) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_DISABLE_CELEBRATION | BS_FLAGS1_BATTLE_FLED, TRUE) - EVT_CALL(SetEndBattleFadeOutRate, 20) - EVT_RETURN - EVT_END + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED, FALSE) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 1) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Wait(14) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_HurtStill) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 15) + Add(LVar1, 67) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 420) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 15) + Else + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 6) + Add(LVar1, 27) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 420) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 15) + EndIf + Wait(30) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_POWER_DOWN) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Hurt) + Thread + Call(MakeLerp, 0, 80, 8, EASING_QUADRATIC_OUT) + Set(LVar2, 0) + Label(0) + Call(UpdateLerp) + Label(1) + IfGe(LVar2, LVar0) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Call(GetActorScale, ACTOR_SELF, LVar6, LVar6, LVar7) + Call(N(MakeLightningBolts), LVar3, LVar4, LVar5, LVar6) + IfEq(LVar1, 1) + Goto(0) + EndIf + Else + Wait(1) + Add(LVar2, 1) + Goto(1) + EndIf + EndThread + Wait(20) + Thread + Wait(30) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfNotFlag(LVarA, STATUS_FLAG_SHRINK) + Add(LVar1, 60) + Else + Add(LVar1, 24) + EndIf + PlayEffect(EFFECT_SHIMMER_BURST, 1, LVar0, LVar1, LVar2, Float(1.05), 50, 0) + Set(LVar1, 50) + IfGt(LVar1, 0) + SetF(LVar0, Float(1.5)) + Loop(LVar1) + SubF(LVar0, Float(0.01)) + Call(SetActorScale, ACTOR_SELF, LVar0, LVar0, Float(1.0)) + Wait(1) + EndLoop + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + EndIf + EndThread + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(MakeLerp, 0, 0x00001950, 100, EASING_COS_IN_OUT) + Label(2) + Call(UpdateLerp) + Mod(LVar0, 360) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(2) + EndIf + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_HurtStill) + Wait(15) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_COLLAPSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_DefeatedIdle) + Thread + Call(N(StartRumbleWithParams), 180, 16) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(3.0)) + EndThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_LANDING_DUST, 4, LVar0, LVar1, LVar2, 0, 0) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.1), Float(0.93), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.2), Float(0.85), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.25), Float(0.8), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.3), Float(0.75), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.2), Float(0.87), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.1), Float(0.9201), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.0), Float(1.0), Float(1.0)) + Wait(30) + Call(SetActorSize, ACTOR_SELF, 52, 115) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 15) + Add(LVar1, 45) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 300) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 40) + Else + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 6) + Add(LVar1, 18) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 300) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 40) + EndIf + Call(ActorSpeak, MSG_CH8_00A9, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_DefeatedTalk, ANIM_BattleBowser_DefeatedIdle) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Call(SetBattleFlagBits, BS_FLAGS1_DISABLE_CELEBRATION | BS_FLAGS1_BATTLE_FLED, TRUE) + Call(SetEndBattleFadeOutRate, 20) + Return + End }; EvtScript N(EVS_NoDamageHit) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_NoDamageHit) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_EXEC_WAIT(N(EVS_TakeTurn_Inner)) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + ExecWait(N(EVS_TakeTurn_Inner)) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Move_UseStarRod) = { - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) - EVT_EXEC_WAIT(N(EVS_StarRodCast)) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) + ExecWait(N(EVS_StarRodCast)) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_SET(LVar0, 1) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVarD, LVarE, LVarF) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(GetDist2D, LVar9, LVarA, LVarC, LVarD, LVarF) - EVT_IF_GE(LVar9, EVT_FLOAT(5.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_END_IF - EVT_IF_EQ(LVarB, 180) - EVT_LOOP(15) - EVT_SUB(LVarB, 12) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVarB) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_IF - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_RETURN - EVT_END + Set(LVar0, 1) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVarD, LVarE, LVarF) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(GetDist2D, LVar9, LVarA, LVarC, LVarD, LVarF) + IfGe(LVar9, Float(5.0)) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + EndIf + IfEq(LVarB, 180) + Loop(15) + Sub(LVarB, 12) + Call(SetActorYaw, ACTOR_SELF, LVarB) + Wait(1) + EndLoop + EndIf + Call(SetActorYaw, ACTOR_SELF, 0) + Return + End }; EvtScript N(EVS_AnimateImgFX) = { - EVT_CALL(N(UpdateEnchantedBowserColors)) - EVT_RETURN - EVT_END + Call(N(UpdateEnchantedBowserColors)) + Return + End }; EvtScript N(EVS_StarRodCast) = { - EVT_CALL(N(FadeBackgroundDarken)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, 22) - EVT_ADD(LVar1, 135) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_GATHER) - EVT_ADD(LVar2, 10) - EVT_CALL(N(StarRodAppearEffect), LVar0, LVar1, LVar2, EVT_FLOAT(2.5), EVT_FLOAT(0.075)) - EVT_END_THREAD - EVT_ELSE - EVT_ADD(LVar0, 9) - EVT_ADD(LVar1, 54) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_GATHER) - EVT_ADD(LVar2, 10) - EVT_CALL(N(StarRodAppearEffect), LVar0, LVar1, LVar2, EVT_FLOAT(2.5), EVT_FLOAT(0.03)) - EVT_END_THREAD - EVT_END_IF - EVT_WAIT(65) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, 22) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_LIGHT_RAYS, 2, LVar0, 135, LVar2, EVT_FLOAT(1.5), LVarF, 0) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, 135, LVar2, EVT_FLOAT(1.0), LVarE, 0) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, 135, LVar2, EVT_FLOAT(1.5), LVarD, 0) - EVT_ELSE - EVT_ADD(LVar0, 9) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_LIGHT_RAYS, 2, LVar0, 54, LVar2, EVT_FLOAT(0.6), LVarF, 0) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, 54, LVar2, EVT_FLOAT(0.4), LVarE, 0) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, 54, LVar2, EVT_FLOAT(0.6), LVarD, 0) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_USE) - EVT_WAIT(30) - EVT_CALL(RemoveEffect, LVarF) - EVT_CALL(RemoveEffect, LVarE) - EVT_CALL(RemoveEffect, LVarD) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED, TRUE) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 1, ACTOR_DECORATION_RADIAL_STAR_EMITTER) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(BoostedDefense))) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(BoostedStatusTable))) - EVT_CALL(N(RemoveChillOut)) - EVT_WAIT(3) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 60) - EVT_ADD(LVar2, 12) - EVT_PLAY_EFFECT(EFFECT_STARS_SHIMMER, 3, LVar0, LVar1, LVar2, 105, 120, 37, 60, 0) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 24) - EVT_ADD(LVar2, 12) - EVT_PLAY_EFFECT(EFFECT_STARS_SHIMMER, 3, LVar0, LVar1, LVar2, 42, 48, 15, 60, 0) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_ENCHANT) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(N(StarRodPowerUpEffect), LVar0, LVar1, LVar2, EVT_FLOAT(1.2)) - EVT_END_THREAD - EVT_WAIT(75) - EVT_THREAD - EVT_CALL(N(FadeBackgroundLighten)) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_RearUpLaugh) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 60) - EVT_ELSE - EVT_ADD(LVar1, 24) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, EVT_FLOAT(1.5), 15, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_SHOCKWAVE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 39) - EVT_WAIT(30) - EVT_RETURN - EVT_END + Call(N(FadeBackgroundDarken)) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar0, 22) + Add(LVar1, 135) + Thread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_GATHER) + Add(LVar2, 10) + Call(N(StarRodAppearEffect), LVar0, LVar1, LVar2, Float(2.5), Float(0.075)) + EndThread + Else + Add(LVar0, 9) + Add(LVar1, 54) + Thread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_GATHER) + Add(LVar2, 10) + Call(N(StarRodAppearEffect), LVar0, LVar1, LVar2, Float(2.5), Float(0.03)) + EndThread + EndIf + Wait(65) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar0, 22) + Sub(LVar2, 3) + PlayEffect(EFFECT_LIGHT_RAYS, 2, LVar0, 135, LVar2, Float(1.5), LVarF, 0) + PlayEffect(EFFECT_BULB_GLOW, 2, LVar0, 135, LVar2, Float(1.0), LVarE, 0) + Sub(LVar2, 3) + PlayEffect(EFFECT_BULB_GLOW, 2, LVar0, 135, LVar2, Float(1.5), LVarD, 0) + Else + Add(LVar0, 9) + Sub(LVar2, 3) + PlayEffect(EFFECT_LIGHT_RAYS, 2, LVar0, 54, LVar2, Float(0.6), LVarF, 0) + PlayEffect(EFFECT_BULB_GLOW, 2, LVar0, 54, LVar2, Float(0.4), LVarE, 0) + Sub(LVar2, 3) + PlayEffect(EFFECT_BULB_GLOW, 2, LVar0, 54, LVar2, Float(0.6), LVarD, 0) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_USE) + Wait(30) + Call(RemoveEffect, LVarF) + Call(RemoveEffect, LVarE) + Call(RemoveEffect, LVarD) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED, TRUE) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 1, ACTOR_DECORATION_RADIAL_STAR_EMITTER) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(BoostedDefense))) + Call(SetStatusTable, ACTOR_SELF, Ref(N(BoostedStatusTable))) + Call(N(RemoveChillOut)) + Wait(3) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 60) + Add(LVar2, 12) + PlayEffect(EFFECT_STARS_SHIMMER, 3, LVar0, LVar1, LVar2, 105, 120, 37, 60, 0) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 24) + Add(LVar2, 12) + PlayEffect(EFFECT_STARS_SHIMMER, 3, LVar0, LVar1, LVar2, 42, 48, 15, 60, 0) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_ENCHANT) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(N(StarRodPowerUpEffect), LVar0, LVar1, LVar2, Float(1.2)) + EndThread + Wait(75) + Thread + Call(N(FadeBackgroundLighten)) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_RearUpLaugh) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar1, 60) + Else + Add(LVar1, 24) + EndIf + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, Float(1.5), 15, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_SHOCKWAVE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 39) + Wait(30) + Return + End }; EvtScript N(EVS_ShockReaction) = { - EVT_IF_NE(LVar1, -1) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar2, LVar3, LVar4) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar5, LVar6, LVar7) - EVT_SET(LVar8, LVar2) - EVT_ADD(LVar8, LVar5) - EVT_DIV(LVar8, 2) - EVT_SET(LVar9, LVar4) - EVT_ADD(LVar9, LVar7) - EVT_DIV(LVar9, 2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar8, 0, LVar9) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_ADD(LVar8, LVar2) - EVT_DIV(LVar8, 2) - EVT_ADD(LVar9, LVar4) - EVT_DIV(LVar9, 2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar8, 0, LVar9) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar2, LVar3, LVar4) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_RETURN - EVT_END + IfNe(LVar1, -1) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.4)) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar2, LVar3, LVar4) + Call(GetActorPos, ACTOR_SELF, LVar5, LVar6, LVar7) + Set(LVar8, LVar2) + Add(LVar8, LVar5) + Div(LVar8, 2) + Set(LVar9, LVar4) + Add(LVar9, LVar7) + Div(LVar9, 2) + Call(SetGoalPos, ACTOR_SELF, LVar8, 0, LVar9) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Add(LVar8, LVar2) + Div(LVar8, 2) + Add(LVar9, LVar4) + Div(LVar9, 2) + Call(SetGoalPos, ACTOR_SELF, LVar8, 0, LVar9) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar2, LVar3, LVar4) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Return + End }; EvtScript N(EVS_PlayFootstepSounds) = { - EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar7) - EVT_IF_NE(LVar7, ANIM_BattleBowser_Walk) - EVT_IF_EQ(LVar3, ANIM_BattleBowser_Walk) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_B) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) - EVT_END_IF - EVT_SET(LVar3, LVar7) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar5, LVar6, LVar7) - EVT_SUB(LVar5, LVar0) - EVT_IF_GT(LVar5, -30) - EVT_IF_LT(LVar5, 30) - EVT_SET(LVar3, LVar7) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_B) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) - EVT_SET(LVar3, LVar7) - EVT_RETURN - EVT_END + Call(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar7) + IfNe(LVar7, ANIM_BattleBowser_Walk) + IfEq(LVar3, ANIM_BattleBowser_Walk) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_B) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) + EndIf + Set(LVar3, LVar7) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Return + EndIf + Call(GetActorPos, ACTOR_SELF, LVar5, LVar6, LVar7) + Sub(LVar5, LVar0) + IfGt(LVar5, -30) + IfLt(LVar5, 30) + Set(LVar3, LVar7) + Return + EndIf + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_B) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) + Set(LVar3, LVar7) + Return + End }; EvtScript N(EVS_Recover) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_RecoversLeft, LVar0) - EVT_SUB(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_RecoversLeft, LVar0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 15) - EVT_ADD(LVar1, 97) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 420) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 40) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 6) - EVT_ADD(LVar1, 39) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 294) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 40) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) - EVT_CALL(N(FadeBackgroundDarken)) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_CAST_RECOVER) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 22) - EVT_ADD(LVar1, 135) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 2, LVar0, LVar1, LVar2, EVT_FLOAT(1.5), 50, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 22) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, 135, LVar2, EVT_FLOAT(0.45), 30, 0) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 9) - EVT_ADD(LVar1, 54) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 2, LVar0, LVar1, LVar2, EVT_FLOAT(0.6), 50, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 9) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, 54, LVar2, EVT_FLOAT(0.18), 30, 0) - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar0) - EVT_MUL(LVar0, 31) - EVT_DIV(LVar0, 100) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) - EVT_WAIT(30) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_STAR_BOUNCE_A) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(HealActor, ACTOR_SELF, LVar0, FALSE) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_RecoversLeft, LVar0) + Sub(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_RecoversLeft, LVar0) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 15) + Add(LVar1, 97) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 420) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 40) + Else + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 6) + Add(LVar1, 39) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 294) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 40) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) + Call(N(FadeBackgroundDarken)) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_CAST_RECOVER) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 22) + Add(LVar1, 135) + Sub(LVar2, 3) + PlayEffect(EFFECT_ENERGY_IN_OUT, 2, LVar0, LVar1, LVar2, Float(1.5), 50, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 22) + Sub(LVar2, 3) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, 135, LVar2, Float(0.45), 30, 0) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 9) + Add(LVar1, 54) + Sub(LVar2, 3) + PlayEffect(EFFECT_ENERGY_IN_OUT, 2, LVar0, LVar1, LVar2, Float(0.6), 50, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 9) + Sub(LVar2, 3) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, 54, LVar2, Float(0.18), 30, 0) + EndIf + Wait(30) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar0) + Mul(LVar0, 31) + Div(LVar0, 100) + Thread + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) + Wait(30) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_STAR_BOUNCE_A) + EndThread + Thread + Call(FreezeBattleState, TRUE) + Call(HealActor, ACTOR_SELF, LVar0, FALSE) + Call(FreezeBattleState, FALSE) + EndThread + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn_Inner) = { - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_TurnCount, 1) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceClawSwipe, 1) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceBodySlam, 1) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, 1) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceStarBeam, 1) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, 1) - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar1) - EVT_MUL(LVar0, 100) - EVT_DIV(LVar0, LVar1) - EVT_CALL(N(GetPlayerHpPercent), LVar2) - EVT_SUB(LVar2, LVar0) - EVT_IF_GT(LVar2, 25) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_RecoversLeft, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 75) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, LVar0) - EVT_IF_GT(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, 0) - EVT_EXEC_WAIT(N(EVS_Recover)) - EVT_RETURN - EVT_ELSE - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, 0) - EVT_EXEC_WAIT(N(EVS_Recover)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) - EVT_IF_GT(LVar0, 1) - EVT_CALL(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceStarBeam, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(1) - EVT_SET(LVar0, 0) - EVT_CASE_EQ(2) - EVT_SET(LVar0, 0) - EVT_CASE_EQ(3) - EVT_SET(LVar0, 15) - EVT_CASE_DEFAULT - EVT_SET(LVar0, 75) - EVT_END_SWITCH - EVT_CALL(RandInt, 100, LVar1) - EVT_IF_LT(LVar1, LVar0) - EVT_EXEC_WAIT(N(EVS_Move_UseStarRod)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, LVar0) - EVT_IF_LT(LVar0, 3) - EVT_EXEC_WAIT(N(EVS_UseAttack)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_UseAttackOrShockwave)) - EVT_RETURN - EVT_END + Call(AddActorVar, ACTOR_SELF, AVAR_TurnCount, 1) + Call(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceClawSwipe, 1) + Call(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceBodySlam, 1) + Call(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, 1) + Call(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceStarBeam, 1) + Call(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, 1) + Call(GetActorHP, ACTOR_SELF, LVar0) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar1) + Mul(LVar0, 100) + Div(LVar0, LVar1) + Call(N(GetPlayerHpPercent), LVar2) + Sub(LVar2, LVar0) + IfGt(LVar2, 25) + Call(GetActorVar, ACTOR_SELF, AVAR_RecoversLeft, LVar0) + IfNe(LVar0, 0) + Call(RandInt, 100, LVar0) + IfLt(LVar0, 75) + Call(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, LVar0) + IfGt(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, 0) + ExecWait(N(EVS_Recover)) + Return + Else + Call(RandInt, 100, LVar0) + IfLt(LVar0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, 0) + ExecWait(N(EVS_Recover)) + Return + EndIf + EndIf + EndIf + EndIf + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) + IfGt(LVar0, 1) + Call(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar0) + IfNotFlag(LVar0, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) + Call(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceStarBeam, LVar0) + Switch(LVar0) + CaseEq(1) + Set(LVar0, 0) + CaseEq(2) + Set(LVar0, 0) + CaseEq(3) + Set(LVar0, 15) + CaseDefault + Set(LVar0, 75) + EndSwitch + Call(RandInt, 100, LVar1) + IfLt(LVar1, LVar0) + ExecWait(N(EVS_Move_UseStarRod)) + Return + EndIf + EndIf + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, LVar0) + IfLt(LVar0, 3) + ExecWait(N(EVS_UseAttack)) + Return + EndIf + ExecWait(N(EVS_UseAttackOrShockwave)) + Return + End }; EvtScript N(EVS_UseAttackOrShockwave) = { // only use regular attacks for the first few turns - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) - EVT_IF_LE(LVar0, 3) - EVT_EXEC_WAIT(N(EVS_UseAttack)) - EVT_RETURN - EVT_END_IF + Call(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) + IfLe(LVar0, 3) + ExecWait(N(EVS_UseAttack)) + Return + EndIf // use shockwave if it hasn't been used recently - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, LVar0) - EVT_IF_GE(LVar0, 6) - EVT_CALL(RandInt, 30, LVar0) - EVT_IF_LT(LVar0, 20) - EVT_EXEC_WAIT(N(EVS_UseDrainingShockwave)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_LightningBlast)) - EVT_END_IF - EVT_RETURN - EVT_END_IF + Call(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, LVar0) + IfGe(LVar0, 6) + Call(RandInt, 30, LVar0) + IfLt(LVar0, 20) + ExecWait(N(EVS_UseDrainingShockwave)) + Else + ExecWait(N(EVS_Attack_LightningBlast)) + EndIf + Return + EndIf // if either hammer or jump are boosted, try using shockwave - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 75) - EVT_CALL(N(GetJumpHammerCharge), LVar0, LVar1) - EVT_IF_GT(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_UseDrainingShockwave)) - EVT_RETURN - EVT_END_IF - EVT_IF_GT(LVar1, 0) - EVT_EXEC_WAIT(N(EVS_UseDrainingShockwave)) - EVT_RETURN - EVT_END_IF - EVT_END_IF + Call(RandInt, 100, LVar0) + IfLt(LVar0, 75) + Call(N(GetJumpHammerCharge), LVar0, LVar1) + IfGt(LVar0, 0) + ExecWait(N(EVS_UseDrainingShockwave)) + Return + EndIf + IfGt(LVar1, 0) + ExecWait(N(EVS_UseDrainingShockwave)) + Return + EndIf + EndIf // ~27% chance to use regardless - EVT_CALL(RandInt, 110, LVar0) - EVT_IF_LT(LVar0, 30) - EVT_IF_LT(LVar0, 20) - EVT_EXEC_WAIT(N(EVS_UseDrainingShockwave)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_LightningBlast)) - EVT_END_IF - EVT_RETURN - EVT_END_IF + Call(RandInt, 110, LVar0) + IfLt(LVar0, 30) + IfLt(LVar0, 20) + ExecWait(N(EVS_UseDrainingShockwave)) + Else + ExecWait(N(EVS_Attack_LightningBlast)) + EndIf + Return + EndIf // fallback to using a regular attack - EVT_EXEC_WAIT(N(EVS_UseAttack)) - EVT_RETURN - EVT_RETURN - EVT_END + ExecWait(N(EVS_UseAttack)) + Return + Return + End }; EvtScript N(EVS_UseAttack) = { - EVT_CALL(RandInt, 80, LVar0) - EVT_IF_LT(LVar0, 20) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceBodySlam, LVar0) - EVT_IF_GE(LVar0, 2) - EVT_EXEC_WAIT(N(EVS_Attack_BodySlam)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(RandInt, 60, LVar0) - EVT_IF_LT(LVar0, 20) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceClawSwipe, LVar0) - EVT_IF_GE(LVar0, 2) - EVT_EXEC_WAIT(N(EVS_Attack_ClawSwipe)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_Attack_FireBreath)) - EVT_RETURN - EVT_END + Call(RandInt, 80, LVar0) + IfLt(LVar0, 20) + Call(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceBodySlam, LVar0) + IfGe(LVar0, 2) + ExecWait(N(EVS_Attack_BodySlam)) + Return + EndIf + EndIf + Call(RandInt, 60, LVar0) + IfLt(LVar0, 20) + Call(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceClawSwipe, LVar0) + IfGe(LVar0, 2) + ExecWait(N(EVS_Attack_ClawSwipe)) + Return + EndIf + EndIf + ExecWait(N(EVS_Attack_FireBreath)) + Return + End }; #include "common/DisableRandomAbility.inc.c" @@ -1074,799 +1074,799 @@ EvtScript N(EVS_UseAttack) = { #include "common/UnkLightningBoltFxFunc1.inc.c" EvtScript N(EVS_ManageCommandLoss) = { - EVT_LABEL(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CommandLossState, LVarA) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(AVAL_LossState_Idle) + Label(0) + Call(GetActorVar, ACTOR_SELF, AVAR_CommandLossState, LVarA) + Switch(LVarA) + CaseEq(AVAL_LossState_Idle) // do nothing - EVT_CASE_EQ(AVAL_LossState_KnockAway) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar1, LVar2, LVar3) - EVT_SET(LVar2, 0) - EVT_SUB(LVar3, 1) - EVT_CALL(N(DisableRandomAbility), LVar4, LVar5) - EVT_CALL(MakeItemEntity, LVar4, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CommandLossItemIdx, LVar0) - EVT_ADD(LVar1, 7) - EVT_CALL(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 8, EVT_FLOAT(1.0)) - EVT_ADD(LVar1, 12) - EVT_CALL(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 8, EVT_FLOAT(1.0)) - EVT_ADD(LVar1, 7) - EVT_CALL(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 5, EVT_FLOAT(1.0)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_Idle) - EVT_CASE_EQ(AVAL_LossState_ShowMessage) - EVT_CALL(ShowMessageBox, LVar5, 60) - EVT_CALL(RemoveItemEntity, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_Done) - EVT_RETURN - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + CaseEq(AVAL_LossState_KnockAway) + Call(GetActorPos, ACTOR_PLAYER, LVar1, LVar2, LVar3) + Set(LVar2, 0) + Sub(LVar3, 1) + Call(N(DisableRandomAbility), LVar4, LVar5) + Call(MakeItemEntity, LVar4, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_DECORATION, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_CommandLossItemIdx, LVar0) + Add(LVar1, 7) + Call(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 8, Float(1.0)) + Add(LVar1, 12) + Call(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 8, Float(1.0)) + Add(LVar1, 7) + Call(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 5, Float(1.0)) + Call(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_Idle) + CaseEq(AVAL_LossState_ShowMessage) + Call(ShowMessageBox, LVar5, 60) + Call(RemoveItemEntity, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_Done) + Return + EndSwitch + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_Attack_BodySlam) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceBodySlam, 0) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(SetBattleCamOffsetZ, 54) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 40) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 240) - EVT_CALL(SetBattleCamOffsetZ, 21) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 40) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Walk) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 60, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PreJump) - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Jump) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(3.0)) - EVT_END_THREAD - EVT_SUB(LVar0, 35) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 14, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(2.0)) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(25) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_SET(LVar1, ANIM_BattleBowser_Walk) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(3.0)) - EVT_END_THREAD - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Land) - EVT_CALL(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_IF_FLAG(LVar1, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) - EVT_SET(LVar0, DMG_BOOSTED_BODY_SLAM) - EVT_ELSE - EVT_SET(LVar0, DMG_BODY_SLAM) - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarF) - EVT_IF_NOT_FLAG(LVarF, STATUS_FLAG_SHRINK) - EVT_CALL(SetDamageSource, DMG_SRC_CRUSH) - EVT_END_IF - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SET(LVar0, -1) - EVT_CALL(GetBattleFlags, LVar1) - EVT_IF_NOT_FLAG(LVar1, BS_FLAGS1_ATK_BLOCKED) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar1) - EVT_IF_NOT_FLAG(LVar1, STATUS_FLAG_STONE | STATUS_FLAG_RIGHT_ON) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_NOT_FLAG(LVar1, STATUS_FLAG_SHRINK) - EVT_CALL(N(CanPlayerLoseAction), LVar0) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_IF_NE(LVar0, -1) - EVT_CALL(LandJump, ACTOR_SELF) - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_KnockAway) - EVT_EXEC(N(EVS_ManageCommandLoss)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 52) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) - EVT_THREAD - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(3.0)) - EVT_END_THREAD - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 3, EVT_FLOAT(2.0)) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) - EVT_WAIT(3) - EVT_LABEL(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CommandLossState, LVar0) - EVT_IF_NE(LVar0, AVAL_LossState_Idle) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(8) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Walk) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CommandLossItemIdx, LVar0) - EVT_CALL(N(GetItemEntityPosition), LVar0, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, 38) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(8) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_StompOnce) - EVT_WAIT(2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CommandLossItemIdx, LVar0) - EVT_CALL(N(GetItemEntityPosition), LVar0, LVar1, LVar2, LVar3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_ShowMessage) - EVT_PLAY_EFFECT(EFFECT_FIREWORK, 0, LVar1, 0, LVar3, EVT_FLOAT(0.75), 0, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, LVar1, 0, LVar3, EVT_FLOAT(3.0), 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_StompOnce) - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_FIREWORK, 0, LVar1, 0, LVar3, EVT_FLOAT(0.75), 0, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, LVar1, 0, LVar3, EVT_FLOAT(3.0), 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_StompOnce) - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_FIREWORK, 0, LVar1, 0, LVar3, EVT_FLOAT(0.75), 0, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, LVar1, 0, LVar3, EVT_FLOAT(3.0), 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Mock) - EVT_WAIT(20) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_ELSE - EVT_CALL(GetBattleFlags, LVar1) - EVT_IF_NOT_FLAG(LVar1, BS_FLAGS1_ATK_BLOCKED) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar1) - EVT_IF_NOT_FLAG(LVar1, STATUS_FLAG_STONE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_NOT_FLAG(LVar1, STATUS_FLAG_SHRINK) - EVT_CALL(LandJump, ACTOR_SELF) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) - EVT_THREAD - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(3.0)) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(20) - EVT_END_IF - EVT_IF_EQ(LVarF, 10) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_SET(LVar1, ANIM_BattleBowser_Walk) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceBodySlam, 0) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 300) + Call(SetBattleCamOffsetZ, 54) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 40) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Else + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 240) + Call(SetBattleCamOffsetZ, 21) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 40) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Walk) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 60, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PreJump) + Wait(3) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Jump) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Set(LVar1, 0) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) + Thread + Call(N(StartRumbleWithParams), 80, 14) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(3.0)) + EndThread + Sub(LVar0, 35) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 14, FALSE, TRUE, FALSE) + Thread + Call(N(StartRumbleWithParams), 80, 14) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(2.0)) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) + Wait(3) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(25) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Set(LVar1, ANIM_BattleBowser_Walk) + ExecWait(N(EVS_ReturnHome)) + Return + EndCaseGroup + CaseDefault + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(3.0)) + EndThread + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Land) + Call(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar1) + IfFlag(LVar1, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) + Set(LVar0, DMG_BOOSTED_BODY_SLAM) + Else + Set(LVar0, DMG_BODY_SLAM) + EndIf + Call(GetStatusFlags, ACTOR_SELF, LVarF) + IfNotFlag(LVarF, STATUS_FLAG_SHRINK) + Call(SetDamageSource, DMG_SRC_CRUSH) + EndIf + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) + Set(LVar0, -1) + Call(GetBattleFlags, LVar1) + IfNotFlag(LVar1, BS_FLAGS1_ATK_BLOCKED) + Call(GetStatusFlags, ACTOR_PLAYER, LVar1) + IfNotFlag(LVar1, STATUS_FLAG_STONE | STATUS_FLAG_RIGHT_ON) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfNotFlag(LVar1, STATUS_FLAG_SHRINK) + Call(N(CanPlayerLoseAction), LVar0) + EndIf + EndIf + EndIf + IfNe(LVar0, -1) + Call(LandJump, ACTOR_SELF) + Call(N(StartRumbleWithParams), 80, 14) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) + Call(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_KnockAway) + Exec(N(EVS_ManageCommandLoss)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 52) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) + Thread + Call(N(StartRumbleWithParams), 80, 14) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(3.0)) + EndThread + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Thread + Call(N(StartRumbleWithParams), 80, 14) + Call(ShakeCam, CAM_BATTLE, 0, 3, Float(2.0)) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) + Wait(3) + Label(0) + Call(GetActorVar, ACTOR_SELF, AVAR_CommandLossState, LVar0) + IfNe(LVar0, AVAL_LossState_Idle) + Wait(1) + Goto(0) + EndIf + Wait(8) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Walk) + Call(GetActorVar, ACTOR_SELF, AVAR_CommandLossItemIdx, LVar0) + Call(N(GetItemEntityPosition), LVar0, LVar1, LVar2, LVar3) + Add(LVar1, 38) + Call(SetActorSpeed, ACTOR_SELF, Float(2.0)) + Call(SetGoalPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(8) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_StompOnce) + Wait(2) + Call(GetActorVar, ACTOR_SELF, AVAR_CommandLossItemIdx, LVar0) + Call(N(GetItemEntityPosition), LVar0, LVar1, LVar2, LVar3) + Call(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_ShowMessage) + PlayEffect(EFFECT_FIREWORK, 0, LVar1, 0, LVar3, Float(0.75), 0, 0) + PlayEffect(EFFECT_LANDING_DUST, 1, LVar1, 0, LVar3, Float(3.0), 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) + Wait(4) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_StompOnce) + Wait(2) + PlayEffect(EFFECT_FIREWORK, 0, LVar1, 0, LVar3, Float(0.75), 0, 0) + PlayEffect(EFFECT_LANDING_DUST, 1, LVar1, 0, LVar3, Float(3.0), 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) + Wait(4) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_StompOnce) + Wait(2) + PlayEffect(EFFECT_FIREWORK, 0, LVar1, 0, LVar3, Float(0.75), 0, 0) + PlayEffect(EFFECT_LANDING_DUST, 1, LVar1, 0, LVar3, Float(3.0), 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Mock) + Wait(20) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Else + Call(GetBattleFlags, LVar1) + IfNotFlag(LVar1, BS_FLAGS1_ATK_BLOCKED) + Call(GetStatusFlags, ACTOR_PLAYER, LVar1) + IfNotFlag(LVar1, STATUS_FLAG_STONE) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfNotFlag(LVar1, STATUS_FLAG_SHRINK) + Call(LandJump, ACTOR_SELF) + EndIf + EndIf + EndIf + Call(N(StartRumbleWithParams), 80, 14) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) + Thread + Call(N(StartRumbleWithParams), 80, 14) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(3.0)) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) + Wait(3) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(20) + EndIf + IfEq(LVarF, 10) + Return + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Set(LVar1, ANIM_BattleBowser_Walk) + ExecWait(N(EVS_ReturnHome)) + Return + End }; EvtScript N(EVS_AttackMissed) = { - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Tantrum) - EVT_THREAD - EVT_WAIT(5) - EVT_LOOP(4) - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(2.0)) - EVT_WAIT(4) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Tantrum) + Thread + Wait(5) + Loop(4) + Call(N(StartRumbleWithParams), 80, 14) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(2.0)) + Wait(4) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + EndThread + Return + End }; EvtScript N(EVS_Attack_ClawSwipe) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceClawSwipe, 0) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 200) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 40) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 160) - EVT_CALL(SetBattleCamOffsetZ, 5) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 40) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Walk) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(AddGoalPos, ACTOR_SELF, 60, 0, 0) - EVT_ELSE - EVT_CALL(AddGoalPos, ACTOR_SELF, 24, 0, 0) - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_RearUpMock) - EVT_WAIT(25) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Swipe) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_SWIPE) - EVT_WAIT(3) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_EXEC_WAIT(N(EVS_AttackMissed)) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_WAIT(30) - EVT_ELSE - EVT_WAIT(30) - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_SET(LVar1, ANIM_BattleBowser_Walk) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_IF_FLAG(LVar0, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) - EVT_SET(LVar0, DMG_BOOSTED_CLAW_SWIPE) - EVT_CALL(SetDamageSource, DMG_SRC_LAST_SLAP_LEFT) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 100), LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_ELSE - EVT_SET(LVar0, DMG_CLAW_SWIPE) - EVT_CALL(SetDamageSource, DMG_SRC_LAST_SLAP_LEFT) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 100), LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_IF - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_WAIT(30) - EVT_IF_EQ(LVarF, HIT_RESULT_10) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_SET(LVar1, ANIM_BattleBowser_Walk) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceClawSwipe, 0) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 200) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 40) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Else + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 160) + Call(SetBattleCamOffsetZ, 5) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 40) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Walk) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(AddGoalPos, ACTOR_SELF, 60, 0, 0) + Else + Call(AddGoalPos, ACTOR_SELF, 24, 0, 0) + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_RearUpMock) + Wait(25) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Swipe) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_SWIPE) + Wait(3) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + ExecWait(N(EVS_AttackMissed)) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + Wait(30) + Else + Wait(30) + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Set(LVar1, ANIM_BattleBowser_Walk) + ExecWait(N(EVS_ReturnHome)) + Return + EndCaseGroup + CaseDefault + EndSwitch + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar0) + IfFlag(LVar0, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) + Set(LVar0, DMG_BOOSTED_CLAW_SWIPE) + Call(SetDamageSource, DMG_SRC_LAST_SLAP_LEFT) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 100), LVar0, BS_FLAGS1_TRIGGER_EVENTS) + Else + Set(LVar0, DMG_CLAW_SWIPE) + Call(SetDamageSource, DMG_SRC_LAST_SLAP_LEFT) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 100), LVar0, BS_FLAGS1_TRIGGER_EVENTS) + EndIf + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Wait(30) + IfEq(LVarF, HIT_RESULT_10) + Return + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Set(LVar1, ANIM_BattleBowser_Walk) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_UseDrainingShockwave) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, 0) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 24) - EVT_ADD(LVar1, 97) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 420) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 40) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 9) - EVT_ADD(LVar1, 39) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 375) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 40) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) - EVT_WAIT(10) - EVT_CALL(N(FadeBackgroundDarken)) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_USE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 22) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_LIGHT_RAYS, 2, LVar0, 135, LVar2, EVT_FLOAT(1.0), LVarF, 0) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, 135, LVar2, EVT_FLOAT(1.0), LVarE, 0) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 9) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_LIGHT_RAYS, 2, LVar0, 54, LVar2, EVT_FLOAT(0.4), LVarF, 0) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, 54, LVar2, EVT_FLOAT(0.4), LVarE, 0) - EVT_END_IF - EVT_WAIT(25) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, -45, 60, 0) - EVT_CALL(SetBattleCamZoom, 530) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 80) - EVT_WAIT(10) - EVT_CALL(RemoveEffect, LVarF) - EVT_CALL(RemoveEffect, LVarE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_DRAIN_WAVE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 19) - EVT_SET(LVar1, 55) - EVT_PLAY_EFFECT(EFFECT_ENERGY_SHOCKWAVE, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 60, 0) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 7) - EVT_SET(LVar1, 22) - EVT_PLAY_EFFECT(EFFECT_ENERGY_SHOCKWAVE, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 60, 0) - EVT_END_IF - EVT_THREAD - EVT_CALL(N(FadeBackgroundLighten)) - EVT_END_THREAD - EVT_WAIT(8) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarB, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarB) - EVT_CASE_EQ(HIT_RESULT_MISS) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(30) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_WAIT(2) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_EXEC_WAIT(N(EVS_AttackMissed)) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(2) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, 0) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 24) + Add(LVar1, 97) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 420) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 40) + Else + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 9) + Add(LVar1, 39) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 375) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 40) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) + Wait(10) + Call(N(FadeBackgroundDarken)) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_USE) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 22) + Sub(LVar2, 3) + PlayEffect(EFFECT_LIGHT_RAYS, 2, LVar0, 135, LVar2, Float(1.0), LVarF, 0) + Sub(LVar2, 3) + PlayEffect(EFFECT_BULB_GLOW, 2, LVar0, 135, LVar2, Float(1.0), LVarE, 0) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 9) + Sub(LVar2, 3) + PlayEffect(EFFECT_LIGHT_RAYS, 2, LVar0, 54, LVar2, Float(0.4), LVarF, 0) + Sub(LVar2, 3) + PlayEffect(EFFECT_BULB_GLOW, 2, LVar0, 54, LVar2, Float(0.4), LVarE, 0) + EndIf + Wait(25) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, -45, 60, 0) + Call(SetBattleCamZoom, 530) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 80) + Wait(10) + Call(RemoveEffect, LVarF) + Call(RemoveEffect, LVarE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_DRAIN_WAVE) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 19) + Set(LVar1, 55) + PlayEffect(EFFECT_ENERGY_SHOCKWAVE, 0, LVar0, LVar1, LVar2, Float(1.0), 60, 0) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 7) + Set(LVar1, 22) + PlayEffect(EFFECT_ENERGY_SHOCKWAVE, 0, LVar0, LVar1, LVar2, Float(1.0), 60, 0) + EndIf + Thread + Call(N(FadeBackgroundLighten)) + EndThread + Wait(8) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(EnemyTestTarget, ACTOR_SELF, LVarB, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarB) + CaseEq(HIT_RESULT_MISS) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(30) + Return + CaseDefault + Wait(2) + IfEq(LVarA, HIT_RESULT_LUCKY) + ExecWait(N(EVS_AttackMissed)) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(2) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(SetGoalToTarget, ACTOR_SELF) /// @bug missing a call to GetPartEventFlags, LVar0 is invalid in next block - EVT_IF_FLAG(LVar0, ACTOR_EVENT_FLAG_ENCHANTED) - EVT_SET(LVar1, DMG_BOOSTED_SHOCKWAVE_P) - EVT_ELSE - EVT_SET(LVar1, DMG_SHOCKWAVE_P) - EVT_END_IF - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(RemovePlayerBuffs, PLAYER_BUFF_PARTNER_GLOWING) - EVT_IF_NE(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_END_IF - EVT_WAIT(30) - EVT_RETURN - EVT_END_SWITCH - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(FreezeBattleState, TRUE) - EVT_THREAD - EVT_WAIT(4) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) + IfFlag(LVar0, ACTOR_EVENT_FLAG_ENCHANTED) + Set(LVar1, DMG_BOOSTED_SHOCKWAVE_P) + Else + Set(LVar1, DMG_SHOCKWAVE_P) + EndIf + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_TRIGGER_EVENTS) + Call(RemovePlayerBuffs, PLAYER_BUFF_PARTNER_GLOWING) + IfNe(LVarA, HIT_RESULT_LUCKY) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + EndIf + Wait(30) + Return + EndSwitch + EndCaseGroup + CaseDefault + EndSwitch + Call(FreezeBattleState, TRUE) + Thread + Wait(4) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(SetGoalToTarget, ACTOR_SELF) /// @bug missing a call to GetPartEventFlags, LVar0 is invalid in next block - EVT_IF_FLAG(LVar0, ACTOR_EVENT_FLAG_ENCHANTED) - EVT_SET(LVar1, DMG_BOOSTED_SHOCKWAVE_P) - EVT_ELSE - EVT_SET(LVar1, DMG_SHOCKWAVE_P) - EVT_END_IF - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) + IfFlag(LVar0, ACTOR_EVENT_FLAG_ENCHANTED) + Set(LVar1, DMG_BOOSTED_SHOCKWAVE_P) + Else + Set(LVar1, DMG_SHOCKWAVE_P) + EndIf + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_TRIGGER_EVENTS) + Call(FreezeBattleState, FALSE) + EndThread + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) /// @bug missing a call to GetPartEventFlags, LVar0 is invalid in next block - EVT_IF_FLAG(LVar0, ACTOR_EVENT_FLAG_ENCHANTED) - EVT_SET(LVar1, DMG_BOOSTED_SHOCKWAVE) - EVT_ELSE - EVT_SET(LVar1, DMG_SHOCKWAVE) - EVT_END_IF - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(RemovePlayerBuffs, PLAYER_BUFF_JUMP_CHARGE | PLAYER_BUFF_HAMMER_CHARGE | PLAYER_BUFF_STONE | PLAYER_BUFF_HUSTLE | PLAYER_BUFF_STATIC | PLAYER_BUFF_TRANSPARENT | PLAYER_BUFF_CLOUD_NINE | PLAYER_BUFF_TURBO_CHARGE | PLAYER_BUFF_WATER_BLOCK | PLAYER_BUFF_PARTNER_GLOWING | 0xFFEFC04) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(15) - EVT_IF_EQ(LVarF, HIT_RESULT_10) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + IfFlag(LVar0, ACTOR_EVENT_FLAG_ENCHANTED) + Set(LVar1, DMG_BOOSTED_SHOCKWAVE) + Else + Set(LVar1, DMG_SHOCKWAVE) + EndIf + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_TRIGGER_EVENTS) + Call(RemovePlayerBuffs, PLAYER_BUFF_JUMP_CHARGE | PLAYER_BUFF_HAMMER_CHARGE | PLAYER_BUFF_STONE | PLAYER_BUFF_HUSTLE | PLAYER_BUFF_STATIC | PLAYER_BUFF_TRANSPARENT | PLAYER_BUFF_CLOUD_NINE | PLAYER_BUFF_TURBO_CHARGE | PLAYER_BUFF_WATER_BLOCK | PLAYER_BUFF_PARTNER_GLOWING | 0xFFEFC04) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(15) + IfEq(LVarF, HIT_RESULT_10) + Return + EndIf + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_Attack_FireBreath) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 81) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 400) - EVT_CALL(MoveBattleCamOver, 40) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 56) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 350) - EVT_CALL(MoveBattleCamOver, 40) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PreFireBreath) - EVT_WAIT(35) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_FireBreathStill) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 55) - EVT_WAIT(10) - EVT_CALL(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar3) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar4) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_IF_FLAG(LVar3, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) - EVT_IF_NOT_FLAG(LVar4, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 70) - EVT_ADD(LVar1, 35) - EVT_ELSE - EVT_SUB(LVar0, 28) - EVT_ADD(LVar1, 14) - EVT_END_IF - EVT_ELSE - EVT_IF_NOT_FLAG(LVar4, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 75) - EVT_ADD(LVar1, 49) - EVT_ELSE - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 19) - EVT_END_IF - EVT_END_IF - EVT_ADD(LVar2, 10) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 40) - EVT_SET(LVar4, 20) - EVT_CALL(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar6) - EVT_IF_FLAG(LVar6, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) - EVT_PLAY_EFFECT(EFFECT_FIRE_BREATH, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 50, 1, 24, 0) - EVT_ELSE - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar7) - EVT_IF_NOT_FLAG(LVar7, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, 15) - EVT_ELSE - EVT_ADD(LVar0, 6) - EVT_END_IF - EVT_SUB(LVar3, 10) - EVT_PLAY_EFFECT(EFFECT_FIRE_BREATH, 2, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 50, 1, 24, 0) - EVT_CALL(N(SetBowserFireBreathScales), LVarF) - EVT_END_IF - EVT_THREAD - EVT_CALL(N(StartRumbleWithParams), 50, 148) - EVT_CALL(PlaySound, SOUND_BOWSER_FIRE_BREATH_LOOP) - EVT_WAIT(70) - EVT_CALL(PlaySound, SOUND_BOWSER_FIRE_BREATH_LOOP | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_FireBreathLoop) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostFireBreath) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(30) - EVT_EXEC_WAIT(N(EVS_AttackMissed)) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(30) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_IF_FLAG(LVar0, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) - EVT_SET(LVar0, DMG_BOOSTED_FIRE_BREATH) - EVT_ELSE - EVT_SET(LVar0, DMG_FIRE_BREATH) - EVT_END_IF - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_FIRE, SUPPRESS_EVENT_ALL, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_FireBreathLoop) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostFireBreath) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(30) - EVT_IF_EQ(LVarF, HIT_RESULT_10) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Add(LVar1, 81) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 400) + Call(MoveBattleCamOver, 40) + Else + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Add(LVar1, 56) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 350) + Call(MoveBattleCamOver, 40) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PreFireBreath) + Wait(35) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_FireBreathStill) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 55) + Wait(10) + Call(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar3) + Call(GetStatusFlags, ACTOR_SELF, LVar4) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + IfFlag(LVar3, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) + IfNotFlag(LVar4, STATUS_FLAG_SHRINK) + Sub(LVar0, 70) + Add(LVar1, 35) + Else + Sub(LVar0, 28) + Add(LVar1, 14) + EndIf + Else + IfNotFlag(LVar4, STATUS_FLAG_SHRINK) + Sub(LVar0, 75) + Add(LVar1, 49) + Else + Sub(LVar0, 30) + Add(LVar1, 19) + EndIf + EndIf + Add(LVar2, 10) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Sub(LVar3, 40) + Set(LVar4, 20) + Call(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar6) + IfFlag(LVar6, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) + PlayEffect(EFFECT_FIRE_BREATH, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 50, 1, 24, 0) + Else + Call(GetStatusFlags, ACTOR_SELF, LVar7) + IfNotFlag(LVar7, STATUS_FLAG_SHRINK) + Add(LVar0, 15) + Else + Add(LVar0, 6) + EndIf + Sub(LVar3, 10) + PlayEffect(EFFECT_FIRE_BREATH, 2, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 50, 1, 24, 0) + Call(N(SetBowserFireBreathScales), LVarF) + EndIf + Thread + Call(N(StartRumbleWithParams), 50, 148) + Call(PlaySound, SOUND_BOWSER_FIRE_BREATH_LOOP) + Wait(70) + Call(PlaySound, SOUND_BOWSER_FIRE_BREATH_LOOP | SOUND_ID_TRIGGER_CHANGE_SOUND) + EndThread + Wait(10) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_FireBreathLoop) + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostFireBreath) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(30) + ExecWait(N(EVS_AttackMissed)) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(30) + Return + EndCaseGroup + CaseDefault + EndSwitch + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar0) + IfFlag(LVar0, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) + Set(LVar0, DMG_BOOSTED_FIRE_BREATH) + Else + Set(LVar0, DMG_FIRE_BREATH) + EndIf + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_FIRE, SUPPRESS_EVENT_ALL, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_FireBreathLoop) + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostFireBreath) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(30) + IfEq(LVarF, HIT_RESULT_10) + Return + EndIf + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_BurnHit) = { - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(GetDamageSource, LVar3) - EVT_SWITCH(LVar3) - EVT_CASE_EQ(DMG_SRC_FIRE_SHELL) - EVT_CALL(GetOriginalActorType, ACTOR_SELF, LVar7) - EVT_SWITCH(LVar7) - EVT_CASE_OR_EQ(ACTOR_TYPE_MONTY_MOLE) - EVT_CASE_OR_EQ(ACTOR_TYPE_MONTY_MOLE_BOSS) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.01)) - EVT_ADD(LVar5, 55) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, FALSE, FALSE) - EVT_END_SWITCH - EVT_SET(LVar7, 0) - EVT_LOOP(30) - EVT_ADD(LVar7, 48) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar7) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetOriginalActorType, ACTOR_SELF, LVar7) - EVT_SWITCH(LVar7) - EVT_CASE_OR_EQ(ACTOR_TYPE_MONTY_MOLE) - EVT_CASE_OR_EQ(ACTOR_TYPE_MONTY_MOLE_BOSS) - EVT_WAIT(30) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SUB(LVar5, 55) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_IF_EQ(LVar5, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_ELSE - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, FALSE, FALSE) - EVT_END_IF - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_WAIT(20) - EVT_END_SWITCH - EVT_IF_NE(LVar2, -1) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar2) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar1) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_CALL(GetPartEventFlags, ACTOR_SELF, LVar0, LVar1) - EVT_IF_NOT_FLAG(LVar1, ACTOR_EVENT_FLAG_FIREY | ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorSize, ACTOR_SELF, LVar3, LVar4) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_MULF(LVar3, EVT_FLOAT(0.4)) - EVT_MULF(LVar4, EVT_FLOAT(0.4)) - EVT_END_IF - EVT_DIVF(LVar3, EVT_FLOAT(2.0)) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar5) - EVT_IF_FLAG(LVar5, ACTOR_FLAG_UPSIDE_DOWN) - EVT_SUBF(LVar1, LVar3) - EVT_ELSE - EVT_ADDF(LVar1, LVar3) - EVT_END_IF - EVT_ADDF(LVar2, EVT_FLOAT(5.0)) - EVT_DIVF(LVar3, EVT_FLOAT(10.0)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_MULF(LVar3, EVT_FLOAT(0.4)) - EVT_IF_LT(LVar3, 1) - EVT_SETF(LVar3, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, LVar3, 10, 0) - EVT_END_IF - EVT_CASE_EQ(EVENT_BURN_DEATH) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(GetDamageSource, LVar3) + Switch(LVar3) + CaseEq(DMG_SRC_FIRE_SHELL) + Call(GetOriginalActorType, ACTOR_SELF, LVar7) + Switch(LVar7) + CaseOrEq(ACTOR_TYPE_MONTY_MOLE) + CaseOrEq(ACTOR_TYPE_MONTY_MOLE_BOSS) + EndCaseGroup + CaseDefault + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.01)) + Add(LVar5, 55) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, FALSE, FALSE) + EndSwitch + Set(LVar7, 0) + Loop(30) + Add(LVar7, 48) + Call(SetActorYaw, ACTOR_SELF, LVar7) + Wait(1) + EndLoop + Call(GetOriginalActorType, ACTOR_SELF, LVar7) + Switch(LVar7) + CaseOrEq(ACTOR_TYPE_MONTY_MOLE) + CaseOrEq(ACTOR_TYPE_MONTY_MOLE_BOSS) + Wait(30) + EndCaseGroup + CaseDefault + Sub(LVar5, 55) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + IfEq(LVar5, 0) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Else + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, FALSE, FALSE) + EndIf + EndSwitch + CaseDefault + Wait(20) + EndSwitch + IfNe(LVar2, -1) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar2) + EndIf + Wait(10) + Call(GetLastEvent, ACTOR_SELF, LVar1) + Switch(LVar1) + CaseEq(EVENT_BURN_HIT) + Call(GetPartEventFlags, ACTOR_SELF, LVar0, LVar1) + IfNotFlag(LVar1, ACTOR_EVENT_FLAG_FIREY | ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorSize, ACTOR_SELF, LVar3, LVar4) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfFlag(LVar5, STATUS_FLAG_SHRINK) + MulF(LVar3, Float(0.4)) + MulF(LVar4, Float(0.4)) + EndIf + DivF(LVar3, Float(2.0)) + Call(GetActorFlags, ACTOR_SELF, LVar5) + IfFlag(LVar5, ACTOR_FLAG_UPSIDE_DOWN) + SubF(LVar1, LVar3) + Else + AddF(LVar1, LVar3) + EndIf + AddF(LVar2, Float(5.0)) + DivF(LVar3, Float(10.0)) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfFlag(LVar5, STATUS_FLAG_SHRINK) + MulF(LVar3, Float(0.4)) + IfLt(LVar3, 1) + SetF(LVar3, Float(1.0)) + EndIf + EndIf + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, LVar3, 10, 0) + EndIf + CaseEq(EVENT_BURN_DEATH) // do nothing - EVT_END_SWITCH - EVT_RETURN - EVT_END + EndSwitch + Return + End }; EvtScript N(EVS_Attack_LightningBlast) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_CHARGE_LIGHTNING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) - EVT_CALL(N(FadeBackgroundDarken)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 54) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 2, LVar0, LVar1, LVar2, EVT_FLOAT(1.5), 50, 0) - EVT_WAIT(50) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 22) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_LIGHT_RAYS, 2, LVar0, 135, LVar2, EVT_FLOAT(1.5), LVarF, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_USE) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, 135, LVar2, EVT_FLOAT(1.5), LVarE, 0) - EVT_WAIT(30) - EVT_CALL(RemoveEffect, LVarF) - EVT_CALL(RemoveEffect, LVarE) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 21) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 2, LVar0, LVar1, LVar2, EVT_FLOAT(0.6), 50, 0) - EVT_WAIT(50) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 9) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_LIGHT_RAYS, 2, LVar0, 54, LVar2, EVT_FLOAT(0.6), LVarF, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_USE) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, 54, LVar2, EVT_FLOAT(0.6), LVarE, 0) - EVT_WAIT(30) - EVT_CALL(RemoveEffect, LVarF) - EVT_CALL(RemoveEffect, LVarE) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_LIGHTNING) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_THREAD - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, 0, LVar1) - EVT_CALL(N(UnkLightningBoltFxFunc1), LVar0, LVar1) - EVT_END_THREAD - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_WAIT(10) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_WAIT(20) - EVT_CALL(N(FadeBackgroundLighten)) - EVT_ELSE - EVT_WAIT(20) - EVT_CALL(N(FadeBackgroundLighten)) - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_SET(LVar1, ANIM_BattleBowser_Walk) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_IF_FLAG(LVar0, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) - EVT_SET(LVar0, DMG_BOOSTED_LIGHTNING_BLAST) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_ELSE - EVT_SET(LVar0, DMG_LIGHTNING_BLAST) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_IF - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_WAIT(30) - EVT_CALL(N(FadeBackgroundLighten)) - EVT_IF_EQ(LVarF, HIT_RESULT_10) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_SET(LVar1, ANIM_BattleBowser_Walk) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_13) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_CHARGE_LIGHTNING) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) + Call(N(FadeBackgroundDarken)) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 54) + Sub(LVar2, 3) + PlayEffect(EFFECT_ENERGY_IN_OUT, 2, LVar0, LVar1, LVar2, Float(1.5), 50, 0) + Wait(50) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 22) + Sub(LVar2, 3) + PlayEffect(EFFECT_LIGHT_RAYS, 2, LVar0, 135, LVar2, Float(1.5), LVarF, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_USE) + Sub(LVar2, 3) + PlayEffect(EFFECT_BULB_GLOW, 2, LVar0, 135, LVar2, Float(1.5), LVarE, 0) + Wait(30) + Call(RemoveEffect, LVarF) + Call(RemoveEffect, LVarE) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 21) + Sub(LVar2, 3) + PlayEffect(EFFECT_ENERGY_IN_OUT, 2, LVar0, LVar1, LVar2, Float(0.6), 50, 0) + Wait(50) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 9) + Sub(LVar2, 3) + PlayEffect(EFFECT_LIGHT_RAYS, 2, LVar0, 54, LVar2, Float(0.6), LVarF, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_USE) + Sub(LVar2, 3) + PlayEffect(EFFECT_BULB_GLOW, 2, LVar0, 54, LVar2, Float(0.6), LVarE, 0) + Wait(30) + Call(RemoveEffect, LVarF) + Call(RemoveEffect, LVarE) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_LIGHTNING) + Call(SetGoalToTarget, ACTOR_SELF) + Thread + Call(GetGoalPos, ACTOR_SELF, LVar0, 0, LVar1) + Call(N(UnkLightningBoltFxFunc1), LVar0, LVar1) + EndThread + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Wait(10) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + Wait(20) + Call(N(FadeBackgroundLighten)) + Else + Wait(20) + Call(N(FadeBackgroundLighten)) + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Set(LVar1, ANIM_BattleBowser_Walk) + ExecWait(N(EVS_ReturnHome)) + Return + EndCaseGroup + CaseDefault + EndSwitch + Wait(5) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar0) + IfFlag(LVar0, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) + Set(LVar0, DMG_BOOSTED_LIGHTNING_BLAST) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) + Else + Set(LVar0, DMG_LIGHTNING_BLAST) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) + EndIf + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Wait(30) + Call(N(FadeBackgroundLighten)) + IfEq(LVarF, HIT_RESULT_10) + Return + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Set(LVar1, ANIM_BattleBowser_Walk) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/battle/area/kpa2/actor/hallway_bowser.c b/src/battle/area/kpa2/actor/hallway_bowser.c index 5b09dc8d4fa..f3c6e648fa1 100644 --- a/src/battle/area/kpa2/actor/hallway_bowser.c +++ b/src/battle/area/kpa2/actor/hallway_bowser.c @@ -191,796 +191,796 @@ ActorBlueprint NAMESPACE = { #include "common/GetItemEntityPosition.inc.c" EvtScript N(EVS_Init) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceClawSwipe, 3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceBodySlam, 3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_Idle) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CommandLossItemIdx, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceStarBeam, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_RecoversLeft, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused, 0) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 1, 100, 0, 0, 0) - EVT_EXEC(N(EVS_AnimateImgFX)) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_TurnCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceClawSwipe, 3) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceBodySlam, 3) + Call(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_Idle) + Call(SetActorVar, ACTOR_SELF, AVAR_CommandLossItemIdx, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceStarBeam, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_RecoversLeft, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_Unused, 0) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 1, 100, 0, 0, 0) + Exec(N(EVS_AnimateImgFX)) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar3) - EVT_LABEL(0) - EVT_CALL(ActorExists, ACTOR_SELF, LVarB) - EVT_IF_EQ(LVarB, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarB) - EVT_IF_NOT_FLAG(LVarB, STATUS_FLAG_SHRINK) - EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 1, 100, 0, 0, 0) - EVT_ELSE - EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 1, 40, 0, 0, 0) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_PlayFootstepSounds)) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar3) + Label(0) + Call(ActorExists, ACTOR_SELF, LVarB) + IfEq(LVarB, 0) + Return + EndIf + Call(GetStatusFlags, ACTOR_SELF, LVarB) + IfNotFlag(LVarB, STATUS_FLAG_SHRINK) + Call(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 1, 100, 0, 0, 0) + Else + Call(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 1, 40, 0, 0, 0) + EndIf + ExecWait(N(EVS_PlayFootstepSounds)) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) - EVT_IF_NOT_FLAG(LVar0, AVAL_Flag_InitialTaunt) - EVT_BITWISE_OR_CONST(LVar0, AVAL_Flag_InitialTaunt) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) - EVT_CALL(EnableBattleStatusBar, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(ActorSpeak, MSG_CH8_0073, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Talk, ANIM_BattleBowser_Idle) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(EnableBattleStatusBar, TRUE) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) + IfNotFlag(LVar0, AVAL_Flag_InitialTaunt) + BitwiseOrConst(LVar0, AVAL_Flag_InitialTaunt) + Call(SetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) + Call(EnableBattleStatusBar, FALSE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_13) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(ActorSpeak, MSG_CH8_0073, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Talk, ANIM_BattleBowser_Idle) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(EnableBattleStatusBar, TRUE) + EndIf + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastElement, LVarE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_SET(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_RETURN - EVT_CASE_EQ(EVENT_HIT) - EVT_SET(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_BasicHit)) - EVT_RETURN - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET(LVar0, PRT_MAIN) - EVT_SET(LVar1, ANIM_BattleBowser_BurnHurt) - EVT_SET(LVar2, ANIM_BattleBowser_BurnStill) - EVT_EXEC_WAIT(N(EVS_BurnHit)) - EVT_CALL(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_EVENT_FLAG_ENCHANTED) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) - EVT_IF_FLAG(LVar0, AVAL_Flag_HasBeenDisenchanted) - EVT_IF_NOT_FLAG(LVar0, AVAL_Flag_CowardTaunt) - EVT_BITWISE_OR_CONST(LVar0, AVAL_Flag_CowardTaunt) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(ActorSpeak, MSG_CH8_0077, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_AnnoyedTalk, ANIM_BattleBowser_AnnoyedTalk) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET(LVar0, PRT_MAIN) - EVT_SET(LVar1, ANIM_BattleBowser_BurnHurt) - EVT_SET(LVar2, ANIM_BattleBowser_BurnStill) - EVT_EXEC_WAIT(N(EVS_BurnHit)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_BurnStill) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_BasicHit)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_ShockReaction)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_SET(LVar1, ANIM_BattleBowser_Walk) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_ShockReaction)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CALL(GetDamageSource, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_OR_EQ(DMG_SRC_SPOOK) - EVT_CASE_OR_EQ(DMG_SRC_FRIGHT_JAR) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Mock) - EVT_WAIT(30) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SET(LVar1, ANIM_BattleBowser_Mock) - EVT_EXEC_WAIT(N(EVS_NoDamageHit)) - EVT_END_SWITCH - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET(LVar1, ANIM_BattleBowser_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(EVENT_SPIKE_TAUNT) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Jump) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(3.0)) - EVT_CASE_EQ(EVENT_30) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(1000) - EVT_CASE_EQ(EVENT_RECEIVE_BUFF) - EVT_CALL(N(FadeBackgroundLighten)) - EVT_CASE_EQ(EVENT_STAR_BEAM) - EVT_CALL(FreezeBattleCam, TRUE) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_SET(LVar3, 50) - EVT_SET(LVar4, 40) - EVT_ELSE - EVT_SET(LVar3, 20) - EVT_SET(LVar4, 16) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, LVar3) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 50, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, LVar4) - EVT_PLAY_EFFECT(EFFECT_SHIMMER_BURST, 1, LVar0, LVar1, LVar2, EVT_FLOAT(0.7), 30, 0) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ENCHANTED, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceStarBeam, 0) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(NormalDefense))) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(StatusTable))) - EVT_SET(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) - EVT_IF_NOT_FLAG(LVar0, AVAL_Flag_StarBeamRemark) - EVT_BITWISE_OR_CONST(LVar0, AVAL_Flag_StarBeamRemark) - EVT_BITWISE_OR_CONST(LVar0, AVAL_Flag_HasBeenDisenchanted) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(ActorSpeak, MSG_CH8_0075, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Hurt, ANIM_BattleBowser_Hurt) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_RearUpStill) - EVT_LOOP(2) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 18) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(5) - EVT_SET(LVar0, 180) - EVT_LOOP(10) - EVT_SUB(LVar0, 18) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_WAIT(5) - EVT_END_LOOP - EVT_WAIT(20) - EVT_CALL(ActorSpeak, MSG_CH8_0076, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Hurt, ANIM_BattleBowser_Hurt) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_END_IF - EVT_CALL(FreezeBattleCam, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastElement, LVarE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + CaseEq(EVENT_HIT_COMBO) + Set(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_Hit)) + Return + CaseEq(EVENT_HIT) + Set(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_BasicHit)) + Return + CaseEq(EVENT_DEATH) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_Hit)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_BURN_HIT) + Set(LVar0, PRT_MAIN) + Set(LVar1, ANIM_BattleBowser_BurnHurt) + Set(LVar2, ANIM_BattleBowser_BurnStill) + ExecWait(N(EVS_BurnHit)) + Call(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar0) + IfNotFlag(LVar0, ACTOR_EVENT_FLAG_ENCHANTED) + Call(GetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) + IfFlag(LVar0, AVAL_Flag_HasBeenDisenchanted) + IfNotFlag(LVar0, AVAL_Flag_CowardTaunt) + BitwiseOrConst(LVar0, AVAL_Flag_CowardTaunt) + Call(SetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP) + Call(UseBattleCamPreset, BTL_CAM_PRESET_13) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 30) + Call(ActorSpeak, MSG_CH8_0077, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_AnnoyedTalk, ANIM_BattleBowser_AnnoyedTalk) + EndIf + EndIf + EndIf + EndIf + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + CaseEq(EVENT_BURN_DEATH) + Set(LVar0, PRT_MAIN) + Set(LVar1, ANIM_BattleBowser_BurnHurt) + Set(LVar2, ANIM_BattleBowser_BurnStill) + ExecWait(N(EVS_BurnHit)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_BurnStill) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + Set(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_BasicHit)) + Return + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_Hit)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_ShockReaction)) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Set(LVar1, ANIM_BattleBowser_Walk) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_ShockReaction)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_Death)) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + Call(GetDamageSource, LVar2) + Switch(LVar2) + CaseOrEq(DMG_SRC_SPOOK) + CaseOrEq(DMG_SRC_FRIGHT_JAR) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Mock) + Wait(30) + EndCaseGroup + CaseDefault + Set(LVar1, ANIM_BattleBowser_Mock) + ExecWait(N(EVS_NoDamageHit)) + EndSwitch + EndCaseGroup + CaseEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + Set(LVar1, ANIM_BattleBowser_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(EVENT_SPIKE_TAUNT) + CaseEq(EVENT_END_FIRST_STRIKE) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Jump) + ExecWait(EVS_Enemy_Recover) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(3.0)) + CaseEq(EVENT_30) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(1000) + CaseEq(EVENT_RECEIVE_BUFF) + Call(N(FadeBackgroundLighten)) + CaseEq(EVENT_STAR_BEAM) + Call(FreezeBattleCam, TRUE) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 1) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Set(LVar3, 50) + Set(LVar4, 40) + Else + Set(LVar3, 20) + Set(LVar4, 16) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, LVar3) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 50, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, LVar4) + PlayEffect(EFFECT_SHIMMER_BURST, 1, LVar0, LVar1, LVar2, Float(0.7), 30, 0) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ENCHANTED, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceStarBeam, 0) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(NormalDefense))) + Call(SetStatusTable, ACTOR_SELF, Ref(N(StatusTable))) + Set(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_Hit)) + Call(GetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) + IfNotFlag(LVar0, AVAL_Flag_StarBeamRemark) + BitwiseOrConst(LVar0, AVAL_Flag_StarBeamRemark) + BitwiseOrConst(LVar0, AVAL_Flag_HasBeenDisenchanted) + Call(SetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_13) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 30) + Call(ActorSpeak, MSG_CH8_0075, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Hurt, ANIM_BattleBowser_Hurt) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_RearUpStill) + Loop(2) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 18) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + Wait(5) + Set(LVar0, 180) + Loop(10) + Sub(LVar0, 18) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + Wait(5) + EndLoop + Wait(20) + Call(ActorSpeak, MSG_CH8_0076, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Hurt, ANIM_BattleBowser_Hurt) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + EndIf + Call(FreezeBattleCam, FALSE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Wait(30) + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_BasicHit) = { - EVT_CALL(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_EVENT_FLAG_ENCHANTED) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) - EVT_IF_FLAG(LVar0, AVAL_Flag_HasBeenDisenchanted) - EVT_IF_NOT_FLAG(LVar0, AVAL_Flag_CowardTaunt) - EVT_BITWISE_OR_CONST(LVar0, AVAL_Flag_CowardTaunt) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP) - EVT_CALL(FreezeBattleCam, TRUE) - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(ActorSpeak, MSG_CH8_0077, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_AnnoyedTalk, ANIM_BattleBowser_AnnoyedTalk) - EVT_CALL(FreezeBattleCam, FALSE) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar0) + IfNotFlag(LVar0, ACTOR_EVENT_FLAG_ENCHANTED) + Call(GetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) + IfFlag(LVar0, AVAL_Flag_HasBeenDisenchanted) + IfNotFlag(LVar0, AVAL_Flag_CowardTaunt) + BitwiseOrConst(LVar0, AVAL_Flag_CowardTaunt) + Call(SetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP) + Call(FreezeBattleCam, TRUE) + ExecWait(N(EVS_Hit)) + Call(UseBattleCamPreset, BTL_CAM_PRESET_13) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 30) + Call(ActorSpeak, MSG_CH8_0077, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_AnnoyedTalk, ANIM_BattleBowser_AnnoyedTalk) + Call(FreezeBattleCam, FALSE) + Else + ExecWait(N(EVS_Hit)) + EndIf + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndIf + EndIf + EndIf + ExecWait(N(EVS_Hit)) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Hit) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_Hit) + Return + End }; EvtScript N(EVS_Death) = { - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_IF_NE(LVar1, -1) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_WAIT(10) - EVT_END_IF - EVT_CALL(GetDamageSource, LVar5) - EVT_SWITCH(LVar5) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_SLAP_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_FAN_SMACK_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_SLAP_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_SLAP_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_FAN_SMACK_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_SLAP_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_SPIN_SMASH) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetOriginalActorType, ACTOR_SELF, LVar1) - EVT_SWITCH(LVar1) - EVT_CASE_OR_EQ(ACTOR_TYPE_BOB_OMB) - EVT_CASE_OR_EQ(ACTOR_TYPE_BULLET_BILL) - EVT_CASE_OR_EQ(ACTOR_TYPE_BOMBSHELL_BILL) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_IF_NE(LVar2, EXEC_DEATH_NO_SPINNING) - EVT_SET(LVar2, 0) - EVT_LOOP(24) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar2) - EVT_ADD(LVar2, 30) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_ADD(LVar2, 10) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_DEATH) - EVT_CALL(DropStarPoints, ACTOR_SELF) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_SET(LVar3, 0) - EVT_LOOP(12) - EVT_CALL(SetActorRotation, ACTOR_SELF, LVar3, 0, 0) - EVT_ADD(LVar3, 8) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_EXEC_WAIT(EVS_ForceNextTarget) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(HideHealthBar, ACTOR_SELF) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + IfNe(LVar1, -1) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Wait(10) + EndIf + Call(GetDamageSource, LVar5) + Switch(LVar5) + CaseOrEq(DMG_SRC_NEXT_SLAP_LEFT) + CaseOrEq(DMG_SRC_NEXT_FAN_SMACK_LEFT) + CaseOrEq(DMG_SRC_LAST_SLAP_LEFT) + CaseOrEq(DMG_SRC_LAST_FAN_SMACK_LEFT) + CaseOrEq(DMG_SRC_NEXT_SLAP_RIGHT) + CaseOrEq(DMG_SRC_NEXT_FAN_SMACK_RIGHT) + CaseOrEq(DMG_SRC_LAST_SLAP_RIGHT) + CaseOrEq(DMG_SRC_LAST_FAN_SMACK_RIGHT) + CaseOrEq(DMG_SRC_SPIN_SMASH) + EndCaseGroup + CaseDefault + Set(LFlag0, FALSE) + Call(GetOriginalActorType, ACTOR_SELF, LVar1) + Switch(LVar1) + CaseOrEq(ACTOR_TYPE_BOB_OMB) + CaseOrEq(ACTOR_TYPE_BULLET_BILL) + CaseOrEq(ACTOR_TYPE_BOMBSHELL_BILL) + EndCaseGroup + CaseDefault + EndSwitch + IfNe(LVar2, EXEC_DEATH_NO_SPINNING) + Set(LVar2, 0) + Loop(24) + Call(SetActorYaw, ACTOR_SELF, LVar2) + Add(LVar2, 30) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + EndIf + EndSwitch + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 10) + Add(LVar2, 10) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_DEATH) + Call(DropStarPoints, ACTOR_SELF) + Call(SetActorYaw, ACTOR_SELF, 0) + Set(LVar3, 0) + Loop(12) + Call(SetActorRotation, ACTOR_SELF, LVar3, 0, 0) + Add(LVar3, 8) + Wait(1) + EndLoop + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ExecWait(EVS_ForceNextTarget) + Call(RemoveActor, ACTOR_SELF) + Return + End }; EvtScript N(EVS_NoDamageHit) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_NoDamageHit) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_EXEC_WAIT(N(EVS_TakeTurn_Inner)) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + ExecWait(N(EVS_TakeTurn_Inner)) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Move_UseStarRod) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) - EVT_IF_NOT_FLAG(LVar0, AVAL_Flag_UsedStarRod) - EVT_BITWISE_OR_CONST(LVar0, AVAL_Flag_UsedStarRod) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) - EVT_WAIT(5) - EVT_CALL(ActorSpeak, MSG_CH8_0074, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_BrandishTalk, ANIM_BattleBowser_BrandishIdle) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_BrandishStill) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) - EVT_END_IF - EVT_WAIT(2) - EVT_EXEC_WAIT(N(EVS_StarRodCast)) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) + IfNotFlag(LVar0, AVAL_Flag_UsedStarRod) + BitwiseOrConst(LVar0, AVAL_Flag_UsedStarRod) + Call(SetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_13) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) + Wait(5) + Call(ActorSpeak, MSG_CH8_0074, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_BrandishTalk, ANIM_BattleBowser_BrandishIdle) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_BrandishStill) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) + EndIf + Wait(2) + ExecWait(N(EVS_StarRodCast)) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_SET(LVar0, PRT_MAIN) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVarD, LVarE, LVarF) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(GetDist2D, LVar9, LVarA, LVarC, LVarD, LVarF) - EVT_IF_GE(LVar9, EVT_FLOAT(5.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_END_IF - EVT_IF_EQ(LVarB, 180) - EVT_LOOP(15) - EVT_SUB(LVarB, 12) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVarB) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_IF - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_RETURN - EVT_END + Set(LVar0, PRT_MAIN) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVarD, LVarE, LVarF) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(GetDist2D, LVar9, LVarA, LVarC, LVarD, LVarF) + IfGe(LVar9, Float(5.0)) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + EndIf + IfEq(LVarB, 180) + Loop(15) + Sub(LVarB, 12) + Call(SetActorYaw, ACTOR_SELF, LVarB) + Wait(1) + EndLoop + EndIf + Call(SetActorYaw, ACTOR_SELF, 0) + Return + End }; EvtScript N(EVS_AnimateImgFX) = { - EVT_CALL(N(UpdateEnchantedBowserColors)) - EVT_RETURN - EVT_END + Call(N(UpdateEnchantedBowserColors)) + Return + End }; EvtScript N(EVS_StarRodCast) = { - EVT_CALL(N(FadeBackgroundDarken)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, 15) - EVT_ADD(LVar1, 90) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_GATHER) - EVT_ADD(LVar2, 10) - EVT_CALL(N(StarRodAppearEffect), LVar0, LVar1, LVar2, EVT_FLOAT(2.5), EVT_FLOAT(0.05)) - EVT_END_THREAD - EVT_ELSE - EVT_ADD(LVar0, 6) - EVT_ADD(LVar1, 36) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_GATHER) - EVT_ADD(LVar2, 10) - EVT_CALL(N(StarRodAppearEffect), LVar0, LVar1, LVar2, EVT_FLOAT(2.5), EVT_FLOAT(0.02)) - EVT_END_THREAD - EVT_END_IF - EVT_WAIT(65) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, 15) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_LIGHT_RAYS, 2, LVar0, 90, LVar2, EVT_FLOAT(1.0), LVarF, 0) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, 90, LVar2, EVT_FLOAT(1.0), LVarE, 0) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, 90, LVar2, EVT_FLOAT(1.0), LVarD, 0) - EVT_ELSE - EVT_ADD(LVar0, 6) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_LIGHT_RAYS, 2, LVar0, 36, LVar2, EVT_FLOAT(0.4), LVarF, 0) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, 36, LVar2, EVT_FLOAT(0.4), LVarE, 0) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, 36, LVar2, EVT_FLOAT(0.4), LVarD, 0) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_USE) - EVT_WAIT(30) - EVT_CALL(RemoveEffect, LVarF) - EVT_CALL(RemoveEffect, LVarE) - EVT_CALL(RemoveEffect, LVarD) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ENCHANTED, TRUE) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 1, ACTOR_DECORATION_RADIAL_STAR_EMITTER) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(BoostedDefense))) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(BoostedStatusTable))) - EVT_CALL(N(RemoveChillOut)) - EVT_WAIT(3) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 40) - EVT_ADD(LVar2, 12) - EVT_PLAY_EFFECT(EFFECT_STARS_SHIMMER, 3, LVar0, LVar1, LVar2, 70, 80, 25, 60, 0) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 16) - EVT_ADD(LVar2, 12) - EVT_PLAY_EFFECT(EFFECT_STARS_SHIMMER, 3, LVar0, LVar1, LVar2, 28, 32, 10, 60, 0) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_ENCHANT) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(N(StarRodPowerUpEffect), LVar0, LVar1, LVar2, EVT_FLOAT(0.8)) - EVT_END_THREAD - EVT_WAIT(75) - EVT_THREAD - EVT_CALL(N(FadeBackgroundLighten)) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_RearUpLaugh) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 40) - EVT_ELSE - EVT_ADD(LVar1, 16) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 15, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_SHOCKWAVE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 39) - EVT_WAIT(30) - EVT_RETURN - EVT_END + Call(N(FadeBackgroundDarken)) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar0, 15) + Add(LVar1, 90) + Thread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_GATHER) + Add(LVar2, 10) + Call(N(StarRodAppearEffect), LVar0, LVar1, LVar2, Float(2.5), Float(0.05)) + EndThread + Else + Add(LVar0, 6) + Add(LVar1, 36) + Thread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_GATHER) + Add(LVar2, 10) + Call(N(StarRodAppearEffect), LVar0, LVar1, LVar2, Float(2.5), Float(0.02)) + EndThread + EndIf + Wait(65) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar0, 15) + Sub(LVar2, 3) + PlayEffect(EFFECT_LIGHT_RAYS, 2, LVar0, 90, LVar2, Float(1.0), LVarF, 0) + PlayEffect(EFFECT_BULB_GLOW, 2, LVar0, 90, LVar2, Float(1.0), LVarE, 0) + Sub(LVar2, 3) + PlayEffect(EFFECT_BULB_GLOW, 2, LVar0, 90, LVar2, Float(1.0), LVarD, 0) + Else + Add(LVar0, 6) + Sub(LVar2, 3) + PlayEffect(EFFECT_LIGHT_RAYS, 2, LVar0, 36, LVar2, Float(0.4), LVarF, 0) + PlayEffect(EFFECT_BULB_GLOW, 2, LVar0, 36, LVar2, Float(0.4), LVarE, 0) + Sub(LVar2, 3) + PlayEffect(EFFECT_BULB_GLOW, 2, LVar0, 36, LVar2, Float(0.4), LVarD, 0) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_USE) + Wait(30) + Call(RemoveEffect, LVarF) + Call(RemoveEffect, LVarE) + Call(RemoveEffect, LVarD) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ENCHANTED, TRUE) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 1, ACTOR_DECORATION_RADIAL_STAR_EMITTER) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(BoostedDefense))) + Call(SetStatusTable, ACTOR_SELF, Ref(N(BoostedStatusTable))) + Call(N(RemoveChillOut)) + Wait(3) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 40) + Add(LVar2, 12) + PlayEffect(EFFECT_STARS_SHIMMER, 3, LVar0, LVar1, LVar2, 70, 80, 25, 60, 0) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 16) + Add(LVar2, 12) + PlayEffect(EFFECT_STARS_SHIMMER, 3, LVar0, LVar1, LVar2, 28, 32, 10, 60, 0) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_ENCHANT) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(N(StarRodPowerUpEffect), LVar0, LVar1, LVar2, Float(0.8)) + EndThread + Wait(75) + Thread + Call(N(FadeBackgroundLighten)) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_RearUpLaugh) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar1, 40) + Else + Add(LVar1, 16) + EndIf + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, Float(1.0), 15, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_SHOCKWAVE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 39) + Wait(30) + Return + End }; EvtScript N(EVS_ShockReaction) = { - EVT_IF_NE(LVar1, -1) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar2, LVar3, LVar4) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar5, LVar6, LVar7) - EVT_SET(LVar8, LVar2) - EVT_ADD(LVar8, LVar5) - EVT_DIV(LVar8, 2) - EVT_SET(LVar9, LVar4) - EVT_ADD(LVar9, LVar7) - EVT_DIV(LVar9, 2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar8, 0, LVar9) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_ADD(LVar8, LVar2) - EVT_DIV(LVar8, 2) - EVT_ADD(LVar9, LVar4) - EVT_DIV(LVar9, 2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar8, 0, LVar9) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar2, LVar3, LVar4) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_RETURN - EVT_END + IfNe(LVar1, -1) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.4)) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar2, LVar3, LVar4) + Call(GetActorPos, ACTOR_SELF, LVar5, LVar6, LVar7) + Set(LVar8, LVar2) + Add(LVar8, LVar5) + Div(LVar8, 2) + Set(LVar9, LVar4) + Add(LVar9, LVar7) + Div(LVar9, 2) + Call(SetGoalPos, ACTOR_SELF, LVar8, 0, LVar9) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Add(LVar8, LVar2) + Div(LVar8, 2) + Add(LVar9, LVar4) + Div(LVar9, 2) + Call(SetGoalPos, ACTOR_SELF, LVar8, 0, LVar9) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar2, LVar3, LVar4) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Return + End }; EvtScript N(EVS_PlayFootstepSounds) = { - EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar7) - EVT_IF_NE(LVar7, ANIM_BattleBowser_Walk) - EVT_IF_EQ(LVar3, ANIM_BattleBowser_Walk) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_B) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) - EVT_END_IF - EVT_SET(LVar3, LVar7) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar5, LVar6, LVar7) - EVT_SUB(LVar5, LVar0) - EVT_IF_GT(LVar5, -30) - EVT_IF_LT(LVar5, 30) - EVT_SET(LVar3, LVar7) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_B) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) - EVT_SET(LVar3, LVar7) - EVT_RETURN - EVT_END + Call(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar7) + IfNe(LVar7, ANIM_BattleBowser_Walk) + IfEq(LVar3, ANIM_BattleBowser_Walk) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_B) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) + EndIf + Set(LVar3, LVar7) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Return + EndIf + Call(GetActorPos, ACTOR_SELF, LVar5, LVar6, LVar7) + Sub(LVar5, LVar0) + IfGt(LVar5, -30) + IfLt(LVar5, 30) + Set(LVar3, LVar7) + Return + EndIf + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_B) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) + Set(LVar3, LVar7) + Return + End }; EvtScript N(EVS_Recover) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_RecoversLeft, LVar0) - EVT_SUB(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_RecoversLeft, LVar0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 15) - EVT_ADD(LVar1, 65) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 420) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 40) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 6) - EVT_ADD(LVar1, 26) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 294) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 40) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) - EVT_CALL(N(FadeBackgroundDarken)) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_CAST_RECOVER) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 15) - EVT_ADD(LVar1, 90) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 2, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 50, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 15) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, 90, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 6) - EVT_ADD(LVar1, 36) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 2, LVar0, LVar1, LVar2, EVT_FLOAT(0.4), 50, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 6) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, 36, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar0) - EVT_MUL(LVar0, 40) - EVT_DIV(LVar0, 100) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) - EVT_WAIT(30) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_STAR_BOUNCE_A) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(HealActor, ACTOR_SELF, LVar0, FALSE) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_RecoversLeft, LVar0) + Sub(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_RecoversLeft, LVar0) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 15) + Add(LVar1, 65) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 420) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 40) + Else + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 6) + Add(LVar1, 26) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 294) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 40) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) + Call(N(FadeBackgroundDarken)) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_CAST_RECOVER) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 15) + Add(LVar1, 90) + Sub(LVar2, 3) + PlayEffect(EFFECT_ENERGY_IN_OUT, 2, LVar0, LVar1, LVar2, Float(1.0), 50, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 15) + Sub(LVar2, 3) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, 90, LVar2, Float(0.3), 30, 0) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 6) + Add(LVar1, 36) + Sub(LVar2, 3) + PlayEffect(EFFECT_ENERGY_IN_OUT, 2, LVar0, LVar1, LVar2, Float(0.4), 50, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 6) + Sub(LVar2, 3) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, 36, LVar2, Float(0.12), 30, 0) + EndIf + Wait(30) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar0) + Mul(LVar0, 40) + Div(LVar0, 100) + Thread + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) + Wait(30) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_STAR_BOUNCE_A) + EndThread + Thread + Call(FreezeBattleState, TRUE) + Call(HealActor, ACTOR_SELF, LVar0, FALSE) + Call(FreezeBattleState, FALSE) + EndThread + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn_Inner) = { - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_TurnCount, 1) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceClawSwipe, 1) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceBodySlam, 1) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, 1) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceStarBeam, 1) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, 1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) - EVT_IF_EQ(LVar0, 2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 15) - EVT_ADD(LVar1, 60) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 420) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 30) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 6) - EVT_ADD(LVar1, 24) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 420) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 30) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_Move_UseStarRod)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar1) - EVT_MUL(LVar0, 100) - EVT_DIV(LVar0, LVar1) - EVT_CALL(N(GetPlayerHpPercent), LVar2) - EVT_SUB(LVar2, LVar0) - EVT_IF_GT(LVar2, 30) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_RecoversLeft, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 80) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, LVar0) - EVT_IF_GT(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, 0) - EVT_EXEC_WAIT(N(EVS_Recover)) - EVT_RETURN - EVT_ELSE - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, 0) - EVT_EXEC_WAIT(N(EVS_Recover)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) - EVT_IF_GT(LVar0, 1) - EVT_CALL(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_EVENT_FLAG_ENCHANTED) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceStarBeam, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(1) - EVT_SET(LVar0, 0) - EVT_CASE_EQ(2) - EVT_SET(LVar0, 20) - EVT_CASE_EQ(3) - EVT_SET(LVar0, 30) - EVT_CASE_DEFAULT - EVT_SET(LVar0, 100) - EVT_END_SWITCH - EVT_CALL(RandInt, 100, LVar1) - EVT_IF_LT(LVar1, LVar0) - EVT_EXEC_WAIT(N(EVS_Move_UseStarRod)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, LVar0) - EVT_IF_LT(LVar0, 3) - EVT_EXEC_WAIT(N(EVS_UseAttack)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_UseAttackOrShockwave)) - EVT_RETURN - EVT_END + Call(AddActorVar, ACTOR_SELF, AVAR_TurnCount, 1) + Call(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceClawSwipe, 1) + Call(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceBodySlam, 1) + Call(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, 1) + Call(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceStarBeam, 1) + Call(AddActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, 1) + Call(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) + IfEq(LVar0, 2) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 15) + Add(LVar1, 60) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 420) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 30) + Else + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 6) + Add(LVar1, 24) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 420) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 30) + EndIf + ExecWait(N(EVS_Move_UseStarRod)) + Return + EndIf + Call(GetActorHP, ACTOR_SELF, LVar0) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar1) + Mul(LVar0, 100) + Div(LVar0, LVar1) + Call(N(GetPlayerHpPercent), LVar2) + Sub(LVar2, LVar0) + IfGt(LVar2, 30) + Call(GetActorVar, ACTOR_SELF, AVAR_RecoversLeft, LVar0) + IfNe(LVar0, 0) + Call(RandInt, 100, LVar0) + IfLt(LVar0, 80) + Call(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, LVar0) + IfGt(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, 0) + ExecWait(N(EVS_Recover)) + Return + Else + Call(RandInt, 100, LVar0) + IfLt(LVar0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceRecover, 0) + ExecWait(N(EVS_Recover)) + Return + EndIf + EndIf + EndIf + EndIf + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) + IfGt(LVar0, 1) + Call(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar0) + IfNotFlag(LVar0, ACTOR_EVENT_FLAG_ENCHANTED) + Call(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceStarBeam, LVar0) + Switch(LVar0) + CaseEq(1) + Set(LVar0, 0) + CaseEq(2) + Set(LVar0, 20) + CaseEq(3) + Set(LVar0, 30) + CaseDefault + Set(LVar0, 100) + EndSwitch + Call(RandInt, 100, LVar1) + IfLt(LVar1, LVar0) + ExecWait(N(EVS_Move_UseStarRod)) + Return + EndIf + EndIf + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, LVar0) + IfLt(LVar0, 3) + ExecWait(N(EVS_UseAttack)) + Return + EndIf + ExecWait(N(EVS_UseAttackOrShockwave)) + Return + End }; EvtScript N(EVS_UseAttackOrShockwave) = { // only use regular attacks for the first few turns - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) - EVT_IF_LE(LVar0, 3) - EVT_EXEC_WAIT(N(EVS_UseAttack)) - EVT_RETURN - EVT_END_IF + Call(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) + IfLe(LVar0, 3) + ExecWait(N(EVS_UseAttack)) + Return + EndIf // use shockwave if it hasn't been used recently - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, LVar0) - EVT_IF_GE(LVar0, 6) - EVT_CALL(RandInt, 20, LVar0) - EVT_IF_LT(LVar0, 20) - EVT_EXEC_WAIT(N(EVS_UseDrainingShockwave)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_UseDrainingShockwave)) - EVT_END_IF - EVT_RETURN - EVT_END_IF + Call(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, LVar0) + IfGe(LVar0, 6) + Call(RandInt, 20, LVar0) + IfLt(LVar0, 20) + ExecWait(N(EVS_UseDrainingShockwave)) + Else + ExecWait(N(EVS_UseDrainingShockwave)) + EndIf + Return + EndIf // if either hammer or jump are boosted, try using shockwave - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 75) - EVT_CALL(N(GetJumpHammerCharge), LVar0, LVar1) - EVT_IF_GT(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_UseDrainingShockwave)) - EVT_RETURN - EVT_END_IF - EVT_IF_GT(LVar1, 0) - EVT_EXEC_WAIT(N(EVS_UseDrainingShockwave)) - EVT_RETURN - EVT_END_IF - EVT_END_IF + Call(RandInt, 100, LVar0) + IfLt(LVar0, 75) + Call(N(GetJumpHammerCharge), LVar0, LVar1) + IfGt(LVar0, 0) + ExecWait(N(EVS_UseDrainingShockwave)) + Return + EndIf + IfGt(LVar1, 0) + ExecWait(N(EVS_UseDrainingShockwave)) + Return + EndIf + EndIf // 20% chance to use regardless - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 20) - EVT_IF_LT(LVar0, 20) - EVT_EXEC_WAIT(N(EVS_UseDrainingShockwave)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_UseDrainingShockwave)) - EVT_END_IF - EVT_RETURN - EVT_END_IF + Call(RandInt, 100, LVar0) + IfLt(LVar0, 20) + IfLt(LVar0, 20) + ExecWait(N(EVS_UseDrainingShockwave)) + Else + ExecWait(N(EVS_UseDrainingShockwave)) + EndIf + Return + EndIf // fallback to using a regular attack - EVT_EXEC_WAIT(N(EVS_UseAttack)) - EVT_RETURN - EVT_RETURN - EVT_END + ExecWait(N(EVS_UseAttack)) + Return + Return + End }; EvtScript N(EVS_UseAttack) = { - EVT_CALL(RandInt, 80, LVar0) - EVT_IF_LT(LVar0, 20) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceBodySlam, LVar0) - EVT_IF_GE(LVar0, 2) - EVT_EXEC_WAIT(N(EVS_Attack_BodySlam)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(RandInt, 60, LVar0) - EVT_IF_LT(LVar0, 20) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceClawSwipe, LVar0) - EVT_IF_GE(LVar0, 2) - EVT_EXEC_WAIT(N(EVS_Attack_ClawSwipe)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_Attack_FireBreath)) - EVT_RETURN - EVT_END + Call(RandInt, 80, LVar0) + IfLt(LVar0, 20) + Call(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceBodySlam, LVar0) + IfGe(LVar0, 2) + ExecWait(N(EVS_Attack_BodySlam)) + Return + EndIf + EndIf + Call(RandInt, 60, LVar0) + IfLt(LVar0, 20) + Call(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceClawSwipe, LVar0) + IfGe(LVar0, 2) + ExecWait(N(EVS_Attack_ClawSwipe)) + Return + EndIf + EndIf + ExecWait(N(EVS_Attack_FireBreath)) + Return + End }; #include "common/DisableRandomAbility.inc.c" @@ -988,701 +988,701 @@ EvtScript N(EVS_UseAttack) = { #include "common/SetBowserFireBreathScales.inc.c" EvtScript N(EVS_ManageCommandLoss) = { - EVT_LABEL(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CommandLossState, LVarA) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(AVAL_LossState_Idle) + Label(0) + Call(GetActorVar, ACTOR_SELF, AVAR_CommandLossState, LVarA) + Switch(LVarA) + CaseEq(AVAL_LossState_Idle) // do nothing - EVT_CASE_EQ(AVAL_LossState_KnockAway) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar1, LVar2, LVar3) - EVT_SET(LVar2, 0) - EVT_SUB(LVar3, 1) - EVT_CALL(N(DisableRandomAbility), LVar4, LVar5) - EVT_CALL(MakeItemEntity, LVar4, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CommandLossItemIdx, LVar0) - EVT_ADD(LVar1, 7) - EVT_CALL(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 8, EVT_FLOAT(1.0)) - EVT_ADD(LVar1, 12) - EVT_CALL(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 8, EVT_FLOAT(1.0)) - EVT_ADD(LVar1, 7) - EVT_CALL(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 5, EVT_FLOAT(1.0)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_Idle) - EVT_CASE_EQ(AVAL_LossState_ShowMessage) - EVT_CALL(ShowMessageBox, LVar5, 60) - EVT_CALL(RemoveItemEntity, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_Done) - EVT_RETURN - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + CaseEq(AVAL_LossState_KnockAway) + Call(GetActorPos, ACTOR_PLAYER, LVar1, LVar2, LVar3) + Set(LVar2, 0) + Sub(LVar3, 1) + Call(N(DisableRandomAbility), LVar4, LVar5) + Call(MakeItemEntity, LVar4, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_DECORATION, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_CommandLossItemIdx, LVar0) + Add(LVar1, 7) + Call(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 8, Float(1.0)) + Add(LVar1, 12) + Call(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 8, Float(1.0)) + Add(LVar1, 7) + Call(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 5, Float(1.0)) + Call(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_Idle) + CaseEq(AVAL_LossState_ShowMessage) + Call(ShowMessageBox, LVar5, 60) + Call(RemoveItemEntity, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_Done) + Return + EndSwitch + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_Attack_BodySlam) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceBodySlam, 0) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(SetBattleCamOffsetZ, 36) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 40) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 240) - EVT_CALL(SetBattleCamOffsetZ, 14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 40) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Walk) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 60, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PreJump) - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Jump) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(3.0)) - EVT_END_THREAD - EVT_SUB(LVar0, 35) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 14, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(2.0)) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(25) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_SET(LVar1, ANIM_BattleBowser_Walk) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(3.0)) - EVT_END_THREAD - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Land) - EVT_CALL(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_IF_FLAG(LVar1, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) /// @bug checks wrong event flag, never uses 12 damage attack - EVT_SET(LVar0, DMG_BOOSTED_BODY_SLAM) - EVT_ELSE - EVT_SET(LVar0, DMG_BODY_SLAM) - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarF) - EVT_IF_NOT_FLAG(LVarF, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) - EVT_CALL(SetDamageSource, DMG_SRC_CRUSH) - EVT_END_IF - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SET(LVar0, -1) - EVT_CALL(GetBattleFlags, LVar1) - EVT_IF_NOT_FLAG(LVar1, BS_FLAGS1_ATK_BLOCKED) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar1) - EVT_IF_NOT_FLAG(LVar1, STATUS_FLAG_STONE | STATUS_FLAG_RIGHT_ON) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_NOT_FLAG(LVar1, STATUS_FLAG_SHRINK) - EVT_CALL(N(CanPlayerLoseAction), LVar0) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_IF_NE(LVar0, -1) - EVT_CALL(LandJump, ACTOR_SELF) - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_KnockAway) - EVT_EXEC(N(EVS_ManageCommandLoss)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 52) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) - EVT_THREAD - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(3.0)) - EVT_END_THREAD - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 3, EVT_FLOAT(2.0)) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) - EVT_WAIT(3) - EVT_LABEL(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CommandLossState, LVar0) - EVT_IF_NE(LVar0, AVAL_LossState_Idle) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(8) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Walk) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CommandLossItemIdx, LVar0) - EVT_CALL(N(GetItemEntityPosition), LVar0, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, 30) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(8) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_StompOnce) - EVT_WAIT(2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CommandLossItemIdx, LVar0) - EVT_CALL(N(GetItemEntityPosition), LVar0, LVar1, LVar2, LVar3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_ShowMessage) - EVT_PLAY_EFFECT(EFFECT_FIREWORK, 0, LVar1, 0, LVar3, EVT_FLOAT(0.5), 0, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, LVar1, 0, LVar3, EVT_FLOAT(2.0), 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_StompOnce) - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_FIREWORK, 0, LVar1, 0, LVar3, EVT_FLOAT(0.5), 0, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, LVar1, 0, LVar3, EVT_FLOAT(2.0), 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_StompOnce) - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_FIREWORK, 0, LVar1, 0, LVar3, EVT_FLOAT(0.5), 0, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, LVar1, 0, LVar3, EVT_FLOAT(2.0), 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Mock) - EVT_WAIT(20) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_ELSE - EVT_CALL(GetBattleFlags, LVar1) - EVT_IF_NOT_FLAG(LVar1, BS_FLAGS1_ATK_BLOCKED) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar1) - EVT_IF_NOT_FLAG(LVar1, STATUS_FLAG_STONE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_NOT_FLAG(LVar1, STATUS_FLAG_SHRINK) - EVT_CALL(LandJump, ACTOR_SELF) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) - EVT_THREAD - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(3.0)) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(20) - EVT_END_IF - EVT_IF_EQ(LVarF, 10) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_SET(LVar1, ANIM_BattleBowser_Walk) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceBodySlam, 0) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 300) + Call(SetBattleCamOffsetZ, 36) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 40) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Else + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 240) + Call(SetBattleCamOffsetZ, 14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 40) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Walk) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 60, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PreJump) + Wait(3) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Jump) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Set(LVar1, 0) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) + Thread + Call(N(StartRumbleWithParams), 80, 14) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(3.0)) + EndThread + Sub(LVar0, 35) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 14, FALSE, TRUE, FALSE) + Thread + Call(N(StartRumbleWithParams), 80, 14) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(2.0)) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) + Wait(3) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(25) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Set(LVar1, ANIM_BattleBowser_Walk) + ExecWait(N(EVS_ReturnHome)) + Return + EndCaseGroup + CaseDefault + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(3.0)) + EndThread + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Land) + Call(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar1) + IfFlag(LVar1, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) /// @bug checks wrong event flag, never uses 12 damage attack + Set(LVar0, DMG_BOOSTED_BODY_SLAM) + Else + Set(LVar0, DMG_BODY_SLAM) + EndIf + Call(GetStatusFlags, ACTOR_SELF, LVarF) + IfNotFlag(LVarF, ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED) + Call(SetDamageSource, DMG_SRC_CRUSH) + EndIf + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) + Set(LVar0, -1) + Call(GetBattleFlags, LVar1) + IfNotFlag(LVar1, BS_FLAGS1_ATK_BLOCKED) + Call(GetStatusFlags, ACTOR_PLAYER, LVar1) + IfNotFlag(LVar1, STATUS_FLAG_STONE | STATUS_FLAG_RIGHT_ON) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfNotFlag(LVar1, STATUS_FLAG_SHRINK) + Call(N(CanPlayerLoseAction), LVar0) + EndIf + EndIf + EndIf + IfNe(LVar0, -1) + Call(LandJump, ACTOR_SELF) + Call(N(StartRumbleWithParams), 80, 14) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) + Call(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_KnockAway) + Exec(N(EVS_ManageCommandLoss)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 52) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) + Thread + Call(N(StartRumbleWithParams), 80, 14) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(3.0)) + EndThread + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Thread + Call(N(StartRumbleWithParams), 80, 14) + Call(ShakeCam, CAM_BATTLE, 0, 3, Float(2.0)) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) + Wait(3) + Label(0) + Call(GetActorVar, ACTOR_SELF, AVAR_CommandLossState, LVar0) + IfNe(LVar0, AVAL_LossState_Idle) + Wait(1) + Goto(0) + EndIf + Wait(8) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Walk) + Call(GetActorVar, ACTOR_SELF, AVAR_CommandLossItemIdx, LVar0) + Call(N(GetItemEntityPosition), LVar0, LVar1, LVar2, LVar3) + Add(LVar1, 30) + Call(SetActorSpeed, ACTOR_SELF, Float(2.0)) + Call(SetGoalPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(8) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_StompOnce) + Wait(2) + Call(GetActorVar, ACTOR_SELF, AVAR_CommandLossItemIdx, LVar0) + Call(N(GetItemEntityPosition), LVar0, LVar1, LVar2, LVar3) + Call(SetActorVar, ACTOR_SELF, AVAR_CommandLossState, AVAL_LossState_ShowMessage) + PlayEffect(EFFECT_FIREWORK, 0, LVar1, 0, LVar3, Float(0.5), 0, 0) + PlayEffect(EFFECT_LANDING_DUST, 1, LVar1, 0, LVar3, Float(2.0), 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) + Wait(4) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_StompOnce) + Wait(2) + PlayEffect(EFFECT_FIREWORK, 0, LVar1, 0, LVar3, Float(0.5), 0, 0) + PlayEffect(EFFECT_LANDING_DUST, 1, LVar1, 0, LVar3, Float(2.0), 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) + Wait(4) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_StompOnce) + Wait(2) + PlayEffect(EFFECT_FIREWORK, 0, LVar1, 0, LVar3, Float(0.5), 0, 0) + PlayEffect(EFFECT_LANDING_DUST, 1, LVar1, 0, LVar3, Float(2.0), 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Mock) + Wait(20) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Else + Call(GetBattleFlags, LVar1) + IfNotFlag(LVar1, BS_FLAGS1_ATK_BLOCKED) + Call(GetStatusFlags, ACTOR_PLAYER, LVar1) + IfNotFlag(LVar1, STATUS_FLAG_STONE) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfNotFlag(LVar1, STATUS_FLAG_SHRINK) + Call(LandJump, ACTOR_SELF) + EndIf + EndIf + EndIf + Call(N(StartRumbleWithParams), 80, 14) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) + Thread + Call(N(StartRumbleWithParams), 80, 14) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(3.0)) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) + Wait(3) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(20) + EndIf + IfEq(LVarF, 10) + Return + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Set(LVar1, ANIM_BattleBowser_Walk) + ExecWait(N(EVS_ReturnHome)) + Return + End }; EvtScript N(EVS_AttackMissed) = { - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Tantrum) - EVT_THREAD - EVT_WAIT(5) - EVT_LOOP(4) - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(2.0)) - EVT_WAIT(4) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Tantrum) + Thread + Wait(5) + Loop(4) + Call(N(StartRumbleWithParams), 80, 14) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(2.0)) + Wait(4) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + EndThread + Return + End }; EvtScript N(EVS_Attack_ClawSwipe) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceClawSwipe, 0) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 200) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 40) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 160) - EVT_CALL(SetBattleCamOffsetZ, 5) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 40) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Walk) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(AddGoalPos, ACTOR_SELF, 40, 0, 0) - EVT_ELSE - EVT_CALL(AddGoalPos, ACTOR_SELF, 16, 0, 0) - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_RearUpMock) - EVT_WAIT(25) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Swipe) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_SWIPE) - EVT_WAIT(3) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_EXEC_WAIT(N(EVS_AttackMissed)) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_WAIT(30) - EVT_ELSE - EVT_WAIT(30) - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_SET(LVar1, ANIM_BattleBowser_Walk) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_IF_FLAG(LVar0, ACTOR_EVENT_FLAG_ENCHANTED) - EVT_SET(LVar0, DMG_BOOSTED_CLAW_SWIPE) - EVT_CALL(SetDamageSource, DMG_SRC_LAST_SLAP_LEFT) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 100), LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_ELSE - EVT_SET(LVar0, DMG_CLAW_SWIPE) - EVT_CALL(SetDamageSource, DMG_SRC_LAST_SLAP_LEFT) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 100), LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_WAIT(30) - EVT_IF_EQ(LVarF, HIT_RESULT_10) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_SET(LVar1, ANIM_BattleBowser_Walk) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceClawSwipe, 0) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 200) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 40) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Else + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 160) + Call(SetBattleCamOffsetZ, 5) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 40) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Walk) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(AddGoalPos, ACTOR_SELF, 40, 0, 0) + Else + Call(AddGoalPos, ACTOR_SELF, 16, 0, 0) + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_RearUpMock) + Wait(25) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Swipe) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_SWIPE) + Wait(3) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + ExecWait(N(EVS_AttackMissed)) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + Wait(30) + Else + Wait(30) + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Set(LVar1, ANIM_BattleBowser_Walk) + ExecWait(N(EVS_ReturnHome)) + Return + EndCaseGroup + CaseDefault + EndSwitch + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar0) + IfFlag(LVar0, ACTOR_EVENT_FLAG_ENCHANTED) + Set(LVar0, DMG_BOOSTED_CLAW_SWIPE) + Call(SetDamageSource, DMG_SRC_LAST_SLAP_LEFT) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 100), LVar0, BS_FLAGS1_TRIGGER_EVENTS) + Else + Set(LVar0, DMG_CLAW_SWIPE) + Call(SetDamageSource, DMG_SRC_LAST_SLAP_LEFT) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 100), LVar0, BS_FLAGS1_TRIGGER_EVENTS) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Wait(30) + IfEq(LVarF, HIT_RESULT_10) + Return + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Set(LVar1, ANIM_BattleBowser_Walk) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_UseDrainingShockwave) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, 0) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 24) - EVT_ADD(LVar1, 65) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 420) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 40) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 9) - EVT_ADD(LVar1, 26) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 250) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 40) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) - EVT_WAIT(10) - EVT_CALL(N(FadeBackgroundDarken)) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_USE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 15) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_LIGHT_RAYS, 2, LVar0, 90, LVar2, EVT_FLOAT(1.0), LVarF, 0) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, 90, LVar2, EVT_FLOAT(1.0), LVarE, 0) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 6) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_LIGHT_RAYS, 2, LVar0, 36, LVar2, EVT_FLOAT(0.4), LVarF, 0) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, 36, LVar2, EVT_FLOAT(0.4), LVarE, 0) - EVT_END_IF - EVT_WAIT(25) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, -45, 60, 0) - EVT_CALL(SetBattleCamZoom, 530) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 80) - EVT_WAIT(10) - EVT_CALL(RemoveEffect, LVarF) - EVT_CALL(RemoveEffect, LVarE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_DRAIN_WAVE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 13) - EVT_SET(LVar1, 55) - EVT_PLAY_EFFECT(EFFECT_ENERGY_SHOCKWAVE, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 60, 0) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_SET(LVar1, 22) - EVT_PLAY_EFFECT(EFFECT_ENERGY_SHOCKWAVE, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 60, 0) - EVT_END_IF - EVT_THREAD - EVT_CALL(N(FadeBackgroundLighten)) - EVT_END_THREAD - EVT_WAIT(8) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarB, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarB) - EVT_CASE_EQ(HIT_RESULT_MISS) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(30) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_WAIT(2) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_EXEC_WAIT(N(EVS_AttackMissed)) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(2) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, 0) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 24) + Add(LVar1, 65) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 420) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 40) + Else + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 9) + Add(LVar1, 26) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 250) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 40) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) + Wait(10) + Call(N(FadeBackgroundDarken)) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_USE) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 15) + Sub(LVar2, 3) + PlayEffect(EFFECT_LIGHT_RAYS, 2, LVar0, 90, LVar2, Float(1.0), LVarF, 0) + Sub(LVar2, 3) + PlayEffect(EFFECT_BULB_GLOW, 2, LVar0, 90, LVar2, Float(1.0), LVarE, 0) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 6) + Sub(LVar2, 3) + PlayEffect(EFFECT_LIGHT_RAYS, 2, LVar0, 36, LVar2, Float(0.4), LVarF, 0) + Sub(LVar2, 3) + PlayEffect(EFFECT_BULB_GLOW, 2, LVar0, 36, LVar2, Float(0.4), LVarE, 0) + EndIf + Wait(25) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, -45, 60, 0) + Call(SetBattleCamZoom, 530) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 80) + Wait(10) + Call(RemoveEffect, LVarF) + Call(RemoveEffect, LVarE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_DRAIN_WAVE) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 13) + Set(LVar1, 55) + PlayEffect(EFFECT_ENERGY_SHOCKWAVE, 0, LVar0, LVar1, LVar2, Float(1.0), 60, 0) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Set(LVar1, 22) + PlayEffect(EFFECT_ENERGY_SHOCKWAVE, 0, LVar0, LVar1, LVar2, Float(1.0), 60, 0) + EndIf + Thread + Call(N(FadeBackgroundLighten)) + EndThread + Wait(8) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(EnemyTestTarget, ACTOR_SELF, LVarB, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarB) + CaseEq(HIT_RESULT_MISS) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(30) + Return + CaseDefault + Wait(2) + IfEq(LVarA, HIT_RESULT_LUCKY) + ExecWait(N(EVS_AttackMissed)) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(2) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(SetGoalToTarget, ACTOR_SELF) /// @bug missing a call to GetPartEventFlags, LVar0 is invalid in next block - EVT_IF_FLAG(LVar0, ACTOR_EVENT_FLAG_ENCHANTED) - EVT_SET(LVar1, DMG_BOOSTED_SHOCKWAVE_P) - EVT_ELSE - EVT_SET(LVar1, DMG_SHOCKWAVE_P) - EVT_END_IF - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(RemovePlayerBuffs, PLAYER_BUFF_PARTNER_GLOWING) - EVT_IF_NE(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_END_IF - EVT_WAIT(30) - EVT_RETURN - EVT_END_SWITCH - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(FreezeBattleState, TRUE) - EVT_THREAD - EVT_WAIT(4) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) + IfFlag(LVar0, ACTOR_EVENT_FLAG_ENCHANTED) + Set(LVar1, DMG_BOOSTED_SHOCKWAVE_P) + Else + Set(LVar1, DMG_SHOCKWAVE_P) + EndIf + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_TRIGGER_EVENTS) + Call(RemovePlayerBuffs, PLAYER_BUFF_PARTNER_GLOWING) + IfNe(LVarA, HIT_RESULT_LUCKY) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + EndIf + Wait(30) + Return + EndSwitch + EndCaseGroup + CaseDefault + EndSwitch + Call(FreezeBattleState, TRUE) + Thread + Wait(4) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(SetGoalToTarget, ACTOR_SELF) /// @bug missing a call to GetPartEventFlags, LVar0 is invalid in next block - EVT_IF_FLAG(LVar0, ACTOR_EVENT_FLAG_ENCHANTED) - EVT_SET(LVar1, DMG_BOOSTED_SHOCKWAVE_P) - EVT_ELSE - EVT_SET(LVar1, DMG_SHOCKWAVE_P) - EVT_END_IF - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) + IfFlag(LVar0, ACTOR_EVENT_FLAG_ENCHANTED) + Set(LVar1, DMG_BOOSTED_SHOCKWAVE_P) + Else + Set(LVar1, DMG_SHOCKWAVE_P) + EndIf + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_TRIGGER_EVENTS) + Call(FreezeBattleState, FALSE) + EndThread + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) /// @bug missing a call to GetPartEventFlags, LVar0 is invalid in next block - EVT_IF_FLAG(LVar0, ACTOR_EVENT_FLAG_ENCHANTED) - EVT_SET(LVar1, DMG_BOOSTED_SHOCKWAVE) - EVT_ELSE - EVT_SET(LVar1, DMG_SHOCKWAVE) - EVT_END_IF - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(RemovePlayerBuffs, PLAYER_BUFF_JUMP_CHARGE | PLAYER_BUFF_HAMMER_CHARGE | PLAYER_BUFF_STONE | PLAYER_BUFF_HUSTLE | PLAYER_BUFF_STATIC | PLAYER_BUFF_TRANSPARENT | PLAYER_BUFF_CLOUD_NINE | PLAYER_BUFF_TURBO_CHARGE | PLAYER_BUFF_WATER_BLOCK | PLAYER_BUFF_PARTNER_GLOWING | 0xFFEFC04) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(15) - EVT_IF_EQ(LVarF, HIT_RESULT_10) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + IfFlag(LVar0, ACTOR_EVENT_FLAG_ENCHANTED) + Set(LVar1, DMG_BOOSTED_SHOCKWAVE) + Else + Set(LVar1, DMG_SHOCKWAVE) + EndIf + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_TRIGGER_EVENTS) + Call(RemovePlayerBuffs, PLAYER_BUFF_JUMP_CHARGE | PLAYER_BUFF_HAMMER_CHARGE | PLAYER_BUFF_STONE | PLAYER_BUFF_HUSTLE | PLAYER_BUFF_STATIC | PLAYER_BUFF_TRANSPARENT | PLAYER_BUFF_CLOUD_NINE | PLAYER_BUFF_TURBO_CHARGE | PLAYER_BUFF_WATER_BLOCK | PLAYER_BUFF_PARTNER_GLOWING | 0xFFEFC04) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(15) + IfEq(LVarF, HIT_RESULT_10) + Return + EndIf + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_Attack_FireBreath) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 65) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 400) - EVT_CALL(MoveBattleCamOver, 40) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 45) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 350) - EVT_CALL(MoveBattleCamOver, 40) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PreFireBreath) - EVT_WAIT(35) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_FireBreathStill) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 55) - EVT_WAIT(10) - EVT_CALL(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar3) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar4) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_IF_FLAG(LVar3, ACTOR_EVENT_FLAG_ENCHANTED) - EVT_IF_NOT_FLAG(LVar4, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 70) - EVT_ADD(LVar1, 35) - EVT_ELSE - EVT_SUB(LVar0, 28) - EVT_ADD(LVar1, 14) - EVT_END_IF - EVT_ELSE - EVT_IF_NOT_FLAG(LVar4, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 50) - EVT_ADD(LVar1, 33) - EVT_ELSE - EVT_SUB(LVar0, 20) - EVT_ADD(LVar1, 13) - EVT_END_IF - EVT_END_IF - EVT_ADD(LVar2, 10) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 40) - EVT_SET(LVar4, 20) - EVT_CALL(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar6) - EVT_IF_FLAG(LVar6, ACTOR_EVENT_FLAG_ENCHANTED) - EVT_PLAY_EFFECT(EFFECT_FIRE_BREATH, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 50, 1, 24, 0) - EVT_ELSE - EVT_PLAY_EFFECT(EFFECT_FIRE_BREATH, 2, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 50, 1, 24, 0) - EVT_CALL(N(SetBowserFireBreathScales), LVarF) - EVT_END_IF - EVT_THREAD - EVT_CALL(N(StartRumbleWithParams), 50, 148) - EVT_CALL(PlaySound, SOUND_BOWSER_FIRE_BREATH_LOOP) - EVT_WAIT(70) - EVT_CALL(PlaySound, SOUND_BOWSER_FIRE_BREATH_LOOP | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_FireBreathLoop) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostFireBreath) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(30) - EVT_EXEC_WAIT(N(EVS_AttackMissed)) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(30) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_IF_FLAG(LVar0, ACTOR_EVENT_FLAG_ENCHANTED) - EVT_SET(LVar0, DMG_BOOSTED_FIRE_BREATH) - EVT_ELSE - EVT_SET(LVar0, DMG_FIRE_BREATH) - EVT_END_IF - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_FIRE, SUPPRESS_EVENT_ALL, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_FireBreathLoop) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostFireBreath) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(30) - EVT_IF_EQ(LVarF, HIT_RESULT_10) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Add(LVar1, 65) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 400) + Call(MoveBattleCamOver, 40) + Else + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Add(LVar1, 45) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 350) + Call(MoveBattleCamOver, 40) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PreFireBreath) + Wait(35) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_FireBreathStill) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 55) + Wait(10) + Call(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar3) + Call(GetStatusFlags, ACTOR_SELF, LVar4) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + IfFlag(LVar3, ACTOR_EVENT_FLAG_ENCHANTED) + IfNotFlag(LVar4, STATUS_FLAG_SHRINK) + Sub(LVar0, 70) + Add(LVar1, 35) + Else + Sub(LVar0, 28) + Add(LVar1, 14) + EndIf + Else + IfNotFlag(LVar4, STATUS_FLAG_SHRINK) + Sub(LVar0, 50) + Add(LVar1, 33) + Else + Sub(LVar0, 20) + Add(LVar1, 13) + EndIf + EndIf + Add(LVar2, 10) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Sub(LVar3, 40) + Set(LVar4, 20) + Call(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar6) + IfFlag(LVar6, ACTOR_EVENT_FLAG_ENCHANTED) + PlayEffect(EFFECT_FIRE_BREATH, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 50, 1, 24, 0) + Else + PlayEffect(EFFECT_FIRE_BREATH, 2, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 50, 1, 24, 0) + Call(N(SetBowserFireBreathScales), LVarF) + EndIf + Thread + Call(N(StartRumbleWithParams), 50, 148) + Call(PlaySound, SOUND_BOWSER_FIRE_BREATH_LOOP) + Wait(70) + Call(PlaySound, SOUND_BOWSER_FIRE_BREATH_LOOP | SOUND_ID_TRIGGER_CHANGE_SOUND) + EndThread + Wait(10) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_FireBreathLoop) + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostFireBreath) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(30) + ExecWait(N(EVS_AttackMissed)) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(30) + Return + EndCaseGroup + CaseDefault + EndSwitch + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetPartEventFlags, ACTOR_SELF, PRT_MAIN, LVar0) + IfFlag(LVar0, ACTOR_EVENT_FLAG_ENCHANTED) + Set(LVar0, DMG_BOOSTED_FIRE_BREATH) + Else + Set(LVar0, DMG_FIRE_BREATH) + EndIf + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_FIRE, SUPPRESS_EVENT_ALL, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_FireBreathLoop) + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostFireBreath) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(30) + IfEq(LVarF, HIT_RESULT_10) + Return + EndIf + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_BurnHit) = { - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar3) - EVT_IF_EQ(LVar3, 36) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 1) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ENCHANTED, FALSE) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(GetDamageSource, LVar3) - EVT_SWITCH(LVar3) - EVT_CASE_EQ(DMG_SRC_FIRE_SHELL) - EVT_CALL(GetOriginalActorType, ACTOR_SELF, LVar7) - EVT_SWITCH(LVar7) - EVT_CASE_OR_EQ(ACTOR_TYPE_MONTY_MOLE) - EVT_CASE_OR_EQ(ACTOR_TYPE_MONTY_MOLE_BOSS) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.01)) - EVT_ADD(LVar5, 55) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, FALSE, FALSE) - EVT_END_SWITCH - EVT_SET(LVar7, 0) - EVT_LOOP(30) - EVT_ADD(LVar7, 48) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar7) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetOriginalActorType, ACTOR_SELF, LVar7) - EVT_SWITCH(LVar7) - EVT_CASE_OR_EQ(ACTOR_TYPE_MONTY_MOLE) - EVT_CASE_OR_EQ(ACTOR_TYPE_MONTY_MOLE_BOSS) - EVT_WAIT(30) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SUB(LVar5, 55) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_IF_EQ(LVar5, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_ELSE - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, FALSE, FALSE) - EVT_END_IF - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_WAIT(20) - EVT_END_SWITCH - EVT_IF_NE(LVar2, -1) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar2) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar1) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_CALL(GetPartEventFlags, ACTOR_SELF, LVar0, LVar1) - EVT_IF_NOT_FLAG(LVar1, ACTOR_EVENT_FLAG_FIREY | ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorSize, ACTOR_SELF, LVar3, LVar4) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_MULF(LVar3, EVT_FLOAT(0.4)) - EVT_MULF(LVar4, EVT_FLOAT(0.4)) - EVT_END_IF - EVT_DIVF(LVar3, EVT_FLOAT(2.0)) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar5) - EVT_IF_FLAG(LVar5, ACTOR_FLAG_UPSIDE_DOWN) - EVT_SUBF(LVar1, LVar3) - EVT_ELSE - EVT_ADDF(LVar1, LVar3) - EVT_END_IF - EVT_ADDF(LVar2, EVT_FLOAT(5.0)) - EVT_DIVF(LVar3, EVT_FLOAT(10.0)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_MULF(LVar3, EVT_FLOAT(0.4)) - EVT_IF_LT(LVar3, 1) - EVT_SETF(LVar3, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, LVar3, 10, 0) - EVT_END_IF - EVT_CASE_EQ(EVENT_BURN_DEATH) + Call(GetLastEvent, ACTOR_SELF, LVar3) + IfEq(LVar3, 36) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 1) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ENCHANTED, FALSE) + EndIf + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(GetDamageSource, LVar3) + Switch(LVar3) + CaseEq(DMG_SRC_FIRE_SHELL) + Call(GetOriginalActorType, ACTOR_SELF, LVar7) + Switch(LVar7) + CaseOrEq(ACTOR_TYPE_MONTY_MOLE) + CaseOrEq(ACTOR_TYPE_MONTY_MOLE_BOSS) + EndCaseGroup + CaseDefault + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.01)) + Add(LVar5, 55) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, FALSE, FALSE) + EndSwitch + Set(LVar7, 0) + Loop(30) + Add(LVar7, 48) + Call(SetActorYaw, ACTOR_SELF, LVar7) + Wait(1) + EndLoop + Call(GetOriginalActorType, ACTOR_SELF, LVar7) + Switch(LVar7) + CaseOrEq(ACTOR_TYPE_MONTY_MOLE) + CaseOrEq(ACTOR_TYPE_MONTY_MOLE_BOSS) + Wait(30) + EndCaseGroup + CaseDefault + Sub(LVar5, 55) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + IfEq(LVar5, 0) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Else + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, FALSE, FALSE) + EndIf + EndSwitch + CaseDefault + Wait(20) + EndSwitch + IfNe(LVar2, -1) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar2) + EndIf + Wait(10) + Call(GetLastEvent, ACTOR_SELF, LVar1) + Switch(LVar1) + CaseEq(EVENT_BURN_HIT) + Call(GetPartEventFlags, ACTOR_SELF, LVar0, LVar1) + IfNotFlag(LVar1, ACTOR_EVENT_FLAG_FIREY | ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorSize, ACTOR_SELF, LVar3, LVar4) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfFlag(LVar5, STATUS_FLAG_SHRINK) + MulF(LVar3, Float(0.4)) + MulF(LVar4, Float(0.4)) + EndIf + DivF(LVar3, Float(2.0)) + Call(GetActorFlags, ACTOR_SELF, LVar5) + IfFlag(LVar5, ACTOR_FLAG_UPSIDE_DOWN) + SubF(LVar1, LVar3) + Else + AddF(LVar1, LVar3) + EndIf + AddF(LVar2, Float(5.0)) + DivF(LVar3, Float(10.0)) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfFlag(LVar5, STATUS_FLAG_SHRINK) + MulF(LVar3, Float(0.4)) + IfLt(LVar3, 1) + SetF(LVar3, Float(1.0)) + EndIf + EndIf + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, LVar3, 10, 0) + EndIf + CaseEq(EVENT_BURN_DEATH) // do nothing - EVT_END_SWITCH - EVT_RETURN - EVT_END + EndSwitch + Return + End }; diff --git a/src/battle/area/kpa2/actor/intro_bowser.c b/src/battle/area/kpa2/actor/intro_bowser.c index 8852f9f49d9..07cbb9beff1 100644 --- a/src/battle/area/kpa2/actor/intro_bowser.c +++ b/src/battle/area/kpa2/actor/intro_bowser.c @@ -160,529 +160,529 @@ ActorBlueprint NAMESPACE = { #include "common/StarRodPowerUpEffect.inc.c" EvtScript N(EVS_Init) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_PeachSpoke, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused, 0) - EVT_CALL(SetBattleMenuEnabledFlags, BTL_MENU_ENABLED_JUMP) - EVT_CALL(CreateNpc, NPC_BTL_COMPANION, ANIM_ParadePeach_IdleRaisedArms) - EVT_CALL(SetNpcYaw, NPC_BTL_COMPANION, 90) - EVT_CALL(SetNpcPos, NPC_BTL_COMPANION, -130, 0, -12) - EVT_CALL(EnableNpcShadow, NPC_BTL_COMPANION, TRUE) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 1, 100, 0, 0, 0) - EVT_EXEC(N(EVS_AnimateImgFX)) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_NO_GAME_OVER, TRUE) - EVT_CALL(SetBattleFlagBits2, BS_FLAGS2_DONT_STOP_MUSIC, TRUE) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_TurnCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_PeachSpoke, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_Unused, 0) + Call(SetBattleMenuEnabledFlags, BTL_MENU_ENABLED_JUMP) + Call(CreateNpc, NPC_BTL_COMPANION, ANIM_ParadePeach_IdleRaisedArms) + Call(SetNpcYaw, NPC_BTL_COMPANION, 90) + Call(SetNpcPos, NPC_BTL_COMPANION, -130, 0, -12) + Call(EnableNpcShadow, NPC_BTL_COMPANION, TRUE) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 1, 100, 0, 0, 0) + Exec(N(EVS_AnimateImgFX)) + Call(SetBattleFlagBits, BS_FLAGS1_NO_GAME_OVER, TRUE) + Call(SetBattleFlagBits2, BS_FLAGS2_DONT_STOP_MUSIC, TRUE) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_LABEL(0) - EVT_EXEC_WAIT(N(EVS_PlayFootstepSounds)) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Label(0) + ExecWait(N(EVS_PlayFootstepSounds)) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PeachSpoke, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_PeachSpoke, TRUE) - EVT_CALL(EnableBattleStatusBar, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, -115, 0, 0) - EVT_CALL(SetBattleCamZoom, 320) - EVT_CALL(SetBattleCamOffsetZ, 50) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 180) - EVT_CALL(SpeakToPlayer, ACTOR_PLAYER, ANIM_ParadePeach_Talk, ANIM_ParadePeach_IdleRaisedArms, 5, MSG_Intro_0057) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_Fall) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.5)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_JumpForJoy) - EVT_WAIT(24) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_WAIT(10) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 0) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(20) - EVT_CALL(EnableBattleStatusBar, TRUE) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) + Call(GetActorVar, ACTOR_SELF, AVAR_PeachSpoke, LVar0) + IfEq(LVar0, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_PeachSpoke, TRUE) + Call(EnableBattleStatusBar, FALSE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, -115, 0, 0) + Call(SetBattleCamZoom, 320) + Call(SetBattleCamOffsetZ, 50) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(SetActorYaw, ACTOR_PLAYER, 180) + Call(SpeakToPlayer, ACTOR_PLAYER, ANIM_ParadePeach_Talk, ANIM_ParadePeach_IdleRaisedArms, 5, MSG_Intro_0057) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_Fall) + Call(SetActorSpeed, ACTOR_PLAYER, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.5)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_JumpForJoy) + Wait(24) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Wait(10) + Call(SetActorYaw, ACTOR_PLAYER, 0) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(20) + Call(EnableBattleStatusBar, TRUE) + EndIf + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastElement, LVarE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_OnHit)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_OnHit)) - EVT_CASE_OR_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_OnDeath)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_OnHit)) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_OnDeath)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_OnDeath)) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET(LVar1, ANIM_BattleBowser_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) - EVT_IF_EQ(LVar0, 3) - EVT_CALL(ActorSpeak, MSG_Intro_005B, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Talk, ANIM_BattleBowser_Idle) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIKE_TAUNT) - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_OnDeath)) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Jump) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(3.0)) - EVT_CASE_EQ(EVENT_30) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(1000) - EVT_CASE_DEFAULT - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_WAIT(20) - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastElement, LVarE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + Set(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_OnHit)) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + Set(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_OnHit)) + CaseOrEq(EVENT_BURN_DEATH) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_OnDeath)) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + Set(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_OnHit)) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_OnDeath)) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(EVS_Enemy_ShockHit) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_OnDeath)) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_MAIN) + Set(LVar1, ANIM_BattleBowser_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + Call(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) + IfEq(LVar0, 3) + Call(ActorSpeak, MSG_Intro_005B, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Talk, ANIM_BattleBowser_Idle) + EndIf + EndCaseGroup + CaseEq(EVENT_SPIKE_TAUNT) + CaseEq(EVENT_DEATH) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_OnDeath)) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Jump) + ExecWait(EVS_Enemy_Recover) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(3.0)) + CaseEq(EVENT_30) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(1000) + CaseDefault + SetConst(LVar1, ANIM_BattleBowser_Hurt) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) + Wait(20) + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_OnHit) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_Hit) + Return + End }; EvtScript N(EVS_OnDeath) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_Hit) + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_Death) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) - EVT_ADD(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_LT(3) - EVT_EXEC_WAIT(N(EVS_Attack_ClawSwipe)) - EVT_CASE_EQ(3) - EVT_EXEC_WAIT(N(EVS_UseStarRod)) - EVT_EXEC_WAIT(N(EVS_Attack_ClawSwipe)) - EVT_CASE_EQ(4) - EVT_EXEC_WAIT(N(EVS_Attack_ClawSwipe)) - EVT_CASE_EQ(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_CALL(ActorSpeak, MSG_Intro_005C, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Talk, ANIM_BattleBowser_Idle) - EVT_EXEC_WAIT(N(EVS_Attack_FireBreath)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) + Add(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) + Switch(LVar0) + CaseLt(3) + ExecWait(N(EVS_Attack_ClawSwipe)) + CaseEq(3) + ExecWait(N(EVS_UseStarRod)) + ExecWait(N(EVS_Attack_ClawSwipe)) + CaseEq(4) + ExecWait(N(EVS_Attack_ClawSwipe)) + CaseEq(5) + Call(UseBattleCamPreset, BTL_CAM_PRESET_13) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 30) + Wait(30) + Call(ActorSpeak, MSG_Intro_005C, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Talk, ANIM_BattleBowser_Idle) + ExecWait(N(EVS_Attack_FireBreath)) + EndSwitch + Return + End }; EvtScript N(EVS_Attack_ClawSwipe) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 200) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 40) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Walk) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 40, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_RearUpMock) - EVT_WAIT(25) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Swipe) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_SWIPE) - EVT_WAIT(3) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar1) - EVT_IF_LT(LVar1, 3) - EVT_SET(LVar0, DMG_CLAW_SWIPE) - EVT_CALL(SetDamageSource, DMG_SRC_LAST_SLAP_LEFT) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_ELSE - EVT_SET(LVar0, DMG_MEGA_CLAW_SWIPE) - EVT_CALL(SetDamageSource, DMG_SRC_LAST_SLAP_LEFT) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) - EVT_IF_GE(LVar0, 3) - EVT_CALL(SetNpcAnimation, NPC_BTL_COMPANION, ANIM_ParadePeach_Weep) - EVT_ELSE - EVT_CALL(SetNpcAnimation, NPC_BTL_COMPANION, ANIM_ParadePeach_HorrorLoop) - EVT_END_IF - EVT_WAIT(45) - EVT_CALL(SetNpcAnimation, NPC_BTL_COMPANION, ANIM_ParadePeach_IdleRaisedArms) - EVT_END_THREAD - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_WAIT(30) - EVT_IF_EQ(LVarF, HIT_RESULT_10) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_SET(LVar1, ANIM_BattleBowser_Walk) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 200) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 40) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Walk) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 40, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_RearUpMock) + Wait(25) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Swipe) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_SWIPE) + Wait(3) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar1) + IfLt(LVar1, 3) + Set(LVar0, DMG_CLAW_SWIPE) + Call(SetDamageSource, DMG_SRC_LAST_SLAP_LEFT) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) + Else + Set(LVar0, DMG_MEGA_CLAW_SWIPE) + Call(SetDamageSource, DMG_SRC_LAST_SLAP_LEFT) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Thread + Call(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) + IfGe(LVar0, 3) + Call(SetNpcAnimation, NPC_BTL_COMPANION, ANIM_ParadePeach_Weep) + Else + Call(SetNpcAnimation, NPC_BTL_COMPANION, ANIM_ParadePeach_HorrorLoop) + EndIf + Wait(45) + Call(SetNpcAnimation, NPC_BTL_COMPANION, ANIM_ParadePeach_IdleRaisedArms) + EndThread + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Wait(30) + IfEq(LVarF, HIT_RESULT_10) + Return + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Set(LVar1, ANIM_BattleBowser_Walk) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_FireBreath) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 65) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 400) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 40) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PreFireBreath) - EVT_WAIT(35) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_FireBreathStill) - EVT_WAIT(10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 50) - EVT_ADD(LVar1, 33) - EVT_ADD(LVar2, 10) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 40) - EVT_SET(LVar4, 20) - EVT_PLAY_EFFECT(EFFECT_FIRE_BREATH, 2, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 50, 1, 24) - EVT_CALL(N(SetBowserFireBreathScales), LVarF) - EVT_THREAD - EVT_CALL(N(StartRumbleWithParams), 50, 148) - EVT_CALL(PlaySound, SOUND_BOWSER_FIRE_BREATH_LOOP) - EVT_WAIT(70) - EVT_CALL(PlaySound, SOUND_BOWSER_FIRE_BREATH_LOOP | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_BTL_COMPANION, ANIM_ParadePeach_Weep) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 55) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_FireBreathLoop) - EVT_WAIT(30) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_FIRE, SUPPRESS_EVENT_ALL, 0, DMG_FIRE_BREATH, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostFireBreath) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_END_THREAD - EVT_WAIT(60) - EVT_CALL(SetNpcAnimation, NPC_BTL_COMPANION, ANIM_ParadePeach_HorrorLoop) - EVT_LOOP(68) - EVT_CALL(GetAnimation, ACTOR_PLAYER, 0, LVar0) - EVT_IF_EQ(LVar0, ANIM_Mario1_FallDown) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_BTL_COMPANION, ANIM_ParadePeach_Bow) - EVT_WAIT(30) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Add(LVar1, 65) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 400) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 40) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PreFireBreath) + Wait(35) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_FireBreathStill) + Wait(10) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 50) + Add(LVar1, 33) + Add(LVar2, 10) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Sub(LVar3, 40) + Set(LVar4, 20) + PlayEffect(EFFECT_FIRE_BREATH, 2, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 50, 1, 24) + Call(N(SetBowserFireBreathScales), LVarF) + Thread + Call(N(StartRumbleWithParams), 50, 148) + Call(PlaySound, SOUND_BOWSER_FIRE_BREATH_LOOP) + Wait(70) + Call(PlaySound, SOUND_BOWSER_FIRE_BREATH_LOOP | SOUND_ID_TRIGGER_CHANGE_SOUND) + EndThread + Call(SetNpcAnimation, NPC_BTL_COMPANION, ANIM_ParadePeach_Weep) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 55) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_FireBreathLoop) + Wait(30) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_FIRE, SUPPRESS_EVENT_ALL, 0, DMG_FIRE_BREATH, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Thread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostFireBreath) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + EndThread + Wait(60) + Call(SetNpcAnimation, NPC_BTL_COMPANION, ANIM_ParadePeach_HorrorLoop) + Loop(68) + Call(GetAnimation, ACTOR_PLAYER, 0, LVar0) + IfEq(LVar0, ANIM_Mario1_FallDown) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetNpcAnimation, NPC_BTL_COMPANION, ANIM_ParadePeach_Bow) + Wait(30) + EndCaseGroup + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_UseStarRod) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_CALL(ActorSpeak, MSG_Intro_0058, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Talk, ANIM_BattleBowser_Idle) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 15) - EVT_ADD(LVar1, 65) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 320) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_THREAD - EVT_WAIT(2) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_ADD(LVar1, 90) - EVT_PLAY_EFFECT(EFFECT_STARS_SHIMMER, 3, LVar0, LVar1, LVar2, 30, 30, 7, 30, 0) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) - EVT_WAIT(30) - EVT_CALL(ActorSpeak, MSG_Intro_0059, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_BrandishTalk, ANIM_BattleBowser_BrandishIdle) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) - EVT_EXEC_WAIT(N(EVS_StarRodCast)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 15) - EVT_ADD(LVar1, 65) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 320) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 25) - EVT_CALL(ActorSpeak, MSG_Intro_005A, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_RearUpMock, ANIM_BattleBowser_RearUpStill) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(BoostedDefense))) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(BoostedStatusTable))) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_PRESET_13) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 30) + Wait(30) + Call(ActorSpeak, MSG_Intro_0058, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Talk, ANIM_BattleBowser_Idle) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 15) + Add(LVar1, 65) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 320) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 20) + Wait(20) + Thread + Wait(2) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Add(LVar1, 90) + PlayEffect(EFFECT_STARS_SHIMMER, 3, LVar0, LVar1, LVar2, 30, 30, 7, 30, 0) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) + Wait(30) + Call(ActorSpeak, MSG_Intro_0059, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_BrandishTalk, ANIM_BattleBowser_BrandishIdle) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) + ExecWait(N(EVS_StarRodCast)) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 15) + Add(LVar1, 65) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 320) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 25) + Call(ActorSpeak, MSG_Intro_005A, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_RearUpMock, ANIM_BattleBowser_RearUpStill) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(BoostedDefense))) + Call(SetStatusTable, ACTOR_SELF, Ref(N(BoostedStatusTable))) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_SET(LVar0, PRT_MAIN) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVarD, LVarE, LVarF) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(GetDist2D, LVar9, LVarA, LVarC, LVarD, LVarF) - EVT_IF_GE(LVar9, EVT_FLOAT(5.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_END_IF - EVT_IF_EQ(LVarB, 180) - EVT_LOOP(15) - EVT_SUB(LVarB, 12) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVarB) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_IF - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_RETURN - EVT_END + Set(LVar0, PRT_MAIN) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVarD, LVarE, LVarF) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(GetDist2D, LVar9, LVarA, LVarC, LVarD, LVarF) + IfGe(LVar9, Float(5.0)) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + EndIf + IfEq(LVarB, 180) + Loop(15) + Sub(LVarB, 12) + Call(SetActorYaw, ACTOR_SELF, LVarB) + Wait(1) + EndLoop + EndIf + Call(SetActorYaw, ACTOR_SELF, 0) + Return + End }; EvtScript N(EVS_AnimateImgFX) = { - EVT_CALL(N(UpdateEnchantedBowserColors)) - EVT_RETURN - EVT_END + Call(N(UpdateEnchantedBowserColors)) + Return + End }; EvtScript N(EVS_StarRodCast) = { - EVT_CALL(N(FadeBackgroundDarken)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, 15) - EVT_ADD(LVar1, 90) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_GATHER) - EVT_ADD(LVar2, 10) - EVT_CALL(N(StarRodAppearEffect), LVar0, LVar1, LVar2, EVT_FLOAT(2.5), EVT_FLOAT(0.05)) - EVT_END_THREAD - EVT_ELSE - EVT_ADD(LVar0, 6) - EVT_ADD(LVar1, 36) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_GATHER) - EVT_ADD(LVar2, 10) - EVT_CALL(N(StarRodAppearEffect), LVar0, LVar1, LVar2, EVT_FLOAT(2.5), EVT_FLOAT(0.02)) - EVT_END_THREAD - EVT_END_IF - EVT_WAIT(65) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, 15) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_LIGHT_RAYS, 2, LVar0, 90, LVar2, EVT_FLOAT(1.0), LVarF, 0) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, 90, LVar2, EVT_FLOAT(1.0), LVarE, 0) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, 90, LVar2, EVT_FLOAT(1.0), LVarD, 0) - EVT_ELSE - EVT_ADD(LVar0, 6) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_LIGHT_RAYS, 2, LVar0, 36, LVar2, EVT_FLOAT(0.4), LVarF, 0) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, 36, LVar2, EVT_FLOAT(0.4), LVarE, 0) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, 36, LVar2, EVT_FLOAT(0.4), LVarD, 0) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_USE) - EVT_WAIT(30) - EVT_CALL(RemoveEffect, LVarF) - EVT_CALL(RemoveEffect, LVarE) - EVT_CALL(RemoveEffect, LVarD) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ENCHANTED, TRUE) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 1, ACTOR_DECORATION_RADIAL_STAR_EMITTER) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(BoostedDefense))) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(BoostedStatusTable))) - EVT_CALL(N(RemoveChillOut)) - EVT_WAIT(3) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 40) - EVT_ADD(LVar2, 12) - EVT_PLAY_EFFECT(EFFECT_STARS_SHIMMER, 3, LVar0, LVar1, LVar2, 70, 80, 25, 60, 0) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 16) - EVT_ADD(LVar2, 12) - EVT_PLAY_EFFECT(EFFECT_STARS_SHIMMER, 3, LVar0, LVar1, LVar2, 28, 32, 10, 60, 0) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_ENCHANT) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(N(StarRodPowerUpEffect), LVar0, LVar1, LVar2, EVT_FLOAT(0.8)) - EVT_END_THREAD - EVT_WAIT(75) - EVT_THREAD - EVT_CALL(N(FadeBackgroundLighten)) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_RearUpLaugh) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 40) - EVT_ELSE - EVT_ADD(LVar1, 16) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 15, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_SHOCKWAVE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 15) - EVT_ADD(LVar1, 65) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 400) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 32) - EVT_WAIT(32) - EVT_RETURN - EVT_END + Call(N(FadeBackgroundDarken)) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar0, 15) + Add(LVar1, 90) + Thread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_GATHER) + Add(LVar2, 10) + Call(N(StarRodAppearEffect), LVar0, LVar1, LVar2, Float(2.5), Float(0.05)) + EndThread + Else + Add(LVar0, 6) + Add(LVar1, 36) + Thread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_GATHER) + Add(LVar2, 10) + Call(N(StarRodAppearEffect), LVar0, LVar1, LVar2, Float(2.5), Float(0.02)) + EndThread + EndIf + Wait(65) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar0, 15) + Sub(LVar2, 3) + PlayEffect(EFFECT_LIGHT_RAYS, 2, LVar0, 90, LVar2, Float(1.0), LVarF, 0) + PlayEffect(EFFECT_BULB_GLOW, 2, LVar0, 90, LVar2, Float(1.0), LVarE, 0) + Sub(LVar2, 3) + PlayEffect(EFFECT_BULB_GLOW, 2, LVar0, 90, LVar2, Float(1.0), LVarD, 0) + Else + Add(LVar0, 6) + Sub(LVar2, 3) + PlayEffect(EFFECT_LIGHT_RAYS, 2, LVar0, 36, LVar2, Float(0.4), LVarF, 0) + PlayEffect(EFFECT_BULB_GLOW, 2, LVar0, 36, LVar2, Float(0.4), LVarE, 0) + Sub(LVar2, 3) + PlayEffect(EFFECT_BULB_GLOW, 2, LVar0, 36, LVar2, Float(0.4), LVarD, 0) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_USE) + Wait(30) + Call(RemoveEffect, LVarF) + Call(RemoveEffect, LVarE) + Call(RemoveEffect, LVarD) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ENCHANTED, TRUE) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 1, ACTOR_DECORATION_RADIAL_STAR_EMITTER) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(BoostedDefense))) + Call(SetStatusTable, ACTOR_SELF, Ref(N(BoostedStatusTable))) + Call(N(RemoveChillOut)) + Wait(3) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 40) + Add(LVar2, 12) + PlayEffect(EFFECT_STARS_SHIMMER, 3, LVar0, LVar1, LVar2, 70, 80, 25, 60, 0) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 16) + Add(LVar2, 12) + PlayEffect(EFFECT_STARS_SHIMMER, 3, LVar0, LVar1, LVar2, 28, 32, 10, 60, 0) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_ENCHANT) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(N(StarRodPowerUpEffect), LVar0, LVar1, LVar2, Float(0.8)) + EndThread + Wait(75) + Thread + Call(N(FadeBackgroundLighten)) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_RearUpLaugh) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar1, 40) + Else + Add(LVar1, 16) + EndIf + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, Float(1.0), 15, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOWSER_STAR_ROD_SHOCKWAVE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 15) + Add(LVar1, 65) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 400) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 32) + Wait(32) + Return + End }; EvtScript N(EVS_ShockReaction) = { - EVT_IF_NE(LVar1, -1) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar2, LVar3, LVar4) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar5, LVar6, LVar7) - EVT_SET(LVar8, LVar2) - EVT_ADD(LVar8, LVar5) - EVT_DIV(LVar8, 2) - EVT_SET(LVar9, LVar4) - EVT_ADD(LVar9, LVar7) - EVT_DIV(LVar9, 2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar8, 0, LVar9) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_ADD(LVar8, LVar2) - EVT_DIV(LVar8, 2) - EVT_ADD(LVar9, LVar4) - EVT_DIV(LVar9, 2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar8, 0, LVar9) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar2, LVar3, LVar4) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_RETURN - EVT_END + IfNe(LVar1, -1) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.4)) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar2, LVar3, LVar4) + Call(GetActorPos, ACTOR_SELF, LVar5, LVar6, LVar7) + Set(LVar8, LVar2) + Add(LVar8, LVar5) + Div(LVar8, 2) + Set(LVar9, LVar4) + Add(LVar9, LVar7) + Div(LVar9, 2) + Call(SetGoalPos, ACTOR_SELF, LVar8, 0, LVar9) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Add(LVar8, LVar2) + Div(LVar8, 2) + Add(LVar9, LVar4) + Div(LVar9, 2) + Call(SetGoalPos, ACTOR_SELF, LVar8, 0, LVar9) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar2, LVar3, LVar4) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Return + End }; EvtScript N(EVS_PlayFootstepSounds) = { - EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar7) - EVT_IF_NE(LVar7, ANIM_BattleBowser_Walk) - EVT_IF_EQ(LVar3, ANIM_BattleBowser_Walk) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_B) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) - EVT_END_IF - EVT_SET(LVar3, LVar7) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar5, LVar6, LVar7) - EVT_SUB(LVar5, LVar0) - EVT_IF_GT(LVar5, -30) - EVT_IF_LT(LVar5, 30) - EVT_SET(LVar3, LVar7) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_B) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) - EVT_SET(LVar3, LVar7) - EVT_RETURN - EVT_END + Call(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar7) + IfNe(LVar7, ANIM_BattleBowser_Walk) + IfEq(LVar3, ANIM_BattleBowser_Walk) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_B) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) + EndIf + Set(LVar3, LVar7) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Return + EndIf + Call(GetActorPos, ACTOR_SELF, LVar5, LVar6, LVar7) + Sub(LVar5, LVar0) + IfGt(LVar5, -30) + IfLt(LVar5, 30) + Set(LVar3, LVar7) + Return + EndIf + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_B) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_C) + Set(LVar3, LVar7) + Return + End }; diff --git a/src/battle/area/kpa2/actor/unused_bowser.c b/src/battle/area/kpa2/actor/unused_bowser.c index 8fe35737aca..c32a011e985 100644 --- a/src/battle/area/kpa2/actor/unused_bowser.c +++ b/src/battle/area/kpa2/actor/unused_bowser.c @@ -118,512 +118,512 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_DamageMultiplier, 1) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_DamageMultiplier, 1) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastElement, LVarE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_OnHit)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_OnHit)) - EVT_CASE_OR_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_OnDeath)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_OnHit)) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_OnDeath)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_OnDeath)) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_SET(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_OnHit)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIKE_TAUNT) - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(N(EVS_OnDeath)) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_30) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(1000) - EVT_CASE_DEFAULT - EVT_SET_CONST(LVar1, ANIM_BattleBowser_Hurt) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_WAIT(20) - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastElement, LVarE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + Set(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_OnHit)) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + Set(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_OnHit)) + CaseOrEq(EVENT_BURN_DEATH) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_OnDeath)) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + Set(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_OnHit)) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_OnDeath)) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(EVS_Enemy_ShockHit) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_OnDeath)) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + Set(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_OnHit)) + EndCaseGroup + CaseEq(EVENT_SPIKE_TAUNT) + CaseEq(EVENT_DEATH) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(N(EVS_OnDeath)) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_30) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBowser_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(1000) + CaseDefault + SetConst(LVar1, ANIM_BattleBowser_Hurt) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) + Wait(20) + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_OnHit) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_Hit) + Return + End }; EvtScript N(EVS_OnDeath) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_Hit) + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_Death) + Return + End }; EvtScript N(EVS_TakeTurn) = { // only use regular attacks for the first few turns - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) - EVT_ADD(LVar0, 1) - EVT_IF_LT(LVar0, 5) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, 5) - EVT_EXEC_WAIT(N(EVS_UseAttack)) - EVT_RETURN - EVT_END_IF + Call(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) + Add(LVar0, 1) + IfLt(LVar0, 5) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, 5) + ExecWait(N(EVS_UseAttack)) + Return + EndIf // increment shockwave turn counter - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, LVar0) - EVT_ADD(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, LVar0) + Add(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, LVar0) // use normal attack if shockwave was used recently - EVT_IF_LT(LVar0, 4) - EVT_EXEC_WAIT(N(EVS_UseAttack)) - EVT_RETURN - EVT_END_IF + IfLt(LVar0, 4) + ExecWait(N(EVS_UseAttack)) + Return + EndIf // use shockwave if it hasn't been used recently - EVT_IF_GT(LVar0, 6) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, 0) - EVT_EXEC_WAIT(N(EVS_UseDrainingShockwave)) - EVT_RETURN - EVT_END_IF + IfGt(LVar0, 6) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, 0) + ExecWait(N(EVS_UseDrainingShockwave)) + Return + EndIf // use shockwave if HP is low, even if it hasn't met the normal time threshold - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_IF_LT(LVar0, 8) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, 0) - EVT_EXEC_WAIT(N(EVS_UseDrainingShockwave)) - EVT_RETURN - EVT_END_IF + Call(GetActorHP, ACTOR_SELF, LVar0) + IfLt(LVar0, 8) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnsSinceShockwave, 0) + ExecWait(N(EVS_UseDrainingShockwave)) + Return + EndIf // fallback to using a regular attack - EVT_EXEC_WAIT(N(EVS_UseAttack)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_UseAttack)) + Return + End }; EvtScript N(EVS_UseAttack) = { - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_STATIC) - EVT_EXEC_WAIT(N(EVS_Attack_FireBreath)) - EVT_RETURN - EVT_END_IF - EVT_CALL(RandInt, 2, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_Attack_ClawSwipe)) - EVT_RETURN - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_Attack_BodySlam)) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(N(EVS_Attack_FireBreath)) - EVT_RETURN - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfFlag(LVar0, STATUS_FLAG_STATIC) + ExecWait(N(EVS_Attack_FireBreath)) + Return + EndIf + Call(RandInt, 2, LVar0) + Switch(LVar0) + CaseEq(0) + ExecWait(N(EVS_Attack_ClawSwipe)) + Return + CaseEq(1) + ExecWait(N(EVS_Attack_BodySlam)) + Return + CaseDefault + ExecWait(N(EVS_Attack_FireBreath)) + Return + EndSwitch + Return + End }; EvtScript N(EVS_Attack_ClawSwipe) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 150) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 40) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Walk) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 40, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_RearUpMock) - EVT_WAIT(25) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Swipe) - EVT_WAIT(3) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Tantrum) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_WAIT(50) - EVT_ELSE - EVT_WAIT(30) - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_SET(LVar1, ANIM_BattleBowser_Walk) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_DamageMultiplier, LVar0) - EVT_MUL(LVar0, DMG_CLAW_SWIPE) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Mock) - EVT_WAIT(45) - EVT_IF_EQ(LVarF, HIT_RESULT_10) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_SET(LVar1, ANIM_BattleBowser_Walk) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 150) + Call(SetBattleCamOffsetZ, 0) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 40) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Walk) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 40, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_RearUpMock) + Wait(25) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Swipe) + Wait(3) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Tantrum) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + Wait(50) + Else + Wait(30) + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Set(LVar1, ANIM_BattleBowser_Walk) + ExecWait(N(EVS_ReturnHome)) + Return + EndCaseGroup + CaseDefault + EndSwitch + Call(GetActorVar, ACTOR_SELF, AVAR_DamageMultiplier, LVar0) + Mul(LVar0, DMG_CLAW_SWIPE) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Mock) + Wait(45) + IfEq(LVarF, HIT_RESULT_10) + Return + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Set(LVar1, ANIM_BattleBowser_Walk) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_BodySlam) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 150) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 40) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Walk) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 80, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PreJump) - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Jump) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 28, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(3.0)) - EVT_END_THREAD - EVT_SUB(LVar0, 35) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 14, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(2.0)) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(25) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_SET(LVar1, ANIM_BattleBowser_Walk) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(JumpToGoal, ACTOR_SELF, 24, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(3.0)) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Land) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_DamageMultiplier, LVar0) - EVT_MUL(LVar0, DMG_BODY_SLAM) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(3.0)) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(20) - EVT_IF_EQ(LVarF, HIT_RESULT_10) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_SET(LVar1, ANIM_BattleBowser_Walk) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 150) + Call(SetBattleCamOffsetZ, 0) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 40) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Walk) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 80, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PreJump) + Wait(3) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Jump) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 28, FALSE, TRUE, FALSE) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(3.0)) + EndThread + Sub(LVar0, 35) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 14, FALSE, TRUE, FALSE) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(2.0)) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) + Wait(3) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(25) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Set(LVar1, ANIM_BattleBowser_Walk) + ExecWait(N(EVS_ReturnHome)) + Return + EndCaseGroup + CaseDefault + EndSwitch + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(JumpToGoal, ACTOR_SELF, 24, FALSE, TRUE, FALSE) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(3.0)) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Land) + Call(GetActorVar, ACTOR_SELF, AVAR_DamageMultiplier, LVar0) + Mul(LVar0, DMG_BODY_SLAM) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(3.0)) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostJump) + Wait(3) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(20) + IfEq(LVarF, HIT_RESULT_10) + Return + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Set(LVar1, ANIM_BattleBowser_Walk) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_FireBreath) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 150) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 40) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PreFireBreath) - EVT_WAIT(35) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_FireBreathStill) - EVT_WAIT(10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 70) - EVT_ADD(LVar1, 35) - EVT_ADD(LVar2, 10) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 40) - EVT_SET(LVar4, 20) - EVT_PLAY_EFFECT(EFFECT_FIRE_BREATH, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 50, 1, 24, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 100) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_FireBreathLoop) - EVT_WAIT(30) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostFireBreath) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Tantrum) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(30) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_DamageMultiplier, LVar0) - EVT_MUL(LVar0, DMG_FIRE_BREATH) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_FIRE, SUPPRESS_EVENT_ALL, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostFireBreath) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(30) - EVT_IF_EQ(LVarF, HIT_RESULT_10) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 150) + Call(SetBattleCamOffsetZ, 0) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 40) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PreFireBreath) + Wait(35) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_FireBreathStill) + Wait(10) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 70) + Add(LVar1, 35) + Add(LVar2, 10) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Sub(LVar3, 40) + Set(LVar4, 20) + PlayEffect(EFFECT_FIRE_BREATH, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 50, 1, 24, 0) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 100) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_FireBreathLoop) + Wait(30) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostFireBreath) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Tantrum) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(30) + Return + EndCaseGroup + CaseDefault + EndSwitch + Call(GetActorVar, ACTOR_SELF, AVAR_DamageMultiplier, LVar0) + Mul(LVar0, DMG_FIRE_BREATH) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_FIRE, SUPPRESS_EVENT_ALL, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_PostFireBreath) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(30) + IfEq(LVarF, HIT_RESULT_10) + Return + EndIf + EndCaseGroup + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/FadeBackgroundDarken.inc.c" #include "common/FadeBackgroundLighten.inc.c" EvtScript N(EVS_UseDrainingShockwave) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) - EVT_WAIT(10) - EVT_CALL(N(FadeBackgroundDarken)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 15) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_LIGHT_RAYS, 2, LVar0, 90, LVar2, EVT_FLOAT(1.0), LVarF, 0) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, 90, LVar2, EVT_FLOAT(1.0), LVarE, 0) - EVT_WAIT(16) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 45) - EVT_WAIT(19) - EVT_CALL(RemoveEffect, LVarF) - EVT_CALL(RemoveEffect, LVarE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 13) - EVT_SET(LVar1, 55) - EVT_PLAY_EFFECT(EFFECT_ENERGY_SHOCKWAVE, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 60, 0) - EVT_THREAD - EVT_CALL(N(FadeBackgroundLighten)) - EVT_END_THREAD - EVT_WAIT(8) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(HIT_RESULT_MISS) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(15) - EVT_EXEC_WAIT(N(EVS_Recover)) - EVT_WAIT(30) - EVT_RETURN - EVT_CASE_EQ(HIT_RESULT_LUCKY) - EVT_CALL(FreezeBattleState, TRUE) - EVT_THREAD - EVT_WAIT(2) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC, 0, 0, DMG_SHOCKWAVE_P, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(15) - EVT_EXEC_WAIT(N(EVS_Recover)) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(30) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(FreezeBattleState, TRUE) - EVT_THREAD - EVT_WAIT(2) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC, 0, 0, DMG_SHOCKWAVE_P, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC, 0, STATUS_FLAG_POISON, DMG_SHOCKWAVE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(RemovePlayerBuffs, PLAYER_BUFF_JUMP_CHARGE | PLAYER_BUFF_HAMMER_CHARGE | PLAYER_BUFF_STONE | PLAYER_BUFF_HUSTLE | PLAYER_BUFF_STATIC | PLAYER_BUFF_TRANSPARENT | PLAYER_BUFF_CLOUD_NINE | PLAYER_BUFF_TURBO_CHARGE | PLAYER_BUFF_WATER_BLOCK | PLAYER_BUFF_PARTNER_GLOWING | 0xFFEFC04) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) - EVT_WAIT(15) - EVT_EXEC_WAIT(N(EVS_Recover)) - EVT_IF_EQ(LVarF, HIT_RESULT_10) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_PRESET_13) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Brandish) + Wait(10) + Call(N(FadeBackgroundDarken)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 15) + Sub(LVar2, 3) + PlayEffect(EFFECT_LIGHT_RAYS, 2, LVar0, 90, LVar2, Float(1.0), LVarF, 0) + Sub(LVar2, 3) + PlayEffect(EFFECT_BULB_GLOW, 2, LVar0, 90, LVar2, Float(1.0), LVarE, 0) + Wait(16) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 45) + Wait(19) + Call(RemoveEffect, LVarF) + Call(RemoveEffect, LVarE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 13) + Set(LVar1, 55) + PlayEffect(EFFECT_ENERGY_SHOCKWAVE, 0, LVar0, LVar1, LVar2, Float(1.0), 60, 0) + Thread + Call(N(FadeBackgroundLighten)) + EndThread + Wait(8) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseEq(HIT_RESULT_MISS) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(15) + ExecWait(N(EVS_Recover)) + Wait(30) + Return + CaseEq(HIT_RESULT_LUCKY) + Call(FreezeBattleState, TRUE) + Thread + Wait(2) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC, 0, 0, DMG_SHOCKWAVE_P, BS_FLAGS1_TRIGGER_EVENTS) + Call(FreezeBattleState, FALSE) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(15) + ExecWait(N(EVS_Recover)) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(30) + Return + CaseDefault + EndSwitch + Call(FreezeBattleState, TRUE) + Thread + Wait(2) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC, 0, 0, DMG_SHOCKWAVE_P, BS_FLAGS1_TRIGGER_EVENTS) + Call(FreezeBattleState, FALSE) + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_COSMIC, 0, STATUS_FLAG_POISON, DMG_SHOCKWAVE, BS_FLAGS1_TRIGGER_EVENTS) + Call(RemovePlayerBuffs, PLAYER_BUFF_JUMP_CHARGE | PLAYER_BUFF_HAMMER_CHARGE | PLAYER_BUFF_STONE | PLAYER_BUFF_HUSTLE | PLAYER_BUFF_STATIC | PLAYER_BUFF_TRANSPARENT | PLAYER_BUFF_CLOUD_NINE | PLAYER_BUFF_TURBO_CHARGE | PLAYER_BUFF_WATER_BLOCK | PLAYER_BUFF_PARTNER_GLOWING | 0xFFEFC04) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBowser_Idle) + Wait(15) + ExecWait(N(EVS_Recover)) + IfEq(LVarF, HIT_RESULT_10) + Return + EndIf + EndCaseGroup + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_SET(LVar0, 1) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVarD, LVarE, LVarF) - EVT_IF_LT(LVarA, LVarD) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_ELSE - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_END_IF - EVT_CALL(GetDist2D, LVar9, LVarA, LVarC, LVarD, LVarF) - EVT_IF_GE(LVar9, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_END_IF - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_RETURN - EVT_END + Set(LVar0, 1) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVarD, LVarE, LVarF) + IfLt(LVarA, LVarD) + Call(SetActorYaw, ACTOR_SELF, 180) + Else + Call(SetActorYaw, ACTOR_SELF, 0) + EndIf + Call(GetDist2D, LVar9, LVarA, LVarC, LVarD, LVarF) + IfGe(LVar9, Float(4.0)) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + EndIf + Call(SetActorYaw, ACTOR_SELF, 0) + Return + End }; EvtScript N(EVS_Recover) = { - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_ADD(LVar2, 60) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar1, LVar2, LVar3, EVT_FLOAT(1.0), 0) - EVT_ADD(LVar1, 30) - EVT_ADD(LVar2, 20) - EVT_PLAY_EFFECT(EFFECT_RECOVER, 0, LVar1, LVar2, LVar3, 10, 0) - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_ADD(LVar0, 10) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar1) - EVT_IF_GT(LVar0, LVar1) - EVT_SET(LVar0, LVar1) - EVT_END_IF - EVT_CALL(SetEnemyHP, ACTOR_SELF, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_DamageMultiplier, LVar0) - EVT_ADD(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_DamageMultiplier, LVar0) - EVT_RETURN - EVT_END + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Add(LVar2, 60) + PlayEffect(EFFECT_SPARKLES, 0, LVar1, LVar2, LVar3, Float(1.0), 0) + Add(LVar1, 30) + Add(LVar2, 20) + PlayEffect(EFFECT_RECOVER, 0, LVar1, LVar2, LVar3, 10, 0) + Call(GetActorHP, ACTOR_SELF, LVar0) + Add(LVar0, 10) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar1) + IfGt(LVar0, LVar1) + Set(LVar0, LVar1) + EndIf + Call(SetEnemyHP, ACTOR_SELF, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_DamageMultiplier, LVar0) + Add(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_DamageMultiplier, LVar0) + Return + End }; diff --git a/src/battle/area/kpa4/actor/bombshell_bill.c b/src/battle/area/kpa4/actor/bombshell_bill.c index 2c397efbcf5..8f97eadedff 100644 --- a/src/battle/area/kpa4/actor/bombshell_bill.c +++ b/src/battle/area/kpa4/actor/bombshell_bill.c @@ -103,214 +103,214 @@ s32 N(DefaultAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_FiredFromBlaster, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 16) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_ELSE - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_BlasterID, LVar0) - EVT_CALL(GetActorPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(GetStatusFlags, LVar0, LVar4) - EVT_IF_FLAG(LVar4, STATUS_FLAG_SHRINK) - EVT_SET(LVar5, -13) - EVT_SET(LVar6, 4) - EVT_ELSE - EVT_SET(LVar5, -33) - EVT_SET(LVar6, 11) - EVT_END_IF - EVT_ADD(LVar1, LVar5) - EVT_ADD(LVar2, LVar6) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_CALL(CopyStatusEffects, LVar0, ACTOR_SELF) - EVT_CALL(CopyBuffs, LVar0, ACTOR_SELF) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(GetActorPos, LVar0, LVar1, LVarB, LVarC) - EVT_SUB(LVar1, 90) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.01)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BulletBill_Gold_Tense) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BulletBill_Gold_Idle) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(GetActorVar, ACTOR_SELF, AVAR_FiredFromBlaster, LVar0) + IfEq(LVar0, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 16) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Else + Call(GetActorVar, ACTOR_SELF, AVAR_BlasterID, LVar0) + Call(GetActorPos, LVar0, LVar1, LVar2, LVar3) + Call(GetStatusFlags, LVar0, LVar4) + IfFlag(LVar4, STATUS_FLAG_SHRINK) + Set(LVar5, -13) + Set(LVar6, 4) + Else + Set(LVar5, -33) + Set(LVar6, 11) + EndIf + Add(LVar1, LVar5) + Add(LVar2, LVar6) + Call(SetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Call(CopyStatusEffects, LVar0, ACTOR_SELF) + Call(CopyBuffs, LVar0, ACTOR_SELF) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(GetActorPos, LVar0, LVar1, LVarB, LVarC) + Sub(LVar1, 90) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.01)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BulletBill_Gold_Tense) + Call(SetGoalPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BulletBill_Gold_Idle) + Call(ForceHomePos, ACTOR_SELF, LVar1, LVar2, LVar3) + Call(HPBarToHome, ACTOR_SELF) + EndIf + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_Explode) = { - EVT_EXEC_WAIT(N(EVS_MakeExplosionFX)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BulletBill_Gold_BurnHurt) - EVT_SET(LVar2, EXEC_DEATH_NO_SPINNING) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END + ExecWait(N(EVS_MakeExplosionFX)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BulletBill_Gold_BurnHurt) + Set(LVar2, EXEC_DEATH_NO_SPINNING) + ExecWait(EVS_Enemy_Death) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BulletBill_Gold_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BulletBill_Gold_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BulletBill_Gold_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BulletBill_Gold_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BulletBill_Gold_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BulletBill_Gold_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_RETURN - EVT_CASE_EQ(EVENT_EXPLODE_TRIGGER) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BulletBill_Gold_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BulletBill_Gold_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BulletBill_Gold_Tense) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BulletBill_Gold_Tense) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BulletBill_Gold_Hurt) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BulletBill_Gold_Hurt) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_BURN_HIT) + ExecWait(N(EVS_Explode)) + Return + CaseEq(EVENT_BURN_DEATH) + ExecWait(N(EVS_Explode)) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + ExecWait(N(EVS_Explode)) + Return + CaseEq(EVENT_SPIN_SMASH_DEATH) + ExecWait(N(EVS_Explode)) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BulletBill_Gold_Hurt) + ExecWait(EVS_Enemy_ShockHit) + ExecWait(N(EVS_Explode)) + Return + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BulletBill_Gold_Hurt) + ExecWait(EVS_Enemy_ShockHit) + ExecWait(N(EVS_Explode)) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BulletBill_Gold_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BulletBill_Gold_Hurt) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_Explode)) + Return + CaseEq(EVENT_EXPLODE_TRIGGER) + ExecWait(N(EVS_Explode)) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BulletBill_Gold_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BulletBill_Gold_Hurt) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_Explode)) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BulletBill_Gold_Tense) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BulletBill_Gold_Tense) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BulletBill_Gold_Fire) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPresetImmediately, BTL_CAM_PRESET_19) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 6, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar1) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SET(LVar1, LVar3) - EVT_SUB(LVar0, 90) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.01)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar1) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SET(LVar1, LVar3) - EVT_ADD(LVar0, 10) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.01)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) - EVT_EXEC_WAIT(N(EVS_MakeExplosionFX)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, DMG_IMPACT, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BulletBill_Gold_BurnHurt) - EVT_SET(LVar2, EXEC_DEATH_NO_SPINNING) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BulletBill_Gold_Fire) + Call(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(15) + Call(UseBattleCamPresetImmediately, BTL_CAM_PRESET_19) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 6, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar3, LVar1) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Set(LVar1, LVar3) + Sub(LVar0, 90) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.01)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(HideHealthBar, ACTOR_SELF) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(RemoveActor, ACTOR_SELF) + Return + EndCaseGroup + EndSwitch + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar3, LVar1) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Set(LVar1, LVar3) + Add(LVar0, 10) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.01)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) + ExecWait(N(EVS_MakeExplosionFX)) + Call(SetGoalToTarget, ACTOR_SELF) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, DMG_IMPACT, BS_FLAGS1_TRIGGER_EVENTS) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BulletBill_Gold_BurnHurt) + Set(LVar2, EXEC_DEATH_NO_SPINNING) + ExecWait(EVS_Enemy_Death) + Return + End }; EvtScript N(EVS_MakeExplosionFX) = { - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_RING, 0, LVar0, LVar1, LVar2, 0) - EVT_ADD(LVar1, 16) - EVT_ADD(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_BLAST, 0, LVar0, LVar1, LVar2, EVT_FLOAT(3.0), 30, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BULLET_BILL_EXPLODE_A) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_MAX) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar2, 2) + PlayEffect(EFFECT_SMOKE_RING, 0, LVar0, LVar1, LVar2, 0) + Add(LVar1, 16) + Add(LVar2, 2) + PlayEffect(EFFECT_BLAST, 0, LVar0, LVar1, LVar2, Float(3.0), 30, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BULLET_BILL_EXPLODE_A) + Call(StartRumble, BTL_RUMBLE_PLAYER_MAX) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + EndThread + Return + End }; diff --git a/src/battle/area/kpa4/actor/bombshell_blaster.c b/src/battle/area/kpa4/actor/bombshell_blaster.c index 9fdbdfb813a..af853050d46 100644 --- a/src/battle/area/kpa4/actor/bombshell_blaster.c +++ b/src/battle/area/kpa4/actor/bombshell_blaster.c @@ -105,95 +105,95 @@ s32 N(DefaultAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasBullet, FALSE) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_HasBullet, FALSE) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BillBlaster_Gold_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BillBlaster_Gold_Hurt) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BillBlaster_Gold_Hurt) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BillBlaster_Gold_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BillBlaster_Gold_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BillBlaster_Gold_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BillBlaster_Gold_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BillBlaster_Gold_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BillBlaster_Gold_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BillBlaster_Gold_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BillBlaster_Gold_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BillBlaster_Gold_Hurt) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BillBlaster_Gold_Hurt) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BillBlaster_Gold_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BillBlaster_Gold_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BillBlaster_Gold_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BillBlaster_Gold_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BillBlaster_Gold_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BillBlaster_Gold_Hurt) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BillBlaster_Gold_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HasBullet, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_Move_FireBullet)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_Move_CheckForBullet)) - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetActorVar, ACTOR_SELF, AVAR_HasBullet, LVar0) + Switch(LVar0) + CaseEq(0) + ExecWait(N(EVS_Move_FireBullet)) + CaseEq(1) + ExecWait(N(EVS_Move_CheckForBullet)) + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; API_CALLABLE(N(SetBulletInitVars)) { @@ -204,36 +204,36 @@ API_CALLABLE(N(SetBulletInitVars)) { } EvtScript N(EVS_Move_FireBullet) = { - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BillBlaster_Gold_Fire) - EVT_WAIT(13) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BULLET_BILL_FIRE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 33) - EVT_ADD(LVar1, 19) - EVT_ADD(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_00, LVar0, LVar1, LVar2, 2, 5, 0, 2, 0) - EVT_PLAY_EFFECT(EFFECT_00, LVar0, LVar1, LVar2, 2, 5, 2, 2, 0) - EVT_WAIT(2) - EVT_CALL(N(SetBulletInitVars)) - EVT_CALL(SummonEnemy, EVT_PTR(N(BombshellFormation)), FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_BulletID, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasBullet, TRUE) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BillBlaster_Gold_Fire) + Wait(13) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.0)) + EndThread + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BULLET_BILL_FIRE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 33) + Add(LVar1, 19) + Add(LVar2, 3) + PlayEffect(EFFECT_00, LVar0, LVar1, LVar2, 2, 5, 0, 2, 0) + PlayEffect(EFFECT_00, LVar0, LVar1, LVar2, 2, 5, 2, 2, 0) + Wait(2) + Call(N(SetBulletInitVars)) + Call(SummonEnemy, Ref(N(BombshellFormation)), FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_BulletID, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_HasBullet, TRUE) + Return + End }; EvtScript N(EVS_Move_CheckForBullet) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_BulletID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasBullet, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_BulletID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_HasBullet, FALSE) + EndIf + Return + End }; Vec3i N(SummonPos) = { NPC_DISPOSE_LOCATION }; diff --git a/src/battle/area/kzn2/actor/lava_bud.c b/src/battle/area/kzn2/actor/lava_bud.c index 2e0ec245a5b..614dfeb4dae 100644 --- a/src/battle/area/kzn2/actor/lava_bud.c +++ b/src/battle/area/kzn2/actor/lava_bud.c @@ -53,12 +53,12 @@ BSS u8 Vine0Base[0x4000]; #define VINE_2_BASE (s32) Vine2Base #define EVT_LOAD_BUD_ANIM(whichVine, anim) \ - EVT_IF_EQ(whichVine, VINE_1) \ - EVT_CALL(OverrideBattleDmaDest, VINE_1_BASE) \ - EVT_ELSE \ - EVT_CALL(OverrideBattleDmaDest, VINE_2_BASE) \ - EVT_END_IF \ - EVT_CALL(LoadBattleDmaData, anim) + IfEq(whichVine, VINE_1) \ + Call(OverrideBattleDmaDest, VINE_1_BASE) \ + Else \ + Call(OverrideBattleDmaDest, VINE_2_BASE) \ + EndIf \ + Call(LoadBattleDmaData, anim) s32 N(DefaultAnims)[] = { STATUS_KEY_NORMAL, ANIM_LavaBud_Anim03, @@ -181,378 +181,378 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_USE_ARRAY(N(unusedArray)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, PIRANHA_STATE_STUNNED) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_FlameEffect, NULL) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Bud_PetitCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SummonDelayTurns, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_StunTurnsLeft, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_NextTwitchTime, 0) - EVT_CALL(RandInt, 20, LVar0) - EVT_ADD(LVar0, 15) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_NextTwitchTime, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim1, ANIM_LavaBud_Anim03) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, ANIM_LavaBud_Anim09) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + UseArray(N(unusedArray)) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, PIRANHA_STATE_STUNNED) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_FlameEffect, NULL) + Call(SetActorVar, ACTOR_SELF, AVAR_Bud_PetitCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_SummonDelayTurns, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_StunTurnsLeft, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_NextTwitchTime, 0) + Call(RandInt, 20, LVar0) + Add(LVar0, 15) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_NextTwitchTime, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim1, ANIM_LavaBud_Anim03) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, ANIM_LavaBud_Anim09) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetActorHP, ACTOR_BOSS, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(99) - EVT_END_IF - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, ACTOR_FLAG_NO_DMG_APPLY) - EVT_GOTO(99) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) - EVT_IF_NE(LVar0, PIRANHA_STATE_DEAD) - EVT_GOTO(99) - EVT_END_IF - EVT_LABEL(10) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_NextTwitchTime, LVar0) - EVT_SUB(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_NextTwitchTime, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_GOTO(99) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_NextTwitchMode, LVar0) - EVT_ADD(LVar0, 1) - EVT_IF_GE(LVar0, 3) - EVT_SET(LVar0, 0) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_NextTwitchMode, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(RandInt, 50, LVar0) - EVT_ADD(LVar0, 25) - EVT_CASE_EQ(1) - EVT_CALL(RandInt, 40, LVar0) - EVT_ADD(LVar0, 20) - EVT_CASE_DEFAULT - EVT_CALL(RandInt, 3, LVar0) - EVT_ADD(LVar0, 3) - EVT_END_SWITCH - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_NextTwitchTime, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) + Label(0) + Call(GetActorHP, ACTOR_BOSS, LVar0) + IfEq(LVar0, 0) + Goto(99) + EndIf + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, ACTOR_FLAG_NO_DMG_APPLY) + Goto(99) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) + IfNe(LVar0, PIRANHA_STATE_DEAD) + Goto(99) + EndIf + Label(10) + Call(GetActorVar, ACTOR_SELF, AVAR_Common_NextTwitchTime, LVar0) + Sub(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_NextTwitchTime, LVar0) + IfNe(LVar0, 0) + Goto(99) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Common_NextTwitchMode, LVar0) + Add(LVar0, 1) + IfGe(LVar0, 3) + Set(LVar0, 0) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_Common_NextTwitchMode, LVar0) + Switch(LVar0) + CaseEq(0) + Call(RandInt, 50, LVar0) + Add(LVar0, 25) + CaseEq(1) + Call(RandInt, 40, LVar0) + Add(LVar0, 20) + CaseDefault + Call(RandInt, 3, LVar0) + Add(LVar0, 3) + EndSwitch + Call(SetActorVar, ACTOR_SELF, AVAR_Common_NextTwitchTime, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_TWITCH) - EVT_EXEC_WAIT(N(EVS_PlayAnimForVine)) - EVT_LABEL(99) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + ExecWait(N(EVS_PlayAnimForVine)) + Label(99) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_PlayAnimForVine) = { - EVT_IF_EQ(LVar0, VINE_1) - EVT_CALL(PlayModelAnimation, LVar0, VINE_1_BASE) - EVT_ELSE - EVT_CALL(PlayModelAnimation, LVar0, VINE_2_BASE) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(LVar0, VINE_1) + Call(PlayModelAnimation, LVar0, VINE_1_BASE) + Else + Call(PlayModelAnimation, LVar0, VINE_2_BASE) + EndIf + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) - EVT_CALL(SetAnimatorFlags, LVar0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 0) - EVT_CALL(GetLastElement, LVarE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_EXEC_WAIT(N(EVS_ComboHit)) - EVT_CASE_EQ(EVENT_HIT) - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_IF_FLAG(LVarE, DAMAGE_TYPE_FIRE) - EVT_EXEC_WAIT(N(EVS_BurnHit)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_END_IF - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_CASE_EQ(EVENT_ZERO_DAMAGE) - EVT_IF_NOT_FLAG(LVarE, DAMAGE_TYPE_FIRE) - EVT_EXEC_WAIT(N(EVS_ComboHit)) - EVT_END_IF - EVT_CASE_EQ(EVENT_IMMUNE) - EVT_IF_NOT_FLAG(LVarE, DAMAGE_TYPE_FIRE) - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_END_IF - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CASE_EQ(EVENT_SPIKE_TAUNT) - EVT_CASE_EQ(EVENT_DEATH) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) - EVT_CALL(SetAnimatorFlags, LVar0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 0) - EVT_CASE_EQ(EVENT_30) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(1000) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_STOP) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) - EVT_CALL(SetAnimatorFlags, LVar0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 1) - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) + Call(SetAnimatorFlags, LVar0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 0) + Call(GetLastElement, LVarE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + CaseEq(EVENT_HIT_COMBO) + ExecWait(N(EVS_ComboHit)) + CaseEq(EVENT_HIT) + ExecWait(N(EVS_Hit)) + CaseEq(EVENT_BURN_HIT) + IfFlag(LVarE, DAMAGE_TYPE_FIRE) + ExecWait(N(EVS_BurnHit)) + Else + ExecWait(N(EVS_Hit)) + EndIf + CaseEq(EVENT_BURN_DEATH) + ExecWait(N(EVS_Death)) + CaseEq(EVENT_SPIN_SMASH_HIT) + ExecWait(N(EVS_Hit)) + CaseEq(EVENT_SPIN_SMASH_DEATH) + ExecWait(N(EVS_Death)) + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, LVar1) + ExecWait(EVS_Enemy_ShockHit) + CaseEq(EVENT_SHOCK_DEATH) + ExecWait(EVS_Enemy_ShockHit) + CaseEq(EVENT_ZERO_DAMAGE) + IfNotFlag(LVarE, DAMAGE_TYPE_FIRE) + ExecWait(N(EVS_ComboHit)) + EndIf + CaseEq(EVENT_IMMUNE) + IfNotFlag(LVarE, DAMAGE_TYPE_FIRE) + ExecWait(N(EVS_Hit)) + EndIf + CaseEq(EVENT_AIR_LIFT_FAILED) + CaseEq(EVENT_SPIKE_TAUNT) + CaseEq(EVENT_DEATH) + ExecWait(N(EVS_Death)) + CaseEq(EVENT_END_FIRST_STRIKE) + CaseEq(EVENT_RECOVER_STATUS) + Call(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) + Call(SetAnimatorFlags, LVar0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 0) + CaseEq(EVENT_30) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, LVar1) + ExecWait(EVS_Enemy_Hit) + Wait(1000) + CaseDefault + EndSwitch + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_STOP) + Call(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) + Call(SetAnimatorFlags, LVar0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 1) + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_BurnHit) = { - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(GetActorVar, ACTOR_BOSS, AVAR_Boss_IsSecondPhase, LVar0) - EVT_IF_FALSE(LVar0) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar2) - EVT_IF_EQ(LVar2, PIRANHA_STATE_FIERY) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) - EVT_IF_EQ(LVar0, VINE_1) - EVT_SET(LVar0, ACTOR_BUD_1) - EVT_ELSE - EVT_SET(LVar0, ACTOR_BUD_2) - EVT_END_IF - EVT_EXEC_WAIT(A(lava_piranha_EVS_Ignite)) - EVT_LABEL(10) - EVT_END_THREAD - EVT_CALL(GetActorVar, ACTOR_BOSS, AVAR_Boss_IsSecondPhase, LVar0) - EVT_IF_TRUE(LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) - EVT_IF_EQ(LVar0, PIRANHA_STATE_DEAD) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) + Thread + Wait(1) + Call(GetActorVar, ACTOR_BOSS, AVAR_Boss_IsSecondPhase, LVar0) + IfFalse(LVar0) + Goto(10) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar2) + IfEq(LVar2, PIRANHA_STATE_FIERY) + Goto(10) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) + IfEq(LVar0, VINE_1) + Set(LVar0, ACTOR_BUD_1) + Else + Set(LVar0, ACTOR_BUD_2) + EndIf + ExecWait(A(lava_piranha_EVS_Ignite)) + Label(10) + EndThread + Call(GetActorVar, ACTOR_BOSS, AVAR_Boss_IsSecondPhase, LVar0) + IfTrue(LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) + IfEq(LVar0, PIRANHA_STATE_DEAD) + Call(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_RECOVER) - EVT_EXEC_WAIT(N(EVS_PlayAnimForVine)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim1, ANIM_LavaBud_Anim03) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, ANIM_LavaBud_Anim09) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(FieryAnims))) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(FieryDefense))) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_TARGET, EVT_PTR(N(FieryDefense))) - EVT_THREAD - EVT_WAIT(14) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) + ExecWait(N(EVS_PlayAnimForVine)) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim1, ANIM_LavaBud_Anim03) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, ANIM_LavaBud_Anim09) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(FieryAnims))) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(FieryDefense))) + Call(SetDefenseTable, ACTOR_SELF, PRT_TARGET, Ref(N(FieryDefense))) + Thread + Wait(14) + Call(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_IDLE) - EVT_EXEC_WAIT(N(EVS_PlayAnimForVine)) - EVT_END_THREAD - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + ExecWait(N(EVS_PlayAnimForVine)) + EndThread + EndIf + EndIf + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, ACTOR_FLAG_NO_DMG_APPLY) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_BOSS, AVAR_Boss_IsSecondPhase, LVar0) - EVT_IF_FALSE(LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) - EVT_IF_EQ(LVar0, PIRANHA_STATE_DEAD) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_Attack_SpitPetit)) - EVT_ELSE - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_SummonDelayTurns, LVar1) - EVT_IF_NE(LVar1, 0) - EVT_SUB(LVar1, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SummonDelayTurns, LVar1) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) - EVT_IF_EQ(LVar0, PIRANHA_STATE_FIERY) - EVT_IF_NE(LVar1, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SummonDelayTurns, 1) - EVT_EXEC_WAIT(N(EVS_Move_SummonPetit)) - EVT_ELSE - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_StunTurnsLeft, LVar0) - EVT_SUB(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_StunTurnsLeft, LVar0) - EVT_IF_LE(LVar0, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) - EVT_IF_EQ(LVar0, VINE_1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 40, 30, 0) - EVT_CALL(SetBattleCamZoom, 270) - EVT_CALL(SetBattleCamOffsetZ, 20) - EVT_CALL(MoveBattleCamOver, 30) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 110, 35, 0) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(SetBattleCamOffsetZ, 20) - EVT_CALL(MoveBattleCamOver, 30) - EVT_END_IF - EVT_WAIT(30) - EVT_LOOP(10) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, ACTOR_FLAG_NO_DMG_APPLY) + Return + EndIf + Call(GetActorVar, ACTOR_BOSS, AVAR_Boss_IsSecondPhase, LVar0) + IfFalse(LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) + IfEq(LVar0, PIRANHA_STATE_DEAD) + Return + EndIf + ExecWait(N(EVS_Attack_SpitPetit)) + Else + Call(GetActorVar, ACTOR_SELF, AVAR_SummonDelayTurns, LVar1) + IfNe(LVar1, 0) + Sub(LVar1, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_SummonDelayTurns, LVar1) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) + IfEq(LVar0, PIRANHA_STATE_FIERY) + IfNe(LVar1, 0) + Return + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_SummonDelayTurns, 1) + ExecWait(N(EVS_Move_SummonPetit)) + Else + Call(GetActorVar, ACTOR_SELF, AVAR_Common_StunTurnsLeft, LVar0) + Sub(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_StunTurnsLeft, LVar0) + IfLe(LVar0, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) + IfEq(LVar0, VINE_1) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 40, 30, 0) + Call(SetBattleCamZoom, 270) + Call(SetBattleCamOffsetZ, 20) + Call(MoveBattleCamOver, 30) + Else + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 110, 35, 0) + Call(SetBattleCamZoom, 300) + Call(SetBattleCamOffsetZ, 20) + Call(MoveBattleCamOver, 30) + EndIf + Wait(30) + Loop(10) EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_TWITCH) - EVT_EXEC_WAIT(N(EVS_PlayAnimForVine)) - EVT_WAIT(4) - EVT_END_LOOP - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 15) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar0) - EVT_CALL(SetEnemyHP, ACTOR_SELF, LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBud_Anim04) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) - EVT_IF_EQ(LVar0, VINE_1) - EVT_SET(LVar0, ACTOR_BUD_1) - EVT_ELSE - EVT_SET(LVar0, ACTOR_BUD_2) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, LVar0, SOUND_LAVA_BUD_RECOVER) - EVT_EXEC_WAIT(A(lava_piranha_EVS_Ignite)) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) + ExecWait(N(EVS_PlayAnimForVine)) + Wait(4) + EndLoop + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 15) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar0) + Call(SetEnemyHP, ACTOR_SELF, LVar0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBud_Anim04) + Call(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) + IfEq(LVar0, VINE_1) + Set(LVar0, ACTOR_BUD_1) + Else + Set(LVar0, ACTOR_BUD_2) + EndIf + Call(PlaySoundAtActor, LVar0, SOUND_LAVA_BUD_RECOVER) + ExecWait(A(lava_piranha_EVS_Ignite)) + Call(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_RECOVER) - EVT_EXEC_WAIT(N(EVS_PlayAnimForVine)) - EVT_WAIT(14) + ExecWait(N(EVS_PlayAnimForVine)) + Wait(14) EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_IDLE) - EVT_EXEC_WAIT(N(EVS_PlayAnimForVine)) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar0) - EVT_CALL(SetEnemyHP, ACTOR_SELF, LVar0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_PlayIdleAnimation)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_PlayAnimForVine)) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar0) + Call(SetEnemyHP, ACTOR_SELF, LVar0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + EndIf + EndIf + EndIf + ExecWait(N(EVS_PlayIdleAnimation)) + Return + End }; EvtScript N(EVS_PlayIdleAnimation) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim1, LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) - EVT_CALL(GetActorVar, ACTOR_BOSS, AVAR_Boss_IsSecondPhase, LVar3) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar3) - EVT_IF_EQ(LVar3, PIRANHA_STATE_DEAD) + Call(GetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim1, LVar0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) + Call(GetActorVar, ACTOR_BOSS, AVAR_Boss_IsSecondPhase, LVar3) + Call(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar3) + IfEq(LVar3, PIRANHA_STATE_DEAD) EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_TWITCH) - EVT_EXEC_WAIT(N(EVS_PlayAnimForVine)) - EVT_ELSE + ExecWait(N(EVS_PlayAnimForVine)) + Else EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_IDLE) - EVT_EXEC_WAIT(N(EVS_PlayAnimForVine)) - EVT_END_IF - EVT_RETURN - EVT_END + ExecWait(N(EVS_PlayAnimForVine)) + EndIf + Return + End }; EvtScript N(EVS_Move_SummonPetit) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) - EVT_IF_EQ(LVar0, PIRANHA_STATE_DEAD) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Bud_PetitCount, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(8) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(SetBattleCamOffsetZ, 30) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(45) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_END_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) + IfEq(LVar0, PIRANHA_STATE_DEAD) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Bud_PetitCount, LVar0) + IfNe(LVar0, 0) + Return + EndIf + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Wait(8) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 300) + Call(SetBattleCamOffsetZ, 30) + Call(MoveBattleCamOver, 30) + Wait(45) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + EndThread + Call(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_ATTACK) - EVT_EXEC_WAIT(N(EVS_PlayAnimForVine)) - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBud_Anim07) - EVT_WAIT(34) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBud_Anim08) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBud_Anim04) + ExecWait(N(EVS_PlayAnimForVine)) + Thread + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBud_Anim07) + Wait(34) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBud_Anim08) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBud_Anim04) EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_IDLE) - EVT_EXEC_WAIT(N(EVS_PlayAnimForVine)) - EVT_END_THREAD - EVT_WAIT(56) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SummonEnemy, EVT_PTR(N(LeftPetitFormation)), FALSE) - EVT_ELSE - EVT_CALL(SummonEnemy, EVT_PTR(N(RightPetitFormation)), FALSE) - EVT_END_IF - EVT_SET(LVar5, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Bud_PetitCount, LVar0) - EVT_ADD(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Bud_PetitCount, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) - EVT_IF_EQ(LVar0, VINE_1) - EVT_CALL(SetActorVar, LVar5, AVAR_Petit_Parent, ACTOR_BUD_1) - EVT_ELSE - EVT_CALL(SetActorVar, LVar5, AVAR_Petit_Parent, ACTOR_BUD_2) - EVT_END_IF - EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_MAIN, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 15) - EVT_SUB(LVar1, 15) - EVT_CALL(SetActorPos, LVar5, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_SUB(LVar1, 15) - EVT_CALL(PlaySoundAtActor, LVar5, SOUND_LAVA_BUD_SPIT_PETIT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar9) - EVT_IF_EQ(LVar9, VINE_1) - EVT_CALL(GetActorPos, LVar5, LVar0, LVar1, LVar2) - EVT_SET(LVar0, -12) - EVT_SET(LVar1, 80) - EVT_CALL(SetGoalPos, LVar5, LVar0, LVar1, LVar2) - EVT_CALL(SetHomePos, LVar5, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, LVar5, EVT_FLOAT(4.0)) - EVT_CALL(SetActorJumpGravity, LVar5, EVT_FLOAT(1.0)) - EVT_CALL(FlyToGoal, LVar5, 24, -42, EASING_QUARTIC_OUT) - EVT_ELSE - EVT_CALL(GetActorPos, LVar5, LVar0, LVar1, LVar2) - EVT_SET(LVar0, 18) - EVT_SET(LVar1, 28) - EVT_CALL(SetGoalPos, LVar5, LVar0, LVar1, LVar2) - EVT_CALL(SetHomePos, LVar5, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, LVar5, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, LVar5, EVT_FLOAT(1.2)) - EVT_CALL(FlyToGoal, LVar5, 16, -15, EASING_CUBIC_OUT) - EVT_END_IF - EVT_CALL(HPBarToHome, LVar5) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) + ExecWait(N(EVS_PlayAnimForVine)) + EndThread + Wait(56) + IfEq(LVar0, 1) + Call(SummonEnemy, Ref(N(LeftPetitFormation)), FALSE) + Else + Call(SummonEnemy, Ref(N(RightPetitFormation)), FALSE) + EndIf + Set(LVar5, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_Bud_PetitCount, LVar0) + Add(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_Bud_PetitCount, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) + IfEq(LVar0, VINE_1) + Call(SetActorVar, LVar5, AVAR_Petit_Parent, ACTOR_BUD_1) + Else + Call(SetActorVar, LVar5, AVAR_Petit_Parent, ACTOR_BUD_2) + EndIf + Call(GetPartOffset, ACTOR_SELF, PRT_MAIN, LVar0, LVar1, LVar2) + Sub(LVar0, 15) + Sub(LVar1, 15) + Call(SetActorPos, LVar5, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Sub(LVar1, 15) + Call(PlaySoundAtActor, LVar5, SOUND_LAVA_BUD_SPIT_PETIT) + Call(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar9) + IfEq(LVar9, VINE_1) + Call(GetActorPos, LVar5, LVar0, LVar1, LVar2) + Set(LVar0, -12) + Set(LVar1, 80) + Call(SetGoalPos, LVar5, LVar0, LVar1, LVar2) + Call(SetHomePos, LVar5, LVar0, LVar1, LVar2) + Call(SetActorSpeed, LVar5, Float(4.0)) + Call(SetActorJumpGravity, LVar5, Float(1.0)) + Call(FlyToGoal, LVar5, 24, -42, EASING_QUARTIC_OUT) + Else + Call(GetActorPos, LVar5, LVar0, LVar1, LVar2) + Set(LVar0, 18) + Set(LVar1, 28) + Call(SetGoalPos, LVar5, LVar0, LVar1, LVar2) + Call(SetHomePos, LVar5, LVar0, LVar1, LVar2) + Call(SetActorSpeed, LVar5, Float(5.0)) + Call(SetActorJumpGravity, LVar5, Float(1.2)) + Call(FlyToGoal, LVar5, 16, -15, EASING_CUBIC_OUT) + EndIf + Call(HPBarToHome, LVar5) + Call(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_IDLE) - EVT_EXEC_WAIT(N(EVS_PlayAnimForVine)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + ExecWait(N(EVS_PlayAnimForVine)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; Vec3i N(SummonPos) = { 260, 0, 0 }; @@ -570,229 +570,229 @@ Formation N(PetitBombFormation) = { }; EvtScript N(EVS_Death) = { - EVT_CALL(GetActorVar, ACTOR_BOSS, AVAR_Boss_IsSecondPhase, LVar0) - EVT_IF_TRUE(LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) - EVT_IF_EQ(LVar0, PIRANHA_STATE_DEAD) - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) + Call(GetActorVar, ACTOR_BOSS, AVAR_Boss_IsSecondPhase, LVar0) + IfTrue(LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) + IfEq(LVar0, PIRANHA_STATE_DEAD) + ExecWait(N(EVS_Hit)) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, LVar0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_HEAVY_HIT) - EVT_EXEC_WAIT(N(EVS_PlayAnimForVine)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_StunTurnsLeft, 2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_FlameEffect, LVar0) - EVT_IF_NE(LVar0, NULL) - EVT_CALL(RemoveEffect, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_FlameEffect, NULL) - EVT_END_IF - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(StunnedAnims))) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(StunnedDefense))) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_TARGET, EVT_PTR(N(StunnedDefense))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim1, ANIM_LavaBud_Anim0F) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, ANIM_LavaBud_Anim09) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBud_Anim0F) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FIREY, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_TARGET, ACTOR_EVENT_FLAG_FIREY, FALSE) - EVT_WAIT(29) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LAVA_BUD_WITHER) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) + ExecWait(N(EVS_PlayAnimForVine)) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_StunTurnsLeft, 2) + Call(GetActorVar, ACTOR_SELF, AVAR_Common_FlameEffect, LVar0) + IfNe(LVar0, NULL) + Call(RemoveEffect, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_FlameEffect, NULL) + EndIf + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(StunnedAnims))) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(StunnedDefense))) + Call(SetDefenseTable, ACTOR_SELF, PRT_TARGET, Ref(N(StunnedDefense))) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim1, ANIM_LavaBud_Anim0F) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, ANIM_LavaBud_Anim09) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBud_Anim0F) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FIREY, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_TARGET, ACTOR_EVENT_FLAG_FIREY, FALSE) + Wait(29) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LAVA_BUD_WITHER) + Call(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_STUN) - EVT_EXEC_WAIT(N(EVS_PlayAnimForVine)) - EVT_WAIT(14) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, PIRANHA_STATE_DEAD) - EVT_CALL(GetActorVar, ACTOR_BOSS, AVAR_Boss_Dying, LVarF) - EVT_IF_EQ(LVarF, 0) - EVT_EXEC_WAIT(N(EVS_PlayIdleAnimation)) - EVT_END_IF - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) - EVT_IF_EQ(LVar0, PIRANHA_STATE_STUNNED) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) + ExecWait(N(EVS_PlayAnimForVine)) + Wait(14) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, PIRANHA_STATE_DEAD) + Call(GetActorVar, ACTOR_BOSS, AVAR_Boss_Dying, LVarF) + IfEq(LVarF, 0) + ExecWait(N(EVS_PlayIdleAnimation)) + EndIf + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) + IfEq(LVar0, PIRANHA_STATE_STUNNED) + Call(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_HEAVY_HIT) - EVT_EXEC_WAIT(N(EVS_PlayAnimForVine)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(StunnedAnims))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim1, ANIM_LavaBud_Anim0F) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, ANIM_LavaBud_Anim09) - EVT_WAIT(29) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LAVA_BUD_WITHER) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) + ExecWait(N(EVS_PlayAnimForVine)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(StunnedAnims))) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim1, ANIM_LavaBud_Anim0F) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, ANIM_LavaBud_Anim09) + Wait(29) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LAVA_BUD_WITHER) + Call(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_STUN) - EVT_EXEC_WAIT(N(EVS_PlayAnimForVine)) - EVT_WAIT(14) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, PIRANHA_STATE_DEAD) - EVT_EXEC_WAIT(N(EVS_PlayIdleAnimation)) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_TARGET, ACTOR_PART_FLAG_DAMAGE_IMMUNE | ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_HEALTH_BAR, TRUE) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + ExecWait(N(EVS_PlayAnimForVine)) + Wait(14) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, PIRANHA_STATE_DEAD) + ExecWait(N(EVS_PlayIdleAnimation)) + Call(SetPartFlagBits, ACTOR_SELF, PRT_TARGET, ACTOR_PART_FLAG_DAMAGE_IMMUNE | ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_HEALTH_BAR, TRUE) + Else + ExecWait(N(EVS_Hit)) + Return + EndIf + Return + End }; EvtScript N(EVS_ComboHit) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) - EVT_CALL(GetActorVar, ACTOR_BOSS, AVAR_Boss_IsSecondPhase, LVar1) - EVT_IF_FALSE(LVar1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar5) - EVT_IF_NE(LVar5, PIRANHA_STATE_DEAD) - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar5) - EVT_IF_LT(LVar5, 4) + Call(GetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, LVar0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) + Call(GetActorVar, ACTOR_BOSS, AVAR_Boss_IsSecondPhase, LVar1) + IfFalse(LVar1) + Call(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar5) + IfNe(LVar5, PIRANHA_STATE_DEAD) + Call(GetLastDamage, ACTOR_SELF, LVar5) + IfLt(LVar5, 4) EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_LIGHT_HIT) - EVT_ELSE + Else EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_HEAVY_HIT) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_PlayAnimForVine)) - EVT_WAIT(29) - EVT_ELSE - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar5) - EVT_IF_LT(LVar5, 4) + EndIf + ExecWait(N(EVS_PlayAnimForVine)) + Wait(29) + Else + Call(GetLastDamage, ACTOR_SELF, LVar5) + IfLt(LVar5, 4) EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_STUNNED_LIGHT_HIT) - EVT_ELSE + Else EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_STUNNED_HEAVY_HIT) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_PlayAnimForVine)) - EVT_WAIT(29) - EVT_END_IF - EVT_ELSE - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar5) - EVT_IF_EQ(LVar5, PIRANHA_STATE_FIERY) - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar5) - EVT_IF_LT(LVar5, 4) + EndIf + ExecWait(N(EVS_PlayAnimForVine)) + Wait(29) + EndIf + Else + Call(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar5) + IfEq(LVar5, PIRANHA_STATE_FIERY) + Call(GetLastDamage, ACTOR_SELF, LVar5) + IfLt(LVar5, 4) EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_LIGHT_HIT) - EVT_ELSE + Else EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_HEAVY_HIT) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_PlayAnimForVine)) - EVT_WAIT(29) - EVT_ELSE - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar5) - EVT_IF_LT(LVar5, 4) + EndIf + ExecWait(N(EVS_PlayAnimForVine)) + Wait(29) + Else + Call(GetLastDamage, ACTOR_SELF, LVar5) + IfLt(LVar5, 4) EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_STUNNED_LIGHT_HIT) - EVT_ELSE + Else EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_STUNNED_HEAVY_HIT) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_PlayAnimForVine)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_SUB(LVar2, 25) - EVT_ADD(LVar3, 2) - EVT_PLAY_EFFECT(EFFECT_EMBERS, 0, LVar1, LVar2, LVar3, 40, 50, EVT_FLOAT(1.2), 24, 42, EVT_FLOAT(0.8), EVT_FLOAT(0.6), 0) - EVT_WAIT(29) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + EndIf + ExecWait(N(EVS_PlayAnimForVine)) + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Sub(LVar2, 25) + Add(LVar3, 2) + PlayEffect(EFFECT_EMBERS, 0, LVar1, LVar2, LVar3, 40, 50, Float(1.2), 24, 42, Float(0.8), Float(0.6), 0) + Wait(29) + EndIf + EndIf + Return + End }; EvtScript N(EVS_Hit) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) - EVT_CALL(GetActorVar, ACTOR_BOSS, AVAR_Boss_IsSecondPhase, LVar5) - EVT_IF_FALSE(LVar5) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar5) - EVT_IF_EQ(LVar5, PIRANHA_STATE_STUNNED) - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar5) - EVT_IF_LT(LVar5, 4) + Call(GetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, LVar0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) + Call(GetActorVar, ACTOR_BOSS, AVAR_Boss_IsSecondPhase, LVar5) + IfFalse(LVar5) + Call(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar5) + IfEq(LVar5, PIRANHA_STATE_STUNNED) + Call(GetLastDamage, ACTOR_SELF, LVar5) + IfLt(LVar5, 4) EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_LIGHT_HIT) - EVT_ELSE + Else EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_HEAVY_HIT) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_PlayAnimForVine)) - EVT_WAIT(29) - EVT_ELSE - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar5) - EVT_IF_LT(LVar5, 4) + EndIf + ExecWait(N(EVS_PlayAnimForVine)) + Wait(29) + Else + Call(GetLastDamage, ACTOR_SELF, LVar5) + IfLt(LVar5, 4) EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_STUNNED_LIGHT_HIT) - EVT_ELSE + Else EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_STUNNED_HEAVY_HIT) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_PlayAnimForVine)) - EVT_WAIT(29) - EVT_END_IF - EVT_ELSE - EVT_IF_FLAG(LVarE, DAMAGE_TYPE_ICE | DAMAGE_TYPE_WATER) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar3) - EVT_IF_EQ(LVar3, PIRANHA_STATE_DEAD) - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar5) - EVT_IF_LT(LVar5, 4) + EndIf + ExecWait(N(EVS_PlayAnimForVine)) + Wait(29) + EndIf + Else + IfFlag(LVarE, DAMAGE_TYPE_ICE | DAMAGE_TYPE_WATER) + Call(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar3) + IfEq(LVar3, PIRANHA_STATE_DEAD) + Call(GetLastDamage, ACTOR_SELF, LVar5) + IfLt(LVar5, 4) EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_STUNNED_LIGHT_HIT) - EVT_ELSE + Else EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_STUNNED_HEAVY_HIT) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_PlayAnimForVine)) - EVT_WAIT(29) - EVT_ELSE + EndIf + ExecWait(N(EVS_PlayAnimForVine)) + Wait(29) + Else EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_HEAVY_HIT) - EVT_EXEC_WAIT(N(EVS_PlayAnimForVine)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_StunTurnsLeft, 2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_FlameEffect, LVar0) - EVT_IF_NE(LVar0, NULL) - EVT_CALL(RemoveEffect, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_FlameEffect, NULL) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_COLD_BREATH, 0, LVar0, LVar1, LVar2, EVT_FLOAT(2.0), 45, 0) - EVT_END_IF - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(StunnedAnims))) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(StunnedDefense))) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_TARGET, EVT_PTR(N(StunnedDefense))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim1, ANIM_LavaBud_Anim0F) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, ANIM_LavaBud_Anim09) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBud_Anim0F) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FIREY, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_TARGET, ACTOR_EVENT_FLAG_FIREY, FALSE) - EVT_WAIT(29) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LAVA_BUD_WITHER) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) + ExecWait(N(EVS_PlayAnimForVine)) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_StunTurnsLeft, 2) + Call(GetActorVar, ACTOR_SELF, AVAR_Common_FlameEffect, LVar0) + IfNe(LVar0, NULL) + Call(RemoveEffect, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_FlameEffect, NULL) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_COLD_BREATH, 0, LVar0, LVar1, LVar2, Float(2.0), 45, 0) + EndIf + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(StunnedAnims))) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(StunnedDefense))) + Call(SetDefenseTable, ACTOR_SELF, PRT_TARGET, Ref(N(StunnedDefense))) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim1, ANIM_LavaBud_Anim0F) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, ANIM_LavaBud_Anim09) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBud_Anim0F) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FIREY, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_TARGET, ACTOR_EVENT_FLAG_FIREY, FALSE) + Wait(29) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LAVA_BUD_WITHER) + Call(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_STUN) - EVT_EXEC_WAIT(N(EVS_PlayAnimForVine)) - EVT_WAIT(14) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, PIRANHA_STATE_DEAD) - EVT_END_IF - EVT_ELSE - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar3) - EVT_IF_EQ(LVar3, PIRANHA_STATE_DEAD) - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar5) - EVT_IF_EQ(LVar5, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar5) - EVT_IF_LT(LVar5, 4) + ExecWait(N(EVS_PlayAnimForVine)) + Wait(14) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, PIRANHA_STATE_DEAD) + EndIf + Else + Call(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar3) + IfEq(LVar3, PIRANHA_STATE_DEAD) + Call(GetLastDamage, ACTOR_SELF, LVar5) + IfEq(LVar5, 0) + Return + EndIf + Call(GetLastDamage, ACTOR_SELF, LVar5) + IfLt(LVar5, 4) EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_STUNNED_LIGHT_HIT) - EVT_ELSE + Else EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_STUNNED_HEAVY_HIT) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_PlayAnimForVine)) - EVT_WAIT(29) - EVT_ELSE - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar5) - EVT_IF_LT(LVar5, 4) + EndIf + ExecWait(N(EVS_PlayAnimForVine)) + Wait(29) + Else + Call(GetLastDamage, ACTOR_SELF, LVar5) + IfLt(LVar5, 4) EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_LIGHT_HIT) - EVT_ELSE + Else EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_HEAVY_HIT) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_PlayAnimForVine)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_SUB(LVar2, 25) - EVT_ADD(LVar3, 2) - EVT_PLAY_EFFECT(EFFECT_EMBERS, 0, LVar1, LVar2, LVar3, 40, 50, EVT_FLOAT(1.2), 24, 42, EVT_FLOAT(0.8), EVT_FLOAT(0.6), 0) - EVT_WAIT(29) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_BOSS, AVAR_Boss_Dying, LVarF) - EVT_IF_EQ(LVarF, 0) - EVT_EXEC_WAIT(N(EVS_PlayIdleAnimation)) - EVT_END_IF - EVT_RETURN - EVT_END + EndIf + ExecWait(N(EVS_PlayAnimForVine)) + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Sub(LVar2, 25) + Add(LVar3, 2) + PlayEffect(EFFECT_EMBERS, 0, LVar1, LVar2, LVar3, 40, 50, Float(1.2), 24, 42, Float(0.8), Float(0.6), 0) + Wait(29) + EndIf + EndIf + EndIf + Call(GetActorVar, ACTOR_BOSS, AVAR_Boss_Dying, LVarF) + IfEq(LVarF, 0) + ExecWait(N(EVS_PlayIdleAnimation)) + EndIf + Return + End }; API_CALLABLE(N(SetPetitFlameSize)) { @@ -806,110 +806,110 @@ API_CALLABLE(N(SetPetitFlameSize)) { } EvtScript N(EVS_Attack_SpitPetit) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_THREAD - EVT_WAIT(8) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 25) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 350) - EVT_CALL(SetBattleCamOffsetZ, 30) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(45) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_END_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Thread + Wait(8) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 25) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 350) + Call(SetBattleCamOffsetZ, 30) + Call(MoveBattleCamOver, 30) + Wait(45) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + EndThread + Call(GetActorVar, ACTOR_SELF, AVAR_Bud_WhichVine, LVar0) EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_ATTACK) - EVT_EXEC_WAIT(N(EVS_PlayAnimForVine)) - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBud_Anim05) - EVT_WAIT(39) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBud_Anim06) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBud_Anim03) + ExecWait(N(EVS_PlayAnimForVine)) + Thread + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBud_Anim05) + Wait(39) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBud_Anim06) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBud_Anim03) EVT_LOAD_BUD_ANIM(LVar0, VINE_ANIM_BUD_IDLE) - EVT_EXEC_WAIT(N(EVS_PlayAnimForVine)) - EVT_END_THREAD - EVT_WAIT(56) - EVT_CALL(SummonEnemy, EVT_PTR(N(PetitBombFormation)), FALSE) - EVT_SET(LVar5, LVar0) - EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_MAIN, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 15) - EVT_SUB(LVar1, 15) - EVT_CALL(SetActorPos, LVar5, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_SUB(LVar1, 15) - EVT_CALL(SetAnimation, LVar5, 1, ANIM_PetitPiranha_Anim05) - EVT_CALL(SetGoalPos, LVar5, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, LVar5, EVT_FLOAT(6.0)) - EVT_CALL(SetActorJumpGravity, LVar5, EVT_FLOAT(1.8)) - EVT_CALL(PlaySoundAtActor, LVar5, SOUND_PETIT_PIRANHA_DIVE) - EVT_CALL(SetTargetActor, LVar5, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, LVar5) - EVT_CALL(EnemyTestTarget, LVar5, LVar9, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar9) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(SetGoalToTarget, LVar5) - EVT_CALL(GetGoalPos, LVar5, LVar0, LVar1, LVar2) - EVT_SET(LVar0, -180) - EVT_CALL(SetGoalPos, LVar5, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, LVar5, EVT_FLOAT(13.0)) - EVT_CALL(SetActorJumpGravity, LVar5, EVT_FLOAT(1.8)) - EVT_CALL(FlyToGoal, LVar5, 0, 0, EASING_LINEAR) - EVT_IF_EQ(LVar9, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, LVar5, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(RemoveActor, LVar5) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetTargetActor, LVar5, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, LVar5) - EVT_CALL(SetActorSpeed, LVar5, EVT_FLOAT(13.0)) - EVT_CALL(SetActorJumpGravity, LVar5, EVT_FLOAT(1.8)) - EVT_CALL(FlyToGoal, LVar5, 0, 0, EASING_LINEAR) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, LVar5) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar9, DAMAGE_TYPE_FIRE, SUPPRESS_EVENT_ALL, 0, DMG_PETIT_SPIT, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar9) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_CALL(SetPartFlagBits, LVar5, 1, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetGoalToTarget, LVar5) - EVT_CALL(GetGoalPos, LVar5, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 10) - EVT_ADD(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_SMALL_BLUE, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), LVarA, 0) - EVT_CALL(MakeLerp, 120, 10, 20, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_MULF(LVar0, EVT_FLOAT(0.01)) - EVT_CALL(N(SetPetitFlameSize), LVarA, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(1) - EVT_CALL(RemoveEffect, LVarA) - EVT_CALL(RemoveActor, LVar5) - EVT_WAIT(15) - EVT_IF_EQ(LVar9, 10) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + ExecWait(N(EVS_PlayAnimForVine)) + EndThread + Wait(56) + Call(SummonEnemy, Ref(N(PetitBombFormation)), FALSE) + Set(LVar5, LVar0) + Call(GetPartOffset, ACTOR_SELF, PRT_MAIN, LVar0, LVar1, LVar2) + Sub(LVar0, 15) + Sub(LVar1, 15) + Call(SetActorPos, LVar5, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Sub(LVar1, 15) + Call(SetAnimation, LVar5, 1, ANIM_PetitPiranha_Anim05) + Call(SetGoalPos, LVar5, LVar0, LVar1, LVar2) + Call(SetActorSpeed, LVar5, Float(6.0)) + Call(SetActorJumpGravity, LVar5, Float(1.8)) + Call(PlaySoundAtActor, LVar5, SOUND_PETIT_PIRANHA_DIVE) + Call(SetTargetActor, LVar5, ACTOR_PLAYER) + Call(SetGoalToTarget, LVar5) + Call(EnemyTestTarget, LVar5, LVar9, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar9) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(SetGoalToTarget, LVar5) + Call(GetGoalPos, LVar5, LVar0, LVar1, LVar2) + Set(LVar0, -180) + Call(SetGoalPos, LVar5, LVar0, LVar1, LVar2) + Call(SetActorSpeed, LVar5, Float(13.0)) + Call(SetActorJumpGravity, LVar5, Float(1.8)) + Call(FlyToGoal, LVar5, 0, 0, EASING_LINEAR) + IfEq(LVar9, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, LVar5, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(RemoveActor, LVar5) + Return + EndCaseGroup + EndSwitch + Call(SetTargetActor, LVar5, ACTOR_PLAYER) + Call(SetGoalToTarget, LVar5) + Call(SetActorSpeed, LVar5, Float(13.0)) + Call(SetActorJumpGravity, LVar5, Float(1.8)) + Call(FlyToGoal, LVar5, 0, 0, EASING_LINEAR) + Wait(2) + Call(SetGoalToTarget, LVar5) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar9, DAMAGE_TYPE_FIRE, SUPPRESS_EVENT_ALL, 0, DMG_PETIT_SPIT, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar9) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Call(SetPartFlagBits, LVar5, 1, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetGoalToTarget, LVar5) + Call(GetGoalPos, LVar5, LVar0, LVar1, LVar2) + Set(LVar1, 10) + Add(LVar2, 2) + PlayEffect(EFFECT_FLAME, FX_FLAME_SMALL_BLUE, LVar0, LVar1, LVar2, Float(0.3), LVarA, 0) + Call(MakeLerp, 120, 10, 20, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + MulF(LVar0, Float(0.01)) + Call(N(SetPetitFlameSize), LVarA, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(1) + Call(RemoveEffect, LVarA) + Call(RemoveActor, LVar5) + Wait(15) + IfEq(LVar9, 10) + Return + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/area/kzn2/actor/lava_piranha.c b/src/battle/area/kzn2/actor/lava_piranha.c index d176c08e6bf..414db3054be 100644 --- a/src/battle/area/kzn2/actor/lava_piranha.c +++ b/src/battle/area/kzn2/actor/lava_piranha.c @@ -551,188 +551,188 @@ static s32 N(unused); static s32 N(unusedArray)[64]; EvtScript N(EVS_Init) = { - EVT_USE_ARRAY(N(unusedArray)) - EVT_CALL(EnableGroup, MODEL_mae, TRUE) - EVT_CALL(EnableGroup, MODEL_ato, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Boss_IsSecondPhase, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, PIRANHA_STATE_STUNNED) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_FlameEffect, NULL) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_StunTurnsLeft, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_NextTwitchTime, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Boss_Dying, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Flags, 0) - EVT_SET(LVar0, 30) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_NextTwitchTime, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim1, ANIM_LavaPiranha_Anim03) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, ANIM_LavaPiranha_Anim09) - EVT_CALL(ForceHomePos, ACTOR_SELF, 61, 61, 0) - EVT_CALL(LoadAnimatedModel, VINE_0, EVT_PTR(N(AnimModel_MainHeadVine))) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_IDLE) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_CALL(SetAnimatedModelRootPosition, VINE_0, 0, 0, 0) - EVT_CALL(SetAnimatorFlags, VINE_0, MODEL_ANIMATOR_FLAG_HIDDEN, 1) - EVT_CALL(LoadAnimatedModel, VINE_1, EVT_PTR(N(AnimModel_SideHeadVine))) - EVT_CALL(OverrideBattleDmaDest, VINE_1_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BUD_IDLE) - EVT_CALL(PlayModelAnimation, VINE_1, VINE_1_BASE) - EVT_CALL(SetAnimatedModelRootPosition, VINE_1, 0, 0, 0) - EVT_CALL(SetAnimatorFlags, VINE_1, MODEL_ANIMATOR_FLAG_HIDDEN, 1) - EVT_CALL(LoadAnimatedModel, VINE_2, EVT_PTR(N(AnimModel_SideHeadVine))) - EVT_CALL(OverrideBattleDmaDest, VINE_2_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BUD_IDLE) - EVT_CALL(PlayModelAnimation, VINE_2, VINE_2_BASE) - EVT_CALL(SetAnimatedModelRootPosition, VINE_2, 50, 14, 20) - EVT_CALL(SetAnimatorFlags, VINE_2, MODEL_ANIMATOR_FLAG_HIDDEN, 1) - EVT_CALL(LoadAnimatedModel, VINE_3, EVT_PTR(N(AnimModel_ExtraVine))) - EVT_CALL(OverrideBattleDmaDest, VINE_3_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_EXTRA_IDLE) - EVT_CALL(PlayModelAnimation, VINE_3, VINE_3_BASE) - EVT_CALL(SetAnimatedModelRootPosition, VINE_3, 0, 0, 3) - EVT_CALL(SetAnimatorFlags, VINE_3, MODEL_ANIMATOR_FLAG_HIDDEN, 1) - EVT_CALL(SummonEnemy, EVT_PTR(N(LeftBudFormation)), FALSE) - EVT_CALL(SummonEnemy, EVT_PTR(N(RightBudFormation)), FALSE) - EVT_WAIT(2) - EVT_EXEC(N(EVS_InitVines)) - EVT_CALL(CreateNpc, NPC_BTL_COMPANION, ANIM_BattleKolorado_Idle) - EVT_CALL(SetNpcYaw, NPC_BTL_COMPANION, 90) - EVT_CALL(SetNpcPos, NPC_BTL_COMPANION, -300, 0, 0) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(ForceHomePos, ACTOR_BUD_1, 57, 57, 0) - EVT_CALL(ForceHomePos, ACTOR_BUD_2, 107, 71, 20) - EVT_CALL(HPBarToHome, ACTOR_BUD_1) - EVT_CALL(HPBarToHome, ACTOR_BUD_2) - EVT_CALL(N(CreateVineRenderer)) - EVT_RETURN - EVT_END + UseArray(N(unusedArray)) + Call(EnableGroup, MODEL_mae, TRUE) + Call(EnableGroup, MODEL_ato, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_Boss_IsSecondPhase, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, PIRANHA_STATE_STUNNED) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_FlameEffect, NULL) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_StunTurnsLeft, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_NextTwitchTime, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Boss_Dying, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_Flags, 0) + Set(LVar0, 30) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_NextTwitchTime, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim1, ANIM_LavaPiranha_Anim03) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, ANIM_LavaPiranha_Anim09) + Call(ForceHomePos, ACTOR_SELF, 61, 61, 0) + Call(LoadAnimatedModel, VINE_0, Ref(N(AnimModel_MainHeadVine))) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_IDLE) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Call(SetAnimatedModelRootPosition, VINE_0, 0, 0, 0) + Call(SetAnimatorFlags, VINE_0, MODEL_ANIMATOR_FLAG_HIDDEN, 1) + Call(LoadAnimatedModel, VINE_1, Ref(N(AnimModel_SideHeadVine))) + Call(OverrideBattleDmaDest, VINE_1_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BUD_IDLE) + Call(PlayModelAnimation, VINE_1, VINE_1_BASE) + Call(SetAnimatedModelRootPosition, VINE_1, 0, 0, 0) + Call(SetAnimatorFlags, VINE_1, MODEL_ANIMATOR_FLAG_HIDDEN, 1) + Call(LoadAnimatedModel, VINE_2, Ref(N(AnimModel_SideHeadVine))) + Call(OverrideBattleDmaDest, VINE_2_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BUD_IDLE) + Call(PlayModelAnimation, VINE_2, VINE_2_BASE) + Call(SetAnimatedModelRootPosition, VINE_2, 50, 14, 20) + Call(SetAnimatorFlags, VINE_2, MODEL_ANIMATOR_FLAG_HIDDEN, 1) + Call(LoadAnimatedModel, VINE_3, Ref(N(AnimModel_ExtraVine))) + Call(OverrideBattleDmaDest, VINE_3_BASE) + Call(LoadBattleDmaData, VINE_ANIM_EXTRA_IDLE) + Call(PlayModelAnimation, VINE_3, VINE_3_BASE) + Call(SetAnimatedModelRootPosition, VINE_3, 0, 0, 3) + Call(SetAnimatorFlags, VINE_3, MODEL_ANIMATOR_FLAG_HIDDEN, 1) + Call(SummonEnemy, Ref(N(LeftBudFormation)), FALSE) + Call(SummonEnemy, Ref(N(RightBudFormation)), FALSE) + Wait(2) + Exec(N(EVS_InitVines)) + Call(CreateNpc, NPC_BTL_COMPANION, ANIM_BattleKolorado_Idle) + Call(SetNpcYaw, NPC_BTL_COMPANION, 90) + Call(SetNpcPos, NPC_BTL_COMPANION, -300, 0, 0) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(ForceHomePos, ACTOR_BUD_1, 57, 57, 0) + Call(ForceHomePos, ACTOR_BUD_2, 107, 71, 20) + Call(HPBarToHome, ACTOR_BUD_1) + Call(HPBarToHome, ACTOR_BUD_2) + Call(N(CreateVineRenderer)) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(99) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_BOSS, AVAR_Boss_IsSecondPhase, LVar0) - EVT_IF_FALSE(LVar0) - EVT_GOTO(99) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) - EVT_IF_NE(LVar0, PIRANHA_STATE_STUNNED) - EVT_GOTO(99) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_NextTwitchTime, LVar0) - EVT_SUB(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_NextTwitchTime, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_GOTO(99) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_NextTwitchMode, LVar0) - EVT_ADD(LVar0, 1) - EVT_IF_GE(LVar0, 3) - EVT_SET(LVar0, 0) - EVT_END_IF - EVT_SET(LVar0, 30) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_NextTwitchTime, LVar0) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_TWITCH) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_LABEL(99) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetActorHP, ACTOR_SELF, LVar0) + IfEq(LVar0, 0) + Goto(99) + EndIf + Call(GetActorVar, ACTOR_BOSS, AVAR_Boss_IsSecondPhase, LVar0) + IfFalse(LVar0) + Goto(99) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) + IfNe(LVar0, PIRANHA_STATE_STUNNED) + Goto(99) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Common_NextTwitchTime, LVar0) + Sub(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_NextTwitchTime, LVar0) + IfNe(LVar0, 0) + Goto(99) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Common_NextTwitchMode, LVar0) + Add(LVar0, 1) + IfGe(LVar0, 3) + Set(LVar0, 0) + EndIf + Set(LVar0, 30) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_NextTwitchTime, LVar0) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_TWITCH) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Label(99) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_END) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_IsSecondPhase, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) - EVT_IF_NOT_FLAG(LVar0, AVAL_Flag_Kolorado) - EVT_BITWISE_OR_CONST(LVar0, AVAL_Flag_Kolorado) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) - EVT_EXEC_WAIT(N(EVS_Scene_KoloradoToTheRescue)) - EVT_END_IF - EVT_END_IF - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_END) + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_IsSecondPhase, LVar0) + IfEq(LVar0, TRUE) + Call(GetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) + IfNotFlag(LVar0, AVAL_Flag_Kolorado) + BitwiseOrConst(LVar0, AVAL_Flag_Kolorado) + Call(SetActorVar, ACTOR_SELF, AVAR_Flags, LVar0) + ExecWait(N(EVS_Scene_KoloradoToTheRescue)) + EndIf + EndIf + CaseDefault + EndSwitch + Return + End }; EvtScript N(EVS_Scene_KoloradoToTheRescue) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(EnableBattleStatusBar, FALSE) - EVT_CALL(SpeakToPlayer, NPC_BTL_COMPANION, -1, -1, 0, MSG_CH5_0104) - EVT_THREAD - EVT_LOOP(9) - EVT_CALL(PlaySoundAtNpc, NPC_BTL_COMPANION, SOUND_ACTOR_STEP_A, SOUND_SPACE_DEFAULT) - EVT_WAIT(2) - EVT_CALL(PlaySoundAtNpc, NPC_BTL_COMPANION, SOUND_ACTOR_STEP_B, SOUND_SPACE_DEFAULT) - EVT_WAIT(2) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_BTL_COMPANION, ANIM_BattleKolorado_WalkSad) - EVT_CALL(SetNpcAnimationSpeed, NPC_BTL_COMPANION, EVT_FLOAT(2.0)) - EVT_CALL(SetNpcSpeed, NPC_BTL_COMPANION, EVT_FLOAT(10.0)) - EVT_CALL(NpcMoveTo, NPC_BTL_COMPANION, 70, 0, 0) - EVT_CALL(PlaySoundAtNpc, NPC_BTL_COMPANION, SOUND_TOUCH_LAVA, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimationSpeed, NPC_BTL_COMPANION, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcJumpscale, NPC_BTL_COMPANION, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcAnimation, NPC_BTL_COMPANION, ANIM_BattleKolorado_Injured) - EVT_THREAD - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_BTL_COMPANION, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 20, 0) - EVT_WAIT(2) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(NpcJump0, NPC_BTL_COMPANION, 70, 180, 0, 20) - EVT_CALL(SpeakToPlayer, NPC_BTL_COMPANION, -1, -1, 0, MSG_CH5_0105) - EVT_CALL(SetNpcYaw, NPC_BTL_COMPANION, 270) - EVT_CALL(SetNpcPos, NPC_BTL_COMPANION, 50, 180, 0) - EVT_THREAD - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_BTL_COMPANION, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 20, 0) - EVT_WAIT(2) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(NpcJump0, NPC_BTL_COMPANION, 50, 0, 0, 20) - EVT_CALL(NpcJump0, NPC_BTL_COMPANION, 50, 0, 0, 6) - EVT_CALL(NpcJump0, NPC_BTL_COMPANION, 50, 0, 0, 3) - EVT_WAIT(8) - EVT_CALL(SetNpcAnimation, NPC_BTL_COMPANION, ANIM_BattleKolorado_Hurt) - EVT_CALL(SetNpcJumpscale, NPC_BTL_COMPANION, EVT_FLOAT(0.7)) - EVT_CALL(NpcJump0, NPC_BTL_COMPANION, 50, 0, 0, 12) - EVT_THREAD - EVT_LOOP(4) - EVT_CALL(PlaySoundAtNpc, NPC_BTL_COMPANION, SOUND_ACTOR_STEP_A, SOUND_SPACE_DEFAULT) - EVT_WAIT(2) - EVT_CALL(PlaySoundAtNpc, NPC_BTL_COMPANION, SOUND_ACTOR_STEP_B, SOUND_SPACE_DEFAULT) - EVT_WAIT(2) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_BTL_COMPANION, ANIM_BattleKolorado_Run) - EVT_CALL(SetNpcSpeed, NPC_BTL_COMPANION, EVT_FLOAT(8.0)) - EVT_CALL(NpcMoveTo, NPC_BTL_COMPANION, -60, 0, 0) - EVT_CALL(SpeakToPlayer, NPC_BTL_COMPANION, ANIM_BattleKolorado_Shout, ANIM_BattleKolorado_ShoutStill, 5, MSG_CH5_0106) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_RUN_AWAY) - EVT_CALL(SetNpcAnimation, NPC_BTL_COMPANION, ANIM_BattleKolorado_Run) - EVT_CALL(SetNpcSpeed, NPC_BTL_COMPANION, EVT_FLOAT(6.0)) - EVT_CALL(NpcMoveTo, NPC_BTL_COMPANION, -300, 0, 0) - EVT_CALL(EnableBattleStatusBar, TRUE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(EnableBattleStatusBar, FALSE) + Call(SpeakToPlayer, NPC_BTL_COMPANION, -1, -1, 0, MSG_CH5_0104) + Thread + Loop(9) + Call(PlaySoundAtNpc, NPC_BTL_COMPANION, SOUND_ACTOR_STEP_A, SOUND_SPACE_DEFAULT) + Wait(2) + Call(PlaySoundAtNpc, NPC_BTL_COMPANION, SOUND_ACTOR_STEP_B, SOUND_SPACE_DEFAULT) + Wait(2) + EndLoop + EndThread + Call(SetNpcAnimation, NPC_BTL_COMPANION, ANIM_BattleKolorado_WalkSad) + Call(SetNpcAnimationSpeed, NPC_BTL_COMPANION, Float(2.0)) + Call(SetNpcSpeed, NPC_BTL_COMPANION, Float(10.0)) + Call(NpcMoveTo, NPC_BTL_COMPANION, 70, 0, 0) + Call(PlaySoundAtNpc, NPC_BTL_COMPANION, SOUND_TOUCH_LAVA, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimationSpeed, NPC_BTL_COMPANION, Float(1.0)) + Call(SetNpcJumpscale, NPC_BTL_COMPANION, Float(1.0)) + Call(SetNpcAnimation, NPC_BTL_COMPANION, ANIM_BattleKolorado_Injured) + Thread + Loop(10) + Call(GetNpcPos, NPC_BTL_COMPANION, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, Float(1.0), 20, 0) + Wait(2) + EndLoop + EndThread + Call(NpcJump0, NPC_BTL_COMPANION, 70, 180, 0, 20) + Call(SpeakToPlayer, NPC_BTL_COMPANION, -1, -1, 0, MSG_CH5_0105) + Call(SetNpcYaw, NPC_BTL_COMPANION, 270) + Call(SetNpcPos, NPC_BTL_COMPANION, 50, 180, 0) + Thread + Loop(10) + Call(GetNpcPos, NPC_BTL_COMPANION, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, Float(1.0), 20, 0) + Wait(2) + EndLoop + EndThread + Call(NpcJump0, NPC_BTL_COMPANION, 50, 0, 0, 20) + Call(NpcJump0, NPC_BTL_COMPANION, 50, 0, 0, 6) + Call(NpcJump0, NPC_BTL_COMPANION, 50, 0, 0, 3) + Wait(8) + Call(SetNpcAnimation, NPC_BTL_COMPANION, ANIM_BattleKolorado_Hurt) + Call(SetNpcJumpscale, NPC_BTL_COMPANION, Float(0.7)) + Call(NpcJump0, NPC_BTL_COMPANION, 50, 0, 0, 12) + Thread + Loop(4) + Call(PlaySoundAtNpc, NPC_BTL_COMPANION, SOUND_ACTOR_STEP_A, SOUND_SPACE_DEFAULT) + Wait(2) + Call(PlaySoundAtNpc, NPC_BTL_COMPANION, SOUND_ACTOR_STEP_B, SOUND_SPACE_DEFAULT) + Wait(2) + EndLoop + EndThread + Call(SetNpcAnimation, NPC_BTL_COMPANION, ANIM_BattleKolorado_Run) + Call(SetNpcSpeed, NPC_BTL_COMPANION, Float(8.0)) + Call(NpcMoveTo, NPC_BTL_COMPANION, -60, 0, 0) + Call(SpeakToPlayer, NPC_BTL_COMPANION, ANIM_BattleKolorado_Shout, ANIM_BattleKolorado_ShoutStill, 5, MSG_CH5_0106) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_RUN_AWAY) + Call(SetNpcAnimation, NPC_BTL_COMPANION, ANIM_BattleKolorado_Run) + Call(SetNpcSpeed, NPC_BTL_COMPANION, Float(6.0)) + Call(NpcMoveTo, NPC_BTL_COMPANION, -300, 0, 0) + Call(EnableBattleStatusBar, TRUE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; API_CALLABLE(N(SetFlameProperties)) { @@ -753,424 +753,424 @@ API_CALLABLE(N(SetFlameProperties)) { } EvtScript N(EVS_InitVines) = { - EVT_USE_ARRAY(N(unusedArray)) - EVT_LABEL(0) + UseArray(N(unusedArray)) + Label(0) // --------------------------------------------------------------- // set ACTOR_BOSS position and orientation to tip of VINE_0 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_BOSS, PRT_MAIN, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) - EVT_CALL(SetPartRotation, ACTOR_BOSS, PRT_MAIN, LVar0, 0, LVar2) - EVT_CALL(N(MarkVineInterpolationDirty)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_BOSS, PRT_MAIN, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) + Call(SetPartRotation, ACTOR_BOSS, PRT_MAIN, LVar0, 0, LVar2) + Call(N(MarkVineInterpolationDirty)) // --------------------------------------------------------------- // set position and orientation for VINE_0 bones // VINE_0, bone 0 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 2) - EVT_CALL(N(SetVineBonePos), VINE_0, 0, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 90) - EVT_CALL(N(SetVineBoneRot), VINE_0, 0, LVar0, 0, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 0, 1, 1, 1) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) + Sub(LVar2, 2) + Call(N(SetVineBonePos), VINE_0, 0, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) + Add(LVar2, 90) + Call(N(SetVineBoneRot), VINE_0, 0, LVar0, 0, LVar2) + Call(N(SetVineBoneScale), VINE_0, 0, 1, 1, 1) // VINE_0, bone 1 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 1, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 1, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 1, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 1, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 1, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 1, Float(0.714), Float(0.714), Float(1.0)) // VINE_0, bone 2 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 9, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 2, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 9, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 2, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 9, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 2, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 9, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 2, Float(0.714), Float(0.714), Float(1.0)) // VINE_0, bone 3 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 3, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 3, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 3, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 3, Float(0.714), Float(0.714), Float(1.0)) // VINE_0, bone 4 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 8, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 4, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 8, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 4, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 8, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 4, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 8, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 4, Float(0.714), Float(0.714), Float(1.0)) // VINE_0, bone 5 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 5, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 5, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 5, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 5, Float(0.714), Float(0.714), Float(1.0)) // VINE_0, bone 6 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 7, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 6, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 7, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 6, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 7, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 6, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 7, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 6, Float(0.714), Float(0.714), Float(1.0)) // VINE_0, bone 7 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 7, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 7, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 7, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 7, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 7, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 7, Float(0.714), Float(0.714), Float(1.0)) // VINE_0, bone 8 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 8, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 8, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 8, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 8, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 8, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 8, Float(0.714), Float(0.714), Float(1.0)) // --------------------------------------------------------------- // set ACTOR_BUD_1 position and orientation to tip of VINE_1 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_BUD_1, PRT_MAIN, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 8) - EVT_CALL(SetPartPos, ACTOR_BUD_1, PRT_TARGET, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) - EVT_CALL(SetPartRotation, ACTOR_BUD_1, PRT_MAIN, LVar0, 0, LVar2) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_BUD_1, PRT_MAIN, LVar0, LVar1, LVar2) + Sub(LVar0, 8) + Call(SetPartPos, ACTOR_BUD_1, PRT_TARGET, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) + Call(SetPartRotation, ACTOR_BUD_1, PRT_MAIN, LVar0, 0, LVar2) // --------------------------------------------------------------- // set position and orientation for VINE_1 bones // VINE_1, bone 0 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 2) - EVT_CALL(N(SetVineBonePos), VINE_1, 0, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 90) - EVT_CALL(N(SetVineBoneRot), VINE_1, 0, LVar0, 0, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_1, 0, 1, 1, 1) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) + Sub(LVar2, 2) + Call(N(SetVineBonePos), VINE_1, 0, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) + Add(LVar2, 90) + Call(N(SetVineBoneRot), VINE_1, 0, LVar0, 0, LVar2) + Call(N(SetVineBoneScale), VINE_1, 0, 1, 1, 1) // VINE_1, bone 1 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 4, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 2) - EVT_CALL(N(SetVineBonePos), VINE_1, 1, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_1, 1, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_1, 1, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 4, LVar0, LVar1, LVar2) + Sub(LVar2, 2) + Call(N(SetVineBonePos), VINE_1, 1, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_1, 1, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_1, 1, Float(0.714), Float(0.714), Float(1.0)) // VINE_1, bone 2 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 7, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_1, 2, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 7, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_1, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_1, 2, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 7, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_1, 2, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 7, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_1, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_1, 2, Float(0.714), Float(0.714), Float(1.0)) // VINE_1, bone 3 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_1, 3, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_1, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_1, 3, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_1, 3, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_1, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_1, 3, Float(0.714), Float(0.714), Float(1.0)) // VINE_1, bone 4 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_1, 4, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_1, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_1, 4, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_1, 4, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_1, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_1, 4, Float(0.714), Float(0.714), Float(1.0)) // VINE_1, bone 5 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_1, 5, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_1, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_1, 5, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_1, 5, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_1, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_1, 5, Float(0.714), Float(0.714), Float(1.0)) // VINE_1, bone 6 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_1, 6, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_1, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_1, 6, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_1, 6, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_1, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_1, 6, Float(0.714), Float(0.714), Float(1.0)) // --------------------------------------------------------------- // set ACTOR_BUD_2 position and orientation to tip of VINE_2 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_BUD_2, PRT_MAIN, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_BUD_2, PRT_TARGET, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) - EVT_CALL(SetPartRotation, ACTOR_BUD_2, PRT_MAIN, LVar0, 0, LVar2) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_BUD_2, PRT_MAIN, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_BUD_2, PRT_TARGET, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) + Call(SetPartRotation, ACTOR_BUD_2, PRT_MAIN, LVar0, 0, LVar2) // --------------------------------------------------------------- // set position and orientation for VINE_2 bones // VINE_2, bone 0 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 2) - EVT_CALL(N(SetVineBonePos), VINE_2, 0, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 90) - EVT_CALL(N(SetVineBoneRot), VINE_2, 0, LVar0, 0, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_2, 0, 1, 1, 1) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) + Sub(LVar2, 2) + Call(N(SetVineBonePos), VINE_2, 0, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) + Add(LVar2, 90) + Call(N(SetVineBoneRot), VINE_2, 0, LVar0, 0, LVar2) + Call(N(SetVineBoneScale), VINE_2, 0, 1, 1, 1) // VINE_2, bone 1 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 4, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 2) - EVT_CALL(N(SetVineBonePos), VINE_2, 1, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_2, 1, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_2, 1, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 4, LVar0, LVar1, LVar2) + Sub(LVar2, 2) + Call(N(SetVineBonePos), VINE_2, 1, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_2, 1, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_2, 1, Float(0.714), Float(0.714), Float(1.0)) // VINE_2, bone 2 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 7, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_2, 2, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 7, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_2, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_2, 2, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 7, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_2, 2, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 7, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_2, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_2, 2, Float(0.714), Float(0.714), Float(1.0)) // VINE_2, bone 3 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_2, 3, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_2, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_2, 3, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_2, 3, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_2, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_2, 3, Float(0.714), Float(0.714), Float(1.0)) // VINE_2, bone 4 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_2, 4, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_2, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_2, 4, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_2, 4, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_2, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_2, 4, Float(0.714), Float(0.714), Float(1.0)) // VINE_2, bone 5 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_2, 5, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_2, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_2, 5, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_2, 5, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_2, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_2, 5, Float(0.714), Float(0.714), Float(1.0)) // VINE_2, bone 6 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_2, 6, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_2, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_2, 6, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_2, 6, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_2, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_2, 6, Float(0.714), Float(0.714), Float(1.0)) // --------------------------------------------------------------- // set position and orientation for VINE_3 bones // VINE_3, bone 0 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_3, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_3, 0, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_3, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_3, 0, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_3, 0, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_3, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_3, 0, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_3, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_3, 0, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_3, 0, Float(0.714), Float(0.714), Float(1.0)) // VINE_3, bone 1 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_3, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_3, 1, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_3, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_3, 1, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_3, 1, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_3, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_3, 1, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_3, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_3, 1, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_3, 1, Float(0.714), Float(0.714), Float(1.0)) // VINE_3, bone 2 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_3, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_3, 2, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_3, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_3, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_3, 2, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_3, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_3, 2, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_3, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_3, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_3, 2, Float(0.714), Float(0.714), Float(1.0)) // VINE_3, bone 3 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_3, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_3, 3, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_3, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_3, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_3, 3, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_3, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_3, 3, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_3, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_3, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_3, 3, Float(0.714), Float(0.714), Float(1.0)) // VINE_3, bone 4 - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_3, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_3, 4, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_3, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_3, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_3, 4, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_3, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_3, 4, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_3, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_3, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_3, 4, Float(0.714), Float(0.714), Float(1.0)) // --------------------------------------------------------------- // set flame positions - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_FlameEffect, LVar0) - EVT_IF_NE(LVar0, NULL) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 10, LVar1, LVar2, LVar3) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 10, LVar4, LVar5, LVar6) - EVT_SET(LVar7, 30) - EVT_SET(LVar8, -30) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_FlameSize, LVar9) - EVT_CALL(N(SetFlameProperties), LVar0, LVar1, LVar2, LVar6, LVar7, LVar8, LVar9) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_BUD_1, AVAR_Common_FlameEffect, LVar0) - EVT_IF_NE(LVar0, NULL) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 8, LVar1, LVar2, LVar3) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 8, LVar4, LVar5, LVar6) - EVT_SET(LVar7, 10) - EVT_SET(LVar8, -15) - EVT_CALL(GetActorVar, ACTOR_BUD_1, AVAR_Common_FlameSize, LVar9) - EVT_CALL(N(SetFlameProperties), LVar0, LVar1, LVar2, LVar6, LVar7, LVar8, LVar9) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_BUD_2, AVAR_Common_FlameEffect, LVar0) - EVT_IF_NE(LVar0, NULL) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 8, LVar1, LVar2, LVar3) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 8, LVar4, LVar5, LVar6) - EVT_SET(LVar7, 10) - EVT_SET(LVar8, -15) - EVT_CALL(GetActorVar, ACTOR_BUD_2, AVAR_Common_FlameSize, LVar9) - EVT_CALL(N(SetFlameProperties), LVar0, LVar1, LVar2, LVar6, LVar7, LVar8, LVar9) - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_NO_DMG_APPLY) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_Common_FlameEffect, LVar0) + IfNe(LVar0, NULL) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 10, LVar1, LVar2, LVar3) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 10, LVar4, LVar5, LVar6) + Set(LVar7, 30) + Set(LVar8, -30) + Call(GetActorVar, ACTOR_SELF, AVAR_Common_FlameSize, LVar9) + Call(N(SetFlameProperties), LVar0, LVar1, LVar2, LVar6, LVar7, LVar8, LVar9) + EndIf + Call(GetActorVar, ACTOR_BUD_1, AVAR_Common_FlameEffect, LVar0) + IfNe(LVar0, NULL) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 8, LVar1, LVar2, LVar3) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 8, LVar4, LVar5, LVar6) + Set(LVar7, 10) + Set(LVar8, -15) + Call(GetActorVar, ACTOR_BUD_1, AVAR_Common_FlameSize, LVar9) + Call(N(SetFlameProperties), LVar0, LVar1, LVar2, LVar6, LVar7, LVar8, LVar9) + EndIf + Call(GetActorVar, ACTOR_BUD_2, AVAR_Common_FlameEffect, LVar0) + IfNe(LVar0, NULL) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 8, LVar1, LVar2, LVar3) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 8, LVar4, LVar5, LVar6) + Set(LVar7, 10) + Set(LVar8, -15) + Call(GetActorVar, ACTOR_BUD_2, AVAR_Common_FlameSize, LVar9) + Call(N(SetFlameProperties), LVar0, LVar1, LVar2, LVar6, LVar7, LVar8, LVar9) + EndIf + Wait(1) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_NO_DMG_APPLY) + Goto(0) + EndIf + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetAnimatorFlags, VINE_0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 0) - EVT_CALL(GetLastElement, LVarE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_EXEC_WAIT(N(EVS_ComboHit)) - EVT_EXEC_WAIT(N(EVS_PlayIdleAnimation)) - EVT_CASE_EQ(EVENT_HIT) - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_EXEC_WAIT(N(EVS_PlayIdleAnimation)) - EVT_CASE_EQ(EVENT_DEATH) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_IF_FLAG(LVarE, DAMAGE_TYPE_FIRE) - EVT_EXEC_WAIT(N(EVS_BurnHit)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_EXEC_WAIT(N(EVS_PlayIdleAnimation)) - EVT_END_IF - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_EXEC_WAIT(N(EVS_PlayIdleAnimation)) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaPiranha_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_ZERO_DAMAGE) - EVT_IF_NOT_FLAG(LVarE, DAMAGE_TYPE_FIRE) - EVT_EXEC_WAIT(N(EVS_ComboHit)) - EVT_EXEC_WAIT(N(EVS_PlayIdleAnimation)) - EVT_END_IF - EVT_CASE_EQ(EVENT_IMMUNE) - EVT_IF_NOT_FLAG(LVarE, DAMAGE_TYPE_FIRE) - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_EXEC_WAIT(N(EVS_PlayIdleAnimation)) - EVT_END_IF - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CASE_EQ(EVENT_SPIKE_TAUNT) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_CALL(SetAnimatorFlags, VINE_0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 0) - EVT_CASE_EQ(EVENT_30) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaPiranha_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(1000) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_IsSecondPhase, LVar0) - EVT_IF_FALSE(LVar0) - EVT_CALL(ForceHomePos, ACTOR_SELF, 61, 61, 0) - EVT_ELSE - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar1) - EVT_IF_EQ(LVar1, PIRANHA_STATE_FIERY) - EVT_CALL(ForceHomePos, ACTOR_SELF, 61, 61, 0) - EVT_ELSE - EVT_CALL(ForceHomePos, ACTOR_SELF, 83, 67, 0) - EVT_END_IF - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_STOP) - EVT_CALL(SetAnimatorFlags, VINE_0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 1) - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetAnimatorFlags, VINE_0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 0) + Call(GetLastElement, LVarE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + CaseEq(EVENT_HIT_COMBO) + ExecWait(N(EVS_ComboHit)) + ExecWait(N(EVS_PlayIdleAnimation)) + CaseEq(EVENT_HIT) + ExecWait(N(EVS_Hit)) + ExecWait(N(EVS_PlayIdleAnimation)) + CaseEq(EVENT_DEATH) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_BURN_HIT) + IfFlag(LVarE, DAMAGE_TYPE_FIRE) + ExecWait(N(EVS_BurnHit)) + Else + ExecWait(N(EVS_Hit)) + ExecWait(N(EVS_PlayIdleAnimation)) + EndIf + CaseEq(EVENT_BURN_DEATH) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + ExecWait(N(EVS_Hit)) + ExecWait(N(EVS_PlayIdleAnimation)) + CaseEq(EVENT_SPIN_SMASH_DEATH) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaPiranha_Anim09) + ExecWait(EVS_Enemy_ShockHit) + CaseEq(EVENT_SHOCK_DEATH) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_ZERO_DAMAGE) + IfNotFlag(LVarE, DAMAGE_TYPE_FIRE) + ExecWait(N(EVS_ComboHit)) + ExecWait(N(EVS_PlayIdleAnimation)) + EndIf + CaseEq(EVENT_IMMUNE) + IfNotFlag(LVarE, DAMAGE_TYPE_FIRE) + ExecWait(N(EVS_Hit)) + ExecWait(N(EVS_PlayIdleAnimation)) + EndIf + CaseEq(EVENT_AIR_LIFT_FAILED) + CaseEq(EVENT_SPIKE_TAUNT) + CaseEq(EVENT_END_FIRST_STRIKE) + CaseEq(EVENT_RECOVER_STATUS) + Call(SetAnimatorFlags, VINE_0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 0) + CaseEq(EVENT_30) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaPiranha_Anim09) + ExecWait(EVS_Enemy_Hit) + Wait(1000) + CaseDefault + EndSwitch + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_IsSecondPhase, LVar0) + IfFalse(LVar0) + Call(ForceHomePos, ACTOR_SELF, 61, 61, 0) + Else + Call(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar1) + IfEq(LVar1, PIRANHA_STATE_FIERY) + Call(ForceHomePos, ACTOR_SELF, 61, 61, 0) + Else + Call(ForceHomePos, ACTOR_SELF, 83, 67, 0) + EndIf + EndIf + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_STOP) + Call(SetAnimatorFlags, VINE_0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 1) + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_BurnHit) = { - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_IsSecondPhase, LVar0) - EVT_IF_FALSE(LVar0) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar2) - EVT_IF_EQ(LVar2, PIRANHA_STATE_FIERY) - EVT_GOTO(10) - EVT_END_IF - EVT_SET(LVar0, ACTOR_BOSS) - EVT_EXEC_WAIT(N(EVS_Ignite)) - EVT_LABEL(10) - EVT_END_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_IsSecondPhase, LVar0) - EVT_IF_TRUE(LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) - EVT_IF_EQ(LVar0, PIRANHA_STATE_STUNNED) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_RECOVER) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim1, ANIM_LavaPiranha_Anim03) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, ANIM_LavaPiranha_Anim09) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(FieryAnims))) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(FieryDefense))) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_TARGET, EVT_PTR(N(FieryDefense))) - EVT_THREAD - EVT_WAIT(14) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_IDLE) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_END_THREAD - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Thread + Wait(1) + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_IsSecondPhase, LVar0) + IfFalse(LVar0) + Goto(10) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar2) + IfEq(LVar2, PIRANHA_STATE_FIERY) + Goto(10) + EndIf + Set(LVar0, ACTOR_BOSS) + ExecWait(N(EVS_Ignite)) + Label(10) + EndThread + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_IsSecondPhase, LVar0) + IfTrue(LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) + IfEq(LVar0, PIRANHA_STATE_STUNNED) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_RECOVER) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim1, ANIM_LavaPiranha_Anim03) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, ANIM_LavaPiranha_Anim09) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(FieryAnims))) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(FieryDefense))) + Call(SetDefenseTable, ACTOR_SELF, PRT_TARGET, Ref(N(FieryDefense))) + Thread + Wait(14) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_IDLE) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + EndThread + EndIf + EndIf + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, ACTOR_FLAG_NO_DMG_APPLY) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_IsSecondPhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_Attack_SpitFire)) - EVT_CASE_DEFAULT - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) - EVT_IF_EQ(LVar0, PIRANHA_STATE_FIERY) - EVT_EXEC_WAIT(N(EVS_Attack_FireBreath)) - EVT_ELSE - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_StunTurnsLeft, LVar0) - EVT_SUB(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_StunTurnsLeft, LVar0) - EVT_IF_LE(LVar0, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 80, 70, 0) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(SetBattleCamOffsetZ, 30) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_LOOP(10) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_TWITCH) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_WAIT(4) - EVT_END_LOOP - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 15) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LAVA_PIRANHA_RECOVER) - EVT_SET(LVar0, ACTOR_BOSS) - EVT_EXEC_WAIT(N(EVS_Ignite)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim04) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_RECOVER) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_WAIT(14) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_IDLE) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, ACTOR_FLAG_NO_DMG_APPLY) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_IsSecondPhase, LVar0) + Switch(LVar0) + CaseEq(0) + ExecWait(N(EVS_Attack_SpitFire)) + CaseDefault + Call(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) + IfEq(LVar0, PIRANHA_STATE_FIERY) + ExecWait(N(EVS_Attack_FireBreath)) + Else + Call(GetActorVar, ACTOR_SELF, AVAR_Common_StunTurnsLeft, LVar0) + Sub(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_StunTurnsLeft, LVar0) + IfLe(LVar0, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 80, 70, 0) + Call(SetBattleCamZoom, 300) + Call(SetBattleCamOffsetZ, 30) + Call(MoveBattleCamOver, 30) + Wait(30) + Loop(10) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_TWITCH) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Wait(4) + EndLoop + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 15) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LAVA_PIRANHA_RECOVER) + Set(LVar0, ACTOR_BOSS) + ExecWait(N(EVS_Ignite)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim04) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_RECOVER) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Wait(14) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_IDLE) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + EndIf + EndIf + EndSwitch + Return + End }; Vec3i N(SummonPos) = { 260, 0, 0 }; @@ -1184,167 +1184,167 @@ Formation N(RightBudFormation) = { }; EvtScript N(EVS_Attack_SpitFire) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_THREAD - EVT_WAIT(8) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 80, 70, 0) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(SetBattleCamOffsetZ, 30) - EVT_CALL(MoveBattleCamOver, 45) - EVT_WAIT(57) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 15) - EVT_END_THREAD - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_ATTACK) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_WAIT(14) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim05) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LAVA_PIRANHA_INHALE) - EVT_WAIT(45) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim06) - EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_MAIN, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 50) - EVT_SUB(LVar1, 15) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 40) - EVT_SET(LVar4, -10) - EVT_PLAY_EFFECT(EFFECT_63, 1, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 20, 20, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LAVA_PIRANHA_SPIT_FIRE) - EVT_WAIT(19) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_PLAY_EFFECT(EFFECT_EMBERS, 0, LVar3, 0, LVar5, 50, 50, EVT_FLOAT(1.0), 40, 55, EVT_FLOAT(1.0), EVT_FLOAT(1.0), 0) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_POST_ATTACK) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_FIRE, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim03) - EVT_WAIT(19) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_IDLE) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_FIRE, SUPPRESS_EVENT_ALL, 0, DMG_SPIT_FIRE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SET(LVarF, LVar0) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim03) - EVT_WAIT(19) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_IDLE) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_IF_EQ(LVarF, 10) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Thread + Wait(8) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 80, 70, 0) + Call(SetBattleCamZoom, 300) + Call(SetBattleCamOffsetZ, 30) + Call(MoveBattleCamOver, 45) + Wait(57) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 15) + EndThread + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_ATTACK) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Wait(14) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim05) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LAVA_PIRANHA_INHALE) + Wait(45) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim06) + Call(GetPartOffset, ACTOR_SELF, PRT_MAIN, LVar0, LVar1, LVar2) + Sub(LVar0, 50) + Sub(LVar1, 15) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Sub(LVar3, 40) + Set(LVar4, -10) + PlayEffect(EFFECT_63, 1, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.0), 20, 20, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LAVA_PIRANHA_SPIT_FIRE) + Wait(19) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + PlayEffect(EFFECT_EMBERS, 0, LVar3, 0, LVar5, 50, 50, Float(1.0), 40, 55, Float(1.0), Float(1.0), 0) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_POST_ATTACK) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_FIRE, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim03) + Wait(19) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_IDLE) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_FIRE, SUPPRESS_EVENT_ALL, 0, DMG_SPIT_FIRE, BS_FLAGS1_TRIGGER_EVENTS) + Set(LVarF, LVar0) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim03) + Wait(19) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_IDLE) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + IfEq(LVarF, 10) + Return + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_FireBreath) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_THREAD - EVT_WAIT(8) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 80, 70, 0) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(SetBattleCamOffsetZ, 30) - EVT_CALL(MoveBattleCamOver, 45) - EVT_WAIT(54) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 15) - EVT_END_THREAD - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_ATTACK) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_WAIT(14) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim0E) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LAVA_PIRANHA_INHALE) - EVT_WAIT(45) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim08) - EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_MAIN, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 40) - EVT_SET(LVar1, -10) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_PLAY_EFFECT(EFFECT_63, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 16, 40, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LAVA_PIRANHA_FIRE_BREATH) - EVT_WAIT(15) - EVT_THREAD - EVT_WAIT(24) - EVT_PLAY_EFFECT(EFFECT_EMBERS, 0, LVar3, 0, LVar5, 50, 50, EVT_FLOAT(1.0), 40, 55, EVT_FLOAT(1.0), EVT_FLOAT(1.0), 0) - EVT_END_THREAD - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_FIRE, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_WAIT(20) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_POST_ATTACK) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim07) - EVT_WAIT(19) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim04) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_IDLE) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_FIRE, SUPPRESS_EVENT_ALL, 0, DMG_FIRE_BREATH, BS_FLAGS1_TRIGGER_EVENTS) - EVT_WAIT(20) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_POST_ATTACK) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim07) - EVT_WAIT(19) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim04) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_IDLE) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_IF_EQ(LVarF, 10) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Thread + Wait(8) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 80, 70, 0) + Call(SetBattleCamZoom, 300) + Call(SetBattleCamOffsetZ, 30) + Call(MoveBattleCamOver, 45) + Wait(54) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 15) + EndThread + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_ATTACK) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Wait(14) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim0E) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LAVA_PIRANHA_INHALE) + Wait(45) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim08) + Call(GetPartOffset, ACTOR_SELF, PRT_MAIN, LVar0, LVar1, LVar2) + Sub(LVar0, 40) + Set(LVar1, -10) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + PlayEffect(EFFECT_63, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.0), 16, 40, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LAVA_PIRANHA_FIRE_BREATH) + Wait(15) + Thread + Wait(24) + PlayEffect(EFFECT_EMBERS, 0, LVar3, 0, LVar5, 50, 50, Float(1.0), 40, 55, Float(1.0), Float(1.0), 0) + EndThread + Call(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_FIRE, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Wait(20) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_POST_ATTACK) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim07) + Wait(19) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim04) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_IDLE) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_FIRE, SUPPRESS_EVENT_ALL, 0, DMG_FIRE_BREATH, BS_FLAGS1_TRIGGER_EVENTS) + Wait(20) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_POST_ATTACK) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim07) + Wait(19) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim04) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_IDLE) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + IfEq(LVarF, 10) + Return + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; extern s32 N(FakeoutMusicTime); @@ -1396,515 +1396,515 @@ API_CALLABLE(N(GetSinkPosLavaBud)) { } EvtScript N(EVS_Death) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Boss_Dying, TRUE) - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_LABEL(0) - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS1_EXECUTING_MOVE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_IsSecondPhase, LVar2) - EVT_IF_EQ(LVar2, 0) - EVT_CALL(ClearStatusEffects, ACTOR_SELF) - EVT_CALL(ClearStatusEffects, ACTOR_BUD_1) - EVT_CALL(ClearStatusEffects, ACTOR_BUD_2) - EVT_CALL(SetAnimatorFlags, VINE_0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 0) - EVT_CALL(GetActorVar, ACTOR_BUD_1, AVAR_Bud_WhichVine, LVar0) - EVT_CALL(SetAnimatorFlags, LVar0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 0) - EVT_CALL(GetActorVar, ACTOR_BUD_2, AVAR_Bud_WhichVine, LVar0) - EVT_CALL(SetAnimatorFlags, LVar0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 0) - EVT_CALL(CancelEnemyTurn, 1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 90, 90, 0) - EVT_CALL(SetBattleCamZoom, 360) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 240) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_DEATH_BEGIN) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_CALL(OverrideBattleDmaDest, VINE_3_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_EXTRA_DEATH) - EVT_CALL(PlayModelAnimation, VINE_3, VINE_3_BASE) - EVT_WAIT(10) - EVT_CALL(OverrideBattleDmaDest, VINE_1_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BUD_DEATH_BEGIN) - EVT_CALL(PlayModelAnimation, VINE_1, VINE_1_BASE) - EVT_WAIT(5) - EVT_CALL(OverrideBattleDmaDest, VINE_2_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BUD_DEATH_BEGIN) - EVT_CALL(PlayModelAnimation, VINE_2, VINE_2_BASE) - EVT_WAIT(4) - EVT_THREAD - EVT_CALL(PlaySound, SOUND_LRAW_RUMBLE) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 119, EVT_FLOAT(0.3)) - EVT_CALL(PlaySound, SOUND_LRAW_RUMBLE | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_END_THREAD - EVT_CALL(N(StartRumbleWithParams), 80, 234) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(HideHealthBar, ACTOR_BUD_1) - EVT_CALL(HideHealthBar, ACTOR_BUD_2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim0D) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_DEATH_MIDDLE) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LAVA_PIRANHA_DEFEAT) - EVT_WAIT(35) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_CALL(GetAnimatedModelRootPosition, VINE_0, LVar2, LVar3, LVar4) - EVT_ADD(LVar3, LVar1) - EVT_CALL(SetAnimatedModelRootPosition, VINE_0, LVar2, LVar3, LVar4) - EVT_CALL(N(GetSinkPosLavaPiranha), LVar0, LVar1) - EVT_ADD(LVar0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 99) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_BUD_1, PRT_MAIN, ANIM_LavaBud_Anim0D) - EVT_CALL(OverrideBattleDmaDest, VINE_1_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BUD_DEATH_MIDDLE) - EVT_CALL(PlayModelAnimation, VINE_1, VINE_1_BASE) - EVT_THREAD - EVT_WAIT(45) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_CALL(GetAnimatedModelRootPosition, VINE_1, LVar2, LVar3, LVar4) - EVT_ADD(LVar3, LVar1) - EVT_CALL(SetAnimatedModelRootPosition, VINE_1, LVar2, LVar3, LVar4) - EVT_CALL(N(GetSinkPosLavaBud), LVar0, LVar1) - EVT_ADD(LVar0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 99) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_BUD_2, PRT_MAIN, ANIM_LavaBud_Anim0D) - EVT_CALL(OverrideBattleDmaDest, VINE_2_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BUD_DEATH_MIDDLE) - EVT_CALL(PlayModelAnimation, VINE_2, VINE_2_BASE) - EVT_THREAD - EVT_WAIT(45) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_CALL(GetAnimatedModelRootPosition, VINE_2, LVar2, LVar3, LVar4) - EVT_ADD(LVar3, LVar1) - EVT_CALL(SetAnimatedModelRootPosition, VINE_2, LVar2, LVar3, LVar4) - EVT_CALL(N(GetSinkPosLavaBud), LVar0, LVar1) - EVT_ADD(LVar0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 99) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(35) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 90, 90, 0) - EVT_CALL(SetBattleCamZoom, 360) - EVT_CALL(SetBattleCamOffsetZ, -45) - EVT_CALL(MoveBattleCamOver, 110) - EVT_WAIT(60) - EVT_CALL(SetAnimatedModelRootPosition, VINE_0, 0, -250, 0) - EVT_CALL(SetAnimatedModelRootPosition, VINE_1, 0, -250, 0) - EVT_CALL(SetAnimatedModelRootPosition, VINE_2, 0, -250, 0) - EVT_CALL(SetActorPos, ACTOR_SELF, 100, 0, 0) - EVT_CALL(DropStarPoints, ACTOR_SELF) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_DEATH) - EVT_CALL(ForceHomePos, ACTOR_SELF, 61, 61, 0) - EVT_WAIT(65) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 240) - EVT_CALL(SetBattleCamOffsetZ, 40) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_THREAD - EVT_CALL(N(ManageFakeoutMusic)) - EVT_END_THREAD - EVT_WAIT(80) - EVT_THREAD - EVT_CALL(PlaySound, SOUND_LRAW_RUMBLE) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 165, EVT_FLOAT(1.2)) - EVT_CALL(PlaySound, SOUND_LRAW_RUMBLE | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_END_THREAD - EVT_CALL(N(StartRumbleWithParams), 80, 300) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_LookUp) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_EMOTE_QUESTION) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_EMOTE, EMOTE_QUESTION, 0, LVar0, LVar1, LVar2, 20, 315, 30, 0, 0) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_PLAY_EFFECT(EFFECT_EMOTE, EMOTE_QUESTION, 0, LVar0, LVar1, LVar2, 20, 315, 30, 0, 0) - EVT_WAIT(50) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 90, 90, 0) - EVT_CALL(SetBattleCamZoom, 360) - EVT_CALL(SetBattleCamOffsetZ, -60) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(40) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 90, 90, 0) - EVT_CALL(SetBattleCamZoom, 200) - EVT_CALL(SetBattleCamOffsetZ, -60) - EVT_CALL(MoveBattleCamOver, 40) - EVT_WAIT(40) - EVT_THREAD - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Flail) - EVT_WAIT(40) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_END_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 30, 90, 0) - EVT_CALL(SetBattleCamZoom, 460) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(N(StartRumbleWithParams), 180, 16) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CHILD_THREAD - EVT_WAIT(50) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 90, 90, 0) - EVT_CALL(SetBattleCamZoom, 360) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 40) - EVT_WAIT(85) - EVT_END_CHILD_THREAD - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Boss_IsSecondPhase, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim1, ANIM_LavaPiranha_Anim04) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, ANIM_LavaPiranha_Anim0A) - EVT_CALL(SetActorVar, ACTOR_BUD_1, AVAR_Common_UnkAnim1, ANIM_LavaBud_Anim04) - EVT_CALL(SetActorVar, ACTOR_BUD_1, AVAR_Common_UnkAnim2, ANIM_LavaBud_Anim0B) - EVT_CALL(SetActorVar, ACTOR_BUD_2, AVAR_Common_UnkAnim1, ANIM_LavaBud_Anim04) - EVT_CALL(SetActorVar, ACTOR_BUD_2, AVAR_Common_UnkAnim2, ANIM_LavaBud_Anim0B) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(A(lava_bud_FieryAnims))) - EVT_CALL(SetIdleAnimations, ACTOR_BUD_1, PRT_MAIN, EVT_PTR(A(lava_bud_FieryAnims))) - EVT_CALL(SetIdleAnimations, ACTOR_BUD_2, PRT_MAIN, EVT_PTR(A(lava_bud_FieryAnims))) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(FieryDefense))) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_TARGET, EVT_PTR(N(FieryDefense))) - EVT_CALL(SetDefenseTable, ACTOR_BUD_1, PRT_MAIN, EVT_PTR(A(lava_bud_FieryDefense))) - EVT_CALL(SetDefenseTable, ACTOR_BUD_1, PRT_TARGET, EVT_PTR(A(lava_bud_FieryDefense))) - EVT_CALL(SetDefenseTable, ACTOR_BUD_2, PRT_MAIN, EVT_PTR(A(lava_bud_FieryDefense))) - EVT_CALL(SetDefenseTable, ACTOR_BUD_2, PRT_TARGET, EVT_PTR(A(lava_bud_FieryDefense))) - EVT_CALL(SetPartImmunityBits, ACTOR_SELF, PRT_MAIN, ELEMENT_FIRE, 1) - EVT_CALL(SetPartImmunityBits, ACTOR_SELF, PRT_TARGET, ELEMENT_FIRE, 1) - EVT_CALL(SetPartImmunityBits, ACTOR_BUD_1, PRT_MAIN, ELEMENT_FIRE, 1) - EVT_CALL(SetPartImmunityBits, ACTOR_BUD_1, PRT_TARGET, ELEMENT_FIRE, 1) - EVT_CALL(SetPartImmunityBits, ACTOR_BUD_2, PRT_MAIN, ELEMENT_FIRE, 1) - EVT_CALL(SetPartImmunityBits, ACTOR_BUD_2, PRT_TARGET, ELEMENT_FIRE, 1) - EVT_CALL(SetPartFlagBits, ACTOR_BUD_1, PRT_TARGET, ACTOR_PART_FLAG_DAMAGE_IMMUNE, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_BUD_2, PRT_TARGET, ACTOR_PART_FLAG_DAMAGE_IMMUNE, FALSE) - EVT_SET(LVar0, ACTOR_BOSS) - EVT_EXEC_WAIT(N(EVS_Ignite)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim04) - EVT_SET(LVar0, ACTOR_BUD_1) - EVT_EXEC_WAIT(N(EVS_Ignite)) - EVT_CALL(SetAnimation, ACTOR_BUD_1, PRT_MAIN, ANIM_LavaBud_Anim04) - EVT_SET(LVar0, ACTOR_BUD_2) - EVT_EXEC_WAIT(N(EVS_Ignite)) - EVT_CALL(SetAnimation, ACTOR_BUD_2, PRT_MAIN, ANIM_LavaBud_Anim04) - EVT_CALL(SetActorType, ACTOR_SELF, ACTOR_TYPE_LAVA_PIRANHA_PHASE_2) - EVT_CALL(SetActorType, ACTOR_BUD_1, ACTOR_TYPE_LAVA_BUD_PHASE_2) - EVT_CALL(SetActorType, ACTOR_BUD_2, ACTOR_TYPE_LAVA_BUD_PHASE_2) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) - EVT_CALL(SetActorFlagBits, ACTOR_BUD_1, ACTOR_FLAG_TYPE_CHANGED, TRUE) - EVT_CALL(SetActorFlagBits, ACTOR_BUD_2, ACTOR_FLAG_TYPE_CHANGED, TRUE) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar0) - EVT_CALL(SetEnemyHP, ACTOR_SELF, LVar0) - EVT_CALL(GetEnemyMaxHP, ACTOR_BUD_1, LVar0) - EVT_CALL(SetEnemyHP, ACTOR_BUD_1, LVar0) - EVT_CALL(GetEnemyMaxHP, ACTOR_BUD_2, LVar0) - EVT_CALL(SetEnemyHP, ACTOR_BUD_2, LVar0) - EVT_CALL(EnableModel, MODEL_h01, TRUE) - EVT_CALL(EnableModel, MODEL_h02, TRUE) - EVT_CALL(EnableModel, MODEL_h03, TRUE) - EVT_CALL(EnableModel, MODEL_h04, TRUE) - EVT_CALL(EnableModel, MODEL_h05, TRUE) - EVT_CALL(EnableModel, MODEL_h06, TRUE) - EVT_CALL(EnableModel, MODEL_h07, TRUE) - EVT_CALL(EnableModel, MODEL_h08, TRUE) - EVT_CALL(EnableModel, MODEL_h10, TRUE) - EVT_CALL(EnableModel, MODEL_h11, TRUE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LAVA_PIRANHA_EMERGE) - EVT_PLAY_EFFECT(EFFECT_EMBERS, 0, 100, 0, 0, 70, 80, EVT_FLOAT(2.5), 80, 55, EVT_FLOAT(2.0), EVT_FLOAT(2.0), 0) - EVT_CALL(LoadAnimatedModel, SHATTER_GROUND, EVT_PTR(N(anim1))) - EVT_CALL(PlayModelAnimation, SHATTER_GROUND, EVT_PTR(N(anim1_8021A364))) - EVT_CALL(SetAnimatedModelRootPosition, SHATTER_GROUND, 0, 0, 0) - EVT_CALL(EnableGroup, MODEL_mae, FALSE) - EVT_CALL(EnableGroup, MODEL_ato, TRUE) - EVT_THREAD - EVT_WAIT(45) - EVT_CALL(DeleteAnimatedModel, SHATTER_GROUND) - EVT_END_THREAD - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_EMERGE) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_CALL(SetAnimatedModelRootPosition, VINE_0, 0, 0, 0) - EVT_WAIT(5) - EVT_CALL(SetAnimatedModelRootPosition, VINE_2, 50, 14, 20) - EVT_CALL(OverrideBattleDmaDest, VINE_2_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BUD_EMERGE) - EVT_CALL(PlayModelAnimation, VINE_2, VINE_2_BASE) - EVT_WAIT(10) - EVT_CALL(SetAnimatedModelRootPosition, VINE_1, 0, 0, 0) - EVT_CALL(OverrideBattleDmaDest, VINE_1_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BUD_EMERGE) - EVT_CALL(PlayModelAnimation, VINE_1, VINE_1_BASE) - EVT_WAIT(45) - EVT_CALL(SetAnimatedModelRootPosition, VINE_3, 0, 0, 0) - EVT_CALL(OverrideBattleDmaDest, VINE_3_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_EXTRA_EMERGE) - EVT_CALL(PlayModelAnimation, VINE_3, VINE_3_BASE) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_IDLE) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim0E) - EVT_WAIT(5) - EVT_CALL(OverrideBattleDmaDest, VINE_2_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BUD_IDLE) - EVT_CALL(PlayModelAnimation, VINE_2, VINE_2_BASE) - EVT_WAIT(10) - EVT_CALL(OverrideBattleDmaDest, VINE_1_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BUD_IDLE) - EVT_CALL(PlayModelAnimation, VINE_1, VINE_1_BASE) - EVT_WAIT(30) - EVT_CALL(OverrideBattleDmaDest, VINE_3_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_EXTRA_IDLE) - EVT_CALL(PlayModelAnimation, VINE_3, VINE_3_BASE) - EVT_CALL(GetEnemyMaxHP, ACTOR_BUD_1, LVar0) - EVT_CALL(SetEnemyHP, ACTOR_BUD_1, LVar0) - EVT_CALL(GetEnemyMaxHP, ACTOR_BUD_2, LVar0) - EVT_CALL(SetEnemyHP, ACTOR_BUD_2, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Boss_Dying, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_ELSE - EVT_CALL(HideHealthBar, ACTOR_BUD_1) - EVT_CALL(HideHealthBar, ACTOR_BUD_2) - EVT_SET(LVar0, ACTOR_PETIT_1) - EVT_EXEC_WAIT(N(EVS_RemovePetitPiranha)) - EVT_SET(LVar0, ACTOR_PETIT_2) - EVT_EXEC_WAIT(N(EVS_RemovePetitPiranha)) - EVT_CALL(OverrideBattleDmaDest, VINE_3_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_EXTRA_DEATH) - EVT_CALL(PlayModelAnimation, VINE_3, VINE_3_BASE) - EVT_THREAD - EVT_CALL(PlaySound, SOUND_LRAW_RUMBLE) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 100, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 8, EVT_FLOAT(0.2)) - EVT_CALL(PlaySound, SOUND_LRAW_RUMBLE | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_END_THREAD - EVT_CALL(N(StartRumbleWithParams), 80, 216) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LAVA_PIRANHA_WRITHE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) - EVT_IF_EQ(LVar0, PIRANHA_STATE_STUNNED) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_STUNNED_DEATH_BEGIN) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_ELSE - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_DEATH_BEGIN) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_END_IF - EVT_WAIT(19) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_DEATH_MIDDLE) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) - EVT_IF_EQ(LVar0, PIRANHA_STATE_FIERY) - EVT_PLAY_EFFECT(EFFECT_EMBERS, 0, 105, 60, 2, 80, 60, EVT_FLOAT(1.8), 90, 100, EVT_FLOAT(1.5), EVT_FLOAT(1.5), 0) - EVT_END_IF - EVT_WAIT(121) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LAVA_PIRANHA_COLLAPSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim0A) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_DEATH_COLLAPSE) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_WAIT(30) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_FlameSize, LVar0) - EVT_SET(LVar1, 100) - EVT_LOOP(50) - EVT_SUB(LVar1, 2) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, LVar1) - EVT_MULF(LVar2, EVT_FLOAT(0.01)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_FlameSize, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(12) - EVT_CALL(GetActorVar, ACTOR_BUD_1, AVAR_Common_PiranhaState, LVar0) - EVT_IF_EQ(LVar0, PIRANHA_STATE_STUNNED) - EVT_CALL(OverrideBattleDmaDest, VINE_1_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BUD_STUNNED_DEATH_BEGIN) - EVT_CALL(PlayModelAnimation, VINE_1, VINE_1_BASE) - EVT_ELSE - EVT_CALL(OverrideBattleDmaDest, VINE_1_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BUD_DEATH_BEGIN) - EVT_CALL(PlayModelAnimation, VINE_1, VINE_1_BASE) - EVT_END_IF - EVT_WAIT(19) - EVT_CALL(OverrideBattleDmaDest, VINE_1_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BUD_DEATH_MIDDLE) - EVT_CALL(PlayModelAnimation, VINE_1, VINE_1_BASE) - EVT_CALL(GetActorVar, ACTOR_BUD_1, AVAR_Common_PiranhaState, LVar0) - EVT_IF_EQ(LVar0, PIRANHA_STATE_FIERY) - EVT_PLAY_EFFECT(EFFECT_EMBERS, 0, 67, 30, 2, 50, 40, EVT_FLOAT(1.3), 30, 70, EVT_FLOAT(1.2), EVT_FLOAT(1.2), 0) - EVT_END_IF - EVT_WAIT(96) - EVT_CALL(OverrideBattleDmaDest, VINE_1_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BUD_DEATH_COLLAPSE) - EVT_CALL(PlayModelAnimation, VINE_1, VINE_1_BASE) - EVT_WAIT(30) - EVT_CALL(GetActorVar, ACTOR_BUD_1, AVAR_Common_FlameSize, LVar0) - EVT_SET(LVar1, 100) - EVT_LOOP(50) - EVT_SUB(LVar1, 2) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, LVar1) - EVT_MULF(LVar2, EVT_FLOAT(0.01)) - EVT_CALL(SetActorVar, ACTOR_BUD_1, AVAR_Common_FlameSize, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(GetActorVar, ACTOR_BUD_2, AVAR_Common_PiranhaState, LVar0) - EVT_IF_EQ(LVar0, PIRANHA_STATE_STUNNED) - EVT_CALL(OverrideBattleDmaDest, VINE_2_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BUD_STUNNED_DEATH_BEGIN) - EVT_CALL(PlayModelAnimation, VINE_2, VINE_2_BASE) - EVT_ELSE - EVT_CALL(OverrideBattleDmaDest, VINE_2_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BUD_DEATH_BEGIN) - EVT_CALL(PlayModelAnimation, VINE_2, VINE_2_BASE) - EVT_END_IF - EVT_WAIT(19) - EVT_CALL(OverrideBattleDmaDest, VINE_2_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BUD_DEATH_MIDDLE) - EVT_CALL(PlayModelAnimation, VINE_2, VINE_2_BASE) - EVT_CALL(GetActorVar, ACTOR_BUD_2, AVAR_Common_PiranhaState, LVar0) - EVT_IF_EQ(LVar0, PIRANHA_STATE_FIERY) - EVT_PLAY_EFFECT(EFFECT_EMBERS, 0, 120, 35, 5, 50, 40, EVT_FLOAT(1.3), 30, 70, EVT_FLOAT(1.2), EVT_FLOAT(1.2), 0) - EVT_END_IF - EVT_WAIT(96) - EVT_CALL(OverrideBattleDmaDest, VINE_2_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BUD_DEATH_COLLAPSE) - EVT_CALL(PlayModelAnimation, VINE_2, VINE_2_BASE) - EVT_WAIT(30) - EVT_CALL(GetActorVar, ACTOR_BUD_2, AVAR_Common_FlameSize, LVar0) - EVT_SET(LVar1, 100) - EVT_LOOP(50) - EVT_SUB(LVar1, 2) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, LVar1) - EVT_MULF(LVar2, EVT_FLOAT(0.01)) - EVT_CALL(SetActorVar, ACTOR_BUD_2, AVAR_Common_FlameSize, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(150) - EVT_SET(LVar0, 14) - EVT_LOOP(14) - EVT_SUB(LVar0, 1) - EVT_CALL(SetAnimatedModelRootPosition, VINE_2, 50, LVar0, 20) - EVT_WAIT(2) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(212) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim0F) - EVT_CALL(SetAnimation, ACTOR_BUD_1, PRT_MAIN, ANIM_LavaBud_Anim0F) - EVT_CALL(SetAnimation, ACTOR_BUD_2, PRT_MAIN, ANIM_LavaBud_Anim0F) - EVT_PLAY_EFFECT(EFFECT_SHOCKWAVE, 0, -60, 0, 2, 0) - EVT_THREAD - EVT_CALL(N(StartRumbleWithParams), 180, 16) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(4.0)) - EVT_END_THREAD - EVT_WAIT(3) - EVT_CALL(SetActorPos, ACTOR_SELF, -60, 0, 0) - EVT_CALL(DropStarPoints, ACTOR_SELF) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_DEATH) - EVT_WAIT(15) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_FlameEffect, LVar0) - EVT_IF_NE(LVar0, NULL) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_FlameEffect, NULL) - EVT_CALL(RemoveEffect, LVar0) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_BUD_1, AVAR_Common_FlameEffect, LVar0) - EVT_IF_NE(LVar0, NULL) - EVT_CALL(SetActorVar, ACTOR_BUD_1, AVAR_Common_FlameEffect, NULL) - EVT_CALL(RemoveEffect, LVar0) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_BUD_2, AVAR_Common_FlameEffect, LVar0) - EVT_IF_NE(LVar0, NULL) - EVT_CALL(SetActorVar, ACTOR_BUD_2, AVAR_Common_FlameEffect, NULL) - EVT_CALL(RemoveEffect, LVar0) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(SetActorFlagBits, ACTOR_BOSS, ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_BOSS, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_BOSS, PRT_TARGET, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetActorFlagBits, ACTOR_BUD_1, ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_CALL(SetActorFlagBits, ACTOR_BUD_2, ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_Boss_Dying, TRUE) + ExecWait(N(EVS_Hit)) + Label(0) + Call(GetBattleFlags, LVar0) + IfFlag(LVar0, BS_FLAGS1_EXECUTING_MOVE) + Wait(1) + Goto(0) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_IsSecondPhase, LVar2) + IfEq(LVar2, 0) + Call(ClearStatusEffects, ACTOR_SELF) + Call(ClearStatusEffects, ACTOR_BUD_1) + Call(ClearStatusEffects, ACTOR_BUD_2) + Call(SetAnimatorFlags, VINE_0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 0) + Call(GetActorVar, ACTOR_BUD_1, AVAR_Bud_WhichVine, LVar0) + Call(SetAnimatorFlags, LVar0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 0) + Call(GetActorVar, ACTOR_BUD_2, AVAR_Bud_WhichVine, LVar0) + Call(SetAnimatorFlags, LVar0, MODEL_ANIMATOR_FLAG_FREEZE_ANIMATION, 0) + Call(CancelEnemyTurn, 1) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 90, 90, 0) + Call(SetBattleCamZoom, 360) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 240) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_DEATH_BEGIN) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Call(OverrideBattleDmaDest, VINE_3_BASE) + Call(LoadBattleDmaData, VINE_ANIM_EXTRA_DEATH) + Call(PlayModelAnimation, VINE_3, VINE_3_BASE) + Wait(10) + Call(OverrideBattleDmaDest, VINE_1_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BUD_DEATH_BEGIN) + Call(PlayModelAnimation, VINE_1, VINE_1_BASE) + Wait(5) + Call(OverrideBattleDmaDest, VINE_2_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BUD_DEATH_BEGIN) + Call(PlayModelAnimation, VINE_2, VINE_2_BASE) + Wait(4) + Thread + Call(PlaySound, SOUND_LRAW_RUMBLE) + Call(ShakeCam, CAM_BATTLE, 0, 119, Float(0.3)) + Call(PlaySound, SOUND_LRAW_RUMBLE | SOUND_ID_TRIGGER_CHANGE_SOUND) + EndThread + Call(N(StartRumbleWithParams), 80, 234) + Call(HideHealthBar, ACTOR_SELF) + Call(HideHealthBar, ACTOR_BUD_1) + Call(HideHealthBar, ACTOR_BUD_2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim0D) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_DEATH_MIDDLE) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Thread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LAVA_PIRANHA_DEFEAT) + Wait(35) + Set(LVar0, 0) + Set(LVar1, 0) + Loop(0) + Call(GetAnimatedModelRootPosition, VINE_0, LVar2, LVar3, LVar4) + Add(LVar3, LVar1) + Call(SetAnimatedModelRootPosition, VINE_0, LVar2, LVar3, LVar4) + Call(N(GetSinkPosLavaPiranha), LVar0, LVar1) + Add(LVar0, 1) + Wait(1) + IfEq(LVar1, 99) + BreakLoop + EndIf + EndLoop + EndThread + Wait(10) + Call(SetAnimation, ACTOR_BUD_1, PRT_MAIN, ANIM_LavaBud_Anim0D) + Call(OverrideBattleDmaDest, VINE_1_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BUD_DEATH_MIDDLE) + Call(PlayModelAnimation, VINE_1, VINE_1_BASE) + Thread + Wait(45) + Set(LVar0, 0) + Set(LVar1, 0) + Loop(0) + Call(GetAnimatedModelRootPosition, VINE_1, LVar2, LVar3, LVar4) + Add(LVar3, LVar1) + Call(SetAnimatedModelRootPosition, VINE_1, LVar2, LVar3, LVar4) + Call(N(GetSinkPosLavaBud), LVar0, LVar1) + Add(LVar0, 1) + Wait(1) + IfEq(LVar1, 99) + BreakLoop + EndIf + EndLoop + EndThread + Wait(5) + Call(SetAnimation, ACTOR_BUD_2, PRT_MAIN, ANIM_LavaBud_Anim0D) + Call(OverrideBattleDmaDest, VINE_2_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BUD_DEATH_MIDDLE) + Call(PlayModelAnimation, VINE_2, VINE_2_BASE) + Thread + Wait(45) + Set(LVar0, 0) + Set(LVar1, 0) + Loop(0) + Call(GetAnimatedModelRootPosition, VINE_2, LVar2, LVar3, LVar4) + Add(LVar3, LVar1) + Call(SetAnimatedModelRootPosition, VINE_2, LVar2, LVar3, LVar4) + Call(N(GetSinkPosLavaBud), LVar0, LVar1) + Add(LVar0, 1) + Wait(1) + IfEq(LVar1, 99) + BreakLoop + EndIf + EndLoop + EndThread + Wait(35) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 90, 90, 0) + Call(SetBattleCamZoom, 360) + Call(SetBattleCamOffsetZ, -45) + Call(MoveBattleCamOver, 110) + Wait(60) + Call(SetAnimatedModelRootPosition, VINE_0, 0, -250, 0) + Call(SetAnimatedModelRootPosition, VINE_1, 0, -250, 0) + Call(SetAnimatedModelRootPosition, VINE_2, 0, -250, 0) + Call(SetActorPos, ACTOR_SELF, 100, 0, 0) + Call(DropStarPoints, ACTOR_SELF) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_DEATH) + Call(ForceHomePos, ACTOR_SELF, 61, 61, 0) + Wait(65) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 240) + Call(SetBattleCamOffsetZ, 40) + Call(MoveBattleCamOver, 20) + Wait(20) + Thread + Call(N(ManageFakeoutMusic)) + EndThread + Wait(80) + Thread + Call(PlaySound, SOUND_LRAW_RUMBLE) + Call(ShakeCam, CAM_BATTLE, 0, 165, Float(1.2)) + Call(PlaySound, SOUND_LRAW_RUMBLE | SOUND_ID_TRIGGER_CHANGE_SOUND) + EndThread + Call(N(StartRumbleWithParams), 80, 300) + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_LookUp) + Wait(20) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_EMOTE_QUESTION) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 20) + PlayEffect(EFFECT_EMOTE, EMOTE_QUESTION, 0, LVar0, LVar1, LVar2, 20, 315, 30, 0, 0) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 10) + PlayEffect(EFFECT_EMOTE, EMOTE_QUESTION, 0, LVar0, LVar1, LVar2, 20, 315, 30, 0, 0) + Wait(50) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 90, 90, 0) + Call(SetBattleCamZoom, 360) + Call(SetBattleCamOffsetZ, -60) + Call(MoveBattleCamOver, 30) + Wait(40) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 90, 90, 0) + Call(SetBattleCamZoom, 200) + Call(SetBattleCamOffsetZ, -60) + Call(MoveBattleCamOver, 40) + Wait(40) + Thread + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Flail) + Wait(40) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + EndThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 30, 90, 0) + Call(SetBattleCamZoom, 460) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 30) + Call(N(StartRumbleWithParams), 180, 16) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.0)) + EndThread + ChildThread + Wait(50) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 90, 90, 0) + Call(SetBattleCamZoom, 360) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 40) + Wait(85) + EndChildThread + Call(SetActorVar, ACTOR_SELF, AVAR_Boss_IsSecondPhase, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim1, ANIM_LavaPiranha_Anim04) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, ANIM_LavaPiranha_Anim0A) + Call(SetActorVar, ACTOR_BUD_1, AVAR_Common_UnkAnim1, ANIM_LavaBud_Anim04) + Call(SetActorVar, ACTOR_BUD_1, AVAR_Common_UnkAnim2, ANIM_LavaBud_Anim0B) + Call(SetActorVar, ACTOR_BUD_2, AVAR_Common_UnkAnim1, ANIM_LavaBud_Anim04) + Call(SetActorVar, ACTOR_BUD_2, AVAR_Common_UnkAnim2, ANIM_LavaBud_Anim0B) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(A(lava_bud_FieryAnims))) + Call(SetIdleAnimations, ACTOR_BUD_1, PRT_MAIN, Ref(A(lava_bud_FieryAnims))) + Call(SetIdleAnimations, ACTOR_BUD_2, PRT_MAIN, Ref(A(lava_bud_FieryAnims))) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(FieryDefense))) + Call(SetDefenseTable, ACTOR_SELF, PRT_TARGET, Ref(N(FieryDefense))) + Call(SetDefenseTable, ACTOR_BUD_1, PRT_MAIN, Ref(A(lava_bud_FieryDefense))) + Call(SetDefenseTable, ACTOR_BUD_1, PRT_TARGET, Ref(A(lava_bud_FieryDefense))) + Call(SetDefenseTable, ACTOR_BUD_2, PRT_MAIN, Ref(A(lava_bud_FieryDefense))) + Call(SetDefenseTable, ACTOR_BUD_2, PRT_TARGET, Ref(A(lava_bud_FieryDefense))) + Call(SetPartImmunityBits, ACTOR_SELF, PRT_MAIN, ELEMENT_FIRE, 1) + Call(SetPartImmunityBits, ACTOR_SELF, PRT_TARGET, ELEMENT_FIRE, 1) + Call(SetPartImmunityBits, ACTOR_BUD_1, PRT_MAIN, ELEMENT_FIRE, 1) + Call(SetPartImmunityBits, ACTOR_BUD_1, PRT_TARGET, ELEMENT_FIRE, 1) + Call(SetPartImmunityBits, ACTOR_BUD_2, PRT_MAIN, ELEMENT_FIRE, 1) + Call(SetPartImmunityBits, ACTOR_BUD_2, PRT_TARGET, ELEMENT_FIRE, 1) + Call(SetPartFlagBits, ACTOR_BUD_1, PRT_TARGET, ACTOR_PART_FLAG_DAMAGE_IMMUNE, FALSE) + Call(SetPartFlagBits, ACTOR_BUD_2, PRT_TARGET, ACTOR_PART_FLAG_DAMAGE_IMMUNE, FALSE) + Set(LVar0, ACTOR_BOSS) + ExecWait(N(EVS_Ignite)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim04) + Set(LVar0, ACTOR_BUD_1) + ExecWait(N(EVS_Ignite)) + Call(SetAnimation, ACTOR_BUD_1, PRT_MAIN, ANIM_LavaBud_Anim04) + Set(LVar0, ACTOR_BUD_2) + ExecWait(N(EVS_Ignite)) + Call(SetAnimation, ACTOR_BUD_2, PRT_MAIN, ANIM_LavaBud_Anim04) + Call(SetActorType, ACTOR_SELF, ACTOR_TYPE_LAVA_PIRANHA_PHASE_2) + Call(SetActorType, ACTOR_BUD_1, ACTOR_TYPE_LAVA_BUD_PHASE_2) + Call(SetActorType, ACTOR_BUD_2, ACTOR_TYPE_LAVA_BUD_PHASE_2) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) + Call(SetActorFlagBits, ACTOR_BUD_1, ACTOR_FLAG_TYPE_CHANGED, TRUE) + Call(SetActorFlagBits, ACTOR_BUD_2, ACTOR_FLAG_TYPE_CHANGED, TRUE) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar0) + Call(SetEnemyHP, ACTOR_SELF, LVar0) + Call(GetEnemyMaxHP, ACTOR_BUD_1, LVar0) + Call(SetEnemyHP, ACTOR_BUD_1, LVar0) + Call(GetEnemyMaxHP, ACTOR_BUD_2, LVar0) + Call(SetEnemyHP, ACTOR_BUD_2, LVar0) + Call(EnableModel, MODEL_h01, TRUE) + Call(EnableModel, MODEL_h02, TRUE) + Call(EnableModel, MODEL_h03, TRUE) + Call(EnableModel, MODEL_h04, TRUE) + Call(EnableModel, MODEL_h05, TRUE) + Call(EnableModel, MODEL_h06, TRUE) + Call(EnableModel, MODEL_h07, TRUE) + Call(EnableModel, MODEL_h08, TRUE) + Call(EnableModel, MODEL_h10, TRUE) + Call(EnableModel, MODEL_h11, TRUE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LAVA_PIRANHA_EMERGE) + PlayEffect(EFFECT_EMBERS, 0, 100, 0, 0, 70, 80, Float(2.5), 80, 55, Float(2.0), Float(2.0), 0) + Call(LoadAnimatedModel, SHATTER_GROUND, Ref(N(anim1))) + Call(PlayModelAnimation, SHATTER_GROUND, Ref(N(anim1_8021A364))) + Call(SetAnimatedModelRootPosition, SHATTER_GROUND, 0, 0, 0) + Call(EnableGroup, MODEL_mae, FALSE) + Call(EnableGroup, MODEL_ato, TRUE) + Thread + Wait(45) + Call(DeleteAnimatedModel, SHATTER_GROUND) + EndThread + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_EMERGE) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Call(SetAnimatedModelRootPosition, VINE_0, 0, 0, 0) + Wait(5) + Call(SetAnimatedModelRootPosition, VINE_2, 50, 14, 20) + Call(OverrideBattleDmaDest, VINE_2_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BUD_EMERGE) + Call(PlayModelAnimation, VINE_2, VINE_2_BASE) + Wait(10) + Call(SetAnimatedModelRootPosition, VINE_1, 0, 0, 0) + Call(OverrideBattleDmaDest, VINE_1_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BUD_EMERGE) + Call(PlayModelAnimation, VINE_1, VINE_1_BASE) + Wait(45) + Call(SetAnimatedModelRootPosition, VINE_3, 0, 0, 0) + Call(OverrideBattleDmaDest, VINE_3_BASE) + Call(LoadBattleDmaData, VINE_ANIM_EXTRA_EMERGE) + Call(PlayModelAnimation, VINE_3, VINE_3_BASE) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_IDLE) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim0E) + Wait(5) + Call(OverrideBattleDmaDest, VINE_2_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BUD_IDLE) + Call(PlayModelAnimation, VINE_2, VINE_2_BASE) + Wait(10) + Call(OverrideBattleDmaDest, VINE_1_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BUD_IDLE) + Call(PlayModelAnimation, VINE_1, VINE_1_BASE) + Wait(30) + Call(OverrideBattleDmaDest, VINE_3_BASE) + Call(LoadBattleDmaData, VINE_ANIM_EXTRA_IDLE) + Call(PlayModelAnimation, VINE_3, VINE_3_BASE) + Call(GetEnemyMaxHP, ACTOR_BUD_1, LVar0) + Call(SetEnemyHP, ACTOR_BUD_1, LVar0) + Call(GetEnemyMaxHP, ACTOR_BUD_2, LVar0) + Call(SetEnemyHP, ACTOR_BUD_2, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_Boss_Dying, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Else + Call(HideHealthBar, ACTOR_BUD_1) + Call(HideHealthBar, ACTOR_BUD_2) + Set(LVar0, ACTOR_PETIT_1) + ExecWait(N(EVS_RemovePetitPiranha)) + Set(LVar0, ACTOR_PETIT_2) + ExecWait(N(EVS_RemovePetitPiranha)) + Call(OverrideBattleDmaDest, VINE_3_BASE) + Call(LoadBattleDmaData, VINE_ANIM_EXTRA_DEATH) + Call(PlayModelAnimation, VINE_3, VINE_3_BASE) + Thread + Call(PlaySound, SOUND_LRAW_RUMBLE) + Call(ShakeCam, CAM_BATTLE, 0, 100, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 8, Float(0.2)) + Call(PlaySound, SOUND_LRAW_RUMBLE | SOUND_ID_TRIGGER_CHANGE_SOUND) + EndThread + Call(N(StartRumbleWithParams), 80, 216) + Thread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LAVA_PIRANHA_WRITHE) + Call(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) + IfEq(LVar0, PIRANHA_STATE_STUNNED) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_STUNNED_DEATH_BEGIN) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Else + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_DEATH_BEGIN) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + EndIf + Wait(19) + Call(HideHealthBar, ACTOR_SELF) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_DEATH_MIDDLE) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Call(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) + IfEq(LVar0, PIRANHA_STATE_FIERY) + PlayEffect(EFFECT_EMBERS, 0, 105, 60, 2, 80, 60, Float(1.8), 90, 100, Float(1.5), Float(1.5), 0) + EndIf + Wait(121) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LAVA_PIRANHA_COLLAPSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim0A) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_DEATH_COLLAPSE) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Wait(30) + Call(GetActorVar, ACTOR_SELF, AVAR_Common_FlameSize, LVar0) + Set(LVar1, 100) + Loop(50) + Sub(LVar1, 2) + SetF(LVar2, LVar0) + MulF(LVar2, LVar1) + MulF(LVar2, Float(0.01)) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_FlameSize, LVar2) + Wait(1) + EndLoop + EndThread + Thread + Wait(12) + Call(GetActorVar, ACTOR_BUD_1, AVAR_Common_PiranhaState, LVar0) + IfEq(LVar0, PIRANHA_STATE_STUNNED) + Call(OverrideBattleDmaDest, VINE_1_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BUD_STUNNED_DEATH_BEGIN) + Call(PlayModelAnimation, VINE_1, VINE_1_BASE) + Else + Call(OverrideBattleDmaDest, VINE_1_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BUD_DEATH_BEGIN) + Call(PlayModelAnimation, VINE_1, VINE_1_BASE) + EndIf + Wait(19) + Call(OverrideBattleDmaDest, VINE_1_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BUD_DEATH_MIDDLE) + Call(PlayModelAnimation, VINE_1, VINE_1_BASE) + Call(GetActorVar, ACTOR_BUD_1, AVAR_Common_PiranhaState, LVar0) + IfEq(LVar0, PIRANHA_STATE_FIERY) + PlayEffect(EFFECT_EMBERS, 0, 67, 30, 2, 50, 40, Float(1.3), 30, 70, Float(1.2), Float(1.2), 0) + EndIf + Wait(96) + Call(OverrideBattleDmaDest, VINE_1_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BUD_DEATH_COLLAPSE) + Call(PlayModelAnimation, VINE_1, VINE_1_BASE) + Wait(30) + Call(GetActorVar, ACTOR_BUD_1, AVAR_Common_FlameSize, LVar0) + Set(LVar1, 100) + Loop(50) + Sub(LVar1, 2) + SetF(LVar2, LVar0) + MulF(LVar2, LVar1) + MulF(LVar2, Float(0.01)) + Call(SetActorVar, ACTOR_BUD_1, AVAR_Common_FlameSize, LVar2) + Wait(1) + EndLoop + EndThread + Thread + Wait(5) + Call(GetActorVar, ACTOR_BUD_2, AVAR_Common_PiranhaState, LVar0) + IfEq(LVar0, PIRANHA_STATE_STUNNED) + Call(OverrideBattleDmaDest, VINE_2_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BUD_STUNNED_DEATH_BEGIN) + Call(PlayModelAnimation, VINE_2, VINE_2_BASE) + Else + Call(OverrideBattleDmaDest, VINE_2_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BUD_DEATH_BEGIN) + Call(PlayModelAnimation, VINE_2, VINE_2_BASE) + EndIf + Wait(19) + Call(OverrideBattleDmaDest, VINE_2_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BUD_DEATH_MIDDLE) + Call(PlayModelAnimation, VINE_2, VINE_2_BASE) + Call(GetActorVar, ACTOR_BUD_2, AVAR_Common_PiranhaState, LVar0) + IfEq(LVar0, PIRANHA_STATE_FIERY) + PlayEffect(EFFECT_EMBERS, 0, 120, 35, 5, 50, 40, Float(1.3), 30, 70, Float(1.2), Float(1.2), 0) + EndIf + Wait(96) + Call(OverrideBattleDmaDest, VINE_2_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BUD_DEATH_COLLAPSE) + Call(PlayModelAnimation, VINE_2, VINE_2_BASE) + Wait(30) + Call(GetActorVar, ACTOR_BUD_2, AVAR_Common_FlameSize, LVar0) + Set(LVar1, 100) + Loop(50) + Sub(LVar1, 2) + SetF(LVar2, LVar0) + MulF(LVar2, LVar1) + MulF(LVar2, Float(0.01)) + Call(SetActorVar, ACTOR_BUD_2, AVAR_Common_FlameSize, LVar2) + Wait(1) + EndLoop + EndThread + Thread + Wait(150) + Set(LVar0, 14) + Loop(14) + Sub(LVar0, 1) + Call(SetAnimatedModelRootPosition, VINE_2, 50, LVar0, 20) + Wait(2) + EndLoop + EndThread + Wait(212) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_LANDING) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaPiranha_Anim0F) + Call(SetAnimation, ACTOR_BUD_1, PRT_MAIN, ANIM_LavaBud_Anim0F) + Call(SetAnimation, ACTOR_BUD_2, PRT_MAIN, ANIM_LavaBud_Anim0F) + PlayEffect(EFFECT_SHOCKWAVE, 0, -60, 0, 2, 0) + Thread + Call(N(StartRumbleWithParams), 180, 16) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(4.0)) + EndThread + Wait(3) + Call(SetActorPos, ACTOR_SELF, -60, 0, 0) + Call(DropStarPoints, ACTOR_SELF) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_DEATH) + Wait(15) + Call(GetActorVar, ACTOR_SELF, AVAR_Common_FlameEffect, LVar0) + IfNe(LVar0, NULL) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_FlameEffect, NULL) + Call(RemoveEffect, LVar0) + EndIf + Call(GetActorVar, ACTOR_BUD_1, AVAR_Common_FlameEffect, LVar0) + IfNe(LVar0, NULL) + Call(SetActorVar, ACTOR_BUD_1, AVAR_Common_FlameEffect, NULL) + Call(RemoveEffect, LVar0) + EndIf + Call(GetActorVar, ACTOR_BUD_2, AVAR_Common_FlameEffect, LVar0) + IfNe(LVar0, NULL) + Call(SetActorVar, ACTOR_BUD_2, AVAR_Common_FlameEffect, NULL) + Call(RemoveEffect, LVar0) + EndIf + Wait(5) + Call(SetActorFlagBits, ACTOR_BOSS, ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Call(SetPartFlagBits, ACTOR_BOSS, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_BOSS, PRT_TARGET, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetActorFlagBits, ACTOR_BUD_1, ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Call(SetActorFlagBits, ACTOR_BUD_2, ACTOR_FLAG_NO_DMG_APPLY, TRUE) + EndIf + Return + End }; s32 N(FakeoutMusicTime) = 0; EvtScript N(EVS_RemovePetitPiranha) = { - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorHP, LVar0, LVar1) - EVT_IF_EQ(LVar1, 0) - EVT_RETURN - EVT_END_IF - EVT_THREAD - EVT_CALL(SetAnimation, LVar0, 1, ANIM_PetitPiranha_Anim03) - EVT_WAIT(10) - EVT_SET(LVar2, 0) - EVT_LOOP(24) - EVT_CALL(SetPartRotation, LVar0, 1, 0, LVar2, 0) - EVT_ADD(LVar2, 30) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, LVar0, LVar3, LVar4, LVar5) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar3, LVar4, LVar5, 0, 0, 0, 0, 0) - EVT_SET(LVar3, 0) - EVT_LOOP(12) - EVT_CALL(SetPartRotation, LVar0, 1, LVar3, LVar2, 0) - EVT_ADD(LVar3, 8) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(RemoveActor, LVar0) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, 0) + Return + EndIf + Call(GetActorHP, LVar0, LVar1) + IfEq(LVar1, 0) + Return + EndIf + Thread + Call(SetAnimation, LVar0, 1, ANIM_PetitPiranha_Anim03) + Wait(10) + Set(LVar2, 0) + Loop(24) + Call(SetPartRotation, LVar0, 1, 0, LVar2, 0) + Add(LVar2, 30) + Wait(1) + EndLoop + Call(GetActorPos, LVar0, LVar3, LVar4, LVar5) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar3, LVar4, LVar5, 0, 0, 0, 0, 0) + Set(LVar3, 0) + Loop(12) + Call(SetPartRotation, LVar0, 1, LVar3, LVar2, 0) + Add(LVar3, 8) + Wait(1) + EndLoop + Call(RemoveActor, LVar0) + EndThread + Return + End }; s32 N(LavaPiranhaSinkPositions)[] = { @@ -1943,228 +1943,228 @@ API_CALLABLE(N(GetFlamePosition)) { } EvtScript N(EVS_Ignite) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ACTOR_BUD_1) - EVT_CALL(SetActorVar, ACTOR_BUD_1, AVAR_Common_FlameSize, 35) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 8, LVar1, LVar2, LVar3) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 8, LVar4, LVar5, LVar6) - EVT_SET(LVar7, 10) - EVT_SET(LVar8, -15) - EVT_CALL(N(GetFlamePosition), LVar1, LVar2, LVar6, LVar7, LVar8, LVar3, LVar4) - EVT_CALL(GetPartOffset, ACTOR_BUD_1, PRT_MAIN, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, LVar3, LVar4, LVar2, EVT_FLOAT(0.3), LVarA, 0) - EVT_CALL(SetActorVar, ACTOR_BUD_1, AVAR_Common_FlameEffect, LVarA) - EVT_CALL(SetIdleAnimations, ACTOR_BUD_1, PRT_MAIN, EVT_PTR(A(lava_bud_FieryAnims))) - EVT_CALL(SetDefenseTable, ACTOR_BUD_1, PRT_MAIN, EVT_PTR(A(lava_bud_FieryDefense))) - EVT_CALL(SetDefenseTable, ACTOR_BUD_1, PRT_TARGET, EVT_PTR(A(lava_bud_FieryDefense))) - EVT_CALL(SetPartEventBits, ACTOR_BUD_1, PRT_MAIN, ACTOR_EVENT_FLAG_FIREY, TRUE) - EVT_CALL(SetPartEventBits, ACTOR_BUD_1, PRT_TARGET, ACTOR_EVENT_FLAG_FIREY, TRUE) - EVT_CALL(SetActorVar, ACTOR_BUD_1, AVAR_Common_UnkAnim1, ANIM_LavaBud_Anim04) - EVT_CALL(SetActorVar, ACTOR_BUD_1, AVAR_Common_UnkAnim2, ANIM_LavaBud_Anim0B) - EVT_CALL(SetActorVar, ACTOR_BUD_1, AVAR_Common_PiranhaState, PIRANHA_STATE_FIERY) - EVT_CALL(SetPartFlagBits, ACTOR_BUD_1, PRT_TARGET, ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(SetActorFlagBits, ACTOR_BUD_1, ACTOR_FLAG_NO_HEALTH_BAR, FALSE) - EVT_CASE_EQ(ACTOR_BUD_2) - EVT_CALL(SetActorVar, ACTOR_BUD_2, AVAR_Common_FlameSize, 35) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 8, LVar1, LVar2, LVar3) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 8, LVar4, LVar5, LVar6) - EVT_SET(LVar7, 10) - EVT_SET(LVar8, -15) - EVT_CALL(N(GetFlamePosition), LVar1, LVar2, LVar6, LVar7, LVar8, LVar3, LVar4) - EVT_CALL(GetPartOffset, ACTOR_BUD_2, PRT_MAIN, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, LVar3, LVar4, LVar2, EVT_FLOAT(0.3), LVarA, 0) - EVT_CALL(SetActorVar, ACTOR_BUD_2, AVAR_Common_FlameEffect, LVarA) - EVT_CALL(SetIdleAnimations, ACTOR_BUD_2, PRT_MAIN, EVT_PTR(A(lava_bud_FieryAnims))) - EVT_CALL(SetDefenseTable, ACTOR_BUD_2, PRT_MAIN, EVT_PTR(A(lava_bud_FieryDefense))) - EVT_CALL(SetDefenseTable, ACTOR_BUD_2, PRT_TARGET, EVT_PTR(A(lava_bud_FieryDefense))) - EVT_CALL(SetPartEventBits, ACTOR_BUD_2, PRT_MAIN, ACTOR_EVENT_FLAG_FIREY, TRUE) - EVT_CALL(SetPartEventBits, ACTOR_BUD_2, PRT_TARGET, ACTOR_EVENT_FLAG_FIREY, TRUE) - EVT_CALL(SetActorVar, ACTOR_BUD_2, AVAR_Common_UnkAnim1, ANIM_LavaBud_Anim04) - EVT_CALL(SetActorVar, ACTOR_BUD_2, AVAR_Common_UnkAnim2, ANIM_LavaBud_Anim0B) - EVT_CALL(SetActorVar, ACTOR_BUD_2, AVAR_Common_PiranhaState, PIRANHA_STATE_FIERY) - EVT_CALL(SetPartFlagBits, ACTOR_BUD_2, PRT_TARGET, ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(SetActorFlagBits, ACTOR_BUD_2, ACTOR_FLAG_NO_HEALTH_BAR, FALSE) - EVT_CASE_DEFAULT - EVT_CALL(SetActorVar, ACTOR_BOSS, AVAR_Common_FlameSize, 70) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 10, LVar1, LVar2, LVar3) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 10, LVar4, LVar5, LVar6) - EVT_SET(LVar7, 30) - EVT_SET(LVar8, -30) - EVT_CALL(N(GetFlamePosition), LVar1, LVar2, LVar6, LVar7, LVar8, LVar3, LVar4) - EVT_CALL(GetPartOffset, ACTOR_BOSS, PRT_MAIN, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, LVar3, LVar4, LVar2, EVT_FLOAT(0.7), LVarA, 0) - EVT_CALL(SetActorVar, ACTOR_BOSS, AVAR_Common_FlameEffect, LVarA) - EVT_CALL(SetIdleAnimations, ACTOR_BOSS, PRT_MAIN, EVT_PTR(N(FieryAnims))) - EVT_CALL(SetDefenseTable, ACTOR_BOSS, PRT_MAIN, EVT_PTR(N(FieryDefense))) - EVT_CALL(SetDefenseTable, ACTOR_BOSS, PRT_TARGET, EVT_PTR(N(FieryDefense))) - EVT_CALL(SetPartEventBits, ACTOR_BOSS, PRT_MAIN, ACTOR_EVENT_FLAG_FIREY, TRUE) - EVT_CALL(SetPartEventBits, ACTOR_BOSS, PRT_TARGET, ACTOR_EVENT_FLAG_FIREY, TRUE) - EVT_CALL(SetActorVar, ACTOR_BOSS, AVAR_Common_UnkAnim1, ANIM_LavaPiranha_Anim04) - EVT_CALL(SetActorVar, ACTOR_BOSS, AVAR_Common_UnkAnim2, ANIM_LavaPiranha_Anim0A) - EVT_CALL(SetActorVar, ACTOR_BOSS, AVAR_Common_PiranhaState, PIRANHA_STATE_FIERY) - EVT_CALL(ForceHomePos, ACTOR_SELF, 61, 61, 0) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_HEALTH_BAR, FALSE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(ACTOR_BUD_1) + Call(SetActorVar, ACTOR_BUD_1, AVAR_Common_FlameSize, 35) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 8, LVar1, LVar2, LVar3) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 8, LVar4, LVar5, LVar6) + Set(LVar7, 10) + Set(LVar8, -15) + Call(N(GetFlamePosition), LVar1, LVar2, LVar6, LVar7, LVar8, LVar3, LVar4) + Call(GetPartOffset, ACTOR_BUD_1, PRT_MAIN, LVar0, LVar1, LVar2) + Sub(LVar2, 3) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, LVar3, LVar4, LVar2, Float(0.3), LVarA, 0) + Call(SetActorVar, ACTOR_BUD_1, AVAR_Common_FlameEffect, LVarA) + Call(SetIdleAnimations, ACTOR_BUD_1, PRT_MAIN, Ref(A(lava_bud_FieryAnims))) + Call(SetDefenseTable, ACTOR_BUD_1, PRT_MAIN, Ref(A(lava_bud_FieryDefense))) + Call(SetDefenseTable, ACTOR_BUD_1, PRT_TARGET, Ref(A(lava_bud_FieryDefense))) + Call(SetPartEventBits, ACTOR_BUD_1, PRT_MAIN, ACTOR_EVENT_FLAG_FIREY, TRUE) + Call(SetPartEventBits, ACTOR_BUD_1, PRT_TARGET, ACTOR_EVENT_FLAG_FIREY, TRUE) + Call(SetActorVar, ACTOR_BUD_1, AVAR_Common_UnkAnim1, ANIM_LavaBud_Anim04) + Call(SetActorVar, ACTOR_BUD_1, AVAR_Common_UnkAnim2, ANIM_LavaBud_Anim0B) + Call(SetActorVar, ACTOR_BUD_1, AVAR_Common_PiranhaState, PIRANHA_STATE_FIERY) + Call(SetPartFlagBits, ACTOR_BUD_1, PRT_TARGET, ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(SetActorFlagBits, ACTOR_BUD_1, ACTOR_FLAG_NO_HEALTH_BAR, FALSE) + CaseEq(ACTOR_BUD_2) + Call(SetActorVar, ACTOR_BUD_2, AVAR_Common_FlameSize, 35) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 8, LVar1, LVar2, LVar3) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 8, LVar4, LVar5, LVar6) + Set(LVar7, 10) + Set(LVar8, -15) + Call(N(GetFlamePosition), LVar1, LVar2, LVar6, LVar7, LVar8, LVar3, LVar4) + Call(GetPartOffset, ACTOR_BUD_2, PRT_MAIN, LVar0, LVar1, LVar2) + Sub(LVar2, 3) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, LVar3, LVar4, LVar2, Float(0.3), LVarA, 0) + Call(SetActorVar, ACTOR_BUD_2, AVAR_Common_FlameEffect, LVarA) + Call(SetIdleAnimations, ACTOR_BUD_2, PRT_MAIN, Ref(A(lava_bud_FieryAnims))) + Call(SetDefenseTable, ACTOR_BUD_2, PRT_MAIN, Ref(A(lava_bud_FieryDefense))) + Call(SetDefenseTable, ACTOR_BUD_2, PRT_TARGET, Ref(A(lava_bud_FieryDefense))) + Call(SetPartEventBits, ACTOR_BUD_2, PRT_MAIN, ACTOR_EVENT_FLAG_FIREY, TRUE) + Call(SetPartEventBits, ACTOR_BUD_2, PRT_TARGET, ACTOR_EVENT_FLAG_FIREY, TRUE) + Call(SetActorVar, ACTOR_BUD_2, AVAR_Common_UnkAnim1, ANIM_LavaBud_Anim04) + Call(SetActorVar, ACTOR_BUD_2, AVAR_Common_UnkAnim2, ANIM_LavaBud_Anim0B) + Call(SetActorVar, ACTOR_BUD_2, AVAR_Common_PiranhaState, PIRANHA_STATE_FIERY) + Call(SetPartFlagBits, ACTOR_BUD_2, PRT_TARGET, ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(SetActorFlagBits, ACTOR_BUD_2, ACTOR_FLAG_NO_HEALTH_BAR, FALSE) + CaseDefault + Call(SetActorVar, ACTOR_BOSS, AVAR_Common_FlameSize, 70) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 10, LVar1, LVar2, LVar3) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 10, LVar4, LVar5, LVar6) + Set(LVar7, 30) + Set(LVar8, -30) + Call(N(GetFlamePosition), LVar1, LVar2, LVar6, LVar7, LVar8, LVar3, LVar4) + Call(GetPartOffset, ACTOR_BOSS, PRT_MAIN, LVar0, LVar1, LVar2) + Sub(LVar2, 3) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, LVar3, LVar4, LVar2, Float(0.7), LVarA, 0) + Call(SetActorVar, ACTOR_BOSS, AVAR_Common_FlameEffect, LVarA) + Call(SetIdleAnimations, ACTOR_BOSS, PRT_MAIN, Ref(N(FieryAnims))) + Call(SetDefenseTable, ACTOR_BOSS, PRT_MAIN, Ref(N(FieryDefense))) + Call(SetDefenseTable, ACTOR_BOSS, PRT_TARGET, Ref(N(FieryDefense))) + Call(SetPartEventBits, ACTOR_BOSS, PRT_MAIN, ACTOR_EVENT_FLAG_FIREY, TRUE) + Call(SetPartEventBits, ACTOR_BOSS, PRT_TARGET, ACTOR_EVENT_FLAG_FIREY, TRUE) + Call(SetActorVar, ACTOR_BOSS, AVAR_Common_UnkAnim1, ANIM_LavaPiranha_Anim04) + Call(SetActorVar, ACTOR_BOSS, AVAR_Common_UnkAnim2, ANIM_LavaPiranha_Anim0A) + Call(SetActorVar, ACTOR_BOSS, AVAR_Common_PiranhaState, PIRANHA_STATE_FIERY) + Call(ForceHomePos, ACTOR_SELF, 61, 61, 0) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_HEALTH_BAR, FALSE) + EndSwitch + Return + End }; EvtScript N(EVS_ComboHit) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) - EVT_IF_EQ(LVar0, PIRANHA_STATE_DEAD) - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar0) - EVT_IF_LT(LVar0, 4) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_STUNNED_LIGHT_HIT) - EVT_ELSE - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_STUNNED_HEAVY_HIT) - EVT_END_IF - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_WAIT(29) - EVT_WAIT(14) - EVT_ELSE - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar0) - EVT_IF_LT(LVar0, 4) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_LIGHT_HIT) - EVT_ELSE - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_HEAVY_HIT) - EVT_END_IF - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_WAIT(29) - EVT_WAIT(14) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, LVar0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) + IfEq(LVar0, PIRANHA_STATE_DEAD) + Call(GetLastDamage, ACTOR_SELF, LVar0) + IfLt(LVar0, 4) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_STUNNED_LIGHT_HIT) + Else + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_STUNNED_HEAVY_HIT) + EndIf + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Wait(29) + Wait(14) + Else + Call(GetLastDamage, ACTOR_SELF, LVar0) + IfLt(LVar0, 4) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_LIGHT_HIT) + Else + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_HEAVY_HIT) + EndIf + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Wait(29) + Wait(14) + EndIf + Return + End }; EvtScript N(EVS_Hit) = { - EVT_EXEC_WAIT(N(EVS_Hit_Inner)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_Hit_Inner)) + Return + End }; EvtScript N(EVS_Hit_Inner) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, LVar0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) // first phase - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_IsSecondPhase, LVar0) - EVT_IF_FALSE(LVar0) - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar0) - EVT_IF_LT(LVar0, 4) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_LIGHT_HIT) - EVT_ELSE - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_HEAVY_HIT) - EVT_END_IF - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_WAIT(29) - EVT_WAIT(14) - EVT_RETURN - EVT_END_IF + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_IsSecondPhase, LVar0) + IfFalse(LVar0) + Call(GetLastDamage, ACTOR_SELF, LVar0) + IfLt(LVar0, 4) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_LIGHT_HIT) + Else + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_HEAVY_HIT) + EndIf + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Wait(29) + Wait(14) + Return + EndIf // second phase - EVT_IF_FLAG(LVarE, DAMAGE_TYPE_WATER | DAMAGE_TYPE_ICE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) - EVT_IF_EQ(LVar0, PIRANHA_STATE_STUNNED) - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar0) - EVT_IF_LT(LVar0, 4) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_STUNNED_LIGHT_HIT) - EVT_ELSE - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_STUNNED_HEAVY_HIT) - EVT_END_IF - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_WAIT(29) - EVT_WAIT(14) - EVT_ELSE - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_StunTurnsLeft, 2) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_HEAVY_HIT) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_FlameEffect, LVar0) - EVT_IF_NE(LVar0, NULL) - EVT_CALL(RemoveEffect, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_FlameEffect, NULL) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_COLD_BREATH, 0, LVar0, LVar1, LVar2, EVT_FLOAT(3.0), 50, 0) - EVT_END_IF - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(StunnedAnims))) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(StunnedDefense))) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_TARGET, EVT_PTR(N(StunnedDefense))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim1, ANIM_LavaPiranha_Anim0A) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, ANIM_LavaPiranha_Anim09) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FIREY, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_TARGET, ACTOR_EVENT_FLAG_FIREY, FALSE) - EVT_WAIT(29) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LAVA_PIRANHA_WITHER) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_STUN) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_WAIT(14) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, PIRANHA_STATE_STUNNED) - EVT_END_IF - EVT_ELSE - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) - EVT_IF_EQ(LVar0, PIRANHA_STATE_STUNNED) - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar0) - EVT_IF_LT(LVar0, 4) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_STUNNED_LIGHT_HIT) - EVT_ELSE - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_STUNNED_HEAVY_HIT) - EVT_END_IF - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_WAIT(29) - EVT_WAIT(14) - EVT_ELSE - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar0) - EVT_IF_LT(LVar0, 4) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_LIGHT_HIT) - EVT_ELSE - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_HEAVY_HIT) - EVT_END_IF - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_PLAY_EFFECT(EFFECT_EMBERS, 0, 80, 50, 0, 60, 50, EVT_FLOAT(1.5), 36, 42, EVT_FLOAT(0.8), EVT_FLOAT(0.8), 0) - EVT_WAIT(29) - EVT_WAIT(14) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfFlag(LVarE, DAMAGE_TYPE_WATER | DAMAGE_TYPE_ICE) + Call(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) + IfEq(LVar0, PIRANHA_STATE_STUNNED) + Call(GetLastDamage, ACTOR_SELF, LVar0) + IfLt(LVar0, 4) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_STUNNED_LIGHT_HIT) + Else + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_STUNNED_HEAVY_HIT) + EndIf + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Wait(29) + Wait(14) + Else + Call(SetActorVar, ACTOR_SELF, AVAR_Common_StunTurnsLeft, 2) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_HEAVY_HIT) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Call(GetActorVar, ACTOR_SELF, AVAR_Common_FlameEffect, LVar0) + IfNe(LVar0, NULL) + Call(RemoveEffect, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_FlameEffect, NULL) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_COLD_BREATH, 0, LVar0, LVar1, LVar2, Float(3.0), 50, 0) + EndIf + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(StunnedAnims))) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(StunnedDefense))) + Call(SetDefenseTable, ACTOR_SELF, PRT_TARGET, Ref(N(StunnedDefense))) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim1, ANIM_LavaPiranha_Anim0A) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim2, ANIM_LavaPiranha_Anim09) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FIREY, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_TARGET, ACTOR_EVENT_FLAG_FIREY, FALSE) + Wait(29) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LAVA_PIRANHA_WITHER) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_STUN) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Wait(14) + Call(SetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, PIRANHA_STATE_STUNNED) + EndIf + Else + Call(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) + IfEq(LVar0, PIRANHA_STATE_STUNNED) + Call(GetLastDamage, ACTOR_SELF, LVar0) + IfLt(LVar0, 4) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_STUNNED_LIGHT_HIT) + Else + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_STUNNED_HEAVY_HIT) + EndIf + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Wait(29) + Wait(14) + Else + Call(GetLastDamage, ACTOR_SELF, LVar0) + IfLt(LVar0, 4) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_LIGHT_HIT) + Else + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_HEAVY_HIT) + EndIf + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + PlayEffect(EFFECT_EMBERS, 0, 80, 50, 0, 60, 50, Float(1.5), 36, 42, Float(0.8), Float(0.8), 0) + Wait(29) + Wait(14) + EndIf + EndIf + Return + End }; EvtScript N(EVS_PlayIdleAnimation) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim1, LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_IsSecondPhase, LVar0) - EVT_IF_FALSE(LVar0) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_IDLE) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) - EVT_IF_EQ(LVar0, PIRANHA_STATE_STUNNED) - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_TWITCH) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_ELSE - EVT_CALL(OverrideBattleDmaDest, VINE_0_BASE) - EVT_CALL(LoadBattleDmaData, VINE_ANIM_BOSS_IDLE) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_Common_UnkAnim1, LVar0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_IsSecondPhase, LVar0) + IfFalse(LVar0) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_IDLE) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Common_PiranhaState, LVar0) + IfEq(LVar0, PIRANHA_STATE_STUNNED) + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_TWITCH) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Else + Call(OverrideBattleDmaDest, VINE_0_BASE) + Call(LoadBattleDmaData, VINE_ANIM_BOSS_IDLE) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + EndIf + Return + End }; diff --git a/src/battle/area/kzn2/actor/petit_piranha.c b/src/battle/area/kzn2/actor/petit_piranha.c index 8106badff52..a572a6c6cfc 100644 --- a/src/battle/area/kzn2/actor/petit_piranha.c +++ b/src/battle/area/kzn2/actor/petit_piranha.c @@ -106,132 +106,132 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetEnemyHP, ACTOR_SELF, 1) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetEnemyHP, ACTOR_SELF, 1) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PetitPiranha_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PetitPiranha_Anim03) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PetitPiranha_Anim03) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PetitPiranha_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PetitPiranha_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PetitPiranha_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PetitPiranha_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PetitPiranha_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PetitPiranha_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PetitPiranha_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PetitPiranha_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_SPIKE_TAUNT) - EVT_CASE_OR_EQ(EVENT_BURN_TAUNT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_PetitPiranha_Anim03) - EVT_WAIT(60) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PetitPiranha_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PetitPiranha_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PetitPiranha_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_30) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PetitPiranha_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(1000) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PetitPiranha_Anim03) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PetitPiranha_Anim03) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PetitPiranha_Anim03) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + Wait(10) + ExecWait(N(EVS_Death)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PetitPiranha_Anim03) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PetitPiranha_Anim03) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PetitPiranha_Anim03) + ExecWait(EVS_Enemy_SpinSmashHit) + ExecWait(N(EVS_Death)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PetitPiranha_Anim03) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PetitPiranha_Anim03) + ExecWait(EVS_Enemy_ShockHit) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PetitPiranha_Anim03) + ExecWait(EVS_Enemy_ShockHit) + ExecWait(N(EVS_Death)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PetitPiranha_Anim03) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PetitPiranha_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseOrEq(EVENT_SPIKE_TAUNT) + CaseOrEq(EVENT_BURN_TAUNT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_PetitPiranha_Anim03) + Wait(60) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PetitPiranha_Anim03) + ExecWait(EVS_Enemy_Hit) + Wait(10) + ExecWait(N(EVS_Death)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PetitPiranha_Anim03) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PetitPiranha_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_30) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PetitPiranha_Anim03) + ExecWait(EVS_Enemy_Hit) + Wait(1000) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; // unused EvtScript N(EVS_AbsorbDamage) = { - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 0) - EVT_ADD(LVar0, 20) - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar3) - EVT_PLAY_EFFECT(EFFECT_RECOVER, 0, LVar0, LVar1, LVar2, LVar3, 0) - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_ADD(LVar0, LVar3) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar1) - EVT_IF_GT(LVar0, LVar1) - EVT_SET(LVar0, LVar1) - EVT_END_IF - EVT_CALL(SetEnemyHP, ACTOR_SELF, LVar0) - EVT_RETURN - EVT_END + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, Float(1.0), 0) + Add(LVar0, 20) + Call(GetLastDamage, ACTOR_SELF, LVar3) + PlayEffect(EFFECT_RECOVER, 0, LVar0, LVar1, LVar2, LVar3, 0) + Call(GetActorHP, ACTOR_SELF, LVar0) + Add(LVar0, LVar3) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar1) + IfGt(LVar0, LVar1) + Set(LVar0, LVar1) + EndIf + Call(SetEnemyHP, ACTOR_SELF, LVar0) + Return + End }; API_CALLABLE(N(SetFlameScaleH)) { @@ -255,158 +255,158 @@ API_CALLABLE(N(SetFlamePosX)) { } EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_IF_GE(LVar1, 41) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_PetitPiranha_Anim04) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(SetBattleCamZoom, 380) - EVT_CALL(SetBattleCamOffsetZ, -20) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_PetitPiranha_Anim06) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 15) - EVT_ADD(LVar1, 15) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_SELF, 20, -12, EASING_LINEAR) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(SetBattleCamZoom, 380) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_PetitPiranha_Anim03) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PETIT_PIRANHA_ASCEND) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_SELF, 20, 0, EASING_LINEAR) - EVT_WAIT(10) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PETIT_PIRANHA_DIVE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 5, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_PetitPiranha_Anim05) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -16, EASING_QUARTIC_IN) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_SET(LVar1, 0) - EVT_ADD(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), LVarA, 0) - EVT_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_CALL(MakeLerp, 0, 30, 21, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(LVar4, LVar3) - EVT_SUB(LVar4, LVar0) - EVT_CALL(N(SetFlamePosX), LVarA, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(MakeLerp, 140, 160, 2, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_MULF(LVar0, EVT_FLOAT(0.01)) - EVT_CALL(N(SetFlameScaleH), LVarA, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar9, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar9) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(MakeLerp, 160, 10, 20, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_MULF(LVar0, EVT_FLOAT(0.01)) - EVT_CALL(N(SetFlameScaleH), LVarA, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(1) - EVT_CALL(RemoveEffect, LVarA) - EVT_IF_EQ(LVar9, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_WAIT(2) - EVT_SET(LVar8, DMG_IMPACT) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar9, DAMAGE_TYPE_FIRE, SUPPRESS_EVENT_ALL, 0, LVar8, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar9) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_CALL(MakeLerp, 160, 10, 20, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_MULF(LVar0, EVT_FLOAT(0.01)) - EVT_CALL(N(SetFlameScaleH), LVarA, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(1) - EVT_CALL(RemoveEffect, LVarA) - EVT_WAIT(15) - EVT_IF_EQ(LVar9, 10) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + IfGe(LVar1, 41) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_PetitPiranha_Anim04) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(SetBattleCamZoom, 380) + Call(SetBattleCamOffsetZ, -20) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_PetitPiranha_Anim06) + Call(SetActorSpeed, ACTOR_SELF, Float(2.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 15) + Add(LVar1, 15) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_SELF, 20, -12, EASING_LINEAR) + Else + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(SetBattleCamZoom, 380) + Call(SetBattleCamOffsetZ, 0) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_PetitPiranha_Anim03) + Call(SetActorSpeed, ACTOR_SELF, Float(2.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PETIT_PIRANHA_ASCEND) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_SELF, 20, 0, EASING_LINEAR) + Wait(10) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PETIT_PIRANHA_DIVE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 10) + Call(SetGoalPos, ACTOR_SELF, LVar0, 5, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_PetitPiranha_Anim05) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(8.0)) + Call(FlyToGoal, ACTOR_SELF, 0, -16, EASING_QUARTIC_IN) + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 10) + Set(LVar1, 0) + Add(LVar2, 2) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, LVar0, LVar1, LVar2, Float(0.3), LVarA, 0) + Thread + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Call(MakeLerp, 0, 30, 21, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Set(LVar4, LVar3) + Sub(LVar4, LVar0) + Call(N(SetFlamePosX), LVarA, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(MakeLerp, 140, 160, 2, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + MulF(LVar0, Float(0.01)) + Call(N(SetFlameScaleH), LVarA, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(EnemyTestTarget, ACTOR_SELF, LVar9, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar9) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(MakeLerp, 160, 10, 20, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + MulF(LVar0, Float(0.01)) + Call(N(SetFlameScaleH), LVarA, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(1) + Call(RemoveEffect, LVarA) + IfEq(LVar9, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ExecWait(N(EVS_Death)) + Call(RemoveActor, ACTOR_SELF) + Return + EndCaseGroup + EndSwitch + Wait(2) + Set(LVar8, DMG_IMPACT) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar9, DAMAGE_TYPE_FIRE, SUPPRESS_EVENT_ALL, 0, LVar8, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar9) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Call(MakeLerp, 160, 10, 20, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + MulF(LVar0, Float(0.01)) + Call(N(SetFlameScaleH), LVarA, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(1) + Call(RemoveEffect, LVarA) + Wait(15) + IfEq(LVar9, 10) + Return + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + EndCaseGroup + EndSwitch + ExecWait(N(EVS_Death)) + Call(RemoveActor, ACTOR_SELF) + Return + End }; EvtScript N(EVS_Death) = { - EVT_CALL(ActorExists, ACTOR_BOSS, LVar0) - EVT_IF_FALSE(LVar0) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorHP, ACTOR_BOSS, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Petit_Parent, LVar0) - EVT_CALL(GetActorVar, LVar0, AVAR_Bud_PetitCount, LVar1) - EVT_SUB(LVar1, 1) - EVT_CALL(SetActorVar, LVar0, AVAR_Bud_PetitCount, LVar1) - EVT_RETURN - EVT_END + Call(ActorExists, ACTOR_BOSS, LVar0) + IfFalse(LVar0) + Return + EndIf + Call(GetActorHP, ACTOR_BOSS, LVar0) + IfEq(LVar0, 0) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Petit_Parent, LVar0) + Call(GetActorVar, LVar0, AVAR_Bud_PetitCount, LVar1) + Sub(LVar1, 1) + Call(SetActorVar, LVar0, AVAR_Bud_PetitCount, LVar1) + Return + End }; diff --git a/src/battle/area/kzn2/actor/petit_piranha_bomb.c b/src/battle/area/kzn2/actor/petit_piranha_bomb.c index 19695eb4ce5..eb8a32c83ce 100644 --- a/src/battle/area/kzn2/actor/petit_piranha_bomb.c +++ b/src/battle/area/kzn2/actor/petit_piranha_bomb.c @@ -99,33 +99,33 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Goto(0) + Return + End }; diff --git a/src/battle/area/mac/actor/chan.c b/src/battle/area/mac/actor/chan.c index 475b56f439c..184ded55e9d 100644 --- a/src/battle/area/mac/actor/chan.c +++ b/src/battle/area/mac/actor/chan.c @@ -151,810 +151,810 @@ s32 N(ToppledAnims)[] = { // seems to be copied directly from buzzy_beetle.c EvtScript N(EVS_SetInitialState) = { - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsCeiling, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Ceiling) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 0, 10, 0) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn_Ceiling))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent_Ceiling))) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, FALSE) - EVT_ELSE - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Upright) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 16) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -9) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn_Ground))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent_Ground))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(UprightAnims))) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, TRUE) - EVT_END_IF - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(GetActorVar, ACTOR_SELF, AVAR_IsCeiling, LVar0) + IfEq(LVar0, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Ceiling) + Call(N(SetAbsoluteStatusOffsets), -10, 0, 10, 0) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn_Ceiling))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent_Ceiling))) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, FALSE) + Else + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Upright) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 16) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -9) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn_Ground))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent_Ground))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(UprightAnims))) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, TRUE) + EndIf + Call(HPBarToHome, ACTOR_SELF) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_FallFromCeiling) = { - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Toppled) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 16) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -9) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn_Ground))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent_Ground))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 1) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledDefenseTable))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledAnims))) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, TRUE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_ToppledHurt) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 24) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(GetIndexFromPos, ACTOR_SELF, LVarA) - EVT_MOD(LVarA, 4) - EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVarA) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(SetHomePos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_SET(LVarD, LVarA) - EVT_SET(LVarE, LVarB) - EVT_SET(LVarF, LVarC) - EVT_SUB(LVarD, LVar0) - EVT_SUB(LVarE, LVar1) - EVT_SUB(LVarF, LVar2) - EVT_DIV(LVarD, 2) - EVT_DIV(LVarE, 2) - EVT_DIV(LVarF, 2) - EVT_ADD(LVar0, LVarD) - EVT_ADD(LVar1, LVarE) - EVT_ADD(LVar2, LVarF) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_Toppled) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(HideHealthBar, ACTOR_SELF) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Toppled) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 16) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -9) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn_Ground))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent_Ground))) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 1) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledDefenseTable))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledAnims))) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, TRUE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_ToppledHurt) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 24) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(GetIndexFromPos, ACTOR_SELF, LVarA) + Mod(LVarA, 4) + Call(SetGoalToIndex, ACTOR_SELF, LVarA) + Call(GetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(SetHomePos, ACTOR_SELF, LVarA, LVarB, LVarC) + Set(LVarD, LVarA) + Set(LVarE, LVarB) + Set(LVarF, LVarC) + Sub(LVarD, LVar0) + Sub(LVarE, LVar1) + Sub(LVarF, LVar2) + Div(LVarD, 2) + Div(LVarE, 2) + Div(LVarF, 2) + Add(LVar0, LVarD) + Add(LVar1, LVarE) + Add(LVar2, LVarF) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_Toppled) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(HPBarToHome, ACTOR_SELF) + Return + End }; EvtScript N(EVS_HandleEvent_Ceiling) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_FallFromCeiling)) - EVT_CASE_EQ(EVENT_FLIP_TRIGGER) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_FallFromCeiling)) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Hurt) - EVT_SET_CONST(LVar2, ANIM_Chan_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_FallFromCeiling)) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Hurt) - EVT_SET_CONST(LVar2, ANIM_Chan_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Run) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_ZERO_DAMAGE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_EnterShell) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_EnterShell) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_WAIT(2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_STOP) - EVT_EXEC_WAIT(N(EVS_FallFromCeiling)) - EVT_END_IF - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Hurt) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Hurt) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_FallFromCeiling)) + CaseEq(EVENT_FLIP_TRIGGER) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Hurt) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_FallFromCeiling)) + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Hurt) + SetConst(LVar2, ANIM_Chan_Hurt) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_FallFromCeiling)) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Hurt) + SetConst(LVar2, ANIM_Chan_Hurt) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Hurt) + ExecWait(EVS_Enemy_Knockback) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Run) + ExecWait(EVS_Enemy_ReturnHome) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_ZERO_DAMAGE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_EnterShell) + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_EnterShell) + ExecWait(EVS_Enemy_NoDamageHit) + Wait(2) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_STOP) + ExecWait(N(EVS_FallFromCeiling)) + EndIf + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) // nothing - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, TRUE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Run) - EVT_SET_CONST(LVar2, ANIM_Chan_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + CaseEq(EVENT_SCARE_AWAY) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, TRUE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Run) + SetConst(LVar2, ANIM_Chan_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; // switch the anim on LVar1 if toppled EvtScript N(EVS_CheckToppleAnim) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar3) - EVT_IF_EQ(LVar3, AVAL_State_Toppled) - EVT_SET(LVar1, LVar2) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar3) + IfEq(LVar3, AVAL_State_Toppled) + Set(LVar1, LVar2) + EndIf + Return + End }; s32 N(FlipPosOffsets)[] = { 7, 13, 17, 21, 23, 24, 23, 21, 17, 13, 7, 0, 4, 7, 6, 4, 0, 2, 0 }; EvtScript N(EVS_HandleEvent_Ground) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Hurt) - EVT_SET_CONST(LVar2, ANIM_Chan_ToppledHurt) - EVT_EXEC_WAIT(N(EVS_CheckToppleAnim)) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_NE(LVar0, AVAL_State_Toppled) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Hurt) - EVT_SET_CONST(LVar2, ANIM_Chan_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_ToppledBurnHurt) - EVT_SET_CONST(LVar2, ANIM_Chan_ToppledBurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_END_IF - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_NE(LVar0, AVAL_State_Toppled) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Hurt) - EVT_SET_CONST(LVar2, ANIM_Chan_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_ToppledBurnHurt) - EVT_SET_CONST(LVar2, ANIM_Chan_ToppledBurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_ToppledBurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_END_IF - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Hurt) - EVT_SET_CONST(LVar2, ANIM_Chan_ToppledHurt) - EVT_EXEC_WAIT(N(EVS_CheckToppleAnim)) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_FLIP_TRIGGER) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Toppled) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 16) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -9) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 1) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledDefenseTable))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledAnims))) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_Hurt) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -45) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -90) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -135) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -180) - EVT_WAIT(1) - EVT_END_THREAD - EVT_USE_BUF(EVT_PTR(N(FlipPosOffsets))) - EVT_LOOP(19) - EVT_BUF_READ1(LVar0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_ToppledHurt) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Run) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_ZERO_DAMAGE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Upright) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_EnterShell) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_ExitShell) - EVT_WAIT(8) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Toppled) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_CASE_EQ(EVENT_IMMUNE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Upright) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_EnterShell) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_ExitShell) - EVT_WAIT(8) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Toppled) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_CASE_EQ(EVENT_SPIKE_TAUNT) - EVT_WAIT(10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 9) - EVT_ELSE - EVT_ADD(LVar1, 24) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) - EVT_WAIT(20) - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Hurt) - EVT_SET_CONST(LVar2, ANIM_Chan_ToppledHurt) - EVT_EXEC_WAIT(N(EVS_CheckToppleAnim)) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Hurt) - EVT_SET_CONST(LVar2, ANIM_Chan_ToppledHurt) - EVT_EXEC_WAIT(N(EVS_CheckToppleAnim)) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Hurt) - EVT_SET_CONST(LVar2, ANIM_Chan_ToppledHurt) - EVT_EXEC_WAIT(N(EVS_CheckToppleAnim)) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Hurt) - EVT_SET_CONST(LVar2, ANIM_Chan_ToppledHurt) - EVT_EXEC_WAIT(N(EVS_CheckToppleAnim)) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Upright) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_END_IF - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Upright) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Run) - EVT_SET_CONST(LVar2, ANIM_Chan_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Toppled) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Upright) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Run) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Toppled) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Upright) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Hurt) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_ToppledHurt) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Upright) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_EnterShell) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_ExitShell) - EVT_WAIT(8) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Toppled) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Hurt) + SetConst(LVar2, ANIM_Chan_ToppledHurt) + ExecWait(N(EVS_CheckToppleAnim)) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfNe(LVar0, AVAL_State_Toppled) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Hurt) + SetConst(LVar2, ANIM_Chan_Hurt) + ExecWait(EVS_Enemy_BurnHit) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_ToppledBurnHurt) + SetConst(LVar2, ANIM_Chan_ToppledBurnStill) + ExecWait(EVS_Enemy_BurnHit) + EndIf + CaseEq(EVENT_BURN_DEATH) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfNe(LVar0, AVAL_State_Toppled) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Hurt) + SetConst(LVar2, ANIM_Chan_Hurt) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Hurt) + ExecWait(EVS_Enemy_Death) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_ToppledBurnHurt) + SetConst(LVar2, ANIM_Chan_ToppledBurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_ToppledBurnStill) + ExecWait(EVS_Enemy_Death) + EndIf + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Hurt) + SetConst(LVar2, ANIM_Chan_ToppledHurt) + ExecWait(N(EVS_CheckToppleAnim)) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_FLIP_TRIGGER) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Toppled) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 16) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -9) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 1) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledDefenseTable))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledAnims))) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_Hurt) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Thread + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -45) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -90) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -135) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -180) + Wait(1) + EndThread + UseBuf(Ref(N(FlipPosOffsets))) + Loop(19) + BufRead1(LVar0) + Call(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_ToppledHurt) + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Hurt) + ExecWait(EVS_Enemy_Knockback) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Run) + ExecWait(EVS_Enemy_ReturnHome) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_ZERO_DAMAGE) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfEq(LVar0, AVAL_State_Upright) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_EnterShell) + ExecWait(EVS_Enemy_NoDamageHit) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_ExitShell) + Wait(8) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Toppled) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + CaseEq(EVENT_IMMUNE) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfEq(LVar0, AVAL_State_Upright) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_EnterShell) + ExecWait(EVS_Enemy_NoDamageHit) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_ExitShell) + Wait(8) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Toppled) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + CaseEq(EVENT_SPIKE_TAUNT) + Wait(10) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar1, 9) + Else + Add(LVar1, 24) + EndIf + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) + Wait(20) + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Hurt) + SetConst(LVar2, ANIM_Chan_ToppledHurt) + ExecWait(N(EVS_CheckToppleAnim)) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Hurt) + SetConst(LVar2, ANIM_Chan_ToppledHurt) + ExecWait(N(EVS_CheckToppleAnim)) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Hurt) + SetConst(LVar2, ANIM_Chan_ToppledHurt) + ExecWait(N(EVS_CheckToppleAnim)) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Hurt) + SetConst(LVar2, ANIM_Chan_ToppledHurt) + ExecWait(N(EVS_CheckToppleAnim)) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfEq(LVar0, AVAL_State_Upright) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Idle) + ExecWait(EVS_Enemy_Recover) + EndIf + CaseEq(EVENT_SCARE_AWAY) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfEq(LVar0, AVAL_State_Upright) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Run) + SetConst(LVar2, ANIM_Chan_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Toppled) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + CaseEq(EVENT_BEGIN_AIR_LIFT) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfEq(LVar0, AVAL_State_Upright) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Run) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Toppled) + EndIf + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfEq(LVar0, AVAL_State_Upright) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Hurt) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_ToppledHurt) + EndIf + ExecWait(EVS_Enemy_BlowAway) + Return + CaseEq(EVENT_AIR_LIFT_FAILED) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfEq(LVar0, AVAL_State_Upright) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_EnterShell) + ExecWait(EVS_Enemy_NoDamageHit) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_ExitShell) + Wait(8) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Toppled) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn_Ceiling) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Upright) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 16) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -9) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn_Ground))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent_Ground))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(UprightAnims))) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, TRUE) - EVT_CALL(GetIndexFromPos, ACTOR_SELF, LVar0) - EVT_MOD(LVar0, 4) - EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVar0) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar4, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_Still) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_Run) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar4, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_Still) - EVT_WAIT(8) - EVT_END_IF - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_05) - EVT_CALL(SetBattleCamZoom, 430) - EVT_CALL(SetBattleCamOffsetZ, 20) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_END_IF - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, DMG_CEILING_DROP, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(SetPartYaw, ACTOR_SELF, PRT_MAIN, 180) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_ToppledHurt) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 24) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_Still) - EVT_END_THREAD - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_WAIT(8) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_Run) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_Idle) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_ToppledHurt) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 24) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, LVar4) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_CEILING_DROP, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_Still) - EVT_END_THREAD - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_WAIT(8) - EVT_CALL(YieldTurn) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Run) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_Idle) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_LABEL(10) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Upright) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 16) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -9) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn_Ground))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent_Ground))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(UprightAnims))) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, TRUE) + Call(GetIndexFromPos, ACTOR_SELF, LVar0) + Mod(LVar0, 4) + Call(SetGoalToIndex, ACTOR_SELF, LVar0) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar4, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_Still) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_Run) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar4, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_Still) + Wait(8) + EndIf + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_05) + Call(SetBattleCamZoom, 430) + Call(SetBattleCamOffsetZ, 20) + Call(MoveBattleCamOver, 10) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + EndIf + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, DMG_CEILING_DROP, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(SetPartYaw, ACTOR_SELF, PRT_MAIN, 180) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_ToppledHurt) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 24) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(ResetAllActorSounds, ACTOR_SELF) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Thread + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_Still) + EndThread + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Wait(8) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_Run) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_Idle) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetActorYaw, ACTOR_SELF, 180) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_ToppledHurt) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 24) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, LVar4) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(ResetAllActorSounds, ACTOR_SELF) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_CEILING_DROP, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Thread + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_Still) + EndThread + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Wait(8) + Call(YieldTurn) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Run) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_Idle) + EndCaseGroup + EndSwitch + Label(10) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn_Ground) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Toppled) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) - EVT_SUB(LVar0, 1) - EVT_IF_GT(LVar0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_WAIT(30) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_ELSE - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_WAIT(20) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Toppled) - EVT_SET_CONST(LVar2, ANIM_Chan_Idle) - EVT_EXEC_WAIT(EVS_Enemy_FlipBackUp) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Upright) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 16) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -9) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(UprightDefenseTable))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(UprightAnims))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, FALSE) - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_EnterShell) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_ShellStill) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(10) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_SPIN) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_ShellSpin) - EVT_WAIT(20) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_TOSS) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_IF_GT(LVar0, LVar3) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_01) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -150, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(14.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_WAIT(15) - EVT_CALL(YieldTurn) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 200) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_ExitShell) - EVT_WAIT(10) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(14.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_SHELL_TOSS, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_Idle) - EVT_WAIT(8) - EVT_CALL(YieldTurn) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Chan_Run) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_Idle) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfEq(LVar0, AVAL_State_Toppled) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) + Sub(LVar0, 1) + IfGt(LVar0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Wait(30) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Else + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Wait(20) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Toppled) + SetConst(LVar2, ANIM_Chan_Idle) + ExecWait(EVS_Enemy_FlipBackUp) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Upright) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 16) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -9) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(UprightDefenseTable))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(UprightAnims))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, FALSE) + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndIf + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_EnterShell) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_ShellStill) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(10) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(5) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + EndThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_SPIN) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_ShellSpin) + Wait(20) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_TOSS) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Thread + Loop(0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + IfGt(LVar0, LVar3) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(UseBattleCamPreset, BTL_CAM_PRESET_01) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -150, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(14.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Wait(15) + Call(YieldTurn) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 200) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(10.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_ExitShell) + Wait(10) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(14.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_SHELL_TOSS, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_Idle) + Wait(8) + Call(YieldTurn) + Call(ResetAllActorSounds, ACTOR_SELF) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Chan_Run) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Chan_Idle) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Init) = { - EVT_EXEC_WAIT(N(EVS_SetInitialState)) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent_Initial))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_BattleCry, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FlipCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Respect, FALSE) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_NO_GAME_OVER, TRUE) - EVT_RETURN - EVT_END + ExecWait(N(EVS_SetInitialState)) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent_Initial))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_BattleCry, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_FlipCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Respect, FALSE) + Call(SetBattleFlagBits, BS_FLAGS1_NO_GAME_OVER, TRUE) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_BattleCry, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(ActorSpeak, MSG_MAC_Gate_001F, ACTOR_SELF, PRT_MAIN, ANIM_Chan_Run, ANIM_Chan_Walk) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_BattleCry, TRUE) - EVT_END_IF - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Toppled) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_DOJO | STATUS_FLAG_POISON | STATUS_KEY_SHRINK) /// @bug STATUS_KEY_SHRINK used instead of STATUS_FLAG_SHRINK - EVT_BREAK_SWITCH - EVT_END_IF - EVT_SET_CONST(LVarA, ANIM_Chan_Run) - EVT_SET_CONST(LVarB, ANIM_Chan_Walk) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Toppled) - EVT_SET_CONST(LVarA, ANIM_Chan_ToppledHurt) - EVT_SET_CONST(LVarB, ANIM_Chan_Toppled) - EVT_END_IF + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) + Call(GetActorVar, ACTOR_SELF, AVAR_BattleCry, LVar0) + IfEq(LVar0, FALSE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(ActorSpeak, MSG_MAC_Gate_001F, ACTOR_SELF, PRT_MAIN, ANIM_Chan_Run, ANIM_Chan_Walk) + Call(SetActorVar, ACTOR_SELF, AVAR_BattleCry, TRUE) + EndIf + CaseEq(PHASE_ENEMY_BEGIN) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfEq(LVar0, AVAL_State_Toppled) + BreakSwitch + EndIf + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAGS_DOJO | STATUS_FLAG_POISON | STATUS_KEY_SHRINK) /// @bug STATUS_KEY_SHRINK used instead of STATUS_FLAG_SHRINK + BreakSwitch + EndIf + SetConst(LVarA, ANIM_Chan_Run) + SetConst(LVarB, ANIM_Chan_Walk) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfEq(LVar0, AVAL_State_Toppled) + SetConst(LVarA, ANIM_Chan_ToppledHurt) + SetConst(LVarB, ANIM_Chan_Toppled) + EndIf // if less than half HP, tell the player they have some skills - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar1) - EVT_DIV(LVar1, 2) - EVT_IF_LE(LVar0, LVar1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Respect, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(ActorSpeak, MSG_MAC_Gate_0021, ACTOR_SELF, PRT_MAIN, LVarA, LVarB) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Respect, TRUE) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_END_IF - EVT_CALL(GetPlayerHP, LVar0) - EVT_IF_LE(LVar0, 5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(ActorSpeak, MSG_MAC_Gate_0022, ACTOR_SELF, PRT_MAIN, LVarA, LVarB) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(GetActorHP, ACTOR_SELF, LVar0) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar1) + Div(LVar1, 2) + IfLe(LVar0, LVar1) + Call(GetActorVar, ACTOR_SELF, AVAR_Respect, LVar0) + IfEq(LVar0, FALSE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(ActorSpeak, MSG_MAC_Gate_0021, ACTOR_SELF, PRT_MAIN, LVarA, LVarB) + Call(SetActorVar, ACTOR_SELF, AVAR_Respect, TRUE) + BreakSwitch + EndIf + EndIf + Call(GetPlayerHP, LVar0) + IfLe(LVar0, 5) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(ActorSpeak, MSG_MAC_Gate_0022, ACTOR_SELF, PRT_MAIN, LVarA, LVarB) + BreakSwitch + EndIf + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_HandleEvent_Initial) = { - EVT_EXEC_WAIT(N(EVS_HandleEvent_Ground)) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_FLIP_TRIGGER) - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_DOJO | STATUS_FLAG_POISON | STATUS_FLAG_SHRINK) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(BTL_MENU_TYPE_SMASH) - EVT_CASE_OR_EQ(BTL_MENU_TYPE_JUMP) - EVT_SET(LFlag0, TRUE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_IF_EQ(LFlag0, FALSE) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_WAIT(30) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Toppled) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_FlipCount, LVar0) - EVT_ADD(LVar0, 1) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(ActorSpeak, MSG_MAC_Gate_0020, ACTOR_SELF, PRT_MAIN, ANIM_Chan_ToppledHurt, ANIM_Chan_Toppled) - EVT_CASE_EQ(2) - EVT_CASE_EQ(3) - EVT_SET(LVar0, 0) - EVT_END_SWITCH - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FlipCount, LVar0) - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + ExecWait(N(EVS_HandleEvent_Ground)) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_FLIP_TRIGGER) + Call(GetBattleFlags, LVar0) + IfNotFlag(LVar0, BS_FLAGS1_TRIGGER_EVENTS) + BreakSwitch + EndIf + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAGS_DOJO | STATUS_FLAG_POISON | STATUS_FLAG_SHRINK) + BreakSwitch + EndIf + Set(LFlag0, FALSE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar0) + CaseOrEq(BTL_MENU_TYPE_SMASH) + CaseOrEq(BTL_MENU_TYPE_JUMP) + Set(LFlag0, TRUE) + EndCaseGroup + EndSwitch + IfEq(LFlag0, FALSE) + BreakSwitch + EndIf + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Wait(30) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfEq(LVar0, AVAL_State_Toppled) + Call(GetActorVar, ACTOR_SELF, AVAR_FlipCount, LVar0) + Add(LVar0, 1) + Switch(LVar0) + CaseEq(1) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(ActorSpeak, MSG_MAC_Gate_0020, ACTOR_SELF, PRT_MAIN, ANIM_Chan_ToppledHurt, ANIM_Chan_Toppled) + CaseEq(2) + CaseEq(3) + Set(LVar0, 0) + EndSwitch + Call(SetActorVar, ACTOR_SELF, AVAR_FlipCount, LVar0) + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + EndSwitch + Return + End }; diff --git a/src/battle/area/mac/actor/lee.c b/src/battle/area/mac/actor/lee.c index fe175e443f8..7d554aa9e46 100644 --- a/src/battle/area/mac/actor/lee.c +++ b/src/battle/area/mac/actor/lee.c @@ -220,326 +220,326 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_ReadyToCopy) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HandledEvent, FALSE) - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_EXEC_WAIT(N(EVS_Move_CopyPartner)) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_CALL(N(InitPartnerCopyHistory)) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_NO_GAME_OVER, TRUE) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_ReadyToCopy) + Call(SetActorVar, ACTOR_SELF, AVAR_HandledEvent, FALSE) + Thread + Call(FreezeBattleState, TRUE) + ExecWait(N(EVS_Move_CopyPartner)) + Call(FreezeBattleState, FALSE) + EndThread + Call(N(InitPartnerCopyHistory)) + Call(SetBattleFlagBits, BS_FLAGS1_NO_GAME_OVER, TRUE) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lee_Run) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lee_Run) + ExecWait(EVS_Enemy_ReturnHome) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HandledEvent, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lee_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lee_Burned) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lee_Burned) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lee_Burned) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lee_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lee_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lee_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lee_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lee_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lee_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lee_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lee_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lee_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lee_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lee_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lee_Run) - EVT_SET_CONST(LVar2, ANIM_Lee_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lee_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lee_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_HandledEvent, TRUE) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lee_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lee_Burned) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lee_Burned) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lee_Burned) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lee_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lee_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lee_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + Call(ResetAllActorSounds, ACTOR_SELF) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lee_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lee_Hurt) + ExecWait(EVS_Enemy_Knockback) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lee_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lee_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lee_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lee_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lee_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lee_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lee_Run) + SetConst(LVar2, ANIM_Lee_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lee_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lee_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_FlyingTackle) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_ReadyToCopy) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lee_Crouch) - EVT_WAIT(20) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_DUPLIGHOST_LEAP, 0) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lee_Midair) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -100, 0, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.3)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 17, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lee_Idle) - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) - EVT_WAIT(15) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lee_Midair) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_CALL(AddGoalPos, ACTOR_SELF, EVT_FLOAT(4.0), EVT_FLOAT(-6.0), 0) - EVT_ELSE - EVT_CALL(AddGoalPos, ACTOR_SELF, 10, -15, 0) - EVT_END_IF - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.3)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_FLYING_LEAP, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lee_Land) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_ReadyToCopy) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lee_Crouch) + Wait(20) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_DUPLIGHOST_LEAP, 0) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lee_Midair) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -100, 0, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.3)) + Call(JumpToGoal, ACTOR_SELF, 17, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(10) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lee_Idle) + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) + Wait(15) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + ExecWait(N(EVS_ReturnHome)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lee_Midair) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Call(AddGoalPos, ACTOR_SELF, Float(4.0), Float(-6.0), 0) + Else + Call(AddGoalPos, ACTOR_SELF, 10, -15, 0) + EndIf + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.3)) + Call(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_FLYING_LEAP, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lee_Land) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Wait(10) + Call(YieldTurn) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript A(EVS_Lee_RemoveParentActor) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_ParentActorID, LVar0) - EVT_CALL(RemoveActor, LVar0) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_ParentActorID, LVar0) + Call(RemoveActor, LVar0) + Return + End }; EvtScript A(EVS_Lee_LoseDisguise) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_WAIT(30) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_ParentActorID, LVarA) - EVT_CALL(UseIdleAnimation, LVarA, FALSE) - EVT_CALL(HideHealthBar, LVarA) - EVT_CALL(CopyStatusEffects, ACTOR_SELF, LVarA) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SMOKE_BURST) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 3) - EVT_ADD(LVar2, 5) - EVT_LOOP(3) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) - EVT_WAIT(3) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(5) - EVT_CALL(GetActorHP, ACTOR_SELF, LVarB) - EVT_CALL(SetEnemyHP, LVarA, LVarB) - EVT_CALL(CopyBuffs, ACTOR_SELF, LVarA) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarB, LVarC, LVarD) - EVT_CALL(SetActorPos, LVarA, LVarB, LVarC, LVarD) - EVT_CALL(SetPartFlagBits, LVarA, PRT_MAIN, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, LVarA, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetActorFlagBits, LVarA, ACTOR_FLAG_NO_SHADOW | ACTOR_FLAG_NO_DMG_APPLY, FALSE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_CALL(SetActorVar, LVarA, AVAR_State, AVAL_State_ReadyToTackle) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetIdleAnimations, LVarA, PRT_MAIN, EVT_PTR(N(FlailingAnims))) - EVT_CALL(SetAnimation, LVarA, PRT_MAIN, ANIM_Lee_Hurt) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetActorPos, LVarA, LVarB, LVarC, LVarD) - EVT_IF_GT(LVarC, 0) - EVT_SET(LVarC, 0) - EVT_CALL(SetActorJumpGravity, LVarA, EVT_FLOAT(0.5)) - EVT_CALL(SetActorSounds, LVarA, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) - EVT_CALL(SetGoalPos, LVarA, LVarB, LVarC, LVarD) - EVT_CALL(JumpToGoal, LVarA, 15, FALSE, TRUE, FALSE) - EVT_CALL(ResetActorSounds, LVarA, ACTOR_SOUND_JUMP) - EVT_CALL(SetGoalPos, LVarA, LVarB, LVarC, LVarD) - EVT_CALL(JumpToGoal, LVarA, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, LVarA, LVarB, LVarC, LVarD) - EVT_CALL(JumpToGoal, LVarA, 5, FALSE, TRUE, FALSE) - EVT_END_IF - EVT_CALL(ForceHomePos, LVarA, LVarB, LVarC, LVarD) - EVT_CALL(HPBarToHome, LVarA) - EVT_CALL(SetIdleAnimations, LVarA, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_CALL(SetAnimation, LVarA, PRT_MAIN, ANIM_Lee_Idle) - EVT_CALL(SetActorPos, ACTOR_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(ForceHomePos, ACTOR_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(HideHealthBar, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Wait(30) + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_ParentActorID, LVarA) + Call(UseIdleAnimation, LVarA, FALSE) + Call(HideHealthBar, LVarA) + Call(CopyStatusEffects, ACTOR_SELF, LVarA) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SMOKE_BURST) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 3) + Add(LVar2, 5) + Loop(3) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) + Wait(3) + EndLoop + EndThread + Wait(5) + Call(GetActorHP, ACTOR_SELF, LVarB) + Call(SetEnemyHP, LVarA, LVarB) + Call(CopyBuffs, ACTOR_SELF, LVarA) + Call(GetActorPos, ACTOR_SELF, LVarB, LVarC, LVarD) + Call(SetActorPos, LVarA, LVarB, LVarC, LVarD) + Call(SetPartFlagBits, LVarA, PRT_MAIN, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) + Call(SetPartFlagBits, LVarA, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetActorFlagBits, LVarA, ACTOR_FLAG_NO_SHADOW | ACTOR_FLAG_NO_DMG_APPLY, FALSE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) + Call(SetActorVar, LVarA, AVAR_State, AVAL_State_ReadyToTackle) + Call(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetIdleAnimations, LVarA, PRT_MAIN, Ref(N(FlailingAnims))) + Call(SetAnimation, LVarA, PRT_MAIN, ANIM_Lee_Hurt) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetActorPos, LVarA, LVarB, LVarC, LVarD) + IfGt(LVarC, 0) + Set(LVarC, 0) + Call(SetActorJumpGravity, LVarA, Float(0.5)) + Call(SetActorSounds, LVarA, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) + Call(SetGoalPos, LVarA, LVarB, LVarC, LVarD) + Call(JumpToGoal, LVarA, 15, FALSE, TRUE, FALSE) + Call(ResetActorSounds, LVarA, ACTOR_SOUND_JUMP) + Call(SetGoalPos, LVarA, LVarB, LVarC, LVarD) + Call(JumpToGoal, LVarA, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, LVarA, LVarB, LVarC, LVarD) + Call(JumpToGoal, LVarA, 5, FALSE, TRUE, FALSE) + EndIf + Call(ForceHomePos, LVarA, LVarB, LVarC, LVarD) + Call(HPBarToHome, LVarA) + Call(SetIdleAnimations, LVarA, PRT_MAIN, Ref(N(DefaultAnims))) + Call(SetAnimation, LVarA, PRT_MAIN, ANIM_Lee_Idle) + Call(SetActorPos, ACTOR_SELF, NPC_DISPOSE_LOCATION) + Call(ForceHomePos, ACTOR_SELF, NPC_DISPOSE_LOCATION) + Call(HPBarToHome, ACTOR_SELF) + Call(RemoveActor, ACTOR_SELF) + Return + End }; EvtScript A(EVS_Lee_ShockKnockback) = { - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, LVarA, LVarB) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 15) - EVT_ADD(LVar1, 10) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.1)) - EVT_CALL(SetAnimation, ACTOR_SELF, LVarA, LVarB) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, FALSE, FALSE) - EVT_SET(LVar0, LVarA) - EVT_SET(LVar1, LVarB) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, LVarC, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(15) - EVT_ADD(LVar0, -48) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 60) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) - EVT_RETURN - EVT_END + Call(HideHealthBar, ACTOR_SELF) + Set(LVarA, LVar0) + Set(LVarB, LVar1) + Set(LVarC, LVar2) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, LVarA, LVarB) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 15) + Add(LVar1, 10) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.1)) + Call(SetAnimation, ACTOR_SELF, LVarA, LVarB) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, FALSE, FALSE) + Set(LVar0, LVarA) + Set(LVar1, LVarB) + ExecWait(EVS_Enemy_ShockHit) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, LVarC, 0) + Set(LVar0, 0) + Loop(15) + Add(LVar0, -48) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + EndThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 60) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.4)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 10) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) + Return + End }; Vec3i A(Lee_SummonPos) = { NPC_DISPOSE_LOCATION }; @@ -599,176 +599,176 @@ API_CALLABLE(N(AdjustFormationPriority)) { } EvtScript N(EVS_Move_CopyPartner) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(ActorSpeak, MSG_MAC_Gate_0027, ACTOR_SELF, PRT_MAIN, ANIM_Lee_Talk, ANIM_Lee_Walk) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_GHOST_TRANSFORM) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lee_RaisedArmsTalk) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 8) - EVT_SETF(LVar3, EVT_FLOAT(0.4)) - EVT_ELSE - EVT_ADD(LVar1, 20) - EVT_SETF(LVar3, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar1, LVar2, LVar3, 40, 0) - EVT_CALL(WATT(UnkBackgroundFunc3)) - EVT_CALL(MakeLerp, 0, 200, 20, EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(WATT(SetBackgroundAlpha), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(N(GetPartnerAndLevel), LVar5, LVar6) - EVT_CALL(N(RegisterPartnerToCopy)) - EVT_CALL(N(AdjustFormationPriority), LVar5) - EVT_SWITCH(LVar5) - EVT_CASE_EQ(PARTNER_GOOMBARIO) - EVT_CALL(SummonEnemy, EVT_PTR(A(LeeGoombarioFormation)), FALSE) - EVT_CASE_EQ(PARTNER_KOOPER) - EVT_CALL(SummonEnemy, EVT_PTR(A(LeeKooperFormation)), FALSE) - EVT_CASE_EQ(PARTNER_BOMBETTE) - EVT_CALL(SummonEnemy, EVT_PTR(A(LeeBombetteFormation)), FALSE) - EVT_CASE_EQ(PARTNER_PARAKARRY) - EVT_CALL(SummonEnemy, EVT_PTR(A(LeeParakarryFormation)), FALSE) - EVT_CASE_EQ(PARTNER_BOW) - EVT_CALL(SummonEnemy, EVT_PTR(A(LeeBowFormation)), FALSE) - EVT_CASE_EQ(PARTNER_WATT) - EVT_CALL(SummonEnemy, EVT_PTR(A(LeeWattFormation)), FALSE) - EVT_CASE_EQ(PARTNER_SUSHIE) - EVT_CALL(SummonEnemy, EVT_PTR(A(LeeSushieFormation)), FALSE) - EVT_CASE_EQ(PARTNER_LAKILESTER) - EVT_CALL(SummonEnemy, EVT_PTR(A(LeeLakilesterFormation)), FALSE) - EVT_END_SWITCH - EVT_SET(LVarA, LVar0) - EVT_CALL(CopyStatusEffects, ACTOR_SELF, LVarA) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SMOKE_BURST) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 3) - EVT_ADD(LVar2, 5) - EVT_LOOP(3) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) - EVT_WAIT(3) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(5) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, (ACTOR_FLAG_NO_SHADOW | ACTOR_FLAG_NO_DMG_APPLY), TRUE) - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_CALL(SetEnemyHP, LVarA, LVar0) - EVT_CALL(CopyBuffs, ACTOR_SELF, LVarA) - EVT_CALL(GetOwnerID, LVar0) - EVT_CALL(SetActorVar, LVarA, AVAR_Copy_ParentActorID, LVar0) - EVT_CALL(SetActorVar, LVarA, AVAR_Copy_PartnerLevel, LVar6) - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_THREAD - EVT_CALL(MakeLerp, 200, 0, 20, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(WATT(SetBackgroundAlpha), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(SetActorSounds, LVarA, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_SWITCH(LVar5) - EVT_CASE_EQ(PARTNER_LAKILESTER) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, LVarA, EVT_FLOAT(0.01)) - EVT_CALL(SetGoalPos, LVarA, LVar0, 10, LVar2) - EVT_CALL(JumpToGoal, LVarA, 10, FALSE, FALSE, FALSE) - EVT_WAIT(10) - EVT_CASE_OR_EQ(PARTNER_WATT) - EVT_CASE_OR_EQ(PARTNER_BOW) - EVT_CASE_OR_EQ(PARTNER_PARAKARRY) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, LVarA, EVT_FLOAT(0.01)) - EVT_CALL(SetGoalPos, LVarA, LVar0, 30, LVar2) - EVT_CALL(JumpToGoal, LVarA, 20, FALSE, FALSE, FALSE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, LVarA) - EVT_CALL(ResetActorSounds, LVarA, ACTOR_SOUND_JUMP) - EVT_WAIT(20) - EVT_CALL(SetActorPos, ACTOR_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(ForceHomePos, ACTOR_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_CopiedPartner) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(ActorSpeak, MSG_MAC_Gate_0027, ACTOR_SELF, PRT_MAIN, ANIM_Lee_Talk, ANIM_Lee_Walk) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_GHOST_TRANSFORM) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lee_RaisedArmsTalk) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Add(LVar1, 8) + SetF(LVar3, Float(0.4)) + Else + Add(LVar1, 20) + SetF(LVar3, Float(1.0)) + EndIf + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar1, LVar2, LVar3, 40, 0) + Call(WATT(UnkBackgroundFunc3)) + Call(MakeLerp, 0, 200, 20, EASING_LINEAR) + Label(0) + Call(UpdateLerp) + Call(WATT(SetBackgroundAlpha), LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Wait(10) + Call(N(GetPartnerAndLevel), LVar5, LVar6) + Call(N(RegisterPartnerToCopy)) + Call(N(AdjustFormationPriority), LVar5) + Switch(LVar5) + CaseEq(PARTNER_GOOMBARIO) + Call(SummonEnemy, Ref(A(LeeGoombarioFormation)), FALSE) + CaseEq(PARTNER_KOOPER) + Call(SummonEnemy, Ref(A(LeeKooperFormation)), FALSE) + CaseEq(PARTNER_BOMBETTE) + Call(SummonEnemy, Ref(A(LeeBombetteFormation)), FALSE) + CaseEq(PARTNER_PARAKARRY) + Call(SummonEnemy, Ref(A(LeeParakarryFormation)), FALSE) + CaseEq(PARTNER_BOW) + Call(SummonEnemy, Ref(A(LeeBowFormation)), FALSE) + CaseEq(PARTNER_WATT) + Call(SummonEnemy, Ref(A(LeeWattFormation)), FALSE) + CaseEq(PARTNER_SUSHIE) + Call(SummonEnemy, Ref(A(LeeSushieFormation)), FALSE) + CaseEq(PARTNER_LAKILESTER) + Call(SummonEnemy, Ref(A(LeeLakilesterFormation)), FALSE) + EndSwitch + Set(LVarA, LVar0) + Call(CopyStatusEffects, ACTOR_SELF, LVarA) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SMOKE_BURST) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 3) + Add(LVar2, 5) + Loop(3) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) + Wait(3) + EndLoop + EndThread + Wait(5) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorPos, LVarA, LVar0, LVar1, LVar2) + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) + Call(SetActorFlagBits, ACTOR_SELF, (ACTOR_FLAG_NO_SHADOW | ACTOR_FLAG_NO_DMG_APPLY), TRUE) + Call(GetActorHP, ACTOR_SELF, LVar0) + Call(SetEnemyHP, LVarA, LVar0) + Call(CopyBuffs, ACTOR_SELF, LVarA) + Call(GetOwnerID, LVar0) + Call(SetActorVar, LVarA, AVAR_Copy_ParentActorID, LVar0) + Call(SetActorVar, LVarA, AVAR_Copy_PartnerLevel, LVar6) + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Thread + Call(MakeLerp, 200, 0, 20, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(WATT(SetBackgroundAlpha), LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + EndThread + Call(SetActorSounds, LVarA, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Switch(LVar5) + CaseEq(PARTNER_LAKILESTER) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, LVarA, Float(0.01)) + Call(SetGoalPos, LVarA, LVar0, 10, LVar2) + Call(JumpToGoal, LVarA, 10, FALSE, FALSE, FALSE) + Wait(10) + CaseOrEq(PARTNER_WATT) + CaseOrEq(PARTNER_BOW) + CaseOrEq(PARTNER_PARAKARRY) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, LVarA, Float(0.01)) + Call(SetGoalPos, LVarA, LVar0, 30, LVar2) + Call(JumpToGoal, LVarA, 20, FALSE, FALSE, FALSE) + EndCaseGroup + EndSwitch + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Call(ForceHomePos, LVarA, LVar0, LVar1, LVar2) + Call(HPBarToHome, LVarA) + Call(ResetActorSounds, LVarA, ACTOR_SOUND_JUMP) + Wait(20) + Call(SetActorPos, ACTOR_SELF, NPC_DISPOSE_LOCATION) + Call(ForceHomePos, ACTOR_SELF, NPC_DISPOSE_LOCATION) + Call(HPBarToHome, ACTOR_SELF) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_CopiedPartner) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_ReadyToCopy) - EVT_EXEC_WAIT(N(EVS_Move_CopyPartner)) - EVT_CASE_EQ(AVAL_State_CopiedPartner) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_ReadyToCopy) + ExecWait(N(EVS_Move_CopyPartner)) + CaseEq(AVAL_State_CopiedPartner) // do nothing - EVT_CASE_EQ(AVAL_State_ReadyToTackle) - EVT_EXEC_WAIT(N(EVS_Attack_FlyingTackle)) - EVT_CASE_EQ(AVAL_State_WaitToTackle) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_ReadyToTackle) - EVT_END_SWITCH - EVT_RETURN - EVT_END + CaseEq(AVAL_State_ReadyToTackle) + ExecWait(N(EVS_Attack_FlyingTackle)) + CaseEq(AVAL_State_WaitToTackle) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_ReadyToTackle) + EndSwitch + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_DOJO | STATUS_FLAG_POISON | STATUS_FLAG_SHRINK) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar1) - EVT_DIV(LVar1, 2) - EVT_IF_LE(LVar0, LVar1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_CopiedPartner) - EVT_CALL(ActorSpeak, MSG_MAC_Gate_0028, ACTOR_ENEMY1, PRT_MAIN, ANIM_Lee_Talk, ANIM_Lee_Walk) - EVT_ELSE - EVT_CALL(ActorSpeak, MSG_MAC_Gate_0028, ACTOR_SELF, PRT_MAIN, ANIM_Lee_Talk, ANIM_Lee_Walk) - EVT_END_IF - EVT_BREAK_SWITCH - EVT_END_IF - EVT_CALL(GetPlayerHP, LVar0) - EVT_IF_LE(LVar0, 5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(ActorSpeak, MSG_MAC_Gate_0029, ACTOR_SELF, PRT_MAIN, ANIM_Lee_Talk, ANIM_Lee_Walk) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_ENEMY_BEGIN) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAGS_DOJO | STATUS_FLAG_POISON | STATUS_FLAG_SHRINK) + BreakSwitch + EndIf + Call(GetActorHP, ACTOR_SELF, LVar0) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar1) + Div(LVar1, 2) + IfLe(LVar0, LVar1) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + IfEq(LVar0, AVAL_State_CopiedPartner) + Call(ActorSpeak, MSG_MAC_Gate_0028, ACTOR_ENEMY1, PRT_MAIN, ANIM_Lee_Talk, ANIM_Lee_Walk) + Else + Call(ActorSpeak, MSG_MAC_Gate_0028, ACTOR_SELF, PRT_MAIN, ANIM_Lee_Talk, ANIM_Lee_Walk) + EndIf + BreakSwitch + EndIf + Call(GetPlayerHP, LVar0) + IfLe(LVar0, 5) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(ActorSpeak, MSG_MAC_Gate_0029, ACTOR_SELF, PRT_MAIN, ANIM_Lee_Talk, ANIM_Lee_Walk) + BreakSwitch + EndIf + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/area/mac/actor/lee_bombette.inc.c b/src/battle/area/mac/actor/lee_bombette.inc.c index c215715bd90..64cf591bd7c 100644 --- a/src/battle/area/mac/actor/lee_bombette.inc.c +++ b/src/battle/area/mac/actor/lee_bombette.inc.c @@ -88,263 +88,263 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FormDuration, 1) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_FormDuration, 1) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleBombette_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleBombette_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Hurt) - EVT_SET(LVar2, 15) - EVT_EXEC_WAIT(A(EVS_Lee_ShockKnockback)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Hurt) - EVT_SET(LVar2, 15) - EVT_EXEC_WAIT(A(EVS_Lee_ShockKnockback)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Run) - EVT_SET_CONST(LVar2, ANIM_BattleBombette_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_BurnHurt) + SetConst(LVar2, ANIM_BattleBombette_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_BurnHurt) + SetConst(LVar2, ANIM_BattleBombette_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(A(EVS_Lee_RemoveParentActor)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + ExecWait(A(EVS_Lee_RemoveParentActor)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Hurt) + Set(LVar2, 15) + ExecWait(A(EVS_Lee_ShockKnockback)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + CaseEq(EVENT_SHOCK_DEATH) + ExecWait(A(EVS_Lee_RemoveParentActor)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Hurt) + Set(LVar2, 15) + ExecWait(A(EVS_Lee_ShockKnockback)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + ExecWait(A(EVS_Lee_RemoveParentActor)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Run) + SetConst(LVar2, ANIM_BattleBombette_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/UnkActorPosFunc.inc.c" EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 40, 0, 0) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Run) - EVT_CALL(RunToGoal, ACTOR_SELF, 30, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Idle) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Brace) - EVT_WAIT(15) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOMBETTE_BODY_SLAM) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -10, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_BodySlam) - EVT_CALL(RunToGoal, ACTOR_SELF, 5, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Idle) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 15, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 72) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(AddGoalPos, ACTOR_SELF, -60, 0, 0) - EVT_CALL(RunToGoal, ACTOR_SELF, 10, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Idle) - EVT_THREAD - EVT_CALL(N(UnkActorPosFunc)) - EVT_END_THREAD - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_BodySlam) - EVT_CALL(RunToGoal, ACTOR_SELF, 4, FALSE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(PARTNER_RANK_NORMAL) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(PARTNER_RANK_SUPER) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(PARTNER_RANK_ULTRA) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 5, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Idle) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire2) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire1) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire2) - EVT_ADD(LVar0, 40) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire1) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire2) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire1) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire2) - EVT_ADD(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire1) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Idle) - EVT_WAIT(8) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 40, 0, 0) + Call(MoveBattleCamOver, 30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Run) + Call(RunToGoal, ACTOR_SELF, 30, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Idle) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Brace) + Wait(15) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOMBETTE_BODY_SLAM) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -10, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_BodySlam) + Call(RunToGoal, ACTOR_SELF, 5, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Idle) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 15, 0) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 72) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + EndThread + Call(AddGoalPos, ACTOR_SELF, -60, 0, 0) + Call(RunToGoal, ACTOR_SELF, 10, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Idle) + Thread + Call(N(UnkActorPosFunc)) + EndThread + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_BodySlam) + Call(RunToGoal, ACTOR_SELF, 4, FALSE) + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) + Switch(LVar9) + CaseEq(PARTNER_RANK_NORMAL) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(PARTNER_RANK_SUPER) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(PARTNER_RANK_ULTRA) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 5, BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Idle) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire2) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.4)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire1) + Wait(1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire2) + Add(LVar0, 40) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire1) + Wait(1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire2) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire1) + Wait(1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire2) + Add(LVar0, 10) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire1) + Wait(1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Idle) + Wait(8) + Call(YieldTurn) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_SUB(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Hurt) - EVT_EXEC_WAIT(A(EVS_Lee_LoseDisguise)) - EVT_RETURN - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_ENEMY_BEGIN) + Call(GetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) + IfGt(LVar0, 0) + Sub(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) + BreakSwitch + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Hurt) + ExecWait(A(EVS_Lee_LoseDisguise)) + Return + EndSwitch + Return + End }; Formation A(LeeBombetteFormation) = { diff --git a/src/battle/area/mac/actor/lee_bow.inc.c b/src/battle/area/mac/actor/lee_bow.inc.c index 4d896b6571e..9db5c1bdd9f 100644 --- a/src/battle/area/mac/actor/lee_bow.inc.c +++ b/src/battle/area/mac/actor/lee_bow.inc.c @@ -100,350 +100,350 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FormDuration, 1) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_FormDuration, 1) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_BurnHurtAlt) - EVT_SET_CONST(LVar2, ANIM_BattleBow_BurnStillAlt) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_BurnHurtAlt) - EVT_SET_CONST(LVar2, ANIM_BattleBow_BurnStillAlt) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_BurnStillAlt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_SET(LVar2, 14) - EVT_EXEC_WAIT(A(EVS_Lee_ShockKnockback)) - EVT_THREAD - EVT_SET(LVar0, 200) - EVT_LOOP(20) - EVT_SUB(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 60) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Run) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Idle) - EVT_SET(LVar0, 55) - EVT_LOOP(20) - EVT_ADD(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, 255) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_SET(LVar2, 14) - EVT_EXEC_WAIT(A(EVS_Lee_ShockKnockback)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Run) - EVT_SET_CONST(LVar2, ANIM_BattleBow_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_BurnHurtAlt) + SetConst(LVar2, ANIM_BattleBow_BurnStillAlt) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_BurnHurtAlt) + SetConst(LVar2, ANIM_BattleBow_BurnStillAlt) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(A(EVS_Lee_RemoveParentActor)) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_BurnStillAlt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + ExecWait(A(EVS_Lee_RemoveParentActor)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Hurt) + Set(LVar2, 14) + ExecWait(A(EVS_Lee_ShockKnockback)) + Thread + Set(LVar0, 200) + Loop(20) + Sub(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) + Wait(1) + EndLoop + EndThread + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 60) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Run) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Idle) + Set(LVar0, 55) + Loop(20) + Add(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, 255) + CaseEq(EVENT_SHOCK_DEATH) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ExecWait(A(EVS_Lee_RemoveParentActor)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Hurt) + Set(LVar2, 14) + ExecWait(A(EVS_Lee_ShockKnockback)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + ExecWait(A(EVS_Lee_RemoveParentActor)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Run) + SetConst(LVar2, ANIM_BattleBow_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_WAIT(10) - EVT_THREAD - EVT_SET(LVar0, 200) - EVT_LOOP(20) - EVT_SUB(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_01) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Run) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_CALL(AddGoalPos, ACTOR_SELF, 4, -4, 0) - EVT_ELSE - EVT_CALL(AddGoalPos, ACTOR_SELF, 10, -10, 0) - EVT_END_IF - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Idle) - EVT_END_THREAD - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_15) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 30) - EVT_SET(LVar0, 55) - EVT_LOOP(20) - EVT_ADD(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, 255) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_PreSlap) - EVT_WAIT(10) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_WAIT(15) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.4), EVT_FLOAT(1.4), EVT_FLOAT(1.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_SlapOnce) - EVT_WAIT(2) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_SET(LVar0, 0) - EVT_LOOP(20) - EVT_ADD(LVar0, -45) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Injured) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SEEING_STARS) - EVT_WAIT(30) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Idle) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_THREAD - EVT_SET(LVar0, 200) - EVT_LOOP(20) - EVT_SUB(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 60) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Run) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Idle) - EVT_SET(LVar0, 55) - EVT_LOOP(20) - EVT_ADD(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, 255) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_SET(LVarA, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar8) - EVT_SWITCH(LVar8) - EVT_CASE_EQ(PARTNER_RANK_NORMAL) - EVT_SET(LVar8, 4) - EVT_CASE_EQ(PARTNER_RANK_SUPER) - EVT_SET(LVar8, 5) - EVT_CASE_EQ(PARTNER_RANK_ULTRA) - EVT_SET(LVar8, 6) - EVT_END_SWITCH - EVT_SET(LVar7, LVar8) - EVT_LOOP(LVar7) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOW_SMACK) - EVT_ADD(LVarA, 1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.4), EVT_FLOAT(1.4), EVT_FLOAT(1.0)) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_SlapOnce) - EVT_SET(LFlag0, TRUE) - EVT_IF_EQ(LVarA, LVar8) - EVT_CALL(SetDamageSource, DMG_SRC_LAST_SLAP_LEFT) - EVT_ELSE - EVT_CALL(SetDamageSource, DMG_SRC_NEXT_SLAP_LEFT) - EVT_END_IF - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_SlapBack) - EVT_SET(LFlag0, FALSE) - EVT_IF_EQ(LVarA, LVar8) - EVT_CALL(SetDamageSource, DMG_SRC_LAST_SLAP_RIGHT) - EVT_ELSE - EVT_CALL(SetDamageSource, DMG_SRC_NEXT_SLAP_RIGHT) - EVT_END_IF - EVT_END_IF - EVT_WAIT(2) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(PARTNER_RANK_NORMAL) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_CASE_EQ(PARTNER_RANK_SUPER) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_CASE_EQ(PARTNER_RANK_ULTRA) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_END_SWITCH - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Idle) - EVT_CALL(GetActorHP, ACTOR_PLAYER, LVar1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_THREAD - EVT_SET(LVar0, 200) - EVT_LOOP(20) - EVT_SUB(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Run) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Idle) - EVT_SET(LVar0, 55) - EVT_LOOP(20) - EVT_ADD(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, 255) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Wait(10) + Thread + Set(LVar0, 200) + Loop(20) + Sub(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) + Wait(1) + EndLoop + EndThread + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_01) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Thread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Run) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Call(AddGoalPos, ACTOR_SELF, 4, -4, 0) + Else + Call(AddGoalPos, ACTOR_SELF, 10, -10, 0) + EndIf + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Idle) + EndThread + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_PRESET_15) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 30) + Set(LVar0, 55) + Loop(20) + Add(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, 255) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_PreSlap) + Wait(10) + Call(SetGoalToTarget, ACTOR_SELF) + Wait(15) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.4), Float(1.4), Float(1.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_SlapOnce) + Wait(2) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.0), Float(1.0), Float(1.0)) + Set(LVar0, 0) + Loop(20) + Add(LVar0, -45) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Injured) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SEEING_STARS) + Wait(30) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Idle) + Wait(10) + Call(YieldTurn) + Thread + Set(LVar0, 200) + Loop(20) + Sub(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) + Wait(1) + EndLoop + EndThread + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 60) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Run) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Idle) + Set(LVar0, 55) + Loop(20) + Add(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, 255) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Set(LVarA, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar8) + Switch(LVar8) + CaseEq(PARTNER_RANK_NORMAL) + Set(LVar8, 4) + CaseEq(PARTNER_RANK_SUPER) + Set(LVar8, 5) + CaseEq(PARTNER_RANK_ULTRA) + Set(LVar8, 6) + EndSwitch + Set(LVar7, LVar8) + Loop(LVar7) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOW_SMACK) + Add(LVarA, 1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.4), Float(1.4), Float(1.0)) + IfEq(LFlag0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_SlapOnce) + Set(LFlag0, TRUE) + IfEq(LVarA, LVar8) + Call(SetDamageSource, DMG_SRC_LAST_SLAP_LEFT) + Else + Call(SetDamageSource, DMG_SRC_NEXT_SLAP_LEFT) + EndIf + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_SlapBack) + Set(LFlag0, FALSE) + IfEq(LVarA, LVar8) + Call(SetDamageSource, DMG_SRC_LAST_SLAP_RIGHT) + Else + Call(SetDamageSource, DMG_SRC_NEXT_SLAP_RIGHT) + EndIf + EndIf + Wait(2) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.0), Float(1.0), Float(1.0)) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.5)) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.2)) + EndThread + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) + Switch(LVar9) + CaseEq(PARTNER_RANK_NORMAL) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + CaseEq(PARTNER_RANK_SUPER) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + CaseEq(PARTNER_RANK_ULTRA) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + EndSwitch + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Idle) + Call(GetActorHP, ACTOR_PLAYER, LVar1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Wait(10) + Call(YieldTurn) + Thread + Set(LVar0, 200) + Loop(20) + Sub(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) + Wait(1) + EndLoop + EndThread + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Run) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Idle) + Set(LVar0, 55) + Loop(20) + Add(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, 255) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_SUB(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_EXEC_WAIT(A(EVS_Lee_LoseDisguise)) - EVT_RETURN - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_ENEMY_BEGIN) + Call(GetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) + IfGt(LVar0, 0) + Sub(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) + BreakSwitch + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Hurt) + ExecWait(A(EVS_Lee_LoseDisguise)) + Return + EndSwitch + Return + End }; Formation A(LeeBowFormation) = { diff --git a/src/battle/area/mac/actor/lee_goombario.inc.c b/src/battle/area/mac/actor/lee_goombario.inc.c index fad74c85024..36598734149 100644 --- a/src/battle/area/mac/actor/lee_goombario.inc.c +++ b/src/battle/area/mac/actor/lee_goombario.inc.c @@ -88,375 +88,375 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FormDuration, 1) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_FormDuration, 1) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_BurnHurt1) - EVT_SET_CONST(LVar2, ANIM_BattleGoombario_BurnHurt2) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_BurnHurt1) - EVT_SET_CONST(LVar2, ANIM_BattleGoombario_BurnHurt2) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_BurnHurt2) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_SET(LVar2, 12) - EVT_EXEC_WAIT(A(EVS_Lee_ShockKnockback)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Run) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_SET(LVar2, 12) - EVT_EXEC_WAIT(A(EVS_Lee_ShockKnockback)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_Run) - EVT_SET_CONST(LVar2, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_BurnHurt1) + SetConst(LVar2, ANIM_BattleGoombario_BurnHurt2) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_BurnHurt1) + SetConst(LVar2, ANIM_BattleGoombario_BurnHurt2) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(A(EVS_Lee_RemoveParentActor)) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_BurnHurt2) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + ExecWait(A(EVS_Lee_RemoveParentActor)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + Set(LVar2, 12) + ExecWait(A(EVS_Lee_ShockKnockback)) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Run) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + CaseEq(EVENT_SHOCK_DEATH) + ExecWait(A(EVS_Lee_RemoveParentActor)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + Set(LVar2, 12) + ExecWait(A(EVS_Lee_ShockKnockback)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + ExecWait(A(EVS_Lee_RemoveParentActor)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_Run) + SetConst(LVar2, ANIM_BattleGoombario_HurtStill) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "world/common/todo/UnkFunc62.inc.c" #include "common/ActorJumpToPos.inc.c" EvtScript N(EVS_HeadbonkFollowthrough) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_SET(LVar0, 180) - EVT_LOOP(15) - EVT_SUB(LVar0, 60) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Fall) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 60) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SETF(LVar5, EVT_FLOAT(7.2)) - EVT_ELSE - EVT_SET(LVar5, 18) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar5, 0) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar5, 0) - EVT_WAIT(1) - EVT_ADD(LVar0, 10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar5, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) - EVT_WAIT(2) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Run) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Set(LVar0, 180) + Loop(15) + Sub(LVar0, 60) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Fall) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 60) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + SetF(LVar5, Float(7.2)) + Else + Set(LVar5, 18) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) + Call(SetActorDispOffset, ACTOR_SELF, 0, LVar5, 0) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) + Call(SetActorDispOffset, ACTOR_SELF, 0, LVar5, 0) + Wait(1) + Add(LVar0, 10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) + Call(SetActorDispOffset, ACTOR_SELF, 0, LVar5, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) + Wait(2) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Run) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) + Return + End }; EvtScript N(EVS_ApproachPlayer) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 70, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Run) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 70, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Run) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) + Return + End }; // copied from goombario.c and used, but result is discarded EvtScript N(EVS_CalculateJumpTime) = { - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVarB, LVarC, LVarD) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarC, LVarD, LVarE) - EVT_IF_GT(LVarB, LVarC) - EVT_SUB(LVarB, LVarC) - EVT_ELSE - EVT_SUB(LVarC, LVarB) - EVT_SET(LVarB, LVarC) - EVT_END_IF - EVT_SUB(LVarB, 20) - EVT_DIVF(LVarB, EVT_FLOAT(10.588)) - EVT_ADDF(LVarB, 15) - EVT_SET(LVarA, LVarB) - EVT_RETURN - EVT_END + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVarB, LVarC, LVarD) + Call(GetActorPos, ACTOR_SELF, LVarC, LVarD, LVarE) + IfGt(LVarB, LVarC) + Sub(LVarB, LVarC) + Else + Sub(LVarC, LVarB) + Set(LVarB, LVarC) + EndIf + Sub(LVarB, 20) + DivF(LVarB, Float(10.588)) + AddF(LVarB, 15) + Set(LVarA, LVarB) + Return + End }; EvtScript N(EVS_Attack_Headbonk) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_EXEC_WAIT(N(EVS_ApproachPlayer)) - EVT_EXEC_WAIT(N(EVS_CalculateJumpTime)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SETF(LVar0, EVT_FLOAT(7.2)) - EVT_SETF(LVar1, EVT_FLOAT(7.6)) - EVT_SETF(LVar1, EVT_FLOAT(3.6)) - EVT_ELSE - EVT_SET(LVar0, 18) - EVT_SET(LVar1, 19) - EVT_SET(LVar2, 9) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar1, 0) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar2, 0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 0, 0, 5) - EVT_CALL(SetJumpAnimations, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) - EVT_CALL(N(UnkFunc62), LVarA, 0) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetJumpAnimations, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) - EVT_CALL(N(ActorJumpToPos)) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(20) - EVT_CALL(YieldTurn) - EVT_EXEC_WAIT(N(EVS_HeadbonkFollowthrough)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CHILD_THREAD - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_CHILD_THREAD - EVT_WAIT(1) - EVT_WAIT(2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(PARTNER_RANK_NORMAL) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_CASE_EQ(PARTNER_RANK_SUPER) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_CASE_EQ(PARTNER_RANK_ULTRA) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_END_SWITCH - EVT_CALL(GetActorHP, ACTOR_PLAYER, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(100) - EVT_END_IF - EVT_SET(LVarA, 24) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(PARTNER_RANK_NORMAL) - EVT_THREAD - EVT_WAIT(4) - EVT_SET(LVar0, 0) - EVT_LOOP(6) - EVT_ADD(LVar0, 30) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetJumpAnimations, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) - EVT_CALL(N(UnkFunc62), LVarA, 3) - EVT_CASE_EQ(PARTNER_RANK_SUPER) - EVT_THREAD - EVT_WAIT(4) - EVT_SET(LVar0, 0) - EVT_LOOP(6) - EVT_ADD(LVar0, 30) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetJumpAnimations, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) - EVT_CALL(N(UnkFunc62), LVarA, 3) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_CASE_EQ(PARTNER_RANK_ULTRA) - EVT_THREAD - EVT_WAIT(4) - EVT_SET(LVar0, 0) - EVT_LOOP(6) - EVT_ADD(LVar0, 30) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, EVT_IGNORE_ARG, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(LVarA) - EVT_ADD(LVar0, 133) - EVT_CALL(SetActorRotation, ACTOR_SELF, EVT_IGNORE_ARG, LVar0, EVT_IGNORE_ARG) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetJumpAnimations, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) - EVT_CALL(N(UnkFunc62), LVarA, 3) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_END_SWITCH - EVT_CHILD_THREAD - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_CHILD_THREAD - EVT_WAIT(1) - EVT_WAIT(2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(PARTNER_RANK_NORMAL) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(PARTNER_RANK_SUPER) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(PARTNER_RANK_ULTRA) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_LABEL(100) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(YieldTurn) - EVT_EXEC_WAIT(N(EVS_HeadbonkFollowthrough)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + ExecWait(N(EVS_ApproachPlayer)) + ExecWait(N(EVS_CalculateJumpTime)) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + SetF(LVar0, Float(7.2)) + SetF(LVar1, Float(7.6)) + SetF(LVar1, Float(3.6)) + Else + Set(LVar0, 18) + Set(LVar1, 19) + Set(LVar2, 9) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) + Call(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, LVar1, 0) + Wait(1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk) + Call(SetActorDispOffset, ACTOR_SELF, 0, LVar2, 0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 0, 0, 5) + Call(SetJumpAnimations, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) + Call(N(UnkFunc62), LVarA, 0) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetJumpAnimations, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) + Call(N(ActorJumpToPos)) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + EndThread + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(20) + Call(YieldTurn) + ExecWait(N(EVS_HeadbonkFollowthrough)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + ChildThread + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.3), Float(0.5), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.0), Float(1.0), Float(1.0)) + EndChildThread + Wait(1) + Wait(2) + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) + Switch(LVar9) + CaseEq(PARTNER_RANK_NORMAL) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + CaseEq(PARTNER_RANK_SUPER) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) + CaseEq(PARTNER_RANK_ULTRA) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS) + EndSwitch + Call(GetActorHP, ACTOR_PLAYER, LVar0) + IfEq(LVar0, 0) + Goto(100) + EndIf + Set(LVarA, 24) + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) + Switch(LVar9) + CaseEq(PARTNER_RANK_NORMAL) + Thread + Wait(4) + Set(LVar0, 0) + Loop(6) + Add(LVar0, 30) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetJumpAnimations, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) + Call(N(UnkFunc62), LVarA, 3) + CaseEq(PARTNER_RANK_SUPER) + Thread + Wait(4) + Set(LVar0, 0) + Loop(6) + Add(LVar0, 30) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetJumpAnimations, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) + Call(N(UnkFunc62), LVarA, 3) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + CaseEq(PARTNER_RANK_ULTRA) + Thread + Wait(4) + Set(LVar0, 0) + Loop(6) + Add(LVar0, 30) + Call(SetActorRotation, ACTOR_SELF, 0, EVT_IGNORE_ARG, LVar0) + Wait(1) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk) + EndThread + Thread + Set(LVar0, 0) + Loop(LVarA) + Add(LVar0, 133) + Call(SetActorRotation, ACTOR_SELF, EVT_IGNORE_ARG, LVar0, EVT_IGNORE_ARG) + Wait(1) + EndLoop + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetJumpAnimations, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) + Call(N(UnkFunc62), LVarA, 3) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + EndSwitch + ChildThread + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.3), Float(0.5), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.0), Float(1.0), Float(1.0)) + EndChildThread + Wait(1) + Wait(2) + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) + Switch(LVar9) + CaseEq(PARTNER_RANK_NORMAL) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(PARTNER_RANK_SUPER) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(PARTNER_RANK_ULTRA) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Label(100) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(YieldTurn) + ExecWait(N(EVS_HeadbonkFollowthrough)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; API_CALLABLE(N(CalculateTattleCamBoomLength)) { @@ -510,76 +510,76 @@ API_CALLABLE(N(CloseTattleWindow)) { } EvtScript N(EVS_Move_Tattle) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_WAIT(10) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_TATTLE_OPEN, TRUE) - EVT_CALL(N(OpenTattleWindow), LVar5) - EVT_WAIT(12) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Wait(10) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetBattleFlagBits, BS_FLAGS1_TATTLE_OPEN, TRUE) + Call(N(OpenTattleWindow), LVar5) + Wait(12) // enable the tattle viewport - EVT_CALL(SetCamEnabled, CAM_TATTLE, TRUE) - EVT_CALL(SetCamNoDraw, CAM_TATTLE, FALSE) - EVT_CALL(SetCamPerspective, CAM_TATTLE, CAM_UPDATE_MODE_6, 25, 16, 1024) - EVT_CALL(SetCamViewport, CAM_TATTLE, 37, 95, 138, 99) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 8) - EVT_SET(LVar1, 0) - EVT_CALL(N(CalculateTattleCamBoomLength)) - EVT_WAIT(1) - EVT_CALL(func_802CAE50, CAM_TATTLE, LVar0, LVar1, LVar2) - EVT_CALL(func_802CABE8, CAM_TATTLE, 0, LVar3, 100, 4) - EVT_WAIT(2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_TATTLE_WINDOW_OPEN) - EVT_CALL(SetCamNoDraw, CAM_TATTLE, TRUE) - EVT_WAIT(10) - EVT_CALL(ActorSpeak, MSG_EnemyTattle_Mario, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Talk, ANIM_BattleGoombario_Idle) - EVT_CALL(N(CloseTattleWindow), LVar5) - EVT_WAIT(12) - EVT_CALL(SetCamEnabled, CAM_TATTLE, FALSE) - EVT_WAIT(32) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_TATTLE_OPEN, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(SetCamEnabled, CAM_TATTLE, TRUE) + Call(SetCamNoDraw, CAM_TATTLE, FALSE) + Call(SetCamPerspective, CAM_TATTLE, CAM_UPDATE_MODE_6, 25, 16, 1024) + Call(SetCamViewport, CAM_TATTLE, 37, 95, 138, 99) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 8) + Set(LVar1, 0) + Call(N(CalculateTattleCamBoomLength)) + Wait(1) + Call(func_802CAE50, CAM_TATTLE, LVar0, LVar1, LVar2) + Call(func_802CABE8, CAM_TATTLE, 0, LVar3, 100, 4) + Wait(2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_TATTLE_WINDOW_OPEN) + Call(SetCamNoDraw, CAM_TATTLE, TRUE) + Wait(10) + Call(ActorSpeak, MSG_EnemyTattle_Mario, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Talk, ANIM_BattleGoombario_Idle) + Call(N(CloseTattleWindow), LVar5) + Wait(12) + Call(SetCamEnabled, CAM_TATTLE, FALSE) + Wait(32) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetBattleFlagBits, BS_FLAGS1_TATTLE_OPEN, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 40) - EVT_EXEC_WAIT(N(EVS_Move_Tattle)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_Headbonk)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(RandInt, 100, LVar0) + IfLt(LVar0, 40) + ExecWait(N(EVS_Move_Tattle)) + Else + ExecWait(N(EVS_Attack_Headbonk)) + EndIf + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_SUB(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(A(EVS_Lee_LoseDisguise)) - EVT_RETURN - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_ENEMY_BEGIN) + Call(GetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) + IfGt(LVar0, 0) + Sub(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) + BreakSwitch + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + ExecWait(A(EVS_Lee_LoseDisguise)) + Return + EndSwitch + Return + End }; Formation A(LeeGoombarioFormation) = { diff --git a/src/battle/area/mac/actor/lee_kooper.inc.c b/src/battle/area/mac/actor/lee_kooper.inc.c index d5225df4ee7..bdc51866b27 100644 --- a/src/battle/area/mac/actor/lee_kooper.inc.c +++ b/src/battle/area/mac/actor/lee_kooper.inc.c @@ -106,416 +106,416 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Kooper_ToppleTurns, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FormDuration, 1) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_Kooper_ToppleTurns, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_FormDuration, 1) + Return + End }; #include "common/battle/SetAbsoluteStatusOffsets.inc.c" EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -2, 38) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -3, -9) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 25, 10, 25) - EVT_CASE_EQ(1) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 5, 15) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -6) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, LVar0) + Switch(LVar0) + CaseEq(0) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -2, 38) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -3, -9) + Call(N(SetAbsoluteStatusOffsets), -10, 25, 10, 25) + CaseEq(1) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 5, 15) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -6) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + EndSwitch + Wait(1) + Goto(0) + Return + End }; s32 N(FlipPosOffsets)[] = { 9, 16, 22, 26, 30, 32, 33, 32, 30, 26, 22, 16, 9, 0, 4, 6, 7, 6, 4, 0, 2, 0 }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleKooper_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleKooper_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_FLIP_TRIGGER) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Kooper_ToppleTurns, 1) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledDefenseTable))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledAnims))) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 5, 15) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -6) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_Hurt) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_THREAD - EVT_WAIT(4) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 30) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -30) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -60) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -75) - EVT_WAIT(1) - EVT_END_THREAD - EVT_USE_BUF(EVT_PTR(N(FlipPosOffsets))) - EVT_LOOP(ARRAY_COUNT(N(FlipPosOffsets))) - EVT_BUF_READ1(LVar0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_Toppled) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Idle) - EVT_CASE_EQ(1) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Toppled) - EVT_END_SWITCH - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Toppled) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_END_IF - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Run) - EVT_SET_CONST(LVar2, ANIM_BattleKooper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Run) - EVT_CASE_EQ(1) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(3.0)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Toppled) - EVT_END_SWITCH - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) - EVT_ELSE - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Run) - EVT_CASE_EQ(1) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Toppled) - EVT_END_SWITCH - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_BurnHurt) + SetConst(LVar2, ANIM_BattleKooper_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_BurnHurt) + SetConst(LVar2, ANIM_BattleKooper_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(A(EVS_Lee_RemoveParentActor)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + ExecWait(A(EVS_Lee_RemoveParentActor)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_FLIP_TRIGGER) + Call(SetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_Kooper_ToppleTurns, 1) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledDefenseTable))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledAnims))) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 5, 15) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -6) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_Hurt) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Thread + Wait(4) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 30) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -30) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -60) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -75) + Wait(1) + EndThread + UseBuf(Ref(N(FlipPosOffsets))) + Loop(ARRAY_COUNT(N(FlipPosOffsets))) + BufRead1(LVar0) + Call(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_Toppled) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + Call(GetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, LVar0) + Switch(LVar0) + CaseEq(0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Idle) + CaseEq(1) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Toppled) + EndSwitch + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + ExecWait(A(EVS_Lee_RemoveParentActor)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + Call(GetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, LVar0) + IfEq(LVar0, 1) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Toppled) + ExecWait(EVS_Enemy_NoDamageHit) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Idle) + ExecWait(EVS_Enemy_Recover) + EndIf + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Run) + SetConst(LVar2, ANIM_BattleKooper_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + Call(GetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, LVar0) + Switch(LVar0) + CaseEq(0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Run) + CaseEq(1) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(3.0)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Toppled) + EndSwitch + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + Call(GetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, LVar0) + Switch(LVar0) + CaseEq(0) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) + Else + Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) + EndIf + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Run) + CaseEq(1) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Toppled) + EndSwitch + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/UnkActorPosFunc.inc.c" EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Kooper_ToppleTurns, LVar0) - EVT_SUB(LVar0, 1) - EVT_IF_GT(LVar0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Kooper_ToppleTurns, LVar0) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(3.0)) - EVT_WAIT(30) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_ELSE - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(3.0)) - EVT_WAIT(20) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_Toppled) - EVT_SET(LVar0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_THREAD - EVT_LOOP(5) - EVT_ADD(LVar0, 15) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_Idle) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, 0) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefenseTable))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -2, 38) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -3, -9) - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_EnterShell) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_NONE) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ShellSpinSlowest) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_KOOPER_SHELL_SPINUP) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 75) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_1, BTL_CAM_MODEX_1, TRUE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PARTNER_RANK_NORMAL) - EVT_SET(LVar0, 10) - EVT_CASE_EQ(PARTNER_RANK_SUPER) - EVT_SET(LVar0, 20) - EVT_CASE_EQ(PARTNER_RANK_ULTRA) - EVT_SET(LVar0, 30) - EVT_END_SWITCH - EVT_SET(LVar9, 0) - EVT_LOOP(LVar0) - EVT_ADD(LVar9, 1) - EVT_SWITCH(LVar9) - EVT_CASE_LT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ShellSpinSlowest) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0)) - EVT_CASE_EQ(20) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) - EVT_CASE_LT(40) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ShellSpinSlower) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(12.0)) - EVT_CASE_EQ(40) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) - EVT_CASE_LT(50) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ShellSpinFaster) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(14.0)) - EVT_CASE_EQ(50) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) - EVT_CASE_LT(60) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ShellSpinFastest) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(16.0)) - EVT_CASE_EQ(60) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAKARRY_AIR_RAID_1) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 15) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_ZERO, 0, ACTOR_DECORATION_GREY_SMOKE_TRAIL) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_THREAD - EVT_CALL(N(UnkActorPosFunc)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 0) - EVT_END_THREAD - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ShellStill) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, -8, 0, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(5) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 16, 4, 0, 10, 0) - EVT_LOOP(5) - EVT_ADD(LVar0, -12) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 2) - EVT_WAIT(2) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -2) - EVT_WAIT(2) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ExitShell) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.5)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(PARTNER_RANK_NORMAL) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 2, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(PARTNER_RANK_SUPER) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(PARTNER_RANK_ULTRA) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 5, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 8) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 60) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ExitShell) - EVT_WAIT(15) - EVT_CALL(YieldTurn) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.5)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, LVar0) + IfEq(LVar0, 1) + Call(GetActorVar, ACTOR_SELF, AVAR_Kooper_ToppleTurns, LVar0) + Sub(LVar0, 1) + IfGt(LVar0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Kooper_ToppleTurns, LVar0) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(3.0)) + Wait(30) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Else + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(3.0)) + Wait(20) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_Toppled) + Set(LVar0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Thread + Loop(5) + Add(LVar0, 15) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(3.0)) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_Idle) + Call(SetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, 0) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(DefenseTable))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -2, 38) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -3, -9) + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_EnterShell) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_NONE) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ShellSpinSlowest) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_KOOPER_SHELL_SPINUP) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 75) + Call(func_8024ECF8, BTL_CAM_MODEY_1, BTL_CAM_MODEX_1, TRUE) + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar0) + Switch(LVar0) + CaseEq(PARTNER_RANK_NORMAL) + Set(LVar0, 10) + CaseEq(PARTNER_RANK_SUPER) + Set(LVar0, 20) + CaseEq(PARTNER_RANK_ULTRA) + Set(LVar0, 30) + EndSwitch + Set(LVar9, 0) + Loop(LVar0) + Add(LVar9, 1) + Switch(LVar9) + CaseLt(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ShellSpinSlowest) + Call(SetActorSpeed, ACTOR_SELF, Float(10.0)) + CaseEq(20) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) + CaseLt(40) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ShellSpinSlower) + Call(SetActorSpeed, ACTOR_SELF, Float(12.0)) + CaseEq(40) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) + CaseLt(50) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ShellSpinFaster) + Call(SetActorSpeed, ACTOR_SELF, Float(14.0)) + CaseEq(50) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) + CaseLt(60) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ShellSpinFastest) + Call(SetActorSpeed, ACTOR_SELF, Float(16.0)) + CaseEq(60) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) + EndSwitch + Wait(1) + EndLoop + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAKARRY_AIR_RAID_1) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 15) + Call(AddActorDecoration, ACTOR_SELF, PRT_ZERO, 0, ACTOR_DECORATION_GREY_SMOKE_TRAIL) + Call(SetGoalToTarget, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Thread + Call(N(UnkActorPosFunc)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 0) + EndThread + Wait(4) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ShellStill) + Call(SetActorRotationOffset, ACTOR_SELF, -8, 0, 0) + Set(LVar0, 0) + Loop(2) + Add(LVar0, 30) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Wait(5) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 16, 4, 0, 10, 0) + Loop(5) + Add(LVar0, -12) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 2) + Wait(2) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -2) + Wait(2) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ExitShell) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.5)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) + Switch(LVar9) + CaseEq(PARTNER_RANK_NORMAL) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 2, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(PARTNER_RANK_SUPER) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(PARTNER_RANK_ULTRA) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 5, BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 8) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 60) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.4)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Add(LVar0, 10) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ExitShell) + Wait(15) + Call(YieldTurn) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.5)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_SUB(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Hurt) - EVT_EXEC_WAIT(A(EVS_Lee_LoseDisguise)) - EVT_RETURN - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_ENEMY_BEGIN) + Call(GetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) + IfGt(LVar0, 0) + Sub(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) + BreakSwitch + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Hurt) + ExecWait(A(EVS_Lee_LoseDisguise)) + Return + EndSwitch + Return + End }; Formation A(LeeKooperFormation) = { diff --git a/src/battle/area/mac/actor/lee_lakilester.inc.c b/src/battle/area/mac/actor/lee_lakilester.inc.c index c9893dc00a6..e9748416bdd 100644 --- a/src/battle/area/mac/actor/lee_lakilester.inc.c +++ b/src/battle/area/mac/actor/lee_lakilester.inc.c @@ -105,289 +105,289 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FormDuration, 1) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_FormDuration, 1) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleLakilester_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleLakilester_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Dead) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Dead) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Dead) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Run) - EVT_SET_CONST(LVar2, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_BurnHurt) + SetConst(LVar2, ANIM_BattleLakilester_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_BurnHurt) + SetConst(LVar2, ANIM_BattleLakilester_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(A(EVS_Lee_RemoveParentActor)) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + ExecWait(A(EVS_Lee_RemoveParentActor)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Dead) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Enemy_Knockback) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + CaseEq(EVENT_SHOCK_DEATH) + ExecWait(A(EVS_Lee_RemoveParentActor)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Dead) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + ExecWait(A(EVS_Lee_RemoveParentActor)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Dead) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Run) + SetConst(LVar2, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_Run) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, 20, 30, LVar2) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_Idle) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, -1) - EVT_ADD(LVar1, 4) - EVT_ADD(LVar2, 2) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_SPINY, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_ELSE - EVT_ADD(LVar0, -3) - EVT_ADD(LVar1, 10) - EVT_ADD(LVar2, 5) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_SPINY, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_SPINY, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SPINY, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPINY, ANIM_BattleLakilester_Spiny) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_LiftSpiny) - EVT_LOOP(4) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_ADDF(LVar1, EVT_FLOAT(2.4)) - EVT_ELSE - EVT_ADD(LVar1, 6) - EVT_END_IF - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_SPINY, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, -3) - EVT_ADD(LVar1, 16) - EVT_ADD(LVar2, 2) - EVT_SETF(LVar3, EVT_FLOAT(0.4)) - EVT_ELSE - EVT_ADD(LVar0, -8) - EVT_ADD(LVar1, 40) - EVT_ADD(LVar2, 5) - EVT_SETF(LVar3, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 0, LVar0, LVar1, LVar2, LVar3, 30, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPIKE_SUMMON_SPINY) - EVT_THREAD - EVT_LOOP(15) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 1, 0, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_SPINY, 1, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, -1, 0, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_SPINY, -1, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_SPINY, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_HoldSpiny) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_StrainHoldSpiny) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_ThrowSpiny) - EVT_WAIT(3) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_SPINY, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LAKILESTER_THROW_SPINY_A) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPINY, ANIM_BattleLakilester_SpinySpin) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_SPINY, EVT_FLOAT(1.5)) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RandInt, 100, LVar3) - EVT_SUB(LVar3, 50) - EVT_ADD(LVar0, LVar3) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_SPINY, LVar0, 0, LVar2, 20, TRUE) - EVT_THREAD - EVT_ADD(LVar0, -50) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_SPINY, LVar0, 0, LVar2, 15, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SPINY, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_END_THREAD - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(YieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 60) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPINY, ANIM_BattleLakilester_SpinySpin) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_SPINY, EVT_FLOAT(1.5)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_SPINY, LVar0, LVar1, LVar2, 20, TRUE) - EVT_THREAD - EVT_ADD(LVar0, -50) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_SPINY, LVar0, 0, LVar2, 15, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SPINY, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_END_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(PARTNER_RANK_NORMAL) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(PARTNER_RANK_SUPER) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 4, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(PARTNER_RANK_ULTRA) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 5, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_WAIT(15) - EVT_CALL(YieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_Run) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, 20, 30, LVar2) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_Idle) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Add(LVar0, -1) + Add(LVar1, 4) + Add(LVar2, 2) + Call(SetPartScale, ACTOR_SELF, PRT_SPINY, Float(0.4), Float(0.4), Float(0.4)) + Else + Add(LVar0, -3) + Add(LVar1, 10) + Add(LVar2, 5) + Call(SetPartScale, ACTOR_SELF, PRT_SPINY, Float(1.0), Float(1.0), Float(1.0)) + EndIf + Call(SetPartPos, ACTOR_SELF, PRT_SPINY, LVar0, LVar1, LVar2) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SPINY, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_SPINY, ANIM_BattleLakilester_Spiny) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_LiftSpiny) + Loop(4) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + AddF(LVar1, Float(2.4)) + Else + Add(LVar1, 6) + EndIf + Call(SetPartPos, ACTOR_SELF, PRT_SPINY, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Add(LVar0, -3) + Add(LVar1, 16) + Add(LVar2, 2) + SetF(LVar3, Float(0.4)) + Else + Add(LVar0, -8) + Add(LVar1, 40) + Add(LVar2, 5) + SetF(LVar3, Float(1.0)) + EndIf + PlayEffect(EFFECT_ENERGY_IN_OUT, 0, LVar0, LVar1, LVar2, LVar3, 30, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPIKE_SUMMON_SPINY) + Thread + Loop(15) + Call(SetActorDispOffset, ACTOR_SELF, 1, 0, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_SPINY, 1, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, -1, 0, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_SPINY, -1, 0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_SPINY, 0, 0, 0) + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_HoldSpiny) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_StrainHoldSpiny) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_ThrowSpiny) + Wait(3) + Call(SetPartSounds, ACTOR_SELF, PRT_SPINY, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LAKILESTER_THROW_SPINY_A) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetAnimation, ACTOR_SELF, PRT_SPINY, ANIM_BattleLakilester_SpinySpin) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_SPINY, Float(1.5)) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RandInt, 100, LVar3) + Sub(LVar3, 50) + Add(LVar0, LVar3) + Call(JumpPartTo, ACTOR_SELF, PRT_SPINY, LVar0, 0, LVar2, 20, TRUE) + Thread + Add(LVar0, -50) + Call(JumpPartTo, ACTOR_SELF, PRT_SPINY, LVar0, 0, LVar2, 15, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SPINY, ACTOR_PART_FLAG_INVISIBLE, TRUE) + EndThread + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(15) + Call(YieldTurn) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 60) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_SPINY, ANIM_BattleLakilester_SpinySpin) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_SPINY, Float(1.5)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpPartTo, ACTOR_SELF, PRT_SPINY, LVar0, LVar1, LVar2, 20, TRUE) + Thread + Add(LVar0, -50) + Call(JumpPartTo, ACTOR_SELF, PRT_SPINY, LVar0, 0, LVar2, 15, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SPINY, ACTOR_PART_FLAG_INVISIBLE, TRUE) + EndThread + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) + Switch(LVar9) + CaseEq(PARTNER_RANK_NORMAL) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(PARTNER_RANK_SUPER) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 4, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(PARTNER_RANK_ULTRA) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 5, BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Wait(15) + Call(YieldTurn) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_SUB(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(A(EVS_Lee_LoseDisguise)) - EVT_RETURN - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_ENEMY_BEGIN) + Call(GetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) + IfGt(LVar0, 0) + Sub(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) + BreakSwitch + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(A(EVS_Lee_LoseDisguise)) + Return + EndSwitch + Return + End }; Formation A(LeeLakilesterFormation) = { diff --git a/src/battle/area/mac/actor/lee_parakarry.inc.c b/src/battle/area/mac/actor/lee_parakarry.inc.c index 8aac3e5f44e..1d60ebfec17 100644 --- a/src/battle/area/mac/actor/lee_parakarry.inc.c +++ b/src/battle/area/mac/actor/lee_parakarry.inc.c @@ -100,261 +100,261 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FormDuration, 1) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_FormDuration, 1) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleParakarry_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleParakarry_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_HurtStill) - EVT_SET(LVar2, 22) - EVT_EXEC_WAIT(A(EVS_Lee_ShockKnockback)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Run) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_HurtStill) - EVT_SET(LVar2, 22) - EVT_EXEC_WAIT(A(EVS_Lee_ShockKnockback)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_Run) - EVT_SET_CONST(LVar2, ANIM_BattleParakarry_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) - EVT_ELSE - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_BurnHurt) + SetConst(LVar2, ANIM_BattleParakarry_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_BurnHurt) + SetConst(LVar2, ANIM_BattleParakarry_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(A(EVS_Lee_RemoveParentActor)) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + ExecWait(A(EVS_Lee_RemoveParentActor)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_HurtStill) + Set(LVar2, 22) + ExecWait(A(EVS_Lee_ShockKnockback)) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Run) + Call(FlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) + CaseEq(EVENT_SHOCK_DEATH) + ExecWait(A(EVS_Lee_RemoveParentActor)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_HurtStill) + Set(LVar2, 22) + ExecWait(A(EVS_Lee_ShockKnockback)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + ExecWait(A(EVS_Lee_RemoveParentActor)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_Run) + SetConst(LVar2, ANIM_BattleParakarry_HurtStill) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) + Else + Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) + EndIf + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_SkyDive) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Run) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 20, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Still) - EVT_WAIT(3) - EVT_CALL(UseBattleCamPresetImmediately, BTL_CAM_PRESET_01) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAKARRY_PREDIVE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_FlyFast) - EVT_CALL(AddGoalPos, ACTOR_SELF, 0, 10, 0) - EVT_CALL(FlyToGoal, ACTOR_SELF, 5, 0, EASING_LINEAR) - EVT_WAIT(2) - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_PreDive) - EVT_END_THREAD - EVT_CALL(AddGoalPos, ACTOR_SELF, 40, 15, 0) - EVT_CALL(FlyToGoal, ACTOR_SELF, 20, -20, EASING_QUARTIC_OUT) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAKARRY_DIVE) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Dive) - EVT_CALL(FlyToGoal, ACTOR_SELF, 5, 0, EASING_LINEAR) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Idle) - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -40, 10, 0) - EVT_CALL(FlyToGoal, ACTOR_SELF, 10, -20, EASING_QUADRATIC_OUT) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(20) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Run) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_PostDive) - EVT_WAIT(1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(PARTNER_RANK_NORMAL) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(PARTNER_RANK_SUPER) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(PARTNER_RANK_ULTRA) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 5, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_CALL(PlaySound, SOUND_NONE) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Dive) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4)) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Still) - EVT_THREAD - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Run) - EVT_END_THREAD - EVT_CALL(AddGoalPos, ACTOR_SELF, 30, 0, 0) - EVT_CALL(JumpWithBounce, ACTOR_SELF, 10, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Idle) - EVT_WAIT(6) - EVT_CALL(YieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Run) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Run) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 20, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Still) + Wait(3) + Call(UseBattleCamPresetImmediately, BTL_CAM_PRESET_01) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAKARRY_PREDIVE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_FlyFast) + Call(AddGoalPos, ACTOR_SELF, 0, 10, 0) + Call(FlyToGoal, ACTOR_SELF, 5, 0, EASING_LINEAR) + Wait(2) + Thread + Wait(3) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_PreDive) + EndThread + Call(AddGoalPos, ACTOR_SELF, 40, 15, 0) + Call(FlyToGoal, ACTOR_SELF, 20, -20, EASING_QUARTIC_OUT) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAKARRY_DIVE) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Dive) + Call(FlyToGoal, ACTOR_SELF, 5, 0, EASING_LINEAR) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Thread + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Idle) + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -40, 10, 0) + Call(FlyToGoal, ACTOR_SELF, 10, -20, EASING_QUADRATIC_OUT) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(20) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Run) + Call(FlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_PostDive) + Wait(1) + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) + Switch(LVar9) + CaseEq(PARTNER_RANK_NORMAL) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(PARTNER_RANK_SUPER) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(PARTNER_RANK_ULTRA) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 5, BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Call(PlaySound, SOUND_NONE) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Dive) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.4)) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Still) + Thread + Wait(4) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Run) + EndThread + Call(AddGoalPos, ACTOR_SELF, 30, 0, 0) + Call(JumpWithBounce, ACTOR_SELF, 10, Float(4.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Idle) + Wait(6) + Call(YieldTurn) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Run) + Call(FlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_EXEC_WAIT(N(EVS_Attack_SkyDive)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_Attack_SkyDive)) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_SUB(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_HurtStill) - EVT_EXEC_WAIT(A(EVS_Lee_LoseDisguise)) - EVT_RETURN - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_ENEMY_BEGIN) + Call(GetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) + IfGt(LVar0, 0) + Sub(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) + BreakSwitch + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_HurtStill) + ExecWait(A(EVS_Lee_LoseDisguise)) + Return + EndSwitch + Return + End }; Formation A(LeeParakarryFormation) = { diff --git a/src/battle/area/mac/actor/lee_sushie.inc.c b/src/battle/area/mac/actor/lee_sushie.inc.c index 0dad631d927..60f47b03861 100644 --- a/src/battle/area/mac/actor/lee_sushie.inc.c +++ b/src/battle/area/mac/actor/lee_sushie.inc.c @@ -88,385 +88,385 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FormDuration, 1) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_FormDuration, 1) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleSushie_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleSushie_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_SET(LVar2, 20) - EVT_EXEC_WAIT(A(EVS_Lee_ShockKnockback)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_SET(LVar2, 20) - EVT_EXEC_WAIT(A(EVS_Lee_ShockKnockback)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Run) - EVT_SET_CONST(LVar2, ANIM_BattleSushie_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_BurnHurt) + SetConst(LVar2, ANIM_BattleSushie_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_BurnHurt) + SetConst(LVar2, ANIM_BattleSushie_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(A(EVS_Lee_RemoveParentActor)) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + ExecWait(A(EVS_Lee_RemoveParentActor)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + Set(LVar2, 20) + ExecWait(A(EVS_Lee_ShockKnockback)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + CaseEq(EVENT_SHOCK_DEATH) + ExecWait(A(EVS_Lee_RemoveParentActor)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + Set(LVar2, 20) + ExecWait(A(EVS_Lee_ShockKnockback)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + ExecWait(A(EVS_Lee_RemoveParentActor)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Run) + SetConst(LVar2, ANIM_BattleSushie_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 70, 0, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, LVar0) - EVT_DIV(LVar3, EVT_FLOAT(3.0)) - EVT_SET(LVarA, LVar3) - EVT_IF_LT(LVarA, 0) - EVT_MUL(LVarA, -1) - EVT_END_IF - EVT_CALL(MoveBattleCamOver, LVarA) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Run) - EVT_CALL(RunToGoal, ACTOR_SELF, LVarA, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Idle) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_08) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(AddBattleCamZoom, -50) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_1, BTL_CAM_MODEX_1, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Tense1) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Tense2) - EVT_WAIT(15) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Jump) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 36) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 20) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PARTNER_RANK_NORMAL) - EVT_WAIT(13) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CASE_EQ(PARTNER_RANK_SUPER) - EVT_WAIT(13) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.05), EVT_FLOAT(1.05), EVT_FLOAT(1.05)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.1), EVT_FLOAT(1.1), EVT_FLOAT(1.1)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.15), EVT_FLOAT(1.15), EVT_FLOAT(1.15)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.2), EVT_FLOAT(1.2), EVT_FLOAT(1.2)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.25), EVT_FLOAT(1.25), EVT_FLOAT(1.25)) - EVT_CASE_EQ(PARTNER_RANK_ULTRA) - EVT_WAIT(13) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.1), EVT_FLOAT(1.1), EVT_FLOAT(1.1)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.2), EVT_FLOAT(1.2), EVT_FLOAT(1.2)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.3), EVT_FLOAT(1.3), EVT_FLOAT(1.3)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.4), EVT_FLOAT(1.4), EVT_FLOAT(1.4)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.5), EVT_FLOAT(1.5), EVT_FLOAT(1.5)) - EVT_END_SWITCH - EVT_END_THREAD - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_BELLY_FLOP) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Jump) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Fall) - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Land) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(LandJump, ACTOR_SELF) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_STEP) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(AddGoalPos, ACTOR_SELF, -15, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_STEP) - EVT_CALL(AddGoalPos, ACTOR_SELF, -10, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_STEP) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Jump) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 36) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 20) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PARTNER_RANK_NORMAL) - EVT_WAIT(13) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.1), EVT_FLOAT(1.1), EVT_FLOAT(1.1)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.1), EVT_FLOAT(1.1), EVT_FLOAT(1.1)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.2), EVT_FLOAT(1.2), EVT_FLOAT(1.2)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.2), EVT_FLOAT(1.2), EVT_FLOAT(1.2)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.3), EVT_FLOAT(1.3), EVT_FLOAT(1.3)) - EVT_CASE_EQ(PARTNER_RANK_SUPER) - EVT_WAIT(13) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.15), EVT_FLOAT(1.15), EVT_FLOAT(1.15)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.2), EVT_FLOAT(1.2), EVT_FLOAT(1.2)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.35), EVT_FLOAT(1.35), EVT_FLOAT(1.35)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.4), EVT_FLOAT(1.4), EVT_FLOAT(1.4)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.55), EVT_FLOAT(1.55), EVT_FLOAT(1.55)) - EVT_CASE_EQ(PARTNER_RANK_ULTRA) - EVT_WAIT(13) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.2), EVT_FLOAT(1.2), EVT_FLOAT(1.2)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.3), EVT_FLOAT(1.3), EVT_FLOAT(1.3)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.5), EVT_FLOAT(1.5), EVT_FLOAT(1.5)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.6), EVT_FLOAT(1.6), EVT_FLOAT(1.6)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.8), EVT_FLOAT(1.8), EVT_FLOAT(1.8)) - EVT_END_SWITCH - EVT_END_THREAD - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_BELLY_FLOP) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Jump) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Fall) - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Land) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVarA) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(PARTNER_RANK_NORMAL) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(PARTNER_RANK_SUPER) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 4, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(PARTNER_RANK_ULTRA) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 5, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Fall) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 60) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_STEP) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_STEP) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_STEP) - EVT_ADD(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_STEP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Idle) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 70, 0, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Sub(LVar3, LVar0) + Div(LVar3, Float(3.0)) + Set(LVarA, LVar3) + IfLt(LVarA, 0) + Mul(LVarA, -1) + EndIf + Call(MoveBattleCamOver, LVarA) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Run) + Call(RunToGoal, ACTOR_SELF, LVarA, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Idle) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_08) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(AddBattleCamZoom, -50) + Call(MoveBattleCamOver, 30) + Call(func_8024ECF8, BTL_CAM_MODEY_1, BTL_CAM_MODEX_1, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Tense1) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Tense2) + Wait(15) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Jump) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 36) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotation, ACTOR_SELF, 0, 0, 20) + EndThread + Thread + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar0) + Switch(LVar0) + CaseEq(PARTNER_RANK_NORMAL) + Wait(13) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.0), Float(1.0), Float(1.0)) + CaseEq(PARTNER_RANK_SUPER) + Wait(13) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.05), Float(1.05), Float(1.05)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.1), Float(1.1), Float(1.1)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.15), Float(1.15), Float(1.15)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.2), Float(1.2), Float(1.2)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.25), Float(1.25), Float(1.25)) + CaseEq(PARTNER_RANK_ULTRA) + Wait(13) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.1), Float(1.1), Float(1.1)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.2), Float(1.2), Float(1.2)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.3), Float(1.3), Float(1.3)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.4), Float(1.4), Float(1.4)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.5), Float(1.5), Float(1.5)) + EndSwitch + EndThread + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_BELLY_FLOP) + Call(SetGoalToTarget, ACTOR_SELF) + Thread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Jump) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Fall) + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Land) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.0), Float(1.0), Float(1.0)) + Call(LandJump, ACTOR_SELF) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_STEP) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(AddGoalPos, ACTOR_SELF, -15, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_STEP) + Call(AddGoalPos, ACTOR_SELF, -10, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_STEP) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Jump) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 36) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotation, ACTOR_SELF, 0, 0, 20) + EndThread + Thread + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar0) + Switch(LVar0) + CaseEq(PARTNER_RANK_NORMAL) + Wait(13) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.1), Float(1.1), Float(1.1)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.1), Float(1.1), Float(1.1)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.2), Float(1.2), Float(1.2)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.2), Float(1.2), Float(1.2)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.3), Float(1.3), Float(1.3)) + CaseEq(PARTNER_RANK_SUPER) + Wait(13) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.15), Float(1.15), Float(1.15)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.2), Float(1.2), Float(1.2)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.35), Float(1.35), Float(1.35)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.4), Float(1.4), Float(1.4)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.55), Float(1.55), Float(1.55)) + CaseEq(PARTNER_RANK_ULTRA) + Wait(13) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.2), Float(1.2), Float(1.2)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.3), Float(1.3), Float(1.3)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.5), Float(1.5), Float(1.5)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.6), Float(1.6), Float(1.6)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.8), Float(1.8), Float(1.8)) + EndSwitch + EndThread + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_BELLY_FLOP) + Call(SetGoalToTarget, ACTOR_SELF) + Thread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Jump) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Fall) + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Land) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Thread + Wait(3) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.0), Float(1.0), Float(1.0)) + EndThread + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVarA) + Switch(LVarA) + CaseEq(PARTNER_RANK_NORMAL) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(PARTNER_RANK_SUPER) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 4, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(PARTNER_RANK_ULTRA) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 5, BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Fall) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 60) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.4)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_STEP) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_STEP) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_STEP) + Add(LVar0, 10) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_STEP) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Idle) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_SUB(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_EXEC_WAIT(A(EVS_Lee_LoseDisguise)) - EVT_RETURN - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_ENEMY_BEGIN) + Call(GetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) + IfGt(LVar0, 0) + Sub(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) + BreakSwitch + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + ExecWait(A(EVS_Lee_LoseDisguise)) + Return + EndSwitch + Return + End }; Formation A(LeeSushieFormation) = { diff --git a/src/battle/area/mac/actor/lee_watt.inc.c b/src/battle/area/mac/actor/lee_watt.inc.c index cf99d9eb412..aff8a51e476 100644 --- a/src/battle/area/mac/actor/lee_watt.inc.c +++ b/src/battle/area/mac/actor/lee_watt.inc.c @@ -101,13 +101,13 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FormDuration, 1) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_FormDuration, 1) + Return + End }; API_CALLABLE(N(WattFXUpdate)) { @@ -198,10 +198,10 @@ API_CALLABLE(N(WattFXUpdate)) { } EvtScript N(EVS_Idle) = { - EVT_SET_PRIORITY(99) - EVT_CALL(N(WattFXUpdate)) - EVT_RETURN - EVT_END + SetPriority(99) + Call(N(WattFXUpdate)) + Return + End }; API_CALLABLE(N(WattFXRemove)) { @@ -245,91 +245,91 @@ API_CALLABLE(N(WattFXSetEffect)) { } EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(N(WattFXSetBouncing), 0) - EVT_CALL(N(WattFXSetActive), 1) - EVT_CALL(N(WattFXSetEffect), 0) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleWatt_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleWatt_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CALL(N(WattFXRemove)) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_CALL(N(WattFXRemove)) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_CALL(N(WattFXRemove)) - EVT_EXEC_WAIT(A(EVS_Lee_RemoveParentActor)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Run) - EVT_SET_CONST(LVar2, ANIM_BattleWatt_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(N(WattFXSetBouncing), 1) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(N(WattFXSetBouncing), 0) + Call(N(WattFXSetActive), 1) + Call(N(WattFXSetEffect), 0) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_BurnHurt) + SetConst(LVar2, ANIM_BattleWatt_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_BurnHurt) + SetConst(LVar2, ANIM_BattleWatt_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + Call(N(WattFXRemove)) + ExecWait(A(EVS_Lee_RemoveParentActor)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + Call(N(WattFXRemove)) + ExecWait(A(EVS_Lee_RemoveParentActor)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + Call(N(WattFXRemove)) + ExecWait(A(EVS_Lee_RemoveParentActor)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_Run) + SetConst(LVar2, ANIM_BattleWatt_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(N(WattFXSetBouncing), 1) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/UnkBackgroundFunc3.inc.c" @@ -337,143 +337,143 @@ EvtScript N(EVS_HandleEvent) = { #include "common/SetBackgroundAlpha.inc.c" EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 350) - EVT_CALL(SetBattleCamOffsetZ, 40) - EVT_CALL(MoveBattleCamOver, 80) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Run) - EVT_CALL(N(WattFXSetEffect), 1) - EVT_CALL(AddGoalPos, ACTOR_SELF, 15, -10, 5) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Idle) - EVT_CALL(N(WattFXSetEffect), 0) - EVT_WAIT(5) - EVT_CALL(N(WattFXSetBouncing), 0) - EVT_CALL(AddGoalPos, ACTOR_SELF, 25, 20, 0) - EVT_CALL(FlyToGoal, ACTOR_SELF, 15, -20, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Strain) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(FlyToGoal, ACTOR_SELF, 5, 0, EASING_COS_IN_OUT) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Idle) - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -40, 10, 0) - EVT_CALL(FlyToGoal, ACTOR_SELF, 10, -20, EASING_QUADRATIC_OUT) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(N(WattFXSetActive), 1) - EVT_CALL(N(WattFXSetBouncing), 1) - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Run) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Idle) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(N(WattFXSetActive), 0) - EVT_SET(LVarA, 40) - EVT_CALL(AddBattleCamZoom, -75) - EVT_CALL(MoveBattleCamOver, LVarA) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_WATT_CHARGE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 4) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 8, LVar0, LVar1, LVar2, EVT_FLOAT(0.52), LVarA, 0) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 12) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 8, LVar0, LVar1, LVar2, EVT_FLOAT(1.3), LVarA, 0) - EVT_END_IF - EVT_CALL(N(UnkBackgroundFunc3)) - EVT_SET(LVar9, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_StrainBigger) - EVT_LOOP(LVarA) - EVT_ADD(LVar9, 3) - EVT_IF_GT(LVar9, 200) - EVT_SET(LVar9, 200) - EVT_END_IF - EVT_CALL(N(SetBackgroundAlpha), LVar9) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Idle) - EVT_CALL(SetActorPaletteEffect, ACTOR_SELF, PRT_MAIN, ACTOR_PAL_ADJUST_WATT_IDLE) - EVT_CALL(AddBattleCamZoom, 75) - EVT_CALL(MoveBattleCamOver, 5) - EVT_THREAD - EVT_WAIT(2) - EVT_CALL(N(SetBackgroundAlpha), 0) - EVT_END_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(PARTNER_RANK_NORMAL) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_IGNORE_DEFENSE, SUPPRESS_EVENT_ALL, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(PARTNER_RANK_SUPER) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_IGNORE_DEFENSE, SUPPRESS_EVENT_ALL, 0, 4, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(PARTNER_RANK_ULTRA) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_IGNORE_DEFENSE, SUPPRESS_EVENT_ALL, 0, 5, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(N(WattFXSetActive), 1) - EVT_CALL(N(WattFXSetBouncing), 1) - EVT_CALL(AddGoalPos, ACTOR_SELF, 25, 10, 0) - EVT_CALL(FlyToGoal, ACTOR_SELF, 15, -10, EASING_COS_IN_OUT) - EVT_WAIT(15) - EVT_CALL(YieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Run) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Idle) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 350) + Call(SetBattleCamOffsetZ, 40) + Call(MoveBattleCamOver, 80) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Run) + Call(N(WattFXSetEffect), 1) + Call(AddGoalPos, ACTOR_SELF, 15, -10, 5) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Idle) + Call(N(WattFXSetEffect), 0) + Wait(5) + Call(N(WattFXSetBouncing), 0) + Call(AddGoalPos, ACTOR_SELF, 25, 20, 0) + Call(FlyToGoal, ACTOR_SELF, 15, -20, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Strain) + Call(SetGoalToTarget, ACTOR_SELF) + Call(FlyToGoal, ACTOR_SELF, 5, 0, EASING_COS_IN_OUT) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Thread + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Idle) + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -40, 10, 0) + Call(FlyToGoal, ACTOR_SELF, 10, -20, EASING_QUADRATIC_OUT) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(N(WattFXSetActive), 1) + Call(N(WattFXSetBouncing), 1) + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Run) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Idle) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(N(WattFXSetActive), 0) + Set(LVarA, 40) + Call(AddBattleCamZoom, -75) + Call(MoveBattleCamOver, LVarA) + Call(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_WATT_CHARGE) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 4) + PlayEffect(EFFECT_RADIAL_SHIMMER, 8, LVar0, LVar1, LVar2, Float(0.52), LVarA, 0) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 12) + PlayEffect(EFFECT_RADIAL_SHIMMER, 8, LVar0, LVar1, LVar2, Float(1.3), LVarA, 0) + EndIf + Call(N(UnkBackgroundFunc3)) + Set(LVar9, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_StrainBigger) + Loop(LVarA) + Add(LVar9, 3) + IfGt(LVar9, 200) + Set(LVar9, 200) + EndIf + Call(N(SetBackgroundAlpha), LVar9) + Wait(1) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Idle) + Call(SetActorPaletteEffect, ACTOR_SELF, PRT_MAIN, ACTOR_PAL_ADJUST_WATT_IDLE) + Call(AddBattleCamZoom, 75) + Call(MoveBattleCamOver, 5) + Thread + Wait(2) + Call(N(SetBackgroundAlpha), 0) + EndThread + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) + Switch(LVar9) + CaseEq(PARTNER_RANK_NORMAL) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_IGNORE_DEFENSE, SUPPRESS_EVENT_ALL, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(PARTNER_RANK_SUPER) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_IGNORE_DEFENSE, SUPPRESS_EVENT_ALL, 0, 4, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(PARTNER_RANK_ULTRA) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_IGNORE_DEFENSE, SUPPRESS_EVENT_ALL, 0, 5, BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(N(WattFXSetActive), 1) + Call(N(WattFXSetBouncing), 1) + Call(AddGoalPos, ACTOR_SELF, 25, 10, 0) + Call(FlyToGoal, ACTOR_SELF, 15, -10, EASING_COS_IN_OUT) + Wait(15) + Call(YieldTurn) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Run) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Idle) + EndCaseGroup + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_SUB(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Hurt) - EVT_CALL(N(WattFXRemove)) - EVT_EXEC_WAIT(A(EVS_Lee_LoseDisguise)) - EVT_RETURN - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_ENEMY_BEGIN) + Call(GetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) + IfGt(LVar0, 0) + Sub(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_FormDuration, LVar0) + BreakSwitch + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_Hurt) + Call(N(WattFXRemove)) + ExecWait(A(EVS_Lee_LoseDisguise)) + Return + EndSwitch + Return + End }; Formation A(LeeWattFormation) = { diff --git a/src/battle/area/mac/actor/master1.c b/src/battle/area/mac/actor/master1.c index 3b7a4533d5a..9e9651e8366 100644 --- a/src/battle/area/mac/actor/master1.c +++ b/src/battle/area/mac/actor/master1.c @@ -109,315 +109,315 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_BattleCry, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_WasHit, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitCounter, INITIAL_HIT_COUNT) - EVT_SET(GF_FoughtTheMaster, 1) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_NO_GAME_OVER, TRUE) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_BattleCry, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_Unused, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_WasHit, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_HitCounter, INITIAL_HIT_COUNT) + Set(GF_FoughtTheMaster, 1) + Call(SetBattleFlagBits, BS_FLAGS1_NO_GAME_OVER, TRUE) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent_Inner) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_TheMaster_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_TheMaster_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_Defeated) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Walk) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_Defeated) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_Defeated) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_Defeated) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_Idle) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_Run) - EVT_SET_CONST(LVar2, ANIM_TheMaster_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_BurnHurt) + SetConst(LVar2, ANIM_TheMaster_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_BurnHurt) + SetConst(LVar2, ANIM_TheMaster_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_Defeated) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_Hurt) + ExecWait(EVS_Enemy_Knockback) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Walk) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_Defeated) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_Defeated) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_Defeated) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_Idle) + ExecWait(EVS_Enemy_ReturnHome) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_Run) + SetConst(LVar2, ANIM_TheMaster_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Run) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 30, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.6)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Idle) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_WindupLoop) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_WindupStill) - EVT_WAIT(7) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_DownwardStrike) - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 8, TRUE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 0, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(10) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Run) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 10, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Idle) - EVT_WAIT(3) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Idle) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Run) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Idle) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_SMACK) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_STRIKE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Run) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 10, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Idle) - EVT_WAIT(20) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Idle) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Run) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Idle) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Run) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 30, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(4.6)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Idle) + Wait(10) + Thread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_WindupLoop) + Wait(10) + Thread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_WindupStill) + Wait(7) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_DownwardStrike) + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 8, TRUE) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 0, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(10) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Set(LVar1, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Run) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 10, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Idle) + Wait(3) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Idle) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(3.8)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Run) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Idle) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_SMACK) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_STRIKE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Set(LVar1, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Run) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 10, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Idle) + Wait(20) + EndCaseGroup + EndSwitch + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Idle) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Run) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Idle) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_BattleCry, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(ActorSpeak, MSG_MAC_Gate_002E, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Talk, ANIM_TheMaster_Walk) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_BattleCry, TRUE) - EVT_END_IF - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_DOJO) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar1) - EVT_DIV(LVar1, 2) - EVT_IF_LE(LVar0, LVar1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(ActorSpeak, MSG_MAC_Gate_0031, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Talk, ANIM_TheMaster_Walk) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_CALL(GetPlayerHP, LVar0) - EVT_IF_LE(LVar0, 5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(ActorSpeak, MSG_MAC_Gate_0032, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Talk, ANIM_TheMaster_Walk) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) + Call(GetActorVar, ACTOR_SELF, AVAR_BattleCry, LVar0) + IfEq(LVar0, FALSE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(ActorSpeak, MSG_MAC_Gate_002E, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Talk, ANIM_TheMaster_Walk) + Call(SetActorVar, ACTOR_SELF, AVAR_BattleCry, TRUE) + EndIf + CaseEq(PHASE_ENEMY_BEGIN) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAGS_DOJO) + BreakSwitch + EndIf + Call(GetActorHP, ACTOR_SELF, LVar0) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar1) + Div(LVar1, 2) + IfLe(LVar0, LVar1) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(ActorSpeak, MSG_MAC_Gate_0031, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Talk, ANIM_TheMaster_Walk) + BreakSwitch + EndIf + Call(GetPlayerHP, LVar0) + IfLe(LVar0, 5) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(ActorSpeak, MSG_MAC_Gate_0032, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Talk, ANIM_TheMaster_Walk) + BreakSwitch + EndIf + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_EXEC_WAIT(N(EVS_HandleEvent_Inner)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_DOJO) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_WasHit, TRUE) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_HitCounter, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CASE_OR_EQ(EVENT_BURN_HIT) - EVT_CASE_OR_EQ(EVENT_SPIN_SMASH_HIT) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_WasHit, LVarA) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HitCounter, LVarB) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_WasHit, FALSE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_DOJO | STATUS_FLAG_POISON | STATUS_FLAG_SHRINK) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(BTL_MENU_TYPE_SMASH) - EVT_CASE_OR_EQ(BTL_MENU_TYPE_JUMP) - EVT_SET(LFlag0, TRUE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_IF_EQ(LFlag0, FALSE) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_IF_EQ(LVarA, 1) - EVT_IF_GT(LVarB, INITIAL_HIT_COUNT) + ExecWait(N(EVS_HandleEvent_Inner)) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAGS_DOJO) + Return + EndIf + Call(GetBattleFlags, LVar0) + IfFlag(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) + Call(GetLastDamage, ACTOR_SELF, LVar0) + IfGt(LVar0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_WasHit, TRUE) + Call(AddActorVar, ACTOR_SELF, AVAR_HitCounter, 1) + EndIf + EndIf + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT) + CaseOrEq(EVENT_BURN_HIT) + CaseOrEq(EVENT_SPIN_SMASH_HIT) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + Call(GetActorVar, ACTOR_SELF, AVAR_WasHit, LVarA) + Call(GetActorVar, ACTOR_SELF, AVAR_HitCounter, LVarB) + Call(SetActorVar, ACTOR_SELF, AVAR_WasHit, FALSE) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAGS_DOJO | STATUS_FLAG_POISON | STATUS_FLAG_SHRINK) + BreakSwitch + EndIf + Set(LFlag0, FALSE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar0) + CaseOrEq(BTL_MENU_TYPE_SMASH) + CaseOrEq(BTL_MENU_TYPE_JUMP) + Set(LFlag0, TRUE) + EndCaseGroup + EndSwitch + IfEq(LFlag0, FALSE) + BreakSwitch + EndIf + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + IfEq(LVarA, 1) + IfGt(LVarB, INITIAL_HIT_COUNT) // 'Excellent move!' - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(ActorSpeak, MSG_MAC_Gate_0030, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Talk, ANIM_TheMaster_Walk) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitCounter, 0) - EVT_END_IF - EVT_ELSE + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(ActorSpeak, MSG_MAC_Gate_0030, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Talk, ANIM_TheMaster_Walk) + Call(SetActorVar, ACTOR_SELF, AVAR_HitCounter, 0) + EndIf + Else // 'That won't work on me.' - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(ActorSpeak, MSG_MAC_Gate_002F, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Talk, ANIM_TheMaster_Walk) - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(ActorSpeak, MSG_MAC_Gate_002F, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Talk, ANIM_TheMaster_Walk) + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/battle/area/mac/actor/master2.c b/src/battle/area/mac/actor/master2.c index f939236c602..8b076db4720 100644 --- a/src/battle/area/mac/actor/master2.c +++ b/src/battle/area/mac/actor/master2.c @@ -124,527 +124,527 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_BattleCry, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_WasHit, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitCounter, INITIAL_HIT_COUNT) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_NO_GAME_OVER, TRUE) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_BattleCry, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_Unused, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_WasHit, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_HitCounter, INITIAL_HIT_COUNT) + Call(SetBattleFlagBits, BS_FLAGS1_NO_GAME_OVER, TRUE) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent_Inner) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedHurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_TheMaster_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_TheMaster_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedDefeated) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedHurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedHurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedHurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedWalk) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedIdle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedHurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedDefeated) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedHurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedDefeated) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedHurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedDefeated) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedIdle) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedIdle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedRun) - EVT_SET_CONST(LVar2, ANIM_TheMaster_AscendedHurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedHurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_BurnHurt) + SetConst(LVar2, ANIM_TheMaster_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_BurnHurt) + SetConst(LVar2, ANIM_TheMaster_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedDefeated) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedHurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedHurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedHurt) + ExecWait(EVS_Enemy_Knockback) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedWalk) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedIdle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedHurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedDefeated) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedHurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedDefeated) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedHurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedDefeated) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedIdle) + ExecWait(EVS_Enemy_ReturnHome) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedIdle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedRun) + SetConst(LVar2, ANIM_TheMaster_AscendedHurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_StrikeOnce) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.8)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_STANCE_CHANGE) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_STANCE_CHANGE) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedPunch) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedKick) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_KICK) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 0, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -50, 0, 0) - EVT_CALL(RunToGoal, ACTOR_SELF, 10, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_WAIT(10) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 0, 0, 0) - EVT_CALL(RunToGoal, ACTOR_SELF, 5, FALSE) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_SMACK) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_STRIKE_ONCE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 20, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 36) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.2)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedMidair) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedLand) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(3) - EVT_ADD(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedMidair) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_B) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedLand) - EVT_WAIT(20) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(3.8)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_STANCE_CHANGE) + Thread + Wait(15) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_STANCE_CHANGE) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedPunch) + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedKick) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_KICK) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 0, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -50, 0, 0) + Call(RunToGoal, ACTOR_SELF, 10, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Wait(10) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Return + EndCaseGroup + EndSwitch + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 0, 0, 0) + Call(RunToGoal, ACTOR_SELF, 5, FALSE) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_SMACK) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_STRIKE_ONCE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 20, 0) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 36) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.2)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedMidair) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedLand) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Wait(3) + Add(LVar0, 20) + Set(LVar1, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedMidair) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_B) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedLand) + Wait(20) + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(3.8)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_StrikeTwice) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_08) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamZoom, 200) - EVT_CALL(SetBattleCamOffsetZ, 13) - EVT_CALL(MoveBattleCamOver, 60) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedDownwardStance) - EVT_WAIT(40) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_07) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 1) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_LEAP) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 0, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -50, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedPalmStance) - EVT_CALL(RunToGoal, ACTOR_SELF, 10, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_WAIT(10) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedPalmStance) - EVT_CALL(RunToGoal, ACTOR_SELF, 5, FALSE) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(4.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_SMACK) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_STRIKE_TWICE_1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_JUMP) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedUppercut) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.9)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 25, FALSE, TRUE, FALSE) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_WAIT(2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_SMACK) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_STRIKE_TWICE_2, BS_FLAGS1_TRIGGER_EVENTS) - EVT_WAIT(15) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLIP) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 10, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 36) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedMidair) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 30, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedLand) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(3) - EVT_ADD(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedMidair) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_B) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedLand) - EVT_WAIT(20) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_08) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamZoom, 200) + Call(SetBattleCamOffsetZ, 13) + Call(MoveBattleCamOver, 60) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedDownwardStance) + Wait(40) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_PRESET_07) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 1) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_LEAP) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 0, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -50, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedPalmStance) + Call(RunToGoal, ACTOR_SELF, 10, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Wait(10) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Return + EndCaseGroup + EndSwitch + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedPalmStance) + Call(RunToGoal, ACTOR_SELF, 5, FALSE) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(4.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + EndThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_SMACK) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_STRIKE_TWICE_1, BS_FLAGS1_INCLUDE_POWER_UPS) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Thread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_JUMP) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedUppercut) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.9)) + Call(JumpToGoal, ACTOR_SELF, 25, FALSE, TRUE, FALSE) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + EndThread + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2)) + EndThread + Wait(2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_SMACK) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_STRIKE_TWICE_2, BS_FLAGS1_TRIGGER_EVENTS) + Wait(15) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLIP) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 10, 0) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 36) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedMidair) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 30, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedLand) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Wait(3) + Add(LVar0, 20) + Set(LVar1, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedMidair) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_B) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedLand) + Wait(20) + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(3.8)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(RandInt, 100, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_LT(20) - EVT_EXEC_WAIT(N(EVS_Attack_StrikeTwice)) - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(N(EVS_Attack_StrikeOnce)) - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(RandInt, 100, LVar0) + Switch(LVar0) + CaseLt(20) + ExecWait(N(EVS_Attack_StrikeTwice)) + CaseDefault + ExecWait(N(EVS_Attack_StrikeOnce)) + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_BattleCry, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_WAIT(10) - EVT_CALL(ActorSpeak, MSG_MAC_Gate_002E, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Talk, ANIM_TheMaster_Walk) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_BattleCry, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Cough) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_OpenMouth) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_GHOST_TRANSFORM) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 30, 0) - EVT_SET(LVar0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Still) - EVT_LOOP(15) - EVT_ADD(LVar0, 24) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(LVar0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Still) - EVT_LOOP(5) - EVT_ADD(LVar0, 18) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SMOKE_BURST) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 3) - EVT_LOOP(3) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) - EVT_WAIT(3) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Still) - EVT_LOOP(5) - EVT_ADD(LVar0, 36) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedStill) - EVT_LOOP(5) - EVT_ADD(LVar0, 18) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(15) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(AscendedAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(ActorSpeak, MSG_MAC_Gate_0033, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedTalk, ANIM_TheMaster_AscendedWalk) - EVT_END_IF - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_DOJO) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar1) - EVT_DIV(LVar1, 2) - EVT_IF_LE(LVar0, LVar1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(ActorSpeak, MSG_MAC_Gate_0036, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedTalk, ANIM_TheMaster_AscendedWalk) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_CALL(GetPlayerHP, LVar0) - EVT_IF_LE(LVar0, 5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(ActorSpeak, MSG_MAC_Gate_0037, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedTalk, ANIM_TheMaster_AscendedWalk) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) + Call(GetActorVar, ACTOR_SELF, AVAR_BattleCry, LVar0) + IfEq(LVar0, FALSE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_13) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Wait(10) + Call(ActorSpeak, MSG_MAC_Gate_002E, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Talk, ANIM_TheMaster_Walk) + Call(SetActorVar, ACTOR_SELF, AVAR_BattleCry, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Cough) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_OpenMouth) + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_GHOST_TRANSFORM) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 20) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar1, LVar2, Float(1.0), 30, 0) + Set(LVar0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Still) + Loop(15) + Add(LVar0, 24) + Call(SetActorRotation, ACTOR_SELF, 0, LVar0, 0) + Wait(1) + EndLoop + Set(LVar0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Still) + Loop(5) + Add(LVar0, 18) + Call(SetActorRotation, ACTOR_SELF, 0, LVar0, 0) + Wait(1) + EndLoop + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SMOKE_BURST) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 3) + Loop(3) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) + Wait(3) + EndLoop + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Still) + Loop(5) + Add(LVar0, 36) + Call(SetActorRotation, ACTOR_SELF, 0, LVar0, 0) + Wait(1) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedStill) + Loop(5) + Add(LVar0, 18) + Call(SetActorRotation, ACTOR_SELF, 0, LVar0, 0) + Wait(1) + EndLoop + Wait(15) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(AscendedAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(ActorSpeak, MSG_MAC_Gate_0033, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedTalk, ANIM_TheMaster_AscendedWalk) + EndIf + CaseEq(PHASE_ENEMY_BEGIN) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAGS_DOJO) + BreakSwitch + EndIf + Call(GetActorHP, ACTOR_SELF, LVar0) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar1) + Div(LVar1, 2) + IfLe(LVar0, LVar1) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(ActorSpeak, MSG_MAC_Gate_0036, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedTalk, ANIM_TheMaster_AscendedWalk) + BreakSwitch + EndIf + Call(GetPlayerHP, LVar0) + IfLe(LVar0, 5) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(ActorSpeak, MSG_MAC_Gate_0037, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedTalk, ANIM_TheMaster_AscendedWalk) + BreakSwitch + EndIf + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_EXEC_WAIT(N(EVS_HandleEvent_Inner)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_DOJO) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_WasHit, TRUE) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_HitCounter, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CASE_OR_EQ(EVENT_BURN_HIT) - EVT_CASE_OR_EQ(EVENT_SPIN_SMASH_HIT) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_WasHit, LVarA) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HitCounter, LVarB) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_WasHit, FALSE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_DOJO | STATUS_FLAG_POISON | STATUS_FLAG_SHRINK) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(BTL_MENU_TYPE_SMASH) - EVT_CASE_OR_EQ(BTL_MENU_TYPE_JUMP) - EVT_SET(LFlag0, TRUE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_IF_EQ(LFlag0, FALSE) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_IF_EQ(LVarA, TRUE) - EVT_IF_GT(LVarB, INITIAL_HIT_COUNT) + ExecWait(N(EVS_HandleEvent_Inner)) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAGS_DOJO) + Return + EndIf + Call(GetBattleFlags, LVar0) + IfFlag(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) + Call(GetLastDamage, ACTOR_SELF, LVar0) + IfGt(LVar0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_WasHit, TRUE) + Call(AddActorVar, ACTOR_SELF, AVAR_HitCounter, 1) + EndIf + EndIf + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT) + CaseOrEq(EVENT_BURN_HIT) + CaseOrEq(EVENT_SPIN_SMASH_HIT) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + Call(GetActorVar, ACTOR_SELF, AVAR_WasHit, LVarA) + Call(GetActorVar, ACTOR_SELF, AVAR_HitCounter, LVarB) + Call(SetActorVar, ACTOR_SELF, AVAR_WasHit, FALSE) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAGS_DOJO | STATUS_FLAG_POISON | STATUS_FLAG_SHRINK) + BreakSwitch + EndIf + Set(LFlag0, FALSE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar0) + CaseOrEq(BTL_MENU_TYPE_SMASH) + CaseOrEq(BTL_MENU_TYPE_JUMP) + Set(LFlag0, TRUE) + EndCaseGroup + EndSwitch + IfEq(LFlag0, FALSE) + BreakSwitch + EndIf + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + IfEq(LVarA, TRUE) + IfGt(LVarB, INITIAL_HIT_COUNT) // 'Nice maneuver.' - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(ActorSpeak, MSG_MAC_Gate_0035, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedTalk, ANIM_TheMaster_AscendedWalk) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitCounter, 0) - EVT_END_IF - EVT_ELSE + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(ActorSpeak, MSG_MAC_Gate_0035, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedTalk, ANIM_TheMaster_AscendedWalk) + Call(SetActorVar, ACTOR_SELF, AVAR_HitCounter, 0) + EndIf + Else // 'You can't defeat me like that' - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(ActorSpeak, MSG_MAC_Gate_0034, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedTalk, ANIM_TheMaster_AscendedWalk) - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(ActorSpeak, MSG_MAC_Gate_0034, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedTalk, ANIM_TheMaster_AscendedWalk) + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/battle/area/mac/actor/master3.c b/src/battle/area/mac/actor/master3.c index 29c1fa1d982..2f8a1d61dca 100644 --- a/src/battle/area/mac/actor/master3.c +++ b/src/battle/area/mac/actor/master3.c @@ -143,907 +143,907 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_BattleCry, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsFinalForm, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_WasHit, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitCounter, INITIAL_HIT_COUNT) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_NO_GAME_OVER, TRUE) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_BattleCry, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_IsFinalForm, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_WasHit, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_HitCounter, INITIAL_HIT_COUNT) + Call(SetBattleFlagBits, BS_FLAGS1_NO_GAME_OVER, TRUE) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent_Inner) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedHurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_TheMaster_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_GOLDEN_FLAMES) - EVT_WAIT(1) - EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 50, 50, 0, 0) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_TheMaster_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedDefeated) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedHurt) - EVT_CHILD_THREAD - EVT_WAIT(30) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_WAIT(10) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_GOLDEN_FLAMES) - EVT_WAIT(1) - EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 50, 50, 0, 0) - EVT_END_CHILD_THREAD - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedHurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedHurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedWalk) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedIdle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedHurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedDefeated) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedHurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedDefeated) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedHurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedDefeated) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedIdle) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedIdle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TheMaster_AscendedRun) - EVT_SET_CONST(LVar2, ANIM_TheMaster_AscendedHurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedHurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_BurnHurt) + SetConst(LVar2, ANIM_TheMaster_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_GOLDEN_FLAMES) + Wait(1) + Call(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 50, 50, 0, 0) + CaseEq(EVENT_BURN_DEATH) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_BurnHurt) + SetConst(LVar2, ANIM_TheMaster_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedDefeated) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedHurt) + ChildThread + Wait(30) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Wait(10) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_GOLDEN_FLAMES) + Wait(1) + Call(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 50, 50, 0, 0) + EndChildThread + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedHurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedHurt) + ExecWait(EVS_Enemy_Knockback) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedWalk) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedIdle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedHurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedDefeated) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedHurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedDefeated) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedHurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedDefeated) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedIdle) + ExecWait(EVS_Enemy_ReturnHome) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedIdle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TheMaster_AscendedRun) + SetConst(LVar2, ANIM_TheMaster_AscendedHurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_StrikeOnce) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.8)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_STANCE_CHANGE) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_STANCE_CHANGE) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedPunch) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedKick) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_KICK) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 0, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -50, 0, 0) - EVT_CALL(RunToGoal, ACTOR_SELF, 10, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_WAIT(10) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 0, 0, 0) - EVT_CALL(RunToGoal, ACTOR_SELF, 5, FALSE) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_SMACK) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_STRIKE_ONCE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 20, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 36) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.2)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedMidair) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedLand) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(3) - EVT_ADD(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedMidair) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_B) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedLand) - EVT_WAIT(20) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(3.8)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_STANCE_CHANGE) + Thread + Wait(15) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_STANCE_CHANGE) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedPunch) + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedKick) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_KICK) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 0, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -50, 0, 0) + Call(RunToGoal, ACTOR_SELF, 10, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Wait(10) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Return + EndCaseGroup + EndSwitch + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 0, 0, 0) + Call(RunToGoal, ACTOR_SELF, 5, FALSE) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_SMACK) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_STRIKE_ONCE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 20, 0) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 36) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.2)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedMidair) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedLand) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Wait(3) + Add(LVar0, 20) + Set(LVar1, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedMidair) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_B) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedLand) + Wait(20) + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(3.8)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_StrikeTwice) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_08) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamZoom, 200) - EVT_CALL(SetBattleCamOffsetZ, 13) - EVT_CALL(MoveBattleCamOver, 60) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedDownwardStance) - EVT_WAIT(40) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_07) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 1) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_LEAP) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 0, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -50, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedPalmStance) - EVT_CALL(RunToGoal, ACTOR_SELF, 10, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_WAIT(10) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedPalmStance) - EVT_CALL(RunToGoal, ACTOR_SELF, 5, FALSE) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(4.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_SMACK) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_STRIKE_TWICE_1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_JUMP) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedUppercut) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.9)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 25, FALSE, TRUE, FALSE) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_WAIT(2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_SMACK) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_STRIKE_TWICE_2, BS_FLAGS1_TRIGGER_EVENTS) - EVT_WAIT(15) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLIP) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 10, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 36) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedMidair) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 30, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedLand) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(3) - EVT_ADD(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedMidair) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_B) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedLand) - EVT_WAIT(20) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_08) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamZoom, 200) + Call(SetBattleCamOffsetZ, 13) + Call(MoveBattleCamOver, 60) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedDownwardStance) + Wait(40) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_PRESET_07) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 1) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_LEAP) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 0, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -50, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedPalmStance) + Call(RunToGoal, ACTOR_SELF, 10, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Wait(10) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Return + EndCaseGroup + EndSwitch + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedPalmStance) + Call(RunToGoal, ACTOR_SELF, 5, FALSE) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(4.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + EndThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_SMACK) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_STRIKE_TWICE_1, BS_FLAGS1_INCLUDE_POWER_UPS) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Thread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_JUMP) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedUppercut) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.9)) + Call(JumpToGoal, ACTOR_SELF, 25, FALSE, TRUE, FALSE) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + EndThread + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2)) + EndThread + Wait(2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_SMACK) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_STRIKE_TWICE_2, BS_FLAGS1_TRIGGER_EVENTS) + Wait(15) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLIP) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 10, 0) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 36) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedMidair) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 30, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedLand) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Wait(3) + Add(LVar0, 20) + Set(LVar1, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedMidair) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_B) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedLand) + Wait(20) + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(3.8)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_StrikeThrice) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_08) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamZoom, 200) - EVT_CALL(SetBattleCamOffsetZ, 13) - EVT_CALL(MoveBattleCamOver, 60) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedDownwardStance) - EVT_WAIT(20) - EVT_CALL(ActorSpeak, MSG_MAC_Gate_003C, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedTalk, ANIM_TheMaster_AscendedWalk) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_07) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 1) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_LEAP) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 0, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -50, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedPalmStance) - EVT_CALL(RunToGoal, ACTOR_SELF, 10, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_WAIT(10) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedPalmStance) - EVT_CALL(RunToGoal, ACTOR_SELF, 5, FALSE) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(4.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_SMACK) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_STRIKE_THRICE_1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_THREAD - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_JUMP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedUppercut) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 25, FALSE, TRUE, FALSE) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_WAIT(2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_SMACK) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_STRIKE_THRICE_2, 0) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(0.3)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Hurt, ANIM_Mario1_Hurt, ANIM_Mario1_Hurt) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 50, 0, 0) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE) - EVT_END_THREAD - EVT_WAIT(15) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedMidair) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 30, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedLand) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(3) - EVT_ADD(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_STANCE_CHANGE) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_STANCE_CHANGE) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedPunch) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_B) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedKick) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 0, 0, 0) - EVT_CALL(RunToGoal, ACTOR_SELF, 3, FALSE) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(6.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(5.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(4.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_PUNCH) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_STRIKE_THRICE_3, BS_FLAGS1_TRIGGER_EVENTS) - EVT_WAIT(15) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLIP) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 10, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 36) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedMidair) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 30, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedLand) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(3) - EVT_ADD(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedMidair) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_B) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedLand) - EVT_WAIT(20) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_08) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamZoom, 200) + Call(SetBattleCamOffsetZ, 13) + Call(MoveBattleCamOver, 60) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedDownwardStance) + Wait(20) + Call(ActorSpeak, MSG_MAC_Gate_003C, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedTalk, ANIM_TheMaster_AscendedWalk) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_PRESET_07) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 1) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_LEAP) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 0, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -50, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedPalmStance) + Call(RunToGoal, ACTOR_SELF, 10, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Wait(10) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Return + EndCaseGroup + EndSwitch + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedPalmStance) + Call(RunToGoal, ACTOR_SELF, 5, FALSE) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(4.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + EndThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_SMACK) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_STRIKE_THRICE_1, BS_FLAGS1_INCLUDE_POWER_UPS) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Thread + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_JUMP) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedUppercut) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(JumpToGoal, ACTOR_SELF, 25, FALSE, TRUE, FALSE) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + EndThread + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2)) + EndThread + Wait(2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_SMACK) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_STRIKE_THRICE_2, 0) + Thread + Wait(5) + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(0.3)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Hurt, ANIM_Mario1_Hurt, ANIM_Mario1_Hurt) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 50, 0, 0) + Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) + EndThread + Wait(15) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedMidair) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 30, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedLand) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Wait(3) + Add(LVar0, 20) + Set(LVar1, 0) + Thread + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_STANCE_CHANGE) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_STANCE_CHANGE) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedPunch) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_B) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedKick) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 0, 0, 0) + Call(RunToGoal, ACTOR_SELF, 3, FALSE) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(6.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(5.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(4.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2)) + EndThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_PUNCH) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_STRIKE_THRICE_3, BS_FLAGS1_TRIGGER_EVENTS) + Wait(15) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLIP) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MASTER_FLUTTER) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 10, 0) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 36) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedMidair) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 30, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedLand) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Wait(3) + Add(LVar0, 20) + Set(LVar1, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedMidair) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_B) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedLand) + Wait(20) + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(3.8)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; // Unused final phase of the battle, the Master rises into the air and becomes an airborne enemy EvtScript N(EVS_AscendToFinalForm) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_08) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamZoom, 200) - EVT_CALL(SetBattleCamOffsetZ, 13) - EVT_CALL(MoveBattleCamOver, 60) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedDownwardStance) - EVT_WAIT(20) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedPalmStance) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedDownwardStance) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedPunch) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedDownwardStance) - EVT_WAIT(15) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 50) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_SELF, 90, 0, EASING_COS_IN_OUT) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsFinalForm, TRUE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_SET(LVar0, 80) - EVT_LOOP(5) - EVT_ADD(LVar0, 20) - EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 80, LVar0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(5) - EVT_SUB(LVar0, 20) - EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 80, LVar0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(10) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_PRESET_08) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamZoom, 200) + Call(SetBattleCamOffsetZ, 13) + Call(MoveBattleCamOver, 60) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedDownwardStance) + Wait(20) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedPalmStance) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedDownwardStance) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedPunch) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedDownwardStance) + Wait(15) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 50) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_SELF, 90, 0, EASING_COS_IN_OUT) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_IsFinalForm, TRUE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Wait(30) + Set(LVar0, 80) + Loop(5) + Add(LVar0, 20) + Call(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 80, LVar0, 0, 0) + Wait(1) + EndLoop + Loop(5) + Sub(LVar0, 20) + Call(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 80, LVar0, 0, 0) + Wait(1) + EndLoop + Wait(10) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; // Unfinished attack for unused final form. // The Master flies over to the player and waits an inordinately long time before dealing damage. EvtScript N(EVS_Attack_SpiritStrike) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_08) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamZoom, 200) - EVT_CALL(SetBattleCamOffsetZ, 13) - EVT_CALL(MoveBattleCamOver, 60) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedDownwardStance) - EVT_SET(LVar0, 80) - EVT_LOOP(30) - EVT_ADD(LVar0, 2) - EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 80, LVar0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedPunch) - EVT_THREAD - EVT_SET(LVar0, 140) - EVT_LOOP(30) - EVT_SUB(LVar0, 2) - EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 80, LVar0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_SPIRIT, 0, ACTOR_DECORATION_GOLDEN_FLAMES) - EVT_WAIT(1) - EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_SPIRIT, 0, 40, 40, 0, 0) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SPIRIT, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_SPIRIT, LVar0, LVar1, LVar2) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_SPIRIT, 80) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_SPIRIT, EVT_FLOAT(0.1)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_SPIRIT, LVar0, LVar1, LVar2, 10, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SPIRIT, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SPIRIT_STRIKE, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_08) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamZoom, 200) + Call(SetBattleCamOffsetZ, 13) + Call(MoveBattleCamOver, 60) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedDownwardStance) + Set(LVar0, 80) + Loop(30) + Add(LVar0, 2) + Call(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 80, LVar0, 0, 0) + Wait(1) + EndLoop + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedPunch) + Thread + Set(LVar0, 140) + Loop(30) + Sub(LVar0, 2) + Call(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 80, LVar0, 0, 0) + Wait(1) + EndLoop + EndThread + Call(AddActorDecoration, ACTOR_SELF, PRT_SPIRIT, 0, ACTOR_DECORATION_GOLDEN_FLAMES) + Wait(1) + Call(ModifyActorDecoration, ACTOR_SELF, PRT_SPIRIT, 0, 40, 40, 0, 0) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SPIRIT, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_SPIRIT, LVar0, LVar1, LVar2) + Call(SetPartAlpha, ACTOR_SELF, PRT_SPIRIT, 80) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_SPIRIT, Float(0.1)) + Call(JumpPartTo, ACTOR_SELF, PRT_SPIRIT, LVar0, LVar1, LVar2, 10, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SPIRIT, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SPIRIT_STRIKE, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; // Unfinished attack for unused final form. // The Master flies over to the player and waits an inordinately long time before dealing damage. EvtScript N(EVS_Attack_FlyingGrab) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_08) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamZoom, 200) - EVT_CALL(SetBattleCamOffsetZ, 13) - EVT_CALL(MoveBattleCamOver, 60) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedDownwardStance) - EVT_SET(LVar0, 80) - EVT_LOOP(30) - EVT_ADD(LVar0, 2) - EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 80, LVar0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_LINEAR) - EVT_WAIT(10000) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_FLYING_GRAB, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_08) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamZoom, 200) + Call(SetBattleCamOffsetZ, 13) + Call(MoveBattleCamOver, 60) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedDownwardStance) + Set(LVar0, 80) + Loop(30) + Add(LVar0, 2) + Call(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 80, LVar0, 0, 0) + Wait(1) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_LINEAR) + Wait(10000) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_FLYING_GRAB, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFinalForm, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_IF_LT(LVar0, 0) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFinalForm, LVar0) + IfEq(LVar0, FALSE) + Call(GetActorHP, ACTOR_SELF, LVar0) + IfLt(LVar0, 0) // final form never activates because it requires HP < 0 here - EVT_EXEC_WAIT(N(EVS_AscendToFinalForm)) - EVT_ELSE - EVT_CALL(GetActorHP, ACTOR_PLAYER, LVar0) - EVT_IF_GT(LVar0, 20) - EVT_CALL(RandInt, 100, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_LT(30) - EVT_EXEC_WAIT(N(EVS_Attack_StrikeThrice)) - EVT_CASE_LT(50) - EVT_EXEC_WAIT(N(EVS_Attack_StrikeTwice)) - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(N(EVS_Attack_StrikeOnce)) - EVT_END_SWITCH - EVT_ELSE - EVT_CALL(RandInt, 100, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_LT(50) - EVT_EXEC_WAIT(N(EVS_Attack_StrikeTwice)) - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(N(EVS_Attack_StrikeOnce)) - EVT_END_SWITCH - EVT_END_IF - EVT_END_IF - EVT_ELSE - EVT_CALL(RandInt, 100, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_LT(100) - EVT_EXEC_WAIT(N(EVS_Attack_FlyingGrab)) - EVT_CASE_LT(50) - EVT_EXEC_WAIT(N(EVS_Attack_SpiritStrike)) - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + ExecWait(N(EVS_AscendToFinalForm)) + Else + Call(GetActorHP, ACTOR_PLAYER, LVar0) + IfGt(LVar0, 20) + Call(RandInt, 100, LVar0) + Switch(LVar0) + CaseLt(30) + ExecWait(N(EVS_Attack_StrikeThrice)) + CaseLt(50) + ExecWait(N(EVS_Attack_StrikeTwice)) + CaseDefault + ExecWait(N(EVS_Attack_StrikeOnce)) + EndSwitch + Else + Call(RandInt, 100, LVar0) + Switch(LVar0) + CaseLt(50) + ExecWait(N(EVS_Attack_StrikeTwice)) + CaseDefault + ExecWait(N(EVS_Attack_StrikeOnce)) + EndSwitch + EndIf + EndIf + Else + Call(RandInt, 100, LVar0) + Switch(LVar0) + CaseLt(100) + ExecWait(N(EVS_Attack_FlyingGrab)) + CaseLt(50) + ExecWait(N(EVS_Attack_SpiritStrike)) + EndSwitch + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_BattleCry, LVar0) - EVT_IF_EQ(LVar0, FALSE) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) + Call(GetActorVar, ACTOR_SELF, AVAR_BattleCry, LVar0) + IfEq(LVar0, FALSE) // 'To battle!' - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_WAIT(10) - EVT_CALL(ActorSpeak, MSG_MAC_Gate_002E, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Talk, ANIM_TheMaster_Walk) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_BattleCry, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Cough) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_OpenMouth) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_GHOST_TRANSFORM) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 30, 0) - EVT_SET(LVar0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Still) - EVT_LOOP(15) - EVT_ADD(LVar0, 24) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(LVar0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Still) - EVT_LOOP(5) - EVT_ADD(LVar0, 18) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SMOKE_BURST) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 3) - EVT_LOOP(3) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) - EVT_WAIT(3) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Still) - EVT_LOOP(5) - EVT_ADD(LVar0, 36) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedStill) - EVT_LOOP(5) - EVT_ADD(LVar0, 18) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(15) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(AscendedAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedUppercut) - EVT_WAIT(2) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_GOLDEN_FLAMES) - EVT_WAIT(1) - EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 50, 50, 0, 0) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(ActorSpeak, MSG_MAC_Gate_0038, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedTalk, ANIM_TheMaster_AscendedWalk) - EVT_END_IF - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_DOJO) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar1) - EVT_DIV(LVar1, 2) - EVT_IF_LE(LVar0, LVar1) + Call(UseBattleCamPreset, BTL_CAM_PRESET_13) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Wait(10) + Call(ActorSpeak, MSG_MAC_Gate_002E, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Talk, ANIM_TheMaster_Walk) + Call(SetActorVar, ACTOR_SELF, AVAR_BattleCry, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Cough) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_OpenMouth) + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_GHOST_TRANSFORM) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 20) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar1, LVar2, Float(1.0), 30, 0) + Set(LVar0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Still) + Loop(15) + Add(LVar0, 24) + Call(SetActorRotation, ACTOR_SELF, 0, LVar0, 0) + Wait(1) + EndLoop + Set(LVar0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Still) + Loop(5) + Add(LVar0, 18) + Call(SetActorRotation, ACTOR_SELF, 0, LVar0, 0) + Wait(1) + EndLoop + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SMOKE_BURST) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 3) + Loop(3) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) + Wait(3) + EndLoop + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_Still) + Loop(5) + Add(LVar0, 36) + Call(SetActorRotation, ACTOR_SELF, 0, LVar0, 0) + Wait(1) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedStill) + Loop(5) + Add(LVar0, 18) + Call(SetActorRotation, ACTOR_SELF, 0, LVar0, 0) + Wait(1) + EndLoop + Wait(15) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(AscendedAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedRun) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedUppercut) + Wait(2) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_GOLDEN_FLAMES) + Wait(1) + Call(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 50, 50, 0, 0) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedIdle) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(ActorSpeak, MSG_MAC_Gate_0038, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedTalk, ANIM_TheMaster_AscendedWalk) + EndIf + CaseEq(PHASE_ENEMY_BEGIN) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAGS_DOJO) + BreakSwitch + EndIf + Call(GetActorHP, ACTOR_SELF, LVar0) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar1) + Div(LVar1, 2) + IfLe(LVar0, LVar1) // 'Now... it is time I stopped being so merciful.' - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(ActorSpeak, MSG_MAC_Gate_003B, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedTalk, ANIM_TheMaster_AscendedWalk) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_CALL(GetPlayerHP, LVar0) - EVT_IF_LE(LVar0, 10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(ActorSpeak, MSG_MAC_Gate_003B, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedTalk, ANIM_TheMaster_AscendedWalk) + BreakSwitch + EndIf + Call(GetPlayerHP, LVar0) + IfLe(LVar0, 10) // 'Did you really think you'd win?' - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(ActorSpeak, MSG_MAC_Gate_003D, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedTalk, ANIM_TheMaster_AscendedWalk) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(ActorSpeak, MSG_MAC_Gate_003D, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedTalk, ANIM_TheMaster_AscendedWalk) + BreakSwitch + EndIf + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_EXEC_WAIT(N(EVS_HandleEvent_Inner)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_DOJO) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_WasHit, TRUE) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_HitCounter, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CASE_OR_EQ(EVENT_BURN_HIT) - EVT_CASE_OR_EQ(EVENT_SPIN_SMASH_HIT) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_WasHit, LVarA) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HitCounter, LVarB) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_WasHit, 0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_DOJO | STATUS_FLAG_POISON | STATUS_FLAG_SHRINK) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(BTL_MENU_TYPE_SMASH) - EVT_CASE_OR_EQ(BTL_MENU_TYPE_JUMP) - EVT_SET(LFlag0, TRUE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_IF_EQ(LFlag0, FALSE) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_IF_EQ(LVarA, TRUE) - EVT_IF_GT(LVarB, INITIAL_HIT_COUNT) + ExecWait(N(EVS_HandleEvent_Inner)) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAGS_DOJO) + Return + EndIf + Call(GetBattleFlags, LVar0) + IfFlag(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) + Call(GetLastDamage, ACTOR_SELF, LVar0) + IfGt(LVar0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_WasHit, TRUE) + Call(AddActorVar, ACTOR_SELF, AVAR_HitCounter, 1) + EndIf + EndIf + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT) + CaseOrEq(EVENT_BURN_HIT) + CaseOrEq(EVENT_SPIN_SMASH_HIT) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + Call(GetActorVar, ACTOR_SELF, AVAR_WasHit, LVarA) + Call(GetActorVar, ACTOR_SELF, AVAR_HitCounter, LVarB) + Call(SetActorVar, ACTOR_SELF, AVAR_WasHit, 0) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAGS_DOJO | STATUS_FLAG_POISON | STATUS_FLAG_SHRINK) + BreakSwitch + EndIf + Set(LFlag0, FALSE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar0) + CaseOrEq(BTL_MENU_TYPE_SMASH) + CaseOrEq(BTL_MENU_TYPE_JUMP) + Set(LFlag0, TRUE) + EndCaseGroup + EndSwitch + IfEq(LFlag0, FALSE) + BreakSwitch + EndIf + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + IfEq(LVarA, TRUE) + IfGt(LVarB, INITIAL_HIT_COUNT) // 'You have great hidden strength' - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(ActorSpeak, MSG_MAC_Gate_003A, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedTalk, ANIM_TheMaster_AscendedWalk) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitCounter, 0) - EVT_END_IF - EVT_ELSE + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(ActorSpeak, MSG_MAC_Gate_003A, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedTalk, ANIM_TheMaster_AscendedWalk) + Call(SetActorVar, ACTOR_SELF, AVAR_HitCounter, 0) + EndIf + Else // 'You foolish novice' - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(ActorSpeak, MSG_MAC_Gate_0039, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedTalk, ANIM_TheMaster_AscendedWalk) - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(ActorSpeak, MSG_MAC_Gate_0039, ACTOR_SELF, PRT_MAIN, ANIM_TheMaster_AscendedTalk, ANIM_TheMaster_AscendedWalk) + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/battle/area/nok/actor/kent_c_koopa.c b/src/battle/area/nok/actor/kent_c_koopa.c index d36b0dcfeef..ccf240f66d8 100644 --- a/src/battle/area/nok/actor/kent_c_koopa.c +++ b/src/battle/area/nok/actor/kent_c_koopa.c @@ -250,894 +250,894 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(func_8027D434, ACTOR_SELF, PRT_WEAK_POINT, 70) - EVT_CALL(SetPartSize, ACTOR_SELF, PRT_WEAK_POINT, 30, 30) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsFlipped, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, ANIM_KentCKoopa_Anim1C) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FlippedTurns, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CoinsToDrop, 20) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FlipResistance, 2) - EVT_RETURN - EVT_END + Call(func_8027D434, ACTOR_SELF, PRT_WEAK_POINT, 70) + Call(SetPartSize, ACTOR_SELF, PRT_WEAK_POINT, 30, 30) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_IsFlipped, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, ANIM_KentCKoopa_Anim1C) + Call(SetActorVar, ACTOR_SELF, AVAR_FlippedTurns, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_CoinsToDrop, 20) + Call(SetActorVar, ACTOR_SELF, AVAR_FlipResistance, 2) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FlipResistance, 2) - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) + Call(SetActorVar, ACTOR_SELF, AVAR_FlipResistance, 2) + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastElement, LVarE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVarD) - EVT_SWITCH(LVarD) - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FlipResistance, 2) - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FlipResistance, 2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LVar0, 1) - EVT_SET(LVar1, ANIM_KentCKoopa_Anim15) - EVT_SET(LVar2, ANIM_KentCKoopa_Anim16) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_ELSE - EVT_SET(LVar0, 1) - EVT_SET(LVar1, ANIM_KentCKoopa_Anim17) - EVT_SET(LVar2, ANIM_KentCKoopa_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_END_IF - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LVar0, 1) - EVT_SET(LVar1, ANIM_KentCKoopa_Anim15) - EVT_SET(LVar2, ANIM_KentCKoopa_Anim16) - EVT_ELSE - EVT_SET(LVar0, 1) - EVT_SET(LVar1, ANIM_KentCKoopa_Anim17) - EVT_SET(LVar2, ANIM_KentCKoopa_Anim18) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, LVar2) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FlipResistance, 2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(N(EVS_Flipped_SpinSmashHit)) - EVT_END_IF - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(N(EVS_Flipped_SpinSmashDeath)) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_ZERO_DAMAGE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KentCKoopa_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KentCKoopa_Anim1A) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_CASE_EQ(EVENT_IMMUNE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FlipResistance, 2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KentCKoopa_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar2) - EVT_IF_EQ(LVar2, 0) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim0C) - EVT_WAIT(8) - EVT_END_IF - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KentCKoopa_Anim1A) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LVar1, ANIM_KentCKoopa_Anim01) - EVT_ELSE - EVT_SET(LVar1, ANIM_KentCKoopa_Anim1A) - EVT_END_IF - EVT_SET(LVar0, 1) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_KentC_GoHome)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET_CONST(LVar1, ANIM_KentCKoopa_Anim01) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KentCKoopa_Anim1A) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_CASE_EQ(EVENT_FLIP_TRIGGER) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KentCKoopa_Anim12) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_RETURN - EVT_END_IF + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastElement, LVarE) + Call(GetLastEvent, ACTOR_SELF, LVarD) + Switch(LVarD) + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + CaseEq(EVENT_HIT_COMBO) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(EVS_Enemy_Hit) + Call(SetActorVar, ACTOR_SELF, AVAR_FlipResistance, 2) + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_BURN_HIT) + Call(SetActorVar, ACTOR_SELF, AVAR_FlipResistance, 2) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + IfEq(LVar0, 0) + Set(LVar0, 1) + Set(LVar1, ANIM_KentCKoopa_Anim15) + Set(LVar2, ANIM_KentCKoopa_Anim16) + ExecWait(EVS_Enemy_BurnHit) + Else + Set(LVar0, 1) + Set(LVar1, ANIM_KentCKoopa_Anim17) + Set(LVar2, ANIM_KentCKoopa_Anim18) + ExecWait(EVS_Enemy_BurnHit) + EndIf + CaseEq(EVENT_BURN_DEATH) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + IfEq(LVar0, 0) + Set(LVar0, 1) + Set(LVar1, ANIM_KentCKoopa_Anim15) + Set(LVar2, ANIM_KentCKoopa_Anim16) + Else + Set(LVar0, 1) + Set(LVar1, ANIM_KentCKoopa_Anim17) + Set(LVar2, ANIM_KentCKoopa_Anim18) + EndIf + ExecWait(EVS_Enemy_BurnHit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, LVar2) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + Call(SetActorVar, ACTOR_SELF, AVAR_FlipResistance, 2) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + IfEq(LVar0, 0) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(EVS_Enemy_Hit) + Else + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(N(EVS_Flipped_SpinSmashHit)) + EndIf + CaseEq(EVENT_SPIN_SMASH_DEATH) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + IfEq(LVar0, 0) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(EVS_Enemy_Hit) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(EVS_Enemy_Death) + Return + Else + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(N(EVS_Flipped_SpinSmashDeath)) + Return + EndIf + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(EVS_Enemy_Knockback) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(EVS_Enemy_ReturnHome) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(EVS_Enemy_Knockback) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_ZERO_DAMAGE) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + IfEq(LVar0, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KentCKoopa_Anim09) + ExecWait(EVS_Enemy_NoDamageHit) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KentCKoopa_Anim1A) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + CaseEq(EVENT_IMMUNE) + Call(SetActorVar, ACTOR_SELF, AVAR_FlipResistance, 2) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + IfEq(LVar0, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KentCKoopa_Anim09) + ExecWait(EVS_Enemy_NoDamageHit) + Call(GetStatusFlags, ACTOR_SELF, LVar2) + IfEq(LVar2, 0) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim0C) + Wait(8) + EndIf + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KentCKoopa_Anim1A) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + CaseEq(EVENT_AIR_LIFT_FAILED) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + IfEq(LVar0, 0) + Set(LVar1, ANIM_KentCKoopa_Anim01) + Else + Set(LVar1, ANIM_KentCKoopa_Anim1A) + EndIf + Set(LVar0, 1) + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(EVENT_END_FIRST_STRIKE) + ExecWait(N(EVS_KentC_GoHome)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + IfEq(LVar0, 0) + SetConst(LVar1, ANIM_KentCKoopa_Anim01) + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_Recover) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KentCKoopa_Anim1A) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + CaseEq(EVENT_FLIP_TRIGGER) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + IfEq(LVar0, 1) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KentCKoopa_Anim12) + ExecWait(EVS_Enemy_Hit) + Return + EndIf // each flip trigger decrements AVAR_FlipResistance by 1 - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_FlipResistance, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_SUB(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FlipResistance, LVar0) - EVT_END_IF + Call(GetActorVar, ACTOR_SELF, AVAR_FlipResistance, LVar0) + IfGt(LVar0, 0) + Sub(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_FlipResistance, LVar0) + EndIf // POW blocks immediately set AVAR_FlipResistance to 0 - EVT_CALL(GetDamageSource, LVar0) - EVT_IF_EQ(LVar0, DMG_SRC_POW_BLOCK) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FlipResistance, 0) - EVT_END_IF + Call(GetDamageSource, LVar0) + IfEq(LVar0, DMG_SRC_POW_BLOCK) + Call(SetActorVar, ACTOR_SELF, AVAR_FlipResistance, 0) + EndIf // if AVAR_FlipResistance is depleted, flip over - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_FlipResistance, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(GetBattleFlags, LVarD) - EVT_IF_FLAG(LVarD, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FlipResistance, 2) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_FlipOver)) - EVT_ELSE - EVT_CALL(GetBattleFlags, LVarD) - EVT_IF_FLAG(LVarD, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FlipResistance, 2) - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KentCKoopa_Anim1C) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KentCKoopa_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar2) - EVT_IF_EQ(LVar2, 0) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim0C) - EVT_WAIT(8) - EVT_END_IF - EVT_END_IF - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KentCKoopa_Anim1C) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_IF - EVT_END_IF - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_FlipResistance, LVar0) + IfEq(LVar0, 0) + Call(GetBattleFlags, LVarD) + IfFlag(LVarD, BS_FLAGS1_TRIGGER_EVENTS) + Call(SetActorVar, ACTOR_SELF, AVAR_FlipResistance, 2) + EndIf + ExecWait(N(EVS_FlipOver)) + Else + Call(GetBattleFlags, LVarD) + IfFlag(LVarD, BS_FLAGS1_TRIGGER_EVENTS) + Call(SetActorVar, ACTOR_SELF, AVAR_FlipResistance, 2) + Call(GetLastDamage, ACTOR_SELF, LVar0) + IfGt(LVar0, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KentCKoopa_Anim1C) + ExecWait(EVS_Enemy_Hit) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KentCKoopa_Anim09) + ExecWait(EVS_Enemy_NoDamageHit) + Call(GetStatusFlags, ACTOR_SELF, LVar2) + IfEq(LVar2, 0) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim0C) + Wait(8) + EndIf + EndIf + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KentCKoopa_Anim1C) + ExecWait(EVS_Enemy_Hit) + EndIf + EndIf + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/StartRumbleWithParams.inc.c" #include "common/battle/SetAbsoluteStatusOffsets.inc.c" EvtScript N(EVS_TakeTurn) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FlipResistance, 2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(SetBattleCamZoom, 200) - EVT_CALL(SetBattleCamOffsetZ, 20) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 25) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_FlippedTurns, LVar0) - EVT_SUB(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FlippedTurns, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 36) - EVT_ADD(LVar1, 18) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(3.0)) - EVT_LOOP(5) - EVT_PLAY_EFFECT(EFFECT_SWEAT, 1, LVar0, LVar1, LVar2, 1, 225, 10, 0) - EVT_WAIT(5) - EVT_END_LOOP - EVT_WAIT(30) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 36) - EVT_ADD(LVar1, 18) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(3.0)) - EVT_LOOP(5) - EVT_PLAY_EFFECT(EFFECT_SWEAT, 1, LVar0, LVar1, LVar2, 1, 225, 10, 0) - EVT_WAIT(5) - EVT_END_LOOP - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(3.0)) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 15) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim19) - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 27, 0) - EVT_ELSE - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 10, 0) - EVT_END_IF - EVT_SET(LVar0, 0) - EVT_LOOP(5) - EVT_ADD(LVar0, 36) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_WAIT(3) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim0C) - EVT_WAIT(10) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(NormalDefense))) - EVT_CALL(SetEnemyTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 60) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_WEAK_POINT, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_WEAK_POINT, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_FLIPPED, ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_NO_SHADOW) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_PRIMARY_TARGET | ACTOR_PART_FLAG_NO_SHADOW) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_CALL(N(SetAbsoluteStatusOffsets), -26, 38, 2, 63) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsFlipped, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, ANIM_KentCKoopa_Anim1C) - EVT_END_IF - EVT_END_IF - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 50) - EVT_CALL(GetStatusFlags, ACTOR_PARTNER, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_KO) - EVT_EXEC_WAIT(N(EVS_Attack_ShellToss)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_HeavyStomp)) - EVT_END_IF - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_HeavyStomp)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_FlipResistance, 2) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + IfEq(LVar0, 1) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(SetBattleCamZoom, 200) + Call(SetBattleCamOffsetZ, 20) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 25) + Call(GetActorVar, ACTOR_SELF, AVAR_FlippedTurns, LVar0) + Sub(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_FlippedTurns, LVar0) + IfGt(LVar0, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 36) + Add(LVar1, 18) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(3.0)) + Loop(5) + PlayEffect(EFFECT_SWEAT, 1, LVar0, LVar1, LVar2, 1, 225, 10, 0) + Wait(5) + EndLoop + Wait(30) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 36) + Add(LVar1, 18) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(3.0)) + Loop(5) + PlayEffect(EFFECT_SWEAT, 1, LVar0, LVar1, LVar2, 1, 225, 10, 0) + Wait(5) + EndLoop + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(3.0)) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 15) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim19) + Thread + Wait(3) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 27, 0) + Else + Call(SetActorRotationOffset, ACTOR_SELF, 0, 10, 0) + EndIf + Set(LVar0, 0) + Loop(5) + Add(LVar0, 36) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Call(N(StartRumbleWithParams), 80, 14) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + EndIf + Wait(3) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim0C) + Wait(10) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(NormalDefense))) + Call(SetEnemyTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 60) + Call(SetPartFlagBits, ACTOR_SELF, PRT_WEAK_POINT, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_WEAK_POINT, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) + Call(SetPartFlags, ACTOR_SELF, PRT_FLIPPED, ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_NO_SHADOW) + Call(SetPartFlags, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_PRIMARY_TARGET | ACTOR_PART_FLAG_NO_SHADOW) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Call(N(SetAbsoluteStatusOffsets), -26, 38, 2, 63) + Call(SetActorVar, ACTOR_SELF, AVAR_IsFlipped, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, ANIM_KentCKoopa_Anim1C) + EndIf + EndIf + Call(RandInt, 100, LVar0) + IfLt(LVar0, 50) + Call(GetStatusFlags, ACTOR_PARTNER, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_KO) + ExecWait(N(EVS_Attack_ShellToss)) + Else + ExecWait(N(EVS_Attack_HeavyStomp)) + EndIf + Else + ExecWait(N(EVS_Attack_HeavyStomp)) + EndIf + Return + End }; EvtScript N(EVS_Attack_ShellToss) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(SetBattleCamZoom, 200) - EVT_CALL(SetBattleCamOffsetZ, 20) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 25) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim0B) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 4) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(3) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_END_THREAD - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_KENT_C_SHELL_TOSS_LOOP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim0A) - EVT_WAIT(10) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarB, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarB) - EVT_CASE_EQ(6) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 40) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, -240, 0, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetActorPos, ACTOR_SELF, 240, 0, LVar2) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(StopSound, SOUND_KENT_C_SHELL_TOSS_LOOP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim0C) - EVT_WAIT(8) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim01) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_TRANSPARENT | STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Flail) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, -25, 60, 0) - EVT_CALL(SetBattleCamZoom, 460) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 50) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, 32) - EVT_ELSE - EVT_ADD(LVar0, 12) - EVT_END_IF - EVT_SET(LVar1, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_SET(LVarA, 1) - EVT_END_SWITCH - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, -25, 60, 0) - EVT_CALL(SetBattleCamZoom, 460) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 50) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_TRANSPARENT | STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Flail) - EVT_END_IF - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, 32) - EVT_ELSE - EVT_ADD(LVar0, 12) - EVT_END_IF - EVT_SET(LVar1, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarE) - EVT_IF_NOT_FLAG(LVarE, STATUS_FLAG_SHRINK) - EVT_CALL(SetDamageSource, DMG_SRC_CRUSH) - EVT_END_IF - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, SUPPRESS_EVENT_ALL, 0, DMG_SHELL_TOSS_PLAYER, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SET(LVarA, 0) - EVT_IF_NOT_FLAG(LVarE, STATUS_FLAG_SHRINK) - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_ATK_BLOCKED) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_STONE) - EVT_SET(LVarA, 1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH - EVT_IF_NE(LVarA, 0) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 32) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetDamageSource, DMG_SRC_CRUSH_PARTNER) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_SHELL_TOSS_PARTNER, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_ATK_BLOCKED) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, -240, 0, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(SetActorPos, ACTOR_SELF, 240, 0, LVar2) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(StopSound, SOUND_KENT_C_SHELL_TOSS_LOOP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim0C) - EVT_WAIT(8) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim01) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, -45, 60, 0) - EVT_CALL(SetBattleCamZoom, 460) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(MoveBattleCamOver, 30) - EVT_END_IF - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_END_THREAD - EVT_ADD(LVar0, 16) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_END_THREAD - EVT_ADD(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(StopSound, SOUND_KENT_C_SHELL_TOSS_LOOP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim0C) - EVT_WAIT(8) - EVT_CALL(YieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KentCKoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim01) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(SetBattleCamZoom, 200) + Call(SetBattleCamOffsetZ, 20) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 25) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim0B) + Wait(10) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 4) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(3) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(2) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + EndThread + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_KENT_C_SHELL_TOSS_LOOP) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim0A) + Wait(10) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(EnemyTestTarget, ACTOR_SELF, LVarB, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarB) + CaseEq(6) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 40) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetGoalPos, ACTOR_SELF, -240, 0, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetActorPos, ACTOR_SELF, 240, 0, LVar2) + Call(SetGoalToHome, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(StopSound, SOUND_KENT_C_SHELL_TOSS_LOOP) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim0C) + Wait(8) + Call(YieldTurn) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim01) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + CaseDefault + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_TRANSPARENT | STATUS_FLAGS_IMMOBILIZED) + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Flail) + EndIf + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, -25, 60, 0) + Call(SetBattleCamZoom, 460) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 50) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar0, 32) + Else + Add(LVar0, 12) + EndIf + Set(LVar1, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Set(LVarA, 1) + EndSwitch + EndCaseGroup + CaseDefault + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, -25, 60, 0) + Call(SetBattleCamZoom, 460) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 50) + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_TRANSPARENT | STATUS_FLAGS_IMMOBILIZED) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Flail) + EndIf + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar0, 32) + Else + Add(LVar0, 12) + EndIf + Set(LVar1, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVarE) + IfNotFlag(LVarE, STATUS_FLAG_SHRINK) + Call(SetDamageSource, DMG_SRC_CRUSH) + EndIf + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, SUPPRESS_EVENT_ALL, 0, DMG_SHELL_TOSS_PLAYER, BS_FLAGS1_TRIGGER_EVENTS) + Set(LVarA, 0) + IfNotFlag(LVarE, STATUS_FLAG_SHRINK) + Call(GetBattleFlags, LVar0) + IfNotFlag(LVar0, BS_FLAGS1_ATK_BLOCKED) + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_STONE) + Set(LVarA, 1) + EndIf + EndIf + EndIf + EndSwitch + IfNe(LVarA, 0) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 32) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetDamageSource, DMG_SRC_CRUSH_PARTNER) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_SHELL_TOSS_PARTNER, BS_FLAGS1_TRIGGER_EVENTS) + Call(GetBattleFlags, LVar0) + IfNotFlag(LVar0, BS_FLAGS1_ATK_BLOCKED) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, -240, 0, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(SetActorPos, ACTOR_SELF, 240, 0, LVar2) + Call(SetGoalToHome, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(StopSound, SOUND_KENT_C_SHELL_TOSS_LOOP) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim0C) + Wait(8) + Call(YieldTurn) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim01) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + Else + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, -45, 60, 0) + Call(SetBattleCamZoom, 460) + Call(SetBattleCamOffsetZ, 0) + Call(MoveBattleCamOver, 30) + EndIf + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Thread + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Call(N(StartRumbleWithParams), 80, 14) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndIf + EndThread + Add(LVar0, 16) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Thread + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Call(N(StartRumbleWithParams), 80, 14) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndIf + EndThread + Add(LVar0, 10) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) + Thread + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Call(N(StartRumbleWithParams), 80, 14) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndIf + EndThread + Call(ResetAllActorSounds, ACTOR_SELF) + Call(StopSound, SOUND_KENT_C_SHELL_TOSS_LOOP) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim0C) + Wait(8) + Call(YieldTurn) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KentCKoopa_Anim04) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim01) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_HeavyStomp) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 280) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim03) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim01) - EVT_WAIT(8) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LARGE_ACTOR_JUMP) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim06) - EVT_THREAD - EVT_WAIT(7) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim07) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim08) - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_A) - EVT_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_END_THREAD - EVT_SUB(LVar0, 15) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_A) - EVT_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim01) - EVT_SUB(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_A) - EVT_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(8) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_SET(LVar3, 0) - EVT_LOOP(12) - EVT_ADD(LVar3, 15) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim04) - EVT_CALL(SetPartYaw, ACTOR_SELF, PRT_MAIN, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim01) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_SET(LVar3, 180) - EVT_LOOP(15) - EVT_SUB(LVar3, 12) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim06) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim07) - EVT_WAIT(2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim08) - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.3)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(JumpToGoal, ACTOR_SELF, 14, FALSE, TRUE, FALSE) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarF) - EVT_IF_NOT_FLAG(LVarF, STATUS_FLAG_SHRINK) - EVT_CALL(SetDamageSource, DMG_SRC_CRUSH) - EVT_END_IF - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, SUPPRESS_EVENT_ALL, 0, DMG_HEAVY_STOMP, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_ATK_BLOCKED) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_STONE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarE) - EVT_IF_NOT_FLAG(LVarE, STATUS_FLAG_SHRINK) - EVT_CALL(LandJump, ACTOR_SELF) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_A) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_THREAD - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim06) - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_A) - EVT_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim01) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_A) - EVT_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(8) - EVT_IF_EQ(LVarF, 10) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_EXEC_WAIT(N(EVS_KentC_GoHome)) - EVT_CASE_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 280) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Set(LVar1, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim03) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim01) + Wait(8) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LARGE_ACTOR_JUMP) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim06) + Thread + Wait(7) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim07) + Wait(4) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim08) + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_A) + Thread + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Call(N(StartRumbleWithParams), 80, 14) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndIf + EndThread + Sub(LVar0, 15) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_A) + Thread + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Call(N(StartRumbleWithParams), 80, 14) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndIf + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim01) + Sub(LVar0, 10) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_A) + Thread + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Call(N(StartRumbleWithParams), 80, 14) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndIf + EndThread + Wait(8) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Set(LVar3, 0) + Loop(12) + Add(LVar3, 15) + Call(SetActorYaw, ACTOR_SELF, LVar3) + Wait(1) + EndLoop + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim04) + Call(SetPartYaw, ACTOR_SELF, PRT_MAIN, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim01) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Set(LVar3, 180) + Loop(15) + Sub(LVar3, 12) + Call(SetActorYaw, ACTOR_SELF, LVar3) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim06) + Thread + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim07) + Wait(2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim08) + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.3)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(JumpToGoal, ACTOR_SELF, 14, FALSE, TRUE, FALSE) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVarF) + IfNotFlag(LVarF, STATUS_FLAG_SHRINK) + Call(SetDamageSource, DMG_SRC_CRUSH) + EndIf + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, SUPPRESS_EVENT_ALL, 0, DMG_HEAVY_STOMP, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Call(GetBattleFlags, LVar0) + IfNotFlag(LVar0, BS_FLAGS1_ATK_BLOCKED) + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_STONE) + Call(GetStatusFlags, ACTOR_SELF, LVarE) + IfNotFlag(LVarE, STATUS_FLAG_SHRINK) + Call(LandJump, ACTOR_SELF) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_A) + EndIf + EndIf + EndIf + Thread + Call(N(StartRumbleWithParams), 80, 14) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Call(N(StartRumbleWithParams), 80, 14) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndIf + EndThread + Thread + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim06) + EndThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_A) + Thread + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Call(N(StartRumbleWithParams), 80, 14) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndIf + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim01) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_NPC_STEP_A) + Thread + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Call(N(StartRumbleWithParams), 80, 14) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndIf + EndThread + Wait(8) + IfEq(LVarF, 10) + Return + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + ExecWait(N(EVS_KentC_GoHome)) + CaseEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_KentC_GoHome) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KentCKoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KentCKoopa_Anim04) + ExecWait(EVS_Enemy_ReturnHome) + Return + End }; EvtScript N(EVS_FlipOver) = { - EVT_CALL(SetEnemyTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 40) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(FlippedDefense))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(FlippedAnims))) - EVT_CALL(N(SetAbsoluteStatusOffsets), -24, 47, 23, 37) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim1C) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsFlipped, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, ANIM_KentCKoopa_Anim12) - EVT_THREAD - EVT_WAIT(4) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 35, 0) - EVT_ELSE - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0) - EVT_END_IF - EVT_SET(LVar0, 0) - EVT_LOOP(5) - EVT_SUB(LVar0, 18) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_USE_BUF(EVT_PTR(N(FlipPosOffsets))) - EVT_LOOP(ARRAY_COUNT(N(FlipPosOffsets))) - EVT_BUF_READ1(LVar0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) - EVT_IF_EQ(LVar0, 0) - EVT_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_CALL(N(StartRumbleWithParams), 80, 14) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_END_THREAD - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim1D) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim1E) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_WEAK_POINT, ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_WEAK_POINT, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_FLIPPED, ACTOR_PART_FLAG_NO_SHADOW) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_NO_SHADOW) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FlippedTurns, 1) - EVT_WAIT(8) - EVT_RETURN - EVT_END + Call(SetEnemyTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 40) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(FlippedDefense))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(FlippedAnims))) + Call(N(SetAbsoluteStatusOffsets), -24, 47, 23, 37) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim1C) + Call(SetActorVar, ACTOR_SELF, AVAR_IsFlipped, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, ANIM_KentCKoopa_Anim12) + Thread + Wait(4) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 35, 0) + Else + Call(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0) + EndIf + Set(LVar0, 0) + Loop(5) + Sub(LVar0, 18) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + UseBuf(Ref(N(FlipPosOffsets))) + Loop(ARRAY_COUNT(N(FlipPosOffsets))) + BufRead1(LVar0) + Call(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) + IfEq(LVar0, 0) + Thread + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Call(N(StartRumbleWithParams), 80, 14) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndIf + EndThread + EndIf + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim1D) + Wait(1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KentCKoopa_Anim1E) + Call(SetPartFlagBits, ACTOR_SELF, PRT_WEAK_POINT, ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_WEAK_POINT, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) + Call(SetPartFlags, ACTOR_SELF, PRT_FLIPPED, ACTOR_PART_FLAG_NO_SHADOW) + Call(SetPartFlags, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_NO_SHADOW) + Call(SetActorVar, ACTOR_SELF, AVAR_FlippedTurns, 1) + Wait(8) + Return + End }; EvtScript N(EVS_Flipped_SpinSmashHit) = { - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_SET(LVarA, 5) - EVT_EXEC_WAIT(N(EVS_DropDummyCoins)) - EVT_SET(LVar2, 0) - EVT_LOOP(36) - EVT_ADD(LVar2, 30) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Set(LVarA, 5) + ExecWait(N(EVS_DropDummyCoins)) + Set(LVar2, 0) + Loop(36) + Add(LVar2, 30) + Call(SetActorYaw, ACTOR_SELF, LVar2) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + Return + End }; EvtScript N(EVS_Flipped_SpinSmashDeath) = { - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_SET(LVarA, 0) - EVT_EXEC_WAIT(N(EVS_DropDummyCoins)) - EVT_SET(LVar2, 0) - EVT_LOOP(48) - EVT_ADD(LVar2, 30) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_WAIT(10) - EVT_SET(LVar0, PRT_MAIN) - EVT_SET(LVar1, -1) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Set(LVarA, 0) + ExecWait(N(EVS_DropDummyCoins)) + Set(LVar2, 0) + Loop(48) + Add(LVar2, 30) + Call(SetActorYaw, ACTOR_SELF, LVar2) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + Wait(10) + Set(LVar0, PRT_MAIN) + Set(LVar1, -1) + ExecWait(EVS_Enemy_Death) + Return + End }; // when hit with Spin Smash while flipped over, coins fly out // (in) LVarA : delay between each coin release EvtScript N(EVS_DropDummyCoins) = { - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CoinsToDrop, LVar3) - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar4) - EVT_IF_GT(LVar4, LVar3) - EVT_SET(LVar4, LVar3) - EVT_END_IF - EVT_IF_GT(LVar4, 6) - EVT_SET(LVar4, 6) - EVT_END_IF - EVT_IF_GT(LVar4, 0) - EVT_THREAD - EVT_SUB(LVar3, LVar4) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CoinsToDrop, LVar3) - EVT_SET(LVar5, PRT_DUMMY_COIN_1) - EVT_LOOP(LVar4) - EVT_EXEC(N(EVS_DropDummyCoin)) - EVT_ADD(LVar5, 1) - EVT_WAIT(LVarA) - EVT_END_LOOP - EVT_END_THREAD - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_CoinsToDrop, LVar3) + Call(GetLastDamage, ACTOR_SELF, LVar4) + IfGt(LVar4, LVar3) + Set(LVar4, LVar3) + EndIf + IfGt(LVar4, 6) + Set(LVar4, 6) + EndIf + IfGt(LVar4, 0) + Thread + Sub(LVar3, LVar4) + Call(SetActorVar, ACTOR_SELF, AVAR_CoinsToDrop, LVar3) + Set(LVar5, PRT_DUMMY_COIN_1) + Loop(LVar4) + Exec(N(EVS_DropDummyCoin)) + Add(LVar5, 1) + Wait(LVarA) + EndLoop + EndThread + EndIf + Return + End }; API_CALLABLE(N(GetCoinTrajectory)) { @@ -1171,25 +1171,25 @@ API_CALLABLE(N(UnusedFunc)) { } EvtScript N(EVS_DropDummyCoin) = { - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, LVar5, SOUND_COIN_BOUNCE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar6, LVar7, LVar8) - EVT_CALL(SetPartPos, ACTOR_SELF, LVar5, LVar6, 35, LVar8) - EVT_CALL(N(GetCoinTrajectory), LVar6, LVar8, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar5, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVar5, EVT_FLOAT(1.0)) - EVT_CALL(JumpPartTo, ACTOR_SELF, LVar5, LVar0, 0, LVar1, 18, TRUE) - EVT_CALL(JumpPartTo, ACTOR_SELF, LVar5, LVar2, 0, LVar3, 9, TRUE) - EVT_WAIT(10) + Call(PlaySoundAtPart, ACTOR_SELF, LVar5, SOUND_COIN_BOUNCE) + Call(GetActorPos, ACTOR_SELF, LVar6, LVar7, LVar8) + Call(SetPartPos, ACTOR_SELF, LVar5, LVar6, 35, LVar8) + Call(N(GetCoinTrajectory), LVar6, LVar8, LVar0, LVar1, LVar2, LVar3) + Call(SetPartFlagBits, ACTOR_SELF, LVar5, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetPartJumpGravity, ACTOR_SELF, LVar5, Float(1.0)) + Call(JumpPartTo, ACTOR_SELF, LVar5, LVar0, 0, LVar1, 18, TRUE) + Call(JumpPartTo, ACTOR_SELF, LVar5, LVar2, 0, LVar3, 9, TRUE) + Wait(10) // blinking - EVT_LOOP(10) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar5, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar5, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_END_LOOP + Loop(10) + Call(SetPartFlagBits, ACTOR_SELF, LVar5, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, LVar5, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + EndLoop // give coin to player - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, LVar5, SOUND_COIN_PICKUP) - EVT_CALL(AddCoin, 1) - EVT_RETURN - EVT_END + Call(PlaySoundAtPart, ACTOR_SELF, LVar5, SOUND_COIN_PICKUP) + Call(AddCoin, 1) + Return + End }; diff --git a/src/battle/area/omo2/actor/general_guy.c b/src/battle/area/omo2/actor/general_guy.c index 7964cb062e2..b51dec9e10c 100644 --- a/src/battle/area/omo2/actor/general_guy.c +++ b/src/battle/area/omo2/actor/general_guy.c @@ -150,433 +150,433 @@ s32 N(PanicAnims)[] = { }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Init) = { - EVT_CALL(SetActorPos, ACTOR_SELF, 200, 0, 0) - EVT_CALL(ForceHomePos, ACTOR_SELF, 200, 0, 0) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GeneralGuy_Anim02) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_General_DoingTankPhase, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_General_Flags, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_General_WavesDefeated, 0) - EVT_CALL(LoadBattleSection, BTL_AREA_OMO2_1) - EVT_CALL(SummonEnemy, EVT_PTR(N(ShySquadFormation)), TRUE) - EVT_RETURN - EVT_END + Call(SetActorPos, ACTOR_SELF, 200, 0, 0) + Call(ForceHomePos, ACTOR_SELF, 200, 0, 0) + Call(HPBarToHome, ACTOR_SELF) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GeneralGuy_Anim02) + Call(SetActorVar, ACTOR_SELF, AVAR_General_DoingTankPhase, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_General_Flags, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_General_WavesDefeated, 0) + Call(LoadBattleSection, BTL_AREA_OMO2_1) + Call(SummonEnemy, Ref(N(ShySquadFormation)), TRUE) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GeneralGuy_Anim05) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET(LVar0, 1) - EVT_SET(LVar1, ANIM_GeneralGuy_Anim08) - EVT_SET(LVar2, ANIM_GeneralGuy_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET(LVar0, 1) - EVT_SET(LVar1, ANIM_GeneralGuy_Anim08) - EVT_SET(LVar2, ANIM_GeneralGuy_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GeneralGuy_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GeneralGuy_Anim05) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GeneralGuy_Anim05) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GeneralGuy_Anim05) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GeneralGuy_Anim05) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GeneralGuy_Anim05) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GeneralGuy_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GeneralGuy_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIKE_TAUNT) - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GeneralGuy_Anim05) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GeneralGuy_Anim05) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GeneralGuy_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GeneralGuy_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_30) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GeneralGuy_Anim05) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(1000) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GeneralGuy_Anim02) - EVT_SET_CONST(LVar2, ANIM_GeneralGuy_Anim05) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GeneralGuy_Anim05) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + Set(LVar0, 1) + Set(LVar1, ANIM_GeneralGuy_Anim08) + Set(LVar2, ANIM_GeneralGuy_Anim09) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + Set(LVar0, 1) + Set(LVar1, ANIM_GeneralGuy_Anim08) + Set(LVar2, ANIM_GeneralGuy_Anim09) + ExecWait(EVS_Enemy_BurnHit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GeneralGuy_Anim09) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GeneralGuy_Anim05) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GeneralGuy_Anim05) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GeneralGuy_Anim05) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GeneralGuy_Anim05) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GeneralGuy_Anim05) + ExecWait(EVS_Enemy_Knockback) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GeneralGuy_Anim0E) + ExecWait(EVS_Enemy_ReturnHome) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GeneralGuy_Anim02) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_SPIKE_TAUNT) + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GeneralGuy_Anim05) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GeneralGuy_Anim05) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GeneralGuy_Anim0E) + ExecWait(EVS_Enemy_ReturnHome) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GeneralGuy_Anim02) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_30) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GeneralGuy_Anim05) + ExecWait(EVS_Enemy_Hit) + Wait(1000) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GeneralGuy_Anim02) + SetConst(LVar2, ANIM_GeneralGuy_Anim05) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_General_DoingTankPhase, LVar0) - EVT_IF_FALSE(LVar0) - EVT_RETURN - EVT_END_IF - EVT_CALL(ActorExists, ACTOR_BULB, LVar0) - EVT_IF_TRUE(LVar0) - EVT_CALL(GetStatusFlags, ACTOR_PARTNER, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_KO) - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 60) - EVT_EXEC_WAIT(N(EVS_Attack_ShootLightning)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_Attack_ThrowBomb)) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_General_DoingTankPhase, LVar0) + IfFalse(LVar0) + Return + EndIf + Call(ActorExists, ACTOR_BULB, LVar0) + IfTrue(LVar0) + Call(GetStatusFlags, ACTOR_PARTNER, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_KO) + Call(RandInt, 100, LVar0) + IfLt(LVar0, 60) + ExecWait(N(EVS_Attack_ShootLightning)) + Return + EndIf + EndIf + EndIf + ExecWait(N(EVS_Attack_ThrowBomb)) + Return + End }; EvtScript N(EVS_Attack_ThrowBomb) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_15) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 30) - EVT_THREAD - EVT_WAIT(35) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_END_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_OPEN_HATCH) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim0B) - EVT_CALL(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(PlayModelAnimation, 0, EVT_PTR(AS_ToyTank_OpenHatch)) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GeneralGuy_Anim0B) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 8) - EVT_ADD(LVar1, 27) - EVT_SUB(LVar2, 4) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_BOMB, LVar0, LVar1, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BOMB, ANIM_GeneralGuyBomb_Anim00) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BOMB, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GeneralGuy_Anim0A) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BOMB, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(6) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 8) - EVT_ADD(LVar1, 20) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_BOMB, LVar0, LVar1, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BOMB, ANIM_GeneralGuyBomb_Anim01) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BOMB, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 4, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(HIT_RESULT_MISS) - EVT_CALL(PlaySoundAtPart, ACTOR_GENERAL, PRT_BOMB, SOUND_TOSS) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 120) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_BOMB, EVT_FLOAT(12.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_BOMB, EVT_FLOAT(0.1)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_BOMB, LVar0, LVar1, LVar2, 0, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BOMB, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) - EVT_CALL(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(PlayModelAnimation, 0, EVT_PTR(AS_ToyTank_CloseHatch)) - EVT_CALL(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_CLOSE_HATCH) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_CASE_EQ(HIT_RESULT_LUCKY) - EVT_CALL(PlaySoundAtPart, ACTOR_GENERAL, PRT_BOMB, SOUND_TOSS) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 50) - EVT_SET(LVar1, -5) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_BOMB, EVT_FLOAT(14.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_BOMB, EVT_FLOAT(0.1)) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_BOMB, LVar0, LVar1, LVar2, 0, 30, EASING_LINEAR) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 65) - EVT_SET(LVar1, -5) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_BOMB, EVT_FLOAT(6.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_BOMB, EVT_FLOAT(0.1)) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_BOMB, LVar0, LVar1, LVar2, 0, 15, EASING_LINEAR) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BOMB, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) - EVT_CALL(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(PlayModelAnimation, 0, EVT_PTR(AS_ToyTank_CloseHatch)) - EVT_CALL(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_CLOSE_HATCH) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(PlaySoundAtPart, ACTOR_GENERAL, PRT_BOMB, SOUND_TOSS) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_BOMB, EVT_FLOAT(14.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_BOMB, EVT_FLOAT(0.1)) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_BOMB, LVar0, LVar1, LVar2, 0, 15, EASING_LINEAR) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_BOMB, SOUND_BOMB_BLAST) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BOMB, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_BLAST | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_BOMB_TOSS, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GeneralGuy_Anim02) - EVT_WAIT(30) - EVT_IF_EQ(LVarF, HIT_RESULT_10) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) - EVT_CALL(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(PlayModelAnimation, 0, EVT_PTR(AS_ToyTank_CloseHatch)) - EVT_CALL(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_CLOSE_HATCH) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) - EVT_CALL(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(PlayModelAnimation, 0, EVT_PTR(AS_ToyTank_CloseHatch)) - EVT_CALL(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_CLOSE_HATCH) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_PRESET_15) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 30) + Thread + Wait(35) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + EndThread + Wait(5) + Call(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_OPEN_HATCH) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim0B) + Call(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(PlayModelAnimation, 0, Ref(AS_ToyTank_OpenHatch)) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GeneralGuy_Anim0B) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 8) + Add(LVar1, 27) + Sub(LVar2, 4) + Call(SetPartPos, ACTOR_SELF, PRT_BOMB, LVar0, LVar1, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_BOMB, ANIM_GeneralGuyBomb_Anim00) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BOMB, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GeneralGuy_Anim0A) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BOMB, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(6) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 8) + Add(LVar1, 20) + Call(SetPartPos, ACTOR_SELF, PRT_BOMB, LVar0, LVar1, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_BOMB, ANIM_GeneralGuyBomb_Anim01) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BOMB, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 4, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseEq(HIT_RESULT_MISS) + Call(PlaySoundAtPart, ACTOR_GENERAL, PRT_BOMB, SOUND_TOSS) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 120) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_BOMB, Float(12.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_BOMB, Float(0.1)) + Call(JumpPartTo, ACTOR_SELF, PRT_BOMB, LVar0, LVar1, LVar2, 0, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BOMB, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) + Call(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(PlayModelAnimation, 0, Ref(AS_ToyTank_CloseHatch)) + Call(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_CLOSE_HATCH) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + CaseEq(HIT_RESULT_LUCKY) + Call(PlaySoundAtPart, ACTOR_GENERAL, PRT_BOMB, SOUND_TOSS) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 50) + Set(LVar1, -5) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_BOMB, Float(14.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_BOMB, Float(0.1)) + Call(FlyPartTo, ACTOR_SELF, PRT_BOMB, LVar0, LVar1, LVar2, 0, 30, EASING_LINEAR) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Sub(LVar0, 65) + Set(LVar1, -5) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_BOMB, Float(6.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_BOMB, Float(0.1)) + Call(FlyPartTo, ACTOR_SELF, PRT_BOMB, LVar0, LVar1, LVar2, 0, 15, EASING_LINEAR) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BOMB, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) + Call(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(PlayModelAnimation, 0, Ref(AS_ToyTank_CloseHatch)) + Call(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_CLOSE_HATCH) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndSwitch + Call(PlaySoundAtPart, ACTOR_GENERAL, PRT_BOMB, SOUND_TOSS) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_BOMB, Float(14.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_BOMB, Float(0.1)) + Call(FlyPartTo, ACTOR_SELF, PRT_BOMB, LVar0, LVar1, LVar2, 0, 15, EASING_LINEAR) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) + Call(PlaySoundAtPart, ACTOR_SELF, PRT_BOMB, SOUND_BOMB_BLAST) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BOMB, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_BLAST | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_BOMB_TOSS, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GeneralGuy_Anim02) + Wait(30) + IfEq(LVarF, HIT_RESULT_10) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) + Call(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(PlayModelAnimation, 0, Ref(AS_ToyTank_CloseHatch)) + Call(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_CLOSE_HATCH) + Return + EndIf + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) + Call(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(PlayModelAnimation, 0, Ref(AS_ToyTank_CloseHatch)) + Call(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_CLOSE_HATCH) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_ShootLightning) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 320) - EVT_CALL(SetBattleCamOffsetZ, 30) - EVT_CALL(MoveBattleCamOver, 40) - EVT_WAIT(40) - EVT_CALL(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_OPEN_HATCH) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim0B) - EVT_CALL(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(PlayModelAnimation, 0, EVT_PTR(AS_ToyTank_OpenHatch)) - EVT_WAIT(10) - EVT_CALL(GetActorVar, ACTOR_TANK, AVAR_Tank_ModulateDarkness, LVar0) - EVT_IF_TRUE(LVar0) - EVT_CALL(SetDarknessMode, BTL_DARKNESS_MODE_2) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GeneralGuy_Anim03) - EVT_WAIT(20) - EVT_CALL(SetActorVar, ACTOR_TANK, AVAR_Tank_UsingBulbAttack, TRUE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_THREAD - EVT_CALL(N(FadeBackgroundDarken)) - EVT_END_THREAD - EVT_CALL(GetModelCenter, MODEL_kyu3) - EVT_THREAD - EVT_LOOP(4) - EVT_CALL(PlaySoundAtActor, LVar8, SOUND_ELECTRIC_BUZZ) - EVT_CALL(RandInt, 3, LVar0) - EVT_ADD(LVar0, 3) - EVT_WAIT(LVar0) - EVT_END_LOOP - EVT_END_THREAD - EVT_PLAY_EFFECT(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 40, 0) - EVT_WAIT(40) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT, 0, 5, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(HIT_RESULT_MISS) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetModelCenter, MODEL_kyu3) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, 0, LVar5) - EVT_CALL(PlaySound, SOUND_TANK_BULB_FIRE) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 18, 0) - EVT_WAIT(12) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT, 0, 2, BS_FLAGS1_TRIGGER_EVENTS) - EVT_IF_NE(LVar0, HIT_RESULT_MISS) - EVT_CALL(GetModelCenter, MODEL_kyu3) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_CALL(PlaySound, SOUND_TANK_BULB_FIRE) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 18, 0) - EVT_CALL(SetActorVar, ACTOR_TANK, AVAR_Tank_UsingBulbAttack, FALSE) - EVT_WAIT(12) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_LIGHTNING_PARTNER, BS_FLAGS1_TRIGGER_EVENTS) - EVT_ELSE - EVT_CALL(SetActorVar, ACTOR_TANK, AVAR_Tank_UsingBulbAttack, FALSE) - EVT_WAIT(20) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_TANK, AVAR_Tank_ModulateDarkness, LVar0) - EVT_IF_TRUE(LVar0) - EVT_CALL(SetDarknessMode, BTL_DARKNESS_MODE_3) - EVT_END_IF - EVT_CALL(N(FadeBackgroundLighten)) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) - EVT_CALL(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(PlayModelAnimation, 0, EVT_PTR(AS_ToyTank_CloseHatch)) - EVT_CALL(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_CLOSE_HATCH) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_CASE_EQ(HIT_RESULT_LUCKY) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetModelCenter, MODEL_kyu3) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, 0, LVar5) - EVT_CALL(PlaySound, SOUND_TANK_BULB_FIRE) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 18, 0) - EVT_WAIT(12) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(GetModelCenter, MODEL_kyu3) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, 0, LVar5) - EVT_CALL(PlaySound, SOUND_TANK_BULB_FIRE) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 18, 0) - EVT_CALL(SetActorVar, ACTOR_TANK, AVAR_Tank_UsingBulbAttack, FALSE) - EVT_WAIT(12) - EVT_CALL(GetActorVar, ACTOR_TANK, AVAR_Tank_ModulateDarkness, LVar0) - EVT_IF_TRUE(LVar0) - EVT_CALL(SetDarknessMode, BTL_DARKNESS_MODE_3) - EVT_END_IF - EVT_CALL(N(FadeBackgroundLighten)) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) - EVT_CALL(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(PlayModelAnimation, 0, EVT_PTR(AS_ToyTank_CloseHatch)) - EVT_CALL(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_CLOSE_HATCH) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetModelCenter, MODEL_kyu3) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_CALL(PlaySound, SOUND_TANK_BULB_FIRE) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 18, 0) - EVT_WAIT(12) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_LIGHTNING_PLAYER, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GeneralGuy_Anim02) - EVT_IF_EQ(LVarF, HIT_RESULT_10) - EVT_CALL(SetActorVar, ACTOR_TANK, AVAR_Tank_UsingBulbAttack, FALSE) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) - EVT_CALL(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(PlayModelAnimation, 0, EVT_PTR(AS_ToyTank_CloseHatch)) - EVT_CALL(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_CLOSE_HATCH) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(GetModelCenter, MODEL_kyu3) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_CALL(PlaySound, SOUND_TANK_BULB_FIRE) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 18, 0) - EVT_CALL(SetActorVar, ACTOR_TANK, AVAR_Tank_UsingBulbAttack, FALSE) - EVT_WAIT(12) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_LIGHTNING_PARTNER, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(GetActorVar, ACTOR_TANK, AVAR_Tank_ModulateDarkness, LVar0) - EVT_IF_TRUE(LVar0) - EVT_CALL(SetDarknessMode, BTL_DARKNESS_MODE_3) - EVT_END_IF - EVT_CALL(N(FadeBackgroundLighten)) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) - EVT_CALL(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(PlayModelAnimation, 0, EVT_PTR(AS_ToyTank_CloseHatch)) - EVT_CALL(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_CLOSE_HATCH) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 320) + Call(SetBattleCamOffsetZ, 30) + Call(MoveBattleCamOver, 40) + Wait(40) + Call(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_OPEN_HATCH) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim0B) + Call(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(PlayModelAnimation, 0, Ref(AS_ToyTank_OpenHatch)) + Wait(10) + Call(GetActorVar, ACTOR_TANK, AVAR_Tank_ModulateDarkness, LVar0) + IfTrue(LVar0) + Call(SetDarknessMode, BTL_DARKNESS_MODE_2) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GeneralGuy_Anim03) + Wait(20) + Call(SetActorVar, ACTOR_TANK, AVAR_Tank_UsingBulbAttack, TRUE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Thread + Call(N(FadeBackgroundDarken)) + EndThread + Call(GetModelCenter, MODEL_kyu3) + Thread + Loop(4) + Call(PlaySoundAtActor, LVar8, SOUND_ELECTRIC_BUZZ) + Call(RandInt, 3, LVar0) + Add(LVar0, 3) + Wait(LVar0) + EndLoop + EndThread + PlayEffect(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, Float(1.0), 40, 0) + Wait(40) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT, 0, 5, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseEq(HIT_RESULT_MISS) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetModelCenter, MODEL_kyu3) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, 0, LVar5) + Call(PlaySound, SOUND_TANK_BULB_FIRE) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.0), 18, 0) + Wait(12) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT, 0, 2, BS_FLAGS1_TRIGGER_EVENTS) + IfNe(LVar0, HIT_RESULT_MISS) + Call(GetModelCenter, MODEL_kyu3) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Call(PlaySound, SOUND_TANK_BULB_FIRE) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.0), 18, 0) + Call(SetActorVar, ACTOR_TANK, AVAR_Tank_UsingBulbAttack, FALSE) + Wait(12) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_LIGHTNING_PARTNER, BS_FLAGS1_TRIGGER_EVENTS) + Else + Call(SetActorVar, ACTOR_TANK, AVAR_Tank_UsingBulbAttack, FALSE) + Wait(20) + EndIf + Call(GetActorVar, ACTOR_TANK, AVAR_Tank_ModulateDarkness, LVar0) + IfTrue(LVar0) + Call(SetDarknessMode, BTL_DARKNESS_MODE_3) + EndIf + Call(N(FadeBackgroundLighten)) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) + Call(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(PlayModelAnimation, 0, Ref(AS_ToyTank_CloseHatch)) + Call(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_CLOSE_HATCH) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + CaseEq(HIT_RESULT_LUCKY) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetModelCenter, MODEL_kyu3) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, 0, LVar5) + Call(PlaySound, SOUND_TANK_BULB_FIRE) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.0), 18, 0) + Wait(12) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(GetModelCenter, MODEL_kyu3) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, 0, LVar5) + Call(PlaySound, SOUND_TANK_BULB_FIRE) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.0), 18, 0) + Call(SetActorVar, ACTOR_TANK, AVAR_Tank_UsingBulbAttack, FALSE) + Wait(12) + Call(GetActorVar, ACTOR_TANK, AVAR_Tank_ModulateDarkness, LVar0) + IfTrue(LVar0) + Call(SetDarknessMode, BTL_DARKNESS_MODE_3) + EndIf + Call(N(FadeBackgroundLighten)) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) + Call(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(PlayModelAnimation, 0, Ref(AS_ToyTank_CloseHatch)) + Call(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_CLOSE_HATCH) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndSwitch + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetModelCenter, MODEL_kyu3) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Call(PlaySound, SOUND_TANK_BULB_FIRE) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.0), 18, 0) + Wait(12) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_LIGHTNING_PLAYER, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GeneralGuy_Anim02) + IfEq(LVarF, HIT_RESULT_10) + Call(SetActorVar, ACTOR_TANK, AVAR_Tank_UsingBulbAttack, FALSE) + Wait(30) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) + Call(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(PlayModelAnimation, 0, Ref(AS_ToyTank_CloseHatch)) + Call(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_CLOSE_HATCH) + Return + EndIf + EndCaseGroup + EndSwitch + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(GetModelCenter, MODEL_kyu3) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Call(PlaySound, SOUND_TANK_BULB_FIRE) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.0), 18, 0) + Call(SetActorVar, ACTOR_TANK, AVAR_Tank_UsingBulbAttack, FALSE) + Wait(12) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_LIGHTNING_PARTNER, BS_FLAGS1_TRIGGER_EVENTS) + Call(GetActorVar, ACTOR_TANK, AVAR_Tank_ModulateDarkness, LVar0) + IfTrue(LVar0) + Call(SetDarknessMode, BTL_DARKNESS_MODE_3) + EndIf + Call(N(FadeBackgroundLighten)) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) + Call(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(PlayModelAnimation, 0, Ref(AS_ToyTank_CloseHatch)) + Call(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_CLOSE_HATCH) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; Vec3i N(SummonPos) = { 240, 0, 0 }; diff --git a/src/battle/area/omo2/actor/light_bulb.c b/src/battle/area/omo2/actor/light_bulb.c index a9a0914947e..78a64366b77 100644 --- a/src/battle/area/omo2/actor/light_bulb.c +++ b/src/battle/area/omo2/actor/light_bulb.c @@ -100,86 +100,86 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(SetActorPos, ACTOR_SELF, 116, 70, 0) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(SetActorPos, ACTOR_SELF, 116, 70, 0) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CASE_OR_EQ(EVENT_BURN_HIT) - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_CASE_EQ(EVENT_ZERO_DAMAGE) - EVT_CALL(GetActorVar, ACTOR_TANK, AVAR_Tank_HandlingEvent, LVar0) - EVT_IF_FALSE(LVar0) - EVT_CALL(func_8026E914, LVar0, LVar1) - EVT_CALL(PlayModelAnimation, 0, EVT_PTR(AS_ToyTank_CloseHatch)) - EVT_WAIT(30) - EVT_END_IF - EVT_CASE_EQ(EVENT_IMMUNE) - EVT_CALL(GetActorVar, ACTOR_TANK, AVAR_Tank_HandlingEvent, LVar0) - EVT_IF_FALSE(LVar0) - EVT_CALL(PlayModelAnimation, 0, EVT_PTR(AS_ToyTank_CloseHatch)) - EVT_WAIT(30) - EVT_END_IF - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CASE_OR_EQ(EVENT_DEATH) - EVT_CASE_OR_EQ(EVENT_BURN_DEATH) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIKE_CONTACT) - EVT_CASE_EQ(EVENT_BURN_CONTACT) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + ExecWait(N(EVS_Hit)) + CaseOrEq(EVENT_HIT) + CaseOrEq(EVENT_BURN_HIT) + ExecWait(N(EVS_Hit)) + EndCaseGroup + CaseEq(EVENT_SPIN_SMASH_HIT) + ExecWait(N(EVS_Hit)) + CaseEq(EVENT_ZERO_DAMAGE) + Call(GetActorVar, ACTOR_TANK, AVAR_Tank_HandlingEvent, LVar0) + IfFalse(LVar0) + Call(func_8026E914, LVar0, LVar1) + Call(PlayModelAnimation, 0, Ref(AS_ToyTank_CloseHatch)) + Wait(30) + EndIf + CaseEq(EVENT_IMMUNE) + Call(GetActorVar, ACTOR_TANK, AVAR_Tank_HandlingEvent, LVar0) + IfFalse(LVar0) + Call(PlayModelAnimation, 0, Ref(AS_ToyTank_CloseHatch)) + Wait(30) + EndIf + CaseEq(EVENT_AIR_LIFT_FAILED) + CaseOrEq(EVENT_DEATH) + CaseOrEq(EVENT_BURN_DEATH) + ExecWait(N(EVS_Death)) + Return + EndCaseGroup + CaseEq(EVENT_SPIN_SMASH_DEATH) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_SPIKE_CONTACT) + CaseEq(EVENT_BURN_CONTACT) + CaseEq(EVENT_SHOCK_HIT) + CaseEq(EVENT_END_FIRST_STRIKE) + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_Hit) = { - EVT_EXEC_WAIT(N(EVS_ShakeTank)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_ShakeTank)) + Return + End }; EvtScript N(EVS_ShakeTank) = { - EVT_CALL(GetActorVar, ACTOR_TANK, AVAR_Tank_HandlingEvent, LVar0) - EVT_IF_FALSE(LVar0) - EVT_CALL(PlayModelAnimation, 0, EVT_PTR(AS_ToyTank_CloseHatch)) - EVT_WAIT(30) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_TANK, AVAR_Tank_HandlingEvent, LVar0) + IfFalse(LVar0) + Call(PlayModelAnimation, 0, Ref(AS_ToyTank_CloseHatch)) + Wait(30) + EndIf + Return + End }; API_CALLABLE(N(SpawnShatterFX)) { @@ -320,16 +320,16 @@ API_CALLABLE(N(SpawnShatterFX)) { } EvtScript N(EVS_Death) = { - EVT_CALL(PlaySoundAtActor, ACTOR_BULB, SOUND_TANK_BULB_SHATTER) - EVT_CALL(N(SpawnShatterFX)) - EVT_CALL(EnableModel, MODEL_kyu3, FALSE) - EVT_CALL(EnableModel, MODEL_kyu1, FALSE) - EVT_CALL(GetActorVar, ACTOR_TANK, AVAR_Tank_BulbGlowEffect, LVar0) - EVT_IF_NE(LVar0, NULL) - EVT_CALL(RemoveEffect, LVar0) - EVT_CALL(SetActorVar, ACTOR_TANK, AVAR_Tank_BulbGlowEffect, NULL) - EVT_END_IF - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(PlaySoundAtActor, ACTOR_BULB, SOUND_TANK_BULB_SHATTER) + Call(N(SpawnShatterFX)) + Call(EnableModel, MODEL_kyu3, FALSE) + Call(EnableModel, MODEL_kyu1, FALSE) + Call(GetActorVar, ACTOR_TANK, AVAR_Tank_BulbGlowEffect, LVar0) + IfNe(LVar0, NULL) + Call(RemoveEffect, LVar0) + Call(SetActorVar, ACTOR_TANK, AVAR_Tank_BulbGlowEffect, NULL) + EndIf + Call(RemoveActor, ACTOR_SELF) + Return + End }; diff --git a/src/battle/area/omo2/actor/toy_tank.c b/src/battle/area/omo2/actor/toy_tank.c index 0e157afc958..0c7a113ece1 100644 --- a/src/battle/area/omo2/actor/toy_tank.c +++ b/src/battle/area/omo2/actor/toy_tank.c @@ -170,202 +170,202 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Tank_ShouldTetherGeneral, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Tank_SquadPhase, AVAL_SquadPhase_Init) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Tank_StiltPhase, AVAL_StiltPhase_Init) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Tank_StackPhase, AVAL_StackPhase_Init) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Tank_UnusedPhase, AVAL_UnusedPhase_Init) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Tank_UsingBulbAttack, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Tank_ModulateDarkness, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Tank_DarknessAmt, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Tank_HandlingEvent, FALSE) - EVT_CALL(SetActorDispOffset, ACTOR_GENERAL, 0, 7, 0) - EVT_CALL(SetActorPos, ACTOR_SELF, 85, 0, 0) - EVT_CALL(SetHomePos, ACTOR_SELF, 85, 0, 0) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_2, 85, 30, 0) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_3, 80, 0, 0) - EVT_CALL(LoadAnimatedModel, 0, EVT_PTR(toy_tank_model)) - EVT_CALL(PlayModelAnimation, 0, EVT_PTR(AS_ToyTank_Idle)) - EVT_CALL(EnableModel, MODEL_shy, FALSE) - EVT_CALL(SetAnimatedModelRootPosition, 0, 200, 0, 0) - EVT_CALL(SetPartTargetFlagBits, ACTOR_SELF, PRT_3, ACTOR_PART_TARGET_NO_JUMP, TRUE) - EVT_CALL(GetModelCenter, MODEL_kyu3) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), LVar5, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Tank_BulbGlowEffect, LVar5) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_EXEC(N(EVS_ManageTroopWaves)) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_Tank_ShouldTetherGeneral, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_Tank_SquadPhase, AVAL_SquadPhase_Init) + Call(SetActorVar, ACTOR_SELF, AVAR_Tank_StiltPhase, AVAL_StiltPhase_Init) + Call(SetActorVar, ACTOR_SELF, AVAR_Tank_StackPhase, AVAL_StackPhase_Init) + Call(SetActorVar, ACTOR_SELF, AVAR_Tank_UnusedPhase, AVAL_UnusedPhase_Init) + Call(SetActorVar, ACTOR_SELF, AVAR_Tank_UsingBulbAttack, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_Tank_ModulateDarkness, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_Tank_DarknessAmt, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Tank_HandlingEvent, FALSE) + Call(SetActorDispOffset, ACTOR_GENERAL, 0, 7, 0) + Call(SetActorPos, ACTOR_SELF, 85, 0, 0) + Call(SetHomePos, ACTOR_SELF, 85, 0, 0) + Call(HPBarToHome, ACTOR_SELF) + Call(SetPartPos, ACTOR_SELF, PRT_2, 85, 30, 0) + Call(SetPartPos, ACTOR_SELF, PRT_3, 80, 0, 0) + Call(LoadAnimatedModel, 0, Ref(toy_tank_model)) + Call(PlayModelAnimation, 0, Ref(AS_ToyTank_Idle)) + Call(EnableModel, MODEL_shy, FALSE) + Call(SetAnimatedModelRootPosition, 0, 200, 0, 0) + Call(SetPartTargetFlagBits, ACTOR_SELF, PRT_3, ACTOR_PART_TARGET_NO_JUMP, TRUE) + Call(GetModelCenter, MODEL_kyu3) + PlayEffect(EFFECT_BULB_GLOW, 2, LVar0, LVar1, LVar2, Float(1.0), LVar5, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Tank_BulbGlowEffect, LVar5) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Exec(N(EVS_ManageTroopWaves)) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(ActorExists, ACTOR_TANK, LVar0) - EVT_IF_TRUE(LVar0) + Label(0) + Call(ActorExists, ACTOR_TANK, LVar0) + IfTrue(LVar0) // update position of general guy - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Tank_ShouldTetherGeneral, LVar0) - EVT_IF_TRUE(LVar0) - EVT_CALL(GetAnimatedNodePosition, 0, MODEL_shy, LVar0, LVar1, LVar2) - EVT_CALL(SetActorPos, ACTOR_GENERAL, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedNodeRotation, 0, MODEL_shy, LVar0, LVar1, LVar2) - EVT_CALL(SetActorRotation, ACTOR_GENERAL, LVar0, 0, LVar2) - EVT_END_IF + Call(GetActorVar, ACTOR_SELF, AVAR_Tank_ShouldTetherGeneral, LVar0) + IfTrue(LVar0) + Call(GetAnimatedNodePosition, 0, MODEL_shy, LVar0, LVar1, LVar2) + Call(SetActorPos, ACTOR_GENERAL, LVar0, LVar1, LVar2) + Call(GetAnimatedNodeRotation, 0, MODEL_shy, LVar0, LVar1, LVar2) + Call(SetActorRotation, ACTOR_GENERAL, LVar0, 0, LVar2) + EndIf // update position of bulb glow - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Tank_BulbGlowEffect, LVar5) - EVT_IF_NE(LVar5, NULL) - EVT_CALL(ActorExists, ACTOR_BULB, LVar0) - EVT_IF_TRUE(LVar0) - EVT_CALL(GetAnimatedNodeRotation, 0, MODEL_shy, LVar0, LVar1, LVar3) - EVT_CALL(GetModelCenter, MODEL_kyu3) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Tank_UsingBulbAttack, LVar6) - EVT_IF_FALSE(LVar6) + Call(GetActorVar, ACTOR_SELF, AVAR_Tank_BulbGlowEffect, LVar5) + IfNe(LVar5, NULL) + Call(ActorExists, ACTOR_BULB, LVar0) + IfTrue(LVar0) + Call(GetAnimatedNodeRotation, 0, MODEL_shy, LVar0, LVar1, LVar3) + Call(GetModelCenter, MODEL_kyu3) + Call(GetActorVar, ACTOR_SELF, AVAR_Tank_UsingBulbAttack, LVar6) + IfFalse(LVar6) // set x position to 1000 if the bulb is inactive - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Tank_ModulateDarkness, LVarA) - EVT_IF_TRUE(LVarA) - EVT_SET(LVar0, 1000) - EVT_END_IF - EVT_END_IF - EVT_CALL(N(UpdateBulbGlowPos), LVar0, LVar1, LVar2, LVar3, LVar5) - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_Tank_ModulateDarkness, LVarA) + IfTrue(LVarA) + Set(LVar0, 1000) + EndIf + EndIf + Call(N(UpdateBulbGlowPos), LVar0, LVar1, LVar2, LVar3, LVar5) + EndIf + EndIf + Wait(1) + Goto(0) + EndIf + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Tank_HandlingEvent, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) - EVT_CALL(SetEnemyTargetOffset, ACTOR_SELF, PRT_2, 0, 35) - EVT_CALL(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(PlayModelAnimation, 0, EVT_PTR(AS_ToyTank_CloseHatch)) - EVT_CALL(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_CLOSE_HATCH) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CASE_OR_EQ(EVENT_BURN_HIT) - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) - EVT_CALL(SetEnemyTargetOffset, ACTOR_SELF, PRT_2, 0, 35) - EVT_CALL(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(PlayModelAnimation, 0, EVT_PTR(AS_ToyTank_CloseHatch)) - EVT_CALL(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_CLOSE_HATCH) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) - EVT_CALL(SetEnemyTargetOffset, ACTOR_SELF, PRT_2, 0, 35) - EVT_CALL(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(PlayModelAnimation, 0, EVT_PTR(AS_ToyTank_CloseHatch)) - EVT_CALL(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_CLOSE_HATCH) - EVT_CASE_EQ(EVENT_ZERO_DAMAGE) - EVT_CALL(func_8026E914, LVar0, LVar1) - EVT_CALL(PlayModelAnimation, 0, EVT_PTR(AS_ToyTank_CloseHatch)) - EVT_CALL(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_CLOSE_HATCH) - EVT_WAIT(30) - EVT_CASE_EQ(EVENT_IMMUNE) - EVT_CALL(PlayModelAnimation, 0, EVT_PTR(AS_ToyTank_CloseHatch)) - EVT_CALL(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_CLOSE_HATCH) - EVT_WAIT(30) - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CALL(PlayModelAnimation, 0, EVT_PTR(AS_ToyTank_CloseHatch)) - EVT_WAIT(30) - EVT_CASE_OR_EQ(EVENT_DEATH) - EVT_CASE_OR_EQ(EVENT_BURN_DEATH) - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_EXEC_WAIT(N(EVS_Hit)) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIKE_CONTACT) - EVT_CASE_EQ(EVENT_BURN_CONTACT) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Tank_HandlingEvent, FALSE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_Tank_HandlingEvent, TRUE) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + ExecWait(N(EVS_Hit)) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) + Call(SetEnemyTargetOffset, ACTOR_SELF, PRT_2, 0, 35) + Call(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(PlayModelAnimation, 0, Ref(AS_ToyTank_CloseHatch)) + Call(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_CLOSE_HATCH) + CaseOrEq(EVENT_HIT) + CaseOrEq(EVENT_BURN_HIT) + ExecWait(N(EVS_Hit)) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) + Call(SetEnemyTargetOffset, ACTOR_SELF, PRT_2, 0, 35) + Call(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(PlayModelAnimation, 0, Ref(AS_ToyTank_CloseHatch)) + Call(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_CLOSE_HATCH) + EndCaseGroup + CaseEq(EVENT_SPIN_SMASH_HIT) + ExecWait(N(EVS_Hit)) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) + Call(SetEnemyTargetOffset, ACTOR_SELF, PRT_2, 0, 35) + Call(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(PlayModelAnimation, 0, Ref(AS_ToyTank_CloseHatch)) + Call(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_CLOSE_HATCH) + CaseEq(EVENT_ZERO_DAMAGE) + Call(func_8026E914, LVar0, LVar1) + Call(PlayModelAnimation, 0, Ref(AS_ToyTank_CloseHatch)) + Call(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_CLOSE_HATCH) + Wait(30) + CaseEq(EVENT_IMMUNE) + Call(PlayModelAnimation, 0, Ref(AS_ToyTank_CloseHatch)) + Call(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_CLOSE_HATCH) + Wait(30) + CaseEq(EVENT_AIR_LIFT_FAILED) + Call(PlayModelAnimation, 0, Ref(AS_ToyTank_CloseHatch)) + Wait(30) + CaseOrEq(EVENT_DEATH) + CaseOrEq(EVENT_BURN_DEATH) + ExecWait(N(EVS_Hit)) + ExecWait(N(EVS_Death)) + Return + EndCaseGroup + CaseEq(EVENT_SPIN_SMASH_DEATH) + ExecWait(N(EVS_Hit)) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_SPIKE_CONTACT) + CaseEq(EVENT_BURN_CONTACT) + CaseEq(EVENT_SHOCK_HIT) + CaseEq(EVENT_END_FIRST_STRIKE) + CaseDefault + EndSwitch + Call(SetActorVar, ACTOR_SELF, AVAR_Tank_HandlingEvent, FALSE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_Hit) = { - EVT_CALL(UseIdleAnimation, ACTOR_GENERAL, FALSE) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim05) - EVT_CALL(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetEnemyTargetOffset, ACTOR_SELF, PRT_2, 0, 50) - EVT_EXEC_WAIT(N(EVS_ShakeTank)) - EVT_CALL(GetActorVar, ACTOR_GENERAL, AVAR_General_Flags, LVar0) - EVT_CALL(GetDamageSource, LVar1) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(DMG_SRC_ELECTRO_DASH) - EVT_IF_NOT_FLAG(LVar0, AVAR_GeneralFlag_ComplainElectric) - EVT_BITWISE_OR_CONST(LVar0, AVAR_GeneralFlag_ComplainElectric | AVAR_GeneralFlag_ComplainUnfair | AVAR_GeneralFlag_ComplainGeneric) - EVT_CALL(SetActorVar, ACTOR_GENERAL, AVAR_General_Flags, LVar0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamZoom, 260) - EVT_CALL(SetBattleCamTarget, 85, 80, 0) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(ActorSpeak, MSG_CH4_0072, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim05, ANIM_GeneralGuy_Anim05) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_END_IF - EVT_CASE_OR_EQ(DMG_SRC_D_DOWN_POUND) - EVT_CASE_OR_EQ(DMG_SRC_D_DOWN_JUMP) - EVT_IF_NOT_FLAG(LVar0, AVAR_GeneralFlag_ComplainUnfair) - EVT_BITWISE_OR_CONST(LVar0, AVAR_GeneralFlag_ComplainUnfair | AVAR_GeneralFlag_ComplainGeneric) - EVT_CALL(SetActorVar, ACTOR_GENERAL, AVAR_General_Flags, LVar0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamZoom, 260) - EVT_CALL(SetBattleCamTarget, 85, 80, 0) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(ActorSpeak, MSG_CH4_0073, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim05, ANIM_GeneralGuy_Anim05) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_IF_NOT_FLAG(LVar0, AVAR_GeneralFlag_ComplainGeneric) - EVT_BITWISE_OR_CONST(LVar0, AVAR_GeneralFlag_ComplainUnfair | AVAR_GeneralFlag_ComplainGeneric) - EVT_CALL(SetActorVar, ACTOR_GENERAL, AVAR_General_Flags, LVar0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamZoom, 260) - EVT_CALL(SetBattleCamTarget, 85, 80, 0) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(ActorSpeak, MSG_CH4_0074, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim05, ANIM_GeneralGuy_Anim05) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_GENERAL, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_GENERAL, FALSE) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim05) + Call(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetEnemyTargetOffset, ACTOR_SELF, PRT_2, 0, 50) + ExecWait(N(EVS_ShakeTank)) + Call(GetActorVar, ACTOR_GENERAL, AVAR_General_Flags, LVar0) + Call(GetDamageSource, LVar1) + Switch(LVar1) + CaseEq(DMG_SRC_ELECTRO_DASH) + IfNotFlag(LVar0, AVAR_GeneralFlag_ComplainElectric) + BitwiseOrConst(LVar0, AVAR_GeneralFlag_ComplainElectric | AVAR_GeneralFlag_ComplainUnfair | AVAR_GeneralFlag_ComplainGeneric) + Call(SetActorVar, ACTOR_GENERAL, AVAR_General_Flags, LVar0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamZoom, 260) + Call(SetBattleCamTarget, 85, 80, 0) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(ActorSpeak, MSG_CH4_0072, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim05, ANIM_GeneralGuy_Anim05) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + EndIf + CaseOrEq(DMG_SRC_D_DOWN_POUND) + CaseOrEq(DMG_SRC_D_DOWN_JUMP) + IfNotFlag(LVar0, AVAR_GeneralFlag_ComplainUnfair) + BitwiseOrConst(LVar0, AVAR_GeneralFlag_ComplainUnfair | AVAR_GeneralFlag_ComplainGeneric) + Call(SetActorVar, ACTOR_GENERAL, AVAR_General_Flags, LVar0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamZoom, 260) + Call(SetBattleCamTarget, 85, 80, 0) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(ActorSpeak, MSG_CH4_0073, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim05, ANIM_GeneralGuy_Anim05) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + EndIf + EndCaseGroup + CaseDefault + IfNotFlag(LVar0, AVAR_GeneralFlag_ComplainGeneric) + BitwiseOrConst(LVar0, AVAR_GeneralFlag_ComplainUnfair | AVAR_GeneralFlag_ComplainGeneric) + Call(SetActorVar, ACTOR_GENERAL, AVAR_General_Flags, LVar0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamZoom, 260) + Call(SetBattleCamTarget, 85, 80, 0) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(ActorSpeak, MSG_CH4_0074, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim05, ANIM_GeneralGuy_Anim05) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + EndIf + EndSwitch + Call(UseIdleAnimation, ACTOR_GENERAL, TRUE) + Return + End }; EvtScript N(EVS_ShakeTank) = { - EVT_CALL(PlayModelAnimation, 0, EVT_PTR(AS_ToyTank_Shake)) - EVT_WAIT(30) - EVT_RETURN - EVT_END + Call(PlayModelAnimation, 0, Ref(AS_ToyTank_Shake)) + Wait(30) + Return + End }; EvtScript N(EVS_ManageTroopWaves) = { @@ -376,514 +376,514 @@ EvtScript N(EVS_ManageTroopWaves) = { #define LBL_PHASE_UNUSED 10 #define LBL_DONE 99 // monitor the shy squad phase, waiting for them to be defeated - EVT_LABEL(LBL_SQUAD_PHASE) - EVT_CALL(ActorExists, ACTOR_TANK, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_GOTO(LBL_DONE) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Tank_SquadPhase, LVar0) - EVT_IF_EQ(LVar0, AVAL_SquadPhase_Defeated) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Tank_SquadPhase, AVAL_SquadPhase_Done) - EVT_CALL(CancelEnemyTurn, 1) - EVT_EXEC_WAIT(N(EVS_IncrementWavesDefeated)) - EVT_EXEC_WAIT(N(EVS_BeginWave_StiltGuys)) - EVT_ELSE - EVT_WAIT(1) - EVT_GOTO(LBL_SQUAD_PHASE) - EVT_END_IF + Label(LBL_SQUAD_PHASE) + Call(ActorExists, ACTOR_TANK, LVar0) + IfEq(LVar0, FALSE) + Goto(LBL_DONE) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Tank_SquadPhase, LVar0) + IfEq(LVar0, AVAL_SquadPhase_Defeated) + Call(SetActorVar, ACTOR_SELF, AVAR_Tank_SquadPhase, AVAL_SquadPhase_Done) + Call(CancelEnemyTurn, 1) + ExecWait(N(EVS_IncrementWavesDefeated)) + ExecWait(N(EVS_BeginWave_StiltGuys)) + Else + Wait(1) + Goto(LBL_SQUAD_PHASE) + EndIf // monitor the stilt guys phase, waiting for them to be defeated - EVT_LABEL(LBL_PHASE_STILT) - EVT_CALL(ActorExists, ACTOR_TANK, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_GOTO(LBL_DONE) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Tank_StiltPhase, LVar0) - EVT_IF_EQ(LVar0, AVAL_StiltPhase_Defeated) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Tank_StiltPhase, AVAL_StiltPhase_Done) - EVT_CALL(CancelEnemyTurn, 1) - EVT_EXEC_WAIT(N(EVS_IncrementWavesDefeated)) - EVT_EXEC_WAIT(N(EVS_BeginWave_ShyStacks)) - EVT_ELSE - EVT_WAIT(1) - EVT_GOTO(LBL_PHASE_STILT) - EVT_END_IF + Label(LBL_PHASE_STILT) + Call(ActorExists, ACTOR_TANK, LVar0) + IfEq(LVar0, FALSE) + Goto(LBL_DONE) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Tank_StiltPhase, LVar0) + IfEq(LVar0, AVAL_StiltPhase_Defeated) + Call(SetActorVar, ACTOR_SELF, AVAR_Tank_StiltPhase, AVAL_StiltPhase_Done) + Call(CancelEnemyTurn, 1) + ExecWait(N(EVS_IncrementWavesDefeated)) + ExecWait(N(EVS_BeginWave_ShyStacks)) + Else + Wait(1) + Goto(LBL_PHASE_STILT) + EndIf // monitor the shy stacks phase, waiting for them to be defeated - EVT_LABEL(LBL_PHASE_STACK) - EVT_CALL(ActorExists, ACTOR_TANK, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_GOTO(LBL_DONE) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Tank_StackPhase, LVar0) - EVT_IF_NE(LVar0, AVAL_StackPhase_Defeated) - EVT_WAIT(1) - EVT_GOTO(LBL_PHASE_STACK) - EVT_END_IF + Label(LBL_PHASE_STACK) + Call(ActorExists, ACTOR_TANK, LVar0) + IfEq(LVar0, FALSE) + Goto(LBL_DONE) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Tank_StackPhase, LVar0) + IfNe(LVar0, AVAL_StackPhase_Defeated) + Wait(1) + Goto(LBL_PHASE_STACK) + EndIf // this block was added to short-circuit the following unused phase and go directly to the tank phase // everything between this block and LBL_DONE is unreachable - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Tank_UnusedPhase, AVAL_UnusedPhase_Done) - EVT_CALL(CancelEnemyTurn, 1) - EVT_CALL(SetActorVar, ACTOR_GENERAL, AVAR_General_WavesDefeated, 8) - EVT_EXEC_WAIT(N(EVS_BeginWave_Tank)) - EVT_GOTO(LBL_DONE) + Call(SetActorVar, ACTOR_SELF, AVAR_Tank_UnusedPhase, AVAL_UnusedPhase_Done) + Call(CancelEnemyTurn, 1) + Call(SetActorVar, ACTOR_GENERAL, AVAR_General_WavesDefeated, 8) + ExecWait(N(EVS_BeginWave_Tank)) + Goto(LBL_DONE) // ----------------------- begin unreachable code ----------------------- // a second stilt phase? but nothing is summoned and AVAR_Tank_StiltPhase == AVAL_StiltPhase_Defeated - EVT_LABEL(LBL_PHASE_BROKEN) - EVT_CALL(ActorExists, ACTOR_TANK, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_GOTO(LBL_DONE) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Tank_StiltPhase, LVar0) - EVT_IF_NE(LVar0, AVAL_StiltPhase_Defeated) - EVT_WAIT(1) - EVT_GOTO(LBL_PHASE_BROKEN) - EVT_END_IF + Label(LBL_PHASE_BROKEN) + Call(ActorExists, ACTOR_TANK, LVar0) + IfEq(LVar0, FALSE) + Goto(LBL_DONE) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Tank_StiltPhase, LVar0) + IfNe(LVar0, AVAL_StiltPhase_Defeated) + Wait(1) + Goto(LBL_PHASE_BROKEN) + EndIf // if watt is out, re-summon the shy stacks. otherwise, summon the unused shy guy group - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_EQ(LVar0, PARTNER_WATT) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Tank_StiltPhase, AVAL_StiltPhase_Done) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Tank_StackPhase, AVAL_StackPhase_Init) - EVT_CALL(CancelEnemyTurn, 1) - EVT_EXEC_WAIT(N(EVS_IncrementWavesDefeated)) - EVT_EXEC_WAIT(N(EVS_BeginWave_ShyStacks)) - EVT_WAIT(1) - EVT_GOTO(LBL_PHASE_STACK) - EVT_ELSE - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Tank_StackPhase, AVAL_StackPhase_Done) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Tank_StiltPhase, AVAL_StiltPhase_Done) - EVT_CALL(CancelEnemyTurn, 1) - EVT_CALL(SetActorVar, ACTOR_GENERAL, AVAR_General_WavesDefeated, 7) - EVT_EXEC_WAIT(N(EVS_BeginWave_ShySquadRedux)) - EVT_WAIT(1) - EVT_GOTO(LBL_PHASE_UNUSED) - EVT_END_IF + Call(GetCurrentPartnerID, LVar0) + IfEq(LVar0, PARTNER_WATT) + Call(SetActorVar, ACTOR_SELF, AVAR_Tank_StiltPhase, AVAL_StiltPhase_Done) + Call(SetActorVar, ACTOR_SELF, AVAR_Tank_StackPhase, AVAL_StackPhase_Init) + Call(CancelEnemyTurn, 1) + ExecWait(N(EVS_IncrementWavesDefeated)) + ExecWait(N(EVS_BeginWave_ShyStacks)) + Wait(1) + Goto(LBL_PHASE_STACK) + Else + Call(SetActorVar, ACTOR_SELF, AVAR_Tank_StackPhase, AVAL_StackPhase_Done) + Call(SetActorVar, ACTOR_SELF, AVAR_Tank_StiltPhase, AVAL_StiltPhase_Done) + Call(CancelEnemyTurn, 1) + Call(SetActorVar, ACTOR_GENERAL, AVAR_General_WavesDefeated, 7) + ExecWait(N(EVS_BeginWave_ShySquadRedux)) + Wait(1) + Goto(LBL_PHASE_UNUSED) + EndIf // monitor the shy stacks phase, waiting for them to be defeated - EVT_LABEL(LBL_PHASE_UNUSED) - EVT_CALL(ActorExists, ACTOR_TANK, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_GOTO(LBL_DONE) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Tank_UnusedPhase, LVar0) - EVT_IF_EQ(LVar0, AVAL_UnusedPhase_Defeated) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Tank_UnusedPhase, AVAL_UnusedPhase_Done) - EVT_CALL(CancelEnemyTurn, 1) - EVT_CALL(SetActorVar, ACTOR_GENERAL, AVAR_General_WavesDefeated, 8) - EVT_EXEC_WAIT(N(EVS_BeginWave_Tank)) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(LBL_PHASE_UNUSED) + Label(LBL_PHASE_UNUSED) + Call(ActorExists, ACTOR_TANK, LVar0) + IfEq(LVar0, FALSE) + Goto(LBL_DONE) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Tank_UnusedPhase, LVar0) + IfEq(LVar0, AVAL_UnusedPhase_Defeated) + Call(SetActorVar, ACTOR_SELF, AVAR_Tank_UnusedPhase, AVAL_UnusedPhase_Done) + Call(CancelEnemyTurn, 1) + Call(SetActorVar, ACTOR_GENERAL, AVAR_General_WavesDefeated, 8) + ExecWait(N(EVS_BeginWave_Tank)) + EndIf + Wait(1) + Goto(LBL_PHASE_UNUSED) // ------------------------ end unreachable code ------------------------ - EVT_LABEL(LBL_DONE) - EVT_RETURN - EVT_END + Label(LBL_DONE) + Return + End }; EvtScript N(EVS_IncrementWavesDefeated) = { - EVT_CALL(GetActorVar, ACTOR_GENERAL, AVAR_General_WavesDefeated, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(6) - EVT_CALL(SetActorVar, ACTOR_GENERAL, AVAR_General_WavesDefeated, 5) - EVT_CASE_DEFAULT - EVT_ADD(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_GENERAL, AVAR_General_WavesDefeated, LVar0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_GENERAL, AVAR_General_WavesDefeated, LVar0) + Switch(LVar0) + CaseEq(6) + Call(SetActorVar, ACTOR_GENERAL, AVAR_General_WavesDefeated, 5) + CaseDefault + Add(LVar0, 1) + Call(SetActorVar, ACTOR_GENERAL, AVAR_General_WavesDefeated, LVar0) + EndSwitch + Return + End }; EvtScript N(EVS_BeginWave_StiltGuys) = { - EVT_CALL(EnableBattleStatusBar, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_CALL(GetActorVar, ACTOR_GENERAL, AVAR_General_Flags, LVar0) - EVT_IF_NOT_FLAG(LVar0, AVAR_GeneralFlag_SquadFled) - EVT_CALL(ActorSpeak, MSG_CH4_0069, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim00, ANIM_GeneralGuy_Anim00) - EVT_ELSE // shy squad has fled - EVT_CALL(ActorSpeak, MSG_CH4_006A, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim0C, ANIM_GeneralGuy_Anim02) - EVT_END_IF - EVT_CALL(LoadBattleSection, BTL_AREA_OMO2_4) - EVT_CALL(SummonEnemy, EVT_PTR(N(SignalGuyFormation)), TRUE) - EVT_WAIT(60) - EVT_CALL(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_MOVE1) - EVT_WAIT(5) - EVT_CALL(PlayModelAnimation, 0, EVT_PTR(AS_ToyTank_MoveForward)) - EVT_CALL(SetAnimatedModelRootPosition, 0, 20, 0, 0) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim03) - EVT_WAIT(25) - EVT_WAIT(2) - EVT_CALL(SetOwnerTarget, LVar0, 1) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar1, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, DMG_SCENE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim10) - EVT_WAIT(16) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim04) - EVT_WAIT(16) - EVT_CALL(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_MOVE2) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) - EVT_WAIT(20) - EVT_CALL(PlayModelAnimation, 0, EVT_PTR(AS_ToyTank_Idle)) - EVT_WAIT(26) - EVT_EXEC_WAIT(N(EVS_SummonStiltGuys)) - EVT_CALL(GetActorPos, ACTOR_GENERAL, LVar0, LVar1, LVar2) - EVT_CALL(SetHomePos, ACTOR_GENERAL, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_GENERAL) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(EnableBattleStatusBar, TRUE) - EVT_CALL(FreezeBattleState, FALSE) - EVT_RETURN - EVT_END + Call(EnableBattleStatusBar, FALSE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Wait(30) + Call(GetActorVar, ACTOR_GENERAL, AVAR_General_Flags, LVar0) + IfNotFlag(LVar0, AVAR_GeneralFlag_SquadFled) + Call(ActorSpeak, MSG_CH4_0069, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim00, ANIM_GeneralGuy_Anim00) + Else // shy squad has fled + Call(ActorSpeak, MSG_CH4_006A, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim0C, ANIM_GeneralGuy_Anim02) + EndIf + Call(LoadBattleSection, BTL_AREA_OMO2_4) + Call(SummonEnemy, Ref(N(SignalGuyFormation)), TRUE) + Wait(60) + Call(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_MOVE1) + Wait(5) + Call(PlayModelAnimation, 0, Ref(AS_ToyTank_MoveForward)) + Call(SetAnimatedModelRootPosition, 0, 20, 0, 0) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim03) + Wait(25) + Wait(2) + Call(SetOwnerTarget, LVar0, 1) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar1, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, DMG_SCENE, BS_FLAGS1_TRIGGER_EVENTS) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim10) + Wait(16) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim04) + Wait(16) + Call(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_MOVE2) + Wait(4) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) + Wait(20) + Call(PlayModelAnimation, 0, Ref(AS_ToyTank_Idle)) + Wait(26) + ExecWait(N(EVS_SummonStiltGuys)) + Call(GetActorPos, ACTOR_GENERAL, LVar0, LVar1, LVar2) + Call(SetHomePos, ACTOR_GENERAL, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_GENERAL) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Call(EnableBattleStatusBar, TRUE) + Call(FreezeBattleState, FALSE) + Return + End }; EvtScript N(EVS_BeginWave_ShyStacks) = { - EVT_CALL(EnableBattleStatusBar, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_GENERAL) - EVT_CALL(MoveBattleCamOver, 40) - EVT_WAIT(40) - EVT_CALL(GetActorVar, ACTOR_GENERAL, AVAR_General_WavesDefeated, LVar0) - EVT_IF_EQ(LVar0, 2) - EVT_CALL(ActorSpeak, MSG_CH4_006E, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim0C, ANIM_GeneralGuy_Anim02) - EVT_ELSE - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(10) - EVT_CALL(LoadBattleSection, BTL_AREA_OMO2_3) - EVT_CALL(SummonEnemy, EVT_PTR(N(LeftShyStackFormation)), TRUE) - EVT_WAIT(124) - EVT_CALL(SummonEnemy, EVT_PTR(N(RightShyStackFormation)), TRUE) - EVT_WAIT(114) - EVT_CALL(PlayModelAnimation, 0, EVT_PTR(AS_ToyTank_Idle)) - EVT_LABEL(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Tank_StiltPhase, LVar0) - EVT_IF_NE(LVar0, AVAL_StiltPhase_Next) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_WAVE_B, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 320) - EVT_CALL(SetBattleCamOffsetZ, 60) - EVT_CALL(MoveBattleCamOver, 40) - EVT_WAIT(40) - EVT_CALL(ActorSpeak, MSG_CH4_006F, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim0C, ANIM_GeneralGuy_Anim02) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_WAVE_A, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_WAVE_A, EVT_FLOAT(1.5)) - EVT_CALL(SetGoalPos, ACTOR_WAVE_A, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_WAVE_A, 10, FALSE, TRUE, FALSE) - EVT_CALL(UseIdleAnimation, ACTOR_WAVE_A, FALSE) - EVT_CALL(SetPartScale, ACTOR_WAVE_A, PRT_MAIN, EVT_FLOAT(1.1), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_WAVE_A, PRT_MAIN, EVT_FLOAT(1.2), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_WAVE_A, PRT_MAIN, EVT_FLOAT(1.1), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_WAVE_A, PRT_MAIN, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(UseIdleAnimation, ACTOR_WAVE_A, TRUE) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_WAVE_B, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_WAVE_B, EVT_FLOAT(1.5)) - EVT_CALL(SetGoalPos, ACTOR_WAVE_B, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_WAVE_B, 10, FALSE, TRUE, FALSE) - EVT_CALL(UseIdleAnimation, ACTOR_WAVE_B, FALSE) - EVT_CALL(SetPartScale, ACTOR_WAVE_B, PRT_MAIN, EVT_FLOAT(1.1), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_WAVE_B, PRT_MAIN, EVT_FLOAT(1.2), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_WAVE_B, PRT_MAIN, EVT_FLOAT(1.1), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_WAVE_B, PRT_MAIN, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(UseIdleAnimation, ACTOR_WAVE_B, TRUE) - EVT_END_THREAD - EVT_CALL(ActorSpeak, MSG_CH4_0070, ACTOR_WAVE_B, PRT_MAIN, -1, -1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_CALL(EnableBattleStatusBar, TRUE) - EVT_CALL(FreezeBattleState, FALSE) - EVT_RETURN - EVT_END + Call(EnableBattleStatusBar, FALSE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_GENERAL) + Call(MoveBattleCamOver, 40) + Wait(40) + Call(GetActorVar, ACTOR_GENERAL, AVAR_General_WavesDefeated, LVar0) + IfEq(LVar0, 2) + Call(ActorSpeak, MSG_CH4_006E, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim0C, ANIM_GeneralGuy_Anim02) + Else + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Wait(10) + Call(LoadBattleSection, BTL_AREA_OMO2_3) + Call(SummonEnemy, Ref(N(LeftShyStackFormation)), TRUE) + Wait(124) + Call(SummonEnemy, Ref(N(RightShyStackFormation)), TRUE) + Wait(114) + Call(PlayModelAnimation, 0, Ref(AS_ToyTank_Idle)) + Label(0) + Call(GetActorVar, ACTOR_SELF, AVAR_Tank_StiltPhase, LVar0) + IfNe(LVar0, AVAL_StiltPhase_Next) + Wait(1) + Goto(0) + EndIf + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_WAVE_B, LVar0, LVar1, LVar2) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 320) + Call(SetBattleCamOffsetZ, 60) + Call(MoveBattleCamOver, 40) + Wait(40) + Call(ActorSpeak, MSG_CH4_006F, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim0C, ANIM_GeneralGuy_Anim02) + Thread + Call(GetActorPos, ACTOR_WAVE_A, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_WAVE_A, Float(1.5)) + Call(SetGoalPos, ACTOR_WAVE_A, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_WAVE_A, 10, FALSE, TRUE, FALSE) + Call(UseIdleAnimation, ACTOR_WAVE_A, FALSE) + Call(SetPartScale, ACTOR_WAVE_A, PRT_MAIN, Float(1.1), Float(0.9), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_WAVE_A, PRT_MAIN, Float(1.2), Float(0.8), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_WAVE_A, PRT_MAIN, Float(1.1), Float(0.9), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_WAVE_A, PRT_MAIN, Float(1.0), Float(1.0), Float(1.0)) + Call(UseIdleAnimation, ACTOR_WAVE_A, TRUE) + EndThread + Thread + Call(GetActorPos, ACTOR_WAVE_B, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_WAVE_B, Float(1.5)) + Call(SetGoalPos, ACTOR_WAVE_B, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_WAVE_B, 10, FALSE, TRUE, FALSE) + Call(UseIdleAnimation, ACTOR_WAVE_B, FALSE) + Call(SetPartScale, ACTOR_WAVE_B, PRT_MAIN, Float(1.1), Float(0.9), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_WAVE_B, PRT_MAIN, Float(1.2), Float(0.8), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_WAVE_B, PRT_MAIN, Float(1.1), Float(0.9), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_WAVE_B, PRT_MAIN, Float(1.0), Float(1.0), Float(1.0)) + Call(UseIdleAnimation, ACTOR_WAVE_B, TRUE) + EndThread + Call(ActorSpeak, MSG_CH4_0070, ACTOR_WAVE_B, PRT_MAIN, -1, -1) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Wait(30) + Call(EnableBattleStatusBar, TRUE) + Call(FreezeBattleState, FALSE) + Return + End }; EvtScript N(EVS_SummonStiltGuys) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_GENERAL) - EVT_CALL(MoveBattleCamOver, 40) - EVT_WAIT(40) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(GetActorVar, ACTOR_GENERAL, AVAR_General_WavesDefeated, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(ActorSpeak, MSG_CH4_006B, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim0C, ANIM_GeneralGuy_Anim02) - EVT_ELSE - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(10) - EVT_CALL(LoadBattleSection, BTL_AREA_OMO2_2) - EVT_CALL(SummonEnemy, EVT_PTR(N(LeftStiltGuyFormation)), TRUE) - EVT_WAIT(60) - EVT_CALL(SummonEnemy, EVT_PTR(N(RightStiltGuyFormation)), TRUE) - EVT_WAIT(60) - EVT_LABEL(1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Tank_SquadPhase, LVar0) - EVT_IF_NE(LVar0, AVAL_SquadPhase_Next) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 50, 1, 0) - EVT_CALL(SetBattleCamZoom, 320) - EVT_CALL(SetBattleCamOffsetZ, 60) - EVT_CALL(MoveBattleCamOver, 40) - EVT_WAIT(40) - EVT_CALL(ActorSpeak, MSG_CH4_006C, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim0C, ANIM_GeneralGuy_Anim02) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_WAVE_A, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_WAVE_A, EVT_FLOAT(1.5)) - EVT_CALL(SetGoalPos, ACTOR_WAVE_A, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_WAVE_A, 10, FALSE, TRUE, FALSE) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_WAVE_B, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_WAVE_B, EVT_FLOAT(1.5)) - EVT_CALL(SetGoalPos, ACTOR_WAVE_B, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_WAVE_B, 10, FALSE, TRUE, FALSE) - EVT_END_THREAD - EVT_CALL(ActorSpeak, MSG_CH4_006D, ACTOR_WAVE_B, PRT_MAIN, -1, -1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(FreezeBattleState, FALSE) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_GENERAL) + Call(MoveBattleCamOver, 40) + Wait(40) + Call(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_1, FALSE) + Call(GetActorVar, ACTOR_GENERAL, AVAR_General_WavesDefeated, LVar0) + IfEq(LVar0, 1) + Call(ActorSpeak, MSG_CH4_006B, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim0C, ANIM_GeneralGuy_Anim02) + Else + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Wait(10) + Call(LoadBattleSection, BTL_AREA_OMO2_2) + Call(SummonEnemy, Ref(N(LeftStiltGuyFormation)), TRUE) + Wait(60) + Call(SummonEnemy, Ref(N(RightStiltGuyFormation)), TRUE) + Wait(60) + Label(1) + Call(GetActorVar, ACTOR_SELF, AVAR_Tank_SquadPhase, LVar0) + IfNe(LVar0, AVAL_SquadPhase_Next) + Wait(1) + Goto(1) + EndIf + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 50, 1, 0) + Call(SetBattleCamZoom, 320) + Call(SetBattleCamOffsetZ, 60) + Call(MoveBattleCamOver, 40) + Wait(40) + Call(ActorSpeak, MSG_CH4_006C, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim0C, ANIM_GeneralGuy_Anim02) + Thread + Call(GetActorPos, ACTOR_WAVE_A, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_WAVE_A, Float(1.5)) + Call(SetGoalPos, ACTOR_WAVE_A, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_WAVE_A, 10, FALSE, TRUE, FALSE) + EndThread + Thread + Call(GetActorPos, ACTOR_WAVE_B, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_WAVE_B, Float(1.5)) + Call(SetGoalPos, ACTOR_WAVE_B, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_WAVE_B, 10, FALSE, TRUE, FALSE) + EndThread + Call(ActorSpeak, MSG_CH4_006D, ACTOR_WAVE_B, PRT_MAIN, -1, -1) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Call(FreezeBattleState, FALSE) + Return + End }; // actually unused EvtScript N(EVS_BeginWave_ShySquadRedux) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_CALL(SetActorYaw, ACTOR_GENERAL, 180) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim03) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Tank_UsingBulbAttack, FALSE) - EVT_WAIT(10) - EVT_CALL(SetDarknessMode, BTL_DARKNESS_MODE_1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Tank_ModulateDarkness, TRUE) - EVT_EXEC(N(EVS_ManageDarkness)) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_GENERAL) - EVT_CALL(MoveBattleCamOver, 40) - EVT_WAIT(20) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(EndActorSpeech, ACTOR_GENERAL, PRT_MAIN, -1, -1) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) - EVT_CALL(SetActorYaw, ACTOR_GENERAL, 0) - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) - EVT_CALL(LoadBattleSection, BTL_AREA_OMO2_5) - EVT_CALL(SummonEnemy, EVT_PTR(N(ShySquadReduxFormation)), TRUE) - EVT_WAIT(155) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(SetBattleCamZoom, 350) - EVT_CALL(BattleCamTargetActor, ACTOR_GENERAL) - EVT_CALL(MoveBattleCamOver, 40) - EVT_WAIT(40) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim03) - EVT_CALL(EndActorSpeech, ACTOR_GENERAL, PRT_MAIN, -1, -1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(BattleCamTargetActor, ACTOR_WAVE_A) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(20) - EVT_SET(LVar0, 2) - EVT_LOOP(15) - EVT_CALL(RandInt, 3, LVar1) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_SET(LVar1, ANIM_TankGuy_Anim08) - EVT_CASE_EQ(1) - EVT_SET(LVar1, ANIM_TankGuy_Anim09) - EVT_CASE_EQ(2) - EVT_SET(LVar1, ANIM_TankGuy_Anim0A) - EVT_CASE_DEFAULT - EVT_SET(LVar1, ANIM_TankGuy_Anim06) - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_WAVE_A, LVar0, LVar1) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim04) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) - EVT_SET(LVar0, 2) - EVT_LOOP(15) - EVT_CALL(SetAnimation, ACTOR_WAVE_A, LVar0, ANIM_TankGuy_Anim01) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_CALL(FreezeBattleState, FALSE) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Wait(30) + Call(SetActorYaw, ACTOR_GENERAL, 180) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim03) + Call(SetActorVar, ACTOR_SELF, AVAR_Tank_UsingBulbAttack, FALSE) + Wait(10) + Call(SetDarknessMode, BTL_DARKNESS_MODE_1) + Call(SetActorVar, ACTOR_SELF, AVAR_Tank_ModulateDarkness, TRUE) + Exec(N(EVS_ManageDarkness)) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_GENERAL) + Call(MoveBattleCamOver, 40) + Wait(20) + Call(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_1, FALSE) + Call(EndActorSpeech, ACTOR_GENERAL, PRT_MAIN, -1, -1) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) + Call(SetActorYaw, ACTOR_GENERAL, 0) + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Wait(30) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) + Call(LoadBattleSection, BTL_AREA_OMO2_5) + Call(SummonEnemy, Ref(N(ShySquadReduxFormation)), TRUE) + Wait(155) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(SetBattleCamZoom, 350) + Call(BattleCamTargetActor, ACTOR_GENERAL) + Call(MoveBattleCamOver, 40) + Wait(40) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim03) + Call(EndActorSpeech, ACTOR_GENERAL, PRT_MAIN, -1, -1) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(SetBattleCamZoom, 300) + Call(BattleCamTargetActor, ACTOR_WAVE_A) + Call(MoveBattleCamOver, 30) + Wait(20) + Set(LVar0, 2) + Loop(15) + Call(RandInt, 3, LVar1) + Switch(LVar1) + CaseEq(0) + Set(LVar1, ANIM_TankGuy_Anim08) + CaseEq(1) + Set(LVar1, ANIM_TankGuy_Anim09) + CaseEq(2) + Set(LVar1, ANIM_TankGuy_Anim0A) + CaseDefault + Set(LVar1, ANIM_TankGuy_Anim06) + EndSwitch + Call(SetAnimation, ACTOR_WAVE_A, LVar0, LVar1) + Add(LVar0, 1) + EndLoop + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim04) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) + Set(LVar0, 2) + Loop(15) + Call(SetAnimation, ACTOR_WAVE_A, LVar0, ANIM_TankGuy_Anim01) + Add(LVar0, 1) + EndLoop + Call(FreezeBattleState, FALSE) + Return + End }; EvtScript N(EVS_BeginWave_Tank) = { - EVT_CALL(EnableBattleStatusBar, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_GENERAL) - EVT_CALL(MoveBattleCamOver, 60) - EVT_WAIT(60) - EVT_CALL(ActorSpeak, MSG_CH4_0071, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim00, ANIM_GeneralGuy_Anim00) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim05) - EVT_CALL(EndActorSpeech, ACTOR_GENERAL, PRT_MAIN, -1, -1) - EVT_CALL(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_NO_STATUS_ANIMS, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_BULB, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_TANK, PRT_2, ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(SetActorFlagBits, ACTOR_TANK, ACTOR_FLAG_NO_HEALTH_BAR, FALSE) - EVT_CALL(HPBarToHome, ACTOR_TANK) - EVT_CALL(SetActorVar, ACTOR_GENERAL, AVAR_General_DoingTankPhase, TRUE) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) - EVT_CALL(SetEnemyTargetOffset, ACTOR_SELF, PRT_2, 0, 35) - EVT_CALL(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(PlayModelAnimation, 0, EVT_PTR(AS_ToyTank_CloseHatch)) - EVT_CALL(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_CLOSE_HATCH) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(EnableBattleStatusBar, TRUE) - EVT_CALL(FreezeBattleState, FALSE) - EVT_RETURN - EVT_END + Call(EnableBattleStatusBar, FALSE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_GENERAL) + Call(MoveBattleCamOver, 60) + Wait(60) + Call(ActorSpeak, MSG_CH4_0071, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim00, ANIM_GeneralGuy_Anim00) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim05) + Call(EndActorSpeech, ACTOR_GENERAL, PRT_MAIN, -1, -1) + Call(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_NO_STATUS_ANIMS, FALSE) + Call(SetPartFlagBits, ACTOR_BULB, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_TANK, PRT_2, ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(SetActorFlagBits, ACTOR_TANK, ACTOR_FLAG_NO_HEALTH_BAR, FALSE) + Call(HPBarToHome, ACTOR_TANK) + Call(SetActorVar, ACTOR_GENERAL, AVAR_General_DoingTankPhase, TRUE) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim02) + Call(SetEnemyTargetOffset, ACTOR_SELF, PRT_2, 0, 35) + Call(SetPartFlagBits, ACTOR_GENERAL, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(PlayModelAnimation, 0, Ref(AS_ToyTank_CloseHatch)) + Call(PlaySoundAtPart, ACTOR_GENERAL, PRT_MAIN, SOUND_TOY_TANK_CLOSE_HATCH) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Call(EnableBattleStatusBar, TRUE) + Call(FreezeBattleState, FALSE) + Return + End }; EvtScript N(EVS_Death) = { - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_TANK, SOUND_TOY_TANK_FALL_APART) - EVT_CALL(PlayModelAnimation, 0, EVT_PTR(AS_ToyTank_FallApart)) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Tank_BulbGlowEffect, LVar0) - EVT_IF_NE(LVar0, NULL) - EVT_CALL(RemoveEffect, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Tank_BulbGlowEffect, NULL) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Tank_UsingBulbAttack, FALSE) - EVT_END_IF - EVT_WAIT(45) - EVT_WAIT(10) - EVT_CALL(UseIdleAnimation, ACTOR_GENERAL, FALSE) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim05) - EVT_WAIT(15) - EVT_PLAY_EFFECT(EFFECT_EXPLOSION, 2, 102, 40, 0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Tank_ShouldTetherGeneral, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_GENERAL) - EVT_CALL(MoveBattleCamOver, 60) - EVT_CALL(PlaySoundAtActor, ACTOR_TANK, SOUND_TOY_TANK_EXPLODE) - EVT_CALL(SetActorJumpGravity, ACTOR_GENERAL, EVT_FLOAT(0.6)) - EVT_CALL(SetActorDispOffset, ACTOR_GENERAL, 0, 0, 0) - EVT_CALL(GetActorPos, ACTOR_GENERAL, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim05) - EVT_THREAD - EVT_WAIT(25) - EVT_CALL(SetAnimatedModelRootPosition, 0, 380, 0, 0) - EVT_END_THREAD - EVT_CALL(SetGoalPos, ACTOR_GENERAL, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_GENERAL, 50, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_GENERAL, SOUND_ACTOR_COLLAPSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim10) - EVT_CALL(GetActorPos, ACTOR_GENERAL, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 18) - EVT_CALL(ForceHomePos, ACTOR_GENERAL, LVar0, LVar1, LVar2) - EVT_CALL(SetEnemyHP, ACTOR_GENERAL, 1) - EVT_CALL(SetPartDispOffset, ACTOR_GENERAL, PRT_MAIN, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_GENERAL, 0, 0, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_GENERAL, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_GENERAL, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_GENERAL, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_GENERAL, 12, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim07) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 6, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_GENERAL, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_ADD(LVar1, 30) - EVT_PLAY_EFFECT(EFFECT_STARS_ORBITING, 0, LVar0, LVar1, LVar2, 20, 4, LVarF, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_GENERAL, SOUND_KNOCKOUT_CHIRPING) - EVT_CALL(DropStarPoints, ACTOR_GENERAL) - EVT_WAIT(30) - EVT_CALL(RemoveEffect, LVarF) - EVT_CALL(ActorExists, ACTOR_BULB, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_CALL(SetActorFlagBits, ACTOR_BULB, ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_END_IF - EVT_CALL(SetActorFlagBits, ACTOR_GENERAL, ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Wait(15) + Call(PlaySoundAtActor, ACTOR_TANK, SOUND_TOY_TANK_FALL_APART) + Call(PlayModelAnimation, 0, Ref(AS_ToyTank_FallApart)) + Call(GetActorVar, ACTOR_SELF, AVAR_Tank_BulbGlowEffect, LVar0) + IfNe(LVar0, NULL) + Call(RemoveEffect, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_Tank_BulbGlowEffect, NULL) + Call(SetActorVar, ACTOR_SELF, AVAR_Tank_UsingBulbAttack, FALSE) + EndIf + Wait(45) + Wait(10) + Call(UseIdleAnimation, ACTOR_GENERAL, FALSE) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim05) + Wait(15) + PlayEffect(EFFECT_EXPLOSION, 2, 102, 40, 0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Tank_ShouldTetherGeneral, FALSE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_GENERAL) + Call(MoveBattleCamOver, 60) + Call(PlaySoundAtActor, ACTOR_TANK, SOUND_TOY_TANK_EXPLODE) + Call(SetActorJumpGravity, ACTOR_GENERAL, Float(0.6)) + Call(SetActorDispOffset, ACTOR_GENERAL, 0, 0, 0) + Call(GetActorPos, ACTOR_GENERAL, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim05) + Thread + Wait(25) + Call(SetAnimatedModelRootPosition, 0, 380, 0, 0) + EndThread + Call(SetGoalPos, ACTOR_GENERAL, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_GENERAL, 50, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_GENERAL, SOUND_ACTOR_COLLAPSE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim10) + Call(GetActorPos, ACTOR_GENERAL, LVar0, LVar1, LVar2) + Add(LVar0, 18) + Call(ForceHomePos, ACTOR_GENERAL, LVar0, LVar1, LVar2) + Call(SetEnemyHP, ACTOR_GENERAL, 1) + Call(SetPartDispOffset, ACTOR_GENERAL, PRT_MAIN, 0, 0, 0) + Call(SetActorRotation, ACTOR_GENERAL, 0, 0, 0) + Call(SetActorJumpGravity, ACTOR_GENERAL, Float(1.0)) + Call(GetActorPos, ACTOR_GENERAL, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_GENERAL, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_GENERAL, 12, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim07) + Call(ShakeCam, CAM_BATTLE, 0, 6, Float(1.0)) + Call(GetActorPos, ACTOR_GENERAL, LVar0, LVar1, LVar2) + Add(LVar0, 10) + Add(LVar1, 30) + PlayEffect(EFFECT_STARS_ORBITING, 0, LVar0, LVar1, LVar2, 20, 4, LVarF, 0) + Call(PlaySoundAtActor, ACTOR_GENERAL, SOUND_KNOCKOUT_CHIRPING) + Call(DropStarPoints, ACTOR_GENERAL) + Wait(30) + Call(RemoveEffect, LVarF) + Call(ActorExists, ACTOR_BULB, LVar0) + IfNe(LVar0, FALSE) + Call(SetActorFlagBits, ACTOR_BULB, ACTOR_FLAG_NO_DMG_APPLY, TRUE) + EndIf + Call(SetActorFlagBits, ACTOR_GENERAL, ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Call(RemoveActor, ACTOR_SELF) + Return + End }; EvtScript N(EVS_ManageDarkness) = { - EVT_LABEL(0) - EVT_CALL(ActorExists, ACTOR_SELF, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetDarknessStatus, LVar0, LVar1) - EVT_IF_EQ(LVar0, SCREEN_LAYER_BACK) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Tank_ModulateDarkness, LVar0) - EVT_IF_FALSE(LVar0) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Tank_DarknessAmt, LVar1) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_EQ(LVar0, PARTNER_WATT) - EVT_EXEC_WAIT(N(EVS_DecreaseDarknessAmt)) - EVT_ELSE - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Tank_UsingBulbAttack, LVar0) - EVT_IF_TRUE(LVar0) - EVT_EXEC_WAIT(N(EVS_DecreaseDarknessAmt)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_IncreaseDarknessAmt)) - EVT_END_IF - EVT_END_IF - EVT_CALL(N(SetDarknessParams), LVar1) - EVT_LABEL(10) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(ActorExists, ACTOR_SELF, LVar0) + IfEq(LVar0, FALSE) + Return + EndIf + Call(GetDarknessStatus, LVar0, LVar1) + IfEq(LVar0, SCREEN_LAYER_BACK) + Goto(10) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Tank_ModulateDarkness, LVar0) + IfFalse(LVar0) + Goto(10) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Tank_DarknessAmt, LVar1) + Call(GetCurrentPartnerID, LVar0) + IfEq(LVar0, PARTNER_WATT) + ExecWait(N(EVS_DecreaseDarknessAmt)) + Else + Call(GetActorVar, ACTOR_SELF, AVAR_Tank_UsingBulbAttack, LVar0) + IfTrue(LVar0) + ExecWait(N(EVS_DecreaseDarknessAmt)) + Else + ExecWait(N(EVS_IncreaseDarknessAmt)) + EndIf + EndIf + Call(N(SetDarknessParams), LVar1) + Label(10) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_DecreaseDarknessAmt) = { - EVT_IF_NE(LVar1, 0) - EVT_SUB(LVar1, 5) - EVT_IF_LT(LVar1, 0) - EVT_SET(LVar1, 0) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Tank_DarknessAmt, LVar1) - EVT_END_IF - EVT_RETURN - EVT_END + IfNe(LVar1, 0) + Sub(LVar1, 5) + IfLt(LVar1, 0) + Set(LVar1, 0) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_Tank_DarknessAmt, LVar1) + EndIf + Return + End }; EvtScript N(EVS_IncreaseDarknessAmt) = { - EVT_IF_NE(LVar1, 215) - EVT_ADD(LVar1, 5) - EVT_IF_GT(LVar1, 215) - EVT_SET(LVar1, 215) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Tank_DarknessAmt, LVar1) - EVT_END_IF - EVT_RETURN - EVT_END + IfNe(LVar1, 215) + Add(LVar1, 5) + IfGt(LVar1, 215) + Set(LVar1, 215) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_Tank_DarknessAmt, LVar1) + EndIf + Return + End }; Vec3i N(SummonPos) = { 240, 0, 0 }; diff --git a/src/battle/area/omo2_1/actor/shy_squad.c b/src/battle/area/omo2_1/actor/shy_squad.c index 4379966073c..880e311fc2e 100644 --- a/src/battle/area/omo2_1/actor/shy_squad.c +++ b/src/battle/area/omo2_1/actor/shy_squad.c @@ -56,8 +56,8 @@ enum N(ActorPartIDs) { #define NUM_MEMBERS (1 + PRT_MEMBER_15 - PRT_MEMBER_01) #define LOOP_MEMBERS(idx) \ - EVT_SET(idx, PRT_MEMBER_01) \ - EVT_LOOP(NUM_MEMBERS) + Set(idx, PRT_MEMBER_01) \ + Loop(NUM_MEMBERS) enum N(ActorVars) { AVAR_SquadArrived = 0, @@ -351,1110 +351,1110 @@ s32 N(DefaultAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SquadArrived, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_BeenAttackedCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasBeenAttacked, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NumDefeated, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, 0) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, HOME_OFFSET_X, 50) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, HOME_OFFSET_Z, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_02, HOME_OFFSET_X, 50) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_02, HOME_OFFSET_Z, -40) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_03, HOME_OFFSET_X, 40) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_03, HOME_OFFSET_Z, 40) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_04, HOME_OFFSET_X, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_04, HOME_OFFSET_Z, 40) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_05, HOME_OFFSET_X, 30) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_05, HOME_OFFSET_Z, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_06, HOME_OFFSET_X, 40) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_06, HOME_OFFSET_Z, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_07, HOME_OFFSET_X, 30) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_07, HOME_OFFSET_Z, -40) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_08, HOME_OFFSET_X, 0) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_08, HOME_OFFSET_Z, 40) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_09, HOME_OFFSET_X, 10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_09, HOME_OFFSET_Z, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_10, HOME_OFFSET_X, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_10, HOME_OFFSET_Z, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_11, HOME_OFFSET_X, 10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_11, HOME_OFFSET_Z, -40) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_12, HOME_OFFSET_X, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_12, HOME_OFFSET_Z, -40) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_13, HOME_OFFSET_X, -20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_13, HOME_OFFSET_Z, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_14, HOME_OFFSET_X, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_14, HOME_OFFSET_Z, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_15, HOME_OFFSET_X, 0) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_15, HOME_OFFSET_Z, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, HIT_OFFSET_X, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, HIT_OFFSET_Z, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_02, HIT_OFFSET_X, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_02, HIT_OFFSET_Z, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_03, HIT_OFFSET_X, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_03, HIT_OFFSET_Z, 10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_04, HIT_OFFSET_X, 0) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_04, HIT_OFFSET_Z, 10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_05, HIT_OFFSET_X, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_05, HIT_OFFSET_Z, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_06, HIT_OFFSET_X, 30) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_06, HIT_OFFSET_Z, 0) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_07, HIT_OFFSET_X, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_07, HIT_OFFSET_Z, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_08, HIT_OFFSET_X, -20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_08, HIT_OFFSET_Z, 10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_09, HIT_OFFSET_X, -20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_09, HIT_OFFSET_Z, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_10, HIT_OFFSET_X, 0) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_10, HIT_OFFSET_Z, 0) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_11, HIT_OFFSET_X, -20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_11, HIT_OFFSET_Z, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_12, HIT_OFFSET_X, -20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_12, HIT_OFFSET_Z, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_13, HIT_OFFSET_X, -30) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_13, HIT_OFFSET_Z, 0) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_14, HIT_OFFSET_X, -20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_14, HIT_OFFSET_Z, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_15, HIT_OFFSET_X, -30) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_15, HIT_OFFSET_Z, 0) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, SWARM_OFFSET_X, -20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, SWARM_OFFSET_Z, 0) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_02, SWARM_OFFSET_X, 10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_02, SWARM_OFFSET_Z, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_03, SWARM_OFFSET_X, 0) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_03, SWARM_OFFSET_Z, -20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_04, SWARM_OFFSET_X, 0) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_04, SWARM_OFFSET_Z, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_05, SWARM_OFFSET_X, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_05, SWARM_OFFSET_Z, 10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_06, SWARM_OFFSET_X, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_06, SWARM_OFFSET_Z, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_07, SWARM_OFFSET_X, 10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_07, SWARM_OFFSET_Z, 10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_08, SWARM_OFFSET_X, 30) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_08, SWARM_OFFSET_Z, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_09, SWARM_OFFSET_X, -20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_09, SWARM_OFFSET_Z, -20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_10, SWARM_OFFSET_X, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_10, SWARM_OFFSET_Z, 0) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_11, SWARM_OFFSET_X, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_11, SWARM_OFFSET_Z, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_12, SWARM_OFFSET_X, 30) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_12, SWARM_OFFSET_Z, 10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_13, SWARM_OFFSET_X, -30) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_13, SWARM_OFFSET_Z, 10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_14, SWARM_OFFSET_X, -30) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_14, SWARM_OFFSET_Z, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_15, SWARM_OFFSET_X, -20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_15, SWARM_OFFSET_Z, 20) - EVT_CALL(RandInt, 100, LVar0) - EVT_ADD(LVar0, 190) - EVT_CALL(RandInt, 100, LVar2) - EVT_ADD(LVar2, -50) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_SquadArrived, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_BeenAttackedCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_HasBeenAttacked, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_NumDefeated, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, 0) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, HOME_OFFSET_X, 50) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, HOME_OFFSET_Z, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_02, HOME_OFFSET_X, 50) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_02, HOME_OFFSET_Z, -40) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_03, HOME_OFFSET_X, 40) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_03, HOME_OFFSET_Z, 40) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_04, HOME_OFFSET_X, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_04, HOME_OFFSET_Z, 40) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_05, HOME_OFFSET_X, 30) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_05, HOME_OFFSET_Z, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_06, HOME_OFFSET_X, 40) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_06, HOME_OFFSET_Z, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_07, HOME_OFFSET_X, 30) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_07, HOME_OFFSET_Z, -40) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_08, HOME_OFFSET_X, 0) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_08, HOME_OFFSET_Z, 40) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_09, HOME_OFFSET_X, 10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_09, HOME_OFFSET_Z, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_10, HOME_OFFSET_X, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_10, HOME_OFFSET_Z, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_11, HOME_OFFSET_X, 10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_11, HOME_OFFSET_Z, -40) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_12, HOME_OFFSET_X, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_12, HOME_OFFSET_Z, -40) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_13, HOME_OFFSET_X, -20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_13, HOME_OFFSET_Z, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_14, HOME_OFFSET_X, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_14, HOME_OFFSET_Z, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_15, HOME_OFFSET_X, 0) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_15, HOME_OFFSET_Z, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, HIT_OFFSET_X, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, HIT_OFFSET_Z, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_02, HIT_OFFSET_X, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_02, HIT_OFFSET_Z, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_03, HIT_OFFSET_X, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_03, HIT_OFFSET_Z, 10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_04, HIT_OFFSET_X, 0) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_04, HIT_OFFSET_Z, 10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_05, HIT_OFFSET_X, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_05, HIT_OFFSET_Z, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_06, HIT_OFFSET_X, 30) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_06, HIT_OFFSET_Z, 0) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_07, HIT_OFFSET_X, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_07, HIT_OFFSET_Z, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_08, HIT_OFFSET_X, -20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_08, HIT_OFFSET_Z, 10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_09, HIT_OFFSET_X, -20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_09, HIT_OFFSET_Z, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_10, HIT_OFFSET_X, 0) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_10, HIT_OFFSET_Z, 0) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_11, HIT_OFFSET_X, -20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_11, HIT_OFFSET_Z, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_12, HIT_OFFSET_X, -20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_12, HIT_OFFSET_Z, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_13, HIT_OFFSET_X, -30) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_13, HIT_OFFSET_Z, 0) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_14, HIT_OFFSET_X, -20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_14, HIT_OFFSET_Z, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_15, HIT_OFFSET_X, -30) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_15, HIT_OFFSET_Z, 0) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, SWARM_OFFSET_X, -20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, SWARM_OFFSET_Z, 0) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_02, SWARM_OFFSET_X, 10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_02, SWARM_OFFSET_Z, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_03, SWARM_OFFSET_X, 0) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_03, SWARM_OFFSET_Z, -20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_04, SWARM_OFFSET_X, 0) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_04, SWARM_OFFSET_Z, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_05, SWARM_OFFSET_X, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_05, SWARM_OFFSET_Z, 10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_06, SWARM_OFFSET_X, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_06, SWARM_OFFSET_Z, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_07, SWARM_OFFSET_X, 10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_07, SWARM_OFFSET_Z, 10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_08, SWARM_OFFSET_X, 30) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_08, SWARM_OFFSET_Z, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_09, SWARM_OFFSET_X, -20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_09, SWARM_OFFSET_Z, -20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_10, SWARM_OFFSET_X, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_10, SWARM_OFFSET_Z, 0) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_11, SWARM_OFFSET_X, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_11, SWARM_OFFSET_Z, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_12, SWARM_OFFSET_X, 30) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_12, SWARM_OFFSET_Z, 10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_13, SWARM_OFFSET_X, -30) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_13, SWARM_OFFSET_Z, 10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_14, SWARM_OFFSET_X, -30) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_14, SWARM_OFFSET_Z, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_15, SWARM_OFFSET_X, -20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_15, SWARM_OFFSET_Z, 20) + Call(RandInt, 100, LVar0) + Add(LVar0, 190) + Call(RandInt, 100, LVar2) + Add(LVar2, -50) + Call(SetActorPos, ACTOR_SELF, LVar0, 0, LVar2) LOOP_MEMBERS(LVar1) - EVT_CALL(RandInt, 100, LVar0) - EVT_ADD(LVar0, 190) - EVT_CALL(RandInt, 100, LVar2) - EVT_ADD(LVar2, -50) - EVT_CALL(SetPartPos, ACTOR_SELF, LVar1, LVar0, 0, LVar2) - EVT_ADD(LVar1, 1) - EVT_END_LOOP + Call(RandInt, 100, LVar0) + Add(LVar0, 190) + Call(RandInt, 100, LVar2) + Add(LVar2, -50) + Call(SetPartPos, ACTOR_SELF, LVar1, LVar0, 0, LVar2) + Add(LVar1, 1) + EndLoop LOOP_MEMBERS(LVar0) - EVT_CALL(CreatePartShadow, ACTOR_SELF, LVar0) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_CALL(SetActorSize, ACTOR_SELF, EVT_IGNORE_ARG, 72) - EVT_CALL(SetPartSize, ACTOR_SELF, PRT_MAIN, 24, 24) - EVT_RETURN - EVT_END + Call(CreatePartShadow, ACTOR_SELF, LVar0) + Add(LVar0, 1) + EndLoop + Call(SetActorSize, ACTOR_SELF, EVT_IGNORE_ARG, 72) + Call(SetPartSize, ACTOR_SELF, PRT_MAIN, 24, 24) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_SquadArrived, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SquadArrived, TRUE) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) + Call(GetActorVar, ACTOR_SELF, AVAR_SquadArrived, LVar0) + IfEq(LVar0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_SquadArrived, TRUE) LOOP_MEMBERS(LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, ANIM_ShySquadGuy_Anim03) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_CALL(SetHomePos, ACTOR_SELF, 65, 0, -10) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_SET(LVar1, ANIM_ShySquadGuy_Anim03) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SHY_GUY_SCREAMS1) - EVT_EXEC_WAIT(N(EVS_MoveSquadHome)) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamZoom, 360) - EVT_CALL(SetBattleCamTarget, 72, 45, 0) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_CALL(EnableBattleStatusBar, FALSE) - EVT_CALL(ActorSpeak, MSG_CH4_0065, ACTOR_SELF, PRT_MEMBER_08, ANIM_ShySquadGuy_Anim11, ANIM_ShySquadGuy_Anim11) + Call(SetAnimation, ACTOR_SELF, LVar0, ANIM_ShySquadGuy_Anim03) + Add(LVar0, 1) + EndLoop + Call(SetHomePos, ACTOR_SELF, 65, 0, -10) + Call(HPBarToHome, ACTOR_SELF) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Set(LVar1, ANIM_ShySquadGuy_Anim03) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SHY_GUY_SCREAMS1) + ExecWait(N(EVS_MoveSquadHome)) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamZoom, 360) + Call(SetBattleCamTarget, 72, 45, 0) + Call(MoveBattleCamOver, 30) + Wait(30) + Call(EnableBattleStatusBar, FALSE) + Call(ActorSpeak, MSG_CH4_0065, ACTOR_SELF, PRT_MEMBER_08, ANIM_ShySquadGuy_Anim11, ANIM_ShySquadGuy_Anim11) LOOP_MEMBERS(LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, ANIM_ShySquadGuy_Anim0A) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_CALL(EndActorSpeech, ACTOR_SELF, PRT_MAIN, -1, -1) - EVT_CALL(EnableBattleStatusBar, TRUE) + Call(SetAnimation, ACTOR_SELF, LVar0, ANIM_ShySquadGuy_Anim0A) + Add(LVar0, 1) + EndLoop + Call(EndActorSpeech, ACTOR_SELF, PRT_MAIN, -1, -1) + Call(EnableBattleStatusBar, TRUE) LOOP_MEMBERS(LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, ANIM_ShySquadGuy_Anim01) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_END_IF - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HasBeenAttacked, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasBeenAttacked, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_BeenAttackedCount, LVar0) - EVT_ADD(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_BeenAttackedCount, LVar0) - EVT_IF_GE(LVar0, 2) - EVT_CALL(GetActorVar, ACTOR_GENERAL, AVAR_General_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AVAR_GeneralFlag_SquadFled) - EVT_CALL(SetActorVar, ACTOR_GENERAL, AVAR_General_Flags, LVar0) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, LVar0, ANIM_ShySquadGuy_Anim01) + Add(LVar0, 1) + EndLoop + EndIf + CaseEq(PHASE_ENEMY_BEGIN) + Call(GetActorVar, ACTOR_SELF, AVAR_HasBeenAttacked, LVar0) + IfNe(LVar0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_HasBeenAttacked, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_BeenAttackedCount, LVar0) + Add(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_BeenAttackedCount, LVar0) + IfGe(LVar0, 2) + Call(GetActorVar, ACTOR_GENERAL, AVAR_General_Flags, LVar0) + BitwiseOrConst(LVar0, AVAR_GeneralFlag_SquadFled) + Call(SetActorVar, ACTOR_GENERAL, AVAR_General_Flags, LVar0) + ExecWait(N(EVS_Flee)) + Return + EndIf + EndIf + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_MoveMemberToPos) = { - EVT_SET(LVarA, PRT_MEMBER_01) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVarB) - EVT_ADD(LVarA, LVarB) - EVT_IF_LT(LVar0, LVarA) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPartOffset, ACTOR_SELF, LVar0, LVar6, 0, LVar7) - EVT_IF_LT(LVar6, LVar2) - EVT_CALL(SetPartYaw, ACTOR_SELF, LVar0, 180) - EVT_ELSE - EVT_CALL(SetPartYaw, ACTOR_SELF, LVar0, 0) - EVT_END_IF - EVT_CALL(GetDist2D, LVar9, LVar6, LVar7, LVar2, LVar3) - EVT_IF_GE(LVar9, LVar4) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, LVar0, LVar4) - EVT_CALL(RunPartTo, ACTOR_SELF, LVar0, LVar2, 0, LVar3, LVar5) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVarA, PRT_MEMBER_01) + Call(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVarB) + Add(LVarA, LVarB) + IfLt(LVar0, LVarA) + Return + EndIf + Call(GetPartOffset, ACTOR_SELF, LVar0, LVar6, 0, LVar7) + IfLt(LVar6, LVar2) + Call(SetPartYaw, ACTOR_SELF, LVar0, 180) + Else + Call(SetPartYaw, ACTOR_SELF, LVar0, 0) + EndIf + Call(GetDist2D, LVar9, LVar6, LVar7, LVar2, LVar3) + IfGe(LVar9, LVar4) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(SetPartMoveSpeed, ACTOR_SELF, LVar0, LVar4) + Call(RunPartTo, ACTOR_SELF, LVar0, LVar2, 0, LVar3, LVar5) + EndIf + Return + End }; EvtScript N(EVS_MoveSquadHome) = { LOOP_MEMBERS(LVar0) - EVT_THREAD - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar2, LVar4, LVar3) - EVT_CALL(GetPartMovementVar, ACTOR_SELF, LVar0, HOME_OFFSET_X, LVar4) - EVT_ADD(LVar2, LVar4) - EVT_CALL(GetPartMovementVar, ACTOR_SELF, LVar0, HOME_OFFSET_Z, LVar4) - EVT_ADD(LVar3, LVar4) - EVT_SET(LVar4, EVT_FLOAT(6.0)) - EVT_SET(LVar5, 0) - EVT_EXEC_WAIT(N(EVS_MoveMemberToPos)) - EVT_SET(LVarA, 2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVarB) - EVT_ADD(LVarA, LVarB) - EVT_IF_GE(LVar0, LVarA) - EVT_CALL(SetPartYaw, ACTOR_SELF, LVar0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, ANIM_ShySquadGuy_Anim01) - EVT_END_IF - EVT_END_THREAD - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVarD, LVarE, LVarF) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarD, LVarE, LVarF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, TRUE) - EVT_RETURN - EVT_END + Thread + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar2, LVar4, LVar3) + Call(GetPartMovementVar, ACTOR_SELF, LVar0, HOME_OFFSET_X, LVar4) + Add(LVar2, LVar4) + Call(GetPartMovementVar, ACTOR_SELF, LVar0, HOME_OFFSET_Z, LVar4) + Add(LVar3, LVar4) + Set(LVar4, Float(6.0)) + Set(LVar5, 0) + ExecWait(N(EVS_MoveMemberToPos)) + Set(LVarA, 2) + Call(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVarB) + Add(LVarA, LVarB) + IfGe(LVar0, LVarA) + Call(SetPartYaw, ACTOR_SELF, LVar0, 0) + Call(SetAnimation, ACTOR_SELF, LVar0, ANIM_ShySquadGuy_Anim01) + EndIf + EndThread + Add(LVar0, 1) + EndLoop + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVarD, LVarE, LVarF) + Call(SetGoalPos, ACTOR_SELF, LVarD, LVarE, LVarF) + Call(RunToGoal, ACTOR_SELF, 0, TRUE) + Return + End }; EvtScript N(EVS_HitReaction) = { - EVT_SET_CONST(LVar0, PRT_MEMBER_15) - EVT_EXEC_WAIT(N(EVS_MemberHitReaction)) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MEMBER_15) + ExecWait(N(EVS_MemberHitReaction)) + Return + End }; EvtScript N(EVS_MemberHitReaction) = { - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_SET(LVar2, LVar0) - EVT_CALL(GetDamageIntensity) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(DAMAGE_INTENSITY_LIGHT) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 8, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 4, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 10, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 4, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 5, 0) - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(4) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(10) - EVT_CASE_EQ(DAMAGE_INTENSITY_MEDIUM) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 4, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 20, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 10, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 22, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 10, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 14, 0) - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 7, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(6) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(10) - EVT_CASE_EQ(DAMAGE_INTENSITY_HEAVY) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 6, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 22, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 12, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 25, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 12, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 17, 0) - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 10, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(6) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 4, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(10) - EVT_CASE_EQ(DAMAGE_INTENSITY_EXTREME) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 8, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 24, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 14, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 28, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 14, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 19, 0) - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 14, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(6) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 5, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 2, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(10) - EVT_CASE_EQ(DAMAGE_INTENSITY_UNUSED) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 5, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 10, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 28, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 16, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 32, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 16, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 21, 0) - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 16, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(6) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 7, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(10) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Set(LVar2, LVar0) + Call(GetDamageIntensity) + Switch(LVar0) + CaseEq(DAMAGE_INTENSITY_LIGHT) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 1, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 3, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 8, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 4, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 10, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 4, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 5, 0) + Wait(1) + Loop(2) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 3, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(1) + EndLoop + Loop(4) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 1, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(1) + EndLoop + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(10) + CaseEq(DAMAGE_INTENSITY_MEDIUM) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 1, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 4, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 20, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 10, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 22, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 10, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 14, 0) + Wait(1) + Loop(2) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 7, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(1) + EndLoop + Loop(6) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 3, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(1) + EndLoop + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(10) + CaseEq(DAMAGE_INTENSITY_HEAVY) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 1, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 6, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 22, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 12, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 25, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 12, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 17, 0) + Wait(1) + Loop(2) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 10, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(1) + EndLoop + Loop(6) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 4, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(1) + EndLoop + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(10) + CaseEq(DAMAGE_INTENSITY_EXTREME) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 3, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 8, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 24, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 14, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 28, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 14, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 19, 0) + Wait(1) + Loop(2) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 14, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(1) + EndLoop + Loop(6) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 5, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(1) + EndLoop + Loop(2) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 2, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(1) + EndLoop + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(10) + CaseEq(DAMAGE_INTENSITY_UNUSED) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 5, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 10, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 28, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 16, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 32, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 16, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 21, 0) + Wait(1) + Loop(2) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 16, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(1) + EndLoop + Loop(6) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 7, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(1) + EndLoop + Loop(2) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 3, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(1) + EndLoop + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(10) + EndSwitch + Return + End }; EvtScript N(EVS_Shock) = { - EVT_SET_CONST(LVar0, PRT_MEMBER_01) - EVT_LOOP(NUM_MEMBERS) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVarD) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVarE) - EVT_ADD(LVarD, 2) - EVT_ADD(LVarD, LVarE) - EVT_IF_GE(LVar0, LVarD) - EVT_THREAD - EVT_EXEC_WAIT(N(EVS_MemberShockReaction)) - EVT_END_THREAD - EVT_END_IF - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_WAIT(33) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MEMBER_01) + Loop(NUM_MEMBERS) + Call(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVarD) + Call(GetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVarE) + Add(LVarD, 2) + Add(LVarD, LVarE) + IfGe(LVar0, LVarD) + Thread + ExecWait(N(EVS_MemberShockReaction)) + EndThread + EndIf + Add(LVar0, 1) + EndLoop + Wait(33) + Return + End }; EvtScript N(EVS_MemberShockReaction) = { - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 0, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 4, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 16, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 8, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 20, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 8, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 12, 0) - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 6, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(6) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 2, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 0, 0) - EVT_WAIT(10) - EVT_RETURN - EVT_END + Call(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 0, 0) + Call(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 1, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 4, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 16, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 8, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 20, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 8, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 12, 0) + Wait(1) + Loop(2) + Call(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 6, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 0, 0) + Wait(1) + EndLoop + Loop(6) + Call(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 2, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 0, 0) + Wait(1) + EndLoop + Call(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 0, 0) + Wait(10) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVarF) - EVT_SWITCH(LVarF) - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasBeenAttacked, 1) - EVT_SET_CONST(LVar1, ANIM_ShySquadGuy_Anim0D) - EVT_EXEC_WAIT(N(EVS_ReduceCrowdSize)) - EVT_SET_CONST(LVar1, ANIM_ShySquadGuy_Anim0D) - EVT_EXEC_WAIT(N(EVS_HitReaction)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar1, ANIM_ShySquadGuy_Anim0D) - EVT_EXEC_WAIT(N(EVS_ReduceCrowdSize)) - EVT_SET_CONST(LVar1, ANIM_ShySquadGuy_Anim0D) - EVT_EXEC_WAIT(N(EVS_HitReaction)) - EVT_WAIT(10) - EVT_SET_CONST(LVar1, ANIM_ShySquadGuy_Anim0D) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasBeenAttacked, 1) - EVT_SET_CONST(LVar1, ANIM_ShySquadGuy_Anim0E) - EVT_EXEC_WAIT(N(EVS_ReduceCrowdSize)) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastEvent, ACTOR_SELF, LVarF) + Switch(LVarF) + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + Call(SetActorVar, ACTOR_SELF, AVAR_HasBeenAttacked, 1) + SetConst(LVar1, ANIM_ShySquadGuy_Anim0D) + ExecWait(N(EVS_ReduceCrowdSize)) + SetConst(LVar1, ANIM_ShySquadGuy_Anim0D) + ExecWait(N(EVS_HitReaction)) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar1, ANIM_ShySquadGuy_Anim0D) + ExecWait(N(EVS_ReduceCrowdSize)) + SetConst(LVar1, ANIM_ShySquadGuy_Anim0D) + ExecWait(N(EVS_HitReaction)) + Wait(10) + SetConst(LVar1, ANIM_ShySquadGuy_Anim0D) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_BURN_HIT) + Call(SetActorVar, ACTOR_SELF, AVAR_HasBeenAttacked, 1) + SetConst(LVar1, ANIM_ShySquadGuy_Anim0E) + ExecWait(N(EVS_ReduceCrowdSize)) LOOP_MEMBERS(LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, ANIM_ShySquadGuy_Anim0E) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_WAIT(20) + Call(SetAnimation, ACTOR_SELF, LVar0, ANIM_ShySquadGuy_Anim0E) + Add(LVar0, 1) + EndLoop + Wait(20) LOOP_MEMBERS(LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, ANIM_ShySquadGuy_Anim0F) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_WAIT(15) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasBeenAttacked, 1) - EVT_SET_CONST(LVar1, ANIM_ShySquadGuy_Anim0E) - EVT_EXEC_WAIT(N(EVS_ReduceCrowdSize)) + Call(SetAnimation, ACTOR_SELF, LVar0, ANIM_ShySquadGuy_Anim0F) + Add(LVar0, 1) + EndLoop + Wait(15) + CaseEq(EVENT_BURN_DEATH) + Call(SetActorVar, ACTOR_SELF, AVAR_HasBeenAttacked, 1) + SetConst(LVar1, ANIM_ShySquadGuy_Anim0E) + ExecWait(N(EVS_ReduceCrowdSize)) LOOP_MEMBERS(LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, ANIM_ShySquadGuy_Anim0E) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_WAIT(20) + Call(SetAnimation, ACTOR_SELF, LVar0, ANIM_ShySquadGuy_Anim0E) + Add(LVar0, 1) + EndLoop + Wait(20) LOOP_MEMBERS(LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, ANIM_ShySquadGuy_Anim0F) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_WAIT(15) - EVT_WAIT(10) - EVT_SET_CONST(LVar1, ANIM_ShySquadGuy_Anim0F) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasBeenAttacked, 1) - EVT_SET_CONST(LVar1, ANIM_ShySquadGuy_Anim0D) - EVT_EXEC_WAIT(N(EVS_ReduceCrowdSize)) - EVT_SET_CONST(LVar1, ANIM_ShySquadGuy_Anim0D) - EVT_EXEC_WAIT(N(EVS_HitReaction)) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar1, ANIM_ShySquadGuy_Anim0D) - EVT_EXEC_WAIT(N(EVS_ReduceCrowdSize)) - EVT_SET_CONST(LVar1, ANIM_ShySquadGuy_Anim0D) - EVT_EXEC_WAIT(N(EVS_HitReaction)) - EVT_SET_CONST(LVar1, ANIM_ShySquadGuy_Anim0D) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar1, ANIM_ShySquadGuy_Anim0D) - EVT_EXEC_WAIT(N(EVS_ReduceCrowdSize)) - EVT_SET_CONST(LVar1, ANIM_ShySquadGuy_Anim0D) - EVT_EXEC_WAIT(N(EVS_Shock)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_SET(LVar1, ANIM_ShySquadGuy_Anim03) - EVT_EXEC_WAIT(N(EVS_MoveSquadHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar1, ANIM_ShySquadGuy_Anim0D) - EVT_EXEC_WAIT(N(EVS_ReduceCrowdSize)) - EVT_SET_CONST(LVar1, ANIM_ShySquadGuy_Anim0D) - EVT_EXEC_WAIT(N(EVS_Shock)) - EVT_SET_CONST(LVar1, ANIM_ShySquadGuy_Anim0D) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_SPIKE_TAUNT) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CALL(GetBattleFlags, LVar2) - EVT_IF_FLAG(LVar2, BS_FLAGS1_PARTNER_ACTING) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar2, MOVE_SPOOK) - EVT_SET(LVar1, ANIM_ShySquadGuy_Anim01) - EVT_EXEC_WAIT(N(EVS_SetMembersAnimation)) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ShySquadGuy_Anim01) - EVT_EXEC_WAIT(N(EVS_HitReaction)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET(LVar1, ANIM_ShySquadGuy_Anim08) - EVT_EXEC_WAIT(N(EVS_SetMembersAnimation)) - EVT_WAIT(1000) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_SET(LVar1, ANIM_ShySquadGuy_Anim03) - EVT_EXEC_WAIT(N(EVS_MoveSquadHome)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ShySquadGuy_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_30) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ShySquadGuy_Anim0D) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(1000) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_SET(LVar1, ANIM_ShySquadGuy_Anim01) - EVT_EXEC_WAIT(N(EVS_SetMembersAnimation)) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, LVar0, ANIM_ShySquadGuy_Anim0F) + Add(LVar0, 1) + EndLoop + Wait(15) + Wait(10) + SetConst(LVar1, ANIM_ShySquadGuy_Anim0F) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + Call(SetActorVar, ACTOR_SELF, AVAR_HasBeenAttacked, 1) + SetConst(LVar1, ANIM_ShySquadGuy_Anim0D) + ExecWait(N(EVS_ReduceCrowdSize)) + SetConst(LVar1, ANIM_ShySquadGuy_Anim0D) + ExecWait(N(EVS_HitReaction)) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar1, ANIM_ShySquadGuy_Anim0D) + ExecWait(N(EVS_ReduceCrowdSize)) + SetConst(LVar1, ANIM_ShySquadGuy_Anim0D) + ExecWait(N(EVS_HitReaction)) + SetConst(LVar1, ANIM_ShySquadGuy_Anim0D) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar1, ANIM_ShySquadGuy_Anim0D) + ExecWait(N(EVS_ReduceCrowdSize)) + SetConst(LVar1, ANIM_ShySquadGuy_Anim0D) + ExecWait(N(EVS_Shock)) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetActorYaw, ACTOR_SELF, 180) + Set(LVar1, ANIM_ShySquadGuy_Anim03) + ExecWait(N(EVS_MoveSquadHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar1, ANIM_ShySquadGuy_Anim0D) + ExecWait(N(EVS_ReduceCrowdSize)) + SetConst(LVar1, ANIM_ShySquadGuy_Anim0D) + ExecWait(N(EVS_Shock)) + SetConst(LVar1, ANIM_ShySquadGuy_Anim0D) + ExecWait(N(EVS_Death)) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_SPIKE_TAUNT) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + Call(GetBattleFlags, LVar2) + IfFlag(LVar2, BS_FLAGS1_PARTNER_ACTING) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + IfEq(LVar2, MOVE_SPOOK) + Set(LVar1, ANIM_ShySquadGuy_Anim01) + ExecWait(N(EVS_SetMembersAnimation)) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndIf + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ShySquadGuy_Anim01) + ExecWait(N(EVS_HitReaction)) + EndCaseGroup + CaseEq(EVENT_BEGIN_AIR_LIFT) + Set(LVar1, ANIM_ShySquadGuy_Anim08) + ExecWait(N(EVS_SetMembersAnimation)) + Wait(1000) + CaseEq(EVENT_END_FIRST_STRIKE) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetActorYaw, ACTOR_SELF, 180) + Set(LVar1, ANIM_ShySquadGuy_Anim03) + ExecWait(N(EVS_MoveSquadHome)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ShySquadGuy_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_30) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ShySquadGuy_Anim0D) + ExecWait(EVS_Enemy_Hit) + Wait(1000) + CaseEq(EVENT_SCARE_AWAY) + CaseDefault + EndSwitch + Set(LVar1, ANIM_ShySquadGuy_Anim01) + ExecWait(N(EVS_SetMembersAnimation)) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_ReduceCrowdSize) = { - EVT_SET(LVar1, LVar1) - EVT_EXEC_WAIT(N(EVS_SetMembersAnimation)) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVar0) - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar1) - EVT_ADD(LVar0, LVar1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVar0) - EVT_LABEL(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_UpdateActorSize)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar1) - EVT_IF_GE(LVar1, 15) - EVT_EXEC_WAIT(N(EVS_UpdateActorSize)) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar0, PRT_MEMBER_01) - EVT_ADD(LVar0, LVar1) - EVT_IF_NE(LVar0, NUM_MEMBERS + 1) - EVT_THREAD - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_NO_STATUS_ANIMS, TRUE) - EVT_CALL(GetPartOffset, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(GetPartMovementVar, ACTOR_SELF, LVar0, HIT_OFFSET_X, LVar7) - EVT_CALL(GetPartMovementVar, ACTOR_SELF, LVar0, HIT_OFFSET_Z, LVar8) - EVT_ADD(LVar1, LVar7) - EVT_ADD(LVar3, LVar8) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVar0, EVT_FLOAT(0.5)) - EVT_CALL(JumpPartTo, ACTOR_SELF, LVar0, LVar1, 0, LVar3, 15, TRUE) - EVT_CALL(GetDamageSource, LVar5) - EVT_SWITCH(LVar5) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_SLAP_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_FAN_SMACK_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_SLAP_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_SLAP_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_FAN_SMACK_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_SLAP_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_SPIN_SMASH) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SET(LVar7, 0) - EVT_LOOP(24) - EVT_CALL(SetPartRotation, ACTOR_SELF, LVar0, 0, LVar7, 0) - EVT_ADD(LVar7, 30) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_DEATH) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0) - EVT_SET(LVar8, 0) - EVT_LOOP(12) - EVT_CALL(SetPartRotation, ACTOR_SELF, LVar0, LVar8, 0, 0) - EVT_ADD(LVar8, 8) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(RemovePartShadow, ACTOR_SELF, LVar0) - EVT_END_THREAD - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVar0) - EVT_SUB(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar0) - EVT_ADD(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar0) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVar1, LVar1) + ExecWait(N(EVS_SetMembersAnimation)) + Call(GetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVar0) + Call(GetLastDamage, ACTOR_SELF, LVar1) + Add(LVar0, LVar1) + Call(SetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVar0) + Label(0) + Call(GetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVar0) + IfEq(LVar0, 0) + ExecWait(N(EVS_UpdateActorSize)) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar1) + IfGe(LVar1, 15) + ExecWait(N(EVS_UpdateActorSize)) + Return + EndIf + Set(LVar0, PRT_MEMBER_01) + Add(LVar0, LVar1) + IfNe(LVar0, NUM_MEMBERS + 1) + Thread + Call(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_NO_STATUS_ANIMS, TRUE) + Call(GetPartOffset, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3) + Call(GetPartMovementVar, ACTOR_SELF, LVar0, HIT_OFFSET_X, LVar7) + Call(GetPartMovementVar, ACTOR_SELF, LVar0, HIT_OFFSET_Z, LVar8) + Add(LVar1, LVar7) + Add(LVar3, LVar8) + Call(SetPartJumpGravity, ACTOR_SELF, LVar0, Float(0.5)) + Call(JumpPartTo, ACTOR_SELF, LVar0, LVar1, 0, LVar3, 15, TRUE) + Call(GetDamageSource, LVar5) + Switch(LVar5) + CaseOrEq(DMG_SRC_NEXT_SLAP_LEFT) + CaseOrEq(DMG_SRC_NEXT_FAN_SMACK_LEFT) + CaseOrEq(DMG_SRC_LAST_SLAP_LEFT) + CaseOrEq(DMG_SRC_LAST_FAN_SMACK_LEFT) + CaseOrEq(DMG_SRC_NEXT_SLAP_RIGHT) + CaseOrEq(DMG_SRC_NEXT_FAN_SMACK_RIGHT) + CaseOrEq(DMG_SRC_LAST_SLAP_RIGHT) + CaseOrEq(DMG_SRC_LAST_FAN_SMACK_RIGHT) + CaseOrEq(DMG_SRC_SPIN_SMASH) + EndCaseGroup + CaseDefault + Set(LVar7, 0) + Loop(24) + Call(SetPartRotation, ACTOR_SELF, LVar0, 0, LVar7, 0) + Add(LVar7, 30) + Wait(1) + EndLoop + EndSwitch + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_DEATH) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0) + Set(LVar8, 0) + Loop(12) + Call(SetPartRotation, ACTOR_SELF, LVar0, LVar8, 0, 0) + Add(LVar8, 8) + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(RemovePartShadow, ACTOR_SELF, LVar0) + EndThread + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVar0) + Sub(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar0) + Add(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar0) + Goto(0) + Return + End }; EvtScript N(EVS_SetMembersAnimation) = { - EVT_SET(LVar2, PRT_MEMBER_01) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar0) - EVT_LOOP(NUM_MEMBERS) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar2, LVar1) - EVT_ELSE - EVT_SUB(LVar0, 1) - EVT_END_IF - EVT_ADD(LVar2, 1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVar2, PRT_MEMBER_01) + Call(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar0) + Loop(NUM_MEMBERS) + IfEq(LVar0, 0) + Call(SetAnimation, ACTOR_SELF, LVar2, LVar1) + Else + Sub(LVar0, 1) + EndIf + Add(LVar2, 1) + EndLoop + Return + End }; EvtScript N(EVS_DefeatMember) = { - EVT_IF_NE(LVar1, -1) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_WAIT(10) - EVT_END_IF - EVT_CALL(GetDamageSource, LVar5) - EVT_SWITCH(LVar5) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_SLAP_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_FAN_SMACK_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_SLAP_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_SLAP_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_FAN_SMACK_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_SLAP_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_SPIN_SMASH) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SET(LVar2, 0) - EVT_LOOP(24) - EVT_CALL(SetPartRotation, ACTOR_SELF, LVar0, 0, LVar2, 0) - EVT_ADD(LVar2, 30) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_SWITCH - EVT_SET(LVar3, 0) - EVT_LOOP(12) - EVT_CALL(SetPartRotation, ACTOR_SELF, LVar0, LVar3, 0, 0) - EVT_ADD(LVar3, 8) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(RemovePartShadow, ACTOR_SELF, LVar0) - EVT_RETURN - EVT_END + IfNe(LVar1, -1) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Wait(10) + EndIf + Call(GetDamageSource, LVar5) + Switch(LVar5) + CaseOrEq(DMG_SRC_NEXT_SLAP_LEFT) + CaseOrEq(DMG_SRC_NEXT_FAN_SMACK_LEFT) + CaseOrEq(DMG_SRC_LAST_SLAP_LEFT) + CaseOrEq(DMG_SRC_LAST_FAN_SMACK_LEFT) + CaseOrEq(DMG_SRC_NEXT_SLAP_RIGHT) + CaseOrEq(DMG_SRC_NEXT_FAN_SMACK_RIGHT) + CaseOrEq(DMG_SRC_LAST_SLAP_RIGHT) + CaseOrEq(DMG_SRC_LAST_FAN_SMACK_RIGHT) + CaseOrEq(DMG_SRC_SPIN_SMASH) + EndCaseGroup + CaseDefault + Set(LVar2, 0) + Loop(24) + Call(SetPartRotation, ACTOR_SELF, LVar0, 0, LVar2, 0) + Add(LVar2, 30) + Wait(1) + EndLoop + EndSwitch + Set(LVar3, 0) + Loop(12) + Call(SetPartRotation, ACTOR_SELF, LVar0, LVar3, 0, 0) + Add(LVar3, 8) + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(RemovePartShadow, ACTOR_SELF, LVar0) + Return + End }; EvtScript N(EVS_Death) = { - EVT_SET_CONST(LVar0, PRT_MEMBER_01) - EVT_LOOP(NUM_MEMBERS - 1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVar3) - EVT_ADD(LVar2, PRT_MEMBER_01) - EVT_ADD(LVar2, LVar3) - EVT_IF_GE(LVar0, LVar2) - EVT_THREAD - EVT_EXEC_WAIT(N(EVS_DefeatMember)) - EVT_END_THREAD - EVT_END_IF - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_SET(LVar0, PRT_MEMBER_15) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_SET(LVar2, 0) - EVT_LOOP(24) - EVT_CALL(SetPartRotation, ACTOR_SELF, LVar0, 0, LVar2, 0) - EVT_ADD(LVar2, 30) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetPartOffset, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_DEATH) - EVT_CALL(DropStarPoints, ACTOR_SELF) - EVT_SET(LVar3, 0) - EVT_LOOP(12) - EVT_CALL(SetPartRotation, ACTOR_SELF, LVar0, LVar3, 0, 0) - EVT_ADD(LVar3, 8) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(RemovePartShadow, ACTOR_SELF, LVar0) - EVT_EXEC_WAIT(N(EVS_NotifyNextWave)) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MEMBER_01) + Loop(NUM_MEMBERS - 1) + Call(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar2) + Call(GetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVar3) + Add(LVar2, PRT_MEMBER_01) + Add(LVar2, LVar3) + IfGe(LVar0, LVar2) + Thread + ExecWait(N(EVS_DefeatMember)) + EndThread + EndIf + Add(LVar0, 1) + EndLoop + Set(LVar0, PRT_MEMBER_15) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Set(LVar2, 0) + Loop(24) + Call(SetPartRotation, ACTOR_SELF, LVar0, 0, LVar2, 0) + Add(LVar2, 30) + Wait(1) + EndLoop + Call(GetPartOffset, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_DEATH) + Call(DropStarPoints, ACTOR_SELF) + Set(LVar3, 0) + Loop(12) + Call(SetPartRotation, ACTOR_SELF, LVar0, LVar3, 0, 0) + Add(LVar3, 8) + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(RemovePartShadow, ACTOR_SELF, LVar0) + ExecWait(N(EVS_NotifyNextWave)) + Call(RemoveActor, ACTOR_SELF) + Return + End }; EvtScript N(EVS_Attack_Swarm) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 350) - EVT_CALL(SetBattleCamOffsetZ, 34) - EVT_CALL(MoveBattleCamOver, 50) - EVT_SET(LVar0, 15) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar1) - EVT_SUB(LVar0, LVar1) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(1) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) - EVT_CASE_LT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SMALL_CROWD_WALK) - EVT_CASE_DEFAULT - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LARGE_CROWD_WALK) - EVT_END_SWITCH - EVT_SET(LVar0, PRT_MEMBER_01) - EVT_SET(LVar1, ANIM_ShySquadGuy_Anim03) - EVT_LOOP(NUM_MEMBERS) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar2, LVar5, LVar3) - EVT_CALL(GetPartMovementVar, ACTOR_SELF, LVar0, SWARM_OFFSET_X, LVar5) - EVT_ADD(LVar2, LVar5) - EVT_CALL(GetPartMovementVar, ACTOR_SELF, LVar0, SWARM_OFFSET_Z, LVar5) - EVT_ADD(LVar3, LVar5) - EVT_SETF(LVar4, EVT_FLOAT(6.0)) - EVT_SET(LVar5, 30) - EVT_EXEC_WAIT(N(EVS_MoveMemberToPos)) - EVT_END_THREAD - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(GetGoalPos, ACTOR_PLAYER, LVar2, LVar5, LVar3) - EVT_CALL(GetPartMovementVar, ACTOR_SELF, PRT_MEMBER_15, SWARM_OFFSET_X, LVar5) - EVT_ADD(LVar2, LVar5) - EVT_CALL(GetPartMovementVar, ACTOR_SELF, PRT_MEMBER_15, SWARM_OFFSET_Z, LVar5) - EVT_ADD(LVar3, LVar5) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar2, 0, LVar3) - EVT_CALL(RunToGoal, ACTOR_SELF, 30, TRUE) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 350) + Call(SetBattleCamOffsetZ, 34) + Call(MoveBattleCamOver, 50) + Set(LVar0, 15) + Call(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar1) + Sub(LVar0, LVar1) + Switch(LVar0) + CaseEq(1) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) + CaseLt(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SMALL_CROWD_WALK) + CaseDefault + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LARGE_CROWD_WALK) + EndSwitch + Set(LVar0, PRT_MEMBER_01) + Set(LVar1, ANIM_ShySquadGuy_Anim03) + Loop(NUM_MEMBERS) + Thread + Call(GetActorPos, ACTOR_PLAYER, LVar2, LVar5, LVar3) + Call(GetPartMovementVar, ACTOR_SELF, LVar0, SWARM_OFFSET_X, LVar5) + Add(LVar2, LVar5) + Call(GetPartMovementVar, ACTOR_SELF, LVar0, SWARM_OFFSET_Z, LVar5) + Add(LVar3, LVar5) + SetF(LVar4, Float(6.0)) + Set(LVar5, 30) + ExecWait(N(EVS_MoveMemberToPos)) + EndThread + Add(LVar0, 1) + EndLoop + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(GetGoalPos, ACTOR_PLAYER, LVar2, LVar5, LVar3) + Call(GetPartMovementVar, ACTOR_SELF, PRT_MEMBER_15, SWARM_OFFSET_X, LVar5) + Add(LVar2, LVar5) + Call(GetPartMovementVar, ACTOR_SELF, PRT_MEMBER_15, SWARM_OFFSET_Z, LVar5) + Add(LVar3, LVar5) + Call(SetGoalPos, ACTOR_SELF, LVar2, 0, LVar3) + Call(RunToGoal, ACTOR_SELF, 30, TRUE) LOOP_MEMBERS(LVar0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar4, LVar5, LVar6) - EVT_CALL(GetPartOffset, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3) - EVT_IF_LT(LVar1, LVar4) - EVT_CALL(SetPartYaw, ACTOR_SELF, LVar0, 180) - EVT_ELSE - EVT_CALL(SetPartYaw, ACTOR_SELF, LVar0, 0) - EVT_END_IF - EVT_CALL(RandInt, 100, LVar7) - EVT_IF_LT(LVar7, 50) - EVT_SET(LVar7, ANIM_ShySquadGuy_Anim0D) - EVT_ELSE - EVT_SET(LVar7, ANIM_ShySquadGuy_Anim11) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar7) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar0) - EVT_IF_LT(LVar0, 14) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 3, LVar0, LVar1, LVar2, 0, 0) - EVT_THREAD - EVT_LOOP(7) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 0, LVar0, LVar1, LVar2, 0, 0) - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, LVar0, LVar1, LVar2, 0, 0) - EVT_WAIT(2) - EVT_END_LOOP - EVT_END_THREAD - EVT_END_IF - EVT_WAIT(36) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_SET(LVar0, 15) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar1) - EVT_SUB(LVar0, LVar1) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(1) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) - EVT_CASE_LT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SMALL_CROWD_WALK) - EVT_CASE_DEFAULT - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LARGE_CROWD_WALK) - EVT_END_SWITCH - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_SET(LVar1, ANIM_ShySquadGuy_Anim04) - EVT_EXEC_WAIT(N(EVS_MoveSquadHome)) - EVT_SET(LVar1, ANIM_ShySquadGuy_Anim01) - EVT_EXEC_WAIT(N(EVS_SetMembersAnimation)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_EQ(HIT_RESULT_HIT_STATIC) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, DMG_SWARM, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SET(LVarE, 15) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar0) - EVT_SUB(LVarE, LVar0) - EVT_SET(LVarD, LVarE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LRAW_FIGHTING) - EVT_LOOP(LVarD) - EVT_IF_GT(LVarE, 1) - EVT_SET(LVar0, BS_FLAGS1_NICE_HIT) - EVT_ELSE - EVT_SET(LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_IF - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, DMG_SWARM, LVar0) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar1, LVar2, LVar3) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 0, LVar1, LVar2, LVar3, 0, 0) - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, LVar1, LVar2, LVar3, 0, 0) - EVT_WAIT(2) - EVT_END_THREAD - EVT_CALL(GetPlayerHP, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_SUB(LVarE, 1) - EVT_IF_EQ(LVarE, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(10) - EVT_END_LOOP - EVT_CALL(StopSound, SOUND_LRAW_FIGHTING) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(20) - EVT_SET(LVar0, 15) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar1) - EVT_SUB(LVar0, LVar1) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(1) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) - EVT_CASE_LT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SMALL_CROWD_WALK) - EVT_CASE_DEFAULT - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LARGE_CROWD_WALK) - EVT_END_SWITCH - EVT_SET(LVar1, ANIM_ShySquadGuy_Anim04) - EVT_EXEC_WAIT(N(EVS_MoveSquadHome)) - EVT_SET(LVar1, ANIM_ShySquadGuy_Anim01) - EVT_EXEC_WAIT(N(EVS_SetMembersAnimation)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(GetActorPos, ACTOR_PLAYER, LVar4, LVar5, LVar6) + Call(GetPartOffset, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3) + IfLt(LVar1, LVar4) + Call(SetPartYaw, ACTOR_SELF, LVar0, 180) + Else + Call(SetPartYaw, ACTOR_SELF, LVar0, 0) + EndIf + Call(RandInt, 100, LVar7) + IfLt(LVar7, 50) + Set(LVar7, ANIM_ShySquadGuy_Anim0D) + Else + Set(LVar7, ANIM_ShySquadGuy_Anim11) + EndIf + Call(SetAnimation, ACTOR_SELF, LVar0, LVar7) + Add(LVar0, 1) + EndLoop + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar0) + IfLt(LVar0, 14) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_LANDING_DUST, 3, LVar0, LVar1, LVar2, 0, 0) + Thread + Loop(7) + PlayEffect(EFFECT_LANDING_DUST, 0, LVar0, LVar1, LVar2, 0, 0) + Wait(2) + PlayEffect(EFFECT_LANDING_DUST, 1, LVar0, LVar1, LVar2, 0, 0) + Wait(2) + EndLoop + EndThread + EndIf + Wait(36) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Set(LVar0, 15) + Call(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar1) + Sub(LVar0, LVar1) + Switch(LVar0) + CaseEq(1) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) + CaseLt(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SMALL_CROWD_WALK) + CaseDefault + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LARGE_CROWD_WALK) + EndSwitch + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetActorYaw, ACTOR_SELF, 180) + Set(LVar1, ANIM_ShySquadGuy_Anim04) + ExecWait(N(EVS_MoveSquadHome)) + Set(LVar1, ANIM_ShySquadGuy_Anim01) + ExecWait(N(EVS_SetMembersAnimation)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + CaseEq(HIT_RESULT_HIT_STATIC) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, DMG_SWARM, BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Set(LVarE, 15) + Call(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar0) + Sub(LVarE, LVar0) + Set(LVarD, LVarE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LRAW_FIGHTING) + Loop(LVarD) + IfGt(LVarE, 1) + Set(LVar0, BS_FLAGS1_NICE_HIT) + Else + Set(LVar0, BS_FLAGS1_TRIGGER_EVENTS) + EndIf + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, DMG_SWARM, LVar0) + Thread + Call(GetActorPos, ACTOR_PLAYER, LVar1, LVar2, LVar3) + PlayEffect(EFFECT_LANDING_DUST, 0, LVar1, LVar2, LVar3, 0, 0) + Wait(2) + PlayEffect(EFFECT_LANDING_DUST, 1, LVar1, LVar2, LVar3, 0, 0) + Wait(2) + EndThread + Call(GetPlayerHP, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + Sub(LVarE, 1) + IfEq(LVarE, 0) + BreakLoop + EndIf + Wait(10) + EndLoop + Call(StopSound, SOUND_LRAW_FIGHTING) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Wait(20) + Set(LVar0, 15) + Call(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar1) + Sub(LVar0, LVar1) + Switch(LVar0) + CaseEq(1) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) + CaseLt(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SMALL_CROWD_WALK) + CaseDefault + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LARGE_CROWD_WALK) + EndSwitch + Set(LVar1, ANIM_ShySquadGuy_Anim04) + ExecWait(N(EVS_MoveSquadHome)) + Set(LVar1, ANIM_ShySquadGuy_Anim01) + ExecWait(N(EVS_SetMembersAnimation)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_EXEC_WAIT(N(EVS_Attack_Swarm)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_Attack_Swarm)) + Return + End }; EvtScript N(EVS_Flee) = { - EVT_CALL(EnableBattleStatusBar, FALSE) + Call(EnableBattleStatusBar, FALSE) LOOP_MEMBERS(LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, ANIM_ShySquadGuy_Anim08) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_CALL(ActorSpeak, MSG_CH4_0066, ACTOR_SELF, PRT_MAIN, -1, -1) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_SET(LVar0, PRT_MEMBER_01) - EVT_SET(LVar1, ANIM_ShySquadGuy_Anim08) - EVT_LOOP(NUM_MEMBERS - 1) - EVT_THREAD - EVT_CALL(RandInt, 100, LVar2) - EVT_ADD(LVar2, 190) - EVT_CALL(RandInt, 100, LVar3) - EVT_ADD(LVar3, -50) - EVT_SETF(LVar4, EVT_FLOAT(6.0)) - EVT_SET(LVar5, 0) - EVT_EXEC_WAIT(N(EVS_MoveMemberToPos)) - EVT_END_THREAD - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_THREAD - EVT_SET(LVar0, PRT_MEMBER_15) - EVT_SET(LVar1, ANIM_ShySquadGuy_Anim08) - EVT_SET(LVar2, 240) - EVT_SET(LVar3, 0) - EVT_SETF(LVar4, EVT_FLOAT(6.0)) - EVT_SET(LVar5, 0) - EVT_EXEC_WAIT(N(EVS_MoveMemberToPos)) - EVT_END_THREAD - EVT_SET(LVar0, 15) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar1) - EVT_SUB(LVar0, LVar1) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(1) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) - EVT_CASE_LT(4) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SHY_GUY_SCREAMS3) - EVT_CASE_DEFAULT - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SHY_GUY_SCREAMS2) - EVT_END_SWITCH - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(SetGoalPos, ACTOR_SELF, 240, 0, 0) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, TRUE) - EVT_WAIT(30) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_DISTANT_THUD) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 6, EVT_FLOAT(2.5)) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar0) - EVT_IF_LT(LVar0, 14) - EVT_CALL(ActorSpeak, MSG_CH4_0067, ACTOR_GENERAL, PRT_MAIN, -1, -1) - EVT_ELSE - EVT_CALL(ActorSpeak, MSG_CH4_0068, ACTOR_GENERAL, PRT_MAIN, -1, -1) - EVT_END_IF - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_DISTANT_THUD) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(2.0)) - EVT_WAIT(12) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_DISTANT_THUD) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(2.0)) - EVT_END_THREAD - EVT_CALL(EndActorSpeech, ACTOR_GENERAL, PRT_MAIN, -1, -1) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_WAIT(40) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_RUN_AWAY_BUILDUP) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_RUN_AWAY) - EVT_END_THREAD - EVT_SET(LVar0, PRT_MEMBER_01) - EVT_SET(LVar1, ANIM_ShySquadGuy_Anim08) - EVT_LOOP(NUM_MEMBERS - 1) - EVT_THREAD - EVT_CALL(RandInt, 100, LVar2) - EVT_ADD(LVar2, -290) - EVT_CALL(RandInt, 100, LVar3) - EVT_ADD(LVar3, -50) - EVT_SETF(LVar4, EVT_FLOAT(10.0)) - EVT_EXEC_WAIT(N(EVS_MoveMemberToPos)) - EVT_END_THREAD - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_THREAD - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, 30) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Flail) - EVT_LABEL(1) - EVT_WAIT(1) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) - EVT_ADD(LVar3, 10) - EVT_IF_GT(LVar0, LVar3) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Flail) - EVT_SET(LVar7, 0) - EVT_LOOP(40) - EVT_ADD(LVar7, 36) - EVT_IF_GE(LVar7, 360) - EVT_SUB(LVar7, 360) - EVT_END_IF - EVT_CALL(SetActorRotation, ACTOR_PLAYER, 0, LVar7, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(SetActorRotation, ACTOR_PLAYER, 0, 0, 0) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, PRT_MEMBER_15) - EVT_SET(LVar1, ANIM_ShySquadGuy_Anim08) - EVT_SET(LVar2, -240) - EVT_SET(LVar3, 0) - EVT_SETF(LVar4, EVT_FLOAT(10.0)) - EVT_SET(LVar5, 0) - EVT_EXEC_WAIT(N(EVS_MoveMemberToPos)) - EVT_END_THREAD - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, -240, 0, 0) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, TRUE) - EVT_EXEC_WAIT(N(EVS_NotifyNextWave)) - EVT_WAIT(10) - EVT_CALL(EnableBattleStatusBar, TRUE) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, LVar0, ANIM_ShySquadGuy_Anim08) + Add(LVar0, 1) + EndLoop + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 30) + Wait(30) + Call(ActorSpeak, MSG_CH4_0066, ACTOR_SELF, PRT_MAIN, -1, -1) + Call(HideHealthBar, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Set(LVar0, PRT_MEMBER_01) + Set(LVar1, ANIM_ShySquadGuy_Anim08) + Loop(NUM_MEMBERS - 1) + Thread + Call(RandInt, 100, LVar2) + Add(LVar2, 190) + Call(RandInt, 100, LVar3) + Add(LVar3, -50) + SetF(LVar4, Float(6.0)) + Set(LVar5, 0) + ExecWait(N(EVS_MoveMemberToPos)) + EndThread + Add(LVar0, 1) + EndLoop + Thread + Set(LVar0, PRT_MEMBER_15) + Set(LVar1, ANIM_ShySquadGuy_Anim08) + Set(LVar2, 240) + Set(LVar3, 0) + SetF(LVar4, Float(6.0)) + Set(LVar5, 0) + ExecWait(N(EVS_MoveMemberToPos)) + EndThread + Set(LVar0, 15) + Call(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar1) + Sub(LVar0, LVar1) + Switch(LVar0) + CaseEq(1) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) + CaseLt(4) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SHY_GUY_SCREAMS3) + CaseDefault + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SHY_GUY_SCREAMS2) + EndSwitch + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(SetGoalPos, ACTOR_SELF, 240, 0, 0) + Call(RunToGoal, ACTOR_SELF, 0, TRUE) + Wait(30) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_DISTANT_THUD) + Call(ShakeCam, CAM_BATTLE, 0, 6, Float(2.5)) + Call(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar0) + IfLt(LVar0, 14) + Call(ActorSpeak, MSG_CH4_0067, ACTOR_GENERAL, PRT_MAIN, -1, -1) + Else + Call(ActorSpeak, MSG_CH4_0068, ACTOR_GENERAL, PRT_MAIN, -1, -1) + EndIf + Thread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_DISTANT_THUD) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(2.0)) + Wait(12) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_DISTANT_THUD) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(2.0)) + EndThread + Call(EndActorSpeech, ACTOR_GENERAL, PRT_MAIN, -1, -1) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Wait(40) + Thread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_RUN_AWAY_BUILDUP) + Wait(20) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_RUN_AWAY) + EndThread + Set(LVar0, PRT_MEMBER_01) + Set(LVar1, ANIM_ShySquadGuy_Anim08) + Loop(NUM_MEMBERS - 1) + Thread + Call(RandInt, 100, LVar2) + Add(LVar2, -290) + Call(RandInt, 100, LVar3) + Add(LVar3, -50) + SetF(LVar4, Float(10.0)) + ExecWait(N(EVS_MoveMemberToPos)) + EndThread + Add(LVar0, 1) + EndLoop + Thread + Label(0) + Wait(1) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + IfGt(LVar0, 30) + Goto(0) + EndIf + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Flail) + Label(1) + Wait(1) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) + Add(LVar3, 10) + IfGt(LVar0, LVar3) + Goto(1) + EndIf + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Flail) + Set(LVar7, 0) + Loop(40) + Add(LVar7, 36) + IfGe(LVar7, 360) + Sub(LVar7, 360) + EndIf + Call(SetActorRotation, ACTOR_PLAYER, 0, LVar7, 0) + Wait(1) + EndLoop + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(SetActorRotation, ACTOR_PLAYER, 0, 0, 0) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + EndThread + Thread + Set(LVar0, PRT_MEMBER_15) + Set(LVar1, ANIM_ShySquadGuy_Anim08) + Set(LVar2, -240) + Set(LVar3, 0) + SetF(LVar4, Float(10.0)) + Set(LVar5, 0) + ExecWait(N(EVS_MoveMemberToPos)) + EndThread + Call(SetActorSpeed, ACTOR_SELF, Float(10.0)) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetGoalPos, ACTOR_SELF, -240, 0, 0) + Call(RunToGoal, ACTOR_SELF, 0, TRUE) + ExecWait(N(EVS_NotifyNextWave)) + Wait(10) + Call(EnableBattleStatusBar, TRUE) + Call(RemoveActor, ACTOR_SELF) + Return + End }; EvtScript N(EVS_NotifyNextWave) = { - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(SetActorVar, ACTOR_TANK, AVAR_Tank_SquadPhase, AVAL_SquadPhase_Defeated) - EVT_RETURN - EVT_END + Call(FreezeBattleState, TRUE) + Call(SetActorVar, ACTOR_TANK, AVAR_Tank_SquadPhase, AVAL_SquadPhase_Defeated) + Return + End }; EvtScript N(EVS_UpdateActorSize) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_LE(1) - EVT_CALL(SetActorSize, ACTOR_SELF, EVT_IGNORE_ARG, 72) - EVT_CASE_LE(2) - EVT_CALL(SetActorSize, ACTOR_SELF, EVT_IGNORE_ARG, 48) - EVT_CASE_LE(8) - EVT_CALL(SetActorSize, ACTOR_SELF, EVT_IGNORE_ARG, 24) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSize, ACTOR_SELF, EVT_IGNORE_ARG, EVT_IGNORE_ARG) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar0) + Switch(LVar0) + CaseLe(1) + Call(SetActorSize, ACTOR_SELF, EVT_IGNORE_ARG, 72) + CaseLe(2) + Call(SetActorSize, ACTOR_SELF, EVT_IGNORE_ARG, 48) + CaseLe(8) + Call(SetActorSize, ACTOR_SELF, EVT_IGNORE_ARG, 24) + CaseDefault + Call(SetActorSize, ACTOR_SELF, EVT_IGNORE_ARG, EVT_IGNORE_ARG) + EndSwitch + Return + End }; diff --git a/src/battle/area/omo2_2/actor/stilt_guy.c b/src/battle/area/omo2_2/actor/stilt_guy.c index 25abc2ed763..6233694cce8 100644 --- a/src/battle/area/omo2_2/actor/stilt_guy.c +++ b/src/battle/area/omo2_2/actor/stilt_guy.c @@ -259,677 +259,677 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasFallen, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_KnockDownHit, FALSE) - EVT_CALL(SetPartTargetFlagBits, ACTOR_SELF, PRT_4, ACTOR_PART_TARGET_NO_JUMP, TRUE) - EVT_CALL(SetPartSize, ACTOR_SELF, PRT_GUY, 24, 30) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetPartRotationOffset, ACTOR_SELF, PRT_UNFOLD_4, 0, 13, 0) - EVT_CALL(SetPartRotationOffset, ACTOR_SELF, PRT_UNFOLD_3, 0, 13, 0) - EVT_CALL(SetPartRotationOffset, ACTOR_SELF, PRT_UNFOLD_2, 0, 13, 0) - EVT_CALL(SetPartRotationOffset, ACTOR_SELF, PRT_UNFOLD_1, 0, 13, 0) - EVT_THREAD - EVT_SET(LVar0, 90) - EVT_SET(LVar1, 270) - EVT_LOOP(5) - EVT_LOOP(2) - EVT_LABEL(0) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_UNFOLD_4, LVar1, 0, 0) - EVT_WAIT(1) - EVT_SUB(LVar1, LVar0) - EVT_IF_GE(LVar1, -90) - EVT_GOTO(0) - EVT_END_IF - EVT_ADD(LVar1, 360) - EVT_END_LOOP - EVT_SUB(LVar0, 15) - EVT_END_LOOP - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_UNFOLD_4, -90, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_UNFOLD_4, EVT_FLOAT(0.6)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_UNFOLD_4, ANIM_StiltGuyUnfold_Anim03) - EVT_CALL(GetActorPos, ACTOR_GENERAL, LVar0, LVar1, LVar2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IN_Order, LVar1) - EVT_IF_EQ(LVar1, 0) - EVT_SET(LVar0, 10) - EVT_CALL(PlaySound, SOUND_LONG_FLUTTER_FALL_A) - EVT_ELSE - EVT_SET(LVar0, 50) - EVT_CALL(PlaySound, SOUND_LONG_FLUTTER_FALL_B) - EVT_END_IF - EVT_SUB(LVar2, 13) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_UNFOLD_4, LVar0, 200, LVar2) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, 200, LVar2) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_GUY, ANIM_GeneralGuy_Anim02) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_GUY, ANIM_GeneralGuy_Anim0A) - EVT_CALL(PlaySoundAtPart, ACTOR_GENERAL, PRT_GUY, SOUND_GENERAL_WHISTLE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_UNFOLD_4, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(FallPartTo, ACTOR_SELF, PRT_UNFOLD_4, LVar0, -9, LVar2, 80) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(15) - EVT_SET(LVar0, 90) - EVT_SET(LVar1, 450) - EVT_LOOP(5) - EVT_LOOP(2) - EVT_LABEL(1) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_UNFOLD_3, LVar1, 0, 0) - EVT_WAIT(1) - EVT_SUB(LVar1, LVar0) - EVT_IF_GE(LVar1, 90) - EVT_GOTO(1) - EVT_END_IF - EVT_ADD(LVar1, 360) - EVT_END_LOOP - EVT_SUB(LVar0, 15) - EVT_END_LOOP - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_UNFOLD_3, 90, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_UNFOLD_3, EVT_FLOAT(0.6)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_UNFOLD_3, ANIM_StiltGuyUnfold_Anim02) - EVT_CALL(GetActorPos, ACTOR_GENERAL, LVar0, LVar1, LVar2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IN_Order, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LVar0, 10) - EVT_ELSE - EVT_SET(LVar0, 50) - EVT_END_IF - EVT_SUB(LVar2, 13) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_UNFOLD_3, LVar0, 200, LVar2) - EVT_WAIT(15) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_UNFOLD_3, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(FallPartTo, ACTOR_SELF, PRT_UNFOLD_3, LVar0, -9, LVar2, 80) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(30) - EVT_SET(LVar0, 90) - EVT_SET(LVar1, 270) - EVT_LOOP(5) - EVT_LOOP(2) - EVT_LABEL(2) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_UNFOLD_2, LVar1, 0, 0) - EVT_WAIT(1) - EVT_SUB(LVar1, LVar0) - EVT_IF_GE(LVar1, -90) - EVT_GOTO(2) - EVT_END_IF - EVT_ADD(LVar1, 360) - EVT_END_LOOP - EVT_SUB(LVar0, 15) - EVT_END_LOOP - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_UNFOLD_2, -90, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_UNFOLD_2, EVT_FLOAT(0.6)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_UNFOLD_2, ANIM_StiltGuyUnfold_Anim01) - EVT_CALL(GetActorPos, ACTOR_GENERAL, LVar0, LVar1, LVar2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IN_Order, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LVar0, 10) - EVT_ELSE - EVT_SET(LVar0, 50) - EVT_END_IF - EVT_SUB(LVar2, 13) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_UNFOLD_2, LVar0, 200, LVar2) - EVT_WAIT(30) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_UNFOLD_2, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(FallPartTo, ACTOR_SELF, PRT_UNFOLD_2, LVar0, -9, LVar2, 80) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(45) - EVT_SET(LVar0, 90) - EVT_SET(LVar1, 450) - EVT_LOOP(5) - EVT_LOOP(2) - EVT_LABEL(3) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_UNFOLD_1, LVar1, 0, 0) - EVT_WAIT(1) - EVT_SUB(LVar1, LVar0) - EVT_IF_GE(LVar1, 90) - EVT_GOTO(3) - EVT_END_IF - EVT_ADD(LVar1, 360) - EVT_END_LOOP - EVT_SUB(LVar0, 15) - EVT_END_LOOP - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_UNFOLD_1, 90, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_UNFOLD_1, EVT_FLOAT(0.6)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_UNFOLD_1, ANIM_StiltGuyUnfold_Anim00) - EVT_CALL(GetActorPos, ACTOR_GENERAL, LVar0, LVar1, LVar2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IN_Order, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LVar0, 10) - EVT_ELSE - EVT_SET(LVar0, 50) - EVT_END_IF - EVT_SUB(LVar2, 13) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_UNFOLD_1, LVar0, 200, LVar2) - EVT_WAIT(45) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_UNFOLD_1, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(FallPartTo, ACTOR_SELF, PRT_UNFOLD_1, LVar0, -9, LVar2, 80) - EVT_WAIT(15) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_UNFOLD_2, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_UNFOLD_3, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_UNFOLD_4, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STILTS, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_UNFOLD_4, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 13) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_UNFOLD_1, LVar0, 0, LVar2) - EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_UNFOLD_1, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_UNFOLD_1, LVar0, 0, LVar2) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_UNFOLD_1, 0, 0, 0) - EVT_CALL(SetPartRotationOffset, ACTOR_SELF, PRT_UNFOLD_4, 0, 0, 0) - EVT_CALL(SetPartRotationOffset, ACTOR_SELF, PRT_UNFOLD_3, 0, 0, 0) - EVT_CALL(SetPartRotationOffset, ACTOR_SELF, PRT_UNFOLD_2, 0, 0, 0) - EVT_CALL(SetPartRotationOffset, ACTOR_SELF, PRT_UNFOLD_1, 0, 0, 0) - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_UNFOLD_1, SOUND_STILT_GUY_UNFOLD) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_UNFOLD_1, ANIM_StiltGuyUnfold_Anim05) - EVT_CALL(EnableActorPaletteEffects, ACTOR_SELF, PRT_UNFOLD_1, TRUE) - EVT_CALL(SetActorPaletteSwapParams, ACTOR_SELF, PRT_UNFOLD_1, SPR_PAL_StiltGuyUnfold_Alt, SPR_PAL_StiltGuyUnfold, 0, 36, 0, 255, 0, 0) - EVT_CALL(SetActorPaletteEffect, ACTOR_SELF, PRT_UNFOLD_1, ACTOR_PAL_ADJUST_BLEND_PALSETS) - EVT_WAIT(18) - EVT_CALL(EnableActorPaletteEffects, ACTOR_SELF, PRT_UNFOLD_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_UNFOLD_1, ANIM_StiltGuyUnfold_Anim04) - EVT_WAIT(5) - EVT_LOOP(20) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_UNFOLD_1, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STILTS, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_UNFOLD_1, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STILTS, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IN_Order, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_TANK, AVAR_Tank_SquadPhase, AVAL_SquadPhase_Next) - EVT_ELSE - EVT_END_IF - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_HasFallen, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_KnockDownHit, FALSE) + Call(SetPartTargetFlagBits, ACTOR_SELF, PRT_4, ACTOR_PART_TARGET_NO_JUMP, TRUE) + Call(SetPartSize, ACTOR_SELF, PRT_GUY, 24, 30) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetPartRotationOffset, ACTOR_SELF, PRT_UNFOLD_4, 0, 13, 0) + Call(SetPartRotationOffset, ACTOR_SELF, PRT_UNFOLD_3, 0, 13, 0) + Call(SetPartRotationOffset, ACTOR_SELF, PRT_UNFOLD_2, 0, 13, 0) + Call(SetPartRotationOffset, ACTOR_SELF, PRT_UNFOLD_1, 0, 13, 0) + Thread + Set(LVar0, 90) + Set(LVar1, 270) + Loop(5) + Loop(2) + Label(0) + Call(SetPartRotation, ACTOR_SELF, PRT_UNFOLD_4, LVar1, 0, 0) + Wait(1) + Sub(LVar1, LVar0) + IfGe(LVar1, -90) + Goto(0) + EndIf + Add(LVar1, 360) + EndLoop + Sub(LVar0, 15) + EndLoop + Call(SetPartRotation, ACTOR_SELF, PRT_UNFOLD_4, -90, 0, 0) + EndThread + Thread + Call(SetPartJumpGravity, ACTOR_SELF, PRT_UNFOLD_4, Float(0.6)) + Call(SetAnimation, ACTOR_SELF, PRT_UNFOLD_4, ANIM_StiltGuyUnfold_Anim03) + Call(GetActorPos, ACTOR_GENERAL, LVar0, LVar1, LVar2) + Call(GetActorVar, ACTOR_SELF, AVAR_IN_Order, LVar1) + IfEq(LVar1, 0) + Set(LVar0, 10) + Call(PlaySound, SOUND_LONG_FLUTTER_FALL_A) + Else + Set(LVar0, 50) + Call(PlaySound, SOUND_LONG_FLUTTER_FALL_B) + EndIf + Sub(LVar2, 13) + Call(SetPartPos, ACTOR_SELF, PRT_UNFOLD_4, LVar0, 200, LVar2) + Call(SetActorPos, ACTOR_SELF, LVar0, 200, LVar2) + Call(SetAnimation, ACTOR_GENERAL, PRT_GUY, ANIM_GeneralGuy_Anim02) + Call(SetAnimation, ACTOR_GENERAL, PRT_GUY, ANIM_GeneralGuy_Anim0A) + Call(PlaySoundAtPart, ACTOR_GENERAL, PRT_GUY, SOUND_GENERAL_WHISTLE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_UNFOLD_4, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(FallPartTo, ACTOR_SELF, PRT_UNFOLD_4, LVar0, -9, LVar2, 80) + EndThread + Thread + Wait(15) + Set(LVar0, 90) + Set(LVar1, 450) + Loop(5) + Loop(2) + Label(1) + Call(SetPartRotation, ACTOR_SELF, PRT_UNFOLD_3, LVar1, 0, 0) + Wait(1) + Sub(LVar1, LVar0) + IfGe(LVar1, 90) + Goto(1) + EndIf + Add(LVar1, 360) + EndLoop + Sub(LVar0, 15) + EndLoop + Call(SetPartRotation, ACTOR_SELF, PRT_UNFOLD_3, 90, 0, 0) + EndThread + Thread + Call(SetPartJumpGravity, ACTOR_SELF, PRT_UNFOLD_3, Float(0.6)) + Call(SetAnimation, ACTOR_SELF, PRT_UNFOLD_3, ANIM_StiltGuyUnfold_Anim02) + Call(GetActorPos, ACTOR_GENERAL, LVar0, LVar1, LVar2) + Call(GetActorVar, ACTOR_SELF, AVAR_IN_Order, LVar0) + IfEq(LVar0, 0) + Set(LVar0, 10) + Else + Set(LVar0, 50) + EndIf + Sub(LVar2, 13) + Call(SetPartPos, ACTOR_SELF, PRT_UNFOLD_3, LVar0, 200, LVar2) + Wait(15) + Call(SetPartFlagBits, ACTOR_SELF, PRT_UNFOLD_3, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(FallPartTo, ACTOR_SELF, PRT_UNFOLD_3, LVar0, -9, LVar2, 80) + EndThread + Thread + Wait(30) + Set(LVar0, 90) + Set(LVar1, 270) + Loop(5) + Loop(2) + Label(2) + Call(SetPartRotation, ACTOR_SELF, PRT_UNFOLD_2, LVar1, 0, 0) + Wait(1) + Sub(LVar1, LVar0) + IfGe(LVar1, -90) + Goto(2) + EndIf + Add(LVar1, 360) + EndLoop + Sub(LVar0, 15) + EndLoop + Call(SetPartRotation, ACTOR_SELF, PRT_UNFOLD_2, -90, 0, 0) + EndThread + Thread + Call(SetPartJumpGravity, ACTOR_SELF, PRT_UNFOLD_2, Float(0.6)) + Call(SetAnimation, ACTOR_SELF, PRT_UNFOLD_2, ANIM_StiltGuyUnfold_Anim01) + Call(GetActorPos, ACTOR_GENERAL, LVar0, LVar1, LVar2) + Call(GetActorVar, ACTOR_SELF, AVAR_IN_Order, LVar0) + IfEq(LVar0, 0) + Set(LVar0, 10) + Else + Set(LVar0, 50) + EndIf + Sub(LVar2, 13) + Call(SetPartPos, ACTOR_SELF, PRT_UNFOLD_2, LVar0, 200, LVar2) + Wait(30) + Call(SetPartFlagBits, ACTOR_SELF, PRT_UNFOLD_2, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(FallPartTo, ACTOR_SELF, PRT_UNFOLD_2, LVar0, -9, LVar2, 80) + EndThread + Thread + Wait(45) + Set(LVar0, 90) + Set(LVar1, 450) + Loop(5) + Loop(2) + Label(3) + Call(SetPartRotation, ACTOR_SELF, PRT_UNFOLD_1, LVar1, 0, 0) + Wait(1) + Sub(LVar1, LVar0) + IfGe(LVar1, 90) + Goto(3) + EndIf + Add(LVar1, 360) + EndLoop + Sub(LVar0, 15) + EndLoop + Call(SetPartRotation, ACTOR_SELF, PRT_UNFOLD_1, 90, 0, 0) + EndThread + Thread + Call(SetPartJumpGravity, ACTOR_SELF, PRT_UNFOLD_1, Float(0.6)) + Call(SetAnimation, ACTOR_SELF, PRT_UNFOLD_1, ANIM_StiltGuyUnfold_Anim00) + Call(GetActorPos, ACTOR_GENERAL, LVar0, LVar1, LVar2) + Call(GetActorVar, ACTOR_SELF, AVAR_IN_Order, LVar0) + IfEq(LVar0, 0) + Set(LVar0, 10) + Else + Set(LVar0, 50) + EndIf + Sub(LVar2, 13) + Call(SetPartPos, ACTOR_SELF, PRT_UNFOLD_1, LVar0, 200, LVar2) + Wait(45) + Call(SetPartFlagBits, ACTOR_SELF, PRT_UNFOLD_1, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(FallPartTo, ACTOR_SELF, PRT_UNFOLD_1, LVar0, -9, LVar2, 80) + Wait(15) + Call(SetPartFlagBits, ACTOR_SELF, PRT_UNFOLD_2, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_UNFOLD_3, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_UNFOLD_4, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_STILTS, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(GetPartOffset, ACTOR_SELF, PRT_UNFOLD_4, LVar0, LVar1, LVar2) + Add(LVar2, 13) + Call(ForceHomePos, ACTOR_SELF, LVar0, 0, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_UNFOLD_1, LVar0, 0, LVar2) + Call(GetPartOffset, ACTOR_SELF, PRT_UNFOLD_1, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_UNFOLD_1, LVar0, 0, LVar2) + Call(SetPartRotation, ACTOR_SELF, PRT_UNFOLD_1, 0, 0, 0) + Call(SetPartRotationOffset, ACTOR_SELF, PRT_UNFOLD_4, 0, 0, 0) + Call(SetPartRotationOffset, ACTOR_SELF, PRT_UNFOLD_3, 0, 0, 0) + Call(SetPartRotationOffset, ACTOR_SELF, PRT_UNFOLD_2, 0, 0, 0) + Call(SetPartRotationOffset, ACTOR_SELF, PRT_UNFOLD_1, 0, 0, 0) + Call(PlaySoundAtPart, ACTOR_SELF, PRT_UNFOLD_1, SOUND_STILT_GUY_UNFOLD) + Call(SetAnimation, ACTOR_SELF, PRT_UNFOLD_1, ANIM_StiltGuyUnfold_Anim05) + Call(EnableActorPaletteEffects, ACTOR_SELF, PRT_UNFOLD_1, TRUE) + Call(SetActorPaletteSwapParams, ACTOR_SELF, PRT_UNFOLD_1, SPR_PAL_StiltGuyUnfold_Alt, SPR_PAL_StiltGuyUnfold, 0, 36, 0, 255, 0, 0) + Call(SetActorPaletteEffect, ACTOR_SELF, PRT_UNFOLD_1, ACTOR_PAL_ADJUST_BLEND_PALSETS) + Wait(18) + Call(EnableActorPaletteEffects, ACTOR_SELF, PRT_UNFOLD_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_UNFOLD_1, ANIM_StiltGuyUnfold_Anim04) + Wait(5) + Loop(20) + Call(SetPartFlagBits, ACTOR_SELF, PRT_UNFOLD_1, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_STILTS, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_UNFOLD_1, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_STILTS, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + EndLoop + Call(HPBarToHome, ACTOR_SELF) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Call(GetActorVar, ACTOR_SELF, AVAR_IN_Order, LVar0) + IfEq(LVar0, 1) + Call(SetActorVar, ACTOR_TANK, AVAR_Tank_SquadPhase, AVAL_SquadPhase_Next) + Else + EndIf + EndThread + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HasFallen, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_EXEC_WAIT(N(EVS_ShyGuy_ReturnHome)) - EVT_RETURN - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_STILTS) - EVT_SET_CONST(LVar1, ANIM_StiltGuy_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_STILTS, ANIM_StiltGuy_Anim01) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_HasFallen, LVar0) + IfEq(LVar0, TRUE) + ExecWait(N(EVS_ShyGuy_ReturnHome)) + Return + EndIf + SetConst(LVar0, PRT_STILTS) + SetConst(LVar1, ANIM_StiltGuy_Anim03) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetAnimation, ACTOR_SELF, PRT_STILTS, ANIM_StiltGuy_Anim01) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastElement, LVarF) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_EXEC_WAIT(N(EVS_RegisterComboHit)) - EVT_SET_CONST(LVar0, PRT_STILTS) - EVT_SET_CONST(LVar1, ANIM_StiltGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_ZERO_DAMAGE) - EVT_SET_CONST(LVar0, PRT_STILTS) - EVT_SET_CONST(LVar1, ANIM_StiltGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CASE_OR_EQ(EVENT_SPIN_SMASH_HIT) - EVT_CASE_OR_EQ(EVENT_SPIN_SMASH_LAUNCH_HIT) - EVT_CALL(GetBattleFlags, LVar2) - EVT_IF_FLAG(LVar2, BS_FLAGS1_PARTNER_ACTING) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar2, MOVE_SPOOK) - EVT_SET(LVar0, PRT_STILTS) - EVT_SET(LVar1, ANIM_StiltGuy_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_KnockDownHit, FALSE) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_STILTS) - EVT_SET_CONST(LVar1, ANIM_StiltGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_RegisterHit)) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_KnockDownHit, LVar0) - EVT_IF_TRUE(LVar0) - EVT_EXEC_WAIT(N(EVS_FallDown)) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_KnockDownHit, FALSE) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_STILTS, ANIM_StiltGuy_Anim06) - EVT_WAIT(1000) - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET(LVar0, 2) - EVT_SET(LVar1, ANIM_StiltGuy_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_CALL(GetDamageSource, LVar0) - EVT_IF_NE(LVar0, DMG_SRC_FIRE_SHELL) - EVT_SET(LVar0, 2) - EVT_SET(LVar1, ANIM_StiltGuy_Anim09) - EVT_SET(LVar2, ANIM_StiltGuy_Anim0A) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_ELSE - EVT_SET(LVar0, 2) - EVT_SET(LVar1, ANIM_StiltGuy_Anim09) - EVT_SET(LVar2, ANIM_StiltGuy_Anim0A) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_FallDown)) - EVT_END_IF - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET(LVar0, 2) - EVT_SET(LVar1, ANIM_StiltGuy_Anim09) - EVT_SET(LVar2, ANIM_StiltGuy_Anim0A) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_STILTS) - EVT_SET_CONST(LVar1, ANIM_StiltGuy_Anim0A) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_STILTS) - EVT_SET_CONST(LVar1, ANIM_StiltGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_SET_CONST(LVar0, PRT_STILTS) - EVT_SET_CONST(LVar1, ANIM_StiltGuy_Anim07) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_STILTS) - EVT_SET_CONST(LVar1, ANIM_StiltGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_STILTS) - EVT_SET_CONST(LVar1, ANIM_StiltGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_STILTS) - EVT_SET_CONST(LVar1, ANIM_StiltGuy_Anim07) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_STILTS) - EVT_SET_CONST(LVar1, ANIM_StiltGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_STILTS) - EVT_SET_CONST(LVar1, ANIM_StiltGuy_Anim07) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_STILTS) - EVT_SET_CONST(LVar1, ANIM_StiltGuy_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_30) - EVT_SET_CONST(LVar0, PRT_STILTS) - EVT_SET_CONST(LVar1, ANIM_StiltGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(1000) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_STILTS) - EVT_SET_CONST(LVar1, ANIM_StiltGuy_Anim03) - EVT_SET_CONST(LVar2, ANIM_StiltGuy_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastElement, LVarF) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + CaseEq(EVENT_HIT_COMBO) + ExecWait(N(EVS_RegisterComboHit)) + SetConst(LVar0, PRT_STILTS) + SetConst(LVar1, ANIM_StiltGuy_Anim06) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_ZERO_DAMAGE) + SetConst(LVar0, PRT_STILTS) + SetConst(LVar1, ANIM_StiltGuy_Anim06) + ExecWait(EVS_Enemy_Hit) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_HIT) + CaseOrEq(EVENT_SPIN_SMASH_HIT) + CaseOrEq(EVENT_SPIN_SMASH_LAUNCH_HIT) + Call(GetBattleFlags, LVar2) + IfFlag(LVar2, BS_FLAGS1_PARTNER_ACTING) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + IfEq(LVar2, MOVE_SPOOK) + Set(LVar0, PRT_STILTS) + Set(LVar1, ANIM_StiltGuy_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_KnockDownHit, FALSE) + Return + EndIf + EndIf + SetConst(LVar0, PRT_STILTS) + SetConst(LVar1, ANIM_StiltGuy_Anim06) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_RegisterHit)) + Call(GetActorVar, ACTOR_SELF, AVAR_KnockDownHit, LVar0) + IfTrue(LVar0) + ExecWait(N(EVS_FallDown)) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_KnockDownHit, FALSE) + EndCaseGroup + CaseEq(EVENT_BEGIN_AIR_LIFT) + Call(SetAnimation, ACTOR_SELF, PRT_STILTS, ANIM_StiltGuy_Anim06) + Wait(1000) + CaseEq(EVENT_AIR_LIFT_FAILED) + Set(LVar0, 2) + Set(LVar1, ANIM_StiltGuy_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(EVENT_BURN_HIT) + Call(GetDamageSource, LVar0) + IfNe(LVar0, DMG_SRC_FIRE_SHELL) + Set(LVar0, 2) + Set(LVar1, ANIM_StiltGuy_Anim09) + Set(LVar2, ANIM_StiltGuy_Anim0A) + ExecWait(EVS_Enemy_BurnHit) + Else + Set(LVar0, 2) + Set(LVar1, ANIM_StiltGuy_Anim09) + Set(LVar2, ANIM_StiltGuy_Anim0A) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_FallDown)) + EndIf + CaseEq(EVENT_BURN_DEATH) + Set(LVar0, 2) + Set(LVar1, ANIM_StiltGuy_Anim09) + Set(LVar2, ANIM_StiltGuy_Anim0A) + ExecWait(EVS_Enemy_BurnHit) + Wait(10) + SetConst(LVar0, PRT_STILTS) + SetConst(LVar1, ANIM_StiltGuy_Anim0A) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_STILTS) + SetConst(LVar1, ANIM_StiltGuy_Anim06) + ExecWait(EVS_Enemy_Hit) + SetConst(LVar0, PRT_STILTS) + SetConst(LVar1, ANIM_StiltGuy_Anim07) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_STILTS) + SetConst(LVar1, ANIM_StiltGuy_Anim06) + ExecWait(EVS_Enemy_ShockHit) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_STILTS) + SetConst(LVar1, ANIM_StiltGuy_Anim06) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_STILTS) + SetConst(LVar1, ANIM_StiltGuy_Anim07) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_STILTS) + SetConst(LVar1, ANIM_StiltGuy_Anim06) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_STILTS) + SetConst(LVar1, ANIM_StiltGuy_Anim07) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + ExecWait(N(EVS_ReturnHome)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_STILTS) + SetConst(LVar1, ANIM_StiltGuy_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_30) + SetConst(LVar0, PRT_STILTS) + SetConst(LVar1, ANIM_StiltGuy_Anim06) + ExecWait(EVS_Enemy_Hit) + Wait(1000) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_STILTS) + SetConst(LVar1, ANIM_StiltGuy_Anim03) + SetConst(LVar2, ANIM_StiltGuy_Anim03) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_RegisterComboHit) = { - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_PARTNER_ACTING) - EVT_IF_FLAG(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_KnockDownHit, TRUE) - EVT_END_IF - EVT_ELSE - EVT_CALL(N(GetSelectedMoveID), LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(MOVE_HEADBONK1) - EVT_CASE_OR_EQ(MOVE_HEADBONK2) - EVT_CASE_OR_EQ(MOVE_HEADBONK3) - EVT_CASE_OR_EQ(MOVE_MULTIBONK) - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_KnockDownHit, TRUE) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetBattleFlags, LVar0) + IfNotFlag(LVar0, BS_FLAGS1_PARTNER_ACTING) + IfFlag(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) + Call(SetActorVar, ACTOR_SELF, AVAR_KnockDownHit, TRUE) + EndIf + Else + Call(N(GetSelectedMoveID), LVar0) + Switch(LVar0) + CaseOrEq(MOVE_HEADBONK1) + CaseOrEq(MOVE_HEADBONK2) + CaseOrEq(MOVE_HEADBONK3) + CaseOrEq(MOVE_MULTIBONK) + Call(GetBattleFlags, LVar0) + IfFlag(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) + Call(SetActorVar, ACTOR_SELF, AVAR_KnockDownHit, TRUE) + EndIf + EndCaseGroup + EndSwitch + EndIf + Return + End }; EvtScript N(EVS_RegisterHit) = { - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_PARTNER_ACTING) + Call(GetBattleFlags, LVar0) + IfNotFlag(LVar0, BS_FLAGS1_PARTNER_ACTING) // jump attacks knock down stilts - EVT_IF_FLAG(LVarF, DAMAGE_TYPE_JUMP) - EVT_IF_FLAG(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_KnockDownHit, TRUE) - EVT_END_IF - EVT_END_IF + IfFlag(LVarF, DAMAGE_TYPE_JUMP) + IfFlag(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) + Call(SetActorVar, ACTOR_SELF, AVAR_KnockDownHit, TRUE) + EndIf + EndIf // quake attacks knock down stilts - EVT_IF_FLAG(LVarF, DAMAGE_TYPE_POW | DAMAGE_TYPE_QUAKE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_KnockDownHit, TRUE) - EVT_END_IF - EVT_END_IF + IfFlag(LVarF, DAMAGE_TYPE_POW | DAMAGE_TYPE_QUAKE) + Call(SetActorVar, ACTOR_SELF, AVAR_KnockDownHit, TRUE) + EndIf + EndIf // status effects knock down stilts - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_SHRINK | STATUS_FLAG_STOP) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_KnockDownHit, TRUE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_SHRINK | STATUS_FLAG_STOP) + Call(SetActorVar, ACTOR_SELF, AVAR_KnockDownHit, TRUE) + EndIf + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_EXEC_WAIT(N(EVS_Attack_Leap)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_Attack_Leap)) + Return + End }; EvtScript N(EVS_Attack_Leap) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamOffsetZ, 40) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_STILTS, ANIM_StiltGuy_Anim03) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_STILTS, ANIM_StiltGuy_Anim04) - EVT_WAIT(8) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_THREAD - EVT_WAIT(9) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_STILTS, ANIM_StiltGuy_Anim04) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_STILTS, ANIM_StiltGuy_Anim05) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 15) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HOP) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_STILT_GUY_STEP) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 25) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_STILT_GUY_STEP) - EVT_WAIT(15) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_STILTS, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_STILTS, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_THREAD - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_STILTS, ANIM_StiltGuy_Anim04) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_STILTS, ANIM_StiltGuy_Anim05) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HOP) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_SHOCK_CONTACT, 0, DMG_LEAP, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SET(LVarF, LVar0) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_STILT_GUY_STEP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_STILTS, ANIM_StiltGuy_Anim01) - EVT_WAIT(8) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamOffsetZ, 40) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_STILTS, ANIM_StiltGuy_Anim03) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_STILTS, ANIM_StiltGuy_Anim04) + Wait(8) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Thread + Wait(9) + Call(SetAnimation, ACTOR_SELF, PRT_STILTS, ANIM_StiltGuy_Anim04) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_STILTS, ANIM_StiltGuy_Anim05) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 15) + Set(LVar1, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HOP) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_STILT_GUY_STEP) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 25) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_STILT_GUY_STEP) + Wait(15) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_STILTS, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + ExecWait(N(EVS_ReturnHome)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_STILTS, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Thread + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_STILTS, ANIM_StiltGuy_Anim04) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_STILTS, ANIM_StiltGuy_Anim05) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HOP) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_SHOCK_CONTACT, 0, DMG_LEAP, BS_FLAGS1_TRIGGER_EVENTS) + Set(LVarF, LVar0) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_STILT_GUY_STEP) + Call(SetAnimation, ACTOR_SELF, PRT_STILTS, ANIM_StiltGuy_Anim01) + Wait(8) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_FallDown) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasFallen, TRUE) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_GUY, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_PRIMARY_TARGET) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_TARGET, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_4, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim0C) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 50) - EVT_ELSE - EVT_ADD(LVar1, 20) - EVT_END_IF - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_STILTS, SOUND_STILTS_FALL) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_STILTS, ANIM_StiltGuy_Anim08) - EVT_SET(LVar0, 0) - EVT_LOOP(15) - EVT_ADD(LVar0, 6) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_STILTS, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_STILTS, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET) - EVT_END_THREAD - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_STILTS, SOUND_FALL_QUICK) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(RandInt, 100, LVar1) - EVT_IF_LT(LVar1, 50) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim10) - EVT_WAIT(10) - EVT_END_IF - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_ShyGuy_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_ShyGuy_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_ShyGuy_HandleEvent))) - EVT_CALL(SetActorType, ACTOR_SELF, ACTOR_TYPE_SHY_GUY) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(GetActorSize, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(SetActorSize, ACTOR_SELF, 24, LVar1) - EVT_CALL(N(SetActorLevelToZero)) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_HasFallen, TRUE) + Call(SetPartFlags, ACTOR_SELF, PRT_GUY, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_PRIMARY_TARGET) + Call(SetPartFlags, ACTOR_SELF, PRT_TARGET, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET) + Call(SetPartFlags, ACTOR_SELF, PRT_4, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET) + Call(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim0C) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar1, 50) + Else + Add(LVar1, 20) + EndIf + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Thread + Wait(6) + Call(PlaySoundAtPart, ACTOR_SELF, PRT_STILTS, SOUND_STILTS_FALL) + EndThread + Thread + Call(SetAnimation, ACTOR_SELF, PRT_STILTS, ANIM_StiltGuy_Anim08) + Set(LVar0, 0) + Loop(15) + Add(LVar0, 6) + Call(SetPartRotation, ACTOR_SELF, PRT_STILTS, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetPartFlags, ACTOR_SELF, PRT_STILTS, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET) + EndThread + Call(PlaySoundAtPart, ACTOR_SELF, PRT_STILTS, SOUND_FALL_QUICK) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(RandInt, 100, LVar1) + IfLt(LVar1, 50) + Call(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) + Else + Call(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim10) + Wait(10) + EndIf + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_ShyGuy_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_ShyGuy_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_ShyGuy_HandleEvent))) + Call(SetActorType, ACTOR_SELF, ACTOR_TYPE_SHY_GUY) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) + Call(HPBarToHome, ACTOR_SELF) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(GetActorSize, ACTOR_SELF, LVar0, LVar1) + Call(SetActorSize, ACTOR_SELF, 24, LVar1) + Call(N(SetActorLevelToZero)) + Return + End }; EvtScript N(EVS_Death) = { - EVT_EXEC_WAIT(EVS_Enemy_DeathWithoutRemove) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STILTS, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GUY, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(GetActorVar, ACTOR_TANK, AVAR_Tank_StiltPhase, LVar0) - EVT_ADD(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_TANK, AVAR_Tank_StiltPhase, LVar0) - EVT_IF_GE(LVar0, AVAL_StiltPhase_Defeated) - EVT_CALL(FreezeBattleState, TRUE) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 100) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + ExecWait(EVS_Enemy_DeathWithoutRemove) + Call(SetPartFlagBits, ACTOR_SELF, PRT_STILTS, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_GUY, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(GetActorVar, ACTOR_TANK, AVAR_Tank_StiltPhase, LVar0) + Add(LVar0, 1) + Call(SetActorVar, ACTOR_TANK, AVAR_Tank_StiltPhase, LVar0) + IfGe(LVar0, AVAL_StiltPhase_Defeated) + Call(FreezeBattleState, TRUE) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 100) + Call(RemoveActor, ACTOR_SELF) + Return + End }; EvtScript N(EVS_ShyGuy_SpinAround) = { - EVT_SET(LVar0, 0) - EVT_LABEL(0) - EVT_SUB(LVar0, 30) - EVT_IF_LT(LVar0, 0) - EVT_ADD(LVar0, 360) - EVT_END_IF - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVar0, 0) + Label(0) + Sub(LVar0, 30) + IfLt(LVar0, 0) + Add(LVar0, 360) + EndIf + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_ShyGuy_SpinSmash) = { - EVT_EXEC_GET_TID(N(EVS_ShyGuy_SpinAround), LVarE) - EVT_CALL(GetPartEventFlags, ACTOR_SELF, LVar0, LVarA) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(CreateCurrentPosTargetList, TARGET_FLAG_GROUND | TARGET_FLAG_ALLOW_TARGET_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerID, LVar1) - EVT_CALL(GetOwnerTarget, LVar0, LVar9) - EVT_IF_NE(LVar1, LVar0) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_GOTO(0) - EVT_END_IF - EVT_LABEL(1) - EVT_ADD(LVarF, 1) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_EQ(LVar0, ITER_NO_MORE) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GetOwnerTarget, LVar0, LVar9) - EVT_CALL(GetActorFlags, LVar0, LVar1) - EVT_IF_FLAG(LVar1, ACTOR_FLAG_TARGET_ONLY) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.1)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, 1, BS_FLAGS1_TRIGGER_EVENTS) - EVT_GOTO(1) - EVT_LABEL(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.1)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(GetActorSize, ACTOR_SELF, LVar0, LVar3) - EVT_DIV(LVar3, 2) - EVT_SET(LVar4, 70) - EVT_SUB(LVar4, LVar3) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar5, LVar4) - EVT_SUB(LVar5, LVar0) - EVT_IF_LT(LVar5, 6) - EVT_SET(LVar5, 1) - EVT_ELSE - EVT_SET(LVar5, 0) - EVT_END_IF - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, LVar5, FALSE, TRUE, FALSE) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar6, LVar7, LVar8) - EVT_SUB(LVar4, 18) - EVT_IF_LE(LVar4, LVar6) - EVT_SET(LVar4, LVar6) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) - EVT_ELSE - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar4, LVar7, LVar8) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) - EVT_END_IF - EVT_KILL_THREAD(LVarE) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_WAIT(10) - EVT_RETURN - EVT_END + ExecGetTID(N(EVS_ShyGuy_SpinAround), LVarE) + Call(GetPartEventFlags, ACTOR_SELF, LVar0, LVarA) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(CreateCurrentPosTargetList, TARGET_FLAG_GROUND | TARGET_FLAG_ALLOW_TARGET_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerID, LVar1) + Call(GetOwnerTarget, LVar0, LVar9) + IfNe(LVar1, LVar0) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + Goto(0) + EndIf + Label(1) + Add(LVarF, 1) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfEq(LVar0, ITER_NO_MORE) + Goto(10) + EndIf + Call(GetOwnerTarget, LVar0, LVar9) + Call(GetActorFlags, LVar0, LVar1) + IfFlag(LVar1, ACTOR_FLAG_TARGET_ONLY) + Goto(1) + EndIf + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.1)) + Call(SetActorSpeed, ACTOR_SELF, Float(7.0)) + Call(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetOwnerTarget, LVar0, LVar1) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, 1, BS_FLAGS1_TRIGGER_EVENTS) + Goto(1) + Label(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.1)) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(GetActorSize, ACTOR_SELF, LVar0, LVar3) + Div(LVar3, 2) + Set(LVar4, 70) + Sub(LVar4, LVar3) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar5, LVar4) + Sub(LVar5, LVar0) + IfLt(LVar5, 6) + Set(LVar5, 1) + Else + Set(LVar5, 0) + EndIf + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, LVar5, FALSE, TRUE, FALSE) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar6, LVar7, LVar8) + Sub(LVar4, 18) + IfLe(LVar4, LVar6) + Set(LVar4, LVar6) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) + Else + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar4, LVar7, LVar8) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) + EndIf + KillThread(LVarE) + Call(SetActorYaw, ACTOR_SELF, 0) + Wait(10) + Return + End }; s32 N(ShyGuyAnims)[] = { @@ -946,399 +946,399 @@ s32 N(ShyGuyAnims)[] = { }; EvtScript N(EVS_ShyGuy_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_ShyGuy_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_ShyGuy_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_ShyGuy_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_ShyGuy_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_ShyGuy_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_ShyGuy_HandleEvent))) + Return + End }; EvtScript N(EVS_ShyGuy_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SLEEP) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_GUY, -4, 14) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_GUY, 0, 0) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 13, 10, 13) - EVT_ELSE - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_GUY, 0, 24) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_GUY, -1, -10) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SLEEP) + Call(SetTargetOffset, ACTOR_SELF, PRT_GUY, -4, 14) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_GUY, 0, 0) + Call(N(SetAbsoluteStatusOffsets), -10, 13, 10, 13) + Else + Call(SetTargetOffset, ACTOR_SELF, PRT_GUY, 0, 24) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_GUY, -1, -10) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_ShyGuy_ReturnHome) = { - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_SET_CONST(LVar0, PRT_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim01) - EVT_RETURN - EVT_END + Call(ResetAllActorSounds, ACTOR_SELF) + SetConst(LVar0, PRT_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim03) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim01) + Return + End }; EvtScript N(EVS_ShyGuy_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0D) - EVT_SET_CONST(LVar2, ANIM_ShyGuy_Red_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0D) - EVT_SET_CONST(LVar2, ANIM_ShyGuy_Red_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0E) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(N(EVS_ShyGuy_SpinSmash)) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(N(EVS_ShyGuy_SpinSmash)) - EVT_SET_CONST(LVar0, PRT_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_EXEC_WAIT(N(EVS_ShyGuy_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim03) - EVT_SET_CONST(LVar2, ANIM_ShyGuy_Red_Anim14) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0D) + SetConst(LVar2, ANIM_ShyGuy_Red_Anim0E) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0D) + SetConst(LVar2, ANIM_ShyGuy_Red_Anim0E) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0E) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(N(EVS_ShyGuy_SpinSmash)) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(N(EVS_ShyGuy_SpinSmash)) + SetConst(LVar0, PRT_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_Knockback) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + ExecWait(N(EVS_ShyGuy_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(N(EVS_Death)) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim03) + SetConst(LVar2, ANIM_ShyGuy_Red_Anim14) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_ShyGuy_Attack_Tackle) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim03) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_ACTOR_HOP, 0) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim04) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim05) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_GUY, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_SET_CONST(LVar0, PRT_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_GUY, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim01) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HOP) - EVT_END_THREAD - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim04) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim05) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 15) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim01) - EVT_WAIT(8) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_ShyGuy_ReturnHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim03) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_ACTOR_HOP, 0) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim04) + Call(SetGoalToTarget, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim05) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(ResetAllActorSounds, ACTOR_SELF) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_GUY, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + SetConst(LVar0, PRT_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim04) + ExecWait(EVS_Enemy_ReturnHome) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_GUY, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim01) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Thread + Wait(3) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HOP) + EndThread + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim04) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 10) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim05) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 15) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim01) + Wait(8) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + ExecWait(N(EVS_ShyGuy_ReturnHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_ShyGuy_Attack_Vault) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_TIMING_BAR_GO) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim09) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim03) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 80) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim04) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_SUB(LVar0, 40) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim09) - EVT_THREAD - EVT_WAIT(12) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim0A) - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 24, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim05) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 15) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_GUY, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_SET_CONST(LVar0, PRT_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_GUY, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim01) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim09) - EVT_THREAD - EVT_WAIT(9) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim0A) - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_VAULT, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 15) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0) - EVT_SET(LVar3, 0) - EVT_LOOP(20) - EVT_SUB(LVar3, 30) - EVT_IF_LT(LVar3, 0) - EVT_ADD(LVar3, 360) - EVT_END_IF - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS1_ATK_BLOCKED) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetLastDamage, ACTOR_PLAYER, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LRAW_CHEERING) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LRAW_CHEERING | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim09) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim07) - EVT_WAIT(15) - EVT_GOTO(2) - EVT_LABEL(1) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_COLLAPSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim10) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_DISAPPOINTED) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_GUY, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 50) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim11) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim13) - EVT_END_IF - EVT_WAIT(25) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_GUY, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_LABEL(2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_SET_CONST(LVar0, PRT_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim01) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_TIMING_BAR_GO) + Call(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim09) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim03) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 80) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) + Call(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim04) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Sub(LVar0, 40) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim09) + Thread + Wait(12) + Call(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim0A) + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 24, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim05) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 15) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_GUY, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + SetConst(LVar0, PRT_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim04) + ExecWait(EVS_Enemy_ReturnHome) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_GUY, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim01) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim09) + Thread + Wait(9) + Call(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim0A) + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_VAULT, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 15) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0) + Set(LVar3, 0) + Loop(20) + Sub(LVar3, 30) + IfLt(LVar3, 0) + Add(LVar3, 360) + EndIf + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar3) + Wait(1) + EndLoop + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + EndThread + Call(GetBattleFlags, LVar0) + IfFlag(LVar0, BS_FLAGS1_ATK_BLOCKED) + Goto(1) + EndIf + Call(GetLastDamage, ACTOR_PLAYER, LVar0) + IfEq(LVar0, 0) + Goto(1) + EndIf + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LRAW_CHEERING) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LRAW_CHEERING | SOUND_ID_TRIGGER_CHANGE_SOUND) + Call(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim09) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim07) + Wait(15) + Goto(2) + Label(1) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_COLLAPSE) + Call(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim10) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_DISAPPOINTED) + Call(AddActorDecoration, ACTOR_SELF, PRT_GUY, 0, ACTOR_DECORATION_SWEAT) + Call(RandInt, 100, LVar0) + IfLt(LVar0, 50) + Call(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim11) + Else + Call(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim13) + EndIf + Wait(25) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_GUY, 0) + Call(SetActorYaw, ACTOR_SELF, 180) + Label(2) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + SetConst(LVar0, PRT_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim04) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetAnimation, ACTOR_SELF, PRT_GUY, ANIM_ShyGuy_Red_Anim01) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_ShyGuy_TakeTurn) = { - EVT_CALL(RandInt, 1, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_ShyGuy_Attack_Tackle)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_ShyGuy_Attack_Vault)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(RandInt, 1, LVar0) + IfEq(LVar0, 0) + ExecWait(N(EVS_ShyGuy_Attack_Tackle)) + Else + ExecWait(N(EVS_ShyGuy_Attack_Vault)) + EndIf + Return + End }; diff --git a/src/battle/area/omo2_3/actor/shy_stack.c b/src/battle/area/omo2_3/actor/shy_stack.c index 3859e1b5f6e..62123c140f0 100644 --- a/src/battle/area/omo2_3/actor/shy_stack.c +++ b/src/battle/area/omo2_3/actor/shy_stack.c @@ -374,1150 +374,1150 @@ s32 N(ShyGuyAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Still, ANIM_ShyStackGuy_Anim00) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Idle, ANIM_ShyStackGuy_Anim04) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, ANIM_ShyStackGuy_Anim08) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_ShyStackGuy_Anim10) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_ShyStackGuy_Anim14) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Attack, ANIM_ShyStackGuy_Anim1B) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_DefeatedCount, 0) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IN_Order, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LVar0, 10) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_GUY_4, LVar0, 200, 0) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_GUY_3, LVar0, 200, 0) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_GUY_2, LVar0, 200, 0) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_GUY_1, LVar0, 200, 0) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_GUY_4, SOUND_FALL_QUICK) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY_4, ANIM_ShyGuy_Red_Anim0A) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GUY_4, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_GUY_4, EVT_FLOAT(1.0)) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_GUY_4, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) - EVT_CALL(FallPartTo, ACTOR_SELF, PRT_GUY_4, LVar0, 0, 0, 36) - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_GUY_4, SOUND_SHY_STACK_SQUISH) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY_4, ANIM_ShyGuy_Red_Anim07) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(36) - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_GUY_3, SOUND_FALL_QUICK) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(31) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY_3, ANIM_ShyGuy_Red_Anim0A) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GUY_3, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_GUY_3, EVT_FLOAT(1.0)) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_GUY_3, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) - EVT_CALL(FallPartTo, ACTOR_SELF, PRT_GUY_3, LVar0, 18, 0, 32) - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_GUY_3, SOUND_SHY_STACK_SQUISH) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY_3, ANIM_ShyGuy_Red_Anim07) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_4, EVT_FLOAT(1.1), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -3, 0) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_4, EVT_FLOAT(1.2), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -5, 0) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_4, EVT_FLOAT(1.1), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -3, 0) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_4, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(67) - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_GUY_2, SOUND_FALL_QUICK) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(62) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY_2, ANIM_ShyGuy_Red_Anim0A) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GUY_2, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_GUY_2, EVT_FLOAT(1.0)) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_GUY_2, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) - EVT_CALL(FallPartTo, ACTOR_SELF, PRT_GUY_2, LVar0, 36, 0, 28) - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_GUY_2, SOUND_SHY_STACK_SQUISH) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY_2, ANIM_ShyGuy_Red_Anim07) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_4, EVT_FLOAT(1.1), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_3, EVT_FLOAT(1.1), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -2, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, -4, 0) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_4, EVT_FLOAT(1.2), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_3, EVT_FLOAT(1.2), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -3, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, -6, 0) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_4, EVT_FLOAT(1.1), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_3, EVT_FLOAT(1.1), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -2, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, -4, 0) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_4, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_3, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, 0, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(98) - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_GUY_1, SOUND_FALL_QUICK) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(93) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY_1, ANIM_ShyGuy_Red_Anim0A) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GUY_1, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_GUY_1, EVT_FLOAT(1.0)) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_GUY_1, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) - EVT_CALL(FallPartTo, ACTOR_SELF, PRT_GUY_1, LVar0, 54, 0, 24) - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_GUY_1, SOUND_SHY_STACK_SQUISH) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY_1, ANIM_ShyGuy_Red_Anim07) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_4, EVT_FLOAT(1.1), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_3, EVT_FLOAT(1.1), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_2, EVT_FLOAT(1.1), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -1, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, -2, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_1, 0, -3, 0) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_4, EVT_FLOAT(1.2), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_3, EVT_FLOAT(1.2), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_2, EVT_FLOAT(1.2), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -2, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, -3, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_1, 0, -5, 0) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_4, EVT_FLOAT(1.1), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_3, EVT_FLOAT(1.1), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_2, EVT_FLOAT(1.1), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -1, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, -2, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_1, 0, -3, 0) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_4, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_3, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_2, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, 0, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, 0, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_1, 0, 0, 0) - EVT_WAIT(7) - EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_GUY_4, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GUY_1, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GUY_2, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GUY_3, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GUY_4, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_END_THREAD - EVT_ELSE - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_GUY_4, 200, 0, 47) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_GUY_3, 200, 0, 47) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_GUY_2, 200, 0, 47) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_GUY_1, 200, 0, 47) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY_4, ANIM_ShyGuy_Red_Anim04) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GUY_4, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_GUY_4, EVT_FLOAT(4.0)) - EVT_CALL(RunPartTo, ACTOR_SELF, PRT_GUY_4, 55, 0, 47, FALSE) - EVT_CALL(RunPartTo, ACTOR_SELF, PRT_GUY_4, 50, 0, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY_4, ANIM_ShyGuy_Red_Anim07) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(31) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY_3, ANIM_ShyGuy_Red_Anim04) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GUY_3, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_GUY_3, EVT_FLOAT(4.0)) - EVT_CALL(RunPartTo, ACTOR_SELF, PRT_GUY_3, 55, 0, 47, 36) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY_3, ANIM_ShyGuy_Red_Anim09) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_GUY_3, EVT_FLOAT(1.0)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_GUY_3, 50, 18, 0, 20, TRUE) - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_GUY_3, SOUND_SHY_STACK_SQUISH) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY_3, ANIM_ShyGuy_Red_Anim07) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_4, EVT_FLOAT(1.1), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -3, 0) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_4, EVT_FLOAT(1.2), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -5, 0) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_4, EVT_FLOAT(1.1), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -3, 0) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_4, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(77) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY_3, ANIM_ShyGuy_Red_Anim0A) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(62) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY_2, ANIM_ShyGuy_Red_Anim04) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GUY_2, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_GUY_2, EVT_FLOAT(4.0)) - EVT_CALL(RunPartTo, ACTOR_SELF, PRT_GUY_2, 55, 0, 47, 36) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY_2, ANIM_ShyGuy_Red_Anim09) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_GUY_2, EVT_FLOAT(1.0)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_GUY_2, 50, 36, 0, 20, TRUE) - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_GUY_2, SOUND_SHY_STACK_SQUISH) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY_2, ANIM_ShyGuy_Red_Anim07) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_4, EVT_FLOAT(1.1), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_3, EVT_FLOAT(1.1), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -2, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, -3, 0) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_4, EVT_FLOAT(1.2), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_3, EVT_FLOAT(1.2), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -3, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, -5, 0) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_4, EVT_FLOAT(1.1), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_3, EVT_FLOAT(1.1), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -2, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, -3, 0) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_4, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_3, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, 0, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(108) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY_2, ANIM_ShyGuy_Red_Anim0A) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY_1, ANIM_ShyGuy_Red_Anim04) - EVT_WAIT(143) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY_1, ANIM_ShyGuy_Red_Anim09) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY_1, ANIM_ShyGuy_Red_Anim0A) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(133) - EVT_CALL(GetActorPos, ACTOR_GENERAL, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, -3) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_GUY_1, LVar0, LVar1, LVar2) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim05) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GUY_1, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_ADD(LVar0, -20) - EVT_ADD(LVar1, 18) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_GUY_1, EVT_FLOAT(0.6)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_GUY_1, LVar0, LVar1, LVar2, 20, TRUE) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_GUY_1, EVT_FLOAT(0.3)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_GUY_1, 50, 54, 0, 30, TRUE) - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_GUY_1, SOUND_SHY_STACK_SQUISH) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GUY_1, ANIM_ShyGuy_Red_Anim07) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim04) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_4, EVT_FLOAT(1.1), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_3, EVT_FLOAT(1.1), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_2, EVT_FLOAT(1.1), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -1, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, -2, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_1, 0, -3, 0) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_4, EVT_FLOAT(1.2), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_3, EVT_FLOAT(1.2), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_2, EVT_FLOAT(1.2), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -2, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, -3, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_1, 0, -5, 0) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_4, EVT_FLOAT(1.1), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_3, EVT_FLOAT(1.1), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_2, EVT_FLOAT(1.1), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -1, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, -2, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_1, 0, -3, 0) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_4, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_3, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GUY_2, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, 0, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, 0, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GUY_1, 0, 0, 0) - EVT_WAIT(12) - EVT_CALL(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim03) - EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_GUY_4, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GUY_1, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GUY_2, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GUY_3, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GUY_4, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_CALL(SetActorVar, ACTOR_TANK, AVAR_Tank_StiltPhase, AVAL_StiltPhase_Next) - EVT_END_THREAD - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Still, ANIM_ShyStackGuy_Anim00) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Idle, ANIM_ShyStackGuy_Anim04) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, ANIM_ShyStackGuy_Anim08) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_ShyStackGuy_Anim10) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_ShyStackGuy_Anim14) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Attack, ANIM_ShyStackGuy_Anim1B) + Call(SetActorVar, ACTOR_SELF, AVAR_DefeatedCount, 0) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetActorVar, ACTOR_SELF, AVAR_IN_Order, LVar0) + IfEq(LVar0, 0) + Set(LVar0, 10) + Call(SetPartPos, ACTOR_SELF, PRT_GUY_4, LVar0, 200, 0) + Call(SetPartPos, ACTOR_SELF, PRT_GUY_3, LVar0, 200, 0) + Call(SetPartPos, ACTOR_SELF, PRT_GUY_2, LVar0, 200, 0) + Call(SetPartPos, ACTOR_SELF, PRT_GUY_1, LVar0, 200, 0) + Thread + Wait(5) + Call(PlaySoundAtPart, ACTOR_SELF, PRT_GUY_4, SOUND_FALL_QUICK) + EndThread + Thread + Call(SetAnimation, ACTOR_SELF, PRT_GUY_4, ANIM_ShyGuy_Red_Anim0A) + Call(SetPartFlagBits, ACTOR_SELF, PRT_GUY_4, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_GUY_4, Float(1.0)) + Call(SetPartSounds, ACTOR_SELF, PRT_GUY_4, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) + Call(FallPartTo, ACTOR_SELF, PRT_GUY_4, LVar0, 0, 0, 36) + Call(PlaySoundAtPart, ACTOR_SELF, PRT_GUY_4, SOUND_SHY_STACK_SQUISH) + Call(SetAnimation, ACTOR_SELF, PRT_GUY_4, ANIM_ShyGuy_Red_Anim07) + EndThread + Thread + Wait(36) + Call(PlaySoundAtPart, ACTOR_SELF, PRT_GUY_3, SOUND_FALL_QUICK) + EndThread + Thread + Wait(31) + Call(SetAnimation, ACTOR_SELF, PRT_GUY_3, ANIM_ShyGuy_Red_Anim0A) + Call(SetPartFlagBits, ACTOR_SELF, PRT_GUY_3, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_GUY_3, Float(1.0)) + Call(SetPartSounds, ACTOR_SELF, PRT_GUY_3, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) + Call(FallPartTo, ACTOR_SELF, PRT_GUY_3, LVar0, 18, 0, 32) + Call(PlaySoundAtPart, ACTOR_SELF, PRT_GUY_3, SOUND_SHY_STACK_SQUISH) + Call(SetAnimation, ACTOR_SELF, PRT_GUY_3, ANIM_ShyGuy_Red_Anim07) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_4, Float(1.1), Float(0.9), Float(1.0)) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -3, 0) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_4, Float(1.2), Float(0.8), Float(1.0)) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -5, 0) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_4, Float(1.1), Float(0.9), Float(1.0)) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -3, 0) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_4, Float(1.0), Float(1.0), Float(1.0)) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, 0, 0) + EndThread + Thread + Wait(67) + Call(PlaySoundAtPart, ACTOR_SELF, PRT_GUY_2, SOUND_FALL_QUICK) + EndThread + Thread + Wait(62) + Call(SetAnimation, ACTOR_SELF, PRT_GUY_2, ANIM_ShyGuy_Red_Anim0A) + Call(SetPartFlagBits, ACTOR_SELF, PRT_GUY_2, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_GUY_2, Float(1.0)) + Call(SetPartSounds, ACTOR_SELF, PRT_GUY_2, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) + Call(FallPartTo, ACTOR_SELF, PRT_GUY_2, LVar0, 36, 0, 28) + Call(PlaySoundAtPart, ACTOR_SELF, PRT_GUY_2, SOUND_SHY_STACK_SQUISH) + Call(SetAnimation, ACTOR_SELF, PRT_GUY_2, ANIM_ShyGuy_Red_Anim07) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_4, Float(1.1), Float(0.9), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_3, Float(1.1), Float(0.9), Float(1.0)) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -2, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, -4, 0) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_4, Float(1.2), Float(0.8), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_3, Float(1.2), Float(0.8), Float(1.0)) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -3, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, -6, 0) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_4, Float(1.1), Float(0.9), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_3, Float(1.1), Float(0.9), Float(1.0)) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -2, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, -4, 0) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_4, Float(1.0), Float(1.0), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_3, Float(1.0), Float(1.0), Float(1.0)) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, 0, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, 0, 0) + EndThread + Thread + Wait(98) + Call(PlaySoundAtPart, ACTOR_SELF, PRT_GUY_1, SOUND_FALL_QUICK) + EndThread + Thread + Wait(93) + Call(SetAnimation, ACTOR_SELF, PRT_GUY_1, ANIM_ShyGuy_Red_Anim0A) + Call(SetPartFlagBits, ACTOR_SELF, PRT_GUY_1, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_GUY_1, Float(1.0)) + Call(SetPartSounds, ACTOR_SELF, PRT_GUY_1, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) + Call(FallPartTo, ACTOR_SELF, PRT_GUY_1, LVar0, 54, 0, 24) + Call(PlaySoundAtPart, ACTOR_SELF, PRT_GUY_1, SOUND_SHY_STACK_SQUISH) + Call(SetAnimation, ACTOR_SELF, PRT_GUY_1, ANIM_ShyGuy_Red_Anim07) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_4, Float(1.1), Float(0.9), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_3, Float(1.1), Float(0.9), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_2, Float(1.1), Float(0.9), Float(1.0)) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -1, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, -2, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_1, 0, -3, 0) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_4, Float(1.2), Float(0.8), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_3, Float(1.2), Float(0.8), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_2, Float(1.2), Float(0.8), Float(1.0)) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -2, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, -3, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_1, 0, -5, 0) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_4, Float(1.1), Float(0.9), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_3, Float(1.1), Float(0.9), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_2, Float(1.1), Float(0.9), Float(1.0)) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -1, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, -2, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_1, 0, -3, 0) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_4, Float(1.0), Float(1.0), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_3, Float(1.0), Float(1.0), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_2, Float(1.0), Float(1.0), Float(1.0)) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, 0, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, 0, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_1, 0, 0, 0) + Wait(7) + Call(GetPartOffset, ACTOR_SELF, PRT_GUY_4, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartFlagBits, ACTOR_SELF, PRT_GUY_1, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_GUY_2, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_GUY_3, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_GUY_4, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(HPBarToHome, ACTOR_SELF) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + EndThread + Else + Call(SetPartPos, ACTOR_SELF, PRT_GUY_4, 200, 0, 47) + Call(SetPartPos, ACTOR_SELF, PRT_GUY_3, 200, 0, 47) + Call(SetPartPos, ACTOR_SELF, PRT_GUY_2, 200, 0, 47) + Call(SetPartPos, ACTOR_SELF, PRT_GUY_1, 200, 0, 47) + Thread + Call(SetAnimation, ACTOR_SELF, PRT_GUY_4, ANIM_ShyGuy_Red_Anim04) + Call(SetPartFlagBits, ACTOR_SELF, PRT_GUY_4, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_GUY_4, Float(4.0)) + Call(RunPartTo, ACTOR_SELF, PRT_GUY_4, 55, 0, 47, FALSE) + Call(RunPartTo, ACTOR_SELF, PRT_GUY_4, 50, 0, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_GUY_4, ANIM_ShyGuy_Red_Anim07) + EndThread + Thread + Wait(31) + Call(SetAnimation, ACTOR_SELF, PRT_GUY_3, ANIM_ShyGuy_Red_Anim04) + Call(SetPartFlagBits, ACTOR_SELF, PRT_GUY_3, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_GUY_3, Float(4.0)) + Call(RunPartTo, ACTOR_SELF, PRT_GUY_3, 55, 0, 47, 36) + Call(SetAnimation, ACTOR_SELF, PRT_GUY_3, ANIM_ShyGuy_Red_Anim09) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_GUY_3, Float(1.0)) + Call(JumpPartTo, ACTOR_SELF, PRT_GUY_3, 50, 18, 0, 20, TRUE) + Call(PlaySoundAtPart, ACTOR_SELF, PRT_GUY_3, SOUND_SHY_STACK_SQUISH) + Call(SetAnimation, ACTOR_SELF, PRT_GUY_3, ANIM_ShyGuy_Red_Anim07) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_4, Float(1.1), Float(0.9), Float(1.0)) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -3, 0) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_4, Float(1.2), Float(0.8), Float(1.0)) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -5, 0) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_4, Float(1.1), Float(0.9), Float(1.0)) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -3, 0) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_4, Float(1.0), Float(1.0), Float(1.0)) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, 0, 0) + EndThread + Thread + Wait(77) + Call(SetAnimation, ACTOR_SELF, PRT_GUY_3, ANIM_ShyGuy_Red_Anim0A) + EndThread + Thread + Wait(62) + Call(SetAnimation, ACTOR_SELF, PRT_GUY_2, ANIM_ShyGuy_Red_Anim04) + Call(SetPartFlagBits, ACTOR_SELF, PRT_GUY_2, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_GUY_2, Float(4.0)) + Call(RunPartTo, ACTOR_SELF, PRT_GUY_2, 55, 0, 47, 36) + Call(SetAnimation, ACTOR_SELF, PRT_GUY_2, ANIM_ShyGuy_Red_Anim09) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_GUY_2, Float(1.0)) + Call(JumpPartTo, ACTOR_SELF, PRT_GUY_2, 50, 36, 0, 20, TRUE) + Call(PlaySoundAtPart, ACTOR_SELF, PRT_GUY_2, SOUND_SHY_STACK_SQUISH) + Call(SetAnimation, ACTOR_SELF, PRT_GUY_2, ANIM_ShyGuy_Red_Anim07) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_4, Float(1.1), Float(0.9), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_3, Float(1.1), Float(0.9), Float(1.0)) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -2, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, -3, 0) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_4, Float(1.2), Float(0.8), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_3, Float(1.2), Float(0.8), Float(1.0)) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -3, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, -5, 0) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_4, Float(1.1), Float(0.9), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_3, Float(1.1), Float(0.9), Float(1.0)) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -2, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, -3, 0) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_4, Float(1.0), Float(1.0), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_3, Float(1.0), Float(1.0), Float(1.0)) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, 0, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, 0, 0) + EndThread + Thread + Wait(108) + Call(SetAnimation, ACTOR_SELF, PRT_GUY_2, ANIM_ShyGuy_Red_Anim0A) + EndThread + Thread + Call(SetAnimation, ACTOR_SELF, PRT_GUY_1, ANIM_ShyGuy_Red_Anim04) + Wait(143) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_GUY_1, ANIM_ShyGuy_Red_Anim09) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_GUY_1, ANIM_ShyGuy_Red_Anim0A) + EndThread + Thread + Wait(133) + Call(GetActorPos, ACTOR_GENERAL, LVar0, LVar1, LVar2) + Add(LVar1, -3) + Call(SetPartPos, ACTOR_SELF, PRT_GUY_1, LVar0, LVar1, LVar2) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim05) + Call(SetPartFlagBits, ACTOR_SELF, PRT_GUY_1, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Add(LVar0, -20) + Add(LVar1, 18) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_GUY_1, Float(0.6)) + Call(JumpPartTo, ACTOR_SELF, PRT_GUY_1, LVar0, LVar1, LVar2, 20, TRUE) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_GUY_1, Float(0.3)) + Call(JumpPartTo, ACTOR_SELF, PRT_GUY_1, 50, 54, 0, 30, TRUE) + Call(PlaySoundAtPart, ACTOR_SELF, PRT_GUY_1, SOUND_SHY_STACK_SQUISH) + Call(SetAnimation, ACTOR_SELF, PRT_GUY_1, ANIM_ShyGuy_Red_Anim07) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim04) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_4, Float(1.1), Float(0.9), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_3, Float(1.1), Float(0.9), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_2, Float(1.1), Float(0.9), Float(1.0)) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -1, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, -2, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_1, 0, -3, 0) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_4, Float(1.2), Float(0.8), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_3, Float(1.2), Float(0.8), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_2, Float(1.2), Float(0.8), Float(1.0)) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -2, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, -3, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_1, 0, -5, 0) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_4, Float(1.1), Float(0.9), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_3, Float(1.1), Float(0.9), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_2, Float(1.1), Float(0.9), Float(1.0)) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, -1, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, -2, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_1, 0, -3, 0) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_4, Float(1.0), Float(1.0), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_3, Float(1.0), Float(1.0), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_GUY_2, Float(1.0), Float(1.0), Float(1.0)) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_3, 0, 0, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_2, 0, 0, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GUY_1, 0, 0, 0) + Wait(12) + Call(SetAnimation, ACTOR_GENERAL, PRT_MAIN, ANIM_GeneralGuy_Anim03) + Call(GetPartOffset, ACTOR_SELF, PRT_GUY_4, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartFlagBits, ACTOR_SELF, PRT_GUY_1, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_GUY_2, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_GUY_3, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_GUY_4, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(HPBarToHome, ACTOR_SELF) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Call(SetActorVar, ACTOR_TANK, AVAR_Tank_StiltPhase, AVAL_StiltPhase_Next) + EndThread + EndIf + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_HIT) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_ELSE - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_DefeatedCount, LVarA) - EVT_IF_EQ(LVarA, 3) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_ELSE - EVT_CALL(GetDamageSource, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(DMG_SRC_SHELL_TOSS) - EVT_CASE_OR_EQ(DMG_SRC_POWER_SHELL) - EVT_CASE_OR_EQ(DMG_SRC_FIRE_SHELL) - EVT_EXEC_WAIT(N(EVS_SpinSmashLaunch)) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_SWITCH - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(EVENT_DEATH) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_ELSE - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_DefeatedCount, LVarA) - EVT_IF_EQ(LVarA, 3) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_ELSE - EVT_CALL(GetDamageSource, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(DMG_SRC_SHELL_TOSS) - EVT_CASE_OR_EQ(DMG_SRC_POWER_SHELL) - EVT_CASE_OR_EQ(DMG_SRC_FIRE_SHELL) - EVT_EXEC_WAIT(N(EVS_SpinSmashLaunch)) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_END_SWITCH - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET(LVar0, 1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, LVar1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_DefeatedCount, LVarA) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_ELSE - EVT_IF_EQ(LVarA, 3) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_ELSE - EVT_CALL(GetDamageSource, LVarA) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(DMG_SRC_SHELL_TOSS) - EVT_CASE_OR_EQ(DMG_SRC_POWER_SHELL) - EVT_CASE_OR_EQ(DMG_SRC_FIRE_SHELL) - EVT_EXEC_WAIT(N(EVS_SpinSmashLaunch)) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_END_SWITCH - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET(LVar0, 1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, LVar1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_DefeatedCount, LVarA) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar1) - EVT_ELSE - EVT_IF_EQ(LVarA, 3) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar1) - EVT_ELSE - EVT_CALL(GetDamageSource, LVarA) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(DMG_SRC_SHELL_TOSS) - EVT_CASE_OR_EQ(DMG_SRC_POWER_SHELL) - EVT_CASE_OR_EQ(DMG_SRC_FIRE_SHELL) - EVT_EXEC_WAIT(N(EVS_SpinSmashLaunch)) - EVT_SET_CONST(LVar1, -1) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar1) - EVT_END_SWITCH - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_SpinSmashHit)) - EVT_END_IF - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_SpinSmashHit)) - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_LAUNCH_HIT) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_SpinSmashLaunch)) - EVT_END_IF - EVT_CASE_EQ(EVENT_SPIN_SMASH_LAUNCH_DEATH) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_SpinSmashLaunch)) - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(N(EVS_SpinSmashDeath)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_SPIKE_TAUNT) - EVT_CALL(GetBattleFlags, LVar2) - EVT_IF_FLAG(LVar2, BS_FLAGS1_PARTNER_ACTING) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar2, MOVE_SPOOK) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Idle, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_WAIT(1000) - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Idle, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Idle, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_30) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar2) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(1000) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar2) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + CaseEq(EVENT_HIT_COMBO) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_HIT) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(EVS_Enemy_Hit) + Else + Call(GetActorVar, ACTOR_SELF, AVAR_DefeatedCount, LVarA) + IfEq(LVarA, 3) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(EVS_Enemy_Hit) + Else + Call(GetDamageSource, LVar0) + Switch(LVar0) + CaseOrEq(DMG_SRC_SHELL_TOSS) + CaseOrEq(DMG_SRC_POWER_SHELL) + CaseOrEq(DMG_SRC_FIRE_SHELL) + ExecWait(N(EVS_SpinSmashLaunch)) + EndCaseGroup + CaseDefault + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(EVS_Enemy_Hit) + EndSwitch + EndIf + EndIf + CaseEq(EVENT_DEATH) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(EVS_Enemy_Hit) + Wait(10) + Else + Call(GetActorVar, ACTOR_SELF, AVAR_DefeatedCount, LVarA) + IfEq(LVarA, 3) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(EVS_Enemy_Hit) + Wait(10) + Else + Call(GetDamageSource, LVar0) + Switch(LVar0) + CaseOrEq(DMG_SRC_SHELL_TOSS) + CaseOrEq(DMG_SRC_POWER_SHELL) + CaseOrEq(DMG_SRC_FIRE_SHELL) + ExecWait(N(EVS_SpinSmashLaunch)) + EndCaseGroup + CaseDefault + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(EVS_Enemy_Hit) + Wait(10) + EndSwitch + EndIf + EndIf + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_BURN_HIT) + Set(LVar0, 1) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, LVar1) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar2) + Call(GetActorVar, ACTOR_SELF, AVAR_DefeatedCount, LVarA) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfFlag(LVar5, STATUS_FLAG_SHRINK) + ExecWait(EVS_Enemy_BurnHit) + Else + IfEq(LVarA, 3) + ExecWait(EVS_Enemy_BurnHit) + Else + Call(GetDamageSource, LVarA) + Switch(LVarA) + CaseOrEq(DMG_SRC_SHELL_TOSS) + CaseOrEq(DMG_SRC_POWER_SHELL) + CaseOrEq(DMG_SRC_FIRE_SHELL) + ExecWait(N(EVS_SpinSmashLaunch)) + EndCaseGroup + CaseDefault + ExecWait(EVS_Enemy_BurnHit) + EndSwitch + EndIf + EndIf + CaseEq(EVENT_BURN_DEATH) + Set(LVar0, 1) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, LVar1) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar2) + Call(GetActorVar, ACTOR_SELF, AVAR_DefeatedCount, LVarA) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfFlag(LVar5, STATUS_FLAG_SHRINK) + ExecWait(EVS_Enemy_BurnHit) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar1) + Else + IfEq(LVarA, 3) + ExecWait(EVS_Enemy_BurnHit) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar1) + Else + Call(GetDamageSource, LVarA) + Switch(LVarA) + CaseOrEq(DMG_SRC_SHELL_TOSS) + CaseOrEq(DMG_SRC_POWER_SHELL) + CaseOrEq(DMG_SRC_FIRE_SHELL) + ExecWait(N(EVS_SpinSmashLaunch)) + SetConst(LVar1, -1) + EndCaseGroup + CaseDefault + ExecWait(EVS_Enemy_BurnHit) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar1) + EndSwitch + EndIf + EndIf + SetConst(LVar0, PRT_MAIN) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfFlag(LVar5, STATUS_FLAG_SHRINK) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(EVS_Enemy_Hit) + Else + ExecWait(N(EVS_SpinSmashHit)) + EndIf + CaseEq(EVENT_SPIN_SMASH_DEATH) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfFlag(LVar5, STATUS_FLAG_SHRINK) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(EVS_Enemy_Hit) + Else + ExecWait(N(EVS_SpinSmashHit)) + EndIf + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_SPIN_SMASH_LAUNCH_HIT) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfFlag(LVar5, STATUS_FLAG_SHRINK) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(EVS_Enemy_Hit) + Else + ExecWait(N(EVS_SpinSmashLaunch)) + EndIf + CaseEq(EVENT_SPIN_SMASH_LAUNCH_DEATH) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfFlag(LVar5, STATUS_FLAG_SHRINK) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(EVS_Enemy_Hit) + Else + ExecWait(N(EVS_SpinSmashLaunch)) + EndIf + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(N(EVS_SpinSmashDeath)) + Return + CaseEq(EVENT_SHOCK_HIT) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_SPIKE_TAUNT) + Call(GetBattleFlags, LVar2) + IfFlag(LVar2, BS_FLAGS1_PARTNER_ACTING) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + IfEq(LVar2, MOVE_SPOOK) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndIf + EndIf + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Idle, LVar1) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Wait(1000) + CaseEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Idle, LVar1) + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(EVENT_END_FIRST_STRIKE) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Idle, LVar1) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_30) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar2) + ExecWait(EVS_Enemy_Hit) + Wait(1000) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar2) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_SpinAround) = { - EVT_SET(LVar0, 0) - EVT_LABEL(0) - EVT_SUB(LVar0, 30) - EVT_IF_LT(LVar0, 0) - EVT_ADD(LVar0, 360) - EVT_END_IF - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVar0, 0) + Label(0) + Sub(LVar0, 30) + IfLt(LVar0, 0) + Add(LVar0, 360) + EndIf + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_SpinSmashHit) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_DefeatedCount, LVarA) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_SpinSmashHit_Stack)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_SpinSmashHit_Stack)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_SpinSmashHit_Stack)) - EVT_CASE_EQ(3) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_EXEC_WAIT(N(EVS_SpinSmashHit_Top)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_DefeatedCount, LVarA) + Switch(LVarA) + CaseEq(0) + ExecWait(N(EVS_SpinSmashHit_Stack)) + CaseEq(1) + ExecWait(N(EVS_SpinSmashHit_Stack)) + CaseEq(2) + ExecWait(N(EVS_SpinSmashHit_Stack)) + CaseEq(3) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + ExecWait(N(EVS_SpinSmashHit_Top)) + EndSwitch + Return + End }; EvtScript N(EVS_SpinSmashHit_Top) = { - EVT_EXEC_GET_TID(N(EVS_SpinAround), LVarE) - EVT_CALL(GetPartEventFlags, ACTOR_SELF, LVar0, LVarA) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(CreateCurrentPosTargetList, TARGET_FLAG_GROUND | TARGET_FLAG_ALLOW_TARGET_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerID, LVar1) - EVT_CALL(GetOwnerTarget, LVar0, LVar9) - EVT_IF_NE(LVar1, LVar0) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_GOTO(0) - EVT_END_IF - EVT_LABEL(1) - EVT_ADD(LVarF, 1) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_EQ(LVar0, ITER_NO_MORE) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GetOwnerTarget, LVar0, LVar9) - EVT_CALL(GetActorFlags, LVar0, LVar1) - EVT_IF_FLAG(LVar1, ACTOR_FLAG_TARGET_ONLY) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.1)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(DispatchDamageEvent, LVar0, 1, EVENT_SPIN_SMASH_LAUNCH_HIT) - EVT_GOTO(1) - EVT_LABEL(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.1)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(GetActorSize, ACTOR_SELF, LVar0, LVar3) - EVT_DIV(LVar3, 2) - EVT_SET(LVar4, 70) - EVT_SUB(LVar4, LVar3) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar5, LVar4) - EVT_SUB(LVar5, LVar0) - EVT_IF_LT(LVar5, 6) - EVT_SET(LVar5, 1) - EVT_ELSE - EVT_SET(LVar5, 0) - EVT_END_IF - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, LVar5, FALSE, TRUE, FALSE) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar6, LVar7, LVar8) - EVT_SUB(LVar4, 18) - EVT_IF_LE(LVar4, LVar6) - EVT_SET(LVar4, LVar6) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) - EVT_ELSE - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar4, LVar7, LVar8) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) - EVT_END_IF - EVT_KILL_THREAD(LVarE) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_WAIT(10) - EVT_RETURN - EVT_END + ExecGetTID(N(EVS_SpinAround), LVarE) + Call(GetPartEventFlags, ACTOR_SELF, LVar0, LVarA) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(CreateCurrentPosTargetList, TARGET_FLAG_GROUND | TARGET_FLAG_ALLOW_TARGET_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerID, LVar1) + Call(GetOwnerTarget, LVar0, LVar9) + IfNe(LVar1, LVar0) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + Goto(0) + EndIf + Label(1) + Add(LVarF, 1) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfEq(LVar0, ITER_NO_MORE) + Goto(10) + EndIf + Call(GetOwnerTarget, LVar0, LVar9) + Call(GetActorFlags, LVar0, LVar1) + IfFlag(LVar1, ACTOR_FLAG_TARGET_ONLY) + Goto(1) + EndIf + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.1)) + Call(SetActorSpeed, ACTOR_SELF, Float(7.0)) + Call(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetOwnerTarget, LVar0, LVar1) + Call(DispatchDamageEvent, LVar0, 1, EVENT_SPIN_SMASH_LAUNCH_HIT) + Goto(1) + Label(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.1)) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(GetActorSize, ACTOR_SELF, LVar0, LVar3) + Div(LVar3, 2) + Set(LVar4, 70) + Sub(LVar4, LVar3) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar5, LVar4) + Sub(LVar5, LVar0) + IfLt(LVar5, 6) + Set(LVar5, 1) + Else + Set(LVar5, 0) + EndIf + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, LVar5, FALSE, TRUE, FALSE) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar6, LVar7, LVar8) + Sub(LVar4, 18) + IfLe(LVar4, LVar6) + Set(LVar4, LVar6) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) + Else + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar4, LVar7, LVar8) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) + EndIf + KillThread(LVarE) + Call(SetActorYaw, ACTOR_SELF, 0) + Wait(10) + Return + End }; EvtScript N(EVS_DetachMember) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_DefeatedCount, LVarA) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_DefeatedCount, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Still, ANIM_ShyStackGuy_Anim01) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Idle, ANIM_ShyStackGuy_Anim05) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, ANIM_ShyStackGuy_Anim09) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_ShyStackGuy_Anim11) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_ShyStackGuy_Anim15) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Attack, ANIM_ShyStackGuy_Anim1C) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ThreeStackAnims))) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_1, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_1, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_2, ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_2, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) - EVT_CALL(SetActorSize, ACTOR_SELF, 62, EVT_IGNORE_ARG) - EVT_CALL(SetActorStatusOffsets, ACTOR_SELF, 0, -20, 0, -20) - EVT_CALL(SetPartSize, ACTOR_SELF, PRT_MAIN, 57, 30) - EVT_CASE_EQ(1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_DefeatedCount, 2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Still, ANIM_ShyStackGuy_Anim02) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Idle, ANIM_ShyStackGuy_Anim06) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, ANIM_ShyStackGuy_Anim0A) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_ShyStackGuy_Anim12) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_ShyStackGuy_Anim16) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Attack, ANIM_ShyStackGuy_Anim1D) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(TwoStackAnims))) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_2, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_2, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_3, ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_3, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) - EVT_CALL(SetActorSize, ACTOR_SELF, 44, EVT_IGNORE_ARG) - EVT_CALL(SetActorStatusOffsets, ACTOR_SELF, 0, -40, 0, -40) - EVT_CALL(SetPartSize, ACTOR_SELF, PRT_MAIN, 39, 30) - EVT_CASE_EQ(2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_DefeatedCount, 3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Still, ANIM_ShyStackGuy_Anim03) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Idle, ANIM_ShyStackGuy_Anim07) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, ANIM_ShyStackGuy_Anim0B) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_ShyStackGuy_Anim13) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_ShyStackGuy_Anim17) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Attack, ANIM_ShyStackGuy_Anim1E) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(OneStackAnims))) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_3, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_3, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_4, ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STACK_4, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) - EVT_CALL(SetActorSize, ACTOR_SELF, 26, EVT_IGNORE_ARG) - EVT_CALL(SetActorStatusOffsets, ACTOR_SELF, 0, -60, 0, -60) - EVT_CALL(SetPartSize, ACTOR_SELF, PRT_MAIN, 21, 30) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_DefeatedCount, LVarA) + Switch(LVarA) + CaseEq(0) + Call(SetActorVar, ACTOR_SELF, AVAR_DefeatedCount, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Still, ANIM_ShyStackGuy_Anim01) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Idle, ANIM_ShyStackGuy_Anim05) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, ANIM_ShyStackGuy_Anim09) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_ShyStackGuy_Anim11) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_ShyStackGuy_Anim15) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Attack, ANIM_ShyStackGuy_Anim1C) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ThreeStackAnims))) + Call(SetPartFlagBits, ACTOR_SELF, PRT_STACK_1, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_STACK_1, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_STACK_2, ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_STACK_2, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) + Call(SetActorSize, ACTOR_SELF, 62, EVT_IGNORE_ARG) + Call(SetActorStatusOffsets, ACTOR_SELF, 0, -20, 0, -20) + Call(SetPartSize, ACTOR_SELF, PRT_MAIN, 57, 30) + CaseEq(1) + Call(SetActorVar, ACTOR_SELF, AVAR_DefeatedCount, 2) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Still, ANIM_ShyStackGuy_Anim02) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Idle, ANIM_ShyStackGuy_Anim06) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, ANIM_ShyStackGuy_Anim0A) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_ShyStackGuy_Anim12) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_ShyStackGuy_Anim16) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Attack, ANIM_ShyStackGuy_Anim1D) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(TwoStackAnims))) + Call(SetPartFlagBits, ACTOR_SELF, PRT_STACK_2, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_STACK_2, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_STACK_3, ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_STACK_3, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) + Call(SetActorSize, ACTOR_SELF, 44, EVT_IGNORE_ARG) + Call(SetActorStatusOffsets, ACTOR_SELF, 0, -40, 0, -40) + Call(SetPartSize, ACTOR_SELF, PRT_MAIN, 39, 30) + CaseEq(2) + Call(SetActorVar, ACTOR_SELF, AVAR_DefeatedCount, 3) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Still, ANIM_ShyStackGuy_Anim03) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Idle, ANIM_ShyStackGuy_Anim07) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, ANIM_ShyStackGuy_Anim0B) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_ShyStackGuy_Anim13) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_ShyStackGuy_Anim17) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Attack, ANIM_ShyStackGuy_Anim1E) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(OneStackAnims))) + Call(SetPartFlagBits, ACTOR_SELF, PRT_STACK_3, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_STACK_3, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_STACK_4, ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_STACK_4, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) + Call(SetActorSize, ACTOR_SELF, 26, EVT_IGNORE_ARG) + Call(SetActorStatusOffsets, ACTOR_SELF, 0, -60, 0, -60) + Call(SetPartSize, ACTOR_SELF, PRT_MAIN, 21, 30) + EndSwitch + Return + End }; EvtScript N(EVS_DropStack) = { - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 18) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar1) - EVT_WAIT(2) - EVT_SUB(LVar3, 1) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(3) - EVT_SUB(LVar3, 2) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(2) - EVT_SUB(LVar3, 3) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(1) - EVT_SUB(LVar3, 5) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(1) - EVT_SUB(LVar3, 7) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar3, 2) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar3, 3) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar3, 3) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(1) - EVT_SUB(LVar3, 3) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(1) - EVT_SUB(LVar3, 3) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(1) - EVT_SUB(LVar3, 2) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SHY_STACK_SQUISH) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 18) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar3, LVar1) + Wait(2) + Sub(LVar3, 1) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(3) + Sub(LVar3, 2) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(2) + Sub(LVar3, 3) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(1) + Sub(LVar3, 5) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(1) + Sub(LVar3, 7) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(1) + Add(LVar3, 2) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(1) + Add(LVar3, 3) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(1) + Add(LVar3, 3) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(1) + Sub(LVar3, 3) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(1) + Sub(LVar3, 3) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(1) + Sub(LVar3, 2) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SHY_STACK_SQUISH) + EndThread + Return + End }; EvtScript N(EVS_SpinSmashHit_Stack) = { - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(N(PrintDebugValue), EVT_PTR("X"), LVar0) - EVT_CALL(N(PrintDebugValue), EVT_PTR("Y"), LVar1) - EVT_CALL(N(PrintDebugValue), EVT_PTR("Z"), LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_KNOCKOFF, ANIM_ShyStackDamage_Anim00) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_KNOCKOFF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_KNOCKOFF, 0, 0, 0) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_KNOCKOFF, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_EXEC_WAIT(N(EVS_DetachMember)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_EXEC_WAIT(N(EVS_DropStack)) - EVT_CALL(CreateCurrentPosTargetList, TARGET_FLAG_GROUND | TARGET_FLAG_PRIMARY_ONLY | TARGET_FLAG_ALLOW_TARGET_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerID, LVar1) - EVT_CALL(GetOwnerTarget, LVar0, LVar9) - EVT_IF_NE(LVar1, LVar0) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_GOTO(0) - EVT_END_IF - EVT_LABEL(1) - EVT_ADD(LVarF, 1) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_CALL(N(PrintDebugValue), EVT_PTR("T"), LVar0) - EVT_IF_EQ(LVar0, ITER_NO_MORE) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GetOwnerTarget, LVar0, LVar9) - EVT_CALL(GetActorFlags, LVar0, LVar1) - EVT_IF_FLAG(LVar1, ACTOR_FLAG_TARGET_ONLY) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetOwnerID, LVar0) - EVT_CALL(N(PrintDebugValue), EVT_PTR("MYSELF ID"), LVar0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(N(PrintDebugValue), EVT_PTR("TARGET ID"), LVar0) - EVT_CALL(N(PrintDebugValue), EVT_PTR("TARGET PARTS ID"), LVar1) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_KNOCKOFF, EVT_FLOAT(0.1)) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_KNOCKOFF, EVT_FLOAT(7.0)) - EVT_CALL(N(PrintDebugValue), EVT_PTR("TX"), LVar0) - EVT_CALL(N(PrintDebugValue), EVT_PTR("TY"), LVar1) - EVT_CALL(N(PrintDebugValue), EVT_PTR("TZ"), LVar2) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_KNOCKOFF, LVar0, LVar1, LVar2, 0, TRUE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(DispatchDamageEvent, LVar0, 1, EVENT_SPIN_SMASH_LAUNCH_HIT) - EVT_GOTO(1) - EVT_LABEL(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_KNOCKOFF, EVT_FLOAT(0.1)) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_KNOCKOFF, EVT_FLOAT(6.0)) - EVT_CALL(GetActorSize, ACTOR_SELF, LVar0, LVar3) - EVT_DIV(LVar3, 2) - EVT_SET(LVar4, 70) - EVT_SUB(LVar4, LVar3) - EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_KNOCKOFF, LVar0, LVar1, LVar2) - EVT_SET(LVar5, LVar4) - EVT_SUB(LVar5, LVar0) - EVT_IF_LT(LVar5, 6) - EVT_SET(LVar5, 1) - EVT_ELSE - EVT_SET(LVar5, 0) - EVT_END_IF - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_KNOCKOFF, LVar4, LVar1, LVar2, LVar5, TRUE) - EVT_SUB(LVar4, 18) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_KNOCKOFF, EVT_FLOAT(1.5)) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_KNOCKOFF, EVT_FLOAT(3.0)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_KNOCKOFF, LVar4, LVar1, LVar2, 12, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_KNOCKOFF, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_KNOCKOFF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_KNOCKOFF, SOUND_ACTOR_DEATH) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(12) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_KNOCKOFF, LVar0, 0, 0) - EVT_ADD(LVar0, 8) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_KNOCKOFF, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_RETURN - EVT_END + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(N(PrintDebugValue), Ref("X"), LVar0) + Call(N(PrintDebugValue), Ref("Y"), LVar1) + Call(N(PrintDebugValue), Ref("Z"), LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_KNOCKOFF, ANIM_ShyStackDamage_Anim00) + Call(SetPartPos, ACTOR_SELF, PRT_KNOCKOFF, LVar0, LVar1, LVar2) + Call(SetPartRotation, ACTOR_SELF, PRT_KNOCKOFF, 0, 0, 0) + Call(SetPartFlagBits, ACTOR_SELF, PRT_KNOCKOFF, ACTOR_PART_FLAG_INVISIBLE, FALSE) + ExecWait(N(EVS_DetachMember)) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + ExecWait(N(EVS_DropStack)) + Call(CreateCurrentPosTargetList, TARGET_FLAG_GROUND | TARGET_FLAG_PRIMARY_ONLY | TARGET_FLAG_ALLOW_TARGET_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerID, LVar1) + Call(GetOwnerTarget, LVar0, LVar9) + IfNe(LVar1, LVar0) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + Goto(0) + EndIf + Label(1) + Add(LVarF, 1) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + Call(N(PrintDebugValue), Ref("T"), LVar0) + IfEq(LVar0, ITER_NO_MORE) + Goto(10) + EndIf + Call(GetOwnerTarget, LVar0, LVar9) + Call(GetActorFlags, LVar0, LVar1) + IfFlag(LVar1, ACTOR_FLAG_TARGET_ONLY) + Goto(1) + EndIf + Call(GetOwnerID, LVar0) + Call(N(PrintDebugValue), Ref("MYSELF ID"), LVar0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(N(PrintDebugValue), Ref("TARGET ID"), LVar0) + Call(N(PrintDebugValue), Ref("TARGET PARTS ID"), LVar1) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_KNOCKOFF, Float(0.1)) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_KNOCKOFF, Float(7.0)) + Call(N(PrintDebugValue), Ref("TX"), LVar0) + Call(N(PrintDebugValue), Ref("TY"), LVar1) + Call(N(PrintDebugValue), Ref("TZ"), LVar2) + Call(JumpPartTo, ACTOR_SELF, PRT_KNOCKOFF, LVar0, LVar1, LVar2, 0, TRUE) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetOwnerTarget, LVar0, LVar1) + Call(DispatchDamageEvent, LVar0, 1, EVENT_SPIN_SMASH_LAUNCH_HIT) + Goto(1) + Label(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_KNOCKOFF, Float(0.1)) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_KNOCKOFF, Float(6.0)) + Call(GetActorSize, ACTOR_SELF, LVar0, LVar3) + Div(LVar3, 2) + Set(LVar4, 70) + Sub(LVar4, LVar3) + Call(GetPartOffset, ACTOR_SELF, PRT_KNOCKOFF, LVar0, LVar1, LVar2) + Set(LVar5, LVar4) + Sub(LVar5, LVar0) + IfLt(LVar5, 6) + Set(LVar5, 1) + Else + Set(LVar5, 0) + EndIf + Call(JumpPartTo, ACTOR_SELF, PRT_KNOCKOFF, LVar4, LVar1, LVar2, LVar5, TRUE) + Sub(LVar4, 18) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_KNOCKOFF, Float(1.5)) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_KNOCKOFF, Float(3.0)) + Call(JumpPartTo, ACTOR_SELF, PRT_KNOCKOFF, LVar4, LVar1, LVar2, 12, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_KNOCKOFF, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(GetPartOffset, ACTOR_SELF, PRT_KNOCKOFF, LVar0, LVar1, LVar2) + Add(LVar1, 10) + Call(PlaySoundAtPart, ACTOR_SELF, PRT_KNOCKOFF, SOUND_ACTOR_DEATH) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) + Set(LVar0, 0) + Loop(12) + Call(SetPartRotation, ACTOR_SELF, PRT_KNOCKOFF, LVar0, 0, 0) + Add(LVar0, 8) + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_SELF, PRT_KNOCKOFF, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Return + End }; EvtScript N(EVS_SpinSmashLaunch) = { - EVT_CALL(GetDamageSource, LVar0) - EVT_IF_EQ(LVar0, DMG_SRC_FIRE_SHELL) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_KNOCKOFF, ANIM_ShyStackDamage_Anim01) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_KNOCKOFF, ANIM_ShyStackDamage_Anim00) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(N(PrintDebugValue), EVT_PTR("X"), LVar0) - EVT_CALL(N(PrintDebugValue), EVT_PTR("Y"), LVar1) - EVT_CALL(N(PrintDebugValue), EVT_PTR("Z"), LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_KNOCKOFF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_KNOCKOFF, 0, 0, 0) - EVT_EXEC_WAIT(N(EVS_DetachMember)) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar1) - EVT_SWITCH(LVar1) - EVT_CASE_OR_EQ(EVENT_BURN_HIT) - EVT_CASE_OR_EQ(EVENT_BURN_DEATH) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, LVar1) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_KNOCKOFF, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_EXEC_WAIT(N(EVS_DropStack)) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(30) - EVT_ADD(LVar0, 24) - EVT_CALL(SetPartYaw, ACTOR_SELF, PRT_KNOCKOFF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartYaw, ACTOR_SELF, PRT_KNOCKOFF, LVar0) - EVT_END_THREAD - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_KNOCKOFF, EVT_FLOAT(3.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_KNOCKOFF, EVT_FLOAT(0.5)) - EVT_CALL(GetActorSize, ACTOR_SELF, LVar0, LVar3) - EVT_DIV(LVar3, 2) - EVT_SET(LVar4, 70) - EVT_SUB(LVar4, LVar3) - EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_KNOCKOFF, LVar0, LVar1, LVar2) - EVT_SET(LVar5, LVar4) - EVT_SUB(LVar5, LVar0) - EVT_IF_LT(LVar5, 6) - EVT_SET(LVar5, 1) - EVT_ELSE - EVT_SET(LVar5, 0) - EVT_END_IF - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_KNOCKOFF, LVar4, LVar1, LVar2, LVar5, TRUE) - EVT_SET(LVar1, 0) - EVT_SUB(LVar0, 10) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_KNOCKOFF, LVar0, LVar1, LVar2, 10, TRUE) - EVT_WAIT(20) - EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_KNOCKOFF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_KNOCKOFF, SOUND_ACTOR_DEATH) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(12) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_KNOCKOFF, LVar0, 0, 0) - EVT_ADD(LVar0, 8) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_KNOCKOFF, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_KNOCKOFF, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorSize, ACTOR_SELF, LVar3, LVar4) - EVT_DIV(LVar3, 2) - EVT_ADD(LVar1, LVar3) - EVT_ADD(LVar2, 5) - EVT_DIVF(LVar3, EVT_FLOAT(10.0)) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, LVar3, 10, 0) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetDamageSource, LVar0) + IfEq(LVar0, DMG_SRC_FIRE_SHELL) + Call(SetAnimation, ACTOR_SELF, PRT_KNOCKOFF, ANIM_ShyStackDamage_Anim01) + Else + Call(SetAnimation, ACTOR_SELF, PRT_KNOCKOFF, ANIM_ShyStackDamage_Anim00) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(N(PrintDebugValue), Ref("X"), LVar0) + Call(N(PrintDebugValue), Ref("Y"), LVar1) + Call(N(PrintDebugValue), Ref("Z"), LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_KNOCKOFF, LVar0, LVar1, LVar2) + Call(SetPartRotation, ACTOR_SELF, PRT_KNOCKOFF, 0, 0, 0) + ExecWait(N(EVS_DetachMember)) + Call(GetLastEvent, ACTOR_SELF, LVar1) + Switch(LVar1) + CaseOrEq(EVENT_BURN_HIT) + CaseOrEq(EVENT_BURN_DEATH) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, LVar1) + EndCaseGroup + CaseDefault + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar1) + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_KNOCKOFF, ACTOR_PART_FLAG_INVISIBLE, FALSE) + ExecWait(N(EVS_DropStack)) + Thread + Set(LVar0, 0) + Loop(30) + Add(LVar0, 24) + Call(SetPartYaw, ACTOR_SELF, PRT_KNOCKOFF, LVar0) + Wait(1) + EndLoop + Call(SetPartYaw, ACTOR_SELF, PRT_KNOCKOFF, LVar0) + EndThread + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_KNOCKOFF, Float(3.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_KNOCKOFF, Float(0.5)) + Call(GetActorSize, ACTOR_SELF, LVar0, LVar3) + Div(LVar3, 2) + Set(LVar4, 70) + Sub(LVar4, LVar3) + Call(GetPartOffset, ACTOR_SELF, PRT_KNOCKOFF, LVar0, LVar1, LVar2) + Set(LVar5, LVar4) + Sub(LVar5, LVar0) + IfLt(LVar5, 6) + Set(LVar5, 1) + Else + Set(LVar5, 0) + EndIf + Call(JumpPartTo, ACTOR_SELF, PRT_KNOCKOFF, LVar4, LVar1, LVar2, LVar5, TRUE) + Set(LVar1, 0) + Sub(LVar0, 10) + Call(JumpPartTo, ACTOR_SELF, PRT_KNOCKOFF, LVar0, LVar1, LVar2, 10, TRUE) + Wait(20) + Call(GetPartOffset, ACTOR_SELF, PRT_KNOCKOFF, LVar0, LVar1, LVar2) + Add(LVar1, 10) + Call(PlaySoundAtPart, ACTOR_SELF, PRT_KNOCKOFF, SOUND_ACTOR_DEATH) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) + Set(LVar0, 0) + Loop(12) + Call(SetPartRotation, ACTOR_SELF, PRT_KNOCKOFF, LVar0, 0, 0) + Add(LVar0, 8) + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_SELF, PRT_KNOCKOFF, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_KNOCKOFF, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_BURN_HIT) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hurt, LVar0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorSize, ACTOR_SELF, LVar3, LVar4) + Div(LVar3, 2) + Add(LVar1, LVar3) + Add(LVar2, 5) + DivF(LVar3, Float(10.0)) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, LVar3, 10, 0) + CaseEq(EVENT_BURN_DEATH) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) + CaseDefault + EndSwitch + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Attack, LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_WAIT(20) - EVT_ADD(LVar0, 4) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SLINGSHOT_DRAW) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SLINGSHOT_FIRE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVar5, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShotsToFire, 0) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SET(LVar5, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_DefeatedCount, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShotsToFire, 4) - EVT_CASE_EQ(1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShotsToFire, 3) - EVT_CASE_EQ(2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShotsToFire, 2) - EVT_CASE_EQ(3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShotsToFire, 1) - EVT_CASE_DEFAULT - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShotsToFire, 1) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_SET(LVar1, LVar5) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_DefeatedCount, LVar0) - EVT_IF_LE(LVar0, 0) - EVT_SET(LVar0, 0) - EVT_EXEC(N(EVS_ShootRock)) - EVT_END_IF - EVT_IF_LE(LVar0, 1) - EVT_SET(LVar0, 1) - EVT_EXEC(N(EVS_ShootRock)) - EVT_END_IF - EVT_IF_LE(LVar0, 2) - EVT_SET(LVar0, 2) - EVT_EXEC(N(EVS_ShootRock)) - EVT_END_IF - EVT_SET(LVar0, 3) - EVT_EXEC(N(EVS_ShootRock)) - EVT_WAIT(10) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ShotsToFire, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(1) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SHOOT_ONE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(2) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SHOOT_TWO, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(3) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SHOOT_THREE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(4) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SHOOT_FOUR, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_DEFAULT - EVT_SWITCH(LVarF) - EVT_CASE_EQ(HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_END_SWITCH - EVT_SET(LVarF, LVar0) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(HIT_RESULT_10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(15) - EVT_WAIT(15) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Attack, LVar0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) + Wait(20) + Add(LVar0, 4) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SLINGSHOT_DRAW) + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SLINGSHOT_FIRE) + Call(EnemyTestTarget, ACTOR_SELF, LVarF, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarF) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVar5, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_ShotsToFire, 0) + EndCaseGroup + CaseDefault + Set(LVar5, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_DefeatedCount, LVar0) + Switch(LVar0) + CaseEq(0) + Call(SetActorVar, ACTOR_SELF, AVAR_ShotsToFire, 4) + CaseEq(1) + Call(SetActorVar, ACTOR_SELF, AVAR_ShotsToFire, 3) + CaseEq(2) + Call(SetActorVar, ACTOR_SELF, AVAR_ShotsToFire, 2) + CaseEq(3) + Call(SetActorVar, ACTOR_SELF, AVAR_ShotsToFire, 1) + CaseDefault + Call(SetActorVar, ACTOR_SELF, AVAR_ShotsToFire, 1) + EndSwitch + EndSwitch + Set(LVar1, LVar5) + Call(GetActorVar, ACTOR_SELF, AVAR_DefeatedCount, LVar0) + IfLe(LVar0, 0) + Set(LVar0, 0) + Exec(N(EVS_ShootRock)) + EndIf + IfLe(LVar0, 1) + Set(LVar0, 1) + Exec(N(EVS_ShootRock)) + EndIf + IfLe(LVar0, 2) + Set(LVar0, 2) + Exec(N(EVS_ShootRock)) + EndIf + Set(LVar0, 3) + Exec(N(EVS_ShootRock)) + Wait(10) + Call(GetActorVar, ACTOR_SELF, AVAR_ShotsToFire, LVar0) + Switch(LVar0) + CaseEq(1) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SHOOT_ONE, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(2) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SHOOT_TWO, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(3) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SHOOT_THREE, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(4) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SHOOT_FOUR, BS_FLAGS1_TRIGGER_EVENTS) + CaseDefault + Switch(LVarF) + CaseEq(HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + CaseDefault + EndSwitch + EndSwitch + Set(LVarF, LVar0) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(HIT_RESULT_10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(15) + Wait(15) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_ShootRock) = { - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarF) - EVT_IF_FLAG(LVarF, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_ROCK_1, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_ROCK_2, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_ROCK_3, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_ROCK_4, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_ADD(LVar3, -4) - EVT_ADD(LVar4, 28) - EVT_SET(LVar2, 9) - EVT_CASE_EQ(1) - EVT_ADD(LVar3, -4) - EVT_ADD(LVar4, 21) - EVT_SET(LVar2, 8) - EVT_CASE_EQ(2) - EVT_ADD(LVar3, -4) - EVT_ADD(LVar4, 14) - EVT_SET(LVar2, 7) - EVT_CASE_DEFAULT - EVT_ADD(LVar3, -4) - EVT_ADD(LVar4, 7) - EVT_SET(LVar2, 6) - EVT_END_SWITCH - EVT_ELSE - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_ROCK_1, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_ROCK_2, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_ROCK_3, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_ROCK_4, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_ADD(LVar3, -10) - EVT_ADD(LVar4, 72) - EVT_SET(LVar2, 9) - EVT_CASE_EQ(1) - EVT_ADD(LVar3, -10) - EVT_ADD(LVar4, 54) - EVT_SET(LVar2, 8) - EVT_CASE_EQ(2) - EVT_ADD(LVar3, -10) - EVT_ADD(LVar4, 36) - EVT_SET(LVar2, 7) - EVT_CASE_DEFAULT - EVT_ADD(LVar3, -10) - EVT_ADD(LVar4, 18) - EVT_SET(LVar2, 6) - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(SetPartSounds, ACTOR_SELF, LVar2, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetPartPos, ACTOR_SELF, LVar2, LVar3, LVar4, LVar5) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar2, ANIM_ShyStackRock_Anim00) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar2, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar6, LVar7, LVar8) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, LVar2, EVT_FLOAT(12.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVar2, EVT_FLOAT(1.0)) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(JumpPartTo, ACTOR_SELF, LVar2, LVar6, LVar7, LVar8, 9, TRUE) - EVT_SUB(LVar6, 100) - EVT_CALL(RandInt, 40, LVar9) - EVT_SUB(LVar6, LVar9) - EVT_ADD(LVar7, LVar9) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVar2, EVT_FLOAT(0.8)) - EVT_CALL(JumpPartTo, ACTOR_SELF, LVar2, LVar6, LVar7, LVar8, 25, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar2, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CASE_EQ(1) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVar2, EVT_FLOAT(2.2)) - EVT_CASE_EQ(1) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVar2, EVT_FLOAT(1.8)) - EVT_CASE_EQ(2) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVar2, EVT_FLOAT(1.4)) - EVT_CASE_DEFAULT - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVar2, EVT_FLOAT(1.0)) - EVT_END_SWITCH - EVT_SET(LVar7, 0) - EVT_CALL(RandInt, 35, LVar9) - EVT_ADD(LVar9, 30) - EVT_SUB(LVar6, LVar9) - EVT_CALL(JumpPartTo, ACTOR_SELF, LVar2, LVar6, LVar7, LVar8, 9, TRUE) - EVT_CALL(RandInt, 25, LVar9) - EVT_ADD(LVar9, 45) - EVT_SUB(LVar6, LVar9) - EVT_CALL(JumpPartTo, ACTOR_SELF, LVar2, LVar6, LVar7, LVar8, 8, TRUE) - EVT_SUB(LVar6, 25) - EVT_CALL(JumpPartTo, ACTOR_SELF, LVar2, LVar6, LVar7, LVar8, 4, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar2, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetStatusFlags, ACTOR_SELF, LVarF) + IfFlag(LVarF, STATUS_FLAG_SHRINK) + Call(SetPartScale, ACTOR_SELF, PRT_ROCK_1, Float(0.4), Float(0.4), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_ROCK_2, Float(0.4), Float(0.4), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_ROCK_3, Float(0.4), Float(0.4), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_ROCK_4, Float(0.4), Float(0.4), Float(1.0)) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Switch(LVar0) + CaseEq(0) + Add(LVar3, -4) + Add(LVar4, 28) + Set(LVar2, 9) + CaseEq(1) + Add(LVar3, -4) + Add(LVar4, 21) + Set(LVar2, 8) + CaseEq(2) + Add(LVar3, -4) + Add(LVar4, 14) + Set(LVar2, 7) + CaseDefault + Add(LVar3, -4) + Add(LVar4, 7) + Set(LVar2, 6) + EndSwitch + Else + Call(SetPartScale, ACTOR_SELF, PRT_ROCK_1, Float(1.0), Float(1.0), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_ROCK_2, Float(1.0), Float(1.0), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_ROCK_3, Float(1.0), Float(1.0), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_ROCK_4, Float(1.0), Float(1.0), Float(1.0)) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Switch(LVar0) + CaseEq(0) + Add(LVar3, -10) + Add(LVar4, 72) + Set(LVar2, 9) + CaseEq(1) + Add(LVar3, -10) + Add(LVar4, 54) + Set(LVar2, 8) + CaseEq(2) + Add(LVar3, -10) + Add(LVar4, 36) + Set(LVar2, 7) + CaseDefault + Add(LVar3, -10) + Add(LVar4, 18) + Set(LVar2, 6) + EndSwitch + EndIf + Call(SetPartSounds, ACTOR_SELF, LVar2, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) + Call(SetPartPos, ACTOR_SELF, LVar2, LVar3, LVar4, LVar5) + Call(SetAnimation, ACTOR_SELF, LVar2, ANIM_ShyStackRock_Anim00) + Call(SetPartFlagBits, ACTOR_SELF, LVar2, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar6, LVar7, LVar8) + Call(SetPartMoveSpeed, ACTOR_SELF, LVar2, Float(12.0)) + Call(SetPartJumpGravity, ACTOR_SELF, LVar2, Float(1.0)) + Switch(LVar1) + CaseEq(0) + Call(JumpPartTo, ACTOR_SELF, LVar2, LVar6, LVar7, LVar8, 9, TRUE) + Sub(LVar6, 100) + Call(RandInt, 40, LVar9) + Sub(LVar6, LVar9) + Add(LVar7, LVar9) + Call(SetPartJumpGravity, ACTOR_SELF, LVar2, Float(0.8)) + Call(JumpPartTo, ACTOR_SELF, LVar2, LVar6, LVar7, LVar8, 25, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, LVar2, ACTOR_PART_FLAG_INVISIBLE, TRUE) + CaseEq(1) + Switch(LVar0) + CaseEq(0) + Call(SetPartJumpGravity, ACTOR_SELF, LVar2, Float(2.2)) + CaseEq(1) + Call(SetPartJumpGravity, ACTOR_SELF, LVar2, Float(1.8)) + CaseEq(2) + Call(SetPartJumpGravity, ACTOR_SELF, LVar2, Float(1.4)) + CaseDefault + Call(SetPartJumpGravity, ACTOR_SELF, LVar2, Float(1.0)) + EndSwitch + Set(LVar7, 0) + Call(RandInt, 35, LVar9) + Add(LVar9, 30) + Sub(LVar6, LVar9) + Call(JumpPartTo, ACTOR_SELF, LVar2, LVar6, LVar7, LVar8, 9, TRUE) + Call(RandInt, 25, LVar9) + Add(LVar9, 45) + Sub(LVar6, LVar9) + Call(JumpPartTo, ACTOR_SELF, LVar2, LVar6, LVar7, LVar8, 8, TRUE) + Sub(LVar6, 25) + Call(JumpPartTo, ACTOR_SELF, LVar2, LVar6, LVar7, LVar8, 4, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, LVar2, ACTOR_PART_FLAG_INVISIBLE, TRUE) + EndSwitch + Return + End }; EvtScript N(EVS_Death) = { - EVT_EXEC_WAIT(EVS_Enemy_DeathWithoutRemove) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(GetActorVar, ACTOR_TANK, AVAR_Tank_StackPhase, LVar0) - EVT_ADD(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_TANK, AVAR_Tank_StackPhase, LVar0) - EVT_IF_GE(LVar0, AVAL_StackPhase_Defeated) - EVT_CALL(FreezeBattleState, TRUE) - EVT_END_IF - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + ExecWait(EVS_Enemy_DeathWithoutRemove) + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(GetActorVar, ACTOR_TANK, AVAR_Tank_StackPhase, LVar0) + Add(LVar0, 1) + Call(SetActorVar, ACTOR_TANK, AVAR_Tank_StackPhase, LVar0) + IfGe(LVar0, AVAL_StackPhase_Defeated) + Call(FreezeBattleState, TRUE) + EndIf + Call(RemoveActor, ACTOR_SELF) + Return + End }; EvtScript N(EVS_SpinSmashDeath) = { - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_SET(LVar2, 0) - EVT_LOOP(24) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar2) - EVT_ADD(LVar2, 30) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_DEATH) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) - EVT_CALL(PlaySound, SOUND_ACTOR_DEATH) - EVT_CALL(DropStarPoints, ACTOR_SELF) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_SET(LVar3, 0) - EVT_LOOP(12) - EVT_CALL(SetActorRotation, ACTOR_SELF, LVar3, 0, 0) - EVT_ADD(LVar3, 8) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(GetActorVar, ACTOR_TANK, AVAR_Tank_StackPhase, LVar0) - EVT_ADD(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_TANK, AVAR_Tank_StackPhase, LVar0) - EVT_IF_GE(LVar0, AVAL_StackPhase_Defeated) - EVT_CALL(FreezeBattleState, TRUE) - EVT_END_IF - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(HideHealthBar, ACTOR_SELF) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Set(LVar2, 0) + Loop(24) + Call(SetActorYaw, ACTOR_SELF, LVar2) + Add(LVar2, 30) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_DEATH) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) + Call(PlaySound, SOUND_ACTOR_DEATH) + Call(DropStarPoints, ACTOR_SELF) + Call(SetActorYaw, ACTOR_SELF, 0) + Set(LVar3, 0) + Loop(12) + Call(SetActorRotation, ACTOR_SELF, LVar3, 0, 0) + Add(LVar3, 8) + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(GetActorVar, ACTOR_TANK, AVAR_Tank_StackPhase, LVar0) + Add(LVar0, 1) + Call(SetActorVar, ACTOR_TANK, AVAR_Tank_StackPhase, LVar0) + IfGe(LVar0, AVAL_StackPhase_Defeated) + Call(FreezeBattleState, TRUE) + EndIf + Call(RemoveActor, ACTOR_SELF) + Return + End }; diff --git a/src/battle/area/omo2_4/actor/signal_guy.c b/src/battle/area/omo2_4/actor/signal_guy.c index a5568a50c23..f5544d2394e 100644 --- a/src/battle/area/omo2_4/actor/signal_guy.c +++ b/src/battle/area/omo2_4/actor/signal_guy.c @@ -90,109 +90,109 @@ s32 N(DefaultAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorPos, ACTOR_SELF, 180, 0, 0) - EVT_CALL(ForceHomePos, ACTOR_SELF, 180, 0, 0) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MarshalGuy_Anim0F) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, 0, 0, 0) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_GENERAL_WHISTLE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MarshalGuy_Anim04) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MarshalGuy_Anim05) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MarshalGuy_Anim09) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorPos, ACTOR_SELF, 180, 0, 0) + Call(ForceHomePos, ACTOR_SELF, 180, 0, 0) + Call(HPBarToHome, ACTOR_SELF) + Thread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MarshalGuy_Anim0F) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetGoalPos, ACTOR_SELF, 0, 0, 0) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_GENERAL_WHISTLE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MarshalGuy_Anim04) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MarshalGuy_Anim05) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MarshalGuy_Anim09) + EndThread + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CASE_OR_EQ(EVENT_BURN_HIT) - EVT_CASE_OR_EQ(EVENT_BURN_DEATH) - EVT_CASE_OR_EQ(EVENT_SPIN_SMASH_HIT) - EVT_CASE_OR_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_CASE_OR_EQ(EVENT_SHOCK_HIT) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_SPIKE_TAUNT) - EVT_CASE_OR_EQ(EVENT_DEATH) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MarshalGuy_Anim0A) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 35) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MarshalGuy_Anim02) - EVT_WAIT(24) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MarshalGuy_Anim03) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_ADD(LVar1, 10) - EVT_LOOP(4) - EVT_PLAY_EFFECT(EFFECT_SWEAT, 0, LVar0, LVar1, LVar2, 10, 45, 4, 0) - EVT_WAIT(6) - EVT_END_LOOP - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MarshalGuy_Anim0C) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_STEAM_EMITTER) - EVT_CALL(SetGoalPos, ACTOR_SELF, -200, 0, 20) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, LVar0, 0) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MarshalGuy_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_30) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MarshalGuy_Anim0A) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(1000) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MarshalGuy_Anim01) - EVT_SET_CONST(LVar2, ANIM_MarshalGuy_Anim0A) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_SET_CONST(LVar1, ANIM_MarshalGuy_Anim0A) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_WAIT(20) - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + CaseOrEq(EVENT_BURN_HIT) + CaseOrEq(EVENT_BURN_DEATH) + CaseOrEq(EVENT_SPIN_SMASH_HIT) + CaseOrEq(EVENT_SPIN_SMASH_DEATH) + CaseOrEq(EVENT_SHOCK_HIT) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_SPIKE_TAUNT) + CaseOrEq(EVENT_DEATH) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MarshalGuy_Anim0A) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 35) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MarshalGuy_Anim02) + Wait(24) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MarshalGuy_Anim03) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Add(LVar1, 10) + Loop(4) + PlayEffect(EFFECT_SWEAT, 0, LVar0, LVar1, LVar2, 10, 45, 4, 0) + Wait(6) + EndLoop + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MarshalGuy_Anim0C) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_STEAM_EMITTER) + Call(SetGoalPos, ACTOR_SELF, -200, 0, 20) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(RemoveActorDecoration, ACTOR_SELF, LVar0, 0) + Call(RemoveActor, ACTOR_SELF) + Return + EndCaseGroup + CaseEq(EVENT_END_FIRST_STRIKE) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MarshalGuy_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_30) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MarshalGuy_Anim0A) + ExecWait(EVS_Enemy_Hit) + Wait(1000) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MarshalGuy_Anim01) + SetConst(LVar2, ANIM_MarshalGuy_Anim0A) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseDefault + SetConst(LVar1, ANIM_MarshalGuy_Anim0A) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) + Wait(20) + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/battle/area/omo2_5/actor/shy_squad_redux.c b/src/battle/area/omo2_5/actor/shy_squad_redux.c index 18bda4b8d3e..9717dbbb938 100644 --- a/src/battle/area/omo2_5/actor/shy_squad_redux.c +++ b/src/battle/area/omo2_5/actor/shy_squad_redux.c @@ -55,8 +55,8 @@ enum N(ActorPartIDs) { #define NUM_MEMBERS (1 + PRT_MEMBER_15 - PRT_MEMBER_01) #define LOOP_MEMBERS(idx) \ - EVT_SET(idx, PRT_MEMBER_01) \ - EVT_LOOP(NUM_MEMBERS) + Set(idx, PRT_MEMBER_01) \ + Loop(NUM_MEMBERS) enum N(ActorVars) { AVAR_NumDefeated = 3, @@ -332,922 +332,922 @@ s32 N(BrightAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NumDefeated, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FleeState, 0) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, HOME_OFFSET_X, -20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, HOME_OFFSET_Z, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_02, HOME_OFFSET_X, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_02, HOME_OFFSET_Z, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_03, HOME_OFFSET_X, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_03, HOME_OFFSET_Z, -40) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_04, HOME_OFFSET_X, 0) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_04, HOME_OFFSET_Z, 40) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_05, HOME_OFFSET_X, 0) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_05, HOME_OFFSET_Z, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_06, HOME_OFFSET_X, 10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_06, HOME_OFFSET_Z, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_07, HOME_OFFSET_X, 10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_07, HOME_OFFSET_Z, -40) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_08, HOME_OFFSET_X, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_08, HOME_OFFSET_Z, 40) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_09, HOME_OFFSET_X, 40) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_09, HOME_OFFSET_Z, 40) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_10, HOME_OFFSET_X, 50) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_10, HOME_OFFSET_Z, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_11, HOME_OFFSET_X, 50) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_11, HOME_OFFSET_Z, -40) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_12, HOME_OFFSET_X, 30) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_12, HOME_OFFSET_Z, -40) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_13, HOME_OFFSET_X, 40) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_13, HOME_OFFSET_Z, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_14, HOME_OFFSET_X, 30) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_14, HOME_OFFSET_Z, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_15, HOME_OFFSET_X, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_15, HOME_OFFSET_Z, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, HIT_OFFSET_X, -30) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, HIT_OFFSET_Z, 0) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_02, HIT_OFFSET_X, -20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_02, HIT_OFFSET_Z, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_03, HIT_OFFSET_X, -20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_03, HIT_OFFSET_Z, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_04, HIT_OFFSET_X, -20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_04, HIT_OFFSET_Z, 10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_05, HIT_OFFSET_X, -30) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_05, HIT_OFFSET_Z, 0) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_06, HIT_OFFSET_X, -20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_06, HIT_OFFSET_Z, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_07, HIT_OFFSET_X, -20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_07, HIT_OFFSET_Z, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_08, HIT_OFFSET_X, 0) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_08, HIT_OFFSET_Z, 10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_09, HIT_OFFSET_X, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_09, HIT_OFFSET_Z, 10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_10, HIT_OFFSET_X, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_10, HIT_OFFSET_Z, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_11, HIT_OFFSET_X, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_11, HIT_OFFSET_Z, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_12, HIT_OFFSET_X, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_12, HIT_OFFSET_Z, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_13, HIT_OFFSET_X, 30) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_13, HIT_OFFSET_Z, 0) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_14, HIT_OFFSET_X, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_14, HIT_OFFSET_Z, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_15, HIT_OFFSET_X, 0) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_15, HIT_OFFSET_Z, 0) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, SWARM_OFFSET_X, -30) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, SWARM_OFFSET_Z, 10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_02, SWARM_OFFSET_X, -30) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_02, SWARM_OFFSET_Z, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_03, SWARM_OFFSET_X, 30) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_03, SWARM_OFFSET_Z, 10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_04, SWARM_OFFSET_X, 30) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_04, SWARM_OFFSET_Z, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_05, SWARM_OFFSET_X, -20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_05, SWARM_OFFSET_Z, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_06, SWARM_OFFSET_X, -20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_06, SWARM_OFFSET_Z, -20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_07, SWARM_OFFSET_X, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_07, SWARM_OFFSET_Z, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_08, SWARM_OFFSET_X, 0) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_08, SWARM_OFFSET_Z, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_09, SWARM_OFFSET_X, 0) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_09, SWARM_OFFSET_Z, -20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_10, SWARM_OFFSET_X, -20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_10, SWARM_OFFSET_Z, 0) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_11, SWARM_OFFSET_X, 10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_11, SWARM_OFFSET_Z, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_12, SWARM_OFFSET_X, 10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_12, SWARM_OFFSET_Z, 10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_13, SWARM_OFFSET_X, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_13, SWARM_OFFSET_Z, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_14, SWARM_OFFSET_X, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_14, SWARM_OFFSET_Z, 10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_15, SWARM_OFFSET_X, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_15, SWARM_OFFSET_Z, 0) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_NumDefeated, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_FleeState, 0) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, HOME_OFFSET_X, -20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, HOME_OFFSET_Z, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_02, HOME_OFFSET_X, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_02, HOME_OFFSET_Z, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_03, HOME_OFFSET_X, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_03, HOME_OFFSET_Z, -40) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_04, HOME_OFFSET_X, 0) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_04, HOME_OFFSET_Z, 40) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_05, HOME_OFFSET_X, 0) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_05, HOME_OFFSET_Z, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_06, HOME_OFFSET_X, 10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_06, HOME_OFFSET_Z, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_07, HOME_OFFSET_X, 10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_07, HOME_OFFSET_Z, -40) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_08, HOME_OFFSET_X, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_08, HOME_OFFSET_Z, 40) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_09, HOME_OFFSET_X, 40) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_09, HOME_OFFSET_Z, 40) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_10, HOME_OFFSET_X, 50) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_10, HOME_OFFSET_Z, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_11, HOME_OFFSET_X, 50) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_11, HOME_OFFSET_Z, -40) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_12, HOME_OFFSET_X, 30) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_12, HOME_OFFSET_Z, -40) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_13, HOME_OFFSET_X, 40) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_13, HOME_OFFSET_Z, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_14, HOME_OFFSET_X, 30) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_14, HOME_OFFSET_Z, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_15, HOME_OFFSET_X, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_15, HOME_OFFSET_Z, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, HIT_OFFSET_X, -30) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, HIT_OFFSET_Z, 0) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_02, HIT_OFFSET_X, -20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_02, HIT_OFFSET_Z, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_03, HIT_OFFSET_X, -20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_03, HIT_OFFSET_Z, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_04, HIT_OFFSET_X, -20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_04, HIT_OFFSET_Z, 10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_05, HIT_OFFSET_X, -30) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_05, HIT_OFFSET_Z, 0) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_06, HIT_OFFSET_X, -20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_06, HIT_OFFSET_Z, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_07, HIT_OFFSET_X, -20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_07, HIT_OFFSET_Z, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_08, HIT_OFFSET_X, 0) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_08, HIT_OFFSET_Z, 10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_09, HIT_OFFSET_X, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_09, HIT_OFFSET_Z, 10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_10, HIT_OFFSET_X, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_10, HIT_OFFSET_Z, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_11, HIT_OFFSET_X, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_11, HIT_OFFSET_Z, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_12, HIT_OFFSET_X, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_12, HIT_OFFSET_Z, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_13, HIT_OFFSET_X, 30) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_13, HIT_OFFSET_Z, 0) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_14, HIT_OFFSET_X, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_14, HIT_OFFSET_Z, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_15, HIT_OFFSET_X, 0) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_15, HIT_OFFSET_Z, 0) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, SWARM_OFFSET_X, -30) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, SWARM_OFFSET_Z, 10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_02, SWARM_OFFSET_X, -30) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_02, SWARM_OFFSET_Z, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_03, SWARM_OFFSET_X, 30) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_03, SWARM_OFFSET_Z, 10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_04, SWARM_OFFSET_X, 30) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_04, SWARM_OFFSET_Z, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_05, SWARM_OFFSET_X, -20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_05, SWARM_OFFSET_Z, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_06, SWARM_OFFSET_X, -20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_06, SWARM_OFFSET_Z, -20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_07, SWARM_OFFSET_X, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_07, SWARM_OFFSET_Z, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_08, SWARM_OFFSET_X, 0) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_08, SWARM_OFFSET_Z, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_09, SWARM_OFFSET_X, 0) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_09, SWARM_OFFSET_Z, -20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_10, SWARM_OFFSET_X, -20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_10, SWARM_OFFSET_Z, 0) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_11, SWARM_OFFSET_X, 10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_11, SWARM_OFFSET_Z, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_12, SWARM_OFFSET_X, 10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_12, SWARM_OFFSET_Z, 10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_13, SWARM_OFFSET_X, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_13, SWARM_OFFSET_Z, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_14, SWARM_OFFSET_X, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_14, SWARM_OFFSET_Z, 10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_15, SWARM_OFFSET_X, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_15, SWARM_OFFSET_Z, 0) LOOP_MEMBERS(LVar0) - EVT_CALL(SetPartPos, ACTOR_SELF, LVar0, 185, 0, 47) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_CALL(ForceHomePos, ACTOR_SELF, 20, 0, -10) - EVT_CALL(HPBarToHome, ACTOR_SELF) + Call(SetPartPos, ACTOR_SELF, LVar0, 185, 0, 47) + Add(LVar0, 1) + EndLoop + Call(ForceHomePos, ACTOR_SELF, 20, 0, -10) + Call(HPBarToHome, ACTOR_SELF) LOOP_MEMBERS(LVar0) - EVT_CALL(CreatePartShadow, ACTOR_SELF, LVar0) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_SET(LVar0, PRT_MEMBER_01) - EVT_SET(LVar1, ANIM_TankGuy_Anim03) - EVT_SET(LVar2, 55) - EVT_SET(LVar3, 47) - EVT_SET(LVar4, EVT_FLOAT(4.0)) - EVT_SET(LVar5, 30) - EVT_SET(LVarF, 0) - EVT_LOOP(NUM_MEMBERS) - EVT_THREAD - EVT_WAIT(LVarF) - EVT_EXEC_WAIT(N(EVS_MoveMemberToPos)) - EVT_CALL(GetPartMovementVar, ACTOR_SELF, LVar0, HOME_OFFSET_X, LVar2) - EVT_CALL(GetPartMovementVar, ACTOR_SELF, LVar0, HOME_OFFSET_Z, LVar3) - EVT_SET(LVar5, 20) - EVT_EXEC_WAIT(N(EVS_MoveMemberToPos)) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, ANIM_TankGuy_Anim01) - EVT_END_THREAD - EVT_ADD(LVar0, 1) - EVT_ADD(LVarF, 5) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(CreatePartShadow, ACTOR_SELF, LVar0) + Add(LVar0, 1) + EndLoop + Set(LVar0, PRT_MEMBER_01) + Set(LVar1, ANIM_TankGuy_Anim03) + Set(LVar2, 55) + Set(LVar3, 47) + Set(LVar4, Float(4.0)) + Set(LVar5, 30) + Set(LVarF, 0) + Loop(NUM_MEMBERS) + Thread + Wait(LVarF) + ExecWait(N(EVS_MoveMemberToPos)) + Call(GetPartMovementVar, ACTOR_SELF, LVar0, HOME_OFFSET_X, LVar2) + Call(GetPartMovementVar, ACTOR_SELF, LVar0, HOME_OFFSET_Z, LVar3) + Set(LVar5, 20) + ExecWait(N(EVS_MoveMemberToPos)) + Call(SetAnimation, ACTOR_SELF, LVar0, ANIM_TankGuy_Anim01) + EndThread + Add(LVar0, 1) + Add(LVarF, 5) + EndLoop + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_EQ(LVar0, PARTNER_WATT) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(BrightAnims))) + Label(0) + Call(GetCurrentPartnerID, LVar0) + IfEq(LVar0, PARTNER_WATT) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(BrightAnims))) LOOP_MEMBERS(LVar0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, LVar0, EVT_PTR(N(BrightAnims))) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_ELSE - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DarkAnims))) + Call(SetIdleAnimations, ACTOR_SELF, LVar0, Ref(N(BrightAnims))) + Add(LVar0, 1) + EndLoop + Else + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DarkAnims))) LOOP_MEMBERS(LVar0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, LVar0, EVT_PTR(N(DarkAnims))) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(SetIdleAnimations, ACTOR_SELF, LVar0, Ref(N(DarkAnims))) + Add(LVar0, 1) + EndLoop + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_MoveMemberToPos) = { - EVT_SET(LVarA, 2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVarB) - EVT_ADD(LVarA, LVarB) - EVT_IF_LT(LVar0, LVarA) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPartOffset, ACTOR_SELF, LVar0, LVar6, 0, LVar7) - EVT_IF_LT(LVar6, LVar2) - EVT_CALL(SetPartYaw, ACTOR_SELF, LVar0, 180) - EVT_ELSE - EVT_CALL(SetPartYaw, ACTOR_SELF, LVar0, 0) - EVT_END_IF - EVT_CALL(GetDist2D, LVar9, LVar6, LVar7, LVar2, LVar3) - EVT_IF_GE(LVar9, LVar4) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, LVar0, LVar4) - EVT_CALL(RunPartTo, ACTOR_SELF, LVar0, LVar2, 0, LVar3, LVar5) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVarA, 2) + Call(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVarB) + Add(LVarA, LVarB) + IfLt(LVar0, LVarA) + Return + EndIf + Call(GetPartOffset, ACTOR_SELF, LVar0, LVar6, 0, LVar7) + IfLt(LVar6, LVar2) + Call(SetPartYaw, ACTOR_SELF, LVar0, 180) + Else + Call(SetPartYaw, ACTOR_SELF, LVar0, 0) + EndIf + Call(GetDist2D, LVar9, LVar6, LVar7, LVar2, LVar3) + IfGe(LVar9, LVar4) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(SetPartMoveSpeed, ACTOR_SELF, LVar0, LVar4) + Call(RunPartTo, ACTOR_SELF, LVar0, LVar2, 0, LVar3, LVar5) + EndIf + Return + End }; EvtScript N(EVS_HitReaction) = { - EVT_SET_CONST(LVar0, PRT_MEMBER_01) - EVT_LOOP(NUM_MEMBERS) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVarD) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVarE) - EVT_ADD(LVarD, 2) - EVT_ADD(LVarD, LVarE) - EVT_IF_GE(LVar0, LVarD) - EVT_THREAD - EVT_EXEC_WAIT(N(EVS_MemberHitReaction)) - EVT_END_THREAD - EVT_END_IF - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_WAIT(30) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MEMBER_01) + Loop(NUM_MEMBERS) + Call(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVarD) + Call(GetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVarE) + Add(LVarD, 2) + Add(LVarD, LVarE) + IfGe(LVar0, LVarD) + Thread + ExecWait(N(EVS_MemberHitReaction)) + EndThread + EndIf + Add(LVar0, 1) + EndLoop + Wait(30) + Return + End }; EvtScript N(EVS_MemberHitReaction) = { - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_SET(LVar2, LVar0) - EVT_CALL(GetDamageIntensity) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(DAMAGE_INTENSITY_LIGHT) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 8, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 4, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 10, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 4, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 5, 0) - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(4) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(10) - EVT_CASE_EQ(DAMAGE_INTENSITY_MEDIUM) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 4, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 20, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 10, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 22, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 10, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 14, 0) - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 7, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(6) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(10) - EVT_CASE_EQ(DAMAGE_INTENSITY_HEAVY) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 6, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 22, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 12, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 25, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 12, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 17, 0) - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 10, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(6) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 4, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(10) - EVT_CASE_EQ(DAMAGE_INTENSITY_EXTREME) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 8, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 24, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 14, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 28, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 14, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 19, 0) - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 14, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(6) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 5, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 2, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(10) - EVT_CASE_EQ(DAMAGE_INTENSITY_UNUSED) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 5, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 10, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 28, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 16, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 32, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 16, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 21, 0) - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 16, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(6) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 7, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) - EVT_WAIT(10) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Set(LVar2, LVar0) + Call(GetDamageIntensity) + Switch(LVar0) + CaseEq(DAMAGE_INTENSITY_LIGHT) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 1, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 3, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 8, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 4, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 10, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 4, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 5, 0) + Wait(1) + Loop(2) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 3, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(1) + EndLoop + Loop(4) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 1, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(1) + EndLoop + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(10) + CaseEq(DAMAGE_INTENSITY_MEDIUM) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 1, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 4, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 20, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 10, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 22, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 10, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 14, 0) + Wait(1) + Loop(2) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 7, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(1) + EndLoop + Loop(6) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 3, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(1) + EndLoop + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(10) + CaseEq(DAMAGE_INTENSITY_HEAVY) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 1, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 6, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 22, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 12, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 25, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 12, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 17, 0) + Wait(1) + Loop(2) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 10, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(1) + EndLoop + Loop(6) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 4, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(1) + EndLoop + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(10) + CaseEq(DAMAGE_INTENSITY_EXTREME) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 3, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 8, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 24, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 14, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 28, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 14, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 19, 0) + Wait(1) + Loop(2) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 14, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(1) + EndLoop + Loop(6) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 5, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(1) + EndLoop + Loop(2) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 2, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(1) + EndLoop + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(10) + CaseEq(DAMAGE_INTENSITY_UNUSED) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 5, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 10, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 28, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 16, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 32, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 16, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 21, 0) + Wait(1) + Loop(2) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 16, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(1) + EndLoop + Loop(6) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 7, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(1) + EndLoop + Loop(2) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 3, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(1) + EndLoop + Call(SetPartDispOffset, ACTOR_SELF, LVar2, 0, 0, 0) + Wait(10) + EndSwitch + Return + End }; EvtScript N(EVS_Shock) = { - EVT_SET_CONST(LVar0, PRT_MEMBER_01) - EVT_LOOP(NUM_MEMBERS) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVarD) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVarE) - EVT_ADD(LVarD, 2) - EVT_ADD(LVarD, LVarE) - EVT_IF_GE(LVar0, LVarD) - EVT_THREAD - EVT_EXEC_WAIT(N(EVS_MemberShockReaction)) - EVT_END_THREAD - EVT_END_IF - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MEMBER_01) + Loop(NUM_MEMBERS) + Call(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVarD) + Call(GetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVarE) + Add(LVarD, 2) + Add(LVarD, LVarE) + IfGe(LVar0, LVarD) + Thread + ExecWait(N(EVS_MemberShockReaction)) + EndThread + EndIf + Add(LVar0, 1) + EndLoop + Return + End }; EvtScript N(EVS_MemberShockReaction) = { - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(GetPartOffset, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(GetActorSize, ACTOR_SELF, LVar4, LVar5) - EVT_PLAY_EFFECT(EFFECT_FLASHING_BOX_SHOCKWAVE, 0, LVar1, LVar2, LVar3, LVar5, LVar4, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 0, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 4, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 16, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 8, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 20, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 8, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 12, 0) - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 6, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(6) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 2, 0) - EVT_WAIT(1) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 0, 0) - EVT_WAIT(10) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(GetPartOffset, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3) + Call(GetActorSize, ACTOR_SELF, LVar4, LVar5) + PlayEffect(EFFECT_FLASHING_BOX_SHOCKWAVE, 0, LVar1, LVar2, LVar3, LVar5, LVar4, 0) + Call(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 0, 0) + Call(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 1, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 4, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 16, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 8, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 20, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 8, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 12, 0) + Wait(1) + Loop(2) + Call(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 6, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 0, 0) + Wait(1) + EndLoop + Loop(6) + Call(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 2, 0) + Wait(1) + Call(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 0, 0) + Wait(1) + EndLoop + Call(SetPartDispOffset, ACTOR_SELF, LVar0, 0, 0, 0) + Wait(10) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar1, ANIM_TankGuy_Anim04) - EVT_EXEC_WAIT(N(EVS_ReduceCrowdSize)) - EVT_SET_CONST(LVar1, ANIM_TankGuy_Anim04) - EVT_EXEC_WAIT(N(EVS_HitReaction)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar1, ANIM_TankGuy_Anim04) - EVT_EXEC_WAIT(N(EVS_ReduceCrowdSize)) - EVT_SET_CONST(LVar1, ANIM_TankGuy_Anim04) - EVT_EXEC_WAIT(N(EVS_HitReaction)) - EVT_WAIT(10) - EVT_SET_CONST(LVar1, ANIM_TankGuy_Anim04) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_BURN_HIT) - EVT_CASE_OR_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar1, ANIM_TankGuy_Anim05) - EVT_EXEC_WAIT(N(EVS_ReduceCrowdSize)) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar1, ANIM_TankGuy_Anim04) + ExecWait(N(EVS_ReduceCrowdSize)) + SetConst(LVar1, ANIM_TankGuy_Anim04) + ExecWait(N(EVS_HitReaction)) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar1, ANIM_TankGuy_Anim04) + ExecWait(N(EVS_ReduceCrowdSize)) + SetConst(LVar1, ANIM_TankGuy_Anim04) + ExecWait(N(EVS_HitReaction)) + Wait(10) + SetConst(LVar1, ANIM_TankGuy_Anim04) + ExecWait(N(EVS_Death)) + Return + CaseOrEq(EVENT_BURN_HIT) + CaseOrEq(EVENT_BURN_DEATH) + SetConst(LVar1, ANIM_TankGuy_Anim05) + ExecWait(N(EVS_ReduceCrowdSize)) LOOP_MEMBERS(LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, ANIM_TankGuy_Anim05) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_WAIT(20) + Call(SetAnimation, ACTOR_SELF, LVar0, ANIM_TankGuy_Anim05) + Add(LVar0, 1) + EndLoop + Wait(20) LOOP_MEMBERS(LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, ANIM_TankGuy_Anim05) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_WAIT(15) - EVT_IF_EQ(LVar0, 36) - EVT_WAIT(10) - EVT_SET_CONST(LVar1, ANIM_TankGuy_Anim05) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar1, ANIM_TankGuy_Anim04) - EVT_EXEC_WAIT(N(EVS_ReduceCrowdSize)) - EVT_SET_CONST(LVar1, ANIM_TankGuy_Anim04) - EVT_EXEC_WAIT(N(EVS_HitReaction)) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar1, ANIM_TankGuy_Anim04) - EVT_EXEC_WAIT(N(EVS_ReduceCrowdSize)) - EVT_SET_CONST(LVar1, ANIM_TankGuy_Anim04) - EVT_EXEC_WAIT(N(EVS_HitReaction)) - EVT_SET_CONST(LVar1, ANIM_TankGuy_Anim04) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar1, ANIM_TankGuy_Anim04) - EVT_EXEC_WAIT(N(EVS_ReduceCrowdSize)) - EVT_SET_CONST(LVar1, ANIM_TankGuy_Anim04) - EVT_EXEC_WAIT(N(EVS_Shock)) - EVT_WAIT(40) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_EXEC_WAIT(N(EVS_MoveSquadHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar1, ANIM_TankGuy_Anim04) - EVT_EXEC_WAIT(N(EVS_ReduceCrowdSize)) - EVT_SET_CONST(LVar1, ANIM_TankGuy_Anim04) - EVT_EXEC_WAIT(N(EVS_Shock)) - EVT_WAIT(40) - EVT_SET_CONST(LVar1, ANIM_TankGuy_Anim04) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_SPIKE_TAUNT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TankGuy_Anim01) - EVT_EXEC_WAIT(N(EVS_HitReaction)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET(LVar1, ANIM_TankGuy_Anim04) - EVT_EXEC_WAIT(N(EVS_SetMembersAnimation)) - EVT_WAIT(1000) - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TankGuy_Anim01) - EVT_EXEC_WAIT(N(EVS_HitReaction)) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TankGuy_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_30) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_TankGuy_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(1000) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_SET(LVar1, ANIM_TankGuy_Anim01) - EVT_EXEC_WAIT(N(EVS_SetMembersAnimation)) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, LVar0, ANIM_TankGuy_Anim05) + Add(LVar0, 1) + EndLoop + Wait(15) + IfEq(LVar0, 36) + Wait(10) + SetConst(LVar1, ANIM_TankGuy_Anim05) + ExecWait(N(EVS_Death)) + Return + EndIf + EndCaseGroup + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar1, ANIM_TankGuy_Anim04) + ExecWait(N(EVS_ReduceCrowdSize)) + SetConst(LVar1, ANIM_TankGuy_Anim04) + ExecWait(N(EVS_HitReaction)) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar1, ANIM_TankGuy_Anim04) + ExecWait(N(EVS_ReduceCrowdSize)) + SetConst(LVar1, ANIM_TankGuy_Anim04) + ExecWait(N(EVS_HitReaction)) + SetConst(LVar1, ANIM_TankGuy_Anim04) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar1, ANIM_TankGuy_Anim04) + ExecWait(N(EVS_ReduceCrowdSize)) + SetConst(LVar1, ANIM_TankGuy_Anim04) + ExecWait(N(EVS_Shock)) + Wait(40) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + ExecWait(N(EVS_MoveSquadHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar1, ANIM_TankGuy_Anim04) + ExecWait(N(EVS_ReduceCrowdSize)) + SetConst(LVar1, ANIM_TankGuy_Anim04) + ExecWait(N(EVS_Shock)) + Wait(40) + SetConst(LVar1, ANIM_TankGuy_Anim04) + ExecWait(N(EVS_Death)) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_SPIKE_TAUNT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TankGuy_Anim01) + ExecWait(N(EVS_HitReaction)) + EndCaseGroup + CaseEq(EVENT_BEGIN_AIR_LIFT) + Set(LVar1, ANIM_TankGuy_Anim04) + ExecWait(N(EVS_SetMembersAnimation)) + Wait(1000) + CaseEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TankGuy_Anim01) + ExecWait(N(EVS_HitReaction)) + CaseEq(EVENT_END_FIRST_STRIKE) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TankGuy_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_30) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_TankGuy_Anim04) + ExecWait(EVS_Enemy_Hit) + Wait(1000) + CaseEq(EVENT_SCARE_AWAY) + CaseDefault + EndSwitch + Set(LVar1, ANIM_TankGuy_Anim01) + ExecWait(N(EVS_SetMembersAnimation)) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_ReduceCrowdSize) = { - EVT_SET(LVar1, LVar1) - EVT_EXEC_WAIT(N(EVS_SetMembersAnimation)) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVar0) - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar1) - EVT_ADD(LVar0, LVar1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVar0) - EVT_LABEL(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar1) - EVT_IF_GE(LVar1, 15) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar0, PRT_MEMBER_01) - EVT_ADD(LVar0, LVar1) - EVT_IF_NE(LVar0, NUM_MEMBERS + 1) - EVT_THREAD - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_NO_STATUS_ANIMS, TRUE) - EVT_CALL(GetPartOffset, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(GetPartMovementVar, ACTOR_SELF, LVar0, HIT_OFFSET_X, LVar7) - EVT_CALL(GetPartMovementVar, ACTOR_SELF, LVar0, HIT_OFFSET_Z, LVar8) - EVT_ADD(LVar1, LVar7) - EVT_ADD(LVar3, LVar8) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVar0, EVT_FLOAT(0.5)) - EVT_CALL(JumpPartTo, ACTOR_SELF, LVar0, LVar1, 0, LVar3, 15, TRUE) - EVT_CALL(GetDamageSource, LVar5) - EVT_SWITCH(LVar5) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_SLAP_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_FAN_SMACK_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_SLAP_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_SLAP_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_FAN_SMACK_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_SLAP_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_SPIN_SMASH) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SET(LVar7, 0) - EVT_LOOP(24) - EVT_CALL(SetPartRotation, ACTOR_SELF, LVar0, 0, LVar7, 0) - EVT_ADD(LVar7, 30) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_SWITCH - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0) - EVT_SET(LVar8, 0) - EVT_LOOP(12) - EVT_CALL(SetPartRotation, ACTOR_SELF, LVar0, LVar8, 0, 0) - EVT_ADD(LVar8, 8) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(RemovePartShadow, ACTOR_SELF, LVar0) - EVT_END_THREAD - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVar0) - EVT_SUB(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar0) - EVT_ADD(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar0) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVar1, LVar1) + ExecWait(N(EVS_SetMembersAnimation)) + Call(GetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVar0) + Call(GetLastDamage, ACTOR_SELF, LVar1) + Add(LVar0, LVar1) + Call(SetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVar0) + Label(0) + Call(GetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVar0) + IfEq(LVar0, 0) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar1) + IfGe(LVar1, 15) + Return + EndIf + Set(LVar0, PRT_MEMBER_01) + Add(LVar0, LVar1) + IfNe(LVar0, NUM_MEMBERS + 1) + Thread + Call(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_NO_STATUS_ANIMS, TRUE) + Call(GetPartOffset, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3) + Call(GetPartMovementVar, ACTOR_SELF, LVar0, HIT_OFFSET_X, LVar7) + Call(GetPartMovementVar, ACTOR_SELF, LVar0, HIT_OFFSET_Z, LVar8) + Add(LVar1, LVar7) + Add(LVar3, LVar8) + Call(SetPartJumpGravity, ACTOR_SELF, LVar0, Float(0.5)) + Call(JumpPartTo, ACTOR_SELF, LVar0, LVar1, 0, LVar3, 15, TRUE) + Call(GetDamageSource, LVar5) + Switch(LVar5) + CaseOrEq(DMG_SRC_NEXT_SLAP_LEFT) + CaseOrEq(DMG_SRC_NEXT_FAN_SMACK_LEFT) + CaseOrEq(DMG_SRC_LAST_SLAP_LEFT) + CaseOrEq(DMG_SRC_LAST_FAN_SMACK_LEFT) + CaseOrEq(DMG_SRC_NEXT_SLAP_RIGHT) + CaseOrEq(DMG_SRC_NEXT_FAN_SMACK_RIGHT) + CaseOrEq(DMG_SRC_LAST_SLAP_RIGHT) + CaseOrEq(DMG_SRC_LAST_FAN_SMACK_RIGHT) + CaseOrEq(DMG_SRC_SPIN_SMASH) + EndCaseGroup + CaseDefault + Set(LVar7, 0) + Loop(24) + Call(SetPartRotation, ACTOR_SELF, LVar0, 0, LVar7, 0) + Add(LVar7, 30) + Wait(1) + EndLoop + EndSwitch + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0) + Set(LVar8, 0) + Loop(12) + Call(SetPartRotation, ACTOR_SELF, LVar0, LVar8, 0, 0) + Add(LVar8, 8) + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(RemovePartShadow, ACTOR_SELF, LVar0) + EndThread + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVar0) + Sub(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar0) + Add(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar0) + Goto(0) + Return + End }; EvtScript N(EVS_SetMembersAnimation) = { - EVT_SET(LVar2, PRT_MEMBER_01) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar0) - EVT_LOOP(NUM_MEMBERS) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar2, LVar1) - EVT_ELSE - EVT_SUB(LVar0, 1) - EVT_END_IF - EVT_ADD(LVar2, 1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVar2, PRT_MEMBER_01) + Call(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar0) + Loop(NUM_MEMBERS) + IfEq(LVar0, 0) + Call(SetAnimation, ACTOR_SELF, LVar2, LVar1) + Else + Sub(LVar0, 1) + EndIf + Add(LVar2, 1) + EndLoop + Return + End }; EvtScript N(EVS_DefeatMember) = { - EVT_IF_NE(LVar1, -1) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_WAIT(10) - EVT_END_IF - EVT_CALL(GetDamageSource, LVar5) - EVT_SWITCH(LVar5) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_SLAP_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_FAN_SMACK_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_SLAP_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_SLAP_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_FAN_SMACK_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_SLAP_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_SPIN_SMASH) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SET(LVar2, 0) - EVT_LOOP(24) - EVT_CALL(SetPartRotation, ACTOR_SELF, LVar0, 0, LVar2, 0) - EVT_ADD(LVar2, 30) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_SWITCH - EVT_SET(LVar3, 0) - EVT_LOOP(12) - EVT_CALL(SetPartRotation, ACTOR_SELF, LVar0, LVar3, 0, 0) - EVT_ADD(LVar3, 8) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(RemovePartShadow, ACTOR_SELF, LVar0) - EVT_RETURN - EVT_END + IfNe(LVar1, -1) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Wait(10) + EndIf + Call(GetDamageSource, LVar5) + Switch(LVar5) + CaseOrEq(DMG_SRC_NEXT_SLAP_LEFT) + CaseOrEq(DMG_SRC_NEXT_FAN_SMACK_LEFT) + CaseOrEq(DMG_SRC_LAST_SLAP_LEFT) + CaseOrEq(DMG_SRC_LAST_FAN_SMACK_LEFT) + CaseOrEq(DMG_SRC_NEXT_SLAP_RIGHT) + CaseOrEq(DMG_SRC_NEXT_FAN_SMACK_RIGHT) + CaseOrEq(DMG_SRC_LAST_SLAP_RIGHT) + CaseOrEq(DMG_SRC_LAST_FAN_SMACK_RIGHT) + CaseOrEq(DMG_SRC_SPIN_SMASH) + EndCaseGroup + CaseDefault + Set(LVar2, 0) + Loop(24) + Call(SetPartRotation, ACTOR_SELF, LVar0, 0, LVar2, 0) + Add(LVar2, 30) + Wait(1) + EndLoop + EndSwitch + Set(LVar3, 0) + Loop(12) + Call(SetPartRotation, ACTOR_SELF, LVar0, LVar3, 0, 0) + Add(LVar3, 8) + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(RemovePartShadow, ACTOR_SELF, LVar0) + Return + End }; EvtScript N(EVS_Death) = { - EVT_SET_CONST(LVar0, PRT_MEMBER_01) - EVT_LOOP(NUM_MEMBERS - 1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVar3) - EVT_ADD(LVar2, 2) - EVT_ADD(LVar2, LVar3) - EVT_IF_GE(LVar0, LVar2) - EVT_THREAD - EVT_EXEC_WAIT(N(EVS_DefeatMember)) - EVT_END_THREAD - EVT_END_IF - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_SET(LVar0, 16) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_SET(LVar2, 0) - EVT_LOOP(24) - EVT_CALL(SetPartRotation, ACTOR_SELF, LVar0, 0, LVar2, 0) - EVT_ADD(LVar2, 30) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetPartOffset, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0) - EVT_CALL(DropStarPoints, ACTOR_SELF) - EVT_SET(LVar3, 0) - EVT_LOOP(12) - EVT_CALL(SetPartRotation, ACTOR_SELF, LVar0, LVar3, 0, 0) - EVT_ADD(LVar3, 8) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(RemovePartShadow, ACTOR_SELF, LVar0) - EVT_WAIT(30) - EVT_EXEC_WAIT(N(EVS_NotifyNextWave)) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MEMBER_01) + Loop(NUM_MEMBERS - 1) + Call(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar2) + Call(GetActorVar, ACTOR_SELF, AVAR_NumPendingDefeat, LVar3) + Add(LVar2, 2) + Add(LVar2, LVar3) + IfGe(LVar0, LVar2) + Thread + ExecWait(N(EVS_DefeatMember)) + EndThread + EndIf + Add(LVar0, 1) + EndLoop + Set(LVar0, 16) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Set(LVar2, 0) + Loop(24) + Call(SetPartRotation, ACTOR_SELF, LVar0, 0, LVar2, 0) + Add(LVar2, 30) + Wait(1) + EndLoop + Call(GetPartOffset, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0) + Call(DropStarPoints, ACTOR_SELF) + Set(LVar3, 0) + Loop(12) + Call(SetPartRotation, ACTOR_SELF, LVar0, LVar3, 0, 0) + Add(LVar3, 8) + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(RemovePartShadow, ACTOR_SELF, LVar0) + Wait(30) + ExecWait(N(EVS_NotifyNextWave)) + Call(RemoveActor, ACTOR_SELF) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_EQ(LVar0, PARTNER_WATT) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar0) - EVT_CALL(GetActorHP, ACTOR_SELF, LVar1) - EVT_IF_EQ(LVar0, LVar1) - EVT_EXEC_WAIT(N(EVS_Attack_Swarm)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_EXEC_WAIT(N(EVS_NotifyNextWave)) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END_IF - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_Swarm)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetCurrentPartnerID, LVar0) + IfEq(LVar0, PARTNER_WATT) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar0) + Call(GetActorHP, ACTOR_SELF, LVar1) + IfEq(LVar0, LVar1) + ExecWait(N(EVS_Attack_Swarm)) + Else + ExecWait(N(EVS_Flee)) + ExecWait(N(EVS_NotifyNextWave)) + Call(RemoveActor, ACTOR_SELF) + Return + EndIf + Else + ExecWait(N(EVS_Attack_Swarm)) + EndIf + Return + End }; EvtScript N(EVS_NotifyNextWave) = { - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(SetActorVar, ACTOR_TANK, AVAR_Tank_UnusedPhase, AVAL_UnusedPhase_Defeated) - EVT_RETURN - EVT_END + Call(FreezeBattleState, TRUE) + Call(SetActorVar, ACTOR_TANK, AVAR_Tank_UnusedPhase, AVAL_UnusedPhase_Defeated) + Return + End }; EvtScript N(EVS_Flee) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FleeState, AVAL_Flee_Init) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 40) - EVT_SET(LVar0, PRT_MEMBER_01) - EVT_SET(LVar1, 0) - EVT_LOOP(NUM_MEMBERS) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar2) - EVT_ADD(LVar2, PRT_MEMBER_01) - EVT_IF_GE(LVar0, LVar2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FleeState, AVAL_Flee_Looping) - EVT_THREAD - EVT_WAIT(LVar1) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, ANIM_TankGuy_Anim03) - EVT_CALL(SetPartYaw, ACTOR_SELF, LVar0, 180) - EVT_CALL(RunPartTo, ACTOR_SELF, LVar0, 55, 0, 47, 20) - EVT_CALL(RunPartTo, ACTOR_SELF, LVar0, 185, 0, 47, 30) - EVT_IF_EQ(LVar0, PRT_MEMBER_15) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FleeState, AVAL_Flee_Done) - EVT_END_IF - EVT_END_THREAD - EVT_ADD(LVar1, 5) - EVT_END_IF - EVT_ADD(LVar0, 1) - EVT_END_LOOP + Call(SetActorVar, ACTOR_SELF, AVAR_FleeState, AVAL_Flee_Init) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 40) + Set(LVar0, PRT_MEMBER_01) + Set(LVar1, 0) + Loop(NUM_MEMBERS) + Call(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar2) + Add(LVar2, PRT_MEMBER_01) + IfGe(LVar0, LVar2) + Call(SetActorVar, ACTOR_SELF, AVAR_FleeState, AVAL_Flee_Looping) + Thread + Wait(LVar1) + Call(SetAnimation, ACTOR_SELF, LVar0, ANIM_TankGuy_Anim03) + Call(SetPartYaw, ACTOR_SELF, LVar0, 180) + Call(RunPartTo, ACTOR_SELF, LVar0, 55, 0, 47, 20) + Call(RunPartTo, ACTOR_SELF, LVar0, 185, 0, 47, 30) + IfEq(LVar0, PRT_MEMBER_15) + Call(SetActorVar, ACTOR_SELF, AVAR_FleeState, AVAL_Flee_Done) + EndIf + EndThread + Add(LVar1, 5) + EndIf + Add(LVar0, 1) + EndLoop // wait for fleeing to finish - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_FleeState, LVar0) - EVT_IF_EQ(LVar0, AVAL_Flee_Init) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FleeState, AVAL_Flee_Done) - EVT_END_IF - EVT_SET(LVar0, 15) - EVT_LOOP(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_FleeState, LVar0) - EVT_IF_EQ(LVar0, AVAL_Flee_Done) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_FleeState, LVar0) + IfEq(LVar0, AVAL_Flee_Init) + Call(SetActorVar, ACTOR_SELF, AVAR_FleeState, AVAL_Flee_Done) + EndIf + Set(LVar0, 15) + Loop(0) + Call(GetActorVar, ACTOR_SELF, AVAR_FleeState, LVar0) + IfEq(LVar0, AVAL_Flee_Done) + BreakLoop + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_Attack_Swarm) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 30) - EVT_SET(LVar0, PRT_MEMBER_01) - EVT_SET(LVar1, ANIM_TankGuy_Anim03) - EVT_LOOP(NUM_MEMBERS) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar2, LVar5, LVar3) - EVT_CALL(GetPartMovementVar, ACTOR_SELF, LVar0, SWARM_OFFSET_X, LVar5) - EVT_ADD(LVar2, LVar5) - EVT_CALL(GetPartMovementVar, ACTOR_SELF, LVar0, SWARM_OFFSET_Z, LVar5) - EVT_ADD(LVar3, LVar5) - EVT_SETF(LVar4, EVT_FLOAT(6.0)) - EVT_SET(LVar5, 30) - EVT_EXEC_WAIT(N(EVS_MoveMemberToPos)) - EVT_END_THREAD - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(GetGoalPos, ACTOR_PLAYER, LVar2, LVar5, LVar3) - EVT_CALL(GetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, SWARM_OFFSET_X, LVar5) - EVT_ADD(LVar2, LVar5) - EVT_CALL(GetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, SWARM_OFFSET_Z, LVar5) - EVT_ADD(LVar3, LVar5) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar2, 0, LVar3) - EVT_CALL(RunToGoal, ACTOR_SELF, 30, FALSE) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 300) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 30) + Set(LVar0, PRT_MEMBER_01) + Set(LVar1, ANIM_TankGuy_Anim03) + Loop(NUM_MEMBERS) + Thread + Call(GetActorPos, ACTOR_PLAYER, LVar2, LVar5, LVar3) + Call(GetPartMovementVar, ACTOR_SELF, LVar0, SWARM_OFFSET_X, LVar5) + Add(LVar2, LVar5) + Call(GetPartMovementVar, ACTOR_SELF, LVar0, SWARM_OFFSET_Z, LVar5) + Add(LVar3, LVar5) + SetF(LVar4, Float(6.0)) + Set(LVar5, 30) + ExecWait(N(EVS_MoveMemberToPos)) + EndThread + Add(LVar0, 1) + EndLoop + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(GetGoalPos, ACTOR_PLAYER, LVar2, LVar5, LVar3) + Call(GetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, SWARM_OFFSET_X, LVar5) + Add(LVar2, LVar5) + Call(GetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, SWARM_OFFSET_Z, LVar5) + Add(LVar3, LVar5) + Call(SetGoalPos, ACTOR_SELF, LVar2, 0, LVar3) + Call(RunToGoal, ACTOR_SELF, 30, FALSE) LOOP_MEMBERS(LVar0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar4, LVar5, LVar6) - EVT_CALL(GetPartOffset, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3) - EVT_IF_LT(LVar1, LVar4) - EVT_CALL(SetPartYaw, ACTOR_SELF, LVar0, 180) - EVT_ELSE - EVT_CALL(SetPartYaw, ACTOR_SELF, LVar0, 0) - EVT_END_IF - EVT_CALL(RandInt, 100, LVar7) - EVT_IF_LT(LVar7, 50) - EVT_SET(LVar7, ANIM_TankGuy_Anim04) - EVT_ELSE - EVT_SET(LVar7, ANIM_TankGuy_Anim07) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar7) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar0) - EVT_IF_LT(LVar0, 14) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 3, LVar0, LVar1, LVar2, 0, 0) - EVT_THREAD - EVT_LOOP(7) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 0, LVar0, LVar1, LVar2, 0, 0) - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, LVar0, LVar1, LVar2, 0, 0) - EVT_WAIT(2) - EVT_END_LOOP - EVT_END_THREAD - EVT_END_IF - EVT_WAIT(36) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_EXEC_WAIT(N(EVS_MoveSquadHome)) - EVT_SET(LVar1, ANIM_TankGuy_Anim01) - EVT_EXEC_WAIT(N(EVS_SetMembersAnimation)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_EQ(HIT_RESULT_HIT_STATIC) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, DMG_SWARM, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SET(LVarE, 15) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar0) - EVT_SUB(LVarE, LVar0) - EVT_SET(LVarD, LVarE) - EVT_LOOP(LVarD) - EVT_IF_GT(LVarE, 1) - EVT_SET(LVar0, BS_FLAGS1_NICE_HIT) - EVT_ELSE - EVT_SET(LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_IF - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, DMG_SWARM, LVar0) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar1, LVar2, LVar3) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 0, LVar1, LVar2, LVar3, 0, 0) - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, LVar1, LVar2, LVar3, 0, 0) - EVT_WAIT(2) - EVT_END_THREAD - EVT_CALL(GetPlayerHP, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_SUB(LVarE, 1) - EVT_IF_EQ(LVarE, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(10) - EVT_END_LOOP - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(EVS_MoveSquadHome)) - EVT_SET(LVar1, ANIM_TankGuy_Anim01) - EVT_EXEC_WAIT(N(EVS_SetMembersAnimation)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(GetActorPos, ACTOR_PLAYER, LVar4, LVar5, LVar6) + Call(GetPartOffset, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3) + IfLt(LVar1, LVar4) + Call(SetPartYaw, ACTOR_SELF, LVar0, 180) + Else + Call(SetPartYaw, ACTOR_SELF, LVar0, 0) + EndIf + Call(RandInt, 100, LVar7) + IfLt(LVar7, 50) + Set(LVar7, ANIM_TankGuy_Anim04) + Else + Set(LVar7, ANIM_TankGuy_Anim07) + EndIf + Call(SetAnimation, ACTOR_SELF, LVar0, LVar7) + Add(LVar0, 1) + EndLoop + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar0) + IfLt(LVar0, 14) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_LANDING_DUST, 3, LVar0, LVar1, LVar2, 0, 0) + Thread + Loop(7) + PlayEffect(EFFECT_LANDING_DUST, 0, LVar0, LVar1, LVar2, 0, 0) + Wait(2) + PlayEffect(EFFECT_LANDING_DUST, 1, LVar0, LVar1, LVar2, 0, 0) + Wait(2) + EndLoop + EndThread + EndIf + Wait(36) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + ExecWait(N(EVS_MoveSquadHome)) + Set(LVar1, ANIM_TankGuy_Anim01) + ExecWait(N(EVS_SetMembersAnimation)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + CaseEq(HIT_RESULT_HIT_STATIC) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, DMG_SWARM, BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Set(LVarE, 15) + Call(GetActorVar, ACTOR_SELF, AVAR_NumDefeated, LVar0) + Sub(LVarE, LVar0) + Set(LVarD, LVarE) + Loop(LVarD) + IfGt(LVarE, 1) + Set(LVar0, BS_FLAGS1_NICE_HIT) + Else + Set(LVar0, BS_FLAGS1_TRIGGER_EVENTS) + EndIf + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, DMG_SWARM, LVar0) + Thread + Call(GetActorPos, ACTOR_PLAYER, LVar1, LVar2, LVar3) + PlayEffect(EFFECT_LANDING_DUST, 0, LVar1, LVar2, LVar3, 0, 0) + Wait(2) + PlayEffect(EFFECT_LANDING_DUST, 1, LVar1, LVar2, LVar3, 0, 0) + Wait(2) + EndThread + Call(GetPlayerHP, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + Sub(LVarE, 1) + IfEq(LVarE, 0) + BreakLoop + EndIf + Wait(10) + EndLoop + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Wait(20) + ExecWait(N(EVS_MoveSquadHome)) + Set(LVar1, ANIM_TankGuy_Anim01) + ExecWait(N(EVS_SetMembersAnimation)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_MoveSquadHome) = { - EVT_SET(LVar0, PRT_MEMBER_01) - EVT_SET(LVar1, ANIM_TankGuy_Anim03) - EVT_LOOP(NUM_MEMBERS) - EVT_THREAD - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar2, LVar5, LVar3) - EVT_CALL(GetPartMovementVar, ACTOR_SELF, LVar0, SWARM_OFFSET_X, LVar5) - EVT_ADD(LVar2, LVar5) - EVT_CALL(GetPartMovementVar, ACTOR_SELF, LVar0, SWARM_OFFSET_Z, LVar5) - EVT_ADD(LVar3, LVar5) - EVT_SETF(LVar4, EVT_FLOAT(6.0)) - EVT_SET(LVar5, 30) - EVT_EXEC_WAIT(N(EVS_MoveMemberToPos)) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, ANIM_TankGuy_Anim01) - EVT_CALL(SetPartYaw, ACTOR_SELF, LVar0, 0) - EVT_END_THREAD - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar2, LVar5, LVar3) - EVT_CALL(GetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, SWARM_OFFSET_X, LVar5) - EVT_ADD(LVar2, LVar5) - EVT_CALL(GetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, SWARM_OFFSET_Z, LVar5) - EVT_ADD(LVar3, LVar5) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar2, 0, LVar3) - EVT_CALL(RunToGoal, ACTOR_SELF, 30, FALSE) - EVT_RETURN - EVT_END + Set(LVar0, PRT_MEMBER_01) + Set(LVar1, ANIM_TankGuy_Anim03) + Loop(NUM_MEMBERS) + Thread + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar2, LVar5, LVar3) + Call(GetPartMovementVar, ACTOR_SELF, LVar0, SWARM_OFFSET_X, LVar5) + Add(LVar2, LVar5) + Call(GetPartMovementVar, ACTOR_SELF, LVar0, SWARM_OFFSET_Z, LVar5) + Add(LVar3, LVar5) + SetF(LVar4, Float(6.0)) + Set(LVar5, 30) + ExecWait(N(EVS_MoveMemberToPos)) + Call(SetAnimation, ACTOR_SELF, LVar0, ANIM_TankGuy_Anim01) + Call(SetPartYaw, ACTOR_SELF, LVar0, 0) + EndThread + Add(LVar0, 1) + EndLoop + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar2, LVar5, LVar3) + Call(GetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, SWARM_OFFSET_X, LVar5) + Add(LVar2, LVar5) + Call(GetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, SWARM_OFFSET_Z, LVar5) + Add(LVar3, LVar5) + Call(SetGoalPos, ACTOR_SELF, LVar2, 0, LVar3) + Call(RunToGoal, ACTOR_SELF, 30, FALSE) + Return + End }; diff --git a/src/battle/area/omo2_6/actor/shy_squad_stub.c b/src/battle/area/omo2_6/actor/shy_squad_stub.c index c00f236cbe9..bdabb8fce23 100644 --- a/src/battle/area/omo2_6/actor/shy_squad_stub.c +++ b/src/battle/area/omo2_6/actor/shy_squad_stub.c @@ -31,8 +31,8 @@ enum N(ActorPartIDs) { #define NUM_MEMBERS (1 + PRT_MEMBER_08 - PRT_MEMBER_01) #define LOOP_MEMBERS(idx) \ - EVT_SET(idx, PRT_MEMBER_01) \ - EVT_LOOP(NUM_MEMBERS) + Set(idx, PRT_MEMBER_01) \ + Loop(NUM_MEMBERS) s32 N(DefenseTable)[] = { ELEMENT_NORMAL, 0, @@ -214,80 +214,80 @@ s32 N(DefaultAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, HOME_OFFSET_X, 0) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, HOME_OFFSET_Z, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_02, HOME_OFFSET_X, 10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_02, HOME_OFFSET_Z, -30) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_03, HOME_OFFSET_X, 10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_03, HOME_OFFSET_Z, 10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_04, HOME_OFFSET_X, 20) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_04, HOME_OFFSET_Z, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_05, HOME_OFFSET_X, 30) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_05, HOME_OFFSET_Z, 10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_06, HOME_OFFSET_X, 30) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_06, HOME_OFFSET_Z, -30) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_07, HOME_OFFSET_X, 40) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_07, HOME_OFFSET_Z, -10) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_08, HOME_OFFSET_X, 50) - EVT_CALL(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_08, HOME_OFFSET_Z, 10) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, HOME_OFFSET_X, 0) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_01, HOME_OFFSET_Z, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_02, HOME_OFFSET_X, 10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_02, HOME_OFFSET_Z, -30) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_03, HOME_OFFSET_X, 10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_03, HOME_OFFSET_Z, 10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_04, HOME_OFFSET_X, 20) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_04, HOME_OFFSET_Z, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_05, HOME_OFFSET_X, 30) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_05, HOME_OFFSET_Z, 10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_06, HOME_OFFSET_X, 30) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_06, HOME_OFFSET_Z, -30) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_07, HOME_OFFSET_X, 40) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_07, HOME_OFFSET_Z, -10) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_08, HOME_OFFSET_X, 50) + Call(SetPartMovementVar, ACTOR_SELF, PRT_MEMBER_08, HOME_OFFSET_Z, 10) LOOP_MEMBERS(LVar0) - EVT_CALL(SetPartPos, ACTOR_SELF, LVar0, 185, 0, 47) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_CALL(ForceHomePos, ACTOR_SELF, 20, 0, -10) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_SET(LVar0, PRT_MEMBER_01) - EVT_SET(LVar1, ANIM_TankGuy_Anim03) - EVT_SET(LVar4, EVT_FLOAT(4.0)) - EVT_SET(LVar5, 5) - EVT_LOOP(NUM_MEMBERS) - EVT_THREAD - EVT_CALL(GetPartMovementVar, ACTOR_SELF, LVar0, HOME_OFFSET_X, LVar2) - EVT_CALL(GetPartMovementVar, ACTOR_SELF, LVar0, HOME_OFFSET_Z, LVar3) - EVT_SET(LVar5, 20) - EVT_EXEC_WAIT(N(EVS_MoveMemberToPos)) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, ANIM_TankGuy_Anim01) - EVT_END_THREAD - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetPartPos, ACTOR_SELF, LVar0, 185, 0, 47) + Add(LVar0, 1) + EndLoop + Call(ForceHomePos, ACTOR_SELF, 20, 0, -10) + Call(HPBarToHome, ACTOR_SELF) + Set(LVar0, PRT_MEMBER_01) + Set(LVar1, ANIM_TankGuy_Anim03) + Set(LVar4, Float(4.0)) + Set(LVar5, 5) + Loop(NUM_MEMBERS) + Thread + Call(GetPartMovementVar, ACTOR_SELF, LVar0, HOME_OFFSET_X, LVar2) + Call(GetPartMovementVar, ACTOR_SELF, LVar0, HOME_OFFSET_Z, LVar3) + Set(LVar5, 20) + ExecWait(N(EVS_MoveMemberToPos)) + Call(SetAnimation, ACTOR_SELF, LVar0, ANIM_TankGuy_Anim01) + EndThread + Add(LVar0, 1) + EndLoop + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_MoveMemberToPos) = { - EVT_CALL(GetPartOffset, ACTOR_SELF, LVar0, LVar6, 0, LVar7) - EVT_IF_LT(LVar6, LVar2) - EVT_CALL(SetPartYaw, ACTOR_SELF, LVar0, 180) - EVT_ELSE - EVT_CALL(SetPartYaw, ACTOR_SELF, LVar0, 0) - EVT_END_IF - EVT_CALL(GetDist2D, LVar9, LVar6, LVar7, LVar2, LVar3) - EVT_IF_GE(LVar9, LVar4) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, LVar0, LVar4) - EVT_CALL(RunPartTo, ACTOR_SELF, LVar0, LVar2, 0, LVar3, LVar5) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetPartOffset, ACTOR_SELF, LVar0, LVar6, 0, LVar7) + IfLt(LVar6, LVar2) + Call(SetPartYaw, ACTOR_SELF, LVar0, 180) + Else + Call(SetPartYaw, ACTOR_SELF, LVar0, 0) + EndIf + Call(GetDist2D, LVar9, LVar6, LVar7, LVar2, LVar3) + IfGe(LVar9, LVar4) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(SetPartMoveSpeed, ACTOR_SELF, LVar0, LVar4) + Call(RunPartTo, ACTOR_SELF, LVar0, LVar2, 0, LVar3, LVar5) + EndIf + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/battle/area/omo3/actor/big_lantern_ghost.c b/src/battle/area/omo3/actor/big_lantern_ghost.c index 6ca3ad6c52f..4284bfcb815 100644 --- a/src/battle/area/omo3/actor/big_lantern_ghost.c +++ b/src/battle/area/omo3/actor/big_lantern_ghost.c @@ -282,593 +282,593 @@ API_CALLABLE(N(update_effect)) { } EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_EXTINGUISHED_ONCE), 0) - EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_6), 10) - EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_LANTERN_BRIGHTNESS), 2) - EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_DARKENING), 240) - EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_SPEAK_FLAGS), 0) - EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_MOVE_ID), N(MOVE_HEAVY_JUMP)) - EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_LIGHT_BEAM_COUNTER), 0) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 1, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), LVar0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_EFFECT), LVar0) - EVT_CALL(N(init_overlay)) - EVT_EXEC(N(updateEffectThread)) - EVT_EXEC_WAIT(N(setGhostNoTarget)) - EVT_WAIT(2) - EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_HIT_SOUND_COUNTER), 0) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, N(VAR_EXTINGUISHED_ONCE), 0) + Call(SetActorVar, ACTOR_SELF, N(VAR_6), 10) + Call(SetActorVar, ACTOR_SELF, N(VAR_LANTERN_BRIGHTNESS), 2) + Call(SetActorVar, ACTOR_SELF, N(VAR_DARKENING), 240) + Call(SetActorVar, ACTOR_SELF, N(VAR_SPEAK_FLAGS), 0) + Call(SetActorVar, ACTOR_SELF, N(VAR_MOVE_ID), N(MOVE_HEAVY_JUMP)) + Call(SetActorVar, ACTOR_SELF, N(VAR_LIGHT_BEAM_COUNTER), 0) + PlayEffect(EFFECT_BULB_GLOW, 1, LVar0, LVar1, LVar2, Float(1.0), LVar0, 0) + Call(SetActorVar, ACTOR_SELF, N(VAR_EFFECT), LVar0) + Call(N(init_overlay)) + Exec(N(updateEffectThread)) + ExecWait(N(setGhostNoTarget)) + Wait(2) + Call(SetActorVar, ACTOR_SELF, N(VAR_HIT_SOUND_COUNTER), 0) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) - EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_SPEAK_FLAGS), LVar0) - EVT_IF_NOT_FLAG(LVar0, 1) - EVT_BITWISE_OR_CONST(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_SPEAK_FLAGS), LVar0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamOffsetZ, 40) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_CALL(ActorSpeak, MSG_CH4_0051, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim05, ANIM_BigLanternGhost_Anim01) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_END_IF - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) + Call(GetActorVar, ACTOR_SELF, N(VAR_SPEAK_FLAGS), LVar0) + IfNotFlag(LVar0, 1) + BitwiseOrConst(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, N(VAR_SPEAK_FLAGS), LVar0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamOffsetZ, 40) + Call(MoveBattleCamOver, 30) + Wait(30) + Call(ActorSpeak, MSG_CH4_0051, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim05, ANIM_BigLanternGhost_Anim01) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + EndIf + CaseEq(PHASE_ENEMY_BEGIN) + EndSwitch + Return + End }; EvtScript N(updateEffectThread) = { - EVT_SET_PRIORITY(99) - EVT_LABEL(0) - EVT_CALL(ActorExists, ACTOR_SELF, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_EFFECT), LVar0) - EVT_ELSE - EVT_SET(LVar0, 0) - EVT_END_IF - EVT_CALL(N(update_effect), LVar0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + SetPriority(99) + Label(0) + Call(ActorExists, ACTOR_SELF, LVar0) + IfNe(LVar0, 0) + Call(GetActorVar, ACTOR_SELF, N(VAR_EFFECT), LVar0) + Else + Set(LVar0, 0) + EndIf + Call(N(update_effect), LVar0) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(ActorExists, ACTOR_ENEMY0, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(ActorExists, ACTOR_ENEMY0, LVar0) + IfNe(LVar0, 0) + Wait(1) + Goto(0) + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_EXEC_WAIT(N(onHit)) - EVT_EXEC_WAIT(N(checkExtinguish)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BigLanternGhost_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_EXEC_WAIT(N(onHit)) - EVT_EXEC_WAIT(N(checkExtinguish)) - EVT_SET(LVar0, 1) - EVT_SET(LVar1, 7143434) - EVT_SET(LVar2, 7143435) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_EXEC_WAIT(N(onHit)) - EVT_SET(LVar0, 1) - EVT_SET(LVar1, 7143434) - EVT_SET(LVar2, 7143435) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BigLanternGhost_Anim0B) - EVT_EXEC_WAIT(N(onDeath)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_EXEC_WAIT(N(onHit)) - EVT_EXEC_WAIT(N(checkExtinguish)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BigLanternGhost_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BigLanternGhost_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BigLanternGhost_Anim09) - EVT_EXEC_WAIT(N(onDeath)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_EXEC_WAIT(N(onHit)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BigLanternGhost_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BigLanternGhost_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_EXEC_WAIT(N(onHit)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BigLanternGhost_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BigLanternGhost_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BigLanternGhost_Anim09) - EVT_EXEC_WAIT(N(onDeath)) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CALL(func_8026E914, LVar0, LVar1) - EVT_IF_EQ(LVar1, 2) - EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_LANTERN_BRIGHTNESS), LVar2) - EVT_IF_LT(LVar2, 10) - EVT_ADD(LVar2, 2) - EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_HIT_SOUND_COUNTER), LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_REVEAL_MORE_1) - EVT_CALL(AddActorVar, ACTOR_SELF, N(VAR_HIT_SOUND_COUNTER), 1) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_REVEAL_MORE_2) - EVT_CALL(AddActorVar, ACTOR_SELF, N(VAR_HIT_SOUND_COUNTER), 1) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_REVEAL_MORE_3) - EVT_CALL(AddActorVar, ACTOR_SELF, N(VAR_HIT_SOUND_COUNTER), 1) - EVT_CASE_EQ(3) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_REVEAL_MORE_4) - EVT_CALL(AddActorVar, ACTOR_SELF, N(VAR_HIT_SOUND_COUNTER), 1) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_IF_GT(LVar2, 10) - EVT_SET(LVar2, 10) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_LANTERN_BRIGHTNESS), LVar2) - EVT_EXEC_WAIT(N(setGhostNoTarget)) - EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_LANTERN_BRIGHTNESS), LVar0) - EVT_IF_GE(LVar0, 6) - EVT_EXEC_WAIT(N(checkExtinguish)) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BigLanternGhost_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BigLanternGhost_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(EVENT_SPIKE_TAUNT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BigLanternGhost_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BigLanternGhost_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BigLanternGhost_Anim09) - EVT_EXEC_WAIT(N(onDeath)) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BigLanternGhost_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_30) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BigLanternGhost_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(1000) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BigLanternGhost_Anim01) - EVT_SET_CONST(LVar2, ANIM_BigLanternGhost_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + ExecWait(N(onHit)) + ExecWait(N(checkExtinguish)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BigLanternGhost_Anim09) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + ExecWait(N(onHit)) + ExecWait(N(checkExtinguish)) + Set(LVar0, 1) + Set(LVar1, 7143434) + Set(LVar2, 7143435) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + ExecWait(N(onHit)) + Set(LVar0, 1) + Set(LVar1, 7143434) + Set(LVar2, 7143435) + ExecWait(EVS_Enemy_BurnHit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BigLanternGhost_Anim0B) + ExecWait(N(onDeath)) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + ExecWait(N(onHit)) + ExecWait(N(checkExtinguish)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BigLanternGhost_Anim09) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BigLanternGhost_Anim09) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BigLanternGhost_Anim09) + ExecWait(N(onDeath)) + Return + CaseEq(EVENT_SHOCK_HIT) + ExecWait(N(onHit)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BigLanternGhost_Anim09) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BigLanternGhost_Anim09) + ExecWait(EVS_Enemy_Knockback) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + ExecWait(N(onHit)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BigLanternGhost_Anim09) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BigLanternGhost_Anim09) + ExecWait(EVS_Enemy_Knockback) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BigLanternGhost_Anim09) + ExecWait(N(onDeath)) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + Call(func_8026E914, LVar0, LVar1) + IfEq(LVar1, 2) + Call(GetActorVar, ACTOR_SELF, N(VAR_LANTERN_BRIGHTNESS), LVar2) + IfLt(LVar2, 10) + Add(LVar2, 2) + Call(GetActorVar, ACTOR_SELF, N(VAR_HIT_SOUND_COUNTER), LVar0) + Switch(LVar0) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_REVEAL_MORE_1) + Call(AddActorVar, ACTOR_SELF, N(VAR_HIT_SOUND_COUNTER), 1) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_REVEAL_MORE_2) + Call(AddActorVar, ACTOR_SELF, N(VAR_HIT_SOUND_COUNTER), 1) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_REVEAL_MORE_3) + Call(AddActorVar, ACTOR_SELF, N(VAR_HIT_SOUND_COUNTER), 1) + CaseEq(3) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_REVEAL_MORE_4) + Call(AddActorVar, ACTOR_SELF, N(VAR_HIT_SOUND_COUNTER), 1) + CaseDefault + EndSwitch + IfGt(LVar2, 10) + Set(LVar2, 10) + EndIf + Call(SetActorVar, ACTOR_SELF, N(VAR_LANTERN_BRIGHTNESS), LVar2) + ExecWait(N(setGhostNoTarget)) + Call(GetActorVar, ACTOR_SELF, N(VAR_LANTERN_BRIGHTNESS), LVar0) + IfGe(LVar0, 6) + ExecWait(N(checkExtinguish)) + EndIf + EndIf + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BigLanternGhost_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BigLanternGhost_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(EVENT_SPIKE_TAUNT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BigLanternGhost_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BigLanternGhost_Anim09) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BigLanternGhost_Anim09) + ExecWait(N(onDeath)) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + ExecWait(N(EVS_ReturnHome)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BigLanternGhost_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_30) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BigLanternGhost_Anim09) + ExecWait(EVS_Enemy_Hit) + Wait(1000) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BigLanternGhost_Anim01) + SetConst(LVar2, ANIM_BigLanternGhost_Anim09) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(onHit) = { - EVT_CALL(func_8026E914, LVar0, LVar1) - EVT_IF_NE(LVar1, 1) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar1) - EVT_MUL(LVar1, 10) - EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_6), LVar0) - EVT_ADD(LVar0, LVar1) - EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_6), LVar0) - EVT_RETURN - EVT_END + Call(func_8026E914, LVar0, LVar1) + IfNe(LVar1, 1) + Return + EndIf + Call(GetLastDamage, ACTOR_SELF, LVar1) + Mul(LVar1, 10) + Call(GetActorVar, ACTOR_SELF, N(VAR_6), LVar0) + Add(LVar0, LVar1) + Call(SetActorVar, ACTOR_SELF, N(VAR_6), LVar0) + Return + End }; EvtScript N(checkExtinguish) = { - EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_MOVE_ID), LVar0) - EVT_IF_NE(LVar0, N(MOVE_LIGHT_BEAM)) - EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_MOVE_ID), N(MOVE_EXTINGUISH)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, N(VAR_MOVE_ID), LVar0) + IfNe(LVar0, N(MOVE_LIGHT_BEAM)) + Call(SetActorVar, ACTOR_SELF, N(VAR_MOVE_ID), N(MOVE_EXTINGUISH)) + EndIf + Return + End }; EvtScript N(attackHeavyJump) = { - EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_LANTERN_BRIGHTNESS), LVar0) - EVT_IF_GE(LVar0, 6) - EVT_EXEC_WAIT(N(checkExtinguish)) - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 260) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim06) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim01) - EVT_WAIT(8) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_LARGE_ACTOR_JUMP, 0) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim10) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim11) - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_STEP) - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) - EVT_SUB(LVar0, 15) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim01) - EVT_SUB(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_STEP) - EVT_WAIT(8) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim10) - EVT_THREAD - EVT_WAIT(7) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim11) - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 5, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SET(LVarF, LVar0) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_STEP) - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(SetBattleCamZoom, 320) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim10) - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_STEP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim01) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_STEP) - EVT_WAIT(8) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, N(VAR_LANTERN_BRIGHTNESS), LVar0) + IfGe(LVar0, 6) + ExecWait(N(checkExtinguish)) + EndIf + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 260) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Set(LVar1, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim06) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim01) + Wait(8) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_LARGE_ACTOR_JUMP, 0) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim10) + Thread + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim11) + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_STEP) + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) + Sub(LVar0, 15) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim01) + Sub(LVar0, 10) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_STEP) + Wait(8) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ExecWait(N(EVS_ReturnHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim10) + Thread + Wait(7) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim11) + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 5, BS_FLAGS1_TRIGGER_EVENTS) + Set(LVarF, LVar0) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_STEP) + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(SetBattleCamZoom, 320) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Thread + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim10) + EndThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_STEP) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim01) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_STEP) + Wait(8) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(attackLightBeam) = { - EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_MOVE_ID), N(MOVE_HEAVY_JUMP)) - EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_LIGHT_BEAM_COUNTER), 3) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13) - EVT_CALL(SetBattleCamZoom, 240) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 80) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim06) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim01) - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_05) - EVT_CALL(SetBattleCamZoom, 350) - EVT_CALL(SetBattleCamOffsetZ, 35) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 8) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_LIGHT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim0F) - EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_LANTERN_BRIGHTNESS), LVar5) - EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_LANTERN_BRIGHTNESS), 11) - EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_LANTERN_X), LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_LANTERN_Y), LVar1) - EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_LANTERN_Z), LVar2) - EVT_ADD(LVar1, 10) - EVT_ADD(LVar2, 2) - EVT_THREAD - EVT_WAIT(1) - EVT_PLAY_EFFECT(EFFECT_LIGHT_RAYS, 2, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), LVarB, 0) - EVT_WAIT(30) - EVT_CALL(RemoveEffect, LVarB) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(1) - EVT_PLAY_EFFECT(EFFECT_RADIATING_ENERGY_ORB, 1, LVar0, LVar1, LVar2, EVT_FLOAT(1.5), 30, 0) - EVT_END_THREAD - EVT_WAIT(5) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(HIT_RESULT_MISS) - EVT_CASE_DEFAULT - EVT_CALL(ActorExists, ACTOR_PARTNER, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarD, 0, SUPPRESS_EVENT_ALL, 0, 2, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_IF - EVT_END_SWITCH - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarE, DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, 2, BS_FLAGS1_TRIGGER_EVENTS) - EVT_WAIT(2) - EVT_CALL(ActorExists, ACTOR_PARTNER, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarD, DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, 2, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_IF - EVT_END_SWITCH - EVT_WAIT(40) - EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_LANTERN_BRIGHTNESS), LVar5) - EVT_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_HIT_SOUND_COUNTER), LVar0) - EVT_WAIT(10) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_DARKEN_4) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_DARKEN_3) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_DARKEN_2) - EVT_CASE_EQ(3) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_DARKEN_1) - EVT_END_SWITCH - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim14) - EVT_WAIT(60) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, N(VAR_MOVE_ID), N(MOVE_HEAVY_JUMP)) + Call(SetActorVar, ACTOR_SELF, N(VAR_LIGHT_BEAM_COUNTER), 3) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_13) + Call(SetBattleCamZoom, 240) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 80) + Set(LVar1, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim06) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim01) + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_PRESET_05) + Call(SetBattleCamZoom, 350) + Call(SetBattleCamOffsetZ, 35) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 8) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_LIGHT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim0F) + Call(GetActorVar, ACTOR_SELF, N(VAR_LANTERN_BRIGHTNESS), LVar5) + Call(SetActorVar, ACTOR_SELF, N(VAR_LANTERN_BRIGHTNESS), 11) + Call(GetActorVar, ACTOR_SELF, N(VAR_LANTERN_X), LVar0) + Call(GetActorVar, ACTOR_SELF, N(VAR_LANTERN_Y), LVar1) + Call(GetActorVar, ACTOR_SELF, N(VAR_LANTERN_Z), LVar2) + Add(LVar1, 10) + Add(LVar2, 2) + Thread + Wait(1) + PlayEffect(EFFECT_LIGHT_RAYS, 2, LVar0, LVar1, LVar2, Float(1.0), LVarB, 0) + Wait(30) + Call(RemoveEffect, LVarB) + EndThread + Thread + Wait(1) + PlayEffect(EFFECT_RADIATING_ENERGY_ORB, 1, LVar0, LVar1, LVar2, Float(1.5), 30, 0) + EndThread + Wait(5) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseEq(HIT_RESULT_MISS) + CaseDefault + Call(ActorExists, ACTOR_PARTNER, LVar0) + IfEq(LVar0, 1) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVarD, 0, SUPPRESS_EVENT_ALL, 0, 2, BS_FLAGS1_TRIGGER_EVENTS) + EndIf + EndSwitch + EndCaseGroup + CaseDefault + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVarE, DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, 2, BS_FLAGS1_TRIGGER_EVENTS) + Wait(2) + Call(ActorExists, ACTOR_PARTNER, LVar0) + IfEq(LVar0, 1) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVarD, DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, 2, BS_FLAGS1_TRIGGER_EVENTS) + EndIf + EndSwitch + Wait(40) + Call(SetActorVar, ACTOR_SELF, N(VAR_LANTERN_BRIGHTNESS), LVar5) + Thread + Call(GetActorVar, ACTOR_SELF, N(VAR_HIT_SOUND_COUNTER), LVar0) + Wait(10) + Switch(LVar0) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_DARKEN_4) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_DARKEN_3) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_DARKEN_2) + CaseEq(3) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_DARKEN_1) + EndSwitch + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim14) + Wait(60) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ExecWait(N(EVS_ReturnHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(extinguish) = { - EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_EXTINGUISHED_ONCE), 1) - EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_6), 1000) - EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_MOVE_ID), N(MOVE_LIGHT_BEAM)) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_SPEAK_FLAGS), LVar0) - EVT_IF_NOT_FLAG(LVar0, 2) - EVT_BITWISE_OR_CONST(LVar0, 2) - EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_SPEAK_FLAGS), LVar0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(SetBattleCamOffsetZ, 40) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar0) - EVT_CALL(GetActorHP, ACTOR_SELF, LVar1) - EVT_IF_EQ(LVar0, LVar1) - EVT_CALL(ActorSpeak, MSG_CH4_0053, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim05, ANIM_BigLanternGhost_Anim01) - EVT_ELSE - EVT_CALL(ActorSpeak, MSG_CH4_0052, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim05, ANIM_BigLanternGhost_Anim01) - EVT_END_IF - EVT_END_IF - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13) - EVT_CALL(SetBattleCamZoom, 230) - EVT_CALL(SetBattleCamOffsetZ, 25) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_INHALE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim0F) - EVT_WAIT(8) - EVT_THREAD - EVT_WAIT(2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_BLOW) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim0E) - EVT_WAIT(5) - EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_LANTERN_BRIGHTNESS), 2) - EVT_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_HIT_SOUND_COUNTER), LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_HIT_SOUND_COUNTER), 0) - EVT_WAIT(10) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(4) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_DARKEN_4) - EVT_CASE_EQ(3) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_DARKEN_3) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_DARKEN_2) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_DARKEN_1) - EVT_END_SWITCH - EVT_END_THREAD - EVT_WAIT(14) - EVT_WAIT(1) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim01) - EVT_EXEC_WAIT(N(setGhostNoTarget)) - EVT_WAIT(30) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, N(VAR_EXTINGUISHED_ONCE), 1) + Call(SetActorVar, ACTOR_SELF, N(VAR_6), 1000) + Call(SetActorVar, ACTOR_SELF, N(VAR_MOVE_ID), N(MOVE_LIGHT_BEAM)) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetActorVar, ACTOR_SELF, N(VAR_SPEAK_FLAGS), LVar0) + IfNotFlag(LVar0, 2) + BitwiseOrConst(LVar0, 2) + Call(SetActorVar, ACTOR_SELF, N(VAR_SPEAK_FLAGS), LVar0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(SetBattleCamOffsetZ, 40) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 30) + Wait(30) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar0) + Call(GetActorHP, ACTOR_SELF, LVar1) + IfEq(LVar0, LVar1) + Call(ActorSpeak, MSG_CH4_0053, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim05, ANIM_BigLanternGhost_Anim01) + Else + Call(ActorSpeak, MSG_CH4_0052, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim05, ANIM_BigLanternGhost_Anim01) + EndIf + EndIf + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_13) + Call(SetBattleCamZoom, 230) + Call(SetBattleCamOffsetZ, 25) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_INHALE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim0F) + Wait(8) + Thread + Wait(2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_BLOW) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim0E) + Wait(5) + Call(SetActorVar, ACTOR_SELF, N(VAR_LANTERN_BRIGHTNESS), 2) + Thread + Call(GetActorVar, ACTOR_SELF, N(VAR_HIT_SOUND_COUNTER), LVar0) + Call(SetActorVar, ACTOR_SELF, N(VAR_HIT_SOUND_COUNTER), 0) + Wait(10) + Switch(LVar0) + CaseEq(4) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_DARKEN_4) + CaseEq(3) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_DARKEN_3) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_DARKEN_2) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LANTERN_GHOST_DARKEN_1) + EndSwitch + EndThread + Wait(14) + Wait(1) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim01) + ExecWait(N(setGhostNoTarget)) + Wait(30) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_LIGHT_BEAM_COUNTER), LVar0) - EVT_IF_GT(LVar0, 0) - EVT_SUB(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_LIGHT_BEAM_COUNTER), LVar0) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_MOVE_ID), LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(N(MOVE_LIGHT_BEAM)) - EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_LIGHT_BEAM_COUNTER), LVar0) - EVT_IF_GT(LVar0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_MOVE_ID), N(MOVE_HEAVY_JUMP)) - EVT_END_IF - EVT_CASE_EQ(N(MOVE_EXTINGUISH)) - EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_LANTERN_BRIGHTNESS), LVar0) - EVT_IF_LT(LVar0, 6) - EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_MOVE_ID), N(MOVE_HEAVY_JUMP)) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_MOVE_ID), LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(N(MOVE_LIGHT_BEAM)) - EVT_EXEC_WAIT(N(attackLightBeam)) - EVT_CASE_EQ(N(MOVE_EXTINGUISH)) - EVT_EXEC_WAIT(N(extinguish)) - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(N(attackHeavyJump)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, N(VAR_LIGHT_BEAM_COUNTER), LVar0) + IfGt(LVar0, 0) + Sub(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, N(VAR_LIGHT_BEAM_COUNTER), LVar0) + EndIf + Call(GetActorVar, ACTOR_SELF, N(VAR_MOVE_ID), LVar0) + Switch(LVar0) + CaseEq(N(MOVE_LIGHT_BEAM)) + Call(GetActorVar, ACTOR_SELF, N(VAR_LIGHT_BEAM_COUNTER), LVar0) + IfGt(LVar0, 0) + Call(SetActorVar, ACTOR_SELF, N(VAR_MOVE_ID), N(MOVE_HEAVY_JUMP)) + EndIf + CaseEq(N(MOVE_EXTINGUISH)) + Call(GetActorVar, ACTOR_SELF, N(VAR_LANTERN_BRIGHTNESS), LVar0) + IfLt(LVar0, 6) + Call(SetActorVar, ACTOR_SELF, N(VAR_MOVE_ID), N(MOVE_HEAVY_JUMP)) + EndIf + EndSwitch + Call(GetActorVar, ACTOR_SELF, N(VAR_MOVE_ID), LVar0) + Switch(LVar0) + CaseEq(N(MOVE_LIGHT_BEAM)) + ExecWait(N(attackLightBeam)) + CaseEq(N(MOVE_EXTINGUISH)) + ExecWait(N(extinguish)) + CaseDefault + ExecWait(N(attackHeavyJump)) + EndSwitch + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BigLanternGhost_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim01) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BigLanternGhost_Anim07) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BigLanternGhost_Anim01) + Return + End }; EvtScript N(setGhostNoTarget) = { - EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_LANTERN_BRIGHTNESS), LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_LT(5) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CASE_LT(8) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CASE_DEFAULT - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, N(VAR_LANTERN_BRIGHTNESS), LVar0) + Switch(LVar0) + CaseLt(5) + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, TRUE) + CaseLt(8) + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, FALSE) + CaseDefault + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, FALSE) + EndSwitch + Return + End }; EvtScript N(onDeath) = { - EVT_EXEC_WAIT(EVS_Enemy_DeathWithoutRemove) - EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_EFFECT), LVar0) - EVT_CALL(RemoveEffect, LVar0) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + ExecWait(EVS_Enemy_DeathWithoutRemove) + Call(GetActorVar, ACTOR_SELF, N(VAR_EFFECT), LVar0) + Call(RemoveEffect, LVar0) + Call(RemoveActor, ACTOR_SELF) + Return + End }; diff --git a/src/battle/area/pra2/actor/crystal_bit.c b/src/battle/area/pra2/actor/crystal_bit.c index 965bf74d0bb..fc7a2ab9b44 100644 --- a/src/battle/area/pra2/actor/crystal_bit.c +++ b/src/battle/area/pra2/actor/crystal_bit.c @@ -213,12 +213,12 @@ ActorBlueprint N(prism) = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Return + End }; API_CALLABLE(N(UpdateCrystalBitEffect)) { @@ -243,167 +243,167 @@ API_CALLABLE(N(UpdateCrystalBitEffect)) { } EvtScript N(EVS_Idle) = { - EVT_PLAY_EFFECT(EFFECT_MISC_PARTICLES, 1, NPC_DISPOSE_LOCATION, 24, 24, EVT_FLOAT(1.0), 5, 0, 0, 0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Bit_ParticlesEffect, LVarF) - EVT_CHILD_THREAD - EVT_CALL(N(UpdateCrystalBitEffect), LVarF) - EVT_END_CHILD_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + PlayEffect(EFFECT_MISC_PARTICLES, 1, NPC_DISPOSE_LOCATION, 24, 24, Float(1.0), 5, 0, 0, 0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Bit_ParticlesEffect, LVarF) + ChildThread + Call(N(UpdateCrystalBitEffect), LVarF) + EndChildThread + Loop(0) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_CALL(GetOwnerID, LVar0) - EVT_CALL(GetActorVar, ACTOR_KING, AVAR_King_CubeBitID, LVar3) - EVT_IF_EQ(LVar0, LVar3) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim22) - EVT_SET_CONST(LVar2, -1) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_KING, AVAR_King_SphereBitID, LVar3) - EVT_IF_EQ(LVar0, LVar3) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim23) - EVT_SET_CONST(LVar2, -1) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_KING, AVAR_King_PrismBitID, LVar3) - EVT_IF_EQ(LVar0, LVar3) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim24) - EVT_SET_CONST(LVar2, -1) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar1, 0, LVar3) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(GetOwnerID, LVar0) - EVT_CALL(GetActorVar, ACTOR_KING, AVAR_King_CubeBitID, LVar1) - EVT_IF_EQ(LVar0, LVar1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim05) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_KING, AVAR_King_SphereBitID, LVar1) - EVT_IF_EQ(LVar0, LVar1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim06) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_KING, AVAR_King_PrismBitID, LVar1) - EVT_IF_EQ(LVar0, LVar1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim07) - EVT_END_IF - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_CALL(RandInt, 360, LVar0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_CALL(AddVectorPolar, LVar1, LVar3, EVT_FLOAT(30.0), LVar0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar1, 0, LVar3) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(AddVectorPolar, LVar1, LVar3, EVT_FLOAT(20.0), LVar0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar1, 0, LVar3) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(AddVectorPolar, LVar1, LVar3, EVT_FLOAT(10.0), LVar0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar1, 0, LVar3) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_SET(LVar0, 255) - EVT_LOOP(20) - EVT_SUB(LVar0, 12) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Bit_ParticlesEffect, LVar0) - EVT_CALL(RemoveEffect, LVar0) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_CALL(GetOwnerID, LVar0) - EVT_CALL(GetActorVar, ACTOR_KING, AVAR_King_CubeBitID, LVar3) - EVT_IF_EQ(LVar0, LVar3) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim22) - EVT_SET_CONST(LVar2, -1) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_KING, AVAR_King_SphereBitID, LVar3) - EVT_IF_EQ(LVar0, LVar3) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim23) - EVT_SET_CONST(LVar2, -1) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_KING, AVAR_King_PrismBitID, LVar3) - EVT_IF_EQ(LVar0, LVar3) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim24) - EVT_SET_CONST(LVar2, -1) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar1, 0, LVar3) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_CALL(RandInt, 360, LVar0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_CALL(AddVectorPolar, LVar1, LVar3, EVT_FLOAT(30.0), LVar0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar1, 0, LVar3) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(AddVectorPolar, LVar1, LVar3, EVT_FLOAT(20.0), LVar0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar1, 0, LVar3) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(AddVectorPolar, LVar1, LVar3, EVT_FLOAT(10.0), LVar0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar1, 0, LVar3) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_SET(LVar0, 255) - EVT_LOOP(20) - EVT_SUB(LVar0, 12) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Bit_ParticlesEffect, LVar0) - EVT_CALL(RemoveEffect, LVar0) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Bit_ParticlesEffect, LVar0) - EVT_CALL(RemoveEffect, LVar0) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + Call(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + Call(GetOwnerID, LVar0) + Call(GetActorVar, ACTOR_KING, AVAR_King_CubeBitID, LVar3) + IfEq(LVar0, LVar3) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_CrystalKing_Anim22) + SetConst(LVar2, -1) + EndIf + Call(GetActorVar, ACTOR_KING, AVAR_King_SphereBitID, LVar3) + IfEq(LVar0, LVar3) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_CrystalKing_Anim23) + SetConst(LVar2, -1) + EndIf + Call(GetActorVar, ACTOR_KING, AVAR_King_PrismBitID, LVar3) + IfEq(LVar0, LVar3) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_CrystalKing_Anim24) + SetConst(LVar2, -1) + EndIf + ExecWait(EVS_Enemy_BurnHit) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + Call(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + Call(GetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) + ExecWait(EVS_Enemy_Hit) + Call(HideHealthBar, ACTOR_SELF) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Call(SetGoalPos, ACTOR_SELF, LVar1, 0, LVar3) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(GetOwnerID, LVar0) + Call(GetActorVar, ACTOR_KING, AVAR_King_CubeBitID, LVar1) + IfEq(LVar0, LVar1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim05) + EndIf + Call(GetActorVar, ACTOR_KING, AVAR_King_SphereBitID, LVar1) + IfEq(LVar0, LVar1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim06) + EndIf + Call(GetActorVar, ACTOR_KING, AVAR_King_PrismBitID, LVar1) + IfEq(LVar0, LVar1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim07) + EndIf + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Call(RandInt, 360, LVar0) + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Call(AddVectorPolar, LVar1, LVar3, Float(30.0), LVar0) + Call(SetGoalPos, ACTOR_SELF, LVar1, 0, LVar3) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(AddVectorPolar, LVar1, LVar3, Float(20.0), LVar0) + Call(SetGoalPos, ACTOR_SELF, LVar1, 0, LVar3) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(AddVectorPolar, LVar1, LVar3, Float(10.0), LVar0) + Call(SetGoalPos, ACTOR_SELF, LVar1, 0, LVar3) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Set(LVar0, 255) + Loop(20) + Sub(LVar0, 12) + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) + Wait(1) + EndLoop + Call(GetActorVar, ACTOR_SELF, AVAR_Bit_ParticlesEffect, LVar0) + Call(RemoveEffect, LVar0) + Call(RemoveActor, ACTOR_SELF) + Return + CaseEq(EVENT_BURN_DEATH) + Call(GetOwnerID, LVar0) + Call(GetActorVar, ACTOR_KING, AVAR_King_CubeBitID, LVar3) + IfEq(LVar0, LVar3) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_CrystalKing_Anim22) + SetConst(LVar2, -1) + EndIf + Call(GetActorVar, ACTOR_KING, AVAR_King_SphereBitID, LVar3) + IfEq(LVar0, LVar3) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_CrystalKing_Anim23) + SetConst(LVar2, -1) + EndIf + Call(GetActorVar, ACTOR_KING, AVAR_King_PrismBitID, LVar3) + IfEq(LVar0, LVar3) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_CrystalKing_Anim24) + SetConst(LVar2, -1) + EndIf + ExecWait(EVS_Enemy_BurnHit) + Call(HideHealthBar, ACTOR_SELF) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Call(SetGoalPos, ACTOR_SELF, LVar1, 0, LVar3) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Call(RandInt, 360, LVar0) + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Call(AddVectorPolar, LVar1, LVar3, Float(30.0), LVar0) + Call(SetGoalPos, ACTOR_SELF, LVar1, 0, LVar3) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(AddVectorPolar, LVar1, LVar3, Float(20.0), LVar0) + Call(SetGoalPos, ACTOR_SELF, LVar1, 0, LVar3) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(AddVectorPolar, LVar1, LVar3, Float(10.0), LVar0) + Call(SetGoalPos, ACTOR_SELF, LVar1, 0, LVar3) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Set(LVar0, 255) + Loop(20) + Sub(LVar0, 12) + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) + Wait(1) + EndLoop + Call(GetActorVar, ACTOR_SELF, AVAR_Bit_ParticlesEffect, LVar0) + Call(RemoveEffect, LVar0) + Call(RemoveActor, ACTOR_SELF) + Return + CaseEq(EVENT_BLOW_AWAY) + Call(GetActorVar, ACTOR_SELF, AVAR_Bit_ParticlesEffect, LVar0) + Call(RemoveEffect, LVar0) + Return + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/battle/area/pra2/actor/crystal_king.c b/src/battle/area/pra2/actor/crystal_king.c index 8f7b8495447..d18819982aa 100644 --- a/src/battle/area/pra2/actor/crystal_king.c +++ b/src/battle/area/pra2/actor/crystal_king.c @@ -135,19 +135,19 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Flags, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HealCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_First) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Clone1_ID, -1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Clone2_ID, -1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_King_CubeBitID, ACTOR_BIT_1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_King_SphereBitID, ACTOR_BIT_2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_King_PrismBitID, ACTOR_BIT_3) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_Flags, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_HealCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_First) + Call(SetActorVar, ACTOR_SELF, AVAR_Clone1_ID, -1) + Call(SetActorVar, ACTOR_SELF, AVAR_Clone2_ID, -1) + Call(SetActorVar, ACTOR_SELF, AVAR_King_CubeBitID, ACTOR_BIT_1) + Call(SetActorVar, ACTOR_SELF, AVAR_King_SphereBitID, ACTOR_BIT_2) + Call(SetActorVar, ACTOR_SELF, AVAR_King_PrismBitID, ACTOR_BIT_3) + Return + End }; #include "common/StartRumbleWithParams.inc.c" @@ -235,925 +235,925 @@ API_CALLABLE(N(MakeSuctionPath)) { } EvtScript N(EVS_Idle) = { - EVT_SET(LVarF, 0) - EVT_LABEL(0) - EVT_CALL(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_IF_FLAG(LVar0, AVAR_Flag_HasClones) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar2) - EVT_CALL(ActorExists, LVar1, LVar3) - EVT_IF_EQ(LVar3, TRUE) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar4, EVT_FLOAT(128.0), EVT_FLOAT(254.0), 20, 0, 0) - EVT_SET(LVar4, LVar4) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar4) - EVT_CALL(SetPartAlpha, LVar1, PRT_MAIN, LVar4) - EVT_CALL(SetPartAlpha, LVar2, PRT_MAIN, LVar4) - EVT_ADD(LVarF, 1) - EVT_IF_GT(LVarF, 40) - EVT_SET(LVarF, 0) - EVT_END_IF - EVT_ELSE - EVT_CALL(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_BITWISE_AND_CONST(LVar0, ~AVAR_Flag_HasClones) - EVT_CALL(SetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_END_IF - EVT_ELSE - EVT_SET(LVarF, 0) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVarF, 0) + Label(0) + Call(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + IfFlag(LVar0, AVAR_Flag_HasClones) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar1) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar2) + Call(ActorExists, LVar1, LVar3) + IfEq(LVar3, TRUE) + Call(N(CosInterpMinMax), LVarF, LVar4, Float(128.0), Float(254.0), 20, 0, 0) + Set(LVar4, LVar4) + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar4) + Call(SetPartAlpha, LVar1, PRT_MAIN, LVar4) + Call(SetPartAlpha, LVar2, PRT_MAIN, LVar4) + Add(LVarF, 1) + IfGt(LVarF, 40) + Set(LVarF, 0) + EndIf + Else + Call(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + BitwiseAndConst(LVar0, ~AVAR_Flag_HasClones) + Call(SetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + EndIf + Else + Set(LVarF, 0) + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_UpdateHovering) = { - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 0) - EVT_SET(LVarD, 0) - EVT_SET(LVarE, 0) - EVT_SET(LVarF, 0) - EVT_LABEL(1) - EVT_CALL(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_IF_NOT_FLAG(LVar0, AVAL_Flag_SuspendHover) - EVT_SET(LVar0, ACTOR_SELF) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar2) - EVT_CALL(GetActorPos, LVar0, LVar3, LVar4, LVar5) - EVT_CALL(GetActorPos, LVar1, LVar4, LVar5, LVar6) - EVT_IF_GT(LVar3, LVar4) - EVT_SET(LVar7, LVar0) - EVT_SET(LVar0, LVar1) - EVT_SET(LVar1, LVar7) - EVT_END_IF - EVT_CALL(GetActorPos, LVar0, LVar3, LVar4, LVar5) - EVT_CALL(GetActorPos, LVar2, LVar4, LVar5, LVar6) - EVT_IF_GT(LVar3, LVar4) - EVT_SET(LVar7, LVar0) - EVT_SET(LVar0, LVar2) - EVT_SET(LVar2, LVar7) - EVT_END_IF - EVT_CALL(GetActorPos, LVar1, LVar3, LVar4, LVar5) - EVT_CALL(GetActorPos, LVar2, LVar4, LVar5, LVar6) - EVT_IF_GT(LVar3, LVar4) - EVT_SET(LVar7, LVar1) - EVT_SET(LVar1, LVar2) - EVT_SET(LVar2, LVar7) - EVT_END_IF - EVT_CALL(GetActorPos, LVar0, LVar3, LVar4, LVar5) - EVT_SET(LVar4, 41) - EVT_ADD(LVar4, LVarA) - EVT_CALL(SetActorPos, LVar0, LVar3, LVar4, LVar5) - EVT_CALL(GetActorPos, LVar1, LVar3, LVar4, LVar5) - EVT_SET(LVar4, 41) - EVT_ADD(LVar4, LVarC) - EVT_CALL(SetActorPos, LVar1, LVar3, LVar4, LVar5) - EVT_CALL(GetActorPos, LVar2, LVar3, LVar4, LVar5) - EVT_SET(LVar4, 41) - EVT_ADD(LVar4, LVarE) - EVT_CALL(SetActorPos, LVar2, LVar3, LVar4, LVar5) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, EVT_FLOAT(0.0), EVT_FLOAT(5.0), 30, 0, 0) - EVT_SET(LVarA, LVarB) - EVT_SET(LVarB, LVarC) - EVT_SET(LVarC, LVarD) - EVT_SET(LVarD, LVarE) - EVT_SET(LVarE, LVar0) - EVT_ADD(LVarF, 1) - EVT_IF_GT(LVarF, 60) - EVT_SET(LVarF, 0) - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(1) - EVT_RETURN - EVT_END + Set(LVarA, 0) + Set(LVarB, 0) + Set(LVarC, 0) + Set(LVarD, 0) + Set(LVarE, 0) + Set(LVarF, 0) + Label(1) + Call(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + IfNotFlag(LVar0, AVAL_Flag_SuspendHover) + Set(LVar0, ACTOR_SELF) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar1) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar2) + Call(GetActorPos, LVar0, LVar3, LVar4, LVar5) + Call(GetActorPos, LVar1, LVar4, LVar5, LVar6) + IfGt(LVar3, LVar4) + Set(LVar7, LVar0) + Set(LVar0, LVar1) + Set(LVar1, LVar7) + EndIf + Call(GetActorPos, LVar0, LVar3, LVar4, LVar5) + Call(GetActorPos, LVar2, LVar4, LVar5, LVar6) + IfGt(LVar3, LVar4) + Set(LVar7, LVar0) + Set(LVar0, LVar2) + Set(LVar2, LVar7) + EndIf + Call(GetActorPos, LVar1, LVar3, LVar4, LVar5) + Call(GetActorPos, LVar2, LVar4, LVar5, LVar6) + IfGt(LVar3, LVar4) + Set(LVar7, LVar1) + Set(LVar1, LVar2) + Set(LVar2, LVar7) + EndIf + Call(GetActorPos, LVar0, LVar3, LVar4, LVar5) + Set(LVar4, 41) + Add(LVar4, LVarA) + Call(SetActorPos, LVar0, LVar3, LVar4, LVar5) + Call(GetActorPos, LVar1, LVar3, LVar4, LVar5) + Set(LVar4, 41) + Add(LVar4, LVarC) + Call(SetActorPos, LVar1, LVar3, LVar4, LVar5) + Call(GetActorPos, LVar2, LVar3, LVar4, LVar5) + Set(LVar4, 41) + Add(LVar4, LVarE) + Call(SetActorPos, LVar2, LVar3, LVar4, LVar5) + Call(N(CosInterpMinMax), LVarF, LVar0, Float(0.0), Float(5.0), 30, 0, 0) + Set(LVarA, LVarB) + Set(LVarB, LVarC) + Set(LVarC, LVarD) + Set(LVarD, LVarE) + Set(LVarE, LVar0) + Add(LVarF, 1) + IfGt(LVarF, 60) + Set(LVarF, 0) + EndIf + EndIf + Wait(1) + Goto(1) + Return + End }; EvtScript N(EVS_RemoveClone) = { - EVT_CALL(EnableActorBlur, LVar9, ACTOR_BLUR_ENABLE) - EVT_CALL(SetActorFlagBits, LVar9, ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_THREAD - EVT_CALL(N(GetActorPartOpacity), LVar9, PRT_MAIN, LVar3) - EVT_CALL(MakeLerp, LVar3, 0, 20, EASING_QUADRATIC_IN) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetPartAlpha, LVar9, PRT_MAIN, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 100, 200, 20, EASING_QUADRATIC_IN) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar8) - EVT_IF_FLAG(LVar8, STATUS_FLAG_SHRINK) - EVT_MULF(LVar0, EVT_FLOAT(0.4)) - EVT_END_IF - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_CALL(SetPartScale, LVar9, PRT_MAIN, LVar0, LVar0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetActorRotationOffset, LVar9, 0, 28, 0) - EVT_ELSE - EVT_CALL(SetActorRotationOffset, LVar9, 0, 10, 0) - EVT_END_IF - EVT_CALL(MakeLerp, 3600, 0, 25, EASING_QUADRATIC_IN) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(SetActorRotation, LVar9, 0, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_CALL(RemoveActor, LVar9) - EVT_RETURN - EVT_END + Call(EnableActorBlur, LVar9, ACTOR_BLUR_ENABLE) + Call(SetActorFlagBits, LVar9, ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Thread + Call(N(GetActorPartOpacity), LVar9, PRT_MAIN, LVar3) + Call(MakeLerp, LVar3, 0, 20, EASING_QUADRATIC_IN) + Label(0) + Call(UpdateLerp) + Call(SetPartAlpha, LVar9, PRT_MAIN, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + EndThread + Thread + Call(MakeLerp, 100, 200, 20, EASING_QUADRATIC_IN) + Label(1) + Call(UpdateLerp) + Call(GetStatusFlags, ACTOR_SELF, LVar8) + IfFlag(LVar8, STATUS_FLAG_SHRINK) + MulF(LVar0, Float(0.4)) + EndIf + DivF(LVar0, Float(100.0)) + Call(SetPartScale, LVar9, PRT_MAIN, LVar0, LVar0, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + EndThread + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetActorRotationOffset, LVar9, 0, 28, 0) + Else + Call(SetActorRotationOffset, LVar9, 0, 10, 0) + EndIf + Call(MakeLerp, 3600, 0, 25, EASING_QUADRATIC_IN) + Label(2) + Call(UpdateLerp) + Call(SetActorRotation, LVar9, 0, 0, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(2) + EndIf + Call(RemoveActor, LVar9) + Return + End }; EvtScript N(EVS_OnHit) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_Move_AttackWithClones) - EVT_CASE_OR_EQ(AVAL_Move_AfterClonesAttack) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(AVAL_Move_First) - EVT_CASE_OR_EQ(AVAL_Move_AttackWithBits) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED | STATUS_FLAG_SHRINK) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_King_CubeBitID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_CALL(SetDamageSource, DMG_SRC_DEFAULT) - EVT_CALL(DispatchEvent, LVar0, EVENT_DEATH) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_King_SphereBitID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_CALL(SetDamageSource, DMG_SRC_DEFAULT) - EVT_CALL(DispatchEvent, LVar0, EVENT_DEATH) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_King_PrismBitID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_CALL(SetDamageSource, DMG_SRC_DEFAULT) - EVT_CALL(DispatchEvent, LVar0, EVENT_DEATH) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(GetLastElement, LVar0) - EVT_IF_FLAG(LVar0, DAMAGE_TYPE_MULTIPLE_POPUPS) - EVT_LABEL(0) - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS1_EXECUTING_MOVE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar9) - EVT_CALL(ActorExists, LVar9, LVarA) - EVT_IF_EQ(LVarA, TRUE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar9) - EVT_EXEC(N(EVS_RemoveClone)) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar9) - EVT_EXEC_GET_TID(N(EVS_RemoveClone), LVar0) - EVT_LABEL(1) - EVT_IS_THREAD_RUNNING(LVar0, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_IF - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_IF_NE(LVar1, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HoveringScriptID, LVarA) - EVT_KILL_THREAD(LVarA) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_WITHER) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(N(StartRumbleWithParams), 150, 10) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(0.7)) - EVT_END_THREAD - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim0E) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, 70, 0, 5) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim09) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_BITWISE_AND_CONST(LVar0, ~AVAR_Flag_HitCombo) - EVT_CALL(SetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_Move_AttackWithClones) + CaseOrEq(AVAL_Move_AfterClonesAttack) + EndCaseGroup + CaseOrEq(AVAL_Move_First) + CaseOrEq(AVAL_Move_AttackWithBits) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAGS_IMMOBILIZED | STATUS_FLAG_SHRINK) + Call(GetActorVar, ACTOR_SELF, AVAR_King_CubeBitID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, TRUE) + Call(SetDamageSource, DMG_SRC_DEFAULT) + Call(DispatchEvent, LVar0, EVENT_DEATH) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_King_SphereBitID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, TRUE) + Call(SetDamageSource, DMG_SRC_DEFAULT) + Call(DispatchEvent, LVar0, EVENT_DEATH) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_King_PrismBitID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, TRUE) + Call(SetDamageSource, DMG_SRC_DEFAULT) + Call(DispatchEvent, LVar0, EVENT_DEATH) + EndIf + EndIf + Return + EndCaseGroup + CaseDefault + Return + EndSwitch + Call(GetLastElement, LVar0) + IfFlag(LVar0, DAMAGE_TYPE_MULTIPLE_POPUPS) + Label(0) + Call(GetBattleFlags, LVar0) + IfFlag(LVar0, BS_FLAGS1_EXECUTING_MOVE) + Wait(1) + Goto(0) + EndIf + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar9) + Call(ActorExists, LVar9, LVarA) + IfEq(LVarA, TRUE) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar9) + Exec(N(EVS_RemoveClone)) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar9) + ExecGetTID(N(EVS_RemoveClone), LVar0) + Label(1) + IsThreadRunning(LVar0, LVar1) + IfEq(LVar1, TRUE) + Wait(1) + Goto(1) + EndIf + EndIf + Call(HideHealthBar, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + IfNe(LVar1, 0) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetActorVar, ACTOR_SELF, AVAR_HoveringScriptID, LVarA) + KillThread(LVarA) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_WITHER) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(N(StartRumbleWithParams), 150, 10) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.7)) + EndThread + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Wait(15) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) + EndIf + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim0E) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetGoalPos, ACTOR_SELF, 70, 0, 5) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim09) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Call(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + BitwiseAndConst(LVar0, ~AVAR_Flag_HitCombo) + Call(SetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + Return + End }; EvtScript N(EVS_Death) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_Move_AttackWithClones) - EVT_CASE_OR_EQ(AVAL_Move_AfterClonesAttack) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(AVAL_Move_First) - EVT_CASE_OR_EQ(AVAL_Move_AttackWithBits) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_King_CubeBitID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_CALL(SetDamageSource, DMG_SRC_DEFAULT) - EVT_CALL(SetActorFlagBits, LVar0, ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_CALL(DispatchEvent, LVar0, EVENT_DEATH) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_King_SphereBitID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_CALL(SetDamageSource, DMG_SRC_DEFAULT) - EVT_CALL(SetActorFlagBits, LVar0, ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_CALL(DispatchEvent, LVar0, EVENT_DEATH) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_King_PrismBitID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_CALL(SetDamageSource, DMG_SRC_DEFAULT) - EVT_CALL(SetActorFlagBits, LVar0, ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_CALL(DispatchEvent, LVar0, EVENT_DEATH) - EVT_END_IF - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(GetLastElement, LVar0) - EVT_IF_FLAG(LVar0, DAMAGE_TYPE_MULTIPLE_POPUPS) - EVT_LABEL(0) - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS1_EXECUTING_MOVE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HoveringScriptID, LVarA) - EVT_IS_THREAD_RUNNING(LVarA, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_KILL_THREAD(LVarA) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar9) - EVT_CALL(ActorExists, LVar9, LVarA) - EVT_IF_EQ(LVarA, TRUE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar9) - EVT_EXEC(N(EVS_RemoveClone)) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar9) - EVT_EXEC_GET_TID(N(EVS_RemoveClone), LVar0) - EVT_LABEL(1) - EVT_IS_THREAD_RUNNING(LVar0, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_Move_AttackWithClones) + CaseOrEq(AVAL_Move_AfterClonesAttack) + EndCaseGroup + CaseOrEq(AVAL_Move_First) + CaseOrEq(AVAL_Move_AttackWithBits) + Call(GetActorVar, ACTOR_SELF, AVAR_King_CubeBitID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, TRUE) + Call(SetDamageSource, DMG_SRC_DEFAULT) + Call(SetActorFlagBits, LVar0, ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Call(DispatchEvent, LVar0, EVENT_DEATH) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_King_SphereBitID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, TRUE) + Call(SetDamageSource, DMG_SRC_DEFAULT) + Call(SetActorFlagBits, LVar0, ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Call(DispatchEvent, LVar0, EVENT_DEATH) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_King_PrismBitID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, TRUE) + Call(SetDamageSource, DMG_SRC_DEFAULT) + Call(SetActorFlagBits, LVar0, ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Call(DispatchEvent, LVar0, EVENT_DEATH) + EndIf + Return + EndCaseGroup + CaseDefault + Return + EndSwitch + Call(GetLastElement, LVar0) + IfFlag(LVar0, DAMAGE_TYPE_MULTIPLE_POPUPS) + Label(0) + Call(GetBattleFlags, LVar0) + IfFlag(LVar0, BS_FLAGS1_EXECUTING_MOVE) + Wait(1) + Goto(0) + EndIf + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_HoveringScriptID, LVarA) + IsThreadRunning(LVarA, LVar0) + IfEq(LVar0, TRUE) + KillThread(LVarA) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar9) + Call(ActorExists, LVar9, LVarA) + IfEq(LVarA, TRUE) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar9) + Exec(N(EVS_RemoveClone)) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar9) + ExecGetTID(N(EVS_RemoveClone), LVar0) + Label(1) + IsThreadRunning(LVar0, LVar1) + IfEq(LVar1, TRUE) + Wait(1) + Goto(1) + EndIf + EndIf + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AVAL_Flag_SuspendHover) - EVT_CALL(SetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, 255) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_CALL(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AVAR_Flag_HitCombo) - EVT_CALL(SetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_THREAD - EVT_CALL(SetOwnerID, LVar0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim19) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim09) - EVT_END_THREAD - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_THREAD - EVT_CALL(SetOwnerID, LVar0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim19) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim09) - EVT_END_THREAD - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim19) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_HIT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_THREAD - EVT_CALL(SetOwnerID, LVar0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim19) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim09) - EVT_END_THREAD - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_THREAD - EVT_CALL(SetOwnerID, LVar0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim19) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim09) - EVT_END_THREAD - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim19) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_OnHit)) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_THREAD - EVT_CALL(SetOwnerID, LVar0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim20) - EVT_SET_CONST(LVar2, ANIM_CrystalKing_Anim21) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_END_THREAD - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_THREAD - EVT_CALL(SetOwnerID, LVar0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim20) - EVT_SET_CONST(LVar2, ANIM_CrystalKing_Anim21) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_END_THREAD - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim20) - EVT_SET_CONST(LVar2, ANIM_CrystalKing_Anim21) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim19) - EVT_EXEC_WAIT(N(EVS_OnHit)) - EVT_CASE_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_IF_FLAG(LVar0, AVAR_Flag_HitCombo) - EVT_EXEC_WAIT(N(EVS_OnHit)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_EXEC_WAIT(N(EVS_OnHit)) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(EVENT_DEATH) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_THREAD - EVT_CALL(SetOwnerID, LVar0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim19) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_THREAD - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_THREAD - EVT_CALL(SetOwnerID, LVar0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim19) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_THREAD - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim19) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim19) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_THREAD - EVT_CALL(SetOwnerID, LVar0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim20) - EVT_SET_CONST(LVar2, ANIM_CrystalKing_Anim21) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_END_THREAD - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_THREAD - EVT_CALL(SetOwnerID, LVar0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim20) - EVT_SET_CONST(LVar2, ANIM_CrystalKing_Anim21) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_END_THREAD - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim20) - EVT_SET_CONST(LVar2, ANIM_CrystalKing_Anim21) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim21) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_Move_AttackWithClones) - EVT_CASE_OR_EQ(AVAL_Move_AfterClonesAttack) - EVT_SETF(LVar0, EVT_FLOAT(0.4)) - EVT_LOOP(30) - EVT_SETF(LVar1, EVT_FLOAT(1.0)) - EVT_SUBF(LVar1, LVar0) - EVT_DIVF(LVar1, EVT_FLOAT(6.0)) - EVT_ADDF(LVar0, LVar1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVarA) - EVT_CALL(ActorExists, LVarA, LVarB) - EVT_IF_EQ(LVarB, TRUE) - EVT_CALL(SetPartScale, LVarA, PRT_MAIN, LVar0, LVar0, LVar0) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVarA) - EVT_CALL(ActorExists, LVarA, LVarB) - EVT_IF_EQ(LVarB, TRUE) - EVT_CALL(SetPartScale, LVarA, PRT_MAIN, LVar0, LVar0, LVar0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(AVAL_Move_First) - EVT_CASE_OR_EQ(AVAL_Move_AttackWithBits) - EVT_SETF(LVar0, EVT_FLOAT(0.4)) - EVT_LOOP(30) - EVT_SETF(LVar1, EVT_FLOAT(1.0)) - EVT_SUBF(LVar1, LVar0) - EVT_DIVF(LVar1, EVT_FLOAT(6.0)) - EVT_ADDF(LVar0, LVar1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_King_CubeBitID, LVarA) - EVT_CALL(ActorExists, LVarA, LVarB) - EVT_IF_EQ(LVarB, TRUE) - EVT_CALL(SetPartScale, LVarA, PRT_MAIN, LVar0, LVar0, LVar0) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_King_SphereBitID, LVarA) - EVT_CALL(ActorExists, LVarA, LVarB) - EVT_IF_EQ(LVarB, TRUE) - EVT_CALL(SetPartScale, LVarA, PRT_MAIN, LVar0, LVar0, LVar0) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_King_PrismBitID, LVarA) - EVT_CALL(ActorExists, LVarA, LVarB) - EVT_IF_EQ(LVarB, TRUE) - EVT_CALL(SetPartScale, LVarA, PRT_MAIN, LVar0, LVar0, LVar0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_END_THREAD - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CALL(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) - EVT_IF_LE(LVar0, 1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim0E) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, 70, 0, 5) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim09) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_CrystalKing_Anim19) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_RECEIVE_BUFF) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 20, 0) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_BITWISE_AND_CONST(LVar0, ~AVAL_Flag_SuspendHover) - EVT_CALL(SetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + BitwiseOrConst(LVar0, AVAL_Flag_SuspendHover) + Call(SetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, 255) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + Call(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + BitwiseOrConst(LVar0, AVAR_Flag_HitCombo) + Call(SetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, TRUE) + Thread + Call(SetOwnerID, LVar0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_CrystalKing_Anim19) + ExecWait(EVS_Enemy_Hit) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim09) + EndThread + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, TRUE) + Thread + Call(SetOwnerID, LVar0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_CrystalKing_Anim19) + ExecWait(EVS_Enemy_Hit) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim09) + EndThread + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_CrystalKing_Anim19) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_HIT) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, TRUE) + Thread + Call(SetOwnerID, LVar0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_CrystalKing_Anim19) + ExecWait(EVS_Enemy_Hit) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim09) + EndThread + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, TRUE) + Thread + Call(SetOwnerID, LVar0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_CrystalKing_Anim19) + ExecWait(EVS_Enemy_Hit) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim09) + EndThread + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_CrystalKing_Anim19) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_OnHit)) + CaseEq(EVENT_BURN_HIT) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, TRUE) + Thread + Call(SetOwnerID, LVar0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_CrystalKing_Anim20) + SetConst(LVar2, ANIM_CrystalKing_Anim21) + ExecWait(EVS_Enemy_BurnHit) + EndThread + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, TRUE) + Thread + Call(SetOwnerID, LVar0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_CrystalKing_Anim20) + SetConst(LVar2, ANIM_CrystalKing_Anim21) + ExecWait(EVS_Enemy_BurnHit) + EndThread + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_CrystalKing_Anim20) + SetConst(LVar2, ANIM_CrystalKing_Anim21) + ExecWait(EVS_Enemy_BurnHit) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim19) + ExecWait(N(EVS_OnHit)) + CaseEq(EVENT_ZERO_DAMAGE) + CaseEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_CrystalKing_Anim09) + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_CrystalKing_Anim09) + ExecWait(EVS_Enemy_NoDamageHit) + Call(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + IfFlag(LVar0, AVAR_Flag_HitCombo) + ExecWait(N(EVS_OnHit)) + Return + EndIf + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + ExecWait(N(EVS_OnHit)) + Return + EndIf + CaseEq(EVENT_DEATH) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, TRUE) + Thread + Call(SetOwnerID, LVar0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_CrystalKing_Anim19) + ExecWait(EVS_Enemy_Hit) + EndThread + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, TRUE) + Thread + Call(SetOwnerID, LVar0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_CrystalKing_Anim19) + ExecWait(EVS_Enemy_Hit) + EndThread + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_CrystalKing_Anim19) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_Death)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_CrystalKing_Anim19) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_BURN_DEATH) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, TRUE) + Thread + Call(SetOwnerID, LVar0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_CrystalKing_Anim20) + SetConst(LVar2, ANIM_CrystalKing_Anim21) + ExecWait(EVS_Enemy_BurnHit) + EndThread + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, TRUE) + Thread + Call(SetOwnerID, LVar0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_CrystalKing_Anim20) + SetConst(LVar2, ANIM_CrystalKing_Anim21) + ExecWait(EVS_Enemy_BurnHit) + EndThread + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_CrystalKing_Anim20) + SetConst(LVar2, ANIM_CrystalKing_Anim21) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_Death)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_CrystalKing_Anim21) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + Thread + Call(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_Move_AttackWithClones) + CaseOrEq(AVAL_Move_AfterClonesAttack) + SetF(LVar0, Float(0.4)) + Loop(30) + SetF(LVar1, Float(1.0)) + SubF(LVar1, LVar0) + DivF(LVar1, Float(6.0)) + AddF(LVar0, LVar1) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVarA) + Call(ActorExists, LVarA, LVarB) + IfEq(LVarB, TRUE) + Call(SetPartScale, LVarA, PRT_MAIN, LVar0, LVar0, LVar0) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVarA) + Call(ActorExists, LVarA, LVarB) + IfEq(LVarB, TRUE) + Call(SetPartScale, LVarA, PRT_MAIN, LVar0, LVar0, LVar0) + EndIf + Wait(1) + EndLoop + EndCaseGroup + CaseOrEq(AVAL_Move_First) + CaseOrEq(AVAL_Move_AttackWithBits) + SetF(LVar0, Float(0.4)) + Loop(30) + SetF(LVar1, Float(1.0)) + SubF(LVar1, LVar0) + DivF(LVar1, Float(6.0)) + AddF(LVar0, LVar1) + Call(GetActorVar, ACTOR_SELF, AVAR_King_CubeBitID, LVarA) + Call(ActorExists, LVarA, LVarB) + IfEq(LVarB, TRUE) + Call(SetPartScale, LVarA, PRT_MAIN, LVar0, LVar0, LVar0) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_King_SphereBitID, LVarA) + Call(ActorExists, LVarA, LVarB) + IfEq(LVarB, TRUE) + Call(SetPartScale, LVarA, PRT_MAIN, LVar0, LVar0, LVar0) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_King_PrismBitID, LVarA) + Call(ActorExists, LVarA, LVarB) + IfEq(LVarB, TRUE) + Call(SetPartScale, LVarA, PRT_MAIN, LVar0, LVar0, LVar0) + EndIf + Wait(1) + EndLoop + EndCaseGroup + EndSwitch + EndThread + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_CrystalKing_Anim09) + ExecWait(EVS_Enemy_Recover) + Call(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) + IfLe(LVar0, 1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim0E) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetGoalPos, ACTOR_SELF, 70, 0, 5) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim09) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_CrystalKing_Anim19) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_RECEIVE_BUFF) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 20) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 20, 0) + CaseDefault + EndSwitch + Call(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + BitwiseAndConst(LVar0, ~AVAL_Flag_SuspendHover) + Call(SetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_IF_LE(LVar0, 20) - EVT_CALL(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AVAL_Flag_HadLowHP) - EVT_CALL(SetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_END_IF - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar1) - EVT_MUL(LVar0, 100) - EVT_DIV(LVar0, LVar1) - EVT_SWITCH(LVar0) - EVT_CASE_LT(25) + Call(GetActorHP, ACTOR_SELF, LVar0) + IfLe(LVar0, 20) + Call(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + BitwiseOrConst(LVar0, AVAL_Flag_HadLowHP) + Call(SetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + EndIf + Set(LFlag0, FALSE) + Call(GetActorHP, ACTOR_SELF, LVar0) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar1) + Mul(LVar0, 100) + Div(LVar0, LVar1) + Switch(LVar0) + CaseLt(25) // 100% chance to heal when HP < 25% - EVT_CALL(RandInt, 99, LVar0) - EVT_ADD(LVar0, 1) - EVT_IF_LE(LVar0, 100) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HealCount, LVar0) - EVT_IF_LT(LVar0, 2) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_CASE_LT(40) + Call(RandInt, 99, LVar0) + Add(LVar0, 1) + IfLe(LVar0, 100) + Call(GetActorVar, ACTOR_SELF, AVAR_HealCount, LVar0) + IfLt(LVar0, 2) + Set(LFlag0, TRUE) + EndIf + EndIf + CaseLt(40) // 30% chance to heal when HP < 40% - EVT_CALL(RandInt, 99, LVar0) - EVT_ADD(LVar0, 1) - EVT_IF_LE(LVar0, 30) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HealCount, LVar0) - EVT_IF_LT(LVar0, 2) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_CASE_LT(55) + Call(RandInt, 99, LVar0) + Add(LVar0, 1) + IfLe(LVar0, 30) + Call(GetActorVar, ACTOR_SELF, AVAR_HealCount, LVar0) + IfLt(LVar0, 2) + Set(LFlag0, TRUE) + EndIf + EndIf + CaseLt(55) // 10% chance to heal when HP < 55% - EVT_CALL(RandInt, 99, LVar0) - EVT_ADD(LVar0, 1) - EVT_IF_LE(LVar0, 10) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HealCount, LVar0) - EVT_IF_LT(LVar0, 2) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HealCount, LVar0) - EVT_ADD(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HealCount, LVar0) - EVT_EXEC_WAIT(N(EVS_Move_Recover)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Move_First) - EVT_CALL(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) - EVT_IF_LE(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_Move_SummonBits)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_AttackWithBits) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_SpitBits)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_SummonBits) - EVT_END_IF - EVT_CASE_EQ(AVAL_Move_SummonBits) - EVT_EXEC_WAIT(N(EVS_Move_SummonBits)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_AttackWithBits) - EVT_CASE_EQ(AVAL_Move_AttackWithBits) - EVT_CALL(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) - EVT_IF_LE(LVar0, 1) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_FROZEN) - EVT_EXEC_WAIT(N(EVS_Attack_IcyBreath)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_IceBolt)) - EVT_END_IF - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_SpitBits)) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_AfterBitsAttack) - EVT_CASE_EQ(AVAL_Move_AfterBitsAttack) - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_IF_GT(LVar0, 35) - EVT_CALL(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_IF_NOT_FLAG(LVar0, AVAR_Flag_HasSummonedClones) - EVT_EXEC_WAIT(N(EVS_Move_SummonBits)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_AttackWithBits) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_IF_NOT_FLAG(LVar0, AVAL_Flag_UsedIceBolt) - EVT_EXEC_WAIT(N(EVS_Attack_IceBolt)) - EVT_CALL(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AVAL_Flag_UsedIceBolt) - EVT_CALL(SetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Move_MakeClones)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_AttackWithClones) - EVT_CALL(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AVAR_Flag_HasSummonedClones) - EVT_CALL(SetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_END_IF - EVT_CASE_EQ(AVAL_Move_AttackWithClones) - EVT_CALL(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) - EVT_IF_LE(LVar0, 1) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_FROZEN) - EVT_EXEC_WAIT(N(EVS_Attack_IcyBreath)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_IceBolt)) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_AfterBitsAttack) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_CloneBreath)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_AfterClonesAttack) - EVT_END_IF - EVT_CASE_EQ(AVAL_Move_AfterClonesAttack) - EVT_CALL(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) - EVT_IF_GT(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_Attack_CloneBreath)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_Move_MakeClones)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_AttackWithClones) - EVT_CALL(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AVAR_Flag_HasSummonedClones) - EVT_CALL(SetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(RandInt, 99, LVar0) + Add(LVar0, 1) + IfLe(LVar0, 10) + Call(GetActorVar, ACTOR_SELF, AVAR_HealCount, LVar0) + IfLt(LVar0, 2) + Set(LFlag0, TRUE) + EndIf + EndIf + EndSwitch + IfEq(LFlag0, TRUE) + Call(GetActorVar, ACTOR_SELF, AVAR_HealCount, LVar0) + Add(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_HealCount, LVar0) + ExecWait(N(EVS_Move_Recover)) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) + Switch(LVar0) + CaseEq(AVAL_Move_First) + Call(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) + IfLe(LVar0, 1) + ExecWait(N(EVS_Move_SummonBits)) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_AttackWithBits) + Else + ExecWait(N(EVS_Attack_SpitBits)) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_SummonBits) + EndIf + CaseEq(AVAL_Move_SummonBits) + ExecWait(N(EVS_Move_SummonBits)) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_AttackWithBits) + CaseEq(AVAL_Move_AttackWithBits) + Call(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) + IfLe(LVar0, 1) + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfFlag(LVar0, STATUS_FLAG_FROZEN) + ExecWait(N(EVS_Attack_IcyBreath)) + Else + ExecWait(N(EVS_Attack_IceBolt)) + EndIf + Else + ExecWait(N(EVS_Attack_SpitBits)) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_AfterBitsAttack) + CaseEq(AVAL_Move_AfterBitsAttack) + Call(GetActorHP, ACTOR_SELF, LVar0) + IfGt(LVar0, 35) + Call(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + IfNotFlag(LVar0, AVAR_Flag_HasSummonedClones) + ExecWait(N(EVS_Move_SummonBits)) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_AttackWithBits) + Return + EndIf + EndIf + Call(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + IfNotFlag(LVar0, AVAL_Flag_UsedIceBolt) + ExecWait(N(EVS_Attack_IceBolt)) + Call(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + BitwiseOrConst(LVar0, AVAL_Flag_UsedIceBolt) + Call(SetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + Else + ExecWait(N(EVS_Move_MakeClones)) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_AttackWithClones) + Call(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + BitwiseOrConst(LVar0, AVAR_Flag_HasSummonedClones) + Call(SetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + EndIf + CaseEq(AVAL_Move_AttackWithClones) + Call(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) + IfLe(LVar0, 1) + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfFlag(LVar0, STATUS_FLAG_FROZEN) + ExecWait(N(EVS_Attack_IcyBreath)) + Else + ExecWait(N(EVS_Attack_IceBolt)) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_AfterBitsAttack) + Else + ExecWait(N(EVS_Attack_CloneBreath)) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_AfterClonesAttack) + EndIf + CaseEq(AVAL_Move_AfterClonesAttack) + Call(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) + IfGt(LVar0, 1) + ExecWait(N(EVS_Attack_CloneBreath)) + Return + EndIf + ExecWait(N(EVS_Move_MakeClones)) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_AttackWithClones) + Call(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + BitwiseOrConst(LVar0, AVAR_Flag_HasSummonedClones) + Call(SetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + EndSwitch + Return + End }; EvtScript N(EVS_Attack_IcyBreath) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim13) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar2, -5) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 20, 0) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 8) - EVT_ADD(LVar2, -2) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 8, 0) - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim1C) - EVT_WAIT(3) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_WIND_LOOP) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -15) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, EVT_FLOAT(180.0), EVT_FLOAT(2.0), EVT_FLOAT(0.5), 30, 0) - EVT_CALL(N(SetBreathColors), LVarF) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -6) - EVT_ADD(LVar1, 8) - EVT_PLAY_EFFECT(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, EVT_FLOAT(180.0), EVT_FLOAT(2.0), EVT_FLOAT(0.2), 30, 0) - EVT_CALL(N(SetBreathColors), LVarF) - EVT_END_IF - EVT_CALL(N(StartRumbleWithParams), 70, 60) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 30, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_WAIT(30) - EVT_CALL(StopSound, SOUND_HEAVY_WIND_LOOP) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -15) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, EVT_FLOAT(180.0), EVT_FLOAT(2.0), EVT_FLOAT(1.0), 60, 0) - EVT_CALL(N(SetBreathColors), LVarF) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -6) - EVT_ADD(LVar1, 8) - EVT_PLAY_EFFECT(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, EVT_FLOAT(180.0), EVT_FLOAT(2.0), EVT_FLOAT(1.0), 60, 0) - EVT_CALL(N(SetBreathColors), LVarF) - EVT_END_IF - EVT_CALL(N(StartRumbleWithParams), 70, 100) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 50, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_WAIT(60) - EVT_CALL(StopSound, SOUND_HEAVY_WIND_LOOP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim15) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_ICE | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_ICE_BREATH, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim13) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Add(LVar2, -5) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 20, 0) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 8) + Add(LVar2, -2) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 8, 0) + EndIf + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim1C) + Wait(3) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_WIND_LOOP) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, -15) + Add(LVar1, 20) + PlayEffect(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, Float(180.0), Float(2.0), Float(0.5), 30, 0) + Call(N(SetBreathColors), LVarF) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, -6) + Add(LVar1, 8) + PlayEffect(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, Float(180.0), Float(2.0), Float(0.2), 30, 0) + Call(N(SetBreathColors), LVarF) + EndIf + Call(N(StartRumbleWithParams), 70, 60) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 30, Float(0.3)) + EndThread + Wait(30) + Call(StopSound, SOUND_HEAVY_WIND_LOOP) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndSwitch + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, -15) + Add(LVar1, 20) + PlayEffect(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, Float(180.0), Float(2.0), Float(1.0), 60, 0) + Call(N(SetBreathColors), LVarF) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, -6) + Add(LVar1, 8) + PlayEffect(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, Float(180.0), Float(2.0), Float(1.0), 60, 0) + Call(N(SetBreathColors), LVarF) + EndIf + Call(N(StartRumbleWithParams), 70, 100) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 50, Float(0.3)) + EndThread + Wait(60) + Call(StopSound, SOUND_HEAVY_WIND_LOOP) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim15) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_ICE | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_ICE_BREATH, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_IceBolt) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim13) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar2, -5) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 20, 0) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 8) - EVT_ADD(LVar2, -2) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 8, 0) - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim1C) - EVT_WAIT(3) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CRYSTAL_KING_ICE_BOLT) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, -15) - EVT_ADD(LVar1, 20) - EVT_ELSE - EVT_ADD(LVar0, -6) - EVT_ADD(LVar1, 8) - EVT_END_IF - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -50, 20, 0) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_THREAD - EVT_SUB(LVar3, LVar0) - EVT_SUB(LVar4, LVar1) - EVT_SUB(LVar5, LVar2) - EVT_DIV(LVar3, 10) - EVT_DIV(LVar4, 10) - EVT_DIV(LVar5, 10) - EVT_LOOP(10) - EVT_ADD(LVar0, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_ADD(LVar2, LVar5) - EVT_PLAY_EFFECT(EFFECT_MISC_PARTICLES, 1, LVar0, LVar1, LVar2, 20, -20, EVT_FLOAT(1.0), 5, 30, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(3) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 20, 0) - EVT_CALL(N(SetBoltColors), LVarF) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim15) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, -15) - EVT_ADD(LVar1, 20) - EVT_ELSE - EVT_ADD(LVar0, -6) - EVT_ADD(LVar1, 8) - EVT_END_IF - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_THREAD - EVT_SUB(LVar3, LVar0) - EVT_SUB(LVar4, LVar1) - EVT_SUB(LVar5, LVar2) - EVT_DIV(LVar3, 10) - EVT_DIV(LVar4, 10) - EVT_DIV(LVar5, 10) - EVT_LOOP(10) - EVT_ADD(LVar0, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_ADD(LVar2, LVar5) - EVT_PLAY_EFFECT(EFFECT_MISC_PARTICLES, 1, LVar0, LVar1, LVar2, 20, -20, EVT_FLOAT(1.0), 5, 30, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(3) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 20, 0) - EVT_CALL(N(SetBoltColors), LVarF) - EVT_WAIT(7) - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim15) - EVT_END_THREAD - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_ICE | DAMAGE_TYPE_NO_CONTACT, 0, DMG_STATUS_IGNORE_RES(STATUS_FLAG_FROZEN, 2), DMG_ICE_BOLT, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_COLD_BREATH, 0, LVar0, LVar1, LVar2, EVT_FLOAT(2.0), 30, 0) - EVT_CALL(N(SetMistColors), LVarF) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim13) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Add(LVar2, -5) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 20, 0) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 8) + Add(LVar2, -2) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 8, 0) + EndIf + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim1C) + Wait(3) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CRYSTAL_KING_ICE_BOLT) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar0, -15) + Add(LVar1, 20) + Else + Add(LVar0, -6) + Add(LVar1, 8) + EndIf + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -50, 20, 0) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Thread + Sub(LVar3, LVar0) + Sub(LVar4, LVar1) + Sub(LVar5, LVar2) + Div(LVar3, 10) + Div(LVar4, 10) + Div(LVar5, 10) + Loop(10) + Add(LVar0, LVar3) + Add(LVar1, LVar4) + Add(LVar2, LVar5) + PlayEffect(EFFECT_MISC_PARTICLES, 1, LVar0, LVar1, LVar2, 20, -20, Float(1.0), 5, 30, 0) + Wait(1) + EndLoop + EndThread + Wait(3) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.0), 20, 0) + Call(N(SetBoltColors), LVarF) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim15) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndSwitch + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar0, -15) + Add(LVar1, 20) + Else + Add(LVar0, -6) + Add(LVar1, 8) + EndIf + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Thread + Sub(LVar3, LVar0) + Sub(LVar4, LVar1) + Sub(LVar5, LVar2) + Div(LVar3, 10) + Div(LVar4, 10) + Div(LVar5, 10) + Loop(10) + Add(LVar0, LVar3) + Add(LVar1, LVar4) + Add(LVar2, LVar5) + PlayEffect(EFFECT_MISC_PARTICLES, 1, LVar0, LVar1, LVar2, 20, -20, Float(1.0), 5, 30, 0) + Wait(1) + EndLoop + EndThread + Wait(3) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.0), 20, 0) + Call(N(SetBoltColors), LVarF) + Wait(7) + Thread + Wait(3) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim15) + EndThread + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_ICE | DAMAGE_TYPE_NO_CONTACT, 0, DMG_STATUS_IGNORE_RES(STATUS_FLAG_FROZEN, 2), DMG_ICE_BOLT, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_COLD_BREATH, 0, LVar0, LVar1, LVar2, Float(2.0), 30, 0) + Call(N(SetMistColors), LVarF) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; s32 N(CloneStatusTable)[] = { @@ -1182,16 +1182,16 @@ s32 N(CloneStatusTable)[] = { }; EvtScript N(EVS_Clone_Dummy) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_Init_Clone) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_Clone_Dummy))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Clone_Dummy))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_Clone_Dummy))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_Clone_Dummy))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Clone_Dummy))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_Clone_Dummy))) + Return + End }; ActorBlueprint N(clone) = { @@ -1224,195 +1224,195 @@ Formation N(CloneFormation) = { }; EvtScript N(EVS_Move_MakeClones) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(GetActorHP, ACTOR_SELF, LVarA) - EVT_CALL(SummonEnemy, EVT_PTR(N(CloneFormation)), FALSE) - EVT_CALL(SetActorFlagBits, LVar0, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar0) - EVT_CALL(SetPartEventBits, LVar0, PRT_MAIN, ACTOR_EVENT_FLAG_ILLUSORY, TRUE) - EVT_CALL(SetEnemyHP, LVar0, LVarA) - EVT_CALL(CopyStatusEffects, ACTOR_SELF, LVar0) - EVT_CALL(CopyBuffs, ACTOR_SELF, LVar0) - EVT_CALL(SummonEnemy, EVT_PTR(N(CloneFormation)), FALSE) - EVT_CALL(SetActorFlagBits, LVar0, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar0) - EVT_CALL(SetPartEventBits, LVar0, PRT_MAIN, ACTOR_EVENT_FLAG_ILLUSORY, TRUE) - EVT_CALL(SetEnemyHP, LVar0, LVarA) - EVT_CALL(CopyStatusEffects, ACTOR_SELF, LVar0) - EVT_CALL(CopyBuffs, ACTOR_SELF, LVar0) - EVT_CALL(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_IF_FLAG(LVar0, AVAL_Flag_HadLowHP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim1D) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPOOKY_LEVITATE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar7, LVar8, LVar9) - EVT_CALL(MakeLerp, 0, 41, 30, EASING_SIN_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_ADD(LVar0, LVar8) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar7, LVar0, LVar9) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim09) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, TRUE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar0) - EVT_CALL(SetActorFlagBits, LVar0, ACTOR_FLAG_FLYING, TRUE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar0) - EVT_CALL(SetActorFlagBits, LVar0, ACTOR_FLAG_FLYING, TRUE) - EVT_EXEC_GET_TID(N(EVS_UpdateHovering), LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HoveringScriptID, LVar0) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_01) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVarA) - EVT_CALL(SetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVarA) - EVT_CALL(SetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim00) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim09) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar0) - EVT_CALL(UseIdleAnimation, LVar0, FALSE) - EVT_CALL(SetAnimation, LVar0, PRT_MAIN, ANIM_CrystalKing_Anim00) - EVT_CALL(SetAnimation, LVar0, PRT_MAIN, ANIM_CrystalKing_Anim09) - EVT_CALL(UseIdleAnimation, LVar0, TRUE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar0) - EVT_CALL(UseIdleAnimation, LVar0, FALSE) - EVT_CALL(SetAnimation, LVar0, PRT_MAIN, ANIM_CrystalKing_Anim00) - EVT_CALL(SetAnimation, LVar0, PRT_MAIN, ANIM_CrystalKing_Anim09) - EVT_CALL(UseIdleAnimation, LVar0, TRUE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SUMMON_CRYSTAL_CLONES) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar0) - EVT_CALL(EnableActorBlur, LVar0, ACTOR_BLUR_ENABLE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar0) - EVT_CALL(EnableActorBlur, LVar0, ACTOR_BLUR_ENABLE) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 6840, 210, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar2) - EVT_CALL(SetActorYaw, LVar2, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar2) - EVT_CALL(SetActorYaw, LVar2, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(MakeLerp, 255, 128, 30, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar2) - EVT_CALL(SetPartAlpha, LVar2, PRT_MAIN, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar2) - EVT_CALL(SetPartAlpha, LVar2, PRT_MAIN, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AVAR_Flag_HasClones) - EVT_CALL(SetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_WAIT(60) - EVT_CALL(RandInt, 1000, LVar0) - EVT_MOD(LVar0, 3) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SET(LVarA, ACTOR_SELF) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVarB) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVarC) - EVT_CASE_EQ(1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVarA) - EVT_SET(LVarB, ACTOR_SELF) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVarC) - EVT_CASE_EQ(2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVarA) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVarB) - EVT_SET(LVarC, ACTOR_SELF) - EVT_END_SWITCH - EVT_CALL(SetActorFlagBits, LVarA, ACTOR_FLAG_NO_SHADOW, FALSE) - EVT_CALL(SetActorFlagBits, LVarB, ACTOR_FLAG_NO_SHADOW, FALSE) - EVT_CALL(SetActorFlagBits, LVarC, ACTOR_FLAG_NO_SHADOW, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 150) - EVT_THREAD - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_SET(LVar3, 18) - EVT_SET(LVar5, 5) - EVT_SUB(LVar3, LVar0) - EVT_SUB(LVar5, LVar2) - EVT_DIVF(LVar3, EVT_FLOAT(60.0)) - EVT_DIVF(LVar5, EVT_FLOAT(60.0)) - EVT_LOOP(60) - EVT_ADDF(LVar0, LVar3) - EVT_ADDF(LVar2, LVar5) - EVT_CALL(SetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetActorPos, LVarB, LVar0, LVar1, LVar2) - EVT_SET(LVar3, 70) - EVT_SET(LVar5, 5) - EVT_SUB(LVar3, LVar0) - EVT_SUB(LVar5, LVar2) - EVT_DIVF(LVar3, EVT_FLOAT(60.0)) - EVT_DIVF(LVar5, EVT_FLOAT(60.0)) - EVT_LOOP(60) - EVT_ADDF(LVar0, LVar3) - EVT_ADDF(LVar2, LVar5) - EVT_CALL(SetActorPos, LVarB, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetActorPos, LVarC, LVar0, LVar1, LVar2) - EVT_SET(LVar3, 122) - EVT_SET(LVar5, 5) - EVT_SUB(LVar3, LVar0) - EVT_SUB(LVar5, LVar2) - EVT_DIVF(LVar3, EVT_FLOAT(60.0)) - EVT_DIVF(LVar5, EVT_FLOAT(60.0)) - EVT_LOOP(60) - EVT_ADDF(LVar0, LVar3) - EVT_ADDF(LVar2, LVar5) - EVT_CALL(SetActorPos, LVarC, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(90) - EVT_WAIT(30) - EVT_WAIT(30) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVarA) - EVT_CALL(EnableActorBlur, LVarA, ACTOR_BLUR_DISABLE) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, LVarA) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVarA) - EVT_CALL(EnableActorBlur, LVarA, ACTOR_BLUR_DISABLE) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, LVarA) - EVT_CALL(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_BITWISE_AND_CONST(LVar0, ~AVAR_Flag_HitCombo) - EVT_CALL(SetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_WAIT(20) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(GetActorHP, ACTOR_SELF, LVarA) + Call(SummonEnemy, Ref(N(CloneFormation)), FALSE) + Call(SetActorFlagBits, LVar0, ACTOR_FLAG_NO_SHADOW, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar0) + Call(SetPartEventBits, LVar0, PRT_MAIN, ACTOR_EVENT_FLAG_ILLUSORY, TRUE) + Call(SetEnemyHP, LVar0, LVarA) + Call(CopyStatusEffects, ACTOR_SELF, LVar0) + Call(CopyBuffs, ACTOR_SELF, LVar0) + Call(SummonEnemy, Ref(N(CloneFormation)), FALSE) + Call(SetActorFlagBits, LVar0, ACTOR_FLAG_NO_SHADOW, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar0) + Call(SetPartEventBits, LVar0, PRT_MAIN, ACTOR_EVENT_FLAG_ILLUSORY, TRUE) + Call(SetEnemyHP, LVar0, LVarA) + Call(CopyStatusEffects, ACTOR_SELF, LVar0) + Call(CopyBuffs, ACTOR_SELF, LVar0) + Call(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + IfFlag(LVar0, AVAL_Flag_HadLowHP) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim1D) + Wait(20) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPOOKY_LEVITATE) + Call(GetActorPos, ACTOR_SELF, LVar7, LVar8, LVar9) + Call(MakeLerp, 0, 41, 30, EASING_SIN_OUT) + Label(10) + Call(UpdateLerp) + Add(LVar0, LVar8) + Call(SetActorPos, ACTOR_SELF, LVar7, LVar0, LVar9) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim09) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, TRUE) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar0) + Call(SetActorFlagBits, LVar0, ACTOR_FLAG_FLYING, TRUE) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar0) + Call(SetActorFlagBits, LVar0, ACTOR_FLAG_FLYING, TRUE) + ExecGetTID(N(EVS_UpdateHovering), LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_HoveringScriptID, LVar0) + EndIf + Call(UseBattleCamPreset, BTL_CAM_PRESET_01) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVarA) + Call(SetActorPos, LVarA, LVar0, LVar1, LVar2) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVarA) + Call(SetActorPos, LVarA, LVar0, LVar1, LVar2) + Wait(1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim00) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim09) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar0) + Call(UseIdleAnimation, LVar0, FALSE) + Call(SetAnimation, LVar0, PRT_MAIN, ANIM_CrystalKing_Anim00) + Call(SetAnimation, LVar0, PRT_MAIN, ANIM_CrystalKing_Anim09) + Call(UseIdleAnimation, LVar0, TRUE) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar0) + Call(UseIdleAnimation, LVar0, FALSE) + Call(SetAnimation, LVar0, PRT_MAIN, ANIM_CrystalKing_Anim00) + Call(SetAnimation, LVar0, PRT_MAIN, ANIM_CrystalKing_Anim09) + Call(UseIdleAnimation, LVar0, TRUE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SUMMON_CRYSTAL_CLONES) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar0) + Call(EnableActorBlur, LVar0, ACTOR_BLUR_ENABLE) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar0) + Call(EnableActorBlur, LVar0, ACTOR_BLUR_ENABLE) + Thread + Call(MakeLerp, 0, 6840, 210, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar2) + Call(SetActorYaw, LVar2, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar2) + Call(SetActorYaw, LVar2, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + EndThread + Call(MakeLerp, 255, 128, 30, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVar2) + Call(SetPartAlpha, LVar2, PRT_MAIN, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVar2) + Call(SetPartAlpha, LVar2, PRT_MAIN, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + BitwiseOrConst(LVar0, AVAR_Flag_HasClones) + Call(SetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + Wait(60) + Call(RandInt, 1000, LVar0) + Mod(LVar0, 3) + Switch(LVar0) + CaseEq(0) + Set(LVarA, ACTOR_SELF) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVarB) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVarC) + CaseEq(1) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVarA) + Set(LVarB, ACTOR_SELF) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVarC) + CaseEq(2) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVarA) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVarB) + Set(LVarC, ACTOR_SELF) + EndSwitch + Call(SetActorFlagBits, LVarA, ACTOR_FLAG_NO_SHADOW, FALSE) + Call(SetActorFlagBits, LVarB, ACTOR_FLAG_NO_SHADOW, FALSE) + Call(SetActorFlagBits, LVarC, ACTOR_FLAG_NO_SHADOW, FALSE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 150) + Thread + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Set(LVar3, 18) + Set(LVar5, 5) + Sub(LVar3, LVar0) + Sub(LVar5, LVar2) + DivF(LVar3, Float(60.0)) + DivF(LVar5, Float(60.0)) + Loop(60) + AddF(LVar0, LVar3) + AddF(LVar2, LVar5) + Call(SetActorPos, LVarA, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + Thread + Call(GetActorPos, LVarB, LVar0, LVar1, LVar2) + Set(LVar3, 70) + Set(LVar5, 5) + Sub(LVar3, LVar0) + Sub(LVar5, LVar2) + DivF(LVar3, Float(60.0)) + DivF(LVar5, Float(60.0)) + Loop(60) + AddF(LVar0, LVar3) + AddF(LVar2, LVar5) + Call(SetActorPos, LVarB, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + Thread + Call(GetActorPos, LVarC, LVar0, LVar1, LVar2) + Set(LVar3, 122) + Set(LVar5, 5) + Sub(LVar3, LVar0) + Sub(LVar5, LVar2) + DivF(LVar3, Float(60.0)) + DivF(LVar5, Float(60.0)) + Loop(60) + AddF(LVar0, LVar3) + AddF(LVar2, LVar5) + Call(SetActorPos, LVarC, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + Wait(90) + Wait(30) + Wait(30) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVarA) + Call(EnableActorBlur, LVarA, ACTOR_BLUR_DISABLE) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Call(ForceHomePos, LVarA, LVar0, LVar1, LVar2) + Call(HPBarToHome, LVarA) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVarA) + Call(EnableActorBlur, LVarA, ACTOR_BLUR_DISABLE) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Call(ForceHomePos, LVarA, LVar0, LVar1, LVar2) + Call(HPBarToHome, LVarA) + Call(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + BitwiseAndConst(LVar0, ~AVAR_Flag_HitCombo) + Call(SetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + Wait(20) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; Formation N(CubeBitFormation) = { @@ -1434,644 +1434,644 @@ s32 N(SphereBitSummonData)[16] = {}; s32 N(PrismBitSummonData)[16] = {}; EvtScript N(EVS_SummonBit) = { - EVT_USE_ARRAY(LVar4) - EVT_SET(ArrayVar(0), LVar0) - EVT_SETF(ArrayVar(1), LVar1) - EVT_SETF(ArrayVar(2), LVar2) - EVT_SETF(ArrayVar(3), LVar3) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_SUBF(LVar2, LVarB) - EVT_DIVF(LVar2, EVT_FLOAT(120.0)) - EVT_SETF(ArrayVar(4), LVar2) - EVT_SETF(LVar6, LVarB) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(GetDist2D, LVarD, LVarA, LVarC, LVar1, LVar3) - EVT_DIVF(LVarD, EVT_FLOAT(120.0)) - EVT_SETF(ArrayVar(5), LVarD) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(N(CalculateAngle), ArrayVar(6), LVarA, LVarC, LVar1, LVar3) - EVT_CALL(SetPartAlpha, LVar0, PRT_MAIN, 0) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(EnableActorBlur, LVar0, ACTOR_BLUR_ENABLE) - EVT_SET(LVar9, LVar0) - EVT_CALL(MakeLerp, 0, 255, 90, EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetPartAlpha, LVar9, PRT_MAIN, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_END_THREAD - EVT_SETF(LVar5, EVT_FLOAT(0.0)) - EVT_CALL(MakeLerp, 0, 2880, 120, EASING_SIN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar2, LVar3, LVar4) - EVT_ADDF(LVar5, ArrayVar(5)) - EVT_ADDF(LVar0, ArrayVar(6)) - EVT_CALL(AddVectorPolar, LVar2, LVar4, LVar5, LVar0) - EVT_ADDF(LVar6, ArrayVar(4)) - EVT_CALL(SetActorPos, ArrayVar(0), LVar2, LVar6, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(EnableActorBlur, ArrayVar(0), IDLE_SCRIPT_DISABLE) - EVT_RETURN - EVT_END + UseArray(LVar4) + Set(ArrayVar(0), LVar0) + SetF(ArrayVar(1), LVar1) + SetF(ArrayVar(2), LVar2) + SetF(ArrayVar(3), LVar3) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + SubF(LVar2, LVarB) + DivF(LVar2, Float(120.0)) + SetF(ArrayVar(4), LVar2) + SetF(LVar6, LVarB) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(GetDist2D, LVarD, LVarA, LVarC, LVar1, LVar3) + DivF(LVarD, Float(120.0)) + SetF(ArrayVar(5), LVarD) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(N(CalculateAngle), ArrayVar(6), LVarA, LVarC, LVar1, LVar3) + Call(SetPartAlpha, LVar0, PRT_MAIN, 0) + Thread + Wait(30) + Call(EnableActorBlur, LVar0, ACTOR_BLUR_ENABLE) + Set(LVar9, LVar0) + Call(MakeLerp, 0, 255, 90, EASING_LINEAR) + Label(0) + Call(UpdateLerp) + Call(SetPartAlpha, LVar9, PRT_MAIN, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + EndThread + SetF(LVar5, Float(0.0)) + Call(MakeLerp, 0, 2880, 120, EASING_SIN_OUT) + Label(1) + Call(UpdateLerp) + Call(GetActorPos, ACTOR_SELF, LVar2, LVar3, LVar4) + AddF(LVar5, ArrayVar(5)) + AddF(LVar0, ArrayVar(6)) + Call(AddVectorPolar, LVar2, LVar4, LVar5, LVar0) + AddF(LVar6, ArrayVar(4)) + Call(SetActorPos, ArrayVar(0), LVar2, LVar6, LVar4) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(EnableActorBlur, ArrayVar(0), IDLE_SCRIPT_DISABLE) + Return + End }; EvtScript N(EVS_Move_SummonBits) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim1E) - EVT_WAIT(20) - EVT_CALL(SummonEnemy, EVT_PTR(N(CubeBitFormation)), FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_King_CubeBitID, LVar0) - EVT_CALL(SummonEnemy, EVT_PTR(N(SphereBitFormation)), FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_King_SphereBitID, LVar0) - EVT_CALL(SummonEnemy, EVT_PTR(N(PrismBitFormation)), FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_King_PrismBitID, LVar0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_King_CubeBitID, LVar0) - EVT_CALL(SetPartScale, LVar0, PRT_MAIN, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_King_SphereBitID, LVar0) - EVT_CALL(SetPartScale, LVar0, PRT_MAIN, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_King_PrismBitID, LVar0) - EVT_CALL(SetPartScale, LVar0, PRT_MAIN, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim1F) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SUMMON_CRYSTAL_BITS) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_King_PrismBitID, LVar0) - EVT_SETF(LVar1, EVT_FLOAT(42.0)) - EVT_SETF(LVar2, EVT_FLOAT(85.0)) - EVT_SETF(LVar3, EVT_FLOAT(-10.0)) - EVT_SET(LVar4, N(PrismBitSummonData)) - EVT_EXEC(N(EVS_SummonBit)) - EVT_WAIT(10) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_King_SphereBitID, LVar0) - EVT_SETF(LVar1, EVT_FLOAT(112.0)) - EVT_SETF(LVar2, EVT_FLOAT(52.0)) - EVT_SETF(LVar3, EVT_FLOAT(-5.0)) - EVT_SET(LVar4, N(SphereBitSummonData)) - EVT_EXEC(N(EVS_SummonBit)) - EVT_WAIT(24) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_King_CubeBitID, LVar0) - EVT_SETF(LVar1, EVT_FLOAT(10.0)) - EVT_SETF(LVar2, EVT_FLOAT(35.0)) - EVT_SETF(LVar3, EVT_FLOAT(-5.0)) - EVT_SET(LVar4, N(CubeBitSummonData)) - EVT_EXEC(N(EVS_SummonBit)) - EVT_WAIT(130) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_King_CubeBitID, LVar0) - EVT_CALL(ForceHomePos, LVar0, 10, 35, -5) - EVT_CALL(HPBarToHome, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_King_SphereBitID, LVar0) - EVT_CALL(ForceHomePos, LVar0, 112, 52, -5) - EVT_CALL(HPBarToHome, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_King_PrismBitID, LVar0) - EVT_CALL(ForceHomePos, LVar0, 42, 85, -10) - EVT_CALL(HPBarToHome, LVar0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim1E) + Wait(20) + Call(SummonEnemy, Ref(N(CubeBitFormation)), FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_King_CubeBitID, LVar0) + Call(SummonEnemy, Ref(N(SphereBitFormation)), FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_King_SphereBitID, LVar0) + Call(SummonEnemy, Ref(N(PrismBitFormation)), FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_King_PrismBitID, LVar0) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(GetActorVar, ACTOR_SELF, AVAR_King_CubeBitID, LVar0) + Call(SetPartScale, LVar0, PRT_MAIN, Float(0.4), Float(0.4), Float(0.4)) + Call(GetActorVar, ACTOR_SELF, AVAR_King_SphereBitID, LVar0) + Call(SetPartScale, LVar0, PRT_MAIN, Float(0.4), Float(0.4), Float(0.4)) + Call(GetActorVar, ACTOR_SELF, AVAR_King_PrismBitID, LVar0) + Call(SetPartScale, LVar0, PRT_MAIN, Float(0.4), Float(0.4), Float(0.4)) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim1F) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SUMMON_CRYSTAL_BITS) + Call(GetActorVar, ACTOR_SELF, AVAR_King_PrismBitID, LVar0) + SetF(LVar1, Float(42.0)) + SetF(LVar2, Float(85.0)) + SetF(LVar3, Float(-10.0)) + Set(LVar4, N(PrismBitSummonData)) + Exec(N(EVS_SummonBit)) + Wait(10) + Call(GetActorVar, ACTOR_SELF, AVAR_King_SphereBitID, LVar0) + SetF(LVar1, Float(112.0)) + SetF(LVar2, Float(52.0)) + SetF(LVar3, Float(-5.0)) + Set(LVar4, N(SphereBitSummonData)) + Exec(N(EVS_SummonBit)) + Wait(24) + Call(GetActorVar, ACTOR_SELF, AVAR_King_CubeBitID, LVar0) + SetF(LVar1, Float(10.0)) + SetF(LVar2, Float(35.0)) + SetF(LVar3, Float(-5.0)) + Set(LVar4, N(CubeBitSummonData)) + Exec(N(EVS_SummonBit)) + Wait(130) + Call(GetActorVar, ACTOR_SELF, AVAR_King_CubeBitID, LVar0) + Call(ForceHomePos, LVar0, 10, 35, -5) + Call(HPBarToHome, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_King_SphereBitID, LVar0) + Call(ForceHomePos, LVar0, 112, 52, -5) + Call(HPBarToHome, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_King_PrismBitID, LVar0) + Call(ForceHomePos, LVar0, 42, 85, -10) + Call(HPBarToHome, LVar0) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_CloneBreath) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVarA) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVarB) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(UseIdleAnimation, LVarA, FALSE) - EVT_CALL(UseIdleAnimation, LVarB, FALSE) - EVT_CALL(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AVAL_Flag_SuspendHover) - EVT_CALL(SetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamZoom, 350) - EVT_CALL(SetBattleCamOffsetZ, 35) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetBattleCamTarget, 70, 41, 5) - EVT_ELSE - EVT_CALL(SetBattleCamTarget, 70, 0, 5) - EVT_END_IF - EVT_CALL(MoveBattleCamOver, 15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim13) - EVT_CALL(SetAnimation, LVarA, PRT_MAIN, ANIM_CrystalKing_Anim13) - EVT_CALL(SetAnimation, LVarB, PRT_MAIN, ANIM_CrystalKing_Anim13) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) - EVT_CALL(PlaySoundAtActor, LVarA, SOUND_RECOVER_HEART) - EVT_CALL(PlaySoundAtActor, LVarB, SOUND_RECOVER_HEART) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar9) - EVT_IF_NOT_FLAG(LVar9, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar2, -5) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 20, 0) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar2, -5) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 20, 0) - EVT_CALL(GetActorPos, LVarB, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar2, -5) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 20, 0) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 8) - EVT_ADD(LVar2, -2) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 8, 0) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 8) - EVT_ADD(LVar2, -2) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 8, 0) - EVT_CALL(GetActorPos, LVarB, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 8) - EVT_ADD(LVar2, -2) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 8, 0) - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim1C) - EVT_CALL(SetAnimation, LVarA, PRT_MAIN, ANIM_CrystalKing_Anim1C) - EVT_CALL(SetAnimation, LVarB, PRT_MAIN, ANIM_CrystalKing_Anim1C) - EVT_WAIT(3) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_WIND_LOOP) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVar5, LVar0) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_SETF(LVar3, EVT_FLOAT(195.0)) - EVT_ELSE - EVT_SETF(LVar3, EVT_FLOAT(180.0)) - EVT_END_IF - EVT_CALL(N(StartRumbleWithParams), 100, 60) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 30, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar9) - EVT_IF_NOT_FLAG(LVar9, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -15) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, LVar3, EVT_FLOAT(2.0), EVT_FLOAT(1.0), 30, 0) - EVT_CALL(N(SetBreathColors), LVarF) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -15) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, LVar3, EVT_FLOAT(2.0), EVT_FLOAT(1.0), 30, 0) - EVT_CALL(N(SetBreathColors), LVarF) - EVT_CALL(GetActorPos, LVarB, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -15) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, LVar3, EVT_FLOAT(2.0), EVT_FLOAT(1.0), 30, 0) - EVT_CALL(N(SetBreathColors), LVarF) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -6) - EVT_ADD(LVar1, 8) - EVT_PLAY_EFFECT(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, LVar3, EVT_FLOAT(2.0), EVT_FLOAT(0.4), 30, 0) - EVT_CALL(N(SetBreathColors), LVarF) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -6) - EVT_ADD(LVar1, 8) - EVT_PLAY_EFFECT(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, LVar3, EVT_FLOAT(2.0), EVT_FLOAT(0.4), 30, 0) - EVT_CALL(N(SetBreathColors), LVarF) - EVT_CALL(GetActorPos, LVarB, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -6) - EVT_ADD(LVar1, 8) - EVT_PLAY_EFFECT(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, LVar3, EVT_FLOAT(2.0), EVT_FLOAT(0.4), 30, 0) - EVT_CALL(N(SetBreathColors), LVarF) - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(StopSound, SOUND_HEAVY_WIND_LOOP) - EVT_IF_EQ(LVar5, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_BITWISE_AND_CONST(LVar0, ~AVAL_Flag_SuspendHover) - EVT_CALL(SetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_CALL(UseIdleAnimation, LVarA, TRUE) - EVT_CALL(UseIdleAnimation, LVarB, TRUE) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_SETF(LVar3, EVT_FLOAT(195.0)) - EVT_ELSE - EVT_SETF(LVar3, EVT_FLOAT(180.0)) - EVT_END_IF - EVT_CALL(N(StartRumbleWithParams), 100, 120) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 60, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar9) - EVT_IF_NOT_FLAG(LVar9, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -15) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, LVar3, EVT_FLOAT(2.0), EVT_FLOAT(1.0), 60, 0) - EVT_CALL(N(SetBreathColors), LVarF) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -15) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, LVar3, EVT_FLOAT(2.0), EVT_FLOAT(1.0), 60, 0) - EVT_CALL(N(SetBreathColors), LVarF) - EVT_CALL(GetActorPos, LVarB, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -15) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, LVar3, EVT_FLOAT(2.0), EVT_FLOAT(1.0), 60, 0) - EVT_CALL(N(SetBreathColors), LVarF) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -6) - EVT_ADD(LVar1, 8) - EVT_PLAY_EFFECT(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, LVar3, EVT_FLOAT(2.0), EVT_FLOAT(1.0), 60, 0) - EVT_CALL(N(SetBreathColors), LVarF) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -6) - EVT_ADD(LVar1, 8) - EVT_PLAY_EFFECT(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, LVar3, EVT_FLOAT(2.0), EVT_FLOAT(1.0), 60, 0) - EVT_CALL(N(SetBreathColors), LVarF) - EVT_CALL(GetActorPos, LVarB, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -6) - EVT_ADD(LVar1, 8) - EVT_PLAY_EFFECT(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, LVar3, EVT_FLOAT(2.0), EVT_FLOAT(1.0), 60, 0) - EVT_CALL(N(SetBreathColors), LVarF) - EVT_END_IF - EVT_WAIT(60) - EVT_CALL(StopSound, SOUND_HEAVY_WIND_LOOP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim15) - EVT_CALL(SetAnimation, LVarA, PRT_MAIN, ANIM_CrystalKing_Anim15) - EVT_CALL(SetAnimation, LVarB, PRT_MAIN, ANIM_CrystalKing_Anim15) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_ICE | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_CLONE_BREATH, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(20) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_BITWISE_AND_CONST(LVar0, ~AVAL_Flag_SuspendHover) - EVT_CALL(SetActorVar, ACTOR_KING, AVAR_Flags, LVar0) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_CALL(UseIdleAnimation, LVarA, TRUE) - EVT_CALL(UseIdleAnimation, LVarB, TRUE) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVarA) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVarB) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(UseIdleAnimation, LVarA, FALSE) + Call(UseIdleAnimation, LVarB, FALSE) + Call(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + BitwiseOrConst(LVar0, AVAL_Flag_SuspendHover) + Call(SetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamZoom, 350) + Call(SetBattleCamOffsetZ, 35) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetBattleCamTarget, 70, 41, 5) + Else + Call(SetBattleCamTarget, 70, 0, 5) + EndIf + Call(MoveBattleCamOver, 15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim13) + Call(SetAnimation, LVarA, PRT_MAIN, ANIM_CrystalKing_Anim13) + Call(SetAnimation, LVarB, PRT_MAIN, ANIM_CrystalKing_Anim13) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) + Call(PlaySoundAtActor, LVarA, SOUND_RECOVER_HEART) + Call(PlaySoundAtActor, LVarB, SOUND_RECOVER_HEART) + Call(GetStatusFlags, ACTOR_SELF, LVar9) + IfNotFlag(LVar9, STATUS_FLAG_SHRINK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Add(LVar2, -5) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 20, 0) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Add(LVar2, -5) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 20, 0) + Call(GetActorPos, LVarB, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Add(LVar2, -5) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 20, 0) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 8) + Add(LVar2, -2) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 8, 0) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Add(LVar1, 8) + Add(LVar2, -2) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 8, 0) + Call(GetActorPos, LVarB, LVar0, LVar1, LVar2) + Add(LVar1, 8) + Add(LVar2, -2) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 8, 0) + EndIf + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim1C) + Call(SetAnimation, LVarA, PRT_MAIN, ANIM_CrystalKing_Anim1C) + Call(SetAnimation, LVarB, PRT_MAIN, ANIM_CrystalKing_Anim1C) + Wait(3) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEAVY_WIND_LOOP) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVar5, LVar0) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, ACTOR_FLAG_FLYING) + SetF(LVar3, Float(195.0)) + Else + SetF(LVar3, Float(180.0)) + EndIf + Call(N(StartRumbleWithParams), 100, 60) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 30, Float(0.3)) + EndThread + Call(GetStatusFlags, ACTOR_SELF, LVar9) + IfNotFlag(LVar9, STATUS_FLAG_SHRINK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, -15) + Add(LVar1, 20) + PlayEffect(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, LVar3, Float(2.0), Float(1.0), 30, 0) + Call(N(SetBreathColors), LVarF) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Add(LVar0, -15) + Add(LVar1, 20) + PlayEffect(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, LVar3, Float(2.0), Float(1.0), 30, 0) + Call(N(SetBreathColors), LVarF) + Call(GetActorPos, LVarB, LVar0, LVar1, LVar2) + Add(LVar0, -15) + Add(LVar1, 20) + PlayEffect(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, LVar3, Float(2.0), Float(1.0), 30, 0) + Call(N(SetBreathColors), LVarF) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, -6) + Add(LVar1, 8) + PlayEffect(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, LVar3, Float(2.0), Float(0.4), 30, 0) + Call(N(SetBreathColors), LVarF) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Add(LVar0, -6) + Add(LVar1, 8) + PlayEffect(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, LVar3, Float(2.0), Float(0.4), 30, 0) + Call(N(SetBreathColors), LVarF) + Call(GetActorPos, LVarB, LVar0, LVar1, LVar2) + Add(LVar0, -6) + Add(LVar1, 8) + PlayEffect(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, LVar3, Float(2.0), Float(0.4), 30, 0) + Call(N(SetBreathColors), LVarF) + EndIf + Wait(30) + Call(StopSound, SOUND_HEAVY_WIND_LOOP) + IfEq(LVar5, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + BitwiseAndConst(LVar0, ~AVAL_Flag_SuspendHover) + Call(SetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Call(UseIdleAnimation, LVarA, TRUE) + Call(UseIdleAnimation, LVarB, TRUE) + Return + EndSwitch + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, ACTOR_FLAG_FLYING) + SetF(LVar3, Float(195.0)) + Else + SetF(LVar3, Float(180.0)) + EndIf + Call(N(StartRumbleWithParams), 100, 120) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 60, Float(0.3)) + EndThread + Call(GetStatusFlags, ACTOR_SELF, LVar9) + IfNotFlag(LVar9, STATUS_FLAG_SHRINK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, -15) + Add(LVar1, 20) + PlayEffect(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, LVar3, Float(2.0), Float(1.0), 60, 0) + Call(N(SetBreathColors), LVarF) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Add(LVar0, -15) + Add(LVar1, 20) + PlayEffect(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, LVar3, Float(2.0), Float(1.0), 60, 0) + Call(N(SetBreathColors), LVarF) + Call(GetActorPos, LVarB, LVar0, LVar1, LVar2) + Add(LVar0, -15) + Add(LVar1, 20) + PlayEffect(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, LVar3, Float(2.0), Float(1.0), 60, 0) + Call(N(SetBreathColors), LVarF) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, -6) + Add(LVar1, 8) + PlayEffect(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, LVar3, Float(2.0), Float(1.0), 60, 0) + Call(N(SetBreathColors), LVarF) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Add(LVar0, -6) + Add(LVar1, 8) + PlayEffect(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, LVar3, Float(2.0), Float(1.0), 60, 0) + Call(N(SetBreathColors), LVarF) + Call(GetActorPos, LVarB, LVar0, LVar1, LVar2) + Add(LVar0, -6) + Add(LVar1, 8) + PlayEffect(EFFECT_HUFF_PUFF_BREATH, 0, LVar0, LVar1, LVar2, LVar3, Float(2.0), Float(1.0), 60, 0) + Call(N(SetBreathColors), LVarF) + EndIf + Wait(60) + Call(StopSound, SOUND_HEAVY_WIND_LOOP) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim15) + Call(SetAnimation, LVarA, PRT_MAIN, ANIM_CrystalKing_Anim15) + Call(SetAnimation, LVarB, PRT_MAIN, ANIM_CrystalKing_Anim15) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_ICE | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_CLONE_BREATH, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(20) + EndCaseGroup + EndSwitch + Call(GetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + BitwiseAndConst(LVar0, ~AVAL_Flag_SuspendHover) + Call(SetActorVar, ACTOR_KING, AVAR_Flags, LVar0) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Call(UseIdleAnimation, LVarA, TRUE) + Call(UseIdleAnimation, LVarB, TRUE) + Return + End }; // LVar0: (in) bit ActorID // LVar1: (in) suction path array EvtScript N(EVS_InhaleBit) = { - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_CALL(UseIdleAnimation, LVarA, FALSE) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar9) - EVT_IF_NOT_FLAG(LVar9, STATUS_FLAG_SHRINK) - EVT_ADD(LVar3, -15) - EVT_ADD(LVar4, 20) - EVT_ELSE - EVT_ADD(LVar3, -6) - EVT_ADD(LVar4, 8) - EVT_END_IF - EVT_CALL(N(MakeSuctionPath), LVarB, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5) - EVT_CALL(LoadPath, 30, LVarB, 3, EASING_QUADRATIC_IN) - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetActorPos, LVarA, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetPartFlagBits, LVarA, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetActorFlagBits, LVarA, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Set(LVarB, LVar1) + Call(UseIdleAnimation, LVarA, FALSE) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Call(GetStatusFlags, ACTOR_SELF, LVar9) + IfNotFlag(LVar9, STATUS_FLAG_SHRINK) + Add(LVar3, -15) + Add(LVar4, 20) + Else + Add(LVar3, -6) + Add(LVar4, 8) + EndIf + Call(N(MakeSuctionPath), LVarB, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5) + Call(LoadPath, 30, LVarB, 3, EASING_QUADRATIC_IN) + Label(0) + Call(GetNextPathPos) + Call(SetActorPos, LVarA, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(0) + EndIf + Call(SetPartFlagBits, LVarA, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetActorFlagBits, LVarA, ACTOR_FLAG_NO_SHADOW, TRUE) + Return + End }; EvtScript N(EVS_RemoveBit) = { - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LIGHT_THROW) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetPartFlagBits, LVarA, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetActorFlagBits, LVarA, ACTOR_FLAG_NO_SHADOW, FALSE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -150, 0, 0) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorPos, LVarA, LVar3, LVar4, LVar5) - EVT_THREAD - EVT_SUB(LVar0, LVar3) - EVT_SUB(LVar1, LVar4) - EVT_SUB(LVar2, LVar5) - EVT_DIV(LVar0, 10) - EVT_DIV(LVar1, 10) - EVT_DIV(LVar2, 10) - EVT_LOOP(10) - EVT_ADD(LVar3, LVar0) - EVT_ADD(LVar4, LVar1) - EVT_ADD(LVar5, LVar2) - EVT_PLAY_EFFECT(EFFECT_MISC_PARTICLES, 1, LVar3, LVar4, LVar5, 20, -20, EVT_FLOAT(1.0), 5, 30, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetActorSpeed, LVarA, EVT_FLOAT(16.0)) - EVT_CALL(SetGoalPos, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, LVarA, 0, 0, EASING_LINEAR) - EVT_CALL(GetActorVar, LVarA, AVAR_Bit_ParticlesEffect, LVarF) - EVT_CALL(RemoveEffect, LVarF) - EVT_CALL(RemoveActor, LVarA) - EVT_RETURN - EVT_END + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LIGHT_THROW) + Set(LVarA, LVar0) + Call(SetPartFlagBits, LVarA, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetActorFlagBits, LVarA, ACTOR_FLAG_NO_SHADOW, FALSE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -150, 0, 0) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorPos, LVarA, LVar3, LVar4, LVar5) + Thread + Sub(LVar0, LVar3) + Sub(LVar1, LVar4) + Sub(LVar2, LVar5) + Div(LVar0, 10) + Div(LVar1, 10) + Div(LVar2, 10) + Loop(10) + Add(LVar3, LVar0) + Add(LVar4, LVar1) + Add(LVar5, LVar2) + PlayEffect(EFFECT_MISC_PARTICLES, 1, LVar3, LVar4, LVar5, 20, -20, Float(1.0), 5, 30, 0) + Wait(1) + EndLoop + EndThread + Call(SetActorSpeed, LVarA, Float(16.0)) + Call(SetGoalPos, LVarA, LVar0, LVar1, LVar2) + Call(FlyToGoal, LVarA, 0, 0, EASING_LINEAR) + Call(GetActorVar, LVarA, AVAR_Bit_ParticlesEffect, LVarF) + Call(RemoveEffect, LVarF) + Call(RemoveActor, LVarA) + Return + End }; EvtScript N(EVS_SpitSingleBit) = { - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LIGHT_THROW) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetPartFlagBits, LVarA, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetActorFlagBits, LVarA, ACTOR_FLAG_NO_SHADOW, FALSE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorPos, LVarA, LVar3, LVar4, LVar5) - EVT_THREAD - EVT_SUB(LVar0, LVar3) - EVT_SUB(LVar1, LVar4) - EVT_SUB(LVar2, LVar5) - EVT_DIV(LVar0, 10) - EVT_DIV(LVar1, 10) - EVT_DIV(LVar2, 10) - EVT_LOOP(10) - EVT_ADD(LVar3, LVar0) - EVT_ADD(LVar4, LVar1) - EVT_ADD(LVar5, LVar2) - EVT_PLAY_EFFECT(EFFECT_MISC_PARTICLES, 1, LVar3, LVar4, LVar5, 20, -20, EVT_FLOAT(1.0), 5, 30, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetActorSpeed, LVarA, EVT_FLOAT(16.0)) - EVT_CALL(SetGoalPos, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, LVarA, 0, 0, EASING_LINEAR) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_ICE | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SPIT_BIT, 0) - EVT_CALL(SetActorJumpGravity, LVarA, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, LVarA, LVar1, LVar2, LVar3) - EVT_SUB(LVar1, 100) - EVT_CALL(RandInt, 50, LVar4) - EVT_ADD(LVar2, LVar4) - EVT_CALL(SetGoalPos, LVarA, LVar1, LVar2, LVar3) - EVT_CALL(JumpToGoal, LVarA, 20, FALSE, TRUE, FALSE) - EVT_CALL(GetActorVar, LVarA, AVAR_Bit_ParticlesEffect, LVarF) - EVT_CALL(RemoveEffect, LVarF) - EVT_CALL(RemoveActor, LVarA) - EVT_RETURN - EVT_END + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LIGHT_THROW) + Set(LVarA, LVar0) + Call(SetPartFlagBits, LVarA, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetActorFlagBits, LVarA, ACTOR_FLAG_NO_SHADOW, FALSE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorPos, LVarA, LVar3, LVar4, LVar5) + Thread + Sub(LVar0, LVar3) + Sub(LVar1, LVar4) + Sub(LVar2, LVar5) + Div(LVar0, 10) + Div(LVar1, 10) + Div(LVar2, 10) + Loop(10) + Add(LVar3, LVar0) + Add(LVar4, LVar1) + Add(LVar5, LVar2) + PlayEffect(EFFECT_MISC_PARTICLES, 1, LVar3, LVar4, LVar5, 20, -20, Float(1.0), 5, 30, 0) + Wait(1) + EndLoop + EndThread + Call(SetActorSpeed, LVarA, Float(16.0)) + Call(SetGoalPos, LVarA, LVar0, LVar1, LVar2) + Call(FlyToGoal, LVarA, 0, 0, EASING_LINEAR) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_ICE | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SPIT_BIT, 0) + Call(SetActorJumpGravity, LVarA, Float(1.0)) + Call(GetActorPos, LVarA, LVar1, LVar2, LVar3) + Sub(LVar1, 100) + Call(RandInt, 50, LVar4) + Add(LVar2, LVar4) + Call(SetGoalPos, LVarA, LVar1, LVar2, LVar3) + Call(JumpToGoal, LVarA, 20, FALSE, TRUE, FALSE) + Call(GetActorVar, LVarA, AVAR_Bit_ParticlesEffect, LVarF) + Call(RemoveEffect, LVarF) + Call(RemoveActor, LVarA) + Return + End }; EvtScript N(EVS_Attack_SpitBits) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim1C) - EVT_WAIT(20) - EVT_CALL(N(StartRumbleWithParams), 70, 60) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 30, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CRYSTAL_KING_INHALE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_King_CubeBitID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_SET(LVar1, &N(BitSuctionPaths)[0]) - EVT_EXEC_GET_TID(N(EVS_InhaleBit), LVarA) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_King_SphereBitID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_SET(LVar1, &N(BitSuctionPaths)[1]) - EVT_EXEC_GET_TID(N(EVS_InhaleBit), LVarA) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_King_PrismBitID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_SET(LVar1, &N(BitSuctionPaths)[2]) - EVT_EXEC_GET_TID(N(EVS_InhaleBit), LVarA) - EVT_END_IF - EVT_LABEL(0) - EVT_IS_THREAD_RUNNING(LVarA, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim13) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 15) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVar9, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_King_CubeBitID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim1C) - EVT_EXEC_GET_TID(N(EVS_RemoveBit), LVarA) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim15) - EVT_WAIT(6) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_King_SphereBitID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim1C) - EVT_EXEC_GET_TID(N(EVS_RemoveBit), LVarA) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim15) - EVT_WAIT(6) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_King_PrismBitID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim1C) - EVT_EXEC_GET_TID(N(EVS_RemoveBit), LVarA) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim15) - EVT_WAIT(6) - EVT_END_IF - EVT_LABEL(1) - EVT_IS_THREAD_RUNNING(LVarA, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_IF_EQ(LVar9, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_King_CubeBitID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim1C) - EVT_EXEC_GET_TID(N(EVS_SpitSingleBit), LVarA) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim15) - EVT_WAIT(6) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_King_SphereBitID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim1C) - EVT_EXEC_GET_TID(N(EVS_SpitSingleBit), LVarA) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim15) - EVT_WAIT(6) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_King_PrismBitID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim1C) - EVT_EXEC_GET_TID(N(EVS_SpitSingleBit), LVarA) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim15) - EVT_WAIT(6) - EVT_END_IF - EVT_LABEL(4) - EVT_IS_THREAD_RUNNING(LVarA, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_WAIT(1) - EVT_GOTO(4) - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim1C) + Wait(20) + Call(N(StartRumbleWithParams), 70, 60) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 30, Float(0.2)) + EndThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CRYSTAL_KING_INHALE) + Call(GetActorVar, ACTOR_SELF, AVAR_King_CubeBitID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, TRUE) + Set(LVar1, &N(BitSuctionPaths)[0]) + ExecGetTID(N(EVS_InhaleBit), LVarA) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_King_SphereBitID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, TRUE) + Set(LVar1, &N(BitSuctionPaths)[1]) + ExecGetTID(N(EVS_InhaleBit), LVarA) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_King_PrismBitID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, TRUE) + Set(LVar1, &N(BitSuctionPaths)[2]) + ExecGetTID(N(EVS_InhaleBit), LVarA) + EndIf + Label(0) + IsThreadRunning(LVarA, LVar0) + IfEq(LVar0, 1) + Wait(1) + Goto(0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim13) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 15) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVar9, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_King_CubeBitID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim1C) + ExecGetTID(N(EVS_RemoveBit), LVarA) + Wait(4) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim15) + Wait(6) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_King_SphereBitID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim1C) + ExecGetTID(N(EVS_RemoveBit), LVarA) + Wait(4) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim15) + Wait(6) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_King_PrismBitID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim1C) + ExecGetTID(N(EVS_RemoveBit), LVarA) + Wait(4) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim15) + Wait(6) + EndIf + Label(1) + IsThreadRunning(LVarA, LVar0) + IfEq(LVar0, 1) + Wait(1) + Goto(1) + EndIf + IfEq(LVar9, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(30) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndSwitch + Call(GetActorVar, ACTOR_SELF, AVAR_King_CubeBitID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim1C) + ExecGetTID(N(EVS_SpitSingleBit), LVarA) + Wait(4) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim15) + Wait(6) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_King_SphereBitID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim1C) + ExecGetTID(N(EVS_SpitSingleBit), LVarA) + Wait(4) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim15) + Wait(6) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_King_PrismBitID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim1C) + ExecGetTID(N(EVS_SpitSingleBit), LVarA) + Wait(4) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim15) + Wait(6) + EndIf + Label(4) + IsThreadRunning(LVarA, LVar0) + IfEq(LVar0, 1) + Wait(1) + Goto(4) + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Move_Recover) = { - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_Move_AttackWithClones) - EVT_CASE_OR_EQ(AVAL_Move_AfterClonesAttack) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVarA) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVarB) - EVT_CALL(ActorExists, LVarA, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, LVarA, FALSE) - EVT_CALL(EnableIdleScript, LVarA, IDLE_SCRIPT_DISABLE) - EVT_CALL(UseIdleAnimation, LVarB, FALSE) - EVT_CALL(EnableIdleScript, LVarB, IDLE_SCRIPT_DISABLE) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamZoom, 350) - EVT_CALL(SetBattleCamOffsetZ, 50) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetBattleCamTarget, 70, 41, 5) - EVT_ELSE - EVT_CALL(SetBattleCamTarget, 70, 0, 5) - EVT_END_IF - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim1D) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(SetAnimation, LVarA, PRT_MAIN, ANIM_CrystalKing_Anim1D) - EVT_CALL(SetAnimation, LVarB, PRT_MAIN, ANIM_CrystalKing_Anim1D) - EVT_END_IF - EVT_WAIT(20) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) - EVT_WAIT(30) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_STAR_BOUNCE_A) - EVT_END_THREAD - EVT_IF_EQ(LFlag0, TRUE) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, LVarA, SOUND_RECOVER_HEART) - EVT_CALL(PlaySoundAtActor, LVarA, SOUND_HEART_BOUNCE) - EVT_WAIT(30) - EVT_CALL(PlaySoundAtActor, LVarA, SOUND_STAR_BOUNCE_A) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, LVarB, SOUND_RECOVER_HEART) - EVT_CALL(PlaySoundAtActor, LVarB, SOUND_HEART_BOUNCE) - EVT_WAIT(30) - EVT_CALL(PlaySoundAtActor, LVarB, SOUND_STAR_BOUNCE_A) - EVT_END_THREAD - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(HealActor, ACTOR_SELF, 20, FALSE) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_ELSE - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(HealActor, ACTOR_SELF, 20, TRUE) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(HealActor, LVarA, 20, TRUE) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(HealActor, LVarB, 20, TRUE) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_CALL(SetAnimation, LVarA, PRT_MAIN, ANIM_CrystalKing_Anim09) - EVT_CALL(SetAnimation, LVarB, PRT_MAIN, ANIM_CrystalKing_Anim09) - EVT_END_IF - EVT_CALL(WaitForBuffDone) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(EnableIdleScript, LVarA, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, LVarA, TRUE) - EVT_CALL(EnableIdleScript, LVarA, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, LVarA, TRUE) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LFlag0, FALSE) + Call(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_Move_AttackWithClones) + CaseOrEq(AVAL_Move_AfterClonesAttack) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone1_ID, LVarA) + Call(GetActorVar, ACTOR_SELF, AVAR_Clone2_ID, LVarB) + Call(ActorExists, LVarA, LVar0) + IfEq(LVar0, TRUE) + Set(LFlag0, TRUE) + EndIf + EndCaseGroup + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, LVarA, FALSE) + Call(EnableIdleScript, LVarA, IDLE_SCRIPT_DISABLE) + Call(UseIdleAnimation, LVarB, FALSE) + Call(EnableIdleScript, LVarB, IDLE_SCRIPT_DISABLE) + EndIf + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamZoom, 350) + Call(SetBattleCamOffsetZ, 50) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetBattleCamTarget, 70, 41, 5) + Else + Call(SetBattleCamTarget, 70, 0, 5) + EndIf + Call(MoveBattleCamOver, 20) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_CrystalKing_Anim1D) + IfEq(LFlag0, TRUE) + Call(SetAnimation, LVarA, PRT_MAIN, ANIM_CrystalKing_Anim1D) + Call(SetAnimation, LVarB, PRT_MAIN, ANIM_CrystalKing_Anim1D) + EndIf + Wait(20) + Thread + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) + Wait(30) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_STAR_BOUNCE_A) + EndThread + IfEq(LFlag0, TRUE) + Thread + Wait(5) + Call(PlaySoundAtActor, LVarA, SOUND_RECOVER_HEART) + Call(PlaySoundAtActor, LVarA, SOUND_HEART_BOUNCE) + Wait(30) + Call(PlaySoundAtActor, LVarA, SOUND_STAR_BOUNCE_A) + EndThread + Thread + Wait(5) + Call(PlaySoundAtActor, LVarB, SOUND_RECOVER_HEART) + Call(PlaySoundAtActor, LVarB, SOUND_HEART_BOUNCE) + Wait(30) + Call(PlaySoundAtActor, LVarB, SOUND_STAR_BOUNCE_A) + EndThread + EndIf + IfEq(LFlag0, FALSE) + Thread + Call(FreezeBattleState, TRUE) + Call(HealActor, ACTOR_SELF, 20, FALSE) + Call(FreezeBattleState, FALSE) + EndThread + Else + Thread + Call(FreezeBattleState, TRUE) + Call(HealActor, ACTOR_SELF, 20, TRUE) + Call(FreezeBattleState, FALSE) + EndThread + Thread + Call(FreezeBattleState, TRUE) + Call(HealActor, LVarA, 20, TRUE) + Call(FreezeBattleState, FALSE) + EndThread + Thread + Call(FreezeBattleState, TRUE) + Call(HealActor, LVarB, 20, TRUE) + Call(FreezeBattleState, FALSE) + EndThread + Call(SetAnimation, LVarA, PRT_MAIN, ANIM_CrystalKing_Anim09) + Call(SetAnimation, LVarB, PRT_MAIN, ANIM_CrystalKing_Anim09) + EndIf + Call(WaitForBuffDone) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + IfEq(LFlag0, TRUE) + Call(EnableIdleScript, LVarA, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, LVarA, TRUE) + Call(EnableIdleScript, LVarA, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, LVarA, TRUE) + EndIf + Return + End }; diff --git a/src/battle/area/sam2/actor/monstar.c b/src/battle/area/sam2/actor/monstar.c index b6cde7d5ade..1cc95ed2f71 100644 --- a/src/battle/area/sam2/actor/monstar.c +++ b/src/battle/area/sam2/actor/monstar.c @@ -133,15 +133,15 @@ s32 N(ChargedAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Charged, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HoverPaused, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TurnCount, 0) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_Charged, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_HoverPaused, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_TurnCount, 0) + Return + End }; INCLUDE_IMG("battle/area/sam2/actor/img.png", battle_area_sam2_actor_img_png); @@ -200,467 +200,467 @@ API_CALLABLE(N(UpdateMonstarImgFX)) { #include "common/StartRumbleWithParams.inc.c" EvtScript N(EVS_Idle) = { - EVT_CHILD_THREAD - EVT_CALL(N(UpdateMonstarImgFX)) - EVT_END_CHILD_THREAD - EVT_LABEL(0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar2, LVar3, LVar4) - EVT_CALL(MakeLerp, 0, 10, 30, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_ADD(LVar0, LVar3) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar2, LVar0, LVar4) - EVT_LABEL(2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HoverPaused, LVar5) - EVT_WAIT(1) - EVT_IF_EQ(LVar5, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar2, LVar3, LVar4) - EVT_CALL(MakeLerp, 0, -10, 30, EASING_COS_IN_OUT) - EVT_LABEL(3) - EVT_CALL(UpdateLerp) - EVT_ADD(LVar0, LVar3) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar2, LVar0, LVar4) - EVT_LABEL(4) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HoverPaused, LVar5) - EVT_WAIT(1) - EVT_IF_EQ(LVar5, 1) - EVT_GOTO(4) - EVT_END_IF - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(3) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + ChildThread + Call(N(UpdateMonstarImgFX)) + EndChildThread + Label(0) + Call(GetActorPos, ACTOR_SELF, LVar2, LVar3, LVar4) + Call(MakeLerp, 0, 10, 30, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Add(LVar0, LVar3) + Call(SetActorPos, ACTOR_SELF, LVar2, LVar0, LVar4) + Label(2) + Call(GetActorVar, ACTOR_SELF, AVAR_HoverPaused, LVar5) + Wait(1) + IfEq(LVar5, 1) + Goto(2) + EndIf + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar2, LVar3, LVar4) + Call(MakeLerp, 0, -10, 30, EASING_COS_IN_OUT) + Label(3) + Call(UpdateLerp) + Add(LVar0, LVar3) + Call(SetActorPos, ACTOR_SELF, LVar2, LVar0, LVar4) + Label(4) + Call(GetActorVar, ACTOR_SELF, AVAR_HoverPaused, LVar5) + Wait(1) + IfEq(LVar5, 1) + Goto(4) + EndIf + IfEq(LVar1, 1) + Goto(3) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HoverPaused, TRUE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Monstar_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET(LVar0, 1) - EVT_SET(LVar1, ANIM_Monstar_Hurt) - EVT_SET(LVar2, -1) - EVT_EXEC_WAIT(N(EVS_BurnHit)) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET(LVar0, 1) - EVT_SET(LVar1, ANIM_Monstar_Hurt) - EVT_SET(LVar2, -1) - EVT_EXEC_WAIT(N(EVS_BurnHit)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Monstar_Hurt) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_ZERO_DAMAGE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Charged, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Monstar_Idle1) - EVT_CASE_EQ(1) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Monstar_GatherStrength1) - EVT_END_SWITCH - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(EVENT_IMMUNE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Charged, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Monstar_Idle1) - EVT_CASE_EQ(1) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Monstar_GatherStrength1) - EVT_END_SWITCH - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Monstar_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Monstar_Hurt) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Monstar_Idle1) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Charged, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Monstar_Idle1) - EVT_CASE_EQ(1) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Monstar_GatherStrength1) - EVT_END_SWITCH - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Charged, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Monstar_Idle1) - EVT_CASE_EQ(1) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Monstar_GatherStrength1) - EVT_END_SWITCH - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_SWITCH - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HoverPaused, FALSE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_HoverPaused, TRUE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Monstar_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + Set(LVar0, 1) + Set(LVar1, ANIM_Monstar_Hurt) + Set(LVar2, -1) + ExecWait(N(EVS_BurnHit)) + CaseEq(EVENT_BURN_DEATH) + Set(LVar0, 1) + Set(LVar1, ANIM_Monstar_Hurt) + Set(LVar2, -1) + ExecWait(N(EVS_BurnHit)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Monstar_Hurt) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_ZERO_DAMAGE) + Call(GetActorVar, ACTOR_SELF, AVAR_Charged, LVar0) + Switch(LVar0) + CaseEq(0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Monstar_Idle1) + CaseEq(1) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Monstar_GatherStrength1) + EndSwitch + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(EVENT_IMMUNE) + Call(GetActorVar, ACTOR_SELF, AVAR_Charged, LVar0) + Switch(LVar0) + CaseEq(0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Monstar_Idle1) + CaseEq(1) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Monstar_GatherStrength1) + EndSwitch + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Monstar_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Monstar_Hurt) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Monstar_Idle1) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_BEGIN_AIR_LIFT) + Call(GetActorVar, ACTOR_SELF, AVAR_Charged, LVar0) + Switch(LVar0) + CaseEq(0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Monstar_Idle1) + CaseEq(1) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Monstar_GatherStrength1) + EndSwitch + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_AIR_LIFT_FAILED) + Call(GetActorVar, ACTOR_SELF, AVAR_Charged, LVar0) + Switch(LVar0) + CaseEq(0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Monstar_Idle1) + CaseEq(1) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Monstar_GatherStrength1) + EndSwitch + ExecWait(EVS_Enemy_NoDamageHit) + EndSwitch + Call(SetActorVar, ACTOR_SELF, AVAR_HoverPaused, FALSE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; // unused EvtScript N(EVS_ChargeUp) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HoverPaused, TRUE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13) - EVT_CALL(SetBattleCamZoom, 10) - EVT_CALL(SetBattleCamOffsetZ, 5) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Monstar_GatherStrength1) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ChargedAnims))) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 40) - EVT_SUB(LVar2, 5) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 10, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 300, 0) - EVT_WAIT(75) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HoverPaused, FALSE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_HoverPaused, TRUE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_13) + Call(SetBattleCamZoom, 10) + Call(SetBattleCamOffsetZ, 5) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Monstar_GatherStrength1) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ChargedAnims))) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 40) + Sub(LVar2, 5) + PlayEffect(EFFECT_RADIAL_SHIMMER, 10, LVar0, LVar1, LVar2, Float(1.0), 300, 0) + Wait(75) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(SetActorVar, ACTOR_SELF, AVAR_HoverPaused, FALSE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_StarStorm) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HoverPaused, TRUE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 250) - EVT_CALL(SetBattleCamOffsetZ, 55) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Monstar_GatherStrength1) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Monstar_GatherStrength2) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Monstar_GatherStrength3) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(UnkBackgroundFunc3)) - EVT_CALL(MakeLerp, 0, 200, 60, EASING_QUADRATIC_IN) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetBackgroundAlpha), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BIG_POWER_UP) - EVT_CALL(N(StartRumbleWithParams), 80, 120) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 100) - EVT_CALL(SetBattleCamOffsetZ, 60) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 60) - EVT_WAIT(60) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MONSTAR_CAST_SPELL) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MONSTAR_STAR_STORM) - EVT_THREAD - EVT_WAIT(10) - EVT_LOOP(18) - EVT_CALL(RandInt, 150, LVar0) - EVT_ADD(LVar0, 100) - EVT_CALL(N(StartRumbleWithParams), LVar0, 20) - EVT_WAIT(10) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(60) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_HoverPaused, TRUE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 250) + Call(SetBattleCamOffsetZ, 55) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 30) + Wait(30) + Thread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Monstar_GatherStrength1) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Monstar_GatherStrength2) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Monstar_GatherStrength3) + EndThread + Thread + Call(N(UnkBackgroundFunc3)) + Call(MakeLerp, 0, 200, 60, EASING_QUADRATIC_IN) + Label(0) + Call(UpdateLerp) + Call(N(SetBackgroundAlpha), LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + EndThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BIG_POWER_UP) + Call(N(StartRumbleWithParams), 80, 120) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 100) + Call(SetBattleCamOffsetZ, 60) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 60) + Wait(60) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MONSTAR_CAST_SPELL) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MONSTAR_STAR_STORM) + Thread + Wait(10) + Loop(18) + Call(RandInt, 150, LVar0) + Add(LVar0, 100) + Call(N(StartRumbleWithParams), LVar0, 20) + Wait(10) + EndLoop + EndThread + Thread + Loop(60) // choose from FX_STAR_BACKGROUND to FX_STAR_SMALL_BOUNCING - EVT_CALL(RandInt, 1, LVar0) - EVT_ADD(LVar0, 2) - EVT_CALL(RandInt, 400, LVar1) - EVT_SUB(LVar1, 100) - EVT_CALL(RandInt, 100, LVar2) - EVT_SUB(LVar2, 50) - EVT_SET(LVar3, LVar1) - EVT_SUB(LVar3, 200) - EVT_SET(LVar4, LVar2) - EVT_CALL(RandInt, 10, LVar5) - EVT_ADD(LVar5, 10) - EVT_PLAY_EFFECT(EFFECT_STAR, LVar0, LVar1, 240, LVar2, LVar3, 0, LVar4, LVar5, 0) - EVT_WAIT(3) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(8) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 50) - EVT_ADD(LVar2, 5) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 11, LVar0, LVar1, LVar2, EVT_FLOAT(0.8), 160, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Monstar_Release) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 0, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_WAIT(170) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Monstar_Idle1) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_CALL(MakeLerp, 200, 0, 60, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetBackgroundAlpha), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(20) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HoverPaused, FALSE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_WAIT(170) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_STAR_STORM, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Monstar_Idle1) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_CALL(MakeLerp, 200, 0, 60, EASING_LINEAR) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetBackgroundAlpha), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(20) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HoverPaused, FALSE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(RandInt, 1, LVar0) + Add(LVar0, 2) + Call(RandInt, 400, LVar1) + Sub(LVar1, 100) + Call(RandInt, 100, LVar2) + Sub(LVar2, 50) + Set(LVar3, LVar1) + Sub(LVar3, 200) + Set(LVar4, LVar2) + Call(RandInt, 10, LVar5) + Add(LVar5, 10) + PlayEffect(EFFECT_STAR, LVar0, LVar1, 240, LVar2, LVar3, 0, LVar4, LVar5, 0) + Wait(3) + EndLoop + EndThread + Wait(8) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 50) + Add(LVar2, 5) + PlayEffect(EFFECT_RADIAL_SHIMMER, 11, LVar0, LVar1, LVar2, Float(0.8), 160, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Monstar_Release) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 0, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Wait(170) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Monstar_Idle1) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Call(MakeLerp, 200, 0, 60, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(N(SetBackgroundAlpha), LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(20) + Call(SetActorVar, ACTOR_SELF, AVAR_HoverPaused, FALSE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Wait(170) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_STAR_STORM, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Monstar_Idle1) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Call(MakeLerp, 200, 0, 60, EASING_LINEAR) + Label(2) + Call(UpdateLerp) + Call(N(SetBackgroundAlpha), LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(2) + EndIf + Wait(20) + EndCaseGroup + EndSwitch + Call(SetActorVar, ACTOR_SELF, AVAR_HoverPaused, FALSE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_EXEC_WAIT(N(EVS_Attack_StarStorm)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 72) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 340) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(ActorSpeak, MSG_CH7_00E5, ACTOR_SELF, PRT_MAIN, ANIM_Monstar_Talk, ANIM_Monstar_Talk) - EVT_CASE_EQ(1) - EVT_CALL(ActorSpeak, MSG_CH7_00E6, ACTOR_SELF, PRT_MAIN, ANIM_Monstar_Talk, ANIM_Monstar_Talk) - EVT_CASE_EQ(2) - EVT_CALL(ActorSpeak, MSG_CH7_00E7, ACTOR_SELF, PRT_MAIN, ANIM_Monstar_Talk, ANIM_Monstar_Talk) - EVT_CASE_DEFAULT - EVT_CALL(ActorSpeak, MSG_CH7_00E6, ACTOR_SELF, PRT_MAIN, ANIM_Monstar_Talk, ANIM_Monstar_Talk) - EVT_END_SWITCH - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_TurnCount, 1) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_RETURN - EVT_END + ExecWait(N(EVS_Attack_StarStorm)) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 72) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 340) + Call(MoveBattleCamOver, 20) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetActorVar, ACTOR_SELF, AVAR_TurnCount, LVar0) + Switch(LVar0) + CaseEq(0) + Call(ActorSpeak, MSG_CH7_00E5, ACTOR_SELF, PRT_MAIN, ANIM_Monstar_Talk, ANIM_Monstar_Talk) + CaseEq(1) + Call(ActorSpeak, MSG_CH7_00E6, ACTOR_SELF, PRT_MAIN, ANIM_Monstar_Talk, ANIM_Monstar_Talk) + CaseEq(2) + Call(ActorSpeak, MSG_CH7_00E7, ACTOR_SELF, PRT_MAIN, ANIM_Monstar_Talk, ANIM_Monstar_Talk) + CaseDefault + Call(ActorSpeak, MSG_CH7_00E6, ACTOR_SELF, PRT_MAIN, ANIM_Monstar_Talk, ANIM_Monstar_Talk) + EndSwitch + Call(AddActorVar, ACTOR_SELF, AVAR_TurnCount, 1) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Return + End }; EvtScript N(EVS_Death) = { - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_IF_NE(LVar1, -1) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_WAIT(10) - EVT_END_IF - EVT_CALL(GetDamageSource, LVar5) - EVT_SWITCH(LVar5) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_SLAP_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_FAN_SMACK_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_SLAP_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_SLAP_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_FAN_SMACK_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_SLAP_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_SPIN_SMASH) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetOriginalActorType, ACTOR_SELF, LVar1) - EVT_SWITCH(LVar1) - EVT_CASE_OR_EQ(ACTOR_TYPE_BOB_OMB) - EVT_CASE_OR_EQ(ACTOR_TYPE_BULLET_BILL) - EVT_CASE_OR_EQ(ACTOR_TYPE_BOMBSHELL_BILL) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_IF_NE(LVar2, EXEC_DEATH_NO_SPINNING) - EVT_SET(LVar2, 0) - EVT_LOOP(24) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar2) - EVT_ADD(LVar2, 30) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_ADD(LVar2, 10) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_DEATH) - EVT_CALL(DropStarPoints, ACTOR_SELF) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_SET(LVar3, 0) - EVT_LOOP(12) - EVT_CALL(SetActorRotation, ACTOR_SELF, LVar3, 0, 0) - EVT_ADD(LVar3, 8) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_EXEC_WAIT(EVS_ForceNextTarget) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(HideHealthBar, ACTOR_SELF) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + IfNe(LVar1, -1) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Wait(10) + EndIf + Call(GetDamageSource, LVar5) + Switch(LVar5) + CaseOrEq(DMG_SRC_NEXT_SLAP_LEFT) + CaseOrEq(DMG_SRC_NEXT_FAN_SMACK_LEFT) + CaseOrEq(DMG_SRC_LAST_SLAP_LEFT) + CaseOrEq(DMG_SRC_LAST_FAN_SMACK_LEFT) + CaseOrEq(DMG_SRC_NEXT_SLAP_RIGHT) + CaseOrEq(DMG_SRC_NEXT_FAN_SMACK_RIGHT) + CaseOrEq(DMG_SRC_LAST_SLAP_RIGHT) + CaseOrEq(DMG_SRC_LAST_FAN_SMACK_RIGHT) + CaseOrEq(DMG_SRC_SPIN_SMASH) + EndCaseGroup + CaseDefault + Set(LFlag0, FALSE) + Call(GetOriginalActorType, ACTOR_SELF, LVar1) + Switch(LVar1) + CaseOrEq(ACTOR_TYPE_BOB_OMB) + CaseOrEq(ACTOR_TYPE_BULLET_BILL) + CaseOrEq(ACTOR_TYPE_BOMBSHELL_BILL) + EndCaseGroup + CaseDefault + EndSwitch + IfNe(LVar2, EXEC_DEATH_NO_SPINNING) + Set(LVar2, 0) + Loop(24) + Call(SetActorYaw, ACTOR_SELF, LVar2) + Add(LVar2, 30) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + EndIf + EndSwitch + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 10) + Add(LVar2, 10) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_DEATH) + Call(DropStarPoints, ACTOR_SELF) + Call(SetActorYaw, ACTOR_SELF, 0) + Set(LVar3, 0) + Loop(12) + Call(SetActorRotation, ACTOR_SELF, LVar3, 0, 0) + Add(LVar3, 8) + Wait(1) + EndLoop + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ExecWait(EVS_ForceNextTarget) + Call(RemoveActor, ACTOR_SELF) + Return + End }; EvtScript N(EVS_BurnHit) = { - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(GetDamageSource, LVar3) - EVT_SWITCH(LVar3) - EVT_CASE_EQ(DMG_SRC_FIRE_SHELL) - EVT_CALL(GetOriginalActorType, ACTOR_SELF, LVar7) - EVT_SWITCH(LVar7) - EVT_CASE_OR_EQ(ACTOR_TYPE_MONTY_MOLE) - EVT_CASE_OR_EQ(ACTOR_TYPE_MONTY_MOLE_BOSS) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.01)) - EVT_ADD(LVar5, 55) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, FALSE, FALSE) - EVT_END_SWITCH - EVT_SET(LVar7, 0) - EVT_LOOP(30) - EVT_ADD(LVar7, 48) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar7) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetOriginalActorType, ACTOR_SELF, LVar7) - EVT_SWITCH(LVar7) - EVT_CASE_OR_EQ(ACTOR_TYPE_MONTY_MOLE) - EVT_CASE_OR_EQ(ACTOR_TYPE_MONTY_MOLE_BOSS) - EVT_WAIT(30) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SUB(LVar5, 55) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_IF_EQ(LVar5, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_ELSE - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, FALSE, FALSE) - EVT_END_IF - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_WAIT(20) - EVT_END_SWITCH - EVT_IF_NE(LVar2, -1) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar2) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar1) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_CALL(GetPartEventFlags, ACTOR_SELF, LVar0, LVar1) - EVT_IF_NOT_FLAG(LVar1, ACTOR_EVENT_FLAG_FIREY | ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorSize, ACTOR_SELF, LVar3, LVar4) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_MULF(LVar3, EVT_FLOAT(0.4)) - EVT_MULF(LVar4, EVT_FLOAT(0.4)) - EVT_END_IF - EVT_DIVF(LVar3, EVT_FLOAT(2.0)) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar5) - EVT_IF_FLAG(LVar5, ACTOR_FLAG_UPSIDE_DOWN) - EVT_SUBF(LVar1, LVar3) - EVT_ELSE - EVT_ADDF(LVar1, LVar3) - EVT_END_IF - EVT_ADDF(LVar2, EVT_FLOAT(5.0)) - EVT_DIVF(LVar3, EVT_FLOAT(10.0)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_MULF(LVar3, EVT_FLOAT(0.4)) - EVT_IF_LT(LVar3, 1) - EVT_SETF(LVar3, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, LVar3, 10, 0) - EVT_END_IF - EVT_CASE_EQ(EVENT_BURN_DEATH) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(GetDamageSource, LVar3) + Switch(LVar3) + CaseEq(DMG_SRC_FIRE_SHELL) + Call(GetOriginalActorType, ACTOR_SELF, LVar7) + Switch(LVar7) + CaseOrEq(ACTOR_TYPE_MONTY_MOLE) + CaseOrEq(ACTOR_TYPE_MONTY_MOLE_BOSS) + EndCaseGroup + CaseDefault + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.01)) + Add(LVar5, 55) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, FALSE, FALSE) + EndSwitch + Set(LVar7, 0) + Loop(30) + Add(LVar7, 48) + Call(SetActorYaw, ACTOR_SELF, LVar7) + Wait(1) + EndLoop + Call(GetOriginalActorType, ACTOR_SELF, LVar7) + Switch(LVar7) + CaseOrEq(ACTOR_TYPE_MONTY_MOLE) + CaseOrEq(ACTOR_TYPE_MONTY_MOLE_BOSS) + Wait(30) + EndCaseGroup + CaseDefault + Sub(LVar5, 55) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + IfEq(LVar5, 0) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Else + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, FALSE, FALSE) + EndIf + EndSwitch + CaseDefault + Wait(20) + EndSwitch + IfNe(LVar2, -1) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar2) + EndIf + Wait(10) + Call(GetLastEvent, ACTOR_SELF, LVar1) + Switch(LVar1) + CaseEq(EVENT_BURN_HIT) + Call(GetPartEventFlags, ACTOR_SELF, LVar0, LVar1) + IfNotFlag(LVar1, ACTOR_EVENT_FLAG_FIREY | ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorSize, ACTOR_SELF, LVar3, LVar4) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfFlag(LVar5, STATUS_FLAG_SHRINK) + MulF(LVar3, Float(0.4)) + MulF(LVar4, Float(0.4)) + EndIf + DivF(LVar3, Float(2.0)) + Call(GetActorFlags, ACTOR_SELF, LVar5) + IfFlag(LVar5, ACTOR_FLAG_UPSIDE_DOWN) + SubF(LVar1, LVar3) + Else + AddF(LVar1, LVar3) + EndIf + AddF(LVar2, Float(5.0)) + DivF(LVar3, Float(10.0)) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfFlag(LVar5, STATUS_FLAG_SHRINK) + MulF(LVar3, Float(0.4)) + IfLt(LVar3, 1) + SetF(LVar3, Float(1.0)) + EndIf + EndIf + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, LVar3, 10, 0) + EndIf + CaseEq(EVENT_BURN_DEATH) // do nothing - EVT_END_SWITCH - EVT_RETURN - EVT_END + EndSwitch + Return + End }; diff --git a/src/battle/area/tik2/actor/blooper.c b/src/battle/area/tik2/actor/blooper.c index 21196f8c97b..8e71b84485f 100644 --- a/src/battle/area/tik2/actor/blooper.c +++ b/src/battle/area/tik2/actor/blooper.c @@ -22,79 +22,79 @@ enum N(ActorParams) { }; EvtScript N(EVS_FloatToPos) = { - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_IF_GT(LVarB, 20) - EVT_SUB(LVarB, 20) - EVT_ELSE - EVT_SET(LVarB, 0) - EVT_END_IF - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.3)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(FallToGoal, ACTOR_SELF, 8) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) - EVT_SET(LVar7, LVar4) - EVT_ADD(LVar7, LVar4) - EVT_ADD(LVar7, LVar0) - EVT_MULF(LVar7, EVT_FLOAT(0.33)) - EVT_SET(LVar8, LVar5) - EVT_ADD(LVar8, LVar5) - EVT_ADD(LVar8, LVar1) - EVT_MULF(LVar8, EVT_FLOAT(0.33)) - EVT_SET(LVar9, LVar6) - EVT_ADD(LVar9, LVar6) - EVT_ADD(LVar9, LVar2) - EVT_MULF(LVar9, EVT_FLOAT(0.33)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9) - EVT_CALL(FlyToGoal, ACTOR_SELF, LVar3, -2, EASING_CUBIC_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_SUB(LVarB, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.3)) - EVT_CALL(FallToGoal, ACTOR_SELF, 8) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) - EVT_SET(LVar7, LVar0) - EVT_ADD(LVar7, LVar0) - EVT_ADD(LVar7, LVar4) - EVT_MULF(LVar7, EVT_FLOAT(0.33)) - EVT_SET(LVar8, LVar1) - EVT_ADD(LVar8, LVar1) - EVT_ADD(LVar8, LVar5) - EVT_MULF(LVar8, EVT_FLOAT(0.33)) - EVT_SET(LVar9, LVar2) - EVT_ADD(LVar9, LVar2) - EVT_ADD(LVar9, LVar6) - EVT_MULF(LVar9, EVT_FLOAT(0.33)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9) - EVT_CALL(FlyToGoal, ACTOR_SELF, LVar3, -2, EASING_CUBIC_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_SUB(LVarB, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.3)) - EVT_CALL(FallToGoal, ACTOR_SELF, 8) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_SELF, LVar3, -2, EASING_CUBIC_OUT) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + IfGt(LVarB, 20) + Sub(LVarB, 20) + Else + Set(LVarB, 0) + EndIf + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.3)) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(FallToGoal, ACTOR_SELF, 8) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) + Set(LVar7, LVar4) + Add(LVar7, LVar4) + Add(LVar7, LVar0) + MulF(LVar7, Float(0.33)) + Set(LVar8, LVar5) + Add(LVar8, LVar5) + Add(LVar8, LVar1) + MulF(LVar8, Float(0.33)) + Set(LVar9, LVar6) + Add(LVar9, LVar6) + Add(LVar9, LVar2) + MulF(LVar9, Float(0.33)) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9) + Call(FlyToGoal, ACTOR_SELF, LVar3, -2, EASING_CUBIC_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Sub(LVarB, 20) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.3)) + Call(FallToGoal, ACTOR_SELF, 8) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) + Set(LVar7, LVar0) + Add(LVar7, LVar0) + Add(LVar7, LVar4) + MulF(LVar7, Float(0.33)) + Set(LVar8, LVar1) + Add(LVar8, LVar1) + Add(LVar8, LVar5) + MulF(LVar8, Float(0.33)) + Set(LVar9, LVar2) + Add(LVar9, LVar2) + Add(LVar9, LVar6) + MulF(LVar9, Float(0.33)) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9) + Call(FlyToGoal, ACTOR_SELF, LVar3, -2, EASING_CUBIC_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Sub(LVarB, 20) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.3)) + Call(FallToGoal, ACTOR_SELF, 8) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_SELF, LVar3, -2, EASING_CUBIC_OUT) + Return + End }; EvtScript N(EVS_FloatToHome) = { - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar3, 12) - EVT_EXEC_WAIT(N(EVS_FloatToPos)) - EVT_RETURN - EVT_END + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar3, 12) + ExecWait(N(EVS_FloatToPos)) + Return + End }; s32 N(DefaultAnims)[] = { @@ -211,385 +211,385 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.75), EVT_FLOAT(0.75), EVT_FLOAT(1.0)) - EVT_CALL(ForceHomePos, ACTOR_SELF, 90, 45, -10) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(SetActorScale, ACTOR_SELF, Float(0.75), Float(0.75), Float(1.0)) + Call(ForceHomePos, ACTOR_SELF, 90, 45, -10) + Call(HPBarToHome, ACTOR_SELF) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetIdleGoalToHome, ACTOR_SELF) - EVT_CALL(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_IF_GE(LVar4, LVar1) - EVT_GOTO(11) - EVT_END_IF - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(AscendAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_WAIT(9) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) - EVT_CALL(SetActorIdleJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, 0, EASING_SIN_OUT) - EVT_LABEL(11) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetIdleGoalToHome, ACTOR_SELF) - EVT_CALL(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_IF_GE(LVar4, LVar1) - EVT_GOTO(12) - EVT_END_IF - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(AscendAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_WAIT(9) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) - EVT_CALL(SetActorIdleJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, 0, EASING_SIN_OUT) - EVT_WAIT(3) - EVT_LABEL(12) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DescendAnims))) - EVT_CALL(SetIdleGoalToHome, ACTOR_SELF) - EVT_CALL(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, -10) - EVT_CALL(SetActorIdleJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(0.3)) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP) + Wait(1) + Goto(0) + EndIf + Call(SetIdleGoalToHome, ACTOR_SELF) + Call(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 0) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + IfGe(LVar4, LVar1) + Goto(11) + EndIf + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(AscendAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + Wait(9) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) + Call(SetActorIdleJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleFlyToGoal, ACTOR_SELF, 0, 0, EASING_SIN_OUT) + Label(11) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP) + Wait(1) + Goto(0) + EndIf + Call(SetIdleGoalToHome, ACTOR_SELF) + Call(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 10) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + IfGe(LVar4, LVar1) + Goto(12) + EndIf + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(AscendAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + Wait(9) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) + Call(SetActorIdleJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleFlyToGoal, ACTOR_SELF, 0, 0, EASING_SIN_OUT) + Wait(3) + Label(12) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP) + Wait(1) + Goto(0) + EndIf + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DescendAnims))) + Call(SetIdleGoalToHome, ACTOR_SELF) + Call(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, -10) + Call(SetActorIdleJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(0.3)) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleFlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET(LVar0, PRT_MAIN) - EVT_SET(LVar1, ANIM_Blooper_Anim05) - EVT_SET(LVar2, ANIM_Blooper_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET(LVar0, PRT_MAIN) - EVT_SET(LVar1, ANIM_Blooper_Anim05) - EVT_SET(LVar2, ANIM_Blooper_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim06) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim00) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_EXEC_WAIT(N(EVS_FloatToHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_FloatToHome)) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim00) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(EVS_Enemy_Hit) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_BURN_HIT) + Set(LVar0, PRT_MAIN) + Set(LVar1, ANIM_Blooper_Anim05) + Set(LVar2, ANIM_Blooper_Anim06) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + Set(LVar0, PRT_MAIN) + Set(LVar1, ANIM_Blooper_Anim05) + Set(LVar2, ANIM_Blooper_Anim06) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar1, ANIM_Blooper_Anim06) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(N(EVS_Death)) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim00) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(EVS_Enemy_Knockback) + ExecWait(N(EVS_FloatToHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(EVS_Enemy_Knockback) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + ExecWait(N(EVS_FloatToHome)) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim00) + ExecWait(EVS_Enemy_Recover) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Death) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_Death) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 50) - EVT_EXEC_WAIT(N(EVS_Attack_SpinDrop)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_InkBlast)) - EVT_END_IF - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_SpinDrop)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(RandInt, 100, LVar0) + IfLt(LVar0, 50) + ExecWait(N(EVS_Attack_SpinDrop)) + Else + ExecWait(N(EVS_Attack_InkBlast)) + EndIf + Else + ExecWait(N(EVS_Attack_SpinDrop)) + EndIf + Return + End }; EvtScript N(EVS_Attack_SpinDrop) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 95) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 400) - EVT_CALL(MoveBattleCamOver, 130) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 72) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 340) - EVT_CALL(MoveBattleCamOver, 130) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 100) - EVT_SET(LVar3, 15) - EVT_EXEC_WAIT(N(EVS_FloatToPos)) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_FALL) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(36) - EVT_ADD(LVar0, 30) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0D) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_IF_EQ(LVarF, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_EXEC_WAIT(N(EVS_FloatToHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_ADD(LVar0, 30) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0D) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SPIN_DROP, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_STONE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim04) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SUB(LVar1, 15) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_EXEC_WAIT(N(EVS_FloatToHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 95) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 400) + Call(MoveBattleCamOver, 130) + Else + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 72) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 340) + Call(MoveBattleCamOver, 130) + EndIf + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Set(LVar1, 100) + Set(LVar3, 15) + ExecWait(N(EVS_FloatToPos)) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_FALL) + Call(EnemyTestTarget, ACTOR_SELF, LVarF, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarF) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Thread + Set(LVar0, 0) + Loop(36) + Add(LVar0, 30) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0D) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + IfEq(LVarF, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + ExecWait(N(EVS_FloatToHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Thread + Set(LVar0, 0) + Loop(16) + Add(LVar0, 30) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0D) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SPIN_DROP, BS_FLAGS1_TRIGGER_EVENTS) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfFlag(LVar0, STATUS_FLAG_STONE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim04) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Sub(LVar1, 15) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + ExecWait(N(EVS_FloatToHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/StartRumbleWithParams.inc.c" #include "common/SpitInk.inc.c" EvtScript N(EVS_Attack_InkBlast) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 85) - EVT_ADD(LVar1, 45) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_IF_GT(LVarB, 30) - EVT_SUB(LVarB, 30) - EVT_ELSE - EVT_SET(LVarB, 0) - EVT_END_IF - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.3)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(FallToGoal, ACTOR_SELF, 8) - EVT_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_SUB(LVar0, 30) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 350) - EVT_CALL(MoveBattleCamOver, 50) - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) - EVT_SET(LVar7, LVar4) - EVT_ADD(LVar7, LVar0) - EVT_MULF(LVar7, EVT_FLOAT(0.5)) - EVT_SET(LVar8, LVar5) - EVT_ADD(LVar8, LVar1) - EVT_MULF(LVar8, EVT_FLOAT(0.5)) - EVT_SET(LVar9, LVar6) - EVT_ADD(LVar9, LVar2) - EVT_MULF(LVar9, EVT_FLOAT(0.5)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9) - EVT_CALL(FlyToGoal, ACTOR_SELF, 15, -2, EASING_CUBIC_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_SUB(LVarB, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.3)) - EVT_CALL(FallToGoal, ACTOR_SELF, 8) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_SELF, 15, -2, EASING_CUBIC_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim03) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_SUB(LVarB, 30) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.2)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(FlyToGoal, ACTOR_SELF, 16, 0, EASING_LINEAR) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 40, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -40) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_SQUIRT) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_ADD(LVar3, 1) - EVT_SUB(LVar4, 27) - EVT_SUB(LVar5, 3) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(N(SpitInk), LVar0, LVar1, LVar2, LVar3, LVar4, LVar5) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_WAIT(10) - EVT_IF_EQ(LVarF, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_EXEC_WAIT(N(EVS_FloatToHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_WAIT(10) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetDamageSource, DMG_SRC_INK_BLAST) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_INK_BLAST, BS_FLAGS1_TRIGGER_EVENTS) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_EXEC_WAIT(N(EVS_FloatToHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 85) + Add(LVar1, 45) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + IfGt(LVarB, 30) + Sub(LVarB, 30) + Else + Set(LVarB, 0) + EndIf + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.3)) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(FallToGoal, ACTOR_SELF, 8) + Thread + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Sub(LVar0, 30) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 350) + Call(MoveBattleCamOver, 50) + EndThread + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) + Set(LVar7, LVar4) + Add(LVar7, LVar0) + MulF(LVar7, Float(0.5)) + Set(LVar8, LVar5) + Add(LVar8, LVar1) + MulF(LVar8, Float(0.5)) + Set(LVar9, LVar6) + Add(LVar9, LVar2) + MulF(LVar9, Float(0.5)) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9) + Call(FlyToGoal, ACTOR_SELF, 15, -2, EASING_CUBIC_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Sub(LVarB, 20) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.3)) + Call(FallToGoal, ACTOR_SELF, 8) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_SELF, 15, -2, EASING_CUBIC_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim03) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Sub(LVarB, 30) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.2)) + Call(SetActorSpeed, ACTOR_SELF, Float(1.0)) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(FlyToGoal, ACTOR_SELF, 16, 0, EASING_LINEAR) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 40, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -40) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_SQUIRT) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Add(LVar3, 1) + Sub(LVar4, 27) + Sub(LVar5, 3) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(N(SpitInk), LVar0, LVar1, LVar2, LVar3, LVar4, LVar5) + Call(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarF) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Wait(10) + IfEq(LVarF, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + ExecWait(N(EVS_FloatToHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Wait(10) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetDamageSource, DMG_SRC_INK_BLAST) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_INK_BLAST, BS_FLAGS1_TRIGGER_EVENTS) + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + ExecWait(N(EVS_FloatToHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/area/tik2/actor/blooper_baby.c b/src/battle/area/tik2/actor/blooper_baby.c index 51e93ad8c00..03c08ce0723 100644 --- a/src/battle/area/tik2/actor/blooper_baby.c +++ b/src/battle/area/tik2/actor/blooper_baby.c @@ -27,79 +27,79 @@ enum N(ActorParams) { }; EvtScript N(EVS_FloatToPos) = { - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim00) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim01) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_IF_GT(LVarB, 20) - EVT_SUB(LVarB, 20) - EVT_ELSE - EVT_SET(LVarB, 0) - EVT_END_IF - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.3)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(FallToGoal, ACTOR_SELF, 8) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BABY_BLOOPER_MOVE) - EVT_SET(LVar7, LVar4) - EVT_ADD(LVar7, LVar4) - EVT_ADD(LVar7, LVar0) - EVT_MULF(LVar7, EVT_FLOAT(0.33)) - EVT_SET(LVar8, LVar5) - EVT_ADD(LVar8, LVar5) - EVT_ADD(LVar8, LVar1) - EVT_MULF(LVar8, EVT_FLOAT(0.33)) - EVT_SET(LVar9, LVar6) - EVT_ADD(LVar9, LVar6) - EVT_ADD(LVar9, LVar2) - EVT_MULF(LVar9, EVT_FLOAT(0.33)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9) - EVT_CALL(FlyToGoal, ACTOR_SELF, LVar3, -2, EASING_CUBIC_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim00) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim01) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_SUB(LVarB, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.3)) - EVT_CALL(FallToGoal, ACTOR_SELF, 8) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BABY_BLOOPER_MOVE) - EVT_SET(LVar7, LVar0) - EVT_ADD(LVar7, LVar0) - EVT_ADD(LVar7, LVar4) - EVT_MULF(LVar7, EVT_FLOAT(0.33)) - EVT_SET(LVar8, LVar1) - EVT_ADD(LVar8, LVar1) - EVT_ADD(LVar8, LVar5) - EVT_MULF(LVar8, EVT_FLOAT(0.33)) - EVT_SET(LVar9, LVar2) - EVT_ADD(LVar9, LVar2) - EVT_ADD(LVar9, LVar6) - EVT_MULF(LVar9, EVT_FLOAT(0.33)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9) - EVT_CALL(FlyToGoal, ACTOR_SELF, LVar3, -2, EASING_CUBIC_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim00) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim01) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_SUB(LVarB, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.3)) - EVT_CALL(FallToGoal, ACTOR_SELF, 8) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BABY_BLOOPER_MOVE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_SELF, LVar3, -2, EASING_CUBIC_OUT) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim00) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim01) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + IfGt(LVarB, 20) + Sub(LVarB, 20) + Else + Set(LVarB, 0) + EndIf + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.3)) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(FallToGoal, ACTOR_SELF, 8) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BABY_BLOOPER_MOVE) + Set(LVar7, LVar4) + Add(LVar7, LVar4) + Add(LVar7, LVar0) + MulF(LVar7, Float(0.33)) + Set(LVar8, LVar5) + Add(LVar8, LVar5) + Add(LVar8, LVar1) + MulF(LVar8, Float(0.33)) + Set(LVar9, LVar6) + Add(LVar9, LVar6) + Add(LVar9, LVar2) + MulF(LVar9, Float(0.33)) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9) + Call(FlyToGoal, ACTOR_SELF, LVar3, -2, EASING_CUBIC_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim00) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim01) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Sub(LVarB, 20) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.3)) + Call(FallToGoal, ACTOR_SELF, 8) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BABY_BLOOPER_MOVE) + Set(LVar7, LVar0) + Add(LVar7, LVar0) + Add(LVar7, LVar4) + MulF(LVar7, Float(0.33)) + Set(LVar8, LVar1) + Add(LVar8, LVar1) + Add(LVar8, LVar5) + MulF(LVar8, Float(0.33)) + Set(LVar9, LVar2) + Add(LVar9, LVar2) + Add(LVar9, LVar6) + MulF(LVar9, Float(0.33)) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9) + Call(FlyToGoal, ACTOR_SELF, LVar3, -2, EASING_CUBIC_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim00) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim01) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Sub(LVarB, 20) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.3)) + Call(FallToGoal, ACTOR_SELF, 8) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BABY_BLOOPER_MOVE) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_SELF, LVar3, -2, EASING_CUBIC_OUT) + Return + End }; EvtScript N(EVS_FloatToHome) = { - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar3, 12) - EVT_EXEC_WAIT(N(EVS_FloatToPos)) - EVT_RETURN - EVT_END + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar3, 12) + ExecWait(N(EVS_FloatToPos)) + Return + End }; s32 N(DefaultAnims)[] = { @@ -219,472 +219,472 @@ ActorBlueprint NAMESPACE = { #include "common/SpawnEnemyDrainFX.inc.c" EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BABY_BLOOPER_MOVE) - EVT_CALL(N(StartRumbleWithParams), 80, 20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim00) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim01) - EVT_CALL(GetActorPos, ACTOR_ENEMY0, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_SUB(LVar2, 10) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 20) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.3)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(0.3)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_SELF, 8, 0, EASING_LINEAR) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BABY_BLOOPER_MOVE) - EVT_CALL(N(StartRumbleWithParams), 80, 20) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HomePosX, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HomePosY, LVar1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HomePosZ, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_SELF, 12, -2, EASING_CUBIC_OUT) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BABY_BLOOPER_MOVE) + Call(N(StartRumbleWithParams), 80, 20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim00) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim01) + Call(GetActorPos, ACTOR_ENEMY0, LVar0, LVar1, LVar2) + Add(LVar1, 10) + Sub(LVar2, 10) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 20) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.3)) + Call(SetActorSpeed, ACTOR_SELF, Float(0.3)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_SELF, 8, 0, EASING_LINEAR) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BABY_BLOOPER_MOVE) + Call(N(StartRumbleWithParams), 80, 20) + Call(GetActorVar, ACTOR_SELF, AVAR_HomePosX, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_HomePosY, LVar1) + Call(GetActorVar, ACTOR_SELF, AVAR_HomePosZ, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_SELF, 12, -2, EASING_CUBIC_OUT) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(HPBarToHome, ACTOR_SELF) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_IF_GE(LVar4, LVar1) - EVT_GOTO(11) - EVT_END_IF - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(AscendAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim00) - EVT_WAIT(9) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim01) - EVT_CALL(SetActorIdleJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, 0, EASING_SIN_OUT) - EVT_LABEL(11) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 5) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_IF_GE(LVar4, LVar1) - EVT_GOTO(12) - EVT_END_IF - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(AscendAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim00) - EVT_WAIT(9) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim01) - EVT_CALL(SetActorIdleJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, 0, EASING_SIN_OUT) - EVT_WAIT(3) - EVT_LABEL(12) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DescendAnims))) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, -5) - EVT_CALL(SetActorIdleJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(0.3)) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP) + Wait(1) + Goto(0) + EndIf + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 0) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + IfGe(LVar4, LVar1) + Goto(11) + EndIf + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(AscendAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim00) + Wait(9) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim01) + Call(SetActorIdleJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleFlyToGoal, ACTOR_SELF, 0, 0, EASING_SIN_OUT) + Label(11) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP) + Wait(1) + Goto(0) + EndIf + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 5) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + IfGe(LVar4, LVar1) + Goto(12) + EndIf + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(AscendAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim00) + Wait(9) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim01) + Call(SetActorIdleJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleFlyToGoal, ACTOR_SELF, 0, 0, EASING_SIN_OUT) + Wait(3) + Label(12) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP) + Wait(1) + Goto(0) + EndIf + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DescendAnims))) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, -5) + Call(SetActorIdleJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(0.3)) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleFlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BabyBlooper_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BabyBlooper_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_SET_CONST(LVar1, ANIM_BabyBlooper_Anim03) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET(LVar0, 1) - EVT_SET(LVar1, ANIM_BabyBlooper_Anim04) - EVT_SET(LVar2, ANIM_BabyBlooper_Anim05) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET(LVar0, 1) - EVT_SET(LVar1, ANIM_BabyBlooper_Anim04) - EVT_SET(LVar2, ANIM_BabyBlooper_Anim05) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar1, ANIM_BabyBlooper_Anim05) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BabyBlooper_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BabyBlooper_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BabyBlooper_Anim03) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BabyBlooper_Anim00) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BabyBlooper_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BabyBlooper_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_EXEC_WAIT(N(EVS_FloatToHome)) - EVT_CASE_OR_EQ(EVENT_SHOCK_DEATH) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BabyBlooper_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BabyBlooper_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BabyBlooper_Anim03) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_FloatToHome)) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BabyBlooper_Anim00) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BabyBlooper_Anim02) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BabyBlooper_Anim02) + ExecWait(EVS_Enemy_Hit) + SetConst(LVar1, ANIM_BabyBlooper_Anim03) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_BURN_HIT) + Set(LVar0, 1) + Set(LVar1, ANIM_BabyBlooper_Anim04) + Set(LVar2, ANIM_BabyBlooper_Anim05) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + Set(LVar0, 1) + Set(LVar1, ANIM_BabyBlooper_Anim04) + Set(LVar2, ANIM_BabyBlooper_Anim05) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar1, ANIM_BabyBlooper_Anim05) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BabyBlooper_Anim02) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BabyBlooper_Anim02) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BabyBlooper_Anim03) + ExecWait(N(EVS_Death)) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BabyBlooper_Anim00) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_SHOCK_HIT) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BabyBlooper_Anim02) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BabyBlooper_Anim02) + ExecWait(EVS_Enemy_Knockback) + ExecWait(N(EVS_FloatToHome)) + CaseOrEq(EVENT_SHOCK_DEATH) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BabyBlooper_Anim02) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BabyBlooper_Anim02) + ExecWait(EVS_Enemy_Knockback) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BabyBlooper_Anim03) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + ExecWait(N(EVS_FloatToHome)) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BabyBlooper_Anim00) + ExecWait(EVS_Enemy_Recover) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Death) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_Death) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 100) - EVT_SET(LVar3, 12) - EVT_EXEC_WAIT(N(EVS_FloatToPos)) - EVT_THREAD - EVT_WAIT(2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) - EVT_END_THREAD - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim02) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarF, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_EXEC_WAIT(N(EVS_FloatToHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_HIT_STATIC) - EVT_CASE_OR_EQ(HIT_RESULT_IMMUNE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim02) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarF, 7) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, 0, BS_FLAGS1_NICE_HIT) - EVT_END_IF - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_EXEC_WAIT(N(EVS_FloatToHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 50) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 325) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim02) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 10) - EVT_SUB(LVar2, 5) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim08) - EVT_CALL(ShowMessageBox, BTL_MSG_ACTION_TIP_MASH_BUTTON, 32767) - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_STOP_LEECH) - EVT_CALL(action_command_stop_leech_init) - EVT_CALL(SetupMashMeter, 1, 15, 0, 0, 0, 0) - EVT_WAIT(10) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_CALL(action_command_stop_leech_start, 0, 32767, 3) - EVT_LOOP(5) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Leeching) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(10) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(DispatchEventPlayer, EVENT_66) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(2) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(DispatchEventPlayer, EVENT_66) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.9), EVT_FLOAT(1.1), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(2) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(DispatchEventPlayer, EVENT_66) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.8), EVT_FLOAT(1.2), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(3) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(DispatchEventPlayer, EVENT_66) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.4), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(2) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(DispatchEventPlayer, EVENT_66) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_CALL(SetDamageSource, DMG_SRC_LEECH) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_UNBLOCKABLE | DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, DMG_LEECH, BS_FLAGS1_NICE_HIT) - EVT_CALL(StartRumble, BTL_RUMBLE_HIT_MIN) - EVT_CALL(GetLastDamage, ACTOR_PLAYER, LVar3) - EVT_IF_NE(LVar3, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_CALL(N(SpawnDrainHealthStartFX), LVar0, LVar1, LVar2, LVar3) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_STAR_BOUNCE_A) - EVT_CALL(N(SpawnDrainHealthContinueFX), LVar0, LVar1, LVar2, LVar3) - EVT_END_THREAD - EVT_ADD(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_RECOVER, 0, LVar0, LVar1, LVar2, LVar3, 0) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar1) - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_ADD(LVar0, LVar3) - EVT_IF_GT(LVar0, LVar1) - EVT_SET(LVar0, LVar1) - EVT_END_IF - EVT_CALL(SetEnemyHP, ACTOR_SELF, LVar0) - EVT_ELSE - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(DispatchEventPlayer, EVENT_66) - EVT_CALL(func_80269470) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.4), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(3) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(DispatchEventPlayer, EVENT_66) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.8), EVT_FLOAT(1.2), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(2) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(DispatchEventPlayer, EVENT_66) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.9), EVT_FLOAT(1.1), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(2) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(DispatchEventPlayer, EVENT_66) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(GetPlayerHP, LVar1) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(DispatchEventPlayer, EVENT_66) - EVT_CALL(func_80269470) - EVT_BREAK_LOOP - EVT_END_IF - EVT_SET(LFlag0, FALSE) - EVT_LOOP(12) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(DispatchEventPlayer, EVENT_66) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DispatchEventPlayer, EVENT_66) - EVT_CALL(func_80269470) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_STONE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim02) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim00) - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SUB(LVar1, 15) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_EXEC_WAIT(N(EVS_FloatToHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 100) + Set(LVar3, 12) + ExecWait(N(EVS_FloatToPos)) + Thread + Wait(2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) + EndThread + Call(EnemyTestTarget, ACTOR_SELF, LVarF, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarF) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim02) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + IfEq(LVarF, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + ExecWait(N(EVS_FloatToHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_HIT_STATIC) + CaseOrEq(HIT_RESULT_IMMUNE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim02) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + IfEq(LVarF, 7) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, 0, BS_FLAGS1_NICE_HIT) + EndIf + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + ExecWait(N(EVS_FloatToHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 50) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 325) + Call(MoveBattleCamOver, 30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim02) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 10) + Sub(LVar2, 5) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim08) + Call(ShowMessageBox, BTL_MSG_ACTION_TIP_MASH_BUTTON, 32767) + Call(ShowActionHud, TRUE) + Call(LoadActionCommand, ACTION_COMMAND_STOP_LEECH) + Call(action_command_stop_leech_init) + Call(SetupMashMeter, 1, 15, 0, 0, 0, 0) + Wait(10) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + Call(action_command_stop_leech_start, 0, 32767, 3) + Loop(5) + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Leeching) + Set(LFlag0, FALSE) + Loop(10) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(DispatchEventPlayer, EVENT_66) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Set(LFlag0, FALSE) + Loop(2) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(DispatchEventPlayer, EVENT_66) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(0.9), Float(1.1), Float(1.0)) + Set(LFlag0, FALSE) + Loop(2) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(DispatchEventPlayer, EVENT_66) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(0.8), Float(1.2), Float(1.0)) + Set(LFlag0, FALSE) + Loop(3) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(DispatchEventPlayer, EVENT_66) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.4), Float(1.0)) + Set(LFlag0, FALSE) + Loop(2) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(DispatchEventPlayer, EVENT_66) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Call(SetDamageSource, DMG_SRC_LEECH) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_UNBLOCKABLE | DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, DMG_LEECH, BS_FLAGS1_NICE_HIT) + Call(StartRumble, BTL_RUMBLE_HIT_MIN) + Call(GetLastDamage, ACTOR_PLAYER, LVar3) + IfNe(LVar3, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 10) + Call(N(SpawnDrainHealthStartFX), LVar0, LVar1, LVar2, LVar3) + Thread + Wait(15) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_STAR_BOUNCE_A) + Call(N(SpawnDrainHealthContinueFX), LVar0, LVar1, LVar2, LVar3) + EndThread + Add(LVar0, 20) + Add(LVar1, 20) + PlayEffect(EFFECT_RECOVER, 0, LVar0, LVar1, LVar2, LVar3, 0) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar1) + Call(GetActorHP, ACTOR_SELF, LVar0) + Add(LVar0, LVar3) + IfGt(LVar0, LVar1) + Set(LVar0, LVar1) + EndIf + Call(SetEnemyHP, ACTOR_SELF, LVar0) + Else + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(DispatchEventPlayer, EVENT_66) + Call(func_80269470) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.4), Float(1.0)) + Set(LFlag0, FALSE) + Loop(3) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(DispatchEventPlayer, EVENT_66) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(0.8), Float(1.2), Float(1.0)) + Set(LFlag0, FALSE) + Loop(2) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(DispatchEventPlayer, EVENT_66) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(0.9), Float(1.1), Float(1.0)) + Set(LFlag0, FALSE) + Loop(2) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(DispatchEventPlayer, EVENT_66) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(GetPlayerHP, LVar1) + IfEq(LVar1, 0) + Call(DispatchEventPlayer, EVENT_66) + Call(func_80269470) + BreakLoop + EndIf + Set(LFlag0, FALSE) + Loop(12) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(DispatchEventPlayer, EVENT_66) + BreakLoop + EndIf + EndLoop + Call(DispatchEventPlayer, EVENT_66) + Call(func_80269470) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfFlag(LVar0, STATUS_FLAG_STONE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim02) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BabyBlooper_Anim00) + EndIf + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Sub(LVar1, 15) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + ExecWait(N(EVS_FloatToHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/area/tik2/actor/electro_blooper.c b/src/battle/area/tik2/actor/electro_blooper.c index 48c9428d520..7745c034b37 100644 --- a/src/battle/area/tik2/actor/electro_blooper.c +++ b/src/battle/area/tik2/actor/electro_blooper.c @@ -34,79 +34,79 @@ enum N(ActorParams) { }; EvtScript N(EVS_FloatToPos) = { - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_IF_GT(LVarB, 20) - EVT_SUB(LVarB, 20) - EVT_ELSE - EVT_SET(LVarB, 0) - EVT_END_IF - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.3)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(FallToGoal, ACTOR_SELF, 8) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) - EVT_SET(LVar7, LVar4) - EVT_ADD(LVar7, LVar4) - EVT_ADD(LVar7, LVar0) - EVT_MULF(LVar7, EVT_FLOAT(0.33)) - EVT_SET(LVar8, LVar5) - EVT_ADD(LVar8, LVar5) - EVT_ADD(LVar8, LVar1) - EVT_MULF(LVar8, EVT_FLOAT(0.33)) - EVT_SET(LVar9, LVar6) - EVT_ADD(LVar9, LVar6) - EVT_ADD(LVar9, LVar2) - EVT_MULF(LVar9, EVT_FLOAT(0.33)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9) - EVT_CALL(FlyToGoal, ACTOR_SELF, LVar3, -2, EASING_CUBIC_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_SUB(LVarB, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.3)) - EVT_CALL(FallToGoal, ACTOR_SELF, 8) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) - EVT_SET(LVar7, LVar0) - EVT_ADD(LVar7, LVar0) - EVT_ADD(LVar7, LVar4) - EVT_MULF(LVar7, EVT_FLOAT(0.33)) - EVT_SET(LVar8, LVar1) - EVT_ADD(LVar8, LVar1) - EVT_ADD(LVar8, LVar5) - EVT_MULF(LVar8, EVT_FLOAT(0.33)) - EVT_SET(LVar9, LVar2) - EVT_ADD(LVar9, LVar2) - EVT_ADD(LVar9, LVar6) - EVT_MULF(LVar9, EVT_FLOAT(0.33)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9) - EVT_CALL(FlyToGoal, ACTOR_SELF, LVar3, -2, EASING_CUBIC_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_SUB(LVarB, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.3)) - EVT_CALL(FallToGoal, ACTOR_SELF, 8) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_SELF, LVar3, -2, EASING_CUBIC_OUT) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + IfGt(LVarB, 20) + Sub(LVarB, 20) + Else + Set(LVarB, 0) + EndIf + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.3)) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(FallToGoal, ACTOR_SELF, 8) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) + Set(LVar7, LVar4) + Add(LVar7, LVar4) + Add(LVar7, LVar0) + MulF(LVar7, Float(0.33)) + Set(LVar8, LVar5) + Add(LVar8, LVar5) + Add(LVar8, LVar1) + MulF(LVar8, Float(0.33)) + Set(LVar9, LVar6) + Add(LVar9, LVar6) + Add(LVar9, LVar2) + MulF(LVar9, Float(0.33)) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9) + Call(FlyToGoal, ACTOR_SELF, LVar3, -2, EASING_CUBIC_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Sub(LVarB, 20) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.3)) + Call(FallToGoal, ACTOR_SELF, 8) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) + Set(LVar7, LVar0) + Add(LVar7, LVar0) + Add(LVar7, LVar4) + MulF(LVar7, Float(0.33)) + Set(LVar8, LVar1) + Add(LVar8, LVar1) + Add(LVar8, LVar5) + MulF(LVar8, Float(0.33)) + Set(LVar9, LVar2) + Add(LVar9, LVar2) + Add(LVar9, LVar6) + MulF(LVar9, Float(0.33)) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9) + Call(FlyToGoal, ACTOR_SELF, LVar3, -2, EASING_CUBIC_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Sub(LVarB, 20) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.3)) + Call(FallToGoal, ACTOR_SELF, 8) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_SELF, LVar3, -2, EASING_CUBIC_OUT) + Return + End }; EvtScript N(EVS_FloatToHome) = { - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar3, 12) - EVT_EXEC_WAIT(N(EVS_FloatToPos)) - EVT_RETURN - EVT_END + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar3, 12) + ExecWait(N(EVS_FloatToPos)) + Return + End }; s32 N(DefaultAnims)[] = { @@ -284,623 +284,623 @@ API_CALLABLE(N(UpdateStaticEffect)) { #include "common/SpitInk.inc.c" EvtScript N(EVS_Init) = { - EVT_CALL(ForceHomePos, ACTOR_SELF, 90, 45, -10) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.25), EVT_FLOAT(1.25), EVT_FLOAT(1.0)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Charged, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_StaticEffect, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldCharge, FALSE) - EVT_EXEC(N(EVS_UpdateStaticFX)) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(ForceHomePos, ACTOR_SELF, 90, 45, -10) + Call(HPBarToHome, ACTOR_SELF) + Call(SetActorScale, ACTOR_SELF, Float(1.25), Float(1.25), Float(1.0)) + Call(SetActorVar, ACTOR_SELF, AVAR_Charged, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_StaticEffect, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldCharge, FALSE) + Exec(N(EVS_UpdateStaticFX)) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_UpdateStaticFX) = { - EVT_LABEL(0) - EVT_CALL(ActorExists, ACTOR_SELF, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Charged, LVar0) - EVT_IF_NE(LVar0, 1) - EVT_GOTO(99) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_StaticEffect, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(99) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar4) - EVT_IF_NOT_FLAG(LVar4, STATUS_FLAG_SHRINK) - EVT_ADD(LVar2, 45) - EVT_SETF(LVar4, EVT_FLOAT(1.6)) - EVT_ELSE - EVT_ADD(LVar2, 18) - EVT_SETF(LVar4, EVT_FLOAT(0.64)) - EVT_END_IF - EVT_CALL(N(UpdateStaticEffect), LVar0, LVar1, LVar2, LVar3, LVar4) - EVT_LABEL(99) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(ActorExists, ACTOR_SELF, LVar0) + IfEq(LVar0, 0) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Charged, LVar0) + IfNe(LVar0, 1) + Goto(99) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_StaticEffect, LVar0) + IfEq(LVar0, 0) + Goto(99) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Call(GetStatusFlags, ACTOR_SELF, LVar4) + IfNotFlag(LVar4, STATUS_FLAG_SHRINK) + Add(LVar2, 45) + SetF(LVar4, Float(1.6)) + Else + Add(LVar2, 18) + SetF(LVar4, Float(0.64)) + EndIf + Call(N(UpdateStaticEffect), LVar0, LVar1, LVar2, LVar3, LVar4) + Label(99) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetIdleGoalToHome, ACTOR_SELF) - EVT_CALL(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_IF_GE(LVar4, LVar1) - EVT_GOTO(11) - EVT_END_IF - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(AscendAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_WAIT(9) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) - EVT_CALL(SetActorIdleJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, 0, EASING_SIN_OUT) - EVT_LABEL(11) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetIdleGoalToHome, ACTOR_SELF) - EVT_CALL(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_IF_GE(LVar4, LVar1) - EVT_GOTO(12) - EVT_END_IF - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(AscendAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_WAIT(9) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) - EVT_CALL(SetActorIdleJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, 0, EASING_SIN_OUT) - EVT_WAIT(3) - EVT_LABEL(12) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DescendAnims))) - EVT_CALL(SetIdleGoalToHome, ACTOR_SELF) - EVT_CALL(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, -10) - EVT_CALL(SetActorIdleJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(0.3)) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP) + Wait(1) + Goto(0) + EndIf + Call(SetIdleGoalToHome, ACTOR_SELF) + Call(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 0) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + IfGe(LVar4, LVar1) + Goto(11) + EndIf + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(AscendAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + Wait(9) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) + Call(SetActorIdleJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleFlyToGoal, ACTOR_SELF, 0, 0, EASING_SIN_OUT) + Label(11) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP) + Wait(1) + Goto(0) + EndIf + Call(SetIdleGoalToHome, ACTOR_SELF) + Call(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 10) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + IfGe(LVar4, LVar1) + Goto(12) + EndIf + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(AscendAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + Wait(9) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) + Call(SetActorIdleJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleFlyToGoal, ACTOR_SELF, 0, 0, EASING_SIN_OUT) + Wait(3) + Label(12) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP) + Wait(1) + Goto(0) + EndIf + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DescendAnims))) + Call(SetIdleGoalToHome, ACTOR_SELF) + Call(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, -10) + Call(SetActorIdleJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(0.3)) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleFlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_Discharge)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_Discharge)) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET(LVar0, PRT_MAIN) - EVT_SET(LVar1, ANIM_Blooper_Anim05) - EVT_SET(LVar2, ANIM_Blooper_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_Discharge)) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET(LVar0, PRT_MAIN) - EVT_SET(LVar1, ANIM_Blooper_Anim05) - EVT_SET(LVar2, ANIM_Blooper_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_Discharge)) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim06) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_EXEC_WAIT(N(EVS_Discharge)) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_EXEC_WAIT(N(EVS_Discharge)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CASE_OR_EQ(EVENT_INVUNERABLE_TAUNT) - EVT_CASE_OR_EQ(EVENT_1E) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim00) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_STAR_BEAM) - EVT_CASE_OR_EQ(EVENT_PEACH_BEAM) - EVT_EXEC_WAIT(N(EVS_Discharge)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_EXEC_WAIT(N(EVS_FloatToHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_FloatToHome)) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim00) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_Discharge)) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_Discharge)) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_BURN_HIT) + Set(LVar0, PRT_MAIN) + Set(LVar1, ANIM_Blooper_Anim05) + Set(LVar2, ANIM_Blooper_Anim06) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_Discharge)) + CaseEq(EVENT_BURN_DEATH) + Set(LVar0, PRT_MAIN) + Set(LVar1, ANIM_Blooper_Anim05) + Set(LVar2, ANIM_Blooper_Anim06) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_Discharge)) + SetConst(LVar1, ANIM_Blooper_Anim06) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + ExecWait(N(EVS_Discharge)) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + ExecWait(N(EVS_Discharge)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(N(EVS_Death)) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + CaseOrEq(EVENT_INVUNERABLE_TAUNT) + CaseOrEq(EVENT_1E) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim00) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseOrEq(EVENT_STAR_BEAM) + CaseOrEq(EVENT_PEACH_BEAM) + ExecWait(N(EVS_Discharge)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(EVS_Enemy_Knockback) + ExecWait(N(EVS_FloatToHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(EVS_Enemy_Knockback) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + ExecWait(N(EVS_FloatToHome)) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim00) + ExecWait(EVS_Enemy_Recover) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Death) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_Death) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Charged, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldCharge, FALSE) - EVT_EXEC_WAIT(N(EVS_Attack_ChargedDrop)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ShouldCharge, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_Move_ChargeUp)) - EVT_RETURN - EVT_ELSE - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldCharge, TRUE) - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 50) - EVT_EXEC_WAIT(N(EVS_Attack_SpinDrop)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_InkBlast)) - EVT_END_IF - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_SpinDrop)) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_Charged, LVar0) + IfEq(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldCharge, FALSE) + ExecWait(N(EVS_Attack_ChargedDrop)) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_ShouldCharge, LVar0) + IfEq(LVar0, 1) + ExecWait(N(EVS_Move_ChargeUp)) + Return + Else + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldCharge, TRUE) + Call(RandInt, 100, LVar0) + IfLt(LVar0, 50) + ExecWait(N(EVS_Attack_SpinDrop)) + Else + ExecWait(N(EVS_Attack_InkBlast)) + EndIf + Else + ExecWait(N(EVS_Attack_SpinDrop)) + EndIf + EndIf + Return + End }; EvtScript N(EVS_Move_ChargeUp) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 65) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 320) - EVT_CALL(MoveBattleCamOver, 50) - EVT_WAIT(20) - EVT_CALL(N(FadeBackgroundDarken)) - EVT_CALL(N(StartRumbleWithParams), 70, 80) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 40, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim09) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0A) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0B) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_Charge)) - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(N(FadeBackgroundLighten)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 65) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 320) + Call(MoveBattleCamOver, 50) + Wait(20) + Call(N(FadeBackgroundDarken)) + Call(N(StartRumbleWithParams), 70, 80) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 40, Float(0.3)) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim09) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0A) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0B) + Wait(10) + ExecWait(N(EVS_Charge)) + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Call(N(FadeBackgroundLighten)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + Return + End }; EvtScript N(EVS_Attack_SpinDrop) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 112) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 500) - EVT_CALL(MoveBattleCamOver, 130) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 82) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 385) - EVT_CALL(MoveBattleCamOver, 130) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 100) - EVT_SET(LVar3, 15) - EVT_EXEC_WAIT(N(EVS_FloatToPos)) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_FALL) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(36) - EVT_ADD(LVar0, 30) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0D) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_IF_EQ(LVarF, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_EXEC_WAIT(N(EVS_FloatToHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_ADD(LVar0, 30) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0D) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SPIN_DROP, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_STONE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim04) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SUB(LVar1, 15) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_EXEC_WAIT(N(EVS_FloatToHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 112) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 500) + Call(MoveBattleCamOver, 130) + Else + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 82) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 385) + Call(MoveBattleCamOver, 130) + EndIf + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Set(LVar1, 100) + Set(LVar3, 15) + ExecWait(N(EVS_FloatToPos)) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_FALL) + Call(EnemyTestTarget, ACTOR_SELF, LVarF, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarF) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Thread + Set(LVar0, 0) + Loop(36) + Add(LVar0, 30) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0D) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + IfEq(LVarF, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + ExecWait(N(EVS_FloatToHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Thread + Set(LVar0, 0) + Loop(16) + Add(LVar0, 30) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0D) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SPIN_DROP, BS_FLAGS1_TRIGGER_EVENTS) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfFlag(LVar0, STATUS_FLAG_STONE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim04) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Sub(LVar1, 15) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + ExecWait(N(EVS_FloatToHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_ChargedDrop) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 112) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 500) - EVT_CALL(MoveBattleCamOver, 130) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 82) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 385) - EVT_CALL(MoveBattleCamOver, 130) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 100) - EVT_SET(LVar3, 15) - EVT_EXEC_WAIT(N(EVS_FloatToPos)) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_SHOCK, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(36) - EVT_ADD(LVar0, 30) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0D) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_IF_EQ(LVarF, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_EXEC_WAIT(N(EVS_FloatToHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_ADD(LVar0, 30) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0D) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_SHOCK, SUPPRESS_EVENT_SHOCK_CONTACT, 0, DMG_CHARGED_DROP, BS_FLAGS1_TRIGGER_EVENTS) - EVT_IF_NE(LVarF, HIT_RESULT_HIT_STATIC) - EVT_EXEC_WAIT(N(EVS_Discharge)) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_STONE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim04) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SUB(LVar1, 15) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_EXEC_WAIT(N(EVS_FloatToHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 112) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 500) + Call(MoveBattleCamOver, 130) + Else + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 82) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 385) + Call(MoveBattleCamOver, 130) + EndIf + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Set(LVar1, 100) + Set(LVar3, 15) + ExecWait(N(EVS_FloatToPos)) + Call(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_SHOCK, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarF) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Thread + Set(LVar0, 0) + Loop(36) + Add(LVar0, 30) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0D) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + IfEq(LVarF, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + ExecWait(N(EVS_FloatToHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Thread + Set(LVar0, 0) + Loop(16) + Add(LVar0, 30) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0D) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_SHOCK, SUPPRESS_EVENT_SHOCK_CONTACT, 0, DMG_CHARGED_DROP, BS_FLAGS1_TRIGGER_EVENTS) + IfNe(LVarF, HIT_RESULT_HIT_STATIC) + ExecWait(N(EVS_Discharge)) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfFlag(LVar0, STATUS_FLAG_STONE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim04) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Sub(LVar1, 15) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + ExecWait(N(EVS_FloatToHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_InkBlast) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 85) - EVT_ADD(LVar1, 45) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_IF_GT(LVarB, 30) - EVT_SUB(LVarB, 30) - EVT_ELSE - EVT_SET(LVarB, 0) - EVT_END_IF - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.3)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(FallToGoal, ACTOR_SELF, 8) - EVT_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_SUB(LVar0, 30) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 350) - EVT_CALL(MoveBattleCamOver, 80) - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) - EVT_SET(LVar7, LVar4) - EVT_ADD(LVar7, LVar0) - EVT_MULF(LVar7, EVT_FLOAT(0.5)) - EVT_SET(LVar8, LVar5) - EVT_ADD(LVar8, LVar1) - EVT_MULF(LVar8, EVT_FLOAT(0.5)) - EVT_SET(LVar9, LVar6) - EVT_ADD(LVar9, LVar2) - EVT_MULF(LVar9, EVT_FLOAT(0.5)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9) - EVT_CALL(FlyToGoal, ACTOR_SELF, 15, -2, EASING_CUBIC_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_SUB(LVarB, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.3)) - EVT_CALL(FallToGoal, ACTOR_SELF, 8) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_SELF, 15, -2, EASING_CUBIC_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim03) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_SUB(LVarB, 30) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.2)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(FlyToGoal, ACTOR_SELF, 16, 0, EASING_LINEAR) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 40, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -40) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_SQUIRT) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_ADD(LVar3, 1) - EVT_SUB(LVar4, 28) - EVT_SUB(LVar5, 3) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(N(SpitInk), LVar0, LVar1, LVar2, LVar3, LVar4, LVar5) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_WAIT(10) - EVT_IF_EQ(LVarF, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_EXEC_WAIT(N(EVS_FloatToHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_WAIT(10) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetDamageSource, DMG_SRC_INK_BLAST) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_INK_BLAST, BS_FLAGS1_TRIGGER_EVENTS) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_EXEC_WAIT(N(EVS_FloatToHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 85) + Add(LVar1, 45) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + IfGt(LVarB, 30) + Sub(LVarB, 30) + Else + Set(LVarB, 0) + EndIf + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.3)) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(FallToGoal, ACTOR_SELF, 8) + Thread + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Sub(LVar0, 30) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 350) + Call(MoveBattleCamOver, 80) + EndThread + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) + Set(LVar7, LVar4) + Add(LVar7, LVar0) + MulF(LVar7, Float(0.5)) + Set(LVar8, LVar5) + Add(LVar8, LVar1) + MulF(LVar8, Float(0.5)) + Set(LVar9, LVar6) + Add(LVar9, LVar2) + MulF(LVar9, Float(0.5)) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9) + Call(FlyToGoal, ACTOR_SELF, 15, -2, EASING_CUBIC_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Sub(LVarB, 20) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.3)) + Call(FallToGoal, ACTOR_SELF, 8) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_SELF, 15, -2, EASING_CUBIC_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim03) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Sub(LVarB, 30) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.2)) + Call(SetActorSpeed, ACTOR_SELF, Float(1.0)) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(FlyToGoal, ACTOR_SELF, 16, 0, EASING_LINEAR) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 40, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -40) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_SQUIRT) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Add(LVar3, 1) + Sub(LVar4, 28) + Sub(LVar5, 3) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(N(SpitInk), LVar0, LVar1, LVar2, LVar3, LVar4, LVar5) + Call(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarF) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Wait(10) + IfEq(LVarF, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + ExecWait(N(EVS_FloatToHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Wait(10) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetDamageSource, DMG_SRC_INK_BLAST) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_INK_BLAST, BS_FLAGS1_TRIGGER_EVENTS) + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + ExecWait(N(EVS_FloatToHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Charge) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Charged, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Charged, TRUE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 45) - EVT_SETF(LVar3, EVT_FLOAT(1.6)) - EVT_ELSE - EVT_ADD(LVar1, 18) - EVT_SETF(LVar3, EVT_FLOAT(0.64)) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, LVar3, -1, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_StaticEffect, LVarF) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CHARGE_LIGHTNING) - EVT_CALL(SetPartEventFlags, ACTOR_SELF, PRT_TARGET, ACTOR_EVENT_FLAG_ATTACK_CHARGED | ACTOR_EVENT_FLAG_ELECTRIFIED) - EVT_CALL(EnableActorPaletteEffects, ACTOR_SELF, PRT_MAIN, TRUE) - EVT_CALL(SetActorPaletteEffect, ACTOR_SELF, PRT_MAIN, ACTOR_PAL_ADJUST_STATIC) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(ChargedStatusTable))) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_Charged, LVar0) + IfNe(LVar0, 0) + Return + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_Charged, TRUE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar1, 45) + SetF(LVar3, Float(1.6)) + Else + Add(LVar1, 18) + SetF(LVar3, Float(0.64)) + EndIf + PlayEffect(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, LVar3, -1, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_StaticEffect, LVarF) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CHARGE_LIGHTNING) + Call(SetPartEventFlags, ACTOR_SELF, PRT_TARGET, ACTOR_EVENT_FLAG_ATTACK_CHARGED | ACTOR_EVENT_FLAG_ELECTRIFIED) + Call(EnableActorPaletteEffects, ACTOR_SELF, PRT_MAIN, TRUE) + Call(SetActorPaletteEffect, ACTOR_SELF, PRT_MAIN, ACTOR_PAL_ADJUST_STATIC) + Call(SetStatusTable, ACTOR_SELF, Ref(N(ChargedStatusTable))) + Return + End }; EvtScript N(EVS_Discharge) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Charged, LVar0) - EVT_IF_NE(LVar0, 1) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldCharge, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Charged, FALSE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_StaticEffect, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(RemoveEffect, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_StaticEffect, 0) - EVT_END_IF - EVT_CALL(SetPartEventFlags, ACTOR_SELF, PRT_TARGET, 0) - EVT_CALL(EnableActorPaletteEffects, ACTOR_SELF, PRT_MAIN, FALSE) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(StatusTable))) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_Charged, LVar0) + IfNe(LVar0, 1) + Return + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldCharge, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_Charged, FALSE) + Call(GetActorVar, ACTOR_SELF, AVAR_StaticEffect, LVar0) + IfNe(LVar0, 0) + Call(RemoveEffect, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_StaticEffect, 0) + EndIf + Call(SetPartEventFlags, ACTOR_SELF, PRT_TARGET, 0) + Call(EnableActorPaletteEffects, ACTOR_SELF, PRT_MAIN, FALSE) + Call(SetStatusTable, ACTOR_SELF, Ref(N(StatusTable))) + Return + End }; diff --git a/src/battle/area/tik2/actor/super_blooper.c b/src/battle/area/tik2/actor/super_blooper.c index 14575f0e588..c973ce09aab 100644 --- a/src/battle/area/tik2/actor/super_blooper.c +++ b/src/battle/area/tik2/actor/super_blooper.c @@ -41,79 +41,79 @@ enum N(ActorParams) { }; EvtScript N(EVS_FloatToPos) = { - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_IF_GT(LVarB, 20) - EVT_SUB(LVarB, 20) - EVT_ELSE - EVT_SET(LVarB, 0) - EVT_END_IF - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.3)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(FallToGoal, ACTOR_SELF, 8) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) - EVT_SET(LVar7, LVar4) - EVT_ADD(LVar7, LVar4) - EVT_ADD(LVar7, LVar0) - EVT_MULF(LVar7, EVT_FLOAT(0.33)) - EVT_SET(LVar8, LVar5) - EVT_ADD(LVar8, LVar5) - EVT_ADD(LVar8, LVar1) - EVT_MULF(LVar8, EVT_FLOAT(0.33)) - EVT_SET(LVar9, LVar6) - EVT_ADD(LVar9, LVar6) - EVT_ADD(LVar9, LVar2) - EVT_MULF(LVar9, EVT_FLOAT(0.33)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9) - EVT_CALL(FlyToGoal, ACTOR_SELF, LVar3, -2, EASING_CUBIC_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_SUB(LVarB, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.3)) - EVT_CALL(FallToGoal, ACTOR_SELF, 8) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) - EVT_SET(LVar7, LVar0) - EVT_ADD(LVar7, LVar0) - EVT_ADD(LVar7, LVar4) - EVT_MULF(LVar7, EVT_FLOAT(0.33)) - EVT_SET(LVar8, LVar1) - EVT_ADD(LVar8, LVar1) - EVT_ADD(LVar8, LVar5) - EVT_MULF(LVar8, EVT_FLOAT(0.33)) - EVT_SET(LVar9, LVar2) - EVT_ADD(LVar9, LVar2) - EVT_ADD(LVar9, LVar6) - EVT_MULF(LVar9, EVT_FLOAT(0.33)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9) - EVT_CALL(FlyToGoal, ACTOR_SELF, LVar3, -2, EASING_CUBIC_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_SUB(LVarB, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.3)) - EVT_CALL(FallToGoal, ACTOR_SELF, 8) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_SELF, LVar3, -2, EASING_CUBIC_OUT) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + IfGt(LVarB, 20) + Sub(LVarB, 20) + Else + Set(LVarB, 0) + EndIf + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.3)) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(FallToGoal, ACTOR_SELF, 8) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) + Set(LVar7, LVar4) + Add(LVar7, LVar4) + Add(LVar7, LVar0) + MulF(LVar7, Float(0.33)) + Set(LVar8, LVar5) + Add(LVar8, LVar5) + Add(LVar8, LVar1) + MulF(LVar8, Float(0.33)) + Set(LVar9, LVar6) + Add(LVar9, LVar6) + Add(LVar9, LVar2) + MulF(LVar9, Float(0.33)) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9) + Call(FlyToGoal, ACTOR_SELF, LVar3, -2, EASING_CUBIC_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Sub(LVarB, 20) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.3)) + Call(FallToGoal, ACTOR_SELF, 8) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) + Set(LVar7, LVar0) + Add(LVar7, LVar0) + Add(LVar7, LVar4) + MulF(LVar7, Float(0.33)) + Set(LVar8, LVar1) + Add(LVar8, LVar1) + Add(LVar8, LVar5) + MulF(LVar8, Float(0.33)) + Set(LVar9, LVar2) + Add(LVar9, LVar2) + Add(LVar9, LVar6) + MulF(LVar9, Float(0.33)) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9) + Call(FlyToGoal, ACTOR_SELF, LVar3, -2, EASING_CUBIC_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Sub(LVarB, 20) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.3)) + Call(FallToGoal, ACTOR_SELF, 8) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_SELF, LVar3, -2, EASING_CUBIC_OUT) + Return + End }; EvtScript N(EVS_FloatToHome) = { - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar3, 12) - EVT_EXEC_WAIT(N(EVS_FloatToPos)) - EVT_RETURN - EVT_END + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar3, 12) + ExecWait(N(EVS_FloatToPos)) + Return + End }; s32 N(DefaultAnims)[] = { @@ -275,635 +275,635 @@ API_CALLABLE(N(unused_func)) { #include "common/SpitInk.inc.c" EvtScript N(EVS_Init) = { - EVT_CALL(ForceHomePos, ACTOR_SELF, 90, 45, -10) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(2.0), EVT_FLOAT(2.0), EVT_FLOAT(2.0)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Enraged, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Basic) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(ForceHomePos, ACTOR_SELF, 90, 45, -10) + Call(HPBarToHome, ACTOR_SELF) + Call(SetActorScale, ACTOR_SELF, Float(2.0), Float(2.0), Float(2.0)) + Call(SetActorVar, ACTOR_SELF, AVAR_Enraged, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Basic) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetIdleGoalToHome, ACTOR_SELF) - EVT_CALL(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_IF_GE(LVar4, LVar1) - EVT_GOTO(11) - EVT_END_IF - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(AscendAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_WAIT(9) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) - EVT_CALL(SetActorIdleJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, 0, EASING_SIN_OUT) - EVT_LABEL(11) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetIdleGoalToHome, ACTOR_SELF) - EVT_CALL(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_IF_GE(LVar4, LVar1) - EVT_GOTO(12) - EVT_END_IF - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(AscendAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_WAIT(9) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) - EVT_CALL(SetActorIdleJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, 0, EASING_SIN_OUT) - EVT_WAIT(3) - EVT_LABEL(12) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DescendAnims))) - EVT_CALL(SetIdleGoalToHome, ACTOR_SELF) - EVT_CALL(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, -10) - EVT_CALL(SetActorIdleJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(0.3)) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP) + Wait(1) + Goto(0) + EndIf + Call(SetIdleGoalToHome, ACTOR_SELF) + Call(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 0) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + IfGe(LVar4, LVar1) + Goto(11) + EndIf + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(AscendAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + Wait(9) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) + Call(SetActorIdleJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleFlyToGoal, ACTOR_SELF, 0, 0, EASING_SIN_OUT) + Label(11) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP) + Wait(1) + Goto(0) + EndIf + Call(SetIdleGoalToHome, ACTOR_SELF) + Call(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 10) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + IfGe(LVar4, LVar1) + Goto(12) + EndIf + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(AscendAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + Wait(9) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) + Call(SetActorIdleJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleFlyToGoal, ACTOR_SELF, 0, 0, EASING_SIN_OUT) + Wait(3) + Label(12) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE | STATUS_FLAG_STOP) + Wait(1) + Goto(0) + EndIf + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DescendAnims))) + Call(SetIdleGoalToHome, ACTOR_SELF) + Call(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, -10) + Call(SetActorIdleJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(0.3)) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleFlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET(LVar0, PRT_MAIN) - EVT_SET(LVar1, ANIM_Blooper_Anim05) - EVT_SET(LVar2, ANIM_Blooper_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET(LVar0, PRT_MAIN) - EVT_SET(LVar1, ANIM_Blooper_Anim05) - EVT_SET(LVar2, ANIM_Blooper_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim06) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CASE_OR_EQ(EVENT_INVUNERABLE_TAUNT) - EVT_CASE_OR_EQ(EVENT_1E) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim00) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_STAR_BEAM) - EVT_CASE_OR_EQ(EVENT_PEACH_BEAM) - EVT_EXEC_WAIT(N(EVS_LoseRage)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_EXEC_WAIT(N(EVS_LoseRage)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_EXEC_WAIT(N(EVS_FloatToHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_EXEC_WAIT(N(EVS_LoseRage)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim04) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_FloatToHome)) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Blooper_Anim00) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(EVS_Enemy_Hit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_BURN_HIT) + Set(LVar0, PRT_MAIN) + Set(LVar1, ANIM_Blooper_Anim05) + Set(LVar2, ANIM_Blooper_Anim06) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + Set(LVar0, PRT_MAIN) + Set(LVar1, ANIM_Blooper_Anim05) + Set(LVar2, ANIM_Blooper_Anim06) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim06) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(N(EVS_Death)) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + CaseOrEq(EVENT_INVUNERABLE_TAUNT) + CaseOrEq(EVENT_1E) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim00) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseOrEq(EVENT_STAR_BEAM) + CaseOrEq(EVENT_PEACH_BEAM) + ExecWait(N(EVS_LoseRage)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_SHOCK_HIT) + ExecWait(N(EVS_LoseRage)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(EVS_Enemy_Knockback) + ExecWait(N(EVS_FloatToHome)) + CaseEq(EVENT_SHOCK_DEATH) + ExecWait(N(EVS_LoseRage)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(EVS_Enemy_Knockback) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim04) + ExecWait(N(EVS_Death)) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + ExecWait(N(EVS_FloatToHome)) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Blooper_Anim00) + ExecWait(EVS_Enemy_Recover) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Death) = { - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END + ExecWait(EVS_Enemy_Death) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Move_RageDrop) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Enraged, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Basic) - EVT_END_IF - EVT_CASE_EQ(AVAL_Move_MakeBabies) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Enrage) - EVT_ELSE - EVT_CALL(ActorExists, ACTOR_ENEMY1, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(ActorExists, ACTOR_ENEMY2, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Enrage) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Move_MakeBabies) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Enrage) - EVT_EXEC_WAIT(N(EVS_Move_MakeBabies)) - EVT_RETURN - EVT_CASE_EQ(AVAL_Move_Enrage) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_RageDrop) - EVT_EXEC_WAIT(N(EVS_Move_Enrage)) - EVT_RETURN - EVT_CASE_EQ(AVAL_Move_RageDrop) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Basic) - EVT_EXEC_WAIT(N(EVS_Attack_RageDrop)) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_MakeBabies) - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 50) - EVT_EXEC_WAIT(N(EVS_Attack_SpinDrop)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_InkBlast)) - EVT_END_IF - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_SpinDrop)) - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) + Switch(LVar0) + CaseEq(AVAL_Move_RageDrop) + Call(GetActorVar, ACTOR_SELF, AVAR_Enraged, LVar0) + IfEq(LVar0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Basic) + EndIf + CaseEq(AVAL_Move_MakeBabies) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Enrage) + Else + Call(ActorExists, ACTOR_ENEMY1, LVar0) + IfNe(LVar0, 0) + Call(ActorExists, ACTOR_ENEMY2, LVar0) + IfNe(LVar0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Enrage) + EndIf + EndIf + EndIf + CaseDefault + EndSwitch + Call(GetActorVar, ACTOR_SELF, AVAR_NextMove, LVar0) + Switch(LVar0) + CaseEq(AVAL_Move_MakeBabies) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Enrage) + ExecWait(N(EVS_Move_MakeBabies)) + Return + CaseEq(AVAL_Move_Enrage) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_RageDrop) + ExecWait(N(EVS_Move_Enrage)) + Return + CaseEq(AVAL_Move_RageDrop) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_Basic) + ExecWait(N(EVS_Attack_RageDrop)) + Return + CaseDefault + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetActorVar, ACTOR_SELF, AVAR_NextMove, AVAL_Move_MakeBabies) + Call(RandInt, 100, LVar0) + IfLt(LVar0, 50) + ExecWait(N(EVS_Attack_SpinDrop)) + Else + ExecWait(N(EVS_Attack_InkBlast)) + EndIf + Else + ExecWait(N(EVS_Attack_SpinDrop)) + EndIf + EndSwitch + Return + End }; EvtScript N(EVS_Attack_SpinDrop) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 100) - EVT_SET(LVar3, 15) - EVT_EXEC_WAIT(N(EVS_FloatToPos)) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_FALL) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(36) - EVT_ADD(LVar0, 30) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0D) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarF, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_EXEC_WAIT(N(EVS_FloatToHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_ADD(LVar0, 30) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0D) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SPIN_DROP, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_STONE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim04) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SUB(LVar1, 15) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_EXEC_WAIT(N(EVS_FloatToHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Set(LVar1, 100) + Set(LVar3, 15) + ExecWait(N(EVS_FloatToPos)) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_FALL) + Call(EnemyTestTarget, ACTOR_SELF, LVarF, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarF) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Thread + Set(LVar0, 0) + Loop(36) + Add(LVar0, 30) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0D) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + IfEq(LVarF, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + ExecWait(N(EVS_FloatToHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Thread + Set(LVar0, 0) + Loop(16) + Add(LVar0, 30) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0D) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SPIN_DROP, BS_FLAGS1_TRIGGER_EVENTS) + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfFlag(LVar0, STATUS_FLAG_STONE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim04) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Sub(LVar1, 15) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + ExecWait(N(EVS_FloatToHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_InkBlast) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 85) - EVT_ADD(LVar1, 45) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_IF_GT(LVarB, 30) - EVT_SUB(LVarB, 30) - EVT_ELSE - EVT_SET(LVarB, 0) - EVT_END_IF - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.3)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(FallToGoal, ACTOR_SELF, 8) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) - EVT_SET(LVar7, LVar4) - EVT_ADD(LVar7, LVar0) - EVT_MULF(LVar7, EVT_FLOAT(0.5)) - EVT_SET(LVar8, LVar5) - EVT_ADD(LVar8, LVar1) - EVT_MULF(LVar8, EVT_FLOAT(0.5)) - EVT_SET(LVar9, LVar6) - EVT_ADD(LVar9, LVar2) - EVT_MULF(LVar9, EVT_FLOAT(0.5)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9) - EVT_CALL(FlyToGoal, ACTOR_SELF, 15, -2, EASING_CUBIC_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_SUB(LVarB, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.3)) - EVT_CALL(FallToGoal, ACTOR_SELF, 8) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_SELF, 15, -2, EASING_CUBIC_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim03) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_SUB(LVarB, 30) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.2)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(FlyToGoal, ACTOR_SELF, 16, 0, EASING_LINEAR) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 40, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -40) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_SQUIRT) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_ADD(LVar3, 1) - EVT_SUB(LVar4, 30) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(N(SpitInk), LVar0, LVar1, LVar2, LVar3, LVar4, LVar5) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_WAIT(10) - EVT_IF_EQ(LVarF, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_EXEC_WAIT(N(EVS_FloatToHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_WAIT(10) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetDamageSource, DMG_SRC_INK_BLAST) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_INK_BLAST, BS_FLAGS1_TRIGGER_EVENTS) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_EXEC_WAIT(N(EVS_FloatToHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 85) + Add(LVar1, 45) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + IfGt(LVarB, 30) + Sub(LVarB, 30) + Else + Set(LVarB, 0) + EndIf + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.3)) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(FallToGoal, ACTOR_SELF, 8) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) + Set(LVar7, LVar4) + Add(LVar7, LVar0) + MulF(LVar7, Float(0.5)) + Set(LVar8, LVar5) + Add(LVar8, LVar1) + MulF(LVar8, Float(0.5)) + Set(LVar9, LVar6) + Add(LVar9, LVar2) + MulF(LVar9, Float(0.5)) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9) + Call(FlyToGoal, ACTOR_SELF, 15, -2, EASING_CUBIC_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Sub(LVarB, 20) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.3)) + Call(FallToGoal, ACTOR_SELF, 8) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_MOVE) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_SELF, 15, -2, EASING_CUBIC_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim03) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Sub(LVarB, 30) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.2)) + Call(SetActorSpeed, ACTOR_SELF, Float(1.0)) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(FlyToGoal, ACTOR_SELF, 16, 0, EASING_LINEAR) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 40, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -40) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_SQUIRT) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Add(LVar3, 1) + Sub(LVar4, 30) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(N(SpitInk), LVar0, LVar1, LVar2, LVar3, LVar4, LVar5) + Call(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarF) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Wait(10) + IfEq(LVarF, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + ExecWait(N(EVS_FloatToHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Wait(10) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetDamageSource, DMG_SRC_INK_BLAST) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_INK_BLAST, BS_FLAGS1_TRIGGER_EVENTS) + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + ExecWait(N(EVS_FloatToHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Move_MakeBabies) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_07) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamOffsetZ, 50) - EVT_CALL(SetBattleCamZoom, 330) - EVT_CALL(MoveBattleCamOver, 40) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BIG_POWER_UP) - EVT_CALL(N(FadeBackgroundDarken)) - EVT_CALL(N(StartRumbleWithParams), 50, 20) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_07) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamOffsetZ, 65) - EVT_CALL(SetBattleCamZoom, 240) - EVT_CALL(MoveBattleCamOver, 15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim09) - EVT_WAIT(15) - EVT_CALL(N(StartRumbleWithParams), 100, 20) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(0.4)) - EVT_END_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_07) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamOffsetZ, 80) - EVT_CALL(SetBattleCamZoom, 150) - EVT_CALL(MoveBattleCamOver, 15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0A) - EVT_WAIT(15) - EVT_CALL(N(StartRumbleWithParams), 150, 20) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(0.5)) - EVT_END_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_07) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamOffsetZ, 95) - EVT_CALL(SetBattleCamZoom, 60) - EVT_CALL(MoveBattleCamOver, 15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0B) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim03) - EVT_WAIT(10) - EVT_CALL(ActorExists, ACTOR_ENEMY1, LVar1) - EVT_IF_FALSE(LVar1) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LIGHT_THROW) - EVT_CALL(SummonEnemy, EVT_PTR(N(BabyFormation1)), FALSE) - EVT_END_IF - EVT_CALL(ActorExists, ACTOR_ENEMY2, LVar1) - EVT_IF_FALSE(LVar1) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LIGHT_THROW) - EVT_CALL(SummonEnemy, EVT_PTR(N(BabyFormation2)), FALSE) - EVT_END_IF - EVT_WAIT(2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) - EVT_CALL(N(FadeBackgroundLighten)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(UseBattleCamPreset, BTL_CAM_PRESET_07) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamOffsetZ, 50) + Call(SetBattleCamZoom, 330) + Call(MoveBattleCamOver, 40) + Wait(20) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BIG_POWER_UP) + Call(N(FadeBackgroundDarken)) + Call(N(StartRumbleWithParams), 50, 20) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(0.3)) + EndThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_07) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamOffsetZ, 65) + Call(SetBattleCamZoom, 240) + Call(MoveBattleCamOver, 15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim09) + Wait(15) + Call(N(StartRumbleWithParams), 100, 20) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(0.4)) + EndThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_07) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamOffsetZ, 80) + Call(SetBattleCamZoom, 150) + Call(MoveBattleCamOver, 15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0A) + Wait(15) + Call(N(StartRumbleWithParams), 150, 20) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(0.5)) + EndThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_07) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamOffsetZ, 95) + Call(SetBattleCamZoom, 60) + Call(MoveBattleCamOver, 15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0B) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim03) + Wait(10) + Call(ActorExists, ACTOR_ENEMY1, LVar1) + IfFalse(LVar1) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LIGHT_THROW) + Call(SummonEnemy, Ref(N(BabyFormation1)), FALSE) + EndIf + Call(ActorExists, ACTOR_ENEMY2, LVar1) + IfFalse(LVar1) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LIGHT_THROW) + Call(SummonEnemy, Ref(N(BabyFormation2)), FALSE) + EndIf + Wait(2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0C) + Call(N(FadeBackgroundLighten)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + Return + End }; EvtScript N(EVS_Move_Enrage) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_07) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamOffsetZ, 28) - EVT_CALL(SetBattleCamZoom, 297) - EVT_CALL(MoveBattleCamOver, 50) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BIG_POWER_UP) - EVT_CALL(N(FadeBackgroundDarken)) - EVT_CALL(N(StartRumbleWithParams), 70, 80) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 40, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim09) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0A) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0B) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_Enrage)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(N(FadeBackgroundLighten)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(UseBattleCamPreset, BTL_CAM_PRESET_07) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamOffsetZ, 28) + Call(SetBattleCamZoom, 297) + Call(MoveBattleCamOver, 50) + Wait(20) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BIG_POWER_UP) + Call(N(FadeBackgroundDarken)) + Call(N(StartRumbleWithParams), 70, 80) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 40, Float(0.3)) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim09) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0A) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0B) + Wait(10) + ExecWait(N(EVS_Enrage)) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Call(N(FadeBackgroundLighten)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + Return + End }; EvtScript N(EVS_Attack_RageDrop) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 100) - EVT_SET(LVar3, 15) - EVT_EXEC_WAIT(N(EVS_FloatToPos)) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_FALL) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(36) - EVT_ADD(LVar0, 30) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0D) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_EXEC_WAIT(N(EVS_LoseRage)) - EVT_IF_EQ(LVarF, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_EXEC_WAIT(N(EVS_FloatToHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_ADD(LVar0, 30) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0D) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVarE) - EVT_IF_FLAG(LVarE, STATUS_FLAG_STONE) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, DMG_RAGE_DROP, BS_FLAGS1_NICE_HIT) - EVT_CALL(GetPlayerHP, LVarE) - EVT_IF_EQ(LVarE, 0) - EVT_GOTO(1) - EVT_END_IF - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(20) - EVT_ADD(LVar0, 36) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.4)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_LABEL(0) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, DMG_RAGE_DROP, BS_FLAGS1_TRIGGER_EVENTS) - EVT_LABEL(1) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_STONE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim04) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SUB(LVar1, 15) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_EXEC_WAIT(N(EVS_LoseRage)) - EVT_EXEC_WAIT(N(EVS_FloatToHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Set(LVar1, 100) + Set(LVar3, 15) + ExecWait(N(EVS_FloatToPos)) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BLOOPER_FALL) + Call(EnemyTestTarget, ACTOR_SELF, LVarF, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarF) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Thread + Set(LVar0, 0) + Loop(36) + Add(LVar0, 30) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0D) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + ExecWait(N(EVS_LoseRage)) + IfEq(LVarF, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + ExecWait(N(EVS_FloatToHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Thread + Set(LVar0, 0) + Loop(16) + Add(LVar0, 30) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim0D) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(GetStatusFlags, ACTOR_PLAYER, LVarE) + IfFlag(LVarE, STATUS_FLAG_STONE) + Goto(0) + EndIf + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, DMG_RAGE_DROP, BS_FLAGS1_NICE_HIT) + Call(GetPlayerHP, LVarE) + IfEq(LVarE, 0) + Goto(1) + EndIf + Thread + Set(LVar0, 0) + Loop(20) + Add(LVar0, 36) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.4)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Label(0) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 0, DMG_RAGE_DROP, BS_FLAGS1_TRIGGER_EVENTS) + Label(1) + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfFlag(LVar0, STATUS_FLAG_STONE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim04) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Blooper_Anim00) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Sub(LVar1, 15) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + ExecWait(N(EVS_LoseRage)) + ExecWait(N(EVS_FloatToHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Enrage) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Enraged, TRUE) - EVT_CALL(EnableActorPaletteEffects, ACTOR_SELF, PRT_MAIN, TRUE) - EVT_CALL(SetActorPaletteSwapParams, ACTOR_SELF, PRT_MAIN, SPR_PAL_Blooper, SPR_PAL_Blooper_Supercharged, 0, 6, 12, 6, 0, 0) - EVT_CALL(SetActorPaletteEffect, ACTOR_SELF, PRT_MAIN, ACTOR_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(EnragedStatusTable))) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_TARGET, ACTOR_EVENT_FLAG_ATTACK_CHARGED, TRUE) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_Enraged, TRUE) + Call(EnableActorPaletteEffects, ACTOR_SELF, PRT_MAIN, TRUE) + Call(SetActorPaletteSwapParams, ACTOR_SELF, PRT_MAIN, SPR_PAL_Blooper, SPR_PAL_Blooper_Supercharged, 0, 6, 12, 6, 0, 0) + Call(SetActorPaletteEffect, ACTOR_SELF, PRT_MAIN, ACTOR_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) + Call(SetStatusTable, ACTOR_SELF, Ref(N(EnragedStatusTable))) + Call(SetPartEventBits, ACTOR_SELF, PRT_TARGET, ACTOR_EVENT_FLAG_ATTACK_CHARGED, TRUE) + Return + End }; EvtScript N(EVS_LoseRage) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Enraged, FALSE) - EVT_CALL(EnableActorPaletteEffects, ACTOR_SELF, PRT_MAIN, FALSE) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(StatusTable))) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_TARGET, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_Enraged, FALSE) + Call(EnableActorPaletteEffects, ACTOR_SELF, PRT_MAIN, FALSE) + Call(SetStatusTable, ACTOR_SELF, Ref(N(StatusTable))) + Call(SetPartEventBits, ACTOR_SELF, PRT_TARGET, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + Return + End }; Vec3i N(SummonPos) = { 400, 0, 0 }; diff --git a/src/battle/area/trd_part_2/actor/common_koopa_bros.inc.c b/src/battle/area/trd_part_2/actor/common_koopa_bros.inc.c index 7f254c0da21..f1ae6490c76 100644 --- a/src/battle/area/trd_part_2/actor/common_koopa_bros.inc.c +++ b/src/battle/area/trd_part_2/actor/common_koopa_bros.inc.c @@ -331,661 +331,661 @@ API_CALLABLE(N(GetLastActorEventType)) { // respond to commands issued from BOSS_ACTOR // (in) LVarA : event EvtScript N(HandleCommand) = { - EVT_CALL(SetOwnerID, THIS_ACTOR_ID) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(BOSS_CMD_STABLE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Koopa_State_PosA) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_IDLE) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosD) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosC) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosB) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(TowerAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_TOWER_IDLE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CASE_EQ(BOSS_CMD_UNSTABLE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosA) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosD) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosC) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosB) - EVT_WAIT(5) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(TippingAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_TIPPING_IDLE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CASE_EQ(BOSS_CMD_HIT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosA) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosD) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosC) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosB) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, THIS_ANIM_HURT) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_AND_CONST(LVar0, AFLAG_Boss_PlayerHitTower | AFLAG_Boss_PartnerHitTower) - EVT_IF_NE(LVar0, AFLAG_Boss_PlayerHitTower | AFLAG_Boss_PartnerHitTower) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(TippingAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_TIPPING_IDLE) - EVT_ELSE - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(BasicHurtAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_HURT_STILL) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CASE_EQ(BOSS_CMD_BURN_HIT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosA) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosD) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosC) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosB) - EVT_CALL(N(GetLastActorEventType), EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, THIS_ANIM_BURN) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_AND_CONST(LVar0, AFLAG_Boss_PlayerHitTower | AFLAG_Boss_PartnerHitTower) - EVT_IF_NE(LVar0, AFLAG_Boss_PlayerHitTower | AFLAG_Boss_PartnerHitTower) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(TippingAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_TIPPING_IDLE) - EVT_ELSE - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(BasicHurtAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_HURT_STILL) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CASE_EQ(BOSS_CMD_NO_DAMAGE_HIT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Koopa_State_PosA) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, THIS_ANIM_TOP_ENTER_SHELL) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_TOP_EXIT_SHELL) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosD) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosC) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosB) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, THIS_ANIM_ENTER_SHELL) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_EXIT_SHELL) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_WAIT(15) - EVT_CASE_EQ(BOSS_CMD_TOPPLE_HIT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosA) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosD) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosC) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosB) - EVT_SET(LFlag0, FALSE) - EVT_IF_EQ(LVar0, AVAL_Koopa_State_PosA) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(N(GetTowerFallPosition), LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_HURT_STILL) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(BasicHurtAnims))) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(N(StartRumbleWithParams), 256, 5) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(0.8)) - EVT_END_THREAD - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_TOPPLE_IDLE) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(BasicToppledAnims))) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_HEALTH_BAR, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledAnims))) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledDefense))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Koopa_State, AVAL_Koopa_State_Toppled) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Koopa_ToppleTurns, 2) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 18) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CASE_EQ(BOSS_CMD_TOPPLE_BURN_HIT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosA) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosD) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosC) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosB) - EVT_SET(LFlag0, FALSE) - EVT_IF_EQ(LVar0, AVAL_Koopa_State_PosA) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(N(GetTowerFallPosition), LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_BURN) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(BasicHurtAnims))) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(N(StartRumbleWithParams), 256, 5) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(0.8)) - EVT_END_THREAD - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorSize, ACTOR_SELF, LVar3, LVar4) - EVT_DIVF(LVar3, EVT_FLOAT(2.0)) - EVT_ADDF(LVar1, LVar3) - EVT_ADDF(LVar2, EVT_FLOAT(5.0)) - EVT_DIVF(LVar3, EVT_FLOAT(10.0)) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, LVar3, 10, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_TOPPLE_IDLE) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(BasicToppledAnims))) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_HEALTH_BAR, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledAnims))) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledDefense))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Koopa_State, AVAL_Koopa_State_Toppled) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Koopa_ToppleTurns, 2) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 18) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CASE_EQ(BOSS_CMD_TRY_GET_UP) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Koopa_State_Toppled) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Koopa_ToppleTurns, LVar0) - EVT_SUB(LVar0, 1) - EVT_IF_GT(LVar0, 0) + Call(SetOwnerID, THIS_ACTOR_ID) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNe(LVar0, 0) + Return + EndIf + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Switch(LVarA) + CaseEq(BOSS_CMD_STABLE) + Call(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_Koopa_State_PosA) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_IDLE) + CaseOrEq(AVAL_Koopa_State_PosD) + CaseOrEq(AVAL_Koopa_State_PosC) + CaseOrEq(AVAL_Koopa_State_PosB) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(TowerAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_TOWER_IDLE) + EndCaseGroup + EndSwitch + CaseEq(BOSS_CMD_UNSTABLE) + Call(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_Koopa_State_PosA) + CaseOrEq(AVAL_Koopa_State_PosD) + CaseOrEq(AVAL_Koopa_State_PosC) + CaseOrEq(AVAL_Koopa_State_PosB) + Wait(5) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(TippingAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_TIPPING_IDLE) + EndCaseGroup + EndSwitch + CaseEq(BOSS_CMD_HIT) + Call(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_Koopa_State_PosA) + CaseOrEq(AVAL_Koopa_State_PosD) + CaseOrEq(AVAL_Koopa_State_PosC) + CaseOrEq(AVAL_Koopa_State_PosB) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, THIS_ANIM_HURT) + ExecWait(EVS_Enemy_Hit) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseAndConst(LVar0, AFLAG_Boss_PlayerHitTower | AFLAG_Boss_PartnerHitTower) + IfNe(LVar0, AFLAG_Boss_PlayerHitTower | AFLAG_Boss_PartnerHitTower) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(TippingAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_TIPPING_IDLE) + Else + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(BasicHurtAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_HURT_STILL) + EndIf + EndCaseGroup + EndSwitch + CaseEq(BOSS_CMD_BURN_HIT) + Call(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_Koopa_State_PosA) + CaseOrEq(AVAL_Koopa_State_PosD) + CaseOrEq(AVAL_Koopa_State_PosC) + CaseOrEq(AVAL_Koopa_State_PosB) + Call(N(GetLastActorEventType), EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, THIS_ANIM_BURN) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseAndConst(LVar0, AFLAG_Boss_PlayerHitTower | AFLAG_Boss_PartnerHitTower) + IfNe(LVar0, AFLAG_Boss_PlayerHitTower | AFLAG_Boss_PartnerHitTower) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(TippingAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_TIPPING_IDLE) + Else + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(BasicHurtAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_HURT_STILL) + EndIf + EndCaseGroup + EndSwitch + CaseEq(BOSS_CMD_NO_DAMAGE_HIT) + Call(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_Koopa_State_PosA) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, THIS_ANIM_TOP_ENTER_SHELL) + ExecWait(EVS_Enemy_NoDamageHit) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_TOP_EXIT_SHELL) + CaseOrEq(AVAL_Koopa_State_PosD) + CaseOrEq(AVAL_Koopa_State_PosC) + CaseOrEq(AVAL_Koopa_State_PosB) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, THIS_ANIM_ENTER_SHELL) + ExecWait(EVS_Enemy_NoDamageHit) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_EXIT_SHELL) + EndCaseGroup + EndSwitch + Wait(15) + CaseEq(BOSS_CMD_TOPPLE_HIT) + Call(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_Koopa_State_PosA) + CaseOrEq(AVAL_Koopa_State_PosD) + CaseOrEq(AVAL_Koopa_State_PosC) + CaseOrEq(AVAL_Koopa_State_PosB) + Set(LFlag0, FALSE) + IfEq(LVar0, AVAL_Koopa_State_PosA) + Set(LFlag0, TRUE) + EndIf + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(N(GetTowerFallPosition), LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_HURT_STILL) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(BasicHurtAnims))) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + IfEq(LFlag0, TRUE) + Call(N(StartRumbleWithParams), 256, 5) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.8)) + EndThread + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_TOPPLE_IDLE) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(BasicToppledAnims))) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_HEALTH_BAR, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledAnims))) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledDefense))) + Call(SetActorVar, ACTOR_SELF, AVAR_Koopa_State, AVAL_Koopa_State_Toppled) + Call(SetActorVar, ACTOR_SELF, AVAR_Koopa_ToppleTurns, 2) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 18) + EndCaseGroup + EndSwitch + CaseEq(BOSS_CMD_TOPPLE_BURN_HIT) + Call(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_Koopa_State_PosA) + CaseOrEq(AVAL_Koopa_State_PosD) + CaseOrEq(AVAL_Koopa_State_PosC) + CaseOrEq(AVAL_Koopa_State_PosB) + Set(LFlag0, FALSE) + IfEq(LVar0, AVAL_Koopa_State_PosA) + Set(LFlag0, TRUE) + EndIf + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(N(GetTowerFallPosition), LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_BURN) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(BasicHurtAnims))) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + IfEq(LFlag0, TRUE) + Call(N(StartRumbleWithParams), 256, 5) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.8)) + EndThread + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorSize, ACTOR_SELF, LVar3, LVar4) + DivF(LVar3, Float(2.0)) + AddF(LVar1, LVar3) + AddF(LVar2, Float(5.0)) + DivF(LVar3, Float(10.0)) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, LVar3, 10, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_TOPPLE_IDLE) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(BasicToppledAnims))) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_HEALTH_BAR, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledAnims))) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledDefense))) + Call(SetActorVar, ACTOR_SELF, AVAR_Koopa_State, AVAL_Koopa_State_Toppled) + Call(SetActorVar, ACTOR_SELF, AVAR_Koopa_ToppleTurns, 2) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 18) + EndCaseGroup + EndSwitch + CaseEq(BOSS_CMD_TRY_GET_UP) + Call(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_Koopa_State_Toppled) + Call(GetActorVar, ACTOR_SELF, AVAR_Koopa_ToppleTurns, LVar0) + Sub(LVar0, 1) + IfGt(LVar0, 0) // still has topple turns left, just struggle a bit - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Koopa_ToppleTurns, LVar0) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_WAIT(20) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_ELSE + Call(SetActorVar, ACTOR_SELF, AVAR_Koopa_ToppleTurns, LVar0) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Wait(20) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Else // topple turns are over, koopa bros can get up - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_WAIT(12) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_JUMP) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 18, 0) - EVT_LOOP(4) - EVT_ADD(LVar0, 22) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 36) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Koopa_State, AVAL_Koopa_State_GotUp) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultDefense))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_IDLE) - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_WAIT(20) - EVT_END_SWITCH - EVT_CASE_EQ(BOSS_CMD_GET_READY) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Wait(12) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_JUMP) + Thread + Set(LVar0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 18, 0) + Loop(4) + Add(LVar0, 22) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 36) + Call(SetActorVar, ACTOR_SELF, AVAR_Koopa_State, AVAL_Koopa_State_GotUp) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultDefense))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_IDLE) + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) + EndIf + CaseDefault + Wait(20) + EndSwitch + CaseEq(BOSS_CMD_GET_READY) // if koopa just got up, change its state to ready - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Koopa_State_GotUp) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Koopa_State, AVAL_Koopa_State_Ready) - EVT_END_SWITCH - EVT_CASE_EQ(BOSS_CMD_SPIN_ATTACK) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Koopa_State_PosA) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_TOP_ENTER_SHELL) - EVT_WAIT(10) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_TowerHeight, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(4) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_KOOPA_BROS_TOWER_SPIN_3) - EVT_CASE_EQ(3) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_KOOPA_BROS_TOWER_SPIN_2) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_KOOPA_BROS_TOWER_SPIN_1) - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_SHELL_SPIN) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(N(SpawnSpinEffect), LVar0, LVar1, LVar2, 60) - EVT_WAIT(60) - EVT_THREAD - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(HIT_RESULT_LUCKY) - EVT_WAIT(20) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_RETURN - EVT_CASE_EQ(HIT_RESULT_MISS) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_TopKoopaID, LVarA) - EVT_LABEL(0) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) - EVT_IF_GT(LVar0, LVar3) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_TowerHeight, LVar1) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_KOOPA_LAUNCH_SHELL) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_TowerHeight, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(4) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(13.0)) - EVT_CASE_EQ(3) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(14.0)) - EVT_CASE_EQ(2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(15.0)) - EVT_END_SWITCH - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, -160, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_THREAD - EVT_CALL(SetPartRotationOffset, ACTOR_SELF, PRT_MAIN, 0, 15, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(40) - EVT_SUB(LVar0, 45) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartRotationOffset, ACTOR_SELF, PRT_MAIN, 0, 0, 0) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_TopKoopaID, LVar1) - EVT_CALL(GetHomePos, LVar1, LVar2, LVar3, LVar4) - EVT_SET(LVar4, 15) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar2, LVar3, LVar4) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_TowerHeight, LVarB) - EVT_SET(LVar0, LVarB) - EVT_SUB(LVar0, 1) - EVT_MUL(LVar0, 18) - EVT_SWITCH(LVarB) - EVT_CASE_EQ(4) - EVT_CALL(AddGoalPos, ACTOR_SELF, 0, LVar0, -10) - EVT_CASE_EQ(3) - EVT_CALL(AddGoalPos, ACTOR_SELF, 0, LVar0, -7) - EVT_CASE_EQ(2) - EVT_CALL(AddGoalPos, ACTOR_SELF, 0, LVar0, -4) - EVT_END_SWITCH - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 40, FALSE, TRUE, FALSE) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_TowerHeight, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(4) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(N(SpawnSpinEffect), LVar0, LVar1, LVar2, 60) - EVT_WAIT(60) - EVT_CASE_EQ(3) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(N(SpawnSpinEffect), LVar0, LVar1, LVar2, 50) - EVT_WAIT(50) - EVT_CASE_EQ(2) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(N(SpawnSpinEffect), LVar0, LVar1, LVar2, 40) - EVT_WAIT(40) - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_TOP_EXIT_SHELL) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SMALL_LENS_FLARE) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_POINT) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 22) - EVT_ADD(LVar1, 19) - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 30, 0) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_IDLE) - EVT_WAIT(20) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_TowerState, 0) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosD) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosC) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosB) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_ENTER_SHELL) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_SHELL_SPIN) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(N(SpawnSpinEffect), LVar0, LVar1, LVar2, 60) - EVT_WAIT(60) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Koopa_State_PosD) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(14.0)) - EVT_CASE_EQ(AVAL_Koopa_State_PosC) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(15.0)) - EVT_CASE_EQ(AVAL_Koopa_State_PosB) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(16.0)) - EVT_END_SWITCH - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, -160, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_THREAD - EVT_CALL(SetPartRotationOffset, ACTOR_SELF, PRT_MAIN, 0, 15, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(40) - EVT_SUB(LVar0, 45) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartRotationOffset, ACTOR_SELF, PRT_MAIN, 0, 0, 0) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Koopa_State_PosD) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_TopKoopaID, LVar1) - EVT_CALL(GetHomePos, LVar1, LVar2, LVar3, LVar4) - EVT_SET(LVar4, 15) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar2, LVar3, LVar4) - EVT_CALL(AddGoalPos, ACTOR_SELF, 0, 36, -7) - EVT_CASE_EQ(AVAL_Koopa_State_PosC) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_TopKoopaID, LVar1) - EVT_CALL(GetHomePos, LVar1, LVar2, LVar3, LVar4) - EVT_SET(LVar4, 15) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar2, LVar3, LVar4) - EVT_CALL(AddGoalPos, ACTOR_SELF, 0, 18, -4) - EVT_CASE_EQ(AVAL_Koopa_State_PosB) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_TopKoopaID, LVar1) - EVT_CALL(GetHomePos, LVar1, LVar2, LVar3, LVar4) - EVT_SET(LVar4, 15) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar2, LVar3, LVar4) - EVT_CALL(AddGoalPos, ACTOR_SELF, 0, 0, 0) - EVT_END_SWITCH - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 40, FALSE, TRUE, FALSE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Koopa_State_PosD) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(N(SpawnSpinEffect), LVar0, LVar1, LVar2, 50) - EVT_WAIT(50) - EVT_CASE_EQ(AVAL_Koopa_State_PosC) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(N(SpawnSpinEffect), LVar0, LVar1, LVar2, 40) - EVT_WAIT(40) - EVT_CASE_EQ(AVAL_Koopa_State_PosB) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(N(SpawnSpinEffect), LVar0, LVar1, LVar2, 30) - EVT_WAIT(30) - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_EXIT_SHELL) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_TOWER_IDLE) - EVT_WAIT(30) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CASE_EQ(BOSS_CMD_SOLO_ATTACK) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Koopa_State_Ready) - EVT_CALL(GetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar2, 15) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_RUN) - EVT_CALL(RunToGoal, ACTOR_SELF, 10, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_ENTER_SHELL) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_KOOPA_BROS_SPINUP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_SHELL_SPIN) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(N(SpawnSpinEffect), LVar0, LVar1, LVar2, 30) - EVT_WAIT(30) - EVT_THREAD - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(HIT_RESULT_LUCKY) - EVT_WAIT(20) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_RETURN - EVT_CASE_EQ(HIT_RESULT_MISS) - EVT_RETURN - EVT_END_SWITCH - EVT_LABEL(0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) - EVT_IF_GT(LVar0, LVar3) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 1, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_KOOPA_LAUNCH_SHELL) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(16.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, -160, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_THREAD - EVT_CALL(SetPartRotationOffset, ACTOR_SELF, PRT_MAIN, 0, 15, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(40) - EVT_SUB(LVar0, 45) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartRotationOffset, ACTOR_SELF, PRT_MAIN, 0, 0, 0) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(GetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar2, 15) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 40, FALSE, TRUE, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(N(SpawnSpinEffect), LVar0, LVar1, LVar2, 30) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_TOP_EXIT_SHELL) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SMALL_LENS_FLARE) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_POINT) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 22) - EVT_ADD(LVar1, 19) - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 30, 0) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_RUN) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 10, FALSE) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_AND_CONST(LVar0, ~AFLAG_Boss_DoingSoloAttack) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_Koopa_State_GotUp) + Call(SetActorVar, ACTOR_SELF, AVAR_Koopa_State, AVAL_Koopa_State_Ready) + EndSwitch + CaseEq(BOSS_CMD_SPIN_ATTACK) + Call(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_Koopa_State_PosA) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_TOP_ENTER_SHELL) + Wait(10) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_TowerHeight, LVar0) + Switch(LVar0) + CaseEq(4) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_KOOPA_BROS_TOWER_SPIN_3) + CaseEq(3) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_KOOPA_BROS_TOWER_SPIN_2) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_KOOPA_BROS_TOWER_SPIN_1) + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_SHELL_SPIN) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(N(SpawnSpinEffect), LVar0, LVar1, LVar2, 60) + Wait(60) + Thread + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseEq(HIT_RESULT_LUCKY) + Wait(20) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + Return + CaseEq(HIT_RESULT_MISS) + Return + EndSwitch + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_TopKoopaID, LVarA) + Label(0) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Call(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) + IfGt(LVar0, LVar3) + Wait(1) + Goto(0) + EndIf + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_TowerHeight, LVar1) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, LVar1, BS_FLAGS1_TRIGGER_EVENTS) + EndThread + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_KOOPA_LAUNCH_SHELL) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_TowerHeight, LVar0) + Switch(LVar0) + CaseEq(4) + Call(SetActorSpeed, ACTOR_SELF, Float(13.0)) + CaseEq(3) + Call(SetActorSpeed, ACTOR_SELF, Float(14.0)) + CaseEq(2) + Call(SetActorSpeed, ACTOR_SELF, Float(15.0)) + EndSwitch + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, -160, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Thread + Call(SetPartRotationOffset, ACTOR_SELF, PRT_MAIN, 0, 15, 0) + Set(LVar0, 0) + Loop(40) + Sub(LVar0, 45) + Call(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetPartRotationOffset, ACTOR_SELF, PRT_MAIN, 0, 0, 0) + Call(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, 0) + EndThread + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_TopKoopaID, LVar1) + Call(GetHomePos, LVar1, LVar2, LVar3, LVar4) + Set(LVar4, 15) + Call(SetGoalPos, ACTOR_SELF, LVar2, LVar3, LVar4) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_TowerHeight, LVarB) + Set(LVar0, LVarB) + Sub(LVar0, 1) + Mul(LVar0, 18) + Switch(LVarB) + CaseEq(4) + Call(AddGoalPos, ACTOR_SELF, 0, LVar0, -10) + CaseEq(3) + Call(AddGoalPos, ACTOR_SELF, 0, LVar0, -7) + CaseEq(2) + Call(AddGoalPos, ACTOR_SELF, 0, LVar0, -4) + EndSwitch + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(JumpToGoal, ACTOR_SELF, 40, FALSE, TRUE, FALSE) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_TowerHeight, LVar0) + Switch(LVar0) + CaseEq(4) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(N(SpawnSpinEffect), LVar0, LVar1, LVar2, 60) + Wait(60) + CaseEq(3) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(N(SpawnSpinEffect), LVar0, LVar1, LVar2, 50) + Wait(50) + CaseEq(2) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(N(SpawnSpinEffect), LVar0, LVar1, LVar2, 40) + Wait(40) + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_TOP_EXIT_SHELL) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SMALL_LENS_FLARE) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_POINT) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 22) + Add(LVar1, 19) + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 30, 0) + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_IDLE) + Wait(20) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_TowerState, 0) + CaseOrEq(AVAL_Koopa_State_PosD) + CaseOrEq(AVAL_Koopa_State_PosC) + CaseOrEq(AVAL_Koopa_State_PosB) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_ENTER_SHELL) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_SHELL_SPIN) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(N(SpawnSpinEffect), LVar0, LVar1, LVar2, 60) + Wait(60) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_Koopa_State_PosD) + Call(SetActorSpeed, ACTOR_SELF, Float(14.0)) + CaseEq(AVAL_Koopa_State_PosC) + Call(SetActorSpeed, ACTOR_SELF, Float(15.0)) + CaseEq(AVAL_Koopa_State_PosB) + Call(SetActorSpeed, ACTOR_SELF, Float(16.0)) + EndSwitch + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, -160, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Thread + Call(SetPartRotationOffset, ACTOR_SELF, PRT_MAIN, 0, 15, 0) + Set(LVar0, 0) + Loop(40) + Sub(LVar0, 45) + Call(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetPartRotationOffset, ACTOR_SELF, PRT_MAIN, 0, 0, 0) + Call(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, 0) + EndThread + Call(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_Koopa_State_PosD) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_TopKoopaID, LVar1) + Call(GetHomePos, LVar1, LVar2, LVar3, LVar4) + Set(LVar4, 15) + Call(SetGoalPos, ACTOR_SELF, LVar2, LVar3, LVar4) + Call(AddGoalPos, ACTOR_SELF, 0, 36, -7) + CaseEq(AVAL_Koopa_State_PosC) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_TopKoopaID, LVar1) + Call(GetHomePos, LVar1, LVar2, LVar3, LVar4) + Set(LVar4, 15) + Call(SetGoalPos, ACTOR_SELF, LVar2, LVar3, LVar4) + Call(AddGoalPos, ACTOR_SELF, 0, 18, -4) + CaseEq(AVAL_Koopa_State_PosB) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_TopKoopaID, LVar1) + Call(GetHomePos, LVar1, LVar2, LVar3, LVar4) + Set(LVar4, 15) + Call(SetGoalPos, ACTOR_SELF, LVar2, LVar3, LVar4) + Call(AddGoalPos, ACTOR_SELF, 0, 0, 0) + EndSwitch + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(JumpToGoal, ACTOR_SELF, 40, FALSE, TRUE, FALSE) + Call(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_Koopa_State_PosD) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(N(SpawnSpinEffect), LVar0, LVar1, LVar2, 50) + Wait(50) + CaseEq(AVAL_Koopa_State_PosC) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(N(SpawnSpinEffect), LVar0, LVar1, LVar2, 40) + Wait(40) + CaseEq(AVAL_Koopa_State_PosB) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(N(SpawnSpinEffect), LVar0, LVar1, LVar2, 30) + Wait(30) + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_EXIT_SHELL) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_TOWER_IDLE) + Wait(30) + EndCaseGroup + EndSwitch + CaseEq(BOSS_CMD_SOLO_ATTACK) + Call(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_Koopa_State_Ready) + Call(GetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar2, 15) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_RUN) + Call(RunToGoal, ACTOR_SELF, 10, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_ENTER_SHELL) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_KOOPA_BROS_SPINUP) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_SHELL_SPIN) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(N(SpawnSpinEffect), LVar0, LVar1, LVar2, 30) + Wait(30) + Thread + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseEq(HIT_RESULT_LUCKY) + Wait(20) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + Return + CaseEq(HIT_RESULT_MISS) + Return + EndSwitch + Label(0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) + IfGt(LVar0, LVar3) + Wait(1) + Goto(0) + EndIf + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 1, BS_FLAGS1_TRIGGER_EVENTS) + EndThread + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_KOOPA_LAUNCH_SHELL) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetActorSpeed, ACTOR_SELF, Float(16.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, -160, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Thread + Call(SetPartRotationOffset, ACTOR_SELF, PRT_MAIN, 0, 15, 0) + Set(LVar0, 0) + Loop(40) + Sub(LVar0, 45) + Call(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetPartRotationOffset, ACTOR_SELF, PRT_MAIN, 0, 0, 0) + Call(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, 0) + EndThread + Call(GetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar2, 15) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(JumpToGoal, ACTOR_SELF, 40, FALSE, TRUE, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(N(SpawnSpinEffect), LVar0, LVar1, LVar2, 30) + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_TOP_EXIT_SHELL) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SMALL_LENS_FLARE) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_POINT) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 22) + Add(LVar1, 19) + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 30, 0) + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_RUN) + Call(SetGoalToHome, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 10, FALSE) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseAndConst(LVar0, ~AFLAG_Boss_DoingSoloAttack) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + EndSwitch + EndSwitch + Return + End }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorPos, ACTOR_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(ForceHomePos, ACTOR_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Koopa_State, AVAL_Koopa_State_Ready) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Koopa_ToppleTurns, 0) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorPos, ACTOR_SELF, NPC_DISPOSE_LOCATION) + Call(ForceHomePos, ACTOR_SELF, NPC_DISPOSE_LOCATION) + Call(HPBarToHome, ACTOR_SELF) + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_Koopa_State, AVAL_Koopa_State_Ready) + Call(SetActorVar, ACTOR_SELF, AVAR_Koopa_ToppleTurns, 0) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(FlipPosOffsets)[] = { 9, 16, 22, 26, 30, 32, 33, 32, 30, 26, 22, 16, 9, 0, 4, 6, 7, 6, 4, 0, 2, 0 }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, THIS_ANIM_HURT) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, THIS_ANIM_BURN) - EVT_SET_CONST(LVar2, THIS_ANIM_BURN_STILL) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, THIS_ANIM_BURN) - EVT_SET_CONST(LVar2, THIS_ANIM_BURN_STILL) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, THIS_ANIM_BURN_STILL) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, THIS_ANIM_HURT) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, THIS_ANIM_HURT) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, THIS_ANIM_HURT) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_FLIP_TRIGGER) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Koopa_State, AVAL_Koopa_State_Toppled) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Koopa_ToppleTurns, 2) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledAnims))) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledDefense))) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 18) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_Koopa_State_Ready) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_HURT) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_THREAD - EVT_WAIT(4) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 30) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -30) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -60) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -75) - EVT_WAIT(1) - EVT_END_THREAD - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_TOPPLE_IDLE) - EVT_END_IF - EVT_USE_BUF(EVT_PTR(N(FlipPosOffsets))) - EVT_LOOP(ARRAY_COUNT(N(FlipPosOffsets))) - EVT_BUF_READ1(LVar0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_Koopa_State_Ready) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, THIS_ANIM_TOP_ENTER_SHELL) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_TOP_EXIT_SHELL) - EVT_WAIT(10) - EVT_END_IF - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, THIS_ANIM_TOPPLE_IDLE) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, THIS_ANIM_HURT) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, THIS_ANIM_HURT) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_Koopa_State_Ready) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, THIS_ANIM_IDLE) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, THIS_ANIM_HURT) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, THIS_ANIM_BURN) + SetConst(LVar2, THIS_ANIM_BURN_STILL) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, THIS_ANIM_BURN) + SetConst(LVar2, THIS_ANIM_BURN_STILL) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, THIS_ANIM_BURN_STILL) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, THIS_ANIM_HURT) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, THIS_ANIM_HURT) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, THIS_ANIM_HURT) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_FLIP_TRIGGER) + Call(SetActorVar, ACTOR_SELF, AVAR_Koopa_State, AVAL_Koopa_State_Toppled) + Call(SetActorVar, ACTOR_SELF, AVAR_Koopa_ToppleTurns, 2) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledAnims))) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledDefense))) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 18) + Call(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) + IfEq(LVar0, AVAL_Koopa_State_Ready) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_HURT) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Thread + Wait(4) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 30) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -30) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -60) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -75) + Wait(1) + EndThread + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_TOPPLE_IDLE) + EndIf + UseBuf(Ref(N(FlipPosOffsets))) + Loop(ARRAY_COUNT(N(FlipPosOffsets))) + BufRead1(LVar0) + Call(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + Call(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) + IfEq(LVar0, AVAL_Koopa_State_Ready) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, THIS_ANIM_TOP_ENTER_SHELL) + ExecWait(EVS_Enemy_NoDamageHit) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfEq(LVar0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, THIS_ANIM_TOP_EXIT_SHELL) + Wait(10) + EndIf + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, THIS_ANIM_TOPPLE_IDLE) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, THIS_ANIM_HURT) + ExecWait(EVS_Enemy_Hit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, THIS_ANIM_HURT) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + Call(GetActorVar, ACTOR_SELF, AVAR_Koopa_State, LVar0) + IfEq(LVar0, AVAL_Koopa_State_Ready) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, THIS_ANIM_IDLE) + ExecWait(EVS_Enemy_Recover) + EndIf + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/battle/area/trd_part_2/actor/fake_bowser.c b/src/battle/area/trd_part_2/actor/fake_bowser.c index f04ad3daf35..40557300caf 100644 --- a/src/battle/area/trd_part_2/actor/fake_bowser.c +++ b/src/battle/area/trd_part_2/actor/fake_bowser.c @@ -284,245 +284,245 @@ s32 N(BowserModels)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_FakeBowser_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_FakeBowser_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_FakeBowser_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_FakeBowser_HandlePhase))) - EVT_USE_ARRAY(FakeBowserAnimState) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, AVAL_Boss_TowerState_None) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Boss_BowserTaunts, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Boss_TowerHeight, 0) - EVT_SET(ArrayVar(0), ANIM_BEGIN_IDLE) - EVT_CALL(SetActorPos, ACTOR_SELF, 96, 0, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(SetPartTargetFlagBits, ACTOR_SELF, PRT_TOWER, ACTOR_PART_TARGET_NO_DAMAGE, TRUE) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_FakeBowser_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_FakeBowser_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_FakeBowser_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_FakeBowser_HandlePhase))) + UseArray(FakeBowserAnimState) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, AVAL_Boss_TowerState_None) + Call(SetActorVar, ACTOR_SELF, AVAR_Boss_BowserTaunts, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Boss_TowerHeight, 0) + Set(ArrayVar(0), ANIM_BEGIN_IDLE) + Call(SetActorPos, ACTOR_SELF, 96, 0, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Call(SetPartTargetFlagBits, ACTOR_SELF, PRT_TOWER, ACTOR_PART_TARGET_NO_DAMAGE, TRUE) + Return + End }; // ------------------------------------------------------------------------- // FAKE BOWSER BATTLE s32 N(IdleHeadAngles)[] = { - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(1.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(2.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(2.5), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(3.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(4.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(4.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(4.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(4.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(4.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(4.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(4.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(4.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(3.5), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(3.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(2.5), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(3.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(2.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(1.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(0.5), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), + Float(0.0), Float(0.0), Float(0.0), + Float(0.0), Float(0.0), Float(0.0), + Float(0.0), Float(0.0), Float(1.0), + Float(0.0), Float(0.0), Float(2.0), + Float(0.0), Float(0.0), Float(2.5), + Float(0.0), Float(0.0), Float(3.0), + Float(0.0), Float(0.0), Float(4.0), + Float(0.0), Float(0.0), Float(4.0), + Float(0.0), Float(0.0), Float(4.0), + Float(0.0), Float(0.0), Float(4.0), + Float(0.0), Float(0.0), Float(4.0), + Float(0.0), Float(0.0), Float(4.0), + Float(0.0), Float(0.0), Float(4.0), + Float(0.0), Float(0.0), Float(4.0), + Float(0.0), Float(0.0), Float(3.5), + Float(0.0), Float(0.0), Float(3.0), + Float(0.0), Float(0.0), Float(2.5), + Float(0.0), Float(0.0), Float(3.0), + Float(0.0), Float(0.0), Float(2.0), + Float(0.0), Float(0.0), Float(1.0), + Float(0.0), Float(0.0), Float(0.5), + Float(0.0), Float(0.0), Float(0.0), + Float(0.0), Float(0.0), Float(0.0), 255, 255, 255 }; EvtScript N(EVS_AnimBowser_IdleHead) = { - EVT_USE_ARRAY(FakeBowserAnimState) - EVT_USE_FBUF(EVT_PTR(N(IdleHeadAngles))) - EVT_LABEL(0) - EVT_SET(LVar0, ArrayVar(0)) - EVT_IF_NE(LVar0, ANIM_DOING_IDLE) - EVT_RETURN - EVT_END_IF - EVT_FBUF_READ3(LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar0, 255) - EVT_USE_FBUF(EVT_PTR(N(IdleHeadAngles))) - EVT_FBUF_READ3(LVar0, LVar1, LVar2) - EVT_END_IF - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_HEAD, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + UseArray(FakeBowserAnimState) + UseFBuf(Ref(N(IdleHeadAngles))) + Label(0) + Set(LVar0, ArrayVar(0)) + IfNe(LVar0, ANIM_DOING_IDLE) + Return + EndIf + FBufRead3(LVar0, LVar1, LVar2) + IfEq(LVar0, 255) + UseFBuf(Ref(N(IdleHeadAngles))) + FBufRead3(LVar0, LVar1, LVar2) + EndIf + Call(SetPartRotation, ACTOR_SELF, PRT_HEAD, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; s32 N(MoveHeadAngles)[] = { - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(2.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(5.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(8.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(8.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(8.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(8.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(7.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(5.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(4.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(1.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), + Float(0.0), Float(0.0), Float(0.0), + Float(0.0), Float(0.0), Float(2.0), + Float(0.0), Float(0.0), Float(5.0), + Float(0.0), Float(0.0), Float(8.0), + Float(0.0), Float(0.0), Float(8.0), + Float(0.0), Float(0.0), Float(8.0), + Float(0.0), Float(0.0), Float(8.0), + Float(0.0), Float(0.0), Float(7.0), + Float(0.0), Float(0.0), Float(5.0), + Float(0.0), Float(0.0), Float(4.0), + Float(0.0), Float(0.0), Float(1.0), + Float(0.0), Float(0.0), Float(0.0), 255, 255, 255 }; EvtScript N(EVS_AnimBowser_MoveHead) = { - EVT_USE_ARRAY(FakeBowserAnimState) - EVT_USE_FBUF(EVT_PTR(N(MoveHeadAngles))) - EVT_LABEL(0) - EVT_SET(LVar0, ArrayVar(0)) - EVT_IF_NE(LVar0, ANIM_DOING_MOVE) - EVT_RETURN - EVT_END_IF - EVT_FBUF_READ3(LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar0, 255) - EVT_USE_FBUF(EVT_PTR(N(MoveHeadAngles))) - EVT_FBUF_READ3(LVar0, LVar1, LVar2) - EVT_END_IF - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_HEAD, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + UseArray(FakeBowserAnimState) + UseFBuf(Ref(N(MoveHeadAngles))) + Label(0) + Set(LVar0, ArrayVar(0)) + IfNe(LVar0, ANIM_DOING_MOVE) + Return + EndIf + FBufRead3(LVar0, LVar1, LVar2) + IfEq(LVar0, 255) + UseFBuf(Ref(N(MoveHeadAngles))) + FBufRead3(LVar0, LVar1, LVar2) + EndIf + Call(SetPartRotation, ACTOR_SELF, PRT_HEAD, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; s32 N(HurtHeadAngles)[] = { - EVT_FLOAT(0.0), EVT_FLOAT(10.0), EVT_FLOAT(0.0), - EVT_FLOAT(20.0), EVT_FLOAT(0.0), EVT_FLOAT(5.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), - EVT_FLOAT(5.0), EVT_FLOAT(20.0), EVT_FLOAT(0.0), - EVT_FLOAT(10.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), - EVT_FLOAT(0.0), EVT_FLOAT(30.0), EVT_FLOAT(0.0), - EVT_FLOAT(0.0), EVT_FLOAT(5.0), EVT_FLOAT(2.0), - EVT_FLOAT(30.0), EVT_FLOAT(0.0), EVT_FLOAT(10.0), - EVT_FLOAT(30.0), EVT_FLOAT(10.0), EVT_FLOAT(0.0), - EVT_FLOAT(0.0), EVT_FLOAT(40.0), EVT_FLOAT(2.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(5.0), - EVT_FLOAT(5.0), EVT_FLOAT(0.0), EVT_FLOAT(8.0), - EVT_FLOAT(10.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), - EVT_FLOAT(0.0), EVT_FLOAT(30.0), EVT_FLOAT(0.0), - EVT_FLOAT(20.0), EVT_FLOAT(0.0), EVT_FLOAT(5.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), - EVT_FLOAT(0.0), EVT_FLOAT(5.0), EVT_FLOAT(0.0), - EVT_FLOAT(10.0), EVT_FLOAT(0.0), EVT_FLOAT(8.0), - EVT_FLOAT(0.0), EVT_FLOAT(20.0), EVT_FLOAT(0.0), - EVT_FLOAT(5.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), - EVT_FLOAT(0.0), EVT_FLOAT(5.0), EVT_FLOAT(5.0), - EVT_FLOAT(30.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), + Float(0.0), Float(10.0), Float(0.0), + Float(20.0), Float(0.0), Float(5.0), + Float(0.0), Float(0.0), Float(0.0), + Float(5.0), Float(20.0), Float(0.0), + Float(10.0), Float(0.0), Float(0.0), + Float(0.0), Float(30.0), Float(0.0), + Float(0.0), Float(5.0), Float(2.0), + Float(30.0), Float(0.0), Float(10.0), + Float(30.0), Float(10.0), Float(0.0), + Float(0.0), Float(40.0), Float(2.0), + Float(0.0), Float(0.0), Float(5.0), + Float(5.0), Float(0.0), Float(8.0), + Float(10.0), Float(0.0), Float(0.0), + Float(0.0), Float(30.0), Float(0.0), + Float(20.0), Float(0.0), Float(5.0), + Float(0.0), Float(0.0), Float(0.0), + Float(0.0), Float(5.0), Float(0.0), + Float(10.0), Float(0.0), Float(8.0), + Float(0.0), Float(20.0), Float(0.0), + Float(5.0), Float(0.0), Float(0.0), + Float(0.0), Float(5.0), Float(5.0), + Float(30.0), Float(0.0), Float(0.0), + Float(0.0), Float(0.0), Float(0.0), 255, 255, 255 }; EvtScript N(EVS_AnimBowser_HurtHead) = { - EVT_USE_ARRAY(FakeBowserAnimState) - EVT_USE_FBUF(EVT_PTR(N(HurtHeadAngles))) - EVT_LABEL(0) - EVT_SET(LVar0, ArrayVar(0)) - EVT_IF_NE(LVar0, ANIM_DOING_HURT) - EVT_RETURN - EVT_END_IF - EVT_FBUF_READ3(LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar0, 255) - EVT_USE_FBUF(EVT_PTR(N(HurtHeadAngles))) - EVT_FBUF_READ3(LVar0, LVar1, LVar2) - EVT_END_IF - EVT_CALL(RandInt, 100, LVarA) - EVT_IF_LT(LVarA, 50) - EVT_SETF(LVarA, EVT_FLOAT(0.0)) - EVT_SUBF(LVarA, LVar0) - EVT_SETF(LVar0, LVarA) - EVT_SETF(LVarA, EVT_FLOAT(0.0)) - EVT_SUBF(LVarA, LVar1) - EVT_SETF(LVar1, LVarA) - EVT_END_IF - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_HEAD, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + UseArray(FakeBowserAnimState) + UseFBuf(Ref(N(HurtHeadAngles))) + Label(0) + Set(LVar0, ArrayVar(0)) + IfNe(LVar0, ANIM_DOING_HURT) + Return + EndIf + FBufRead3(LVar0, LVar1, LVar2) + IfEq(LVar0, 255) + UseFBuf(Ref(N(HurtHeadAngles))) + FBufRead3(LVar0, LVar1, LVar2) + EndIf + Call(RandInt, 100, LVarA) + IfLt(LVarA, 50) + SetF(LVarA, Float(0.0)) + SubF(LVarA, LVar0) + SetF(LVar0, LVarA) + SetF(LVarA, Float(0.0)) + SubF(LVarA, LVar1) + SetF(LVar1, LVarA) + EndIf + Call(SetPartRotation, ACTOR_SELF, PRT_HEAD, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_AnimBowser_DeathMain) = { - EVT_USE_ARRAY(FakeBowserAnimState) - EVT_CALL(N(StartRumbleWithParams), 256, 30) - EVT_THREAD - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 20, EVT_FLOAT(3.0)) - EVT_END_THREAD - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_HEAD, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) - EVT_CALL(GetPartPos, ACTOR_SELF, PRT_HEAD, LVar0, LVar1, LVar2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_HEAD, 0, -60, 0) - EVT_SET(LVar1, 60) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_HEAD, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LOOP(60) - EVT_ADD(LVar0, 20) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_HEAD, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_SUB(LVar0, 60) - EVT_SET(LVar1, -200) - EVT_ADD(LVar2, 100) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_HEAD, EVT_FLOAT(0.5)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_HEAD, LVar0, LVar1, LVar2, 60, TRUE) - EVT_WAIT(30) - EVT_CALL(PlaySoundAtModel, MODEL_k1, SOUND_DISTANT_THUD, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(N(StartRumbleWithParams), 100, 20) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtModel, MODEL_u1, SOUND_DISTANT_THUD, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.5)) - EVT_END_THREAD - EVT_CALL(N(StartRumbleWithParams), 150, 20) - EVT_WAIT(30) - EVT_CALL(PlaySoundAtModel, MODEL_p1, SOUND_DISTANT_THUD, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(N(StartRumbleWithParams), 100, 20) - EVT_WAIT(30) - EVT_CALL(PlaySoundAtModel, MODEL_d1, SOUND_DISTANT_THUD, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(0.7)) - EVT_END_THREAD - EVT_CALL(N(StartRumbleWithParams), 70, 20) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtModel, MODEL_s1, SOUND_DISTANT_THUD, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(N(StartRumbleWithParams), 100, 20) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtModel, MODEL_km1, SOUND_DISTANT_THUD, SOUND_SPACE_DEFAULT) - EVT_CALL(N(StartRumbleWithParams), 60, 20) - EVT_THREAD - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(0.6)) - EVT_END_THREAD - EVT_WAIT(20) - EVT_THREAD - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_CALL(N(StartRumbleWithParams), 30, 20) - EVT_RETURN - EVT_END + UseArray(FakeBowserAnimState) + Call(N(StartRumbleWithParams), 256, 30) + Thread + SetGroup(EVT_GROUP_00) + Call(ShakeCam, CAM_BATTLE, 0, 20, Float(3.0)) + EndThread + Call(SetPartFlagBits, ACTOR_SELF, PRT_HEAD, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) + Call(GetPartPos, ACTOR_SELF, PRT_HEAD, LVar0, LVar1, LVar2) + Call(SetPartDispOffset, ACTOR_SELF, PRT_HEAD, 0, -60, 0) + Set(LVar1, 60) + Call(SetPartPos, ACTOR_SELF, PRT_HEAD, LVar0, LVar1, LVar2) + Thread + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Loop(60) + Add(LVar0, 20) + Call(SetPartRotation, ACTOR_SELF, PRT_HEAD, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + Sub(LVar0, 60) + Set(LVar1, -200) + Add(LVar2, 100) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_HEAD, Float(0.5)) + Call(JumpPartTo, ACTOR_SELF, PRT_HEAD, LVar0, LVar1, LVar2, 60, TRUE) + Wait(30) + Call(PlaySoundAtModel, MODEL_k1, SOUND_DISTANT_THUD, SOUND_SPACE_DEFAULT) + Thread + SetGroup(EVT_GROUP_00) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + EndThread + Call(N(StartRumbleWithParams), 100, 20) + Wait(20) + Call(PlaySoundAtModel, MODEL_u1, SOUND_DISTANT_THUD, SOUND_SPACE_DEFAULT) + Thread + SetGroup(EVT_GROUP_00) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.5)) + EndThread + Call(N(StartRumbleWithParams), 150, 20) + Wait(30) + Call(PlaySoundAtModel, MODEL_p1, SOUND_DISTANT_THUD, SOUND_SPACE_DEFAULT) + Thread + SetGroup(EVT_GROUP_00) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.0)) + EndThread + Call(N(StartRumbleWithParams), 100, 20) + Wait(30) + Call(PlaySoundAtModel, MODEL_d1, SOUND_DISTANT_THUD, SOUND_SPACE_DEFAULT) + Thread + SetGroup(EVT_GROUP_00) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.7)) + EndThread + Call(N(StartRumbleWithParams), 70, 20) + Wait(20) + Call(PlaySoundAtModel, MODEL_s1, SOUND_DISTANT_THUD, SOUND_SPACE_DEFAULT) + Thread + SetGroup(EVT_GROUP_00) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.0)) + EndThread + Call(N(StartRumbleWithParams), 100, 20) + Wait(20) + Call(PlaySoundAtModel, MODEL_km1, SOUND_DISTANT_THUD, SOUND_SPACE_DEFAULT) + Call(N(StartRumbleWithParams), 60, 20) + Thread + SetGroup(EVT_GROUP_00) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.6)) + EndThread + Wait(20) + Thread + SetGroup(EVT_GROUP_00) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.3)) + EndThread + Call(N(StartRumbleWithParams), 30, 20) + Return + End }; s32 N(IdleBodyOffsets)[] = { @@ -553,23 +553,23 @@ s32 N(IdleBodyOffsets)[] = { }; EvtScript N(EVS_AnimBowser_IdleBody) = { - EVT_USE_ARRAY(FakeBowserAnimState) - EVT_USE_BUF(EVT_PTR(N(IdleBodyOffsets))) - EVT_LABEL(0) - EVT_SET(LVar0, ArrayVar(0)) - EVT_IF_NE(LVar0, ANIM_DOING_IDLE) - EVT_RETURN - EVT_END_IF - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar0, 255) - EVT_USE_BUF(EVT_PTR(N(IdleBodyOffsets))) - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_END_IF - EVT_CALL(SetActorDispOffset, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + UseArray(FakeBowserAnimState) + UseBuf(Ref(N(IdleBodyOffsets))) + Label(0) + Set(LVar0, ArrayVar(0)) + IfNe(LVar0, ANIM_DOING_IDLE) + Return + EndIf + BufRead3(LVar0, LVar1, LVar2) + IfEq(LVar0, 255) + UseBuf(Ref(N(IdleBodyOffsets))) + BufRead3(LVar0, LVar1, LVar2) + EndIf + Call(SetActorDispOffset, ACTOR_SELF, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; s32 N(MoveBodyOffsets)[] = { @@ -588,23 +588,23 @@ s32 N(MoveBodyOffsets)[] = { }; EvtScript N(EVS_AnimBowser_MoveBody) = { - EVT_USE_ARRAY(FakeBowserAnimState) - EVT_USE_BUF(EVT_PTR(N(MoveBodyOffsets))) - EVT_LABEL(0) - EVT_SET(LVar0, ArrayVar(0)) - EVT_IF_NE(LVar0, ANIM_DOING_MOVE) - EVT_RETURN - EVT_END_IF - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar0, 255) - EVT_USE_BUF(EVT_PTR(N(MoveBodyOffsets))) - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_END_IF - EVT_CALL(SetActorDispOffset, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + UseArray(FakeBowserAnimState) + UseBuf(Ref(N(MoveBodyOffsets))) + Label(0) + Set(LVar0, ArrayVar(0)) + IfNe(LVar0, ANIM_DOING_MOVE) + Return + EndIf + BufRead3(LVar0, LVar1, LVar2) + IfEq(LVar0, 255) + UseBuf(Ref(N(MoveBodyOffsets))) + BufRead3(LVar0, LVar1, LVar2) + EndIf + Call(SetActorDispOffset, ACTOR_SELF, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; s32 N(StrikeBodyOffsets)[] = { @@ -635,26 +635,26 @@ s32 N(StrikeBodyOffsets)[] = { }; EvtScript N(EVS_AnimBowser_StrikeBody) = { - EVT_USE_ARRAY(FakeBowserAnimState) - EVT_USE_BUF(EVT_PTR(N(StrikeBodyOffsets))) - EVT_LABEL(0) - EVT_SET(LVar0, ArrayVar(0)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ANIM_DOING_STRIKE) - EVT_CASE_EQ(ANIM_DOING_BLOCKED) - EVT_CASE_DEFAULT - EVT_RETURN - EVT_END_SWITCH - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar0, 255) - EVT_USE_BUF(EVT_PTR(N(StrikeBodyOffsets))) - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_END_IF - EVT_CALL(SetActorDispOffset, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + UseArray(FakeBowserAnimState) + UseBuf(Ref(N(StrikeBodyOffsets))) + Label(0) + Set(LVar0, ArrayVar(0)) + Switch(LVar0) + CaseEq(ANIM_DOING_STRIKE) + CaseEq(ANIM_DOING_BLOCKED) + CaseDefault + Return + EndSwitch + BufRead3(LVar0, LVar1, LVar2) + IfEq(LVar0, 255) + UseBuf(Ref(N(StrikeBodyOffsets))) + BufRead3(LVar0, LVar1, LVar2) + EndIf + Call(SetActorDispOffset, ACTOR_SELF, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; s32 N(HurtBodyOffsets)[] = { @@ -685,76 +685,76 @@ s32 N(HurtBodyOffsets)[] = { }; EvtScript N(EVS_AnimBowser_HurtBody) = { - EVT_USE_ARRAY(FakeBowserAnimState) - EVT_USE_BUF(EVT_PTR(N(HurtBodyOffsets))) - EVT_LABEL(0) - EVT_SET(LVar0, ArrayVar(0)) - EVT_IF_NE(LVar0, ANIM_DOING_HURT) - EVT_RETURN - EVT_END_IF - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar0, 255) - EVT_USE_BUF(EVT_PTR(N(HurtBodyOffsets))) - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_END_IF - EVT_CALL(SetActorDispOffset, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + UseArray(FakeBowserAnimState) + UseBuf(Ref(N(HurtBodyOffsets))) + Label(0) + Set(LVar0, ArrayVar(0)) + IfNe(LVar0, ANIM_DOING_HURT) + Return + EndIf + BufRead3(LVar0, LVar1, LVar2) + IfEq(LVar0, 255) + UseBuf(Ref(N(HurtBodyOffsets))) + BufRead3(LVar0, LVar1, LVar2) + EndIf + Call(SetActorDispOffset, ACTOR_SELF, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_AnimBowser_DeathBody) = { - EVT_USE_ARRAY(FakeBowserAnimState) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BODY, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) - EVT_CALL(GetPartPos, ACTOR_SELF, PRT_BODY, LVar0, LVar1, LVar2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_BODY, 0, -30, 0) - EVT_SET(LVar1, 30) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_BODY, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LOOP(80) - EVT_ADD(LVar0, -20) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_BODY, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_SUB(LVar0, 150) - EVT_SET(LVar1, -200) - EVT_SUB(LVar2, 200) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_BODY, EVT_FLOAT(0.3)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_BODY, LVar0, LVar1, LVar2, 80, TRUE) - EVT_RETURN - EVT_END + UseArray(FakeBowserAnimState) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) + Call(GetPartPos, ACTOR_SELF, PRT_BODY, LVar0, LVar1, LVar2) + Call(SetPartDispOffset, ACTOR_SELF, PRT_BODY, 0, -30, 0) + Set(LVar1, 30) + Call(SetPartPos, ACTOR_SELF, PRT_BODY, LVar0, LVar1, LVar2) + Thread + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Loop(80) + Add(LVar0, -20) + Call(SetPartRotation, ACTOR_SELF, PRT_BODY, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + Sub(LVar0, 150) + Set(LVar1, -200) + Sub(LVar2, 200) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_BODY, Float(0.3)) + Call(JumpPartTo, ACTOR_SELF, PRT_BODY, LVar0, LVar1, LVar2, 80, TRUE) + Return + End }; EvtScript N(EVS_AnimBowser_DeathShell) = { - EVT_USE_ARRAY(FakeBowserAnimState) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SHELL, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) - EVT_CALL(GetPartPos, ACTOR_SELF, PRT_SHELL, LVar0, LVar1, LVar2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_SHELL, 0, -24, 0) - EVT_SET(LVar1, 24) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_SHELL, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LOOP(60) - EVT_ADD(LVar0, 4) - EVT_ADD(LVar1, -1) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_SHELL, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, -200) - EVT_ADD(LVar2, 150) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_SHELL, EVT_FLOAT(0.5)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_SHELL, LVar0, LVar1, LVar2, 60, TRUE) - EVT_RETURN - EVT_END + UseArray(FakeBowserAnimState) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SHELL, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) + Call(GetPartPos, ACTOR_SELF, PRT_SHELL, LVar0, LVar1, LVar2) + Call(SetPartDispOffset, ACTOR_SELF, PRT_SHELL, 0, -24, 0) + Set(LVar1, 24) + Call(SetPartPos, ACTOR_SELF, PRT_SHELL, LVar0, LVar1, LVar2) + Thread + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Loop(60) + Add(LVar0, 4) + Add(LVar1, -1) + Call(SetPartRotation, ACTOR_SELF, PRT_SHELL, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + Add(LVar0, 30) + Set(LVar1, -200) + Add(LVar2, 150) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_SHELL, Float(0.5)) + Call(JumpPartTo, ACTOR_SELF, PRT_SHELL, LVar0, LVar1, LVar2, 60, TRUE) + Return + End }; // opposite of IdleBodyOffsets @@ -786,23 +786,23 @@ s32 N(IdleFeetOffsets)[] = { }; EvtScript N(EVS_AnimBowser_IdleFeet) = { - EVT_USE_ARRAY(FakeBowserAnimState) - EVT_USE_BUF(EVT_PTR(N(IdleFeetOffsets))) - EVT_LABEL(0) - EVT_SET(LVar0, ArrayVar(0)) - EVT_IF_NE(LVar0, ANIM_DOING_IDLE) - EVT_RETURN - EVT_END_IF - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar0, 255) - EVT_USE_BUF(EVT_PTR(N(IdleFeetOffsets))) - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_END_IF - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_FEET, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + UseArray(FakeBowserAnimState) + UseBuf(Ref(N(IdleFeetOffsets))) + Label(0) + Set(LVar0, ArrayVar(0)) + IfNe(LVar0, ANIM_DOING_IDLE) + Return + EndIf + BufRead3(LVar0, LVar1, LVar2) + IfEq(LVar0, 255) + UseBuf(Ref(N(IdleFeetOffsets))) + BufRead3(LVar0, LVar1, LVar2) + EndIf + Call(SetPartPos, ACTOR_SELF, PRT_FEET, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; // opposite of StrikeBodyOffsets @@ -834,26 +834,26 @@ s32 N(StrikeFeetOffsets)[] = { }; EvtScript N(EVS_AnimBowser_StrikeFeet) = { - EVT_USE_ARRAY(FakeBowserAnimState) - EVT_USE_BUF(EVT_PTR(N(StrikeFeetOffsets))) - EVT_LABEL(0) - EVT_SET(LVar0, ArrayVar(0)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ANIM_DOING_STRIKE) - EVT_CASE_EQ(ANIM_DOING_BLOCKED) - EVT_CASE_DEFAULT - EVT_RETURN - EVT_END_SWITCH - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar0, 255) - EVT_USE_BUF(EVT_PTR(N(StrikeFeetOffsets))) - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_END_IF - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_FEET, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + UseArray(FakeBowserAnimState) + UseBuf(Ref(N(StrikeFeetOffsets))) + Label(0) + Set(LVar0, ArrayVar(0)) + Switch(LVar0) + CaseEq(ANIM_DOING_STRIKE) + CaseEq(ANIM_DOING_BLOCKED) + CaseDefault + Return + EndSwitch + BufRead3(LVar0, LVar1, LVar2) + IfEq(LVar0, 255) + UseBuf(Ref(N(StrikeFeetOffsets))) + BufRead3(LVar0, LVar1, LVar2) + EndIf + Call(SetPartPos, ACTOR_SELF, PRT_FEET, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; // opposite of MoveBodyOffsets @@ -874,753 +874,753 @@ s32 N(MoveFeetOffsets)[] = { }; EvtScript N(EVS_AnimBowser_MoveFeet) = { - EVT_USE_ARRAY(FakeBowserAnimState) - EVT_USE_BUF(EVT_PTR(N(MoveFeetOffsets))) - EVT_LABEL(0) - EVT_SET(LVar0, ArrayVar(0)) - EVT_IF_NE(LVar0, ANIM_DOING_MOVE) - EVT_RETURN - EVT_END_IF - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar0, 255) - EVT_USE_BUF(EVT_PTR(N(MoveFeetOffsets))) - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_END_IF - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_FEET, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + UseArray(FakeBowserAnimState) + UseBuf(Ref(N(MoveFeetOffsets))) + Label(0) + Set(LVar0, ArrayVar(0)) + IfNe(LVar0, ANIM_DOING_MOVE) + Return + EndIf + BufRead3(LVar0, LVar1, LVar2) + IfEq(LVar0, 255) + UseBuf(Ref(N(MoveFeetOffsets))) + BufRead3(LVar0, LVar1, LVar2) + EndIf + Call(SetPartPos, ACTOR_SELF, PRT_FEET, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_AnimBowser_DeathFeet) = { - EVT_USE_ARRAY(FakeBowserAnimState) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FEET, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) - EVT_CALL(GetPartPos, ACTOR_SELF, PRT_FEET, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_FEET, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LOOP(80) - EVT_ADD(LVar0, -10) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_FEET, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_SUB(LVar0, 50) - EVT_SET(LVar1, -200) - EVT_SUB(LVar2, 200) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_FEET, EVT_FLOAT(0.3)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_FEET, LVar0, LVar1, LVar2, 80, TRUE) - EVT_RETURN - EVT_END + UseArray(FakeBowserAnimState) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FEET, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) + Call(GetPartPos, ACTOR_SELF, PRT_FEET, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_FEET, LVar0, LVar1, LVar2) + Thread + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Loop(80) + Add(LVar0, -10) + Call(SetPartRotation, ACTOR_SELF, PRT_FEET, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + Sub(LVar0, 50) + Set(LVar1, -200) + Sub(LVar2, 200) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_FEET, Float(0.3)) + Call(JumpPartTo, ACTOR_SELF, PRT_FEET, LVar0, LVar1, LVar2, 80, TRUE) + Return + End }; s32 N(StrikeArmAngles)[] = { - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(5.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(10.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(15.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(20.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(25.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(30.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(35.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(40.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(45.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(45.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(48.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(45.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(48.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(45.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(48.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(45.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(48.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(45.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(48.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(45.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(48.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(45.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(35.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(25.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(15.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(5.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), + Float(0.0), Float(0.0), Float(5.0), + Float(0.0), Float(0.0), Float(10.0), + Float(0.0), Float(0.0), Float(15.0), + Float(0.0), Float(0.0), Float(20.0), + Float(0.0), Float(0.0), Float(25.0), + Float(0.0), Float(0.0), Float(30.0), + Float(0.0), Float(0.0), Float(35.0), + Float(0.0), Float(0.0), Float(40.0), + Float(0.0), Float(0.0), Float(45.0), + Float(0.0), Float(0.0), Float(45.0), + Float(0.0), Float(0.0), Float(48.0), + Float(0.0), Float(0.0), Float(45.0), + Float(0.0), Float(0.0), Float(48.0), + Float(0.0), Float(0.0), Float(45.0), + Float(0.0), Float(0.0), Float(48.0), + Float(0.0), Float(0.0), Float(45.0), + Float(0.0), Float(0.0), Float(48.0), + Float(0.0), Float(0.0), Float(45.0), + Float(0.0), Float(0.0), Float(48.0), + Float(0.0), Float(0.0), Float(45.0), + Float(0.0), Float(0.0), Float(48.0), + Float(0.0), Float(0.0), Float(45.0), + Float(0.0), Float(0.0), Float(35.0), + Float(0.0), Float(0.0), Float(25.0), + Float(0.0), Float(0.0), Float(15.0), + Float(0.0), Float(0.0), Float(5.0), + Float(0.0), Float(0.0), Float(0.0), + Float(0.0), Float(0.0), Float(0.0), + Float(0.0), Float(0.0), Float(0.0), + Float(0.0), Float(0.0), Float(0.0), + Float(0.0), Float(0.0), Float(0.0), + Float(0.0), Float(0.0), Float(0.0), + Float(0.0), Float(0.0), Float(0.0), + Float(0.0), Float(0.0), Float(0.0), + Float(0.0), Float(0.0), Float(0.0), 255, 255, 255, }; EvtScript N(EVS_AnimBowser_StrikeArm) = { - EVT_USE_ARRAY(FakeBowserAnimState) - EVT_USE_FBUF(EVT_PTR(N(StrikeArmAngles))) - EVT_SET(LVarF, 0) - EVT_LABEL(0) - EVT_SET(LVar0, ArrayVar(0)) - EVT_IF_NE(LVar0, ANIM_DOING_STRIKE) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVarF, 0) - EVT_FBUF_READ3(LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar0, 255) - EVT_SET(LVarF, 1) - EVT_SET(LVar0, EVT_FLOAT(0.0)) - EVT_SET(LVar1, EVT_FLOAT(0.0)) - EVT_SET(LVar2, EVT_FLOAT(0.0)) - EVT_END_IF - EVT_END_IF - EVT_MULF(LVar2, EVT_FLOAT(-2.0)) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_LEFT_ARM, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + UseArray(FakeBowserAnimState) + UseFBuf(Ref(N(StrikeArmAngles))) + Set(LVarF, 0) + Label(0) + Set(LVar0, ArrayVar(0)) + IfNe(LVar0, ANIM_DOING_STRIKE) + Return + EndIf + IfEq(LVarF, 0) + FBufRead3(LVar0, LVar1, LVar2) + IfEq(LVar0, 255) + Set(LVarF, 1) + Set(LVar0, Float(0.0)) + Set(LVar1, Float(0.0)) + Set(LVar2, Float(0.0)) + EndIf + EndIf + MulF(LVar2, Float(-2.0)) + Call(SetPartRotation, ACTOR_SELF, PRT_LEFT_ARM, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_AnimBowser_BlockArm) = { - EVT_CALL(GetPartRotation, ACTOR_SELF, PRT_LEFT_ARM, LVar2, LVar3, LVar4) - EVT_CALL(MakeLerp, LVar4, 0, 20, EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_LEFT_ARM, EVT_FLOAT(0.0), EVT_FLOAT(0.0), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetPartRotation, ACTOR_SELF, PRT_LEFT_ARM, LVar2, LVar3, LVar4) + Call(MakeLerp, LVar4, 0, 20, EASING_LINEAR) + Label(0) + Call(UpdateLerp) + Call(SetPartRotation, ACTOR_SELF, PRT_LEFT_ARM, Float(0.0), Float(0.0), LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Return + End }; EvtScript N(EVS_AnimBowser_DeathLeftArm) = { - EVT_USE_ARRAY(FakeBowserAnimState) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_LEFT_ARM, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) - EVT_CALL(GetPartPos, ACTOR_SELF, PRT_LEFT_ARM, LVar0, LVar1, LVar2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_LEFT_ARM, 0, -60, 0) - EVT_SET(LVar1, 60) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_LEFT_ARM, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LOOP(80) - EVT_ADD(LVar0, 8) - EVT_ADD(LVar1, 10) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_LEFT_ARM, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_SUB(LVar0, 0) - EVT_SET(LVar1, -200) - EVT_ADD(LVar2, 100) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_LEFT_ARM, EVT_FLOAT(0.6)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_LEFT_ARM, LVar0, LVar1, LVar2, 80, TRUE) - EVT_RETURN - EVT_END + UseArray(FakeBowserAnimState) + Call(SetPartFlagBits, ACTOR_SELF, PRT_LEFT_ARM, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) + Call(GetPartPos, ACTOR_SELF, PRT_LEFT_ARM, LVar0, LVar1, LVar2) + Call(SetPartDispOffset, ACTOR_SELF, PRT_LEFT_ARM, 0, -60, 0) + Set(LVar1, 60) + Call(SetPartPos, ACTOR_SELF, PRT_LEFT_ARM, LVar0, LVar1, LVar2) + Thread + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Loop(80) + Add(LVar0, 8) + Add(LVar1, 10) + Call(SetPartRotation, ACTOR_SELF, PRT_LEFT_ARM, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + Sub(LVar0, 0) + Set(LVar1, -200) + Add(LVar2, 100) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_LEFT_ARM, Float(0.6)) + Call(JumpPartTo, ACTOR_SELF, PRT_LEFT_ARM, LVar0, LVar1, LVar2, 80, TRUE) + Return + End }; EvtScript N(EVS_AnimBowser_DeathRightArm) = { - EVT_USE_ARRAY(FakeBowserAnimState) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_RIGHT_ARM, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) - EVT_CALL(GetPartPos, ACTOR_SELF, PRT_RIGHT_ARM, LVar0, LVar1, LVar2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_RIGHT_ARM, 0, -60, 0) - EVT_SET(LVar1, 60) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_RIGHT_ARM, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 0) - EVT_SET(LVar1, -200) - EVT_SUB(LVar2, 200) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_RIGHT_ARM, EVT_FLOAT(0.4)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_RIGHT_ARM, LVar0, LVar1, LVar2, 80, TRUE) - EVT_RETURN - EVT_END + UseArray(FakeBowserAnimState) + Call(SetPartFlagBits, ACTOR_SELF, PRT_RIGHT_ARM, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) + Call(GetPartPos, ACTOR_SELF, PRT_RIGHT_ARM, LVar0, LVar1, LVar2) + Call(SetPartDispOffset, ACTOR_SELF, PRT_RIGHT_ARM, 0, -60, 0) + Set(LVar1, 60) + Call(SetPartPos, ACTOR_SELF, PRT_RIGHT_ARM, LVar0, LVar1, LVar2) + Sub(LVar0, 0) + Set(LVar1, -200) + Sub(LVar2, 200) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_RIGHT_ARM, Float(0.4)) + Call(JumpPartTo, ACTOR_SELF, PRT_RIGHT_ARM, LVar0, LVar1, LVar2, 80, TRUE) + Return + End }; s32 N(MoveWheelAngles)[] = { - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(20.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(40.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(60.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(80.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(100.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(120.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(140.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(160.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(180.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(200.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(220.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(240.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(260.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(280.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(300.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(320.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(340.0), - EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), + Float(0.0), Float(0.0), Float(20.0), + Float(0.0), Float(0.0), Float(40.0), + Float(0.0), Float(0.0), Float(60.0), + Float(0.0), Float(0.0), Float(80.0), + Float(0.0), Float(0.0), Float(100.0), + Float(0.0), Float(0.0), Float(120.0), + Float(0.0), Float(0.0), Float(140.0), + Float(0.0), Float(0.0), Float(160.0), + Float(0.0), Float(0.0), Float(180.0), + Float(0.0), Float(0.0), Float(200.0), + Float(0.0), Float(0.0), Float(220.0), + Float(0.0), Float(0.0), Float(240.0), + Float(0.0), Float(0.0), Float(260.0), + Float(0.0), Float(0.0), Float(280.0), + Float(0.0), Float(0.0), Float(300.0), + Float(0.0), Float(0.0), Float(320.0), + Float(0.0), Float(0.0), Float(340.0), + Float(0.0), Float(0.0), Float(0.0), 255, 255, 255 }; EvtScript N(EVS_AnimBowser_MoveWheels) = { - EVT_USE_ARRAY(FakeBowserAnimState) - EVT_USE_FBUF(EVT_PTR(N(MoveWheelAngles))) - EVT_LABEL(0) - EVT_SET(LVar0, ArrayVar(0)) - EVT_IF_NE(LVar0, ANIM_DOING_MOVE) - EVT_RETURN - EVT_END_IF - EVT_FBUF_READ3(LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar0, 255) - EVT_USE_FBUF(EVT_PTR(N(MoveWheelAngles))) - EVT_FBUF_READ3(LVar0, LVar1, LVar2) - EVT_END_IF - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_FRONT_WHEELS, LVar0, LVar1, LVar2) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_BACK_WHEELS, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + UseArray(FakeBowserAnimState) + UseFBuf(Ref(N(MoveWheelAngles))) + Label(0) + Set(LVar0, ArrayVar(0)) + IfNe(LVar0, ANIM_DOING_MOVE) + Return + EndIf + FBufRead3(LVar0, LVar1, LVar2) + IfEq(LVar0, 255) + UseFBuf(Ref(N(MoveWheelAngles))) + FBufRead3(LVar0, LVar1, LVar2) + EndIf + Call(SetPartRotation, ACTOR_SELF, PRT_FRONT_WHEELS, LVar0, LVar1, LVar2) + Call(SetPartRotation, ACTOR_SELF, PRT_BACK_WHEELS, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_AnimBowser_DeathFrontWheels) = { - EVT_USE_ARRAY(FakeBowserAnimState) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FRONT_WHEELS, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) - EVT_CALL(GetPartPos, ACTOR_SELF, PRT_FRONT_WHEELS, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_FRONT_WHEELS, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LOOP(80) - EVT_ADD(LVar0, 8) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_FRONT_WHEELS, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_SUB(LVar0, 150) - EVT_SET(LVar1, -200) - EVT_ADD(LVar2, 100) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_FRONT_WHEELS, EVT_FLOAT(0.3)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_FRONT_WHEELS, LVar0, LVar1, LVar2, 80, TRUE) - EVT_RETURN - EVT_END + UseArray(FakeBowserAnimState) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FRONT_WHEELS, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) + Call(GetPartPos, ACTOR_SELF, PRT_FRONT_WHEELS, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_FRONT_WHEELS, LVar0, LVar1, LVar2) + Thread + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Loop(80) + Add(LVar0, 8) + Call(SetPartRotation, ACTOR_SELF, PRT_FRONT_WHEELS, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + Sub(LVar0, 150) + Set(LVar1, -200) + Add(LVar2, 100) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_FRONT_WHEELS, Float(0.3)) + Call(JumpPartTo, ACTOR_SELF, PRT_FRONT_WHEELS, LVar0, LVar1, LVar2, 80, TRUE) + Return + End }; EvtScript N(EVS_AnimBowser_DeathBackWheels) = { - EVT_USE_ARRAY(FakeBowserAnimState) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BACK_WHEELS, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) - EVT_CALL(GetPartPos, ACTOR_SELF, PRT_BACK_WHEELS, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_BACK_WHEELS, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LOOP(80) - EVT_ADD(LVar0, 8) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_BACK_WHEELS, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_SUB(LVar0, 50) - EVT_SET(LVar1, -200) - EVT_SUB(LVar2, 100) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_BACK_WHEELS, EVT_FLOAT(0.3)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_BACK_WHEELS, LVar0, LVar1, LVar2, 80, TRUE) - EVT_WAIT(100) - EVT_RETURN - EVT_END + UseArray(FakeBowserAnimState) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BACK_WHEELS, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) + Call(GetPartPos, ACTOR_SELF, PRT_BACK_WHEELS, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_BACK_WHEELS, LVar0, LVar1, LVar2) + Thread + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Loop(80) + Add(LVar0, 8) + Call(SetPartRotation, ACTOR_SELF, PRT_BACK_WHEELS, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + Sub(LVar0, 50) + Set(LVar1, -200) + Sub(LVar2, 100) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_BACK_WHEELS, Float(0.3)) + Call(JumpPartTo, ACTOR_SELF, PRT_BACK_WHEELS, LVar0, LVar1, LVar2, 80, TRUE) + Wait(100) + Return + End }; EvtScript N(EVS_AnimBowser_DeathTail) = { - EVT_USE_ARRAY(FakeBowserAnimState) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_TAIL, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) - EVT_CALL(GetPartPos, ACTOR_SELF, PRT_TAIL, LVar0, LVar1, LVar2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_TAIL, 0, -30, 0) - EVT_SET(LVar1, 30) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_TAIL, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LOOP(80) - EVT_ADD(LVar0, 25) - EVT_ADD(LVar1, 1) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_TAIL, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_SUB(LVar0, 0) - EVT_SET(LVar1, -200) - EVT_ADD(LVar2, 200) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_TAIL, EVT_FLOAT(0.3)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_TAIL, LVar0, LVar1, LVar2, 80, TRUE) - EVT_RETURN - EVT_END + UseArray(FakeBowserAnimState) + Call(SetPartFlagBits, ACTOR_SELF, PRT_TAIL, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) + Call(GetPartPos, ACTOR_SELF, PRT_TAIL, LVar0, LVar1, LVar2) + Call(SetPartDispOffset, ACTOR_SELF, PRT_TAIL, 0, -30, 0) + Set(LVar1, 30) + Call(SetPartPos, ACTOR_SELF, PRT_TAIL, LVar0, LVar1, LVar2) + Thread + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Loop(80) + Add(LVar0, 25) + Add(LVar1, 1) + Call(SetPartRotation, ACTOR_SELF, PRT_TAIL, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + Sub(LVar0, 0) + Set(LVar1, -200) + Add(LVar2, 200) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_TAIL, Float(0.3)) + Call(JumpPartTo, ACTOR_SELF, PRT_TAIL, LVar0, LVar1, LVar2, 80, TRUE) + Return + End }; EvtScript N(EVS_FakeBowser_Idle) = { - EVT_USE_ARRAY(FakeBowserAnimState) - EVT_SET(LVarA, 0) - EVT_LABEL(0) + UseArray(FakeBowserAnimState) + Set(LVarA, 0) + Label(0) // update animation state. ANIM_BEGIN states start new animations, ANIM_DOING states continue them. - EVT_SET(LVar0, ArrayVar(0)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ANIM_BEGIN_IDLE) - EVT_SET(ArrayVar(0), ANIM_DOING_IDLE) - EVT_EXEC(N(EVS_AnimBowser_IdleBody)) - EVT_EXEC(N(EVS_AnimBowser_IdleFeet)) - EVT_EXEC(N(EVS_AnimBowser_IdleHead)) - EVT_CASE_EQ(ANIM_DOING_IDLE) - EVT_CASE_EQ(ANIM_BEGIN_HURT) - EVT_SET(ArrayVar(0), ANIM_DOING_HURT) - EVT_EXEC(N(EVS_AnimBowser_HurtBody)) - EVT_EXEC(N(EVS_AnimBowser_HurtHead)) - EVT_CASE_EQ(ANIM_DOING_HURT) - EVT_CASE_EQ(ANIM_BEGIN_MOVE) - EVT_SET(ArrayVar(0), ANIM_DOING_MOVE) - EVT_EXEC(N(EVS_AnimBowser_MoveBody)) - EVT_EXEC(N(EVS_AnimBowser_MoveFeet)) - EVT_EXEC(N(EVS_AnimBowser_MoveHead)) - EVT_EXEC(N(EVS_AnimBowser_MoveWheels)) - EVT_CASE_EQ(ANIM_DOING_MOVE) - EVT_CASE_EQ(ANIM_BEGIN_STRIKE) - EVT_SET(ArrayVar(0), ANIM_DOING_STRIKE) - EVT_EXEC(N(EVS_AnimBowser_StrikeBody)) - EVT_EXEC(N(EVS_AnimBowser_StrikeFeet)) - EVT_EXEC(N(EVS_AnimBowser_StrikeArm)) - EVT_CASE_EQ(ANIM_DOING_STRIKE) - EVT_CASE_EQ(ANIM_BEGIN_DEATH) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FAKE_BOWSER_BLAST) - EVT_SET(ArrayVar(0), ANIM_DOING_DEATH) - EVT_EXEC(N(EVS_AnimBowser_DeathMain)) - EVT_EXEC(N(EVS_AnimBowser_DeathBody)) - EVT_EXEC(N(EVS_AnimBowser_DeathShell)) - EVT_EXEC(N(EVS_AnimBowser_DeathLeftArm)) - EVT_EXEC(N(EVS_AnimBowser_DeathRightArm)) - EVT_EXEC(N(EVS_AnimBowser_DeathTail)) - EVT_EXEC(N(EVS_AnimBowser_DeathFrontWheels)) - EVT_EXEC(N(EVS_AnimBowser_DeathBackWheels)) - EVT_EXEC(N(EVS_AnimBowser_DeathFeet)) - EVT_EXEC(N(EVS_KoopaBrosEnter)) - EVT_CASE_EQ(ANIM_DOING_DEATH) - EVT_CASE_EQ(ANIM_BEGIN_BLOCKED) - EVT_SET(ArrayVar(0), ANIM_DOING_BLOCKED) - EVT_EXEC(N(EVS_AnimBowser_StrikeBody)) - EVT_EXEC(N(EVS_AnimBowser_StrikeFeet)) - EVT_EXEC(N(EVS_AnimBowser_BlockArm)) - EVT_CASE_EQ(ANIM_DOING_BLOCKED) - EVT_END_SWITCH + Set(LVar0, ArrayVar(0)) + Switch(LVar0) + CaseEq(ANIM_BEGIN_IDLE) + Set(ArrayVar(0), ANIM_DOING_IDLE) + Exec(N(EVS_AnimBowser_IdleBody)) + Exec(N(EVS_AnimBowser_IdleFeet)) + Exec(N(EVS_AnimBowser_IdleHead)) + CaseEq(ANIM_DOING_IDLE) + CaseEq(ANIM_BEGIN_HURT) + Set(ArrayVar(0), ANIM_DOING_HURT) + Exec(N(EVS_AnimBowser_HurtBody)) + Exec(N(EVS_AnimBowser_HurtHead)) + CaseEq(ANIM_DOING_HURT) + CaseEq(ANIM_BEGIN_MOVE) + Set(ArrayVar(0), ANIM_DOING_MOVE) + Exec(N(EVS_AnimBowser_MoveBody)) + Exec(N(EVS_AnimBowser_MoveFeet)) + Exec(N(EVS_AnimBowser_MoveHead)) + Exec(N(EVS_AnimBowser_MoveWheels)) + CaseEq(ANIM_DOING_MOVE) + CaseEq(ANIM_BEGIN_STRIKE) + Set(ArrayVar(0), ANIM_DOING_STRIKE) + Exec(N(EVS_AnimBowser_StrikeBody)) + Exec(N(EVS_AnimBowser_StrikeFeet)) + Exec(N(EVS_AnimBowser_StrikeArm)) + CaseEq(ANIM_DOING_STRIKE) + CaseEq(ANIM_BEGIN_DEATH) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FAKE_BOWSER_BLAST) + Set(ArrayVar(0), ANIM_DOING_DEATH) + Exec(N(EVS_AnimBowser_DeathMain)) + Exec(N(EVS_AnimBowser_DeathBody)) + Exec(N(EVS_AnimBowser_DeathShell)) + Exec(N(EVS_AnimBowser_DeathLeftArm)) + Exec(N(EVS_AnimBowser_DeathRightArm)) + Exec(N(EVS_AnimBowser_DeathTail)) + Exec(N(EVS_AnimBowser_DeathFrontWheels)) + Exec(N(EVS_AnimBowser_DeathBackWheels)) + Exec(N(EVS_AnimBowser_DeathFeet)) + Exec(N(EVS_KoopaBrosEnter)) + CaseEq(ANIM_DOING_DEATH) + CaseEq(ANIM_BEGIN_BLOCKED) + Set(ArrayVar(0), ANIM_DOING_BLOCKED) + Exec(N(EVS_AnimBowser_StrikeBody)) + Exec(N(EVS_AnimBowser_StrikeFeet)) + Exec(N(EVS_AnimBowser_BlockArm)) + CaseEq(ANIM_DOING_BLOCKED) + EndSwitch // sync the positions of the models to corresponding actor parts - EVT_CALL(GetPartPos, ACTOR_SELF, PRT_HEAD, LVar0, LVar1, LVar2) - EVT_CALL(TranslateGroup, MODEL_atama, LVar0, LVar1, LVar2) - EVT_CALL(GetPartRotation, ACTOR_SELF, PRT_HEAD, LVar0, LVar1, LVar2) - EVT_CALL(RotateGroup, MODEL_atama, LVar0, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_atama, LVar1, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_atama, LVar2, 0, 0, 1) - EVT_CALL(SetModelFlags, MODEL_k1, MODEL_FLAG_IGNORE_FOG, TRUE) - EVT_CALL(SetModelFlags, MODEL_k2, MODEL_FLAG_IGNORE_FOG, TRUE) - EVT_CALL(SetModelFlags, MODEL_k3, MODEL_FLAG_IGNORE_FOG, TRUE) - EVT_CALL(SetModelFlags, MODEL_k4, MODEL_FLAG_IGNORE_FOG, TRUE) - EVT_CALL(SetModelFlags, MODEL_k5, MODEL_FLAG_IGNORE_FOG, TRUE) - EVT_CALL(SetModelFlags, MODEL_k6, MODEL_FLAG_IGNORE_FOG, TRUE) - EVT_CALL(SetModelFlags, MODEL_k7, MODEL_FLAG_IGNORE_FOG, TRUE) - EVT_CALL(SetModelFlags, MODEL_k8, MODEL_FLAG_IGNORE_FOG, TRUE) - EVT_CALL(SetModelFlags, MODEL_k9, MODEL_FLAG_IGNORE_FOG, TRUE) - EVT_CALL(GetPartPos, ACTOR_SELF, PRT_BODY, LVar0, LVar1, LVar2) - EVT_CALL(TranslateGroup, MODEL_dou, LVar0, LVar1, LVar2) - EVT_CALL(GetPartRotation, ACTOR_SELF, PRT_BODY, LVar0, LVar1, LVar2) - EVT_CALL(RotateGroup, MODEL_dou, LVar0, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_dou, LVar1, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_dou, LVar2, 0, 0, 1) - EVT_CALL(SetModelFlags, MODEL_d1, MODEL_FLAG_IGNORE_FOG, TRUE) - EVT_CALL(SetModelFlags, MODEL_d2, MODEL_FLAG_IGNORE_FOG, TRUE) - EVT_CALL(SetModelFlags, MODEL_d3, MODEL_FLAG_IGNORE_FOG, TRUE) - EVT_CALL(GetPartPos, ACTOR_SELF, PRT_SHELL, LVar0, LVar1, LVar2) - EVT_CALL(TranslateGroup, MODEL_koura, LVar0, LVar1, LVar2) - EVT_CALL(GetPartRotation, ACTOR_SELF, PRT_SHELL, LVar0, LVar1, LVar2) - EVT_CALL(RotateGroup, MODEL_koura, LVar0, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_koura, LVar1, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_koura, LVar2, 0, 0, 1) - EVT_CALL(SetModelFlags, MODEL_s1, MODEL_FLAG_IGNORE_FOG, TRUE) - EVT_CALL(SetModelFlags, MODEL_s2, MODEL_FLAG_IGNORE_FOG, TRUE) - EVT_CALL(SetModelFlags, MODEL_s3, MODEL_FLAG_IGNORE_FOG, TRUE) - EVT_CALL(SetModelFlags, MODEL_s4, MODEL_FLAG_IGNORE_FOG, TRUE) - EVT_CALL(SetModelFlags, MODEL_s5, MODEL_FLAG_IGNORE_FOG, TRUE) - EVT_CALL(GetPartPos, ACTOR_SELF, PRT_LEFT_ARM, LVar0, LVar1, LVar2) - EVT_CALL(TranslateGroup, MODEL_left_arm, LVar0, LVar1, LVar2) - EVT_CALL(GetPartRotation, ACTOR_SELF, PRT_LEFT_ARM, LVar0, LVar1, LVar2) - EVT_CALL(RotateGroup, MODEL_left_arm, LVar0, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_left_arm, LVar1, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_left_arm, LVar2, 0, 0, 1) - EVT_CALL(SetModelFlags, MODEL_u1, MODEL_FLAG_IGNORE_FOG, TRUE) - EVT_CALL(SetModelFlags, MODEL_u2, MODEL_FLAG_IGNORE_FOG, TRUE) - EVT_CALL(SetModelFlags, MODEL_u3, MODEL_FLAG_IGNORE_FOG, TRUE) - EVT_CALL(GetPartPos, ACTOR_SELF, PRT_TAIL, LVar0, LVar1, LVar2) - EVT_CALL(TranslateGroup, MODEL_shippo, LVar0, LVar1, LVar2) - EVT_CALL(GetPartRotation, ACTOR_SELF, PRT_TAIL, LVar0, LVar1, LVar2) - EVT_CALL(RotateGroup, MODEL_shippo, LVar0, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_shippo, LVar1, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_shippo, LVar2, 0, 0, 1) - EVT_CALL(SetModelFlags, MODEL_p1, MODEL_FLAG_IGNORE_FOG, TRUE) - EVT_SET(LVar0, ArrayVar(0)) - EVT_IF_EQ(LVar0, ANIM_DOING_DEATH) - EVT_CALL(GetPartPos, ACTOR_SELF, PRT_FRONT_WHEELS, LVar0, LVar1, LVar2) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_END_IF - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_FRONT_WHEELS, LVar0, LVar1, LVar2) - EVT_CALL(TranslateGroup, MODEL_koma1, LVar0, LVar1, LVar2) - EVT_CALL(GetPartRotation, ACTOR_SELF, PRT_FRONT_WHEELS, LVar0, LVar1, LVar2) - EVT_CALL(RotateGroup, MODEL_koma1, LVar0, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_koma1, LVar1, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_koma1, LVar2, 0, 0, 1) - EVT_CALL(SetModelFlags, MODEL_km1, MODEL_FLAG_IGNORE_FOG, TRUE) - EVT_SET(LVar0, ArrayVar(0)) - EVT_IF_EQ(LVar0, ANIM_DOING_DEATH) - EVT_CALL(GetPartPos, ACTOR_SELF, PRT_BACK_WHEELS, LVar0, LVar1, LVar2) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_END_IF - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_BACK_WHEELS, LVar0, LVar1, LVar2) - EVT_CALL(TranslateGroup, MODEL_koma2, LVar0, LVar1, LVar2) - EVT_CALL(GetPartRotation, ACTOR_SELF, PRT_BACK_WHEELS, LVar0, LVar1, LVar2) - EVT_CALL(RotateGroup, MODEL_koma2, LVar0, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_koma2, LVar1, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_koma2, LVar2, 0, 0, 1) - EVT_CALL(SetModelFlags, MODEL_km2, MODEL_FLAG_IGNORE_FOG, TRUE) - EVT_CALL(GetPartPos, ACTOR_SELF, PRT_RIGHT_ARM, LVar0, LVar1, LVar2) - EVT_CALL(TranslateGroup, MODEL_right_arm, LVar0, LVar1, LVar2) - EVT_CALL(GetPartRotation, ACTOR_SELF, PRT_RIGHT_ARM, LVar0, LVar1, LVar2) - EVT_CALL(RotateGroup, MODEL_right_arm, LVar0, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_right_arm, LVar1, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_right_arm, LVar2, 0, 0, 1) - EVT_CALL(SetModelFlags, MODEL_o171, MODEL_FLAG_IGNORE_FOG, TRUE) - EVT_CALL(SetModelFlags, MODEL_o172, MODEL_FLAG_IGNORE_FOG, TRUE) - EVT_CALL(SetModelFlags, MODEL_o183, MODEL_FLAG_IGNORE_FOG, TRUE) - EVT_CALL(GetPartPos, ACTOR_SELF, PRT_FEET, LVar0, LVar1, LVar2) - EVT_CALL(TranslateGroup, MODEL_ashi, LVar0, LVar1, LVar2) - EVT_CALL(GetPartRotation, ACTOR_SELF, PRT_FEET, LVar0, LVar1, LVar2) - EVT_CALL(RotateGroup, MODEL_ashi, LVar0, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_ashi, LVar1, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_ashi, LVar2, 0, 0, 1) - EVT_CALL(SetModelFlags, MODEL_o118, MODEL_FLAG_IGNORE_FOG, TRUE) - EVT_CALL(SetModelFlags, MODEL_o120, MODEL_FLAG_IGNORE_FOG, TRUE) - EVT_CALL(SetModelFlags, MODEL_o165, MODEL_FLAG_IGNORE_FOG, TRUE) + Call(GetPartPos, ACTOR_SELF, PRT_HEAD, LVar0, LVar1, LVar2) + Call(TranslateGroup, MODEL_atama, LVar0, LVar1, LVar2) + Call(GetPartRotation, ACTOR_SELF, PRT_HEAD, LVar0, LVar1, LVar2) + Call(RotateGroup, MODEL_atama, LVar0, 1, 0, 0) + Call(RotateGroup, MODEL_atama, LVar1, 0, 1, 0) + Call(RotateGroup, MODEL_atama, LVar2, 0, 0, 1) + Call(SetModelFlags, MODEL_k1, MODEL_FLAG_IGNORE_FOG, TRUE) + Call(SetModelFlags, MODEL_k2, MODEL_FLAG_IGNORE_FOG, TRUE) + Call(SetModelFlags, MODEL_k3, MODEL_FLAG_IGNORE_FOG, TRUE) + Call(SetModelFlags, MODEL_k4, MODEL_FLAG_IGNORE_FOG, TRUE) + Call(SetModelFlags, MODEL_k5, MODEL_FLAG_IGNORE_FOG, TRUE) + Call(SetModelFlags, MODEL_k6, MODEL_FLAG_IGNORE_FOG, TRUE) + Call(SetModelFlags, MODEL_k7, MODEL_FLAG_IGNORE_FOG, TRUE) + Call(SetModelFlags, MODEL_k8, MODEL_FLAG_IGNORE_FOG, TRUE) + Call(SetModelFlags, MODEL_k9, MODEL_FLAG_IGNORE_FOG, TRUE) + Call(GetPartPos, ACTOR_SELF, PRT_BODY, LVar0, LVar1, LVar2) + Call(TranslateGroup, MODEL_dou, LVar0, LVar1, LVar2) + Call(GetPartRotation, ACTOR_SELF, PRT_BODY, LVar0, LVar1, LVar2) + Call(RotateGroup, MODEL_dou, LVar0, 1, 0, 0) + Call(RotateGroup, MODEL_dou, LVar1, 0, 1, 0) + Call(RotateGroup, MODEL_dou, LVar2, 0, 0, 1) + Call(SetModelFlags, MODEL_d1, MODEL_FLAG_IGNORE_FOG, TRUE) + Call(SetModelFlags, MODEL_d2, MODEL_FLAG_IGNORE_FOG, TRUE) + Call(SetModelFlags, MODEL_d3, MODEL_FLAG_IGNORE_FOG, TRUE) + Call(GetPartPos, ACTOR_SELF, PRT_SHELL, LVar0, LVar1, LVar2) + Call(TranslateGroup, MODEL_koura, LVar0, LVar1, LVar2) + Call(GetPartRotation, ACTOR_SELF, PRT_SHELL, LVar0, LVar1, LVar2) + Call(RotateGroup, MODEL_koura, LVar0, 1, 0, 0) + Call(RotateGroup, MODEL_koura, LVar1, 0, 1, 0) + Call(RotateGroup, MODEL_koura, LVar2, 0, 0, 1) + Call(SetModelFlags, MODEL_s1, MODEL_FLAG_IGNORE_FOG, TRUE) + Call(SetModelFlags, MODEL_s2, MODEL_FLAG_IGNORE_FOG, TRUE) + Call(SetModelFlags, MODEL_s3, MODEL_FLAG_IGNORE_FOG, TRUE) + Call(SetModelFlags, MODEL_s4, MODEL_FLAG_IGNORE_FOG, TRUE) + Call(SetModelFlags, MODEL_s5, MODEL_FLAG_IGNORE_FOG, TRUE) + Call(GetPartPos, ACTOR_SELF, PRT_LEFT_ARM, LVar0, LVar1, LVar2) + Call(TranslateGroup, MODEL_left_arm, LVar0, LVar1, LVar2) + Call(GetPartRotation, ACTOR_SELF, PRT_LEFT_ARM, LVar0, LVar1, LVar2) + Call(RotateGroup, MODEL_left_arm, LVar0, 1, 0, 0) + Call(RotateGroup, MODEL_left_arm, LVar1, 0, 1, 0) + Call(RotateGroup, MODEL_left_arm, LVar2, 0, 0, 1) + Call(SetModelFlags, MODEL_u1, MODEL_FLAG_IGNORE_FOG, TRUE) + Call(SetModelFlags, MODEL_u2, MODEL_FLAG_IGNORE_FOG, TRUE) + Call(SetModelFlags, MODEL_u3, MODEL_FLAG_IGNORE_FOG, TRUE) + Call(GetPartPos, ACTOR_SELF, PRT_TAIL, LVar0, LVar1, LVar2) + Call(TranslateGroup, MODEL_shippo, LVar0, LVar1, LVar2) + Call(GetPartRotation, ACTOR_SELF, PRT_TAIL, LVar0, LVar1, LVar2) + Call(RotateGroup, MODEL_shippo, LVar0, 1, 0, 0) + Call(RotateGroup, MODEL_shippo, LVar1, 0, 1, 0) + Call(RotateGroup, MODEL_shippo, LVar2, 0, 0, 1) + Call(SetModelFlags, MODEL_p1, MODEL_FLAG_IGNORE_FOG, TRUE) + Set(LVar0, ArrayVar(0)) + IfEq(LVar0, ANIM_DOING_DEATH) + Call(GetPartPos, ACTOR_SELF, PRT_FRONT_WHEELS, LVar0, LVar1, LVar2) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + EndIf + Call(SetPartPos, ACTOR_SELF, PRT_FRONT_WHEELS, LVar0, LVar1, LVar2) + Call(TranslateGroup, MODEL_koma1, LVar0, LVar1, LVar2) + Call(GetPartRotation, ACTOR_SELF, PRT_FRONT_WHEELS, LVar0, LVar1, LVar2) + Call(RotateGroup, MODEL_koma1, LVar0, 1, 0, 0) + Call(RotateGroup, MODEL_koma1, LVar1, 0, 1, 0) + Call(RotateGroup, MODEL_koma1, LVar2, 0, 0, 1) + Call(SetModelFlags, MODEL_km1, MODEL_FLAG_IGNORE_FOG, TRUE) + Set(LVar0, ArrayVar(0)) + IfEq(LVar0, ANIM_DOING_DEATH) + Call(GetPartPos, ACTOR_SELF, PRT_BACK_WHEELS, LVar0, LVar1, LVar2) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + EndIf + Call(SetPartPos, ACTOR_SELF, PRT_BACK_WHEELS, LVar0, LVar1, LVar2) + Call(TranslateGroup, MODEL_koma2, LVar0, LVar1, LVar2) + Call(GetPartRotation, ACTOR_SELF, PRT_BACK_WHEELS, LVar0, LVar1, LVar2) + Call(RotateGroup, MODEL_koma2, LVar0, 1, 0, 0) + Call(RotateGroup, MODEL_koma2, LVar1, 0, 1, 0) + Call(RotateGroup, MODEL_koma2, LVar2, 0, 0, 1) + Call(SetModelFlags, MODEL_km2, MODEL_FLAG_IGNORE_FOG, TRUE) + Call(GetPartPos, ACTOR_SELF, PRT_RIGHT_ARM, LVar0, LVar1, LVar2) + Call(TranslateGroup, MODEL_right_arm, LVar0, LVar1, LVar2) + Call(GetPartRotation, ACTOR_SELF, PRT_RIGHT_ARM, LVar0, LVar1, LVar2) + Call(RotateGroup, MODEL_right_arm, LVar0, 1, 0, 0) + Call(RotateGroup, MODEL_right_arm, LVar1, 0, 1, 0) + Call(RotateGroup, MODEL_right_arm, LVar2, 0, 0, 1) + Call(SetModelFlags, MODEL_o171, MODEL_FLAG_IGNORE_FOG, TRUE) + Call(SetModelFlags, MODEL_o172, MODEL_FLAG_IGNORE_FOG, TRUE) + Call(SetModelFlags, MODEL_o183, MODEL_FLAG_IGNORE_FOG, TRUE) + Call(GetPartPos, ACTOR_SELF, PRT_FEET, LVar0, LVar1, LVar2) + Call(TranslateGroup, MODEL_ashi, LVar0, LVar1, LVar2) + Call(GetPartRotation, ACTOR_SELF, PRT_FEET, LVar0, LVar1, LVar2) + Call(RotateGroup, MODEL_ashi, LVar0, 1, 0, 0) + Call(RotateGroup, MODEL_ashi, LVar1, 0, 1, 0) + Call(RotateGroup, MODEL_ashi, LVar2, 0, 0, 1) + Call(SetModelFlags, MODEL_o118, MODEL_FLAG_IGNORE_FOG, TRUE) + Call(SetModelFlags, MODEL_o120, MODEL_FLAG_IGNORE_FOG, TRUE) + Call(SetModelFlags, MODEL_o165, MODEL_FLAG_IGNORE_FOG, TRUE) // spawn puffs of smoke if health is low enough // written to have different effects at every quintile, but every case in the final // version just executes the same script - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_IF_NOT_FLAG(LVar0, AFLAG_Boss_Dialogue_HaveATaste) // odd reuse/misuse of flag. always FALSE here. - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar1) - EVT_MUL(LVar0, 100) - EVT_DIV(LVar0, LVar1) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CASE_LT(20) - EVT_IF_GT(LVarA, 20) - EVT_EXEC(N(EVS_SpawnDamageFX)) - EVT_SET(LVarA, 0) - EVT_END_IF - EVT_CASE_LT(40) - EVT_IF_GT(LVarA, 40) - EVT_EXEC(N(EVS_SpawnDamageFX)) - EVT_SET(LVarA, 0) - EVT_END_IF - EVT_CASE_LT(60) - EVT_IF_GT(LVarA, 60) - EVT_EXEC(N(EVS_SpawnDamageFX)) - EVT_SET(LVarA, 0) - EVT_END_IF - EVT_CASE_LT(80) - EVT_IF_GT(LVarA, 80) - EVT_EXEC(N(EVS_SpawnDamageFX)) - EVT_SET(LVarA, 0) - EVT_END_IF - EVT_END_SWITCH - EVT_ADD(LVarA, 1) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + IfNotFlag(LVar0, AFLAG_Boss_Dialogue_HaveATaste) // odd reuse/misuse of flag. always FALSE here. + Call(GetActorHP, ACTOR_SELF, LVar0) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar1) + Mul(LVar0, 100) + Div(LVar0, LVar1) + Switch(LVar0) + CaseEq(0) + CaseLt(20) + IfGt(LVarA, 20) + Exec(N(EVS_SpawnDamageFX)) + Set(LVarA, 0) + EndIf + CaseLt(40) + IfGt(LVarA, 40) + Exec(N(EVS_SpawnDamageFX)) + Set(LVarA, 0) + EndIf + CaseLt(60) + IfGt(LVarA, 60) + Exec(N(EVS_SpawnDamageFX)) + Set(LVarA, 0) + EndIf + CaseLt(80) + IfGt(LVarA, 80) + Exec(N(EVS_SpawnDamageFX)) + Set(LVarA, 0) + EndIf + EndSwitch + Add(LVarA, 1) + EndIf + Wait(1) + Goto(0) + Return + End }; // (in) LVarA : remaining health percent EvtScript N(EVS_SpawnDamageFX) = { - EVT_DIV(LVarA, 4) - EVT_ADD(LVarA, 1) - EVT_CALL(RandInt, LVarA, LVar3) - EVT_ADD(LVar3, 1) - EVT_WAIT(LVar3) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -8) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, LVar0, 98, 0, 0, 0, 0) - EVT_CALL(RandInt, LVarA, LVar3) - EVT_ADD(LVar3, 1) - EVT_WAIT(LVar3) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -12) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, LVar0, 23, 0, 0, 0, 0) - EVT_CALL(RandInt, LVarA, LVar3) - EVT_ADD(LVar3, 1) - EVT_WAIT(LVar3) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -47) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, LVar0, 70, 0, 0, 0, 0) - EVT_CALL(RandInt, LVarA, LVar3) - EVT_ADD(LVar3, 1) - EVT_WAIT(LVar3) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, LVar0, 22, 0, 0, 0, 0) - EVT_CALL(RandInt, LVarA, LVar3) - EVT_ADD(LVar3, 1) - EVT_WAIT(LVar3) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -19) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, LVar0, 59, 33, 0, 0, 0) - EVT_RETURN - EVT_END + Div(LVarA, 4) + Add(LVarA, 1) + Call(RandInt, LVarA, LVar3) + Add(LVar3, 1) + Wait(LVar3) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, -8) + PlayEffect(EFFECT_WALKING_DUST, 2, LVar0, 98, 0, 0, 0, 0) + Call(RandInt, LVarA, LVar3) + Add(LVar3, 1) + Wait(LVar3) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, -12) + PlayEffect(EFFECT_WALKING_DUST, 2, LVar0, 23, 0, 0, 0, 0) + Call(RandInt, LVarA, LVar3) + Add(LVar3, 1) + Wait(LVar3) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, -47) + PlayEffect(EFFECT_WALKING_DUST, 2, LVar0, 70, 0, 0, 0, 0) + Call(RandInt, LVarA, LVar3) + Add(LVar3, 1) + Wait(LVar3) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + PlayEffect(EFFECT_WALKING_DUST, 2, LVar0, 22, 0, 0, 0, 0) + Call(RandInt, LVarA, LVar3) + Add(LVar3, 1) + Wait(LVar3) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, -19) + PlayEffect(EFFECT_WALKING_DUST, 2, LVar0, 59, 33, 0, 0, 0) + Return + End }; EvtScript N(EVS_FakeBowser_HandleEvent) = { - EVT_USE_ARRAY(FakeBowserAnimState) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_SET(ArrayVar(0), ANIM_BEGIN_HURT) - EVT_WAIT(20) - EVT_SET(ArrayVar(0), ANIM_BEGIN_IDLE) - EVT_CASE_EQ(EVENT_HIT) - EVT_SET(ArrayVar(0), ANIM_BEGIN_HURT) - EVT_WAIT(20) - EVT_SET(ArrayVar(0), ANIM_BEGIN_IDLE) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_SET(ArrayVar(0), ANIM_BEGIN_HURT) - EVT_WAIT(20) - EVT_SET(ArrayVar(0), ANIM_BEGIN_IDLE) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_DEATH) - EVT_CASE_OR_EQ(EVENT_BURN_DEATH) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_IF_EQ(LVar0, EVENT_BURN_DEATH) - EVT_CALL(N(SetModelTintMode), APPLY_TINT_MODELS, EVT_PTR(N(BowserModels)), ENV_TINT_REMAP) - EVT_CALL(N(SetModelTintParams), ENV_TINT_REMAP, 35, 35, 35, 0, 0, 0, 0, 0, 0) - EVT_END_IF - EVT_SET(ArrayVar(0), ANIM_BEGIN_HURT) - EVT_WAIT(20) - EVT_IF_EQ(LVar0, EVENT_BURN_DEATH) - EVT_CALL(N(SetModelTintMode), APPLY_TINT_MODELS, EVT_PTR(N(BowserModels)), ENV_TINT_NONE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorSize, ACTOR_SELF, LVar3, LVar4) - EVT_DIVF(LVar3, EVT_FLOAT(2.0)) - EVT_ADDF(LVar1, LVar3) - EVT_ADDF(LVar2, EVT_FLOAT(5.0)) - EVT_DIVF(LVar3, EVT_FLOAT(10.0)) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, LVar3, 10, 0) - EVT_WAIT(5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, LVar3, 10, 0) - EVT_END_IF - EVT_CALL(ActorSpeak, MSG_CH1_0106, ACTOR_SELF, PRT_TARGET, -1, -1) - EVT_WAIT(30) - EVT_SET(ArrayVar(0), ANIM_BEGIN_DEATH) - EVT_LABEL(20) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_WAIT(1) - EVT_IF_NOT_FLAG(LVar0, AFLAG_Boss_KoopaBrosRevealed) - EVT_GOTO(20) - EVT_END_IF - EVT_WAIT(20) - EVT_EXEC_WAIT(N(EVS_TryFormingTower)) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar0) - EVT_CALL(SetEnemyHP, ACTOR_SELF, LVar0) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_BURN_CONTACT) - EVT_CASE_OR_EQ(EVENT_BURN_HIT) - EVT_CALL(N(SetModelTintMode), APPLY_TINT_MODELS, EVT_PTR(N(BowserModels)), ENV_TINT_REMAP) - EVT_CALL(N(SetModelTintParams), ENV_TINT_REMAP, 35, 35, 35, 0, 0, 0, 0, 0, 0) - EVT_SET(ArrayVar(0), ANIM_BEGIN_HURT) - EVT_WAIT(20) - EVT_SET(ArrayVar(0), ANIM_BEGIN_IDLE) - EVT_CALL(N(SetModelTintMode), APPLY_TINT_MODELS, EVT_PTR(N(BowserModels)), ENV_TINT_NONE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorSize, ACTOR_SELF, LVar3, LVar4) - EVT_DIVF(LVar3, EVT_FLOAT(2.0)) - EVT_ADDF(LVar1, LVar3) - EVT_ADDF(LVar2, EVT_FLOAT(5.0)) - EVT_DIVF(LVar3, EVT_FLOAT(10.0)) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, LVar3, 10, 0) - EVT_WAIT(5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, LVar3, 10, 0) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + UseArray(FakeBowserAnimState) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + Set(ArrayVar(0), ANIM_BEGIN_HURT) + Wait(20) + Set(ArrayVar(0), ANIM_BEGIN_IDLE) + CaseEq(EVENT_HIT) + Set(ArrayVar(0), ANIM_BEGIN_HURT) + Wait(20) + Set(ArrayVar(0), ANIM_BEGIN_IDLE) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + Set(ArrayVar(0), ANIM_BEGIN_HURT) + Wait(20) + Set(ArrayVar(0), ANIM_BEGIN_IDLE) + EndCaseGroup + CaseOrEq(EVENT_DEATH) + CaseOrEq(EVENT_BURN_DEATH) + Call(HideHealthBar, ACTOR_SELF) + IfEq(LVar0, EVENT_BURN_DEATH) + Call(N(SetModelTintMode), APPLY_TINT_MODELS, Ref(N(BowserModels)), ENV_TINT_REMAP) + Call(N(SetModelTintParams), ENV_TINT_REMAP, 35, 35, 35, 0, 0, 0, 0, 0, 0) + EndIf + Set(ArrayVar(0), ANIM_BEGIN_HURT) + Wait(20) + IfEq(LVar0, EVENT_BURN_DEATH) + Call(N(SetModelTintMode), APPLY_TINT_MODELS, Ref(N(BowserModels)), ENV_TINT_NONE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorSize, ACTOR_SELF, LVar3, LVar4) + DivF(LVar3, Float(2.0)) + AddF(LVar1, LVar3) + AddF(LVar2, Float(5.0)) + DivF(LVar3, Float(10.0)) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, LVar3, 10, 0) + Wait(5) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, LVar3, 10, 0) + EndIf + Call(ActorSpeak, MSG_CH1_0106, ACTOR_SELF, PRT_TARGET, -1, -1) + Wait(30) + Set(ArrayVar(0), ANIM_BEGIN_DEATH) + Label(20) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + Wait(1) + IfNotFlag(LVar0, AFLAG_Boss_KoopaBrosRevealed) + Goto(20) + EndIf + Wait(20) + ExecWait(N(EVS_TryFormingTower)) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar0) + Call(SetEnemyHP, ACTOR_SELF, LVar0) + Return + EndCaseGroup + CaseOrEq(EVENT_BURN_CONTACT) + CaseOrEq(EVENT_BURN_HIT) + Call(N(SetModelTintMode), APPLY_TINT_MODELS, Ref(N(BowserModels)), ENV_TINT_REMAP) + Call(N(SetModelTintParams), ENV_TINT_REMAP, 35, 35, 35, 0, 0, 0, 0, 0, 0) + Set(ArrayVar(0), ANIM_BEGIN_HURT) + Wait(20) + Set(ArrayVar(0), ANIM_BEGIN_IDLE) + Call(N(SetModelTintMode), APPLY_TINT_MODELS, Ref(N(BowserModels)), ENV_TINT_NONE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorSize, ACTOR_SELF, LVar3, LVar4) + DivF(LVar3, Float(2.0)) + AddF(LVar1, LVar3) + AddF(LVar2, Float(5.0)) + DivF(LVar3, Float(10.0)) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, LVar3, 10, 0) + Wait(5) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, LVar3, 10, 0) + EndCaseGroup + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_FakeBowser_TakeTurn) = { - EVT_USE_ARRAY(FakeBowserAnimState) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_THREAD - EVT_LOOP(4) - EVT_CALL(N(StartRumbleWithParams), 256, 3) - EVT_WAIT(5) - EVT_END_LOOP - EVT_END_THREAD - EVT_SET(ArrayVar(0), ANIM_BEGIN_MOVE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 70, 0, 0) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_SET(ArrayVar(0), ANIM_BEGIN_IDLE) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FAKE_BOWSER_SWING) - EVT_WAIT(22) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FAKE_BOWSER_STRIKE) - EVT_END_THREAD - EVT_SET(ArrayVar(0), ANIM_BEGIN_STRIKE) - EVT_WAIT(24) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_IF_EQ(LVar0, HIT_RESULT_LUCKY) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_THREAD - EVT_END_IF - EVT_WAIT(8) - EVT_THREAD - EVT_LOOP(4) - EVT_CALL(N(StartRumbleWithParams), 256, 5) - EVT_WAIT(8) - EVT_END_LOOP - EVT_END_THREAD - EVT_SET(ArrayVar(0), ANIM_BEGIN_MOVE) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_SET(ArrayVar(0), ANIM_BEGIN_IDLE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, SUPPRESS_EVENT_ALL, 0, DMG_STRIKE, BS_FLAGS1_NICE_HIT) - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS1_ATK_BLOCKED) - EVT_CALL(GetPlayerHP, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_SET(ArrayVar(0), ANIM_BEGIN_BLOCKED) - EVT_END_IF - EVT_END_IF - EVT_WAIT(18) - EVT_THREAD - EVT_LOOP(4) - EVT_CALL(N(StartRumbleWithParams), 256, 5) - EVT_WAIT(8) - EVT_END_LOOP - EVT_END_THREAD - EVT_SET(ArrayVar(0), ANIM_BEGIN_MOVE) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_SET(ArrayVar(0), ANIM_BEGIN_IDLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_CALL(GetPlayerHP, LVar0) - EVT_IF_LE(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(EnableBattleStatusBar, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 28, 75, -101) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(SetBattleCamZoom, 500) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(15) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_BowserTaunts, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(ActorSpeak, MSG_CH1_00FE, ACTOR_SELF, PRT_TARGET, -1, -1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Boss_BowserTaunts, 1) - EVT_CASE_EQ(1) - EVT_CALL(ActorSpeak, MSG_CH1_00FF, ACTOR_SELF, PRT_TARGET, -1, -1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Boss_BowserTaunts, 2) - EVT_CASE_EQ(2) - EVT_CALL(ActorSpeak, MSG_CH1_0100, ACTOR_SELF, PRT_TARGET, -1, -1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 85, 81, 0) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(SetBattleCamZoom, 249) - EVT_CALL(MoveBattleCamOver, 10) - EVT_WAIT(10) - EVT_CALL(ActorSpeak, MSG_CH1_0101, ACTOR_SELF, PRT_TARGET, -1, -1) - EVT_WAIT(10) - EVT_CALL(ActorSpeak, MSG_CH1_0102, ACTOR_SELF, PRT_TARGET, -1, -1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Boss_BowserTaunts, 3) - EVT_CASE_EQ(3) - EVT_CALL(ActorSpeak, MSG_CH1_0103, ACTOR_SELF, PRT_TARGET, -1, -1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 85, 81, 0) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(SetBattleCamZoom, 249) - EVT_CALL(MoveBattleCamOver, 10) - EVT_WAIT(10) - EVT_CALL(ActorSpeak, MSG_CH1_0104, ACTOR_SELF, PRT_TARGET, -1, -1) - EVT_WAIT(10) - EVT_CALL(ActorSpeak, MSG_CH1_0105, ACTOR_SELF, PRT_TARGET, -1, -1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Boss_BowserTaunts, 1) - EVT_END_SWITCH - EVT_CALL(EnableBattleStatusBar, TRUE) - EVT_RETURN - EVT_END + UseArray(FakeBowserAnimState) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Thread + Loop(4) + Call(N(StartRumbleWithParams), 256, 3) + Wait(5) + EndLoop + EndThread + Set(ArrayVar(0), ANIM_BEGIN_MOVE) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 70, 0, 0) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Set(ArrayVar(0), ANIM_BEGIN_IDLE) + Thread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FAKE_BOWSER_SWING) + Wait(22) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FAKE_BOWSER_STRIKE) + EndThread + Set(ArrayVar(0), ANIM_BEGIN_STRIKE) + Wait(24) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + IfEq(LVar0, HIT_RESULT_LUCKY) + Thread + Wait(15) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndThread + EndIf + Wait(8) + Thread + Loop(4) + Call(N(StartRumbleWithParams), 256, 5) + Wait(8) + EndLoop + EndThread + Set(ArrayVar(0), ANIM_BEGIN_MOVE) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Set(ArrayVar(0), ANIM_BEGIN_IDLE) + Return + EndCaseGroup + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, SUPPRESS_EVENT_ALL, 0, DMG_STRIKE, BS_FLAGS1_NICE_HIT) + Call(GetBattleFlags, LVar0) + IfFlag(LVar0, BS_FLAGS1_ATK_BLOCKED) + Call(GetPlayerHP, LVar0) + IfNe(LVar0, 0) + Set(ArrayVar(0), ANIM_BEGIN_BLOCKED) + EndIf + EndIf + Wait(18) + Thread + Loop(4) + Call(N(StartRumbleWithParams), 256, 5) + Wait(8) + EndLoop + EndThread + Set(ArrayVar(0), ANIM_BEGIN_MOVE) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Set(ArrayVar(0), ANIM_BEGIN_IDLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Call(GetPlayerHP, LVar0) + IfLe(LVar0, 0) + Return + EndIf + Call(EnableBattleStatusBar, FALSE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 28, 75, -101) + Call(SetBattleCamOffsetZ, 0) + Call(SetBattleCamZoom, 500) + Call(MoveBattleCamOver, 20) + Wait(15) + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_BowserTaunts, LVar0) + Switch(LVar0) + CaseEq(0) + Call(ActorSpeak, MSG_CH1_00FE, ACTOR_SELF, PRT_TARGET, -1, -1) + Call(SetActorVar, ACTOR_SELF, AVAR_Boss_BowserTaunts, 1) + CaseEq(1) + Call(ActorSpeak, MSG_CH1_00FF, ACTOR_SELF, PRT_TARGET, -1, -1) + Call(SetActorVar, ACTOR_SELF, AVAR_Boss_BowserTaunts, 2) + CaseEq(2) + Call(ActorSpeak, MSG_CH1_0100, ACTOR_SELF, PRT_TARGET, -1, -1) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 85, 81, 0) + Call(SetBattleCamOffsetZ, 0) + Call(SetBattleCamZoom, 249) + Call(MoveBattleCamOver, 10) + Wait(10) + Call(ActorSpeak, MSG_CH1_0101, ACTOR_SELF, PRT_TARGET, -1, -1) + Wait(10) + Call(ActorSpeak, MSG_CH1_0102, ACTOR_SELF, PRT_TARGET, -1, -1) + Call(SetActorVar, ACTOR_SELF, AVAR_Boss_BowserTaunts, 3) + CaseEq(3) + Call(ActorSpeak, MSG_CH1_0103, ACTOR_SELF, PRT_TARGET, -1, -1) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 85, 81, 0) + Call(SetBattleCamOffsetZ, 0) + Call(SetBattleCamZoom, 249) + Call(MoveBattleCamOver, 10) + Wait(10) + Call(ActorSpeak, MSG_CH1_0104, ACTOR_SELF, PRT_TARGET, -1, -1) + Wait(10) + Call(ActorSpeak, MSG_CH1_0105, ACTOR_SELF, PRT_TARGET, -1, -1) + Call(SetActorVar, ACTOR_SELF, AVAR_Boss_BowserTaunts, 1) + EndSwitch + Call(EnableBattleStatusBar, TRUE) + Return + End }; EvtScript N(EVS_FakeBowser_HandlePhase) = { - EVT_USE_ARRAY(FakeBowserAnimState) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_IF_NOT_FLAG(LVar0, AFLAG_Boss_Dialogue_BowserReveal) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, -4, 46, -2) - EVT_CALL(SetBattleCamYaw, 24) - EVT_CALL(SetBattleCamOffsetZ, 30) - EVT_CALL(SetBattleCamZoom, 461) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(30) - EVT_CALL(ActorSpeak, MSG_CH1_00FD, ACTOR_SELF, PRT_TARGET, -1, -1) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FAKE_BOWSER_SWING) - EVT_WAIT(22) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FAKE_BOWSER_STRIKE) - EVT_END_THREAD - EVT_SET(ArrayVar(0), ANIM_BEGIN_STRIKE) - EVT_WAIT(30) - EVT_SET(ArrayVar(0), ANIM_BEGIN_IDLE) - EVT_CALL(EndActorSpeech, ACTOR_SELF, PRT_TARGET, -1, -1) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AFLAG_Boss_Dialogue_BowserReveal) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(20) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + UseArray(FakeBowserAnimState) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + IfNotFlag(LVar0, AFLAG_Boss_Dialogue_BowserReveal) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, -4, 46, -2) + Call(SetBattleCamYaw, 24) + Call(SetBattleCamOffsetZ, 30) + Call(SetBattleCamZoom, 461) + Call(MoveBattleCamOver, 30) + Wait(30) + Call(ActorSpeak, MSG_CH1_00FD, ACTOR_SELF, PRT_TARGET, -1, -1) + Thread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FAKE_BOWSER_SWING) + Wait(22) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FAKE_BOWSER_STRIKE) + EndThread + Set(ArrayVar(0), ANIM_BEGIN_STRIKE) + Wait(30) + Set(ArrayVar(0), ANIM_BEGIN_IDLE) + Call(EndActorSpeech, ACTOR_SELF, PRT_TARGET, -1, -1) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseOrConst(LVar0, AFLAG_Boss_Dialogue_BowserReveal) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(20) + EndIf + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; // ------------------------------------------------------------------------- @@ -1633,191 +1633,191 @@ API_CALLABLE(N(PlayKoopaBrosSong)) { } EvtScript N(EVS_KoopaBrosEnter) = { - EVT_CALL(UseIdleAnimation, GREEN_ACTOR, FALSE) - EVT_CALL(EnableIdleScript, GREEN_ACTOR, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorPos, GREEN_ACTOR, 100, 0, 10) - EVT_CALL(SetAnimation, GREEN_ACTOR, 1, ANIM_KoopaBros_Green_Launched) - EVT_THREAD - EVT_CALL(SetActorJumpGravity, GREEN_ACTOR, EVT_FLOAT(0.4)) - EVT_CALL(SetActorSounds, GREEN_ACTOR, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(SetGoalPos, GREEN_ACTOR, -300, 250, 0) - EVT_CALL(JumpToGoal, GREEN_ACTOR, 50, FALSE, TRUE, FALSE) - EVT_END_THREAD - EVT_CALL(UseIdleAnimation, YELLOW_ACTOR, FALSE) - EVT_CALL(EnableIdleScript, YELLOW_ACTOR, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorPos, YELLOW_ACTOR, 100, 0, 10) - EVT_CALL(SetAnimation, YELLOW_ACTOR, 1, ANIM_KoopaBros_Yellow_Launched) - EVT_THREAD - EVT_CALL(SetActorJumpGravity, YELLOW_ACTOR, EVT_FLOAT(0.4)) - EVT_CALL(SetActorSounds, YELLOW_ACTOR, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(SetGoalPos, YELLOW_ACTOR, -200, 250, 0) - EVT_CALL(JumpToGoal, YELLOW_ACTOR, 50, FALSE, TRUE, FALSE) - EVT_END_THREAD - EVT_CALL(UseIdleAnimation, BLACK_ACTOR, FALSE) - EVT_CALL(EnableIdleScript, BLACK_ACTOR, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorPos, BLACK_ACTOR, 100, 0, 10) - EVT_CALL(SetAnimation, BLACK_ACTOR, 1, ANIM_KoopaBros_Black_Launched) - EVT_THREAD - EVT_CALL(SetActorJumpGravity, BLACK_ACTOR, EVT_FLOAT(0.4)) - EVT_CALL(SetActorSounds, BLACK_ACTOR, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(SetGoalPos, BLACK_ACTOR, 0, 250, 0) - EVT_CALL(JumpToGoal, BLACK_ACTOR, 50, FALSE, TRUE, FALSE) - EVT_END_THREAD - EVT_CALL(UseIdleAnimation, RED_ACTOR, FALSE) - EVT_CALL(EnableIdleScript, RED_ACTOR, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorPos, RED_ACTOR, 100, 0, 10) - EVT_CALL(SetAnimation, RED_ACTOR, 1, ANIM_KoopaBros_Red_Launched) - EVT_THREAD - EVT_CALL(SetActorJumpGravity, RED_ACTOR, EVT_FLOAT(0.4)) - EVT_CALL(SetActorSounds, RED_ACTOR, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(SetGoalPos, RED_ACTOR, 150, 250, 0) - EVT_CALL(JumpToGoal, RED_ACTOR, 50, FALSE, TRUE, FALSE) - EVT_END_THREAD - EVT_WAIT(100) - EVT_WAIT(100) - EVT_CALL(EnableGroup, MODEL_atama, FALSE) - EVT_CALL(EnableGroup, MODEL_left_arm, FALSE) - EVT_CALL(EnableGroup, MODEL_shippo, FALSE) - EVT_CALL(EnableGroup, MODEL_dou, FALSE) - EVT_CALL(EnableGroup, MODEL_koura, FALSE) - EVT_CALL(EnableGroup, MODEL_koma1, FALSE) - EVT_CALL(EnableGroup, MODEL_koma2, FALSE) - EVT_CALL(EnableGroup, MODEL_right_arm, FALSE) - EVT_CALL(EnableGroup, MODEL_ashi, FALSE) - EVT_THREAD - EVT_WAIT(23) - EVT_CALL(PlaySoundAtActor, GREEN_ACTOR, SOUND_FALL_QUICK) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, YELLOW_ACTOR, SOUND_FALL_QUICK) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, BLACK_ACTOR, SOUND_FALL_QUICK) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, RED_ACTOR, SOUND_FALL_QUICK) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetAnimation, GREEN_ACTOR, 1, ANIM_KoopaBros_Green_Land) - EVT_CALL(SetActorPos, GREEN_ACTOR, 20, 250, 0) - EVT_CALL(SetGoalPos, GREEN_ACTOR, 20, 0, 0) - EVT_CALL(SetActorJumpGravity, GREEN_ACTOR, EVT_FLOAT(1.5)) - EVT_CALL(SetActorSounds, GREEN_ACTOR, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(FallToGoal, GREEN_ACTOR, 30) - EVT_CALL(PlaySoundAtActor, GREEN_ACTOR, SOUND_KOOPA_BROS_LAND) - EVT_CALL(ResetActorSounds, GREEN_ACTOR, ACTOR_SOUND_JUMP) - EVT_CALL(ForceHomePos, GREEN_ACTOR, 20, 0, 0) - EVT_CALL(SetAnimation, GREEN_ACTOR, 1, ANIM_KoopaBros_Green_IdleCrouch) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetAnimation, YELLOW_ACTOR, 1, ANIM_KoopaBros_Yellow_Land) - EVT_CALL(SetActorPos, YELLOW_ACTOR, 60, 250, -5) - EVT_CALL(SetGoalPos, YELLOW_ACTOR, 60, 0, -5) - EVT_CALL(SetActorJumpGravity, YELLOW_ACTOR, EVT_FLOAT(1.5)) - EVT_CALL(SetActorSounds, YELLOW_ACTOR, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(FallToGoal, YELLOW_ACTOR, 30) - EVT_CALL(PlaySoundAtActor, YELLOW_ACTOR, SOUND_KOOPA_BROS_LAND) - EVT_CALL(ResetActorSounds, YELLOW_ACTOR, ACTOR_SOUND_JUMP) - EVT_CALL(ForceHomePos, YELLOW_ACTOR, 60, 0, -5) - EVT_CALL(SetAnimation, YELLOW_ACTOR, 1, ANIM_KoopaBros_Yellow_IdleCrouch) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetAnimation, BLACK_ACTOR, 1, ANIM_KoopaBros_Black_Land) - EVT_CALL(SetActorPos, BLACK_ACTOR, 100, 250, -10) - EVT_CALL(SetGoalPos, BLACK_ACTOR, 100, 0, -10) - EVT_CALL(SetActorJumpGravity, BLACK_ACTOR, EVT_FLOAT(1.5)) - EVT_CALL(SetActorSounds, BLACK_ACTOR, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(FallToGoal, BLACK_ACTOR, 30) - EVT_CALL(PlaySoundAtActor, BLACK_ACTOR, SOUND_KOOPA_BROS_LAND) - EVT_CALL(ResetActorSounds, BLACK_ACTOR, ACTOR_SOUND_JUMP) - EVT_CALL(ForceHomePos, BLACK_ACTOR, 100, 0, -10) - EVT_CALL(SetAnimation, BLACK_ACTOR, 1, ANIM_KoopaBros_Black_IdleCrouch) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(SetAnimation, RED_ACTOR, 1, ANIM_KoopaBros_Red_Land) - EVT_CALL(SetActorPos, RED_ACTOR, 140, 250, -15) - EVT_CALL(SetGoalPos, RED_ACTOR, 140, 0, -15) - EVT_CALL(SetActorJumpGravity, RED_ACTOR, EVT_FLOAT(1.5)) - EVT_CALL(SetActorSounds, RED_ACTOR, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(FallToGoal, RED_ACTOR, 30) - EVT_CALL(PlaySoundAtActor, RED_ACTOR, SOUND_KOOPA_BROS_LAND) - EVT_CALL(ResetActorSounds, RED_ACTOR, ACTOR_SOUND_JUMP) - EVT_CALL(ForceHomePos, RED_ACTOR, 140, 0, -15) - EVT_CALL(SetAnimation, RED_ACTOR, 1, ANIM_KoopaBros_Red_IdleCrouch) - EVT_END_THREAD - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 70, 46, 0) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(SetBattleCamZoom, 292) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(28) - EVT_CALL(SetAnimation, GREEN_ACTOR, 1, ANIM_KoopaBros_Green_ThumbsUp) - EVT_WAIT(5) - EVT_CALL(GetActorPos, GREEN_ACTOR, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 7) - EVT_ADD(LVar1, 28) - EVT_ADD(LVar2, 5) - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 30, 0) - EVT_CALL(PlaySoundAtActor, GREEN_ACTOR, SOUND_SMALL_LENS_FLARE) - EVT_CALL(SetAnimation, YELLOW_ACTOR, 1, ANIM_KoopaBros_Yellow_ThumbsUp) - EVT_WAIT(5) - EVT_CALL(GetActorPos, YELLOW_ACTOR, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 7) - EVT_ADD(LVar1, 28) - EVT_ADD(LVar2, 5) - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 30, 0) - EVT_CALL(PlaySoundAtActor, YELLOW_ACTOR, SOUND_SMALL_LENS_FLARE) - EVT_CALL(SetAnimation, BLACK_ACTOR, 1, ANIM_KoopaBros_Black_ThumbsUp) - EVT_WAIT(5) - EVT_CALL(GetActorPos, BLACK_ACTOR, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 7) - EVT_ADD(LVar1, 28) - EVT_ADD(LVar2, 5) - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 30, 0) - EVT_CALL(PlaySoundAtActor, BLACK_ACTOR, SOUND_SMALL_LENS_FLARE) - EVT_CALL(SetAnimation, RED_ACTOR, 1, ANIM_KoopaBros_Red_ThumbsUp) - EVT_WAIT(5) - EVT_CALL(GetActorPos, RED_ACTOR, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 7) - EVT_ADD(LVar1, 28) - EVT_ADD(LVar2, 5) - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 30, 0) - EVT_CALL(PlaySoundAtActor, RED_ACTOR, SOUND_SMALL_LENS_FLARE) - EVT_WAIT(30) - EVT_CALL(N(PlayKoopaBrosSong)) - EVT_CALL(ActorSpeak, MSG_CH1_0107, YELLOW_ACTOR, 1, -1, -1) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_HEALTH_BAR | ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_TARGET, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_TOWER, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_TARGET, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_TOWER, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_KoopaBros_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_KoopaBros_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_KoopaBros_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_KoopaBros_HandlePhase))) - EVT_CALL(SetActorFlagBits, GREEN_ACTOR, ACTOR_FLAG_NO_HEALTH_BAR, FALSE) - EVT_CALL(SetPartFlagBits, GREEN_ACTOR, 1, ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(HPBarToHome, GREEN_ACTOR) - EVT_CALL(SetAnimation, GREEN_ACTOR, 1, ANIM_KoopaBros_Green_Idle) - EVT_CALL(SetActorFlagBits, YELLOW_ACTOR, ACTOR_FLAG_NO_HEALTH_BAR, FALSE) - EVT_CALL(SetPartFlagBits, YELLOW_ACTOR, 1, ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(HPBarToHome, YELLOW_ACTOR) - EVT_CALL(SetAnimation, YELLOW_ACTOR, 1, ANIM_KoopaBros_Yellow_Idle) - EVT_CALL(SetActorFlagBits, BLACK_ACTOR, ACTOR_FLAG_NO_HEALTH_BAR, FALSE) - EVT_CALL(SetPartFlagBits, BLACK_ACTOR, 1, ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(HPBarToHome, BLACK_ACTOR) - EVT_CALL(SetAnimation, BLACK_ACTOR, 1, ANIM_KoopaBros_Black_Idle) - EVT_CALL(SetActorFlagBits, RED_ACTOR, ACTOR_FLAG_NO_HEALTH_BAR, FALSE) - EVT_CALL(SetPartFlagBits, RED_ACTOR, 1, ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(HPBarToHome, RED_ACTOR) - EVT_CALL(SetAnimation, RED_ACTOR, 1, ANIM_KoopaBros_Red_Idle) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, AVAL_Boss_TowerState_Toppled) // prevents first-turn tower attack - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AFLAG_Boss_KoopaBrosRevealed) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, GREEN_ACTOR, FALSE) + Call(EnableIdleScript, GREEN_ACTOR, IDLE_SCRIPT_DISABLE) + Call(SetActorPos, GREEN_ACTOR, 100, 0, 10) + Call(SetAnimation, GREEN_ACTOR, 1, ANIM_KoopaBros_Green_Launched) + Thread + Call(SetActorJumpGravity, GREEN_ACTOR, Float(0.4)) + Call(SetActorSounds, GREEN_ACTOR, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(SetGoalPos, GREEN_ACTOR, -300, 250, 0) + Call(JumpToGoal, GREEN_ACTOR, 50, FALSE, TRUE, FALSE) + EndThread + Call(UseIdleAnimation, YELLOW_ACTOR, FALSE) + Call(EnableIdleScript, YELLOW_ACTOR, IDLE_SCRIPT_DISABLE) + Call(SetActorPos, YELLOW_ACTOR, 100, 0, 10) + Call(SetAnimation, YELLOW_ACTOR, 1, ANIM_KoopaBros_Yellow_Launched) + Thread + Call(SetActorJumpGravity, YELLOW_ACTOR, Float(0.4)) + Call(SetActorSounds, YELLOW_ACTOR, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(SetGoalPos, YELLOW_ACTOR, -200, 250, 0) + Call(JumpToGoal, YELLOW_ACTOR, 50, FALSE, TRUE, FALSE) + EndThread + Call(UseIdleAnimation, BLACK_ACTOR, FALSE) + Call(EnableIdleScript, BLACK_ACTOR, IDLE_SCRIPT_DISABLE) + Call(SetActorPos, BLACK_ACTOR, 100, 0, 10) + Call(SetAnimation, BLACK_ACTOR, 1, ANIM_KoopaBros_Black_Launched) + Thread + Call(SetActorJumpGravity, BLACK_ACTOR, Float(0.4)) + Call(SetActorSounds, BLACK_ACTOR, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(SetGoalPos, BLACK_ACTOR, 0, 250, 0) + Call(JumpToGoal, BLACK_ACTOR, 50, FALSE, TRUE, FALSE) + EndThread + Call(UseIdleAnimation, RED_ACTOR, FALSE) + Call(EnableIdleScript, RED_ACTOR, IDLE_SCRIPT_DISABLE) + Call(SetActorPos, RED_ACTOR, 100, 0, 10) + Call(SetAnimation, RED_ACTOR, 1, ANIM_KoopaBros_Red_Launched) + Thread + Call(SetActorJumpGravity, RED_ACTOR, Float(0.4)) + Call(SetActorSounds, RED_ACTOR, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(SetGoalPos, RED_ACTOR, 150, 250, 0) + Call(JumpToGoal, RED_ACTOR, 50, FALSE, TRUE, FALSE) + EndThread + Wait(100) + Wait(100) + Call(EnableGroup, MODEL_atama, FALSE) + Call(EnableGroup, MODEL_left_arm, FALSE) + Call(EnableGroup, MODEL_shippo, FALSE) + Call(EnableGroup, MODEL_dou, FALSE) + Call(EnableGroup, MODEL_koura, FALSE) + Call(EnableGroup, MODEL_koma1, FALSE) + Call(EnableGroup, MODEL_koma2, FALSE) + Call(EnableGroup, MODEL_right_arm, FALSE) + Call(EnableGroup, MODEL_ashi, FALSE) + Thread + Wait(23) + Call(PlaySoundAtActor, GREEN_ACTOR, SOUND_FALL_QUICK) + Wait(5) + Call(PlaySoundAtActor, YELLOW_ACTOR, SOUND_FALL_QUICK) + Wait(5) + Call(PlaySoundAtActor, BLACK_ACTOR, SOUND_FALL_QUICK) + Wait(5) + Call(PlaySoundAtActor, RED_ACTOR, SOUND_FALL_QUICK) + EndThread + Thread + Call(SetAnimation, GREEN_ACTOR, 1, ANIM_KoopaBros_Green_Land) + Call(SetActorPos, GREEN_ACTOR, 20, 250, 0) + Call(SetGoalPos, GREEN_ACTOR, 20, 0, 0) + Call(SetActorJumpGravity, GREEN_ACTOR, Float(1.5)) + Call(SetActorSounds, GREEN_ACTOR, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(FallToGoal, GREEN_ACTOR, 30) + Call(PlaySoundAtActor, GREEN_ACTOR, SOUND_KOOPA_BROS_LAND) + Call(ResetActorSounds, GREEN_ACTOR, ACTOR_SOUND_JUMP) + Call(ForceHomePos, GREEN_ACTOR, 20, 0, 0) + Call(SetAnimation, GREEN_ACTOR, 1, ANIM_KoopaBros_Green_IdleCrouch) + EndThread + Thread + Wait(5) + Call(SetAnimation, YELLOW_ACTOR, 1, ANIM_KoopaBros_Yellow_Land) + Call(SetActorPos, YELLOW_ACTOR, 60, 250, -5) + Call(SetGoalPos, YELLOW_ACTOR, 60, 0, -5) + Call(SetActorJumpGravity, YELLOW_ACTOR, Float(1.5)) + Call(SetActorSounds, YELLOW_ACTOR, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(FallToGoal, YELLOW_ACTOR, 30) + Call(PlaySoundAtActor, YELLOW_ACTOR, SOUND_KOOPA_BROS_LAND) + Call(ResetActorSounds, YELLOW_ACTOR, ACTOR_SOUND_JUMP) + Call(ForceHomePos, YELLOW_ACTOR, 60, 0, -5) + Call(SetAnimation, YELLOW_ACTOR, 1, ANIM_KoopaBros_Yellow_IdleCrouch) + EndThread + Thread + Wait(10) + Call(SetAnimation, BLACK_ACTOR, 1, ANIM_KoopaBros_Black_Land) + Call(SetActorPos, BLACK_ACTOR, 100, 250, -10) + Call(SetGoalPos, BLACK_ACTOR, 100, 0, -10) + Call(SetActorJumpGravity, BLACK_ACTOR, Float(1.5)) + Call(SetActorSounds, BLACK_ACTOR, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(FallToGoal, BLACK_ACTOR, 30) + Call(PlaySoundAtActor, BLACK_ACTOR, SOUND_KOOPA_BROS_LAND) + Call(ResetActorSounds, BLACK_ACTOR, ACTOR_SOUND_JUMP) + Call(ForceHomePos, BLACK_ACTOR, 100, 0, -10) + Call(SetAnimation, BLACK_ACTOR, 1, ANIM_KoopaBros_Black_IdleCrouch) + EndThread + Thread + Wait(15) + Call(SetAnimation, RED_ACTOR, 1, ANIM_KoopaBros_Red_Land) + Call(SetActorPos, RED_ACTOR, 140, 250, -15) + Call(SetGoalPos, RED_ACTOR, 140, 0, -15) + Call(SetActorJumpGravity, RED_ACTOR, Float(1.5)) + Call(SetActorSounds, RED_ACTOR, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(FallToGoal, RED_ACTOR, 30) + Call(PlaySoundAtActor, RED_ACTOR, SOUND_KOOPA_BROS_LAND) + Call(ResetActorSounds, RED_ACTOR, ACTOR_SOUND_JUMP) + Call(ForceHomePos, RED_ACTOR, 140, 0, -15) + Call(SetAnimation, RED_ACTOR, 1, ANIM_KoopaBros_Red_IdleCrouch) + EndThread + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 70, 46, 0) + Call(SetBattleCamOffsetZ, 0) + Call(SetBattleCamZoom, 292) + Call(MoveBattleCamOver, 20) + Wait(28) + Call(SetAnimation, GREEN_ACTOR, 1, ANIM_KoopaBros_Green_ThumbsUp) + Wait(5) + Call(GetActorPos, GREEN_ACTOR, LVar0, LVar1, LVar2) + Add(LVar0, 7) + Add(LVar1, 28) + Add(LVar2, 5) + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 30, 0) + Call(PlaySoundAtActor, GREEN_ACTOR, SOUND_SMALL_LENS_FLARE) + Call(SetAnimation, YELLOW_ACTOR, 1, ANIM_KoopaBros_Yellow_ThumbsUp) + Wait(5) + Call(GetActorPos, YELLOW_ACTOR, LVar0, LVar1, LVar2) + Add(LVar0, 7) + Add(LVar1, 28) + Add(LVar2, 5) + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 30, 0) + Call(PlaySoundAtActor, YELLOW_ACTOR, SOUND_SMALL_LENS_FLARE) + Call(SetAnimation, BLACK_ACTOR, 1, ANIM_KoopaBros_Black_ThumbsUp) + Wait(5) + Call(GetActorPos, BLACK_ACTOR, LVar0, LVar1, LVar2) + Add(LVar0, 7) + Add(LVar1, 28) + Add(LVar2, 5) + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 30, 0) + Call(PlaySoundAtActor, BLACK_ACTOR, SOUND_SMALL_LENS_FLARE) + Call(SetAnimation, RED_ACTOR, 1, ANIM_KoopaBros_Red_ThumbsUp) + Wait(5) + Call(GetActorPos, RED_ACTOR, LVar0, LVar1, LVar2) + Add(LVar0, 7) + Add(LVar1, 28) + Add(LVar2, 5) + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 30, 0) + Call(PlaySoundAtActor, RED_ACTOR, SOUND_SMALL_LENS_FLARE) + Wait(30) + Call(N(PlayKoopaBrosSong)) + Call(ActorSpeak, MSG_CH1_0107, YELLOW_ACTOR, 1, -1, -1) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_HEALTH_BAR | ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_TARGET, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_TOWER, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_TARGET, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_TOWER, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_KoopaBros_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_KoopaBros_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_KoopaBros_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_KoopaBros_HandlePhase))) + Call(SetActorFlagBits, GREEN_ACTOR, ACTOR_FLAG_NO_HEALTH_BAR, FALSE) + Call(SetPartFlagBits, GREEN_ACTOR, 1, ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(HPBarToHome, GREEN_ACTOR) + Call(SetAnimation, GREEN_ACTOR, 1, ANIM_KoopaBros_Green_Idle) + Call(SetActorFlagBits, YELLOW_ACTOR, ACTOR_FLAG_NO_HEALTH_BAR, FALSE) + Call(SetPartFlagBits, YELLOW_ACTOR, 1, ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(HPBarToHome, YELLOW_ACTOR) + Call(SetAnimation, YELLOW_ACTOR, 1, ANIM_KoopaBros_Yellow_Idle) + Call(SetActorFlagBits, BLACK_ACTOR, ACTOR_FLAG_NO_HEALTH_BAR, FALSE) + Call(SetPartFlagBits, BLACK_ACTOR, 1, ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(HPBarToHome, BLACK_ACTOR) + Call(SetAnimation, BLACK_ACTOR, 1, ANIM_KoopaBros_Black_Idle) + Call(SetActorFlagBits, RED_ACTOR, ACTOR_FLAG_NO_HEALTH_BAR, FALSE) + Call(SetPartFlagBits, RED_ACTOR, 1, ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(HPBarToHome, RED_ACTOR) + Call(SetAnimation, RED_ACTOR, 1, ANIM_KoopaBros_Red_Idle) + Call(SetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, AVAL_Boss_TowerState_Toppled) // prevents first-turn tower attack + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseOrConst(LVar0, AFLAG_Boss_KoopaBrosRevealed) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + Return + End }; API_CALLABLE(N(PlayLandOnTowerFX)) { @@ -1835,359 +1835,359 @@ API_CALLABLE(N(PlayLandOnTowerFX)) { EvtScript N(EVS_BuildTowerWithKoopa) = { #define VAR_TOWER_HEIGHT LVarB #define VAR_CUR_TOWER_IDX LVarC - EVT_IF_EQ(LVar2, TOWER_TOP) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Boss_LeadKoopaID, LVar0) - EVT_END_IF - EVT_SET(LVarA, LVar0) - EVT_SET(VAR_TOWER_HEIGHT, LVar1) - EVT_SET(VAR_CUR_TOWER_IDX, LVar2) - EVT_CALL(UseIdleAnimation, LVarA, FALSE) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(TOWER_TOP) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_PointForward) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_PointForward) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_PointForward) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_PointForward) - EVT_END_SWITCH - EVT_CALL(SetActorYaw, LVarA, 0) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 22) - EVT_ADD(LVar1, 19) - EVT_WAIT(10) - EVT_WAIT(30) - EVT_SET(LVar0, VAR_TOWER_HEIGHT) - EVT_SUB(LVar0, 1) - EVT_MUL(LVar0, 16) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar1) - EVT_CALL(GetHomePos, LVar1, LVar2, LVar3, LVar4) - EVT_CALL(SetBattleCamTarget, LVar2, LVar3, LVar4) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamOffsetZ, 50) - EVT_CALL(SetBattleCamZoom, 400) - EVT_CALL(MoveBattleCamOver, LVar0) - EVT_WAIT(LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar1) - EVT_CALL(GetHomePos, LVar1, LVar2, LVar3, LVar4) - EVT_SET(LVar4, 15) - EVT_CALL(SetGoalPos, LVarA, LVar2, LVar3, LVar4) - EVT_CALL(AddGoalPos, LVarA, 0, 0, 0) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Run) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Run) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Run) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Run) - EVT_END_SWITCH - EVT_CALL(GetGoalPos, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(GetActorPos, LVarA, LVar3, LVar4, LVar5) - EVT_IF_LT(LVar0, LVar3) - EVT_CALL(SetActorYaw, LVarA, 0) - EVT_ELSE - EVT_CALL(SetActorYaw, LVarA, 180) - EVT_END_IF - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Leap) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Leap) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Leap) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Leap) - EVT_END_SWITCH - EVT_WAIT(5) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar1) - EVT_CALL(GetHomePos, LVar1, LVar2, LVar3, LVar4) - EVT_SET(LVar4, 15) - EVT_CALL(SetGoalPos, LVarA, LVar2, LVar3, LVar4) - EVT_SET(LVar0, VAR_TOWER_HEIGHT) - EVT_SUB(LVar0, 1) - EVT_MUL(LVar0, 18) - EVT_SWITCH(VAR_TOWER_HEIGHT) - EVT_CASE_EQ(4) - EVT_CALL(AddGoalPos, LVarA, 0, LVar0, -10) - EVT_CASE_EQ(3) - EVT_CALL(AddGoalPos, LVarA, 0, LVar0, -7) - EVT_CASE_EQ(2) - EVT_CALL(AddGoalPos, LVarA, 0, LVar0, -4) - EVT_END_SWITCH - EVT_CALL(AddGoalPos, LVarA, 15, 0, 0) - EVT_THREAD - EVT_WAIT(10) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Land) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Land) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Land) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Land) - EVT_END_SWITCH - EVT_END_THREAD - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Midair) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Midair) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Midair) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Midair) - EVT_END_SWITCH - EVT_CALL(SetActorJumpGravity, LVarA, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, LVarA, 20, FALSE, FALSE, FALSE) - EVT_CALL(N(PlayLandOnTowerFX), LVarA) - EVT_CALL(PlaySoundAtActor, LVarA, SOUND_KOOPA_BROS_LAND) - EVT_CALL(GetActorPos, LVarA, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 15) - EVT_CALL(SetActorPos, LVarA, LVar3, LVar4, LVar5) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Idle) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Idle) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Idle) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Idle) - EVT_END_SWITCH - EVT_WAIT(5) - EVT_CALL(SetActorYaw, LVarA, 0) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_PointForward) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_PointForward) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_PointForward) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_PointForward) - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, LVarA, SOUND_SMALL_LENS_FLARE) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 22) - EVT_ADD(LVar1, 19) - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 30, 0) - EVT_WAIT(20) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_IF_NOT_FLAG(LVar0, AFLAG_Boss_Dialogue_HaveATaste) - EVT_CALL(ActorSpeak, MSG_CH1_010A, LVarA, 1, -1, -1) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AFLAG_Boss_Dialogue_HaveATaste) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_END_IF - EVT_WAIT(10) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Idle) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Idle) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Idle) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Idle) - EVT_END_SWITCH - EVT_CALL(SetActorFlagBits, LVarA, ACTOR_FLAG_NO_HEALTH_BAR, TRUE) - EVT_CALL(SetPartFlagBits, LVarA, 1, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(HPBarToHome, LVarA) - EVT_CALL(SetActorVar, LVarA, AVAR_Koopa_State, AVAL_Koopa_State_PosA) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, AVAL_Boss_TowerState_Stable) - EVT_CASE_OR_EQ(TOWER_DOWN_1) - EVT_CASE_OR_EQ(TOWER_DOWN_2) - EVT_CASE_OR_EQ(TOWER_DOWN_3) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_IdleCrouch) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_IdleCrouch) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_IdleCrouch) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_IdleCrouch) - EVT_END_SWITCH - EVT_WAIT(50) + IfEq(LVar2, TOWER_TOP) + Call(SetActorVar, ACTOR_SELF, AVAR_Boss_LeadKoopaID, LVar0) + EndIf + Set(LVarA, LVar0) + Set(VAR_TOWER_HEIGHT, LVar1) + Set(VAR_CUR_TOWER_IDX, LVar2) + Call(UseIdleAnimation, LVarA, FALSE) + Switch(LVar2) + CaseEq(TOWER_TOP) + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_PointForward) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_PointForward) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_PointForward) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_PointForward) + EndSwitch + Call(SetActorYaw, LVarA, 0) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Sub(LVar0, 22) + Add(LVar1, 19) + Wait(10) + Wait(30) + Set(LVar0, VAR_TOWER_HEIGHT) + Sub(LVar0, 1) + Mul(LVar0, 16) + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar1) + Call(GetHomePos, LVar1, LVar2, LVar3, LVar4) + Call(SetBattleCamTarget, LVar2, LVar3, LVar4) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamOffsetZ, 50) + Call(SetBattleCamZoom, 400) + Call(MoveBattleCamOver, LVar0) + Wait(LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar1) + Call(GetHomePos, LVar1, LVar2, LVar3, LVar4) + Set(LVar4, 15) + Call(SetGoalPos, LVarA, LVar2, LVar3, LVar4) + Call(AddGoalPos, LVarA, 0, 0, 0) + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Run) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Run) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Run) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Run) + EndSwitch + Call(GetGoalPos, LVarA, LVar0, LVar1, LVar2) + Call(GetActorPos, LVarA, LVar3, LVar4, LVar5) + IfLt(LVar0, LVar3) + Call(SetActorYaw, LVarA, 0) + Else + Call(SetActorYaw, LVarA, 180) + EndIf + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Leap) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Leap) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Leap) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Leap) + EndSwitch + Wait(5) + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar1) + Call(GetHomePos, LVar1, LVar2, LVar3, LVar4) + Set(LVar4, 15) + Call(SetGoalPos, LVarA, LVar2, LVar3, LVar4) + Set(LVar0, VAR_TOWER_HEIGHT) + Sub(LVar0, 1) + Mul(LVar0, 18) + Switch(VAR_TOWER_HEIGHT) + CaseEq(4) + Call(AddGoalPos, LVarA, 0, LVar0, -10) + CaseEq(3) + Call(AddGoalPos, LVarA, 0, LVar0, -7) + CaseEq(2) + Call(AddGoalPos, LVarA, 0, LVar0, -4) + EndSwitch + Call(AddGoalPos, LVarA, 15, 0, 0) + Thread + Wait(10) + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Land) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Land) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Land) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Land) + EndSwitch + EndThread + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Midair) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Midair) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Midair) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Midair) + EndSwitch + Call(SetActorJumpGravity, LVarA, Float(1.6)) + Call(JumpToGoal, LVarA, 20, FALSE, FALSE, FALSE) + Call(N(PlayLandOnTowerFX), LVarA) + Call(PlaySoundAtActor, LVarA, SOUND_KOOPA_BROS_LAND) + Call(GetActorPos, LVarA, LVar3, LVar4, LVar5) + Sub(LVar3, 15) + Call(SetActorPos, LVarA, LVar3, LVar4, LVar5) + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Idle) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Idle) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Idle) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Idle) + EndSwitch + Wait(5) + Call(SetActorYaw, LVarA, 0) + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_PointForward) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_PointForward) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_PointForward) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_PointForward) + EndSwitch + Call(PlaySoundAtActor, LVarA, SOUND_SMALL_LENS_FLARE) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Sub(LVar0, 22) + Add(LVar1, 19) + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 30, 0) + Wait(20) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + IfNotFlag(LVar0, AFLAG_Boss_Dialogue_HaveATaste) + Call(ActorSpeak, MSG_CH1_010A, LVarA, 1, -1, -1) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseOrConst(LVar0, AFLAG_Boss_Dialogue_HaveATaste) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + EndIf + Wait(10) + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Idle) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Idle) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Idle) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Idle) + EndSwitch + Call(SetActorFlagBits, LVarA, ACTOR_FLAG_NO_HEALTH_BAR, TRUE) + Call(SetPartFlagBits, LVarA, 1, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(HPBarToHome, LVarA) + Call(SetActorVar, LVarA, AVAR_Koopa_State, AVAL_Koopa_State_PosA) + Call(SetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, AVAL_Boss_TowerState_Stable) + CaseOrEq(TOWER_DOWN_1) + CaseOrEq(TOWER_DOWN_2) + CaseOrEq(TOWER_DOWN_3) + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_IdleCrouch) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_IdleCrouch) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_IdleCrouch) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_IdleCrouch) + EndSwitch + Wait(50) // handle (height - 1) position - EVT_SET(LVar0, VAR_TOWER_HEIGHT) - EVT_SUB(LVar0, TOWER_DOWN_1) - EVT_IF_EQ(VAR_CUR_TOWER_IDX, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar1) - EVT_CALL(GetHomePos, LVar1, LVar2, LVar3, LVar4) - EVT_SET(LVar4, 15) - EVT_CALL(SetGoalPos, LVarA, LVar2, LVar3, LVar4) - EVT_CALL(AddGoalPos, LVarA, 0, 0, 0) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Run) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Run) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Run) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Run) - EVT_END_SWITCH - EVT_CALL(RunToGoal, LVarA, 10, FALSE) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_IdleCrouch) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_IdleCrouch) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_IdleCrouch) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_IdleCrouch) - EVT_END_SWITCH - EVT_CALL(SetActorFlagBits, LVarA, ACTOR_FLAG_NO_HEALTH_BAR, TRUE) - EVT_CALL(SetPartFlagBits, LVarA, 1, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(HPBarToHome, LVarA) - EVT_CALL(SetActorVar, LVarA, AVAR_Koopa_State, AVAL_Koopa_State_PosB) - EVT_END_IF + Set(LVar0, VAR_TOWER_HEIGHT) + Sub(LVar0, TOWER_DOWN_1) + IfEq(VAR_CUR_TOWER_IDX, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar1) + Call(GetHomePos, LVar1, LVar2, LVar3, LVar4) + Set(LVar4, 15) + Call(SetGoalPos, LVarA, LVar2, LVar3, LVar4) + Call(AddGoalPos, LVarA, 0, 0, 0) + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Run) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Run) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Run) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Run) + EndSwitch + Call(RunToGoal, LVarA, 10, FALSE) + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_IdleCrouch) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_IdleCrouch) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_IdleCrouch) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_IdleCrouch) + EndSwitch + Call(SetActorFlagBits, LVarA, ACTOR_FLAG_NO_HEALTH_BAR, TRUE) + Call(SetPartFlagBits, LVarA, 1, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(HPBarToHome, LVarA) + Call(SetActorVar, LVarA, AVAR_Koopa_State, AVAL_Koopa_State_PosB) + EndIf // handle (height - 2) position - EVT_SET(LVar0, VAR_TOWER_HEIGHT) - EVT_SUB(LVar0, TOWER_DOWN_2) - EVT_IF_EQ(VAR_CUR_TOWER_IDX, LVar0) - EVT_WAIT(10) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar1) - EVT_CALL(GetHomePos, LVar1, LVar2, LVar3, LVar4) - EVT_SET(LVar4, 15) - EVT_CALL(SetGoalPos, LVarA, LVar2, LVar3, LVar4) - EVT_CALL(AddGoalPos, LVarA, 0, 18, -4) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Leap) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Leap) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Leap) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Leap) - EVT_END_SWITCH - EVT_WAIT(5) - EVT_CALL(AddGoalPos, LVarA, 15, 0, 0) - EVT_THREAD - EVT_WAIT(10) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Land) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Land) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Land) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Land) - EVT_END_SWITCH - EVT_END_THREAD - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Midair) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Midair) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Midair) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Midair) - EVT_END_SWITCH - EVT_CALL(SetActorJumpGravity, LVarA, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, LVarA, 20, FALSE, FALSE, FALSE) - EVT_CALL(N(PlayLandOnTowerFX), LVarA) - EVT_CALL(PlaySoundAtActor, LVarA, SOUND_KOOPA_BROS_LAND) - EVT_CALL(GetActorPos, LVarA, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 15) - EVT_CALL(SetActorPos, LVarA, LVar3, LVar4, LVar5) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_IdleCrouch) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_IdleCrouch) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_IdleCrouch) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_IdleCrouch) - EVT_END_SWITCH - EVT_CALL(SetActorFlagBits, LVarA, ACTOR_FLAG_NO_HEALTH_BAR, TRUE) - EVT_CALL(SetPartFlagBits, LVarA, 1, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(HPBarToHome, LVarA) - EVT_CALL(SetActorVar, LVarA, AVAR_Koopa_State, AVAL_Koopa_State_PosC) - EVT_END_IF + Set(LVar0, VAR_TOWER_HEIGHT) + Sub(LVar0, TOWER_DOWN_2) + IfEq(VAR_CUR_TOWER_IDX, LVar0) + Wait(10) + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar1) + Call(GetHomePos, LVar1, LVar2, LVar3, LVar4) + Set(LVar4, 15) + Call(SetGoalPos, LVarA, LVar2, LVar3, LVar4) + Call(AddGoalPos, LVarA, 0, 18, -4) + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Leap) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Leap) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Leap) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Leap) + EndSwitch + Wait(5) + Call(AddGoalPos, LVarA, 15, 0, 0) + Thread + Wait(10) + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Land) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Land) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Land) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Land) + EndSwitch + EndThread + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Midair) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Midair) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Midair) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Midair) + EndSwitch + Call(SetActorJumpGravity, LVarA, Float(1.6)) + Call(JumpToGoal, LVarA, 20, FALSE, FALSE, FALSE) + Call(N(PlayLandOnTowerFX), LVarA) + Call(PlaySoundAtActor, LVarA, SOUND_KOOPA_BROS_LAND) + Call(GetActorPos, LVarA, LVar3, LVar4, LVar5) + Sub(LVar3, 15) + Call(SetActorPos, LVarA, LVar3, LVar4, LVar5) + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_IdleCrouch) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_IdleCrouch) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_IdleCrouch) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_IdleCrouch) + EndSwitch + Call(SetActorFlagBits, LVarA, ACTOR_FLAG_NO_HEALTH_BAR, TRUE) + Call(SetPartFlagBits, LVarA, 1, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(HPBarToHome, LVarA) + Call(SetActorVar, LVarA, AVAR_Koopa_State, AVAL_Koopa_State_PosC) + EndIf // handle (height - 3) position - EVT_SET(LVar0, LVarB) - EVT_SUB(LVar0, TOWER_DOWN_3) - EVT_IF_EQ(VAR_CUR_TOWER_IDX, LVar0) - EVT_WAIT(30) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar1) - EVT_CALL(GetHomePos, LVar1, LVar2, LVar3, LVar4) - EVT_SET(LVar4, 15) - EVT_CALL(SetGoalPos, LVarA, LVar2, LVar3, LVar4) - EVT_CALL(AddGoalPos, LVarA, 0, 36, -7) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Leap) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Leap) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Leap) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Leap) - EVT_END_SWITCH - EVT_WAIT(5) - EVT_CALL(AddGoalPos, LVarA, 15, 0, 0) - EVT_THREAD - EVT_WAIT(10) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Land) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Land) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Land) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Land) - EVT_END_SWITCH - EVT_END_THREAD - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Midair) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Midair) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Midair) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Midair) - EVT_END_SWITCH - EVT_CALL(SetActorJumpGravity, LVarA, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, LVarA, 20, FALSE, FALSE, FALSE) - EVT_CALL(N(PlayLandOnTowerFX), LVarA) - EVT_CALL(PlaySoundAtActor, LVarA, SOUND_KOOPA_BROS_LAND) - EVT_CALL(GetActorPos, LVarA, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 15) - EVT_CALL(SetActorPos, LVarA, LVar3, LVar4, LVar5) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_IdleCrouch) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_IdleCrouch) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_IdleCrouch) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_IdleCrouch) - EVT_END_SWITCH - EVT_CALL(SetActorFlagBits, LVarA, ACTOR_FLAG_NO_HEALTH_BAR, TRUE) - EVT_CALL(SetPartFlagBits, LVarA, 1, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(HPBarToHome, LVarA) - EVT_CALL(SetActorVar, LVarA, AVAR_Koopa_State, AVAL_Koopa_State_PosD) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Set(LVar0, LVarB) + Sub(LVar0, TOWER_DOWN_3) + IfEq(VAR_CUR_TOWER_IDX, LVar0) + Wait(30) + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar1) + Call(GetHomePos, LVar1, LVar2, LVar3, LVar4) + Set(LVar4, 15) + Call(SetGoalPos, LVarA, LVar2, LVar3, LVar4) + Call(AddGoalPos, LVarA, 0, 36, -7) + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Leap) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Leap) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Leap) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Leap) + EndSwitch + Wait(5) + Call(AddGoalPos, LVarA, 15, 0, 0) + Thread + Wait(10) + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Land) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Land) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Land) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Land) + EndSwitch + EndThread + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Midair) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Midair) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Midair) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Midair) + EndSwitch + Call(SetActorJumpGravity, LVarA, Float(1.6)) + Call(JumpToGoal, LVarA, 20, FALSE, FALSE, FALSE) + Call(N(PlayLandOnTowerFX), LVarA) + Call(PlaySoundAtActor, LVarA, SOUND_KOOPA_BROS_LAND) + Call(GetActorPos, LVarA, LVar3, LVar4, LVar5) + Sub(LVar3, 15) + Call(SetActorPos, LVarA, LVar3, LVar4, LVar5) + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_IdleCrouch) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_IdleCrouch) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_IdleCrouch) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_IdleCrouch) + EndSwitch + Call(SetActorFlagBits, LVarA, ACTOR_FLAG_NO_HEALTH_BAR, TRUE) + Call(SetPartFlagBits, LVarA, 1, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(HPBarToHome, LVarA) + Call(SetActorVar, LVarA, AVAR_Koopa_State, AVAL_Koopa_State_PosD) + EndIf + EndCaseGroup + EndSwitch + Return + End #undef VAR_TOWER_HEIGHT #undef VAR_CUR_TOWER_IDX }; @@ -2197,306 +2197,306 @@ EvtScript N(EVS_BuildTowerWithKoopa) = { // (in) Var2 : add index (0, 1, ...), or (-1) to mean "demoting" // (in) Var3 : orphan count EvtScript N(EVS_UpdateTowerWithKoopa) = { - EVT_IF_EQ(LVar2, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Boss_LeadKoopaID, LVar0) - EVT_END_IF - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_SET(LVarD, LVar3) - EVT_CALL(UseIdleAnimation, LVarA, FALSE) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_PointForward) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_PointForward) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_PointForward) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_PointForward) - EVT_END_SWITCH - EVT_WAIT(15) - EVT_SWITCH(LVarC) - EVT_CASE_EQ(-1) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_IdleCrouch) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_IdleCrouch) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_IdleCrouch) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_IdleCrouch) - EVT_END_SWITCH - EVT_SWITCH(LVarB) - EVT_CASE_EQ(4) - EVT_SWITCH(LVarD) - EVT_CASE_EQ(2) - EVT_CALL(SetActorVar, LVarA, AVAR_Koopa_State, AVAL_Koopa_State_PosC) - EVT_CASE_EQ(1) - EVT_CALL(SetActorVar, LVarA, AVAR_Koopa_State, AVAL_Koopa_State_PosD) - EVT_END_SWITCH - EVT_CASE_EQ(3) - EVT_CALL(SetActorVar, LVarA, AVAR_Koopa_State, AVAL_Koopa_State_PosC) - EVT_END_SWITCH - EVT_CASE_EQ(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar1) - EVT_CALL(GetHomePos, LVar1, LVar2, LVar3, LVar4) - EVT_CALL(SetBattleCamTarget, LVar2, LVar3, LVar4) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamOffsetZ, 50) - EVT_CALL(SetBattleCamZoom, 400) - EVT_CALL(MoveBattleCamOver, 30) - EVT_IF_EQ(LVarD, 2) - EVT_WAIT(25) - EVT_END_IF - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Leap) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Leap) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Leap) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Leap) - EVT_END_SWITCH - EVT_WAIT(5) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar0) - EVT_CALL(GetHomePos, LVar0, LVar1, LVar2, LVar3) - EVT_SET(LVar3, 15) - EVT_CALL(SetGoalPos, LVarA, LVar1, LVar2, LVar3) - EVT_SWITCH(LVarB) - EVT_CASE_EQ(4) - EVT_CALL(AddGoalPos, LVarA, 0, 54, -10) - EVT_CASE_EQ(3) - EVT_CALL(AddGoalPos, LVarA, 0, 36, -7) - EVT_END_SWITCH - EVT_CALL(AddGoalPos, LVarA, 15, 0, 0) - EVT_THREAD - EVT_WAIT(10) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Land) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Land) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Land) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Land) - EVT_END_SWITCH - EVT_END_THREAD - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Midair) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Midair) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Midair) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Midair) - EVT_END_SWITCH - EVT_CALL(SetActorJumpGravity, LVarA, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, LVarA, 20, FALSE, FALSE, FALSE) - EVT_CALL(N(PlayLandOnTowerFX), LVarA) - EVT_CALL(PlaySoundAtActor, LVarA, SOUND_KOOPA_BROS_LAND) - EVT_CALL(GetActorPos, LVarA, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 15) - EVT_CALL(SetActorPos, LVarA, LVar3, LVar4, LVar5) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Idle) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Idle) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Idle) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Idle) - EVT_END_SWITCH - EVT_WAIT(10) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_PointForward) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_PointForward) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_PointForward) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_PointForward) - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, LVarA, SOUND_SMALL_LENS_FLARE) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 22) - EVT_ADD(LVar1, 19) - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 30, 0) - EVT_WAIT(30) - EVT_CALL(SetActorFlagBits, LVarA, ACTOR_FLAG_NO_HEALTH_BAR, TRUE) - EVT_CALL(SetPartFlagBits, LVarA, 1, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(HPBarToHome, LVarA) - EVT_CALL(SetActorVar, LVarA, AVAR_Koopa_State, AVAL_Koopa_State_PosA) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AFLAG_Boss_DoneTowerUpdate) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_CASE_EQ(1) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Leap) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Leap) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Leap) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Leap) - EVT_END_SWITCH - EVT_WAIT(5) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar0) - EVT_CALL(GetHomePos, LVar0, LVar1, LVar2, LVar3) - EVT_SET(LVar3, 15) - EVT_CALL(SetGoalPos, LVarA, LVar1, LVar2, LVar3) - EVT_CALL(AddGoalPos, LVarA, 0, 36, -7) - EVT_CALL(AddGoalPos, LVarA, 15, 0, 0) - EVT_THREAD - EVT_WAIT(10) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Land) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Land) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Land) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Land) - EVT_END_SWITCH - EVT_END_THREAD - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Midair) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Midair) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Midair) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Midair) - EVT_END_SWITCH - EVT_CALL(SetActorJumpGravity, LVarA, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, LVarA, 20, FALSE, FALSE, FALSE) - EVT_CALL(N(PlayLandOnTowerFX), LVarA) - EVT_CALL(PlaySoundAtActor, LVarA, SOUND_KOOPA_BROS_LAND) - EVT_CALL(GetActorPos, LVarA, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 15) - EVT_CALL(SetActorPos, LVarA, LVar3, LVar4, LVar5) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Idle) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Idle) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Idle) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Idle) - EVT_END_SWITCH - EVT_WAIT(10) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_IdleCrouch) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_IdleCrouch) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_IdleCrouch) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_IdleCrouch) - EVT_END_SWITCH - EVT_CALL(SetActorFlagBits, LVarA, ACTOR_FLAG_NO_HEALTH_BAR, TRUE) - EVT_CALL(SetPartFlagBits, LVarA, 1, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(HPBarToHome, LVarA) - EVT_CALL(SetActorVar, LVarA, AVAR_Koopa_State, AVAL_Koopa_State_PosD) - EVT_END_SWITCH - EVT_RETURN - EVT_END + IfEq(LVar2, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Boss_LeadKoopaID, LVar0) + EndIf + Set(LVarA, LVar0) + Set(LVarB, LVar1) + Set(LVarC, LVar2) + Set(LVarD, LVar3) + Call(UseIdleAnimation, LVarA, FALSE) + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_PointForward) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_PointForward) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_PointForward) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_PointForward) + EndSwitch + Wait(15) + Switch(LVarC) + CaseEq(-1) + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_IdleCrouch) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_IdleCrouch) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_IdleCrouch) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_IdleCrouch) + EndSwitch + Switch(LVarB) + CaseEq(4) + Switch(LVarD) + CaseEq(2) + Call(SetActorVar, LVarA, AVAR_Koopa_State, AVAL_Koopa_State_PosC) + CaseEq(1) + Call(SetActorVar, LVarA, AVAR_Koopa_State, AVAL_Koopa_State_PosD) + EndSwitch + CaseEq(3) + Call(SetActorVar, LVarA, AVAR_Koopa_State, AVAL_Koopa_State_PosC) + EndSwitch + CaseEq(0) + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar1) + Call(GetHomePos, LVar1, LVar2, LVar3, LVar4) + Call(SetBattleCamTarget, LVar2, LVar3, LVar4) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamOffsetZ, 50) + Call(SetBattleCamZoom, 400) + Call(MoveBattleCamOver, 30) + IfEq(LVarD, 2) + Wait(25) + EndIf + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Leap) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Leap) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Leap) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Leap) + EndSwitch + Wait(5) + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar0) + Call(GetHomePos, LVar0, LVar1, LVar2, LVar3) + Set(LVar3, 15) + Call(SetGoalPos, LVarA, LVar1, LVar2, LVar3) + Switch(LVarB) + CaseEq(4) + Call(AddGoalPos, LVarA, 0, 54, -10) + CaseEq(3) + Call(AddGoalPos, LVarA, 0, 36, -7) + EndSwitch + Call(AddGoalPos, LVarA, 15, 0, 0) + Thread + Wait(10) + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Land) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Land) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Land) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Land) + EndSwitch + EndThread + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Midair) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Midair) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Midair) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Midair) + EndSwitch + Call(SetActorJumpGravity, LVarA, Float(1.6)) + Call(JumpToGoal, LVarA, 20, FALSE, FALSE, FALSE) + Call(N(PlayLandOnTowerFX), LVarA) + Call(PlaySoundAtActor, LVarA, SOUND_KOOPA_BROS_LAND) + Call(GetActorPos, LVarA, LVar3, LVar4, LVar5) + Sub(LVar3, 15) + Call(SetActorPos, LVarA, LVar3, LVar4, LVar5) + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Idle) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Idle) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Idle) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Idle) + EndSwitch + Wait(10) + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_PointForward) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_PointForward) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_PointForward) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_PointForward) + EndSwitch + Call(PlaySoundAtActor, LVarA, SOUND_SMALL_LENS_FLARE) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Sub(LVar0, 22) + Add(LVar1, 19) + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 30, 0) + Wait(30) + Call(SetActorFlagBits, LVarA, ACTOR_FLAG_NO_HEALTH_BAR, TRUE) + Call(SetPartFlagBits, LVarA, 1, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(HPBarToHome, LVarA) + Call(SetActorVar, LVarA, AVAR_Koopa_State, AVAL_Koopa_State_PosA) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseOrConst(LVar0, AFLAG_Boss_DoneTowerUpdate) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + CaseEq(1) + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Leap) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Leap) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Leap) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Leap) + EndSwitch + Wait(5) + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar0) + Call(GetHomePos, LVar0, LVar1, LVar2, LVar3) + Set(LVar3, 15) + Call(SetGoalPos, LVarA, LVar1, LVar2, LVar3) + Call(AddGoalPos, LVarA, 0, 36, -7) + Call(AddGoalPos, LVarA, 15, 0, 0) + Thread + Wait(10) + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Land) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Land) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Land) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Land) + EndSwitch + EndThread + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Midair) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Midair) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Midair) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Midair) + EndSwitch + Call(SetActorJumpGravity, LVarA, Float(1.6)) + Call(JumpToGoal, LVarA, 20, FALSE, FALSE, FALSE) + Call(N(PlayLandOnTowerFX), LVarA) + Call(PlaySoundAtActor, LVarA, SOUND_KOOPA_BROS_LAND) + Call(GetActorPos, LVarA, LVar3, LVar4, LVar5) + Sub(LVar3, 15) + Call(SetActorPos, LVarA, LVar3, LVar4, LVar5) + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_Idle) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_Idle) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_Idle) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_Idle) + EndSwitch + Wait(10) + Switch(LVarA) + CaseEq(GREEN_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Green_IdleCrouch) + CaseEq(YELLOW_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Yellow_IdleCrouch) + CaseEq(BLACK_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Black_IdleCrouch) + CaseEq(RED_ACTOR) + Call(SetAnimation, LVarA, 1, ANIM_KoopaBros_Red_IdleCrouch) + EndSwitch + Call(SetActorFlagBits, LVarA, ACTOR_FLAG_NO_HEALTH_BAR, TRUE) + Call(SetPartFlagBits, LVarA, 1, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(HPBarToHome, LVarA) + Call(SetActorVar, LVarA, AVAR_Koopa_State, AVAL_Koopa_State_PosD) + EndSwitch + Return + End }; EvtScript N(EVS_TryFormingTower) = { // count the number of standing koopa bros #define VAR_STANDING_COUNT LVarA - EVT_SET(VAR_STANDING_COUNT, 0) - EVT_CALL(CreateCurrentPosTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetActorVar, LVar0, AVAR_Koopa_State, LVar1) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(GetStatusFlags, LVar0, LVar1) - EVT_IF_EQ(LVar1, 0) - EVT_IF_EQ(VAR_STANDING_COUNT, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar0) - EVT_END_IF - EVT_ADD(VAR_STANDING_COUNT, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF + Set(VAR_STANDING_COUNT, 0) + Call(CreateCurrentPosTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetActorVar, LVar0, AVAR_Koopa_State, LVar1) + IfEq(LVar1, 0) + Call(GetStatusFlags, LVar0, LVar1) + IfEq(LVar1, 0) + IfEq(VAR_STANDING_COUNT, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar0) + EndIf + Add(VAR_STANDING_COUNT, 1) + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf // check special cases for standing koopa count - EVT_SWITCH(VAR_STANDING_COUNT) - EVT_CASE_EQ(0) - EVT_RETURN - EVT_CASE_EQ(1) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AFLAG_Boss_DoingSoloAttack) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Boss_TowerHeight, VAR_STANDING_COUNT) - EVT_SET(LFlag0, FALSE) + Switch(VAR_STANDING_COUNT) + CaseEq(0) + Return + CaseEq(1) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseOrConst(LVar0, AFLAG_Boss_DoingSoloAttack) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + Return + EndSwitch + Call(SetActorVar, ACTOR_SELF, AVAR_Boss_TowerHeight, VAR_STANDING_COUNT) + Set(LFlag0, FALSE) // have each koopa join the tower from front to back // the index ranges from (height - 1) for the bottom koopa to 0 for the top #define VAR_CUR_KOOPA_IDX LVarB - EVT_SET(VAR_CUR_KOOPA_IDX, VAR_STANDING_COUNT) - EVT_SUB(VAR_CUR_KOOPA_IDX, 1) - EVT_CALL(CreateCurrentPosTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(1) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetActorVar, LVar0, AVAR_Koopa_State, LVar1) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(GetStatusFlags, LVar0, LVar1) - EVT_IF_EQ(LVar1, 0) - EVT_SET(LVar1, VAR_STANDING_COUNT) - EVT_SET(LVar2, VAR_CUR_KOOPA_IDX) - EVT_EXEC(N(EVS_BuildTowerWithKoopa)) - EVT_SUB(VAR_CUR_KOOPA_IDX, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(1) - EVT_END_IF + Set(VAR_CUR_KOOPA_IDX, VAR_STANDING_COUNT) + Sub(VAR_CUR_KOOPA_IDX, 1) + Call(CreateCurrentPosTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(1) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetActorVar, LVar0, AVAR_Koopa_State, LVar1) + IfEq(LVar1, 0) + Call(GetStatusFlags, LVar0, LVar1) + IfEq(LVar1, 0) + Set(LVar1, VAR_STANDING_COUNT) + Set(LVar2, VAR_CUR_KOOPA_IDX) + Exec(N(EVS_BuildTowerWithKoopa)) + Sub(VAR_CUR_KOOPA_IDX, 1) + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(1) + EndIf // hide the status bar until the tower is formed - EVT_CALL(EnableBattleStatusBar, FALSE) - EVT_LABEL(2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, AVAL_Boss_TowerState_Toppled) - EVT_GOTO(2) - EVT_END_IF - EVT_CALL(EnableBattleStatusBar, TRUE) + Call(EnableBattleStatusBar, FALSE) + Label(2) + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, LVar0) + Wait(1) + IfEq(LVar0, AVAL_Boss_TowerState_Toppled) + Goto(2) + EndIf + Call(EnableBattleStatusBar, TRUE) // housekeeping for various actor states in the new tower configuration - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_POPUP, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_TOWER, ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_SET(LVar0, VAR_STANDING_COUNT) - EVT_MUL(LVar0, 18) - EVT_ADD(LVar0, 20) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_TOWER, -4, LVar0) - EVT_CALL(SetActorSize, ACTOR_SELF, LVar0, 45) - EVT_CALL(SetActorType, ACTOR_SELF, ACTOR_TYPE_KOOPA_BROS) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar1) - EVT_CALL(GetActorPos, LVar1, LVar2, LVar3, LVar4) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar2, LVar3, LVar4) - EVT_SET(LVarA, BOSS_CMD_STABLE) - EVT_EXEC_WAIT(N(EVS_BroadcastToKoopaBros)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, AVAL_Boss_TowerState_Stable) - EVT_RETURN - EVT_END + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_POPUP, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_TOWER, ACTOR_PART_FLAG_NO_TARGET, FALSE) + Set(LVar0, VAR_STANDING_COUNT) + Mul(LVar0, 18) + Add(LVar0, 20) + Call(SetTargetOffset, ACTOR_SELF, PRT_TOWER, -4, LVar0) + Call(SetActorSize, ACTOR_SELF, LVar0, 45) + Call(SetActorType, ACTOR_SELF, ACTOR_TYPE_KOOPA_BROS) + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar1) + Call(GetActorPos, LVar1, LVar2, LVar3, LVar4) + Call(SetActorPos, ACTOR_SELF, LVar2, LVar3, LVar4) + Set(LVarA, BOSS_CMD_STABLE) + ExecWait(N(EVS_BroadcastToKoopaBros)) + Call(SetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, AVAL_Boss_TowerState_Stable) + Return + End #undef VAR_STANDING_COUNT #undef VAR_CUR_KOOPA_IDX }; @@ -2504,643 +2504,643 @@ EvtScript N(EVS_TryFormingTower) = { // count the number of standing koopa bros EvtScript N(EVS_TryJoiningTower) = { #define VAR_STANDING_COUNT LVarA - EVT_SET(VAR_STANDING_COUNT, 0) - EVT_CALL(CreateCurrentPosTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetActorVar, LVar0, AVAR_Koopa_State, LVar1) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(GetStatusFlags, LVar0, LVar1) - EVT_IF_EQ(LVar1, 0) - EVT_ADD(VAR_STANDING_COUNT, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_EQ(VAR_STANDING_COUNT, 0) + Set(VAR_STANDING_COUNT, 0) + Call(CreateCurrentPosTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetActorVar, LVar0, AVAR_Koopa_State, LVar1) + IfEq(LVar1, 0) + Call(GetStatusFlags, LVar0, LVar1) + IfEq(LVar1, 0) + Add(VAR_STANDING_COUNT, 1) + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + IfEq(VAR_STANDING_COUNT, 0) // no orphaned koopa bros found - EVT_RETURN - EVT_END_IF + Return + EndIf // add orphan count to tower size - EVT_SET(LVar3, LVarA) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_TowerHeight, LVar0) - EVT_ADD(LVarA, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Boss_TowerHeight, LVarA) + Set(LVar3, LVarA) + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_TowerHeight, LVar0) + Add(LVarA, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_Boss_TowerHeight, LVarA) // reset 'joined' flag - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_AND_CONST(LVar0, ~AFLAG_Boss_DoneTowerUpdate) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseAndConst(LVar0, ~AFLAG_Boss_DoneTowerUpdate) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) // demote the top koopa bros - EVT_SET(LVar0, FIRST_KOOPA_ACTOR) - EVT_LOOP(4) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_CALL(GetActorVar, LVar0, AVAR_Koopa_State, LVar2) - EVT_IF_EQ(LVar2, AVAL_Koopa_State_PosA) - EVT_SET(LVar1, LVarA) - EVT_SET(LVar2, -1) - EVT_EXEC(N(EVS_UpdateTowerWithKoopa)) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_ADD(LVar0, 1) - EVT_END_LOOP + Set(LVar0, FIRST_KOOPA_ACTOR) + Loop(4) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, TRUE) + Call(GetActorVar, LVar0, AVAR_Koopa_State, LVar2) + IfEq(LVar2, AVAL_Koopa_State_PosA) + Set(LVar1, LVarA) + Set(LVar2, -1) + Exec(N(EVS_UpdateTowerWithKoopa)) + BreakLoop + EndIf + EndIf + Add(LVar0, 1) + EndLoop // have each orphaned koopa join the tower from front to back - EVT_SET(LVar2, 0) - EVT_CALL(CreateCurrentPosTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(1) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetActorVar, LVar0, AVAR_Koopa_State, LVar8) - EVT_IF_EQ(LVar8, AVAL_Koopa_State_Ready) - EVT_SET(LVar1, LVarA) - EVT_EXEC(N(EVS_UpdateTowerWithKoopa)) - EVT_ADD(LVar2, 1) - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(1) - EVT_END_IF + Set(LVar2, 0) + Call(CreateCurrentPosTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(1) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetActorVar, LVar0, AVAR_Koopa_State, LVar8) + IfEq(LVar8, AVAL_Koopa_State_Ready) + Set(LVar1, LVarA) + Exec(N(EVS_UpdateTowerWithKoopa)) + Add(LVar2, 1) + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(1) + EndIf // hide the status bar until the tower is formed - EVT_CALL(EnableBattleStatusBar, FALSE) - EVT_LABEL(2) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_IF_NOT_FLAG(LVar0, AFLAG_Boss_DoneTowerUpdate) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_CALL(EnableBattleStatusBar, TRUE) + Call(EnableBattleStatusBar, FALSE) + Label(2) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + IfNotFlag(LVar0, AFLAG_Boss_DoneTowerUpdate) + Wait(1) + Goto(2) + EndIf + Call(EnableBattleStatusBar, TRUE) // housekeeping for various actor states in the new tower configuration - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_POPUP, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_TOWER, ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_SET(LVar0, LVarA) - EVT_MUL(LVar0, 18) - EVT_ADD(LVar0, 20) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_TOWER, -4, LVar0) - EVT_CALL(SetActorSize, ACTOR_SELF, LVar0, 45) - EVT_CALL(SetActorType, ACTOR_SELF, ACTOR_TYPE_KOOPA_BROS) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar1) - EVT_CALL(GetActorPos, LVar1, LVar2, LVar3, LVar4) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar2, LVar3, LVar4) - EVT_SET(LVarA, BOSS_CMD_STABLE) - EVT_EXEC_WAIT(N(EVS_BroadcastToKoopaBros)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, AVAL_Boss_TowerState_Stable) - EVT_RETURN - EVT_END + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_POPUP, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_TOWER, ACTOR_PART_FLAG_NO_TARGET, FALSE) + Set(LVar0, LVarA) + Mul(LVar0, 18) + Add(LVar0, 20) + Call(SetTargetOffset, ACTOR_SELF, PRT_TOWER, -4, LVar0) + Call(SetActorSize, ACTOR_SELF, LVar0, 45) + Call(SetActorType, ACTOR_SELF, ACTOR_TYPE_KOOPA_BROS) + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar1) + Call(GetActorPos, LVar1, LVar2, LVar3, LVar4) + Call(SetActorPos, ACTOR_SELF, LVar2, LVar3, LVar4) + Set(LVarA, BOSS_CMD_STABLE) + ExecWait(N(EVS_BroadcastToKoopaBros)) + Call(SetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, AVAL_Boss_TowerState_Stable) + Return + End #undef VAR_STANDING_COUNT }; EvtScript N(EVS_Broadcast_TowerUnstable) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, LVar0) - EVT_IF_EQ(LVar0, AVAL_Boss_TowerState_Unstable) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AFLAG_Boss_TowerUnstable) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, AVAL_Boss_TowerState_Unstable) - EVT_SET(LVarA, BOSS_CMD_UNSTABLE) - EVT_EXEC_WAIT(N(EVS_BroadcastToKoopaBros)) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_TowerHeight, LVarA) - EVT_SET(LVar0, LVarA) - EVT_MUL(LVar0, 18) - EVT_ADD(LVar0, 5) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_TOWER, -4, LVar0) - EVT_CALL(SetActorSize, ACTOR_SELF, LVar0, 45) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, LVar0) + IfEq(LVar0, AVAL_Boss_TowerState_Unstable) + Return + EndIf + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseOrConst(LVar0, AFLAG_Boss_TowerUnstable) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, AVAL_Boss_TowerState_Unstable) + Set(LVarA, BOSS_CMD_UNSTABLE) + ExecWait(N(EVS_BroadcastToKoopaBros)) + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_TowerHeight, LVarA) + Set(LVar0, LVarA) + Mul(LVar0, 18) + Add(LVar0, 5) + Call(SetTargetOffset, ACTOR_SELF, PRT_TOWER, -4, LVar0) + Call(SetActorSize, ACTOR_SELF, LVar0, 45) + Return + End }; EvtScript N(EVS_Broadcast_ToppleHit) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, AVAL_Boss_TowerState_Toppled) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_IF_NE(LVar0, EVENT_BURN_HIT) - EVT_SET(LVarA, BOSS_CMD_TOPPLE_HIT) - EVT_ELSE - EVT_SET(LVarA, BOSS_CMD_TOPPLE_BURN_HIT) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_BroadcastToKoopaBros)) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_TARGET, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_TOWER, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_AND_CONST(LVar0, ~AFLAG_Boss_TowerUnstable) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_AND_CONST(LVar0, ~AFLAG_Boss_Dialogue_WereGoingOver) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, AVAL_Boss_TowerState_Toppled) + Call(GetLastEvent, ACTOR_SELF, LVar0) + IfNe(LVar0, EVENT_BURN_HIT) + Set(LVarA, BOSS_CMD_TOPPLE_HIT) + Else + Set(LVarA, BOSS_CMD_TOPPLE_BURN_HIT) + EndIf + ExecWait(N(EVS_BroadcastToKoopaBros)) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_TARGET, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_TOWER, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseAndConst(LVar0, ~AFLAG_Boss_TowerUnstable) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseAndConst(LVar0, ~AFLAG_Boss_Dialogue_WereGoingOver) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + Return + End }; // (in) LVarA : event EvtScript N(EVS_BroadcastToKoopaBros) = { - EVT_CALL(ActorExists, GREEN_ACTOR, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_EXEC_GET_TID(A(green_ninja_koopa_HandleCommand), LVar1) - EVT_END_IF - EVT_CALL(ActorExists, YELLOW_ACTOR, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_EXEC_GET_TID(A(yellow_ninja_koopa_HandleCommand), LVar1) - EVT_END_IF - EVT_CALL(ActorExists, BLACK_ACTOR, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_EXEC_GET_TID(A(black_ninja_koopa_HandleCommand), LVar1) - EVT_END_IF - EVT_CALL(ActorExists, RED_ACTOR, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_EXEC_GET_TID(A(red_ninja_koopa_HandleCommand), LVar1) - EVT_END_IF + Call(ActorExists, GREEN_ACTOR, LVar0) + IfEq(LVar0, TRUE) + ExecGetTID(A(green_ninja_koopa_HandleCommand), LVar1) + EndIf + Call(ActorExists, YELLOW_ACTOR, LVar0) + IfEq(LVar0, TRUE) + ExecGetTID(A(yellow_ninja_koopa_HandleCommand), LVar1) + EndIf + Call(ActorExists, BLACK_ACTOR, LVar0) + IfEq(LVar0, TRUE) + ExecGetTID(A(black_ninja_koopa_HandleCommand), LVar1) + EndIf + Call(ActorExists, RED_ACTOR, LVar0) + IfEq(LVar0, TRUE) + ExecGetTID(A(red_ninja_koopa_HandleCommand), LVar1) + EndIf // if any koopa bros are still alive, wait for their script to finish - EVT_LABEL(0) - EVT_IS_THREAD_RUNNING(LVar1, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Label(0) + IsThreadRunning(LVar1, LVar0) + IfEq(LVar0, TRUE) + Wait(1) + Goto(0) + EndIf + Return + End }; // adds a random jitter to KoopaBros actors' X position while the tower is unstable EvtScript N(EVS_KoopaBros_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, LVar0) - EVT_IF_NE(LVar0, AVAL_Boss_TowerState_Unstable) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF + Label(0) + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, LVar0) + IfNe(LVar0, AVAL_Boss_TowerState_Unstable) + Wait(1) + Goto(0) + EndIf // get initial actor positions - EVT_CALL(ActorExists, GREEN_ACTOR, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_CALL(GetActorPos, GREEN_ACTOR, LVarA, LVarE, LVarF) - EVT_END_IF - EVT_CALL(ActorExists, YELLOW_ACTOR, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_CALL(GetActorPos, YELLOW_ACTOR, LVarC, LVarE, LVarF) - EVT_END_IF - EVT_CALL(ActorExists, BLACK_ACTOR, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_CALL(GetActorPos, BLACK_ACTOR, LVarD, LVarE, LVarF) - EVT_END_IF - EVT_CALL(ActorExists, RED_ACTOR, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_CALL(GetActorPos, RED_ACTOR, LVarB, LVarE, LVarF) - EVT_END_IF + Call(ActorExists, GREEN_ACTOR, LVar0) + IfNe(LVar0, FALSE) + Call(GetActorPos, GREEN_ACTOR, LVarA, LVarE, LVarF) + EndIf + Call(ActorExists, YELLOW_ACTOR, LVar0) + IfNe(LVar0, FALSE) + Call(GetActorPos, YELLOW_ACTOR, LVarC, LVarE, LVarF) + EndIf + Call(ActorExists, BLACK_ACTOR, LVar0) + IfNe(LVar0, FALSE) + Call(GetActorPos, BLACK_ACTOR, LVarD, LVarE, LVarF) + EndIf + Call(ActorExists, RED_ACTOR, LVar0) + IfNe(LVar0, FALSE) + Call(GetActorPos, RED_ACTOR, LVarB, LVarE, LVarF) + EndIf // while tower is unstable, add random X offsets to koopa bros - EVT_LABEL(1) - EVT_CALL(ActorExists, GREEN_ACTOR, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_CALL(GetActorVar, GREEN_ACTOR, AVAR_Koopa_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosA) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosD) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosC) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosB) - EVT_CALL(RandInt, 2, LVar0) - EVT_SET(LVar1, 1) - EVT_SUB(LVar0, LVar1) - EVT_ADD(LVar0, LVarA) - EVT_CALL(GetActorPos, GREEN_ACTOR, LVar1, LVar2, LVar3) - EVT_CALL(SetActorPos, GREEN_ACTOR, LVar0, LVar2, LVar3) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(ActorExists, YELLOW_ACTOR, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_CALL(GetActorVar, YELLOW_ACTOR, AVAR_Koopa_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosA) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosD) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosC) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosB) - EVT_CALL(RandInt, 2, LVar0) - EVT_SET(LVar1, 1) - EVT_SUB(LVar0, LVar1) - EVT_ADD(LVar0, LVarC) - EVT_CALL(GetActorPos, YELLOW_ACTOR, LVar1, LVar2, LVar3) - EVT_CALL(SetActorPos, YELLOW_ACTOR, LVar0, LVar2, LVar3) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(ActorExists, BLACK_ACTOR, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_CALL(GetActorVar, BLACK_ACTOR, AVAR_Koopa_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosA) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosD) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosC) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosB) - EVT_CALL(RandInt, 2, LVar0) - EVT_SET(LVar1, 1) - EVT_SUB(LVar0, LVar1) - EVT_ADD(LVar0, LVarD) - EVT_CALL(GetActorPos, BLACK_ACTOR, LVar1, LVar2, LVar3) - EVT_CALL(SetActorPos, BLACK_ACTOR, LVar0, LVar2, LVar3) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(ActorExists, RED_ACTOR, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_CALL(GetActorVar, RED_ACTOR, AVAR_Koopa_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosA) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosD) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosC) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosB) - EVT_CALL(RandInt, 2, LVar0) - EVT_SET(LVar1, 1) - EVT_SUB(LVar0, LVar1) - EVT_ADD(LVar0, LVarB) - EVT_CALL(GetActorPos, RED_ACTOR, LVar1, LVar2, LVar3) - EVT_CALL(SetActorPos, RED_ACTOR, LVar0, LVar2, LVar3) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, LVar0) - EVT_IF_EQ(LVar0, AVAL_Boss_TowerState_Unstable) - EVT_WAIT(2) - EVT_GOTO(1) - EVT_END_IF + Label(1) + Call(ActorExists, GREEN_ACTOR, LVar0) + IfNe(LVar0, FALSE) + Call(GetActorVar, GREEN_ACTOR, AVAR_Koopa_State, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_Koopa_State_PosA) + CaseOrEq(AVAL_Koopa_State_PosD) + CaseOrEq(AVAL_Koopa_State_PosC) + CaseOrEq(AVAL_Koopa_State_PosB) + Call(RandInt, 2, LVar0) + Set(LVar1, 1) + Sub(LVar0, LVar1) + Add(LVar0, LVarA) + Call(GetActorPos, GREEN_ACTOR, LVar1, LVar2, LVar3) + Call(SetActorPos, GREEN_ACTOR, LVar0, LVar2, LVar3) + EndCaseGroup + EndSwitch + EndIf + Call(ActorExists, YELLOW_ACTOR, LVar0) + IfNe(LVar0, FALSE) + Call(GetActorVar, YELLOW_ACTOR, AVAR_Koopa_State, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_Koopa_State_PosA) + CaseOrEq(AVAL_Koopa_State_PosD) + CaseOrEq(AVAL_Koopa_State_PosC) + CaseOrEq(AVAL_Koopa_State_PosB) + Call(RandInt, 2, LVar0) + Set(LVar1, 1) + Sub(LVar0, LVar1) + Add(LVar0, LVarC) + Call(GetActorPos, YELLOW_ACTOR, LVar1, LVar2, LVar3) + Call(SetActorPos, YELLOW_ACTOR, LVar0, LVar2, LVar3) + EndCaseGroup + EndSwitch + EndIf + Call(ActorExists, BLACK_ACTOR, LVar0) + IfNe(LVar0, FALSE) + Call(GetActorVar, BLACK_ACTOR, AVAR_Koopa_State, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_Koopa_State_PosA) + CaseOrEq(AVAL_Koopa_State_PosD) + CaseOrEq(AVAL_Koopa_State_PosC) + CaseOrEq(AVAL_Koopa_State_PosB) + Call(RandInt, 2, LVar0) + Set(LVar1, 1) + Sub(LVar0, LVar1) + Add(LVar0, LVarD) + Call(GetActorPos, BLACK_ACTOR, LVar1, LVar2, LVar3) + Call(SetActorPos, BLACK_ACTOR, LVar0, LVar2, LVar3) + EndCaseGroup + EndSwitch + EndIf + Call(ActorExists, RED_ACTOR, LVar0) + IfNe(LVar0, FALSE) + Call(GetActorVar, RED_ACTOR, AVAR_Koopa_State, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_Koopa_State_PosA) + CaseOrEq(AVAL_Koopa_State_PosD) + CaseOrEq(AVAL_Koopa_State_PosC) + CaseOrEq(AVAL_Koopa_State_PosB) + Call(RandInt, 2, LVar0) + Set(LVar1, 1) + Sub(LVar0, LVar1) + Add(LVar0, LVarB) + Call(GetActorPos, RED_ACTOR, LVar1, LVar2, LVar3) + Call(SetActorPos, RED_ACTOR, LVar0, LVar2, LVar3) + EndCaseGroup + EndSwitch + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, LVar0) + IfEq(LVar0, AVAL_Boss_TowerState_Unstable) + Wait(2) + Goto(1) + EndIf // once tower regains stability, reset X positions to initial values - EVT_CALL(ActorExists, GREEN_ACTOR, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_CALL(GetActorVar, GREEN_ACTOR, AVAR_Koopa_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosA) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosD) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosC) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosB) - EVT_CALL(GetActorPos, GREEN_ACTOR, LVar1, LVar2, LVar3) - EVT_CALL(SetActorPos, GREEN_ACTOR, LVarA, LVar2, LVar3) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(ActorExists, YELLOW_ACTOR, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_CALL(GetActorVar, YELLOW_ACTOR, AVAR_Koopa_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosA) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosD) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosC) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosB) - EVT_CALL(GetActorPos, YELLOW_ACTOR, LVar1, LVar2, LVar3) - EVT_CALL(SetActorPos, YELLOW_ACTOR, LVarC, LVar2, LVar3) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(ActorExists, BLACK_ACTOR, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_CALL(GetActorVar, BLACK_ACTOR, AVAR_Koopa_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosA) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosD) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosC) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosB) - EVT_CALL(GetActorPos, BLACK_ACTOR, LVar1, LVar2, LVar3) - EVT_CALL(SetActorPos, BLACK_ACTOR, LVarD, LVar2, LVar3) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(ActorExists, RED_ACTOR, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_CALL(GetActorVar, RED_ACTOR, AVAR_Koopa_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosA) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosD) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosC) - EVT_CASE_OR_EQ(AVAL_Koopa_State_PosB) - EVT_CALL(GetActorPos, RED_ACTOR, LVar1, LVar2, LVar3) - EVT_CALL(SetActorPos, RED_ACTOR, LVarB, LVar2, LVar3) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(ActorExists, GREEN_ACTOR, LVar0) + IfNe(LVar0, FALSE) + Call(GetActorVar, GREEN_ACTOR, AVAR_Koopa_State, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_Koopa_State_PosA) + CaseOrEq(AVAL_Koopa_State_PosD) + CaseOrEq(AVAL_Koopa_State_PosC) + CaseOrEq(AVAL_Koopa_State_PosB) + Call(GetActorPos, GREEN_ACTOR, LVar1, LVar2, LVar3) + Call(SetActorPos, GREEN_ACTOR, LVarA, LVar2, LVar3) + EndCaseGroup + EndSwitch + EndIf + Call(ActorExists, YELLOW_ACTOR, LVar0) + IfNe(LVar0, FALSE) + Call(GetActorVar, YELLOW_ACTOR, AVAR_Koopa_State, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_Koopa_State_PosA) + CaseOrEq(AVAL_Koopa_State_PosD) + CaseOrEq(AVAL_Koopa_State_PosC) + CaseOrEq(AVAL_Koopa_State_PosB) + Call(GetActorPos, YELLOW_ACTOR, LVar1, LVar2, LVar3) + Call(SetActorPos, YELLOW_ACTOR, LVarC, LVar2, LVar3) + EndCaseGroup + EndSwitch + EndIf + Call(ActorExists, BLACK_ACTOR, LVar0) + IfNe(LVar0, FALSE) + Call(GetActorVar, BLACK_ACTOR, AVAR_Koopa_State, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_Koopa_State_PosA) + CaseOrEq(AVAL_Koopa_State_PosD) + CaseOrEq(AVAL_Koopa_State_PosC) + CaseOrEq(AVAL_Koopa_State_PosB) + Call(GetActorPos, BLACK_ACTOR, LVar1, LVar2, LVar3) + Call(SetActorPos, BLACK_ACTOR, LVarD, LVar2, LVar3) + EndCaseGroup + EndSwitch + EndIf + Call(ActorExists, RED_ACTOR, LVar0) + IfNe(LVar0, FALSE) + Call(GetActorVar, RED_ACTOR, AVAR_Koopa_State, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_Koopa_State_PosA) + CaseOrEq(AVAL_Koopa_State_PosD) + CaseOrEq(AVAL_Koopa_State_PosC) + CaseOrEq(AVAL_Koopa_State_PosB) + Call(GetActorPos, RED_ACTOR, LVar1, LVar2, LVar3) + Call(SetActorPos, RED_ACTOR, LVarB, LVar2, LVar3) + EndCaseGroup + EndSwitch + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_KoopaBros_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) // set flags for player or partner hitting the koopa bros tower - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS1_PARTNER_ACTING) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AFLAG_Boss_PartnerHitTower) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_ELSE - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AFLAG_Boss_PlayerHitTower) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_END_IF - EVT_SET(LVarA, BOSS_CMD_HIT) - EVT_EXEC_WAIT(N(EVS_BroadcastToKoopaBros)) - EVT_WAIT(30) + Call(GetBattleFlags, LVar0) + IfFlag(LVar0, BS_FLAGS1_PARTNER_ACTING) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseOrConst(LVar0, AFLAG_Boss_PartnerHitTower) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + Else + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseOrConst(LVar0, AFLAG_Boss_PlayerHitTower) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + EndIf + Set(LVarA, BOSS_CMD_HIT) + ExecWait(N(EVS_BroadcastToKoopaBros)) + Wait(30) // if the attack was explosive, set both flags - EVT_CALL(GetLastElement, LVar0) - EVT_IF_FLAG(LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_BLAST) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AFLAG_Boss_PlayerHitTower) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AFLAG_Boss_PartnerHitTower) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_Broadcast_TowerUnstable)) - EVT_CASE_EQ(EVENT_HIT) + Call(GetLastElement, LVar0) + IfFlag(LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_BLAST) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseOrConst(LVar0, AFLAG_Boss_PlayerHitTower) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseOrConst(LVar0, AFLAG_Boss_PartnerHitTower) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + EndIf + ExecWait(N(EVS_Broadcast_TowerUnstable)) + CaseEq(EVENT_HIT) // set flags for player or partner hitting the koopa bros tower - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS1_PARTNER_ACTING) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AFLAG_Boss_PartnerHitTower) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_ELSE - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AFLAG_Boss_PlayerHitTower) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_END_IF + Call(GetBattleFlags, LVar0) + IfFlag(LVar0, BS_FLAGS1_PARTNER_ACTING) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseOrConst(LVar0, AFLAG_Boss_PartnerHitTower) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + Else + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseOrConst(LVar0, AFLAG_Boss_PlayerHitTower) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + EndIf // if the attack was explosive, set both flags - EVT_CALL(GetLastElement, LVar0) - EVT_IF_FLAG(LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_BLAST) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AFLAG_Boss_PlayerHitTower) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AFLAG_Boss_PartnerHitTower) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_END_IF + Call(GetLastElement, LVar0) + IfFlag(LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_BLAST) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseOrConst(LVar0, AFLAG_Boss_PlayerHitTower) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseOrConst(LVar0, AFLAG_Boss_PartnerHitTower) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + EndIf // if this was the second hit, topple the tower - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_IF_FLAG(LVar0, AFLAG_Boss_PlayerHitTower) - EVT_IF_FLAG(LVar0, AFLAG_Boss_PartnerHitTower) - EVT_EXEC_WAIT(N(EVS_Broadcast_ToppleHit)) - EVT_WAIT(20) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_IF - EVT_END_IF + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + IfFlag(LVar0, AFLAG_Boss_PlayerHitTower) + IfFlag(LVar0, AFLAG_Boss_PartnerHitTower) + ExecWait(N(EVS_Broadcast_ToppleHit)) + Wait(20) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndIf + EndIf // this was the first hit - EVT_SET(LVarA, BOSS_CMD_HIT) - EVT_EXEC_WAIT(N(EVS_BroadcastToKoopaBros)) - EVT_WAIT(30) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, LVar0) - EVT_IF_NE(LVar0, AVAL_Boss_TowerState_Unstable) - EVT_EXEC_WAIT(N(EVS_Broadcast_TowerUnstable)) - EVT_END_IF - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_IF_FLAG(LVar0, AFLAG_Boss_TowerUnstable) - EVT_IF_NOT_FLAG(LVar0, AFLAG_Boss_Dialogue_WereGoingOver) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar0) - EVT_CALL(ActorSpeak, MSG_CH1_0109, LVar0, 1, -1, -1) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AFLAG_Boss_Dialogue_WereGoingOver) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_WAIT(20) - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(EVENT_BURN_HIT) + Set(LVarA, BOSS_CMD_HIT) + ExecWait(N(EVS_BroadcastToKoopaBros)) + Wait(30) + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, LVar0) + IfNe(LVar0, AVAL_Boss_TowerState_Unstable) + ExecWait(N(EVS_Broadcast_TowerUnstable)) + EndIf + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + IfFlag(LVar0, AFLAG_Boss_TowerUnstable) + IfNotFlag(LVar0, AFLAG_Boss_Dialogue_WereGoingOver) + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar0) + Call(ActorSpeak, MSG_CH1_0109, LVar0, 1, -1, -1) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseOrConst(LVar0, AFLAG_Boss_Dialogue_WereGoingOver) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + Wait(20) + EndIf + EndIf + CaseEq(EVENT_BURN_HIT) // set flags for player or partner hitting the koopa bros tower - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS1_PARTNER_ACTING) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AFLAG_Boss_PartnerHitTower) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_ELSE - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AFLAG_Boss_PlayerHitTower) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_END_IF + Call(GetBattleFlags, LVar0) + IfFlag(LVar0, BS_FLAGS1_PARTNER_ACTING) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseOrConst(LVar0, AFLAG_Boss_PartnerHitTower) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + Else + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseOrConst(LVar0, AFLAG_Boss_PlayerHitTower) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + EndIf // if the attack was explosive, set both flags - EVT_CALL(GetLastElement, LVar0) - EVT_IF_FLAG(LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_BLAST) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AFLAG_Boss_PlayerHitTower) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AFLAG_Boss_PartnerHitTower) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_END_IF + Call(GetLastElement, LVar0) + IfFlag(LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_BLAST) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseOrConst(LVar0, AFLAG_Boss_PlayerHitTower) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseOrConst(LVar0, AFLAG_Boss_PartnerHitTower) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + EndIf // if this was the second hit, topple the tower - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_IF_FLAG(LVar0, AFLAG_Boss_PlayerHitTower) - EVT_IF_FLAG(LVar0, AFLAG_Boss_PartnerHitTower) - EVT_EXEC_WAIT(N(EVS_Broadcast_ToppleHit)) - EVT_WAIT(20) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_IF - EVT_END_IF + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + IfFlag(LVar0, AFLAG_Boss_PlayerHitTower) + IfFlag(LVar0, AFLAG_Boss_PartnerHitTower) + ExecWait(N(EVS_Broadcast_ToppleHit)) + Wait(20) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndIf + EndIf // this was the first hit - EVT_SET(LVarA, BOSS_CMD_BURN_HIT) - EVT_EXEC_WAIT(N(EVS_BroadcastToKoopaBros)) - EVT_WAIT(30) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, LVar0) - EVT_IF_NE(LVar0, AVAL_Boss_TowerState_Unstable) - EVT_EXEC_WAIT(N(EVS_Broadcast_TowerUnstable)) - EVT_END_IF - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_IF_FLAG(LVar0, AFLAG_Boss_TowerUnstable) - EVT_IF_NOT_FLAG(LVar0, AFLAG_Boss_Dialogue_WereGoingOver) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar0) - EVT_CALL(ActorSpeak, MSG_CH1_0109, LVar0, 1, -1, -1) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AFLAG_Boss_Dialogue_WereGoingOver) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_WAIT(20) - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(EVENT_ZERO_DAMAGE) - EVT_SET(LVarA, BOSS_CMD_NO_DAMAGE_HIT) - EVT_EXEC_WAIT(N(EVS_BroadcastToKoopaBros)) - EVT_CASE_EQ(EVENT_IMMUNE) + Set(LVarA, BOSS_CMD_BURN_HIT) + ExecWait(N(EVS_BroadcastToKoopaBros)) + Wait(30) + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, LVar0) + IfNe(LVar0, AVAL_Boss_TowerState_Unstable) + ExecWait(N(EVS_Broadcast_TowerUnstable)) + EndIf + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + IfFlag(LVar0, AFLAG_Boss_TowerUnstable) + IfNotFlag(LVar0, AFLAG_Boss_Dialogue_WereGoingOver) + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar0) + Call(ActorSpeak, MSG_CH1_0109, LVar0, 1, -1, -1) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseOrConst(LVar0, AFLAG_Boss_Dialogue_WereGoingOver) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + Wait(20) + EndIf + EndIf + CaseEq(EVENT_ZERO_DAMAGE) + Set(LVarA, BOSS_CMD_NO_DAMAGE_HIT) + ExecWait(N(EVS_BroadcastToKoopaBros)) + CaseEq(EVENT_IMMUNE) // set both flags if the tower is already unstable - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, LVar0) - EVT_IF_EQ(LVar0, AVAL_Boss_TowerState_Unstable) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AFLAG_Boss_PlayerHitTower) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AFLAG_Boss_PartnerHitTower) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_END_IF + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, LVar0) + IfEq(LVar0, AVAL_Boss_TowerState_Unstable) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseOrConst(LVar0, AFLAG_Boss_PlayerHitTower) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseOrConst(LVar0, AFLAG_Boss_PartnerHitTower) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + EndIf // if this was the second hit, topple the tower - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_IF_FLAG(LVar0, AFLAG_Boss_PlayerHitTower) - EVT_IF_FLAG(LVar0, AFLAG_Boss_PartnerHitTower) - EVT_EXEC_WAIT(N(EVS_Broadcast_ToppleHit)) - EVT_WAIT(20) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_IF - EVT_END_IF + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + IfFlag(LVar0, AFLAG_Boss_PlayerHitTower) + IfFlag(LVar0, AFLAG_Boss_PartnerHitTower) + ExecWait(N(EVS_Broadcast_ToppleHit)) + Wait(20) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndIf + EndIf // this was the first hit - EVT_SET(LVarA, BOSS_CMD_NO_DAMAGE_HIT) - EVT_EXEC_WAIT(N(EVS_BroadcastToKoopaBros)) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_IF_FLAG(LVar0, AFLAG_Boss_TowerUnstable) - EVT_IF_NOT_FLAG(LVar0, AFLAG_Boss_Dialogue_WereGoingOver) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar0) - EVT_CALL(ActorSpeak, MSG_CH1_0109, LVar0, 1, -1, -1) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AFLAG_Boss_Dialogue_WereGoingOver) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_WAIT(20) - EVT_END_IF - EVT_END_IF - EVT_CASE_OR_EQ(EVENT_DEATH) - EVT_CASE_OR_EQ(EVENT_BURN_DEATH) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Set(LVarA, BOSS_CMD_NO_DAMAGE_HIT) + ExecWait(N(EVS_BroadcastToKoopaBros)) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + IfFlag(LVar0, AFLAG_Boss_TowerUnstable) + IfNotFlag(LVar0, AFLAG_Boss_Dialogue_WereGoingOver) + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_TopKoopaID, LVar0) + Call(ActorSpeak, MSG_CH1_0109, LVar0, 1, -1, -1) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseOrConst(LVar0, AFLAG_Boss_Dialogue_WereGoingOver) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + Wait(20) + EndIf + EndIf + CaseOrEq(EVENT_DEATH) + CaseOrEq(EVENT_BURN_DEATH) + EndCaseGroup + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_KoopaBros_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) // reform stable tower if tipping - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Boss_TowerState_None) - EVT_CASE_EQ(AVAL_Boss_TowerState_Stable) - EVT_CASE_EQ(AVAL_Boss_TowerState_Unstable) - EVT_WAIT(30) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, AVAL_Boss_TowerState_Stable) - EVT_SET(LVarA, BOSS_CMD_STABLE) - EVT_EXEC_WAIT(N(EVS_BroadcastToKoopaBros)) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_AND_CONST(LVar0, ~AFLAG_Boss_TowerUnstable) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_AND_CONST(LVar0, ~AFLAG_Boss_Dialogue_WereGoingOver) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_TowerHeight, LVarA) - EVT_SET(LVar0, LVarA) - EVT_MUL(LVar0, 18) - EVT_ADD(LVar0, 20) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_TOWER, -4, LVar0) - EVT_CALL(SetActorSize, ACTOR_SELF, LVar0, 45) - EVT_CASE_EQ(AVAL_Boss_TowerState_Toppled) - EVT_END_SWITCH + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, LVar0) + Switch(LVar0) + CaseEq(AVAL_Boss_TowerState_None) + CaseEq(AVAL_Boss_TowerState_Stable) + CaseEq(AVAL_Boss_TowerState_Unstable) + Wait(30) + Call(SetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, AVAL_Boss_TowerState_Stable) + Set(LVarA, BOSS_CMD_STABLE) + ExecWait(N(EVS_BroadcastToKoopaBros)) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseAndConst(LVar0, ~AFLAG_Boss_TowerUnstable) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseAndConst(LVar0, ~AFLAG_Boss_Dialogue_WereGoingOver) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_TowerHeight, LVarA) + Set(LVar0, LVarA) + Mul(LVar0, 18) + Add(LVar0, 20) + Call(SetTargetOffset, ACTOR_SELF, PRT_TOWER, -4, LVar0) + Call(SetActorSize, ACTOR_SELF, LVar0, 45) + CaseEq(AVAL_Boss_TowerState_Toppled) + EndSwitch // find if any koopa bros are toppled - EVT_SET(LVar0, FIRST_KOOPA_ACTOR) - EVT_LOOP(4) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_CALL(GetStatusFlags, LVar0, LVar1) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(GetActorVar, LVar0, AVAR_Koopa_State, LVar1) - EVT_IF_EQ(LVar1, AVAL_Koopa_State_Toppled) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_ADD(LVar0, 1) - EVT_END_LOOP + Set(LVar0, FIRST_KOOPA_ACTOR) + Loop(4) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, TRUE) + Call(GetStatusFlags, LVar0, LVar1) + IfEq(LVar1, 0) + Call(GetActorVar, LVar0, AVAR_Koopa_State, LVar1) + IfEq(LVar1, AVAL_Koopa_State_Toppled) + Set(LFlag0, TRUE) + BreakLoop + EndIf + EndIf + EndIf + Add(LVar0, 1) + EndLoop // zoom in to show the toppled koopa bros and have them try to get up - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 90, 0, 0) - EVT_CALL(SetBattleCamZoom, 350) - EVT_CALL(SetBattleCamOffsetZ, 40) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_END_IF - EVT_SET(LVarA, BOSS_CMD_TRY_GET_UP) - EVT_EXEC_WAIT(N(EVS_BroadcastToKoopaBros)) + IfEq(LFlag0, TRUE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 90, 0, 0) + Call(SetBattleCamZoom, 350) + Call(SetBattleCamOffsetZ, 40) + Call(MoveBattleCamOver, 15) + Wait(15) + EndIf + Set(LVarA, BOSS_CMD_TRY_GET_UP) + ExecWait(N(EVS_BroadcastToKoopaBros)) // try tower operations - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Boss_TowerState_Stable) + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, LVar0) + Switch(LVar0) + CaseEq(AVAL_Boss_TowerState_Stable) // try adding any orphaned koopa bros to the tower - EVT_EXEC_WAIT(N(EVS_TryJoiningTower)) - EVT_CASE_DEFAULT + ExecWait(N(EVS_TryJoiningTower)) + CaseDefault // try forming a new tower - EVT_EXEC_WAIT(N(EVS_TryFormingTower)) - EVT_END_SWITCH + ExecWait(N(EVS_TryFormingTower)) + EndSwitch // if only one koopa bro is alive, perform a solo attack - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_IF_FLAG(LVar0, AFLAG_Boss_DoingSoloAttack) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 15) - EVT_SET(LVarA, BOSS_CMD_SOLO_ATTACK) - EVT_EXEC_WAIT(N(EVS_BroadcastToKoopaBros)) - EVT_LABEL(123) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_IF_FLAG(LVar0, AFLAG_Boss_DoingSoloAttack) - EVT_WAIT(1) - EVT_GOTO(123) - EVT_END_IF - EVT_SET(LVarA, BOSS_CMD_GET_READY) - EVT_EXEC_WAIT(N(EVS_BroadcastToKoopaBros)) - EVT_WAIT(5) - EVT_RETURN - EVT_END_IF - EVT_SET(LVarA, BOSS_CMD_GET_READY) - EVT_EXEC_WAIT(N(EVS_BroadcastToKoopaBros)) - EVT_WAIT(5) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, LVar0) - EVT_IF_EQ(LVar0, AVAL_Boss_TowerState_Toppled) - EVT_RETURN - EVT_END_IF + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + IfFlag(LVar0, AFLAG_Boss_DoingSoloAttack) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 15) + Set(LVarA, BOSS_CMD_SOLO_ATTACK) + ExecWait(N(EVS_BroadcastToKoopaBros)) + Label(123) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + IfFlag(LVar0, AFLAG_Boss_DoingSoloAttack) + Wait(1) + Goto(123) + EndIf + Set(LVarA, BOSS_CMD_GET_READY) + ExecWait(N(EVS_BroadcastToKoopaBros)) + Wait(5) + Return + EndIf + Set(LVarA, BOSS_CMD_GET_READY) + ExecWait(N(EVS_BroadcastToKoopaBros)) + Wait(5) + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, LVar0) + IfEq(LVar0, AVAL_Boss_TowerState_Toppled) + Return + EndIf // execute spin attack - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_IF_NOT_FLAG(LVar0, AFLAG_Boss_Dialogue_SpinAttack) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_LeadKoopaID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(GREEN_ACTOR) - EVT_CALL(ActorSpeak, MSG_CH1_0108, LVar0, 1, ANIM_KoopaBros_Green_Talk, ANIM_KoopaBros_Green_Idle) - EVT_CASE_EQ(YELLOW_ACTOR) - EVT_CALL(ActorSpeak, MSG_CH1_0108, LVar0, 1, ANIM_KoopaBros_Yellow_Talk, ANIM_KoopaBros_Yellow_Idle) - EVT_CASE_EQ(BLACK_ACTOR) - EVT_CALL(ActorSpeak, MSG_CH1_0108, LVar0, 1, ANIM_KoopaBros_Black_Talk, ANIM_KoopaBros_Black_Idle) - EVT_CASE_EQ(RED_ACTOR) - EVT_CALL(ActorSpeak, MSG_CH1_0108, LVar0, 1, ANIM_KoopaBros_Red_Talk, ANIM_KoopaBros_Red_Idle) - EVT_END_SWITCH - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AFLAG_Boss_Dialogue_SpinAttack) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_END_IF - EVT_SET(LVarA, BOSS_CMD_SPIN_ATTACK) - EVT_EXEC_WAIT(N(EVS_BroadcastToKoopaBros)) - EVT_LABEL(10) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, LVar0) - EVT_WAIT(1) - EVT_IF_NE(LVar0, AVAL_Boss_TowerState_None) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, AVAL_Boss_TowerState_Stable) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + IfNotFlag(LVar0, AFLAG_Boss_Dialogue_SpinAttack) + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_LeadKoopaID, LVar0) + Switch(LVar0) + CaseEq(GREEN_ACTOR) + Call(ActorSpeak, MSG_CH1_0108, LVar0, 1, ANIM_KoopaBros_Green_Talk, ANIM_KoopaBros_Green_Idle) + CaseEq(YELLOW_ACTOR) + Call(ActorSpeak, MSG_CH1_0108, LVar0, 1, ANIM_KoopaBros_Yellow_Talk, ANIM_KoopaBros_Yellow_Idle) + CaseEq(BLACK_ACTOR) + Call(ActorSpeak, MSG_CH1_0108, LVar0, 1, ANIM_KoopaBros_Black_Talk, ANIM_KoopaBros_Black_Idle) + CaseEq(RED_ACTOR) + Call(ActorSpeak, MSG_CH1_0108, LVar0, 1, ANIM_KoopaBros_Red_Talk, ANIM_KoopaBros_Red_Idle) + EndSwitch + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseOrConst(LVar0, AFLAG_Boss_Dialogue_SpinAttack) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + EndIf + Set(LVarA, BOSS_CMD_SPIN_ATTACK) + ExecWait(N(EVS_BroadcastToKoopaBros)) + Label(10) + Call(GetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, LVar0) + Wait(1) + IfNe(LVar0, AVAL_Boss_TowerState_None) + Goto(10) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_Boss_TowerState, AVAL_Boss_TowerState_Stable) + Return + End }; EvtScript N(EVS_KoopaBros_HandlePhase) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar0) - EVT_CALL(SetEnemyHP, ACTOR_SELF, LVar0) - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_AND_CONST(LVar0, ~AFLAG_Boss_PlayerHitTower) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_CALL(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_BITWISE_AND_CONST(LVar0, ~AFLAG_Boss_PartnerHitTower) - EVT_CALL(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) - EVT_CASE_EQ(PHASE_ENEMY_END) - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar0) + Call(SetEnemyHP, ACTOR_SELF, LVar0) + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseAndConst(LVar0, ~AFLAG_Boss_PlayerHitTower) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + Call(GetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + BitwiseAndConst(LVar0, ~AFLAG_Boss_PartnerHitTower) + Call(SetActorVar, BOSS_ACTOR, AVAR_Boss_Flags, LVar0) + CaseEq(PHASE_ENEMY_BEGIN) + CaseEq(PHASE_ENEMY_END) + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/area/trd_part_3/actor/eldstar.c b/src/battle/area/trd_part_3/actor/eldstar.c index 8ae96565d21..627e2e9e982 100644 --- a/src/battle/area/trd_part_3/actor/eldstar.c +++ b/src/battle/area/trd_part_3/actor/eldstar.c @@ -88,12 +88,12 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_EXEC(N(EVS_ManageTutorial)) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Exec(N(EVS_ManageTutorial)) + Return + End }; API_CALLABLE(N(UpdateHoverOffset)) { @@ -185,163 +185,163 @@ API_CALLABLE(N(AddStarPower)) { } EvtScript N(EVS_Idle) = { - EVT_CALL(N(UpdateHoverOffset)) - EVT_RETURN - EVT_END + Call(N(UpdateHoverOffset)) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_ManageTutorial) = { - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_TUTORIAL_BATTLE, TRUE) - EVT_CALL(N(ClearPlayerMenuSelections)) - EVT_CALL(WaitForState, BATTLE_STATE_PLAYER_MENU) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_WAIT(15) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(ActorSpeak, MSG_CH1_0114, ACTOR_SELF, PRT_MAIN, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle) - EVT_THREAD - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetGoalPos, ACTOR_SELF, -110, 100, 0) - EVT_CALL(FlyToGoal, ACTOR_SELF, 20, 0, EASING_COS_IN_OUT) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_LookUp) - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(N(StartBlinkingSP)) - EVT_WAIT(120) - EVT_CALL(N(StopBlinkingSP)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(FlyToGoal, ACTOR_SELF, 20, 0, EASING_COS_IN_OUT) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_CALL(ActorSpeak, MSG_CH1_0115, ACTOR_SELF, PRT_MAIN, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_LookUp) - EVT_CALL(N(StartBlinkingSP)) - EVT_WAIT(120) - EVT_CALL(N(StopBlinkingSP)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(ActorSpeak, MSG_CH1_0116, ACTOR_SELF, PRT_MAIN, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle) - EVT_WAIT(10) - EVT_CALL(SetBattleMenuEnabledFlags, BTL_MENU_ENABLED_STAR_POWERS) - EVT_CALL(SetEnabledStarPowers, 1 << STAR_POWER_INDEX(MOVE_REFRESH)) - EVT_CALL(WaitForState, BATTLE_STATE_PLAYER_MOVE) - EVT_SET(LVar0, 255) - EVT_LOOP(10) - EVT_SUB(LVar0, 25) - EVT_IF_LT(LVar0, 0) - EVT_SET(LVar0, 0) - EVT_END_IF - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_THREAD - EVT_CALL(N(func_80218170_4CF320)) - EVT_END_THREAD - EVT_CALL(WaitForState, BATTLE_STATE_END_PLAYER_TURN) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 25) - EVT_IF_GT(LVar0, 255) - EVT_SET(LVar0, 255) - EVT_END_IF - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, 255) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE) - EVT_CALL(ActorSpeak, MSG_CH1_0117, ACTOR_SELF, PRT_MAIN, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle) - EVT_WAIT(10) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_LookUp) - EVT_CALL(N(StartBlinkingSP)) - EVT_WAIT(120) - EVT_CALL(N(StopBlinkingSP)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(ActorSpeak, MSG_CH1_0118, ACTOR_SELF, PRT_MAIN, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle) - EVT_WAIT(10) - EVT_CALL(SetBattleState, BATTLE_STATE_END_TURN) - EVT_CALL(WaitForState, BATTLE_STATE_BEGIN_TURN) - EVT_WAIT(20) - EVT_CALL(ActorSpeak, MSG_CH1_0119, ACTOR_SELF, PRT_MAIN, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle) - EVT_WAIT(10) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_THREAD - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetGoalPos, ACTOR_SELF, -110, 100, 0) - EVT_CALL(FlyToGoal, ACTOR_SELF, 20, 0, EASING_COS_IN_OUT) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_LookUp) - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_LookUp) - EVT_CALL(N(StartBlinkingSP)) - EVT_WAIT(120) - EVT_CALL(N(StopBlinkingSP)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(FlyToGoal, ACTOR_SELF, 20, 0, EASING_COS_IN_OUT) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_CALL(ActorSpeak, MSG_CH1_011A, ACTOR_SELF, PRT_MAIN, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle) - EVT_WAIT(10) - EVT_CALL(ActorSpeak, MSG_CH1_011B, ACTOR_SELF, PRT_MAIN, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle) - EVT_WAIT(10) - EVT_CALL(SetBattleMenuEnabledFlags, BTL_MENU_ENABLED_STAR_POWERS) - EVT_CALL(SetEnabledStarPowers, 1 << STAR_POWER_INDEX(MOVE_FOCUS)) - EVT_CALL(N(ClearPlayerMenuSelections)) - EVT_CALL(WaitForState, BATTLE_STATE_PLAYER_MOVE) - EVT_SET(LVar0, 255) - EVT_LOOP(10) - EVT_SUB(LVar0, 25) - EVT_IF_LT(LVar0, 0) - EVT_SET(LVar0, 0) - EVT_END_IF - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_THREAD - EVT_CALL(N(func_80218170_4CF320)) - EVT_END_THREAD - EVT_CALL(WaitForState, BATTLE_STATE_END_PLAYER_TURN) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 25) - EVT_IF_GT(LVar0, 255) - EVT_SET(LVar0, 255) - EVT_END_IF - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, 255) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE) - EVT_CALL(ActorSpeak, MSG_CH1_011C, ACTOR_SELF, PRT_MAIN, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle) - EVT_WAIT(10) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_LookUp) - EVT_CALL(N(StartBlinkingSP)) - EVT_WAIT(120) - EVT_CALL(N(StopBlinkingSP)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(ActorSpeak, MSG_CH1_011D, ACTOR_SELF, PRT_MAIN, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle) - EVT_CALL(WaitForState, BATTLE_STATE_0) - EVT_CALL(SetBattleState, BATTLE_STATE_END_TRAINING_BATTLE) - EVT_WAIT(10000) - EVT_RETURN - EVT_END + Call(SetBattleFlagBits, BS_FLAGS1_TUTORIAL_BATTLE, TRUE) + Call(N(ClearPlayerMenuSelections)) + Call(WaitForState, BATTLE_STATE_PLAYER_MENU) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Wait(15) + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(ActorSpeak, MSG_CH1_0114, ACTOR_SELF, PRT_MAIN, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle) + Thread + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetGoalPos, ACTOR_SELF, -110, 100, 0) + Call(FlyToGoal, ACTOR_SELF, 20, 0, EASING_COS_IN_OUT) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_LookUp) + EndThread + Wait(10) + Call(N(StartBlinkingSP)) + Wait(120) + Call(N(StopBlinkingSP)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(SetGoalToHome, ACTOR_SELF) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(FlyToGoal, ACTOR_SELF, 20, 0, EASING_COS_IN_OUT) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Call(ActorSpeak, MSG_CH1_0115, ACTOR_SELF, PRT_MAIN, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle) + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_LookUp) + Call(N(StartBlinkingSP)) + Wait(120) + Call(N(StopBlinkingSP)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(ActorSpeak, MSG_CH1_0116, ACTOR_SELF, PRT_MAIN, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle) + Wait(10) + Call(SetBattleMenuEnabledFlags, BTL_MENU_ENABLED_STAR_POWERS) + Call(SetEnabledStarPowers, 1 << STAR_POWER_INDEX(MOVE_REFRESH)) + Call(WaitForState, BATTLE_STATE_PLAYER_MOVE) + Set(LVar0, 255) + Loop(10) + Sub(LVar0, 25) + IfLt(LVar0, 0) + Set(LVar0, 0) + EndIf + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) + Thread + Call(N(func_80218170_4CF320)) + EndThread + Call(WaitForState, BATTLE_STATE_END_PLAYER_TURN) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 25) + IfGt(LVar0, 255) + Set(LVar0, 255) + EndIf + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, 255) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE) + Call(ActorSpeak, MSG_CH1_0117, ACTOR_SELF, PRT_MAIN, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle) + Wait(10) + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_LookUp) + Call(N(StartBlinkingSP)) + Wait(120) + Call(N(StopBlinkingSP)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(ActorSpeak, MSG_CH1_0118, ACTOR_SELF, PRT_MAIN, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle) + Wait(10) + Call(SetBattleState, BATTLE_STATE_END_TURN) + Call(WaitForState, BATTLE_STATE_BEGIN_TURN) + Wait(20) + Call(ActorSpeak, MSG_CH1_0119, ACTOR_SELF, PRT_MAIN, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle) + Wait(10) + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Thread + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetGoalPos, ACTOR_SELF, -110, 100, 0) + Call(FlyToGoal, ACTOR_SELF, 20, 0, EASING_COS_IN_OUT) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_LookUp) + EndThread + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_LookUp) + Call(N(StartBlinkingSP)) + Wait(120) + Call(N(StopBlinkingSP)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(SetGoalToHome, ACTOR_SELF) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(FlyToGoal, ACTOR_SELF, 20, 0, EASING_COS_IN_OUT) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Call(ActorSpeak, MSG_CH1_011A, ACTOR_SELF, PRT_MAIN, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle) + Wait(10) + Call(ActorSpeak, MSG_CH1_011B, ACTOR_SELF, PRT_MAIN, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle) + Wait(10) + Call(SetBattleMenuEnabledFlags, BTL_MENU_ENABLED_STAR_POWERS) + Call(SetEnabledStarPowers, 1 << STAR_POWER_INDEX(MOVE_FOCUS)) + Call(N(ClearPlayerMenuSelections)) + Call(WaitForState, BATTLE_STATE_PLAYER_MOVE) + Set(LVar0, 255) + Loop(10) + Sub(LVar0, 25) + IfLt(LVar0, 0) + Set(LVar0, 0) + EndIf + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) + Thread + Call(N(func_80218170_4CF320)) + EndThread + Call(WaitForState, BATTLE_STATE_END_PLAYER_TURN) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 25) + IfGt(LVar0, 255) + Set(LVar0, 255) + EndIf + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, 255) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE) + Call(ActorSpeak, MSG_CH1_011C, ACTOR_SELF, PRT_MAIN, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle) + Wait(10) + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_LookUp) + Call(N(StartBlinkingSP)) + Wait(120) + Call(N(StopBlinkingSP)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(ActorSpeak, MSG_CH1_011D, ACTOR_SELF, PRT_MAIN, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle) + Call(WaitForState, BATTLE_STATE_0) + Call(SetBattleState, BATTLE_STATE_END_TRAINING_BATTLE) + Wait(10000) + Return + End }; diff --git a/src/battle/camera.c b/src/battle/camera.c index 62d9e40de40..4057235c38c 100644 --- a/src/battle/camera.c +++ b/src/battle/camera.c @@ -36,106 +36,106 @@ s8 BattleCam_IsFrozen = FALSE; s32 BattleCam_CurrentPresetID = -1; EvtScript CamPreset_B = { - EVT_CALL(CamPresetUpdate_B) - EVT_RETURN - EVT_END + Call(CamPresetUpdate_B) + Return + End }; EvtScript CamPreset_F = { - EVT_CALL(CamPresetUpdate_F) - EVT_RETURN - EVT_END + Call(CamPresetUpdate_F) + Return + End }; EvtScript CamPreset_M = { - EVT_CALL(CamPresetUpdate_M) - EVT_RETURN - EVT_END + Call(CamPresetUpdate_M) + Return + End }; EvtScript CamPreset_G = { - EVT_CALL(CamPresetUpdate_G) - EVT_RETURN - EVT_END + Call(CamPresetUpdate_G) + Return + End }; EvtScript CamPreset_I = { - EVT_CALL(CamPresetUpdate_I) - EVT_RETURN - EVT_END + Call(CamPresetUpdate_I) + Return + End }; EvtScript CamPreset_H = { - EVT_CALL(CamPresetUpdate_H) - EVT_RETURN - EVT_END + Call(CamPresetUpdate_H) + Return + End }; EvtScript CamPreset_N = { - EVT_CALL(CamPresetUpdate_N) - EVT_RETURN - EVT_END + Call(CamPresetUpdate_N) + Return + End }; EvtScript EVS_BattleCam_Default = { - EVT_CALL(BattleCamImpl_Default) - EVT_RETURN - EVT_END + Call(BattleCamImpl_Default) + Return + End }; EvtScript CamPreset_D = { - EVT_CALL(CamPresetUpdate_D) - EVT_RETURN - EVT_END + Call(CamPresetUpdate_D) + Return + End }; EvtScript CamPreset_E = { - EVT_CALL(CamPresetUpdate_E) - EVT_RETURN - EVT_END + Call(CamPresetUpdate_E) + Return + End }; EvtScript CamPreset_J = { - EVT_CALL(CamPresetUpdate_J) - EVT_RETURN - EVT_END + Call(CamPresetUpdate_J) + Return + End }; EvtScript CamPreset_K = { - EVT_CALL(CamPresetUpdate_K) - EVT_RETURN - EVT_END + Call(CamPresetUpdate_K) + Return + End }; EvtScript CamPreset_L = { - EVT_CALL(CamPresetUpdate_L) - EVT_RETURN - EVT_END + Call(CamPresetUpdate_L) + Return + End }; EvtScript CamPreset_A = { - EVT_CALL(SetBattleCamPos, 0, 15, 0) - EVT_CALL(SetBattleCamParam, AUX_CAM_BOOM_LENGTH, 550) - EVT_CALL(SetBattleCamParam, AUX_CAM_PARAM_3, 100) - EVT_CALL(SetBattleCamParam, AUX_CAM_BOOM_PITCH, 8) - EVT_RETURN - EVT_END + Call(SetBattleCamPos, 0, 15, 0) + Call(SetBattleCamParam, AUX_CAM_BOOM_LENGTH, 550) + Call(SetBattleCamParam, AUX_CAM_PARAM_3, 100) + Call(SetBattleCamParam, AUX_CAM_BOOM_PITCH, 8) + Return + End }; EvtScript EVS_OnBattleInit = { - EVT_CALL(SetCamPerspective, CAM_BATTLE, CAM_UPDATE_MODE_6, 25, 16, 1024) - EVT_CALL(SetCamViewport, CAM_BATTLE, 12, 20, 296, 200) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetCamEnabled, CAM_BATTLE, TRUE) - EVT_WAIT(1) - EVT_CALL(InitVirtualEntityList) - EVT_CALL(InitAnimatedModels) - EVT_CALL(func_802CABE8, CAM_BATTLE, 0, 240, 100, 8) - EVT_CALL(func_802CAE50, CAM_BATTLE, -75, 35, 0) - EVT_CALL(BattleCamTargetActor, 0) - EVT_CALL(func_8024CE9C) - EVT_RETURN - EVT_END + Call(SetCamPerspective, CAM_BATTLE, CAM_UPDATE_MODE_6, 25, 16, 1024) + Call(SetCamViewport, CAM_BATTLE, 12, 20, 296, 200) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetCamEnabled, CAM_BATTLE, TRUE) + Wait(1) + Call(InitVirtualEntityList) + Call(InitAnimatedModels) + Call(func_802CABE8, CAM_BATTLE, 0, 240, 100, 8) + Call(func_802CAE50, CAM_BATTLE, -75, 35, 0) + Call(BattleCamTargetActor, 0) + Call(func_8024CE9C) + Return + End }; API_CALLABLE(CamPresetUpdate_B) { diff --git a/src/battle/common/actor/albino_dino.inc.c b/src/battle/common/actor/albino_dino.inc.c index 97cafc4c53f..238d3a9f738 100644 --- a/src/battle/common/actor/albino_dino.inc.c +++ b/src/battle/common/actor/albino_dino.inc.c @@ -115,228 +115,228 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_AlbinoDino_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_AlbinoDino_Idle) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_AlbinoDino_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_AlbinoDino_Idle) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_AlbinoDino_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_AlbinoDino_BurntHurt) - EVT_SET_CONST(LVar2, ANIM_AlbinoDino_BurntStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_AlbinoDino_BurntHurt) - EVT_SET_CONST(LVar2, ANIM_AlbinoDino_BurntStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_AlbinoDino_BurntStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_AlbinoDino_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_AlbinoDino_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_AlbinoDino_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_AlbinoDino_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_AlbinoDino_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_AlbinoDino_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_AlbinoDino_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_AlbinoDino_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_AlbinoDino_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_AlbinoDino_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_AlbinoDino_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_AlbinoDino_Run) - EVT_SET_CONST(LVar2, ANIM_AlbinoDino_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_AlbinoDino_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_AlbinoDino_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_AlbinoDino_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_AlbinoDino_BurntHurt) + SetConst(LVar2, ANIM_AlbinoDino_BurntStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_AlbinoDino_BurntHurt) + SetConst(LVar2, ANIM_AlbinoDino_BurntStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_AlbinoDino_BurntStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_AlbinoDino_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_AlbinoDino_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_AlbinoDino_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_AlbinoDino_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_AlbinoDino_Hurt) + ExecWait(EVS_Enemy_Knockback) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_AlbinoDino_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_AlbinoDino_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_AlbinoDino_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_AlbinoDino_Hurt) + ExecWait(EVS_Enemy_Hit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_AlbinoDino_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_AlbinoDino_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_AlbinoDino_Run) + SetConst(LVar2, ANIM_AlbinoDino_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_AlbinoDino_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_AlbinoDino_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_AddWalkQuakeFX) = { - EVT_SET(LVarA, 0) - EVT_LABEL(0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorYaw, ACTOR_SELF, LVar3) - EVT_IF_EQ(LVar3, 0) - EVT_ADD(LVar0, 20) - EVT_ELSE - EVT_ADD(LVar0, -20) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 25, 8, 45, 20, 0) - EVT_IF_GT(LVarA, 3) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.2)) - EVT_SET(LVarA, 0) - EVT_END_IF - EVT_ADD(LVarA, 1) - EVT_WAIT(2) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVarA, 0) + Label(0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorYaw, ACTOR_SELF, LVar3) + IfEq(LVar3, 0) + Add(LVar0, 20) + Else + Add(LVar0, -20) + EndIf + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 25, 8, 45, 20, 0) + IfGt(LVarA, 3) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2)) + Set(LVarA, 0) + EndIf + Add(LVarA, 1) + Wait(2) + Goto(0) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_EXEC_GET_TID(N(EVS_AddWalkQuakeFX), LVar9) - EVT_THREAD - EVT_LOOP(3) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ALBINO_DINO_STEP_A) - EVT_WAIT(4) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ALBINO_DINO_STEP_B) - EVT_WAIT(4) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_AlbinoDino_Run) - EVT_WAIT(20) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarF, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -100, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(12.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_KILL_THREAD(LVar9) - EVT_END_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(30) - EVT_IF_EQ(LVarF, HIT_RESULT_LUCKY) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(40) - EVT_CALL(YieldTurn) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_CALL(AddGoalPos, ACTOR_SELF, 12, 0, 0) - EVT_ELSE - EVT_CALL(AddGoalPos, ACTOR_SELF, 30, 0, 0) - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(12.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(1.5)) - EVT_END_THREAD - EVT_KILL_THREAD(LVar9) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + ExecGetTID(N(EVS_AddWalkQuakeFX), LVar9) + Thread + Loop(3) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ALBINO_DINO_STEP_A) + Wait(4) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ALBINO_DINO_STEP_B) + Wait(4) + EndLoop + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_AlbinoDino_Run) + Wait(20) + Call(EnemyTestTarget, ACTOR_SELF, LVarF, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarF) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Thread + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -100, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(12.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + KillThread(LVar9) + EndThread + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(30) + IfEq(LVarF, HIT_RESULT_LUCKY) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(40) + Call(YieldTurn) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorYaw, ACTOR_SELF, 180) + ExecWait(N(EVS_ReturnHome)) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Call(AddGoalPos, ACTOR_SELF, 12, 0, 0) + Else + Call(AddGoalPos, ACTOR_SELF, 30, 0, 0) + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(12.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(1.5)) + EndThread + KillThread(LVar9) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) // invalid status field has 24% chance, but no status and doesn't have STATUS_FLAG_80000000 set - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 24, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ALBINO_DINO_STEP_B) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_AlbinoDino_Idle) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 3, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, 0, 0, 24, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ALBINO_DINO_STEP_B) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_AlbinoDino_Idle) + Call(ShakeCam, CAM_BATTLE, 0, 3, Float(1.0)) + Wait(10) + Call(YieldTurn) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/amazy_dayzee.inc.c b/src/battle/common/actor/amazy_dayzee.inc.c index b233abf4377..45ba68d1f89 100644 --- a/src/battle/common/actor/amazy_dayzee.inc.c +++ b/src/battle/common/actor/amazy_dayzee.inc.c @@ -100,283 +100,283 @@ s32 N(DefaultAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 2, LVar0, LVar1, LVar2, 30, 0) - EVT_WAIT(15) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 15) + Sub(LVar2, 2) + PlayEffect(EFFECT_SPARKLES, 2, LVar0, LVar1, LVar2, 30, 0) + Wait(15) + Goto(0) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Amazy_Anim03) + ExecWait(EVS_Enemy_ReturnHome) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim09) - EVT_SET_CONST(LVar2, ANIM_Dayzee_Amazy_Anim0A) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim09) - EVT_SET_CONST(LVar2, ANIM_Dayzee_Amazy_Anim0A) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim0A) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim04) - EVT_SET_CONST(LVar2, ANIM_Dayzee_Amazy_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) - EVT_ELSE - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Amazy_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Amazy_Anim08) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Amazy_Anim09) + SetConst(LVar2, ANIM_Dayzee_Amazy_Anim0A) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Amazy_Anim09) + SetConst(LVar2, ANIM_Dayzee_Amazy_Anim0A) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Amazy_Anim0A) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Amazy_Anim08) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Amazy_Anim08) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Amazy_Anim08) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Amazy_Anim08) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Amazy_Anim08) + ExecWait(EVS_Enemy_Knockback) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Amazy_Anim08) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Amazy_Anim08) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Amazy_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Amazy_Anim08) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Amazy_Anim08) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Amazy_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Amazy_Anim04) + SetConst(LVar2, ANIM_Dayzee_Amazy_Anim08) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Amazy_Anim04) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) + Else + Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) + EndIf + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Amazy_Anim08) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_Sing) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorPos, ACTOR_SELF, -20, LVar1, LVar2) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(MoveBattleCamOver, 70) - EVT_SET(LFlag0, FALSE) - EVT_LABEL(0) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Amazy_Anim0E) - EVT_SET(LFlag0, TRUE) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Amazy_Anim0F) - EVT_SET(LFlag0, FALSE) - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_IF_GT(LVar0, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Amazy_Anim0E) - EVT_SET(LFlag0, TRUE) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Amazy_Anim0F) - EVT_SET(LFlag0, FALSE) - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(SetGoalPos, ACTOR_SELF, -35, 0, 10) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Amazy_Anim01) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Amazy_Anim06) - EVT_WAIT(40) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Amazy_Anim07) - EVT_END_THREAD - EVT_WAIT(20) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_DAYZEE_SONG) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 25) - EVT_ADD(LVar2, 2) - EVT_LOOP(13) - EVT_CALL(RandInt, 30, LVar3) - EVT_SUB(LVar3, 15) - EVT_ADD(LVar3, LVar0) - EVT_PLAY_EFFECT(EFFECT_MUSIC_NOTE, 1, LVar3, LVar1, LVar2, 0) - EVT_WAIT(10) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Amazy_Anim01) - EVT_WAIT(10) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(15) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, DMG_STATUS_KEY(STATUS_FLAG_SLEEP, 3, 15), DMG_SING, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_WAIT(20) - EVT_CALL(YieldTurn) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorPos, ACTOR_SELF, -20, LVar1, LVar2) + Else + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(MoveBattleCamOver, 70) + Set(LFlag0, FALSE) + Label(0) + IfEq(LFlag0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Amazy_Anim0E) + Set(LFlag0, TRUE) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Amazy_Anim0F) + Set(LFlag0, FALSE) + EndIf + Wait(1) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + IfGt(LVar0, 0) + Goto(0) + EndIf + IfEq(LFlag0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Amazy_Anim0E) + Set(LFlag0, TRUE) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Amazy_Anim0F) + Set(LFlag0, FALSE) + EndIf + Wait(1) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(SetGoalPos, ACTOR_SELF, -35, 0, 10) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Amazy_Anim01) + Wait(10) + Thread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Amazy_Anim06) + Wait(40) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Amazy_Anim07) + EndThread + Wait(20) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_DAYZEE_SONG) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 25) + Add(LVar2, 2) + Loop(13) + Call(RandInt, 30, LVar3) + Sub(LVar3, 15) + Add(LVar3, LVar0) + PlayEffect(EFFECT_MUSIC_NOTE, 1, LVar3, LVar1, LVar2, 0) + Wait(10) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Amazy_Anim01) + Wait(10) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(15) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + ExecWait(N(EVS_ReturnHome)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, DMG_STATUS_KEY(STATUS_FLAG_SLEEP, 3, 15), DMG_SING, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Wait(20) + Call(YieldTurn) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Move_Flee) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(SetBattleCamOffsetZ, 30) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Amazy_Anim03) - EVT_WAIT(10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Amazy_Anim04) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(12.0)) - EVT_ADD(LVar0, 200) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_BATTLE_FLED, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamZoom, 300) + Call(SetBattleCamOffsetZ, 30) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(MoveBattleCamOver, 30) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Amazy_Anim03) + Wait(10) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(1.0)) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Amazy_Anim04) + Call(SetActorSpeed, ACTOR_SELF, Float(12.0)) + Add(LVar0, 200) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Call(SetBattleFlagBits, BS_FLAGS1_BATTLE_FLED, TRUE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Call(RemoveActor, ACTOR_SELF) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_Attack_Sing)) - EVT_RETURN - EVT_END_IF - EVT_CALL(RandInt, 1000, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_LT(850) - EVT_EXEC_WAIT(N(EVS_Move_Flee)) - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(N(EVS_Attack_Sing)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + ExecWait(N(EVS_Attack_Sing)) + Return + EndIf + Call(RandInt, 1000, LVar0) + Switch(LVar0) + CaseLt(850) + ExecWait(N(EVS_Move_Flee)) + CaseDefault + ExecWait(N(EVS_Attack_Sing)) + EndSwitch + Return + End }; diff --git a/src/battle/common/actor/anti_guy.inc.c b/src/battle/common/actor/anti_guy.inc.c index 62b49f8cc64..978630ec76e 100644 --- a/src/battle/common/actor/anti_guy.inc.c +++ b/src/battle/common/actor/anti_guy.inc.c @@ -113,401 +113,401 @@ s32 N(DefaultAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; #include "common/battle/SetAbsoluteStatusOffsets.inc.c" EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SLEEP) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -4, 14) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 13, 10, 13) - EVT_ELSE - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 24) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -10) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SLEEP) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -4, 14) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) + Call(N(SetAbsoluteStatusOffsets), -10, 13, 10, 13) + Else + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 24) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -10) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim01) - EVT_RETURN - EVT_END + Call(ResetAllActorSounds, ACTOR_SELF) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ShyGuy_Black_Anim03) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim01) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0D) - EVT_SET_CONST(LVar2, ANIM_ShyGuy_Black_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0D) - EVT_SET_CONST(LVar2, ANIM_ShyGuy_Black_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim03) - EVT_SET_CONST(LVar2, ANIM_ShyGuy_Black_Anim14) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ShyGuy_Black_Anim0C) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ShyGuy_Black_Anim0D) + SetConst(LVar2, ANIM_ShyGuy_Black_Anim0E) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ShyGuy_Black_Anim0D) + SetConst(LVar2, ANIM_ShyGuy_Black_Anim0E) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ShyGuy_Black_Anim0E) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ShyGuy_Black_Anim0C) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ShyGuy_Black_Anim0C) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ShyGuy_Black_Anim0C) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ShyGuy_Black_Anim0C) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ShyGuy_Black_Anim0C) + ExecWait(EVS_Enemy_Knockback) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ShyGuy_Black_Anim0C) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ShyGuy_Black_Anim0C) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ShyGuy_Black_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ShyGuy_Black_Anim0C) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ShyGuy_Black_Anim0C) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ShyGuy_Black_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ShyGuy_Black_Anim03) + SetConst(LVar2, ANIM_ShyGuy_Black_Anim14) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ShyGuy_Black_Anim0C) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ShyGuy_Black_Anim0C) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_Tackle) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim03) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_ACTOR_HOP, 0) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim04) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim05) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim01) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HOP) - EVT_END_THREAD - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim04) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim05) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 15) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim01) - EVT_WAIT(8) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim03) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_ACTOR_HOP, 0) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim04) + Call(SetGoalToTarget, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim05) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(ResetAllActorSounds, ACTOR_SELF) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ShyGuy_Black_Anim04) + ExecWait(EVS_Enemy_ReturnHome) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim01) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Thread + Wait(3) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HOP) + EndThread + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim04) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 10) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim05) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 15) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim01) + Wait(8) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + ExecWait(N(EVS_ReturnHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_Vault) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_TIMING_BAR_GO) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim09) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim03) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 80) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim04) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_SUB(LVar0, 40) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim09) - EVT_THREAD - EVT_WAIT(12) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim0A) - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 24, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim05) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 15) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim01) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim09) - EVT_THREAD - EVT_WAIT(9) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim0A) - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_VAULT, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 15) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0) - EVT_SET(LVar3, 0) - EVT_LOOP(20) - EVT_SUB(LVar3, 30) - EVT_IF_LT(LVar3, 0) - EVT_ADD(LVar3, 360) - EVT_END_IF - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS1_ATK_BLOCKED) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetLastDamage, ACTOR_PLAYER, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LRAW_CHEERING) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LRAW_CHEERING | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim09) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim07) - EVT_WAIT(15) - EVT_GOTO(2) - EVT_LABEL(1) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_COLLAPSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim10) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_DISAPPOINTED) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 50) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim11) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim13) - EVT_END_IF - EVT_WAIT(25) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_LABEL(2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Black_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim01) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_TIMING_BAR_GO) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim09) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim03) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 80) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim04) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Sub(LVar0, 40) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim09) + Thread + Wait(12) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim0A) + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 24, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim05) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 15) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ShyGuy_Black_Anim04) + ExecWait(EVS_Enemy_ReturnHome) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim01) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim09) + Thread + Wait(9) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim0A) + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_VAULT, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 15) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0) + Set(LVar3, 0) + Loop(20) + Sub(LVar3, 30) + IfLt(LVar3, 0) + Add(LVar3, 360) + EndIf + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar3) + Wait(1) + EndLoop + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + EndThread + Call(GetBattleFlags, LVar0) + IfFlag(LVar0, BS_FLAGS1_ATK_BLOCKED) + Goto(1) + EndIf + Call(GetLastDamage, ACTOR_PLAYER, LVar0) + IfEq(LVar0, 0) + Goto(1) + EndIf + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LRAW_CHEERING) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LRAW_CHEERING | SOUND_ID_TRIGGER_CHANGE_SOUND) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim09) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim07) + Wait(15) + Goto(2) + Label(1) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_COLLAPSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim10) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_DISAPPOINTED) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(RandInt, 100, LVar0) + IfLt(LVar0, 50) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim11) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim13) + EndIf + Wait(25) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 180) + Label(2) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ShyGuy_Black_Anim04) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_ShyGuy_Black_Anim01) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(RandInt, 1, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_Attack_Tackle)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_Vault)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(RandInt, 1, LVar0) + IfEq(LVar0, 0) + ExecWait(N(EVS_Attack_Tackle)) + Else + ExecWait(N(EVS_Attack_Vault)) + EndIf + Return + End }; diff --git a/src/battle/common/actor/bandit.inc.c b/src/battle/common/actor/bandit.inc.c index aaf546e47f6..0e1141c097c 100644 --- a/src/battle/common/actor/bandit.inc.c +++ b/src/battle/common/actor/bandit.inc.c @@ -185,522 +185,522 @@ Formation N(CoinFormation) = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasCoin, 0) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_HasCoin, 0) + Return + End }; EvtScript N(EVS_Dummy) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_Init_Coin) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_Dummy))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Dummy))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_Dummy))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_Dummy))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Dummy))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_Dummy))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_DropCoin) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HasCoin, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(FALSE) + Call(GetActorVar, ACTOR_SELF, AVAR_HasCoin, LVar0) + Switch(LVar0) + CaseEq(FALSE) // do nothing - EVT_CASE_EQ(TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasCoin, FALSE) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_COIN, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, FALSE) - EVT_CALL(SummonEnemy, EVT_PTR(N(CoinFormation)), FALSE) - EVT_SET(LVarA, LVar0) - EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_COIN, LVar1, LVar2, LVar3) - EVT_CALL(SetActorPos, LVarA, LVar1, LVar2, LVar3) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_COIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumCoins, LVar0) - EVT_CALL(SetActorVar, LVarA, AVAR_Coin_NumCoins, LVar0) - EVT_CALL(SetActorJumpGravity, LVarA, EVT_FLOAT(1.0)) - EVT_CALL(RandInt, 360, LVar0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_ADD(LVar2, 30) - EVT_CALL(SetActorPos, LVarA, LVar1, LVar2, LVar3) - EVT_CALL(SetActorSounds, LVarA, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(AddVectorPolar, LVar1, LVar3, EVT_FLOAT(40.0), LVar0) - EVT_CALL(SetGoalPos, LVarA, LVar1, 0, LVar3) - EVT_CALL(JumpToGoal, LVarA, 20, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, LVarA, SOUND_COIN_BOUNCE) - EVT_CALL(AddVectorPolar, LVar1, LVar3, EVT_FLOAT(20.0), LVar0) - EVT_CALL(SetGoalPos, LVarA, LVar1, 0, LVar3) - EVT_CALL(JumpToGoal, LVarA, 10, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, LVarA, SOUND_COIN_BOUNCE) - EVT_CALL(AddVectorPolar, LVar1, LVar3, EVT_FLOAT(10.0), LVar0) - EVT_CALL(SetGoalPos, LVarA, LVar1, 0, LVar3) - EVT_CALL(JumpToGoal, LVarA, 5, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, LVarA, SOUND_COIN_BOUNCE) - EVT_LOOP(0) - EVT_CALL(GetBattleFlags, LVar1) - EVT_IF_FLAG(LVar1, BS_FLAGS1_PARTNER_ACTING) - EVT_BREAK_LOOP - EVT_END_IF - EVT_IF_NOT_FLAG(LVar1, BS_FLAGS1_EXECUTING_MOVE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(15) - EVT_CALL(SetActorJumpGravity, LVarA, EVT_FLOAT(1.0)) - EVT_CALL(SetActorSpeed, LVarA, EVT_FLOAT(6.0)) - EVT_SET(LVar0, -70) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 10) - EVT_LABEL(5) - EVT_CALL(GetActorPos, LVarA, LVar3, LVar4, LVar5) - EVT_IF_EQ(LVar3, LVar0) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_LT(LVar3, LVar0) - EVT_SET(LVar4, LVar0) - EVT_SUB(LVar4, LVar3) - EVT_IF_LT(LVar4, 30) - EVT_CALL(SetGoalPos, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, LVarA, 5, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, LVarA, SOUND_COIN_BOUNCE) - EVT_ELSE - EVT_SET(LVar4, LVar3) - EVT_ADD(LVar3, 30) - EVT_CALL(SetGoalPos, LVarA, LVar3, LVar1, LVar2) - EVT_CALL(JumpToGoal, LVarA, 0, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, LVarA, SOUND_COIN_BOUNCE) - EVT_END_IF - EVT_ELSE - EVT_SET(LVar4, LVar3) - EVT_SUB(LVar4, LVar0) - EVT_IF_LT(LVar4, 30) - EVT_CALL(SetGoalPos, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, LVarA, 5, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, LVarA, SOUND_COIN_BOUNCE) - EVT_ELSE - EVT_SUB(LVar3, 30) - EVT_CALL(SetGoalPos, LVarA, LVar3, LVar1, LVar2) - EVT_CALL(JumpToGoal, LVarA, 0, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, LVarA, SOUND_COIN_BOUNCE) - EVT_END_IF - EVT_END_IF - EVT_GOTO(5) - EVT_LABEL(10) - EVT_CALL(EnableActorBlur, LVarA, ACTOR_BLUR_ENABLE) - EVT_CALL(SetTargetActor, LVarA, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, LVarA) - EVT_CALL(JumpToGoal, LVarA, 15, FALSE, FALSE, FALSE) - EVT_CALL(GetGoalPos, LVarA, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMALL_GOLD_SPARKLE, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 0, 0) - EVT_CALL(PlaySoundAtActor, LVarA, SOUND_COIN_PICKUP) - EVT_CALL(GetActorVar, LVarA, AVAR_Coin_NumCoins, LVar0) - EVT_CALL(AddCoin, LVar0) - EVT_CALL(RemoveActor, LVarA) - EVT_END_SWITCH - EVT_RETURN - EVT_END + CaseEq(TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_HasCoin, FALSE) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Call(SetPartFlagBits, ACTOR_SELF, PRT_COIN, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, FALSE) + Call(SummonEnemy, Ref(N(CoinFormation)), FALSE) + Set(LVarA, LVar0) + Call(GetPartOffset, ACTOR_SELF, PRT_COIN, LVar1, LVar2, LVar3) + Call(SetActorPos, LVarA, LVar1, LVar2, LVar3) + Call(SetPartFlagBits, ACTOR_SELF, PRT_COIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(GetActorVar, ACTOR_SELF, AVAR_NumCoins, LVar0) + Call(SetActorVar, LVarA, AVAR_Coin_NumCoins, LVar0) + Call(SetActorJumpGravity, LVarA, Float(1.0)) + Call(RandInt, 360, LVar0) + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Add(LVar2, 30) + Call(SetActorPos, LVarA, LVar1, LVar2, LVar3) + Call(SetActorSounds, LVarA, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(AddVectorPolar, LVar1, LVar3, Float(40.0), LVar0) + Call(SetGoalPos, LVarA, LVar1, 0, LVar3) + Call(JumpToGoal, LVarA, 20, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, LVarA, SOUND_COIN_BOUNCE) + Call(AddVectorPolar, LVar1, LVar3, Float(20.0), LVar0) + Call(SetGoalPos, LVarA, LVar1, 0, LVar3) + Call(JumpToGoal, LVarA, 10, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, LVarA, SOUND_COIN_BOUNCE) + Call(AddVectorPolar, LVar1, LVar3, Float(10.0), LVar0) + Call(SetGoalPos, LVarA, LVar1, 0, LVar3) + Call(JumpToGoal, LVarA, 5, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, LVarA, SOUND_COIN_BOUNCE) + Loop(0) + Call(GetBattleFlags, LVar1) + IfFlag(LVar1, BS_FLAGS1_PARTNER_ACTING) + BreakLoop + EndIf + IfNotFlag(LVar1, BS_FLAGS1_EXECUTING_MOVE) + BreakLoop + EndIf + Wait(1) + EndLoop + Wait(15) + Call(SetActorJumpGravity, LVarA, Float(1.0)) + Call(SetActorSpeed, LVarA, Float(6.0)) + Set(LVar0, -70) + Set(LVar1, 0) + Set(LVar2, 10) + Label(5) + Call(GetActorPos, LVarA, LVar3, LVar4, LVar5) + IfEq(LVar3, LVar0) + Goto(10) + EndIf + IfLt(LVar3, LVar0) + Set(LVar4, LVar0) + Sub(LVar4, LVar3) + IfLt(LVar4, 30) + Call(SetGoalPos, LVarA, LVar0, LVar1, LVar2) + Call(JumpToGoal, LVarA, 5, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, LVarA, SOUND_COIN_BOUNCE) + Else + Set(LVar4, LVar3) + Add(LVar3, 30) + Call(SetGoalPos, LVarA, LVar3, LVar1, LVar2) + Call(JumpToGoal, LVarA, 0, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, LVarA, SOUND_COIN_BOUNCE) + EndIf + Else + Set(LVar4, LVar3) + Sub(LVar4, LVar0) + IfLt(LVar4, 30) + Call(SetGoalPos, LVarA, LVar0, LVar1, LVar2) + Call(JumpToGoal, LVarA, 5, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, LVarA, SOUND_COIN_BOUNCE) + Else + Sub(LVar3, 30) + Call(SetGoalPos, LVarA, LVar3, LVar1, LVar2) + Call(JumpToGoal, LVarA, 0, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, LVarA, SOUND_COIN_BOUNCE) + EndIf + EndIf + Goto(5) + Label(10) + Call(EnableActorBlur, LVarA, ACTOR_BLUR_ENABLE) + Call(SetTargetActor, LVarA, ACTOR_PLAYER) + Call(SetGoalToTarget, LVarA) + Call(JumpToGoal, LVarA, 15, FALSE, FALSE, FALSE) + Call(GetGoalPos, LVarA, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMALL_GOLD_SPARKLE, 0, LVar0, LVar1, LVar2, Float(1.0), 0, 0) + Call(PlaySoundAtActor, LVarA, SOUND_COIN_PICKUP) + Call(GetActorVar, LVarA, AVAR_Coin_NumCoins, LVar0) + Call(AddCoin, LVar0) + Call(RemoveActor, LVarA) + EndSwitch + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_USE_ARRAY(EVT_PTR(N(DropCoinScript))) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_EXEC_GET_TID(N(EVS_DropCoin), ArrayVar(0)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bandit_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_LOOP(0) - EVT_IS_THREAD_RUNNING(ArrayVar(0), LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CASE_OR_EQ(EVENT_SPIN_SMASH_LAUNCH_HIT) - EVT_EXEC_GET_TID(N(EVS_DropCoin), ArrayVar(0)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bandit_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_LOOP(0) - EVT_IS_THREAD_RUNNING(ArrayVar(0), LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_EXEC_GET_TID(N(EVS_DropCoin), ArrayVar(0)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bandit_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_Bandit_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_LOOP(0) - EVT_IS_THREAD_RUNNING(ArrayVar(0), LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_EXEC_GET_TID(N(EVS_DropCoin), ArrayVar(0)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bandit_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_Bandit_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bandit_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_LOOP(0) - EVT_IS_THREAD_RUNNING(ArrayVar(0), LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_EXEC_GET_TID(N(EVS_DropCoin), ArrayVar(0)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bandit_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_LOOP(0) - EVT_IS_THREAD_RUNNING(ArrayVar(0), LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_EXEC_GET_TID(N(EVS_DropCoin), ArrayVar(0)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bandit_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bandit_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_LOOP(0) - EVT_IS_THREAD_RUNNING(ArrayVar(0), LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bandit_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bandit_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bandit_Run) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bandit_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bandit_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HasCoin, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SET_CONST(LVar1, ANIM_Bandit_Idle) - EVT_CASE_EQ(1) - EVT_SET_CONST(LVar1, ANIM_Bandit_IdleHolding) - EVT_END_SWITCH - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_DEATH) - EVT_CASE_OR_EQ(EVENT_SPIN_SMASH_LAUNCH_DEATH) - EVT_EXEC_GET_TID(N(EVS_DropCoin), ArrayVar(0)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bandit_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bandit_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_LOOP(0) - EVT_IS_THREAD_RUNNING(ArrayVar(0), LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bandit_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_EXEC_GET_TID(N(EVS_DropCoin), ArrayVar(0)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bandit_Run) - EVT_SET_CONST(LVar2, ANIM_Bandit_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_LOOP(0) - EVT_IS_THREAD_RUNNING(ArrayVar(0), LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_EXEC_GET_TID(N(EVS_DropCoin), ArrayVar(0)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bandit_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_LOOP(0) - EVT_IS_THREAD_RUNNING(ArrayVar(0), LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bandit_Hurt) - EVT_SET_CONST(LVar2, STATUS_FLAG_DIZZY) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_Idle) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + UseArray(Ref(N(DropCoinScript))) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + ExecGetTID(N(EVS_DropCoin), ArrayVar(0)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bandit_Hurt) + ExecWait(EVS_Enemy_Hit) + Loop(0) + IsThreadRunning(ArrayVar(0), LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + CaseOrEq(EVENT_HIT) + CaseOrEq(EVENT_SPIN_SMASH_LAUNCH_HIT) + ExecGetTID(N(EVS_DropCoin), ArrayVar(0)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bandit_Hurt) + ExecWait(EVS_Enemy_Hit) + Loop(0) + IsThreadRunning(ArrayVar(0), LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + ExecGetTID(N(EVS_DropCoin), ArrayVar(0)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bandit_BurnHurt) + SetConst(LVar2, ANIM_Bandit_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + Loop(0) + IsThreadRunning(ArrayVar(0), LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + CaseEq(EVENT_BURN_DEATH) + ExecGetTID(N(EVS_DropCoin), ArrayVar(0)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bandit_BurnHurt) + SetConst(LVar2, ANIM_Bandit_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bandit_BurnStill) + ExecWait(EVS_Enemy_Death) + Loop(0) + IsThreadRunning(ArrayVar(0), LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + ExecGetTID(N(EVS_DropCoin), ArrayVar(0)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bandit_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + Loop(0) + IsThreadRunning(ArrayVar(0), LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + CaseEq(EVENT_SPIN_SMASH_DEATH) + ExecGetTID(N(EVS_DropCoin), ArrayVar(0)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bandit_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bandit_Hurt) + ExecWait(EVS_Enemy_Death) + Loop(0) + IsThreadRunning(ArrayVar(0), LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bandit_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bandit_Hurt) + ExecWait(EVS_Enemy_Knockback) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bandit_Run) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bandit_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bandit_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + Call(GetActorVar, ACTOR_SELF, AVAR_HasCoin, LVar0) + Switch(LVar0) + CaseEq(0) + SetConst(LVar1, ANIM_Bandit_Idle) + CaseEq(1) + SetConst(LVar1, ANIM_Bandit_IdleHolding) + EndSwitch + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseOrEq(EVENT_DEATH) + CaseOrEq(EVENT_SPIN_SMASH_LAUNCH_DEATH) + ExecGetTID(N(EVS_DropCoin), ArrayVar(0)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bandit_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bandit_Hurt) + ExecWait(EVS_Enemy_Death) + Loop(0) + IsThreadRunning(ArrayVar(0), LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Return + EndCaseGroup + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bandit_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + ExecGetTID(N(EVS_DropCoin), ArrayVar(0)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bandit_Run) + SetConst(LVar2, ANIM_Bandit_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Loop(0) + IsThreadRunning(ArrayVar(0), LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + ExecGetTID(N(EVS_DropCoin), ArrayVar(0)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bandit_Hurt) + ExecWait(EVS_Enemy_AirLift) + Loop(0) + IsThreadRunning(ArrayVar(0), LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bandit_Hurt) + SetConst(LVar2, STATUS_FLAG_DIZZY) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_Idle) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) // if carrying a coin, run away - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HasCoin, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_RunHolding) - EVT_WAIT(30) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, 300, 0, 0) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_BATTLE_FLED, TRUE) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_Run) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_Idle) - EVT_WAIT(6) - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_Walk) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 35, 0, 0) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BANDIT_STEAL) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_Tackle) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_WAIT(5) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_Idle) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_Tackle) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) + Call(GetActorVar, ACTOR_SELF, AVAR_HasCoin, LVar0) + IfEq(LVar0, 1) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_RunHolding) + Wait(30) + Call(SetActorSpeed, ACTOR_SELF, Float(10.0)) + Call(SetGoalPos, ACTOR_SELF, 300, 0, 0) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetBattleFlagBits, BS_FLAGS1_BATTLE_FLED, TRUE) + Call(HideHealthBar, ACTOR_SELF) + Call(RemoveActor, ACTOR_SELF) + Return + EndIf + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Set(LVar1, 0) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_Run) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_Idle) + Wait(6) + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_Walk) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 35, 0, 0) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BANDIT_STEAL) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_Tackle) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Wait(5) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_Idle) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_Tackle) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(ResetAllActorSounds, ACTOR_SELF) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) // dont steal coins if no damage, blocked - EVT_CALL(GetLastDamage, ACTOR_PLAYER, LVar0) - EVT_IF_LE(LVar0, 0) - EVT_SET(LVar0, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS1_ATK_BLOCKED) - EVT_SET(LVar0, 1) - EVT_GOTO(10) - EVT_END_IF + Call(GetLastDamage, ACTOR_PLAYER, LVar0) + IfLe(LVar0, 0) + Set(LVar0, 1) + Goto(10) + EndIf + Call(GetBattleFlags, LVar0) + IfFlag(LVar0, BS_FLAGS1_ATK_BLOCKED) + Set(LVar0, 1) + Goto(10) + EndIf // cant steal coins if shrunk - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_SET(LVar0, 0) - EVT_GOTO(10) - EVT_END_IF + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Set(LVar0, 0) + Goto(10) + EndIf // cant steal coins if player is stone - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_STONE) - EVT_SET(LVar0, 0) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(AddCoin, 0) + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfFlag(LVar0, STATUS_FLAG_STONE) + Set(LVar0, 0) + Goto(10) + EndIf + Call(AddCoin, 0) // choose outcome based on stolen coin count - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SET(LVar0, 1) - EVT_CASE_LT(10) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NumCoins, LVar0) - EVT_SET(LVar0, 2) - EVT_CASE_GE(10) + Switch(LVar0) + CaseEq(0) + Set(LVar0, 1) + CaseLt(10) + Call(SetActorVar, ACTOR_SELF, AVAR_NumCoins, LVar0) + Set(LVar0, 2) + CaseGe(10) // cap num stolen to 10 - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NumCoins, 10) - EVT_SET(LVar0, 2) - EVT_END_SWITCH - EVT_LABEL(10) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) + Call(SetActorVar, ACTOR_SELF, AVAR_NumCoins, 10) + Set(LVar0, 2) + EndSwitch + Label(10) + Switch(LVar0) + CaseEq(0) // couldn't steal (from shrunk or player stone) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_Idle) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_Run) - EVT_CASE_EQ(1) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_Idle) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_Run) + CaseEq(1) // failed to steal (player blocked or damage negated) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_LookUp) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_DISAPPOINTED) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_Sleep) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_Run) - EVT_CASE_DEFAULT + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_LookUp) + Wait(20) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_DISAPPOINTED) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_Sleep) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_Run) + CaseDefault // stole coins - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_ADD(LVarA, 30) - EVT_SET(LVarB, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumCoins, LVar0) - EVT_MUL(LVar0, -1) - EVT_CALL(AddCoin, LVar0) - EVT_THREAD - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_COIN, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_COIN, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_COIN, LVar0, LVar1, LVar2) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_COIN, EVT_FLOAT(1.0)) - EVT_ADD(LVarB, 30) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_COIN, LVarA, LVarB, LVarC, 22, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_COIN, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, FALSE) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NumCoins, LVar0) - EVT_LOOP(LVar0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_COIN_BOUNCE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(HoldingAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_LookUp) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasCoin, 1) - EVT_WAIT(7) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_GotCoin) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_RunHolding) - EVT_END_SWITCH - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Add(LVarA, 30) + Set(LVarB, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_NumCoins, LVar0) + Mul(LVar0, -1) + Call(AddCoin, LVar0) + Thread + Call(SetPartFlagBits, ACTOR_SELF, PRT_COIN, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_COIN, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_COIN, LVar0, LVar1, LVar2) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_COIN, Float(1.0)) + Add(LVarB, 30) + Call(JumpPartTo, ACTOR_SELF, PRT_COIN, LVarA, LVarB, LVarC, 22, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_COIN, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, FALSE) + EndThread + Thread + Call(GetActorVar, ACTOR_SELF, AVAR_NumCoins, LVar0) + Loop(LVar0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_COIN_BOUNCE) + Wait(1) + EndLoop + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(HoldingAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_LookUp) + Call(SetActorVar, ACTOR_SELF, AVAR_HasCoin, 1) + Wait(7) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_GotCoin) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bandit_RunHolding) + EndSwitch + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/bill_blaster.inc.c b/src/battle/common/actor/bill_blaster.inc.c index 3df90a0df8c..d64455afb3c 100644 --- a/src/battle/common/actor/bill_blaster.inc.c +++ b/src/battle/common/actor/bill_blaster.inc.c @@ -116,95 +116,95 @@ s32 N(DefaultAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasBullet, FALSE) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_HasBullet, FALSE) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BillBlaster_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BillBlaster_Hurt) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BillBlaster_Hurt) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BillBlaster_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BillBlaster_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BillBlaster_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BillBlaster_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BillBlaster_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BillBlaster_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BillBlaster_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BillBlaster_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BillBlaster_Hurt) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BillBlaster_Hurt) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BillBlaster_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BillBlaster_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BillBlaster_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BillBlaster_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BillBlaster_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BillBlaster_Hurt) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BillBlaster_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HasBullet, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_Move_FireBullet)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_Move_CheckForBullet)) - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetActorVar, ACTOR_SELF, AVAR_HasBullet, LVar0) + Switch(LVar0) + CaseEq(0) + ExecWait(N(EVS_Move_FireBullet)) + CaseEq(1) + ExecWait(N(EVS_Move_CheckForBullet)) + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; API_CALLABLE(N(SetBulletInitVars)) { @@ -215,36 +215,36 @@ API_CALLABLE(N(SetBulletInitVars)) { } EvtScript N(EVS_Move_FireBullet) = { - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BillBlaster_Fire) - EVT_WAIT(13) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BULLET_BILL_FIRE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 33) - EVT_ADD(LVar1, 19) - EVT_ADD(LVar2, 3) - EVT_PLAY_EFFECT(EFFECT_00, LVar0, LVar1, LVar2, 2, 5, 0, 2, 0) - EVT_PLAY_EFFECT(EFFECT_00, LVar0, LVar1, LVar2, 2, 5, 2, 2, 0) - EVT_WAIT(2) - EVT_CALL(N(SetBulletInitVars)) - EVT_CALL(SummonEnemy, EVT_PTR(N(BulletFormation)), FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_BulletID, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasBullet, TRUE) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BillBlaster_Fire) + Wait(13) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.0)) + EndThread + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BULLET_BILL_FIRE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 33) + Add(LVar1, 19) + Add(LVar2, 3) + PlayEffect(EFFECT_00, LVar0, LVar1, LVar2, 2, 5, 0, 2, 0) + PlayEffect(EFFECT_00, LVar0, LVar1, LVar2, 2, 5, 2, 2, 0) + Wait(2) + Call(N(SetBulletInitVars)) + Call(SummonEnemy, Ref(N(BulletFormation)), FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_BulletID, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_HasBullet, TRUE) + Return + End }; EvtScript N(EVS_Move_CheckForBullet) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_BulletID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasBullet, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_BulletID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_HasBullet, FALSE) + EndIf + Return + End }; Vec3i N(SummonPos) = { NPC_DISPOSE_LOCATION }; diff --git a/src/battle/common/actor/bob_omb.inc.c b/src/battle/common/actor/bob_omb.inc.c index 9940310ea22..a16624f1db2 100644 --- a/src/battle/common/actor/bob_omb.inc.c +++ b/src/battle/common/actor/bob_omb.inc.c @@ -144,559 +144,559 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Ignited, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitDuringCombo, FALSE) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_Ignited, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_HitDuringCombo, FALSE) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_Ignite) = { - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_RETURN - EVT_END_IF - EVT_LABEL(0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Ignited, TRUE) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(IgnitedAnims))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent_Ignited))) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_EXPLODE_ON_CONTACT, TRUE) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(IgnitedStatusTable))) - EVT_CALL(PlayLoopingSoundAtActor, ACTOR_SELF, 0, SOUND_LOOP_BOBOMB_FUSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_WalkLit) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(EnableActorPaletteEffects, ACTOR_SELF, PRT_MAIN, TRUE) - EVT_CALL(SetActorPaletteSwapParams, ACTOR_SELF, PRT_MAIN, SPR_PAL_Bobomb, SPR_PAL_Bobomb_Burst, 0, 10, 0, 10, 0, 0) - EVT_CALL(SetActorPaletteEffect, ACTOR_SELF, PRT_MAIN, ACTOR_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) - EVT_WAIT(3) - EVT_CALL(StopLoopingSoundAtActor, ACTOR_SELF, 0) - EVT_RETURN - EVT_END + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Return + EndIf + Label(0) + Call(SetActorVar, ACTOR_SELF, AVAR_Ignited, TRUE) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(IgnitedAnims))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent_Ignited))) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_EXPLODE_ON_CONTACT, TRUE) + Call(SetStatusTable, ACTOR_SELF, Ref(N(IgnitedStatusTable))) + Call(PlayLoopingSoundAtActor, ACTOR_SELF, 0, SOUND_LOOP_BOBOMB_FUSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_WalkLit) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(EnableActorPaletteEffects, ACTOR_SELF, PRT_MAIN, TRUE) + Call(SetActorPaletteSwapParams, ACTOR_SELF, PRT_MAIN, SPR_PAL_Bobomb, SPR_PAL_Bobomb_Burst, 0, 10, 0, 10, 0, 0) + Call(SetActorPaletteEffect, ACTOR_SELF, PRT_MAIN, ACTOR_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) + Wait(3) + Call(StopLoopingSoundAtActor, ACTOR_SELF, 0) + Return + End }; EvtScript N(EVS_Defuse) = { - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Ignited, FALSE) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_EXPLODE_ON_CONTACT, FALSE) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(StatusTable))) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 3, LVar0, LVar1, LVar2, 0, 0) - EVT_CALL(StopLoopingSoundAtActor, ACTOR_SELF, 0) - EVT_CALL(EnableActorPaletteEffects, ACTOR_SELF, PRT_MAIN, FALSE) - EVT_RETURN - EVT_END + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_Ignited, FALSE) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_EXPLODE_ON_CONTACT, FALSE) + Call(SetStatusTable, ACTOR_SELF, Ref(N(StatusTable))) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar2, 2) + PlayEffect(EFFECT_LANDING_DUST, 3, LVar0, LVar1, LVar2, 0, 0) + Call(StopLoopingSoundAtActor, ACTOR_SELF, 0) + Call(EnableActorPaletteEffects, ACTOR_SELF, PRT_MAIN, FALSE) + Return + End }; EvtScript N(EVS_Cleanup) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Ignited, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_CALL(StopLoopingSoundAtActor, ACTOR_SELF, 0) - EVT_CALL(EnableActorPaletteEffects, ACTOR_SELF, PRT_MAIN, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_Ignited, LVar0) + IfEq(LVar0, TRUE) + Call(StopLoopingSoundAtActor, ACTOR_SELF, 0) + Call(EnableActorPaletteEffects, ACTOR_SELF, PRT_MAIN, FALSE) + EndIf + Return + End }; EvtScript N(EVS_Explode) = { - EVT_EXEC_WAIT(N(EVS_Cleanup)) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_MAX) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.75)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(4.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_RING, 0, LVar0, LVar1, LVar2, 0) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_EXPLOSION, 0, LVar0, LVar1, LVar2, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOMB_BLAST) - EVT_RETURN - EVT_END + ExecWait(N(EVS_Cleanup)) + Call(StartRumble, BTL_RUMBLE_PLAYER_MAX) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.75)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(4.5)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + EndThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar2, 2) + PlayEffect(EFFECT_SMOKE_RING, 0, LVar0, LVar1, LVar2, 0) + Add(LVar1, 20) + Add(LVar2, 2) + PlayEffect(EFFECT_EXPLOSION, 0, LVar0, LVar1, LVar2, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOMB_BLAST) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitDuringCombo, TRUE) - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_HIT) - EVT_CALL(GetLastElement, LVarE) - EVT_IF_FLAG(LVarE, DAMAGE_TYPE_SHOCK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_Bobomb_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_BurnStill) - EVT_SET(LVar2, EXEC_DEATH_NO_SPINNING) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_Ignite)) - EVT_END_IF - EVT_END_IF - EVT_CASE_OR_EQ(EVENT_BURN_HIT) - EVT_CASE_OR_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_Bobomb_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_BurnStill) - EVT_SET(LVar2, EXEC_DEATH_NO_SPINNING) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_Ignite)) - EVT_END_IF - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_EXEC_WAIT(N(EVS_Cleanup)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_SHOCK_HIT) - EVT_CASE_OR_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_BurnHurt) - EVT_SET(LVar2, EXEC_DEATH_NO_SPINNING) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_ZERO_DAMAGE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HitDuringCombo, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_EXEC_WAIT(N(EVS_Ignite)) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_CALL(GetLastElement, LVarE) - EVT_IF_FLAG(LVarE, DAMAGE_TYPE_SHOCK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_Bobomb_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_BurnStill) - EVT_SET(LVar2, EXEC_DEATH_NO_SPINNING) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_Cleanup)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_END_IF - EVT_RETURN - EVT_CASE_EQ(EVENT_EXPLODE_TRIGGER) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_Bobomb_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_BurnStill) - EVT_SET(LVar2, EXEC_DEATH_NO_SPINNING) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_Run) - EVT_SET_CONST(LVar2, ANIM_Bobomb_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_Dizzy) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_Dizzy) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + Call(GetLastDamage, ACTOR_SELF, LVar0) + IfNe(LVar0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_HitDuringCombo, TRUE) + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_Hurt) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_HIT) + Call(GetLastElement, LVarE) + IfFlag(LVarE, DAMAGE_TYPE_SHOCK) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_BurnHurt) + SetConst(LVar2, ANIM_Bobomb_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_Explode)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_BurnStill) + Set(LVar2, EXEC_DEATH_NO_SPINNING) + ExecWait(EVS_Enemy_Death) + Return + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_Hurt) + ExecWait(EVS_Enemy_Hit) + Call(GetLastDamage, ACTOR_SELF, LVar0) + IfNe(LVar0, 0) + ExecWait(N(EVS_Ignite)) + EndIf + EndIf + CaseOrEq(EVENT_BURN_HIT) + CaseOrEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_BurnHurt) + SetConst(LVar2, ANIM_Bobomb_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_Explode)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_BurnStill) + Set(LVar2, EXEC_DEATH_NO_SPINNING) + ExecWait(EVS_Enemy_Death) + Return + EndCaseGroup + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + Call(GetLastDamage, ACTOR_SELF, LVar0) + IfNe(LVar0, 0) + ExecWait(N(EVS_Ignite)) + EndIf + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + ExecWait(N(EVS_Cleanup)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_SHOCK_HIT) + CaseOrEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_BurnHurt) + Set(LVar2, EXEC_DEATH_NO_SPINNING) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_ZERO_DAMAGE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + Call(GetActorVar, ACTOR_SELF, AVAR_HitDuringCombo, LVar0) + IfEq(LVar0, TRUE) + ExecWait(N(EVS_Ignite)) + EndIf + EndCaseGroup + CaseEq(EVENT_DEATH) + Call(GetLastElement, LVarE) + IfFlag(LVarE, DAMAGE_TYPE_SHOCK) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_BurnHurt) + SetConst(LVar2, ANIM_Bobomb_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_Explode)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_BurnStill) + Set(LVar2, EXEC_DEATH_NO_SPINNING) + ExecWait(EVS_Enemy_Death) + Return + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + ExecWait(N(EVS_Cleanup)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_Hurt) + ExecWait(EVS_Enemy_Death) + EndIf + Return + CaseEq(EVENT_EXPLODE_TRIGGER) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_BurnHurt) + SetConst(LVar2, ANIM_Bobomb_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_Explode)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_BurnStill) + Set(LVar2, EXEC_DEATH_NO_SPINNING) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_Run) + SetConst(LVar2, ANIM_Bobomb_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_Dizzy) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_Dizzy) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_HandleEvent_Ignited) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_CALL(GetLastElement, LVarE) - EVT_IF_FLAG(LVarE, DAMAGE_TYPE_WATER) - EVT_EXEC_WAIT(N(EVS_Defuse)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_HurtLit) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_IF - EVT_CASE_EQ(EVENT_HIT) - EVT_CALL(GetLastElement, LVarE) - EVT_SWITCH(LVarE) - EVT_CASE_FLAG(DAMAGE_TYPE_WATER) - EVT_EXEC_WAIT(N(EVS_Defuse)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_FLAG(DAMAGE_TYPE_SHOCK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_BurnHurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_BurnStill) - EVT_SET(LVar2, EXEC_DEATH_NO_SPINNING) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_HurtLit) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_BurnStill) - EVT_SET(LVar2, EXEC_DEATH_NO_SPINNING) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END_IF - EVT_END_SWITCH - EVT_CASE_OR_EQ(EVENT_BURN_HIT) - EVT_CASE_OR_EQ(EVENT_BURN_DEATH) - EVT_CASE_OR_EQ(EVENT_SPIN_SMASH_HIT) - EVT_CASE_OR_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_CASE_OR_EQ(EVENT_EXPLODE_TRIGGER) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_BurnStill) - EVT_SET(LVar2, EXEC_DEATH_NO_SPINNING) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_IdleLit) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_CALL(GetLastElement, LVarE) - EVT_IF_FLAG(LVarE, DAMAGE_TYPE_WATER) - EVT_EXEC_WAIT(N(EVS_Defuse)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_Hurt) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_BurnStill) - EVT_SET(LVar2, EXEC_DEATH_NO_SPINNING) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_SHOCK_HIT) - EVT_CASE_OR_EQ(EVENT_SHOCK_DEATH) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_BurnStill) - EVT_SET(LVar2, EXEC_DEATH_NO_SPINNING) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_IdleLit) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_EXEC_WAIT(N(EVS_Cleanup)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_Run) - EVT_SET_CONST(LVar2, ANIM_Bobomb_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_DizzyLit) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetDamageSource, LVar0) - EVT_IF_EQ(LVar0, DMG_SRC_HURRICANE) - EVT_EXEC_WAIT(N(EVS_Defuse)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_Dizzy) - EVT_ELSE - EVT_CHILD_THREAD - EVT_WAIT(100) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_END_CHILD_THREAD - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_DizzyLit) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_UP_AND_AWAY) - EVT_EXEC_WAIT(N(EVS_Defuse)) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + Call(GetLastElement, LVarE) + IfFlag(LVarE, DAMAGE_TYPE_WATER) + ExecWait(N(EVS_Defuse)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_Hurt) + ExecWait(EVS_Enemy_Hit) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_HurtLit) + ExecWait(EVS_Enemy_Hit) + EndIf + CaseEq(EVENT_HIT) + Call(GetLastElement, LVarE) + Switch(LVarE) + CaseFlag(DAMAGE_TYPE_WATER) + ExecWait(N(EVS_Defuse)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_Hurt) + ExecWait(EVS_Enemy_Hit) + CaseFlag(DAMAGE_TYPE_SHOCK) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_BurnHurt) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_Explode)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_BurnStill) + Set(LVar2, EXEC_DEATH_NO_SPINNING) + ExecWait(EVS_Enemy_Death) + Return + CaseDefault + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_HurtLit) + ExecWait(EVS_Enemy_Hit) + Call(GetLastDamage, ACTOR_SELF, LVar0) + IfGt(LVar0, 0) + ExecWait(N(EVS_Explode)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_BurnStill) + Set(LVar2, EXEC_DEATH_NO_SPINNING) + ExecWait(EVS_Enemy_Death) + Return + EndIf + EndSwitch + CaseOrEq(EVENT_BURN_HIT) + CaseOrEq(EVENT_BURN_DEATH) + CaseOrEq(EVENT_SPIN_SMASH_HIT) + CaseOrEq(EVENT_SPIN_SMASH_DEATH) + CaseOrEq(EVENT_EXPLODE_TRIGGER) + ExecWait(N(EVS_Explode)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_BurnStill) + Set(LVar2, EXEC_DEATH_NO_SPINNING) + ExecWait(EVS_Enemy_Death) + Return + EndCaseGroup + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_IdleLit) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + Call(GetLastElement, LVarE) + IfFlag(LVarE, DAMAGE_TYPE_WATER) + ExecWait(N(EVS_Defuse)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_Hurt) + Else + ExecWait(N(EVS_Explode)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_BurnStill) + Set(LVar2, EXEC_DEATH_NO_SPINNING) + EndIf + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_SHOCK_HIT) + CaseOrEq(EVENT_SHOCK_DEATH) + ExecWait(N(EVS_Explode)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_BurnStill) + Set(LVar2, EXEC_DEATH_NO_SPINNING) + ExecWait(EVS_Enemy_Death) + Return + EndCaseGroup + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_IdleLit) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + ExecWait(N(EVS_Cleanup)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_Run) + SetConst(LVar2, ANIM_Bobomb_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_DizzyLit) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + Call(GetDamageSource, LVar0) + IfEq(LVar0, DMG_SRC_HURRICANE) + ExecWait(N(EVS_Defuse)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_Dizzy) + Else + ChildThread + Wait(100) + ExecWait(N(EVS_Explode)) + EndChildThread + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_DizzyLit) + EndIf + ExecWait(EVS_Enemy_BlowAway) + Return + CaseEq(EVENT_UP_AND_AWAY) + ExecWait(N(EVS_Defuse)) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_Tackle) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_Run) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_Idle) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_Run) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.1)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_Dizzy) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 15) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(8) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(YieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_Idle) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_EQ(HIT_RESULT_HIT_STATIC) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.1)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_Buildup) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorSize, ACTOR_SELF, LVar3, LVar4) - EVT_PLAY_EFFECT(EFFECT_FLASHING_BOX_SHOCKWAVE, 0, LVar0, LVar1, LVar2, LVar4, LVar3, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HIT_SHOCK) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_BLAST, 0, 0, DMG_EXPLOSION, BS_FLAGS1_TRIGGER_EVENTS) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.1)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_Idle) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_WAIT(4) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_Idle) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_Run) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_Idle) + Call(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_Run) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.1)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_Dizzy) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Call(SetActorJumpGravity, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 15) + Call(SetActorJumpGravity, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Wait(8) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(5) + Call(YieldTurn) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_Idle) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Return + EndCaseGroup + CaseEq(HIT_RESULT_HIT_STATIC) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.1)) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_Buildup) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorSize, ACTOR_SELF, LVar3, LVar4) + PlayEffect(EFFECT_FLASHING_BOX_SHOCKWAVE, 0, LVar0, LVar1, LVar2, LVar4, LVar3, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HIT_SHOCK) + Wait(20) + ExecWait(N(EVS_Explode)) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_BLAST, 0, 0, DMG_EXPLOSION, BS_FLAGS1_TRIGGER_EVENTS) + Return + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.1)) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_Idle) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Wait(4) + Call(YieldTurn) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_Idle) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_Attack_Blast) = { - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(PlayLoopingSoundAtActor, ACTOR_SELF, 0, SOUND_LOOP_BOBOMB_FUSE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_RunLit) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 80, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, -1, 14, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 90) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_RunLit) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_BurnStill) - EVT_WAIT(10) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, -1) - EVT_SET(LVar2, EXEC_DEATH_NO_SPINNING) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_RunLit) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 10, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_Buildup) - EVT_WAIT(15) - EVT_SET(LVarA, 1) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_BurnStill) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_BLAST | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_EXPLOSION, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(15) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bobomb_BurnStill) - EVT_SET(LVar2, EXEC_DEATH_NO_SPINNING) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(PlayLoopingSoundAtActor, ACTOR_SELF, 0, SOUND_LOOP_BOBOMB_FUSE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_RunLit) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 80, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetActorRotationOffset, ACTOR_SELF, -1, 14, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 90) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_RunLit) + Call(SetActorJumpGravity, ACTOR_SELF, Float(3.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ExecWait(N(EVS_Explode)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_BurnStill) + Wait(10) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(10) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, -1) + Set(LVar2, EXEC_DEATH_NO_SPINNING) + ExecWait(EVS_Enemy_Death) + Return + EndCaseGroup + EndSwitch + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_RunLit) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 10, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_Buildup) + Wait(15) + Set(LVarA, 1) + ExecWait(N(EVS_Explode)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bobomb_BurnStill) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_BLAST | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_EXPLOSION, BS_FLAGS1_TRIGGER_EVENTS) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(15) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bobomb_BurnStill) + Set(LVar2, EXEC_DEATH_NO_SPINNING) + ExecWait(EVS_Enemy_Death) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Ignited, LVar0) - EVT_IF_FALSE(LVar0) - EVT_EXEC_WAIT(N(EVS_Attack_Tackle)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_Blast)) - EVT_RETURN - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetActorVar, ACTOR_SELF, AVAR_Ignited, LVar0) + IfFalse(LVar0) + ExecWait(N(EVS_Attack_Tackle)) + Else + ExecWait(N(EVS_Attack_Blast)) + Return + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/bony_beetle.inc.c b/src/battle/common/actor/bony_beetle.inc.c index edf63e724f8..03d75cca0b2 100644 --- a/src/battle/common/actor/bony_beetle.inc.c +++ b/src/battle/common/actor/bony_beetle.inc.c @@ -165,1001 +165,1001 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IN_OnCeiling, LVar0) - EVT_CALL(GetInstigatorValue, ACTOR_SELF, LVar1) - EVT_IF_EQ(LVar0, 1) - EVT_IF_EQ(LVar1, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SpikyUpright) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(SpikyAnims))) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim05) - EVT_ELSE - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SmoothUpright) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim04) - EVT_END_IF - EVT_ELSE - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 500) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SmoothUpright) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim04) - EVT_ELSE - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SpikyUpright) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(SpikyAnims))) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim05) - EVT_END_IF - EVT_END_IF -EVT_END_IF -EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -8) -EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -3, 21) -EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) -EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) -EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) -EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) -EVT_CALL(HPBarToHome, ACTOR_SELF) -EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldTrySwitching, FALSE) -EVT_RETURN -EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_IN_OnCeiling, LVar0) + Call(GetInstigatorValue, ACTOR_SELF, LVar1) + IfEq(LVar0, 1) + IfEq(LVar1, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SpikyUpright) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(SpikyAnims))) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim05) + Else + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SmoothUpright) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim04) + EndIf + Else + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 500) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SmoothUpright) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim04) + Else + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SpikyUpright) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(SpikyAnims))) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim05) + EndIf + EndIf +EndIf +Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -8) +Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -3, 21) +Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) +Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) +Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) +Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) +Call(HPBarToHome, ACTOR_SELF) +Call(SetActorVar, ACTOR_SELF, AVAR_ShouldTrySwitching, FALSE) +Return +End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_SmoothUpright) - EVT_EXEC_WAIT(N(EVS_HandleEvent_SmoothUpright)) - EVT_CASE_EQ(AVAL_State_SpikyUpright) - EVT_EXEC_WAIT(N(EVS_HandleEvent_SpikyUpright)) - EVT_CASE_EQ(AVAL_State_SmoothToppled) - EVT_EXEC_WAIT(N(EVS_HandleEvent_SmoothToppled)) - EVT_CASE_EQ(AVAL_State_SpikyToppled) - EVT_EXEC_WAIT(N(EVS_HandleEvent_SpikyToppled)) - EVT_END_SWITCH - EVT_CALL(ActorExists, ACTOR_SELF, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ShouldTrySwitching, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_EXEC_WAIT(N(EVS_TrySwitchingSpikyState)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldTrySwitching, FALSE) - EVT_END_IF - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_SmoothUpright) + ExecWait(N(EVS_HandleEvent_SmoothUpright)) + CaseEq(AVAL_State_SpikyUpright) + ExecWait(N(EVS_HandleEvent_SpikyUpright)) + CaseEq(AVAL_State_SmoothToppled) + ExecWait(N(EVS_HandleEvent_SmoothToppled)) + CaseEq(AVAL_State_SpikyToppled) + ExecWait(N(EVS_HandleEvent_SpikyToppled)) + EndSwitch + Call(ActorExists, ACTOR_SELF, LVar0) + IfEq(LVar0, 1) + Call(GetActorVar, ACTOR_SELF, AVAR_ShouldTrySwitching, LVar0) + IfEq(LVar0, TRUE) + ExecWait(N(EVS_TrySwitchingSpikyState)) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldTrySwitching, FALSE) + EndIf + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TrySwitchingSpikyState) = { - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar0) - EVT_IF_LE(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_RETURN - EVT_END_IF - EVT_LABEL(0) - EVT_CALL(GetBattleFlags, LVarA) - EVT_IF_FLAG(LVarA, BS_FLAGS1_EXECUTING_MOVE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_SmoothUpright) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BONY_BEETLE_EXTEND_SPIKES) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SpikyUpright) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim2E) - EVT_WAIT(25) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(SpikyAnims))) - EVT_CASE_EQ(AVAL_State_SpikyUpright) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BONY_BEETLE_RETRACT_SPIKES) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SmoothUpright) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim2F) - EVT_WAIT(25) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_CASE_EQ(AVAL_State_SmoothToppled) - EVT_CASE_EQ(AVAL_State_SpikyToppled) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetLastDamage, ACTOR_SELF, LVar0) + IfLe(LVar0, 0) + Return + EndIf + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Return + EndIf + Label(0) + Call(GetBattleFlags, LVarA) + IfFlag(LVarA, BS_FLAGS1_EXECUTING_MOVE) + Wait(1) + Goto(0) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_SmoothUpright) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BONY_BEETLE_EXTEND_SPIKES) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SpikyUpright) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim2E) + Wait(25) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(SpikyAnims))) + CaseEq(AVAL_State_SpikyUpright) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BONY_BEETLE_RETRACT_SPIKES) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SmoothUpright) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim2F) + Wait(25) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + CaseEq(AVAL_State_SmoothToppled) + CaseEq(AVAL_State_SpikyToppled) + EndSwitch + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_SmoothUpright) - EVT_EXEC_WAIT(N(EVS_Attack_ShellToss)) - EVT_CASE_EQ(AVAL_State_SpikyUpright) - EVT_EXEC_WAIT(N(EVS_Attack_SpikeBounce)) - EVT_CASE_EQ(AVAL_State_SmoothToppled) - EVT_EXEC_WAIT(N(EVS_TryGettingUp_Smooth)) - EVT_CASE_EQ(AVAL_State_SpikyToppled) - EVT_EXEC_WAIT(N(EVS_TryGettingUp_Spiky)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_SmoothUpright) + ExecWait(N(EVS_Attack_ShellToss)) + CaseEq(AVAL_State_SpikyUpright) + ExecWait(N(EVS_Attack_SpikeBounce)) + CaseEq(AVAL_State_SmoothToppled) + ExecWait(N(EVS_TryGettingUp_Smooth)) + CaseEq(AVAL_State_SpikyToppled) + ExecWait(N(EVS_TryGettingUp_Spiky)) + EndSwitch + Return + End }; s32 N(FlipPosOffsets)[] = { 7, 13, 17, 21, 23, 24, 23, 21, 17, 13, 7, 0, 4, 6, 7, 6, 4, 0, 2, 0 }; EvtScript N(EVS_HandleEvent_SmoothUpright) = { - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldTrySwitching, TRUE) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim1E) - EVT_SET_CONST(LVar2, ANIM_BonyBeetle_Anim1F) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldTrySwitching, TRUE) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim1E) - EVT_SET_CONST(LVar2, ANIM_BonyBeetle_Anim1F) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim1F) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldTrySwitching, TRUE) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_FLIP_TRIGGER) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SmoothToppled) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -8) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -3, 21) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 1) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledDefenseTable))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledAnims))) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, FALSE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim08) - EVT_USE_BUF(N(FlipPosOffsets)) - EVT_LOOP(20) - EVT_BUF_READ1(LVar0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(20) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim10) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_WAIT(20) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim12) - EVT_WAIT(10) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim0E) - EVT_SET_CONST(LVar2, ANIM_BonyBeetle_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim18) + ExecWait(EVS_Enemy_Hit) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldTrySwitching, TRUE) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim1E) + SetConst(LVar2, ANIM_BonyBeetle_Anim1F) + ExecWait(EVS_Enemy_BurnHit) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldTrySwitching, TRUE) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim1E) + SetConst(LVar2, ANIM_BonyBeetle_Anim1F) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim1F) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim18) + ExecWait(EVS_Enemy_SpinSmashHit) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldTrySwitching, TRUE) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim18) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim18) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_FLIP_TRIGGER) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SmoothToppled) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -8) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -3, 21) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 1) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledDefenseTable))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledAnims))) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, FALSE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim08) + UseBuf(N(FlipPosOffsets)) + Loop(20) + BufRead1(LVar0) + Call(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) + Wait(1) + EndLoop + Wait(20) + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim18) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim18) + ExecWait(EVS_Enemy_Knockback) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim0E) + ExecWait(EVS_Enemy_ReturnHome) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim10) + ExecWait(EVS_Enemy_NoDamageHit) + Wait(20) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim12) + Wait(10) + EndIf + EndCaseGroup + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim18) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim18) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim18) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim18) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim04) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim0E) + SetConst(LVar2, ANIM_BonyBeetle_Anim18) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim0E) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim18) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Return + End }; EvtScript N(EVS_Attack_ShellToss) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim16) - EVT_GOTO(100) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim10) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(10) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_SPIN) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim16) - EVT_WAIT(15) - EVT_LABEL(100) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_TOSS) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 40) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(16.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim12) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim0E) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim04) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(16.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_SHELL_TOSS, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim12) - EVT_WAIT(5) - EVT_CALL(YieldTurn) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim04) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim16) + Goto(100) + EndIf + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim10) + Wait(10) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(10) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(5) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + EndThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_SPIN) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim16) + Wait(15) + Label(100) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_TOSS) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 40) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(16.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim12) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim0E) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim04) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(16.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(ResetAllActorSounds, ACTOR_SELF) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_SHELL_TOSS, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim12) + Wait(5) + Call(YieldTurn) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim0E) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim04) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_HandleEvent_SpikyUpright) = { - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim19) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldTrySwitching, TRUE) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim20) - EVT_SET_CONST(LVar2, ANIM_BonyBeetle_Anim21) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldTrySwitching, TRUE) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim20) - EVT_SET_CONST(LVar2, ANIM_BonyBeetle_Anim21) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim21) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim19) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldTrySwitching, TRUE) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim19) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim19) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_FLIP_TRIGGER) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SpikyToppled) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -8) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -3, 21) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 1) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledDefenseTable))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledSpikyAnims))) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, FALSE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim09) - EVT_USE_BUF(N(FlipPosOffsets)) - EVT_LOOP(20) - EVT_BUF_READ1(LVar0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(20) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim19) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim19) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim0F) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim11) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_WAIT(20) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim13) - EVT_END_IF - EVT_WAIT(10) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIKE_TAUNT) - EVT_WAIT(10) - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, -3) - EVT_ADD(LVar1, 10) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_IF_FLAG(LVar3, STATUS_FLAG_DIZZY) - EVT_ADD(LVar0, 0) - EVT_ADD(LVar1, 26) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_ADD(LVar0, -8) - EVT_ADD(LVar1, 26) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) - EVT_WAIT(20) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim19) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim19) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim19) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim19) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim05) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim0F) - EVT_SET_CONST(LVar2, ANIM_BonyBeetle_Anim19) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim19) + ExecWait(EVS_Enemy_Hit) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldTrySwitching, TRUE) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim20) + SetConst(LVar2, ANIM_BonyBeetle_Anim21) + ExecWait(EVS_Enemy_BurnHit) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldTrySwitching, TRUE) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim20) + SetConst(LVar2, ANIM_BonyBeetle_Anim21) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim21) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim19) + ExecWait(EVS_Enemy_SpinSmashHit) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldTrySwitching, TRUE) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim19) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim19) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_FLIP_TRIGGER) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SpikyToppled) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -8) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -3, 21) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 1) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledDefenseTable))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledSpikyAnims))) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, FALSE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim09) + UseBuf(N(FlipPosOffsets)) + Loop(20) + BufRead1(LVar0) + Call(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) + Wait(1) + EndLoop + Wait(20) + CaseEq(EVENT_SHOCK_HIT) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim19) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim19) + ExecWait(EVS_Enemy_Knockback) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim0F) + ExecWait(EVS_Enemy_ReturnHome) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim11) + ExecWait(EVS_Enemy_NoDamageHit) + Wait(20) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim13) + EndIf + Wait(10) + EndCaseGroup + CaseEq(EVENT_SPIKE_TAUNT) + Wait(10) + Set(LFlag0, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar0, -3) + Add(LVar1, 10) + Set(LFlag0, TRUE) + EndIf + IfFlag(LVar3, STATUS_FLAG_DIZZY) + Add(LVar0, 0) + Add(LVar1, 26) + Set(LFlag0, TRUE) + EndIf + IfEq(LFlag0, FALSE) + Add(LVar0, -8) + Add(LVar1, 26) + EndIf + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) + Wait(20) + CaseEq(EVENT_SHOCK_DEATH) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim19) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim19) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim19) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim19) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim05) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim0F) + SetConst(LVar2, ANIM_BonyBeetle_Anim19) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseDefault + EndSwitch + Return + End }; EvtScript N(EVS_Attack_SpikeBounce) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim17) - EVT_WAIT(10) - EVT_GOTO(100) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim11) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(10) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 32, 6, 0, 10, 0) - EVT_WAIT(5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 32, 8, 0, 10, 0) - EVT_WAIT(5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 32, 10, 0, 10, 0) - EVT_WAIT(5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 32, 12, 0, 10, 0) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_SPIN) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim17) - EVT_WAIT(15) - EVT_LABEL(100) - EVT_THREAD - EVT_LOOP(20) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_TOSS) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, DMG_SPIKE_BOUNCE, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(24.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_01) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 18) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) - EVT_SET(LVar0, 180) - EVT_LOOP(15) - EVT_ADD(LVar0, 12) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 18) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_SUB(LVar0, 40) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) - EVT_SET(LVar0, 180) - EVT_LOOP(5) - EVT_ADD(LVar0, 18) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_WAIT(5) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim0F) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(24.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 18) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_SPIKE_BOUNCE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) - EVT_SET(LVar0, 180) - EVT_LOOP(15) - EVT_ADD(LVar0, 12) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 18) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_SUB(LVar0, 40) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) - EVT_SET(LVar0, 180) - EVT_LOOP(5) - EVT_ADD(LVar0, 18) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_WAIT(5) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim13) - EVT_WAIT(5) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim0F) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim17) + Wait(10) + Goto(100) + EndIf + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim11) + Wait(10) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(10) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 32, 6, 0, 10, 0) + Wait(5) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 32, 8, 0, 10, 0) + Wait(5) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 32, 10, 0, 10, 0) + Wait(5) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 32, 12, 0, 10, 0) + EndThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_SPIN) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim17) + Wait(15) + Label(100) + Thread + Loop(20) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, 0, 0, 0) + Wait(1) + EndLoop + EndThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_TOSS) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, DMG_SPIKE_BOUNCE, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(24.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_01) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 18) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) + Set(LVar0, 180) + Loop(15) + Add(LVar0, 12) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 50) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 18) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Sub(LVar0, 40) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) + Set(LVar0, 180) + Loop(5) + Add(LVar0, 18) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Wait(5) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim0F) + ExecWait(EVS_Enemy_ReturnHome) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(24.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 18) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(ResetAllActorSounds, ACTOR_SELF) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_SPIKE_BOUNCE, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) + Set(LVar0, 180) + Loop(15) + Add(LVar0, 12) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 50) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 18) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Sub(LVar0, 40) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) + Set(LVar0, 180) + Loop(5) + Add(LVar0, 18) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Wait(5) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim13) + Wait(5) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim0F) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetActorYaw, ACTOR_SELF, 0) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/battle/SetAbsoluteStatusOffsets.inc.c" // unused EvtScript N(EVS_FallFromCeiling) = { - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SmoothToppled) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 1) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledDefenseTable))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledAnims))) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -8) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -3, 21) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim06) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 24) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(HideHealthBar, ACTOR_SELF) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SmoothToppled) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 1) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledDefenseTable))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledAnims))) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -8) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -3, 21) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim06) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 24) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(HPBarToHome, ACTOR_SELF) + Return + End }; EvtScript N(EVS_HandleEvent_SmoothToppled) = { - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim1A) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim22) - EVT_SET_CONST(LVar2, ANIM_BonyBeetle_Anim23) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim22) - EVT_SET_CONST(LVar2, ANIM_BonyBeetle_Anim23) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim23) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim1A) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim1A) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim1A) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_FLIP_TRIGGER) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SmoothToppled) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -8) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -3, 21) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 1) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledDefenseTable))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim1A) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) - EVT_USE_BUF(N(FlipPosOffsets)) - EVT_LOOP(20) - EVT_BUF_READ1(LVar0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(20) - EVT_CASE_OR_EQ(EVENT_SCARE_AWAY) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim1A) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim1A) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim1A) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim1A) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim1A) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim1A) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim22) + SetConst(LVar2, ANIM_BonyBeetle_Anim23) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim22) + SetConst(LVar2, ANIM_BonyBeetle_Anim23) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim23) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim1A) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim1A) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim1A) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_FLIP_TRIGGER) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SmoothToppled) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -8) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -3, 21) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 1) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledDefenseTable))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim1A) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) + UseBuf(N(FlipPosOffsets)) + Loop(20) + BufRead1(LVar0) + Call(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) + Wait(1) + EndLoop + Wait(20) + CaseOrEq(EVENT_SCARE_AWAY) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim06) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim1A) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim1A) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim1A) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim1A) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim06) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim06) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim1A) + ExecWait(EVS_Enemy_BlowAway) + EndSwitch + Return + End }; EvtScript N(EVS_TryGettingUp_Smooth) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) - EVT_SUB(LVar0, 1) - EVT_IF_GT(LVar0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim1C) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim06) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_15) - EVT_CALL(SetBattleCamZoom, 350) - EVT_CALL(SetBattleCamOffsetZ, 20) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim1C) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim06) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim0A) - EVT_WAIT(20) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SmoothUpright) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefenseTable))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, FALSE) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) + Sub(LVar0, 1) + IfGt(LVar0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim1C) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim06) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Else + Call(UseBattleCamPreset, BTL_CAM_PRESET_15) + Call(SetBattleCamZoom, 350) + Call(SetBattleCamOffsetZ, 20) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim1C) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim06) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim0A) + Wait(20) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SmoothUpright) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(DefenseTable))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, FALSE) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_HandleEvent_SpikyToppled) = { - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim1B) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim24) - EVT_SET_CONST(LVar2, ANIM_BonyBeetle_Anim25) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim24) - EVT_SET_CONST(LVar2, ANIM_BonyBeetle_Anim25) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim25) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim1B) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim1B) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim1B) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_FLIP_TRIGGER) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SpikyToppled) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -8) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -3, 21) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 1) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledDefenseTable))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledSpikyAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim1B) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) - EVT_USE_BUF(N(FlipPosOffsets)) - EVT_LOOP(20) - EVT_BUF_READ1(LVar0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(20) - EVT_CASE_OR_EQ(EVENT_SCARE_AWAY) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim1B) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim1B) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim1B) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim1B) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BonyBeetle_Anim1B) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim1B) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim24) + SetConst(LVar2, ANIM_BonyBeetle_Anim25) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim24) + SetConst(LVar2, ANIM_BonyBeetle_Anim25) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim25) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim1B) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim1B) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim1B) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_FLIP_TRIGGER) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SpikyToppled) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -8) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -3, 21) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 1) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledDefenseTable))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledSpikyAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim1B) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) + UseBuf(N(FlipPosOffsets)) + Loop(20) + BufRead1(LVar0) + Call(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) + Wait(1) + EndLoop + Wait(20) + CaseOrEq(EVENT_SCARE_AWAY) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim07) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim1B) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim1B) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim1B) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim1B) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim07) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim07) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BonyBeetle_Anim1B) + ExecWait(EVS_Enemy_BlowAway) + Return + EndSwitch + Return + End }; EvtScript N(EVS_TryGettingUp_Spiky) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) - EVT_SUB(LVar0, 1) - EVT_IF_GT(LVar0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim1D) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim07) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_15) - EVT_CALL(SetBattleCamZoom, 350) - EVT_CALL(SetBattleCamOffsetZ, 20) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim1D) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim07) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim0B) - EVT_WAIT(20) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SpikyUpright) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefenseTable))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(SpikyAnims))) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, TRUE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, FALSE) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) + Sub(LVar0, 1) + IfGt(LVar0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim1D) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim07) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Else + Call(UseBattleCamPreset, BTL_CAM_PRESET_15) + Call(SetBattleCamZoom, 350) + Call(SetBattleCamOffsetZ, 20) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim1D) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim07) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BonyBeetle_Anim0B) + Wait(20) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SpikyUpright) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(DefenseTable))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(SpikyAnims))) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, TRUE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, FALSE) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/bullet_bill.inc.c b/src/battle/common/actor/bullet_bill.inc.c index db777f09378..c6163bf8e18 100644 --- a/src/battle/common/actor/bullet_bill.inc.c +++ b/src/battle/common/actor/bullet_bill.inc.c @@ -103,214 +103,214 @@ s32 N(DefaultAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_FiredFromBlaster, LVar0) - EVT_IF_FALSE(LVar0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 16) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_ELSE - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_BlasterID, LVar0) - EVT_CALL(GetActorPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(GetStatusFlags, LVar0, LVar4) - EVT_IF_FLAG(LVar4, STATUS_FLAG_SHRINK) - EVT_SET(LVar5, -13) - EVT_SET(LVar6, 4) - EVT_ELSE - EVT_SET(LVar5, -33) - EVT_SET(LVar6, 11) - EVT_END_IF - EVT_ADD(LVar1, LVar5) - EVT_ADD(LVar2, LVar6) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_CALL(CopyStatusEffects, LVar0, ACTOR_SELF) - EVT_CALL(CopyBuffs, LVar0, ACTOR_SELF) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(GetActorPos, LVar0, LVar1, LVarB, LVarC) - EVT_SUB(LVar1, 90) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.01)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BulletBill_Tense) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BulletBill_Idle) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(GetActorVar, ACTOR_SELF, AVAR_FiredFromBlaster, LVar0) + IfFalse(LVar0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 16) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Else + Call(GetActorVar, ACTOR_SELF, AVAR_BlasterID, LVar0) + Call(GetActorPos, LVar0, LVar1, LVar2, LVar3) + Call(GetStatusFlags, LVar0, LVar4) + IfFlag(LVar4, STATUS_FLAG_SHRINK) + Set(LVar5, -13) + Set(LVar6, 4) + Else + Set(LVar5, -33) + Set(LVar6, 11) + EndIf + Add(LVar1, LVar5) + Add(LVar2, LVar6) + Call(SetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Call(CopyStatusEffects, LVar0, ACTOR_SELF) + Call(CopyBuffs, LVar0, ACTOR_SELF) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(GetActorPos, LVar0, LVar1, LVarB, LVarC) + Sub(LVar1, 90) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.01)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BulletBill_Tense) + Call(SetGoalPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BulletBill_Idle) + Call(ForceHomePos, ACTOR_SELF, LVar1, LVar2, LVar3) + Call(HPBarToHome, ACTOR_SELF) + EndIf + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_Explode) = { - EVT_EXEC_WAIT(N(EVS_MakeExplosionFX)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BulletBill_BurnHurt) - EVT_SET(LVar2, EXEC_DEATH_NO_SPINNING) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END + ExecWait(N(EVS_MakeExplosionFX)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BulletBill_BurnHurt) + Set(LVar2, EXEC_DEATH_NO_SPINNING) + ExecWait(EVS_Enemy_Death) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BulletBill_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BulletBill_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BulletBill_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BulletBill_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BulletBill_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BulletBill_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_RETURN - EVT_CASE_EQ(EVENT_EXPLODE_TRIGGER) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BulletBill_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BulletBill_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_Explode)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BulletBill_Tense) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BulletBill_Tense) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BulletBill_Hurt) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BulletBill_Hurt) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_BURN_HIT) + ExecWait(N(EVS_Explode)) + Return + CaseEq(EVENT_BURN_DEATH) + ExecWait(N(EVS_Explode)) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + ExecWait(N(EVS_Explode)) + Return + CaseEq(EVENT_SPIN_SMASH_DEATH) + ExecWait(N(EVS_Explode)) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BulletBill_Hurt) + ExecWait(EVS_Enemy_ShockHit) + ExecWait(N(EVS_Explode)) + Return + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BulletBill_Hurt) + ExecWait(EVS_Enemy_ShockHit) + ExecWait(N(EVS_Explode)) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BulletBill_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BulletBill_Hurt) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_Explode)) + Return + CaseEq(EVENT_EXPLODE_TRIGGER) + ExecWait(N(EVS_Explode)) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BulletBill_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BulletBill_Hurt) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_Explode)) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BulletBill_Tense) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BulletBill_Tense) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BulletBill_Fire) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPresetImmediately, BTL_CAM_PRESET_19) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar1) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SET(LVar1, LVar3) - EVT_SUB(LVar0, 90) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.01)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar1) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SET(LVar1, LVar3) - EVT_ADD(LVar0, 10) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.01)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) - EVT_EXEC_WAIT(N(EVS_MakeExplosionFX)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, DMG_IMPACT, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BulletBill_BurnHurt) - EVT_SET(LVar2, EXEC_DEATH_NO_SPINNING) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BulletBill_Fire) + Call(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(15) + Call(UseBattleCamPresetImmediately, BTL_CAM_PRESET_19) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar3, LVar1) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Set(LVar1, LVar3) + Sub(LVar0, 90) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.01)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(HideHealthBar, ACTOR_SELF) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(RemoveActor, ACTOR_SELF) + Return + EndCaseGroup + EndSwitch + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar3, LVar1) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Set(LVar1, LVar3) + Add(LVar0, 10) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.01)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) + ExecWait(N(EVS_MakeExplosionFX)) + Call(SetGoalToTarget, ACTOR_SELF) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, DMG_IMPACT, BS_FLAGS1_TRIGGER_EVENTS) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BulletBill_BurnHurt) + Set(LVar2, EXEC_DEATH_NO_SPINNING) + ExecWait(EVS_Enemy_Death) + Return + End }; EvtScript N(EVS_MakeExplosionFX) = { - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_RING, 0, LVar0, LVar1, LVar2, 0) - EVT_ADD(LVar1, 16) - EVT_ADD(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_BLAST, 0, LVar0, LVar1, LVar2, EVT_FLOAT(3.0), 30, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BULLET_BILL_EXPLODE_A) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_MAX) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar2, 2) + PlayEffect(EFFECT_SMOKE_RING, 0, LVar0, LVar1, LVar2, 0) + Add(LVar1, 16) + Add(LVar2, 2) + PlayEffect(EFFECT_BLAST, 0, LVar0, LVar1, LVar2, Float(3.0), 30, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BULLET_BILL_EXPLODE_A) + Call(StartRumble, BTL_RUMBLE_PLAYER_MAX) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + EndThread + Return + End }; diff --git a/src/battle/common/actor/buzzy_beetle.inc.c b/src/battle/common/actor/buzzy_beetle.inc.c index 4edcb80363e..35c697b5c17 100644 --- a/src/battle/common/actor/buzzy_beetle.inc.c +++ b/src/battle/common/actor/buzzy_beetle.inc.c @@ -148,692 +148,692 @@ s32 N(ToppledAnims)[] = { #include "common/battle/SetAbsoluteStatusOffsets.inc.c" EvtScript N(EVS_Init) = { - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsCeiling, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Ceiling) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 0, 10, 0) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn_Ceiling))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent_Ceiling))) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, FALSE) - EVT_ELSE - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Ground) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 16) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -9) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn_Ground))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent_Ground))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(GroundAnims))) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, TRUE) - EVT_END_IF - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(GetActorVar, ACTOR_SELF, AVAR_IsCeiling, LVar0) + IfEq(LVar0, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Ceiling) + Call(N(SetAbsoluteStatusOffsets), -10, 0, 10, 0) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn_Ceiling))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent_Ceiling))) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, FALSE) + Else + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Ground) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 16) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -9) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn_Ground))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent_Ground))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(GroundAnims))) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, TRUE) + EndIf + Call(HPBarToHome, ACTOR_SELF) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_FallFromCeiling) = { - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Toppled) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 16) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -9) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn_Ground))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent_Ground))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 1) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledDefense))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledAnims))) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, TRUE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim08) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 24) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(GetIndexFromPos, ACTOR_SELF, LVarA) - EVT_MOD(LVarA, 4) - EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVarA) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(SetHomePos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_SET(LVarD, LVarA) - EVT_SET(LVarE, LVarB) - EVT_SET(LVarF, LVarC) - EVT_SUB(LVarD, LVar0) - EVT_SUB(LVarE, LVar1) - EVT_SUB(LVarF, LVar2) - EVT_DIV(LVarD, 2) - EVT_DIV(LVarE, 2) - EVT_DIV(LVarF, 2) - EVT_ADD(LVar0, LVarD) - EVT_ADD(LVar1, LVarE) - EVT_ADD(LVar2, LVarF) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim02) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(HideHealthBar, ACTOR_SELF) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Toppled) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 16) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -9) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn_Ground))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent_Ground))) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 1) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledDefense))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledAnims))) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, TRUE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim08) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 24) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(GetIndexFromPos, ACTOR_SELF, LVarA) + Mod(LVarA, 4) + Call(SetGoalToIndex, ACTOR_SELF, LVarA) + Call(GetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(SetHomePos, ACTOR_SELF, LVarA, LVarB, LVarC) + Set(LVarD, LVarA) + Set(LVarE, LVarB) + Set(LVarF, LVarC) + Sub(LVarD, LVar0) + Sub(LVarE, LVar1) + Sub(LVarF, LVar2) + Div(LVarD, 2) + Div(LVarE, 2) + Div(LVarF, 2) + Add(LVar0, LVarD) + Add(LVar1, LVarE) + Add(LVar2, LVarF) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim02) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(HPBarToHome, ACTOR_SELF) + Return + End }; EvtScript N(EVS_HandleEvent_Ceiling) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim13) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim13) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_FallFromCeiling)) - EVT_CASE_EQ(EVENT_FLIP_TRIGGER) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim13) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_FallFromCeiling)) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim18) - EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_FallFromCeiling)) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim18) - EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim13) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim13) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_ZERO_DAMAGE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim16) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim16) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_WAIT(2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_STOP) - EVT_EXEC_WAIT(N(EVS_FallFromCeiling)) - EVT_END_IF - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim13) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim13) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim13) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim13) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_FallFromCeiling)) + CaseEq(EVENT_FLIP_TRIGGER) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim13) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_FallFromCeiling)) + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim18) + SetConst(LVar2, ANIM_BuzzyBeetle_Anim18) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_FallFromCeiling)) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim18) + SetConst(LVar2, ANIM_BuzzyBeetle_Anim18) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim18) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim13) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim07) + ExecWait(EVS_Enemy_Knockback) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim04) + ExecWait(EVS_Enemy_ReturnHome) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim13) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim07) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_ZERO_DAMAGE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim16) + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim16) + ExecWait(EVS_Enemy_NoDamageHit) + Wait(2) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_STOP) + ExecWait(N(EVS_FallFromCeiling)) + EndIf + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim13) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim13) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) // nothing - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, TRUE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim11) - EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim13) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + CaseEq(EVENT_SCARE_AWAY) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, TRUE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim11) + SetConst(LVar2, ANIM_BuzzyBeetle_Anim13) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; // switch the anim on LVar1 if toppled EvtScript N(EVS_CheckToppleAnim) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar3) - EVT_IF_EQ(LVar3, AVAL_State_Toppled) - EVT_SET(LVar1, LVar2) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar3) + IfEq(LVar3, AVAL_State_Toppled) + Set(LVar1, LVar2) + EndIf + Return + End }; s32 N(FlipPosOffsets)[] = { 7, 13, 17, 21, 23, 24, 23, 21, 17, 13, 7, 0, 4, 7, 6, 4, 0, 2, 0 }; EvtScript N(EVS_HandleEvent_Ground) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07) - EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim19) - EVT_EXEC_WAIT(N(EVS_CheckToppleAnim)) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_NE(LVar0, AVAL_State_Toppled) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim0B) - EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim1D) - EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim1D) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_END_IF - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_NE(LVar0, AVAL_State_Toppled) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim0B) - EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim1D) - EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim1D) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim1D) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_END_IF - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07) - EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim19) - EVT_EXEC_WAIT(N(EVS_CheckToppleAnim)) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_FLIP_TRIGGER) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Toppled) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 16) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -9) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 1) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledDefense))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledAnims))) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim07) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -45) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -90) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -135) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -180) - EVT_WAIT(1) - EVT_END_THREAD - EVT_USE_BUF(EVT_PTR(N(FlipPosOffsets))) - EVT_LOOP(19) - EVT_BUF_READ1(LVar0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim19) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_ZERO_DAMAGE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Ground) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim17) - EVT_WAIT(8) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_CASE_EQ(EVENT_IMMUNE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Ground) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim0D) - EVT_WAIT(8) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_CASE_EQ(EVENT_SPIKE_TAUNT) - EVT_WAIT(10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 9) - EVT_ELSE - EVT_ADD(LVar1, 24) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) - EVT_WAIT(20) - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07) - EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim19) - EVT_EXEC_WAIT(N(EVS_CheckToppleAnim)) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07) - EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim19) - EVT_EXEC_WAIT(N(EVS_CheckToppleAnim)) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07) - EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim19) - EVT_EXEC_WAIT(N(EVS_CheckToppleAnim)) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07) - EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim19) - EVT_EXEC_WAIT(N(EVS_CheckToppleAnim)) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Ground) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_END_IF - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Ground) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim04) - EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Ground) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim04) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim02) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Ground) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim07) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim08) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Ground) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim0D) - EVT_WAIT(8) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim07) + SetConst(LVar2, ANIM_BuzzyBeetle_Anim19) + ExecWait(N(EVS_CheckToppleAnim)) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfNe(LVar0, AVAL_State_Toppled) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim0B) + SetConst(LVar2, ANIM_BuzzyBeetle_Anim0B) + ExecWait(EVS_Enemy_BurnHit) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim1D) + SetConst(LVar2, ANIM_BuzzyBeetle_Anim1D) + ExecWait(EVS_Enemy_BurnHit) + EndIf + CaseEq(EVENT_BURN_DEATH) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfNe(LVar0, AVAL_State_Toppled) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim0B) + SetConst(LVar2, ANIM_BuzzyBeetle_Anim0B) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim0B) + ExecWait(EVS_Enemy_Death) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim1D) + SetConst(LVar2, ANIM_BuzzyBeetle_Anim1D) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim1D) + ExecWait(EVS_Enemy_Death) + EndIf + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim07) + SetConst(LVar2, ANIM_BuzzyBeetle_Anim19) + ExecWait(N(EVS_CheckToppleAnim)) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_FLIP_TRIGGER) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Toppled) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 16) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -9) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 1) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledDefense))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledAnims))) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim07) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Thread + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -45) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -90) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -135) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -180) + Wait(1) + EndThread + UseBuf(Ref(N(FlipPosOffsets))) + Loop(19) + BufRead1(LVar0) + Call(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim19) + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim07) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim07) + ExecWait(EVS_Enemy_Knockback) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim04) + ExecWait(EVS_Enemy_ReturnHome) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim07) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim07) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_ZERO_DAMAGE) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfEq(LVar0, AVAL_State_Ground) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim0C) + ExecWait(EVS_Enemy_NoDamageHit) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim17) + Wait(8) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim02) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + CaseEq(EVENT_IMMUNE) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfEq(LVar0, AVAL_State_Ground) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim0C) + ExecWait(EVS_Enemy_NoDamageHit) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim0D) + Wait(8) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim02) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + CaseEq(EVENT_SPIKE_TAUNT) + Wait(10) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar1, 9) + Else + Add(LVar1, 24) + EndIf + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) + Wait(20) + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim07) + SetConst(LVar2, ANIM_BuzzyBeetle_Anim19) + ExecWait(N(EVS_CheckToppleAnim)) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim07) + SetConst(LVar2, ANIM_BuzzyBeetle_Anim19) + ExecWait(N(EVS_CheckToppleAnim)) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim07) + SetConst(LVar2, ANIM_BuzzyBeetle_Anim19) + ExecWait(N(EVS_CheckToppleAnim)) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim07) + SetConst(LVar2, ANIM_BuzzyBeetle_Anim19) + ExecWait(N(EVS_CheckToppleAnim)) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfEq(LVar0, AVAL_State_Ground) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim01) + ExecWait(EVS_Enemy_Recover) + EndIf + CaseEq(EVENT_SCARE_AWAY) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfEq(LVar0, AVAL_State_Ground) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim04) + SetConst(LVar2, ANIM_BuzzyBeetle_Anim07) + ExecWait(EVS_Enemy_ScareAway) + Return + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim02) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + CaseEq(EVENT_BEGIN_AIR_LIFT) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfEq(LVar0, AVAL_State_Ground) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim04) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim02) + EndIf + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfEq(LVar0, AVAL_State_Ground) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim07) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim08) + EndIf + ExecWait(EVS_Enemy_BlowAway) + Return + CaseEq(EVENT_AIR_LIFT_FAILED) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfEq(LVar0, AVAL_State_Ground) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim0C) + ExecWait(EVS_Enemy_NoDamageHit) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim0D) + Wait(8) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim02) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn_Ceiling) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Ground) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 16) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -9) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn_Ground))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent_Ground))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(GroundAnims))) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, TRUE) - EVT_CALL(GetIndexFromPos, ACTOR_SELF, LVar0) - EVT_MOD(LVar0, 4) - EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVar0) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar4, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim0E) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim11) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar4, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim0E) - EVT_WAIT(8) - EVT_END_IF - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_05) - EVT_CALL(SetBattleCamZoom, 430) - EVT_CALL(SetBattleCamOffsetZ, 20) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_END_IF - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, DMG_CEILING_DROP, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(SetPartYaw, ACTOR_SELF, PRT_MAIN, 180) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim08) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 24) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim00) - EVT_END_THREAD - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_WAIT(8) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim04) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim01) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim08) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 24) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, LVar4) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_CEILING_DROP, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim00) - EVT_END_THREAD - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_WAIT(8) - EVT_CALL(YieldTurn) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim01) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_LABEL(10) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Ground) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 16) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -9) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn_Ground))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent_Ground))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(GroundAnims))) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, TRUE) + Call(GetIndexFromPos, ACTOR_SELF, LVar0) + Mod(LVar0, 4) + Call(SetGoalToIndex, ACTOR_SELF, LVar0) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar4, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim0E) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim11) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar4, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim0E) + Wait(8) + EndIf + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_05) + Call(SetBattleCamZoom, 430) + Call(SetBattleCamOffsetZ, 20) + Call(MoveBattleCamOver, 10) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + EndIf + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, DMG_CEILING_DROP, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(SetPartYaw, ACTOR_SELF, PRT_MAIN, 180) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim08) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 24) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(ResetAllActorSounds, ACTOR_SELF) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Thread + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim00) + EndThread + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Wait(8) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim04) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim01) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetActorYaw, ACTOR_SELF, 180) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim08) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 24) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, LVar4) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(ResetAllActorSounds, ACTOR_SELF) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_CEILING_DROP, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Thread + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim00) + EndThread + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Wait(8) + Call(YieldTurn) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim04) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim01) + EndCaseGroup + EndSwitch + Label(10) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn_Ground) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Toppled) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) - EVT_SUB(LVar0, 1) - EVT_IF_GT(LVar0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_WAIT(30) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_ELSE - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_WAIT(20) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim02) - EVT_SET_CONST(LVar2, ANIM_BuzzyBeetle_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_FlipBackUp) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Ground) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 16) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -9) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(UprightDefense))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(GroundAnims))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, FALSE) - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim0C) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim06) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(10) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_SPIN) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim05) - EVT_WAIT(20) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_TOSS) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_IF_GT(LVar0, LVar3) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_01) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -150, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(14.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_WAIT(15) - EVT_CALL(YieldTurn) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 200) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim0D) - EVT_WAIT(10) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(14.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_SHELL_TOSS, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim01) - EVT_WAIT(8) - EVT_CALL(YieldTurn) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BuzzyBeetle_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim01) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfEq(LVar0, AVAL_State_Toppled) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) + Sub(LVar0, 1) + IfGt(LVar0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Wait(30) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Else + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Wait(20) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim02) + SetConst(LVar2, ANIM_BuzzyBeetle_Anim01) + ExecWait(EVS_Enemy_FlipBackUp) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Ground) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 16) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -9) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(UprightDefense))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(GroundAnims))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, FALSE) + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndIf + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim0C) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim06) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(10) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(5) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + EndThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_SPIN) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim05) + Wait(20) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_TOSS) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Thread + Loop(0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + IfGt(LVar0, LVar3) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(UseBattleCamPreset, BTL_CAM_PRESET_01) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -150, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(14.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Wait(15) + Call(YieldTurn) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 200) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(10.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim0D) + Wait(10) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(14.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_SHELL_TOSS, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim01) + Wait(8) + Call(YieldTurn) + Call(ResetAllActorSounds, ACTOR_SELF) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BuzzyBeetle_Anim04) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BuzzyBeetle_Anim01) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/bzzap.inc.c b/src/battle/common/actor/bzzap.inc.c index e0fa0033fe7..39cbcd16ea3 100644 --- a/src/battle/common/actor/bzzap.inc.c +++ b/src/battle/common/actor/bzzap.inc.c @@ -182,572 +182,572 @@ API_CALLABLE(N(AddVecXZ)) { } EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_SWARM_1, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_SWARM_2, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_SWARM_3, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_SWARM_4, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_SWARM_5, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetPartScale, ACTOR_SELF, PRT_SWARM_1, Float(0.4), Float(0.4), Float(0.4)) + Call(SetPartScale, ACTOR_SELF, PRT_SWARM_2, Float(0.4), Float(0.4), Float(0.4)) + Call(SetPartScale, ACTOR_SELF, PRT_SWARM_3, Float(0.4), Float(0.4), Float(0.4)) + Call(SetPartScale, ACTOR_SELF, PRT_SWARM_4, Float(0.4), Float(0.4), Float(0.4)) + Call(SetPartScale, ACTOR_SELF, PRT_SWARM_5, Float(0.4), Float(0.4), Float(0.4)) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SLEEP | STATUS_FLAG_DIZZY) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -7, 19) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 2, -6) - EVT_CALL(N(SetAbsoluteStatusOffsets), -20, 20, 10, 27) - EVT_ELSE - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -7, 33) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 2, -10) - EVT_CALL(N(SetAbsoluteStatusOffsets), -16, 22, 4, 22) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SLEEP | STATUS_FLAG_DIZZY) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -7, 19) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 2, -6) + Call(N(SetAbsoluteStatusOffsets), -20, 20, 10, 27) + Else + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -7, 33) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 2, -10) + Call(N(SetAbsoluteStatusOffsets), -16, 22, 4, 22) + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bzzap_Anim03) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) - EVT_RETURN - EVT_END + Call(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bzzap_Anim03) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim07) - EVT_SET_CONST(LVar2, ANIM_Bzzap_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim07) - EVT_SET_CONST(LVar2, ANIM_Bzzap_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0) - EVT_CALL(HPBarToCurrent, ACTOR_SELF) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim03) - EVT_SET_CONST(LVar2, ANIM_Bzzap_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) - EVT_ELSE - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 9, 0) - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Bzzap_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bzzap_Anim06) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bzzap_Anim07) + SetConst(LVar2, ANIM_Bzzap_Anim08) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bzzap_Anim07) + SetConst(LVar2, ANIM_Bzzap_Anim08) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bzzap_Anim08) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bzzap_Anim06) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bzzap_Anim06) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bzzap_Anim0B) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bzzap_Anim06) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bzzap_Anim06) + ExecWait(EVS_Enemy_Knockback) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bzzap_Anim06) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bzzap_Anim0B) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bzzap_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bzzap_Anim06) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bzzap_Anim0B) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + Call(SetActorPos, ACTOR_SELF, 20, 0, 0) + Call(HPBarToCurrent, ACTOR_SELF) + CaseEq(EVENT_END_FIRST_STRIKE) + ExecWait(N(EVS_ReturnHome)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bzzap_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bzzap_Anim03) + SetConst(LVar2, ANIM_Bzzap_Anim06) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bzzap_Anim01) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) + Else + Call(SetActorDispOffset, ACTOR_SELF, 0, 9, 0) + EndIf + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Bzzap_Anim06) + ExecWait(EVS_Enemy_BlowAway) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_Sting) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bzzap_Anim03) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 52, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, EASING_COS_IN) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_WAIT(10) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_ADD(LVar2, 1) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_QUADRATIC_OUT) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BZZAP_STING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bzzap_Anim04) - EVT_WAIT(10) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_WAIT(10) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_ADD(LVar2, 1) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_QUADRATIC_OUT) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BZZAP_STING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bzzap_Anim04) - EVT_WAIT(6) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 40), DMG_STING, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(20) - EVT_CALL(YieldTurn) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bzzap_Anim03) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 52, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(FlyToGoal, ACTOR_SELF, 0, -4, EASING_COS_IN) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Wait(10) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Add(LVar2, 1) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_QUADRATIC_OUT) + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BZZAP_STING) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bzzap_Anim04) + Wait(10) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + ExecWait(N(EVS_ReturnHome)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Wait(10) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Add(LVar2, 1) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_QUADRATIC_OUT) + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BZZAP_STING) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bzzap_Anim04) + Wait(6) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 40), DMG_STING, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(20) + Call(YieldTurn) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_SummonSwarmPart) = { - EVT_SET(LVar9, LVar0) - EVT_CALL(SetPartYaw, ACTOR_SELF, LVar9, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_ADD(LVarA, 200) - EVT_ADD(LVarB, 100) - EVT_CALL(SetPartPos, ACTOR_SELF, LVar9, LVarA, LVarB, LVarC) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar9, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar9, ANIM_Bzzap_Anim03) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_ADD(LVarB, 50) - EVT_SUB(LVarC, 30) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, LVar9, EVT_FLOAT(6.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVar9, EVT_FLOAT(1.0)) - EVT_CALL(FlyPartTo, ACTOR_SELF, LVar9, LVarA, LVarB, LVarC, 0, -10, EASING_LINEAR) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_CALL(GetPartOffset, ACTOR_SELF, LVar9, LVar6, LVar7, LVar8) - EVT_CALL(MakeLerp, 90, 450, 50, EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(AddVecXZ), LVar3, LVar5, 30, LVar0, LVar6, LVar8) - EVT_CALL(SetPartPos, ACTOR_SELF, LVar9, LVar6, LVar7, LVar8) - EVT_IF_GT(LVar3, LVar6) - EVT_CALL(SetPartYaw, ACTOR_SELF, LVar9, 180) - EVT_ELSE - EVT_CALL(SetPartYaw, ACTOR_SELF, LVar9, 0) - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetPartYaw, ACTOR_SELF, LVar9, 0) - EVT_IF_EQ(LVar9, 2) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_08) - EVT_CALL(SetBattleCamZoom, 400) - EVT_CALL(SetBattleCamOffsetZ, 30) - EVT_CALL(BattleCamTargetActor, ACTOR_PLAYER) - EVT_CALL(MoveBattleCamOver, 60) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, LVar9, ANIM_Bzzap_Anim03) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVarA, LVarB, LVarC) - EVT_ADD(LVarB, 30) - EVT_ADD(LVarC, 30) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, LVar9, EVT_FLOAT(6.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVar9, EVT_FLOAT(1.0)) - EVT_CALL(FlyPartTo, ACTOR_SELF, LVar9, LVarA, LVarB, LVarC, 0, -10, EASING_LINEAR) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) - EVT_CALL(GetPartOffset, ACTOR_SELF, LVar9, LVar6, LVar7, LVar8) - EVT_CALL(MakeLerp, -90, -720, 100, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(N(AddVecXZ), LVar3, LVar5, 30, LVar0, LVar6, LVar8) - EVT_CALL(SetPartPos, ACTOR_SELF, LVar9, LVar6, LVar7, LVar8) - EVT_IF_GT(LVar3, LVar6) - EVT_CALL(SetPartYaw, ACTOR_SELF, LVar9, 180) - EVT_ELSE - EVT_CALL(SetPartYaw, ACTOR_SELF, LVar9, 0) - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVar9, LVar0) + Call(SetPartYaw, ACTOR_SELF, LVar9, 0) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Add(LVarA, 200) + Add(LVarB, 100) + Call(SetPartPos, ACTOR_SELF, LVar9, LVarA, LVarB, LVarC) + Call(SetPartFlagBits, ACTOR_SELF, LVar9, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetAnimation, ACTOR_SELF, LVar9, ANIM_Bzzap_Anim03) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Add(LVarB, 50) + Sub(LVarC, 30) + Call(SetPartMoveSpeed, ACTOR_SELF, LVar9, Float(6.0)) + Call(SetPartJumpGravity, ACTOR_SELF, LVar9, Float(1.0)) + Call(FlyPartTo, ACTOR_SELF, LVar9, LVarA, LVarB, LVarC, 0, -10, EASING_LINEAR) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Call(GetPartOffset, ACTOR_SELF, LVar9, LVar6, LVar7, LVar8) + Call(MakeLerp, 90, 450, 50, EASING_LINEAR) + Label(0) + Call(UpdateLerp) + Call(N(AddVecXZ), LVar3, LVar5, 30, LVar0, LVar6, LVar8) + Call(SetPartPos, ACTOR_SELF, LVar9, LVar6, LVar7, LVar8) + IfGt(LVar3, LVar6) + Call(SetPartYaw, ACTOR_SELF, LVar9, 180) + Else + Call(SetPartYaw, ACTOR_SELF, LVar9, 0) + EndIf + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(SetPartYaw, ACTOR_SELF, LVar9, 0) + IfEq(LVar9, 2) + Call(UseBattleCamPreset, BTL_CAM_PRESET_08) + Call(SetBattleCamZoom, 400) + Call(SetBattleCamOffsetZ, 30) + Call(BattleCamTargetActor, ACTOR_PLAYER) + Call(MoveBattleCamOver, 60) + EndIf + Call(SetAnimation, ACTOR_SELF, LVar9, ANIM_Bzzap_Anim03) + Call(GetActorPos, ACTOR_PLAYER, LVarA, LVarB, LVarC) + Add(LVarB, 30) + Add(LVarC, 30) + Call(SetPartMoveSpeed, ACTOR_SELF, LVar9, Float(6.0)) + Call(SetPartJumpGravity, ACTOR_SELF, LVar9, Float(1.0)) + Call(FlyPartTo, ACTOR_SELF, LVar9, LVarA, LVarB, LVarC, 0, -10, EASING_LINEAR) + Call(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) + Call(GetPartOffset, ACTOR_SELF, LVar9, LVar6, LVar7, LVar8) + Call(MakeLerp, -90, -720, 100, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(N(AddVecXZ), LVar3, LVar5, 30, LVar0, LVar6, LVar8) + Call(SetPartPos, ACTOR_SELF, LVar9, LVar6, LVar7, LVar8) + IfGt(LVar3, LVar6) + Call(SetPartYaw, ACTOR_SELF, LVar9, 180) + Else + Call(SetPartYaw, ACTOR_SELF, LVar9, 0) + EndIf + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Return + End }; EvtScript N(EVS_Attack_CallSwarm) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_SWARM_1, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_SWARM_2, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_SWARM_3, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_SWARM_4, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_SWARM_5, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BZZAP_CALL_SWARM) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bzzap_Anim05) - EVT_WAIT(40) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bzzap_Anim01) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(PlaySound, SOUND_MINI_BZZAP_BUZZ) - EVT_SET(LVar0, PRT_SWARM_1) - EVT_EXEC_GET_TID(N(EVS_SummonSwarmPart), LVarA) - EVT_WAIT(11) - EVT_SET(LVar0, PRT_SWARM_2) - EVT_EXEC(N(EVS_SummonSwarmPart)) - EVT_WAIT(11) - EVT_SET(LVar0, PRT_SWARM_3) - EVT_EXEC(N(EVS_SummonSwarmPart)) - EVT_WAIT(11) - EVT_SET(LVar0, PRT_SWARM_4) - EVT_EXEC(N(EVS_SummonSwarmPart)) - EVT_WAIT(11) - EVT_SET(LVar0, PRT_SWARM_5) - EVT_EXEC(N(EVS_SummonSwarmPart)) - EVT_LABEL(0) - EVT_IS_THREAD_RUNNING(LVarA, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_THREAD - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_1, SOUND_MINI_BZZAP_STING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SWARM_1, ANIM_Bzzap_Anim04) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -30, -20, 1) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_1, EVT_FLOAT(3.0)) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_SWARM_1, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SWARM_1, ANIM_Bzzap_Anim03) - EVT_CALL(SetPartYaw, ACTOR_SELF, PRT_SWARM_1, 180) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 100) - EVT_ADD(LVar2, 100) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_SWARM_1, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_SWARM_1, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_SWARM_1, 0) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_1, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_END_THREAD - EVT_WAIT(11) - EVT_THREAD - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_2, SOUND_MINI_BZZAP_STING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SWARM_2, ANIM_Bzzap_Anim04) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -30, -20, 1) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_2, EVT_FLOAT(3.0)) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_SWARM_2, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SWARM_2, ANIM_Bzzap_Anim03) - EVT_CALL(SetPartYaw, ACTOR_SELF, PRT_SWARM_2, 180) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 100) - EVT_ADD(LVar2, 100) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_SWARM_2, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_SWARM_2, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_SWARM_2, 0) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_2, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_END_THREAD - EVT_WAIT(11) - EVT_THREAD - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_3, SOUND_MINI_BZZAP_STING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SWARM_3, ANIM_Bzzap_Anim04) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -30, -20, 1) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_3, EVT_FLOAT(3.0)) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_SWARM_3, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SWARM_3, ANIM_Bzzap_Anim03) - EVT_CALL(SetPartYaw, ACTOR_SELF, PRT_SWARM_3, 180) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 100) - EVT_ADD(LVar2, 100) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_SWARM_3, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_SWARM_3, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_SWARM_3, 0) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_3, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_END_THREAD - EVT_WAIT(11) - EVT_THREAD - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_4, SOUND_MINI_BZZAP_STING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SWARM_4, ANIM_Bzzap_Anim04) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -30, -20, 1) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_4, EVT_FLOAT(3.0)) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_SWARM_4, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SWARM_4, ANIM_Bzzap_Anim03) - EVT_CALL(SetPartYaw, ACTOR_SELF, PRT_SWARM_4, 180) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 100) - EVT_ADD(LVar2, 100) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_SWARM_4, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_SWARM_4, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_SWARM_4, 0) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_4, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_END_THREAD - EVT_WAIT(11) - EVT_THREAD - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_5, SOUND_MINI_BZZAP_STING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SWARM_5, ANIM_Bzzap_Anim04) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -30, -20, 1) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_5, EVT_FLOAT(3.0)) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_SWARM_5, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SWARM_5, ANIM_Bzzap_Anim03) - EVT_CALL(SetPartYaw, ACTOR_SELF, PRT_SWARM_5, 180) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 100) - EVT_ADD(LVar2, 100) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_SWARM_5, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_SWARM_5, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_SWARM_5, 0) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_5, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_END_THREAD - EVT_WAIT(11) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(30) - EVT_CALL(StopSound, SOUND_MINI_BZZAP_BUZZ) - EVT_CALL(YieldTurn) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_THREAD - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_1, SOUND_MINI_BZZAP_STING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SWARM_1, ANIM_Bzzap_Anim04) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -10, -10, 1) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_1, EVT_FLOAT(3.0)) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_SWARM_1, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SWARM, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SWARM_1, ANIM_Bzzap_Anim03) - EVT_CALL(SetPartYaw, ACTOR_SELF, PRT_SWARM_1, 180) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 100) - EVT_ADD(LVar2, 100) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_SWARM_1, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_1, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_END_THREAD - EVT_WAIT(11) - EVT_THREAD - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_2, SOUND_MINI_BZZAP_STING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SWARM_2, ANIM_Bzzap_Anim04) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -10, -10, 1) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_2, EVT_FLOAT(3.0)) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_SWARM_2, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SWARM, BS_FLAGS1_NICE_HIT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SWARM_2, ANIM_Bzzap_Anim03) - EVT_CALL(SetPartYaw, ACTOR_SELF, PRT_SWARM_2, 180) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 100) - EVT_ADD(LVar2, 100) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_SWARM_2, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_2, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_END_THREAD - EVT_WAIT(11) - EVT_THREAD - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_3, SOUND_MINI_BZZAP_STING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SWARM_3, ANIM_Bzzap_Anim04) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -10, -10, 1) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_3, EVT_FLOAT(3.0)) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_SWARM_3, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SWARM, BS_FLAGS1_NICE_HIT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SWARM_3, ANIM_Bzzap_Anim03) - EVT_CALL(SetPartYaw, ACTOR_SELF, PRT_SWARM_3, 180) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 100) - EVT_ADD(LVar2, 100) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_SWARM_3, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_3, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_END_THREAD - EVT_WAIT(11) - EVT_THREAD - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_4, SOUND_MINI_BZZAP_STING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SWARM_4, ANIM_Bzzap_Anim04) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -10, -10, 1) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_4, EVT_FLOAT(3.0)) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_SWARM_4, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SWARM, BS_FLAGS1_NICE_HIT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SWARM_4, ANIM_Bzzap_Anim03) - EVT_CALL(SetPartYaw, ACTOR_SELF, PRT_SWARM_4, 180) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 100) - EVT_ADD(LVar2, 100) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_SWARM_4, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_4, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_END_THREAD - EVT_WAIT(11) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_5, SOUND_MINI_BZZAP_STING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SWARM_5, ANIM_Bzzap_Anim04) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -10, -10, 1) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_5, EVT_FLOAT(3.0)) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_SWARM_5, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SWARM, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SWARM_5, ANIM_Bzzap_Anim03) - EVT_CALL(SetPartYaw, ACTOR_SELF, PRT_SWARM_5, 180) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 100) - EVT_ADD(LVar2, 100) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_SWARM_5, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_5, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(StopSound, SOUND_MINI_BZZAP_BUZZ) - EVT_CALL(YieldTurn) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetPartSounds, ACTOR_SELF, PRT_SWARM_1, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(SetPartSounds, ACTOR_SELF, PRT_SWARM_2, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(SetPartSounds, ACTOR_SELF, PRT_SWARM_3, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(SetPartSounds, ACTOR_SELF, PRT_SWARM_4, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(SetPartSounds, ACTOR_SELF, PRT_SWARM_5, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BZZAP_CALL_SWARM) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bzzap_Anim05) + Wait(40) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Bzzap_Anim01) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(PlaySound, SOUND_MINI_BZZAP_BUZZ) + Set(LVar0, PRT_SWARM_1) + ExecGetTID(N(EVS_SummonSwarmPart), LVarA) + Wait(11) + Set(LVar0, PRT_SWARM_2) + Exec(N(EVS_SummonSwarmPart)) + Wait(11) + Set(LVar0, PRT_SWARM_3) + Exec(N(EVS_SummonSwarmPart)) + Wait(11) + Set(LVar0, PRT_SWARM_4) + Exec(N(EVS_SummonSwarmPart)) + Wait(11) + Set(LVar0, PRT_SWARM_5) + Exec(N(EVS_SummonSwarmPart)) + Label(0) + IsThreadRunning(LVarA, LVar0) + Wait(1) + IfEq(LVar0, 1) + Goto(0) + EndIf + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Thread + Call(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_1, SOUND_MINI_BZZAP_STING) + Call(SetAnimation, ACTOR_SELF, PRT_SWARM_1, ANIM_Bzzap_Anim04) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -30, -20, 1) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_1, Float(3.0)) + Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_1, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR) + Call(SetAnimation, ACTOR_SELF, PRT_SWARM_1, ANIM_Bzzap_Anim03) + Call(SetPartYaw, ACTOR_SELF, PRT_SWARM_1, 180) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 100) + Add(LVar2, 100) + Call(AddActorDecoration, ACTOR_SELF, PRT_SWARM_1, 0, ACTOR_DECORATION_SWEAT) + Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_1, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_SWARM_1, 0) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_1, ACTOR_PART_FLAG_INVISIBLE, TRUE) + EndThread + Wait(11) + Thread + Call(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_2, SOUND_MINI_BZZAP_STING) + Call(SetAnimation, ACTOR_SELF, PRT_SWARM_2, ANIM_Bzzap_Anim04) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -30, -20, 1) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_2, Float(3.0)) + Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_2, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR) + Call(SetAnimation, ACTOR_SELF, PRT_SWARM_2, ANIM_Bzzap_Anim03) + Call(SetPartYaw, ACTOR_SELF, PRT_SWARM_2, 180) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 100) + Add(LVar2, 100) + Call(AddActorDecoration, ACTOR_SELF, PRT_SWARM_2, 0, ACTOR_DECORATION_SWEAT) + Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_2, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_SWARM_2, 0) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_2, ACTOR_PART_FLAG_INVISIBLE, TRUE) + EndThread + Wait(11) + Thread + Call(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_3, SOUND_MINI_BZZAP_STING) + Call(SetAnimation, ACTOR_SELF, PRT_SWARM_3, ANIM_Bzzap_Anim04) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -30, -20, 1) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_3, Float(3.0)) + Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_3, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR) + Call(SetAnimation, ACTOR_SELF, PRT_SWARM_3, ANIM_Bzzap_Anim03) + Call(SetPartYaw, ACTOR_SELF, PRT_SWARM_3, 180) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 100) + Add(LVar2, 100) + Call(AddActorDecoration, ACTOR_SELF, PRT_SWARM_3, 0, ACTOR_DECORATION_SWEAT) + Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_3, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_SWARM_3, 0) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_3, ACTOR_PART_FLAG_INVISIBLE, TRUE) + EndThread + Wait(11) + Thread + Call(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_4, SOUND_MINI_BZZAP_STING) + Call(SetAnimation, ACTOR_SELF, PRT_SWARM_4, ANIM_Bzzap_Anim04) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -30, -20, 1) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_4, Float(3.0)) + Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_4, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR) + Call(SetAnimation, ACTOR_SELF, PRT_SWARM_4, ANIM_Bzzap_Anim03) + Call(SetPartYaw, ACTOR_SELF, PRT_SWARM_4, 180) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 100) + Add(LVar2, 100) + Call(AddActorDecoration, ACTOR_SELF, PRT_SWARM_4, 0, ACTOR_DECORATION_SWEAT) + Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_4, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_SWARM_4, 0) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_4, ACTOR_PART_FLAG_INVISIBLE, TRUE) + EndThread + Wait(11) + Thread + Call(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_5, SOUND_MINI_BZZAP_STING) + Call(SetAnimation, ACTOR_SELF, PRT_SWARM_5, ANIM_Bzzap_Anim04) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -30, -20, 1) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_5, Float(3.0)) + Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_5, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR) + Call(SetAnimation, ACTOR_SELF, PRT_SWARM_5, ANIM_Bzzap_Anim03) + Call(SetPartYaw, ACTOR_SELF, PRT_SWARM_5, 180) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 100) + Add(LVar2, 100) + Call(AddActorDecoration, ACTOR_SELF, PRT_SWARM_5, 0, ACTOR_DECORATION_SWEAT) + Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_5, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_SWARM_5, 0) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_5, ACTOR_PART_FLAG_INVISIBLE, TRUE) + EndThread + Wait(11) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(30) + Call(StopSound, SOUND_MINI_BZZAP_BUZZ) + Call(YieldTurn) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Thread + Call(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_1, SOUND_MINI_BZZAP_STING) + Call(SetAnimation, ACTOR_SELF, PRT_SWARM_1, ANIM_Bzzap_Anim04) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -10, -10, 1) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_1, Float(3.0)) + Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_1, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SWARM, BS_FLAGS1_INCLUDE_POWER_UPS) + Call(SetAnimation, ACTOR_SELF, PRT_SWARM_1, ANIM_Bzzap_Anim03) + Call(SetPartYaw, ACTOR_SELF, PRT_SWARM_1, 180) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 100) + Add(LVar2, 100) + Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_1, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_1, ACTOR_PART_FLAG_INVISIBLE, TRUE) + EndThread + Wait(11) + Thread + Call(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_2, SOUND_MINI_BZZAP_STING) + Call(SetAnimation, ACTOR_SELF, PRT_SWARM_2, ANIM_Bzzap_Anim04) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -10, -10, 1) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_2, Float(3.0)) + Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_2, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SWARM, BS_FLAGS1_NICE_HIT) + Call(SetAnimation, ACTOR_SELF, PRT_SWARM_2, ANIM_Bzzap_Anim03) + Call(SetPartYaw, ACTOR_SELF, PRT_SWARM_2, 180) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 100) + Add(LVar2, 100) + Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_2, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_2, ACTOR_PART_FLAG_INVISIBLE, TRUE) + EndThread + Wait(11) + Thread + Call(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_3, SOUND_MINI_BZZAP_STING) + Call(SetAnimation, ACTOR_SELF, PRT_SWARM_3, ANIM_Bzzap_Anim04) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -10, -10, 1) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_3, Float(3.0)) + Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_3, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SWARM, BS_FLAGS1_NICE_HIT) + Call(SetAnimation, ACTOR_SELF, PRT_SWARM_3, ANIM_Bzzap_Anim03) + Call(SetPartYaw, ACTOR_SELF, PRT_SWARM_3, 180) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 100) + Add(LVar2, 100) + Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_3, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_3, ACTOR_PART_FLAG_INVISIBLE, TRUE) + EndThread + Wait(11) + Thread + Call(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_4, SOUND_MINI_BZZAP_STING) + Call(SetAnimation, ACTOR_SELF, PRT_SWARM_4, ANIM_Bzzap_Anim04) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -10, -10, 1) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_4, Float(3.0)) + Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_4, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SWARM, BS_FLAGS1_NICE_HIT) + Call(SetAnimation, ACTOR_SELF, PRT_SWARM_4, ANIM_Bzzap_Anim03) + Call(SetPartYaw, ACTOR_SELF, PRT_SWARM_4, 180) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 100) + Add(LVar2, 100) + Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_4, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_4, ACTOR_PART_FLAG_INVISIBLE, TRUE) + EndThread + Wait(11) + Wait(1) + Call(PlaySoundAtPart, ACTOR_SELF, PRT_SWARM_5, SOUND_MINI_BZZAP_STING) + Call(SetAnimation, ACTOR_SELF, PRT_SWARM_5, ANIM_Bzzap_Anim04) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -10, -10, 1) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_SWARM_5, Float(3.0)) + Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_5, LVar0, LVar1, LVar2, 0, -10, EASING_LINEAR) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SWARM, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetAnimation, ACTOR_SELF, PRT_SWARM_5, ANIM_Bzzap_Anim03) + Call(SetPartYaw, ACTOR_SELF, PRT_SWARM_5, 180) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 100) + Add(LVar2, 100) + Call(FlyPartTo, ACTOR_SELF, PRT_SWARM_5, LVar0, LVar1, LVar2, 0, 10, EASING_LINEAR) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SWARM_5, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(StopSound, SOUND_MINI_BZZAP_BUZZ) + Call(YieldTurn) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_Attack_Sting)) - EVT_RETURN - EVT_END_IF - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 500) - EVT_EXEC_WAIT(N(EVS_Attack_Sting)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_CallSwarm)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + ExecWait(N(EVS_Attack_Sting)) + Return + EndIf + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 500) + ExecWait(N(EVS_Attack_Sting)) + Else + ExecWait(N(EVS_Attack_CallSwarm)) + EndIf + Return + End }; diff --git a/src/battle/common/actor/cleft.inc.c b/src/battle/common/actor/cleft.inc.c index 47a14a06c25..f5f7bb1dd73 100644 --- a/src/battle/common/actor/cleft.inc.c +++ b/src/battle/common/actor/cleft.inc.c @@ -132,430 +132,430 @@ s32 N(ToppledAnims)[] = { #include "common/StartRumbleWithParams.inc.c" EvtScript N(EVS_Init) = { - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Toppled, 0) - EVT_RETURN - EVT_END + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_Toppled, 0) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_FlipOver) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Toppled, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim07) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(5) - EVT_ADD(LVar0, -36) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.3)) - EVT_SUB(LVar1, 6) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(N(StartRumbleWithParams), 200, 10) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 40, 8, EVT_FLOAT(0.0), 20, 0) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim03) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledAnims))) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledDefenseTable))) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 15) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -7) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, FALSE) - EVT_CALL(N(SetSpinSmashable), FALSE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_Toppled, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim07) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) + Thread + Set(LVar0, 0) + Loop(5) + Add(LVar0, -36) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.3)) + Sub(LVar1, 6) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(N(StartRumbleWithParams), 200, 10) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + EndThread + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 40, 8, Float(0.0), 20, 0) + Call(SetActorPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim03) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledAnims))) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledDefenseTable))) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 15) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -7) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, FALSE) + Call(N(SetSpinSmashable), FALSE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CALL(GetLastElement, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_FLAG(DAMAGE_TYPE_BLAST) - EVT_EXEC_WAIT(N(EVS_FlipOver)) - EVT_CASE_DEFAULT - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim09) - EVT_ELSE - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim08) - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_SWITCH - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_CALL(GetLastElement, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_FLAG(DAMAGE_TYPE_BLAST) - EVT_EXEC_WAIT(N(EVS_FlipOver)) - EVT_CASE_DEFAULT - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION, TRUE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim09) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim08) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_END_IF - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION, FALSE) - EVT_END_SWITCH - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim09) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim08) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_END_IF - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim09) - EVT_ELSE - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim08) - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_END_IF - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_STAR_BEAM) - EVT_CASE_EQ(EVENT_SPIKE_TAUNT) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim18) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, -3) - EVT_ADD(LVar1, 10) - EVT_ELSE - EVT_ADD(LVar0, -8) - EVT_ADD(LVar1, 27) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) - EVT_WAIT(20) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim03) - EVT_ELSE - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim02) - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_END_IF - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_END_IF - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim07) - EVT_SET_CONST(LVar2, ANIM_Cleft_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim0F) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim0F) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Anim08) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + Call(GetLastElement, LVar0) + Switch(LVar0) + CaseFlag(DAMAGE_TYPE_BLAST) + ExecWait(N(EVS_FlipOver)) + CaseDefault + Call(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) + IfEq(LVar0, 1) + SetConst(LVar1, ANIM_Cleft_Anim09) + Else + SetConst(LVar1, ANIM_Cleft_Anim08) + EndIf + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_Hit) + EndSwitch + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + Call(GetLastElement, LVar0) + Switch(LVar0) + CaseFlag(DAMAGE_TYPE_BLAST) + ExecWait(N(EVS_FlipOver)) + CaseDefault + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION, TRUE) + Call(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) + IfEq(LVar0, 1) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Anim09) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Anim08) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + EndIf + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION, FALSE) + EndSwitch + CaseEq(EVENT_BURN_DEATH) + Call(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) + IfEq(LVar0, 1) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Anim09) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Anim09) + ExecWait(EVS_Enemy_Death) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Anim08) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Anim08) + ExecWait(EVS_Enemy_Death) + EndIf + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + Call(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) + IfEq(LVar0, 1) + SetConst(LVar1, ANIM_Cleft_Anim09) + Else + SetConst(LVar1, ANIM_Cleft_Anim08) + EndIf + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + Call(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) + IfEq(LVar0, 1) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Anim09) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Anim09) + ExecWait(EVS_Enemy_Death) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Anim08) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Anim08) + ExecWait(EVS_Enemy_Death) + EndIf + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Anim08) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Anim08) + ExecWait(EVS_Enemy_Knockback) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Anim07) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Anim08) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Anim08) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_STAR_BEAM) + CaseEq(EVENT_SPIKE_TAUNT) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim18) + EndIf + Wait(10) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar0, -3) + Add(LVar1, 10) + Else + Add(LVar0, -8) + Add(LVar1, 27) + EndIf + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) + Wait(20) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + Call(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) + IfEq(LVar0, 1) + SetConst(LVar1, ANIM_Cleft_Anim03) + Else + SetConst(LVar1, ANIM_Cleft_Anim02) + EndIf + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + Call(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) + IfEq(LVar0, 1) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Anim09) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Anim09) + ExecWait(EVS_Enemy_Death) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Anim08) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Anim08) + ExecWait(EVS_Enemy_Death) + EndIf + Return + CaseEq(EVENT_RECOVER_STATUS) + Call(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) + IfEq(LVar0, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Anim02) + ExecWait(EVS_Enemy_Recover) + EndIf + CaseEq(EVENT_SCARE_AWAY) + Call(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) + IfEq(LVar0, 1) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Anim03) + ExecWait(EVS_Enemy_NoDamageHit) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Anim07) + SetConst(LVar2, ANIM_Cleft_Anim08) + ExecWait(EVS_Enemy_ScareAway) + Return + EndIf + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Anim0F) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + Call(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) + IfEq(LVar0, 1) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Anim0F) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Anim08) + EndIf + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TryGettingUp) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(3.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim03) - EVT_WAIT(20) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim05) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_SUB(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) - EVT_ELSE - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim03) - EVT_THREAD - EVT_WAIT(3) - EVT_LOOP(5) - EVT_ADD(LVar0, 36) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 6) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.3)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(N(StartRumbleWithParams), 200, 10) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Toppled, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim02) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(UprightAnims))) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(UprightDefenseTable))) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 22) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -10) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, TRUE) - EVT_WAIT(1) - EVT_CALL(N(SetSpinSmashable), TRUE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, FALSE) - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(3.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim03) + Wait(20) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim05) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) + IfGt(LVar0, 0) + Sub(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) + Else + Call(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim03) + Thread + Wait(3) + Loop(5) + Add(LVar0, 36) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 6) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.3)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(N(StartRumbleWithParams), 200, 10) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + EndThread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(SetActorVar, ACTOR_SELF, AVAR_Toppled, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim02) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(UprightAnims))) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(UprightDefenseTable))) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 22) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -10) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, TRUE) + Wait(1) + Call(N(SetSpinSmashable), TRUE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, FALSE) + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_Tackle) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(MoveBattleCamOver, 30) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(10) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim10) - EVT_WAIT(10) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim11) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, -5) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim00) - EVT_WAIT(8) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CLEFT_TACKLE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, DMG_TACKLE, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_THREAD - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim11) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 100) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, 45) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim08) - EVT_WAIT(15) - EVT_WAIT(8) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim07) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim02) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim11) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim02) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 15) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.4)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim02) - EVT_WAIT(5) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim07) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim02) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(MoveBattleCamOver, 30) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(10) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(5) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim10) + Wait(10) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim11) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, -5) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim00) + Wait(8) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CLEFT_TACKLE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, DMG_TACKLE, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + IfEq(LVarA, HIT_RESULT_LUCKY) + Thread + Wait(10) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndThread + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim11) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 100) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, 45) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim08) + Wait(15) + Wait(8) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, 0) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim07) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim02) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim11) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(ResetAllActorSounds, ACTOR_SELF) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim02) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 15) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.4)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim02) + Wait(5) + Call(YieldTurn) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim07) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Anim02) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_EXEC_WAIT(N(EVS_TryGettingUp)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_Tackle)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) + IfEq(LVar0, TRUE) + ExecWait(N(EVS_TryGettingUp)) + Else + ExecWait(N(EVS_Attack_Tackle)) + EndIf + Return + End }; diff --git a/src/battle/common/actor/clubba.inc.c b/src/battle/common/actor/clubba.inc.c index 3f1a951a8c5..532bf50c93d 100644 --- a/src/battle/common/actor/clubba.inc.c +++ b/src/battle/common/actor/clubba.inc.c @@ -99,196 +99,196 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Anim06) - EVT_SET_CONST(LVar2, ANIM_BattleClubba_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Anim06) - EVT_SET_CONST(LVar2, ANIM_BattleClubba_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Anim02) - EVT_SET_CONST(LVar2, ANIM_BattleClubba_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Anim04) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Anim06) + SetConst(LVar2, ANIM_BattleClubba_Anim07) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Anim06) + SetConst(LVar2, ANIM_BattleClubba_Anim07) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Anim07) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Anim04) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Anim04) + ExecWait(EVS_Enemy_Knockback) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Anim02) + ExecWait(EVS_Enemy_ReturnHome) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Anim04) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Anim04) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Anim02) + SetConst(LVar2, ANIM_BattleClubba_Anim04) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Anim04) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Anim04) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 27) - EVT_SET(LVar1, 0) - EVT_SUB(LVar2, 6) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(15) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Anim02) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(AddGoalPos, ACTOR_SELF, 27, 0, -6) - EVT_ELSE - EVT_CALL(AddGoalPos, ACTOR_SELF, 10, 0, -6) - EVT_END_IF - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Anim01) - EVT_WAIT(10) - EVT_END_IF - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CLUBBA_SWING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Anim08) - EVT_WAIT(10) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_WAIT(20) - EVT_END_IF - EVT_CALL(YieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Anim09) - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CLUBBA_SWING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Anim0A) - EVT_WAIT(2) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SWING, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.5)) - EVT_END_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(19) - EVT_CALL(YieldTurn) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 27) + Set(LVar1, 0) + Sub(LVar2, 6) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Wait(15) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Anim02) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(AddGoalPos, ACTOR_SELF, 27, 0, -6) + Else + Call(AddGoalPos, ACTOR_SELF, 10, 0, -6) + EndIf + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Anim01) + Wait(10) + EndIf + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CLUBBA_SWING) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Anim08) + Wait(10) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + Wait(20) + EndIf + Call(YieldTurn) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Anim02) + ExecWait(EVS_Enemy_ReturnHome) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Anim09) + Wait(15) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CLUBBA_SWING) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Anim0A) + Wait(2) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SWING, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.5)) + EndThread + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(19) + Call(YieldTurn) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Anim02) + ExecWait(EVS_Enemy_ReturnHome) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/crazee_dayzee.inc.c b/src/battle/common/actor/crazee_dayzee.inc.c index bac889febc9..9abaf488db7 100644 --- a/src/battle/common/actor/crazee_dayzee.inc.c +++ b/src/battle/common/actor/crazee_dayzee.inc.c @@ -100,294 +100,294 @@ s32 N(DefaultAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Anim03) + ExecWait(EVS_Enemy_ReturnHome) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim09) - EVT_SET_CONST(LVar2, ANIM_Dayzee_Anim0A) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim09) - EVT_SET_CONST(LVar2, ANIM_Dayzee_Anim0A) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim0A) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim04) - EVT_SET_CONST(LVar2, ANIM_Dayzee_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) - EVT_ELSE - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Dayzee_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Anim08) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Anim09) + SetConst(LVar2, ANIM_Dayzee_Anim0A) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Anim09) + SetConst(LVar2, ANIM_Dayzee_Anim0A) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Anim0A) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Anim08) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Anim08) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Anim08) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Anim08) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Anim08) + ExecWait(EVS_Enemy_Knockback) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Anim08) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Anim08) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Anim08) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Anim08) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Anim04) + SetConst(LVar2, ANIM_Dayzee_Anim08) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Anim04) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) + Else + Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) + EndIf + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Dayzee_Anim08) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_Sing) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorPos, ACTOR_SELF, -20, LVar1, LVar2) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(MoveBattleCamOver, 70) - EVT_SET(LFlag0, FALSE) - EVT_LABEL(0) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Anim0E) - EVT_SET(LFlag0, TRUE) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Anim0F) - EVT_SET(LFlag0, FALSE) - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_IF_GT(LVar0, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Anim0E) - EVT_SET(LFlag0, TRUE) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Anim0F) - EVT_SET(LFlag0, FALSE) - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(SetGoalPos, ACTOR_SELF, -35, 0, 10) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Anim01) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Anim06) - EVT_WAIT(40) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Anim07) - EVT_END_THREAD - EVT_WAIT(20) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_DAYZEE_SONG) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 25) - EVT_ADD(LVar2, 2) - EVT_LOOP(13) - EVT_CALL(RandInt, 30, LVar3) - EVT_SUB(LVar3, 15) - EVT_ADD(LVar3, LVar0) - EVT_PLAY_EFFECT(EFFECT_MUSIC_NOTE, 1, LVar3, LVar1, LVar2, 0) - EVT_WAIT(10) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Anim01) - EVT_WAIT(10) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(15) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, DMG_STATUS_KEY(STATUS_FLAG_SLEEP, 3, 20), DMG_SING, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_WAIT(20) - EVT_CALL(YieldTurn) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorPos, ACTOR_SELF, -20, LVar1, LVar2) + Else + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(MoveBattleCamOver, 70) + Set(LFlag0, FALSE) + Label(0) + IfEq(LFlag0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Anim0E) + Set(LFlag0, TRUE) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Anim0F) + Set(LFlag0, FALSE) + EndIf + Wait(1) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + IfGt(LVar0, 0) + Goto(0) + EndIf + IfEq(LFlag0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Anim0E) + Set(LFlag0, TRUE) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Anim0F) + Set(LFlag0, FALSE) + EndIf + Wait(1) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(SetGoalPos, ACTOR_SELF, -35, 0, 10) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Anim01) + Wait(10) + Thread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Anim06) + Wait(40) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Anim07) + EndThread + Wait(20) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_DAYZEE_SONG) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 25) + Add(LVar2, 2) + Loop(13) + Call(RandInt, 30, LVar3) + Sub(LVar3, 15) + Add(LVar3, LVar0) + PlayEffect(EFFECT_MUSIC_NOTE, 1, LVar3, LVar1, LVar2, 0) + Wait(10) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Anim01) + Wait(10) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(15) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + ExecWait(N(EVS_ReturnHome)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, DMG_STATUS_KEY(STATUS_FLAG_SLEEP, 3, 20), DMG_SING, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Wait(20) + Call(YieldTurn) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Move_Flee) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(SetBattleCamOffsetZ, 30) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Anim03) - EVT_WAIT(10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Anim04) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(12.0)) - EVT_ADD(LVar0, 200) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_BATTLE_FLED, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamZoom, 300) + Call(SetBattleCamOffsetZ, 30) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(MoveBattleCamOver, 30) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Anim03) + Wait(10) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(1.0)) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Dayzee_Anim04) + Call(SetActorSpeed, ACTOR_SELF, Float(12.0)) + Add(LVar0, 200) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Call(SetBattleFlagBits, BS_FLAGS1_BATTLE_FLED, TRUE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Call(RemoveActor, ACTOR_SELF) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_Attack_Sing)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_CALL(RandInt, 100, LVar1) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(1) - EVT_IF_LT(LVar1, 80) - EVT_EXEC_WAIT(N(EVS_Move_Flee)) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(2) - EVT_IF_LT(LVar1, 40) - EVT_EXEC_WAIT(N(EVS_Move_Flee)) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(3) - EVT_IF_LT(LVar1, 20) - EVT_EXEC_WAIT(N(EVS_Move_Flee)) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(4) - EVT_IF_LT(LVar1, 10) - EVT_EXEC_WAIT(N(EVS_Move_Flee)) - EVT_RETURN - EVT_END_IF - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_Attack_Sing)) - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + ExecWait(N(EVS_Attack_Sing)) + Return + EndIf + Call(GetActorHP, ACTOR_SELF, LVar0) + Call(RandInt, 100, LVar1) + Switch(LVar0) + CaseEq(1) + IfLt(LVar1, 80) + ExecWait(N(EVS_Move_Flee)) + Return + EndIf + CaseEq(2) + IfLt(LVar1, 40) + ExecWait(N(EVS_Move_Flee)) + Return + EndIf + CaseEq(3) + IfLt(LVar1, 20) + ExecWait(N(EVS_Move_Flee)) + Return + EndIf + CaseEq(4) + IfLt(LVar1, 10) + ExecWait(N(EVS_Move_Flee)) + Return + EndIf + EndSwitch + ExecWait(N(EVS_Attack_Sing)) + Return + End }; diff --git a/src/battle/common/actor/dark_koopa.inc.c b/src/battle/common/actor/dark_koopa.inc.c index d14ac8e0308..c866ea7aade 100644 --- a/src/battle/common/actor/dark_koopa.inc.c +++ b/src/battle/common/actor/dark_koopa.inc.c @@ -176,732 +176,732 @@ s32 N(ToppledAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 300) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) - EVT_ELSE - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Hyper) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(HyperAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Scramble) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, FALSE) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 300) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) + Else + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Hyper) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(HyperAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Scramble) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, FALSE) + Return + End }; #include "common/battle/SetAbsoluteStatusOffsets.inc.c" EvtScript N(EVS_UpdateOffsets) = { - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_State_Normal) - EVT_CASE_OR_EQ(AVAL_State_Hyper) - EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_DIZZY) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_ELSE - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -4, 32) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -4) - EVT_CALL(N(SetAbsoluteStatusOffsets), -15, 32, 5, 32) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(AVAL_State_ToppledNormal) - EVT_CASE_OR_EQ(AVAL_State_ToppledHyper) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseOrEq(AVAL_State_Normal) + CaseOrEq(AVAL_State_Hyper) + IfFlag(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_DIZZY) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + Else + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -4, 32) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -4) + Call(N(SetAbsoluteStatusOffsets), -15, 32, 5, 32) + EndIf + EndCaseGroup + CaseOrEq(AVAL_State_ToppledNormal) + CaseOrEq(AVAL_State_ToppledHyper) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(RandInt, 80, LVarA) - EVT_ADD(LVarA, 80) - EVT_LOOP(LVarA) - EVT_LABEL(1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_EXEC_WAIT(N(EVS_UpdateOffsets)) - EVT_IF_EQ(LVar0, AVAL_State_ToppledNormal) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_IF_EQ(LVar0, AVAL_State_ToppledHyper) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_Normal) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims))) - EVT_CASE_EQ(AVAL_State_Hyper) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(HyperShuffleAnims))) - EVT_END_SWITCH - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_Normal) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(KoopaAnims))) - EVT_CASE_EQ(AVAL_State_Hyper) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(HyperAnims))) - EVT_CASE_OR_EQ(AVAL_State_ToppledNormal) - EVT_CASE_OR_EQ(AVAL_State_ToppledHyper) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledAnims))) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_LOOP(20) - EVT_LABEL(2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_EXEC_WAIT(N(EVS_UpdateOffsets)) - EVT_IF_EQ(LVar0, AVAL_State_ToppledNormal) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_IF_EQ(LVar0, AVAL_State_ToppledHyper) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_Normal) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims))) - EVT_CASE_EQ(AVAL_State_Hyper) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(HyperShuffleAnims))) - EVT_END_SWITCH - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_Normal) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(KoopaAnims))) - EVT_CASE_EQ(AVAL_State_Hyper) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(HyperAnims))) - EVT_CASE_OR_EQ(AVAL_State_ToppledNormal) - EVT_CASE_OR_EQ(AVAL_State_ToppledHyper) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledAnims))) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_LOOP(50) - EVT_LABEL(3) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_EXEC_WAIT(N(EVS_UpdateOffsets)) - EVT_IF_EQ(LVar0, AVAL_State_ToppledNormal) - EVT_WAIT(1) - EVT_GOTO(3) - EVT_END_IF - EVT_IF_EQ(LVar0, AVAL_State_ToppledHyper) - EVT_WAIT(1) - EVT_GOTO(3) - EVT_END_IF - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(3) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_Hyper) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, TRUE) - EVT_THREAD - EVT_CALL(MakeLerp, 720, 0, 30, EASING_COS_IN_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_IF_EQ(LVar1, 1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, LVar2) - EVT_IF_EQ(LVar2, 1) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, FALSE) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_END_THREAD - EVT_WAIT(8) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, WHIRLWIND_DECOR_IDX, ACTOR_DECORATION_WHIRLWIND) - EVT_WAIT(15) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, WHIRLWIND_DECOR_IDX) - EVT_WAIT(8) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, FALSE) - EVT_CASE_EQ(AVAL_State_Normal) - EVT_CASE_EQ(AVAL_State_ToppledNormal) - EVT_CASE_EQ(AVAL_State_ToppledHyper) - EVT_END_SWITCH - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(RandInt, 80, LVarA) + Add(LVarA, 80) + Loop(LVarA) + Label(1) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + ExecWait(N(EVS_UpdateOffsets)) + IfEq(LVar0, AVAL_State_ToppledNormal) + Wait(1) + Goto(1) + EndIf + IfEq(LVar0, AVAL_State_ToppledHyper) + Wait(1) + Goto(1) + EndIf + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(1) + EndIf + Wait(1) + EndLoop + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_Normal) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims))) + CaseEq(AVAL_State_Hyper) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(HyperShuffleAnims))) + EndSwitch + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_Normal) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(KoopaAnims))) + CaseEq(AVAL_State_Hyper) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(HyperAnims))) + CaseOrEq(AVAL_State_ToppledNormal) + CaseOrEq(AVAL_State_ToppledHyper) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledAnims))) + EndCaseGroup + EndSwitch + Loop(20) + Label(2) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + ExecWait(N(EVS_UpdateOffsets)) + IfEq(LVar0, AVAL_State_ToppledNormal) + Wait(1) + Goto(2) + EndIf + IfEq(LVar0, AVAL_State_ToppledHyper) + Wait(1) + Goto(2) + EndIf + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(2) + EndIf + Wait(1) + EndLoop + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_Normal) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims))) + CaseEq(AVAL_State_Hyper) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(HyperShuffleAnims))) + EndSwitch + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_Normal) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(KoopaAnims))) + CaseEq(AVAL_State_Hyper) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(HyperAnims))) + CaseOrEq(AVAL_State_ToppledNormal) + CaseOrEq(AVAL_State_ToppledHyper) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledAnims))) + EndCaseGroup + EndSwitch + Loop(50) + Label(3) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + ExecWait(N(EVS_UpdateOffsets)) + IfEq(LVar0, AVAL_State_ToppledNormal) + Wait(1) + Goto(3) + EndIf + IfEq(LVar0, AVAL_State_ToppledHyper) + Wait(1) + Goto(3) + EndIf + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(3) + EndIf + Wait(1) + EndLoop + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_Hyper) + Call(SetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, TRUE) + Thread + Call(MakeLerp, 720, 0, 30, EASING_COS_IN_OUT) + Label(10) + Call(UpdateLerp) + Call(SetActorYaw, ACTOR_SELF, LVar0) + IfEq(LVar1, 1) + Call(GetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, LVar2) + IfEq(LVar2, 1) + Wait(1) + Goto(10) + EndIf + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, FALSE) + Call(SetActorYaw, ACTOR_SELF, 0) + EndThread + Wait(8) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, WHIRLWIND_DECOR_IDX, ACTOR_DECORATION_WHIRLWIND) + Wait(15) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, WHIRLWIND_DECOR_IDX) + Wait(8) + Call(SetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, FALSE) + CaseEq(AVAL_State_Normal) + CaseEq(AVAL_State_ToppledNormal) + CaseEq(AVAL_State_ToppledHyper) + EndSwitch + Goto(0) + Return + End }; s32 N(FlipPosOffsets)[] = { 9, 16, 22, 26, 30, 32, 33, 32, 30, 26, 22, 16, 9, 0, 4, 6, 7, 6, 4, 0, 2, 0 }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, WHIRLWIND_DECOR_IDX) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, FALSE) - EVT_END_IF - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_KoopaTroopa_Dark_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_KoopaTroopa_Dark_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_FLIP_TRIGGER) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_Normal) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_ToppledNormal) - EVT_CASE_EQ(AVAL_State_Hyper) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_ToppledHyper) - EVT_END_SWITCH - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 1) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledDefenseTable))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledAnims))) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Hurt) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_THREAD - EVT_WAIT(4) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 30) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -30) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -60) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -75) - EVT_WAIT(1) - EVT_END_THREAD - EVT_USE_BUF(N(FlipPosOffsets)) - EVT_LOOP(ARRAY_COUNT(N(FlipPosOffsets))) - EVT_BUF_READ1(LVar0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ToppleStruggle) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(0.5)) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Run) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_State_Normal) - EVT_CASE_OR_EQ(AVAL_State_Hyper) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_ShellEnter) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit) - EVT_WAIT(10) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(AVAL_State_ToppledNormal) - EVT_CASE_OR_EQ(AVAL_State_ToppledHyper) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_ToppleStruggle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Normal) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Run) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Normal) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Scramble) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_END_IF - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_State_Normal) - EVT_CASE_OR_EQ(AVAL_State_Hyper) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Run) - EVT_SET_CONST(LVar2, ANIM_KoopaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(AVAL_State_ToppledNormal) - EVT_CASE_OR_EQ(AVAL_State_ToppledHyper) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_ToppleStruggle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_State_Normal) - EVT_CASE_OR_EQ(AVAL_State_Hyper) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Panic) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(AVAL_State_ToppledNormal) - EVT_CASE_OR_EQ(AVAL_State_ToppledHyper) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_ToppleStruggle) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_State_Normal) - EVT_CASE_OR_EQ(AVAL_State_Hyper) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Panic) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(AVAL_State_ToppledNormal) - EVT_CASE_OR_EQ(AVAL_State_ToppledHyper) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_ToppleStruggle) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_State_Normal) - EVT_CASE_OR_EQ(AVAL_State_Hyper) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(AVAL_State_ToppledNormal) - EVT_CASE_OR_EQ(AVAL_State_ToppledHyper) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_ToppleStruggle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, LVar0) + IfEq(LVar0, TRUE) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, WHIRLWIND_DECOR_IDX) + Call(SetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, FALSE) + EndIf + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_BurnHurt) + SetConst(LVar2, ANIM_KoopaTroopa_Dark_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_BurnHurt) + SetConst(LVar2, ANIM_KoopaTroopa_Dark_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_FLIP_TRIGGER) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_Normal) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_ToppledNormal) + CaseEq(AVAL_State_Hyper) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_ToppledHyper) + EndSwitch + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 1) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledDefenseTable))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledAnims))) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Hurt) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Thread + Wait(4) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 30) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -30) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -60) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -75) + Wait(1) + EndThread + UseBuf(N(FlipPosOffsets)) + Loop(ARRAY_COUNT(N(FlipPosOffsets))) + BufRead1(LVar0) + Call(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ToppleStruggle) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(0.5)) + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_Knockback) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Run) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_State_Normal) + CaseOrEq(AVAL_State_Hyper) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_ShellEnter) + ExecWait(EVS_Enemy_NoDamageHit) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit) + Wait(10) + EndIf + EndCaseGroup + CaseOrEq(AVAL_State_ToppledNormal) + CaseOrEq(AVAL_State_ToppledHyper) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_ToppleStruggle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + EndSwitch + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + IfEq(LVar0, AVAL_State_Normal) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Run) + ExecWait(EVS_Enemy_ReturnHome) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + IfEq(LVar0, AVAL_State_Normal) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Scramble) + ExecWait(EVS_Enemy_Recover) + EndIf + CaseEq(EVENT_SCARE_AWAY) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_State_Normal) + CaseOrEq(AVAL_State_Hyper) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Run) + SetConst(LVar2, ANIM_KoopaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + EndCaseGroup + CaseOrEq(AVAL_State_ToppledNormal) + CaseOrEq(AVAL_State_ToppledHyper) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_ToppleStruggle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + EndSwitch + CaseEq(EVENT_BEGIN_AIR_LIFT) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_State_Normal) + CaseOrEq(AVAL_State_Hyper) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Panic) + EndCaseGroup + CaseOrEq(AVAL_State_ToppledNormal) + CaseOrEq(AVAL_State_ToppledHyper) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_ToppleStruggle) + EndCaseGroup + EndSwitch + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_State_Normal) + CaseOrEq(AVAL_State_Hyper) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Panic) + EndCaseGroup + CaseOrEq(AVAL_State_ToppledNormal) + CaseOrEq(AVAL_State_ToppledHyper) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_ToppleStruggle) + EndCaseGroup + EndSwitch + ExecWait(EVS_Enemy_BlowAway) + Return + CaseEq(EVENT_AIR_LIFT_FAILED) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_State_Normal) + CaseOrEq(AVAL_State_Hyper) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseOrEq(AVAL_State_ToppledNormal) + CaseOrEq(AVAL_State_ToppledHyper) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_ToppleStruggle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + EndSwitch + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_ShellToss) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellSpin) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellEnter) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 4) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(3) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_SPIN) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellSpin) - EVT_WAIT(10) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_TOSS) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_CALL(AddGoalPos, ACTOR_SELF, -40, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(16.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit) - EVT_WAIT(8) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_WAIT(4) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_BeginPanic1) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_BeginPanic2) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Panic) - EVT_WAIT(6) - EVT_SUB(LVar1, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Panic) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Idle) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(16.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_STATUS_ALWAYS_HITS, SUPPRESS_EVENT_ALL, 0, DMG_SHELL_TOSS, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit) - EVT_WAIT(8) - EVT_CALL(YieldTurn) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Run) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Idle) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellSpin) + Else + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellEnter) + Wait(10) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 4) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(3) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(2) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + EndThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_SPIN) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellSpin) + Wait(10) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_TOSS) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + Call(AddGoalPos, ACTOR_SELF, -40, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(16.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit) + Wait(8) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetActorYaw, ACTOR_SELF, 180) + Wait(4) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_BeginPanic1) + Wait(1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_BeginPanic2) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Panic) + Wait(6) + Sub(LVar1, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX, ACTOR_DECORATION_SWEAT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Panic) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Idle) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(16.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(ResetAllActorSounds, ACTOR_SELF) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_STATUS_ALWAYS_HITS, SUPPRESS_EVENT_ALL, 0, DMG_SHELL_TOSS, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit) + Wait(8) + Call(YieldTurn) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Run) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Idle) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_Whirlwind) = { - EVT_LABEL(10) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, TRUE) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(AddGoalPos, ACTOR_SELF, 8, 0, 0) - EVT_ELSE - EVT_CALL(AddGoalPos, ACTOR_SELF, 20, 0, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Run) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Scramble) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellEnter) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 4) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(3) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_SPIN) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellSpin) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_DIZZY_SHELL) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, WHIRLWIND_DECOR_IDX, ACTOR_DECORATION_WHIRLWIND) - EVT_WAIT(40) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, 0, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, WHIRLWIND_DECOR_IDX) - EVT_WAIT(10) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Panic) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Scramble) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENT_ALL, DMG_STATUS_KEY(STATUS_FLAG_DIZZY, 2, 60), 0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_THREAD - EVT_CALL(WasStatusInflicted, ACTOR_SELF, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(MakeLerp, 0, 1080, 30, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, WHIRLWIND_DECOR_IDX) - EVT_WAIT(10) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Run) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Scramble) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Label(10) + Call(GetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, LVar0) + Wait(1) + IfEq(LVar0, TRUE) + Goto(10) + EndIf + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(AddGoalPos, ACTOR_SELF, 8, 0, 0) + Else + Call(AddGoalPos, ACTOR_SELF, 20, 0, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Run) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Scramble) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellEnter) + Wait(10) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 4) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(3) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(2) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + EndThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_SPIN) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellSpin) + Wait(20) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_DIZZY_SHELL) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, WHIRLWIND_DECOR_IDX, ACTOR_DECORATION_WHIRLWIND) + Wait(40) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, 0, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, WHIRLWIND_DECOR_IDX) + Wait(10) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX, ACTOR_DECORATION_SWEAT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Panic) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Scramble) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX) + Call(SetActorYaw, ACTOR_SELF, 0) + Return + EndCaseGroup + EndSwitch + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENT_ALL, DMG_STATUS_KEY(STATUS_FLAG_DIZZY, 2, 60), 0, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Thread + Call(WasStatusInflicted, ACTOR_SELF, LVar0) + IfEq(LVar0, 1) + Call(MakeLerp, 0, 1080, 30, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(SetActorYaw, ACTOR_PLAYER, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + EndIf + EndThread + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, WHIRLWIND_DECOR_IDX) + Wait(10) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Run) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Scramble) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TryGettingUp) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) - EVT_SUB(LVar0, 1) - EVT_IF_GT(LVar0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_WAIT(30) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(0.5)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX) - EVT_ELSE - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_WAIT(20) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(0.5)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_JUMP) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ToppleStruggle) - EVT_SET(LVar0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_THREAD - EVT_LOOP(5) - EVT_ADD(LVar0, 15) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(UprightDefenseTable))) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -4, 32) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -4) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, FALSE) - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_ToppledNormal) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(KoopaAnims))) - EVT_CASE_EQ(AVAL_State_ToppledHyper) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Hyper) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(HyperAnims))) - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) + Sub(LVar0, 1) + IfGt(LVar0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Wait(30) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(0.5)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX) + Else + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Wait(20) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(0.5)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_JUMP) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ToppleStruggle) + Set(LVar0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Thread + Loop(5) + Add(LVar0, 15) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(3.0)) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(UprightDefenseTable))) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -4, 32) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -4) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, FALSE) + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_ToppledNormal) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(KoopaAnims))) + CaseEq(AVAL_State_ToppledHyper) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Hyper) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(HyperAnims))) + EndSwitch + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_Normal) - EVT_EXEC_WAIT(N(EVS_Attack_ShellToss)) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 300) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(KoopaAnims))) - EVT_ELSE - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Hyper) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(HyperAnims))) - EVT_END_IF - EVT_CASE_EQ(AVAL_State_Hyper) - EVT_EXEC_WAIT(N(EVS_Attack_Whirlwind)) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 300) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(KoopaAnims))) - EVT_ELSE - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Hyper) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(HyperAnims))) - EVT_END_IF - EVT_CASE_OR_EQ(AVAL_State_ToppledNormal) - EVT_CASE_OR_EQ(AVAL_State_ToppledHyper) - EVT_EXEC_WAIT(N(EVS_TryGettingUp)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_Normal) + ExecWait(N(EVS_Attack_ShellToss)) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 300) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(KoopaAnims))) + Else + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Hyper) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(HyperAnims))) + EndIf + CaseEq(AVAL_State_Hyper) + ExecWait(N(EVS_Attack_Whirlwind)) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 300) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(KoopaAnims))) + Else + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Hyper) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(HyperAnims))) + EndIf + CaseOrEq(AVAL_State_ToppledNormal) + CaseOrEq(AVAL_State_ToppledHyper) + ExecWait(N(EVS_TryGettingUp)) + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/battle/common/actor/dark_paratroopa.inc.c b/src/battle/common/actor/dark_paratroopa.inc.c index e5672995739..8045bbfc4c3 100644 --- a/src/battle/common/actor/dark_paratroopa.inc.c +++ b/src/battle/common/actor/dark_paratroopa.inc.c @@ -219,453 +219,453 @@ s32 N(WingAnims)[] = { }; EvtScript N(EVS_HandlePhase_Flying) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TriggeredFall, FALSE) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_TriggeredFall, FALSE) + Return + End }; EvtScript N(EVS_Init_Flying) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn_Flying))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle_Flying))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent_Flying))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase_Flying))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TriggeredFall, FALSE) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn_Flying))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle_Flying))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent_Flying))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase_Flying))) + Call(SetActorVar, ACTOR_SELF, AVAR_TriggeredFall, FALSE) + Return + End }; #include "common/StartRumbleWithParams.inc.c" #include "common/battle/SetAbsoluteStatusOffsets.inc.c" EvtScript N(EVS_UpdateOffsets_Flying) = { - EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_DIZZY) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_FLYING, 0, 25) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_FLYING, 3, -6) - EVT_CALL(N(SetAbsoluteStatusOffsets), -19, 25, 4, 28) - EVT_ELSE - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_FLYING, -2, 36) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_FLYING, 0, -7) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 29, 8, 30) - EVT_END_IF - EVT_RETURN - EVT_END + IfFlag(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_DIZZY) + Call(SetTargetOffset, ACTOR_SELF, PRT_FLYING, 0, 25) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_FLYING, 3, -6) + Call(N(SetAbsoluteStatusOffsets), -19, 25, 4, 28) + Else + Call(SetTargetOffset, ACTOR_SELF, PRT_FLYING, -2, 36) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_FLYING, 0, -7) + Call(N(SetAbsoluteStatusOffsets), -10, 29, 8, 30) + EndIf + Return + End }; EvtScript N(EVS_Idle_Flying) = { - EVT_LABEL(10) - EVT_CALL(RandInt, 80, LVar0) - EVT_ADD(LVar0, 80) - EVT_LOOP(LVar0) - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_EXEC_WAIT(N(EVS_UpdateOffsets_Flying)) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(0.6)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, EVT_PTR(N(FlyingShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(FlyingAnims))) - EVT_LOOP(20) - EVT_LABEL(1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_EXEC_WAIT(N(EVS_UpdateOffsets_Flying)) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(0.6)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, EVT_PTR(N(FlyingShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, EVT_PTR(N(FlyingAnims))) - EVT_LOOP(40) - EVT_LABEL(2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_EXEC_WAIT(N(EVS_UpdateOffsets_Flying)) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(10) - EVT_RETURN - EVT_END + Label(10) + Call(RandInt, 80, LVar0) + Add(LVar0, 80) + Loop(LVar0) + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + ExecWait(N(EVS_UpdateOffsets_Flying)) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(0) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(0.6)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(FlyingShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(FlyingAnims))) + Loop(20) + Label(1) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + ExecWait(N(EVS_UpdateOffsets_Flying)) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(1) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(0.6)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(FlyingShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) + Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(FlyingAnims))) + Loop(40) + Label(2) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + ExecWait(N(EVS_UpdateOffsets_Flying)) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(2) + EndIf + Wait(1) + EndLoop + Goto(10) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_Idle) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_Idle) + Return + End }; EvtScript N(EVS_HandleEvent_Flying) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TriggeredFall, TRUE) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(GetEncounterTrigger, LVar0) - EVT_IF_EQ(LVar0, ENCOUNTER_TRIGGER_HAMMER) - EVT_EXEC_WAIT(N(EVS_FallDown)) - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Dark_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Dark_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_ParaTroopa_Dark_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Dark_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_ParaTroopa_Dark_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Dark_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_FALL_TRIGGER) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_FallDown)) - EVT_CASE_EQ(EVENT_15) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Dark_BurnHurt) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Dark_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_FallDown)) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Dark_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Dark_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_ZERO_DAMAGE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TriggeredFall, TRUE) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Dark_ShellEnter) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Dark_ShellEnter) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(GetEncounterTrigger, LVar0) - EVT_IF_EQ(LVar0, ENCOUNTER_TRIGGER_HAMMER) - EVT_EXEC_WAIT(N(EVS_FallDown)) - EVT_END_IF - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Dark_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0) - EVT_CALL(HPBarToCurrent, ACTOR_SELF) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Dark_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Dark_Run) - EVT_SET_CONST(LVar2, ANIM_ParaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Dark_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + Call(SetActorVar, ACTOR_SELF, AVAR_TriggeredFall, TRUE) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_HIT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_Hit) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(GetEncounterTrigger, LVar0) + IfEq(LVar0, ENCOUNTER_TRIGGER_HAMMER) + ExecWait(N(EVS_FallDown)) + EndIf + EndIf + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Dark_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Dark_BurnHurt) + SetConst(LVar2, ANIM_ParaTroopa_Dark_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Dark_BurnHurt) + SetConst(LVar2, ANIM_ParaTroopa_Dark_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Dark_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_FALL_TRIGGER) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_FallDown)) + CaseEq(EVENT_15) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ParaTroopa_Dark_BurnHurt) + SetConst(LVar1, ANIM_ParaTroopa_Dark_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_FallDown)) + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ParaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_ParaTroopa_Dark_HurtStill) + ExecWait(EVS_Enemy_Knockback) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Dark_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_ZERO_DAMAGE) + Call(SetActorVar, ACTOR_SELF, AVAR_TriggeredFall, TRUE) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Dark_ShellEnter) + ExecWait(EVS_Enemy_NoDamageHit) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Dark_ShellEnter) + ExecWait(EVS_Enemy_NoDamageHit) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(GetEncounterTrigger, LVar0) + IfEq(LVar0, ENCOUNTER_TRIGGER_HAMMER) + ExecWait(N(EVS_FallDown)) + EndIf + EndIf + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Dark_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + Call(SetActorPos, ACTOR_SELF, 20, 0, 0) + Call(HPBarToCurrent, ACTOR_SELF) + CaseEq(EVENT_END_FIRST_STRIKE) + ExecWait(N(EVS_ReturnHome)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Dark_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Dark_Run) + SetConst(LVar2, ANIM_ParaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Dark_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn_Flying) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_05) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_Run) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 40, 30, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -16, EASING_LINEAR) - EVT_CALL(UseBattleCamPresetImmediately, BTL_CAM_PRESET_01) - EVT_WAIT(5) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_Windup) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(AddGoalPos, ACTOR_SELF, 6, 6, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 0, EASING_LINEAR) - EVT_WAIT(6) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 25) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_ShellDive) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 0, EASING_LINEAR) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 10, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(8) - EVT_ADD(LVar0, 90) - EVT_IF_GE(LVar0, 360) - EVT_SUB(LVar0, 360) - EVT_END_IF - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, -10, 0) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_Hurt) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_Hurt) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 30) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_Windup) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(AddGoalPos, ACTOR_SELF, 6, 6, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 0, EASING_LINEAR) - EVT_WAIT(6) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_ShellDive) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 0, EASING_LINEAR) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_SKY_DIVE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 40, 30, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_ShellHit) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 10, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(12) - EVT_SUB(LVar0, 90) - EVT_IF_LT(LVar0, 0) - EVT_ADD(LVar0, 360) - EVT_END_IF - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, -10, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_Idle) - EVT_END_THREAD - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 30, EASING_LINEAR) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_PRESET_05) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_Run) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 40, 30, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(7.0)) + Call(FlyToGoal, ACTOR_SELF, 0, -16, EASING_LINEAR) + Call(UseBattleCamPresetImmediately, BTL_CAM_PRESET_01) + Wait(5) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_Windup) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(AddGoalPos, ACTOR_SELF, 6, 6, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(2.0)) + Call(FlyToGoal, ACTOR_SELF, 0, 0, EASING_LINEAR) + Wait(6) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Sub(LVar0, 25) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(10.0)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_ShellDive) + Call(FlyToGoal, ACTOR_SELF, 0, 0, EASING_LINEAR) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(4.0)) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 10, 0) + Set(LVar0, 0) + Loop(8) + Add(LVar0, 90) + IfGe(LVar0, 360) + Sub(LVar0, 360) + EndIf + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, -10, 0) + EndThread + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(4.0)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_Hurt) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(4.0)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_Hurt) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 30) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorYaw, ACTOR_SELF, 180) + ExecWait(N(EVS_ReturnHome)) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_Windup) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(AddGoalPos, ACTOR_SELF, 6, 6, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(2.0)) + Call(FlyToGoal, ACTOR_SELF, 0, 0, EASING_LINEAR) + Wait(6) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(10.0)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_ShellDive) + Call(FlyToGoal, ACTOR_SELF, 0, 0, EASING_LINEAR) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_SKY_DIVE, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 40, 30, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_ShellHit) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 10, 0) + Set(LVar0, 0) + Loop(12) + Sub(LVar0, 90) + IfLt(LVar0, 0) + Add(LVar0, 360) + EndIf + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, -10, 0) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Dark_Idle) + EndThread + Call(FlyToGoal, ACTOR_SELF, 0, 30, EASING_LINEAR) + Wait(10) + Call(YieldTurn) + Call(ResetAllActorSounds, ACTOR_SELF) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_FallDown) = { - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, 0, 0, 0) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_WINGS, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_PRIMARY_TARGET) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 8) - EVT_SUB(LVar2, 2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_WINGS, LVar0, LVar1, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Hurt) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TriggeredFall, LVarA) - EVT_IF_EQ(LVarA, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(N(StartRumbleWithParams), 128, 7) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_LOOP(10) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_WINGS, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_WINGS, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_WINGS, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_LOOP(10) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_WINGS, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_WINGS, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_WINGS, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_END_THREAD - EVT_CALL(N(StartRumbleWithParams), 150, 7) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) - EVT_END_IF - EVT_CALL(GetIndexFromHome, ACTOR_SELF, LVar0) - EVT_MOD(LVar0, 4) - EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVar0) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Idle) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(StatusTable))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, 0) - EVT_EXEC_WAIT(N(EVS_Init_Koopa)) - EVT_CALL(SetActorType, ACTOR_SELF, ACTOR_TYPE_DARK_KOOPA) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_IF_NE(LVarA, 0) - EVT_CALL(DispatchEvent, ACTOR_SELF, EVENT_FLIP_TRIGGER) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, 0, 0, 0) + Call(HideHealthBar, ACTOR_SELF) + Call(SetPartFlags, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET) + Call(SetPartFlags, ACTOR_SELF, PRT_WINGS, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION) + Call(SetPartFlags, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_PRIMARY_TARGET) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 8) + Sub(LVar2, 2) + Call(SetPartPos, ACTOR_SELF, PRT_WINGS, LVar0, LVar1, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Hurt) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_TriggeredFall, LVarA) + IfEq(LVarA, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(N(StartRumbleWithParams), 128, 7) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.3)) + EndThread + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Loop(10) + Call(SetPartFlagBits, ACTOR_SELF, PRT_WINGS, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_WINGS, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_SELF, PRT_WINGS, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Thread + Loop(10) + Call(SetPartFlagBits, ACTOR_SELF, PRT_WINGS, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_WINGS, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_SELF, PRT_WINGS, ACTOR_PART_FLAG_INVISIBLE, TRUE) + EndThread + Call(N(StartRumbleWithParams), 150, 7) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.3)) + EndThread + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) + EndIf + Call(GetIndexFromHome, ACTOR_SELF, LVar0) + Mod(LVar0, 4) + Call(SetGoalToIndex, ACTOR_SELF, LVar0) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Idle) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) + Call(SetStatusTable, ACTOR_SELF, Ref(N(StatusTable))) + Call(BindHandlePhase, ACTOR_SELF, 0) + ExecWait(N(EVS_Init_Koopa)) + Call(SetActorType, ACTOR_SELF, ACTOR_TYPE_DARK_KOOPA) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) + Call(HPBarToHome, ACTOR_SELF) + Call(ResetAllActorSounds, ACTOR_SELF) + IfNe(LVarA, 0) + Call(DispatchEvent, ACTOR_SELF, EVENT_FLIP_TRIGGER) + EndIf + Return + End }; // everything below this point refers to plain Dark Koopa @@ -736,729 +736,729 @@ s32 N(ToppledAnims)[] = { }; EvtScript N(EVS_Init_Koopa) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn_Koopa))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle_Koopa))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent_Koopa))) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 300) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) - EVT_ELSE - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Hyper) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(HyperAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Scramble) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, FALSE) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn_Koopa))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle_Koopa))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent_Koopa))) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 300) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) + Else + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Hyper) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(HyperAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Scramble) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, FALSE) + Return + End }; EvtScript N(EVS_UpdateOffsets_Koopa) = { - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_State_Normal) - EVT_CASE_OR_EQ(AVAL_State_Hyper) - EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_DIZZY) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_ELSE - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -4, 32) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -4) - EVT_CALL(N(SetAbsoluteStatusOffsets), -15, 32, 5, 32) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(AVAL_State_ToppledNormal) - EVT_CASE_OR_EQ(AVAL_State_ToppledHyper) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseOrEq(AVAL_State_Normal) + CaseOrEq(AVAL_State_Hyper) + IfFlag(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_DIZZY) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + Else + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -4, 32) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -4) + Call(N(SetAbsoluteStatusOffsets), -15, 32, 5, 32) + EndIf + EndCaseGroup + CaseOrEq(AVAL_State_ToppledNormal) + CaseOrEq(AVAL_State_ToppledHyper) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_Idle_Koopa) = { - EVT_LABEL(0) - EVT_CALL(RandInt, 80, LVarA) - EVT_ADD(LVarA, 80) - EVT_LOOP(LVarA) - EVT_LABEL(1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_EXEC_WAIT(N(EVS_UpdateOffsets_Koopa)) - EVT_IF_EQ(LVar0, AVAL_State_ToppledNormal) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_IF_EQ(LVar0, AVAL_State_ToppledHyper) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_Normal) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims))) - EVT_CASE_EQ(AVAL_State_Hyper) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(HyperShuffleAnims))) - EVT_END_SWITCH - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_Normal) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(KoopaAnims))) - EVT_CASE_EQ(AVAL_State_Hyper) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(HyperAnims))) - EVT_CASE_OR_EQ(AVAL_State_ToppledNormal) - EVT_CASE_OR_EQ(AVAL_State_ToppledHyper) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledAnims))) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_LOOP(20) - EVT_LABEL(2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_EXEC_WAIT(N(EVS_UpdateOffsets_Koopa)) - EVT_IF_EQ(LVar0, AVAL_State_ToppledNormal) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_IF_EQ(LVar0, AVAL_State_ToppledHyper) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_Normal) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims))) - EVT_CASE_EQ(AVAL_State_Hyper) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(HyperShuffleAnims))) - EVT_END_SWITCH - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_Normal) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(KoopaAnims))) - EVT_CASE_EQ(AVAL_State_Hyper) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(HyperAnims))) - EVT_CASE_OR_EQ(AVAL_State_ToppledNormal) - EVT_CASE_OR_EQ(AVAL_State_ToppledHyper) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledAnims))) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_LOOP(50) - EVT_LABEL(3) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_EXEC_WAIT(N(EVS_UpdateOffsets_Koopa)) - EVT_IF_EQ(LVar0, AVAL_State_ToppledNormal) - EVT_WAIT(1) - EVT_GOTO(3) - EVT_END_IF - EVT_IF_EQ(LVar0, AVAL_State_ToppledHyper) - EVT_WAIT(1) - EVT_GOTO(3) - EVT_END_IF - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(3) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_Hyper) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, TRUE) - EVT_THREAD - EVT_CALL(MakeLerp, 720, 0, 30, EASING_COS_IN_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_IF_EQ(LVar1, 1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, LVar2) - EVT_IF_EQ(LVar2, 1) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, FALSE) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_END_THREAD - EVT_WAIT(8) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, WHIRLWIND_DECOR_IDX, ACTOR_DECORATION_WHIRLWIND) - EVT_WAIT(15) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, WHIRLWIND_DECOR_IDX) - EVT_WAIT(8) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, FALSE) - EVT_CASE_EQ(AVAL_State_Normal) - EVT_CASE_EQ(AVAL_State_ToppledNormal) - EVT_CASE_EQ(AVAL_State_ToppledHyper) - EVT_END_SWITCH - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(RandInt, 80, LVarA) + Add(LVarA, 80) + Loop(LVarA) + Label(1) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + ExecWait(N(EVS_UpdateOffsets_Koopa)) + IfEq(LVar0, AVAL_State_ToppledNormal) + Wait(1) + Goto(1) + EndIf + IfEq(LVar0, AVAL_State_ToppledHyper) + Wait(1) + Goto(1) + EndIf + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(1) + EndIf + Wait(1) + EndLoop + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_Normal) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims))) + CaseEq(AVAL_State_Hyper) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(HyperShuffleAnims))) + EndSwitch + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_Normal) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(KoopaAnims))) + CaseEq(AVAL_State_Hyper) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(HyperAnims))) + CaseOrEq(AVAL_State_ToppledNormal) + CaseOrEq(AVAL_State_ToppledHyper) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledAnims))) + EndCaseGroup + EndSwitch + Loop(20) + Label(2) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + ExecWait(N(EVS_UpdateOffsets_Koopa)) + IfEq(LVar0, AVAL_State_ToppledNormal) + Wait(1) + Goto(2) + EndIf + IfEq(LVar0, AVAL_State_ToppledHyper) + Wait(1) + Goto(2) + EndIf + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(2) + EndIf + Wait(1) + EndLoop + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_Normal) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims))) + CaseEq(AVAL_State_Hyper) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(HyperShuffleAnims))) + EndSwitch + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_Normal) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(KoopaAnims))) + CaseEq(AVAL_State_Hyper) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(HyperAnims))) + CaseOrEq(AVAL_State_ToppledNormal) + CaseOrEq(AVAL_State_ToppledHyper) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledAnims))) + EndCaseGroup + EndSwitch + Loop(50) + Label(3) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + ExecWait(N(EVS_UpdateOffsets_Koopa)) + IfEq(LVar0, AVAL_State_ToppledNormal) + Wait(1) + Goto(3) + EndIf + IfEq(LVar0, AVAL_State_ToppledHyper) + Wait(1) + Goto(3) + EndIf + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(3) + EndIf + Wait(1) + EndLoop + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_Hyper) + Call(SetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, TRUE) + Thread + Call(MakeLerp, 720, 0, 30, EASING_COS_IN_OUT) + Label(10) + Call(UpdateLerp) + Call(SetActorYaw, ACTOR_SELF, LVar0) + IfEq(LVar1, 1) + Call(GetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, LVar2) + IfEq(LVar2, 1) + Wait(1) + Goto(10) + EndIf + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, FALSE) + Call(SetActorYaw, ACTOR_SELF, 0) + EndThread + Wait(8) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, WHIRLWIND_DECOR_IDX, ACTOR_DECORATION_WHIRLWIND) + Wait(15) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, WHIRLWIND_DECOR_IDX) + Wait(8) + Call(SetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, FALSE) + CaseEq(AVAL_State_Normal) + CaseEq(AVAL_State_ToppledNormal) + CaseEq(AVAL_State_ToppledHyper) + EndSwitch + Goto(0) + Return + End }; s32 N(FlipPosOffsets)[] = { 9, 16, 22, 26, 30, 32, 33, 32, 30, 26, 22, 16, 9, 0, 4, 6, 7, 6, 4, 0, 2, 0 }; EvtScript N(EVS_HandleEvent_Koopa) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, WHIRLWIND_DECOR_IDX) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, FALSE) - EVT_END_IF - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_KoopaTroopa_Dark_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_KoopaTroopa_Dark_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_FLIP_TRIGGER) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_Normal) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_ToppledNormal) - EVT_CASE_EQ(AVAL_State_Hyper) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_ToppledHyper) - EVT_END_SWITCH - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 1) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledDefenseTable))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledAnims))) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Hurt) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_THREAD - EVT_WAIT(4) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 30) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -30) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -60) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -75) - EVT_WAIT(1) - EVT_END_THREAD - EVT_USE_BUF(N(FlipPosOffsets)) - EVT_LOOP(ARRAY_COUNT(N(FlipPosOffsets))) - EVT_BUF_READ1(LVar0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ToppleStruggle) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(0.5)) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Run) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_State_Normal) - EVT_CASE_OR_EQ(AVAL_State_Hyper) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_ShellEnter) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit) - EVT_WAIT(10) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(AVAL_State_ToppledNormal) - EVT_CASE_OR_EQ(AVAL_State_ToppledHyper) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_ToppleStruggle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Normal) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Run) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Normal) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Scramble) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_END_IF - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_State_Normal) - EVT_CASE_OR_EQ(AVAL_State_Hyper) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Run) - EVT_SET_CONST(LVar2, ANIM_KoopaTroopa_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(AVAL_State_ToppledNormal) - EVT_CASE_OR_EQ(AVAL_State_ToppledHyper) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_ToppleStruggle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_State_Normal) - EVT_CASE_OR_EQ(AVAL_State_Hyper) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Panic) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(AVAL_State_ToppledNormal) - EVT_CASE_OR_EQ(AVAL_State_ToppledHyper) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_ToppleStruggle) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_State_Normal) - EVT_CASE_OR_EQ(AVAL_State_Hyper) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Panic) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(AVAL_State_ToppledNormal) - EVT_CASE_OR_EQ(AVAL_State_ToppledHyper) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_ToppleStruggle) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_State_Normal) - EVT_CASE_OR_EQ(AVAL_State_Hyper) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(AVAL_State_ToppledNormal) - EVT_CASE_OR_EQ(AVAL_State_ToppledHyper) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_ToppleStruggle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, LVar0) + IfEq(LVar0, TRUE) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, WHIRLWIND_DECOR_IDX) + Call(SetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, FALSE) + EndIf + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_BurnHurt) + SetConst(LVar2, ANIM_KoopaTroopa_Dark_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_BurnHurt) + SetConst(LVar2, ANIM_KoopaTroopa_Dark_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_FLIP_TRIGGER) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_Normal) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_ToppledNormal) + CaseEq(AVAL_State_Hyper) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_ToppledHyper) + EndSwitch + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 1) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledDefenseTable))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledAnims))) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Hurt) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Thread + Wait(4) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 30) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -30) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -60) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -75) + Wait(1) + EndThread + UseBuf(N(FlipPosOffsets)) + Loop(ARRAY_COUNT(N(FlipPosOffsets))) + BufRead1(LVar0) + Call(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ToppleStruggle) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(0.5)) + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_Knockback) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Run) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_State_Normal) + CaseOrEq(AVAL_State_Hyper) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_ShellEnter) + ExecWait(EVS_Enemy_NoDamageHit) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit) + Wait(10) + EndIf + EndCaseGroup + CaseOrEq(AVAL_State_ToppledNormal) + CaseOrEq(AVAL_State_ToppledHyper) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_ToppleStruggle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + EndSwitch + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + IfEq(LVar0, AVAL_State_Normal) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Run) + ExecWait(EVS_Enemy_ReturnHome) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + IfEq(LVar0, AVAL_State_Normal) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Scramble) + ExecWait(EVS_Enemy_Recover) + EndIf + CaseEq(EVENT_SCARE_AWAY) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_State_Normal) + CaseOrEq(AVAL_State_Hyper) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Run) + SetConst(LVar2, ANIM_KoopaTroopa_Dark_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + EndCaseGroup + CaseOrEq(AVAL_State_ToppledNormal) + CaseOrEq(AVAL_State_ToppledHyper) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_ToppleStruggle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + EndSwitch + CaseEq(EVENT_BEGIN_AIR_LIFT) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_State_Normal) + CaseOrEq(AVAL_State_Hyper) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Panic) + EndCaseGroup + CaseOrEq(AVAL_State_ToppledNormal) + CaseOrEq(AVAL_State_ToppledHyper) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_ToppleStruggle) + EndCaseGroup + EndSwitch + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_State_Normal) + CaseOrEq(AVAL_State_Hyper) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Panic) + EndCaseGroup + CaseOrEq(AVAL_State_ToppledNormal) + CaseOrEq(AVAL_State_ToppledHyper) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_ToppleStruggle) + EndCaseGroup + EndSwitch + ExecWait(EVS_Enemy_BlowAway) + Return + CaseEq(EVENT_AIR_LIFT_FAILED) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_State_Normal) + CaseOrEq(AVAL_State_Hyper) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseOrEq(AVAL_State_ToppledNormal) + CaseOrEq(AVAL_State_ToppledHyper) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_ToppleStruggle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + EndSwitch + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_ShellToss) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellSpin) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellEnter) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 4) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(3) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_SPIN) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellSpin) - EVT_WAIT(10) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_TOSS) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_CALL(AddGoalPos, ACTOR_SELF, -40, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(16.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit) - EVT_WAIT(8) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_WAIT(4) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_BeginPanic1) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_BeginPanic2) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Panic) - EVT_WAIT(6) - EVT_SUB(LVar1, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Panic) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Idle) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(16.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_STATUS_ALWAYS_HITS, SUPPRESS_EVENT_ALL, 0, DMG_SHELL_TOSS, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit) - EVT_WAIT(8) - EVT_CALL(YieldTurn) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Run) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Idle) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellSpin) + Else + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellEnter) + Wait(10) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 4) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(3) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(2) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + EndThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_SPIN) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellSpin) + Wait(10) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_TOSS) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + Call(AddGoalPos, ACTOR_SELF, -40, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(16.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit) + Wait(8) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetActorYaw, ACTOR_SELF, 180) + Wait(4) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_BeginPanic1) + Wait(1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_BeginPanic2) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Panic) + Wait(6) + Sub(LVar1, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX, ACTOR_DECORATION_SWEAT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Panic) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Idle) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(16.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(ResetAllActorSounds, ACTOR_SELF) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_STATUS_ALWAYS_HITS, SUPPRESS_EVENT_ALL, 0, DMG_SHELL_TOSS, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit) + Wait(8) + Call(YieldTurn) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Run) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Idle) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_Whirlwind) = { - EVT_LABEL(10) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, TRUE) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(AddGoalPos, ACTOR_SELF, 8, 0, 0) - EVT_ELSE - EVT_CALL(AddGoalPos, ACTOR_SELF, 20, 0, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Run) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Scramble) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellEnter) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 4) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(3) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_SPIN) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellSpin) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_DIZZY_SHELL) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, WHIRLWIND_DECOR_IDX, ACTOR_DECORATION_WHIRLWIND) - EVT_WAIT(40) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, 0, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, WHIRLWIND_DECOR_IDX) - EVT_WAIT(10) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Panic) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Scramble) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENT_ALL, DMG_STATUS_KEY(STATUS_FLAG_DIZZY, 2, 60), 0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_THREAD - EVT_CALL(WasStatusInflicted, ACTOR_SELF, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(MakeLerp, 0, 1080, 30, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, WHIRLWIND_DECOR_IDX) - EVT_WAIT(10) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Dark_Run) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Scramble) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Label(10) + Call(GetActorVar, ACTOR_SELF, AVAR_HasWhirlwind, LVar0) + Wait(1) + IfEq(LVar0, TRUE) + Goto(10) + EndIf + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(AddGoalPos, ACTOR_SELF, 8, 0, 0) + Else + Call(AddGoalPos, ACTOR_SELF, 20, 0, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Run) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Scramble) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellEnter) + Wait(10) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 4) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(3) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(2) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + EndThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_SPIN) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellSpin) + Wait(20) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_DIZZY_SHELL) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, WHIRLWIND_DECOR_IDX, ACTOR_DECORATION_WHIRLWIND) + Wait(40) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, 0, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, WHIRLWIND_DECOR_IDX) + Wait(10) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX, ACTOR_DECORATION_SWEAT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Panic) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Scramble) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX) + Call(SetActorYaw, ACTOR_SELF, 0) + Return + EndCaseGroup + EndSwitch + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENT_ALL, DMG_STATUS_KEY(STATUS_FLAG_DIZZY, 2, 60), 0, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Thread + Call(WasStatusInflicted, ACTOR_SELF, LVar0) + IfEq(LVar0, 1) + Call(MakeLerp, 0, 1080, 30, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(SetActorYaw, ACTOR_PLAYER, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + EndIf + EndThread + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ShellExit) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, WHIRLWIND_DECOR_IDX) + Wait(10) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Dark_Run) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_Scramble) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TryGettingUp) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) - EVT_SUB(LVar0, 1) - EVT_IF_GT(LVar0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_WAIT(30) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(0.5)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX) - EVT_ELSE - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_WAIT(20) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(0.5)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_JUMP) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ToppleStruggle) - EVT_SET(LVar0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_THREAD - EVT_LOOP(5) - EVT_ADD(LVar0, 15) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(UprightDefenseTable))) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -4, 32) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -4) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, FALSE) - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_ToppledNormal) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(KoopaAnims))) - EVT_CASE_EQ(AVAL_State_ToppledHyper) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Hyper) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(HyperAnims))) - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) + Sub(LVar0, 1) + IfGt(LVar0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Wait(30) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(0.5)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX) + Else + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Wait(20) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(0.5)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, SWEAT_DECOR_IDX) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_JUMP) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Dark_ToppleStruggle) + Set(LVar0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Thread + Loop(5) + Add(LVar0, 15) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(3.0)) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(UprightDefenseTable))) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -4, 32) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -4) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, FALSE) + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_ToppledNormal) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(KoopaAnims))) + CaseEq(AVAL_State_ToppledHyper) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Hyper) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(HyperAnims))) + EndSwitch + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn_Koopa) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_Normal) - EVT_EXEC_WAIT(N(EVS_Attack_ShellToss)) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 300) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(KoopaAnims))) - EVT_ELSE - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Hyper) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(HyperAnims))) - EVT_END_IF - EVT_CASE_EQ(AVAL_State_Hyper) - EVT_EXEC_WAIT(N(EVS_Attack_Whirlwind)) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 300) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(KoopaAnims))) - EVT_ELSE - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Hyper) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(HyperAnims))) - EVT_END_IF - EVT_CASE_OR_EQ(AVAL_State_ToppledNormal) - EVT_CASE_OR_EQ(AVAL_State_ToppledHyper) - EVT_EXEC_WAIT(N(EVS_TryGettingUp)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_Normal) + ExecWait(N(EVS_Attack_ShellToss)) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 300) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(KoopaAnims))) + Else + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Hyper) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(HyperAnims))) + EndIf + CaseEq(AVAL_State_Hyper) + ExecWait(N(EVS_Attack_Whirlwind)) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 300) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(KoopaAnims))) + Else + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Hyper) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(HyperAnims))) + EndIf + CaseOrEq(AVAL_State_ToppledNormal) + CaseOrEq(AVAL_State_ToppledHyper) + ExecWait(N(EVS_TryGettingUp)) + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/battle/common/actor/dry_bones.inc.c b/src/battle/common/actor/dry_bones.inc.c index 54a557a26f9..5ac5aadd655 100644 --- a/src/battle/common/actor/dry_bones.inc.c +++ b/src/battle/common/actor/dry_bones.inc.c @@ -164,396 +164,396 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Collapsed, FALSE) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_Collapsed, FALSE) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(GetOriginalActorType, ACTOR_SELF, LVarA) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetOriginalActorType, LVar0, LVar2) - EVT_IF_NE(LVar2, LVarA) - EVT_CALL(GetActorHP, LVar0, LVar3) - EVT_IF_NE(LVar3, 0) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(1) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetActorVar, LVar0, AVAR_Collapsed, LVar3) - EVT_IF_NE(LVar3, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(2) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(SetActorFlagBits, LVar0, ACTOR_FLAG_NO_ATTACK | ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(2) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetOriginalActorType, ACTOR_SELF, LVarA) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetOriginalActorType, LVar0, LVar2) + IfNe(LVar2, LVarA) + Call(GetActorHP, LVar0, LVar3) + IfNe(LVar3, 0) + Return + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(1) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetActorVar, LVar0, AVAR_Collapsed, LVar3) + IfNe(LVar3, TRUE) + Return + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(1) + EndIf + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(2) + Call(GetOwnerTarget, LVar0, LVar1) + Call(SetActorFlagBits, LVar0, ACTOR_FLAG_NO_ATTACK | ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(2) + EndIf + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Collapsed, LVar0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SWITCH(LVar1) - EVT_CASE_FLAG(STATUS_FLAG_SLEEP) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -6, 24) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 1, -5) - EVT_CASE_DEFAULT - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -8, 30) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -10) - EVT_END_SWITCH - EVT_CASE_EQ(1) - EVT_SWITCH(LVar1) - EVT_CASE_FLAG(STATUS_FLAG_SLEEP) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -1, 10) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) - EVT_CASE_DEFAULT - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -1, 10) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetActorVar, ACTOR_SELF, AVAR_Collapsed, LVar0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + Switch(LVar0) + CaseEq(0) + Switch(LVar1) + CaseFlag(STATUS_FLAG_SLEEP) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -6, 24) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 1, -5) + CaseDefault + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -8, 30) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -10) + EndSwitch + CaseEq(1) + Switch(LVar1) + CaseFlag(STATUS_FLAG_SLEEP) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -1, 10) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) + CaseDefault + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -1, 10) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) + EndSwitch + EndSwitch + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_Collapse) = { - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_DRY_BONES_COLLAPSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_DryBones_Anim08) - EVT_WAIT(20) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Collapsed, TRUE) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(CollapsedAnims))) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(CollapsedDefense))) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(CollapsedStatusTable))) - EVT_CALL(ClearStatusEffects, ACTOR_SELF) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -1, 10) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) - EVT_CALL(RandInt, 0, LVar0) - EVT_ADD(LVar0, BASE_COLLAPSE_DURATION) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CollapseTurns, LVar0) - EVT_CALL(GetOriginalActorType, ACTOR_SELF, LVarA) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetOriginalActorType, LVar0, LVar2) - EVT_IF_NE(LVar2, LVarA) - EVT_RETURN - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(1) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetActorVar, LVar0, AVAR_Collapsed, LVar3) - EVT_IF_NE(LVar3, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(2) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(SetActorFlagBits, LVar0, ACTOR_FLAG_NO_ATTACK | ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(2) - EVT_END_IF - EVT_RETURN - EVT_END + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_DRY_BONES_COLLAPSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_DryBones_Anim08) + Wait(20) + Call(SetActorVar, ACTOR_SELF, AVAR_Collapsed, TRUE) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(CollapsedAnims))) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(CollapsedDefense))) + Call(SetStatusTable, ACTOR_SELF, Ref(N(CollapsedStatusTable))) + Call(ClearStatusEffects, ACTOR_SELF) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -1, 10) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) + Call(RandInt, 0, LVar0) + Add(LVar0, BASE_COLLAPSE_DURATION) + Call(SetActorVar, ACTOR_SELF, AVAR_CollapseTurns, LVar0) + Call(GetOriginalActorType, ACTOR_SELF, LVarA) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetOriginalActorType, LVar0, LVar2) + IfNe(LVar2, LVarA) + Return + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(1) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetActorVar, LVar0, AVAR_Collapsed, LVar3) + IfNe(LVar3, TRUE) + Return + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(1) + EndIf + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(2) + Call(GetOwnerTarget, LVar0, LVar1) + Call(SetActorFlagBits, LVar0, ACTOR_FLAG_NO_ATTACK | ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(2) + EndIf + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_DryBones_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_DryBones_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION, TRUE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_DryBones_Anim0B) - EVT_SET_CONST(LVar2, ANIM_DryBones_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION, FALSE) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_DryBones_Anim0B) - EVT_SET_CONST(LVar2, ANIM_DryBones_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_DryBones_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_DryBones_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_DryBones_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_EXEC_WAIT(N(EVS_Collapse)) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Collapsed, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_DryBones_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_DryBones_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_DryBones_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Collapsed, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_Collapse)) - EVT_END_IF - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Collapsed, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_DryBones_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_END_IF - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_DryBones_Anim04) - EVT_SET_CONST(LVar2, ANIM_DryBones_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Collapsed, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_DryBones_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_DryBones_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_END_IF - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Collapsed, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, -1, -2, 0) - EVT_ELSE - EVT_CALL(SetActorDispOffset, ACTOR_SELF, -3, -5, 0) - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_DryBones_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_DryBones_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_END_IF - EVT_RETURN - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Collapsed, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_DryBones_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_DryBones_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_DryBones_Anim07) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_DryBones_Anim07) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_BURN_HIT) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION, TRUE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_DryBones_Anim0B) + SetConst(LVar2, ANIM_DryBones_Anim0C) + ExecWait(EVS_Enemy_BurnHit) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION, FALSE) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_DryBones_Anim0B) + SetConst(LVar2, ANIM_DryBones_Anim0C) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_DryBones_Anim0C) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_DryBones_Anim07) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_DryBones_Anim07) + ExecWait(EVS_Enemy_SpinSmashHit) + ExecWait(N(EVS_Collapse)) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + Call(GetActorVar, ACTOR_SELF, AVAR_Collapsed, LVar0) + IfEq(LVar0, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_DryBones_Anim02) + ExecWait(EVS_Enemy_NoDamageHit) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_DryBones_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_DryBones_Anim07) + ExecWait(EVS_Enemy_Hit) + Call(GetActorVar, ACTOR_SELF, AVAR_Collapsed, LVar0) + IfEq(LVar0, 0) + Wait(10) + ExecWait(N(EVS_Collapse)) + EndIf + CaseEq(EVENT_RECOVER_STATUS) + Call(GetActorVar, ACTOR_SELF, AVAR_Collapsed, LVar0) + IfEq(LVar0, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_DryBones_Anim02) + ExecWait(EVS_Enemy_Recover) + EndIf + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_DryBones_Anim04) + SetConst(LVar2, ANIM_DryBones_Anim07) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + Call(GetActorVar, ACTOR_SELF, AVAR_Collapsed, LVar0) + IfEq(LVar0, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_DryBones_Anim04) + ExecWait(EVS_Enemy_AirLift) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_DryBones_Anim09) + ExecWait(EVS_Enemy_AirLift) + EndIf + CaseEq(EVENT_BLOW_AWAY) + Call(GetActorVar, ACTOR_SELF, AVAR_Collapsed, LVar0) + IfEq(LVar0, 0) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetActorDispOffset, ACTOR_SELF, -1, -2, 0) + Else + Call(SetActorDispOffset, ACTOR_SELF, -3, -5, 0) + EndIf + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_DryBones_Anim07) + ExecWait(EVS_Enemy_BlowAway) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_DryBones_Anim09) + ExecWait(EVS_Enemy_BlowAway) + EndIf + Return + CaseEq(EVENT_AIR_LIFT_FAILED) + Call(GetActorVar, ACTOR_SELF, AVAR_Collapsed, LVar0) + IfEq(LVar0, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_DryBones_Anim02) + ExecWait(EVS_Enemy_NoDamageHit) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_DryBones_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_SpinBone) = { - EVT_SET(LVar0, 0) - EVT_LABEL(0) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_BONE, 0, 0, LVar0) - EVT_ADD(LVar0, 60) - EVT_MOD(LVar0, 360) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVar0, 0) + Label(0) + Call(SetPartRotation, ACTOR_SELF, PRT_BONE, 0, 0, LVar0) + Add(LVar0, 60) + Mod(LVar0, 360) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 1) - EVT_END_IF - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_DryBones_Anim06) - EVT_GOTO(100) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Collapsed, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CollapseTurns, LVar0) - EVT_SUB(LVar0, 1) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_DRY_BONES_RATTLE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_DryBones_Anim09) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_DRY_BONES_ARISE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_DryBones_Anim0A) - EVT_WAIT(20) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Collapsed, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CollapseTurns, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefenseTable))) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(StatusTable))) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_DAMAGE_IMMUNE, FALSE) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -8, 30) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -10) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar0) - EVT_CALL(SetEnemyHP, ACTOR_SELF, LVar0) - EVT_ELSE - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_DRY_BONES_RATTLE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_DryBones_Anim09) - EVT_WAIT(10) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CollapseTurns, LVar0) - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_DryBones_Anim05) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_DryBones_Anim06) - EVT_THREAD - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_DryBones_Anim02) - EVT_END_THREAD - EVT_LABEL(100) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_BONE, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_ELSE - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_BONE, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarF, LVar0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_BONE, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BONE, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_BONE, SOUND_DRY_BONES_THROW) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_BONE, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_BONE, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) - EVT_EXEC_GET_TID(N(EVS_SpinBone), LVarA) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 100) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_BONE, EVT_FLOAT(12.0)) - EVT_CALL(RunPartTo, ACTOR_SELF, PRT_BONE, LVar0, LVar1, LVar2, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BONE, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_KILL_THREAD(LVarA) - EVT_IF_EQ(LVarF, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(YieldTurn) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_WAIT(20) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_BONE, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BONE, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_BONE, SOUND_DRY_BONES_THROW) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_BONE, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_BONE, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) - EVT_EXEC_GET_TID(N(EVS_SpinBone), LVarA) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_BONE, EVT_FLOAT(12.0)) - EVT_CALL(RunPartTo, ACTOR_SELF, PRT_BONE, LVar0, LVar1, LVar2, FALSE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 4, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_BONE, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 100) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_BONE, EVT_FLOAT(0.7)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_BONE, LVar0, 0, LVar2, 30, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BONE, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_KILL_THREAD(LVarA) - EVT_CALL(YieldTurn) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 1) + EndIf + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_DryBones_Anim06) + Goto(100) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Collapsed, LVar0) + IfEq(LVar0, TRUE) + Call(GetActorVar, ACTOR_SELF, AVAR_CollapseTurns, LVar0) + Sub(LVar0, 1) + IfEq(LVar0, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_DRY_BONES_RATTLE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_DryBones_Anim09) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_DRY_BONES_ARISE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_DryBones_Anim0A) + Wait(20) + Call(SetActorVar, ACTOR_SELF, AVAR_Collapsed, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_CollapseTurns, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(DefenseTable))) + Call(SetStatusTable, ACTOR_SELF, Ref(N(StatusTable))) + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_DAMAGE_IMMUNE, FALSE) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -8, 30) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -10) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar0) + Call(SetEnemyHP, ACTOR_SELF, LVar0) + Else + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_DRY_BONES_RATTLE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_DryBones_Anim09) + Wait(10) + Call(SetActorVar, ACTOR_SELF, AVAR_CollapseTurns, LVar0) + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_DryBones_Anim05) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_DryBones_Anim06) + Thread + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_DryBones_Anim02) + EndThread + Label(100) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartScale, ACTOR_SELF, PRT_BONE, Float(0.4), Float(0.4), Float(0.4)) + Else + Call(SetPartScale, ACTOR_SELF, PRT_BONE, Float(1.0), Float(1.0), Float(1.0)) + EndIf + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarF, LVar0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(SetPartPos, ACTOR_SELF, PRT_BONE, LVar0, LVar1, LVar2) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BONE, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(PlaySoundAtPart, ACTOR_SELF, PRT_BONE, SOUND_DRY_BONES_THROW) + Call(SetPartSounds, ACTOR_SELF, PRT_BONE, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(SetPartSounds, ACTOR_SELF, PRT_BONE, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) + ExecGetTID(N(EVS_SpinBone), LVarA) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 100) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_BONE, Float(12.0)) + Call(RunPartTo, ACTOR_SELF, PRT_BONE, LVar0, LVar1, LVar2, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BONE, ACTOR_PART_FLAG_INVISIBLE, TRUE) + KillThread(LVarA) + IfEq(LVarF, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(15) + Call(YieldTurn) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Wait(20) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(SetPartPos, ACTOR_SELF, PRT_BONE, LVar0, LVar1, LVar2) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BONE, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(PlaySoundAtPart, ACTOR_SELF, PRT_BONE, SOUND_DRY_BONES_THROW) + Call(SetPartSounds, ACTOR_SELF, PRT_BONE, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(SetPartSounds, ACTOR_SELF, PRT_BONE, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) + ExecGetTID(N(EVS_SpinBone), LVarA) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_BONE, Float(12.0)) + Call(RunPartTo, ACTOR_SELF, PRT_BONE, LVar0, LVar1, LVar2, FALSE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 4, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(GetPartOffset, ACTOR_SELF, PRT_BONE, LVar0, LVar1, LVar2) + Sub(LVar0, 100) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_BONE, Float(0.7)) + Call(JumpPartTo, ACTOR_SELF, PRT_BONE, LVar0, 0, LVar2, 30, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BONE, ACTOR_PART_FLAG_INVISIBLE, TRUE) + KillThread(LVarA) + Call(YieldTurn) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/duplighost.inc.c b/src/battle/common/actor/duplighost.inc.c index 6975518177b..bd0823d2cf4 100644 --- a/src/battle/common/actor/duplighost.inc.c +++ b/src/battle/common/actor/duplighost.inc.c @@ -130,410 +130,410 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_ReadyToCopy) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_ReadyToCopy) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) - EVT_CASE_EQ(PHASE_ENEMY_END) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_WaitToTackle) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_ReadyToTackle) - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) + CaseEq(PHASE_ENEMY_BEGIN) + CaseEq(PHASE_ENEMY_END) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + IfEq(LVar0, AVAL_State_WaitToTackle) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_ReadyToTackle) + EndIf + EndSwitch + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Duplighost_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Duplighost_Anim04) + ExecWait(EVS_Enemy_ReturnHome) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Duplighost_Anim0A) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Duplighost_Anim0C) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Duplighost_Anim0C) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Duplighost_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Duplighost_Anim0A) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Duplighost_Anim0A) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Duplighost_Anim0A) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Duplighost_Anim0A) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Duplighost_Anim0A) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Duplighost_Anim0A) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Duplighost_Anim0A) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Duplighost_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Duplighost_Anim0A) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Duplighost_Anim0A) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Duplighost_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Duplighost_Anim04) - EVT_SET_CONST(LVar2, ANIM_Duplighost_Anim0A) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Duplighost_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Duplighost_Anim0A) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Duplighost_Anim0A) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Duplighost_Anim0C) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Duplighost_Anim0C) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Duplighost_Anim0C) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Duplighost_Anim0A) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Duplighost_Anim0A) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Duplighost_Anim0A) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + Call(ResetAllActorSounds, ACTOR_SELF) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Duplighost_Anim0A) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Duplighost_Anim0A) + ExecWait(EVS_Enemy_Knockback) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Duplighost_Anim0A) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Duplighost_Anim0A) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Duplighost_Anim02) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Duplighost_Anim0A) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Duplighost_Anim0A) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Duplighost_Anim02) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Duplighost_Anim04) + SetConst(LVar2, ANIM_Duplighost_Anim0A) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Duplighost_Anim04) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Duplighost_Anim0A) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_FlyingTackle) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Duplighost_Anim07) - EVT_WAIT(20) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_DUPLIGHOST_LEAP, 0) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Duplighost_Anim08) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -100, 0, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.3)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 17, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Duplighost_Anim02) - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) - EVT_WAIT(15) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Duplighost_Anim08) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_CALL(AddGoalPos, ACTOR_SELF, EVT_FLOAT(4.0), EVT_FLOAT(-6.0), 0) - EVT_ELSE - EVT_CALL(AddGoalPos, ACTOR_SELF, 10, -15, 0) - EVT_END_IF - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.3)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_FLYING_LEAP, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Duplighost_Anim09) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Duplighost_Anim07) + Wait(20) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_DUPLIGHOST_LEAP, 0) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Duplighost_Anim08) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -100, 0, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.3)) + Call(JumpToGoal, ACTOR_SELF, 17, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(10) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Duplighost_Anim02) + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) + Wait(15) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + ExecWait(N(EVS_ReturnHome)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Duplighost_Anim08) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Call(AddGoalPos, ACTOR_SELF, Float(4.0), Float(-6.0), 0) + Else + Call(AddGoalPos, ACTOR_SELF, 10, -15, 0) + EndIf + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.3)) + Call(JumpToGoal, ACTOR_SELF, 12, FALSE, TRUE, FALSE) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_FLYING_LEAP, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Duplighost_Anim09) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Wait(10) + Call(YieldTurn) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript A(EVS_Duplighost_OnDeath) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_ParentActorID, LVar0) - EVT_CALL(RemoveActor, LVar0) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_ParentActorID, LVar0) + Call(RemoveActor, LVar0) + Return + End }; EvtScript A(EVS_Duplighost_OnHitElectric) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_WAIT(30) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_ParentActorID, LVarA) - EVT_CALL(UseIdleAnimation, LVarA, FALSE) - EVT_CALL(HideHealthBar, LVarA) - EVT_CALL(CopyStatusEffects, ACTOR_SELF, LVarA) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SMOKE_BURST) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 3) - EVT_ADD(LVar2, 5) - EVT_LOOP(3) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) - EVT_WAIT(3) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(5) - EVT_CALL(GetActorHP, ACTOR_SELF, LVarB) - EVT_CALL(SetEnemyHP, LVarA, LVarB) - EVT_CALL(CopyBuffs, ACTOR_SELF, LVarA) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarB, LVarC, LVarD) - EVT_CALL(SetActorPos, LVarA, LVarB, LVarC, LVarD) - EVT_CALL(SetPartFlagBits, LVarA, 1, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, LVarA, 1, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(SetActorFlagBits, LVarA, ACTOR_FLAG_NO_SHADOW | ACTOR_FLAG_NO_DMG_APPLY, FALSE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_CALL(SetActorVar, LVarA, AVAR_State, AVAL_State_ReadyToTackle) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetIdleAnimations, LVarA, PRT_MAIN, EVT_PTR(N(FlailingAnims))) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_Duplighost_Anim0A) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetActorPos, LVarA, LVarB, LVarC, LVarD) - EVT_IF_GT(LVarC, 0) - EVT_SET(LVarC, 0) - EVT_CALL(SetActorJumpGravity, LVarA, EVT_FLOAT(0.5)) - EVT_CALL(SetActorSounds, LVarA, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) - EVT_CALL(SetGoalPos, LVarA, LVarB, LVarC, LVarD) - EVT_CALL(JumpToGoal, LVarA, 15, FALSE, TRUE, FALSE) - EVT_CALL(ResetActorSounds, LVarA, ACTOR_SOUND_JUMP) - EVT_CALL(SetGoalPos, LVarA, LVarB, LVarC, LVarD) - EVT_CALL(JumpToGoal, LVarA, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, LVarA, LVarB, LVarC, LVarD) - EVT_CALL(JumpToGoal, LVarA, 5, FALSE, TRUE, FALSE) - EVT_END_IF - EVT_CALL(ForceHomePos, LVarA, LVarB, LVarC, LVarD) - EVT_CALL(HPBarToHome, LVarA) - EVT_CALL(SetIdleAnimations, LVarA, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_Duplighost_Anim02) - EVT_CALL(SetActorPos, ACTOR_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(ForceHomePos, ACTOR_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(HideHealthBar, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Wait(30) + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_ParentActorID, LVarA) + Call(UseIdleAnimation, LVarA, FALSE) + Call(HideHealthBar, LVarA) + Call(CopyStatusEffects, ACTOR_SELF, LVarA) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SMOKE_BURST) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 3) + Add(LVar2, 5) + Loop(3) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) + Wait(3) + EndLoop + EndThread + Wait(5) + Call(GetActorHP, ACTOR_SELF, LVarB) + Call(SetEnemyHP, LVarA, LVarB) + Call(CopyBuffs, ACTOR_SELF, LVarA) + Call(GetActorPos, ACTOR_SELF, LVarB, LVarC, LVarD) + Call(SetActorPos, LVarA, LVarB, LVarC, LVarD) + Call(SetPartFlagBits, LVarA, 1, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) + Call(SetPartFlagBits, LVarA, 1, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(SetActorFlagBits, LVarA, ACTOR_FLAG_NO_SHADOW | ACTOR_FLAG_NO_DMG_APPLY, FALSE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) + Call(SetActorVar, LVarA, AVAR_State, AVAL_State_ReadyToTackle) + Call(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetIdleAnimations, LVarA, PRT_MAIN, Ref(N(FlailingAnims))) + Call(SetAnimation, LVarA, 1, ANIM_Duplighost_Anim0A) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetActorPos, LVarA, LVarB, LVarC, LVarD) + IfGt(LVarC, 0) + Set(LVarC, 0) + Call(SetActorJumpGravity, LVarA, Float(0.5)) + Call(SetActorSounds, LVarA, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) + Call(SetGoalPos, LVarA, LVarB, LVarC, LVarD) + Call(JumpToGoal, LVarA, 15, FALSE, TRUE, FALSE) + Call(ResetActorSounds, LVarA, ACTOR_SOUND_JUMP) + Call(SetGoalPos, LVarA, LVarB, LVarC, LVarD) + Call(JumpToGoal, LVarA, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, LVarA, LVarB, LVarC, LVarD) + Call(JumpToGoal, LVarA, 5, FALSE, TRUE, FALSE) + EndIf + Call(ForceHomePos, LVarA, LVarB, LVarC, LVarD) + Call(HPBarToHome, LVarA) + Call(SetIdleAnimations, LVarA, PRT_MAIN, Ref(N(DefaultAnims))) + Call(SetAnimation, LVarA, 1, ANIM_Duplighost_Anim02) + Call(SetActorPos, ACTOR_SELF, NPC_DISPOSE_LOCATION) + Call(ForceHomePos, ACTOR_SELF, NPC_DISPOSE_LOCATION) + Call(HPBarToHome, ACTOR_SELF) + Call(RemoveActor, ACTOR_SELF) + Return + End }; EvtScript A(EVS_Duplighost_OnShockHit) = { - EVT_SET(LVar9, LVar0) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar2, LVar3, LVar4) - EVT_ADD(LVar2, 10) - EVT_ADD(LVar3, 10) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar2, LVar3, LVar4) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_ParentActorID, LVarA) - EVT_CALL(UseIdleAnimation, LVarA, FALSE) - EVT_CALL(HideHealthBar, LVarA) - EVT_CALL(CopyStatusEffects, ACTOR_SELF, LVarA) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SMOKE_BURST) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 3) - EVT_ADD(LVar2, 5) - EVT_LOOP(3) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) - EVT_WAIT(3) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(5) - EVT_CALL(GetActorHP, ACTOR_SELF, LVarB) - EVT_CALL(SetEnemyHP, LVarA, LVarB) - EVT_CALL(CopyBuffs, ACTOR_SELF, LVarA) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarB, LVarC, LVarD) - EVT_CALL(SetActorPos, LVarA, LVarB, LVarC, LVarD) - EVT_CALL(SetPartFlagBits, LVarA, 1, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, LVarA, 1, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(SetActorFlagBits, LVarA, ACTOR_FLAG_NO_SHADOW | ACTOR_FLAG_NO_DMG_APPLY, FALSE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_CALL(SetActorVar, LVarA, AVAR_State, AVAL_State_WaitToTackle) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar9, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetIdleAnimations, LVarA, PRT_MAIN, EVT_PTR(N(FlailingAnims))) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_Duplighost_Anim0A) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorJumpGravity, LVarA, EVT_FLOAT(0.5)) - EVT_CALL(GetActorPos, LVarA, LVarB, LVarC, LVarD) - EVT_ADD(LVarB, 30) - EVT_SET(LVarC, 0) - EVT_CALL(SetGoalPos, LVarA, LVarB, LVarC, LVarD) - EVT_CALL(JumpToGoal, LVarA, 15, FALSE, TRUE, FALSE) - EVT_ADD(LVarB, 20) - EVT_CALL(SetGoalPos, LVarA, LVarB, LVarC, LVarD) - EVT_CALL(JumpToGoal, LVarA, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVarB, 10) - EVT_CALL(SetGoalPos, LVarA, LVarB, LVarC, LVarD) - EVT_CALL(JumpToGoal, LVarA, 5, FALSE, TRUE, FALSE) - EVT_WAIT(20) - EVT_CALL(AddActorDecoration, LVarA, 1, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorYaw, LVarA, 180) - EVT_CALL(SetIdleAnimations, LVarA, PRT_MAIN, EVT_PTR(N(RunAnims))) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_Duplighost_Anim04) - EVT_CALL(SetActorSpeed, LVarA, EVT_FLOAT(8.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVarB, LVarC, LVarD) - EVT_CALL(SetGoalPos, LVarA, LVarB, 0, LVarD) - EVT_CALL(RunToGoal, LVarA, 0, FALSE) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_Duplighost_Anim02) - EVT_CALL(SetActorYaw, LVarA, 0) - EVT_CALL(RemoveActorDecoration, LVarA, 1, 0) - EVT_CALL(SetIdleAnimations, LVarA, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_CALL(ForceHomePos, LVarA, LVarB, 0, LVarD) - EVT_CALL(HPBarToHome, LVarA) - EVT_CALL(SetActorPos, ACTOR_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(ForceHomePos, ACTOR_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Set(LVar9, LVar0) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(HideHealthBar, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(GetActorPos, ACTOR_SELF, LVar2, LVar3, LVar4) + Add(LVar2, 10) + Add(LVar3, 10) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalPos, ACTOR_SELF, LVar2, LVar3, LVar4) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + ExecWait(EVS_Enemy_ShockHit) + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_ParentActorID, LVarA) + Call(UseIdleAnimation, LVarA, FALSE) + Call(HideHealthBar, LVarA) + Call(CopyStatusEffects, ACTOR_SELF, LVarA) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SMOKE_BURST) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 3) + Add(LVar2, 5) + Loop(3) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) + Wait(3) + EndLoop + EndThread + Wait(5) + Call(GetActorHP, ACTOR_SELF, LVarB) + Call(SetEnemyHP, LVarA, LVarB) + Call(CopyBuffs, ACTOR_SELF, LVarA) + Call(GetActorPos, ACTOR_SELF, LVarB, LVarC, LVarD) + Call(SetActorPos, LVarA, LVarB, LVarC, LVarD) + Call(SetPartFlagBits, LVarA, 1, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) + Call(SetPartFlagBits, LVarA, 1, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(SetActorFlagBits, LVarA, ACTOR_FLAG_NO_SHADOW | ACTOR_FLAG_NO_DMG_APPLY, FALSE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) + Call(SetActorVar, LVarA, AVAR_State, AVAL_State_WaitToTackle) + Call(SetPartFlagBits, ACTOR_SELF, LVar9, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetIdleAnimations, LVarA, PRT_MAIN, Ref(N(FlailingAnims))) + Call(SetAnimation, LVarA, 1, ANIM_Duplighost_Anim0A) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorJumpGravity, LVarA, Float(0.5)) + Call(GetActorPos, LVarA, LVarB, LVarC, LVarD) + Add(LVarB, 30) + Set(LVarC, 0) + Call(SetGoalPos, LVarA, LVarB, LVarC, LVarD) + Call(JumpToGoal, LVarA, 15, FALSE, TRUE, FALSE) + Add(LVarB, 20) + Call(SetGoalPos, LVarA, LVarB, LVarC, LVarD) + Call(JumpToGoal, LVarA, 10, FALSE, TRUE, FALSE) + Add(LVarB, 10) + Call(SetGoalPos, LVarA, LVarB, LVarC, LVarD) + Call(JumpToGoal, LVarA, 5, FALSE, TRUE, FALSE) + Wait(20) + Call(AddActorDecoration, LVarA, 1, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorYaw, LVarA, 180) + Call(SetIdleAnimations, LVarA, PRT_MAIN, Ref(N(RunAnims))) + Call(SetAnimation, LVarA, 1, ANIM_Duplighost_Anim04) + Call(SetActorSpeed, LVarA, Float(8.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVarB, LVarC, LVarD) + Call(SetGoalPos, LVarA, LVarB, 0, LVarD) + Call(RunToGoal, LVarA, 0, FALSE) + Call(SetAnimation, LVarA, 1, ANIM_Duplighost_Anim02) + Call(SetActorYaw, LVarA, 0) + Call(RemoveActorDecoration, LVarA, 1, 0) + Call(SetIdleAnimations, LVarA, PRT_MAIN, Ref(N(DefaultAnims))) + Call(ForceHomePos, LVarA, LVarB, 0, LVarD) + Call(HPBarToHome, LVarA) + Call(SetActorPos, ACTOR_SELF, NPC_DISPOSE_LOCATION) + Call(ForceHomePos, ACTOR_SELF, NPC_DISPOSE_LOCATION) + Call(HPBarToHome, ACTOR_SELF) + Call(RemoveActor, ACTOR_SELF) + Return + End }; EvtScript A(EVS_Duplighost_OnShockDeath) = { - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, LVarA, LVarB) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 15) - EVT_ADD(LVar1, 10) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.1)) - EVT_CALL(SetAnimation, ACTOR_SELF, LVarA, LVarB) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, FALSE, FALSE) - EVT_SET(LVar0, LVarA) - EVT_SET(LVar1, LVarB) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, LVarC, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(15) - EVT_ADD(LVar0, -48) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 60) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) - EVT_RETURN - EVT_END + Call(HideHealthBar, ACTOR_SELF) + Set(LVarA, LVar0) + Set(LVarB, LVar1) + Set(LVarC, LVar2) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, LVarA, LVarB) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 15) + Add(LVar1, 10) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.1)) + Call(SetAnimation, ACTOR_SELF, LVarA, LVarB) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, FALSE, FALSE) + Set(LVar0, LVarA) + Set(LVar1, LVarB) + ExecWait(EVS_Enemy_ShockHit) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, LVarC, 0) + Set(LVar0, 0) + Loop(15) + Add(LVar0, -48) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + EndThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 60) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.4)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 10) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) + Return + End }; Vec3i A(DuplighostSummonPos) = { NPC_DISPOSE_LOCATION }; @@ -594,157 +594,157 @@ API_CALLABLE(N(AdjustFormationPriority)) { } EvtScript N(EVS_CopyPartner) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_GHOST_TRANSFORM) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Duplighost_Anim06) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 8) - EVT_SETF(LVar3, EVT_FLOAT(0.4)) - EVT_ELSE - EVT_ADD(LVar1, 20) - EVT_SETF(LVar3, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar1, LVar2, LVar3, 40, 0) - EVT_CALL(WATT(UnkBackgroundFunc3)) - EVT_CALL(MakeLerp, 0, 200, 20, EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(WATT(SetBackgroundAlpha), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(N(GetPartnerAndLevel), LVar5, LVar6) - EVT_CALL(N(AdjustFormationPriority), LVar5) - EVT_SWITCH(LVar5) - EVT_CASE_EQ(PARTNER_GOOMBARIO) - EVT_CALL(SummonEnemy, EVT_PTR(A(GoombarioCloneFormation)), FALSE) - EVT_CASE_EQ(PARTNER_KOOPER) - EVT_CALL(SummonEnemy, EVT_PTR(A(KooperCloneFormation)), FALSE) - EVT_CASE_EQ(PARTNER_BOMBETTE) - EVT_CALL(SummonEnemy, EVT_PTR(A(BombetteCloneFormation)), FALSE) - EVT_CASE_EQ(PARTNER_PARAKARRY) - EVT_CALL(SummonEnemy, EVT_PTR(A(ParakarryCloneFormation)), FALSE) - EVT_CASE_EQ(PARTNER_BOW) - EVT_CALL(SummonEnemy, EVT_PTR(A(BowCloneFormation)), FALSE) - EVT_CASE_EQ(PARTNER_WATT) - EVT_CALL(SummonEnemy, EVT_PTR(A(WattCloneFormation)), FALSE) - EVT_CASE_EQ(PARTNER_SUSHIE) - EVT_CALL(SummonEnemy, EVT_PTR(A(SushieCloneFormation)), FALSE) - EVT_CASE_EQ(PARTNER_LAKILESTER) - EVT_CALL(SummonEnemy, EVT_PTR(A(LakilesterCloneFormation)), FALSE) - EVT_END_SWITCH - EVT_SET(LVarA, LVar0) - EVT_CALL(CopyStatusEffects, ACTOR_SELF, LVarA) - EVT_CALL(SetBattleVar, BTL_VAR_LastCopiedPartner, LVar5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SMOKE_BURST) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 3) - EVT_ADD(LVar2, 5) - EVT_LOOP(3) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) - EVT_WAIT(3) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(5) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW | ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_CALL(SetEnemyHP, LVarA, LVar0) - EVT_CALL(CopyBuffs, ACTOR_SELF, LVarA) - EVT_CALL(GetOwnerID, LVar0) - EVT_CALL(SetActorVar, LVarA, AVAR_Copy_ParentActorID, LVar0) - EVT_CALL(SetActorVar, LVarA, AVAR_Copy_PartnerLevel, LVar6) - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_THREAD - EVT_CALL(MakeLerp, 200, 0, 20, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(WATT(SetBackgroundAlpha), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(SetActorSounds, LVarA, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_SWITCH(LVar5) - EVT_CASE_EQ(8) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, LVarA, EVT_FLOAT(0.01)) - EVT_CALL(SetGoalPos, LVarA, LVar0, 10, LVar2) - EVT_CALL(JumpToGoal, LVarA, 10, FALSE, FALSE, FALSE) - EVT_WAIT(10) - EVT_CASE_OR_EQ(6) - EVT_CASE_OR_EQ(9) - EVT_CASE_OR_EQ(4) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, LVarA, EVT_FLOAT(0.01)) - EVT_CALL(SetGoalPos, LVarA, LVar0, 30, LVar2) - EVT_CALL(JumpToGoal, LVarA, 20, FALSE, FALSE, FALSE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, LVarA) - EVT_CALL(ResetActorSounds, LVarA, ACTOR_SOUND_JUMP) - EVT_WAIT(20) - EVT_CALL(SetActorPos, ACTOR_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(ForceHomePos, ACTOR_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_CopiedPartner) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Wait(15) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_GHOST_TRANSFORM) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Duplighost_Anim06) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Add(LVar1, 8) + SetF(LVar3, Float(0.4)) + Else + Add(LVar1, 20) + SetF(LVar3, Float(1.0)) + EndIf + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 1, LVar0, LVar1, LVar2, LVar3, 40, 0) + Call(WATT(UnkBackgroundFunc3)) + Call(MakeLerp, 0, 200, 20, EASING_LINEAR) + Label(0) + Call(UpdateLerp) + Call(WATT(SetBackgroundAlpha), LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Wait(10) + Call(N(GetPartnerAndLevel), LVar5, LVar6) + Call(N(AdjustFormationPriority), LVar5) + Switch(LVar5) + CaseEq(PARTNER_GOOMBARIO) + Call(SummonEnemy, Ref(A(GoombarioCloneFormation)), FALSE) + CaseEq(PARTNER_KOOPER) + Call(SummonEnemy, Ref(A(KooperCloneFormation)), FALSE) + CaseEq(PARTNER_BOMBETTE) + Call(SummonEnemy, Ref(A(BombetteCloneFormation)), FALSE) + CaseEq(PARTNER_PARAKARRY) + Call(SummonEnemy, Ref(A(ParakarryCloneFormation)), FALSE) + CaseEq(PARTNER_BOW) + Call(SummonEnemy, Ref(A(BowCloneFormation)), FALSE) + CaseEq(PARTNER_WATT) + Call(SummonEnemy, Ref(A(WattCloneFormation)), FALSE) + CaseEq(PARTNER_SUSHIE) + Call(SummonEnemy, Ref(A(SushieCloneFormation)), FALSE) + CaseEq(PARTNER_LAKILESTER) + Call(SummonEnemy, Ref(A(LakilesterCloneFormation)), FALSE) + EndSwitch + Set(LVarA, LVar0) + Call(CopyStatusEffects, ACTOR_SELF, LVarA) + Call(SetBattleVar, BTL_VAR_LastCopiedPartner, LVar5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SMOKE_BURST) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 3) + Add(LVar2, 5) + Loop(3) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0) + Wait(3) + EndLoop + EndThread + Wait(5) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorPos, LVarA, LVar0, LVar1, LVar2) + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW | ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Call(GetActorHP, ACTOR_SELF, LVar0) + Call(SetEnemyHP, LVarA, LVar0) + Call(CopyBuffs, ACTOR_SELF, LVarA) + Call(GetOwnerID, LVar0) + Call(SetActorVar, LVarA, AVAR_Copy_ParentActorID, LVar0) + Call(SetActorVar, LVarA, AVAR_Copy_PartnerLevel, LVar6) + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Thread + Call(MakeLerp, 200, 0, 20, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(WATT(SetBackgroundAlpha), LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + EndThread + Call(SetActorSounds, LVarA, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Switch(LVar5) + CaseEq(8) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, LVarA, Float(0.01)) + Call(SetGoalPos, LVarA, LVar0, 10, LVar2) + Call(JumpToGoal, LVarA, 10, FALSE, FALSE, FALSE) + Wait(10) + CaseOrEq(6) + CaseOrEq(9) + CaseOrEq(4) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, LVarA, Float(0.01)) + Call(SetGoalPos, LVarA, LVar0, 30, LVar2) + Call(JumpToGoal, LVarA, 20, FALSE, FALSE, FALSE) + EndCaseGroup + EndSwitch + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Call(ForceHomePos, LVarA, LVar0, LVar1, LVar2) + Call(HPBarToHome, LVarA) + Call(ResetActorSounds, LVarA, ACTOR_SOUND_JUMP) + Wait(20) + Call(SetActorPos, ACTOR_SELF, NPC_DISPOSE_LOCATION) + Call(ForceHomePos, ACTOR_SELF, NPC_DISPOSE_LOCATION) + Call(HPBarToHome, ACTOR_SELF) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_CopiedPartner) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_ReadyToCopy) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 600) - EVT_CALL(GetBattleVar, BTL_VAR_DuplighostCopyFlags, LVar0) - EVT_IF_NOT_FLAG(LVar0, BTL_VAL_Duplighost_HasCopied) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_ReadyToCopy) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 600) + Call(GetBattleVar, BTL_VAR_DuplighostCopyFlags, LVar0) + IfNotFlag(LVar0, BTL_VAL_Duplighost_HasCopied) // first time partner is copied, set battle flag and proceed - EVT_CALL(GetBattleVar, BTL_VAR_DuplighostCopyFlags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, BTL_VAL_Duplighost_HasCopied) - EVT_CALL(SetBattleVar, BTL_VAR_DuplighostCopyFlags, LVar0) - EVT_EXEC_WAIT(N(EVS_CopyPartner)) - EVT_ELSE + Call(GetBattleVar, BTL_VAR_DuplighostCopyFlags, LVar0) + BitwiseOrConst(LVar0, BTL_VAL_Duplighost_HasCopied) + Call(SetBattleVar, BTL_VAR_DuplighostCopyFlags, LVar0) + ExecWait(N(EVS_CopyPartner)) + Else // partner has been copied before, try to avoid copying the same one - EVT_CALL(GetBattleVar, BTL_VAR_LastCopiedPartner, LVar0) - EVT_CALL(N(GetPartnerAndLevel), LVar1, LVar2) - EVT_IF_EQ(LVar0, LVar1) - EVT_EXEC_WAIT(N(EVS_CopyPartner)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_FlyingTackle)) - EVT_END_IF - EVT_END_IF - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_FlyingTackle)) - EVT_END_IF - EVT_CASE_EQ(AVAL_State_CopiedPartner) + Call(GetBattleVar, BTL_VAR_LastCopiedPartner, LVar0) + Call(N(GetPartnerAndLevel), LVar1, LVar2) + IfEq(LVar0, LVar1) + ExecWait(N(EVS_CopyPartner)) + Else + ExecWait(N(EVS_Attack_FlyingTackle)) + EndIf + EndIf + Else + ExecWait(N(EVS_Attack_FlyingTackle)) + EndIf + CaseEq(AVAL_State_CopiedPartner) // do nothing, currently in disguise - EVT_CASE_EQ(AVAL_State_ReadyToTackle) - EVT_EXEC_WAIT(N(EVS_Attack_FlyingTackle)) - EVT_CASE_EQ(AVAL_State_WaitToTackle) - EVT_END_SWITCH - EVT_RETURN - EVT_END + CaseEq(AVAL_State_ReadyToTackle) + ExecWait(N(EVS_Attack_FlyingTackle)) + CaseEq(AVAL_State_WaitToTackle) + EndSwitch + Return + End }; diff --git a/src/battle/common/actor/duplighost/ghost_bombette.inc.c b/src/battle/common/actor/duplighost/ghost_bombette.inc.c index cb593653a5a..a4e4a4f689a 100644 --- a/src/battle/common/actor/duplighost/ghost_bombette.inc.c +++ b/src/battle/common/actor/duplighost/ghost_bombette.inc.c @@ -91,279 +91,279 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_PlayDetonateFX) = { - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.75)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(4.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_RING, 0, LVar0, LVar1, LVar2, 0) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_EXPLOSION, 0, LVar0, LVar1, LVar2, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOMB_BLAST) - EVT_RETURN - EVT_END + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.75)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(4.5)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + EndThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar2, 2) + PlayEffect(EFFECT_SMOKE_RING, 0, LVar0, LVar1, LVar2, 0) + Add(LVar1, 20) + Add(LVar2, 2) + PlayEffect(EFFECT_EXPLOSION, 0, LVar0, LVar1, LVar2, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOMB_BLAST) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(GetLastElement, LVar1) - EVT_IF_FLAG(LVar1, DAMAGE_TYPE_SHOCK) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_BurnHurt) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(EVS_PlayDetonateFX)) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_BurnStill) - EVT_SET(LVar2, EXEC_DEATH_NO_SPINNING) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleBombette_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_PlayDetonateFX)) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_BurnStill) - EVT_SET(LVar2, EXEC_DEATH_NO_SPINNING) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleBombette_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_PlayDetonateFX)) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_BurnStill) - EVT_SET(LVar2, EXEC_DEATH_NO_SPINNING) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_SHOCK_HIT) - EVT_CASE_OR_EQ(EVENT_SHOCK_DEATH) - EVT_CALL(HPBarToCurrent, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_BurnHurt) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(EVS_PlayDetonateFX)) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_BurnStill) - EVT_SET(LVar2, EXEC_DEATH_NO_SPINNING) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Run) - EVT_SET_CONST(LVar2, ANIM_BattleBombette_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Hurt) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Hurt) + ExecWait(EVS_Enemy_Hit) + Call(GetLastElement, LVar1) + IfFlag(LVar1, DAMAGE_TYPE_SHOCK) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_BurnHurt) + Wait(20) + ExecWait(N(EVS_PlayDetonateFX)) + ExecWait(A(EVS_Duplighost_OnDeath)) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_BurnStill) + Set(LVar2, EXEC_DEATH_NO_SPINNING) + ExecWait(EVS_Enemy_Death) + Return + EndIf + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_BurnHurt) + SetConst(LVar2, ANIM_BattleBombette_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_PlayDetonateFX)) + ExecWait(A(EVS_Duplighost_OnDeath)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_BurnStill) + Set(LVar2, EXEC_DEATH_NO_SPINNING) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_BurnHurt) + SetConst(LVar2, ANIM_BattleBombette_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_PlayDetonateFX)) + ExecWait(A(EVS_Duplighost_OnDeath)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_BurnStill) + Set(LVar2, EXEC_DEATH_NO_SPINNING) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + ExecWait(A(EVS_Duplighost_OnDeath)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_SHOCK_HIT) + CaseOrEq(EVENT_SHOCK_DEATH) + Call(HPBarToCurrent, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_BurnHurt) + Wait(20) + ExecWait(N(EVS_PlayDetonateFX)) + ExecWait(A(EVS_Duplighost_OnDeath)) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_BurnStill) + Set(LVar2, EXEC_DEATH_NO_SPINNING) + ExecWait(EVS_Enemy_Death) + Return + EndCaseGroup + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + ExecWait(A(EVS_Duplighost_OnDeath)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Run) + SetConst(LVar2, ANIM_BattleBombette_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/UnkActorPosFunc.inc.c" EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 40, 0, 0) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Run) - EVT_CALL(RunToGoal, ACTOR_SELF, 30, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Idle) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Brace) - EVT_WAIT(15) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOMBETTE_BODY_SLAM) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -10, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_BodySlam) - EVT_CALL(RunToGoal, ACTOR_SELF, 5, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Idle) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 15, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 72) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(AddGoalPos, ACTOR_SELF, -60, 0, 0) - EVT_CALL(RunToGoal, ACTOR_SELF, 10, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Idle) - EVT_THREAD - EVT_CALL(N(UnkActorPosFunc)) - EVT_END_THREAD - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_BodySlam) - EVT_CALL(RunToGoal, ACTOR_SELF, 4, FALSE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(PARTNER_RANK_NORMAL) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(PARTNER_RANK_SUPER) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(PARTNER_RANK_ULTRA) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 5, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Idle) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire2) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire1) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire2) - EVT_ADD(LVar0, 40) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire1) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire2) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire1) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire2) - EVT_ADD(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire1) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Idle) - EVT_WAIT(8) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 40, 0, 0) + Call(MoveBattleCamOver, 30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Run) + Call(RunToGoal, ACTOR_SELF, 30, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Idle) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Brace) + Wait(15) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOMBETTE_BODY_SLAM) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -10, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_BodySlam) + Call(RunToGoal, ACTOR_SELF, 5, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Idle) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 15, 0) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 72) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + EndThread + Call(AddGoalPos, ACTOR_SELF, -60, 0, 0) + Call(RunToGoal, ACTOR_SELF, 10, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Idle) + Thread + Call(N(UnkActorPosFunc)) + EndThread + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_BodySlam) + Call(RunToGoal, ACTOR_SELF, 4, FALSE) + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) + Switch(LVar9) + CaseEq(PARTNER_RANK_NORMAL) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(PARTNER_RANK_SUPER) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(PARTNER_RANK_ULTRA) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 5, BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Idle) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire2) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.4)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire1) + Wait(1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire2) + Add(LVar0, 40) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire1) + Wait(1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire2) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire1) + Wait(1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire2) + Add(LVar0, 10) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Backfire1) + Wait(1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Idle) + Wait(8) + Call(YieldTurn) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBombette_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; Formation A(BombetteCloneFormation) = { diff --git a/src/battle/common/actor/duplighost/ghost_bow.inc.c b/src/battle/common/actor/duplighost/ghost_bow.inc.c index 3060ffbfdff..f53e36ac2ac 100644 --- a/src/battle/common/actor/duplighost/ghost_bow.inc.c +++ b/src/battle/common/actor/duplighost/ghost_bow.inc.c @@ -103,320 +103,320 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CALL(GetLastElement, LVar1) - EVT_IF_FLAG(LVar1, DAMAGE_TYPE_SHOCK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnHitElectric)) - EVT_RETURN - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_BurnHurtAlt) - EVT_SET_CONST(LVar2, ANIM_BattleBow_BurnStillAlt) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_BurnHurtAlt) - EVT_SET_CONST(LVar2, ANIM_BattleBow_BurnStillAlt) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_BurnStillAlt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnShockHit)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_SET(LVar2, 14) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnShockDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Run) - EVT_SET_CONST(LVar2, ANIM_BattleBow_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + Call(GetLastElement, LVar1) + IfFlag(LVar1, DAMAGE_TYPE_SHOCK) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Hurt) + ExecWait(A(EVS_Duplighost_OnHitElectric)) + Return + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Hurt) + ExecWait(EVS_Enemy_Hit) + EndIf + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_BurnHurtAlt) + SetConst(LVar2, ANIM_BattleBow_BurnStillAlt) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_BurnHurtAlt) + SetConst(LVar2, ANIM_BattleBow_BurnStillAlt) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(A(EVS_Duplighost_OnDeath)) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_BurnStillAlt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + ExecWait(A(EVS_Duplighost_OnDeath)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Hurt) + ExecWait(A(EVS_Duplighost_OnShockHit)) + Return + CaseEq(EVENT_SHOCK_DEATH) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ExecWait(A(EVS_Duplighost_OnDeath)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Hurt) + Set(LVar2, 14) + ExecWait(A(EVS_Duplighost_OnShockDeath)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + ExecWait(A(EVS_Duplighost_OnDeath)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Run) + SetConst(LVar2, ANIM_BattleBow_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOO_APPEAR_A) - EVT_THREAD - EVT_SET(LVar0, 200) - EVT_LOOP(20) - EVT_SUB(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_01) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Run) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_CALL(AddGoalPos, ACTOR_SELF, 4, -4, 0) - EVT_ELSE - EVT_CALL(AddGoalPos, ACTOR_SELF, 10, -10, 0) - EVT_END_IF - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Idle) - EVT_END_THREAD - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_15) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOO_VANISH_A) - EVT_SET(LVar0, 55) - EVT_LOOP(20) - EVT_ADD(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, 255) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_PreSlap) - EVT_WAIT(10) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_WAIT(15) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.4), EVT_FLOAT(1.4), EVT_FLOAT(1.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_SlapOnce) - EVT_WAIT(2) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_SET(LVar0, 0) - EVT_LOOP(20) - EVT_ADD(LVar0, -45) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Injured) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SEEING_STARS) - EVT_WAIT(30) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Idle) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOO_APPEAR_A) - EVT_THREAD - EVT_SET(LVar0, 200) - EVT_LOOP(20) - EVT_SUB(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Run) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Idle) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOO_VANISH_A) - EVT_CALL(YieldTurn) - EVT_SET(LVar0, 55) - EVT_LOOP(20) - EVT_ADD(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, 255) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_SET(LVarA, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar8) - EVT_SWITCH(LVar8) - EVT_CASE_EQ(PARTNER_RANK_NORMAL) - EVT_SET(LVar8, 4) - EVT_CASE_EQ(PARTNER_RANK_SUPER) - EVT_SET(LVar8, 5) - EVT_CASE_EQ(PARTNER_RANK_ULTRA) - EVT_SET(LVar8, 6) - EVT_END_SWITCH - EVT_SET(LVar7, LVar8) - EVT_LOOP(LVar7) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOW_SMACK) - EVT_ADD(LVarA, 1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.4), EVT_FLOAT(1.4), EVT_FLOAT(1.0)) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_SlapOnce) - EVT_SET(LFlag0, TRUE) - EVT_IF_EQ(LVarA, LVar8) - EVT_CALL(SetDamageSource, DMG_SRC_LAST_SLAP_LEFT) - EVT_ELSE - EVT_CALL(SetDamageSource, DMG_SRC_NEXT_SLAP_LEFT) - EVT_END_IF - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_SlapBack) - EVT_SET(LFlag0, FALSE) - EVT_IF_EQ(LVarA, LVar8) - EVT_CALL(SetDamageSource, DMG_SRC_LAST_SLAP_RIGHT) - EVT_ELSE - EVT_CALL(SetDamageSource, DMG_SRC_NEXT_SLAP_RIGHT) - EVT_END_IF - EVT_END_IF - EVT_WAIT(2) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(PARTNER_RANK_NORMAL) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_CASE_EQ(PARTNER_RANK_SUPER) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_CASE_EQ(PARTNER_RANK_ULTRA) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_END_SWITCH - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Idle) - EVT_CALL(GetActorHP, ACTOR_PLAYER, LVar1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOO_APPEAR_A) - EVT_THREAD - EVT_SET(LVar0, 200) - EVT_LOOP(20) - EVT_SUB(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Run) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Idle) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BOO_VANISH_A) - EVT_CALL(YieldTurn) - EVT_SET(LVar0, 55) - EVT_LOOP(20) - EVT_ADD(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_MAIN, 255) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOO_APPEAR_A) + Thread + Set(LVar0, 200) + Loop(20) + Sub(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) + Wait(1) + EndLoop + EndThread + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_01) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Thread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Run) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Call(AddGoalPos, ACTOR_SELF, 4, -4, 0) + Else + Call(AddGoalPos, ACTOR_SELF, 10, -10, 0) + EndIf + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Idle) + EndThread + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_PRESET_15) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 30) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOO_VANISH_A) + Set(LVar0, 55) + Loop(20) + Add(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, 255) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_PreSlap) + Wait(10) + Call(SetGoalToTarget, ACTOR_SELF) + Wait(15) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.4), Float(1.4), Float(1.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_SlapOnce) + Wait(2) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.0), Float(1.0), Float(1.0)) + Set(LVar0, 0) + Loop(20) + Add(LVar0, -45) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Injured) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SEEING_STARS) + Wait(30) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Idle) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOO_APPEAR_A) + Thread + Set(LVar0, 200) + Loop(20) + Sub(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) + Wait(1) + EndLoop + EndThread + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Run) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Idle) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOO_VANISH_A) + Call(YieldTurn) + Set(LVar0, 55) + Loop(20) + Add(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, 255) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Set(LVarA, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar8) + Switch(LVar8) + CaseEq(PARTNER_RANK_NORMAL) + Set(LVar8, 4) + CaseEq(PARTNER_RANK_SUPER) + Set(LVar8, 5) + CaseEq(PARTNER_RANK_ULTRA) + Set(LVar8, 6) + EndSwitch + Set(LVar7, LVar8) + Loop(LVar7) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOW_SMACK) + Add(LVarA, 1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.4), Float(1.4), Float(1.0)) + IfEq(LFlag0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_SlapOnce) + Set(LFlag0, TRUE) + IfEq(LVarA, LVar8) + Call(SetDamageSource, DMG_SRC_LAST_SLAP_LEFT) + Else + Call(SetDamageSource, DMG_SRC_NEXT_SLAP_LEFT) + EndIf + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_SlapBack) + Set(LFlag0, FALSE) + IfEq(LVarA, LVar8) + Call(SetDamageSource, DMG_SRC_LAST_SLAP_RIGHT) + Else + Call(SetDamageSource, DMG_SRC_NEXT_SLAP_RIGHT) + EndIf + EndIf + Wait(2) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.0), Float(1.0), Float(1.0)) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.5)) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.2)) + EndThread + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) + Switch(LVar9) + CaseEq(PARTNER_RANK_NORMAL) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + CaseEq(PARTNER_RANK_SUPER) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + CaseEq(PARTNER_RANK_ULTRA) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + EndSwitch + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Idle) + Call(GetActorHP, ACTOR_PLAYER, LVar1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOO_APPEAR_A) + Thread + Set(LVar0, 200) + Loop(20) + Sub(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) + Wait(1) + EndLoop + EndThread + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Run) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleBow_Idle) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BOO_VANISH_A) + Call(YieldTurn) + Set(LVar0, 55) + Loop(20) + Add(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_SELF, PRT_MAIN, 255) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; Formation A(BowCloneFormation) = { diff --git a/src/battle/common/actor/duplighost/ghost_goombario.inc.c b/src/battle/common/actor/duplighost/ghost_goombario.inc.c index 3c35b4188f8..d429f55645a 100644 --- a/src/battle/common/actor/duplighost/ghost_goombario.inc.c +++ b/src/battle/common/actor/duplighost/ghost_goombario.inc.c @@ -91,382 +91,382 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CALL(GetLastElement, LVar1) - EVT_IF_FLAG(LVar1, DAMAGE_TYPE_SHOCK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnHitElectric)) - EVT_RETURN - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_BurnHurt1) - EVT_SET_CONST(LVar2, ANIM_BattleGoombario_BurnHurt2) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_BurnHurt1) - EVT_SET_CONST(LVar2, ANIM_BattleGoombario_BurnHurt2) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_BurnHurt2) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnShockHit)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_SET(LVar2, 12) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnShockDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_Run) - EVT_SET_CONST(LVar2, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + Call(GetLastElement, LVar1) + IfFlag(LVar1, DAMAGE_TYPE_SHOCK) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + ExecWait(A(EVS_Duplighost_OnHitElectric)) + Return + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + ExecWait(EVS_Enemy_Hit) + EndIf + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_BurnHurt1) + SetConst(LVar2, ANIM_BattleGoombario_BurnHurt2) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_BurnHurt1) + SetConst(LVar2, ANIM_BattleGoombario_BurnHurt2) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(A(EVS_Duplighost_OnDeath)) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_BurnHurt2) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + ExecWait(A(EVS_Duplighost_OnDeath)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + ExecWait(A(EVS_Duplighost_OnShockHit)) + Return + CaseEq(EVENT_SHOCK_DEATH) + ExecWait(A(EVS_Duplighost_OnDeath)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + Set(LVar2, 12) + ExecWait(A(EVS_Duplighost_OnShockDeath)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + ExecWait(A(EVS_Duplighost_OnDeath)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_Run) + SetConst(LVar2, ANIM_BattleGoombario_HurtStill) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "world/common/todo/UnkFunc62.inc.c" #include "common/ActorJumpToPos.inc.c" EvtScript N(EVS_HeadbonkFollowthrough) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_SET(LVar0, 180) - EVT_LOOP(15) - EVT_SUB(LVar0, 60) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Fall) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 60) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SETF(LVar5, EVT_FLOAT(7.2)) - EVT_ELSE - EVT_SET(LVar5, 18) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar5, 0) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar5, 0) - EVT_WAIT(1) - EVT_ADD(LVar0, 10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar5, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) - EVT_WAIT(2) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Run) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Set(LVar0, 180) + Loop(15) + Sub(LVar0, 60) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Fall) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 60) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + SetF(LVar5, Float(7.2)) + Else + Set(LVar5, 18) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) + Call(SetActorDispOffset, ACTOR_SELF, 0, LVar5, 0) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) + Call(SetActorDispOffset, ACTOR_SELF, 0, LVar5, 0) + Wait(1) + Add(LVar0, 10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) + Call(SetActorDispOffset, ACTOR_SELF, 0, LVar5, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) + Wait(2) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Run) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) + Return + End }; EvtScript N(EVS_ApproachPlayer) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 70, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Run) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 70, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Run) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) + Return + End }; // copied from goombario.c and used, but result is discarded EvtScript N(EVS_CalculateJumpTime) = { - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVarB, LVarC, LVarD) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarC, LVarD, LVarE) - EVT_IF_GT(LVarB, LVarC) - EVT_SUB(LVarB, LVarC) - EVT_ELSE - EVT_SUB(LVarC, LVarB) - EVT_SET(LVarB, LVarC) - EVT_END_IF - EVT_SUB(LVarB, 20) - EVT_DIVF(LVarB, EVT_FLOAT(10.588)) - EVT_ADDF(LVarB, 15) - EVT_SET(LVarA, LVarB) - EVT_RETURN - EVT_END + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVarB, LVarC, LVarD) + Call(GetActorPos, ACTOR_SELF, LVarC, LVarD, LVarE) + IfGt(LVarB, LVarC) + Sub(LVarB, LVarC) + Else + Sub(LVarC, LVarB) + Set(LVarB, LVarC) + EndIf + Sub(LVarB, 20) + DivF(LVarB, Float(10.588)) + AddF(LVarB, 15) + Set(LVarA, LVarB) + Return + End }; EvtScript N(EVS_Attack_Headbonk) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_EXEC_WAIT(N(EVS_ApproachPlayer)) - EVT_EXEC_WAIT(N(EVS_CalculateJumpTime)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SETF(LVar0, EVT_FLOAT(7.2)) - EVT_SETF(LVar1, EVT_FLOAT(7.6)) - EVT_SETF(LVar1, EVT_FLOAT(3.6)) - EVT_ELSE - EVT_SET(LVar0, 18) - EVT_SET(LVar1, 19) - EVT_SET(LVar2, 9) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar1, 0) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar2, 0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 0, 0, 5) - EVT_CALL(SetJumpAnimations, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_GOOMBARIO_JUMP) - EVT_CALL(N(UnkFunc62), LVarA, 0) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetJumpAnimations, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) - EVT_CALL(N(ActorJumpToPos)) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(20) - EVT_CALL(YieldTurn) - EVT_EXEC_WAIT(N(EVS_HeadbonkFollowthrough)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CHILD_THREAD - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_CHILD_THREAD - EVT_WAIT(1) - EVT_WAIT(2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(PARTNER_RANK_NORMAL) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_CASE_EQ(PARTNER_RANK_SUPER) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_CASE_EQ(PARTNER_RANK_ULTRA) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_END_SWITCH - EVT_CALL(GetActorHP, ACTOR_PLAYER, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(100) - EVT_END_IF - EVT_SET(LVarA, 24) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(PARTNER_RANK_NORMAL) - EVT_THREAD - EVT_WAIT(4) - EVT_SET(LVar0, 0) - EVT_LOOP(6) - EVT_ADD(LVar0, 30) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetJumpAnimations, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_GOOMBARIO_HEADBONK) - EVT_CALL(N(UnkFunc62), LVarA, 3) - EVT_CASE_EQ(PARTNER_RANK_SUPER) - EVT_THREAD - EVT_WAIT(4) - EVT_SET(LVar0, 0) - EVT_LOOP(6) - EVT_ADD(LVar0, 30) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetJumpAnimations, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_GOOMBARIO_HEADBONK) - EVT_CALL(N(UnkFunc62), LVarA, 3) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_CASE_EQ(PARTNER_RANK_ULTRA) - EVT_THREAD - EVT_WAIT(4) - EVT_SET(LVar0, 0) - EVT_LOOP(6) - EVT_ADD(LVar0, 30) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, EVT_IGNORE_ARG, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(LVarA) - EVT_ADD(LVar0, 133) - EVT_CALL(SetActorRotation, ACTOR_SELF, EVT_IGNORE_ARG, LVar0, EVT_IGNORE_ARG) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetJumpAnimations, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_GOOMBARIO_HEADBONK) - EVT_CALL(N(UnkFunc62), LVarA, 3) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_END_SWITCH - EVT_CHILD_THREAD - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_CHILD_THREAD - EVT_WAIT(1) - EVT_WAIT(2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(PARTNER_RANK_NORMAL) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(PARTNER_RANK_SUPER) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(PARTNER_RANK_ULTRA) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_LABEL(100) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(YieldTurn) - EVT_EXEC_WAIT(N(EVS_HeadbonkFollowthrough)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + ExecWait(N(EVS_ApproachPlayer)) + ExecWait(N(EVS_CalculateJumpTime)) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + SetF(LVar0, Float(7.2)) + SetF(LVar1, Float(7.6)) + SetF(LVar1, Float(3.6)) + Else + Set(LVar0, 18) + Set(LVar1, 19) + Set(LVar2, 9) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) + Call(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, LVar1, 0) + Wait(1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk) + Call(SetActorDispOffset, ACTOR_SELF, 0, LVar2, 0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 0, 0, 5) + Call(SetJumpAnimations, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_GOOMBARIO_JUMP) + Call(N(UnkFunc62), LVarA, 0) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetJumpAnimations, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) + Call(N(ActorJumpToPos)) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + EndThread + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(20) + Call(YieldTurn) + ExecWait(N(EVS_HeadbonkFollowthrough)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + ChildThread + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.3), Float(0.5), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.0), Float(1.0), Float(1.0)) + EndChildThread + Wait(1) + Wait(2) + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) + Switch(LVar9) + CaseEq(PARTNER_RANK_NORMAL) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + CaseEq(PARTNER_RANK_SUPER) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) + CaseEq(PARTNER_RANK_ULTRA) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS) + EndSwitch + Call(GetActorHP, ACTOR_PLAYER, LVar0) + IfEq(LVar0, 0) + Goto(100) + EndIf + Set(LVarA, 24) + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) + Switch(LVar9) + CaseEq(PARTNER_RANK_NORMAL) + Thread + Wait(4) + Set(LVar0, 0) + Loop(6) + Add(LVar0, 30) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetJumpAnimations, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_GOOMBARIO_HEADBONK) + Call(N(UnkFunc62), LVarA, 3) + CaseEq(PARTNER_RANK_SUPER) + Thread + Wait(4) + Set(LVar0, 0) + Loop(6) + Add(LVar0, 30) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetJumpAnimations, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_GOOMBARIO_HEADBONK) + Call(N(UnkFunc62), LVarA, 3) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + CaseEq(PARTNER_RANK_ULTRA) + Thread + Wait(4) + Set(LVar0, 0) + Loop(6) + Add(LVar0, 30) + Call(SetActorRotation, ACTOR_SELF, 0, EVT_IGNORE_ARG, LVar0) + Wait(1) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk) + EndThread + Thread + Set(LVar0, 0) + Loop(LVarA) + Add(LVar0, 133) + Call(SetActorRotation, ACTOR_SELF, EVT_IGNORE_ARG, LVar0, EVT_IGNORE_ARG) + Wait(1) + EndLoop + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetJumpAnimations, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_GOOMBARIO_HEADBONK) + Call(N(UnkFunc62), LVarA, 3) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + EndSwitch + ChildThread + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.3), Float(0.5), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.0), Float(1.0), Float(1.0)) + EndChildThread + Wait(1) + Wait(2) + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) + Switch(LVar9) + CaseEq(PARTNER_RANK_NORMAL) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(PARTNER_RANK_SUPER) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(PARTNER_RANK_ULTRA) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Label(100) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(YieldTurn) + ExecWait(N(EVS_HeadbonkFollowthrough)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; API_CALLABLE(N(CalculateTattleCamBoomLength)) { @@ -520,58 +520,58 @@ API_CALLABLE(N(CloseTattleWindow)) { } EvtScript N(EVS_Move_Tattle) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_WAIT(10) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_TATTLE_OPEN, TRUE) - EVT_CALL(N(OpenTattleWindow), LVar5) - EVT_WAIT(12) - EVT_CALL(EnableBattleStatusBar, FALSE) - EVT_CALL(SetCamEnabled, CAM_TATTLE, TRUE) - EVT_CALL(SetCamNoDraw, CAM_TATTLE, FALSE) - EVT_CALL(SetCamPerspective, CAM_TATTLE, CAM_UPDATE_MODE_6, 25, 16, 1024) - EVT_CALL(SetCamViewport, CAM_TATTLE, 37, 95, 138, 99) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 8) - EVT_SET(LVar1, 0) - EVT_CALL(N(CalculateTattleCamBoomLength)) - EVT_WAIT(1) - EVT_CALL(func_802CAE50, CAM_TATTLE, LVar0, LVar1, LVar2) - EVT_CALL(func_802CABE8, CAM_TATTLE, 0, LVar3, 100, 4) - EVT_WAIT(2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_TATTLE_WINDOW_OPEN) - EVT_CALL(SetCamNoDraw, CAM_TATTLE, TRUE) - EVT_WAIT(10) - EVT_CALL(ActorSpeak, MSG_EnemyTattle_Mario, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Talk, ANIM_BattleGoombario_Idle) - EVT_CALL(N(CloseTattleWindow), LVar5) - EVT_WAIT(12) - EVT_CALL(SetCamEnabled, CAM_TATTLE, FALSE) - EVT_WAIT(32) - EVT_CALL(EnableBattleStatusBar, TRUE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_TATTLE_OPEN, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Wait(10) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetBattleFlagBits, BS_FLAGS1_TATTLE_OPEN, TRUE) + Call(N(OpenTattleWindow), LVar5) + Wait(12) + Call(EnableBattleStatusBar, FALSE) + Call(SetCamEnabled, CAM_TATTLE, TRUE) + Call(SetCamNoDraw, CAM_TATTLE, FALSE) + Call(SetCamPerspective, CAM_TATTLE, CAM_UPDATE_MODE_6, 25, 16, 1024) + Call(SetCamViewport, CAM_TATTLE, 37, 95, 138, 99) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 8) + Set(LVar1, 0) + Call(N(CalculateTattleCamBoomLength)) + Wait(1) + Call(func_802CAE50, CAM_TATTLE, LVar0, LVar1, LVar2) + Call(func_802CABE8, CAM_TATTLE, 0, LVar3, 100, 4) + Wait(2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_TATTLE_WINDOW_OPEN) + Call(SetCamNoDraw, CAM_TATTLE, TRUE) + Wait(10) + Call(ActorSpeak, MSG_EnemyTattle_Mario, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Talk, ANIM_BattleGoombario_Idle) + Call(N(CloseTattleWindow), LVar5) + Wait(12) + Call(SetCamEnabled, CAM_TATTLE, FALSE) + Wait(32) + Call(EnableBattleStatusBar, TRUE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetBattleFlagBits, BS_FLAGS1_TATTLE_OPEN, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 10) - EVT_EXEC_WAIT(N(EVS_Move_Tattle)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_Headbonk)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(RandInt, 100, LVar0) + IfLt(LVar0, 10) + ExecWait(N(EVS_Move_Tattle)) + Else + ExecWait(N(EVS_Attack_Headbonk)) + EndIf + Return + End }; Formation A(GoombarioCloneFormation) = { diff --git a/src/battle/common/actor/duplighost/ghost_kooper.inc.c b/src/battle/common/actor/duplighost/ghost_kooper.inc.c index 283f2e33e49..944a0ecd5ea 100644 --- a/src/battle/common/actor/duplighost/ghost_kooper.inc.c +++ b/src/battle/common/actor/duplighost/ghost_kooper.inc.c @@ -109,403 +109,403 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Kooper_ToppleTurns, 0) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_Kooper_ToppleTurns, 0) + Return + End }; #include "common/battle/SetAbsoluteStatusOffsets.inc.c" EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -2, 38) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -3, -9) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 25, 10, 25) - EVT_CASE_EQ(1) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 5, 15) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -6) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, LVar0) + Switch(LVar0) + CaseEq(0) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -2, 38) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -3, -9) + Call(N(SetAbsoluteStatusOffsets), -10, 25, 10, 25) + CaseEq(1) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 5, 15) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -6) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + EndSwitch + Wait(1) + Goto(0) + Return + End }; s32 N(FlipPosOffsets)[] = { 9, 16, 22, 26, 30, 32, 33, 32, 30, 26, 22, 16, 9, 0, 4, 6, 7, 6, 4, 0, 2, 0 }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CALL(GetLastElement, LVar1) - EVT_IF_FLAG(LVar1, DAMAGE_TYPE_SHOCK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Hurt) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnHitElectric)) - EVT_RETURN - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleKooper_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleKooper_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_FLIP_TRIGGER) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Kooper_ToppleTurns, 1) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledDefenseTable))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppleAnims))) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 5, 15) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -6) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_Hurt) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_THREAD - EVT_WAIT(4) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 30) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -30) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -60) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -75) - EVT_WAIT(1) - EVT_END_THREAD - EVT_USE_BUF(N(FlipPosOffsets)) - EVT_LOOP(ARRAY_COUNT(N(FlipPosOffsets))) - EVT_BUF_READ1(LVar0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_Toppled) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Idle) - EVT_CASE_EQ(1) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Toppled) - EVT_END_SWITCH - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Toppled) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_END_IF - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Run) - EVT_SET_CONST(LVar2, ANIM_BattleKooper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Run) - EVT_CASE_EQ(1) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(3.0)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Toppled) - EVT_END_SWITCH - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) - EVT_ELSE - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Hurt) - EVT_CASE_EQ(1) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Toppled) - EVT_END_SWITCH - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + Call(GetLastElement, LVar1) + IfFlag(LVar1, DAMAGE_TYPE_SHOCK) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Hurt) + ExecWait(A(EVS_Duplighost_OnHitElectric)) + Return + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Hurt) + ExecWait(EVS_Enemy_Hit) + EndIf + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_BurnHurt) + SetConst(LVar2, ANIM_BattleKooper_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_BurnHurt) + SetConst(LVar2, ANIM_BattleKooper_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(A(EVS_Duplighost_OnDeath)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + ExecWait(A(EVS_Duplighost_OnDeath)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_FLIP_TRIGGER) + Call(SetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_Kooper_ToppleTurns, 1) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledDefenseTable))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppleAnims))) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 5, 15) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -6) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_Hurt) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Thread + Wait(4) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 30) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -30) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -60) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -75) + Wait(1) + EndThread + UseBuf(N(FlipPosOffsets)) + Loop(ARRAY_COUNT(N(FlipPosOffsets))) + BufRead1(LVar0) + Call(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_Toppled) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + Call(GetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, LVar0) + Switch(LVar0) + CaseEq(0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Idle) + CaseEq(1) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Toppled) + EndSwitch + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + ExecWait(A(EVS_Duplighost_OnDeath)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + Call(GetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, LVar0) + IfEq(LVar0, 1) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Toppled) + ExecWait(EVS_Enemy_NoDamageHit) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Idle) + ExecWait(EVS_Enemy_Recover) + EndIf + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Run) + SetConst(LVar2, ANIM_BattleKooper_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + Call(GetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, LVar0) + Switch(LVar0) + CaseEq(0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Run) + CaseEq(1) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(3.0)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Toppled) + EndSwitch + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + Call(GetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, LVar0) + Switch(LVar0) + CaseEq(0) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) + Else + Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) + EndIf + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Hurt) + CaseEq(1) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Toppled) + EndSwitch + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/UnkActorPosFunc.inc.c" EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Kooper_ToppleTurns, LVar0) - EVT_SUB(LVar0, 1) - EVT_IF_GT(LVar0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Kooper_ToppleTurns, LVar0) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(3.0)) - EVT_WAIT(30) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_ELSE - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(3.0)) - EVT_WAIT(20) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_Toppled) - EVT_SET(LVar0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_THREAD - EVT_LOOP(5) - EVT_ADD(LVar0, 15) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_Idle) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, 0) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(UprightDefenseTable))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -2, 38) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -3, -9) - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_EnterShell) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_NONE) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ShellSpinSlowest) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_KOOPER_SHELL_SPINUP) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 75) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_1, BTL_CAM_MODEX_1, TRUE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PARTNER_RANK_NORMAL) - EVT_SET(LVar0, 10) - EVT_CASE_EQ(PARTNER_RANK_SUPER) - EVT_SET(LVar0, 20) - EVT_CASE_EQ(PARTNER_RANK_ULTRA) - EVT_SET(LVar0, 30) - EVT_END_SWITCH - EVT_SET(LVar9, 0) - EVT_LOOP(LVar0) - EVT_ADD(LVar9, 1) - EVT_SWITCH(LVar9) - EVT_CASE_LT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ShellSpinSlowest) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0)) - EVT_CASE_EQ(20) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) - EVT_CASE_LT(40) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ShellSpinSlower) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(12.0)) - EVT_CASE_EQ(40) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) - EVT_CASE_LT(50) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ShellSpinFaster) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(14.0)) - EVT_CASE_EQ(50) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) - EVT_CASE_LT(60) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ShellSpinFastest) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(16.0)) - EVT_CASE_EQ(60) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAKARRY_AIR_RAID_1) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 15) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_ZERO, 0, ACTOR_DECORATION_GREY_SMOKE_TRAIL) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_THREAD - EVT_CALL(N(UnkActorPosFunc)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 0) - EVT_END_THREAD - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ShellStill) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, -8, 0, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(5) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 16, 4, 0, 10, 0) - EVT_LOOP(5) - EVT_ADD(LVar0, -12) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 2) - EVT_WAIT(2) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -2) - EVT_WAIT(2) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ExitShell) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.5)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(PARTNER_RANK_NORMAL) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 2, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(PARTNER_RANK_SUPER) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(PARTNER_RANK_ULTRA) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 5, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 8) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 60) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ExitShell) - EVT_WAIT(15) - EVT_CALL(YieldTurn) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.5)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, LVar0) + IfEq(LVar0, 1) + Call(GetActorVar, ACTOR_SELF, AVAR_Kooper_ToppleTurns, LVar0) + Sub(LVar0, 1) + IfGt(LVar0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Kooper_ToppleTurns, LVar0) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(3.0)) + Wait(30) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Else + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(3.0)) + Wait(20) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_Toppled) + Set(LVar0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Thread + Loop(5) + Add(LVar0, 15) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(3.0)) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_Idle) + Call(SetActorVar, ACTOR_SELF, AVAR_Kooper_Toppled, 0) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(UprightDefenseTable))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -2, 38) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -3, -9) + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_EnterShell) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_NONE) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ShellSpinSlowest) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_KOOPER_SHELL_SPINUP) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 75) + Call(func_8024ECF8, BTL_CAM_MODEY_1, BTL_CAM_MODEX_1, TRUE) + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar0) + Switch(LVar0) + CaseEq(PARTNER_RANK_NORMAL) + Set(LVar0, 10) + CaseEq(PARTNER_RANK_SUPER) + Set(LVar0, 20) + CaseEq(PARTNER_RANK_ULTRA) + Set(LVar0, 30) + EndSwitch + Set(LVar9, 0) + Loop(LVar0) + Add(LVar9, 1) + Switch(LVar9) + CaseLt(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ShellSpinSlowest) + Call(SetActorSpeed, ACTOR_SELF, Float(10.0)) + CaseEq(20) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) + CaseLt(40) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ShellSpinSlower) + Call(SetActorSpeed, ACTOR_SELF, Float(12.0)) + CaseEq(40) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) + CaseLt(50) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ShellSpinFaster) + Call(SetActorSpeed, ACTOR_SELF, Float(14.0)) + CaseEq(50) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) + CaseLt(60) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ShellSpinFastest) + Call(SetActorSpeed, ACTOR_SELF, Float(16.0)) + CaseEq(60) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) + EndSwitch + Wait(1) + EndLoop + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAKARRY_AIR_RAID_1) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 15) + Call(AddActorDecoration, ACTOR_SELF, PRT_ZERO, 0, ACTOR_DECORATION_GREY_SMOKE_TRAIL) + Call(SetGoalToTarget, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Thread + Call(N(UnkActorPosFunc)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 0) + EndThread + Wait(4) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ShellStill) + Call(SetActorRotationOffset, ACTOR_SELF, -8, 0, 0) + Set(LVar0, 0) + Loop(2) + Add(LVar0, 30) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Wait(5) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 16, 4, 0, 10, 0) + Loop(5) + Add(LVar0, -12) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 2) + Wait(2) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -2) + Wait(2) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ExitShell) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.5)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) + Switch(LVar9) + CaseEq(PARTNER_RANK_NORMAL) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 2, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(PARTNER_RANK_SUPER) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(PARTNER_RANK_ULTRA) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 5, BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 8) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 60) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.4)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Add(LVar0, 10) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_ExitShell) + Wait(15) + Call(YieldTurn) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleKooper_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.5)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; Formation A(KooperCloneFormation) = { diff --git a/src/battle/common/actor/duplighost/ghost_lakilester.inc.c b/src/battle/common/actor/duplighost/ghost_lakilester.inc.c index 63620768604..607bc95981a 100644 --- a/src/battle/common/actor/duplighost/ghost_lakilester.inc.c +++ b/src/battle/common/actor/duplighost/ghost_lakilester.inc.c @@ -108,276 +108,276 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CALL(GetLastElement, LVar1) - EVT_IF_FLAG(LVar1, DAMAGE_TYPE_SHOCK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnHitElectric)) - EVT_RETURN - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleLakilester_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleLakilester_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Dead) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Dead) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Dead) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Run) - EVT_SET_CONST(LVar2, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + Call(GetLastElement, LVar1) + IfFlag(LVar1, DAMAGE_TYPE_SHOCK) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(A(EVS_Duplighost_OnHitElectric)) + Return + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Enemy_Hit) + EndIf + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_BurnHurt) + SetConst(LVar2, ANIM_BattleLakilester_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_BurnHurt) + SetConst(LVar2, ANIM_BattleLakilester_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(A(EVS_Duplighost_OnDeath)) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + ExecWait(A(EVS_Duplighost_OnDeath)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Dead) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Enemy_Knockback) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + CaseEq(EVENT_SHOCK_DEATH) + ExecWait(A(EVS_Duplighost_OnDeath)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Dead) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + ExecWait(A(EVS_Duplighost_OnDeath)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Dead) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Run) + SetConst(LVar2, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_Run) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, 20, 30, LVar2) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_Idle) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, -1) - EVT_ADD(LVar1, 4) - EVT_ADD(LVar2, 2) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_SPINY, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_ELSE - EVT_ADD(LVar0, -3) - EVT_ADD(LVar1, 10) - EVT_ADD(LVar2, 5) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_SPINY, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_SPINY, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SPINY, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPINY, ANIM_BattleLakilester_Spiny) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_LiftSpiny) - EVT_LOOP(4) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_ADDF(LVar1, EVT_FLOAT(2.4)) - EVT_ELSE - EVT_ADD(LVar1, 6) - EVT_END_IF - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_SPINY, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, -3) - EVT_ADD(LVar1, 16) - EVT_ADD(LVar2, 2) - EVT_SETF(LVar3, EVT_FLOAT(0.4)) - EVT_ELSE - EVT_ADD(LVar0, -8) - EVT_ADD(LVar1, 40) - EVT_ADD(LVar2, 5) - EVT_SETF(LVar3, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 0, LVar0, LVar1, LVar2, LVar3, 30, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPIKE_SUMMON_SPINY) - EVT_THREAD - EVT_LOOP(15) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 1, 0, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_SPINY, 1, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, -1, 0, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_SPINY, -1, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_SPINY, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_HoldSpiny) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_StrainHoldSpiny) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_ThrowSpiny) - EVT_WAIT(3) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_SPINY, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LAKILESTER_THROW_SPINY_A) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPINY, ANIM_BattleLakilester_SpinySpin) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_SPINY, EVT_FLOAT(1.5)) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RandInt, 100, LVar3) - EVT_SUB(LVar3, 50) - EVT_ADD(LVar0, LVar3) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_SPINY, LVar0, 0, LVar2, 20, TRUE) - EVT_THREAD - EVT_ADD(LVar0, -50) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_SPINY, LVar0, 0, LVar2, 15, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SPINY, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_END_THREAD - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(YieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 60) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPINY, ANIM_BattleLakilester_SpinySpin) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_SPINY, EVT_FLOAT(1.5)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_SPINY, LVar0, LVar1, LVar2, 20, TRUE) - EVT_THREAD - EVT_ADD(LVar0, -50) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_SPINY, LVar0, 0, LVar2, 15, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SPINY, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_END_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(PARTNER_RANK_NORMAL) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(PARTNER_RANK_SUPER) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 4, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(PARTNER_RANK_ULTRA) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 5, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_WAIT(15) - EVT_CALL(YieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_Run) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, 20, 30, LVar2) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_Idle) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Add(LVar0, -1) + Add(LVar1, 4) + Add(LVar2, 2) + Call(SetPartScale, ACTOR_SELF, PRT_SPINY, Float(0.4), Float(0.4), Float(0.4)) + Else + Add(LVar0, -3) + Add(LVar1, 10) + Add(LVar2, 5) + Call(SetPartScale, ACTOR_SELF, PRT_SPINY, Float(1.0), Float(1.0), Float(1.0)) + EndIf + Call(SetPartPos, ACTOR_SELF, PRT_SPINY, LVar0, LVar1, LVar2) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SPINY, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_SPINY, ANIM_BattleLakilester_Spiny) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_LiftSpiny) + Loop(4) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + AddF(LVar1, Float(2.4)) + Else + Add(LVar1, 6) + EndIf + Call(SetPartPos, ACTOR_SELF, PRT_SPINY, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Add(LVar0, -3) + Add(LVar1, 16) + Add(LVar2, 2) + SetF(LVar3, Float(0.4)) + Else + Add(LVar0, -8) + Add(LVar1, 40) + Add(LVar2, 5) + SetF(LVar3, Float(1.0)) + EndIf + PlayEffect(EFFECT_ENERGY_IN_OUT, 0, LVar0, LVar1, LVar2, LVar3, 30, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPIKE_SUMMON_SPINY) + Thread + Loop(15) + Call(SetActorDispOffset, ACTOR_SELF, 1, 0, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_SPINY, 1, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, -1, 0, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_SPINY, -1, 0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetPartDispOffset, ACTOR_SELF, PRT_SPINY, 0, 0, 0) + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_HoldSpiny) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_StrainHoldSpiny) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_ThrowSpiny) + Wait(3) + Call(SetPartSounds, ACTOR_SELF, PRT_SPINY, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LAKILESTER_THROW_SPINY_A) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetAnimation, ACTOR_SELF, PRT_SPINY, ANIM_BattleLakilester_SpinySpin) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_SPINY, Float(1.5)) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RandInt, 100, LVar3) + Sub(LVar3, 50) + Add(LVar0, LVar3) + Call(JumpPartTo, ACTOR_SELF, PRT_SPINY, LVar0, 0, LVar2, 20, TRUE) + Thread + Add(LVar0, -50) + Call(JumpPartTo, ACTOR_SELF, PRT_SPINY, LVar0, 0, LVar2, 15, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SPINY, ACTOR_PART_FLAG_INVISIBLE, TRUE) + EndThread + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(15) + Call(YieldTurn) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 60) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_SPINY, ANIM_BattleLakilester_SpinySpin) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_SPINY, Float(1.5)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpPartTo, ACTOR_SELF, PRT_SPINY, LVar0, LVar1, LVar2, 20, TRUE) + Thread + Add(LVar0, -50) + Call(JumpPartTo, ACTOR_SELF, PRT_SPINY, LVar0, 0, LVar2, 15, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SPINY, ACTOR_PART_FLAG_INVISIBLE, TRUE) + EndThread + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) + Switch(LVar9) + CaseEq(PARTNER_RANK_NORMAL) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(PARTNER_RANK_SUPER) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 4, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(PARTNER_RANK_ULTRA) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, 5, BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Wait(15) + Call(YieldTurn) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleLakilester_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; Formation A(LakilesterCloneFormation) = { diff --git a/src/battle/common/actor/duplighost/ghost_parakarry.inc.c b/src/battle/common/actor/duplighost/ghost_parakarry.inc.c index 94c152f5d40..7a572234cf0 100644 --- a/src/battle/common/actor/duplighost/ghost_parakarry.inc.c +++ b/src/battle/common/actor/duplighost/ghost_parakarry.inc.c @@ -103,244 +103,244 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CALL(GetLastElement, LVar1) - EVT_IF_FLAG(LVar1, DAMAGE_TYPE_SHOCK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_Hurt) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnHitElectric)) - EVT_RETURN - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleParakarry_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleParakarry_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_Hurt) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnShockHit)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_HurtStill) - EVT_SET(LVar2, 22) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnShockDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_Run) - EVT_SET_CONST(LVar2, ANIM_BattleParakarry_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) - EVT_ELSE - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + Call(GetLastElement, LVar1) + IfFlag(LVar1, DAMAGE_TYPE_SHOCK) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_Hurt) + ExecWait(A(EVS_Duplighost_OnHitElectric)) + Return + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_Hurt) + ExecWait(EVS_Enemy_Hit) + EndIf + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_BurnHurt) + SetConst(LVar2, ANIM_BattleParakarry_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_BurnHurt) + SetConst(LVar2, ANIM_BattleParakarry_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(A(EVS_Duplighost_OnDeath)) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + ExecWait(A(EVS_Duplighost_OnDeath)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_Hurt) + ExecWait(A(EVS_Duplighost_OnShockHit)) + Return + CaseEq(EVENT_SHOCK_DEATH) + ExecWait(A(EVS_Duplighost_OnDeath)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_HurtStill) + Set(LVar2, 22) + ExecWait(A(EVS_Duplighost_OnShockDeath)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + ExecWait(A(EVS_Duplighost_OnDeath)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_Run) + SetConst(LVar2, ANIM_BattleParakarry_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) + Else + Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) + EndIf + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_SkyDive) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Run) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 20, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Still) - EVT_WAIT(3) - EVT_CALL(UseBattleCamPresetImmediately, BTL_CAM_PRESET_01) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAKARRY_PREDIVE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_FlyFast) - EVT_CALL(AddGoalPos, ACTOR_SELF, 0, 10, 0) - EVT_CALL(FlyToGoal, ACTOR_SELF, 5, 0, EASING_LINEAR) - EVT_WAIT(2) - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_PreDive) - EVT_END_THREAD - EVT_CALL(AddGoalPos, ACTOR_SELF, 40, 15, 0) - EVT_CALL(FlyToGoal, ACTOR_SELF, 20, -20, EASING_QUARTIC_OUT) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAKARRY_DIVE) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Dive) - EVT_CALL(FlyToGoal, ACTOR_SELF, 5, 0, EASING_LINEAR) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Idle) - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -40, 10, 0) - EVT_CALL(FlyToGoal, ACTOR_SELF, 10, -20, EASING_QUADRATIC_OUT) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(20) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Run) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_PostDive) - EVT_WAIT(1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(PARTNER_RANK_NORMAL) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(PARTNER_RANK_SUPER) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(PARTNER_RANK_ULTRA) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 5, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_CALL(PlaySound, SOUND_NONE) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Dive) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4)) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Still) - EVT_THREAD - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Run) - EVT_END_THREAD - EVT_CALL(AddGoalPos, ACTOR_SELF, 30, 0, 0) - EVT_CALL(JumpWithBounce, ACTOR_SELF, 10, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Idle) - EVT_WAIT(6) - EVT_CALL(YieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Run) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Run) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 20, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Still) + Wait(3) + Call(UseBattleCamPresetImmediately, BTL_CAM_PRESET_01) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAKARRY_PREDIVE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_FlyFast) + Call(AddGoalPos, ACTOR_SELF, 0, 10, 0) + Call(FlyToGoal, ACTOR_SELF, 5, 0, EASING_LINEAR) + Wait(2) + Thread + Wait(3) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_PreDive) + EndThread + Call(AddGoalPos, ACTOR_SELF, 40, 15, 0) + Call(FlyToGoal, ACTOR_SELF, 20, -20, EASING_QUARTIC_OUT) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAKARRY_DIVE) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Dive) + Call(FlyToGoal, ACTOR_SELF, 5, 0, EASING_LINEAR) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Thread + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Idle) + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -40, 10, 0) + Call(FlyToGoal, ACTOR_SELF, 10, -20, EASING_QUADRATIC_OUT) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(20) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Run) + Call(FlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_PostDive) + Wait(1) + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) + Switch(LVar9) + CaseEq(PARTNER_RANK_NORMAL) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(PARTNER_RANK_SUPER) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(PARTNER_RANK_ULTRA) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 5, BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Call(PlaySound, SOUND_NONE) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Dive) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.4)) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Still) + Thread + Wait(4) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Run) + EndThread + Call(AddGoalPos, ACTOR_SELF, 30, 0, 0) + Call(JumpWithBounce, ACTOR_SELF, 10, Float(4.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Idle) + Wait(6) + Call(YieldTurn) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleParakarry_Run) + Call(FlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_EXEC_WAIT(N(EVS_Attack_SkyDive)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_Attack_SkyDive)) + Return + End }; Formation A(ParakarryCloneFormation) = { diff --git a/src/battle/common/actor/duplighost/ghost_sushie.inc.c b/src/battle/common/actor/duplighost/ghost_sushie.inc.c index 286114b2643..10714c2d19c 100644 --- a/src/battle/common/actor/duplighost/ghost_sushie.inc.c +++ b/src/battle/common/actor/duplighost/ghost_sushie.inc.c @@ -91,368 +91,368 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CALL(GetLastElement, LVar1) - EVT_IF_FLAG(LVar1, DAMAGE_TYPE_SHOCK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnHitElectric)) - EVT_RETURN - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleSushie_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleSushie_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnShockHit)) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_SET(LVar2, 20) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnShockDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Run) - EVT_SET_CONST(LVar2, ANIM_BattleSushie_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + Call(GetLastElement, LVar1) + IfFlag(LVar1, DAMAGE_TYPE_SHOCK) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + ExecWait(A(EVS_Duplighost_OnHitElectric)) + Return + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + ExecWait(EVS_Enemy_Hit) + EndIf + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_BurnHurt) + SetConst(LVar2, ANIM_BattleSushie_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_BurnHurt) + SetConst(LVar2, ANIM_BattleSushie_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(A(EVS_Duplighost_OnDeath)) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + ExecWait(A(EVS_Duplighost_OnDeath)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + ExecWait(A(EVS_Duplighost_OnShockHit)) + Return + CaseEq(EVENT_SHOCK_DEATH) + ExecWait(A(EVS_Duplighost_OnDeath)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + Set(LVar2, 20) + ExecWait(A(EVS_Duplighost_OnShockDeath)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + ExecWait(A(EVS_Duplighost_OnDeath)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Run) + SetConst(LVar2, ANIM_BattleSushie_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 70, 0, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, LVar0) - EVT_DIV(LVar3, EVT_FLOAT(3.0)) - EVT_SET(LVarA, LVar3) - EVT_IF_LT(LVarA, 0) - EVT_MUL(LVarA, -1) - EVT_END_IF - EVT_CALL(MoveBattleCamOver, LVarA) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Run) - EVT_CALL(RunToGoal, ACTOR_SELF, LVarA, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Idle) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_08) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(AddBattleCamZoom, -50) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_1, BTL_CAM_MODEX_1, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Tense1) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Tense2) - EVT_WAIT(15) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Jump) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 36) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 20) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PARTNER_RANK_NORMAL) - EVT_WAIT(13) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CASE_EQ(PARTNER_RANK_SUPER) - EVT_WAIT(13) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.05), EVT_FLOAT(1.05), EVT_FLOAT(1.05)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.1), EVT_FLOAT(1.1), EVT_FLOAT(1.1)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.15), EVT_FLOAT(1.15), EVT_FLOAT(1.15)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.2), EVT_FLOAT(1.2), EVT_FLOAT(1.2)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.25), EVT_FLOAT(1.25), EVT_FLOAT(1.25)) - EVT_CASE_EQ(PARTNER_RANK_ULTRA) - EVT_WAIT(13) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.1), EVT_FLOAT(1.1), EVT_FLOAT(1.1)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.2), EVT_FLOAT(1.2), EVT_FLOAT(1.2)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.3), EVT_FLOAT(1.3), EVT_FLOAT(1.3)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.4), EVT_FLOAT(1.4), EVT_FLOAT(1.4)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.5), EVT_FLOAT(1.5), EVT_FLOAT(1.5)) - EVT_END_SWITCH - EVT_END_THREAD - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_BELLY_FLOP) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Jump) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Fall) - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Land) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(LandJump, ACTOR_SELF) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_STEP) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(AddGoalPos, ACTOR_SELF, -15, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_STEP) - EVT_CALL(AddGoalPos, ACTOR_SELF, -10, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_STEP) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Jump) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 36) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 20) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PARTNER_RANK_NORMAL) - EVT_WAIT(13) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.1), EVT_FLOAT(1.1), EVT_FLOAT(1.1)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.1), EVT_FLOAT(1.1), EVT_FLOAT(1.1)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.2), EVT_FLOAT(1.2), EVT_FLOAT(1.2)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.2), EVT_FLOAT(1.2), EVT_FLOAT(1.2)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.3), EVT_FLOAT(1.3), EVT_FLOAT(1.3)) - EVT_CASE_EQ(PARTNER_RANK_SUPER) - EVT_WAIT(13) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.15), EVT_FLOAT(1.15), EVT_FLOAT(1.15)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.2), EVT_FLOAT(1.2), EVT_FLOAT(1.2)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.35), EVT_FLOAT(1.35), EVT_FLOAT(1.35)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.4), EVT_FLOAT(1.4), EVT_FLOAT(1.4)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.55), EVT_FLOAT(1.55), EVT_FLOAT(1.55)) - EVT_CASE_EQ(PARTNER_RANK_ULTRA) - EVT_WAIT(13) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.2), EVT_FLOAT(1.2), EVT_FLOAT(1.2)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.3), EVT_FLOAT(1.3), EVT_FLOAT(1.3)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.5), EVT_FLOAT(1.5), EVT_FLOAT(1.5)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.6), EVT_FLOAT(1.6), EVT_FLOAT(1.6)) - EVT_WAIT(1) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.8), EVT_FLOAT(1.8), EVT_FLOAT(1.8)) - EVT_END_SWITCH - EVT_END_THREAD - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_BELLY_FLOP) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Jump) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Fall) - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Land) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVarA) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(PARTNER_RANK_NORMAL) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(PARTNER_RANK_SUPER) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 4, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(PARTNER_RANK_ULTRA) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 5, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Fall) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 60) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_STEP) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_STEP) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_STEP) - EVT_ADD(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_STEP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Idle) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 70, 0, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Sub(LVar3, LVar0) + Div(LVar3, Float(3.0)) + Set(LVarA, LVar3) + IfLt(LVarA, 0) + Mul(LVarA, -1) + EndIf + Call(MoveBattleCamOver, LVarA) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Run) + Call(RunToGoal, ACTOR_SELF, LVarA, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Idle) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_08) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(AddBattleCamZoom, -50) + Call(MoveBattleCamOver, 30) + Call(func_8024ECF8, BTL_CAM_MODEY_1, BTL_CAM_MODEX_1, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Tense1) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Tense2) + Wait(15) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Jump) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 36) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotation, ACTOR_SELF, 0, 0, 20) + EndThread + Thread + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar0) + Switch(LVar0) + CaseEq(PARTNER_RANK_NORMAL) + Wait(13) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.0), Float(1.0), Float(1.0)) + CaseEq(PARTNER_RANK_SUPER) + Wait(13) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.05), Float(1.05), Float(1.05)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.1), Float(1.1), Float(1.1)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.15), Float(1.15), Float(1.15)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.2), Float(1.2), Float(1.2)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.25), Float(1.25), Float(1.25)) + CaseEq(PARTNER_RANK_ULTRA) + Wait(13) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.1), Float(1.1), Float(1.1)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.2), Float(1.2), Float(1.2)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.3), Float(1.3), Float(1.3)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.4), Float(1.4), Float(1.4)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.5), Float(1.5), Float(1.5)) + EndSwitch + EndThread + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_BELLY_FLOP) + Call(SetGoalToTarget, ACTOR_SELF) + Thread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Jump) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Fall) + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Land) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.0), Float(1.0), Float(1.0)) + Call(LandJump, ACTOR_SELF) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_STEP) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(AddGoalPos, ACTOR_SELF, -15, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_STEP) + Call(AddGoalPos, ACTOR_SELF, -10, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_STEP) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Jump) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 36) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotation, ACTOR_SELF, 0, 0, 20) + EndThread + Thread + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar0) + Switch(LVar0) + CaseEq(PARTNER_RANK_NORMAL) + Wait(13) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.1), Float(1.1), Float(1.1)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.1), Float(1.1), Float(1.1)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.2), Float(1.2), Float(1.2)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.2), Float(1.2), Float(1.2)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.3), Float(1.3), Float(1.3)) + CaseEq(PARTNER_RANK_SUPER) + Wait(13) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.15), Float(1.15), Float(1.15)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.2), Float(1.2), Float(1.2)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.35), Float(1.35), Float(1.35)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.4), Float(1.4), Float(1.4)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.55), Float(1.55), Float(1.55)) + CaseEq(PARTNER_RANK_ULTRA) + Wait(13) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.2), Float(1.2), Float(1.2)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.3), Float(1.3), Float(1.3)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.5), Float(1.5), Float(1.5)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.6), Float(1.6), Float(1.6)) + Wait(1) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.8), Float(1.8), Float(1.8)) + EndSwitch + EndThread + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_BELLY_FLOP) + Call(SetGoalToTarget, ACTOR_SELF) + Thread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Jump) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Fall) + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Land) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Thread + Wait(3) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(1.0), Float(1.0), Float(1.0)) + EndThread + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVarA) + Switch(LVarA) + CaseEq(PARTNER_RANK_NORMAL) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(PARTNER_RANK_SUPER) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 4, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(PARTNER_RANK_ULTRA) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, 5, BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Fall) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 60) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.4)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_STEP) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_STEP) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_STEP) + Add(LVar0, 10) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SUSHIE_STEP) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Idle) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleSushie_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; Formation A(SushieCloneFormation) = { diff --git a/src/battle/common/actor/duplighost/ghost_watt.inc.c b/src/battle/common/actor/duplighost/ghost_watt.inc.c index 8c7fc551d9e..938e9246918 100644 --- a/src/battle/common/actor/duplighost/ghost_watt.inc.c +++ b/src/battle/common/actor/duplighost/ghost_watt.inc.c @@ -105,11 +105,11 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; API_CALLABLE(N(WattFXUpdate)) { @@ -198,10 +198,10 @@ API_CALLABLE(N(WattFXUpdate)) { } EvtScript N(EVS_Idle) = { - EVT_SET_PRIORITY(99) - EVT_CALL(N(WattFXUpdate)) - EVT_RETURN - EVT_END + SetPriority(99) + Call(N(WattFXUpdate)) + Return + End }; API_CALLABLE(N(WattFXRemove)) { @@ -245,91 +245,91 @@ API_CALLABLE(N(WattFXSetEffect)) { } EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(N(WattFXSetBouncing), 0) - EVT_CALL(N(WattFXSetActive), 1) - EVT_CALL(N(WattFXSetEffect), 0) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleWatt_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleWatt_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CALL(N(WattFXRemove)) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_CALL(N(WattFXRemove)) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_CALL(N(WattFXRemove)) - EVT_EXEC_WAIT(A(EVS_Duplighost_OnDeath)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Run) - EVT_SET_CONST(LVar2, ANIM_BattleWatt_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(N(WattFXSetBouncing), 1) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(N(WattFXSetBouncing), 0) + Call(N(WattFXSetActive), 1) + Call(N(WattFXSetEffect), 0) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_BurnHurt) + SetConst(LVar2, ANIM_BattleWatt_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_BurnHurt) + SetConst(LVar2, ANIM_BattleWatt_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + Call(N(WattFXRemove)) + ExecWait(A(EVS_Duplighost_OnDeath)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + Call(N(WattFXRemove)) + ExecWait(A(EVS_Duplighost_OnDeath)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + Call(N(WattFXRemove)) + ExecWait(A(EVS_Duplighost_OnDeath)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_Run) + SetConst(LVar2, ANIM_BattleWatt_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(N(WattFXSetBouncing), 1) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/UnkBackgroundFunc3.inc.c" @@ -337,123 +337,123 @@ EvtScript N(EVS_HandleEvent) = { #include "common/SetBackgroundAlpha.inc.c" EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 350) - EVT_CALL(SetBattleCamOffsetZ, 40) - EVT_CALL(MoveBattleCamOver, 80) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Run) - EVT_CALL(N(WattFXSetEffect), 1) - EVT_CALL(AddGoalPos, ACTOR_SELF, 15, -10, 5) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Idle) - EVT_CALL(N(WattFXSetEffect), 0) - EVT_WAIT(5) - EVT_CALL(N(WattFXSetBouncing), 0) - EVT_CALL(AddGoalPos, ACTOR_SELF, 25, 20, 0) - EVT_CALL(FlyToGoal, ACTOR_SELF, 15, -20, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Strain) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(FlyToGoal, ACTOR_SELF, 5, 0, EASING_COS_IN_OUT) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Idle) - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -40, 10, 0) - EVT_CALL(FlyToGoal, ACTOR_SELF, 10, -20, EASING_QUADRATIC_OUT) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(N(WattFXSetActive), 1) - EVT_CALL(N(WattFXSetBouncing), 1) - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Run) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Idle) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(N(WattFXSetActive), 0) - EVT_SET(LVarA, 40) - EVT_CALL(AddBattleCamZoom, -75) - EVT_CALL(MoveBattleCamOver, LVarA) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_WATT_CHARGE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 4) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 8, LVar0, LVar1, LVar2, EVT_FLOAT(0.52), LVarA, 0) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 12) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 8, LVar0, LVar1, LVar2, EVT_FLOAT(1.3), LVarA, 0) - EVT_END_IF - EVT_CALL(N(UnkBackgroundFunc3)) - EVT_SET(LVar9, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_StrainBigger) - EVT_LOOP(LVarA) - EVT_ADD(LVar9, 3) - EVT_IF_GT(LVar9, 200) - EVT_SET(LVar9, 200) - EVT_END_IF - EVT_CALL(N(SetBackgroundAlpha), LVar9) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Idle) - EVT_CALL(SetActorPaletteEffect, ACTOR_SELF, PRT_MAIN, ACTOR_PAL_ADJUST_WATT_IDLE) - EVT_CALL(AddBattleCamZoom, 75) - EVT_CALL(MoveBattleCamOver, 5) - EVT_THREAD - EVT_WAIT(2) - EVT_CALL(N(SetBackgroundAlpha), 0) - EVT_END_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(PARTNER_RANK_NORMAL) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_IGNORE_DEFENSE, SUPPRESS_EVENT_ALL, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(PARTNER_RANK_SUPER) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_IGNORE_DEFENSE, SUPPRESS_EVENT_ALL, 0, 4, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(PARTNER_RANK_ULTRA) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_IGNORE_DEFENSE, SUPPRESS_EVENT_ALL, 0, 5, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(N(WattFXSetActive), 1) - EVT_CALL(N(WattFXSetBouncing), 1) - EVT_CALL(AddGoalPos, ACTOR_SELF, 25, 10, 0) - EVT_CALL(FlyToGoal, ACTOR_SELF, 15, -10, EASING_COS_IN_OUT) - EVT_WAIT(15) - EVT_CALL(YieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Run) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Idle) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 350) + Call(SetBattleCamOffsetZ, 40) + Call(MoveBattleCamOver, 80) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Run) + Call(N(WattFXSetEffect), 1) + Call(AddGoalPos, ACTOR_SELF, 15, -10, 5) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Idle) + Call(N(WattFXSetEffect), 0) + Wait(5) + Call(N(WattFXSetBouncing), 0) + Call(AddGoalPos, ACTOR_SELF, 25, 20, 0) + Call(FlyToGoal, ACTOR_SELF, 15, -20, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Strain) + Call(SetGoalToTarget, ACTOR_SELF) + Call(FlyToGoal, ACTOR_SELF, 5, 0, EASING_COS_IN_OUT) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Thread + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Idle) + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -40, 10, 0) + Call(FlyToGoal, ACTOR_SELF, 10, -20, EASING_QUADRATIC_OUT) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(N(WattFXSetActive), 1) + Call(N(WattFXSetBouncing), 1) + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Run) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Idle) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(N(WattFXSetActive), 0) + Set(LVarA, 40) + Call(AddBattleCamZoom, -75) + Call(MoveBattleCamOver, LVarA) + Call(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_WATT_CHARGE) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 4) + PlayEffect(EFFECT_RADIAL_SHIMMER, 8, LVar0, LVar1, LVar2, Float(0.52), LVarA, 0) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 12) + PlayEffect(EFFECT_RADIAL_SHIMMER, 8, LVar0, LVar1, LVar2, Float(1.3), LVarA, 0) + EndIf + Call(N(UnkBackgroundFunc3)) + Set(LVar9, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_StrainBigger) + Loop(LVarA) + Add(LVar9, 3) + IfGt(LVar9, 200) + Set(LVar9, 200) + EndIf + Call(N(SetBackgroundAlpha), LVar9) + Wait(1) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Idle) + Call(SetActorPaletteEffect, ACTOR_SELF, PRT_MAIN, ACTOR_PAL_ADJUST_WATT_IDLE) + Call(AddBattleCamZoom, 75) + Call(MoveBattleCamOver, 5) + Thread + Wait(2) + Call(N(SetBackgroundAlpha), 0) + EndThread + Call(GetActorVar, ACTOR_SELF, AVAR_Copy_PartnerLevel, LVar9) + Switch(LVar9) + CaseEq(PARTNER_RANK_NORMAL) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_IGNORE_DEFENSE, SUPPRESS_EVENT_ALL, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(PARTNER_RANK_SUPER) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_IGNORE_DEFENSE, SUPPRESS_EVENT_ALL, 0, 4, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(PARTNER_RANK_ULTRA) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_IGNORE_DEFENSE, SUPPRESS_EVENT_ALL, 0, 5, BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(N(WattFXSetActive), 1) + Call(N(WattFXSetBouncing), 1) + Call(AddGoalPos, ACTOR_SELF, 25, 10, 0) + Call(FlyToGoal, ACTOR_SELF, 15, -10, EASING_COS_IN_OUT) + Wait(15) + Call(YieldTurn) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Run) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleWatt_Idle) + EndCaseGroup + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; Formation A(WattCloneFormation) = { diff --git a/src/battle/common/actor/ember.inc.c b/src/battle/common/actor/ember.inc.c index 13b0fbfc20d..b90c279ff02 100644 --- a/src/battle/common/actor/ember.inc.c +++ b/src/battle/common/actor/ember.inc.c @@ -170,130 +170,130 @@ s32 N(ProjectileAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IN_Flying, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_StayNearGound, TRUE) - EVT_CASE_EQ(1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_StayNearGound, FALSE) - EVT_END_SWITCH - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_FIRE_1, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_FIRE_2, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_FIRE_3, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_FIRE_4, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Generation, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_PauseIdle, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 5) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(GetActorVar, ACTOR_SELF, AVAR_IN_Flying, LVar0) + Switch(LVar0) + CaseEq(0) + Call(SetActorVar, ACTOR_SELF, AVAR_StayNearGound, TRUE) + CaseEq(1) + Call(SetActorVar, ACTOR_SELF, AVAR_StayNearGound, FALSE) + EndSwitch + Call(SetPartScale, ACTOR_SELF, PRT_FIRE_1, Float(0.5), Float(0.5), Float(0.5)) + Call(SetPartScale, ACTOR_SELF, PRT_FIRE_2, Float(0.5), Float(0.5), Float(0.5)) + Call(SetPartScale, ACTOR_SELF, PRT_FIRE_3, Float(0.5), Float(0.5), Float(0.5)) + Call(SetPartScale, ACTOR_SELF, PRT_FIRE_4, Float(0.5), Float(0.5), Float(0.5)) + Call(SetActorVar, ACTOR_SELF, AVAR_Generation, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_PauseIdle, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 5) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, 10, 25, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(GetHomePos, ACTOR_SELF, LVar2, LVar3, LVar4) - EVT_ADD(LVar0, LVar3) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar2, LVar0, LVar4) - EVT_IF_EQ(LVar1, 1) - EVT_LABEL(11) - EVT_WAIT(1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_GOTO(11) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PauseIdle, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_GOTO(11) - EVT_END_IF - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(MakeLerp, 10, 0, 25, EASING_COS_IN_OUT) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(GetHomePos, ACTOR_SELF, LVar2, LVar3, LVar4) - EVT_ADD(LVar0, LVar3) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar2, LVar0, LVar4) - EVT_IF_EQ(LVar1, 1) - EVT_LABEL(22) - EVT_WAIT(1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_GOTO(22) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PauseIdle, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_GOTO(22) - EVT_END_IF - EVT_GOTO(2) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(MakeLerp, 0, 10, 25, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(GetHomePos, ACTOR_SELF, LVar2, LVar3, LVar4) + Add(LVar0, LVar3) + Call(SetActorPos, ACTOR_SELF, LVar2, LVar0, LVar4) + IfEq(LVar1, 1) + Label(11) + Wait(1) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Goto(11) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_PauseIdle, LVar0) + IfEq(LVar0, TRUE) + Goto(11) + EndIf + Goto(1) + EndIf + Call(MakeLerp, 10, 0, 25, EASING_COS_IN_OUT) + Label(2) + Call(UpdateLerp) + Call(GetHomePos, ACTOR_SELF, LVar2, LVar3, LVar4) + Add(LVar0, LVar3) + Call(SetActorPos, ACTOR_SELF, LVar2, LVar0, LVar4) + IfEq(LVar1, 1) + Label(22) + Wait(1) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Goto(22) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_PauseIdle, LVar0) + IfEq(LVar0, TRUE) + Goto(22) + EndIf + Goto(2) + EndIf + Goto(0) + Return + End }; #include "common/PlayLavaBubbleFlightSound.inc.c" EvtScript N(EVS_FlyHome) = { - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim03) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_THREAD - EVT_CALL(N(PlayLavaBubbleFlightSound)) - EVT_END_THREAD - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim01) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim03) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Thread + Call(N(PlayLavaBubbleFlightSound)) + EndThread + Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim01) + Return + End }; EvtScript N(EVS_GetAvailableColumn) = { - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar5) - EVT_CALL(GetIndexFromHome, LVar0, LVar5) - EVT_MOD(LVar5, 4) - EVT_SWITCH(LVar5) - EVT_CASE_EQ(0) - EVT_SET(LFlag1, TRUE) - EVT_CASE_EQ(1) - EVT_SET(LFlag2, TRUE) - EVT_CASE_EQ(2) - EVT_SET(LFlag3, TRUE) - EVT_CASE_EQ(3) - EVT_SET(LFlag4, TRUE) - EVT_END_SWITCH - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_EQ(LFlag1, FALSE) - EVT_SET(LVarA, 0) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LFlag2, FALSE) - EVT_SET(LVarA, 1) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LFlag3, FALSE) - EVT_SET(LVarA, 2) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LFlag4, FALSE) - EVT_SET(LVarA, 3) - EVT_RETURN - EVT_END_IF - EVT_SET(LVarA, -1) - EVT_RETURN - EVT_END + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar5) + Call(GetIndexFromHome, LVar0, LVar5) + Mod(LVar5, 4) + Switch(LVar5) + CaseEq(0) + Set(LFlag1, TRUE) + CaseEq(1) + Set(LFlag2, TRUE) + CaseEq(2) + Set(LFlag3, TRUE) + CaseEq(3) + Set(LFlag4, TRUE) + EndSwitch + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + IfEq(LFlag1, FALSE) + Set(LVarA, 0) + Return + EndIf + IfEq(LFlag2, FALSE) + Set(LVarA, 1) + Return + EndIf + IfEq(LFlag3, FALSE) + Set(LVarA, 2) + Return + EndIf + IfEq(LFlag4, FALSE) + Set(LVarA, 3) + Return + EndIf + Set(LVarA, -1) + Return + End }; Vec3i N(SummonPos) = { NPC_DISPOSE_LOCATION }; @@ -303,274 +303,274 @@ Formation N(SummonFormation) = { }; EvtScript N(EVS_TrySplit) = { - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_IF_LE(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetLastElement, LVar0) - EVT_IF_FLAG(LVar0, DAMAGE_TYPE_MULTIPLE_POPUPS) // interesting use-case - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar0) - EVT_IF_GE(LVar0, 2) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_GetAvailableColumn)) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(0) - EVT_CASE_OR_EQ(1) - EVT_CASE_OR_EQ(2) - EVT_CASE_OR_EQ(3) - EVT_CALL(SummonEnemy, EVT_PTR(N(SummonFormation)), FALSE) - EVT_CALL(SetActorVar, LVar0, AVAR_PauseIdle, TRUE) - EVT_CALL(GetActorHP, ACTOR_SELF, LVarB) - EVT_CALL(SetEnemyHP, LVar0, LVarB) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarB, LVarC, LVarD) - EVT_CALL(SetActorPos, LVar0, LVarB, LVarC, LVarD) - EVT_CALL(SetGoalToIndex, LVar0, LVarA) - EVT_CALL(GetGoalPos, LVar0, LVarB, LVarC, LVarD) - EVT_CALL(SetHomePos, LVar0, LVarB, LVarC, LVarD) - EVT_CALL(SetActorJumpGravity, LVar0, EVT_FLOAT(1.2)) - EVT_CALL(JumpToGoal, LVar0, 20, FALSE, TRUE, FALSE) - EVT_CALL(HPBarToHome, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar1) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(SetActorVar, LVar0, AVAR_Generation, 1) - EVT_CASE_EQ(1) - EVT_CALL(SetActorVar, LVar0, AVAR_Generation, 2) - EVT_END_SWITCH - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Generation, 3) - EVT_CALL(SetActorVar, LVar0, AVAR_PauseIdle, FALSE) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetLastDamage, ACTOR_SELF, LVar0) + IfEq(LVar0, 0) + Return + EndIf + Call(GetActorHP, ACTOR_SELF, LVar0) + IfLe(LVar0, 0) + Return + EndIf + Call(GetLastElement, LVar0) + IfFlag(LVar0, DAMAGE_TYPE_MULTIPLE_POPUPS) // interesting use-case + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar0) + IfGe(LVar0, 2) + Return + EndIf + ExecWait(N(EVS_GetAvailableColumn)) + Switch(LVarA) + CaseOrEq(0) + CaseOrEq(1) + CaseOrEq(2) + CaseOrEq(3) + Call(SummonEnemy, Ref(N(SummonFormation)), FALSE) + Call(SetActorVar, LVar0, AVAR_PauseIdle, TRUE) + Call(GetActorHP, ACTOR_SELF, LVarB) + Call(SetEnemyHP, LVar0, LVarB) + Call(GetActorPos, ACTOR_SELF, LVarB, LVarC, LVarD) + Call(SetActorPos, LVar0, LVarB, LVarC, LVarD) + Call(SetGoalToIndex, LVar0, LVarA) + Call(GetGoalPos, LVar0, LVarB, LVarC, LVarD) + Call(SetHomePos, LVar0, LVarB, LVarC, LVarD) + Call(SetActorJumpGravity, LVar0, Float(1.2)) + Call(JumpToGoal, LVar0, 20, FALSE, TRUE, FALSE) + Call(HPBarToHome, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar1) + Switch(LVar1) + CaseEq(0) + Call(SetActorVar, LVar0, AVAR_Generation, 1) + CaseEq(1) + Call(SetActorVar, LVar0, AVAR_Generation, 2) + EndSwitch + Call(SetActorVar, ACTOR_SELF, AVAR_Generation, 3) + Call(SetActorVar, LVar0, AVAR_PauseIdle, FALSE) + EndCaseGroup + CaseDefault + EndSwitch + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_EXEC(N(EVS_TrySplit)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_EXEC(N(EVS_TrySplit)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim08) - EVT_SET_CONST(LVar2, ANIM_LavaBubble_Blue_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim08) - EVT_SET_CONST(LVar2, ANIM_LavaBubble_Blue_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_EXEC(N(EVS_TrySplit)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_EMBER_FLY | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_EXEC_WAIT(N(EVS_FlyHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_EMBER_FLY | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CASE_OR_EQ(EVENT_BURN_TAUNT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0) - EVT_CALL(HPBarToCurrent, ACTOR_SELF) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_FlyHome)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim03) - EVT_SET_CONST(LVar2, ANIM_LavaBubble_Blue_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Blue_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_UP_AND_AWAY) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + Exec(N(EVS_TrySplit)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Blue_Anim07) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + Exec(N(EVS_TrySplit)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Blue_Anim08) + SetConst(LVar2, ANIM_LavaBubble_Blue_Anim09) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Blue_Anim08) + SetConst(LVar2, ANIM_LavaBubble_Blue_Anim09) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Blue_Anim09) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + Exec(N(EVS_TrySplit)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Blue_Anim07) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Blue_Anim07) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Blue_Anim07) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_EMBER_FLY | SOUND_ID_TRIGGER_CHANGE_SOUND) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Blue_Anim07) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Blue_Anim07) + ExecWait(EVS_Enemy_Knockback) + ExecWait(N(EVS_FlyHome)) + CaseEq(EVENT_SHOCK_DEATH) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_EMBER_FLY | SOUND_ID_TRIGGER_CHANGE_SOUND) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Blue_Anim07) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Blue_Anim07) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + CaseOrEq(EVENT_BURN_TAUNT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Blue_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Blue_Anim07) + ExecWait(EVS_Enemy_Hit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Blue_Anim07) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + Call(SetActorPos, ACTOR_SELF, 20, 0, 0) + Call(HPBarToCurrent, ACTOR_SELF) + CaseEq(EVENT_END_FIRST_STRIKE) + ExecWait(N(EVS_FlyHome)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Blue_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Blue_Anim03) + SetConst(LVar2, ANIM_LavaBubble_Blue_Anim07) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Blue_Anim03) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Blue_Anim03) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseEq(EVENT_UP_AND_AWAY) // nothing - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_Tackle) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim03) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 5) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_THREAD - EVT_CALL(N(PlayLavaBubbleFlightSound)) - EVT_END_THREAD - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 0, EASING_SIN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim01) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim04) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_ADD(LVar2, 1) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 3, FALSE, TRUE, FALSE) - EVT_WAIT(14) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_EXEC_WAIT(N(EVS_FlyHome)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim04) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 1) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_FIRE, 0, 0, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_SET(LVar0, PRT_MAIN) - EVT_SET(LVar1, ANIM_LavaBubble_Blue_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_WAIT(5) - EVT_EXEC_WAIT(N(EVS_FlyHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim03) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Set(LVar1, 5) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Thread + Call(N(PlayLavaBubbleFlightSound)) + EndThread + Call(FlyToGoal, ACTOR_SELF, 0, 0, EASING_SIN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim01) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim04) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Set(LVar1, 0) + Add(LVar2, 1) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Sub(LVar0, 10) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 3, FALSE, TRUE, FALSE) + Wait(14) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorYaw, ACTOR_SELF, 180) + ExecWait(N(EVS_FlyHome)) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim04) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar2, 1) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_FIRE, 0, 0, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Set(LVar0, PRT_MAIN) + Set(LVar1, ANIM_LavaBubble_Blue_Anim04) + ExecWait(EVS_Enemy_Knockback) + Wait(5) + ExecWait(N(EVS_FlyHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; // (in) LVar3 posX // (in) LVar4 posY // (in) LVar5 posZ EvtScript N(EVS_ShootFire_Impl) = { - EVT_SET(LVar6, PRT_FIRE_1) - EVT_LOOP(4) - EVT_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartScale, ACTOR_SELF, LVar6, EVT_FLOAT(0.2), EVT_FLOAT(0.2), EVT_FLOAT(0.2)) - EVT_ELSE - EVT_CALL(SetPartScale, ACTOR_SELF, LVar6, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_END_IF - EVT_CALL(SetPartPos, ACTOR_SELF, LVar6, LVar0, LVar1, LVar2) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar6, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, LVar6, EVT_FLOAT(8.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVar6, EVT_FLOAT(0.01)) - EVT_CALL(SetPartSounds, ACTOR_SELF, LVar6, ACTOR_SOUND_JUMP, SOUND_EMBER_SPIT, SOUND_NONE) - EVT_CALL(JumpPartTo, ACTOR_SELF, LVar6, LVar3, LVar4, LVar5, 0, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar6, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_END_THREAD - EVT_WAIT(3) - EVT_ADD(LVar6, 1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVar6, PRT_FIRE_1) + Loop(4) + Thread + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Call(SetPartScale, ACTOR_SELF, LVar6, Float(0.2), Float(0.2), Float(0.2)) + Else + Call(SetPartScale, ACTOR_SELF, LVar6, Float(0.5), Float(0.5), Float(0.5)) + EndIf + Call(SetPartPos, ACTOR_SELF, LVar6, LVar0, LVar1, LVar2) + Call(SetPartFlagBits, ACTOR_SELF, LVar6, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetPartMoveSpeed, ACTOR_SELF, LVar6, Float(8.0)) + Call(SetPartJumpGravity, ACTOR_SELF, LVar6, Float(0.01)) + Call(SetPartSounds, ACTOR_SELF, LVar6, ACTOR_SOUND_JUMP, SOUND_EMBER_SPIT, SOUND_NONE) + Call(JumpPartTo, ACTOR_SELF, LVar6, LVar3, LVar4, LVar5, 0, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, LVar6, ACTOR_PART_FLAG_INVISIBLE, TRUE) + EndThread + Wait(3) + Add(LVar6, 1) + EndLoop + Return + End }; // Shoot fireballs at a target and wait before yielding. @@ -578,230 +578,230 @@ EvtScript N(EVS_ShootFire_Impl) = { // (in) LVar4 posY // (in) LVar5 posZ EvtScript N(EVS_ShootFire) = { - EVT_EXEC(N(EVS_ShootFire_Impl)) - EVT_CALL(GetDistanceToGoal, ACTOR_SELF, LVar0) - EVT_DIVF(LVar0, EVT_FLOAT(8.0)) - EVT_ADD(LVar0, 1) - EVT_WAIT(LVar0) - EVT_RETURN - EVT_END + Exec(N(EVS_ShootFire_Impl)) + Call(GetDistanceToGoal, ACTOR_SELF, LVar0) + DivF(LVar0, Float(8.0)) + Add(LVar0, 1) + Wait(LVar0) + Return + End }; EvtScript N(EVS_Attack_ShootPartner) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_StayNearGound, LVarA) - EVT_IF_EQ(LVarA, TRUE) - EVT_ADD(LVar0, 100) - EVT_SET(LVar1, 5) - EVT_ELSE - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 50) - EVT_END_IF - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim03) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_THREAD - EVT_CALL(N(PlayLavaBubbleFlightSound)) - EVT_END_THREAD - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, EASING_SIN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim01) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim05) - EVT_WAIT(30) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim06) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_ADD(LVar1, 4) - EVT_ADD(LVar2, 2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 100) - EVT_ADD(LVar5, 2) - EVT_EXEC_WAIT(N(EVS_ShootFire)) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_EXEC_WAIT(N(EVS_FlyHome)) - EVT_WAIT(20) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim06) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_ADD(LVar1, 4) - EVT_ADD(LVar2, 2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_SUB(LVar4, 6) - EVT_ADD(LVar5, 2) - EVT_EXEC_WAIT(N(EVS_ShootFire)) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, (DAMAGE_TYPE_FIRE | DAMAGE_TYPE_NO_CONTACT), 0, 0, DMG_SHOOT, BS_FLAGS1_TRIGGER_EVENTS) - EVT_WAIT(20) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_EXEC_WAIT(N(EVS_FlyHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(GetActorVar, ACTOR_SELF, AVAR_StayNearGound, LVarA) + IfEq(LVarA, TRUE) + Add(LVar0, 100) + Set(LVar1, 5) + Else + Add(LVar0, 30) + Set(LVar1, 50) + EndIf + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim03) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Thread + Call(N(PlayLavaBubbleFlightSound)) + EndThread + Call(FlyToGoal, ACTOR_SELF, 0, -4, EASING_SIN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim01) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim05) + Wait(30) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim06) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Add(LVar1, 4) + Add(LVar2, 2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Sub(LVar3, 100) + Add(LVar5, 2) + ExecWait(N(EVS_ShootFire)) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorYaw, ACTOR_SELF, 180) + ExecWait(N(EVS_FlyHome)) + Wait(20) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim06) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Add(LVar1, 4) + Add(LVar2, 2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Sub(LVar4, 6) + Add(LVar5, 2) + ExecWait(N(EVS_ShootFire)) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, (DAMAGE_TYPE_FIRE | DAMAGE_TYPE_NO_CONTACT), 0, 0, DMG_SHOOT, BS_FLAGS1_TRIGGER_EVENTS) + Wait(20) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ExecWait(N(EVS_FlyHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_AirSweep) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim03) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 30, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_THREAD - EVT_CALL(N(PlayLavaBubbleFlightSound)) - EVT_END_THREAD - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, EASING_SIN_OUT) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_WAIT(10) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_EMBER_JUMP) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim04) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HOP) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_ADD(LVar2, 2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim04) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_QUADRATIC_OUT) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_EXEC_WAIT(N(EVS_FlyHome)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_WAIT(5) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_EMBER_JUMP) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim04) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HOP) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_QUADRATIC_OUT) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_FIRE, 0, 0, DMG_AIR_SWEEP, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(EVS_FlyHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim03) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 30, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Thread + Call(N(PlayLavaBubbleFlightSound)) + EndThread + Call(FlyToGoal, ACTOR_SELF, 0, -4, EASING_SIN_OUT) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Wait(10) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_EMBER_JUMP) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim04) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HOP) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Add(LVar2, 2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim04) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_QUADRATIC_OUT) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorYaw, ACTOR_SELF, 180) + ExecWait(N(EVS_FlyHome)) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Wait(5) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_EMBER_JUMP) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Blue_Anim04) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) + Set(LVarA, LVar0) + Set(LVarB, LVar1) + Set(LVarC, LVar2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HOP) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar2, 2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_QUADRATIC_OUT) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_FIRE, 0, 0, DMG_AIR_SWEEP, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) + Wait(20) + ExecWait(N(EVS_FlyHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_StayNearGound, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_Attack_Tackle)) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_Attack_AirSweep)) - EVT_END_SWITCH - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_StayNearGound, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(1) - EVT_CALL(GetStatusFlags, ACTOR_PARTNER, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_KO) - EVT_EXEC_WAIT(N(EVS_Attack_Tackle)) - EVT_ELSE - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LE(LVar0, 300) - EVT_EXEC_WAIT(N(EVS_Attack_ShootPartner)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_Tackle)) - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(0) - EVT_CALL(GetStatusFlags, ACTOR_PARTNER, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_KO) - EVT_EXEC_WAIT(N(EVS_Attack_AirSweep)) - EVT_ELSE - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LE(LVar0, 300) - EVT_EXEC_WAIT(N(EVS_Attack_ShootPartner)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_AirSweep)) - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(GetActorVar, ACTOR_SELF, AVAR_StayNearGound, LVar0) + Switch(LVar0) + CaseEq(1) + ExecWait(N(EVS_Attack_Tackle)) + CaseEq(0) + ExecWait(N(EVS_Attack_AirSweep)) + EndSwitch + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_StayNearGound, LVar0) + Switch(LVar0) + CaseEq(1) + Call(GetStatusFlags, ACTOR_PARTNER, LVar0) + IfFlag(LVar0, STATUS_FLAG_KO) + ExecWait(N(EVS_Attack_Tackle)) + Else + Call(RandInt, 1000, LVar0) + IfLe(LVar0, 300) + ExecWait(N(EVS_Attack_ShootPartner)) + Else + ExecWait(N(EVS_Attack_Tackle)) + EndIf + EndIf + CaseEq(0) + Call(GetStatusFlags, ACTOR_PARTNER, LVar0) + IfFlag(LVar0, STATUS_FLAG_KO) + ExecWait(N(EVS_Attack_AirSweep)) + Else + Call(RandInt, 1000, LVar0) + IfLe(LVar0, 300) + ExecWait(N(EVS_Attack_ShootPartner)) + Else + ExecWait(N(EVS_Attack_AirSweep)) + EndIf + EndIf + EndSwitch + Return + End }; diff --git a/src/battle/common/actor/forest_fuzzy.inc.c b/src/battle/common/actor/forest_fuzzy.inc.c index 4a2a660a1a7..0a3f7be2209 100644 --- a/src/battle/common/actor/forest_fuzzy.inc.c +++ b/src/battle/common/actor/forest_fuzzy.inc.c @@ -106,567 +106,567 @@ s32 N(DefaultAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Generation, 0) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_Generation, 0) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CALL(GetLastElement, LVar0) - EVT_IF_FLAG(LVar0, DAMAGE_TYPE_SHOCK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Forest_HurtShock) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Forest_Hurt) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Forest_Burn) - EVT_SET_CONST(LVar2, ANIM_Fuzzy_Forest_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Forest_Burn) - EVT_SET_CONST(LVar2, ANIM_Fuzzy_Forest_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Forest_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Forest_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Forest_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Forest_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_CALL(func_80269470) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Forest_HurtShock) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Forest_HurtShock) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Forest_Run) - EVT_EXEC_WAIT(EVS_Enemy_HopHome) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_CALL(func_80269470) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Forest_HurtShock) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Forest_HurtShock) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Forest_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_CALL(GetLastElement, LVar0) - EVT_IF_FLAG(LVar0, DAMAGE_TYPE_SHOCK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Forest_HurtShock) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Forest_HurtShock) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Forest_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Forest_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_END_IF - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Forest_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Forest_Run) - EVT_SET_CONST(LVar2, ANIM_Fuzzy_Forest_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Forest_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Forest_Run) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Forest_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + Call(GetLastElement, LVar0) + IfFlag(LVar0, DAMAGE_TYPE_SHOCK) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Forest_HurtShock) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Forest_Hurt) + EndIf + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Forest_Burn) + SetConst(LVar2, ANIM_Fuzzy_Forest_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Forest_Burn) + SetConst(LVar2, ANIM_Fuzzy_Forest_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Forest_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Forest_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Forest_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Forest_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + Call(func_80269470) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Forest_HurtShock) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Forest_HurtShock) + ExecWait(EVS_Enemy_Knockback) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Forest_Run) + ExecWait(EVS_Enemy_HopHome) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + CaseEq(EVENT_SHOCK_DEATH) + Call(func_80269470) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Forest_HurtShock) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Forest_HurtShock) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Forest_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + Call(GetLastElement, LVar0) + IfFlag(LVar0, DAMAGE_TYPE_SHOCK) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Forest_HurtShock) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Forest_HurtShock) + ExecWait(EVS_Enemy_Death) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Forest_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Forest_Hurt) + ExecWait(EVS_Enemy_Death) + EndIf + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Forest_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Forest_Run) + SetConst(LVar2, ANIM_Fuzzy_Forest_Anim09) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Forest_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Forest_Run) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Forest_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Move_Clone) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 330) - EVT_CALL(SetBattleCamOffsetZ, 30) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_01) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FUZZY_RUMBLE) - EVT_WAIT(30) - EVT_LOOP(4) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FUZZY_SHAKE) - EVT_WAIT(11) - EVT_END_LOOP - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FUZZY_DIVIDE) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Anim0D) - EVT_WAIT(130) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Walk) - EVT_CALL(SummonEnemy, EVT_PTR(N(CloneFormation)), FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_CALL(SetActorPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(SetGoalToIndex, LVar0, LVarA) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Walk) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_CALL(JumpToGoal, ACTOR_SELF, 14, FALSE, TRUE, FALSE) - EVT_END_THREAD - EVT_WAIT(1) - EVT_CALL(SetAnimation, LVar0, 1, ANIM_Fuzzy_Forest_Walk) - EVT_CALL(SetActorJumpGravity, LVar0, EVT_FLOAT(1.4)) - EVT_CALL(JumpToGoal, LVar0, 14, FALSE, TRUE, FALSE) - EVT_CALL(GetActorPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(ForceHomePos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(HPBarToHome, LVar0) - EVT_CALL(SetAnimation, LVar0, 1, ANIM_Fuzzy_Forest_Idle) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar1) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(SetActorVar, LVar0, AVAR_Generation, 1) - EVT_CASE_EQ(1) - EVT_CALL(SetActorVar, LVar0, AVAR_Generation, 2) - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 330) + Call(SetBattleCamOffsetZ, 30) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_01) + Thread + Wait(30) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FUZZY_RUMBLE) + Wait(30) + Loop(4) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FUZZY_SHAKE) + Wait(11) + EndLoop + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FUZZY_DIVIDE) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Anim0D) + Wait(130) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Walk) + Call(SummonEnemy, Ref(N(CloneFormation)), FALSE) + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Call(SetActorPos, LVar0, LVar1, LVar2, LVar3) + Call(SetGoalToIndex, LVar0, LVarA) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Thread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Walk) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.4)) + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Call(SetGoalPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Call(JumpToGoal, ACTOR_SELF, 14, FALSE, TRUE, FALSE) + EndThread + Wait(1) + Call(SetAnimation, LVar0, 1, ANIM_Fuzzy_Forest_Walk) + Call(SetActorJumpGravity, LVar0, Float(1.4)) + Call(JumpToGoal, LVar0, 14, FALSE, TRUE, FALSE) + Call(GetActorPos, LVar0, LVar1, LVar2, LVar3) + Call(ForceHomePos, LVar0, LVar1, LVar2, LVar3) + Call(HPBarToHome, LVar0) + Call(SetAnimation, LVar0, 1, ANIM_Fuzzy_Forest_Idle) + Call(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar1) + Switch(LVar1) + CaseEq(0) + Call(SetActorVar, LVar0, AVAR_Generation, 1) + CaseEq(1) + Call(SetActorVar, LVar0, AVAR_Generation, 2) + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/SpawnEnemyDrainFX.inc.c" EvtScript N(EVS_Attack_Leech) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_GOTO(100) - EVT_END_IF - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Run) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_EXEC_WAIT(EVS_Enemy_HopToPos) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Idle) - EVT_LABEL(100) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Anim04) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 9, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 8, 0) - EVT_WAIT(5) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_SET(LVar1, 0) - EVT_SUB(LVar2, 5) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Jump) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 11, FALSE, TRUE, FALSE) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Anim09) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 15) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(4) - EVT_WAIT(5) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_EXEC_WAIT(EVS_Enemy_HopToPos) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_EQ(HIT_RESULT_HIT_STATIC) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_STATIC) - EVT_SET(LFlag0, FALSE) - EVT_ELSE - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -3, -12, -15) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Jump) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_RETURN - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Leeching) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Bite) - EVT_WAIT(21) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Still) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 330) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, -3, -2, 0) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.9), EVT_FLOAT(1.2), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.8), EVT_FLOAT(1.3), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.4), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.5), EVT_FLOAT(1.0)) - EVT_WAIT(2) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.6), EVT_FLOAT(1.6), EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_WAIT(2) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, DMG_LEECH, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Idle) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetLastDamage, ACTOR_PLAYER, LVar3) - EVT_IF_NE(LVar3, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_CALL(N(SpawnDrainHealthStartFX), LVar0, LVar1, LVar2, LVar3) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_STAR_BOUNCE_A) - EVT_CALL(N(SpawnDrainHealthContinueFX), LVar0, LVar1, LVar2, LVar3) - EVT_END_THREAD - EVT_ADD(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_RECOVER, 0, LVar0, LVar1, LVar2, LVar3, 0) - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_ADD(LVar0, LVar3) - EVT_CALL(SetEnemyHP, ACTOR_SELF, LVar0) - EVT_END_IF - EVT_THREAD - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.6), EVT_FLOAT(0.6), EVT_FLOAT(1.0)) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 10, 0) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 330) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.5), EVT_FLOAT(1.0)) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 300) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 270) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(0.7), EVT_FLOAT(1.0)) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 240) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 210) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.4), EVT_FLOAT(1.0)) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 180) - EVT_WAIT(2) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(0.7), EVT_FLOAT(1.0)) - EVT_WAIT(2) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.2), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.4), EVT_FLOAT(0.2), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.2), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 150) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 120) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 90) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 60) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 30) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_WAIT(5) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_EXEC_WAIT(EVS_Enemy_HopToPos) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Idle) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Set(LVar1, 0) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Goto(100) + EndIf + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Run) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Set(LVar1, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + ExecWait(EVS_Enemy_HopToPos) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Idle) + Label(100) + Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Anim04) + Call(SetActorDispOffset, ACTOR_SELF, 0, 9, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 8, 0) + Wait(5) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Set(LVar1, 0) + Sub(LVar2, 5) + Call(SetActorJumpGravity, ACTOR_SELF, Float(3.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Jump) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 11, FALSE, TRUE, FALSE) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Anim09) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Call(SetActorJumpGravity, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 15) + Call(SetActorJumpGravity, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Wait(4) + Wait(5) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + ExecWait(EVS_Enemy_HopToPos) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + CaseEq(HIT_RESULT_HIT_STATIC) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_STATIC) + Set(LFlag0, FALSE) + Else + Set(LFlag0, TRUE) + EndIf + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -3, -12, -15) + Call(SetActorJumpGravity, ACTOR_SELF, Float(3.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Jump) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + IfEq(LFlag0, TRUE) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 0, BS_FLAGS1_TRIGGER_EVENTS) + Return + EndIf + Wait(10) + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Leeching) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Bite) + Wait(21) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Still) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 330) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) + Call(SetActorDispOffset, ACTOR_SELF, -3, -2, 0) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.9), Float(1.2), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.8), Float(1.3), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.4), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.5), Float(1.0)) + Wait(2) + Call(SetActorScale, ACTOR_SELF, Float(0.6), Float(1.6), Float(1.0)) + Wait(10) + Wait(2) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Call(EnemyDamageTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, DMG_LEECH, BS_FLAGS1_TRIGGER_EVENTS) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Idle) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetLastDamage, ACTOR_PLAYER, LVar3) + IfNe(LVar3, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 10) + Call(N(SpawnDrainHealthStartFX), LVar0, LVar1, LVar2, LVar3) + Thread + Wait(15) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_STAR_BOUNCE_A) + Call(N(SpawnDrainHealthContinueFX), LVar0, LVar1, LVar2, LVar3) + EndThread + Add(LVar0, 20) + Add(LVar1, 20) + PlayEffect(EFFECT_RECOVER, 0, LVar0, LVar1, LVar2, LVar3, 0) + Call(GetActorHP, ACTOR_SELF, LVar0) + Add(LVar0, LVar3) + Call(SetEnemyHP, ACTOR_SELF, LVar0) + EndIf + Thread + Call(SetActorScale, ACTOR_SELF, Float(1.6), Float(0.6), Float(1.0)) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 10, 0) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 330) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.5), Float(1.0)) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 300) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 270) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(0.7), Float(1.0)) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 240) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 210) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.4), Float(1.0)) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 180) + Wait(2) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(0.7), Float(1.0)) + Wait(2) + Call(SetActorScale, ACTOR_SELF, Float(1.2), Float(0.5), Float(1.0)) + EndThread + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetActorScale, ACTOR_SELF, Float(1.4), Float(0.2), Float(1.0)) + Wait(1) + Thread + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.2), Float(0.5), Float(1.0)) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 150) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 120) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 90) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 60) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 30) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + EndThread + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Wait(5) + Call(YieldTurn) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + ExecWait(EVS_Enemy_HopToPos) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Forest_Idle) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_GetAvailableSpawnPos) = { // find which columns are occupied - EVT_SET(LFlag1, FALSE) - EVT_SET(LFlag2, FALSE) - EVT_SET(LFlag3, FALSE) - EVT_SET(LFlag4, FALSE) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar5) - EVT_CALL(GetIndexFromHome, LVar0, LVar5) - EVT_MOD(LVar5, 4) - EVT_SWITCH(LVar5) - EVT_CASE_EQ(0) - EVT_SET(LFlag1, TRUE) - EVT_CASE_EQ(1) - EVT_SET(LFlag2, TRUE) - EVT_CASE_EQ(2) - EVT_SET(LFlag3, TRUE) - EVT_CASE_EQ(3) - EVT_SET(LFlag4, TRUE) - EVT_END_SWITCH - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF + Set(LFlag1, FALSE) + Set(LFlag2, FALSE) + Set(LFlag3, FALSE) + Set(LFlag4, FALSE) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar5) + Call(GetIndexFromHome, LVar0, LVar5) + Mod(LVar5, 4) + Switch(LVar5) + CaseEq(0) + Set(LFlag1, TRUE) + CaseEq(1) + Set(LFlag2, TRUE) + CaseEq(2) + Set(LFlag3, TRUE) + CaseEq(3) + Set(LFlag4, TRUE) + EndSwitch + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf // check adjacent positions to self - EVT_SET(LVarA, -1) - EVT_SET(LVarB, -1) - EVT_CALL(GetIndexFromHome, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_IF_EQ(LFlag2, FALSE) - EVT_SET(LVarA, 1) - EVT_END_IF - EVT_CASE_EQ(1) - EVT_IF_EQ(LFlag1, FALSE) - EVT_SET(LVarA, 0) - EVT_END_IF - EVT_IF_EQ(LFlag3, FALSE) - EVT_IF_EQ(LVarA, -1) - EVT_SET(LVarA, 2) - EVT_ELSE - EVT_SET(LVarB, 2) - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(2) - EVT_IF_EQ(LFlag2, FALSE) - EVT_SET(LVarA, 1) - EVT_END_IF - EVT_IF_EQ(LFlag4, FALSE) - EVT_IF_EQ(LVarA, -1) - EVT_SET(LVarA, 3) - EVT_ELSE - EVT_SET(LVarB, 3) - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(3) - EVT_IF_EQ(LFlag3, FALSE) - EVT_SET(LVarA, 2) - EVT_END_IF - EVT_END_SWITCH + Set(LVarA, -1) + Set(LVarB, -1) + Call(GetIndexFromHome, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(0) + IfEq(LFlag2, FALSE) + Set(LVarA, 1) + EndIf + CaseEq(1) + IfEq(LFlag1, FALSE) + Set(LVarA, 0) + EndIf + IfEq(LFlag3, FALSE) + IfEq(LVarA, -1) + Set(LVarA, 2) + Else + Set(LVarB, 2) + EndIf + EndIf + CaseEq(2) + IfEq(LFlag2, FALSE) + Set(LVarA, 1) + EndIf + IfEq(LFlag4, FALSE) + IfEq(LVarA, -1) + Set(LVarA, 3) + Else + Set(LVarB, 3) + EndIf + EndIf + CaseEq(3) + IfEq(LFlag3, FALSE) + Set(LVarA, 2) + EndIf + EndSwitch // if both positions are open, choose one at random - EVT_IF_NE(LVarB, -1) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 500) - EVT_SET(LVarA, LVarB) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfNe(LVarB, -1) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 500) + Set(LVarA, LVarB) + EndIf + EndIf + Return + End }; EvtScript N(EVS_CountSummoners) = { - EVT_SET(LVar9, 0) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetOriginalActorType, LVar0, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_OR_EQ(ACTOR_TYPE_FOREST_FUZZY) - EVT_CASE_OR_EQ(ACTOR_TYPE_JUNGLE_FUZZY) - EVT_CALL(GetStatusFlags, LVar0, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(GetActorVar, LVar0, AVAR_Generation, LVar3) - EVT_IF_NE(LVar3, 2) - EVT_ADD(LVar9, 1) - EVT_END_IF - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(ACTOR_TYPE_SPEAR_GUY) - EVT_CALL(GetStatusFlags, LVar0, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(GetActorVar, LVar0, AVAR_SpearGuy_Generation, LVar3) - EVT_IF_LT(LVar3, 2) - EVT_ADD(LVar9, 1) - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVar9, 0) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetOriginalActorType, LVar0, LVar2) + Switch(LVar2) + CaseOrEq(ACTOR_TYPE_FOREST_FUZZY) + CaseOrEq(ACTOR_TYPE_JUNGLE_FUZZY) + Call(GetStatusFlags, LVar0, LVar3) + IfNotFlag(LVar3, STATUS_FLAGS_IMMOBILIZED) + Call(GetActorVar, LVar0, AVAR_Generation, LVar3) + IfNe(LVar3, 2) + Add(LVar9, 1) + EndIf + EndIf + EndCaseGroup + CaseEq(ACTOR_TYPE_SPEAR_GUY) + Call(GetStatusFlags, LVar0, LVar3) + IfNotFlag(LVar3, STATUS_FLAGS_IMMOBILIZED) + Call(GetActorVar, LVar0, AVAR_SpearGuy_Generation, LVar3) + IfLt(LVar3, 2) + Add(LVar9, 1) + EndIf + EndIf + EndSwitch + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_Attack_Leech)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar0) - EVT_IF_EQ(LVar0, 2) - EVT_EXEC_WAIT(N(EVS_Attack_Leech)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_GetAvailableSpawnPos)) - EVT_IF_EQ(LVarA, -1) - EVT_EXEC_WAIT(N(EVS_Attack_Leech)) - EVT_RETURN - EVT_END_IF + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + ExecWait(N(EVS_Attack_Leech)) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar0) + IfEq(LVar0, 2) + ExecWait(N(EVS_Attack_Leech)) + Return + EndIf + ExecWait(N(EVS_GetAvailableSpawnPos)) + IfEq(LVarA, -1) + ExecWait(N(EVS_Attack_Leech)) + Return + EndIf // lower chance to summon when more summoners are in battle - EVT_EXEC_WAIT(N(EVS_CountSummoners)) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(1) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 300) - EVT_EXEC_WAIT(N(EVS_Move_Clone)) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(2) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 150) - EVT_EXEC_WAIT(N(EVS_Move_Clone)) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(3) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 100) - EVT_EXEC_WAIT(N(EVS_Move_Clone)) - EVT_RETURN - EVT_END_IF - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_Attack_Leech)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_CountSummoners)) + Switch(LVar9) + CaseEq(1) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 300) + ExecWait(N(EVS_Move_Clone)) + Return + EndIf + CaseEq(2) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 150) + ExecWait(N(EVS_Move_Clone)) + Return + EndIf + CaseEq(3) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 100) + ExecWait(N(EVS_Move_Clone)) + Return + EndIf + EndSwitch + ExecWait(N(EVS_Attack_Leech)) + Return + End }; Vec3i N(SummonPos) = { NPC_DISPOSE_LOCATION }; diff --git a/src/battle/common/actor/frost_piranha.inc.c b/src/battle/common/actor/frost_piranha.inc.c index 603876c8b6e..d5b775379a3 100644 --- a/src/battle/common/actor/frost_piranha.inc.c +++ b/src/battle/common/actor/frost_piranha.inc.c @@ -104,386 +104,386 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; #include "common/battle/SetAbsoluteStatusOffsets.inc.c" EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_DIZZY) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -27, 33) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 5, -11) - EVT_CALL(N(SetAbsoluteStatusOffsets), -37, 9, -7, 31) - EVT_ELSE - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -15, 50) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 3, -14) - EVT_CALL(N(SetAbsoluteStatusOffsets), -22, 32, 1, 44) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_DIZZY) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -27, 33) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 5, -11) + Call(N(SetAbsoluteStatusOffsets), -37, 9, -7, 31) + Else + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -15, 50) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 3, -14) + Call(N(SetAbsoluteStatusOffsets), -22, 32, 1, 44) + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim03) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim01) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_RETURN - EVT_END + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim03) + Call(SetGoalToHome, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim01) + Call(SetActorYaw, ACTOR_SELF, 0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Frost_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Frost_Anim10) - EVT_SET_CONST(LVar2, ANIM_LargePiranha_Frost_Anim11) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Frost_Anim10) - EVT_SET_CONST(LVar2, ANIM_LargePiranha_Frost_Anim11) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Frost_Anim11) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Frost_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Frost_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Frost_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Frost_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Frost_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Frost_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Frost_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Frost_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Frost_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Frost_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Frost_Anim03) - EVT_SET_CONST(LVar2, ANIM_LargePiranha_Frost_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Frost_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Frost_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Frost_Anim0E) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Frost_Anim10) + SetConst(LVar2, ANIM_LargePiranha_Frost_Anim11) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Frost_Anim10) + SetConst(LVar2, ANIM_LargePiranha_Frost_Anim11) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Frost_Anim11) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Frost_Anim0E) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Frost_Anim0E) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Frost_Anim0E) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Frost_Anim0E) + ExecWait(EVS_Enemy_ShockHit) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Frost_Anim0E) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Frost_Anim0E) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Frost_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Frost_Anim0E) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Frost_Anim0E) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Frost_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Frost_Anim03) + SetConst(LVar2, ANIM_LargePiranha_Frost_Anim0E) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Frost_Anim03) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Frost_Anim03) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_Attack_Bite)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_FROZEN) - EVT_EXEC_WAIT(N(EVS_Attack_Bite)) - EVT_RETURN - EVT_END_IF - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 250) - EVT_EXEC_WAIT(N(EVS_Attack_FrostBreath)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_Bite)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + ExecWait(N(EVS_Attack_Bite)) + Return + EndIf + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfFlag(LVar0, STATUS_FLAG_FROZEN) + ExecWait(N(EVS_Attack_Bite)) + Return + EndIf + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 250) + ExecWait(N(EVS_Attack_FrostBreath)) + Else + ExecWait(N(EVS_Attack_Bite)) + EndIf + Return + End }; EvtScript N(EVS_Attack_Bite) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim18) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_WAIT(8) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 27) - EVT_SET(LVar1, 0) - EVT_SET(LVar3, LVar0) - EVT_SET(LVar4, LVar1) - EVT_SET(LVar5, LVar2) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar6, LVar7, LVar8) - EVT_ADD(LVar3, LVar6) - EVT_ADD(LVar4, LVar7) - EVT_ADD(LVar5, LVar8) - EVT_DIV(LVar3, 2) - EVT_DIV(LVar4, 2) - EVT_DIV(LVar5, 2) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, LVar3, LVar4, LVar5) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(SetBattleCamOffsetZ, 40) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim17) - EVT_WAIT(8) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim03) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim03) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, 10) - EVT_ELSE - EVT_ADD(LVar0, 27) - EVT_END_IF - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim01) - EVT_END_IF - EVT_THREAD - EVT_WAIT(8) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PIRANHA_BITE) - EVT_END_THREAD - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim05) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim06) - EVT_WAIT(6) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim07) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(14) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0)) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim18) - EVT_WAIT(10) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim17) - EVT_WAIT(10) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE) - EVT_ELSE - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim05) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim06) - EVT_WAIT(1) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_BITE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SET(LVarF, LVar0) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim07) - EVT_WAIT(20) - EVT_CALL(YieldTurn) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0)) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim18) - EVT_WAIT(10) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim17) - EVT_WAIT(10) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE) - EVT_ELSE - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim18) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) + Wait(8) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 27) + Set(LVar1, 0) + Set(LVar3, LVar0) + Set(LVar4, LVar1) + Set(LVar5, LVar2) + Call(GetActorPos, ACTOR_PLAYER, LVar6, LVar7, LVar8) + Add(LVar3, LVar6) + Add(LVar4, LVar7) + Add(LVar5, LVar8) + Div(LVar3, 2) + Div(LVar4, 2) + Div(LVar5, 2) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, LVar3, LVar4, LVar5) + Call(SetBattleCamZoom, 300) + Call(SetBattleCamOffsetZ, 40) + Wait(20) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim17) + Wait(8) + Else + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim03) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim03) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Add(LVar0, 10) + Else + Add(LVar0, 27) + EndIf + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim01) + EndIf + Thread + Wait(8) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PIRANHA_BITE) + EndThread + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim05) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim06) + Wait(6) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim07) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(14) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetActorSpeed, ACTOR_SELF, Float(7.0)) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim18) + Wait(10) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim17) + Wait(10) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE) + Else + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetActorSpeed, ACTOR_SELF, Float(7.0)) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + ExecWait(N(EVS_ReturnHome)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim05) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim06) + Wait(1) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_BITE, BS_FLAGS1_TRIGGER_EVENTS) + Set(LVarF, LVar0) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim07) + Wait(20) + Call(YieldTurn) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetActorSpeed, ACTOR_SELF, Float(7.0)) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim18) + Wait(10) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim17) + Wait(10) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE) + Else + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + ExecWait(N(EVS_ReturnHome)) + EndIf + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/UnkEffect6FFunc.inc.c" EvtScript N(EVS_Attack_FrostBreath) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim03) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim03) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, 20) - EVT_ELSE - EVT_ADD(LVar0, 50) - EVT_END_IF - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim01) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim0B) - EVT_WAIT(11) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PIRANHA_BREATH) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, 12) - EVT_SET(LVar1, 5) - EVT_SETF(LVar3, EVT_FLOAT(0.4)) - EVT_ELSE - EVT_ADD(LVar0, 32) - EVT_SET(LVar1, 13) - EVT_SETF(LVar3, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CALL(N(UnkEffect6FFunc), LVar2, LVar0, LVar1, LVar2, LVar3, 30, 120, 0, 120) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim0C) - EVT_WAIT(5) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_ICE, STATUS_FLAG_FROZEN, 1, BS_FLAGS1_INCLUDE_POWER_UPS) //@bug malformed status word - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim0D) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(14) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_ICE | DAMAGE_TYPE_STATUS_ALWAYS_HITS, SUPPRESS_EVENT_ALL, DMG_STATUS_IGNORE_RES(STATUS_FLAG_FROZEN, 2), 0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SET(LVarF, LVar0) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim0D) - EVT_WAIT(20) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim03) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim03) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Add(LVar0, 20) + Else + Add(LVar0, 50) + EndIf + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim01) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim0B) + Wait(11) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PIRANHA_BREATH) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Add(LVar0, 12) + Set(LVar1, 5) + SetF(LVar3, Float(0.4)) + Else + Add(LVar0, 32) + Set(LVar1, 13) + SetF(LVar3, Float(1.0)) + EndIf + Call(N(UnkEffect6FFunc), LVar2, LVar0, LVar1, LVar2, LVar3, 30, 120, 0, 120) + Wait(1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim0C) + Wait(5) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_ICE, STATUS_FLAG_FROZEN, 1, BS_FLAGS1_INCLUDE_POWER_UPS) //@bug malformed status word + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim0D) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(14) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetActorSpeed, ACTOR_SELF, Float(7.0)) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + ExecWait(N(EVS_ReturnHome)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_ICE | DAMAGE_TYPE_STATUS_ALWAYS_HITS, SUPPRESS_EVENT_ALL, DMG_STATUS_IGNORE_RES(STATUS_FLAG_FROZEN, 2), 0, BS_FLAGS1_TRIGGER_EVENTS) + Set(LVarF, LVar0) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Frost_Anim0D) + Wait(20) + Call(YieldTurn) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/fuzzy.inc.c b/src/battle/common/actor/fuzzy.inc.c index 45bbe5173f9..428507c415d 100644 --- a/src/battle/common/actor/fuzzy.inc.c +++ b/src/battle/common/actor/fuzzy.inc.c @@ -102,352 +102,352 @@ s32 N(DefaultAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CALL(GetLastElement, LVar0) - EVT_IF_FLAG(LVar0, DAMAGE_TYPE_SHOCK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_HurtShock) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Hurt) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Burn) - EVT_SET_CONST(LVar2, ANIM_Fuzzy_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Burn) - EVT_SET_CONST(LVar2, ANIM_Fuzzy_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_HurtShock) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_HurtShock) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Run) - EVT_EXEC_WAIT(EVS_Enemy_HopHome) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_HurtShock) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_CALL(GetLastElement, LVar0) - EVT_IF_FLAG(LVar0, DAMAGE_TYPE_SHOCK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_HurtShock) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_HurtShock) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_END_IF - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Run) - EVT_SET_CONST(LVar2, ANIM_Fuzzy_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Run) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + Call(GetLastElement, LVar0) + IfFlag(LVar0, DAMAGE_TYPE_SHOCK) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_HurtShock) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Hurt) + EndIf + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Burn) + SetConst(LVar2, ANIM_Fuzzy_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Burn) + SetConst(LVar2, ANIM_Fuzzy_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_HurtShock) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_HurtShock) + ExecWait(EVS_Enemy_Knockback) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Run) + ExecWait(EVS_Enemy_HopHome) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_HurtShock) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + Call(GetLastElement, LVar0) + IfFlag(LVar0, DAMAGE_TYPE_SHOCK) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_HurtShock) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_HurtShock) + ExecWait(EVS_Enemy_Death) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Hurt) + ExecWait(EVS_Enemy_Death) + EndIf + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Run) + SetConst(LVar2, ANIM_Fuzzy_Anim09) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Run) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/SpawnEnemyDrainFX.inc.c" EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_GOTO(100) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Run) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_EXEC_WAIT(EVS_Enemy_HopToPos) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Idle) - EVT_LABEL(100) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Anim04) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 9, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 8, 0) - EVT_WAIT(5) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_SET(LVar1, 0) - EVT_SUB(LVar2, 5) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jump) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 11, FALSE, TRUE, FALSE) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Anim09) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 15) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(4) - EVT_WAIT(5) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_EXEC_WAIT(EVS_Enemy_HopToPos) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_EQ(HIT_RESULT_HIT_STATIC) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_STATIC) - EVT_SET(LFlag0, FALSE) - EVT_ELSE - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -3, -12, -15) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jump) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_RETURN - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Leeching) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Bite) - EVT_WAIT(21) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Still) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 330) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, -3, -2, 0) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.9), EVT_FLOAT(1.2), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.8), EVT_FLOAT(1.3), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.4), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.5), EVT_FLOAT(1.0)) - EVT_WAIT(2) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.6), EVT_FLOAT(1.6), EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, DMG_LEECH, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Idle) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetLastDamage, ACTOR_PLAYER, LVar3) - EVT_IF_NE(LVar3, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_CALL(N(SpawnDrainHealthStartFX), LVar0, LVar1, LVar2, LVar3) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_STAR_BOUNCE_A) - EVT_CALL(N(SpawnDrainHealthContinueFX), LVar0, LVar1, LVar2, LVar3) - EVT_END_THREAD - EVT_ADD(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_RECOVER, 0, LVar0, LVar1, LVar2, LVar3, 0) - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_ADD(LVar0, LVar3) - EVT_CALL(SetEnemyHP, ACTOR_SELF, LVar0) - EVT_END_IF - EVT_THREAD - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.6), EVT_FLOAT(0.6), EVT_FLOAT(1.0)) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 10, 0) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 330) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.5), EVT_FLOAT(1.0)) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 300) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 270) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(0.7), EVT_FLOAT(1.0)) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 240) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 210) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.4), EVT_FLOAT(1.0)) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 180) - EVT_WAIT(2) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(0.7), EVT_FLOAT(1.0)) - EVT_WAIT(2) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.2), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.4), EVT_FLOAT(0.2), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.2), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 150) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 120) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 90) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 60) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 30) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_WAIT(5) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_EXEC_WAIT(EVS_Enemy_HopToPos) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Idle) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Set(LVar1, 0) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Goto(100) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Run) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Set(LVar1, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + ExecWait(EVS_Enemy_HopToPos) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Idle) + Label(100) + Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Anim04) + Call(SetActorDispOffset, ACTOR_SELF, 0, 9, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 8, 0) + Wait(5) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Set(LVar1, 0) + Sub(LVar2, 5) + Call(SetActorJumpGravity, ACTOR_SELF, Float(3.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jump) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 11, FALSE, TRUE, FALSE) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Anim09) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Call(SetActorJumpGravity, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 15) + Call(SetActorJumpGravity, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Wait(4) + Wait(5) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + ExecWait(EVS_Enemy_HopToPos) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + CaseEq(HIT_RESULT_HIT_STATIC) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_STATIC) + Set(LFlag0, FALSE) + Else + Set(LFlag0, TRUE) + EndIf + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -3, -12, -15) + Call(SetActorJumpGravity, ACTOR_SELF, Float(3.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jump) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + IfEq(LFlag0, TRUE) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 0, BS_FLAGS1_TRIGGER_EVENTS) + Return + EndIf + Wait(10) + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Leeching) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Bite) + Wait(21) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Still) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 330) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) + Call(SetActorDispOffset, ACTOR_SELF, -3, -2, 0) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.9), Float(1.2), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.8), Float(1.3), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.4), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.5), Float(1.0)) + Wait(2) + Call(SetActorScale, ACTOR_SELF, Float(0.6), Float(1.6), Float(1.0)) + Wait(10) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, DMG_LEECH, BS_FLAGS1_TRIGGER_EVENTS) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Idle) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetLastDamage, ACTOR_PLAYER, LVar3) + IfNe(LVar3, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 10) + Call(N(SpawnDrainHealthStartFX), LVar0, LVar1, LVar2, LVar3) + Thread + Wait(15) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_STAR_BOUNCE_A) + Call(N(SpawnDrainHealthContinueFX), LVar0, LVar1, LVar2, LVar3) + EndThread + Add(LVar0, 20) + Add(LVar1, 20) + PlayEffect(EFFECT_RECOVER, 0, LVar0, LVar1, LVar2, LVar3, 0) + Call(GetActorHP, ACTOR_SELF, LVar0) + Add(LVar0, LVar3) + Call(SetEnemyHP, ACTOR_SELF, LVar0) + EndIf + Thread + Call(SetActorScale, ACTOR_SELF, Float(1.6), Float(0.6), Float(1.0)) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 10, 0) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 330) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.5), Float(1.0)) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 300) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 270) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(0.7), Float(1.0)) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 240) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 210) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.4), Float(1.0)) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 180) + Wait(2) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(0.7), Float(1.0)) + Wait(2) + Call(SetActorScale, ACTOR_SELF, Float(1.2), Float(0.5), Float(1.0)) + EndThread + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetActorScale, ACTOR_SELF, Float(1.4), Float(0.2), Float(1.0)) + Wait(1) + Thread + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.2), Float(0.5), Float(1.0)) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 150) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 120) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 90) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 60) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 30) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + EndThread + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Wait(5) + Call(YieldTurn) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + ExecWait(EVS_Enemy_HopToPos) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Idle) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/gloomba.inc.c b/src/battle/common/actor/gloomba.inc.c index b5386adef74..772229672c6 100644 --- a/src/battle/common/actor/gloomba.inc.c +++ b/src/battle/common/actor/gloomba.inc.c @@ -113,350 +113,350 @@ s32 N(ShuffleAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(10) - EVT_CALL(RandInt, 80, LVar0) - EVT_ADD(LVar0, 80) - EVT_LOOP(LVar0) - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_LOOP(20) - EVT_LABEL(1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_LOOP(80) - EVT_LABEL(2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(10) - EVT_RETURN - EVT_END + Label(10) + Call(RandInt, 80, LVar0) + Add(LVar0, 80) + Loop(LVar0) + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(0) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Loop(20) + Label(1) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(1) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Loop(80) + Label(2) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(2) + EndIf + Wait(1) + EndLoop + Goto(10) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_Goomba_Dark_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_Goomba_Dark_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Dead) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Electrocute) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Dizzy) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Electrocute) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Dead) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_STAR_BEAM) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Dead) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Run) - EVT_SET_CONST(LVar2, ANIM_Goomba_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_BurnHurt) + SetConst(LVar2, ANIM_Goomba_Dark_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_BurnHurt) + SetConst(LVar2, ANIM_Goomba_Dark_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Dead) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Electrocute) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Hurt) + ExecWait(EVS_Enemy_Knockback) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Dizzy) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Electrocute) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Dead) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_STAR_BEAM) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Dead) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Run) + SetConst(LVar2, ANIM_Goomba_Dark_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/CalculateArcsinDeg.inc.c" EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Run) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Midair) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_SET(LVar1, 10) - EVT_ADD(LVar2, 3) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_SET(LVar3, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Sleep) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Hurt) - EVT_WAIT(HIT_RESULT_LUCKY) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Midair) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_THREAD - EVT_WAIT(4) - EVT_SET(LVar0, 180) - EVT_LOOP(4) - EVT_SUB(LVar0, 45) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Dizzy) - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_SET(LVar3, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Tense) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_END_SWITCH - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_HEADBONK, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle) - EVT_WAIT(3) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Run) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle) + Call(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Midair) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Set(LVar1, 10) + Add(LVar2, 3) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Thread + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) + Set(LVar0, 0) + Loop(16) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Set(LVar3, LVar6) + Wait(1) + EndLoop + EndThread + Thread + Wait(6) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Sleep) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Hurt) + Wait(HIT_RESULT_LUCKY) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Midair) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + Thread + Wait(4) + Set(LVar0, 180) + Loop(4) + Sub(LVar0, 45) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Dizzy) + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(SetActorYaw, ACTOR_SELF, 0) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + CaseDefault + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Thread + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) + Set(LVar0, 0) + Loop(16) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Set(LVar3, LVar6) + Wait(1) + EndLoop + EndThread + Thread + Wait(6) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Tense) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0)) + Wait(1) + EndSwitch + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_HEADBONK, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle) + Wait(3) + Call(YieldTurn) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/goomba.inc.c b/src/battle/common/actor/goomba.inc.c index bc7a3a2b5fc..1f167a946d9 100644 --- a/src/battle/common/actor/goomba.inc.c +++ b/src/battle/common/actor/goomba.inc.c @@ -121,351 +121,351 @@ s32 N(ShuffleAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(10) - EVT_CALL(RandInt, 80, LVar0) - EVT_ADD(LVar0, 80) - EVT_LOOP(LVar0) - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_LOOP(20) - EVT_LABEL(1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_LOOP(80) - EVT_LABEL(2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(10) - EVT_RETURN - EVT_END + Label(10) + Call(RandInt, 80, LVar0) + Add(LVar0, 80) + Loop(LVar0) + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(0) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Loop(20) + Label(1) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(1) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Loop(80) + Label(2) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(2) + EndIf + Wait(1) + EndLoop + Goto(10) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_Goomba_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_Goomba_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dead) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Electrocute) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dizzy) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Idle) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Electrocute) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dead) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_STAR_BEAM) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_BurnHurt) + SetConst(LVar2, ANIM_Goomba_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_BurnHurt) + SetConst(LVar2, ANIM_Goomba_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dead) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Electrocute) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hurt) + ExecWait(EVS_Enemy_Knockback) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dizzy) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Idle) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Electrocute) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dead) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_STAR_BEAM) // do nothing - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dead) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Run) - EVT_SET_CONST(LVar2, ANIM_Goomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Idle) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dead) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Run) + SetConst(LVar2, ANIM_Goomba_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Idle) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/CalculateArcsinDeg.inc.c" EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Run) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Idle) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Midair) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_SET(LVar1, 10) - EVT_ADD(LVar2, 3) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_SET(LVar3, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Sleep) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hurt) - EVT_WAIT(5) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Midair) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_THREAD - EVT_WAIT(4) - EVT_SET(LVar0, 180) - EVT_LOOP(4) - EVT_SUB(LVar0, 45) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dizzy) - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Idle) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_SET(LVar3, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Tense) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_END_SWITCH - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_HEADBONK, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Idle) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Idle) - EVT_WAIT(3) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Run) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Idle) + Call(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Midair) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Set(LVar1, 10) + Add(LVar2, 3) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Thread + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) + Set(LVar0, 0) + Loop(16) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Set(LVar3, LVar6) + Wait(1) + EndLoop + EndThread + Thread + Wait(6) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Sleep) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hurt) + Wait(5) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Midair) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + Thread + Wait(4) + Set(LVar0, 180) + Loop(4) + Sub(LVar0, 45) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dizzy) + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(SetActorYaw, ACTOR_SELF, 0) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Idle) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + CaseDefault + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Thread + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) + Set(LVar0, 0) + Loop(16) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Set(LVar3, LVar6) + Wait(1) + EndLoop + EndThread + Thread + Wait(6) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Tense) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0)) + Wait(1) + EndSwitch + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_HEADBONK, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Idle) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Idle) + Wait(3) + Call(YieldTurn) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/gray_magikoopa.inc.c b/src/battle/common/actor/gray_magikoopa.inc.c index 65f9dbc6320..d23b0fb45b0 100644 --- a/src/battle/common/actor/gray_magikoopa.inc.c +++ b/src/battle/common/actor/gray_magikoopa.inc.c @@ -223,8 +223,8 @@ s32 N(BroomAnims)[] = { }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; #include "common/ShrinkActor.inc.c" @@ -234,677 +234,677 @@ EvtScript N(EVS_Idle) = { #include "common/battle/CheckMagikoopaCastTarget.inc.c" EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Gray_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Gray_Anim05) - EVT_SET_CONST(LVar2, ANIM_Magikoopa_Gray_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Gray_Anim05) - EVT_SET_CONST(LVar2, ANIM_Magikoopa_Gray_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Gray_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Gray_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Gray_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Gray_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Gray_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Gray_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Gray_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Gray_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Gray_Anim04) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Gray_Anim02) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Gray_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, 0, 2, 0) - EVT_ELSE - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, -4, 5, 0) - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Gray_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Gray_Anim04) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Gray_Anim05) + SetConst(LVar2, ANIM_Magikoopa_Gray_Anim06) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Gray_Anim05) + SetConst(LVar2, ANIM_Magikoopa_Gray_Anim06) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Gray_Anim06) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Gray_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Gray_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Gray_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Gray_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Gray_Anim04) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Gray_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Gray_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Gray_Anim04) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Gray_Anim02) + ExecWait(N(EVS_Flee)) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Gray_Anim02) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, 0, 2, 0) + Else + Call(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, -4, 5, 0) + EndIf + EndIf + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Gray_Anim04) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_KnockDownCheck) = { - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_PARTNER_ACTING) - EVT_IF_FLAG(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE) - EVT_END_IF - EVT_ELSE - EVT_CALL(N(GetSelectedMoveID), LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(MOVE_HEADBONK1) - EVT_CASE_OR_EQ(MOVE_HEADBONK2) - EVT_CASE_OR_EQ(MOVE_HEADBONK3) - EVT_CASE_OR_EQ(MOVE_MULTIBONK) - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetBattleFlags, LVar0) + IfNotFlag(LVar0, BS_FLAGS1_PARTNER_ACTING) + IfFlag(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE) + EndIf + Else + Call(N(GetSelectedMoveID), LVar0) + Switch(LVar0) + CaseOrEq(MOVE_HEADBONK1) + CaseOrEq(MOVE_HEADBONK2) + CaseOrEq(MOVE_HEADBONK3) + CaseOrEq(MOVE_MULTIBONK) + Call(GetBattleFlags, LVar0) + IfFlag(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE) + EndIf + EndCaseGroup + EndSwitch + EndIf + Return + End }; EvtScript N(EVS_KnockDown) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Gray_Anim04) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetLastElement, LVar0) - EVT_IF_FLAG(LVar0, DAMAGE_TYPE_POW) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Gray_Anim04) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_LABEL(0) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_BROOM, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_END_IF - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 1) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_BROOM, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(N(StartRumbleWithParams), 150, 10) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(0.7)) - EVT_END_THREAD - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar3) - EVT_IF_EQ(LVar3, EVENT_15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Gray_Anim04) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_ADD(LVar4, 10) - EVT_ADD(LVar5, 5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 10, 0) - EVT_END_IF - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_LOOP(20) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Gray_Anim01) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorType, ACTOR_SELF, ACTOR_TYPE_GRAY_MAGIKOOPA) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(StatusTable))) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 32) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(GetIndexFromPos, ACTOR_SELF, LVar0) - EVT_MOD(LVar0, 4) - EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVar0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, LVar0) + IfEq(LVar0, 1) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Gray_Anim04) + Goto(0) + EndIf + Call(GetLastElement, LVar0) + IfFlag(LVar0, DAMAGE_TYPE_POW) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Gray_Anim04) + Goto(0) + EndIf + Return + Label(0) + Call(HideHealthBar, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartScale, ACTOR_SELF, PRT_BROOM, Float(0.4), Float(0.4), Float(0.4)) + EndIf + Call(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar2, 1) + Call(SetPartPos, ACTOR_SELF, PRT_BROOM, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(N(StartRumbleWithParams), 150, 10) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.7)) + EndThread + Call(GetLastEvent, ACTOR_SELF, LVar3) + IfEq(LVar3, EVENT_15) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Gray_Anim04) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Add(LVar4, 10) + Add(LVar5, 5) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, Float(1.0), 10, 0) + EndIf + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Loop(20) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Gray_Anim01) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorType, ACTOR_SELF, ACTOR_TYPE_GRAY_MAGIKOOPA) + Call(SetStatusTable, ACTOR_SELF, Ref(N(StatusTable))) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 32) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(GetIndexFromPos, ACTOR_SELF, LVar0) + Mod(LVar0, 4) + Call(SetGoalToIndex, ACTOR_SELF, LVar0) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Return + End }; EvtScript N(EVS_HandleEvent_Flying) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_EXEC_WAIT(N(EVS_KnockDownCheck)) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Gray_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CASE_OR_EQ(EVENT_FALL_TRIGGER) - EVT_EXEC_WAIT(N(EVS_KnockDownCheck)) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Gray_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_BURN_HIT) - EVT_CASE_OR_EQ(EVENT_15) - EVT_EXEC_WAIT(N(EVS_KnockDownCheck)) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Gray_Anim05) - EVT_SET_CONST(LVar2, ANIM_FlyingMagikoopa_Gray_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Gray_Anim05) - EVT_SET_CONST(LVar2, ANIM_FlyingMagikoopa_Gray_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Gray_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Gray_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Gray_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Gray_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Gray_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Gray_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Gray_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0) - EVT_CALL(HPBarToCurrent, ACTOR_SELF) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Gray_Anim01) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Gray_Anim01) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Gray_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Gray_Anim04) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Gray_Anim02) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Gray_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -3, 0, 0) - EVT_ELSE - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -15, 0, 0) - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Gray_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + ExecWait(N(EVS_KnockDownCheck)) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Gray_Anim04) + ExecWait(EVS_Enemy_Hit) + CaseOrEq(EVENT_HIT) + CaseOrEq(EVENT_FALL_TRIGGER) + ExecWait(N(EVS_KnockDownCheck)) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Gray_Anim04) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_KnockDown)) + EndCaseGroup + CaseOrEq(EVENT_BURN_HIT) + CaseOrEq(EVENT_15) + ExecWait(N(EVS_KnockDownCheck)) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Gray_Anim05) + SetConst(LVar2, ANIM_FlyingMagikoopa_Gray_Anim06) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_KnockDown)) + EndCaseGroup + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Gray_Anim05) + SetConst(LVar2, ANIM_FlyingMagikoopa_Gray_Anim06) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Gray_Anim06) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Gray_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Gray_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Gray_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Gray_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Gray_Anim04) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Gray_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + Call(SetActorPos, ACTOR_SELF, 20, 0, 0) + Call(HPBarToCurrent, ACTOR_SELF) + CaseEq(EVENT_END_FIRST_STRIKE) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Gray_Anim01) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Gray_Anim01) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Gray_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Gray_Anim04) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Gray_Anim02) + ExecWait(N(EVS_Flee)) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Gray_Anim02) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -3, 0, 0) + Else + Call(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -15, 0, 0) + EndIf + EndIf + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Gray_Anim04) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_MagicBlast) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 1) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 12) - EVT_ADD(LVar1, 14) - EVT_ELSE - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 36) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.5), 30, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Gray_Anim02) - EVT_WAIT(30) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Gray_Anim03) - EVT_WAIT(5) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar9) - EVT_IF_FLAG(LVar9, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 8) - EVT_ADD(LVar1, 8) - EVT_ELSE - EVT_SUB(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_END_IF - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 50) - EVT_SET(LVar4, 0) - EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 25) - EVT_WAIT(50) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(14) - EVT_CALL(YieldTurn) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT) - EVT_WAIT(30) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Gray_Anim03) - EVT_WAIT(5) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 8) - EVT_ADD(LVar1, 8) - EVT_ELSE - EVT_SUB(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_END_IF - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 10) - EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 20) - EVT_WAIT(18) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_MAGIC_BLAST, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_WAIT(19) - EVT_CALL(YieldTurn) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 1) + Else + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 12) + Add(LVar1, 14) + Else + Sub(LVar0, 30) + Add(LVar1, 36) + EndIf + PlayEffect(EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, Float(0.5), 30, 0) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Gray_Anim02) + Wait(30) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Gray_Anim03) + Wait(5) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar9) + IfFlag(LVar9, STATUS_FLAG_SHRINK) + Sub(LVar0, 8) + Add(LVar1, 8) + Else + Sub(LVar0, 20) + Add(LVar1, 20) + EndIf + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Sub(LVar3, 50) + Set(LVar4, 0) + Call(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 25) + Wait(50) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(14) + Call(YieldTurn) + Call(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT) + Wait(30) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Gray_Anim03) + Wait(5) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 8) + Add(LVar1, 8) + Else + Sub(LVar0, 20) + Add(LVar1, 20) + EndIf + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Sub(LVar3, 10) + Call(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 20) + Wait(18) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_MAGIC_BLAST, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Wait(19) + Call(YieldTurn) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_WandStrike) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_VANISH) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Gray_Anim02) - EVT_SET(LVar0, 200) - EVT_LOOP(20) - EVT_SUB(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, 5) - EVT_ELSE - EVT_ADD(LVar0, 25) - EVT_END_IF - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_SET(LVar0, 55) - EVT_LOOP(20) - EVT_ADD(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Gray_Anim03) - EVT_WAIT(11) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_WAND_STRIKE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(15) - EVT_SET(LVar0, 200) - EVT_LOOP(20) - EVT_SUB(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(YieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Gray_Anim01) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_SET(LVar0, 55) - EVT_LOOP(20) - EVT_ADD(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_WAND_STRIKE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(10) - EVT_SET(LVar0, 200) - EVT_LOOP(20) - EVT_SUB(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(YieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Gray_Anim01) - EVT_CALL(FlyToGoal, ACTOR_SELF, 20, 0, EASING_COS_IN_OUT) - EVT_SET(LVar0, 55) - EVT_LOOP(20) - EVT_ADD(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_VANISH) + Thread + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Gray_Anim02) + Set(LVar0, 200) + Loop(20) + Sub(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + EndThread + Wait(10) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Add(LVar0, 5) + Else + Add(LVar0, 25) + EndIf + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + Set(LVar0, 55) + Loop(20) + Add(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Gray_Anim03) + Wait(11) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_WAND_STRIKE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(15) + Set(LVar0, 200) + Loop(20) + Sub(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + Call(YieldTurn) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Gray_Anim01) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + Set(LVar0, 55) + Loop(20) + Add(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_WAND_STRIKE, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(10) + Set(LVar0, 200) + Loop(20) + Sub(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + Call(YieldTurn) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Gray_Anim01) + Call(FlyToGoal, ACTOR_SELF, 20, 0, EASING_COS_IN_OUT) + Set(LVar0, 55) + Loop(20) + Add(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Flee) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_IF_NE(LVar0, EVENT_SCARE_AWAY) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_01) - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_WAIT(10) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 200) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(YieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_EXEC_WAIT(EVS_ForceNextTarget) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(HideHealthBar, ACTOR_SELF) + Call(GetLastEvent, ACTOR_SELF, LVar0) + IfNe(LVar0, EVENT_SCARE_AWAY) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_PRESET_01) + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(1.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Wait(10) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetActorSpeed, ACTOR_SELF, Float(10.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 200) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(YieldTurn) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ExecWait(EVS_ForceNextTarget) + Call(HideHealthBar, ACTOR_SELF) + Call(RemoveActor, ACTOR_SELF) + Return + End }; EvtScript N(EVS_Init) = { - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE) - EVT_RETURN - EVT_END + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar0) + IfEq(LVar0, 0) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE) + Return + End }; EvtScript N(EVS_Init_Flying) = { - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent_Flying))) - EVT_CALL(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE) - EVT_RETURN - EVT_END + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent_Flying))) + Call(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar0) + IfEq(LVar0, 0) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_SET(LFlag0, FALSE) - EVT_LABEL(10) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetIndexFromHome, LVar0, LVar1) - EVT_CALL(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar2) - EVT_IF_GT(LVar1, LVar2) - EVT_CALL(N(CheckMagikoopaCastTarget), LVar0, LVar3) - EVT_IF_EQ(LVar3, 0) - EVT_CALL(GetStatusFlags, LVar0, LVar4) - EVT_IF_NOT_FLAG(LVar4, STATUS_FLAG_STATIC | STATUS_FLAG_TRANSPARENT) - EVT_SET(LVar8, LVar0) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar1) - EVT_GOTO(100) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_SET(LFlag0, TRUE) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_EXEC_WAIT(N(EVS_Attack_MagicBlast)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_WandStrike)) - EVT_END_IF - EVT_RETURN - EVT_LABEL(100) // make ally invisible - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Gray_Anim02) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Gray_Anim02) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 6) - EVT_ADD(LVar1, 12) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 6, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 16) - EVT_ADD(LVar1, 31) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 6, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 12) - EVT_ADD(LVar1, 14) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 6, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 36) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 6, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Gray_Anim01) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Gray_Anim01) - EVT_END_IF - EVT_WAIT(5) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, LVar8, SOUND_MAGIKOOPA_VANISH) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(VanishActor, LVar8, 2) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_CALL(WaitForBuffDone) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Set(LFlag0, FALSE) + Label(10) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetIndexFromHome, LVar0, LVar1) + Call(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar2) + IfGt(LVar1, LVar2) + Call(N(CheckMagikoopaCastTarget), LVar0, LVar3) + IfEq(LVar3, 0) + Call(GetStatusFlags, LVar0, LVar4) + IfNotFlag(LVar4, STATUS_FLAG_STATIC | STATUS_FLAG_TRANSPARENT) + Set(LVar8, LVar0) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar1) + Goto(100) + EndIf + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + IfEq(LFlag0, FALSE) + Set(LFlag0, TRUE) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) + Goto(10) + EndIf + Call(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) + IfEq(LVar0, 1) + ExecWait(N(EVS_Flee)) + Return + EndIf + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, ACTOR_FLAG_FLYING) + ExecWait(N(EVS_Attack_MagicBlast)) + Else + ExecWait(N(EVS_Attack_WandStrike)) + EndIf + Return + Label(100) // make ally invisible + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Gray_Anim02) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Gray_Anim02) + EndIf + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 6) + Add(LVar1, 12) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 6, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 16) + Add(LVar1, 31) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 6, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 12) + Add(LVar1, 14) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 6, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 30) + Add(LVar1, 36) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 6, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + EndIf + Wait(30) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Gray_Anim01) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Gray_Anim01) + EndIf + Wait(5) + Thread + Wait(10) + Call(PlaySoundAtActor, LVar8, SOUND_MAGIKOOPA_VANISH) + EndThread + Thread + Call(FreezeBattleState, TRUE) + Call(VanishActor, LVar8, 2) + Call(FreezeBattleState, FALSE) + EndThread + Call(WaitForBuffDone) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(10) + Call(YieldTurn) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/green_magikoopa.inc.c b/src/battle/common/actor/green_magikoopa.inc.c index 6ebed5b6391..ddda8e59bc2 100644 --- a/src/battle/common/actor/green_magikoopa.inc.c +++ b/src/battle/common/actor/green_magikoopa.inc.c @@ -225,8 +225,8 @@ s32 N(BroomAnims)[] = { }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; #include "common/ShrinkActor.inc.c" @@ -236,677 +236,677 @@ EvtScript N(EVS_Idle) = { #include "common/battle/CheckMagikoopaCastTarget.inc.c" EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim05) - EVT_SET_CONST(LVar2, ANIM_Magikoopa_Green_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim05) - EVT_SET_CONST(LVar2, ANIM_Magikoopa_Green_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Green_Anim04) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Green_Anim02) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, 0, 2, 0) - EVT_ELSE - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, -4, 5, 0) - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Green_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Green_Anim04) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Green_Anim05) + SetConst(LVar2, ANIM_Magikoopa_Green_Anim06) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Green_Anim05) + SetConst(LVar2, ANIM_Magikoopa_Green_Anim06) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Green_Anim06) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Green_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Green_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Green_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Green_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Green_Anim04) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Green_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Green_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Green_Anim04) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Green_Anim02) + ExecWait(N(EVS_Flee)) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Green_Anim02) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, 0, 2, 0) + Else + Call(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, -4, 5, 0) + EndIf + EndIf + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Green_Anim04) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_KnockDownCheck) = { - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_PARTNER_ACTING) - EVT_IF_FLAG(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE) - EVT_END_IF - EVT_ELSE - EVT_CALL(N(GetSelectedMoveID), LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(MOVE_HEADBONK1) - EVT_CASE_OR_EQ(MOVE_HEADBONK2) - EVT_CASE_OR_EQ(MOVE_HEADBONK3) - EVT_CASE_OR_EQ(MOVE_MULTIBONK) - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetBattleFlags, LVar0) + IfNotFlag(LVar0, BS_FLAGS1_PARTNER_ACTING) + IfFlag(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE) + EndIf + Else + Call(N(GetSelectedMoveID), LVar0) + Switch(LVar0) + CaseOrEq(MOVE_HEADBONK1) + CaseOrEq(MOVE_HEADBONK2) + CaseOrEq(MOVE_HEADBONK3) + CaseOrEq(MOVE_MULTIBONK) + Call(GetBattleFlags, LVar0) + IfFlag(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE) + EndIf + EndCaseGroup + EndSwitch + EndIf + Return + End }; EvtScript N(EVS_KnockDown) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Green_Anim04) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetLastElement, LVar0) - EVT_IF_FLAG(LVar0, DAMAGE_TYPE_POW) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Green_Anim04) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_LABEL(0) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_BROOM, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_END_IF - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 1) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_BROOM, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(N(StartRumbleWithParams), 150, 10) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(0.7)) - EVT_END_THREAD - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar3) - EVT_IF_EQ(LVar3, EVENT_15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Green_Anim04) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_ADD(LVar4, 10) - EVT_ADD(LVar5, 5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 10, 0) - EVT_END_IF - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_LOOP(20) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Green_Anim01) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorType, ACTOR_SELF, ACTOR_TYPE_GREEN_MAGIKOOPA) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(StatusTable))) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 32) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(GetIndexFromPos, ACTOR_SELF, LVar0) - EVT_MOD(LVar0, 4) - EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVar0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, LVar0) + IfEq(LVar0, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Green_Anim04) + Goto(0) + EndIf + Call(GetLastElement, LVar0) + IfFlag(LVar0, DAMAGE_TYPE_POW) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Green_Anim04) + Goto(0) + EndIf + Return + Label(0) + Call(HideHealthBar, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartScale, ACTOR_SELF, PRT_BROOM, Float(0.4), Float(0.4), Float(0.4)) + EndIf + Call(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar2, 1) + Call(SetPartPos, ACTOR_SELF, PRT_BROOM, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(N(StartRumbleWithParams), 150, 10) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.7)) + EndThread + Call(GetLastEvent, ACTOR_SELF, LVar3) + IfEq(LVar3, EVENT_15) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Green_Anim04) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Add(LVar4, 10) + Add(LVar5, 5) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, Float(1.0), 10, 0) + EndIf + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Loop(20) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Green_Anim01) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorType, ACTOR_SELF, ACTOR_TYPE_GREEN_MAGIKOOPA) + Call(SetStatusTable, ACTOR_SELF, Ref(N(StatusTable))) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 32) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(GetIndexFromPos, ACTOR_SELF, LVar0) + Mod(LVar0, 4) + Call(SetGoalToIndex, ACTOR_SELF, LVar0) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Return + End }; EvtScript N(EVS_HandleEvent_Flying) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_EXEC_WAIT(N(EVS_KnockDownCheck)) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CASE_OR_EQ(EVENT_FALL_TRIGGER) - EVT_EXEC_WAIT(N(EVS_KnockDownCheck)) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_BURN_HIT) - EVT_CASE_OR_EQ(EVENT_15) - EVT_EXEC_WAIT(N(EVS_KnockDownCheck)) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim05) - EVT_SET_CONST(LVar2, ANIM_FlyingMagikoopa_Green_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim05) - EVT_SET_CONST(LVar2, ANIM_FlyingMagikoopa_Green_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0) - EVT_CALL(HPBarToCurrent, ACTOR_SELF) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Green_Anim01) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Green_Anim01) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Green_Anim04) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Green_Anim02) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -3, 0, 0) - EVT_ELSE - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -15, 0, 0) - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Green_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + ExecWait(N(EVS_KnockDownCheck)) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Green_Anim04) + ExecWait(EVS_Enemy_Hit) + CaseOrEq(EVENT_HIT) + CaseOrEq(EVENT_FALL_TRIGGER) + ExecWait(N(EVS_KnockDownCheck)) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Green_Anim04) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_KnockDown)) + EndCaseGroup + CaseOrEq(EVENT_BURN_HIT) + CaseOrEq(EVENT_15) + ExecWait(N(EVS_KnockDownCheck)) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Green_Anim05) + SetConst(LVar2, ANIM_FlyingMagikoopa_Green_Anim06) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_KnockDown)) + EndCaseGroup + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Green_Anim05) + SetConst(LVar2, ANIM_FlyingMagikoopa_Green_Anim06) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Green_Anim06) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Green_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Green_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Green_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Green_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Green_Anim04) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Green_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + Call(SetActorPos, ACTOR_SELF, 20, 0, 0) + Call(HPBarToCurrent, ACTOR_SELF) + CaseEq(EVENT_END_FIRST_STRIKE) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Green_Anim01) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Green_Anim01) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Green_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Green_Anim04) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Green_Anim02) + ExecWait(N(EVS_Flee)) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Green_Anim02) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -3, 0, 0) + Else + Call(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -15, 0, 0) + EndIf + EndIf + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Green_Anim04) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_MagicBlast) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 1) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 12) - EVT_ADD(LVar1, 14) - EVT_ELSE - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 36) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.5), 30, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Green_Anim02) - EVT_WAIT(30) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Green_Anim03) - EVT_WAIT(5) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar9) - EVT_IF_FLAG(LVar9, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 8) - EVT_ADD(LVar1, 8) - EVT_ELSE - EVT_SUB(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_END_IF - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 50) - EVT_SET(LVar4, 0) - EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 25) - EVT_WAIT(50) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(14) - EVT_CALL(YieldTurn) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT) - EVT_WAIT(30) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Green_Anim03) - EVT_WAIT(5) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 8) - EVT_ADD(LVar1, 8) - EVT_ELSE - EVT_SUB(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_END_IF - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 10) - EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 20) - EVT_WAIT(18) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_MAGIC_BLAST, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_WAIT(19) - EVT_CALL(YieldTurn) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 1) + Else + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 12) + Add(LVar1, 14) + Else + Sub(LVar0, 30) + Add(LVar1, 36) + EndIf + PlayEffect(EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, Float(0.5), 30, 0) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Green_Anim02) + Wait(30) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Green_Anim03) + Wait(5) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar9) + IfFlag(LVar9, STATUS_FLAG_SHRINK) + Sub(LVar0, 8) + Add(LVar1, 8) + Else + Sub(LVar0, 20) + Add(LVar1, 20) + EndIf + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Sub(LVar3, 50) + Set(LVar4, 0) + Call(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 25) + Wait(50) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(14) + Call(YieldTurn) + Call(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT) + Wait(30) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Green_Anim03) + Wait(5) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 8) + Add(LVar1, 8) + Else + Sub(LVar0, 20) + Add(LVar1, 20) + EndIf + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Sub(LVar3, 10) + Call(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 20) + Wait(18) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_MAGIC_BLAST, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Wait(19) + Call(YieldTurn) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_WandStrike) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_VANISH) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Green_Anim02) - EVT_SET(LVar0, 200) - EVT_LOOP(20) - EVT_SUB(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, 5) - EVT_ELSE - EVT_ADD(LVar0, 25) - EVT_END_IF - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_SET(LVar0, 55) - EVT_LOOP(20) - EVT_ADD(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Green_Anim03) - EVT_WAIT(11) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_WAND_STRIKE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(15) - EVT_SET(LVar0, 200) - EVT_LOOP(20) - EVT_SUB(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(YieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Green_Anim01) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_SET(LVar0, 55) - EVT_LOOP(20) - EVT_ADD(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_WAND_STRIKE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(10) - EVT_SET(LVar0, 200) - EVT_LOOP(20) - EVT_SUB(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(YieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Green_Anim01) - EVT_CALL(FlyToGoal, ACTOR_SELF, 20, 0, EASING_COS_IN_OUT) - EVT_SET(LVar0, 55) - EVT_LOOP(20) - EVT_ADD(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_VANISH) + Thread + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Green_Anim02) + Set(LVar0, 200) + Loop(20) + Sub(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + EndThread + Wait(10) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Add(LVar0, 5) + Else + Add(LVar0, 25) + EndIf + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + Set(LVar0, 55) + Loop(20) + Add(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Green_Anim03) + Wait(11) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_WAND_STRIKE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(15) + Set(LVar0, 200) + Loop(20) + Sub(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + Call(YieldTurn) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Green_Anim01) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + Set(LVar0, 55) + Loop(20) + Add(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_WAND_STRIKE, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(10) + Set(LVar0, 200) + Loop(20) + Sub(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + Call(YieldTurn) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Green_Anim01) + Call(FlyToGoal, ACTOR_SELF, 20, 0, EASING_COS_IN_OUT) + Set(LVar0, 55) + Loop(20) + Add(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Flee) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_IF_NE(LVar0, EVENT_SCARE_AWAY) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_01) - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_WAIT(10) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 200) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(YieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_EXEC_WAIT(EVS_ForceNextTarget) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(HideHealthBar, ACTOR_SELF) + Call(GetLastEvent, ACTOR_SELF, LVar0) + IfNe(LVar0, EVENT_SCARE_AWAY) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_PRESET_01) + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(1.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Wait(10) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetActorSpeed, ACTOR_SELF, Float(10.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 200) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(YieldTurn) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ExecWait(EVS_ForceNextTarget) + Call(HideHealthBar, ACTOR_SELF) + Call(RemoveActor, ACTOR_SELF) + Return + End }; EvtScript N(EVS_Init) = { - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE) - EVT_RETURN - EVT_END + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar0) + IfEq(LVar0, 0) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE) + Return + End }; EvtScript N(EVS_Init_Flying) = { - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent_Flying))) - EVT_CALL(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE) - EVT_RETURN - EVT_END + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent_Flying))) + Call(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar0) + IfEq(LVar0, 0) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_SET(LFlag0, FALSE) - EVT_LABEL(10) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetIndexFromHome, LVar0, LVar1) - EVT_CALL(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar2) - EVT_IF_GT(LVar1, LVar2) - EVT_CALL(N(CheckMagikoopaCastTarget), LVar0, LVar3) - EVT_IF_EQ(LVar3, 0) - EVT_CALL(GetActorDefenseBoost, LVar0, LVar4) - EVT_IF_LT(LVar4, 3) - EVT_SET(LVar8, LVar0) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar1) - EVT_GOTO(100) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_SET(LFlag0, TRUE) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_EXEC_WAIT(N(EVS_Attack_MagicBlast)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_WandStrike)) - EVT_END_IF - EVT_RETURN - EVT_LABEL(100) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Green_Anim02) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Green_Anim02) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 6) - EVT_ADD(LVar1, 12) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 16) - EVT_ADD(LVar1, 31) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 12) - EVT_ADD(LVar1, 14) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 36) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Green_Anim01) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Green_Anim01) - EVT_END_IF - EVT_WAIT(5) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, LVar8, SOUND_MAGIKOOPA_POWER_UP) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(BoostDefense, LVar8, 1) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_CALL(WaitForBuffDone) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Set(LFlag0, FALSE) + Label(10) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetIndexFromHome, LVar0, LVar1) + Call(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar2) + IfGt(LVar1, LVar2) + Call(N(CheckMagikoopaCastTarget), LVar0, LVar3) + IfEq(LVar3, 0) + Call(GetActorDefenseBoost, LVar0, LVar4) + IfLt(LVar4, 3) + Set(LVar8, LVar0) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar1) + Goto(100) + EndIf + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + IfEq(LFlag0, FALSE) + Set(LFlag0, TRUE) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) + Goto(10) + EndIf + Call(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) + IfEq(LVar0, 1) + ExecWait(N(EVS_Flee)) + Return + EndIf + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, ACTOR_FLAG_FLYING) + ExecWait(N(EVS_Attack_MagicBlast)) + Else + ExecWait(N(EVS_Attack_WandStrike)) + EndIf + Return + Label(100) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Green_Anim02) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Green_Anim02) + EndIf + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 6) + Add(LVar1, 12) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 16) + Add(LVar1, 31) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 12) + Add(LVar1, 14) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 30) + Add(LVar1, 36) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + EndIf + Wait(30) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Green_Anim01) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Green_Anim01) + EndIf + Wait(5) + Thread + Wait(10) + Call(PlaySoundAtActor, LVar8, SOUND_MAGIKOOPA_POWER_UP) + EndThread + Thread + Call(FreezeBattleState, TRUE) + Call(BoostDefense, LVar8, 1) + Call(FreezeBattleState, FALSE) + EndThread + Call(WaitForBuffDone) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(10) + Call(YieldTurn) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/groove_guy.inc.c b/src/battle/common/actor/groove_guy.inc.c index 2e661323f5b..bdf5e50579d 100644 --- a/src/battle/common/actor/groove_guy.inc.c +++ b/src/battle/common/actor/groove_guy.inc.c @@ -121,495 +121,495 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Generation, 0) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_Generation, 0) + Return + End }; #include "common/battle/SetAbsoluteStatusOffsets.inc.c" EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SLEEP) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -4, 14) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) - EVT_CALL(N(SetAbsoluteStatusOffsets), -13, 15, 4, 13) - EVT_ELSE - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 24) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -10) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SLEEP) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -4, 14) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) + Call(N(SetAbsoluteStatusOffsets), -13, 15, 4, 13) + Else + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 24) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -10) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GrooveGuy_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim01) - EVT_RETURN - EVT_END + Call(ResetAllActorSounds, ACTOR_SELF) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GrooveGuy_Anim04) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim01) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GrooveGuy_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GrooveGuy_Anim0E) - EVT_SET_CONST(LVar2, ANIM_GrooveGuy_Anim0F) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GrooveGuy_Anim0E) - EVT_SET_CONST(LVar2, ANIM_GrooveGuy_Anim0F) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GrooveGuy_Anim0F) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GrooveGuy_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GrooveGuy_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GrooveGuy_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GrooveGuy_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GrooveGuy_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GrooveGuy_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GrooveGuy_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GrooveGuy_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GrooveGuy_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GrooveGuy_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GrooveGuy_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GrooveGuy_Anim04) - EVT_SET_CONST(LVar2, ANIM_GrooveGuy_Anim11) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GrooveGuy_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_OR_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GrooveGuy_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_GrooveGuy_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GrooveGuy_Anim08) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GrooveGuy_Anim0E) + SetConst(LVar2, ANIM_GrooveGuy_Anim0F) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GrooveGuy_Anim0E) + SetConst(LVar2, ANIM_GrooveGuy_Anim0F) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GrooveGuy_Anim0F) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GrooveGuy_Anim08) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GrooveGuy_Anim08) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GrooveGuy_Anim08) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GrooveGuy_Anim08) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GrooveGuy_Anim08) + ExecWait(EVS_Enemy_Knockback) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GrooveGuy_Anim08) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GrooveGuy_Anim08) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GrooveGuy_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GrooveGuy_Anim08) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GrooveGuy_Anim08) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GrooveGuy_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GrooveGuy_Anim04) + SetConst(LVar2, ANIM_GrooveGuy_Anim11) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GrooveGuy_Anim04) + ExecWait(EVS_Enemy_AirLift) + CaseOrEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GrooveGuy_Anim04) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_GrooveGuy_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_Tackle) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim04) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_ACTOR_HOP, 0) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim10) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HOP) - EVT_END_THREAD - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim10) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim01) - EVT_WAIT(8) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim04) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_ACTOR_HOP, 0) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim10) + Call(SetGoalToTarget, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(ResetAllActorSounds, ACTOR_SELF) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + ExecWait(N(EVS_ReturnHome)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Thread + Wait(3) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HOP) + EndThread + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim10) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 10) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim01) + Wait(8) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_SleepySpin) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim10) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_GROOVE_GUY_TWIRL) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0C) - EVT_SET(LVar0, 0) - EVT_LOOP(30) - EVT_ADD(LVar0, 48) - EVT_MOD(LVar0, 360) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0B) - EVT_WAIT(20) - EVT_IF_EQ(LVar0, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, DMG_STATUS_KEY(STATUS_FLAG_DIZZY, 2, 50), 0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(WasStatusInflicted, ACTOR_SELF, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(30) - EVT_ADD(LVar0, 48) - EVT_MOD(LVar0, 360) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 0) - EVT_END_THREAD - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_GROOVE_GUY_LEAP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0B) - EVT_SET(LVar0, 0) - EVT_LOOP(15) - EVT_ADD(LVar0, 24) - EVT_MOD(LVar0, 360) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0C) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_GROOVE_GUY_SPIN_DOWN) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(20) - EVT_ADD(LVar0, 72) - EVT_MOD(LVar0, 360) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_END_THREAD - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0A) - EVT_WAIT(25) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim10) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 10) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_GROOVE_GUY_TWIRL) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0C) + Set(LVar0, 0) + Loop(30) + Add(LVar0, 48) + Mod(LVar0, 360) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0B) + Wait(20) + IfEq(LVar0, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + ExecWait(N(EVS_ReturnHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, DMG_STATUS_KEY(STATUS_FLAG_DIZZY, 2, 50), 0, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(WasStatusInflicted, ACTOR_SELF, LVar0) + IfEq(LVar0, TRUE) + Thread + Set(LVar0, 0) + Loop(30) + Add(LVar0, 48) + Mod(LVar0, 360) + Call(SetActorYaw, ACTOR_PLAYER, LVar0) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_PLAYER, 0) + EndThread + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_GROOVE_GUY_LEAP) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0B) + Set(LVar0, 0) + Loop(15) + Add(LVar0, 24) + Mod(LVar0, 360) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0C) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_GROOVE_GUY_SPIN_DOWN) + Thread + Set(LVar0, 0) + Loop(20) + Add(LVar0, 72) + Mod(LVar0, 360) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, LVar0) + EndThread + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0A) + Wait(25) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_GetAvailableColumn) = { - EVT_SET(LFlag1, FALSE) - EVT_SET(LFlag2, FALSE) - EVT_SET(LFlag3, FALSE) - EVT_SET(LFlag4, FALSE) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar5) - EVT_CALL(GetIndexFromHome, LVar0, LVar5) - EVT_MOD(LVar5, 4) - EVT_SWITCH(LVar5) - EVT_CASE_EQ(0) - EVT_SET(LFlag1, TRUE) - EVT_CASE_EQ(1) - EVT_SET(LFlag2, TRUE) - EVT_CASE_EQ(2) - EVT_SET(LFlag3, TRUE) - EVT_CASE_EQ(3) - EVT_SET(LFlag4, TRUE) - EVT_END_SWITCH - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_EQ(LFlag1, FALSE) - EVT_SET(LVarA, 0) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LFlag2, FALSE) - EVT_SET(LVarA, 1) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LFlag3, FALSE) - EVT_SET(LVarA, 2) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LFlag4, FALSE) - EVT_SET(LVarA, 3) - EVT_RETURN - EVT_END_IF - EVT_SET(LVarA, -1) - EVT_RETURN - EVT_END + Set(LFlag1, FALSE) + Set(LFlag2, FALSE) + Set(LFlag3, FALSE) + Set(LFlag4, FALSE) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar5) + Call(GetIndexFromHome, LVar0, LVar5) + Mod(LVar5, 4) + Switch(LVar5) + CaseEq(0) + Set(LFlag1, TRUE) + CaseEq(1) + Set(LFlag2, TRUE) + CaseEq(2) + Set(LFlag3, TRUE) + CaseEq(3) + Set(LFlag4, TRUE) + EndSwitch + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + IfEq(LFlag1, FALSE) + Set(LVarA, 0) + Return + EndIf + IfEq(LFlag2, FALSE) + Set(LVarA, 1) + Return + EndIf + IfEq(LFlag3, FALSE) + Set(LVarA, 2) + Return + EndIf + IfEq(LFlag4, FALSE) + Set(LVarA, 3) + Return + EndIf + Set(LVarA, -1) + Return + End }; EvtScript N(EVS_CountActiveSummoners) = { - EVT_SET(LVar9, 0) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetOriginalActorType, LVar0, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(ACTOR_TYPE_GROOVE_GUY) - EVT_CALL(GetStatusFlags, LVar0, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(GetActorVar, LVar0, AVAR_Generation, LVar3) - EVT_IF_NE(LVar3, 2) - EVT_ADD(LVar9, 1) - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVar9, 0) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetOriginalActorType, LVar0, LVar2) + Switch(LVar2) + CaseEq(ACTOR_TYPE_GROOVE_GUY) + Call(GetStatusFlags, LVar0, LVar3) + IfNotFlag(LVar3, STATUS_FLAGS_IMMOBILIZED) + Call(GetActorVar, LVar0, AVAR_Generation, LVar3) + IfNe(LVar3, 2) + Add(LVar9, 1) + EndIf + EndIf + EndSwitch + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar0) - EVT_IF_EQ(LVar0, 2) - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 60) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_DIZZY) - EVT_EXEC_WAIT(N(EVS_Attack_Tackle)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_SleepySpin)) - EVT_END_IF - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_Tackle)) - EVT_END_IF - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_GetAvailableColumn)) - EVT_IF_EQ(LVarA, -1) - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 60) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_DIZZY) - EVT_EXEC_WAIT(N(EVS_Attack_Tackle)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_SleepySpin)) - EVT_END_IF - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_Tackle)) - EVT_END_IF - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_CountActiveSummoners)) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(1) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 300) - EVT_EXEC_WAIT(N(EVS_RandomSummon)) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(2) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 150) - EVT_EXEC_WAIT(N(EVS_RandomSummon)) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(3) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 100) - EVT_EXEC_WAIT(N(EVS_RandomSummon)) - EVT_RETURN - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 60) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_DIZZY) - EVT_EXEC_WAIT(N(EVS_Attack_Tackle)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_SleepySpin)) - EVT_END_IF - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_Tackle)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar0) + IfEq(LVar0, 2) + Call(RandInt, 100, LVar0) + IfLt(LVar0, 60) + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfFlag(LVar0, STATUS_FLAG_DIZZY) + ExecWait(N(EVS_Attack_Tackle)) + Else + ExecWait(N(EVS_Attack_SleepySpin)) + EndIf + Else + ExecWait(N(EVS_Attack_Tackle)) + EndIf + Return + EndIf + ExecWait(N(EVS_GetAvailableColumn)) + IfEq(LVarA, -1) + Call(RandInt, 100, LVar0) + IfLt(LVar0, 60) + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfFlag(LVar0, STATUS_FLAG_DIZZY) + ExecWait(N(EVS_Attack_Tackle)) + Else + ExecWait(N(EVS_Attack_SleepySpin)) + EndIf + Else + ExecWait(N(EVS_Attack_Tackle)) + EndIf + Return + EndIf + ExecWait(N(EVS_CountActiveSummoners)) + Switch(LVar9) + CaseEq(1) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 300) + ExecWait(N(EVS_RandomSummon)) + Return + EndIf + CaseEq(2) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 150) + ExecWait(N(EVS_RandomSummon)) + Return + EndIf + CaseEq(3) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 100) + ExecWait(N(EVS_RandomSummon)) + Return + EndIf + EndSwitch + Call(RandInt, 100, LVar0) + IfLt(LVar0, 60) + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfFlag(LVar0, STATUS_FLAG_DIZZY) + ExecWait(N(EVS_Attack_Tackle)) + Else + ExecWait(N(EVS_Attack_SleepySpin)) + EndIf + Else + ExecWait(N(EVS_Attack_Tackle)) + EndIf + Return + End }; EvtScript N(EVS_RandomSummon) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_11) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(RandInt, 2, LVar1) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_SummonShyGuy)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_SummonGrooveGuy)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_SummonMediGuy)) - EVT_END_SWITCH - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_PRESET_11) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(RandInt, 2, LVar1) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_SummonShyGuy)) + CaseEq(1) + ExecWait(N(EVS_SummonGrooveGuy)) + CaseEq(2) + ExecWait(N(EVS_SummonMediGuy)) + EndSwitch + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Return + End }; API_CALLABLE(N(SpawnSpinFX)) { @@ -633,198 +633,198 @@ API_CALLABLE(N(SpawnSpinFX)) { } EvtScript N(EVS_PerformSummonDance) = { - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CALL_FOR_BACKUP) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0C) - EVT_WAIT(4) - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CALL_FOR_BACKUP) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0B) - EVT_WAIT(4) - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CALL_FOR_BACKUP) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0C) - EVT_WAIT(4) - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CALL_FOR_BACKUP) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0D) - EVT_WAIT(4) - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CALL_FOR_BACKUP) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0C) - EVT_WAIT(4) - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CALL_FOR_BACKUP) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0B) - EVT_WAIT(4) - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CALL_FOR_BACKUP) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0C) - EVT_WAIT(4) - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CALL_FOR_BACKUP) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0D) - EVT_WAIT(4) - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CALL_FOR_BACKUP) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0C) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_SETF(LVar3, EVT_FLOAT(1.0)) - EVT_ELSE - EVT_SETF(LVar3, EVT_FLOAT(0.4)) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(N(SpawnSpinFX), LVar0, LVar1, LVar2, LVar3, 48) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_GROOVE_GUY_SUMMON) - EVT_SET(LVar0, 0) - EVT_LOOP(48) - EVT_ADD(LVar0, 30) - EVT_IF_GE(LVar0, 360) - EVT_SUB(LVar0, 360) - EVT_END_IF - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 30) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 30, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0A) - EVT_WAIT(8) - EVT_RETURN - EVT_END + Thread + Wait(1) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CALL_FOR_BACKUP) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0C) + Wait(4) + Thread + Wait(1) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CALL_FOR_BACKUP) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0B) + Wait(4) + Thread + Wait(1) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CALL_FOR_BACKUP) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0C) + Wait(4) + Thread + Wait(1) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CALL_FOR_BACKUP) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0D) + Wait(4) + Thread + Wait(1) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CALL_FOR_BACKUP) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0C) + Wait(4) + Thread + Wait(1) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CALL_FOR_BACKUP) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0B) + Wait(4) + Thread + Wait(1) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CALL_FOR_BACKUP) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0C) + Wait(4) + Thread + Wait(1) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CALL_FOR_BACKUP) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0D) + Wait(4) + Thread + Wait(1) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CALL_FOR_BACKUP) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0C) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SHRINK) + SetF(LVar3, Float(1.0)) + Else + SetF(LVar3, Float(0.4)) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(N(SpawnSpinFX), LVar0, LVar1, LVar2, LVar3, 48) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_GROOVE_GUY_SUMMON) + Set(LVar0, 0) + Loop(48) + Add(LVar0, 30) + IfGe(LVar0, 360) + Sub(LVar0, 360) + EndIf + Call(SetActorRotation, ACTOR_SELF, 0, LVar0, 0) + Wait(1) + EndLoop + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 30) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 30, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_GrooveGuy_Anim0A) + Wait(8) + Return + End }; EvtScript N(EVS_SummonShyGuy) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_EXEC_WAIT(N(EVS_PerformSummonDance)) - EVT_CALL(SummonEnemy, EVT_PTR(N(ShyGuyFormation)), FALSE) - EVT_SET(LVarB, LVar0) - EVT_SET(LVar0, 200) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_CALL(SetActorPos, LVarB, LVar0, LVar1, LVar2) - EVT_CALL(SetAnimation, LVarB, PRT_MAIN, ANIM_ShyGuy_Red_Anim04) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetGoalToIndex, LVarB, LVarA) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) - EVT_CALL(SetActorSpeed, LVarB, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, LVarB, 0, FALSE) - EVT_CALL(SetAnimation, LVarB, PRT_MAIN, ANIM_ShyGuy_Red_Anim01) - EVT_CALL(GetActorPos, LVarB, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, LVarB, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, LVarB) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + ExecWait(N(EVS_PerformSummonDance)) + Call(SummonEnemy, Ref(N(ShyGuyFormation)), FALSE) + Set(LVarB, LVar0) + Set(LVar0, 200) + Set(LVar1, 0) + Set(LVar2, 0) + Call(SetActorPos, LVarB, LVar0, LVar1, LVar2) + Call(SetAnimation, LVarB, PRT_MAIN, ANIM_ShyGuy_Red_Anim04) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetGoalToIndex, LVarB, LVarA) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) + Call(SetActorSpeed, LVarB, Float(4.0)) + Call(RunToGoal, LVarB, 0, FALSE) + Call(SetAnimation, LVarB, PRT_MAIN, ANIM_ShyGuy_Red_Anim01) + Call(GetActorPos, LVarB, LVar0, LVar1, LVar2) + Call(ForceHomePos, LVarB, LVar0, LVar1, LVar2) + Call(HPBarToHome, LVarB) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_SummonGrooveGuy) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_EXEC_WAIT(N(EVS_PerformSummonDance)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SummonEnemy, EVT_PTR(N(GrooveGuyFormation)), FALSE) - EVT_SET(LVarB, LVar0) - EVT_CALL(SetAnimation, LVarB, PRT_MAIN, ANIM_GrooveGuy_Anim0C) - EVT_CALL(SetGoalToIndex, LVarB, LVarA) - EVT_CALL(GetGoalPos, LVarB, LVar3, LVar4, LVar5) - EVT_ADD(LVar3, 200) - EVT_CALL(SetActorPos, LVarB, LVar3, LVar4, LVar5) - EVT_THREAD - EVT_SET(LVar6, 0) - EVT_LOOP(50) - EVT_ADD(LVar6, 30) - EVT_MOD(LVar6, 360) - EVT_CALL(SetActorYaw, LVarB, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, LVarB, 0) - EVT_END_THREAD - EVT_CALL(SetActorSounds, LVarB, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_THREAD - EVT_LOOP(2) - EVT_CALL(PlaySoundAtActor, LVarB, SOUND_GROOVE_GUY_TWIRL) - EVT_WAIT(25) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetActorSpeed, LVarB, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, LVarB, 0, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SMALL_LENS_FLARE) - EVT_CALL(SetAnimation, LVarB, PRT_MAIN, ANIM_GrooveGuy_Anim0A) - EVT_CALL(GetActorPos, LVarB, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 30, 0) - EVT_CALL(GetActorPos, LVarB, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, LVarB, LVar0, LVar1, LVar2) - EVT_WAIT(25) - EVT_CALL(SetAnimation, LVarB, PRT_MAIN, ANIM_GrooveGuy_Anim01) - EVT_CALL(HPBarToHome, LVarB) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetActorVar, LVarB, AVAR_Generation, 1) - EVT_CASE_EQ(1) - EVT_CALL(SetActorVar, LVarB, AVAR_Generation, 2) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + ExecWait(N(EVS_PerformSummonDance)) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SummonEnemy, Ref(N(GrooveGuyFormation)), FALSE) + Set(LVarB, LVar0) + Call(SetAnimation, LVarB, PRT_MAIN, ANIM_GrooveGuy_Anim0C) + Call(SetGoalToIndex, LVarB, LVarA) + Call(GetGoalPos, LVarB, LVar3, LVar4, LVar5) + Add(LVar3, 200) + Call(SetActorPos, LVarB, LVar3, LVar4, LVar5) + Thread + Set(LVar6, 0) + Loop(50) + Add(LVar6, 30) + Mod(LVar6, 360) + Call(SetActorYaw, LVarB, LVar6) + Wait(1) + EndLoop + Call(SetActorYaw, LVarB, 0) + EndThread + Call(SetActorSounds, LVarB, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Thread + Loop(2) + Call(PlaySoundAtActor, LVarB, SOUND_GROOVE_GUY_TWIRL) + Wait(25) + EndLoop + EndThread + Call(SetActorSpeed, LVarB, Float(4.0)) + Call(RunToGoal, LVarB, 0, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SMALL_LENS_FLARE) + Call(SetAnimation, LVarB, PRT_MAIN, ANIM_GrooveGuy_Anim0A) + Call(GetActorPos, LVarB, LVar0, LVar1, LVar2) + Add(LVar1, 20) + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 30, 0) + Call(GetActorPos, LVarB, LVar0, LVar1, LVar2) + Call(ForceHomePos, LVarB, LVar0, LVar1, LVar2) + Wait(25) + Call(SetAnimation, LVarB, PRT_MAIN, ANIM_GrooveGuy_Anim01) + Call(HPBarToHome, LVarB) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Call(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar0) + Switch(LVar0) + CaseEq(0) + Call(SetActorVar, LVarB, AVAR_Generation, 1) + CaseEq(1) + Call(SetActorVar, LVarB, AVAR_Generation, 2) + EndSwitch + Return + End }; EvtScript N(EVS_SummonMediGuy) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_EXEC_WAIT(N(EVS_PerformSummonDance)) - EVT_CALL(SummonEnemy, EVT_PTR(N(MediGuyFormation)), FALSE) - EVT_SET(LVarB, LVar0) - EVT_CALL(SetAnimation, LVarB, PRT_MAIN, ANIM_MediGuy_Anim05) - EVT_ADD(LVarA, 4) - EVT_CALL(SetGoalToIndex, LVarB, LVarA) - EVT_CALL(GetGoalPos, LVarB, LVar3, LVar4, LVar5) - EVT_SET(LVar0, 200) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_CALL(SetActorPos, LVarB, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSounds, LVarB, ACTOR_SOUND_WALK, SOUND_SHY_GUY_FLY, SOUND_NONE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetActorSpeed, LVarB, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, LVarB, 0, FALSE) - EVT_CALL(SetAnimation, LVarB, PRT_MAIN, ANIM_MediGuy_Anim01) - EVT_CALL(GetActorPos, LVarB, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, LVarB, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, LVarB) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + ExecWait(N(EVS_PerformSummonDance)) + Call(SummonEnemy, Ref(N(MediGuyFormation)), FALSE) + Set(LVarB, LVar0) + Call(SetAnimation, LVarB, PRT_MAIN, ANIM_MediGuy_Anim05) + Add(LVarA, 4) + Call(SetGoalToIndex, LVarB, LVarA) + Call(GetGoalPos, LVarB, LVar3, LVar4, LVar5) + Set(LVar0, 200) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Call(SetActorPos, LVarB, LVar0, LVar1, LVar2) + Call(SetActorSounds, LVarB, ACTOR_SOUND_WALK, SOUND_SHY_GUY_FLY, SOUND_NONE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetActorSpeed, LVarB, Float(4.0)) + Call(RunToGoal, LVarB, 0, FALSE) + Call(SetAnimation, LVarB, PRT_MAIN, ANIM_MediGuy_Anim01) + Call(GetActorPos, LVarB, LVar0, LVar1, LVar2) + Call(ForceHomePos, LVarB, LVar0, LVar1, LVar2) + Call(HPBarToHome, LVarB) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; Vec3i N(SummonPos) = { NPC_DISPOSE_LOCATION }; diff --git a/src/battle/common/actor/gulpit.inc.c b/src/battle/common/actor/gulpit.inc.c index ab658ada92b..29ef85dae62 100644 --- a/src/battle/common/actor/gulpit.inc.c +++ b/src/battle/common/actor/gulpit.inc.c @@ -142,365 +142,365 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Gulpit_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim01) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Gulpit_Anim03) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim01) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Gulpit_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Gulpit_Anim0C) - EVT_SET_CONST(LVar2, ANIM_Gulpit_Anim0D) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Gulpit_Anim0C) - EVT_SET_CONST(LVar2, ANIM_Gulpit_Anim0D) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Gulpit_Anim0D) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Gulpit_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Gulpit_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Gulpit_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Gulpit_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Gulpit_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Gulpit_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Gulpit_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Gulpit_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Gulpit_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Gulpit_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Gulpit_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Gulpit_Anim03) - EVT_SET_CONST(LVar2, ANIM_Gulpit_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Gulpit_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Gulpit_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Gulpit_Anim0B) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Gulpit_Anim0C) + SetConst(LVar2, ANIM_Gulpit_Anim0D) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Gulpit_Anim0C) + SetConst(LVar2, ANIM_Gulpit_Anim0D) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Gulpit_Anim0D) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Gulpit_Anim0B) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Gulpit_Anim0B) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Gulpit_Anim0B) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Gulpit_Anim0B) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Gulpit_Anim0B) + ExecWait(EVS_Enemy_Knockback) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Gulpit_Anim0B) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Gulpit_Anim0B) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Gulpit_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Gulpit_Anim0B) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Gulpit_Anim0B) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Gulpit_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Gulpit_Anim03) + SetConst(LVar2, ANIM_Gulpit_Anim0B) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Gulpit_Anim03) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Gulpit_Anim03) + ExecWait(EVS_Enemy_BlowAway) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_Lick) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 80) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim03) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(AddGoalPos, ACTOR_SELF, 10, 0, 0) - EVT_ELSE - EVT_CALL(AddGoalPos, ACTOR_SELF, 20, 0, 0) - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim01) - EVT_WAIT(10) - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_GULPIT_LICK) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim04) - EVT_WAIT(9) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_LICK, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 80) + Set(LVar1, 0) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim03) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(AddGoalPos, ACTOR_SELF, 10, 0, 0) + Else + Call(AddGoalPos, ACTOR_SELF, 20, 0, 0) + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim01) + Wait(10) + Thread + Wait(3) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_GULPIT_LICK) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim04) + Wait(9) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + ExecWait(N(EVS_ReturnHome)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_LICK, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(10) + Call(YieldTurn) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_SpitRock) = { - EVT_SET(LVarA, LVar0) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_SUB(LVar2, 1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim02) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim01) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_GULPIT_LICK) - EVT_CALL(GetActorVar, LVarA, AVAR_Rock_Type, LVar0) - EVT_SET(LVarB, LVar0) - EVT_SWITCH(LVarB) - EVT_CASE_EQ(0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim05) - EVT_WAIT(3) - EVT_CALL(RemoveActor, LVarA) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim06) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim07) - EVT_SET(LVarA, 2) - EVT_CASE_EQ(1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim08) - EVT_WAIT(3) - EVT_CALL(RemoveActor, LVarA) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim09) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim0A) - EVT_SET(LVarA, 3) - EVT_END_SWITCH - EVT_CALL(SetPartSounds, ACTOR_SELF, LVarA, ACTOR_SOUND_JUMP, SOUND_LIGHT_THROW, SOUND_NONE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVar9, LVar0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVarA, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar2, 2) - EVT_CALL(SetPartPos, ACTOR_SELF, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -100, 0, 5) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, LVarA, EVT_FLOAT(14.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVarA, EVT_FLOAT(0.01)) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpPartTo, ACTOR_SELF, LVarA, LVar0, LVar1, LVar2, 0, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVarA, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_IF_EQ(LVar9, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(YieldTurn) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVarA, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar2, 2) - EVT_CALL(SetPartPos, ACTOR_SELF, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, LVarA, EVT_FLOAT(14.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVarA, EVT_FLOAT(0.01)) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpPartTo, ACTOR_SELF, LVarA, LVar0, LVar1, LVar2, 0, TRUE) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(PRT_BIG_ROCK) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_BIG_ROCK, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_EQ(PRT_SMALL_ROCK) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SMALL_ROCK, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim01) - EVT_CALL(GetPartOffset, ACTOR_SELF, LVarA, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -100) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVarA, EVT_FLOAT(1.0)) - EVT_CALL(JumpPartTo, ACTOR_SELF, LVarA, LVar0, LVar1, LVar2, 25, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVarA, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Sub(LVar2, 1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim02) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim01) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_GULPIT_LICK) + Call(GetActorVar, LVarA, AVAR_Rock_Type, LVar0) + Set(LVarB, LVar0) + Switch(LVarB) + CaseEq(0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim05) + Wait(3) + Call(RemoveActor, LVarA) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim06) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim07) + Set(LVarA, 2) + CaseEq(1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim08) + Wait(3) + Call(RemoveActor, LVarA) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim09) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim0A) + Set(LVarA, 3) + EndSwitch + Call(SetPartSounds, ACTOR_SELF, LVarA, ACTOR_SOUND_JUMP, SOUND_LIGHT_THROW, SOUND_NONE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVar9, LVar0) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetPartFlagBits, ACTOR_SELF, LVarA, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Add(LVar2, 2) + Call(SetPartPos, ACTOR_SELF, LVarA, LVar0, LVar1, LVar2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -100, 0, 5) + Call(SetPartMoveSpeed, ACTOR_SELF, LVarA, Float(14.0)) + Call(SetPartJumpGravity, ACTOR_SELF, LVarA, Float(0.01)) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpPartTo, ACTOR_SELF, LVarA, LVar0, LVar1, LVar2, 0, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, LVarA, ACTOR_PART_FLAG_INVISIBLE, TRUE) + IfEq(LVar9, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(15) + Call(YieldTurn) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + ExecWait(N(EVS_ReturnHome)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetPartFlagBits, ACTOR_SELF, LVarA, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Add(LVar2, 2) + Call(SetPartPos, ACTOR_SELF, LVarA, LVar0, LVar1, LVar2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetPartMoveSpeed, ACTOR_SELF, LVarA, Float(14.0)) + Call(SetPartJumpGravity, ACTOR_SELF, LVarA, Float(0.01)) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpPartTo, ACTOR_SELF, LVarA, LVar0, LVar1, LVar2, 0, TRUE) + Switch(LVarA) + CaseEq(PRT_BIG_ROCK) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_BIG_ROCK, BS_FLAGS1_TRIGGER_EVENTS) + CaseEq(PRT_SMALL_ROCK) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SMALL_ROCK, BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim01) + Call(GetPartOffset, ACTOR_SELF, LVarA, LVar0, LVar1, LVar2) + Add(LVar0, -100) + Call(SetPartJumpGravity, ACTOR_SELF, LVarA, Float(1.0)) + Call(JumpPartTo, ACTOR_SELF, LVarA, LVar0, LVar1, LVar2, 25, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, LVarA, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(10) + Call(YieldTurn) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_Attack_Lick)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_EXEC_WAIT(N(EVS_Attack_Lick)) - EVT_RETURN - EVT_END_IF - EVT_SET(LVarA, 0) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + ExecWait(N(EVS_Attack_Lick)) + Return + EndIf + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + ExecWait(N(EVS_Attack_Lick)) + Return + EndIf + Set(LVarA, 0) // search for rock actors to pick up - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_ALLOW_TARGET_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetOriginalActorType, LVar0, LVar2) - EVT_IF_EQ(LVar2, ACTOR_TYPE_GULPIT_ROCKS) - EVT_ADD(LVarA, 1) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(1) - EVT_SET(LVarB, LVar0) - EVT_CASE_EQ(2) - EVT_SET(LVarC, LVar0) - EVT_CASE_EQ(3) - EVT_SET(LVarD, LVar0) - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_SWITCH(LVarA) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_Attack_Lick)) - EVT_CASE_EQ(1) - EVT_SET(LVar0, LVarB) - EVT_EXEC_WAIT(N(EVS_Attack_SpitRock)) - EVT_CASE_EQ(2) - EVT_CALL(RandInt, 1, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SET(LVar0, LVarB) - EVT_CASE_EQ(1) - EVT_SET(LVar0, LVarC) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_Attack_SpitRock)) - EVT_CASE_GE(3) - EVT_CALL(RandInt, 2, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SET(LVar0, LVarB) - EVT_CASE_EQ(1) - EVT_SET(LVar0, LVarC) - EVT_CASE_EQ(2) - EVT_SET(LVar0, LVarD) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_Attack_SpitRock)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_ALLOW_TARGET_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetOriginalActorType, LVar0, LVar2) + IfEq(LVar2, ACTOR_TYPE_GULPIT_ROCKS) + Add(LVarA, 1) + Switch(LVarA) + CaseEq(1) + Set(LVarB, LVar0) + CaseEq(2) + Set(LVarC, LVar0) + CaseEq(3) + Set(LVarD, LVar0) + EndSwitch + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Switch(LVarA) + CaseEq(0) + ExecWait(N(EVS_Attack_Lick)) + CaseEq(1) + Set(LVar0, LVarB) + ExecWait(N(EVS_Attack_SpitRock)) + CaseEq(2) + Call(RandInt, 1, LVar0) + Switch(LVar0) + CaseEq(0) + Set(LVar0, LVarB) + CaseEq(1) + Set(LVar0, LVarC) + EndSwitch + ExecWait(N(EVS_Attack_SpitRock)) + CaseGe(3) + Call(RandInt, 2, LVar0) + Switch(LVar0) + CaseEq(0) + Set(LVar0, LVarB) + CaseEq(1) + Set(LVar0, LVarC) + CaseEq(2) + Set(LVar0, LVarD) + EndSwitch + ExecWait(N(EVS_Attack_SpitRock)) + EndSwitch + Return + End }; diff --git a/src/battle/common/actor/gulpit_rocks.inc.c b/src/battle/common/actor/gulpit_rocks.inc.c index 9f1ff21d86b..e0bcc1ae0d2 100644 --- a/src/battle/common/actor/gulpit_rocks.inc.c +++ b/src/battle/common/actor/gulpit_rocks.inc.c @@ -97,97 +97,97 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_RockType, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(BigRockAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim10) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_RockType, 0) - EVT_CALL(SetActorSize, ACTOR_SELF, 24, 15) - EVT_CASE_EQ(1) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(SmallRockAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim12) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_RockType, 1) - EVT_CALL(SetActorSize, ACTOR_SELF, 10, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(GetActorVar, ACTOR_SELF, AVAR_RockType, LVar0) + Switch(LVar0) + CaseEq(0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(BigRockAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim10) + Call(GetActorVar, ACTOR_SELF, AVAR_RockType, 0) + Call(SetActorSize, ACTOR_SELF, 24, 15) + CaseEq(1) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(SmallRockAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim12) + Call(GetActorVar, ACTOR_SELF, AVAR_RockType, 1) + Call(SetActorSize, ACTOR_SELF, 10, 8) + EndSwitch + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_SelectRockAnim) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_RockType, LVarA) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(0) - EVT_CASE_EQ(1) - EVT_SET_CONST(LVar1, LVar2) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_RockType, LVarA) + Switch(LVarA) + CaseEq(0) + CaseEq(1) + SetConst(LVar1, LVar2) + EndSwitch + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CASE_OR_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Gulpit_Anim10) - EVT_SET_CONST(LVar2, ANIM_Gulpit_Anim12) - EVT_EXEC_WAIT(N(EVS_SelectRockAnim)) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Gulpit_Anim10) - EVT_SET_CONST(LVar2, ANIM_Gulpit_Anim12) - EVT_EXEC_WAIT(N(EVS_SelectRockAnim)) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_BURN_DEATH) - EVT_CASE_OR_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Gulpit_Anim10) - EVT_SET_CONST(LVar2, ANIM_Gulpit_Anim12) - EVT_EXEC_WAIT(N(EVS_SelectRockAnim)) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_RockType, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim11) - EVT_CASE_EQ(1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim13) - EVT_END_SWITCH - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, LVar0, LVar1, LVar2, 0, 0) - EVT_WAIT(30) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + CaseOrEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Gulpit_Anim10) + SetConst(LVar2, ANIM_Gulpit_Anim12) + ExecWait(N(EVS_SelectRockAnim)) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_BEGIN_AIR_LIFT) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Gulpit_Anim10) + SetConst(LVar2, ANIM_Gulpit_Anim12) + ExecWait(N(EVS_SelectRockAnim)) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseOrEq(EVENT_BURN_DEATH) + CaseOrEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Gulpit_Anim10) + SetConst(LVar2, ANIM_Gulpit_Anim12) + ExecWait(N(EVS_SelectRockAnim)) + ExecWait(EVS_Enemy_Hit) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) + Call(GetActorVar, ACTOR_SELF, AVAR_RockType, LVar0) + Switch(LVar0) + CaseEq(0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim11) + CaseEq(1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Gulpit_Anim13) + EndSwitch + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_LANDING_DUST, 1, LVar0, LVar1, LVar2, 0, 0) + Wait(30) + Call(RemoveActor, ACTOR_SELF) + Return + EndCaseGroup + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/battle/common/actor/hammer_bro.inc.c b/src/battle/common/actor/hammer_bro.inc.c index e36619678fa..d8965785ad3 100644 --- a/src/battle/common/actor/hammer_bro.inc.c +++ b/src/battle/common/actor/hammer_bro.inc.c @@ -174,433 +174,433 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unused, 0) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_Unused, 0) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_FLAG(STATUS_FLAG_SLEEP) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) - EVT_CASE_DEFAULT - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unused, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -3, 35) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -3, -10) - EVT_CASE_EQ(1) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseFlag(STATUS_FLAG_SLEEP) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) + CaseDefault + Call(GetActorVar, ACTOR_SELF, AVAR_Unused, LVar0) + Switch(LVar0) + CaseEq(0) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -3, 35) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -3, -10) + CaseEq(1) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) + EndSwitch + EndSwitch + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HammerBros_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HammerBros_Anim0F) - EVT_SET_CONST(LVar2, ANIM_HammerBros_Anim10) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HammerBros_Anim0F) - EVT_SET_CONST(LVar2, ANIM_HammerBros_Anim10) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HammerBros_Anim10) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HammerBros_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HammerBros_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HammerBros_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HammerBros_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HammerBros_Anim17) - EVT_WAIT(10) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HammerBros_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HammerBros_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HammerBros_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HammerBros_Anim07) - EVT_SET_CONST(LVar2, ANIM_HammerBros_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HammerBros_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, -2, 1, 0) - EVT_ELSE - EVT_CALL(SetActorDispOffset, ACTOR_SELF, -5, 3, 0) - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HammerBros_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HammerBros_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HammerBros_Anim0E) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HammerBros_Anim0F) + SetConst(LVar2, ANIM_HammerBros_Anim10) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HammerBros_Anim0F) + SetConst(LVar2, ANIM_HammerBros_Anim10) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HammerBros_Anim10) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HammerBros_Anim0E) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HammerBros_Anim0E) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HammerBros_Anim0E) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HammerBros_Anim15) + ExecWait(EVS_Enemy_NoDamageHit) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HammerBros_Anim17) + Wait(10) + EndIf + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HammerBros_Anim0E) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HammerBros_Anim0E) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HammerBros_Anim02) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HammerBros_Anim07) + SetConst(LVar2, ANIM_HammerBros_Anim0E) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HammerBros_Anim07) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetActorDispOffset, ACTOR_SELF, -2, 1, 0) + Else + Call(SetActorDispOffset, ACTOR_SELF, -5, 3, 0) + EndIf + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HammerBros_Anim0E) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HammerBros_Anim02) + ExecWait(EVS_Enemy_NoDamageHit) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_HammerThrow) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 1) - EVT_END_IF - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CHILD_THREAD - EVT_SET(LVar0, 0) - EVT_LABEL(0) - EVT_ADD(LVar0, 20) - EVT_MOD(LVar0, 360) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_HAMMER_1, 0, 0, LVar0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_CHILD_THREAD - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_HAMMER_1, 0, 50, 0) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_HAMMER_1, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HammerBros_Anim0C) - EVT_GOTO(100) - EVT_END_IF - EVT_CHILD_THREAD - EVT_SET(LVar0, 0) - EVT_LABEL(0) - EVT_ADD(LVar0, 20) - EVT_MOD(LVar0, 360) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_HAMMER_1, 0, 0, LVar0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_CHILD_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 23) - EVT_ADD(LVar1, 23) - EVT_SUB(LVar2, 2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_HAMMER_1, LVar0, LVar1, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HammerBros_Anim0C) - EVT_WAIT(8) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_HAMMER_1, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_LABEL(100) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HammerBros_Anim02) - EVT_END_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_HAMMER_1, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_ELSE - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_HAMMER_1, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_HAMMER_1, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_HAMMER_1, SOUND_HAMMER_BROS_THROW) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_SET(LVar1, 10) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_HAMMER_1, EVT_FLOAT(1.3)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_HAMMER_1, LVar0, LVar1, LVar2, 15, TRUE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_SUB(LVar0, 40) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_HAMMER_1, LVar0, LVar1, LVar2, 15, TRUE) - EVT_SUB(LVar0, 30) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_HAMMER_1, LVar0, LVar1, LVar2, 10, TRUE) - EVT_SUB(LVar0, 20) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_HAMMER_1, LVar0, LVar1, LVar2, 5, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_HAMMER_1, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(15) - EVT_CALL(YieldTurn) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_WAIT(20) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_HAMMER_1, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_HAMMER_1, SOUND_HAMMER_BROS_THROW) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_HAMMER_1, EVT_FLOAT(1.3)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_HAMMER_1, LVar0, LVar1, LVar2, 15, TRUE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, DMG_STATUS_KEY(STATUS_FLAG_SHRINK, 3, 50), DMG_HAMMER_THROW, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_HAMMER_1, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 50) - EVT_SET(LVar1, 10) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_HAMMER_1, LVar0, LVar1, LVar2, 20, TRUE) - EVT_SUB(LVar0, 30) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_HAMMER_1, LVar0, LVar1, LVar2, 10, TRUE) - EVT_SUB(LVar0, 20) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_HAMMER_1, LVar0, LVar1, LVar2, 5, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_HAMMER_1, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(20) - EVT_CALL(YieldTurn) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 1) + EndIf + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + ChildThread + Set(LVar0, 0) + Label(0) + Add(LVar0, 20) + Mod(LVar0, 360) + Call(SetPartRotation, ACTOR_SELF, PRT_HAMMER_1, 0, 0, LVar0) + Wait(1) + Goto(0) + EndChildThread + Call(SetPartPos, ACTOR_SELF, PRT_HAMMER_1, 0, 50, 0) + Call(SetPartFlagBits, ACTOR_SELF, PRT_HAMMER_1, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HammerBros_Anim0C) + Goto(100) + EndIf + ChildThread + Set(LVar0, 0) + Label(0) + Add(LVar0, 20) + Mod(LVar0, 360) + Call(SetPartRotation, ACTOR_SELF, PRT_HAMMER_1, 0, 0, LVar0) + Wait(1) + Goto(0) + EndChildThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 23) + Add(LVar1, 23) + Sub(LVar2, 2) + Call(SetPartPos, ACTOR_SELF, PRT_HAMMER_1, LVar0, LVar1, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HammerBros_Anim0C) + Wait(8) + Call(SetPartFlagBits, ACTOR_SELF, PRT_HAMMER_1, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Label(100) + Thread + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HammerBros_Anim02) + EndThread + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartScale, ACTOR_SELF, PRT_HAMMER_1, Float(0.4), Float(0.4), Float(0.4)) + Else + Call(SetPartScale, ACTOR_SELF, PRT_HAMMER_1, Float(1.0), Float(1.0), Float(1.0)) + EndIf + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetPartSounds, ACTOR_SELF, PRT_HAMMER_1, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) + Call(PlaySoundAtPart, ACTOR_SELF, PRT_HAMMER_1, SOUND_HAMMER_BROS_THROW) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Set(LVar1, 10) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_HAMMER_1, Float(1.3)) + Call(JumpPartTo, ACTOR_SELF, PRT_HAMMER_1, LVar0, LVar1, LVar2, 15, TRUE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Sub(LVar0, 40) + Call(JumpPartTo, ACTOR_SELF, PRT_HAMMER_1, LVar0, LVar1, LVar2, 15, TRUE) + Sub(LVar0, 30) + Call(JumpPartTo, ACTOR_SELF, PRT_HAMMER_1, LVar0, LVar1, LVar2, 10, TRUE) + Sub(LVar0, 20) + Call(JumpPartTo, ACTOR_SELF, PRT_HAMMER_1, LVar0, LVar1, LVar2, 5, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_HAMMER_1, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(15) + Call(YieldTurn) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Wait(20) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetPartSounds, ACTOR_SELF, PRT_HAMMER_1, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) + Call(PlaySoundAtPart, ACTOR_SELF, PRT_HAMMER_1, SOUND_HAMMER_BROS_THROW) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_HAMMER_1, Float(1.3)) + Call(JumpPartTo, ACTOR_SELF, PRT_HAMMER_1, LVar0, LVar1, LVar2, 15, TRUE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, DMG_STATUS_KEY(STATUS_FLAG_SHRINK, 3, 50), DMG_HAMMER_THROW, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(GetPartOffset, ACTOR_SELF, PRT_HAMMER_1, LVar0, LVar1, LVar2) + Sub(LVar0, 50) + Set(LVar1, 10) + Call(JumpPartTo, ACTOR_SELF, PRT_HAMMER_1, LVar0, LVar1, LVar2, 20, TRUE) + Sub(LVar0, 30) + Call(JumpPartTo, ACTOR_SELF, PRT_HAMMER_1, LVar0, LVar1, LVar2, 10, TRUE) + Sub(LVar0, 20) + Call(JumpPartTo, ACTOR_SELF, PRT_HAMMER_1, LVar0, LVar1, LVar2, 5, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_HAMMER_1, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(20) + Call(YieldTurn) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_HammerSurge_Miss) = { - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HammerBros_Anim02) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HammerBros_Anim0C) - EVT_WAIT(4) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetPartSounds, ACTOR_SELF, LVar0, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, LVar0, SOUND_HAMMER_BROS_THROW) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_SET(LVar2, 10) - EVT_CALL(RandInt, 60, LVar4) - EVT_SET(LVar5, 30) - EVT_SUB(LVar5, LVar4) - EVT_ADD(LVar1, LVar5) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVar0, EVT_FLOAT(1.3)) - EVT_CALL(JumpPartTo, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3, 15, TRUE) - EVT_SUB(LVar1, 50) - EVT_SET(LVar2, 10) - EVT_CALL(JumpPartTo, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3, 20, TRUE) - EVT_SUB(LVar1, 30) - EVT_CALL(JumpPartTo, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3, 10, TRUE) - EVT_SUB(LVar1, 20) - EVT_CALL(JumpPartTo, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3, 5, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_RETURN - EVT_END + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HammerBros_Anim02) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HammerBros_Anim0C) + Wait(4) + Call(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetPartSounds, ACTOR_SELF, LVar0, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) + Call(PlaySoundAtPart, ACTOR_SELF, LVar0, SOUND_HAMMER_BROS_THROW) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Set(LVar2, 10) + Call(RandInt, 60, LVar4) + Set(LVar5, 30) + Sub(LVar5, LVar4) + Add(LVar1, LVar5) + Call(SetPartJumpGravity, ACTOR_SELF, LVar0, Float(1.3)) + Call(JumpPartTo, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3, 15, TRUE) + Sub(LVar1, 50) + Set(LVar2, 10) + Call(JumpPartTo, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3, 20, TRUE) + Sub(LVar1, 30) + Call(JumpPartTo, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3, 10, TRUE) + Sub(LVar1, 20) + Call(JumpPartTo, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3, 5, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Return + End }; EvtScript N(EVS_HammerSurge_Hit) = { - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HammerBros_Anim02) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HammerBros_Anim0C) - EVT_WAIT(4) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetPartSounds, ACTOR_SELF, LVar0, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, LVar0, SOUND_HAMMER_BROS_THROW) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVar0, EVT_FLOAT(1.3)) - EVT_CALL(JumpPartTo, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3, 15, TRUE) - EVT_SUB(LVar1, 50) - EVT_SET(LVar2, 10) - EVT_CALL(JumpPartTo, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3, 20, TRUE) - EVT_SUB(LVar1, 30) - EVT_CALL(JumpPartTo, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3, 10, TRUE) - EVT_SUB(LVar1, 20) - EVT_CALL(JumpPartTo, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3, 5, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_RETURN - EVT_END + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HammerBros_Anim02) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HammerBros_Anim0C) + Wait(4) + Call(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetPartSounds, ACTOR_SELF, LVar0, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) + Call(PlaySoundAtPart, ACTOR_SELF, LVar0, SOUND_HAMMER_BROS_THROW) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Call(SetPartJumpGravity, ACTOR_SELF, LVar0, Float(1.3)) + Call(JumpPartTo, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3, 15, TRUE) + Sub(LVar1, 50) + Set(LVar2, 10) + Call(JumpPartTo, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3, 20, TRUE) + Sub(LVar1, 30) + Call(JumpPartTo, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3, 10, TRUE) + Sub(LVar1, 20) + Call(JumpPartTo, ACTOR_SELF, LVar0, LVar1, LVar2, LVar3, 5, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, LVar0, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Return + End }; EvtScript N(EVS_Attack_HammerSurge) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(100) - EVT_ADD(LVar0, 20) - EVT_MOD(LVar0, 360) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_HAMMER_1, 0, 0, LVar0) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_HAMMER_2, 0, 0, LVar0) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_HAMMER_3, 0, 0, LVar0) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_HAMMER_4, 0, 0, LVar0) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_HAMMER_5, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 23) - EVT_ADD(LVar1, 23) - EVT_SUB(LVar2, 2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_HAMMER_1, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_HAMMER_2, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_HAMMER_3, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_HAMMER_4, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_HAMMER_5, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_HAMMER_1, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_HAMMER_2, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_HAMMER_3, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_HAMMER_4, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_HAMMER_5, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_ELSE - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_HAMMER_1, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_HAMMER_2, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_HAMMER_3, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_HAMMER_4, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_HAMMER_5, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_SET(LVar0, PRT_HAMMER_1) - EVT_EXEC(N(EVS_HammerSurge_Miss)) - EVT_WAIT(5) - EVT_SET(LVar0, PRT_HAMMER_2) - EVT_EXEC(N(EVS_HammerSurge_Miss)) - EVT_WAIT(5) - EVT_SET(LVar0, PRT_HAMMER_3) - EVT_EXEC(N(EVS_HammerSurge_Miss)) - EVT_WAIT(5) - EVT_SET(LVar0, PRT_HAMMER_4) - EVT_EXEC(N(EVS_HammerSurge_Miss)) - EVT_WAIT(5) - EVT_SET(LVar0, PRT_HAMMER_5) - EVT_EXEC(N(EVS_HammerSurge_Miss)) - EVT_WAIT(5) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HammerBros_Anim02) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(YieldTurn) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_WAIT(20) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_THREAD - EVT_SET(LVar0, PRT_HAMMER_1) - EVT_EXEC(N(EVS_HammerSurge_Hit)) - EVT_WAIT(5) - EVT_SET(LVar0, PRT_HAMMER_2) - EVT_EXEC(N(EVS_HammerSurge_Hit)) - EVT_WAIT(5) - EVT_SET(LVar0, PRT_HAMMER_3) - EVT_EXEC(N(EVS_HammerSurge_Hit)) - EVT_WAIT(5) - EVT_SET(LVar0, PRT_HAMMER_4) - EVT_EXEC(N(EVS_HammerSurge_Hit)) - EVT_WAIT(5) - EVT_SET(LVar0, PRT_HAMMER_5) - EVT_EXEC(N(EVS_HammerSurge_Hit)) - EVT_END_THREAD - EVT_WAIT(21) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_HAMMER_SURGE, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_WAIT(5) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_HAMMER_SURGE, BS_FLAGS1_NICE_HIT) - EVT_WAIT(5) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_HAMMER_SURGE, BS_FLAGS1_NICE_HIT) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HammerBros_Anim02) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_HAMMER_SURGE, BS_FLAGS1_NICE_HIT) - EVT_WAIT(5) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, DMG_STATUS_KEY(STATUS_FLAG_SHRINK, 3, 50), DMG_HAMMER_SURGE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_WAIT(20) - EVT_CALL(YieldTurn) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Thread + Set(LVar0, 0) + Loop(100) + Add(LVar0, 20) + Mod(LVar0, 360) + Call(SetPartRotation, ACTOR_SELF, PRT_HAMMER_1, 0, 0, LVar0) + Call(SetPartRotation, ACTOR_SELF, PRT_HAMMER_2, 0, 0, LVar0) + Call(SetPartRotation, ACTOR_SELF, PRT_HAMMER_3, 0, 0, LVar0) + Call(SetPartRotation, ACTOR_SELF, PRT_HAMMER_4, 0, 0, LVar0) + Call(SetPartRotation, ACTOR_SELF, PRT_HAMMER_5, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 23) + Add(LVar1, 23) + Sub(LVar2, 2) + Call(SetPartPos, ACTOR_SELF, PRT_HAMMER_1, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_HAMMER_2, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_HAMMER_3, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_HAMMER_4, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_HAMMER_5, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartScale, ACTOR_SELF, PRT_HAMMER_1, Float(0.4), Float(0.4), Float(0.4)) + Call(SetPartScale, ACTOR_SELF, PRT_HAMMER_2, Float(0.4), Float(0.4), Float(0.4)) + Call(SetPartScale, ACTOR_SELF, PRT_HAMMER_3, Float(0.4), Float(0.4), Float(0.4)) + Call(SetPartScale, ACTOR_SELF, PRT_HAMMER_4, Float(0.4), Float(0.4), Float(0.4)) + Call(SetPartScale, ACTOR_SELF, PRT_HAMMER_5, Float(0.4), Float(0.4), Float(0.4)) + Else + Call(SetPartScale, ACTOR_SELF, PRT_HAMMER_1, Float(1.0), Float(1.0), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_HAMMER_2, Float(1.0), Float(1.0), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_HAMMER_3, Float(1.0), Float(1.0), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_HAMMER_4, Float(1.0), Float(1.0), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_HAMMER_5, Float(1.0), Float(1.0), Float(1.0)) + EndIf + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Set(LVar0, PRT_HAMMER_1) + Exec(N(EVS_HammerSurge_Miss)) + Wait(5) + Set(LVar0, PRT_HAMMER_2) + Exec(N(EVS_HammerSurge_Miss)) + Wait(5) + Set(LVar0, PRT_HAMMER_3) + Exec(N(EVS_HammerSurge_Miss)) + Wait(5) + Set(LVar0, PRT_HAMMER_4) + Exec(N(EVS_HammerSurge_Miss)) + Wait(5) + Set(LVar0, PRT_HAMMER_5) + Exec(N(EVS_HammerSurge_Miss)) + Wait(5) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HammerBros_Anim02) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(15) + Call(YieldTurn) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Wait(20) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Thread + Set(LVar0, PRT_HAMMER_1) + Exec(N(EVS_HammerSurge_Hit)) + Wait(5) + Set(LVar0, PRT_HAMMER_2) + Exec(N(EVS_HammerSurge_Hit)) + Wait(5) + Set(LVar0, PRT_HAMMER_3) + Exec(N(EVS_HammerSurge_Hit)) + Wait(5) + Set(LVar0, PRT_HAMMER_4) + Exec(N(EVS_HammerSurge_Hit)) + Wait(5) + Set(LVar0, PRT_HAMMER_5) + Exec(N(EVS_HammerSurge_Hit)) + EndThread + Wait(21) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_HAMMER_SURGE, BS_FLAGS1_INCLUDE_POWER_UPS) + Wait(5) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_HAMMER_SURGE, BS_FLAGS1_NICE_HIT) + Wait(5) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_HAMMER_SURGE, BS_FLAGS1_NICE_HIT) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HammerBros_Anim02) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_HAMMER_SURGE, BS_FLAGS1_NICE_HIT) + Wait(5) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, DMG_STATUS_KEY(STATUS_FLAG_SHRINK, 3, 50), DMG_HAMMER_SURGE, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Wait(20) + Call(YieldTurn) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar1) - EVT_MULF(LVar0, EVT_FLOAT(100.0)) - EVT_DIVF(LVar0, LVar1) - EVT_IF_GT(LVar0, 34) - EVT_EXEC_WAIT(N(EVS_Attack_HammerThrow)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_HammerSurge)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorHP, ACTOR_SELF, LVar0) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar1) + MulF(LVar0, Float(100.0)) + DivF(LVar0, LVar1) + IfGt(LVar0, 34) + ExecWait(N(EVS_Attack_HammerThrow)) + Else + ExecWait(N(EVS_Attack_HammerSurge)) + EndIf + Return + End }; diff --git a/src/battle/common/actor/hurt_plant.inc.c b/src/battle/common/actor/hurt_plant.inc.c index 1d89f13b537..c2c3c02e756 100644 --- a/src/battle/common/actor/hurt_plant.inc.c +++ b/src/battle/common/actor/hurt_plant.inc.c @@ -100,256 +100,256 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; #include "common/battle/SetAbsoluteStatusOffsets.inc.c" EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_FLAG(STATUS_FLAG_SLEEP) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -6, 14) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -2, -5) - EVT_CALL(N(SetAbsoluteStatusOffsets), -20, 8, 0, 14) - EVT_CASE_DEFAULT - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -10, 24) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -8, -5) - EVT_CALL(N(SetAbsoluteStatusOffsets), -18, 23, 1, 20) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseFlag(STATUS_FLAG_SLEEP) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -6, 14) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -2, -5) + Call(N(SetAbsoluteStatusOffsets), -20, 8, 0, 14) + CaseDefault + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -10, 24) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -8, -5) + Call(N(SetAbsoluteStatusOffsets), -18, 23, 1, 20) + EndSwitch + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim04) - EVT_WAIT(10) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim03) - EVT_WAIT(10) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE) - EVT_RETURN - EVT_END + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim04) + Wait(10) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim03) + Wait(10) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim0D) - EVT_WAIT(3) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HurtPlant_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HurtPlant_Anim0A) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HurtPlant_Anim0A) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HurtPlant_Anim0A) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim0D) - EVT_WAIT(3) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HurtPlant_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim0D) - EVT_WAIT(3) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HurtPlant_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HurtPlant_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim0D) - EVT_WAIT(3) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HurtPlant_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim0D) - EVT_WAIT(3) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HurtPlant_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HurtPlant_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HurtPlant_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim0D) - EVT_WAIT(3) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HurtPlant_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HurtPlant_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HurtPlant_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim0D) - EVT_WAIT(3) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HurtPlant_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim04) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_WAIT(20) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HurtPlant_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_HurtPlant_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim0D) + Wait(3) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HurtPlant_Anim0E) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HurtPlant_Anim0A) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HurtPlant_Anim0A) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HurtPlant_Anim0A) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim0D) + Wait(3) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HurtPlant_Anim0E) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim0D) + Wait(3) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HurtPlant_Anim0E) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HurtPlant_Anim0E) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim0D) + Wait(3) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HurtPlant_Anim0E) + ExecWait(EVS_Enemy_ShockHit) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim0D) + Wait(3) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HurtPlant_Anim0E) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HurtPlant_Anim0E) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HurtPlant_Anim02) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim0D) + Wait(3) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HurtPlant_Anim0E) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HurtPlant_Anim0E) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HurtPlant_Anim02) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim0D) + Wait(3) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HurtPlant_Anim0E) + ExecWait(EVS_Enemy_Hit) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim04) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) + Wait(20) + Call(HideHealthBar, ACTOR_SELF) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(RemoveActor, ACTOR_SELF) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HurtPlant_Anim02) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_HurtPlant_Anim02) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim04) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(MoveBattleCamOver, 1) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 27) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(15) - EVT_GOTO(123) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim04) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_WAIT(8) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 27) - EVT_SET(LVar1, 0) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 350) - EVT_CALL(SetBattleCamOffsetZ, 45) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 27) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_LABEL(123) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim03) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim05) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HURT_PLANT_BITE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim06) - EVT_WAIT(6) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim07) - EVT_WAIT(5) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_POISON) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_BITE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_ELSE - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 100), DMG_BITE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_IF - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim07) - EVT_WAIT(5) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim04) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(MoveBattleCamOver, 1) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 27) + Set(LVar1, 0) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Wait(15) + Goto(123) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim04) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) + Wait(8) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 27) + Set(LVar1, 0) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 350) + Call(SetBattleCamOffsetZ, 45) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(MoveBattleCamOver, 20) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 27) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Label(123) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim03) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim05) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HURT_PLANT_BITE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim06) + Wait(6) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim07) + Wait(5) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + ExecWait(N(EVS_ReturnHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Wait(2) + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfFlag(LVar0, STATUS_FLAG_POISON) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_BITE, BS_FLAGS1_TRIGGER_EVENTS) + Else + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 100), DMG_BITE, BS_FLAGS1_TRIGGER_EVENTS) + EndIf + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_HurtPlant_Anim07) + Wait(5) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/hyper_cleft.inc.c b/src/battle/common/actor/hyper_cleft.inc.c index a86bbe8ef60..45428f2c02d 100644 --- a/src/battle/common/actor/hyper_cleft.inc.c +++ b/src/battle/common/actor/hyper_cleft.inc.c @@ -122,248 +122,248 @@ s32 N(HyperAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, FALSE) - EVT_RETURN - EVT_END + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) + Call(SetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, FALSE) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) - EVT_CASE_EQ(PHASE_ENEMY_END) - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_None) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, TRUE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) + CaseEq(PHASE_ENEMY_BEGIN) + CaseEq(PHASE_ENEMY_END) + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_None) + Call(SetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, TRUE) + EndSwitch + Return + End }; #include "common/StartRumbleWithParams.inc.c" EvtScript N(EVS_Move_Charge) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Normal) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_POWER_UP) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 6, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 45, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim04) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(N(StartRumbleWithParams), 200, 10) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.5)) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HYPER_CLEFT_LAND) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, LVar0, LVar1, LVar2, 0, 0) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Charged) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(HyperAnims))) - EVT_CALL(EnableActorGlow, ACTOR_SELF, TRUE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, TRUE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(MoveBattleCamOver, 30) - EVT_LOOP(20) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 1, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, -1, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HYPER_CLEFT_CHARGE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_IF_GT(LVar0, LVar3) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_01) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(30) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim11) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -200, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(12.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_WAIT(15) - EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_CALL(YieldTurn) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetActorPos, ACTOR_SELF, 300, 0, 0) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim07) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim02) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(UprightAnims))) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_THREAD - EVT_LOOP(25) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim11) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(12.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_CHARGED, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(60) - EVT_ADD(LVar0, 18) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 50) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 30, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 40) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_WAIT(20) - EVT_CALL(YieldTurn) - EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim07) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim02) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(UprightAnims))) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + IfEq(LVar0, AVAL_State_Normal) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_POWER_UP) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 10) + PlayEffect(EFFECT_ENERGY_IN_OUT, 6, LVar0, LVar1, LVar2, Float(1.0), 45, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim04) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(N(StartRumbleWithParams), 200, 10) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.5)) + EndThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HYPER_CLEFT_LAND) + PlayEffect(EFFECT_LANDING_DUST, 4, LVar0, LVar1, LVar2, 0, 0) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + EndThread + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Charged) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(HyperAnims))) + Call(EnableActorGlow, ACTOR_SELF, TRUE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, TRUE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndIf + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(MoveBattleCamOver, 30) + Loop(20) + Call(SetActorDispOffset, ACTOR_SELF, 1, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, -1, 0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HYPER_CLEFT_CHARGE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Thread + Loop(0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + IfGt(LVar0, LVar3) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(UseBattleCamPreset, BTL_CAM_PRESET_01) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + EndThread + Thread + Loop(30) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2, 0, 0, 0) + Wait(1) + EndLoop + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim11) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -200, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(12.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Wait(15) + Call(EnableActorGlow, ACTOR_SELF, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + Call(YieldTurn) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetActorPos, ACTOR_SELF, 300, 0, 0) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim07) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim02) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(UprightAnims))) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Thread + Loop(25) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2, 0, 0, 0) + Wait(1) + EndLoop + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim11) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(12.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(ResetAllActorSounds, ACTOR_SELF) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_CHARGED, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) + Set(LVar0, 0) + Loop(60) + Add(LVar0, 18) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 50) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 30, FALSE, TRUE, FALSE) + Sub(LVar0, 40) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Wait(20) + Call(YieldTurn) + Call(EnableActorGlow, ACTOR_SELF, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim07) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim02) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(UprightAnims))) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) - EVT_EXEC_WAIT(N(EVS_Attack_Tackle)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Toppled) - EVT_EXEC_WAIT(N(EVS_TryGettingUp)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Charged) - EVT_EXEC_WAIT(N(EVS_Move_Charge)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetBattleVar, BTL_VAR_HyperSync, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(BTL_VAL_HyperSync_None) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 750) - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Active) - EVT_EXEC_WAIT(N(EVS_Move_Charge)) - EVT_ELSE - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) - EVT_EXEC_WAIT(N(EVS_Attack_Tackle)) - EVT_END_IF - EVT_ELSE - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 500) - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Active) - EVT_EXEC_WAIT(N(EVS_Move_Charge)) - EVT_ELSE - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) - EVT_EXEC_WAIT(N(EVS_Attack_Tackle)) - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(BTL_VAL_HyperSync_Done) - EVT_EXEC_WAIT(N(EVS_Attack_Tackle)) - EVT_RETURN - EVT_CASE_EQ(BTL_VAL_HyperSync_Active) - EVT_EXEC_WAIT(N(EVS_Move_Charge)) - EVT_RETURN - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) + ExecWait(N(EVS_Attack_Tackle)) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + IfEq(LVar0, AVAL_State_Toppled) + ExecWait(N(EVS_TryGettingUp)) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + IfEq(LVar0, AVAL_State_Charged) + ExecWait(N(EVS_Move_Charge)) + Return + EndIf + Call(GetBattleVar, BTL_VAR_HyperSync, LVar0) + Switch(LVar0) + CaseEq(BTL_VAL_HyperSync_None) + Call(GetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, LVar0) + IfEq(LVar0, 0) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 750) + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Active) + ExecWait(N(EVS_Move_Charge)) + Else + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) + ExecWait(N(EVS_Attack_Tackle)) + EndIf + Else + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 500) + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Active) + ExecWait(N(EVS_Move_Charge)) + Else + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) + ExecWait(N(EVS_Attack_Tackle)) + EndIf + EndIf + CaseEq(BTL_VAL_HyperSync_Done) + ExecWait(N(EVS_Attack_Tackle)) + Return + CaseEq(BTL_VAL_HyperSync_Active) + ExecWait(N(EVS_Move_Charge)) + Return + EndSwitch + Return + End }; // everything below this point is copied from the basic Cleft actor @@ -395,465 +395,465 @@ s32 N(ToppledAnims)[] = { }; EvtScript N(EVS_Init_Unused) = { - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn_Unused))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) - EVT_RETURN - EVT_END + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn_Unused))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; #include "common/SetSpinSmashable.inc.c" EvtScript N(EVS_FlipOver) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Toppled) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim07) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(5) - EVT_ADD(LVar0, -36) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.3)) - EVT_SUB(LVar1, 6) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(N(StartRumbleWithParams), 200, 10) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 40, 8, EVT_FLOAT(0.0), 20, 0) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim03) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledAnims))) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledDefenseTable))) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 15) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -7) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, FALSE) - EVT_CALL(N(SetSpinSmashable), FALSE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Toppled) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim07) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) + Thread + Set(LVar0, 0) + Loop(5) + Add(LVar0, -36) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.3)) + Sub(LVar1, 6) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(N(StartRumbleWithParams), 200, 10) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + EndThread + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 40, 8, Float(0.0), 20, 0) + Call(SetActorPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim03) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledAnims))) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledDefenseTable))) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 15) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -7) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, FALSE) + Call(N(SetSpinSmashable), FALSE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(EnableActorGlow, ACTOR_SELF, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CALL(GetLastElement, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_FLAG(DAMAGE_TYPE_BLAST) - EVT_EXEC_WAIT(N(EVS_FlipOver)) - EVT_CASE_DEFAULT - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Toppled) - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim09) - EVT_ELSE - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim08) - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_SWITCH - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_CALL(GetLastElement, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_FLAG(DAMAGE_TYPE_BLAST) - EVT_EXEC_WAIT(N(EVS_FlipOver)) - EVT_CASE_DEFAULT - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION, TRUE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Toppled) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim09) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim08) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_END_IF - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION, FALSE) - EVT_END_SWITCH - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Toppled) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim09) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim08) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_END_IF - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Toppled) - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim09) - EVT_ELSE - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim08) - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Toppled) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_END_IF - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(UprightAnims))) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(UprightAnims))) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_STAR_BEAM) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Charged) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(UprightAnims))) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Toppled) - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim03) - EVT_ELSE - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim02) - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(EVENT_SPIKE_TAUNT) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim18) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, -3) - EVT_ADD(LVar1, 10) - EVT_ELSE - EVT_ADD(LVar0, -8) - EVT_ADD(LVar1, 27) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) - EVT_WAIT(20) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Toppled) - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim03) - EVT_ELSE - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim02) - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Toppled) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_END_IF - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Normal) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_END_IF - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Toppled) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim07) - EVT_SET_CONST(LVar2, ANIM_Cleft_Hyper_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim0F) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Toppled) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim0F) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Cleft_Hyper_Anim08) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + Call(GetLastElement, LVar0) + Switch(LVar0) + CaseFlag(DAMAGE_TYPE_BLAST) + ExecWait(N(EVS_FlipOver)) + CaseDefault + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + IfEq(LVar0, AVAL_State_Toppled) + SetConst(LVar1, ANIM_Cleft_Hyper_Anim09) + Else + SetConst(LVar1, ANIM_Cleft_Hyper_Anim08) + EndIf + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_Hit) + EndSwitch + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + Call(GetLastElement, LVar0) + Switch(LVar0) + CaseFlag(DAMAGE_TYPE_BLAST) + ExecWait(N(EVS_FlipOver)) + CaseDefault + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION, TRUE) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + IfEq(LVar0, AVAL_State_Toppled) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Hyper_Anim09) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Hyper_Anim08) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + EndIf + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION, FALSE) + EndSwitch + CaseEq(EVENT_BURN_DEATH) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + IfEq(LVar0, AVAL_State_Toppled) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Hyper_Anim09) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Hyper_Anim09) + ExecWait(EVS_Enemy_Death) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Hyper_Anim08) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Hyper_Anim08) + ExecWait(EVS_Enemy_Death) + EndIf + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + IfEq(LVar0, AVAL_State_Toppled) + SetConst(LVar1, ANIM_Cleft_Hyper_Anim09) + Else + SetConst(LVar1, ANIM_Cleft_Hyper_Anim08) + EndIf + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + IfEq(LVar0, AVAL_State_Toppled) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Hyper_Anim09) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Hyper_Anim09) + ExecWait(EVS_Enemy_Death) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Hyper_Anim08) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Hyper_Anim08) + ExecWait(EVS_Enemy_Death) + EndIf + Return + CaseEq(EVENT_SHOCK_HIT) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(EnableActorGlow, ACTOR_SELF, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(UprightAnims))) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Hyper_Anim08) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Hyper_Anim08) + ExecWait(EVS_Enemy_Knockback) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Hyper_Anim07) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + CaseEq(EVENT_SHOCK_DEATH) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(EnableActorGlow, ACTOR_SELF, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(UprightAnims))) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Hyper_Anim08) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Hyper_Anim08) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_STAR_BEAM) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + IfEq(LVar0, AVAL_State_Charged) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(EnableActorGlow, ACTOR_SELF, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(UprightAnims))) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + IfEq(LVar0, AVAL_State_Toppled) + SetConst(LVar1, ANIM_Cleft_Hyper_Anim03) + Else + SetConst(LVar1, ANIM_Cleft_Hyper_Anim02) + EndIf + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(EVENT_SPIKE_TAUNT) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim18) + EndIf + Wait(10) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar0, -3) + Add(LVar1, 10) + Else + Add(LVar0, -8) + Add(LVar1, 27) + EndIf + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) + Wait(20) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + IfEq(LVar0, AVAL_State_Toppled) + SetConst(LVar1, ANIM_Cleft_Hyper_Anim03) + Else + SetConst(LVar1, ANIM_Cleft_Hyper_Anim02) + EndIf + SetConst(LVar0, PRT_MAIN) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + IfEq(LVar0, AVAL_State_Toppled) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Hyper_Anim09) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Hyper_Anim09) + ExecWait(EVS_Enemy_Death) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Hyper_Anim08) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Hyper_Anim08) + ExecWait(EVS_Enemy_Death) + EndIf + Return + CaseEq(EVENT_RECOVER_STATUS) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + IfEq(LVar0, AVAL_State_Normal) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Hyper_Anim02) + ExecWait(EVS_Enemy_Recover) + EndIf + CaseEq(EVENT_SCARE_AWAY) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + IfEq(LVar0, AVAL_State_Toppled) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Hyper_Anim03) + ExecWait(EVS_Enemy_NoDamageHit) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Hyper_Anim07) + SetConst(LVar2, ANIM_Cleft_Hyper_Anim08) + ExecWait(EVS_Enemy_ScareAway) + Return + EndIf + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Hyper_Anim0F) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + IfEq(LVar0, AVAL_State_Toppled) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Hyper_Anim0F) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Cleft_Hyper_Anim08) + EndIf + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TryGettingUp) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(3.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim03) - EVT_WAIT(20) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim05) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_SUB(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) - EVT_ELSE - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim03) - EVT_THREAD - EVT_WAIT(3) - EVT_LOOP(5) - EVT_ADD(LVar0, 36) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 6) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.3)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(N(StartRumbleWithParams), 200, 10) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim02) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(UprightAnims))) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(UprightDefenseTable))) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 22) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -10) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, TRUE) - EVT_WAIT(1) - EVT_CALL(N(SetSpinSmashable), TRUE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, FALSE) - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(3.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim03) + Wait(20) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim05) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) + IfGt(LVar0, 0) + Sub(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) + Else + Call(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim03) + Thread + Wait(3) + Loop(5) + Add(LVar0, 36) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 6) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.3)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(N(StartRumbleWithParams), 200, 10) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + EndThread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim02) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(UprightAnims))) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(UprightDefenseTable))) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 22) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -10) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, TRUE) + Wait(1) + Call(N(SetSpinSmashable), TRUE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, FALSE) + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_Tackle) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(MoveBattleCamOver, 30) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(10) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim10) - EVT_WAIT(10) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim11) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, -5) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim00) - EVT_WAIT(8) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CLEFT_TACKLE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_THREAD - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim11) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 100) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, 45) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim08) - EVT_WAIT(15) - EVT_WAIT(8) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim07) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim02) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim11) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim02) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 15) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.4)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim02) - EVT_WAIT(5) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim07) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim02) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(MoveBattleCamOver, 30) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(10) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(5) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim10) + Wait(10) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim11) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, -5) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim00) + Wait(8) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CLEFT_TACKLE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + IfEq(LVarA, HIT_RESULT_LUCKY) + Thread + Wait(10) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndThread + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim11) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 100) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, 45) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim08) + Wait(15) + Wait(8) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, 0) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim07) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim02) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim11) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(ResetAllActorSounds, ACTOR_SELF) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim02) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 15) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.4)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim02) + Wait(5) + Call(YieldTurn) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim07) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Cleft_Hyper_Anim02) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn_Unused) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Toppled) - EVT_EXEC_WAIT(N(EVS_TryGettingUp)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_Tackle)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + IfEq(LVar0, AVAL_State_Toppled) + ExecWait(N(EVS_TryGettingUp)) + Else + ExecWait(N(EVS_Attack_Tackle)) + EndIf + Return + End }; diff --git a/src/battle/common/actor/hyper_goomba.inc.c b/src/battle/common/actor/hyper_goomba.inc.c index eb39eb5b55a..b8d3b9816b2 100644 --- a/src/battle/common/actor/hyper_goomba.inc.c +++ b/src/battle/common/actor/hyper_goomba.inc.c @@ -114,233 +114,233 @@ s32 N(HyperAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsCharged, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, FALSE) - EVT_RETURN - EVT_END + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, FALSE) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) - EVT_CASE_EQ(PHASE_ENEMY_END) - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_None) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, TRUE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) + CaseEq(PHASE_ENEMY_BEGIN) + CaseEq(PHASE_ENEMY_END) + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_None) + Call(SetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, TRUE) + EndSwitch + Return + End }; #include "common/StartRumbleWithParams.inc.c" EvtScript N(EVS_Move_Charge) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsCharged, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_POWER_UP) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 6, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 45, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_GOOMBA_STEP) - EVT_CALL(N(StartRumbleWithParams), 128, 10) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(0.5)) - EVT_END_THREAD - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 1) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(HyperAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) - EVT_CALL(EnableActorGlow, ACTOR_SELF, TRUE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, TRUE) - EVT_WAIT(2) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_LOOP(20) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 1, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, -1, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_IF_GT(LVar0, LVar3) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_01) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_END_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 80) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_ACTOR_HURT, 0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -200, 0, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.01)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(15.0)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_WAIT(20) - EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorPos, ACTOR_SELF, 300, 0, 0) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_ACTOR_HURT, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 80) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.01)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(15.0)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_CHARGED, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_SET(LVar0, 80) - EVT_LOOP(60) - EVT_ADD(LVar0, 18) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_SUB(LVar0, 50) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 30, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 40) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_WAIT(10) - EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetActorVar, ACTOR_SELF, AVAR_IsCharged, LVar0) + IfEq(LVar0, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_POWER_UP) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 10) + PlayEffect(EFFECT_ENERGY_IN_OUT, 6, LVar0, LVar1, LVar2, Float(1.0), 45, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_GOOMBA_STEP) + Call(N(StartRumbleWithParams), 128, 10) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.5)) + EndThread + Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 1) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(HyperAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) + Call(EnableActorGlow, ACTOR_SELF, TRUE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, TRUE) + Wait(2) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndIf + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Loop(20) + Call(SetActorDispOffset, ACTOR_SELF, 1, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, -1, 0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Thread + Loop(0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + IfGt(LVar0, LVar3) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(UseBattleCamPreset, BTL_CAM_PRESET_01) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + EndThread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 80) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_ACTOR_HURT, 0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -200, 0, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.01)) + Call(SetActorSpeed, ACTOR_SELF, Float(15.0)) + Call(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorPos, ACTOR_SELF, LVar0, 0, LVar2) + Wait(20) + Call(EnableActorGlow, ACTOR_SELF, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + Call(YieldTurn) + Call(SetActorPos, ACTOR_SELF, 300, 0, 0) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_ACTOR_HURT, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 80) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.01)) + Call(SetActorSpeed, ACTOR_SELF, Float(15.0)) + Call(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_CHARGED, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Set(LVar0, 80) + Loop(60) + Add(LVar0, 18) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + EndThread + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Sub(LVar0, 50) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 30, FALSE, TRUE, FALSE) + Sub(LVar0, 40) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Wait(10) + Call(EnableActorGlow, ACTOR_SELF, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) - EVT_EXEC_WAIT(N(EVS_Attack_Headbonk)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsCharged, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_Move_Charge)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetBattleVar, BTL_VAR_HyperSync, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(BTL_VAL_HyperSync_None) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 750) - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Active) - EVT_EXEC_WAIT(N(EVS_Move_Charge)) - EVT_ELSE - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) - EVT_EXEC_WAIT(N(EVS_Attack_Headbonk)) - EVT_END_IF - EVT_ELSE - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 500) - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Active) - EVT_EXEC_WAIT(N(EVS_Move_Charge)) - EVT_ELSE - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) - EVT_EXEC_WAIT(N(EVS_Attack_Headbonk)) - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(BTL_VAL_HyperSync_Done) - EVT_EXEC_WAIT(N(EVS_Attack_Headbonk)) - EVT_CASE_EQ(BTL_VAL_HyperSync_Active) - EVT_EXEC_WAIT(N(EVS_Move_Charge)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) + ExecWait(N(EVS_Attack_Headbonk)) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_IsCharged, LVar0) + IfEq(LVar0, 1) + ExecWait(N(EVS_Move_Charge)) + Return + EndIf + Call(GetBattleVar, BTL_VAR_HyperSync, LVar0) + Switch(LVar0) + CaseEq(BTL_VAL_HyperSync_None) + Call(GetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, LVar0) + IfEq(LVar0, 0) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 750) + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Active) + ExecWait(N(EVS_Move_Charge)) + Else + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) + ExecWait(N(EVS_Attack_Headbonk)) + EndIf + Else + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 500) + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Active) + ExecWait(N(EVS_Move_Charge)) + Else + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) + ExecWait(N(EVS_Attack_Headbonk)) + EndIf + EndIf + CaseEq(BTL_VAL_HyperSync_Done) + ExecWait(N(EVS_Attack_Headbonk)) + CaseEq(BTL_VAL_HyperSync_Active) + ExecWait(N(EVS_Move_Charge)) + EndSwitch + Return + End }; s32 N(DefaultAnims)[] = { @@ -371,374 +371,374 @@ s32 N(ShuffleAnims)[] = { // unused EvtScript N(EVS_Init_Base) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_Attack_Headbonk))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_Attack_Headbonk))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(10) - EVT_CALL(RandInt, 80, LVar0) - EVT_ADD(LVar0, 80) - EVT_LOOP(LVar0) - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_LOOP(20) - EVT_LABEL(1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_LOOP(80) - EVT_LABEL(2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(10) - EVT_RETURN - EVT_END + Label(10) + Call(RandInt, 80, LVar0) + Add(LVar0, 80) + Loop(LVar0) + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(0) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Loop(20) + Label(1) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(1) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Loop(80) + Label(2) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(2) + EndIf + Wait(1) + EndLoop + Goto(10) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_Goomba_Hyper_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_Goomba_Hyper_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Dead) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Electrocute) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Dizzy) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Electrocute) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Dead) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_STAR_BEAM) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsCharged, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Dead) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Run) - EVT_SET_CONST(LVar2, ANIM_Goomba_Hyper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_BurnHurt) + SetConst(LVar2, ANIM_Goomba_Hyper_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_BurnHurt) + SetConst(LVar2, ANIM_Goomba_Hyper_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Dead) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(EnableActorGlow, ACTOR_SELF, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Electrocute) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Hurt) + ExecWait(EVS_Enemy_Knockback) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Dizzy) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + CaseEq(EVENT_SHOCK_DEATH) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(EnableActorGlow, ACTOR_SELF, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Electrocute) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Dead) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_STAR_BEAM) + Call(GetActorVar, ACTOR_SELF, AVAR_IsCharged, LVar0) + IfEq(LVar0, 1) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(EnableActorGlow, ACTOR_SELF, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Dead) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Run) + SetConst(LVar2, ANIM_Goomba_Hyper_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/CalculateArcsinDeg.inc.c" EvtScript N(EVS_Attack_Headbonk) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Midair) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_SET(LVar1, 10) - EVT_ADD(LVar2, 3) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_SET(LVar3, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Sleep) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Hurt) - EVT_WAIT(5) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Midair) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_THREAD - EVT_WAIT(4) - EVT_SET(LVar0, 180) - EVT_LOOP(4) - EVT_SUB(LVar0, 45) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Dizzy) - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_SET(LVar3, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Tense) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_END_SWITCH - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_HEADBONK, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) - EVT_WAIT(3) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) + Call(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Midair) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Set(LVar1, 10) + Add(LVar2, 3) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Thread + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) + Set(LVar0, 0) + Loop(16) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Set(LVar3, LVar6) + Wait(1) + EndLoop + EndThread + Thread + Wait(6) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Sleep) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Hurt) + Wait(5) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Midair) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + Thread + Wait(4) + Set(LVar0, 180) + Loop(4) + Sub(LVar0, 45) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Dizzy) + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(SetActorYaw, ACTOR_SELF, 0) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + CaseDefault + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Thread + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) + Set(LVar0, 0) + Loop(16) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Set(LVar3, LVar6) + Wait(1) + EndLoop + EndThread + Thread + Wait(6) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Tense) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0)) + Wait(1) + EndSwitch + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_HEADBONK, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) + Wait(3) + Call(YieldTurn) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/hyper_paragoomba.inc.c b/src/battle/common/actor/hyper_paragoomba.inc.c index f39eb236ebb..da3ef351862 100644 --- a/src/battle/common/actor/hyper_paragoomba.inc.c +++ b/src/battle/common/actor/hyper_paragoomba.inc.c @@ -192,241 +192,241 @@ s32 N(ChargedFlyingAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_Flying_HandlePhase))) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_Flying_TakeTurn))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsCharged, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, FALSE) - EVT_RETURN - EVT_END + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_Flying_HandlePhase))) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_Flying_TakeTurn))) + Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, FALSE) + Return + End }; EvtScript N(EVS_Flying_HandlePhase) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) - EVT_CASE_EQ(PHASE_ENEMY_END) - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_None) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, TRUE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) + CaseEq(PHASE_ENEMY_BEGIN) + CaseEq(PHASE_ENEMY_END) + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_None) + Call(SetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, TRUE) + EndSwitch + Return + End }; EvtScript N(EVS_Attack_ChargedDive) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsCharged, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_POWER_UP) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 6, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 45, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Miss) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, FALSE, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsCharged, TRUE) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, EVT_PTR(N(ChargedFlyingAnims))) - EVT_CALL(EnableActorGlow, ACTOR_SELF, TRUE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_FLYING, ACTOR_EVENT_FLAG_ATTACK_CHARGED, TRUE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(MoveBattleCamOver, 30) - EVT_LOOP(20) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 1, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, -1, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -60) - EVT_THREAD - EVT_SET(LVar0, -60) - EVT_LOOP(60) - EVT_ADD(LVar0, 19) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.01)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(15.0)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 0, FALSE, FALSE, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_01) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -60, 0, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.3)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(AddGoalPos, ACTOR_SELF, -200, 0, 0) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_FLYING, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(30) - EVT_ADD(LVar0, 24) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(SetActorPos, ACTOR_SELF, 300, 0, 0) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(AddGoalPos, ACTOR_SELF, 30, 0, 0) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Idle) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsCharged, FALSE) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, EVT_PTR(N(FlyingAnims))) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -70) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.01)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(15.0)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 0, FALSE, FALSE, FALSE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_CHARGED_DIVE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) - EVT_SET(LVar0, -70) - EVT_LOOP(60) - EVT_ADD(LVar0, 18) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_SUB(LVar0, 70) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, FALSE, FALSE) - EVT_SUB(LVar0, 60) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) - EVT_WAIT(20) - EVT_CALL(YieldTurn) - EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_FLYING, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Run) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsCharged, FALSE) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, EVT_PTR(N(FlyingAnims))) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetActorVar, ACTOR_SELF, AVAR_IsCharged, LVar0) + IfEq(LVar0, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_POWER_UP) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 10) + PlayEffect(EFFECT_ENERGY_IN_OUT, 6, LVar0, LVar1, LVar2, Float(1.0), 45, 0) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Miss) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, FALSE, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, TRUE) + Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(ChargedFlyingAnims))) + Call(EnableActorGlow, ACTOR_SELF, TRUE) + Call(SetPartEventBits, ACTOR_SELF, PRT_FLYING, ACTOR_EVENT_FLAG_ATTACK_CHARGED, TRUE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndIf + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(MoveBattleCamOver, 30) + Loop(20) + Call(SetActorDispOffset, ACTOR_SELF, 1, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, -1, 0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -60) + Thread + Set(LVar0, -60) + Loop(60) + Add(LVar0, 19) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.01)) + Call(SetActorSpeed, ACTOR_SELF, Float(15.0)) + Call(JumpToGoal, ACTOR_SELF, 0, FALSE, FALSE, FALSE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_01) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -60, 0, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.3)) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(AddGoalPos, ACTOR_SELF, -200, 0, 0) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(EnableActorGlow, ACTOR_SELF, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_FLYING, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + Thread + Set(LVar0, 0) + Loop(30) + Add(LVar0, 24) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + EndThread + Call(SetActorPos, ACTOR_SELF, 300, 0, 0) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(AddGoalPos, ACTOR_SELF, 30, 0, 0) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Idle) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, FALSE) + Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(FlyingAnims))) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -70) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.01)) + Call(SetActorSpeed, ACTOR_SELF, Float(15.0)) + Call(JumpToGoal, ACTOR_SELF, 0, FALSE, FALSE, FALSE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_CHARGED_DIVE, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(ResetAllActorSounds, ACTOR_SELF) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) + Set(LVar0, -70) + Loop(60) + Add(LVar0, 18) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Sub(LVar0, 70) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, FALSE, FALSE) + Sub(LVar0, 60) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) + Wait(20) + Call(YieldTurn) + Call(EnableActorGlow, ACTOR_SELF, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_FLYING, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Run) + ExecWait(N(EVS_ReturnHome)) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, FALSE) + Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(FlyingAnims))) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Flying_TakeTurn) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) - EVT_EXEC_WAIT(N(EVS_Attack_SkyDive)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsCharged, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_Attack_ChargedDive)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetBattleVar, BTL_VAR_HyperSync, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 750) - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Active) - EVT_EXEC_WAIT(N(EVS_Attack_ChargedDive)) - EVT_ELSE - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) - EVT_EXEC_WAIT(N(EVS_Attack_SkyDive)) - EVT_END_IF - EVT_ELSE - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 500) - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Active) - EVT_EXEC_WAIT(N(EVS_Attack_ChargedDive)) - EVT_ELSE - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) - EVT_EXEC_WAIT(N(EVS_Attack_SkyDive)) - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_Attack_SkyDive)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_Attack_ChargedDive)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) + ExecWait(N(EVS_Attack_SkyDive)) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_IsCharged, LVar0) + IfEq(LVar0, 1) + ExecWait(N(EVS_Attack_ChargedDive)) + Return + EndIf + Call(GetBattleVar, BTL_VAR_HyperSync, LVar0) + Switch(LVar0) + CaseEq(0) + Call(GetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, LVar0) + IfEq(LVar0, 0) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 750) + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Active) + ExecWait(N(EVS_Attack_ChargedDive)) + Else + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) + ExecWait(N(EVS_Attack_SkyDive)) + EndIf + Else + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 500) + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Active) + ExecWait(N(EVS_Attack_ChargedDive)) + Else + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) + ExecWait(N(EVS_Attack_SkyDive)) + EndIf + EndIf + CaseEq(1) + ExecWait(N(EVS_Attack_SkyDive)) + CaseEq(2) + ExecWait(N(EVS_Attack_ChargedDive)) + EndSwitch + Return + End }; s32 N(FlyingAnims)[] = { @@ -466,386 +466,386 @@ s32 N(RightWingAnims)[] = { }; EvtScript N(EVS_Flying_Init_Unused) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_Attack_SkyDive))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_Attack_SkyDive))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(10) - EVT_CALL(RandInt, 80, LVar0) - EVT_ADD(LVar0, 80) - EVT_LOOP(LVar0) - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(0.6)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, EVT_PTR(N(FlyingShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) - EVT_LOOP(20) - EVT_LABEL(1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(0.6)) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, EVT_PTR(N(FlyingAnims))) - EVT_LOOP(40) - EVT_LABEL(2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(10) - EVT_RETURN - EVT_END + Label(10) + Call(RandInt, 80, LVar0) + Add(LVar0, 80) + Loop(LVar0) + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(0) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(0.6)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(FlyingShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) + Loop(20) + Label(1) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(1) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(0.6)) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) + Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(FlyingAnims))) + Loop(40) + Label(2) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(2) + EndIf + Wait(1) + EndLoop + Goto(10) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Idle) - EVT_RETURN - EVT_END + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(7.0)) + Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Idle) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hyper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(GetEncounterTrigger, LVar0) - EVT_IF_EQ(LVar0, ENCOUNTER_TRIGGER_HAMMER) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_END_IF - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hyper_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_Paragoomba_Hyper_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hyper_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_Paragoomba_Hyper_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hyper_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_FALL_TRIGGER) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hyper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_CASE_EQ(EVENT_15) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hyper_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_Paragoomba_Hyper_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_FLYING, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsCharged, FALSE) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, EVT_PTR(N(FlyingAnims))) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hyper_Electrocute) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hyper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Dizzy) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_FLYING, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsCharged, FALSE) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, EVT_PTR(N(FlyingAnims))) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hyper_Electrocute) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hyper_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_STAR_BEAM) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsCharged, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_FLYING, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsCharged, FALSE) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, EVT_PTR(N(FlyingAnims))) - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hyper_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hyper_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hyper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hyper_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0) - EVT_CALL(HPBarToCurrent, ACTOR_SELF) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Run) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hyper_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hyper_Run) - EVT_SET_CONST(LVar2, ANIM_Paragoomba_Hyper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hyper_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hyper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Hyper_Hurt) + ExecWait(EVS_Enemy_Hit) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(GetEncounterTrigger, LVar0) + IfEq(LVar0, ENCOUNTER_TRIGGER_HAMMER) + ExecWait(N(EVS_KnockDown)) + EndIf + EndIf + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Hyper_BurnHurt) + SetConst(LVar2, ANIM_Paragoomba_Hyper_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Hyper_BurnHurt) + SetConst(LVar2, ANIM_Paragoomba_Hyper_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Hyper_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_FALL_TRIGGER) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Hyper_Hurt) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_KnockDown)) + CaseEq(EVENT_15) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Hyper_BurnHurt) + SetConst(LVar2, ANIM_Paragoomba_Hyper_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_KnockDown)) + CaseEq(EVENT_SHOCK_HIT) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(EnableActorGlow, ACTOR_SELF, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_FLYING, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, FALSE) + Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(FlyingAnims))) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Hyper_Electrocute) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Hyper_Hurt) + ExecWait(EVS_Enemy_Knockback) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Dizzy) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(EnableActorGlow, ACTOR_SELF, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_FLYING, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, FALSE) + Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(FlyingAnims))) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Hyper_Electrocute) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Hyper_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_STAR_BEAM) + Call(GetActorVar, ACTOR_SELF, AVAR_IsCharged, LVar0) + IfEq(LVar0, 1) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(EnableActorGlow, ACTOR_SELF, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_FLYING, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, FALSE) + Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(FlyingAnims))) + EndIf + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Hyper_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Hyper_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Hyper_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Hyper_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + Call(SetActorPos, ACTOR_SELF, 20, 0, 0) + Call(HPBarToCurrent, ACTOR_SELF) + CaseEq(EVENT_END_FIRST_STRIKE) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Run) + ExecWait(N(EVS_ReturnHome)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Hyper_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Hyper_Run) + SetConst(LVar2, ANIM_Paragoomba_Hyper_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Hyper_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Hyper_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_SkyDive) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Run) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, EASING_LINEAR) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_66) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Dive) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_SUB(LVar0, 80) - EVT_SET(LVar1, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Dive) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_QUADRATIC_OUT) - EVT_THREAD - EVT_LOOP(4) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_FLY) - EVT_WAIT(4) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Miss) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_FLYING, EVT_FLOAT(3.0)) - EVT_WAIT(10) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_FLYING, EVT_FLOAT(1.0)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Run) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_66) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Dive) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Dive) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) - EVT_END_SWITCH - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SKY_DIVE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Run) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_WAIT(5) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Run) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Run) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(FlyToGoal, ACTOR_SELF, 0, -4, EASING_LINEAR) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_66) + Call(SetBattleCamZoom, 300) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Dive) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(SetGoalToTarget, ACTOR_SELF) + Sub(LVar0, 80) + Set(LVar1, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Dive) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_QUADRATIC_OUT) + Thread + Loop(4) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_FLY) + Wait(4) + EndLoop + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Miss) + Call(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_FLYING, Float(3.0)) + Wait(10) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(10) + Call(SetAnimationRate, ACTOR_SELF, PRT_FLYING, Float(1.0)) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(YieldTurn) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Run) + Call(SetActorYaw, ACTOR_SELF, 180) + ExecWait(N(EVS_ReturnHome)) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + CaseDefault + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_66) + Call(SetBattleCamZoom, 300) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Dive) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Dive) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) + EndSwitch + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SKY_DIVE, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Run) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) + Call(ResetAllActorSounds, ACTOR_SELF) + Wait(5) + Call(YieldTurn) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Hyper_Run) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/StartRumbleWithParams.inc.c" EvtScript N(EVS_KnockDown) = { - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_PRIMARY_TARGET) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_DUMMY_WING_L, LVar0, LVar1, LVar2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_DUMMY_WING_L, -9, 7, -2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_DUMMY_WING_R, LVar0, LVar1, LVar2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_DUMMY_WING_R, 11, 7, -2) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_IF_EQ(LVar0, EVENT_15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_BurnStill) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Hurt) - EVT_END_IF - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(N(StartRumbleWithParams), 100, 10) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar3) - EVT_IF_EQ(LVar3, EVENT_15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Hurt) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_ADD(LVar4, 10) - EVT_ADD(LVar5, 5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 10, 0) - EVT_END_IF - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_LOOP(10) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(GetIndexFromHome, ACTOR_SELF, LVar0) - EVT_MOD(LVar0, 4) - EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVar0) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(DownedStatusTable))) - EVT_CALL(SetActorType, ACTOR_SELF, ACTOR_TYPE_HYPER_GOOMBA) - EVT_EXEC_WAIT(N(EVS_KnockDown_Init)) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(HideHealthBar, ACTOR_SELF) + Call(SetPartFlags, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET) + Call(SetPartFlags, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION) + Call(SetPartFlags, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION) + Call(SetPartFlags, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_PRIMARY_TARGET) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_DUMMY_WING_L, LVar0, LVar1, LVar2) + Call(SetPartDispOffset, ACTOR_SELF, PRT_DUMMY_WING_L, -9, 7, -2) + Call(SetPartPos, ACTOR_SELF, PRT_DUMMY_WING_R, LVar0, LVar1, LVar2) + Call(SetPartDispOffset, ACTOR_SELF, PRT_DUMMY_WING_R, 11, 7, -2) + Call(GetLastEvent, ACTOR_SELF, LVar0) + IfEq(LVar0, EVENT_15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_BurnStill) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Hurt) + EndIf + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(N(StartRumbleWithParams), 100, 10) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.3)) + EndThread + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) + Call(GetLastEvent, ACTOR_SELF, LVar3) + IfEq(LVar3, EVENT_15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Hurt) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Add(LVar4, 10) + Add(LVar5, 5) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, Float(1.0), 10, 0) + EndIf + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Loop(10) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(GetIndexFromHome, ACTOR_SELF, LVar0) + Mod(LVar0, 4) + Call(SetGoalToIndex, ACTOR_SELF, LVar0) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) + Call(SetStatusTable, ACTOR_SELF, Ref(N(DownedStatusTable))) + Call(SetActorType, ACTOR_SELF, ACTOR_TYPE_HYPER_GOOMBA) + ExecWait(N(EVS_KnockDown_Init)) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) + Call(HPBarToHome, ACTOR_SELF) + Call(ResetAllActorSounds, ACTOR_SELF) + Return + End }; s32 N(DownedChargedAnims)[] = { @@ -862,253 +862,253 @@ s32 N(DownedChargedAnims)[] = { }; EvtScript N(EVS_Downed_Init) = { - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Downed_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_Downed_HandleEvent))) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_Downed_TakeTurn))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsCharged, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, FALSE) - EVT_RETURN - EVT_END + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Downed_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_Downed_HandleEvent))) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_Downed_TakeTurn))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, FALSE) + Return + End }; EvtScript N(EVS_KnockDown_Init) = { - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Downed_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_Downed_HandleEvent))) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_Downed_TakeTurn))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsCharged, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsCharged, FALSE) - EVT_CASE_EQ(1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsCharged, TRUE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, TRUE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_FLYING, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_END_SWITCH - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, LVar0) - EVT_RETURN - EVT_END + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Downed_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_Downed_HandleEvent))) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_Downed_TakeTurn))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(GetActorVar, ACTOR_SELF, AVAR_IsCharged, LVar0) + Switch(LVar0) + CaseEq(0) + Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, FALSE) + CaseEq(1) + Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, TRUE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, TRUE) + Call(SetPartEventBits, ACTOR_SELF, PRT_FLYING, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + EndSwitch + Call(GetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, LVar0) + Return + End }; // everything below is copied from Hyper Goomba actor EvtScript N(EVS_HandlePhase) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) - EVT_CASE_EQ(PHASE_ENEMY_END) - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_None) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, 1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) + CaseEq(PHASE_ENEMY_BEGIN) + CaseEq(PHASE_ENEMY_END) + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_None) + Call(SetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, 1) + EndSwitch + Return + End }; EvtScript N(EVS_Downed_Move_Charge) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsCharged, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_POWER_UP) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 6, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 45, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_GOOMBA_STEP) - EVT_CALL(N(StartRumbleWithParams), 128, 10) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(0.5)) - EVT_END_THREAD - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 1) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DownedChargedAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) - EVT_CALL(EnableActorGlow, ACTOR_SELF, TRUE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, TRUE) - EVT_WAIT(2) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_LOOP(20) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 1, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, -1, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_IF_GT(LVar0, LVar3) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_01) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_END_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 80) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_ACTOR_HURT, 0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -200, 0, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.01)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(15.0)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_WAIT(20) - EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorPos, ACTOR_SELF, 300, 0, 0) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DownedAnims))) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_ACTOR_HURT, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 80) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.01)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(15.0)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_CHARGED_BONK, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_SET(LVar0, 80) - EVT_LOOP(60) - EVT_ADD(LVar0, 18) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_SUB(LVar0, 50) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 30, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 40) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_WAIT(10) - EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DownedAnims))) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetActorVar, ACTOR_SELF, AVAR_IsCharged, LVar0) + IfEq(LVar0, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_POWER_UP) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 10) + PlayEffect(EFFECT_ENERGY_IN_OUT, 6, LVar0, LVar1, LVar2, Float(1.0), 45, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_GOOMBA_STEP) + Call(N(StartRumbleWithParams), 128, 10) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.5)) + EndThread + Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 1) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DownedChargedAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) + Call(EnableActorGlow, ACTOR_SELF, TRUE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, TRUE) + Wait(2) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndIf + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Loop(20) + Call(SetActorDispOffset, ACTOR_SELF, 1, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, -1, 0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Thread + Loop(0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + IfGt(LVar0, LVar3) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(UseBattleCamPreset, BTL_CAM_PRESET_01) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + EndThread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 80) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_ACTOR_HURT, 0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -200, 0, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.01)) + Call(SetActorSpeed, ACTOR_SELF, Float(15.0)) + Call(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorPos, ACTOR_SELF, LVar0, 0, LVar2) + Wait(20) + Call(EnableActorGlow, ACTOR_SELF, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + Call(YieldTurn) + Call(SetActorPos, ACTOR_SELF, 300, 0, 0) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DownedAnims))) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_ACTOR_HURT, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 80) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.01)) + Call(SetActorSpeed, ACTOR_SELF, Float(15.0)) + Call(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_CHARGED_BONK, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Set(LVar0, 80) + Loop(60) + Add(LVar0, 18) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + EndThread + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Sub(LVar0, 50) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 30, FALSE, TRUE, FALSE) + Sub(LVar0, 40) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Wait(10) + Call(EnableActorGlow, ACTOR_SELF, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DownedAnims))) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Downed_TakeTurn) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) - EVT_EXEC_WAIT(N(EVS_Attack_Headbonk)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsCharged, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_Downed_Move_Charge)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetBattleVar, BTL_VAR_HyperSync, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 750) - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Active) - EVT_EXEC_WAIT(N(EVS_Downed_Move_Charge)) - EVT_ELSE - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) - EVT_EXEC_WAIT(N(EVS_Attack_Headbonk)) - EVT_END_IF - EVT_ELSE - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 500) - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Active) - EVT_EXEC_WAIT(N(EVS_Downed_Move_Charge)) - EVT_ELSE - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) - EVT_EXEC_WAIT(N(EVS_Attack_Headbonk)) - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_Attack_Headbonk)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_Downed_Move_Charge)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) + ExecWait(N(EVS_Attack_Headbonk)) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_IsCharged, LVar0) + IfEq(LVar0, 1) + ExecWait(N(EVS_Downed_Move_Charge)) + Return + EndIf + Call(GetBattleVar, BTL_VAR_HyperSync, LVar0) + Switch(LVar0) + CaseEq(0) + Call(GetActorVar, ACTOR_SELF, AVAR_NotFirstTurn, LVar0) + IfEq(LVar0, 0) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 750) + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Active) + ExecWait(N(EVS_Downed_Move_Charge)) + Else + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) + ExecWait(N(EVS_Attack_Headbonk)) + EndIf + Else + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 500) + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Active) + ExecWait(N(EVS_Downed_Move_Charge)) + Else + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) + ExecWait(N(EVS_Attack_Headbonk)) + EndIf + EndIf + CaseEq(1) + ExecWait(N(EVS_Attack_Headbonk)) + CaseEq(2) + ExecWait(N(EVS_Downed_Move_Charge)) + EndSwitch + Return + End }; s32 N(DownedAnims)[] = { @@ -1138,374 +1138,374 @@ s32 N(DownedShuffleAnims)[] = { }; EvtScript N(EVS_Downed_Init_Unused) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_Attack_Headbonk))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Downed_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_Downed_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_Attack_Headbonk))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Downed_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_Downed_HandleEvent))) + Return + End }; EvtScript N(EVS_Downed_Idle) = { - EVT_LABEL(10) - EVT_CALL(RandInt, 80, LVar0) - EVT_ADD(LVar0, 80) - EVT_LOOP(LVar0) - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DownedShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DownedAnims))) - EVT_LOOP(20) - EVT_LABEL(1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DownedShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DownedAnims))) - EVT_LOOP(80) - EVT_LABEL(2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(10) - EVT_RETURN - EVT_END + Label(10) + Call(RandInt, 80, LVar0) + Add(LVar0, 80) + Loop(LVar0) + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(0) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DownedShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DownedAnims))) + Loop(20) + Label(1) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(1) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DownedShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DownedAnims))) + Loop(80) + Label(2) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(2) + EndIf + Wait(1) + EndLoop + Goto(10) + Return + End }; EvtScript N(EVS_Downed_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_Goomba_Hyper_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_Goomba_Hyper_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Dead) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DownedAnims))) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Electrocute) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Dizzy) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DownedAnims))) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Electrocute) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Dead) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_STAR_BEAM) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsCharged, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DownedAnims))) - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Dead) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Run) - EVT_SET_CONST(LVar2, ANIM_Goomba_Hyper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Hyper_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_BurnHurt) + SetConst(LVar2, ANIM_Goomba_Hyper_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_BurnHurt) + SetConst(LVar2, ANIM_Goomba_Hyper_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Dead) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(EnableActorGlow, ACTOR_SELF, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DownedAnims))) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Electrocute) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Hurt) + ExecWait(EVS_Enemy_Knockback) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Dizzy) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + CaseEq(EVENT_SHOCK_DEATH) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(EnableActorGlow, ACTOR_SELF, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DownedAnims))) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Electrocute) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Dead) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_STAR_BEAM) + Call(GetActorVar, ACTOR_SELF, AVAR_IsCharged, LVar0) + IfEq(LVar0, 1) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(EnableActorGlow, ACTOR_SELF, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_IsCharged, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DownedAnims))) + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Dead) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Run) + SetConst(LVar2, ANIM_Goomba_Hyper_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Hyper_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/CalculateArcsinDeg.inc.c" EvtScript N(EVS_Attack_Headbonk) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Midair) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_SET(LVar1, 10) - EVT_ADD(LVar2, 3) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_SET(LVar3, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Sleep) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Hurt) - EVT_WAIT(5) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Midair) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_THREAD - EVT_WAIT(4) - EVT_SET(LVar0, 180) - EVT_LOOP(4) - EVT_SUB(LVar0, 45) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Dizzy) - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_SET(LVar3, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Tense) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_END_SWITCH - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_HEADBONK, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) - EVT_WAIT(3) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) + Call(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Midair) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Set(LVar1, 10) + Add(LVar2, 3) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Thread + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) + Set(LVar0, 0) + Loop(16) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Set(LVar3, LVar6) + Wait(1) + EndLoop + EndThread + Thread + Wait(6) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Sleep) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Hurt) + Wait(5) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Midair) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + Thread + Wait(4) + Set(LVar0, 180) + Loop(4) + Sub(LVar0, 45) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Dizzy) + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(SetActorYaw, ACTOR_SELF, 0) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + CaseDefault + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Thread + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) + Set(LVar0, 0) + Loop(16) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Set(LVar3, LVar6) + Wait(1) + EndLoop + EndThread + Thread + Wait(6) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Tense) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0)) + Wait(1) + EndSwitch + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_HEADBONK, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Idle) + Wait(3) + Call(YieldTurn) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hyper_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/jungle_fuzzy.inc.c b/src/battle/common/actor/jungle_fuzzy.inc.c index 1d831546585..80b7bf29c11 100644 --- a/src/battle/common/actor/jungle_fuzzy.inc.c +++ b/src/battle/common/actor/jungle_fuzzy.inc.c @@ -110,734 +110,734 @@ s32 N(DefaultAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Generation, 0) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_Generation, 0) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CALL(GetLastElement, LVar0) - EVT_IF_FLAG(LVar0, DAMAGE_TYPE_SHOCK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Jungle_HurtShock) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Jungle_Hurt) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Jungle_Burn) - EVT_SET_CONST(LVar2, ANIM_Fuzzy_Jungle_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Jungle_Burn) - EVT_SET_CONST(LVar2, ANIM_Fuzzy_Jungle_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Jungle_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Jungle_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Jungle_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Jungle_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_CALL(func_80269470) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Jungle_HurtShock) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Jungle_HurtShock) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Jungle_Run) - EVT_EXEC_WAIT(EVS_Enemy_HopHome) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_CALL(func_80269470) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Jungle_HurtShock) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Jungle_HurtShock) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Jungle_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_CALL(GetLastElement, LVar0) - EVT_IF_FLAG(LVar0, DAMAGE_TYPE_SHOCK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Jungle_HurtShock) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Jungle_HurtShock) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Jungle_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Jungle_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_END_IF - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Jungle_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Jungle_Run) - EVT_SET_CONST(LVar2, ANIM_Fuzzy_Jungle_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Jungle_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Jungle_Run) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Fuzzy_Jungle_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + Call(GetLastElement, LVar0) + IfFlag(LVar0, DAMAGE_TYPE_SHOCK) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Jungle_HurtShock) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Jungle_Hurt) + EndIf + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Jungle_Burn) + SetConst(LVar2, ANIM_Fuzzy_Jungle_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Jungle_Burn) + SetConst(LVar2, ANIM_Fuzzy_Jungle_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Jungle_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Jungle_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Jungle_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Jungle_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + Call(func_80269470) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Jungle_HurtShock) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Jungle_HurtShock) + ExecWait(EVS_Enemy_Knockback) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Jungle_Run) + ExecWait(EVS_Enemy_HopHome) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + CaseEq(EVENT_SHOCK_DEATH) + Call(func_80269470) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Jungle_HurtShock) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Jungle_HurtShock) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Jungle_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + Call(GetLastElement, LVar0) + IfFlag(LVar0, DAMAGE_TYPE_SHOCK) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Jungle_HurtShock) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Jungle_HurtShock) + ExecWait(EVS_Enemy_Death) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Jungle_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Jungle_Hurt) + ExecWait(EVS_Enemy_Death) + EndIf + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Jungle_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Jungle_Run) + SetConst(LVar2, ANIM_Fuzzy_Jungle_Anim09) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Jungle_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Jungle_Run) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Fuzzy_Jungle_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Move_Divide) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 330) - EVT_CALL(SetBattleCamOffsetZ, 30) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_01) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FUZZY_RUMBLE) - EVT_WAIT(30) - EVT_LOOP(4) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FUZZY_SHAKE) - EVT_WAIT(11) - EVT_END_LOOP - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FUZZY_DIVIDE) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Anim0D) - EVT_WAIT(130) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Walk) - EVT_CALL(SummonEnemy, EVT_PTR(N(SummonFormation)), FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_CALL(SetActorPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(SetGoalToIndex, LVar0, LVarA) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Walk) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_CALL(JumpToGoal, ACTOR_SELF, 14, FALSE, TRUE, FALSE) - EVT_END_THREAD - EVT_WAIT(1) - EVT_CALL(SetAnimation, LVar0, 1, ANIM_Fuzzy_Jungle_Walk) - EVT_CALL(SetActorJumpGravity, LVar0, EVT_FLOAT(1.4)) - EVT_CALL(JumpToGoal, LVar0, 14, FALSE, TRUE, FALSE) - EVT_CALL(GetActorPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(ForceHomePos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(HPBarToHome, LVar0) - EVT_CALL(SetAnimation, LVar0, 1, ANIM_Fuzzy_Jungle_Idle) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar1) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(SetActorVar, LVar0, AVAR_Generation, 1) - EVT_CASE_EQ(1) - EVT_CALL(SetActorVar, LVar0, AVAR_Generation, 2) - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 330) + Call(SetBattleCamOffsetZ, 30) + Call(MoveBattleCamOver, 20) + Wait(20) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_01) + Thread + Wait(30) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FUZZY_RUMBLE) + Wait(30) + Loop(4) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FUZZY_SHAKE) + Wait(11) + EndLoop + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FUZZY_DIVIDE) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Anim0D) + Wait(130) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Walk) + Call(SummonEnemy, Ref(N(SummonFormation)), FALSE) + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Call(SetActorPos, LVar0, LVar1, LVar2, LVar3) + Call(SetGoalToIndex, LVar0, LVarA) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Thread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Walk) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.4)) + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Call(SetGoalPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Call(JumpToGoal, ACTOR_SELF, 14, FALSE, TRUE, FALSE) + EndThread + Wait(1) + Call(SetAnimation, LVar0, 1, ANIM_Fuzzy_Jungle_Walk) + Call(SetActorJumpGravity, LVar0, Float(1.4)) + Call(JumpToGoal, LVar0, 14, FALSE, TRUE, FALSE) + Call(GetActorPos, LVar0, LVar1, LVar2, LVar3) + Call(ForceHomePos, LVar0, LVar1, LVar2, LVar3) + Call(HPBarToHome, LVar0) + Call(SetAnimation, LVar0, 1, ANIM_Fuzzy_Jungle_Idle) + Call(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar1) + Switch(LVar1) + CaseEq(0) + Call(SetActorVar, LVar0, AVAR_Generation, 1) + CaseEq(1) + Call(SetActorVar, LVar0, AVAR_Generation, 2) + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/SpawnEnemyDrainFX.inc.c" EvtScript N(EVS_Attack_Leech) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_GOTO(100) - EVT_END_IF - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Run) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_EXEC_WAIT(EVS_Enemy_HopToPos) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Idle) - EVT_LABEL(100) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Anim04) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 9, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 8, 0) - EVT_WAIT(5) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_SET(LVar1, 0) - EVT_SUB(LVar2, 5) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Jump) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 11, FALSE, TRUE, FALSE) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Anim09) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 15) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(4) - EVT_WAIT(5) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_EXEC_WAIT(EVS_Enemy_HopToPos) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_EQ(HIT_RESULT_HIT_STATIC) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_STATIC) - EVT_SET(LFlag0, FALSE) - EVT_ELSE - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -3, -12, -15) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Jump) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAG_STONE) - EVT_WAIT(10) - EVT_LOOP(2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Bite) - EVT_WAIT(21) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Still) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 330) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, -3, -2, 0) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.9), EVT_FLOAT(1.2), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.8), EVT_FLOAT(1.3), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.4), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.5), EVT_FLOAT(1.0)) - EVT_WAIT(2) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.6), EVT_FLOAT(1.6), EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, DMG_LEECH, BS_FLAGS1_NICE_HIT) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 8, 0) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Jump) - EVT_WAIT(30) - EVT_END_LOOP - EVT_ELSE - EVT_CALL(ShowMessageBox, BTL_MSG_ACTION_TIP_MASH_BUTTON, 32767) - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_STOP_LEECH) - EVT_CALL(action_command_stop_leech_init) - EVT_CALL(SetupMashMeter, 1, 23, 0, 0, 0, 0) - EVT_WAIT(10) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_CALL(action_command_stop_leech_start, 0, 32767, 3) - EVT_SET(LVarD, 0) - EVT_LOOP(5) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Leeching) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Bite) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(21) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Still) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 330) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, -3, -2, 0) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(1) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.9), EVT_FLOAT(1.2), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(1) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.8), EVT_FLOAT(1.3), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(1) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.4), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(1) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.5), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(2) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.6), EVT_FLOAT(1.6), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(10) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_SET(LFlag0, FALSE) - EVT_LOOP(2) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_UNBLOCKABLE | DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, DMG_LEECH, BS_FLAGS1_NICE_HIT) - EVT_CALL(GetLastDamage, ACTOR_PLAYER, LVar3) - EVT_IF_NE(LVar3, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_CALL(N(SpawnDrainHealthStartFX), LVar0, LVar1, LVar2, LVar3) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_STAR_BOUNCE_A) - EVT_CALL(N(SpawnDrainHealthContinueFX), LVar0, LVar1, LVar2, LVar3) - EVT_END_THREAD - EVT_ADD(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_RECOVER, 0, LVar0, LVar1, LVar2, LVar3, 0) - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_ADD(LVar0, LVar3) - EVT_CALL(SetEnemyHP, ACTOR_SELF, LVar0) - EVT_ELSE - EVT_ADD(LVarD, 1) - EVT_IF_GT(LVarD, 1) - EVT_CALL(func_80269470) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 8, 0) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Jump) - EVT_CALL(GetPlayerHP, LVar1) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(func_80269470) - EVT_BREAK_LOOP - EVT_END_IF - EVT_SET(LFlag0, FALSE) - EVT_LOOP(35) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(func_80269470) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 8, 0) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Jump) - EVT_END_IF - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Idle) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_THREAD - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.6), EVT_FLOAT(0.6), EVT_FLOAT(1.0)) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 10, 0) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 330) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.5), EVT_FLOAT(1.0)) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 300) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 270) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(0.7), EVT_FLOAT(1.0)) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 240) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 210) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.4), EVT_FLOAT(1.0)) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 180) - EVT_WAIT(2) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(0.7), EVT_FLOAT(1.0)) - EVT_WAIT(2) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.2), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.4), EVT_FLOAT(0.2), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.2), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 150) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 120) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 90) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 60) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 30) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_WAIT(5) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_EXEC_WAIT(EVS_Enemy_HopToPos) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Idle) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Set(LVar1, 0) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Goto(100) + EndIf + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Run) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Set(LVar1, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + ExecWait(EVS_Enemy_HopToPos) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Idle) + Label(100) + Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Anim04) + Call(SetActorDispOffset, ACTOR_SELF, 0, 9, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 8, 0) + Wait(5) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Set(LVar1, 0) + Sub(LVar2, 5) + Call(SetActorJumpGravity, ACTOR_SELF, Float(3.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Jump) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 11, FALSE, TRUE, FALSE) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Anim09) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Call(SetActorJumpGravity, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 15) + Call(SetActorJumpGravity, ACTOR_SELF, Float(3.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Wait(4) + Wait(5) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + ExecWait(EVS_Enemy_HopToPos) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + CaseEq(HIT_RESULT_HIT_STATIC) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_STATIC) + Set(LFlag0, FALSE) + Else + Set(LFlag0, TRUE) + EndIf + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -3, -12, -15) + Call(SetActorJumpGravity, ACTOR_SELF, Float(3.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Jump) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + IfEq(LFlag0, TRUE) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 0, BS_FLAGS1_TRIGGER_EVENTS) + Return + EndIf + Call(GetStatusFlags, ACTOR_PLAYER, LVar1) + IfFlag(LVar1, STATUS_FLAG_STONE) + Wait(10) + Loop(2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Bite) + Wait(21) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Still) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 330) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) + Call(SetActorDispOffset, ACTOR_SELF, -3, -2, 0) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.9), Float(1.2), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.8), Float(1.3), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.4), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.5), Float(1.0)) + Wait(2) + Call(SetActorScale, ACTOR_SELF, Float(0.6), Float(1.6), Float(1.0)) + Wait(10) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, DMG_LEECH, BS_FLAGS1_NICE_HIT) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 8, 0) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Jump) + Wait(30) + EndLoop + Else + Call(ShowMessageBox, BTL_MSG_ACTION_TIP_MASH_BUTTON, 32767) + Call(ShowActionHud, TRUE) + Call(LoadActionCommand, ACTION_COMMAND_STOP_LEECH) + Call(action_command_stop_leech_init) + Call(SetupMashMeter, 1, 23, 0, 0, 0, 0) + Wait(10) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + Call(action_command_stop_leech_start, 0, 32767, 3) + Set(LVarD, 0) + Loop(5) + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Leeching) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Bite) + Set(LFlag0, FALSE) + Loop(21) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Still) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 330) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) + Call(SetActorDispOffset, ACTOR_SELF, -3, -2, 0) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Set(LFlag0, FALSE) + Loop(1) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(0.9), Float(1.2), Float(1.0)) + Set(LFlag0, FALSE) + Loop(1) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(0.8), Float(1.3), Float(1.0)) + Set(LFlag0, FALSE) + Loop(1) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.4), Float(1.0)) + Set(LFlag0, FALSE) + Loop(1) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.5), Float(1.0)) + Set(LFlag0, FALSE) + Loop(2) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(0.6), Float(1.6), Float(1.0)) + Set(LFlag0, FALSE) + Loop(10) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Set(LFlag0, FALSE) + Loop(2) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Call(EnemyDamageTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_UNBLOCKABLE | DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, DMG_LEECH, BS_FLAGS1_NICE_HIT) + Call(GetLastDamage, ACTOR_PLAYER, LVar3) + IfNe(LVar3, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 10) + Call(N(SpawnDrainHealthStartFX), LVar0, LVar1, LVar2, LVar3) + Thread + Wait(15) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_STAR_BOUNCE_A) + Call(N(SpawnDrainHealthContinueFX), LVar0, LVar1, LVar2, LVar3) + EndThread + Add(LVar0, 20) + Add(LVar1, 20) + PlayEffect(EFFECT_RECOVER, 0, LVar0, LVar1, LVar2, LVar3, 0) + Call(GetActorHP, ACTOR_SELF, LVar0) + Add(LVar0, LVar3) + Call(SetEnemyHP, ACTOR_SELF, LVar0) + Else + Add(LVarD, 1) + IfGt(LVarD, 1) + Call(func_80269470) + BreakLoop + EndIf + EndIf + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 8, 0) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Jump) + Call(GetPlayerHP, LVar1) + IfEq(LVar1, 0) + Call(func_80269470) + BreakLoop + EndIf + Set(LFlag0, FALSE) + Loop(35) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + BreakLoop + EndIf + EndLoop + Call(func_80269470) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 8, 0) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Jump) + EndIf + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Idle) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Thread + Call(SetActorScale, ACTOR_SELF, Float(1.6), Float(0.6), Float(1.0)) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 10, 0) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 330) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.5), Float(1.0)) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 300) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 270) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(0.7), Float(1.0)) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 240) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 210) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.4), Float(1.0)) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 180) + Wait(2) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(0.7), Float(1.0)) + Wait(2) + Call(SetActorScale, ACTOR_SELF, Float(1.2), Float(0.5), Float(1.0)) + EndThread + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetActorScale, ACTOR_SELF, Float(1.4), Float(0.2), Float(1.0)) + Wait(1) + Thread + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.2), Float(0.5), Float(1.0)) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 150) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 120) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 90) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 60) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 30) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + EndThread + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Wait(5) + Call(YieldTurn) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + ExecWait(EVS_Enemy_HopToPos) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Fuzzy_Jungle_Idle) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_GetAvailableColumn) = { - EVT_SET(LFlag1, FALSE) - EVT_SET(LFlag2, FALSE) - EVT_SET(LFlag3, FALSE) - EVT_SET(LFlag4, FALSE) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar5) - EVT_CALL(GetIndexFromHome, LVar0, LVar5) - EVT_MOD(LVar5, 4) - EVT_SWITCH(LVar5) - EVT_CASE_EQ(0) - EVT_SET(LFlag1, TRUE) - EVT_CASE_EQ(1) - EVT_SET(LFlag2, TRUE) - EVT_CASE_EQ(2) - EVT_SET(LFlag3, TRUE) - EVT_CASE_EQ(3) - EVT_SET(LFlag4, TRUE) - EVT_END_SWITCH - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_SET(LVarA, -1) - EVT_SET(LVarB, -1) - EVT_CALL(GetIndexFromHome, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_IF_EQ(LFlag2, FALSE) - EVT_SET(LVarA, 1) - EVT_END_IF - EVT_CASE_EQ(1) - EVT_IF_EQ(LFlag1, FALSE) - EVT_SET(LVarA, 0) - EVT_END_IF - EVT_IF_EQ(LFlag3, FALSE) - EVT_IF_EQ(LVarA, -1) - EVT_SET(LVarA, 2) - EVT_ELSE - EVT_SET(LVarB, 2) - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(2) - EVT_IF_EQ(LFlag2, FALSE) - EVT_SET(LVarA, 1) - EVT_END_IF - EVT_IF_EQ(LFlag4, FALSE) - EVT_IF_EQ(LVarA, -1) - EVT_SET(LVarA, 3) - EVT_ELSE - EVT_SET(LVarB, 3) - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(3) - EVT_IF_EQ(LFlag3, FALSE) - EVT_SET(LVarA, 2) - EVT_END_IF - EVT_END_SWITCH - EVT_IF_NE(LVarB, -1) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 500) - EVT_SET(LVarA, LVarB) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Set(LFlag1, FALSE) + Set(LFlag2, FALSE) + Set(LFlag3, FALSE) + Set(LFlag4, FALSE) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar5) + Call(GetIndexFromHome, LVar0, LVar5) + Mod(LVar5, 4) + Switch(LVar5) + CaseEq(0) + Set(LFlag1, TRUE) + CaseEq(1) + Set(LFlag2, TRUE) + CaseEq(2) + Set(LFlag3, TRUE) + CaseEq(3) + Set(LFlag4, TRUE) + EndSwitch + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Set(LVarA, -1) + Set(LVarB, -1) + Call(GetIndexFromHome, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(0) + IfEq(LFlag2, FALSE) + Set(LVarA, 1) + EndIf + CaseEq(1) + IfEq(LFlag1, FALSE) + Set(LVarA, 0) + EndIf + IfEq(LFlag3, FALSE) + IfEq(LVarA, -1) + Set(LVarA, 2) + Else + Set(LVarB, 2) + EndIf + EndIf + CaseEq(2) + IfEq(LFlag2, FALSE) + Set(LVarA, 1) + EndIf + IfEq(LFlag4, FALSE) + IfEq(LVarA, -1) + Set(LVarA, 3) + Else + Set(LVarB, 3) + EndIf + EndIf + CaseEq(3) + IfEq(LFlag3, FALSE) + Set(LVarA, 2) + EndIf + EndSwitch + IfNe(LVarB, -1) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 500) + Set(LVarA, LVarB) + EndIf + EndIf + Return + End }; EvtScript N(EVS_CountActiveSummoners) = { - EVT_SET(LVar9, 0) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetOriginalActorType, LVar0, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_OR_EQ(ACTOR_TYPE_FOREST_FUZZY) - EVT_CASE_OR_EQ(ACTOR_TYPE_JUNGLE_FUZZY) - EVT_CALL(GetStatusFlags, LVar0, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(GetActorVar, LVar0, AVAR_Generation, LVar3) - EVT_IF_NE(LVar3, 2) - EVT_ADD(LVar9, 1) - EVT_END_IF - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(ACTOR_TYPE_SPEAR_GUY) - EVT_CALL(GetStatusFlags, LVar0, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(GetActorVar, LVar0, AVAR_SpearGuy_Generation, LVar3) - EVT_IF_LT(LVar3, 2) - EVT_ADD(LVar9, 1) - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVar9, 0) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetOriginalActorType, LVar0, LVar2) + Switch(LVar2) + CaseOrEq(ACTOR_TYPE_FOREST_FUZZY) + CaseOrEq(ACTOR_TYPE_JUNGLE_FUZZY) + Call(GetStatusFlags, LVar0, LVar3) + IfNotFlag(LVar3, STATUS_FLAGS_IMMOBILIZED) + Call(GetActorVar, LVar0, AVAR_Generation, LVar3) + IfNe(LVar3, 2) + Add(LVar9, 1) + EndIf + EndIf + EndCaseGroup + CaseEq(ACTOR_TYPE_SPEAR_GUY) + Call(GetStatusFlags, LVar0, LVar3) + IfNotFlag(LVar3, STATUS_FLAGS_IMMOBILIZED) + Call(GetActorVar, LVar0, AVAR_SpearGuy_Generation, LVar3) + IfLt(LVar3, 2) + Add(LVar9, 1) + EndIf + EndIf + EndSwitch + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_Attack_Leech)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar0) - EVT_IF_EQ(LVar0, 2) - EVT_EXEC_WAIT(N(EVS_Attack_Leech)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_GetAvailableColumn)) - EVT_IF_EQ(LVarA, -1) - EVT_EXEC_WAIT(N(EVS_Attack_Leech)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_CountActiveSummoners)) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(1) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 400) - EVT_EXEC_WAIT(N(EVS_Move_Divide)) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(2) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 150) - EVT_EXEC_WAIT(N(EVS_Move_Divide)) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(3) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 70) - EVT_EXEC_WAIT(N(EVS_Move_Divide)) - EVT_RETURN - EVT_END_IF - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_Attack_Leech)) - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + ExecWait(N(EVS_Attack_Leech)) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar0) + IfEq(LVar0, 2) + ExecWait(N(EVS_Attack_Leech)) + Return + EndIf + ExecWait(N(EVS_GetAvailableColumn)) + IfEq(LVarA, -1) + ExecWait(N(EVS_Attack_Leech)) + Return + EndIf + ExecWait(N(EVS_CountActiveSummoners)) + Switch(LVar9) + CaseEq(1) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 400) + ExecWait(N(EVS_Move_Divide)) + Return + EndIf + CaseEq(2) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 150) + ExecWait(N(EVS_Move_Divide)) + Return + EndIf + CaseEq(3) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 70) + ExecWait(N(EVS_Move_Divide)) + Return + EndIf + EndSwitch + ExecWait(N(EVS_Attack_Leech)) + Return + End }; Vec3i N(SummonPos) = { NPC_DISPOSE_LOCATION }; diff --git a/src/battle/common/actor/koopa_troopa.inc.c b/src/battle/common/actor/koopa_troopa.inc.c index c61ecbd2d97..dada91fd35c 100644 --- a/src/battle/common/actor/koopa_troopa.inc.c +++ b/src/battle/common/actor/koopa_troopa.inc.c @@ -142,479 +142,479 @@ s32 N(FlippedAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsFlipped, FALSE) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_IsFlipped, FALSE) + Return + End }; #include "common/battle/SetAbsoluteStatusOffsets.inc.c" EvtScript N(EVS_UpdateTargetOffsets) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_DIZZY) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_ELSE - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -4, 32) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -4) - EVT_CALL(N(SetAbsoluteStatusOffsets), -15, 32, 5, 32) - EVT_END_IF - EVT_CASE_EQ(1) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(0) + IfFlag(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_DIZZY) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + Else + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -4, 32) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -4) + Call(N(SetAbsoluteStatusOffsets), -15, 32, 5, 32) + EndIf + CaseEq(1) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + EndSwitch + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(RandInt, 80, LVarA) - EVT_ADD(LVarA, 80) - EVT_LOOP(LVarA) - EVT_LABEL(1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_EXEC_WAIT(N(EVS_UpdateTargetOffsets)) - EVT_IF_EQ(LVar0, 1) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_CASE_EQ(1) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(FlippedAnims))) - EVT_END_SWITCH - EVT_LOOP(20) - EVT_LABEL(2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_EXEC_WAIT(N(EVS_UpdateTargetOffsets)) - EVT_IF_EQ(LVar0, 1) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_CASE_EQ(1) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(FlippedAnims))) - EVT_END_SWITCH - EVT_LOOP(80) - EVT_LABEL(3) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_EXEC_WAIT(N(EVS_UpdateTargetOffsets)) - EVT_IF_EQ(LVar0, 1) - EVT_WAIT(1) - EVT_GOTO(3) - EVT_END_IF - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(3) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(RandInt, 80, LVarA) + Add(LVarA, 80) + Loop(LVarA) + Label(1) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + ExecWait(N(EVS_UpdateTargetOffsets)) + IfEq(LVar0, 1) + Wait(1) + Goto(1) + EndIf + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(1) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + Switch(LVar0) + CaseEq(0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + CaseEq(1) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(FlippedAnims))) + EndSwitch + Loop(20) + Label(2) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + ExecWait(N(EVS_UpdateTargetOffsets)) + IfEq(LVar0, 1) + Wait(1) + Goto(2) + EndIf + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(2) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + Switch(LVar0) + CaseEq(0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + CaseEq(1) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(FlippedAnims))) + EndSwitch + Loop(80) + Label(3) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + ExecWait(N(EVS_UpdateTargetOffsets)) + IfEq(LVar0, 1) + Wait(1) + Goto(3) + EndIf + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(3) + EndIf + Wait(1) + EndLoop + Goto(0) + Return + End }; s32 N(FlipPosOffsets)[] = { 9, 16, 22, 26, 30, 32, 33, 32, 30, 26, 22, 16, 9, 0, 4, 6, 7, 6, 4, 0, 2, 0 }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_KoopaTroopa_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_KoopaTroopa_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_FLIP_TRIGGER) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsFlipped, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FlippedTurns, 2) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(FlippedDefense))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(FlippedAnims))) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Hurt) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_CHILD_THREAD - EVT_WAIT(4) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 30) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -30) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -60) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -75) - EVT_WAIT(1) - EVT_END_CHILD_THREAD - EVT_USE_BUF(EVT_PTR(N(FlipPosOffsets))) - EVT_LOOP(ARRAY_COUNT(N(FlipPosOffsets))) - EVT_BUF_READ1(LVar0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_ToppleStruggle) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Run) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_ShellEnter) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_ShellExit) - EVT_WAIT(10) - EVT_END_IF - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_ToppleStruggle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Run) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_ToppleStruggle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Run) - EVT_SET_CONST(LVar2, ANIM_KoopaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_ToppleStruggle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Panic) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_ToppleStruggle) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Panic) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_ToppleStruggle) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_ToppleStruggle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_BurnHurt) + SetConst(LVar2, ANIM_KoopaTroopa_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_BurnHurt) + SetConst(LVar2, ANIM_KoopaTroopa_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_FLIP_TRIGGER) + Call(SetActorVar, ACTOR_SELF, AVAR_IsFlipped, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_FlippedTurns, 2) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(FlippedDefense))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(FlippedAnims))) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Hurt) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + ChildThread + Wait(4) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 30) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -30) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -60) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -75) + Wait(1) + EndChildThread + UseBuf(Ref(N(FlipPosOffsets))) + Loop(ARRAY_COUNT(N(FlipPosOffsets))) + BufRead1(LVar0) + Call(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_ToppleStruggle) + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Hurt) + ExecWait(EVS_Enemy_Knockback) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Run) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + IfEq(LVar0, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_ShellEnter) + ExecWait(EVS_Enemy_NoDamageHit) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_ShellExit) + Wait(10) + EndIf + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_ToppleStruggle) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + IfEq(LVar0, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Run) + ExecWait(EVS_Enemy_ReturnHome) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + IfEq(LVar0, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Idle) + ExecWait(EVS_Enemy_Recover) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_ToppleStruggle) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + CaseEq(EVENT_SCARE_AWAY) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + IfEq(LVar0, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Run) + SetConst(LVar2, ANIM_KoopaTroopa_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_ToppleStruggle) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + CaseEq(EVENT_BEGIN_AIR_LIFT) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + IfEq(LVar0, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Panic) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_ToppleStruggle) + EndIf + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + IfEq(LVar0, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Panic) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_ToppleStruggle) + EndIf + ExecWait(EVS_Enemy_BlowAway) + Return + CaseEq(EVENT_AIR_LIFT_FAILED) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + IfEq(LVar0, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_ToppleStruggle) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_ShellSpin) - EVT_ELSE - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_FlippedTurns, LVar0) - EVT_SUB(LVar0, 1) - EVT_IF_GT(LVar0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FlippedTurns, LVar0) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(3.0)) - EVT_WAIT(30) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_ELSE - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(3.0)) - EVT_WAIT(20) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_JUMP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_ToppleStruggle) - EVT_SET(LVar0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_CHILD_THREAD - EVT_LOOP(5) - EVT_ADD(LVar0, 15) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Idle) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsFlipped, FALSE) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(NormalDefense))) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -4, 32) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -4) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, FALSE) - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_ShellEnter) - EVT_WAIT(10) - EVT_CHILD_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 4) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(3) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_END_CHILD_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_SPIN) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_ShellSpin) - EVT_WAIT(10) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_TOSS) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -40, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(16.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_05) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(SetBattleCamOffsetZ, 20) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_ShellExit) - EVT_WAIT(8) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_WAIT(4) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_BeginPanic1) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_BeginPanic2) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Panic) - EVT_WAIT(6) - EVT_SUB(LVar1, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Panic) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Idle) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetPartYaw, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(16.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_SHELL_TOSS, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_ShellExit) - EVT_WAIT(8) - EVT_CALL(YieldTurn) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Run) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Idle) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_ShellSpin) + Else + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + IfEq(LVar0, 1) + Call(GetActorVar, ACTOR_SELF, AVAR_FlippedTurns, LVar0) + Sub(LVar0, 1) + IfGt(LVar0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_FlippedTurns, LVar0) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(3.0)) + Wait(30) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Else + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(3.0)) + Wait(20) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_JUMP) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_ToppleStruggle) + Set(LVar0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + ChildThread + Loop(5) + Add(LVar0, 15) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndChildThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(3.0)) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Idle) + Call(SetActorVar, ACTOR_SELF, AVAR_IsFlipped, FALSE) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(NormalDefense))) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -4, 32) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -4) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, FALSE) + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndIf + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_ShellEnter) + Wait(10) + ChildThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 4) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(3) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(2) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + EndChildThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_SPIN) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_ShellSpin) + Wait(10) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_TOSS) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -40, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(16.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_05) + Call(SetBattleCamZoom, 300) + Call(SetBattleCamOffsetZ, 20) + Call(MoveBattleCamOver, 10) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_ShellExit) + Wait(8) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetActorYaw, ACTOR_SELF, 180) + Wait(4) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_BeginPanic1) + Wait(1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_BeginPanic2) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Panic) + Wait(6) + Sub(LVar1, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Panic) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Idle) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetPartYaw, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(16.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(ResetAllActorSounds, ACTOR_SELF) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_SHELL_TOSS, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_ShellExit) + Wait(8) + Call(YieldTurn) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_KoopaTroopa_Run) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_KoopaTroopa_Idle) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/koopatrol.inc.c b/src/battle/common/actor/koopatrol.inc.c index 8162edf7193..c0a7ed94b34 100644 --- a/src/battle/common/actor/koopatrol.inc.c +++ b/src/battle/common/actor/koopatrol.inc.c @@ -189,862 +189,862 @@ ActorBlueprint NAMESPACE = { #include "common/StartRumbleWithParams.inc.c" EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Generation, 0) - EVT_CALL(GetIndexFromHome, ACTOR_SELF, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_AncestorColumn, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetBattleVar, BTL_VAR_KoopatrolSummonCount_0, 0) - EVT_CASE_EQ(1) - EVT_CALL(SetBattleVar, BTL_VAR_KoopatrolSummonCount_1, 0) - EVT_CASE_EQ(2) - EVT_CALL(SetBattleVar, BTL_VAR_KoopatrolSummonCount_2, 0) - EVT_CASE_EQ(3) - EVT_CALL(SetBattleVar, BTL_VAR_KoopatrolSummonCount_3, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) + Call(SetActorVar, ACTOR_SELF, AVAR_Generation, 0) + Call(GetIndexFromHome, ACTOR_SELF, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_AncestorColumn, LVar0) + Switch(LVar0) + CaseEq(0) + Call(SetBattleVar, BTL_VAR_KoopatrolSummonCount_0, 0) + CaseEq(1) + Call(SetBattleVar, BTL_VAR_KoopatrolSummonCount_1, 0) + CaseEq(2) + Call(SetBattleVar, BTL_VAR_KoopatrolSummonCount_2, 0) + CaseEq(3) + Call(SetBattleVar, BTL_VAR_KoopatrolSummonCount_3, 0) + EndSwitch + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) - EVT_CASE_EQ(PHASE_ENEMY_END) - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_None) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) + CaseEq(PHASE_ENEMY_BEGIN) + CaseEq(PHASE_ENEMY_END) + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_None) + EndSwitch + Return + End }; EvtScript N(EVS_UpdateOffsets) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_Normal) - EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_DIZZY) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_ELSE - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -4, 32) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -4) - EVT_CALL(N(SetAbsoluteStatusOffsets), -15, 32, 5, 32) - EVT_END_IF - EVT_CASE_EQ(AVAL_State_Toppled) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_CASE_EQ(AVAL_State_Charged) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -4, 20) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -6) - EVT_CALL(N(SetAbsoluteStatusOffsets), -15, 22, 5, 22) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(AVAL_State_Normal) + IfFlag(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_DIZZY) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + Else + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -4, 32) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -4) + Call(N(SetAbsoluteStatusOffsets), -15, 32, 5, 32) + EndIf + CaseEq(AVAL_State_Toppled) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + CaseEq(AVAL_State_Charged) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -4, 20) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -6) + Call(N(SetAbsoluteStatusOffsets), -15, 22, 5, 22) + EndSwitch + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(RandInt, 80, LVarA) - EVT_ADD(LVarA, 80) - EVT_LOOP(LVarA) - EVT_LABEL(1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_EXEC_WAIT(N(EVS_UpdateOffsets)) - EVT_IF_EQ(LVar0, AVAL_State_Toppled) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED | STATUS_FLAG_GLOWING) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_Normal) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_CASE_EQ(AVAL_State_Toppled) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledAnims))) - EVT_END_SWITCH - EVT_LOOP(20) - EVT_LABEL(2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_EXEC_WAIT(N(EVS_UpdateOffsets)) - EVT_IF_EQ(LVar0, AVAL_State_Toppled) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED | STATUS_FLAG_GLOWING) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_Normal) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_CASE_EQ(AVAL_State_Toppled) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledAnims))) - EVT_END_SWITCH - EVT_LOOP(80) - EVT_LABEL(3) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_EXEC_WAIT(N(EVS_UpdateOffsets)) - EVT_IF_EQ(LVar0, AVAL_State_Toppled) - EVT_WAIT(1) - EVT_GOTO(3) - EVT_END_IF - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED | STATUS_FLAG_GLOWING) - EVT_WAIT(1) - EVT_GOTO(3) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(RandInt, 80, LVarA) + Add(LVarA, 80) + Loop(LVarA) + Label(1) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + ExecWait(N(EVS_UpdateOffsets)) + IfEq(LVar0, AVAL_State_Toppled) + Wait(1) + Goto(1) + EndIf + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED | STATUS_FLAG_GLOWING) + Wait(1) + Goto(1) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_Normal) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + CaseEq(AVAL_State_Toppled) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledAnims))) + EndSwitch + Loop(20) + Label(2) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + ExecWait(N(EVS_UpdateOffsets)) + IfEq(LVar0, AVAL_State_Toppled) + Wait(1) + Goto(2) + EndIf + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED | STATUS_FLAG_GLOWING) + Wait(1) + Goto(2) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_Normal) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + CaseEq(AVAL_State_Toppled) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledAnims))) + EndSwitch + Loop(80) + Label(3) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + ExecWait(N(EVS_UpdateOffsets)) + IfEq(LVar0, AVAL_State_Toppled) + Wait(1) + Goto(3) + EndIf + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED | STATUS_FLAG_GLOWING) + Wait(1) + Goto(3) + EndIf + Wait(1) + EndLoop + Goto(0) + Return + End }; s32 N(FlipPosOffsets)[] = { 9, 16, 22, 26, 30, 32, 33, 32, 30, 26, 22, 16, 9, 0, 4, 6, 7, 6, 4, 0, 2, 0 }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_State_Normal) - EVT_CASE_OR_EQ(AVAL_State_Toppled) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(AVAL_State_Charged) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_SWITCH - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim0C) - EVT_SET_CONST(LVar2, ANIM_Koopatrol_Anim0D) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim0C) - EVT_SET_CONST(LVar2, ANIM_Koopatrol_Anim0D) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim0D) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_State_Normal) - EVT_CASE_OR_EQ(AVAL_State_Toppled) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(AVAL_State_Charged) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_END_SWITCH - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_State_Normal) - EVT_CASE_OR_EQ(AVAL_State_Toppled) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_END_CASE_GROUP - EVT_CASE_EQ(AVAL_State_Charged) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim08) - EVT_WAIT(5) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_END_SWITCH - EVT_CASE_EQ(EVENT_FLIP_TRIGGER) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Toppled) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FlippedTurns, 1) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledDefense))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledAnims))) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, FALSE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim0B) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_THREAD - EVT_WAIT(4) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 30) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -30) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -60) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -75) - EVT_WAIT(1) - EVT_END_THREAD - EVT_USE_BUF(N(FlipPosOffsets)) - EVT_LOOP(ARRAY_COUNT(N(FlipPosOffsets))) - EVT_BUF_READ1(LVar0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim0F) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_STAR_BEAM) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Charged) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(StatusTable))) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefenseTable))) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_NOT_FLAG(LVarA, STATUS_FLAG_DEFENSE_BOOST | STATUS_FLAG_ATTACK_BOOST) - EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE) - EVT_END_IF - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_Normal) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim08) - EVT_WAIT(10) - EVT_END_IF - EVT_CASE_EQ(AVAL_State_Toppled) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim0F) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(AVAL_State_Charged) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_SWITCH - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIKE_TAUNT) - EVT_WAIT(10) - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 16) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_IF_FLAG(LVar3, STATUS_FLAG_DIZZY) - EVT_ADD(LVar0, -14) - EVT_ADD(LVar1, 20) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_IF_FLAG(LVar3, STATUS_FLAG_SLEEP) - EVT_ADD(LVar0, -14) - EVT_ADD(LVar1, 20) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVarA) - EVT_IF_EQ(LVarA, AVAL_State_Charged) - EVT_ADD(LVar1, 23) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_ADD(LVar1, 42) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) - EVT_WAIT(20) - EVT_CASE_EQ(EVENT_DEATH) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_State_Normal) - EVT_CASE_OR_EQ(AVAL_State_Toppled) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_EQ(AVAL_State_Charged) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim08) - EVT_WAIT(5) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END_SWITCH - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_Normal) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(AVAL_State_Toppled) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim0F) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(AVAL_State_Charged) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_END_SWITCH - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(AVAL_State_Normal) - EVT_CASE_OR_EQ(AVAL_State_Charged) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim04) - EVT_SET_CONST(LVar2, ANIM_Koopatrol_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_EQ(AVAL_State_Toppled) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim0F) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_SWITCH - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_Normal) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim16) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(AVAL_State_Toppled) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim0F) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(AVAL_State_Charged) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim0F) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_END_SWITCH - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_Normal) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim16) - EVT_CASE_EQ(AVAL_State_Toppled) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim0F) - EVT_CASE_EQ(AVAL_State_Charged) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim0F) - EVT_END_SWITCH - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_Normal) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim01) - EVT_CASE_EQ(AVAL_State_Toppled) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim0F) - EVT_CASE_EQ(AVAL_State_Charged) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim0F) - EVT_END_SWITCH - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_State_Normal) + CaseOrEq(AVAL_State_Toppled) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim0B) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(AVAL_State_Charged) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim06) + ExecWait(EVS_Enemy_Hit) + EndSwitch + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim0C) + SetConst(LVar2, ANIM_Koopatrol_Anim0D) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim0C) + SetConst(LVar2, ANIM_Koopatrol_Anim0D) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim0D) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_State_Normal) + CaseOrEq(AVAL_State_Toppled) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim0B) + ExecWait(EVS_Enemy_SpinSmashHit) + EndCaseGroup + CaseEq(AVAL_State_Charged) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim06) + ExecWait(EVS_Enemy_SpinSmashHit) + EndSwitch + CaseEq(EVENT_SPIN_SMASH_DEATH) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_State_Normal) + CaseOrEq(AVAL_State_Toppled) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim0B) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim0B) + ExecWait(EVS_Enemy_Death) + EndCaseGroup + CaseEq(AVAL_State_Charged) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim06) + ExecWait(EVS_Enemy_SpinSmashHit) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim08) + Wait(5) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim0B) + ExecWait(EVS_Enemy_Death) + EndSwitch + CaseEq(EVENT_FLIP_TRIGGER) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Toppled) + Call(SetActorVar, ACTOR_SELF, AVAR_FlippedTurns, 1) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledDefense))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledAnims))) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -5, 15) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, FALSE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim0B) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Thread + Wait(4) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 30) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -30) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -60) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -75) + Wait(1) + EndThread + UseBuf(N(FlipPosOffsets)) + Loop(ARRAY_COUNT(N(FlipPosOffsets))) + BufRead1(LVar0) + Call(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim0F) + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim0B) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim0B) + ExecWait(EVS_Enemy_Knockback) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim04) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim0B) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim0B) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_STAR_BEAM) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + IfEq(LVar0, AVAL_State_Charged) + Call(SetStatusTable, ACTOR_SELF, Ref(N(StatusTable))) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(DefenseTable))) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfNotFlag(LVarA, STATUS_FLAG_DEFENSE_BOOST | STATUS_FLAG_ATTACK_BOOST) + Call(EnableActorGlow, ACTOR_SELF, FALSE) + EndIf + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim08) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_Normal) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim07) + ExecWait(EVS_Enemy_NoDamageHit) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim08) + Wait(10) + EndIf + CaseEq(AVAL_State_Toppled) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim0F) + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(AVAL_State_Charged) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim06) + ExecWait(EVS_Enemy_NoDamageHit) + EndSwitch + EndCaseGroup + CaseEq(EVENT_SPIKE_TAUNT) + Wait(10) + Set(LFlag0, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar1, 16) + Set(LFlag0, TRUE) + EndIf + IfFlag(LVar3, STATUS_FLAG_DIZZY) + Add(LVar0, -14) + Add(LVar1, 20) + Set(LFlag0, TRUE) + EndIf + IfFlag(LVar3, STATUS_FLAG_SLEEP) + Add(LVar0, -14) + Add(LVar1, 20) + Set(LFlag0, TRUE) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVarA) + IfEq(LVarA, AVAL_State_Charged) + Add(LVar1, 23) + Set(LFlag0, TRUE) + EndIf + IfEq(LFlag0, FALSE) + Add(LVar1, 42) + EndIf + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) + Wait(20) + CaseEq(EVENT_DEATH) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_State_Normal) + CaseOrEq(AVAL_State_Toppled) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim0B) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim0B) + ExecWait(EVS_Enemy_Death) + Return + EndCaseGroup + CaseEq(AVAL_State_Charged) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim06) + ExecWait(EVS_Enemy_Hit) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim08) + Wait(5) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim0B) + ExecWait(EVS_Enemy_Death) + Return + EndSwitch + CaseEq(EVENT_RECOVER_STATUS) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_Normal) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(AVAL_State_Toppled) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim0F) + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(AVAL_State_Charged) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim06) + ExecWait(EVS_Enemy_Recover) + EndSwitch + CaseEq(EVENT_SCARE_AWAY) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseOrEq(AVAL_State_Normal) + CaseOrEq(AVAL_State_Charged) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim04) + SetConst(LVar2, ANIM_Koopatrol_Anim0B) + ExecWait(EVS_Enemy_ScareAway) + Return + EndCaseGroup + CaseEq(AVAL_State_Toppled) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim0F) + ExecWait(EVS_Enemy_NoDamageHit) + EndSwitch + CaseEq(EVENT_BEGIN_AIR_LIFT) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_Normal) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim16) + ExecWait(EVS_Enemy_AirLift) + CaseEq(AVAL_State_Toppled) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim0F) + ExecWait(EVS_Enemy_AirLift) + CaseEq(AVAL_State_Charged) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim0F) + ExecWait(EVS_Enemy_AirLift) + EndSwitch + CaseEq(EVENT_BLOW_AWAY) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_Normal) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim16) + CaseEq(AVAL_State_Toppled) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim0F) + CaseEq(AVAL_State_Charged) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim0F) + EndSwitch + ExecWait(EVS_Enemy_BlowAway) + Return + CaseEq(EVENT_AIR_LIFT_FAILED) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_Normal) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim01) + CaseEq(AVAL_State_Toppled) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim0F) + CaseEq(AVAL_State_Charged) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim0F) + EndSwitch + ExecWait(EVS_Enemy_NoDamageHit) + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_ShellToss) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim06) - EVT_ELSE - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Toppled) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_FlippedTurns, LVar0) - EVT_SUB(LVar0, 1) - EVT_IF_GT(LVar0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FlippedTurns, LVar0) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(3.0)) - EVT_WAIT(15) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_ELSE - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(3.0)) - EVT_WAIT(10) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_JUMP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim0F) - EVT_SET(LVar0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_THREAD - EVT_LOOP(5) - EVT_ADD(LVar0, 15) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim01) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefenseTable))) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -4, 32) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -4) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, TRUE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, FALSE) - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim07) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 4) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(3) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_SPIN) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim06) - EVT_WAIT(10) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_TOSS) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 4, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -40, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(16.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_05) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(SetBattleCamOffsetZ, 20) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_END_IF - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim08) - EVT_WAIT(8) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim16) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim16) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim16) - EVT_WAIT(6) - EVT_SUB(LVar1, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim16) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim01) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetPartYaw, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(16.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_SHELL_TOSS, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim08) - EVT_WAIT(8) - EVT_CALL(YieldTurn) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim01) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim06) + Else + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + IfEq(LVar0, AVAL_State_Toppled) + Call(GetActorVar, ACTOR_SELF, AVAR_FlippedTurns, LVar0) + Sub(LVar0, 1) + IfGt(LVar0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_FlippedTurns, LVar0) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(3.0)) + Wait(15) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Else + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(3.0)) + Wait(10) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_JUMP) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim0F) + Set(LVar0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Thread + Loop(5) + Add(LVar0, 15) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(3.0)) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim01) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(DefenseTable))) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -4, 32) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -4) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, TRUE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, FALSE) + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndIf + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim07) + Wait(10) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 4) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(3) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(2) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + EndThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_SPIN) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim06) + Wait(10) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_TOSS) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 4, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -40, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(16.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_05) + Call(SetBattleCamZoom, 300) + Call(SetBattleCamOffsetZ, 20) + Call(MoveBattleCamOver, 10) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + EndIf + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim08) + Wait(8) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetActorYaw, ACTOR_SELF, 180) + Wait(4) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim16) + Wait(1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim16) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim16) + Wait(6) + Sub(LVar1, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim16) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim01) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetPartYaw, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(16.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(ResetAllActorSounds, ACTOR_SELF) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_SHELL_TOSS, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim08) + Wait(8) + Call(YieldTurn) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim04) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim01) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_ChargedToss) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Normal) // charge for attack - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_POWER_UP) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 6, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 45, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim15) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_THREAD - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim07) - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) - EVT_CALL(N(StartRumbleWithParams), 128, 10) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(0.5)) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim06) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(ChargedStatusTable))) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ChargedDefense))) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Charged) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ChargedAnims))) - EVT_CALL(EnableActorGlow, ACTOR_SELF, TRUE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, TRUE) - EVT_WAIT(10) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_LOOP(20) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 1, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, -1, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_KOOPA_LAUNCH_SHELL) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 4, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_IF_GT(LVar0, LVar3) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_01) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(30) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -200, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(16.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_WAIT(15) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_NOT_FLAG(LVarA, STATUS_FLAG_DEFENSE_BOOST | STATUS_FLAG_ATTACK_BOOST) - EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE) - EVT_END_IF - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_CALL(YieldTurn) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetActorPos, ACTOR_SELF, 300, 0, 0) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(16.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim08) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(StatusTable))) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefenseTable))) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_WAIT(10) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_THREAD - EVT_LOOP(30) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(16.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarA, 0, SUPPRESS_EVENT_ALL, 0, DMG_CHARGED_TOSS, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(60) - EVT_ADD(LVar0, 18) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 50) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 30, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 40) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_WAIT(20) - EVT_CALL(YieldTurn) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_NOT_FLAG(LVarA, STATUS_FLAG_DEFENSE_BOOST | STATUS_FLAG_ATTACK_BOOST) - EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE) - EVT_END_IF - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetActorPos, ACTOR_SELF, 300, 0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Koopatrol_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim01) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(StatusTable))) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefenseTable))) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + IfEq(LVar0, AVAL_State_Normal) // charge for attack + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_POWER_UP) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 10) + PlayEffect(EFFECT_ENERGY_IN_OUT, 6, LVar0, LVar1, LVar2, Float(1.0), 45, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim15) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Thread + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim07) + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) + Call(N(StartRumbleWithParams), 128, 10) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.5)) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim06) + Call(SetStatusTable, ACTOR_SELF, Ref(N(ChargedStatusTable))) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(ChargedDefense))) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Charged) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ChargedAnims))) + Call(EnableActorGlow, ACTOR_SELF, TRUE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, TRUE) + Wait(10) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Return + EndIf + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Loop(20) + Call(SetActorDispOffset, ACTOR_SELF, 1, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, -1, 0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_KOOPA_LAUNCH_SHELL) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 4, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Thread + Loop(0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + IfGt(LVar0, LVar3) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(UseBattleCamPreset, BTL_CAM_PRESET_01) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + EndThread + Thread + Loop(30) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2, 0, 0, 0) + Wait(1) + EndLoop + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -200, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(16.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Wait(15) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfNotFlag(LVarA, STATUS_FLAG_DEFENSE_BOOST | STATUS_FLAG_ATTACK_BOOST) + Call(EnableActorGlow, ACTOR_SELF, FALSE) + EndIf + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + Call(YieldTurn) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetActorPos, ACTOR_SELF, 300, 0, 0) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorSpeed, ACTOR_SELF, Float(16.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim08) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetStatusTable, ACTOR_SELF, Ref(N(StatusTable))) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(DefenseTable))) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Wait(10) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Thread + Loop(30) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2, 0, 0, 0) + Wait(1) + EndLoop + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(16.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVarA, 0, SUPPRESS_EVENT_ALL, 0, DMG_CHARGED_TOSS, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) + Set(LVar0, 0) + Loop(60) + Add(LVar0, 18) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 50) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 30, FALSE, TRUE, FALSE) + Sub(LVar0, 40) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Wait(20) + Call(YieldTurn) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfNotFlag(LVarA, STATUS_FLAG_DEFENSE_BOOST | STATUS_FLAG_ATTACK_BOOST) + Call(EnableActorGlow, ACTOR_SELF, FALSE) + EndIf + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetActorPos, ACTOR_SELF, 300, 0, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Koopatrol_Anim04) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim01) + Call(SetStatusTable, ACTOR_SELF, Ref(N(StatusTable))) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(DefenseTable))) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_Normal) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_GetAvailableColumn) = { - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(1) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetOriginalActorType, LVar0, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_OR_EQ(ACTOR_TYPE_BILL_BLASTER) - EVT_CASE_OR_EQ(ACTOR_TYPE_BOMBSHELL_BLASTER) - EVT_SET(LVarA, -1) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(1) - EVT_END_IF - EVT_SET(LFlag1, FALSE) - EVT_SET(LFlag2, FALSE) - EVT_SET(LFlag3, FALSE) - EVT_SET(LFlag4, FALSE) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetIndexFromHome, LVar0, LVar1) - EVT_MOD(LVar1, 4) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_SET(LFlag1, TRUE) - EVT_CASE_EQ(1) - EVT_SET(LFlag2, TRUE) - EVT_CASE_EQ(2) - EVT_SET(LFlag3, TRUE) - EVT_CASE_EQ(3) - EVT_SET(LFlag4, TRUE) - EVT_END_SWITCH - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_EQ(LFlag1, FALSE) - EVT_SET(LVarA, 0) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LFlag2, FALSE) - EVT_SET(LVarA, 1) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LFlag3, FALSE) - EVT_SET(LVarA, 2) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LFlag4, FALSE) - EVT_SET(LVarA, 3) - EVT_RETURN - EVT_END_IF - EVT_SET(LVarA, -1) - EVT_RETURN - EVT_END + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(1) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetOriginalActorType, LVar0, LVar2) + Switch(LVar2) + CaseOrEq(ACTOR_TYPE_BILL_BLASTER) + CaseOrEq(ACTOR_TYPE_BOMBSHELL_BLASTER) + Set(LVarA, -1) + Return + EndCaseGroup + EndSwitch + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(1) + EndIf + Set(LFlag1, FALSE) + Set(LFlag2, FALSE) + Set(LFlag3, FALSE) + Set(LFlag4, FALSE) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetIndexFromHome, LVar0, LVar1) + Mod(LVar1, 4) + Switch(LVar1) + CaseEq(0) + Set(LFlag1, TRUE) + CaseEq(1) + Set(LFlag2, TRUE) + CaseEq(2) + Set(LFlag3, TRUE) + CaseEq(3) + Set(LFlag4, TRUE) + EndSwitch + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + IfEq(LFlag1, FALSE) + Set(LVarA, 0) + Return + EndIf + IfEq(LFlag2, FALSE) + Set(LVarA, 1) + Return + EndIf + IfEq(LFlag3, FALSE) + Set(LVarA, 2) + Return + EndIf + IfEq(LFlag4, FALSE) + Set(LVarA, 3) + Return + EndIf + Set(LVarA, -1) + Return + End }; Vec3i N(SummonPos) = { NPC_DISPOSE_LOCATION }; @@ -1054,299 +1054,299 @@ Formation N(BackupFormation) = { }; EvtScript N(EVS_Move_SummonBackup) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CALL_FOR_BACKUP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim02) - EVT_WAIT(20) - EVT_LOOP(2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim02) - EVT_WAIT(8) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CALL_FOR_BACKUP) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim09) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim02) - EVT_WAIT(8) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CALL_FOR_BACKUP) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim09) - EVT_WAIT(8) - EVT_END_LOOP - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 15) - EVT_THREAD - EVT_WAIT(8) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 30, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim16) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(SummonEnemy, EVT_PTR(N(BackupFormation)), FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, 200) - EVT_CALL(SetActorPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(SetGoalToIndex, LVar0, LVarA) - EVT_CALL(PlaySoundAtActor, LVar0, SOUND_SHELL_TOSS) - EVT_CALL(SetActorSounds, LVar0, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetAnimation, LVar0, 1, ANIM_Koopatrol_Anim06) - EVT_CALL(SetActorSpeed, LVar0, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, LVar0, 0, FALSE) - EVT_CALL(SetAnimation, LVar0, 1, ANIM_Koopatrol_Anim08) - EVT_WAIT(10) - EVT_CALL(SetAnimation, LVar0, 1, ANIM_Koopatrol_Anim01) - EVT_CALL(GetActorPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(ForceHomePos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(HPBarToHome, LVar0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar1) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(SetActorVar, LVar0, AVAR_Generation, 1) - EVT_CASE_EQ(1) - EVT_CALL(SetActorVar, LVar0, AVAR_Generation, 2) - EVT_END_SWITCH - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_AncestorColumn, LVar1) - EVT_CALL(SetActorVar, LVar0, AVAR_AncestorColumn, LVar1) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(GetBattleVar, BTL_VAR_KoopatrolSummonCount_0, LVar0) - EVT_ADD(LVar0, 1) - EVT_CALL(SetBattleVar, BTL_VAR_KoopatrolSummonCount_0, LVar0) - EVT_CASE_EQ(1) - EVT_CALL(GetBattleVar, BTL_VAR_KoopatrolSummonCount_1, LVar0) - EVT_ADD(LVar0, 1) - EVT_CALL(SetBattleVar, BTL_VAR_KoopatrolSummonCount_1, LVar0) - EVT_CASE_EQ(2) - EVT_CALL(GetBattleVar, BTL_VAR_KoopatrolSummonCount_2, LVar0) - EVT_ADD(LVar0, 1) - EVT_CALL(SetBattleVar, BTL_VAR_KoopatrolSummonCount_2, LVar0) - EVT_CASE_EQ(3) - EVT_CALL(GetBattleVar, BTL_VAR_KoopatrolSummonCount_3, LVar0) - EVT_ADD(LVar0, 1) - EVT_CALL(SetBattleVar, BTL_VAR_KoopatrolSummonCount_3, LVar0) - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CALL_FOR_BACKUP) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim02) + Wait(20) + Loop(2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim02) + Wait(8) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CALL_FOR_BACKUP) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim09) + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim02) + Wait(8) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CALL_FOR_BACKUP) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim09) + Wait(8) + EndLoop + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 15) + Thread + Wait(8) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 30, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Koopatrol_Anim16) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(SummonEnemy, Ref(N(BackupFormation)), FALSE) + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Add(LVar1, 200) + Call(SetActorPos, LVar0, LVar1, LVar2, LVar3) + Call(SetGoalToIndex, LVar0, LVarA) + Call(PlaySoundAtActor, LVar0, SOUND_SHELL_TOSS) + Call(SetActorSounds, LVar0, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(SetAnimation, LVar0, 1, ANIM_Koopatrol_Anim06) + Call(SetActorSpeed, LVar0, Float(6.0)) + Call(RunToGoal, LVar0, 0, FALSE) + Call(SetAnimation, LVar0, 1, ANIM_Koopatrol_Anim08) + Wait(10) + Call(SetAnimation, LVar0, 1, ANIM_Koopatrol_Anim01) + Call(GetActorPos, LVar0, LVar1, LVar2, LVar3) + Call(ForceHomePos, LVar0, LVar1, LVar2, LVar3) + Call(HPBarToHome, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar1) + Switch(LVar1) + CaseEq(0) + Call(SetActorVar, LVar0, AVAR_Generation, 1) + CaseEq(1) + Call(SetActorVar, LVar0, AVAR_Generation, 2) + EndSwitch + Call(GetActorVar, ACTOR_SELF, AVAR_AncestorColumn, LVar1) + Call(SetActorVar, LVar0, AVAR_AncestorColumn, LVar1) + Switch(LVar1) + CaseEq(0) + Call(GetBattleVar, BTL_VAR_KoopatrolSummonCount_0, LVar0) + Add(LVar0, 1) + Call(SetBattleVar, BTL_VAR_KoopatrolSummonCount_0, LVar0) + CaseEq(1) + Call(GetBattleVar, BTL_VAR_KoopatrolSummonCount_1, LVar0) + Add(LVar0, 1) + Call(SetBattleVar, BTL_VAR_KoopatrolSummonCount_1, LVar0) + CaseEq(2) + Call(GetBattleVar, BTL_VAR_KoopatrolSummonCount_2, LVar0) + Add(LVar0, 1) + Call(SetBattleVar, BTL_VAR_KoopatrolSummonCount_2, LVar0) + CaseEq(3) + Call(GetBattleVar, BTL_VAR_KoopatrolSummonCount_3, LVar0) + Add(LVar0, 1) + Call(SetBattleVar, BTL_VAR_KoopatrolSummonCount_3, LVar0) + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_CountActiveSummoners) = { - EVT_SET(LVar9, 0) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetOriginalActorType, LVar0, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(ACTOR_TYPE_KOOPATROL) - EVT_CALL(GetStatusFlags, LVar0, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(GetActorVar, LVar0, AVAR_State, LVar3) - EVT_IF_EQ(LVar3, AVAL_State_Normal) - EVT_CALL(GetActorVar, LVar0, AVAR_Generation, LVar3) - EVT_SWITCH(LVar3) - EVT_CASE_OR_EQ(0) - EVT_CASE_OR_EQ(1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_AncestorColumn, LVar3) - EVT_SWITCH(LVar3) - EVT_CASE_EQ(0) - EVT_CALL(GetBattleVar, BTL_VAR_KoopatrolSummonCount_0, LVar4) - EVT_CASE_EQ(1) - EVT_CALL(GetBattleVar, BTL_VAR_KoopatrolSummonCount_1, LVar4) - EVT_CASE_EQ(2) - EVT_CALL(GetBattleVar, BTL_VAR_KoopatrolSummonCount_2, LVar4) - EVT_CASE_EQ(3) - EVT_CALL(GetBattleVar, BTL_VAR_KoopatrolSummonCount_3, LVar4) - EVT_END_SWITCH - EVT_IF_LT(LVar4, 2) - EVT_ADD(LVar9, 1) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(2) - EVT_END_SWITCH - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVar9, 0) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetOriginalActorType, LVar0, LVar2) + Switch(LVar2) + CaseEq(ACTOR_TYPE_KOOPATROL) + Call(GetStatusFlags, LVar0, LVar3) + IfNotFlag(LVar3, STATUS_FLAGS_IMMOBILIZED) + Call(GetActorVar, LVar0, AVAR_State, LVar3) + IfEq(LVar3, AVAL_State_Normal) + Call(GetActorVar, LVar0, AVAR_Generation, LVar3) + Switch(LVar3) + CaseOrEq(0) + CaseOrEq(1) + Call(GetActorVar, ACTOR_SELF, AVAR_AncestorColumn, LVar3) + Switch(LVar3) + CaseEq(0) + Call(GetBattleVar, BTL_VAR_KoopatrolSummonCount_0, LVar4) + CaseEq(1) + Call(GetBattleVar, BTL_VAR_KoopatrolSummonCount_1, LVar4) + CaseEq(2) + Call(GetBattleVar, BTL_VAR_KoopatrolSummonCount_2, LVar4) + CaseEq(3) + Call(GetBattleVar, BTL_VAR_KoopatrolSummonCount_3, LVar4) + EndSwitch + IfLt(LVar4, 2) + Add(LVar9, 1) + EndIf + EndCaseGroup + CaseEq(2) + EndSwitch + EndIf + EndIf + EndSwitch + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) - EVT_EXEC_WAIT(N(EVS_Attack_ShellToss)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_Normal) - EVT_CALL(GetBattleVar, BTL_VAR_HyperSync, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(0) - EVT_CASE_OR_EQ(1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_AncestorColumn, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(GetBattleVar, BTL_VAR_KoopatrolSummonCount_0, LVar1) - EVT_CASE_EQ(1) - EVT_CALL(GetBattleVar, BTL_VAR_KoopatrolSummonCount_1, LVar1) - EVT_CASE_EQ(2) - EVT_CALL(GetBattleVar, BTL_VAR_KoopatrolSummonCount_2, LVar1) - EVT_CASE_EQ(3) - EVT_CALL(GetBattleVar, BTL_VAR_KoopatrolSummonCount_3, LVar1) - EVT_END_SWITCH - EVT_IF_GE(LVar1, 2) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 300) - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Active) - EVT_EXEC_WAIT(N(EVS_Attack_ChargedToss)) - EVT_ELSE - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) - EVT_EXEC_WAIT(N(EVS_Attack_ShellToss)) - EVT_END_IF - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(2) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 300) - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Active) - EVT_EXEC_WAIT(N(EVS_Attack_ChargedToss)) - EVT_ELSE - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) - EVT_EXEC_WAIT(N(EVS_Attack_ShellToss)) - EVT_END_IF - EVT_RETURN - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_GetAvailableColumn)) - EVT_IF_EQ(LVarA, -1) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 300) - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Active) - EVT_EXEC_WAIT(N(EVS_Attack_ChargedToss)) - EVT_ELSE - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) - EVT_EXEC_WAIT(N(EVS_Attack_ShellToss)) - EVT_END_IF - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_CountActiveSummoners)) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(1) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 400) - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) - EVT_EXEC_WAIT(N(EVS_Move_SummonBackup)) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(2) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 200) - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) - EVT_EXEC_WAIT(N(EVS_Move_SummonBackup)) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(3) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 100) - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) - EVT_EXEC_WAIT(N(EVS_Move_SummonBackup)) - EVT_RETURN - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 300) - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Active) - EVT_EXEC_WAIT(N(EVS_Attack_ChargedToss)) - EVT_ELSE - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) - EVT_EXEC_WAIT(N(EVS_Attack_ShellToss)) - EVT_END_IF - EVT_CASE_EQ(1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(0) - EVT_CASE_OR_EQ(1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_AncestorColumn, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(GetBattleVar, BTL_VAR_KoopatrolSummonCount_0, LVar1) - EVT_CASE_EQ(1) - EVT_CALL(GetBattleVar, BTL_VAR_KoopatrolSummonCount_1, LVar1) - EVT_CASE_EQ(2) - EVT_CALL(GetBattleVar, BTL_VAR_KoopatrolSummonCount_2, LVar1) - EVT_CASE_EQ(3) - EVT_CALL(GetBattleVar, BTL_VAR_KoopatrolSummonCount_3, LVar1) - EVT_END_SWITCH - EVT_IF_GE(LVar1, 2) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 300) - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Active) - EVT_EXEC_WAIT(N(EVS_Attack_ChargedToss)) - EVT_ELSE - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) - EVT_EXEC_WAIT(N(EVS_Attack_ShellToss)) - EVT_END_IF - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_Attack_ShellToss)) - EVT_RETURN - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_GetAvailableColumn)) - EVT_IF_EQ(LVarA, -1) - EVT_EXEC_WAIT(N(EVS_Attack_ShellToss)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_CountActiveSummoners)) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(1) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 400) - EVT_EXEC_WAIT(N(EVS_Move_SummonBackup)) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(2) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 200) - EVT_EXEC_WAIT(N(EVS_Move_SummonBackup)) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(3) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 100) - EVT_EXEC_WAIT(N(EVS_Move_SummonBackup)) - EVT_RETURN - EVT_END_IF - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_Attack_ShellToss)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_Attack_ChargedToss)) - EVT_END_SWITCH - EVT_CASE_EQ(AVAL_State_Toppled) - EVT_CALL(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) - EVT_EXEC_WAIT(N(EVS_Attack_ShellToss)) - EVT_CASE_EQ(AVAL_State_Charged) - EVT_EXEC_WAIT(N(EVS_Attack_ChargedToss)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) + ExecWait(N(EVS_Attack_ShellToss)) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_Normal) + Call(GetBattleVar, BTL_VAR_HyperSync, LVar0) + Switch(LVar0) + CaseEq(0) + Call(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar0) + Switch(LVar0) + CaseOrEq(0) + CaseOrEq(1) + Call(GetActorVar, ACTOR_SELF, AVAR_AncestorColumn, LVar0) + Switch(LVar0) + CaseEq(0) + Call(GetBattleVar, BTL_VAR_KoopatrolSummonCount_0, LVar1) + CaseEq(1) + Call(GetBattleVar, BTL_VAR_KoopatrolSummonCount_1, LVar1) + CaseEq(2) + Call(GetBattleVar, BTL_VAR_KoopatrolSummonCount_2, LVar1) + CaseEq(3) + Call(GetBattleVar, BTL_VAR_KoopatrolSummonCount_3, LVar1) + EndSwitch + IfGe(LVar1, 2) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 300) + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Active) + ExecWait(N(EVS_Attack_ChargedToss)) + Else + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) + ExecWait(N(EVS_Attack_ShellToss)) + EndIf + Return + EndIf + EndCaseGroup + CaseEq(2) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 300) + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Active) + ExecWait(N(EVS_Attack_ChargedToss)) + Else + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) + ExecWait(N(EVS_Attack_ShellToss)) + EndIf + Return + EndSwitch + ExecWait(N(EVS_GetAvailableColumn)) + IfEq(LVarA, -1) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 300) + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Active) + ExecWait(N(EVS_Attack_ChargedToss)) + Else + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) + ExecWait(N(EVS_Attack_ShellToss)) + EndIf + Return + EndIf + ExecWait(N(EVS_CountActiveSummoners)) + Switch(LVar9) + CaseEq(1) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 400) + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) + ExecWait(N(EVS_Move_SummonBackup)) + Return + EndIf + CaseEq(2) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 200) + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) + ExecWait(N(EVS_Move_SummonBackup)) + Return + EndIf + CaseEq(3) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 100) + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) + ExecWait(N(EVS_Move_SummonBackup)) + Return + EndIf + EndSwitch + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 300) + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Active) + ExecWait(N(EVS_Attack_ChargedToss)) + Else + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) + ExecWait(N(EVS_Attack_ShellToss)) + EndIf + CaseEq(1) + Call(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar0) + Switch(LVar0) + CaseOrEq(0) + CaseOrEq(1) + Call(GetActorVar, ACTOR_SELF, AVAR_AncestorColumn, LVar0) + Switch(LVar0) + CaseEq(0) + Call(GetBattleVar, BTL_VAR_KoopatrolSummonCount_0, LVar1) + CaseEq(1) + Call(GetBattleVar, BTL_VAR_KoopatrolSummonCount_1, LVar1) + CaseEq(2) + Call(GetBattleVar, BTL_VAR_KoopatrolSummonCount_2, LVar1) + CaseEq(3) + Call(GetBattleVar, BTL_VAR_KoopatrolSummonCount_3, LVar1) + EndSwitch + IfGe(LVar1, 2) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 300) + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Active) + ExecWait(N(EVS_Attack_ChargedToss)) + Else + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) + ExecWait(N(EVS_Attack_ShellToss)) + EndIf + Return + EndIf + EndCaseGroup + CaseEq(2) + ExecWait(N(EVS_Attack_ShellToss)) + Return + EndSwitch + ExecWait(N(EVS_GetAvailableColumn)) + IfEq(LVarA, -1) + ExecWait(N(EVS_Attack_ShellToss)) + Return + EndIf + ExecWait(N(EVS_CountActiveSummoners)) + Switch(LVar9) + CaseEq(1) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 400) + ExecWait(N(EVS_Move_SummonBackup)) + Return + EndIf + CaseEq(2) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 200) + ExecWait(N(EVS_Move_SummonBackup)) + Return + EndIf + CaseEq(3) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 100) + ExecWait(N(EVS_Move_SummonBackup)) + Return + EndIf + EndSwitch + ExecWait(N(EVS_Attack_ShellToss)) + CaseEq(2) + ExecWait(N(EVS_Attack_ChargedToss)) + EndSwitch + CaseEq(AVAL_State_Toppled) + Call(SetBattleVar, BTL_VAR_HyperSync, BTL_VAL_HyperSync_Done) + ExecWait(N(EVS_Attack_ShellToss)) + CaseEq(AVAL_State_Charged) + ExecWait(N(EVS_Attack_ChargedToss)) + EndSwitch + Return + End }; diff --git a/src/battle/common/actor/lakitu.inc.c b/src/battle/common/actor/lakitu.inc.c index d03bcd2c059..ec9cbcb11a4 100644 --- a/src/battle/common/actor/lakitu.inc.c +++ b/src/battle/common/actor/lakitu.inc.c @@ -144,247 +144,247 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SummonCount, 0) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_SummonCount, 0) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lakitu_Anim03) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 0, EASING_SIN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lakitu_Anim01) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lakitu_Anim03) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(7.0)) + Call(FlyToGoal, ACTOR_SELF, 0, 0, EASING_SIN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lakitu_Anim01) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim05) - EVT_SET_CONST(LVar2, ANIM_Lakitu_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim05) - EVT_SET_CONST(LVar2, ANIM_Lakitu_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0) - EVT_CALL(HPBarToCurrent, ACTOR_SELF) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim03) - EVT_SET_CONST(LVar2, ANIM_Lakitu_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Lakitu_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lakitu_Anim04) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lakitu_Anim05) + SetConst(LVar2, ANIM_Lakitu_Anim06) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lakitu_Anim05) + SetConst(LVar2, ANIM_Lakitu_Anim06) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lakitu_Anim06) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lakitu_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lakitu_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lakitu_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lakitu_Anim04) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lakitu_Anim04) + ExecWait(EVS_Enemy_Knockback) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lakitu_Anim04) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lakitu_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lakitu_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lakitu_Anim04) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lakitu_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + Call(SetActorPos, ACTOR_SELF, 20, 0, 0) + Call(HPBarToCurrent, ACTOR_SELF) + CaseEq(EVENT_END_FIRST_STRIKE) + ExecWait(N(EVS_ReturnHome)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lakitu_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lakitu_Anim03) + SetConst(LVar2, ANIM_Lakitu_Anim04) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lakitu_Anim04) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Lakitu_Anim04) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_SpinyToss) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lakitu_Anim03) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, -20, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lakitu_Anim01) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPINY_BALL, ANIM_Lakitu_Anim0B) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lakitu_Anim12) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lakitu_Anim13) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -3) - EVT_ADD(LVar1, 16) - EVT_ADD(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.4), 10, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 12) - EVT_ADD(LVar2, 0) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_SPINY_BALL, LVar0, LVar1, LVar2) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_SPINY_BALL, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -8) - EVT_ADD(LVar1, 40) - EVT_ADD(LVar2, 5) - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 10, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 30) - EVT_ADD(LVar2, 2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_SPINY_BALL, LVar0, LVar1, LVar2) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_SPINY_BALL, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SPINY_BALL, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lakitu_Anim15) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lakitu_Anim01) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPINY_BALL, ANIM_Lakitu_Anim0C) - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_SPINY_BALL, SOUND_LAKITU_THROW_SPINY) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_SPINY_BALL, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_SPINY_BALL, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_SPINY_BALL, LVar0, 0, LVar2, 20, TRUE) - EVT_SUB(LVar0, 30) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_SPINY_BALL, LVar0, 0, LVar2, 10, TRUE) - EVT_SUB(LVar0, 20) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_SPINY_BALL, LVar0, 0, LVar2, 5, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SPINY_BALL, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(20) - EVT_CALL(YieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_SPINY_BALL, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_SPINY_BALL, LVar0, LVar1, LVar2, 20, TRUE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SPINY_TOSS, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_THREAD - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_SPINY_BALL, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 40) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_SPINY_BALL, LVar0, 0, LVar2, 20, TRUE) - EVT_SUB(LVar0, 30) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_SPINY_BALL, LVar0, 0, LVar2, 10, TRUE) - EVT_SUB(LVar0, 20) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_SPINY_BALL, LVar0, 0, LVar2, 5, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SPINY_BALL, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_END_THREAD - EVT_WAIT(20) - EVT_CALL(YieldTurn) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lakitu_Anim03) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, -20, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lakitu_Anim01) + Call(SetAnimation, ACTOR_SELF, PRT_SPINY_BALL, ANIM_Lakitu_Anim0B) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lakitu_Anim12) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lakitu_Anim13) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, -3) + Add(LVar1, 16) + Add(LVar2, 2) + PlayEffect(EFFECT_ENERGY_IN_OUT, 0, LVar0, LVar1, LVar2, Float(0.4), 10, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 12) + Add(LVar2, 0) + Call(SetPartPos, ACTOR_SELF, PRT_SPINY_BALL, LVar0, LVar1, LVar2) + Call(SetPartScale, ACTOR_SELF, PRT_SPINY_BALL, Float(0.4), Float(0.4), Float(0.4)) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, -8) + Add(LVar1, 40) + Add(LVar2, 5) + PlayEffect(EFFECT_ENERGY_IN_OUT, 0, LVar0, LVar1, LVar2, Float(1.0), 10, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 30) + Add(LVar2, 2) + Call(SetPartPos, ACTOR_SELF, PRT_SPINY_BALL, LVar0, LVar1, LVar2) + Call(SetPartScale, ACTOR_SELF, PRT_SPINY_BALL, Float(1.0), Float(1.0), Float(1.0)) + EndIf + Call(SetPartFlagBits, ACTOR_SELF, PRT_SPINY_BALL, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(10) + Thread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lakitu_Anim15) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lakitu_Anim01) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_SPINY_BALL, ANIM_Lakitu_Anim0C) + Call(PlaySoundAtPart, ACTOR_SELF, PRT_SPINY_BALL, SOUND_LAKITU_THROW_SPINY) + Call(SetPartSounds, ACTOR_SELF, PRT_SPINY_BALL, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_SPINY_BALL, Float(1.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 40) + Set(LVar1, 0) + Call(JumpPartTo, ACTOR_SELF, PRT_SPINY_BALL, LVar0, 0, LVar2, 20, TRUE) + Sub(LVar0, 30) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(ResetAllActorSounds, ACTOR_SELF) + Call(JumpPartTo, ACTOR_SELF, PRT_SPINY_BALL, LVar0, 0, LVar2, 10, TRUE) + Sub(LVar0, 20) + Call(JumpPartTo, ACTOR_SELF, PRT_SPINY_BALL, LVar0, 0, LVar2, 5, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SPINY_BALL, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(20) + Call(YieldTurn) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorYaw, ACTOR_SELF, 180) + ExecWait(N(EVS_ReturnHome)) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetPartJumpGravity, ACTOR_SELF, PRT_SPINY_BALL, Float(1.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpPartTo, ACTOR_SELF, PRT_SPINY_BALL, LVar0, LVar1, LVar2, 20, TRUE) + Call(ResetAllActorSounds, ACTOR_SELF) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SPINY_TOSS, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Thread + Call(SetPartJumpGravity, ACTOR_SELF, PRT_SPINY_BALL, Float(1.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 40) + Call(JumpPartTo, ACTOR_SELF, PRT_SPINY_BALL, LVar0, 0, LVar2, 20, TRUE) + Sub(LVar0, 30) + Call(JumpPartTo, ACTOR_SELF, PRT_SPINY_BALL, LVar0, 0, LVar2, 10, TRUE) + Sub(LVar0, 20) + Call(JumpPartTo, ACTOR_SELF, PRT_SPINY_BALL, LVar0, 0, LVar2, 5, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SPINY_BALL, ACTOR_PART_FLAG_INVISIBLE, TRUE) + EndThread + Wait(20) + Call(YieldTurn) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; Vec3i N(SummonPos) = { NPC_DISPOSE_LOCATION }; @@ -394,224 +394,224 @@ Formation N(SpinyFormation) = { }; EvtScript N(EVS_Move_SummonSpiny) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SummonEnemy, EVT_PTR(N(SpinyFormation)), FALSE) - EVT_CALL(CopyStatusEffects, ACTOR_SELF, LVar0) - EVT_SET(LVarB, LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPINY_BALL, ANIM_Lakitu_Anim0B) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lakitu_Anim12) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lakitu_Anim13) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -3) - EVT_ADD(LVar1, 16) - EVT_ADD(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.4), 10, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 12) - EVT_ADD(LVar2, 0) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_SPINY_BALL, LVar0, LVar1, LVar2) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_SPINY_BALL, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_SPINY, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -8) - EVT_ADD(LVar1, 40) - EVT_ADD(LVar2, 5) - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 10, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 30) - EVT_ADD(LVar2, 2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_SPINY_BALL, LVar0, LVar1, LVar2) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_SPINY_BALL, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_SPINY, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SPINY_BALL, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lakitu_Anim15) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lakitu_Anim01) - EVT_END_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_SPINY_BALL, SOUND_LAKITU_THROW_SPINY) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_SPINY_BALL, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPINY_BALL, ANIM_Lakitu_Anim0C) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_SPINY_BALL, EVT_FLOAT(1.6)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 40) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_SPINY_BALL, LVar0, 0, LVar2, 12, TRUE) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_SPINY, LVar0, 0, LVar2) - EVT_SUB(LVar0, 30) - EVT_THREAD - EVT_CALL(SetPartRotationOffset, ACTOR_SELF, PRT_SPINY, 0, 16, 0) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(12) - EVT_ADD(LVar0, 30) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_SPINY, 0, 0, LVar0) - EVT_ADD(LVar1, 1) - EVT_IF_GE(LVar1, 6) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SPINY_BALL, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SPINY, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_SET(LFlag0, FALSE) - EVT_ELSE - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SPINY_BALL, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SPINY, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_SPINY, EVT_FLOAT(1.3)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_SPINY, LVar0, 0, LVar2, 12, TRUE) - EVT_END_THREAD - EVT_WAIT(1) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_SPINY_BALL, EVT_FLOAT(1.3)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_SPINY_BALL, LVar0, 0, LVar2, 12, TRUE) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, LVar0, 0, LVar2, 0, 0) - EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_SPINY_BALL, LVar0, LVar1, LVar2) - EVT_CALL(SetActorPos, LVarB, LVar0, LVar1, LVar2) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SPINY_BALL, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SPINY, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetAnimation, LVarB, 1, ANIM_Spiny_Anim01) - EVT_WAIT(20) - EVT_CALL(SetAnimation, LVarB, 1, ANIM_Spiny_Anim04) - EVT_CALL(SetGoalToIndex, LVarB, LVarA) - EVT_CALL(GetGoalPos, LVarB, LVar0, LVar1, LVar2) - EVT_CALL(GetActorPos, LVarB, LVar3, LVar4, LVar5) - EVT_IF_LT(LVar0, LVar3) - EVT_CALL(SetActorYaw, LVarB, 0) - EVT_ELSE - EVT_CALL(SetActorYaw, LVarB, 180) - EVT_END_IF - EVT_CALL(SetActorSpeed, LVarB, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, LVarB, 0, FALSE) - EVT_CALL(SetAnimation, LVarB, 1, ANIM_Spiny_Anim01) - EVT_CALL(SetActorYaw, LVarB, 0) - EVT_CALL(GetActorPos, LVarB, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, LVarB, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, LVarB) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_SummonCount, LVar0) - EVT_ADD(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SummonCount, LVar0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SummonEnemy, Ref(N(SpinyFormation)), FALSE) + Call(CopyStatusEffects, ACTOR_SELF, LVar0) + Set(LVarB, LVar0) + Call(SetAnimation, ACTOR_SELF, PRT_SPINY_BALL, ANIM_Lakitu_Anim0B) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lakitu_Anim12) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lakitu_Anim13) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, -3) + Add(LVar1, 16) + Add(LVar2, 2) + PlayEffect(EFFECT_ENERGY_IN_OUT, 0, LVar0, LVar1, LVar2, Float(0.4), 10, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 12) + Add(LVar2, 0) + Call(SetPartPos, ACTOR_SELF, PRT_SPINY_BALL, LVar0, LVar1, LVar2) + Call(SetPartScale, ACTOR_SELF, PRT_SPINY_BALL, Float(0.4), Float(0.4), Float(0.4)) + Call(SetPartScale, ACTOR_SELF, PRT_SPINY, Float(0.4), Float(0.4), Float(0.4)) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, -8) + Add(LVar1, 40) + Add(LVar2, 5) + PlayEffect(EFFECT_ENERGY_IN_OUT, 0, LVar0, LVar1, LVar2, Float(1.0), 10, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 30) + Add(LVar2, 2) + Call(SetPartPos, ACTOR_SELF, PRT_SPINY_BALL, LVar0, LVar1, LVar2) + Call(SetPartScale, ACTOR_SELF, PRT_SPINY_BALL, Float(1.0), Float(1.0), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_SPINY, Float(1.0), Float(1.0), Float(1.0)) + EndIf + Call(SetPartFlagBits, ACTOR_SELF, PRT_SPINY_BALL, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(10) + Thread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lakitu_Anim15) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Lakitu_Anim01) + EndThread + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(PlaySoundAtPart, ACTOR_SELF, PRT_SPINY_BALL, SOUND_LAKITU_THROW_SPINY) + Call(SetPartSounds, ACTOR_SELF, PRT_SPINY_BALL, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) + Call(SetAnimation, ACTOR_SELF, PRT_SPINY_BALL, ANIM_Lakitu_Anim0C) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_SPINY_BALL, Float(1.6)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 40) + Call(JumpPartTo, ACTOR_SELF, PRT_SPINY_BALL, LVar0, 0, LVar2, 12, TRUE) + Call(SetPartPos, ACTOR_SELF, PRT_SPINY, LVar0, 0, LVar2) + Sub(LVar0, 30) + Thread + Call(SetPartRotationOffset, ACTOR_SELF, PRT_SPINY, 0, 16, 0) + Set(LVar0, 0) + Set(LVar1, 0) + Set(LFlag0, FALSE) + Loop(12) + Add(LVar0, 30) + Call(SetPartRotation, ACTOR_SELF, PRT_SPINY, 0, 0, LVar0) + Add(LVar1, 1) + IfGe(LVar1, 6) + IfEq(LFlag0, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SPINY_BALL, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SPINY, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Set(LFlag0, FALSE) + Else + Call(SetPartFlagBits, ACTOR_SELF, PRT_SPINY_BALL, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SPINY, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Set(LFlag0, TRUE) + EndIf + EndIf + Wait(1) + EndLoop + EndThread + Thread + Call(SetPartJumpGravity, ACTOR_SELF, PRT_SPINY, Float(1.3)) + Call(JumpPartTo, ACTOR_SELF, PRT_SPINY, LVar0, 0, LVar2, 12, TRUE) + EndThread + Wait(1) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_SPINY_BALL, Float(1.3)) + Call(JumpPartTo, ACTOR_SELF, PRT_SPINY_BALL, LVar0, 0, LVar2, 12, TRUE) + PlayEffect(EFFECT_LANDING_DUST, 1, LVar0, 0, LVar2, 0, 0) + Call(GetPartOffset, ACTOR_SELF, PRT_SPINY_BALL, LVar0, LVar1, LVar2) + Call(SetActorPos, LVarB, LVar0, LVar1, LVar2) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SPINY_BALL, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SPINY, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetAnimation, LVarB, 1, ANIM_Spiny_Anim01) + Wait(20) + Call(SetAnimation, LVarB, 1, ANIM_Spiny_Anim04) + Call(SetGoalToIndex, LVarB, LVarA) + Call(GetGoalPos, LVarB, LVar0, LVar1, LVar2) + Call(GetActorPos, LVarB, LVar3, LVar4, LVar5) + IfLt(LVar0, LVar3) + Call(SetActorYaw, LVarB, 0) + Else + Call(SetActorYaw, LVarB, 180) + EndIf + Call(SetActorSpeed, LVarB, Float(4.0)) + Call(RunToGoal, LVarB, 0, FALSE) + Call(SetAnimation, LVarB, 1, ANIM_Spiny_Anim01) + Call(SetActorYaw, LVarB, 0) + Call(GetActorPos, LVarB, LVar0, LVar1, LVar2) + Call(ForceHomePos, LVarB, LVar0, LVar1, LVar2) + Call(HPBarToHome, LVarB) + Call(GetActorVar, ACTOR_SELF, AVAR_SummonCount, LVar0) + Add(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_SummonCount, LVar0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_GetAvailableColumn) = { - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar5) - EVT_CALL(GetIndexFromHome, LVar0, LVar5) - EVT_MOD(LVar5, 4) - EVT_SWITCH(LVar5) - EVT_CASE_EQ(0) - EVT_SET(LFlag1, TRUE) - EVT_CASE_EQ(1) - EVT_SET(LFlag2, TRUE) - EVT_CASE_EQ(2) - EVT_SET(LFlag3, TRUE) - EVT_CASE_EQ(3) - EVT_SET(LFlag4, TRUE) - EVT_END_SWITCH - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_EQ(LFlag1, FALSE) - EVT_SET(LVarA, 0) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LFlag2, FALSE) - EVT_SET(LVarA, 1) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LFlag3, FALSE) - EVT_SET(LVarA, 2) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LFlag4, FALSE) - EVT_SET(LVarA, 3) - EVT_RETURN - EVT_END_IF - EVT_SET(LVarA, -1) - EVT_RETURN - EVT_END + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar5) + Call(GetIndexFromHome, LVar0, LVar5) + Mod(LVar5, 4) + Switch(LVar5) + CaseEq(0) + Set(LFlag1, TRUE) + CaseEq(1) + Set(LFlag2, TRUE) + CaseEq(2) + Set(LFlag3, TRUE) + CaseEq(3) + Set(LFlag4, TRUE) + EndSwitch + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + IfEq(LFlag1, FALSE) + Set(LVarA, 0) + Return + EndIf + IfEq(LFlag2, FALSE) + Set(LVarA, 1) + Return + EndIf + IfEq(LFlag3, FALSE) + Set(LVarA, 2) + Return + EndIf + IfEq(LFlag4, FALSE) + Set(LVarA, 3) + Return + EndIf + Set(LVarA, -1) + Return + End }; EvtScript N(EVS_CountActiveSummoners) = { - EVT_SET(LVar9, 0) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetOriginalActorType, LVar0, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(ACTOR_TYPE_LAKITU) - EVT_CALL(GetStatusFlags, LVar0, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(GetActorVar, LVar0, AVAR_SummonCount, LVar3) - EVT_IF_LT(LVar3, 3) - EVT_ADD(LVar9, 1) - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVar9, 0) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetOriginalActorType, LVar0, LVar2) + Switch(LVar2) + CaseEq(ACTOR_TYPE_LAKITU) + Call(GetStatusFlags, LVar0, LVar3) + IfNotFlag(LVar3, STATUS_FLAGS_IMMOBILIZED) + Call(GetActorVar, LVar0, AVAR_SummonCount, LVar3) + IfLt(LVar3, 3) + Add(LVar9, 1) + EndIf + EndIf + EndSwitch + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_SummonCount, LVar0) - EVT_IF_GE(LVar0, 3) - EVT_EXEC_WAIT(N(EVS_Attack_SpinyToss)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_GetAvailableColumn)) - EVT_IF_EQ(LVarA, -1) - EVT_EXEC_WAIT(N(EVS_Attack_SpinyToss)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_CountActiveSummoners)) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(1) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 500) - EVT_EXEC_WAIT(N(EVS_Move_SummonSpiny)) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(2) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 250) - EVT_EXEC_WAIT(N(EVS_Move_SummonSpiny)) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(3) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 150) - EVT_EXEC_WAIT(N(EVS_Move_SummonSpiny)) - EVT_RETURN - EVT_END_IF - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_Attack_SpinyToss)) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_SummonCount, LVar0) + IfGe(LVar0, 3) + ExecWait(N(EVS_Attack_SpinyToss)) + Return + EndIf + ExecWait(N(EVS_GetAvailableColumn)) + IfEq(LVarA, -1) + ExecWait(N(EVS_Attack_SpinyToss)) + Return + EndIf + ExecWait(N(EVS_CountActiveSummoners)) + Switch(LVar9) + CaseEq(1) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 500) + ExecWait(N(EVS_Move_SummonSpiny)) + Return + EndIf + CaseEq(2) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 250) + ExecWait(N(EVS_Move_SummonSpiny)) + Return + EndIf + CaseEq(3) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 150) + ExecWait(N(EVS_Move_SummonSpiny)) + Return + EndIf + EndSwitch + ExecWait(N(EVS_Attack_SpinyToss)) + Return + End }; diff --git a/src/battle/common/actor/lava_bubble.inc.c b/src/battle/common/actor/lava_bubble.inc.c index e80fe05db13..73311ec2ad2 100644 --- a/src/battle/common/actor/lava_bubble.inc.c +++ b/src/battle/common/actor/lava_bubble.inc.c @@ -171,304 +171,304 @@ s32 N(ProjectileAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IN_NoTackle, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CanTackle, TRUE) - EVT_CASE_EQ(1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CanTackle, FALSE) - EVT_END_SWITCH - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_FIRE_1, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_FIRE_2, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_FIRE_3, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_FIRE_4, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Generation, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_PauseIdle, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 5) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(GetActorVar, ACTOR_SELF, AVAR_IN_NoTackle, LVar0) + Switch(LVar0) + CaseEq(0) + Call(SetActorVar, ACTOR_SELF, AVAR_CanTackle, TRUE) + CaseEq(1) + Call(SetActorVar, ACTOR_SELF, AVAR_CanTackle, FALSE) + EndSwitch + Call(SetPartScale, ACTOR_SELF, PRT_FIRE_1, Float(0.5), Float(0.5), Float(0.5)) + Call(SetPartScale, ACTOR_SELF, PRT_FIRE_2, Float(0.5), Float(0.5), Float(0.5)) + Call(SetPartScale, ACTOR_SELF, PRT_FIRE_3, Float(0.5), Float(0.5), Float(0.5)) + Call(SetPartScale, ACTOR_SELF, PRT_FIRE_4, Float(0.5), Float(0.5), Float(0.5)) + Call(SetActorVar, ACTOR_SELF, AVAR_Generation, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_PauseIdle, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 5) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, 10, 25, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(GetHomePos, ACTOR_SELF, LVar2, LVar3, LVar4) - EVT_ADD(LVar0, LVar3) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar2, LVar0, LVar4) - EVT_IF_EQ(LVar1, 1) - EVT_LABEL(11) - EVT_WAIT(1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_GOTO(11) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PauseIdle, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(11) - EVT_END_IF - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(MakeLerp, 10, 0, 25, EASING_COS_IN_OUT) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(GetHomePos, ACTOR_SELF, LVar2, LVar3, LVar4) - EVT_ADD(LVar0, LVar3) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar2, LVar0, LVar4) - EVT_IF_EQ(LVar1, 1) - EVT_LABEL(22) - EVT_WAIT(1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_GOTO(22) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PauseIdle, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(22) - EVT_END_IF - EVT_GOTO(2) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(MakeLerp, 0, 10, 25, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(GetHomePos, ACTOR_SELF, LVar2, LVar3, LVar4) + Add(LVar0, LVar3) + Call(SetActorPos, ACTOR_SELF, LVar2, LVar0, LVar4) + IfEq(LVar1, 1) + Label(11) + Wait(1) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Goto(11) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_PauseIdle, LVar0) + IfEq(LVar0, 1) + Goto(11) + EndIf + Goto(1) + EndIf + Call(MakeLerp, 10, 0, 25, EASING_COS_IN_OUT) + Label(2) + Call(UpdateLerp) + Call(GetHomePos, ACTOR_SELF, LVar2, LVar3, LVar4) + Add(LVar0, LVar3) + Call(SetActorPos, ACTOR_SELF, LVar2, LVar0, LVar4) + IfEq(LVar1, 1) + Label(22) + Wait(1) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Goto(22) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_PauseIdle, LVar0) + IfEq(LVar0, 1) + Goto(22) + EndIf + Goto(2) + EndIf + Goto(0) + Return + End }; #include "common/PlayLavaBubbleFlightSound.inc.c" EvtScript N(EVS_Ember_FlyHome) = { - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim03) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_THREAD - EVT_CALL(N(PlayLavaBubbleFlightSound)) - EVT_END_THREAD - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim01) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim03) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Thread + Call(N(PlayLavaBubbleFlightSound)) + EndThread + Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim01) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Anim08) - EVT_SET_CONST(LVar2, ANIM_LavaBubble_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Anim08) - EVT_SET_CONST(LVar2, ANIM_LavaBubble_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_EMBER_FLY | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_EXEC_WAIT(N(EVS_Ember_FlyHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_EMBER_FLY | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CASE_OR_EQ(EVENT_BURN_TAUNT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0) - EVT_CALL(HPBarToCurrent, ACTOR_SELF) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_Ember_FlyHome)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Anim03) - EVT_SET_CONST(LVar2, ANIM_LavaBubble_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LavaBubble_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_UP_AND_AWAY) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Anim07) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Anim08) + SetConst(LVar2, ANIM_LavaBubble_Anim09) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Anim08) + SetConst(LVar2, ANIM_LavaBubble_Anim09) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Anim09) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Anim07) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Anim07) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Anim07) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_EMBER_FLY | SOUND_ID_TRIGGER_CHANGE_SOUND) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Anim07) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Anim07) + ExecWait(EVS_Enemy_Knockback) + ExecWait(N(EVS_Ember_FlyHome)) + CaseEq(EVENT_SHOCK_DEATH) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_EMBER_FLY | SOUND_ID_TRIGGER_CHANGE_SOUND) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Anim07) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Anim07) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + CaseOrEq(EVENT_BURN_TAUNT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Anim07) + ExecWait(EVS_Enemy_Hit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Anim07) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + Call(SetActorPos, ACTOR_SELF, 20, 0, 0) + Call(HPBarToCurrent, ACTOR_SELF) + CaseEq(EVENT_END_FIRST_STRIKE) + ExecWait(N(EVS_Ember_FlyHome)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Anim03) + SetConst(LVar2, ANIM_LavaBubble_Anim07) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Anim03) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LavaBubble_Anim03) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseEq(EVENT_UP_AND_AWAY) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_Tackle) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim03) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 5) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_THREAD - EVT_CALL(N(PlayLavaBubbleFlightSound)) - EVT_END_THREAD - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 0, EASING_SIN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim01) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim04) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_ADD(LVar2, 1) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 3, FALSE, TRUE, FALSE) - EVT_WAIT(14) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_EXEC_WAIT(N(EVS_Ember_FlyHome)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim04) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 1) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_FIRE, 0, 0, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_SET(LVar0, PRT_MAIN) - EVT_SET(LVar1, ANIM_LavaBubble_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_WAIT(5) - EVT_EXEC_WAIT(N(EVS_Ember_FlyHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim03) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Set(LVar1, 5) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Thread + Call(N(PlayLavaBubbleFlightSound)) + EndThread + Call(FlyToGoal, ACTOR_SELF, 0, 0, EASING_SIN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim01) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim04) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Set(LVar1, 0) + Add(LVar2, 1) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Sub(LVar0, 10) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 3, FALSE, TRUE, FALSE) + Wait(14) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorYaw, ACTOR_SELF, 180) + ExecWait(N(EVS_Ember_FlyHome)) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim04) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar2, 1) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_FIRE, 0, 0, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Set(LVar0, PRT_MAIN) + Set(LVar1, ANIM_LavaBubble_Anim04) + ExecWait(EVS_Enemy_Knockback) + Wait(5) + ExecWait(N(EVS_Ember_FlyHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; // (in) LVar3 posX // (in) LVar4 posY // (in) LVar5 posZ EvtScript N(EVS_ShootFire_Impl) = { - EVT_SET(LVar6, 2) - EVT_LOOP(4) - EVT_THREAD - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartScale, ACTOR_SELF, LVar6, EVT_FLOAT(0.2), EVT_FLOAT(0.2), EVT_FLOAT(0.2)) - EVT_ELSE - EVT_CALL(SetPartScale, ACTOR_SELF, LVar6, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_END_IF - EVT_CALL(SetPartPos, ACTOR_SELF, LVar6, LVar0, LVar1, LVar2) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar6, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, LVar6, EVT_FLOAT(8.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, LVar6, EVT_FLOAT(0.01)) - EVT_CALL(SetPartSounds, ACTOR_SELF, LVar6, ACTOR_SOUND_JUMP, SOUND_EMBER_SPIT, SOUND_NONE) - EVT_CALL(JumpPartTo, ACTOR_SELF, LVar6, LVar3, LVar4, LVar5, 0, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, LVar6, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_END_THREAD - EVT_WAIT(3) - EVT_ADD(LVar6, 1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVar6, 2) + Loop(4) + Thread + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Call(SetPartScale, ACTOR_SELF, LVar6, Float(0.2), Float(0.2), Float(0.2)) + Else + Call(SetPartScale, ACTOR_SELF, LVar6, Float(0.5), Float(0.5), Float(0.5)) + EndIf + Call(SetPartPos, ACTOR_SELF, LVar6, LVar0, LVar1, LVar2) + Call(SetPartFlagBits, ACTOR_SELF, LVar6, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetPartMoveSpeed, ACTOR_SELF, LVar6, Float(8.0)) + Call(SetPartJumpGravity, ACTOR_SELF, LVar6, Float(0.01)) + Call(SetPartSounds, ACTOR_SELF, LVar6, ACTOR_SOUND_JUMP, SOUND_EMBER_SPIT, SOUND_NONE) + Call(JumpPartTo, ACTOR_SELF, LVar6, LVar3, LVar4, LVar5, 0, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, LVar6, ACTOR_PART_FLAG_INVISIBLE, TRUE) + EndThread + Wait(3) + Add(LVar6, 1) + EndLoop + Return + End }; // Shoot fireballs at a target and wait before yielding. @@ -476,230 +476,230 @@ EvtScript N(EVS_ShootFire_Impl) = { // (in) LVar4 posY // (in) LVar5 posZ EvtScript N(EVS_ShootFire) = { - EVT_EXEC(N(EVS_ShootFire_Impl)) - EVT_CALL(GetDistanceToGoal, ACTOR_SELF, LVar0) - EVT_DIVF(LVar0, EVT_FLOAT(8.0)) - EVT_ADD(LVar0, 1) - EVT_WAIT(LVar0) - EVT_RETURN - EVT_END + Exec(N(EVS_ShootFire_Impl)) + Call(GetDistanceToGoal, ACTOR_SELF, LVar0) + DivF(LVar0, Float(8.0)) + Add(LVar0, 1) + Wait(LVar0) + Return + End }; EvtScript N(EVS_Attack_ShootPartner) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CanTackle, LVarA) - EVT_IF_EQ(LVarA, TRUE) - EVT_ADD(LVar0, 100) - EVT_SET(LVar1, 5) - EVT_ELSE - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 50) - EVT_END_IF - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim03) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_THREAD - EVT_CALL(N(PlayLavaBubbleFlightSound)) - EVT_END_THREAD - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, EASING_SIN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim01) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim05) - EVT_WAIT(30) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim06) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_ADD(LVar1, 4) - EVT_ADD(LVar2, 2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 100) - EVT_ADD(LVar5, 2) - EVT_EXEC_WAIT(N(EVS_ShootFire)) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_EXEC_WAIT(N(EVS_Ember_FlyHome)) - EVT_WAIT(20) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim06) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_ADD(LVar1, 4) - EVT_ADD(LVar2, 2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_SUB(LVar4, 6) - EVT_ADD(LVar5, 2) - EVT_EXEC_WAIT(N(EVS_ShootFire)) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_FIRE | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SHOOT_PARTNER, BS_FLAGS1_TRIGGER_EVENTS) - EVT_WAIT(20) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_EXEC_WAIT(N(EVS_Ember_FlyHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(GetActorVar, ACTOR_SELF, AVAR_CanTackle, LVarA) + IfEq(LVarA, TRUE) + Add(LVar0, 100) + Set(LVar1, 5) + Else + Add(LVar0, 30) + Set(LVar1, 50) + EndIf + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim03) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Thread + Call(N(PlayLavaBubbleFlightSound)) + EndThread + Call(FlyToGoal, ACTOR_SELF, 0, -4, EASING_SIN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim01) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim05) + Wait(30) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim06) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Add(LVar1, 4) + Add(LVar2, 2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Sub(LVar3, 100) + Add(LVar5, 2) + ExecWait(N(EVS_ShootFire)) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorYaw, ACTOR_SELF, 180) + ExecWait(N(EVS_Ember_FlyHome)) + Wait(20) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim06) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Add(LVar1, 4) + Add(LVar2, 2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Sub(LVar4, 6) + Add(LVar5, 2) + ExecWait(N(EVS_ShootFire)) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_FIRE | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SHOOT_PARTNER, BS_FLAGS1_TRIGGER_EVENTS) + Wait(20) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ExecWait(N(EVS_Ember_FlyHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_ShootPlayer) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim03) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 30, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_THREAD - EVT_CALL(N(PlayLavaBubbleFlightSound)) - EVT_END_THREAD - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, EASING_SIN_OUT) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_WAIT(10) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_EMBER_JUMP) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim04) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HOP) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_ADD(LVar2, 2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim04) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_QUADRATIC_OUT) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_EXEC_WAIT(N(EVS_Ember_FlyHome)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_WAIT(5) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_EMBER_JUMP) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim04) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HOP) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_QUADRATIC_OUT) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_FIRE, 0, 0, DMG_SHOOT_PLAYER, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(EVS_Ember_FlyHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim03) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 30, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Thread + Call(N(PlayLavaBubbleFlightSound)) + EndThread + Call(FlyToGoal, ACTOR_SELF, 0, -4, EASING_SIN_OUT) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Wait(10) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_EMBER_JUMP) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim04) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HOP) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Add(LVar2, 2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim04) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_QUADRATIC_OUT) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorYaw, ACTOR_SELF, 180) + ExecWait(N(EVS_Ember_FlyHome)) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Wait(5) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_EMBER_JUMP) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LavaBubble_Anim04) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) + Set(LVarA, LVar0) + Set(LVarB, LVar1) + Set(LVarC, LVar2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HOP) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar2, 2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_QUADRATIC_OUT) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_FIRE, 0, 0, DMG_SHOOT_PLAYER, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) + Wait(20) + ExecWait(N(EVS_Ember_FlyHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CanTackle, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_Attack_Tackle)) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_Attack_ShootPlayer)) - EVT_END_SWITCH - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CanTackle, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(1) - EVT_CALL(GetStatusFlags, ACTOR_PARTNER, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_KO) - EVT_EXEC_WAIT(N(EVS_Attack_Tackle)) - EVT_ELSE - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LE(LVar0, 300) - EVT_EXEC_WAIT(N(EVS_Attack_ShootPartner)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_Tackle)) - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(0) - EVT_CALL(GetStatusFlags, ACTOR_PARTNER, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_KO) - EVT_EXEC_WAIT(N(EVS_Attack_ShootPlayer)) - EVT_ELSE - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LE(LVar0, 300) - EVT_EXEC_WAIT(N(EVS_Attack_ShootPartner)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_ShootPlayer)) - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(GetActorVar, ACTOR_SELF, AVAR_CanTackle, LVar0) + Switch(LVar0) + CaseEq(1) + ExecWait(N(EVS_Attack_Tackle)) + CaseEq(0) + ExecWait(N(EVS_Attack_ShootPlayer)) + EndSwitch + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_CanTackle, LVar0) + Switch(LVar0) + CaseEq(1) + Call(GetStatusFlags, ACTOR_PARTNER, LVar0) + IfFlag(LVar0, STATUS_FLAG_KO) + ExecWait(N(EVS_Attack_Tackle)) + Else + Call(RandInt, 1000, LVar0) + IfLe(LVar0, 300) + ExecWait(N(EVS_Attack_ShootPartner)) + Else + ExecWait(N(EVS_Attack_Tackle)) + EndIf + EndIf + CaseEq(0) + Call(GetStatusFlags, ACTOR_PARTNER, LVar0) + IfFlag(LVar0, STATUS_FLAG_KO) + ExecWait(N(EVS_Attack_ShootPlayer)) + Else + Call(RandInt, 1000, LVar0) + IfLe(LVar0, 300) + ExecWait(N(EVS_Attack_ShootPartner)) + Else + ExecWait(N(EVS_Attack_ShootPlayer)) + EndIf + EndIf + EndSwitch + Return + End }; diff --git a/src/battle/common/actor/m_bush.inc.c b/src/battle/common/actor/m_bush.inc.c index c2ad733a2b5..cdeb40e7e41 100644 --- a/src/battle/common/actor/m_bush.inc.c +++ b/src/battle/common/actor/m_bush.inc.c @@ -100,203 +100,203 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MBush_Anim05) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MBush_Anim02) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_RETURN - EVT_END + Call(SetActorYaw, ACTOR_SELF, 180) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MBush_Anim05) + Call(SetGoalToHome, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MBush_Anim02) + Call(SetActorYaw, ACTOR_SELF, 0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MBush_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MBush_Anim0A) - EVT_SET_CONST(LVar2, ANIM_MBush_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MBush_Anim0A) - EVT_SET_CONST(LVar2, ANIM_MBush_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MBush_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MBush_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MBush_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MBush_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MBush_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MBush_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MBush_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MBush_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MBush_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MBush_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MBush_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MBush_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MBush_Anim05) - EVT_SET_CONST(LVar2, ANIM_MBush_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MBush_Anim05) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MBush_Anim05) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MBush_Anim07) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MBush_Anim0A) + SetConst(LVar2, ANIM_MBush_Anim0B) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MBush_Anim0A) + SetConst(LVar2, ANIM_MBush_Anim0B) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MBush_Anim0B) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MBush_Anim07) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MBush_Anim07) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MBush_Anim07) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MBush_Anim07) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MBush_Anim07) + ExecWait(EVS_Enemy_Knockback) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MBush_Anim07) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MBush_Anim07) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MBush_Anim02) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MBush_Anim07) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MBush_Anim07) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MBush_Anim02) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MBush_Anim05) + SetConst(LVar2, ANIM_MBush_Anim09) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MBush_Anim05) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MBush_Anim05) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MBush_Anim04) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_MBUSH_LEAP, 0) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MBush_Anim06) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MBush_Anim02) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MBush_Anim06) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 2, 25), DMG_BITE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MBush_Anim02) - EVT_WAIT(8) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MBush_Anim04) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Set(LVar1, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_MBUSH_LEAP, 0) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MBush_Anim06) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(ResetAllActorSounds, ACTOR_SELF) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MBush_Anim02) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + ExecWait(N(EVS_ReturnHome)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MBush_Anim06) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(ResetAllActorSounds, ACTOR_SELF) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 2, 25), DMG_BITE, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MBush_Anim02) + Wait(8) + Call(YieldTurn) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/magikoopa.inc.c b/src/battle/common/actor/magikoopa.inc.c index c3c3b6f9e6e..4c8b22591d2 100644 --- a/src/battle/common/actor/magikoopa.inc.c +++ b/src/battle/common/actor/magikoopa.inc.c @@ -267,1019 +267,1019 @@ s32 N(BroomAnims)[] = { #include "common/CosInterpMinMax.inc.c" EvtScript N(EVS_Idle) = { - EVT_SET(LVarF, 0) - EVT_LABEL(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CloneActorID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar1, EVT_FLOAT(254.0), EVT_FLOAT(100.0), 20, 0, 0) - EVT_ADD(LVarF, 1) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar2) - EVT_IF_FLAG(LVar2, ACTOR_FLAG_FLYING) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_FLYING, LVar1) - EVT_CALL(SetPartAlpha, LVar0, 1, LVar1) - EVT_ELSE - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar1) - EVT_CALL(SetPartAlpha, LVar0, 1, LVar1) - EVT_END_IF - EVT_ELSE - EVT_SET(LVarF, 0) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar2) - EVT_IF_FLAG(LVar2, ACTOR_FLAG_FLYING) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_FLYING, 255) - EVT_ELSE - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVarF, 0) + Label(0) + Call(GetActorVar, ACTOR_SELF, AVAR_CloneActorID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, 1) + Call(N(CosInterpMinMax), LVarF, LVar1, Float(254.0), Float(100.0), 20, 0, 0) + Add(LVarF, 1) + Call(GetActorFlags, ACTOR_SELF, LVar2) + IfFlag(LVar2, ACTOR_FLAG_FLYING) + Call(SetPartAlpha, ACTOR_SELF, PRT_FLYING, LVar1) + Call(SetPartAlpha, LVar0, 1, LVar1) + Else + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar1) + Call(SetPartAlpha, LVar0, 1, LVar1) + EndIf + Else + Set(LVarF, 0) + Call(GetActorFlags, ACTOR_SELF, LVar2) + IfFlag(LVar2, ACTOR_FLAG_FLYING) + Call(SetPartAlpha, ACTOR_SELF, PRT_FLYING, 255) + Else + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) + EndIf + EndIf + Wait(1) + Goto(0) + Return + End }; #include "common/GetSelectedMoveID.inc.c" EvtScript N(EVS_KnockDownCheck) = { - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_PARTNER_ACTING) - EVT_IF_FLAG(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE) - EVT_END_IF - EVT_ELSE - EVT_CALL(N(GetSelectedMoveID), LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(MOVE_HEADBONK1) - EVT_CASE_OR_EQ(MOVE_HEADBONK2) - EVT_CASE_OR_EQ(MOVE_HEADBONK3) - EVT_CASE_OR_EQ(MOVE_MULTIBONK) - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetBattleFlags, LVar0) + IfNotFlag(LVar0, BS_FLAGS1_PARTNER_ACTING) + IfFlag(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE) + EndIf + Else + Call(N(GetSelectedMoveID), LVar0) + Switch(LVar0) + CaseOrEq(MOVE_HEADBONK1) + CaseOrEq(MOVE_HEADBONK2) + CaseOrEq(MOVE_HEADBONK3) + CaseOrEq(MOVE_MULTIBONK) + Call(GetBattleFlags, LVar0) + IfFlag(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE) + EndIf + EndCaseGroup + EndSwitch + EndIf + Return + End }; #include "common/battle/SetAbsoluteStatusOffsets.inc.c" #include "common/StartRumbleWithParams.inc.c" EvtScript N(EVS_KnockDown) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim04) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetLastElement, LVar0) - EVT_IF_FLAG(LVar0, DAMAGE_TYPE_POW) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim04) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_LABEL(0) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_BROOM, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_END_IF - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 1) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_BROOM, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(N(StartRumbleWithParams), 150, 10) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(0.7)) - EVT_END_THREAD - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar3) - EVT_IF_EQ(LVar3, EVENT_15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim04) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_ADD(LVar4, 10) - EVT_ADD(LVar5, 5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 10, 0) - EVT_END_IF - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_LOOP(20) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorType, ACTOR_SELF, ACTOR_TYPE_MAGIKOOPA) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(StatusTable))) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 32) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(GetIndexFromPos, ACTOR_SELF, LVar0) - EVT_MOD(LVar0, 4) - EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVar0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, LVar0) + IfEq(LVar0, 1) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim04) + Goto(0) + EndIf + Call(GetLastElement, LVar0) + IfFlag(LVar0, DAMAGE_TYPE_POW) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim04) + Goto(0) + EndIf + Return + Label(0) + Call(HideHealthBar, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartScale, ACTOR_SELF, PRT_BROOM, Float(0.4), Float(0.4), Float(0.4)) + EndIf + Call(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar2, 1) + Call(SetPartPos, ACTOR_SELF, PRT_BROOM, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(N(StartRumbleWithParams), 150, 10) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.7)) + EndThread + Call(GetLastEvent, ACTOR_SELF, LVar3) + IfEq(LVar3, EVENT_15) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim04) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Add(LVar4, 10) + Add(LVar5, 5) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, Float(1.0), 10, 0) + EndIf + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Loop(20) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorType, ACTOR_SELF, ACTOR_TYPE_MAGIKOOPA) + Call(SetStatusTable, ACTOR_SELF, Ref(N(StatusTable))) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 32) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(GetIndexFromPos, ACTOR_SELF, LVar0) + Mod(LVar0, 4) + Call(SetGoalToIndex, ACTOR_SELF, LVar0) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Return + End }; EvtScript N(EVS_Flee) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_IF_NE(LVar0, EVENT_SCARE_AWAY) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_01) - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_WAIT(10) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 200) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(YieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_EXEC_WAIT(EVS_ForceNextTarget) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(HideHealthBar, ACTOR_SELF) + Call(GetLastEvent, ACTOR_SELF, LVar0) + IfNe(LVar0, EVENT_SCARE_AWAY) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_PRESET_01) + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(1.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Wait(10) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetActorSpeed, ACTOR_SELF, Float(10.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 200) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(YieldTurn) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ExecWait(EVS_ForceNextTarget) + Call(HideHealthBar, ACTOR_SELF) + Call(RemoveActor, ACTOR_SELF) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) - EVT_BITWISE_AND_CONST(LVar0, ~AVAL_HitType_Combo) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) + BitwiseAndConst(LVar0, ~AVAL_HitType_Combo) + Call(SetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) + Return + End }; EvtScript N(EVS_Init) = { - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsClone, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HealAllCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HealOneCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_AttackBoostCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_DefenseBoostCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ElectrifyCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TransparifyCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CloneActorID, -1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_None) - EVT_RETURN - EVT_END + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar0) + IfEq(LVar0, 0) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_IsClone, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_HealAllCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_HealOneCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_AttackBoostCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_DefenseBoostCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_ElectrifyCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_TransparifyCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_CloneActorID, -1) + Call(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_None) + Return + End }; EvtScript N(EVS_Flying_Init) = { - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_Flying_HandleEvent))) - EVT_CALL(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsClone, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HealAllCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HealOneCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_AttackBoostCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_DefenseBoostCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ElectrifyCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_TransparifyCount, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CloneActorID, -1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_None) - EVT_RETURN - EVT_END + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_Flying_HandleEvent))) + Call(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar0) + IfEq(LVar0, 0) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_IsClone, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_HealAllCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_HealOneCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_AttackBoostCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_DefenseBoostCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_ElectrifyCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_TransparifyCount, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_CloneActorID, -1) + Call(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_None) + Return + End }; EvtScript N(EVS_RemoveClone) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsClone, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CloneActorID, LVar0) - EVT_CALL(ActorExists, LVar0, LVar1) - EVT_IF_EQ(LVar1, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) - EVT_CALL(GetLastElement, LVarA) - EVT_IF_FLAG(LVarA, DAMAGE_TYPE_MULTIPLE_POPUPS) - EVT_LABEL(0) - EVT_CALL(GetBattleFlags, LVarA) - EVT_IF_FLAG(LVarA, BS_FLAGS1_EXECUTING_MOVE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CloneActorID, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CloneActorID, -1) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, ACTOR_FLAG_FLYING) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_FLYING, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_ELSE - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_GROUND, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) - EVT_END_IF - EVT_CALL(GetActorPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(RemoveActor, LVar0) - EVT_THREAD - EVT_ADD(LVar3, 2) - EVT_LOOP(2) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0) - EVT_WAIT(2) - EVT_END_LOOP - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_IsClone, LVar0) + IfEq(LVar0, 1) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_CloneActorID, LVar0) + Call(ActorExists, LVar0, LVar1) + IfEq(LVar1, 0) + Return + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) + Call(GetLastElement, LVarA) + IfFlag(LVarA, DAMAGE_TYPE_MULTIPLE_POPUPS) + Label(0) + Call(GetBattleFlags, LVarA) + IfFlag(LVarA, BS_FLAGS1_EXECUTING_MOVE) + Wait(1) + Goto(0) + EndIf + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_CloneActorID, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_CloneActorID, -1) + Call(GetActorFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, ACTOR_FLAG_FLYING) + Call(SetPartEventBits, ACTOR_SELF, PRT_FLYING, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + Else + Call(SetPartEventBits, ACTOR_SELF, PRT_GROUND, ACTOR_EVENT_FLAG_ATTACK_CHARGED, FALSE) + EndIf + Call(GetActorPos, LVar0, LVar1, LVar2, LVar3) + Call(RemoveActor, LVar0) + Thread + Add(LVar3, 2) + Loop(2) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar1, LVar2, LVar3, 0, 0, 0, 0, 0) + Wait(2) + EndLoop + EndThread + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AVAL_HitType_Combo) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CASE_OR_EQ(EVENT_UP_AND_AWAY) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim05) - EVT_SET_CONST(LVar2, ANIM_Magikoopa_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim05) - EVT_SET_CONST(LVar2, ANIM_Magikoopa_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_ZERO_DAMAGE) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) - EVT_IF_FLAG(LVar0, AVAL_HitType_Combo) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_END_IF - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim04) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, 0, 2, 0) - EVT_ELSE - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, -4, 5, 0) - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(EVENT_STAR_BEAM) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + Call(GetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) + BitwiseOrConst(LVar0, AVAL_HitType_Combo) + Call(SetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim04) + ExecWait(EVS_Enemy_Hit) + CaseOrEq(EVENT_HIT) + CaseOrEq(EVENT_UP_AND_AWAY) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim04) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_RemoveClone)) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim05) + SetConst(LVar2, ANIM_Magikoopa_Anim06) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_RemoveClone)) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim05) + SetConst(LVar2, ANIM_Magikoopa_Anim06) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_RemoveClone)) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim06) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + ExecWait(N(EVS_RemoveClone)) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + ExecWait(N(EVS_RemoveClone)) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_ZERO_DAMAGE) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + Call(GetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) + IfFlag(LVar0, AVAL_HitType_Combo) + ExecWait(N(EVS_RemoveClone)) + Return + EndIf + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNe(LVar0, 0) + ExecWait(N(EVS_RemoveClone)) + EndIf + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim04) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_RemoveClone)) + Wait(10) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + ExecWait(N(EVS_RemoveClone)) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim04) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) + ExecWait(N(EVS_Flee)) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim02) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + ExecWait(N(EVS_RemoveClone)) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, 0, 2, 0) + Else + Call(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, -4, 5, 0) + EndIf + EndIf + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim04) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(EVENT_STAR_BEAM) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Anim04) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_RemoveClone)) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Flying_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_FLYING, 255) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) - EVT_BITWISE_OR_CONST(LVar0, AVAL_HitType_Combo) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) - EVT_EXEC_WAIT(N(EVS_KnockDownCheck)) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CASE_OR_EQ(EVENT_FALL_TRIGGER) - EVT_EXEC_WAIT(N(EVS_KnockDownCheck)) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_UP_AND_AWAY) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_CASE_OR_EQ(EVENT_BURN_HIT) - EVT_CASE_OR_EQ(EVENT_15) - EVT_EXEC_WAIT(N(EVS_KnockDownCheck)) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim05) - EVT_SET_CONST(LVar2, ANIM_FlyingMagikoopa_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim05) - EVT_SET_CONST(LVar2, ANIM_FlyingMagikoopa_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_ZERO_DAMAGE) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) - EVT_IF_FLAG(LVar0, AVAL_HitType_Combo) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_END_IF - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0) - EVT_CALL(HPBarToCurrent, ACTOR_SELF) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim04) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -3, 0, 0) - EVT_ELSE - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -15, 0, 0) - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(EVENT_STAR_BEAM) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_RemoveClone)) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetPartAlpha, ACTOR_SELF, PRT_FLYING, 255) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + Call(GetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) + BitwiseOrConst(LVar0, AVAL_HitType_Combo) + Call(SetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) + ExecWait(N(EVS_KnockDownCheck)) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim04) + ExecWait(EVS_Enemy_Hit) + CaseOrEq(EVENT_HIT) + CaseOrEq(EVENT_FALL_TRIGGER) + ExecWait(N(EVS_KnockDownCheck)) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim04) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_RemoveClone)) + ExecWait(N(EVS_KnockDown)) + EndCaseGroup + CaseEq(EVENT_UP_AND_AWAY) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim04) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_RemoveClone)) + CaseOrEq(EVENT_BURN_HIT) + CaseOrEq(EVENT_15) + ExecWait(N(EVS_KnockDownCheck)) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim05) + SetConst(LVar2, ANIM_FlyingMagikoopa_Anim06) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_RemoveClone)) + ExecWait(N(EVS_KnockDown)) + EndCaseGroup + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim05) + SetConst(LVar2, ANIM_FlyingMagikoopa_Anim06) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_RemoveClone)) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim06) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + ExecWait(N(EVS_RemoveClone)) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + ExecWait(N(EVS_RemoveClone)) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_ZERO_DAMAGE) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + Call(GetActorVar, ACTOR_SELF, AVAR_HitTypeFlags, LVar0) + IfFlag(LVar0, AVAL_HitType_Combo) + ExecWait(N(EVS_RemoveClone)) + Return + EndIf + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNe(LVar0, 0) + ExecWait(N(EVS_RemoveClone)) + EndIf + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim04) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_RemoveClone)) + Wait(10) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + Call(SetActorPos, ACTOR_SELF, 20, 0, 0) + Call(HPBarToCurrent, ACTOR_SELF) + CaseEq(EVENT_END_FIRST_STRIKE) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + ExecWait(N(EVS_RemoveClone)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim04) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) + ExecWait(N(EVS_Flee)) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim02) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + ExecWait(N(EVS_RemoveClone)) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -3, 0, 0) + Else + Call(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -15, 0, 0) + EndIf + EndIf + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim04) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(EVENT_STAR_BEAM) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Anim04) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_RemoveClone)) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; // (in) LVarB: actorID to heal EvtScript N(EVS_Move_HealOne) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_HealOne) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_HealOneCount, 1) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 6) - EVT_ADD(LVar1, 12) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 16) - EVT_ADD(LVar1, 31) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 12) - EVT_ADD(LVar1, 14) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 36) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) - EVT_END_IF - EVT_WAIT(5) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, LVarB, SOUND_RECOVER_HEART) - EVT_CALL(PlaySoundAtActor, LVarB, SOUND_HEART_BOUNCE) - EVT_WAIT(30) - EVT_CALL(PlaySoundAtActor, LVarB, SOUND_STAR_BOUNCE_A) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(HealActor, LVarB, HEAL_AMT_ONE, FALSE) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_CALL(WaitForBuffDone) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_HealOne) + Call(AddActorVar, ACTOR_SELF, AVAR_HealOneCount, 1) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) + EndIf + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 6) + Add(LVar1, 12) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 16) + Add(LVar1, 31) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 12) + Add(LVar1, 14) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 30) + Add(LVar1, 36) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + EndIf + Wait(30) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) + EndIf + Wait(5) + Thread + Wait(5) + Call(PlaySoundAtActor, LVarB, SOUND_RECOVER_HEART) + Call(PlaySoundAtActor, LVarB, SOUND_HEART_BOUNCE) + Wait(30) + Call(PlaySoundAtActor, LVarB, SOUND_STAR_BOUNCE_A) + EndThread + Thread + Call(FreezeBattleState, TRUE) + Call(HealActor, LVarB, HEAL_AMT_ONE, FALSE) + Call(FreezeBattleState, FALSE) + EndThread + Call(WaitForBuffDone) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Wait(10) + Call(YieldTurn) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Move_HealAll) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_HealAll) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_HealAllCount, 1) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 6) - EVT_ADD(LVar1, 12) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 16) - EVT_ADD(LVar1, 31) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 12) - EVT_ADD(LVar1, 14) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 36) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetOriginalActorType, LVar0, LVar1) - EVT_IF_EQ(LVar1, ACTOR_TYPE_DRY_BONES) - EVT_CALL(GetActorVar, LVar0, AVAR_DryBones_Collapsed, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, LVar0, SOUND_RECOVER_HEART) - EVT_CALL(PlaySoundAtActor, LVar0, SOUND_HEART_BOUNCE) - EVT_WAIT(30) - EVT_CALL(PlaySoundAtActor, LVar0, SOUND_STAR_BOUNCE_A) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(HealActor, LVar0, HEAL_AMT_ALL, TRUE) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(WaitForBuffDone) - EVT_WAIT(1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_HealAll) + Call(AddActorVar, ACTOR_SELF, AVAR_HealAllCount, 1) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) + EndIf + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 6) + Add(LVar1, 12) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 16) + Add(LVar1, 31) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 12) + Add(LVar1, 14) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 30) + Add(LVar1, 36) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + EndIf + Wait(30) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) + EndIf + Wait(5) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Set(LFlag0, FALSE) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetOriginalActorType, LVar0, LVar1) + IfEq(LVar1, ACTOR_TYPE_DRY_BONES) + Call(GetActorVar, LVar0, AVAR_DryBones_Collapsed, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + EndIf + EndIf + IfEq(LFlag0, FALSE) + Thread + Wait(5) + Call(PlaySoundAtActor, LVar0, SOUND_RECOVER_HEART) + Call(PlaySoundAtActor, LVar0, SOUND_HEART_BOUNCE) + Wait(30) + Call(PlaySoundAtActor, LVar0, SOUND_STAR_BOUNCE_A) + EndThread + Thread + Call(FreezeBattleState, TRUE) + Call(HealActor, LVar0, HEAL_AMT_ALL, TRUE) + Call(FreezeBattleState, FALSE) + EndThread + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Call(WaitForBuffDone) + Wait(1) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Wait(10) + Call(YieldTurn) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_MagicBlast) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_MagicBlast) - EVT_SET(LFlag0, FALSE) - EVT_SET(LFlag1, FALSE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_SET(LFlag0, TRUE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CloneActorID, LVarA) - EVT_END_IF - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_SET(LFlag1, TRUE) - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, LVarA, FALSE) - EVT_END_IF - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 1) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) - EVT_IF_EQ(LFlag1, FALSE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_Magikoopa_Anim02) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 17) - EVT_ADD(LVar1, 33) - EVT_PLAY_EFFECT(EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.5), 30, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 6) - EVT_ADD(LVar1, 13) - EVT_ELSE - EVT_SUB(LVar0, 17) - EVT_ADD(LVar1, 33) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.5), 30, 0) - EVT_ELSE - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_FlyingMagikoopa_Anim02) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 36) - EVT_PLAY_EFFECT(EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.5), 30, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 12) - EVT_ADD(LVar1, 14) - EVT_ELSE - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 36) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.5), 30, 0) - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar9, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar9) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(PlaySoundAtActor, LVarA, SOUND_SPELL_CAST2) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) - EVT_IF_EQ(LFlag1, FALSE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_Magikoopa_Anim03) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim03) - EVT_ELSE - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_FlyingMagikoopa_Anim03) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim03) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_SUB(LVar4, 50) - EVT_SET(LVar5, 0) - EVT_IF_EQ(LFlag1, FALSE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 30) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 8) - EVT_ADD(LVar1, 8) - EVT_ELSE - EVT_SUB(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_END_IF - EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 30) - EVT_ELSE - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 30) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 8) - EVT_ADD(LVar1, 8) - EVT_ELSE - EVT_SUB(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_END_IF - EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 30) - EVT_END_IF - EVT_WAIT(50) - EVT_IF_EQ(LVar9, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(YieldTurn) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, LVarA, TRUE) - EVT_END_IF - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(PlaySoundAtActor, LVarA, SOUND_SPELL_CAST2) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) - EVT_IF_EQ(LFlag1, FALSE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_Magikoopa_Anim03) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim03) - EVT_ELSE - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_FlyingMagikoopa_Anim03) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim03) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_IF_EQ(LFlag1, FALSE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 20) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 8) - EVT_ADD(LVar1, 8) - EVT_ELSE - EVT_SUB(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_END_IF - EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 20) - EVT_ELSE - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 20) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 8) - EVT_ADD(LVar1, 8) - EVT_ELSE - EVT_SUB(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_END_IF - EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 20) - EVT_END_IF - EVT_WAIT(18) - EVT_IF_EQ(LFlag0, TRUE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_MAGIC_BLAST, BS_FLAGS1_TRIGGER_EVENTS) - EVT_ELSE - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_MAGIC_BLAST, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_IF - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_WAIT(20) - EVT_CALL(YieldTurn) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, LVarA, TRUE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_MagicBlast) + Set(LFlag0, FALSE) + Set(LFlag1, FALSE) + Call(GetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, LVar0) + IfEq(LVar0, 1) + Set(LFlag0, TRUE) + Call(GetActorVar, ACTOR_SELF, AVAR_CloneActorID, LVarA) + EndIf + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, ACTOR_FLAG_FLYING) + Set(LFlag1, TRUE) + EndIf + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, LVarA, FALSE) + EndIf + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 1) + Else + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) + IfEq(LFlag1, FALSE) + IfEq(LFlag0, TRUE) + Call(SetAnimation, LVarA, 1, ANIM_Magikoopa_Anim02) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Sub(LVar0, 17) + Add(LVar1, 33) + PlayEffect(EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, Float(0.5), 30, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + Sub(LVar0, 6) + Add(LVar1, 13) + Else + Sub(LVar0, 17) + Add(LVar1, 33) + EndIf + PlayEffect(EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, Float(0.5), 30, 0) + Else + IfEq(LFlag0, TRUE) + Call(SetAnimation, LVarA, 1, ANIM_FlyingMagikoopa_Anim02) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Add(LVar1, 36) + PlayEffect(EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, Float(0.5), 30, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + Sub(LVar0, 12) + Add(LVar1, 14) + Else + Sub(LVar0, 30) + Add(LVar1, 36) + EndIf + PlayEffect(EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, Float(0.5), 30, 0) + EndIf + Wait(30) + Call(EnemyTestTarget, ACTOR_SELF, LVar9, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar9) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + IfEq(LFlag0, TRUE) + Call(PlaySoundAtActor, LVarA, SOUND_SPELL_CAST2) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) + IfEq(LFlag1, FALSE) + IfEq(LFlag0, TRUE) + Call(SetAnimation, LVarA, 1, ANIM_Magikoopa_Anim03) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim03) + Else + IfEq(LFlag0, TRUE) + Call(SetAnimation, LVarA, 1, ANIM_FlyingMagikoopa_Anim03) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim03) + EndIf + Wait(5) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Sub(LVar4, 50) + Set(LVar5, 0) + IfEq(LFlag1, FALSE) + IfEq(LFlag0, TRUE) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Add(LVar1, 20) + Call(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 30) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + Sub(LVar0, 8) + Add(LVar1, 8) + Else + Sub(LVar0, 20) + Add(LVar1, 20) + EndIf + Call(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 30) + Else + IfEq(LFlag0, TRUE) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Add(LVar1, 20) + Call(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 30) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + Sub(LVar0, 8) + Add(LVar1, 8) + Else + Sub(LVar0, 20) + Add(LVar1, 20) + EndIf + Call(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 30) + EndIf + Wait(50) + IfEq(LVar9, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(15) + Call(YieldTurn) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, LVarA, TRUE) + EndIf + Return + EndCaseGroup + EndSwitch + IfEq(LFlag0, TRUE) + Call(PlaySoundAtActor, LVarA, SOUND_SPELL_CAST2) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) + IfEq(LFlag1, FALSE) + IfEq(LFlag0, TRUE) + Call(SetAnimation, LVarA, 1, ANIM_Magikoopa_Anim03) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim03) + Else + IfEq(LFlag0, TRUE) + Call(SetAnimation, LVarA, 1, ANIM_FlyingMagikoopa_Anim03) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim03) + EndIf + Wait(5) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + IfEq(LFlag1, FALSE) + IfEq(LFlag0, TRUE) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Add(LVar1, 20) + Call(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 20) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + Sub(LVar0, 8) + Add(LVar1, 8) + Else + Sub(LVar0, 20) + Add(LVar1, 20) + EndIf + Call(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 20) + Else + IfEq(LFlag0, TRUE) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Add(LVar1, 20) + Call(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 20) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + Sub(LVar0, 8) + Add(LVar1, 8) + Else + Sub(LVar0, 20) + Add(LVar1, 20) + EndIf + Call(N(ShrinkActor), LVar0, LVar1, LVar6, LVar4, LVar5, LVar6, 20) + EndIf + Wait(18) + IfEq(LFlag0, TRUE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_MAGIC_BLAST, BS_FLAGS1_TRIGGER_EVENTS) + Else + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_MAGIC_BLAST, BS_FLAGS1_TRIGGER_EVENTS) + EndIf + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Wait(20) + Call(YieldTurn) + EndCaseGroup + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, LVarA, TRUE) + EndIf + Return + End }; EvtScript N(EVS_GetAvailableColumn) = { - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetIndexFromHome, LVar0, LVar1) - EVT_MOD(LVar1, 4) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_SET(LFlagB, TRUE) - EVT_CASE_EQ(1) - EVT_SET(LFlagC, TRUE) - EVT_CASE_EQ(2) - EVT_SET(LFlagD, TRUE) - EVT_CASE_EQ(3) - EVT_SET(LFlagE, TRUE) - EVT_END_SWITCH - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_SET(LVar0, -1) - EVT_CALL(GetIndexFromHome, ACTOR_SELF, LVar1) - EVT_MOD(LVar1, 4) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_IF_EQ(LFlagC, FALSE) - EVT_SET(LVar0, 1) - EVT_END_IF - EVT_CASE_EQ(1) - EVT_IF_EQ(LFlagB, FALSE) - EVT_SET(LVar0, 0) - EVT_END_IF - EVT_IF_EQ(LFlagD, FALSE) - EVT_SET(LVar0, 2) - EVT_END_IF - EVT_CASE_EQ(2) - EVT_IF_EQ(LFlagC, FALSE) - EVT_SET(LVar0, 1) - EVT_END_IF - EVT_IF_EQ(LFlagE, FALSE) - EVT_SET(LVar0, 3) - EVT_END_IF - EVT_CASE_EQ(3) - EVT_IF_EQ(LFlagD, FALSE) - EVT_SET(LVar0, 2) - EVT_END_IF - EVT_END_SWITCH - EVT_IF_NE(LVar0, -1) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, ACTOR_FLAG_FLYING) - EVT_ADD(LVar0, 4) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetIndexFromHome, LVar0, LVar1) + Mod(LVar1, 4) + Switch(LVar1) + CaseEq(0) + Set(LFlagB, TRUE) + CaseEq(1) + Set(LFlagC, TRUE) + CaseEq(2) + Set(LFlagD, TRUE) + CaseEq(3) + Set(LFlagE, TRUE) + EndSwitch + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Set(LVar0, -1) + Call(GetIndexFromHome, ACTOR_SELF, LVar1) + Mod(LVar1, 4) + Switch(LVar1) + CaseEq(0) + IfEq(LFlagC, FALSE) + Set(LVar0, 1) + EndIf + CaseEq(1) + IfEq(LFlagB, FALSE) + Set(LVar0, 0) + EndIf + IfEq(LFlagD, FALSE) + Set(LVar0, 2) + EndIf + CaseEq(2) + IfEq(LFlagC, FALSE) + Set(LVar0, 1) + EndIf + IfEq(LFlagE, FALSE) + Set(LVar0, 3) + EndIf + CaseEq(3) + IfEq(LFlagD, FALSE) + Set(LVar0, 2) + EndIf + EndSwitch + IfNe(LVar0, -1) + Call(GetActorFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, ACTOR_FLAG_FLYING) + Add(LVar0, 4) + EndIf + EndIf + Return + End }; EvtScript N(EVS_Clone_HandleEvent) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_Clone_Init) = { - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_Clone_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsClone, TRUE) - EVT_RETURN - EVT_END + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_Clone_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_IsClone, TRUE) + Return + End }; EvtScript N(EVS_FlyingClone_Init) = { - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_Clone_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsClone, TRUE) - EVT_RETURN - EVT_END + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_Clone_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_IsClone, TRUE) + Return + End }; s32 N(CloneDefense)[] = { @@ -1429,557 +1429,557 @@ Formation N(FlyingCloneFormation) = { }; EvtScript N(EVS_Move_MakeClone) = { - EVT_CALL(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_MakeClone) - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SummonEnemy, EVT_PTR(N(CloneFormation)), FALSE) - EVT_ELSE - EVT_CALL(SummonEnemy, EVT_PTR(N(FlyingCloneFormation)), FALSE) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CloneActorID, LVar0) - EVT_SET(LVarA, LVar0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(EnableIdleScript, LVarA, IDLE_SCRIPT_DISABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(UseIdleAnimation, LVarA, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 25) - EVT_WAIT(25) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST3) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_Magikoopa_Anim02) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 23) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) - EVT_CALL(SetAnimation, LVarA, 1, ANIM_FlyingMagikoopa_Anim02) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 23) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 1, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 30, 0) - EVT_WAIT(10) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(EnableIdleScript, LVar9, IDLE_SCRIPT_ENABLE) - EVT_WAIT(30) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, -3) - EVT_CALL(SetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_SET(LVar9, LVarA) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST4) - EVT_CALL(PlaySoundAtActor, LVar9, SOUND_SPELL_CAST4) - EVT_CALL(SetPartFlagBits, LVar9, 1, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 500) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_EXEC_WAIT(N(EVS_GetAvailableColumn)) - EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVar0) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 0, EASING_LINEAR) - EVT_ELSE - EVT_CALL(SetActorSpeed, LVar9, EVT_FLOAT(2.0)) - EVT_EXEC_WAIT(N(EVS_GetAvailableColumn)) - EVT_CALL(SetGoalToIndex, LVar9, LVar0) - EVT_CALL(FlyToGoal, LVar9, 0, 0, EASING_LINEAR) - EVT_END_IF - EVT_CALL(SetPartFlagBits, LVar9, 1, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_CALL(SetEnemyHP, LVar9, LVar0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(GetActorPos, LVar9, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, LVar9, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, LVar9) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_GROUND, ACTOR_EVENT_FLAG_ATTACK_CHARGED, TRUE) - EVT_ELSE - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_FLYING, ACTOR_EVENT_FLAG_ATTACK_CHARGED, TRUE) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) - EVT_CALL(SetAnimation, LVar9, 1, ANIM_Magikoopa_Anim01) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) - EVT_CALL(SetAnimation, LVar9, 1, ANIM_FlyingMagikoopa_Anim01) - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_CALL(UseIdleAnimation, LVar9, TRUE) - EVT_RETURN - EVT_END + Call(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) + IfEq(LVar0, 1) + ExecWait(N(EVS_Flee)) + Return + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_MakeClone) + Set(LFlag0, FALSE) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, ACTOR_FLAG_FLYING) + Set(LFlag0, TRUE) + EndIf + IfEq(LFlag0, FALSE) + Call(SummonEnemy, Ref(N(CloneFormation)), FALSE) + Else + Call(SummonEnemy, Ref(N(FlyingCloneFormation)), FALSE) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_CloneActorID, LVar0) + Set(LVarA, LVar0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(EnableIdleScript, LVarA, IDLE_SCRIPT_DISABLE) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(UseIdleAnimation, LVarA, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 25) + Wait(25) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST3) + IfEq(LFlag0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) + Call(SetAnimation, LVarA, 1, ANIM_Magikoopa_Anim02) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 23) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) + Call(SetAnimation, LVarA, 1, ANIM_FlyingMagikoopa_Anim02) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 23) + EndIf + PlayEffect(EFFECT_ENERGY_IN_OUT, 1, LVar0, LVar1, LVar2, Float(1.0), 30, 0) + Wait(10) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(EnableIdleScript, LVar9, IDLE_SCRIPT_ENABLE) + Wait(30) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar2, -3) + Call(SetActorPos, LVarA, LVar0, LVar1, LVar2) + Set(LVar9, LVarA) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST4) + Call(PlaySoundAtActor, LVar9, SOUND_SPELL_CAST4) + Call(SetPartFlagBits, LVar9, 1, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 500) + Call(SetActorSpeed, ACTOR_SELF, Float(2.0)) + ExecWait(N(EVS_GetAvailableColumn)) + Call(SetGoalToIndex, ACTOR_SELF, LVar0) + Call(FlyToGoal, ACTOR_SELF, 0, 0, EASING_LINEAR) + Else + Call(SetActorSpeed, LVar9, Float(2.0)) + ExecWait(N(EVS_GetAvailableColumn)) + Call(SetGoalToIndex, LVar9, LVar0) + Call(FlyToGoal, LVar9, 0, 0, EASING_LINEAR) + EndIf + Call(SetPartFlagBits, LVar9, 1, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) + Call(GetActorHP, ACTOR_SELF, LVar0) + Call(SetEnemyHP, LVar9, LVar0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Call(GetActorPos, LVar9, LVar0, LVar1, LVar2) + Call(ForceHomePos, LVar9, LVar0, LVar1, LVar2) + Call(HPBarToHome, LVar9) + IfEq(LFlag0, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_GROUND, ACTOR_EVENT_FLAG_ATTACK_CHARGED, TRUE) + Else + Call(SetPartEventBits, ACTOR_SELF, PRT_FLYING, ACTOR_EVENT_FLAG_ATTACK_CHARGED, TRUE) + EndIf + IfEq(LFlag0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) + Call(SetAnimation, LVar9, 1, ANIM_Magikoopa_Anim01) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) + Call(SetAnimation, LVar9, 1, ANIM_FlyingMagikoopa_Anim01) + EndIf + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Call(UseIdleAnimation, LVar9, TRUE) + Return + End }; #include "common/battle/CheckMagikoopaCastTarget.inc.c" EvtScript N(EVS_Move_TryBoostAttack) = { - EVT_SET(LFlag0, FALSE) - EVT_LABEL(10) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetIndexFromHome, LVar0, LVar1) - EVT_CALL(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar2) - EVT_IF_GT(LVar1, LVar2) - EVT_CALL(N(CheckMagikoopaCastTarget), LVar0, LVar3) - EVT_IF_EQ(LVar3, 0) - EVT_CALL(GetActorAttackBoost, LVar0, LVar4) - EVT_IF_LT(LVar4, MAX_ATTACK_BOOST) - EVT_SET(LVar8, LVar0) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar1) - EVT_GOTO(100) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_SET(LFlag0, TRUE) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_Attack_MagicBlast)) - EVT_RETURN + Set(LFlag0, FALSE) + Label(10) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetIndexFromHome, LVar0, LVar1) + Call(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar2) + IfGt(LVar1, LVar2) + Call(N(CheckMagikoopaCastTarget), LVar0, LVar3) + IfEq(LVar3, 0) + Call(GetActorAttackBoost, LVar0, LVar4) + IfLt(LVar4, MAX_ATTACK_BOOST) + Set(LVar8, LVar0) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar1) + Goto(100) + EndIf + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + IfEq(LFlag0, FALSE) + Set(LFlag0, TRUE) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) + Goto(10) + EndIf + Call(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) + IfEq(LVar0, 1) + ExecWait(N(EVS_Flee)) + Return + EndIf + ExecWait(N(EVS_Attack_MagicBlast)) + Return // found target - EVT_LABEL(100) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_BoostAttack) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_AttackBoostCount, 1) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 6) - EVT_ADD(LVar1, 12) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 16) - EVT_ADD(LVar1, 31) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 12) - EVT_ADD(LVar1, 14) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 36) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) - EVT_END_IF - EVT_WAIT(5) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, LVar8, SOUND_MAGIKOOPA_POWER_UP) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(BoostAttack, LVar8, ATTACK_BOOST_AMT) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_CALL(WaitForBuffDone) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Label(100) + Call(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_BoostAttack) + Call(AddActorVar, ACTOR_SELF, AVAR_AttackBoostCount, 1) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) + EndIf + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 6) + Add(LVar1, 12) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 16) + Add(LVar1, 31) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 12) + Add(LVar1, 14) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 30) + Add(LVar1, 36) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + EndIf + Wait(30) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) + EndIf + Wait(5) + Thread + Wait(10) + Call(PlaySoundAtActor, LVar8, SOUND_MAGIKOOPA_POWER_UP) + EndThread + Thread + Call(FreezeBattleState, TRUE) + Call(BoostAttack, LVar8, ATTACK_BOOST_AMT) + Call(FreezeBattleState, FALSE) + EndThread + Call(WaitForBuffDone) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(10) + Call(YieldTurn) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Move_TryBoostDefense) = { - EVT_SET(LFlag0, FALSE) - EVT_LABEL(10) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetIndexFromHome, LVar0, LVar1) - EVT_CALL(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar2) - EVT_IF_GT(LVar1, LVar2) - EVT_CALL(N(CheckMagikoopaCastTarget), LVar0, LVar3) - EVT_IF_EQ(LVar3, 0) - EVT_CALL(GetActorDefenseBoost, LVar0, LVar4) - EVT_IF_LT(LVar4, MAX_DEFENSE_BOOST) - EVT_SET(LVar8, LVar0) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar1) - EVT_GOTO(100) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_SET(LFlag0, TRUE) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_Attack_MagicBlast)) - EVT_RETURN + Set(LFlag0, FALSE) + Label(10) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetIndexFromHome, LVar0, LVar1) + Call(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar2) + IfGt(LVar1, LVar2) + Call(N(CheckMagikoopaCastTarget), LVar0, LVar3) + IfEq(LVar3, 0) + Call(GetActorDefenseBoost, LVar0, LVar4) + IfLt(LVar4, MAX_DEFENSE_BOOST) + Set(LVar8, LVar0) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar1) + Goto(100) + EndIf + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + IfEq(LFlag0, FALSE) + Set(LFlag0, TRUE) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) + Goto(10) + EndIf + Call(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) + IfEq(LVar0, 1) + ExecWait(N(EVS_Flee)) + Return + EndIf + ExecWait(N(EVS_Attack_MagicBlast)) + Return // found target - EVT_LABEL(100) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_BoostDefense) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_DefenseBoostCount, 1) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 6) - EVT_ADD(LVar1, 12) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 16) - EVT_ADD(LVar1, 31) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 12) - EVT_ADD(LVar1, 14) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 36) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) - EVT_END_IF - EVT_WAIT(5) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, LVar8, SOUND_MAGIKOOPA_POWER_UP) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(BoostDefense, LVar8, DEFENSE_BOOST_AMT) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_CALL(WaitForBuffDone) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Label(100) + Call(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_BoostDefense) + Call(AddActorVar, ACTOR_SELF, AVAR_DefenseBoostCount, 1) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) + EndIf + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 6) + Add(LVar1, 12) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 16) + Add(LVar1, 31) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 12) + Add(LVar1, 14) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 30) + Add(LVar1, 36) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + EndIf + Wait(30) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) + EndIf + Wait(5) + Thread + Wait(10) + Call(PlaySoundAtActor, LVar8, SOUND_MAGIKOOPA_POWER_UP) + EndThread + Thread + Call(FreezeBattleState, TRUE) + Call(BoostDefense, LVar8, DEFENSE_BOOST_AMT) + Call(FreezeBattleState, FALSE) + EndThread + Call(WaitForBuffDone) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(10) + Call(YieldTurn) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Move_TryElectrify) = { - EVT_SET(LFlag0, FALSE) - EVT_LABEL(10) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetIndexFromHome, LVar0, LVar1) - EVT_CALL(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar2) - EVT_IF_GT(LVar1, LVar2) - EVT_CALL(N(CheckMagikoopaCastTarget), LVar0, LVar3) - EVT_IF_EQ(LVar3, 0) - EVT_CALL(GetStatusFlags, LVar0, LVar4) - EVT_IF_NOT_FLAG(LVar4, STATUS_FLAG_STATIC | STATUS_FLAG_TRANSPARENT) - EVT_SET(LVar8, LVar0) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar1) - EVT_GOTO(100) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_SET(LFlag0, TRUE) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_Attack_MagicBlast)) - EVT_RETURN + Set(LFlag0, FALSE) + Label(10) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetIndexFromHome, LVar0, LVar1) + Call(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar2) + IfGt(LVar1, LVar2) + Call(N(CheckMagikoopaCastTarget), LVar0, LVar3) + IfEq(LVar3, 0) + Call(GetStatusFlags, LVar0, LVar4) + IfNotFlag(LVar4, STATUS_FLAG_STATIC | STATUS_FLAG_TRANSPARENT) + Set(LVar8, LVar0) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar1) + Goto(100) + EndIf + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + IfEq(LFlag0, FALSE) + Set(LFlag0, TRUE) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) + Goto(10) + EndIf + Call(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) + IfEq(LVar0, 1) + ExecWait(N(EVS_Flee)) + Return + EndIf + ExecWait(N(EVS_Attack_MagicBlast)) + Return // found target - EVT_LABEL(100) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_Electrify) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_ElectrifyCount, 1) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_ELECTRIFY) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 6) - EVT_ADD(LVar1, 12) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 16) - EVT_ADD(LVar1, 31) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 12) - EVT_ADD(LVar1, 14) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 36) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) - EVT_END_IF - EVT_WAIT(5) - EVT_THREAD - EVT_WAIT(10) - EVT_LOOP(4) - EVT_CALL(PlaySoundAtActor, LVar8, SOUND_ELECTRIC_BUZZ) - EVT_CALL(RandInt, 3, LVar0) - EVT_ADD(LVar0, 3) - EVT_WAIT(LVar0) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(ElectrifyActor, LVar8, ELECTRIFY_TURNS) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_CALL(WaitForBuffDone) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Label(100) + Call(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_Electrify) + Call(AddActorVar, ACTOR_SELF, AVAR_ElectrifyCount, 1) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) + EndIf + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_ELECTRIFY) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 6) + Add(LVar1, 12) + Sub(LVar2, 2) + PlayEffect(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 16) + Add(LVar1, 31) + Sub(LVar2, 2) + PlayEffect(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 12) + Add(LVar1, 14) + Sub(LVar2, 2) + PlayEffect(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 30) + Add(LVar1, 36) + Sub(LVar2, 2) + PlayEffect(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + EndIf + Wait(30) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) + EndIf + Wait(5) + Thread + Wait(10) + Loop(4) + Call(PlaySoundAtActor, LVar8, SOUND_ELECTRIC_BUZZ) + Call(RandInt, 3, LVar0) + Add(LVar0, 3) + Wait(LVar0) + EndLoop + EndThread + Thread + Call(FreezeBattleState, TRUE) + Call(ElectrifyActor, LVar8, ELECTRIFY_TURNS) + Call(FreezeBattleState, FALSE) + EndThread + Call(WaitForBuffDone) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(10) + Call(YieldTurn) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Move_TryTransparent) = { - EVT_SET(LFlag0, FALSE) - EVT_LABEL(10) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetIndexFromHome, LVar0, LVar1) - EVT_CALL(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar2) - EVT_IF_GT(LVar1, LVar2) - EVT_CALL(N(CheckMagikoopaCastTarget), LVar0, LVar3) - EVT_IF_EQ(LVar3, 0) - EVT_CALL(GetStatusFlags, LVar0, LVar4) - EVT_IF_NOT_FLAG(LVar4, STATUS_FLAG_STATIC | STATUS_FLAG_TRANSPARENT) - EVT_SET(LVar8, LVar0) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar1) - EVT_GOTO(100) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_SET(LFlag0, TRUE) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_Attack_MagicBlast)) - EVT_RETURN + Set(LFlag0, FALSE) + Label(10) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetIndexFromHome, LVar0, LVar1) + Call(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar2) + IfGt(LVar1, LVar2) + Call(N(CheckMagikoopaCastTarget), LVar0, LVar3) + IfEq(LVar3, 0) + Call(GetStatusFlags, LVar0, LVar4) + IfNotFlag(LVar4, STATUS_FLAG_STATIC | STATUS_FLAG_TRANSPARENT) + Set(LVar8, LVar0) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar1) + Goto(100) + EndIf + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + IfEq(LFlag0, FALSE) + Set(LFlag0, TRUE) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) + Goto(10) + EndIf + Call(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) + IfEq(LVar0, 1) + ExecWait(N(EVS_Flee)) + Return + EndIf + ExecWait(N(EVS_Attack_MagicBlast)) + Return // found target - EVT_LABEL(100) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_Transparify) - EVT_CALL(AddActorVar, ACTOR_SELF, AVAR_TransparifyCount, 1) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 6) - EVT_ADD(LVar1, 12) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 6, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 16) - EVT_ADD(LVar1, 31) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 6, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 12) - EVT_ADD(LVar1, 14) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 6, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 36) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 6, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) - EVT_END_IF - EVT_WAIT(5) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, LVar8, SOUND_MAGIKOOPA_VANISH) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(VanishActor, LVar8, TRANSPARIFY_TURNS) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_CALL(WaitForBuffDone) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Label(100) + Call(SetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_LastMove, AVAL_LastMove_Transparify) + Call(AddActorVar, ACTOR_SELF, AVAR_TransparifyCount, 1) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim02) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim02) + EndIf + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 6) + Add(LVar1, 12) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 6, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 16) + Add(LVar1, 31) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 6, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 12) + Add(LVar1, 14) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 6, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 30) + Add(LVar1, 36) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 6, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + EndIf + Wait(30) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Anim01) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Anim01) + EndIf + Wait(5) + Thread + Wait(10) + Call(PlaySoundAtActor, LVar8, SOUND_MAGIKOOPA_VANISH) + EndThread + Thread + Call(FreezeBattleState, TRUE) + Call(VanishActor, LVar8, TRANSPARIFY_TURNS) + Call(FreezeBattleState, FALSE) + EndThread + Call(WaitForBuffDone) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(10) + Call(YieldTurn) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { @@ -1990,307 +1990,307 @@ EvtScript N(EVS_TakeTurn) = { #define LBL_LOOP_CHOOSE_BEST_HEAL 11 #define LBL_TRY_MOVES 20 #define LBL_CHOOSE_MOVE 123 - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_Attack_MagicBlast)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(LBL_TRY_MOVES) - EVT_END_IF + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + ExecWait(N(EVS_Attack_MagicBlast)) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, LVar0) + IfEq(LVar0, 1) + Goto(LBL_TRY_MOVES) + EndIf // first heal check: count ~75% of actors with less than 25% HP - EVT_SET(LVarA, 0) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(LBL_LOOP_COUNT_INJURED_1) - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetOriginalActorType, LVar0, LVar1) - EVT_IF_EQ(LVar1, ACTOR_TYPE_DRY_BONES) - EVT_CALL(GetActorVar, LVar0, AVAR_DryBones_Collapsed, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_CALL(GetActorHP, LVar0, LVar2) - EVT_CALL(GetEnemyMaxHP, LVar0, LVar3) - EVT_MULF(LVar2, EVT_FLOAT(100.0)) - EVT_DIVF(LVar2, LVar3) - EVT_IF_EQ(LFlag0, FALSE) // collapsed dry bones check - EVT_IF_LE(LVar2, HEAL_THRESHOLD_1) // HP% check - EVT_CALL(RandInt, 99, LVar4) - EVT_ADD(LVar4, 1) - EVT_IF_LT(LVar4, HEAL_CHANCE_1) // chance to ignore actor - EVT_ADD(LVarA, 1) - EVT_SET(LVarB, LVar0) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(LBL_LOOP_COUNT_INJURED_1) - EVT_END_IF - EVT_IF_GT(LVarA, 0) - EVT_GOTO(LBL_TRY_HEALING) - EVT_END_IF + Set(LVarA, 0) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(LBL_LOOP_COUNT_INJURED_1) + Set(LFlag0, FALSE) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetOriginalActorType, LVar0, LVar1) + IfEq(LVar1, ACTOR_TYPE_DRY_BONES) + Call(GetActorVar, LVar0, AVAR_DryBones_Collapsed, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + EndIf + EndIf + Call(GetActorHP, LVar0, LVar2) + Call(GetEnemyMaxHP, LVar0, LVar3) + MulF(LVar2, Float(100.0)) + DivF(LVar2, LVar3) + IfEq(LFlag0, FALSE) // collapsed dry bones check + IfLe(LVar2, HEAL_THRESHOLD_1) // HP% check + Call(RandInt, 99, LVar4) + Add(LVar4, 1) + IfLt(LVar4, HEAL_CHANCE_1) // chance to ignore actor + Add(LVarA, 1) + Set(LVarB, LVar0) + EndIf + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(LBL_LOOP_COUNT_INJURED_1) + EndIf + IfGt(LVarA, 0) + Goto(LBL_TRY_HEALING) + EndIf // second heal check: count ~80% of actors with less than 20% HP - EVT_SET(LVarA, 0) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(LBL_LOOP_COUNT_INJURED_2) - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetOriginalActorType, LVar0, LVar1) - EVT_IF_EQ(LVar1, ACTOR_TYPE_DRY_BONES) - EVT_CALL(GetActorVar, LVar0, AVAR_DryBones_Collapsed, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_CALL(GetActorHP, LVar0, LVar2) - EVT_CALL(GetEnemyMaxHP, LVar0, LVar3) - EVT_MULF(LVar2, EVT_FLOAT(100.0)) - EVT_DIVF(LVar2, LVar3) - EVT_IF_EQ(LFlag0, FALSE) // collapsed dry bones check - EVT_IF_LE(LVar2, HEAL_THRESHOLD_2) // HP% check - EVT_CALL(RandInt, 99, LVar4) - EVT_ADD(LVar4, 1) - EVT_IF_LT(LVar4, HEAL_CHANCE_2) // chance to ignore actor - EVT_ADD(LVarA, 1) - EVT_SET(LVarB, LVar0) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(LBL_LOOP_COUNT_INJURED_2) - EVT_END_IF - EVT_IF_GT(LVarA, 0) - EVT_GOTO(LBL_TRY_HEALING) - EVT_END_IF + Set(LVarA, 0) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(LBL_LOOP_COUNT_INJURED_2) + Set(LFlag0, FALSE) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetOriginalActorType, LVar0, LVar1) + IfEq(LVar1, ACTOR_TYPE_DRY_BONES) + Call(GetActorVar, LVar0, AVAR_DryBones_Collapsed, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + EndIf + EndIf + Call(GetActorHP, LVar0, LVar2) + Call(GetEnemyMaxHP, LVar0, LVar3) + MulF(LVar2, Float(100.0)) + DivF(LVar2, LVar3) + IfEq(LFlag0, FALSE) // collapsed dry bones check + IfLe(LVar2, HEAL_THRESHOLD_2) // HP% check + Call(RandInt, 99, LVar4) + Add(LVar4, 1) + IfLt(LVar4, HEAL_CHANCE_2) // chance to ignore actor + Add(LVarA, 1) + Set(LVarB, LVar0) + EndIf + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(LBL_LOOP_COUNT_INJURED_2) + EndIf + IfGt(LVarA, 0) + Goto(LBL_TRY_HEALING) + EndIf // third heal check: count ~99% of actors with less than 15% HP - EVT_SET(LVarA, 0) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(LBL_LOOP_COUNT_INJURED_3) - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetOriginalActorType, LVar0, LVar1) - EVT_IF_EQ(LVar1, ACTOR_TYPE_DRY_BONES) - EVT_CALL(GetActorVar, LVar0, AVAR_DryBones_Collapsed, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_CALL(GetActorHP, LVar0, LVar2) - EVT_CALL(GetEnemyMaxHP, LVar0, LVar3) - EVT_MULF(LVar2, EVT_FLOAT(100.0)) - EVT_DIVF(LVar2, LVar3) - EVT_IF_EQ(LFlag0, FALSE) // collapsed dry bones check - EVT_IF_LE(LVar2, HEAL_THRESHOLD_3) // HP% check - EVT_CALL(RandInt, 99, LVar4) - EVT_ADD(LVar4, 1) - EVT_IF_LT(LVar4, HEAL_CHANCE_3) // chance to ignore actor - EVT_ADD(LVarA, 1) - EVT_SET(LVarB, LVar0) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(LBL_LOOP_COUNT_INJURED_3) - EVT_END_IF - EVT_IF_GT(LVarA, 0) - EVT_GOTO(LBL_TRY_HEALING) - EVT_END_IF - EVT_GOTO(LBL_TRY_MOVES) + Set(LVarA, 0) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(LBL_LOOP_COUNT_INJURED_3) + Set(LFlag0, FALSE) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetOriginalActorType, LVar0, LVar1) + IfEq(LVar1, ACTOR_TYPE_DRY_BONES) + Call(GetActorVar, LVar0, AVAR_DryBones_Collapsed, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + EndIf + EndIf + Call(GetActorHP, LVar0, LVar2) + Call(GetEnemyMaxHP, LVar0, LVar3) + MulF(LVar2, Float(100.0)) + DivF(LVar2, LVar3) + IfEq(LFlag0, FALSE) // collapsed dry bones check + IfLe(LVar2, HEAL_THRESHOLD_3) // HP% check + Call(RandInt, 99, LVar4) + Add(LVar4, 1) + IfLt(LVar4, HEAL_CHANCE_3) // chance to ignore actor + Add(LVarA, 1) + Set(LVarB, LVar0) + EndIf + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(LBL_LOOP_COUNT_INJURED_3) + EndIf + IfGt(LVarA, 0) + Goto(LBL_TRY_HEALING) + EndIf + Goto(LBL_TRY_MOVES) // try healing spells - EVT_LABEL(LBL_TRY_HEALING) - EVT_CALL(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_END_IF + Label(LBL_TRY_HEALING) + Call(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) + IfEq(LVar0, 1) + ExecWait(N(EVS_Flee)) + Return + EndIf // single healing target available - EVT_IF_EQ(LVarA, 1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HealOneCount, LVar0) - EVT_IF_LT(LVar0, MAX_HEAL_ONE) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, HEAL_ONE_CHANCE) - EVT_EXEC_WAIT(N(EVS_Move_HealOne)) - EVT_RETURN - EVT_END_IF - EVT_ELSE - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HealAllCount, LVar0) - EVT_IF_LT(LVar0, MAX_HEAL_ALL) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, HEAL_ALL_CHANCE) - EVT_EXEC_WAIT(N(EVS_Move_HealAll)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_ELSE + IfEq(LVarA, 1) + Call(GetActorVar, ACTOR_SELF, AVAR_HealOneCount, LVar0) + IfLt(LVar0, MAX_HEAL_ONE) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, HEAL_ONE_CHANCE) + ExecWait(N(EVS_Move_HealOne)) + Return + EndIf + Else + Call(GetActorVar, ACTOR_SELF, AVAR_HealAllCount, LVar0) + IfLt(LVar0, MAX_HEAL_ALL) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, HEAL_ALL_CHANCE) + ExecWait(N(EVS_Move_HealAll)) + Return + EndIf + EndIf + EndIf + Else // multiple injured actors were found - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HealAllCount, LVar0) - EVT_IF_LT(LVar0, MAX_HEAL_ALL) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, HEAL_ALL_CHANCE) - EVT_EXEC_WAIT(N(EVS_Move_HealAll)) - EVT_RETURN - EVT_END_IF - EVT_ELSE + Call(GetActorVar, ACTOR_SELF, AVAR_HealAllCount, LVar0) + IfLt(LVar0, MAX_HEAL_ALL) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, HEAL_ALL_CHANCE) + ExecWait(N(EVS_Move_HealAll)) + Return + EndIf + Else // choose actor with least HP% - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_HealOneCount, LVar0) - EVT_IF_LT(LVar0, MAX_HEAL_ONE) - EVT_SETF(LVar9, EVT_FLOAT(100.0)) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(LBL_LOOP_CHOOSE_BEST_HEAL) - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetOriginalActorType, LVar0, LVar1) - EVT_IF_EQ(LVar1, ACTOR_TYPE_DRY_BONES) - EVT_CALL(GetActorVar, LVar0, AVAR_DryBones_Collapsed, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_CALL(GetActorHP, LVar0, LVar2) - EVT_CALL(GetEnemyMaxHP, LVar0, LVar3) - EVT_MULF(LVar2, EVT_FLOAT(100.0)) - EVT_DIVF(LVar2, LVar3) - EVT_IF_EQ(LFlag0, FALSE) - EVT_IF_LE(LVar2, LVar9) - EVT_SETF(LVar9, LVar2) - EVT_SET(LVarB, LVar0) - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(LBL_LOOP_CHOOSE_BEST_HEAL) - EVT_END_IF - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, HEAL_ONE_CHANCE) - EVT_EXEC_WAIT(N(EVS_Move_HealOne)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF + Call(GetActorVar, ACTOR_SELF, AVAR_HealOneCount, LVar0) + IfLt(LVar0, MAX_HEAL_ONE) + SetF(LVar9, Float(100.0)) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(LBL_LOOP_CHOOSE_BEST_HEAL) + Set(LFlag0, FALSE) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetOriginalActorType, LVar0, LVar1) + IfEq(LVar1, ACTOR_TYPE_DRY_BONES) + Call(GetActorVar, LVar0, AVAR_DryBones_Collapsed, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + EndIf + EndIf + Call(GetActorHP, LVar0, LVar2) + Call(GetEnemyMaxHP, LVar0, LVar3) + MulF(LVar2, Float(100.0)) + DivF(LVar2, LVar3) + IfEq(LFlag0, FALSE) + IfLe(LVar2, LVar9) + SetF(LVar9, LVar2) + Set(LVarB, LVar0) + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(LBL_LOOP_CHOOSE_BEST_HEAL) + EndIf + Call(RandInt, 1000, LVar0) + IfLt(LVar0, HEAL_ONE_CHANCE) + ExecWait(N(EVS_Move_HealOne)) + Return + EndIf + EndIf + EndIf + EndIf // check various buffs and attacks - EVT_LABEL(LBL_TRY_MOVES) - EVT_SET(LVarA, 10) - EVT_SET(LVarB, 10) - EVT_SET(LVarC, 10) - EVT_SET(LVarD, 10) - EVT_SET(LVarE, 10) - EVT_SET(LVarF, 10) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_SET(LVarA, 100) // only magic blast - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 0) - EVT_SET(LVarD, 0) - EVT_SET(LVarE, 0) - EVT_SET(LVarF, 0) - EVT_GOTO(LBL_CHOOSE_MOVE) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_GetAvailableColumn)) - EVT_IF_EQ(LVar0, -1) - EVT_SET(LVarB, 0) - EVT_END_IF - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_SET(LVarB, 0) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_LastMove, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_LastMove_BoostAttack) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_AttackBoostCount, LVar1) - EVT_IF_LT(LVar1, MAX_ATTACK_BOOST) - EVT_CALL(RandInt, 99, LVar0) - EVT_ADD(LVar0, 1) - EVT_IF_LE(LVar0, 50) - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 100) // only boost attack - EVT_SET(LVarD, 0) - EVT_SET(LVarE, 0) - EVT_SET(LVarF, 0) - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(AVAL_LastMove_BoostDefense) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_DefenseBoostCount, LVar1) - EVT_IF_LT(LVar1, MAX_DEFENSE_BOOST) - EVT_CALL(RandInt, 99, LVar0) - EVT_ADD(LVar0, 1) - EVT_IF_LE(LVar0, 50) - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 0) - EVT_SET(LVarD, 100) // only boost defense - EVT_SET(LVarE, 0) - EVT_SET(LVarF, 0) - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH + Label(LBL_TRY_MOVES) + Set(LVarA, 10) + Set(LVarB, 10) + Set(LVarC, 10) + Set(LVarD, 10) + Set(LVarE, 10) + Set(LVarF, 10) + Call(GetActorVar, ACTOR_SELF, AVAR_MadeCloneLastTurn, LVar0) + IfEq(LVar0, 1) + Set(LVarA, 100) // only magic blast + Set(LVarB, 0) + Set(LVarC, 0) + Set(LVarD, 0) + Set(LVarE, 0) + Set(LVarF, 0) + Goto(LBL_CHOOSE_MOVE) + Else + ExecWait(N(EVS_GetAvailableColumn)) + IfEq(LVar0, -1) + Set(LVarB, 0) + EndIf + EndIf + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNe(LVar0, 0) + Set(LVarB, 0) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_LastMove, LVar0) + Switch(LVar0) + CaseEq(AVAL_LastMove_BoostAttack) + Call(GetActorVar, ACTOR_SELF, AVAR_AttackBoostCount, LVar1) + IfLt(LVar1, MAX_ATTACK_BOOST) + Call(RandInt, 99, LVar0) + Add(LVar0, 1) + IfLe(LVar0, 50) + Set(LVarA, 0) + Set(LVarB, 0) + Set(LVarC, 100) // only boost attack + Set(LVarD, 0) + Set(LVarE, 0) + Set(LVarF, 0) + EndIf + EndIf + CaseEq(AVAL_LastMove_BoostDefense) + Call(GetActorVar, ACTOR_SELF, AVAR_DefenseBoostCount, LVar1) + IfLt(LVar1, MAX_DEFENSE_BOOST) + Call(RandInt, 99, LVar0) + Add(LVar0, 1) + IfLe(LVar0, 50) + Set(LVarA, 0) + Set(LVarB, 0) + Set(LVarC, 0) + Set(LVarD, 100) // only boost defense + Set(LVarE, 0) + Set(LVarF, 0) + EndIf + EndIf + EndSwitch // set weights to zero for anything we cant cast anymore - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_AttackBoostCount, LVar0) - EVT_IF_GE(LVar0, MAX_ATTACK_BOOST) - EVT_SET(LVarC, 0) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_DefenseBoostCount, LVar0) - EVT_IF_GE(LVar0, MAX_DEFENSE_BOOST) - EVT_SET(LVarD, 0) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ElectrifyCount, LVar0) - EVT_IF_GE(LVar0, MAX_ELECTRIFY) - EVT_SET(LVarE, 0) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_TransparifyCount, LVar0) - EVT_IF_GE(LVar0, MAX_TRANSPARIFY) - EVT_SET(LVarF, 0) - EVT_END_IF + Call(GetActorVar, ACTOR_SELF, AVAR_AttackBoostCount, LVar0) + IfGe(LVar0, MAX_ATTACK_BOOST) + Set(LVarC, 0) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_DefenseBoostCount, LVar0) + IfGe(LVar0, MAX_DEFENSE_BOOST) + Set(LVarD, 0) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_ElectrifyCount, LVar0) + IfGe(LVar0, MAX_ELECTRIFY) + Set(LVarE, 0) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_TransparifyCount, LVar0) + IfGe(LVar0, MAX_TRANSPARIFY) + Set(LVarF, 0) + EndIf // make a weighted choice - EVT_LABEL(LBL_CHOOSE_MOVE) - EVT_SET(LVar9, 0) - EVT_ADD(LVar9, LVarA) - EVT_ADD(LVar9, LVarB) - EVT_ADD(LVar9, LVarC) - EVT_ADD(LVar9, LVarD) - EVT_ADD(LVar9, LVarE) - EVT_ADD(LVar9, LVarF) - EVT_SUB(LVar9, 1) - EVT_CALL(RandInt, LVar9, LVar0) - EVT_ADD(LVar0, 1) - EVT_IF_LE(LVar0, LVarA) - EVT_EXEC_WAIT(N(EVS_Attack_MagicBlast)) - EVT_RETURN - EVT_END_IF - EVT_ADD(LVarA, LVarB) - EVT_IF_LE(LVar0, LVarA) - EVT_EXEC_WAIT(N(EVS_Move_MakeClone)) - EVT_RETURN - EVT_END_IF - EVT_ADD(LVarA, LVarC) - EVT_IF_LE(LVar0, LVarA) - EVT_EXEC_WAIT(N(EVS_Move_TryBoostAttack)) - EVT_RETURN - EVT_END_IF - EVT_ADD(LVarA, LVarD) - EVT_IF_LE(LVar0, LVarA) - EVT_EXEC_WAIT(N(EVS_Move_TryBoostDefense)) - EVT_RETURN - EVT_END_IF - EVT_ADD(LVarA, LVarE) - EVT_IF_LE(LVar0, LVarA) - EVT_EXEC_WAIT(N(EVS_Move_TryElectrify)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_Move_TryTransparent)) - EVT_RETURN - EVT_END + Label(LBL_CHOOSE_MOVE) + Set(LVar9, 0) + Add(LVar9, LVarA) + Add(LVar9, LVarB) + Add(LVar9, LVarC) + Add(LVar9, LVarD) + Add(LVar9, LVarE) + Add(LVar9, LVarF) + Sub(LVar9, 1) + Call(RandInt, LVar9, LVar0) + Add(LVar0, 1) + IfLe(LVar0, LVarA) + ExecWait(N(EVS_Attack_MagicBlast)) + Return + EndIf + Add(LVarA, LVarB) + IfLe(LVar0, LVarA) + ExecWait(N(EVS_Move_MakeClone)) + Return + EndIf + Add(LVarA, LVarC) + IfLe(LVar0, LVarA) + ExecWait(N(EVS_Move_TryBoostAttack)) + Return + EndIf + Add(LVarA, LVarD) + IfLe(LVar0, LVarA) + ExecWait(N(EVS_Move_TryBoostDefense)) + Return + EndIf + Add(LVarA, LVarE) + IfLe(LVar0, LVarA) + ExecWait(N(EVS_Move_TryElectrify)) + Return + EndIf + ExecWait(N(EVS_Move_TryTransparent)) + Return + End }; diff --git a/src/battle/common/actor/medi_guy.inc.c b/src/battle/common/actor/medi_guy.inc.c index 135cec70a9c..e4de6533374 100644 --- a/src/battle/common/actor/medi_guy.inc.c +++ b/src/battle/common/actor/medi_guy.inc.c @@ -105,338 +105,338 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 5) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 5) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SLEEP) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -2, 24) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -5) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_ELSE - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -2, 38) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -5) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 12, 31) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SLEEP) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -2, 24) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -5) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + Else + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -2, 38) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -5) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 12, 31) + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MediGuy_Anim03) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MediGuy_Anim01) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_RETURN - EVT_END + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, 0) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MediGuy_Anim03) + Call(SetGoalToHome, ACTOR_SELF) + Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MediGuy_Anim01) + Call(SetActorYaw, ACTOR_SELF, 0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MediGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MediGuy_Anim08) - EVT_SET_CONST(LVar2, ANIM_MediGuy_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MediGuy_Anim08) - EVT_SET_CONST(LVar2, ANIM_MediGuy_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MediGuy_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MediGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MediGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MediGuy_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MediGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MediGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MediGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MediGuy_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MediGuy_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MediGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MediGuy_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0) - EVT_CALL(HPBarToCurrent, ACTOR_SELF) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MediGuy_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MediGuy_Anim03) - EVT_SET_CONST(LVar2, ANIM_MediGuy_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MediGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MediGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MediGuy_Anim06) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MediGuy_Anim08) + SetConst(LVar2, ANIM_MediGuy_Anim09) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MediGuy_Anim08) + SetConst(LVar2, ANIM_MediGuy_Anim09) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MediGuy_Anim09) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MediGuy_Anim06) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MediGuy_Anim06) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MediGuy_Anim07) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MediGuy_Anim06) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MediGuy_Anim06) + ExecWait(EVS_Enemy_Knockback) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MediGuy_Anim06) + ExecWait(EVS_Enemy_ShockHit) + Call(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MediGuy_Anim07) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MediGuy_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MediGuy_Anim06) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MediGuy_Anim07) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + Call(SetActorPos, ACTOR_SELF, 20, 0, 0) + Call(HPBarToCurrent, ACTOR_SELF) + CaseEq(EVENT_END_FIRST_STRIKE) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + ExecWait(N(EVS_ReturnHome)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MediGuy_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MediGuy_Anim03) + SetConst(LVar2, ANIM_MediGuy_Anim0B) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MediGuy_Anim06) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MediGuy_Anim06) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_Swoop) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_THREAD - EVT_SETF(LVar0, EVT_FLOAT(0.0)) - EVT_LOOP(15) - EVT_ADDF(LVar0, EVT_FLOAT(2.0)) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MediGuy_Anim03) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, EASING_COS_IN) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_GATHER_SMALL) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MediGuy_Anim05) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_TOSS) - EVT_THREAD - EVT_WAIT(5) - EVT_SET(LVar0, 0) - EVT_LOOP(60) - EVT_CALL(N(MediGuySpriteRotationFunc), LVar0, LVar1, 15, 60, EVT_FLOAT(30.0)) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, LVar1) - EVT_ADD(LVar0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 50) - EVT_ADD(LVar2, 1) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MediGuy_Anim05) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_QUADRATIC_OUT) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_GATHER_SMALL) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MediGuy_Anim05) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_TOSS) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 1) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MediGuy_Anim05) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_QUADRATIC_OUT) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SWOOP, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpWithBounce, ACTOR_SELF, 10, EVT_FLOAT(2.0)) - EVT_WAIT(20) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Thread + SetF(LVar0, Float(0.0)) + Loop(15) + AddF(LVar0, Float(2.0)) + Call(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MediGuy_Anim03) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(FlyToGoal, ACTOR_SELF, 0, -4, EASING_COS_IN) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_GATHER_SMALL) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MediGuy_Anim05) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_TOSS) + Thread + Wait(5) + Set(LVar0, 0) + Loop(60) + Call(N(MediGuySpriteRotationFunc), LVar0, LVar1, 15, 60, Float(30.0)) + Call(SetPartRotation, ACTOR_SELF, PRT_MAIN, 0, 0, LVar1) + Add(LVar0, 1) + Wait(1) + EndLoop + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 50) + Add(LVar2, 1) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MediGuy_Anim05) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_QUADRATIC_OUT) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(30) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorSpeed, ACTOR_SELF, Float(10.0)) + ExecWait(N(EVS_ReturnHome)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_GATHER_SMALL) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MediGuy_Anim05) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Set(LVarA, LVar0) + Set(LVarB, LVar1) + Set(LVarC, LVar2) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_TOSS) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar2, 1) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MediGuy_Anim05) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_QUADRATIC_OUT) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SWOOP, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpWithBounce, ACTOR_SELF, 10, Float(2.0)) + Wait(20) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Move_HealOne) = { - EVT_SET(LVarA, LVar0) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(GetOwnerID, LVar0) - EVT_CALL(GetActorPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_GATHER_SMALL) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_NONE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MediGuy_Anim05) - EVT_ADD(LVar2, 50) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 1, LVar1, LVar2, LVar3, 10, 0) - EVT_PLAY_EFFECT(EFFECT_RECOVER, 2, LVar1, LVar2, LVar3, 0, 0) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MediGuy_Anim01) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, LVarA) - EVT_CALL(GetEnemyMaxHP, LVarA, LVar4) - EVT_MUL(LVar4, 60) - EVT_DIV(LVar4, 100) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, LVarA, SOUND_RECOVER_HEART) - EVT_CALL(PlaySoundAtActor, LVarA, SOUND_HEART_BOUNCE) - EVT_WAIT(30) - EVT_CALL(PlaySoundAtActor, LVarA, SOUND_STAR_BOUNCE_A) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(HealActor, LVarA, LVar4, FALSE) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_CALL(WaitForBuffDone) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(GetOwnerID, LVar0) + Call(GetActorPos, LVar0, LVar1, LVar2, LVar3) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_GATHER_SMALL) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_NONE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MediGuy_Anim05) + Add(LVar2, 50) + PlayEffect(EFFECT_SPARKLES, 1, LVar1, LVar2, LVar3, 10, 0) + PlayEffect(EFFECT_RECOVER, 2, LVar1, LVar2, LVar3, 0, 0) + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MediGuy_Anim01) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, LVarA) + Call(GetEnemyMaxHP, LVarA, LVar4) + Mul(LVar4, 60) + Div(LVar4, 100) + Thread + Wait(5) + Call(PlaySoundAtActor, LVarA, SOUND_RECOVER_HEART) + Call(PlaySoundAtActor, LVarA, SOUND_HEART_BOUNCE) + Wait(30) + Call(PlaySoundAtActor, LVarA, SOUND_STAR_BOUNCE_A) + EndThread + Thread + Call(FreezeBattleState, TRUE) + Call(HealActor, LVarA, LVar4, FALSE) + Call(FreezeBattleState, FALSE) + EndThread + Call(WaitForBuffDone) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_FindInjuredActor) = { - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetActorHP, LVar0, LVar2) - EVT_CALL(GetEnemyMaxHP, LVar0, LVar3) - EVT_IF_NE(LVar2, LVar3) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_RETURN - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(CreateHomeTargetList, TARGET_FLAG_2) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetActorHP, LVar0, LVar2) + Call(GetEnemyMaxHP, LVar0, LVar3) + IfNe(LVar2, LVar3) + Call(GetOwnerTarget, LVar0, LVar1) + Return + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_EXEC_WAIT(N(EVS_FindInjuredActor)) - EVT_IF_EQ(LVar0, -1) - EVT_EXEC_WAIT(N(EVS_Attack_Swoop)) - EVT_ELSE - EVT_CALL(RandInt, 1000, LVarA) - EVT_IF_LT(LVarA, 600) - EVT_EXEC_WAIT(N(EVS_Move_HealOne)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_Swoop)) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + ExecWait(N(EVS_FindInjuredActor)) + IfEq(LVar0, -1) + ExecWait(N(EVS_Attack_Swoop)) + Else + Call(RandInt, 1000, LVarA) + IfLt(LVarA, 600) + ExecWait(N(EVS_Move_HealOne)) + Else + ExecWait(N(EVS_Attack_Swoop)) + EndIf + EndIf + Return + End }; diff --git a/src/battle/common/actor/monty_mole.inc.c b/src/battle/common/actor/monty_mole.inc.c index 43315f816a9..5cca9ff4f12 100644 --- a/src/battle/common/actor/monty_mole.inc.c +++ b/src/battle/common/actor/monty_mole.inc.c @@ -162,12 +162,12 @@ ActorPartBlueprint N(HoleParts)[] = { }; EvtScript N(EVS_Hole_Init) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IN_Hole_Small, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_IN_Hole_Small, LVar0) + IfEq(LVar0, TRUE) + Call(SetPartScale, ACTOR_SELF, PRT_MAIN, Float(0.4), Float(0.4), Float(0.4)) + EndIf + Return + End }; ActorBlueprint N(hole) = { @@ -204,241 +204,241 @@ Formation N(SmallHoleFormation) = { }; EvtScript N(EVS_CreateEmptyHole) = { - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SummonEnemy, EVT_PTR(N(SmallHoleFormation)), FALSE) - EVT_ELSE - EVT_CALL(SummonEnemy, EVT_PTR(N(HoleFormation)), FALSE) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_SUB(LVar3, 1) - EVT_CALL(SetActorPos, LVar0, LVar1, LVar2, LVar3) - EVT_RETURN - EVT_END + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SummonEnemy, Ref(N(SmallHoleFormation)), FALSE) + Else + Call(SummonEnemy, Ref(N(HoleFormation)), FALSE) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Sub(LVar3, 1) + Call(SetActorPos, LVar0, LVar1, LVar2, LVar3) + Return + End }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastElement, LVarE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_IF_FLAG(LVarE, DAMAGE_TYPE_SMASH) - EVT_CHILD_THREAD - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim07) - EVT_END_CHILD_THREAD - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MontyMole_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim08) - EVT_WAIT(10) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MontyMole_Anim05) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MontyMole_Anim0A) - EVT_SET_CONST(LVar2, ANIM_MontyMole_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MontyMole_Anim0A) - EVT_SET_CONST(LVar2, ANIM_MontyMole_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_CreateEmptyHole)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MontyMole_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CALL(GetLastElement, LVar0) - EVT_IF_FLAG(LVar0, DAMAGE_TYPE_SMASH) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim11) - EVT_WAIT(80) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim10) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim14) - EVT_WAIT(20) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MontyMole_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MontyMole_Anim05) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim06) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_CreateEmptyHole)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MontyMole_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim06) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim07) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim08) - EVT_WAIT(8) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim06) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim07) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim08) - EVT_WAIT(15) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TARGET_ONLY | ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(EmptyHoleAnims))) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_MontyMole_Anim05) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_EXEC_WAIT(N(EVS_CreateEmptyHole)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -5, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim19) - EVT_ELSE - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -9, 0) - EVT_ELSE - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -23, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim09) - EVT_END_IF - EVT_WAIT(1000) - EVT_RETURN - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim11) - EVT_WAIT(40) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim10) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim14) - EVT_WAIT(20) - EVT_CASE_EQ(EVENT_UP_AND_AWAY) - EVT_EXEC_WAIT(N(EVS_CreateEmptyHole)) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastElement, LVarE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + IfFlag(LVarE, DAMAGE_TYPE_SMASH) + ChildThread + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim07) + EndChildThread + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MontyMole_Anim06) + ExecWait(EVS_Enemy_Hit) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim08) + Wait(10) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MontyMole_Anim05) + ExecWait(EVS_Enemy_Hit) + EndIf + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MontyMole_Anim0A) + SetConst(LVar2, ANIM_MontyMole_Anim0B) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MontyMole_Anim0A) + SetConst(LVar2, ANIM_MontyMole_Anim0B) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_CreateEmptyHole)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MontyMole_Anim0C) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + Call(GetLastElement, LVar0) + IfFlag(LVar0, DAMAGE_TYPE_SMASH) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim11) + Wait(80) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim10) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim14) + Wait(20) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MontyMole_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MontyMole_Anim05) + ExecWait(EVS_Enemy_Hit) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim06) + Wait(10) + ExecWait(N(EVS_CreateEmptyHole)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MontyMole_Anim09) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim06) + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim07) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim08) + Wait(8) + CaseEq(EVENT_SCARE_AWAY) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim06) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim07) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim08) + Wait(15) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TARGET_ONLY | ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(EmptyHoleAnims))) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_MontyMole_Anim05) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + ExecWait(N(EVS_CreateEmptyHole)) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(SetActorDispOffset, ACTOR_SELF, 0, -5, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim19) + Else + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetActorDispOffset, ACTOR_SELF, 0, -9, 0) + Else + Call(SetActorDispOffset, ACTOR_SELF, 0, -23, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim09) + EndIf + Wait(1000) + Return + CaseEq(EVENT_AIR_LIFT_FAILED) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim11) + Wait(40) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim10) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim14) + Wait(20) + CaseEq(EVENT_UP_AND_AWAY) + ExecWait(N(EVS_CreateEmptyHole)) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 1) - EVT_END_IF - EVT_CHILD_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) - EVT_END_CHILD_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim04) - EVT_WAIT(37) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_ROCK, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_ROCK, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_ROCK, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_ELSE - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_ROCK, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_ROCK, SOUND_MOLE_THROW) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_ROCK, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 2, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 100) - EVT_SET(LVar1, -5) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_ROCK, EVT_FLOAT(12.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_ROCK, EVT_FLOAT(0.1)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ROCK, ANIM_MontyMole_Anim0F) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_ROCK, LVar0, LVar1, LVar2, 0, 30, EASING_LINEAR) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_ROCK, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(YieldTurn) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_ROCK, EVT_FLOAT(12.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_ROCK, EVT_FLOAT(0.1)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_ROCK, ANIM_MontyMole_Anim0F) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_ROCK, LVar0, LVar1, LVar2, 0, 20, EASING_LINEAR) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_TOSS, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 55) - EVT_SET(LVar1, 0) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_ROCK, EVT_FLOAT(6.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_ROCK, EVT_FLOAT(0.1)) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_ROCK, LVar0, LVar1, LVar2, 0, 25, EASING_LINEAR) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_ROCK, EVT_FLOAT(4.0)) - EVT_SUB(LVar0, 20) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_ROCK, LVar0, LVar1, LVar2, 0, 21, EASING_LINEAR) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_ROCK, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 1) + EndIf + ChildThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) + Wait(20) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) + EndChildThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_MontyMole_Anim04) + Wait(37) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(SetPartPos, ACTOR_SELF, PRT_ROCK, LVar0, LVar1, LVar2) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_ROCK, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartScale, ACTOR_SELF, PRT_ROCK, Float(0.4), Float(0.4), Float(0.4)) + Else + Call(SetPartScale, ACTOR_SELF, PRT_ROCK, Float(1.0), Float(1.0), Float(1.0)) + EndIf + Call(PlaySoundAtPart, ACTOR_SELF, PRT_ROCK, SOUND_MOLE_THROW) + Call(SetPartSounds, ACTOR_SELF, PRT_ROCK, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 2, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 100) + Set(LVar1, -5) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_ROCK, Float(12.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_ROCK, Float(0.1)) + Call(SetAnimation, ACTOR_SELF, PRT_ROCK, ANIM_MontyMole_Anim0F) + Call(FlyPartTo, ACTOR_SELF, PRT_ROCK, LVar0, LVar1, LVar2, 0, 30, EASING_LINEAR) + Call(SetPartFlagBits, ACTOR_SELF, PRT_ROCK, ACTOR_PART_FLAG_INVISIBLE, TRUE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(YieldTurn) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_ROCK, Float(12.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_ROCK, Float(0.1)) + Call(SetAnimation, ACTOR_SELF, PRT_ROCK, ANIM_MontyMole_Anim0F) + Call(FlyPartTo, ACTOR_SELF, PRT_ROCK, LVar0, LVar1, LVar2, 0, 20, EASING_LINEAR) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_TOSS, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Sub(LVar0, 55) + Set(LVar1, 0) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_ROCK, Float(6.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_ROCK, Float(0.1)) + Call(FlyPartTo, ACTOR_SELF, PRT_ROCK, LVar0, LVar1, LVar2, 0, 25, EASING_LINEAR) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_ROCK, Float(4.0)) + Sub(LVar0, 20) + Call(FlyPartTo, ACTOR_SELF, PRT_ROCK, LVar0, LVar1, LVar2, 0, 21, EASING_LINEAR) + Call(SetPartFlagBits, ACTOR_SELF, PRT_ROCK, ACTOR_PART_FLAG_INVISIBLE, TRUE) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/paragloomba.inc.c b/src/battle/common/actor/paragloomba.inc.c index 96d606c84cb..471d0dc0682 100644 --- a/src/battle/common/actor/paragloomba.inc.c +++ b/src/battle/common/actor/paragloomba.inc.c @@ -204,362 +204,362 @@ s32 N(RightWingAnims)[] = { }; EvtScript N(EVS_Flying_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_Flying_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Flying_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_Flying_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_Flying_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Flying_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_Flying_HandleEvent))) + Return + End }; EvtScript N(EVS_Flying_Idle) = { - EVT_LABEL(10) - EVT_CALL(RandInt, 80, LVar0) - EVT_ADD(LVar0, 80) - EVT_LOOP(LVar0) - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(0.6)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, EVT_PTR(N(FlyingShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) - EVT_LOOP(20) - EVT_LABEL(1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(0.6)) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, EVT_PTR(N(FlyingAnims))) - EVT_LOOP(40) - EVT_LABEL(2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(10) - EVT_RETURN - EVT_END + Label(10) + Call(RandInt, 80, LVar0) + Add(LVar0, 80) + Loop(LVar0) + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(0) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(0.6)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(FlyingShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) + Loop(20) + Label(1) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(1) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(0.6)) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) + Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(FlyingAnims))) + Loop(40) + Label(2) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(2) + EndIf + Wait(1) + EndLoop + Goto(10) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Idle) - EVT_RETURN - EVT_END + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(7.0)) + Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Idle) + Return + End }; EvtScript N(EVS_Flying_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(GetEncounterTrigger, LVar0) - EVT_IF_EQ(LVar0, ENCOUNTER_TRIGGER_HAMMER) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_END_IF - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_Paragoomba_Dark_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_Paragoomba_Dark_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_FALL_TRIGGER) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_CASE_EQ(EVENT_15) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_Paragoomba_Dark_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_Electrocute) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Dizzy) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_Electrocute) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_STAR_BEAM) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0) - EVT_CALL(HPBarToCurrent, ACTOR_SELF) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Run) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_Run) - EVT_SET_CONST(LVar2, ANIM_Paragoomba_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Dark_Hurt) + ExecWait(EVS_Enemy_Hit) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(GetEncounterTrigger, LVar0) + IfEq(LVar0, ENCOUNTER_TRIGGER_HAMMER) + ExecWait(N(EVS_KnockDown)) + EndIf + EndIf + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Dark_BurnHurt) + SetConst(LVar2, ANIM_Paragoomba_Dark_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Dark_BurnHurt) + SetConst(LVar2, ANIM_Paragoomba_Dark_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Dark_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_FALL_TRIGGER) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Dark_Hurt) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_KnockDown)) + CaseEq(EVENT_15) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Dark_BurnHurt) + SetConst(LVar2, ANIM_Paragoomba_Dark_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_KnockDown)) + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Dark_Electrocute) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Dark_Hurt) + ExecWait(EVS_Enemy_Knockback) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Dizzy) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Dark_Electrocute) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Dark_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_STAR_BEAM) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Dark_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Dark_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Dark_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + Call(SetActorPos, ACTOR_SELF, 20, 0, 0) + Call(HPBarToCurrent, ACTOR_SELF) + CaseEq(EVENT_END_FIRST_STRIKE) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Run) + ExecWait(N(EVS_ReturnHome)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Dark_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Dark_Run) + SetConst(LVar2, ANIM_Paragoomba_Dark_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Dark_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Dark_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Flying_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Run) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, EASING_LINEAR) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_66) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Dive) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_SUB(LVar0, 80) - EVT_SET(LVar1, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Dive) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_QUADRATIC_OUT) - EVT_THREAD - EVT_LOOP(4) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_FLY) - EVT_WAIT(4) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Miss) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_FLYING, EVT_FLOAT(3.0)) - EVT_WAIT(10) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_FLYING, EVT_FLOAT(1.0)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Run) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_66) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Dive) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Dive) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) - EVT_END_SWITCH - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SKY_DIVE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Run) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_WAIT(5) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Run) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Run) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(FlyToGoal, ACTOR_SELF, 0, -4, EASING_LINEAR) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_66) + Call(SetBattleCamZoom, 300) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Dive) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(SetGoalToTarget, ACTOR_SELF) + Sub(LVar0, 80) + Set(LVar1, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Dive) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_QUADRATIC_OUT) + Thread + Loop(4) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_FLY) + Wait(4) + EndLoop + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Miss) + Call(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_FLYING, Float(3.0)) + Wait(10) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(10) + Call(SetAnimationRate, ACTOR_SELF, PRT_FLYING, Float(1.0)) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(YieldTurn) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Run) + Call(SetActorYaw, ACTOR_SELF, 180) + ExecWait(N(EVS_ReturnHome)) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + CaseDefault + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_66) + Call(SetBattleCamZoom, 300) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Dive) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Dive) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) + EndSwitch + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SKY_DIVE, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Run) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) + Call(ResetAllActorSounds, ACTOR_SELF) + Wait(5) + Call(YieldTurn) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dark_Run) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/StartRumbleWithParams.inc.c" EvtScript N(EVS_KnockDown) = { - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_PRIMARY_TARGET) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_DUMMY_WING_L, LVar0, LVar1, LVar2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_DUMMY_WING_L, -9, 7, -2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_DUMMY_WING_R, LVar0, LVar1, LVar2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_DUMMY_WING_R, 11, 7, -2) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_IF_EQ(LVar0, EVENT_15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_BurnStill) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Hurt) - EVT_END_IF - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(N(StartRumbleWithParams), 100, 10) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar3) - EVT_IF_EQ(LVar3, 15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Hurt) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_ADD(LVar4, 10) - EVT_ADD(LVar5, 5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 10, 0) - EVT_END_IF - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_LOOP(10) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(GetIndexFromHome, ACTOR_SELF, LVar0) - EVT_MOD(LVar0, 4) - EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVar0) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(DownedFlyingStatusTable))) - EVT_CALL(SetActorType, ACTOR_SELF, ACTOR_TYPE_GLOOMBA) - EVT_EXEC_WAIT(N(EVS_Downed_Init)) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(HideHealthBar, ACTOR_SELF) + Call(SetPartFlags, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET) + Call(SetPartFlags, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION) + Call(SetPartFlags, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION) + Call(SetPartFlags, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_PRIMARY_TARGET) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_DUMMY_WING_L, LVar0, LVar1, LVar2) + Call(SetPartDispOffset, ACTOR_SELF, PRT_DUMMY_WING_L, -9, 7, -2) + Call(SetPartPos, ACTOR_SELF, PRT_DUMMY_WING_R, LVar0, LVar1, LVar2) + Call(SetPartDispOffset, ACTOR_SELF, PRT_DUMMY_WING_R, 11, 7, -2) + Call(GetLastEvent, ACTOR_SELF, LVar0) + IfEq(LVar0, EVENT_15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_BurnStill) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Hurt) + EndIf + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(N(StartRumbleWithParams), 100, 10) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.3)) + EndThread + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) + Call(GetLastEvent, ACTOR_SELF, LVar3) + IfEq(LVar3, 15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Hurt) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Add(LVar4, 10) + Add(LVar5, 5) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, Float(1.0), 10, 0) + EndIf + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Loop(10) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(GetIndexFromHome, ACTOR_SELF, LVar0) + Mod(LVar0, 4) + Call(SetGoalToIndex, ACTOR_SELF, LVar0) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) + Call(SetStatusTable, ACTOR_SELF, Ref(N(DownedFlyingStatusTable))) + Call(SetActorType, ACTOR_SELF, ACTOR_TYPE_GLOOMBA) + ExecWait(N(EVS_Downed_Init)) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) + Call(HPBarToHome, ACTOR_SELF) + Call(ResetAllActorSounds, ACTOR_SELF) + Return + End }; s32 N(DownedAnims)[] = { @@ -589,350 +589,350 @@ s32 N(DownedShuffleAnims)[] = { }; EvtScript N(EVS_Downed_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_Downed_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Downed_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_Downed_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_Downed_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Downed_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_Downed_HandleEvent))) + Return + End }; EvtScript N(EVS_Downed_Idle) = { - EVT_LABEL(10) - EVT_CALL(RandInt, 80, LVar0) - EVT_ADD(LVar0, 80) - EVT_LOOP(LVar0) - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DownedShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DownedAnims))) - EVT_LOOP(20) - EVT_LABEL(1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DownedShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DownedAnims))) - EVT_LOOP(80) - EVT_LABEL(2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(10) - EVT_RETURN - EVT_END + Label(10) + Call(RandInt, 80, LVar0) + Add(LVar0, 80) + Loop(LVar0) + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(0) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DownedShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DownedAnims))) + Loop(20) + Label(1) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(1) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DownedShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DownedAnims))) + Loop(80) + Label(2) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(2) + EndIf + Wait(1) + EndLoop + Goto(10) + Return + End }; EvtScript N(EVS_Downed_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_Goomba_Dark_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_Goomba_Dark_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Dead) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Electrocute) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Dizzy) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Electrocute) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Dead) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_STAR_BEAM) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Dead) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Run) - EVT_SET_CONST(LVar2, ANIM_Goomba_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goomba_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_BurnHurt) + SetConst(LVar2, ANIM_Goomba_Dark_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_BurnHurt) + SetConst(LVar2, ANIM_Goomba_Dark_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Dead) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Electrocute) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Hurt) + ExecWait(EVS_Enemy_Knockback) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Dizzy) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Electrocute) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Dead) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_STAR_BEAM) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Dead) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Run) + SetConst(LVar2, ANIM_Goomba_Dark_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goomba_Dark_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/CalculateArcsinDeg.inc.c" EvtScript N(EVS_Downed_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Run) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Midair) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_SET(LVar1, 10) - EVT_ADD(LVar2, 3) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_SET(LVar3, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Sleep) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Hurt) - EVT_WAIT(5) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Midair) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_THREAD - EVT_WAIT(4) - EVT_SET(LVar0, 180) - EVT_LOOP(4) - EVT_SUB(LVar0, 45) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Dizzy) - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_SET(LVar3, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Tense) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_END_SWITCH - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_HEADBONK, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle) - EVT_WAIT(3) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Run) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle) + Call(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Midair) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Set(LVar1, 10) + Add(LVar2, 3) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Thread + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) + Set(LVar0, 0) + Loop(16) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Set(LVar3, LVar6) + Wait(1) + EndLoop + EndThread + Thread + Wait(6) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Sleep) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Hurt) + Wait(5) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Midair) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + Thread + Wait(4) + Set(LVar0, 180) + Loop(4) + Sub(LVar0, 45) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Dizzy) + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(SetActorYaw, ACTOR_SELF, 0) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + CaseDefault + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Thread + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) + Set(LVar0, 0) + Loop(16) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Set(LVar3, LVar6) + Wait(1) + EndLoop + EndThread + Thread + Wait(6) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Tense) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0)) + Wait(1) + EndSwitch + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_HEADBONK, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Idle) + Wait(3) + Call(YieldTurn) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Dark_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/paragoomba.inc.c b/src/battle/common/actor/paragoomba.inc.c index b0d71076a17..b9fe98b5cad 100644 --- a/src/battle/common/actor/paragoomba.inc.c +++ b/src/battle/common/actor/paragoomba.inc.c @@ -201,362 +201,362 @@ s32 N(RightWingAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(10) - EVT_CALL(RandInt, 80, LVar0) - EVT_ADD(LVar0, 80) - EVT_LOOP(LVar0) - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(0.6)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, EVT_PTR(N(ShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) - EVT_LOOP(20) - EVT_LABEL(1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(0.6)) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, EVT_PTR(N(DefaultAnims))) - EVT_LOOP(40) - EVT_LABEL(2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(10) - EVT_RETURN - EVT_END + Label(10) + Call(RandInt, 80, LVar0) + Add(LVar0, 80) + Loop(LVar0) + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(0) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(0.6)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(ShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) + Loop(20) + Label(1) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(1) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(0.6)) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) + Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(DefaultAnims))) + Loop(40) + Label(2) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(2) + EndIf + Wait(1) + EndLoop + Goto(10) + Return + End }; EvtScript N(EVS_Paragoomba_GoHome) = { - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Idle) - EVT_RETURN - EVT_END + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(7.0)) + Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Idle) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(GetEncounterTrigger, LVar0) - EVT_IF_EQ(LVar0, ENCOUNTER_TRIGGER_HAMMER) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_END_IF - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_Paragoomba_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_Paragoomba_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_FALL_TRIGGER) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_CASE_EQ(EVENT_15) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_Paragoomba_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Electrocute) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dizzy) - EVT_EXEC_WAIT(N(EVS_Paragoomba_GoHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Electrocute) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_STAR_BEAM) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0) - EVT_CALL(HPBarToCurrent, ACTOR_SELF) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Run) - EVT_EXEC_WAIT(N(EVS_Paragoomba_GoHome)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Run) - EVT_SET_CONST(LVar2, ANIM_Paragoomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_Paragoomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Hurt) + ExecWait(EVS_Enemy_Hit) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(GetEncounterTrigger, LVar0) + IfEq(LVar0, ENCOUNTER_TRIGGER_HAMMER) + ExecWait(N(EVS_KnockDown)) + EndIf + EndIf + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_BurnHurt) + SetConst(LVar2, ANIM_Paragoomba_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_BurnHurt) + SetConst(LVar2, ANIM_Paragoomba_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_FALL_TRIGGER) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Hurt) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_KnockDown)) + CaseEq(EVENT_15) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_BurnHurt) + SetConst(LVar2, ANIM_Paragoomba_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_KnockDown)) + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Electrocute) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Hurt) + ExecWait(EVS_Enemy_Knockback) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dizzy) + ExecWait(N(EVS_Paragoomba_GoHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Electrocute) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_STAR_BEAM) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + Call(SetActorPos, ACTOR_SELF, 20, 0, 0) + Call(HPBarToCurrent, ACTOR_SELF) + CaseEq(EVENT_END_FIRST_STRIKE) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Run) + ExecWait(N(EVS_Paragoomba_GoHome)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Run) + SetConst(LVar2, ANIM_Paragoomba_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_Paragoomba_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Run) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, EASING_LINEAR) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_66) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dive) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_SUB(LVar0, 80) - EVT_SET(LVar1, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dive) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_QUADRATIC_OUT) - EVT_THREAD - EVT_LOOP(4) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_FLY) - EVT_WAIT(4) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Miss) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_FLYING, EVT_FLOAT(3.0)) - EVT_WAIT(10) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_FLYING, EVT_FLOAT(1.0)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Run) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_EXEC_WAIT(N(EVS_Paragoomba_GoHome)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_66) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dive) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dive) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) - EVT_END_SWITCH - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_AIR_KICK, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Run) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_WAIT(5) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Run) - EVT_EXEC_WAIT(N(EVS_Paragoomba_GoHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Run) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(FlyToGoal, ACTOR_SELF, 0, -4, EASING_LINEAR) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_66) + Call(SetBattleCamZoom, 300) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dive) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(SetGoalToTarget, ACTOR_SELF) + Sub(LVar0, 80) + Set(LVar1, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dive) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_QUADRATIC_OUT) + Thread + Loop(4) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_FLY) + Wait(4) + EndLoop + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Miss) + Call(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_FLYING, Float(3.0)) + Wait(10) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(10) + Call(SetAnimationRate, ACTOR_SELF, PRT_FLYING, Float(1.0)) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(YieldTurn) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Run) + Call(SetActorYaw, ACTOR_SELF, 180) + ExecWait(N(EVS_Paragoomba_GoHome)) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + CaseDefault + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_66) + Call(SetBattleCamZoom, 300) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dive) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Dive) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) + EndSwitch + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_AIR_KICK, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Run) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) + Call(ResetAllActorSounds, ACTOR_SELF) + Wait(5) + Call(YieldTurn) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_Paragoomba_Run) + ExecWait(N(EVS_Paragoomba_GoHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/StartRumbleWithParams.inc.c" EvtScript N(EVS_KnockDown) = { - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_PRIMARY_TARGET) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_DUMMY_WING_L, LVar0, LVar1, LVar2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_DUMMY_WING_L, -9, 7, -2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_DUMMY_WING_R, LVar0, LVar1, LVar2) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_DUMMY_WING_R, 11, 7, -2) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_IF_EQ(LVar0, EVENT_15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_BurnStill) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hurt) - EVT_END_IF - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(N(StartRumbleWithParams), 100, 10) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar3) - EVT_IF_EQ(LVar3, EVENT_15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hurt) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_ADD(LVar4, 10) - EVT_ADD(LVar5, 5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 10, 0) - EVT_END_IF - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_LOOP(10) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(GetIndexFromHome, ACTOR_SELF, LVar0) - EVT_MOD(LVar0, 4) - EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVar0) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Idle) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(DownedStatusTable))) - EVT_CALL(SetActorType, ACTOR_SELF, ACTOR_TYPE_GOOMBA) - EVT_EXEC_WAIT(A(downed_goomba_EVS_Init)) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(HideHealthBar, ACTOR_SELF) + Call(SetPartFlags, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET) + Call(SetPartFlags, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION) + Call(SetPartFlags, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION) + Call(SetPartFlags, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_PRIMARY_TARGET) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_DUMMY_WING_L, LVar0, LVar1, LVar2) + Call(SetPartDispOffset, ACTOR_SELF, PRT_DUMMY_WING_L, -9, 7, -2) + Call(SetPartPos, ACTOR_SELF, PRT_DUMMY_WING_R, LVar0, LVar1, LVar2) + Call(SetPartDispOffset, ACTOR_SELF, PRT_DUMMY_WING_R, 11, 7, -2) + Call(GetLastEvent, ACTOR_SELF, LVar0) + IfEq(LVar0, EVENT_15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_BurnStill) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hurt) + EndIf + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(N(StartRumbleWithParams), 100, 10) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.3)) + EndThread + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) + Call(GetLastEvent, ACTOR_SELF, LVar3) + IfEq(LVar3, EVENT_15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Hurt) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Add(LVar4, 10) + Add(LVar5, 5) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, Float(1.0), 10, 0) + EndIf + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Loop(10) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_L, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WING_R, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(GetIndexFromHome, ACTOR_SELF, LVar0) + Mod(LVar0, 4) + Call(SetGoalToIndex, ACTOR_SELF, LVar0) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Goomba_Idle) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) + Call(SetStatusTable, ACTOR_SELF, Ref(N(DownedStatusTable))) + Call(SetActorType, ACTOR_SELF, ACTOR_TYPE_GOOMBA) + ExecWait(A(downed_goomba_EVS_Init)) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) + Call(HPBarToHome, ACTOR_SELF) + Call(ResetAllActorSounds, ACTOR_SELF) + Return + End }; // downed paragoombas are handled via a special nested goomba import diff --git a/src/battle/common/actor/paratroopa.inc.c b/src/battle/common/actor/paratroopa.inc.c index c8aec77e35c..438297e20e7 100644 --- a/src/battle/common/actor/paratroopa.inc.c +++ b/src/battle/common/actor/paratroopa.inc.c @@ -212,450 +212,450 @@ s32 N(WingAnims)[] = { }; EvtScript N(EVS_Flying_HandlePhase) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_AerialFlip, FALSE) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_AerialFlip, FALSE) + Return + End }; EvtScript N(EVS_Flying_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_Flying_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Flying_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_Flying_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_Flying_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_AerialFlip, FALSE) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_Flying_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Flying_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_Flying_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_Flying_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_AerialFlip, FALSE) + Return + End }; EvtScript N(EVS_Flying_UpdateTargetOffsets) = { - EVT_IF_FLAG(LVar1, STATUS_FLAG_DIZZY | STATUS_FLAG_SLEEP) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_FLYING, 0, 25) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_FLYING, 3, -6) - EVT_CALL(N(SetAbsoluteStatusOffsets), -19, 25, 4, 28) - EVT_ELSE - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_FLYING, -2, 36) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_FLYING, 0, -7) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 29, 8, 30) - EVT_END_IF - EVT_RETURN - EVT_END + IfFlag(LVar1, STATUS_FLAG_DIZZY | STATUS_FLAG_SLEEP) + Call(SetTargetOffset, ACTOR_SELF, PRT_FLYING, 0, 25) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_FLYING, 3, -6) + Call(N(SetAbsoluteStatusOffsets), -19, 25, 4, 28) + Else + Call(SetTargetOffset, ACTOR_SELF, PRT_FLYING, -2, 36) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_FLYING, 0, -7) + Call(N(SetAbsoluteStatusOffsets), -10, 29, 8, 30) + EndIf + Return + End }; EvtScript N(EVS_Flying_Idle) = { - EVT_LABEL(10) - EVT_CALL(RandInt, 80, LVar0) - EVT_ADD(LVar0, 80) - EVT_LOOP(LVar0) - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_EXEC_WAIT(N(EVS_Flying_UpdateTargetOffsets)) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(0.6)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, EVT_PTR(N(FlyingShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_DOWNED, EVT_PTR(N(FlyingAnims))) - EVT_LOOP(20) - EVT_LABEL(1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_EXEC_WAIT(N(EVS_Flying_UpdateTargetOffsets)) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(0.6)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, EVT_PTR(N(FlyingShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, EVT_PTR(N(FlyingAnims))) - EVT_LOOP(40) - EVT_LABEL(2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_EXEC_WAIT(N(EVS_Flying_UpdateTargetOffsets)) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(10) - EVT_RETURN - EVT_END + Label(10) + Call(RandInt, 80, LVar0) + Add(LVar0, 80) + Loop(LVar0) + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + ExecWait(N(EVS_Flying_UpdateTargetOffsets)) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(0) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(0.6)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(FlyingShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) + Call(SetIdleAnimations, ACTOR_SELF, PRT_DOWNED, Ref(N(FlyingAnims))) + Loop(20) + Label(1) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + ExecWait(N(EVS_Flying_UpdateTargetOffsets)) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(1) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(0.6)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(FlyingShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleFlyToGoal, ACTOR_SELF, 0, -5, EASING_LINEAR) + Call(SetIdleAnimations, ACTOR_SELF, PRT_FLYING, Ref(N(FlyingAnims))) + Loop(40) + Label(2) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + ExecWait(N(EVS_Flying_UpdateTargetOffsets)) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(2) + EndIf + Wait(1) + EndLoop + Goto(10) + Return + End }; EvtScript N(EVS_FlyHome) = { - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Idle) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Idle) + Return + End }; EvtScript N(EVS_Flying_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_AerialFlip, TRUE) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(GetEncounterTrigger, LVar0) - EVT_IF_EQ(LVar0, ENCOUNTER_TRIGGER_HAMMER) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_ParaTroopa_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_ParaTroopa_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_FALL_TRIGGER) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_CASE_EQ(EVENT_15) - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_BurnHurt) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_EXEC_WAIT(N(EVS_FlyHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_ZERO_DAMAGE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_AerialFlip, TRUE) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_ShellEnter) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_ShellEnter) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(GetEncounterTrigger, LVar0) - EVT_IF_EQ(LVar0, ENCOUNTER_TRIGGER_HAMMER) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_END_IF - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0) - EVT_CALL(HPBarToCurrent, ACTOR_SELF) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_FlyHome)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Run) - EVT_SET_CONST(LVar2, ANIM_ParaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_ParaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + Call(SetActorVar, ACTOR_SELF, AVAR_AerialFlip, TRUE) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Hurt) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_HIT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Hurt) + ExecWait(EVS_Enemy_Hit) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(GetEncounterTrigger, LVar0) + IfEq(LVar0, ENCOUNTER_TRIGGER_HAMMER) + ExecWait(N(EVS_KnockDown)) + EndIf + EndIf + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_BurnHurt) + SetConst(LVar2, ANIM_ParaTroopa_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_BurnHurt) + SetConst(LVar2, ANIM_ParaTroopa_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_FALL_TRIGGER) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Hurt) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_KnockDown)) + CaseEq(EVENT_15) + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_ParaTroopa_BurnHurt) + SetConst(LVar1, ANIM_ParaTroopa_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_KnockDown)) + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_ParaTroopa_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_ParaTroopa_HurtStill) + ExecWait(EVS_Enemy_Knockback) + ExecWait(N(EVS_FlyHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_ZERO_DAMAGE) + Call(SetActorVar, ACTOR_SELF, AVAR_AerialFlip, TRUE) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_ShellEnter) + ExecWait(EVS_Enemy_NoDamageHit) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_ShellEnter) + ExecWait(EVS_Enemy_NoDamageHit) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(GetEncounterTrigger, LVar0) + IfEq(LVar0, ENCOUNTER_TRIGGER_HAMMER) + ExecWait(N(EVS_KnockDown)) + EndIf + EndIf + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + Call(SetActorPos, ACTOR_SELF, 20, 0, 0) + Call(HPBarToCurrent, ACTOR_SELF) + CaseEq(EVENT_END_FIRST_STRIKE) + ExecWait(N(EVS_FlyHome)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Run) + SetConst(LVar2, ANIM_ParaTroopa_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_ParaTroopa_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Flying_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_05) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Run) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 40, 30, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -16, EASING_LINEAR) - EVT_CALL(UseBattleCamPresetImmediately, BTL_CAM_PRESET_01) - EVT_WAIT(5) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Windup) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(AddGoalPos, ACTOR_SELF, 6, 6, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 0, EASING_LINEAR) - EVT_WAIT(6) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 25) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_ShellDive) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 0, EASING_LINEAR) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 10, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(8) - EVT_ADD(LVar0, 90) - EVT_IF_GE(LVar0, 360) - EVT_SUB(LVar0, 360) - EVT_END_IF - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, -10, 0) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Hurt) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Hurt) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 30) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_EXEC_WAIT(N(EVS_FlyHome)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Windup) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(AddGoalPos, ACTOR_SELF, 6, 6, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 0, EASING_LINEAR) - EVT_WAIT(6) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_ShellDive) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 0, EASING_LINEAR) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_AIR_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 40, 30, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_ShellHit) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 10, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(12) - EVT_SUB(LVar0, 90) - EVT_IF_LT(LVar0, 0) - EVT_ADD(LVar0, 360) - EVT_END_IF - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, -10, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Idle) - EVT_END_THREAD - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 30, EASING_LINEAR) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_EXEC_WAIT(N(EVS_FlyHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_PRESET_05) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Run) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 40, 30, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(7.0)) + Call(FlyToGoal, ACTOR_SELF, 0, -16, EASING_LINEAR) + Call(UseBattleCamPresetImmediately, BTL_CAM_PRESET_01) + Wait(5) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Windup) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(AddGoalPos, ACTOR_SELF, 6, 6, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(2.0)) + Call(FlyToGoal, ACTOR_SELF, 0, 0, EASING_LINEAR) + Wait(6) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Sub(LVar0, 25) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(10.0)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_ShellDive) + Call(FlyToGoal, ACTOR_SELF, 0, 0, EASING_LINEAR) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(4.0)) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 10, 0) + Set(LVar0, 0) + Loop(8) + Add(LVar0, 90) + IfGe(LVar0, 360) + Sub(LVar0, 360) + EndIf + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, -10, 0) + EndThread + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(4.0)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Hurt) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(4.0)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Hurt) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 30) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorYaw, ACTOR_SELF, 180) + ExecWait(N(EVS_FlyHome)) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_PREDIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Windup) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(AddGoalPos, ACTOR_SELF, 6, 6, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(2.0)) + Call(FlyToGoal, ACTOR_SELF, 0, 0, EASING_LINEAR) + Wait(6) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PARAGOOMBA_DIVE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(10.0)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_ShellDive) + Call(FlyToGoal, ACTOR_SELF, 0, 0, EASING_LINEAR) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_AIR_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 40, 30, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_ShellHit) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 10, 0) + Set(LVar0, 0) + Loop(12) + Sub(LVar0, 90) + IfLt(LVar0, 0) + Add(LVar0, 360) + EndIf + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, -10, 0) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_ParaTroopa_Idle) + EndThread + Call(FlyToGoal, ACTOR_SELF, 0, 30, EASING_LINEAR) + Wait(10) + Call(YieldTurn) + Call(ResetAllActorSounds, ACTOR_SELF) + ExecWait(N(EVS_FlyHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_KnockDown) = { - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, 0, 0, 0) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_DUMMY_WINGS, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_DOWNED, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_PRIMARY_TARGET) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 8) - EVT_SUB(LVar2, 2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_DUMMY_WINGS, LVar0, LVar1, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_Hurt) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_AerialFlip, LVarA) - EVT_IF_FALSE(LVarA) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(N(StartRumbleWithParams), 128, 7) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_LOOP(10) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WINGS, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WINGS, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WINGS, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_LOOP(10) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WINGS, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WINGS, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WINGS, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_END_THREAD - EVT_CALL(N(StartRumbleWithParams), 150, 7) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) - EVT_END_IF - EVT_CALL(GetIndexFromHome, ACTOR_SELF, LVar0) - EVT_MOD(LVar0, 4) - EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVar0) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_Idle) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(DownedStatusTable))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, 0) - EVT_EXEC_WAIT(N(EVS_Downed_Init)) - EVT_CALL(SetActorType, ACTOR_SELF, ACTOR_TYPE_KOOPA_TROOPA) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_IF_TRUE(LVarA) - EVT_CALL(DispatchEvent, ACTOR_SELF, EVENT_FLIP_TRIGGER) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, 0, 0, 0) + Call(HideHealthBar, ACTOR_SELF) + Call(SetPartFlags, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET) + Call(SetPartFlags, ACTOR_SELF, PRT_DUMMY_WINGS, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION) + Call(SetPartFlags, ACTOR_SELF, PRT_DOWNED, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_PRIMARY_TARGET) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 8) + Sub(LVar2, 2) + Call(SetPartPos, ACTOR_SELF, PRT_DUMMY_WINGS, LVar0, LVar1, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_Hurt) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_AerialFlip, LVarA) + IfFalse(LVarA) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(N(StartRumbleWithParams), 128, 7) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.3)) + EndThread + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Loop(10) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WINGS, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WINGS, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WINGS, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Thread + Loop(10) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WINGS, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WINGS, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_SELF, PRT_DUMMY_WINGS, ACTOR_PART_FLAG_INVISIBLE, TRUE) + EndThread + Call(N(StartRumbleWithParams), 150, 7) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.3)) + EndThread + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) + EndIf + Call(GetIndexFromHome, ACTOR_SELF, LVar0) + Mod(LVar0, 4) + Call(SetGoalToIndex, ACTOR_SELF, LVar0) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_Idle) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) + Call(SetStatusTable, ACTOR_SELF, Ref(N(DownedStatusTable))) + Call(BindHandlePhase, ACTOR_SELF, 0) + ExecWait(N(EVS_Downed_Init)) + Call(SetActorType, ACTOR_SELF, ACTOR_TYPE_KOOPA_TROOPA) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) + Call(HPBarToHome, ACTOR_SELF) + Call(ResetAllActorSounds, ACTOR_SELF) + IfTrue(LVarA) + Call(DispatchEvent, ACTOR_SELF, EVENT_FLIP_TRIGGER) + EndIf + Return + End }; // everything below this point is shared with Koopa Troopa, but not in a manner @@ -701,477 +701,477 @@ s32 N(DownedFlippedAnims)[] = { }; EvtScript N(EVS_Downed_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_Downed_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Downed_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_Downed_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsFlipped, FALSE) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_Downed_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Downed_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_Downed_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_IsFlipped, FALSE) + Return + End }; EvtScript N(EVS_Downed_UpdateTargetOffsets) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_IF_FLAG(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_DIZZY) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_DOWNED, -5, 15) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_DOWNED, 0, 0) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_ELSE - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_DOWNED, -4, 32) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_DOWNED, -1, -4) - EVT_CALL(N(SetAbsoluteStatusOffsets), -15, 32, 5, 32) - EVT_END_IF - EVT_CASE_EQ(1) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_DOWNED, -5, 15) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_DOWNED, 0, 0) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(0) + IfFlag(LVar1, STATUS_FLAG_SLEEP | STATUS_FLAG_DIZZY) + Call(SetTargetOffset, ACTOR_SELF, PRT_DOWNED, -5, 15) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_DOWNED, 0, 0) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + Else + Call(SetTargetOffset, ACTOR_SELF, PRT_DOWNED, -4, 32) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_DOWNED, -1, -4) + Call(N(SetAbsoluteStatusOffsets), -15, 32, 5, 32) + EndIf + CaseEq(1) + Call(SetTargetOffset, ACTOR_SELF, PRT_DOWNED, -5, 15) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_DOWNED, 0, 0) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + EndSwitch + Return + End }; EvtScript N(EVS_Downed_Idle) = { - EVT_LABEL(0) - EVT_CALL(RandInt, 80, LVarA) - EVT_ADD(LVarA, 80) - EVT_LOOP(LVarA) - EVT_LABEL(1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_EXEC_WAIT(N(EVS_Downed_UpdateTargetOffsets)) - EVT_IF_EQ(LVar0, 1) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_DOWNED, EVT_PTR(N(DownedShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_DOWNED, EVT_PTR(N(DownedAnims))) - EVT_CASE_EQ(1) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_DOWNED, EVT_PTR(N(DownedFlippedAnims))) - EVT_END_SWITCH - EVT_LOOP(20) - EVT_LABEL(2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_EXEC_WAIT(N(EVS_Downed_UpdateTargetOffsets)) - EVT_IF_EQ(LVar0, 1) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_DOWNED, EVT_PTR(N(DownedShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_DOWNED, EVT_PTR(N(DownedAnims))) - EVT_CASE_EQ(1) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_DOWNED, EVT_PTR(N(DownedFlippedAnims))) - EVT_END_SWITCH - EVT_LOOP(80) - EVT_LABEL(3) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_EXEC_WAIT(N(EVS_Downed_UpdateTargetOffsets)) - EVT_IF_EQ(LVar0, 1) - EVT_WAIT(1) - EVT_GOTO(3) - EVT_END_IF - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(3) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(RandInt, 80, LVarA) + Add(LVarA, 80) + Loop(LVarA) + Label(1) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + ExecWait(N(EVS_Downed_UpdateTargetOffsets)) + IfEq(LVar0, 1) + Wait(1) + Goto(1) + EndIf + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(1) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_DOWNED, Ref(N(DownedShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + Switch(LVar0) + CaseEq(0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_DOWNED, Ref(N(DownedAnims))) + CaseEq(1) + Call(SetIdleAnimations, ACTOR_SELF, PRT_DOWNED, Ref(N(DownedFlippedAnims))) + EndSwitch + Loop(20) + Label(2) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + ExecWait(N(EVS_Downed_UpdateTargetOffsets)) + IfEq(LVar0, 1) + Wait(1) + Goto(2) + EndIf + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(2) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_DOWNED, Ref(N(DownedShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + Switch(LVar0) + CaseEq(0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_DOWNED, Ref(N(DownedAnims))) + CaseEq(1) + Call(SetIdleAnimations, ACTOR_SELF, PRT_DOWNED, Ref(N(DownedFlippedAnims))) + EndSwitch + Loop(80) + Label(3) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + ExecWait(N(EVS_Downed_UpdateTargetOffsets)) + IfEq(LVar0, 1) + Wait(1) + Goto(3) + EndIf + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(3) + EndIf + Wait(1) + EndLoop + Goto(0) + Return + End }; s32 N(FlipPosOffsets)[] = { 9, 16, 22, 26, 30, 32, 33, 32, 30, 26, 22, 16, 9, 0, 4, 6, 7, 6, 4, 0, 2, 0 }; EvtScript N(EVS_Downed_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_KoopaTroopa_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_KoopaTroopa_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_FLIP_TRIGGER) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsFlipped, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FlippedTurns, 2) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_DOWNED, EVT_PTR(N(FlippedDefense))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_DOWNED, EVT_PTR(N(DownedFlippedAnims))) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_DOWNED, -5, 15) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_DOWNED, 0, 0) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_Hurt) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_CHILD_THREAD - EVT_WAIT(4) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 30) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -30) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -60) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -75) - EVT_WAIT(1) - EVT_END_CHILD_THREAD - EVT_USE_BUF(EVT_PTR(N(FlipPosOffsets))) - EVT_LOOP(ARRAY_COUNT(N(FlipPosOffsets))) - EVT_BUF_READ1(LVar0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_ToppleStruggle) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Run) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_ShellEnter) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_ShellExit) - EVT_WAIT(10) - EVT_END_IF - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_ToppleStruggle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Run) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_ToppleStruggle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Run) - EVT_SET_CONST(LVar2, ANIM_KoopaTroopa_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_ToppleStruggle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Panic) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_ToppleStruggle) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Panic) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_ToppleStruggle) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_ToppleStruggle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_KoopaTroopa_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_KoopaTroopa_BurnHurt) + SetConst(LVar2, ANIM_KoopaTroopa_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_KoopaTroopa_BurnHurt) + SetConst(LVar2, ANIM_KoopaTroopa_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_KoopaTroopa_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_KoopaTroopa_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_KoopaTroopa_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_KoopaTroopa_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_FLIP_TRIGGER) + Call(SetActorVar, ACTOR_SELF, AVAR_IsFlipped, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_FlippedTurns, 2) + Call(SetDefenseTable, ACTOR_SELF, PRT_DOWNED, Ref(N(FlippedDefense))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_DOWNED, Ref(N(DownedFlippedAnims))) + Call(SetTargetOffset, ACTOR_SELF, PRT_DOWNED, -5, 15) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_DOWNED, 0, 0) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_Hurt) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + ChildThread + Wait(4) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 30) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -30) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -60) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -75) + Wait(1) + EndChildThread + UseBuf(Ref(N(FlipPosOffsets))) + Loop(ARRAY_COUNT(N(FlipPosOffsets))) + BufRead1(LVar0) + Call(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_ToppleStruggle) + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_KoopaTroopa_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_KoopaTroopa_Hurt) + ExecWait(EVS_Enemy_Knockback) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_KoopaTroopa_Run) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_KoopaTroopa_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_KoopaTroopa_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + IfEq(LVar0, 0) + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_KoopaTroopa_ShellEnter) + ExecWait(EVS_Enemy_NoDamageHit) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_ShellExit) + Wait(10) + EndIf + Else + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_KoopaTroopa_ToppleStruggle) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_KoopaTroopa_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_KoopaTroopa_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + IfEq(LVar0, 0) + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_KoopaTroopa_Run) + ExecWait(EVS_Enemy_ReturnHome) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + IfEq(LVar0, 0) + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_KoopaTroopa_Idle) + ExecWait(EVS_Enemy_Recover) + Else + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_KoopaTroopa_ToppleStruggle) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + CaseEq(EVENT_SCARE_AWAY) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + IfEq(LVar0, 0) + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_KoopaTroopa_Run) + SetConst(LVar2, ANIM_KoopaTroopa_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + Else + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_KoopaTroopa_ToppleStruggle) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + CaseEq(EVENT_BEGIN_AIR_LIFT) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + IfEq(LVar0, 0) + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_KoopaTroopa_Panic) + Else + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_KoopaTroopa_ToppleStruggle) + EndIf + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + IfEq(LVar0, 0) + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_KoopaTroopa_Panic) + Else + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_KoopaTroopa_ToppleStruggle) + EndIf + ExecWait(EVS_Enemy_BlowAway) + Return + CaseEq(EVENT_AIR_LIFT_FAILED) + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + IfEq(LVar0, 0) + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_KoopaTroopa_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + Else + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_KoopaTroopa_ToppleStruggle) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Downed_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_ShellSpin) - EVT_ELSE - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_FlippedTurns, LVar0) - EVT_SUB(LVar0, 1) - EVT_IF_GT(LVar0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_FlippedTurns, LVar0) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_DOWNED, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_DOWNED, EVT_FLOAT(3.0)) - EVT_WAIT(30) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_DOWNED, EVT_FLOAT(1.0)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_DOWNED, 0) - EVT_ELSE - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_DOWNED, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_DOWNED, EVT_FLOAT(3.0)) - EVT_WAIT(20) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_DOWNED, EVT_FLOAT(1.0)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_DOWNED, 0) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_JUMP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_ToppleStruggle) - EVT_SET(LVar0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_CHILD_THREAD - EVT_LOOP(5) - EVT_ADD(LVar0, 15) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_Idle) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsFlipped, FALSE) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_DOWNED, EVT_PTR(N(DownedAnims))) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_DOWNED, EVT_PTR(N(DownedDefense))) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_DOWNED, -4, 32) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_DOWNED, -1, -4) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, FALSE) - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_ShellEnter) - EVT_WAIT(10) - EVT_CHILD_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 4) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(3) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_END_CHILD_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_SPIN) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_ShellSpin) - EVT_WAIT(10) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_TOSS) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -40, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(16.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_05) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(SetBattleCamOffsetZ, 20) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_ShellExit) - EVT_WAIT(8) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_WAIT(4) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_BeginPanic1) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_BeginPanic2) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_Panic) - EVT_WAIT(6) - EVT_SUB(LVar1, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_DOWNED, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_Panic) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_Idle) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_DOWNED, 0) - EVT_CALL(SetPartYaw, ACTOR_SELF, PRT_DOWNED, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(16.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_SHELL_TOSS, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_ShellExit) - EVT_WAIT(8) - EVT_CALL(YieldTurn) - EVT_SET_CONST(LVar0, PRT_DOWNED) - EVT_SET_CONST(LVar1, ANIM_KoopaTroopa_Run) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_Idle) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_ShellSpin) + Else + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlipped, LVar0) + IfEq(LVar0, 1) + Call(GetActorVar, ACTOR_SELF, AVAR_FlippedTurns, LVar0) + Sub(LVar0, 1) + IfGt(LVar0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_FlippedTurns, LVar0) + Call(AddActorDecoration, ACTOR_SELF, PRT_DOWNED, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_DOWNED, Float(3.0)) + Wait(30) + Call(SetAnimationRate, ACTOR_SELF, PRT_DOWNED, Float(1.0)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_DOWNED, 0) + Else + Call(AddActorDecoration, ACTOR_SELF, PRT_DOWNED, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_DOWNED, Float(3.0)) + Wait(20) + Call(SetAnimationRate, ACTOR_SELF, PRT_DOWNED, Float(1.0)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_DOWNED, 0) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_JUMP) + Call(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_ToppleStruggle) + Set(LVar0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + ChildThread + Loop(5) + Add(LVar0, 15) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndChildThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(3.0)) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_STEP_A) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_Idle) + Call(SetActorVar, ACTOR_SELF, AVAR_IsFlipped, FALSE) + Call(SetIdleAnimations, ACTOR_SELF, PRT_DOWNED, Ref(N(DownedAnims))) + Call(SetDefenseTable, ACTOR_SELF, PRT_DOWNED, Ref(N(DownedDefense))) + Call(SetTargetOffset, ACTOR_SELF, PRT_DOWNED, -4, 32) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_DOWNED, -1, -4) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, FALSE) + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndIf + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_ShellEnter) + Wait(10) + ChildThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 4) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(3) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(2) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + EndChildThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_SPIN) + Call(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_ShellSpin) + Wait(10) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_TOSS) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -40, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(16.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_05) + Call(SetBattleCamZoom, 300) + Call(SetBattleCamOffsetZ, 20) + Call(MoveBattleCamOver, 10) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_ShellExit) + Wait(8) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetActorYaw, ACTOR_SELF, 180) + Wait(4) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_BeginPanic1) + Wait(1) + Call(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_BeginPanic2) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_Panic) + Wait(6) + Sub(LVar1, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_DOWNED, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_Panic) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_Idle) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_DOWNED, 0) + Call(SetPartYaw, ACTOR_SELF, PRT_DOWNED, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(16.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(ResetAllActorSounds, ACTOR_SELF) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_SHELL_TOSS, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_ShellExit) + Wait(8) + Call(YieldTurn) + SetConst(LVar0, PRT_DOWNED) + SetConst(LVar1, ANIM_KoopaTroopa_Run) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetAnimation, ACTOR_SELF, PRT_DOWNED, ANIM_KoopaTroopa_Idle) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/piranha_plant.inc.c b/src/battle/common/actor/piranha_plant.inc.c index 313daf0b183..b85eb875f1a 100644 --- a/src/battle/common/actor/piranha_plant.inc.c +++ b/src/battle/common/actor/piranha_plant.inc.c @@ -109,269 +109,269 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim04) - EVT_WAIT(10) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim03) - EVT_WAIT(10) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim04) + Wait(10) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim03) + Wait(10) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SmallPiranha_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SmallPiranha_Anim0A) - EVT_SET_CONST(LVar2, ANIM_SmallPiranha_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SmallPiranha_Anim0A) - EVT_SET_CONST(LVar2, ANIM_SmallPiranha_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SmallPiranha_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SmallPiranha_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SmallPiranha_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SmallPiranha_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SmallPiranha_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SmallPiranha_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SmallPiranha_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SmallPiranha_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIKE_TAUNT) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, 0) - EVT_ADD(LVar1, 14) - EVT_ELSE - EVT_ADD(LVar0, 0) - EVT_ADD(LVar1, 35) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) - EVT_WAIT(20) - EVT_END_THREAD - EVT_LOOP(40) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim01) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim06) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim01) - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SmallPiranha_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SmallPiranha_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SmallPiranha_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SmallPiranha_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim04) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_WAIT(8) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SmallPiranha_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SmallPiranha_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SmallPiranha_Anim09) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SmallPiranha_Anim0A) + SetConst(LVar2, ANIM_SmallPiranha_Anim0B) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SmallPiranha_Anim0A) + SetConst(LVar2, ANIM_SmallPiranha_Anim0B) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SmallPiranha_Anim0B) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SmallPiranha_Anim09) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SmallPiranha_Anim09) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SmallPiranha_Anim09) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SmallPiranha_Anim09) + ExecWait(EVS_Enemy_ShockHit) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SmallPiranha_Anim09) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SmallPiranha_Anim09) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SmallPiranha_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_SPIKE_TAUNT) + Thread + Wait(10) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar0, 0) + Add(LVar1, 14) + Else + Add(LVar0, 0) + Add(LVar1, 35) + EndIf + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) + Wait(20) + EndThread + Loop(40) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim01) + Wait(1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim06) + Wait(1) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim01) + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SmallPiranha_Anim09) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SmallPiranha_Anim09) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SmallPiranha_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SmallPiranha_Anim09) + ExecWait(EVS_Enemy_Hit) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim04) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) + Wait(8) + Call(HideHealthBar, ACTOR_SELF) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(RemoveActor, ACTOR_SELF) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SmallPiranha_Anim09) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SmallPiranha_Anim09) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim04) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(MoveBattleCamOver, 1) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(15) - EVT_GOTO(123) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim04) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_WAIT(8) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetBattleCamTarget, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamZoom, 350) - EVT_CALL(SetBattleCamOffsetZ, 45) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, 8) - EVT_ADD(LVar0, -3) - EVT_ELSE - EVT_ADD(LVar0, 20) - EVT_END_IF - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, FALSE, FALSE) - EVT_LABEL(123) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim03) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim05) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_NOT_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim06) - EVT_WAIT(2) - EVT_END_IF - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PIRANHA_BITE) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim07) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim08) - EVT_WAIT(2) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim06) - EVT_WAIT(2) - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PIRANHA_BITE) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim07) - EVT_WAIT(10) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_BITE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim08) - EVT_WAIT(15) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim04) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(MoveBattleCamOver, 1) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Set(LVar1, 0) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Wait(15) + Goto(123) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim04) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) + Wait(8) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Set(LVar1, 0) + Call(SetBattleCamTarget, LVar0, LVar1, LVar2) + Call(SetBattleCamZoom, 350) + Call(SetBattleCamOffsetZ, 45) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(MoveBattleCamOver, 20) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfFlag(LVar5, STATUS_FLAG_SHRINK) + Add(LVar0, 8) + Add(LVar0, -3) + Else + Add(LVar0, 20) + EndIf + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_NONE, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, FALSE, FALSE) + Label(123) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim03) + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim05) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfNotFlag(LVar5, STATUS_FLAG_SHRINK) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim06) + Wait(2) + EndIf + Thread + Wait(6) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PIRANHA_BITE) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim07) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim08) + Wait(2) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + ExecWait(N(EVS_ReturnHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim06) + Wait(2) + Thread + Wait(6) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PIRANHA_BITE) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim07) + Wait(10) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_BITE, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SmallPiranha_Anim08) + Wait(15) + Call(YieldTurn) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/pokey.inc.c b/src/battle/common/actor/pokey.inc.c index 38feb4a1beb..7b27ca6f962 100644 --- a/src/battle/common/actor/pokey.inc.c +++ b/src/battle/common/actor/pokey.inc.c @@ -236,676 +236,676 @@ s32 N(ThrownPartAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Generation, AVAL_Generation_First) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_Generation, AVAL_Generation_First) // copy input var from Formation - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IN_CantSummon, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CantSummon, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_PartsThrown, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Immune, ANIM_Pokey_Idle4) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Run, ANIM_Pokey_Run4) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Hit, ANIM_Pokey_Hurt4) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Windup, ANIM_Pokey_Windup3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Throw, ANIM_Pokey_Throw3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_Pokey_BurnHurt4) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_Pokey_BurnStill4) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_IN_CantSummon, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_CantSummon, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_PartsThrown, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Immune, ANIM_Pokey_Idle4) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Run, ANIM_Pokey_Run4) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Hit, ANIM_Pokey_Hurt4) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Windup, ANIM_Pokey_Windup3) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Throw, ANIM_Pokey_Throw3) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_Pokey_BurnHurt4) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_Pokey_BurnStill4) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_HIT) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_ELSE - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) - EVT_IF_EQ(LVarA, 3) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_ELSE - EVT_CALL(GetDamageSource, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(DMG_SRC_SHELL_TOSS) - EVT_CASE_OR_EQ(DMG_SRC_POWER_SHELL) - EVT_CASE_OR_EQ(DMG_SRC_FIRE_SHELL) - EVT_EXEC_WAIT(N(EVS_Pokey_Hit)) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_SWITCH - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(EVENT_DEATH) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_ELSE - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) - EVT_IF_EQ(LVarA, 3) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_ELSE - EVT_CALL(GetDamageSource, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(DMG_SRC_SHELL_TOSS) - EVT_CASE_OR_EQ(DMG_SRC_POWER_SHELL) - EVT_CASE_OR_EQ(DMG_SRC_FIRE_SHELL) - EVT_EXEC_WAIT(N(EVS_Pokey_Hit)) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_END_SWITCH - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, LVar1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar2) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_ELSE - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) - EVT_IF_EQ(LVarA, 3) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_ELSE - EVT_CALL(GetDamageSource, LVarA) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(DMG_SRC_SHELL_TOSS) - EVT_CASE_OR_EQ(DMG_SRC_POWER_SHELL) - EVT_CASE_OR_EQ(DMG_SRC_FIRE_SHELL) - EVT_EXEC_WAIT(N(EVS_Pokey_Hit)) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_END_SWITCH - EVT_END_IF - EVT_END_IF - EVT_CASE_OR_EQ(EVENT_BURN_DEATH) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, LVar1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar2) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_ELSE - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) - EVT_IF_EQ(LVarA, 3) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_ELSE - EVT_CALL(GetDamageSource, LVarA) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(DMG_SRC_SHELL_TOSS) - EVT_CASE_OR_EQ(DMG_SRC_POWER_SHELL) - EVT_CASE_OR_EQ(DMG_SRC_FIRE_SHELL) - EVT_EXEC_WAIT(N(EVS_Pokey_Hit)) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_END_SWITCH - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_EXEC_WAIT(N(EVS_Pokey_SpinSmashHit)) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_EXEC_WAIT(N(EVS_Pokey_SpinSmashHit)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_LAUNCH_HIT) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Pokey_Hit)) - EVT_END_IF - EVT_CASE_EQ(EVENT_SPIN_SMASH_LAUNCH_DEATH) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Pokey_Hit)) - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, -1) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Run, LVar1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_EXEC_WAIT(EVS_Enemy_HopToPos) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Immune, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIKE_TAUNT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 77) - EVT_SET_CONST(LVar2, ANIM_Pokey_Dizzy4) - EVT_CASE_EQ(1) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 59) - EVT_SET_CONST(LVar2, ANIM_Pokey_Dizzy3) - EVT_CASE_EQ(2) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 41) - EVT_SET_CONST(LVar2, ANIM_Pokey_Dizzy2) - EVT_CASE_EQ(3) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 23) - EVT_SET_CONST(LVar2, ANIM_Pokey_Dizzy1) - EVT_END_SWITCH - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SLEEP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar2) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar6) - EVT_IF_FLAG(LVar6, STATUS_FLAG_SHRINK) - EVT_MULF(LVar0, EVT_FLOAT(0.4)) - EVT_MULF(LVar1, EVT_FLOAT(0.4)) - EVT_END_IF - EVT_ADDF(LVar3, LVar0) - EVT_ADDF(LVar4, LVar1) - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar3, LVar4, LVar5, 20, 0) - EVT_WAIT(30) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Immune, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_EXEC_WAIT(N(EVS_Pokey_ScareAway)) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_HIT) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_Hit) + Else + Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) + IfEq(LVarA, 3) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_Hit) + Else + Call(GetDamageSource, LVar0) + Switch(LVar0) + CaseOrEq(DMG_SRC_SHELL_TOSS) + CaseOrEq(DMG_SRC_POWER_SHELL) + CaseOrEq(DMG_SRC_FIRE_SHELL) + ExecWait(N(EVS_Pokey_Hit)) + EndCaseGroup + CaseDefault + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_Hit) + EndSwitch + EndIf + EndIf + CaseEq(EVENT_DEATH) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_Hit) + Wait(10) + Else + Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) + IfEq(LVarA, 3) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_Hit) + Wait(10) + Else + Call(GetDamageSource, LVar0) + Switch(LVar0) + CaseOrEq(DMG_SRC_SHELL_TOSS) + CaseOrEq(DMG_SRC_POWER_SHELL) + CaseOrEq(DMG_SRC_FIRE_SHELL) + ExecWait(N(EVS_Pokey_Hit)) + EndCaseGroup + CaseDefault + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_Hit) + Wait(10) + EndSwitch + EndIf + EndIf + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_BURN_HIT) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, LVar1) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar2) + SetConst(LVar0, PRT_MAIN) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + ExecWait(EVS_Enemy_BurnHit) + Else + Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) + IfEq(LVarA, 3) + ExecWait(EVS_Enemy_BurnHit) + Else + Call(GetDamageSource, LVarA) + Switch(LVarA) + CaseOrEq(DMG_SRC_SHELL_TOSS) + CaseOrEq(DMG_SRC_POWER_SHELL) + CaseOrEq(DMG_SRC_FIRE_SHELL) + ExecWait(N(EVS_Pokey_Hit)) + EndCaseGroup + CaseDefault + ExecWait(EVS_Enemy_BurnHit) + EndSwitch + EndIf + EndIf + CaseOrEq(EVENT_BURN_DEATH) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, LVar1) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar2) + SetConst(LVar0, PRT_MAIN) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + ExecWait(EVS_Enemy_BurnHit) + Else + Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) + IfEq(LVarA, 3) + ExecWait(EVS_Enemy_BurnHit) + Else + Call(GetDamageSource, LVarA) + Switch(LVarA) + CaseOrEq(DMG_SRC_SHELL_TOSS) + CaseOrEq(DMG_SRC_POWER_SHELL) + CaseOrEq(DMG_SRC_FIRE_SHELL) + ExecWait(N(EVS_Pokey_Hit)) + EndCaseGroup + CaseDefault + ExecWait(EVS_Enemy_BurnHit) + EndSwitch + EndIf + EndIf + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar1) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + ExecWait(N(EVS_Pokey_SpinSmashHit)) + CaseEq(EVENT_SPIN_SMASH_DEATH) + ExecWait(N(EVS_Pokey_SpinSmashHit)) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_LAUNCH_HIT) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_Hit) + Else + ExecWait(N(EVS_Pokey_Hit)) + EndIf + CaseEq(EVENT_SPIN_SMASH_LAUNCH_DEATH) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_Hit) + Else + ExecWait(N(EVS_Pokey_Hit)) + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, -1) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_ShockHit) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Run, LVar1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + ExecWait(EVS_Enemy_HopToPos) + CaseEq(EVENT_SHOCK_DEATH) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Immune, LVar1) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_SPIKE_TAUNT) + Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVar0) + Switch(LVar0) + CaseEq(0) + Set(LVar0, 0) + Set(LVar1, 77) + SetConst(LVar2, ANIM_Pokey_Dizzy4) + CaseEq(1) + Set(LVar0, 0) + Set(LVar1, 59) + SetConst(LVar2, ANIM_Pokey_Dizzy3) + CaseEq(2) + Set(LVar0, 0) + Set(LVar1, 41) + SetConst(LVar2, ANIM_Pokey_Dizzy2) + CaseEq(3) + Set(LVar0, 0) + Set(LVar1, 23) + SetConst(LVar2, ANIM_Pokey_Dizzy1) + EndSwitch + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SLEEP) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar2) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Call(GetStatusFlags, ACTOR_SELF, LVar6) + IfFlag(LVar6, STATUS_FLAG_SHRINK) + MulF(LVar0, Float(0.4)) + MulF(LVar1, Float(0.4)) + EndIf + AddF(LVar3, LVar0) + AddF(LVar4, LVar1) + PlayEffect(EFFECT_LENS_FLARE, 0, LVar3, LVar4, LVar5, 20, 0) + Wait(30) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Immune, LVar1) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + ExecWait(N(EVS_Pokey_ScareAway)) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_GroundSmash) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(AddGoalPos, ACTOR_SELF, 60, 0, 0) - EVT_ELSE - EVT_CALL(AddGoalPos, ACTOR_SELF, 24, 0, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Run4) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle4) - EVT_CASE_EQ(1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(AddGoalPos, ACTOR_SELF, 40, 0, 0) - EVT_ELSE - EVT_CALL(AddGoalPos, ACTOR_SELF, 16, 0, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Run3) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle3) - EVT_CASE_EQ(2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(AddGoalPos, ACTOR_SELF, 20, 0, 0) - EVT_ELSE - EVT_CALL(AddGoalPos, ACTOR_SELF, 8, 0, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Run2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle2) - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_POKEY_SWAY) - EVT_CALL(MakeLerp, 0, -40, 20, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CHILD_THREAD - EVT_WAIT(3) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_POKEY_SMASH) - EVT_END_CHILD_THREAD - EVT_CALL(MakeLerp, -40, 90, 5, EASING_QUADRATIC_IN) - EVT_LABEL(3) - EVT_CALL(UpdateLerp) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(3) - EVT_END_IF - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(MakeLerp, 90, 0, 5, EASING_LINEAR) - EVT_LABEL(4) - EVT_CALL(UpdateLerp) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(4) - EVT_END_IF - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(YieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Run4) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle4) - EVT_CASE_EQ(1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Run3) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle3) - EVT_CASE_EQ(2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Run2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle2) - EVT_END_SWITCH - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_SWITCH + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVar0) + Switch(LVar0) + CaseEq(0) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(AddGoalPos, ACTOR_SELF, 60, 0, 0) + Else + Call(AddGoalPos, ACTOR_SELF, 24, 0, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Run4) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle4) + CaseEq(1) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(AddGoalPos, ACTOR_SELF, 40, 0, 0) + Else + Call(AddGoalPos, ACTOR_SELF, 16, 0, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Run3) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle3) + CaseEq(2) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(AddGoalPos, ACTOR_SELF, 20, 0, 0) + Else + Call(AddGoalPos, ACTOR_SELF, 8, 0, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Run2) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle2) + EndSwitch + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_POKEY_SWAY) + Call(MakeLerp, 0, -40, 20, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + ChildThread + Wait(3) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_POKEY_SMASH) + EndChildThread + Call(MakeLerp, -40, 90, 5, EASING_QUADRATIC_IN) + Label(3) + Call(UpdateLerp) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(3) + EndIf + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 0, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(MakeLerp, 90, 0, 5, EASING_LINEAR) + Label(4) + Call(UpdateLerp) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(4) + EndIf + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(YieldTurn) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVar0) + Switch(LVar0) + CaseEq(0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Run4) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle4) + CaseEq(1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Run3) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle3) + CaseEq(2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Run2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle2) + EndSwitch + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndSwitch // damage *could* depend on size of the Pokey, but all DMG values are the same, so it doesn't - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SET(LVar1, DMG_SMASH_LARGE) - EVT_CASE_EQ(1) - EVT_SET(LVar1, DMG_SMASH_MEDIUM) - EVT_CASE_DEFAULT - EVT_SET(LVar1, DMG_SMASH_SMALL) - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 0), LVar1, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MakeLerp, 90, 0, 10, EASING_LINEAR) - EVT_LABEL(5) - EVT_CALL(UpdateLerp) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(5) - EVT_END_IF - EVT_CALL(YieldTurn) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Run4) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle4) - EVT_CASE_EQ(1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Run3) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle3) - EVT_CASE_EQ(2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Run2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle2) - EVT_END_SWITCH - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVar0) + Switch(LVar0) + CaseEq(0) + Set(LVar1, DMG_SMASH_LARGE) + CaseEq(1) + Set(LVar1, DMG_SMASH_MEDIUM) + CaseDefault + Set(LVar1, DMG_SMASH_SMALL) + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 0), LVar1, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MakeLerp, 90, 0, 10, EASING_LINEAR) + Label(5) + Call(UpdateLerp) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(5) + EndIf + Call(YieldTurn) + Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVar0) + Switch(LVar0) + CaseEq(0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Run4) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle4) + CaseEq(1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Run3) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle3) + CaseEq(2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Run2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle2) + EndSwitch + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; // (out) LVar9 : number of Pokey actors that aren't disabled, haven't thrown parts, and aren't last-generation EvtScript N(EVS_CountSummonerPokeys) = { - EVT_SET(LVar9, 0) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetOriginalActorType, LVar0, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(ACTOR_TYPE_POKEY) - EVT_CALL(GetStatusFlags, LVar0, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAGS_IMMOBILIZED | STATUS_FLAG_SHRINK) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVar3) - EVT_IF_EQ(LVar3, 0) - EVT_CALL(GetActorVar, LVar0, AVAR_Generation, LVar3) - EVT_IF_NE(LVar3, AVAL_Generation_Last) - EVT_ADD(LVar9, 1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVar9, 0) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetOriginalActorType, LVar0, LVar2) + Switch(LVar2) + CaseEq(ACTOR_TYPE_POKEY) + Call(GetStatusFlags, LVar0, LVar3) + IfNotFlag(LVar3, STATUS_FLAGS_IMMOBILIZED | STATUS_FLAG_SHRINK) + Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVar3) + IfEq(LVar3, 0) + Call(GetActorVar, LVar0, AVAR_Generation, LVar3) + IfNe(LVar3, AVAL_Generation_Last) + Add(LVar9, 1) + EndIf + EndIf + EndIf + EndSwitch + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Return + End }; EvtScript N(EVS_TakeTurn) = { #define LBL_NO_SUMMON 123 - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) - EVT_IF_EQ(LVarA, 3) - EVT_EXEC_WAIT(N(EVS_Attack_SinglePartLeap)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_CantSummon, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar0) - EVT_IF_EQ(LVar0, AVAL_Generation_Last) - EVT_GOTO(LBL_NO_SUMMON) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_FindValidSummonPosition)) - EVT_IF_EQ(LVarE, -1) - EVT_GOTO(LBL_NO_SUMMON) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_CountSummonerPokeys)) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(1) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 400) - EVT_EXEC_WAIT(N(EVS_SummonBackup)) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(2) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 200) - EVT_EXEC_WAIT(N(EVS_SummonBackup)) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(3) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 100) - EVT_EXEC_WAIT(N(EVS_SummonBackup)) - EVT_RETURN - EVT_END_IF - EVT_END_SWITCH - EVT_END_IF + Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) + IfEq(LVarA, 3) + ExecWait(N(EVS_Attack_SinglePartLeap)) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_CantSummon, LVar0) + IfEq(LVar0, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar0) + IfEq(LVar0, AVAL_Generation_Last) + Goto(LBL_NO_SUMMON) + EndIf + ExecWait(N(EVS_FindValidSummonPosition)) + IfEq(LVarE, -1) + Goto(LBL_NO_SUMMON) + EndIf + ExecWait(N(EVS_CountSummonerPokeys)) + Switch(LVar9) + CaseEq(1) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 400) + ExecWait(N(EVS_SummonBackup)) + Return + EndIf + CaseEq(2) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 200) + ExecWait(N(EVS_SummonBackup)) + Return + EndIf + CaseEq(3) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 100) + ExecWait(N(EVS_SummonBackup)) + Return + EndIf + EndSwitch + EndIf // try other moves - EVT_LABEL(LBL_NO_SUMMON) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 500) - EVT_EXEC_WAIT(N(EVS_Attack_GroundSmash)) - EVT_RETURN - EVT_END_IF + Label(LBL_NO_SUMMON) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 500) + ExecWait(N(EVS_Attack_GroundSmash)) + Return + EndIf // throw a body part - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 1) - EVT_END_IF - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_PROJECTILE, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_ELSE - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CHILD_THREAD - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(2.2)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_PROJECTILE, ANIM_Pokey_Projectile) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(0) - EVT_IF_NOT_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 38) - EVT_ELSE - EVT_ADD(LVar1, 15) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(1.2)) - EVT_END_IF - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 15, TRUE) - EVT_CASE_EQ(1) - EVT_IF_NOT_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 20) - EVT_ELSE - EVT_ADD(LVar1, 8) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(1.2)) - EVT_END_IF - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 15, TRUE) - EVT_CASE_EQ(2) - EVT_IF_NOT_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 8) - EVT_ELSE - EVT_ADD(LVar1, 3) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(1.2)) - EVT_END_IF - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 15, TRUE) - EVT_CASE_EQ(3) - EVT_END_SWITCH - EVT_END_CHILD_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_POKEY_SWAY) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Windup, LVar1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_WAIT(12) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Throw, LVar1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_POKEY_THROW) - EVT_WAIT(3) - EVT_EXEC_WAIT(N(EVS_DecrementSize)) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, DMG_THROW_PART, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_IF_EQ(LVar0, HIT_RESULT_LUCKY) - EVT_CHILD_THREAD - EVT_WAIT(5) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_CHILD_THREAD - EVT_END_IF - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 80) - EVT_SUB(LVar1, 5) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(20.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(0.1)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_PROJECTILE, ANIM_Pokey_Projectile) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Run, LVar1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(20.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(0.1)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_PROJECTILE, ANIM_Pokey_Projectile) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, TRUE) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 0), DMG_THROW_PART, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Run, LVar1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 55) - EVT_SET(LVar1, 0) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(6.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(0.1)) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, 25, EASING_LINEAR) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(4.0)) - EVT_SUB(LVar0, 24) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, 21, EASING_LINEAR) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(3.0)) - EVT_SUB(LVar0, 20) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, 20, EASING_LINEAR) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 1) + EndIf + Call(SetPartSounds, ACTOR_SELF, PRT_PROJECTILE, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, Float(1.0), Float(1.0), Float(1.0)) + Else + Call(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, Float(0.4), Float(0.4), Float(1.0)) + EndIf + ChildThread + Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, Float(2.2)) + Call(SetAnimation, ACTOR_SELF, PRT_PROJECTILE, ANIM_Pokey_Projectile) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) + Switch(LVarA) + CaseEq(0) + IfNotFlag(LVar5, STATUS_FLAG_SHRINK) + Add(LVar1, 38) + Else + Add(LVar1, 15) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, Float(1.2)) + EndIf + Call(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 15, TRUE) + CaseEq(1) + IfNotFlag(LVar5, STATUS_FLAG_SHRINK) + Add(LVar1, 20) + Else + Add(LVar1, 8) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, Float(1.2)) + EndIf + Call(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 15, TRUE) + CaseEq(2) + IfNotFlag(LVar5, STATUS_FLAG_SHRINK) + Add(LVar1, 8) + Else + Add(LVar1, 3) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, Float(1.2)) + EndIf + Call(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 15, TRUE) + CaseEq(3) + EndSwitch + EndChildThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_POKEY_SWAY) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Windup, LVar1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) + Wait(12) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Throw, LVar1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) + Wait(1) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_POKEY_THROW) + Wait(3) + ExecWait(N(EVS_DecrementSize)) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, DMG_THROW_PART, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + IfEq(LVar0, HIT_RESULT_LUCKY) + ChildThread + Wait(5) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndChildThread + EndIf + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 80) + Sub(LVar1, 5) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, Float(20.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, Float(0.1)) + Call(SetAnimation, ACTOR_SELF, PRT_PROJECTILE, ANIM_Pokey_Projectile) + Call(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Run, LVar1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) + Return + EndCaseGroup + EndSwitch + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, Float(20.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, Float(0.1)) + Call(SetAnimation, ACTOR_SELF, PRT_PROJECTILE, ANIM_Pokey_Projectile) + Call(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, TRUE) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 0), DMG_THROW_PART, BS_FLAGS1_TRIGGER_EVENTS) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Run, LVar1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Sub(LVar0, 55) + Set(LVar1, 0) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, Float(6.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, Float(0.1)) + Call(FlyPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, 25, EASING_LINEAR) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, Float(4.0)) + Sub(LVar0, 24) + Call(FlyPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, 21, EASING_LINEAR) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, Float(3.0)) + Sub(LVar0, 20) + Call(FlyPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, 20, EASING_LINEAR) + Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, TRUE) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_FindValidSummonPosition) = { - EVT_SET(LVarE, -1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_RETURN - EVT_END_IF + Set(LVarE, -1) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVar0) + IfNe(LVar0, 0) + Return + EndIf // check if each column is occupied - EVT_SET(LFlag1, FALSE) - EVT_SET(LFlag2, FALSE) - EVT_SET(LFlag3, FALSE) - EVT_SET(LFlag4, FALSE) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar5) - EVT_CALL(GetIndexFromHome, LVar0, LVar5) - EVT_MOD(LVar5, 4) - EVT_SWITCH(LVar5) - EVT_CASE_EQ(0) - EVT_SET(LFlag1, TRUE) - EVT_CASE_EQ(1) - EVT_SET(LFlag2, TRUE) - EVT_CASE_EQ(2) - EVT_SET(LFlag3, TRUE) - EVT_CASE_EQ(3) - EVT_SET(LFlag4, TRUE) - EVT_END_SWITCH - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF + Set(LFlag1, FALSE) + Set(LFlag2, FALSE) + Set(LFlag3, FALSE) + Set(LFlag4, FALSE) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar5) + Call(GetIndexFromHome, LVar0, LVar5) + Mod(LVar5, 4) + Switch(LVar5) + CaseEq(0) + Set(LFlag1, TRUE) + CaseEq(1) + Set(LFlag2, TRUE) + CaseEq(2) + Set(LFlag3, TRUE) + CaseEq(3) + Set(LFlag4, TRUE) + EndSwitch + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf // only summon if space in front of the Pokey is available, and never if Pokey is in front position - EVT_CALL(GetIndexFromHome, ACTOR_SELF, LVar1) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(BTL_POS_GROUND_A) - EVT_RETURN // can't summon if Pokey is in front - EVT_CASE_EQ(BTL_POS_GROUND_B) - EVT_IF_EQ(LFlag1, FALSE) - EVT_SET(LVarE, BTL_POS_GROUND_A) - EVT_END_IF - EVT_CASE_EQ(BTL_POS_GROUND_C) - EVT_IF_EQ(LFlag2, FALSE) - EVT_SET(LVarE, BTL_POS_GROUND_B) - EVT_END_IF - EVT_CASE_EQ(BTL_POS_GROUND_D) - EVT_IF_EQ(LFlag3, FALSE) - EVT_SET(LVarE, BTL_POS_GROUND_C) - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetIndexFromHome, ACTOR_SELF, LVar1) + Switch(LVar1) + CaseEq(BTL_POS_GROUND_A) + Return // can't summon if Pokey is in front + CaseEq(BTL_POS_GROUND_B) + IfEq(LFlag1, FALSE) + Set(LVarE, BTL_POS_GROUND_A) + EndIf + CaseEq(BTL_POS_GROUND_C) + IfEq(LFlag2, FALSE) + Set(LVarE, BTL_POS_GROUND_B) + EndIf + CaseEq(BTL_POS_GROUND_D) + IfEq(LFlag3, FALSE) + Set(LVarE, BTL_POS_GROUND_C) + EndIf + EndSwitch + Return + End }; Vec3i N(SummonPos) = { 400, -100, 0 }; @@ -915,572 +915,572 @@ Formation N(SummonFormation) = { }; EvtScript N(EVS_SummonBackup) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle4) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 30) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle4) // lean back slightly - EVT_CALL(MakeLerp, 0, -20, 20, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CHILD_THREAD - EVT_WAIT(8) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_POKEY_LEAN_FORWARD) - EVT_END_CHILD_THREAD + Call(MakeLerp, 0, -20, 20, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + ChildThread + Wait(8) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_POKEY_LEAN_FORWARD) + EndChildThread // lean forward - EVT_CALL(MakeLerp, -20, 30, 20, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CHILD_THREAD - EVT_WAIT(6) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_POKEY_LEAN_BACK) - EVT_END_CHILD_THREAD + Call(MakeLerp, -20, 30, 20, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + ChildThread + Wait(6) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_POKEY_LEAN_BACK) + EndChildThread // lean back - EVT_CALL(MakeLerp, 30, -40, 20, EASING_COS_IN_OUT) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_CHILD_THREAD - EVT_WAIT(4) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_POKEY_REACH_DOWN) - EVT_END_CHILD_THREAD + Call(MakeLerp, 30, -40, 20, EASING_COS_IN_OUT) + Label(2) + Call(UpdateLerp) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(2) + EndIf + ChildThread + Wait(4) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_POKEY_REACH_DOWN) + EndChildThread // smash into ground - EVT_CALL(MakeLerp, -40, 90, 10, EASING_COS_IN_OUT) - EVT_LABEL(3) - EVT_CALL(UpdateLerp) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(3) - EVT_END_IF - EVT_WAIT(20) + Call(MakeLerp, -40, 90, 10, EASING_COS_IN_OUT) + Label(3) + Call(UpdateLerp) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(3) + EndIf + Wait(20) // create new Pokey actor - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_POKEY_EMERGE_FROM_GROUND) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(SummonEnemy, EVT_PTR(N(SummonFormation)), FALSE) - EVT_SET(LVarB, LVar0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 40) - EVT_SUB(LVar1, 80) - EVT_CALL(SetActorPos, LVarB, LVar0, LVar1, LVar2) - EVT_CHILD_THREAD - EVT_PLAY_EFFECT(EFFECT_SHOCKWAVE, 2, LVar0, 0, LVar2, 0) - EVT_CALL(UseIdleAnimation, LVarB, FALSE) - EVT_CALL(SetAnimation, LVarB, 1, ANIM_Pokey_Hurt4) - EVT_CALL(GetActorPos, LVarB, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, LVarB, EVT_FLOAT(1.2)) - EVT_CALL(SetGoalPos, LVarB, LVar0, 0, LVar2) - EVT_CALL(JumpToGoal, LVarB, 20, FALSE, TRUE, FALSE) - EVT_WAIT(20) - EVT_CALL(GetActorPos, LVarB, LVar0, LVar1, LVar2) - EVT_CALL(SetAnimation, LVarB, 1, ANIM_Pokey_Idle4) - EVT_CALL(SetHomePos, LVarB, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, LVarB) - EVT_CALL(UseIdleAnimation, LVarB, TRUE) - EVT_END_CHILD_THREAD + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_POKEY_EMERGE_FROM_GROUND) + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.0)) + EndThread + Call(SummonEnemy, Ref(N(SummonFormation)), FALSE) + Set(LVarB, LVar0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 40) + Sub(LVar1, 80) + Call(SetActorPos, LVarB, LVar0, LVar1, LVar2) + ChildThread + PlayEffect(EFFECT_SHOCKWAVE, 2, LVar0, 0, LVar2, 0) + Call(UseIdleAnimation, LVarB, FALSE) + Call(SetAnimation, LVarB, 1, ANIM_Pokey_Hurt4) + Call(GetActorPos, LVarB, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, LVarB, Float(1.2)) + Call(SetGoalPos, LVarB, LVar0, 0, LVar2) + Call(JumpToGoal, LVarB, 20, FALSE, TRUE, FALSE) + Wait(20) + Call(GetActorPos, LVarB, LVar0, LVar1, LVar2) + Call(SetAnimation, LVarB, 1, ANIM_Pokey_Idle4) + Call(SetHomePos, LVarB, LVar0, LVar1, LVar2) + Call(HPBarToHome, LVarB) + Call(UseIdleAnimation, LVarB, TRUE) + EndChildThread // set generation of child to parent generation + 1 - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar1) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(AVAL_Generation_First) - EVT_CALL(SetActorVar, LVarB, AVAR_Generation, AVAL_Generation_Second) - EVT_CASE_EQ(AVAL_Generation_Second) - EVT_CALL(SetActorVar, LVarB, AVAR_Generation, AVAL_Generation_Last) - EVT_END_SWITCH - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_SET(LVarA, LVar0) + Call(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar1) + Switch(LVar1) + CaseEq(AVAL_Generation_First) + Call(SetActorVar, LVarB, AVAR_Generation, AVAL_Generation_Second) + CaseEq(AVAL_Generation_Second) + Call(SetActorVar, LVarB, AVAR_Generation, AVAL_Generation_Last) + EndSwitch + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Set(LVarA, LVar0) // pull back and overshoot - EVT_CALL(MakeLerp, 90, -30, 7, EASING_QUADRATIC_OUT) - EVT_LABEL(4) - EVT_CALL(UpdateLerp) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(4) - EVT_END_IF - EVT_WAIT(20) + Call(MakeLerp, 90, -30, 7, EASING_QUADRATIC_OUT) + Label(4) + Call(UpdateLerp) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(4) + EndIf + Wait(20) // correct overshoot - EVT_CALL(MakeLerp, -30, 0, 10, EASING_COS_IN_OUT) - EVT_LABEL(5) - EVT_CALL(UpdateLerp) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(5) - EVT_END_IF - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle4) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(MakeLerp, -30, 0, 10, EASING_COS_IN_OUT) + Label(5) + Call(UpdateLerp) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(5) + EndIf + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle4) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_SinglePartLeap) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_POKEY_STEP, SOUND_POKEY_STEP) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_POKEY_STEP, SOUND_NONE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Run1) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_EXEC_WAIT(EVS_Enemy_HopToPos) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle1) - EVT_WAIT(4) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(4) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Run1) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, DMG_LEAP, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_SET(LVar1, 10) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.1)) - EVT_CHILD_THREAD - EVT_WAIT(2) - EVT_SET(LVar0, 0) - EVT_LOOP(5) - EVT_ADD(LVar0, 30) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 22, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 10, 0) - EVT_CHILD_THREAD - EVT_WAIT(2) - EVT_SET(LVar0, 180) - EVT_LOOP(6) - EVT_ADD(LVar0, 30) - EVT_IF_EQ(LVar0, 360) - EVT_SET(LVar0, 0) - EVT_END_IF - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_END_CHILD_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Run1) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_EXEC_WAIT(EVS_Enemy_HopToPos) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle1) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.1)) - EVT_CHILD_THREAD - EVT_WAIT(2) - EVT_SET(LVar0, 0) - EVT_LOOP(5) - EVT_ADD(LVar0, 30) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 0), DMG_LEAP, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle1) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 10) - EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle1) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Run1) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_EXEC_WAIT(EVS_Enemy_HopToPos) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle1) - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_POKEY_STEP, SOUND_POKEY_STEP) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_POKEY_STEP, SOUND_NONE) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Run1) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + ExecWait(EVS_Enemy_HopToPos) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle1) + Wait(4) + Call(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(4) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Run1) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, DMG_LEAP, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Set(LVar1, 10) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.1)) + ChildThread + Wait(2) + Set(LVar0, 0) + Loop(5) + Add(LVar0, 30) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndChildThread + Call(JumpToGoal, ACTOR_SELF, 22, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetActorRotationOffset, ACTOR_SELF, 0, 10, 0) + ChildThread + Wait(2) + Set(LVar0, 180) + Loop(6) + Add(LVar0, 30) + IfEq(LVar0, 360) + Set(LVar0, 0) + EndIf + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + EndChildThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Run1) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + ExecWait(EVS_Enemy_HopToPos) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle1) + Return + EndCaseGroup + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.1)) + ChildThread + Wait(2) + Set(LVar0, 0) + Loop(5) + Add(LVar0, 30) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndChildThread + Call(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 0), DMG_LEAP, BS_FLAGS1_TRIGGER_EVENTS) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle1) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Sub(LVar0, 10) + Call(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle1) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Run1) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + ExecWait(EVS_Enemy_HopToPos) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Idle1) + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Pokey_SpinSmashHit) = { - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_KnockPartAway)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_KnockPartAway)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_KnockPartAway)) - EVT_CASE_EQ(3) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_SpinSmashHit) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) + Switch(LVarA) + CaseEq(0) + ExecWait(N(EVS_KnockPartAway)) + CaseEq(1) + ExecWait(N(EVS_KnockPartAway)) + CaseEq(2) + ExecWait(N(EVS_KnockPartAway)) + CaseEq(3) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_SpinSmashHit) + EndSwitch + Return + End }; #include "common/battle/SetAbsoluteStatusOffsets.inc.c" // set actor vars for new size one unit smaller than previous EvtScript N(EVS_DecrementSize) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Immune, ANIM_Pokey_Idle3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Run, ANIM_Pokey_Run3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Hit, ANIM_Pokey_Hurt3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Windup, ANIM_Pokey_Windup2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Throw, ANIM_Pokey_Throw2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_Pokey_BurnHurt3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_Pokey_BurnStill3) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ThreePartAnims))) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BODY3, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BODY3, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BODY2, ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BODY2, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_PartsThrown, 1) - EVT_CALL(SetActorSize, ACTOR_SELF, 62, EVT_IGNORE_ARG) - EVT_CALL(SetPartSize, ACTOR_SELF, PRT_MAIN, 62, EVT_IGNORE_ARG) - EVT_CALL(N(SetAbsoluteStatusOffsets), -15, 55, 10, 45) - EVT_CASE_EQ(1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Immune, ANIM_Pokey_Idle2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Run, ANIM_Pokey_Run2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Hit, ANIM_Pokey_Hurt2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Windup, ANIM_Pokey_Windup1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Throw, ANIM_Pokey_Throw1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_Pokey_BurnHurt2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_Pokey_BurnStill2) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(TwoPartAnims))) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BODY2, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BODY2, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BODY1, ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BODY1, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_PartsThrown, 2) - EVT_CALL(SetActorSize, ACTOR_SELF, 44, EVT_IGNORE_ARG) - EVT_CALL(SetPartSize, ACTOR_SELF, PRT_MAIN, 44, EVT_IGNORE_ARG) - EVT_CALL(N(SetAbsoluteStatusOffsets), -15, 35, 10, 25) - EVT_CASE_EQ(2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Immune, ANIM_Pokey_Idle1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Run, ANIM_Pokey_Run1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Hit, ANIM_Pokey_Hurt1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_Pokey_BurnHurt1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_Pokey_BurnStill1) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(OnePartAnims))) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BODY1, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BODY1, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SINGLE, ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SINGLE, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_PartsThrown, 3) - EVT_CALL(SetActorSize, ACTOR_SELF, 26, EVT_IGNORE_ARG) - EVT_CALL(SetPartSize, ACTOR_SELF, PRT_MAIN, 26, EVT_IGNORE_ARG) - EVT_CALL(N(SetAbsoluteStatusOffsets), -15, 15, 10, 5) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) + Switch(LVarA) + CaseEq(0) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Immune, ANIM_Pokey_Idle3) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Run, ANIM_Pokey_Run3) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Hit, ANIM_Pokey_Hurt3) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Windup, ANIM_Pokey_Windup2) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Throw, ANIM_Pokey_Throw2) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_Pokey_BurnHurt3) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_Pokey_BurnStill3) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ThreePartAnims))) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY3, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY3, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY2, ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY2, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_PartsThrown, 1) + Call(SetActorSize, ACTOR_SELF, 62, EVT_IGNORE_ARG) + Call(SetPartSize, ACTOR_SELF, PRT_MAIN, 62, EVT_IGNORE_ARG) + Call(N(SetAbsoluteStatusOffsets), -15, 55, 10, 45) + CaseEq(1) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Immune, ANIM_Pokey_Idle2) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Run, ANIM_Pokey_Run2) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Hit, ANIM_Pokey_Hurt2) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Windup, ANIM_Pokey_Windup1) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Throw, ANIM_Pokey_Throw1) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_Pokey_BurnHurt2) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_Pokey_BurnStill2) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(TwoPartAnims))) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY2, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY2, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY1, ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY1, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_PartsThrown, 2) + Call(SetActorSize, ACTOR_SELF, 44, EVT_IGNORE_ARG) + Call(SetPartSize, ACTOR_SELF, PRT_MAIN, 44, EVT_IGNORE_ARG) + Call(N(SetAbsoluteStatusOffsets), -15, 35, 10, 25) + CaseEq(2) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Immune, ANIM_Pokey_Idle1) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Run, ANIM_Pokey_Run1) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Hit, ANIM_Pokey_Hurt1) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_Pokey_BurnHurt1) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_Pokey_BurnStill1) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(OnePartAnims))) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY1, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY1, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SINGLE, ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SINGLE, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_PartsThrown, 3) + Call(SetActorSize, ACTOR_SELF, 26, EVT_IGNORE_ARG) + Call(SetPartSize, ACTOR_SELF, PRT_MAIN, 26, EVT_IGNORE_ARG) + Call(N(SetAbsoluteStatusOffsets), -15, 15, 10, 5) + EndSwitch + Return + End }; EvtScript N(EVS_HitReactionBounce) = { - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 18) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar1) - EVT_WAIT(2) - EVT_SUB(LVar3, 1) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(3) - EVT_SUB(LVar3, 2) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(2) - EVT_SUB(LVar3, 3) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(1) - EVT_SUB(LVar3, 5) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(1) - EVT_SUB(LVar3, 7) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar3, 2) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar3, 3) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar3, 3) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(1) - EVT_SUB(LVar3, 3) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(1) - EVT_SUB(LVar3, 3) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(1) - EVT_SUB(LVar3, 2) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_RETURN - EVT_END + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 18) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar3, LVar1) + Wait(2) + Sub(LVar3, 1) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(3) + Sub(LVar3, 2) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(2) + Sub(LVar3, 3) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(1) + Sub(LVar3, 5) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(1) + Sub(LVar3, 7) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(1) + Add(LVar3, 2) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(1) + Add(LVar3, 3) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(1) + Add(LVar3, 3) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(1) + Sub(LVar3, 3) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(1) + Sub(LVar3, 3) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(1) + Sub(LVar3, 2) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Return + End }; EvtScript N(EVS_KnockPartAway) = { - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_ELSE - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(1.0)) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_DecrementSize)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CHILD_THREAD - EVT_WAIT(4) - EVT_EXEC_WAIT(N(EVS_HitReactionBounce)) - EVT_END_CHILD_THREAD - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_GROUND | TARGET_FLAG_PRIMARY_ONLY | TARGET_FLAG_ALLOW_TARGET_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerID, LVar1) - EVT_CALL(GetOwnerTarget, LVar0, LVar9) - EVT_IF_NE(LVar1, LVar0) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_GOTO(0) - EVT_END_IF - EVT_LABEL(1) - EVT_ADD(LVarF, 1) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_EQ(LVar0, ITER_NO_MORE) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GetOwnerTarget, LVar0, LVar9) - EVT_CALL(GetActorFlags, LVar0, LVar1) - EVT_IF_FLAG(LVar1, ACTOR_FLAG_TARGET_ONLY) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetOwnerID, LVar0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(0.1)) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(7.0)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, TRUE) - EVT_CHILD_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_END_CHILD_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(DispatchDamageEvent, LVar0, 1, EVENT_SPIN_SMASH_LAUNCH_HIT) - EVT_GOTO(1) - EVT_LABEL(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(0.1)) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(6.0)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, 296, 0, 0, 0, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_RETURN - EVT_END + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2) + Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, Float(1.0), Float(1.0), Float(1.0)) + Else + Call(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, Float(0.4), Float(0.4), Float(1.0)) + EndIf + ExecWait(N(EVS_DecrementSize)) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + ChildThread + Wait(4) + ExecWait(N(EVS_HitReactionBounce)) + EndChildThread + Call(CreateHomeTargetList, TARGET_FLAG_GROUND | TARGET_FLAG_PRIMARY_ONLY | TARGET_FLAG_ALLOW_TARGET_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerID, LVar1) + Call(GetOwnerTarget, LVar0, LVar9) + IfNe(LVar1, LVar0) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + Goto(0) + EndIf + Label(1) + Add(LVarF, 1) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfEq(LVar0, ITER_NO_MORE) + Goto(10) + EndIf + Call(GetOwnerTarget, LVar0, LVar9) + Call(GetActorFlags, LVar0, LVar1) + IfFlag(LVar1, ACTOR_FLAG_TARGET_ONLY) + Goto(1) + EndIf + Call(GetOwnerID, LVar0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, Float(0.1)) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, Float(7.0)) + Call(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, TRUE) + ChildThread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + EndChildThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetOwnerTarget, LVar0, LVar1) + Call(DispatchDamageEvent, LVar0, 1, EVENT_SPIN_SMASH_LAUNCH_HIT) + Goto(1) + Label(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, Float(0.1)) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, Float(6.0)) + Call(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, 296, 0, 0, 0, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Return + End }; EvtScript N(EVS_Pokey_Hit) = { - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_ELSE - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(1.0)) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_DecrementSize)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar1) - EVT_SWITCH(LVar1) - EVT_CASE_OR_EQ(EVENT_BURN_HIT) - EVT_CASE_OR_EQ(EVENT_BURN_DEATH) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_PROJECTILE, ANIM_Pokey_BurnedProjectile) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, LVar1) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CHILD_THREAD - EVT_WAIT(4) - EVT_EXEC_WAIT(N(EVS_HitReactionBounce)) - EVT_END_CHILD_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) - EVT_IF_NE(LVarA, 3) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(6.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 10, 18, EASING_LINEAR) - EVT_ADD(LVar0, 20) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 8, 10, EASING_LINEAR) - EVT_LOOP(20) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_ELSE - EVT_WAIT(30) - EVT_END_IF - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorSize, ACTOR_SELF, LVar3, LVar4) - EVT_DIV(LVar3, 2) - EVT_ADD(LVar1, LVar3) - EVT_ADD(LVar2, 5) - EVT_DIVF(LVar3, EVT_FLOAT(10.0)) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, LVar3, 10, 0) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_WAIT(10) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, Float(1.0), Float(1.0), Float(1.0)) + Else + Call(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, Float(0.4), Float(0.4), Float(1.0)) + EndIf + ExecWait(N(EVS_DecrementSize)) + SetConst(LVar0, PRT_MAIN) + Call(GetLastEvent, ACTOR_SELF, LVar1) + Switch(LVar1) + CaseOrEq(EVENT_BURN_HIT) + CaseOrEq(EVENT_BURN_DEATH) + Call(SetAnimation, ACTOR_SELF, PRT_PROJECTILE, ANIM_Pokey_BurnedProjectile) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, LVar1) + EndCaseGroup + CaseDefault + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + EndSwitch + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + ChildThread + Wait(4) + ExecWait(N(EVS_HitReactionBounce)) + EndChildThread + Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) + IfNe(LVarA, 3) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2) + Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, Float(6.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Set(LVar1, 0) + Call(FlyPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 10, 18, EASING_LINEAR) + Add(LVar0, 20) + Call(FlyPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 8, 10, EASING_LINEAR) + Loop(20) + Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Else + Wait(30) + EndIf + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_BURN_HIT) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorSize, ACTOR_SELF, LVar3, LVar4) + Div(LVar3, 2) + Add(LVar1, LVar3) + Add(LVar2, 5) + DivF(LVar3, Float(10.0)) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, LVar3, 10, 0) + CaseEq(EVENT_BURN_DEATH) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) + Wait(10) + CaseDefault + EndSwitch + Return + End }; EvtScript N(EVS_Pokey_ScareAway) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar9) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.05)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_SET(LVarD, LVarB) - EVT_ADD(LVarD, 40) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarD, LVarC) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_WAIT(20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(FallToGoal, ACTOR_SELF, 10) - EVT_WAIT(20) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_WAIT(5) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(0) - EVT_SET(LVar2, 96) - EVT_SET(LVar6, 4) - EVT_CASE_EQ(1) - EVT_SET(LVar2, 72) - EVT_SET(LVar6, 3) - EVT_CASE_EQ(2) - EVT_SET(LVar2, 48) - EVT_SET(LVar6, 2) - EVT_CASE_DEFAULT - EVT_SET(LVar2, 24) - EVT_SET(LVar6, 1) - EVT_END_SWITCH - EVT_CHILD_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_LOOP(LVar6) - EVT_PLAY_EFFECT(EFFECT_SHOCKWAVE, 2, LVarA, 0, LVarC, 0) - EVT_WAIT(10) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_SUB(LVar4, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 0, EASING_LINEAR) - EVT_WAIT(8) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetActorFlags, ACTOR_SELF, LVar9) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.05)) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Set(LVarD, LVarB) + Add(LVarD, 40) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarD, LVarC) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Wait(20) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(FallToGoal, ACTOR_SELF, 10) + Wait(20) + Call(SetActorYaw, ACTOR_SELF, 180) + Wait(5) + Call(SetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVar2) + Switch(LVar2) + CaseEq(0) + Set(LVar2, 96) + Set(LVar6, 4) + CaseEq(1) + Set(LVar2, 72) + Set(LVar6, 3) + CaseEq(2) + Set(LVar2, 48) + Set(LVar6, 2) + CaseDefault + Set(LVar2, 24) + Set(LVar6, 1) + EndSwitch + ChildThread + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Loop(LVar6) + PlayEffect(EFFECT_SHOCKWAVE, 2, LVarA, 0, LVarC, 0) + Wait(10) + EndLoop + EndChildThread + Call(SetActorSpeed, ACTOR_SELF, Float(2.0)) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Sub(LVar4, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Call(FlyToGoal, ACTOR_SELF, 0, 0, EASING_LINEAR) + Wait(8) + Call(HideHealthBar, ACTOR_SELF) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(RemoveActor, ACTOR_SELF) + Return + End }; diff --git a/src/battle/common/actor/pokey_mummy.inc.c b/src/battle/common/actor/pokey_mummy.inc.c index 283107f5c7a..ff61c5c3528 100644 --- a/src/battle/common/actor/pokey_mummy.inc.c +++ b/src/battle/common/actor/pokey_mummy.inc.c @@ -233,808 +233,808 @@ s32 N(ThrownPartAnims)[] = { #include "common/battle/SetAbsoluteStatusOffsets.inc.c" EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Generation, AVAL_Generation_First) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_Generation, AVAL_Generation_First) // copy input var from Formation - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IN_CantSummon, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_CantSummon, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_PartsThrown, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Immune, ANIM_Pokey_Mummy_Idle4) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Run, ANIM_Pokey_Mummy_Run4) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Hit, ANIM_Pokey_Mummy_Hurt4) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Windup, ANIM_Pokey_Mummy_Windup3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Throw, ANIM_Pokey_Mummy_Throw3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_Pokey_Mummy_BurnHurt4) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_Pokey_Mummy_BurnStill4) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_IN_CantSummon, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_CantSummon, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_PartsThrown, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Immune, ANIM_Pokey_Mummy_Idle4) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Run, ANIM_Pokey_Mummy_Run4) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Hit, ANIM_Pokey_Mummy_Hurt4) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Windup, ANIM_Pokey_Mummy_Windup3) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Throw, ANIM_Pokey_Mummy_Throw3) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_Pokey_Mummy_BurnHurt4) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_Pokey_Mummy_BurnStill4) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_HIT) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_ELSE - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) - EVT_IF_EQ(LVarA, 3) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_ELSE - EVT_CALL(GetDamageSource, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(DMG_SRC_SHELL_TOSS) - EVT_CASE_OR_EQ(DMG_SRC_POWER_SHELL) - EVT_CASE_OR_EQ(DMG_SRC_FIRE_SHELL) - EVT_EXEC_WAIT(N(EVS_Pokey_Hit)) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_SWITCH - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(EVENT_DEATH) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_ELSE - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) - EVT_IF_EQ(LVarA, 3) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_ELSE - EVT_CALL(GetDamageSource, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(DMG_SRC_SHELL_TOSS) - EVT_CASE_OR_EQ(DMG_SRC_POWER_SHELL) - EVT_CASE_OR_EQ(DMG_SRC_FIRE_SHELL) - EVT_EXEC_WAIT(N(EVS_Pokey_Hit)) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_END_SWITCH - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, LVar1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar2) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_ELSE - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) - EVT_IF_EQ(LVarA, 3) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_ELSE - EVT_CALL(GetDamageSource, LVarA) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(DMG_SRC_SHELL_TOSS) - EVT_CASE_OR_EQ(DMG_SRC_POWER_SHELL) - EVT_CASE_OR_EQ(DMG_SRC_FIRE_SHELL) - EVT_EXEC_WAIT(N(EVS_Pokey_Hit)) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_END_SWITCH - EVT_END_IF - EVT_END_IF - EVT_CASE_OR_EQ(EVENT_BURN_DEATH) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, LVar1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar2) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_ELSE - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) - EVT_IF_EQ(LVarA, 3) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_ELSE - EVT_CALL(GetDamageSource, LVarA) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(DMG_SRC_SHELL_TOSS) - EVT_CASE_OR_EQ(DMG_SRC_POWER_SHELL) - EVT_CASE_OR_EQ(DMG_SRC_FIRE_SHELL) - EVT_EXEC_WAIT(N(EVS_Pokey_Hit)) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_END_SWITCH - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_EXEC_WAIT(N(EVS_Pokey_SpinSmashHit)) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_EXEC_WAIT(N(EVS_Pokey_SpinSmashHit)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_LAUNCH_HIT) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Pokey_Hit)) - EVT_END_IF - EVT_CASE_EQ(EVENT_SPIN_SMASH_LAUNCH_DEATH) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Pokey_Hit)) - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, -1) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Run, LVar1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_EXEC_WAIT(EVS_Enemy_HopToPos) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Immune, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIKE_TAUNT) - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_PARTNER_ACTING) - EVT_CALL(AfflictActor, ACTOR_PLAYER, STATUS_KEY_POISON, 3) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 77) - EVT_SET_CONST(LVar2, ANIM_Pokey_Mummy_Dizzy4) - EVT_CASE_EQ(1) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 59) - EVT_SET_CONST(LVar2, ANIM_Pokey_Mummy_Dizzy3) - EVT_CASE_EQ(2) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 41) - EVT_SET_CONST(LVar2, ANIM_Pokey_Mummy_Dizzy2) - EVT_CASE_EQ(3) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 23) - EVT_SET_CONST(LVar2, ANIM_Pokey_Mummy_Dizzy1) - EVT_END_SWITCH - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAG_SLEEP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar2) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar6) - EVT_IF_FLAG(LVar6, STATUS_FLAG_SHRINK) - EVT_MULF(LVar0, EVT_FLOAT(0.4)) - EVT_MULF(LVar1, EVT_FLOAT(0.4)) - EVT_END_IF - EVT_ADDF(LVar3, LVar0) - EVT_ADDF(LVar4, LVar1) - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar3, LVar4, LVar5, 20, 0) - EVT_WAIT(30) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Immune, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_EXEC_WAIT(N(EVS_Pokey_ScareAway)) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_HIT) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_Hit) + Else + Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) + IfEq(LVarA, 3) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_Hit) + Else + Call(GetDamageSource, LVar0) + Switch(LVar0) + CaseOrEq(DMG_SRC_SHELL_TOSS) + CaseOrEq(DMG_SRC_POWER_SHELL) + CaseOrEq(DMG_SRC_FIRE_SHELL) + ExecWait(N(EVS_Pokey_Hit)) + EndCaseGroup + CaseDefault + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_Hit) + EndSwitch + EndIf + EndIf + CaseEq(EVENT_DEATH) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_Hit) + Wait(10) + Else + Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) + IfEq(LVarA, 3) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_Hit) + Wait(10) + Else + Call(GetDamageSource, LVar0) + Switch(LVar0) + CaseOrEq(DMG_SRC_SHELL_TOSS) + CaseOrEq(DMG_SRC_POWER_SHELL) + CaseOrEq(DMG_SRC_FIRE_SHELL) + ExecWait(N(EVS_Pokey_Hit)) + EndCaseGroup + CaseDefault + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_Hit) + Wait(10) + EndSwitch + EndIf + EndIf + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_BURN_HIT) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, LVar1) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar2) + SetConst(LVar0, PRT_MAIN) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + ExecWait(EVS_Enemy_BurnHit) + Else + Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) + IfEq(LVarA, 3) + ExecWait(EVS_Enemy_BurnHit) + Else + Call(GetDamageSource, LVarA) + Switch(LVarA) + CaseOrEq(DMG_SRC_SHELL_TOSS) + CaseOrEq(DMG_SRC_POWER_SHELL) + CaseOrEq(DMG_SRC_FIRE_SHELL) + ExecWait(N(EVS_Pokey_Hit)) + EndCaseGroup + CaseDefault + ExecWait(EVS_Enemy_BurnHit) + EndSwitch + EndIf + EndIf + CaseOrEq(EVENT_BURN_DEATH) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, LVar1) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar2) + SetConst(LVar0, PRT_MAIN) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + ExecWait(EVS_Enemy_BurnHit) + Else + Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) + IfEq(LVarA, 3) + ExecWait(EVS_Enemy_BurnHit) + Else + Call(GetDamageSource, LVarA) + Switch(LVarA) + CaseOrEq(DMG_SRC_SHELL_TOSS) + CaseOrEq(DMG_SRC_POWER_SHELL) + CaseOrEq(DMG_SRC_FIRE_SHELL) + ExecWait(N(EVS_Pokey_Hit)) + EndCaseGroup + CaseDefault + ExecWait(EVS_Enemy_BurnHit) + EndSwitch + EndIf + EndIf + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar1) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + ExecWait(N(EVS_Pokey_SpinSmashHit)) + CaseEq(EVENT_SPIN_SMASH_DEATH) + ExecWait(N(EVS_Pokey_SpinSmashHit)) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_LAUNCH_HIT) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_Hit) + Else + ExecWait(N(EVS_Pokey_Hit)) + EndIf + CaseEq(EVENT_SPIN_SMASH_LAUNCH_DEATH) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_Hit) + Else + ExecWait(N(EVS_Pokey_Hit)) + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, -1) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_ShockHit) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Run, LVar1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + ExecWait(EVS_Enemy_HopToPos) + CaseEq(EVENT_SHOCK_DEATH) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Immune, LVar1) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_SPIKE_TAUNT) + Call(GetBattleFlags, LVar0) + IfNotFlag(LVar0, BS_FLAGS1_PARTNER_ACTING) + Call(AfflictActor, ACTOR_PLAYER, STATUS_KEY_POISON, 3) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVar0) + Switch(LVar0) + CaseEq(0) + Set(LVar0, 0) + Set(LVar1, 77) + SetConst(LVar2, ANIM_Pokey_Mummy_Dizzy4) + CaseEq(1) + Set(LVar0, 0) + Set(LVar1, 59) + SetConst(LVar2, ANIM_Pokey_Mummy_Dizzy3) + CaseEq(2) + Set(LVar0, 0) + Set(LVar1, 41) + SetConst(LVar2, ANIM_Pokey_Mummy_Dizzy2) + CaseEq(3) + Set(LVar0, 0) + Set(LVar1, 23) + SetConst(LVar2, ANIM_Pokey_Mummy_Dizzy1) + EndSwitch + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfNotFlag(LVar3, STATUS_FLAG_SLEEP) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar2) + EndIf + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Call(GetStatusFlags, ACTOR_SELF, LVar6) + IfFlag(LVar6, STATUS_FLAG_SHRINK) + MulF(LVar0, Float(0.4)) + MulF(LVar1, Float(0.4)) + EndIf + AddF(LVar3, LVar0) + AddF(LVar4, LVar1) + PlayEffect(EFFECT_LENS_FLARE, 0, LVar3, LVar4, LVar5, 20, 0) + Wait(30) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Immune, LVar1) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + ExecWait(N(EVS_Pokey_ScareAway)) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) - EVT_IF_EQ(LVarA, 3) - EVT_EXEC_WAIT(N(EVS_Attack_SinglePartLeap)) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 1) - EVT_END_IF - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_PROJECTILE, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_ELSE - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CHILD_THREAD - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(2.2)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_PROJECTILE, ANIM_Pokey_Mummy_Projectile) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(0) - EVT_IF_NOT_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 38) - EVT_ELSE - EVT_ADD(LVar1, 15) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(1.2)) - EVT_END_IF - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 15, TRUE) - EVT_CASE_EQ(1) - EVT_IF_NOT_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 20) - EVT_ELSE - EVT_ADD(LVar1, 8) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(1.2)) - EVT_END_IF - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 15, TRUE) - EVT_CASE_EQ(2) - EVT_IF_NOT_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 8) - EVT_ELSE - EVT_ADD(LVar1, 3) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(1.2)) - EVT_END_IF - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 15, TRUE) - EVT_CASE_EQ(3) - EVT_END_SWITCH - EVT_END_CHILD_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_POKEY_SWAY) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Windup, LVar1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_WAIT(12) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Throw, LVar1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_POKEY_THROW) - EVT_WAIT(3) - EVT_EXEC_WAIT(N(EVS_DecrementSize)) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 2, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_IF_EQ(LVar0, HIT_RESULT_LUCKY) - EVT_CHILD_THREAD - EVT_WAIT(5) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_CHILD_THREAD - EVT_END_IF - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 80) - EVT_SUB(LVar1, 5) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(20.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(0.1)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_PROJECTILE, ANIM_Pokey_Mummy_Projectile) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Run, LVar1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(20.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(0.1)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_PROJECTILE, ANIM_Pokey_Mummy_Projectile) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, TRUE) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 40), DMG_THROW_PART, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Run, LVar1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 55) - EVT_SET(LVar1, 0) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(6.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(0.1)) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, 25, EASING_LINEAR) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(4.0)) - EVT_SUB(LVar0, 24) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, 21, EASING_LINEAR) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(3.0)) - EVT_SUB(LVar0, 20) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, 20, EASING_LINEAR) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) + IfEq(LVarA, 3) + ExecWait(N(EVS_Attack_SinglePartLeap)) + Return + EndIf + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 1) + EndIf + Call(SetPartSounds, ACTOR_SELF, PRT_PROJECTILE, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, Float(1.0), Float(1.0), Float(1.0)) + Else + Call(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, Float(0.4), Float(0.4), Float(1.0)) + EndIf + ChildThread + Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, Float(2.2)) + Call(SetAnimation, ACTOR_SELF, PRT_PROJECTILE, ANIM_Pokey_Mummy_Projectile) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) + Switch(LVarA) + CaseEq(0) + IfNotFlag(LVar5, STATUS_FLAG_SHRINK) + Add(LVar1, 38) + Else + Add(LVar1, 15) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, Float(1.2)) + EndIf + Call(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 15, TRUE) + CaseEq(1) + IfNotFlag(LVar5, STATUS_FLAG_SHRINK) + Add(LVar1, 20) + Else + Add(LVar1, 8) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, Float(1.2)) + EndIf + Call(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 15, TRUE) + CaseEq(2) + IfNotFlag(LVar5, STATUS_FLAG_SHRINK) + Add(LVar1, 8) + Else + Add(LVar1, 3) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, Float(1.2)) + EndIf + Call(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 15, TRUE) + CaseEq(3) + EndSwitch + EndChildThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_POKEY_SWAY) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Windup, LVar1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) + Wait(12) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Throw, LVar1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) + Wait(1) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_POKEY_THROW) + Wait(3) + ExecWait(N(EVS_DecrementSize)) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 2, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + IfEq(LVar0, HIT_RESULT_LUCKY) + ChildThread + Wait(5) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndChildThread + EndIf + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 80) + Sub(LVar1, 5) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, Float(20.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, Float(0.1)) + Call(SetAnimation, ACTOR_SELF, PRT_PROJECTILE, ANIM_Pokey_Mummy_Projectile) + Call(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Run, LVar1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) + Return + EndCaseGroup + EndSwitch + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, Float(20.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, Float(0.1)) + Call(SetAnimation, ACTOR_SELF, PRT_PROJECTILE, ANIM_Pokey_Mummy_Projectile) + Call(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, TRUE) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 40), DMG_THROW_PART, BS_FLAGS1_TRIGGER_EVENTS) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Run, LVar1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Sub(LVar0, 55) + Set(LVar1, 0) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, Float(6.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, Float(0.1)) + Call(FlyPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, 25, EASING_LINEAR) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, Float(4.0)) + Sub(LVar0, 24) + Call(FlyPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, 21, EASING_LINEAR) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, Float(3.0)) + Sub(LVar0, 20) + Call(FlyPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, 20, EASING_LINEAR) + Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, TRUE) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_SinglePartLeap) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_POKEY_STEP, SOUND_POKEY_STEP) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_POKEY_STEP, SOUND_NONE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Mummy_Run1) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_EXEC_WAIT(EVS_Enemy_HopToPos) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Mummy_Idle1) - EVT_WAIT(4) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(4) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Mummy_Run1) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_SET(LVar1, 10) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.1)) - EVT_CHILD_THREAD - EVT_WAIT(2) - EVT_SET(LVar0, 0) - EVT_LOOP(5) - EVT_ADD(LVar0, 30) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 22, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 10, 0) - EVT_CHILD_THREAD - EVT_WAIT(2) - EVT_SET(LVar0, 180) - EVT_LOOP(6) - EVT_ADD(LVar0, 30) - EVT_IF_EQ(LVar0, 360) - EVT_SET(LVar0, 0) - EVT_END_IF - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_END_CHILD_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Mummy_Run1) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_EXEC_WAIT(EVS_Enemy_HopToPos) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Mummy_Idle1) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.1)) - EVT_CHILD_THREAD - EVT_WAIT(2) - EVT_SET(LVar0, 0) - EVT_LOOP(5) - EVT_ADD(LVar0, 30) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 100), DMG_LEAP, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Mummy_Idle1) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 10) - EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Mummy_Idle1) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Mummy_Run1) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_EXEC_WAIT(EVS_Enemy_HopToPos) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Mummy_Idle1) - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_POKEY_STEP, SOUND_POKEY_STEP) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_POKEY_STEP, SOUND_NONE) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Mummy_Run1) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + ExecWait(EVS_Enemy_HopToPos) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Mummy_Idle1) + Wait(4) + Call(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(4) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Mummy_Run1) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Set(LVar1, 10) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.1)) + ChildThread + Wait(2) + Set(LVar0, 0) + Loop(5) + Add(LVar0, 30) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndChildThread + Call(JumpToGoal, ACTOR_SELF, 22, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetActorRotationOffset, ACTOR_SELF, 0, 10, 0) + ChildThread + Wait(2) + Set(LVar0, 180) + Loop(6) + Add(LVar0, 30) + IfEq(LVar0, 360) + Set(LVar0, 0) + EndIf + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + EndChildThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Mummy_Run1) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + ExecWait(EVS_Enemy_HopToPos) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Mummy_Idle1) + Return + EndCaseGroup + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.1)) + ChildThread + Wait(2) + Set(LVar0, 0) + Loop(5) + Add(LVar0, 30) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndChildThread + Call(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 100), DMG_LEAP, BS_FLAGS1_TRIGGER_EVENTS) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Mummy_Idle1) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Sub(LVar0, 10) + Call(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Mummy_Idle1) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Mummy_Run1) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + ExecWait(EVS_Enemy_HopToPos) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Pokey_Mummy_Idle1) + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Pokey_SpinSmashHit) = { - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_KnockPartAway)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_KnockPartAway)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_KnockPartAway)) - EVT_CASE_EQ(3) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_SpinSmashHit) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) + Switch(LVarA) + CaseEq(0) + ExecWait(N(EVS_KnockPartAway)) + CaseEq(1) + ExecWait(N(EVS_KnockPartAway)) + CaseEq(2) + ExecWait(N(EVS_KnockPartAway)) + CaseEq(3) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + ExecWait(EVS_Enemy_SpinSmashHit) + EndSwitch + Return + End }; EvtScript N(EVS_DecrementSize) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Immune, ANIM_Pokey_Mummy_Idle3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Run, ANIM_Pokey_Mummy_Run3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Hit, ANIM_Pokey_Mummy_Hurt3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Windup, ANIM_Pokey_Mummy_Windup2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Throw, ANIM_Pokey_Mummy_Throw2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_Pokey_Mummy_BurnHurt3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_Pokey_Mummy_BurnStill3) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ThreePartAnims))) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BODY3, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BODY3, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BODY2, ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BODY2, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_PartsThrown, 1) - EVT_CALL(SetActorSize, ACTOR_SELF, 62, EVT_IGNORE_ARG) - EVT_CALL(SetPartSize, ACTOR_SELF, PRT_MAIN, 62, EVT_IGNORE_ARG) - EVT_CALL(N(SetAbsoluteStatusOffsets), -15, 55, 10, 45) - EVT_CASE_EQ(1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Immune, ANIM_Pokey_Mummy_Idle2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Run, ANIM_Pokey_Mummy_Run2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Hit, ANIM_Pokey_Mummy_Hurt2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Windup, ANIM_Pokey_Mummy_Windup1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Throw, ANIM_Pokey_Mummy_Throw1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_Pokey_Mummy_BurnHurt2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_Pokey_Mummy_BurnStill2) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(TwoPartAnims))) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BODY2, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BODY2, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BODY1, ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BODY1, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_PartsThrown, 2) - EVT_CALL(SetActorSize, ACTOR_SELF, 44, EVT_IGNORE_ARG) - EVT_CALL(SetPartSize, ACTOR_SELF, PRT_MAIN, 44, EVT_IGNORE_ARG) - EVT_CALL(N(SetAbsoluteStatusOffsets), -15, 35, 10, 25) - EVT_CASE_EQ(2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Immune, ANIM_Pokey_Mummy_Idle1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Run, ANIM_Pokey_Mummy_Run1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_Hit, ANIM_Pokey_Mummy_Hurt1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_Pokey_Mummy_BurnHurt1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_Pokey_Mummy_BurnStill1) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(OnePartAnims))) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BODY1, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BODY1, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SINGLE, ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SINGLE, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_PartsThrown, 3) - EVT_CALL(SetActorSize, ACTOR_SELF, 26, EVT_IGNORE_ARG) - EVT_CALL(SetPartSize, ACTOR_SELF, PRT_MAIN, 26, EVT_IGNORE_ARG) - EVT_CALL(N(SetAbsoluteStatusOffsets), -15, 15, 10, 5) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) + Switch(LVarA) + CaseEq(0) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Immune, ANIM_Pokey_Mummy_Idle3) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Run, ANIM_Pokey_Mummy_Run3) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Hit, ANIM_Pokey_Mummy_Hurt3) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Windup, ANIM_Pokey_Mummy_Windup2) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Throw, ANIM_Pokey_Mummy_Throw2) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_Pokey_Mummy_BurnHurt3) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_Pokey_Mummy_BurnStill3) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ThreePartAnims))) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY3, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY3, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY2, ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY2, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_PartsThrown, 1) + Call(SetActorSize, ACTOR_SELF, 62, EVT_IGNORE_ARG) + Call(SetPartSize, ACTOR_SELF, PRT_MAIN, 62, EVT_IGNORE_ARG) + Call(N(SetAbsoluteStatusOffsets), -15, 55, 10, 45) + CaseEq(1) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Immune, ANIM_Pokey_Mummy_Idle2) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Run, ANIM_Pokey_Mummy_Run2) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Hit, ANIM_Pokey_Mummy_Hurt2) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Windup, ANIM_Pokey_Mummy_Windup1) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Throw, ANIM_Pokey_Mummy_Throw1) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_Pokey_Mummy_BurnHurt2) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_Pokey_Mummy_BurnStill2) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(TwoPartAnims))) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY2, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY2, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY1, ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY1, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_PartsThrown, 2) + Call(SetActorSize, ACTOR_SELF, 44, EVT_IGNORE_ARG) + Call(SetPartSize, ACTOR_SELF, PRT_MAIN, 44, EVT_IGNORE_ARG) + Call(N(SetAbsoluteStatusOffsets), -15, 35, 10, 25) + CaseEq(2) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Immune, ANIM_Pokey_Mummy_Idle1) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Run, ANIM_Pokey_Mummy_Run1) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_Hit, ANIM_Pokey_Mummy_Hurt1) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, ANIM_Pokey_Mummy_BurnHurt1) + Call(SetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, ANIM_Pokey_Mummy_BurnStill1) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(OnePartAnims))) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY1, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BODY1, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SINGLE, ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SINGLE, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_PartsThrown, 3) + Call(SetActorSize, ACTOR_SELF, 26, EVT_IGNORE_ARG) + Call(SetPartSize, ACTOR_SELF, PRT_MAIN, 26, EVT_IGNORE_ARG) + Call(N(SetAbsoluteStatusOffsets), -15, 15, 10, 5) + EndSwitch + Return + End }; EvtScript N(EVS_HitReactionBounce) = { - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 18) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar1) - EVT_WAIT(2) - EVT_SUB(LVar3, 1) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(3) - EVT_SUB(LVar3, 2) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(2) - EVT_SUB(LVar3, 3) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(1) - EVT_SUB(LVar3, 5) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(1) - EVT_SUB(LVar3, 7) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar3, 2) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar3, 3) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar3, 3) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(1) - EVT_SUB(LVar3, 3) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(1) - EVT_SUB(LVar3, 3) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_WAIT(1) - EVT_SUB(LVar3, 2) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) - EVT_RETURN - EVT_END + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 18) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar3, LVar1) + Wait(2) + Sub(LVar3, 1) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(3) + Sub(LVar3, 2) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(2) + Sub(LVar3, 3) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(1) + Sub(LVar3, 5) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(1) + Sub(LVar3, 7) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(1) + Add(LVar3, 2) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(1) + Add(LVar3, 3) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(1) + Add(LVar3, 3) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(1) + Sub(LVar3, 3) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(1) + Sub(LVar3, 3) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Wait(1) + Sub(LVar3, 2) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar3, LVar2) + Return + End }; EvtScript N(EVS_KnockPartAway) = { - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_ELSE - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(1.0)) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_DecrementSize)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CHILD_THREAD - EVT_WAIT(4) - EVT_EXEC_WAIT(N(EVS_HitReactionBounce)) - EVT_END_CHILD_THREAD - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_GROUND | TARGET_FLAG_PRIMARY_ONLY | TARGET_FLAG_ALLOW_TARGET_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerID, LVar1) - EVT_CALL(GetOwnerTarget, LVar0, LVar9) - EVT_IF_NE(LVar1, LVar0) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_GOTO(0) - EVT_END_IF - EVT_LABEL(1) - EVT_ADD(LVarF, 1) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_EQ(LVar0, ITER_NO_MORE) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GetOwnerTarget, LVar0, LVar9) - EVT_CALL(GetActorFlags, LVar0, LVar1) - EVT_IF_FLAG(LVar1, ACTOR_FLAG_TARGET_ONLY) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetOwnerID, LVar0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(0.1)) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(7.0)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, TRUE) - EVT_CHILD_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_END_CHILD_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(DispatchDamageEvent, LVar0, 1, EVENT_SPIN_SMASH_LAUNCH_HIT) - EVT_GOTO(1) - EVT_LABEL(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(0.1)) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(6.0)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, 296, 0, 0, 0, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_RETURN - EVT_END + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2) + Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, Float(1.0), Float(1.0), Float(1.0)) + Else + Call(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, Float(0.4), Float(0.4), Float(1.0)) + EndIf + ExecWait(N(EVS_DecrementSize)) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + ChildThread + Wait(4) + ExecWait(N(EVS_HitReactionBounce)) + EndChildThread + Call(CreateHomeTargetList, TARGET_FLAG_GROUND | TARGET_FLAG_PRIMARY_ONLY | TARGET_FLAG_ALLOW_TARGET_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerID, LVar1) + Call(GetOwnerTarget, LVar0, LVar9) + IfNe(LVar1, LVar0) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + Goto(0) + EndIf + Label(1) + Add(LVarF, 1) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfEq(LVar0, ITER_NO_MORE) + Goto(10) + EndIf + Call(GetOwnerTarget, LVar0, LVar9) + Call(GetActorFlags, LVar0, LVar1) + IfFlag(LVar1, ACTOR_FLAG_TARGET_ONLY) + Goto(1) + EndIf + Call(GetOwnerID, LVar0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, Float(0.1)) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, Float(7.0)) + Call(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 0, TRUE) + ChildThread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + EndChildThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetOwnerTarget, LVar0, LVar1) + Call(DispatchDamageEvent, LVar0, 1, EVENT_SPIN_SMASH_LAUNCH_HIT) + Goto(1) + Label(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_PROJECTILE, Float(0.1)) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, Float(6.0)) + Call(JumpPartTo, ACTOR_SELF, PRT_PROJECTILE, 296, 0, 0, 0, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Return + End }; EvtScript N(EVS_Pokey_Hit) = { - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_ELSE - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(1.0)) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_DecrementSize)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar1) - EVT_SWITCH(LVar1) - EVT_CASE_OR_EQ(EVENT_BURN_HIT) - EVT_CASE_OR_EQ(EVENT_BURN_DEATH) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_PROJECTILE, ANIM_Pokey_BurnedProjectile) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, LVar1) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CHILD_THREAD - EVT_WAIT(4) - EVT_EXEC_WAIT(N(EVS_HitReactionBounce)) - EVT_END_CHILD_THREAD - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) - EVT_IF_NE(LVarA, 3) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, EVT_FLOAT(6.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 10, 18, EASING_LINEAR) - EVT_ADD(LVar0, 20) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 8, 10, EASING_LINEAR) - EVT_LOOP(20) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_ELSE - EVT_WAIT(30) - EVT_END_IF - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorSize, ACTOR_SELF, LVar3, LVar4) - EVT_DIV(LVar3, 2) - EVT_ADD(LVar1, LVar3) - EVT_ADD(LVar2, 5) - EVT_DIVF(LVar3, EVT_FLOAT(10.0)) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, LVar3, 10, 0) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) - EVT_WAIT(10) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, Float(1.0), Float(1.0), Float(1.0)) + Else + Call(SetPartScale, ACTOR_SELF, PRT_PROJECTILE, Float(0.4), Float(0.4), Float(1.0)) + EndIf + ExecWait(N(EVS_DecrementSize)) + SetConst(LVar0, PRT_MAIN) + Call(GetLastEvent, ACTOR_SELF, LVar1) + Switch(LVar1) + CaseOrEq(EVENT_BURN_HIT) + CaseOrEq(EVENT_BURN_DEATH) + Call(SetAnimation, ACTOR_SELF, PRT_PROJECTILE, ANIM_Pokey_BurnedProjectile) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnHurt, LVar1) + EndCaseGroup + CaseDefault + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + EndSwitch + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + ChildThread + Wait(4) + ExecWait(N(EVS_HitReactionBounce)) + EndChildThread + Call(GetActorVar, ACTOR_SELF, AVAR_PartsThrown, LVarA) + IfNe(LVarA, 3) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2) + Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_PROJECTILE, Float(6.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Set(LVar1, 0) + Call(FlyPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 10, 18, EASING_LINEAR) + Add(LVar0, 20) + Call(FlyPartTo, ACTOR_SELF, PRT_PROJECTILE, LVar0, LVar1, LVar2, 8, 10, EASING_LINEAR) + Loop(20) + Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_PROJECTILE, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Else + Wait(30) + EndIf + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_BURN_HIT) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorSize, ACTOR_SELF, LVar3, LVar4) + Div(LVar3, 2) + Add(LVar1, LVar3) + Add(LVar2, 5) + DivF(LVar3, Float(10.0)) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, LVar3, 10, 0) + CaseEq(EVENT_BURN_DEATH) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_BurnStill, LVar1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1) + Wait(10) + CaseDefault + EndSwitch + Return + End }; EvtScript N(EVS_Pokey_ScareAway) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar9) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.05)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_SET(LVarD, LVarB) - EVT_ADD(LVarD, 40) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarD, LVarC) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_WAIT(20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(FallToGoal, ACTOR_SELF, 10) - EVT_WAIT(20) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_WAIT(5) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, 200, 0, 0) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_WAIT(8) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Anim_Hit, LVar1) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetActorFlags, ACTOR_SELF, LVar9) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.05)) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Set(LVarD, LVarB) + Add(LVarD, 40) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarD, LVarC) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Wait(20) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(FallToGoal, ACTOR_SELF, 10) + Wait(20) + Call(SetActorYaw, ACTOR_SELF, 180) + Wait(5) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetGoalPos, ACTOR_SELF, 200, 0, 0) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Wait(8) + Call(HideHealthBar, ACTOR_SELF) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(RemoveActor, ACTOR_SELF) + Return + End }; diff --git a/src/battle/common/actor/putrid_piranha.inc.c b/src/battle/common/actor/putrid_piranha.inc.c index bea4fc03ec1..4ba76fd23d4 100644 --- a/src/battle/common/actor/putrid_piranha.inc.c +++ b/src/battle/common/actor/putrid_piranha.inc.c @@ -103,381 +103,381 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; #include "common/battle/SetAbsoluteStatusOffsets.inc.c" EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_DIZZY) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -27, 33) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 5, -11) - EVT_CALL(N(SetAbsoluteStatusOffsets), -37, 9, -7, 31) - EVT_ELSE - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -15, 50) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 3, -14) - EVT_CALL(N(SetAbsoluteStatusOffsets), -22, 32, 1, 44) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_DIZZY) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -27, 33) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 5, -11) + Call(N(SetAbsoluteStatusOffsets), -37, 9, -7, 31) + Else + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -15, 50) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 3, -14) + Call(N(SetAbsoluteStatusOffsets), -22, 32, 1, 44) + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim03) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim01) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim03) + Call(SetGoalToHome, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim01) + Call(SetActorYaw, ACTOR_SELF, 0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Putrid_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Putrid_Anim10) - EVT_SET_CONST(LVar2, ANIM_LargePiranha_Putrid_Anim11) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Putrid_Anim10) - EVT_SET_CONST(LVar2, ANIM_LargePiranha_Putrid_Anim11) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Putrid_Anim11) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Putrid_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Putrid_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Putrid_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Putrid_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Putrid_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Putrid_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Putrid_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Putrid_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Putrid_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Putrid_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Putrid_Anim03) - EVT_SET_CONST(LVar2, ANIM_LargePiranha_Putrid_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Putrid_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_LargePiranha_Putrid_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim0E) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim10) + SetConst(LVar2, ANIM_LargePiranha_Putrid_Anim11) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim10) + SetConst(LVar2, ANIM_LargePiranha_Putrid_Anim11) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim11) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim0E) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim0E) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim0E) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim0E) + ExecWait(EVS_Enemy_ShockHit) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim0E) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim0E) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim0E) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim0E) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim03) + SetConst(LVar2, ANIM_LargePiranha_Putrid_Anim0E) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim03) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_LargePiranha_Putrid_Anim03) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_Attack_Bite)) - EVT_RETURN - EVT_END_IF - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 70) - EVT_EXEC_WAIT(N(EVS_Attack_BadBreath)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_Bite)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + ExecWait(N(EVS_Attack_Bite)) + Return + EndIf + Call(RandInt, 100, LVar0) + IfLt(LVar0, 70) + ExecWait(N(EVS_Attack_BadBreath)) + Else + ExecWait(N(EVS_Attack_Bite)) + EndIf + Return + End }; EvtScript N(EVS_Attack_Bite) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim18) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_WAIT(8) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 27) - EVT_SET(LVar1, 0) - EVT_SET(LVar3, LVar0) - EVT_SET(LVar4, LVar1) - EVT_SET(LVar5, LVar2) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar6, LVar7, LVar8) - EVT_ADD(LVar3, LVar6) - EVT_ADD(LVar4, LVar7) - EVT_ADD(LVar5, LVar8) - EVT_DIV(LVar3, 2) - EVT_DIV(LVar4, 2) - EVT_DIV(LVar5, 2) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, LVar3, LVar4, LVar5) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(SetBattleCamOffsetZ, 40) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim17) - EVT_WAIT(8) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim03) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim03) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, 10) - EVT_ELSE - EVT_ADD(LVar0, 27) - EVT_END_IF - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim01) - EVT_END_IF - EVT_THREAD - EVT_WAIT(8) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PIRANHA_BITE) - EVT_END_THREAD - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim05) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim06) - EVT_WAIT(6) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim07) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(14) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(YieldTurn) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0)) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim18) - EVT_WAIT(10) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim17) - EVT_WAIT(10) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE) - EVT_ELSE - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim05) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim06) - EVT_WAIT(1) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_BITE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SET(LVarF, LVar0) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim07) - EVT_WAIT(20) - EVT_CALL(YieldTurn) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0)) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim18) - EVT_WAIT(10) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim17) - EVT_WAIT(10) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE) - EVT_ELSE - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim18) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) + Wait(8) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 27) + Set(LVar1, 0) + Set(LVar3, LVar0) + Set(LVar4, LVar1) + Set(LVar5, LVar2) + Call(GetActorPos, ACTOR_PLAYER, LVar6, LVar7, LVar8) + Add(LVar3, LVar6) + Add(LVar4, LVar7) + Add(LVar5, LVar8) + Div(LVar3, 2) + Div(LVar4, 2) + Div(LVar5, 2) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, LVar3, LVar4, LVar5) + Call(SetBattleCamZoom, 300) + Call(SetBattleCamOffsetZ, 40) + Wait(20) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim17) + Wait(8) + Else + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim03) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim03) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Add(LVar0, 10) + Else + Add(LVar0, 27) + EndIf + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim01) + EndIf + Thread + Wait(8) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PIRANHA_BITE) + EndThread + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim05) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim06) + Wait(6) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim07) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(14) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(YieldTurn) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetActorSpeed, ACTOR_SELF, Float(7.0)) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim18) + Wait(10) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim17) + Wait(10) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE) + Else + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetActorSpeed, ACTOR_SELF, Float(7.0)) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + ExecWait(N(EVS_ReturnHome)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim05) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim06) + Wait(1) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_BITE, BS_FLAGS1_TRIGGER_EVENTS) + Set(LVarF, LVar0) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim07) + Wait(20) + Call(YieldTurn) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetActorSpeed, ACTOR_SELF, Float(7.0)) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, TRUE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim18) + Wait(10) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_SURFACE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim17) + Wait(10) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_SHADOW, FALSE) + Else + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + ExecWait(N(EVS_ReturnHome)) + EndIf + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/UnkEffect6FFunc.inc.c" EvtScript N(EVS_Attack_BadBreath) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim03) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim03) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, 16) - EVT_ELSE - EVT_ADD(LVar0, 40) - EVT_END_IF - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim01) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim08) - EVT_WAIT(11) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_PIRANHA_BREATH) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, 12) - EVT_SET(LVar1, 5) - EVT_SETF(LVar3, EVT_FLOAT(0.4)) - EVT_ELSE - EVT_ADD(LVar0, 32) - EVT_SET(LVar1, 13) - EVT_SETF(LVar3, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CALL(N(UnkEffect6FFunc), LVar2, LVar0, LVar1, LVar2, LVar3, 30, 120, 0, 120) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim09) - EVT_WAIT(5) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim0A) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(14) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 100), DMG_BREATH, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SET(LVarF, LVar0) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim0A) - EVT_WAIT(20) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim03) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim03) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Add(LVar0, 16) + Else + Add(LVar0, 40) + EndIf + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim01) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim08) + Wait(11) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_PIRANHA_BREATH) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Add(LVar0, 12) + Set(LVar1, 5) + SetF(LVar3, Float(0.4)) + Else + Add(LVar0, 32) + Set(LVar1, 13) + SetF(LVar3, Float(1.0)) + EndIf + Call(N(UnkEffect6FFunc), LVar2, LVar0, LVar1, LVar2, LVar3, 30, 120, 0, 120) + Wait(1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim09) + Wait(5) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim0A) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(14) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetActorSpeed, ACTOR_SELF, Float(7.0)) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + ExecWait(N(EVS_ReturnHome)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, DMG_STATUS_KEY(STATUS_FLAG_POISON, 3, 100), DMG_BREATH, BS_FLAGS1_TRIGGER_EVENTS) + Set(LVarF, LVar0) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_LargePiranha_Putrid_Anim0A) + Wait(20) + Call(YieldTurn) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/pyro_guy.inc.c b/src/battle/common/actor/pyro_guy.inc.c index 05413efd8d8..a846fa957f3 100644 --- a/src/battle/common/actor/pyro_guy.inc.c +++ b/src/battle/common/actor/pyro_guy.inc.c @@ -107,229 +107,229 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; #include "common/battle/SetAbsoluteStatusOffsets.inc.c" EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SLEEP) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -4, 14) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 13, 10, 13) - EVT_ELSE - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 24) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -10) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SLEEP) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -4, 14) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) + Call(N(SetAbsoluteStatusOffsets), -10, 13, 10, 13) + Else + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 24) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -10) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PyroGuy_Anim04) - EVT_SET_CONST(LVar2, ANIM_PyroGuy_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_RETURN - EVT_END + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PyroGuy_Anim04) + SetConst(LVar2, ANIM_PyroGuy_Anim01) + ExecWait(EVS_Enemy_ReturnHome) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PyroGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PyroGuy_Anim06) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PyroGuy_Anim06) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PyroGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PyroGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PyroGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PyroGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PyroGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PyroGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PyroGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PyroGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PyroGuy_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PyroGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PyroGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PyroGuy_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PyroGuy_Anim03) - EVT_SET_CONST(LVar2, ANIM_PyroGuy_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PyroGuy_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_PyroGuy_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_UP_AND_AWAY) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PyroGuy_Anim06) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PyroGuy_Anim06) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PyroGuy_Anim06) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PyroGuy_Anim06) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PyroGuy_Anim06) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PyroGuy_Anim06) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PyroGuy_Anim06) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PyroGuy_Anim06) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PyroGuy_Anim06) + ExecWait(EVS_Enemy_Knockback) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PyroGuy_Anim06) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PyroGuy_Anim06) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PyroGuy_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PyroGuy_Anim06) + ExecWait(EVS_Enemy_Hit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PyroGuy_Anim06) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PyroGuy_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PyroGuy_Anim03) + SetConst(LVar2, ANIM_PyroGuy_Anim09) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PyroGuy_Anim03) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_PyroGuy_Anim03) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseEq(EVENT_UP_AND_AWAY) + Return + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_PyroGuy_Anim03) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 70) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_PyroGuy_Anim04) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_ACTOR_HOP, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_PyroGuy_Anim05) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HOP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_PyroGuy_Anim05) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_FIRE, 0, 0, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_PyroGuy_Anim01) - EVT_WAIT(8) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_PyroGuy_Anim03) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 70) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_PyroGuy_Anim04) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_ACTOR_HOP, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_PyroGuy_Anim05) + Call(SetGoalToTarget, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(ResetAllActorSounds, ACTOR_SELF) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + ExecWait(N(EVS_ReturnHome)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HOP) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_PyroGuy_Anim05) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 10) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_FIRE, 0, 0, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_PyroGuy_Anim01) + Wait(8) + Call(YieldTurn) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/red_magikoopa.inc.c b/src/battle/common/actor/red_magikoopa.inc.c index 46cbbdfa490..6ab80d121b9 100644 --- a/src/battle/common/actor/red_magikoopa.inc.c +++ b/src/battle/common/actor/red_magikoopa.inc.c @@ -224,8 +224,8 @@ s32 N(BroomAnims)[] = { }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; #include "common/ShrinkActor.inc.c" @@ -235,677 +235,677 @@ EvtScript N(EVS_Idle) = { #include "common/battle/CheckMagikoopaCastTarget.inc.c" EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Red_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Red_Anim05) - EVT_SET_CONST(LVar2, ANIM_Magikoopa_Red_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Red_Anim05) - EVT_SET_CONST(LVar2, ANIM_Magikoopa_Red_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Red_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Red_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Red_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Red_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Red_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Red_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Red_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Red_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim04) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim02) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Red_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, 0, 2, 0) - EVT_ELSE - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, -4, 5, 0) - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Red_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Red_Anim04) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Red_Anim05) + SetConst(LVar2, ANIM_Magikoopa_Red_Anim06) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Red_Anim05) + SetConst(LVar2, ANIM_Magikoopa_Red_Anim06) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Red_Anim06) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Red_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Red_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Red_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Red_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Red_Anim04) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Red_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Red_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim04) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim02) + ExecWait(N(EVS_Flee)) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Red_Anim02) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, 0, 2, 0) + Else + Call(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, -4, 5, 0) + EndIf + EndIf + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Red_Anim04) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_KnockDownCheck) = { - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_PARTNER_ACTING) - EVT_IF_FLAG(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE) - EVT_END_IF - EVT_ELSE - EVT_CALL(N(GetSelectedMoveID), LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(MOVE_HEADBONK1) - EVT_CASE_OR_EQ(MOVE_HEADBONK2) - EVT_CASE_OR_EQ(MOVE_HEADBONK3) - EVT_CASE_OR_EQ(MOVE_MULTIBONK) - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetBattleFlags, LVar0) + IfNotFlag(LVar0, BS_FLAGS1_PARTNER_ACTING) + IfFlag(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE) + EndIf + Else + Call(N(GetSelectedMoveID), LVar0) + Switch(LVar0) + CaseOrEq(MOVE_HEADBONK1) + CaseOrEq(MOVE_HEADBONK2) + CaseOrEq(MOVE_HEADBONK3) + CaseOrEq(MOVE_MULTIBONK) + Call(GetBattleFlags, LVar0) + IfFlag(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE) + EndIf + EndCaseGroup + EndSwitch + EndIf + Return + End }; EvtScript N(EVS_KnockDown) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim04) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetLastElement, LVar0) - EVT_IF_FLAG(LVar0, DAMAGE_TYPE_POW) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim04) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_LABEL(0) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_BROOM, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_END_IF - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 1) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_BROOM, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(N(StartRumbleWithParams), 150, 10) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(0.7)) - EVT_END_THREAD - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar3) - EVT_IF_EQ(LVar3, EVENT_15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim04) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_ADD(LVar4, 10) - EVT_ADD(LVar5, 5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 10, 0) - EVT_END_IF - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_LOOP(20) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim01) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorType, ACTOR_SELF, ACTOR_TYPE_RED_MAGIKOOPA) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(StatusTable))) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 32) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(GetIndexFromPos, ACTOR_SELF, LVar0) - EVT_MOD(LVar0, 4) - EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVar0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, LVar0) + IfEq(LVar0, 1) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim04) + Goto(0) + EndIf + Call(GetLastElement, LVar0) + IfFlag(LVar0, DAMAGE_TYPE_POW) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim04) + Goto(0) + EndIf + Return + Label(0) + Call(HideHealthBar, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartScale, ACTOR_SELF, PRT_BROOM, Float(0.4), Float(0.4), Float(0.4)) + EndIf + Call(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar2, 1) + Call(SetPartPos, ACTOR_SELF, PRT_BROOM, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(N(StartRumbleWithParams), 150, 10) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.7)) + EndThread + Call(GetLastEvent, ACTOR_SELF, LVar3) + IfEq(LVar3, EVENT_15) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim04) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Add(LVar4, 10) + Add(LVar5, 5) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, Float(1.0), 10, 0) + EndIf + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Loop(20) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim01) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorType, ACTOR_SELF, ACTOR_TYPE_RED_MAGIKOOPA) + Call(SetStatusTable, ACTOR_SELF, Ref(N(StatusTable))) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 32) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(GetIndexFromPos, ACTOR_SELF, LVar0) + Mod(LVar0, 4) + Call(SetGoalToIndex, ACTOR_SELF, LVar0) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Return + End }; EvtScript N(EVS_HandleEvent_Flying) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_EXEC_WAIT(N(EVS_KnockDownCheck)) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Red_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CASE_OR_EQ(EVENT_FALL_TRIGGER) - EVT_EXEC_WAIT(N(EVS_KnockDownCheck)) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Red_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_BURN_HIT) - EVT_CASE_OR_EQ(EVENT_15) - EVT_EXEC_WAIT(N(EVS_KnockDownCheck)) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Red_Anim05) - EVT_SET_CONST(LVar2, ANIM_FlyingMagikoopa_Red_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Red_Anim05) - EVT_SET_CONST(LVar2, ANIM_FlyingMagikoopa_Red_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Red_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Red_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Red_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Red_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Red_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Red_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Red_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0) - EVT_CALL(HPBarToCurrent, ACTOR_SELF) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Red_Anim01) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Red_Anim01) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Red_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Red_Anim04) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Red_Anim02) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Red_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -3, 0, 0) - EVT_ELSE - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -15, 0, 0) - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Red_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + ExecWait(N(EVS_KnockDownCheck)) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Red_Anim04) + ExecWait(EVS_Enemy_Hit) + CaseOrEq(EVENT_HIT) + CaseOrEq(EVENT_FALL_TRIGGER) + ExecWait(N(EVS_KnockDownCheck)) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Red_Anim04) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_KnockDown)) + EndCaseGroup + CaseOrEq(EVENT_BURN_HIT) + CaseOrEq(EVENT_15) + ExecWait(N(EVS_KnockDownCheck)) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Red_Anim05) + SetConst(LVar2, ANIM_FlyingMagikoopa_Red_Anim06) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_KnockDown)) + EndCaseGroup + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Red_Anim05) + SetConst(LVar2, ANIM_FlyingMagikoopa_Red_Anim06) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Red_Anim06) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Red_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Red_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Red_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Red_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Red_Anim04) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Red_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + Call(SetActorPos, ACTOR_SELF, 20, 0, 0) + Call(HPBarToCurrent, ACTOR_SELF) + CaseEq(EVENT_END_FIRST_STRIKE) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Red_Anim01) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Red_Anim01) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Red_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Red_Anim04) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Red_Anim02) + ExecWait(N(EVS_Flee)) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Red_Anim02) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -3, 0, 0) + Else + Call(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -15, 0, 0) + EndIf + EndIf + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Red_Anim04) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_MagicBlast) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 1) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 12) - EVT_ADD(LVar1, 14) - EVT_ELSE - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 36) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.5), 30, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Red_Anim02) - EVT_WAIT(30) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Red_Anim03) - EVT_WAIT(5) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar9) - EVT_IF_FLAG(LVar9, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 8) - EVT_ADD(LVar1, 8) - EVT_ELSE - EVT_SUB(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_END_IF - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 50) - EVT_SET(LVar4, 0) - EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 25) - EVT_WAIT(50) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(14) - EVT_CALL(YieldTurn) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT) - EVT_WAIT(30) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Red_Anim03) - EVT_WAIT(5) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 8) - EVT_ADD(LVar1, 8) - EVT_ELSE - EVT_SUB(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_END_IF - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 10) - EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 20) - EVT_WAIT(18) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_MAGIC_BLAST, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_WAIT(19) - EVT_CALL(YieldTurn) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 1) + Else + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 12) + Add(LVar1, 14) + Else + Sub(LVar0, 30) + Add(LVar1, 36) + EndIf + PlayEffect(EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, Float(0.5), 30, 0) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Red_Anim02) + Wait(30) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Red_Anim03) + Wait(5) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar9) + IfFlag(LVar9, STATUS_FLAG_SHRINK) + Sub(LVar0, 8) + Add(LVar1, 8) + Else + Sub(LVar0, 20) + Add(LVar1, 20) + EndIf + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Sub(LVar3, 50) + Set(LVar4, 0) + Call(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 25) + Wait(50) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(14) + Call(YieldTurn) + Call(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT) + Wait(30) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Red_Anim03) + Wait(5) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 8) + Add(LVar1, 8) + Else + Sub(LVar0, 20) + Add(LVar1, 20) + EndIf + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Sub(LVar3, 10) + Call(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 20) + Wait(18) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_MAGIC_BLAST, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Wait(19) + Call(YieldTurn) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_WandStrike) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_VANISH) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim02) - EVT_SET(LVar0, 200) - EVT_LOOP(20) - EVT_SUB(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, 5) - EVT_ELSE - EVT_ADD(LVar0, 25) - EVT_END_IF - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_SET(LVar0, 55) - EVT_LOOP(20) - EVT_ADD(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim03) - EVT_WAIT(11) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_WAND_STRIKE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(15) - EVT_SET(LVar0, 200) - EVT_LOOP(20) - EVT_SUB(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(YieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim01) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_SET(LVar0, 55) - EVT_LOOP(20) - EVT_ADD(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_WAND_STRIKE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(10) - EVT_SET(LVar0, 200) - EVT_LOOP(20) - EVT_SUB(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(YieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim01) - EVT_CALL(FlyToGoal, ACTOR_SELF, 20, 0, EASING_COS_IN_OUT) - EVT_SET(LVar0, 55) - EVT_LOOP(20) - EVT_ADD(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_VANISH) + Thread + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim02) + Set(LVar0, 200) + Loop(20) + Sub(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + EndThread + Wait(10) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Add(LVar0, 5) + Else + Add(LVar0, 25) + EndIf + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + Set(LVar0, 55) + Loop(20) + Add(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim03) + Wait(11) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_WAND_STRIKE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(15) + Set(LVar0, 200) + Loop(20) + Sub(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + Call(YieldTurn) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim01) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + Set(LVar0, 55) + Loop(20) + Add(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_WAND_STRIKE, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(10) + Set(LVar0, 200) + Loop(20) + Sub(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + Call(YieldTurn) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim01) + Call(FlyToGoal, ACTOR_SELF, 20, 0, EASING_COS_IN_OUT) + Set(LVar0, 55) + Loop(20) + Add(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Flee) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_IF_NE(LVar0, EVENT_SCARE_AWAY) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_01) - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_WAIT(10) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 200) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(YieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_EXEC_WAIT(EVS_ForceNextTarget) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(HideHealthBar, ACTOR_SELF) + Call(GetLastEvent, ACTOR_SELF, LVar0) + IfNe(LVar0, EVENT_SCARE_AWAY) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_PRESET_01) + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(1.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Wait(10) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetActorSpeed, ACTOR_SELF, Float(10.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 200) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(YieldTurn) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ExecWait(EVS_ForceNextTarget) + Call(HideHealthBar, ACTOR_SELF) + Call(RemoveActor, ACTOR_SELF) + Return + End }; EvtScript N(EVS_Init) = { - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE) - EVT_RETURN - EVT_END + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar0) + IfEq(LVar0, 0) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE) + Return + End }; EvtScript N(EVS_Init_Flying) = { - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent_Flying))) - EVT_CALL(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE) - EVT_RETURN - EVT_END + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent_Flying))) + Call(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar0) + IfEq(LVar0, 0) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_SET(LFlag0, FALSE) - EVT_LABEL(10) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetIndexFromHome, LVar0, LVar1) - EVT_CALL(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar2) - EVT_IF_GT(LVar1, LVar2) - EVT_CALL(N(CheckMagikoopaCastTarget), LVar0, LVar3) - EVT_IF_EQ(LVar3, 0) - EVT_CALL(GetActorAttackBoost, LVar0, LVar4) - EVT_IF_LT(LVar4, MAX_ATTACK_BOOST) - EVT_SET(LVar8, LVar0) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar1) - EVT_GOTO(100) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_SET(LFlag0, TRUE) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_EXEC_WAIT(N(EVS_Attack_MagicBlast)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_WandStrike)) - EVT_END_IF - EVT_RETURN - EVT_LABEL(100) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim02) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Red_Anim02) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 6) - EVT_ADD(LVar1, 12) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 16) - EVT_ADD(LVar1, 31) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 12) - EVT_ADD(LVar1, 14) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 36) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim01) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Red_Anim01) - EVT_END_IF - EVT_WAIT(5) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, LVar8, SOUND_MAGIKOOPA_POWER_UP) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(BoostAttack, LVar8, ATTACK_BOOST_AMT) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_CALL(WaitForBuffDone) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Set(LFlag0, FALSE) + Label(10) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetIndexFromHome, LVar0, LVar1) + Call(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar2) + IfGt(LVar1, LVar2) + Call(N(CheckMagikoopaCastTarget), LVar0, LVar3) + IfEq(LVar3, 0) + Call(GetActorAttackBoost, LVar0, LVar4) + IfLt(LVar4, MAX_ATTACK_BOOST) + Set(LVar8, LVar0) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar1) + Goto(100) + EndIf + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + IfEq(LFlag0, FALSE) + Set(LFlag0, TRUE) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) + Goto(10) + EndIf + Call(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) + IfEq(LVar0, 1) + ExecWait(N(EVS_Flee)) + Return + EndIf + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, ACTOR_FLAG_FLYING) + ExecWait(N(EVS_Attack_MagicBlast)) + Else + ExecWait(N(EVS_Attack_WandStrike)) + EndIf + Return + Label(100) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim02) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Red_Anim02) + EndIf + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 6) + Add(LVar1, 12) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 16) + Add(LVar1, 31) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 12) + Add(LVar1, 14) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 30) + Add(LVar1, 36) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 5, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + EndIf + Wait(30) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Red_Anim01) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Red_Anim01) + EndIf + Wait(5) + Thread + Wait(10) + Call(PlaySoundAtActor, LVar8, SOUND_MAGIKOOPA_POWER_UP) + EndThread + Thread + Call(FreezeBattleState, TRUE) + Call(BoostAttack, LVar8, ATTACK_BOOST_AMT) + Call(FreezeBattleState, FALSE) + EndThread + Call(WaitForBuffDone) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(10) + Call(YieldTurn) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/ruff_puff.inc.c b/src/battle/common/actor/ruff_puff.inc.c index 5ffc250c868..060e508c0d7 100644 --- a/src/battle/common/actor/ruff_puff.inc.c +++ b/src/battle/common/actor/ruff_puff.inc.c @@ -99,252 +99,252 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; #include "common/CosInterpMinMax.inc.c" EvtScript N(EVS_Idle) = { - EVT_SET(LVarF, 0) - EVT_LOOP(0) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, EVT_FLOAT(0.97), EVT_FLOAT(1.03), 15, 0, 0) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar1, EVT_FLOAT(1.03), EVT_FLOAT(0.97), 15, 0, 0) - EVT_ADD(LVarF, 1) - EVT_CALL(SetActorScale, ACTOR_SELF, LVar1, LVar0, EVT_FLOAT(1.0)) - EVT_IF_GE(LVarF, 30) - EVT_SET(LVarF, 0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVarF, 0) + Loop(0) + Call(N(CosInterpMinMax), LVarF, LVar0, Float(0.97), Float(1.03), 15, 0, 0) + Call(N(CosInterpMinMax), LVarF, LVar1, Float(1.03), Float(0.97), 15, 0, 0) + Add(LVarF, 1) + Call(SetActorScale, ACTOR_SELF, LVar1, LVar0, Float(1.0)) + IfGe(LVarF, 30) + Set(LVarF, 0) + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_RuffPuff_Run) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_SIN_OUT) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_RuffPuff_Run) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_SIN_OUT) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_RuffPuff_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_RuffPuff_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_RuffPuff_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_RuffPuff_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_RuffPuff_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_RuffPuff_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_RuffPuff_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_RuffPuff_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_RuffPuff_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_RuffPuff_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_RuffPuff_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_RuffPuff_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_RuffPuff_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_RuffPuff_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_RuffPuff_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_RuffPuff_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0) - EVT_CALL(HPBarToCurrent, ACTOR_SELF) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_RuffPuff_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_RuffPuff_Run) - EVT_SET_CONST(LVar2, ANIM_RuffPuff_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_RuffPuff_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_RuffPuff_Run) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_RuffPuff_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_RuffPuff_BurnHurt) + SetConst(LVar2, ANIM_RuffPuff_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_RuffPuff_BurnHurt) + SetConst(LVar2, ANIM_RuffPuff_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_RuffPuff_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_RuffPuff_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_RuffPuff_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_RuffPuff_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_RuffPuff_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_RuffPuff_Hurt) + ExecWait(EVS_Enemy_Knockback) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_RuffPuff_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_RuffPuff_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_RuffPuff_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_RuffPuff_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_RuffPuff_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + Call(SetActorPos, ACTOR_SELF, 20, 0, 0) + Call(HPBarToCurrent, ACTOR_SELF) + CaseEq(EVENT_END_FIRST_STRIKE) + ExecWait(N(EVS_ReturnHome)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_RuffPuff_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_RuffPuff_Run) + SetConst(LVar2, ANIM_RuffPuff_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_RuffPuff_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_RuffPuff_Run) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_RuffPuff_Run) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_SIN_OUT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_RuffPuff_Idle) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_RuffPuff_Grin) - EVT_WAIT(5) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) - EVT_SETF(LVar0, EVT_FLOAT(0.0)) - EVT_LOOP(15) - EVT_ADDF(LVar0, EVT_FLOAT(12.0)) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(AddGoalPos, ACTOR_SELF, -10, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) - EVT_SETF(LVar0, EVT_FLOAT(180.0)) - EVT_LOOP(10) - EVT_ADDF(LVar0, EVT_FLOAT(18.0)) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(AddGoalPos, ACTOR_SELF, -30, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(AddGoalPos, ACTOR_SELF, -20, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(AddGoalPos, ACTOR_SELF, -10, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 13, 0) - EVT_SETF(LVar0, EVT_FLOAT(0.0)) - EVT_LOOP(8) - EVT_ADDF(LVar0, EVT_FLOAT(22.5)) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) - EVT_SETF(LVar0, EVT_FLOAT(180.0)) - EVT_LOOP(10) - EVT_SUBF(LVar0, EVT_FLOAT(22.5)) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 30, 0, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(JumpWithBounce, ACTOR_SELF, 10, EVT_FLOAT(5.0)) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_RuffPuff_Run) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_SIN_OUT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_RuffPuff_Idle) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_RuffPuff_Grin) + Wait(5) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) + SetF(LVar0, Float(0.0)) + Loop(15) + AddF(LVar0, Float(12.0)) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(AddGoalPos, ACTOR_SELF, -10, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) + SetF(LVar0, Float(180.0)) + Loop(10) + AddF(LVar0, Float(18.0)) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + EndThread + Call(AddGoalPos, ACTOR_SELF, -30, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(AddGoalPos, ACTOR_SELF, -20, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(AddGoalPos, ACTOR_SELF, -10, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + ExecWait(N(EVS_ReturnHome)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 13, 0) + SetF(LVar0, Float(0.0)) + Loop(8) + AddF(LVar0, Float(22.5)) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 16, 0) + SetF(LVar0, Float(180.0)) + Loop(10) + SubF(LVar0, Float(22.5)) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 30, 0, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(JumpWithBounce, ACTOR_SELF, 10, Float(5.0)) + Wait(10) + Call(YieldTurn) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/shy_guy_base.inc.c b/src/battle/common/actor/shy_guy_base.inc.c index 5f9e2349f70..35e9341dd16 100644 --- a/src/battle/common/actor/shy_guy_base.inc.c +++ b/src/battle/common/actor/shy_guy_base.inc.c @@ -100,401 +100,401 @@ s32 N(DefaultAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; #include "common/battle/SetAbsoluteStatusOffsets.inc.c" EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SLEEP) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -4, 14) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 13, 10, 13) - EVT_ELSE - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 24) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -10) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SLEEP) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, -4, 14) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 0) + Call(N(SetAbsoluteStatusOffsets), -10, 13, 10, 13) + Else + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 24) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -10) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SHYGUY_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim01) - EVT_RETURN - EVT_END + Call(ResetAllActorSounds, ACTOR_SELF) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SHYGUY_Anim03) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim01) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SHYGUY_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SHYGUY_Anim0D) - EVT_SET_CONST(LVar2, ANIM_SHYGUY_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SHYGUY_Anim0D) - EVT_SET_CONST(LVar2, ANIM_SHYGUY_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SHYGUY_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SHYGUY_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SHYGUY_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SHYGUY_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SHYGUY_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SHYGUY_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SHYGUY_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SHYGUY_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SHYGUY_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SHYGUY_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SHYGUY_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SHYGUY_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SHYGUY_Anim03) - EVT_SET_CONST(LVar2, ANIM_SHYGUY_Anim14) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SHYGUY_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SHYGUY_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SHYGUY_Anim0C) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SHYGUY_Anim0D) + SetConst(LVar2, ANIM_SHYGUY_Anim0E) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SHYGUY_Anim0D) + SetConst(LVar2, ANIM_SHYGUY_Anim0E) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SHYGUY_Anim0E) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SHYGUY_Anim0C) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SHYGUY_Anim0C) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SHYGUY_Anim0C) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SHYGUY_Anim0C) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SHYGUY_Anim0C) + ExecWait(EVS_Enemy_Knockback) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SHYGUY_Anim0C) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SHYGUY_Anim0C) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SHYGUY_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SHYGUY_Anim0C) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SHYGUY_Anim0C) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SHYGUY_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SHYGUY_Anim03) + SetConst(LVar2, ANIM_SHYGUY_Anim14) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SHYGUY_Anim0C) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SHYGUY_Anim0C) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_Tackle) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim03) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_ACTOR_HOP, 0) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim04) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim05) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SHYGUY_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim01) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HOP) - EVT_END_THREAD - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim04) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim05) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 15) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim01) - EVT_WAIT(8) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim03) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_ACTOR_HOP, 0) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim04) + Call(SetGoalToTarget, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim05) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(ResetAllActorSounds, ACTOR_SELF) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SHYGUY_Anim04) + ExecWait(EVS_Enemy_ReturnHome) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim01) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Thread + Wait(3) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HOP) + EndThread + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim04) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 10) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim05) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 15) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim01) + Wait(8) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + ExecWait(N(EVS_ReturnHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_Vault) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_TIMING_BAR_GO) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim09) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim03) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 80) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim04) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_SUB(LVar0, 40) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim09) - EVT_THREAD - EVT_WAIT(12) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim0A) - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 24, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim05) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 15) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SHYGUY_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim01) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim09) - EVT_THREAD - EVT_WAIT(9) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim0A) - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_VAULT, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 15) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0) - EVT_SET(LVar3, 0) - EVT_LOOP(20) - EVT_SUB(LVar3, 30) - EVT_IF_LT(LVar3, 0) - EVT_ADD(LVar3, 360) - EVT_END_IF - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS1_ATK_BLOCKED) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetLastDamage, ACTOR_PLAYER, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LRAW_CHEERING) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LRAW_CHEERING | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim09) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim07) - EVT_WAIT(15) - EVT_GOTO(2) - EVT_LABEL(1) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_COLLAPSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim10) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_DISAPPOINTED) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 50) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim11) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim13) - EVT_END_IF - EVT_WAIT(25) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_LABEL(2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SHYGUY_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim01) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_TIMING_BAR_GO) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim09) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim03) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 80) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim04) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Sub(LVar0, 40) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim09) + Thread + Wait(12) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim0A) + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 24, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim05) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 15) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SHYGUY_Anim04) + ExecWait(EVS_Enemy_ReturnHome) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim01) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim09) + Thread + Wait(9) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim0A) + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_VAULT, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 15) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0) + Set(LVar3, 0) + Loop(20) + Sub(LVar3, 30) + IfLt(LVar3, 0) + Add(LVar3, 360) + EndIf + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar3) + Wait(1) + EndLoop + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + EndThread + Call(GetBattleFlags, LVar0) + IfFlag(LVar0, BS_FLAGS1_ATK_BLOCKED) + Goto(1) + EndIf + Call(GetLastDamage, ACTOR_PLAYER, LVar0) + IfEq(LVar0, 0) + Goto(1) + EndIf + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LRAW_CHEERING) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LRAW_CHEERING | SOUND_ID_TRIGGER_CHANGE_SOUND) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim09) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim07) + Wait(15) + Goto(2) + Label(1) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_COLLAPSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim10) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_DISAPPOINTED) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(RandInt, 100, LVar0) + IfLt(LVar0, 50) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim11) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim13) + EndIf + Wait(25) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 180) + Label(2) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SHYGUY_Anim04) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SHYGUY_Anim01) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(RandInt, 1, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_Attack_Tackle)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_Vault)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(RandInt, 1, LVar0) + IfEq(LVar0, 0) + ExecWait(N(EVS_Attack_Tackle)) + Else + ExecWait(N(EVS_Attack_Vault)) + EndIf + Return + End }; diff --git a/src/battle/common/actor/sky_guy.inc.c b/src/battle/common/actor/sky_guy.inc.c index 49880dca47a..37eeee93557 100644 --- a/src/battle/common/actor/sky_guy.inc.c +++ b/src/battle/common/actor/sky_guy.inc.c @@ -259,359 +259,359 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Flying_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_Flying_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Flying_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_Flying_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_BalloonState, AVAL_Balloons_Intact) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_YELLOW_BALLOON, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_RED_BALLOON, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_BLUE_BALLOON, LVar0, LVar1, LVar2) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_YELLOW_BALLOON, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_RED_BALLOON, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BLUE_BALLOON, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 5) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(SetPartTargetFlagBits, ACTOR_SELF, PRT_YELLOW_BALLOON, ACTOR_PART_TARGET_NO_DAMAGE, TRUE) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_Flying_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Flying_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_Flying_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_BalloonState, AVAL_Balloons_Intact) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_YELLOW_BALLOON, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_RED_BALLOON, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_BLUE_BALLOON, LVar0, LVar1, LVar2) + Call(SetPartFlagBits, ACTOR_SELF, PRT_YELLOW_BALLOON, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_RED_BALLOON, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BLUE_BALLOON, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 5) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Call(SetPartTargetFlagBits, ACTOR_SELF, PRT_YELLOW_BALLOON, ACTOR_PART_TARGET_NO_DAMAGE, TRUE) + Return + End }; EvtScript N(EVS_Flying_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_KillActor) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_BalloonState, LVar2) - EVT_IF_NE(LVar2, AVAL_Balloons_Intact) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_ELSE - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_BalloonState, AVAL_Balloons_Popping) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar7, LVar8, LVar9) - EVT_ADD(LVar8, 20) - EVT_PLAY_EFFECT(EFFECT_BALLOON, 2, LVar7, LVar8, LVar9, EVT_FLOAT(1.0), 150, 0) - EVT_SUB(LVar7, 14) - EVT_SUB(LVar8, 4) - EVT_PLAY_EFFECT(EFFECT_BALLOON, 0, LVar7, LVar8, LVar9, EVT_FLOAT(1.0), 150, 0) - EVT_ADD(LVar7, 28) - EVT_PLAY_EFFECT(EFFECT_BALLOON, 1, LVar7, LVar8, LVar9, EVT_FLOAT(1.0), 150, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_BalloonState, AVAL_Balloons_Popped) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_YELLOW_BALLOON, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_RED_BALLOON, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BLUE_BALLOON, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_BalloonState, LVar2) + IfNe(LVar2, AVAL_Balloons_Intact) + ExecWait(EVS_Enemy_Death) + Else + Call(SetActorVar, ACTOR_SELF, AVAR_BalloonState, AVAL_Balloons_Popping) + Call(GetActorPos, ACTOR_SELF, LVar7, LVar8, LVar9) + Add(LVar8, 20) + PlayEffect(EFFECT_BALLOON, 2, LVar7, LVar8, LVar9, Float(1.0), 150, 0) + Sub(LVar7, 14) + Sub(LVar8, 4) + PlayEffect(EFFECT_BALLOON, 0, LVar7, LVar8, LVar9, Float(1.0), 150, 0) + Add(LVar7, 28) + PlayEffect(EFFECT_BALLOON, 1, LVar7, LVar8, LVar9, Float(1.0), 150, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_BalloonState, AVAL_Balloons_Popped) + Call(SetPartFlagBits, ACTOR_SELF, PRT_YELLOW_BALLOON, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_RED_BALLOON, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BLUE_BALLOON, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE) + ExecWait(EVS_Enemy_Death) + EndIf + Return + End }; EvtScript N(EVS_ResetAnimations) = { - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SkyGuy_Anim02) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_YELLOW_BALLOON, ANIM_SkyGuy_Anim13) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_RED_BALLOON, ANIM_SkyGuy_Anim12) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BLUE_BALLOON, ANIM_SkyGuy_Anim14) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SkyGuy_Anim02) + Call(SetAnimation, ACTOR_SELF, PRT_YELLOW_BALLOON, ANIM_SkyGuy_Anim13) + Call(SetAnimation, ACTOR_SELF, PRT_RED_BALLOON, ANIM_SkyGuy_Anim12) + Call(SetAnimation, ACTOR_SELF, PRT_BLUE_BALLOON, ANIM_SkyGuy_Anim14) + Return + End }; EvtScript N(EVS_StretchBalloons) = { - EVT_CALL(MakeLerp, 100, 80, 7, EASING_CUBIC_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SETF(LVar2, EVT_FLOAT(2.0)) - EVT_SUBF(LVar2, LVar0) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_YELLOW_BALLOON, LVar2, LVar0, EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_RED_BALLOON, LVar2, LVar0, EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_BLUE_BALLOON, LVar2, LVar0, EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(MakeLerp, 80, 100, 7, EASING_COS_FAST_OVERSHOOT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SETF(LVar2, EVT_FLOAT(2.0)) - EVT_SUBF(LVar2, LVar0) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_YELLOW_BALLOON, LVar2, LVar0, EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_RED_BALLOON, LVar2, LVar0, EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_BLUE_BALLOON, LVar2, LVar0, EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_YELLOW_BALLOON, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_RED_BALLOON, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_BLUE_BALLOON, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(MakeLerp, 100, 80, 7, EASING_CUBIC_OUT) + Label(0) + Call(UpdateLerp) + DivF(LVar0, Float(100.0)) + SetF(LVar2, Float(2.0)) + SubF(LVar2, LVar0) + Call(SetPartScale, ACTOR_SELF, PRT_YELLOW_BALLOON, LVar2, LVar0, Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_RED_BALLOON, LVar2, LVar0, Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_BLUE_BALLOON, LVar2, LVar0, Float(1.0)) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(MakeLerp, 80, 100, 7, EASING_COS_FAST_OVERSHOOT) + Label(1) + Call(UpdateLerp) + DivF(LVar0, Float(100.0)) + SetF(LVar2, Float(2.0)) + SubF(LVar2, LVar0) + Call(SetPartScale, ACTOR_SELF, PRT_YELLOW_BALLOON, LVar2, LVar0, Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_RED_BALLOON, LVar2, LVar0, Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_BLUE_BALLOON, LVar2, LVar0, Float(1.0)) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(SetPartScale, ACTOR_SELF, PRT_YELLOW_BALLOON, Float(1.0), Float(1.0), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_RED_BALLOON, Float(1.0), Float(1.0), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_BLUE_BALLOON, Float(1.0), Float(1.0), Float(1.0)) + Return + End }; #include "common/StartRumbleWithParams.inc.c" EvtScript N(EVS_PopBalloons) = { - EVT_CALL(GetLastElement, LVar0) - EVT_SET(LVar0, DAMAGE_TYPE_SPINY_SURGE) - EVT_IF_FLAG(LVar0, DAMAGE_TYPE_FIRE | DAMAGE_TYPE_BLAST | DAMAGE_TYPE_4000 | DAMAGE_TYPE_SPINY_SURGE) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SKY_GUY_BALLOON_POP) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_YELLOW_BALLOON, ANIM_SkyGuy_Anim2E) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_RED_BALLOON, ANIM_SkyGuy_Anim2D) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BLUE_BALLOON, ANIM_SkyGuy_Anim2F) - EVT_WAIT(30) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_YELLOW_BALLOON, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_RED_BALLOON, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BLUE_BALLOON, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_BalloonState, AVAL_Balloons_Popped) - EVT_WAIT(15) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SkyGuy_Anim00) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_EMOTE_QUESTION) - EVT_PLAY_EFFECT(EFFECT_EMOTE, EMOTE_QUESTION, 0, LVar0, LVar1, LVar2, 24, 0, 25, 0, 0) - EVT_WAIT(25) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SkyGuy_Anim06) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SkyGuy_Anim06) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(N(StartRumbleWithParams), 120, 10) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(0.5)) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_COLLAPSE) - EVT_CALL(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_PRIMARY_TARGET) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim12) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 3, LVar0, LVar1, LVar2, 0, 0) - EVT_WAIT(40) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_Ground_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Ground_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_Ground_HandleEvent))) - EVT_CALL(SetActorType, ACTOR_SELF, ACTOR_TYPE_SHY_GUY) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_StretchBalloons)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetLastElement, LVar0) + Set(LVar0, DAMAGE_TYPE_SPINY_SURGE) + IfFlag(LVar0, DAMAGE_TYPE_FIRE | DAMAGE_TYPE_BLAST | DAMAGE_TYPE_4000 | DAMAGE_TYPE_SPINY_SURGE) + Call(HideHealthBar, ACTOR_SELF) + Thread + Wait(20) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SKY_GUY_BALLOON_POP) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_YELLOW_BALLOON, ANIM_SkyGuy_Anim2E) + Call(SetAnimation, ACTOR_SELF, PRT_RED_BALLOON, ANIM_SkyGuy_Anim2D) + Call(SetAnimation, ACTOR_SELF, PRT_BLUE_BALLOON, ANIM_SkyGuy_Anim2F) + Wait(30) + Call(SetPartFlagBits, ACTOR_SELF, PRT_YELLOW_BALLOON, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_RED_BALLOON, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BLUE_BALLOON, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_BalloonState, AVAL_Balloons_Popped) + Wait(15) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SkyGuy_Anim00) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_EMOTE_QUESTION) + PlayEffect(EFFECT_EMOTE, EMOTE_QUESTION, 0, LVar0, LVar1, LVar2, 24, 0, 25, 0, 0) + Wait(25) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SkyGuy_Anim06) + Wait(30) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SkyGuy_Anim06) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(N(StartRumbleWithParams), 120, 10) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.5)) + EndThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_COLLAPSE) + Call(ResetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP) + Call(SetPartFlags, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_NO_TARGET) + Call(SetPartFlags, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_PRIMARY_TARGET) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim12) + PlayEffect(EFFECT_LANDING_DUST, 3, LVar0, LVar1, LVar2, 0, 0) + Wait(40) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_Ground_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Ground_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_Ground_HandleEvent))) + Call(SetActorType, ACTOR_SELF, ACTOR_TYPE_SHY_GUY) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) + Call(HPBarToHome, ACTOR_SELF) + Call(ResetAllActorSounds, ACTOR_SELF) + Else + ExecWait(N(EVS_StretchBalloons)) + EndIf + Return + End }; EvtScript N(EVS_Flying_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_CALL(func_8026E914, LVar0, LVar1) - EVT_IF_GE(LVar1, PRT_YELLOW_BALLOON) - EVT_EXEC_WAIT(N(EVS_StretchBalloons)) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_SkyGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_IF - EVT_CASE_EQ(EVENT_HIT) - EVT_CALL(func_8026E914, LVar0, LVar1) - EVT_IF_GE(LVar1, PRT_YELLOW_BALLOON) - EVT_EXEC_WAIT(N(EVS_StretchBalloons)) - EVT_EXEC_WAIT(N(EVS_PopBalloons)) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_SkyGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_IF - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_SkyGuy_Anim09) - EVT_SET_CONST(LVar2, ANIM_SkyGuy_Anim0A) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_SkyGuy_Anim09) - EVT_SET_CONST(LVar2, ANIM_SkyGuy_Anim0A) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_SkyGuy_Anim0A) - EVT_EXEC_WAIT(N(EVS_KillActor)) - EVT_RETURN - EVT_CASE_EQ(EVENT_ZERO_DAMAGE) - EVT_CALL(func_8026E914, LVar0, LVar1) - EVT_IF_GE(LVar1, PRT_YELLOW_BALLOON) - EVT_EXEC_WAIT(N(EVS_StretchBalloons)) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_SkyGuy_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CALL(func_8026E914, LVar0, LVar1) - EVT_IF_GE(LVar1, PRT_YELLOW_BALLOON) - EVT_EXEC_WAIT(N(EVS_StretchBalloons)) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_SkyGuy_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_SkyGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_SkyGuy_Anim06) - EVT_EXEC_WAIT(N(EVS_KillActor)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0) - EVT_CALL(HPBarToCurrent, ACTOR_SELF) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SkyGuy_Anim03) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SkyGuy_Anim01) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_SkyGuy_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_YELLOW_BALLOON, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_RED_BALLOON, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BLUE_BALLOON, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_YELLOW_BALLOON, ANIM_SkyGuy_Anim1F) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_RED_BALLOON, ANIM_SkyGuy_Anim1E) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BLUE_BALLOON, ANIM_SkyGuy_Anim20) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_SkyGuy_Anim03) - EVT_SET_CONST(LVar2, ANIM_SkyGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_SkyGuy_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_SkyGuy_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_ResetAnimations)) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + Call(func_8026E914, LVar0, LVar1) + IfGe(LVar1, PRT_YELLOW_BALLOON) + ExecWait(N(EVS_StretchBalloons)) + Else + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_SkyGuy_Anim06) + ExecWait(EVS_Enemy_Hit) + EndIf + CaseEq(EVENT_HIT) + Call(func_8026E914, LVar0, LVar1) + IfGe(LVar1, PRT_YELLOW_BALLOON) + ExecWait(N(EVS_StretchBalloons)) + ExecWait(N(EVS_PopBalloons)) + Else + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_SkyGuy_Anim06) + ExecWait(EVS_Enemy_Hit) + EndIf + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_SkyGuy_Anim09) + SetConst(LVar2, ANIM_SkyGuy_Anim0A) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_SkyGuy_Anim09) + SetConst(LVar2, ANIM_SkyGuy_Anim0A) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_SkyGuy_Anim0A) + ExecWait(N(EVS_KillActor)) + Return + CaseEq(EVENT_ZERO_DAMAGE) + Call(func_8026E914, LVar0, LVar1) + IfGe(LVar1, PRT_YELLOW_BALLOON) + ExecWait(N(EVS_StretchBalloons)) + Else + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_SkyGuy_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + Call(func_8026E914, LVar0, LVar1) + IfGe(LVar1, PRT_YELLOW_BALLOON) + ExecWait(N(EVS_StretchBalloons)) + Else + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_SkyGuy_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_SkyGuy_Anim06) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_SkyGuy_Anim06) + ExecWait(N(EVS_KillActor)) + Return + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + Call(SetActorPos, ACTOR_SELF, 20, 0, 0) + Call(HPBarToCurrent, ACTOR_SELF) + CaseEq(EVENT_END_FIRST_STRIKE) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SkyGuy_Anim03) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SkyGuy_Anim01) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_SkyGuy_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + Call(SetPartFlagBits, ACTOR_SELF, PRT_YELLOW_BALLOON, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_RED_BALLOON, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BLUE_BALLOON, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_YELLOW_BALLOON, ANIM_SkyGuy_Anim1F) + Call(SetAnimation, ACTOR_SELF, PRT_RED_BALLOON, ANIM_SkyGuy_Anim1E) + Call(SetAnimation, ACTOR_SELF, PRT_BLUE_BALLOON, ANIM_SkyGuy_Anim20) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_SkyGuy_Anim03) + SetConst(LVar2, ANIM_SkyGuy_Anim06) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_SkyGuy_Anim03) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_SkyGuy_Anim07) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + ExecWait(N(EVS_ResetAnimations)) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Flying_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 1) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SLINGSHOT_DRAW) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SkyGuy_Anim08) - EVT_WAIT(12) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar2, 2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_STONE, LVar0, LVar1, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_STONE, ANIM_SkyGuy_Anim0B) - EVT_WAIT(12) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STONE, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SLINGSHOT_FIRE) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_STONE, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(HIT_RESULT_MISS) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 120) - EVT_SET(LVar1, 0) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_STONE, EVT_FLOAT(12.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_STONE, EVT_FLOAT(0.1)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_STONE, LVar0, LVar1, LVar2, 0, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STONE, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_EXEC_WAIT(N(EVS_ResetAnimations)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_CASE_EQ(HIT_RESULT_LUCKY) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 50) - EVT_SET(LVar1, -5) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_STONE, EVT_FLOAT(14.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_STONE, EVT_FLOAT(0.1)) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_STONE, LVar0, LVar1, LVar2, 0, 30, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SkyGuy_Anim07) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 65) - EVT_SET(LVar1, -5) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_STONE, EVT_FLOAT(6.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_STONE, EVT_FLOAT(0.1)) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_STONE, LVar0, LVar1, LVar2, 0, 15, EASING_LINEAR) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STONE, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_EXEC_WAIT(N(EVS_ResetAnimations)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_STONE, EVT_FLOAT(14.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_STONE, EVT_FLOAT(0.1)) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_STONE, LVar0, LVar1, LVar2, 0, 15, EASING_LINEAR) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SLINGSHOT, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 55) - EVT_SET(LVar1, 0) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_STONE, EVT_FLOAT(6.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_STONE, EVT_FLOAT(0.1)) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_STONE, LVar0, LVar1, LVar2, 0, 25, EASING_LINEAR) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_STONE, EVT_FLOAT(4.0)) - EVT_SUB(LVar0, 20) - EVT_CALL(FlyPartTo, ACTOR_SELF, PRT_STONE, LVar0, LVar1, LVar2, 0, 21, EASING_LINEAR) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STONE, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_ResetAnimations)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 1) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SLINGSHOT_DRAW) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SkyGuy_Anim08) + Wait(12) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Add(LVar2, 2) + Call(SetPartPos, ACTOR_SELF, PRT_STONE, LVar0, LVar1, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_STONE, ANIM_SkyGuy_Anim0B) + Wait(12) + Call(SetPartFlagBits, ACTOR_SELF, PRT_STONE, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SLINGSHOT_FIRE) + Call(SetPartSounds, ACTOR_SELF, PRT_STONE, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 3, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseEq(HIT_RESULT_MISS) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 120) + Set(LVar1, 0) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_STONE, Float(12.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_STONE, Float(0.1)) + Call(JumpPartTo, ACTOR_SELF, PRT_STONE, LVar0, LVar1, LVar2, 0, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_STONE, ACTOR_PART_FLAG_INVISIBLE, TRUE) + ExecWait(N(EVS_ResetAnimations)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + CaseEq(HIT_RESULT_LUCKY) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 50) + Set(LVar1, -5) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_STONE, Float(14.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_STONE, Float(0.1)) + Call(FlyPartTo, ACTOR_SELF, PRT_STONE, LVar0, LVar1, LVar2, 0, 30, EASING_LINEAR) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_SkyGuy_Anim07) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Sub(LVar0, 65) + Set(LVar1, -5) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_STONE, Float(6.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_STONE, Float(0.1)) + Call(FlyPartTo, ACTOR_SELF, PRT_STONE, LVar0, LVar1, LVar2, 0, 15, EASING_LINEAR) + Call(SetPartFlagBits, ACTOR_SELF, PRT_STONE, ACTOR_PART_FLAG_INVISIBLE, TRUE) + ExecWait(N(EVS_ResetAnimations)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndSwitch + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_STONE, Float(14.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_STONE, Float(0.1)) + Call(FlyPartTo, ACTOR_SELF, PRT_STONE, LVar0, LVar1, LVar2, 0, 15, EASING_LINEAR) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVarF, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SLINGSHOT, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVarF) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Sub(LVar0, 55) + Set(LVar1, 0) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_STONE, Float(6.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_STONE, Float(0.1)) + Call(FlyPartTo, ACTOR_SELF, PRT_STONE, LVar0, LVar1, LVar2, 0, 25, EASING_LINEAR) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_STONE, Float(4.0)) + Sub(LVar0, 20) + Call(FlyPartTo, ACTOR_SELF, PRT_STONE, LVar0, LVar1, LVar2, 0, 21, EASING_LINEAR) + Call(SetPartFlagBits, ACTOR_SELF, PRT_STONE, ACTOR_PART_FLAG_INVISIBLE, TRUE) + EndCaseGroup + EndSwitch + ExecWait(N(EVS_ResetAnimations)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; s32 N(GroundAnims)[] = { @@ -629,401 +629,401 @@ s32 N(GroundAnims)[] = { // unused EvtScript N(EVS_Ground_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_Ground_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Ground_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_Ground_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_Ground_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Ground_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_Ground_HandleEvent))) + Return + End }; #include "common/battle/SetAbsoluteStatusOffsets.inc.c" EvtScript N(EVS_Ground_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SLEEP) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_GROUND, -4, 14) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_GROUND, 0, 0) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 13, 10, 13) - EVT_ELSE - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_GROUND, 0, 24) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_GROUND, -1, -10) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SLEEP) + Call(SetTargetOffset, ACTOR_SELF, PRT_GROUND, -4, 14) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_GROUND, 0, 0) + Call(N(SetAbsoluteStatusOffsets), -10, 13, 10, 13) + Else + Call(SetTargetOffset, ACTOR_SELF, PRT_GROUND, 0, 24) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_GROUND, -1, -10) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_Ground_ReturnHome) = { - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim01) - EVT_RETURN - EVT_END + Call(ResetAllActorSounds, ACTOR_SELF) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim03) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim01) + Return + End }; EvtScript N(EVS_Ground_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0D) - EVT_SET_CONST(LVar2, ANIM_ShyGuy_Red_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0D) - EVT_SET_CONST(LVar2, ANIM_ShyGuy_Red_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_EXEC_WAIT(N(EVS_Ground_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim03) - EVT_SET_CONST(LVar2, ANIM_ShyGuy_Red_Anim14) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0D) + SetConst(LVar2, ANIM_ShyGuy_Red_Anim0E) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0D) + SetConst(LVar2, ANIM_ShyGuy_Red_Anim0E) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0E) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_Knockback) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + ExecWait(N(EVS_Ground_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim03) + SetConst(LVar2, ANIM_ShyGuy_Red_Anim14) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_Tackle) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim03) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_ACTOR_HOP, 0) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim04) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim05) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_GROUND, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_GROUND, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim01) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HOP) - EVT_END_THREAD - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim04) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim05) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 15) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim01) - EVT_WAIT(8) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_Ground_ReturnHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim03) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_ACTOR_HOP, 0) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim04) + Call(SetGoalToTarget, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim05) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(ResetAllActorSounds, ACTOR_SELF) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_GROUND, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim04) + ExecWait(EVS_Enemy_ReturnHome) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_GROUND, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim01) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Thread + Wait(3) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HOP) + EndThread + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim04) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 10) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim05) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 15) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim01) + Wait(8) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + ExecWait(N(EVS_Ground_ReturnHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_Vault) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_TIMING_BAR_GO) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim09) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim03) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 80) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim04) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_SUB(LVar0, 40) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim09) - EVT_THREAD - EVT_WAIT(12) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim0A) - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 24, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim05) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 15) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_GROUND, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_GROUND, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim01) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim09) - EVT_THREAD - EVT_WAIT(9) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim0A) - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_VAULT, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 15) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0) - EVT_SET(LVar3, 0) - EVT_LOOP(20) - EVT_SUB(LVar3, 30) - EVT_IF_LT(LVar3, 0) - EVT_ADD(LVar3, 360) - EVT_END_IF - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS1_ATK_BLOCKED) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetLastDamage, ACTOR_PLAYER, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LRAW_CHEERING) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LRAW_CHEERING | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim09) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim07) - EVT_WAIT(15) - EVT_GOTO(2) - EVT_LABEL(1) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_COLLAPSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim10) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_DISAPPOINTED) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_GROUND, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 50) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim11) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim13) - EVT_END_IF - EVT_WAIT(25) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_GROUND, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_LABEL(2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim01) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_TIMING_BAR_GO) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim09) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim03) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 80) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim04) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Sub(LVar0, 40) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim09) + Thread + Wait(12) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim0A) + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 24, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim05) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 15) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_GROUND, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim04) + ExecWait(EVS_Enemy_ReturnHome) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_GROUND, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim01) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim09) + Thread + Wait(9) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim0A) + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_VAULT, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 15) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0) + Set(LVar3, 0) + Loop(20) + Sub(LVar3, 30) + IfLt(LVar3, 0) + Add(LVar3, 360) + EndIf + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar3) + Wait(1) + EndLoop + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + EndThread + Call(GetBattleFlags, LVar0) + IfFlag(LVar0, BS_FLAGS1_ATK_BLOCKED) + Goto(1) + EndIf + Call(GetLastDamage, ACTOR_PLAYER, LVar0) + IfEq(LVar0, 0) + Goto(1) + EndIf + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LRAW_CHEERING) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LRAW_CHEERING | SOUND_ID_TRIGGER_CHANGE_SOUND) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim09) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim07) + Wait(15) + Goto(2) + Label(1) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_COLLAPSE) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim10) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_DISAPPOINTED) + Call(AddActorDecoration, ACTOR_SELF, PRT_GROUND, 0, ACTOR_DECORATION_SWEAT) + Call(RandInt, 100, LVar0) + IfLt(LVar0, 50) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim11) + Else + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim13) + EndIf + Wait(25) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_GROUND, 0) + Call(SetActorYaw, ACTOR_SELF, 180) + Label(2) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim04) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_ShyGuy_Red_Anim01) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Ground_TakeTurn) = { - EVT_CALL(RandInt, 1, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_Attack_Tackle)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_Vault)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(RandInt, 1, LVar0) + IfEq(LVar0, 0) + ExecWait(N(EVS_Attack_Tackle)) + Else + ExecWait(N(EVS_Attack_Vault)) + EndIf + Return + End }; diff --git a/src/battle/common/actor/slot_machine.inc.c b/src/battle/common/actor/slot_machine.inc.c index 11d240fb165..b8b3e214ab2 100644 --- a/src/battle/common/actor/slot_machine.inc.c +++ b/src/battle/common/actor/slot_machine.inc.c @@ -166,381 +166,381 @@ API_CALLABLE(N(Add1Coin)) { EvtScript N(EVS_Init) = { #if VERSION_PAL - EVT_CALL(GetLanguage, LVar0) - EVT_IF_EQ(LVar0, LANGUAGE_ES) - EVT_SET(LVar0, LANGUAGE_FR) - EVT_END_IF - EVT_CALL(SetModelTexVariant, MODEL_o408, LVar0) + Call(GetLanguage, LVar0) + IfEq(LVar0, LANGUAGE_ES) + Set(LVar0, LANGUAGE_FR) + EndIf + Call(SetModelTexVariant, MODEL_o408, LVar0) #endif - EVT_USE_ARRAY(N(SharedSlotMachineData)) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_SET(BUF_GameState, SLOTS_STATE_INERT) - EVT_SET(BUF_ReelState1, REEL_STATE_INERT) - EVT_SET(BUF_ReelState2, REEL_STATE_INERT) - EVT_SET(BUF_ReelState3, REEL_STATE_INERT) - EVT_CALL(RandInt, 8, LVar0) - EVT_MUL(LVar0, 45) - EVT_SET(BUF_ReelAngle1, LVar0) - EVT_CALL(RandInt, 8, LVar0) - EVT_MUL(LVar0, 45) - EVT_SET(BUF_ReelAngle2, LVar0) - EVT_CALL(RandInt, 8, LVar0) - EVT_MUL(LVar0, 45) - EVT_SET(BUF_ReelAngle3, LVar0) - EVT_CALL(N(IsDemoBattle)) - EVT_IF_EQ(LVar0, TRUE) - EVT_SET(BUF_GameState, SLOTS_STATE_ACTIVE) - EVT_SET(BUF_ReelState1, REEL_STATE_SPIN) - EVT_SET(BUF_ReelState2, REEL_STATE_SPIN) - EVT_SET(BUF_ReelState3, REEL_STATE_SPIN) - EVT_END_IF - EVT_RETURN - EVT_END + UseArray(N(SharedSlotMachineData)) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Set(BUF_GameState, SLOTS_STATE_INERT) + Set(BUF_ReelState1, REEL_STATE_INERT) + Set(BUF_ReelState2, REEL_STATE_INERT) + Set(BUF_ReelState3, REEL_STATE_INERT) + Call(RandInt, 8, LVar0) + Mul(LVar0, 45) + Set(BUF_ReelAngle1, LVar0) + Call(RandInt, 8, LVar0) + Mul(LVar0, 45) + Set(BUF_ReelAngle2, LVar0) + Call(RandInt, 8, LVar0) + Mul(LVar0, 45) + Set(BUF_ReelAngle3, LVar0) + Call(N(IsDemoBattle)) + IfEq(LVar0, TRUE) + Set(BUF_GameState, SLOTS_STATE_ACTIVE) + Set(BUF_ReelState1, REEL_STATE_SPIN) + Set(BUF_ReelState2, REEL_STATE_SPIN) + Set(BUF_ReelState3, REEL_STATE_SPIN) + EndIf + Return + End }; EvtScript N(EVS_Idle) = { - EVT_USE_ARRAY(N(SharedSlotMachineData)) - EVT_CALL(EnableTexPanning, MODEL_o424, TRUE) - EVT_SET(LVarE, 0) - EVT_SET(LVarF, 0) - EVT_LABEL(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IN_BlockIdx, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Block_Start) + UseArray(N(SharedSlotMachineData)) + Call(EnableTexPanning, MODEL_o424, TRUE) + Set(LVarE, 0) + Set(LVarF, 0) + Label(0) + Call(GetActorVar, ACTOR_SELF, AVAR_IN_BlockIdx, LVar0) + Switch(LVar0) + CaseEq(AVAL_Block_Start) // do nothing - EVT_CASE_EQ(AVAL_Block_StopReel1) - EVT_SWITCH(BUF_ReelState1) - EVT_CASE_EQ(REEL_STATE_INERT) + CaseEq(AVAL_Block_StopReel1) + Switch(BUF_ReelState1) + CaseEq(REEL_STATE_INERT) // no nothing - EVT_CASE_EQ(REEL_STATE_SPIN) - EVT_ADD(BUF_ReelAngle1, 5) - EVT_CASE_EQ(REEL_STATE_STOPPING) - EVT_IF_GT(BUF_ReelLeft1, 0) - EVT_ADD(BUF_ReelAngle1, 5) - EVT_SUB(BUF_ReelLeft1, 5) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_SET(LVar0, BUF_ReelAngle1) - EVT_MOD(LVar0, 45) - EVT_IF_NE(LVar0, 0) - EVT_ADD(BUF_ReelAngle1, 5) - EVT_ELSE - EVT_SET(BUF_ReelState1, REEL_STATE_STOPPED) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(RotateModel, MODEL_o412, BUF_ReelAngle1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o413, BUF_ReelAngle1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o414, BUF_ReelAngle1, 1, 0, 0) - EVT_CASE_EQ(AVAL_Block_StopReel2) - EVT_SWITCH(BUF_ReelState2) - EVT_CASE_EQ(REEL_STATE_INERT) + CaseEq(REEL_STATE_SPIN) + Add(BUF_ReelAngle1, 5) + CaseEq(REEL_STATE_STOPPING) + IfGt(BUF_ReelLeft1, 0) + Add(BUF_ReelAngle1, 5) + Sub(BUF_ReelLeft1, 5) + BreakSwitch + EndIf + Set(LVar0, BUF_ReelAngle1) + Mod(LVar0, 45) + IfNe(LVar0, 0) + Add(BUF_ReelAngle1, 5) + Else + Set(BUF_ReelState1, REEL_STATE_STOPPED) + EndIf + EndSwitch + Call(RotateModel, MODEL_o412, BUF_ReelAngle1, 1, 0, 0) + Call(RotateModel, MODEL_o413, BUF_ReelAngle1, 1, 0, 0) + Call(RotateModel, MODEL_o414, BUF_ReelAngle1, 1, 0, 0) + CaseEq(AVAL_Block_StopReel2) + Switch(BUF_ReelState2) + CaseEq(REEL_STATE_INERT) // no nothing - EVT_CASE_EQ(REEL_STATE_SPIN) - EVT_ADD(BUF_ReelAngle2, 5) - EVT_CASE_EQ(REEL_STATE_STOPPING) - EVT_IF_GT(BUF_ReelLeft2, 0) - EVT_ADD(BUF_ReelAngle2, 5) - EVT_SUB(BUF_ReelLeft2, 5) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_SET(LVar0, BUF_ReelAngle2) - EVT_MOD(LVar0, 45) - EVT_IF_NE(LVar0, 0) - EVT_ADD(BUF_ReelAngle2, 5) - EVT_ELSE - EVT_SET(BUF_ReelState2, REEL_STATE_STOPPED) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(RotateModel, MODEL_o417, BUF_ReelAngle2, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o418, BUF_ReelAngle2, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o419, BUF_ReelAngle2, 1, 0, 0) - EVT_CASE_EQ(AVAL_Block_StopReel3) - EVT_SWITCH(BUF_ReelState3) - EVT_CASE_EQ(REEL_STATE_INERT) + CaseEq(REEL_STATE_SPIN) + Add(BUF_ReelAngle2, 5) + CaseEq(REEL_STATE_STOPPING) + IfGt(BUF_ReelLeft2, 0) + Add(BUF_ReelAngle2, 5) + Sub(BUF_ReelLeft2, 5) + BreakSwitch + EndIf + Set(LVar0, BUF_ReelAngle2) + Mod(LVar0, 45) + IfNe(LVar0, 0) + Add(BUF_ReelAngle2, 5) + Else + Set(BUF_ReelState2, REEL_STATE_STOPPED) + EndIf + EndSwitch + Call(RotateModel, MODEL_o417, BUF_ReelAngle2, 1, 0, 0) + Call(RotateModel, MODEL_o418, BUF_ReelAngle2, 1, 0, 0) + Call(RotateModel, MODEL_o419, BUF_ReelAngle2, 1, 0, 0) + CaseEq(AVAL_Block_StopReel3) + Switch(BUF_ReelState3) + CaseEq(REEL_STATE_INERT) // no nothing - EVT_CASE_EQ(REEL_STATE_SPIN) - EVT_ADD(BUF_ReelAngle3, 5) - EVT_CASE_EQ(REEL_STATE_STOPPING) - EVT_IF_GT(BUF_ReelLeft3, 0) - EVT_ADD(BUF_ReelAngle3, 5) - EVT_SUB(BUF_ReelLeft3, 5) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_SET(LVar0, BUF_ReelAngle3) - EVT_MOD(LVar0, 45) - EVT_IF_NE(LVar0, 0) - EVT_ADD(BUF_ReelAngle3, 5) - EVT_ELSE - EVT_SET(BUF_ReelState3, REEL_STATE_STOPPED) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(RotateModel, MODEL_o421, BUF_ReelAngle3, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o422, BUF_ReelAngle3, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o423, BUF_ReelAngle3, 1, 0, 0) - EVT_END_SWITCH + CaseEq(REEL_STATE_SPIN) + Add(BUF_ReelAngle3, 5) + CaseEq(REEL_STATE_STOPPING) + IfGt(BUF_ReelLeft3, 0) + Add(BUF_ReelAngle3, 5) + Sub(BUF_ReelLeft3, 5) + BreakSwitch + EndIf + Set(LVar0, BUF_ReelAngle3) + Mod(LVar0, 45) + IfNe(LVar0, 0) + Add(BUF_ReelAngle3, 5) + Else + Set(BUF_ReelState3, REEL_STATE_STOPPED) + EndIf + EndSwitch + Call(RotateModel, MODEL_o421, BUF_ReelAngle3, 1, 0, 0) + Call(RotateModel, MODEL_o422, BUF_ReelAngle3, 1, 0, 0) + Call(RotateModel, MODEL_o423, BUF_ReelAngle3, 1, 0, 0) + EndSwitch // wrap angles - EVT_IF_GE(BUF_ReelAngle1, 360) - EVT_SUB(BUF_ReelAngle1, 360) - EVT_END_IF - EVT_IF_GE(BUF_ReelAngle2, 360) - EVT_SUB(BUF_ReelAngle2, 360) - EVT_END_IF - EVT_IF_GE(BUF_ReelAngle3, 360) - EVT_SUB(BUF_ReelAngle3, 360) - EVT_END_IF - EVT_IF_EQ(BUF_GameState, SLOTS_STATE_INERT) - EVT_ADD(LVarF, -277) - EVT_CALL(SetTexPanOffset, TEX_PANNER_B, TEX_PANNER_MAIN, 0, LVarF) - EVT_END_IF - EVT_IF_EQ(BUF_GameState, SLOTS_STATE_ACTIVE) - EVT_ADD(LVarF, -1110) - EVT_CALL(SetTexPanOffset, TEX_PANNER_B, TEX_PANNER_MAIN, 0, LVarF) - EVT_END_IF - EVT_IF_EQ(BUF_GameState, SLOTS_STATE_PAYOUT) - EVT_ADD(LVarF, -3330) - EVT_CALL(SetTexPanOffset, TEX_PANNER_B, TEX_PANNER_MAIN, 0, LVarF) - EVT_END_IF - EVT_IF_EQ(BUF_GameState, SLOTS_STATE_PAYOUT) - EVT_GOTO(1) - EVT_END_IF - EVT_IF_EQ(BUF_GameState, SLOTS_STATE_INERT) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IN_BlockIdx, LVar0) - EVT_IF_NE(LVar0, AVAL_Block_Start) - EVT_GOTO(1) - EVT_END_IF - EVT_SET(LVar0, BUF_ReelState1) - EVT_ADD(LVar0, BUF_ReelState2) - EVT_ADD(LVar0, BUF_ReelState3) - EVT_IF_EQ(LVar0, REEL_STATE_STOPPED * 3) - EVT_SET(LVar0, BUF_ReelAngle1) - EVT_DIV(LVar0, 45) - EVT_USE_BUF(EVT_PTR(N(ReelSymbols1))) - EVT_BUF_PEEK(LVarA, LVar0) - EVT_SET(LVar0, BUF_ReelAngle2) - EVT_DIV(LVar0, 45) - EVT_USE_BUF(EVT_PTR(N(ReelSymbols2))) - EVT_BUF_PEEK(LVarB, LVar0) - EVT_SET(LVar0, BUF_ReelAngle3) - EVT_DIV(LVar0, 45) - EVT_USE_BUF(EVT_PTR(N(ReelSymbols3))) - EVT_BUF_PEEK(LVarC, LVar0) - EVT_LOOP(0) - EVT_IF_NE(LVarA, LVarB) - EVT_BREAK_LOOP - EVT_END_IF - EVT_IF_NE(LVarA, LVarC) - EVT_BREAK_LOOP - EVT_END_IF - EVT_IF_NE(LVarB, LVarC) - EVT_BREAK_LOOP - EVT_END_IF - EVT_THREAD + IfGe(BUF_ReelAngle1, 360) + Sub(BUF_ReelAngle1, 360) + EndIf + IfGe(BUF_ReelAngle2, 360) + Sub(BUF_ReelAngle2, 360) + EndIf + IfGe(BUF_ReelAngle3, 360) + Sub(BUF_ReelAngle3, 360) + EndIf + IfEq(BUF_GameState, SLOTS_STATE_INERT) + Add(LVarF, -277) + Call(SetTexPanOffset, TEX_PANNER_B, TEX_PANNER_MAIN, 0, LVarF) + EndIf + IfEq(BUF_GameState, SLOTS_STATE_ACTIVE) + Add(LVarF, -1110) + Call(SetTexPanOffset, TEX_PANNER_B, TEX_PANNER_MAIN, 0, LVarF) + EndIf + IfEq(BUF_GameState, SLOTS_STATE_PAYOUT) + Add(LVarF, -3330) + Call(SetTexPanOffset, TEX_PANNER_B, TEX_PANNER_MAIN, 0, LVarF) + EndIf + IfEq(BUF_GameState, SLOTS_STATE_PAYOUT) + Goto(1) + EndIf + IfEq(BUF_GameState, SLOTS_STATE_INERT) + Goto(1) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_IN_BlockIdx, LVar0) + IfNe(LVar0, AVAL_Block_Start) + Goto(1) + EndIf + Set(LVar0, BUF_ReelState1) + Add(LVar0, BUF_ReelState2) + Add(LVar0, BUF_ReelState3) + IfEq(LVar0, REEL_STATE_STOPPED * 3) + Set(LVar0, BUF_ReelAngle1) + Div(LVar0, 45) + UseBuf(Ref(N(ReelSymbols1))) + BufPeek(LVarA, LVar0) + Set(LVar0, BUF_ReelAngle2) + Div(LVar0, 45) + UseBuf(Ref(N(ReelSymbols2))) + BufPeek(LVarB, LVar0) + Set(LVar0, BUF_ReelAngle3) + Div(LVar0, 45) + UseBuf(Ref(N(ReelSymbols3))) + BufPeek(LVarC, LVar0) + Loop(0) + IfNe(LVarA, LVarB) + BreakLoop + EndIf + IfNe(LVarA, LVarC) + BreakLoop + EndIf + IfNe(LVarB, LVarC) + BreakLoop + EndIf + Thread #if !VERSION_PAL - EVT_CALL(FreezeBattleState, TRUE) + Call(FreezeBattleState, TRUE) #endif - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 0, 100, 0) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(SetBattleCamZoom, 340) - EVT_CALL(MoveBattleCamOver, 10) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(SYM_SHYGUY) - EVT_LOOP(10) - EVT_CALL(MakeItemEntity, ITEM_COIN, -7, 105, -74, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS_SMALL, 0) - EVT_CALL(N(Add1Coin)) - EVT_WAIT(1) - EVT_CALL(MakeItemEntity, ITEM_COIN, 17, 105, -74, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS_SMALL, 0) - EVT_CALL(N(Add1Coin)) - EVT_WAIT(1) - EVT_CALL(MakeItemEntity, ITEM_COIN, 42, 105, -74, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS_SMALL, 0) - EVT_CALL(N(Add1Coin)) - EVT_WAIT(10) - EVT_END_LOOP - EVT_CASE_EQ(SYM_STAR) - EVT_LOOP(10) - EVT_CALL(MakeItemEntity, ITEM_COIN, -7, 105, -74, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS_SMALL, 0) - EVT_CALL(N(Add1Coin)) - EVT_WAIT(1) - EVT_CALL(MakeItemEntity, ITEM_COIN, 17, 105, -74, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS_SMALL, 0) - EVT_CALL(N(Add1Coin)) - EVT_WAIT(1) - EVT_CALL(MakeItemEntity, ITEM_COIN, 42, 105, -74, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS_SMALL, 0) - EVT_CALL(N(Add1Coin)) - EVT_WAIT(10) - EVT_END_LOOP - EVT_CASE_EQ(SYM_COIN) - EVT_LOOP(10) - EVT_CALL(MakeItemEntity, ITEM_COIN, -7, 105, -74, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS_SMALL, 0) - EVT_CALL(N(Add1Coin)) - EVT_WAIT(1) - EVT_CALL(MakeItemEntity, ITEM_COIN, 17, 105, -74, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS_SMALL, 0) - EVT_CALL(N(Add1Coin)) - EVT_WAIT(1) - EVT_CALL(MakeItemEntity, ITEM_COIN, 42, 105, -74, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS_SMALL, 0) - EVT_CALL(N(Add1Coin)) - EVT_WAIT(10) - EVT_END_LOOP - EVT_END_SWITCH - EVT_SET(BUF_GameState, SLOTS_STATE_INERT) - EVT_SET(BUF_ReelState1, REEL_STATE_INERT) - EVT_SET(BUF_ReelState2, REEL_STATE_INERT) - EVT_SET(BUF_ReelState3, REEL_STATE_INERT) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 0, 100, 0) + Call(SetBattleCamOffsetZ, 0) + Call(SetBattleCamZoom, 340) + Call(MoveBattleCamOver, 10) + Switch(LVarA) + CaseEq(SYM_SHYGUY) + Loop(10) + Call(MakeItemEntity, ITEM_COIN, -7, 105, -74, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS_SMALL, 0) + Call(N(Add1Coin)) + Wait(1) + Call(MakeItemEntity, ITEM_COIN, 17, 105, -74, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS_SMALL, 0) + Call(N(Add1Coin)) + Wait(1) + Call(MakeItemEntity, ITEM_COIN, 42, 105, -74, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS_SMALL, 0) + Call(N(Add1Coin)) + Wait(10) + EndLoop + CaseEq(SYM_STAR) + Loop(10) + Call(MakeItemEntity, ITEM_COIN, -7, 105, -74, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS_SMALL, 0) + Call(N(Add1Coin)) + Wait(1) + Call(MakeItemEntity, ITEM_COIN, 17, 105, -74, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS_SMALL, 0) + Call(N(Add1Coin)) + Wait(1) + Call(MakeItemEntity, ITEM_COIN, 42, 105, -74, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS_SMALL, 0) + Call(N(Add1Coin)) + Wait(10) + EndLoop + CaseEq(SYM_COIN) + Loop(10) + Call(MakeItemEntity, ITEM_COIN, -7, 105, -74, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS_SMALL, 0) + Call(N(Add1Coin)) + Wait(1) + Call(MakeItemEntity, ITEM_COIN, 17, 105, -74, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS_SMALL, 0) + Call(N(Add1Coin)) + Wait(1) + Call(MakeItemEntity, ITEM_COIN, 42, 105, -74, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS_SMALL, 0) + Call(N(Add1Coin)) + Wait(10) + EndLoop + EndSwitch + Set(BUF_GameState, SLOTS_STATE_INERT) + Set(BUF_ReelState1, REEL_STATE_INERT) + Set(BUF_ReelState2, REEL_STATE_INERT) + Set(BUF_ReelState3, REEL_STATE_INERT) #if !VERSION_PAL - EVT_CALL(FreezeBattleState, FALSE) + Call(FreezeBattleState, FALSE) #endif - EVT_END_THREAD + EndThread #if VERSION_PAL - EVT_WAIT(75) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 25) - EVT_WAIT(30) + Wait(75) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 25) + Wait(30) #endif - EVT_SET(BUF_GameState, SLOTS_STATE_PAYOUT) - EVT_BREAK_LOOP - EVT_END_LOOP + Set(BUF_GameState, SLOTS_STATE_PAYOUT) + BreakLoop + EndLoop #if VERSION_PAL - EVT_CALL(FreezeBattleState, FALSE) + Call(FreezeBattleState, FALSE) #endif - EVT_END_IF - EVT_LABEL(1) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + EndIf + Label(1) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_USE_ARRAY(N(SharedSlotMachineData)) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CASE_OR_EQ(EVENT_BURN_HIT) - EVT_CASE_OR_EQ(EVENT_SHOCK_HIT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IN_BlockIdx, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Block_Start) - EVT_CALL(TranslateModel, MODEL_o408, 0, -2, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o408, 0, -6, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o408, 0, -7, 0) - EVT_WAIT(4) - EVT_CALL(TranslateModel, MODEL_o408, 0, -4, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o408, 0, -2, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o408, 0, -1, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o408, 0, 0, 0) - EVT_SET(BUF_GameState, SLOTS_STATE_ACTIVE) - EVT_SET(BUF_ReelState1, REEL_STATE_SPIN) - EVT_SET(BUF_ReelState2, REEL_STATE_SPIN) - EVT_SET(BUF_ReelState3, REEL_STATE_SPIN) - EVT_CASE_EQ(AVAL_Block_StopReel1) - EVT_CALL(TranslateModel, MODEL_o409, 0, -2, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o409, 0, -6, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o409, 0, -7, 0) - EVT_WAIT(4) - EVT_CALL(TranslateModel, MODEL_o409, 0, -4, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o409, 0, -2, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o409, 0, -1, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o409, 0, 0, 0) - EVT_IF_EQ(BUF_ReelState1, REEL_STATE_SPIN) + UseArray(N(SharedSlotMachineData)) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + CaseOrEq(EVENT_BURN_HIT) + CaseOrEq(EVENT_SHOCK_HIT) + Call(GetActorVar, ACTOR_SELF, AVAR_IN_BlockIdx, LVar0) + Switch(LVar0) + CaseEq(AVAL_Block_Start) + Call(TranslateModel, MODEL_o408, 0, -2, 0) + Wait(1) + Call(TranslateModel, MODEL_o408, 0, -6, 0) + Wait(1) + Call(TranslateModel, MODEL_o408, 0, -7, 0) + Wait(4) + Call(TranslateModel, MODEL_o408, 0, -4, 0) + Wait(1) + Call(TranslateModel, MODEL_o408, 0, -2, 0) + Wait(1) + Call(TranslateModel, MODEL_o408, 0, -1, 0) + Wait(1) + Call(TranslateModel, MODEL_o408, 0, 0, 0) + Set(BUF_GameState, SLOTS_STATE_ACTIVE) + Set(BUF_ReelState1, REEL_STATE_SPIN) + Set(BUF_ReelState2, REEL_STATE_SPIN) + Set(BUF_ReelState3, REEL_STATE_SPIN) + CaseEq(AVAL_Block_StopReel1) + Call(TranslateModel, MODEL_o409, 0, -2, 0) + Wait(1) + Call(TranslateModel, MODEL_o409, 0, -6, 0) + Wait(1) + Call(TranslateModel, MODEL_o409, 0, -7, 0) + Wait(4) + Call(TranslateModel, MODEL_o409, 0, -4, 0) + Wait(1) + Call(TranslateModel, MODEL_o409, 0, -2, 0) + Wait(1) + Call(TranslateModel, MODEL_o409, 0, -1, 0) + Wait(1) + Call(TranslateModel, MODEL_o409, 0, 0, 0) + IfEq(BUF_ReelState1, REEL_STATE_SPIN) #if VERSION_PAL - EVT_CALL(FreezeBattleState, TRUE) + Call(FreezeBattleState, TRUE) #endif - EVT_SET(BUF_ReelLeft1, 100) - EVT_SET(BUF_ReelLeft2, 150) - EVT_SET(BUF_ReelLeft3, 200) - EVT_SET(BUF_ReelState1, REEL_STATE_STOPPING) - EVT_SET(BUF_ReelState2, REEL_STATE_STOPPING) - EVT_SET(BUF_ReelState3, REEL_STATE_STOPPING) - EVT_END_IF - EVT_CASE_EQ(AVAL_Block_StopReel2) - EVT_CALL(TranslateModel, MODEL_o409, 0, -2, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o409, 0, -6, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o409, 0, -7, 0) - EVT_WAIT(4) - EVT_CALL(TranslateModel, MODEL_o409, 0, -4, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o409, 0, -2, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o409, 0, -1, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o409, 0, 0, 0) - EVT_IF_EQ(BUF_ReelState2, REEL_STATE_SPIN) + Set(BUF_ReelLeft1, 100) + Set(BUF_ReelLeft2, 150) + Set(BUF_ReelLeft3, 200) + Set(BUF_ReelState1, REEL_STATE_STOPPING) + Set(BUF_ReelState2, REEL_STATE_STOPPING) + Set(BUF_ReelState3, REEL_STATE_STOPPING) + EndIf + CaseEq(AVAL_Block_StopReel2) + Call(TranslateModel, MODEL_o409, 0, -2, 0) + Wait(1) + Call(TranslateModel, MODEL_o409, 0, -6, 0) + Wait(1) + Call(TranslateModel, MODEL_o409, 0, -7, 0) + Wait(4) + Call(TranslateModel, MODEL_o409, 0, -4, 0) + Wait(1) + Call(TranslateModel, MODEL_o409, 0, -2, 0) + Wait(1) + Call(TranslateModel, MODEL_o409, 0, -1, 0) + Wait(1) + Call(TranslateModel, MODEL_o409, 0, 0, 0) + IfEq(BUF_ReelState2, REEL_STATE_SPIN) #if VERSION_PAL - EVT_CALL(FreezeBattleState, TRUE) + Call(FreezeBattleState, TRUE) #endif - EVT_SET(BUF_ReelLeft1, 150) - EVT_SET(BUF_ReelLeft2, 100) - EVT_SET(BUF_ReelLeft3, 200) - EVT_SET(BUF_ReelState1, REEL_STATE_STOPPING) - EVT_SET(BUF_ReelState2, REEL_STATE_STOPPING) - EVT_SET(BUF_ReelState3, REEL_STATE_STOPPING) - EVT_END_IF - EVT_CASE_EQ(AVAL_Block_StopReel3) - EVT_CALL(TranslateModel, MODEL_o409, 0, -2, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o409, 0, -6, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o409, 0, -7, 0) - EVT_WAIT(4) - EVT_CALL(TranslateModel, MODEL_o409, 0, -4, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o409, 0, -2, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o409, 0, -1, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o409, 0, 0, 0) - EVT_IF_EQ(BUF_ReelState3, REEL_STATE_SPIN) + Set(BUF_ReelLeft1, 150) + Set(BUF_ReelLeft2, 100) + Set(BUF_ReelLeft3, 200) + Set(BUF_ReelState1, REEL_STATE_STOPPING) + Set(BUF_ReelState2, REEL_STATE_STOPPING) + Set(BUF_ReelState3, REEL_STATE_STOPPING) + EndIf + CaseEq(AVAL_Block_StopReel3) + Call(TranslateModel, MODEL_o409, 0, -2, 0) + Wait(1) + Call(TranslateModel, MODEL_o409, 0, -6, 0) + Wait(1) + Call(TranslateModel, MODEL_o409, 0, -7, 0) + Wait(4) + Call(TranslateModel, MODEL_o409, 0, -4, 0) + Wait(1) + Call(TranslateModel, MODEL_o409, 0, -2, 0) + Wait(1) + Call(TranslateModel, MODEL_o409, 0, -1, 0) + Wait(1) + Call(TranslateModel, MODEL_o409, 0, 0, 0) + IfEq(BUF_ReelState3, REEL_STATE_SPIN) #if VERSION_PAL - EVT_CALL(FreezeBattleState, TRUE) + Call(FreezeBattleState, TRUE) #endif - EVT_SET(BUF_ReelLeft1, 200) - EVT_SET(BUF_ReelLeft2, 150) - EVT_SET(BUF_ReelLeft3, 100) - EVT_SET(BUF_ReelState1, REEL_STATE_STOPPING) - EVT_SET(BUF_ReelState2, REEL_STATE_STOPPING) - EVT_SET(BUF_ReelState3, REEL_STATE_STOPPING) - EVT_END_IF - EVT_END_SWITCH - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_BURN_DEATH) - EVT_CASE_OR_EQ(EVENT_SPIN_SMASH_HIT) - EVT_CASE_OR_EQ(EVENT_SHOCK_DEATH) - EVT_CASE_OR_EQ(EVENT_DEATH) - EVT_CASE_OR_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_CASE_OR_EQ(EVENT_SPIKE_CONTACT) - EVT_CASE_OR_EQ(EVENT_BURN_CONTACT) + Set(BUF_ReelLeft1, 200) + Set(BUF_ReelLeft2, 150) + Set(BUF_ReelLeft3, 100) + Set(BUF_ReelState1, REEL_STATE_STOPPING) + Set(BUF_ReelState2, REEL_STATE_STOPPING) + Set(BUF_ReelState3, REEL_STATE_STOPPING) + EndIf + EndSwitch + EndCaseGroup + CaseOrEq(EVENT_BURN_DEATH) + CaseOrEq(EVENT_SPIN_SMASH_HIT) + CaseOrEq(EVENT_SHOCK_DEATH) + CaseOrEq(EVENT_DEATH) + CaseOrEq(EVENT_SPIN_SMASH_DEATH) + CaseOrEq(EVENT_SPIKE_CONTACT) + CaseOrEq(EVENT_BURN_CONTACT) // do nothing - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) + EndCaseGroup + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) // do nothing - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + EndCaseGroup + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_USE_ARRAY(N(SharedSlotMachineData)) + UseArray(N(SharedSlotMachineData)) // do nothing - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/battle/common/actor/spear_guy.inc.c b/src/battle/common/actor/spear_guy.inc.c index 70ebf2a680d..f67e053a04f 100644 --- a/src/battle/common/actor/spear_guy.inc.c +++ b/src/battle/common/actor/spear_guy.inc.c @@ -217,535 +217,535 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_UpdateSpearStance) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_ShyGuy) + Switch(LVar0) + CaseEq(AVAL_State_ShyGuy) // do nothing - EVT_CASE_EQ(AVAL_State_SpearForward) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SpearForward) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_SPEAR_GUY, EVT_PTR(N(SpearForwardAnims))) - EVT_CALL(SetPartEventFlags, ACTOR_SELF, PRT_SPEAR_GUY, ACTOR_EVENT_FLAG_SPIKY_FRONT) - EVT_CASE_EQ(AVAL_State_SpearUpward) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SpearUpward) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_SPEAR_GUY, EVT_PTR(N(SpearUpwardAnims))) - EVT_CALL(SetPartEventFlags, ACTOR_SELF, PRT_SPEAR_GUY, ACTOR_EVENT_FLAG_SPIKY_TOP) - EVT_END_SWITCH - EVT_RETURN - EVT_END + CaseEq(AVAL_State_SpearForward) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SpearForward) + Call(SetIdleAnimations, ACTOR_SELF, PRT_SPEAR_GUY, Ref(N(SpearForwardAnims))) + Call(SetPartEventFlags, ACTOR_SELF, PRT_SPEAR_GUY, ACTOR_EVENT_FLAG_SPIKY_FRONT) + CaseEq(AVAL_State_SpearUpward) + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_SpearUpward) + Call(SetIdleAnimations, ACTOR_SELF, PRT_SPEAR_GUY, Ref(N(SpearUpwardAnims))) + Call(SetPartEventFlags, ACTOR_SELF, PRT_SPEAR_GUY, ACTOR_EVENT_FLAG_SPIKY_TOP) + EndSwitch + Return + End }; EvtScript N(EVS_Init) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_SpearForward) - EVT_EXEC_WAIT(N(EVS_UpdateSpearStance)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim04) - EVT_CASE_EQ(AVAL_State_SpearUpward) - EVT_EXEC_WAIT(N(EVS_UpdateSpearStance)) - EVT_CALL(SetPartEventFlags, ACTOR_SELF, PRT_SPEAR_GUY, ACTOR_EVENT_FLAG_SPIKY_TOP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim03) - EVT_END_SWITCH - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Generation, 0) - EVT_CALL(GetEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_PARTNER) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_SPEAR_GUY, ACTOR_EVENT_FLAG_SPIKY_FRONT, FALSE) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_SPEAR_GUY, EVT_PTR(N(SpearUpwardAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim03) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_SpearForward) + ExecWait(N(EVS_UpdateSpearStance)) + Call(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim04) + CaseEq(AVAL_State_SpearUpward) + ExecWait(N(EVS_UpdateSpearStance)) + Call(SetPartEventFlags, ACTOR_SELF, PRT_SPEAR_GUY, ACTOR_EVENT_FLAG_SPIKY_TOP) + Call(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim03) + EndSwitch + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(SetActorVar, ACTOR_SELF, AVAR_Generation, 0) + Call(GetEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_JUMP) + CaseOrEq(ENCOUNTER_TRIGGER_HAMMER) + CaseOrEq(ENCOUNTER_TRIGGER_PARTNER) + Call(SetPartEventBits, ACTOR_SELF, PRT_SPEAR_GUY, ACTOR_EVENT_FLAG_SPIKY_FRONT, FALSE) + Call(SetIdleAnimations, ACTOR_SELF, PRT_SPEAR_GUY, Ref(N(SpearUpwardAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim03) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(BindHandlePhase, ACTOR_SELF, NULL) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_RETURN - EVT_END + Call(BindHandlePhase, ACTOR_SELF, NULL) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Return + End }; EvtScript N(EVS_SelectAnim) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVarA) - EVT_IF_EQ(LVarA, AVAL_State_SpearForward) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarB) - EVT_IF_FLAG(LVarB, STATUS_FLAG_SLEEP | STATUS_FLAG_FEAR | STATUS_FLAG_DIZZY) - EVT_ELSE - EVT_SET(LVar1, LVar2) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVarA) + IfEq(LVarA, AVAL_State_SpearForward) + Call(GetStatusFlags, ACTOR_SELF, LVarB) + IfFlag(LVarB, STATUS_FLAG_SLEEP | STATUS_FLAG_FEAR | STATUS_FLAG_DIZZY) + Else + Set(LVar1, LVar2) + EndIf + EndIf + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_SpearForward) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FEAR | STATUS_FLAG_DIZZY) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_SPEAR_GUY, EVT_PTR(N(SpearUpwardAnims))) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_SPEAR_GUY, ACTOR_EVENT_FLAG_SPIKY_TOP, TRUE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_SPEAR_GUY, ACTOR_EVENT_FLAG_SPIKY_FRONT, FALSE) - EVT_ELSE - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_SPEAR_GUY, EVT_PTR(N(SpearForwardAnims))) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_SPEAR_GUY, ACTOR_EVENT_FLAG_SPIKY_TOP, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_SPEAR_GUY, ACTOR_EVENT_FLAG_SPIKY_FRONT, TRUE) - EVT_END_IF - EVT_CASE_EQ(AVAL_State_SpearUpward) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_SPEAR_GUY, EVT_PTR(N(SpearUpwardAnims))) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_SPEAR_GUY, ACTOR_EVENT_FLAG_SPIKY_TOP, TRUE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_SPEAR_GUY, ACTOR_EVENT_FLAG_SPIKY_FRONT, FALSE) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_SpearForward) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_FEAR | STATUS_FLAG_DIZZY) + Call(SetIdleAnimations, ACTOR_SELF, PRT_SPEAR_GUY, Ref(N(SpearUpwardAnims))) + Call(SetPartEventBits, ACTOR_SELF, PRT_SPEAR_GUY, ACTOR_EVENT_FLAG_SPIKY_TOP, TRUE) + Call(SetPartEventBits, ACTOR_SELF, PRT_SPEAR_GUY, ACTOR_EVENT_FLAG_SPIKY_FRONT, FALSE) + Else + Call(SetIdleAnimations, ACTOR_SELF, PRT_SPEAR_GUY, Ref(N(SpearForwardAnims))) + Call(SetPartEventBits, ACTOR_SELF, PRT_SPEAR_GUY, ACTOR_EVENT_FLAG_SPIKY_TOP, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_SPEAR_GUY, ACTOR_EVENT_FLAG_SPIKY_FRONT, TRUE) + EndIf + CaseEq(AVAL_State_SpearUpward) + Call(SetIdleAnimations, ACTOR_SELF, PRT_SPEAR_GUY, Ref(N(SpearUpwardAnims))) + Call(SetPartEventBits, ACTOR_SELF, PRT_SPEAR_GUY, ACTOR_EVENT_FLAG_SPIKY_TOP, TRUE) + Call(SetPartEventBits, ACTOR_SELF, PRT_SPEAR_GUY, ACTOR_EVENT_FLAG_SPIKY_FRONT, FALSE) + EndSwitch + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_SET_CONST(LVar0, PRT_SPEAR_GUY) - EVT_SET_CONST(LVar1, ANIM_SpearGuy_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_SpearForward) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim04) - EVT_CASE_EQ(AVAL_State_SpearUpward) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim03) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + SetConst(LVar0, PRT_SPEAR_GUY) + SetConst(LVar1, ANIM_SpearGuy_Anim06) + ExecWait(EVS_Enemy_ReturnHome) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_SpearForward) + Call(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim04) + CaseEq(AVAL_State_SpearUpward) + Call(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim03) + EndSwitch + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_SPEAR_GUY) - EVT_SET_CONST(LVar1, ANIM_SpearGuy_Anim07) - EVT_SET_CONST(LVar2, ANIM_SpearGuy_Anim08) - EVT_EXEC_WAIT(N(EVS_SelectAnim)) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_SpearForward) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarB) - EVT_IF_FLAG(LVarB, STATUS_FLAG_SLEEP | STATUS_FLAG_FEAR | STATUS_FLAG_DIZZY) - EVT_SET_CONST(LVar0, PRT_SPEAR_GUY) - EVT_SET_CONST(LVar1, ANIM_SpearGuy_Anim0A) - EVT_SET_CONST(LVar2, ANIM_SpearGuy_Anim0C) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_SPEAR_GUY) - EVT_SET_CONST(LVar1, ANIM_SpearGuy_Anim0B) - EVT_SET_CONST(LVar2, -1) - EVT_END_IF - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_SPEAR_GUY) - EVT_SET_CONST(LVar1, ANIM_SpearGuy_Anim0A) - EVT_SET_CONST(LVar2, ANIM_SpearGuy_Anim0C) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_SpearForward) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarB) - EVT_IF_FLAG(LVarB, STATUS_FLAG_SLEEP | STATUS_FLAG_FEAR | STATUS_FLAG_DIZZY) - EVT_SET_CONST(LVar0, PRT_SPEAR_GUY) - EVT_SET_CONST(LVar1, ANIM_SpearGuy_Anim0A) - EVT_SET_CONST(LVar2, ANIM_SpearGuy_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_SPEAR_GUY) - EVT_SET_CONST(LVar1, ANIM_SpearGuy_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_SPEAR_GUY) - EVT_SET_CONST(LVar1, ANIM_SpearGuy_Anim0B) - EVT_SET_CONST(LVar2, -1) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_SPEAR_GUY) - EVT_SET_CONST(LVar1, ANIM_SpearGuy_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_END_IF - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_SPEAR_GUY) - EVT_SET_CONST(LVar1, ANIM_SpearGuy_Anim0A) - EVT_SET_CONST(LVar2, ANIM_SpearGuy_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_SPEAR_GUY) - EVT_SET_CONST(LVar1, ANIM_SpearGuy_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_END_IF - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_SPEAR_GUY) - EVT_SET_CONST(LVar1, ANIM_SpearGuy_Anim07) - EVT_SET_CONST(LVar2, ANIM_SpearGuy_Anim08) - EVT_EXEC_WAIT(N(EVS_SelectAnim)) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_SPEAR_GUY) - EVT_SET_CONST(LVar1, ANIM_SpearGuy_Anim07) - EVT_SET_CONST(LVar2, ANIM_SpearGuy_Anim08) - EVT_EXEC_WAIT(N(EVS_SelectAnim)) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_SPEAR_GUY) - EVT_SET_CONST(LVar1, ANIM_SpearGuy_Anim09) - EVT_SET_CONST(LVar2, ANIM_SpearGuy_Anim08) - EVT_EXEC_WAIT(N(EVS_SelectAnim)) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_SPEAR_GUY) - EVT_SET_CONST(LVar1, ANIM_SpearGuy_Anim07) - EVT_SET_CONST(LVar2, ANIM_SpearGuy_Anim08) - EVT_EXEC_WAIT(N(EVS_SelectAnim)) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_SPEAR_GUY) - EVT_SET_CONST(LVar1, ANIM_SpearGuy_Anim07) - EVT_SET_CONST(LVar2, ANIM_SpearGuy_Anim08) - EVT_EXEC_WAIT(N(EVS_SelectAnim)) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_SPEAR_GUY) - EVT_SET_CONST(LVar1, ANIM_SpearGuy_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_SPEAR_GUY) - EVT_SET_CONST(LVar1, ANIM_SpearGuy_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_SPEAR_GUY) - EVT_SET_CONST(LVar1, ANIM_SpearGuy_Anim03) - EVT_SET_CONST(LVar2, ANIM_SpearGuy_Anim04) - EVT_EXEC_WAIT(N(EVS_SelectAnim)) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_SPEAR_GUY) - EVT_SET_CONST(LVar1, ANIM_SpearGuy_Anim07) - EVT_SET_CONST(LVar2, ANIM_SpearGuy_Anim08) - EVT_EXEC_WAIT(N(EVS_SelectAnim)) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_SPEAR_GUY) - EVT_SET_CONST(LVar1, ANIM_SpearGuy_Anim09) - EVT_SET_CONST(LVar2, ANIM_SpearGuy_Anim08) - EVT_EXEC_WAIT(N(EVS_SelectAnim)) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_State_SpearForward) - EVT_SET_CONST(LVar0, PRT_SPEAR_GUY) - EVT_SET_CONST(LVar1, ANIM_SpearGuy_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(AVAL_State_SpearUpward) - EVT_SET_CONST(LVar0, PRT_SPEAR_GUY) - EVT_SET_CONST(LVar1, ANIM_SpearGuy_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_END_SWITCH - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_SPEAR_GUY) - EVT_SET_CONST(LVar1, ANIM_SpearGuy_Anim06) - EVT_SET_CONST(LVar2, ANIM_SpearGuy_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_SPEAR_GUY) - EVT_SET_CONST(LVar1, ANIM_SpearGuy_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_SPEAR_GUY) - EVT_SET_CONST(LVar1, ANIM_SpearGuy_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIKE_TAUNT) - EVT_WAIT(10) - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVarA) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(AVAL_State_SpearForward) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, -11) - EVT_ADD(LVar1, 3) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_IF_FLAG(LVar3, STATUS_FLAG_DIZZY) - EVT_ADD(LVar0, -4) - EVT_ADD(LVar1, 36) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_IF_FLAG(LVar3, STATUS_FLAG_SLEEP) - EVT_ADD(LVar0, -8) - EVT_ADD(LVar1, 36) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_ADD(LVar0, -28) - EVT_ADD(LVar1, 8) - EVT_END_IF - EVT_CASE_EQ(AVAL_State_SpearUpward) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, -4) - EVT_ADD(LVar1, 15) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_IF_FLAG(LVar3, STATUS_FLAG_DIZZY) - EVT_ADD(LVar0, -4) - EVT_ADD(LVar1, 36) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_IF_FLAG(LVar3, STATUS_FLAG_SLEEP) - EVT_ADD(LVar0, -8) - EVT_ADD(LVar1, 36) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_ADD(LVar0, -10) - EVT_ADD(LVar1, 38) - EVT_END_IF - EVT_END_SWITCH - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) - EVT_WAIT(20) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_SPEAR_GUY) + SetConst(LVar1, ANIM_SpearGuy_Anim07) + SetConst(LVar2, ANIM_SpearGuy_Anim08) + ExecWait(N(EVS_SelectAnim)) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + IfEq(LVar0, AVAL_State_SpearForward) + Call(GetStatusFlags, ACTOR_SELF, LVarB) + IfFlag(LVarB, STATUS_FLAG_SLEEP | STATUS_FLAG_FEAR | STATUS_FLAG_DIZZY) + SetConst(LVar0, PRT_SPEAR_GUY) + SetConst(LVar1, ANIM_SpearGuy_Anim0A) + SetConst(LVar2, ANIM_SpearGuy_Anim0C) + Else + SetConst(LVar0, PRT_SPEAR_GUY) + SetConst(LVar1, ANIM_SpearGuy_Anim0B) + SetConst(LVar2, -1) + EndIf + Else + SetConst(LVar0, PRT_SPEAR_GUY) + SetConst(LVar1, ANIM_SpearGuy_Anim0A) + SetConst(LVar2, ANIM_SpearGuy_Anim0C) + EndIf + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + IfEq(LVar0, AVAL_State_SpearForward) + Call(GetStatusFlags, ACTOR_SELF, LVarB) + IfFlag(LVarB, STATUS_FLAG_SLEEP | STATUS_FLAG_FEAR | STATUS_FLAG_DIZZY) + SetConst(LVar0, PRT_SPEAR_GUY) + SetConst(LVar1, ANIM_SpearGuy_Anim0A) + SetConst(LVar2, ANIM_SpearGuy_Anim0C) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_SPEAR_GUY) + SetConst(LVar1, ANIM_SpearGuy_Anim0C) + ExecWait(EVS_Enemy_Death) + Else + SetConst(LVar0, PRT_SPEAR_GUY) + SetConst(LVar1, ANIM_SpearGuy_Anim0B) + SetConst(LVar2, -1) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_SPEAR_GUY) + SetConst(LVar1, ANIM_SpearGuy_Anim0B) + ExecWait(EVS_Enemy_Death) + EndIf + Else + SetConst(LVar0, PRT_SPEAR_GUY) + SetConst(LVar1, ANIM_SpearGuy_Anim0A) + SetConst(LVar2, ANIM_SpearGuy_Anim0C) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_SPEAR_GUY) + SetConst(LVar1, ANIM_SpearGuy_Anim0C) + ExecWait(EVS_Enemy_Death) + EndIf + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_SPEAR_GUY) + SetConst(LVar1, ANIM_SpearGuy_Anim07) + SetConst(LVar2, ANIM_SpearGuy_Anim08) + ExecWait(N(EVS_SelectAnim)) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_SPEAR_GUY) + SetConst(LVar1, ANIM_SpearGuy_Anim07) + SetConst(LVar2, ANIM_SpearGuy_Anim08) + ExecWait(N(EVS_SelectAnim)) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_SPEAR_GUY) + SetConst(LVar1, ANIM_SpearGuy_Anim09) + SetConst(LVar2, ANIM_SpearGuy_Anim08) + ExecWait(N(EVS_SelectAnim)) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_SPEAR_GUY) + SetConst(LVar1, ANIM_SpearGuy_Anim07) + SetConst(LVar2, ANIM_SpearGuy_Anim08) + ExecWait(N(EVS_SelectAnim)) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_SPEAR_GUY) + SetConst(LVar1, ANIM_SpearGuy_Anim07) + SetConst(LVar2, ANIM_SpearGuy_Anim08) + ExecWait(N(EVS_SelectAnim)) + ExecWait(EVS_Enemy_Knockback) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_SPEAR_GUY) + SetConst(LVar1, ANIM_SpearGuy_Anim07) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_SPEAR_GUY) + SetConst(LVar1, ANIM_SpearGuy_Anim09) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_SPEAR_GUY) + SetConst(LVar1, ANIM_SpearGuy_Anim03) + SetConst(LVar2, ANIM_SpearGuy_Anim04) + ExecWait(N(EVS_SelectAnim)) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_SPEAR_GUY) + SetConst(LVar1, ANIM_SpearGuy_Anim07) + SetConst(LVar2, ANIM_SpearGuy_Anim08) + ExecWait(N(EVS_SelectAnim)) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_SPEAR_GUY) + SetConst(LVar1, ANIM_SpearGuy_Anim09) + SetConst(LVar2, ANIM_SpearGuy_Anim08) + ExecWait(N(EVS_SelectAnim)) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + Switch(LVar0) + CaseEq(AVAL_State_SpearForward) + SetConst(LVar0, PRT_SPEAR_GUY) + SetConst(LVar1, ANIM_SpearGuy_Anim04) + ExecWait(EVS_Enemy_Recover) + CaseEq(AVAL_State_SpearUpward) + SetConst(LVar0, PRT_SPEAR_GUY) + SetConst(LVar1, ANIM_SpearGuy_Anim03) + ExecWait(EVS_Enemy_Recover) + EndSwitch + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_SPEAR_GUY) + SetConst(LVar1, ANIM_SpearGuy_Anim06) + SetConst(LVar2, ANIM_SpearGuy_Anim07) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_SPEAR_GUY) + SetConst(LVar1, ANIM_SpearGuy_Anim04) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_SPEAR_GUY) + SetConst(LVar1, ANIM_SpearGuy_Anim04) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseEq(EVENT_SPIKE_TAUNT) + Wait(10) + Set(LFlag0, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVarA) + Switch(LVarA) + CaseEq(AVAL_State_SpearForward) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar0, -11) + Add(LVar1, 3) + Set(LFlag0, TRUE) + EndIf + IfFlag(LVar3, STATUS_FLAG_DIZZY) + Add(LVar0, -4) + Add(LVar1, 36) + Set(LFlag0, TRUE) + EndIf + IfFlag(LVar3, STATUS_FLAG_SLEEP) + Add(LVar0, -8) + Add(LVar1, 36) + Set(LFlag0, TRUE) + EndIf + IfEq(LFlag0, FALSE) + Add(LVar0, -28) + Add(LVar1, 8) + EndIf + CaseEq(AVAL_State_SpearUpward) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar0, -4) + Add(LVar1, 15) + Set(LFlag0, TRUE) + EndIf + IfFlag(LVar3, STATUS_FLAG_DIZZY) + Add(LVar0, -4) + Add(LVar1, 36) + Set(LFlag0, TRUE) + EndIf + IfFlag(LVar3, STATUS_FLAG_SLEEP) + Add(LVar0, -8) + Add(LVar1, 36) + Set(LFlag0, TRUE) + EndIf + IfEq(LFlag0, FALSE) + Add(LVar0, -10) + Add(LVar1, 38) + EndIf + EndSwitch + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) + Wait(20) + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_SpearStab) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim06) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, 10) - EVT_ELSE - EVT_ADD(LVar0, 25) - EVT_END_IF - EVT_SET(LVar1, 0) - EVT_ADD(LVar2, 1) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim04) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim1A) - EVT_WAIT(15) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPEAR_STAB) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim1B) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_SPEAR_GUY, 0, ACTOR_DECORATION_SWEAT) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_SPEAR_GUY, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPEAR_STAB) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim1B) - EVT_WAIT(5) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_STAB, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim06) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Add(LVar0, 10) + Else + Add(LVar0, 25) + EndIf + Set(LVar1, 0) + Add(LVar2, 1) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim04) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim1A) + Wait(15) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPEAR_STAB) + Call(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim1B) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Wait(15) + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_SPEAR_GUY, 0, ACTOR_DECORATION_SWEAT) + ExecWait(N(EVS_ReturnHome)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_SPEAR_GUY, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPEAR_STAB) + Call(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim1B) + Wait(5) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_STAB, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(20) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Move_SummonBackup) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_01) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim05) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPEAR_GUY_DANCE_1) - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPEAR_GUY_DANCE_2) - EVT_END_THREAD - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim05) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim10) - EVT_WAIT(25) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPEAR_GUY_DANCE_1) - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPEAR_GUY_DANCE_2) - EVT_END_THREAD - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim05) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim10) - EVT_WAIT(30) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim05) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 30, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim0E) - EVT_WAIT(20) - EVT_CALL(GetOriginalActorType, ACTOR_SELF, LVar0) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_GROUND | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar1, LVar2) - EVT_CALL(GetOriginalActorType, LVar1, LVar2) - EVT_IF_EQ(LVar0, LVar2) - EVT_CALL(SetAnimation, LVar1, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim04) - EVT_CALL(GetIndexFromHome, LVar1, LVar3) - EVT_IF_LT(LVarA, LVar3) - EVT_CALL(GetActorVar, LVar1, AVAR_State, LVar4) - EVT_IF_EQ(LVar4, AVAL_State_SpearForward) - EVT_CALL(SetActorVar, LVar1, AVAR_State, AVAL_State_SpearUpward) - EVT_CALL(SetIdleAnimations, LVar1, PRT_SPEAR_GUY, EVT_PTR(N(SpearUpwardAnims))) - EVT_CALL(SetPartEventFlags, LVar1, PRT_SPEAR_GUY, ACTOR_EVENT_FLAG_SPIKY_TOP) - EVT_CALL(SetAnimation, LVar1, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim03) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar1) - EVT_IF_NE(LVar1, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_SET(LFlag0, FALSE) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_GROUND | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(1) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetIndexFromHome, LVar0, LVar1) - EVT_IF_LT(LVar1, LVarA) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(1) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SummonEnemy, EVT_PTR(N(ForwardSpearFormation)), FALSE) - EVT_ELSE - EVT_CALL(SummonEnemy, EVT_PTR(N(UpwardSpearFormation)), FALSE) - EVT_END_IF - EVT_SET(LVarB, LVar0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetAnimation, LVarB, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim10) - EVT_CALL(SetGoalToIndex, LVarB, LVarA) - EVT_CALL(GetGoalPos, LVarB, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 220) - EVT_CALL(SetActorPos, LVarB, LVar0, 0, 0) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPEAR_GUY_DANCE_1) - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPEAR_GUY_DANCE_1) - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPEAR_GUY_DANCE_2) - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPEAR_GUY_DANCE_2) - EVT_WAIT(15) - EVT_END_THREAD - EVT_CALL(SetActorSpeed, LVarB, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, LVarB, 0, FALSE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) - EVT_CALL(GetActorPos, LVarB, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 30, 0) - EVT_CALL(SetAnimation, LVarB, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim0E) - EVT_WAIT(20) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetAnimation, LVarB, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim04) - EVT_ELSE - EVT_CALL(SetAnimation, LVarB, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim03) - EVT_END_IF - EVT_CALL(GetActorPos, LVarB, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, LVarB, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, LVarB) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetActorVar, LVarB, AVAR_Generation, 1) - EVT_CASE_EQ(1) - EVT_CALL(SetActorVar, LVarB, AVAR_Generation, 2) - EVT_END_SWITCH - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Generation, 3) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_PRESET_01) + Call(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim05) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Thread + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPEAR_GUY_DANCE_1) + Wait(15) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPEAR_GUY_DANCE_2) + EndThread + Call(SetActorYaw, ACTOR_SELF, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Call(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim05) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim10) + Wait(25) + Thread + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPEAR_GUY_DANCE_1) + Wait(15) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPEAR_GUY_DANCE_2) + EndThread + Call(SetActorYaw, ACTOR_SELF, 180) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Call(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim05) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim10) + Wait(30) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Call(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim05) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 15) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 30, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) + Call(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim0E) + Wait(20) + Call(GetOriginalActorType, ACTOR_SELF, LVar0) + Call(CreateHomeTargetList, TARGET_FLAG_GROUND | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar1, LVar2) + Call(GetOriginalActorType, LVar1, LVar2) + IfEq(LVar0, LVar2) + Call(SetAnimation, LVar1, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim04) + Call(GetIndexFromHome, LVar1, LVar3) + IfLt(LVarA, LVar3) + Call(GetActorVar, LVar1, AVAR_State, LVar4) + IfEq(LVar4, AVAL_State_SpearForward) + Call(SetActorVar, LVar1, AVAR_State, AVAL_State_SpearUpward) + Call(SetIdleAnimations, LVar1, PRT_SPEAR_GUY, Ref(N(SpearUpwardAnims))) + Call(SetPartEventFlags, LVar1, PRT_SPEAR_GUY, ACTOR_EVENT_FLAG_SPIKY_TOP) + Call(SetAnimation, LVar1, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim03) + EndIf + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar1) + IfNe(LVar1, ITER_NO_MORE) + Goto(0) + EndIf + Set(LFlag0, FALSE) + Call(CreateHomeTargetList, TARGET_FLAG_GROUND | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(1) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetIndexFromHome, LVar0, LVar1) + IfLt(LVar1, LVarA) + Set(LFlag0, TRUE) + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(1) + EndIf + IfEq(LFlag0, FALSE) + Call(SummonEnemy, Ref(N(ForwardSpearFormation)), FALSE) + Else + Call(SummonEnemy, Ref(N(UpwardSpearFormation)), FALSE) + EndIf + Set(LVarB, LVar0) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetAnimation, LVarB, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim10) + Call(SetGoalToIndex, LVarB, LVarA) + Call(GetGoalPos, LVarB, LVar0, LVar1, LVar2) + Add(LVar0, 220) + Call(SetActorPos, LVarB, LVar0, 0, 0) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Thread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPEAR_GUY_DANCE_1) + Wait(15) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPEAR_GUY_DANCE_1) + Wait(15) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPEAR_GUY_DANCE_2) + Wait(15) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPEAR_GUY_DANCE_2) + Wait(15) + EndThread + Call(SetActorSpeed, LVarB, Float(4.0)) + Call(RunToGoal, LVarB, 0, FALSE) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) + Call(GetActorPos, LVarB, LVar0, LVar1, LVar2) + Add(LVar1, 15) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 30, 0) + Call(SetAnimation, LVarB, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim0E) + Wait(20) + IfEq(LFlag0, FALSE) + Call(SetAnimation, LVarB, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim04) + Else + Call(SetAnimation, LVarB, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim03) + EndIf + Call(GetActorPos, LVarB, LVar0, LVar1, LVar2) + Call(ForceHomePos, LVarB, LVar0, LVar1, LVar2) + Call(HPBarToHome, LVarB) + Call(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar0) + Switch(LVar0) + CaseEq(0) + Call(SetActorVar, LVarB, AVAR_Generation, 1) + CaseEq(1) + Call(SetActorVar, LVarB, AVAR_Generation, 2) + EndSwitch + Call(SetActorVar, ACTOR_SELF, AVAR_Generation, 3) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; Vec3i N(SummonPos) = { NPC_DISPOSE_LOCATION }; @@ -759,358 +759,358 @@ Formation N(UpwardSpearFormation) = { }; EvtScript N(EVS_BecomeShyGuy) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_ShyGuy) - EVT_WAIT(10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim13) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim18) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_ADD(LVar1, 15) - EVT_SUB(LVar2, 1) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_GRASS_SKIRT, LVar0, LVar1, LVar2) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GRASS_SKIRT, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_GRASS_SKIRT, EVT_FLOAT(0.5)) - EVT_ADD(LVar0, 50) - EVT_SUB(LVar2, 30) - EVT_THREAD - EVT_LOOP(15) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_GRASS_SKIRT, 0, 0, 10) - EVT_WAIT(1) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_GRASS_SKIRT, 0, 0, -10) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) - EVT_THREAD - EVT_LOOP(10) - EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_GRASS_SKIRT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 5, 0) - EVT_WAIT(3) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_GRASS_SKIRT, SOUND_SPEAR_GUY_RIP_SKIRT) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_GRASS_SKIRT, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_GRASS_SKIRT, LVar0, 0, LVar2, 30, TRUE) - EVT_WAIT(5) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_SPEAR_GUY, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_DAMAGE_IMMUNE | ACTOR_PART_FLAG_NO_TARGET) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_SHY_GUY, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_PRIMARY_TARGET) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_SPEAR, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_DAMAGE_IMMUNE | ACTOR_PART_FLAG_NO_TARGET) - EVT_CALL(SetPartFlags, ACTOR_SELF, PRT_GRASS_SKIRT, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_DAMAGE_IMMUNE | ACTOR_PART_FLAG_NO_TARGET) - EVT_EXEC_WAIT(N(EVS_ShyGuy_Init)) - EVT_CALL(SetActorType, ACTOR_SELF, ACTOR_TYPE_SHY_GUY) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(ShyGuyStatusTable))) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_State, AVAL_State_ShyGuy) + Wait(10) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim13) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim18) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Add(LVar1, 15) + Sub(LVar2, 1) + Call(SetPartPos, ACTOR_SELF, PRT_GRASS_SKIRT, LVar0, LVar1, LVar2) + Call(SetPartFlagBits, ACTOR_SELF, PRT_GRASS_SKIRT, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_GRASS_SKIRT, Float(0.5)) + Add(LVar0, 50) + Sub(LVar2, 30) + Thread + Loop(15) + Call(SetPartRotation, ACTOR_SELF, PRT_GRASS_SKIRT, 0, 0, 10) + Wait(1) + Call(SetPartRotation, ACTOR_SELF, PRT_GRASS_SKIRT, 0, 0, -10) + Wait(1) + EndLoop + EndThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) + Thread + Loop(10) + Call(GetPartOffset, ACTOR_SELF, PRT_GRASS_SKIRT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 5, 0) + Wait(3) + EndLoop + EndThread + Call(PlaySoundAtPart, ACTOR_SELF, PRT_GRASS_SKIRT, SOUND_SPEAR_GUY_RIP_SKIRT) + Call(SetPartSounds, ACTOR_SELF, PRT_GRASS_SKIRT, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) + Call(JumpPartTo, ACTOR_SELF, PRT_GRASS_SKIRT, LVar0, 0, LVar2, 30, TRUE) + Wait(5) + Call(SetPartFlags, ACTOR_SELF, PRT_SPEAR_GUY, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_DAMAGE_IMMUNE | ACTOR_PART_FLAG_NO_TARGET) + Call(SetPartFlags, ACTOR_SELF, PRT_SHY_GUY, ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_PRIMARY_TARGET) + Call(SetPartFlags, ACTOR_SELF, PRT_SPEAR, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_DAMAGE_IMMUNE | ACTOR_PART_FLAG_NO_TARGET) + Call(SetPartFlags, ACTOR_SELF, PRT_GRASS_SKIRT, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_SHADOW | ACTOR_PART_FLAG_DAMAGE_IMMUNE | ACTOR_PART_FLAG_NO_TARGET) + ExecWait(N(EVS_ShyGuy_Init)) + Call(SetActorType, ACTOR_SELF, ACTOR_TYPE_SHY_GUY) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) + Call(SetStatusTable, ACTOR_SELF, Ref(N(ShyGuyStatusTable))) + Call(HPBarToHome, ACTOR_SELF) + Call(ResetAllActorSounds, ACTOR_SELF) + Return + End }; EvtScript N(EVS_Attack_ThrowSpear) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim06) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 200) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim15) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_SUB(LVar0, 100) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_SUB(LVar0, 70) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_SPEAR, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GRASS_SKIRT, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_ELSE - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_SPEAR, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_GRASS_SKIRT, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim11) - EVT_WAIT(5) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim17) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim12) - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_SPEAR, LVar0, 20, LVar2) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_SPEAR, 0, 0, -30) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SPEAR, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_THREAD - EVT_CALL(MakeLerp, -30, 45, 20, EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_SPEAR, 0, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_SPEAR, SOUND_SPEAR_THROW) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_SPEAR, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_SET(LVar1, 10) - EVT_ADD(LVar2, 2) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_SPEAR, EVT_FLOAT(0.7)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_SPEAR, LVar0, LVar1, LVar2, 20, TRUE) - EVT_WAIT(10) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SPEAR, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_SPEAR_GUY, 0, ACTOR_DECORATION_SWEAT) - EVT_WAIT(30) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_SPEAR_GUY, 0) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_BecomeShyGuy)) - EVT_CALL(YieldTurn) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim11) - EVT_WAIT(5) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim17) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim12) - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_SPEAR, LVar0, 20, LVar2) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_SPEAR, 0, 0, -30) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SPEAR, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_THREAD - EVT_CALL(MakeLerp, -30, 45, 20, EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetPartRotation, ACTOR_SELF, PRT_SPEAR, 0, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_SPEAR, SOUND_SPEAR_THROW) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_SPEAR, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 2) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_SPEAR, EVT_FLOAT(0.7)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_SPEAR, LVar0, LVar1, LVar2, 20, TRUE) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_THROW, BS_FLAGS1_TRIGGER_EVENTS) - EVT_WAIT(3) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_SPEAR, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(EVS_BecomeShyGuy)) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim06) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 200) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim15) + Call(SetActorYaw, ACTOR_SELF, 0) + Sub(LVar0, 100) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Sub(LVar0, 70) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartScale, ACTOR_SELF, PRT_SPEAR, Float(0.4), Float(0.4), Float(0.4)) + Call(SetPartScale, ACTOR_SELF, PRT_GRASS_SKIRT, Float(0.4), Float(0.4), Float(0.4)) + Else + Call(SetPartScale, ACTOR_SELF, PRT_SPEAR, Float(1.0), Float(1.0), Float(1.0)) + Call(SetPartScale, ACTOR_SELF, PRT_GRASS_SKIRT, Float(1.0), Float(1.0), Float(1.0)) + EndIf + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim11) + Wait(5) + Thread + Call(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim17) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Sub(LVar0, 10) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim12) + EndThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_SPEAR, LVar0, 20, LVar2) + Call(SetPartRotation, ACTOR_SELF, PRT_SPEAR, 0, 0, -30) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SPEAR, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Thread + Call(MakeLerp, -30, 45, 20, EASING_LINEAR) + Label(0) + Call(UpdateLerp) + Call(SetPartRotation, ACTOR_SELF, PRT_SPEAR, 0, 0, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + EndThread + Call(PlaySoundAtPart, ACTOR_SELF, PRT_SPEAR, SOUND_SPEAR_THROW) + Call(SetPartSounds, ACTOR_SELF, PRT_SPEAR, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Set(LVar1, 10) + Add(LVar2, 2) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_SPEAR, Float(0.7)) + Call(JumpPartTo, ACTOR_SELF, PRT_SPEAR, LVar0, LVar1, LVar2, 20, TRUE) + Wait(10) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SPEAR, ACTOR_PART_FLAG_INVISIBLE, TRUE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(AddActorDecoration, ACTOR_SELF, PRT_SPEAR_GUY, 0, ACTOR_DECORATION_SWEAT) + Wait(30) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_SPEAR_GUY, 0) + Wait(10) + ExecWait(N(EVS_BecomeShyGuy)) + Call(YieldTurn) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim11) + Wait(5) + Thread + Call(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim17) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Sub(LVar0, 10) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_SPEAR_GUY, ANIM_SpearGuy_Anim12) + EndThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_SPEAR, LVar0, 20, LVar2) + Call(SetPartRotation, ACTOR_SELF, PRT_SPEAR, 0, 0, -30) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SPEAR, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Thread + Call(MakeLerp, -30, 45, 20, EASING_LINEAR) + Label(0) + Call(UpdateLerp) + Call(SetPartRotation, ACTOR_SELF, PRT_SPEAR, 0, 0, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + EndThread + Call(PlaySoundAtPart, ACTOR_SELF, PRT_SPEAR, SOUND_SPEAR_THROW) + Call(SetPartSounds, ACTOR_SELF, PRT_SPEAR, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar2, 2) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_SPEAR, Float(0.7)) + Call(JumpPartTo, ACTOR_SELF, PRT_SPEAR, LVar0, LVar1, LVar2, 20, TRUE) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_THROW, BS_FLAGS1_TRIGGER_EVENTS) + Wait(3) + Call(SetPartFlagBits, ACTOR_SELF, PRT_SPEAR, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(20) + ExecWait(N(EVS_BecomeShyGuy)) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_GetAvailableColumn) = { - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar5) - EVT_CALL(GetIndexFromHome, LVar0, LVar5) - EVT_MOD(LVar5, 4) - EVT_SWITCH(LVar5) - EVT_CASE_EQ(0) - EVT_SET(LFlag1, TRUE) - EVT_CASE_EQ(1) - EVT_SET(LFlag2, TRUE) - EVT_CASE_EQ(2) - EVT_SET(LFlag3, TRUE) - EVT_CASE_EQ(3) - EVT_SET(LFlag4, TRUE) - EVT_END_SWITCH - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_EQ(LFlag1, FALSE) - EVT_SET(LVarA, 0) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LFlag2, FALSE) - EVT_SET(LVarA, 1) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LFlag3, FALSE) - EVT_SET(LVarA, 2) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LFlag4, FALSE) - EVT_SET(LVarA, 3) - EVT_RETURN - EVT_END_IF - EVT_SET(LVarA, -1) - EVT_RETURN - EVT_END + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar5) + Call(GetIndexFromHome, LVar0, LVar5) + Mod(LVar5, 4) + Switch(LVar5) + CaseEq(0) + Set(LFlag1, TRUE) + CaseEq(1) + Set(LFlag2, TRUE) + CaseEq(2) + Set(LFlag3, TRUE) + CaseEq(3) + Set(LFlag4, TRUE) + EndSwitch + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + IfEq(LFlag1, FALSE) + Set(LVarA, 0) + Return + EndIf + IfEq(LFlag2, FALSE) + Set(LVarA, 1) + Return + EndIf + IfEq(LFlag3, FALSE) + Set(LVarA, 2) + Return + EndIf + IfEq(LFlag4, FALSE) + Set(LVarA, 3) + Return + EndIf + Set(LVarA, -1) + Return + End }; EvtScript N(EVS_CountActiveSummoners) = { - EVT_SET(LVar9, 0) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetOriginalActorType, LVar0, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(ACTOR_TYPE_JUNGLE_FUZZY) - EVT_CALL(GetStatusFlags, LVar0, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(GetActorVar, LVar0, AVAR_JungleFuzzy_Generation, LVar3) - EVT_IF_NE(LVar3, 2) - EVT_ADD(LVar9, 1) - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(ACTOR_TYPE_SPEAR_GUY) - EVT_CALL(GetStatusFlags, LVar0, LVar3) - EVT_IF_NOT_FLAG(LVar3, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(GetActorVar, LVar0, AVAR_Generation, LVar3) - EVT_IF_LT(LVar3, 2) - EVT_ADD(LVar9, 1) - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVar9, 0) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetOriginalActorType, LVar0, LVar2) + Switch(LVar2) + CaseEq(ACTOR_TYPE_JUNGLE_FUZZY) + Call(GetStatusFlags, LVar0, LVar3) + IfNotFlag(LVar3, STATUS_FLAGS_IMMOBILIZED) + Call(GetActorVar, LVar0, AVAR_JungleFuzzy_Generation, LVar3) + IfNe(LVar3, 2) + Add(LVar9, 1) + EndIf + EndIf + CaseEq(ACTOR_TYPE_SPEAR_GUY) + Call(GetStatusFlags, LVar0, LVar3) + IfNotFlag(LVar3, STATUS_FLAGS_IMMOBILIZED) + Call(GetActorVar, LVar0, AVAR_Generation, LVar3) + IfLt(LVar3, 2) + Add(LVar9, 1) + EndIf + EndIf + EndSwitch + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Return + End }; EvtScript N(EVS_SwitchSpearStance) = { - EVT_CALL(GetIndexFromHome, ACTOR_SELF, LVarA) - EVT_SET(LFlag0, FALSE) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_GROUND | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetIndexFromHome, LVar0, LVar1) - EVT_IF_LT(LVar1, LVarA) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_SpearForward) - EVT_SET(LVar0, AVAL_State_SpearUpward) - EVT_EXEC_WAIT(N(EVS_UpdateSpearStance)) - EVT_END_IF - EVT_ELSE - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_SpearUpward) - EVT_SET(LVar0, AVAL_State_SpearForward) - EVT_EXEC_WAIT(N(EVS_UpdateSpearStance)) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetIndexFromHome, ACTOR_SELF, LVarA) + Set(LFlag0, FALSE) + Call(CreateHomeTargetList, TARGET_FLAG_GROUND | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetIndexFromHome, LVar0, LVar1) + IfLt(LVar1, LVarA) + Set(LFlag0, TRUE) + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + IfEq(LFlag0, TRUE) + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + IfEq(LVar0, AVAL_State_SpearForward) + Set(LVar0, AVAL_State_SpearUpward) + ExecWait(N(EVS_UpdateSpearStance)) + EndIf + Else + Call(GetActorVar, ACTOR_SELF, AVAR_State, LVar0) + IfEq(LVar0, AVAL_State_SpearUpward) + Set(LVar0, AVAL_State_SpearForward) + ExecWait(N(EVS_UpdateSpearStance)) + EndIf + EndIf + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_Attack_SpearStab)) - EVT_EXEC_WAIT(N(EVS_SwitchSpearStance)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(0) - EVT_CASE_OR_EQ(1) - EVT_EXEC_WAIT(N(EVS_GetAvailableColumn)) - EVT_IF_EQ(LVarA, -1) - EVT_EXEC_WAIT(N(EVS_Attack_SpearStab)) - EVT_EXEC_WAIT(N(EVS_SwitchSpearStance)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_CountActiveSummoners)) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(1) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 300) - EVT_EXEC_WAIT(N(EVS_Move_SummonBackup)) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(2) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 150) - EVT_EXEC_WAIT(N(EVS_Move_SummonBackup)) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(3) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_LT(LVar0, 100) - EVT_EXEC_WAIT(N(EVS_Move_SummonBackup)) - EVT_RETURN - EVT_END_IF - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_Attack_SpearStab)) - EVT_EXEC_WAIT(N(EVS_SwitchSpearStance)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(2) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(GetTargetListLength, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_Attack_ThrowSpear)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_Attack_SpearStab)) - EVT_EXEC_WAIT(N(EVS_SwitchSpearStance)) - EVT_CASE_EQ(3) - EVT_EXEC_WAIT(N(EVS_Attack_ThrowSpear)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + ExecWait(N(EVS_Attack_SpearStab)) + ExecWait(N(EVS_SwitchSpearStance)) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Generation, LVar0) + Switch(LVar0) + CaseOrEq(0) + CaseOrEq(1) + ExecWait(N(EVS_GetAvailableColumn)) + IfEq(LVarA, -1) + ExecWait(N(EVS_Attack_SpearStab)) + ExecWait(N(EVS_SwitchSpearStance)) + Return + EndIf + ExecWait(N(EVS_CountActiveSummoners)) + Switch(LVar9) + CaseEq(1) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 300) + ExecWait(N(EVS_Move_SummonBackup)) + Return + EndIf + CaseEq(2) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 150) + ExecWait(N(EVS_Move_SummonBackup)) + Return + EndIf + CaseEq(3) + Call(RandInt, 1000, LVar0) + IfLt(LVar0, 100) + ExecWait(N(EVS_Move_SummonBackup)) + Return + EndIf + EndSwitch + ExecWait(N(EVS_Attack_SpearStab)) + ExecWait(N(EVS_SwitchSpearStance)) + EndCaseGroup + CaseEq(2) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(GetTargetListLength, LVar0) + IfEq(LVar0, 1) + ExecWait(N(EVS_Attack_ThrowSpear)) + Return + EndIf + ExecWait(N(EVS_Attack_SpearStab)) + ExecWait(N(EVS_SwitchSpearStance)) + CaseEq(3) + ExecWait(N(EVS_Attack_ThrowSpear)) + EndSwitch + Return + End }; s32 N(ShyGuyAnims)[] = { @@ -1127,401 +1127,401 @@ s32 N(ShyGuyAnims)[] = { }; EvtScript N(EVS_ShyGuy_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_ShyGuy_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_ShyGuy_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_ShyGuy_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_ShyGuy_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_ShyGuy_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_ShyGuy_HandleEvent))) + Return + End }; #include "common/battle/SetAbsoluteStatusOffsets.inc.c" EvtScript N(EVS_ShyGuy_Idle) = { - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SLEEP) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_SHY_GUY, -4, 14) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_SHY_GUY, 0, 0) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 13, 10, 13) - EVT_ELSE - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_SHY_GUY, 0, 24) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_SHY_GUY, -1, -10) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SLEEP) + Call(SetTargetOffset, ACTOR_SELF, PRT_SHY_GUY, -4, 14) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_SHY_GUY, 0, 0) + Call(N(SetAbsoluteStatusOffsets), -10, 13, 10, 13) + Else + Call(SetTargetOffset, ACTOR_SELF, PRT_SHY_GUY, 0, 24) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_SHY_GUY, -1, -10) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_ShyGuy_ReturnHome) = { - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_SET_CONST(LVar0, PRT_SHY_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim01) - EVT_RETURN - EVT_END + Call(ResetAllActorSounds, ACTOR_SELF) + SetConst(LVar0, PRT_SHY_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim03) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim01) + Return + End }; EvtScript N(EVS_ShyGuy_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_SHY_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_SHY_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0D) - EVT_SET_CONST(LVar2, ANIM_ShyGuy_Red_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_SHY_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0D) - EVT_SET_CONST(LVar2, ANIM_ShyGuy_Red_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_SHY_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_SHY_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_SHY_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_SHY_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_SHY_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_SHY_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_EXEC_WAIT(N(EVS_ShyGuy_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_SHY_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_SHY_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_SHY_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_SHY_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_SHY_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_SHY_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_SHY_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim03) - EVT_SET_CONST(LVar2, ANIM_ShyGuy_Red_Anim14) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_SHY_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_SHY_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_SHY_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_SHY_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0D) + SetConst(LVar2, ANIM_ShyGuy_Red_Anim0E) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_SHY_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0D) + SetConst(LVar2, ANIM_ShyGuy_Red_Anim0E) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_SHY_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0E) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_SHY_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_SHY_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_SHY_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_SHY_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_SHY_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_Knockback) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + ExecWait(N(EVS_ShyGuy_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_SHY_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_SHY_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_SHY_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_SHY_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_SHY_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_SHY_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_SHY_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim03) + SetConst(LVar2, ANIM_ShyGuy_Red_Anim14) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_SHY_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_SHY_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim0C) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_Tackle) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim03) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_ACTOR_HOP, 0) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim04) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim05) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_SHY_GUY, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_SET_CONST(LVar0, PRT_SHY_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_SHY_GUY, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim01) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HOP) - EVT_END_THREAD - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim04) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim05) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 15) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim01) - EVT_WAIT(8) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_ShyGuy_ReturnHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim03) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_ACTOR_HOP, 0) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim04) + Call(SetGoalToTarget, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim05) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(ResetAllActorSounds, ACTOR_SELF) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_SHY_GUY, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + SetConst(LVar0, PRT_SHY_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim04) + ExecWait(EVS_Enemy_ReturnHome) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_SHY_GUY, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim01) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Thread + Wait(3) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HOP) + EndThread + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim04) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 10) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim05) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_TACKLE, BS_FLAGS1_TRIGGER_EVENTS) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 15) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim01) + Wait(8) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + ExecWait(N(EVS_ShyGuy_ReturnHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_Vault) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_TIMING_BAR_GO) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim09) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim03) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 80) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim04) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_SUB(LVar0, 40) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim09) - EVT_THREAD - EVT_WAIT(12) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim0A) - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 24, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim05) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 15) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_SHY_GUY, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_SET_CONST(LVar0, PRT_SHY_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_SHY_GUY, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim01) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim09) - EVT_THREAD - EVT_WAIT(9) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim0A) - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_VAULT, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 15) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0) - EVT_SET(LVar3, 0) - EVT_LOOP(20) - EVT_SUB(LVar3, 30) - EVT_IF_LT(LVar3, 0) - EVT_ADD(LVar3, 360) - EVT_END_IF - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS1_ATK_BLOCKED) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetLastDamage, ACTOR_PLAYER, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LRAW_CHEERING) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LRAW_CHEERING | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim09) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim07) - EVT_WAIT(15) - EVT_GOTO(2) - EVT_LABEL(1) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_COLLAPSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim10) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_DISAPPOINTED) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_SHY_GUY, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 50) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim11) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim13) - EVT_END_IF - EVT_WAIT(25) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_SHY_GUY, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_LABEL(2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_SET_CONST(LVar0, PRT_SHY_GUY) - EVT_SET_CONST(LVar1, ANIM_ShyGuy_Red_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim01) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_TIMING_BAR_GO) + Call(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim09) + Wait(20) + Call(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim03) + Call(SetActorSpeed, ACTOR_SELF, Float(3.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 80) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) + Call(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim04) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Sub(LVar0, 40) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim09) + Thread + Wait(12) + Call(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim0A) + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 24, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim05) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 15) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_SHY_GUY, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + SetConst(LVar0, PRT_SHY_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim04) + ExecWait(EVS_Enemy_ReturnHome) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_SHY_GUY, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim01) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim09) + Thread + Wait(9) + Call(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim0A) + EndThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(JumpToGoal, ACTOR_SELF, 18, FALSE, TRUE, FALSE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_VAULT, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 15) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 14, 0) + Set(LVar3, 0) + Loop(20) + Sub(LVar3, 30) + IfLt(LVar3, 0) + Add(LVar3, 360) + EndIf + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar3) + Wait(1) + EndLoop + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + EndThread + Call(GetBattleFlags, LVar0) + IfFlag(LVar0, BS_FLAGS1_ATK_BLOCKED) + Goto(1) + EndIf + Call(GetLastDamage, ACTOR_PLAYER, LVar0) + IfEq(LVar0, 0) + Goto(1) + EndIf + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LRAW_CHEERING) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LRAW_CHEERING | SOUND_ID_TRIGGER_CHANGE_SOUND) + Call(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim09) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim07) + Wait(15) + Goto(2) + Label(1) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_COLLAPSE) + Call(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim10) + Wait(10) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_DISAPPOINTED) + Call(AddActorDecoration, ACTOR_SELF, PRT_SHY_GUY, 0, ACTOR_DECORATION_SWEAT) + Call(RandInt, 100, LVar0) + IfLt(LVar0, 50) + Call(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim11) + Else + Call(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim13) + EndIf + Wait(25) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_SHY_GUY, 0) + Call(SetActorYaw, ACTOR_SELF, 180) + Label(2) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + SetConst(LVar0, PRT_SHY_GUY) + SetConst(LVar1, ANIM_ShyGuy_Red_Anim04) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetAnimation, ACTOR_SELF, PRT_SHY_GUY, ANIM_ShyGuy_Red_Anim01) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_ShyGuy_TakeTurn) = { - EVT_CALL(RandInt, 1, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_Attack_Tackle)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_Vault)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(RandInt, 1, LVar0) + IfEq(LVar0, 0) + ExecWait(N(EVS_Attack_Tackle)) + Else + ExecWait(N(EVS_Attack_Vault)) + EndIf + Return + End }; diff --git a/src/battle/common/actor/spike_top.inc.c b/src/battle/common/actor/spike_top.inc.c index 13f4d756bc3..6dfcbca2375 100644 --- a/src/battle/common/actor/spike_top.inc.c +++ b/src/battle/common/actor/spike_top.inc.c @@ -148,694 +148,694 @@ s32 N(ToppledAnims)[] = { #include "common/battle/SetAbsoluteStatusOffsets.inc.c" EvtScript N(EVS_Init) = { - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsCeiling, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Ceiling) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 0, 10, 0) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_Ceiling_TakeTurn))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_Ceiling_HandleEvent))) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, FALSE) - EVT_ELSE - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Ground) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 24) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -9) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(GroundAnims))) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, TRUE) - EVT_END_IF - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(GetActorVar, ACTOR_SELF, AVAR_IsCeiling, LVar0) + IfEq(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Ceiling) + Call(N(SetAbsoluteStatusOffsets), -10, 0, 10, 0) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_Ceiling_TakeTurn))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_Ceiling_HandleEvent))) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, FALSE) + Else + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Ground) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 24) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -9) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(GroundAnims))) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, TRUE) + EndIf + Call(HPBarToHome, ACTOR_SELF) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_FallFromCeiling) = { - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Toppled) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 1, 20) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -3, -8) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 1) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledDefense))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledAnims))) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, TRUE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim15) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 24) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(GetIndexFromPos, ACTOR_SELF, LVarA) - EVT_MOD(LVarA, 4) - EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVarA) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(SetHomePos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_SET(LVarD, LVarA) - EVT_SET(LVarE, LVarB) - EVT_SET(LVarF, LVarC) - EVT_SUB(LVarD, LVar0) - EVT_SUB(LVarE, LVar1) - EVT_SUB(LVarF, LVar2) - EVT_DIV(LVarD, 2) - EVT_DIV(LVarE, 2) - EVT_DIV(LVarF, 2) - EVT_ADD(LVar0, LVarD) - EVT_ADD(LVar1, LVarE) - EVT_ADD(LVar2, LVarF) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim05) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(HideHealthBar, ACTOR_SELF) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Toppled) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 1, 20) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -3, -8) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 1) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledDefense))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledAnims))) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, TRUE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim15) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 24) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(GetIndexFromPos, ACTOR_SELF, LVarA) + Mod(LVarA, 4) + Call(SetGoalToIndex, ACTOR_SELF, LVarA) + Call(GetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(SetHomePos, ACTOR_SELF, LVarA, LVarB, LVarC) + Set(LVarD, LVarA) + Set(LVarE, LVarB) + Set(LVarF, LVarC) + Sub(LVarD, LVar0) + Sub(LVarE, LVar1) + Sub(LVarF, LVar2) + Div(LVarD, 2) + Div(LVarE, 2) + Div(LVarF, 2) + Add(LVar0, LVarD) + Add(LVar1, LVarE) + Add(LVar2, LVarF) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim05) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(HPBarToHome, ACTOR_SELF) + Return + End }; EvtScript N(EVS_Ceiling_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim14) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim14) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_FallFromCeiling)) - EVT_CASE_EQ(EVENT_FLIP_TRIGGER) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim14) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_FallFromCeiling)) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim19) - EVT_SET_CONST(LVar2, ANIM_SpikeTop_Anim1A) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_FallFromCeiling)) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim19) - EVT_SET_CONST(LVar2, ANIM_SpikeTop_Anim1A) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim1A) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim14) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim13) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim14) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim13) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_ZERO_DAMAGE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim0D) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim0D) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_WAIT(2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_STOP) - EVT_EXEC_WAIT(N(EVS_FallFromCeiling)) - EVT_END_IF - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim14) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim14) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, TRUE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim09) - EVT_SET_CONST(LVar2, ANIM_SpikeTop_Anim14) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim14) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim14) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_FallFromCeiling)) + CaseEq(EVENT_FLIP_TRIGGER) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim14) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_FallFromCeiling)) + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim19) + SetConst(LVar2, ANIM_SpikeTop_Anim1A) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_FallFromCeiling)) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim19) + SetConst(LVar2, ANIM_SpikeTop_Anim1A) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim1A) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim14) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim13) + ExecWait(EVS_Enemy_Knockback) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim08) + ExecWait(EVS_Enemy_ReturnHome) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim14) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim13) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_ZERO_DAMAGE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim0D) + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim0D) + ExecWait(EVS_Enemy_NoDamageHit) + Wait(2) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_STOP) + ExecWait(N(EVS_FallFromCeiling)) + EndIf + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim14) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim14) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + CaseEq(EVENT_SCARE_AWAY) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, TRUE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim09) + SetConst(LVar2, ANIM_SpikeTop_Anim14) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; // switch the anim on LVar1 if toppled EvtScript N(EVS_CheckToppleAnim) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar3) - EVT_IF_EQ(LVar3, AVAL_State_Toppled) - EVT_SET(LVar1, LVar2) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar3) + IfEq(LVar3, AVAL_State_Toppled) + Set(LVar1, LVar2) + EndIf + Return + End }; s32 N(FlipPosOffsets)[] = { 7, 13, 17, 21, 23, 24, 23, 21, 17, 13, 7, 0, 4, 7, 6, 4, 0, 2, 0 }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim13) - EVT_SET_CONST(LVar2, ANIM_SpikeTop_Anim15) - EVT_EXEC_WAIT(N(EVS_CheckToppleAnim)) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_NE(LVar0, AVAL_State_Toppled) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim16) - EVT_SET_CONST(LVar2, ANIM_SpikeTop_Anim17) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim18) - EVT_SET_CONST(LVar2, ANIM_SpikeTop_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_END_IF - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_NE(LVar0, AVAL_State_Toppled) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim16) - EVT_SET_CONST(LVar2, ANIM_SpikeTop_Anim17) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim17) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim18) - EVT_SET_CONST(LVar2, ANIM_SpikeTop_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_END_IF - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim13) - EVT_SET_CONST(LVar2, ANIM_SpikeTop_Anim15) - EVT_EXEC_WAIT(N(EVS_CheckToppleAnim)) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_FLIP_TRIGGER) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Toppled) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 1, 20) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -3, -8) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 1) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledDefense))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledAnims))) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, FALSE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim13) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -45) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -90) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -135) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, -180) - EVT_WAIT(1) - EVT_END_THREAD - EVT_USE_BUF(EVT_PTR(N(FlipPosOffsets))) - EVT_LOOP(19) - EVT_BUF_READ1(LVar0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim15) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim13) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim13) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim13) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim13) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_ZERO_DAMAGE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Ground) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim0E) - EVT_WAIT(8) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim05) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_CASE_EQ(EVENT_IMMUNE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Ground) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim0C) - EVT_WAIT(8) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim05) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_CASE_EQ(EVENT_SPIKE_TAUNT) - EVT_WAIT(10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 9) - EVT_ELSE - EVT_ADD(LVar1, 24) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) - EVT_WAIT(20) - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim13) - EVT_SET_CONST(LVar2, ANIM_SpikeTop_Anim15) - EVT_EXEC_WAIT(N(EVS_CheckToppleAnim)) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim13) - EVT_SET_CONST(LVar2, ANIM_SpikeTop_Anim15) - EVT_EXEC_WAIT(N(EVS_CheckToppleAnim)) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim13) - EVT_SET_CONST(LVar2, ANIM_SpikeTop_Anim15) - EVT_EXEC_WAIT(N(EVS_CheckToppleAnim)) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim13) - EVT_SET_CONST(LVar2, ANIM_SpikeTop_Anim15) - EVT_EXEC_WAIT(N(EVS_CheckToppleAnim)) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Ground) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_END_IF - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Ground) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim08) - EVT_SET_CONST(LVar2, ANIM_SpikeTop_Anim13) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim05) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Ground) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim08) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim05) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 7, 0, 0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Ground) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim13) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim15) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Ground) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim0C) - EVT_WAIT(8) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim05) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim13) + SetConst(LVar2, ANIM_SpikeTop_Anim15) + ExecWait(N(EVS_CheckToppleAnim)) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfNe(LVar0, AVAL_State_Toppled) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim16) + SetConst(LVar2, ANIM_SpikeTop_Anim17) + ExecWait(EVS_Enemy_BurnHit) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim18) + SetConst(LVar2, ANIM_SpikeTop_Anim18) + ExecWait(EVS_Enemy_BurnHit) + EndIf + CaseEq(EVENT_BURN_DEATH) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfNe(LVar0, AVAL_State_Toppled) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim16) + SetConst(LVar2, ANIM_SpikeTop_Anim17) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim17) + ExecWait(EVS_Enemy_Death) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim18) + SetConst(LVar2, ANIM_SpikeTop_Anim18) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim18) + ExecWait(EVS_Enemy_Death) + EndIf + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim13) + SetConst(LVar2, ANIM_SpikeTop_Anim15) + ExecWait(N(EVS_CheckToppleAnim)) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_FLIP_TRIGGER) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Toppled) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 1, 20) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -3, -8) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 1) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledDefense))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledAnims))) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, FALSE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim13) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Thread + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -45) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -90) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -135) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, -180) + Wait(1) + EndThread + UseBuf(Ref(N(FlipPosOffsets))) + Loop(19) + BufRead1(LVar0) + Call(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim15) + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim13) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim13) + ExecWait(EVS_Enemy_Knockback) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim08) + ExecWait(EVS_Enemy_ReturnHome) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim13) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim13) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_ZERO_DAMAGE) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfEq(LVar0, AVAL_State_Ground) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim0B) + ExecWait(EVS_Enemy_NoDamageHit) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim0E) + Wait(8) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim05) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + CaseEq(EVENT_IMMUNE) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfEq(LVar0, AVAL_State_Ground) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim0B) + ExecWait(EVS_Enemy_NoDamageHit) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim0C) + Wait(8) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim05) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + CaseEq(EVENT_SPIKE_TAUNT) + Wait(10) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar1, 9) + Else + Add(LVar1, 24) + EndIf + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) + Wait(20) + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim13) + SetConst(LVar2, ANIM_SpikeTop_Anim15) + ExecWait(N(EVS_CheckToppleAnim)) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim13) + SetConst(LVar2, ANIM_SpikeTop_Anim15) + ExecWait(N(EVS_CheckToppleAnim)) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim13) + SetConst(LVar2, ANIM_SpikeTop_Anim15) + ExecWait(N(EVS_CheckToppleAnim)) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim13) + SetConst(LVar2, ANIM_SpikeTop_Anim15) + ExecWait(N(EVS_CheckToppleAnim)) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfEq(LVar0, AVAL_State_Ground) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim03) + ExecWait(EVS_Enemy_Recover) + EndIf + CaseEq(EVENT_SCARE_AWAY) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfEq(LVar0, AVAL_State_Ground) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim08) + SetConst(LVar2, ANIM_SpikeTop_Anim13) + ExecWait(EVS_Enemy_ScareAway) + Return + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim05) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + CaseEq(EVENT_BEGIN_AIR_LIFT) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfEq(LVar0, AVAL_State_Ground) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim08) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim05) + EndIf + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + Call(SetActorDispOffset, ACTOR_SELF, 7, 0, 0) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfEq(LVar0, AVAL_State_Ground) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim13) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim15) + EndIf + ExecWait(EVS_Enemy_BlowAway) + Return + CaseEq(EVENT_AIR_LIFT_FAILED) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfEq(LVar0, AVAL_State_Ground) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim0B) + ExecWait(EVS_Enemy_NoDamageHit) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim0C) + Wait(8) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim05) + ExecWait(EVS_Enemy_NoDamageHit) + EndIf + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Ceiling_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Ground) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 24) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -9) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(GroundAnims))) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, TRUE) - EVT_CALL(GetIndexFromPos, ACTOR_SELF, LVar0) - EVT_MOD(LVar0, 4) - EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVar0) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar4, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim01) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim09) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar4, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim01) - EVT_WAIT(8) - EVT_END_IF - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_05) - EVT_CALL(SetBattleCamZoom, 430) - EVT_CALL(SetBattleCamOffsetZ, 20) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_END_IF - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 4, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(SetPartYaw, ACTOR_SELF, PRT_MAIN, 180) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim15) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 24) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim00) - EVT_END_THREAD - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_WAIT(8) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim08) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim03) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim15) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 24) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, LVar4) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_CEILING_DROP, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim00) - EVT_END_THREAD - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_WAIT(8) - EVT_CALL(YieldTurn) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim03) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_LABEL(10) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Ground) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 24) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -9) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(GroundAnims))) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_FLIPABLE, TRUE) + Call(GetIndexFromPos, ACTOR_SELF, LVar0) + Mod(LVar0, 4) + Call(SetGoalToIndex, ACTOR_SELF, LVar0) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar4, LVar2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim01) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim09) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar4, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim01) + Wait(8) + EndIf + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_JUMP, SOUND_FALL_QUICK, 0) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_05) + Call(SetBattleCamZoom, 430) + Call(SetBattleCamOffsetZ, 20) + Call(MoveBattleCamOver, 10) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + EndIf + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 4, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(SetPartYaw, ACTOR_SELF, PRT_MAIN, 180) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim15) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 24) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(ResetAllActorSounds, ACTOR_SELF) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Thread + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim00) + EndThread + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Wait(8) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim08) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim03) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetActorYaw, ACTOR_SELF, 180) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim15) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 24) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, LVar4) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(ResetAllActorSounds, ACTOR_SELF) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_CEILING_DROP, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Thread + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim00) + EndThread + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Wait(8) + Call(YieldTurn) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim08) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim03) + EndCaseGroup + EndSwitch + Label(10) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) - EVT_IF_EQ(LVar0, AVAL_State_Toppled) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) - EVT_SUB(LVar0, 1) - EVT_IF_GT(LVar0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_WAIT(30) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_ELSE - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_WAIT(20) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim05) - EVT_SET_CONST(LVar2, ANIM_SpikeTop_Anim03) - EVT_EXEC_WAIT(EVS_Enemy_FlipBackUp) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Ground) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 24) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -9) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(UprightDefense))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(GroundAnims))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, FALSE) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, TRUE) - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim0B) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim0F) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(10) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_SPIN) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim0A) - EVT_WAIT(20) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_TOSS) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_IF_GT(LVar0, LVar3) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_01) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -150, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(14.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_WAIT(15) - EVT_CALL(YieldTurn) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 200) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim0C) - EVT_WAIT(10) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(14.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_SHELL_TOSS, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim03) - EVT_WAIT(8) - EVT_CALL(YieldTurn) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikeTop_Anim08) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim03) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleState, LVar0) + IfEq(LVar0, AVAL_State_Toppled) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) + Sub(LVar0, 1) + IfGt(LVar0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Wait(30) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Else + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Wait(20) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim05) + SetConst(LVar2, ANIM_SpikeTop_Anim03) + ExecWait(EVS_Enemy_FlipBackUp) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleState, AVAL_State_Ground) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 24) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, -1, -9) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(UprightDefense))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(GroundAnims))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, FALSE) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_SPIKY_TOP, TRUE) + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndIf + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim0B) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim0F) + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(10) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(5) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + EndThread + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_SPIN) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim0A) + Wait(20) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SHELL_TOSS) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Thread + Loop(0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + IfGt(LVar0, LVar3) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(UseBattleCamPreset, BTL_CAM_PRESET_01) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -150, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(14.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Wait(15) + Call(YieldTurn) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 200) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(10.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim0C) + Wait(10) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(14.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_SHELL_TOSS, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim03) + Wait(8) + Call(YieldTurn) + Call(ResetAllActorSounds, ACTOR_SELF) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikeTop_Anim08) + ExecWait(EVS_Enemy_ReturnHome) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikeTop_Anim03) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/spiked_gloomba.inc.c b/src/battle/common/actor/spiked_gloomba.inc.c index caf39336dab..9c168caef3d 100644 --- a/src/battle/common/actor/spiked_gloomba.inc.c +++ b/src/battle/common/actor/spiked_gloomba.inc.c @@ -114,371 +114,371 @@ s32 N(ShuffleAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(10) - EVT_CALL(RandInt, 80, LVar0) - EVT_ADD(LVar0, 80) - EVT_LOOP(LVar0) - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_LOOP(20) - EVT_LABEL(1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_LOOP(80) - EVT_LABEL(2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(10) - EVT_RETURN - EVT_END + Label(10) + Call(RandInt, 80, LVar0) + Add(LVar0, 80) + Loop(LVar0) + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(0) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Loop(20) + Label(1) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(1) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Loop(80) + Label(2) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(2) + EndIf + Wait(1) + EndLoop + Goto(10) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_BurnEyesClosed) - EVT_SET_CONST(LVar2, ANIM_SpikedGoomba_Dark_BurnEyesOpen) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_BurnEyesClosed) - EVT_SET_CONST(LVar2, ANIM_SpikedGoomba_Dark_BurnEyesOpen) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_BurnEyesOpen) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_Electrocute) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Dizzy) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Idle) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_Electrocute) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_STAR_BEAM) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_Run) - EVT_SET_CONST(LVar2, ANIM_SpikedGoomba_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Dark_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIKE_TAUNT) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Laugh) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 10) - EVT_ELSE - EVT_ADD(LVar1, 26) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) - EVT_WAIT(20) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Idle) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Dark_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Dark_BurnEyesClosed) + SetConst(LVar2, ANIM_SpikedGoomba_Dark_BurnEyesOpen) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Dark_BurnEyesClosed) + SetConst(LVar2, ANIM_SpikedGoomba_Dark_BurnEyesOpen) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Dark_BurnEyesOpen) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Dark_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Dark_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Dark_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Dark_Electrocute) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Dark_Hurt) + ExecWait(EVS_Enemy_Knockback) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Dizzy) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Idle) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Dark_Electrocute) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Dark_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_STAR_BEAM) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Dark_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Dark_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Dark_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Dark_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Dark_Run) + SetConst(LVar2, ANIM_SpikedGoomba_Dark_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Dark_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Dark_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseEq(EVENT_SPIKE_TAUNT) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Laugh) + EndIf + Wait(10) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar1, 10) + Else + Add(LVar1, 26) + EndIf + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) + Wait(20) + CaseDefault + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Idle) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/CalculateArcsinDeg.inc.c" EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Run) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Idle) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Midair) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_SET(LVar1, 10) - EVT_ADD(LVar2, 3) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_SET(LVar3, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Sleep) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Hurt) - EVT_WAIT(5) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Midair) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_THREAD - EVT_WAIT(4) - EVT_SET(LVar0, 180) - EVT_LOOP(4) - EVT_SUB(LVar0, 45) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Dizzy) - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Idle) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_SET(LVar3, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Midair) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_END_SWITCH - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SPIKEBONK, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Idle) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(GetLastDamage, ACTOR_PLAYER, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Laugh) - EVT_WAIT(15) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Idle) - EVT_WAIT(3) - EVT_END_IF - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Run) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Idle) + Call(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Midair) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Set(LVar1, 10) + Add(LVar2, 3) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Thread + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) + Set(LVar0, 0) + Loop(16) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Set(LVar3, LVar6) + Wait(1) + EndLoop + EndThread + Thread + Wait(6) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Sleep) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Hurt) + Wait(5) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Midair) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + Thread + Wait(4) + Set(LVar0, 180) + Loop(4) + Sub(LVar0, 45) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Dizzy) + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(SetActorYaw, ACTOR_SELF, 0) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Idle) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + CaseDefault + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Thread + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) + Set(LVar0, 0) + Loop(16) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Set(LVar3, LVar6) + Wait(1) + EndLoop + EndThread + Thread + Wait(6) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Midair) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0)) + Wait(1) + EndSwitch + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SPIKEBONK, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Idle) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(GetLastDamage, ACTOR_PLAYER, LVar0) + IfGt(LVar0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Laugh) + Wait(15) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Idle) + Wait(3) + EndIf + Call(YieldTurn) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dark_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/spiked_goomba.inc.c b/src/battle/common/actor/spiked_goomba.inc.c index feca67d0d94..95fa6152ccd 100644 --- a/src/battle/common/actor/spiked_goomba.inc.c +++ b/src/battle/common/actor/spiked_goomba.inc.c @@ -116,371 +116,371 @@ s32 N(ShuffleAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(10) - EVT_CALL(RandInt, 80, LVar0) - EVT_ADD(LVar0, 80) - EVT_LOOP(LVar0) - EVT_LABEL(0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_LOOP(20) - EVT_LABEL(1) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(SetActorIdleSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ShuffleAnims))) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleRunToGoal, ACTOR_SELF, 0) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(DefaultAnims))) - EVT_LOOP(80) - EVT_LABEL(2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(10) - EVT_RETURN - EVT_END + Label(10) + Call(RandInt, 80, LVar0) + Add(LVar0, 80) + Loop(LVar0) + Label(0) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(0) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Loop(20) + Label(1) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(1) + EndIf + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(SetActorIdleSpeed, ACTOR_SELF, Float(1.0)) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ShuffleAnims))) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleRunToGoal, ACTOR_SELF, 0) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(DefaultAnims))) + Loop(80) + Label(2) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAGS_IMMOBILIZED) + Wait(1) + Goto(2) + EndIf + Wait(1) + EndLoop + Goto(10) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_BurnEyesClosed) - EVT_SET_CONST(LVar2, ANIM_SpikedGoomba_BurnEyesOpen) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_BurnEyesClosed) - EVT_SET_CONST(LVar2, ANIM_SpikedGoomba_BurnEyesOpen) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_BurnEyesOpen) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Electrocute) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dizzy) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Idle) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Electrocute) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_STAR_BEAM) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_HurtStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Run) - EVT_SET_CONST(LVar2, ANIM_SpikedGoomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Run) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpikedGoomba_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIKE_TAUNT) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Laugh) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar3, STATUS_FLAG_SHRINK) - EVT_ADD(LVar1, 10) - EVT_ELSE - EVT_ADD(LVar1, 26) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) - EVT_WAIT(20) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Idle) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_BurnEyesClosed) + SetConst(LVar2, ANIM_SpikedGoomba_BurnEyesOpen) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_BurnEyesClosed) + SetConst(LVar2, ANIM_SpikedGoomba_BurnEyesOpen) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_BurnEyesOpen) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Electrocute) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Hurt) + ExecWait(EVS_Enemy_Knockback) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dizzy) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Idle) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Electrocute) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_STAR_BEAM) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_HurtStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_END_FIRST_STRIKE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Run) + SetConst(LVar2, ANIM_SpikedGoomba_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Run) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpikedGoomba_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseEq(EVENT_SPIKE_TAUNT) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Laugh) + EndIf + Wait(10) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar3, STATUS_FLAG_SHRINK) + Add(LVar1, 10) + Else + Add(LVar1, 26) + EndIf + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) + Wait(20) + CaseDefault + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Idle) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/CalculateArcsinDeg.inc.c" EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Run) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Idle) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Midair) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_SET(LVar1, 10) - EVT_ADD(LVar2, 3) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_SET(LVar3, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Sleep) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Hurt) - EVT_WAIT(5) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Midair) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_THREAD - EVT_WAIT(4) - EVT_SET(LVar0, 180) - EVT_LOOP(4) - EVT_SUB(LVar0, 45) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dizzy) - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Idle) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_SET(LVar3, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Midair) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Midair) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_END_SWITCH - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SPIKEBONK, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Idle) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(GetLastDamage, ACTOR_PLAYER, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Laugh) - EVT_WAIT(15) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Idle) - EVT_WAIT(3) - EVT_END_IF - EVT_CALL(YieldTurn) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Run) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Run) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Idle) + Call(SetActorDispOffset, ACTOR_SELF, 0, -1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Midair) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Set(LVar1, 10) + Add(LVar2, 3) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Thread + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) + Set(LVar0, 0) + Loop(16) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Set(LVar3, LVar6) + Wait(1) + EndLoop + EndThread + Thread + Wait(6) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Sleep) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Hurt) + Wait(5) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(5) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Midair) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + Thread + Wait(4) + Set(LVar0, 180) + Loop(4) + Sub(LVar0, 45) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Dizzy) + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + Call(SetActorYaw, ACTOR_SELF, 0) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Idle) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + CaseDefault + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Thread + Call(GetActorPos, ACTOR_SELF, LVar1, LVar2, LVar0) + Set(LVar0, 0) + Loop(16) + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(N(CalculateArcsinDeg), LVar1, LVar2, LVar4, LVar5, LVar0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Set(LVar3, LVar6) + Wait(1) + EndLoop + EndThread + Thread + Wait(6) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Midair) + EndThread + Call(JumpToGoal, ACTOR_SELF, 16, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Midair) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.5), Float(1.0)) + Wait(1) + EndSwitch + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SPIKEBONK, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Idle) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(GetLastDamage, ACTOR_PLAYER, LVar0) + IfGt(LVar0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Laugh) + Wait(15) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Idle) + Wait(3) + EndIf + Call(YieldTurn) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(2.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpikedGoomba_Run) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/spiny.inc.c b/src/battle/common/actor/spiny.inc.c index 1c90e3306e1..81cf5f9952f 100644 --- a/src/battle/common/actor/spiny.inc.c +++ b/src/battle/common/actor/spiny.inc.c @@ -143,368 +143,368 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Toppled, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 0) - EVT_RETURN - EVT_END + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_Toppled, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 0) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BALL, ANIM_Lakitu_Anim0C) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BALL, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BALL, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Spiny_Anim1A) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Spiny_Anim01) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, PRT_BALL, ANIM_Lakitu_Anim0C) + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BALL, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(SetGoalToHome, ACTOR_SELF) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BALL, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Spiny_Anim1A) + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Spiny_Anim01) + Return + End }; EvtScript N(EVS_CheckToppleAnim) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar3) - EVT_IF_EQ(LVar3, 1) - EVT_SET(LVar1, LVar2) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar3) + IfEq(LVar3, 1) + Set(LVar1, LVar2) + EndIf + Return + End }; s32 N(FlipPosOffsets)[] = { 7, 13, 17, 21, 23, 24, 23, 21, 17, 13, 7, 0, 4, 7, 6, 4, 0, 2, 0 }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Spiny_Anim09) - EVT_SET_CONST(LVar2, ANIM_Spiny_Anim0A) - EVT_EXEC_WAIT(N(EVS_CheckToppleAnim)) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) - EVT_IF_NE(LVar0, 1) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Spiny_Anim0B) - EVT_SET_CONST(LVar2, ANIM_Spiny_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Spiny_Anim0D) - EVT_SET_CONST(LVar2, ANIM_Spiny_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_END_IF - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) - EVT_IF_NE(LVar0, 1) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Spiny_Anim0B) - EVT_SET_CONST(LVar2, ANIM_Spiny_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Spiny_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Spiny_Anim0D) - EVT_SET_CONST(LVar2, ANIM_Spiny_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Spiny_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_END_IF - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Spiny_Anim09) - EVT_SET_CONST(LVar2, ANIM_Spiny_Anim0A) - EVT_EXEC_WAIT(N(EVS_CheckToppleAnim)) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Spiny_Anim09) - EVT_SET_CONST(LVar2, ANIM_Spiny_Anim0A) - EVT_EXEC_WAIT(N(EVS_CheckToppleAnim)) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Spiny_Anim09) - EVT_SET_CONST(LVar2, ANIM_Spiny_Anim0A) - EVT_EXEC_WAIT(N(EVS_CheckToppleAnim)) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_FLIP_TRIGGER) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Spiny_Anim0A) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Spiny_Anim16) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Toppled, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 1) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledDefense))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(ToppledAnims))) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ALT_SPIKY, FALSE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) - EVT_USE_BUF(N(FlipPosOffsets)) - EVT_LOOP(19) - EVT_BUF_READ1(LVar0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(20) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Spiny_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Spiny_Anim07) - EVT_WAIT(10) - EVT_CASE_EQ(1) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Spiny_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_SWITCH - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIKE_TAUNT) - EVT_WAIT(10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar3) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVarA) - EVT_IF_EQ(LVarA, 0) - EVT_ADD(LVar0, 0) - EVT_END_IF - EVT_ADD(LVar1, 8) - EVT_ELSE - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVarA) - EVT_IF_EQ(LVarA, 0) - EVT_ADD(LVar0, -1) - EVT_END_IF - EVT_ADD(LVar1, 22) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) - EVT_WAIT(20) - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Spiny_Anim09) - EVT_SET_CONST(LVar2, ANIM_Spiny_Anim0A) - EVT_EXEC_WAIT(N(EVS_CheckToppleAnim)) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Spiny_Anim09) - EVT_SET_CONST(LVar2, ANIM_Spiny_Anim0A) - EVT_EXEC_WAIT(N(EVS_CheckToppleAnim)) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Spiny_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(1) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Spiny_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_SWITCH - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Spiny_Anim04) - EVT_SET_CONST(LVar2, ANIM_Spiny_Anim09) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(1) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Spiny_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_SWITCH - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Spiny_Anim04) - EVT_CASE_EQ(1) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Spiny_Anim02) - EVT_END_SWITCH - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Spiny_Anim04) - EVT_CASE_EQ(1) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Spiny_Anim02) - EVT_END_SWITCH - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Spiny_Anim09) + SetConst(LVar2, ANIM_Spiny_Anim0A) + ExecWait(N(EVS_CheckToppleAnim)) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + Call(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) + IfNe(LVar0, 1) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Spiny_Anim0B) + SetConst(LVar2, ANIM_Spiny_Anim0C) + ExecWait(EVS_Enemy_BurnHit) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Spiny_Anim0D) + SetConst(LVar2, ANIM_Spiny_Anim0E) + ExecWait(EVS_Enemy_BurnHit) + EndIf + CaseEq(EVENT_BURN_DEATH) + Call(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) + IfNe(LVar0, 1) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Spiny_Anim0B) + SetConst(LVar2, ANIM_Spiny_Anim0C) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Spiny_Anim0C) + ExecWait(EVS_Enemy_Death) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Spiny_Anim0D) + SetConst(LVar2, ANIM_Spiny_Anim0E) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Spiny_Anim0E) + ExecWait(EVS_Enemy_Death) + EndIf + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Spiny_Anim09) + SetConst(LVar2, ANIM_Spiny_Anim0A) + ExecWait(N(EVS_CheckToppleAnim)) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Spiny_Anim09) + SetConst(LVar2, ANIM_Spiny_Anim0A) + ExecWait(N(EVS_CheckToppleAnim)) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Spiny_Anim09) + SetConst(LVar2, ANIM_Spiny_Anim0A) + ExecWait(N(EVS_CheckToppleAnim)) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_FLIP_TRIGGER) + Call(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) + IfEq(LVar0, 1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Spiny_Anim0A) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Spiny_Anim16) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_Toppled, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, 1) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledDefense))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(ToppledAnims))) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ALT_SPIKY, FALSE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, TRUE) + UseBuf(N(FlipPosOffsets)) + Loop(19) + BufRead1(LVar0) + Call(SetActorDispOffset, ACTOR_SELF, 0, LVar0, 0) + Wait(1) + EndLoop + Wait(20) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + Call(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) + Switch(LVar0) + CaseEq(0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Spiny_Anim06) + ExecWait(EVS_Enemy_NoDamageHit) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Spiny_Anim07) + Wait(10) + CaseEq(1) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Spiny_Anim02) + ExecWait(EVS_Enemy_NoDamageHit) + EndSwitch + EndCaseGroup + CaseEq(EVENT_SPIKE_TAUNT) + Wait(10) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar3) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVarA) + IfEq(LVarA, 0) + Add(LVar0, 0) + EndIf + Add(LVar1, 8) + Else + Call(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVarA) + IfEq(LVarA, 0) + Add(LVar0, -1) + EndIf + Add(LVar1, 22) + EndIf + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 20, 0) + Wait(20) + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Spiny_Anim09) + SetConst(LVar2, ANIM_Spiny_Anim0A) + ExecWait(N(EVS_CheckToppleAnim)) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Spiny_Anim09) + SetConst(LVar2, ANIM_Spiny_Anim0A) + ExecWait(N(EVS_CheckToppleAnim)) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + Call(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) + Switch(LVar0) + CaseEq(0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Spiny_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(1) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Spiny_Anim02) + ExecWait(EVS_Enemy_NoDamageHit) + EndSwitch + CaseEq(EVENT_SCARE_AWAY) + Call(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) + Switch(LVar0) + CaseEq(0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Spiny_Anim04) + SetConst(LVar2, ANIM_Spiny_Anim09) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(1) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Spiny_Anim02) + ExecWait(EVS_Enemy_NoDamageHit) + EndSwitch + CaseEq(EVENT_BEGIN_AIR_LIFT) + Call(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) + Switch(LVar0) + CaseEq(0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Spiny_Anim04) + CaseEq(1) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Spiny_Anim02) + EndSwitch + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + Call(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) + Switch(LVar0) + CaseEq(0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Spiny_Anim04) + CaseEq(1) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Spiny_Anim02) + EndSwitch + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) - EVT_SUB(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Spiny_Anim14) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_WAIT(30) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Spiny_Anim14) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_WAIT(20) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Spiny_Anim02) - EVT_SET_CONST(LVar2, ANIM_Spiny_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_FlipBackUp) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Toppled, 0) - EVT_CALL(SetDefenseTable, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(UprightDefense))) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(UprightAnims))) - EVT_CALL(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ALT_SPIKY, TRUE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, FALSE) - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Spiny_Anim19) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Spiny_Anim18) - EVT_WAIT(10) - EVT_ELSE - EVT_WAIT(20) - EVT_END_IF - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(10) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_WAIT(5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) - EVT_END_THREAD - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BALL, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BALL, ANIM_Lakitu_Anim0C) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtPart, ACTOR_SELF, PRT_BALL, SOUND_SPINY_SPIN_UP) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_BALL, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 4, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_IF_GT(LVar0, LVar3) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_01) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -200, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(16.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(16.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_ROLL, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_BALL, ANIM_Lakitu_Anim0B) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_ADD(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) + IfEq(LVar0, 1) + Call(GetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) + Sub(LVar0, 1) + Call(SetActorVar, ACTOR_SELF, AVAR_ToppleTurns, LVar0) + IfGt(LVar0, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Spiny_Anim14) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Wait(30) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Spiny_Anim14) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Wait(20) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Spiny_Anim02) + SetConst(LVar2, ANIM_Spiny_Anim01) + ExecWait(EVS_Enemy_FlipBackUp) + Call(SetActorVar, ACTOR_SELF, AVAR_Toppled, 0) + Call(SetDefenseTable, ACTOR_SELF, PRT_MAIN, Ref(N(UprightDefense))) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(UprightAnims))) + Call(SetPartEventBits, ACTOR_SELF, PRT_MAIN, ACTOR_EVENT_FLAG_ALT_SPIKY, TRUE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLIPPED, FALSE) + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndIf + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetActorVar, ACTOR_SELF, AVAR_Toppled, LVar0) + IfEq(LVar0, 0) + Wait(10) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Spiny_Anim19) + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Spiny_Anim18) + Wait(10) + Else + Wait(20) + EndIf + Thread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(10) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + Wait(5) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 32, 4, 0, 10, 0) + EndThread + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BALL, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_BALL, ANIM_Lakitu_Anim0C) + Wait(10) + Call(PlaySoundAtPart, ACTOR_SELF, PRT_BALL, SOUND_SPINY_SPIN_UP) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(SetPartSounds, ACTOR_SELF, PRT_BALL, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(EnemyTestTarget, ACTOR_SELF, LVarA, 0, 0, 4, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVarA) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Thread + Loop(0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + IfGt(LVar0, LVar3) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(UseBattleCamPreset, BTL_CAM_PRESET_01) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -200, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(16.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + ExecWait(N(EVS_ReturnHome)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Return + EndCaseGroup + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(16.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(ResetAllActorSounds, ACTOR_SELF) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, SUPPRESS_EVENT_ALL, 0, DMG_ROLL, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetAnimation, ACTOR_SELF, PRT_BALL, ANIM_Lakitu_Anim0B) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 20, FALSE, TRUE, FALSE) + Add(LVar0, 10) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Add(LVar0, 10) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Call(YieldTurn) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_DISABLE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/spy_guy.inc.c b/src/battle/common/actor/spy_guy.inc.c index d4413c8177e..5d765375912 100644 --- a/src/battle/common/actor/spy_guy.inc.c +++ b/src/battle/common/actor/spy_guy.inc.c @@ -147,288 +147,288 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Weapon, AVAL_Weapon_Mallet) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldSwitchWeapon, FALSE) - EVT_CALL(GetInstigatorValue, ACTOR_SELF, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Weapon, AVAL_Weapon_Slingshot) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(SlingshotAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim02) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_Weapon, AVAL_Weapon_Mallet) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldSwitchWeapon, FALSE) + Call(GetInstigatorValue, ACTOR_SELF, LVar0) + IfNe(LVar0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Weapon, AVAL_Weapon_Slingshot) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(SlingshotAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim02) + EndIf + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_TrySwitchWeapon) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ShouldSwitchWeapon, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldSwitchWeapon, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldSwitchWeapon, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Weapon, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Weapon_Slingshot) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim02) - EVT_CASE_EQ(AVAL_Weapon_Mallet) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim03) - EVT_END_SWITCH - EVT_LABEL(0) - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS1_EXECUTING_MOVE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Weapon, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Weapon_Slingshot) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Weapon, AVAL_Weapon_Mallet) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(MalletAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim17) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim19) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim03) - EVT_CASE_EQ(AVAL_Weapon_Mallet) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Weapon, AVAL_Weapon_Slingshot) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(SlingshotAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim18) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim1A) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim02) - EVT_END_SWITCH - EVT_WAIT(10) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldSwitchWeapon, FALSE) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_ShouldSwitchWeapon, LVar0) + IfEq(LVar0, 0) + Return + EndIf + Call(GetLastDamage, ACTOR_SELF, LVar0) + IfEq(LVar0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldSwitchWeapon, FALSE) + Return + EndIf + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldSwitchWeapon, FALSE) + Return + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Weapon, LVar0) + Switch(LVar0) + CaseEq(AVAL_Weapon_Slingshot) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim02) + CaseEq(AVAL_Weapon_Mallet) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim03) + EndSwitch + Label(0) + Call(GetBattleFlags, LVar0) + IfFlag(LVar0, BS_FLAGS1_EXECUTING_MOVE) + Wait(1) + Goto(0) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Weapon, LVar0) + Switch(LVar0) + CaseEq(AVAL_Weapon_Slingshot) + Call(SetActorVar, ACTOR_SELF, AVAR_Weapon, AVAL_Weapon_Mallet) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(MalletAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim17) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.4)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim19) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim03) + CaseEq(AVAL_Weapon_Mallet) + Call(SetActorVar, ACTOR_SELF, AVAR_Weapon, AVAL_Weapon_Slingshot) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(SlingshotAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim18) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.4)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim1A) + Wait(5) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim02) + EndSwitch + Wait(10) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldSwitchWeapon, FALSE) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpyGuy_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldSwitchWeapon, TRUE) - EVT_CASE_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpyGuy_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldSwitchWeapon, TRUE) - EVT_EXEC_WAIT(N(EVS_TrySwitchWeapon)) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpyGuy_Anim0D) - EVT_SET_CONST(LVar2, ANIM_SpyGuy_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldSwitchWeapon, TRUE) - EVT_EXEC_WAIT(N(EVS_TrySwitchWeapon)) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpyGuy_Anim0D) - EVT_SET_CONST(LVar2, ANIM_SpyGuy_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpyGuy_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpyGuy_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldSwitchWeapon, TRUE) - EVT_EXEC_WAIT(N(EVS_TrySwitchWeapon)) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpyGuy_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpyGuy_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_ZERO_DAMAGE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Weapon, LVar1) - EVT_IF_EQ(LVar1, AVAL_Weapon_Slingshot) - EVT_SET_CONST(LVar1, ANIM_SpyGuy_Anim02) - EVT_ELSE - EVT_SET_CONST(LVar1, ANIM_SpyGuy_Anim03) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Weapon, LVar1) - EVT_IF_EQ(LVar1, AVAL_Weapon_Slingshot) - EVT_SET_CONST(LVar1, ANIM_SpyGuy_Anim02) - EVT_ELSE - EVT_SET_CONST(LVar1, ANIM_SpyGuy_Anim03) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_EXEC_WAIT(N(EVS_TrySwitchWeapon)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpyGuy_Anim0B) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpyGuy_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Weapon, LVar1) - EVT_IF_EQ(LVar1, AVAL_Weapon_Slingshot) - EVT_SET_CONST(LVar1, ANIM_SpyGuy_Anim02) - EVT_ELSE - EVT_SET_CONST(LVar1, ANIM_SpyGuy_Anim03) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Weapon, LVar1) - EVT_IF_EQ(LVar1, AVAL_Weapon_Slingshot) - EVT_SET_CONST(LVar1, ANIM_SpyGuy_Anim06) - EVT_ELSE - EVT_SET_CONST(LVar1, ANIM_SpyGuy_Anim07) - EVT_END_IF - EVT_SET_CONST(LVar2, ANIM_SpyGuy_Anim11) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Weapon, LVar1) - EVT_IF_EQ(LVar1, AVAL_Weapon_Slingshot) - EVT_SET_CONST(LVar1, ANIM_SpyGuy_Anim06) - EVT_ELSE - EVT_SET_CONST(LVar1, ANIM_SpyGuy_Anim07) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Weapon, LVar1) - EVT_IF_EQ(LVar1, AVAL_Weapon_Slingshot) - EVT_SET_CONST(LVar1, ANIM_SpyGuy_Anim06) - EVT_ELSE - EVT_SET_CONST(LVar1, ANIM_SpyGuy_Anim07) - EVT_END_IF - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpyGuy_Anim0B) + ExecWait(EVS_Enemy_Hit) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldSwitchWeapon, TRUE) + CaseEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpyGuy_Anim0B) + ExecWait(EVS_Enemy_Hit) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldSwitchWeapon, TRUE) + ExecWait(N(EVS_TrySwitchWeapon)) + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpyGuy_Anim0D) + SetConst(LVar2, ANIM_SpyGuy_Anim0E) + ExecWait(EVS_Enemy_BurnHit) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldSwitchWeapon, TRUE) + ExecWait(N(EVS_TrySwitchWeapon)) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpyGuy_Anim0D) + SetConst(LVar2, ANIM_SpyGuy_Anim0E) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpyGuy_Anim0E) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpyGuy_Anim0B) + ExecWait(EVS_Enemy_SpinSmashHit) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldSwitchWeapon, TRUE) + ExecWait(N(EVS_TrySwitchWeapon)) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpyGuy_Anim0B) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpyGuy_Anim0C) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_ZERO_DAMAGE) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Weapon, LVar1) + IfEq(LVar1, AVAL_Weapon_Slingshot) + SetConst(LVar1, ANIM_SpyGuy_Anim02) + Else + SetConst(LVar1, ANIM_SpyGuy_Anim03) + EndIf + ExecWait(EVS_Enemy_NoDamageHit) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Weapon, LVar1) + IfEq(LVar1, AVAL_Weapon_Slingshot) + SetConst(LVar1, ANIM_SpyGuy_Anim02) + Else + SetConst(LVar1, ANIM_SpyGuy_Anim03) + EndIf + ExecWait(EVS_Enemy_NoDamageHit) + ExecWait(N(EVS_TrySwitchWeapon)) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpyGuy_Anim0B) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpyGuy_Anim0C) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Weapon, LVar1) + IfEq(LVar1, AVAL_Weapon_Slingshot) + SetConst(LVar1, ANIM_SpyGuy_Anim02) + Else + SetConst(LVar1, ANIM_SpyGuy_Anim03) + EndIf + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Weapon, LVar1) + IfEq(LVar1, AVAL_Weapon_Slingshot) + SetConst(LVar1, ANIM_SpyGuy_Anim06) + Else + SetConst(LVar1, ANIM_SpyGuy_Anim07) + EndIf + SetConst(LVar2, ANIM_SpyGuy_Anim11) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Weapon, LVar1) + IfEq(LVar1, AVAL_Weapon_Slingshot) + SetConst(LVar1, ANIM_SpyGuy_Anim06) + Else + SetConst(LVar1, ANIM_SpyGuy_Anim07) + EndIf + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + Call(GetActorVar, ACTOR_SELF, AVAR_Weapon, LVar1) + IfEq(LVar1, AVAL_Weapon_Slingshot) + SetConst(LVar1, ANIM_SpyGuy_Anim06) + Else + SetConst(LVar1, ANIM_SpyGuy_Anim07) + EndIf + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_Slingshot) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 1) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SLINGSHOT_DRAW) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim15) - EVT_WAIT(12) - EVT_WAIT(12) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim16) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_ADD(LVar1, 10) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_STONE, LVar0, LVar1, LVar2) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STONE, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_STONE, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SLINGSHOT_FIRE) - EVT_CALL(SetPartSounds, ACTOR_SELF, PRT_STONE, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_STONE, LVar3, LVar4, LVar5) - EVT_IF_GT(LVar0, LVar3) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -100, 0, 0) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_STONE, EVT_FLOAT(14.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_STONE, EVT_FLOAT(0.002)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_STONE, LVar0, LVar1, LVar2, 0, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STONE, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(YieldTurn) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_WAIT(15) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartMoveSpeed, ACTOR_SELF, PRT_STONE, EVT_FLOAT(14.0)) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_STONE, EVT_FLOAT(0.002)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_STONE, LVar0, LVar1, LVar2, 0, TRUE) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SHOOT, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(GetPartOffset, ACTOR_SELF, PRT_STONE, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 100) - EVT_CALL(SetPartJumpGravity, ACTOR_SELF, PRT_STONE, EVT_FLOAT(0.7)) - EVT_CALL(JumpPartTo, ACTOR_SELF, PRT_STONE, LVar0, 0, LVar2, 30, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_STONE, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(YieldTurn) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 1) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SLINGSHOT_DRAW) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim15) + Wait(12) + Wait(12) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim16) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 10) + Add(LVar1, 10) + Call(SetPartPos, ACTOR_SELF, PRT_STONE, LVar0, LVar1, LVar2) + Call(SetPartFlagBits, ACTOR_SELF, PRT_STONE, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartScale, ACTOR_SELF, PRT_STONE, Float(0.4), Float(0.4), Float(0.4)) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SLINGSHOT_FIRE) + Call(SetPartSounds, ACTOR_SELF, PRT_STONE, ACTOR_SOUND_JUMP, SOUND_NONE, SOUND_NONE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Thread + Loop(0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(GetPartOffset, ACTOR_SELF, PRT_STONE, LVar3, LVar4, LVar5) + IfGt(LVar0, LVar3) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + EndThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -100, 0, 0) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_STONE, Float(14.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_STONE, Float(0.002)) + Call(JumpPartTo, ACTOR_SELF, PRT_STONE, LVar0, LVar1, LVar2, 0, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_STONE, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(YieldTurn) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Wait(15) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartMoveSpeed, ACTOR_SELF, PRT_STONE, Float(14.0)) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_STONE, Float(0.002)) + Call(JumpPartTo, ACTOR_SELF, PRT_STONE, LVar0, LVar1, LVar2, 0, TRUE) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_SHOOT, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(GetPartOffset, ACTOR_SELF, PRT_STONE, LVar0, LVar1, LVar2) + Sub(LVar0, 100) + Call(SetPartJumpGravity, ACTOR_SELF, PRT_STONE, Float(0.7)) + Call(JumpPartTo, ACTOR_SELF, PRT_STONE, LVar0, 0, LVar2, 30, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_STONE, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(YieldTurn) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/ItemEntityJumpToPos.inc.c" @@ -442,201 +442,201 @@ EvtScript N(EVS_Attack_Slingshot) = { #include "common/StartRumbleWithParams.inc.c" EvtScript N(EVS_ManageItemMotion) = { - EVT_LABEL(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ItemState, LVarA) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(AVAL_Item_None) + Label(0) + Call(GetActorVar, ACTOR_SELF, AVAR_ItemState, LVarA) + Switch(LVarA) + CaseEq(AVAL_Item_None) // do nothing - EVT_CASE_EQ(AVAL_Item_Fumble) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar1, LVar2, LVar3) - EVT_SET(LVar2, 0) - EVT_SUB(LVar3, 1) - EVT_CALL(N(DisableRandomAbility), LVar4, LVar5) - EVT_CALL(MakeItemEntity, LVar4, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Knockoff_ItemIdx, LVar0) - EVT_ADD(LVar1, 30) - EVT_CALL(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 20, EVT_FLOAT(1.0)) - EVT_ADD(LVar1, 20) - EVT_CALL(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 10, EVT_FLOAT(1.0)) - EVT_ADD(LVar1, 10) - EVT_CALL(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 5, EVT_FLOAT(1.0)) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ItemState, AVAR_ItemState) - EVT_CASE_EQ(AVAL_Item_KnockAway) - EVT_CALL(ShowMessageBox, LVar5, 60) - EVT_SUB(LVar1, 150) - EVT_CALL(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 30, EVT_FLOAT(1.0)) - EVT_CALL(RemoveItemEntity, LVar0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ItemState, AVAL_Item_Gone) - EVT_RETURN - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + CaseEq(AVAL_Item_Fumble) + Call(GetActorPos, ACTOR_PLAYER, LVar1, LVar2, LVar3) + Set(LVar2, 0) + Sub(LVar3, 1) + Call(N(DisableRandomAbility), LVar4, LVar5) + Call(MakeItemEntity, LVar4, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_DECORATION, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Knockoff_ItemIdx, LVar0) + Add(LVar1, 30) + Call(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 20, Float(1.0)) + Add(LVar1, 20) + Call(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 10, Float(1.0)) + Add(LVar1, 10) + Call(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 5, Float(1.0)) + Call(SetActorVar, ACTOR_SELF, AVAR_ItemState, AVAR_ItemState) + CaseEq(AVAL_Item_KnockAway) + Call(ShowMessageBox, LVar5, 60) + Sub(LVar1, 150) + Call(N(ItemEntityJumpToPos), LVar0, LVar1, LVar2, LVar3, 30, Float(1.0)) + Call(RemoveItemEntity, LVar0) + Call(SetActorVar, ACTOR_SELF, AVAR_ItemState, AVAL_Item_Gone) + Return + EndSwitch + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_Attack_Mallet) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim07) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 70, 0, 0) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) - EVT_CALL(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim07) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_NOT_FLAG(LVar1, STATUS_FLAG_SHRINK) - EVT_CALL(AddGoalPos, ACTOR_SELF, 20, 0, 0) - EVT_END_IF - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim03) - EVT_WAIT(10) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_THREAD - EVT_WAIT(4) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MALLET_SWING) - EVT_END_THREAD - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim0A) - EVT_WAIT(6) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpyGuy_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim0A) - EVT_WAIT(5) - EVT_WAIT(2) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_MALLET, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_ATK_BLOCKED) - EVT_CALL(N(CheckPlayerCanLoseCommand), LVar0) - EVT_IF_NE(LVar0, -1) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_CALL(GetLastDamage, ACTOR_PLAYER, LVar0) - EVT_IF_LE(LVar0, 0) - EVT_WAIT(20) - EVT_GOTO(100) - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAG_SHRINK) - EVT_WAIT(20) - EVT_GOTO(100) - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar1) - EVT_IF_FLAG(LVar1, STATUS_FLAG_STONE | STATUS_FLAG_RIGHT_ON) - EVT_WAIT(20) - EVT_GOTO(100) - EVT_END_IF - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ItemState, AVAL_Item_Fumble) - EVT_EXEC(N(EVS_ManageItemMotion)) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim07) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 70) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim03) - EVT_LABEL(0) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ItemState, LVar0) - EVT_IF_NE(LVar0, AVAL_Item_None) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim07) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Knockoff_ItemIdx, LVar0) - EVT_CALL(N(GetItemEntityPosition), LVar0, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, 20) - EVT_SUB(LVar3, 2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_COMMAND_LOSS) - EVT_CALL(N(StartRumbleWithParams), 200, 10) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim09) - EVT_WAIT(5) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ItemState, AVAL_Item_KnockAway) - EVT_SUB(LVar1, 7) - EVT_PLAY_EFFECT(EFFECT_FIREWORK, 0, LVar1, LVar2, LVar3, EVT_FLOAT(1.0), 0, 0) - EVT_WAIT(40) - EVT_ELSE - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim07) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 70) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim03) - EVT_WAIT(10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_PLAY_EFFECT(EFFECT_EMOTE, EMOTE_QUESTION, 0, LVar0, LVar1, LVar2, 25, -45, 20, 0, 0) - EVT_WAIT(20) - EVT_END_IF - EVT_LABEL(100) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_SpyGuy_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim07) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 70, 0, 0) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK, SOUND_ACTOR_STEP_A, SOUND_ACTOR_STEP_B) + Call(SetActorSounds, ACTOR_SELF, ACTOR_SOUND_WALK_INCREMENT, 10, 0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim07) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfNotFlag(LVar1, STATUS_FLAG_SHRINK) + Call(AddGoalPos, ACTOR_SELF, 20, 0, 0) + EndIf + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim03) + Wait(10) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Thread + Wait(4) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MALLET_SWING) + EndThread + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim0A) + Wait(6) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpyGuy_Anim07) + ExecWait(EVS_Enemy_ReturnHome) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim0A) + Wait(5) + Wait(2) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_MALLET, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Set(LFlag0, FALSE) + Call(GetBattleFlags, LVar0) + IfNotFlag(LVar0, BS_FLAGS1_ATK_BLOCKED) + Call(N(CheckPlayerCanLoseCommand), LVar0) + IfNe(LVar0, -1) + Set(LFlag0, TRUE) + EndIf + EndIf + Call(GetLastDamage, ACTOR_PLAYER, LVar0) + IfLe(LVar0, 0) + Wait(20) + Goto(100) + EndIf + Call(GetStatusFlags, ACTOR_SELF, LVar1) + IfFlag(LVar1, STATUS_FLAG_SHRINK) + Wait(20) + Goto(100) + EndIf + Call(GetStatusFlags, ACTOR_PLAYER, LVar1) + IfFlag(LVar1, STATUS_FLAG_STONE | STATUS_FLAG_RIGHT_ON) + Wait(20) + Goto(100) + EndIf + IfEq(LFlag0, TRUE) + Call(SetActorVar, ACTOR_SELF, AVAR_ItemState, AVAL_Item_Fumble) + Exec(N(EVS_ManageItemMotion)) + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim07) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 70) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim03) + Label(0) + Call(GetActorVar, ACTOR_SELF, AVAR_ItemState, LVar0) + IfNe(LVar0, AVAL_Item_None) + Wait(1) + Goto(0) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim07) + Call(GetActorVar, ACTOR_SELF, AVAR_Knockoff_ItemIdx, LVar0) + Call(N(GetItemEntityPosition), LVar0, LVar1, LVar2, LVar3) + Add(LVar1, 20) + Sub(LVar3, 2) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetGoalPos, ACTOR_SELF, LVar1, LVar2, LVar3) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Thread + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_COMMAND_LOSS) + Call(N(StartRumbleWithParams), 200, 10) + EndThread + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim09) + Wait(5) + Call(SetActorVar, ACTOR_SELF, AVAR_ItemState, AVAL_Item_KnockAway) + Sub(LVar1, 7) + PlayEffect(EFFECT_FIREWORK, 0, LVar1, LVar2, LVar3, Float(1.0), 0, 0) + Wait(40) + Else + Wait(8) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim07) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 70) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim03) + Wait(10) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 10) + PlayEffect(EFFECT_EMOTE, EMOTE_QUESTION, 0, LVar0, LVar1, LVar2, 25, -45, 20, 0, 0) + Wait(20) + EndIf + Label(100) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_SpyGuy_Anim07) + ExecWait(EVS_Enemy_ReturnHome) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Weapon, AVAL_Weapon_Slingshot) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(SlingshotAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim02) - EVT_END_IF - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Weapon, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(AVAL_Weapon_Slingshot) - EVT_EXEC_WAIT(N(EVS_Attack_Slingshot)) - EVT_CASE_EQ(AVAL_Weapon_Mallet) - EVT_EXEC_WAIT(N(EVS_Attack_Mallet)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetActorVar, ACTOR_SELF, AVAR_Weapon, AVAL_Weapon_Slingshot) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(SlingshotAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_SpyGuy_Anim02) + EndIf + Call(GetActorVar, ACTOR_SELF, AVAR_Weapon, LVar0) + Switch(LVar0) + CaseEq(AVAL_Weapon_Slingshot) + ExecWait(N(EVS_Attack_Slingshot)) + CaseEq(AVAL_Weapon_Mallet) + ExecWait(N(EVS_Attack_Mallet)) + EndSwitch + Return + End }; diff --git a/src/battle/common/actor/stone_chomp.inc.c b/src/battle/common/actor/stone_chomp.inc.c index da3ef98758a..c0cefc0d703 100644 --- a/src/battle/common/actor/stone_chomp.inc.c +++ b/src/battle/common/actor/stone_chomp.inc.c @@ -266,14 +266,14 @@ ActorBlueprint NAMESPACE = { // (in) LVar0: part idx // (in) LVar1: hopping animID EvtScript N(EVS_Chomp_HopHome) = { - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_EXEC_WAIT(N(EVS_Chomp_HopToPos)) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + ExecWait(N(EVS_Chomp_HopToPos)) + Return + End }; // Custom version of EVS_Enemy_HopToPos @@ -281,489 +281,489 @@ EvtScript N(EVS_Chomp_HopHome) = { // (in) LVar1: target posY // (in) LVar2: target posZ EvtScript N(EVS_Chomp_HopToPos) = { - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_LABEL(0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_IF_EQ(LVar3, LVar0) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_LT(LVar3, LVar0) - EVT_SET(LVar4, LVar0) - EVT_SUB(LVar4, LVar3) - EVT_IF_LT(LVar4, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) - EVT_ELSE - EVT_SET(LVar4, LVar3) - EVT_ADD(LVar3, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar3, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) - EVT_END_IF - EVT_ELSE - EVT_SET(LVar4, LVar3) - EVT_SUB(LVar4, LVar0) - EVT_IF_LT(LVar4, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) - EVT_ELSE - EVT_SUB(LVar3, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar3, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) - EVT_END_IF - EVT_END_IF - EVT_GOTO(0) - EVT_LABEL(10) - EVT_RETURN - EVT_END + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Label(0) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + IfEq(LVar3, LVar0) + Goto(10) + EndIf + IfLt(LVar3, LVar0) + Set(LVar4, LVar0) + Sub(LVar4, LVar3) + IfLt(LVar4, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) + Else + Set(LVar4, LVar3) + Add(LVar3, 30) + Call(SetGoalPos, ACTOR_SELF, LVar3, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) + EndIf + Else + Set(LVar4, LVar3) + Sub(LVar4, LVar0) + IfLt(LVar4, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) + Else + Sub(LVar3, 30) + Call(SetGoalPos, ACTOR_SELF, LVar3, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) + EndIf + EndIf + Goto(0) + Label(10) + Return + End }; EvtScript N(EVS_Init) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_EnableChainSounds, FALSE) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_TARGET, LVar0, LVar1, LVar2) - EVT_SET(LVar0, PRT_CHAIN_1) - EVT_LOOP(1 + (PRT_CHAIN_8 - PRT_CHAIN_1)) - EVT_CALL(SetPartSize, ACTOR_SELF, LVar0, 16, 16) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_CALL(N(ChompChainInit)) - EVT_EXEC(N(EVS_UpdateChain)) - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_EnableChainSounds, FALSE) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_TARGET, LVar0, LVar1, LVar2) + Set(LVar0, PRT_CHAIN_1) + Loop(1 + (PRT_CHAIN_8 - PRT_CHAIN_1)) + Call(SetPartSize, ACTOR_SELF, LVar0, 16, 16) + Add(LVar0, 1) + EndLoop + Call(N(ChompChainInit)) + Exec(N(EVS_UpdateChain)) + Return + End }; EvtScript N(EVS_UpdateTargetPartPos) = { - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_TARGET, LVar0, LVar1, LVar2) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_TARGET, 0, 24) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_TARGET, 0, 0) - EVT_ELSE - EVT_CALL(SetIdleGoalToHome, ACTOR_SELF) - EVT_CALL(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_TARGET, LVar0, LVar1, LVar2) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_TARGET, -13, 40) - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_TARGET, 0, -14) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_TARGET, LVar0, LVar1, LVar2) + Call(SetTargetOffset, ACTOR_SELF, PRT_TARGET, 0, 24) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_TARGET, 0, 0) + Else + Call(SetIdleGoalToHome, ACTOR_SELF) + Call(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_TARGET, LVar0, LVar1, LVar2) + Call(SetTargetOffset, ACTOR_SELF, PRT_TARGET, -13, 40) + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_TARGET, 0, -14) + EndIf + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_LOOP(0) - EVT_EXEC_WAIT(N(EVS_UpdateTargetPartPos)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(SlowBiteAnims))) - EVT_CALL(SetActorIdleJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleGoalToHome, ACTOR_SELF) - EVT_CALL(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_CALL(SetActorIdleJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleJumpToGoal, ACTOR_SELF, 11, 1) - EVT_LOOP(0) - EVT_EXEC_WAIT(N(EVS_UpdateTargetPartPos)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorIdleJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetIdleGoalToHome, ACTOR_SELF) - EVT_CALL(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleJumpToGoal, ACTOR_SELF, 6, 1) - EVT_CALL(RandInt, 10, LVar0) - EVT_ADD(LVar0, 1) - EVT_WAIT(LVar0) - EVT_LOOP(0) - EVT_EXEC_WAIT(N(EVS_UpdateTargetPartPos)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(BiteAnims))) - EVT_CALL(SetActorIdleJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetIdleGoalToHome, ACTOR_SELF) - EVT_CALL(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleJumpToGoal, ACTOR_SELF, 15, 1) - EVT_LOOP(0) - EVT_EXEC_WAIT(N(EVS_UpdateTargetPartPos)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(SlowBiteAnims))) - EVT_CALL(SetActorIdleJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetIdleGoalToHome, ACTOR_SELF) - EVT_CALL(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleJumpToGoal, ACTOR_SELF, 12, 1) - EVT_LOOP(0) - EVT_EXEC_WAIT(N(EVS_UpdateTargetPartPos)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorIdleJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetIdleGoalToHome, ACTOR_SELF) - EVT_CALL(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleJumpToGoal, ACTOR_SELF, 9, 1) - EVT_LOOP(0) - EVT_EXEC_WAIT(N(EVS_UpdateTargetPartPos)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(QuickBiteAnims))) - EVT_CALL(SetActorIdleJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetIdleGoalToHome, ACTOR_SELF) - EVT_CALL(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IdleJumpToGoal, ACTOR_SELF, 6, 1) - EVT_CALL(RandInt, 10, LVar0) - EVT_ADD(LVar0, 10) - EVT_WAIT(LVar0) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Loop(0) + ExecWait(N(EVS_UpdateTargetPartPos)) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(SlowBiteAnims))) + Call(SetActorIdleJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetIdleGoalToHome, ACTOR_SELF) + Call(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 10) + Call(SetActorIdleJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleJumpToGoal, ACTOR_SELF, 11, 1) + Loop(0) + ExecWait(N(EVS_UpdateTargetPartPos)) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetActorIdleJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetIdleGoalToHome, ACTOR_SELF) + Call(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleJumpToGoal, ACTOR_SELF, 6, 1) + Call(RandInt, 10, LVar0) + Add(LVar0, 1) + Wait(LVar0) + Loop(0) + ExecWait(N(EVS_UpdateTargetPartPos)) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(BiteAnims))) + Call(SetActorIdleJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetIdleGoalToHome, ACTOR_SELF) + Call(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleJumpToGoal, ACTOR_SELF, 15, 1) + Loop(0) + ExecWait(N(EVS_UpdateTargetPartPos)) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(SlowBiteAnims))) + Call(SetActorIdleJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetIdleGoalToHome, ACTOR_SELF) + Call(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleJumpToGoal, ACTOR_SELF, 12, 1) + Loop(0) + ExecWait(N(EVS_UpdateTargetPartPos)) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetActorIdleJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetIdleGoalToHome, ACTOR_SELF) + Call(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleJumpToGoal, ACTOR_SELF, 9, 1) + Loop(0) + ExecWait(N(EVS_UpdateTargetPartPos)) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(QuickBiteAnims))) + Call(SetActorIdleJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetIdleGoalToHome, ACTOR_SELF) + Call(GetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetIdleGoal, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(IdleJumpToGoal, ACTOR_SELF, 6, 1) + Call(RandInt, 10, LVar0) + Add(LVar0, 10) + Wait(LVar0) + Goto(0) + Return + End }; EvtScript N(EVS_UpdateChain) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(N(ChompChainUpdate)) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Call(N(ChompChainUpdate)) + Goto(0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_StoneChomp_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_CHAIN_1, ANIM_StoneChomp_BurnChain) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_CHAIN_2, ANIM_StoneChomp_BurnChain) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_CHAIN_3, ANIM_StoneChomp_BurnChain) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_CHAIN_4, ANIM_StoneChomp_BurnChain) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_CHAIN_5, ANIM_StoneChomp_BurnChain) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_CHAIN_6, ANIM_StoneChomp_BurnChain) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_CHAIN_7, ANIM_StoneChomp_BurnChain) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_CHAIN_8, ANIM_StoneChomp_BurnChain) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_StoneChomp_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_StoneChomp_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_CHAIN_1, ANIM_StoneChomp_BurnChain) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_CHAIN_2, ANIM_StoneChomp_BurnChain) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_CHAIN_3, ANIM_StoneChomp_BurnChain) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_CHAIN_4, ANIM_StoneChomp_BurnChain) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_CHAIN_5, ANIM_StoneChomp_BurnChain) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_CHAIN_6, ANIM_StoneChomp_BurnChain) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_CHAIN_7, ANIM_StoneChomp_BurnChain) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_CHAIN_8, ANIM_StoneChomp_BurnChain) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_StoneChomp_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_StoneChomp_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_StoneChomp_BurnStill) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_StoneChomp_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_StoneChomp_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_StoneChomp_Hurt) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4)) - EVT_CALL(AddGoalPos, ACTOR_SELF, 30, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) - EVT_CALL(AddGoalPos, ACTOR_SELF, 15, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) - EVT_CALL(AddGoalPos, ACTOR_SELF, 5, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_StoneChomp_SlowBite) - EVT_EXEC_WAIT(N(EVS_Chomp_HopHome)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_END_THREAD - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_TARGET, LVar0, LVar1, LVar2) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_EnableChainSounds, FALSE) - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_StoneChomp_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_StoneChomp_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_EnableChainSounds, FALSE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_StoneChomp_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_StoneChomp_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_StoneChomp_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_StoneChomp_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_StoneChomp_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_StoneChomp_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_StoneChomp_Idle) - EVT_SET_CONST(LVar2, ANIM_StoneChomp_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_SUB(LVar1, 10) - EVT_ADD(LVar2, 4) - EVT_ELSE - EVT_SUB(LVar1, 5) - EVT_ADD(LVar2, 11) - EVT_END_IF - EVT_CALL(SetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_StoneChomp_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_StoneChomp_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_StoneChomp_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_CASE_EQ(EVENT_UP_AND_AWAY) - EVT_WAIT(1000) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_IF_NE(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(FallToGoal, ACTOR_SELF, 11) - EVT_END_IF - EVT_END_IF - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_StoneChomp_Hurt) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + Call(SetAnimation, ACTOR_SELF, PRT_CHAIN_1, ANIM_StoneChomp_BurnChain) + Call(SetAnimation, ACTOR_SELF, PRT_CHAIN_2, ANIM_StoneChomp_BurnChain) + Call(SetAnimation, ACTOR_SELF, PRT_CHAIN_3, ANIM_StoneChomp_BurnChain) + Call(SetAnimation, ACTOR_SELF, PRT_CHAIN_4, ANIM_StoneChomp_BurnChain) + Call(SetAnimation, ACTOR_SELF, PRT_CHAIN_5, ANIM_StoneChomp_BurnChain) + Call(SetAnimation, ACTOR_SELF, PRT_CHAIN_6, ANIM_StoneChomp_BurnChain) + Call(SetAnimation, ACTOR_SELF, PRT_CHAIN_7, ANIM_StoneChomp_BurnChain) + Call(SetAnimation, ACTOR_SELF, PRT_CHAIN_8, ANIM_StoneChomp_BurnChain) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_StoneChomp_BurnHurt) + SetConst(LVar2, ANIM_StoneChomp_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + Call(SetAnimation, ACTOR_SELF, PRT_CHAIN_1, ANIM_StoneChomp_BurnChain) + Call(SetAnimation, ACTOR_SELF, PRT_CHAIN_2, ANIM_StoneChomp_BurnChain) + Call(SetAnimation, ACTOR_SELF, PRT_CHAIN_3, ANIM_StoneChomp_BurnChain) + Call(SetAnimation, ACTOR_SELF, PRT_CHAIN_4, ANIM_StoneChomp_BurnChain) + Call(SetAnimation, ACTOR_SELF, PRT_CHAIN_5, ANIM_StoneChomp_BurnChain) + Call(SetAnimation, ACTOR_SELF, PRT_CHAIN_6, ANIM_StoneChomp_BurnChain) + Call(SetAnimation, ACTOR_SELF, PRT_CHAIN_7, ANIM_StoneChomp_BurnChain) + Call(SetAnimation, ACTOR_SELF, PRT_CHAIN_8, ANIM_StoneChomp_BurnChain) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_StoneChomp_BurnHurt) + SetConst(LVar2, ANIM_StoneChomp_BurnStill) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_StoneChomp_BurnStill) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_StoneChomp_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_StoneChomp_Hurt) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_StoneChomp_Hurt) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.4)) + Call(AddGoalPos, ACTOR_SELF, 30, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) + Call(AddGoalPos, ACTOR_SELF, 15, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) + Call(AddGoalPos, ACTOR_SELF, 5, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_StoneChomp_SlowBite) + ExecWait(N(EVS_Chomp_HopHome)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.6)) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + EndThread + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_TARGET, LVar0, LVar1, LVar2) + Call(SetActorVar, ACTOR_SELF, AVAR_EnableChainSounds, FALSE) + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_StoneChomp_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_StoneChomp_Hurt) + ExecWait(EVS_Enemy_ShockHit) + Call(SetActorVar, ACTOR_SELF, AVAR_EnableChainSounds, FALSE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_StoneChomp_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_StoneChomp_Hurt) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_StoneChomp_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_StoneChomp_Hurt) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_StoneChomp_Hurt) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_StoneChomp_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_StoneChomp_Idle) + SetConst(LVar2, ANIM_StoneChomp_Hurt) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar1, LVar2, LVar3) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Sub(LVar1, 10) + Add(LVar2, 4) + Else + Sub(LVar1, 5) + Add(LVar2, 11) + EndIf + Call(SetActorPos, ACTOR_SELF, LVar1, LVar2, LVar3) + EndIf + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_StoneChomp_Hurt) + ExecWait(EVS_Enemy_AirLift) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_StoneChomp_Hurt) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_StoneChomp_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + CaseEq(EVENT_UP_AND_AWAY) + Wait(1000) + CaseDefault + EndSwitch + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SLEEP | STATUS_FLAG_PARALYZE | STATUS_FLAG_DIZZY | STATUS_FLAG_STONE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + IfNe(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(FallToGoal, ACTOR_SELF, 11) + EndIf + EndIf + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_EnableChainSounds, TRUE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_ADD(LVar0, 45) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_StoneChomp_SlowBite) - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HURT) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_StoneChomp_Idle) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 25) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) - EVT_SUB(LVar0, 15) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_StoneChomp_Bite) - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_StoneChomp_Bite) - EVT_EXEC_WAIT(N(EVS_Chomp_HopToPos)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_StoneChomp_Idle) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_EnableChainSounds, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_StoneChomp_Idle) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, 4) - EVT_ELSE - EVT_ADD(LVar0, 10) - EVT_END_IF - EVT_SET(LVar1, 27) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.2)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_TARGET, LVar0, LVar1, LVar2) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_CHOMP_BITE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_StoneChomp_Bite) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) - EVT_SUB(LVar0, 10) - EVT_CALL(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_StoneChomp_Idle) - EVT_WAIT(8) - EVT_CALL(YieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_StoneChomp_Bite) - EVT_EXEC_WAIT(N(EVS_Chomp_HopToPos)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_StoneChomp_Idle) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_TARGET, LVar0, LVar1, LVar2) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_EnableChainSounds, FALSE) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(SetActorVar, ACTOR_SELF, AVAR_EnableChainSounds, TRUE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Add(LVar0, 45) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_StoneChomp_SlowBite) + Wait(15) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_HURT) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_StoneChomp_Idle) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 25) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) + Sub(LVar0, 15) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_StoneChomp_Bite) + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_StoneChomp_Bite) + ExecWait(N(EVS_Chomp_HopToPos)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_StoneChomp_Idle) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(HPBarToHome, ACTOR_SELF) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_EnableChainSounds, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Return + EndCaseGroup + EndSwitch + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_StoneChomp_Idle) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Add(LVar0, 4) + Else + Add(LVar0, 10) + EndIf + Set(LVar1, 27) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.2)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_TARGET, LVar0, LVar1, LVar2) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_CHOMP_BITE, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_StoneChomp_Bite) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) + Sub(LVar0, 10) + Call(JumpToGoal, ACTOR_SELF, 4, FALSE, TRUE, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, STONE_STONE_CHOMP_STEP) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_StoneChomp_Idle) + Wait(8) + Call(YieldTurn) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_StoneChomp_Bite) + ExecWait(N(EVS_Chomp_HopToPos)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_StoneChomp_Idle) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetPartPos, ACTOR_SELF, PRT_TARGET, LVar0, LVar1, LVar2) + Call(SetActorYaw, ACTOR_SELF, 0) + EndCaseGroup + EndSwitch + Call(SetActorVar, ACTOR_SELF, AVAR_EnableChainSounds, FALSE) + Call(HPBarToHome, ACTOR_SELF) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_RESTART) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/swooper.inc.c b/src/battle/common/actor/swooper.inc.c index b493da4ff07..da1c518eeee 100644 --- a/src/battle/common/actor/swooper.inc.c +++ b/src/battle/common/actor/swooper.inc.c @@ -118,493 +118,493 @@ s32 N(FlyingAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsFlying, 0) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_IsFlying, 0) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlying, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim02) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 0, -24, 0) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, TRUE) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(CeilingAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim0C) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 24) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim02) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlying, LVar0) + Switch(LVar0) + CaseEq(0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim02) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 0, -24, 0) + Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, TRUE) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(CeilingAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim0C) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 24) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim02) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) + EndSwitch + Return + End }; EvtScript N(EVS_Flying_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim17) - EVT_SET_CONST(LVar2, ANIM_Swooper_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim17) - EVT_SET_CONST(LVar2, ANIM_Swooper_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_CALL(func_80269470) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_CALL(func_80269470) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_END_THREAD - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim02) - EVT_SET_CONST(LVar2, ANIM_Swooper_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim15) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim17) + SetConst(LVar2, ANIM_Swooper_Anim18) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim17) + SetConst(LVar2, ANIM_Swooper_Anim18) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim18) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + Call(func_80269470) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim15) + ExecWait(EVS_Enemy_ShockHit) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + Call(func_80269470) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim15) + ExecWait(EVS_Enemy_ShockHit) + Thread + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + EndThread + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim15) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim02) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim15) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim15) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim02) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim02) + SetConst(LVar2, ANIM_Swooper_Anim15) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim02) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim15) + ExecWait(EVS_Enemy_BlowAway) + Return + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/battle/SetAbsoluteStatusOffsets.inc.c" EvtScript N(EVS_FallFromCeiling) = { - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar0) - EVT_IF_LE(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim02) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 24) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IN_SnapToIndexPos, LVarA) - EVT_IF_EQ(LVarA, -1) - EVT_CALL(SetHomePos, ACTOR_SELF, LVar0, 45, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) - EVT_ELSE - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 45, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) - EVT_CALL(GetIndexFromPos, ACTOR_SELF, LVarA) - EVT_MOD(LVarA, 4) - EVT_ADD(LVarA, 4) - EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVarA) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(SetHomePos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) - EVT_END_IF - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -10) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 22) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(FlyingAnims))) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, TRUE) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsFlying, 1) - EVT_RETURN - EVT_END + Call(HideHealthBar, ACTOR_SELF) + Call(GetLastDamage, ACTOR_SELF, LVar0) + IfLe(LVar0, 0) + Return + EndIf + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim02) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 24) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorVar, ACTOR_SELF, AVAR_IN_SnapToIndexPos, LVarA) + IfEq(LVarA, -1) + Call(SetHomePos, ACTOR_SELF, LVar0, 45, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalToHome, ACTOR_SELF) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) + Else + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, 45, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) + Call(GetIndexFromPos, ACTOR_SELF, LVarA) + Mod(LVarA, 4) + Add(LVarA, 4) + Call(SetGoalToIndex, ACTOR_SELF, LVarA) + Call(GetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(SetHomePos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalToHome, ACTOR_SELF) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) + EndIf + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -10) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 22) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(FlyingAnims))) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, TRUE) + Call(HPBarToHome, ACTOR_SELF) + Call(SetActorVar, ACTOR_SELF, AVAR_IsFlying, 1) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlying, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_Flying_HandleEvent)) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_IF - EVT_CASE_EQ(EVENT_HIT) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_FallFromCeiling)) - EVT_END_IF - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim17) - EVT_SET_CONST(LVar2, ANIM_Swooper_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim11) - EVT_SET_CONST(LVar2, ANIM_Swooper_Anim12) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_FallFromCeiling)) - EVT_END_IF - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim17) - EVT_SET_CONST(LVar2, ANIM_Swooper_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim11) - EVT_SET_CONST(LVar2, ANIM_Swooper_Anim12) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim12) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_END_IF - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_CALL(func_80269470) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit_Impl) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_CALL(func_80269470) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit_Impl) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_END_THREAD - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_END_IF - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(FlyingAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim02) - EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0) - EVT_CALL(HPBarToCurrent, ACTOR_SELF) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, TRUE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -24, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Anim02) - EVT_SET_CONST(LVar2, ANIM_Swooper_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlying, LVar0) + IfEq(LVar0, 1) + ExecWait(N(EVS_Flying_HandleEvent)) + Return + EndIf + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim15) + ExecWait(EVS_Enemy_Hit) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim0E) + ExecWait(EVS_Enemy_Hit) + EndIf + CaseEq(EVENT_HIT) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim15) + ExecWait(EVS_Enemy_Hit) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim0E) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_FallFromCeiling)) + EndIf + CaseEq(EVENT_BURN_HIT) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim17) + SetConst(LVar2, ANIM_Swooper_Anim18) + ExecWait(EVS_Enemy_BurnHit) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim11) + SetConst(LVar2, ANIM_Swooper_Anim12) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_FallFromCeiling)) + EndIf + CaseEq(EVENT_BURN_DEATH) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim17) + SetConst(LVar2, ANIM_Swooper_Anim18) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim18) + ExecWait(EVS_Enemy_Death) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim11) + SetConst(LVar2, ANIM_Swooper_Anim12) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim12) + ExecWait(EVS_Enemy_Death) + EndIf + Return + CaseEq(EVENT_SHOCK_HIT) + Call(func_80269470) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim15) + ExecWait(EVS_Enemy_ShockHit_Impl) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + Call(func_80269470) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim15) + ExecWait(EVS_Enemy_ShockHit_Impl) + Thread + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + EndThread + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim15) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim0C) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim15) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim15) + ExecWait(EVS_Enemy_Death) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim0E) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim0E) + ExecWait(EVS_Enemy_Death) + EndIf + Return + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(FlyingAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim02) + Call(SetActorPos, ACTOR_SELF, 20, 0, 0) + Call(HPBarToCurrent, ACTOR_SELF) + CaseEq(EVENT_END_FIRST_STRIKE) + ExecWait(N(EVS_ReturnHome)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + CaseEq(EVENT_SCARE_AWAY) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, TRUE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) + Call(SetActorDispOffset, ACTOR_SELF, 0, -24, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Anim02) + SetConst(LVar2, ANIM_Swooper_Anim15) + ExecWait(EVS_Enemy_ScareAway) + Return + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Flying_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim02) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim02) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, EASING_LINEAR) - EVT_END_IF - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_WAIT(10) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim06) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 50) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim06) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(10.0)) - EVT_WAIT(15) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(YieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_EQ(HIT_RESULT_HIT_STATIC) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_STATIC) - EVT_SET(LFlag0, FALSE) - EVT_ELSE - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_SWITCH - EVT_WAIT(10) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim06) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim06) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SWOOP, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim02) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim02) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Else + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim02) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(FlyToGoal, ACTOR_SELF, 0, -4, EASING_LINEAR) + EndIf + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Wait(10) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim06) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 50) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim06) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(10.0)) + Wait(15) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(YieldTurn) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + ExecWait(N(EVS_ReturnHome)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + CaseEq(HIT_RESULT_HIT_STATIC) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_STATIC) + Set(LFlag0, FALSE) + Else + Set(LFlag0, TRUE) + EndIf + EndSwitch + Wait(10) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim06) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim06) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SWOOP, BS_FLAGS1_TRIGGER_EVENTS) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim02) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) + Wait(10) + Call(YieldTurn) + ExecWait(N(EVS_ReturnHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlying, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_Flying_TakeTurn)) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim02) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 24) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_WAIT(10) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim06) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(AddGoalPos, ACTOR_SELF, -50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim06) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -40, EASING_LINEAR) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(10.0)) - EVT_WAIT(15) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(YieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_EQ(HIT_RESULT_HIT_STATIC) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_STATIC) - EVT_SET(LFlag0, FALSE) - EVT_ELSE - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_SWITCH - EVT_WAIT(10) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim06) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim06) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -40, EASING_LINEAR) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SWOOP, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim02) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlying, LVar0) + IfEq(LVar0, 1) + ExecWait(N(EVS_Flying_TakeTurn)) + Return + EndIf + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim02) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 24) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Wait(10) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim06) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(AddGoalPos, ACTOR_SELF, -50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim06) + Call(FlyToGoal, ACTOR_SELF, 0, -40, EASING_LINEAR) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(10.0)) + Wait(15) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(YieldTurn) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + ExecWait(N(EVS_ReturnHome)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + CaseEq(HIT_RESULT_HIT_STATIC) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_STATIC) + Set(LFlag0, FALSE) + Else + Set(LFlag0, TRUE) + EndIf + EndSwitch + Wait(10) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim06) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim06) + Call(FlyToGoal, ACTOR_SELF, 0, -40, EASING_LINEAR) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, 0, 0, 0, DMG_SWOOP, BS_FLAGS1_TRIGGER_EVENTS) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Anim02) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) + Wait(10) + Call(YieldTurn) + ExecWait(N(EVS_ReturnHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/swoopula.inc.c b/src/battle/common/actor/swoopula.inc.c index a47a18346db..947a006b356 100644 --- a/src/battle/common/actor/swoopula.inc.c +++ b/src/battle/common/actor/swoopula.inc.c @@ -122,1085 +122,1085 @@ s32 N(FlyingAnims)[] = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsFlying, 0) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_IsFlying, 0) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlying, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim02) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 0, -24, 0) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, TRUE) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(CeilingAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim0C) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 24) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim02) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlying, LVar0) + Switch(LVar0) + CaseEq(0) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim02) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 0, -24, 0) + Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, TRUE) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(CeilingAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim0C) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 24) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim02) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetGoalToHome, ACTOR_SELF) + Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_SIN_OUT) + EndSwitch + Return + End }; EvtScript N(EVS_Flying_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim17) - EVT_SET_CONST(LVar2, ANIM_Swooper_Gray_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim17) - EVT_SET_CONST(LVar2, ANIM_Swooper_Gray_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_CALL(func_80269470) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_CALL(func_80269470) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_END_THREAD - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim02) - EVT_SET_CONST(LVar2, ANIM_Swooper_Gray_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim15) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim17) + SetConst(LVar2, ANIM_Swooper_Gray_Anim18) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim17) + SetConst(LVar2, ANIM_Swooper_Gray_Anim18) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim18) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + Call(func_80269470) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim15) + ExecWait(EVS_Enemy_ShockHit) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + Call(func_80269470) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim15) + ExecWait(EVS_Enemy_ShockHit) + Thread + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + EndThread + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim15) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim02) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim15) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim15) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim02) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim02) + SetConst(LVar2, ANIM_Swooper_Gray_Anim15) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim02) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim15) + ExecWait(EVS_Enemy_BlowAway) + Return + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/battle/SetAbsoluteStatusOffsets.inc.c" EvtScript N(EVS_FallFromCeiling) = { - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(GetLastDamage, ACTOR_SELF, LVar0) - EVT_IF_LE(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim02) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 24) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IN_SnapToIndexPos, LVarA) - EVT_IF_EQ(LVarA, -1) - EVT_CALL(SetHomePos, ACTOR_SELF, LVar0, 45, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) - EVT_ELSE - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 45, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) - EVT_CALL(GetIndexFromPos, ACTOR_SELF, LVarA) - EVT_MOD(LVarA, 4) - EVT_ADD(LVarA, 4) - EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVarA) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(SetHomePos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) - EVT_END_IF - EVT_CALL(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -10) - EVT_CALL(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 22) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(FlyingAnims))) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, TRUE) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_IsFlying, 1) - EVT_RETURN - EVT_END + Call(HideHealthBar, ACTOR_SELF) + Call(GetLastDamage, ACTOR_SELF, LVar0) + IfLe(LVar0, 0) + Return + EndIf + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim02) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 24) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorVar, ACTOR_SELF, AVAR_IN_SnapToIndexPos, LVarA) + IfEq(LVarA, -1) + Call(SetHomePos, ACTOR_SELF, LVar0, 45, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalToHome, ACTOR_SELF) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) + Else + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, 45, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) + Call(GetIndexFromPos, ACTOR_SELF, LVarA) + Mod(LVarA, 4) + Add(LVarA, 4) + Call(SetGoalToIndex, ACTOR_SELF, LVarA) + Call(GetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(SetHomePos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalToHome, ACTOR_SELF) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) + EndIf + Call(SetProjectileTargetOffset, ACTOR_SELF, PRT_MAIN, 0, -10) + Call(SetTargetOffset, ACTOR_SELF, PRT_MAIN, 0, 22) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 20) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(FlyingAnims))) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, TRUE) + Call(HPBarToHome, ACTOR_SELF) + Call(SetActorVar, ACTOR_SELF, AVAR_IsFlying, 1) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlying, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_Flying_HandleEvent)) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_IF - EVT_CASE_EQ(EVENT_HIT) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_FallFromCeiling)) - EVT_END_IF - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim17) - EVT_SET_CONST(LVar2, ANIM_Swooper_Gray_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim11) - EVT_SET_CONST(LVar2, ANIM_Swooper_Gray_Anim12) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_FallFromCeiling)) - EVT_END_IF - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim17) - EVT_SET_CONST(LVar2, ANIM_Swooper_Gray_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim18) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim11) - EVT_SET_CONST(LVar2, ANIM_Swooper_Gray_Anim12) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim12) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_END_IF - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_CALL(func_80269470) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit_Impl) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_CALL(func_80269470) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit_Impl) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_END_THREAD - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim0C) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim0E) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_END_IF - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) - EVT_CALL(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, EVT_PTR(N(FlyingAnims))) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim02) - EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0) - EVT_CALL(HPBarToCurrent, ACTOR_SELF) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, TRUE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -24, 0) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Swooper_Gray_Anim02) - EVT_SET_CONST(LVar2, ANIM_Swooper_Gray_Anim15) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlying, LVar0) + IfEq(LVar0, 1) + ExecWait(N(EVS_Flying_HandleEvent)) + Return + EndIf + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim15) + ExecWait(EVS_Enemy_Hit) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim0E) + ExecWait(EVS_Enemy_Hit) + EndIf + CaseEq(EVENT_HIT) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim15) + ExecWait(EVS_Enemy_Hit) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim0E) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_FallFromCeiling)) + EndIf + CaseEq(EVENT_BURN_HIT) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim17) + SetConst(LVar2, ANIM_Swooper_Gray_Anim18) + ExecWait(EVS_Enemy_BurnHit) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim11) + SetConst(LVar2, ANIM_Swooper_Gray_Anim12) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_FallFromCeiling)) + EndIf + CaseEq(EVENT_BURN_DEATH) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim17) + SetConst(LVar2, ANIM_Swooper_Gray_Anim18) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim18) + ExecWait(EVS_Enemy_Death) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim11) + SetConst(LVar2, ANIM_Swooper_Gray_Anim12) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim12) + ExecWait(EVS_Enemy_Death) + EndIf + Return + CaseEq(EVENT_SHOCK_HIT) + Call(func_80269470) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim15) + ExecWait(EVS_Enemy_ShockHit_Impl) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ExecWait(N(EVS_ReturnHome)) + CaseEq(EVENT_SHOCK_DEATH) + Call(func_80269470) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim15) + ExecWait(EVS_Enemy_ShockHit_Impl) + Thread + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + EndThread + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim15) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim0C) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim15) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim15) + ExecWait(EVS_Enemy_Death) + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim0E) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim0E) + ExecWait(EVS_Enemy_Death) + EndIf + Return + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) + Call(SetIdleAnimations, ACTOR_SELF, PRT_MAIN, Ref(N(FlyingAnims))) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim02) + Call(SetActorPos, ACTOR_SELF, 20, 0, 0) + Call(HPBarToCurrent, ACTOR_SELF) + CaseEq(EVENT_END_FIRST_STRIKE) + ExecWait(N(EVS_ReturnHome)) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + CaseEq(EVENT_SCARE_AWAY) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, TRUE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) + Call(SetActorDispOffset, ACTOR_SELF, 0, -24, 0) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Swooper_Gray_Anim02) + SetConst(LVar2, ANIM_Swooper_Gray_Anim15) + ExecWait(EVS_Enemy_ScareAway) + Return + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/SpawnEnemyDrainFX.inc.c" EvtScript N(EVS_Flying_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim02) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim02) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -4, EASING_LINEAR) - EVT_END_IF - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_WAIT(10) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim06) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 50) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim06) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(10.0)) - EVT_WAIT(15) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(YieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_EQ(HIT_RESULT_HIT_STATIC) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_STATIC) - EVT_SET(LFlag0, FALSE) - EVT_ELSE - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_SWITCH - EVT_WAIT(10) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim06) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -4, -8, -15) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim06) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_STONE) - EVT_WAIT(10) - EVT_LOOP(2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim02) - EVT_WAIT(21) - EVT_LOOP(2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.9), EVT_FLOAT(1.2), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.8), EVT_FLOAT(1.3), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.4), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.4), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.8), EVT_FLOAT(1.3), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.9), EVT_FLOAT(1.2), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(5) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.9), EVT_FLOAT(1.2), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.8), EVT_FLOAT(1.3), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.4), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.5), EVT_FLOAT(1.0)) - EVT_WAIT(2) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.6), EVT_FLOAT(1.6), EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, DMG_LEECH, BS_FLAGS1_NICE_HIT) - EVT_WAIT(30) - EVT_END_LOOP - EVT_ELSE - EVT_CALL(ShowMessageBox, BTL_MSG_ACTION_TIP_MASH_BUTTON, 32767) - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_STOP_LEECH) - EVT_CALL(action_command_stop_leech_init) - EVT_CALL(SetupMashMeter, 1, 30, 0, 0, 0, 0) - EVT_WAIT(10) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_CALL(action_command_stop_leech_start, 0, 32767, 3) - EVT_SET(LVarD, 0) - EVT_LOOP(MAX_LEECH_COUNT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim02) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(21) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Leeching) - EVT_LOOP(2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(1) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.9), EVT_FLOAT(1.2), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(1) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.8), EVT_FLOAT(1.3), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(1) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.4), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(1) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.5), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(1) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.4), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(1) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.8), EVT_FLOAT(1.3), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(1) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.9), EVT_FLOAT(1.2), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(1) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(1) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_SET(LFlag0, FALSE) - EVT_LOOP(5) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(1) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.9), EVT_FLOAT(1.2), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(1) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.8), EVT_FLOAT(1.3), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(1) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.4), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(1) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.5), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(2) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.6), EVT_FLOAT(1.6), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(10) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(2) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_UNBLOCKABLE | DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 2, BS_FLAGS1_NICE_HIT) - EVT_CALL(GetLastDamage, ACTOR_PLAYER, LVar3) - EVT_IF_NE(LVar3, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_CALL(N(SpawnDrainHealthStartFX), LVar0, LVar1, LVar2, LVar3) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_STAR_BOUNCE_A) - EVT_CALL(N(SpawnDrainHealthContinueFX), LVar0, LVar1, LVar2, LVar3) - EVT_END_THREAD - EVT_ADD(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_RECOVER, 0, LVar0, LVar1, LVar2, LVar3, 0) - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_ADD(LVar0, LVar3) - EVT_CALL(SetEnemyHP, ACTOR_SELF, LVar0) - EVT_ELSE - EVT_ADD(LVarD, 1) - EVT_IF_GT(LVarD, 1) - EVT_CALL(func_80269470) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_CALL(GetPlayerHP, LVar1) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(func_80269470) - EVT_BREAK_LOOP - EVT_END_IF - EVT_SET(LFlag0, FALSE) - EVT_LOOP(30) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(func_80269470) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim02) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim02) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Else + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim02) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(FlyToGoal, ACTOR_SELF, 0, -4, EASING_LINEAR) + EndIf + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Wait(10) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim06) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 50) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim06) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(10.0)) + Wait(15) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(YieldTurn) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + ExecWait(N(EVS_ReturnHome)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + CaseEq(HIT_RESULT_HIT_STATIC) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_STATIC) + Set(LFlag0, FALSE) + Else + Set(LFlag0, TRUE) + EndIf + EndSwitch + Wait(10) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim06) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -4, -8, -15) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim06) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) + IfEq(LFlag0, TRUE) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 0, BS_FLAGS1_TRIGGER_EVENTS) + Return + EndIf + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfFlag(LVar0, STATUS_FLAG_STONE) + Wait(10) + Loop(2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim02) + Wait(21) + Loop(2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.9), Float(1.2), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.8), Float(1.3), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.4), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.5), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.4), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.8), Float(1.3), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.9), Float(1.2), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + EndLoop + Wait(5) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.9), Float(1.2), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.8), Float(1.3), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.4), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.5), Float(1.0)) + Wait(2) + Call(SetActorScale, ACTOR_SELF, Float(0.6), Float(1.6), Float(1.0)) + Wait(10) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, DMG_LEECH, BS_FLAGS1_NICE_HIT) + Wait(30) + EndLoop + Else + Call(ShowMessageBox, BTL_MSG_ACTION_TIP_MASH_BUTTON, 32767) + Call(ShowActionHud, TRUE) + Call(LoadActionCommand, ACTION_COMMAND_STOP_LEECH) + Call(action_command_stop_leech_init) + Call(SetupMashMeter, 1, 30, 0, 0, 0, 0) + Wait(10) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + Call(action_command_stop_leech_start, 0, 32767, 3) + Set(LVarD, 0) + Loop(MAX_LEECH_COUNT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim02) + Set(LFlag0, FALSE) + Loop(21) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Leeching) + Loop(2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Set(LFlag0, FALSE) + Loop(1) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(0.9), Float(1.2), Float(1.0)) + Set(LFlag0, FALSE) + Loop(1) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(0.8), Float(1.3), Float(1.0)) + Set(LFlag0, FALSE) + Loop(1) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.4), Float(1.0)) + Set(LFlag0, FALSE) + Loop(1) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.5), Float(1.0)) + Set(LFlag0, FALSE) + Loop(1) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.4), Float(1.0)) + Set(LFlag0, FALSE) + Loop(1) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(0.8), Float(1.3), Float(1.0)) + Set(LFlag0, FALSE) + Loop(1) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(0.9), Float(1.2), Float(1.0)) + Set(LFlag0, FALSE) + Loop(1) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Set(LFlag0, FALSE) + Loop(1) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + EndLoop + IfEq(LFlag0, TRUE) + BreakLoop + EndIf + Set(LFlag0, FALSE) + Loop(5) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Set(LFlag0, FALSE) + Loop(1) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(0.9), Float(1.2), Float(1.0)) + Set(LFlag0, FALSE) + Loop(1) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(0.8), Float(1.3), Float(1.0)) + Set(LFlag0, FALSE) + Loop(1) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.4), Float(1.0)) + Set(LFlag0, FALSE) + Loop(1) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.5), Float(1.0)) + Set(LFlag0, FALSE) + Loop(2) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(0.6), Float(1.6), Float(1.0)) + Set(LFlag0, FALSE) + Loop(10) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Set(LFlag0, FALSE) + Loop(2) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_UNBLOCKABLE | DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 2, BS_FLAGS1_NICE_HIT) + Call(GetLastDamage, ACTOR_PLAYER, LVar3) + IfNe(LVar3, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 15) + Call(N(SpawnDrainHealthStartFX), LVar0, LVar1, LVar2, LVar3) + Thread + Wait(15) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_STAR_BOUNCE_A) + Call(N(SpawnDrainHealthContinueFX), LVar0, LVar1, LVar2, LVar3) + EndThread + Add(LVar0, 20) + Add(LVar1, 20) + PlayEffect(EFFECT_RECOVER, 0, LVar0, LVar1, LVar2, LVar3, 0) + Call(GetActorHP, ACTOR_SELF, LVar0) + Add(LVar0, LVar3) + Call(SetEnemyHP, ACTOR_SELF, LVar0) + Else + Add(LVarD, 1) + IfGt(LVarD, 1) + Call(func_80269470) + BreakLoop + EndIf + EndIf + Call(GetPlayerHP, LVar1) + IfEq(LVar1, 0) + Call(func_80269470) + BreakLoop + EndIf + Set(LFlag0, FALSE) + Loop(30) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + BreakLoop + EndIf + EndLoop + Call(func_80269470) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim02) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) + Wait(10) + Call(YieldTurn) + ExecWait(N(EVS_ReturnHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_IsFlying, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_Flying_TakeTurn)) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim02) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 24) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_WAIT(10) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim06) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(AddGoalPos, ACTOR_SELF, -50, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim06) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -40, EASING_LINEAR) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(10.0)) - EVT_WAIT(15) - EVT_CALL(SetAnimationRate, ACTOR_SELF, PRT_MAIN, EVT_FLOAT(1.0)) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_CALL(YieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_EQ(HIT_RESULT_HIT_STATIC) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_STATIC) - EVT_SET(LFlag0, FALSE) - EVT_ELSE - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_SWITCH - EVT_WAIT(10) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim06) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, -4, -8, -15) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim06) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -40, EASING_LINEAR) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_STONE) - EVT_WAIT(10) - EVT_LOOP(2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim02) - EVT_WAIT(21) - EVT_LOOP(2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.9), EVT_FLOAT(1.2), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.8), EVT_FLOAT(1.3), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.4), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.4), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.8), EVT_FLOAT(1.3), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.9), EVT_FLOAT(1.2), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.9), EVT_FLOAT(1.2), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.8), EVT_FLOAT(1.3), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.4), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.5), EVT_FLOAT(1.0)) - EVT_WAIT(2) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.6), EVT_FLOAT(1.6), EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 2, BS_FLAGS1_NICE_HIT) - EVT_WAIT(30) - EVT_END_LOOP - EVT_ELSE - EVT_CALL(ShowMessageBox, BTL_MSG_ACTION_TIP_MASH_BUTTON, 32767) - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_STOP_LEECH) - EVT_CALL(action_command_stop_leech_init) - EVT_CALL(SetupMashMeter, 1, 30, 0, 0, 0, 0) - EVT_WAIT(10) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_CALL(action_command_stop_leech_start, 0, 32767, 3) - EVT_SET(LVarD, 0) - EVT_LOOP(MAX_LEECH_COUNT) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim02) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(21) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Leeching) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(1) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.9), EVT_FLOAT(1.2), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(1) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.8), EVT_FLOAT(1.3), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(1) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.4), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(1) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.7), EVT_FLOAT(1.5), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(2) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.6), EVT_FLOAT(1.6), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(10) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_SET(LFlag0, FALSE) - EVT_LOOP(2) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_UNBLOCKABLE | DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, DMG_LEECH, BS_FLAGS1_NICE_HIT) - EVT_CALL(GetLastDamage, ACTOR_PLAYER, LVar3) - EVT_IF_NE(LVar3, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_CALL(N(SpawnDrainHealthStartFX), LVar0, LVar1, LVar2, LVar3) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_STAR_BOUNCE_A) - EVT_CALL(N(SpawnDrainHealthContinueFX), LVar0, LVar1, LVar2, LVar3) - EVT_END_THREAD - EVT_ADD(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_RECOVER, 0, LVar0, LVar1, LVar2, LVar3, 0) - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_ADD(LVar0, LVar3) - EVT_CALL(SetEnemyHP, ACTOR_SELF, LVar0) - EVT_ELSE - EVT_ADD(LVarD, 1) - EVT_IF_GT(LVarD, 1) - EVT_CALL(func_80269470) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_CALL(GetPlayerHP, LVar1) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(func_80269470) - EVT_BREAK_LOOP - EVT_END_IF - EVT_SET(LFlag0, FALSE) - EVT_LOOP(35) - EVT_CALL(GetActionSuccessCopy, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(func_80269470) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(AddGoalPos, ACTOR_SELF, 50, 10, 0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim02) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_IsFlying, LVar0) + IfEq(LVar0, 1) + ExecWait(N(EVS_Flying_TakeTurn)) + Return + EndIf + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim02) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_UPSIDE_DOWN, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 24) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Wait(10) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim06) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(AddGoalPos, ACTOR_SELF, -50, 0, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim06) + Call(FlyToGoal, ACTOR_SELF, 0, -40, EASING_LINEAR) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(10.0)) + Wait(15) + Call(SetAnimationRate, ACTOR_SELF, PRT_MAIN, Float(1.0)) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Call(YieldTurn) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + ExecWait(N(EVS_ReturnHome)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + CaseEq(HIT_RESULT_HIT_STATIC) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_STATIC) + Set(LFlag0, FALSE) + Else + Set(LFlag0, TRUE) + EndIf + EndSwitch + Wait(10) + Call(SetActorSpeed, ACTOR_SELF, Float(5.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim06) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, -4, -8, -15) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim06) + Call(FlyToGoal, ACTOR_SELF, 0, -40, EASING_LINEAR) + IfEq(LFlag0, TRUE) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 0, BS_FLAGS1_TRIGGER_EVENTS) + Return + EndIf + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfFlag(LVar0, STATUS_FLAG_STONE) + Wait(10) + Loop(2) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim02) + Wait(21) + Loop(2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.9), Float(1.2), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.8), Float(1.3), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.4), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.5), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.4), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.8), Float(1.3), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.9), Float(1.2), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + EndLoop + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.9), Float(1.2), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.8), Float(1.3), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.4), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.5), Float(1.0)) + Wait(2) + Call(SetActorScale, ACTOR_SELF, Float(0.6), Float(1.6), Float(1.0)) + Wait(10) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 2, BS_FLAGS1_NICE_HIT) + Wait(30) + EndLoop + Else + Call(ShowMessageBox, BTL_MSG_ACTION_TIP_MASH_BUTTON, 32767) + Call(ShowActionHud, TRUE) + Call(LoadActionCommand, ACTION_COMMAND_STOP_LEECH) + Call(action_command_stop_leech_init) + Call(SetupMashMeter, 1, 30, 0, 0, 0, 0) + Wait(10) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + Call(action_command_stop_leech_start, 0, 32767, 3) + Set(LVarD, 0) + Loop(MAX_LEECH_COUNT) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim02) + Set(LFlag0, FALSE) + Loop(21) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Leeching) + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_LEECH) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Set(LFlag0, FALSE) + Loop(1) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(0.9), Float(1.2), Float(1.0)) + Set(LFlag0, FALSE) + Loop(1) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(0.8), Float(1.3), Float(1.0)) + Set(LFlag0, FALSE) + Loop(1) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.4), Float(1.0)) + Set(LFlag0, FALSE) + Loop(1) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(0.7), Float(1.5), Float(1.0)) + Set(LFlag0, FALSE) + Loop(2) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(0.6), Float(1.6), Float(1.0)) + Set(LFlag0, FALSE) + Loop(10) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Set(LFlag0, FALSE) + Loop(2) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + BreakLoop + EndIf + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_UNBLOCKABLE | DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, DMG_LEECH, BS_FLAGS1_NICE_HIT) + Call(GetLastDamage, ACTOR_PLAYER, LVar3) + IfNe(LVar3, 0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_RECOVER_HEART) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HEART_BOUNCE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 15) + Call(N(SpawnDrainHealthStartFX), LVar0, LVar1, LVar2, LVar3) + Thread + Wait(15) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_STAR_BOUNCE_A) + Call(N(SpawnDrainHealthContinueFX), LVar0, LVar1, LVar2, LVar3) + EndThread + Add(LVar0, 20) + Add(LVar1, 20) + PlayEffect(EFFECT_RECOVER, 0, LVar0, LVar1, LVar2, LVar3, 0) + Call(GetActorHP, ACTOR_SELF, LVar0) + Add(LVar0, LVar3) + Call(SetEnemyHP, ACTOR_SELF, LVar0) + Else + Add(LVarD, 1) + IfGt(LVarD, 1) + Call(func_80269470) + BreakLoop + EndIf + EndIf + Call(GetPlayerHP, LVar1) + IfEq(LVar1, 0) + Call(func_80269470) + BreakLoop + EndIf + Set(LFlag0, FALSE) + Loop(35) + Call(GetActionSuccessCopy, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + BreakLoop + EndIf + EndLoop + Call(func_80269470) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetGoalToTarget, ACTOR_SELF) + Call(AddGoalPos, ACTOR_SELF, 50, 10, 0) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Swooper_Gray_Anim02) + Call(FlyToGoal, ACTOR_SELF, 0, -10, EASING_LINEAR) + Wait(10) + Call(YieldTurn) + ExecWait(N(EVS_ReturnHome)) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/whacka.inc.c b/src/battle/common/actor/whacka.inc.c index 0c045810c94..f1d47e31c06 100644 --- a/src/battle/common/actor/whacka.inc.c +++ b/src/battle/common/actor/whacka.inc.c @@ -110,216 +110,216 @@ API_CALLABLE(N(IsHitEightTimes)) { } EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SpawnedBump, FALSE) - EVT_CALL(N(IsHitEightTimes)) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_INVISIBLE | ACTOR_FLAG_NO_ATTACK | ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_SpawnedBump, FALSE) + Call(N(IsHitEightTimes)) + IfEq(LVar0, 0) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_INVISIBLE | ACTOR_FLAG_NO_ATTACK | ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, TRUE) + EndIf + Return + End }; EvtScript N(EVS_Idle) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HIT_WHACKA) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Whacka_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Whacka_Hurt) - EVT_EXEC_WAIT(N(EVS_MakeWhackaBump)) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LE(LVar0, 100) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Whacka_Idle) - EVT_SET_CONST(LVar2, ANIM_Whacka_Idle) - EVT_EXEC_WAIT(N(EVS_MakeWhackaBump)) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LE(LVar0, 100) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Whacka_Idle) - EVT_SET_CONST(LVar2, ANIM_Whacka_Idle) - EVT_EXEC_WAIT(N(EVS_MakeWhackaBump)) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_IF_GE(100, 100) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Whacka_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Whacka_Idle) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LE(LVar0, 100) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Whacka_Idle) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_IF_GE(100, 100) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Whacka_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Whacka_Idle) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Whacka_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Whacka_Idle) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Whacka_Idle) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Whacka_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_ZERO_DAMAGE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Whacka_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CASE_EQ(EVENT_IMMUNE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Whacka_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LE(LVar0, 100) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Whacka_Idle) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LE(LVar0, 100) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Whacka_Hurt) - EVT_EXEC_WAIT(N(EVS_MakeWhackaBump)) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_IF_GE(100, 100) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_ELSE - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Whacka_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Whacka_Idle) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Whacka_Idle) - EVT_SET_CONST(LVar2, ANIM_Whacka_Idle) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Whacka_Idle) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Whacka_Idle) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HIT_WHACKA) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Whacka_Idle) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Whacka_Hurt) + ExecWait(N(EVS_MakeWhackaBump)) + ExecWait(EVS_Enemy_Hit) + Call(RandInt, 100, LVar0) + IfLe(LVar0, 100) + ExecWait(N(EVS_Death)) + Return + EndIf + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Whacka_Idle) + SetConst(LVar2, ANIM_Whacka_Idle) + ExecWait(N(EVS_MakeWhackaBump)) + ExecWait(EVS_Enemy_Hit) + Call(RandInt, 100, LVar0) + IfLe(LVar0, 100) + ExecWait(N(EVS_Death)) + Return + EndIf + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Whacka_Idle) + SetConst(LVar2, ANIM_Whacka_Idle) + ExecWait(N(EVS_MakeWhackaBump)) + ExecWait(EVS_Enemy_Hit) + IfGe(100, 100) + ExecWait(N(EVS_Death)) + Return + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Whacka_Idle) + ExecWait(EVS_Enemy_Death) + Return + EndIf + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Whacka_Idle) + ExecWait(EVS_Enemy_SpinSmashHit) + Call(RandInt, 100, LVar0) + IfLe(LVar0, 100) + ExecWait(N(EVS_Death)) + Return + EndIf + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Whacka_Idle) + ExecWait(EVS_Enemy_SpinSmashHit) + IfGe(100, 100) + ExecWait(N(EVS_Death)) + Return + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Whacka_Idle) + ExecWait(EVS_Enemy_Death) + Return + EndIf + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Whacka_Idle) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Whacka_Idle) + ExecWait(EVS_Enemy_Knockback) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Whacka_Idle) + ExecWait(EVS_Enemy_ReturnHome) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Whacka_Idle) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Whacka_Idle) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_ZERO_DAMAGE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Whacka_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + CaseEq(EVENT_IMMUNE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Whacka_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + Call(RandInt, 100, LVar0) + IfLe(LVar0, 100) + ExecWait(N(EVS_Death)) + Return + EndIf + CaseEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Whacka_Idle) + ExecWait(EVS_Enemy_NoDamageHit) + Call(RandInt, 100, LVar0) + IfLe(LVar0, 100) + ExecWait(N(EVS_Death)) + Return + EndIf + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Whacka_Hurt) + ExecWait(N(EVS_MakeWhackaBump)) + ExecWait(EVS_Enemy_Hit) + Wait(10) + IfGe(100, 100) + ExecWait(N(EVS_Death)) + Return + Else + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Whacka_Idle) + ExecWait(EVS_Enemy_Death) + Return + EndIf + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Whacka_Idle) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Whacka_Idle) + SetConst(LVar2, ANIM_Whacka_Idle) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Whacka_Idle) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Whacka_Idle) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LE(LVar0, 100) - EVT_EXEC_WAIT(N(EVS_Death)) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + Call(RandInt, 100, LVar0) + IfLe(LVar0, 100) + ExecWait(N(EVS_Death)) + Return + EndIf + Return + End }; EvtScript N(EVS_MakeWhackaBump) = { - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_SpawnedBump, TRUE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HIT_WHACKA) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Whacka_Idle) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar2, 10) - EVT_CALL(MakeItemEntity, ITEM_WHACKAS_BUMP, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS, 0) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetActorVar, ACTOR_SELF, AVAR_SpawnedBump, TRUE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HIT_WHACKA) + Thread + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Whacka_Idle) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Add(LVar1, 20) + Add(LVar2, 10) + Call(MakeItemEntity, ITEM_WHACKAS_BUMP, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS, 0) + EndThread + Return + End }; EvtScript N(EVS_Death) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Whacka_Burrow) - EVT_WAIT(40) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_SpawnedBump, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_CALL(SetBattleFlagBits2, BS_FLAGS2_DROP_WHACKA_BUMP, TRUE) - EVT_END_IF - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_INVISIBLE | ACTOR_FLAG_NO_ATTACK | ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_BURROW_DIG) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_Whacka_Burrow) + Wait(40) + Call(GetActorVar, ACTOR_SELF, AVAR_SpawnedBump, LVar0) + IfNe(LVar0, FALSE) + Call(SetBattleFlagBits2, BS_FLAGS2_DROP_WHACKA_BUMP, TRUE) + EndIf + Call(SetPartFlagBits, ACTOR_SELF, PRT_MAIN, ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_INVISIBLE | ACTOR_FLAG_NO_ATTACK | ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Call(RemoveActor, ACTOR_SELF) + Return + End }; diff --git a/src/battle/common/actor/white_clubba.inc.c b/src/battle/common/actor/white_clubba.inc.c index 5674a2ad8a8..dc491dccacc 100644 --- a/src/battle/common/actor/white_clubba.inc.c +++ b/src/battle/common/actor/white_clubba.inc.c @@ -102,255 +102,255 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Frost_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Frost_Anim06) - EVT_SET_CONST(LVar2, ANIM_BattleClubba_Frost_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Frost_Anim06) - EVT_SET_CONST(LVar2, ANIM_BattleClubba_Frost_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Frost_Anim07) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Frost_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Frost_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Frost_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Frost_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Frost_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Knockback) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Frost_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CASE_EQ(EVENT_SHOCK_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Frost_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Frost_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Frost_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Frost_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Frost_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Frost_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Frost_Anim02) - EVT_SET_CONST(LVar2, ANIM_BattleClubba_Frost_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_ScareAway) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Frost_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Frost_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Frost_Anim04) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Frost_Anim06) + SetConst(LVar2, ANIM_BattleClubba_Frost_Anim07) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Frost_Anim06) + SetConst(LVar2, ANIM_BattleClubba_Frost_Anim07) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Frost_Anim07) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Frost_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Frost_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Frost_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Frost_Anim04) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Frost_Anim04) + ExecWait(EVS_Enemy_Knockback) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Frost_Anim02) + ExecWait(EVS_Enemy_ReturnHome) + CaseEq(EVENT_SHOCK_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Frost_Anim04) + ExecWait(EVS_Enemy_ShockHit) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Frost_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Frost_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Frost_Anim04) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Frost_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Frost_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Frost_Anim02) + SetConst(LVar2, ANIM_BattleClubba_Frost_Anim04) + ExecWait(EVS_Enemy_ScareAway) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Frost_Anim04) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Frost_Anim04) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 27) - EVT_SET(LVar1, 0) - EVT_SUB(LVar2, 6) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(15) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Frost_Anim02) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(AddGoalPos, ACTOR_SELF, 27, 0, -6) - EVT_ELSE - EVT_CALL(AddGoalPos, ACTOR_SELF, 10, 0, -6) - EVT_END_IF - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Frost_Anim01) - EVT_WAIT(10) - EVT_END_IF - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CLUBBA_SWING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Frost_Anim08) - EVT_WAIT(20) - EVT_IF_EQ(LVar0, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_WAIT(20) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(YieldTurn) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Frost_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_GOTO(40) - EVT_END_IF - EVT_CALL(GetActorHP, ACTOR_SELF, LVar0) - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVar1) - EVT_MULF(LVar0, EVT_FLOAT(100.0)) - EVT_DIVF(LVar0, LVar1) - EVT_IF_LT(LVar0, 30) - EVT_GOTO(50) - EVT_END_IF - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 25) - EVT_GOTO(50) - EVT_END_IF - EVT_LABEL(40) // heavy club attack - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Frost_Anim09) - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CLUBBA_SWING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Frost_Anim0A) - EVT_WAIT(2) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_HEAVY_STRIKE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.5)) - EVT_END_THREAD - EVT_GOTO(100) - EVT_LABEL(50) // swift club attack - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Frost_Anim09) - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CLUBBA_SWING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Frost_Anim0A) - EVT_WAIT(2) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_QUICK_STRIKE, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.5)) - EVT_END_THREAD - EVT_CALL(GetActorHP, ACTOR_PLAYER, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(100) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Frost_Anim09) - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CLUBBA_SWING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Frost_Anim0A) - EVT_WAIT(2) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_QUICK_STRIKE, BS_FLAGS1_NICE_HIT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.5)) - EVT_END_THREAD - EVT_CALL(GetActorHP, ACTOR_PLAYER, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(100) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Frost_Anim09) - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_CLUBBA_SWING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Frost_Anim0A) - EVT_WAIT(2) - EVT_WAIT(2) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_QUICK_STRIKE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.5)) - EVT_END_THREAD - EVT_LABEL(100) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(19) - EVT_CALL(YieldTurn) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleClubba_Frost_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_ReturnHome) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 27) + Set(LVar1, 0) + Sub(LVar2, 6) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Wait(15) + Else + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Frost_Anim02) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAG_SHRINK) + Call(AddGoalPos, ACTOR_SELF, 27, 0, -6) + Else + Call(AddGoalPos, ACTOR_SELF, 10, 0, -6) + EndIf + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Frost_Anim01) + Wait(10) + EndIf + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CLUBBA_SWING) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Frost_Anim08) + Wait(20) + IfEq(LVar0, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + Wait(20) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(YieldTurn) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SWEAT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Frost_Anim02) + ExecWait(EVS_Enemy_ReturnHome) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_MAIN, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Goto(40) + EndIf + Call(GetActorHP, ACTOR_SELF, LVar0) + Call(GetEnemyMaxHP, ACTOR_SELF, LVar1) + MulF(LVar0, Float(100.0)) + DivF(LVar0, LVar1) + IfLt(LVar0, 30) + Goto(50) + EndIf + Call(RandInt, 100, LVar0) + IfLt(LVar0, 25) + Goto(50) + EndIf + Label(40) // heavy club attack + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Frost_Anim09) + Wait(15) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CLUBBA_SWING) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Frost_Anim0A) + Wait(2) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_HEAVY_STRIKE, BS_FLAGS1_TRIGGER_EVENTS) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.5)) + EndThread + Goto(100) + Label(50) // swift club attack + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Frost_Anim09) + Wait(15) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CLUBBA_SWING) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Frost_Anim0A) + Wait(2) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_QUICK_STRIKE, BS_FLAGS1_INCLUDE_POWER_UPS) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.5)) + EndThread + Call(GetActorHP, ACTOR_PLAYER, LVar0) + IfEq(LVar0, 0) + Goto(100) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Frost_Anim09) + Wait(15) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CLUBBA_SWING) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Frost_Anim0A) + Wait(2) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_QUICK_STRIKE, BS_FLAGS1_NICE_HIT) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.5)) + EndThread + Call(GetActorHP, ACTOR_PLAYER, LVar0) + IfEq(LVar0, 0) + Goto(100) + EndIf + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Frost_Anim09) + Wait(15) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_CLUBBA_SWING) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleClubba_Frost_Anim0A) + Wait(2) + Wait(2) + Call(SetGoalToTarget, ACTOR_SELF) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_QUICK_STRIKE, BS_FLAGS1_TRIGGER_EVENTS) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.5)) + EndThread + Label(100) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(19) + Call(YieldTurn) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleClubba_Frost_Anim02) + ExecWait(EVS_Enemy_ReturnHome) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/actor/white_magikoopa.inc.c b/src/battle/common/actor/white_magikoopa.inc.c index 6b78345343a..9d8a0d4e59e 100644 --- a/src/battle/common/actor/white_magikoopa.inc.c +++ b/src/battle/common/actor/white_magikoopa.inc.c @@ -262,953 +262,953 @@ API_CALLABLE(N(GetActorDefense)) { } EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent_Ground) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_White_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_White_Anim05) - EVT_SET_CONST(LVar2, ANIM_Magikoopa_White_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_White_Anim05) - EVT_SET_CONST(LVar2, ANIM_Magikoopa_White_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_White_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_White_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_White_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_White_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_White_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_White_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_White_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_White_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_White_Anim04) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_White_Anim02) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_White_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, 0, 2, 0) - EVT_ELSE - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, -4, 5, 0) - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_White_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_White_Anim04) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_White_Anim05) + SetConst(LVar2, ANIM_Magikoopa_White_Anim06) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_White_Anim05) + SetConst(LVar2, ANIM_Magikoopa_White_Anim06) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_White_Anim06) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_White_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_White_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_White_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_White_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_White_Anim04) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_White_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_White_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_White_Anim04) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_White_Anim02) + ExecWait(N(EVS_Flee)) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_White_Anim02) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, 0, 2, 0) + Else + Call(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, -4, 5, 0) + EndIf + EndIf + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_White_Anim04) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_KnockDownCheck) = { - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_PARTNER_ACTING) - EVT_IF_FLAG(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE) - EVT_END_IF - EVT_ELSE - EVT_CALL(N(GetSelectedMoveID), LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(MOVE_HEADBONK1) - EVT_CASE_OR_EQ(MOVE_HEADBONK2) - EVT_CASE_OR_EQ(MOVE_HEADBONK3) - EVT_CASE_OR_EQ(MOVE_MULTIBONK) - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetBattleFlags, LVar0) + IfNotFlag(LVar0, BS_FLAGS1_PARTNER_ACTING) + IfFlag(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE) + EndIf + Else + Call(N(GetSelectedMoveID), LVar0) + Switch(LVar0) + CaseOrEq(MOVE_HEADBONK1) + CaseOrEq(MOVE_HEADBONK2) + CaseOrEq(MOVE_HEADBONK3) + CaseOrEq(MOVE_MULTIBONK) + Call(GetBattleFlags, LVar0) + IfFlag(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE) + EndIf + EndCaseGroup + EndSwitch + EndIf + Return + End }; EvtScript N(EVS_KnockDown) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_White_Anim04) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetLastElement, LVar0) - EVT_IF_FLAG(LVar0, DAMAGE_TYPE_POW) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_White_Anim04) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_LABEL(0) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_BROOM, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_END_IF - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 1) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_BROOM, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(N(StartRumbleWithParams), 150, 10) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(0.7)) - EVT_END_THREAD - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar3) - EVT_IF_EQ(LVar3, EVENT_15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_White_Anim04) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_ADD(LVar4, 10) - EVT_ADD(LVar5, 5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 10, 0) - EVT_END_IF - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_LOOP(20) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_White_Anim01) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent_Ground))) - EVT_CALL(SetActorType, ACTOR_SELF, ACTOR_TYPE_WHITE_MAGIKOOPA) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(StatusTable_Ground))) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 32) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(GetIndexFromPos, ACTOR_SELF, LVar0) - EVT_MOD(LVar0, 4) - EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVar0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, LVar0) + IfEq(LVar0, 1) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_White_Anim04) + Goto(0) + EndIf + Call(GetLastElement, LVar0) + IfFlag(LVar0, DAMAGE_TYPE_POW) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_White_Anim04) + Goto(0) + EndIf + Return + Label(0) + Call(HideHealthBar, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartScale, ACTOR_SELF, PRT_BROOM, Float(0.4), Float(0.4), Float(0.4)) + EndIf + Call(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar2, 1) + Call(SetPartPos, ACTOR_SELF, PRT_BROOM, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(N(StartRumbleWithParams), 150, 10) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.7)) + EndThread + Call(GetLastEvent, ACTOR_SELF, LVar3) + IfEq(LVar3, EVENT_15) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_White_Anim04) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Add(LVar4, 10) + Add(LVar5, 5) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, Float(1.0), 10, 0) + EndIf + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Loop(20) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_White_Anim01) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent_Ground))) + Call(SetActorType, ACTOR_SELF, ACTOR_TYPE_WHITE_MAGIKOOPA) + Call(SetStatusTable, ACTOR_SELF, Ref(N(StatusTable_Ground))) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 32) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(GetIndexFromPos, ACTOR_SELF, LVar0) + Mod(LVar0, 4) + Call(SetGoalToIndex, ACTOR_SELF, LVar0) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Return + End }; EvtScript N(EVS_HandleEvent_Flying) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_EXEC_WAIT(N(EVS_KnockDownCheck)) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_White_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CASE_OR_EQ(EVENT_FALL_TRIGGER) - EVT_EXEC_WAIT(N(EVS_KnockDownCheck)) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_White_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_BURN_HIT) - EVT_CASE_OR_EQ(EVENT_15) - EVT_EXEC_WAIT(N(EVS_KnockDownCheck)) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_White_Anim05) - EVT_SET_CONST(LVar2, ANIM_FlyingMagikoopa_White_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_White_Anim05) - EVT_SET_CONST(LVar2, ANIM_FlyingMagikoopa_White_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_White_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_White_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_White_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_White_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_White_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_White_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_White_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0) - EVT_CALL(HPBarToCurrent, ACTOR_SELF) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_White_Anim01) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_White_Anim01) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_White_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_White_Anim04) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_White_Anim02) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_White_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -3, 0, 0) - EVT_ELSE - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -15, 0, 0) - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_White_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + ExecWait(N(EVS_KnockDownCheck)) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_White_Anim04) + ExecWait(EVS_Enemy_Hit) + CaseOrEq(EVENT_HIT) + CaseOrEq(EVENT_FALL_TRIGGER) + ExecWait(N(EVS_KnockDownCheck)) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_White_Anim04) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_KnockDown)) + EndCaseGroup + CaseOrEq(EVENT_BURN_HIT) + CaseOrEq(EVENT_15) + ExecWait(N(EVS_KnockDownCheck)) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_White_Anim05) + SetConst(LVar2, ANIM_FlyingMagikoopa_White_Anim06) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_KnockDown)) + EndCaseGroup + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_White_Anim05) + SetConst(LVar2, ANIM_FlyingMagikoopa_White_Anim06) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_White_Anim06) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_White_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_White_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_White_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_White_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_White_Anim04) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_White_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + Call(SetActorPos, ACTOR_SELF, 20, 0, 0) + Call(HPBarToCurrent, ACTOR_SELF) + CaseEq(EVENT_END_FIRST_STRIKE) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_White_Anim01) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_White_Anim01) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_White_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_White_Anim04) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_White_Anim02) + ExecWait(N(EVS_Flee)) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_White_Anim02) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -3, 0, 0) + Else + Call(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -15, 0, 0) + EndIf + EndIf + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_White_Anim04) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_MagicBlast) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 1) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 12) - EVT_ADD(LVar1, 14) - EVT_ELSE - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 36) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.5), 30, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_White_Anim02) - EVT_WAIT(30) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_White_Anim03) - EVT_WAIT(5) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar9) - EVT_IF_FLAG(LVar9, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 8) - EVT_ADD(LVar1, 8) - EVT_ELSE - EVT_SUB(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_END_IF - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 50) - EVT_SET(LVar4, 0) - EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 25) - EVT_WAIT(50) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(14) - EVT_CALL(YieldTurn) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT) - EVT_WAIT(30) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_White_Anim03) - EVT_WAIT(5) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 8) - EVT_ADD(LVar1, 8) - EVT_ELSE - EVT_SUB(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_END_IF - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 10) - EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 20) - EVT_WAIT(18) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_MAGIC_BLAST, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_WAIT(19) - EVT_CALL(YieldTurn) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 1) + Else + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 12) + Add(LVar1, 14) + Else + Sub(LVar0, 30) + Add(LVar1, 36) + EndIf + PlayEffect(EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, Float(0.5), 30, 0) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_White_Anim02) + Wait(30) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_White_Anim03) + Wait(5) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar9) + IfFlag(LVar9, STATUS_FLAG_SHRINK) + Sub(LVar0, 8) + Add(LVar1, 8) + Else + Sub(LVar0, 20) + Add(LVar1, 20) + EndIf + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Sub(LVar3, 50) + Set(LVar4, 0) + Call(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 25) + Wait(50) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(14) + Call(YieldTurn) + Call(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT) + Wait(30) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_White_Anim03) + Wait(5) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 8) + Add(LVar1, 8) + Else + Sub(LVar0, 20) + Add(LVar1, 20) + EndIf + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Sub(LVar3, 10) + Call(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 20) + Wait(18) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_MAGIC_BLAST, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Wait(19) + Call(YieldTurn) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_WandStrike) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_VANISH) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_White_Anim02) - EVT_SET(LVar0, 200) - EVT_LOOP(20) - EVT_SUB(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, 5) - EVT_ELSE - EVT_ADD(LVar0, 25) - EVT_END_IF - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_SET(LVar0, 55) - EVT_LOOP(20) - EVT_ADD(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_White_Anim03) - EVT_WAIT(11) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_WAND_STRIKE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(15) - EVT_SET(LVar0, 200) - EVT_LOOP(20) - EVT_SUB(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(YieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_White_Anim01) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_SET(LVar0, 55) - EVT_LOOP(20) - EVT_ADD(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_WAND_STRIKE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(10) - EVT_SET(LVar0, 200) - EVT_LOOP(20) - EVT_SUB(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(YieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_White_Anim01) - EVT_CALL(FlyToGoal, ACTOR_SELF, 20, 0, EASING_COS_IN_OUT) - EVT_SET(LVar0, 55) - EVT_LOOP(20) - EVT_ADD(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_VANISH) + Thread + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_White_Anim02) + Set(LVar0, 200) + Loop(20) + Sub(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + EndThread + Wait(10) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Add(LVar0, 5) + Else + Add(LVar0, 25) + EndIf + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + Set(LVar0, 55) + Loop(20) + Add(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_White_Anim03) + Wait(11) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_WAND_STRIKE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(15) + Set(LVar0, 200) + Loop(20) + Sub(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + Call(YieldTurn) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_White_Anim01) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + Set(LVar0, 55) + Loop(20) + Add(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_WAND_STRIKE, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(10) + Set(LVar0, 200) + Loop(20) + Sub(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + Call(YieldTurn) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_White_Anim01) + Call(FlyToGoal, ACTOR_SELF, 20, 0, EASING_COS_IN_OUT) + Set(LVar0, 55) + Loop(20) + Add(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Flee) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_IF_NE(LVar0, EVENT_SCARE_AWAY) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_01) - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_WAIT(10) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 200) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(YieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_EXEC_WAIT(EVS_ForceNextTarget) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(HideHealthBar, ACTOR_SELF) + Call(GetLastEvent, ACTOR_SELF, LVar0) + IfNe(LVar0, EVENT_SCARE_AWAY) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_PRESET_01) + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(1.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Wait(10) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetActorSpeed, ACTOR_SELF, Float(10.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 200) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(YieldTurn) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ExecWait(EVS_ForceNextTarget) + Call(HideHealthBar, ACTOR_SELF) + Call(RemoveActor, ACTOR_SELF) + Return + End }; EvtScript N(EVS_Init_Ground) = { - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent_Ground))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE) - EVT_RETURN - EVT_END + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent_Ground))) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE) + Return + End }; EvtScript N(EVS_Init_Flying) = { - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent_Flying))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE) - EVT_RETURN - EVT_END + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent_Flying))) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE) + Return + End }; EvtScript N(EVS_Move_HealOne) = { #define LV_LowestActor LVar8 #define LV_LowestHP LVar9 // try to find a non-magikoopa actor in danger of being killed by the player - EVT_SET(LV_LowestActor, 0) - EVT_SET(LV_LowestHP, 9999) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetActorHP, LVar0, LVar2) - EVT_CALL(N(GetBootsHammerLevel), LVar3, LVar4) - EVT_IF_GT(LVar3, LVar4) - EVT_SET(LVar3, LVar4) - EVT_END_IF - EVT_CALL(N(GetActorDefense), LVar0, LVar1, LVar5) - EVT_CALL(GetActorDefenseBoost, LVar0, LVar6) - EVT_ADD(LVar5, LVar6) - EVT_SUB(LVar3, LVar5) - EVT_SUB(LVar2, LVar3) - EVT_CALL(N(CheckMagikoopaCastTarget), LVar0, LVarA) - EVT_IF_EQ(LVarA, 0) - EVT_CALL(GetEnemyMaxHP, LVar0, LVarA) - EVT_CALL(GetActorHP, LVar0, LVarB) - EVT_IF_NE(LVarA, LVarB) - EVT_IF_LT(LVar2, LV_LowestHP) - EVT_SET(LV_LowestActor, LVar0) - EVT_SET(LV_LowestHP, LVar2) - EVT_ELSE - EVT_IF_EQ(LVar2, LV_LowestHP) - EVT_IF_LT(LVar0, LV_LowestActor) - EVT_SET(LV_LowestActor, LVar0) - EVT_SET(LV_LowestHP, LVar2) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_NE(LV_LowestActor, 0) - EVT_GOTO(100) - EVT_END_IF + Set(LV_LowestActor, 0) + Set(LV_LowestHP, 9999) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetActorHP, LVar0, LVar2) + Call(N(GetBootsHammerLevel), LVar3, LVar4) + IfGt(LVar3, LVar4) + Set(LVar3, LVar4) + EndIf + Call(N(GetActorDefense), LVar0, LVar1, LVar5) + Call(GetActorDefenseBoost, LVar0, LVar6) + Add(LVar5, LVar6) + Sub(LVar3, LVar5) + Sub(LVar2, LVar3) + Call(N(CheckMagikoopaCastTarget), LVar0, LVarA) + IfEq(LVarA, 0) + Call(GetEnemyMaxHP, LVar0, LVarA) + Call(GetActorHP, LVar0, LVarB) + IfNe(LVarA, LVarB) + IfLt(LVar2, LV_LowestHP) + Set(LV_LowestActor, LVar0) + Set(LV_LowestHP, LVar2) + Else + IfEq(LVar2, LV_LowestHP) + IfLt(LVar0, LV_LowestActor) + Set(LV_LowestActor, LVar0) + Set(LV_LowestHP, LVar2) + EndIf + EndIf + EndIf + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + IfNe(LV_LowestActor, 0) + Goto(100) + EndIf // try to find any actor in danger of being killed by the player - EVT_SET(LV_LowestActor, 0) - EVT_SET(LV_LowestHP, 9999) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(1) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetActorHP, LVar0, LVar2) - EVT_CALL(N(GetBootsHammerLevel), LVar3, LVar4) - EVT_IF_GT(LVar3, LVar4) - EVT_SET(LVar3, LVar4) - EVT_END_IF - EVT_CALL(N(GetActorDefense), LVar0, LVar1, LVar5) - EVT_CALL(GetActorDefenseBoost, LVar0, LVar6) - EVT_ADD(LVar5, LVar6) - EVT_SUB(LVar3, LVar5) - EVT_SUB(LVar2, LVar4) - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetOriginalActorType, LVar0, LVarA) - EVT_IF_EQ(LVarA, ACTOR_TYPE_DRY_BONES) - EVT_CALL(GetActorVar, LVar0, AVAR_DryBones_Collapsed, LVarA) - EVT_IF_EQ(LVarA, 1) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_CALL(GetOwnerID, LVarA) - EVT_IF_NE(LVarA, LVar0) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(GetEnemyMaxHP, LVar0, LVarA) - EVT_CALL(GetActorHP, LVar0, LVarB) - EVT_IF_NE(LVarA, LVarB) - EVT_IF_LT(LVar2, LV_LowestHP) - EVT_SET(LV_LowestActor, LVar0) - EVT_SET(LV_LowestHP, LVar2) - EVT_ELSE - EVT_IF_EQ(LVar2, LV_LowestHP) - EVT_IF_LT(LVar0, LV_LowestActor) - EVT_SET(LV_LowestActor, LVar0) - EVT_SET(LV_LowestHP, LVar2) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(1) - EVT_END_IF - EVT_IF_NE(LV_LowestActor, 0) - EVT_GOTO(100) - EVT_END_IF + Set(LV_LowestActor, 0) + Set(LV_LowestHP, 9999) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(1) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetActorHP, LVar0, LVar2) + Call(N(GetBootsHammerLevel), LVar3, LVar4) + IfGt(LVar3, LVar4) + Set(LVar3, LVar4) + EndIf + Call(N(GetActorDefense), LVar0, LVar1, LVar5) + Call(GetActorDefenseBoost, LVar0, LVar6) + Add(LVar5, LVar6) + Sub(LVar3, LVar5) + Sub(LVar2, LVar4) + Set(LFlag0, FALSE) + Call(GetOriginalActorType, LVar0, LVarA) + IfEq(LVarA, ACTOR_TYPE_DRY_BONES) + Call(GetActorVar, LVar0, AVAR_DryBones_Collapsed, LVarA) + IfEq(LVarA, 1) + Set(LFlag0, TRUE) + EndIf + EndIf + Call(GetOwnerID, LVarA) + IfNe(LVarA, LVar0) + IfEq(LFlag0, FALSE) + Call(GetEnemyMaxHP, LVar0, LVarA) + Call(GetActorHP, LVar0, LVarB) + IfNe(LVarA, LVarB) + IfLt(LVar2, LV_LowestHP) + Set(LV_LowestActor, LVar0) + Set(LV_LowestHP, LVar2) + Else + IfEq(LVar2, LV_LowestHP) + IfLt(LVar0, LV_LowestActor) + Set(LV_LowestActor, LVar0) + Set(LV_LowestHP, LVar2) + EndIf + EndIf + EndIf + EndIf + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(1) + EndIf + IfNe(LV_LowestActor, 0) + Goto(100) + EndIf // try to find the actor with lowest HP% - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(2) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetOriginalActorType, LVar0, LVarA) - EVT_IF_EQ(LVarA, ACTOR_TYPE_DRY_BONES) - EVT_CALL(GetActorVar, LVar0, AVAR_DryBones_Collapsed, LVarA) - EVT_IF_EQ(LVarA, 1) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_CALL(GetOwnerID, LVarA) - EVT_IF_NE(LVarA, LVar0) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(GetEnemyMaxHP, LVar0, LVarA) - EVT_CALL(GetActorHP, LVar0, LVarB) - EVT_IF_NE(LVarA, LVarB) - EVT_SET(LV_LowestActor, LVar0) - EVT_GOTO(100) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(2) - EVT_END_IF - EVT_CALL(GetEnemyMaxHP, ACTOR_SELF, LVarA) - EVT_CALL(GetActorHP, ACTOR_SELF, LVarB) - EVT_IF_NE(LVarA, LVarB) - EVT_SET(LV_LowestActor, ACTOR_SELF) - EVT_GOTO(100) - EVT_END_IF - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(3) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetOwnerID, LVarA) - EVT_IF_NE(LVarA, LVar0) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_EXEC_WAIT(N(EVS_Attack_MagicBlast)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_WandStrike)) - EVT_END_IF - EVT_RETURN - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(3) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_LABEL(100) - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_GT(LVar0, 750) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_EXEC_WAIT(N(EVS_Attack_MagicBlast)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_WandStrike)) - EVT_END_IF - EVT_RETURN - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_White_Anim02) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_White_Anim02) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 6) - EVT_ADD(LVar1, 12) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 16) - EVT_ADD(LVar1, 31) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 12) - EVT_ADD(LVar1, 14) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 36) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_White_Anim01) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_White_Anim01) - EVT_END_IF - EVT_WAIT(5) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, LV_LowestActor, SOUND_RECOVER_HEART) - EVT_CALL(PlaySoundAtActor, LV_LowestActor, SOUND_HEART_BOUNCE) - EVT_WAIT(30) - EVT_CALL(PlaySoundAtActor, LV_LowestActor, SOUND_STAR_BOUNCE_A) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(HealActor, LV_LowestActor, HEAL_AMT_ONE, FALSE) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_CALL(WaitForBuffDone) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(2) + Call(GetOwnerTarget, LVar0, LVar1) + Set(LFlag0, FALSE) + Call(GetOriginalActorType, LVar0, LVarA) + IfEq(LVarA, ACTOR_TYPE_DRY_BONES) + Call(GetActorVar, LVar0, AVAR_DryBones_Collapsed, LVarA) + IfEq(LVarA, 1) + Set(LFlag0, TRUE) + EndIf + EndIf + Call(GetOwnerID, LVarA) + IfNe(LVarA, LVar0) + IfEq(LFlag0, FALSE) + Call(GetEnemyMaxHP, LVar0, LVarA) + Call(GetActorHP, LVar0, LVarB) + IfNe(LVarA, LVarB) + Set(LV_LowestActor, LVar0) + Goto(100) + EndIf + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(2) + EndIf + Call(GetEnemyMaxHP, ACTOR_SELF, LVarA) + Call(GetActorHP, ACTOR_SELF, LVarB) + IfNe(LVarA, LVarB) + Set(LV_LowestActor, ACTOR_SELF) + Goto(100) + EndIf + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(3) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetOwnerID, LVarA) + IfNe(LVarA, LVar0) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, ACTOR_FLAG_FLYING) + ExecWait(N(EVS_Attack_MagicBlast)) + Else + ExecWait(N(EVS_Attack_WandStrike)) + EndIf + Return + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(3) + EndIf + ExecWait(N(EVS_Flee)) + Return + Label(100) + Call(RandInt, 1000, LVar0) + IfGt(LVar0, 750) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, ACTOR_FLAG_FLYING) + ExecWait(N(EVS_Attack_MagicBlast)) + Else + ExecWait(N(EVS_Attack_WandStrike)) + EndIf + Return + EndIf + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_White_Anim02) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_White_Anim02) + EndIf + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 6) + Add(LVar1, 12) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 16) + Add(LVar1, 31) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 12) + Add(LVar1, 14) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 30) + Add(LVar1, 36) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + EndIf + Wait(30) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_White_Anim01) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_White_Anim01) + EndIf + Wait(5) + Thread + Wait(5) + Call(PlaySoundAtActor, LV_LowestActor, SOUND_RECOVER_HEART) + Call(PlaySoundAtActor, LV_LowestActor, SOUND_HEART_BOUNCE) + Wait(30) + Call(PlaySoundAtActor, LV_LowestActor, SOUND_STAR_BOUNCE_A) + EndThread + Thread + Call(FreezeBattleState, TRUE) + Call(HealActor, LV_LowestActor, HEAL_AMT_ONE, FALSE) + Call(FreezeBattleState, FALSE) + EndThread + Call(WaitForBuffDone) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(10) + Call(YieldTurn) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Move_HealAll) = { - EVT_CALL(RandInt, 1000, LVar0) - EVT_IF_GT(LVar0, 750) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_EXEC_WAIT(N(EVS_Attack_MagicBlast)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_WandStrike)) - EVT_END_IF - EVT_RETURN - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_White_Anim02) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_White_Anim02) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 6) - EVT_ADD(LVar1, 12) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 16) - EVT_ADD(LVar1, 31) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 12) - EVT_ADD(LVar1, 14) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 36) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_White_Anim01) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_White_Anim01) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetOriginalActorType, LVar0, LVar1) - EVT_IF_EQ(LVar1, ACTOR_TYPE_DRY_BONES) - EVT_CALL(GetActorVar, LVar0, AVAR_DryBones_Collapsed, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, LVar0, SOUND_RECOVER_HEART) - EVT_CALL(PlaySoundAtActor, LVar0, SOUND_HEART_BOUNCE) - EVT_WAIT(30) - EVT_CALL(PlaySoundAtActor, LVar0, SOUND_STAR_BOUNCE_A) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(HealActor, LVar0, HEAL_AMT_ALL, TRUE) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(WaitForBuffDone) - EVT_WAIT(1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(RandInt, 1000, LVar0) + IfGt(LVar0, 750) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, ACTOR_FLAG_FLYING) + ExecWait(N(EVS_Attack_MagicBlast)) + Else + ExecWait(N(EVS_Attack_WandStrike)) + EndIf + Return + EndIf + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_White_Anim02) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_White_Anim02) + EndIf + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 6) + Add(LVar1, 12) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 16) + Add(LVar1, 31) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 12) + Add(LVar1, 14) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 30) + Add(LVar1, 36) + Sub(LVar2, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 7, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + EndIf + Wait(30) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_White_Anim01) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_White_Anim01) + EndIf + Wait(5) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Set(LFlag0, FALSE) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetOriginalActorType, LVar0, LVar1) + IfEq(LVar1, ACTOR_TYPE_DRY_BONES) + Call(GetActorVar, LVar0, AVAR_DryBones_Collapsed, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + EndIf + EndIf + IfEq(LFlag0, FALSE) + Thread + Wait(5) + Call(PlaySoundAtActor, LVar0, SOUND_RECOVER_HEART) + Call(PlaySoundAtActor, LVar0, SOUND_HEART_BOUNCE) + Wait(30) + Call(PlaySoundAtActor, LVar0, SOUND_STAR_BOUNCE_A) + EndThread + Thread + Call(FreezeBattleState, TRUE) + Call(HealActor, LVar0, HEAL_AMT_ALL, TRUE) + Call(FreezeBattleState, FALSE) + EndThread + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Call(WaitForBuffDone) + Wait(1) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(10) + Call(YieldTurn) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_END_IF - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetOriginalActorType, LVar0, LVar1) - EVT_IF_EQ(LVar1, ACTOR_TYPE_DRY_BONES) - EVT_CALL(GetActorVar, LVar0, AVAR_DryBones_Collapsed, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(GetActorHP, LVar0, LVar2) - EVT_CALL(GetEnemyMaxHP, LVar0, LVar3) - EVT_IF_NE(LVar2, LVar3) - EVT_ADD(LVarA, 1) - EVT_END_IF - EVT_ADD(LVarB, 1) - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_MUL(LVarA, 100) - EVT_DIV(LVarA, LVarB) - EVT_SWITCH(LVarA) - EVT_CASE_GE(60) - EVT_EXEC_WAIT(N(EVS_Move_HealAll)) - EVT_CASE_EQ(0) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_EXEC_WAIT(N(EVS_Attack_MagicBlast)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_WandStrike)) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(N(EVS_Move_HealOne)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) + IfEq(LVar0, 1) + ExecWait(N(EVS_Flee)) + Return + EndIf + Set(LVarA, 0) + Set(LVarB, 0) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Set(LFlag0, FALSE) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetOriginalActorType, LVar0, LVar1) + IfEq(LVar1, ACTOR_TYPE_DRY_BONES) + Call(GetActorVar, LVar0, AVAR_DryBones_Collapsed, LVar1) + IfEq(LVar1, 1) + Set(LFlag0, TRUE) + EndIf + EndIf + IfEq(LFlag0, FALSE) + Call(GetActorHP, LVar0, LVar2) + Call(GetEnemyMaxHP, LVar0, LVar3) + IfNe(LVar2, LVar3) + Add(LVarA, 1) + EndIf + Add(LVarB, 1) + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Mul(LVarA, 100) + Div(LVarA, LVarB) + Switch(LVarA) + CaseGe(60) + ExecWait(N(EVS_Move_HealAll)) + CaseEq(0) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, ACTOR_FLAG_FLYING) + ExecWait(N(EVS_Attack_MagicBlast)) + Else + ExecWait(N(EVS_Attack_WandStrike)) + EndIf + CaseDefault + ExecWait(N(EVS_Move_HealOne)) + EndSwitch + Return + End }; diff --git a/src/battle/common/actor/yellow_magikoopa.inc.c b/src/battle/common/actor/yellow_magikoopa.inc.c index fc533add6f4..9b17a5e3987 100644 --- a/src/battle/common/actor/yellow_magikoopa.inc.c +++ b/src/battle/common/actor/yellow_magikoopa.inc.c @@ -222,696 +222,696 @@ s32 N(BroomAnims)[] = { }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; #include "common/ShrinkActor.inc.c" EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim05) - EVT_SET_CONST(LVar2, ANIM_Magikoopa_Yellow_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim05) - EVT_SET_CONST(LVar2, ANIM_Magikoopa_Yellow_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim04) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim02) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, 0, 2, 0) - EVT_ELSE - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, -4, 5, 0) - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_GROUND) - EVT_SET_CONST(LVar1, ANIM_Magikoopa_Yellow_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Yellow_Anim04) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Yellow_Anim05) + SetConst(LVar2, ANIM_Magikoopa_Yellow_Anim06) + ExecWait(EVS_Enemy_BurnHit) + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Yellow_Anim05) + SetConst(LVar2, ANIM_Magikoopa_Yellow_Anim06) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Yellow_Anim06) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Yellow_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Yellow_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Yellow_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Yellow_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Yellow_Anim04) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Yellow_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Yellow_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim04) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim02) + ExecWait(N(EVS_Flee)) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Yellow_Anim02) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, 0, 2, 0) + Else + Call(SetPartDispOffset, ACTOR_SELF, PRT_GROUND, -4, 5, 0) + EndIf + EndIf + SetConst(LVar0, PRT_GROUND) + SetConst(LVar1, ANIM_Magikoopa_Yellow_Anim04) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; #include "common/GetSelectedMoveID.inc.c" EvtScript N(EVS_KnockDownCheck) = { - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_NOT_FLAG(LVar0, BS_FLAGS1_PARTNER_ACTING) - EVT_IF_FLAG(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE) - EVT_END_IF - EVT_ELSE - EVT_CALL(N(GetSelectedMoveID), LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(MOVE_HEADBONK1) - EVT_CASE_OR_EQ(MOVE_HEADBONK2) - EVT_CASE_OR_EQ(MOVE_HEADBONK3) - EVT_CASE_OR_EQ(MOVE_MULTIBONK) - EVT_CALL(GetBattleFlags, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetBattleFlags, LVar0) + IfNotFlag(LVar0, BS_FLAGS1_PARTNER_ACTING) + IfFlag(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE) + EndIf + Else + Call(N(GetSelectedMoveID), LVar0) + Switch(LVar0) + CaseOrEq(MOVE_HEADBONK1) + CaseOrEq(MOVE_HEADBONK2) + CaseOrEq(MOVE_HEADBONK3) + CaseOrEq(MOVE_MULTIBONK) + Call(GetBattleFlags, LVar0) + IfFlag(LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT) + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, TRUE) + EndIf + EndCaseGroup + EndSwitch + EndIf + Return + End }; #include "common/battle/SetAbsoluteStatusOffsets.inc.c" #include "common/StartRumbleWithParams.inc.c" EvtScript N(EVS_KnockDown) = { - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim04) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetLastElement, LVar0) - EVT_IF_FLAG(LVar0, DAMAGE_TYPE_POW) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim04) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_LABEL(0) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartScale, ACTOR_SELF, PRT_BROOM, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_END_IF - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 1) - EVT_CALL(SetPartPos, ACTOR_SELF, PRT_BROOM, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(N(StartRumbleWithParams), 150, 10) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(0.7)) - EVT_END_THREAD - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar3) - EVT_IF_EQ(LVar3, EVENT_15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim04) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_ADD(LVar4, 10) - EVT_ADD(LVar5, 5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, EVT_FLOAT(1.0), 10, 0) - EVT_END_IF - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_LOOP(20) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim01) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorType, ACTOR_SELF, ACTOR_TYPE_YELLOW_MAGIKOOPA) - EVT_CALL(SetStatusTable, ACTOR_SELF, EVT_PTR(N(StatusTable))) - EVT_CALL(N(SetAbsoluteStatusOffsets), -10, 20, 10, 32) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) - EVT_CALL(ResetAllActorSounds, ACTOR_SELF) - EVT_CALL(GetIndexFromPos, ACTOR_SELF, LVar0) - EVT_MOD(LVar0, 4) - EVT_CALL(SetGoalToIndex, ACTOR_SELF, LVar0) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(GetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, LVar0) + IfEq(LVar0, 1) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim04) + Goto(0) + EndIf + Call(GetLastElement, LVar0) + IfFlag(LVar0, DAMAGE_TYPE_POW) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim04) + Goto(0) + EndIf + Return + Label(0) + Call(HideHealthBar, ACTOR_SELF) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartScale, ACTOR_SELF, PRT_BROOM, Float(0.4), Float(0.4), Float(0.4)) + EndIf + Call(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_PRIMARY_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_GROUND, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_INVISIBLE | ACTOR_PART_FLAG_NO_TARGET, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_FLYING, ACTOR_PART_FLAG_PRIMARY_TARGET, FALSE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION, TRUE) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar2, 1) + Call(SetPartPos, ACTOR_SELF, PRT_BROOM, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FALL_QUICK) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(N(StartRumbleWithParams), 150, 10) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.7)) + EndThread + Call(GetLastEvent, ACTOR_SELF, LVar3) + IfEq(LVar3, EVENT_15) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim04) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Add(LVar4, 10) + Add(LVar5, 5) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar3, LVar4, LVar5, Float(1.0), 10, 0) + EndIf + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Loop(20) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Wait(1) + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_SELF, PRT_BROOM, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim01) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_FLYING, FALSE) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorType, ACTOR_SELF, ACTOR_TYPE_YELLOW_MAGIKOOPA) + Call(SetStatusTable, ACTOR_SELF, Ref(N(StatusTable))) + Call(N(SetAbsoluteStatusOffsets), -10, 20, 10, 32) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_TYPE_CHANGED, TRUE) + Call(ResetAllActorSounds, ACTOR_SELF) + Call(GetIndexFromPos, ACTOR_SELF, LVar0) + Mod(LVar0, 4) + Call(SetGoalToIndex, ACTOR_SELF, LVar0) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(ForceHomePos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(HPBarToHome, ACTOR_SELF) + Return + End }; EvtScript N(EVS_HandleEvent_Flying) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVENT_HIT_COMBO) - EVT_EXEC_WAIT(N(EVS_KnockDownCheck)) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CASE_OR_EQ(EVENT_FALL_TRIGGER) - EVT_EXEC_WAIT(N(EVS_KnockDownCheck)) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_BURN_HIT) - EVT_CASE_OR_EQ(EVENT_15) - EVT_EXEC_WAIT(N(EVS_KnockDownCheck)) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim05) - EVT_SET_CONST(LVar2, ANIM_FlyingMagikoopa_Yellow_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_EXEC_WAIT(N(EVS_KnockDown)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim05) - EVT_SET_CONST(LVar2, ANIM_FlyingMagikoopa_Yellow_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_BurnHit) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim06) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_SPIN_SMASH_HIT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_CASE_EQ(EVENT_SPIN_SMASH_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmashHit) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CASE_OR_EQ(EVENT_AIR_LIFT_FAILED) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_WAIT(10) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_Death) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_FIRST_STRIKE) - EVT_CALL(SetActorPos, ACTOR_SELF, 20, 0, 0) - EVT_CALL(HPBarToCurrent, ACTOR_SELF) - EVT_CASE_EQ(EVENT_END_FIRST_STRIKE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Yellow_Anim01) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Yellow_Anim01) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim01) - EVT_EXEC_WAIT(EVS_Enemy_Recover) - EVT_CASE_EQ(EVENT_SCARE_AWAY) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Yellow_Anim04) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.5)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Yellow_Anim02) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_CASE_EQ(EVENT_BEGIN_AIR_LIFT) - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim02) - EVT_EXEC_WAIT(EVS_Enemy_AirLift) - EVT_CASE_EQ(EVENT_BLOW_AWAY) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_IF_FLAG(LVar0, STATUS_FLAG_SHRINK) - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -3, 0, 0) - EVT_ELSE - EVT_CALL(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -15, 0, 0) - EVT_END_IF - EVT_END_IF - EVT_SET_CONST(LVar0, PRT_FLYING) - EVT_SET_CONST(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04) - EVT_EXEC_WAIT(EVS_Enemy_BlowAway) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(GetLastEvent, ACTOR_SELF, LVar0) + Switch(LVar0) + CaseEq(EVENT_HIT_COMBO) + ExecWait(N(EVS_KnockDownCheck)) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04) + ExecWait(EVS_Enemy_Hit) + CaseOrEq(EVENT_HIT) + CaseOrEq(EVENT_FALL_TRIGGER) + ExecWait(N(EVS_KnockDownCheck)) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04) + ExecWait(EVS_Enemy_Hit) + ExecWait(N(EVS_KnockDown)) + EndCaseGroup + CaseOrEq(EVENT_BURN_HIT) + CaseOrEq(EVENT_15) + ExecWait(N(EVS_KnockDownCheck)) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim05) + SetConst(LVar2, ANIM_FlyingMagikoopa_Yellow_Anim06) + ExecWait(EVS_Enemy_BurnHit) + ExecWait(N(EVS_KnockDown)) + EndCaseGroup + CaseEq(EVENT_BURN_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim05) + SetConst(LVar2, ANIM_FlyingMagikoopa_Yellow_Anim06) + ExecWait(EVS_Enemy_BurnHit) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim06) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_SPIN_SMASH_HIT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + CaseEq(EVENT_SPIN_SMASH_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04) + ExecWait(EVS_Enemy_SpinSmashHit) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + CaseOrEq(EVENT_AIR_LIFT_FAILED) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim01) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_DEATH) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04) + ExecWait(EVS_Enemy_Hit) + Wait(10) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04) + ExecWait(EVS_Enemy_Death) + Return + CaseEq(EVENT_BEGIN_FIRST_STRIKE) + Call(SetActorPos, ACTOR_SELF, 20, 0, 0) + Call(HPBarToCurrent, ACTOR_SELF) + CaseEq(EVENT_END_FIRST_STRIKE) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Yellow_Anim01) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(FlyToGoal, ACTOR_SELF, 0, 1, EASING_LINEAR) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Yellow_Anim01) + Call(HPBarToHome, ACTOR_SELF) + CaseEq(EVENT_RECOVER_STATUS) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim01) + ExecWait(EVS_Enemy_Recover) + CaseEq(EVENT_SCARE_AWAY) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Yellow_Anim04) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.5)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Wait(15) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Yellow_Anim02) + ExecWait(N(EVS_Flee)) + Return + CaseEq(EVENT_BEGIN_AIR_LIFT) + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim02) + ExecWait(EVS_Enemy_AirLift) + CaseEq(EVENT_BLOW_AWAY) + Call(GetStatusFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + IfFlag(LVar0, STATUS_FLAG_SHRINK) + Call(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -3, 0, 0) + Else + Call(SetPartDispOffset, ACTOR_SELF, PRT_FLYING, -15, 0, 0) + EndIf + EndIf + SetConst(LVar0, PRT_FLYING) + SetConst(LVar1, ANIM_FlyingMagikoopa_Yellow_Anim04) + ExecWait(EVS_Enemy_BlowAway) + Return + CaseDefault + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_MagicBlast) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(GetBattlePhase, LVar0) - EVT_IF_EQ(LVar0, PHASE_FIRST_STRIKE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 1) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 12) - EVT_ADD(LVar1, 14) - EVT_ELSE - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 36) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.5), 30, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Yellow_Anim02) - EVT_WAIT(30) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Yellow_Anim03) - EVT_WAIT(5) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar9) - EVT_IF_FLAG(LVar9, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 8) - EVT_ADD(LVar1, 8) - EVT_ELSE - EVT_SUB(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_END_IF - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 50) - EVT_SET(LVar4, 0) - EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 25) - EVT_WAIT(50) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(14) - EVT_CALL(YieldTurn) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT) - EVT_WAIT(30) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Yellow_Anim03) - EVT_WAIT(5) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 8) - EVT_ADD(LVar1, 8) - EVT_ELSE - EVT_SUB(LVar0, 20) - EVT_ADD(LVar1, 20) - EVT_END_IF - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 10) - EVT_CALL(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 20) - EVT_WAIT(18) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_MAGIC_BLAST, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_WAIT(19) - EVT_CALL(YieldTurn) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(GetBattlePhase, LVar0) + IfEq(LVar0, PHASE_FIRST_STRIKE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 1) + Else + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + EndIf + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST1) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 12) + Add(LVar1, 14) + Else + Sub(LVar0, 30) + Add(LVar1, 36) + EndIf + PlayEffect(EFFECT_GATHER_MAGIC, 0, LVar0, LVar1, LVar2, Float(0.5), 30, 0) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Yellow_Anim02) + Wait(30) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Yellow_Anim03) + Wait(5) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVar9) + IfFlag(LVar9, STATUS_FLAG_SHRINK) + Sub(LVar0, 8) + Add(LVar1, 8) + Else + Sub(LVar0, 20) + Add(LVar1, 20) + EndIf + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Sub(LVar3, 50) + Set(LVar4, 0) + Call(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 25) + Wait(50) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(14) + Call(YieldTurn) + Call(AddActorDecoration, ACTOR_SELF, PRT_FLYING, 0, ACTOR_DECORATION_SWEAT) + Wait(30) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_FLYING, 0) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_SPELL_CAST2) + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Yellow_Anim03) + Wait(5) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 8) + Add(LVar1, 8) + Else + Sub(LVar0, 20) + Add(LVar1, 20) + EndIf + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Sub(LVar3, 10) + Call(N(ShrinkActor), LVar0, LVar1, LVar5, LVar3, LVar4, LVar5, 20) + Wait(18) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_MAGIC | DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_MAGIC_BLAST, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Wait(19) + Call(YieldTurn) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Attack_WandStrike) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_VANISH) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim02) - EVT_SET(LVar0, 200) - EVT_LOOP(20) - EVT_SUB(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_ADD(LVar0, 5) - EVT_ELSE - EVT_ADD(LVar0, 25) - EVT_END_IF - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_SET(LVar0, 55) - EVT_LOOP(20) - EVT_ADD(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim03) - EVT_WAIT(11) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_WAND_STRIKE) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_MISS) - EVT_CASE_OR_EQ(HIT_RESULT_LUCKY) - EVT_SET(LVarA, LVar0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_IF_EQ(LVarA, HIT_RESULT_LUCKY) - EVT_CALL(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) - EVT_END_IF - EVT_WAIT(15) - EVT_SET(LVar0, 200) - EVT_LOOP(20) - EVT_SUB(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(YieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim01) - EVT_CALL(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) - EVT_SET(LVar0, 55) - EVT_LOOP(20) - EVT_ADD(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_WAIT(2) - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_WAND_STRIKE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(10) - EVT_SET(LVar0, 200) - EVT_LOOP(20) - EVT_SUB(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(YieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim01) - EVT_CALL(FlyToGoal, ACTOR_SELF, 20, 0, EASING_COS_IN_OUT) - EVT_SET(LVar0, 55) - EVT_LOOP(20) - EVT_ADD(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_VANISH) + Thread + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim02) + Set(LVar0, 200) + Loop(20) + Sub(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + EndThread + Wait(10) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Add(LVar0, 5) + Else + Add(LVar0, 25) + EndIf + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + Set(LVar0, 55) + Loop(20) + Add(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim03) + Wait(11) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_WAND_STRIKE) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_MISS) + CaseOrEq(HIT_RESULT_LUCKY) + Set(LVarA, LVar0) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + IfEq(LVarA, HIT_RESULT_LUCKY) + Call(EnemyTestTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_TRIGGER_LUCKY, 0, 0, 0) + EndIf + Wait(15) + Set(LVar0, 200) + Loop(20) + Sub(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + Call(YieldTurn) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim01) + Call(FlyToGoal, ACTOR_SELF, 30, 0, EASING_COS_IN_OUT) + Set(LVar0, 55) + Loop(20) + Add(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + EndCaseGroup + EndSwitch + Call(SetGoalToTarget, ACTOR_SELF) + Wait(2) + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, 0, DMG_WAND_STRIKE, BS_FLAGS1_TRIGGER_EVENTS) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(10) + Set(LVar0, 200) + Loop(20) + Sub(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + Call(YieldTurn) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim01) + Call(FlyToGoal, ACTOR_SELF, 20, 0, EASING_COS_IN_OUT) + Set(LVar0, 55) + Loop(20) + Add(LVar0, 10) + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_SELF, PRT_GROUND, 255) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; EvtScript N(EVS_Flee) = { - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_IF_NE(LVar0, EVENT_SCARE_AWAY) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_01) - EVT_END_IF - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_WAIT(10) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 200) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_CALL(YieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_EXEC_WAIT(EVS_ForceNextTarget) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(HideHealthBar, ACTOR_SELF) + Call(GetLastEvent, ACTOR_SELF, LVar0) + IfNe(LVar0, EVENT_SCARE_AWAY) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_PRESET_01) + EndIf + Call(SetActorSpeed, ACTOR_SELF, Float(1.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Wait(10) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetActorSpeed, ACTOR_SELF, Float(10.0)) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 200) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + Call(YieldTurn) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ExecWait(EVS_ForceNextTarget) + Call(HideHealthBar, ACTOR_SELF) + Call(RemoveActor, ACTOR_SELF) + Return + End }; EvtScript N(EVS_Init) = { - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE) - EVT_RETURN - EVT_END + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar0) + IfEq(LVar0, 0) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE) + Return + End }; EvtScript N(EVS_Init_Flying) = { - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent_Flying))) - EVT_CALL(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE) - EVT_RETURN - EVT_END + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent_Flying))) + Call(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar0) + IfEq(LVar0, 0) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_ShouldKnockDown, FALSE) + Return + End }; #include "common/battle/CheckMagikoopaCastTarget.inc.c" EvtScript N(EVS_TakeTurn) = { - EVT_SET(LFlag0, FALSE) - EVT_LABEL(10) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetIndexFromHome, LVar0, LVar1) - EVT_CALL(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar2) - EVT_IF_GT(LVar1, LVar2) - EVT_CALL(N(CheckMagikoopaCastTarget), LVar0, LVar3) - EVT_IF_EQ(LVar3, 0) - EVT_CALL(GetStatusFlags, LVar0, LVar4) - EVT_IF_NOT_FLAG(LVar4, STATUS_FLAG_STATIC | STATUS_FLAG_TRANSPARENT) - EVT_SET(LVar8, LVar0) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar1) - EVT_GOTO(100) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_SET(LFlag0, TRUE) - EVT_CALL(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_Flee)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_EXEC_WAIT(N(EVS_Attack_MagicBlast)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Attack_WandStrike)) - EVT_END_IF - EVT_RETURN - EVT_LABEL(100) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(15) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim02) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Yellow_Anim02) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_ELECTRIFY) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 6) - EVT_ADD(LVar1, 12) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 16) - EVT_ADD(LVar1, 31) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVarA) - EVT_IF_FLAG(LVarA, STATUS_FLAG_SHRINK) - EVT_SUB(LVar0, 12) - EVT_ADD(LVar1, 14) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.12), 30, 0) - EVT_ELSE - EVT_SUB(LVar0, 30) - EVT_ADD(LVar1, 36) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30, 0) - EVT_END_IF - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_NOT_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim01) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Yellow_Anim01) - EVT_END_IF - EVT_WAIT(5) - EVT_THREAD - EVT_WAIT(10) - EVT_LOOP(4) - EVT_CALL(PlaySoundAtActor, LVar8, SOUND_ELECTRIC_BUZZ) - EVT_CALL(RandInt, 3, LVar0) - EVT_ADD(LVar0, 3) - EVT_WAIT(LVar0) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(ElectrifyActor, LVar8, 3) - EVT_CALL(FreezeBattleState, FALSE) - EVT_END_THREAD - EVT_CALL(WaitForBuffDone) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(10) - EVT_CALL(YieldTurn) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Set(LFlag0, FALSE) + Label(10) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetIndexFromHome, LVar0, LVar1) + Call(GetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar2) + IfGt(LVar1, LVar2) + Call(N(CheckMagikoopaCastTarget), LVar0, LVar3) + IfEq(LVar3, 0) + Call(GetStatusFlags, LVar0, LVar4) + IfNotFlag(LVar4, STATUS_FLAG_STATIC | STATUS_FLAG_TRANSPARENT) + Set(LVar8, LVar0) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, LVar1) + Goto(100) + EndIf + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + IfEq(LFlag0, FALSE) + Set(LFlag0, TRUE) + Call(SetBattleVar, BTL_VAR_Magikoopa_LastIndexBoosted, -1) + Goto(10) + EndIf + Call(CountTargets, ACTOR_SELF, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY, LVar0) + IfEq(LVar0, 1) + ExecWait(N(EVS_Flee)) + Return + EndIf + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, ACTOR_FLAG_FLYING) + ExecWait(N(EVS_Attack_MagicBlast)) + Else + ExecWait(N(EVS_Attack_WandStrike)) + EndIf + Return + Label(100) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_DISABLE) + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 15) + Wait(15) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim02) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Yellow_Anim02) + EndIf + Wait(5) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_MAGIKOOPA_ELECTRIFY) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 6) + Add(LVar1, 12) + Sub(LVar2, 2) + PlayEffect(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 16) + Add(LVar1, 31) + Sub(LVar2, 2) + PlayEffect(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + Else + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetStatusFlags, ACTOR_SELF, LVarA) + IfFlag(LVarA, STATUS_FLAG_SHRINK) + Sub(LVar0, 12) + Add(LVar1, 14) + Sub(LVar2, 2) + PlayEffect(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, Float(0.12), 30, 0) + Else + Sub(LVar0, 30) + Add(LVar1, 36) + Sub(LVar2, 2) + PlayEffect(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, Float(0.3), 30, 0) + EndIf + EndIf + Wait(30) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfNotFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetAnimation, ACTOR_SELF, PRT_GROUND, ANIM_Magikoopa_Yellow_Anim01) + Else + Call(SetAnimation, ACTOR_SELF, PRT_FLYING, ANIM_FlyingMagikoopa_Yellow_Anim01) + EndIf + Wait(5) + Thread + Wait(10) + Loop(4) + Call(PlaySoundAtActor, LVar8, SOUND_ELECTRIC_BUZZ) + Call(RandInt, 3, LVar0) + Add(LVar0, 3) + Wait(LVar0) + EndLoop + EndThread + Thread + Call(FreezeBattleState, TRUE) + Call(ElectrifyActor, LVar8, 3) + Call(FreezeBattleState, FALSE) + EndThread + Call(WaitForBuffDone) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(10) + Call(YieldTurn) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/common/move/HammerSupport.inc.c b/src/battle/common/move/HammerSupport.inc.c index 75bb7c744a7..798d5d30266 100644 --- a/src/battle/common/move/HammerSupport.inc.c +++ b/src/battle/common/move/HammerSupport.inc.c @@ -7,589 +7,589 @@ #include "world/common/todo/ShouldMovesAutoSucceed.inc.c" EvtScript N(EVS_HammerSupport_A) = { - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 32) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_ATTACK_APPROACH) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(5.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(PlayerRunToGoal, 0) - EVT_RETURN - EVT_END + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 32) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(UseBattleCamPreset, BTL_CAM_PLAYER_ATTACK_APPROACH) + Call(SetActorSpeed, ACTOR_PLAYER, Float(5.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(PlayerRunToGoal, 0) + Return + End }; EvtScript N(EVS_HammerSupport_B) = { - EVT_CALL(SetGoalPos, ACTOR_PLAYER, -33, 0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_ATTACK_APPROACH) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(5.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(PlayerRunToGoal, 0) - EVT_RETURN - EVT_END + Call(SetGoalPos, ACTOR_PLAYER, -33, 0, 0) + Call(UseBattleCamPreset, BTL_CAM_PLAYER_ATTACK_APPROACH) + Call(SetActorSpeed, ACTOR_PLAYER, Float(5.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(PlayerRunToGoal, 0) + Return + End }; EvtScript N(EVS_HammerSupport_C) = { - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(10) - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_ADD(LVar1, 1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_Begin) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_Begin) - EVT_SWITCH(LVar1) - EVT_CASE_LT(3) - EVT_WAIT(4) - EVT_CASE_LT(5) - EVT_WAIT(3) - EVT_CASE_LT(7) - EVT_WAIT(2) - EVT_CASE_LT(9) - EVT_WAIT(1) - EVT_CASE_LT(11) - EVT_WAIT(0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) + Set(LVar1, 0) + Loop(10) + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfEq(LVar0, TRUE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + BreakLoop + EndIf + Wait(1) + Add(LVar1, 1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_Begin) + EndLoop + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_Begin) + Switch(LVar1) + CaseLt(3) + Wait(4) + CaseLt(5) + Wait(3) + CaseLt(7) + Wait(2) + CaseLt(9) + Wait(1) + CaseLt(11) + Wait(0) + EndSwitch + Return + End }; EvtScript N(EVS_HammerSupport_D) = { - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(10) - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_ADD(LVar1, 1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash2_Begin) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash2_Begin) - EVT_SWITCH(LVar1) - EVT_CASE_LT(3) - EVT_WAIT(4) - EVT_CASE_LT(5) - EVT_WAIT(3) - EVT_CASE_LT(7) - EVT_WAIT(2) - EVT_CASE_LT(9) - EVT_WAIT(1) - EVT_CASE_LT(11) - EVT_WAIT(0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) + Set(LVar1, 0) + Loop(10) + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfEq(LVar0, TRUE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + BreakLoop + EndIf + Wait(1) + Add(LVar1, 1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash2_Begin) + EndLoop + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash2_Begin) + Switch(LVar1) + CaseLt(3) + Wait(4) + CaseLt(5) + Wait(3) + CaseLt(7) + Wait(2) + CaseLt(9) + Wait(1) + CaseLt(11) + Wait(0) + EndSwitch + Return + End }; EvtScript N(EVS_HammerSupport_E) = { - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(10) - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_ADD(LVar1, 1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash3_Begin) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash3_Begin) - EVT_SWITCH(LVar1) - EVT_CASE_LT(3) - EVT_WAIT(4) - EVT_CASE_LT(5) - EVT_WAIT(3) - EVT_CASE_LT(7) - EVT_WAIT(2) - EVT_CASE_LT(9) - EVT_WAIT(1) - EVT_CASE_LT(11) - EVT_WAIT(0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) + Set(LVar1, 0) + Loop(10) + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfEq(LVar0, TRUE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + BreakLoop + EndIf + Wait(1) + Add(LVar1, 1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash3_Begin) + EndLoop + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash3_Begin) + Switch(LVar1) + CaseLt(3) + Wait(4) + CaseLt(5) + Wait(3) + CaseLt(7) + Wait(2) + CaseLt(9) + Wait(1) + CaseLt(11) + Wait(0) + EndSwitch + Return + End }; EvtScript N(EVS_HammerSupport_F) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_AIM_HAMMER) - EVT_CALL(SetBattleCamOffsetZ, 8) - EVT_CALL(InitTargetIterator) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_WINDUP) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_PullBack) - EVT_WAIT(4) - EVT_CALL(action_command_hammer_start, 0, 36, 3) - EVT_CALL(SetActionQuality, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_Hold1) - EVT_SET(LVar1, 0) - EVT_LOOP(30) - EVT_WAIT(1) - EVT_CALL(GetActionQuality, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_IF_NE(LVar1, 1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_Hold2) - EVT_SET(LVar1, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_PreSwing) - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_Swing) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_PLAYER_AIM_HAMMER) + Call(SetBattleCamOffsetZ, 8) + Call(InitTargetIterator) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_WINDUP) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_PullBack) + Wait(4) + Call(action_command_hammer_start, 0, 36, 3) + Call(SetActionQuality, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_Hold1) + Set(LVar1, 0) + Loop(30) + Wait(1) + Call(GetActionQuality, LVar0) + IfNe(LVar0, 0) + IfNe(LVar1, 1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_Hold2) + Set(LVar1, 1) + EndIf + EndIf + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfEq(LVar0, FALSE) + BreakLoop + EndIf + EndLoop + Label(0) + Wait(1) + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfEq(LVar0, TRUE) + Goto(0) + EndIf + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_PreSwing) + Wait(3) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_Swing) + Call(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) + Return + End }; EvtScript N(EVS_Hammer_ReturnHome_A) = { - EVT_CALL(PlayerYieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_04) - EVT_CALL(MoveBattleCamOver, 5) - EVT_CALL(func_802693F0) - EVT_WAIT(20) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_RESET) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_WAIT(5) - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(PlayerRunToGoal, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_RETURN - EVT_END + Call(PlayerYieldTurn) + Call(UseBattleCamPreset, BTL_CAM_PRESET_04) + Call(MoveBattleCamOver, 5) + Call(func_802693F0) + Wait(20) + Call(EnablePlayerBlur, ACTOR_BLUR_RESET) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Wait(5) + Call(SetGoalToHome, ACTOR_PLAYER) + Call(SetActorSpeed, ACTOR_PLAYER, Float(8.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(PlayerRunToGoal, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Return + End }; EvtScript N(EVS_Hammer_ReturnHome_B) = { - EVT_CALL(PlayerYieldTurn) - EVT_CALL(func_802693F0) - EVT_WAIT(20) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_RESET) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_WAIT(5) - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(PlayerRunToGoal, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_RETURN - EVT_END + Call(PlayerYieldTurn) + Call(func_802693F0) + Wait(20) + Call(EnablePlayerBlur, ACTOR_BLUR_RESET) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Wait(5) + Call(SetGoalToHome, ACTOR_PLAYER) + Call(SetActorSpeed, ACTOR_PLAYER, Float(8.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(PlayerRunToGoal, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Return + End }; EvtScript N(EVS_Hammer_ReturnHome_C) = { - EVT_CALL(PlayerYieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_29) - EVT_CALL(func_802693F0) - EVT_WAIT(20) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_RESET) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_WAIT(5) - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(PlayerRunToGoal, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_RETURN - EVT_END + Call(PlayerYieldTurn) + Call(UseBattleCamPreset, BTL_CAM_PRESET_29) + Call(func_802693F0) + Wait(20) + Call(EnablePlayerBlur, ACTOR_BLUR_RESET) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Wait(5) + Call(SetGoalToHome, ACTOR_PLAYER) + Call(SetActorSpeed, ACTOR_PLAYER, Float(8.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(PlayerRunToGoal, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Return + End }; EvtScript N(EVS_UseBasicHammer) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH) - EVT_CALL(action_command_hammer_init) - EVT_EXEC_WAIT(N(EVS_HammerSupport_A)) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) - EVT_EXEC_WAIT(N(EVS_HammerSupport_C)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 0, 0, 0, 16) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_AIM_HAMMER) - EVT_CALL(SetBattleCamOffsetZ, 8) - EVT_CALL(InitTargetIterator) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_WINDUP) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_PullBack) - EVT_WAIT(4) - EVT_CALL(N(IsBerserkerEquipped)) - EVT_IF_NE(LVar0, HIT_RESULT_HIT) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_Hold1) - EVT_CALL(GetActionCommandMode, LVar0) - EVT_IF_LT(LVar0, 2) - EVT_CALL(N(ShouldMovesAutoSucceed)) - EVT_IF_EQ(LVar0, 0) - EVT_LOOP(45) - EVT_WAIT(1) - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_END_IF - EVT_ADD(LVarD, 6) - EVT_CALL(action_command_hammer_start, 0, LVarD, 3) - EVT_CALL(SetActionQuality, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(30) - EVT_WAIT(1) - EVT_CALL(GetActionQuality, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_IF_NE(LVar1, 1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_Hold2) - EVT_SET(LVar1, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LABEL(0) - EVT_CALL(GetActionCommandMode, LVar0) - EVT_IF_LT(LVar0, 2) - EVT_WAIT(1) - EVT_CALL(GetActionSuccess, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_ELSE - EVT_CALL(action_command_hammer_start, 0, LVar1, 3) - EVT_CALL(SetActionQuality, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_Hold1) - EVT_SUB(LVar1, 10) - EVT_WAIT(LVar1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_Hold2) - EVT_WAIT(5) - EVT_END_IF - EVT_CALL(GetActionCommandMode, LVar0) - EVT_IF_EQ(LVar0, 2) - EVT_CALL(SetActionCommandMode, 3) - EVT_LOOP(0) - EVT_CALL(GetActionCommandMode, LVar0) - EVT_IF_LT(LVar0, 2) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_PreSwing) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_SWING_1) - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_Swing) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_1) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_SMASH) + Call(action_command_hammer_init) + ExecWait(N(EVS_HammerSupport_A)) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) + ExecWait(N(EVS_HammerSupport_C)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 0, 0, 0, 16) + Call(UseBattleCamPreset, BTL_CAM_PLAYER_AIM_HAMMER) + Call(SetBattleCamOffsetZ, 8) + Call(InitTargetIterator) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_WINDUP) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_PullBack) + Wait(4) + Call(N(IsBerserkerEquipped)) + IfNe(LVar0, HIT_RESULT_HIT) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_Hold1) + Call(GetActionCommandMode, LVar0) + IfLt(LVar0, 2) + Call(N(ShouldMovesAutoSucceed)) + IfEq(LVar0, 0) + Loop(45) + Wait(1) + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfNe(LVar0, FALSE) + BreakLoop + EndIf + EndLoop + EndIf + EndIf + Add(LVarD, 6) + Call(action_command_hammer_start, 0, LVarD, 3) + Call(SetActionQuality, 0) + Set(LVar1, 0) + Loop(30) + Wait(1) + Call(GetActionQuality, LVar0) + IfNe(LVar0, 0) + IfNe(LVar1, 1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_Hold2) + Set(LVar1, 1) + EndIf + EndIf + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfEq(LVar0, FALSE) + BreakLoop + EndIf + EndLoop + Label(0) + Call(GetActionCommandMode, LVar0) + IfLt(LVar0, 2) + Wait(1) + Call(GetActionSuccess, LVar0) + IfEq(LVar0, 0) + Goto(0) + EndIf + EndIf + Else + Call(action_command_hammer_start, 0, LVar1, 3) + Call(SetActionQuality, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_Hold1) + Sub(LVar1, 10) + Wait(LVar1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_Hold2) + Wait(5) + EndIf + Call(GetActionCommandMode, LVar0) + IfEq(LVar0, 2) + Call(SetActionCommandMode, 3) + Loop(0) + Call(GetActionCommandMode, LVar0) + IfLt(LVar0, 2) + BreakLoop + EndIf + Wait(1) + EndLoop + EndIf + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_PreSwing) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_SWING_1) + Wait(3) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_Swing) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_1) + Return + End }; EvtScript N(EVS_UseSuperHammer) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH) - EVT_CALL(action_command_hammer_init) - EVT_EXEC_WAIT(N(EVS_HammerSupport_A)) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) - EVT_EXEC_WAIT(N(EVS_HammerSupport_D)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 0, 0, 0, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_AIM_HAMMER) - EVT_CALL(SetBattleCamOffsetZ, 8) - EVT_CALL(InitTargetIterator) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_WINDUP) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash2_PullBack) - EVT_WAIT(4) - EVT_CALL(N(IsBerserkerEquipped)) - EVT_IF_EQ(LVar0, TRUE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash2_Hold1) - EVT_CALL(N(ShouldMovesAutoSucceed)) - EVT_IF_EQ(LVar0, HIT_RESULT_HIT) - EVT_LOOP(45) - EVT_WAIT(1) - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_ADD(LVarD, 6) - EVT_CALL(action_command_hammer_start, 0, LVarD, 3) - EVT_CALL(SetActionQuality, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(30) - EVT_WAIT(1) - EVT_CALL(GetActionQuality, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_IF_NE(LVar1, 1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash2_Hold2) - EVT_SET(LVar1, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(GetActionSuccess, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_ELSE - EVT_CALL(action_command_hammer_start, 0, LVar1, 3) - EVT_CALL(SetActionQuality, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash2_Hold1) - EVT_SUB(LVar1, 10) - EVT_WAIT(LVar1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash2_Hold2) - EVT_WAIT(5) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash2_PreSwing) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_SWING_2) - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash2_Swing) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_2) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_SMASH) + Call(action_command_hammer_init) + ExecWait(N(EVS_HammerSupport_A)) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) + ExecWait(N(EVS_HammerSupport_D)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 0, 0, 0, BS_FLAGS1_INCLUDE_POWER_UPS) + Call(UseBattleCamPreset, BTL_CAM_PLAYER_AIM_HAMMER) + Call(SetBattleCamOffsetZ, 8) + Call(InitTargetIterator) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_WINDUP) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash2_PullBack) + Wait(4) + Call(N(IsBerserkerEquipped)) + IfEq(LVar0, TRUE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash2_Hold1) + Call(N(ShouldMovesAutoSucceed)) + IfEq(LVar0, HIT_RESULT_HIT) + Loop(45) + Wait(1) + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfNe(LVar0, FALSE) + BreakLoop + EndIf + EndLoop + EndIf + Add(LVarD, 6) + Call(action_command_hammer_start, 0, LVarD, 3) + Call(SetActionQuality, 0) + Set(LVar1, 0) + Loop(30) + Wait(1) + Call(GetActionQuality, LVar0) + IfNe(LVar0, 0) + IfNe(LVar1, 1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash2_Hold2) + Set(LVar1, 1) + EndIf + EndIf + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfEq(LVar0, FALSE) + BreakLoop + EndIf + EndLoop + Label(0) + Wait(1) + Call(GetActionSuccess, LVar0) + IfEq(LVar0, 0) + Goto(0) + EndIf + Else + Call(action_command_hammer_start, 0, LVar1, 3) + Call(SetActionQuality, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash2_Hold1) + Sub(LVar1, 10) + Wait(LVar1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash2_Hold2) + Wait(5) + EndIf + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash2_PreSwing) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_SWING_2) + Wait(3) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash2_Swing) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_2) + Return + End }; EvtScript N(EVS_UseUltraHammer) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH) - EVT_CALL(action_command_hammer_init) - EVT_EXEC_WAIT(N(EVS_HammerSupport_A)) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) - EVT_EXEC_WAIT(N(EVS_HammerSupport_E)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 0, 0, 0, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_AIM_HAMMER) - EVT_CALL(SetBattleCamOffsetZ, 8) - EVT_CALL(InitTargetIterator) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_WINDUP) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash3_PullBack) - EVT_WAIT(4) - EVT_CALL(N(IsBerserkerEquipped)) - EVT_IF_EQ(LVar0, TRUE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash3_Hold1) - EVT_CALL(N(ShouldMovesAutoSucceed)) - EVT_IF_EQ(LVar0, HIT_RESULT_HIT) - EVT_LOOP(45) - EVT_WAIT(1) - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_ADD(LVarD, 6) - EVT_CALL(action_command_hammer_start, 0, LVarD, 3) - EVT_CALL(SetActionQuality, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(30) - EVT_WAIT(1) - EVT_CALL(GetActionQuality, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_IF_NE(LVar1, 1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash3_Hold2) - EVT_SET(LVar1, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(GetActionSuccess, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_ELSE - EVT_CALL(action_command_hammer_start, 0, LVar1, 3) - EVT_CALL(SetActionQuality, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash3_Hold1) - EVT_SUB(LVar1, 10) - EVT_WAIT(LVar1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash3_Hold2) - EVT_WAIT(5) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash3_PreSwing) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_SWING_3) - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash3_Swing) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_3) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_SMASH) + Call(action_command_hammer_init) + ExecWait(N(EVS_HammerSupport_A)) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) + ExecWait(N(EVS_HammerSupport_E)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 0, 0, 0, BS_FLAGS1_INCLUDE_POWER_UPS) + Call(UseBattleCamPreset, BTL_CAM_PLAYER_AIM_HAMMER) + Call(SetBattleCamOffsetZ, 8) + Call(InitTargetIterator) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_WINDUP) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash3_PullBack) + Wait(4) + Call(N(IsBerserkerEquipped)) + IfEq(LVar0, TRUE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash3_Hold1) + Call(N(ShouldMovesAutoSucceed)) + IfEq(LVar0, HIT_RESULT_HIT) + Loop(45) + Wait(1) + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfNe(LVar0, FALSE) + BreakLoop + EndIf + EndLoop + EndIf + Add(LVarD, 6) + Call(action_command_hammer_start, 0, LVarD, 3) + Call(SetActionQuality, 0) + Set(LVar1, 0) + Loop(30) + Wait(1) + Call(GetActionQuality, LVar0) + IfNe(LVar0, 0) + IfNe(LVar1, 1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash3_Hold2) + Set(LVar1, 1) + EndIf + EndIf + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfEq(LVar0, FALSE) + BreakLoop + EndIf + EndLoop + Label(0) + Wait(1) + Call(GetActionSuccess, LVar0) + IfEq(LVar0, 0) + Goto(0) + EndIf + Else + Call(action_command_hammer_start, 0, LVar1, 3) + Call(SetActionQuality, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash3_Hold1) + Sub(LVar1, 10) + Wait(LVar1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash3_Hold2) + Wait(5) + EndIf + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash3_PreSwing) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_SWING_3) + Wait(3) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash3_Swing) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_3) + Return + End }; EvtScript N(EVS_Hammer_UseBasicQuake) = { - EVT_CALL(ChooseNextTarget, ITER_LAST, LVar0) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH) - EVT_CALL(action_command_hammer_init) - EVT_EXEC_WAIT(N(EVS_HammerSupport_B)) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) - EVT_EXEC_WAIT(N(EVS_HammerSupport_C)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_AIM_HAMMER) - EVT_CALL(AddBattleCamZoom, 80) - EVT_CALL(InitTargetIterator) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_WINDUP) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_PullBack) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_Hold1) - EVT_CALL(N(ShouldMovesAutoSucceed)) - EVT_IF_EQ(LVar0, 0) - EVT_LOOP(45) - EVT_WAIT(1) - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_ADD(LVarD, 6) - EVT_CALL(action_command_hammer_start, 0, LVarD, 3) - EVT_CALL(SetActionQuality, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(30) - EVT_WAIT(1) - EVT_CALL(GetActionQuality, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_IF_NE(LVar1, 1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_Hold2) - EVT_SET(LVar1, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(GetActionSuccess, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_SWING_1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_PreSwing) - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_Swing) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_1) - EVT_RETURN - EVT_END + Call(ChooseNextTarget, ITER_LAST, LVar0) + Call(LoadActionCommand, ACTION_COMMAND_SMASH) + Call(action_command_hammer_init) + ExecWait(N(EVS_HammerSupport_B)) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) + ExecWait(N(EVS_HammerSupport_C)) + Call(UseBattleCamPreset, BTL_CAM_PLAYER_AIM_HAMMER) + Call(AddBattleCamZoom, 80) + Call(InitTargetIterator) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_WINDUP) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_PullBack) + Wait(8) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_Hold1) + Call(N(ShouldMovesAutoSucceed)) + IfEq(LVar0, 0) + Loop(45) + Wait(1) + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfNe(LVar0, FALSE) + BreakLoop + EndIf + EndLoop + EndIf + Add(LVarD, 6) + Call(action_command_hammer_start, 0, LVarD, 3) + Call(SetActionQuality, 0) + Set(LVar1, 0) + Loop(30) + Wait(1) + Call(GetActionQuality, LVar0) + IfNe(LVar0, 0) + IfNe(LVar1, 1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_Hold2) + Set(LVar1, 1) + EndIf + EndIf + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfEq(LVar0, FALSE) + BreakLoop + EndIf + EndLoop + Label(0) + Wait(1) + Call(GetActionSuccess, LVar0) + IfEq(LVar0, 0) + Goto(0) + EndIf + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_SWING_1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_PreSwing) + Wait(3) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash1_Swing) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_1) + Return + End }; EvtScript N(EVS_Hammer_UseSuperQuake) = { - EVT_CALL(ChooseNextTarget, ITER_LAST, LVar0) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH) - EVT_CALL(action_command_hammer_init) - EVT_EXEC_WAIT(N(EVS_HammerSupport_B)) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) - EVT_EXEC_WAIT(N(EVS_HammerSupport_D)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_AIM_HAMMER) - EVT_CALL(AddBattleCamZoom, 80) - EVT_CALL(InitTargetIterator) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_WINDUP) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash2_PullBack) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash2_Hold1) - EVT_CALL(N(ShouldMovesAutoSucceed)) - EVT_IF_EQ(LVar0, 0) - EVT_LOOP(45) - EVT_WAIT(1) - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_ADD(LVarD, 6) - EVT_CALL(action_command_hammer_start, 0, LVarD, 3) - EVT_LOOP(60) - EVT_WAIT(1) - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(GetActionSuccess, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_SWING_2) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash2_PreSwing) - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash2_Swing) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_2) - EVT_RETURN - EVT_END + Call(ChooseNextTarget, ITER_LAST, LVar0) + Call(LoadActionCommand, ACTION_COMMAND_SMASH) + Call(action_command_hammer_init) + ExecWait(N(EVS_HammerSupport_B)) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) + ExecWait(N(EVS_HammerSupport_D)) + Call(UseBattleCamPreset, BTL_CAM_PLAYER_AIM_HAMMER) + Call(AddBattleCamZoom, 80) + Call(InitTargetIterator) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_WINDUP) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash2_PullBack) + Wait(8) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash2_Hold1) + Call(N(ShouldMovesAutoSucceed)) + IfEq(LVar0, 0) + Loop(45) + Wait(1) + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfNe(LVar0, FALSE) + BreakLoop + EndIf + EndLoop + EndIf + Add(LVarD, 6) + Call(action_command_hammer_start, 0, LVarD, 3) + Loop(60) + Wait(1) + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfEq(LVar0, FALSE) + BreakLoop + EndIf + EndLoop + Label(0) + Wait(1) + Call(GetActionSuccess, LVar0) + IfEq(LVar0, 0) + Goto(0) + EndIf + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_SWING_2) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash2_PreSwing) + Wait(3) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash2_Swing) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_2) + Return + End }; EvtScript N(EVS_Hammer_UseUltraQuake) = { - EVT_CALL(ChooseNextTarget, ITER_LAST, LVar0) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH) - EVT_CALL(action_command_hammer_init) - EVT_EXEC_WAIT(N(EVS_HammerSupport_B)) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) - EVT_EXEC_WAIT(N(EVS_HammerSupport_E)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_AIM_HAMMER) - EVT_CALL(AddBattleCamZoom, 80) - EVT_CALL(InitTargetIterator) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_WINDUP) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash3_PullBack) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash3_Hold1) - EVT_CALL(N(ShouldMovesAutoSucceed)) - EVT_IF_EQ(LVar0, 0) - EVT_LOOP(45) - EVT_WAIT(1) - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_ADD(LVarD, 6) - EVT_CALL(action_command_hammer_start, 0, LVarD, 3) - EVT_LOOP(60) - EVT_WAIT(1) - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(GetActionSuccess, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_SWING_3) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash3_PreSwing) - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash3_Swing) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_3) - EVT_RETURN - EVT_END + Call(ChooseNextTarget, ITER_LAST, LVar0) + Call(LoadActionCommand, ACTION_COMMAND_SMASH) + Call(action_command_hammer_init) + ExecWait(N(EVS_HammerSupport_B)) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) + ExecWait(N(EVS_HammerSupport_E)) + Call(UseBattleCamPreset, BTL_CAM_PLAYER_AIM_HAMMER) + Call(AddBattleCamZoom, 80) + Call(InitTargetIterator) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_WINDUP) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash3_PullBack) + Wait(8) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash3_Hold1) + Call(N(ShouldMovesAutoSucceed)) + IfEq(LVar0, 0) + Loop(45) + Wait(1) + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfNe(LVar0, FALSE) + BreakLoop + EndIf + EndLoop + EndIf + Add(LVarD, 6) + Call(action_command_hammer_start, 0, LVarD, 3) + Loop(60) + Wait(1) + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfEq(LVar0, FALSE) + BreakLoop + EndIf + EndLoop + Label(0) + Wait(1) + Call(GetActionSuccess, LVar0) + IfEq(LVar0, 0) + Goto(0) + EndIf + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_SWING_3) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash3_PreSwing) + Wait(3) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Smash3_Swing) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_3) + Return + End }; diff --git a/src/battle/common/move/JumpSupport.inc.c b/src/battle/common/move/JumpSupport.inc.c index 6a8d9d257cf..99313891989 100644 --- a/src/battle/common/move/JumpSupport.inc.c +++ b/src/battle/common/move/JumpSupport.inc.c @@ -36,354 +36,354 @@ API_CALLABLE(N(UnkMoveFunc1)) { } EvtScript N(EVS_CheckForAPress) = { - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_BeforeJump) - EVT_LOOP(5) - EVT_CALL(CheckButtonPress, BUTTON_A, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_BeforeJump) + Loop(5) + Call(CheckButtonPress, BUTTON_A, LVar0) + IfEq(LVar0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_JumpSupport_Approach) = { - EVT_CALL(SetGoalToFirstTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 40) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(GetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, EVT_FLOAT(70.0)) - EVT_IF_LT(LVar0, LVar3) - EVT_SET(LVar3, LVar0) - EVT_END_IF - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_ATTACK_APPROACH) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(5.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(CancelablePlayerRunToGoal, 0, LVar0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_EXEC_WAIT(N(EVS_CheckForAPress)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_BeforeJump) - EVT_RETURN - EVT_END + Call(SetGoalToFirstTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 40) + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(GetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) + Sub(LVar3, Float(70.0)) + IfLt(LVar0, LVar3) + Set(LVar3, LVar0) + EndIf + Call(SetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) + Call(UseBattleCamPreset, BTL_CAM_PLAYER_ATTACK_APPROACH) + Call(SetActorSpeed, ACTOR_PLAYER, Float(5.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(CancelablePlayerRunToGoal, 0, LVar0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(SetGoalToTarget, ACTOR_PLAYER) + ExecWait(N(EVS_CheckForAPress)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_BeforeJump) + Return + End }; EvtScript N(EVS_JumpSupport_B) = { - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(GetGoalPos, ACTOR_PLAYER, LVar6, LVar7, LVar8) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar7, LVar8, LVar9) - EVT_IF_GT(LVar6, LVar7) - EVT_SUB(LVar6, LVar7) - EVT_ELSE - EVT_SUB(LVar7, LVar6) - EVT_SET(LVar6, LVar7) - EVT_END_IF - EVT_SUB(LVar6, 20) - EVT_DIVF(LVar6, EVT_FLOAT(10.588)) - EVT_ADDF(LVar6, 15) - EVT_SET(LVarA, LVar6) - EVT_RETURN - EVT_END + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(GetGoalPos, ACTOR_PLAYER, LVar6, LVar7, LVar8) + Call(GetActorPos, ACTOR_PLAYER, LVar7, LVar8, LVar9) + IfGt(LVar6, LVar7) + Sub(LVar6, LVar7) + Else + Sub(LVar7, LVar6) + Set(LVar6, LVar7) + EndIf + Sub(LVar6, 20) + DivF(LVar6, Float(10.588)) + AddF(LVar6, 15) + Set(LVarA, LVar6) + Return + End }; EvtScript N(EVS_JumpSupport_C) = { - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(GetGoalPos, ACTOR_PLAYER, LVar6, LVar7, LVar8) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar7, LVar8, LVar9) - EVT_IF_GT(LVar6, LVar7) - EVT_SUB(LVar6, LVar7) - EVT_ELSE - EVT_SUB(LVar7, LVar6) - EVT_SET(LVar6, LVar7) - EVT_END_IF - EVT_SUB(LVar6, 20) - EVT_DIVF(LVar6, EVT_FLOAT(22.5)) - EVT_ADDF(LVar6, 15) - EVT_SET(LVarA, LVar6) - EVT_RETURN - EVT_END + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(GetGoalPos, ACTOR_PLAYER, LVar6, LVar7, LVar8) + Call(GetActorPos, ACTOR_PLAYER, LVar7, LVar8, LVar9) + IfGt(LVar6, LVar7) + Sub(LVar6, LVar7) + Else + Sub(LVar7, LVar6) + Set(LVar6, LVar7) + EndIf + Sub(LVar6, 20) + DivF(LVar6, Float(22.5)) + AddF(LVar6, 15) + Set(LVarA, LVar6) + Return + End }; EvtScript N(EVS_JumpSupport_D) = { - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(GetGoalPos, ACTOR_PLAYER, LVar6, LVar7, LVar8) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar7, LVar8, LVar9) - EVT_IF_GT(LVar6, LVar7) - EVT_SUB(LVar6, LVar7) - EVT_ELSE - EVT_SUB(LVar7, LVar6) - EVT_SET(LVar6, LVar7) - EVT_END_IF - EVT_SUB(LVar6, 20) - EVT_DIVF(LVar6, EVT_FLOAT(18.0)) - EVT_ADDF(LVar6, 22) - EVT_SET(LVarA, LVar6) - EVT_RETURN - EVT_END + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(GetGoalPos, ACTOR_PLAYER, LVar6, LVar7, LVar8) + Call(GetActorPos, ACTOR_PLAYER, LVar7, LVar8, LVar9) + IfGt(LVar6, LVar7) + Sub(LVar6, LVar7) + Else + Sub(LVar7, LVar6) + Set(LVar6, LVar7) + EndIf + Sub(LVar6, 20) + DivF(LVar6, Float(18.0)) + AddF(LVar6, 22) + Set(LVarA, LVar6) + Return + End }; EvtScript N(EVS_JumpSupport_E) = { - EVT_CALL(PlayerYieldTurn) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_EXECUTING_MOVE, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(func_802693F0) - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.3)) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(N(UnkMoveFunc1)) - EVT_CALL(func_80273444, LVar0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) - EVT_WAIT(1) - EVT_CALL(AddGoalPos, ACTOR_PLAYER, -20, 0, 0) - EVT_CALL(func_80273444, 6, 0, 2) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) - EVT_WAIT(5) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_RESET) - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(PlayerRunToGoal, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_RETURN - EVT_END + Call(PlayerYieldTurn) + Call(SetBattleFlagBits, BS_FLAGS1_EXECUTING_MOVE, FALSE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(func_802693F0) + Call(SetGoalToHome, ACTOR_PLAYER) + Call(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.3)) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(N(UnkMoveFunc1)) + Call(func_80273444, LVar0, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) + Wait(1) + Call(AddGoalPos, ACTOR_PLAYER, -20, 0, 0) + Call(func_80273444, 6, 0, 2) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) + Wait(5) + Call(EnablePlayerBlur, ACTOR_BLUR_RESET) + Call(SetGoalToHome, ACTOR_PLAYER) + Call(SetActorSpeed, ACTOR_PLAYER, Float(8.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(PlayerRunToGoal, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Return + End }; EvtScript N(EVS_JumpSupport_F) = { - EVT_CALL(PlayerYieldTurn) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_EXECUTING_MOVE, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(func_802693F0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(0.8)) - EVT_CALL(N(UnkMoveFunc1)) - EVT_CALL(func_80273444, LVar0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) - EVT_WAIT(1) - EVT_CALL(AddGoalPos, ACTOR_PLAYER, -30, 0, 0) - EVT_CALL(func_80273444, 6, 0, 2) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) - EVT_WAIT(2) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_RESET) - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(PlayerRunToGoal, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_RETURN - EVT_END + Call(PlayerYieldTurn) + Call(SetBattleFlagBits, BS_FLAGS1_EXECUTING_MOVE, FALSE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(func_802693F0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Sub(LVar0, 50) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(0.8)) + Call(N(UnkMoveFunc1)) + Call(func_80273444, LVar0, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) + Wait(1) + Call(AddGoalPos, ACTOR_PLAYER, -30, 0, 0) + Call(func_80273444, 6, 0, 2) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) + Wait(2) + Call(EnablePlayerBlur, ACTOR_BLUR_RESET) + Call(SetGoalToHome, ACTOR_PLAYER) + Call(SetActorSpeed, ACTOR_PLAYER, Float(8.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(PlayerRunToGoal, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Return + End }; EvtScript N(EVS_JumpSupport_G) = { - EVT_CALL(PlayerYieldTurn) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_EXECUTING_MOVE, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_29) - EVT_CALL(func_802693F0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(N(UnkMoveFunc1)) - EVT_CALL(func_80273444, LVar0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) - EVT_WAIT(1) - EVT_CALL(AddGoalPos, ACTOR_PLAYER, -20, 0, 0) - EVT_CALL(func_80273444, 6, 0, 2) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) - EVT_WAIT(2) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_RESET) - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(PlayerRunToGoal, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_RETURN - EVT_END + Call(PlayerYieldTurn) + Call(SetBattleFlagBits, BS_FLAGS1_EXECUTING_MOVE, FALSE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_29) + Call(func_802693F0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Sub(LVar0, 40) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.0)) + Call(N(UnkMoveFunc1)) + Call(func_80273444, LVar0, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) + Wait(1) + Call(AddGoalPos, ACTOR_PLAYER, -20, 0, 0) + Call(func_80273444, 6, 0, 2) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) + Wait(2) + Call(EnablePlayerBlur, ACTOR_BLUR_RESET) + Call(SetGoalToHome, ACTOR_PLAYER) + Call(SetActorSpeed, ACTOR_PLAYER, Float(8.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(PlayerRunToGoal, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Return + End }; EvtScript N(EVS_JumpSupport_H) = { - EVT_CALL(PlayerYieldTurn) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_EXECUTING_MOVE, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(func_802693F0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 60) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(0.8)) - EVT_CALL(N(UnkMoveFunc1)) - EVT_CALL(func_80273444, LVar0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) - EVT_WAIT(1) - EVT_CALL(AddGoalPos, ACTOR_PLAYER, -20, 0, 0) - EVT_CALL(func_80273444, 6, 0, 2) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) - EVT_WAIT(2) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_RESET) - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(PlayerRunToGoal, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_RETURN - EVT_END + Call(PlayerYieldTurn) + Call(SetBattleFlagBits, BS_FLAGS1_EXECUTING_MOVE, FALSE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(func_802693F0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Sub(LVar0, 60) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(0.8)) + Call(N(UnkMoveFunc1)) + Call(func_80273444, LVar0, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) + Wait(1) + Call(AddGoalPos, ACTOR_PLAYER, -20, 0, 0) + Call(func_80273444, 6, 0, 2) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) + Wait(2) + Call(EnablePlayerBlur, ACTOR_BLUR_RESET) + Call(SetGoalToHome, ACTOR_PLAYER) + Call(SetActorSpeed, ACTOR_PLAYER, Float(8.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(PlayerRunToGoal, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Return + End }; EvtScript N(EVS_JumpSupport_I) = { - EVT_CALL(PlayerYieldTurn) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_EXECUTING_MOVE, FALSE) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_RESET) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(func_802693F0) - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 60) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Hurt, ANIM_Mario1_Hurt, ANIM_Mario1_Land) - EVT_CALL(N(UnkMoveFunc1)) - EVT_CALL(func_80273444, LVar0, 0, 0) - EVT_CHILD_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(1.0)) - EVT_END_CHILD_THREAD - EVT_CALL(AddGoalPos, ACTOR_PLAYER, -30, 0, 0) - EVT_CALL(func_80273444, 8, 0, 2) - EVT_CHILD_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(1.0)) - EVT_END_CHILD_THREAD - EVT_CALL(AddGoalPos, ACTOR_PLAYER, -20, 0, 0) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 6, 0, 2) - EVT_CHILD_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(1.0)) - EVT_END_CHILD_THREAD - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(func_80273444, 4, 0, 2) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_RETURN - EVT_END + Call(PlayerYieldTurn) + Call(SetBattleFlagBits, BS_FLAGS1_EXECUTING_MOVE, FALSE) + Call(EnablePlayerBlur, ACTOR_BLUR_RESET) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(func_802693F0) + Call(SetGoalToHome, ACTOR_PLAYER) + Call(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 60) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.0)) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Hurt, ANIM_Mario1_Hurt, ANIM_Mario1_Land) + Call(N(UnkMoveFunc1)) + Call(func_80273444, LVar0, 0, 0) + ChildThread + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(1.0)) + EndChildThread + Call(AddGoalPos, ACTOR_PLAYER, -30, 0, 0) + Call(func_80273444, 8, 0, 2) + ChildThread + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(1.0)) + EndChildThread + Call(AddGoalPos, ACTOR_PLAYER, -20, 0, 0) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 6, 0, 2) + ChildThread + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(1.0)) + EndChildThread + Call(SetGoalToHome, ACTOR_PLAYER) + Call(func_80273444, 4, 0, 2) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Return + End }; EvtScript N(EVS_JumpSupport_Miss) = { - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, 0, 0, ANIM_Mario1_SpinFall) - EVT_CALL(PlayerLandJump) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_SpinFall) - EVT_WAIT(2) - EVT_CHILD_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_END_CHILD_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_TRIP) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_GetUp) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_DustOff) - EVT_WAIT(20) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_EXECUTING_MOVE, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(func_802693F0) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_RESET) - EVT_CALL(PlayerYieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(PlayerRunToGoal, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_RETURN - EVT_END + Call(SetJumpAnimations, ACTOR_PLAYER, 0, 0, 0, ANIM_Mario1_SpinFall) + Call(PlayerLandJump) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_SpinFall) + Wait(2) + ChildThread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + EndChildThread + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_TRIP) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_GetUp) + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_DustOff) + Wait(20) + Call(SetBattleFlagBits, BS_FLAGS1_EXECUTING_MOVE, FALSE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(func_802693F0) + Call(EnablePlayerBlur, ACTOR_BLUR_RESET) + Call(PlayerYieldTurn) + Call(SetGoalToHome, ACTOR_PLAYER) + Call(SetActorSpeed, ACTOR_PLAYER, Float(8.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(PlayerRunToGoal, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Return + End }; // load the action command EvtScript N(EVS_JumpSupport_InitCommand) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Approach)) - EVT_EXEC_WAIT(N(EVS_JumpSupport_B)) - EVT_CALL(action_command_jump_start, LVarA, 3) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_34) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_MarioB1_Stomp) - EVT_CALL(func_80274A18, LVarA, 0) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + ExecWait(N(EVS_JumpSupport_Approach)) + ExecWait(N(EVS_JumpSupport_B)) + Call(action_command_jump_start, LVarA, 3) + Call(UseBattleCamPreset, BTL_CAM_PRESET_34) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_MarioB1_Stomp) + Call(func_80274A18, LVarA, 0) + Return + End }; EvtScript N(EVS_JumpSupport_L) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Approach)) - EVT_CALL(InitTargetIterator) - EVT_EXEC_WAIT(N(EVS_JumpSupport_C)) - EVT_SET(LVarB, LVarA) - EVT_ADD(LVarB, 14) - EVT_ADD(LVarB, -3) - EVT_CALL(action_command_jump_start, LVarB, 3) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_37) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump) - EVT_CALL(func_802752AC, LVarA, 0) - EVT_WAIT(7) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_CALL(func_802752AC, 3, 1) - EVT_CASE_DEFAULT - EVT_CALL(func_802752AC, 5, 1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + ExecWait(N(EVS_JumpSupport_Approach)) + Call(InitTargetIterator) + ExecWait(N(EVS_JumpSupport_C)) + Set(LVarB, LVarA) + Add(LVarB, 14) + Add(LVarB, -3) + Call(action_command_jump_start, LVarB, 3) + Call(UseBattleCamPreset, BTL_CAM_PRESET_37) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump) + Call(func_802752AC, LVarA, 0) + Wait(7) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(0) + Call(func_802752AC, 3, 1) + CaseDefault + Call(func_802752AC, 5, 1) + EndSwitch + Return + End }; EvtScript N(EVS_JumpSupport_M) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Approach)) - EVT_EXEC_WAIT(N(EVS_JumpSupport_D)) - EVT_CALL(SetActionDifficultyTable, EVT_PTR(N(D_802A10F0))) - EVT_SET(LVarB, LVarA) - EVT_SUB(LVarB, 4) - EVT_ADD(LVarB, -3) - EVT_CALL(action_command_jump_start, LVarB, 3) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_38) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_MarioW2_Carried, ANIM_MarioB1_Stomp) - EVT_CALL(func_80275F00, LVarA, 0) - EVT_CALL(CloseActionCommandInfo) - EVT_SET(LVar9, 0) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_SET(LVar9, 1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Stomp) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(2) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(action_command_jump_start, 13, 3) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_39) - EVT_CALL(func_80275F00, 15, 2) - EVT_GOTO(10) - EVT_ELSE - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(action_command_jump_start, 2, 3) - EVT_CALL(func_80275F00, 4, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_LABEL(10) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + ExecWait(N(EVS_JumpSupport_Approach)) + ExecWait(N(EVS_JumpSupport_D)) + Call(SetActionDifficultyTable, Ref(N(D_802A10F0))) + Set(LVarB, LVarA) + Sub(LVarB, 4) + Add(LVarB, -3) + Call(action_command_jump_start, LVarB, 3) + Call(UseBattleCamPreset, BTL_CAM_PRESET_38) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_MarioW2_Carried, ANIM_MarioB1_Stomp) + Call(func_80275F00, LVarA, 0) + Call(CloseActionCommandInfo) + Set(LVar9, 0) + Call(GetPlayerActionSuccess, LVar0) + IfGt(LVar0, 0) + Set(LVar9, 1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Stomp) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, -2, 0) + Wait(2) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(action_command_jump_start, 13, 3) + Call(UseBattleCamPreset, BTL_CAM_PRESET_39) + Call(func_80275F00, 15, 2) + Goto(10) + Else + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(action_command_jump_start, 2, 3) + Call(func_80275F00, 4, 1) + Goto(10) + EndIf + Label(10) + Return + End }; diff --git a/src/battle/common/move/StarBeamSupport.inc.c b/src/battle/common/move/StarBeamSupport.inc.c index c986e6a6f5d..ed4b3eff2d1 100644 --- a/src/battle/common/move/StarBeamSupport.inc.c +++ b/src/battle/common/move/StarBeamSupport.inc.c @@ -3,19 +3,19 @@ #include "sprite/player.h" EvtScript N(EVS_PlayBeamFX) = { - EVT_THREAD - EVT_PLAY_EFFECT(EFFECT_SHIMMER_BURST, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 100, 0) - EVT_WAIT(5) - EVT_PLAY_EFFECT(EFFECT_SHIMMER_BURST, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 100, 0) - EVT_IF_EQ(LVarA, 1) - EVT_WAIT(5) - EVT_PLAY_EFFECT(EFFECT_SHIMMER_BURST, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 100, 0) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(20) - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 30, 0) - EVT_RETURN - EVT_END + Thread + PlayEffect(EFFECT_SHIMMER_BURST, 0, LVar0, LVar1, LVar2, Float(1.0), 100, 0) + Wait(5) + PlayEffect(EFFECT_SHIMMER_BURST, 0, LVar0, LVar1, LVar2, Float(1.0), 100, 0) + IfEq(LVarA, 1) + Wait(5) + PlayEffect(EFFECT_SHIMMER_BURST, 0, LVar0, LVar1, LVar2, Float(1.0), 100, 0) + EndIf + EndThread + Wait(20) + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, Float(1.0), 30, 0) + Return + End }; s32 N(SpiritsFlyDelay)[] = { 35, 0, 5, 10, 15, 20, 25, 30 }; diff --git a/src/battle/common/move/StarPowerSupport.inc.c b/src/battle/common/move/StarPowerSupport.inc.c index acb9a808c8f..2912ab356aa 100644 --- a/src/battle/common/move/StarPowerSupport.inc.c +++ b/src/battle/common/move/StarPowerSupport.inc.c @@ -87,240 +87,240 @@ API_CALLABLE(N(SetStarSpiritSize)) { } EvtScript N(EVS_StarPower_WishForSpirit) = { - EVT_CALL(GetOwnerID, LVarA) - EVT_IF_EQ(LVarA, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_69) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_UsePower) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 16) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(PlayerRunToGoal, 0) - EVT_WAIT(8) - EVT_CALL(PlaySound, SOUND_BEGIN_WISH) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_CALL(N(SpawnStarSparkleFX), LVar0, LVar1, LVar2) - EVT_CALL(N(FadeBackgroundDarken)) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Pray) - EVT_WAIT(10) - EVT_CALL(PlaySound, SOUND_WISH_ASCENDING) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(N(SpawnWishSparkleFX), LVar0, LVar1, LVar2) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_LookUp) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_69) - EVT_WAIT(10) - EVT_CALL(N(SetPartnerWishAnim), PARTNER_WISH_ANIM_WALK) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 16) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE) - EVT_CALL(N(SetPartnerWishAnim), PARTNER_WISH_ANIM_IDLE) - EVT_WAIT(8) - EVT_CALL(PlaySound, SOUND_BEGIN_WISH) - EVT_CALL(N(SetPartnerWishAnim), PARTNER_WISH_ANIM_PRAY) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_CALL(N(SpawnStarSparkleFX), LVar0, LVar1, LVar2) - EVT_CALL(N(FadeBackgroundDarken)) - EVT_WAIT(20) - EVT_CALL(PlaySound, SOUND_WISH_ASCENDING) - EVT_CALL(N(SetPartnerWishAnim), PARTNER_WISH_ANIM_PRAY) - EVT_WAIT(10) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(N(SpawnWishSparkleFX), LVar0, LVar1, LVar2) - EVT_WAIT(30) - EVT_CALL(N(SetPartnerWishAnim), PARTNER_WISH_ANIM_IDLE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetOwnerID, LVarA) + IfEq(LVarA, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_69) + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_UsePower) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 16) + Call(SetActorSpeed, ACTOR_PLAYER, Float(4.0)) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(PlayerRunToGoal, 0) + Wait(8) + Call(PlaySound, SOUND_BEGIN_WISH) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 15) + Call(N(SpawnStarSparkleFX), LVar0, LVar1, LVar2) + Call(N(FadeBackgroundDarken)) + Wait(20) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Pray) + Wait(10) + Call(PlaySound, SOUND_WISH_ASCENDING) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(N(SpawnWishSparkleFX), LVar0, LVar1, LVar2) + Wait(30) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_LookUp) + Else + Call(UseBattleCamPreset, BTL_CAM_PRESET_69) + Wait(10) + Call(N(SetPartnerWishAnim), PARTNER_WISH_ANIM_WALK) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar0, 16) + Call(SetActorSpeed, ACTOR_PARTNER, Float(4.0)) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_PARTNER, 0, FALSE) + Call(N(SetPartnerWishAnim), PARTNER_WISH_ANIM_IDLE) + Wait(8) + Call(PlaySound, SOUND_BEGIN_WISH) + Call(N(SetPartnerWishAnim), PARTNER_WISH_ANIM_PRAY) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 15) + Call(N(SpawnStarSparkleFX), LVar0, LVar1, LVar2) + Call(N(FadeBackgroundDarken)) + Wait(20) + Call(PlaySound, SOUND_WISH_ASCENDING) + Call(N(SetPartnerWishAnim), PARTNER_WISH_ANIM_PRAY) + Wait(10) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(N(SpawnWishSparkleFX), LVar0, LVar1, LVar2) + Wait(30) + Call(N(SetPartnerWishAnim), PARTNER_WISH_ANIM_IDLE) + EndIf + Return + End }; EvtScript N(EVS_StarPower_WishForBeam) = { - EVT_CALL(GetOwnerID, LVarA) - EVT_IF_EQ(LVarA, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_69) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_UsePower) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 16) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(PlayerRunToGoal, 0) - EVT_WAIT(8) - EVT_CALL(PlaySound, SOUND_BEGIN_WISH) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_CALL(N(SpawnStarSparkleFX), LVar0, LVar1, LVar2) - EVT_CALL(N(FadeBackgroundDarkenForBeam)) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Pray) - EVT_WAIT(10) - EVT_CALL(PlaySound, SOUND_WISH_ASCENDING) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(N(SpawnWishSparkleFX), LVar0, LVar1, LVar2) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_LookUp) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_69) - EVT_WAIT(10) - EVT_CALL(N(SetPartnerWishAnim), PARTNER_WISH_ANIM_WALK) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 16) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE) - EVT_CALL(N(SetPartnerWishAnim), PARTNER_WISH_ANIM_IDLE) - EVT_WAIT(8) - EVT_CALL(PlaySound, SOUND_BEGIN_WISH) - EVT_CALL(N(SetPartnerWishAnim), PARTNER_WISH_ANIM_PRAY) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_CALL(N(SpawnStarSparkleFX), LVar0, LVar1, LVar2) - EVT_CALL(N(FadeBackgroundDarkenForBeam)) - EVT_WAIT(20) - EVT_CALL(PlaySound, SOUND_WISH_ASCENDING) - EVT_CALL(N(SetPartnerWishAnim), PARTNER_WISH_ANIM_PRAY) - EVT_WAIT(10) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(N(SpawnWishSparkleFX), LVar0, LVar1, LVar2) - EVT_WAIT(30) - EVT_CALL(N(SetPartnerWishAnim), PARTNER_WISH_ANIM_IDLE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetOwnerID, LVarA) + IfEq(LVarA, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_69) + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_UsePower) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 16) + Call(SetActorSpeed, ACTOR_PLAYER, Float(4.0)) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(PlayerRunToGoal, 0) + Wait(8) + Call(PlaySound, SOUND_BEGIN_WISH) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 15) + Call(N(SpawnStarSparkleFX), LVar0, LVar1, LVar2) + Call(N(FadeBackgroundDarkenForBeam)) + Wait(20) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Pray) + Wait(10) + Call(PlaySound, SOUND_WISH_ASCENDING) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(N(SpawnWishSparkleFX), LVar0, LVar1, LVar2) + Wait(30) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_LookUp) + Else + Call(UseBattleCamPreset, BTL_CAM_PRESET_69) + Wait(10) + Call(N(SetPartnerWishAnim), PARTNER_WISH_ANIM_WALK) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar0, 16) + Call(SetActorSpeed, ACTOR_PARTNER, Float(4.0)) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_PARTNER, 0, FALSE) + Call(N(SetPartnerWishAnim), PARTNER_WISH_ANIM_IDLE) + Wait(8) + Call(PlaySound, SOUND_BEGIN_WISH) + Call(N(SetPartnerWishAnim), PARTNER_WISH_ANIM_PRAY) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 15) + Call(N(SpawnStarSparkleFX), LVar0, LVar1, LVar2) + Call(N(FadeBackgroundDarkenForBeam)) + Wait(20) + Call(PlaySound, SOUND_WISH_ASCENDING) + Call(N(SetPartnerWishAnim), PARTNER_WISH_ANIM_PRAY) + Wait(10) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(N(SpawnWishSparkleFX), LVar0, LVar1, LVar2) + Wait(30) + Call(N(SetPartnerWishAnim), PARTNER_WISH_ANIM_IDLE) + EndIf + Return + End }; EvtScript N(EVS_StarPower_SpiritSummoned) = { - EVT_WAIT(8) - EVT_CALL(SetForegroundModelsVisible, FALSE) - EVT_CALL(UseBattleCamPresetImmediately, BTL_CAM_PRESET_73) - EVT_CALL(MoveBattleCamOver, 1) - EVT_CALL(PlaySound, SOUND_STAR_SPIRIT_APPEAR_A) - EVT_CALL(CreateNpc, NPC_BTL_SPIRIT, LVar0) - EVT_CALL(N(SetStarSpiritSize)) - EVT_CALL(SetNpcFlagBits, NPC_BTL_SPIRIT, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) - EVT_CALL(SetNpcPos, NPC_BTL_SPIRIT, -75, 150, 0) - EVT_CALL(SetNpcDecoration, NPC_BTL_SPIRIT, 0, NPC_DECORATION_WHITE_GLOW_BEHIND) - EVT_CALL(N(SpawnStarSpiritArriveFX), -75, 167, 0) - EVT_WAIT(10) - EVT_CALL(EnableNpcBlur, NPC_BTL_SPIRIT, TRUE) - EVT_SET(LVar0, 0) - EVT_LOOP(8) - EVT_ADD(LVar0, 67) - EVT_CALL(SetNpcRotation, NPC_BTL_SPIRIT, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(10) - EVT_CALL(EnableNpcBlur, NPC_BTL_SPIRIT, FALSE) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_69) - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 50) - EVT_CALL(NpcFlyTo, NPC_BTL_SPIRIT, LVar0, LVar1, LVar2, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(SetForegroundModelsVisible, TRUE) - EVT_RETURN - EVT_END + Wait(8) + Call(SetForegroundModelsVisible, FALSE) + Call(UseBattleCamPresetImmediately, BTL_CAM_PRESET_73) + Call(MoveBattleCamOver, 1) + Call(PlaySound, SOUND_STAR_SPIRIT_APPEAR_A) + Call(CreateNpc, NPC_BTL_SPIRIT, LVar0) + Call(N(SetStarSpiritSize)) + Call(SetNpcFlagBits, NPC_BTL_SPIRIT, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) + Call(SetNpcPos, NPC_BTL_SPIRIT, -75, 150, 0) + Call(SetNpcDecoration, NPC_BTL_SPIRIT, 0, NPC_DECORATION_WHITE_GLOW_BEHIND) + Call(N(SpawnStarSpiritArriveFX), -75, 167, 0) + Wait(10) + Call(EnableNpcBlur, NPC_BTL_SPIRIT, TRUE) + Set(LVar0, 0) + Loop(8) + Add(LVar0, 67) + Call(SetNpcRotation, NPC_BTL_SPIRIT, 0, LVar0, 0) + Wait(1) + EndLoop + Wait(10) + Call(EnableNpcBlur, NPC_BTL_SPIRIT, FALSE) + Thread + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_69) + EndThread + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 50) + Call(NpcFlyTo, NPC_BTL_SPIRIT, LVar0, LVar1, LVar2, 30, 0, EASING_COS_IN_OUT) + Call(SetForegroundModelsVisible, TRUE) + Return + End }; EvtScript N(EVS_StarPower_SpiritDeparts) = { - EVT_CALL(GetOwnerID, LVarA) - EVT_IF_EQ(LVarA, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(PlaySound, SOUND_STAR_SPIRIT_DEPART_3) - EVT_THREAD - EVT_LOOP(5) - EVT_WAIT(6) - EVT_CALL(GetNpcPos, NPC_BTL_SPIRIT, LVar0, LVar1, LVar2) - EVT_CALL(N(SpawnStarSpiritDepartFX), LVar0, LVar1, LVar2) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(EnableNpcBlur, NPC_BTL_SPIRIT, TRUE) - EVT_THREAD - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 720) - EVT_CALL(MakeLerp, LVar2, LVar3, 30, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_BTL_SPIRIT, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(GetNpcPos, NPC_BTL_SPIRIT, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 60) - EVT_CALL(NpcFlyTo, NPC_BTL_SPIRIT, LVar0, LVar1, LVar2, 15, 0, EASING_COS_IN_OUT) - EVT_ADD(LVar1, 140) - EVT_CALL(NpcFlyTo, NPC_BTL_SPIRIT, LVar0, LVar1, LVar2, 15, 0, EASING_COS_IN_OUT) - EVT_WAIT(10) - EVT_CALL(EnableNpcBlur, NPC_BTL_SPIRIT, FALSE) - EVT_CALL(DeleteNpc, NPC_BTL_SPIRIT) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(PlaySound, SOUND_STAR_SPIRIT_DEPART_1) - EVT_THREAD - EVT_LOOP(5) - EVT_WAIT(6) - EVT_CALL(GetNpcPos, NPC_BTL_SPIRIT, LVar0, LVar1, LVar2) - EVT_CALL(N(SpawnStarSpiritDepartFX), LVar0, LVar1, LVar2) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(EnableNpcBlur, NPC_BTL_SPIRIT, TRUE) - EVT_THREAD - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 720) - EVT_CALL(MakeLerp, LVar2, LVar3, 30, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_BTL_SPIRIT, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(GetNpcPos, NPC_BTL_SPIRIT, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 60) - EVT_CALL(NpcFlyTo, NPC_BTL_SPIRIT, LVar0, LVar1, LVar2, 15, 0, EASING_COS_IN_OUT) - EVT_ADD(LVar1, 140) - EVT_CALL(NpcFlyTo, NPC_BTL_SPIRIT, LVar0, LVar1, LVar2, 15, 0, EASING_COS_IN_OUT) - EVT_WAIT(10) - EVT_CALL(EnableNpcBlur, NPC_BTL_SPIRIT, FALSE) - EVT_CALL(DeleteNpc, NPC_BTL_SPIRIT) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetOwnerID, LVarA) + IfEq(LVarA, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(PlaySound, SOUND_STAR_SPIRIT_DEPART_3) + Thread + Loop(5) + Wait(6) + Call(GetNpcPos, NPC_BTL_SPIRIT, LVar0, LVar1, LVar2) + Call(N(SpawnStarSpiritDepartFX), LVar0, LVar1, LVar2) + EndLoop + EndThread + Call(EnableNpcBlur, NPC_BTL_SPIRIT, TRUE) + Thread + Set(LVar2, 0) + Set(LVar3, 720) + Call(MakeLerp, LVar2, LVar3, 30, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_BTL_SPIRIT, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(GetNpcPos, NPC_BTL_SPIRIT, LVar0, LVar1, LVar2) + Add(LVar1, 60) + Call(NpcFlyTo, NPC_BTL_SPIRIT, LVar0, LVar1, LVar2, 15, 0, EASING_COS_IN_OUT) + Add(LVar1, 140) + Call(NpcFlyTo, NPC_BTL_SPIRIT, LVar0, LVar1, LVar2, 15, 0, EASING_COS_IN_OUT) + Wait(10) + Call(EnableNpcBlur, NPC_BTL_SPIRIT, FALSE) + Call(DeleteNpc, NPC_BTL_SPIRIT) + Else + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(PlaySound, SOUND_STAR_SPIRIT_DEPART_1) + Thread + Loop(5) + Wait(6) + Call(GetNpcPos, NPC_BTL_SPIRIT, LVar0, LVar1, LVar2) + Call(N(SpawnStarSpiritDepartFX), LVar0, LVar1, LVar2) + EndLoop + EndThread + Call(EnableNpcBlur, NPC_BTL_SPIRIT, TRUE) + Thread + Set(LVar2, 0) + Set(LVar3, 720) + Call(MakeLerp, LVar2, LVar3, 30, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_BTL_SPIRIT, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(GetNpcPos, NPC_BTL_SPIRIT, LVar0, LVar1, LVar2) + Add(LVar1, 60) + Call(NpcFlyTo, NPC_BTL_SPIRIT, LVar0, LVar1, LVar2, 15, 0, EASING_COS_IN_OUT) + Add(LVar1, 140) + Call(NpcFlyTo, NPC_BTL_SPIRIT, LVar0, LVar1, LVar2, 15, 0, EASING_COS_IN_OUT) + Wait(10) + Call(EnableNpcBlur, NPC_BTL_SPIRIT, FALSE) + Call(DeleteNpc, NPC_BTL_SPIRIT) + EndIf + Return + End }; EvtScript N(EVS_StarPower_EndWish) = { - EVT_CALL(GetOwnerID, LVarA) - EVT_IF_EQ(LVarA, ACTOR_PLAYER) - EVT_CALL(N(FadeBackgroundLighten)) - EVT_WAIT(15) - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(PlayerRunToGoal, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_ELSE - EVT_CALL(N(FadeBackgroundLighten)) - EVT_WAIT(15) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(8.0)) - EVT_CALL(N(SetPartnerWishAnim), PARTNER_WISH_ANIM_RETURN) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(N(SetPartnerWishAnim), PARTNER_WISH_ANIM_IDLE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetOwnerID, LVarA) + IfEq(LVarA, ACTOR_PLAYER) + Call(N(FadeBackgroundLighten)) + Wait(15) + Call(SetGoalToHome, ACTOR_PLAYER) + Call(SetActorSpeed, ACTOR_PLAYER, Float(8.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(PlayerRunToGoal, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Else + Call(N(FadeBackgroundLighten)) + Wait(15) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(8.0)) + Call(N(SetPartnerWishAnim), PARTNER_WISH_ANIM_RETURN) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(N(SetPartnerWishAnim), PARTNER_WISH_ANIM_IDLE) + EndIf + Return + End }; diff --git a/src/battle/common/move/UseItem.inc.c b/src/battle/common/move/UseItem.inc.c index 27998e26bac..8516eb746d7 100644 --- a/src/battle/common/move/UseItem.inc.c +++ b/src/battle/common/move/UseItem.inc.c @@ -3,102 +3,102 @@ /// Provide arg `TRUE` on `LVar1` to disable refunding. EvtScript N(UseItemWithEffect) = { - EVT_IF_EQ(LVar1, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_69) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_USE_ITEM) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_UsePower) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 18) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(PlayerRunToGoal, 0) - EVT_ADD(LVar1, 45) - EVT_SET(LVar3, LVar1) - EVT_ADD(LVar3, 10) - EVT_ADD(LVar3, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 1, LVar0, LVar3, LVar2, EVT_FLOAT(1.0), 30, 0) - EVT_CALL(MakeItemEntity, LVarA, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVarA, LVar0) - EVT_CALL(N(GiveRefund)) - EVT_WAIT(LVar0) - EVT_WAIT(15) - EVT_CALL(N(GiveRefundCleanup)) - EVT_CALL(RemoveItemEntity, LVarA) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_USE_ITEM) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_UsePower) - EVT_WAIT(4) - EVT_ADD(LVar1, 45) - EVT_SET(LVar3, LVar1) - EVT_ADD(LVar3, 10) - EVT_ADD(LVar3, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 1, LVar0, LVar3, LVar2, EVT_FLOAT(1.0), 30, 0) - EVT_CALL(MakeItemEntity, LVarA, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVarA, LVar0) - EVT_WAIT(15) - EVT_CALL(RemoveItemEntity, LVarA) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(LVar1, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_69) + Wait(10) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_USE_ITEM) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_UsePower) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 18) + Call(SetActorSpeed, ACTOR_PLAYER, Float(4.0)) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(PlayerRunToGoal, 0) + Add(LVar1, 45) + Set(LVar3, LVar1) + Add(LVar3, 10) + Add(LVar3, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 1, LVar0, LVar3, LVar2, Float(1.0), 30, 0) + Call(MakeItemEntity, LVarA, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVarA, LVar0) + Call(N(GiveRefund)) + Wait(LVar0) + Wait(15) + Call(N(GiveRefundCleanup)) + Call(RemoveItemEntity, LVarA) + Else + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_USE_ITEM) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_UsePower) + Wait(4) + Add(LVar1, 45) + Set(LVar3, LVar1) + Add(LVar3, 10) + Add(LVar3, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 1, LVar0, LVar3, LVar2, Float(1.0), 30, 0) + Call(MakeItemEntity, LVarA, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVarA, LVar0) + Wait(15) + Call(RemoveItemEntity, LVarA) + EndIf + Return + End }; EvtScript N(UseItem) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, -85, 1, 0) - EVT_CALL(SetBattleCamOffsetZ, 41) - EVT_CALL(SetBattleCamZoom, 248) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_UsePower) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 45) - EVT_CALL(MakeItemEntity, LVarA, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVarE, LVar0) - EVT_CALL(N(GiveRefund)) - EVT_WAIT(LVar0) - EVT_WAIT(15) - EVT_CALL(N(GiveRefundCleanup)) - EVT_CALL(RemoveItemEntity, LVarE) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, -85, 1, 0) + Call(SetBattleCamOffsetZ, 41) + Call(SetBattleCamZoom, 248) + Call(MoveBattleCamOver, 30) + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_UsePower) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 45) + Call(MakeItemEntity, LVarA, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVarE, LVar0) + Call(N(GiveRefund)) + Wait(LVar0) + Wait(15) + Call(N(GiveRefundCleanup)) + Call(RemoveItemEntity, LVarE) + Return + End }; EvtScript N(PlayerGoHome) = { - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(PlayerRunToGoal, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(SetGoalToHome, ACTOR_PLAYER) + Call(SetActorSpeed, ACTOR_PLAYER, Float(8.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(PlayerRunToGoal, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Return + End }; EvtScript N(EatItem) = { - EVT_THREAD - EVT_LOOP(4) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_EAT_OR_DRINK) - EVT_WAIT(10) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Eat) - EVT_WAIT(45) - EVT_RETURN - EVT_END + Thread + Loop(4) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_EAT_OR_DRINK) + Wait(10) + EndLoop + EndThread + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Eat) + Wait(45) + Return + End }; EvtScript N(DrinkItem) = { - EVT_THREAD - EVT_LOOP(4) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_EAT_OR_DRINK) - EVT_WAIT(10) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Drink) - EVT_WAIT(45) - EVT_RETURN - EVT_END + Thread + Loop(4) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_EAT_OR_DRINK) + Wait(10) + EndLoop + EndThread + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Drink) + Wait(45) + Return + End }; diff --git a/src/battle/common/stage/area_arn/arn_01.inc.c b/src/battle/common/stage/area_arn/arn_01.inc.c index bf7e4e3dc1b..a7a88809b13 100644 --- a/src/battle/common/stage/area_arn/arn_01.inc.c +++ b/src/battle/common/stage/area_arn/arn_01.inc.c @@ -4,14 +4,14 @@ #define NAMESPACE A(arn_01) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_arn/arn_02.inc.c b/src/battle/common/stage/area_arn/arn_02.inc.c index 6fa65575949..3a059da0d1c 100644 --- a/src/battle/common/stage/area_arn/arn_02.inc.c +++ b/src/battle/common/stage/area_arn/arn_02.inc.c @@ -4,31 +4,31 @@ #define NAMESPACE A(arn_02) EvtScript N(EVS_RotateWindmill) = { - EVT_SET(LVarA, LVar0) - EVT_SET(LVar0, 0) - EVT_LABEL(0) - EVT_ADD(LVar0, 1) - EVT_IF_GT(LVar0, 359) - EVT_SUB(LVar0, 360) - EVT_END_IF - EVT_CALL(RotateModel, LVarA, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Set(LVar0, 0) + Label(0) + Add(LVar0, 1) + IfGt(LVar0, 359) + Sub(LVar0, 360) + EndIf + Call(RotateModel, LVarA, LVar0, 0, 0, 1) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SET(LVar0, MODEL_o332) - EVT_EXEC_WAIT(N(EVS_RotateWindmill)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Set(LVar0, MODEL_o332) + ExecWait(N(EVS_RotateWindmill)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_arn/arn_03.inc.c b/src/battle/common/stage/area_arn/arn_03.inc.c index af4bd374927..818801cae8b 100644 --- a/src/battle/common/stage/area_arn/arn_03.inc.c +++ b/src/battle/common/stage/area_arn/arn_03.inc.c @@ -4,14 +4,14 @@ #define NAMESPACE A(arn_03) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_arn/arn_04.inc.c b/src/battle/common/stage/area_arn/arn_04.inc.c index 09dec27fea2..e4e3bf5ff18 100644 --- a/src/battle/common/stage/area_arn/arn_04.inc.c +++ b/src/battle/common/stage/area_arn/arn_04.inc.c @@ -4,15 +4,15 @@ #define NAMESPACE A(arn_04) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_arn/arn_05.inc.c b/src/battle/common/stage/area_arn/arn_05.inc.c index 70f0cf83244..c3f26ea12ec 100644 --- a/src/battle/common/stage/area_arn/arn_05.inc.c +++ b/src/battle/common/stage/area_arn/arn_05.inc.c @@ -4,15 +4,15 @@ #define NAMESPACE A(arn_05) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_arn/arn_06.inc.c b/src/battle/common/stage/area_arn/arn_06.inc.c index 0bdb973c771..ae3f68ab8fa 100644 --- a/src/battle/common/stage/area_arn/arn_06.inc.c +++ b/src/battle/common/stage/area_arn/arn_06.inc.c @@ -4,14 +4,14 @@ #define NAMESPACE A(arn_06) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_dgb/dgb_01.inc.c b/src/battle/common/stage/area_dgb/dgb_01.inc.c index f983328a5b3..1233548eb90 100644 --- a/src/battle/common/stage/area_dgb/dgb_01.inc.c +++ b/src/battle/common/stage/area_dgb/dgb_01.inc.c @@ -4,14 +4,14 @@ #define NAMESPACE A(dgb_01) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_dgb/dgb_02.inc.c b/src/battle/common/stage/area_dgb/dgb_02.inc.c index 798f6f0a151..eed6c31133f 100644 --- a/src/battle/common/stage/area_dgb/dgb_02.inc.c +++ b/src/battle/common/stage/area_dgb/dgb_02.inc.c @@ -4,14 +4,14 @@ #define NAMESPACE A(dgb_02) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_dgb/dgb_03.inc.c b/src/battle/common/stage/area_dgb/dgb_03.inc.c index 5fcbcc48336..22585962b8c 100644 --- a/src/battle/common/stage/area_dgb/dgb_03.inc.c +++ b/src/battle/common/stage/area_dgb/dgb_03.inc.c @@ -4,14 +4,14 @@ #define NAMESPACE A(dgb_03) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_dgb/dgb_04.inc.c b/src/battle/common/stage/area_dgb/dgb_04.inc.c index 06874b8a493..030f2e0387f 100644 --- a/src/battle/common/stage/area_dgb/dgb_04.inc.c +++ b/src/battle/common/stage/area_dgb/dgb_04.inc.c @@ -4,14 +4,14 @@ #define NAMESPACE A(dgb_04) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_dgb/dgb_05.inc.c b/src/battle/common/stage/area_dgb/dgb_05.inc.c index a9b890f95ed..ca64862d1b1 100644 --- a/src/battle/common/stage/area_dgb/dgb_05.inc.c +++ b/src/battle/common/stage/area_dgb/dgb_05.inc.c @@ -4,14 +4,14 @@ #define NAMESPACE A(dgb_05) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_flo/flo_01.inc.c b/src/battle/common/stage/area_flo/flo_01.inc.c index 4e80ce52367..fc7b3c1324c 100644 --- a/src/battle/common/stage/area_flo/flo_01.inc.c +++ b/src/battle/common/stage/area_flo/flo_01.inc.c @@ -8,20 +8,20 @@ #include "common/MakeSun.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetGroupVisibility, MODEL_dai_03, MODEL_GROUP_VISIBLE) - EVT_CALL(SetGroupVisibility, MODEL_dai_04, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_dai_05, MODEL_GROUP_HIDDEN) - EVT_EXEC(N(EVS_RandomFlowers_Background)) - EVT_EXEC_WAIT(N(MakeSun)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetGroupVisibility, MODEL_dai_03, MODEL_GROUP_VISIBLE) + Call(SetGroupVisibility, MODEL_dai_04, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_dai_05, MODEL_GROUP_HIDDEN) + Exec(N(EVS_RandomFlowers_Background)) + ExecWait(N(MakeSun)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_flo/flo_01b.inc.c b/src/battle/common/stage/area_flo/flo_01b.inc.c index 2b26a61c1a1..1c2eaee5b25 100644 --- a/src/battle/common/stage/area_flo/flo_01b.inc.c +++ b/src/battle/common/stage/area_flo/flo_01b.inc.c @@ -8,20 +8,20 @@ #include "common/MakeSun.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetGroupVisibility, MODEL_dai_03, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_dai_04, MODEL_GROUP_VISIBLE) - EVT_CALL(SetGroupVisibility, MODEL_dai_05, MODEL_GROUP_HIDDEN) - EVT_EXEC(N(EVS_RandomFlowers_Background)) - EVT_EXEC_WAIT(N(MakeSun)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetGroupVisibility, MODEL_dai_03, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_dai_04, MODEL_GROUP_VISIBLE) + Call(SetGroupVisibility, MODEL_dai_05, MODEL_GROUP_HIDDEN) + Exec(N(EVS_RandomFlowers_Background)) + ExecWait(N(MakeSun)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_flo/flo_01c.inc.c b/src/battle/common/stage/area_flo/flo_01c.inc.c index 62d9c7475b3..6655b9cc6da 100644 --- a/src/battle/common/stage/area_flo/flo_01c.inc.c +++ b/src/battle/common/stage/area_flo/flo_01c.inc.c @@ -8,21 +8,21 @@ #include "common/MakeSun.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetGroupVisibility, MODEL_dai_03, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_dai_04, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_dai_05, MODEL_GROUP_VISIBLE) - EVT_EXEC(N(EVS_RandomFlowers_Background)) - EVT_EXEC(N(EVS_RandomFlowers_Foreground)) - EVT_EXEC_WAIT(N(MakeSun)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetGroupVisibility, MODEL_dai_03, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_dai_04, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_dai_05, MODEL_GROUP_VISIBLE) + Exec(N(EVS_RandomFlowers_Background)) + Exec(N(EVS_RandomFlowers_Foreground)) + ExecWait(N(MakeSun)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_flo/flo_02.inc.c b/src/battle/common/stage/area_flo/flo_02.inc.c index 36137fba418..e060faf766a 100644 --- a/src/battle/common/stage/area_flo/flo_02.inc.c +++ b/src/battle/common/stage/area_flo/flo_02.inc.c @@ -8,20 +8,20 @@ #include "common/MakeSun.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetGroupVisibility, MODEL_dai_05, MODEL_GROUP_VISIBLE) - EVT_CALL(SetGroupVisibility, MODEL_0809, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_16, MODEL_GROUP_HIDDEN) - EVT_EXEC(N(EVS_RandomFlowers_FarBack)) - EVT_EXEC_WAIT(N(MakeSun)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetGroupVisibility, MODEL_dai_05, MODEL_GROUP_VISIBLE) + Call(SetGroupVisibility, MODEL_0809, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_16, MODEL_GROUP_HIDDEN) + Exec(N(EVS_RandomFlowers_FarBack)) + ExecWait(N(MakeSun)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_flo/flo_02b.inc.c b/src/battle/common/stage/area_flo/flo_02b.inc.c index 83275941a25..737ccd3d61c 100644 --- a/src/battle/common/stage/area_flo/flo_02b.inc.c +++ b/src/battle/common/stage/area_flo/flo_02b.inc.c @@ -8,21 +8,21 @@ #include "common/MakeSun.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetGroupVisibility, MODEL_dai_05, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_0809, MODEL_GROUP_VISIBLE) - EVT_CALL(SetGroupVisibility, MODEL_16, MODEL_GROUP_HIDDEN) - EVT_EXEC(N(EVS_RandomFlowers_FarBack)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, 0, SURFACE_TYPE_FLOWERS) - EVT_EXEC_WAIT(N(MakeSun)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetGroupVisibility, MODEL_dai_05, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_0809, MODEL_GROUP_VISIBLE) + Call(SetGroupVisibility, MODEL_16, MODEL_GROUP_HIDDEN) + Exec(N(EVS_RandomFlowers_FarBack)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, 0, SURFACE_TYPE_FLOWERS) + ExecWait(N(MakeSun)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_flo/flo_02c.inc.c b/src/battle/common/stage/area_flo/flo_02c.inc.c index 9ff0ec61d2a..83b862ca1a5 100644 --- a/src/battle/common/stage/area_flo/flo_02c.inc.c +++ b/src/battle/common/stage/area_flo/flo_02c.inc.c @@ -8,21 +8,21 @@ #include "common/MakeSun.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetGroupVisibility, MODEL_dai_05, MODEL_GROUP_VISIBLE) - EVT_CALL(SetGroupVisibility, MODEL_0809, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_g90, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_16, MODEL_GROUP_VISIBLE) - EVT_EXEC(N(EVS_RandomFlowers_FarBack)) - EVT_EXEC_WAIT(N(MakeSun)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetGroupVisibility, MODEL_dai_05, MODEL_GROUP_VISIBLE) + Call(SetGroupVisibility, MODEL_0809, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_g90, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_16, MODEL_GROUP_VISIBLE) + Exec(N(EVS_RandomFlowers_FarBack)) + ExecWait(N(MakeSun)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_flo/flo_03.inc.c b/src/battle/common/stage/area_flo/flo_03.inc.c index ddd47932641..91915494688 100644 --- a/src/battle/common/stage/area_flo/flo_03.inc.c +++ b/src/battle/common/stage/area_flo/flo_03.inc.c @@ -4,71 +4,71 @@ #define NAMESPACE A(flo_03) EvtScript N(EVS_AnimateVines) = { - EVT_SET(LVarA, LVar0) - EVT_USE_BUF(LVarA) - EVT_LOOP(0) - EVT_BUF_READ1(LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetTexPanner, LVar0, TEX_PANNER_E) - EVT_BUF_READ1(LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetTexPanner, LVar0, TEX_PANNER_F) - EVT_END_LOOP - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LABEL(0) - EVT_LABEL(0) - EVT_ADD(LVar0, -140) - EVT_IF_LT(LVar0, 0) - EVT_ADD(LVar0, 0x10000) - EVT_END_IF - EVT_CALL(SetTexPanOffset, TEX_PANNER_E, TEX_PANNER_MAIN, LVar0, 0) - EVT_ADD(LVar1, -200) - EVT_IF_LT(LVar1, 0) - EVT_ADD(LVar1, 0x10000) - EVT_END_IF - EVT_CALL(SetTexPanOffset, TEX_PANNER_F, TEX_PANNER_MAIN, LVar1, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + UseBuf(LVarA) + Loop(0) + BufRead1(LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + Call(SetTexPanner, LVar0, TEX_PANNER_E) + BufRead1(LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + Call(SetTexPanner, LVar0, TEX_PANNER_F) + EndLoop + Set(LVar0, 0) + Set(LVar1, 0) + Label(0) + Label(0) + Add(LVar0, -140) + IfLt(LVar0, 0) + Add(LVar0, 0x10000) + EndIf + Call(SetTexPanOffset, TEX_PANNER_E, TEX_PANNER_MAIN, LVar0, 0) + Add(LVar1, -200) + IfLt(LVar1, 0) + Add(LVar1, 0x10000) + EndIf + Call(SetTexPanOffset, TEX_PANNER_F, TEX_PANNER_MAIN, LVar1, 0) + Wait(1) + Goto(0) + Return + End }; #include "common/MakeSun.inc.c" #include "common/CosInterpMinMax.inc.c" EvtScript N(EVS_AnimateSmokePuff) = { - EVT_CALL(EnableModel, LVarF, TRUE) - EVT_SET(LVarE, 159) - EVT_LOOP(LVarE) - EVT_ADDF(LVar3, 0) - EVT_ADDF(LVar4, EVT_FLOAT(0.0)) - EVT_SETF(LVar5, EVT_FLOAT(0.01)) - EVT_ADDF(LVar0, LVar3) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_MULF(LVar6, EVT_FLOAT(1.01)) - EVT_ADDF(LVar7, EVT_FLOAT(0.01)) - EVT_SETF(LVar8, LVar6) - EVT_CALL(N(CosInterpMinMax), LVarE, LVarA, EVT_FLOAT(0.0), EVT_FLOAT(0.203), 15, 0, 0) - EVT_ADDF(LVar8, LVarA) - EVT_SETF(LVar9, LVar7) - EVT_CALL(N(CosInterpMinMax), LVarE, LVarA, EVT_FLOAT(0.0), EVT_FLOAT(0.203), 20, 0, 90) - EVT_ADDF(LVar9, LVarA) - EVT_SETF(LVarA, LVar0) - EVT_MULF(LVarA, EVT_FLOAT(10.0)) - EVT_CALL(TranslateModel, LVarF, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, LVarF, LVar8, LVar9, 1) - EVT_CALL(RotateModel, LVarF, LVarA, 0, 0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EnableModel, LVarF, FALSE) - EVT_RETURN - EVT_END + Call(EnableModel, LVarF, TRUE) + Set(LVarE, 159) + Loop(LVarE) + AddF(LVar3, 0) + AddF(LVar4, Float(0.0)) + SetF(LVar5, Float(0.01)) + AddF(LVar0, LVar3) + AddF(LVar1, LVar4) + AddF(LVar2, LVar5) + MulF(LVar6, Float(1.01)) + AddF(LVar7, Float(0.01)) + SetF(LVar8, LVar6) + Call(N(CosInterpMinMax), LVarE, LVarA, Float(0.0), Float(0.203), 15, 0, 0) + AddF(LVar8, LVarA) + SetF(LVar9, LVar7) + Call(N(CosInterpMinMax), LVarE, LVarA, Float(0.0), Float(0.203), 20, 0, 90) + AddF(LVar9, LVarA) + SetF(LVarA, LVar0) + MulF(LVarA, Float(10.0)) + Call(TranslateModel, LVarF, LVar0, LVar1, LVar2) + Call(ScaleModel, LVarF, LVar8, LVar9, 1) + Call(RotateModel, LVarF, LVarA, 0, 0, 1) + Wait(1) + EndLoop + Call(EnableModel, LVarF, FALSE) + Return + End }; s32 N(VineModels)[] = { @@ -79,106 +79,106 @@ s32 N(VineModels)[] = { }; EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_SET(LVar0, N(VineModels)) - EVT_EXEC(N(EVS_AnimateVines)) - EVT_CALL(SetTexPanner, MODEL_piko4, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_piko5, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_piko1, TEX_PANNER_3) - EVT_CALL(SetTexPanner, MODEL_piko2, TEX_PANNER_4) - EVT_CALL(SetTexPanner, MODEL_piko3, TEX_PANNER_5) - EVT_CALL(SetTexPanner, MODEL_piko6, TEX_PANNER_6) - EVT_CALL(SetTexPanner, MODEL_piko7, TEX_PANNER_7) - EVT_THREAD - EVT_SET(LVarE, 1) - EVT_SET(LVarF, 0) - EVT_LOOP(0) - EVT_ADDF(LVarF, LVarE) - EVT_IF_GE(LVarF, 1080) - EVT_SET(LVarF, 0) - EVT_END_IF - EVT_SET(LVar0, LVarF) - EVT_DIV(LVar0, 9) - EVT_MOD(LVar0, 2) - EVT_MUL(LVar0, 0x4000) - EVT_SET(LVar1, LVarF) - EVT_DIV(LVar1, 4) - EVT_MOD(LVar1, 2) - EVT_MUL(LVar1, 0x4000) - EVT_SET(LVar2, LVarF) - EVT_DIV(LVar2, 5) - EVT_MOD(LVar2, 2) - EVT_MUL(LVar2, 0x4000) - EVT_SET(LVar3, LVarF) - EVT_DIV(LVar3, 6) - EVT_MOD(LVar3, 2) - EVT_MUL(LVar3, 0x4000) - EVT_SET(LVar4, LVarF) - EVT_DIV(LVar4, 2) - EVT_MOD(LVar4, 2) - EVT_MUL(LVar4, 0x4000) - EVT_SET(LVar5, LVarF) - EVT_DIV(LVar5, 8) - EVT_MOD(LVar5, 2) - EVT_MUL(LVar5, 0x4000) - EVT_SET(LVar6, LVarF) - EVT_DIV(LVar6, 8) - EVT_MOD(LVar6, 2) - EVT_MUL(LVar6, 0x8000) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar1, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, LVar2, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_4, TEX_PANNER_MAIN, LVar3, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_5, TEX_PANNER_MAIN, LVar4, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_6, TEX_PANNER_MAIN, LVar5, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_7, TEX_PANNER_MAIN, LVar6, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 0) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Set(LVar0, N(VineModels)) + Exec(N(EVS_AnimateVines)) + Call(SetTexPanner, MODEL_piko4, TEX_PANNER_1) + Call(SetTexPanner, MODEL_piko5, TEX_PANNER_2) + Call(SetTexPanner, MODEL_piko1, TEX_PANNER_3) + Call(SetTexPanner, MODEL_piko2, TEX_PANNER_4) + Call(SetTexPanner, MODEL_piko3, TEX_PANNER_5) + Call(SetTexPanner, MODEL_piko6, TEX_PANNER_6) + Call(SetTexPanner, MODEL_piko7, TEX_PANNER_7) + Thread + Set(LVarE, 1) + Set(LVarF, 0) + Loop(0) + AddF(LVarF, LVarE) + IfGe(LVarF, 1080) + Set(LVarF, 0) + EndIf + Set(LVar0, LVarF) + Div(LVar0, 9) + Mod(LVar0, 2) + Mul(LVar0, 0x4000) + Set(LVar1, LVarF) + Div(LVar1, 4) + Mod(LVar1, 2) + Mul(LVar1, 0x4000) + Set(LVar2, LVarF) + Div(LVar2, 5) + Mod(LVar2, 2) + Mul(LVar2, 0x4000) + Set(LVar3, LVarF) + Div(LVar3, 6) + Mod(LVar3, 2) + Mul(LVar3, 0x4000) + Set(LVar4, LVarF) + Div(LVar4, 2) + Mod(LVar4, 2) + Mul(LVar4, 0x4000) + Set(LVar5, LVarF) + Div(LVar5, 8) + Mod(LVar5, 2) + Mul(LVar5, 0x4000) + Set(LVar6, LVarF) + Div(LVar6, 8) + Mod(LVar6, 2) + Mul(LVar6, 0x8000) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar1, 0) + Call(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, LVar2, 0) + Call(SetTexPanOffset, TEX_PANNER_4, TEX_PANNER_MAIN, LVar3, 0) + Call(SetTexPanOffset, TEX_PANNER_5, TEX_PANNER_MAIN, LVar4, 0) + Call(SetTexPanOffset, TEX_PANNER_6, TEX_PANNER_MAIN, LVar5, 0) + Call(SetTexPanOffset, TEX_PANNER_7, TEX_PANNER_MAIN, LVar6, 0) + Wait(1) + EndLoop + EndThread + Thread + Set(LVar0, 0) // create 16 smoke models - EVT_LOOP(16) - EVT_SET(LVar1, LVar0) - EVT_ADD(LVar1, CLONED_MODEL(0)) - EVT_ADD(LVar0, 1) - EVT_CALL(CloneModel, MODEL_o454, LVar1) - EVT_CALL(EnableModel, LVar1, FALSE) - EVT_END_LOOP + Loop(16) + Set(LVar1, LVar0) + Add(LVar1, CLONED_MODEL(0)) + Add(LVar0, 1) + Call(CloneModel, MODEL_o454, LVar1) + Call(EnableModel, LVar1, FALSE) + EndLoop // hide the original - EVT_CALL(EnableModel, MODEL_o454, FALSE) + Call(EnableModel, MODEL_o454, FALSE) // animate them - EVT_SET(LVarE, 0) - EVT_LOOP(0) - EVT_SETF(LVar0, EVT_FLOAT(106.0)) - EVT_SETF(LVar1, EVT_FLOAT(94.0)) - EVT_SETF(LVar2, EVT_FLOAT(-91.0)) - EVT_CALL(RandInt, 100, LVar3) - EVT_ADDF(LVar3, -50) - EVT_DIVF(LVar3, EVT_FLOAT(200.0)) - EVT_SETF(LVar4, EVT_FLOAT(1.0)) - EVT_SETF(LVar5, 0) - EVT_SETF(LVar6, EVT_FLOAT(0.296)) - EVT_SETF(LVar7, EVT_FLOAT(0.296)) - EVT_SET(LVarF, LVarE) - EVT_ADD(LVarF, CLONED_MODEL(0)) - EVT_EXEC(N(EVS_AnimateSmokePuff)) - EVT_ADD(LVarE, 1) - EVT_IF_GE(LVarE, 16) - EVT_SET(LVarE, 0) - EVT_END_IF - EVT_WAIT(10) - EVT_END_LOOP - EVT_END_THREAD - EVT_EXEC_WAIT(N(MakeSun)) - EVT_RETURN - EVT_END + Set(LVarE, 0) + Loop(0) + SetF(LVar0, Float(106.0)) + SetF(LVar1, Float(94.0)) + SetF(LVar2, Float(-91.0)) + Call(RandInt, 100, LVar3) + AddF(LVar3, -50) + DivF(LVar3, Float(200.0)) + SetF(LVar4, Float(1.0)) + SetF(LVar5, 0) + SetF(LVar6, Float(0.296)) + SetF(LVar7, Float(0.296)) + Set(LVarF, LVarE) + Add(LVarF, CLONED_MODEL(0)) + Exec(N(EVS_AnimateSmokePuff)) + Add(LVarE, 1) + IfGe(LVarE, 16) + Set(LVarE, 0) + EndIf + Wait(10) + EndLoop + EndThread + ExecWait(N(MakeSun)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundVineModels)[] = { diff --git a/src/battle/common/stage/area_flo/flo_04.inc.c b/src/battle/common/stage/area_flo/flo_04.inc.c index d0f90d9239c..c671de2fdcb 100644 --- a/src/battle/common/stage/area_flo/flo_04.inc.c +++ b/src/battle/common/stage/area_flo/flo_04.inc.c @@ -6,72 +6,72 @@ #include "common/CosInterpMinMax.inc.c" EvtScript N(EVS_AnimateCloud) = { - EVT_SET(LVarA, LVar0) - EVT_SET(LVarF, 0) - EVT_LOOP(0) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, EVT_FLOAT(0.968), EVT_FLOAT(1.031), 15, 0, 0) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar1, EVT_FLOAT(1.031), EVT_FLOAT(0.968), 15, 0, 0) - EVT_CALL(ScaleModel, LVarA, LVar1, LVar0, 1) - EVT_ADD(LVarF, 1) - EVT_IF_GE(LVarF, 30) - EVT_SET(LVarF, 0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Set(LVarF, 0) + Loop(0) + Call(N(CosInterpMinMax), LVarF, LVar0, Float(0.968), Float(1.031), 15, 0, 0) + Call(N(CosInterpMinMax), LVarF, LVar1, Float(1.031), Float(0.968), 15, 0, 0) + Call(ScaleModel, LVarA, LVar1, LVar0, 1) + Add(LVarF, 1) + IfGe(LVarF, 30) + Set(LVarF, 0) + EndIf + Wait(1) + EndLoop + Return + End }; #include "common/MakeSun.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_SET(LVar0, MODEL_o412) - EVT_EXEC(N(EVS_AnimateCloud)) - EVT_SET(LVar0, MODEL_o413) - EVT_EXEC(N(EVS_AnimateCloud)) - EVT_SET(LVar0, MODEL_o414) - EVT_EXEC(N(EVS_AnimateCloud)) - EVT_SET(LVar0, MODEL_o415) - EVT_EXEC(N(EVS_AnimateCloud)) - EVT_SET(LVar0, MODEL_o419) - EVT_EXEC(N(EVS_AnimateCloud)) - EVT_THREAD - EVT_SET(LVar0, MODEL_o431) - EVT_EXEC(N(EVS_AnimateCloud)) - EVT_SET(LVar0, MODEL_o432) - EVT_EXEC(N(EVS_AnimateCloud)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_b2_2) - EVT_EXEC(N(EVS_AnimateCloud)) - EVT_SET(LVar0, MODEL_b2_1) - EVT_EXEC(N(EVS_AnimateCloud)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_b1_2) - EVT_EXEC(N(EVS_AnimateCloud)) - EVT_SET(LVar0, MODEL_b1_1) - EVT_EXEC(N(EVS_AnimateCloud)) - EVT_SET(LVar0, MODEL_b1_3) - EVT_EXEC(N(EVS_AnimateCloud)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_o433) - EVT_EXEC(N(EVS_AnimateCloud)) - EVT_SET(LVar0, MODEL_o434) - EVT_EXEC(N(EVS_AnimateCloud)) - EVT_END_THREAD - EVT_CALL(CloneModel, MODEL_o427, CLONED_MODEL(0)) - EVT_CALL(EnableModel, CLONED_MODEL(0), FALSE) - EVT_CALL(TranslateModel, CLONED_MODEL(0), 0, 9, 0) - EVT_CALL(ParentColliderToModel, 0, CLONED_MODEL(0)) - EVT_EXEC_WAIT(N(MakeSun)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Set(LVar0, MODEL_o412) + Exec(N(EVS_AnimateCloud)) + Set(LVar0, MODEL_o413) + Exec(N(EVS_AnimateCloud)) + Set(LVar0, MODEL_o414) + Exec(N(EVS_AnimateCloud)) + Set(LVar0, MODEL_o415) + Exec(N(EVS_AnimateCloud)) + Set(LVar0, MODEL_o419) + Exec(N(EVS_AnimateCloud)) + Thread + Set(LVar0, MODEL_o431) + Exec(N(EVS_AnimateCloud)) + Set(LVar0, MODEL_o432) + Exec(N(EVS_AnimateCloud)) + Wait(5) + Set(LVar0, MODEL_b2_2) + Exec(N(EVS_AnimateCloud)) + Set(LVar0, MODEL_b2_1) + Exec(N(EVS_AnimateCloud)) + Wait(5) + Set(LVar0, MODEL_b1_2) + Exec(N(EVS_AnimateCloud)) + Set(LVar0, MODEL_b1_1) + Exec(N(EVS_AnimateCloud)) + Set(LVar0, MODEL_b1_3) + Exec(N(EVS_AnimateCloud)) + Wait(5) + Set(LVar0, MODEL_o433) + Exec(N(EVS_AnimateCloud)) + Set(LVar0, MODEL_o434) + Exec(N(EVS_AnimateCloud)) + EndThread + Call(CloneModel, MODEL_o427, CLONED_MODEL(0)) + Call(EnableModel, CLONED_MODEL(0), FALSE) + Call(TranslateModel, CLONED_MODEL(0), 0, 9, 0) + Call(ParentColliderToModel, 0, CLONED_MODEL(0)) + ExecWait(N(MakeSun)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_flo/flo_05.inc.c b/src/battle/common/stage/area_flo/flo_05.inc.c index 1235dd2ab0b..5a7f450a8f9 100644 --- a/src/battle/common/stage/area_flo/flo_05.inc.c +++ b/src/battle/common/stage/area_flo/flo_05.inc.c @@ -6,16 +6,16 @@ #include "common/MakeSun.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_EXEC_WAIT(N(MakeSun)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + ExecWait(N(MakeSun)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_flo/flo_06.inc.c b/src/battle/common/stage/area_flo/flo_06.inc.c index e35fed0f3a4..98c42fb35c3 100644 --- a/src/battle/common/stage/area_flo/flo_06.inc.c +++ b/src/battle/common/stage/area_flo/flo_06.inc.c @@ -6,16 +6,16 @@ #include "common/MakeSun.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_EXEC_WAIT(N(MakeSun)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + ExecWait(N(MakeSun)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_hos/hos_00.inc.c b/src/battle/common/stage/area_hos/hos_00.inc.c index 3a2c3633942..09b028d254b 100644 --- a/src/battle/common/stage/area_hos/hos_00.inc.c +++ b/src/battle/common/stage/area_hos/hos_00.inc.c @@ -4,64 +4,64 @@ #define NAMESPACE A(hos_00) EvtScript N(EVS_AnimateFlower) = { - EVT_SET(LVarA, LVar0) - EVT_LABEL(0) - EVT_CALL(TranslateModel, LVarA, 0, 2, 0) - EVT_WAIT(5) - EVT_CALL(TranslateModel, LVarA, 0, 0, 0) - EVT_WAIT(5) - EVT_CALL(TranslateModel, LVarA, 0, 2, 0) - EVT_WAIT(5) - EVT_CALL(TranslateModel, LVarA, 0, 0, 0) - EVT_WAIT(5) - EVT_CALL(RandInt, 30, LVar0) - EVT_ADD(LVar0, 30) - EVT_WAIT(LVar0) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Label(0) + Call(TranslateModel, LVarA, 0, 2, 0) + Wait(5) + Call(TranslateModel, LVarA, 0, 0, 0) + Wait(5) + Call(TranslateModel, LVarA, 0, 2, 0) + Wait(5) + Call(TranslateModel, LVarA, 0, 0, 0) + Wait(5) + Call(RandInt, 30, LVar0) + Add(LVar0, 30) + Wait(LVar0) + Goto(0) + Return + End }; EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_THREAD - EVT_SET(LVar0, MODEL_h1) - EVT_EXEC(N(EVS_AnimateFlower)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_h3) - EVT_EXEC(N(EVS_AnimateFlower)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_h4) - EVT_EXEC(N(EVS_AnimateFlower)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_h5) - EVT_EXEC(N(EVS_AnimateFlower)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_h6) - EVT_EXEC(N(EVS_AnimateFlower)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_h7) - EVT_EXEC(N(EVS_AnimateFlower)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_h9) - EVT_EXEC(N(EVS_AnimateFlower)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_h10) - EVT_EXEC(N(EVS_AnimateFlower)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_h11) - EVT_EXEC(N(EVS_AnimateFlower)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_h12) - EVT_EXEC(N(EVS_AnimateFlower)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Thread + Set(LVar0, MODEL_h1) + Exec(N(EVS_AnimateFlower)) + Wait(5) + Set(LVar0, MODEL_h3) + Exec(N(EVS_AnimateFlower)) + Wait(5) + Set(LVar0, MODEL_h4) + Exec(N(EVS_AnimateFlower)) + Wait(5) + Set(LVar0, MODEL_h5) + Exec(N(EVS_AnimateFlower)) + Wait(5) + Set(LVar0, MODEL_h6) + Exec(N(EVS_AnimateFlower)) + Wait(5) + Set(LVar0, MODEL_h7) + Exec(N(EVS_AnimateFlower)) + Wait(5) + Set(LVar0, MODEL_h9) + Exec(N(EVS_AnimateFlower)) + Wait(5) + Set(LVar0, MODEL_h10) + Exec(N(EVS_AnimateFlower)) + Wait(5) + Set(LVar0, MODEL_h11) + Exec(N(EVS_AnimateFlower)) + Wait(5) + Set(LVar0, MODEL_h12) + Exec(N(EVS_AnimateFlower)) + EndThread + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_hos/hos_01.inc.c b/src/battle/common/stage/area_hos/hos_01.inc.c index b415eb3c08c..83b69e7fe42 100644 --- a/src/battle/common/stage/area_hos/hos_01.inc.c +++ b/src/battle/common/stage/area_hos/hos_01.inc.c @@ -103,152 +103,152 @@ void N(build_gfx_pink_stars)(s32 index) { } EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_0, MODEL_o345, TRUE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(build_gfx_yellow_stars)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_o345, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelFlags, MODEL_o345, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) - - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_1, MODEL_o338, TRUE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_2, EVT_PTR(N(build_gfx_yellow_stars)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_o338, CUSTOM_GFX_2, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelFlags, MODEL_o338, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) - - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_2, MODEL_o344, TRUE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_3, EVT_PTR(N(build_gfx_yellow_stars)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_o344, CUSTOM_GFX_3, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelFlags, MODEL_o344, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) - - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_3, MODEL_o354, TRUE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_4, EVT_PTR(N(build_gfx_yellow_stars)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_o354, CUSTOM_GFX_4, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelFlags, MODEL_o354, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) - - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_4, MODEL_o341, TRUE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_5, EVT_PTR(N(build_gfx_yellow_stars)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_o341, CUSTOM_GFX_5, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelFlags, MODEL_o341, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) - - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_5, MODEL_o352, TRUE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_6, EVT_PTR(N(build_gfx_blue_stars)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_o352, CUSTOM_GFX_6, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelFlags, MODEL_o352, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) - - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_6, MODEL_o346, TRUE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_7, EVT_PTR(N(build_gfx_blue_stars)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_o346, CUSTOM_GFX_7, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelFlags, MODEL_o346, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) - - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_7, MODEL_o349, TRUE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_8, EVT_PTR(N(build_gfx_green_stars)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_o349, CUSTOM_GFX_8, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelFlags, MODEL_o349, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) - - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_8, MODEL_o353, TRUE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_9, EVT_PTR(N(build_gfx_green_stars)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_o353, CUSTOM_GFX_9, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelFlags, MODEL_o353, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) - - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_9, MODEL_o347, TRUE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_A, EVT_PTR(N(build_gfx_pink_stars)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_o347, CUSTOM_GFX_A, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelFlags, MODEL_o347, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) - - EVT_THREAD - EVT_CALL(SetTexPanner, MODEL_o332, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o334, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o333, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o336, TEX_PANNER_0) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 80) - EVT_ADD(LVar1, -150) - EVT_IF_GT(LVar0, 0x8000) - EVT_ADD(LVar0, -0x8000) - EVT_END_IF - EVT_IF_LT(LVar1, -0x8000) - EVT_ADD(LVar1, 0x8000) - EVT_END_IF - EVT_ADD(LVar2, -50) - EVT_ADD(LVar3, 100) - EVT_IF_LT(LVar2, -0x8000) - EVT_ADD(LVar2, 0x8000) - EVT_END_IF - EVT_IF_GT(LVar3, 0x8000) - EVT_ADD(LVar3, -0x8000) - EVT_END_IF - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, LVar0, LVar1) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_AUX, LVar2, LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LABEL(2) - EVT_CALL(MakeLerp, -7, 7, 30, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o357, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o344, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o361, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o354, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o341, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o362, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(MakeLerp, 7, -7, 30, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o357, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o344, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o361, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o354, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o341, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o362, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_GOTO(2) - EVT_END_THREAD - EVT_THREAD - EVT_LABEL(3) - EVT_CALL(MakeLerp, 7, -7, 30, EASING_COS_IN_OUT) - EVT_LABEL(4) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o363, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o343, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o355, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o338, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(4) - EVT_END_IF - EVT_CALL(MakeLerp, -7, 7, 30, EASING_COS_IN_OUT) - EVT_LABEL(5) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o363, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o343, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o355, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o338, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(5) - EVT_END_IF - EVT_GOTO(3) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + + Call(MakeLocalVertexCopy, VTX_COPY_0, MODEL_o345, TRUE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_1, Ref(N(build_gfx_yellow_stars)), NULL) + Call(SetModelCustomGfx, MODEL_o345, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) + Call(SetModelFlags, MODEL_o345, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) + + Call(MakeLocalVertexCopy, VTX_COPY_1, MODEL_o338, TRUE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_2, Ref(N(build_gfx_yellow_stars)), NULL) + Call(SetModelCustomGfx, MODEL_o338, CUSTOM_GFX_2, ENV_TINT_UNCHANGED) + Call(SetModelFlags, MODEL_o338, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) + + Call(MakeLocalVertexCopy, VTX_COPY_2, MODEL_o344, TRUE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_3, Ref(N(build_gfx_yellow_stars)), NULL) + Call(SetModelCustomGfx, MODEL_o344, CUSTOM_GFX_3, ENV_TINT_UNCHANGED) + Call(SetModelFlags, MODEL_o344, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) + + Call(MakeLocalVertexCopy, VTX_COPY_3, MODEL_o354, TRUE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_4, Ref(N(build_gfx_yellow_stars)), NULL) + Call(SetModelCustomGfx, MODEL_o354, CUSTOM_GFX_4, ENV_TINT_UNCHANGED) + Call(SetModelFlags, MODEL_o354, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) + + Call(MakeLocalVertexCopy, VTX_COPY_4, MODEL_o341, TRUE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_5, Ref(N(build_gfx_yellow_stars)), NULL) + Call(SetModelCustomGfx, MODEL_o341, CUSTOM_GFX_5, ENV_TINT_UNCHANGED) + Call(SetModelFlags, MODEL_o341, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) + + Call(MakeLocalVertexCopy, VTX_COPY_5, MODEL_o352, TRUE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_6, Ref(N(build_gfx_blue_stars)), NULL) + Call(SetModelCustomGfx, MODEL_o352, CUSTOM_GFX_6, ENV_TINT_UNCHANGED) + Call(SetModelFlags, MODEL_o352, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) + + Call(MakeLocalVertexCopy, VTX_COPY_6, MODEL_o346, TRUE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_7, Ref(N(build_gfx_blue_stars)), NULL) + Call(SetModelCustomGfx, MODEL_o346, CUSTOM_GFX_7, ENV_TINT_UNCHANGED) + Call(SetModelFlags, MODEL_o346, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) + + Call(MakeLocalVertexCopy, VTX_COPY_7, MODEL_o349, TRUE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_8, Ref(N(build_gfx_green_stars)), NULL) + Call(SetModelCustomGfx, MODEL_o349, CUSTOM_GFX_8, ENV_TINT_UNCHANGED) + Call(SetModelFlags, MODEL_o349, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) + + Call(MakeLocalVertexCopy, VTX_COPY_8, MODEL_o353, TRUE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_9, Ref(N(build_gfx_green_stars)), NULL) + Call(SetModelCustomGfx, MODEL_o353, CUSTOM_GFX_9, ENV_TINT_UNCHANGED) + Call(SetModelFlags, MODEL_o353, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) + + Call(MakeLocalVertexCopy, VTX_COPY_9, MODEL_o347, TRUE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_A, Ref(N(build_gfx_pink_stars)), NULL) + Call(SetModelCustomGfx, MODEL_o347, CUSTOM_GFX_A, ENV_TINT_UNCHANGED) + Call(SetModelFlags, MODEL_o347, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) + + Thread + Call(SetTexPanner, MODEL_o332, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o334, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o333, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o336, TEX_PANNER_0) + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Set(LVar3, 0) + Loop(0) + Add(LVar0, 80) + Add(LVar1, -150) + IfGt(LVar0, 0x8000) + Add(LVar0, -0x8000) + EndIf + IfLt(LVar1, -0x8000) + Add(LVar1, 0x8000) + EndIf + Add(LVar2, -50) + Add(LVar3, 100) + IfLt(LVar2, -0x8000) + Add(LVar2, 0x8000) + EndIf + IfGt(LVar3, 0x8000) + Add(LVar3, -0x8000) + EndIf + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, LVar0, LVar1) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_AUX, LVar2, LVar3) + Wait(1) + EndLoop + EndThread + Thread + Label(2) + Call(MakeLerp, -7, 7, 30, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o357, 0, LVar0, 0) + Call(TranslateModel, MODEL_o344, 0, LVar0, 0) + Call(TranslateModel, MODEL_o361, 0, LVar0, 0) + Call(TranslateModel, MODEL_o354, 0, LVar0, 0) + Call(TranslateModel, MODEL_o341, 0, LVar0, 0) + Call(TranslateModel, MODEL_o362, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(MakeLerp, 7, -7, 30, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o357, 0, LVar0, 0) + Call(TranslateModel, MODEL_o344, 0, LVar0, 0) + Call(TranslateModel, MODEL_o361, 0, LVar0, 0) + Call(TranslateModel, MODEL_o354, 0, LVar0, 0) + Call(TranslateModel, MODEL_o341, 0, LVar0, 0) + Call(TranslateModel, MODEL_o362, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Goto(2) + EndThread + Thread + Label(3) + Call(MakeLerp, 7, -7, 30, EASING_COS_IN_OUT) + Label(4) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o363, 0, LVar0, 0) + Call(TranslateModel, MODEL_o343, 0, LVar0, 0) + Call(TranslateModel, MODEL_o355, 0, LVar0, 0) + Call(TranslateModel, MODEL_o338, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(4) + EndIf + Call(MakeLerp, -7, 7, 30, EASING_COS_IN_OUT) + Label(5) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o363, 0, LVar0, 0) + Call(TranslateModel, MODEL_o343, 0, LVar0, 0) + Call(TranslateModel, MODEL_o355, 0, LVar0, 0) + Call(TranslateModel, MODEL_o338, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(5) + EndIf + Goto(3) + EndThread + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_hos/hos_02.inc.c b/src/battle/common/stage/area_hos/hos_02.inc.c index 6c1fae159ba..026961789e6 100644 --- a/src/battle/common/stage/area_hos/hos_02.inc.c +++ b/src/battle/common/stage/area_hos/hos_02.inc.c @@ -4,92 +4,92 @@ #define NAMESPACE A(hos_02) EvtScript N(EVS_PreBattle) = { - EVT_THREAD - EVT_CALL(SetTexPanner, MODEL_o372, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_o375, TEX_PANNER_1) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, -50) - EVT_ADD(LVar1, 300) - EVT_ADD(LVar2, 90) - EVT_ADD(LVar3, -200) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, LVar1) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar2, LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVarA, 0) - EVT_LABEL(2) - EVT_CALL(MakeLerp, -7, 7, 40, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o371, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o372, 0, LVar0, 0) - EVT_MUL(LVar0, 3) - EVT_CALL(RotateModel, MODEL_o371, LVarA, 0, 0, 1) - EVT_ADD(LVarA, -3) - EVT_CALL(ClampAngleFloat, LVarA) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(MakeLerp, 7, -7, 40, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o371, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o372, 0, LVar0, 0) - EVT_MUL(LVar0, 3) - EVT_CALL(RotateModel, MODEL_o371, LVarA, 0, 0, 1) - EVT_ADD(LVarA, -3) - EVT_CALL(ClampAngleFloat, LVarA) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_GOTO(2) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVarA, 0) - EVT_LABEL(2) - EVT_CALL(MakeLerp, -10, 4, 40, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o376, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o375, 0, LVar0, 0) - EVT_MUL(LVar0, -3) - EVT_CALL(RotateModel, MODEL_o376, LVarA, 0, 0, 1) - EVT_ADD(LVarA, -3) - EVT_CALL(ClampAngleFloat, LVarA) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(MakeLerp, 4, -10, 40, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o376, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o375, 0, LVar0, 0) - EVT_MUL(LVar0, -3) - EVT_CALL(RotateModel, MODEL_o376, LVarA, 0, 0, 1) - EVT_ADD(LVarA, -3) - EVT_CALL(ClampAngleFloat, LVarA) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_GOTO(2) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + Call(SetTexPanner, MODEL_o372, TEX_PANNER_1) + Call(SetTexPanner, MODEL_o375, TEX_PANNER_1) + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Set(LVar3, 0) + Loop(0) + Add(LVar0, -50) + Add(LVar1, 300) + Add(LVar2, 90) + Add(LVar3, -200) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, LVar1) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar2, LVar3) + Wait(1) + EndLoop + EndThread + Thread + Set(LVarA, 0) + Label(2) + Call(MakeLerp, -7, 7, 40, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o371, 0, LVar0, 0) + Call(TranslateModel, MODEL_o372, 0, LVar0, 0) + Mul(LVar0, 3) + Call(RotateModel, MODEL_o371, LVarA, 0, 0, 1) + Add(LVarA, -3) + Call(ClampAngleFloat, LVarA) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(MakeLerp, 7, -7, 40, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o371, 0, LVar0, 0) + Call(TranslateModel, MODEL_o372, 0, LVar0, 0) + Mul(LVar0, 3) + Call(RotateModel, MODEL_o371, LVarA, 0, 0, 1) + Add(LVarA, -3) + Call(ClampAngleFloat, LVarA) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Goto(2) + EndThread + Thread + Set(LVarA, 0) + Label(2) + Call(MakeLerp, -10, 4, 40, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o376, 0, LVar0, 0) + Call(TranslateModel, MODEL_o375, 0, LVar0, 0) + Mul(LVar0, -3) + Call(RotateModel, MODEL_o376, LVarA, 0, 0, 1) + Add(LVarA, -3) + Call(ClampAngleFloat, LVarA) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(MakeLerp, 4, -10, 40, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o376, 0, LVar0, 0) + Call(TranslateModel, MODEL_o375, 0, LVar0, 0) + Mul(LVar0, -3) + Call(RotateModel, MODEL_o376, LVarA, 0, 0, 1) + Add(LVarA, -3) + Call(ClampAngleFloat, LVarA) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Goto(2) + EndThread + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_isk/isk_00.inc.c b/src/battle/common/stage/area_isk/isk_00.inc.c index 979c418035f..a06334b57dd 100644 --- a/src/battle/common/stage/area_isk/isk_00.inc.c +++ b/src/battle/common/stage/area_isk/isk_00.inc.c @@ -3,15 +3,15 @@ #define NAMESPACE A(isk_00) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_isk/isk_01.inc.c b/src/battle/common/stage/area_isk/isk_01.inc.c index 68e8d1a5c37..862030f6914 100644 --- a/src/battle/common/stage/area_isk/isk_01.inc.c +++ b/src/battle/common/stage/area_isk/isk_01.inc.c @@ -4,15 +4,15 @@ #define NAMESPACE A(isk_01) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_isk/isk_02.inc.c b/src/battle/common/stage/area_isk/isk_02.inc.c index 68d28017640..44864a4eb86 100644 --- a/src/battle/common/stage/area_isk/isk_02.inc.c +++ b/src/battle/common/stage/area_isk/isk_02.inc.c @@ -4,15 +4,15 @@ #define NAMESPACE A(isk_02) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_BTL_ISK) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_BTL_ISK) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_isk/isk_02b.inc.c b/src/battle/common/stage/area_isk/isk_02b.inc.c index eee9e990cfc..3e3115b2a8e 100644 --- a/src/battle/common/stage/area_isk/isk_02b.inc.c +++ b/src/battle/common/stage/area_isk/isk_02b.inc.c @@ -4,21 +4,21 @@ #define NAMESPACE A(isk_02b) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(EnableModel, MODEL_o365, FALSE) - EVT_CALL(EnableModel, MODEL_o366, FALSE) - EVT_CALL(EnableModel, MODEL_o367, FALSE) - EVT_CALL(EnableModel, MODEL_o389, FALSE) - EVT_CALL(EnableModel, MODEL_o390, FALSE) - EVT_CALL(EnableModel, MODEL_o391, FALSE) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(EnableModel, MODEL_o365, FALSE) + Call(EnableModel, MODEL_o366, FALSE) + Call(EnableModel, MODEL_o367, FALSE) + Call(EnableModel, MODEL_o389, FALSE) + Call(EnableModel, MODEL_o390, FALSE) + Call(EnableModel, MODEL_o391, FALSE) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_isk/isk_02c.inc.c b/src/battle/common/stage/area_isk/isk_02c.inc.c index 92ba5730787..23e6d1cc4aa 100644 --- a/src/battle/common/stage/area_isk/isk_02c.inc.c +++ b/src/battle/common/stage/area_isk/isk_02c.inc.c @@ -4,17 +4,17 @@ #define NAMESPACE A(isk_02c) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(EnableModel, MODEL_kai2, FALSE) - EVT_CALL(EnableModel, MODEL_kai1, FALSE) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(EnableModel, MODEL_kai2, FALSE) + Call(EnableModel, MODEL_kai1, FALSE) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_isk/isk_03.inc.c b/src/battle/common/stage/area_isk/isk_03.inc.c index d177ff87461..b55062b6240 100644 --- a/src/battle/common/stage/area_isk/isk_03.inc.c +++ b/src/battle/common/stage/area_isk/isk_03.inc.c @@ -4,15 +4,15 @@ #define NAMESPACE A(isk_03) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_isk/isk_03b.inc.c b/src/battle/common/stage/area_isk/isk_03b.inc.c index 822437b30f1..e3ae373ab9c 100644 --- a/src/battle/common/stage/area_isk/isk_03b.inc.c +++ b/src/battle/common/stage/area_isk/isk_03b.inc.c @@ -4,15 +4,15 @@ #define NAMESPACE A(isk_03b) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_isk/isk_04.inc.c b/src/battle/common/stage/area_isk/isk_04.inc.c index 75c4541e5fb..dc0ac30f679 100644 --- a/src/battle/common/stage/area_isk/isk_04.inc.c +++ b/src/battle/common/stage/area_isk/isk_04.inc.c @@ -20,17 +20,17 @@ API_CALLABLE(N(DeleteTorchFX)) { } EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(N(CreateTorchFX)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(N(CreateTorchFX)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_CALL(N(DeleteTorchFX)) - EVT_RETURN - EVT_END + Call(N(DeleteTorchFX)) + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_isk/isk_05.inc.c b/src/battle/common/stage/area_isk/isk_05.inc.c index 635728b7a70..a6c34093430 100644 --- a/src/battle/common/stage/area_isk/isk_05.inc.c +++ b/src/battle/common/stage/area_isk/isk_05.inc.c @@ -20,17 +20,17 @@ API_CALLABLE(N(DeleteTorchFX)) { } EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(N(CreateTorchFX)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(N(CreateTorchFX)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_CALL(N(DeleteTorchFX)) - EVT_RETURN - EVT_END + Call(N(DeleteTorchFX)) + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_isk/isk_06.inc.c b/src/battle/common/stage/area_isk/isk_06.inc.c index f4ce0c64ff6..90536d14921 100644 --- a/src/battle/common/stage/area_isk/isk_06.inc.c +++ b/src/battle/common/stage/area_isk/isk_06.inc.c @@ -17,17 +17,17 @@ API_CALLABLE(N(DeleteTorchFX)) { } EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(N(CreateTorchFX)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(N(CreateTorchFX)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_CALL(N(DeleteTorchFX)) - EVT_RETURN - EVT_END + Call(N(DeleteTorchFX)) + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_isk/isk_06b.inc.c b/src/battle/common/stage/area_isk/isk_06b.inc.c index 8febb3a156a..b1a8a0f90d9 100644 --- a/src/battle/common/stage/area_isk/isk_06b.inc.c +++ b/src/battle/common/stage/area_isk/isk_06b.inc.c @@ -17,18 +17,18 @@ API_CALLABLE(N(DeleteTorchFX)) { } EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(N(CreateTorchFX)) - EVT_CALL(EnableModel, MODEL_kesu, FALSE) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(N(CreateTorchFX)) + Call(EnableModel, MODEL_kesu, FALSE) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_CALL(N(DeleteTorchFX)) - EVT_RETURN - EVT_END + Call(N(DeleteTorchFX)) + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_isk/isk_07.inc.c b/src/battle/common/stage/area_isk/isk_07.inc.c index c55d67b2efc..7e0ec74bd98 100644 --- a/src/battle/common/stage/area_isk/isk_07.inc.c +++ b/src/battle/common/stage/area_isk/isk_07.inc.c @@ -17,17 +17,17 @@ API_CALLABLE(N(DeleteTorchFX)) { } EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(N(CreateTorchFX)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(N(CreateTorchFX)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_CALL(N(DeleteTorchFX)) - EVT_RETURN - EVT_END + Call(N(DeleteTorchFX)) + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_isk/isk_08.inc.c b/src/battle/common/stage/area_isk/isk_08.inc.c index 6b0b4e4efbe..5a67da2c920 100644 --- a/src/battle/common/stage/area_isk/isk_08.inc.c +++ b/src/battle/common/stage/area_isk/isk_08.inc.c @@ -17,17 +17,17 @@ API_CALLABLE(N(DeleteTorchFX)) { } EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(N(CreateTorchFX)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(N(CreateTorchFX)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_CALL(N(DeleteTorchFX)) - EVT_RETURN - EVT_END + Call(N(DeleteTorchFX)) + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_iwa/iwa_01.inc.c b/src/battle/common/stage/area_iwa/iwa_01.inc.c index 28c09e0553b..cf2d7824016 100644 --- a/src/battle/common/stage/area_iwa/iwa_01.inc.c +++ b/src/battle/common/stage/area_iwa/iwa_01.inc.c @@ -8,15 +8,15 @@ extern ActorBlueprint N(whacka); extern Formation N(WhackaFormation); EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetGroupVisibility, MODEL_b, MODEL_GROUP_HIDDEN) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetGroupVisibility, MODEL_b, MODEL_GROUP_HIDDEN) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_iwa/iwa_01b.inc.c b/src/battle/common/stage/area_iwa/iwa_01b.inc.c index 47e729d4def..754fe04423e 100644 --- a/src/battle/common/stage/area_iwa/iwa_01b.inc.c +++ b/src/battle/common/stage/area_iwa/iwa_01b.inc.c @@ -4,15 +4,15 @@ #define NAMESPACE A(iwa_01b) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetGroupVisibility, MODEL_a, MODEL_GROUP_HIDDEN) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetGroupVisibility, MODEL_a, MODEL_GROUP_HIDDEN) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_iwa/iwa_02.inc.c b/src/battle/common/stage/area_iwa/iwa_02.inc.c index e822a7e5e26..99eca92a2ea 100644 --- a/src/battle/common/stage/area_iwa/iwa_02.inc.c +++ b/src/battle/common/stage/area_iwa/iwa_02.inc.c @@ -7,14 +7,14 @@ extern ActorBlueprint N(whacka); EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_jan/jan_00.inc.c b/src/battle/common/stage/area_jan/jan_00.inc.c index ade8218a63e..972fe7e22f1 100644 --- a/src/battle/common/stage/area_jan/jan_00.inc.c +++ b/src/battle/common/stage/area_jan/jan_00.inc.c @@ -7,22 +7,22 @@ #include "battle/common/stage/lib/BeachEffects.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_SET(LVar0, MODEL_g88) - EVT_EXEC(N(EVS_AnimatePalmLeaves)) - EVT_SET(LVar0, MODEL_g89) - EVT_EXEC(N(EVS_AnimatePalmLeaves)) - EVT_SET(LVar0, MODEL_g86) - EVT_EXEC(N(EVS_AnimateWave)) - EVT_PLAY_EFFECT(EFFECT_SUN, 0, 0, 0, 0, 0, 0, 0) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Set(LVar0, MODEL_g88) + Exec(N(EVS_AnimatePalmLeaves)) + Set(LVar0, MODEL_g89) + Exec(N(EVS_AnimatePalmLeaves)) + Set(LVar0, MODEL_g86) + Exec(N(EVS_AnimateWave)) + PlayEffect(EFFECT_SUN, 0, 0, 0, 0, 0, 0, 0) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_jan/jan_01.inc.c b/src/battle/common/stage/area_jan/jan_01.inc.c index 15124d48622..4b1ad76be68 100644 --- a/src/battle/common/stage/area_jan/jan_01.inc.c +++ b/src/battle/common/stage/area_jan/jan_01.inc.c @@ -6,27 +6,27 @@ #include "battle/common/stage/lib/BeachEffects.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetGroupVisibility, MODEL_g18, MODEL_GROUP_HIDDEN) - EVT_THREAD - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_o55) - EVT_EXEC(N(EVS_AnimateWave)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_o54) - EVT_EXEC(N(EVS_AnimateWave)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_o53) - EVT_EXEC(N(EVS_AnimateWave)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetGroupVisibility, MODEL_g18, MODEL_GROUP_HIDDEN) + Thread + Wait(5) + Set(LVar0, MODEL_o55) + Exec(N(EVS_AnimateWave)) + Wait(5) + Set(LVar0, MODEL_o54) + Exec(N(EVS_AnimateWave)) + Wait(5) + Set(LVar0, MODEL_o53) + Exec(N(EVS_AnimateWave)) + EndThread + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_jan/jan_01b.inc.c b/src/battle/common/stage/area_jan/jan_01b.inc.c index 5c4b7c88a43..8e063fd7075 100644 --- a/src/battle/common/stage/area_jan/jan_01b.inc.c +++ b/src/battle/common/stage/area_jan/jan_01b.inc.c @@ -6,27 +6,27 @@ #include "battle/common/stage/lib/BeachEffects.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetGroupVisibility, MODEL_g17, MODEL_GROUP_HIDDEN) - EVT_THREAD - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_o55) - EVT_EXEC(N(EVS_AnimateWave)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_o54) - EVT_EXEC(N(EVS_AnimateWave)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_o53) - EVT_EXEC(N(EVS_AnimateWave)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetGroupVisibility, MODEL_g17, MODEL_GROUP_HIDDEN) + Thread + Wait(5) + Set(LVar0, MODEL_o55) + Exec(N(EVS_AnimateWave)) + Wait(5) + Set(LVar0, MODEL_o54) + Exec(N(EVS_AnimateWave)) + Wait(5) + Set(LVar0, MODEL_o53) + Exec(N(EVS_AnimateWave)) + EndThread + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_jan/jan_02.inc.c b/src/battle/common/stage/area_jan/jan_02.inc.c index 0e9b3129a0b..41add13837e 100644 --- a/src/battle/common/stage/area_jan/jan_02.inc.c +++ b/src/battle/common/stage/area_jan/jan_02.inc.c @@ -4,15 +4,15 @@ #define NAMESPACE A(jan_02) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_jan/jan_03.inc.c b/src/battle/common/stage/area_jan/jan_03.inc.c index c3dd19be280..c7abb553b19 100644 --- a/src/battle/common/stage/area_jan/jan_03.inc.c +++ b/src/battle/common/stage/area_jan/jan_03.inc.c @@ -4,16 +4,16 @@ #define NAMESPACE A(jan_03) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetGroupVisibility, MODEL_g2, MODEL_GROUP_HIDDEN) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetGroupVisibility, MODEL_g2, MODEL_GROUP_HIDDEN) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_jan/jan_03b.inc.c b/src/battle/common/stage/area_jan/jan_03b.inc.c index 2e1c1f3a4ca..b8ab1a60329 100644 --- a/src/battle/common/stage/area_jan/jan_03b.inc.c +++ b/src/battle/common/stage/area_jan/jan_03b.inc.c @@ -4,16 +4,16 @@ #define NAMESPACE A(jan_03b) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetGroupVisibility, MODEL_g39, MODEL_GROUP_HIDDEN) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetGroupVisibility, MODEL_g39, MODEL_GROUP_HIDDEN) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_jan/jan_04.inc.c b/src/battle/common/stage/area_jan/jan_04.inc.c index 47dca82b591..5bd689c0e0a 100644 --- a/src/battle/common/stage/area_jan/jan_04.inc.c +++ b/src/battle/common/stage/area_jan/jan_04.inc.c @@ -4,16 +4,16 @@ #define NAMESPACE A(jan_04) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetGroupVisibility, MODEL_g111, MODEL_GROUP_HIDDEN) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetGroupVisibility, MODEL_g111, MODEL_GROUP_HIDDEN) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_jan/jan_04b.inc.c b/src/battle/common/stage/area_jan/jan_04b.inc.c index c93f598e89f..dcab2e1dc12 100644 --- a/src/battle/common/stage/area_jan/jan_04b.inc.c +++ b/src/battle/common/stage/area_jan/jan_04b.inc.c @@ -4,16 +4,16 @@ #define NAMESPACE A(jan_04b) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetGroupVisibility, MODEL_g2, MODEL_GROUP_HIDDEN) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetGroupVisibility, MODEL_g2, MODEL_GROUP_HIDDEN) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_kgr/kgr_01.inc.c b/src/battle/common/stage/area_kgr/kgr_01.inc.c index fc71977dd94..2bb76551dd6 100644 --- a/src/battle/common/stage/area_kgr/kgr_01.inc.c +++ b/src/battle/common/stage/area_kgr/kgr_01.inc.c @@ -6,48 +6,48 @@ #include "battle/common/stage/lib/WaterEffects.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_THREAD - EVT_SET(LVar0, MODEL_bin1) - EVT_EXEC(N(EVS_AnimateFlotsam)) - EVT_WAIT(4) - EVT_SET(LVar0, MODEL_bin2) - EVT_EXEC(N(EVS_AnimateFlotsam)) - EVT_WAIT(4) - EVT_SET(LVar0, MODEL_bin3) - EVT_EXEC(N(EVS_AnimateFlotsam)) - EVT_WAIT(4) - EVT_SET(LVar0, MODEL_bin4) - EVT_EXEC(N(EVS_AnimateFlotsam)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, MODEL_hako1) - EVT_EXEC(N(EVS_AnimateFlotsam)) - EVT_WAIT(4) - EVT_SET(LVar0, MODEL_hako2) - EVT_EXEC(N(EVS_AnimateFlotsam)) - EVT_WAIT(4) - EVT_SET(LVar0, MODEL_hako4) - EVT_EXEC(N(EVS_AnimateFlotsam)) - EVT_WAIT(4) - EVT_SET(LVar0, MODEL_hako5) - EVT_EXEC(N(EVS_AnimateFlotsam)) - EVT_WAIT(4) - EVT_SET(LVar0, MODEL_hako6) - EVT_EXEC(N(EVS_AnimateFlotsam)) - EVT_END_THREAD - EVT_SET(LVar0, MODEL_fune2) - EVT_EXEC(N(EVS_AnimateFlotsam)) - EVT_SET(LVar0, MODEL_fune1) - EVT_EXEC(N(EVS_AnimateFlotsam)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Thread + Set(LVar0, MODEL_bin1) + Exec(N(EVS_AnimateFlotsam)) + Wait(4) + Set(LVar0, MODEL_bin2) + Exec(N(EVS_AnimateFlotsam)) + Wait(4) + Set(LVar0, MODEL_bin3) + Exec(N(EVS_AnimateFlotsam)) + Wait(4) + Set(LVar0, MODEL_bin4) + Exec(N(EVS_AnimateFlotsam)) + EndThread + Thread + Set(LVar0, MODEL_hako1) + Exec(N(EVS_AnimateFlotsam)) + Wait(4) + Set(LVar0, MODEL_hako2) + Exec(N(EVS_AnimateFlotsam)) + Wait(4) + Set(LVar0, MODEL_hako4) + Exec(N(EVS_AnimateFlotsam)) + Wait(4) + Set(LVar0, MODEL_hako5) + Exec(N(EVS_AnimateFlotsam)) + Wait(4) + Set(LVar0, MODEL_hako6) + Exec(N(EVS_AnimateFlotsam)) + EndThread + Set(LVar0, MODEL_fune2) + Exec(N(EVS_AnimateFlotsam)) + Set(LVar0, MODEL_fune1) + Exec(N(EVS_AnimateFlotsam)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_kkj/kkj_01.inc.c b/src/battle/common/stage/area_kkj/kkj_01.inc.c index e9fe6a019c1..0308fb6ee90 100644 --- a/src/battle/common/stage/area_kkj/kkj_01.inc.c +++ b/src/battle/common/stage/area_kkj/kkj_01.inc.c @@ -4,14 +4,14 @@ #define NAMESPACE A(kkj_01) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_kkj/kkj_02.inc.c b/src/battle/common/stage/area_kkj/kkj_02.inc.c index 09e028c4153..423ccac5ceb 100644 --- a/src/battle/common/stage/area_kkj/kkj_02.inc.c +++ b/src/battle/common/stage/area_kkj/kkj_02.inc.c @@ -13,19 +13,19 @@ s32 N(RandomBoltPositions)[][7] = { }; EvtScript N(EVS_RandomBolts) = { - EVT_LABEL(0) - EVT_USE_BUF(N(RandomBoltPositions)) - EVT_LOOP(ARRAY_COUNT(N(RandomBoltPositions))) - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_BUF_READ3(LVar3, LVar4, LVar5) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 1, 8, 0) - EVT_CALL(N(SetLightningBoltPurple)) - EVT_BUF_READ1(LVar0) - EVT_WAIT(LVar0) - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + UseBuf(N(RandomBoltPositions)) + Loop(ARRAY_COUNT(N(RandomBoltPositions))) + BufRead3(LVar0, LVar1, LVar2) + BufRead3(LVar3, LVar4, LVar5) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 1, 8, 0) + Call(N(SetLightningBoltPurple)) + BufRead1(LVar0) + Wait(LVar0) + EndLoop + Goto(0) + Return + End }; s32 N(CirculatingBoltPositions)[][7] = { @@ -36,32 +36,32 @@ s32 N(CirculatingBoltPositions)[][7] = { }; EvtScript N(EVS_CirculatingBolts) = { - EVT_LABEL(0) - EVT_USE_BUF(N(CirculatingBoltPositions)) - EVT_LOOP(ARRAY_COUNT(N(CirculatingBoltPositions))) - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_BUF_READ3(LVar3, LVar4, LVar5) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 1, 5, 0) - EVT_CALL(N(SetLightningBoltPurple)) - EVT_BUF_READ1(LVar0) - EVT_WAIT(LVar0) - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + UseBuf(N(CirculatingBoltPositions)) + Loop(ARRAY_COUNT(N(CirculatingBoltPositions))) + BufRead3(LVar0, LVar1, LVar2) + BufRead3(LVar3, LVar4, LVar5) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 1, 5, 0) + Call(N(SetLightningBoltPurple)) + BufRead1(LVar0) + Wait(LVar0) + EndLoop + Goto(0) + Return + End }; EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_EXEC(N(EVS_RandomBolts)) - EVT_EXEC(N(EVS_CirculatingBolts)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Exec(N(EVS_RandomBolts)) + Exec(N(EVS_CirculatingBolts)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_kmr/kmr_02.inc.c b/src/battle/common/stage/area_kmr/kmr_02.inc.c index 7caf79fcda1..350fb023f49 100644 --- a/src/battle/common/stage/area_kmr/kmr_02.inc.c +++ b/src/battle/common/stage/area_kmr/kmr_02.inc.c @@ -3,14 +3,14 @@ #define NAMESPACE A(kmr_02) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_kmr/kmr_03.inc.c b/src/battle/common/stage/area_kmr/kmr_03.inc.c index fc5b74399fe..0b016c18039 100644 --- a/src/battle/common/stage/area_kmr/kmr_03.inc.c +++ b/src/battle/common/stage/area_kmr/kmr_03.inc.c @@ -6,20 +6,20 @@ #include "battle/common/stage/lib/MovingClouds.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SET(LVar0, MODEL_g59) - EVT_SET(LVar2, 0) - EVT_EXEC(N(EVS_AnimateCloud)) - EVT_SET(LVar0, MODEL_g60) - EVT_SET(LVar2, 70) - EVT_EXEC(N(EVS_AnimateCloud)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Set(LVar0, MODEL_g59) + Set(LVar2, 0) + Exec(N(EVS_AnimateCloud)) + Set(LVar0, MODEL_g60) + Set(LVar2, 70) + Exec(N(EVS_AnimateCloud)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_kmr/kmr_04.inc.c b/src/battle/common/stage/area_kmr/kmr_04.inc.c index 029cb0941d4..32105387e9c 100644 --- a/src/battle/common/stage/area_kmr/kmr_04.inc.c +++ b/src/battle/common/stage/area_kmr/kmr_04.inc.c @@ -6,20 +6,20 @@ #include "battle/common/stage/lib/MovingClouds.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SET(LVar0, MODEL_g60) - EVT_SET(LVar2, 0) - EVT_EXEC(N(EVS_AnimateCloud)) - EVT_SET(LVar0, MODEL_g61) - EVT_SET(LVar2, 70) - EVT_EXEC(N(EVS_AnimateCloud)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Set(LVar0, MODEL_g60) + Set(LVar2, 0) + Exec(N(EVS_AnimateCloud)) + Set(LVar0, MODEL_g61) + Set(LVar2, 70) + Exec(N(EVS_AnimateCloud)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_kmr/kmr_05.inc.c b/src/battle/common/stage/area_kmr/kmr_05.inc.c index b69b20b6623..834c4380812 100644 --- a/src/battle/common/stage/area_kmr/kmr_05.inc.c +++ b/src/battle/common/stage/area_kmr/kmr_05.inc.c @@ -6,15 +6,15 @@ #include "battle/common/stage/lib/MovingClouds.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(EnableModel, MODEL_o302, FALSE) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(EnableModel, MODEL_o302, FALSE) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_kmr/kmr_05b.inc.c b/src/battle/common/stage/area_kmr/kmr_05b.inc.c index a770dfce026..7ef0b72dc2c 100644 --- a/src/battle/common/stage/area_kmr/kmr_05b.inc.c +++ b/src/battle/common/stage/area_kmr/kmr_05b.inc.c @@ -6,16 +6,16 @@ #include "battle/common/stage/lib/MovingClouds.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(EnableModel, MODEL_yuka, FALSE) - EVT_CALL(EnableModel, MODEL_o303, FALSE) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(EnableModel, MODEL_yuka, FALSE) + Call(EnableModel, MODEL_o303, FALSE) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_kmr/kmr_06.inc.c b/src/battle/common/stage/area_kmr/kmr_06.inc.c index e6704a7be65..102c6b859ac 100644 --- a/src/battle/common/stage/area_kmr/kmr_06.inc.c +++ b/src/battle/common/stage/area_kmr/kmr_06.inc.c @@ -13,21 +13,21 @@ API_CALLABLE(N(SetupFog)) { } EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(N(SetupFog)) - EVT_SET(LVar0, MODEL_g59) - EVT_SET(LVar2, 0) - EVT_EXEC(N(EVS_AnimateCloud)) - EVT_SET(LVar0, MODEL_g60) - EVT_SET(LVar2, 70) - EVT_EXEC(N(EVS_AnimateCloud)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(N(SetupFog)) + Set(LVar0, MODEL_g59) + Set(LVar2, 0) + Exec(N(EVS_AnimateCloud)) + Set(LVar0, MODEL_g60) + Set(LVar2, 70) + Exec(N(EVS_AnimateCloud)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_kpa/kpa_01.inc.c b/src/battle/common/stage/area_kpa/kpa_01.inc.c index b26a96d52ed..15ef57135a2 100644 --- a/src/battle/common/stage/area_kpa/kpa_01.inc.c +++ b/src/battle/common/stage/area_kpa/kpa_01.inc.c @@ -5,38 +5,38 @@ // blue torches EvtScript N(EVS_TexAnim_Fire) = { - EVT_SET(LVarA, LVar0) - EVT_CALL(SetTexPanner, LVarA, TEX_PANNER_1) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, LVar1) - EVT_ADD(LVar0, 0x8000) - EVT_ADD(LVar1, 0) - EVT_WAIT(5) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Call(SetTexPanner, LVarA, TEX_PANNER_1) + Set(LVar0, 0) + Set(LVar1, 0) + Loop(0) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, LVar1) + Add(LVar0, 0x8000) + Add(LVar1, 0) + Wait(5) + EndLoop + Return + End }; EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetGroupVisibility, MODEL_switch, MODEL_GROUP_HIDDEN) - EVT_THREAD - EVT_SET(LVar0, MODEL_o416) - EVT_EXEC(N(EVS_TexAnim_Fire)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_o418) - EVT_EXEC(N(EVS_TexAnim_Fire)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetGroupVisibility, MODEL_switch, MODEL_GROUP_HIDDEN) + Thread + Set(LVar0, MODEL_o416) + Exec(N(EVS_TexAnim_Fire)) + Wait(5) + Set(LVar0, MODEL_o418) + Exec(N(EVS_TexAnim_Fire)) + EndThread + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_kpa/kpa_01b.inc.c b/src/battle/common/stage/area_kpa/kpa_01b.inc.c index 536a195434c..cc802a08707 100644 --- a/src/battle/common/stage/area_kpa/kpa_01b.inc.c +++ b/src/battle/common/stage/area_kpa/kpa_01b.inc.c @@ -5,35 +5,35 @@ // blue torches EvtScript N(EVS_TexAnim_Fire) = { - EVT_SET(LVarA, LVar0) - EVT_CALL(SetTexPanner, LVarA, TEX_PANNER_1) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, LVar1) - EVT_ADD(LVar0, 0x8000) - EVT_ADD(LVar1, 0) - EVT_WAIT(5) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Call(SetTexPanner, LVarA, TEX_PANNER_1) + Set(LVar0, 0) + Set(LVar1, 0) + Loop(0) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, LVar1) + Add(LVar0, 0x8000) + Add(LVar1, 0) + Wait(5) + EndLoop + Return + End }; EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetGroupVisibility, MODEL_hasira, MODEL_GROUP_HIDDEN) - EVT_SET(LVar0, MODEL_o416) - EVT_EXEC(N(EVS_TexAnim_Fire)) - EVT_SET(LVar0, MODEL_o418) - EVT_EXEC(N(EVS_TexAnim_Fire)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetGroupVisibility, MODEL_hasira, MODEL_GROUP_HIDDEN) + Set(LVar0, MODEL_o416) + Exec(N(EVS_TexAnim_Fire)) + Set(LVar0, MODEL_o418) + Exec(N(EVS_TexAnim_Fire)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_kpa/kpa_02.inc.c b/src/battle/common/stage/area_kpa/kpa_02.inc.c index c954eda1e66..a609107b950 100644 --- a/src/battle/common/stage/area_kpa/kpa_02.inc.c +++ b/src/battle/common/stage/area_kpa/kpa_02.inc.c @@ -6,35 +6,35 @@ #include "battle/common/stage/lib/TexturePanner.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_SET(LVar0, MODEL_2) - EVT_SET(LVar1, TEX_PANNER_1) - EVT_SET(LVar2, -400) - EVT_SET(LVar3, -800) - EVT_EXEC(N(EVS_TexturePanBothU)) - EVT_SET(LVar0, MODEL_4) - EVT_SET(LVar1, TEX_PANNER_3) - EVT_SET(LVar2, -400) - EVT_SET(LVar3, -800) - EVT_EXEC(N(EVS_TexturePanBothU)) - EVT_SET(LVar0, MODEL_1) - EVT_SET(LVar1, TEX_PANNER_0) - EVT_SET(LVar2, -400) - EVT_SET(LVar3, -800) - EVT_EXEC(N(EVS_TexturePanBothV)) - EVT_SET(LVar0, MODEL_3) - EVT_SET(LVar1, TEX_PANNER_2) - EVT_SET(LVar2, -400) - EVT_SET(LVar3, -800) - EVT_EXEC(N(EVS_TexturePanBothV)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Set(LVar0, MODEL_2) + Set(LVar1, TEX_PANNER_1) + Set(LVar2, -400) + Set(LVar3, -800) + Exec(N(EVS_TexturePanBothU)) + Set(LVar0, MODEL_4) + Set(LVar1, TEX_PANNER_3) + Set(LVar2, -400) + Set(LVar3, -800) + Exec(N(EVS_TexturePanBothU)) + Set(LVar0, MODEL_1) + Set(LVar1, TEX_PANNER_0) + Set(LVar2, -400) + Set(LVar3, -800) + Exec(N(EVS_TexturePanBothV)) + Set(LVar0, MODEL_3) + Set(LVar1, TEX_PANNER_2) + Set(LVar2, -400) + Set(LVar3, -800) + Exec(N(EVS_TexturePanBothV)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_kpa/kpa_03.inc.c b/src/battle/common/stage/area_kpa/kpa_03.inc.c index bbf806119df..7fdfe762702 100644 --- a/src/battle/common/stage/area_kpa/kpa_03.inc.c +++ b/src/battle/common/stage/area_kpa/kpa_03.inc.c @@ -5,16 +5,16 @@ #define NAMESPACE A(kpa_03) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetDarknessMode, BTL_DARKNESS_MODE_1) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetDarknessMode, BTL_DARKNESS_MODE_1) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_kpa/kpa_04.inc.c b/src/battle/common/stage/area_kpa/kpa_04.inc.c index 08cc2086c40..42ff4e88b1c 100644 --- a/src/battle/common/stage/area_kpa/kpa_04.inc.c +++ b/src/battle/common/stage/area_kpa/kpa_04.inc.c @@ -5,44 +5,44 @@ // blue torches EvtScript N(EVS_TexAnim_Fire) = { - EVT_SET(LVarA, LVar0) - EVT_CALL(SetTexPanner, LVarA, TEX_PANNER_1) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, LVar1) - EVT_ADD(LVar0, 0x8000) - EVT_ADD(LVar1, 0) - EVT_WAIT(5) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Call(SetTexPanner, LVarA, TEX_PANNER_1) + Set(LVar0, 0) + Set(LVar1, 0) + Loop(0) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, LVar1) + Add(LVar0, 0x8000) + Add(LVar1, 0) + Wait(5) + EndLoop + Return + End }; EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetGroupVisibility, MODEL_g3, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_wa, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_kusari, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_g4, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_hi1, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_hi2, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_hi3, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_hi4, MODEL_GROUP_HIDDEN) - EVT_SET(LVar0, MODEL_o450) - EVT_EXEC(N(EVS_TexAnim_Fire)) - EVT_SET(LVar0, MODEL_o451) - EVT_EXEC(N(EVS_TexAnim_Fire)) - EVT_SET(LVar0, MODEL_o454) - EVT_EXEC(N(EVS_TexAnim_Fire)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetGroupVisibility, MODEL_g3, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_wa, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_kusari, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_g4, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_hi1, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_hi2, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_hi3, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_hi4, MODEL_GROUP_HIDDEN) + Set(LVar0, MODEL_o450) + Exec(N(EVS_TexAnim_Fire)) + Set(LVar0, MODEL_o451) + Exec(N(EVS_TexAnim_Fire)) + Set(LVar0, MODEL_o454) + Exec(N(EVS_TexAnim_Fire)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_kpa/kpa_04b.inc.c b/src/battle/common/stage/area_kpa/kpa_04b.inc.c index 53291a7fc4a..8b43bfbb651 100644 --- a/src/battle/common/stage/area_kpa/kpa_04b.inc.c +++ b/src/battle/common/stage/area_kpa/kpa_04b.inc.c @@ -5,43 +5,43 @@ // blue torches EvtScript N(EVS_TexAnim_Fire) = { - EVT_SET(LVarA, LVar0) - EVT_CALL(SetTexPanner, LVarA, TEX_PANNER_1) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, LVar1) - EVT_ADD(LVar0, 0x8000) - EVT_ADD(LVar1, 0) - EVT_WAIT(5) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Call(SetTexPanner, LVarA, TEX_PANNER_1) + Set(LVar0, 0) + Set(LVar1, 0) + Loop(0) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, LVar1) + Add(LVar0, 0x8000) + Add(LVar1, 0) + Wait(5) + EndLoop + Return + End }; EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetGroupVisibility, MODEL_g2, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_wa, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_kusari, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_hi1, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_hi2, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_hi3, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_hi4, MODEL_GROUP_HIDDEN) - EVT_SET(LVar0, MODEL_o450) - EVT_EXEC(N(EVS_TexAnim_Fire)) - EVT_SET(LVar0, MODEL_o451) - EVT_EXEC(N(EVS_TexAnim_Fire)) - EVT_SET(LVar0, MODEL_o454) - EVT_EXEC(N(EVS_TexAnim_Fire)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetGroupVisibility, MODEL_g2, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_wa, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_kusari, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_hi1, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_hi2, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_hi3, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_hi4, MODEL_GROUP_HIDDEN) + Set(LVar0, MODEL_o450) + Exec(N(EVS_TexAnim_Fire)) + Set(LVar0, MODEL_o451) + Exec(N(EVS_TexAnim_Fire)) + Set(LVar0, MODEL_o454) + Exec(N(EVS_TexAnim_Fire)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_kpa/kpa_04c.inc.c b/src/battle/common/stage/area_kpa/kpa_04c.inc.c index 365099fe7b3..290f44d0468 100644 --- a/src/battle/common/stage/area_kpa/kpa_04c.inc.c +++ b/src/battle/common/stage/area_kpa/kpa_04c.inc.c @@ -5,44 +5,44 @@ // blue torches EvtScript N(EVS_TexAnim_Fire) = { - EVT_SET(LVarA, LVar0) - EVT_CALL(SetTexPanner, LVarA, TEX_PANNER_1) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, LVar1) - EVT_ADD(LVar0, 0x8000) - EVT_ADD(LVar1, 0) - EVT_WAIT(5) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Call(SetTexPanner, LVarA, TEX_PANNER_1) + Set(LVar0, 0) + Set(LVar1, 0) + Loop(0) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, LVar1) + Add(LVar0, 0x8000) + Add(LVar1, 0) + Wait(5) + EndLoop + Return + End }; EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetGroupVisibility, MODEL_o415, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_o453, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_o452, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_o454, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_o451, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_o450, MODEL_GROUP_HIDDEN) - EVT_SET(LVar0, MODEL_hi1) - EVT_EXEC(N(EVS_TexAnim_Fire)) - EVT_SET(LVar0, MODEL_hi2) - EVT_EXEC(N(EVS_TexAnim_Fire)) - EVT_SET(LVar0, MODEL_hi3) - EVT_EXEC(N(EVS_TexAnim_Fire)) - EVT_SET(LVar0, MODEL_hi4) - EVT_EXEC(N(EVS_TexAnim_Fire)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetGroupVisibility, MODEL_o415, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_o453, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_o452, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_o454, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_o451, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_o450, MODEL_GROUP_HIDDEN) + Set(LVar0, MODEL_hi1) + Exec(N(EVS_TexAnim_Fire)) + Set(LVar0, MODEL_hi2) + Exec(N(EVS_TexAnim_Fire)) + Set(LVar0, MODEL_hi3) + Exec(N(EVS_TexAnim_Fire)) + Set(LVar0, MODEL_hi4) + Exec(N(EVS_TexAnim_Fire)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_kpa/kpa_05.inc.c b/src/battle/common/stage/area_kpa/kpa_05.inc.c index 5ba65ec90a2..274bac10516 100644 --- a/src/battle/common/stage/area_kpa/kpa_05.inc.c +++ b/src/battle/common/stage/area_kpa/kpa_05.inc.c @@ -4,15 +4,15 @@ #define NAMESPACE A(kpa_05) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_kpa/kpa_07.inc.c b/src/battle/common/stage/area_kpa/kpa_07.inc.c index e6e53e99e01..393e473ac32 100644 --- a/src/battle/common/stage/area_kpa/kpa_07.inc.c +++ b/src/battle/common/stage/area_kpa/kpa_07.inc.c @@ -6,30 +6,30 @@ #include "battle/common/stage/lib/TexturePanner.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_SET(LVar0, MODEL_kemu2) - EVT_SET(LVar1, TEX_PANNER_0) - EVT_SET(LVar2, -200) - EVT_SET(LVar3, 0) - EVT_EXEC(N(EVS_TexturePanMain)) - EVT_SET(LVar0, MODEL_kemu1) - EVT_SET(LVar1, TEX_PANNER_1) - EVT_SET(LVar2, -120) - EVT_SET(LVar3, 0) - EVT_EXEC(N(EVS_TexturePanMain)) - EVT_SET(LVar0, MODEL_kemu3) - EVT_SET(LVar1, TEX_PANNER_2) - EVT_SET(LVar2, -100) - EVT_SET(LVar3, 0) - EVT_EXEC(N(EVS_TexturePanMain)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Set(LVar0, MODEL_kemu2) + Set(LVar1, TEX_PANNER_0) + Set(LVar2, -200) + Set(LVar3, 0) + Exec(N(EVS_TexturePanMain)) + Set(LVar0, MODEL_kemu1) + Set(LVar1, TEX_PANNER_1) + Set(LVar2, -120) + Set(LVar3, 0) + Exec(N(EVS_TexturePanMain)) + Set(LVar0, MODEL_kemu3) + Set(LVar1, TEX_PANNER_2) + Set(LVar2, -100) + Set(LVar3, 0) + Exec(N(EVS_TexturePanMain)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_kpa/kpa_08.inc.c b/src/battle/common/stage/area_kpa/kpa_08.inc.c index 301c3bbd765..efe756c85f5 100644 --- a/src/battle/common/stage/area_kpa/kpa_08.inc.c +++ b/src/battle/common/stage/area_kpa/kpa_08.inc.c @@ -4,15 +4,15 @@ #define NAMESPACE A(kpa_08) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_kpa/kpa_09.inc.c b/src/battle/common/stage/area_kpa/kpa_09.inc.c index 887ddb774ee..adf3e2bc9d5 100644 --- a/src/battle/common/stage/area_kpa/kpa_09.inc.c +++ b/src/battle/common/stage/area_kpa/kpa_09.inc.c @@ -4,15 +4,15 @@ #define NAMESPACE A(kpa_09) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_kpa/kpa_11.inc.c b/src/battle/common/stage/area_kpa/kpa_11.inc.c index ab4fb9a66d2..fc23c048978 100644 --- a/src/battle/common/stage/area_kpa/kpa_11.inc.c +++ b/src/battle/common/stage/area_kpa/kpa_11.inc.c @@ -4,15 +4,15 @@ #define NAMESPACE A(kpa_11) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_kpa/kpa_13.inc.c b/src/battle/common/stage/area_kpa/kpa_13.inc.c index 503f881ff38..f12fd25b617 100644 --- a/src/battle/common/stage/area_kpa/kpa_13.inc.c +++ b/src/battle/common/stage/area_kpa/kpa_13.inc.c @@ -5,30 +5,30 @@ // blue torches EvtScript N(EVS_TexAnim_Fire) = { - EVT_SET(LVarA, LVar0) - EVT_CALL(SetTexPanner, LVarA, TEX_PANNER_1) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, LVar1) - EVT_ADD(LVar0, 0x8000) - EVT_ADD(LVar1, 0) - EVT_WAIT(5) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Call(SetTexPanner, LVarA, TEX_PANNER_1) + Set(LVar0, 0) + Set(LVar1, 0) + Loop(0) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, LVar1) + Add(LVar0, 0x8000) + Add(LVar1, 0) + Wait(5) + EndLoop + Return + End }; EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_kpa/kpa_14.inc.c b/src/battle/common/stage/area_kpa/kpa_14.inc.c index cdea944402a..d1fd60f3026 100644 --- a/src/battle/common/stage/area_kpa/kpa_14.inc.c +++ b/src/battle/common/stage/area_kpa/kpa_14.inc.c @@ -5,30 +5,30 @@ // blue torches EvtScript N(EVS_TexAnim_Fire) = { - EVT_SET(LVarA, LVar0) - EVT_CALL(SetTexPanner, LVarA, TEX_PANNER_1) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, LVar1) - EVT_ADD(LVar0, 0x8000) - EVT_ADD(LVar1, 0) - EVT_WAIT(5) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Call(SetTexPanner, LVarA, TEX_PANNER_1) + Set(LVar0, 0) + Set(LVar1, 0) + Loop(0) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, LVar1) + Add(LVar0, 0x8000) + Add(LVar1, 0) + Wait(5) + EndLoop + Return + End }; EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_kzn/Decorations.inc.c b/src/battle/common/stage/area_kzn/Decorations.inc.c index 9be52c875b9..4d540f4ec50 100644 --- a/src/battle/common/stage/area_kzn/Decorations.inc.c +++ b/src/battle/common/stage/area_kzn/Decorations.inc.c @@ -1,65 +1,65 @@ #include "battle/battle.h" EvtScript N(EVS_TexPan_Lava) = { - EVT_SET(LVarA, LVar1) - EVT_CALL(SetTexPanner, LVar0, LVar1) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, LVarA, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, LVarA, TEX_PANNER_AUX, LVar1, 0) - EVT_SUB(LVar0, -300) - EVT_SUB(LVar1, -500) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVarA, LVar1) + Call(SetTexPanner, LVar0, LVar1) + Set(LVar0, 0) + Set(LVar1, 0) + Loop(0) + Call(SetTexPanOffset, LVarA, TEX_PANNER_MAIN, LVar0, 0) + Call(SetTexPanOffset, LVarA, TEX_PANNER_AUX, LVar1, 0) + Sub(LVar0, -300) + Sub(LVar1, -500) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_TexAnim_LavaBubble) = { - EVT_SET(LVarA, LVar1) - EVT_CALL(SetTexPanner, LVar0, LVar1) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, LVarA, TEX_PANNER_MAIN, LVar0, LVar1) - EVT_ADD(LVar0, 0x4000) - EVT_ADD(LVar1, 0) - EVT_WAIT(5) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVarA, LVar1) + Call(SetTexPanner, LVar0, LVar1) + Set(LVar0, 0) + Set(LVar1, 0) + Loop(0) + Call(SetTexPanOffset, LVarA, TEX_PANNER_MAIN, LVar0, LVar1) + Add(LVar0, 0x4000) + Add(LVar1, 0) + Wait(5) + EndLoop + Return + End }; EvtScript N(EVS_MovingPlatform) = { - EVT_SET(LVarA, LVar0) // modelID - EVT_SET(LVar9, LVar1) // start X - EVT_SET(LVar8, LVar2) // end X - EVT_SET(LVar7, LVar3) // move time - EVT_LABEL(0) - EVT_SET(LVar2, LVar8) - EVT_ADD(LVar2, LVar9) - EVT_CALL(MakeLerp, LVar8, LVar2, LVar7, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, LVarA, LVar0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(LVar2, LVar8) - EVT_ADD(LVar2, LVar9) - EVT_CALL(MakeLerp, LVar2, LVar8, LVar7, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, LVarA, LVar0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) // modelID + Set(LVar9, LVar1) // start X + Set(LVar8, LVar2) // end X + Set(LVar7, LVar3) // move time + Label(0) + Set(LVar2, LVar8) + Add(LVar2, LVar9) + Call(MakeLerp, LVar8, LVar2, LVar7, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, LVarA, LVar0, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Set(LVar2, LVar8) + Add(LVar2, LVar9) + Call(MakeLerp, LVar2, LVar8, LVar7, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, LVarA, LVar0, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Goto(0) + Return + End }; diff --git a/src/battle/common/stage/area_kzn/kzn_01.inc.c b/src/battle/common/stage/area_kzn/kzn_01.inc.c index b9b1ff65e0b..de57464fcbc 100644 --- a/src/battle/common/stage/area_kzn/kzn_01.inc.c +++ b/src/battle/common/stage/area_kzn/kzn_01.inc.c @@ -4,16 +4,16 @@ #define NAMESPACE A(kzn_01) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetGroupVisibility, MODEL_o363, MODEL_GROUP_HIDDEN) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetGroupVisibility, MODEL_o363, MODEL_GROUP_HIDDEN) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_kzn/kzn_01b.inc.c b/src/battle/common/stage/area_kzn/kzn_01b.inc.c index 6b4c8c5ee85..9fbcf7a5f29 100644 --- a/src/battle/common/stage/area_kzn/kzn_01b.inc.c +++ b/src/battle/common/stage/area_kzn/kzn_01b.inc.c @@ -4,15 +4,15 @@ #define NAMESPACE A(kzn_01b) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_kzn/kzn_02.inc.c b/src/battle/common/stage/area_kzn/kzn_02.inc.c index 688a77fa011..f2969b66c17 100644 --- a/src/battle/common/stage/area_kzn/kzn_02.inc.c +++ b/src/battle/common/stage/area_kzn/kzn_02.inc.c @@ -6,41 +6,41 @@ #include "./Decorations.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_SET(LVar0, MODEL_yougan) - EVT_SET(LVar1, TEX_PANNER_0) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_y1_1) - EVT_SET(LVar1, TEX_PANNER_1) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_y1_2) - EVT_SET(LVar1, TEX_PANNER_2) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_y2_1) - EVT_SET(LVar1, TEX_PANNER_3) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_y2_2) - EVT_SET(LVar1, TEX_PANNER_4) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_y3_1) - EVT_SET(LVar1, TEX_PANNER_5) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_y3_2) - EVT_SET(LVar1, TEX_PANNER_6) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_move) - EVT_SET(LVar1, 180) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 200) - EVT_EXEC(N(EVS_MovingPlatform)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Set(LVar0, MODEL_yougan) + Set(LVar1, TEX_PANNER_0) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_y1_1) + Set(LVar1, TEX_PANNER_1) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_y1_2) + Set(LVar1, TEX_PANNER_2) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_y2_1) + Set(LVar1, TEX_PANNER_3) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_y2_2) + Set(LVar1, TEX_PANNER_4) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_y3_1) + Set(LVar1, TEX_PANNER_5) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_y3_2) + Set(LVar1, TEX_PANNER_6) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_move) + Set(LVar1, 180) + Set(LVar2, 0) + Set(LVar3, 200) + Exec(N(EVS_MovingPlatform)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_kzn/kzn_04.inc.c b/src/battle/common/stage/area_kzn/kzn_04.inc.c index 7f209ecc94c..08ca6f0c10d 100644 --- a/src/battle/common/stage/area_kzn/kzn_04.inc.c +++ b/src/battle/common/stage/area_kzn/kzn_04.inc.c @@ -6,47 +6,47 @@ #include "./Decorations.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetGroupVisibility, MODEL_08, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_16, MODEL_GROUP_HIDDEN) - EVT_SET(LVar0, MODEL_y2_1) - EVT_SET(LVar1, TEX_PANNER_0) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_y2_2) - EVT_SET(LVar1, TEX_PANNER_1) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_y3_1) - EVT_SET(LVar1, TEX_PANNER_2) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_y3_2) - EVT_SET(LVar1, TEX_PANNER_3) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_yougan) - EVT_SET(LVar1, TEX_PANNER_4) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_6_you1) - EVT_SET(LVar1, TEX_PANNER_5) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_6_you2) - EVT_SET(LVar1, TEX_PANNER_6) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_tri) - EVT_SET(LVar1, TEX_PANNER_7) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_awa1) - EVT_SET(LVar1, TEX_PANNER_8) - EVT_EXEC(N(EVS_TexAnim_LavaBubble)) - EVT_SET(LVar0, MODEL_awa2) - EVT_SET(LVar1, TEX_PANNER_9) - EVT_EXEC(N(EVS_TexAnim_LavaBubble)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetGroupVisibility, MODEL_08, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_16, MODEL_GROUP_HIDDEN) + Set(LVar0, MODEL_y2_1) + Set(LVar1, TEX_PANNER_0) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_y2_2) + Set(LVar1, TEX_PANNER_1) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_y3_1) + Set(LVar1, TEX_PANNER_2) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_y3_2) + Set(LVar1, TEX_PANNER_3) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_yougan) + Set(LVar1, TEX_PANNER_4) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_6_you1) + Set(LVar1, TEX_PANNER_5) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_6_you2) + Set(LVar1, TEX_PANNER_6) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_tri) + Set(LVar1, TEX_PANNER_7) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_awa1) + Set(LVar1, TEX_PANNER_8) + Exec(N(EVS_TexAnim_LavaBubble)) + Set(LVar0, MODEL_awa2) + Set(LVar1, TEX_PANNER_9) + Exec(N(EVS_TexAnim_LavaBubble)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_kzn/kzn_04b.inc.c b/src/battle/common/stage/area_kzn/kzn_04b.inc.c index 8777976ae91..d3917029291 100644 --- a/src/battle/common/stage/area_kzn/kzn_04b.inc.c +++ b/src/battle/common/stage/area_kzn/kzn_04b.inc.c @@ -6,47 +6,47 @@ #include "./Decorations.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetGroupVisibility, MODEL_06, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_16, MODEL_GROUP_HIDDEN) - EVT_SET(LVar0, MODEL_y2_1) - EVT_SET(LVar1, TEX_PANNER_0) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_y2_2) - EVT_SET(LVar1, TEX_PANNER_1) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_y3_1) - EVT_SET(LVar1, TEX_PANNER_2) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_y3_2) - EVT_SET(LVar1, TEX_PANNER_3) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_yougan) - EVT_SET(LVar1, TEX_PANNER_4) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_y1_1) - EVT_SET(LVar1, TEX_PANNER_5) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_y1_2) - EVT_SET(LVar1, TEX_PANNER_6) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_tri) - EVT_SET(LVar1, TEX_PANNER_7) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_awa1) - EVT_SET(LVar1, TEX_PANNER_8) - EVT_EXEC(N(EVS_TexAnim_LavaBubble)) - EVT_SET(LVar0, MODEL_awa2) - EVT_SET(LVar1, TEX_PANNER_9) - EVT_EXEC(N(EVS_TexAnim_LavaBubble)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetGroupVisibility, MODEL_06, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_16, MODEL_GROUP_HIDDEN) + Set(LVar0, MODEL_y2_1) + Set(LVar1, TEX_PANNER_0) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_y2_2) + Set(LVar1, TEX_PANNER_1) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_y3_1) + Set(LVar1, TEX_PANNER_2) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_y3_2) + Set(LVar1, TEX_PANNER_3) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_yougan) + Set(LVar1, TEX_PANNER_4) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_y1_1) + Set(LVar1, TEX_PANNER_5) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_y1_2) + Set(LVar1, TEX_PANNER_6) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_tri) + Set(LVar1, TEX_PANNER_7) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_awa1) + Set(LVar1, TEX_PANNER_8) + Exec(N(EVS_TexAnim_LavaBubble)) + Set(LVar0, MODEL_awa2) + Set(LVar1, TEX_PANNER_9) + Exec(N(EVS_TexAnim_LavaBubble)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_kzn/kzn_04c.inc.c b/src/battle/common/stage/area_kzn/kzn_04c.inc.c index 74d287da9d3..81d5a89a130 100644 --- a/src/battle/common/stage/area_kzn/kzn_04c.inc.c +++ b/src/battle/common/stage/area_kzn/kzn_04c.inc.c @@ -6,41 +6,41 @@ #include "./Decorations.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetGroupVisibility, MODEL_06, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_08, MODEL_GROUP_HIDDEN) - EVT_SET(LVar0, MODEL_y2_1) - EVT_SET(LVar1, TEX_PANNER_0) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_y2_2) - EVT_SET(LVar1, TEX_PANNER_1) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_y3_1) - EVT_SET(LVar1, TEX_PANNER_2) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_y3_2) - EVT_SET(LVar1, TEX_PANNER_3) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_yougan) - EVT_SET(LVar1, TEX_PANNER_4) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_tri) - EVT_SET(LVar1, TEX_PANNER_7) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_awa1) - EVT_SET(LVar1, TEX_PANNER_8) - EVT_EXEC(N(EVS_TexAnim_LavaBubble)) - EVT_SET(LVar0, MODEL_awa2) - EVT_SET(LVar1, TEX_PANNER_9) - EVT_EXEC(N(EVS_TexAnim_LavaBubble)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetGroupVisibility, MODEL_06, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_08, MODEL_GROUP_HIDDEN) + Set(LVar0, MODEL_y2_1) + Set(LVar1, TEX_PANNER_0) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_y2_2) + Set(LVar1, TEX_PANNER_1) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_y3_1) + Set(LVar1, TEX_PANNER_2) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_y3_2) + Set(LVar1, TEX_PANNER_3) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_yougan) + Set(LVar1, TEX_PANNER_4) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_tri) + Set(LVar1, TEX_PANNER_7) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_awa1) + Set(LVar1, TEX_PANNER_8) + Exec(N(EVS_TexAnim_LavaBubble)) + Set(LVar0, MODEL_awa2) + Set(LVar1, TEX_PANNER_9) + Exec(N(EVS_TexAnim_LavaBubble)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_kzn/kzn_05.inc.c b/src/battle/common/stage/area_kzn/kzn_05.inc.c index baa2272d4d8..69861cbfe4b 100644 --- a/src/battle/common/stage/area_kzn/kzn_05.inc.c +++ b/src/battle/common/stage/area_kzn/kzn_05.inc.c @@ -6,92 +6,92 @@ #include "./Decorations.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_SET(LVar0, MODEL_yougan2) - EVT_SET(LVar1, TEX_PANNER_0) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_yougan) - EVT_SET(LVar1, TEX_PANNER_1) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_SET(LVar0, MODEL_awa1) - EVT_SET(LVar1, TEX_PANNER_2) - EVT_EXEC(N(EVS_TexAnim_LavaBubble)) - EVT_SET(LVar0, MODEL_awa2) - EVT_SET(LVar1, TEX_PANNER_3) - EVT_EXEC(N(EVS_TexAnim_LavaBubble)) - EVT_SET(LVar0, MODEL_awa3) - EVT_SET(LVar1, TEX_PANNER_4) - EVT_EXEC(N(EVS_TexAnim_LavaBubble)) - EVT_SET(LVar0, MODEL_awa4) - EVT_SET(LVar1, TEX_PANNER_5) - EVT_EXEC(N(EVS_TexAnim_LavaBubble)) - EVT_CALL(EnableModel, MODEL_p00, FALSE) - EVT_CALL(EnableModel, MODEL_p01, FALSE) - EVT_CALL(EnableModel, MODEL_p02, FALSE) - EVT_CALL(EnableModel, MODEL_p03, FALSE) - EVT_CALL(EnableModel, MODEL_p04, FALSE) - EVT_CALL(EnableModel, MODEL_p05, FALSE) - EVT_CALL(EnableModel, MODEL_p06, FALSE) - EVT_CALL(EnableModel, MODEL_p07, FALSE) - EVT_CALL(EnableModel, MODEL_p08, FALSE) - EVT_CALL(EnableModel, MODEL_p09, FALSE) - EVT_CALL(EnableModel, MODEL_p10, FALSE) - EVT_CALL(EnableModel, MODEL_p11, FALSE) - EVT_CALL(EnableModel, MODEL_p12, FALSE) - EVT_CALL(EnableModel, MODEL_q00, FALSE) - EVT_CALL(EnableModel, MODEL_q01, FALSE) - EVT_CALL(EnableModel, MODEL_q02, FALSE) - EVT_CALL(EnableModel, MODEL_q03, FALSE) - EVT_CALL(EnableModel, MODEL_q04, FALSE) - EVT_CALL(EnableModel, MODEL_q05, FALSE) - EVT_CALL(EnableModel, MODEL_q06, FALSE) - EVT_CALL(EnableModel, MODEL_q07, FALSE) - EVT_CALL(EnableModel, MODEL_q08, FALSE) - EVT_CALL(EnableModel, MODEL_q09, FALSE) - EVT_CALL(EnableModel, MODEL_q10, FALSE) - EVT_CALL(EnableModel, MODEL_q11, FALSE) - EVT_CALL(EnableModel, MODEL_q12, FALSE) - EVT_CALL(EnableModel, MODEL_r00, FALSE) - EVT_CALL(EnableModel, MODEL_r01, FALSE) - EVT_CALL(EnableModel, MODEL_r02, FALSE) - EVT_CALL(EnableModel, MODEL_r03, FALSE) - EVT_CALL(EnableModel, MODEL_r04, FALSE) - EVT_CALL(EnableModel, MODEL_r05, FALSE) - EVT_CALL(EnableModel, MODEL_r06, FALSE) - EVT_CALL(EnableModel, MODEL_r07, FALSE) - EVT_CALL(EnableModel, MODEL_r08, FALSE) - EVT_CALL(EnableModel, MODEL_r09, FALSE) - EVT_CALL(EnableModel, MODEL_r10, FALSE) - EVT_CALL(EnableModel, MODEL_r11, FALSE) - EVT_CALL(EnableModel, MODEL_r12, FALSE) - EVT_CALL(EnableModel, MODEL_s01, FALSE) - EVT_CALL(EnableModel, MODEL_s02, FALSE) - EVT_CALL(EnableModel, MODEL_s03, FALSE) - EVT_CALL(EnableModel, MODEL_s04, FALSE) - EVT_CALL(EnableModel, MODEL_s05, FALSE) - EVT_CALL(EnableModel, MODEL_s06, FALSE) - EVT_CALL(EnableModel, MODEL_s07, FALSE) - EVT_CALL(EnableModel, MODEL_s08, FALSE) - EVT_CALL(EnableModel, MODEL_s09, FALSE) - EVT_CALL(EnableModel, MODEL_h01, FALSE) - EVT_CALL(EnableModel, MODEL_h02, FALSE) - EVT_CALL(EnableModel, MODEL_h03, FALSE) - EVT_CALL(EnableModel, MODEL_h04, FALSE) - EVT_CALL(EnableModel, MODEL_h05, FALSE) - EVT_CALL(EnableModel, MODEL_h06, FALSE) - EVT_CALL(EnableModel, MODEL_h07, FALSE) - EVT_CALL(EnableModel, MODEL_h08, FALSE) - EVT_CALL(EnableModel, MODEL_h09, FALSE) - EVT_CALL(EnableModel, MODEL_h10, FALSE) - EVT_CALL(EnableModel, MODEL_h11, FALSE) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Set(LVar0, MODEL_yougan2) + Set(LVar1, TEX_PANNER_0) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_yougan) + Set(LVar1, TEX_PANNER_1) + Exec(N(EVS_TexPan_Lava)) + Set(LVar0, MODEL_awa1) + Set(LVar1, TEX_PANNER_2) + Exec(N(EVS_TexAnim_LavaBubble)) + Set(LVar0, MODEL_awa2) + Set(LVar1, TEX_PANNER_3) + Exec(N(EVS_TexAnim_LavaBubble)) + Set(LVar0, MODEL_awa3) + Set(LVar1, TEX_PANNER_4) + Exec(N(EVS_TexAnim_LavaBubble)) + Set(LVar0, MODEL_awa4) + Set(LVar1, TEX_PANNER_5) + Exec(N(EVS_TexAnim_LavaBubble)) + Call(EnableModel, MODEL_p00, FALSE) + Call(EnableModel, MODEL_p01, FALSE) + Call(EnableModel, MODEL_p02, FALSE) + Call(EnableModel, MODEL_p03, FALSE) + Call(EnableModel, MODEL_p04, FALSE) + Call(EnableModel, MODEL_p05, FALSE) + Call(EnableModel, MODEL_p06, FALSE) + Call(EnableModel, MODEL_p07, FALSE) + Call(EnableModel, MODEL_p08, FALSE) + Call(EnableModel, MODEL_p09, FALSE) + Call(EnableModel, MODEL_p10, FALSE) + Call(EnableModel, MODEL_p11, FALSE) + Call(EnableModel, MODEL_p12, FALSE) + Call(EnableModel, MODEL_q00, FALSE) + Call(EnableModel, MODEL_q01, FALSE) + Call(EnableModel, MODEL_q02, FALSE) + Call(EnableModel, MODEL_q03, FALSE) + Call(EnableModel, MODEL_q04, FALSE) + Call(EnableModel, MODEL_q05, FALSE) + Call(EnableModel, MODEL_q06, FALSE) + Call(EnableModel, MODEL_q07, FALSE) + Call(EnableModel, MODEL_q08, FALSE) + Call(EnableModel, MODEL_q09, FALSE) + Call(EnableModel, MODEL_q10, FALSE) + Call(EnableModel, MODEL_q11, FALSE) + Call(EnableModel, MODEL_q12, FALSE) + Call(EnableModel, MODEL_r00, FALSE) + Call(EnableModel, MODEL_r01, FALSE) + Call(EnableModel, MODEL_r02, FALSE) + Call(EnableModel, MODEL_r03, FALSE) + Call(EnableModel, MODEL_r04, FALSE) + Call(EnableModel, MODEL_r05, FALSE) + Call(EnableModel, MODEL_r06, FALSE) + Call(EnableModel, MODEL_r07, FALSE) + Call(EnableModel, MODEL_r08, FALSE) + Call(EnableModel, MODEL_r09, FALSE) + Call(EnableModel, MODEL_r10, FALSE) + Call(EnableModel, MODEL_r11, FALSE) + Call(EnableModel, MODEL_r12, FALSE) + Call(EnableModel, MODEL_s01, FALSE) + Call(EnableModel, MODEL_s02, FALSE) + Call(EnableModel, MODEL_s03, FALSE) + Call(EnableModel, MODEL_s04, FALSE) + Call(EnableModel, MODEL_s05, FALSE) + Call(EnableModel, MODEL_s06, FALSE) + Call(EnableModel, MODEL_s07, FALSE) + Call(EnableModel, MODEL_s08, FALSE) + Call(EnableModel, MODEL_s09, FALSE) + Call(EnableModel, MODEL_h01, FALSE) + Call(EnableModel, MODEL_h02, FALSE) + Call(EnableModel, MODEL_h03, FALSE) + Call(EnableModel, MODEL_h04, FALSE) + Call(EnableModel, MODEL_h05, FALSE) + Call(EnableModel, MODEL_h06, FALSE) + Call(EnableModel, MODEL_h07, FALSE) + Call(EnableModel, MODEL_h08, FALSE) + Call(EnableModel, MODEL_h09, FALSE) + Call(EnableModel, MODEL_h10, FALSE) + Call(EnableModel, MODEL_h11, FALSE) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_mac/mac_01.inc.c b/src/battle/common/stage/area_mac/mac_01.inc.c index 7a0f71af8b5..2d99ba115e0 100644 --- a/src/battle/common/stage/area_mac/mac_01.inc.c +++ b/src/battle/common/stage/area_mac/mac_01.inc.c @@ -6,30 +6,30 @@ #include "battle/common/stage/lib/WaterEffects.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_THREAD - EVT_SET(LVar0, MODEL_nami4) - EVT_EXEC(N(EVS_AnimateWaveModel)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_nami3) - EVT_EXEC(N(EVS_AnimateWaveModel)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_nami2) - EVT_EXEC(N(EVS_AnimateWaveModel)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_nami1) - EVT_EXEC(N(EVS_AnimateWaveModel)) - EVT_END_THREAD - EVT_SET(LVar0, MODEL_o391) - EVT_EXEC(N(EVS_AnimateFishModel)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Thread + Set(LVar0, MODEL_nami4) + Exec(N(EVS_AnimateWaveModel)) + Wait(5) + Set(LVar0, MODEL_nami3) + Exec(N(EVS_AnimateWaveModel)) + Wait(5) + Set(LVar0, MODEL_nami2) + Exec(N(EVS_AnimateWaveModel)) + Wait(5) + Set(LVar0, MODEL_nami1) + Exec(N(EVS_AnimateWaveModel)) + EndThread + Set(LVar0, MODEL_o391) + Exec(N(EVS_AnimateFishModel)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_mac/mac_02.inc.c b/src/battle/common/stage/area_mac/mac_02.inc.c index 04bb4a1f25d..c81f415150d 100644 --- a/src/battle/common/stage/area_mac/mac_02.inc.c +++ b/src/battle/common/stage/area_mac/mac_02.inc.c @@ -5,17 +5,17 @@ #define NAMESPACE A(mac_02) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(EnableBattleFloorReflections, TRUE) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(EnableBattleFloorReflections, TRUE) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_CALL(EnableBattleFloorReflections, FALSE) - EVT_RETURN - EVT_END + Call(EnableBattleFloorReflections, FALSE) + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_mim/mim_01.inc.c b/src/battle/common/stage/area_mim/mim_01.inc.c index 2341e439448..64c0ef8d5e6 100644 --- a/src/battle/common/stage/area_mim/mim_01.inc.c +++ b/src/battle/common/stage/area_mim/mim_01.inc.c @@ -15,15 +15,15 @@ API_CALLABLE(N(SetupFog)) { } EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(N(SetupFog)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(N(SetupFog)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_nok/nok_01.inc.c b/src/battle/common/stage/area_nok/nok_01.inc.c index 04eae6a190e..44e2f28fa7e 100644 --- a/src/battle/common/stage/area_nok/nok_01.inc.c +++ b/src/battle/common/stage/area_nok/nok_01.inc.c @@ -4,45 +4,45 @@ #define NAMESPACE A(nok_01) EvtScript N(EVS_AnimateFlower) = { - EVT_SET(LVarA, LVar0) - EVT_LABEL(0) - EVT_CALL(TranslateModel, LVarA, 0, 2, 0) - EVT_WAIT(5) - EVT_CALL(TranslateModel, LVarA, 0, 0, 0) - EVT_WAIT(5) - EVT_CALL(TranslateModel, LVarA, 0, 2, 0) - EVT_WAIT(5) - EVT_CALL(TranslateModel, LVarA, 0, 0, 0) - EVT_WAIT(5) - EVT_CALL(RandInt, 30, LVar0) - EVT_ADD(LVar0, 30) - EVT_WAIT(LVar0) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Label(0) + Call(TranslateModel, LVarA, 0, 2, 0) + Wait(5) + Call(TranslateModel, LVarA, 0, 0, 0) + Wait(5) + Call(TranslateModel, LVarA, 0, 2, 0) + Wait(5) + Call(TranslateModel, LVarA, 0, 0, 0) + Wait(5) + Call(RandInt, 30, LVar0) + Add(LVar0, 30) + Wait(LVar0) + Goto(0) + Return + End }; EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SET(LVar0, MODEL_h1) - EVT_EXEC(N(EVS_AnimateFlower)) - EVT_SET(LVar0, MODEL_h2) - EVT_EXEC(N(EVS_AnimateFlower)) - EVT_SET(LVar0, MODEL_h3) - EVT_EXEC(N(EVS_AnimateFlower)) - EVT_SET(LVar0, MODEL_h5) - EVT_EXEC(N(EVS_AnimateFlower)) - EVT_SET(LVar0, MODEL_h7) - EVT_EXEC(N(EVS_AnimateFlower)) - EVT_SET(LVar0, MODEL_h8) - EVT_EXEC(N(EVS_AnimateFlower)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Set(LVar0, MODEL_h1) + Exec(N(EVS_AnimateFlower)) + Set(LVar0, MODEL_h2) + Exec(N(EVS_AnimateFlower)) + Set(LVar0, MODEL_h3) + Exec(N(EVS_AnimateFlower)) + Set(LVar0, MODEL_h5) + Exec(N(EVS_AnimateFlower)) + Set(LVar0, MODEL_h7) + Exec(N(EVS_AnimateFlower)) + Set(LVar0, MODEL_h8) + Exec(N(EVS_AnimateFlower)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_nok/nok_02.inc.c b/src/battle/common/stage/area_nok/nok_02.inc.c index f277a0f8f07..22cb7e9fefc 100644 --- a/src/battle/common/stage/area_nok/nok_02.inc.c +++ b/src/battle/common/stage/area_nok/nok_02.inc.c @@ -4,64 +4,64 @@ #define NAMESPACE A(nok_02) EvtScript N(EVS_AnimateFlower) = { - EVT_SET(LVarA, LVar0) - EVT_LABEL(0) - EVT_CALL(TranslateModel, LVarA, 0, 2, 0) - EVT_WAIT(5) - EVT_CALL(TranslateModel, LVarA, 0, 0, 0) - EVT_WAIT(5) - EVT_CALL(TranslateModel, LVarA, 0, 2, 0) - EVT_WAIT(5) - EVT_CALL(TranslateModel, LVarA, 0, 0, 0) - EVT_WAIT(5) - EVT_CALL(RandInt, 30, LVar0) - EVT_ADD(LVar0, 30) - EVT_WAIT(LVar0) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Label(0) + Call(TranslateModel, LVarA, 0, 2, 0) + Wait(5) + Call(TranslateModel, LVarA, 0, 0, 0) + Wait(5) + Call(TranslateModel, LVarA, 0, 2, 0) + Wait(5) + Call(TranslateModel, LVarA, 0, 0, 0) + Wait(5) + Call(RandInt, 30, LVar0) + Add(LVar0, 30) + Wait(LVar0) + Goto(0) + Return + End }; EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_THREAD - EVT_SET(LVar0, MODEL_h1) - EVT_EXEC(N(EVS_AnimateFlower)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_h3) - EVT_EXEC(N(EVS_AnimateFlower)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_h4) - EVT_EXEC(N(EVS_AnimateFlower)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_h5) - EVT_EXEC(N(EVS_AnimateFlower)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_h6) - EVT_EXEC(N(EVS_AnimateFlower)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_h7) - EVT_EXEC(N(EVS_AnimateFlower)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_h9) - EVT_EXEC(N(EVS_AnimateFlower)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_h10) - EVT_EXEC(N(EVS_AnimateFlower)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_h11) - EVT_EXEC(N(EVS_AnimateFlower)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_h12) - EVT_EXEC(N(EVS_AnimateFlower)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Thread + Set(LVar0, MODEL_h1) + Exec(N(EVS_AnimateFlower)) + Wait(5) + Set(LVar0, MODEL_h3) + Exec(N(EVS_AnimateFlower)) + Wait(5) + Set(LVar0, MODEL_h4) + Exec(N(EVS_AnimateFlower)) + Wait(5) + Set(LVar0, MODEL_h5) + Exec(N(EVS_AnimateFlower)) + Wait(5) + Set(LVar0, MODEL_h6) + Exec(N(EVS_AnimateFlower)) + Wait(5) + Set(LVar0, MODEL_h7) + Exec(N(EVS_AnimateFlower)) + Wait(5) + Set(LVar0, MODEL_h9) + Exec(N(EVS_AnimateFlower)) + Wait(5) + Set(LVar0, MODEL_h10) + Exec(N(EVS_AnimateFlower)) + Wait(5) + Set(LVar0, MODEL_h11) + Exec(N(EVS_AnimateFlower)) + Wait(5) + Set(LVar0, MODEL_h12) + Exec(N(EVS_AnimateFlower)) + EndThread + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_nok/nok_03.inc.c b/src/battle/common/stage/area_nok/nok_03.inc.c index 530b6773a61..9ea75e165aa 100644 --- a/src/battle/common/stage/area_nok/nok_03.inc.c +++ b/src/battle/common/stage/area_nok/nok_03.inc.c @@ -4,14 +4,14 @@ #define NAMESPACE A(nok_03) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_nok/nok_04.inc.c b/src/battle/common/stage/area_nok/nok_04.inc.c index 0f7d241b401..3f0f05e8e8a 100644 --- a/src/battle/common/stage/area_nok/nok_04.inc.c +++ b/src/battle/common/stage/area_nok/nok_04.inc.c @@ -4,14 +4,14 @@ #define NAMESPACE A(nok_04) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_omo/omo_01.inc.c b/src/battle/common/stage/area_omo/omo_01.inc.c index 8fff81cfa19..1d238e9e7cf 100644 --- a/src/battle/common/stage/area_omo/omo_01.inc.c +++ b/src/battle/common/stage/area_omo/omo_01.inc.c @@ -64,35 +64,35 @@ API_CALLABLE(N(UpdateRockingHorse)) { } EvtScript N(EVS_UpdateRockingHorse) = { - EVT_CALL(N(UpdateRockingHorse)) - EVT_RETURN - EVT_END + Call(N(UpdateRockingHorse)) + Return + End }; EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_THREAD - EVT_SETF(LVar0, EVT_FLOAT(0.0)) - EVT_SETF(LVar1, EVT_FLOAT(0.0)) - EVT_LOOP(0) - EVT_CALL(RotateModel, MODEL_o367, LVar1, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_hari, LVar0, 0, 0, 1) - EVT_SUBF(LVar0, EVT_FLOAT(0.6)) - EVT_SUBF(LVar1, EVT_FLOAT(7.2)) - EVT_CALL(ClampAngleFloat, LVar0) - EVT_CALL(ClampAngleFloat, LVar1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_EXEC(N(EVS_UpdateRockingHorse)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Thread + SetF(LVar0, Float(0.0)) + SetF(LVar1, Float(0.0)) + Loop(0) + Call(RotateModel, MODEL_o367, LVar1, 0, 0, 1) + Call(RotateModel, MODEL_hari, LVar0, 0, 0, 1) + SubF(LVar0, Float(0.6)) + SubF(LVar1, Float(7.2)) + Call(ClampAngleFloat, LVar0) + Call(ClampAngleFloat, LVar1) + Wait(1) + EndLoop + EndThread + Exec(N(EVS_UpdateRockingHorse)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_omo/omo_02.inc.c b/src/battle/common/stage/area_omo/omo_02.inc.c index dad776c8ced..0658c816b64 100644 --- a/src/battle/common/stage/area_omo/omo_02.inc.c +++ b/src/battle/common/stage/area_omo/omo_02.inc.c @@ -4,15 +4,15 @@ #define NAMESPACE A(omo_02) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_omo/omo_03.inc.c b/src/battle/common/stage/area_omo/omo_03.inc.c index 66006f43b6e..89eb488fd4f 100644 --- a/src/battle/common/stage/area_omo/omo_03.inc.c +++ b/src/battle/common/stage/area_omo/omo_03.inc.c @@ -4,16 +4,16 @@ #define NAMESPACE A(omo_03) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetGroupVisibility, MODEL_g97, MODEL_GROUP_HIDDEN) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetGroupVisibility, MODEL_g97, MODEL_GROUP_HIDDEN) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_omo/omo_03b.inc.c b/src/battle/common/stage/area_omo/omo_03b.inc.c index ae9cf5b7463..bbbc202ae3a 100644 --- a/src/battle/common/stage/area_omo/omo_03b.inc.c +++ b/src/battle/common/stage/area_omo/omo_03b.inc.c @@ -4,15 +4,15 @@ #define NAMESPACE A(omo_03b) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_omo/omo_04.inc.c b/src/battle/common/stage/area_omo/omo_04.inc.c index 8fc722c7a06..3fdc41326fa 100644 --- a/src/battle/common/stage/area_omo/omo_04.inc.c +++ b/src/battle/common/stage/area_omo/omo_04.inc.c @@ -9,24 +9,24 @@ extern ActorBlueprint N(slot_machine_stop); extern ActorBlueprint N(slot_machine_start); EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetTexPanner, MODEL_o409, TEX_PANNER_A) - EVT_THREAD - EVT_SET(LVarE, 0) - EVT_LOOP(0) - EVT_ADD(LVarE, 0x8000) - EVT_CALL(SetTexPanOffset, TEX_PANNER_A, TEX_PANNER_MAIN, LVarE, 0) - EVT_WAIT(10) - EVT_END_LOOP - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetTexPanner, MODEL_o409, TEX_PANNER_A) + Thread + Set(LVarE, 0) + Loop(0) + Add(LVarE, 0x8000) + Call(SetTexPanOffset, TEX_PANNER_A, TEX_PANNER_MAIN, LVarE, 0) + Wait(10) + EndLoop + EndThread + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_omo/omo_05.inc.c b/src/battle/common/stage/area_omo/omo_05.inc.c index 805f39c9904..4f2cd9bbe02 100644 --- a/src/battle/common/stage/area_omo/omo_05.inc.c +++ b/src/battle/common/stage/area_omo/omo_05.inc.c @@ -4,17 +4,17 @@ #define NAMESPACE A(omo_05) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetGroupVisibility, MODEL_g1, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_dai1, MODEL_GROUP_HIDDEN) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetGroupVisibility, MODEL_g1, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_dai1, MODEL_GROUP_HIDDEN) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_omo/omo_05b.inc.c b/src/battle/common/stage/area_omo/omo_05b.inc.c index c0d70aea587..7f6d89af3c2 100644 --- a/src/battle/common/stage/area_omo/omo_05b.inc.c +++ b/src/battle/common/stage/area_omo/omo_05b.inc.c @@ -4,17 +4,17 @@ #define NAMESPACE A(omo_05b) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetGroupVisibility, MODEL_g2, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_dai2, MODEL_GROUP_HIDDEN) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetGroupVisibility, MODEL_g2, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_dai2, MODEL_GROUP_HIDDEN) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_omo/omo_06.inc.c b/src/battle/common/stage/area_omo/omo_06.inc.c index 604ce43fab3..e3ab563b1b2 100644 --- a/src/battle/common/stage/area_omo/omo_06.inc.c +++ b/src/battle/common/stage/area_omo/omo_06.inc.c @@ -4,54 +4,54 @@ #define NAMESPACE A(omo_06) EvtScript N(EVS_UpdateMovingPlatforms) = { - EVT_SET(LVarA, LVar0) // modelID - EVT_SET(LVar9, LVar1) - EVT_SET(LVar8, LVar2) - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, LVar9, LVar8, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, LVarA, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, LVar9, 0, LVar8, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, LVarA, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) // modelID + Set(LVar9, LVar1) + Set(LVar8, LVar2) + Label(0) + Call(MakeLerp, 0, LVar9, LVar8, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, LVarA, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, LVar9, 0, LVar8, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, LVarA, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Goto(0) + Return + End }; EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_THREAD - EVT_SET(LVar0, MODEL_ere1) - EVT_SET(LVar1, -50) - EVT_SET(LVar2, 120) - EVT_EXEC(N(EVS_UpdateMovingPlatforms)) - EVT_WAIT(10) - EVT_SET(LVar0, MODEL_ere2) - EVT_SET(LVar1, -80) - EVT_SET(LVar2, 150) - EVT_EXEC(N(EVS_UpdateMovingPlatforms)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Thread + Set(LVar0, MODEL_ere1) + Set(LVar1, -50) + Set(LVar2, 120) + Exec(N(EVS_UpdateMovingPlatforms)) + Wait(10) + Set(LVar0, MODEL_ere2) + Set(LVar1, -80) + Set(LVar2, 150) + Exec(N(EVS_UpdateMovingPlatforms)) + EndThread + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_omo/omo_07.inc.c b/src/battle/common/stage/area_omo/omo_07.inc.c index b7a4eb3d629..aab4043153d 100644 --- a/src/battle/common/stage/area_omo/omo_07.inc.c +++ b/src/battle/common/stage/area_omo/omo_07.inc.c @@ -3,15 +3,15 @@ #define NAMESPACE A(omo_07) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_pra/pra_01.inc.c b/src/battle/common/stage/area_pra/pra_01.inc.c index 1d444b27c74..0d3bd0079bf 100644 --- a/src/battle/common/stage/area_pra/pra_01.inc.c +++ b/src/battle/common/stage/area_pra/pra_01.inc.c @@ -5,16 +5,16 @@ #define NAMESPACE A(pra_01) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(EnableBattleFloorReflections, TRUE) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(EnableBattleFloorReflections, TRUE) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_pra/pra_02.inc.c b/src/battle/common/stage/area_pra/pra_02.inc.c index 1fab3f1f83e..4d41d383f01 100644 --- a/src/battle/common/stage/area_pra/pra_02.inc.c +++ b/src/battle/common/stage/area_pra/pra_02.inc.c @@ -7,26 +7,26 @@ #include "battle/common/stage/lib/TexturePanner.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(EnableBattleFloorReflections, TRUE) - EVT_SET(LVar0, MODEL_o412) - EVT_SET(LVar1, TEX_PANNER_0) - EVT_SET(LVar2, 3000) - EVT_SET(LVar3, 0) - EVT_EXEC(N(EVS_TexturePanMain)) - EVT_SET(LVar0, MODEL_o413) - EVT_SET(LVar1, TEX_PANNER_0) - EVT_SET(LVar2, 3000) - EVT_SET(LVar3, 0) - EVT_EXEC(N(EVS_TexturePanMain)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(EnableBattleFloorReflections, TRUE) + Set(LVar0, MODEL_o412) + Set(LVar1, TEX_PANNER_0) + Set(LVar2, 3000) + Set(LVar3, 0) + Exec(N(EVS_TexturePanMain)) + Set(LVar0, MODEL_o413) + Set(LVar1, TEX_PANNER_0) + Set(LVar2, 3000) + Set(LVar3, 0) + Exec(N(EVS_TexturePanMain)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_pra/pra_03.inc.c b/src/battle/common/stage/area_pra/pra_03.inc.c index cc7e2c2a0ed..37eb87e1a9c 100644 --- a/src/battle/common/stage/area_pra/pra_03.inc.c +++ b/src/battle/common/stage/area_pra/pra_03.inc.c @@ -4,15 +4,15 @@ #define NAMESPACE A(pra_03) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_pra/pra_03b.inc.c b/src/battle/common/stage/area_pra/pra_03b.inc.c index 55b8d6e7925..1e1173fbf89 100644 --- a/src/battle/common/stage/area_pra/pra_03b.inc.c +++ b/src/battle/common/stage/area_pra/pra_03b.inc.c @@ -4,16 +4,16 @@ #define NAMESPACE A(pra_03b) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetGroupVisibility, MODEL_g115, MODEL_GROUP_HIDDEN) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetGroupVisibility, MODEL_g115, MODEL_GROUP_HIDDEN) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_pra/pra_03c.inc.c b/src/battle/common/stage/area_pra/pra_03c.inc.c index f80de62a40b..a486c56b6e9 100644 --- a/src/battle/common/stage/area_pra/pra_03c.inc.c +++ b/src/battle/common/stage/area_pra/pra_03c.inc.c @@ -4,17 +4,17 @@ #define NAMESPACE A(pra_03c) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetGroupVisibility, MODEL_g115, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_g117, MODEL_GROUP_HIDDEN) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetGroupVisibility, MODEL_g115, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_g117, MODEL_GROUP_HIDDEN) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_pra/pra_04.inc.c b/src/battle/common/stage/area_pra/pra_04.inc.c index 98c7f2a9287..0a2789d9544 100644 --- a/src/battle/common/stage/area_pra/pra_04.inc.c +++ b/src/battle/common/stage/area_pra/pra_04.inc.c @@ -7,26 +7,26 @@ #include "battle/common/stage/lib/TexturePanner.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_SET(LVar0, MODEL_kira1) - EVT_SET(LVar1, TEX_PANNER_0) - EVT_SET(LVar2, 3000) - EVT_SET(LVar3, 0) - EVT_EXEC(N(EVS_TexturePanMain)) - EVT_SET(LVar0, MODEL_kira2) - EVT_SET(LVar1, TEX_PANNER_1) - EVT_SET(LVar2, 3000) - EVT_SET(LVar3, 0) - EVT_EXEC(N(EVS_TexturePanMain)) - EVT_CALL(EnableBattleFloorReflections, TRUE) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Set(LVar0, MODEL_kira1) + Set(LVar1, TEX_PANNER_0) + Set(LVar2, 3000) + Set(LVar3, 0) + Exec(N(EVS_TexturePanMain)) + Set(LVar0, MODEL_kira2) + Set(LVar1, TEX_PANNER_1) + Set(LVar2, 3000) + Set(LVar3, 0) + Exec(N(EVS_TexturePanMain)) + Call(EnableBattleFloorReflections, TRUE) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_sam/sam_01.inc.c b/src/battle/common/stage/area_sam/sam_01.inc.c index e5967f1a360..4801a822c8c 100644 --- a/src/battle/common/stage/area_sam/sam_01.inc.c +++ b/src/battle/common/stage/area_sam/sam_01.inc.c @@ -7,32 +7,32 @@ #include "battle/common/stage/lib/Snowflakes.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_EXEC(N(EVS_SpawnSnowfall)) - EVT_THREAD - EVT_SET(LVar0, MODEL_o262) - EVT_SET(LVar1, 1) - EVT_EXEC(N(EVS_AnimateHangingSnowflake_RandomSpin)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_o261) - EVT_SET(LVar1, 3) - EVT_EXEC(N(EVS_AnimateHangingSnowflake_RandomSpin)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_o260) - EVT_SET(LVar1, 4) - EVT_EXEC(N(EVS_AnimateHangingSnowflake_RandomSpin)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_o253) - EVT_SET(LVar1, 2) - EVT_EXEC(N(EVS_AnimateHangingSnowflake_RandomSpin)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Exec(N(EVS_SpawnSnowfall)) + Thread + Set(LVar0, MODEL_o262) + Set(LVar1, 1) + Exec(N(EVS_AnimateHangingSnowflake_RandomSpin)) + Wait(5) + Set(LVar0, MODEL_o261) + Set(LVar1, 3) + Exec(N(EVS_AnimateHangingSnowflake_RandomSpin)) + Wait(5) + Set(LVar0, MODEL_o260) + Set(LVar1, 4) + Exec(N(EVS_AnimateHangingSnowflake_RandomSpin)) + Wait(5) + Set(LVar0, MODEL_o253) + Set(LVar1, 2) + Exec(N(EVS_AnimateHangingSnowflake_RandomSpin)) + EndThread + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_sam/sam_02.inc.c b/src/battle/common/stage/area_sam/sam_02.inc.c index d681eebe8e3..b8d6b22683e 100644 --- a/src/battle/common/stage/area_sam/sam_02.inc.c +++ b/src/battle/common/stage/area_sam/sam_02.inc.c @@ -7,34 +7,34 @@ #include "battle/common/stage/lib/Snowflakes.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetGroupVisibility, MODEL_p2, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_p3, MODEL_GROUP_HIDDEN) - EVT_THREAD - EVT_SET(LVar0, MODEL_o253) - EVT_SET(LVar1, 0) - EVT_EXEC(N(EVS_AnimateHangingSnowflake_RandomSpin)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_o283) - EVT_SET(LVar1, 0) - EVT_EXEC(N(EVS_AnimateHangingSnowflake_RandomSpin)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_o284) - EVT_SET(LVar1, 0) - EVT_EXEC(N(EVS_AnimateHangingSnowflake_RandomSpin)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_o285) - EVT_SET(LVar1, 0) - EVT_EXEC(N(EVS_AnimateHangingSnowflake_RandomSpin)) - EVT_END_THREAD - EVT_EXEC(N(EVS_SpawnSnowfall)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetGroupVisibility, MODEL_p2, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_p3, MODEL_GROUP_HIDDEN) + Thread + Set(LVar0, MODEL_o253) + Set(LVar1, 0) + Exec(N(EVS_AnimateHangingSnowflake_RandomSpin)) + Wait(5) + Set(LVar0, MODEL_o283) + Set(LVar1, 0) + Exec(N(EVS_AnimateHangingSnowflake_RandomSpin)) + Wait(5) + Set(LVar0, MODEL_o284) + Set(LVar1, 0) + Exec(N(EVS_AnimateHangingSnowflake_RandomSpin)) + Wait(5) + Set(LVar0, MODEL_o285) + Set(LVar1, 0) + Exec(N(EVS_AnimateHangingSnowflake_RandomSpin)) + EndThread + Exec(N(EVS_SpawnSnowfall)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_sam/sam_02b.inc.c b/src/battle/common/stage/area_sam/sam_02b.inc.c index 55930140188..740aca84441 100644 --- a/src/battle/common/stage/area_sam/sam_02b.inc.c +++ b/src/battle/common/stage/area_sam/sam_02b.inc.c @@ -7,17 +7,17 @@ #include "battle/common/stage/lib/Snowflakes.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetGroupVisibility, MODEL_p1, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_yuki, MODEL_GROUP_HIDDEN) - EVT_EXEC(N(EVS_SpawnSnowfall)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetGroupVisibility, MODEL_p1, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_yuki, MODEL_GROUP_HIDDEN) + Exec(N(EVS_SpawnSnowfall)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_sam/sam_02c.inc.c b/src/battle/common/stage/area_sam/sam_02c.inc.c index 707796bb18d..0020036f212 100644 --- a/src/battle/common/stage/area_sam/sam_02c.inc.c +++ b/src/battle/common/stage/area_sam/sam_02c.inc.c @@ -7,18 +7,18 @@ #include "battle/common/stage/lib/Snowflakes.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetGroupVisibility, MODEL_p1, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_p2, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_yuki, MODEL_GROUP_HIDDEN) - EVT_EXEC(N(EVS_SpawnSnowfall)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetGroupVisibility, MODEL_p1, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_p2, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_yuki, MODEL_GROUP_HIDDEN) + Exec(N(EVS_SpawnSnowfall)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_sam/sam_02d.inc.c b/src/battle/common/stage/area_sam/sam_02d.inc.c index 4c462ecc744..03620ca63fd 100644 --- a/src/battle/common/stage/area_sam/sam_02d.inc.c +++ b/src/battle/common/stage/area_sam/sam_02d.inc.c @@ -7,19 +7,19 @@ #include "battle/common/stage/lib/Snowflakes.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetGroupVisibility, MODEL_p1, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_p2, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_p3, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_yuki, MODEL_GROUP_HIDDEN) - EVT_EXEC(N(EVS_SpawnSnowfall)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetGroupVisibility, MODEL_p1, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_p2, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_p3, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_yuki, MODEL_GROUP_HIDDEN) + Exec(N(EVS_SpawnSnowfall)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_sam/sam_03.inc.c b/src/battle/common/stage/area_sam/sam_03.inc.c index 3ec1235865c..86fe959f3aa 100644 --- a/src/battle/common/stage/area_sam/sam_03.inc.c +++ b/src/battle/common/stage/area_sam/sam_03.inc.c @@ -11,32 +11,32 @@ void N(EnableBackgroundWave)(void) { } EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_THREAD - EVT_SET(LVar0, MODEL_Default) - EVT_SET(LVar1, 0) - EVT_EXEC(N(EVS_AnimateHangingSnowflake_RandomSpin)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_g62) - EVT_SET(LVar1, 0) - EVT_EXEC(N(EVS_AnimateHangingSnowflake_NoSpin)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_g60) - EVT_SET(LVar1, 0) - EVT_EXEC(N(EVS_AnimateHangingSnowflake_NoSpin)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_g58) - EVT_SET(LVar1, 0) - EVT_EXEC(N(EVS_AnimateHangingSnowflake_NoSpin)) - EVT_END_THREAD - EVT_EXEC(N(EVS_SpawnSnowfall)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Thread + Set(LVar0, MODEL_Default) + Set(LVar1, 0) + Exec(N(EVS_AnimateHangingSnowflake_RandomSpin)) + Wait(5) + Set(LVar0, MODEL_g62) + Set(LVar1, 0) + Exec(N(EVS_AnimateHangingSnowflake_NoSpin)) + Wait(5) + Set(LVar0, MODEL_g60) + Set(LVar1, 0) + Exec(N(EVS_AnimateHangingSnowflake_NoSpin)) + Wait(5) + Set(LVar0, MODEL_g58) + Set(LVar1, 0) + Exec(N(EVS_AnimateHangingSnowflake_NoSpin)) + EndThread + Exec(N(EVS_SpawnSnowfall)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_sam/sam_04.inc.c b/src/battle/common/stage/area_sam/sam_04.inc.c index 21529f1d419..2427670a8d7 100644 --- a/src/battle/common/stage/area_sam/sam_04.inc.c +++ b/src/battle/common/stage/area_sam/sam_04.inc.c @@ -10,15 +10,15 @@ void N(EnableBackgroundWave)(void) { } EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_EXEC(N(EVS_SpawnSnowfall)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Exec(N(EVS_SpawnSnowfall)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_sbk/sbk_02.inc.c b/src/battle/common/stage/area_sbk/sbk_02.inc.c index bac57738ed1..77bc8ca551a 100644 --- a/src/battle/common/stage/area_sbk/sbk_02.inc.c +++ b/src/battle/common/stage/area_sbk/sbk_02.inc.c @@ -55,42 +55,42 @@ API_CALLABLE(N(GetModelPos)) { } EvtScript N(EVS_UpdateSunPos) = { - EVT_SET(LVarA, LVar0) // modelID - EVT_SET(LVar7, LVar1) // initialPhase - EVT_MUL(LVar7, 10) - EVT_CALL(N(GetModelPos)) - EVT_LABEL(0) - EVT_ADD(LVar7, 1) - EVT_IF_GT(LVar7, 3599) - EVT_SUB(LVar7, 3600) - EVT_END_IF - EVT_CALL(N(UpdateSunPos), LVar7, LVar0, LVar1, LVar2) - EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) // modelID + Set(LVar7, LVar1) // initialPhase + Mul(LVar7, 10) + Call(N(GetModelPos)) + Label(0) + Add(LVar7, 1) + IfGt(LVar7, 3599) + Sub(LVar7, 3600) + EndIf + Call(N(UpdateSunPos), LVar7, LVar0, LVar1, LVar2) + Call(TranslateModel, LVarA, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SET(LVar0, MODEL_g60) - EVT_SET(LVar1, 0) - EVT_EXEC(N(EVS_UpdateSunPos)) - EVT_SET(LVar0, MODEL_g63) - EVT_SET(LVar1, 120) - EVT_EXEC(N(EVS_UpdateSunPos)) - EVT_SET(LVar0, MODEL_g62) - EVT_SET(LVar1, 240) - EVT_EXEC(N(EVS_UpdateSunPos)) - EVT_PLAY_EFFECT(EFFECT_SUN, 0, 0, 0, 0, 0, 0, 0) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Set(LVar0, MODEL_g60) + Set(LVar1, 0) + Exec(N(EVS_UpdateSunPos)) + Set(LVar0, MODEL_g63) + Set(LVar1, 120) + Exec(N(EVS_UpdateSunPos)) + Set(LVar0, MODEL_g62) + Set(LVar1, 240) + Exec(N(EVS_UpdateSunPos)) + PlayEffect(EFFECT_SUN, 0, 0, 0, 0, 0, 0, 0) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_tik/tik_01.inc.c b/src/battle/common/stage/area_tik/tik_01.inc.c index c620e34a1d7..086d3039d87 100644 --- a/src/battle/common/stage/area_tik/tik_01.inc.c +++ b/src/battle/common/stage/area_tik/tik_01.inc.c @@ -23,22 +23,22 @@ DripVolumeList N(DripVolumes) = { }; EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_SET(LVar0, MODEL_misu) - EVT_SET(LVar1, TEX_PANNER_0) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, -500) - EVT_EXEC(N(EVS_TexturePanMain)) - EVT_SET(LVar0, EVT_PTR(N(DripVolumes))) - EVT_EXEC(N(EVS_CreateDripVolumes)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Set(LVar0, MODEL_misu) + Set(LVar1, TEX_PANNER_0) + Set(LVar2, 0) + Set(LVar3, -500) + Exec(N(EVS_TexturePanMain)) + Set(LVar0, Ref(N(DripVolumes))) + Exec(N(EVS_CreateDripVolumes)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_tik/tik_02.inc.c b/src/battle/common/stage/area_tik/tik_02.inc.c index 91aa0924bbd..40894eca62d 100644 --- a/src/battle/common/stage/area_tik/tik_02.inc.c +++ b/src/battle/common/stage/area_tik/tik_02.inc.c @@ -23,22 +23,22 @@ DripVolumeList N(DripVolumes) = { }; EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_SET(LVar0, EVT_PTR(N(DripVolumes))) - EVT_EXEC(N(EVS_CreateDripVolumes)) - EVT_SET(LVar0, MODEL_misu) - EVT_SET(LVar1, TEX_PANNER_0) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, -500) - EVT_EXEC(N(EVS_TexturePanMain)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Set(LVar0, Ref(N(DripVolumes))) + Exec(N(EVS_CreateDripVolumes)) + Set(LVar0, MODEL_misu) + Set(LVar1, TEX_PANNER_0) + Set(LVar2, 0) + Set(LVar3, -500) + Exec(N(EVS_TexturePanMain)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_tik/tik_03.inc.c b/src/battle/common/stage/area_tik/tik_03.inc.c index b3d3bf33108..47fb1c67e3b 100644 --- a/src/battle/common/stage/area_tik/tik_03.inc.c +++ b/src/battle/common/stage/area_tik/tik_03.inc.c @@ -21,17 +21,17 @@ DripVolumeList N(DripVolumes) = { }; EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_SET(LVar0, EVT_PTR(N(DripVolumes))) - EVT_EXEC(N(EVS_CreateDripVolumes)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Set(LVar0, Ref(N(DripVolumes))) + Exec(N(EVS_CreateDripVolumes)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_tik/tik_04.inc.c b/src/battle/common/stage/area_tik/tik_04.inc.c index 26526261b5b..a59c9580e92 100644 --- a/src/battle/common/stage/area_tik/tik_04.inc.c +++ b/src/battle/common/stage/area_tik/tik_04.inc.c @@ -6,40 +6,40 @@ #include "battle/common/stage/lib/WaterEffects.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_THREAD - EVT_SET(LVar0, MODEL_mizu2) - EVT_EXEC(N(EVS_AnimateWaveModel)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_mizu3) - EVT_EXEC(N(EVS_AnimateWaveModel)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_mizu4) - EVT_EXEC(N(EVS_AnimateWaveModel)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_o357) - EVT_SET(LVar1, 145) - EVT_EXEC(N(EVS_AnimateDrifting)) - EVT_SET(LVar0, MODEL_o361) - EVT_SET(LVar1, 145) - EVT_EXEC(N(EVS_AnimateDrifting)) - EVT_END_THREAD - EVT_SET(LVar0, MODEL_o358) - EVT_SET(LVar1, 60) - EVT_EXEC(N(EVS_AnimateDrifting)) - EVT_SET(LVar0, MODEL_o360) - EVT_SET(LVar1, 60) - EVT_EXEC(N(EVS_AnimateDrifting)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Thread + Set(LVar0, MODEL_mizu2) + Exec(N(EVS_AnimateWaveModel)) + Wait(5) + Set(LVar0, MODEL_mizu3) + Exec(N(EVS_AnimateWaveModel)) + Wait(5) + Set(LVar0, MODEL_mizu4) + Exec(N(EVS_AnimateWaveModel)) + EndThread + Thread + Wait(5) + Set(LVar0, MODEL_o357) + Set(LVar1, 145) + Exec(N(EVS_AnimateDrifting)) + Set(LVar0, MODEL_o361) + Set(LVar1, 145) + Exec(N(EVS_AnimateDrifting)) + EndThread + Set(LVar0, MODEL_o358) + Set(LVar1, 60) + Exec(N(EVS_AnimateDrifting)) + Set(LVar0, MODEL_o360) + Set(LVar1, 60) + Exec(N(EVS_AnimateDrifting)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_tik/tik_05.inc.c b/src/battle/common/stage/area_tik/tik_05.inc.c index 78fed1a83c4..6232d4d3f4b 100644 --- a/src/battle/common/stage/area_tik/tik_05.inc.c +++ b/src/battle/common/stage/area_tik/tik_05.inc.c @@ -6,33 +6,33 @@ #include "world/common/atomic/TexturePan.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(SetTexPanner, MODEL_taki1, TEX_PANNER_1) - EVT_CALL(EnableTexPanning, MODEL_taki1, TRUE) - EVT_THREAD + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(SetTexPanner, MODEL_taki1, TEX_PANNER_1) + Call(EnableTexPanning, MODEL_taki1, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 0, -2700, 0, -3000) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_taki2, TEX_PANNER_2) - EVT_CALL(EnableTexPanning, MODEL_taki2, TRUE) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetTexPanner, MODEL_taki2, TEX_PANNER_2) + Call(EnableTexPanning, MODEL_taki2, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( 50, -200, 110, -500) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_trd/trd_00.inc.c b/src/battle/common/stage/area_trd/trd_00.inc.c index 2cb3d1fe372..327ac311e05 100644 --- a/src/battle/common/stage/area_trd/trd_00.inc.c +++ b/src/battle/common/stage/area_trd/trd_00.inc.c @@ -4,15 +4,15 @@ #define NAMESPACE A(trd_00) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_trd/trd_01.inc.c b/src/battle/common/stage/area_trd/trd_01.inc.c index a6d68fb4179..f7ca012e4e9 100644 --- a/src/battle/common/stage/area_trd/trd_01.inc.c +++ b/src/battle/common/stage/area_trd/trd_01.inc.c @@ -4,15 +4,15 @@ #define NAMESPACE A(trd_01) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_trd/trd_02.inc.c b/src/battle/common/stage/area_trd/trd_02.inc.c index 4d398ac24cd..44f75e60915 100644 --- a/src/battle/common/stage/area_trd/trd_02.inc.c +++ b/src/battle/common/stage/area_trd/trd_02.inc.c @@ -6,29 +6,29 @@ #include "battle/common/stage/lib/BeachEffects.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(EnableModel, MODEL_kabe2_2, FALSE) - EVT_THREAD - EVT_SET(LVar0, MODEL_mizu) - EVT_EXEC(N(EVS_AnimateWave)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_mizu2) - EVT_EXEC(N(EVS_AnimateWave)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_o298) - EVT_EXEC(N(EVS_AnimateWave)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_o297) - EVT_EXEC(N(EVS_AnimateWave)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(EnableModel, MODEL_kabe2_2, FALSE) + Thread + Set(LVar0, MODEL_mizu) + Exec(N(EVS_AnimateWave)) + Wait(5) + Set(LVar0, MODEL_mizu2) + Exec(N(EVS_AnimateWave)) + Wait(5) + Set(LVar0, MODEL_o298) + Exec(N(EVS_AnimateWave)) + Wait(5) + Set(LVar0, MODEL_o297) + Exec(N(EVS_AnimateWave)) + EndThread + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_trd/trd_02b.inc.c b/src/battle/common/stage/area_trd/trd_02b.inc.c index 1179e1ee33e..d31bc4f9943 100644 --- a/src/battle/common/stage/area_trd/trd_02b.inc.c +++ b/src/battle/common/stage/area_trd/trd_02b.inc.c @@ -6,31 +6,31 @@ #include "battle/common/stage/lib/BeachEffects.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(EnableModel, MODEL_saku, FALSE) - EVT_CALL(EnableModel, MODEL_kiwa, FALSE) - EVT_CALL(EnableModel, MODEL_tyuu, FALSE) - EVT_THREAD - EVT_SET(LVar0, MODEL_mizu) - EVT_EXEC(N(EVS_AnimateWave)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_mizu2) - EVT_EXEC(N(EVS_AnimateWave)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_o298) - EVT_EXEC(N(EVS_AnimateWave)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_o297) - EVT_EXEC(N(EVS_AnimateWave)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(EnableModel, MODEL_saku, FALSE) + Call(EnableModel, MODEL_kiwa, FALSE) + Call(EnableModel, MODEL_tyuu, FALSE) + Thread + Set(LVar0, MODEL_mizu) + Exec(N(EVS_AnimateWave)) + Wait(5) + Set(LVar0, MODEL_mizu2) + Exec(N(EVS_AnimateWave)) + Wait(5) + Set(LVar0, MODEL_o298) + Exec(N(EVS_AnimateWave)) + Wait(5) + Set(LVar0, MODEL_o297) + Exec(N(EVS_AnimateWave)) + EndThread + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_trd/trd_02c.inc.c b/src/battle/common/stage/area_trd/trd_02c.inc.c index 22c3a4773b3..48501810857 100644 --- a/src/battle/common/stage/area_trd/trd_02c.inc.c +++ b/src/battle/common/stage/area_trd/trd_02c.inc.c @@ -4,17 +4,17 @@ #define NAMESPACE A(trd_02c) EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(EnableModel, MODEL_dai, FALSE) - EVT_CALL(EnableModel, MODEL_kusari1, FALSE) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(EnableModel, MODEL_dai, FALSE) + Call(EnableModel, MODEL_kusari1, FALSE) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_trd/trd_02d.inc.c b/src/battle/common/stage/area_trd/trd_02d.inc.c index 689c416f691..33daf66aec4 100644 --- a/src/battle/common/stage/area_trd/trd_02d.inc.c +++ b/src/battle/common/stage/area_trd/trd_02d.inc.c @@ -6,21 +6,21 @@ #include "battle/common/stage/lib/BeachEffects.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(EnableModel, MODEL_mizu, FALSE) - EVT_CALL(EnableModel, MODEL_mizu2, FALSE) - EVT_CALL(EnableModel, MODEL_o298, FALSE) - EVT_CALL(EnableModel, MODEL_o297, FALSE) - EVT_CALL(EnableModel, MODEL_kiwa, FALSE) - EVT_CALL(EnableModel, MODEL_tyuu, FALSE) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(EnableModel, MODEL_mizu, FALSE) + Call(EnableModel, MODEL_mizu2, FALSE) + Call(EnableModel, MODEL_o298, FALSE) + Call(EnableModel, MODEL_o297, FALSE) + Call(EnableModel, MODEL_kiwa, FALSE) + Call(EnableModel, MODEL_tyuu, FALSE) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_trd/trd_03.inc.c b/src/battle/common/stage/area_trd/trd_03.inc.c index 9fcd43f0b4c..dc54965549e 100644 --- a/src/battle/common/stage/area_trd/trd_03.inc.c +++ b/src/battle/common/stage/area_trd/trd_03.inc.c @@ -6,22 +6,22 @@ #include "battle/common/stage/lib/MovingClouds.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SET(LVar0, MODEL_g65) - EVT_SET(LVar2, 0) - EVT_EXEC(N(EVS_AnimateCloud)) - EVT_SET(LVar0, MODEL_g62) - EVT_SET(LVar2, 70) - EVT_SET(LVar3, 175) - EVT_SET(LVar4, -170) - EVT_EXEC(N(EVS_AnimateCloud_WithOffset2D)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Set(LVar0, MODEL_g65) + Set(LVar2, 0) + Exec(N(EVS_AnimateCloud)) + Set(LVar0, MODEL_g62) + Set(LVar2, 70) + Set(LVar3, 175) + Set(LVar4, -170) + Exec(N(EVS_AnimateCloud_WithOffset2D)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_trd/trd_04.inc.c b/src/battle/common/stage/area_trd/trd_04.inc.c index 9f82e419163..193b1c50f1b 100644 --- a/src/battle/common/stage/area_trd/trd_04.inc.c +++ b/src/battle/common/stage/area_trd/trd_04.inc.c @@ -6,20 +6,20 @@ #include "battle/common/stage/lib/TexturePanner.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_SET(LVar0, MODEL_hikari1) - EVT_SET(LVar1, TEX_PANNER_0) - EVT_SET(LVar2, 40) - EVT_SET(LVar3, 0) - EVT_EXEC(N(EVS_TexturePanMain)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Set(LVar0, MODEL_hikari1) + Set(LVar1, TEX_PANNER_0) + Set(LVar2, 40) + Set(LVar3, 0) + Exec(N(EVS_TexturePanMain)) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(ForegroundModels)[] = { diff --git a/src/battle/common/stage/area_trd/trd_05.inc.c b/src/battle/common/stage/area_trd/trd_05.inc.c index 077e313940f..9eb36925485 100644 --- a/src/battle/common/stage/area_trd/trd_05.inc.c +++ b/src/battle/common/stage/area_trd/trd_05.inc.c @@ -6,32 +6,32 @@ #include "battle/common/stage/lib/BeachEffects.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_THREAD - EVT_SET(LVar0, MODEL_o318) - EVT_EXEC(N(EVS_AnimateWave)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_mizu4) - EVT_EXEC(N(EVS_AnimateWave)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, MODEL_mizu3) - EVT_EXEC(N(EVS_AnimateWave)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_mizu2) - EVT_EXEC(N(EVS_AnimateWave)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_mizu1) - EVT_EXEC(N(EVS_AnimateWave)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Thread + Set(LVar0, MODEL_o318) + Exec(N(EVS_AnimateWave)) + Wait(5) + Set(LVar0, MODEL_mizu4) + Exec(N(EVS_AnimateWave)) + EndThread + Thread + Set(LVar0, MODEL_mizu3) + Exec(N(EVS_AnimateWave)) + Wait(5) + Set(LVar0, MODEL_mizu2) + Exec(N(EVS_AnimateWave)) + Wait(5) + Set(LVar0, MODEL_mizu1) + Exec(N(EVS_AnimateWave)) + EndThread + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_trd/trd_05b.inc.c b/src/battle/common/stage/area_trd/trd_05b.inc.c index 6e947ee5d10..24dda1ff27b 100644 --- a/src/battle/common/stage/area_trd/trd_05b.inc.c +++ b/src/battle/common/stage/area_trd/trd_05b.inc.c @@ -6,25 +6,25 @@ #include "battle/common/stage/lib/BeachEffects.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(EnableModel, MODEL_kai, FALSE) - EVT_CALL(EnableModel, MODEL_kusari1, FALSE) - EVT_CALL(EnableModel, MODEL_mizu1, FALSE) - EVT_CALL(EnableModel, MODEL_mizu2, FALSE) - EVT_CALL(EnableModel, MODEL_mizu3, FALSE) - EVT_CALL(EnableModel, MODEL_ori, FALSE) - EVT_CALL(EnableModel, MODEL_saku1, FALSE) - EVT_CALL(EnableModel, MODEL_saku2, FALSE) - EVT_CALL(EnableModel, MODEL_mizu4, FALSE) - EVT_CALL(EnableModel, MODEL_o318, FALSE) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(EnableModel, MODEL_kai, FALSE) + Call(EnableModel, MODEL_kusari1, FALSE) + Call(EnableModel, MODEL_mizu1, FALSE) + Call(EnableModel, MODEL_mizu2, FALSE) + Call(EnableModel, MODEL_mizu3, FALSE) + Call(EnableModel, MODEL_ori, FALSE) + Call(EnableModel, MODEL_saku1, FALSE) + Call(EnableModel, MODEL_saku2, FALSE) + Call(EnableModel, MODEL_mizu4, FALSE) + Call(EnableModel, MODEL_o318, FALSE) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_trd/trd_05c.inc.c b/src/battle/common/stage/area_trd/trd_05c.inc.c index e1f9413ca97..36eca7917e2 100644 --- a/src/battle/common/stage/area_trd/trd_05c.inc.c +++ b/src/battle/common/stage/area_trd/trd_05c.inc.c @@ -6,33 +6,33 @@ #include "battle/common/stage/lib/BeachEffects.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(EnableModel, MODEL_yuka3, FALSE) - EVT_CALL(EnableModel, MODEL_hako, FALSE) - EVT_CALL(EnableModel, MODEL_ori, FALSE) - EVT_CALL(EnableModel, MODEL_saku1, FALSE) - EVT_CALL(EnableModel, MODEL_saku2, FALSE) - EVT_CALL(EnableModel, MODEL_mizu4, FALSE) - EVT_SET(LVar0, MODEL_o318) - EVT_EXEC(N(EVS_AnimateWave)) - EVT_THREAD - EVT_SET(LVar0, MODEL_mizu3) - EVT_EXEC(N(EVS_AnimateWave)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_mizu2) - EVT_EXEC(N(EVS_AnimateWave)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_mizu1) - EVT_EXEC(N(EVS_AnimateWave)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(EnableModel, MODEL_yuka3, FALSE) + Call(EnableModel, MODEL_hako, FALSE) + Call(EnableModel, MODEL_ori, FALSE) + Call(EnableModel, MODEL_saku1, FALSE) + Call(EnableModel, MODEL_saku2, FALSE) + Call(EnableModel, MODEL_mizu4, FALSE) + Set(LVar0, MODEL_o318) + Exec(N(EVS_AnimateWave)) + Thread + Set(LVar0, MODEL_mizu3) + Exec(N(EVS_AnimateWave)) + Wait(5) + Set(LVar0, MODEL_mizu2) + Exec(N(EVS_AnimateWave)) + Wait(5) + Set(LVar0, MODEL_mizu1) + Exec(N(EVS_AnimateWave)) + EndThread + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_trd/trd_05d.inc.c b/src/battle/common/stage/area_trd/trd_05d.inc.c index 45d9a7f746a..570bf69698b 100644 --- a/src/battle/common/stage/area_trd/trd_05d.inc.c +++ b/src/battle/common/stage/area_trd/trd_05d.inc.c @@ -6,32 +6,32 @@ #include "battle/common/stage/lib/BeachEffects.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(EnableModel, MODEL_yuka3, FALSE) - EVT_CALL(EnableModel, MODEL_hako, FALSE) - EVT_CALL(EnableModel, MODEL_kai, FALSE) - EVT_CALL(EnableModel, MODEL_kusari1, FALSE) - EVT_CALL(EnableModel, MODEL_mizu4, FALSE) - EVT_CALL(EnableModel, MODEL_hikari2, FALSE) - EVT_CALL(EnableModel, MODEL_o318, FALSE) - EVT_THREAD - EVT_SET(LVar0, MODEL_mizu3) - EVT_EXEC(N(EVS_AnimateWave)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_mizu2) - EVT_EXEC(N(EVS_AnimateWave)) - EVT_WAIT(5) - EVT_SET(LVar0, MODEL_mizu1) - EVT_EXEC(N(EVS_AnimateWave)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(EnableModel, MODEL_yuka3, FALSE) + Call(EnableModel, MODEL_hako, FALSE) + Call(EnableModel, MODEL_kai, FALSE) + Call(EnableModel, MODEL_kusari1, FALSE) + Call(EnableModel, MODEL_mizu4, FALSE) + Call(EnableModel, MODEL_hikari2, FALSE) + Call(EnableModel, MODEL_o318, FALSE) + Thread + Set(LVar0, MODEL_mizu3) + Exec(N(EVS_AnimateWave)) + Wait(5) + Set(LVar0, MODEL_mizu2) + Exec(N(EVS_AnimateWave)) + Wait(5) + Set(LVar0, MODEL_mizu1) + Exec(N(EVS_AnimateWave)) + EndThread + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_trd/trd_05e.inc.c b/src/battle/common/stage/area_trd/trd_05e.inc.c index 64010105369..6e7fcc29748 100644 --- a/src/battle/common/stage/area_trd/trd_05e.inc.c +++ b/src/battle/common/stage/area_trd/trd_05e.inc.c @@ -6,23 +6,23 @@ #include "battle/common/stage/lib/BeachEffects.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_CALL(EnableModel, MODEL_o318, FALSE) - EVT_CALL(EnableModel, MODEL_mizu1, FALSE) - EVT_CALL(EnableModel, MODEL_mizu2, FALSE) - EVT_CALL(EnableModel, MODEL_mizu3, FALSE) - EVT_CALL(EnableModel, MODEL_ori, FALSE) - EVT_CALL(EnableModel, MODEL_saku1, FALSE) - EVT_CALL(EnableModel, MODEL_saku2, FALSE) - EVT_CALL(EnableModel, MODEL_mizu4, FALSE) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Call(EnableModel, MODEL_o318, FALSE) + Call(EnableModel, MODEL_mizu1, FALSE) + Call(EnableModel, MODEL_mizu2, FALSE) + Call(EnableModel, MODEL_mizu3, FALSE) + Call(EnableModel, MODEL_ori, FALSE) + Call(EnableModel, MODEL_saku1, FALSE) + Call(EnableModel, MODEL_saku2, FALSE) + Call(EnableModel, MODEL_mizu4, FALSE) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/area_trd/trd_05f.inc.c b/src/battle/common/stage/area_trd/trd_05f.inc.c index 6cc417688d6..411306b6385 100644 --- a/src/battle/common/stage/area_trd/trd_05f.inc.c +++ b/src/battle/common/stage/area_trd/trd_05f.inc.c @@ -6,25 +6,25 @@ #include "battle/common/stage/lib/BeachEffects.inc.c" EvtScript N(EVS_PreBattle) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamBGColor, CAM_BATTLE, 0, 0, 0) - EVT_SET(LVar0, MODEL_o318) - EVT_EXEC(N(EVS_AnimateWave)) - EVT_CALL(EnableModel, MODEL_mizu1, FALSE) - EVT_CALL(EnableModel, MODEL_mizu2, FALSE) - EVT_CALL(EnableModel, MODEL_mizu3, FALSE) - EVT_CALL(EnableModel, MODEL_ori, FALSE) - EVT_CALL(EnableModel, MODEL_saku1, FALSE) - EVT_CALL(EnableModel, MODEL_saku2, FALSE) - EVT_CALL(EnableModel, MODEL_mizu4, FALSE) - EVT_CALL(EnableModel, MODEL_hako, FALSE) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamBGColor, CAM_BATTLE, 0, 0, 0) + Set(LVar0, MODEL_o318) + Exec(N(EVS_AnimateWave)) + Call(EnableModel, MODEL_mizu1, FALSE) + Call(EnableModel, MODEL_mizu2, FALSE) + Call(EnableModel, MODEL_mizu3, FALSE) + Call(EnableModel, MODEL_ori, FALSE) + Call(EnableModel, MODEL_saku1, FALSE) + Call(EnableModel, MODEL_saku2, FALSE) + Call(EnableModel, MODEL_mizu4, FALSE) + Call(EnableModel, MODEL_hako, FALSE) + Return + End }; EvtScript N(EVS_PostBattle) = { - EVT_RETURN - EVT_END + Return + End }; Stage NAMESPACE = { diff --git a/src/battle/common/stage/lib/BeachEffects.inc.c b/src/battle/common/stage/lib/BeachEffects.inc.c index b9610fe1139..b563f50e42e 100644 --- a/src/battle/common/stage/lib/BeachEffects.inc.c +++ b/src/battle/common/stage/lib/BeachEffects.inc.c @@ -1,98 +1,98 @@ #include "common.h" EvtScript N(EVS_AnimatePalmLeaves) = { - EVT_SET(LVarA, LVar0) - EVT_LABEL(0) - EVT_CALL(RotateGroup, LVarA, 2, 0, 0, 1) - EVT_WAIT(5) - EVT_CALL(RotateGroup, LVarA, 1, 0, 0, 1) - EVT_WAIT(5) - EVT_CALL(RotateGroup, LVarA, -2, 0, 0, 1) - EVT_WAIT(5) - EVT_CALL(RotateGroup, LVarA, 1, 0, 0, 1) - EVT_WAIT(5) - EVT_CALL(RandInt, 30, LVar0) - EVT_ADD(LVar0, 30) - EVT_WAIT(LVar0) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Label(0) + Call(RotateGroup, LVarA, 2, 0, 0, 1) + Wait(5) + Call(RotateGroup, LVarA, 1, 0, 0, 1) + Wait(5) + Call(RotateGroup, LVarA, -2, 0, 0, 1) + Wait(5) + Call(RotateGroup, LVarA, 1, 0, 0, 1) + Wait(5) + Call(RandInt, 30, LVar0) + Add(LVar0, 30) + Wait(LVar0) + Goto(0) + Return + End }; EvtScript N(EVS_AnimateWave) = { - EVT_SET(LVarA, LVar0) - EVT_LOOP(0) - EVT_CALL(TranslateModel, LVarA, 1, 0, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 1, 0, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, LVarA, 1, EVT_FLOAT(-0.5), 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, LVarA, 1, -1, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, LVarA, EVT_FLOAT(1.5), -1, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, LVarA, 2, -1, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 2, -1, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 2, -1, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, LVarA, EVT_FLOAT(2.5), EVT_FLOAT(-1.5), 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, LVarA, 3, -2, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 3, -2, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, LVarA, 3, EVT_FLOAT(-2.5), 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, LVarA, 3, -3, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 3, -3, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 3, -3, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, LVarA, 3, EVT_FLOAT(-2.5), 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, LVarA, 3, -2, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, LVarA, EVT_FLOAT(2.5), -2, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, LVarA, 2, -2, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, LVarA, 2, EVT_FLOAT(-1.5), 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, LVarA, 2, -1, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, LVarA, EVT_FLOAT(1.5), EVT_FLOAT(-0.5), 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, LVarA, 1, 0, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, LVarA, 1, EVT_FLOAT(0.5), 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, LVarA, 1, 1, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, LVarA, EVT_FLOAT(0.5), 1, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, LVarA, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, LVarA, EVT_FLOAT(-0.5), 1, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, LVarA, -1, 1, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, -1, 1, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, LVarA, -1, EVT_FLOAT(0.5), 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, LVarA, -1, 0, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, -1, 0, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, LVarA, EVT_FLOAT(-0.5), 0, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, LVarA, 0, 0, 0) - EVT_WAIT(2) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Loop(0) + Call(TranslateModel, LVarA, 1, 0, 0) + Wait(2) + Call(TranslateModel, LVarA, 1, 0, 0) + Wait(1) + Call(TranslateModel, LVarA, 1, Float(-0.5), 0) + Wait(1) + Call(TranslateModel, LVarA, 1, -1, 0) + Wait(1) + Call(TranslateModel, LVarA, Float(1.5), -1, 0) + Wait(1) + Call(TranslateModel, LVarA, 2, -1, 0) + Wait(2) + Call(TranslateModel, LVarA, 2, -1, 0) + Wait(2) + Call(TranslateModel, LVarA, 2, -1, 0) + Wait(1) + Call(TranslateModel, LVarA, Float(2.5), Float(-1.5), 0) + Wait(1) + Call(TranslateModel, LVarA, 3, -2, 0) + Wait(2) + Call(TranslateModel, LVarA, 3, -2, 0) + Wait(1) + Call(TranslateModel, LVarA, 3, Float(-2.5), 0) + Wait(1) + Call(TranslateModel, LVarA, 3, -3, 0) + Wait(2) + Call(TranslateModel, LVarA, 3, -3, 0) + Wait(2) + Call(TranslateModel, LVarA, 3, -3, 0) + Wait(1) + Call(TranslateModel, LVarA, 3, Float(-2.5), 0) + Wait(1) + Call(TranslateModel, LVarA, 3, -2, 0) + Wait(1) + Call(TranslateModel, LVarA, Float(2.5), -2, 0) + Wait(1) + Call(TranslateModel, LVarA, 2, -2, 0) + Wait(1) + Call(TranslateModel, LVarA, 2, Float(-1.5), 0) + Wait(1) + Call(TranslateModel, LVarA, 2, -1, 0) + Wait(1) + Call(TranslateModel, LVarA, Float(1.5), Float(-0.5), 0) + Wait(1) + Call(TranslateModel, LVarA, 1, 0, 0) + Wait(1) + Call(TranslateModel, LVarA, 1, Float(0.5), 0) + Wait(1) + Call(TranslateModel, LVarA, 1, 1, 0) + Wait(1) + Call(TranslateModel, LVarA, Float(0.5), 1, 0) + Wait(1) + Call(TranslateModel, LVarA, 0, 1, 0) + Wait(1) + Call(TranslateModel, LVarA, Float(-0.5), 1, 0) + Wait(1) + Call(TranslateModel, LVarA, -1, 1, 0) + Wait(2) + Call(TranslateModel, LVarA, -1, 1, 0) + Wait(1) + Call(TranslateModel, LVarA, -1, Float(0.5), 0) + Wait(1) + Call(TranslateModel, LVarA, -1, 0, 0) + Wait(2) + Call(TranslateModel, LVarA, -1, 0, 0) + Wait(1) + Call(TranslateModel, LVarA, Float(-0.5), 0, 0) + Wait(1) + Call(TranslateModel, LVarA, 0, 0, 0) + Wait(2) + EndLoop + Return + End }; diff --git a/src/battle/common/stage/lib/DripVolumes.inc.c b/src/battle/common/stage/lib/DripVolumes.inc.c index 057ec8088a5..fc8d139f6a1 100644 --- a/src/battle/common/stage/lib/DripVolumes.inc.c +++ b/src/battle/common/stage/lib/DripVolumes.inc.c @@ -79,140 +79,140 @@ API_CALLABLE(N(CheckDripCollisionWithActors)) { } EvtScript N(EVS_UpdateDripSplash) = { - EVT_SET(LVar1, ArrayVar(5)) - EVT_ADD(LVar1, 1) - EVT_SET(LVar2, ArrayVar(0)) - EVT_SET(LVar3, ArrayVar(1)) - EVT_SET(LVar4, ArrayVar(5)) - EVT_ADD(LVar4, 2) - EVT_SET(LVar5, ArrayVar(0)) - EVT_SET(LVar6, ArrayVar(1)) - EVT_SET(LVar7, ArrayVar(5)) - EVT_ADD(LVar7, 3) - EVT_SET(LVar8, ArrayVar(0)) - EVT_SET(LVar9, ArrayVar(1)) - EVT_SET(LVarA, ArrayVar(5)) - EVT_ADD(LVarA, 4) - EVT_SET(LVarB, ArrayVar(0)) - EVT_SET(LVarC, ArrayVar(1)) - EVT_CALL(EnableModel, LVar1, TRUE) - EVT_CALL(EnableModel, LVar4, TRUE) - EVT_CALL(EnableModel, LVar7, TRUE) - EVT_CALL(EnableModel, LVarA, TRUE) - EVT_LOOP(5) - EVT_ADD(LVar0, 1) - EVT_ADD(LVar2, 1) - EVT_ADD(LVar3, 1) - EVT_CALL(TranslateModel, LVar1, LVar2, LVar0, LVar3) - EVT_CALL(ScaleModel, LVar1, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_ADD(LVar5, -1) - EVT_ADD(LVar6, 1) - EVT_CALL(TranslateModel, LVar4, LVar5, LVar0, LVar6) - EVT_CALL(ScaleModel, LVar4, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_ADD(LVar8, 1) - EVT_ADD(LVar9, -1) - EVT_CALL(TranslateModel, LVar7, LVar8, LVar0, LVar9) - EVT_CALL(ScaleModel, LVar7, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_ADD(LVarB, -1) - EVT_ADD(LVarC, -1) - EVT_CALL(TranslateModel, LVarA, LVarB, LVar0, LVarC) - EVT_CALL(ScaleModel, LVarA, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(5) - EVT_ADD(LVar0, -1) - EVT_ADD(LVar2, 1) - EVT_ADD(LVar3, 1) - EVT_CALL(TranslateModel, LVar1, LVar2, LVar0, LVar3) - EVT_CALL(ScaleModel, LVar1, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_ADD(LVar5, -1) - EVT_ADD(LVar6, 1) - EVT_CALL(TranslateModel, LVar4, LVar5, LVar0, LVar6) - EVT_CALL(ScaleModel, LVar4, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_ADD(LVar8, 1) - EVT_ADD(LVar9, -1) - EVT_CALL(TranslateModel, LVar7, LVar8, LVar0, LVar9) - EVT_CALL(ScaleModel, LVar7, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_ADD(LVarB, -1) - EVT_ADD(LVarC, -1) - EVT_CALL(TranslateModel, LVarA, LVarB, LVar0, LVarC) - EVT_CALL(ScaleModel, LVarA, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EnableModel, LVar1, FALSE) - EVT_CALL(EnableModel, LVar4, FALSE) - EVT_CALL(EnableModel, LVar7, FALSE) - EVT_CALL(EnableModel, LVarA, FALSE) - EVT_RETURN - EVT_END + Set(LVar1, ArrayVar(5)) + Add(LVar1, 1) + Set(LVar2, ArrayVar(0)) + Set(LVar3, ArrayVar(1)) + Set(LVar4, ArrayVar(5)) + Add(LVar4, 2) + Set(LVar5, ArrayVar(0)) + Set(LVar6, ArrayVar(1)) + Set(LVar7, ArrayVar(5)) + Add(LVar7, 3) + Set(LVar8, ArrayVar(0)) + Set(LVar9, ArrayVar(1)) + Set(LVarA, ArrayVar(5)) + Add(LVarA, 4) + Set(LVarB, ArrayVar(0)) + Set(LVarC, ArrayVar(1)) + Call(EnableModel, LVar1, TRUE) + Call(EnableModel, LVar4, TRUE) + Call(EnableModel, LVar7, TRUE) + Call(EnableModel, LVarA, TRUE) + Loop(5) + Add(LVar0, 1) + Add(LVar2, 1) + Add(LVar3, 1) + Call(TranslateModel, LVar1, LVar2, LVar0, LVar3) + Call(ScaleModel, LVar1, Float(0.5), Float(0.5), Float(0.5)) + Add(LVar5, -1) + Add(LVar6, 1) + Call(TranslateModel, LVar4, LVar5, LVar0, LVar6) + Call(ScaleModel, LVar4, Float(0.5), Float(0.5), Float(0.5)) + Add(LVar8, 1) + Add(LVar9, -1) + Call(TranslateModel, LVar7, LVar8, LVar0, LVar9) + Call(ScaleModel, LVar7, Float(0.5), Float(0.5), Float(0.5)) + Add(LVarB, -1) + Add(LVarC, -1) + Call(TranslateModel, LVarA, LVarB, LVar0, LVarC) + Call(ScaleModel, LVarA, Float(0.5), Float(0.5), Float(0.5)) + Wait(1) + EndLoop + Loop(5) + Add(LVar0, -1) + Add(LVar2, 1) + Add(LVar3, 1) + Call(TranslateModel, LVar1, LVar2, LVar0, LVar3) + Call(ScaleModel, LVar1, Float(0.5), Float(0.5), Float(0.5)) + Add(LVar5, -1) + Add(LVar6, 1) + Call(TranslateModel, LVar4, LVar5, LVar0, LVar6) + Call(ScaleModel, LVar4, Float(0.5), Float(0.5), Float(0.5)) + Add(LVar8, 1) + Add(LVar9, -1) + Call(TranslateModel, LVar7, LVar8, LVar0, LVar9) + Call(ScaleModel, LVar7, Float(0.5), Float(0.5), Float(0.5)) + Add(LVarB, -1) + Add(LVarC, -1) + Call(TranslateModel, LVarA, LVarB, LVar0, LVarC) + Call(ScaleModel, LVarA, Float(0.5), Float(0.5), Float(0.5)) + Wait(1) + EndLoop + Call(EnableModel, LVar1, FALSE) + Call(EnableModel, LVar4, FALSE) + Call(EnableModel, LVar7, FALSE) + Call(EnableModel, LVarA, FALSE) + Return + End }; EvtScript N(EVS_UpdateDripVolume) = { - EVT_SET_GROUP(0) - EVT_USE_ARRAY(LVarA) - EVT_SET(LVar5, ArrayVar(5)) - EVT_LOOP(5) - EVT_CALL(CloneModel, DROPLET_MODEL, LVar5) - EVT_CALL(TranslateModel, LVar5, ArrayVar(0), ArrayVar(2), ArrayVar(1)) - EVT_ADD(LVar5, 1) - EVT_END_LOOP - EVT_LABEL(0) - EVT_CALL(RandInt, 200, LVar0) - EVT_ADD(LVar0, 50) - EVT_WAIT(LVar0) - EVT_CALL(EnableModel, ArrayVar(5), TRUE) - EVT_CALL(MakeLerp, ArrayVar(2), ArrayVar(3), ArrayVar(4), EASING_QUADRATIC_IN) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, ArrayVar(5), ArrayVar(0), LVar0, ArrayVar(1)) - EVT_WAIT(1) - EVT_CALL(N(CheckDripCollisionWithActors), ArrayVar(5)) - EVT_IF_EQ(LVar2, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_LABEL(10) - EVT_CALL(EnableModel, ArrayVar(5), FALSE) - EVT_EXEC_WAIT(N(EVS_UpdateDripSplash)) - EVT_GOTO(0) - EVT_RETURN - EVT_END + SetGroup(0) + UseArray(LVarA) + Set(LVar5, ArrayVar(5)) + Loop(5) + Call(CloneModel, DROPLET_MODEL, LVar5) + Call(TranslateModel, LVar5, ArrayVar(0), ArrayVar(2), ArrayVar(1)) + Add(LVar5, 1) + EndLoop + Label(0) + Call(RandInt, 200, LVar0) + Add(LVar0, 50) + Wait(LVar0) + Call(EnableModel, ArrayVar(5), TRUE) + Call(MakeLerp, ArrayVar(2), ArrayVar(3), ArrayVar(4), EASING_QUADRATIC_IN) + Label(1) + Call(UpdateLerp) + Call(TranslateModel, ArrayVar(5), ArrayVar(0), LVar0, ArrayVar(1)) + Wait(1) + Call(N(CheckDripCollisionWithActors), ArrayVar(5)) + IfEq(LVar2, 1) + Goto(10) + EndIf + IfEq(LVar1, 1) + Goto(1) + EndIf + Label(10) + Call(EnableModel, ArrayVar(5), FALSE) + ExecWait(N(EVS_UpdateDripSplash)) + Goto(0) + Return + End }; EvtScript N(EVS_CreateDripVolumes) = { - EVT_SET(LVarF, CLONED_MODEL(0)) - EVT_USE_BUF(LVar0) - EVT_BUF_READ1(LVar1) - EVT_LOOP(LVar1) - EVT_BUF_READ4(LVar2, LVar3, LVar4, LVar5) - EVT_BUF_READ3(LVar6, LVar7, LVar8) - EVT_BUF_READ1(LVar9) - EVT_LOOP(LVar9) - EVT_MALLOC_ARRAY(6, LVarA) - EVT_USE_ARRAY(LVarA) - EVT_CALL(RandInt, LVar4, LVarB) - EVT_CALL(RandInt, LVar5, LVarC) - EVT_SET(LVarD, LVar2) - EVT_SET(LVarE, LVar3) - EVT_ADD(LVarD, LVarB) - EVT_ADD(LVarE, LVarC) - EVT_SET(ArrayVar(0), LVarD) - EVT_SET(ArrayVar(1), LVarE) - EVT_SET(ArrayVar(2), LVar6) - EVT_SET(ArrayVar(3), LVar7) - EVT_SET(ArrayVar(4), LVar8) - EVT_SET(ArrayVar(5), LVarF) - EVT_CHILD_THREAD - EVT_EXEC(N(EVS_UpdateDripVolume)) - EVT_END_CHILD_THREAD - EVT_ADD(LVarF, 5) - EVT_END_LOOP - EVT_END_LOOP - EVT_CALL(EnableModel, DROPLET_MODEL, FALSE) - EVT_RETURN - EVT_END + Set(LVarF, CLONED_MODEL(0)) + UseBuf(LVar0) + BufRead1(LVar1) + Loop(LVar1) + BufRead4(LVar2, LVar3, LVar4, LVar5) + BufRead3(LVar6, LVar7, LVar8) + BufRead1(LVar9) + Loop(LVar9) + MallocArray(6, LVarA) + UseArray(LVarA) + Call(RandInt, LVar4, LVarB) + Call(RandInt, LVar5, LVarC) + Set(LVarD, LVar2) + Set(LVarE, LVar3) + Add(LVarD, LVarB) + Add(LVarE, LVarC) + Set(ArrayVar(0), LVarD) + Set(ArrayVar(1), LVarE) + Set(ArrayVar(2), LVar6) + Set(ArrayVar(3), LVar7) + Set(ArrayVar(4), LVar8) + Set(ArrayVar(5), LVarF) + ChildThread + Exec(N(EVS_UpdateDripVolume)) + EndChildThread + Add(LVarF, 5) + EndLoop + EndLoop + Call(EnableModel, DROPLET_MODEL, FALSE) + Return + End }; typedef struct DripVolume { diff --git a/src/battle/common/stage/lib/MovingClouds.inc.c b/src/battle/common/stage/lib/MovingClouds.inc.c index 1ce60c8a1b1..d8990653f9e 100644 --- a/src/battle/common/stage/lib/MovingClouds.inc.c +++ b/src/battle/common/stage/lib/MovingClouds.inc.c @@ -41,21 +41,21 @@ API_CALLABLE(N(InterpCloudTransform)) { // (in) LVar0 : modelID // (in) LVar2 : motion phase offset EvtScript N(EVS_AnimateCloud) = { - EVT_SET(LVarA, LVar0) - EVT_SET(LVar7, LVar2) - EVT_MUL(LVar7, 10) - EVT_LABEL(0) - EVT_ADD(LVar7, 4) - EVT_IF_GT(LVar7, 3599) - EVT_SUB(LVar7, 3600) - EVT_END_IF - EVT_CALL(N(InterpCloudTransform), LVar7, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(RotateModel, LVarA, LVar3, 0, 1, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Set(LVar7, LVar2) + Mul(LVar7, 10) + Label(0) + Add(LVar7, 4) + IfGt(LVar7, 3599) + Sub(LVar7, 3600) + EndIf + Call(N(InterpCloudTransform), LVar7, LVar0, LVar1, LVar2, LVar3) + Call(TranslateModel, LVarA, LVar0, LVar1, LVar2) + Call(RotateModel, LVarA, LVar3, 0, 1, 0) + Wait(1) + Goto(0) + Return + End }; // (in) LVar0 : modelID @@ -63,25 +63,25 @@ EvtScript N(EVS_AnimateCloud) = { // (in) LVar3 : offsetY // (in) LVar4 : offsetZ EvtScript N(EVS_AnimateCloud_WithOffset2D) = { - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar3) - EVT_SET(LVarC, LVar4) - EVT_SET(LVar7, LVar2) - EVT_MUL(LVar7, 10) - EVT_LABEL(0) - EVT_ADD(LVar7, 4) - EVT_IF_GT(LVar7, 3599) - EVT_SUB(LVar7, 3600) - EVT_END_IF - EVT_CALL(N(InterpCloudTransform), LVar7, LVar0, LVar1, LVar2, LVar3) - EVT_ADDF(LVar1, LVarB) - EVT_ADDF(LVar2, LVarC) - EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(RotateModel, LVarA, LVar3, 0, 1, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Set(LVarB, LVar3) + Set(LVarC, LVar4) + Set(LVar7, LVar2) + Mul(LVar7, 10) + Label(0) + Add(LVar7, 4) + IfGt(LVar7, 3599) + Sub(LVar7, 3600) + EndIf + Call(N(InterpCloudTransform), LVar7, LVar0, LVar1, LVar2, LVar3) + AddF(LVar1, LVarB) + AddF(LVar2, LVarC) + Call(TranslateModel, LVarA, LVar0, LVar1, LVar2) + Call(RotateModel, LVarA, LVar3, 0, 1, 0) + Wait(1) + Goto(0) + Return + End }; // (in) LVar0 : modelID @@ -90,25 +90,25 @@ EvtScript N(EVS_AnimateCloud_WithOffset2D) = { // (in) LVar4 : offsetY // (in) LVar4 : offsetZ EvtScript N(EVS_AnimateCloud_WithOffset3D) = { - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar3) - EVT_SET(LVarC, LVar4) - EVT_SET(LVarD, LVar5) - EVT_SET(LVar7, LVar2) - EVT_MUL(LVar7, 10) - EVT_LABEL(0) - EVT_ADD(LVar7, 4) - EVT_IF_GT(LVar7, 3599) - EVT_SUB(LVar7, 3600) - EVT_END_IF - EVT_CALL(N(InterpCloudTransform), LVar7, LVar0, LVar1, LVar2, LVar3) - EVT_ADDF(LVar0, LVarB) - EVT_ADDF(LVar1, LVarC) - EVT_ADDF(LVar2, LVarD) - EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(RotateModel, LVarA, LVar3, 0, 1, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Set(LVarB, LVar3) + Set(LVarC, LVar4) + Set(LVarD, LVar5) + Set(LVar7, LVar2) + Mul(LVar7, 10) + Label(0) + Add(LVar7, 4) + IfGt(LVar7, 3599) + Sub(LVar7, 3600) + EndIf + Call(N(InterpCloudTransform), LVar7, LVar0, LVar1, LVar2, LVar3) + AddF(LVar0, LVarB) + AddF(LVar1, LVarC) + AddF(LVar2, LVarD) + Call(TranslateModel, LVarA, LVar0, LVar1, LVar2) + Call(RotateModel, LVarA, LVar3, 0, 1, 0) + Wait(1) + Goto(0) + Return + End }; diff --git a/src/battle/common/stage/lib/RandomFlowers.inc.c b/src/battle/common/stage/lib/RandomFlowers.inc.c index 1d166a5f94b..0226260c11c 100644 --- a/src/battle/common/stage/lib/RandomFlowers.inc.c +++ b/src/battle/common/stage/lib/RandomFlowers.inc.c @@ -2,64 +2,64 @@ #include "effects.h" EvtScript N(EVS_RandomFlowers_Background) = { - EVT_LABEL(0) + Label(0) // posX range: 125 to 375 - EVT_CALL(RandInt, 250, LVar0) - EVT_SUB(LVar0, 125) + Call(RandInt, 250, LVar0) + Sub(LVar0, 125) // posY: 0 - EVT_SET(LVar1, 0) + Set(LVar1, 0) // posZ range: -100 to -60 - EVT_CALL(RandInt, 40, LVar2) - EVT_SUB(LVar2, 100) - EVT_CALL(RandInt, 30, LVar3) - EVT_ADD(LVar3, 90) - EVT_PLAY_EFFECT(EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0) - EVT_CALL(RandInt, 20, LVar0) - EVT_ADD(LVar0, 20) - EVT_WAIT(LVar0) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(RandInt, 40, LVar2) + Sub(LVar2, 100) + Call(RandInt, 30, LVar3) + Add(LVar3, 90) + PlayEffect(EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0) + Call(RandInt, 20, LVar0) + Add(LVar0, 20) + Wait(LVar0) + Goto(0) + Return + End }; EvtScript N(EVS_RandomFlowers_Foreground) = { - EVT_LABEL(0) + Label(0) // posX range: 125 to 375 - EVT_CALL(RandInt, 250, LVar0) - EVT_SUB(LVar0, 125) + Call(RandInt, 250, LVar0) + Sub(LVar0, 125) // posY: 0 - EVT_SET(LVar1, 0) + Set(LVar1, 0) // posZ range: 71 to 121 - EVT_CALL(RandInt, 50, LVar2) - EVT_ADD(LVar2, 71) - EVT_CALL(RandInt, 30, LVar3) - EVT_ADD(LVar3, 90) - EVT_PLAY_EFFECT(EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0) - EVT_CALL(RandInt, 30, LVar0) - EVT_ADD(LVar0, 20) - EVT_WAIT(LVar0) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(RandInt, 50, LVar2) + Add(LVar2, 71) + Call(RandInt, 30, LVar3) + Add(LVar3, 90) + PlayEffect(EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0) + Call(RandInt, 30, LVar0) + Add(LVar0, 20) + Wait(LVar0) + Goto(0) + Return + End }; EvtScript N(EVS_RandomFlowers_FarBack) = { - EVT_LABEL(0) + Label(0) // posX range: 125 to 375 - EVT_CALL(RandInt, 250, LVar0) - EVT_SUB(LVar0, 125) + Call(RandInt, 250, LVar0) + Sub(LVar0, 125) // posY: 50 - EVT_SET(LVar1, 50) + Set(LVar1, 50) // posZ range: -124 to -84 - EVT_CALL(RandInt, 40, LVar2) - EVT_ADD(LVar2, -124) - EVT_CALL(RandInt, 30, LVar3) - EVT_ADD(LVar3, 90) - EVT_PLAY_EFFECT(EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0) - EVT_CALL(RandInt, 30, LVar0) - EVT_ADD(LVar0, 20) - EVT_WAIT(LVar0) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(RandInt, 40, LVar2) + Add(LVar2, -124) + Call(RandInt, 30, LVar3) + Add(LVar3, 90) + PlayEffect(EFFECT_FLOATING_FLOWER, LVar0, LVar1, LVar2, LVar3, 0, 0) + Call(RandInt, 30, LVar0) + Add(LVar0, 20) + Wait(LVar0) + Goto(0) + Return + End }; diff --git a/src/battle/common/stage/lib/Snowflakes.inc.c b/src/battle/common/stage/lib/Snowflakes.inc.c index 104d1db7bcb..78d9ce5b7ad 100644 --- a/src/battle/common/stage/lib/Snowflakes.inc.c +++ b/src/battle/common/stage/lib/Snowflakes.inc.c @@ -49,61 +49,61 @@ API_CALLABLE(N(GetSnowflakePosition)) { } EvtScript N(EVS_SpawnSnowfall) = { - EVT_CALL(N(SpawnSnowfall)) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(N(SpawnSnowfall)) + Loop(0) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_RandomlySpinSnowflake) = { - EVT_SET(LVarA, LVar0) - EVT_LABEL(0) - EVT_CALL(RandInt, 30, LVar0) - EVT_ADD(LVar0, 30) - EVT_WAIT(LVar0) - EVT_SET(LVar1, 0) - EVT_LOOP(10) - EVT_ADD(LVar1, 36) - EVT_CALL(RotateModel, LVarA, LVar1, 0, 1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Label(0) + Call(RandInt, 30, LVar0) + Add(LVar0, 30) + Wait(LVar0) + Set(LVar1, 0) + Loop(10) + Add(LVar1, 36) + Call(RotateModel, LVarA, LVar1, 0, 1, 0) + Wait(1) + EndLoop + Goto(0) + Return + End }; EvtScript N(EVS_AnimateHangingSnowflake_RandomSpin) = { - EVT_SET(LVarA, LVar0) // modelID - EVT_SET(LVarB, LVar1) - EVT_EXEC(N(EVS_RandomlySpinSnowflake)) - EVT_SET(LVar7, 0) - EVT_LABEL(0) - EVT_ADD(LVar7, 4) - EVT_IF_GT(LVar7, 3599) - EVT_SUB(LVar7, 3600) - EVT_END_IF - EVT_CALL(N(GetSnowflakePosition), LVar7, LVar0, LVar1, LVar2) - EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) // modelID + Set(LVarB, LVar1) + Exec(N(EVS_RandomlySpinSnowflake)) + Set(LVar7, 0) + Label(0) + Add(LVar7, 4) + IfGt(LVar7, 3599) + Sub(LVar7, 3600) + EndIf + Call(N(GetSnowflakePosition), LVar7, LVar0, LVar1, LVar2) + Call(TranslateModel, LVarA, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_AnimateHangingSnowflake_NoSpin) = { - EVT_SET(LVarA, LVar0) - EVT_SET(LVar7, 0) - EVT_LABEL(0) - EVT_ADD(LVar7, 4) - EVT_IF_GT(LVar7, 3599) - EVT_SUB(LVar7, 3600) - EVT_END_IF - EVT_CALL(N(GetSnowflakePosition), LVar7, LVar0, LVar1, LVar2) - EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Set(LVar7, 0) + Label(0) + Add(LVar7, 4) + IfGt(LVar7, 3599) + Sub(LVar7, 3600) + EndIf + Call(N(GetSnowflakePosition), LVar7, LVar0, LVar1, LVar2) + Call(TranslateModel, LVarA, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; diff --git a/src/battle/common/stage/lib/TexturePanner.inc.c b/src/battle/common/stage/lib/TexturePanner.inc.c index fa4add3cdd0..dc5ac3c97f2 100644 --- a/src/battle/common/stage/lib/TexturePanner.inc.c +++ b/src/battle/common/stage/lib/TexturePanner.inc.c @@ -6,20 +6,20 @@ // (in) LVar2 : main du // (in) LVar3 : main dv EvtScript N(EVS_TexturePanMain) = { - EVT_SET(LVarA, LVar1) - EVT_SET(LVarB, LVar2) - EVT_SET(LVarC, LVar3) - EVT_CALL(SetTexPanner, LVar0, LVar1) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, LVarA, TEX_PANNER_MAIN, LVar0, LVar1) - EVT_ADD(LVar0, LVarB) - EVT_ADD(LVar1, LVarC) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVarA, LVar1) + Set(LVarB, LVar2) + Set(LVarC, LVar3) + Call(SetTexPanner, LVar0, LVar1) + Set(LVar0, 0) + Set(LVar1, 0) + Loop(0) + Call(SetTexPanOffset, LVarA, TEX_PANNER_MAIN, LVar0, LVar1) + Add(LVar0, LVarB) + Add(LVar1, LVarC) + Wait(1) + EndLoop + Return + End }; // pan the main and aux tiles along U @@ -28,21 +28,21 @@ EvtScript N(EVS_TexturePanMain) = { // (in) LVar2 : main du // (in) LVar3 : aux du EvtScript N(EVS_TexturePanBothU) = { - EVT_SET(LVarA, LVar1) - EVT_SET(LVarB, LVar2) - EVT_SET(LVarC, LVar3) - EVT_CALL(SetTexPanner, LVar0, LVar1) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, LVarA, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, LVarA, TEX_PANNER_AUX, LVar1, 0) - EVT_ADD(LVar0, LVarB) - EVT_ADD(LVar1, LVarC) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVarA, LVar1) + Set(LVarB, LVar2) + Set(LVarC, LVar3) + Call(SetTexPanner, LVar0, LVar1) + Set(LVar0, 0) + Set(LVar1, 0) + Loop(0) + Call(SetTexPanOffset, LVarA, TEX_PANNER_MAIN, LVar0, 0) + Call(SetTexPanOffset, LVarA, TEX_PANNER_AUX, LVar1, 0) + Add(LVar0, LVarB) + Add(LVar1, LVarC) + Wait(1) + EndLoop + Return + End }; // pan the main and aux tiles along V @@ -51,19 +51,19 @@ EvtScript N(EVS_TexturePanBothU) = { // (in) LVar2 : main dv // (in) LVar3 : aux dv EvtScript N(EVS_TexturePanBothV) = { - EVT_SET(LVarA, LVar1) - EVT_SET(LVarB, LVar2) - EVT_SET(LVarC, LVar3) - EVT_CALL(SetTexPanner, LVar0, LVar1) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, LVarA, TEX_PANNER_MAIN, 0, LVar0) - EVT_CALL(SetTexPanOffset, LVarA, TEX_PANNER_AUX, 0, LVar1) - EVT_ADD(LVar0, LVarB) - EVT_ADD(LVar1, LVarC) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVarA, LVar1) + Set(LVarB, LVar2) + Set(LVarC, LVar3) + Call(SetTexPanner, LVar0, LVar1) + Set(LVar0, 0) + Set(LVar1, 0) + Loop(0) + Call(SetTexPanOffset, LVarA, TEX_PANNER_MAIN, 0, LVar0) + Call(SetTexPanOffset, LVarA, TEX_PANNER_AUX, 0, LVar1) + Add(LVar0, LVarB) + Add(LVar1, LVarC) + Wait(1) + EndLoop + Return + End }; diff --git a/src/battle/common/stage/lib/WaterEffects.inc.c b/src/battle/common/stage/lib/WaterEffects.inc.c index 2cadf16f10c..4c87f25ee98 100644 --- a/src/battle/common/stage/lib/WaterEffects.inc.c +++ b/src/battle/common/stage/lib/WaterEffects.inc.c @@ -107,149 +107,149 @@ API_CALLABLE(N(UpdateAnimatedFish)) { } EvtScript N(EVS_AnimateFishModel) = { - EVT_SET(LVarA, LVar0) - EVT_LABEL(0) - EVT_CALL(N(UpdateAnimatedFish), FISH_STATE_INIT) - EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1) - EVT_WAIT(1) - EVT_LOOP(0) - EVT_CALL(N(UpdateAnimatedFish), FISH_STATE_1) - EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVarB, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(RotateModel, LVarA, -7, 0, 0, 1) - EVT_WAIT(5) - EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(RotateModel, LVarA, -27, 0, 0, 1) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(RotateModel, LVarA, -5, 0, 0, 1) - EVT_WAIT(3) - EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1) - EVT_WAIT(5) - EVT_LOOP(0) - EVT_CALL(N(UpdateAnimatedFish), FISH_STATE_2) - EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVarB, 2) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(RandInt, 80, LVarB) - EVT_ADD(LVarB, 30) - EVT_LOOP(LVarB) - EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(RandInt, 5, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(N(UpdateAnimatedFish), FISH_STATE_3) - EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1) - EVT_WAIT(1) - EVT_LOOP(0) - EVT_CALL(N(UpdateAnimatedFish), FISH_STATE_1) - EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVarB, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(RotateModel, LVarA, -7, 0, 0, 1) - EVT_WAIT(5) - EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(RotateModel, LVarA, -27, 0, 0, 1) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(RotateModel, LVarA, -5, 0, 0, 1) - EVT_WAIT(3) - EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1) - EVT_WAIT(5) - EVT_LOOP(0) - EVT_CALL(N(UpdateAnimatedFish), FISH_STATE_2) - EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVarB, 2) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(RandInt, 80, LVarB) - EVT_ADD(LVarB, 30) - EVT_LOOP(LVarB) - EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(RotateModel, LVarA, -20, 0, 0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Label(0) + Call(N(UpdateAnimatedFish), FISH_STATE_INIT) + Call(TranslateModel, LVarA, LVar0, LVar1, LVar2) + Call(RotateModel, LVarA, -20, 0, 0, 1) + Wait(1) + Loop(0) + Call(N(UpdateAnimatedFish), FISH_STATE_1) + Call(TranslateModel, LVarA, LVar0, LVar1, LVar2) + Call(RotateModel, LVarA, -20, 0, 0, 1) + Wait(1) + IfEq(LVarB, 1) + BreakLoop + EndIf + EndLoop + Call(TranslateModel, LVarA, LVar0, LVar1, LVar2) + Call(RotateModel, LVarA, -7, 0, 0, 1) + Wait(5) + Call(TranslateModel, LVarA, LVar0, LVar1, LVar2) + Call(RotateModel, LVarA, -27, 0, 0, 1) + Wait(2) + Call(TranslateModel, LVarA, LVar0, LVar1, LVar2) + Call(RotateModel, LVarA, -5, 0, 0, 1) + Wait(3) + Call(TranslateModel, LVarA, LVar0, LVar1, LVar2) + Call(RotateModel, LVarA, -20, 0, 0, 1) + Wait(5) + Loop(0) + Call(N(UpdateAnimatedFish), FISH_STATE_2) + Call(TranslateModel, LVarA, LVar0, LVar1, LVar2) + Call(RotateModel, LVarA, -20, 0, 0, 1) + Wait(1) + IfEq(LVarB, 2) + BreakLoop + EndIf + EndLoop + Call(RandInt, 80, LVarB) + Add(LVarB, 30) + Loop(LVarB) + Call(TranslateModel, LVarA, LVar0, LVar1, LVar2) + Call(RotateModel, LVarA, -20, 0, 0, 1) + Wait(1) + EndLoop + Call(RandInt, 5, LVar0) + IfNe(LVar0, 0) + Goto(0) + EndIf + Call(N(UpdateAnimatedFish), FISH_STATE_3) + Call(TranslateModel, LVarA, LVar0, LVar1, LVar2) + Call(RotateModel, LVarA, -20, 0, 0, 1) + Wait(1) + Loop(0) + Call(N(UpdateAnimatedFish), FISH_STATE_1) + Call(TranslateModel, LVarA, LVar0, LVar1, LVar2) + Call(RotateModel, LVarA, -20, 0, 0, 1) + Wait(1) + IfEq(LVarB, 1) + BreakLoop + EndIf + EndLoop + Call(TranslateModel, LVarA, LVar0, LVar1, LVar2) + Call(RotateModel, LVarA, -7, 0, 0, 1) + Wait(5) + Call(TranslateModel, LVarA, LVar0, LVar1, LVar2) + Call(RotateModel, LVarA, -27, 0, 0, 1) + Wait(2) + Call(TranslateModel, LVarA, LVar0, LVar1, LVar2) + Call(RotateModel, LVarA, -5, 0, 0, 1) + Wait(3) + Call(TranslateModel, LVarA, LVar0, LVar1, LVar2) + Call(RotateModel, LVarA, -20, 0, 0, 1) + Wait(5) + Loop(0) + Call(N(UpdateAnimatedFish), FISH_STATE_2) + Call(TranslateModel, LVarA, LVar0, LVar1, LVar2) + Call(RotateModel, LVarA, -20, 0, 0, 1) + Wait(1) + IfEq(LVarB, 2) + BreakLoop + EndIf + EndLoop + Call(RandInt, 80, LVarB) + Add(LVarB, 30) + Loop(LVarB) + Call(TranslateModel, LVarA, LVar0, LVar1, LVar2) + Call(RotateModel, LVarA, -20, 0, 0, 1) + Wait(1) + EndLoop + Goto(0) + Return + End }; EvtScript N(EVS_AnimateWaveModel) = { - EVT_SET(LVarA, LVar0) - EVT_LOOP(0) - EVT_CALL(TranslateModel, LVarA, 1, 0, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 1, 0, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 1, -1, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 2, -1, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 2, -1, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 2, -1, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 3, -2, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 3, -2, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 3, -3, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 3, -3, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 3, -3, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 3, -2, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 2, -2, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 2, -1, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 1, 0, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 1, 1, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 0, 1, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, -1, 1, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, -1, 1, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, -1, 0, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, -1, 0, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 0, 0, 0) - EVT_WAIT(2) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Loop(0) + Call(TranslateModel, LVarA, 1, 0, 0) + Wait(2) + Call(TranslateModel, LVarA, 1, 0, 0) + Wait(2) + Call(TranslateModel, LVarA, 1, -1, 0) + Wait(2) + Call(TranslateModel, LVarA, 2, -1, 0) + Wait(2) + Call(TranslateModel, LVarA, 2, -1, 0) + Wait(2) + Call(TranslateModel, LVarA, 2, -1, 0) + Wait(2) + Call(TranslateModel, LVarA, 3, -2, 0) + Wait(2) + Call(TranslateModel, LVarA, 3, -2, 0) + Wait(2) + Call(TranslateModel, LVarA, 3, -3, 0) + Wait(2) + Call(TranslateModel, LVarA, 3, -3, 0) + Wait(2) + Call(TranslateModel, LVarA, 3, -3, 0) + Wait(2) + Call(TranslateModel, LVarA, 3, -2, 0) + Wait(2) + Call(TranslateModel, LVarA, 2, -2, 0) + Wait(2) + Call(TranslateModel, LVarA, 2, -1, 0) + Wait(2) + Call(TranslateModel, LVarA, 1, 0, 0) + Wait(2) + Call(TranslateModel, LVarA, 1, 1, 0) + Wait(2) + Call(TranslateModel, LVarA, 0, 1, 0) + Wait(2) + Call(TranslateModel, LVarA, -1, 1, 0) + Wait(2) + Call(TranslateModel, LVarA, -1, 1, 0) + Wait(2) + Call(TranslateModel, LVarA, -1, 0, 0) + Wait(2) + Call(TranslateModel, LVarA, -1, 0, 0) + Wait(2) + Call(TranslateModel, LVarA, 0, 0, 0) + Wait(2) + EndLoop + Return + End }; s32 N(DriftBobbingOffsets)[] = { @@ -258,102 +258,102 @@ s32 N(DriftBobbingOffsets)[] = { }; EvtScript N(EVS_AnimateDrifting) = { - EVT_SET(LVarA, LVar0) // modelID - EVT_SET(LVarB, LVar1) - EVT_SET(LVar5, 5) - EVT_USE_BUF(EVT_PTR(N(DriftBobbingOffsets))) - EVT_LABEL(0) + Set(LVarA, LVar0) // modelID + Set(LVarB, LVar1) + Set(LVar5, 5) + UseBuf(Ref(N(DriftBobbingOffsets))) + Label(0) // drift along from left to right - EVT_BUF_READ1(LVar1) - EVT_IF_EQ(LVar1, 255) - EVT_USE_BUF(EVT_PTR(N(DriftBobbingOffsets))) - EVT_BUF_READ1(LVar1) - EVT_END_IF - EVT_SET(LVar0, LVar5) - EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, 0) - EVT_WAIT(1) - EVT_ADD(LVar5, 1) - EVT_SET(LVarC, LVarB) - EVT_SUB(LVarC, 20) - EVT_IF_GT(LVar5, LVarC) - EVT_GOTO(1) - EVT_END_IF - EVT_SET(LVar0, LVar5) - EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, 0) - EVT_WAIT(1) - EVT_ADD(LVar5, 1) - EVT_SET(LVarC, LVarB) - EVT_SUB(LVarC, 20) - EVT_IF_GT(LVar5, LVarC) - EVT_GOTO(1) - EVT_END_IF - EVT_GOTO(0) - EVT_LABEL(1) + BufRead1(LVar1) + IfEq(LVar1, 255) + UseBuf(Ref(N(DriftBobbingOffsets))) + BufRead1(LVar1) + EndIf + Set(LVar0, LVar5) + Call(TranslateModel, LVarA, LVar0, LVar1, 0) + Wait(1) + Add(LVar5, 1) + Set(LVarC, LVarB) + Sub(LVarC, 20) + IfGt(LVar5, LVarC) + Goto(1) + EndIf + Set(LVar0, LVar5) + Call(TranslateModel, LVarA, LVar0, LVar1, 0) + Wait(1) + Add(LVar5, 1) + Set(LVarC, LVarB) + Sub(LVarC, 20) + IfGt(LVar5, LVarC) + Goto(1) + EndIf + Goto(0) + Label(1) // fall down - EVT_SET(LVar2, 0) - EVT_LOOP(20) - EVT_ADD(LVar5, 1) - EVT_SUB(LVar1, 2) - EVT_SET(LVar0, LVar5) - EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, 0) - EVT_WAIT(1) - EVT_END_LOOP + Set(LVar2, 0) + Loop(20) + Add(LVar5, 1) + Sub(LVar1, 2) + Set(LVar0, LVar5) + Call(TranslateModel, LVarA, LVar0, LVar1, 0) + Wait(1) + EndLoop // reset to left side of stage - EVT_SUB(LVar5, 280) - EVT_SET(LVar1, 0) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Sub(LVar5, 280) + Set(LVar1, 0) + Goto(0) + Return + End }; EvtScript N(EVS_AnimateFlotsam) = { - EVT_SET(LVarA, LVar0) - EVT_LOOP(0) - EVT_CALL(TranslateModel, LVarA, 0, 0, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 0, 0, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 0, -1, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 0, -1, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 0, -1, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 0, -1, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 0, -2, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 0, -2, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 0, -3, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 0, -3, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 0, -3, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 0, -2, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 0, -2, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 0, -1, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 0, 0, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 0, 1, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 0, 1, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 0, 1, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 0, 1, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 0, 0, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 0, 0, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, LVarA, 0, 0, 0) - EVT_WAIT(2) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Loop(0) + Call(TranslateModel, LVarA, 0, 0, 0) + Wait(2) + Call(TranslateModel, LVarA, 0, 0, 0) + Wait(2) + Call(TranslateModel, LVarA, 0, -1, 0) + Wait(2) + Call(TranslateModel, LVarA, 0, -1, 0) + Wait(2) + Call(TranslateModel, LVarA, 0, -1, 0) + Wait(2) + Call(TranslateModel, LVarA, 0, -1, 0) + Wait(2) + Call(TranslateModel, LVarA, 0, -2, 0) + Wait(2) + Call(TranslateModel, LVarA, 0, -2, 0) + Wait(2) + Call(TranslateModel, LVarA, 0, -3, 0) + Wait(2) + Call(TranslateModel, LVarA, 0, -3, 0) + Wait(2) + Call(TranslateModel, LVarA, 0, -3, 0) + Wait(2) + Call(TranslateModel, LVarA, 0, -2, 0) + Wait(2) + Call(TranslateModel, LVarA, 0, -2, 0) + Wait(2) + Call(TranslateModel, LVarA, 0, -1, 0) + Wait(2) + Call(TranslateModel, LVarA, 0, 0, 0) + Wait(2) + Call(TranslateModel, LVarA, 0, 1, 0) + Wait(2) + Call(TranslateModel, LVarA, 0, 1, 0) + Wait(2) + Call(TranslateModel, LVarA, 0, 1, 0) + Wait(2) + Call(TranslateModel, LVarA, 0, 1, 0) + Wait(2) + Call(TranslateModel, LVarA, 0, 0, 0) + Wait(2) + Call(TranslateModel, LVarA, 0, 0, 0) + Wait(2) + Call(TranslateModel, LVarA, 0, 0, 0) + Wait(2) + EndLoop + Return + End }; diff --git a/src/battle/dmg_player.c b/src/battle/dmg_player.c index 3fcf6eef07a..b5faaeea7c5 100644 --- a/src/battle/dmg_player.c +++ b/src/battle/dmg_player.c @@ -83,49 +83,49 @@ API_CALLABLE(PlayShrinkHitFX) { } EvtScript EVS_PlaySleepHitFX = { - EVT_CALL(PlaySleepHitFX) - EVT_RETURN - EVT_END + Call(PlaySleepHitFX) + Return + End }; EvtScript EVS_PlayDizzyHitFX = { - EVT_CALL(PlayDizzyHitFX) - EVT_RETURN - EVT_END + Call(PlayDizzyHitFX) + Return + End }; EvtScript EVS_PlayParalyzeHitFX = { - EVT_CALL(PlayParalyzeHitFX) - EVT_RETURN - EVT_END + Call(PlayParalyzeHitFX) + Return + End }; EvtScript EVS_PlayPoisonHitFX = { - EVT_CALL(PlayPoisonHitFX) - EVT_RETURN - EVT_END + Call(PlayPoisonHitFX) + Return + End }; EvtScript EVS_PlayStopHitFX = { - EVT_CALL(PlayStopHitFX) - EVT_RETURN - EVT_END + Call(PlayStopHitFX) + Return + End }; EvtScript EVS_PlayFreezeHitFX = { - EVT_CALL(PlayFreezeHitSnowflakeFX) - EVT_WAIT(8) - EVT_CALL(PlayFreezeHitSnowflakeFX) - EVT_WAIT(15) - EVT_CALL(PlayFreezeHitParticleFX) - EVT_RETURN - EVT_END + Call(PlayFreezeHitSnowflakeFX) + Wait(8) + Call(PlayFreezeHitSnowflakeFX) + Wait(15) + Call(PlayFreezeHitParticleFX) + Return + End }; EvtScript EVS_PlayShrinkHitFX = { - EVT_CALL(PlayShrinkHitFX) - EVT_RETURN - EVT_END + Call(PlayShrinkHitFX) + Return + End }; void dispatch_event_player(s32 eventType) { diff --git a/src/battle/level_up.c b/src/battle/level_up.c index e5e194f4eb5..9cbcc64aaf4 100644 --- a/src/battle/level_up.c +++ b/src/battle/level_up.c @@ -352,124 +352,124 @@ API_CALLABLE(MakeLevelUpConfetti) { } EvtScript EVS_ShowStarpoints = { - EVT_SET(LVarF, 0) - EVT_CALL(GetRemainingStarPointsReward) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_IF_LT(LVar0, 2) - EVT_CALL(CreateVirtualEntity, LVar6, EVT_PTR(EMS_starpoint_starpoint)) - EVT_CALL(SetVirtualEntityPosition, LVar6, -278, 68, 70) - EVT_CALL(SetVirtualEntityScale, LVar6, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_ELSE - EVT_CALL(CreateVirtualEntity, LVar6, EVT_PTR(EMS_starpoint_starpoints)) - EVT_CALL(SetVirtualEntityPosition, LVar6, -278, 68, 70) - EVT_CALL(SetVirtualEntityScale, LVar6, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_SWITCH(LVar0) - EVT_CASE_GT(99) - EVT_SET(LVarF, 3) - EVT_CASE_GT(9) - EVT_SET(LVarF, 2) - EVT_CASE_DEFAULT - EVT_SET(LVarF, 1) - EVT_END_SWITCH - EVT_CALL(GetStarPointDigitScripts) - EVT_CALL(CreateVirtualEntity, LVar7, LVarA) - EVT_CALL(SetVirtualEntityPosition, LVar7, -353, 68, 70) - EVT_CALL(SetVirtualEntityScale, LVar7, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_CALL(CreateVirtualEntity, LVar8, LVarB) - EVT_CALL(SetVirtualEntityPosition, LVar8, -338, 68, 70) - EVT_CALL(SetVirtualEntityScale, LVar8, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_CALL(CreateVirtualEntity, LVar9, LVarC) - EVT_CALL(SetVirtualEntityPosition, LVar9, -323, 68, 70) - EVT_CALL(SetVirtualEntityScale, LVar9, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_CALL(InitStarPointModelFlags) - EVT_SWITCH(LVarF) - EVT_CASE_EQ(3) - EVT_SET(LVar0, -197) - EVT_CASE_EQ(2) - EVT_SET(LVar0, -204) - EVT_CASE_EQ(1) - EVT_SET(LVar0, -211) - EVT_END_SWITCH - EVT_LOOP(10) - EVT_ADD(LVar0, 20) - EVT_SET(LVar1, LVar0) - EVT_ADD(LVar1, -78) - EVT_CALL(SetVirtualEntityPosition, LVar6, LVar1, 68, 70) - EVT_SET(LVar1, LVar0) - EVT_ADD(LVar1, -146) - EVT_CALL(SetVirtualEntityPosition, LVar7, LVar1, 68, 70) - EVT_SET(LVar1, LVar0) - EVT_ADD(LVar1, -131) - EVT_CALL(SetVirtualEntityPosition, LVar8, LVar1, 68, 70) - EVT_SET(LVar1, LVar0) - EVT_ADD(LVar1, -116) - EVT_CALL(SetVirtualEntityPosition, LVar9, LVar1, 68, 70) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(AwaitBattleRewardsDone) - EVT_SWITCH(LVarF) - EVT_CASE_EQ(3) - EVT_SET(LVar0, 3) - EVT_CASE_EQ(2) - EVT_SET(LVar0, -4) - EVT_CASE_EQ(1) - EVT_SET(LVar0, -11) - EVT_END_SWITCH - EVT_LOOP(10) - EVT_ADD(LVar0, 20) - EVT_SET(LVar1, LVar0) - EVT_ADD(LVar1, -78) - EVT_CALL(SetVirtualEntityPosition, LVar6, LVar1, 68, 70) - EVT_SET(LVar1, LVar0) - EVT_ADD(LVar1, -154) - EVT_CALL(SetVirtualEntityPosition, LVar7, LVar1, 68, 70) - EVT_SET(LVar1, LVar0) - EVT_ADD(LVar1, -139) - EVT_CALL(SetVirtualEntityPosition, LVar8, LVar1, 68, 70) - EVT_SET(LVar1, LVar0) - EVT_ADD(LVar1, -124) - EVT_CALL(SetVirtualEntityPosition, LVar9, LVar1, 68, 70) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(DeleteVirtualEntity, LVar6) - EVT_CALL(DeleteVirtualEntity, LVar7) - EVT_CALL(DeleteVirtualEntity, LVar8) - EVT_CALL(DeleteVirtualEntity, LVar9) - EVT_RETURN - EVT_END + Set(LVarF, 0) + Call(GetRemainingStarPointsReward) + IfEq(LVar0, 0) + Return + EndIf + IfLt(LVar0, 2) + Call(CreateVirtualEntity, LVar6, Ref(EMS_starpoint_starpoint)) + Call(SetVirtualEntityPosition, LVar6, -278, 68, 70) + Call(SetVirtualEntityScale, LVar6, Float(0.5), Float(0.5), Float(0.5)) + Else + Call(CreateVirtualEntity, LVar6, Ref(EMS_starpoint_starpoints)) + Call(SetVirtualEntityPosition, LVar6, -278, 68, 70) + Call(SetVirtualEntityScale, LVar6, Float(0.5), Float(0.5), Float(0.5)) + Set(LFlag0, TRUE) + EndIf + Switch(LVar0) + CaseGt(99) + Set(LVarF, 3) + CaseGt(9) + Set(LVarF, 2) + CaseDefault + Set(LVarF, 1) + EndSwitch + Call(GetStarPointDigitScripts) + Call(CreateVirtualEntity, LVar7, LVarA) + Call(SetVirtualEntityPosition, LVar7, -353, 68, 70) + Call(SetVirtualEntityScale, LVar7, Float(0.5), Float(0.5), Float(0.5)) + Call(CreateVirtualEntity, LVar8, LVarB) + Call(SetVirtualEntityPosition, LVar8, -338, 68, 70) + Call(SetVirtualEntityScale, LVar8, Float(0.5), Float(0.5), Float(0.5)) + Call(CreateVirtualEntity, LVar9, LVarC) + Call(SetVirtualEntityPosition, LVar9, -323, 68, 70) + Call(SetVirtualEntityScale, LVar9, Float(0.5), Float(0.5), Float(0.5)) + Call(InitStarPointModelFlags) + Switch(LVarF) + CaseEq(3) + Set(LVar0, -197) + CaseEq(2) + Set(LVar0, -204) + CaseEq(1) + Set(LVar0, -211) + EndSwitch + Loop(10) + Add(LVar0, 20) + Set(LVar1, LVar0) + Add(LVar1, -78) + Call(SetVirtualEntityPosition, LVar6, LVar1, 68, 70) + Set(LVar1, LVar0) + Add(LVar1, -146) + Call(SetVirtualEntityPosition, LVar7, LVar1, 68, 70) + Set(LVar1, LVar0) + Add(LVar1, -131) + Call(SetVirtualEntityPosition, LVar8, LVar1, 68, 70) + Set(LVar1, LVar0) + Add(LVar1, -116) + Call(SetVirtualEntityPosition, LVar9, LVar1, 68, 70) + Wait(1) + EndLoop + Call(AwaitBattleRewardsDone) + Switch(LVarF) + CaseEq(3) + Set(LVar0, 3) + CaseEq(2) + Set(LVar0, -4) + CaseEq(1) + Set(LVar0, -11) + EndSwitch + Loop(10) + Add(LVar0, 20) + Set(LVar1, LVar0) + Add(LVar1, -78) + Call(SetVirtualEntityPosition, LVar6, LVar1, 68, 70) + Set(LVar1, LVar0) + Add(LVar1, -154) + Call(SetVirtualEntityPosition, LVar7, LVar1, 68, 70) + Set(LVar1, LVar0) + Add(LVar1, -139) + Call(SetVirtualEntityPosition, LVar8, LVar1, 68, 70) + Set(LVar1, LVar0) + Add(LVar1, -124) + Call(SetVirtualEntityPosition, LVar9, LVar1, 68, 70) + Wait(1) + EndLoop + Call(DeleteVirtualEntity, LVar6) + Call(DeleteVirtualEntity, LVar7) + Call(DeleteVirtualEntity, LVar8) + Call(DeleteVirtualEntity, LVar9) + Return + End }; EvtScript EVS_ShowLevelUp = { - EVT_CALL(CreateVirtualEntity, LVar9, EVT_PTR(EMS_level_up)) - EVT_CALL(SetVirtualEntityPosition, LVar9, 0, 210, 70) - EVT_CALL(InitLevelUpModelFlags) - EVT_CHILD_THREAD - EVT_WAIT(4) - EVT_CALL(MakeLevelUpConfetti) - EVT_END_CHILD_THREAD - EVT_THREAD - EVT_WAIT(8) - EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, 1, 0, 3, EVT_FLOAT(2.25)) - EVT_CALL(ShakeCam, 1, 0, 4, EVT_FLOAT(1.2)) - EVT_CALL(ShakeCam, 1, 0, 6, EVT_FLOAT(0.45)) - EVT_CALL(ShakeCam, 1, 0, 8, EVT_FLOAT(0.15)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 210) - EVT_LOOP(10) - EVT_SUB(LVar0, 10) - EVT_CALL(SetVirtualEntityPosition, LVar9, 0, LVar0, 70) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(8) - EVT_RETURN - EVT_END + Call(CreateVirtualEntity, LVar9, Ref(EMS_level_up)) + Call(SetVirtualEntityPosition, LVar9, 0, 210, 70) + Call(InitLevelUpModelFlags) + ChildThread + Wait(4) + Call(MakeLevelUpConfetti) + EndChildThread + Thread + Wait(8) + Call(ShakeCam, 1, 0, 5, Float(3.0)) + Call(ShakeCam, 1, 0, 3, Float(2.25)) + Call(ShakeCam, 1, 0, 4, Float(1.2)) + Call(ShakeCam, 1, 0, 6, Float(0.45)) + Call(ShakeCam, 1, 0, 8, Float(0.15)) + EndThread + Thread + Set(LVar0, 210) + Loop(10) + Sub(LVar0, 10) + Call(SetVirtualEntityPosition, LVar9, 0, LVar0, 70) + Wait(1) + EndLoop + EndThread + Wait(8) + Return + End }; void btl_state_update_celebration(void) { diff --git a/src/battle/move/hammer/attack.c b/src/battle/move/hammer/attack.c index c50f4ea805c..86ccf5159f4 100644 --- a/src/battle/move/hammer/attack.c +++ b/src/battle/move/hammer/attack.c @@ -11,344 +11,344 @@ extern EvtScript N(EVS_UseMove_Impl); EvtScript N(EVS_UseMove) = { - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_SET(LVarD, 45) - EVT_SET(LVarE, 1) - EVT_SET(LVarF, 2) - EVT_EXEC_WAIT(N(EVS_UseMove_Impl)) - EVT_CASE_EQ(1) - EVT_SET(LVarD, 45) - EVT_SET(LVarE, 2) - EVT_SET(LVarF, 4) - EVT_EXEC_WAIT(N(EVS_UseMove_Impl)) - EVT_CASE_EQ(2) - EVT_SET(LVarD, 45) - EVT_SET(LVarE, 3) - EVT_SET(LVarF, 6) - EVT_EXEC_WAIT(N(EVS_UseMove_Impl)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(ShowActionHud, TRUE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Set(LVarD, 45) + Set(LVarE, 1) + Set(LVarF, 2) + ExecWait(N(EVS_UseMove_Impl)) + CaseEq(1) + Set(LVarD, 45) + Set(LVarE, 2) + Set(LVarF, 4) + ExecWait(N(EVS_UseMove_Impl)) + CaseEq(2) + Set(LVarD, 45) + Set(LVarE, 3) + Set(LVarF, 6) + ExecWait(N(EVS_UseMove_Impl)) + EndSwitch + Return + End }; EvtScript N(EVS_UseMove_Impl) = { - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_UseBasicHammer)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_UseSuperHammer)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_UseUltraHammer)) - EVT_END_SWITCH - EVT_CALL(GetActionSuccessCopy, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_MIN) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.3)) - EVT_END_THREAD - EVT_CASE_EQ(1) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.6)) - EVT_END_THREAD - EVT_CASE_EQ(2) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.9)) - EVT_END_THREAD - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_MIN) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.3)) - EVT_END_THREAD - EVT_CASE_EQ(1) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.6)) - EVT_END_THREAD - EVT_CASE_EQ(2) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.9)) - EVT_END_THREAD - EVT_END_SWITCH - EVT_END_SWITCH - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) - EVT_WAIT(1) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_END_SWITCH - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_END_SWITCH - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_A)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_UseBasicHammer)) + CaseEq(1) + ExecWait(N(EVS_UseSuperHammer)) + CaseEq(2) + ExecWait(N(EVS_UseUltraHammer)) + EndSwitch + Call(GetActionSuccessCopy, LVar0) + Switch(LVar0) + CaseGt(0) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(StartRumble, BTL_RUMBLE_PLAYER_MIN) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.3)) + EndThread + CaseEq(1) + Call(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.6)) + EndThread + CaseEq(2) + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.9)) + EndThread + EndSwitch + CaseDefault + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(StartRumble, BTL_RUMBLE_PLAYER_MIN) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.3)) + EndThread + CaseEq(1) + Call(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.6)) + EndThread + CaseEq(2) + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.9)) + EndThread + EndSwitch + EndSwitch + Call(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) + Wait(1) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + Return + EndIf + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + EndSwitch + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + EndSwitch + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + ExecWait(N(EVS_Hammer_ReturnHome_A)) + EndCaseGroup + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_FirstStrike) = { - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_SET(LVar9, 1) - EVT_SET_CONST(LVarA, ANIM_MarioB1_Smash1_Hold1) - EVT_SET_CONST(LVarB, ANIM_MarioB1_Smash1_PreSwing) - EVT_SET_CONST(LVarC, ANIM_MarioB1_Smash1_Swing) - EVT_CASE_EQ(1) - EVT_SET(LVar9, 2) - EVT_SET_CONST(LVarA, ANIM_MarioB1_Smash2_Hold1) - EVT_SET_CONST(LVarB, ANIM_MarioB1_Smash2_Hold2) - EVT_SET_CONST(LVarC, ANIM_MarioB1_Smash2_Swing) - EVT_CASE_EQ(2) - EVT_SET(LVar9, 3) - EVT_SET_CONST(LVarA, ANIM_MarioB1_Smash3_Hold1) - EVT_SET_CONST(LVarB, ANIM_MarioB1_Smash3_Hold2) - EVT_SET_CONST(LVarC, ANIM_MarioB1_Smash3_Swing) - EVT_END_SWITCH - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 32) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseBattleCamPresetImmediately, BTL_CAM_PLAYER_AIM_HAMMER) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, LVarA) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, LVarB) - EVT_WAIT(3) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, LVarC) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_SWING_1) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_MIN) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.3)) - EVT_END_THREAD - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_SWING_2) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.6)) - EVT_END_THREAD - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_SWING_3) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.9)) - EVT_END_THREAD - EVT_END_SWITCH - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) - EVT_WAIT(1) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_END_SWITCH - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVar9, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_A)) - EVT_RETURN - EVT_END + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Set(LVar9, 1) + SetConst(LVarA, ANIM_MarioB1_Smash1_Hold1) + SetConst(LVarB, ANIM_MarioB1_Smash1_PreSwing) + SetConst(LVarC, ANIM_MarioB1_Smash1_Swing) + CaseEq(1) + Set(LVar9, 2) + SetConst(LVarA, ANIM_MarioB1_Smash2_Hold1) + SetConst(LVarB, ANIM_MarioB1_Smash2_Hold2) + SetConst(LVarC, ANIM_MarioB1_Smash2_Swing) + CaseEq(2) + Set(LVar9, 3) + SetConst(LVarA, ANIM_MarioB1_Smash3_Hold1) + SetConst(LVarB, ANIM_MarioB1_Smash3_Hold2) + SetConst(LVarC, ANIM_MarioB1_Smash3_Swing) + EndSwitch + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 32) + Set(LVar1, 0) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(UseBattleCamPresetImmediately, BTL_CAM_PLAYER_AIM_HAMMER) + Call(SetAnimation, ACTOR_PLAYER, 0, LVarA) + Wait(8) + Call(SetAnimation, ACTOR_PLAYER, 0, LVarB) + Wait(3) + Call(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) + Call(SetAnimation, ACTOR_PLAYER, 0, LVarC) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_SWING_1) + Call(StartRumble, BTL_RUMBLE_PLAYER_MIN) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.3)) + EndThread + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_SWING_2) + Call(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.6)) + EndThread + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_SWING_3) + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.9)) + EndThread + EndSwitch + Call(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) + Wait(1) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + Return + EndIf + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + EndSwitch + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVar9, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + ExecWait(N(EVS_Hammer_ReturnHome_A)) + Return + End }; extern EvtScript N(EVS_UseBerserker_Impl); EvtScript N(EVS_UseBerserker) = { - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_SET(LVarD, 75) - EVT_SET(LVarE, 1) - EVT_SET(LVarF, 2) - EVT_EXEC_WAIT(N(EVS_UseBerserker_Impl)) - EVT_CASE_EQ(1) - EVT_SET(LVarD, 66) - EVT_SET(LVarE, 2) - EVT_SET(LVarF, 4) - EVT_EXEC_WAIT(N(EVS_UseBerserker_Impl)) - EVT_CASE_EQ(2) - EVT_SET(LVarD, 57) - EVT_SET(LVarE, 3) - EVT_SET(LVarF, 6) - EVT_EXEC_WAIT(N(EVS_UseBerserker_Impl)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(ShowActionHud, TRUE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Set(LVarD, 75) + Set(LVarE, 1) + Set(LVarF, 2) + ExecWait(N(EVS_UseBerserker_Impl)) + CaseEq(1) + Set(LVarD, 66) + Set(LVarE, 2) + Set(LVarF, 4) + ExecWait(N(EVS_UseBerserker_Impl)) + CaseEq(2) + Set(LVarD, 57) + Set(LVarE, 3) + Set(LVarF, 6) + ExecWait(N(EVS_UseBerserker_Impl)) + EndSwitch + Return + End }; EvtScript N(EVS_UseBerserker_Impl) = { - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_UseBasicHammer)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_UseSuperHammer)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_UseUltraHammer)) - EVT_END_SWITCH - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, LVar9, 16) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.3)) - EVT_END_THREAD - EVT_CASE_EQ(1) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.6)) - EVT_END_THREAD - EVT_CASE_EQ(2) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.9)) - EVT_END_THREAD - EVT_END_SWITCH - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActionSuccessCopy, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.3)) - EVT_END_THREAD - EVT_CASE_EQ(1) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.6)) - EVT_END_THREAD - EVT_CASE_EQ(2) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.9)) - EVT_END_THREAD - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.3)) - EVT_END_THREAD - EVT_CASE_EQ(1) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.6)) - EVT_END_THREAD - EVT_CASE_EQ(2) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.9)) - EVT_END_THREAD - EVT_END_SWITCH - EVT_END_SWITCH - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) - EVT_WAIT(1) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_END_SWITCH - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_END_SWITCH - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_A)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_UseBasicHammer)) + CaseEq(1) + ExecWait(N(EVS_UseSuperHammer)) + CaseEq(2) + ExecWait(N(EVS_UseUltraHammer)) + EndSwitch + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, LVar9, 16) + IfEq(LVar0, HIT_RESULT_MISS) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.3)) + EndThread + CaseEq(1) + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.6)) + EndThread + CaseEq(2) + Call(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.9)) + EndThread + EndSwitch + Call(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + Return + EndIf + Call(GetActionSuccessCopy, LVar0) + Switch(LVar0) + CaseGt(0) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.3)) + EndThread + CaseEq(1) + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.6)) + EndThread + CaseEq(2) + Call(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.9)) + EndThread + EndSwitch + CaseDefault + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.3)) + EndThread + CaseEq(1) + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.6)) + EndThread + CaseEq(2) + Call(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.9)) + EndThread + EndSwitch + EndSwitch + Call(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) + Wait(1) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + Return + EndIf + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + EndSwitch + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + EndSwitch + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + ExecWait(N(EVS_Hammer_ReturnHome_A)) + EndCaseGroup + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/battle/move/hammer/auto_smash.c b/src/battle/move/hammer/auto_smash.c index 77438e99e8e..b3224086aa9 100644 --- a/src/battle/move/hammer/auto_smash.c +++ b/src/battle/move/hammer/auto_smash.c @@ -8,124 +8,124 @@ extern EvtScript N(EVS_UseMove_Impl); EvtScript N(EVS_UseMove) = { - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_AUTO_SUCCEED_ACTION, TRUE) - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_SET(LVarD, 45) - EVT_SET(LVarE, 1) - EVT_SET(LVarF, 2) - EVT_EXEC_WAIT(N(EVS_UseMove_Impl)) - EVT_CASE_EQ(1) - EVT_SET(LVarD, 45) - EVT_SET(LVarE, 2) - EVT_SET(LVarF, 4) - EVT_EXEC_WAIT(N(EVS_UseMove_Impl)) - EVT_CASE_EQ(2) - EVT_SET(LVarD, 45) - EVT_SET(LVarE, 3) - EVT_SET(LVarF, 6) - EVT_EXEC_WAIT(N(EVS_UseMove_Impl)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetBattleFlagBits, BS_FLAGS1_AUTO_SUCCEED_ACTION, TRUE) + Call(ShowActionHud, TRUE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Set(LVarD, 45) + Set(LVarE, 1) + Set(LVarF, 2) + ExecWait(N(EVS_UseMove_Impl)) + CaseEq(1) + Set(LVarD, 45) + Set(LVarE, 2) + Set(LVarF, 4) + ExecWait(N(EVS_UseMove_Impl)) + CaseEq(2) + Set(LVarD, 45) + Set(LVarE, 3) + Set(LVarF, 6) + ExecWait(N(EVS_UseMove_Impl)) + EndSwitch + Return + End }; EvtScript N(EVS_UseMove_Impl) = { - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_UseBasicHammer)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_UseSuperHammer)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_UseUltraHammer)) - EVT_END_SWITCH - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, LVar9, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_CALL(GetActionSuccessCopy, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_MIN) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.3)) - EVT_END_THREAD - EVT_CASE_EQ(1) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.6)) - EVT_END_THREAD - EVT_CASE_EQ(2) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.9)) - EVT_END_THREAD - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_MIN) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.3)) - EVT_END_THREAD - EVT_CASE_EQ(1) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.6)) - EVT_END_THREAD - EVT_CASE_EQ(2) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.9)) - EVT_END_THREAD - EVT_END_SWITCH - EVT_END_SWITCH - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) - EVT_WAIT(1) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_END_SWITCH - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_END_SWITCH - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_A)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_UseBasicHammer)) + CaseEq(1) + ExecWait(N(EVS_UseSuperHammer)) + CaseEq(2) + ExecWait(N(EVS_UseUltraHammer)) + EndSwitch + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, LVar9, BS_FLAGS1_INCLUDE_POWER_UPS) + Call(GetActionSuccessCopy, LVar0) + Switch(LVar0) + CaseGt(0) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(StartRumble, BTL_RUMBLE_PLAYER_MIN) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.3)) + EndThread + CaseEq(1) + Call(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.6)) + EndThread + CaseEq(2) + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.9)) + EndThread + EndSwitch + CaseDefault + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(StartRumble, BTL_RUMBLE_PLAYER_MIN) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.3)) + EndThread + CaseEq(1) + Call(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.6)) + EndThread + CaseEq(2) + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.9)) + EndThread + EndSwitch + EndSwitch + Call(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) + Wait(1) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + Return + EndIf + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + EndSwitch + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + EndSwitch + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + ExecWait(N(EVS_Hammer_ReturnHome_A)) + EndCaseGroup + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/battle/move/hammer/d_down_pound.c b/src/battle/move/hammer/d_down_pound.c index 3fd827de4fd..3cef97004a6 100644 --- a/src/battle/move/hammer/d_down_pound.c +++ b/src/battle/move/hammer/d_down_pound.c @@ -24,124 +24,124 @@ API_CALLABLE(func_802A10A4_74AE34) { extern EvtScript N(UseMove_Impl); EvtScript N(EVS_UseMove) = { - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(SetDamageSource, DMG_SRC_D_DOWN_POUND) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_SET(LVarD, 50) - EVT_SET(LVarE, 1) - EVT_SET(LVarF, 2) - EVT_EXEC_WAIT(N(UseMove_Impl)) - EVT_CASE_EQ(1) - EVT_SET(LVarD, 50) - EVT_SET(LVarE, 2) - EVT_SET(LVarF, 4) - EVT_EXEC_WAIT(N(UseMove_Impl)) - EVT_CASE_EQ(2) - EVT_SET(LVarD, 50) - EVT_SET(LVarE, 3) - EVT_SET(LVarF, 6) - EVT_EXEC_WAIT(N(UseMove_Impl)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(ShowActionHud, TRUE) + Call(SetDamageSource, DMG_SRC_D_DOWN_POUND) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Set(LVarD, 50) + Set(LVarE, 1) + Set(LVarF, 2) + ExecWait(N(UseMove_Impl)) + CaseEq(1) + Set(LVarD, 50) + Set(LVarE, 2) + Set(LVarF, 4) + ExecWait(N(UseMove_Impl)) + CaseEq(2) + Set(LVarD, 50) + Set(LVarE, 3) + Set(LVarF, 6) + ExecWait(N(UseMove_Impl)) + EndSwitch + Return + End }; EvtScript N(UseMove_Impl) = { - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_UseBasicHammer)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_UseSuperHammer)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_UseUltraHammer)) - EVT_END_SWITCH - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH | DAMAGE_TYPE_IGNORE_DEFENSE, 25, 0, LVar9, 16) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.3)) - EVT_END_THREAD - EVT_CASE_EQ(1) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.6)) - EVT_END_THREAD - EVT_CASE_EQ(2) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.9)) - EVT_END_THREAD - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.3)) - EVT_END_THREAD - EVT_CASE_EQ(1) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.6)) - EVT_END_THREAD - EVT_CASE_EQ(2) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.9)) - EVT_END_THREAD - EVT_END_SWITCH - EVT_END_SWITCH - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_IF_GT(LVar0, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) - EVT_CALL(MoveBattleCamOver, 5) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) - EVT_CALL(MoveBattleCamOver, 50) - EVT_END_IF - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_1) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_2) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_3) - EVT_END_SWITCH - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPlayerActionSuccess, LVarA) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_802A10A4_74AE34, LVar0, LVar1, LVar2) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH | DAMAGE_TYPE_IGNORE_DEFENSE, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH | DAMAGE_TYPE_IGNORE_DEFENSE, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_A)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_UseBasicHammer)) + CaseEq(1) + ExecWait(N(EVS_UseSuperHammer)) + CaseEq(2) + ExecWait(N(EVS_UseUltraHammer)) + EndSwitch + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH | DAMAGE_TYPE_IGNORE_DEFENSE, 25, 0, LVar9, 16) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.3)) + EndThread + CaseEq(1) + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.6)) + EndThread + CaseEq(2) + Call(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.9)) + EndThread + EndSwitch + CaseDefault + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.3)) + EndThread + CaseEq(1) + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.6)) + EndThread + CaseEq(2) + Call(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.9)) + EndThread + EndSwitch + EndSwitch + Call(GetPlayerActionSuccess, LVar0) + IfGt(LVar0, FALSE) + Call(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) + Call(MoveBattleCamOver, 5) + Else + Call(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) + Call(MoveBattleCamOver, 50) + EndIf + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_1) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_2) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_3) + EndSwitch + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + Return + EndIf + Call(GetPlayerActionSuccess, LVarA) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_802A10A4_74AE34, LVar0, LVar1, LVar2) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH | DAMAGE_TYPE_IGNORE_DEFENSE, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH | DAMAGE_TYPE_IGNORE_DEFENSE, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + ExecWait(N(EVS_Hammer_ReturnHome_A)) + EndCaseGroup + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/battle/move/hammer/hammer_charge_0.c b/src/battle/move/hammer/hammer_charge_0.c index 07b1730fea7..800e8f9b5f7 100644 --- a/src/battle/move/hammer/hammer_charge_0.c +++ b/src/battle/move/hammer/hammer_charge_0.c @@ -44,126 +44,126 @@ API_CALLABLE(func_802A11CC_74F2FC) { extern EvtScript N(EVS_802A3348); EvtScript N(EVS_UseMove1) = { - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_SET(LVarD, 65) - EVT_SET(LVarE, 1) - EVT_SET(LVarF, 2) - EVT_EXEC_WAIT(N(EVS_802A3348)) - EVT_CASE_EQ(1) - EVT_SET(LVarD, 65) - EVT_SET(LVarE, 2) - EVT_SET(LVarF, 4) - EVT_EXEC_WAIT(N(EVS_802A3348)) - EVT_CASE_EQ(2) - EVT_SET(LVarD, 65) - EVT_SET(LVarE, 4) - EVT_SET(LVarF, 6) - EVT_EXEC_WAIT(N(EVS_802A3348)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Set(LVarD, 65) + Set(LVarE, 1) + Set(LVarF, 2) + ExecWait(N(EVS_802A3348)) + CaseEq(1) + Set(LVarD, 65) + Set(LVarE, 2) + Set(LVarF, 4) + ExecWait(N(EVS_802A3348)) + CaseEq(2) + Set(LVarD, 65) + Set(LVarE, 4) + Set(LVarF, 6) + ExecWait(N(EVS_802A3348)) + EndSwitch + Return + End }; EvtScript N(EVS_802A3348) = { - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_UseBasicHammer)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_UseSuperHammer)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_UseBasicHammer)) - EVT_END_SWITCH - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, LVar9, 16) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_MIN) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.3)) - EVT_END_THREAD - EVT_CASE_EQ(1) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.6)) - EVT_END_THREAD - EVT_CASE_EQ(2) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.9)) - EVT_END_THREAD - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_MIN) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.3)) - EVT_END_THREAD - EVT_CASE_EQ(1) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.6)) - EVT_END_THREAD - EVT_CASE_EQ(2) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.9)) - EVT_END_THREAD - EVT_END_SWITCH - EVT_END_SWITCH - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_RETURN - EVT_END_IF - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_END_SWITCH - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_SET(LFlag0, TRUE) - EVT_CASE_DEFAULT - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_END_SWITCH - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SET(LFlag0, FALSE) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_A)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_UseBasicHammer)) + CaseEq(1) + ExecWait(N(EVS_UseSuperHammer)) + CaseEq(2) + ExecWait(N(EVS_UseBasicHammer)) + EndSwitch + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, LVar9, 16) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(StartRumble, BTL_RUMBLE_PLAYER_MIN) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.3)) + EndThread + CaseEq(1) + Call(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.6)) + EndThread + CaseEq(2) + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.9)) + EndThread + EndSwitch + CaseDefault + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(StartRumble, BTL_RUMBLE_PLAYER_MIN) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.3)) + EndThread + CaseEq(1) + Call(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.6)) + EndThread + CaseEq(2) + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.9)) + EndThread + EndSwitch + EndSwitch + Call(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + Return + EndIf + Set(LFlag0, FALSE) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + EndSwitch + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + Set(LFlag0, TRUE) + CaseDefault + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + EndSwitch + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_TRIGGER_EVENTS) + Set(LFlag0, FALSE) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + ExecWait(N(EVS_Hammer_ReturnHome_A)) + EndCaseGroup + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + EndCaseGroup + EndSwitch + Return + End }; extern EvtScript N(EVS_802A3948); @@ -171,170 +171,170 @@ extern EvtScript N(EVS_802A3C90); extern EvtScript N(EVS_802A3FD8); EvtScript N(EVS_UseMove0) = { - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_802A3948)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_802A3C90)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_802A3FD8)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_802A3948)) + CaseEq(1) + ExecWait(N(EVS_802A3C90)) + CaseEq(2) + ExecWait(N(EVS_802A3FD8)) + EndSwitch + Return + End }; EvtScript N(EVS_802A3948) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_CHARGE_UP) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) - EVT_WAIT(8) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) - EVT_WAIT(8) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer1_Charging) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_802A11CC_74F2FC, LVar0, LVar1, LVar2, EVT_FLOAT(1.2)) - EVT_WAIT(3) - EVT_CALL(func_802A11CC_74F2FC, LVar0, LVar1, LVar2, EVT_FLOAT(0.8)) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 5) - EVT_CALL(N(IsHammerMaxCharged)) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 15) - EVT_ADD(LVar1, 35) - EVT_CALL(func_802A10C8_74F1F8, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_CHARGE_UP) - EVT_WAIT(4) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer1_Charged, ANIM_MarioB3_Hammer1_Charged, ANIM_MarioB3_Hammer1_Charged) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 20, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_CALL(ShowVariableMessageBox, BTL_MSG_CHARGE_HAMMER, 60, 1) - EVT_ELSE - EVT_CALL(ShowMessageBox, BTL_MSG_CANT_CHARGE, 60) - EVT_END_IF - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(IsMessageBoxDisplayed, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_PLAYER_CHARGE_UP) + Wait(10) + Thread + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) + Wait(8) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) + Wait(8) + EndThread + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer1_Charging) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_802A11CC_74F2FC, LVar0, LVar1, LVar2, Float(1.2)) + Wait(3) + Call(func_802A11CC_74F2FC, LVar0, LVar1, LVar2, Float(0.8)) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 5) + Call(N(IsHammerMaxCharged)) + IfEq(LVar0, 0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 15) + Add(LVar1, 35) + Call(func_802A10C8_74F1F8, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_CHARGE_UP) + Wait(4) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.0)) + Call(SetActorSpeed, ACTOR_PLAYER, Float(1.0)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer1_Charged, ANIM_MarioB3_Hammer1_Charged, ANIM_MarioB3_Hammer1_Charged) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 20, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) + Wait(4) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Call(ShowVariableMessageBox, BTL_MSG_CHARGE_HAMMER, 60, 1) + Else + Call(ShowMessageBox, BTL_MSG_CANT_CHARGE, 60) + EndIf + Label(0) + Wait(1) + Call(IsMessageBoxDisplayed, LVar0) + IfEq(LVar0, TRUE) + Goto(0) + EndIf + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Return + End }; EvtScript N(EVS_802A3C90) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_CHARGE_UP) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) - EVT_WAIT(8) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) - EVT_WAIT(8) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer2_Charging) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_802A11CC_74F2FC, LVar0, LVar1, LVar2, EVT_FLOAT(1.2)) - EVT_WAIT(3) - EVT_CALL(func_802A11CC_74F2FC, LVar0, LVar1, LVar2, EVT_FLOAT(0.8)) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 5) - EVT_CALL(N(IsHammerMaxCharged)) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 15) - EVT_ADD(LVar1, 35) - EVT_CALL(func_802A10C8_74F1F8, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_CHARGE_UP) - EVT_WAIT(4) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer2_Charged, ANIM_MarioB3_Hammer2_Charged, ANIM_MarioB3_Hammer2_Charged) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 20, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_CALL(ShowVariableMessageBox, BTL_MSG_CHARGE_HAMMER, 60, 1) - EVT_ELSE - EVT_CALL(ShowMessageBox, BTL_MSG_CANT_CHARGE, 60) - EVT_END_IF - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(IsMessageBoxDisplayed, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_PLAYER_CHARGE_UP) + Wait(10) + Thread + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) + Wait(8) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) + Wait(8) + EndThread + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer2_Charging) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_802A11CC_74F2FC, LVar0, LVar1, LVar2, Float(1.2)) + Wait(3) + Call(func_802A11CC_74F2FC, LVar0, LVar1, LVar2, Float(0.8)) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 5) + Call(N(IsHammerMaxCharged)) + IfEq(LVar0, 0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 15) + Add(LVar1, 35) + Call(func_802A10C8_74F1F8, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_CHARGE_UP) + Wait(4) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.0)) + Call(SetActorSpeed, ACTOR_PLAYER, Float(1.0)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer2_Charged, ANIM_MarioB3_Hammer2_Charged, ANIM_MarioB3_Hammer2_Charged) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 20, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) + Wait(4) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Call(ShowVariableMessageBox, BTL_MSG_CHARGE_HAMMER, 60, 1) + Else + Call(ShowMessageBox, BTL_MSG_CANT_CHARGE, 60) + EndIf + Label(0) + Wait(1) + Call(IsMessageBoxDisplayed, LVar0) + IfEq(LVar0, TRUE) + Goto(0) + EndIf + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Return + End }; EvtScript N(EVS_802A3FD8) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_CHARGE_UP) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) - EVT_WAIT(8) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) - EVT_WAIT(8) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer3_Charging) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_802A11CC_74F2FC, LVar0, LVar1, LVar2, EVT_FLOAT(1.2)) - EVT_WAIT(3) - EVT_CALL(func_802A11CC_74F2FC, LVar0, LVar1, LVar2, EVT_FLOAT(0.8)) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 5) - EVT_CALL(N(IsHammerMaxCharged)) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 15) - EVT_ADD(LVar1, 35) - EVT_CALL(func_802A10C8_74F1F8, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_CHARGE_UP) - EVT_WAIT(4) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer3_Charged, ANIM_MarioB3_Hammer3_Charged, ANIM_MarioB3_Hammer3_Charged) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 20, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_CALL(ShowVariableMessageBox, BTL_MSG_CHARGE_HAMMER, 60, 1) - EVT_ELSE - EVT_CALL(ShowMessageBox, BTL_MSG_CANT_CHARGE, 60) - EVT_END_IF - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(IsMessageBoxDisplayed, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_PLAYER_CHARGE_UP) + Wait(10) + Thread + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) + Wait(8) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) + Wait(8) + EndThread + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer3_Charging) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_802A11CC_74F2FC, LVar0, LVar1, LVar2, Float(1.2)) + Wait(3) + Call(func_802A11CC_74F2FC, LVar0, LVar1, LVar2, Float(0.8)) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 5) + Call(N(IsHammerMaxCharged)) + IfEq(LVar0, 0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 15) + Add(LVar1, 35) + Call(func_802A10C8_74F1F8, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_CHARGE_UP) + Wait(4) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.0)) + Call(SetActorSpeed, ACTOR_PLAYER, Float(1.0)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer3_Charged, ANIM_MarioB3_Hammer3_Charged, ANIM_MarioB3_Hammer3_Charged) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 20, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) + Wait(4) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Call(ShowVariableMessageBox, BTL_MSG_CHARGE_HAMMER, 60, 1) + Else + Call(ShowMessageBox, BTL_MSG_CANT_CHARGE, 60) + EndIf + Label(0) + Wait(1) + Call(IsMessageBoxDisplayed, LVar0) + IfEq(LVar0, TRUE) + Goto(0) + EndIf + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Return + End }; diff --git a/src/battle/move/hammer/hammer_charge_1.c b/src/battle/move/hammer/hammer_charge_1.c index 3437c74b497..66bb3585d9c 100644 --- a/src/battle/move/hammer/hammer_charge_1.c +++ b/src/battle/move/hammer/hammer_charge_1.c @@ -53,126 +53,126 @@ API_CALLABLE(func_802A12FC_7598AC) { extern EvtScript N(EVS_UseMove1_Impl); EvtScript N(EVS_UseMove1) = { - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_SET(LVarD, 65) - EVT_SET(LVarE, 1) - EVT_SET(LVarF, 2) - EVT_EXEC_WAIT(N(EVS_UseMove1_Impl)) - EVT_CASE_EQ(1) - EVT_SET(LVarD, 65) - EVT_SET(LVarE, 2) - EVT_SET(LVarF, 4) - EVT_EXEC_WAIT(N(EVS_UseMove1_Impl)) - EVT_CASE_EQ(2) - EVT_SET(LVarD, 65) - EVT_SET(LVarE, 4) - EVT_SET(LVarF, 6) - EVT_EXEC_WAIT(N(EVS_UseMove1_Impl)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Set(LVarD, 65) + Set(LVarE, 1) + Set(LVarF, 2) + ExecWait(N(EVS_UseMove1_Impl)) + CaseEq(1) + Set(LVarD, 65) + Set(LVarE, 2) + Set(LVarF, 4) + ExecWait(N(EVS_UseMove1_Impl)) + CaseEq(2) + Set(LVarD, 65) + Set(LVarE, 4) + Set(LVarF, 6) + ExecWait(N(EVS_UseMove1_Impl)) + EndSwitch + Return + End }; EvtScript N(EVS_UseMove1_Impl) = { - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_UseBasicHammer)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_UseSuperHammer)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_UseBasicHammer)) - EVT_END_SWITCH - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, LVar9, 16) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_MIN) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.3)) - EVT_END_THREAD - EVT_CASE_EQ(1) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.6)) - EVT_END_THREAD - EVT_CASE_EQ(2) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.9)) - EVT_END_THREAD - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_MIN) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.3)) - EVT_END_THREAD - EVT_CASE_EQ(1) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.6)) - EVT_END_THREAD - EVT_CASE_EQ(2) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.9)) - EVT_END_THREAD - EVT_END_SWITCH - EVT_END_SWITCH - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_RETURN - EVT_END_IF - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_END_SWITCH - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_SET(LFlag0, TRUE) - EVT_CASE_DEFAULT - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_END_SWITCH - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SET(LFlag0, FALSE) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_A)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_UseBasicHammer)) + CaseEq(1) + ExecWait(N(EVS_UseSuperHammer)) + CaseEq(2) + ExecWait(N(EVS_UseBasicHammer)) + EndSwitch + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, LVar9, 16) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(StartRumble, BTL_RUMBLE_PLAYER_MIN) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.3)) + EndThread + CaseEq(1) + Call(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.6)) + EndThread + CaseEq(2) + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.9)) + EndThread + EndSwitch + CaseDefault + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(StartRumble, BTL_RUMBLE_PLAYER_MIN) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.3)) + EndThread + CaseEq(1) + Call(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.6)) + EndThread + CaseEq(2) + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.9)) + EndThread + EndSwitch + EndSwitch + Call(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + Return + EndIf + Set(LFlag0, FALSE) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + EndSwitch + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + Set(LFlag0, TRUE) + CaseDefault + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + EndSwitch + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_TRIGGER_EVENTS) + Set(LFlag0, FALSE) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + ExecWait(N(EVS_Hammer_ReturnHome_A)) + EndCaseGroup + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + EndCaseGroup + EndSwitch + Return + End }; extern EvtScript N(EVS_802A39C8); @@ -180,171 +180,171 @@ extern EvtScript N(EVS_802A3D1C); extern EvtScript N(EVS_802A4070); EvtScript N(EVS_UseMove0) = { - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_802A39C8)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_802A3D1C)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_802A4070)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_802A39C8)) + CaseEq(1) + ExecWait(N(EVS_802A3D1C)) + CaseEq(2) + ExecWait(N(EVS_802A4070)) + EndSwitch + Return + End }; EvtScript N(EVS_802A39C8) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_CHARGE_UP) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) - EVT_WAIT(8) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) - EVT_WAIT(8) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer1_Charging) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(N(UnkMoveFunc2), LVar0, LVar1, LVar2, EVT_FLOAT(1.2)) - EVT_WAIT(3) - EVT_CALL(N(UnkMoveFunc2), LVar0, LVar1, LVar2, EVT_FLOAT(0.8)) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 5) - EVT_CALL(N(IsHammerMaxCharged)) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 15) - EVT_ADD(LVar1, 35) - EVT_CALL(func_802A10C8_759678, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_CHARGE_UP) - EVT_WAIT(4) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer1_Charged, ANIM_MarioB3_Hammer1_Charged, ANIM_MarioB3_Hammer1_Charged) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 20, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_CALL(func_802A12FC_7598AC) - EVT_CALL(ShowVariableMessageBox, LVar0, 60, 2) - EVT_ELSE - EVT_CALL(ShowMessageBox, BTL_MSG_CANT_CHARGE, 60) - EVT_END_IF - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(IsMessageBoxDisplayed, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_PLAYER_CHARGE_UP) + Wait(10) + Thread + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) + Wait(8) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) + Wait(8) + EndThread + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer1_Charging) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(N(UnkMoveFunc2), LVar0, LVar1, LVar2, Float(1.2)) + Wait(3) + Call(N(UnkMoveFunc2), LVar0, LVar1, LVar2, Float(0.8)) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 5) + Call(N(IsHammerMaxCharged)) + IfEq(LVar0, 0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 15) + Add(LVar1, 35) + Call(func_802A10C8_759678, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_CHARGE_UP) + Wait(4) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.0)) + Call(SetActorSpeed, ACTOR_PLAYER, Float(1.0)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer1_Charged, ANIM_MarioB3_Hammer1_Charged, ANIM_MarioB3_Hammer1_Charged) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 20, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) + Wait(4) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Call(func_802A12FC_7598AC) + Call(ShowVariableMessageBox, LVar0, 60, 2) + Else + Call(ShowMessageBox, BTL_MSG_CANT_CHARGE, 60) + EndIf + Label(0) + Wait(1) + Call(IsMessageBoxDisplayed, LVar0) + IfEq(LVar0, TRUE) + Goto(0) + EndIf + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Return + End }; EvtScript N(EVS_802A3D1C) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_CHARGE_UP) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) - EVT_WAIT(8) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) - EVT_WAIT(8) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer2_Charging) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(N(UnkMoveFunc2), LVar0, LVar1, LVar2, EVT_FLOAT(1.2)) - EVT_WAIT(3) - EVT_CALL(N(UnkMoveFunc2), LVar0, LVar1, LVar2, EVT_FLOAT(0.8)) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 5) - EVT_CALL(N(IsHammerMaxCharged)) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 15) - EVT_ADD(LVar1, 35) - EVT_CALL(func_802A10C8_759678, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_CHARGE_UP) - EVT_WAIT(4) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer2_Charged, ANIM_MarioB3_Hammer2_Charged, ANIM_MarioB3_Hammer2_Charged) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 20, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_CALL(func_802A12FC_7598AC) - EVT_CALL(ShowVariableMessageBox, LVar0, 60, 2) - EVT_ELSE - EVT_CALL(ShowMessageBox, BTL_MSG_CANT_CHARGE, 60) - EVT_END_IF - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(IsMessageBoxDisplayed, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_PLAYER_CHARGE_UP) + Wait(10) + Thread + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) + Wait(8) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) + Wait(8) + EndThread + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer2_Charging) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(N(UnkMoveFunc2), LVar0, LVar1, LVar2, Float(1.2)) + Wait(3) + Call(N(UnkMoveFunc2), LVar0, LVar1, LVar2, Float(0.8)) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 5) + Call(N(IsHammerMaxCharged)) + IfEq(LVar0, 0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 15) + Add(LVar1, 35) + Call(func_802A10C8_759678, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_CHARGE_UP) + Wait(4) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.0)) + Call(SetActorSpeed, ACTOR_PLAYER, Float(1.0)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer2_Charged, ANIM_MarioB3_Hammer2_Charged, ANIM_MarioB3_Hammer2_Charged) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 20, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) + Wait(4) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Call(func_802A12FC_7598AC) + Call(ShowVariableMessageBox, LVar0, 60, 2) + Else + Call(ShowMessageBox, BTL_MSG_CANT_CHARGE, 60) + EndIf + Label(0) + Wait(1) + Call(IsMessageBoxDisplayed, LVar0) + IfEq(LVar0, TRUE) + Goto(0) + EndIf + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Return + End }; EvtScript N(EVS_802A4070) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_CHARGE_UP) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) - EVT_WAIT(8) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) - EVT_WAIT(8) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer3_Charging) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(N(UnkMoveFunc2), LVar0, LVar1, LVar2, EVT_FLOAT(1.2)) - EVT_WAIT(3) - EVT_CALL(N(UnkMoveFunc2), LVar0, LVar1, LVar2, EVT_FLOAT(0.8)) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 5) - EVT_CALL(N(IsHammerMaxCharged)) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 15) - EVT_ADD(LVar1, 35) - EVT_CALL(func_802A10C8_759678, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_CHARGE_UP) - EVT_WAIT(4) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer3_Charged, ANIM_MarioB3_Hammer3_Charged, ANIM_MarioB3_Hammer3_Charged) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 20, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_CALL(func_802A12FC_7598AC) - EVT_CALL(ShowVariableMessageBox, LVar0, 60, 2) - EVT_ELSE - EVT_CALL(ShowMessageBox, BTL_MSG_CANT_CHARGE, 60) - EVT_END_IF - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(IsMessageBoxDisplayed, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_PLAYER_CHARGE_UP) + Wait(10) + Thread + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) + Wait(8) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) + Wait(8) + EndThread + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer3_Charging) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(N(UnkMoveFunc2), LVar0, LVar1, LVar2, Float(1.2)) + Wait(3) + Call(N(UnkMoveFunc2), LVar0, LVar1, LVar2, Float(0.8)) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 5) + Call(N(IsHammerMaxCharged)) + IfEq(LVar0, 0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 15) + Add(LVar1, 35) + Call(func_802A10C8_759678, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_CHARGE_UP) + Wait(4) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.0)) + Call(SetActorSpeed, ACTOR_PLAYER, Float(1.0)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer3_Charged, ANIM_MarioB3_Hammer3_Charged, ANIM_MarioB3_Hammer3_Charged) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 20, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) + Wait(4) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Call(func_802A12FC_7598AC) + Call(ShowVariableMessageBox, LVar0, 60, 2) + Else + Call(ShowMessageBox, BTL_MSG_CANT_CHARGE, 60) + EndIf + Label(0) + Wait(1) + Call(IsMessageBoxDisplayed, LVar0) + IfEq(LVar0, TRUE) + Goto(0) + EndIf + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Return + End }; diff --git a/src/battle/move/hammer/hammer_charge_2.c b/src/battle/move/hammer/hammer_charge_2.c index b045b4e85a7..3a8bdb7e029 100644 --- a/src/battle/move/hammer/hammer_charge_2.c +++ b/src/battle/move/hammer/hammer_charge_2.c @@ -53,126 +53,126 @@ API_CALLABLE(func_802A12FC_75E8CC) { extern EvtScript N(EVS_UseMove1_Impl); EvtScript N(EVS_UseMove1) = { - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_SET(LVarD, 65) - EVT_SET(LVarE, 1) - EVT_SET(LVarF, 2) - EVT_EXEC_WAIT(N(EVS_UseMove1_Impl)) - EVT_CASE_EQ(1) - EVT_SET(LVarD, 65) - EVT_SET(LVarE, 2) - EVT_SET(LVarF, 4) - EVT_EXEC_WAIT(N(EVS_UseMove1_Impl)) - EVT_CASE_EQ(2) - EVT_SET(LVarD, 65) - EVT_SET(LVarE, 4) - EVT_SET(LVarF, 6) - EVT_EXEC_WAIT(N(EVS_UseMove1_Impl)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Set(LVarD, 65) + Set(LVarE, 1) + Set(LVarF, 2) + ExecWait(N(EVS_UseMove1_Impl)) + CaseEq(1) + Set(LVarD, 65) + Set(LVarE, 2) + Set(LVarF, 4) + ExecWait(N(EVS_UseMove1_Impl)) + CaseEq(2) + Set(LVarD, 65) + Set(LVarE, 4) + Set(LVarF, 6) + ExecWait(N(EVS_UseMove1_Impl)) + EndSwitch + Return + End }; EvtScript N(EVS_UseMove1_Impl) = { - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_UseBasicHammer)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_UseSuperHammer)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_UseBasicHammer)) - EVT_END_SWITCH - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, LVar9, 16) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_MIN) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.3)) - EVT_END_THREAD - EVT_CASE_EQ(1) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.6)) - EVT_END_THREAD - EVT_CASE_EQ(2) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.9)) - EVT_END_THREAD - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_MIN) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.3)) - EVT_END_THREAD - EVT_CASE_EQ(1) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.6)) - EVT_END_THREAD - EVT_CASE_EQ(2) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.9)) - EVT_END_THREAD - EVT_END_SWITCH - EVT_END_SWITCH - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_RETURN - EVT_END_IF - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_END_SWITCH - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_SET(LFlag0, TRUE) - EVT_CASE_DEFAULT - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_END_SWITCH - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SET(LFlag0, FALSE) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_A)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_UseBasicHammer)) + CaseEq(1) + ExecWait(N(EVS_UseSuperHammer)) + CaseEq(2) + ExecWait(N(EVS_UseBasicHammer)) + EndSwitch + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, LVar9, 16) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(StartRumble, BTL_RUMBLE_PLAYER_MIN) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.3)) + EndThread + CaseEq(1) + Call(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.6)) + EndThread + CaseEq(2) + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.9)) + EndThread + EndSwitch + CaseDefault + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(StartRumble, BTL_RUMBLE_PLAYER_MIN) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.3)) + EndThread + CaseEq(1) + Call(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.6)) + EndThread + CaseEq(2) + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.9)) + EndThread + EndSwitch + EndSwitch + Call(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + Return + EndIf + Set(LFlag0, FALSE) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + EndSwitch + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + Set(LFlag0, TRUE) + CaseDefault + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + EndSwitch + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_TRIGGER_EVENTS) + Set(LFlag0, FALSE) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + ExecWait(N(EVS_Hammer_ReturnHome_A)) + EndCaseGroup + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + EndCaseGroup + EndSwitch + Return + End }; extern EvtScript N(EVS_802A39C8); @@ -180,165 +180,165 @@ extern EvtScript N(EVS_802A3CF4); extern EvtScript N(EVS_802A4020); EvtScript N(EVS_UseMove0) = { - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_802A39C8)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_802A3CF4)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_802A4020)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_802A39C8)) + CaseEq(1) + ExecWait(N(EVS_802A3CF4)) + CaseEq(2) + ExecWait(N(EVS_802A4020)) + EndSwitch + Return + End }; EvtScript N(EVS_802A39C8) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_CHARGE_UP) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) - EVT_WAIT(8) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) - EVT_WAIT(8) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer1_Charging) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(N(UnkMoveFunc3), LVar0, LVar1, LVar2, EVT_FLOAT(1.2)) - EVT_WAIT(3) - EVT_CALL(N(UnkMoveFunc3), LVar0, LVar1, LVar2, EVT_FLOAT(0.8)) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 5) - EVT_CALL(N(IsHammerMaxCharged)) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 15) - EVT_ADD(LVar1, 35) - EVT_CALL(func_802A10C8_75E698, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_CHARGE_UP) - EVT_WAIT(4) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer1_Charged, ANIM_MarioB3_Hammer1_Charged, ANIM_MarioB3_Hammer1_Charged) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 20, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(func_802A12FC_75E8CC) - EVT_CALL(ShowVariableMessageBox, LVar0, 60, 3) - EVT_ELSE - EVT_CALL(ShowMessageBox, BTL_MSG_CANT_CHARGE, 60) - EVT_END_IF - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(IsMessageBoxDisplayed, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_PLAYER_CHARGE_UP) + Wait(10) + Thread + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) + Wait(8) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) + Wait(8) + EndThread + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer1_Charging) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(N(UnkMoveFunc3), LVar0, LVar1, LVar2, Float(1.2)) + Wait(3) + Call(N(UnkMoveFunc3), LVar0, LVar1, LVar2, Float(0.8)) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 5) + Call(N(IsHammerMaxCharged)) + IfEq(LVar0, 0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 15) + Add(LVar1, 35) + Call(func_802A10C8_75E698, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_CHARGE_UP) + Wait(4) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.0)) + Call(SetActorSpeed, ACTOR_PLAYER, Float(1.0)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer1_Charged, ANIM_MarioB3_Hammer1_Charged, ANIM_MarioB3_Hammer1_Charged) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 20, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) + Wait(4) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(func_802A12FC_75E8CC) + Call(ShowVariableMessageBox, LVar0, 60, 3) + Else + Call(ShowMessageBox, BTL_MSG_CANT_CHARGE, 60) + EndIf + Label(0) + Wait(1) + Call(IsMessageBoxDisplayed, LVar0) + IfEq(LVar0, TRUE) + Goto(0) + EndIf + Return + End }; EvtScript N(EVS_802A3CF4) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_CHARGE_UP) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) - EVT_WAIT(8) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) - EVT_WAIT(8) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer2_Charging) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(N(UnkMoveFunc3), LVar0, LVar1, LVar2, EVT_FLOAT(1.2)) - EVT_WAIT(3) - EVT_CALL(N(UnkMoveFunc3), LVar0, LVar1, LVar2, EVT_FLOAT(0.8)) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 5) - EVT_CALL(N(IsHammerMaxCharged)) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 15) - EVT_ADD(LVar1, 35) - EVT_CALL(func_802A10C8_75E698, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_CHARGE_UP) - EVT_WAIT(4) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer2_Charged, ANIM_MarioB3_Hammer2_Charged, ANIM_MarioB3_Hammer2_Charged) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 20, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(func_802A12FC_75E8CC) - EVT_CALL(ShowVariableMessageBox, LVar0, 60, 3) - EVT_ELSE - EVT_CALL(ShowMessageBox, BTL_MSG_CANT_CHARGE, 60) - EVT_END_IF - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(IsMessageBoxDisplayed, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_PLAYER_CHARGE_UP) + Wait(10) + Thread + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) + Wait(8) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) + Wait(8) + EndThread + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer2_Charging) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(N(UnkMoveFunc3), LVar0, LVar1, LVar2, Float(1.2)) + Wait(3) + Call(N(UnkMoveFunc3), LVar0, LVar1, LVar2, Float(0.8)) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 5) + Call(N(IsHammerMaxCharged)) + IfEq(LVar0, 0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 15) + Add(LVar1, 35) + Call(func_802A10C8_75E698, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_CHARGE_UP) + Wait(4) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.0)) + Call(SetActorSpeed, ACTOR_PLAYER, Float(1.0)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer2_Charged, ANIM_MarioB3_Hammer2_Charged, ANIM_MarioB3_Hammer2_Charged) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 20, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) + Wait(4) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(func_802A12FC_75E8CC) + Call(ShowVariableMessageBox, LVar0, 60, 3) + Else + Call(ShowMessageBox, BTL_MSG_CANT_CHARGE, 60) + EndIf + Label(0) + Wait(1) + Call(IsMessageBoxDisplayed, LVar0) + IfEq(LVar0, TRUE) + Goto(0) + EndIf + Return + End }; EvtScript N(EVS_802A4020) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_CHARGE_UP) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) - EVT_WAIT(8) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) - EVT_WAIT(8) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer3_Charging) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(N(UnkMoveFunc3), LVar0, LVar1, LVar2, EVT_FLOAT(1.2)) - EVT_WAIT(3) - EVT_CALL(N(UnkMoveFunc3), LVar0, LVar1, LVar2, EVT_FLOAT(0.8)) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 5) - EVT_CALL(N(IsHammerMaxCharged)) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 15) - EVT_ADD(LVar1, 35) - EVT_CALL(func_802A10C8_75E698, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_CHARGE_UP) - EVT_WAIT(4) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer3_Charged, ANIM_MarioB3_Hammer3_Charged, ANIM_MarioB3_Hammer3_Charged) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 20, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(func_802A12FC_75E8CC) - EVT_CALL(ShowVariableMessageBox, LVar0, 60, 3) - EVT_ELSE - EVT_CALL(ShowMessageBox, BTL_MSG_CANT_CHARGE, 60) - EVT_END_IF - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(IsMessageBoxDisplayed, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_PLAYER_CHARGE_UP) + Wait(10) + Thread + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) + Wait(8) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) + Wait(8) + EndThread + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer3_Charging) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(N(UnkMoveFunc3), LVar0, LVar1, LVar2, Float(1.2)) + Wait(3) + Call(N(UnkMoveFunc3), LVar0, LVar1, LVar2, Float(0.8)) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 5) + Call(N(IsHammerMaxCharged)) + IfEq(LVar0, 0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 15) + Add(LVar1, 35) + Call(func_802A10C8_75E698, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_CHARGE_UP) + Wait(4) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.0)) + Call(SetActorSpeed, ACTOR_PLAYER, Float(1.0)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_MarioB3_Hammer3_Charged, ANIM_MarioB3_Hammer3_Charged, ANIM_MarioB3_Hammer3_Charged) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 20, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) + Wait(4) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(func_802A12FC_75E8CC) + Call(ShowVariableMessageBox, LVar0, 60, 3) + Else + Call(ShowMessageBox, BTL_MSG_CANT_CHARGE, 60) + EndIf + Label(0) + Wait(1) + Call(IsMessageBoxDisplayed, LVar0) + IfEq(LVar0, TRUE) + Goto(0) + EndIf + Return + End }; diff --git a/src/battle/move/hammer/hammer_throw.c b/src/battle/move/hammer/hammer_throw.c index 8b6e4f1f169..1bff3443b78 100644 --- a/src/battle/move/hammer/hammer_throw.c +++ b/src/battle/move/hammer/hammer_throw.c @@ -37,393 +37,393 @@ EntityModelScript N(EMS_UltraHammer) = STANDARD_ENTITY_MODEL_SCRIPT(N(ultra_hamm extern EvtScript N(EVS_UseMove_Impl); EvtScript N(EVS_UseMove) = { - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_SET(LVarD, 50) - EVT_SET(LVarE, 1) - EVT_SET(LVarF, 2) - EVT_EXEC_WAIT(N(EVS_UseMove_Impl)) - EVT_CASE_EQ(1) - EVT_SET(LVarD, 50) - EVT_SET(LVarE, 2) - EVT_SET(LVarF, 4) - EVT_EXEC_WAIT(N(EVS_UseMove_Impl)) - EVT_CASE_EQ(2) - EVT_SET(LVarD, 50) - EVT_SET(LVarE, 3) - EVT_SET(LVarF, 6) - EVT_EXEC_WAIT(N(EVS_UseMove_Impl)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(ShowActionHud, TRUE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Set(LVarD, 50) + Set(LVarE, 1) + Set(LVarF, 2) + ExecWait(N(EVS_UseMove_Impl)) + CaseEq(1) + Set(LVarD, 50) + Set(LVarE, 2) + Set(LVarF, 4) + ExecWait(N(EVS_UseMove_Impl)) + CaseEq(2) + Set(LVarD, 50) + Set(LVarE, 3) + Set(LVarF, 6) + ExecWait(N(EVS_UseMove_Impl)) + EndSwitch + Return + End }; EvtScript N(EVS_802A3E5C) = { - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(10) - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_ADD(LVar1, 1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow1_Begin) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow1_Begin) - EVT_SWITCH(LVar1) - EVT_CASE_LT(3) - EVT_WAIT(4) - EVT_CASE_LT(5) - EVT_WAIT(3) - EVT_CASE_LT(7) - EVT_WAIT(2) - EVT_CASE_LT(9) - EVT_WAIT(1) - EVT_CASE_LT(11) - EVT_WAIT(0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) + Set(LVar1, 0) + Loop(10) + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfEq(LVar0, TRUE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + BreakLoop + EndIf + Wait(1) + Add(LVar1, 1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow1_Begin) + EndLoop + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow1_Begin) + Switch(LVar1) + CaseLt(3) + Wait(4) + CaseLt(5) + Wait(3) + CaseLt(7) + Wait(2) + CaseLt(9) + Wait(1) + CaseLt(11) + Wait(0) + EndSwitch + Return + End }; EvtScript N(EVS_802A3FE0) = { - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(10) - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_ADD(LVar1, 1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow2_Begin) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow2_Begin) - EVT_SWITCH(LVar1) - EVT_CASE_LT(3) - EVT_WAIT(4) - EVT_CASE_LT(5) - EVT_WAIT(3) - EVT_CASE_LT(7) - EVT_WAIT(2) - EVT_CASE_LT(9) - EVT_WAIT(1) - EVT_CASE_LT(11) - EVT_WAIT(0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) + Set(LVar1, 0) + Loop(10) + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfEq(LVar0, TRUE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + BreakLoop + EndIf + Wait(1) + Add(LVar1, 1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow2_Begin) + EndLoop + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow2_Begin) + Switch(LVar1) + CaseLt(3) + Wait(4) + CaseLt(5) + Wait(3) + CaseLt(7) + Wait(2) + CaseLt(9) + Wait(1) + CaseLt(11) + Wait(0) + EndSwitch + Return + End }; EvtScript N(EVS_802A4164) = { - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(10) - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_ADD(LVar1, 1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow3_Begin) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow3_Begin) - EVT_SWITCH(LVar1) - EVT_CASE_LT(3) - EVT_WAIT(4) - EVT_CASE_LT(5) - EVT_WAIT(3) - EVT_CASE_LT(7) - EVT_WAIT(2) - EVT_CASE_LT(9) - EVT_WAIT(1) - EVT_CASE_LT(11) - EVT_WAIT(0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) + Set(LVar1, 0) + Loop(10) + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfEq(LVar0, TRUE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + BreakLoop + EndIf + Wait(1) + Add(LVar1, 1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow3_Begin) + EndLoop + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow3_Begin) + Switch(LVar1) + CaseLt(3) + Wait(4) + CaseLt(5) + Wait(3) + CaseLt(7) + Wait(2) + CaseLt(9) + Wait(1) + CaseLt(11) + Wait(0) + EndSwitch + Return + End }; EvtScript N(EVS_UseMove_Impl) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH) - EVT_CALL(action_command_hammer_init) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 16) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(PlayerRunToGoal, 0) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_802A3E5C)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_802A3FE0)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_802A4164)) - EVT_END_SWITCH - EVT_CALL(InitTargetIterator) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_ATTACK_APPROACH) - EVT_CALL(AddBattleCamZoom, 50) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_WINDUP) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow1_Raise) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow1_Hold1) - EVT_CASE_EQ(1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow2_Raise) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow2_Hold1) - EVT_CASE_EQ(2) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow3_Raise) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow3_Hold1) - EVT_END_SWITCH - EVT_CALL(GetActionCommandMode, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_CALL(N(ShouldMovesAutoSucceed)) - EVT_IF_EQ(LVar0, 0) - EVT_LOOP(45) - EVT_WAIT(1) - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_ADD(LVarD, 6) - EVT_CALL(action_command_hammer_start, 0, LVarD, 3) - EVT_CALL(SetActionQuality, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(30) - EVT_WAIT(1) - EVT_CALL(GetActionQuality, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_IF_NE(LVar1, 1) - EVT_CALL(GetMenuSelection, LVar3, LVar4, LVar5) - EVT_SWITCH(LVar4) - EVT_CASE_EQ(0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow1_Hold2) - EVT_CASE_EQ(1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow2_Hold2) - EVT_CASE_EQ(2) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow3_Hold2) - EVT_END_SWITCH - EVT_SET(LVar1, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_ELSE - EVT_WAIT(10) - EVT_CALL(GetMenuSelection, LVar3, LVar4, LVar5) - EVT_SWITCH(LVar4) - EVT_CASE_EQ(0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow1_Hold2) - EVT_CASE_EQ(1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow2_Hold2) - EVT_CASE_EQ(2) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow3_Hold2) - EVT_END_SWITCH - EVT_WAIT(30) - EVT_END_IF - EVT_CALL(GetActionCommandMode, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetActionSuccess, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow1_Throw) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_SWING_1) - EVT_CASE_EQ(1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow2_Throw) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_SWING_2) - EVT_CASE_EQ(2) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow3_Throw) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_SWING_3) - EVT_END_SWITCH - EVT_WAIT(3) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(CreateVirtualEntity, LVarA, EVT_PTR(N(EMS_BasicHammer))) - EVT_CASE_EQ(1) - EVT_CALL(CreateVirtualEntity, LVarA, EVT_PTR(N(EMS_SuperHammer))) - EVT_CASE_EQ(2) - EVT_CALL(CreateVirtualEntity, LVarA, EVT_PTR(N(EMS_UltraHammer))) - EVT_END_SWITCH - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_ADD(LVar1, 42) - EVT_ADD(LVar2, 5) - EVT_CALL(SetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(SetVirtualEntityScale, LVarA, EVT_FLOAT(0.6), EVT_FLOAT(0.6), EVT_FLOAT(0.6)) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetPlayerActionSuccess, LVar3) - EVT_SWITCH(LVar3) - EVT_CASE_GT(FALSE) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(9) - EVT_ADD(LVar0, 60) - EVT_CALL(SetVirtualEntityRotation, LVarA, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetVirtualEntityJumpGravity, LVarA, EVT_FLOAT(1.3)) - EVT_ADD(LVar2, 5) - EVT_CALL(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 11) - EVT_CASE_DEFAULT - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(18) - EVT_ADD(LVar0, 60) - EVT_CALL(SetVirtualEntityRotation, LVarA, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetVirtualEntityJumpGravity, LVarA, EVT_FLOAT(0.7)) - EVT_ADD(LVar2, 5) - EVT_CALL(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 20) - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(PlayerTestEnemy, LVar3, DAMAGE_TYPE_SMASH | DAMAGE_TYPE_NO_CONTACT, 25, 0, 0, 16) - EVT_IF_EQ(LVar3, HIT_RESULT_MISS) - EVT_CALL(VirtualEntityLandJump, LVarA) - EVT_CALL(DeleteVirtualEntity, LVarA) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_RETURN - EVT_END_IF - EVT_THREAD - EVT_CALL(GetPlayerActionSuccess, LVar3) - EVT_SWITCH(LVar3) - EVT_CASE_GT(FALSE) - EVT_CALL(SetVirtualEntityJumpGravity, LVarA, EVT_FLOAT(1.4)) - EVT_ADD(LVar0, 60) - EVT_ADD(LVar1, 0) - EVT_CALL(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 10) - EVT_CALL(DeleteVirtualEntity, LVarA) - EVT_CASE_DEFAULT - EVT_CALL(SetVirtualEntityJumpGravity, LVarA, EVT_FLOAT(0.8)) - EVT_ADD(LVar0, 40) - EVT_ADD(LVar1, 0) - EVT_CALL(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 15) - EVT_CALL(DeleteVirtualEntity, LVarA) - EVT_END_SWITCH - EVT_END_THREAD - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_MIN) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.3)) - EVT_END_THREAD - EVT_CASE_EQ(1) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.6)) - EVT_END_THREAD - EVT_CASE_EQ(2) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.9)) - EVT_END_THREAD - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_MIN) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.3)) - EVT_END_THREAD - EVT_CASE_EQ(1) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.6)) - EVT_END_THREAD - EVT_CASE_EQ(2) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.9)) - EVT_END_THREAD - EVT_END_SWITCH - EVT_END_SWITCH - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_1) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_2) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_3) - EVT_END_SWITCH - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_END_SWITCH - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_THROW | DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_END_SWITCH - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_THROW | DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_A)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_SMASH) + Call(action_command_hammer_init) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 16) + Call(SetActorSpeed, ACTOR_PLAYER, Float(4.0)) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(PlayerRunToGoal, 0) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_802A3E5C)) + CaseEq(1) + ExecWait(N(EVS_802A3FE0)) + CaseEq(2) + ExecWait(N(EVS_802A4164)) + EndSwitch + Call(InitTargetIterator) + Call(UseBattleCamPreset, BTL_CAM_PLAYER_ATTACK_APPROACH) + Call(AddBattleCamZoom, 50) + Call(MoveBattleCamOver, 20) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_WINDUP) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow1_Raise) + Wait(4) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow1_Hold1) + CaseEq(1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow2_Raise) + Wait(4) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow2_Hold1) + CaseEq(2) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow3_Raise) + Wait(4) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow3_Hold1) + EndSwitch + Call(GetActionCommandMode, LVar0) + IfGt(LVar0, 0) + Call(N(ShouldMovesAutoSucceed)) + IfEq(LVar0, 0) + Loop(45) + Wait(1) + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfNe(LVar0, FALSE) + BreakLoop + EndIf + EndLoop + EndIf + Add(LVarD, 6) + Call(action_command_hammer_start, 0, LVarD, 3) + Call(SetActionQuality, 0) + Set(LVar1, 0) + Loop(30) + Wait(1) + Call(GetActionQuality, LVar0) + IfNe(LVar0, 0) + IfNe(LVar1, 1) + Call(GetMenuSelection, LVar3, LVar4, LVar5) + Switch(LVar4) + CaseEq(0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow1_Hold2) + CaseEq(1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow2_Hold2) + CaseEq(2) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow3_Hold2) + EndSwitch + Set(LVar1, 1) + EndIf + EndIf + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfEq(LVar0, FALSE) + BreakLoop + EndIf + EndLoop + Else + Wait(10) + Call(GetMenuSelection, LVar3, LVar4, LVar5) + Switch(LVar4) + CaseEq(0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow1_Hold2) + CaseEq(1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow2_Hold2) + CaseEq(2) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow3_Hold2) + EndSwitch + Wait(30) + EndIf + Call(GetActionCommandMode, LVar0) + IfGt(LVar0, 0) + Loop(0) + Wait(1) + Call(GetActionSuccess, LVar0) + IfNe(LVar0, 0) + BreakLoop + EndIf + EndLoop + EndIf + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow1_Throw) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_SWING_1) + CaseEq(1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow2_Throw) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_SWING_2) + CaseEq(2) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_HammerThrow3_Throw) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_SWING_3) + EndSwitch + Wait(3) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(CreateVirtualEntity, LVarA, Ref(N(EMS_BasicHammer))) + CaseEq(1) + Call(CreateVirtualEntity, LVarA, Ref(N(EMS_SuperHammer))) + CaseEq(2) + Call(CreateVirtualEntity, LVarA, Ref(N(EMS_UltraHammer))) + EndSwitch + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Add(LVar1, 42) + Add(LVar2, 5) + Call(SetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) + Call(SetVirtualEntityScale, LVarA, Float(0.6), Float(0.6), Float(0.6)) + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetPlayerActionSuccess, LVar3) + Switch(LVar3) + CaseGt(FALSE) + Thread + Set(LVar0, 0) + Loop(9) + Add(LVar0, 60) + Call(SetVirtualEntityRotation, LVarA, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetVirtualEntityJumpGravity, LVarA, Float(1.3)) + Add(LVar2, 5) + Call(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 11) + CaseDefault + Thread + Set(LVar0, 0) + Loop(18) + Add(LVar0, 60) + Call(SetVirtualEntityRotation, LVarA, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetVirtualEntityJumpGravity, LVarA, Float(0.7)) + Add(LVar2, 5) + Call(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 20) + EndSwitch + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(PlayerTestEnemy, LVar3, DAMAGE_TYPE_SMASH | DAMAGE_TYPE_NO_CONTACT, 25, 0, 0, 16) + IfEq(LVar3, HIT_RESULT_MISS) + Call(VirtualEntityLandJump, LVarA) + Call(DeleteVirtualEntity, LVarA) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + Return + EndIf + Thread + Call(GetPlayerActionSuccess, LVar3) + Switch(LVar3) + CaseGt(FALSE) + Call(SetVirtualEntityJumpGravity, LVarA, Float(1.4)) + Add(LVar0, 60) + Add(LVar1, 0) + Call(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 10) + Call(DeleteVirtualEntity, LVarA) + CaseDefault + Call(SetVirtualEntityJumpGravity, LVarA, Float(0.8)) + Add(LVar0, 40) + Add(LVar1, 0) + Call(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 15) + Call(DeleteVirtualEntity, LVarA) + EndSwitch + EndThread + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(StartRumble, BTL_RUMBLE_PLAYER_MIN) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.3)) + EndThread + CaseEq(1) + Call(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.6)) + EndThread + CaseEq(2) + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.9)) + EndThread + EndSwitch + CaseDefault + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(StartRumble, BTL_RUMBLE_PLAYER_MIN) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.3)) + EndThread + CaseEq(1) + Call(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.6)) + EndThread + CaseEq(2) + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.9)) + EndThread + EndSwitch + EndSwitch + Call(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) + Call(MoveBattleCamOver, 10) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_1) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_2) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_3) + EndSwitch + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + EndSwitch + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_THROW | DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + EndSwitch + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_THROW | DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + ExecWait(N(EVS_Hammer_ReturnHome_A)) + EndCaseGroup + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/battle/move/hammer/mega_quake.c b/src/battle/move/hammer/mega_quake.c index 462a6213b52..bd90792c08a 100644 --- a/src/battle/move/hammer/mega_quake.c +++ b/src/battle/move/hammer/mega_quake.c @@ -38,179 +38,179 @@ API_CALLABLE(func_802A10A4_756824) { extern EvtScript N(EVS_802A3238); EvtScript N(EVS_UseMove) = { - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_SET(LVarD, 80) - EVT_SET(LVarE, 3) - EVT_SET(LVarF, 6) - EVT_EXEC_WAIT(N(EVS_802A3238)) - EVT_CASE_EQ(1) - EVT_SET(LVarD, 80) - EVT_SET(LVarE, 3) - EVT_SET(LVarF, 6) - EVT_EXEC_WAIT(N(EVS_802A3238)) - EVT_CASE_EQ(2) - EVT_SET(LVarD, 80) - EVT_SET(LVarE, 3) - EVT_SET(LVarF, 6) - EVT_EXEC_WAIT(N(EVS_802A3238)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(ShowActionHud, TRUE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Set(LVarD, 80) + Set(LVarE, 3) + Set(LVarF, 6) + ExecWait(N(EVS_802A3238)) + CaseEq(1) + Set(LVarD, 80) + Set(LVarE, 3) + Set(LVarF, 6) + ExecWait(N(EVS_802A3238)) + CaseEq(2) + Set(LVarD, 80) + Set(LVarE, 3) + Set(LVarF, 6) + ExecWait(N(EVS_802A3238)) + EndSwitch + Return + End }; EvtScript N(EVS_802A3238) = { - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_Hammer_UseBasicQuake)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_Hammer_UseSuperQuake)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_Hammer_UseUltraQuake)) - EVT_END_SWITCH - EVT_THREAD - EVT_WAIT(8) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 24) - EVT_ADD(LVar1, 10) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 60, 8, 0, 30, 0, 0, 0, 0, 0) - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 60, 8, 33, 30, 0, 0, 0, 0, 0) - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 60, 8, 66, 30, 0, 0, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_MAX) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.3)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 3, EVT_FLOAT(1.05)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.6)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 6, EVT_FLOAT(0.15)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.07519531)) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 24) - EVT_ADD(LVar1, 10) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0) - EVT_WAIT(5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0) - EVT_WAIT(5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 48, 30, 0, 0, 0, 0, 0) - EVT_WAIT(5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 72, 30, 0, 0, 0, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10) - EVT_PLAY_EFFECT(EFFECT_SHOCKWAVE, 1, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_END_THREAD - EVT_CASE_DEFAULT - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_MAX) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.24)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.2)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(2.4)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.2)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 3, EVT_FLOAT(0.84)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.48)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 6, EVT_FLOAT(0.12)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.06)) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 24) - EVT_ADD(LVar1, 10) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0) - EVT_WAIT(5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0) - EVT_WAIT(5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 48, 30, 0, 0, 0, 0, 0) - EVT_WAIT(5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 72, 30, 0, 0, 0, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10) - EVT_PLAY_EFFECT(EFFECT_SHOCKWAVE, 1, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_END_THREAD - EVT_END_SWITCH - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_IF_GT(LVar0, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_46) - EVT_CALL(MoveBattleCamOver, 5) - EVT_WAIT(15) - EVT_SETF(LVar6, EVT_FLOAT(0.0)) - EVT_LOOP(10) - EVT_SET(LVar4, LVar3) - EVT_SET(LVar5, LVar2) - EVT_ADDF(LVar6, EVT_FLOAT(36.0)) - EVT_CALL(AddVectorPolar, LVar4, LVar5, EVT_FLOAT(300.0), LVar6) - EVT_SET(LVarA, LVarF) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar3, 1, LVar2, LVar4, 1, LVar5, EVT_FLOAT(4.0), 30, 0, 0, 0, 0) - EVT_SET(LVarF, LVarA) - EVT_END_LOOP - EVT_WAIT(10) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_46) - EVT_CALL(MoveBattleCamOver, 50) - EVT_END_IF - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_QUAKE_1) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_QUAKE_2) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_QUAKE_3) - EVT_END_SWITCH - EVT_WAIT(10) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_1) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_2) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_3) - EVT_END_SWITCH - EVT_SET(LVar9, 0) - EVT_CALL(InitTargetIterator) - EVT_LABEL(10) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_QUAKE_HAMMER, 29, 0, 0, 16) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_GOTO(11) - EVT_END_IF - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_QUAKE_HAMMER | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_QUAKE_HAMMER | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_LABEL(11) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar1) - EVT_ADD(LVar9, 1) - EVT_CALL(GetTargetListLength, LVar1) - EVT_IF_LT(LVar9, LVar1) - EVT_GOTO(10) - EVT_END_IF - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_B)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_RETURN - EVT_END + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_Hammer_UseBasicQuake)) + CaseEq(1) + ExecWait(N(EVS_Hammer_UseSuperQuake)) + CaseEq(2) + ExecWait(N(EVS_Hammer_UseUltraQuake)) + EndSwitch + Thread + Wait(8) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 24) + Add(LVar1, 10) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 60, 8, 0, 30, 0, 0, 0, 0, 0) + Wait(2) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 60, 8, 33, 30, 0, 0, 0, 0, 0) + Wait(2) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 60, 8, 66, 30, 0, 0, 0, 0, 0) + EndThread + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(StartRumble, BTL_RUMBLE_PLAYER_MAX) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.3)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.5)) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.5)) + Call(ShakeCam, CAM_BATTLE, 0, 3, Float(1.05)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.6)) + Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.15)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.07519531)) + EndThread + Thread + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 24) + Add(LVar1, 10) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0) + Wait(5) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0) + Wait(5) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 48, 30, 0, 0, 0, 0, 0) + Wait(5) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 72, 30, 0, 0, 0, 0, 0) + EndThread + Thread + Wait(10) + PlayEffect(EFFECT_SHOCKWAVE, 1, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0, 0, 0, 0, 0) + EndThread + CaseDefault + Call(StartRumble, BTL_RUMBLE_PLAYER_MAX) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.24)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.2)) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(2.4)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.2)) + Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.84)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.48)) + Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.12)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.06)) + EndThread + Thread + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 24) + Add(LVar1, 10) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0) + Wait(5) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0) + Wait(5) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 48, 30, 0, 0, 0, 0, 0) + Wait(5) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 72, 30, 0, 0, 0, 0, 0) + EndThread + Thread + Wait(10) + PlayEffect(EFFECT_SHOCKWAVE, 1, LVar0, LVar1, LVar2, 0, 0, 0, 0, 0, 0, 0, 0, 0) + EndThread + EndSwitch + Call(GetPlayerActionSuccess, LVar0) + IfGt(LVar0, FALSE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_46) + Call(MoveBattleCamOver, 5) + Wait(15) + SetF(LVar6, Float(0.0)) + Loop(10) + Set(LVar4, LVar3) + Set(LVar5, LVar2) + AddF(LVar6, Float(36.0)) + Call(AddVectorPolar, LVar4, LVar5, Float(300.0), LVar6) + Set(LVarA, LVarF) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar3, 1, LVar2, LVar4, 1, LVar5, Float(4.0), 30, 0, 0, 0, 0) + Set(LVarF, LVarA) + EndLoop + Wait(10) + Else + Call(UseBattleCamPreset, BTL_CAM_PRESET_46) + Call(MoveBattleCamOver, 50) + EndIf + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_QUAKE_1) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_QUAKE_2) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_QUAKE_3) + EndSwitch + Wait(10) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_1) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_2) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_3) + EndSwitch + Set(LVar9, 0) + Call(InitTargetIterator) + Label(10) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_QUAKE_HAMMER, 29, 0, 0, 16) + IfEq(LVar0, HIT_RESULT_MISS) + Goto(11) + EndIf + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_QUAKE_HAMMER | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_QUAKE_HAMMER | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Label(11) + Call(ChooseNextTarget, ITER_NEXT, LVar1) + Add(LVar9, 1) + Call(GetTargetListLength, LVar1) + IfLt(LVar9, LVar1) + Goto(10) + EndIf + Thread + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + EndThread + Wait(10) + ExecWait(N(EVS_Hammer_ReturnHome_B)) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Return + End }; diff --git a/src/battle/move/hammer/mega_smash.c b/src/battle/move/hammer/mega_smash.c index b181fbc53b1..748d99c6e80 100644 --- a/src/battle/move/hammer/mega_smash.c +++ b/src/battle/move/hammer/mega_smash.c @@ -8,103 +8,103 @@ extern EvtScript N(UseMove_Impl); EvtScript N(EVS_UseMove) = { - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_SET(LVarD, 45) - EVT_SET(LVarE, 5) - EVT_SET(LVarF, 6) - EVT_EXEC_WAIT(N(UseMove_Impl)) - EVT_CASE_EQ(1) - EVT_SET(LVarD, 45) - EVT_SET(LVarE, 6) - EVT_SET(LVarF, 8) - EVT_EXEC_WAIT(N(UseMove_Impl)) - EVT_CASE_EQ(2) - EVT_SET(LVarD, 45) - EVT_SET(LVarE, 7) - EVT_SET(LVarF, 10) - EVT_EXEC_WAIT(N(UseMove_Impl)) - EVT_END_SWITCH - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE) - EVT_RETURN - EVT_END + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + Call(ShowActionHud, TRUE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Set(LVarD, 45) + Set(LVarE, 5) + Set(LVarF, 6) + ExecWait(N(UseMove_Impl)) + CaseEq(1) + Set(LVarD, 45) + Set(LVarE, 6) + Set(LVarF, 8) + ExecWait(N(UseMove_Impl)) + CaseEq(2) + Set(LVarD, 45) + Set(LVarE, 7) + Set(LVarF, 10) + ExecWait(N(UseMove_Impl)) + EndSwitch + Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) + Return + End }; EvtScript N(EVS_802A3188) = { - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_MAX) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(6.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(5.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(4.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(StartRumble, BTL_RUMBLE_PLAYER_MAX) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(6.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(5.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(4.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2)) + EndThread + Return + End }; EvtScript N(UseMove_Impl) = { - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_UseBasicHammer)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_UseSuperHammer)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_UseUltraHammer)) - EVT_END_SWITCH - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) - EVT_WAIT(1) - EVT_EXEC_WAIT(N(EVS_802A3188)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_END_SWITCH - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_END_SWITCH - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_A)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_UseBasicHammer)) + CaseEq(1) + ExecWait(N(EVS_UseSuperHammer)) + CaseEq(2) + ExecWait(N(EVS_UseUltraHammer)) + EndSwitch + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) + Call(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) + Wait(1) + ExecWait(N(EVS_802A3188)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + Return + EndIf + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + EndSwitch + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + EndSwitch + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + ExecWait(N(EVS_Hammer_ReturnHome_A)) + EndCaseGroup + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/battle/move/hammer/power_quake.c b/src/battle/move/hammer/power_quake.c index cc5493a0025..9fd5b6de444 100644 --- a/src/battle/move/hammer/power_quake.c +++ b/src/battle/move/hammer/power_quake.c @@ -9,155 +9,155 @@ extern EvtScript N(EVS_802A3168); EvtScript N(EVS_UseMove) = { - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_SET(LVarD, 80) - EVT_SET(LVarE, 2) - EVT_SET(LVarF, 4) - EVT_EXEC_WAIT(N(EVS_802A3168)) - EVT_CASE_EQ(1) - EVT_SET(LVarD, 80) - EVT_SET(LVarE, 2) - EVT_SET(LVarF, 4) - EVT_EXEC_WAIT(N(EVS_802A3168)) - EVT_CASE_EQ(2) - EVT_SET(LVarD, 80) - EVT_SET(LVarE, 2) - EVT_SET(LVarF, 4) - EVT_EXEC_WAIT(N(EVS_802A3168)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(ShowActionHud, TRUE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Set(LVarD, 80) + Set(LVarE, 2) + Set(LVarF, 4) + ExecWait(N(EVS_802A3168)) + CaseEq(1) + Set(LVarD, 80) + Set(LVarE, 2) + Set(LVarF, 4) + ExecWait(N(EVS_802A3168)) + CaseEq(2) + Set(LVarD, 80) + Set(LVarE, 2) + Set(LVarF, 4) + ExecWait(N(EVS_802A3168)) + EndSwitch + Return + End }; EvtScript N(EVS_802A3168) = { - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_Hammer_UseBasicQuake)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_Hammer_UseSuperQuake)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_Hammer_UseUltraQuake)) - EVT_END_SWITCH - EVT_THREAD - EVT_WAIT(8) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 24) - EVT_ADD(LVar1, 10) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 60, 8, 0, 30, 0, 0, 0, 0, 0) - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 60, 8, 33, 30, 0, 0, 0, 0, 0) - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 60, 8, 66, 30, 0, 0, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.24)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.2)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(2.4)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.2)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 3, EVT_FLOAT(0.84)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.48)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 6, EVT_FLOAT(0.12)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.06)) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 24) - EVT_ADD(LVar1, 10) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0) - EVT_WAIT(5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0) - EVT_WAIT(5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 48, 30, 0, 0, 0, 0, 0) - EVT_WAIT(5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 72, 30, 0, 0, 0, 0, 0) - EVT_END_THREAD - EVT_CASE_DEFAULT - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.2)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 3, EVT_FLOAT(0.7)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.4)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 6, EVT_FLOAT(0.1)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.05)) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 24) - EVT_ADD(LVar1, 10) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0) - EVT_WAIT(6) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 96, 8, 48, 30, 0, 0, 0, 0, 0) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 96, 8, 72, 30, 0, 0, 0, 0, 0) - EVT_END_THREAD - EVT_END_SWITCH - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_IF_GT(LVar0, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_46) - EVT_CALL(MoveBattleCamOver, 5) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_46) - EVT_CALL(MoveBattleCamOver, 50) - EVT_END_IF - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_QUAKE_1) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_QUAKE_2) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_QUAKE_3) - EVT_END_SWITCH - EVT_WAIT(10) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_1) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_2) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_3) - EVT_END_SWITCH - EVT_SET(LVar9, 0) - EVT_CALL(InitTargetIterator) - EVT_LABEL(10) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_QUAKE_HAMMER, 29, 0, 0, 16) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_GOTO(11) - EVT_END_IF - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_QUAKE_HAMMER | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_QUAKE_HAMMER | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_LABEL(11) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar1) - EVT_ADD(LVar9, 1) - EVT_CALL(GetTargetListLength, LVar1) - EVT_IF_LT(LVar9, LVar1) - EVT_GOTO(10) - EVT_END_IF - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_B)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_RETURN - EVT_END + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_Hammer_UseBasicQuake)) + CaseEq(1) + ExecWait(N(EVS_Hammer_UseSuperQuake)) + CaseEq(2) + ExecWait(N(EVS_Hammer_UseUltraQuake)) + EndSwitch + Thread + Wait(8) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 24) + Add(LVar1, 10) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 60, 8, 0, 30, 0, 0, 0, 0, 0) + Wait(2) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 60, 8, 33, 30, 0, 0, 0, 0, 0) + Wait(2) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 60, 8, 66, 30, 0, 0, 0, 0, 0) + EndThread + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.24)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.2)) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(2.4)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.2)) + Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.84)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.48)) + Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.12)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.06)) + EndThread + Thread + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 24) + Add(LVar1, 10) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0) + Wait(5) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0) + Wait(5) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 48, 30, 0, 0, 0, 0, 0) + Wait(5) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 72, 30, 0, 0, 0, 0, 0) + EndThread + CaseDefault + Call(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.7)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.4)) + Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.1)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.05)) + EndThread + Thread + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 24) + Add(LVar1, 10) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0) + Wait(6) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 96, 8, 48, 30, 0, 0, 0, 0, 0) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 96, 8, 72, 30, 0, 0, 0, 0, 0) + EndThread + EndSwitch + Call(GetPlayerActionSuccess, LVar0) + IfGt(LVar0, FALSE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_46) + Call(MoveBattleCamOver, 5) + Else + Call(UseBattleCamPreset, BTL_CAM_PRESET_46) + Call(MoveBattleCamOver, 50) + EndIf + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_QUAKE_1) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_QUAKE_2) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_QUAKE_3) + EndSwitch + Wait(10) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_1) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_2) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_3) + EndSwitch + Set(LVar9, 0) + Call(InitTargetIterator) + Label(10) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_QUAKE_HAMMER, 29, 0, 0, 16) + IfEq(LVar0, HIT_RESULT_MISS) + Goto(11) + EndIf + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_QUAKE_HAMMER | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_QUAKE_HAMMER | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Label(11) + Call(ChooseNextTarget, ITER_NEXT, LVar1) + Add(LVar9, 1) + Call(GetTargetListLength, LVar1) + IfLt(LVar9, LVar1) + Goto(10) + EndIf + Thread + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + EndThread + Wait(10) + ExecWait(N(EVS_Hammer_ReturnHome_B)) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Return + End }; diff --git a/src/battle/move/hammer/power_smash.c b/src/battle/move/hammer/power_smash.c index fef73ac18d6..ba7530c93dc 100644 --- a/src/battle/move/hammer/power_smash.c +++ b/src/battle/move/hammer/power_smash.c @@ -8,98 +8,98 @@ extern EvtScript N(UseMove_Impl); EvtScript N(EVS_UseMove) = { - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_SET(LVarD, 45) - EVT_SET(LVarE, 3) - EVT_SET(LVarF, 4) - EVT_EXEC_WAIT(N(UseMove_Impl)) - EVT_CASE_EQ(1) - EVT_SET(LVarD, 45) - EVT_SET(LVarE, 4) - EVT_SET(LVarF, 6) - EVT_EXEC_WAIT(N(UseMove_Impl)) - EVT_CASE_EQ(2) - EVT_SET(LVarD, 45) - EVT_SET(LVarE, 5) - EVT_SET(LVarF, 8) - EVT_EXEC_WAIT(N(UseMove_Impl)) - EVT_END_SWITCH - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE) - EVT_RETURN - EVT_END + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + Call(ShowActionHud, TRUE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Set(LVarD, 45) + Set(LVarE, 3) + Set(LVarF, 4) + ExecWait(N(UseMove_Impl)) + CaseEq(1) + Set(LVarD, 45) + Set(LVarE, 4) + Set(LVarF, 6) + ExecWait(N(UseMove_Impl)) + CaseEq(2) + Set(LVarD, 45) + Set(LVarE, 5) + Set(LVarF, 8) + ExecWait(N(UseMove_Impl)) + EndSwitch + Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) + Return + End }; EvtScript N(EVS_802A3188) = { - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2)) + EndThread + Return + End }; EvtScript N(UseMove_Impl) = { - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_UseBasicHammer)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_UseSuperHammer)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_UseUltraHammer)) - EVT_END_SWITCH - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) - EVT_WAIT(1) - EVT_EXEC_WAIT(N(EVS_802A3188)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_END_SWITCH - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_END_SWITCH - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_A)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_UseBasicHammer)) + CaseEq(1) + ExecWait(N(EVS_UseSuperHammer)) + CaseEq(2) + ExecWait(N(EVS_UseUltraHammer)) + EndSwitch + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) + Call(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) + Wait(1) + ExecWait(N(EVS_802A3188)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) + IfEq(LVar0, HIT_RESULT_MISS) + Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + Return + EndIf + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + EndSwitch + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + EndSwitch + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + ExecWait(N(EVS_Hammer_ReturnHome_A)) + EndCaseGroup + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/battle/move/hammer/quake_hammer.c b/src/battle/move/hammer/quake_hammer.c index eab773d8ca4..7753559f7eb 100644 --- a/src/battle/move/hammer/quake_hammer.c +++ b/src/battle/move/hammer/quake_hammer.c @@ -9,140 +9,140 @@ extern EvtScript N(EVS_802A3168); EvtScript N(EVS_UseMove0) = { - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_SET(LVarD, 80) - EVT_SET(LVarE, 1) - EVT_SET(LVarF, 2) - EVT_EXEC_WAIT(N(EVS_802A3168)) - EVT_CASE_EQ(1) - EVT_SET(LVarD, 80) - EVT_SET(LVarE, 1) - EVT_SET(LVarF, 2) - EVT_EXEC_WAIT(N(EVS_802A3168)) - EVT_CASE_EQ(2) - EVT_SET(LVarD, 80) - EVT_SET(LVarE, 1) - EVT_SET(LVarF, 2) - EVT_EXEC_WAIT(N(EVS_802A3168)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(ShowActionHud, TRUE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Set(LVarD, 80) + Set(LVarE, 1) + Set(LVarF, 2) + ExecWait(N(EVS_802A3168)) + CaseEq(1) + Set(LVarD, 80) + Set(LVarE, 1) + Set(LVarF, 2) + ExecWait(N(EVS_802A3168)) + CaseEq(2) + Set(LVarD, 80) + Set(LVarE, 1) + Set(LVarF, 2) + ExecWait(N(EVS_802A3168)) + EndSwitch + Return + End }; EvtScript N(EVS_802A3168) = { - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_Hammer_UseBasicQuake)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_Hammer_UseSuperQuake)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_Hammer_UseUltraQuake)) - EVT_END_SWITCH - EVT_CHILD_THREAD - EVT_WAIT(8) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 24) - EVT_ADD(LVar1, 10) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 60, 8, 0, 30, 0, 0, 0, 0, 0) - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 60, 8, 33, 30, 0, 0, 0, 0, 0) - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 60, 8, 66, 30, 0, 0, 0, 0, 0) - EVT_END_CHILD_THREAD - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_CHILD_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.2)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 3, EVT_FLOAT(0.7)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.4)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 6, EVT_FLOAT(0.1)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.05)) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 24) - EVT_ADD(LVar1, 10) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0) - EVT_END_CHILD_THREAD - EVT_CASE_DEFAULT - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_CHILD_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.1)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 3, EVT_FLOAT(0.35)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.2)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 6, EVT_FLOAT(0.05)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.025390625)) - EVT_END_CHILD_THREAD - EVT_END_SWITCH - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_IF_GT(LVar0, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_46) - EVT_CALL(MoveBattleCamOver, 5) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_46) - EVT_CALL(MoveBattleCamOver, 50) - EVT_END_IF - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_QUAKE_1) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_QUAKE_2) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_QUAKE_3) - EVT_END_SWITCH - EVT_WAIT(10) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_1) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_2) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_3) - EVT_END_SWITCH - EVT_SET(LVar9, 0) - EVT_CALL(InitTargetIterator) - EVT_LABEL(10) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_QUAKE_HAMMER, 29, 0, 0, 16) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_GOTO(11) - EVT_END_IF - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_QUAKE_HAMMER | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_QUAKE_HAMMER | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_LABEL(11) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar1) - EVT_ADD(LVar9, 1) - EVT_CALL(GetTargetListLength, LVar1) - EVT_IF_LT(LVar9, LVar1) - EVT_GOTO(10) - EVT_END_IF - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_B)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_RETURN - EVT_END + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_Hammer_UseBasicQuake)) + CaseEq(1) + ExecWait(N(EVS_Hammer_UseSuperQuake)) + CaseEq(2) + ExecWait(N(EVS_Hammer_UseUltraQuake)) + EndSwitch + ChildThread + Wait(8) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 24) + Add(LVar1, 10) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 60, 8, 0, 30, 0, 0, 0, 0, 0) + Wait(2) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 60, 8, 33, 30, 0, 0, 0, 0, 0) + Wait(2) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar0, LVar1, LVar2, 60, 8, 66, 30, 0, 0, 0, 0, 0) + EndChildThread + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + ChildThread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.7)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.4)) + Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.1)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.05)) + EndChildThread + ChildThread + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 24) + Add(LVar1, 10) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0) + EndChildThread + CaseDefault + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + ChildThread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.1)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.35)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.2)) + Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.05)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.025390625)) + EndChildThread + EndSwitch + Call(GetPlayerActionSuccess, LVar0) + IfGt(LVar0, FALSE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_46) + Call(MoveBattleCamOver, 5) + Else + Call(UseBattleCamPreset, BTL_CAM_PRESET_46) + Call(MoveBattleCamOver, 50) + EndIf + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_QUAKE_1) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_QUAKE_2) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_QUAKE_3) + EndSwitch + Wait(10) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_1) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_2) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_STRIKE_3) + EndSwitch + Set(LVar9, 0) + Call(InitTargetIterator) + Label(10) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_QUAKE_HAMMER, 29, 0, 0, 16) + IfEq(LVar0, HIT_RESULT_MISS) + Goto(11) + EndIf + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_QUAKE_HAMMER | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_QUAKE_HAMMER | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Label(11) + Call(ChooseNextTarget, ITER_NEXT, LVar1) + Add(LVar9, 1) + Call(GetTargetListLength, LVar1) + IfLt(LVar9, LVar1) + Goto(10) + EndIf + Thread + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + EndThread + Wait(10) + ExecWait(N(EVS_Hammer_ReturnHome_B)) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Return + End }; diff --git a/src/battle/move/hammer/shell_crack.c b/src/battle/move/hammer/shell_crack.c index 7f5546abaff..7a521d4389c 100644 --- a/src/battle/move/hammer/shell_crack.c +++ b/src/battle/move/hammer/shell_crack.c @@ -23,104 +23,104 @@ API_CALLABLE(func_802A10A4_77F2E4) { extern EvtScript N(UseMove_Impl); EvtScript N(EVS_UseMove) = { - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_SET(LVarD, 60) - EVT_SET(LVarE, 1) - EVT_SET(LVarF, 2) - EVT_EXEC_WAIT(N(UseMove_Impl)) - EVT_CASE_EQ(1) - EVT_SET(LVarD, 60) - EVT_SET(LVarE, 2) - EVT_SET(LVarF, 4) - EVT_EXEC_WAIT(N(UseMove_Impl)) - EVT_CASE_EQ(2) - EVT_SET(LVarD, 60) - EVT_SET(LVarE, 3) - EVT_SET(LVarF, 6) - EVT_EXEC_WAIT(N(UseMove_Impl)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(ShowActionHud, TRUE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Set(LVarD, 60) + Set(LVarE, 1) + Set(LVarF, 2) + ExecWait(N(UseMove_Impl)) + CaseEq(1) + Set(LVarD, 60) + Set(LVarE, 2) + Set(LVarF, 4) + ExecWait(N(UseMove_Impl)) + CaseEq(2) + Set(LVarD, 60) + Set(LVarE, 3) + Set(LVarF, 6) + ExecWait(N(UseMove_Impl)) + EndSwitch + Return + End }; EvtScript N(EVS_802A3248) = { - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(6.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(5.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(4.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(6.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(5.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(4.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2)) + EndThread + Return + End }; EvtScript N(UseMove_Impl) = { - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_UseBasicHammer)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_UseSuperHammer)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_UseUltraHammer)) - EVT_END_SWITCH - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) - EVT_EXEC_WAIT(N(EVS_802A3248)) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(func_802A10A4_77F2E4) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) - EVT_WAIT(1) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_END_SWITCH - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH | DAMAGE_TYPE_SHELL_CRACK, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_END_SWITCH - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH | DAMAGE_TYPE_SHELL_CRACK, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_A)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_UseBasicHammer)) + CaseEq(1) + ExecWait(N(EVS_UseSuperHammer)) + CaseEq(2) + ExecWait(N(EVS_UseUltraHammer)) + EndSwitch + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) + ExecWait(N(EVS_802A3248)) + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(func_802A10A4_77F2E4) + Call(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) + Wait(1) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + Return + EndIf + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + EndSwitch + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH | DAMAGE_TYPE_SHELL_CRACK, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + EndSwitch + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH | DAMAGE_TYPE_SHELL_CRACK, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + ExecWait(N(EVS_Hammer_ReturnHome_A)) + EndCaseGroup + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/battle/move/hammer/shrink_smash.c b/src/battle/move/hammer/shrink_smash.c index 5d2d8cc6b7f..14286f82dfa 100644 --- a/src/battle/move/hammer/shrink_smash.c +++ b/src/battle/move/hammer/shrink_smash.c @@ -7,125 +7,125 @@ extern EvtScript N(EVS_UseMove_Impl); EvtScript N(EVS_UseMove) = { - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_SET(LVarD, 45) - EVT_SET(LVarE, 1) - EVT_SET(LVarF, 2) - EVT_EXEC_WAIT(N(EVS_UseMove_Impl)) - EVT_CASE_EQ(1) - EVT_SET(LVarD, 45) - EVT_SET(LVarE, 2) - EVT_SET(LVarF, 4) - EVT_EXEC_WAIT(N(EVS_UseMove_Impl)) - EVT_CASE_EQ(2) - EVT_SET(LVarD, 45) - EVT_SET(LVarE, 3) - EVT_SET(LVarF, 6) - EVT_EXEC_WAIT(N(EVS_UseMove_Impl)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(ShowActionHud, TRUE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Set(LVarD, 45) + Set(LVarE, 1) + Set(LVarF, 2) + ExecWait(N(EVS_UseMove_Impl)) + CaseEq(1) + Set(LVarD, 45) + Set(LVarE, 2) + Set(LVarF, 4) + ExecWait(N(EVS_UseMove_Impl)) + CaseEq(2) + Set(LVarD, 45) + Set(LVarE, 3) + Set(LVarF, 6) + ExecWait(N(EVS_UseMove_Impl)) + EndSwitch + Return + End }; EvtScript N(EVS_UseMove_Impl) = { - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_UseBasicHammer)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_UseSuperHammer)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_UseUltraHammer)) - EVT_END_SWITCH - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) - EVT_CALL(GetActionSuccessCopy, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_MIN) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.3)) - EVT_END_THREAD - EVT_CASE_EQ(1) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.6)) - EVT_END_THREAD - EVT_CASE_EQ(2) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(1.9)) - EVT_END_THREAD - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_MIN) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.3)) - EVT_END_THREAD - EVT_CASE_EQ(1) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.6)) - EVT_END_THREAD - EVT_CASE_EQ(2) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.9)) - EVT_END_THREAD - EVT_END_SWITCH - EVT_END_SWITCH - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) - EVT_WAIT(1) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_END_SWITCH - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, DMG_STATUS_KEY(STATUS_FLAG_SHRINK, 3, 100), LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_END_SWITCH - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, DMG_STATUS_KEY(STATUS_FLAG_SHRINK, 3, 75), LVarE, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_A)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_UseBasicHammer)) + CaseEq(1) + ExecWait(N(EVS_UseSuperHammer)) + CaseEq(2) + ExecWait(N(EVS_UseUltraHammer)) + EndSwitch + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) + Call(GetActionSuccessCopy, LVar0) + Switch(LVar0) + CaseGt(0) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(StartRumble, BTL_RUMBLE_PLAYER_MIN) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.3)) + EndThread + CaseEq(1) + Call(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.6)) + EndThread + CaseEq(2) + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(1.9)) + EndThread + EndSwitch + CaseDefault + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(StartRumble, BTL_RUMBLE_PLAYER_MIN) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.3)) + EndThread + CaseEq(1) + Call(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.6)) + EndThread + CaseEq(2) + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.9)) + EndThread + EndSwitch + EndSwitch + Call(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) + Wait(1) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + Return + EndIf + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + EndSwitch + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, DMG_STATUS_KEY(STATUS_FLAG_SHRINK, 3, 100), LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + EndSwitch + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, DMG_STATUS_KEY(STATUS_FLAG_SHRINK, 3, 75), LVarE, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + ExecWait(N(EVS_Hammer_ReturnHome_A)) + EndCaseGroup + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/battle/move/hammer/spin_smash.c b/src/battle/move/hammer/spin_smash.c index 6f7fbfd8495..07d4186a44d 100644 --- a/src/battle/move/hammer/spin_smash.c +++ b/src/battle/move/hammer/spin_smash.c @@ -35,391 +35,391 @@ extern EvtScript N(EVS_UseMove2_Impl); extern EvtScript N(EVS_UseMove3_Impl); EvtScript N(EVS_UseMove) = { - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(SetDamageSource, DMG_SRC_SPIN_SMASH) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_SET(LVarD, 60) - EVT_SET(LVarE, 1) - EVT_SET(LVarF, 2) - EVT_EXEC_WAIT(N(EVS_UseMove1_Impl)) - EVT_CASE_EQ(1) - EVT_SET(LVarD, 60) - EVT_SET(LVarE, 2) - EVT_SET(LVarF, 4) - EVT_EXEC_WAIT(N(EVS_UseMove2_Impl)) - EVT_CASE_EQ(2) - EVT_SET(LVarD, 60) - EVT_SET(LVarE, 3) - EVT_SET(LVarF, 6) - EVT_EXEC_WAIT(N(EVS_UseMove3_Impl)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(ShowActionHud, TRUE) + Call(SetDamageSource, DMG_SRC_SPIN_SMASH) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Set(LVarD, 60) + Set(LVarE, 1) + Set(LVarF, 2) + ExecWait(N(EVS_UseMove1_Impl)) + CaseEq(1) + Set(LVarD, 60) + Set(LVarE, 2) + Set(LVarF, 4) + ExecWait(N(EVS_UseMove2_Impl)) + CaseEq(2) + Set(LVarD, 60) + Set(LVarE, 3) + Set(LVarF, 6) + ExecWait(N(EVS_UseMove3_Impl)) + EndSwitch + Return + End }; EvtScript N(EVS_UseMove1_Impl) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH) - EVT_CALL(action_command_hammer_init) - EVT_CALL(InitTargetIterator) - EVT_EXEC_WAIT(N(EVS_HammerSupport_A)) - EVT_SET(LVar1, 0) - EVT_LOOP(10) - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_ADD(LVar1, 1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash1_Begin) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash1_Begin) - EVT_SWITCH(LVar1) - EVT_CASE_LT(3) - EVT_WAIT(4) - EVT_CASE_LT(5) - EVT_WAIT(3) - EVT_CASE_LT(7) - EVT_WAIT(2) - EVT_CASE_LT(9) - EVT_WAIT(1) - EVT_CASE_LT(11) - EVT_WAIT(0) - EVT_END_SWITCH - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, LVar9, 16) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_AIM_HAMMER) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_WINDUP) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash1_Raise) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash1_Hold1) - EVT_CALL(N(ShouldMovesAutoSucceed)) - EVT_IF_EQ(LVar0, HIT_RESULT_HIT) - EVT_LOOP(45) - EVT_WAIT(1) - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_CALL(action_command_hammer_start, 0, LVarD, 3) - EVT_CALL(SetActionQuality, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(30) - EVT_WAIT(1) - EVT_CALL(GetActionQuality, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_IF_NE(LVar1, 1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash1_Hold2) - EVT_SET(LVar1, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(GetActionSuccess, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash1_PreSwing) - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash1_Swing) - EVT_WAIT(3) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_46) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_MIN) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_SPIN_SMASH_1) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_WAIT(25) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(func_802A1000_737890) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH | DAMAGE_TYPE_SPIN_SMASH | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(func_802A1074_737904) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH | DAMAGE_TYPE_SPIN_SMASH | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_B)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 18) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 0) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_B)) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_SMASH) + Call(action_command_hammer_init) + Call(InitTargetIterator) + ExecWait(N(EVS_HammerSupport_A)) + Set(LVar1, 0) + Loop(10) + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfEq(LVar0, TRUE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + BreakLoop + EndIf + Wait(1) + Add(LVar1, 1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash1_Begin) + EndLoop + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash1_Begin) + Switch(LVar1) + CaseLt(3) + Wait(4) + CaseLt(5) + Wait(3) + CaseLt(7) + Wait(2) + CaseLt(9) + Wait(1) + CaseLt(11) + Wait(0) + EndSwitch + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, LVar9, 16) + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) + Call(UseBattleCamPreset, BTL_CAM_PLAYER_AIM_HAMMER) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_WINDUP) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash1_Raise) + Wait(8) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash1_Hold1) + Call(N(ShouldMovesAutoSucceed)) + IfEq(LVar0, HIT_RESULT_HIT) + Loop(45) + Wait(1) + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfNe(LVar0, FALSE) + BreakLoop + EndIf + EndLoop + EndIf + Call(action_command_hammer_start, 0, LVarD, 3) + Call(SetActionQuality, 0) + Set(LVar1, 0) + Loop(30) + Wait(1) + Call(GetActionQuality, LVar0) + IfNe(LVar0, 0) + IfNe(LVar1, 1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash1_Hold2) + Set(LVar1, 1) + EndIf + EndIf + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfEq(LVar0, FALSE) + BreakLoop + EndIf + EndLoop + Label(0) + Wait(1) + Call(GetActionSuccess, LVar0) + IfEq(LVar0, 0) + Goto(0) + EndIf + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash1_PreSwing) + Wait(3) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash1_Swing) + Wait(3) + Call(UseBattleCamPreset, BTL_CAM_PRESET_46) + Call(StartRumble, BTL_RUMBLE_PLAYER_MIN) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_SPIN_SMASH_1) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) + IfEq(LVar0, HIT_RESULT_MISS) + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Wait(25) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + Return + EndIf + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(func_802A1000_737890) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH | DAMAGE_TYPE_SPIN_SMASH | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(func_802A1074_737904) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH | DAMAGE_TYPE_SPIN_SMASH | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + ExecWait(N(EVS_Hammer_ReturnHome_B)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + Thread + Set(LVar0, 0) + Loop(10) + Add(LVar0, 18) + Call(SetActorYaw, ACTOR_PLAYER, LVar0) + Wait(1) + EndLoop + EndThread + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(SetActorYaw, ACTOR_PLAYER, 0) + ExecWait(N(EVS_Hammer_ReturnHome_B)) + Return + End }; EvtScript N(EVS_UseMove2_Impl) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH) - EVT_CALL(action_command_hammer_init) - EVT_CALL(InitTargetIterator) - EVT_EXEC_WAIT(N(EVS_HammerSupport_A)) - EVT_SET(LVar1, 0) - EVT_LOOP(10) - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_ADD(LVar1, 1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash2_Begin) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash2_Begin) - EVT_SWITCH(LVar1) - EVT_CASE_LT(3) - EVT_WAIT(4) - EVT_CASE_LT(5) - EVT_WAIT(3) - EVT_CASE_LT(7) - EVT_WAIT(2) - EVT_CASE_LT(9) - EVT_WAIT(1) - EVT_CASE_LT(11) - EVT_WAIT(0) - EVT_END_SWITCH - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_AIM_HAMMER) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_WINDUP) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash2_Raise) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash2_Hold1) - EVT_CALL(N(ShouldMovesAutoSucceed)) - EVT_IF_EQ(LVar0, FALSE) - EVT_LOOP(45) - EVT_WAIT(1) - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_CALL(action_command_hammer_start, 0, LVarD, 3) - EVT_CALL(SetActionQuality, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(30) - EVT_WAIT(1) - EVT_CALL(GetActionQuality, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_IF_NE(LVar1, 1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash2_Hold2) - EVT_SET(LVar1, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(GetActionSuccess, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash2_PreSwing) - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash2_Swing) - EVT_WAIT(3) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_46) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_SPIN_SMASH_2) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_WAIT(25) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(func_802A1000_737890) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH | DAMAGE_TYPE_SPIN_SMASH | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(func_802A1074_737904) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH | DAMAGE_TYPE_SPIN_SMASH | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_B)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 18) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_B)) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_SMASH) + Call(action_command_hammer_init) + Call(InitTargetIterator) + ExecWait(N(EVS_HammerSupport_A)) + Set(LVar1, 0) + Loop(10) + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfEq(LVar0, TRUE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + BreakLoop + EndIf + Wait(1) + Add(LVar1, 1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash2_Begin) + EndLoop + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash2_Begin) + Switch(LVar1) + CaseLt(3) + Wait(4) + CaseLt(5) + Wait(3) + CaseLt(7) + Wait(2) + CaseLt(9) + Wait(1) + CaseLt(11) + Wait(0) + EndSwitch + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(AddGoalPos, ACTOR_PLAYER, 0, 0, 0) + Call(UseBattleCamPreset, BTL_CAM_PLAYER_AIM_HAMMER) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_WINDUP) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash2_Raise) + Wait(8) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash2_Hold1) + Call(N(ShouldMovesAutoSucceed)) + IfEq(LVar0, FALSE) + Loop(45) + Wait(1) + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfNe(LVar0, FALSE) + BreakLoop + EndIf + EndLoop + EndIf + Call(action_command_hammer_start, 0, LVarD, 3) + Call(SetActionQuality, 0) + Set(LVar1, 0) + Loop(30) + Wait(1) + Call(GetActionQuality, LVar0) + IfNe(LVar0, 0) + IfNe(LVar1, 1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash2_Hold2) + Set(LVar1, 1) + EndIf + EndIf + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfEq(LVar0, FALSE) + BreakLoop + EndIf + EndLoop + Label(0) + Wait(1) + Call(GetActionSuccess, LVar0) + IfEq(LVar0, 0) + Goto(0) + EndIf + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash2_PreSwing) + Wait(3) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash2_Swing) + Wait(3) + Call(UseBattleCamPreset, BTL_CAM_PRESET_46) + Call(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_SPIN_SMASH_2) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) + IfEq(LVar0, HIT_RESULT_MISS) + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Wait(25) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + Return + EndIf + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(func_802A1000_737890) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH | DAMAGE_TYPE_SPIN_SMASH | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(func_802A1074_737904) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH | DAMAGE_TYPE_SPIN_SMASH | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + ExecWait(N(EVS_Hammer_ReturnHome_B)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + Thread + Set(LVar0, 0) + Loop(10) + Add(LVar0, 18) + Call(SetActorYaw, ACTOR_PLAYER, LVar0) + Wait(1) + EndLoop + EndThread + Wait(10) + Call(SetActorYaw, ACTOR_PLAYER, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + ExecWait(N(EVS_Hammer_ReturnHome_B)) + Return + End }; EvtScript N(EVS_UseMove3_Impl) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH) - EVT_CALL(action_command_hammer_init) - EVT_CALL(InitTargetIterator) - EVT_EXEC_WAIT(N(EVS_HammerSupport_A)) - EVT_SET(LVar1, 0) - EVT_LOOP(10) - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_ADD(LVar1, 1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash3_Begin) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash3_Begin) - EVT_SWITCH(LVar1) - EVT_CASE_LT(3) - EVT_WAIT(4) - EVT_CASE_LT(5) - EVT_WAIT(3) - EVT_CASE_LT(7) - EVT_WAIT(2) - EVT_CASE_LT(9) - EVT_WAIT(1) - EVT_CASE_LT(11) - EVT_WAIT(0) - EVT_END_SWITCH - EVT_CALL(InitTargetIterator) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_AIM_HAMMER) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_WINDUP) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash3_Raise) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash3_Hold1) - EVT_CALL(N(ShouldMovesAutoSucceed)) - EVT_IF_EQ(LVar0, FALSE) - EVT_LOOP(45) - EVT_WAIT(1) - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_CALL(action_command_hammer_start, 0, LVarD, 3) - EVT_CALL(SetActionQuality, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(30) - EVT_WAIT(1) - EVT_CALL(GetActionQuality, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_IF_NE(LVar1, 1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash3_Hold2) - EVT_SET(LVar1, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(GetActionSuccess, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash3_PreSwing) - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash3_Swing) - EVT_WAIT(3) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_46) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_SPIN_SMASH_3) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_WAIT(25) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(func_802A1000_737890) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH | DAMAGE_TYPE_SPIN_SMASH | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(func_802A1074_737904) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH | DAMAGE_TYPE_SPIN_SMASH | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_B)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 18) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_B)) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_SMASH) + Call(action_command_hammer_init) + Call(InitTargetIterator) + ExecWait(N(EVS_HammerSupport_A)) + Set(LVar1, 0) + Loop(10) + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfEq(LVar0, TRUE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + BreakLoop + EndIf + Wait(1) + Add(LVar1, 1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash3_Begin) + EndLoop + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash3_Begin) + Switch(LVar1) + CaseLt(3) + Wait(4) + CaseLt(5) + Wait(3) + CaseLt(7) + Wait(2) + CaseLt(9) + Wait(1) + CaseLt(11) + Wait(0) + EndSwitch + Call(InitTargetIterator) + Call(UseBattleCamPreset, BTL_CAM_PLAYER_AIM_HAMMER) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HAMMER_WINDUP) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash3_Raise) + Wait(8) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash3_Hold1) + Call(N(ShouldMovesAutoSucceed)) + IfEq(LVar0, FALSE) + Loop(45) + Wait(1) + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfNe(LVar0, FALSE) + BreakLoop + EndIf + EndLoop + EndIf + Call(action_command_hammer_start, 0, LVarD, 3) + Call(SetActionQuality, 0) + Set(LVar1, 0) + Loop(30) + Wait(1) + Call(GetActionQuality, LVar0) + IfNe(LVar0, 0) + IfNe(LVar1, 1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash3_Hold2) + Set(LVar1, 1) + EndIf + EndIf + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfEq(LVar0, FALSE) + BreakLoop + EndIf + EndLoop + Label(0) + Wait(1) + Call(GetActionSuccess, LVar0) + IfEq(LVar0, 0) + Goto(0) + EndIf + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash3_PreSwing) + Wait(3) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB2_SpinSmash3_Swing) + Wait(3) + Call(UseBattleCamPreset, BTL_CAM_PRESET_46) + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_SPIN_SMASH_3) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) + IfEq(LVar0, HIT_RESULT_MISS) + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Wait(25) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + Return + EndIf + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(func_802A1000_737890) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH | DAMAGE_TYPE_SPIN_SMASH | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(func_802A1074_737904) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH | DAMAGE_TYPE_SPIN_SMASH | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + ExecWait(N(EVS_Hammer_ReturnHome_B)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + Thread + Set(LVar0, 0) + Loop(10) + Add(LVar0, 18) + Call(SetActorYaw, ACTOR_PLAYER, LVar0) + Wait(1) + EndLoop + EndThread + Wait(10) + Call(SetActorYaw, ACTOR_PLAYER, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + ExecWait(N(EVS_Hammer_ReturnHome_B)) + Return + End }; diff --git a/src/battle/move/hammer/super_smash.c b/src/battle/move/hammer/super_smash.c index f3f0b20e190..9a6545e32df 100644 --- a/src/battle/move/hammer/super_smash.c +++ b/src/battle/move/hammer/super_smash.c @@ -8,99 +8,99 @@ extern EvtScript N(UseMove_Impl); EvtScript N(EVS_UseMove) = { - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_SET(LVarD, 45) - EVT_SET(LVarE, 4) - EVT_SET(LVarF, 5) - EVT_EXEC_WAIT(N(UseMove_Impl)) - EVT_CASE_EQ(1) - EVT_SET(LVarD, 45) - EVT_SET(LVarE, 5) - EVT_SET(LVarF, 7) - EVT_EXEC_WAIT(N(UseMove_Impl)) - EVT_CASE_EQ(2) - EVT_SET(LVarD, 45) - EVT_SET(LVarE, 6) - EVT_SET(LVarF, 9) - EVT_EXEC_WAIT(N(UseMove_Impl)) - EVT_END_SWITCH - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE) - EVT_RETURN - EVT_END + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + Call(ShowActionHud, TRUE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Set(LVarD, 45) + Set(LVarE, 4) + Set(LVarF, 5) + ExecWait(N(UseMove_Impl)) + CaseEq(1) + Set(LVarD, 45) + Set(LVarE, 5) + Set(LVarF, 7) + ExecWait(N(UseMove_Impl)) + CaseEq(2) + Set(LVarD, 45) + Set(LVarE, 6) + Set(LVarF, 9) + ExecWait(N(UseMove_Impl)) + EndSwitch + Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) + Return + End }; EvtScript N(EVS_802A3188) = { - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(4.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(4.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + EndThread + Return + End }; EvtScript N(UseMove_Impl) = { - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_UseBasicHammer)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_UseSuperHammer)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_UseUltraHammer)) - EVT_END_SWITCH - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) - EVT_WAIT(1) - EVT_EXEC_WAIT(N(EVS_802A3188)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 0, 0, 0, 16) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_END_SWITCH - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) - EVT_END_SWITCH - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_A)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_Hammer_ReturnHome_C)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_UseBasicHammer)) + CaseEq(1) + ExecWait(N(EVS_UseSuperHammer)) + CaseEq(2) + ExecWait(N(EVS_UseUltraHammer)) + EndSwitch + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 25, 0, 0, 16) + Call(UseBattleCamPreset, BTL_CAM_PLAYER_HAMMER_STRIKE) + Wait(1) + ExecWait(N(EVS_802A3188)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_SMASH, 0, 0, 0, 16) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + Return + EndIf + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + EndSwitch + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_NORMAL) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_SILENT) + EndSwitch + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_SMASH, SUPPRESS_EVENTS_HAMMER, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + ExecWait(N(EVS_Hammer_ReturnHome_A)) + EndCaseGroup + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_Hammer_ReturnHome_C)) + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/battle/move/item/coconut.c b/src/battle/move/item/coconut.c index f4254b3eb0e..c25ec320eb0 100644 --- a/src/battle/move/item/coconut.c +++ b/src/battle/move/item/coconut.c @@ -49,48 +49,48 @@ Gfx N(displayList)[] = { EntityModelScript N(modelCommandList) = STANDARD_ENTITY_MODEL_SCRIPT(N(displayList), RENDER_MODE_ALPHATEST); EvtScript N(EVS_UseItem) = { - EVT_SET_CONST(LVarA, ITEM_COCONUT) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(MoveBattleCamOver, 15) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Throw) - EVT_CALL(PlaySound, SOUND_THROW) - EVT_WAIT(3) - EVT_CALL(CreateVirtualEntity, LVarA, EVT_PTR(N(modelCommandList))) - EVT_SETF(LVar0, EVT_FLOAT(1.0)) - EVT_CALL(MultiplyByActorScale, LVar0) - EVT_CALL(SetVirtualEntityScale, LVarA, LVar0, LVar0, LVar0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SET(LVar3, 20) - EVT_SET(LVar4, 42) - EVT_SET(LVar5, 5) - EVT_CALL(MultiplyVec3ByActorScale, LVar3, LVar4, LVar5) - EVT_ADD(LVar0, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_ADD(LVar2, LVar5) - EVT_CALL(SetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(18) - EVT_ADD(LVar0, -60) - EVT_CALL(SetVirtualEntityRotation, LVarA, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetVirtualEntityJumpGravity, LVarA, EVT_FLOAT(0.8)) - EVT_ADD(LVar2, 5) - EVT_CALL(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 18) - EVT_CALL(GetItemPower, ITEM_COCONUT, LVar3, LVar4) - EVT_CALL(ApplyShrinkFromOwner, LVar3) - EVT_CALL(ItemDamageEnemy, LVar9, DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, LVar3, BS_FLAGS1_TRIGGER_EVENTS) - EVT_ADD(LVar0, 60) - EVT_ADD(LVar1, 0) - EVT_CALL(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 16) - EVT_CALL(DeleteVirtualEntity, LVarA) - EVT_EXEC_WAIT(N(PlayerGoHome)) - EVT_RETURN - EVT_END + SetConst(LVarA, ITEM_COCONUT) + ExecWait(N(UseItemWithEffect)) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(MoveBattleCamOver, 15) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Throw) + Call(PlaySound, SOUND_THROW) + Wait(3) + Call(CreateVirtualEntity, LVarA, Ref(N(modelCommandList))) + SetF(LVar0, Float(1.0)) + Call(MultiplyByActorScale, LVar0) + Call(SetVirtualEntityScale, LVarA, LVar0, LVar0, LVar0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Set(LVar3, 20) + Set(LVar4, 42) + Set(LVar5, 5) + Call(MultiplyVec3ByActorScale, LVar3, LVar4, LVar5) + Add(LVar0, LVar3) + Add(LVar1, LVar4) + Add(LVar2, LVar5) + Call(SetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Thread + Set(LVar0, 0) + Loop(18) + Add(LVar0, -60) + Call(SetVirtualEntityRotation, LVarA, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetVirtualEntityJumpGravity, LVarA, Float(0.8)) + Add(LVar2, 5) + Call(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 18) + Call(GetItemPower, ITEM_COCONUT, LVar3, LVar4) + Call(ApplyShrinkFromOwner, LVar3) + Call(ItemDamageEnemy, LVar9, DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, LVar3, BS_FLAGS1_TRIGGER_EVENTS) + Add(LVar0, 60) + Add(LVar1, 0) + Call(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 16) + Call(DeleteVirtualEntity, LVarA) + ExecWait(N(PlayerGoHome)) + Return + End }; diff --git a/src/battle/move/item/dizzy_dial.c b/src/battle/move/item/dizzy_dial.c index def5aa3fc6c..36ec27e4275 100644 --- a/src/battle/move/item/dizzy_dial.c +++ b/src/battle/move/item/dizzy_dial.c @@ -49,53 +49,53 @@ API_CALLABLE(N(AnimateDizzyDialCameraFX)) { #include "battle/common/move/UseItem.inc.c" EvtScript N(EVS_UseItem) = { - EVT_SET_CONST(LVarA, ITEM_DIZZY_DIAL) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(10) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(AddBattleCamZoom, -250) - EVT_CALL(MoveBattleCamOver, 80) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) - EVT_WAIT(80) - EVT_CALL(AddBattleCamZoom, 250) - EVT_CALL(MoveBattleCamOver, 3) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) - EVT_END_THREAD - EVT_CALL(N(AnimateDizzyDialCameraFX)) - EVT_THREAD - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(4.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, FALSE) - EVT_END_THREAD - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(ItemCheckHit, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, LVar0, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetItemPower, ITEM_DIZZY_DIAL, LVar0, LVar1) - EVT_CALL(MakeStatusField, LVar0, STATUS_FLAG_DIZZY, 100, LVar0) - EVT_CALL(ItemAfflictEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_STATUS_ALWAYS_HITS, LVar0, 0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_LABEL(1) - EVT_WAIT(5) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(30) - EVT_EXEC_WAIT(N(PlayerGoHome)) - EVT_RETURN - EVT_END + SetConst(LVarA, ITEM_DIZZY_DIAL) + ExecWait(N(UseItemWithEffect)) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Wait(10) + Thread + Wait(5) + Call(AddBattleCamZoom, -250) + Call(MoveBattleCamOver, 80) + Call(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) + Wait(80) + Call(AddBattleCamZoom, 250) + Call(MoveBattleCamOver, 3) + Call(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) + EndThread + Call(N(AnimateDizzyDialCameraFX)) + Thread + Call(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(4.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(MoveBattleCamOver, 10) + Call(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, FALSE) + EndThread + Call(InitTargetIterator) + Label(0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(ItemCheckHit, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, LVar0, 0) + IfEq(LVar0, HIT_RESULT_MISS) + Goto(1) + EndIf + Call(GetItemPower, ITEM_DIZZY_DIAL, LVar0, LVar1) + Call(MakeStatusField, LVar0, STATUS_FLAG_DIZZY, 100, LVar0) + Call(ItemAfflictEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_STATUS_ALWAYS_HITS, LVar0, 0, BS_FLAGS1_TRIGGER_EVENTS) + Label(1) + Wait(5) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Wait(30) + ExecWait(N(PlayerGoHome)) + Return + End }; diff --git a/src/battle/move/item/dried_shroom.c b/src/battle/move/item/dried_shroom.c index 28c9f1f9aa4..48d69c5f0ee 100644 --- a/src/battle/move/item/dried_shroom.c +++ b/src/battle/move/item/dried_shroom.c @@ -32,26 +32,26 @@ API_CALLABLE(N(func_802A12FC_71CFDC)) { #include "battle/common/move/UseItem.inc.c" EvtScript N(EVS_UseItem) = { - EVT_SET_CONST(LVarA, ITEM_DRIED_SHROOM) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_EXEC_WAIT(N(EatItem)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_StickOutTongue) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 0) - EVT_ADD(LVar1, 35) - EVT_CALL(N(SpawnHeartRecoveryFX), LVar0, LVar1, LVar2, 1) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 25) - EVT_ADD(LVar2, 5) - EVT_CALL(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, 1) - EVT_CALL(N(func_802A12FC_71CFDC)) - EVT_WAIT(30) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 5) - EVT_CALL(ShowRecoveryShimmer, LVar0, LVar1, LVar2, 1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(PlayerGoHome)) - EVT_RETURN - EVT_END + SetConst(LVarA, ITEM_DRIED_SHROOM) + ExecWait(N(UseItemWithEffect)) + ExecWait(N(EatItem)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_StickOutTongue) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 0) + Add(LVar1, 35) + Call(N(SpawnHeartRecoveryFX), LVar0, LVar1, LVar2, 1) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 25) + Add(LVar2, 5) + Call(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, 1) + Call(N(func_802A12FC_71CFDC)) + Wait(30) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar2, 5) + Call(ShowRecoveryShimmer, LVar0, LVar1, LVar2, 1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Wait(20) + ExecWait(N(PlayerGoHome)) + Return + End }; diff --git a/src/battle/move/item/dusty_hammer.c b/src/battle/move/item/dusty_hammer.c index a055de0b537..cca453f8503 100644 --- a/src/battle/move/item/dusty_hammer.c +++ b/src/battle/move/item/dusty_hammer.c @@ -48,48 +48,48 @@ Gfx N(DustyHammerGfx)[] = { EntityModelScript N(EMS_DustyHammer) = STANDARD_ENTITY_MODEL_SCRIPT(N(DustyHammerGfx), RENDER_MODE_ALPHATEST); EvtScript N(EVS_UseItem) = { - EVT_SET_CONST(LVarA, ITEM_DUSTY_HAMMER) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(MoveBattleCamOver, 15) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Throw) - EVT_CALL(PlaySound, SOUND_THROW) - EVT_WAIT(3) - EVT_CALL(CreateVirtualEntity, LVarA, EVT_PTR(N(EMS_DustyHammer))) - EVT_SETF(LVar0, EVT_FLOAT(1.0)) - EVT_CALL(MultiplyByActorScale, LVar0) - EVT_CALL(SetVirtualEntityScale, LVarA, LVar0, LVar0, LVar0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SET(LVar3, 20) - EVT_SET(LVar4, 42) - EVT_SET(LVar5, 5) - EVT_CALL(MultiplyVec3ByActorScale, LVar3, LVar4, LVar5) - EVT_ADD(LVar0, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_ADD(LVar2, LVar5) - EVT_CALL(SetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(18) - EVT_ADD(LVar0, -60) - EVT_CALL(SetVirtualEntityRotation, LVarA, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetVirtualEntityJumpGravity, LVarA, EVT_FLOAT(0.8)) - EVT_ADD(LVar2, 5) - EVT_CALL(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 18) - EVT_CALL(GetItemPower, ITEM_DUSTY_HAMMER, LVar3, LVar4) - EVT_CALL(ApplyShrinkFromOwner, LVar3) - EVT_CALL(ItemDamageEnemy, LVar9, DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, LVar3, BS_FLAGS1_TRIGGER_EVENTS) - EVT_ADD(LVar0, 40) - EVT_ADD(LVar1, 10) - EVT_CALL(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 10) - EVT_CALL(DeleteVirtualEntity, LVarA) - EVT_EXEC_WAIT(N(PlayerGoHome)) - EVT_RETURN - EVT_END + SetConst(LVarA, ITEM_DUSTY_HAMMER) + ExecWait(N(UseItemWithEffect)) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(MoveBattleCamOver, 15) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Throw) + Call(PlaySound, SOUND_THROW) + Wait(3) + Call(CreateVirtualEntity, LVarA, Ref(N(EMS_DustyHammer))) + SetF(LVar0, Float(1.0)) + Call(MultiplyByActorScale, LVar0) + Call(SetVirtualEntityScale, LVarA, LVar0, LVar0, LVar0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Set(LVar3, 20) + Set(LVar4, 42) + Set(LVar5, 5) + Call(MultiplyVec3ByActorScale, LVar3, LVar4, LVar5) + Add(LVar0, LVar3) + Add(LVar1, LVar4) + Add(LVar2, LVar5) + Call(SetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Thread + Set(LVar0, 0) + Loop(18) + Add(LVar0, -60) + Call(SetVirtualEntityRotation, LVarA, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetVirtualEntityJumpGravity, LVarA, Float(0.8)) + Add(LVar2, 5) + Call(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 18) + Call(GetItemPower, ITEM_DUSTY_HAMMER, LVar3, LVar4) + Call(ApplyShrinkFromOwner, LVar3) + Call(ItemDamageEnemy, LVar9, DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, LVar3, BS_FLAGS1_TRIGGER_EVENTS) + Add(LVar0, 40) + Add(LVar1, 10) + Call(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 10) + Call(DeleteVirtualEntity, LVarA) + ExecWait(N(PlayerGoHome)) + Return + End }; diff --git a/src/battle/move/item/egg_missile.c b/src/battle/move/item/egg_missile.c index 9deae51fa65..a1701da99e9 100644 --- a/src/battle/move/item/egg_missile.c +++ b/src/battle/move/item/egg_missile.c @@ -149,46 +149,46 @@ EntityModelScript N(EMS_EggMissile) = { EntityModelScript unusedModelScript = STANDARD_ENTITY_MODEL_SCRIPT(N(Frame4Gfx), RENDER_MODE_ALPHATEST); EvtScript N(EVS_UseItem) = { - EVT_SET_CONST(LVarA, ITEM_EGG_MISSILE) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(MoveBattleCamOver, 15) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Throw) - EVT_CALL(PlaySound, SOUND_THROW) - EVT_WAIT(3) - EVT_CALL(CreateVirtualEntity, LVarA, EVT_PTR(N(EMS_EggMissile))) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_ADD(LVar1, 42) - EVT_ADD(LVar2, 5) - EVT_CALL(SetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(18) - EVT_ADD(LVar0, 60) - EVT_CALL(SetVirtualEntityRotation, LVarA, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetVirtualEntityJumpGravity, LVarA, EVT_FLOAT(1.0)) - EVT_ADD(LVar2, 5) - EVT_CALL(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 18) - EVT_CALL(DeleteVirtualEntity, LVarA) - EVT_CALL(PlaySound, SOUND_EGG_MISSILE_BLAST) - EVT_CALL(N(func_802A123C_71CF1C), LVar0, LVar1, LVar2) - EVT_THREAD - EVT_CALL(StartRumble, BTL_RUMBLE_HIT_EXTREME) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.75)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(1.2)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.45)) - EVT_END_THREAD - EVT_CALL(GetItemPower, ITEM_EGG_MISSILE, LVar0, LVar1) - EVT_CALL(ItemDamageEnemy, LVar0, DAMAGE_TYPE_FIRE | DAMAGE_TYPE_BLAST | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_EXEC_WAIT(N(PlayerGoHome)) - EVT_RETURN - EVT_END + SetConst(LVarA, ITEM_EGG_MISSILE) + ExecWait(N(UseItemWithEffect)) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(MoveBattleCamOver, 15) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Throw) + Call(PlaySound, SOUND_THROW) + Wait(3) + Call(CreateVirtualEntity, LVarA, Ref(N(EMS_EggMissile))) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Add(LVar1, 42) + Add(LVar2, 5) + Call(SetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Thread + Set(LVar0, 0) + Loop(18) + Add(LVar0, 60) + Call(SetVirtualEntityRotation, LVarA, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetVirtualEntityJumpGravity, LVarA, Float(1.0)) + Add(LVar2, 5) + Call(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 18) + Call(DeleteVirtualEntity, LVarA) + Call(PlaySound, SOUND_EGG_MISSILE_BLAST) + Call(N(func_802A123C_71CF1C), LVar0, LVar1, LVar2) + Thread + Call(StartRumble, BTL_RUMBLE_HIT_EXTREME) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.75)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.5)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(1.2)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.45)) + EndThread + Call(GetItemPower, ITEM_EGG_MISSILE, LVar0, LVar1) + Call(ItemDamageEnemy, LVar0, DAMAGE_TYPE_FIRE | DAMAGE_TYPE_BLAST | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) + ExecWait(N(PlayerGoHome)) + Return + End }; diff --git a/src/battle/move/item/electro_pop.c b/src/battle/move/item/electro_pop.c index ba73f8e0234..1cc407e0061 100644 --- a/src/battle/move/item/electro_pop.c +++ b/src/battle/move/item/electro_pop.c @@ -96,37 +96,37 @@ API_CALLABLE(N(func_802A14F0_730A90)) { #include "battle/common/move/UseItem.inc.c" EvtScript N(EVS_UseItem) = { - EVT_SET_CONST(LVarA, ITEM_ELECTRO_POP) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_EXEC_WAIT(N(EatItem)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 30, 0) - EVT_CALL(PlaySound, SOUND_VOLT_SHROOM_APPLY) - EVT_CALL(GetItemPower, ITEM_VOLT_SHROOM, LVar0, LVar1) - EVT_CALL(N(func_802A123C_7307DC)) - EVT_WAIT(40) - EVT_CALL(N(func_802A14F0_730A90)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_ADD(LVar1, 25) - EVT_CALL(N(SpawnFlowerRecoveryFX), LVar0, LVar1, LVar2, LVar3) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 25) - EVT_CALL(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, LVar3) + SetConst(LVarA, ITEM_ELECTRO_POP) + ExecWait(N(UseItemWithEffect)) + ExecWait(N(EatItem)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 20) + PlayEffect(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, Float(1.0), 30, 0) + Call(PlaySound, SOUND_VOLT_SHROOM_APPLY) + Call(GetItemPower, ITEM_VOLT_SHROOM, LVar0, LVar1) + Call(N(func_802A123C_7307DC)) + Wait(40) + Call(N(func_802A14F0_730A90)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Add(LVar1, 25) + Call(N(SpawnFlowerRecoveryFX), LVar0, LVar1, LVar2, LVar3) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 25) + Call(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, LVar3) #if !VERSION_PAL - EVT_CALL(N(AddFP), LVar3) + Call(N(AddFP), LVar3) #endif - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_ThumbsUp) - EVT_WAIT(30) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(ShowRecoveryShimmer, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_WAIT(20) - EVT_CALL(ShowMessageBox, BTL_MSG_PLAYER_CHARGED, 60) - EVT_CALL(WaitForMessageBoxDone) - EVT_EXEC_WAIT(N(PlayerGoHome)) - EVT_RETURN - EVT_END + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_ThumbsUp) + Wait(30) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(ShowRecoveryShimmer, LVar0, LVar1, LVar2, LVar3) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Wait(20) + Call(ShowMessageBox, BTL_MSG_PLAYER_CHARGED, 60) + Call(WaitForMessageBoxDone) + ExecWait(N(PlayerGoHome)) + Return + End }; diff --git a/src/battle/move/item/fire_flower.c b/src/battle/move/item/fire_flower.c index 922210dcb53..67baa4edba0 100644 --- a/src/battle/move/item/fire_flower.c +++ b/src/battle/move/item/fire_flower.c @@ -25,65 +25,65 @@ API_CALLABLE(N(func_802A123C_716E9C)) { #include "battle/common/move/UseItem.inc.c" EvtScript N(EVS_UseItem) = { - EVT_SET_CONST(LVarA, ITEM_FIRE_FLOWER) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_CALL(N(FadeBackgroundDarken)) - EVT_CALL(PlaySound, SOUND_PLANT_FIRE_FLOWER) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_PlantFireFlower) - EVT_THREAD - EVT_WAIT(50) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_WAIT(35) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(10) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) - EVT_SET(LVar0, 40) - EVT_CALL(MultiplyByActorScale, LVar0) - EVT_ADD(LVar3, LVar0) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(2.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(PlayerRunToGoal, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(func_802A123C_716E9C), LVar3, LVar4, LVar5) - EVT_WAIT(25) - EVT_LOOP(12) - EVT_WAIT(1) - EVT_CALL(PlaySound, SOUND_FIRE_FLOWER_A) - EVT_WAIT(2) - EVT_CALL(PlaySound, SOUND_FIRE_FLOWER_B) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(80) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(ItemCheckHit, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, LVar0, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetItemPower, ITEM_FIRE_FLOWER, LVar0, LVar1) - EVT_CALL(ItemDamageEnemy, LVar0, DAMAGE_TYPE_FIRE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_LABEL(1) - EVT_WAIT(5) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(N(FadeBackgroundLighten)) - EVT_WAIT(30) - EVT_EXEC_WAIT(N(PlayerGoHome)) - EVT_RETURN - EVT_END + SetConst(LVarA, ITEM_FIRE_FLOWER) + ExecWait(N(UseItemWithEffect)) + Call(N(FadeBackgroundDarken)) + Call(PlaySound, SOUND_PLANT_FIRE_FLOWER) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_PlantFireFlower) + Thread + Wait(50) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + EndThread + Wait(35) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Wait(10) + Call(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) + Set(LVar0, 40) + Call(MultiplyByActorScale, LVar0) + Add(LVar3, LVar0) + Thread + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Call(SetActorSpeed, ACTOR_PLAYER, Float(2.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(PlayerRunToGoal, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + EndThread + Thread + Call(N(func_802A123C_716E9C), LVar3, LVar4, LVar5) + Wait(25) + Loop(12) + Wait(1) + Call(PlaySound, SOUND_FIRE_FLOWER_A) + Wait(2) + Call(PlaySound, SOUND_FIRE_FLOWER_B) + Wait(1) + EndLoop + EndThread + Wait(80) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(MoveBattleCamOver, 20) + Call(InitTargetIterator) + Label(0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(ItemCheckHit, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, LVar0, 0) + IfEq(LVar0, HIT_RESULT_MISS) + Goto(1) + EndIf + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetItemPower, ITEM_FIRE_FLOWER, LVar0, LVar1) + Call(ItemDamageEnemy, LVar0, DAMAGE_TYPE_FIRE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) + Label(1) + Wait(5) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Call(N(FadeBackgroundLighten)) + Wait(30) + ExecWait(N(PlayerGoHome)) + Return + End }; diff --git a/src/battle/move/item/food.c b/src/battle/move/item/food.c index 50b46262be4..90eefcdd066 100644 --- a/src/battle/move/item/food.c +++ b/src/battle/move/item/food.c @@ -102,81 +102,81 @@ API_CALLABLE(N(GetFoodParameters)) { #include "battle/common/move/UseItem.inc.c" EvtScript N(EVS_UseOnPartner) = { - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 30) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 60) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 90) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 120) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 150) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 180) - EVT_WAIT(10) - EVT_SET(LVar1, LVarF) - EVT_EXEC_WAIT(N(UseItem)) - EVT_SET(LVarE, LVarA) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Throw) - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_CALL(CreateVirtualEntity, LVarA, EVT_PTR(EMS_StarIcon)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 0) - EVT_ADD(LVar1, 30) - EVT_ADD(LVar2, 5) - EVT_CALL(SetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(SetVirtualEntityFlags, LVarA, 32) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 45) - EVT_CALL(MakeItemEntity, LVarE, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVarE, LVar0) - EVT_LOOP(25) - EVT_CALL(GetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(N(func_802A123C_73330C), LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(RemoveItemEntity, LVarE) - EVT_END_THREAD - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamTarget, -125, 1, 0) - EVT_CALL(SetBattleCamOffsetZ, 41) - EVT_CALL(SetBattleCamZoom, 248) - EVT_CALL(MoveBattleCamOver, 25) - EVT_CALL(SetVirtualEntityJumpGravity, LVarA, EVT_FLOAT(0.4)) - EVT_ADD(LVar2, 5) - EVT_CALL(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 25) - EVT_CALL(AddBattleCamZoom, 100) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 25) - EVT_CALL(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, LVarB) - EVT_IF_GT(LVarB, 0) - EVT_CALL(N(func_802A12EC_7333BC), LVarB) - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(ShowRecoveryShimmer, LVar0, LVar1, LVar2, LVarB) - EVT_WAIT(20) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 150) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 120) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 90) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 60) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 30) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 0) - EVT_WAIT(10) - EVT_RETURN - EVT_END + Call(SetActorYaw, ACTOR_PLAYER, 30) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 60) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 90) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 120) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 150) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 180) + Wait(10) + Set(LVar1, LVarF) + ExecWait(N(UseItem)) + Set(LVarE, LVarA) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Throw) + Thread + Wait(20) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + EndThread + Call(CreateVirtualEntity, LVarA, Ref(EMS_StarIcon)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 0) + Add(LVar1, 30) + Add(LVar2, 5) + Call(SetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) + Call(SetVirtualEntityFlags, LVarA, 32) + Thread + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 45) + Call(MakeItemEntity, LVarE, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVarE, LVar0) + Loop(25) + Call(GetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) + Call(N(func_802A123C_73330C), LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(RemoveItemEntity, LVarE) + EndThread + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetBattleCamTarget, -125, 1, 0) + Call(SetBattleCamOffsetZ, 41) + Call(SetBattleCamZoom, 248) + Call(MoveBattleCamOver, 25) + Call(SetVirtualEntityJumpGravity, LVarA, Float(0.4)) + Add(LVar2, 5) + Call(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 25) + Call(AddBattleCamZoom, 100) + Call(MoveBattleCamOver, 30) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 25) + Call(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, LVarB) + IfGt(LVarB, 0) + Call(N(func_802A12EC_7333BC), LVarB) + EndIf + Wait(30) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(ShowRecoveryShimmer, LVar0, LVar1, LVar2, LVarB) + Wait(20) + Call(SetActorYaw, ACTOR_PLAYER, 150) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 120) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 90) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 60) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 30) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 0) + Wait(10) + Return + End }; EvtScript N(EVS_UseItem) = { @@ -187,65 +187,65 @@ EvtScript N(EVS_UseItem) = { #define LV_NoRefund LVarE #define LV_IsHarmful LVarF - EVT_SET(LV_NoRefund, LVar1) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SET(LV_ItemID, LVar1) - EVT_CALL(N(GetFoodParameters), LV_ItemID) - EVT_CALL(InitTargetIterator) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_IF_EQ(LVar0, ACTOR_PARTNER) - EVT_EXEC_WAIT(N(EVS_UseOnPartner)) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar1, LV_NoRefund) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_IF_EQ(LV_IsDrink, FALSE) - EVT_EXEC_WAIT(N(EatItem)) - EVT_ELSE - EVT_EXEC_WAIT(N(DrinkItem)) - EVT_END_IF - EVT_IF_EQ(LV_IsHarmful, TRUE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_StickOutTongue) - EVT_END_IF - EVT_IF_GT(LV_HPAmt, 0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 0) - EVT_ADD(LVar1, 35) - EVT_CALL(N(SpawnHeartRecoveryFX), LVar0, LVar1, LVar2, LV_HPAmt) - EVT_END_IF - EVT_IF_LT(LV_HPAmt, 0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 0) - EVT_ADD(LVar1, 35) - EVT_CALL(N(SpawnHeartRecoveryFX), LVar0, LVar1, LVar2, LV_HPAmt) - EVT_END_IF - EVT_IF_GT(LV_FPAmt, 0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_ADD(LVar1, 25) - EVT_CALL(N(SpawnFlowerRecoveryFX), LVar0, LVar1, LVar2, LV_FPAmt) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 25) - EVT_CALL(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, LV_HPAmt) - EVT_IF_NE(LV_HPAmt, 0) - EVT_CALL(N(AddHP), LV_HPAmt) - EVT_END_IF - EVT_IF_NE(LV_FPAmt, 0) - EVT_CALL(N(AddFP), LV_FPAmt) - EVT_END_IF - EVT_IF_EQ(LV_IsHarmful, FALSE) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_ThumbsUp) - EVT_WAIT(30) - EVT_ELSE - EVT_WAIT(30) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(ShowRecoveryShimmer, LVar0, LVar1, LVar2, LV_HPAmt) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(PlayerGoHome)) - EVT_RETURN - EVT_END + Set(LV_NoRefund, LVar1) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Set(LV_ItemID, LVar1) + Call(N(GetFoodParameters), LV_ItemID) + Call(InitTargetIterator) + Call(GetOwnerTarget, LVar0, LVar1) + IfEq(LVar0, ACTOR_PARTNER) + ExecWait(N(EVS_UseOnPartner)) + Return + EndIf + Set(LVar1, LV_NoRefund) + ExecWait(N(UseItemWithEffect)) + IfEq(LV_IsDrink, FALSE) + ExecWait(N(EatItem)) + Else + ExecWait(N(DrinkItem)) + EndIf + IfEq(LV_IsHarmful, TRUE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_StickOutTongue) + EndIf + IfGt(LV_HPAmt, 0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 0) + Add(LVar1, 35) + Call(N(SpawnHeartRecoveryFX), LVar0, LVar1, LVar2, LV_HPAmt) + EndIf + IfLt(LV_HPAmt, 0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 0) + Add(LVar1, 35) + Call(N(SpawnHeartRecoveryFX), LVar0, LVar1, LVar2, LV_HPAmt) + EndIf + IfGt(LV_FPAmt, 0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Add(LVar1, 25) + Call(N(SpawnFlowerRecoveryFX), LVar0, LVar1, LVar2, LV_FPAmt) + EndIf + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 25) + Call(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, LV_HPAmt) + IfNe(LV_HPAmt, 0) + Call(N(AddHP), LV_HPAmt) + EndIf + IfNe(LV_FPAmt, 0) + Call(N(AddFP), LV_FPAmt) + EndIf + IfEq(LV_IsHarmful, FALSE) + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_ThumbsUp) + Wait(30) + Else + Wait(30) + EndIf + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(ShowRecoveryShimmer, LVar0, LVar1, LVar2, LV_HPAmt) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Wait(20) + ExecWait(N(PlayerGoHome)) + Return + End }; diff --git a/src/battle/move/item/fright_jar.c b/src/battle/move/item/fright_jar.c index a51508b9ead..8271aef1cad 100644 --- a/src/battle/move/item/fright_jar.c +++ b/src/battle/move/item/fright_jar.c @@ -14,57 +14,57 @@ #include "battle/common/move/UseItem.inc.c" EvtScript N(EVS_UseItem) = { - EVT_SET_CONST(LVarA, ITEM_FRIGHT_JAR) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_CALL(N(FadeBackgroundDarken)) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 50) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Crouch) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_FRIGHT_JAR) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -40) - EVT_ADD(LVar1, 5) - EVT_SETF(LVar3, EVT_FLOAT(0.7)) - EVT_LOOP(5) - EVT_PLAY_EFFECT(EFFECT_FRIGHT_JAR, 0, LVar0, LVar1, LVar2, LVar3, 25, 0) - EVT_ADD(LVar0, 5) - EVT_ADDF(LVar3, EVT_FLOAT(0.15)) - EVT_WAIT(7) - EVT_END_LOOP - EVT_PLAY_EFFECT(EFFECT_FRIGHT_JAR, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.5), 60, 0) - EVT_WAIT(20) - EVT_LOOP(4) - EVT_CALL(AddBattleCamZoom, -100) - EVT_CALL(MoveBattleCamOver, 2) - EVT_WAIT(2) - EVT_CALL(AddBattleCamZoom, 100) - EVT_CALL(MoveBattleCamOver, 2) - EVT_WAIT(2) - EVT_END_LOOP - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(ItemCheckHit, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, LVar0, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(SetDamageSource, DMG_SRC_FRIGHT_JAR) - EVT_CALL(ItemSpookEnemy, LVar0, DAMAGE_TYPE_FEAR | DAMAGE_TYPE_STATUS_ALWAYS_HITS | DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_NO_CONTACT, 0, 100, 0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_LABEL(1) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Walk) - EVT_CALL(N(FadeBackgroundLighten)) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(PlayerGoHome)) - EVT_RETURN - EVT_END + SetConst(LVarA, ITEM_FRIGHT_JAR) + ExecWait(N(UseItemWithEffect)) + Call(N(FadeBackgroundDarken)) + Thread + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 50) + EndThread + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Crouch) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_FRIGHT_JAR) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, -40) + Add(LVar1, 5) + SetF(LVar3, Float(0.7)) + Loop(5) + PlayEffect(EFFECT_FRIGHT_JAR, 0, LVar0, LVar1, LVar2, LVar3, 25, 0) + Add(LVar0, 5) + AddF(LVar3, Float(0.15)) + Wait(7) + EndLoop + PlayEffect(EFFECT_FRIGHT_JAR, 0, LVar0, LVar1, LVar2, Float(1.5), 60, 0) + Wait(20) + Loop(4) + Call(AddBattleCamZoom, -100) + Call(MoveBattleCamOver, 2) + Wait(2) + Call(AddBattleCamZoom, 100) + Call(MoveBattleCamOver, 2) + Wait(2) + EndLoop + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(MoveBattleCamOver, 20) + Call(InitTargetIterator) + Label(0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(ItemCheckHit, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, LVar0, 0) + IfEq(LVar0, HIT_RESULT_MISS) + Goto(1) + EndIf + Call(SetDamageSource, DMG_SRC_FRIGHT_JAR) + Call(ItemSpookEnemy, LVar0, DAMAGE_TYPE_FEAR | DAMAGE_TYPE_STATUS_ALWAYS_HITS | DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_NO_CONTACT, 0, 100, 0, BS_FLAGS1_TRIGGER_EVENTS) + Label(1) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Walk) + Call(N(FadeBackgroundLighten)) + Wait(20) + ExecWait(N(PlayerGoHome)) + Return + End }; diff --git a/src/battle/move/item/hustle_drink.c b/src/battle/move/item/hustle_drink.c index e78cb05d439..a1664be98a1 100644 --- a/src/battle/move/item/hustle_drink.c +++ b/src/battle/move/item/hustle_drink.c @@ -42,81 +42,81 @@ API_CALLABLE(N(func_802A12C4_726224)) { #include "battle/common/move/UseItem.inc.c" EvtScript N(EVS_UseItem) = { - EVT_SET_CONST(LVarA, ITEM_HUSTLE_DRINK) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_EXEC_WAIT(N(DrinkItem)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Squish) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 25) - EVT_CALL(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, 5) - EVT_CALL(N(func_802A12C4_726224)) - EVT_CALL(N(func_802A123C_72619C)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HUSTLE_WHISTLE) - EVT_THREAD - EVT_LOOP(2) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.2), EVT_FLOAT(0.95), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.35), EVT_FLOAT(0.85), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.38), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.4), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.85), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.2), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.95), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.2), EVT_FLOAT(0.95), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.35), EVT_FLOAT(0.85), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.38), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.4), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_GROW) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.9), EVT_FLOAT(1.3), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.9), EVT_FLOAT(1.2), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.95), EVT_FLOAT(1.1), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_LOOP(10) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HUSTLE_WHISTLE) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 0, LVar0, LVar1, LVar2, 0, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, LVar0, LVar1, LVar2, 0, 0) - EVT_WAIT(4) - EVT_END_LOOP - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(PlayerGoHome)) - EVT_RETURN - EVT_END + SetConst(LVarA, ITEM_HUSTLE_DRINK) + ExecWait(N(UseItemWithEffect)) + ExecWait(N(DrinkItem)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Squish) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 25) + Call(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, 5) + Call(N(func_802A12C4_726224)) + Call(N(func_802A123C_72619C)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(UseBattleCamPreset, BTL_CAM_PRESET_13) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HUSTLE_WHISTLE) + Thread + Loop(2) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.2), Float(0.95), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.9), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.35), Float(0.85), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.38), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.4), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.85), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.2), Float(0.9), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.95), Float(1.0)) + Wait(1) + EndLoop + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.2), Float(0.95), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.9), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.35), Float(0.85), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.38), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.4), Float(0.8), Float(1.0)) + Wait(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_GROW) + Call(SetActorScale, ACTOR_SELF, Float(0.9), Float(1.3), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.9), Float(1.2), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.95), Float(1.1), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + EndThread + Loop(10) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HUSTLE_WHISTLE) + PlayEffect(EFFECT_LANDING_DUST, 0, LVar0, LVar1, LVar2, 0, 0) + PlayEffect(EFFECT_LANDING_DUST, 1, LVar0, LVar1, LVar2, 0, 0) + Wait(4) + EndLoop + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Wait(20) + ExecWait(N(PlayerGoHome)) + Return + End }; diff --git a/src/battle/move/item/insecticide_herb.c b/src/battle/move/item/insecticide_herb.c index 9e054456538..47a603e2ad6 100644 --- a/src/battle/move/item/insecticide_herb.c +++ b/src/battle/move/item/insecticide_herb.c @@ -94,64 +94,64 @@ EntityModelScript N(modelCommandList) = STANDARD_ENTITY_MODEL_SCRIPT(N(displayLi EvtScript N(EVS_UseItem) = { - EVT_SET_CONST(LVarA, ITEM_INSECTICIDE_HERB) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(MoveBattleCamOver, 15) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Throw) - EVT_CALL(PlaySound, SOUND_THROW) - EVT_WAIT(3) - EVT_CALL(CreateVirtualEntity, LVarA, EVT_PTR(N(modelCommandList))) - EVT_SETF(LVar0, EVT_FLOAT(1.0)) - EVT_CALL(MultiplyByActorScale, LVar0) - EVT_CALL(SetVirtualEntityScale, LVarA, LVar0, LVar0, LVar0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SET(LVar3, 20) - EVT_SET(LVar4, 42) - EVT_SET(LVar5, 5) - EVT_CALL(MultiplyVec3ByActorScale, LVar3, LVar4, LVar5) - EVT_ADD(LVar0, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_ADD(LVar2, LVar5) - EVT_CALL(SetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(18) - EVT_ADD(LVar0, -60) - EVT_CALL(SetVirtualEntityRotation, LVarA, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetVirtualEntityJumpGravity, LVarA, EVT_FLOAT(0.8)) - EVT_ADD(LVar2, 5) - EVT_CALL(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 18) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 3, LVar0, LVar1, LVar2, 0, 0, 0) - EVT_SUB(LVar0, 10) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 3, LVar0, LVar1, LVar2, 0, 0, 0) - EVT_ADD(LVar0, 20) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 3, LVar0, LVar1, LVar2, 0, 0, 0) - EVT_THREAD - EVT_CALL(N(func_802A12E0_72AA30), LVar0, LVar1, LVar2) - EVT_WAIT(3) - EVT_CALL(N(func_802A12E0_72AA30), LVar0, LVar1, LVar2) - EVT_WAIT(3) - EVT_CALL(N(func_802A12E0_72AA30), LVar0, LVar1, LVar2) - EVT_END_THREAD - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(N(func_802A123C_72A98C)) - EVT_CALL(DeleteVirtualEntity, LVarA) - EVT_IF_EQ(LVar9, 0) - EVT_CALL(ItemDamageEnemy, LVar0, 0, 0, 0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_ELSE - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(N(func_802A1280_72A9D0)) - EVT_END_IF - EVT_EXEC_WAIT(N(PlayerGoHome)) - EVT_RETURN - EVT_END + SetConst(LVarA, ITEM_INSECTICIDE_HERB) + ExecWait(N(UseItemWithEffect)) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(MoveBattleCamOver, 15) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Throw) + Call(PlaySound, SOUND_THROW) + Wait(3) + Call(CreateVirtualEntity, LVarA, Ref(N(modelCommandList))) + SetF(LVar0, Float(1.0)) + Call(MultiplyByActorScale, LVar0) + Call(SetVirtualEntityScale, LVarA, LVar0, LVar0, LVar0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Set(LVar3, 20) + Set(LVar4, 42) + Set(LVar5, 5) + Call(MultiplyVec3ByActorScale, LVar3, LVar4, LVar5) + Add(LVar0, LVar3) + Add(LVar1, LVar4) + Add(LVar2, LVar5) + Call(SetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Thread + Set(LVar0, 0) + Loop(18) + Add(LVar0, -60) + Call(SetVirtualEntityRotation, LVarA, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetVirtualEntityJumpGravity, LVarA, Float(0.8)) + Add(LVar2, 5) + Call(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 18) + PlayEffect(EFFECT_WALKING_DUST, 3, LVar0, LVar1, LVar2, 0, 0, 0) + Sub(LVar0, 10) + PlayEffect(EFFECT_WALKING_DUST, 3, LVar0, LVar1, LVar2, 0, 0, 0) + Add(LVar0, 20) + PlayEffect(EFFECT_WALKING_DUST, 3, LVar0, LVar1, LVar2, 0, 0, 0) + Thread + Call(N(func_802A12E0_72AA30), LVar0, LVar1, LVar2) + Wait(3) + Call(N(func_802A12E0_72AA30), LVar0, LVar1, LVar2) + Wait(3) + Call(N(func_802A12E0_72AA30), LVar0, LVar1, LVar2) + EndThread + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_SELF) + Call(N(func_802A123C_72A98C)) + Call(DeleteVirtualEntity, LVarA) + IfEq(LVar9, 0) + Call(ItemDamageEnemy, LVar0, 0, 0, 0, BS_FLAGS1_TRIGGER_EVENTS) + Else + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_SELF) + Call(N(func_802A1280_72A9D0)) + EndIf + ExecWait(N(PlayerGoHome)) + Return + End }; diff --git a/src/battle/move/item/life_shroom.c b/src/battle/move/item/life_shroom.c index 1a3dadab998..8f94f81cc3a 100644 --- a/src/battle/move/item/life_shroom.c +++ b/src/battle/move/item/life_shroom.c @@ -92,114 +92,114 @@ API_CALLABLE(N(func_802A1484_72E9B4)) { #include "battle/common/move/UseItem.inc.c" EvtScript N(EVS_UseOnPartner) = { - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 30) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 60) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 90) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 120) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 150) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 180) - EVT_WAIT(10) - EVT_SET(LVar1, LVarF) - EVT_EXEC_WAIT(N(UseItem)) - EVT_SET(LVarE, LVarA) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Throw) - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_CALL(CreateVirtualEntity, LVarA, EVT_PTR(EMS_StarIcon)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 0) - EVT_ADD(LVar1, 30) - EVT_ADD(LVar2, 5) - EVT_CALL(SetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(SetVirtualEntityFlags, LVarA, 32) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 45) - EVT_CALL(MakeItemEntity, LVarE, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVarE, LVar0) - EVT_LOOP(25) - EVT_CALL(GetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(N(func_802A123C_72E76C), LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(RemoveItemEntity, LVarE) - EVT_END_THREAD - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamTarget, -125, 1, 0) - EVT_CALL(SetBattleCamOffsetZ, 41) - EVT_CALL(SetBattleCamZoom, 248) - EVT_CALL(MoveBattleCamOver, 25) - EVT_CALL(SetVirtualEntityJumpGravity, LVarA, EVT_FLOAT(0.4)) - EVT_ADD(LVar2, 5) - EVT_CALL(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 25) - EVT_CALL(AddBattleCamZoom, 100) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 25) - EVT_CALL(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, LVarB) - EVT_IF_GT(LVarB, 0) - EVT_CALL(N(func_802A12EC_72E81C), LVarB) - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(ShowRecoveryShimmer, LVar0, LVar1, LVar2, LVarB) - EVT_WAIT(20) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 150) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 120) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 90) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 60) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 30) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 0) - EVT_WAIT(10) - EVT_RETURN - EVT_END + Call(SetActorYaw, ACTOR_PLAYER, 30) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 60) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 90) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 120) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 150) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 180) + Wait(10) + Set(LVar1, LVarF) + ExecWait(N(UseItem)) + Set(LVarE, LVarA) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Throw) + Thread + Wait(20) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + EndThread + Call(CreateVirtualEntity, LVarA, Ref(EMS_StarIcon)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 0) + Add(LVar1, 30) + Add(LVar2, 5) + Call(SetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) + Call(SetVirtualEntityFlags, LVarA, 32) + Thread + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 45) + Call(MakeItemEntity, LVarE, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVarE, LVar0) + Loop(25) + Call(GetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) + Call(N(func_802A123C_72E76C), LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(RemoveItemEntity, LVarE) + EndThread + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetBattleCamTarget, -125, 1, 0) + Call(SetBattleCamOffsetZ, 41) + Call(SetBattleCamZoom, 248) + Call(MoveBattleCamOver, 25) + Call(SetVirtualEntityJumpGravity, LVarA, Float(0.4)) + Add(LVar2, 5) + Call(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 25) + Call(AddBattleCamZoom, 100) + Call(MoveBattleCamOver, 30) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 25) + Call(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, LVarB) + IfGt(LVarB, 0) + Call(N(func_802A12EC_72E81C), LVarB) + EndIf + Wait(30) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(ShowRecoveryShimmer, LVar0, LVar1, LVar2, LVarB) + Wait(20) + Call(SetActorYaw, ACTOR_PLAYER, 150) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 120) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 90) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 60) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 30) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 0) + Wait(10) + Return + End }; EvtScript N(EVS_UseItem) = { - EVT_SET(LVarF, LVar1) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SET(LVarA, LVar1) - EVT_CALL(N(func_802A1484_72E9B4), LVarA) - EVT_CALL(InitTargetIterator) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_IF_EQ(LVar0, ACTOR_PARTNER) - EVT_EXEC_WAIT(N(EVS_UseOnPartner)) - EVT_RETURN - EVT_END_IF - EVT_SET_CONST(LVarA, ITEM_LIFE_SHROOM) - EVT_SET(LVar1, LVarF) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_EXEC_WAIT(N(EatItem)) - EVT_CALL(N(func_802A1438_72E968)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 0) - EVT_ADD(LVar1, 35) - EVT_CALL(N(SpawnHeartRecoveryFX), LVar0, LVar1, LVar2, LVar3) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 25) - EVT_CALL(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, LVar3) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_ThumbsUp) - EVT_WAIT(30) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(ShowRecoveryShimmer, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(PlayerGoHome)) - EVT_RETURN - EVT_END + Set(LVarF, LVar1) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Set(LVarA, LVar1) + Call(N(func_802A1484_72E9B4), LVarA) + Call(InitTargetIterator) + Call(GetOwnerTarget, LVar0, LVar1) + IfEq(LVar0, ACTOR_PARTNER) + ExecWait(N(EVS_UseOnPartner)) + Return + EndIf + SetConst(LVarA, ITEM_LIFE_SHROOM) + Set(LVar1, LVarF) + ExecWait(N(UseItemWithEffect)) + ExecWait(N(EatItem)) + Call(N(func_802A1438_72E968)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 0) + Add(LVar1, 35) + Call(N(SpawnHeartRecoveryFX), LVar0, LVar1, LVar2, LVar3) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 25) + Call(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, LVar3) + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_ThumbsUp) + Wait(30) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(ShowRecoveryShimmer, LVar0, LVar1, LVar2, LVar3) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Wait(20) + ExecWait(N(PlayerGoHome)) + Return + End }; diff --git a/src/battle/move/item/mushroom.c b/src/battle/move/item/mushroom.c index 2e2b52cd074..2fc9865e681 100644 --- a/src/battle/move/item/mushroom.c +++ b/src/battle/move/item/mushroom.c @@ -91,133 +91,133 @@ API_CALLABLE(N(func_802A15A0_715DF0)) { #include "battle/common/move/UseItem.inc.c" EvtScript N(EVS_UseOnPartner) = { - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 30) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 60) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 90) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 120) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 150) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 180) - EVT_WAIT(10) - EVT_SET(LVar1, LVarF) - EVT_EXEC_WAIT(N(UseItem)) - EVT_SET(LVarE, LVarA) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Throw) - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_CALL(CreateVirtualEntity, LVarA, EVT_PTR(EMS_StarIcon)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 0) - EVT_ADD(LVar1, 30) - EVT_ADD(LVar2, 5) - EVT_CALL(SetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(SetVirtualEntityFlags, LVarA, 32) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 45) - EVT_CALL(MakeItemEntity, LVarE, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVarE, LVar0) - EVT_LOOP(25) - EVT_CALL(GetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(N(func_802A123C_715A8C), LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(RemoveItemEntity, LVarE) - EVT_END_THREAD - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamTarget, -125, 1, 0) - EVT_CALL(SetBattleCamOffsetZ, 41) - EVT_CALL(SetBattleCamZoom, 248) - EVT_CALL(MoveBattleCamOver, 25) - EVT_CALL(SetVirtualEntityJumpGravity, LVarA, EVT_FLOAT(0.4)) - EVT_ADD(LVar2, 5) - EVT_CALL(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 25) - EVT_CALL(AddBattleCamZoom, 100) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 25) - EVT_CALL(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, LVarB) - EVT_IF_GT(LVarB, 0) - EVT_CALL(N(func_802A12EC_715B3C), LVarB) - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(ShowRecoveryShimmer, LVar0, LVar1, LVar2, LVarB) - EVT_WAIT(20) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 150) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 120) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 90) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 60) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 30) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 0) - EVT_WAIT(10) - EVT_RETURN - EVT_END + Call(SetActorYaw, ACTOR_PLAYER, 30) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 60) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 90) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 120) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 150) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 180) + Wait(10) + Set(LVar1, LVarF) + ExecWait(N(UseItem)) + Set(LVarE, LVarA) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Throw) + Thread + Wait(20) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + EndThread + Call(CreateVirtualEntity, LVarA, Ref(EMS_StarIcon)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 0) + Add(LVar1, 30) + Add(LVar2, 5) + Call(SetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) + Call(SetVirtualEntityFlags, LVarA, 32) + Thread + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 45) + Call(MakeItemEntity, LVarE, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVarE, LVar0) + Loop(25) + Call(GetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) + Call(N(func_802A123C_715A8C), LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(RemoveItemEntity, LVarE) + EndThread + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetBattleCamTarget, -125, 1, 0) + Call(SetBattleCamOffsetZ, 41) + Call(SetBattleCamZoom, 248) + Call(MoveBattleCamOver, 25) + Call(SetVirtualEntityJumpGravity, LVarA, Float(0.4)) + Add(LVar2, 5) + Call(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 25) + Call(AddBattleCamZoom, 100) + Call(MoveBattleCamOver, 30) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 25) + Call(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, LVarB) + IfGt(LVarB, 0) + Call(N(func_802A12EC_715B3C), LVarB) + EndIf + Wait(30) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(ShowRecoveryShimmer, LVar0, LVar1, LVar2, LVarB) + Wait(20) + Call(SetActorYaw, ACTOR_PLAYER, 150) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 120) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 90) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 60) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 30) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 0) + Wait(10) + Return + End }; EvtScript N(EVS_UseItem) = { - EVT_SET(LVarE, LVar1) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SET(LVarA, LVar1) - EVT_CALL(N(func_802A15A0_715DF0), LVarA) - EVT_CALL(InitTargetIterator) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_IF_EQ(LVar0, ACTOR_PARTNER) - EVT_EXEC_WAIT(N(EVS_UseOnPartner)) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar1, LVarE) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_EXEC_WAIT(N(EatItem)) - EVT_IF_EQ(LVarF, 1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_StickOutTongue) - EVT_END_IF - EVT_IF_GT(LVarB, 0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 0) - EVT_ADD(LVar1, 35) - EVT_CALL(N(SpawnHeartRecoveryFX), LVar0, LVar1, LVar2, LVarB) - EVT_END_IF - EVT_IF_GT(LVarC, 0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_ADD(LVar1, 25) - EVT_CALL(N(SpawnFlowerRecoveryFX), LVar0, LVar1, LVar2, LVarC) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 25) - EVT_CALL(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, LVarB) - EVT_IF_NE(LVarB, 0) - EVT_CALL(N(AddHP), LVarB) - EVT_END_IF - EVT_IF_NE(LVarC, 0) - EVT_CALL(N(AddFP), LVarC) - EVT_END_IF - EVT_IF_EQ(LVarF, 0) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_ThumbsUp) - EVT_WAIT(30) - EVT_ELSE - EVT_WAIT(30) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(ShowRecoveryShimmer, LVar0, LVar1, LVar2, LVarB) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(PlayerGoHome)) - EVT_RETURN - EVT_END + Set(LVarE, LVar1) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Set(LVarA, LVar1) + Call(N(func_802A15A0_715DF0), LVarA) + Call(InitTargetIterator) + Call(GetOwnerTarget, LVar0, LVar1) + IfEq(LVar0, ACTOR_PARTNER) + ExecWait(N(EVS_UseOnPartner)) + Return + EndIf + Set(LVar1, LVarE) + ExecWait(N(UseItemWithEffect)) + ExecWait(N(EatItem)) + IfEq(LVarF, 1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_StickOutTongue) + EndIf + IfGt(LVarB, 0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 0) + Add(LVar1, 35) + Call(N(SpawnHeartRecoveryFX), LVar0, LVar1, LVar2, LVarB) + EndIf + IfGt(LVarC, 0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Add(LVar1, 25) + Call(N(SpawnFlowerRecoveryFX), LVar0, LVar1, LVar2, LVarC) + EndIf + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 25) + Call(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, LVarB) + IfNe(LVarB, 0) + Call(N(AddHP), LVarB) + EndIf + IfNe(LVarC, 0) + Call(N(AddFP), LVarC) + EndIf + IfEq(LVarF, 0) + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_ThumbsUp) + Wait(30) + Else + Wait(30) + EndIf + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(ShowRecoveryShimmer, LVar0, LVar1, LVar2, LVarB) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Wait(20) + ExecWait(N(PlayerGoHome)) + Return + End }; diff --git a/src/battle/move/item/mystery.c b/src/battle/move/item/mystery.c index d379a380698..314317c0f12 100644 --- a/src/battle/move/item/mystery.c +++ b/src/battle/move/item/mystery.c @@ -236,49 +236,49 @@ API_CALLABLE(N(func_802A188C_72CE3C)) { } EvtScript N(EVS_UseItem) = { - EVT_SET_CONST(LVarA, ITEM_MYSTERY) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_THREAD - EVT_WAIT(220) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_DING) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_MYSTERY_REEL) - EVT_CALL(N(func_802A13E4_72C994)) - EVT_WAIT(2) - EVT_IF_NE(LVar0, 133) - EVT_JUMP(EVT_PTR(EVS_UseMystery)) - EVT_RETURN - EVT_END_IF - EVT_CALL(CreateVirtualEntity, LVarA, EVT_PTR(N(modelCommandList))) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 150) - EVT_CALL(SetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(SetOwnerTarget, ACTOR_PLAYER, 0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(18) - EVT_ADD(LVar0, -60) - EVT_CALL(SetVirtualEntityRotation, LVarA, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetVirtualEntityJumpGravity, LVarA, EVT_FLOAT(0.6)) - EVT_ADD(LVar2, 5) - EVT_CALL(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 12) - EVT_THREAD - EVT_ADD(LVar0, 60) - EVT_ADD(LVar1, 0) - EVT_CALL(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 16) - EVT_CALL(DeleteVirtualEntity, LVarA) - EVT_END_THREAD - EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(N(func_802A188C_72CE3C), LVar0, LVar1, LVar2) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_TRIGGER_EVENTS, TRUE) - EVT_CALL(DispatchDamagePlayerEvent, 1, EVENT_HIT) - EVT_RETURN - EVT_END + SetConst(LVarA, ITEM_MYSTERY) + ExecWait(N(UseItemWithEffect)) + Thread + Wait(220) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_DING) + EndThread + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_MYSTERY_REEL) + Call(N(func_802A13E4_72C994)) + Wait(2) + IfNe(LVar0, 133) + Jump(Ref(EVS_UseMystery)) + Return + EndIf + Call(CreateVirtualEntity, LVarA, Ref(N(modelCommandList))) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 150) + Call(SetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) + Call(SetOwnerTarget, ACTOR_PLAYER, 0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Thread + Set(LVar0, 0) + Loop(18) + Add(LVar0, -60) + Call(SetVirtualEntityRotation, LVarA, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetVirtualEntityJumpGravity, LVarA, Float(0.6)) + Add(LVar2, 5) + Call(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 12) + Thread + Add(LVar0, 60) + Add(LVar1, 0) + Call(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 16) + Call(DeleteVirtualEntity, LVarA) + EndThread + Call(SetTargetActor, ACTOR_SELF, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(N(func_802A188C_72CE3C), LVar0, LVar1, LVar2) + Call(SetBattleFlagBits, BS_FLAGS1_TRIGGER_EVENTS, TRUE) + Call(DispatchDamagePlayerEvent, 1, EVENT_HIT) + Return + End }; diff --git a/src/battle/move/item/pebble.c b/src/battle/move/item/pebble.c index ddfa5f2c922..d581dd97414 100644 --- a/src/battle/move/item/pebble.c +++ b/src/battle/move/item/pebble.c @@ -48,48 +48,48 @@ Gfx N(displayList)[] = { EntityModelScript N(modelCommandList) = STANDARD_ENTITY_MODEL_SCRIPT(N(displayList), RENDER_MODE_ALPHATEST); EvtScript N(EVS_UseItem) = { - EVT_SET_CONST(LVarA, ITEM_PEBBLE) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(MoveBattleCamOver, 15) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Throw) - EVT_CALL(PlaySound, SOUND_THROW) - EVT_WAIT(3) - EVT_CALL(CreateVirtualEntity, LVarA, EVT_PTR(N(modelCommandList))) - EVT_SETF(LVar0, EVT_FLOAT(1.0)) - EVT_CALL(MultiplyByActorScale, LVar0) - EVT_CALL(SetVirtualEntityScale, LVarA, LVar0, LVar0, LVar0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SET(LVar3, 20) - EVT_SET(LVar4, 42) - EVT_SET(LVar5, 5) - EVT_CALL(MultiplyVec3ByActorScale, LVar3, LVar4, LVar5) - EVT_ADD(LVar0, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_ADD(LVar2, LVar5) - EVT_CALL(SetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(18) - EVT_ADD(LVar0, -60) - EVT_CALL(SetVirtualEntityRotation, LVarA, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetVirtualEntityJumpGravity, LVarA, EVT_FLOAT(0.8)) - EVT_ADD(LVar2, 5) - EVT_CALL(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 18) - EVT_CALL(GetItemPower, ITEM_PEBBLE, LVar3, LVar4) - EVT_CALL(ApplyShrinkFromOwner, LVar3) - EVT_CALL(ItemDamageEnemy, LVar9, DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, LVar3, BS_FLAGS1_TRIGGER_EVENTS) - EVT_ADD(LVar0, 60) - EVT_ADD(LVar1, 0) - EVT_CALL(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 16) - EVT_CALL(DeleteVirtualEntity, LVarA) - EVT_EXEC_WAIT(N(PlayerGoHome)) - EVT_RETURN - EVT_END + SetConst(LVarA, ITEM_PEBBLE) + ExecWait(N(UseItemWithEffect)) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(MoveBattleCamOver, 15) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Throw) + Call(PlaySound, SOUND_THROW) + Wait(3) + Call(CreateVirtualEntity, LVarA, Ref(N(modelCommandList))) + SetF(LVar0, Float(1.0)) + Call(MultiplyByActorScale, LVar0) + Call(SetVirtualEntityScale, LVarA, LVar0, LVar0, LVar0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Set(LVar3, 20) + Set(LVar4, 42) + Set(LVar5, 5) + Call(MultiplyVec3ByActorScale, LVar3, LVar4, LVar5) + Add(LVar0, LVar3) + Add(LVar1, LVar4) + Add(LVar2, LVar5) + Call(SetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Thread + Set(LVar0, 0) + Loop(18) + Add(LVar0, -60) + Call(SetVirtualEntityRotation, LVarA, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetVirtualEntityJumpGravity, LVarA, Float(0.8)) + Add(LVar2, 5) + Call(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 18) + Call(GetItemPower, ITEM_PEBBLE, LVar3, LVar4) + Call(ApplyShrinkFromOwner, LVar3) + Call(ItemDamageEnemy, LVar9, DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, LVar3, BS_FLAGS1_TRIGGER_EVENTS) + Add(LVar0, 60) + Add(LVar1, 0) + Call(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 16) + Call(DeleteVirtualEntity, LVarA) + ExecWait(N(PlayerGoHome)) + Return + End }; diff --git a/src/battle/move/item/please_come_back.c b/src/battle/move/item/please_come_back.c index d5d326d55fd..215bcc17c9e 100644 --- a/src/battle/move/item/please_come_back.c +++ b/src/battle/move/item/please_come_back.c @@ -8,16 +8,16 @@ #include "battle/common/move/UseItem.inc.c" EvtScript N(EVS_UseItem) = { - EVT_SET_CONST(LVarA, ITEM_DIZZY_DIAL) //@bug should be ITEM_PLEASE_COME_BACK - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.8)) - EVT_CALL(func_80273444, 4, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioW2_PleaseComeBack) - EVT_WAIT(8) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_RETURN - EVT_END + SetConst(LVarA, ITEM_DIZZY_DIAL) //@bug should be ITEM_PLEASE_COME_BACK + ExecWait(N(UseItemWithEffect)) + Call(SetGoalToHome, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) + Call(SetActorSpeed, ACTOR_PLAYER, Float(4.0)) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.8)) + Call(func_80273444, 4, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioW2_PleaseComeBack) + Wait(8) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Return + End }; diff --git a/src/battle/move/item/pow_block.c b/src/battle/move/item/pow_block.c index c54f54e7b7b..66ea5ccf0e9 100644 --- a/src/battle/move/item/pow_block.c +++ b/src/battle/move/item/pow_block.c @@ -54,78 +54,78 @@ API_CALLABLE(N(AdjustPOWBlockEntityScale)) { #include "battle/common/move/UseItem.inc.c" EvtScript N(EVS_UseItem) = { - EVT_SET_CONST(LVarA, ITEM_POW_BLOCK) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_WAIT(10) - EVT_CALL(MakeEntity, EVT_PTR(Entity_PowBlock), -40, 60, 0, 0, MAKE_ENTITY_END) - EVT_SET(LVarA, LVar0) - EVT_CALL(N(AdjustPOWBlockEntityScale)) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, -40, 60, 20, 0, 0, 0) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, -30, 65, 20, 0, 0, 0) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, -40, 60, 20, 0, 0, 0) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, -40, 55, 20, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_BLOCK) - EVT_CALL(N(ForceTriggerPOWBlockEntity)) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, -40, 60, 20, 0, 0, 0) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, -30, 65, 20, 0, 0, 0) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, -40, 60, 20, 0, 0, 0) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, -40, 55, 20, 0, 0, 0) - EVT_CALL(StartRumble, BTL_RUMBLE_HIT_HEAVY) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(6.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(5.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(4.0)) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_POW_BLOCK) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(PlayerRunToGoal, 0) - EVT_WAIT(5) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(0.6)) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 20, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(ItemCheckHit, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, LVar0, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetItemPower, ITEM_POW_BLOCK, LVar3, LVar4) - EVT_CALL(ApplyShrinkFromOwner, LVar3) - EVT_CALL(SetDamageSource, DMG_SRC_POW_BLOCK) - EVT_CALL(ItemDamageEnemy, LVar0, DAMAGE_TYPE_POW | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, LVar3, BS_FLAGS1_TRIGGER_EVENTS) - EVT_LABEL(1) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, -70, 60, 20, 0, 0, 0) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, -60, 65, 20, 0, 0, 0) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, -70, 60, 20, 0, 0, 0) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, -70, 55, 20, 0, 0, 0) - EVT_CALL(N(DeletePOWBlockEntity)) - EVT_WAIT(30) - EVT_EXEC_WAIT(N(PlayerGoHome)) - EVT_RETURN - EVT_END + SetConst(LVarA, ITEM_POW_BLOCK) + ExecWait(N(UseItemWithEffect)) + Wait(10) + Call(MakeEntity, Ref(Entity_PowBlock), -40, 60, 0, 0, MAKE_ENTITY_END) + Set(LVarA, LVar0) + Call(N(AdjustPOWBlockEntityScale)) + PlayEffect(EFFECT_WALKING_DUST, 2, -40, 60, 20, 0, 0, 0) + PlayEffect(EFFECT_WALKING_DUST, 2, -30, 65, 20, 0, 0, 0) + PlayEffect(EFFECT_WALKING_DUST, 2, -40, 60, 20, 0, 0, 0) + PlayEffect(EFFECT_WALKING_DUST, 2, -40, 55, 20, 0, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Thread + Wait(15) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_BLOCK) + Call(N(ForceTriggerPOWBlockEntity)) + PlayEffect(EFFECT_WALKING_DUST, 2, -40, 60, 20, 0, 0, 0) + PlayEffect(EFFECT_WALKING_DUST, 2, -30, 65, 20, 0, 0, 0) + PlayEffect(EFFECT_WALKING_DUST, 2, -40, 60, 20, 0, 0, 0) + PlayEffect(EFFECT_WALKING_DUST, 2, -40, 55, 20, 0, 0, 0) + Call(StartRumble, BTL_RUMBLE_HIT_HEAVY) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(6.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(5.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(4.0)) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_POW_BLOCK) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2)) + EndThread + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(SetActorSpeed, ACTOR_PLAYER, Float(4.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(PlayerRunToGoal, 0) + Wait(5) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(0.6)) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 20, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(MoveBattleCamOver, 20) + Call(InitTargetIterator) + Label(0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(ItemCheckHit, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, LVar0, 0) + IfEq(LVar0, HIT_RESULT_MISS) + Goto(1) + EndIf + Call(GetItemPower, ITEM_POW_BLOCK, LVar3, LVar4) + Call(ApplyShrinkFromOwner, LVar3) + Call(SetDamageSource, DMG_SRC_POW_BLOCK) + Call(ItemDamageEnemy, LVar0, DAMAGE_TYPE_POW | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, LVar3, BS_FLAGS1_TRIGGER_EVENTS) + Label(1) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + PlayEffect(EFFECT_WALKING_DUST, 2, -70, 60, 20, 0, 0, 0) + PlayEffect(EFFECT_WALKING_DUST, 2, -60, 65, 20, 0, 0, 0) + PlayEffect(EFFECT_WALKING_DUST, 2, -70, 60, 20, 0, 0, 0) + PlayEffect(EFFECT_WALKING_DUST, 2, -70, 55, 20, 0, 0, 0) + Call(N(DeletePOWBlockEntity)) + Wait(30) + ExecWait(N(PlayerGoHome)) + Return + End }; diff --git a/src/battle/move/item/repel_gel.c b/src/battle/move/item/repel_gel.c index 8de93e67570..9ca3f0c84c3 100644 --- a/src/battle/move/item/repel_gel.c +++ b/src/battle/move/item/repel_gel.c @@ -22,23 +22,23 @@ API_CALLABLE(N(func_802A123C_72DDAC)) { #include "battle/common/move/UseItem.inc.c" EvtScript N(EVS_UseItem) = { - EVT_SET_CONST(LVarA, ITEM_REPEL_GEL) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_REPEL_GEL_APPLY) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_ApplyCream) - EVT_WAIT(45) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 3, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 30, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_REPEL_GEL_VANISH) - EVT_CALL(GetItemPower, ITEM_REPEL_GEL, LVar0, LVar1) - EVT_CALL(N(func_802A123C_72DDAC)) - EVT_WAIT(20) - EVT_CALL(ShowMessageBox, BTL_MSG_PLAYER_TRANSPARENT, 60) - EVT_CALL(WaitForMessageBoxDone) - EVT_EXEC_WAIT(N(PlayerGoHome)) - EVT_RETURN - EVT_END + SetConst(LVarA, ITEM_REPEL_GEL) + ExecWait(N(UseItemWithEffect)) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_REPEL_GEL_APPLY) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_ApplyCream) + Wait(45) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 20) + PlayEffect(EFFECT_RADIAL_SHIMMER, 3, LVar0, LVar1, LVar2, Float(1.0), 30, 0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_REPEL_GEL_VANISH) + Call(GetItemPower, ITEM_REPEL_GEL, LVar0, LVar1) + Call(N(func_802A123C_72DDAC)) + Wait(20) + Call(ShowMessageBox, BTL_MSG_PLAYER_TRANSPARENT, 60) + Call(WaitForMessageBoxDone) + ExecWait(N(PlayerGoHome)) + Return + End }; diff --git a/src/battle/move/item/shooting_star.c b/src/battle/move/item/shooting_star.c index 121df22d1c0..6ce6f48b148 100644 --- a/src/battle/move/item/shooting_star.c +++ b/src/battle/move/item/shooting_star.c @@ -75,74 +75,74 @@ API_CALLABLE(N(CustomFadeBackgroundLighten)) { #include "battle/common/move/UseItem.inc.c" EvtScript N(EVS_UseItem) = { - EVT_SET_CONST(LVarA, ITEM_SHOOTING_STAR) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_END_THREAD - EVT_CALL(N(CustomFadeBackgroundDarken)) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_SHOOTING_STAR_FALL_A) - EVT_CALL(N(SpawnShootingStarFX)) - EVT_ADD(LVar0, 1) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_SHOOTING_STAR_FALL_B) - EVT_CALL(N(SpawnShootingStarFX)) - EVT_ADD(LVar0, 1) - EVT_WAIT(5) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_WAIT(50) - EVT_LOOP(10) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_STAR_BOUNCE_A) - EVT_ADD(LVar0, 1) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_STAR_BOUNCE_B) - EVT_ADD(LVar0, 1) - EVT_WAIT(5) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(5) - EVT_WAIT(15) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(90) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(ItemCheckHit, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, LVar0, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(N(SpawnDamageStarsFX), LVar0, LVar1, LVar2) - EVT_CALL(GetItemPower, ITEM_SHOOTING_STAR, LVar0, LVar1) - EVT_CALL(ItemDamageEnemy, LVar0, DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_LABEL(1) - EVT_WAIT(10) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_EXEC_WAIT(N(PlayerGoHome)) - EVT_THREAD - EVT_CALL(N(CustomFadeBackgroundLighten)) - EVT_END_THREAD - EVT_WAIT(30) - EVT_RETURN - EVT_END + SetConst(LVarA, ITEM_SHOOTING_STAR) + ExecWait(N(UseItemWithEffect)) + Thread + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + EndThread + Call(N(CustomFadeBackgroundDarken)) + Thread + Set(LVar0, 0) + Loop(10) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_SHOOTING_STAR_FALL_A) + Call(N(SpawnShootingStarFX)) + Add(LVar0, 1) + Wait(5) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_SHOOTING_STAR_FALL_B) + Call(N(SpawnShootingStarFX)) + Add(LVar0, 1) + Wait(5) + EndLoop + EndThread + Thread + Set(LVar0, 0) + Wait(50) + Loop(10) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_STAR_BOUNCE_A) + Add(LVar0, 1) + Wait(5) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_STAR_BOUNCE_B) + Add(LVar0, 1) + Wait(5) + EndLoop + EndThread + Thread + Loop(5) + Wait(15) + Call(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + EndLoop + EndThread + Wait(90) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(MoveBattleCamOver, 20) + Call(InitTargetIterator) + Label(0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(ItemCheckHit, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, LVar0, 0) + IfEq(LVar0, HIT_RESULT_MISS) + Goto(1) + EndIf + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(N(SpawnDamageStarsFX), LVar0, LVar1, LVar2) + Call(GetItemPower, ITEM_SHOOTING_STAR, LVar0, LVar1) + Call(ItemDamageEnemy, LVar0, DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) + Label(1) + Wait(10) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + ExecWait(N(PlayerGoHome)) + Thread + Call(N(CustomFadeBackgroundLighten)) + EndThread + Wait(30) + Return + End }; diff --git a/src/battle/move/item/sleepy_sheep.c b/src/battle/move/item/sleepy_sheep.c index fc008c89767..147fea07832 100644 --- a/src/battle/move/item/sleepy_sheep.c +++ b/src/battle/move/item/sleepy_sheep.c @@ -288,153 +288,153 @@ EntityModelScript N(modelCommandList3) = { }; EvtScript N(EVS_UseItem) = { - EVT_SET_CONST(LVarA, ITEM_SLEEPY_SHEEP) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, -67, -15, -5) - EVT_CALL(SetBattleCamOffsetZ, 45) - EVT_CALL(SetBattleCamZoom, 169) - EVT_CALL(MoveBattleCamOver, 50) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_SHEEP_STAMPEDE) - EVT_LOOP(7) - EVT_CALL(StartRumble, BTL_RUMBLE_HIT_MIN) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.2)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.25)) - EVT_WAIT(2) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.2)) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 32) - EVT_CALL(ShowEmote, 0, EMOTE_QUESTION, -45, 20, EMOTER_POS, LVar0, LVar1, LVar2, 10) - EVT_WAIT(30) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 30) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 60) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 90) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 120) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 150) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 180) - EVT_THREAD - EVT_CALL(N(func_802A123C_71E88C)) - EVT_END_THREAD - EVT_CALL(InitTargetIterator) - EVT_THREAD - EVT_WAIT(40) - EVT_CALL(N(func_802A1740_71ED90)) - EVT_CALL(N(func_802A1848_71EE98)) - EVT_END_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(8) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Flail, ANIM_Mario1_Flail, ANIM_Mario1_Fall) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.8)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 15, 0, 0) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 150) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 120) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 90) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 60) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 30) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 0) - EVT_END_THREAD - EVT_WAIT(40) - EVT_CALL(CreateVirtualEntity, LVarA, EVT_PTR(N(modelCommandList))) - EVT_SET(LVar7, -200) - EVT_SET(LVar8, 0) - EVT_SET(LVar9, 0) - EVT_CALL(SetVirtualEntityPosition, LVarA, LVar7, LVar8, LVar9) - EVT_CALL(SetVirtualEntityScale, LVarA, EVT_FLOAT(0.711), EVT_FLOAT(0.711), EVT_FLOAT(0.711)) - EVT_CALL(SetVirtualEntityMoveSpeed, LVarA, EVT_FLOAT(7.0)) - EVT_CALL(SetVirtualEntityJumpGravity, LVarA, EVT_FLOAT(1.4)) - EVT_CALL(SetOwnerTarget, ACTOR_PLAYER, 0) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 60) - EVT_CALL(VirtualEntityMoveTo, LVarA, LVar0, LVar1, LVar2, 0) - EVT_CALL(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_BLOCK) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_VacantStare) - EVT_CALL(SetActorScale, ACTOR_PLAYER, EVT_FLOAT(1.2), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PLAYER, EVT_FLOAT(1.3), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(3) - EVT_CALL(SetActorScale, ACTOR_PLAYER, EVT_FLOAT(1.2), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PLAYER, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 3, LVar0, LVar1, LVar2, 0, 0) - EVT_WAIT(2) - EVT_CALL(SetVirtualEntityJumpGravity, LVarA, EVT_FLOAT(1.4)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 60) - EVT_CALL(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 2, LVar0, LVar1, LVar2, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_ADD(LVar0, 20) - EVT_CALL(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 2, LVar0, LVar1, LVar2, 0, 0) - EVT_ADD(LVar0, 10) - EVT_CALL(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 2, LVar0, LVar1, LVar2, 0, 0) - EVT_WAIT(5) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 270) - EVT_CALL(VirtualEntityMoveTo, LVarA, LVar0, LVar1, LVar2, 0) - EVT_CALL(DeleteVirtualEntity, LVarA) - EVT_END_THREAD - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(ItemCheckHit, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, LVar0, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetItemPower, ITEM_SLEEPY_SHEEP, LVar0, LVar1) - EVT_CALL(MakeStatusField, LVar0, STATUS_FLAG_SLEEP, 100, LVar0) - EVT_CALL(ItemAfflictEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_STATUS_ALWAYS_HITS, LVar0, 0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_LABEL(1) - EVT_WAIT(5) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(30) - EVT_EXEC_WAIT(N(PlayerGoHome)) - EVT_RETURN - EVT_END + SetConst(LVarA, ITEM_SLEEPY_SHEEP) + ExecWait(N(UseItemWithEffect)) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, -67, -15, -5) + Call(SetBattleCamOffsetZ, 45) + Call(SetBattleCamZoom, 169) + Call(MoveBattleCamOver, 50) + Thread + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_SHEEP_STAMPEDE) + Loop(7) + Call(StartRumble, BTL_RUMBLE_HIT_MIN) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.25)) + Wait(2) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2)) + EndLoop + EndThread + Wait(20) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 32) + Call(ShowEmote, 0, EMOTE_QUESTION, -45, 20, EMOTER_POS, LVar0, LVar1, LVar2, 10) + Wait(30) + Call(SetActorYaw, ACTOR_PLAYER, 30) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 60) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 90) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 120) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 150) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 180) + Thread + Call(N(func_802A123C_71E88C)) + EndThread + Call(InitTargetIterator) + Thread + Wait(40) + Call(N(func_802A1740_71ED90)) + Call(N(func_802A1848_71EE98)) + EndThread + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Wait(8) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Flail, ANIM_Mario1_Flail, ANIM_Mario1_Fall) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.8)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 15, 0, 0) + Thread + Wait(5) + Call(SetActorYaw, ACTOR_PLAYER, 150) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 120) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 90) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 60) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 30) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 0) + EndThread + Wait(40) + Call(CreateVirtualEntity, LVarA, Ref(N(modelCommandList))) + Set(LVar7, -200) + Set(LVar8, 0) + Set(LVar9, 0) + Call(SetVirtualEntityPosition, LVarA, LVar7, LVar8, LVar9) + Call(SetVirtualEntityScale, LVarA, Float(0.711), Float(0.711), Float(0.711)) + Call(SetVirtualEntityMoveSpeed, LVarA, Float(7.0)) + Call(SetVirtualEntityJumpGravity, LVarA, Float(1.4)) + Call(SetOwnerTarget, ACTOR_PLAYER, 0) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Sub(LVar0, 60) + Call(VirtualEntityMoveTo, LVarA, LVar0, LVar1, LVar2, 0) + Call(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_HIT_BLOCK) + Thread + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_VacantStare) + Call(SetActorScale, ACTOR_PLAYER, Float(1.2), Float(0.9), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PLAYER, Float(1.3), Float(0.8), Float(1.0)) + Wait(3) + Call(SetActorScale, ACTOR_PLAYER, Float(1.2), Float(0.9), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PLAYER, Float(1.0), Float(1.0), Float(1.0)) + EndThread + PlayEffect(EFFECT_LANDING_DUST, 3, LVar0, LVar1, LVar2, 0, 0) + Wait(2) + Call(SetVirtualEntityJumpGravity, LVarA, Float(1.4)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 60) + Call(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 0) + PlayEffect(EFFECT_LANDING_DUST, 2, LVar0, LVar1, LVar2, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Add(LVar0, 20) + Call(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 0) + PlayEffect(EFFECT_LANDING_DUST, 2, LVar0, LVar1, LVar2, 0, 0) + Add(LVar0, 10) + Call(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 0) + PlayEffect(EFFECT_LANDING_DUST, 2, LVar0, LVar1, LVar2, 0, 0) + Wait(5) + Thread + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 270) + Call(VirtualEntityMoveTo, LVarA, LVar0, LVar1, LVar2, 0) + Call(DeleteVirtualEntity, LVarA) + EndThread + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(MoveBattleCamOver, 20) + Call(InitTargetIterator) + Label(0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(ItemCheckHit, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, LVar0, 0) + IfEq(LVar0, HIT_RESULT_MISS) + Goto(1) + EndIf + Call(GetItemPower, ITEM_SLEEPY_SHEEP, LVar0, LVar1) + Call(MakeStatusField, LVar0, STATUS_FLAG_SLEEP, 100, LVar0) + Call(ItemAfflictEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_STATUS_ALWAYS_HITS, LVar0, 0, BS_FLAGS1_TRIGGER_EVENTS) + Label(1) + Wait(5) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Wait(30) + ExecWait(N(PlayerGoHome)) + Return + End }; s32 D_802A3E88_7214D8[] = { diff --git a/src/battle/move/item/snowman_doll.c b/src/battle/move/item/snowman_doll.c index 267edd364a1..d0826652f38 100644 --- a/src/battle/move/item/snowman_doll.c +++ b/src/battle/move/item/snowman_doll.c @@ -26,71 +26,71 @@ API_CALLABLE(N(func_802A123C_71C06C)) { #include "battle/common/move/UseItem.inc.c" EvtScript N(EVS_UseItem) = { - EVT_SET_CONST(LVarA, ITEM_SNOWMAN_DOLL) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_CALL(N(FadeBackgroundDarken)) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_WINTERY_JINGLE) - EVT_THREAD - EVT_LOOP(45) - EVT_CALL(RandInt, 300, LVar0) - EVT_SUB(LVar0, 150) - EVT_SET(LVar1, 170) - EVT_CALL(RandInt, 50, LVar2) - EVT_SUB(LVar2, 25) - EVT_PLAY_EFFECT(EFFECT_SNOWFLAKE, LVar0, LVar1, LVar2, 60, 0) - EVT_WAIT(2) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(MoveBattleCamOver, 50) - EVT_WAIT(50) - EVT_PLAY_EFFECT(EFFECT_SNOWMAN_DOLL, 0, 0, 0, 20, EVT_FLOAT(1.0), 160, 0) - EVT_THREAD - EVT_WAIT(17) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_SNOWMAN_DOLL_JUMP) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_WAIT(46) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_SNOWMAN_DOLL_JUMP) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_WAIT(25) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_SNOWMAN_DOLL_JUMP) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_WAIT(25) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_SNOWMAN_DOLL_JUMP) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_WAIT(15) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_WAIT(110) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(ItemCheckHit, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, LVar0, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(N(func_802A123C_71C06C), LVar0, LVar1, LVar2) - EVT_CALL(GetItemPower, ITEM_SNOWMAN_DOLL, LVar0, LVar1) - EVT_CALL(ItemDamageEnemy, LVar0, DAMAGE_TYPE_ICE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_WAIT(5) - EVT_LABEL(1) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_WAIT(30) - EVT_CALL(N(FadeBackgroundLighten)) - EVT_EXEC_WAIT(N(PlayerGoHome)) - EVT_RETURN - EVT_END + SetConst(LVarA, ITEM_SNOWMAN_DOLL) + ExecWait(N(UseItemWithEffect)) + Call(N(FadeBackgroundDarken)) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_WINTERY_JINGLE) + Thread + Loop(45) + Call(RandInt, 300, LVar0) + Sub(LVar0, 150) + Set(LVar1, 170) + Call(RandInt, 50, LVar2) + Sub(LVar2, 25) + PlayEffect(EFFECT_SNOWFLAKE, LVar0, LVar1, LVar2, 60, 0) + Wait(2) + EndLoop + EndThread + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(MoveBattleCamOver, 50) + Wait(50) + PlayEffect(EFFECT_SNOWMAN_DOLL, 0, 0, 0, 20, Float(1.0), 160, 0) + Thread + Wait(17) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_SNOWMAN_DOLL_JUMP) + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + Wait(46) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_SNOWMAN_DOLL_JUMP) + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + Wait(25) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_SNOWMAN_DOLL_JUMP) + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + Wait(25) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_SNOWMAN_DOLL_JUMP) + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + EndThread + Wait(15) + Call(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + Wait(110) + Call(InitTargetIterator) + Label(0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(ItemCheckHit, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, LVar0, 0) + IfEq(LVar0, HIT_RESULT_MISS) + Goto(1) + EndIf + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(N(func_802A123C_71C06C), LVar0, LVar1, LVar2) + Call(GetItemPower, ITEM_SNOWMAN_DOLL, LVar0, LVar1) + Call(ItemDamageEnemy, LVar0, DAMAGE_TYPE_ICE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) + Wait(5) + Label(1) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Wait(30) + Call(N(FadeBackgroundLighten)) + ExecWait(N(PlayerGoHome)) + Return + End }; diff --git a/src/battle/move/item/stone_cap.c b/src/battle/move/item/stone_cap.c index a14b1ca358f..2a036b9c7ff 100644 --- a/src/battle/move/item/stone_cap.c +++ b/src/battle/move/item/stone_cap.c @@ -52,17 +52,17 @@ API_CALLABLE(N(func_802A123C_7217DC)) { #include "battle/common/move/UseItem.inc.c" EvtScript N(EVS_UseItem) = { - EVT_SET_CONST(LVarA, ITEM_STONE_CAP) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_CALL(PlaySound, SOUND_PUT_ON_CAP) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_AdjustCap) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Crouch) - EVT_CALL(GetItemPower, ITEM_STONE_CAP, LVar0, LVar1) - EVT_CALL(PlaySound, SOUND_BECOME_STONE) - EVT_CALL(N(func_802A123C_7217DC)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_WAIT(20) - EVT_RETURN - EVT_END + SetConst(LVarA, ITEM_STONE_CAP) + ExecWait(N(UseItemWithEffect)) + Call(PlaySound, SOUND_PUT_ON_CAP) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_AdjustCap) + Wait(30) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Crouch) + Call(GetItemPower, ITEM_STONE_CAP, LVar0, LVar1) + Call(PlaySound, SOUND_BECOME_STONE) + Call(N(func_802A123C_7217DC)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Wait(20) + Return + End }; diff --git a/src/battle/move/item/stop_watch.c b/src/battle/move/item/stop_watch.c index 94b2550ee89..768e47b5049 100644 --- a/src/battle/move/item/stop_watch.c +++ b/src/battle/move/item/stop_watch.c @@ -13,37 +13,37 @@ #include "battle/common/move/UseItem.inc.c" EvtScript N(EVS_UseItem) = { - EVT_SET_CONST(LVarA, ITEM_STOP_WATCH) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_END_THREAD - EVT_CALL(N(FadeBackgroundDarken)) - EVT_PLAY_EFFECT(EFFECT_STOP_WATCH, 0, 0, 0, 0, EVT_FLOAT(1.0), 200, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_TIME_OUT) - EVT_WAIT(200) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(ItemCheckHit, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, LVar0, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetItemPower, ITEM_STOP_WATCH, LVar0, LVar1) - EVT_CALL(MakeStatusField, LVar0, STATUS_FLAG_STOP, 100, LVar0) - EVT_CALL(ItemAfflictEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_STATUS_ALWAYS_HITS, LVar0, 0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_LABEL(1) - EVT_WAIT(5) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(N(FadeBackgroundLighten)) - EVT_EXEC_WAIT(N(PlayerGoHome)) - EVT_RETURN - EVT_END + SetConst(LVarA, ITEM_STOP_WATCH) + ExecWait(N(UseItemWithEffect)) + Thread + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + EndThread + Call(N(FadeBackgroundDarken)) + PlayEffect(EFFECT_STOP_WATCH, 0, 0, 0, 0, Float(1.0), 200, 0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_TIME_OUT) + Wait(200) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(MoveBattleCamOver, 20) + Call(InitTargetIterator) + Label(0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(ItemCheckHit, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, LVar0, 0) + IfEq(LVar0, HIT_RESULT_MISS) + Goto(1) + EndIf + Call(GetItemPower, ITEM_STOP_WATCH, LVar0, LVar1) + Call(MakeStatusField, LVar0, STATUS_FLAG_STOP, 100, LVar0) + Call(ItemAfflictEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_STATUS_ALWAYS_HITS, LVar0, 0, BS_FLAGS1_TRIGGER_EVENTS) + Label(1) + Wait(5) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Call(N(FadeBackgroundLighten)) + ExecWait(N(PlayerGoHome)) + Return + End }; diff --git a/src/battle/move/item/strange_cake.c b/src/battle/move/item/strange_cake.c index 102b6418ca3..627578f0845 100644 --- a/src/battle/move/item/strange_cake.c +++ b/src/battle/move/item/strange_cake.c @@ -270,95 +270,95 @@ extern EvtScript N(script8); extern EvtScript N(script9); EvtScript N(EVS_UseItem) = { - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar1, ITEM_KOOKY_COOKIE) - EVT_SET_CONST(LVarA, ITEM_KOOKY_COOKIE) - EVT_SET(LVar1, 0) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_EXEC_WAIT(N(EatItem)) - EVT_CALL(N(func_802A1A8C_731D8C)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_ADD(LVar1, 25) - EVT_CALL(N(SpawnFlowerRecoveryFX), LVar0, LVar1, LVar2, LVar3) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 25) - EVT_CALL(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, LVar3) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + IfEq(LVar1, ITEM_KOOKY_COOKIE) + SetConst(LVarA, ITEM_KOOKY_COOKIE) + Set(LVar1, 0) + ExecWait(N(UseItemWithEffect)) + ExecWait(N(EatItem)) + Call(N(func_802A1A8C_731D8C)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Add(LVar1, 25) + Call(N(SpawnFlowerRecoveryFX), LVar0, LVar1, LVar2, LVar3) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 25) + Call(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, LVar3) #if !VERSION_PAL - EVT_CALL(N(AddFP), LVar3) + Call(N(AddFP), LVar3) #endif - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_ThumbsUp) - EVT_WAIT(30) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(ShowRecoveryShimmer, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_UsePower) - EVT_ELSE - EVT_SET_CONST(LVarA, ITEM_STRANGE_CAKE) - EVT_SET(LVar1, 0) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_EXEC_WAIT(N(EatItem)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_UsePower) - EVT_END_IF - EVT_WAIT(10) - EVT_THREAD - EVT_WAIT(220) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_DING) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_MYSTERY_REEL) - EVT_CALL(N(func_802A13E4_7316E4)) - EVT_WAIT(2) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(script7)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(script8)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(script9)) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(PlayerGoHome)) - EVT_RETURN - EVT_END + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_ThumbsUp) + Wait(30) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(ShowRecoveryShimmer, LVar0, LVar1, LVar2, LVar3) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Wait(20) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_UsePower) + Else + SetConst(LVarA, ITEM_STRANGE_CAKE) + Set(LVar1, 0) + ExecWait(N(UseItemWithEffect)) + ExecWait(N(EatItem)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_UsePower) + EndIf + Wait(10) + Thread + Wait(220) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_DING) + EndThread + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_MYSTERY_REEL) + Call(N(func_802A13E4_7316E4)) + Wait(2) + Switch(LVar0) + CaseEq(0) + ExecWait(N(script7)) + CaseEq(1) + ExecWait(N(script8)) + CaseEq(2) + ExecWait(N(script9)) + EndSwitch + ExecWait(N(PlayerGoHome)) + Return + End }; EvtScript N(script7) = { - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 30, 0) - EVT_CALL(N(func_802A1AD8_731DD8)) - EVT_WAIT(20) - EVT_CALL(ShowMessageBox, BTL_MSG_PLAYER_CHARGED, 60) - EVT_CALL(WaitForMessageBoxDone) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 20) + PlayEffect(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, Float(1.0), 30, 0) + Call(N(func_802A1AD8_731DD8)) + Wait(20) + Call(ShowMessageBox, BTL_MSG_PLAYER_CHARGED, 60) + Call(WaitForMessageBoxDone) + Return + End }; EvtScript N(script8) = { - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 6, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 30, 0) - EVT_CALL(N(func_802A1B14_731E14)) - EVT_WAIT(20) - EVT_CALL(ShowMessageBox, BTL_MSG_PLAYER_TRANSPARENT, 60) - EVT_CALL(WaitForMessageBoxDone) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 20) + PlayEffect(EFFECT_RADIAL_SHIMMER, 6, LVar0, LVar1, LVar2, Float(1.0), 30, 0) + Call(N(func_802A1B14_731E14)) + Wait(20) + Call(ShowMessageBox, BTL_MSG_PLAYER_TRANSPARENT, 60) + Call(WaitForMessageBoxDone) + Return + End }; EvtScript N(script9) = { - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Sleep) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_EXEC(EVS_PlaySleepHitFX) - EVT_CALL(N(func_802A1B68_731E68)) - EVT_WAIT(20) - EVT_CALL(ShowMessageBox, BTL_MSG_PLAYER_ASLEEP, 60) - EVT_CALL(WaitForMessageBoxDone) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Sleep) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Exec(EVS_PlaySleepHitFX) + Call(N(func_802A1B68_731E68)) + Wait(20) + Call(ShowMessageBox, BTL_MSG_PLAYER_ASLEEP, 60) + Call(WaitForMessageBoxDone) + Return + End }; diff --git a/src/battle/move/item/super_soda.c b/src/battle/move/item/super_soda.c index a099ba5c7ae..fc1e7a75946 100644 --- a/src/battle/move/item/super_soda.c +++ b/src/battle/move/item/super_soda.c @@ -95,118 +95,118 @@ API_CALLABLE(N(SpawnFlowerRecoveryFX)) { #include "battle/common/move/UseItem.inc.c" EvtScript N(EVS_UseOnPartner) = { - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 30) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 60) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 90) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 120) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 150) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 180) - EVT_WAIT(10) - EVT_SET(LVar1, LVarF) - EVT_EXEC_WAIT(N(UseItem)) - EVT_SET(LVarE, LVarA) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Throw) - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_CALL(CreateVirtualEntity, LVarA, EVT_PTR(EMS_StarIcon)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 0) - EVT_ADD(LVar1, 30) - EVT_ADD(LVar2, 5) - EVT_CALL(SetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(SetVirtualEntityFlags, LVarA, 32) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 45) - EVT_CALL(MakeItemEntity, LVarE, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVarE, LVar0) - EVT_LOOP(25) - EVT_CALL(GetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(N(func_802A123C_724F1C), LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(RemoveItemEntity, LVarE) - EVT_END_THREAD - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetBattleCamTarget, -125, 1, 0) - EVT_CALL(SetBattleCamOffsetZ, 41) - EVT_CALL(SetBattleCamZoom, 248) - EVT_CALL(MoveBattleCamOver, 25) - EVT_CALL(SetVirtualEntityJumpGravity, LVarA, EVT_FLOAT(0.4)) - EVT_ADD(LVar2, 5) - EVT_CALL(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 25) - EVT_CALL(AddBattleCamZoom, 100) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 25) - EVT_CALL(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, LVarB) - EVT_IF_GT(LVarB, 0) - EVT_CALL(N(func_802A12EC_724FCC), LVarB) - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(ShowRecoveryShimmer, LVar0, LVar1, LVar2, LVarB) - EVT_WAIT(20) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 150) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 120) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 90) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 60) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 30) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 0) - EVT_WAIT(10) - EVT_RETURN - EVT_END + Call(SetActorYaw, ACTOR_PLAYER, 30) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 60) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 90) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 120) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 150) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 180) + Wait(10) + Set(LVar1, LVarF) + ExecWait(N(UseItem)) + Set(LVarE, LVarA) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Throw) + Thread + Wait(20) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + EndThread + Call(CreateVirtualEntity, LVarA, Ref(EMS_StarIcon)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 0) + Add(LVar1, 30) + Add(LVar2, 5) + Call(SetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) + Call(SetVirtualEntityFlags, LVarA, 32) + Thread + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 45) + Call(MakeItemEntity, LVarE, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVarE, LVar0) + Loop(25) + Call(GetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) + Call(N(func_802A123C_724F1C), LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(RemoveItemEntity, LVarE) + EndThread + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetBattleCamTarget, -125, 1, 0) + Call(SetBattleCamOffsetZ, 41) + Call(SetBattleCamZoom, 248) + Call(MoveBattleCamOver, 25) + Call(SetVirtualEntityJumpGravity, LVarA, Float(0.4)) + Add(LVar2, 5) + Call(VirtualEntityJumpTo, LVarA, LVar0, LVar1, LVar2, 25) + Call(AddBattleCamZoom, 100) + Call(MoveBattleCamOver, 30) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 25) + Call(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, LVarB) + IfGt(LVarB, 0) + Call(N(func_802A12EC_724FCC), LVarB) + EndIf + Wait(30) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(ShowRecoveryShimmer, LVar0, LVar1, LVar2, LVarB) + Wait(20) + Call(SetActorYaw, ACTOR_PLAYER, 150) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 120) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 90) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 60) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 30) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 0) + Wait(10) + Return + End }; EvtScript N(EVS_UseItem) = { - EVT_SET_CONST(LVarA, ITEM_SUPER_SODA) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_CALL(InitTargetIterator) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_IF_EQ(LVar0, ACTOR_PLAYER) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_EAT_OR_DRINK) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Drink) - EVT_WAIT(45) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 0) - EVT_ADD(LVar1, 35) - EVT_CALL(N(SpawnFlowerRecoveryFX), LVar0, LVar1, LVar2, 5) - EVT_CALL(N(AddFP), 5) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 25) - EVT_CALL(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, 5) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_ThumbsUp) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(ShowRecoveryShimmer, LVar0, LVar1, LVar2, 5) - EVT_CALL(InitTargetIterator) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(N(func_802A1378_725058), 0) - EVT_WAIT(20) - EVT_ELSE - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 0) - EVT_SET(LVarF, 0) - EVT_EXEC_WAIT(N(EVS_UseOnPartner)) - EVT_END_IF - EVT_EXEC_WAIT(N(PlayerGoHome)) - EVT_RETURN - EVT_END + SetConst(LVarA, ITEM_SUPER_SODA) + ExecWait(N(UseItemWithEffect)) + Call(InitTargetIterator) + Call(GetOwnerTarget, LVar0, LVar1) + IfEq(LVar0, ACTOR_PLAYER) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_EAT_OR_DRINK) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Drink) + Wait(45) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 0) + Add(LVar1, 35) + Call(N(SpawnFlowerRecoveryFX), LVar0, LVar1, LVar2, 5) + Call(N(AddFP), 5) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 25) + Call(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, 5) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_ThumbsUp) + Wait(30) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(ShowRecoveryShimmer, LVar0, LVar1, LVar2, 5) + Call(InitTargetIterator) + Call(GetOwnerTarget, LVar0, LVar1) + Call(N(func_802A1378_725058), 0) + Wait(20) + Else + Set(LVarB, 0) + Set(LVarC, 0) + Set(LVarF, 0) + ExecWait(N(EVS_UseOnPartner)) + EndIf + ExecWait(N(PlayerGoHome)) + Return + End }; diff --git a/src/battle/move/item/tasty_tonic.c b/src/battle/move/item/tasty_tonic.c index 8b44b5d0b72..8d299595066 100644 --- a/src/battle/move/item/tasty_tonic.c +++ b/src/battle/move/item/tasty_tonic.c @@ -37,41 +37,41 @@ API_CALLABLE(N(func_802A123C_72223C)) { #include "battle/common/move/UseItem.inc.c" EvtScript N(EVS_UseItem) = { - EVT_SET_CONST(LVarA, ITEM_TASTY_TONIC) - EVT_EXEC_WAIT(battle_item_tasty_tonic_UseItemWithEffect) - EVT_CALL(InitTargetIterator) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_IF_EQ(LVar0, 0) - EVT_EXEC_WAIT(battle_item_tasty_tonic_DrinkItem) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 25) - EVT_ADD(LVar2, 5) - EVT_CALL(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, 10) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_ThumbsUp) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 5) - EVT_CALL(ShowRecoveryShimmer, LVar0, LVar1, LVar2, 10) - EVT_CALL(battle_item_tasty_tonic_func_802A123C_72223C, 0) - EVT_WAIT(20) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 25) - EVT_ADD(LVar2, 5) - EVT_CALL(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, 5) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_WAIT(30) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 5) - EVT_CALL(ShowRecoveryShimmer, LVar0, LVar1, LVar2, 5) - EVT_CALL(battle_item_tasty_tonic_func_802A123C_72223C, 256) - EVT_WAIT(20) - EVT_END_IF - EVT_EXEC_WAIT(battle_item_tasty_tonic_PlayerGoHome) - EVT_RETURN - EVT_END + SetConst(LVarA, ITEM_TASTY_TONIC) + ExecWait(battle_item_tasty_tonic_UseItemWithEffect) + Call(InitTargetIterator) + Call(GetOwnerTarget, LVar0, LVar1) + IfEq(LVar0, 0) + ExecWait(battle_item_tasty_tonic_DrinkItem) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 25) + Add(LVar2, 5) + Call(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, 10) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_ThumbsUp) + Wait(30) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar2, 5) + Call(ShowRecoveryShimmer, LVar0, LVar1, LVar2, 10) + Call(battle_item_tasty_tonic_func_802A123C_72223C, 0) + Wait(20) + Else + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 25) + Add(LVar2, 5) + Call(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, 5) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Wait(30) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar2, 5) + Call(ShowRecoveryShimmer, LVar0, LVar1, LVar2, 5) + Call(battle_item_tasty_tonic_func_802A123C_72223C, 256) + Wait(20) + EndIf + ExecWait(battle_item_tasty_tonic_PlayerGoHome) + Return + End }; diff --git a/src/battle/move/item/thunder_bolt.c b/src/battle/move/item/thunder_bolt.c index 8deb10da124..26c61df3f05 100644 --- a/src/battle/move/item/thunder_bolt.c +++ b/src/battle/move/item/thunder_bolt.c @@ -42,36 +42,36 @@ API_CALLABLE(N(SpawnLightningFX)) { #include "battle/common/move/UseItem.inc.c" EvtScript N(EVS_UseItem) = { - EVT_SET_CONST(LVarA, ITEM_THUNDER_BOLT) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_END_THREAD - EVT_CALL(N(FadeBackgroundDarken)) - EVT_CALL(PlaySound, SOUND_THUNDER_BOLT) - EVT_WAIT(10) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(ItemCheckHit, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, LVar0, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(N(SpawnLightningFX)) - EVT_WAIT(5) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_CALL(GetItemPower, ITEM_THUNDER_RAGE, LVar0, LVar1) - EVT_CALL(ItemDamageEnemy, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_LABEL(1) - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_WAIT(30) - EVT_CALL(N(FadeBackgroundLighten)) - EVT_EXEC_WAIT(N(PlayerGoHome)) - EVT_RETURN - EVT_END + SetConst(LVarA, ITEM_THUNDER_BOLT) + ExecWait(N(UseItemWithEffect)) + Thread + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + EndThread + Call(N(FadeBackgroundDarken)) + Call(PlaySound, SOUND_THUNDER_BOLT) + Wait(10) + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_SELF) + Call(ItemCheckHit, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, LVar0, 0) + IfEq(LVar0, HIT_RESULT_MISS) + Goto(1) + EndIf + Call(N(SpawnLightningFX)) + Wait(5) + Call(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + Call(GetItemPower, ITEM_THUNDER_RAGE, LVar0, LVar1) + Call(ItemDamageEnemy, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) + Label(1) + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(MoveBattleCamOver, 20) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Wait(30) + Call(N(FadeBackgroundLighten)) + ExecWait(N(PlayerGoHome)) + Return + End }; diff --git a/src/battle/move/item/thunder_rage.c b/src/battle/move/item/thunder_rage.c index 4ae64fcc142..9dcd693769c 100644 --- a/src/battle/move/item/thunder_rage.c +++ b/src/battle/move/item/thunder_rage.c @@ -42,42 +42,42 @@ API_CALLABLE(N(SpawnLightningFX)) { #include "battle/common/move/UseItem.inc.c" EvtScript N(EVS_UseItem) = { - EVT_SET_CONST(LVarA, ITEM_THUNDER_RAGE) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_CHILD_THREAD - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_END_CHILD_THREAD - EVT_CALL(N(FadeBackgroundDarken)) - EVT_CALL(PlaySound, SOUND_THUNDER_BOLT) - EVT_WAIT(10) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(ItemCheckHit, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, LVar0, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(N(SpawnLightningFX)) - EVT_WAIT(5) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetItemPower, ITEM_THUNDER_RAGE, LVar0, LVar1) - EVT_CALL(ItemDamageEnemy, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_LABEL(1) - EVT_WAIT(5) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_WAIT(30) - EVT_CALL(N(FadeBackgroundLighten)) - EVT_EXEC_WAIT(N(PlayerGoHome)) - EVT_RETURN - EVT_END + SetConst(LVarA, ITEM_THUNDER_RAGE) + ExecWait(N(UseItemWithEffect)) + ChildThread + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + EndChildThread + Call(N(FadeBackgroundDarken)) + Call(PlaySound, SOUND_THUNDER_BOLT) + Wait(10) + Call(InitTargetIterator) + Label(0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(ItemCheckHit, LVar0, DAMAGE_TYPE_NO_CONTACT, 0, LVar0, 0) + IfEq(LVar0, HIT_RESULT_MISS) + Goto(1) + EndIf + Call(N(SpawnLightningFX)) + Wait(5) + Call(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetItemPower, ITEM_THUNDER_RAGE, LVar0, LVar1) + Call(ItemDamageEnemy, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) + Label(1) + Wait(5) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(MoveBattleCamOver, 20) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Wait(30) + Call(N(FadeBackgroundLighten)) + ExecWait(N(PlayerGoHome)) + Return + End }; diff --git a/src/battle/move/item/ultra_shroom.c b/src/battle/move/item/ultra_shroom.c index 66fb1555cd8..8dd8c155f7a 100644 --- a/src/battle/move/item/ultra_shroom.c +++ b/src/battle/move/item/ultra_shroom.c @@ -31,29 +31,29 @@ API_CALLABLE(N(HealPlayer10)) { #include "battle/common/move/UseItem.inc.c" EvtScript N(EVS_UseItem) = { - EVT_SET_CONST(LVarA, ITEM_SUPER_SHROOM) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_CALL(AddBattleCamZoom, 50) - EVT_CALL(MoveBattleCamOver, 20) - EVT_EXEC_WAIT(N(EatItem)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 0) - EVT_ADD(LVar1, 35) - EVT_CALL(N(SpawnHeartRecoveryFX), LVar0, LVar1, LVar2, 10) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 25) - EVT_ADD(LVar2, 5) - EVT_CALL(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, 10) - EVT_CALL(N(HealPlayer10)) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_ThumbsUp) - EVT_WAIT(30) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 5) - EVT_CALL(ShowRecoveryShimmer, LVar0, LVar1, LVar2, 10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(PlayerGoHome)) - EVT_RETURN - EVT_END + SetConst(LVarA, ITEM_SUPER_SHROOM) + ExecWait(N(UseItemWithEffect)) + Call(AddBattleCamZoom, 50) + Call(MoveBattleCamOver, 20) + ExecWait(N(EatItem)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 0) + Add(LVar1, 35) + Call(N(SpawnHeartRecoveryFX), LVar0, LVar1, LVar2, 10) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 25) + Add(LVar2, 5) + Call(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, 10) + Call(N(HealPlayer10)) + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_ThumbsUp) + Wait(30) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar2, 5) + Call(ShowRecoveryShimmer, LVar0, LVar1, LVar2, 10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Wait(20) + ExecWait(N(PlayerGoHome)) + Return + End }; diff --git a/src/battle/move/item/unknown_item.c b/src/battle/move/item/unknown_item.c index 32ab3ca10df..861cb2c31dc 100644 --- a/src/battle/move/item/unknown_item.c +++ b/src/battle/move/item/unknown_item.c @@ -31,27 +31,27 @@ API_CALLABLE(N(HealPlayer20)) { #include "battle/common/move/UseItem.inc.c" EvtScript N(EVS_UseItem) = { - EVT_SET_CONST(LVarA, ITEM_ULTRA_SHROOM) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_EXEC_WAIT(N(EatItem)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 0) - EVT_ADD(LVar1, 35) - EVT_CALL(N(SpawnHeartRecoveryFX), LVar0, LVar1, LVar2, 20) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 25) - EVT_ADD(LVar2, 5) - EVT_CALL(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, 20) - EVT_CALL(N(HealPlayer20)) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_ThumbsUp) - EVT_WAIT(30) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 5) - EVT_CALL(ShowRecoveryShimmer, LVar0, LVar1, LVar2, 20) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(PlayerGoHome)) - EVT_RETURN - EVT_END + SetConst(LVarA, ITEM_ULTRA_SHROOM) + ExecWait(N(UseItemWithEffect)) + ExecWait(N(EatItem)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 0) + Add(LVar1, 35) + Call(N(SpawnHeartRecoveryFX), LVar0, LVar1, LVar2, 20) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 25) + Add(LVar2, 5) + Call(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, 20) + Call(N(HealPlayer20)) + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_ThumbsUp) + Wait(30) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar2, 5) + Call(ShowRecoveryShimmer, LVar0, LVar1, LVar2, 20) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Wait(20) + ExecWait(N(PlayerGoHome)) + Return + End }; diff --git a/src/battle/move/item/volt_shroom.c b/src/battle/move/item/volt_shroom.c index e9fe811c264..d3206426ff5 100644 --- a/src/battle/move/item/volt_shroom.c +++ b/src/battle/move/item/volt_shroom.c @@ -19,24 +19,24 @@ API_CALLABLE(N(func_802A123C_71AA2C)) { #include "battle/common/move/UseItem.inc.c" EvtScript N(EVS_UseItem) = { - EVT_SET_CONST(LVarA, ITEM_VOLT_SHROOM) - EVT_EXEC_WAIT(N(UseItemWithEffect)) - EVT_EXEC_WAIT(N(EatItem)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SET(LVar3, 20) - EVT_CALL(MultiplyByActorScale, LVar3) - EVT_ADD(LVar1, LVar3) - EVT_SETF(LVar3, EVT_FLOAT(1.0)) - EVT_CALL(MultiplyByActorScale, LVar3) - EVT_PLAY_EFFECT(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, LVar3, 30, 0) - EVT_CALL(PlaySound, SOUND_VOLT_SHROOM_APPLY) - EVT_CALL(GetItemPower, ITEM_VOLT_SHROOM, LVar0, LVar1) - EVT_CALL(N(func_802A123C_71AA2C)) - EVT_WAIT(20) - EVT_CALL(ShowMessageBox, BTL_MSG_PLAYER_CHARGED, 60) - EVT_CALL(WaitForMessageBoxDone) - EVT_EXEC_WAIT(N(PlayerGoHome)) - EVT_RETURN - EVT_END + SetConst(LVarA, ITEM_VOLT_SHROOM) + ExecWait(N(UseItemWithEffect)) + ExecWait(N(EatItem)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Set(LVar3, 20) + Call(MultiplyByActorScale, LVar3) + Add(LVar1, LVar3) + SetF(LVar3, Float(1.0)) + Call(MultiplyByActorScale, LVar3) + PlayEffect(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, LVar3, 30, 0) + Call(PlaySound, SOUND_VOLT_SHROOM_APPLY) + Call(GetItemPower, ITEM_VOLT_SHROOM, LVar0, LVar1) + Call(N(func_802A123C_71AA2C)) + Wait(20) + Call(ShowMessageBox, BTL_MSG_PLAYER_CHARGED, 60) + Call(WaitForMessageBoxDone) + ExecWait(N(PlayerGoHome)) + Return + End }; diff --git a/src/battle/move/jump/attack.c b/src/battle/move/jump/attack.c index 1cf645b261a..abb20d71491 100644 --- a/src/battle/move/jump/attack.c +++ b/src/battle/move/jump/attack.c @@ -31,198 +31,198 @@ extern EvtScript N(EVS_UseMove_Ultra); extern EvtScript N(EVS_UseMove_Tutorial); EvtScript N(EVS_UseMove) = { - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(GetBattleFlags2, LVar0) - EVT_IF_FLAG(LVar0, BS_FLAGS2_DOING_JUMP_TUTORIAL) - EVT_EXEC_WAIT(N(EVS_UseMove_Tutorial)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_UseMove_Normal)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_UseMove_Super)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_UseMove_Ultra)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(ShowActionHud, TRUE) + Call(GetBattleFlags2, LVar0) + IfFlag(LVar0, BS_FLAGS2_DOING_JUMP_TUTORIAL) + ExecWait(N(EVS_UseMove_Tutorial)) + Return + EndIf + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_UseMove_Normal)) + CaseEq(1) + ExecWait(N(EVS_UseMove_Super)) + CaseEq(2) + ExecWait(N(EVS_UseMove_Ultra)) + EndSwitch + Return + End }; EvtScript N(EVS_UseMove_Normal) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(GetActionCommandMode, LVar0) - EVT_IF_EQ(LVar0, ACTION_COMMAND_MODE_TUTORIAL) - EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL_WAIT_INPUT) - EVT_LOOP(0) - EVT_CALL(GetActionCommandMode, LVar0) - EVT_IF_LT(LVar0, ACTION_COMMAND_MODE_TUTORIAL) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_IF - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActionCommandMode, LVar0) - EVT_IF_GT(LVar0, ACTION_COMMAND_MODE_NOT_LEARNED) - EVT_WAIT(1) - EVT_END_IF - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(GetActionCommandMode, LVar0) + IfEq(LVar0, ACTION_COMMAND_MODE_TUTORIAL) + Call(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL_WAIT_INPUT) + Loop(0) + Call(GetActionCommandMode, LVar0) + IfLt(LVar0, ACTION_COMMAND_MODE_TUTORIAL) + BreakLoop + EndIf + Wait(1) + EndLoop + EndIf + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Call(GetActionCommandMode, LVar0) + IfGt(LVar0, ACTION_COMMAND_MODE_NOT_LEARNED) + Wait(1) + EndIf + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) // missed action command, end the script here - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) // successful action command, continue with script - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_27) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(GetActionResult, LVarF) - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(ShowActionHud, FALSE) - EVT_CALL(action_command_jump_start, 24, 3) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_SpinFall) - EVT_CALL(func_80274A18, 24, 3) - EVT_WAIT(1) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_CALL(SetActionResult, LVarF) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END + EndCaseGroup + EndSwitch + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_27) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(GetActionResult, LVarF) + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(ShowActionHud, FALSE) + Call(action_command_jump_start, 24, 3) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_SpinFall) + Call(func_80274A18, 24, 3) + Wait(1) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + Call(SetActionResult, LVarF) + ExecWait(N(EVS_JumpSupport_E)) + Return + End }; EvtScript N(EVS_UseMove_Super) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActionResult, LVarF) - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_27) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(ShowActionHud, FALSE) - EVT_CALL(action_command_jump_start, 37, 3) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump) - EVT_CALL(func_802752AC, 20, 4) - EVT_WAIT(7) - EVT_CALL(func_802752AC, 3, 5) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_RESET) - EVT_WAIT(1) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_CALL(SetActionResult, LVarF) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + Call(GetActionResult, LVarF) + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_27) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(ShowActionHud, FALSE) + Call(action_command_jump_start, 37, 3) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump) + Call(func_802752AC, 20, 4) + Wait(7) + Call(func_802752AC, 3, 5) + Call(EnablePlayerBlur, ACTOR_BLUR_RESET) + Wait(1) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + Call(SetActionResult, LVarF) + ExecWait(N(EVS_JumpSupport_E)) + Return + End }; EvtScript N(EVS_UseMove_Ultra) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActionResult, LVarF) - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_28) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(ShowActionHud, FALSE) - EVT_CALL(action_command_jump_start, 25, 3) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_SpinFall) - EVT_CALL(func_80275F00, 25, 4) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_RESET) - EVT_WAIT(1) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_CALL(SetActionResult, LVarF) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + Call(GetActionResult, LVarF) + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_28) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(ShowActionHud, FALSE) + Call(action_command_jump_start, 25, 3) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_SpinFall) + Call(func_80275F00, 25, 4) + Call(EnablePlayerBlur, ACTOR_BLUR_RESET) + Wait(1) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + Call(SetActionResult, LVarF) + ExecWait(N(EVS_JumpSupport_E)) + Return + End }; extern EvtScript N(EVS_FirstStrike_Normal); @@ -230,91 +230,91 @@ extern EvtScript N(EVS_FirstStrike_Super); extern EvtScript N(EVS_FirstStrike_Ultra); EvtScript N(EVS_FirstStrike) = { - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_FirstStrike_Normal)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_FirstStrike_Super)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_FirstStrike_Ultra)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(ShowActionHud, TRUE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_FirstStrike_Normal)) + CaseEq(1) + ExecWait(N(EVS_FirstStrike_Super)) + CaseEq(2) + ExecWait(N(EVS_FirstStrike_Ultra)) + EndSwitch + Return + End }; EvtScript N(EVS_FirstStrike_Normal) = { - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(GetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 40) - EVT_SET(LVar4, 40) - EVT_CALL(SetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPresetImmediately, BTL_CAM_PRESET_34) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) - EVT_SUB(LVar0, LVar3) - EVT_SUB(LVar0, 20) - EVT_DIVF(LVar0, EVT_FLOAT(10.588)) - EVT_ADDF(LVar0, 15) - EVT_SET(LVarA, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_MarioB1_Stomp) - EVT_CALL(func_80274A18, LVarA, 0) - EVT_CALL(N(GetJumpDamage)) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(GetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) + Sub(LVar3, 40) + Set(LVar4, 40) + Call(SetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPresetImmediately, BTL_CAM_PRESET_34) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) + Sub(LVar0, LVar3) + Sub(LVar0, 20) + DivF(LVar0, Float(10.588)) + AddF(LVar0, 15) + Set(LVarA, LVar0) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.0)) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_MarioB1_Stomp) + Call(func_80274A18, LVarA, 0) + Call(N(GetJumpDamage)) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + ExecWait(N(EVS_JumpSupport_E)) + Return + End }; EvtScript N(EVS_FirstStrike_Super) = { - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(GetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 40) - EVT_SET(LVar4, 40) - EVT_CALL(SetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_EXEC_WAIT(N(EVS_JumpSupport_C)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_37) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump) - EVT_CALL(func_802752AC, LVarA, 0) - EVT_WAIT(7) - EVT_CALL(func_802752AC, 3, 1) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPresetImmediately, BTL_CAM_PRESET_34) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 4, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(GetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) + Sub(LVar3, 40) + Set(LVar4, 40) + Call(SetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) + Call(SetGoalToTarget, ACTOR_PLAYER) + ExecWait(N(EVS_JumpSupport_C)) + Call(UseBattleCamPreset, BTL_CAM_PRESET_37) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump) + Call(func_802752AC, LVarA, 0) + Wait(7) + Call(func_802752AC, 3, 1) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPresetImmediately, BTL_CAM_PRESET_34) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 4, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + ExecWait(N(EVS_JumpSupport_E)) + Return + End }; EvtScript N(EVS_FirstStrike_Ultra) = { - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(GetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, 40) - EVT_SET(LVar4, 40) - EVT_CALL(SetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_EXEC_WAIT(N(EVS_JumpSupport_D)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_38) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_MarioB1_Stomp) - EVT_CALL(func_80275F00, LVarA, 0) - EVT_SET(LVarA, 4) - EVT_CALL(func_80275F00, LVarA, 1) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 6, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(GetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) + Sub(LVar3, 40) + Set(LVar4, 40) + Call(SetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) + Call(SetGoalToTarget, ACTOR_PLAYER) + ExecWait(N(EVS_JumpSupport_D)) + Call(UseBattleCamPreset, BTL_CAM_PRESET_38) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_MarioB1_Stomp) + Call(func_80275F00, LVarA, 0) + Set(LVarA, 4) + Call(func_80275F00, LVarA, 1) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 6, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + ExecWait(N(EVS_JumpSupport_E)) + Return + End }; extern EvtScript N(EVS_UseBerserker_Normal); @@ -322,251 +322,251 @@ extern EvtScript N(EVS_UseBerserker_Super); extern EvtScript N(EVS_UseBerserker_Ultra); EvtScript N(EVS_UseBerserker) = { - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_UseBerserker_Normal)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_UseBerserker_Super)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_UseBerserker_Ultra)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(ShowActionHud, TRUE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_UseBerserker_Normal)) + CaseEq(1) + ExecWait(N(EVS_UseBerserker_Super)) + CaseEq(2) + ExecWait(N(EVS_UseBerserker_Ultra)) + EndSwitch + Return + End }; EvtScript N(EVS_UseBerserker_Normal) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_27) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(GetActionResult, LVarF) - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(ShowActionHud, FALSE) - EVT_CALL(action_command_jump_start, 24, 3) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_SpinFall) - EVT_CALL(func_80274A18, 24, 3) - EVT_WAIT(1) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_CALL(SetActionResult, LVarF) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_27) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(GetActionResult, LVarF) + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(ShowActionHud, FALSE) + Call(action_command_jump_start, 24, 3) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_SpinFall) + Call(func_80274A18, 24, 3) + Wait(1) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + Call(SetActionResult, LVarF) + ExecWait(N(EVS_JumpSupport_E)) + Return + End }; EvtScript N(EVS_UseBerserker_Super) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActionResult, LVarF) - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_27) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(ShowActionHud, FALSE) - EVT_CALL(action_command_jump_start, 37, 3) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump) - EVT_CALL(func_802752AC, 20, 4) - EVT_WAIT(7) - EVT_CALL(func_802752AC, 3, 5) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_RESET) - EVT_WAIT(1) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_CALL(SetActionResult, LVarF) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + Call(GetActionResult, LVarF) + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_27) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(ShowActionHud, FALSE) + Call(action_command_jump_start, 37, 3) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump) + Call(func_802752AC, 20, 4) + Wait(7) + Call(func_802752AC, 3, 5) + Call(EnablePlayerBlur, ACTOR_BLUR_RESET) + Wait(1) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + Call(SetActionResult, LVarF) + ExecWait(N(EVS_JumpSupport_E)) + Return + End }; EvtScript N(EVS_UseBerserker_Ultra) = { - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActionResult, LVarF) - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_28) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(ShowActionHud, FALSE) - EVT_CALL(action_command_jump_start, 25, 3) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_SpinFall) - EVT_CALL(func_80275F00, 25, 4) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_RESET) - EVT_WAIT(1) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_CALL(SetActionResult, LVarF) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_PLAYER) + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + Call(GetActionResult, LVarF) + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_28) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(ShowActionHud, FALSE) + Call(action_command_jump_start, 25, 3) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_SpinFall) + Call(func_80275F00, 25, 4) + Call(EnablePlayerBlur, ACTOR_BLUR_RESET) + Wait(1) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + Call(SetActionResult, LVarF) + ExecWait(N(EVS_JumpSupport_E)) + Return + End }; EvtScript N(EVS_UseMove_Tutorial) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Approach)) - EVT_EXEC_WAIT(N(EVS_JumpSupport_B)) - EVT_CALL(action_command_jump_start, LVarA, 3) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_34) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(AddGoalPos, ACTOR_PLAYER, -5, 10, 0) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_MarioB1_Stomp) - EVT_CALL(func_80274A18, LVarA, 0) - EVT_CALL(GetActionCommandMode, LVar0) - EVT_IF_EQ(LVar0, 2) - EVT_CALL(SetActionCommandMode, 3) - EVT_LOOP(0) - EVT_CALL(GetActionCommandMode, LVar0) - EVT_IF_LT(LVar0, 2) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_IF - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActionCommandMode, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_WAIT(1) - EVT_END_IF - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_27) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(GetActionResult, LVarF) - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(ShowActionHud, FALSE) - EVT_CALL(action_command_jump_start, 24, 3) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_SpinFall) - EVT_CALL(func_80274A18, 24, 3) - EVT_WAIT(1) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_CALL(SetActionResult, LVarF) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + ExecWait(N(EVS_JumpSupport_Approach)) + ExecWait(N(EVS_JumpSupport_B)) + Call(action_command_jump_start, LVarA, 3) + Call(UseBattleCamPreset, BTL_CAM_PRESET_34) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(AddGoalPos, ACTOR_PLAYER, -5, 10, 0) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_MarioB1_Stomp) + Call(func_80274A18, LVarA, 0) + Call(GetActionCommandMode, LVar0) + IfEq(LVar0, 2) + Call(SetActionCommandMode, 3) + Loop(0) + Call(GetActionCommandMode, LVar0) + IfLt(LVar0, 2) + BreakLoop + EndIf + Wait(1) + EndLoop + EndIf + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Call(GetActionCommandMode, LVar0) + IfGt(LVar0, 0) + Wait(1) + EndIf + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_27) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(GetActionResult, LVarF) + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(ShowActionHud, FALSE) + Call(action_command_jump_start, 24, 3) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_SpinFall) + Call(func_80274A18, 24, 3) + Wait(1) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + Call(SetActionResult, LVarF) + ExecWait(N(EVS_JumpSupport_E)) + Return + End }; diff --git a/src/battle/move/jump/auto_jump.c b/src/battle/move/jump/auto_jump.c index 0698d5051b2..44990e6f690 100644 --- a/src/battle/move/jump/auto_jump.c +++ b/src/battle/move/jump/auto_jump.c @@ -12,188 +12,188 @@ extern EvtScript N(EVS_UseMove_ImplB); extern EvtScript N(EVS_UseMove_ImplC); EvtScript N(EVS_UseMove) = { - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_AUTO_SUCCEED_ACTION, TRUE) - EVT_CALL(ShowActionHud, FALSE) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_EXECUTING_MOVE, TRUE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_UseMove_ImplA)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_UseMove_ImplB)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_UseMove_ImplC)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetBattleFlagBits, BS_FLAGS1_AUTO_SUCCEED_ACTION, TRUE) + Call(ShowActionHud, FALSE) + Call(SetBattleFlagBits, BS_FLAGS1_EXECUTING_MOVE, TRUE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_UseMove_ImplA)) + CaseEq(1) + ExecWait(N(EVS_UseMove_ImplB)) + CaseEq(2) + ExecWait(N(EVS_UseMove_ImplC)) + EndSwitch + Return + End }; EvtScript N(EVS_UseMove_ImplA) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(GetActionCommandMode, LVar0) - EVT_IF_EQ(LVar0, 2) - EVT_CALL(SetActionCommandMode, 3) - EVT_LOOP(0) - EVT_CALL(GetActionCommandMode, LVar0) - EVT_IF_LT(LVar0, 2) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_IF - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_27) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(GetActionResult, LVarF) - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(ShowActionHud, FALSE) - EVT_CALL(action_command_jump_start, 24, 3) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_SpinFall) - EVT_CALL(func_80274A18, 24, 3) - EVT_WAIT(1) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_CALL(SetActionResult, LVarF) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(GetActionCommandMode, LVar0) + IfEq(LVar0, 2) + Call(SetActionCommandMode, 3) + Loop(0) + Call(GetActionCommandMode, LVar0) + IfLt(LVar0, 2) + BreakLoop + EndIf + Wait(1) + EndLoop + EndIf + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_27) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(GetActionResult, LVarF) + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(ShowActionHud, FALSE) + Call(action_command_jump_start, 24, 3) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_SpinFall) + Call(func_80274A18, 24, 3) + Wait(1) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + Call(SetActionResult, LVarF) + ExecWait(N(EVS_JumpSupport_E)) + Return + End }; EvtScript N(EVS_UseMove_ImplB) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActionResult, LVarF) - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_27) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(ShowActionHud, FALSE) - EVT_CALL(action_command_jump_start, 37, 3) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump) - EVT_CALL(func_802752AC, 20, 4) - EVT_WAIT(7) - EVT_CALL(func_802752AC, 3, 5) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE) - EVT_WAIT(1) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_CALL(SetActionResult, LVarF) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + Call(GetActionResult, LVarF) + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_27) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(ShowActionHud, FALSE) + Call(action_command_jump_start, 37, 3) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump) + Call(func_802752AC, 20, 4) + Wait(7) + Call(func_802752AC, 3, 5) + Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) + Wait(1) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + Call(SetActionResult, LVarF) + ExecWait(N(EVS_JumpSupport_E)) + Return + End }; EvtScript N(EVS_UseMove_ImplC) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActionResult, LVarF) - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_28) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(ShowActionHud, FALSE) - EVT_CALL(action_command_jump_start, 25, 3) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_SpinFall) - EVT_CALL(func_80275F00, 25, 4) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE) - EVT_WAIT(1) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_CALL(SetActionResult, LVarF) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + Call(GetActionResult, LVarF) + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_28) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(ShowActionHud, FALSE) + Call(action_command_jump_start, 25, 3) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_SpinFall) + Call(func_80275F00, 25, 4) + Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) + Wait(1) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + Call(SetActionResult, LVarF) + ExecWait(N(EVS_JumpSupport_E)) + Return + End }; diff --git a/src/battle/move/jump/auto_multibounce.c b/src/battle/move/jump/auto_multibounce.c index 0521c45d190..7044c3007eb 100644 --- a/src/battle/move/jump/auto_multibounce.c +++ b/src/battle/move/jump/auto_multibounce.c @@ -12,446 +12,446 @@ extern EvtScript N(EVS_UseMove_ImplB); extern EvtScript N(EVS_UseMove_ImplC); EvtScript N(EVS_UseMove) = { - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_AUTO_SUCCEED_ACTION, TRUE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_UseMove_ImplA)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_UseMove_ImplB)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_UseMove_ImplC)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(ShowActionHud, TRUE) + Call(SetBattleFlagBits, BS_FLAGS1_AUTO_SUCCEED_ACTION, TRUE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_UseMove_ImplA)) + CaseEq(1) + ExecWait(N(EVS_UseMove_ImplB)) + CaseEq(2) + ExecWait(N(EVS_UseMove_ImplC)) + EndSwitch + Return + End }; EvtScript N(EVS_UseMove_ImplA) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetTargetListLength, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_ELSE - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActionResult, LVarE) - EVT_ADD(LVarF, 1) - EVT_SET(LFlag0, FALSE) - EVT_LABEL(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_40) - EVT_CALL(GetTargetListLength, LVar0) - EVT_SUB(LVar0, 1) - EVT_IF_EQ(LVarF, LVar0) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(ShowActionHud, FALSE) - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_EXEC_WAIT(N(EVS_JumpSupport_B)) - EVT_ADD(LVarA, 5) - EVT_CALL(action_command_jump_start, LVarA, 3) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_SpinFall) - EVT_IF_EQ(LVarF, 1) - EVT_CALL(func_80274A18, LVarA, 3) - EVT_ELSE - EVT_CALL(func_80274A18, LVarA, 4) - EVT_END_IF - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_ELSE - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_ELSE - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_END_IF - EVT_END_SWITCH - EVT_SWITCH(LVarF) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) - EVT_CASE_EQ(3) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_CASE_DEFAULT - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_END_SWITCH - EVT_CALL(SetActionResult, LVarE) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(FALSE) - EVT_CASE_OR_EQ(2) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(TRUE) - EVT_CASE_OR_EQ(3) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_ADD(LVarF, 1) - EVT_CALL(GetTargetListLength, LVar0) - EVT_IF_GE(LVarF, LVar0) - EVT_EXEC_WAIT(N(EVS_JumpSupport_F)) - EVT_RETURN - EVT_END_IF - EVT_GOTO(10) - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Set(LFlag0, FALSE) + Call(GetTargetListLength, LVar0) + IfEq(LVar0, 1) + Set(LFlag0, TRUE) + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + IfEq(LFlag0, FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + Else + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + EndIf + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + EndCaseGroup + EndSwitch + Call(GetActionResult, LVarE) + Add(LVarF, 1) + Set(LFlag0, FALSE) + Label(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_40) + Call(GetTargetListLength, LVar0) + Sub(LVar0, 1) + IfEq(LVarF, LVar0) + Set(LFlag0, TRUE) + EndIf + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + IfEq(LFlag0, TRUE) + Call(ShowActionHud, FALSE) + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + Call(SetGoalToTarget, ACTOR_PLAYER) + ExecWait(N(EVS_JumpSupport_B)) + Add(LVarA, 5) + Call(action_command_jump_start, LVarA, 3) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_SpinFall) + IfEq(LVarF, 1) + Call(func_80274A18, LVarA, 3) + Else + Call(func_80274A18, LVarA, 4) + EndIf + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + IfEq(LFlag0, FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + Else + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + EndIf + CaseDefault + IfEq(LFlag0, FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + Else + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + EndIf + EndSwitch + Switch(LVarF) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) + CaseEq(3) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + CaseDefault + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + EndSwitch + Call(SetActionResult, LVarE) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseOrEq(FALSE) + CaseOrEq(2) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(TRUE) + CaseOrEq(3) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + EndCaseGroup + EndSwitch + Add(LVarF, 1) + Call(GetTargetListLength, LVar0) + IfGe(LVarF, LVar0) + ExecWait(N(EVS_JumpSupport_F)) + Return + EndIf + Goto(10) + Return + End }; EvtScript N(EVS_UseMove_ImplB) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetTargetListLength, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_ELSE - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActionResult, LVarE) - EVT_SET(LFlag0, FALSE) - EVT_SET(LVarF, 0) - EVT_ADD(LVarF, 1) - EVT_LABEL(10) - EVT_CALL(GetTargetListLength, LVar0) - EVT_SUB(LVar0, 1) - EVT_IF_EQ(LVarF, LVar0) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(ShowActionHud, FALSE) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_40) - EVT_CALL(action_command_jump_start, 37, 3) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_IF_EQ(LVarF, 1) - EVT_CALL(func_802752AC, 20, 3) - EVT_WAIT(7) - EVT_CALL(func_802752AC, 3, 6) - EVT_ELSE - EVT_CALL(func_802752AC, 20, 4) - EVT_WAIT(7) - EVT_CALL(func_802752AC, 3, 5) - EVT_END_IF - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_ELSE - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_ELSE - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_END_IF - EVT_END_SWITCH - EVT_SWITCH(LVarF) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) - EVT_CASE_EQ(3) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_CASE_DEFAULT - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_END_SWITCH - EVT_CALL(SetActionResult, LVarE) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(FALSE) - EVT_CASE_OR_EQ(2) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(TRUE) - EVT_CASE_OR_EQ(3) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_ADD(LVarF, 1) - EVT_CALL(GetTargetListLength, LVar0) - EVT_IF_GE(LVarF, LVar0) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_IF - EVT_GOTO(10) - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Set(LFlag0, FALSE) + Call(GetTargetListLength, LVar0) + IfEq(LVar0, 1) + Set(LFlag0, TRUE) + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + IfEq(LFlag0, FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + Else + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + EndIf + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + EndCaseGroup + EndSwitch + Call(GetActionResult, LVarE) + Set(LFlag0, FALSE) + Set(LVarF, 0) + Add(LVarF, 1) + Label(10) + Call(GetTargetListLength, LVar0) + Sub(LVar0, 1) + IfEq(LVarF, LVar0) + Set(LFlag0, TRUE) + EndIf + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + IfEq(LFlag0, TRUE) + Call(ShowActionHud, FALSE) + EndIf + Call(UseBattleCamPreset, BTL_CAM_PRESET_40) + Call(action_command_jump_start, 37, 3) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump) + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + IfEq(LVarF, 1) + Call(func_802752AC, 20, 3) + Wait(7) + Call(func_802752AC, 3, 6) + Else + Call(func_802752AC, 20, 4) + Wait(7) + Call(func_802752AC, 3, 5) + EndIf + Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + IfEq(LFlag0, FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + Else + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + EndIf + CaseDefault + IfEq(LFlag0, FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + Else + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + EndIf + EndSwitch + Switch(LVarF) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) + CaseEq(3) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + CaseDefault + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + EndSwitch + Call(SetActionResult, LVarE) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseOrEq(FALSE) + CaseOrEq(2) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(TRUE) + CaseOrEq(3) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + EndCaseGroup + EndSwitch + Add(LVarF, 1) + Call(GetTargetListLength, LVar0) + IfGe(LVarF, LVar0) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndIf + Goto(10) + Return + End }; EvtScript N(EVS_UseMove_ImplC) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetTargetListLength, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_ELSE - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActionResult, LVarE) - EVT_SET(LFlag0, FALSE) - EVT_SET(LVarF, 0) - EVT_ADD(LVarF, 1) - EVT_LABEL(20) - EVT_CALL(GetTargetListLength, LVar0) - EVT_SUB(LVar0, 1) - EVT_IF_EQ(LVarF, LVar0) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(ShowActionHud, FALSE) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_40) - EVT_CALL(action_command_jump_start, 25, 3) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_SpinFall) - EVT_IF_EQ(LVarF, 1) - EVT_CALL(func_80275F00, 25, 2) - EVT_ELSE - EVT_CALL(func_80275F00, 25, 4) - EVT_END_IF - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_ELSE - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_ELSE - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_END_IF - EVT_END_SWITCH - EVT_SWITCH(LVarF) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) - EVT_CASE_EQ(3) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_CASE_DEFAULT - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_END_SWITCH - EVT_CALL(SetActionResult, LVarE) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(FALSE) - EVT_CASE_OR_EQ(2) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(TRUE) - EVT_CASE_OR_EQ(3) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_ADD(LVarF, 1) - EVT_CALL(GetTargetListLength, LVar0) - EVT_IF_GE(LVarF, LVar0) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_IF - EVT_GOTO(20) - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Set(LFlag0, FALSE) + Call(GetTargetListLength, LVar0) + IfEq(LVar0, 1) + Set(LFlag0, TRUE) + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + IfEq(LFlag0, FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + Else + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + EndIf + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + EndCaseGroup + EndSwitch + Call(GetActionResult, LVarE) + Set(LFlag0, FALSE) + Set(LVarF, 0) + Add(LVarF, 1) + Label(20) + Call(GetTargetListLength, LVar0) + Sub(LVar0, 1) + IfEq(LVarF, LVar0) + Set(LFlag0, TRUE) + EndIf + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + IfEq(LFlag0, TRUE) + Call(ShowActionHud, FALSE) + EndIf + Call(UseBattleCamPreset, BTL_CAM_PRESET_40) + Call(action_command_jump_start, 25, 3) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_SpinFall) + IfEq(LVarF, 1) + Call(func_80275F00, 25, 2) + Else + Call(func_80275F00, 25, 4) + EndIf + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + IfEq(LFlag0, FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + Else + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + EndIf + CaseDefault + IfEq(LFlag0, FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + Else + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + EndIf + EndSwitch + Switch(LVarF) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) + CaseEq(3) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + CaseDefault + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + EndSwitch + Call(SetActionResult, LVarE) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseOrEq(FALSE) + CaseOrEq(2) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(TRUE) + CaseOrEq(3) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + EndCaseGroup + EndSwitch + Add(LVarF, 1) + Call(GetTargetListLength, LVar0) + IfGe(LVarF, LVar0) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndIf + Goto(20) + Return + End }; diff --git a/src/battle/move/jump/d_down_jump.c b/src/battle/move/jump/d_down_jump.c index 526d51960de..beadf330b47 100644 --- a/src/battle/move/jump/d_down_jump.c +++ b/src/battle/move/jump/d_down_jump.c @@ -28,196 +28,196 @@ extern EvtScript N(EVS_UseMove_ImplB); extern EvtScript N(EVS_UseMove_ImplC); EvtScript N(EVS_UseMove) = { - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(SetDamageSource, DMG_SRC_D_DOWN_JUMP) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_UseMove_ImplA)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_UseMove_ImplB)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_UseMove_ImplC)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(ShowActionHud, TRUE) + Call(SetDamageSource, DMG_SRC_D_DOWN_JUMP) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_UseMove_ImplA)) + CaseEq(1) + ExecWait(N(EVS_UseMove_ImplB)) + CaseEq(2) + ExecWait(N(EVS_UseMove_ImplC)) + EndSwitch + Return + End }; EvtScript N(EVS_UseMove_ImplA) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPlayerActionSuccess, LVarA) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(N(func_802A10E4_781A04), LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_1) - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_ACTOR_JUMPED_1) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_27) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(GetActionResult, LVarF) - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(ShowActionHud, FALSE) - EVT_CALL(action_command_jump_start, 24, 3) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_SpinFall) - EVT_CALL(func_80274A18, 24, 3) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(N(func_802A10E4_781A04), LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_1) - EVT_WAIT(1) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_CALL(SetActionResult, LVarF) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Call(GetPlayerActionSuccess, LVarA) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(N(func_802A10E4_781A04), LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_1) + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_ACTOR_JUMPED_1) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_27) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(GetActionResult, LVarF) + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(ShowActionHud, FALSE) + Call(action_command_jump_start, 24, 3) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_SpinFall) + Call(func_80274A18, 24, 3) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(N(func_802A10E4_781A04), LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_1) + Wait(1) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + Call(SetActionResult, LVarF) + ExecWait(N(EVS_JumpSupport_E)) + Return + End }; EvtScript N(EVS_UseMove_ImplB) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(N(func_802A10E4_781A04), LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_2) - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActionResult, LVarF) - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_27) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(ShowActionHud, FALSE) - EVT_CALL(action_command_jump_start, 37, 3) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump) - EVT_CALL(func_802752AC, 20, 4) - EVT_WAIT(7) - EVT_CALL(func_802752AC, 3, 5) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(N(func_802A10E4_781A04), LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_2) - EVT_WAIT(1) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_CALL(SetActionResult, LVarF) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(N(func_802A10E4_781A04), LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_2) + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + Call(GetActionResult, LVarF) + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_27) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(ShowActionHud, FALSE) + Call(action_command_jump_start, 37, 3) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump) + Call(func_802752AC, 20, 4) + Wait(7) + Call(func_802752AC, 3, 5) + Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(N(func_802A10E4_781A04), LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_2) + Wait(1) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + Call(SetActionResult, LVarF) + ExecWait(N(EVS_JumpSupport_E)) + Return + End }; EvtScript N(EVS_UseMove_ImplC) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(N(func_802A10E4_781A04), LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_3) - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActionResult, LVarF) - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_28) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(ShowActionHud, FALSE) - EVT_CALL(action_command_jump_start, 25, 3) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_SpinFall) - EVT_CALL(func_80275F00, 25, 4) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(N(func_802A10E4_781A04), LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_3) - EVT_WAIT(1) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_CALL(SetActionResult, LVarF) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(N(func_802A10E4_781A04), LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_3) + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + Call(GetActionResult, LVarF) + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_28) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(ShowActionHud, FALSE) + Call(action_command_jump_start, 25, 3) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_SpinFall) + Call(func_80275F00, 25, 4) + Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(N(func_802A10E4_781A04), LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_D_DOWN_HIT_3) + Wait(1) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_IGNORE_DEFENSE, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + Call(SetActionResult, LVarF) + ExecWait(N(EVS_JumpSupport_E)) + Return + End }; diff --git a/src/battle/move/jump/demo_power_bounce.c b/src/battle/move/jump/demo_power_bounce.c index 867fd5c0d3c..40487e88bd5 100644 --- a/src/battle/move/jump/demo_power_bounce.c +++ b/src/battle/move/jump/demo_power_bounce.c @@ -41,425 +41,425 @@ extern EvtScript N(EVS_UseMove_ImplB); extern EvtScript N(EVS_UseMove_ImplC); EvtScript N(EVS_UseMove) = { - EVT_SET(LFlagA, FALSE) - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_AUTO_SUCCEED_ACTION, TRUE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_SET(LVarC, 1) - EVT_EXEC_WAIT(N(EVS_UseMove_ImplA)) - EVT_CASE_EQ(1) - EVT_SET(LVarC, 2) - EVT_EXEC_WAIT(N(EVS_UseMove_ImplB)) - EVT_CASE_EQ(2) - EVT_SET(LVarC, 3) - EVT_EXEC_WAIT(N(EVS_UseMove_ImplC)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Set(LFlagA, FALSE) + Call(ShowActionHud, TRUE) + Call(SetBattleFlagBits, BS_FLAGS1_AUTO_SUCCEED_ACTION, TRUE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Set(LVarC, 1) + ExecWait(N(EVS_UseMove_ImplA)) + CaseEq(1) + Set(LVarC, 2) + ExecWait(N(EVS_UseMove_ImplB)) + CaseEq(2) + Set(LVarC, 3) + ExecWait(N(EVS_UseMove_ImplC)) + EndSwitch + Return + End }; EvtScript N(EVS_UseMove_ImplA) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(SetActionDifficultyTable, EVT_PTR(N(DifficultyTable))) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Approach)) - EVT_EXEC_WAIT(N(EVS_JumpSupport_B)) - EVT_CALL(action_command_jump_start, LVarA, 1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_34) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_MarioB1_Stomp) - EVT_CALL(func_80274A18, LVarA, 0) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_27) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(GetActionResult, LVarE) - EVT_SET(LVarD, 0) - EVT_SET(LVarF, 0) - EVT_SET(LFlag0, FALSE) - EVT_LABEL(10) - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_27) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(SetActionDifficultyTable, EVT_PTR(N(DifficultyTable))) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_SET(LVarA, 24) - EVT_SWITCH(LVarF) - EVT_CASE_EQ(0) - EVT_CALL(action_command_jump_start, LVarA, 1) - EVT_CASE_EQ(1) - EVT_CALL(action_command_jump_start, LVarA, 2) - EVT_CASE_EQ(2) - EVT_CALL(action_command_jump_start, LVarA, 3) - EVT_CASE_EQ(3) - EVT_CALL(action_command_jump_start, LVarA, 4) - EVT_CASE_DEFAULT - EVT_CALL(action_command_jump_start, LVarA, 5) - EVT_END_SWITCH - EVT_SUB(LVarD, 1) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_SpinFall) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_IF_EQ(LVarF, 0) - EVT_CALL(func_80274A18, 24, 3) - EVT_ELSE - EVT_CALL(func_80274A18, 24, 4) - EVT_END_IF - EVT_CALL(GetCommandAutoSuccess, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_IF_GE(LVarF, 3) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_CALL(N(GetHitChance)) - EVT_IF_GE(LVarF, LVar0) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 64) - EVT_ELSE - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 224) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 32) - EVT_END_SWITCH - EVT_SWITCH(LVarF) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) - EVT_CASE_EQ(3) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_CASE_DEFAULT - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_END_SWITCH - EVT_CALL(SetActionResult, LVarE) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_ADD(LVarF, 1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(SetActionDifficultyTable, Ref(N(DifficultyTable))) + ExecWait(N(EVS_JumpSupport_Approach)) + ExecWait(N(EVS_JumpSupport_B)) + Call(action_command_jump_start, LVarA, 1) + Call(UseBattleCamPreset, BTL_CAM_PRESET_34) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_MarioB1_Stomp) + Call(func_80274A18, LVarA, 0) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_27) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(GetActionResult, LVarE) + Set(LVarD, 0) + Set(LVarF, 0) + Set(LFlag0, FALSE) + Label(10) + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_27) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(CloseActionCommandInfo) + Call(SetActionDifficultyTable, Ref(N(DifficultyTable))) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Set(LVarA, 24) + Switch(LVarF) + CaseEq(0) + Call(action_command_jump_start, LVarA, 1) + CaseEq(1) + Call(action_command_jump_start, LVarA, 2) + CaseEq(2) + Call(action_command_jump_start, LVarA, 3) + CaseEq(3) + Call(action_command_jump_start, LVarA, 4) + CaseDefault + Call(action_command_jump_start, LVarA, 5) + EndSwitch + Sub(LVarD, 1) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_SpinFall) + Call(SetGoalToTarget, ACTOR_PLAYER) + IfEq(LVarF, 0) + Call(func_80274A18, 24, 3) + Else + Call(func_80274A18, 24, 4) + EndIf + Call(GetCommandAutoSuccess, LVar1) + IfEq(LVar1, 1) + IfGe(LVarF, 3) + Set(LFlag0, TRUE) + EndIf + EndIf + Call(N(GetHitChance)) + IfGe(LVarF, LVar0) + Set(LFlag0, TRUE) + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + IfEq(LFlag0, FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 64) + Else + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 224) + EndIf + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 32) + EndSwitch + Switch(LVarF) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) + CaseEq(3) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + CaseDefault + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + EndSwitch + Call(SetActionResult, LVarE) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + EndCaseGroup + EndSwitch + Add(LVarF, 1) + Goto(10) + Return + End }; EvtScript N(EVS_UseMove_ImplB) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(SetActionDifficultyTable, EVT_PTR(N(DifficultyTable))) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Approach)) - EVT_EXEC_WAIT(N(EVS_JumpSupport_B)) - EVT_CALL(action_command_jump_start, LVarA, 1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_34) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_MarioB1_Stomp) - EVT_CALL(func_80274A18, LVarA, 0) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActionResult, LVarE) - EVT_SET(LVarD, 0) - EVT_SET(LVarF, 0) - EVT_SET(LFlag0, FALSE) - EVT_LABEL(10) - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_27) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(SetActionDifficultyTable, EVT_PTR(N(DifficultyTable))) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_SET(LVarA, 37) - EVT_SWITCH(LVarF) - EVT_CASE_EQ(0) - EVT_CALL(action_command_jump_start, LVarA, 1) - EVT_CASE_EQ(1) - EVT_CALL(action_command_jump_start, LVarA, 2) - EVT_CASE_EQ(2) - EVT_CALL(action_command_jump_start, LVarA, 3) - EVT_CASE_EQ(3) - EVT_CALL(action_command_jump_start, LVarA, 4) - EVT_CASE_DEFAULT - EVT_CALL(action_command_jump_start, LVarA, 5) - EVT_END_SWITCH - EVT_SUB(LVarD, 1) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_IF_EQ(LVarF, 0) - EVT_CALL(func_802752AC, 20, 3) - EVT_WAIT(7) - EVT_CALL(func_802752AC, 3, 6) - EVT_ELSE - EVT_CALL(func_802752AC, 20, 4) - EVT_WAIT(7) - EVT_CALL(func_802752AC, 3, 5) - EVT_END_IF - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE) - EVT_CALL(GetCommandAutoSuccess, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_IF_GT(LVarF, 3) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_CALL(N(GetHitChance)) - EVT_IF_GT(LVarF, LVar0) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 64) - EVT_ELSE - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 224) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 32) - EVT_END_SWITCH - EVT_SWITCH(LVarF) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) - EVT_CASE_EQ(3) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_CASE_DEFAULT - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_END_SWITCH - EVT_CALL(SetActionResult, LVarE) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_ADD(LVarF, 1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(SetActionDifficultyTable, Ref(N(DifficultyTable))) + ExecWait(N(EVS_JumpSupport_Approach)) + ExecWait(N(EVS_JumpSupport_B)) + Call(action_command_jump_start, LVarA, 1) + Call(UseBattleCamPreset, BTL_CAM_PRESET_34) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_MarioB1_Stomp) + Call(func_80274A18, LVarA, 0) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + Call(GetActionResult, LVarE) + Set(LVarD, 0) + Set(LVarF, 0) + Set(LFlag0, FALSE) + Label(10) + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_27) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(CloseActionCommandInfo) + Call(SetActionDifficultyTable, Ref(N(DifficultyTable))) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Set(LVarA, 37) + Switch(LVarF) + CaseEq(0) + Call(action_command_jump_start, LVarA, 1) + CaseEq(1) + Call(action_command_jump_start, LVarA, 2) + CaseEq(2) + Call(action_command_jump_start, LVarA, 3) + CaseEq(3) + Call(action_command_jump_start, LVarA, 4) + CaseDefault + Call(action_command_jump_start, LVarA, 5) + EndSwitch + Sub(LVarD, 1) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump) + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + IfEq(LVarF, 0) + Call(func_802752AC, 20, 3) + Wait(7) + Call(func_802752AC, 3, 6) + Else + Call(func_802752AC, 20, 4) + Wait(7) + Call(func_802752AC, 3, 5) + EndIf + Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) + Call(GetCommandAutoSuccess, LVar1) + IfEq(LVar1, 1) + IfGt(LVarF, 3) + Set(LFlag0, TRUE) + EndIf + EndIf + Call(N(GetHitChance)) + IfGt(LVarF, LVar0) + Set(LFlag0, TRUE) + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + IfEq(LFlag0, FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 64) + Else + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 224) + EndIf + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 32) + EndSwitch + Switch(LVarF) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) + CaseEq(3) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + CaseDefault + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + EndSwitch + Call(SetActionResult, LVarE) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + EndCaseGroup + EndSwitch + Add(LVarF, 1) + Goto(10) + Return + End }; EvtScript N(EVS_UseMove_ImplC) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(SetActionDifficultyTable, EVT_PTR(N(DifficultyTable))) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Approach)) - EVT_EXEC_WAIT(N(EVS_JumpSupport_B)) - EVT_CALL(action_command_jump_start, LVarA, 1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_34) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_MarioB1_Stomp) - EVT_CALL(func_80274A18, LVarA, 0) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActionResult, LVarE) - EVT_SET(LVarD, 0) - EVT_SET(LVarF, 0) - EVT_SET(LFlag0, FALSE) - EVT_LABEL(10) - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_28) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(SetActionDifficultyTable, EVT_PTR(N(DifficultyTable))) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_SET(LVarA, 25) - EVT_SWITCH(LVarF) - EVT_CASE_EQ(0) - EVT_CALL(action_command_jump_start, LVarA, 1) - EVT_CASE_EQ(1) - EVT_CALL(action_command_jump_start, LVarA, 2) - EVT_CASE_EQ(2) - EVT_CALL(action_command_jump_start, LVarA, 3) - EVT_CASE_EQ(3) - EVT_CALL(action_command_jump_start, LVarA, 4) - EVT_CASE_DEFAULT - EVT_CALL(action_command_jump_start, LVarA, 5) - EVT_END_SWITCH - EVT_SUB(LVarD, 1) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_SpinFall) - EVT_IF_EQ(LVarF, 0) - EVT_CALL(func_80275F00, 25, 2) - EVT_ELSE - EVT_CALL(func_80275F00, 25, 4) - EVT_END_IF - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE) - EVT_CALL(GetCommandAutoSuccess, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_IF_GT(LVarF, 3) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_CALL(N(GetHitChance)) - EVT_IF_GT(LVarF, LVar0) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 64) - EVT_ELSE - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 224) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 32) - EVT_END_SWITCH - EVT_SWITCH(LVarF) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) - EVT_CASE_EQ(3) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_CASE_DEFAULT - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_END_SWITCH - EVT_CALL(SetActionResult, LVarE) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_ADD(LVarF, 1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(SetActionDifficultyTable, Ref(N(DifficultyTable))) + ExecWait(N(EVS_JumpSupport_Approach)) + ExecWait(N(EVS_JumpSupport_B)) + Call(action_command_jump_start, LVarA, 1) + Call(UseBattleCamPreset, BTL_CAM_PRESET_34) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_MarioB1_Stomp) + Call(func_80274A18, LVarA, 0) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + Call(GetActionResult, LVarE) + Set(LVarD, 0) + Set(LVarF, 0) + Set(LFlag0, FALSE) + Label(10) + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_28) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(CloseActionCommandInfo) + Call(SetActionDifficultyTable, Ref(N(DifficultyTable))) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Set(LVarA, 25) + Switch(LVarF) + CaseEq(0) + Call(action_command_jump_start, LVarA, 1) + CaseEq(1) + Call(action_command_jump_start, LVarA, 2) + CaseEq(2) + Call(action_command_jump_start, LVarA, 3) + CaseEq(3) + Call(action_command_jump_start, LVarA, 4) + CaseDefault + Call(action_command_jump_start, LVarA, 5) + EndSwitch + Sub(LVarD, 1) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_SpinFall) + IfEq(LVarF, 0) + Call(func_80275F00, 25, 2) + Else + Call(func_80275F00, 25, 4) + EndIf + Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) + Call(GetCommandAutoSuccess, LVar1) + IfEq(LVar1, 1) + IfGt(LVarF, 3) + Set(LFlag0, TRUE) + EndIf + EndIf + Call(N(GetHitChance)) + IfGt(LVarF, LVar0) + Set(LFlag0, TRUE) + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + IfEq(LFlag0, FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 64) + Else + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 224) + EndIf + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 32) + EndSwitch + Switch(LVarF) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) + CaseEq(3) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + CaseDefault + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + EndSwitch + Call(SetActionResult, LVarE) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + EndCaseGroup + EndSwitch + Add(LVarF, 1) + Goto(10) + Return + End }; diff --git a/src/battle/move/jump/dizzy_stomp.c b/src/battle/move/jump/dizzy_stomp.c index 6b304fbd7ff..0bbd17190d8 100644 --- a/src/battle/move/jump/dizzy_stomp.c +++ b/src/battle/move/jump/dizzy_stomp.c @@ -12,175 +12,175 @@ extern EvtScript N(EVS_UseMove_ImplB); extern EvtScript N(EVS_UseMove_ImplC); EvtScript N(EVS_UseMove) = { - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_UseMove_ImplA)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_UseMove_ImplB)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_UseMove_ImplC)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(ShowActionHud, TRUE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_UseMove_ImplA)) + CaseEq(1) + ExecWait(N(EVS_UseMove_ImplB)) + CaseEq(2) + ExecWait(N(EVS_UseMove_ImplC)) + EndSwitch + Return + End }; EvtScript N(EVS_UseMove_ImplA) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_DIZZY, 3, 75), 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_DIZZY, 3, 75), 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_27) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(GetActionResult, LVarF) - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(ShowActionHud, FALSE) - EVT_CALL(action_command_jump_start, 24, 3) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_SpinFall) - EVT_CALL(func_80274A18, 24, 3) - EVT_WAIT(1) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_DIZZY, 3, 100), 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_CALL(SetActionResult, LVarF) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_DIZZY, 3, 75), 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_DIZZY, 3, 75), 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_27) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(GetActionResult, LVarF) + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(ShowActionHud, FALSE) + Call(action_command_jump_start, 24, 3) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_SpinFall) + Call(func_80274A18, 24, 3) + Wait(1) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_DIZZY, 3, 100), 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + Call(SetActionResult, LVarF) + ExecWait(N(EVS_JumpSupport_E)) + Return + End }; EvtScript N(EVS_UseMove_ImplB) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_DIZZY, 3, 75), 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_DIZZY, 3, 75), 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActionResult, LVarF) - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_27) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(ShowActionHud, FALSE) - EVT_CALL(action_command_jump_start, 37, 3) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump) - EVT_CALL(func_802752AC, 20, 4) - EVT_WAIT(7) - EVT_CALL(func_802752AC, 3, 5) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE) - EVT_WAIT(1) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_DIZZY, 3, 100), 2, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_CALL(SetActionResult, LVarF) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_DIZZY, 3, 75), 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_DIZZY, 3, 75), 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + Call(GetActionResult, LVarF) + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_27) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(ShowActionHud, FALSE) + Call(action_command_jump_start, 37, 3) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump) + Call(func_802752AC, 20, 4) + Wait(7) + Call(func_802752AC, 3, 5) + Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) + Wait(1) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_DIZZY, 3, 100), 2, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + Call(SetActionResult, LVarF) + ExecWait(N(EVS_JumpSupport_E)) + Return + End }; EvtScript N(EVS_UseMove_ImplC) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_DIZZY, 3, 75), 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_DIZZY, 3, 75), 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActionResult, LVarF) - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_28) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(ShowActionHud, FALSE) - EVT_CALL(action_command_jump_start, 25, 3) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_SpinFall) - EVT_CALL(func_80275F00, 25, 4) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE) - EVT_WAIT(1) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_DIZZY, 3, 100), 3, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_CALL(SetActionResult, LVarF) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_DIZZY, 3, 75), 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_DIZZY, 3, 75), 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + Call(GetActionResult, LVarF) + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_28) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(ShowActionHud, FALSE) + Call(action_command_jump_start, 25, 3) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_SpinFall) + Call(func_80275F00, 25, 4) + Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) + Wait(1) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_DIZZY, 3, 100), 3, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + Call(SetActionResult, LVarF) + ExecWait(N(EVS_JumpSupport_E)) + Return + End }; diff --git a/src/battle/move/jump/earthquake_jump.c b/src/battle/move/jump/earthquake_jump.c index 33184c494e1..359a01b73e2 100644 --- a/src/battle/move/jump/earthquake_jump.c +++ b/src/battle/move/jump/earthquake_jump.c @@ -24,683 +24,683 @@ extern EvtScript N(EVS_UseMove_ImplB); extern EvtScript N(EVS_UseMove_ImplC); EvtScript N(EVS_UseMove) = { - EVT_SET(LFlagA, FALSE) - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_UseMove_ImplA)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_UseMove_ImplB)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_UseMove_ImplC)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Set(LFlagA, FALSE) + Call(ShowActionHud, TRUE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_UseMove_ImplA)) + CaseEq(1) + ExecWait(N(EVS_UseMove_ImplB)) + CaseEq(2) + ExecWait(N(EVS_UseMove_ImplC)) + EndSwitch + Return + End }; EvtScript N(EVS_UseMove_ImplA) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(SetGoalToFirstTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(GetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, EVT_FLOAT(70.0)) - EVT_IF_LT(LVar0, LVar3) - EVT_SUB(LVar0, 20) - EVT_SET(LVar3, LVar0) - EVT_END_IF - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) - EVT_CALL(AddGoalPos, ACTOR_PLAYER, -30, 0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_ATTACK_APPROACH) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(5.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(CancelablePlayerRunToGoal, 0, LVar0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(AddGoalPos, ACTOR_PLAYER, 30, 0, 0) - EVT_EXEC_WAIT(N(EVS_JumpSupport_B)) - EVT_SET(LVarB, LVarA) - EVT_ADD(LVarB, 2) - EVT_CALL(action_command_jump_start, LVarB, 3) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_34) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, 30, 0, 0) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_MarioB1_Stomp, ANIM_MarioB1_Stomp) - EVT_CALL(func_80274A18, LVarA, 0) - EVT_CHILD_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.2)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 3, EVT_FLOAT(0.7)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.4)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 6, EVT_FLOAT(0.1)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.05)) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 24) - EVT_ADD(LVar1, 10) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0) - EVT_END_CHILD_THREAD - EVT_WAIT(10) - EVT_CALL(InitTargetIterator) - EVT_CALL(GetPlayerActionSuccess, LVarB) - EVT_SET(LVar9, 0) - EVT_LABEL(1) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, 0, 0, 16) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_GOTO(2) - EVT_END_IF - EVT_SWITCH(LVarB) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_LABEL(2) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_ADD(LVar9, 1) - EVT_CALL(GetTargetListLength, LVar0) - EVT_IF_LT(LVar9, LVar0) - EVT_GOTO(1) - EVT_END_IF - EVT_SWITCH(LVarC) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_27) - EVT_WAIT(5) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, 30, 0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(GetActionResult, LVarE) - EVT_SET(LVarF, 0) - EVT_SET(LFlag0, FALSE) - EVT_LABEL(10) - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_27) - EVT_WAIT(5) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, 30, 0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(SetActionDifficultyTable, EVT_PTR(N(DifficultyTable))) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_SET(LVarA, 26) - EVT_SWITCH(LVarF) - EVT_CASE_EQ(0) - EVT_CALL(action_command_jump_start, LVarA, 3) - EVT_CASE_EQ(1) - EVT_CALL(action_command_jump_start, LVarA, 3) - EVT_CASE_EQ(2) - EVT_CALL(action_command_jump_start, LVarA, 4) - EVT_CASE_EQ(3) - EVT_CALL(action_command_jump_start, LVarA, 4) - EVT_CASE_DEFAULT - EVT_CALL(action_command_jump_start, LVarA, 5) - EVT_END_SWITCH - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_SpinFall) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, 30, 0, 0) - EVT_IF_EQ(LVarF, 0) - EVT_CALL(func_80274A18, 24, 3) - EVT_ELSE - EVT_CALL(func_80274A18, 24, 4) - EVT_END_IF - EVT_CHILD_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.2)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 3, EVT_FLOAT(0.7)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.4)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 6, EVT_FLOAT(0.1)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.05)) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 24) - EVT_ADD(LVar1, 10) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0) - EVT_END_CHILD_THREAD - EVT_WAIT(10) - EVT_CALL(GetCommandAutoSuccess, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_IF_GT(LVarF, 3) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_SET(LVar0, 3) - EVT_CALL(N(func_802A10E4_785C04)) - EVT_IF_GT(LVarF, LVar0) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_CALL(InitTargetIterator) - EVT_CALL(GetPlayerActionSuccess, LVarB) - EVT_SET(LVar9, 0) - EVT_LABEL(11) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, 0, 0, 16) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_GOTO(12) - EVT_END_IF - EVT_SWITCH(LVarB) - EVT_CASE_GT(FALSE) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_NICE_HIT) - EVT_ELSE - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVarF) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) - EVT_CASE_EQ(3) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_CASE_DEFAULT - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_END_SWITCH - EVT_CALL(SetActionResult, LVarE) - EVT_LABEL(12) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_ADD(LVar9, 1) - EVT_CALL(GetTargetListLength, LVar0) - EVT_IF_LT(LVar9, LVar0) - EVT_GOTO(11) - EVT_END_IF - EVT_SWITCH(LVarC) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_ADD(LVarF, 1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(SetGoalToFirstTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(GetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) + Sub(LVar3, Float(70.0)) + IfLt(LVar0, LVar3) + Sub(LVar0, 20) + Set(LVar3, LVar0) + EndIf + Call(SetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) + Call(AddGoalPos, ACTOR_PLAYER, -30, 0, 0) + Call(UseBattleCamPreset, BTL_CAM_PLAYER_ATTACK_APPROACH) + Call(SetActorSpeed, ACTOR_PLAYER, Float(5.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(CancelablePlayerRunToGoal, 0, LVar0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(AddGoalPos, ACTOR_PLAYER, 30, 0, 0) + ExecWait(N(EVS_JumpSupport_B)) + Set(LVarB, LVarA) + Add(LVarB, 2) + Call(action_command_jump_start, LVarB, 3) + Call(UseBattleCamPreset, BTL_CAM_PRESET_34) + Call(SetGoalPos, ACTOR_PLAYER, 30, 0, 0) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_MarioB1_Stomp, ANIM_MarioB1_Stomp) + Call(func_80274A18, LVarA, 0) + ChildThread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.7)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.4)) + Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.1)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.05)) + EndChildThread + ChildThread + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 24) + Add(LVar1, 10) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0) + EndChildThread + Wait(10) + Call(InitTargetIterator) + Call(GetPlayerActionSuccess, LVarB) + Set(LVar9, 0) + Label(1) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, 0, 0, 16) + IfEq(LVar0, HIT_RESULT_MISS) + Goto(2) + EndIf + Switch(LVarB) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Label(2) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + Add(LVar9, 1) + Call(GetTargetListLength, LVar0) + IfLt(LVar9, LVar0) + Goto(1) + EndIf + Switch(LVarC) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_27) + Wait(5) + Call(SetGoalPos, ACTOR_PLAYER, 30, 0, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(GetActionResult, LVarE) + Set(LVarF, 0) + Set(LFlag0, FALSE) + Label(10) + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_27) + Wait(5) + Call(SetGoalPos, ACTOR_PLAYER, 30, 0, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(CloseActionCommandInfo) + Call(SetActionDifficultyTable, Ref(N(DifficultyTable))) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Set(LVarA, 26) + Switch(LVarF) + CaseEq(0) + Call(action_command_jump_start, LVarA, 3) + CaseEq(1) + Call(action_command_jump_start, LVarA, 3) + CaseEq(2) + Call(action_command_jump_start, LVarA, 4) + CaseEq(3) + Call(action_command_jump_start, LVarA, 4) + CaseDefault + Call(action_command_jump_start, LVarA, 5) + EndSwitch + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_SpinFall) + Call(SetGoalPos, ACTOR_PLAYER, 30, 0, 0) + IfEq(LVarF, 0) + Call(func_80274A18, 24, 3) + Else + Call(func_80274A18, 24, 4) + EndIf + ChildThread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.7)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.4)) + Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.1)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.05)) + EndChildThread + ChildThread + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 24) + Add(LVar1, 10) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0) + EndChildThread + Wait(10) + Call(GetCommandAutoSuccess, LVar1) + IfEq(LVar1, 1) + IfGt(LVarF, 3) + Set(LFlag0, TRUE) + EndIf + EndIf + Set(LVar0, 3) + Call(N(func_802A10E4_785C04)) + IfGt(LVarF, LVar0) + Set(LFlag0, TRUE) + EndIf + Call(InitTargetIterator) + Call(GetPlayerActionSuccess, LVarB) + Set(LVar9, 0) + Label(11) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, 0, 0, 16) + IfEq(LVar0, HIT_RESULT_MISS) + Goto(12) + EndIf + Switch(LVarB) + CaseGt(FALSE) + IfEq(LFlag0, FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_NICE_HIT) + Else + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + EndIf + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVarF) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) + CaseEq(3) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + CaseDefault + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + EndSwitch + Call(SetActionResult, LVarE) + Label(12) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + Add(LVar9, 1) + Call(GetTargetListLength, LVar0) + IfLt(LVar9, LVar0) + Goto(11) + EndIf + Switch(LVarC) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + EndCaseGroup + EndSwitch + Add(LVarF, 1) + Goto(10) + Return + End }; EvtScript N(EVS_UseMove_ImplB) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(SetGoalToFirstTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(GetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, EVT_FLOAT(70.0)) - EVT_IF_LT(LVar0, LVar3) - EVT_SUB(LVar0, 20) - EVT_SET(LVar3, LVar0) - EVT_END_IF - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) - EVT_CALL(AddGoalPos, ACTOR_PLAYER, -30, 0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_ATTACK_APPROACH) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(5.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(CancelablePlayerRunToGoal, 0, LVar0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(AddGoalPos, ACTOR_PLAYER, 30, 0, 0) - EVT_EXEC_WAIT(N(EVS_CheckForAPress)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_BeforeJump) - EVT_EXEC_WAIT(N(EVS_JumpSupport_B)) - EVT_SET(LVarB, LVarA) - EVT_ADD(LVarB, 2) - EVT_CALL(action_command_jump_start, LVarB, 3) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_34) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, 30, 0, 0) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_MarioB1_Stomp, ANIM_MarioB1_Stomp) - EVT_CALL(func_80274A18, LVarA, 0) - EVT_CHILD_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.2)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 3, EVT_FLOAT(0.7)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.4)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 6, EVT_FLOAT(0.1)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.05)) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 24) - EVT_ADD(LVar1, 10) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0) - EVT_END_CHILD_THREAD - EVT_WAIT(10) - EVT_CALL(InitTargetIterator) - EVT_CALL(GetPlayerActionSuccess, LVarB) - EVT_SET(LVar9, 0) - EVT_LABEL(1) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, 0, 0, 16) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_GOTO(2) - EVT_END_IF - EVT_SWITCH(LVarB) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_LABEL(2) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_ADD(LVar9, 1) - EVT_CALL(GetTargetListLength, LVar0) - EVT_IF_LT(LVar9, LVar0) - EVT_GOTO(1) - EVT_END_IF - EVT_SWITCH(LVarC) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_27) - EVT_WAIT(5) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, 30, 0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(GetActionResult, LVarE) - EVT_SET(LVarF, 0) - EVT_SET(LFlag0, FALSE) - EVT_LABEL(10) - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_27) - EVT_WAIT(5) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, 30, 0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(SetActionDifficultyTable, EVT_PTR(N(DifficultyTable))) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_SET(LVarA, 39) - EVT_SWITCH(LVarF) - EVT_CASE_EQ(0) - EVT_CALL(action_command_jump_start, LVarA, 3) - EVT_CASE_EQ(1) - EVT_CALL(action_command_jump_start, LVarA, 3) - EVT_CASE_EQ(2) - EVT_CALL(action_command_jump_start, LVarA, 4) - EVT_CASE_EQ(3) - EVT_CALL(action_command_jump_start, LVarA, 4) - EVT_CASE_DEFAULT - EVT_CALL(action_command_jump_start, LVarA, 5) - EVT_END_SWITCH - EVT_CALL(SetGoalPos, ACTOR_PLAYER, 30, 0, 0) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_IF_EQ(LVarF, 0) - EVT_CALL(func_802752AC, 20, 3) - EVT_WAIT(7) - EVT_CALL(func_802752AC, 3, 6) - EVT_ELSE - EVT_CALL(func_802752AC, 20, 4) - EVT_WAIT(7) - EVT_CALL(func_802752AC, 3, 5) - EVT_END_IF - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE) - EVT_CHILD_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.2)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 3, EVT_FLOAT(0.7)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.4)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 6, EVT_FLOAT(0.1)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.05)) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 24) - EVT_ADD(LVar1, 10) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0) - EVT_END_CHILD_THREAD - EVT_WAIT(10) - EVT_CALL(GetCommandAutoSuccess, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_IF_GT(LVarF, 4) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_SET(LVar0, 4) - EVT_CALL(N(func_802A10E4_785C04)) - EVT_IF_GT(LVarF, LVar0) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_CALL(InitTargetIterator) - EVT_CALL(GetPlayerActionSuccess, LVarB) - EVT_SET(LVar9, 0) - EVT_LABEL(11) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, 0, 0, 16) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_GOTO(12) - EVT_END_IF - EVT_SWITCH(LVarB) - EVT_CASE_GT(FALSE) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_NICE_HIT) - EVT_ELSE - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVarF) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) - EVT_CASE_EQ(3) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_CASE_DEFAULT - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_END_SWITCH - EVT_CALL(SetActionResult, LVarE) - EVT_LABEL(12) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_ADD(LVar9, 1) - EVT_CALL(GetTargetListLength, LVar0) - EVT_IF_LT(LVar9, LVar0) - EVT_GOTO(1) - EVT_END_IF - EVT_SWITCH(LVarC) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_ADD(LVarF, 1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(SetGoalToFirstTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(GetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) + Sub(LVar3, Float(70.0)) + IfLt(LVar0, LVar3) + Sub(LVar0, 20) + Set(LVar3, LVar0) + EndIf + Call(SetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) + Call(AddGoalPos, ACTOR_PLAYER, -30, 0, 0) + Call(UseBattleCamPreset, BTL_CAM_PLAYER_ATTACK_APPROACH) + Call(SetActorSpeed, ACTOR_PLAYER, Float(5.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(CancelablePlayerRunToGoal, 0, LVar0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(AddGoalPos, ACTOR_PLAYER, 30, 0, 0) + ExecWait(N(EVS_CheckForAPress)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_BeforeJump) + ExecWait(N(EVS_JumpSupport_B)) + Set(LVarB, LVarA) + Add(LVarB, 2) + Call(action_command_jump_start, LVarB, 3) + Call(UseBattleCamPreset, BTL_CAM_PRESET_34) + Call(SetGoalPos, ACTOR_PLAYER, 30, 0, 0) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_MarioB1_Stomp, ANIM_MarioB1_Stomp) + Call(func_80274A18, LVarA, 0) + ChildThread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.7)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.4)) + Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.1)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.05)) + EndChildThread + ChildThread + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 24) + Add(LVar1, 10) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0) + EndChildThread + Wait(10) + Call(InitTargetIterator) + Call(GetPlayerActionSuccess, LVarB) + Set(LVar9, 0) + Label(1) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, 0, 0, 16) + IfEq(LVar0, HIT_RESULT_MISS) + Goto(2) + EndIf + Switch(LVarB) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Label(2) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + Add(LVar9, 1) + Call(GetTargetListLength, LVar0) + IfLt(LVar9, LVar0) + Goto(1) + EndIf + Switch(LVarC) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_27) + Wait(5) + Call(SetGoalPos, ACTOR_PLAYER, 30, 0, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(GetActionResult, LVarE) + Set(LVarF, 0) + Set(LFlag0, FALSE) + Label(10) + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_27) + Wait(5) + Call(SetGoalPos, ACTOR_PLAYER, 30, 0, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(CloseActionCommandInfo) + Call(SetActionDifficultyTable, Ref(N(DifficultyTable))) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Set(LVarA, 39) + Switch(LVarF) + CaseEq(0) + Call(action_command_jump_start, LVarA, 3) + CaseEq(1) + Call(action_command_jump_start, LVarA, 3) + CaseEq(2) + Call(action_command_jump_start, LVarA, 4) + CaseEq(3) + Call(action_command_jump_start, LVarA, 4) + CaseDefault + Call(action_command_jump_start, LVarA, 5) + EndSwitch + Call(SetGoalPos, ACTOR_PLAYER, 30, 0, 0) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump) + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + IfEq(LVarF, 0) + Call(func_802752AC, 20, 3) + Wait(7) + Call(func_802752AC, 3, 6) + Else + Call(func_802752AC, 20, 4) + Wait(7) + Call(func_802752AC, 3, 5) + EndIf + Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) + ChildThread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.7)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.4)) + Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.1)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.05)) + EndChildThread + ChildThread + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 24) + Add(LVar1, 10) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0) + EndChildThread + Wait(10) + Call(GetCommandAutoSuccess, LVar1) + IfEq(LVar1, 1) + IfGt(LVarF, 4) + Set(LFlag0, TRUE) + EndIf + EndIf + Set(LVar0, 4) + Call(N(func_802A10E4_785C04)) + IfGt(LVarF, LVar0) + Set(LFlag0, TRUE) + EndIf + Call(InitTargetIterator) + Call(GetPlayerActionSuccess, LVarB) + Set(LVar9, 0) + Label(11) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, 0, 0, 16) + IfEq(LVar0, HIT_RESULT_MISS) + Goto(12) + EndIf + Switch(LVarB) + CaseGt(FALSE) + IfEq(LFlag0, FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_NICE_HIT) + Else + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + EndIf + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVarF) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) + CaseEq(3) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + CaseDefault + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + EndSwitch + Call(SetActionResult, LVarE) + Label(12) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + Add(LVar9, 1) + Call(GetTargetListLength, LVar0) + IfLt(LVar9, LVar0) + Goto(1) + EndIf + Switch(LVarC) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + EndCaseGroup + EndSwitch + Add(LVarF, 1) + Goto(10) + Return + End }; EvtScript N(EVS_UseMove_ImplC) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(SetGoalToFirstTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(GetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, EVT_FLOAT(70.0)) - EVT_IF_LT(LVar0, LVar3) - EVT_SUB(LVar0, 20) - EVT_SET(LVar3, LVar0) - EVT_END_IF - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) - EVT_CALL(AddGoalPos, ACTOR_PLAYER, -30, 0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_ATTACK_APPROACH) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(5.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(CancelablePlayerRunToGoal, 0, LVar0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(AddGoalPos, ACTOR_PLAYER, 30, 0, 0) - EVT_EXEC_WAIT(N(EVS_CheckForAPress)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_BeforeJump) - EVT_EXEC_WAIT(N(EVS_JumpSupport_B)) - EVT_SET(LVarB, LVarA) - EVT_ADD(LVarB, 2) - EVT_CALL(action_command_jump_start, LVarB, 3) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_34) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, 30, 0, 0) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_MarioB1_Stomp, ANIM_MarioB1_Stomp) - EVT_CALL(func_80274A18, LVarA, 0) - EVT_CHILD_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.2)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 3, EVT_FLOAT(0.7)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.4)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 6, EVT_FLOAT(0.1)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.05)) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 24) - EVT_ADD(LVar1, 10) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0) - EVT_END_CHILD_THREAD - EVT_WAIT(10) - EVT_CALL(InitTargetIterator) - EVT_CALL(GetPlayerActionSuccess, LVarB) - EVT_SET(LVar9, 0) - EVT_LABEL(1) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, 0, 0, 16) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_GOTO(2) - EVT_END_IF - EVT_SWITCH(LVarB) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_LABEL(2) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_ADD(LVar9, 1) - EVT_CALL(GetTargetListLength, LVar0) - EVT_IF_LT(LVar9, LVar0) - EVT_GOTO(1) - EVT_END_IF - EVT_SWITCH(LVarC) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_27) - EVT_WAIT(5) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, 30, 0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(GetActionResult, LVarE) - EVT_SET(LVarF, 0) - EVT_SET(LFlag0, FALSE) - EVT_LABEL(10) - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_28) - EVT_WAIT(5) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, 30, 0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(SetActionDifficultyTable, EVT_PTR(N(DifficultyTable))) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_SET(LVarA, 27) - EVT_SWITCH(LVarF) - EVT_CASE_EQ(0) - EVT_CALL(action_command_jump_start, LVarA, 3) - EVT_CASE_EQ(1) - EVT_CALL(action_command_jump_start, LVarA, 3) - EVT_CASE_EQ(2) - EVT_CALL(action_command_jump_start, LVarA, 4) - EVT_CASE_EQ(3) - EVT_CALL(action_command_jump_start, LVarA, 4) - EVT_CASE_DEFAULT - EVT_CALL(action_command_jump_start, LVarA, 5) - EVT_END_SWITCH - EVT_CALL(SetGoalPos, ACTOR_PLAYER, 30, 0, 0) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_SpinFall) - EVT_IF_EQ(LVarF, 0) - EVT_CALL(func_80275F00, 25, 2) - EVT_ELSE - EVT_CALL(func_80275F00, 25, 4) - EVT_END_IF - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE) - EVT_CHILD_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.2)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 3, EVT_FLOAT(0.7)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.4)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 6, EVT_FLOAT(0.1)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.05)) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 24) - EVT_ADD(LVar1, 10) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0) - EVT_END_CHILD_THREAD - EVT_WAIT(10) - EVT_CALL(GetCommandAutoSuccess, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_IF_GT(LVarF, 5) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_SET(LVar0, 5) - EVT_CALL(N(func_802A10E4_785C04)) - EVT_IF_GT(LVarF, LVar0) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_CALL(InitTargetIterator) - EVT_CALL(GetPlayerActionSuccess, LVarB) - EVT_SET(LVar9, 0) - EVT_LABEL(11) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, 0, 0, 16) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_GOTO(12) - EVT_END_IF - EVT_SWITCH(LVarB) - EVT_CASE_GT(FALSE) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_NICE_HIT) - EVT_ELSE - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVarF) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) - EVT_CASE_EQ(3) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_CASE_DEFAULT - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_END_SWITCH - EVT_CALL(SetActionResult, LVarE) - EVT_LABEL(12) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_ADD(LVar9, 1) - EVT_CALL(GetTargetListLength, LVar0) - EVT_IF_LT(LVar9, LVar0) - EVT_GOTO(1) - EVT_END_IF - EVT_SWITCH(LVarC) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_ADD(LVarF, 1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(SetGoalToFirstTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(GetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) + Sub(LVar3, Float(70.0)) + IfLt(LVar0, LVar3) + Sub(LVar0, 20) + Set(LVar3, LVar0) + EndIf + Call(SetGoalPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) + Call(AddGoalPos, ACTOR_PLAYER, -30, 0, 0) + Call(UseBattleCamPreset, BTL_CAM_PLAYER_ATTACK_APPROACH) + Call(SetActorSpeed, ACTOR_PLAYER, Float(5.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(CancelablePlayerRunToGoal, 0, LVar0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(AddGoalPos, ACTOR_PLAYER, 30, 0, 0) + ExecWait(N(EVS_CheckForAPress)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_BeforeJump) + ExecWait(N(EVS_JumpSupport_B)) + Set(LVarB, LVarA) + Add(LVarB, 2) + Call(action_command_jump_start, LVarB, 3) + Call(UseBattleCamPreset, BTL_CAM_PRESET_34) + Call(SetGoalPos, ACTOR_PLAYER, 30, 0, 0) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_MarioB1_Stomp, ANIM_MarioB1_Stomp) + Call(func_80274A18, LVarA, 0) + ChildThread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.7)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.4)) + Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.1)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.05)) + EndChildThread + ChildThread + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 24) + Add(LVar1, 10) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0) + EndChildThread + Wait(10) + Call(InitTargetIterator) + Call(GetPlayerActionSuccess, LVarB) + Set(LVar9, 0) + Label(1) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, 0, 0, 16) + IfEq(LVar0, HIT_RESULT_MISS) + Goto(2) + EndIf + Switch(LVarB) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Label(2) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + Add(LVar9, 1) + Call(GetTargetListLength, LVar0) + IfLt(LVar9, LVar0) + Goto(1) + EndIf + Switch(LVarC) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_27) + Wait(5) + Call(SetGoalPos, ACTOR_PLAYER, 30, 0, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(GetActionResult, LVarE) + Set(LVarF, 0) + Set(LFlag0, FALSE) + Label(10) + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_28) + Wait(5) + Call(SetGoalPos, ACTOR_PLAYER, 30, 0, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(CloseActionCommandInfo) + Call(SetActionDifficultyTable, Ref(N(DifficultyTable))) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Set(LVarA, 27) + Switch(LVarF) + CaseEq(0) + Call(action_command_jump_start, LVarA, 3) + CaseEq(1) + Call(action_command_jump_start, LVarA, 3) + CaseEq(2) + Call(action_command_jump_start, LVarA, 4) + CaseEq(3) + Call(action_command_jump_start, LVarA, 4) + CaseDefault + Call(action_command_jump_start, LVarA, 5) + EndSwitch + Call(SetGoalPos, ACTOR_PLAYER, 30, 0, 0) + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_SpinFall) + IfEq(LVarF, 0) + Call(func_80275F00, 25, 2) + Else + Call(func_80275F00, 25, 4) + EndIf + Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) + ChildThread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.7)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.4)) + Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.1)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.05)) + EndChildThread + ChildThread + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 24) + Add(LVar1, 10) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 0, 30, 0, 0, 0, 0, 0) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, LVar1, LVar2, 72, 8, 24, 30, 0, 0, 0, 0, 0) + EndChildThread + Wait(10) + Call(GetCommandAutoSuccess, LVar1) + IfEq(LVar1, 1) + IfGt(LVarF, 5) + Set(LFlag0, TRUE) + EndIf + EndIf + Set(LVar0, 5) + Call(N(func_802A10E4_785C04)) + IfGt(LVarF, LVar0) + Set(LFlag0, TRUE) + EndIf + Call(InitTargetIterator) + Call(GetPlayerActionSuccess, LVarB) + Set(LVar9, 0) + Label(11) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT, 0, 0, 0, 16) + IfEq(LVar0, HIT_RESULT_MISS) + Goto(12) + EndIf + Switch(LVarB) + CaseGt(FALSE) + IfEq(LFlag0, FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_NICE_HIT) + Else + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + EndIf + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVarC, DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVarF) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) + CaseEq(3) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + CaseDefault + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + EndSwitch + Call(SetActionResult, LVarE) + Label(12) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + Add(LVar9, 1) + Call(GetTargetListLength, LVar0) + IfLt(LVar9, LVar0) + Goto(1) + EndIf + Switch(LVarC) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + EndCaseGroup + EndSwitch + Add(LVarF, 1) + Goto(10) + Return + End }; diff --git a/src/battle/move/jump/jump_charge_0.c b/src/battle/move/jump/jump_charge_0.c index 360073b7632..c33b0054715 100644 --- a/src/battle/move/jump/jump_charge_0.c +++ b/src/battle/move/jump/jump_charge_0.c @@ -44,63 +44,63 @@ API_CALLABLE(N(func_802A120C_74D77C)) { } EvtScript N(EVS_UseMove1) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_UseMove0) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_CHARGE_UP) - EVT_WAIT(10) - EVT_CHILD_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) - EVT_WAIT(8) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) - EVT_WAIT(8) - EVT_END_CHILD_THREAD - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_FightingStance) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(N(func_802A120C_74D77C), LVar0, LVar1, LVar2, EVT_FLOAT(1.2)) - EVT_WAIT(3) - EVT_CALL(N(func_802A120C_74D77C), LVar0, LVar1, LVar2, EVT_FLOAT(0.8)) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 5) - EVT_CALL(N(IsJumpMaxCharged)) - EVT_IF_EQ(LVar0, FALSE) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_ADD(LVar1, 25) - EVT_ADD(LVar2, 5) - EVT_CALL(N(func_802A1108_74D678), LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_CHARGE_UP) - EVT_WAIT(4) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 20, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_CALL(ShowVariableMessageBox, BTL_MSG_CHARGE_JUMP, 60, 1) - EVT_ELSE - EVT_CALL(ShowMessageBox, BTL_MSG_CANT_CHARGE, 60) - EVT_END_IF - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(IsMessageBoxDisplayed, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(PlayerRunToGoal, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_PLAYER_CHARGE_UP) + Wait(10) + ChildThread + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) + Wait(8) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) + Wait(8) + EndChildThread + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_FightingStance) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(N(func_802A120C_74D77C), LVar0, LVar1, LVar2, Float(1.2)) + Wait(3) + Call(N(func_802A120C_74D77C), LVar0, LVar1, LVar2, Float(0.8)) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 5) + Call(N(IsJumpMaxCharged)) + IfEq(LVar0, FALSE) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 10) + Add(LVar1, 25) + Add(LVar2, 5) + Call(N(func_802A1108_74D678), LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_CHARGE_UP) + Wait(4) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.0)) + Call(SetActorSpeed, ACTOR_PLAYER, Float(1.0)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 20, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) + Wait(4) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Call(ShowVariableMessageBox, BTL_MSG_CHARGE_JUMP, 60, 1) + Else + Call(ShowMessageBox, BTL_MSG_CANT_CHARGE, 60) + EndIf + Label(0) + Wait(1) + Call(IsMessageBoxDisplayed, LVar0) + IfEq(LVar0, TRUE) + Goto(0) + EndIf + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(SetGoalToHome, ACTOR_PLAYER) + Call(SetActorSpeed, ACTOR_PLAYER, Float(8.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(PlayerRunToGoal, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Return + End }; diff --git a/src/battle/move/jump/jump_charge_1.c b/src/battle/move/jump/jump_charge_1.c index c1436c4b385..7eab9900c86 100644 --- a/src/battle/move/jump/jump_charge_1.c +++ b/src/battle/move/jump/jump_charge_1.c @@ -53,64 +53,64 @@ API_CALLABLE(N(func_802A133C_75CCBC)) { } EvtScript N(EVS_UseMove1) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_UseMove0) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_CHARGE_UP) - EVT_WAIT(10) - EVT_CHILD_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) - EVT_WAIT(8) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) - EVT_WAIT(8) - EVT_END_CHILD_THREAD - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_FightingStance) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(N(UnkMoveFunc2), LVar0, LVar1, LVar2, EVT_FLOAT(1.2)) - EVT_WAIT(3) - EVT_CALL(N(UnkMoveFunc2), LVar0, LVar1, LVar2, EVT_FLOAT(0.8)) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 5) - EVT_CALL(N(IsJumpMaxCharged)) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_ADD(LVar1, 25) - EVT_ADD(LVar2, 5) - EVT_CALL(N(func_802A1108_74D678), LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_CHARGE_UP) - EVT_WAIT(4) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 20, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_CALL(N(func_802A133C_75CCBC)) - EVT_CALL(ShowVariableMessageBox, LVar0, 60, 2) - EVT_ELSE - EVT_CALL(ShowMessageBox, BTL_MSG_CANT_CHARGE, 60) - EVT_END_IF - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(IsMessageBoxDisplayed, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(PlayerRunToGoal, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_PLAYER_CHARGE_UP) + Wait(10) + ChildThread + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) + Wait(8) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) + Wait(8) + EndChildThread + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_FightingStance) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(N(UnkMoveFunc2), LVar0, LVar1, LVar2, Float(1.2)) + Wait(3) + Call(N(UnkMoveFunc2), LVar0, LVar1, LVar2, Float(0.8)) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 5) + Call(N(IsJumpMaxCharged)) + IfEq(LVar0, 0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 10) + Add(LVar1, 25) + Add(LVar2, 5) + Call(N(func_802A1108_74D678), LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_CHARGE_UP) + Wait(4) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.0)) + Call(SetActorSpeed, ACTOR_PLAYER, Float(1.0)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 20, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) + Wait(4) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Call(N(func_802A133C_75CCBC)) + Call(ShowVariableMessageBox, LVar0, 60, 2) + Else + Call(ShowMessageBox, BTL_MSG_CANT_CHARGE, 60) + EndIf + Label(0) + Wait(1) + Call(IsMessageBoxDisplayed, LVar0) + IfEq(LVar0, TRUE) + Goto(0) + EndIf + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(SetGoalToHome, ACTOR_PLAYER) + Call(SetActorSpeed, ACTOR_PLAYER, Float(8.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(PlayerRunToGoal, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Return + End }; diff --git a/src/battle/move/jump/jump_charge_2.c b/src/battle/move/jump/jump_charge_2.c index d45d4f76fee..27ca5cc3d69 100644 --- a/src/battle/move/jump/jump_charge_2.c +++ b/src/battle/move/jump/jump_charge_2.c @@ -53,63 +53,63 @@ API_CALLABLE(N(func_802A133C_761C5C)) { } EvtScript N(EVS_UseMove1) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_UseMove0) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_CHARGE_UP) - EVT_WAIT(10) - EVT_CHILD_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) - EVT_WAIT(8) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) - EVT_WAIT(8) - EVT_END_CHILD_THREAD - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_FightingStance) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(N(UnkMoveFunc3), LVar0, LVar1, LVar2, EVT_FLOAT(1.2)) - EVT_WAIT(3) - EVT_CALL(N(UnkMoveFunc3), LVar0, LVar1, LVar2, EVT_FLOAT(0.8)) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 5) - EVT_CALL(N(IsJumpMaxCharged)) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_ADD(LVar1, 25) - EVT_ADD(LVar2, 5) - EVT_CALL(N(func_802A1108_74D678), LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_CHARGE_UP) - EVT_WAIT(4) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 20, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(N(func_802A133C_761C5C)) - EVT_CALL(ShowVariableMessageBox, LVar0, 60, 3) - EVT_ELSE - EVT_CALL(ShowMessageBox, BTL_MSG_CANT_CHARGE, 60) - EVT_END_IF - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(IsMessageBoxDisplayed, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(PlayerRunToGoal, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_PLAYER_CHARGE_UP) + Wait(10) + ChildThread + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) + Wait(8) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_CHARGE) + Wait(8) + EndChildThread + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_FightingStance) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(N(UnkMoveFunc3), LVar0, LVar1, LVar2, Float(1.2)) + Wait(3) + Call(N(UnkMoveFunc3), LVar0, LVar1, LVar2, Float(0.8)) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 5) + Call(N(IsJumpMaxCharged)) + IfEq(LVar0, 0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 10) + Add(LVar1, 25) + Add(LVar2, 5) + Call(N(func_802A1108_74D678), LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_CHARGE_UP) + Wait(4) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.0)) + Call(SetActorSpeed, ACTOR_PLAYER, Float(1.0)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 20, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) + Wait(4) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(N(func_802A133C_761C5C)) + Call(ShowVariableMessageBox, LVar0, 60, 3) + Else + Call(ShowMessageBox, BTL_MSG_CANT_CHARGE, 60) + EndIf + Label(0) + Wait(1) + Call(IsMessageBoxDisplayed, LVar0) + IfEq(LVar0, TRUE) + Goto(0) + EndIf + Call(SetGoalToHome, ACTOR_PLAYER) + Call(SetActorSpeed, ACTOR_PLAYER, Float(8.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(PlayerRunToGoal, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Return + End }; diff --git a/src/battle/move/jump/mega_jump.c b/src/battle/move/jump/mega_jump.c index 26e9074e9cd..2ac4f09af64 100644 --- a/src/battle/move/jump/mega_jump.c +++ b/src/battle/move/jump/mega_jump.c @@ -11,120 +11,120 @@ extern EvtScript N(EVS_UseMove_Super); extern EvtScript N(EVS_UseMove_Ultra); EvtScript N(EVS_UseMove) = { - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_UseMove_Basic)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_UseMove_Super)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_UseMove_Ultra)) - EVT_END_SWITCH - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE) - EVT_RETURN - EVT_END + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + Call(ShowActionHud, TRUE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_UseMove_Basic)) + CaseEq(1) + ExecWait(N(EVS_UseMove_Super)) + CaseEq(2) + ExecWait(N(EVS_UseMove_Ultra)) + EndSwitch + Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) + Return + End }; EvtScript N(EVS_PlayQuakeFX) = { - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_MAX) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(6.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(5.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(4.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(StartRumble, BTL_RUMBLE_PLAYER_MAX) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(6.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(5.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(4.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2)) + EndThread + Return + End }; EvtScript N(EVS_UseMove_Basic) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_PlayQuakeFX)) - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 6, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 5, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_GT(HIT_RESULT_HIT) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(N(EVS_JumpSupport_F)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + ExecWait(N(EVS_PlayQuakeFX)) + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 6, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 5, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseGt(HIT_RESULT_HIT) + ExecWait(N(EVS_JumpSupport_E)) + CaseDefault + ExecWait(N(EVS_JumpSupport_F)) + EndSwitch + Return + End }; EvtScript N(EVS_UseMove_Super) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_PlayQuakeFX)) - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 8, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 6, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_GT(HIT_RESULT_HIT) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(N(EVS_JumpSupport_F)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + ExecWait(N(EVS_PlayQuakeFX)) + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 8, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 6, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseGt(HIT_RESULT_HIT) + ExecWait(N(EVS_JumpSupport_E)) + CaseDefault + ExecWait(N(EVS_JumpSupport_F)) + EndSwitch + Return + End }; EvtScript N(EVS_UseMove_Ultra) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_PlayQuakeFX)) - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 10, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 7, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_GT(HIT_RESULT_HIT) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(N(EVS_JumpSupport_F)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + ExecWait(N(EVS_PlayQuakeFX)) + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 10, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 7, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseGt(HIT_RESULT_HIT) + ExecWait(N(EVS_JumpSupport_E)) + CaseDefault + ExecWait(N(EVS_JumpSupport_F)) + EndSwitch + Return + End }; diff --git a/src/battle/move/jump/multibounce.c b/src/battle/move/jump/multibounce.c index c6dbb0e5ce3..97f8681a0ad 100644 --- a/src/battle/move/jump/multibounce.c +++ b/src/battle/move/jump/multibounce.c @@ -16,473 +16,473 @@ extern EvtScript N(EVS_UseMove_Super); extern EvtScript N(EVS_UseMove_Ultra); EvtScript N(EVS_UseMove) = { - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_EXECUTING_MOVE, TRUE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_UseMove_Basic)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_UseMove_Super)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_UseMove_Ultra)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(ShowActionHud, TRUE) + Call(SetBattleFlagBits, BS_FLAGS1_EXECUTING_MOVE, TRUE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_UseMove_Basic)) + CaseEq(1) + ExecWait(N(EVS_UseMove_Super)) + CaseEq(2) + ExecWait(N(EVS_UseMove_Ultra)) + EndSwitch + Return + End }; EvtScript N(EVS_UseMove_Basic) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(SetActionDifficultyTable, EVT_PTR(N(DifficultyTable))) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Approach)) - EVT_EXEC_WAIT(N(EVS_JumpSupport_B)) - EVT_CALL(action_command_jump_start, LVarA, 1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_34) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_MarioB1_Stomp) - EVT_CALL(func_80274A18, LVarA, 0) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetTargetListLength, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_IF_FALSE(LFlag0) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_ELSE - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActionResult, LVarE) - EVT_ADD(LVarF, 1) - EVT_SET(LFlag0, FALSE) - EVT_LABEL(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_40) - EVT_CALL(GetTargetListLength, LVar0) - EVT_SUB(LVar0, 1) - EVT_IF_EQ(LVarF, LVar0) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(ShowActionHud, FALSE) - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_EXEC_WAIT(N(EVS_JumpSupport_B)) - EVT_ADD(LVarA, 5) - EVT_CALL(action_command_jump_start, LVarA, 3) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_SpinFall) - EVT_IF_EQ(LVarF, 1) - EVT_CALL(func_80274A18, LVarA, 3) - EVT_ELSE - EVT_CALL(func_80274A18, LVarA, 4) - EVT_END_IF - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_ELSE - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_ELSE - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_END_IF - EVT_END_SWITCH - EVT_SWITCH(LVarF) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) - EVT_CASE_EQ(3) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_CASE_DEFAULT - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_END_SWITCH - EVT_CALL(SetActionResult, LVarE) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(FALSE) - EVT_CASE_OR_EQ(2) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(TRUE) - EVT_CASE_OR_EQ(3) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_ADD(LVarF, 1) - EVT_CALL(GetTargetListLength, LVar0) - EVT_IF_GE(LVarF, LVar0) - EVT_EXEC_WAIT(N(EVS_JumpSupport_F)) - EVT_RETURN - EVT_END_IF - EVT_GOTO(10) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(SetActionDifficultyTable, Ref(N(DifficultyTable))) + ExecWait(N(EVS_JumpSupport_Approach)) + ExecWait(N(EVS_JumpSupport_B)) + Call(action_command_jump_start, LVarA, 1) + Call(UseBattleCamPreset, BTL_CAM_PRESET_34) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_MarioB1_Stomp) + Call(func_80274A18, LVarA, 0) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Set(LFlag0, FALSE) + Call(GetTargetListLength, LVar0) + IfEq(LVar0, 1) + Set(LFlag0, TRUE) + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(0) + IfFalse(LFlag0) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + Else + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + EndIf + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + EndCaseGroup + EndSwitch + Call(GetActionResult, LVarE) + Add(LVarF, 1) + Set(LFlag0, FALSE) + Label(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_40) + Call(GetTargetListLength, LVar0) + Sub(LVar0, 1) + IfEq(LVarF, LVar0) + Set(LFlag0, TRUE) + EndIf + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + IfEq(LFlag0, TRUE) + Call(ShowActionHud, FALSE) + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + Call(SetGoalToTarget, ACTOR_PLAYER) + ExecWait(N(EVS_JumpSupport_B)) + Add(LVarA, 5) + Call(action_command_jump_start, LVarA, 3) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_SpinFall) + IfEq(LVarF, 1) + Call(func_80274A18, LVarA, 3) + Else + Call(func_80274A18, LVarA, 4) + EndIf + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + IfEq(LFlag0, FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + Else + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + EndIf + CaseDefault + IfEq(LFlag0, FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + Else + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + EndIf + EndSwitch + Switch(LVarF) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) + CaseEq(3) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + CaseDefault + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + EndSwitch + Call(SetActionResult, LVarE) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseOrEq(FALSE) + CaseOrEq(2) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(TRUE) + CaseOrEq(3) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + EndCaseGroup + EndSwitch + Add(LVarF, 1) + Call(GetTargetListLength, LVar0) + IfGe(LVarF, LVar0) + ExecWait(N(EVS_JumpSupport_F)) + Return + EndIf + Goto(10) + Return + End }; EvtScript N(EVS_UseMove_Super) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(SetActionDifficultyTable, EVT_PTR(N(DifficultyTable))) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Approach)) - EVT_EXEC_WAIT(N(EVS_JumpSupport_B)) - EVT_CALL(action_command_jump_start, LVarA, 1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_34) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_MarioB1_Stomp) - EVT_CALL(func_80274A18, LVarA, 0) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetTargetListLength, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_ELSE - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActionResult, LVarE) - EVT_SET(LFlag0, FALSE) - EVT_SET(LVarF, 0) - EVT_ADD(LVarF, 1) - EVT_LABEL(10) - EVT_CALL(GetTargetListLength, LVar0) - EVT_SUB(LVar0, 1) - EVT_IF_EQ(LVarF, LVar0) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(ShowActionHud, FALSE) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_40) - EVT_CALL(action_command_jump_start, 37, 3) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_IF_EQ(LVarF, 1) - EVT_CALL(func_802752AC, 20, 3) - EVT_WAIT(7) - EVT_CALL(func_802752AC, 3, 6) - EVT_ELSE - EVT_CALL(func_802752AC, 20, 4) - EVT_WAIT(7) - EVT_CALL(func_802752AC, 3, 5) - EVT_END_IF - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_ELSE - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_ELSE - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_END_IF - EVT_END_SWITCH - EVT_SWITCH(LVarF) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) - EVT_CASE_EQ(3) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_CASE_DEFAULT - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_END_SWITCH - EVT_CALL(SetActionResult, LVarE) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(FALSE) - EVT_CASE_OR_EQ(2) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(TRUE) - EVT_CASE_OR_EQ(3) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_ADD(LVarF, 1) - EVT_CALL(GetTargetListLength, LVar0) - EVT_IF_GE(LVarF, LVar0) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_IF - EVT_GOTO(10) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(SetActionDifficultyTable, Ref(N(DifficultyTable))) + ExecWait(N(EVS_JumpSupport_Approach)) + ExecWait(N(EVS_JumpSupport_B)) + Call(action_command_jump_start, LVarA, 1) + Call(UseBattleCamPreset, BTL_CAM_PRESET_34) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_MarioB1_Stomp) + Call(func_80274A18, LVarA, 0) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Set(LFlag0, FALSE) + Call(GetTargetListLength, LVar0) + IfEq(LVar0, 1) + Set(LFlag0, TRUE) + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + IfEq(LFlag0, FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + Else + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + EndIf + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + EndCaseGroup + EndSwitch + Call(GetActionResult, LVarE) + Set(LFlag0, FALSE) + Set(LVarF, 0) + Add(LVarF, 1) + Label(10) + Call(GetTargetListLength, LVar0) + Sub(LVar0, 1) + IfEq(LVarF, LVar0) + Set(LFlag0, TRUE) + EndIf + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + IfEq(LFlag0, TRUE) + Call(ShowActionHud, FALSE) + EndIf + Call(UseBattleCamPreset, BTL_CAM_PRESET_40) + Call(action_command_jump_start, 37, 3) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump) + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + IfEq(LVarF, 1) + Call(func_802752AC, 20, 3) + Wait(7) + Call(func_802752AC, 3, 6) + Else + Call(func_802752AC, 20, 4) + Wait(7) + Call(func_802752AC, 3, 5) + EndIf + Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + IfEq(LFlag0, FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 2, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + Else + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + EndIf + CaseDefault + IfEq(LFlag0, FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + Else + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + EndIf + EndSwitch + Switch(LVarF) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) + CaseEq(3) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + CaseDefault + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + EndSwitch + Call(SetActionResult, LVarE) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseOrEq(FALSE) + CaseOrEq(2) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(TRUE) + CaseOrEq(3) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + EndCaseGroup + EndSwitch + Add(LVarF, 1) + Call(GetTargetListLength, LVar0) + IfGe(LVarF, LVar0) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndIf + Goto(10) + Return + End }; EvtScript N(EVS_UseMove_Ultra) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(SetActionDifficultyTable, EVT_PTR(N(DifficultyTable))) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Approach)) - EVT_EXEC_WAIT(N(EVS_JumpSupport_B)) - EVT_CALL(action_command_jump_start, LVarA, 1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_34) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_MarioB1_Stomp) - EVT_CALL(func_80274A18, LVarA, 0) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetTargetListLength, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_ELSE - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActionResult, LVarE) - EVT_SET(LFlag0, FALSE) - EVT_SET(LVarF, 0) - EVT_ADD(LVarF, 1) - EVT_LABEL(20) - EVT_CALL(GetTargetListLength, LVar0) - EVT_SUB(LVar0, 1) - EVT_IF_EQ(LVarF, LVar0) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(ShowActionHud, FALSE) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_40) - EVT_CALL(action_command_jump_start, 25, 3) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_SpinFall) - EVT_IF_EQ(LVarF, 1) - EVT_CALL(func_80275F00, 25, 2) - EVT_ELSE - EVT_CALL(func_80275F00, 25, 4) - EVT_END_IF - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_ELSE - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_ELSE - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_END_IF - EVT_END_SWITCH - EVT_SWITCH(LVarF) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) - EVT_CASE_EQ(3) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_CASE_DEFAULT - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_END_SWITCH - EVT_CALL(SetActionResult, LVarE) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(FALSE) - EVT_CASE_OR_EQ(2) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(TRUE) - EVT_CASE_OR_EQ(3) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_ADD(LVarF, 1) - EVT_CALL(GetTargetListLength, LVar0) - EVT_IF_GE(LVarF, LVar0) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_IF - EVT_GOTO(20) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(SetActionDifficultyTable, Ref(N(DifficultyTable))) + ExecWait(N(EVS_JumpSupport_Approach)) + ExecWait(N(EVS_JumpSupport_B)) + Call(action_command_jump_start, LVarA, 1) + Call(UseBattleCamPreset, BTL_CAM_PRESET_34) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_MarioB1_Stomp) + Call(func_80274A18, LVarA, 0) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Set(LFlag0, FALSE) + Call(GetTargetListLength, LVar0) + IfEq(LVar0, 1) + Set(LFlag0, TRUE) + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + IfEq(LFlag0, FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + Else + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + EndIf + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + EndCaseGroup + EndSwitch + Call(GetActionResult, LVarE) + Set(LFlag0, FALSE) + Set(LVarF, 0) + Add(LVarF, 1) + Label(20) + Call(GetTargetListLength, LVar0) + Sub(LVar0, 1) + IfEq(LVarF, LVar0) + Set(LFlag0, TRUE) + EndIf + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + IfEq(LFlag0, TRUE) + Call(ShowActionHud, FALSE) + EndIf + Call(UseBattleCamPreset, BTL_CAM_PRESET_40) + Call(action_command_jump_start, 25, 3) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_SpinFall) + IfEq(LVarF, 1) + Call(func_80275F00, 25, 2) + Else + Call(func_80275F00, 25, 4) + EndIf + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + IfEq(LFlag0, FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 3, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + Else + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + EndIf + CaseDefault + IfEq(LFlag0, FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + Else + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_MULTI_BOUNCE | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + EndIf + EndSwitch + Switch(LVarF) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) + CaseEq(3) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + CaseDefault + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + EndSwitch + Call(SetActionResult, LVarE) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseOrEq(FALSE) + CaseOrEq(2) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(TRUE) + CaseOrEq(3) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + EndCaseGroup + EndSwitch + Add(LVarF, 1) + Call(GetTargetListLength, LVar0) + IfGe(LVarF, LVar0) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndIf + Goto(20) + Return + End }; diff --git a/src/battle/move/jump/power_bounce.c b/src/battle/move/jump/power_bounce.c index 78b22928eaf..4836b11a51a 100644 --- a/src/battle/move/jump/power_bounce.c +++ b/src/battle/move/jump/power_bounce.c @@ -59,444 +59,444 @@ extern EvtScript N(EVS_UseMove_ImplB); extern EvtScript N(EVS_UseMove_ImplC); EvtScript N(EVS_UseMove) = { - EVT_SET(LFlagA, FALSE) - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(N(InitializeHitCounter)) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_SET(LVarC, 1) - EVT_EXEC_WAIT(N(EVS_UseMove_ImplA)) - EVT_CASE_EQ(1) - EVT_SET(LVarC, 2) - EVT_EXEC_WAIT(N(EVS_UseMove_ImplB)) - EVT_CASE_EQ(2) - EVT_SET(LVarC, 3) - EVT_EXEC_WAIT(N(EVS_UseMove_ImplC)) - EVT_END_SWITCH - EVT_CALL(N(StoreHitCountRecord)) - EVT_RETURN - EVT_END + Set(LFlagA, FALSE) + Call(ShowActionHud, TRUE) + Call(N(InitializeHitCounter)) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + Set(LVarC, 1) + ExecWait(N(EVS_UseMove_ImplA)) + CaseEq(1) + Set(LVarC, 2) + ExecWait(N(EVS_UseMove_ImplB)) + CaseEq(2) + Set(LVarC, 3) + ExecWait(N(EVS_UseMove_ImplC)) + EndSwitch + Call(N(StoreHitCountRecord)) + Return + End }; EvtScript N(EVS_UseMove_ImplA) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(SetActionDifficultyTable, EVT_PTR(N(DifficultyTable))) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Approach)) - EVT_EXEC_WAIT(N(EVS_JumpSupport_B)) - EVT_CALL(action_command_jump_start, LVarA, 1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_34) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_MarioB1_Stomp) - EVT_CALL(func_80274A18, LVarA, 0) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_27) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(GetActionResult, LVarE) - EVT_CALL(N(IncrementHitCounter)) - EVT_SET(LVarD, 0) - EVT_SET(LVarF, 0) - EVT_SET(LFlag0, FALSE) - EVT_LABEL(10) - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_27) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(SetActionDifficultyTable, EVT_PTR(N(DifficultyTable))) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_SET(LVarA, 24) - EVT_SWITCH(LVarF) - EVT_CASE_EQ(0) - EVT_CALL(action_command_jump_start, LVarA, 1) - EVT_CASE_EQ(1) - EVT_CALL(action_command_jump_start, LVarA, 2) - EVT_CASE_EQ(2) - EVT_CALL(action_command_jump_start, LVarA, 3) - EVT_CASE_EQ(3) - EVT_CALL(action_command_jump_start, LVarA, 4) - EVT_CASE_DEFAULT - EVT_CALL(action_command_jump_start, LVarA, 5) - EVT_END_SWITCH - EVT_SUB(LVarD, 1) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_SpinFall) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_IF_EQ(LVarF, 0) - EVT_CALL(func_80274A18, 24, 3) - EVT_ELSE - EVT_CALL(func_80274A18, 24, 4) - EVT_END_IF - EVT_CALL(GetCommandAutoSuccess, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_IF_GE(LVarF, 3) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_CALL(N(GetHitChance)) - EVT_IF_GE(LVarF, LVar0) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, BS_FLAGS1_NICE_HIT) - EVT_ELSE - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVarF) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) - EVT_CASE_EQ(3) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_CASE_DEFAULT - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_END_SWITCH - EVT_CALL(SetActionResult, LVarE) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_ADD(LVarF, 1) - EVT_CALL(N(IncrementHitCounter)) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(SetActionDifficultyTable, Ref(N(DifficultyTable))) + ExecWait(N(EVS_JumpSupport_Approach)) + ExecWait(N(EVS_JumpSupport_B)) + Call(action_command_jump_start, LVarA, 1) + Call(UseBattleCamPreset, BTL_CAM_PRESET_34) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_MarioB1_Stomp) + Call(func_80274A18, LVarA, 0) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_27) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(GetActionResult, LVarE) + Call(N(IncrementHitCounter)) + Set(LVarD, 0) + Set(LVarF, 0) + Set(LFlag0, FALSE) + Label(10) + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_27) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(CloseActionCommandInfo) + Call(SetActionDifficultyTable, Ref(N(DifficultyTable))) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Set(LVarA, 24) + Switch(LVarF) + CaseEq(0) + Call(action_command_jump_start, LVarA, 1) + CaseEq(1) + Call(action_command_jump_start, LVarA, 2) + CaseEq(2) + Call(action_command_jump_start, LVarA, 3) + CaseEq(3) + Call(action_command_jump_start, LVarA, 4) + CaseDefault + Call(action_command_jump_start, LVarA, 5) + EndSwitch + Sub(LVarD, 1) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_SpinFall) + Call(SetGoalToTarget, ACTOR_PLAYER) + IfEq(LVarF, 0) + Call(func_80274A18, 24, 3) + Else + Call(func_80274A18, 24, 4) + EndIf + Call(GetCommandAutoSuccess, LVar1) + IfEq(LVar1, 1) + IfGe(LVarF, 3) + Set(LFlag0, TRUE) + EndIf + EndIf + Call(N(GetHitChance)) + IfGe(LVarF, LVar0) + Set(LFlag0, TRUE) + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(0) + IfEq(LFlag0, FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, BS_FLAGS1_NICE_HIT) + Else + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + EndIf + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVarF) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) + CaseEq(3) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + CaseDefault + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + EndSwitch + Call(SetActionResult, LVarE) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + EndCaseGroup + EndSwitch + Add(LVarF, 1) + Call(N(IncrementHitCounter)) + Goto(10) + Return + End }; EvtScript N(EVS_UseMove_ImplB) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(SetActionDifficultyTable, EVT_PTR(N(DifficultyTable))) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Approach)) - EVT_EXEC_WAIT(N(EVS_JumpSupport_B)) - EVT_CALL(action_command_jump_start, LVarA, 1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_34) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_MarioB1_Stomp) - EVT_CALL(func_80274A18, LVarA, 0) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActionResult, LVarE) - EVT_CALL(N(IncrementHitCounter)) - EVT_SET(LVarD, 0) - EVT_SET(LVarF, 0) - EVT_SET(LFlag0, FALSE) - EVT_LABEL(10) - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_27) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(SetActionDifficultyTable, EVT_PTR(N(DifficultyTable))) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_SET(LVarA, 37) - EVT_SWITCH(LVarF) - EVT_CASE_EQ(0) - EVT_CALL(action_command_jump_start, LVarA, 1) - EVT_CASE_EQ(1) - EVT_CALL(action_command_jump_start, LVarA, 2) - EVT_CASE_EQ(2) - EVT_CALL(action_command_jump_start, LVarA, 3) - EVT_CASE_EQ(3) - EVT_CALL(action_command_jump_start, LVarA, 4) - EVT_CASE_DEFAULT - EVT_CALL(action_command_jump_start, LVarA, 5) - EVT_END_SWITCH - EVT_SUB(LVarD, 1) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_IF_EQ(LVarF, 0) - EVT_CALL(func_802752AC, 20, 3) - EVT_WAIT(7) - EVT_CALL(func_802752AC, 3, 6) - EVT_ELSE - EVT_CALL(func_802752AC, 20, 4) - EVT_WAIT(7) - EVT_CALL(func_802752AC, 3, 5) - EVT_END_IF - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE) - EVT_CALL(GetCommandAutoSuccess, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_IF_GT(LVarF, 3) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_CALL(N(GetHitChance)) - EVT_IF_GT(LVarF, LVar0) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 64) - EVT_ELSE - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 224) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 32) - EVT_END_SWITCH - EVT_SWITCH(LVarF) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) - EVT_CASE_EQ(3) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_CASE_DEFAULT - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_END_SWITCH - EVT_CALL(SetActionResult, LVarE) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_ADD(LVarF, 1) - EVT_CALL(N(IncrementHitCounter)) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(SetActionDifficultyTable, Ref(N(DifficultyTable))) + ExecWait(N(EVS_JumpSupport_Approach)) + ExecWait(N(EVS_JumpSupport_B)) + Call(action_command_jump_start, LVarA, 1) + Call(UseBattleCamPreset, BTL_CAM_PRESET_34) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_MarioB1_Stomp) + Call(func_80274A18, LVarA, 0) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + Call(GetActionResult, LVarE) + Call(N(IncrementHitCounter)) + Set(LVarD, 0) + Set(LVarF, 0) + Set(LFlag0, FALSE) + Label(10) + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_27) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(CloseActionCommandInfo) + Call(SetActionDifficultyTable, Ref(N(DifficultyTable))) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Set(LVarA, 37) + Switch(LVarF) + CaseEq(0) + Call(action_command_jump_start, LVarA, 1) + CaseEq(1) + Call(action_command_jump_start, LVarA, 2) + CaseEq(2) + Call(action_command_jump_start, LVarA, 3) + CaseEq(3) + Call(action_command_jump_start, LVarA, 4) + CaseDefault + Call(action_command_jump_start, LVarA, 5) + EndSwitch + Sub(LVarD, 1) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump) + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + IfEq(LVarF, 0) + Call(func_802752AC, 20, 3) + Wait(7) + Call(func_802752AC, 3, 6) + Else + Call(func_802752AC, 20, 4) + Wait(7) + Call(func_802752AC, 3, 5) + EndIf + Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) + Call(GetCommandAutoSuccess, LVar1) + IfEq(LVar1, 1) + IfGt(LVarF, 3) + Set(LFlag0, TRUE) + EndIf + EndIf + Call(N(GetHitChance)) + IfGt(LVarF, LVar0) + Set(LFlag0, TRUE) + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + IfEq(LFlag0, FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 64) + Else + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 224) + EndIf + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 32) + EndSwitch + Switch(LVarF) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) + CaseEq(3) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + CaseDefault + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + EndSwitch + Call(SetActionResult, LVarE) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + EndCaseGroup + EndSwitch + Add(LVarF, 1) + Call(N(IncrementHitCounter)) + Goto(10) + Return + End }; EvtScript N(EVS_UseMove_ImplC) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(SetActionDifficultyTable, EVT_PTR(N(DifficultyTable))) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Approach)) - EVT_EXEC_WAIT(N(EVS_JumpSupport_B)) - EVT_CALL(action_command_jump_start, LVarA, 1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_34) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_MarioB1_Stomp) - EVT_CALL(func_80274A18, LVarA, 0) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActionResult, LVarE) - EVT_CALL(N(IncrementHitCounter)) - EVT_SET(LVarD, 0) - EVT_SET(LVarF, 0) - EVT_SET(LFlag0, FALSE) - EVT_LABEL(10) - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_28) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(SetActionDifficultyTable, EVT_PTR(N(DifficultyTable))) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_SET(LVarA, 25) - EVT_SWITCH(LVarF) - EVT_CASE_EQ(0) - EVT_CALL(action_command_jump_start, LVarA, 1) - EVT_CASE_EQ(1) - EVT_CALL(action_command_jump_start, LVarA, 2) - EVT_CASE_EQ(2) - EVT_CALL(action_command_jump_start, LVarA, 3) - EVT_CASE_EQ(3) - EVT_CALL(action_command_jump_start, LVarA, 4) - EVT_CASE_DEFAULT - EVT_CALL(action_command_jump_start, LVarA, 5) - EVT_END_SWITCH - EVT_SUB(LVarD, 1) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_SpinFall) - EVT_IF_EQ(LVarF, 0) - EVT_CALL(func_80275F00, 25, 2) - EVT_ELSE - EVT_CALL(func_80275F00, 25, 4) - EVT_END_IF - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE) - EVT_CALL(GetCommandAutoSuccess, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_IF_GT(LVarF, 3) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_CALL(N(GetHitChance)) - EVT_IF_GT(LVarF, LVar0) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 64) - EVT_ELSE - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 224) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 32) - EVT_END_SWITCH - EVT_SWITCH(LVarF) - EVT_CASE_EQ(0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) - EVT_CASE_EQ(3) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_CASE_DEFAULT - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) - EVT_END_SWITCH - EVT_CALL(SetActionResult, LVarE) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_ADD(LVarF, 1) - EVT_CALL(N(IncrementHitCounter)) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(SetActionDifficultyTable, Ref(N(DifficultyTable))) + ExecWait(N(EVS_JumpSupport_Approach)) + ExecWait(N(EVS_JumpSupport_B)) + Call(action_command_jump_start, LVarA, 1) + Call(UseBattleCamPreset, BTL_CAM_PRESET_34) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_MarioB1_Stomp) + Call(func_80274A18, LVarA, 0) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + Call(GetActionResult, LVarE) + Call(N(IncrementHitCounter)) + Set(LVarD, 0) + Set(LVarF, 0) + Set(LFlag0, FALSE) + Label(10) + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_28) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(CloseActionCommandInfo) + Call(SetActionDifficultyTable, Ref(N(DifficultyTable))) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Set(LVarA, 25) + Switch(LVarF) + CaseEq(0) + Call(action_command_jump_start, LVarA, 1) + CaseEq(1) + Call(action_command_jump_start, LVarA, 2) + CaseEq(2) + Call(action_command_jump_start, LVarA, 3) + CaseEq(3) + Call(action_command_jump_start, LVarA, 4) + CaseDefault + Call(action_command_jump_start, LVarA, 5) + EndSwitch + Sub(LVarD, 1) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_SpinFall) + IfEq(LVarF, 0) + Call(func_80275F00, 25, 2) + Else + Call(func_80275F00, 25, 4) + EndIf + Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) + Call(GetCommandAutoSuccess, LVar1) + IfEq(LVar1, 1) + IfGt(LVarF, 3) + Set(LFlag0, TRUE) + EndIf + EndIf + Call(N(GetHitChance)) + IfGt(LVarF, LVar0) + Set(LFlag0, TRUE) + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + IfEq(LFlag0, FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 64) + Else + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 224) + EndIf + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVarC, LVarD, 32) + EndSwitch + Switch(LVarF) + CaseEq(0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_1) + CaseEq(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_2) + CaseEq(2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_3) + CaseEq(3) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + CaseDefault + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_JUMP_COMBO_4) + EndSwitch + Call(SetActionResult, LVarE) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + IfEq(LFlag0, TRUE) + ExecWait(N(EVS_JumpSupport_E)) + Return + EndIf + EndCaseGroup + EndSwitch + Add(LVarF, 1) + Call(N(IncrementHitCounter)) + Goto(10) + Return + End }; diff --git a/src/battle/move/jump/power_jump.c b/src/battle/move/jump/power_jump.c index 290a1abee0b..66794cdc44b 100644 --- a/src/battle/move/jump/power_jump.c +++ b/src/battle/move/jump/power_jump.c @@ -11,114 +11,114 @@ extern EvtScript N(EVS_UseMove_ImplB); extern EvtScript N(EVS_UseMove_ImplC); EvtScript N(EVS_UseMove) = { - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_UseMove_ImplA)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_UseMove_ImplB)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_UseMove_ImplC)) - EVT_END_SWITCH - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE) - EVT_RETURN - EVT_END + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + Call(ShowActionHud, TRUE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_UseMove_ImplA)) + CaseEq(1) + ExecWait(N(EVS_UseMove_ImplB)) + CaseEq(2) + ExecWait(N(EVS_UseMove_ImplC)) + EndSwitch + Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) + Return + End }; EvtScript N(EVS_802A26B4) = { - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) - EVT_CHILD_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.2)) - EVT_END_CHILD_THREAD - EVT_RETURN - EVT_END + Call(StartRumble, BTL_RUMBLE_PLAYER_HEAVY) + ChildThread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.2)) + EndChildThread + Return + End }; EvtScript N(EVS_UseMove_ImplA) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_802A26B4)) - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 4, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_GT(HIT_RESULT_HIT) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(N(EVS_JumpSupport_F)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + ExecWait(N(EVS_802A26B4)) + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 4, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseGt(HIT_RESULT_HIT) + ExecWait(N(EVS_JumpSupport_E)) + CaseDefault + ExecWait(N(EVS_JumpSupport_F)) + EndSwitch + Return + End }; EvtScript N(EVS_UseMove_ImplB) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_802A26B4)) - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 6, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 4, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_GT(HIT_RESULT_HIT) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(N(EVS_JumpSupport_F)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + ExecWait(N(EVS_802A26B4)) + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 6, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 4, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseGt(HIT_RESULT_HIT) + ExecWait(N(EVS_JumpSupport_E)) + CaseDefault + ExecWait(N(EVS_JumpSupport_F)) + EndSwitch + Return + End }; EvtScript N(EVS_UseMove_ImplC) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_802A26B4)) - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 8, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 5, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_GT(HIT_RESULT_HIT) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(N(EVS_JumpSupport_F)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + ExecWait(N(EVS_802A26B4)) + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 8, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 5, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseGt(HIT_RESULT_HIT) + ExecWait(N(EVS_JumpSupport_E)) + CaseDefault + ExecWait(N(EVS_JumpSupport_F)) + EndSwitch + Return + End }; diff --git a/src/battle/move/jump/shrink_stomp.c b/src/battle/move/jump/shrink_stomp.c index 8ed081e13c8..df6de406b33 100644 --- a/src/battle/move/jump/shrink_stomp.c +++ b/src/battle/move/jump/shrink_stomp.c @@ -12,175 +12,175 @@ extern EvtScript N(EVS_UseMove_Super); extern EvtScript N(EVS_UseMove_Ultra); EvtScript N(EVS_UseMove) = { - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_UseMove_Basic)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_UseMove_Super)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_UseMove_Ultra)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(ShowActionHud, TRUE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_UseMove_Basic)) + CaseEq(1) + ExecWait(N(EVS_UseMove_Super)) + CaseEq(2) + ExecWait(N(EVS_UseMove_Ultra)) + EndSwitch + Return + End }; EvtScript N(EVS_UseMove_Basic) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SHRINK, 3, 75), 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SHRINK, 3, 75), 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_27) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(GetActionResult, LVarF) - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(ShowActionHud, FALSE) - EVT_CALL(action_command_jump_start, 24, 3) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_SpinFall) - EVT_CALL(func_80274A18, 24, 3) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_ACTOR_JUMPED_1) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SHRINK, 3, 100), 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_CALL(SetActionResult, LVarF) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SHRINK, 3, 75), 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SHRINK, 3, 75), 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_27) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(GetActionResult, LVarF) + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(ShowActionHud, FALSE) + Call(action_command_jump_start, 24, 3) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_SpinFall) + Call(func_80274A18, 24, 3) + Wait(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_ACTOR_JUMPED_1) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SHRINK, 3, 100), 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + Call(SetActionResult, LVarF) + ExecWait(N(EVS_JumpSupport_E)) + Return + End }; EvtScript N(EVS_UseMove_Super) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_ACTOR_JUMPED_2) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SHRINK, 3, 75), 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_ACTOR_JUMPED_2) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SHRINK, 3, 75), 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActionResult, LVarF) - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_27) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(ShowActionHud, FALSE) - EVT_CALL(action_command_jump_start, 37, 3) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump) - EVT_CALL(func_802752AC, 20, 4) - EVT_WAIT(7) - EVT_CALL(func_802752AC, 3, 5) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_ACTOR_JUMPED_2) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SHRINK, 3, 100), 2, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_CALL(SetActionResult, LVarF) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_ACTOR_JUMPED_2) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SHRINK, 3, 75), 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_ACTOR_JUMPED_2) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SHRINK, 3, 75), 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + Call(GetActionResult, LVarF) + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_27) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(ShowActionHud, FALSE) + Call(action_command_jump_start, 37, 3) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump) + Call(func_802752AC, 20, 4) + Wait(7) + Call(func_802752AC, 3, 5) + Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) + Wait(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_ACTOR_JUMPED_2) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SHRINK, 3, 100), 2, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + Call(SetActionResult, LVarF) + ExecWait(N(EVS_JumpSupport_E)) + Return + End }; EvtScript N(EVS_UseMove_Ultra) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_ACTOR_JUMPED_3) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SHRINK, 3, 75), 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_ACTOR_JUMPED_3) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SHRINK, 3, 75), 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActionResult, LVarF) - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_28) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(ShowActionHud, FALSE) - EVT_CALL(action_command_jump_start, 25, 3) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_SpinFall) - EVT_CALL(func_80275F00, 25, 4) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_ACTOR_JUMPED_3) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SHRINK, 3, 100), 3, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_CALL(SetActionResult, LVarF) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_ACTOR_JUMPED_3) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SHRINK, 3, 75), 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_ACTOR_JUMPED_3) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SHRINK, 3, 75), 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + Call(GetActionResult, LVarF) + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_28) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(ShowActionHud, FALSE) + Call(action_command_jump_start, 25, 3) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_SpinFall) + Call(func_80275F00, 25, 4) + Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) + Wait(1) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_ACTOR_JUMPED_3) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SHRINK, 3, 100), 3, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + Call(SetActionResult, LVarF) + ExecWait(N(EVS_JumpSupport_E)) + Return + End }; diff --git a/src/battle/move/jump/sleep_stomp.c b/src/battle/move/jump/sleep_stomp.c index 48812a89438..abe4772eec2 100644 --- a/src/battle/move/jump/sleep_stomp.c +++ b/src/battle/move/jump/sleep_stomp.c @@ -12,175 +12,175 @@ extern EvtScript N(EVS_UseMove_Super); extern EvtScript N(EVS_UseMove_Ultra); EvtScript N(EVS_UseMove) = { - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_UseMove_Basic)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_UseMove_Super)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_UseMove_Ultra)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(ShowActionHud, TRUE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_UseMove_Basic)) + CaseEq(1) + ExecWait(N(EVS_UseMove_Super)) + CaseEq(2) + ExecWait(N(EVS_UseMove_Ultra)) + EndSwitch + Return + End }; EvtScript N(EVS_UseMove_Basic) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SLEEP, 3, 75), 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SLEEP, 3, 75), 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_27) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(GetActionResult, LVarF) - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(ShowActionHud, FALSE) - EVT_CALL(action_command_jump_start, 24, 3) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_SpinFall) - EVT_CALL(func_80274A18, 24, 3) - EVT_WAIT(1) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SLEEP, 3, 100), 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_CALL(SetActionResult, LVarF) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SLEEP, 3, 75), 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SLEEP, 3, 75), 1, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_27) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(GetActionResult, LVarF) + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(ShowActionHud, FALSE) + Call(action_command_jump_start, 24, 3) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_SpinFall) + Call(func_80274A18, 24, 3) + Wait(1) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SLEEP, 3, 100), 1, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + Call(SetActionResult, LVarF) + ExecWait(N(EVS_JumpSupport_E)) + Return + End }; EvtScript N(EVS_UseMove_Super) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SLEEP, 3, 75), 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SLEEP, 3, 75), 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActionResult, LVarF) - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_27) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(ShowActionHud, FALSE) - EVT_CALL(action_command_jump_start, 37, 3) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump) - EVT_CALL(func_802752AC, 20, 4) - EVT_WAIT(7) - EVT_CALL(func_802752AC, 3, 5) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE) - EVT_WAIT(1) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SLEEP, 3, 100), 2, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_CALL(SetActionResult, LVarF) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SLEEP, 3, 75), 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SLEEP, 3, 75), 2, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + Call(GetActionResult, LVarF) + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_27) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(ShowActionHud, FALSE) + Call(action_command_jump_start, 37, 3) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Sit, ANIM_Mario1_SpinJump) + Call(func_802752AC, 20, 4) + Wait(7) + Call(func_802752AC, 3, 5) + Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) + Wait(1) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SLEEP, 3, 100), 2, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + Call(SetActionResult, LVarF) + ExecWait(N(EVS_JumpSupport_E)) + Return + End }; EvtScript N(EVS_UseMove_Ultra) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(FALSE) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SLEEP, 3, 75), 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SLEEP, 3, 75), 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_JumpSupport_G)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(GetActionResult, LVarF) - EVT_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_28) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_35) - EVT_END_CHILD_THREAD - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(ShowActionHud, FALSE) - EVT_CALL(action_command_jump_start, 25, 3) - EVT_CALL(SetGoalToTarget, ACTOR_PLAYER) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_SpinFall) - EVT_CALL(func_80275F00, 25, 4) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE) - EVT_WAIT(1) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SLEEP, 3, 100), 3, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) - EVT_CALL(SetActionResult, LVarF) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(FALSE) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SLEEP, 3, 75), 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SLEEP, 3, 75), 3, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_JumpSupport_G)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + Call(GetActionResult, LVarF) + ChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_28) + Wait(5) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_35) + EndChildThread + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(ShowActionHud, FALSE) + Call(action_command_jump_start, 25, 3) + Call(SetGoalToTarget, ACTOR_PLAYER) + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Jump, ANIM_Mario1_SpinFall) + Call(func_80275F00, 25, 4) + Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) + Wait(1) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, DMG_STATUS_KEY(STATUS_FLAG_SLEEP, 3, 100), 3, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT | BS_FLAGS1_NO_RATING) + Call(SetActionResult, LVarF) + ExecWait(N(EVS_JumpSupport_E)) + Return + End }; diff --git a/src/battle/move/jump/super_jump.c b/src/battle/move/jump/super_jump.c index f78e18f1356..2a0b6e3424d 100644 --- a/src/battle/move/jump/super_jump.c +++ b/src/battle/move/jump/super_jump.c @@ -11,115 +11,115 @@ extern EvtScript N(EVS_UseMove_ImplB); extern EvtScript N(EVS_UseMove_ImplC); EvtScript N(EVS_UseMove) = { - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_UseMove_ImplA)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_UseMove_ImplB)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_UseMove_ImplC)) - EVT_END_SWITCH - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE) - EVT_RETURN - EVT_END + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + Call(ShowActionHud, TRUE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar1) + CaseEq(0) + ExecWait(N(EVS_UseMove_ImplA)) + CaseEq(1) + ExecWait(N(EVS_UseMove_ImplB)) + CaseEq(2) + ExecWait(N(EVS_UseMove_ImplC)) + EndSwitch + Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) + Return + End }; EvtScript N(EVS_802A26B4) = { - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(4.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(StartRumble, BTL_RUMBLE_PLAYER_EXTREME) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(4.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + EndThread + Return + End }; EvtScript N(EVS_UseMove_ImplA) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_802A26B4)) - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 5, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 4, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_GT(HIT_RESULT_HIT) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(N(EVS_JumpSupport_F)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + ExecWait(N(EVS_802A26B4)) + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(0) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 5, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_1, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 4, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseGt(HIT_RESULT_HIT) + ExecWait(N(EVS_JumpSupport_E)) + CaseDefault + ExecWait(N(EVS_JumpSupport_F)) + EndSwitch + Return + End }; EvtScript N(EVS_UseMove_ImplB) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_802A26B4)) - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 7, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 5, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_GT(HIT_RESULT_HIT) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(N(EVS_JumpSupport_F)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + ExecWait(N(EVS_802A26B4)) + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(0) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 7, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_2, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 5, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseGt(HIT_RESULT_HIT) + ExecWait(N(EVS_JumpSupport_E)) + CaseDefault + ExecWait(N(EVS_JumpSupport_F)) + EndSwitch + Return + End }; EvtScript N(EVS_UseMove_ImplC) = { - EVT_EXEC_WAIT(N(EVS_JumpSupport_InitCommand)) - EVT_CALL(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_EXEC_WAIT(N(EVS_JumpSupport_Miss)) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(GetPlayerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 9, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) - EVT_CALL(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 6, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_GT(HIT_RESULT_HIT) - EVT_EXEC_WAIT(N(EVS_JumpSupport_E)) - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(N(EVS_JumpSupport_F)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + ExecWait(N(EVS_JumpSupport_InitCommand)) + Call(PlayerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 1, 0) + IfEq(LVar0, HIT_RESULT_MISS) + ExecWait(N(EVS_JumpSupport_Miss)) + Return + EndIf + Wait(1) + Call(GetPlayerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(0) + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 9, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(SetActorSounds, ACTOR_PLAYER, ACTOR_SOUND_HURT, SOUND_ACTOR_JUMPED_3, SOUND_NONE) + Call(PlayerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, 6, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseGt(HIT_RESULT_HIT) + ExecWait(N(EVS_JumpSupport_E)) + CaseDefault + ExecWait(N(EVS_JumpSupport_F)) + EndSwitch + Return + End }; diff --git a/src/battle/move/star_power/chill_out.c b/src/battle/move/star_power/chill_out.c index e2c92f291bf..c21b8baf25b 100644 --- a/src/battle/move/star_power/chill_out.c +++ b/src/battle/move/star_power/chill_out.c @@ -115,89 +115,89 @@ API_CALLABLE(N(InflictChillOutHit)) { } EvtScript N(EVS_UsePower) = { - EVT_CALL(N(InitHitCheck)) - EVT_EXEC_WAIT(N(EVS_StarPower_WishForSpirit)) - EVT_SET_CONST(LVar0, ANIM_BattleMuskular_Idle) - EVT_EXEC_WAIT(N(EVS_StarPower_SpiritSummoned)) - EVT_CALL(SetNpcAnimation, NPC_BTL_SPIRIT, ANIM_BattleMuskular_Shout) - EVT_WAIT(16) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(PlaySound, SOUND_CHILL_OUT) - EVT_CALL(InitTargetIterator) - EVT_LABEL(10) - EVT_CALL(ItemCheckHit, LVar0, 0, 0, 0, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_GOTO(11) - EVT_END_IF - EVT_CALL(N(CanChillOutHit)) - EVT_IF_EQ(LVar0, TRUE) - EVT_CALL(GetOwnerTarget, LVarA, LVarB) - EVT_THREAD - EVT_LOOP(5) - EVT_CALL(SetActorScaleModifier, LVarA, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScaleModifier, LVarA, EVT_FLOAT(1.1), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScaleModifier, LVarA, EVT_FLOAT(1.2), EVT_FLOAT(0.95), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScaleModifier, LVarA, EVT_FLOAT(1.3), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScaleModifier, LVarA, EVT_FLOAT(1.35), EVT_FLOAT(0.85), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScaleModifier, LVarA, EVT_FLOAT(1.38), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScaleModifier, LVarA, EVT_FLOAT(1.4), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScaleModifier, LVarA, EVT_FLOAT(1.3), EVT_FLOAT(0.85), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScaleModifier, LVarA, EVT_FLOAT(1.2), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScaleModifier, LVarA, EVT_FLOAT(1.1), EVT_FLOAT(0.95), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorScaleModifier, LVarA, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_END_IF - EVT_LABEL(11) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(10) - EVT_END_IF - EVT_LOOP(30) - EVT_CALL(N(SpawnChillOutFX)) - EVT_WAIT(2) - EVT_END_LOOP - EVT_CALL(ChooseNextTarget, ITER_FIRST, 0) - EVT_LABEL(0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(ItemCheckHit, LVar0, 0, 0, 0, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(N(CanChillOutHit)) - EVT_IF_EQ(LVar0, TRUE) - EVT_CALL(N(InflictChillOutHit)) - EVT_ELSE - EVT_CALL(PlayerDamageEnemy, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 0, BS_FLAGS1_FORCE_IMMUNE_HIT | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_IF - EVT_LABEL(1) - EVT_WAIT(5) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(N(DidMoveHit)) - EVT_IF_EQ(LVar0, TRUE) - EVT_CALL(ShowMessageBox, BTL_MSG_CHILL_OUT_BEGIN, 60) - EVT_END_IF - EVT_CALL(PlayerYieldTurn) - EVT_EXEC_WAIT(N(EVS_StarPower_SpiritDeparts)) - EVT_EXEC_WAIT(N(EVS_StarPower_EndWish)) - EVT_CALL(N(DidMoveHit)) - EVT_IF_EQ(LVar0, TRUE) - EVT_CALL(WaitForMessageBoxDone) - EVT_END_IF - EVT_RETURN - EVT_END + Call(N(InitHitCheck)) + ExecWait(N(EVS_StarPower_WishForSpirit)) + SetConst(LVar0, ANIM_BattleMuskular_Idle) + ExecWait(N(EVS_StarPower_SpiritSummoned)) + Call(SetNpcAnimation, NPC_BTL_SPIRIT, ANIM_BattleMuskular_Shout) + Wait(16) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(PlaySound, SOUND_CHILL_OUT) + Call(InitTargetIterator) + Label(10) + Call(ItemCheckHit, LVar0, 0, 0, 0, 0) + IfEq(LVar0, HIT_RESULT_MISS) + Goto(11) + EndIf + Call(N(CanChillOutHit)) + IfEq(LVar0, TRUE) + Call(GetOwnerTarget, LVarA, LVarB) + Thread + Loop(5) + Call(SetActorScaleModifier, LVarA, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorScaleModifier, LVarA, Float(1.1), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorScaleModifier, LVarA, Float(1.2), Float(0.95), Float(1.0)) + Wait(1) + Call(SetActorScaleModifier, LVarA, Float(1.3), Float(0.9), Float(1.0)) + Wait(1) + Call(SetActorScaleModifier, LVarA, Float(1.35), Float(0.85), Float(1.0)) + Wait(1) + Call(SetActorScaleModifier, LVarA, Float(1.38), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScaleModifier, LVarA, Float(1.4), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScaleModifier, LVarA, Float(1.3), Float(0.85), Float(1.0)) + Wait(1) + Call(SetActorScaleModifier, LVarA, Float(1.2), Float(0.9), Float(1.0)) + Wait(1) + Call(SetActorScaleModifier, LVarA, Float(1.1), Float(0.95), Float(1.0)) + Wait(1) + EndLoop + Call(SetActorScaleModifier, LVarA, Float(1.0), Float(1.0), Float(1.0)) + EndThread + EndIf + Label(11) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(10) + EndIf + Loop(30) + Call(N(SpawnChillOutFX)) + Wait(2) + EndLoop + Call(ChooseNextTarget, ITER_FIRST, 0) + Label(0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(ItemCheckHit, LVar0, 0, 0, 0, 0) + IfEq(LVar0, HIT_RESULT_MISS) + Goto(1) + EndIf + Call(N(CanChillOutHit)) + IfEq(LVar0, TRUE) + Call(N(InflictChillOutHit)) + Else + Call(PlayerDamageEnemy, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 0, BS_FLAGS1_FORCE_IMMUNE_HIT | BS_FLAGS1_TRIGGER_EVENTS) + EndIf + Label(1) + Wait(5) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Wait(5) + Call(N(DidMoveHit)) + IfEq(LVar0, TRUE) + Call(ShowMessageBox, BTL_MSG_CHILL_OUT_BEGIN, 60) + EndIf + Call(PlayerYieldTurn) + ExecWait(N(EVS_StarPower_SpiritDeparts)) + ExecWait(N(EVS_StarPower_EndWish)) + Call(N(DidMoveHit)) + IfEq(LVar0, TRUE) + Call(WaitForMessageBoxDone) + EndIf + Return + End }; diff --git a/src/battle/move/star_power/focus.c b/src/battle/move/star_power/focus.c index c851fa14333..ee04aa12f65 100644 --- a/src/battle/move/star_power/focus.c +++ b/src/battle/move/star_power/focus.c @@ -56,52 +56,52 @@ API_CALLABLE(N(RestoreStarPowerFromPartner)) { } EvtScript N(EVS_UsePower) = { - EVT_EXEC_WAIT(N(EVS_StarPower_WishForSpirit)) - EVT_CALL(EnableBattleStatusBar, TRUE) - EVT_CALL(GetOwnerID, LVarA) - EVT_IF_EQ(LVarA, ACTOR_PLAYER) - EVT_CALL(PlaySound, SOUND_STAR_POWER_RECOVERY) - EVT_CALL(N(RestoreStarPowerFromPlayer)) - EVT_WAIT(30) - EVT_CALL(N(FadeBackgroundLighten)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(RESTORE_NOT_FULL) - EVT_CALL(ShowMessageBox, BTL_MSG_STAR_POWER_RECHARGED, 60) - EVT_CASE_EQ(RESTORE_ALREADY_FULL) - EVT_CALL(ShowMessageBox, BTL_MSG_STAR_POWER_MAXED, 60) - EVT_CASE_EQ(RESTORE_NOW_FULL) - EVT_CALL(ShowMessageBox, BTL_MSG_STAR_POWER_FILLED, 60) - EVT_END_SWITCH - EVT_CALL(WaitForMessageBoxDone) - EVT_CALL(PlayerYieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(PlayerRunToGoal, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_ELSE - EVT_CALL(PlaySound, SOUND_STAR_POWER_RECOVERY) - EVT_CALL(N(RestoreStarPowerFromPartner)) - EVT_WAIT(30) - EVT_CALL(N(FadeBackgroundLighten)) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(RESTORE_NOT_FULL) - EVT_CALL(ShowMessageBox, BTL_MSG_STAR_POWER_RECHARGED, 60) - EVT_CASE_EQ(RESTORE_ALREADY_FULL) - EVT_CALL(ShowMessageBox, BTL_MSG_STAR_POWER_MAXED, 60) - EVT_CASE_EQ(RESTORE_NOW_FULL) - EVT_CALL(ShowMessageBox, BTL_MSG_STAR_POWER_FILLED, 60) - EVT_END_SWITCH - EVT_CALL(WaitForMessageBoxDone) - EVT_CALL(PartnerYieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(8.0)) - EVT_CALL(N(SetPartnerWishAnim), PARTNER_WISH_ANIM_RETURN) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(N(SetPartnerWishAnim), PARTNER_WISH_ANIM_IDLE) - EVT_END_IF - EVT_RETURN - EVT_END + ExecWait(N(EVS_StarPower_WishForSpirit)) + Call(EnableBattleStatusBar, TRUE) + Call(GetOwnerID, LVarA) + IfEq(LVarA, ACTOR_PLAYER) + Call(PlaySound, SOUND_STAR_POWER_RECOVERY) + Call(N(RestoreStarPowerFromPlayer)) + Wait(30) + Call(N(FadeBackgroundLighten)) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Switch(LVar0) + CaseEq(RESTORE_NOT_FULL) + Call(ShowMessageBox, BTL_MSG_STAR_POWER_RECHARGED, 60) + CaseEq(RESTORE_ALREADY_FULL) + Call(ShowMessageBox, BTL_MSG_STAR_POWER_MAXED, 60) + CaseEq(RESTORE_NOW_FULL) + Call(ShowMessageBox, BTL_MSG_STAR_POWER_FILLED, 60) + EndSwitch + Call(WaitForMessageBoxDone) + Call(PlayerYieldTurn) + Call(SetGoalToHome, ACTOR_PLAYER) + Call(SetActorSpeed, ACTOR_PLAYER, Float(8.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(PlayerRunToGoal, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Else + Call(PlaySound, SOUND_STAR_POWER_RECOVERY) + Call(N(RestoreStarPowerFromPartner)) + Wait(30) + Call(N(FadeBackgroundLighten)) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Switch(LVar0) + CaseEq(RESTORE_NOT_FULL) + Call(ShowMessageBox, BTL_MSG_STAR_POWER_RECHARGED, 60) + CaseEq(RESTORE_ALREADY_FULL) + Call(ShowMessageBox, BTL_MSG_STAR_POWER_MAXED, 60) + CaseEq(RESTORE_NOW_FULL) + Call(ShowMessageBox, BTL_MSG_STAR_POWER_FILLED, 60) + EndSwitch + Call(WaitForMessageBoxDone) + Call(PartnerYieldTurn) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(8.0)) + Call(N(SetPartnerWishAnim), PARTNER_WISH_ANIM_RETURN) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(N(SetPartnerWishAnim), PARTNER_WISH_ANIM_IDLE) + EndIf + Return + End }; diff --git a/src/battle/move/star_power/lullaby.c b/src/battle/move/star_power/lullaby.c index 0b7f6cc8372..96e45a5bf9b 100644 --- a/src/battle/move/star_power/lullaby.c +++ b/src/battle/move/star_power/lullaby.c @@ -35,34 +35,34 @@ API_CALLABLE(N(SpawnMusicNotesFX)) { } EvtScript N(EVS_UsePower) = { - EVT_EXEC_WAIT(N(EVS_StarPower_WishForSpirit)) - EVT_SET_CONST(LVar0, ANIM_BattleMamar_Idle) - EVT_EXEC_WAIT(N(EVS_StarPower_SpiritSummoned)) - EVT_CALL(SetNpcAnimation, NPC_BTL_SPIRIT, ANIM_BattleMamar_Shout) - EVT_WAIT(16) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_WAIT(15) - EVT_CALL(PlaySound, SOUND_LULLABY) - EVT_CALL(N(SpawnMusicNotesFX)) - EVT_WAIT(30) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(ItemCheckHit, LVar0, 0, 0, 0, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(ItemDamageEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_STATUS_ALWAYS_HITS, DMG_STATUS_KEY(STATUS_FLAG_SLEEP, 3, 100), 0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_LABEL(1) - EVT_WAIT(5) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(PlayerYieldTurn) - EVT_EXEC_WAIT(N(EVS_StarPower_SpiritDeparts)) - EVT_EXEC_WAIT(N(EVS_StarPower_EndWish)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_StarPower_WishForSpirit)) + SetConst(LVar0, ANIM_BattleMamar_Idle) + ExecWait(N(EVS_StarPower_SpiritSummoned)) + Call(SetNpcAnimation, NPC_BTL_SPIRIT, ANIM_BattleMamar_Shout) + Wait(16) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Wait(15) + Call(PlaySound, SOUND_LULLABY) + Call(N(SpawnMusicNotesFX)) + Wait(30) + Call(InitTargetIterator) + Label(0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(ItemCheckHit, LVar0, 0, 0, 0, 0) + IfEq(LVar0, HIT_RESULT_MISS) + Goto(1) + EndIf + Call(ItemDamageEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_STATUS_ALWAYS_HITS, DMG_STATUS_KEY(STATUS_FLAG_SLEEP, 3, 100), 0, BS_FLAGS1_TRIGGER_EVENTS) + Label(1) + Wait(5) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Wait(5) + Call(PlayerYieldTurn) + ExecWait(N(EVS_StarPower_SpiritDeparts)) + ExecWait(N(EVS_StarPower_EndWish)) + Return + End }; diff --git a/src/battle/move/star_power/peach_beam.c b/src/battle/move/star_power/peach_beam.c index 36d678cfa58..c5ef19fd6d0 100644 --- a/src/battle/move/star_power/peach_beam.c +++ b/src/battle/move/star_power/peach_beam.c @@ -8,41 +8,41 @@ #include "battle/common/move/StarBeamSupport.inc.c" EvtScript N(EVS_UsePower) = { - EVT_EXEC_WAIT(N(EVS_StarPower_WishForBeam)) - EVT_CALL(AddBattleCamZoom, 100) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_THREAD - EVT_CALL(N(ProcessPeachStarBeam), TRUE) - EVT_END_THREAD - EVT_WAIT(10) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(N(GetStage)) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(ItemDamageEnemy, LVar0, DAMAGE_TYPE_PEACH_BEAM | DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, 0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(N(GetStage)) - EVT_IF_EQ(LVar0, 2) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(N(unkStarBeamBgFunc)) - EVT_CALL(PlayerYieldTurn) - EVT_EXEC_WAIT(N(EVS_StarPower_EndWish)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_StarPower_WishForBeam)) + Call(AddBattleCamZoom, 100) + Call(MoveBattleCamOver, 20) + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_SELF) + Thread + Call(N(ProcessPeachStarBeam), TRUE) + EndThread + Wait(10) + Loop(0) + Wait(1) + Call(N(GetStage)) + IfEq(LVar0, 1) + BreakLoop + EndIf + EndLoop + Call(InitTargetIterator) + Label(0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(ItemDamageEnemy, LVar0, DAMAGE_TYPE_PEACH_BEAM | DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, 0, BS_FLAGS1_TRIGGER_EVENTS) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Loop(0) + Wait(1) + Call(N(GetStage)) + IfEq(LVar0, 2) + BreakLoop + EndIf + EndLoop + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(N(unkStarBeamBgFunc)) + Call(PlayerYieldTurn) + ExecWait(N(EVS_StarPower_EndWish)) + Return + End }; diff --git a/src/battle/move/star_power/peach_focus.c b/src/battle/move/star_power/peach_focus.c index 4bbeb18224a..12e9dcf9853 100644 --- a/src/battle/move/star_power/peach_focus.c +++ b/src/battle/move/star_power/peach_focus.c @@ -23,77 +23,77 @@ API_CALLABLE(N(IncreaseTwinkDefense)) { } EvtScript N(EVS_UsePower) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_69) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach1_Run) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 16) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(PlayerRunToGoal, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach2_Startle) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 30) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 60) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 90) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 120) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 150) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 180) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, -105, -7, 0) - EVT_CALL(SetBattleCamZoom, 213) - EVT_CALL(MoveBattleCamOver, 60) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach3_Pray) - EVT_CALL(PlaySound, SOUND_BEGIN_WISH) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(N(SpawnStarSparkleFX), LVar0, LVar1, LVar2) - EVT_CALL(N(FadeBackgroundDarken)) - EVT_CALL(GetActorVar, ACTOR_PARTNER, AVAR_Twink_PowerLevel, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ActorSpeak, MSG_CH8_0096, ACTOR_PLAYER, 0, ANIM_Peach3_Pray, ANIM_Peach3_Pray) - EVT_END_IF - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach1_Idle) - EVT_WAIT(10) - EVT_CALL(PlaySound, SOUND_WISH_ASCENDING) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(N(SpawnWishSparkleFX), LVar0, LVar1, LVar2) - EVT_WAIT(30) - EVT_CALL(PlaySound, SOUND_STAR_POWER_RECOVERY) - EVT_CALL(GetActorVar, ACTOR_PARTNER, AVAR_Twink_PowerLevel, LVar0) - EVT_ADD(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_PARTNER, AVAR_Twink_PowerLevel, LVar0) - EVT_CALL(ModifyActorDecoration, ACTOR_PARTNER, 1, 0, LVar0, 0, 0, 0) - EVT_CALL(GetActorVar, ACTOR_PARTNER, AVAR_Twink_DefensePtr, LVar0) - EVT_CALL(N(IncreaseTwinkDefense)) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetActorYaw, ACTOR_SELF, 150) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_SELF, 120) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_SELF, 90) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_SELF, 60) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_SELF, 30) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_WAIT(1) - EVT_CALL(PlayerYieldTurn) - EVT_CALL(N(FadeBackgroundLighten)) - EVT_WAIT(15) - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach1_Run) - EVT_CALL(PlayerRunToGoal, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach1_Walk) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_PRESET_69) + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach1_Run) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 16) + Call(SetActorSpeed, ACTOR_PLAYER, Float(4.0)) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(PlayerRunToGoal, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach2_Startle) + Call(SetActorYaw, ACTOR_PLAYER, 30) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 60) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 90) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 120) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 150) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 180) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, -105, -7, 0) + Call(SetBattleCamZoom, 213) + Call(MoveBattleCamOver, 60) + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach3_Pray) + Call(PlaySound, SOUND_BEGIN_WISH) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(N(SpawnStarSparkleFX), LVar0, LVar1, LVar2) + Call(N(FadeBackgroundDarken)) + Call(GetActorVar, ACTOR_PARTNER, AVAR_Twink_PowerLevel, LVar0) + IfEq(LVar0, 0) + Call(ActorSpeak, MSG_CH8_0096, ACTOR_PLAYER, 0, ANIM_Peach3_Pray, ANIM_Peach3_Pray) + EndIf + Wait(20) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach1_Idle) + Wait(10) + Call(PlaySound, SOUND_WISH_ASCENDING) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(N(SpawnWishSparkleFX), LVar0, LVar1, LVar2) + Wait(30) + Call(PlaySound, SOUND_STAR_POWER_RECOVERY) + Call(GetActorVar, ACTOR_PARTNER, AVAR_Twink_PowerLevel, LVar0) + Add(LVar0, 1) + Call(SetActorVar, ACTOR_PARTNER, AVAR_Twink_PowerLevel, LVar0) + Call(ModifyActorDecoration, ACTOR_PARTNER, 1, 0, LVar0, 0, 0, 0) + Call(GetActorVar, ACTOR_PARTNER, AVAR_Twink_DefensePtr, LVar0) + Call(N(IncreaseTwinkDefense)) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetActorYaw, ACTOR_SELF, 150) + Wait(1) + Call(SetActorYaw, ACTOR_SELF, 120) + Wait(1) + Call(SetActorYaw, ACTOR_SELF, 90) + Wait(1) + Call(SetActorYaw, ACTOR_SELF, 60) + Wait(1) + Call(SetActorYaw, ACTOR_SELF, 30) + Wait(1) + Call(SetActorYaw, ACTOR_SELF, 0) + Wait(1) + Call(PlayerYieldTurn) + Call(N(FadeBackgroundLighten)) + Wait(15) + Call(SetGoalToHome, ACTOR_PLAYER) + Call(SetActorSpeed, ACTOR_PLAYER, Float(8.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach1_Run) + Call(PlayerRunToGoal, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach1_Walk) + Return + End }; diff --git a/src/battle/move/star_power/peach_focus_alt.c b/src/battle/move/star_power/peach_focus_alt.c index e84304fb509..391e81def3f 100644 --- a/src/battle/move/star_power/peach_focus_alt.c +++ b/src/battle/move/star_power/peach_focus_alt.c @@ -27,36 +27,36 @@ API_CALLABLE(N(RestoreStarPower)) { } EvtScript N(EVS_UsePower) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_69) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach2_SpreadArms) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 16) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(PlayerRunToGoal, 0) - EVT_WAIT(8) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(N(SpawnStarSparkleFX), LVar0, LVar1, LVar2) - EVT_CALL(N(FadeBackgroundDarken)) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach3_Pray) - EVT_WAIT(10) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(N(SpawnWishSparkleFX), LVar0, LVar1, LVar2) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach2_Curious) - EVT_CALL(N(RestoreStarPower)) - EVT_WAIT(10) - EVT_CALL(N(FadeBackgroundLighten)) - EVT_WAIT(15) - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach1_Run) - EVT_CALL(PlayerRunToGoal, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach1_Idle) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_PRESET_69) + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach2_SpreadArms) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 16) + Call(SetActorSpeed, ACTOR_PLAYER, Float(4.0)) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(PlayerRunToGoal, 0) + Wait(8) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(N(SpawnStarSparkleFX), LVar0, LVar1, LVar2) + Call(N(FadeBackgroundDarken)) + Wait(20) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach3_Pray) + Wait(10) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(N(SpawnWishSparkleFX), LVar0, LVar1, LVar2) + Wait(30) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach2_Curious) + Call(N(RestoreStarPower)) + Wait(10) + Call(N(FadeBackgroundLighten)) + Wait(15) + Call(SetGoalToHome, ACTOR_PLAYER) + Call(SetActorSpeed, ACTOR_PLAYER, Float(8.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach1_Run) + Call(PlayerRunToGoal, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach1_Idle) + Return + End }; diff --git a/src/battle/move/star_power/refresh.c b/src/battle/move/star_power/refresh.c index 15fef9088fa..4467d7398c7 100644 --- a/src/battle/move/star_power/refresh.c +++ b/src/battle/move/star_power/refresh.c @@ -131,37 +131,37 @@ API_CALLABLE(N(SpawnFlowerRecoverFX)) { } EvtScript N(EVS_UsePower) = { - EVT_EXEC_WAIT(N(EVS_StarPower_WishForSpirit)) - EVT_SET_CONST(LVar0, ANIM_BattleEldstar_Idle) - EVT_EXEC_WAIT(N(EVS_StarPower_SpiritSummoned)) - EVT_CALL(SetNpcAnimation, NPC_BTL_SPIRIT, ANIM_BattleEldstar_Shout) - EVT_WAIT(16) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_END_THREAD - EVT_CALL(PlaySound, SOUND_REFRESH) - EVT_CALL(EnableNpcBlur, NPC_BTL_SPIRIT, TRUE) - EVT_CALL(N(FlyAroundPlayer), NPC_BTL_SPIRIT) - EVT_CALL(EnableNpcBlur, NPC_BTL_SPIRIT, FALSE) - EVT_CALL(DeleteNpc, NPC_BTL_SPIRIT) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 0) - EVT_ADD(LVar1, 35) - EVT_CALL(N(SpawnHeartRecoverFX), LVar0, LVar1, LVar2, 5) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_ADD(LVar1, 25) - EVT_CALL(N(SpawnFlowerRecoverFX), LVar0, LVar1, LVar2, 5) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 25) - EVT_CALL(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, 5) - EVT_CALL(N(AddHP), 5) - EVT_CALL(N(AddFP), 5) - EVT_CALL(N(RemovePlayerDebuffs)) - EVT_WAIT(30) - EVT_CALL(PlayerYieldTurn) - EVT_EXEC_WAIT(N(EVS_StarPower_EndWish)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_StarPower_WishForSpirit)) + SetConst(LVar0, ANIM_BattleEldstar_Idle) + ExecWait(N(EVS_StarPower_SpiritSummoned)) + Call(SetNpcAnimation, NPC_BTL_SPIRIT, ANIM_BattleEldstar_Shout) + Wait(16) + Thread + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + EndThread + Call(PlaySound, SOUND_REFRESH) + Call(EnableNpcBlur, NPC_BTL_SPIRIT, TRUE) + Call(N(FlyAroundPlayer), NPC_BTL_SPIRIT) + Call(EnableNpcBlur, NPC_BTL_SPIRIT, FALSE) + Call(DeleteNpc, NPC_BTL_SPIRIT) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 0) + Add(LVar1, 35) + Call(N(SpawnHeartRecoverFX), LVar0, LVar1, LVar2, 5) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Add(LVar1, 25) + Call(N(SpawnFlowerRecoverFX), LVar0, LVar1, LVar2, 5) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 25) + Call(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, 5) + Call(N(AddHP), 5) + Call(N(AddFP), 5) + Call(N(RemovePlayerDebuffs)) + Wait(30) + Call(PlayerYieldTurn) + ExecWait(N(EVS_StarPower_EndWish)) + Return + End }; diff --git a/src/battle/move/star_power/smooch.c b/src/battle/move/star_power/smooch.c index c73acebd97c..76cc50858ca 100644 --- a/src/battle/move/star_power/smooch.c +++ b/src/battle/move/star_power/smooch.c @@ -30,145 +30,145 @@ Vec2i N(RecoverEffectPositions)[] = { }; EvtScript N(EVS_UsePower) = { - EVT_EXEC_WAIT(N(EVS_StarPower_WishForSpirit)) - EVT_SET_CONST(LVar0, ANIM_BattleMisstar_Still) - EVT_EXEC_WAIT(N(EVS_StarPower_SpiritSummoned)) - EVT_WAIT(16) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetNpcRotation, NPC_BTL_SPIRIT, 0, 180, 0) - EVT_WAIT(1) - EVT_CALL(SetNpcRotation, NPC_BTL_SPIRIT, 0, 150, 0) - EVT_WAIT(1) - EVT_CALL(SetNpcRotation, NPC_BTL_SPIRIT, 0, 120, 0) - EVT_WAIT(1) - EVT_CALL(SetNpcRotation, NPC_BTL_SPIRIT, 0, 90, 0) - EVT_WAIT(1) - EVT_CALL(SetNpcRotation, NPC_BTL_SPIRIT, 0, 60, 0) - EVT_WAIT(1) - EVT_CALL(SetNpcRotation, NPC_BTL_SPIRIT, 0, 30, 0) - EVT_WAIT(1) - EVT_CALL(SetNpcRotation, NPC_BTL_SPIRIT, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 25) - EVT_ADD(LVar0, 30) - EVT_CALL(NpcFlyTo, NPC_BTL_SPIRIT, LVar0, LVar1, LVar2, 20, 0, EASING_COS_IN_OUT) - EVT_WAIT(15) - EVT_CALL(SetNpcAnimation, NPC_BTL_SPIRIT, ANIM_BattleMisstar_Idle) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 15) - EVT_ADD(LVar1, 15) - EVT_ADD(LVar2, -5) - EVT_CALL(NpcFlyTo, NPC_BTL_SPIRIT, LVar0, LVar1, LVar2, 10, 0, EASING_COS_IN_OUT) - EVT_CALL(PlaySound, SOUND_SMOOCH) - EVT_THREAD - EVT_PLAY_EFFECT(EFFECT_RECOVER, 2, LVar0, LVar1, LVar2, 1, 0) - EVT_WAIT(2) - EVT_USE_BUF(EVT_PTR(N(RecoverEffectPositions))) - EVT_LOOP(ARRAY_COUNT(N(RecoverEffectPositions))) - EVT_BUF_READ2(LVar5, LVar6) - EVT_SET(LVar3, LVar0) - EVT_SET(LVar4, LVar1) - EVT_ADD(LVar3, LVar5) - EVT_ADD(LVar4, LVar6) - EVT_PLAY_EFFECT(EFFECT_RECOVER, 2, LVar3, LVar4, LVar2, 1, 0) - EVT_WAIT(2) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_ADD(LVar0, 5) - EVT_CALL(N(SpawnStarSparkleFX), LVar0, LVar1, LVar2) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar0, 25) - EVT_CALL(NpcFlyTo, NPC_BTL_SPIRIT, LVar0, LVar1, LVar2, 10, 0, EASING_COS_IN_OUT) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_FallBack) - EVT_WAIT(12) - EVT_THREAD - EVT_EXEC_WAIT(N(EVS_StarPower_SpiritDeparts)) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(2) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.2), EVT_FLOAT(0.95), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.35), EVT_FLOAT(0.85), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.38), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.4), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.85), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.2), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(0.95), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.2), EVT_FLOAT(0.95), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.9), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.35), EVT_FLOAT(0.85), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.38), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.4), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.9), EVT_FLOAT(1.3), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.9), EVT_FLOAT(1.2), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.95), EVT_FLOAT(1.1), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_LOOP(10) - EVT_WAIT(3) - EVT_END_LOOP - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 0) - EVT_ADD(LVar1, 35) - EVT_CALL(N(SpawnRecoverFX), LVar0, LVar1, LVar2, 20) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 25) - EVT_CALL(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, 20) - EVT_CALL(N(AddHP), 20) - EVT_THREAD - EVT_CALL(N(FadeBackgroundLighten)) - EVT_END_THREAD - EVT_CALL(PlayerYieldTurn) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 20, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(PlayerRunToGoal, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_RETURN - EVT_END + ExecWait(N(EVS_StarPower_WishForSpirit)) + SetConst(LVar0, ANIM_BattleMisstar_Still) + ExecWait(N(EVS_StarPower_SpiritSummoned)) + Wait(16) + Thread + Wait(10) + Call(SetNpcRotation, NPC_BTL_SPIRIT, 0, 180, 0) + Wait(1) + Call(SetNpcRotation, NPC_BTL_SPIRIT, 0, 150, 0) + Wait(1) + Call(SetNpcRotation, NPC_BTL_SPIRIT, 0, 120, 0) + Wait(1) + Call(SetNpcRotation, NPC_BTL_SPIRIT, 0, 90, 0) + Wait(1) + Call(SetNpcRotation, NPC_BTL_SPIRIT, 0, 60, 0) + Wait(1) + Call(SetNpcRotation, NPC_BTL_SPIRIT, 0, 30, 0) + Wait(1) + Call(SetNpcRotation, NPC_BTL_SPIRIT, 0, 0, 0) + EndThread + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 25) + Add(LVar0, 30) + Call(NpcFlyTo, NPC_BTL_SPIRIT, LVar0, LVar1, LVar2, 20, 0, EASING_COS_IN_OUT) + Wait(15) + Call(SetNpcAnimation, NPC_BTL_SPIRIT, ANIM_BattleMisstar_Idle) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 15) + Add(LVar1, 15) + Add(LVar2, -5) + Call(NpcFlyTo, NPC_BTL_SPIRIT, LVar0, LVar1, LVar2, 10, 0, EASING_COS_IN_OUT) + Call(PlaySound, SOUND_SMOOCH) + Thread + PlayEffect(EFFECT_RECOVER, 2, LVar0, LVar1, LVar2, 1, 0) + Wait(2) + UseBuf(Ref(N(RecoverEffectPositions))) + Loop(ARRAY_COUNT(N(RecoverEffectPositions))) + BufRead2(LVar5, LVar6) + Set(LVar3, LVar0) + Set(LVar4, LVar1) + Add(LVar3, LVar5) + Add(LVar4, LVar6) + PlayEffect(EFFECT_RECOVER, 2, LVar3, LVar4, LVar2, 1, 0) + Wait(2) + EndLoop + EndThread + Thread + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 15) + Add(LVar0, 5) + Call(N(SpawnStarSparkleFX), LVar0, LVar1, LVar2) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Add(LVar0, 25) + Call(NpcFlyTo, NPC_BTL_SPIRIT, LVar0, LVar1, LVar2, 10, 0, EASING_COS_IN_OUT) + EndThread + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_FallBack) + Wait(12) + Thread + ExecWait(N(EVS_StarPower_SpiritDeparts)) + EndThread + Thread + Loop(2) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.2), Float(0.95), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.9), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.35), Float(0.85), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.38), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.4), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.85), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.2), Float(0.9), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(0.95), Float(1.0)) + Wait(1) + EndLoop + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.1), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.2), Float(0.95), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.3), Float(0.9), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.35), Float(0.85), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.38), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.4), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.9), Float(1.3), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.9), Float(1.2), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(0.95), Float(1.1), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + EndThread + Loop(10) + Wait(3) + EndLoop + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 0) + Add(LVar1, 35) + Call(N(SpawnRecoverFX), LVar0, LVar1, LVar2, 20) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 25) + Call(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, 20) + Call(N(AddHP), 20) + Thread + Call(N(FadeBackgroundLighten)) + EndThread + Call(PlayerYieldTurn) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.0)) + Call(SetActorSpeed, ACTOR_PLAYER, Float(1.0)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 20, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) + Wait(4) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(SetGoalToHome, ACTOR_PLAYER) + Call(SetActorSpeed, ACTOR_PLAYER, Float(8.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(PlayerRunToGoal, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Return + End }; diff --git a/src/battle/move/star_power/star_beam.c b/src/battle/move/star_power/star_beam.c index e4e86d35194..382a58e3868 100644 --- a/src/battle/move/star_power/star_beam.c +++ b/src/battle/move/star_power/star_beam.c @@ -8,41 +8,41 @@ #include "battle/common/move/StarBeamSupport.inc.c" EvtScript N(EVS_UsePower) = { - EVT_EXEC_WAIT(N(EVS_StarPower_WishForBeam)) - EVT_CALL(AddBattleCamZoom, 100) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_THREAD - EVT_CALL(N(ProcessPeachStarBeam), FALSE) - EVT_END_THREAD - EVT_WAIT(10) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(N(GetStage)) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(ItemDamageEnemy, LVar0, DAMAGE_TYPE_REMOVE_BUFFS | DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, 0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(N(GetStage)) - EVT_IF_EQ(LVar0, 2) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(N(unkStarBeamBgFunc)) - EVT_CALL(PlayerYieldTurn) - EVT_EXEC_WAIT(N(EVS_StarPower_EndWish)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_StarPower_WishForBeam)) + Call(AddBattleCamZoom, 100) + Call(MoveBattleCamOver, 20) + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_SELF) + Thread + Call(N(ProcessPeachStarBeam), FALSE) + EndThread + Wait(10) + Loop(0) + Wait(1) + Call(N(GetStage)) + IfEq(LVar0, 1) + BreakLoop + EndIf + EndLoop + Call(InitTargetIterator) + Label(0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(ItemDamageEnemy, LVar0, DAMAGE_TYPE_REMOVE_BUFFS | DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, 0, BS_FLAGS1_TRIGGER_EVENTS) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Loop(0) + Wait(1) + Call(N(GetStage)) + IfEq(LVar0, 2) + BreakLoop + EndIf + EndLoop + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(N(unkStarBeamBgFunc)) + Call(PlayerYieldTurn) + ExecWait(N(EVS_StarPower_EndWish)) + Return + End }; diff --git a/src/battle/move/star_power/star_storm.c b/src/battle/move/star_power/star_storm.c index eb0e98ae465..93ebe65dd66 100644 --- a/src/battle/move/star_power/star_storm.c +++ b/src/battle/move/star_power/star_storm.c @@ -32,65 +32,65 @@ API_CALLABLE(N(SpawnDamageStarsFX)) { } EvtScript N(EVS_UsePower) = { - EVT_EXEC_WAIT(N(EVS_StarPower_WishForSpirit)) - EVT_SET_CONST(LVar0, ANIM_BattleSkolar_Idle) - EVT_EXEC_WAIT(N(EVS_StarPower_SpiritSummoned)) - EVT_CALL(SetNpcAnimation, NPC_BTL_SPIRIT, ANIM_BattleSkolar_Shout) - EVT_WAIT(16) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_CALL(PlaySound, SOUND_SHOOTING_STAR_FALL_A) - EVT_CALL(N(SpawnShootingStarFX)) - EVT_WAIT(5) - EVT_ADD(LVar0, 1) - EVT_CALL(PlaySound, SOUND_SHOOTING_STAR_FALL_B) - EVT_CALL(N(SpawnShootingStarFX)) - EVT_WAIT(5) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_WAIT(50) - EVT_LOOP(10) - EVT_CALL(PlaySound, SOUND_STAR_BOUNCE_A) - EVT_ADD(LVar0, 1) - EVT_WAIT(5) - EVT_CALL(PlaySound, SOUND_STAR_BOUNCE_B) - EVT_ADD(LVar0, 1) - EVT_WAIT(5) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(10) - EVT_WAIT(7) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_CALL(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(90) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(ItemCheckHit, LVar0, 0, 0, 0, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(N(SpawnDamageStarsFX), LVar0, LVar1, LVar2) - EVT_CALL(ItemDamageEnemy, LVar0, DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 7, BS_FLAGS1_TRIGGER_EVENTS) - EVT_LABEL(1) - EVT_WAIT(10) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(20) - EVT_EXEC_WAIT(N(EVS_StarPower_SpiritDeparts)) - EVT_CALL(PlayerYieldTurn) - EVT_EXEC_WAIT(N(EVS_StarPower_EndWish)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_StarPower_WishForSpirit)) + SetConst(LVar0, ANIM_BattleSkolar_Idle) + ExecWait(N(EVS_StarPower_SpiritSummoned)) + Call(SetNpcAnimation, NPC_BTL_SPIRIT, ANIM_BattleSkolar_Shout) + Wait(16) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Thread + Set(LVar0, 0) + Loop(10) + Call(PlaySound, SOUND_SHOOTING_STAR_FALL_A) + Call(N(SpawnShootingStarFX)) + Wait(5) + Add(LVar0, 1) + Call(PlaySound, SOUND_SHOOTING_STAR_FALL_B) + Call(N(SpawnShootingStarFX)) + Wait(5) + Add(LVar0, 1) + EndLoop + EndThread + Thread + Set(LVar0, 0) + Wait(50) + Loop(10) + Call(PlaySound, SOUND_STAR_BOUNCE_A) + Add(LVar0, 1) + Wait(5) + Call(PlaySound, SOUND_STAR_BOUNCE_B) + Add(LVar0, 1) + Wait(5) + EndLoop + EndThread + Thread + Loop(10) + Wait(7) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + Call(StartRumble, BTL_RUMBLE_PLAYER_LIGHT) + EndLoop + EndThread + Wait(90) + Call(InitTargetIterator) + Label(0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(ItemCheckHit, LVar0, 0, 0, 0, 0) + IfEq(LVar0, HIT_RESULT_MISS) + Goto(1) + EndIf + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(N(SpawnDamageStarsFX), LVar0, LVar1, LVar2) + Call(ItemDamageEnemy, LVar0, DAMAGE_TYPE_COSMIC | DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 7, BS_FLAGS1_TRIGGER_EVENTS) + Label(1) + Wait(10) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Wait(20) + ExecWait(N(EVS_StarPower_SpiritDeparts)) + Call(PlayerYieldTurn) + ExecWait(N(EVS_StarPower_EndWish)) + Return + End }; diff --git a/src/battle/move/star_power/time_out.c b/src/battle/move/star_power/time_out.c index 91e18c12321..87fea12fa4e 100644 --- a/src/battle/move/star_power/time_out.c +++ b/src/battle/move/star_power/time_out.c @@ -8,34 +8,34 @@ #include "battle/common/move/StarPowerSupport.inc.c" EvtScript N(EVS_UsePower) = { - EVT_EXEC_WAIT(N(EVS_StarPower_WishForSpirit)) - EVT_SET_CONST(LVar0, ANIM_BattleKlevar_Idle) - EVT_EXEC_WAIT(N(EVS_StarPower_SpiritSummoned)) - EVT_CALL(SetNpcAnimation, NPC_BTL_SPIRIT, ANIM_BattleKlevar_Shout) - EVT_WAIT(16) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(PlaySound, SOUND_TIME_OUT) - EVT_PLAY_EFFECT(EFFECT_STOP_WATCH, 0, 0, 0, 0, EVT_FLOAT(1.0), 200, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_TIME_OUT) - EVT_WAIT(200) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(ItemCheckHit, LVar0, 0, 0, 0, 0) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(ItemDamageEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_STATUS_ALWAYS_HITS, DMG_STATUS_KEY(STATUS_FLAG_STOP, 5, 100), 0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_WAIT(5) - EVT_LABEL(1) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(PlayerYieldTurn) - EVT_EXEC_WAIT(N(EVS_StarPower_SpiritDeparts)) - EVT_EXEC_WAIT(N(EVS_StarPower_EndWish)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_StarPower_WishForSpirit)) + SetConst(LVar0, ANIM_BattleKlevar_Idle) + ExecWait(N(EVS_StarPower_SpiritSummoned)) + Call(SetNpcAnimation, NPC_BTL_SPIRIT, ANIM_BattleKlevar_Shout) + Wait(16) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(PlaySound, SOUND_TIME_OUT) + PlayEffect(EFFECT_STOP_WATCH, 0, 0, 0, 0, Float(1.0), 200, 0) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_TIME_OUT) + Wait(200) + Call(InitTargetIterator) + Label(0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(ItemCheckHit, LVar0, 0, 0, 0, 0) + IfEq(LVar0, HIT_RESULT_MISS) + Goto(1) + EndIf + Call(ItemDamageEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_STATUS_ALWAYS_HITS, DMG_STATUS_KEY(STATUS_FLAG_STOP, 5, 100), 0, BS_FLAGS1_TRIGGER_EVENTS) + Wait(5) + Label(1) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Wait(5) + Call(PlayerYieldTurn) + ExecWait(N(EVS_StarPower_SpiritDeparts)) + ExecWait(N(EVS_StarPower_EndWish)) + Return + End }; diff --git a/src/battle/move/star_power/up_and_away.c b/src/battle/move/star_power/up_and_away.c index 831178e3173..52d3a9ddca3 100644 --- a/src/battle/move/star_power/up_and_away.c +++ b/src/battle/move/star_power/up_and_away.c @@ -74,108 +74,108 @@ API_CALLABLE(N(ShouldTargetBeCaptured)) { } EvtScript N(EVS_UsePower) = { - EVT_EXEC_WAIT(N(EVS_StarPower_WishForSpirit)) - EVT_SET_CONST(LVar0, ANIM_BattleKalmar_Idle) - EVT_EXEC_WAIT(N(EVS_StarPower_SpiritSummoned)) - EVT_CALL(SetNpcAnimation, NPC_BTL_SPIRIT, ANIM_BattleKalmar_Shout) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(20) - EVT_CALL(SetMotionBlurParams, 0, 0, 0, 320, 240, 128, 10) - EVT_CALL(N(DarkenBackground)) - EVT_CALL(PlaySound, SOUND_UP_AND_AWAY_CAST) - EVT_PLAY_EFFECT(EFFECT_ENERGY_SHOCKWAVE, 0, 0, 20, 0, EVT_FLOAT(1.0), 90) - EVT_WAIT(30) - EVT_THREAD - EVT_PLAY_EFFECT(EFFECT_SHIMMER_WAVE, 0, 0, 50, 0, 300, 100, 10, 40) - EVT_END_THREAD - EVT_PLAY_EFFECT(EFFECT_ENERGY_SHOCKWAVE, 0, 0, 20, 0, EVT_FLOAT(1.0), 90) - EVT_WAIT(75) - EVT_CALL(SetMotionBlurParams, 0, 0, 0, 320, 240, 0, 10) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(N(ShouldTargetBeCaptured)) - EVT_SET(LFlag0, FALSE) - EVT_CALL(ItemCheckHit, LVar1, 0, 0, 0, 0) - EVT_IF_EQ(LVar1, HIT_RESULT_MISS) - EVT_SET(LVar0, 0) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(DispatchEvent, LVar0, EVENT_UP_AND_AWAY) - EVT_CALL(SetActorRotationOffset, LVar0, 0, 10, 0) - EVT_THREAD - EVT_CALL(GetOwnerTarget, LVarB, LVar1) - EVT_WAIT(10) - EVT_CALL(CreateVirtualEntity, LVarA, EVT_PTR(EMS_StarIcon)) - EVT_CALL(GetActorPos, LVarB, LVar0, LVar1, LVar2) - EVT_SET(LVarD, LVar0) - EVT_SET(LVarE, LVar1) - EVT_SET(LVarF, LVar2) - EVT_CALL(SetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) - EVT_SETF(LVar0, EVT_FLOAT(0.2)) - EVT_CALL(SetVirtualEntityScale, LVarA, LVar0, LVar0, LVar0) - EVT_LOOP(4) - EVT_ADDF(LVar0, EVT_FLOAT(0.2)) - EVT_CALL(SetVirtualEntityScale, LVarA, LVar0, LVar0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(LVar0, 0) - EVT_LOOP(5) - EVT_ADD(LVar0, 72) - EVT_CALL(SetVirtualEntityRotation, LVarA, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySound, SOUND_UP_AND_AWAY_SEND_AWAY) - EVT_SET(LVar0, LVarD) - EVT_SET(LVar1, LVarE) - EVT_SET(LVar2, LVarF) - EVT_SET(LVar3, 0) - EVT_LOOP(50) - EVT_CALL(SetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(SetVirtualEntityRotation, LVarA, 0, LVar3, 0) - EVT_ADD(LVar1, 6) - EVT_ADD(LVar3, 45) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(PlaySound, SOUND_UP_AND_AWAY_CAPTURE) - EVT_CALL(GetOwnerTarget, LVarA, LVar1) - EVT_CALL(SetActorFlagBits, LVarA, ACTOR_FLAG_NO_SHADOW, TRUE) - EVT_SETF(LVar0, EVT_FLOAT(1.0)) - EVT_LOOP(18) - EVT_SUBF(LVar0, EVT_FLOAT(0.05)) - EVT_CALL(SetActorScale, LVarA, LVar0, LVar0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorPos, LVarA, NPC_DISPOSE_LOCATION) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_LOOP(10) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, FX_SPARKLES_1, LVar0, LVar1, LVar2, 20, 0) - EVT_ADD(LVar1, 30) - EVT_WAIT(5) - EVT_END_LOOP - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_STAR_POINTS_DROPPED, TRUE) - EVT_CALL(RemoveActor, LVarA) - EVT_END_THREAD - EVT_CASE_DEFAULT - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(PlayerDamageEnemy, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 0, BS_FLAGS1_FORCE_IMMUNE_HIT | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_IF - EVT_END_SWITCH - EVT_WAIT(5) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(70) - EVT_CALL(N(RestoreBackground)) - EVT_EXEC_WAIT(N(EVS_StarPower_SpiritDeparts)) - EVT_CALL(PlayerYieldTurn) - EVT_EXEC_WAIT(N(EVS_StarPower_EndWish)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_StarPower_WishForSpirit)) + SetConst(LVar0, ANIM_BattleKalmar_Idle) + ExecWait(N(EVS_StarPower_SpiritSummoned)) + Call(SetNpcAnimation, NPC_BTL_SPIRIT, ANIM_BattleKalmar_Shout) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(20) + Call(SetMotionBlurParams, 0, 0, 0, 320, 240, 128, 10) + Call(N(DarkenBackground)) + Call(PlaySound, SOUND_UP_AND_AWAY_CAST) + PlayEffect(EFFECT_ENERGY_SHOCKWAVE, 0, 0, 20, 0, Float(1.0), 90) + Wait(30) + Thread + PlayEffect(EFFECT_SHIMMER_WAVE, 0, 0, 50, 0, 300, 100, 10, 40) + EndThread + PlayEffect(EFFECT_ENERGY_SHOCKWAVE, 0, 0, 20, 0, Float(1.0), 90) + Wait(75) + Call(SetMotionBlurParams, 0, 0, 0, 320, 240, 0, 10) + Call(InitTargetIterator) + Label(0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(N(ShouldTargetBeCaptured)) + Set(LFlag0, FALSE) + Call(ItemCheckHit, LVar1, 0, 0, 0, 0) + IfEq(LVar1, HIT_RESULT_MISS) + Set(LVar0, 0) + Set(LFlag0, TRUE) + EndIf + Switch(LVar0) + CaseGt(0) + Call(GetOwnerTarget, LVar0, LVar1) + Call(DispatchEvent, LVar0, EVENT_UP_AND_AWAY) + Call(SetActorRotationOffset, LVar0, 0, 10, 0) + Thread + Call(GetOwnerTarget, LVarB, LVar1) + Wait(10) + Call(CreateVirtualEntity, LVarA, Ref(EMS_StarIcon)) + Call(GetActorPos, LVarB, LVar0, LVar1, LVar2) + Set(LVarD, LVar0) + Set(LVarE, LVar1) + Set(LVarF, LVar2) + Call(SetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) + SetF(LVar0, Float(0.2)) + Call(SetVirtualEntityScale, LVarA, LVar0, LVar0, LVar0) + Loop(4) + AddF(LVar0, Float(0.2)) + Call(SetVirtualEntityScale, LVarA, LVar0, LVar0, LVar0) + Wait(1) + EndLoop + Set(LVar0, 0) + Loop(5) + Add(LVar0, 72) + Call(SetVirtualEntityRotation, LVarA, 0, LVar0, 0) + Wait(1) + EndLoop + Call(PlaySound, SOUND_UP_AND_AWAY_SEND_AWAY) + Set(LVar0, LVarD) + Set(LVar1, LVarE) + Set(LVar2, LVarF) + Set(LVar3, 0) + Loop(50) + Call(SetVirtualEntityPosition, LVarA, LVar0, LVar1, LVar2) + Call(SetVirtualEntityRotation, LVarA, 0, LVar3, 0) + Add(LVar1, 6) + Add(LVar3, 45) + Wait(1) + EndLoop + EndThread + Thread + Call(PlaySound, SOUND_UP_AND_AWAY_CAPTURE) + Call(GetOwnerTarget, LVarA, LVar1) + Call(SetActorFlagBits, LVarA, ACTOR_FLAG_NO_SHADOW, TRUE) + SetF(LVar0, Float(1.0)) + Loop(18) + SubF(LVar0, Float(0.05)) + Call(SetActorScale, LVarA, LVar0, LVar0, LVar0) + Wait(1) + EndLoop + Call(SetActorPos, LVarA, NPC_DISPOSE_LOCATION) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Loop(10) + PlayEffect(EFFECT_SPARKLES, FX_SPARKLES_1, LVar0, LVar1, LVar2, 20, 0) + Add(LVar1, 30) + Wait(5) + EndLoop + Call(SetBattleFlagBits, BS_FLAGS1_STAR_POINTS_DROPPED, TRUE) + Call(RemoveActor, LVarA) + EndThread + CaseDefault + IfEq(LFlag0, FALSE) + Call(PlayerDamageEnemy, LVar0, 0, SUPPRESS_EVENT_ALL, 0, 0, BS_FLAGS1_FORCE_IMMUNE_HIT | BS_FLAGS1_TRIGGER_EVENTS) + EndIf + EndSwitch + Wait(5) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Wait(70) + Call(N(RestoreBackground)) + ExecWait(N(EVS_StarPower_SpiritDeparts)) + Call(PlayerYieldTurn) + ExecWait(N(EVS_StarPower_EndWish)) + Return + End }; diff --git a/src/battle/partner/bombette.c b/src/battle/partner/bombette.c index 7f77f585583..eb2601b1abd 100644 --- a/src/battle/partner/bombette.c +++ b/src/battle/partner/bombette.c @@ -336,1104 +336,1104 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_PARTNER, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_PARTNER, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_PARTNER, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_PARTNER, EVT_PTR(N(EVS_HandlePhase))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_PARTNER, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_PARTNER, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_PARTNER, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_PARTNER, Ref(N(EVS_HandlePhase))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(StopSound, SOUND_LRAW_BOMBETTE_FUSE) - EVT_CALL(GetLastEvent, ACTOR_PARTNER, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Hurt) - EVT_SET_CONST(LVar2, ANIM_BattleBombette_Backfire2) - EVT_EXEC_WAIT(EVS_Partner_Hit) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Hurt) - EVT_EXEC_WAIT(EVS_Partner_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIKE_CONTACT) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Hurt) - EVT_SET(LVar2, 15) - EVT_SET_CONST(LVar3, ANIM_BattleBombette_Injured) - EVT_EXEC_WAIT(EVS_Partner_BombetteSpikeContact) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleBombette_BurnStill) - EVT_EXEC_WAIT(EVS_Partner_BurnHit) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_SET(LVarA, 0) - EVT_CALL(N(PlayExplosionFX), LVar0, LVar1, LVar2) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 3, EVT_FLOAT(1.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.8)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 6, EVT_FLOAT(0.3)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 8, EVT_FLOAT(0.1)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(80) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_ADD(LVar0, 33) - EVT_END_LOOP - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 200) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 10, 0, EASING_LINEAR) - EVT_WAIT(50) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 200) - EVT_CALL(SetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(0.6)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 20, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 8, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 5, FALSE, TRUE, FALSE) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_BURN_CONTACT) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_61) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 60) - EVT_ADD(LVar1, 40) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(0.1)) - EVT_CALL(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleBombette_BurnHurt, ANIM_BattleBombette_BurnHurt, ANIM_BattleBombette_BurnHurt) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_BurnHurt) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 5, FALSE, TRUE, FALSE) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleBombette_BurnStill) - EVT_EXEC_WAIT(EVS_Partner_BurnHit) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_SET(LVarA, 0) - EVT_CALL(N(PlayExplosionFX), LVar0, LVar1, LVar2) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 3, EVT_FLOAT(1.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.8)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 6, EVT_FLOAT(0.3)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 8, EVT_FLOAT(0.1)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(80) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_ADD(LVar0, 33) - EVT_END_LOOP - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 200) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 10, 0, EASING_LINEAR) - EVT_WAIT(50) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 200) - EVT_CALL(SetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(0.6)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 20, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 8, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 5, FALSE, TRUE, FALSE) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Hurt) - EVT_SET(LVar2, 15) - EVT_SET_CONST(LVar3, ANIM_BattleBombette_Injured) - EVT_SET(LVarA, LVar1) - EVT_SET(LVarB, LVar2) - EVT_SET(LVarC, LVar3) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_62) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, LVarA) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 60) - EVT_ADD(LVar1, 40) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(0.1)) - EVT_CALL(SetJumpAnimations, ACTOR_PARTNER, 0, LVarA, LVarA, LVarA) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 5, FALSE, FALSE, FALSE) - EVT_CALL(ShowShockEffect, ACTOR_SELF) - EVT_SET(LVar1, LVarA) - EVT_SET(LVar2, 0) - EVT_EXEC_WAIT(EVS_Partner_Hit) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Fall) - EVT_WAIT(8) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_SET(LVarA, 0) - EVT_CALL(N(PlayExplosionFX), LVar0, LVar1, LVar2) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 3, EVT_FLOAT(1.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.8)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 6, EVT_FLOAT(0.3)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 8, EVT_FLOAT(0.1)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(80) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_ADD(LVar0, 33) - EVT_END_LOOP - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 200) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 10, 0, EASING_LINEAR) - EVT_WAIT(50) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 200) - EVT_CALL(SetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(0.6)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 20, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 8, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 5, FALSE, TRUE, FALSE) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_33) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_RECOVER_FROM_KO) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Idle) - EVT_SET_CONST(LVar2, ANIM_BattleBombette_Run) - EVT_SET(LVar3, 0) - EVT_EXEC_WAIT(EVS_Partner_Recover) - EVT_CASE_OR_EQ(EVENT_18) - EVT_CASE_OR_EQ(EVENT_BLOCK) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Block) - EVT_EXEC_WAIT(EVS_Partner_NoDamageHit) - EVT_WAIT(10) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(CloseActionCommandInfo) + Call(StopSound, SOUND_LRAW_BOMBETTE_FUSE) + Call(GetLastEvent, ACTOR_PARTNER, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar1, ANIM_BattleBombette_Hurt) + SetConst(LVar2, ANIM_BattleBombette_Backfire2) + ExecWait(EVS_Partner_Hit) + SetConst(LVar1, ANIM_BattleBombette_Hurt) + ExecWait(EVS_Partner_Drop) + EndCaseGroup + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Hurt) + ExecWait(EVS_Partner_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_SPIKE_CONTACT) + SetConst(LVar1, ANIM_BattleBombette_Hurt) + Set(LVar2, 15) + SetConst(LVar3, ANIM_BattleBombette_Injured) + ExecWait(EVS_Partner_BombetteSpikeContact) + SetConst(LVar1, ANIM_BattleBombette_Hurt) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_BURN_HIT) + SetConst(LVar1, ANIM_BattleBombette_BurnHurt) + SetConst(LVar2, ANIM_BattleBombette_BurnStill) + ExecWait(EVS_Partner_BurnHit) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Set(LVarA, 0) + Call(N(PlayExplosionFX), LVar0, LVar1, LVar2) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 3, Float(1.5)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.8)) + Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.3)) + Call(ShakeCam, CAM_BATTLE, 0, 8, Float(0.1)) + EndThread + Thread + Set(LVar0, 0) + Loop(80) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Add(LVar0, 33) + EndLoop + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + EndThread + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 200) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_PARTNER, 10, 0, EASING_LINEAR) + Wait(50) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 200) + Call(SetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(4.0)) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.6)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath) + Call(JumpToGoal, ACTOR_PARTNER, 20, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.0)) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 8, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 5, FALSE, TRUE, FALSE) + SetConst(LVar1, ANIM_BattleBombette_Hurt) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_BURN_CONTACT) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_61) + Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Sub(LVar0, 60) + Add(LVar1, 40) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.1)) + Call(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleBombette_BurnHurt, ANIM_BattleBombette_BurnHurt, ANIM_BattleBombette_BurnHurt) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_BurnHurt) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 5, FALSE, TRUE, FALSE) + SetConst(LVar1, ANIM_BattleBombette_BurnHurt) + SetConst(LVar2, ANIM_BattleBombette_BurnStill) + ExecWait(EVS_Partner_BurnHit) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Set(LVarA, 0) + Call(N(PlayExplosionFX), LVar0, LVar1, LVar2) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 3, Float(1.5)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.8)) + Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.3)) + Call(ShakeCam, CAM_BATTLE, 0, 8, Float(0.1)) + EndThread + Thread + Set(LVar0, 0) + Loop(80) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Add(LVar0, 33) + EndLoop + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + EndThread + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 200) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_PARTNER, 10, 0, EASING_LINEAR) + Wait(50) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 200) + Call(SetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(4.0)) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.6)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath) + Call(JumpToGoal, ACTOR_PARTNER, 20, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.0)) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 8, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 5, FALSE, TRUE, FALSE) + SetConst(LVar1, ANIM_BattleBombette_Hurt) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar1, ANIM_BattleBombette_Hurt) + Set(LVar2, 15) + SetConst(LVar3, ANIM_BattleBombette_Injured) + Set(LVarA, LVar1) + Set(LVarB, LVar2) + Set(LVarC, LVar3) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_62) + Call(SetAnimation, ACTOR_PARTNER, -1, LVarA) + Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Sub(LVar0, 60) + Add(LVar1, 40) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.1)) + Call(SetJumpAnimations, ACTOR_PARTNER, 0, LVarA, LVarA, LVarA) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 5, FALSE, FALSE, FALSE) + Call(ShowShockEffect, ACTOR_SELF) + Set(LVar1, LVarA) + Set(LVar2, 0) + ExecWait(EVS_Partner_Hit) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Fall) + Wait(8) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Set(LVarA, 0) + Call(N(PlayExplosionFX), LVar0, LVar1, LVar2) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 3, Float(1.5)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.8)) + Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.3)) + Call(ShakeCam, CAM_BATTLE, 0, 8, Float(0.1)) + EndThread + Thread + Set(LVar0, 0) + Loop(80) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Add(LVar0, 33) + EndLoop + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + EndThread + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 200) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_PARTNER, 10, 0, EASING_LINEAR) + Wait(50) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 200) + Call(SetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(4.0)) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.6)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath) + Call(JumpToGoal, ACTOR_PARTNER, 20, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.0)) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 8, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 5, FALSE, TRUE, FALSE) + SetConst(LVar1, ANIM_BattleBombette_Hurt) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_33) + SetConst(LVar1, ANIM_BattleBombette_Hurt) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_RECOVER_FROM_KO) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Idle) + SetConst(LVar2, ANIM_BattleBombette_Run) + Set(LVar3, 0) + ExecWait(EVS_Partner_Recover) + CaseOrEq(EVENT_18) + CaseOrEq(EVENT_BLOCK) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Block) + ExecWait(EVS_Partner_NoDamageHit) + Wait(10) + EndCaseGroup + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_FirstStrike)) - EVT_CASE_EQ(PHASE_EXECUTE_ACTION) - EVT_EXEC_WAIT(N(EVS_ExecuteAction)) - EVT_CASE_EQ(PHASE_CELEBRATE) - EVT_EXEC_WAIT(N(EVS_Celebrate)) - EVT_CASE_EQ(PHASE_RUN_AWAY_START) - EVT_EXEC_WAIT(N(EVS_RunAway)) - EVT_CASE_EQ(PHASE_RUN_AWAY_FAIL) - EVT_EXEC_WAIT(N(EVS_RunAwayFail)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_FIRST_STRIKE) + ExecWait(N(EVS_FirstStrike)) + CaseEq(PHASE_EXECUTE_ACTION) + ExecWait(N(EVS_ExecuteAction)) + CaseEq(PHASE_CELEBRATE) + ExecWait(N(EVS_Celebrate)) + CaseEq(PHASE_RUN_AWAY_START) + ExecWait(N(EVS_RunAway)) + CaseEq(PHASE_RUN_AWAY_FAIL) + ExecWait(N(EVS_RunAwayFail)) + EndSwitch + Return + End }; EvtScript N(EVS_Celebrate) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_CelebrateLoop) - EVT_SET_CONST(LVar2, ANIM_BattleBombette_Celebrate) - EVT_SET_CONST(LVar3, ANIM_BattleBombette_Idle) - EVT_EXEC_WAIT(EVS_Partner_Celebrate) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_CelebrateLoop) + SetConst(LVar2, ANIM_BattleBombette_Celebrate) + SetConst(LVar3, ANIM_BattleBombette_Idle) + ExecWait(EVS_Partner_Celebrate) + Return + End }; EvtScript N(EVS_ExecuteAction) = { - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(BTL_MENU_TYPE_STAR_POWERS) - EVT_CALL(LoadStarPowerScript) - EVT_EXEC_WAIT(LVar0) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_BODY_SLAM1) - EVT_EXEC_WAIT(N(EVS_Attack_BodySlam)) - EVT_CASE_EQ(MOVE_BODY_SLAM2) - EVT_EXEC_WAIT(N(EVS_Attack_BodySlam)) - EVT_CASE_EQ(MOVE_BODY_SLAM3) - EVT_EXEC_WAIT(N(EVS_Attack_BodySlam)) - EVT_CASE_EQ(MOVE_BOMB) - EVT_EXEC_WAIT(N(EVS_Attack_Bomb)) - EVT_CASE_EQ(MOVE_POWER_BOMB) - EVT_EXEC_WAIT(N(EVS_Attack_Bomb)) - EVT_CASE_EQ(MOVE_MEGA_BOMB) - EVT_EXEC_WAIT(N(EVS_Attack_Bomb)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(ShowActionHud, TRUE) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar0) + CaseEq(BTL_MENU_TYPE_STAR_POWERS) + Call(LoadStarPowerScript) + ExecWait(LVar0) + Return + EndSwitch + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar2) + CaseEq(MOVE_BODY_SLAM1) + ExecWait(N(EVS_Attack_BodySlam)) + CaseEq(MOVE_BODY_SLAM2) + ExecWait(N(EVS_Attack_BodySlam)) + CaseEq(MOVE_BODY_SLAM3) + ExecWait(N(EVS_Attack_BodySlam)) + CaseEq(MOVE_BOMB) + ExecWait(N(EVS_Attack_Bomb)) + CaseEq(MOVE_POWER_BOMB) + ExecWait(N(EVS_Attack_Bomb)) + CaseEq(MOVE_MEGA_BOMB) + ExecWait(N(EVS_Attack_Bomb)) + EndSwitch + Return + End }; EvtScript N(EVS_FirstStrike) = { - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_BODY_SLAM1) - EVT_EXEC_WAIT(N(EVS_Attack_FirstStrike)) - EVT_CASE_EQ(MOVE_BODY_SLAM2) - EVT_EXEC_WAIT(N(EVS_Attack_FirstStrike)) - EVT_CASE_EQ(MOVE_BODY_SLAM3) - EVT_EXEC_WAIT(N(EVS_Attack_FirstStrike)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar2) + CaseEq(MOVE_BODY_SLAM1) + ExecWait(N(EVS_Attack_FirstStrike)) + CaseEq(MOVE_BODY_SLAM2) + ExecWait(N(EVS_Attack_FirstStrike)) + CaseEq(MOVE_BODY_SLAM3) + ExecWait(N(EVS_Attack_FirstStrike)) + EndSwitch + Return + End }; EvtScript N(EVS_RunAway) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBombette_Run) - EVT_EXEC_WAIT(EVS_Partner_RunAway) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBombette_Run) + ExecWait(EVS_Partner_RunAway) + Return + End }; EvtScript N(EVS_RunAwayFail) = { - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Run) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, 0) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(6.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Run) + Call(SetActorYaw, ACTOR_PARTNER, 0) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(returnHome2) = { - EVT_CALL(PartnerYieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_04) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 60) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.4)) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 25, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire1) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 8, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire1) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 6, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire1) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2) - EVT_SUB(LVar0, 10) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 4, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire1) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle) - EVT_WAIT(8) - EVT_CALL(ResetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_WALK) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(5.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Run) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle) - EVT_RETURN - EVT_END + Call(PartnerYieldTurn) + Call(UseBattleCamPreset, BTL_CAM_PRESET_04) + Call(MoveBattleCamOver, 10) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2) + Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Sub(LVar0, 60) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.4)) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 25, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire1) + Wait(1) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 8, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire1) + Wait(1) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 6, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire1) + Wait(1) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2) + Sub(LVar0, 10) + Call(JumpToGoal, ACTOR_PARTNER, 4, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire1) + Wait(1) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle) + Wait(8) + Call(ResetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_WALK) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(5.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Run) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(PartnerYieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_51) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.4)) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 15, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire1) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 8, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire1) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 6, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire1) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2) - EVT_SUB(LVar0, 10) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 4, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire1) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle) - EVT_WAIT(8) - EVT_CALL(ResetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_WALK) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(5.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Run) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle) - EVT_RETURN - EVT_END + Call(PartnerYieldTurn) + Call(UseBattleCamPreset, BTL_CAM_PRESET_51) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2) + Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Sub(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.4)) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 15, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire1) + Wait(1) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 8, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire1) + Wait(1) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 6, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire1) + Wait(1) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire2) + Sub(LVar0, 10) + Call(JumpToGoal, ACTOR_PARTNER, 4, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Backfire1) + Wait(1) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle) + Wait(8) + Call(ResetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_WALK) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(5.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Run) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle) + Return + End }; EvtScript N(runToTarget) = { - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Run) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 35) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Run) + Call(RunToGoal, ACTOR_PARTNER, 35) + Return + End }; EvtScript N(animBrace) = { - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Brace) - EVT_LOOP(15) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, EVT_FLOAT(0.5), 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, EVT_FLOAT(-0.5), 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Brace) + Loop(15) + Call(SetActorDispOffset, ACTOR_PARTNER, Float(0.5), 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_PARTNER, Float(-0.5), 0, 0) + Wait(1) + EndLoop + Return + End }; EvtScript N(animHold) = { - EVT_LOOP(15) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, EVT_FLOAT(0.5), 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, EVT_FLOAT(-0.5), 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(15) + Call(SetActorDispOffset, ACTOR_PARTNER, Float(0.5), 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_PARTNER, Float(-0.5), 0, 0) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_Attack_BodySlam) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_BODY_SLAM) - EVT_CALL(action_command_body_slam_init) - EVT_CALL(SetupMashMeter, 1, 100, 0, 0, 0, 0) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_48) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, -40, 0, 0) - EVT_SET(LF_MashStarted, 0) - EVT_LOOP(60) - EVT_CALL(CheckButtonDown, BUTTON_A, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_SET(LF_MashStarted, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(MoveBattleCamOver, 65) - EVT_IF_EQ(LF_MashStarted, 1) - EVT_CALL(action_command_body_slam_start, 0, 92, 3, 0) - EVT_SET(LF_MashEnded, 0) - EVT_EXEC_GET_TID(N(runToTarget), LVarA) - EVT_LOOP(35) - EVT_CALL(CheckButtonDown, BUTTON_A, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_SET(LF_MashEnded, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LF_MashEnded, 1) - EVT_KILL_THREAD(LVarA) - EVT_GOTO(10) - EVT_END_IF - EVT_SET(LF_MashEnded, 0) - EVT_EXEC_GET_TID(N(animBrace), LVarA) - EVT_LOOP(30) - EVT_CALL(CheckButtonDown, BUTTON_A, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_SET(LF_MashEnded, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LF_MashEnded, 1) - EVT_KILL_THREAD(LVarA) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_EQ(LF_MashEnded, 0) - EVT_EXEC_GET_TID(N(animHold), LVarA) - EVT_LOOP(30) - EVT_CALL(CheckButtonDown, BUTTON_A, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_SET(LF_MashEnded, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LF_MashEnded, 1) - EVT_KILL_THREAD(LVarA) - EVT_GOTO(10) - EVT_END_IF - EVT_END_IF - EVT_ELSE - EVT_SET(LF_MashEnded, 0) - EVT_EXEC_GET_TID(N(runToTarget), LVarA) - EVT_LOOP(35) - EVT_CALL(CheckButtonDown, BUTTON_A, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_IF_EQ(LF_MashStarted, 0) - EVT_CALL(action_command_body_slam_start, 0, 92, 3, 0) - EVT_SET(LF_MashStarted, 1) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LF_MashStarted, 1) - EVT_IF_EQ(LVar0, FALSE) - EVT_SET(LF_MashEnded, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LF_MashEnded, 1) - EVT_KILL_THREAD(LVarA) - EVT_GOTO(10) - EVT_END_IF - EVT_SET(LF_MashEnded, 0) - EVT_EXEC_GET_TID(N(animBrace), LVarA) - EVT_LOOP(30) - EVT_CALL(CheckButtonDown, BUTTON_A, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_IF_EQ(LF_MashStarted, 0) - EVT_CALL(action_command_body_slam_start, 0, 92, 3, 0) - EVT_SET(LF_MashStarted, 1) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LF_MashStarted, 1) - EVT_IF_EQ(LVar0, FALSE) - EVT_SET(LF_MashEnded, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LF_MashEnded, 1) - EVT_KILL_THREAD(LVarA) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_EQ(LF_MashEnded, 0) - EVT_EXEC_GET_TID(N(animHold), LVarA) - EVT_LOOP(30) - EVT_CALL(CheckButtonDown, BUTTON_A, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_SET(LF_MashEnded, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LF_MashEnded, 1) - EVT_KILL_THREAD(LVarA) - EVT_GOTO(10) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_LABEL(10) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 0, 0) - EVT_WAIT(2) - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT | SUPPRESS_EVENT_ALT_SPIKY, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOMBETTE_BODY_SLAM) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, -10, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_BodySlam) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(6.0)) - EVT_CALL(SetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_51) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_PARTNER, 0, 15, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, -72) - EVT_CALL(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(AddGoalPos, ACTOR_PARTNER, 60, 0, 0) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 10) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle) - EVT_THREAD - EVT_CALL(N(SlowDown)) - EVT_END_THREAD - EVT_WAIT(20) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(5.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Run) - EVT_CALL(ResetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_WALK) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_BODY_SLAM1) - EVT_SET(LVarE, 1) - EVT_SET(LVarF, 2) - EVT_CASE_EQ(MOVE_BODY_SLAM2) - EVT_SET(LVarE, 2) - EVT_SET(LVarF, 3) - EVT_CASE_EQ(MOVE_BODY_SLAM3) - EVT_SET(LVarE, 3) - EVT_SET(LVarF, 5) - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOMBETTE_BODY_SLAM) - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, -10, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_BodySlam) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 3) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle) - EVT_ELSE - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, -10, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_BodySlam) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(6.0)) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle) - EVT_END_IF - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_CALL(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_TOP, 0, LVarF, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_CASE_DEFAULT - EVT_CALL(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_TOP, 0, LVarE, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_EXEC_WAIT(N(returnHome2)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_BODY_SLAM) + Call(action_command_body_slam_init) + Call(SetupMashMeter, 1, 100, 0, 0, 0, 0) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_48) + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(AddGoalPos, ACTOR_PARTNER, -40, 0, 0) + Set(LF_MashStarted, 0) + Loop(60) + Call(CheckButtonDown, BUTTON_A, LVar0) + IfNe(LVar0, FALSE) + Set(LF_MashStarted, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(MoveBattleCamOver, 65) + IfEq(LF_MashStarted, 1) + Call(action_command_body_slam_start, 0, 92, 3, 0) + Set(LF_MashEnded, 0) + ExecGetTID(N(runToTarget), LVarA) + Loop(35) + Call(CheckButtonDown, BUTTON_A, LVar0) + IfEq(LVar0, FALSE) + Set(LF_MashEnded, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LF_MashEnded, 1) + KillThread(LVarA) + Goto(10) + EndIf + Set(LF_MashEnded, 0) + ExecGetTID(N(animBrace), LVarA) + Loop(30) + Call(CheckButtonDown, BUTTON_A, LVar0) + IfEq(LVar0, FALSE) + Set(LF_MashEnded, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LF_MashEnded, 1) + KillThread(LVarA) + Goto(10) + EndIf + IfEq(LF_MashEnded, 0) + ExecGetTID(N(animHold), LVarA) + Loop(30) + Call(CheckButtonDown, BUTTON_A, LVar0) + IfEq(LVar0, FALSE) + Set(LF_MashEnded, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LF_MashEnded, 1) + KillThread(LVarA) + Goto(10) + EndIf + EndIf + Else + Set(LF_MashEnded, 0) + ExecGetTID(N(runToTarget), LVarA) + Loop(35) + Call(CheckButtonDown, BUTTON_A, LVar0) + IfNe(LVar0, FALSE) + IfEq(LF_MashStarted, 0) + Call(action_command_body_slam_start, 0, 92, 3, 0) + Set(LF_MashStarted, 1) + EndIf + EndIf + IfEq(LF_MashStarted, 1) + IfEq(LVar0, FALSE) + Set(LF_MashEnded, 1) + BreakLoop + EndIf + EndIf + Wait(1) + EndLoop + IfEq(LF_MashEnded, 1) + KillThread(LVarA) + Goto(10) + EndIf + Set(LF_MashEnded, 0) + ExecGetTID(N(animBrace), LVarA) + Loop(30) + Call(CheckButtonDown, BUTTON_A, LVar0) + IfNe(LVar0, FALSE) + IfEq(LF_MashStarted, 0) + Call(action_command_body_slam_start, 0, 92, 3, 0) + Set(LF_MashStarted, 1) + EndIf + EndIf + IfEq(LF_MashStarted, 1) + IfEq(LVar0, FALSE) + Set(LF_MashEnded, 1) + BreakLoop + EndIf + EndIf + Wait(1) + EndLoop + IfEq(LF_MashEnded, 1) + KillThread(LVarA) + Goto(10) + EndIf + IfEq(LF_MashEnded, 0) + ExecGetTID(N(animHold), LVarA) + Loop(30) + Call(CheckButtonDown, BUTTON_A, LVar0) + IfEq(LVar0, FALSE) + Set(LF_MashEnded, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LF_MashEnded, 1) + KillThread(LVarA) + Goto(10) + EndIf + EndIf + EndIf + Label(10) + Call(SetActorDispOffset, ACTOR_PARTNER, 0, 0, 0) + Wait(2) + Call(CloseActionCommandInfo) + Call(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT | SUPPRESS_EVENT_ALT_SPIKY, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, HIT_RESULT_MISS) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOMBETTE_BODY_SLAM) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(AddGoalPos, ACTOR_PARTNER, -10, 0, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_BodySlam) + Call(SetActorSpeed, ACTOR_PARTNER, Float(6.0)) + Call(SetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle) + Call(UseBattleCamPreset, BTL_CAM_PRESET_51) + Thread + Call(SetActorRotationOffset, ACTOR_PARTNER, 0, 15, 0) + Set(LVar0, 0) + Loop(10) + Add(LVar0, -72) + Call(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0) + EndThread + Call(AddGoalPos, ACTOR_PARTNER, 60, 0, 0) + Call(RunToGoal, ACTOR_PARTNER, 10) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle) + Thread + Call(N(SlowDown)) + EndThread + Wait(20) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(5.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Run) + Call(ResetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_WALK) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle) + Return + EndIf + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar2) + CaseEq(MOVE_BODY_SLAM1) + Set(LVarE, 1) + Set(LVarF, 2) + CaseEq(MOVE_BODY_SLAM2) + Set(LVarE, 2) + Set(LVarF, 3) + CaseEq(MOVE_BODY_SLAM3) + Set(LVarE, 3) + Set(LVarF, 5) + EndSwitch + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOMBETTE_BODY_SLAM) + Call(GetPartnerActionSuccess, LVar0) + IfGt(LVar0, 0) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(AddGoalPos, ACTOR_PARTNER, -10, 0, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_BodySlam) + Call(RunToGoal, ACTOR_PARTNER, 3) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle) + Else + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(AddGoalPos, ACTOR_PARTNER, -10, 0, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_BodySlam) + Call(SetActorSpeed, ACTOR_PARTNER, Float(6.0)) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle) + EndIf + Switch(LVar0) + CaseGt(0) + Call(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_TOP, 0, LVarF, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) + CaseDefault + Call(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_TOP, 0, LVarE, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + ExecWait(N(returnHome2)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_Attack_Bomb) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_BOMB) - EVT_CALL(action_command_bomb_init) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_BOMB) - EVT_CALL(GetActorLevel, ACTOR_PARTNER, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetupMashMeter, 5, 35, 60, 80, 99, 100) - EVT_CASE_EQ(1) - EVT_CALL(SetupMashMeter, 5, 35, 60, 80, 99, 100) - EVT_CASE_EQ(2) - EVT_CALL(SetupMashMeter, 5, 35, 60, 80, 99, 100) - EVT_END_SWITCH - EVT_CASE_EQ(MOVE_POWER_BOMB) - EVT_CALL(GetActorLevel, ACTOR_PARTNER, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(1) - EVT_CALL(SetupMashMeter, 5, 35, 60, 80, 99, 100) - EVT_CASE_EQ(2) - EVT_CALL(SetupMashMeter, 5, 35, 60, 80, 99, 100) - EVT_END_SWITCH - EVT_CASE_EQ(MOVE_MEGA_BOMB) - EVT_CALL(SetupMashMeter, 5, 35, 60, 80, 99, 100) - EVT_END_SWITCH - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_48) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_BOMB) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, -20, 0, 0) - EVT_CASE_EQ(MOVE_POWER_BOMB) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, -40, 0, 0) - EVT_CASE_EQ(MOVE_MEGA_BOMB) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, -40, 0, 0) - EVT_END_SWITCH - EVT_CALL(MoveBattleCamOver, 60 * DT) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_BOMB) - EVT_CALL(action_command_bomb_start, 0, 57 * DT, 3, 0) - EVT_CASE_EQ(MOVE_POWER_BOMB) - EVT_CALL(action_command_bomb_start, 0, 73 * DT - 1, 3, 1) - EVT_CASE_EQ(MOVE_MEGA_BOMB) - EVT_CALL(action_command_bomb_start, 0, 87 * DT, 3, 2) - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_LRAW_BOMBETTE_FUSE) - EVT_CHILD_THREAD - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 1) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_RunLit) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_BOMB) - EVT_SET(LVar0, 45 * DT) - EVT_CASE_EQ(MOVE_POWER_BOMB) - EVT_SET(LVar0, 50 * DT) - EVT_CASE_EQ(MOVE_MEGA_BOMB) - EVT_SET(LVar0, 50 * DT) - EVT_END_SWITCH - EVT_CALL(RunToGoal, ACTOR_PARTNER, 45 * DT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_AboutToExplode) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 0) - EVT_END_CHILD_THREAD - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_BOMB) - EVT_SET(LVar0, 45 * DT) - EVT_CASE_EQ(MOVE_POWER_BOMB) - EVT_SET(LVar0, 50 * DT) - EVT_CASE_EQ(MOVE_MEGA_BOMB) - EVT_SET(LVar0, 50 * DT) - EVT_END_SWITCH - EVT_WAIT(LVar0) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_BOMB) - EVT_CALL(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_END_SWITCH - EVT_CALL(StopSound, SOUND_LRAW_BOMBETTE_FUSE) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_BOMB) - EVT_SET(LVar0, 6 * DT + 1) - EVT_CASE_EQ(MOVE_POWER_BOMB) - EVT_SET(LVar0, 12 * DT) - EVT_CASE_EQ(MOVE_MEGA_BOMB) - EVT_SET(LVar0, 20 * DT) - EVT_END_SWITCH - EVT_LOOP(LVar0) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, EVT_FLOAT(0.5), 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, EVT_FLOAT(-0.5), 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(MoveBattleCamOver, 8) - EVT_CALL(GetActionSuccessCopy, LVar0) - EVT_CALL(N(GetBombDamage), LVar0) - EVT_SET(LVarA, LVar0) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(N(PlayExplosionFX), LVar0, LVar1, LVar2) - EVT_THREAD - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_BOMB) - EVT_IF_GT(LVarA, 0) - EVT_CALL(StartRumble, BTL_RUMBLE_HIT_HEAVY) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.75)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(4.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(6.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 3, EVT_FLOAT(2.25)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(1.2)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 6, EVT_FLOAT(0.45)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 8, EVT_FLOAT(0.15)) - EVT_ELSE - EVT_CALL(StartRumble, BTL_RUMBLE_HIT_HEAVY) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.4)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.6)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(2.4)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.6)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.2)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.6)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(1.2)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.64)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 3, EVT_FLOAT(0.24)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.08)) - EVT_END_IF - EVT_CASE_EQ(MOVE_POWER_BOMB) - EVT_IF_GT(LVarA, 0) - EVT_CALL(StartRumble, BTL_RUMBLE_HIT_EXTREME) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.75)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(4.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(6.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 3, EVT_FLOAT(2.25)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(1.2)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 6, EVT_FLOAT(0.45)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 8, EVT_FLOAT(0.15)) - EVT_ELSE - EVT_CALL(StartRumble, BTL_RUMBLE_HIT_EXTREME) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.4)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.6)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(2.4)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.6)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.2)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.6)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(1.2)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.64)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 3, EVT_FLOAT(0.24)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.08)) - EVT_END_IF - EVT_CASE_EQ(MOVE_MEGA_BOMB) - EVT_IF_GT(LVarA, 0) - EVT_CALL(StartRumble, BTL_RUMBLE_HIT_MAX) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(4.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(6.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(4.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(8.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(4.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 3, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(1.6)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 6, EVT_FLOAT(0.6)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 8, EVT_FLOAT(0.2)) - EVT_ELSE - EVT_CALL(StartRumble, BTL_RUMBLE_HIT_MAX) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(4.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(1.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.8)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 3, EVT_FLOAT(0.3)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(0.1)) - EVT_END_IF - EVT_END_SWITCH - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_BOMB) - EVT_CASE_EQ(MOVE_POWER_BOMB) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_WAIT(8) - EVT_IF_GT(LVarA, 0) - EVT_PLAY_EFFECT(EFFECT_RED_IMPACT, 0, LVar0, 0, LVar2, 1, 0, 0) - EVT_ELSE - EVT_PLAY_EFFECT(EFFECT_RED_IMPACT, 1, LVar0, 0, LVar2, 1, 0, 0) - EVT_END_IF - EVT_CASE_EQ(MOVE_MEGA_BOMB) - EVT_SET(LVarA, 0) - EVT_WAIT(10) - EVT_CALL(N(PlayExplosionFX), 88, 33, 5) - EVT_WAIT(10) - EVT_CALL(N(PlayExplosionFX), 18, 73, 5) - EVT_WAIT(10) - EVT_CALL(N(PlayExplosionFX), 120, 19, 5) - EVT_WAIT(10) - EVT_END_SWITCH - EVT_END_THREAD - EVT_SET(LF_MashEnded, 0) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_BOMB) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOMBETTE_BLAST_LV1) - EVT_CALL(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, 6) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_CALL(GetActionSuccessCopy, LVar0) - EVT_CALL(N(GetBombDamage), LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_BLAST | DAMAGE_TYPE_NO_CONTACT, 0, 0, LVarF, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SET(LF_MashEnded, 1) - EVT_CASE_DEFAULT - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_BLAST | DAMAGE_TYPE_NO_CONTACT, 0, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_END_SWITCH - EVT_CASE_EQ(MOVE_POWER_BOMB) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOMBETTE_BLAST_LV1) - EVT_LABEL(5) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, 6) - EVT_GOTO(6) - EVT_END_IF - EVT_CALL(GetActionSuccessCopy, LVar0) - EVT_CALL(N(GetPowerBombDamage), LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_BLAST | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, LVarF, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SET(LF_MashEnded, 1) - EVT_CASE_DEFAULT - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_BLAST | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_END_SWITCH - EVT_LABEL(6) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(5) - EVT_END_IF - EVT_CASE_EQ(MOVE_MEGA_BOMB) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOMBETTE_BLAST_LV3) - EVT_LABEL(10) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, 6) - EVT_GOTO(11) - EVT_END_IF - EVT_CALL(GetActionSuccessCopy, LVar0) - EVT_CALL(N(GetMegaBombDamage), LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_BLAST | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, LVarF, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SET(LF_MashEnded, 1) - EVT_CASE_DEFAULT - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_BLAST | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_END_SWITCH - EVT_LABEL(11) - EVT_WAIT(5) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(10) - EVT_END_IF - EVT_END_SWITCH - EVT_IF_GT(LF_MashEnded, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_04) - EVT_CALL(MoveBattleCamOver, 10) - EVT_ELSE - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_51) - EVT_END_IF - EVT_SET(LVar0, 0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(1) - EVT_CASE_OR_EQ(3) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(80) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_ADD(LVar0, 33) - EVT_END_LOOP - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 50) - EVT_ADD(LVar1, 200) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 10, 0, EASING_LINEAR) - EVT_WAIT(50) - EVT_CALL(PartnerYieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 25) - EVT_ADD(LVar1, 200) - EVT_CALL(SetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(0.6)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 20, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_BOMB) + Call(action_command_bomb_init) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar2) + CaseEq(MOVE_BOMB) + Call(GetActorLevel, ACTOR_PARTNER, LVar0) + Switch(LVar0) + CaseEq(0) + Call(SetupMashMeter, 5, 35, 60, 80, 99, 100) + CaseEq(1) + Call(SetupMashMeter, 5, 35, 60, 80, 99, 100) + CaseEq(2) + Call(SetupMashMeter, 5, 35, 60, 80, 99, 100) + EndSwitch + CaseEq(MOVE_POWER_BOMB) + Call(GetActorLevel, ACTOR_PARTNER, LVar0) + Switch(LVar0) + CaseEq(1) + Call(SetupMashMeter, 5, 35, 60, 80, 99, 100) + CaseEq(2) + Call(SetupMashMeter, 5, 35, 60, 80, 99, 100) + EndSwitch + CaseEq(MOVE_MEGA_BOMB) + Call(SetupMashMeter, 5, 35, 60, 80, 99, 100) + EndSwitch + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_48) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar2) + CaseEq(MOVE_BOMB) + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(AddGoalPos, ACTOR_PARTNER, -20, 0, 0) + CaseEq(MOVE_POWER_BOMB) + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(AddGoalPos, ACTOR_PARTNER, -40, 0, 0) + CaseEq(MOVE_MEGA_BOMB) + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(AddGoalPos, ACTOR_PARTNER, -40, 0, 0) + EndSwitch + Call(MoveBattleCamOver, 60 * DT) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar2) + CaseEq(MOVE_BOMB) + Call(action_command_bomb_start, 0, 57 * DT, 3, 0) + CaseEq(MOVE_POWER_BOMB) + Call(action_command_bomb_start, 0, 73 * DT - 1, 3, 1) + CaseEq(MOVE_MEGA_BOMB) + Call(action_command_bomb_start, 0, 87 * DT, 3, 2) + EndSwitch + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_LRAW_BOMBETTE_FUSE) + ChildThread + Call(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 1) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_RunLit) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar2) + CaseEq(MOVE_BOMB) + Set(LVar0, 45 * DT) + CaseEq(MOVE_POWER_BOMB) + Set(LVar0, 50 * DT) + CaseEq(MOVE_MEGA_BOMB) + Set(LVar0, 50 * DT) + EndSwitch + Call(RunToGoal, ACTOR_PARTNER, 45 * DT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_AboutToExplode) + Call(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 0) + EndChildThread + Switch(LVar2) + CaseEq(MOVE_BOMB) + Set(LVar0, 45 * DT) + CaseEq(MOVE_POWER_BOMB) + Set(LVar0, 50 * DT) + CaseEq(MOVE_MEGA_BOMB) + Set(LVar0, 50 * DT) + EndSwitch + Wait(LVar0) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar2) + CaseEq(MOVE_BOMB) + Call(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + EndSwitch + Call(StopSound, SOUND_LRAW_BOMBETTE_FUSE) + Switch(LVar2) + CaseEq(MOVE_BOMB) + Set(LVar0, 6 * DT + 1) + CaseEq(MOVE_POWER_BOMB) + Set(LVar0, 12 * DT) + CaseEq(MOVE_MEGA_BOMB) + Set(LVar0, 20 * DT) + EndSwitch + Loop(LVar0) + Call(SetActorDispOffset, ACTOR_PARTNER, Float(0.5), 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_PARTNER, Float(-0.5), 0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_PARTNER, 0, 0, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(MoveBattleCamOver, 8) + Call(GetActionSuccessCopy, LVar0) + Call(N(GetBombDamage), LVar0) + Set(LVarA, LVar0) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(N(PlayExplosionFX), LVar0, LVar1, LVar2) + Thread + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar2) + CaseEq(MOVE_BOMB) + IfGt(LVarA, 0) + Call(StartRumble, BTL_RUMBLE_HIT_HEAVY) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.75)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(4.5)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(6.0)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 3, Float(2.25)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(1.2)) + Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.45)) + Call(ShakeCam, CAM_BATTLE, 0, 8, Float(0.15)) + Else + Call(StartRumble, BTL_RUMBLE_HIT_HEAVY) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.4)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.6)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(2.4)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.6)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.2)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.6)) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(1.2)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.64)) + Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.24)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.08)) + EndIf + CaseEq(MOVE_POWER_BOMB) + IfGt(LVarA, 0) + Call(StartRumble, BTL_RUMBLE_HIT_EXTREME) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.75)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(4.5)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(6.0)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 3, Float(2.25)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(1.2)) + Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.45)) + Call(ShakeCam, CAM_BATTLE, 0, 8, Float(0.15)) + Else + Call(StartRumble, BTL_RUMBLE_HIT_EXTREME) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.4)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.6)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(2.4)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.6)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.2)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.6)) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(1.2)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.64)) + Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.24)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.08)) + EndIf + CaseEq(MOVE_MEGA_BOMB) + IfGt(LVarA, 0) + Call(StartRumble, BTL_RUMBLE_HIT_MAX) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(4.0)) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(6.0)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(4.0)) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(8.0)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(4.0)) + Call(ShakeCam, CAM_BATTLE, 0, 3, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(1.6)) + Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.6)) + Call(ShakeCam, CAM_BATTLE, 0, 8, Float(0.2)) + Else + Call(StartRumble, BTL_RUMBLE_HIT_MAX) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(4.0)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(2.0)) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(1.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.8)) + Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.3)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(0.1)) + EndIf + EndSwitch + EndThread + Thread + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar2) + CaseEq(MOVE_BOMB) + CaseEq(MOVE_POWER_BOMB) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Wait(8) + IfGt(LVarA, 0) + PlayEffect(EFFECT_RED_IMPACT, 0, LVar0, 0, LVar2, 1, 0, 0) + Else + PlayEffect(EFFECT_RED_IMPACT, 1, LVar0, 0, LVar2, 1, 0, 0) + EndIf + CaseEq(MOVE_MEGA_BOMB) + Set(LVarA, 0) + Wait(10) + Call(N(PlayExplosionFX), 88, 33, 5) + Wait(10) + Call(N(PlayExplosionFX), 18, 73, 5) + Wait(10) + Call(N(PlayExplosionFX), 120, 19, 5) + Wait(10) + EndSwitch + EndThread + Set(LF_MashEnded, 0) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar2) + CaseEq(MOVE_BOMB) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOMBETTE_BLAST_LV1) + Call(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, 6) + BreakSwitch + EndIf + Call(GetActionSuccessCopy, LVar0) + Call(N(GetBombDamage), LVar0) + Switch(LVar0) + CaseGt(0) + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_BLAST | DAMAGE_TYPE_NO_CONTACT, 0, 0, LVarF, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) + Set(LF_MashEnded, 1) + CaseDefault + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_BLAST | DAMAGE_TYPE_NO_CONTACT, 0, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) + EndSwitch + CaseEq(MOVE_POWER_BOMB) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOMBETTE_BLAST_LV1) + Label(5) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, 6) + Goto(6) + EndIf + Call(GetActionSuccessCopy, LVar0) + Call(N(GetPowerBombDamage), LVar0) + Switch(LVar0) + CaseGt(0) + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_BLAST | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, LVarF, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) + Set(LF_MashEnded, 1) + CaseDefault + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_BLAST | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) + EndSwitch + Label(6) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(5) + EndIf + CaseEq(MOVE_MEGA_BOMB) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOMBETTE_BLAST_LV3) + Label(10) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, 6) + Goto(11) + EndIf + Call(GetActionSuccessCopy, LVar0) + Call(N(GetMegaBombDamage), LVar0) + Switch(LVar0) + CaseGt(0) + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_BLAST | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, LVarF, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) + Set(LF_MashEnded, 1) + CaseDefault + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_BLAST | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) + EndSwitch + Label(11) + Wait(5) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(10) + EndIf + EndSwitch + IfGt(LF_MashEnded, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_04) + Call(MoveBattleCamOver, 10) + Else + Call(UseBattleCamPreset, BTL_CAM_PRESET_51) + EndIf + Set(LVar0, 0) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(1) + CaseOrEq(3) + Thread + Set(LVar0, 0) + Loop(80) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Add(LVar0, 33) + EndLoop + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + EndThread + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Sub(LVar0, 50) + Add(LVar1, 200) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_PARTNER, 10, 0, EASING_LINEAR) + Wait(50) + Call(PartnerYieldTurn) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar0, 25) + Add(LVar1, 200) + Call(SetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(4.0)) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.6)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath) + Call(JumpToGoal, ACTOR_PARTNER, 20, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_Attack_FirstStrike) = { - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, -20, 0, 0) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_LRAW_BOMBETTE_FUSE) - EVT_CALL(UseBattleCamPresetImmediately, BTL_CAM_PRESET_11) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 1) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_AboutToExplode) - EVT_WAIT(5) - EVT_CALL(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_WAIT(10) - EVT_CALL(StopSound, SOUND_LRAW_BOMBETTE_FUSE) - EVT_LOOP(7) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, EVT_FLOAT(0.5), 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, EVT_FLOAT(-0.5), 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 0, 0) - EVT_SET(LVarA, 0) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(N(PlayExplosionFX), LVar0, LVar1, LVar2) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(MoveBattleCamOver, 8) - EVT_THREAD - EVT_CALL(StartRumble, BTL_RUMBLE_HIT_HEAVY) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.75)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(4.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 10, EVT_FLOAT(6.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 3, EVT_FLOAT(2.25)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 4, EVT_FLOAT(1.2)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 6, EVT_FLOAT(0.45)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 8, EVT_FLOAT(0.15)) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOMBETTE_BLAST_LV1) - EVT_CALL(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_GOTO(10) - EVT_END_IF - EVT_SET(LVarF, 1) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_BODY_SLAM1) - EVT_SET(LVarF, 5) - EVT_CASE_EQ(MOVE_BODY_SLAM2) - EVT_SET(LVarF, 6) - EVT_CASE_EQ(MOVE_BODY_SLAM3) - EVT_SET(LVarF, 7) - EVT_END_SWITCH - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_BLAST | DAMAGE_TYPE_NO_CONTACT, 0, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_LABEL(10) - EVT_SET(LVar0, 0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CASE_OR_EQ(1) - EVT_CASE_OR_EQ(3) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(80) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_ADD(LVar0, 33) - EVT_END_LOOP - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 50) - EVT_ADD(LVar1, 200) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 10, 0, EASING_LINEAR) - EVT_WAIT(50) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 25) - EVT_ADD(LVar1, 200) - EVT_CALL(SetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(0.6)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 20, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(AddGoalPos, ACTOR_PARTNER, -20, 0, 0) + Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_LRAW_BOMBETTE_FUSE) + Call(UseBattleCamPresetImmediately, BTL_CAM_PRESET_11) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 1) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_AboutToExplode) + Wait(5) + Call(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Wait(10) + Call(StopSound, SOUND_LRAW_BOMBETTE_FUSE) + Loop(7) + Call(SetActorDispOffset, ACTOR_PARTNER, Float(0.5), 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_PARTNER, Float(-0.5), 0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_PARTNER, 0, 0, 0) + Set(LVarA, 0) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(N(PlayExplosionFX), LVar0, LVar1, LVar2) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(MoveBattleCamOver, 8) + Thread + Call(StartRumble, BTL_RUMBLE_HIT_HEAVY) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.75)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(4.5)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 10, Float(6.0)) + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(3.0)) + Call(ShakeCam, CAM_BATTLE, 0, 3, Float(2.25)) + Call(ShakeCam, CAM_BATTLE, 0, 4, Float(1.2)) + Call(ShakeCam, CAM_BATTLE, 0, 6, Float(0.45)) + Call(ShakeCam, CAM_BATTLE, 0, 8, Float(0.15)) + EndThread + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOMBETTE_BLAST_LV1) + Call(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, HIT_RESULT_MISS) + Goto(10) + EndIf + Set(LVarF, 1) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar2) + CaseEq(MOVE_BODY_SLAM1) + Set(LVarF, 5) + CaseEq(MOVE_BODY_SLAM2) + Set(LVarF, 6) + CaseEq(MOVE_BODY_SLAM3) + Set(LVarF, 7) + EndSwitch + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_BLAST | DAMAGE_TYPE_NO_CONTACT, 0, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) + Label(10) + Set(LVar0, 0) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + CaseOrEq(1) + CaseOrEq(3) + Thread + Set(LVar0, 0) + Loop(80) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Add(LVar0, 33) + EndLoop + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + EndThread + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Sub(LVar0, 50) + Add(LVar1, 200) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_PARTNER, 10, 0, EASING_LINEAR) + Wait(50) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar0, 25) + Add(LVar1, 200) + Call(SetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(4.0)) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.6)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Aftermath) + Call(JumpToGoal, ACTOR_PARTNER, 20, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBombette_Idle) + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/battle/partner/bow.c b/src/battle/partner/bow.c index 5d173154190..8e04b46fb2b 100644 --- a/src/battle/partner/bow.c +++ b/src/battle/partner/bow.c @@ -229,1000 +229,1000 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(GetLastEvent, ACTOR_PARTNER, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_SET_CONST(LVar2, ANIM_BattleBow_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Hit) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_EXEC_WAIT(EVS_Partner_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIKE_CONTACT) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_SET(LVar2, 14) - EVT_EXEC_WAIT(EVS_Partner_SpikeContact) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_BURN_CONTACT) - EVT_SET_CONST(LVar1, ANIM_BattleBow_BurnHurt) - EVT_SET(LVar2, 14) - EVT_SET_CONST(LVar3, ANIM_BattleBow_BurnStill) - EVT_EXEC_WAIT(EVS_Partner_BurnContact) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar1, ANIM_BattleBow_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleBow_BurnStill) - EVT_EXEC_WAIT(EVS_Partner_BurnHit) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_SET(LVar2, 14) - EVT_EXEC_WAIT(EVS_Partner_ShockHit) - EVT_CASE_EQ(EVENT_33) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_RECOVER_FROM_KO) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Idle) - EVT_SET_CONST(LVar2, ANIM_BattleBow_Run) - EVT_SET(LVar3, 20) - EVT_EXEC_WAIT(EVS_Partner_Recover) - EVT_CASE_OR_EQ(EVENT_18) - EVT_CASE_OR_EQ(EVENT_BLOCK) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Block) - EVT_EXEC_WAIT(EVS_Partner_NoDamageHit) - EVT_WAIT(10) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(CloseActionCommandInfo) + Call(GetLastEvent, ACTOR_PARTNER, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar1, ANIM_BattleBow_Hurt) + SetConst(LVar2, ANIM_BattleBow_Hurt) + ExecWait(EVS_Partner_Hit) + SetConst(LVar1, ANIM_BattleBow_Hurt) + ExecWait(EVS_Partner_Drop) + EndCaseGroup + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Hurt) + ExecWait(EVS_Partner_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_SPIKE_CONTACT) + SetConst(LVar1, ANIM_BattleBow_Hurt) + Set(LVar2, 14) + ExecWait(EVS_Partner_SpikeContact) + SetConst(LVar1, ANIM_BattleBow_Hurt) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_BURN_CONTACT) + SetConst(LVar1, ANIM_BattleBow_BurnHurt) + Set(LVar2, 14) + SetConst(LVar3, ANIM_BattleBow_BurnStill) + ExecWait(EVS_Partner_BurnContact) + SetConst(LVar1, ANIM_BattleBow_Hurt) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_BURN_HIT) + SetConst(LVar1, ANIM_BattleBow_BurnHurt) + SetConst(LVar2, ANIM_BattleBow_BurnStill) + ExecWait(EVS_Partner_BurnHit) + SetConst(LVar1, ANIM_BattleBow_Hurt) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar1, ANIM_BattleBow_Hurt) + Set(LVar2, 14) + ExecWait(EVS_Partner_ShockHit) + CaseEq(EVENT_33) + SetConst(LVar1, ANIM_BattleBow_Hurt) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_RECOVER_FROM_KO) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Idle) + SetConst(LVar2, ANIM_BattleBow_Run) + Set(LVar3, 20) + ExecWait(EVS_Partner_Recover) + CaseOrEq(EVENT_18) + CaseOrEq(EVENT_BLOCK) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Block) + ExecWait(EVS_Partner_NoDamageHit) + Wait(10) + EndCaseGroup + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_EXECUTE_ACTION) - EVT_EXEC_WAIT(N(EVS_ExecuteAction)) - EVT_CASE_EQ(PHASE_CELEBRATE) - EVT_EXEC_WAIT(N(EVS_Celebrate)) - EVT_CASE_EQ(PHASE_RUN_AWAY_START) - EVT_EXEC_WAIT(N(runAway)) - EVT_CASE_EQ(PHASE_RUN_AWAY_FAIL) - EVT_EXEC_WAIT(N(runAwayFail)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_EXECUTE_ACTION) + ExecWait(N(EVS_ExecuteAction)) + CaseEq(PHASE_CELEBRATE) + ExecWait(N(EVS_Celebrate)) + CaseEq(PHASE_RUN_AWAY_START) + ExecWait(N(runAway)) + CaseEq(PHASE_RUN_AWAY_FAIL) + ExecWait(N(runAwayFail)) + EndSwitch + Return + End }; EvtScript N(EVS_Celebrate) = { - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Celebrate) - EVT_WAIT(36) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Celebrate) + Wait(36) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) + Return + End }; EvtScript N(runAway) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleBow_Run) - EVT_EXEC_WAIT(EVS_Partner_RunAway) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleBow_Run) + ExecWait(EVS_Partner_RunAway) + Return + End }; EvtScript N(runAwayFail) = { - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Run) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, 0) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(6.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Run) + Call(SetActorYaw, ACTOR_PARTNER, 0) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_ENEMY_BEGIN) - EVT_CALL(N(IsOuttaSightActive)) - EVT_IF_NE(LVar0, 0) - EVT_EXEC_WAIT(N(hidePlayer)) - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_ENEMY_BEGIN) + Call(N(IsOuttaSightActive)) + IfNe(LVar0, 0) + ExecWait(N(hidePlayer)) + EndIf + EndSwitch + Return + End }; EvtScript N(EVS_ExecuteAction) = { - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(BTL_MENU_TYPE_STAR_POWERS) - EVT_CALL(LoadStarPowerScript) - EVT_EXEC_WAIT(LVar0) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_SMACK1) - EVT_EXEC_WAIT(N(smack)) - EVT_CASE_EQ(MOVE_SMACK2) - EVT_EXEC_WAIT(N(smack)) - EVT_CASE_EQ(MOVE_SMACK3) - EVT_EXEC_WAIT(N(smack)) - EVT_CASE_EQ(MOVE_OUTTA_SIGHT) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_EXEC_WAIT(N(outtaSight)) - EVT_CASE_EQ(MOVE_SPOOK) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_EXEC_WAIT(N(spook)) - EVT_CASE_EQ(MOVE_FAN_SMACK) - EVT_EXEC_WAIT(N(fanSmack)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(ShowActionHud, TRUE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar0) + CaseEq(BTL_MENU_TYPE_STAR_POWERS) + Call(LoadStarPowerScript) + ExecWait(LVar0) + Return + EndSwitch + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar2) + CaseEq(MOVE_SMACK1) + ExecWait(N(smack)) + CaseEq(MOVE_SMACK2) + ExecWait(N(smack)) + CaseEq(MOVE_SMACK3) + ExecWait(N(smack)) + CaseEq(MOVE_OUTTA_SIGHT) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + ExecWait(N(outtaSight)) + CaseEq(MOVE_SPOOK) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + ExecWait(N(spook)) + CaseEq(MOVE_FAN_SMACK) + ExecWait(N(fanSmack)) + EndSwitch + Return + End }; EvtScript N(returnHome2) = { - EVT_CALL(PartnerYieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_04) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOO_VANISH_A) - EVT_THREAD - EVT_SET(LVar0, 200) - EVT_LOOP(20) - EVT_SUB(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_PARTNER, -1, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Run) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOO_APPEAR_A) - EVT_SET(LVar0, 55) - EVT_LOOP(20) - EVT_ADD(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_PARTNER, -1, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_PARTNER, -1, 255) - EVT_RETURN - EVT_END + Call(PartnerYieldTurn) + Call(UseBattleCamPreset, BTL_CAM_PRESET_04) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOO_VANISH_A) + Thread + Set(LVar0, 200) + Loop(20) + Sub(LVar0, 10) + Call(SetPartAlpha, ACTOR_PARTNER, -1, LVar0) + Wait(1) + EndLoop + EndThread + Wait(10) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Run) + Call(FlyToGoal, ACTOR_PARTNER, 30, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOO_APPEAR_A) + Set(LVar0, 55) + Loop(20) + Add(LVar0, 10) + Call(SetPartAlpha, ACTOR_PARTNER, -1, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_PARTNER, -1, 255) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(PartnerYieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_51) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOO_VANISH_A) - EVT_THREAD - EVT_SET(LVar0, 200) - EVT_LOOP(20) - EVT_SUB(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_PARTNER, -1, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Run) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOO_APPEAR_A) - EVT_SET(LVar0, 55) - EVT_LOOP(20) - EVT_ADD(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_PARTNER, -1, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_PARTNER, -1, 255) - EVT_RETURN - EVT_END + Call(PartnerYieldTurn) + Call(UseBattleCamPreset, BTL_CAM_PRESET_51) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOO_VANISH_A) + Thread + Set(LVar0, 200) + Loop(20) + Sub(LVar0, 10) + Call(SetPartAlpha, ACTOR_PARTNER, -1, LVar0) + Wait(1) + EndLoop + EndThread + Wait(10) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Run) + Call(FlyToGoal, ACTOR_PARTNER, 30, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOO_APPEAR_A) + Set(LVar0, 55) + Loop(20) + Add(LVar0, 10) + Call(SetPartAlpha, ACTOR_PARTNER, -1, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_PARTNER, -1, 255) + Return + End }; EvtScript N(80238EE0) = { - EVT_CALL(PartnerYieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Run) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 15, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) - EVT_RETURN - EVT_END + Call(PartnerYieldTurn) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Run) + Call(FlyToGoal, ACTOR_PARTNER, 15, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) + Return + End }; EvtScript N(smack) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMACK) - EVT_CALL(action_command_smack_init) - EVT_CALL(SetActionHudPrepareTime, 0) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_SMACK1) - EVT_CALL(SetupMashMeter, 4, 40, 70, 99, 100, 0) - EVT_SET(LVarB, 60 * DT) - EVT_SET(LVarC, 1) - EVT_CASE_EQ(MOVE_SMACK2) - EVT_CALL(SetupMashMeter, 5, 35, 60, 80, 99, 100) - EVT_SET(LVarB, 60 * DT) - EVT_SET(LVarC, 1) - EVT_CASE_EQ(MOVE_SMACK3) - EVT_CALL(SetupMashMeter, 5, 35, 60, 80, 99, 100) - EVT_SET(LVarB, 60 * DT) - EVT_SET(LVarC, 1) - EVT_END_SWITCH - EVT_WAIT(10) - EVT_THREAD - EVT_WAIT(10) - EVT_SET(LVar0, LVarB) - EVT_ADD(LVar0, -3) - EVT_CALL(action_command_smack_start, 0, LVar0, 3, 0) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOO_VANISH_A) - EVT_CALL(SetPartAlpha, ACTOR_PARTNER, -1, 55) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Run) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, -15, -10, 0) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 15, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) - EVT_END_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamZoom, 180) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(SetBattleCamOffsetZ, 9) - EVT_CALL(func_8024EDA4) - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOO_APPEAR_A) - EVT_SET(LVar0, 55) - EVT_LOOP(5) - EVT_ADD(LVar0, 40) - EVT_CALL(SetPartAlpha, ACTOR_PARTNER, -1, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_PARTNER, -1, 255) - EVT_CALL(UseBattleCamPresetImmediately, 19) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_PreSlap) - EVT_WAIT(20) - EVT_SET(LVarF, 0) - EVT_SET(LVarE, 0) - EVT_SET(LVarD, 0) - EVT_SET(LFlag0, FALSE) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_LOOP(15) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, EVT_FLOAT(0.5), 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, EVT_FLOAT(-0.5), 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetPartnerActionSuccess, LVarB) - EVT_CALL(func_80269600, LVarD) - EVT_LABEL(0) - EVT_CALL(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_SlapOnce) - EVT_CALL(CloseActionCommandInfo) - EVT_SET(LVar0, 0) - EVT_LOOP(20) - EVT_ADD(LVar0, -45) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_PARTNER, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Injured) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_ZERO, 0, ACTOR_DECORATION_SEEING_STARS) - EVT_WAIT(30) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END_IF - EVT_ADD(LVarE, 1) - EVT_IF_GT(LVarE, LVarD) - EVT_GOTO(2) - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.4), EVT_FLOAT(1.4), EVT_FLOAT(1.0)) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_SlapOnce) - EVT_SET(LFlag0, TRUE) - EVT_CALL(SetDamageSource, DMG_SRC_NEXT_SLAP_LEFT) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_SlapBack) - EVT_SET(LFlag0, FALSE) - EVT_CALL(SetDamageSource, DMG_SRC_NEXT_SLAP_RIGHT) - EVT_END_IF - EVT_WAIT(2) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_IF_EQ(LVarE, 1) - EVT_CALL(N(GetBowSize)) - EVT_CALL(AddBattleCamZoom, LVar0) - EVT_CALL(MoveBattleCamOver, 5) - EVT_ELSE - EVT_CALL(AddBattleCamZoom, 25) - EVT_CALL(MoveBattleCamOver, 5) - EVT_END_IF - EVT_CALL(SetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_HURT, SOUND_BOW_SMACK, 0) - EVT_IF_EQ(LVarE, 1) - EVT_IF_GT(LVarB, 99) - EVT_CALL(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT, 0, LVarC, BS_FLAGS1_NICE_HIT | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_ELSE - EVT_CALL(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT, 0, LVarC, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_END_IF - EVT_GOTO(1) - EVT_ELSE - EVT_IF_GT(LVarB, 99) - EVT_CALL(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT, 0, LVarC, BS_FLAGS1_NICE_HIT) - EVT_ELSE - EVT_CALL(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT, 0, LVarC, 0) - EVT_END_IF - EVT_GOTO(1) - EVT_END_IF - EVT_LABEL(1) - EVT_WAIT(8) - EVT_ADD(LVarF, 10) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) - EVT_GOTO(0) - EVT_LABEL(2) - EVT_IF_EQ(LVarE, 1) - EVT_CALL(N(GetBowSize)) - EVT_CALL(AddBattleCamZoom, LVar0) - EVT_CALL(MoveBattleCamOver, 5) - EVT_ELSE - EVT_CALL(AddBattleCamZoom, 25) - EVT_CALL(MoveBattleCamOver, 5) - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.4), EVT_FLOAT(1.4), EVT_FLOAT(1.0)) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_SlapOnce) - EVT_SET(LFlag0, TRUE) - EVT_CALL(SetDamageSource, DMG_SRC_LAST_SLAP_LEFT) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_SlapBack) - EVT_SET(LFlag0, FALSE) - EVT_CALL(SetDamageSource, DMG_SRC_LAST_SLAP_RIGHT) - EVT_END_IF - EVT_WAIT(2) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_HURT, SOUND_BOW_SMACK, 0) - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(99) - EVT_CALL(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT, 0, LVarC, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_DEFAULT - EVT_CALL(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT, 0, LVarC, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_WAIT(8) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) - EVT_EXEC_WAIT(N(returnHome2)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_SMACK) + Call(action_command_smack_init) + Call(SetActionHudPrepareTime, 0) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar2) + CaseEq(MOVE_SMACK1) + Call(SetupMashMeter, 4, 40, 70, 99, 100, 0) + Set(LVarB, 60 * DT) + Set(LVarC, 1) + CaseEq(MOVE_SMACK2) + Call(SetupMashMeter, 5, 35, 60, 80, 99, 100) + Set(LVarB, 60 * DT) + Set(LVarC, 1) + CaseEq(MOVE_SMACK3) + Call(SetupMashMeter, 5, 35, 60, 80, 99, 100) + Set(LVarB, 60 * DT) + Set(LVarC, 1) + EndSwitch + Wait(10) + Thread + Wait(10) + Set(LVar0, LVarB) + Add(LVar0, -3) + Call(action_command_smack_start, 0, LVar0, 3, 0) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + EndThread + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOO_VANISH_A) + Call(SetPartAlpha, ACTOR_PARTNER, -1, 55) + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_PARTNER) + Thread + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Run) + Call(AddGoalPos, ACTOR_PARTNER, -15, -10, 0) + Call(FlyToGoal, ACTOR_PARTNER, 15, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) + EndThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_13) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamZoom, 180) + Call(MoveBattleCamOver, 30) + Call(SetBattleCamOffsetZ, 9) + Call(func_8024EDA4) + Wait(15) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOO_APPEAR_A) + Set(LVar0, 55) + Loop(5) + Add(LVar0, 40) + Call(SetPartAlpha, ACTOR_PARTNER, -1, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_PARTNER, -1, 255) + Call(UseBattleCamPresetImmediately, 19) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_PreSlap) + Wait(20) + Set(LVarF, 0) + Set(LVarE, 0) + Set(LVarD, 0) + Set(LFlag0, FALSE) + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_SELF) + Loop(15) + Call(SetActorDispOffset, ACTOR_PARTNER, Float(0.5), 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_PARTNER, Float(-0.5), 0, 0) + Wait(1) + EndLoop + Call(GetPartnerActionSuccess, LVarB) + Call(func_80269600, LVarD) + Label(0) + Call(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, HIT_RESULT_MISS) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_SlapOnce) + Call(CloseActionCommandInfo) + Set(LVar0, 0) + Loop(20) + Add(LVar0, -45) + Call(SetActorYaw, ACTOR_PARTNER, LVar0) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_PARTNER, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Injured) + Call(AddActorDecoration, ACTOR_SELF, PRT_ZERO, 0, ACTOR_DECORATION_SEEING_STARS) + Wait(30) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) + Wait(10) + ExecWait(N(EVS_ReturnHome)) + Return + EndIf + Add(LVarE, 1) + IfGt(LVarE, LVarD) + Goto(2) + EndIf + Call(SetActorScale, ACTOR_PARTNER, Float(1.4), Float(1.4), Float(1.0)) + IfEq(LFlag0, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_SlapOnce) + Set(LFlag0, TRUE) + Call(SetDamageSource, DMG_SRC_NEXT_SLAP_LEFT) + Else + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_SlapBack) + Set(LFlag0, FALSE) + Call(SetDamageSource, DMG_SRC_NEXT_SLAP_RIGHT) + EndIf + Wait(2) + Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.5)) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.2)) + EndThread + IfEq(LVarE, 1) + Call(N(GetBowSize)) + Call(AddBattleCamZoom, LVar0) + Call(MoveBattleCamOver, 5) + Else + Call(AddBattleCamZoom, 25) + Call(MoveBattleCamOver, 5) + EndIf + Call(SetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_HURT, SOUND_BOW_SMACK, 0) + IfEq(LVarE, 1) + IfGt(LVarB, 99) + Call(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT, 0, LVarC, BS_FLAGS1_NICE_HIT | BS_FLAGS1_INCLUDE_POWER_UPS) + Else + Call(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT, 0, LVarC, BS_FLAGS1_INCLUDE_POWER_UPS) + EndIf + Goto(1) + Else + IfGt(LVarB, 99) + Call(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT, 0, LVarC, BS_FLAGS1_NICE_HIT) + Else + Call(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT, 0, LVarC, 0) + EndIf + Goto(1) + EndIf + Label(1) + Wait(8) + Add(LVarF, 10) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) + Goto(0) + Label(2) + IfEq(LVarE, 1) + Call(N(GetBowSize)) + Call(AddBattleCamZoom, LVar0) + Call(MoveBattleCamOver, 5) + Else + Call(AddBattleCamZoom, 25) + Call(MoveBattleCamOver, 5) + EndIf + Call(SetActorScale, ACTOR_PARTNER, Float(1.4), Float(1.4), Float(1.0)) + IfEq(LFlag0, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_SlapOnce) + Set(LFlag0, TRUE) + Call(SetDamageSource, DMG_SRC_LAST_SLAP_LEFT) + Else + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_SlapBack) + Set(LFlag0, FALSE) + Call(SetDamageSource, DMG_SRC_LAST_SLAP_RIGHT) + EndIf + Wait(2) + Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) + Call(SetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_HURT, SOUND_BOW_SMACK, 0) + Call(GetPartnerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(99) + Call(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT, 0, LVarC, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS) + CaseDefault + Call(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT, 0, LVarC, BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Wait(8) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) + ExecWait(N(returnHome2)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(outtaSight) = { - EVT_CALL(SetActorFlagBits, ACTOR_PLAYER, ACTOR_FLAG_NO_INACTIVE_ANIM, TRUE) - EVT_CALL(SetActorFlagBits, ACTOR_PLAYER, ACTOR_FLAG_USING_IDLE_ANIM, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, -129, 28, 0) - EVT_CALL(SetBattleCamOffsetZ, 15) - EVT_CALL(SetBattleCamZoom, 260) - EVT_CALL(MoveBattleCamOver, 40) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 5) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 10, 0, EASING_COS_IN_OUT) - EVT_END_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 18) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(10) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -30) - EVT_ADD(LVar1, 30) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 20, 30, EASING_COS_IN_OUT) - EVT_THREAD - EVT_SET(LVar0, 180) - EVT_LOOP(10) - EVT_SUB(LVar0, 18) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 255) - EVT_LOOP(30) - EVT_SUB(LVar0, 5) - EVT_CALL(SetPartAlpha, ACTOR_PARTNER, -1, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(N(ModifyBowPos), -10, 20) - EVT_ADD(LVar2, 5) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 20, 0, EASING_LINEAR) - EVT_CALL(N(IsPartnerImmobile)) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Crouch) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOW_VANISH) - EVT_SET(LVar0, 255) - EVT_LOOP(15) - EVT_SUB(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_PLAYER, 1, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(N(ApplyOuttaSight)) - EVT_CALL(SetActorFlagBits, ACTOR_PLAYER, ACTOR_FLAG_NO_INACTIVE_ANIM, FALSE) - EVT_RETURN - EVT_END + Call(SetActorFlagBits, ACTOR_PLAYER, ACTOR_FLAG_NO_INACTIVE_ANIM, TRUE) + Call(SetActorFlagBits, ACTOR_PLAYER, ACTOR_FLAG_USING_IDLE_ANIM, FALSE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, -129, 28, 0) + Call(SetBattleCamOffsetZ, 15) + Call(SetBattleCamZoom, 260) + Call(MoveBattleCamOver, 40) + Thread + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 5) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_PARTNER, 10, 0, EASING_COS_IN_OUT) + EndThread + Set(LVar0, 0) + Loop(10) + Add(LVar0, 18) + Call(SetActorYaw, ACTOR_PARTNER, LVar0) + Wait(1) + EndLoop + Wait(10) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, -30) + Add(LVar1, 30) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_PARTNER, 20, 30, EASING_COS_IN_OUT) + Thread + Set(LVar0, 180) + Loop(10) + Sub(LVar0, 18) + Call(SetActorYaw, ACTOR_PARTNER, LVar0) + Wait(1) + EndLoop + EndThread + Thread + Set(LVar0, 255) + Loop(30) + Sub(LVar0, 5) + Call(SetPartAlpha, ACTOR_PARTNER, -1, LVar0) + Wait(1) + EndLoop + EndThread + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(N(ModifyBowPos), -10, 20) + Add(LVar2, 5) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_PARTNER, 20, 0, EASING_LINEAR) + Call(N(IsPartnerImmobile)) + IfEq(LVar0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Crouch) + EndIf + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOW_VANISH) + Set(LVar0, 255) + Loop(15) + Sub(LVar0, 10) + Call(SetPartAlpha, ACTOR_PLAYER, 1, LVar0) + Wait(1) + EndLoop + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Call(N(ApplyOuttaSight)) + Call(SetActorFlagBits, ACTOR_PLAYER, ACTOR_FLAG_NO_INACTIVE_ANIM, FALSE) + Return + End }; EvtScript N(hidePlayer) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOW_APPEAR) - EVT_THREAD - EVT_WAIT(10) - EVT_SET(LVar0, 105) - EVT_LOOP(30) - EVT_ADD(LVar0, 5) - EVT_CALL(SetPartAlpha, ACTOR_PLAYER, 1, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 105) - EVT_LOOP(30) - EVT_ADD(LVar0, 5) - EVT_CALL(SetPartAlpha, ACTOR_PARTNER, -1, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(PartnerYieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 40) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 20, 0, EASING_COS_IN_OUT) - EVT_CALL(N(RestorePlayerIdleAnimations)) - EVT_WAIT(20) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(20) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOW_APPEAR) + Thread + Wait(10) + Set(LVar0, 105) + Loop(30) + Add(LVar0, 5) + Call(SetPartAlpha, ACTOR_PLAYER, 1, LVar0) + Wait(1) + EndLoop + EndThread + Thread + Set(LVar0, 105) + Loop(30) + Add(LVar0, 5) + Call(SetPartAlpha, ACTOR_PARTNER, -1, LVar0) + Wait(1) + EndLoop + EndThread + Call(PartnerYieldTurn) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 40) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(FlyToGoal, ACTOR_PARTNER, 20, 0, EASING_COS_IN_OUT) + Call(N(RestorePlayerIdleAnimations)) + Wait(20) + Return + End }; EvtScript N(spook) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_SPOOK) - EVT_CALL(action_command_spook_init) - EVT_CALL(SetupMashMeter, 1, 100, 0, 0, 0, 0) - EVT_CALL(SetActionHudPrepareTime, 20) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_15) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamOffsetZ, 4) - EVT_CALL(AddBattleCamZoom, -150) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(func_8024EDA4) - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_ADD(LVar1, 10) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 20, 0, EASING_COS_IN_OUT) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPresetImmediately, 19) - EVT_THREAD - EVT_WAIT(74) - EVT_LOOP(8) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 1, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, -1, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(7) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 2, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, -2, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(8) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 3, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, -3, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(N(AverageSpookChance)) - EVT_CALL(action_command_spook_start, 0, 87 * DT, 3, LVar0) - EVT_CALL(GetActionQuality, LVar1) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Conceal) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LOOP(90 * DT) - EVT_SWITCH(LVar1) - EVT_CASE_GT(80) - EVT_IF_EQ(LVar2, 7) - EVT_CALL(AddBattleCamZoom, -20) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) - EVT_SET(LVar2, 8) - EVT_END_IF - EVT_CASE_GT(70) - EVT_IF_EQ(LVar2, 6) - EVT_CALL(AddBattleCamZoom, -20) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) - EVT_SET(LVar2, 7) - EVT_END_IF - EVT_CASE_GT(60) - EVT_IF_EQ(LVar2, 5) - EVT_CALL(AddBattleCamZoom, -20) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) - EVT_SET(LVar2, 6) - EVT_END_IF - EVT_CASE_GT(50) - EVT_IF_EQ(LVar2, 4) - EVT_CALL(AddBattleCamZoom, -20) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) - EVT_SET(LVar2, 5) - EVT_END_IF - EVT_CASE_GT(40) - EVT_IF_EQ(LVar2, 3) - EVT_CALL(AddBattleCamZoom, -20) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) - EVT_SET(LVar2, 4) - EVT_END_IF - EVT_CASE_GT(30) - EVT_IF_EQ(LVar2, 2) - EVT_CALL(AddBattleCamZoom, -20) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) - EVT_SET(LVar2, 3) - EVT_END_IF - EVT_CASE_GT(20) - EVT_IF_EQ(LVar2, 1) - EVT_CALL(AddBattleCamZoom, -20) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) - EVT_SET(LVar2, 2) - EVT_END_IF - EVT_CASE_GT(10) - EVT_IF_EQ(LVar2, 0) - EVT_CALL(AddBattleCamZoom, -20) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) - EVT_SET(LVar2, 1) - EVT_END_IF - EVT_END_SWITCH - EVT_ADD(LVar1, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_SpookLoop) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 5) - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_01) - EVT_LOOP(5) - EVT_CALL(SetBattleCamParam, 3, 110) - EVT_WAIT(2) - EVT_CALL(SetBattleCamParam, 3, 100) - EVT_WAIT(2) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 255) - EVT_LOOP(15) - EVT_SUB(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_PARTNER, -1, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOW_SPOOK) - EVT_SETF(LVar0, EVT_FLOAT(1.0)) - EVT_CALL(GetActionQuality, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_LE(20) - EVT_SETF(LVar1, EVT_FLOAT(0.3)) - EVT_CASE_LE(40) - EVT_SETF(LVar1, EVT_FLOAT(0.4)) - EVT_CASE_LE(60) - EVT_SETF(LVar1, EVT_FLOAT(0.5)) - EVT_CASE_LE(80) - EVT_SETF(LVar1, EVT_FLOAT(0.6)) - EVT_CASE_DEFAULT - EVT_SETF(LVar1, EVT_FLOAT(0.7)) - EVT_END_SWITCH - EVT_LOOP(5) - EVT_ADDF(LVar0, LVar1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, LVar0, LVar0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SETF(LVarE, LVar0) - EVT_THREAD - EVT_LOOP(5) - EVT_LOOP(3) - EVT_SUBF(LVar0, EVT_FLOAT(0.23)) - EVT_CALL(SetActorScale, ACTOR_PARTNER, LVar0, LVar0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(3) - EVT_ADDF(LVar0, EVT_FLOAT(0.23)) - EVT_CALL(SetActorScale, ACTOR_PARTNER, LVar0, LVar0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 32) - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 6, LVar0, LVar1, LVar2, EVT_FLOAT(1.8), 45, 0) - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 6, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 45, 0) - EVT_WAIT(15) - EVT_CALL(InitTargetIterator) - EVT_CALL(GetActionQuality, LVarF) - EVT_LOOP(0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, 6) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(SetDamageSource, DMG_SRC_SPOOK) - EVT_SWITCH(LVarF) - EVT_CASE_GT(99) - EVT_CALL(PartnerAfflictEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, STATUS_FLAG_400000, LVarF, 0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_CASE_DEFAULT - EVT_CALL(PartnerAfflictEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, STATUS_FLAG_400000, LVarF, 0, BS_FLAGS1_NO_RATING | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_END_SWITCH - EVT_LABEL(10) - EVT_WAIT(5) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_EQ(LVar0, ITER_NO_MORE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(99) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_04) - EVT_CASE_DEFAULT - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_51) - EVT_END_SWITCH - EVT_WAIT(30) - EVT_THREAD - EVT_SET(LVar0, 105) - EVT_LOOP(15) - EVT_ADD(LVar0, 10) - EVT_CALL(SetPartAlpha, ACTOR_PARTNER, -1, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(GetActionQuality, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_LE(20) - EVT_SETF(LVar1, EVT_FLOAT(0.3)) - EVT_CASE_LE(40) - EVT_SETF(LVar1, EVT_FLOAT(0.4)) - EVT_CASE_LE(60) - EVT_SETF(LVar1, EVT_FLOAT(0.5)) - EVT_CASE_LE(80) - EVT_SETF(LVar1, EVT_FLOAT(0.6)) - EVT_CASE_DEFAULT - EVT_SETF(LVar1, EVT_FLOAT(0.7)) - EVT_END_SWITCH - EVT_SETF(LVar0, LVarE) - EVT_LOOP(5) - EVT_SUBF(LVar0, LVar1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, LVar0, LVar0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) - EVT_EXEC_WAIT(N(80238EE0)) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_SPOOK) + Call(action_command_spook_init) + Call(SetupMashMeter, 1, 100, 0, 0, 0, 0) + Call(SetActionHudPrepareTime, 20) + Wait(10) + Thread + Call(UseBattleCamPreset, BTL_CAM_PRESET_15) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamOffsetZ, 4) + Call(AddBattleCamZoom, -150) + Call(MoveBattleCamOver, 20) + Call(func_8024EDA4) + EndThread + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Add(LVar1, 10) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_PARTNER, 20, 0, EASING_COS_IN_OUT) + Wait(15) + Call(UseBattleCamPresetImmediately, 19) + Thread + Wait(74) + Loop(8) + Call(SetActorDispOffset, ACTOR_PARTNER, 1, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_PARTNER, -1, 0, 0) + Wait(1) + EndLoop + Loop(7) + Call(SetActorDispOffset, ACTOR_PARTNER, 2, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_PARTNER, -2, 0, 0) + Wait(1) + EndLoop + Loop(8) + Call(SetActorDispOffset, ACTOR_PARTNER, 3, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_PARTNER, -3, 0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_PARTNER, 0, 0, 0) + EndThread + Call(N(AverageSpookChance)) + Call(action_command_spook_start, 0, 87 * DT, 3, LVar0) + Call(GetActionQuality, LVar1) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Conceal) + Set(LVar1, 0) + Set(LVar2, 0) + Loop(90 * DT) + Switch(LVar1) + CaseGt(80) + IfEq(LVar2, 7) + Call(AddBattleCamZoom, -20) + Call(MoveBattleCamOver, 20) + Call(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) + Set(LVar2, 8) + EndIf + CaseGt(70) + IfEq(LVar2, 6) + Call(AddBattleCamZoom, -20) + Call(MoveBattleCamOver, 20) + Call(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) + Set(LVar2, 7) + EndIf + CaseGt(60) + IfEq(LVar2, 5) + Call(AddBattleCamZoom, -20) + Call(MoveBattleCamOver, 20) + Call(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) + Set(LVar2, 6) + EndIf + CaseGt(50) + IfEq(LVar2, 4) + Call(AddBattleCamZoom, -20) + Call(MoveBattleCamOver, 20) + Call(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) + Set(LVar2, 5) + EndIf + CaseGt(40) + IfEq(LVar2, 3) + Call(AddBattleCamZoom, -20) + Call(MoveBattleCamOver, 20) + Call(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) + Set(LVar2, 4) + EndIf + CaseGt(30) + IfEq(LVar2, 2) + Call(AddBattleCamZoom, -20) + Call(MoveBattleCamOver, 20) + Call(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) + Set(LVar2, 3) + EndIf + CaseGt(20) + IfEq(LVar2, 1) + Call(AddBattleCamZoom, -20) + Call(MoveBattleCamOver, 20) + Call(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) + Set(LVar2, 2) + EndIf + CaseGt(10) + IfEq(LVar2, 0) + Call(AddBattleCamZoom, -20) + Call(MoveBattleCamOver, 20) + Call(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) + Set(LVar2, 1) + EndIf + EndSwitch + Add(LVar1, 1) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_PARTNER, 0, 0, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_SpookLoop) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Thread + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 5) + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_PRESET_01) + Loop(5) + Call(SetBattleCamParam, 3, 110) + Wait(2) + Call(SetBattleCamParam, 3, 100) + Wait(2) + EndLoop + EndThread + Thread + Set(LVar0, 255) + Loop(15) + Sub(LVar0, 10) + Call(SetPartAlpha, ACTOR_PARTNER, -1, LVar0) + Wait(1) + EndLoop + EndThread + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOW_SPOOK) + SetF(LVar0, Float(1.0)) + Call(GetActionQuality, LVar2) + Switch(LVar2) + CaseLe(20) + SetF(LVar1, Float(0.3)) + CaseLe(40) + SetF(LVar1, Float(0.4)) + CaseLe(60) + SetF(LVar1, Float(0.5)) + CaseLe(80) + SetF(LVar1, Float(0.6)) + CaseDefault + SetF(LVar1, Float(0.7)) + EndSwitch + Loop(5) + AddF(LVar0, LVar1) + Call(SetActorScale, ACTOR_PARTNER, LVar0, LVar0, LVar0) + Wait(1) + EndLoop + SetF(LVarE, LVar0) + Thread + Loop(5) + Loop(3) + SubF(LVar0, Float(0.23)) + Call(SetActorScale, ACTOR_PARTNER, LVar0, LVar0, LVar0) + Wait(1) + EndLoop + Loop(3) + AddF(LVar0, Float(0.23)) + Call(SetActorScale, ACTOR_PARTNER, LVar0, LVar0, LVar0) + Wait(1) + EndLoop + EndLoop + EndThread + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 32) + PlayEffect(EFFECT_ENERGY_IN_OUT, 6, LVar0, LVar1, LVar2, Float(1.8), 45, 0) + PlayEffect(EFFECT_ENERGY_IN_OUT, 6, LVar0, LVar1, LVar2, Float(1.0), 45, 0) + Wait(15) + Call(InitTargetIterator) + Call(GetActionQuality, LVarF) + Loop(0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, 6) + Goto(10) + EndIf + Call(SetDamageSource, DMG_SRC_SPOOK) + Switch(LVarF) + CaseGt(99) + Call(PartnerAfflictEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, STATUS_FLAG_400000, LVarF, 0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) + CaseDefault + Call(PartnerAfflictEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, STATUS_FLAG_400000, LVarF, 0, BS_FLAGS1_NO_RATING | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) + EndSwitch + Label(10) + Wait(5) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfEq(LVar0, ITER_NO_MORE) + BreakLoop + EndIf + EndLoop + Call(GetPartnerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(99) + Call(UseBattleCamPreset, BTL_CAM_PRESET_04) + CaseDefault + Call(UseBattleCamPreset, BTL_CAM_PRESET_51) + EndSwitch + Wait(30) + Thread + Set(LVar0, 105) + Loop(15) + Add(LVar0, 10) + Call(SetPartAlpha, ACTOR_PARTNER, -1, LVar0) + Wait(1) + EndLoop + EndThread + Call(GetActionQuality, LVar2) + Switch(LVar2) + CaseLe(20) + SetF(LVar1, Float(0.3)) + CaseLe(40) + SetF(LVar1, Float(0.4)) + CaseLe(60) + SetF(LVar1, Float(0.5)) + CaseLe(80) + SetF(LVar1, Float(0.6)) + CaseDefault + SetF(LVar1, Float(0.7)) + EndSwitch + SetF(LVar0, LVarE) + Loop(5) + SubF(LVar0, LVar1) + Call(SetActorScale, ACTOR_PARTNER, LVar0, LVar0, LVar0) + Wait(1) + EndLoop + Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) + ExecWait(N(80238EE0)) + Return + End }; EvtScript N(fanSmack) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMACK) - EVT_CALL(action_command_smack_init) - EVT_CALL(SetActionHudPrepareTime, 0) - EVT_CALL(SetupMashMeter, 5, 35, 60, 80, 99, 100) - EVT_SET(LVarB, 90 * DT) - EVT_SET(LVarC, 2) - EVT_WAIT(10) - EVT_THREAD - EVT_WAIT(10) - EVT_SET(LVar0, LVarB) - EVT_ADD(LVar0, -3) - EVT_CALL(action_command_smack_start, 0, LVar0, 3, 1) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOO_VANISH_A) - EVT_CALL(SetPartAlpha, ACTOR_PARTNER, -1, 55) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Run) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, -25, -10, 0) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 15, 0, EASING_COS_IN_OUT) - EVT_END_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamZoom, 180) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(SetBattleCamOffsetZ, 9) - EVT_CALL(func_8024EDA4) - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOO_APPEAR_A) - EVT_SET(LVar0, 55) - EVT_LOOP(5) - EVT_ADD(LVar0, 40) - EVT_CALL(SetPartAlpha, ACTOR_PARTNER, -1, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_PARTNER, -1, 255) - EVT_CALL(UseBattleCamPresetImmediately, 19) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Celebrate) - EVT_WAIT(20) - EVT_SET(LVarF, 0) - EVT_SET(LVarE, 0) - EVT_SET(LVarD, 0) - EVT_SET(LFlag0, FALSE) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_CelebrateFast) - EVT_LOOP(30) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, EVT_FLOAT(0.5), 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, EVT_FLOAT(-0.5), 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetPartnerActionSuccess, LVarB) - EVT_CALL(func_80269600, LVarD) - EVT_LABEL(0) - EVT_CALL(PartnerTestEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT | SUPPRESS_EVENT_ALT_SPIKY, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_FanSmackOnce) - EVT_CALL(CloseActionCommandInfo) - EVT_SET(LVar0, 0) - EVT_LOOP(15) - EVT_ADD(LVar0, -45) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(15) - EVT_ADD(LVar0, -90) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_PARTNER, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Injured) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_ZERO, 0, ACTOR_DECORATION_SEEING_STARS) - EVT_WAIT(40) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END_IF - EVT_ADD(LVarE, 1) - EVT_IF_GT(LVarE, LVarD) - EVT_GOTO(2) - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.4), EVT_FLOAT(1.4), EVT_FLOAT(1.0)) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_FanSmackOnce) - EVT_SET(LFlag0, TRUE) - EVT_CALL(SetDamageSource, DMG_SRC_NEXT_FAN_SMACK_LEFT) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_FanSmackBack) - EVT_SET(LFlag0, FALSE) - EVT_CALL(SetDamageSource, DMG_SRC_NEXT_FAN_SMACK_RIGHT) - EVT_END_IF - EVT_WAIT(2) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_IF_EQ(LVarE, 1) - EVT_CALL(N(GetBowSize)) - EVT_CALL(AddBattleCamZoom, LVar0) - EVT_CALL(MoveBattleCamOver, 5) - EVT_ELSE - EVT_CALL(AddBattleCamZoom, 25) - EVT_CALL(MoveBattleCamOver, 5) - EVT_END_IF - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_CONFETTI, 5, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 20, 0) - EVT_CALL(SetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_HURT, SOUND_BOW_FAN_SMACK, 0) - EVT_IF_EQ(LVarE, 1) - EVT_IF_GT(LVarB, 99) - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT | SUPPRESS_EVENT_ALT_SPIKY, 0, LVarC, BS_FLAGS1_NICE_HIT | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_ELSE - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT | SUPPRESS_EVENT_ALT_SPIKY, 0, LVarC, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_END_IF - EVT_GOTO(1) - EVT_ELSE - EVT_IF_GT(LVarB, 99) - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT | SUPPRESS_EVENT_ALT_SPIKY, 0, LVarC, BS_FLAGS1_NICE_HIT) - EVT_ELSE - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT | SUPPRESS_EVENT_ALT_SPIKY, 0, LVarC, 0) - EVT_END_IF - EVT_GOTO(1) - EVT_END_IF - EVT_LABEL(1) - EVT_IF_EQ(LVarE, 1) - EVT_SET(LVar0, 0) - EVT_LOOP(8) - EVT_ADD(LVar0, 144) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_ELSE - EVT_SET(LVar0, 0) - EVT_LOOP(8) - EVT_SUB(LVar0, 144) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_IF - EVT_CALL(SetActorYaw, ACTOR_PARTNER, 0) - EVT_ADD(LVarF, 10) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) - EVT_GOTO(0) - EVT_LABEL(2) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 1, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_IF_EQ(LVarE, 1) - EVT_CALL(N(GetBowSize)) - EVT_CALL(AddBattleCamZoom, LVar0) - EVT_CALL(MoveBattleCamOver, 5) - EVT_ELSE - EVT_CALL(AddBattleCamZoom, 25) - EVT_CALL(MoveBattleCamOver, 5) - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.4), EVT_FLOAT(1.4), EVT_FLOAT(1.0)) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_FanSmackOnce) - EVT_SET(LFlag0, TRUE) - EVT_CALL(SetDamageSource, DMG_SRC_LAST_FAN_SMACK_LEFT) - EVT_ELSE - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_FanSmackBack) - EVT_SET(LFlag0, FALSE) - EVT_CALL(SetDamageSource, DMG_SRC_LAST_FAN_SMACK_RIGHT) - EVT_END_IF - EVT_WAIT(2) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_HURT, SOUND_BOW_FAN_SMACK, 0) - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(99) - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT | SUPPRESS_EVENT_ALT_SPIKY, 0, LVarC, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS) - EVT_CASE_DEFAULT - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT | SUPPRESS_EVENT_ALT_SPIKY, 0, LVarC, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_THREAD - EVT_IF_EQ(LVarE, 1) - EVT_SET(LVar0, 0) - EVT_LOOP(8) - EVT_ADD(LVar0, 144) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_ELSE - EVT_SET(LVar0, 0) - EVT_LOOP(8) - EVT_SUB(LVar0, 144) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_IF - EVT_IF_EQ(LVarE, 1) - EVT_SET(LVar0, 0) - EVT_LOOP(8) - EVT_ADD(LVar0, 72) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_ELSE - EVT_SET(LVar0, 0) - EVT_LOOP(8) - EVT_SUB(LVar0, 72) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_IF - EVT_CALL(SetActorYaw, ACTOR_PARTNER, 0) - EVT_END_THREAD - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(1) - EVT_CASE_OR_EQ(3) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) - EVT_EXEC_WAIT(N(returnHome2)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_SMACK) + Call(action_command_smack_init) + Call(SetActionHudPrepareTime, 0) + Call(SetupMashMeter, 5, 35, 60, 80, 99, 100) + Set(LVarB, 90 * DT) + Set(LVarC, 2) + Wait(10) + Thread + Wait(10) + Set(LVar0, LVarB) + Add(LVar0, -3) + Call(action_command_smack_start, 0, LVar0, 3, 1) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + EndThread + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOO_VANISH_A) + Call(SetPartAlpha, ACTOR_PARTNER, -1, 55) + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_PARTNER) + Thread + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Run) + Call(AddGoalPos, ACTOR_PARTNER, -25, -10, 0) + Call(FlyToGoal, ACTOR_PARTNER, 15, 0, EASING_COS_IN_OUT) + EndThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_13) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamZoom, 180) + Call(MoveBattleCamOver, 30) + Call(SetBattleCamOffsetZ, 9) + Call(func_8024EDA4) + Wait(15) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOO_APPEAR_A) + Set(LVar0, 55) + Loop(5) + Add(LVar0, 40) + Call(SetPartAlpha, ACTOR_PARTNER, -1, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_PARTNER, -1, 255) + Call(UseBattleCamPresetImmediately, 19) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Celebrate) + Wait(20) + Set(LVarF, 0) + Set(LVarE, 0) + Set(LVarD, 0) + Set(LFlag0, FALSE) + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_SELF) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_CelebrateFast) + Loop(30) + Call(SetActorDispOffset, ACTOR_PARTNER, Float(0.5), 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_PARTNER, Float(-0.5), 0, 0) + Wait(1) + EndLoop + Call(GetPartnerActionSuccess, LVarB) + Call(func_80269600, LVarD) + Label(0) + Call(PartnerTestEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT | SUPPRESS_EVENT_ALT_SPIKY, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, HIT_RESULT_MISS) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_FanSmackOnce) + Call(CloseActionCommandInfo) + Set(LVar0, 0) + Loop(15) + Add(LVar0, -45) + Call(SetActorYaw, ACTOR_PARTNER, LVar0) + Wait(1) + EndLoop + Loop(15) + Add(LVar0, -90) + Call(SetActorYaw, ACTOR_PARTNER, LVar0) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_PARTNER, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Injured) + Call(AddActorDecoration, ACTOR_SELF, PRT_ZERO, 0, ACTOR_DECORATION_SEEING_STARS) + Wait(40) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) + Wait(10) + ExecWait(N(EVS_ReturnHome)) + Return + EndIf + Add(LVarE, 1) + IfGt(LVarE, LVarD) + Goto(2) + EndIf + Call(SetActorScale, ACTOR_PARTNER, Float(1.4), Float(1.4), Float(1.0)) + IfEq(LFlag0, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_FanSmackOnce) + Set(LFlag0, TRUE) + Call(SetDamageSource, DMG_SRC_NEXT_FAN_SMACK_LEFT) + Else + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_FanSmackBack) + Set(LFlag0, FALSE) + Call(SetDamageSource, DMG_SRC_NEXT_FAN_SMACK_RIGHT) + EndIf + Wait(2) + Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.5)) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.2)) + EndThread + IfEq(LVarE, 1) + Call(N(GetBowSize)) + Call(AddBattleCamZoom, LVar0) + Call(MoveBattleCamOver, 5) + Else + Call(AddBattleCamZoom, 25) + Call(MoveBattleCamOver, 5) + EndIf + Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_CONFETTI, 5, LVar0, LVar1, LVar2, Float(1.0), 20, 0) + Call(SetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_HURT, SOUND_BOW_FAN_SMACK, 0) + IfEq(LVarE, 1) + IfGt(LVarB, 99) + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT | SUPPRESS_EVENT_ALT_SPIKY, 0, LVarC, BS_FLAGS1_NICE_HIT | BS_FLAGS1_INCLUDE_POWER_UPS) + Else + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT | SUPPRESS_EVENT_ALT_SPIKY, 0, LVarC, BS_FLAGS1_INCLUDE_POWER_UPS) + EndIf + Goto(1) + Else + IfGt(LVarB, 99) + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT | SUPPRESS_EVENT_ALT_SPIKY, 0, LVarC, BS_FLAGS1_NICE_HIT) + Else + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT | SUPPRESS_EVENT_ALT_SPIKY, 0, LVarC, 0) + EndIf + Goto(1) + EndIf + Label(1) + IfEq(LVarE, 1) + Set(LVar0, 0) + Loop(8) + Add(LVar0, 144) + Call(SetActorYaw, ACTOR_PARTNER, LVar0) + Wait(1) + EndLoop + Else + Set(LVar0, 0) + Loop(8) + Sub(LVar0, 144) + Call(SetActorYaw, ACTOR_PARTNER, LVar0) + Wait(1) + EndLoop + EndIf + Call(SetActorYaw, ACTOR_PARTNER, 0) + Add(LVarF, 10) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) + Goto(0) + Label(2) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.5)) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.5)) + Call(ShakeCam, CAM_BATTLE, 0, 1, Float(0.2)) + EndThread + IfEq(LVarE, 1) + Call(N(GetBowSize)) + Call(AddBattleCamZoom, LVar0) + Call(MoveBattleCamOver, 5) + Else + Call(AddBattleCamZoom, 25) + Call(MoveBattleCamOver, 5) + EndIf + Call(SetActorScale, ACTOR_PARTNER, Float(1.4), Float(1.4), Float(1.0)) + IfEq(LFlag0, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_FanSmackOnce) + Set(LFlag0, TRUE) + Call(SetDamageSource, DMG_SRC_LAST_FAN_SMACK_LEFT) + Else + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_FanSmackBack) + Set(LFlag0, FALSE) + Call(SetDamageSource, DMG_SRC_LAST_FAN_SMACK_RIGHT) + EndIf + Wait(2) + Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) + Call(SetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_HURT, SOUND_BOW_FAN_SMACK, 0) + Call(GetPartnerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(99) + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT | SUPPRESS_EVENT_ALT_SPIKY, 0, LVarC, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS) + CaseDefault + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT | SUPPRESS_EVENT_ALT_SPIKY, 0, LVarC, BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Thread + IfEq(LVarE, 1) + Set(LVar0, 0) + Loop(8) + Add(LVar0, 144) + Call(SetActorYaw, ACTOR_PARTNER, LVar0) + Wait(1) + EndLoop + Else + Set(LVar0, 0) + Loop(8) + Sub(LVar0, 144) + Call(SetActorYaw, ACTOR_PARTNER, LVar0) + Wait(1) + EndLoop + EndIf + IfEq(LVarE, 1) + Set(LVar0, 0) + Loop(8) + Add(LVar0, 72) + Call(SetActorYaw, ACTOR_PARTNER, LVar0) + Wait(1) + EndLoop + Else + Set(LVar0, 0) + Loop(8) + Sub(LVar0, 72) + Call(SetActorYaw, ACTOR_PARTNER, LVar0) + Wait(1) + EndLoop + EndIf + Call(SetActorYaw, ACTOR_PARTNER, 0) + EndThread + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Wait(10) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + CaseOrEq(1) + CaseOrEq(3) + Wait(10) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Idle) + ExecWait(N(returnHome2)) + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/battle/partner/goombario.c b/src/battle/partner/goombario.c index e3626f08e9e..992e62e2aa9 100644 --- a/src/battle/partner/goombario.c +++ b/src/battle/partner/goombario.c @@ -559,698 +559,698 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_PARTNER, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_PARTNER, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_PARTNER, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_PARTNER, EVT_PTR(N(EVS_HandlePhase))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_PARTNER, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_PARTNER, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_PARTNER, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_PARTNER, Ref(N(EVS_HandlePhase))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(GetLastEvent, ACTOR_PARTNER, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_SET_CONST(LVar2, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(EVS_Partner_Hit) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(EVS_Partner_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIKE_CONTACT) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_SET(LVar2, 12) - EVT_EXEC_WAIT(EVS_Partner_SpikeContact) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_BURN_CONTACT) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_BurnHurt1) - EVT_SET(LVar2, 12) - EVT_SET_CONST(LVar3, ANIM_BattleGoombario_BurnHurt2) - EVT_EXEC_WAIT(EVS_Partner_BurnContact) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_BurnHurt1) - EVT_SET_CONST(LVar2, ANIM_BattleGoombario_BurnHurt2) - EVT_EXEC_WAIT(EVS_Partner_BurnHit) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_SET(LVar2, 12) - EVT_EXEC_WAIT(EVS_Partner_ShockHit) - EVT_CASE_EQ(EVENT_33) - EVT_CALL(N(StopCharge)) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_HurtStill) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_RECOVER_FROM_KO) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_Idle) - EVT_SET_CONST(LVar2, ANIM_BattleGoombario_Run) - EVT_SET(LVar3, 0) - EVT_EXEC_WAIT(EVS_Partner_Recover) - EVT_CASE_OR_EQ(EVENT_18) - EVT_CASE_OR_EQ(EVENT_BLOCK) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_Block) - EVT_EXEC_WAIT(EVS_Partner_NoDamageHit) - EVT_WAIT(10) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(CloseActionCommandInfo) + Call(GetLastEvent, ACTOR_PARTNER, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + SetConst(LVar2, ANIM_BattleGoombario_HurtStill) + ExecWait(EVS_Partner_Hit) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + ExecWait(EVS_Partner_Drop) + EndCaseGroup + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + ExecWait(EVS_Partner_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_SPIKE_CONTACT) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + Set(LVar2, 12) + ExecWait(EVS_Partner_SpikeContact) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_BURN_CONTACT) + SetConst(LVar1, ANIM_BattleGoombario_BurnHurt1) + Set(LVar2, 12) + SetConst(LVar3, ANIM_BattleGoombario_BurnHurt2) + ExecWait(EVS_Partner_BurnContact) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_BURN_HIT) + SetConst(LVar1, ANIM_BattleGoombario_BurnHurt1) + SetConst(LVar2, ANIM_BattleGoombario_BurnHurt2) + ExecWait(EVS_Partner_BurnHit) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + Set(LVar2, 12) + ExecWait(EVS_Partner_ShockHit) + CaseEq(EVENT_33) + Call(N(StopCharge)) + SetConst(LVar1, ANIM_BattleGoombario_HurtStill) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_RECOVER_FROM_KO) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_Idle) + SetConst(LVar2, ANIM_BattleGoombario_Run) + Set(LVar3, 0) + ExecWait(EVS_Partner_Recover) + CaseOrEq(EVENT_18) + CaseOrEq(EVENT_BLOCK) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_Block) + ExecWait(EVS_Partner_NoDamageHit) + Wait(10) + EndCaseGroup + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_FIRST_STRIKE) - EVT_EXEC_WAIT(N(EVS_FirstStrike)) - EVT_CASE_EQ(PHASE_EXECUTE_ACTION) - EVT_EXEC_WAIT(N(EVS_ExecuteAction)) - EVT_CASE_EQ(PHASE_CELEBRATE) - EVT_EXEC_WAIT(N(EVS_Celebrate)) - EVT_CASE_EQ(PHASE_RUN_AWAY_START) - EVT_EXEC_WAIT(N(EVS_RunAway)) - EVT_CASE_EQ(PHASE_RUN_AWAY_FAIL) - EVT_EXEC_WAIT(N(EVS_RunAwayFail)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_FIRST_STRIKE) + ExecWait(N(EVS_FirstStrike)) + CaseEq(PHASE_EXECUTE_ACTION) + ExecWait(N(EVS_ExecuteAction)) + CaseEq(PHASE_CELEBRATE) + ExecWait(N(EVS_Celebrate)) + CaseEq(PHASE_RUN_AWAY_START) + ExecWait(N(EVS_RunAway)) + CaseEq(PHASE_RUN_AWAY_FAIL) + ExecWait(N(EVS_RunAwayFail)) + EndSwitch + Return + End }; EvtScript N(EVS_Celebrate) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_CelebrateLoop) - EVT_SET_CONST(LVar2, ANIM_BattleGoombario_Celebrate) - EVT_SET_CONST(LVar3, ANIM_BattleGoombario_Idle) - EVT_EXEC_WAIT(EVS_Partner_Celebrate) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_CelebrateLoop) + SetConst(LVar2, ANIM_BattleGoombario_Celebrate) + SetConst(LVar3, ANIM_BattleGoombario_Idle) + ExecWait(EVS_Partner_Celebrate) + Return + End }; EvtScript N(EVS_ExecuteAction) = { - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(BTL_MENU_TYPE_STAR_POWERS) - EVT_CALL(LoadStarPowerScript) - EVT_EXEC_WAIT(LVar0) - EVT_RETURN - EVT_CASE_EQ(BTL_MENU_TYPE_ITEMS) - EVT_CALL(LoadItemScript) - EVT_EXEC_WAIT(LVar0) - EVT_RETURN - EVT_END_SWITCH - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_HEADBONK1) - EVT_EXEC_WAIT(N(EVS_Attack_Headbonk1)) - EVT_CASE_EQ(MOVE_HEADBONK2) - EVT_EXEC_WAIT(N(EVS_Attack_Headbonk2)) - EVT_CASE_EQ(MOVE_HEADBONK3) - EVT_EXEC_WAIT(N(EVS_Attack_Headbonk3)) - EVT_CASE_EQ(MOVE_TATTLE) - EVT_EXEC_WAIT(N(EVS_Move_Tattle)) - EVT_CASE_EQ(MOVE_CHARGE) - EVT_EXEC_WAIT(N(EVS_Move_Charge)) - EVT_CASE_EQ(MOVE_MULTIBONK) - EVT_EXEC_WAIT(N(EVS_Move_Multibonk)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Call(ShowActionHud, TRUE) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + Switch(LVar0) + CaseEq(BTL_MENU_TYPE_STAR_POWERS) + Call(LoadStarPowerScript) + ExecWait(LVar0) + Return + CaseEq(BTL_MENU_TYPE_ITEMS) + Call(LoadItemScript) + ExecWait(LVar0) + Return + EndSwitch + Switch(LVar2) + CaseEq(MOVE_HEADBONK1) + ExecWait(N(EVS_Attack_Headbonk1)) + CaseEq(MOVE_HEADBONK2) + ExecWait(N(EVS_Attack_Headbonk2)) + CaseEq(MOVE_HEADBONK3) + ExecWait(N(EVS_Attack_Headbonk3)) + CaseEq(MOVE_TATTLE) + ExecWait(N(EVS_Move_Tattle)) + CaseEq(MOVE_CHARGE) + ExecWait(N(EVS_Move_Charge)) + CaseEq(MOVE_MULTIBONK) + ExecWait(N(EVS_Move_Multibonk)) + EndSwitch + Return + End }; EvtScript N(EVS_FirstStrike) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_RunAway) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleGoombario_Run) - EVT_EXEC_WAIT(EVS_Partner_RunAway) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleGoombario_Run) + ExecWait(EVS_Partner_RunAway) + Return + End }; EvtScript N(EVS_RunAwayFail) = { - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Run) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, 0) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(6.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Run) + Call(SetActorYaw, ACTOR_PARTNER, 0) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_PLAYER_BEGIN) - EVT_IF_FALSE(GF_Tutorial_SwapTurnOrder) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(10) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 30) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 60) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 90) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 120) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 150) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 180) - EVT_WAIT(5) - EVT_CALL(ActorSpeak, MSG_CH0_00BA, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Talk, ANIM_BattleGoombario_Idle) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 150) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 120) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 90) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 60) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 30) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 0) - EVT_WAIT(5) - EVT_SET(GF_Tutorial_SwapTurnOrder, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_PLAYER_BEGIN) + IfFalse(GF_Tutorial_SwapTurnOrder) + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 20) + Wait(10) + Call(SetActorYaw, ACTOR_PLAYER, 30) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 60) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 90) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 120) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 150) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 180) + Wait(5) + Call(ActorSpeak, MSG_CH0_00BA, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Talk, ANIM_BattleGoombario_Idle) + Call(SetActorYaw, ACTOR_PLAYER, 150) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 120) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 90) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 60) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 30) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 0) + Wait(5) + Set(GF_Tutorial_SwapTurnOrder, TRUE) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + EndIf + EndSwitch + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(PartnerYieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_51) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) - EVT_THREAD - EVT_WAIT(4) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_SET(LVar0, 180) - EVT_LOOP(3) - EVT_ADD(LVar0, 60) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.2)) - EVT_CALL(N(GetReturnMoveTime)) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, LVar0, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 18, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 19, 0) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, -10, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 6, FALSE, FALSE, TRUE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 18, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 19, 0) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(2) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Run) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) - EVT_RETURN - EVT_END + Call(PartnerYieldTurn) + Call(UseBattleCamPreset, BTL_CAM_PRESET_51) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) + Thread + Wait(4) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Set(LVar0, 180) + Loop(3) + Add(LVar0, 60) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + EndThread + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.2)) + Call(N(GetReturnMoveTime)) + Call(JumpToGoal, ACTOR_PARTNER, LVar0, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) + Call(SetActorDispOffset, ACTOR_PARTNER, 0, 18, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_PARTNER, 0, 19, 0) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) + Call(AddGoalPos, ACTOR_PARTNER, -10, 0, 0) + Call(JumpToGoal, ACTOR_PARTNER, 6, FALSE, FALSE, TRUE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) + Call(SetActorDispOffset, ACTOR_PARTNER, 0, 18, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_PARTNER, 0, 19, 0) + Wait(1) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Idle) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(2) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(8.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Run) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) + Return + End }; EvtScript N(returnHome2) = { - EVT_CALL(PartnerYieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 60) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.4)) - EVT_CALL(N(GetReturnMoveTime)) - EVT_THREAD - EVT_WAIT(4) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) - EVT_SUB(LVar0, 4) - EVT_SET(LVar1, LVar0) - EVT_DIV(LVar1, 3) - EVT_IF_LT(LVar1, 1) - EVT_SET(LVar1, 1) - EVT_END_IF - EVT_SET(LVar2, LVar1) - EVT_MOD(LVar2, 2) - EVT_IF_EQ(LVar2, 0) - EVT_SUB(LVar1, 1) - EVT_END_IF - EVT_SET(LVar0, 180) - EVT_LOOP(LVar1) - EVT_LOOP(3) - EVT_ADD(LVar0, 60) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_LOOP - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(JumpToGoal, ACTOR_PARTNER, LVar0, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 18, 0) - EVT_WAIT(1) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, -20, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 6, FALSE, FALSE, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 18, 0) - EVT_WAIT(1) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, -10, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 4, FALSE, FALSE, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 18, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) - EVT_WAIT(2) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Run) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) - EVT_RETURN - EVT_END + Call(PartnerYieldTurn) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar0, 60) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.4)) + Call(N(GetReturnMoveTime)) + Thread + Wait(4) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 12, 0) + Sub(LVar0, 4) + Set(LVar1, LVar0) + Div(LVar1, 3) + IfLt(LVar1, 1) + Set(LVar1, 1) + EndIf + Set(LVar2, LVar1) + Mod(LVar2, 2) + IfEq(LVar2, 0) + Sub(LVar1, 1) + EndIf + Set(LVar0, 180) + Loop(LVar1) + Loop(3) + Add(LVar0, 60) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndLoop + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + EndThread + Call(JumpToGoal, ACTOR_PARTNER, LVar0, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) + Call(SetActorDispOffset, ACTOR_PARTNER, 0, 18, 0) + Wait(1) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) + Call(AddGoalPos, ACTOR_PARTNER, -20, 0, 0) + Call(JumpToGoal, ACTOR_PARTNER, 6, FALSE, FALSE, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) + Call(SetActorDispOffset, ACTOR_PARTNER, 0, 18, 0) + Wait(1) + Call(AddGoalPos, ACTOR_PARTNER, -10, 0, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(JumpToGoal, ACTOR_PARTNER, 4, FALSE, FALSE, TRUE) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) + Call(SetActorDispOffset, ACTOR_PARTNER, 0, 18, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) + Wait(2) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(8.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Run) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) + Return + End }; EvtScript N(runToTarget) = { - EVT_CALL(SetGoalToFirstTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 40) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, EVT_FLOAT(70.0)) - EVT_IF_LT(LVar0, LVar3) - EVT_SET(LVar3, LVar0) - EVT_END_IF - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar3, LVar4, LVar5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PARTNER_APPROACH) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(5.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Run) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) - EVT_RETURN - EVT_END + Call(SetGoalToFirstTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 40) + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(GetGoalPos, ACTOR_PARTNER, LVar3, LVar4, LVar5) + Sub(LVar3, Float(70.0)) + IfLt(LVar0, LVar3) + Set(LVar3, LVar0) + EndIf + Call(SetGoalPos, ACTOR_PARTNER, LVar3, LVar4, LVar5) + Call(UseBattleCamPreset, BTL_CAM_PARTNER_APPROACH) + Call(SetActorSpeed, ACTOR_PARTNER, Float(5.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Run) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) + Return + End }; EvtScript N(calcJumpTime) = { - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVarB, LVar7, LVarD) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar7, LVarD, LVarE) - EVT_IF_GT(LVarB, LVar7) - EVT_SUB(LVarB, LVar7) - EVT_ELSE - EVT_SUB(LVar7, LVarB) - EVT_SET(LVarB, LVar7) - EVT_END_IF - EVT_SUB(LVarB, 20) - EVT_DIVF(LVarB, EVT_FLOAT(10.588)) - EVT_ADDF(LVarB, 15) - EVT_SET(LVarA, LVarB) - EVT_RETURN - EVT_END + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(GetGoalPos, ACTOR_PARTNER, LVarB, LVar7, LVarD) + Call(GetActorPos, ACTOR_PARTNER, LVar7, LVarD, LVarE) + IfGt(LVarB, LVar7) + Sub(LVarB, LVar7) + Else + Sub(LVar7, LVarB) + Set(LVarB, LVar7) + EndIf + Sub(LVarB, 20) + DivF(LVarB, Float(10.588)) + AddF(LVarB, 15) + Set(LVarA, LVarB) + Return + End }; EvtScript N(EVS_Attack_Headbonk1) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_EXEC_WAIT(N(runToTarget)) - EVT_EXEC_WAIT(N(calcJumpTime)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 18, 0) - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 19, 0) - EVT_WAIT(1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52) - EVT_CALL(action_command_jump_start, LVarA, 3) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 9, 0) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GOOMBARIO_JUMP) - EVT_CALL(N(JumpOnTarget), LVarA, 0) - EVT_CALL(PartnerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_CALL(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) - EVT_CALL(N(OnMissHeadbonk)) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_TRIP) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END_IF - EVT_CHILD_THREAD - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_CHILD_THREAD - EVT_WAIT(1) - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_CALL(N(GetChargeAmount)) - EVT_ADD(LVar0, 1) - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_CASE_DEFAULT - EVT_CALL(N(StopChargeAndGet)) - EVT_ADD(LVar0, 1) - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_50) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_53) - EVT_END_THREAD - EVT_CALL(GetActionResult, LVarF) - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(ShowActionHud, FALSE) - EVT_CALL(action_command_jump_start, 24, 3) - EVT_SET(LVarA, 24) - EVT_THREAD - EVT_WAIT(4) - EVT_SET(LVar0, 0) - EVT_LOOP(6) - EVT_ADD(LVar0, -30) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GOOMBARIO_HEADBONK) - EVT_CALL(N(JumpOnTarget), LVarA, 3) - EVT_CHILD_THREAD - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_CHILD_THREAD - EVT_WAIT(1) - EVT_CALL(N(StopChargeAndGet)) - EVT_ADD(LVar0, 1) - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) - EVT_CALL(SetActionResult, LVarF) - EVT_EXEC_WAIT(N(returnHome2)) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + ExecWait(N(runToTarget)) + ExecWait(N(calcJumpTime)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) + Call(SetActorDispOffset, ACTOR_PARTNER, 0, 18, 0) + Wait(5) + Call(SetActorDispOffset, ACTOR_PARTNER, 0, 19, 0) + Wait(1) + Call(UseBattleCamPreset, BTL_CAM_PRESET_52) + Call(action_command_jump_start, LVarA, 3) + Call(UseBattleCamPreset, BTL_CAM_PRESET_52) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk) + Call(SetActorDispOffset, ACTOR_PARTNER, 0, 9, 0) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GOOMBARIO_JUMP) + Call(N(JumpOnTarget), LVarA, 0) + Call(PartnerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, HIT_RESULT_MISS) + Call(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) + Call(N(OnMissHeadbonk)) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + EndThread + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_TRIP) + Wait(20) + ExecWait(N(EVS_ReturnHome)) + Return + EndIf + ChildThread + Call(SetActorScale, ACTOR_PARTNER, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.3), Float(0.5), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) + EndChildThread + Wait(1) + Call(GetPartnerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(0) + Call(N(GetChargeAmount)) + Add(LVar0, 1) + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_INCLUDE_POWER_UPS) + CaseDefault + Call(N(StopChargeAndGet)) + Add(LVar0, 1) + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) + EndSwitch + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_ReturnHome)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + Thread + Call(UseBattleCamPreset, BTL_CAM_PRESET_50) + Wait(5) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_53) + EndThread + Call(GetActionResult, LVarF) + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(ShowActionHud, FALSE) + Call(action_command_jump_start, 24, 3) + Set(LVarA, 24) + Thread + Wait(4) + Set(LVar0, 0) + Loop(6) + Add(LVar0, -30) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GOOMBARIO_HEADBONK) + Call(N(JumpOnTarget), LVarA, 3) + ChildThread + Call(SetActorScale, ACTOR_PARTNER, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.3), Float(0.5), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) + EndChildThread + Wait(1) + Call(N(StopChargeAndGet)) + Add(LVar0, 1) + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) + Call(SetActionResult, LVarF) + ExecWait(N(returnHome2)) + Return + End }; EvtScript N(EVS_Attack_Headbonk2) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_EXEC_WAIT(N(runToTarget)) - EVT_EXEC_WAIT(N(calcJumpTime)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 18, 0) - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 19, 0) - EVT_WAIT(1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52) - EVT_CALL(action_command_jump_start, LVarA, 3) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 9, 0) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GOOMBARIO_JUMP) - EVT_CALL(N(JumpOnTarget), LVarA, 0) - EVT_CALL(PartnerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_CALL(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) - EVT_CALL(N(OnMissHeadbonk)) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_TRIP) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END_IF - EVT_CHILD_THREAD - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_CHILD_THREAD - EVT_WAIT(1) - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_CALL(N(GetChargeAmount)) - EVT_ADD(LVar0, 2) - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_CASE_DEFAULT - EVT_CALL(N(StopChargeAndGet)) - EVT_ADD(LVar0, 2) - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_50) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_53) - EVT_END_THREAD - EVT_CALL(GetActionResult, LVarF) - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(ShowActionHud, FALSE) - EVT_CALL(action_command_jump_start, 24, 3) - EVT_SET(LVarA, 24) - EVT_THREAD - EVT_WAIT(4) - EVT_SET(LVar0, 0) - EVT_LOOP(6) - EVT_ADD(LVar0, -30) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) - EVT_CALL(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GOOMBARIO_HEADBONK) - EVT_CALL(N(JumpOnTarget), LVarA, 3) - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_RESET) - EVT_CHILD_THREAD - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_CHILD_THREAD - EVT_WAIT(1) - EVT_CALL(N(StopChargeAndGet)) - EVT_ADD(LVar0, 2) - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) - EVT_CALL(SetActionResult, LVarF) - EVT_EXEC_WAIT(N(returnHome2)) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + ExecWait(N(runToTarget)) + ExecWait(N(calcJumpTime)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) + Call(SetActorDispOffset, ACTOR_PARTNER, 0, 18, 0) + Wait(5) + Call(SetActorDispOffset, ACTOR_PARTNER, 0, 19, 0) + Wait(1) + Call(UseBattleCamPreset, BTL_CAM_PRESET_52) + Call(action_command_jump_start, LVarA, 3) + Call(UseBattleCamPreset, BTL_CAM_PRESET_52) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk) + Call(SetActorDispOffset, ACTOR_PARTNER, 0, 9, 0) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GOOMBARIO_JUMP) + Call(N(JumpOnTarget), LVarA, 0) + Call(PartnerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, HIT_RESULT_MISS) + Call(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) + Call(N(OnMissHeadbonk)) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + EndThread + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_TRIP) + Wait(20) + ExecWait(N(EVS_ReturnHome)) + Return + EndIf + ChildThread + Call(SetActorScale, ACTOR_PARTNER, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.3), Float(0.5), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) + EndChildThread + Wait(1) + Call(GetPartnerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(0) + Call(N(GetChargeAmount)) + Add(LVar0, 2) + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_INCLUDE_POWER_UPS) + CaseDefault + Call(N(StopChargeAndGet)) + Add(LVar0, 2) + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) + EndSwitch + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_ReturnHome)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + Thread + Call(UseBattleCamPreset, BTL_CAM_PRESET_50) + Wait(5) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_53) + EndThread + Call(GetActionResult, LVarF) + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(ShowActionHud, FALSE) + Call(action_command_jump_start, 24, 3) + Set(LVarA, 24) + Thread + Wait(4) + Set(LVar0, 0) + Loop(6) + Add(LVar0, -30) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) + Call(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GOOMBARIO_HEADBONK) + Call(N(JumpOnTarget), LVarA, 3) + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_RESET) + ChildThread + Call(SetActorScale, ACTOR_PARTNER, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.3), Float(0.5), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) + EndChildThread + Wait(1) + Call(N(StopChargeAndGet)) + Add(LVar0, 2) + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) + Call(SetActionResult, LVarF) + ExecWait(N(returnHome2)) + Return + End }; EvtScript N(EVS_Attack_Headbonk3) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_EXEC_WAIT(N(runToTarget)) - EVT_EXEC_WAIT(N(calcJumpTime)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 18, 0) - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 19, 0) - EVT_WAIT(1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52) - EVT_CALL(action_command_jump_start, LVarA, 3) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 9, 0) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GOOMBARIO_JUMP) - EVT_CALL(N(JumpOnTarget), LVarA, 0) - EVT_CALL(PartnerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_CALL(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) - EVT_CALL(N(OnMissHeadbonk)) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_TRIP) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END_IF - EVT_CHILD_THREAD - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_CHILD_THREAD - EVT_WAIT(1) - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_CALL(N(GetChargeAmount)) - EVT_ADD(LVar0, 3) - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_CASE_DEFAULT - EVT_CALL(N(StopChargeAndGet)) - EVT_ADD(LVar0, 3) - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_50) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_53) - EVT_END_THREAD - EVT_CALL(GetActionResult, LVarF) - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(ShowActionHud, FALSE) - EVT_CALL(action_command_jump_start, 24, 3) - EVT_SET(LVarA, 24) - EVT_THREAD - EVT_WAIT(4) - EVT_SET(LVar0, 0) - EVT_LOOP(6) - EVT_ADD(LVar0, -30) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, EVT_IGNORE_ARG, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(LVarA) - EVT_ADD(LVar0, 133) - EVT_CALL(SetActorRotation, ACTOR_SELF, EVT_IGNORE_ARG, LVar0, EVT_IGNORE_ARG) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) - EVT_CALL(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GOOMBARIO_HEADBONK) - EVT_CALL(N(JumpOnTarget), LVarA, 3) - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_RESET) - EVT_CHILD_THREAD - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_CHILD_THREAD - EVT_WAIT(1) - EVT_CALL(N(StopChargeAndGet)) - EVT_ADD(LVar0, 3) - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) - EVT_CALL(SetActionResult, LVarF) - EVT_EXEC_WAIT(N(returnHome2)) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + ExecWait(N(runToTarget)) + ExecWait(N(calcJumpTime)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) + Call(SetActorDispOffset, ACTOR_PARTNER, 0, 18, 0) + Wait(5) + Call(SetActorDispOffset, ACTOR_PARTNER, 0, 19, 0) + Wait(1) + Call(UseBattleCamPreset, BTL_CAM_PRESET_52) + Call(action_command_jump_start, LVarA, 3) + Call(UseBattleCamPreset, BTL_CAM_PRESET_52) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk) + Call(SetActorDispOffset, ACTOR_PARTNER, 0, 9, 0) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GOOMBARIO_JUMP) + Call(N(JumpOnTarget), LVarA, 0) + Call(PartnerTestEnemy, LVar0, DAMAGE_TYPE_JUMP, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, HIT_RESULT_MISS) + Call(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) + Call(N(OnMissHeadbonk)) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + EndThread + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_TRIP) + Wait(20) + ExecWait(N(EVS_ReturnHome)) + Return + EndIf + ChildThread + Call(SetActorScale, ACTOR_PARTNER, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.3), Float(0.5), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) + EndChildThread + Wait(1) + Call(GetPartnerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(0) + Call(N(GetChargeAmount)) + Add(LVar0, 3) + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_INCLUDE_POWER_UPS) + CaseDefault + Call(N(StopChargeAndGet)) + Add(LVar0, 3) + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) + EndSwitch + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_ReturnHome)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + Thread + Call(UseBattleCamPreset, BTL_CAM_PRESET_50) + Wait(5) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_53) + EndThread + Call(GetActionResult, LVarF) + Call(CloseActionCommandInfo) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(ShowActionHud, FALSE) + Call(action_command_jump_start, 24, 3) + Set(LVarA, 24) + Thread + Wait(4) + Set(LVar0, 0) + Loop(6) + Add(LVar0, -30) + Call(SetActorRotation, ACTOR_SELF, 0, EVT_IGNORE_ARG, LVar0) + Wait(1) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk) + EndThread + Thread + Set(LVar0, 0) + Loop(LVarA) + Add(LVar0, 133) + Call(SetActorRotation, ACTOR_SELF, EVT_IGNORE_ARG, LVar0, EVT_IGNORE_ARG) + Wait(1) + EndLoop + EndThread + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) + Call(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GOOMBARIO_HEADBONK) + Call(N(JumpOnTarget), LVarA, 3) + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_RESET) + ChildThread + Call(SetActorScale, ACTOR_PARTNER, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.3), Float(0.5), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) + EndChildThread + Wait(1) + Call(N(StopChargeAndGet)) + Add(LVar0, 3) + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) + Call(SetActionResult, LVarF) + ExecWait(N(returnHome2)) + Return + End }; s32 N(actionCommandTable)[] = { 7, 6, 5, 4, 3, 2, 1, 0 }; @@ -1258,282 +1258,282 @@ s32 N(actionCommandTable)[] = { 7, 6, 5, 4, 3, 2, 1, 0 }; s32 N(MultibonkChance) = 200; EvtScript N(EVS_Move_Multibonk) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_EXEC_WAIT(N(runToTarget)) - EVT_EXEC_WAIT(N(calcJumpTime)) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 18, 0) - EVT_WAIT(5) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 19, 0) - EVT_WAIT(1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52) - EVT_CALL(action_command_jump_start, LVarA, 1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 9, 0) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GOOMBARIO_JUMP) - EVT_CALL(N(JumpOnTarget), LVarA, 0) - EVT_CALL(PartnerTestEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_CALL(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) - EVT_CALL(N(OnMissHeadbonk)) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 5, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_TRIP) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END_IF - EVT_CHILD_THREAD - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_CHILD_THREAD - EVT_WAIT(1) - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_CALL(N(GetChargeAmount)) - EVT_ADD(LVar0, 3) - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_CASE_DEFAULT - EVT_CALL(N(StopChargeAndGet)) - EVT_ADD(LVar0, 3) - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_50) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_53) - EVT_END_THREAD - EVT_CALL(GetActionResult, LVarF) - EVT_SET(LVarD, 0) - EVT_SET(LVarF, 0) - EVT_SET(LFlag0, FALSE) - EVT_LABEL(10) - EVT_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_50) - EVT_WAIT(5) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_53) - EVT_END_THREAD - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(SetActionDifficultyTable, EVT_PTR(N(actionCommandTable))) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_SET(LVarA, 24) - EVT_SWITCH(LVarF) - EVT_CASE_EQ(0) - EVT_CALL(action_command_jump_start, LVarA, 1) - EVT_CASE_EQ(1) - EVT_CALL(action_command_jump_start, LVarA, 2) - EVT_CASE_EQ(2) - EVT_CALL(action_command_jump_start, LVarA, 3) - EVT_CASE_EQ(3) - EVT_CALL(action_command_jump_start, LVarA, 4) - EVT_CASE_DEFAULT - EVT_CALL(action_command_jump_start, LVarA, 5) - EVT_END_SWITCH - EVT_THREAD - EVT_WAIT(4) - EVT_SET(LVar0, 0) - EVT_LOOP(6) - EVT_ADD(LVar0, -30) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, EVT_IGNORE_ARG, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(LVarA) - EVT_ADD(LVar0, 133) - EVT_CALL(SetActorRotation, ACTOR_SELF, EVT_IGNORE_ARG, LVar0, EVT_IGNORE_ARG) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) - EVT_CALL(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GOOMBARIO_HEADBONK) - EVT_CALL(N(JumpOnTarget), LVarA, 3) - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_RESET) - EVT_SUB(LVarD, 1) - EVT_CALL(N(AdjustMultibonkChance)) - EVT_IF_GE(LVarF, LVar0) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_CHILD_THREAD - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.1), EVT_FLOAT(0.8), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_CHILD_THREAD - EVT_WAIT(1) - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(N(GetChargeAmount)) - EVT_ADD(LVar0, 3) - EVT_CALL(PartnerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVar0, LVarD, BS_FLAGS1_NICE_HIT) - EVT_ELSE - EVT_CALL(N(StopChargeAndGet)) - EVT_ADD(LVar0, 3) - EVT_CALL(PartnerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVar0, LVarD, BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(N(StopChargeAndGet)) - EVT_ADD(LVar0, 3) - EVT_CALL(PartnerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVar0, LVarD, BS_FLAGS1_TRIGGER_EVENTS) - EVT_SET(LFlag0, FALSE) - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) - EVT_CALL(SetActionResult, LVarE) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC_WAIT(N(returnHome2)) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_ADD(LVarF, 1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + ExecWait(N(runToTarget)) + ExecWait(N(calcJumpTime)) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_PreHeadbonk) + Call(SetActorDispOffset, ACTOR_PARTNER, 0, 18, 0) + Wait(5) + Call(SetActorDispOffset, ACTOR_PARTNER, 0, 19, 0) + Wait(1) + Call(UseBattleCamPreset, BTL_CAM_PRESET_52) + Call(action_command_jump_start, LVarA, 1) + Call(UseBattleCamPreset, BTL_CAM_PRESET_52) + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk) + Call(SetActorDispOffset, ACTOR_PARTNER, 0, 9, 0) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GOOMBARIO_JUMP) + Call(N(JumpOnTarget), LVarA, 0) + Call(PartnerTestEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, HIT_RESULT_MISS) + Call(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) + Call(N(OnMissHeadbonk)) + Thread + Call(ShakeCam, CAM_BATTLE, 0, 5, Float(1.0)) + EndThread + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_TRIP) + Wait(20) + ExecWait(N(EVS_ReturnHome)) + Return + EndIf + ChildThread + Call(SetActorScale, ACTOR_PARTNER, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.3), Float(0.5), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) + EndChildThread + Wait(1) + Call(GetPartnerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(0) + Call(N(GetChargeAmount)) + Add(LVar0, 3) + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVar0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_INCLUDE_POWER_UPS) + CaseDefault + Call(N(StopChargeAndGet)) + Add(LVar0, 3) + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVar0, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) + EndSwitch + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_ReturnHome)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + EndCaseGroup + EndSwitch + Thread + Call(UseBattleCamPreset, BTL_CAM_PRESET_50) + Wait(5) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_53) + EndThread + Call(GetActionResult, LVarF) + Set(LVarD, 0) + Set(LVarF, 0) + Set(LFlag0, FALSE) + Label(10) + Thread + Call(UseBattleCamPreset, BTL_CAM_PRESET_50) + Wait(5) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_53) + EndThread + Call(CloseActionCommandInfo) + Call(SetActionDifficultyTable, Ref(N(actionCommandTable))) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Set(LVarA, 24) + Switch(LVarF) + CaseEq(0) + Call(action_command_jump_start, LVarA, 1) + CaseEq(1) + Call(action_command_jump_start, LVarA, 2) + CaseEq(2) + Call(action_command_jump_start, LVarA, 3) + CaseEq(3) + Call(action_command_jump_start, LVarA, 4) + CaseDefault + Call(action_command_jump_start, LVarA, 5) + EndSwitch + Thread + Wait(4) + Set(LVar0, 0) + Loop(6) + Add(LVar0, -30) + Call(SetActorRotation, ACTOR_SELF, 0, EVT_IGNORE_ARG, LVar0) + Wait(1) + EndLoop + Call(SetAnimation, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Headbonk) + EndThread + Thread + Set(LVar0, 0) + Loop(LVarA) + Add(LVar0, 133) + Call(SetActorRotation, ACTOR_SELF, EVT_IGNORE_ARG, LVar0, EVT_IGNORE_ARG) + Wait(1) + EndLoop + EndThread + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) + Call(SetJumpAnimations, ACTOR_PARTNER, 0, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk, ANIM_BattleGoombario_Headbonk) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GOOMBARIO_HEADBONK) + Call(N(JumpOnTarget), LVarA, 3) + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_RESET) + Sub(LVarD, 1) + Call(N(AdjustMultibonkChance)) + IfGe(LVarF, LVar0) + Set(LFlag0, TRUE) + EndIf + ChildThread + Call(SetActorScale, ACTOR_PARTNER, Float(1.1), Float(0.8), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.3), Float(0.5), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) + EndChildThread + Wait(1) + Call(GetPartnerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(0) + IfEq(LFlag0, FALSE) + Call(N(GetChargeAmount)) + Add(LVar0, 3) + Call(PartnerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVar0, LVarD, BS_FLAGS1_NICE_HIT) + Else + Call(N(StopChargeAndGet)) + Add(LVar0, 3) + Call(PartnerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVar0, LVarD, BS_FLAGS1_TRIGGER_EVENTS) + EndIf + CaseDefault + Call(N(StopChargeAndGet)) + Add(LVar0, 3) + Call(PartnerPowerBounceEnemy, LVar0, DAMAGE_TYPE_JUMP | DAMAGE_TYPE_POWER_BOUNCE, 0, 0, LVar0, LVarD, BS_FLAGS1_TRIGGER_EVENTS) + Set(LFlag0, FALSE) + EndSwitch + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) + Call(SetActionResult, LVarE) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_ReturnHome)) + Return + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + IfEq(LFlag0, TRUE) + ExecWait(N(returnHome2)) + Return + EndIf + EndCaseGroup + EndSwitch + Add(LVarF, 1) + Goto(10) + Return + End }; EvtScript N(EVS_Move_Tattle) = { - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Run) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_TATTLE_OPEN, TRUE) - EVT_CALL(N(OpenTattleWindow)) - EVT_WAIT(12) - EVT_CALL(SetCamEnabled, CAM_TATTLE, TRUE) - EVT_CALL(SetCamNoDraw, CAM_TATTLE, FALSE) - EVT_CALL(SetCamPerspective, CAM_TATTLE, CAM_UPDATE_MODE_6, 25, 16, 1024) - EVT_CALL(SetCamViewport, CAM_TATTLE, 137, 95, 138, 99) - EVT_CALL(GetOwnerTarget, LVarA, LVarB) - EVT_CALL(GetActorPos, LVarA, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(N(GetTattleCamPos)) - EVT_WAIT(1) - EVT_CALL(func_802CAE50, CAM_TATTLE, LVar0, LVar1, LVar2) - EVT_CALL(func_802CABE8, CAM_TATTLE, 0, LVar3, 100, 4) - EVT_WAIT(2) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_TATTLE_WINDOW_OPEN) - EVT_CALL(SetCamNoDraw, CAM_TATTLE, TRUE) - EVT_WAIT(10) - EVT_CALL(N(GetTattleMessage)) - EVT_CALL(ActorSpeak, LVar0, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Talk, ANIM_BattleGoombario_Idle) - EVT_CALL(N(CloseTattleWindow)) - EVT_WAIT(12) - EVT_CALL(SetCamEnabled, CAM_TATTLE, FALSE) - EVT_WAIT(32) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_TATTLE_OPEN, FALSE) - EVT_CALL(PartnerYieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.8)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Run) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) - EVT_RETURN - EVT_END + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(SetActorSpeed, ACTOR_PARTNER, Float(6.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Run) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_PARTNER, 0, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(SetBattleFlagBits, BS_FLAGS1_TATTLE_OPEN, TRUE) + Call(N(OpenTattleWindow)) + Wait(12) + Call(SetCamEnabled, CAM_TATTLE, TRUE) + Call(SetCamNoDraw, CAM_TATTLE, FALSE) + Call(SetCamPerspective, CAM_TATTLE, CAM_UPDATE_MODE_6, 25, 16, 1024) + Call(SetCamViewport, CAM_TATTLE, 137, 95, 138, 99) + Call(GetOwnerTarget, LVarA, LVarB) + Call(GetActorPos, LVarA, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(N(GetTattleCamPos)) + Wait(1) + Call(func_802CAE50, CAM_TATTLE, LVar0, LVar1, LVar2) + Call(func_802CABE8, CAM_TATTLE, 0, LVar3, 100, 4) + Wait(2) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_TATTLE_WINDOW_OPEN) + Call(SetCamNoDraw, CAM_TATTLE, TRUE) + Wait(10) + Call(N(GetTattleMessage)) + Call(ActorSpeak, LVar0, ACTOR_SELF, PRT_MAIN, ANIM_BattleGoombario_Talk, ANIM_BattleGoombario_Idle) + Call(N(CloseTattleWindow)) + Wait(12) + Call(SetCamEnabled, CAM_TATTLE, FALSE) + Wait(32) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetBattleFlagBits, BS_FLAGS1_TATTLE_OPEN, FALSE) + Call(PartnerYieldTurn) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(4.0)) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.8)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Run) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) + Return + End }; EvtScript N(EVS_Move_Charge) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_55) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_PreHeadbonk) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 19, 0) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_CHARGE_UP) - EVT_CALL(N(PlayChargeFX), LVar0, LVar1, LVar2, EVT_FLOAT(1.2)) - EVT_WAIT(3) - EVT_CALL(N(PlayChargeFX), LVar0, LVar1, LVar2, EVT_FLOAT(0.8)) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_ADD(LVar2, -5) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GOOMBARIO_GATHERING) - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 9, LVar0, LVar1, LVar2, EVT_FLOAT(2.0), 20, 0) - EVT_END_THREAD - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(N(CanChargeMore)) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_ADD(LVar1, 25) - EVT_ADD(LVar2, 5) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GROW) - EVT_CALL(N(ChargeAtPos), LVar0, LVar1, LVar2) - EVT_WAIT(4) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.4)) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetJumpAnimations, ACTOR_PARTNER, ANIM_BattleGoombario_Jump, 0x00000001, ANIM_BattleGoombario_Jump, ANIM_BattleGoombario_Jump) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 20, TRUE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_TATTLE) - EVT_CALL(ShowMessageBox, BTL_MSG_CHARGE_GOOMBARIO, 60) - EVT_CASE_EQ(MOVE_CHARGE) - EVT_CALL(N(GetChargeMessage)) - EVT_CALL(ShowMessageBox, LVar0, 60) - EVT_CASE_EQ(MOVE_MULTIBONK) - EVT_CALL(ShowMessageBox, BTL_MSG_CHARGE_GOOMBARIO, 60) - EVT_END_SWITCH - EVT_ELSE - EVT_CALL(ShowMessageBox, BTL_MSG_CANT_CHARGE, 60) - EVT_END_IF - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(IsMessageBoxDisplayed, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_PRESET_55) + Wait(10) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_PreHeadbonk) + Call(SetActorDispOffset, ACTOR_PARTNER, 0, 19, 0) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 15) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_CHARGE_UP) + Call(N(PlayChargeFX), LVar0, LVar1, LVar2, Float(1.2)) + Wait(3) + Call(N(PlayChargeFX), LVar0, LVar1, LVar2, Float(0.8)) + Thread + Wait(15) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 15) + Add(LVar2, -5) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GOOMBARIO_GATHERING) + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 9, LVar0, LVar1, LVar2, Float(2.0), 20, 0) + EndThread + Wait(30) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) + Call(SetActorDispOffset, ACTOR_PARTNER, 0, 0, 0) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(N(CanChargeMore)) + IfEq(LVar0, 0) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar0, 10) + Add(LVar1, 25) + Add(LVar2, 5) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GROW) + Call(N(ChargeAtPos), LVar0, LVar1, LVar2) + Wait(4) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.4)) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(SetJumpAnimations, ACTOR_PARTNER, ANIM_BattleGoombario_Jump, 0x00000001, ANIM_BattleGoombario_Jump, ANIM_BattleGoombario_Jump) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 20, TRUE, TRUE, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleGoombario_Idle) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar2) + CaseEq(MOVE_TATTLE) + Call(ShowMessageBox, BTL_MSG_CHARGE_GOOMBARIO, 60) + CaseEq(MOVE_CHARGE) + Call(N(GetChargeMessage)) + Call(ShowMessageBox, LVar0, 60) + CaseEq(MOVE_MULTIBONK) + Call(ShowMessageBox, BTL_MSG_CHARGE_GOOMBARIO, 60) + EndSwitch + Else + Call(ShowMessageBox, BTL_MSG_CANT_CHARGE, 60) + EndIf + Label(0) + Wait(1) + Call(IsMessageBoxDisplayed, LVar0) + IfEq(LVar0, 1) + Goto(0) + EndIf + Return + End }; diff --git a/src/battle/partner/goompa.c b/src/battle/partner/goompa.c index cceb8131dde..37667caa082 100644 --- a/src/battle/partner/goompa.c +++ b/src/battle/partner/goompa.c @@ -86,112 +86,112 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 0) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 0) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(GetLastEvent, ACTOR_PARTNER, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goompa_Injured) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CALL(PlaySound, SOUND_NO_DAMGE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goompa_Injured) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIKE_CONTACT) - EVT_SET_CONST(LVar1, ANIM_Goompa_Injured) - EVT_SET_CONST(LVar2, ANIM_Goompa_Run) - EVT_SET_CONST(LVar3, ANIM_Goompa_Idle) - EVT_EXEC_WAIT(EVS_Partner_SpikeContact) - EVT_CASE_EQ(EVENT_BURN_CONTACT) - EVT_SET_CONST(LVar0, ANIM_Goompa_Injured) - EVT_SET_CONST(LVar1, ANIM_Goompa_Injured) - EVT_SET_CONST(LVar2, ANIM_Goompa_Injured) - EVT_SET_CONST(LVar3, ANIM_Goompa_Run) - EVT_SET_CONST(LVar4, ANIM_Goompa_Idle) - EVT_EXEC_WAIT(EVS_Partner_BurnContact) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar0, 0) - EVT_SET_CONST(LVar1, ANIM_Goompa_Injured) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CASE_EQ(EVENT_33) - EVT_CASE_EQ(EVENT_RECOVER_FROM_KO) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goompa_Idle) - EVT_SET_CONST(LVar2, ANIM_Goompa_Run) - EVT_EXEC_WAIT(EVS_Partner_Recover) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(CloseActionCommandInfo) + Call(GetLastEvent, ACTOR_PARTNER, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goompa_Injured) + ExecWait(EVS_Enemy_Hit) + EndCaseGroup + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + Call(PlaySound, SOUND_NO_DAMGE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goompa_Injured) + ExecWait(EVS_Enemy_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_SPIKE_CONTACT) + SetConst(LVar1, ANIM_Goompa_Injured) + SetConst(LVar2, ANIM_Goompa_Run) + SetConst(LVar3, ANIM_Goompa_Idle) + ExecWait(EVS_Partner_SpikeContact) + CaseEq(EVENT_BURN_CONTACT) + SetConst(LVar0, ANIM_Goompa_Injured) + SetConst(LVar1, ANIM_Goompa_Injured) + SetConst(LVar2, ANIM_Goompa_Injured) + SetConst(LVar3, ANIM_Goompa_Run) + SetConst(LVar4, ANIM_Goompa_Idle) + ExecWait(EVS_Partner_BurnContact) + CaseEq(EVENT_BURN_HIT) + SetConst(LVar0, 0) + SetConst(LVar1, ANIM_Goompa_Injured) + ExecWait(EVS_Enemy_Hit) + CaseEq(EVENT_33) + CaseEq(EVENT_RECOVER_FROM_KO) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goompa_Idle) + SetConst(LVar2, ANIM_Goompa_Run) + ExecWait(EVS_Partner_Recover) + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_EXECUTE_ACTION) - EVT_EXEC_WAIT(N(EVS_ExecuteAction)) - EVT_CASE_EQ(PHASE_CELEBRATE) - EVT_EXEC_WAIT(N(EVS_Celebrate)) - EVT_CASE_EQ(PHASE_RUN_AWAY_START) - EVT_EXEC_WAIT(N(runAway)) - EVT_CASE_EQ(PHASE_RUN_AWAY_FAIL) - EVT_EXEC_WAIT(N(runAwayFail)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_EXECUTE_ACTION) + ExecWait(N(EVS_ExecuteAction)) + CaseEq(PHASE_CELEBRATE) + ExecWait(N(EVS_Celebrate)) + CaseEq(PHASE_RUN_AWAY_START) + ExecWait(N(runAway)) + CaseEq(PHASE_RUN_AWAY_FAIL) + ExecWait(N(runAwayFail)) + EndSwitch + Return + End }; EvtScript N(EVS_Celebrate) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goompa_Celebrate) - EVT_SET_CONST(LVar2, ANIM_Goompa_Walk) - EVT_EXEC_WAIT(EVS_Partner_Celebrate) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goompa_Celebrate) + SetConst(LVar2, ANIM_Goompa_Walk) + ExecWait(EVS_Partner_Celebrate) + Return + End }; EvtScript N(runAway) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Goompa_Run) - EVT_EXEC_WAIT(EVS_Partner_RunAway) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Goompa_Run) + ExecWait(EVS_Partner_RunAway) + Return + End }; EvtScript N(runAwayFail) = { - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_Goompa_Run) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, 0) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_Goompa_Idle) - EVT_RETURN - EVT_END + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(6.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_Goompa_Run) + Call(SetActorYaw, ACTOR_PARTNER, 0) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_Goompa_Idle) + Return + End }; EvtScript N(EVS_ExecuteAction) = { - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/battle/partner/kooper.c b/src/battle/partner/kooper.c index 73f84365c83..aba4d6b805c 100644 --- a/src/battle/partner/kooper.c +++ b/src/battle/partner/kooper.c @@ -271,1116 +271,1116 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_PARTNER, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_PARTNER, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_PARTNER, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_PARTNER, EVT_PTR(N(EVS_HandlePhase))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_PARTNER, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_PARTNER, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_PARTNER, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_PARTNER, Ref(N(EVS_HandlePhase))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(GetLastEvent, ACTOR_PARTNER, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Hurt) - EVT_SET_CONST(LVar2, ANIM_BattleKooper_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Hit) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Hurt) - EVT_EXEC_WAIT(EVS_Partner_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIKE_CONTACT) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Hurt) - EVT_SET(LVar2, 16) - EVT_EXEC_WAIT(EVS_Partner_SpikeContact) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_BURN_CONTACT) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_BurnHurt) - EVT_SET(LVar2, 16) - EVT_SET_CONST(LVar3, ANIM_BattleKooper_BurnStill) - EVT_EXEC_WAIT(EVS_Partner_BurnContact) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleKooper_BurnStill) - EVT_EXEC_WAIT(EVS_Partner_BurnHit) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Hurt) - EVT_SET(LVar2, 16) - EVT_EXEC_WAIT(EVS_Partner_ShockHit) - EVT_CASE_EQ(EVENT_33) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_RECOVER_FROM_KO) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Idle) - EVT_SET_CONST(LVar2, ANIM_BattleKooper_Run) - EVT_SET(LVar3, 0) - EVT_EXEC_WAIT(EVS_Partner_Recover) - EVT_CASE_OR_EQ(EVENT_18) - EVT_CASE_OR_EQ(EVENT_BLOCK) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_LowerShell) - EVT_EXEC_WAIT(EVS_Partner_NoDamageHit) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ExitShell) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(CloseActionCommandInfo) + Call(GetLastEvent, ACTOR_PARTNER, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar1, ANIM_BattleKooper_Hurt) + SetConst(LVar2, ANIM_BattleKooper_Hurt) + ExecWait(EVS_Partner_Hit) + SetConst(LVar1, ANIM_BattleKooper_Hurt) + ExecWait(EVS_Partner_Drop) + EndCaseGroup + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Hurt) + ExecWait(EVS_Partner_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_SPIKE_CONTACT) + SetConst(LVar1, ANIM_BattleKooper_Hurt) + Set(LVar2, 16) + ExecWait(EVS_Partner_SpikeContact) + SetConst(LVar1, ANIM_BattleKooper_Hurt) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_BURN_CONTACT) + SetConst(LVar1, ANIM_BattleKooper_BurnHurt) + Set(LVar2, 16) + SetConst(LVar3, ANIM_BattleKooper_BurnStill) + ExecWait(EVS_Partner_BurnContact) + SetConst(LVar1, ANIM_BattleKooper_Hurt) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_BURN_HIT) + SetConst(LVar1, ANIM_BattleKooper_BurnHurt) + SetConst(LVar2, ANIM_BattleKooper_BurnStill) + ExecWait(EVS_Partner_BurnHit) + SetConst(LVar1, ANIM_BattleKooper_Hurt) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Hurt) + Set(LVar2, 16) + ExecWait(EVS_Partner_ShockHit) + CaseEq(EVENT_33) + SetConst(LVar1, ANIM_BattleKooper_Hurt) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_RECOVER_FROM_KO) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Idle) + SetConst(LVar2, ANIM_BattleKooper_Run) + Set(LVar3, 0) + ExecWait(EVS_Partner_Recover) + CaseOrEq(EVENT_18) + CaseOrEq(EVENT_BLOCK) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_LowerShell) + ExecWait(EVS_Partner_NoDamageHit) + Wait(10) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ExitShell) + EndCaseGroup + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_FIRST_STRIKE) - EVT_EXEC_WAIT(N(firstStrike)) - EVT_CASE_EQ(PHASE_EXECUTE_ACTION) - EVT_EXEC_WAIT(N(EVS_ExecuteAction)) - EVT_CASE_EQ(PHASE_CELEBRATE) - EVT_EXEC_WAIT(N(EVS_Celebrate)) - EVT_CASE_EQ(PHASE_RUN_AWAY_START) - EVT_EXEC_WAIT(N(runAway)) - EVT_CASE_EQ(PHASE_RUN_AWAY_FAIL) - EVT_EXEC_WAIT(N(runAwayFail)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_FIRST_STRIKE) + ExecWait(N(firstStrike)) + CaseEq(PHASE_EXECUTE_ACTION) + ExecWait(N(EVS_ExecuteAction)) + CaseEq(PHASE_CELEBRATE) + ExecWait(N(EVS_Celebrate)) + CaseEq(PHASE_RUN_AWAY_START) + ExecWait(N(runAway)) + CaseEq(PHASE_RUN_AWAY_FAIL) + ExecWait(N(runAwayFail)) + EndSwitch + Return + End }; EvtScript N(EVS_Celebrate) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Celebrate) - EVT_SET_CONST(LVar2, ANIM_BattleKooper_Walk) - EVT_SET_CONST(LVar3, ANIM_BattleKooper_Idle) - EVT_EXEC_WAIT(EVS_Partner_Celebrate) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Celebrate) + SetConst(LVar2, ANIM_BattleKooper_Walk) + SetConst(LVar3, ANIM_BattleKooper_Idle) + ExecWait(EVS_Partner_Celebrate) + Return + End }; EvtScript N(runAway) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleKooper_Run) - EVT_EXEC_WAIT(EVS_Partner_RunAway) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleKooper_Run) + ExecWait(EVS_Partner_RunAway) + Return + End }; EvtScript N(runAwayFail) = { - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, 0) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(6.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run) + Call(SetActorYaw, ACTOR_PARTNER, 0) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_ExecuteAction) = { - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(BTL_MENU_TYPE_STAR_POWERS) - EVT_CALL(LoadStarPowerScript) - EVT_EXEC_WAIT(LVar0) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_SHELL_TOSS1) - EVT_CALL(SetDamageSource, DMG_SRC_SHELL_TOSS) - EVT_SET(LVarF, 2) - EVT_SET(LVarE, 1) - EVT_EXEC_WAIT(N(shellToss)) - EVT_CASE_EQ(MOVE_SHELL_TOSS2) - EVT_CALL(SetDamageSource, DMG_SRC_SHELL_TOSS) - EVT_SET(LVarF, 3) - EVT_SET(LVarE, 2) - EVT_EXEC_WAIT(N(shellToss)) - EVT_CASE_EQ(MOVE_SHELL_TOSS3) - EVT_CALL(SetDamageSource, DMG_SRC_SHELL_TOSS) - EVT_SET(LVarF, 5) - EVT_SET(LVarE, 3) - EVT_EXEC_WAIT(N(shellToss)) - EVT_CASE_EQ(MOVE_POWER_SHELL) - EVT_CALL(SetDamageSource, DMG_SRC_POWER_SHELL) - EVT_EXEC_WAIT(N(powerShell)) - EVT_CASE_EQ(MOVE_DIZZY_SHELL) - EVT_CALL(SetDamageSource, DMG_SRC_DIZZY_SHELL) - EVT_EXEC_WAIT(N(dizzyShell)) - EVT_CASE_EQ(MOVE_FIRE_SHELL) - EVT_CALL(SetDamageSource, DMG_SRC_FIRE_SHELL) - EVT_EXEC_WAIT(N(fireShell)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(ShowActionHud, TRUE) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar0) + CaseEq(BTL_MENU_TYPE_STAR_POWERS) + Call(LoadStarPowerScript) + ExecWait(LVar0) + Return + EndSwitch + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar2) + CaseEq(MOVE_SHELL_TOSS1) + Call(SetDamageSource, DMG_SRC_SHELL_TOSS) + Set(LVarF, 2) + Set(LVarE, 1) + ExecWait(N(shellToss)) + CaseEq(MOVE_SHELL_TOSS2) + Call(SetDamageSource, DMG_SRC_SHELL_TOSS) + Set(LVarF, 3) + Set(LVarE, 2) + ExecWait(N(shellToss)) + CaseEq(MOVE_SHELL_TOSS3) + Call(SetDamageSource, DMG_SRC_SHELL_TOSS) + Set(LVarF, 5) + Set(LVarE, 3) + ExecWait(N(shellToss)) + CaseEq(MOVE_POWER_SHELL) + Call(SetDamageSource, DMG_SRC_POWER_SHELL) + ExecWait(N(powerShell)) + CaseEq(MOVE_DIZZY_SHELL) + Call(SetDamageSource, DMG_SRC_DIZZY_SHELL) + ExecWait(N(dizzyShell)) + CaseEq(MOVE_FIRE_SHELL) + Call(SetDamageSource, DMG_SRC_FIRE_SHELL) + ExecWait(N(fireShell)) + EndSwitch + Return + End }; EvtScript N(firstStrike) = { - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_SHELL_TOSS1) - EVT_CALL(SetDamageSource, DMG_SRC_SHELL_TOSS) - EVT_EXEC_WAIT(N(shellTossOnFirstStrike)) - EVT_CASE_EQ(MOVE_SHELL_TOSS2) - EVT_CALL(SetDamageSource, DMG_SRC_SHELL_TOSS) - EVT_EXEC_WAIT(N(shellTossOnFirstStrike)) - EVT_CASE_EQ(MOVE_SHELL_TOSS3) - EVT_CALL(SetDamageSource, DMG_SRC_SHELL_TOSS) - EVT_EXEC_WAIT(N(shellTossOnFirstStrike)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar2) + CaseEq(MOVE_SHELL_TOSS1) + Call(SetDamageSource, DMG_SRC_SHELL_TOSS) + ExecWait(N(shellTossOnFirstStrike)) + CaseEq(MOVE_SHELL_TOSS2) + Call(SetDamageSource, DMG_SRC_SHELL_TOSS) + ExecWait(N(shellTossOnFirstStrike)) + CaseEq(MOVE_SHELL_TOSS3) + Call(SetDamageSource, DMG_SRC_SHELL_TOSS) + ExecWait(N(shellTossOnFirstStrike)) + EndSwitch + Return + End }; EvtScript N(returnHomeOnMiss) = { - EVT_CALL(ResetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_WALK) - EVT_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_04) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_END_THREAD - EVT_CALL(PartnerYieldTurn) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 60) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.4)) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 20, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 8, FALSE, FALSE, TRUE) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 6, FALSE, FALSE, TRUE) - EVT_SUB(LVar0, 10) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 4, FALSE, FALSE, TRUE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ExitShell) - EVT_WAIT(4) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(7.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle) - EVT_RETURN - EVT_END + Call(ResetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_WALK) + Thread + Call(UseBattleCamPreset, BTL_CAM_PRESET_04) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + EndThread + Call(PartnerYieldTurn) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Sub(LVar0, 60) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.4)) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 20, FALSE, TRUE, FALSE) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 8, FALSE, FALSE, TRUE) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 6, FALSE, FALSE, TRUE) + Sub(LVar0, 10) + Call(JumpToGoal, ACTOR_PARTNER, 4, FALSE, FALSE, TRUE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ExitShell) + Wait(4) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(7.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(ResetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_WALK) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_51) - EVT_CALL(PartnerYieldTurn) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.1)) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 8, FALSE, FALSE, TRUE) - EVT_SUB(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 6, FALSE, FALSE, TRUE) - EVT_SUB(LVar0, 10) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 4, FALSE, FALSE, TRUE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ExitShell) - EVT_WAIT(4) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(7.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle) - EVT_RETURN - EVT_END + Call(ResetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_WALK) + Call(UseBattleCamPreset, BTL_CAM_PRESET_51) + Call(PartnerYieldTurn) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.1)) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 8, FALSE, FALSE, TRUE) + Sub(LVar0, 10) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 6, FALSE, FALSE, TRUE) + Sub(LVar0, 10) + Call(JumpToGoal, ACTOR_PARTNER, 4, FALSE, FALSE, TRUE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ExitShell) + Wait(4) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(7.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle) + Return + End }; EvtScript N(getShellTossMoveTime) = { - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVarB, LVarC, LVarD) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVarC, LVarD, LVar0) - EVT_IF_GT(LVarB, LVarC) - EVT_SUB(LVarB, LVarC) - EVT_ELSE - EVT_SUB(LVarC, LVarB) - EVT_SET(LVarB, LVarC) - EVT_END_IF - EVT_DIVF(LVarB, LVarA) - EVT_IF_LT(LVarB, 0) - EVT_SET(LVarB, 0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(GetGoalPos, ACTOR_PARTNER, LVarB, LVarC, LVarD) + Call(GetActorPos, ACTOR_PARTNER, LVarC, LVarD, LVar0) + IfGt(LVarB, LVarC) + Sub(LVarB, LVarC) + Else + Sub(LVarC, LVarB) + Set(LVarB, LVarC) + EndIf + DivF(LVarB, LVarA) + IfLt(LVarB, 0) + Set(LVarB, 0) + EndIf + Return + End }; EvtScript N(shellToss) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH) - EVT_CALL(action_command_hammer_init) - EVT_CALL(InitTargetIterator) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_EnterShell) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) - EVT_LOOP(30) - EVT_WAIT(1) - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(action_command_hammer_start, 0, 50 * DT - 3, 3) - EVT_CALL(SetActionQuality, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_KOOPER_SHELL_SPINUP) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_59) - EVT_SET(LVar9, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(50 * DT) - EVT_WAIT(1) - EVT_SWITCH(LVar9) - EVT_CASE_LT(20 * DT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) - EVT_CASE_EQ(20 * DT) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) - EVT_CASE_LT(30 * DT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlower) - EVT_CASE_EQ(30 * DT) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) - EVT_CASE_LT(40 * DT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFaster) - EVT_CASE_EQ(40 * DT) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) - EVT_CASE_LT(50 * DT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFastest) - EVT_CASE_EQ(50 * DT) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) - EVT_END_SWITCH - EVT_ADD(LVar9, 1) - EVT_CALL(GetActionQuality, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_IF_NE(LVar1, TRUE) - EVT_SET(LVar1, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LABEL(0) - EVT_WAIT(1) - EVT_SETF(LVarA, EVT_FLOAT(8.0)) - EVT_SWITCH(LVar9) - EVT_CASE_LT(20 * DT) - EVT_SETF(LVarA, EVT_FLOAT(10.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) - EVT_CASE_LT(30 * DT) - EVT_SETF(LVarA, EVT_FLOAT(12.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlower) - EVT_CASE_LT(40 * DT) - EVT_SETF(LVarA, EVT_FLOAT(14.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFaster) - EVT_CASE_LT(50 * DT) - EVT_SETF(LVarA, EVT_FLOAT(16.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFastest) - EVT_END_SWITCH - EVT_ADD(LVar9, 1) - EVT_CALL(GetActionSuccess, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_PARAKARRY_AIR_RAID_1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(MoveBattleCamOver, 15) - EVT_EXEC_WAIT(N(getShellTossMoveTime)) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_ZERO, 0, ACTOR_DECORATION_GREY_SMOKE_TRAIL) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, LVarA) - EVT_CALL(SetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENTS_KOOPER_TEST, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_THREAD - EVT_CALL(N(SlowDown)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 0) - EVT_END_THREAD - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellStill) - EVT_CALL(SetActorRotationOffset, ACTOR_PARTNER, 8, 0, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(2) - EVT_ADD(LVar0, -30) - EVT_CALL(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(5) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 16, 4, 0, 10, 0) - EVT_LOOP(5) - EVT_ADD(LVar0, 12) - EVT_CALL(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_PARTNER, 0, 0, 2) - EVT_WAIT(2) - EVT_CALL(SetActorRotation, ACTOR_PARTNER, 0, 0, -2) - EVT_WAIT(2) - EVT_CALL(SetActorRotation, ACTOR_PARTNER, 0, 0, 0) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ExitShell) - EVT_WAIT(10) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(7.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 0) - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_CALL(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENTS_KOOPER_DAMAGE, 0, LVarF, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_CASE_DEFAULT - EVT_CALL(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENTS_KOOPER_DAMAGE, 0, LVarE, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_EXEC_WAIT(N(returnHomeOnMiss)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_SMASH) + Call(action_command_hammer_init) + Call(InitTargetIterator) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(SetActorSpeed, ACTOR_PARTNER, Float(4.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_PARTNER, 0, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_EnterShell) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) + Wait(15) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) + Loop(30) + Wait(1) + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfNe(LVar0, FALSE) + BreakLoop + EndIf + EndLoop + Call(action_command_hammer_start, 0, 50 * DT - 3, 3) + Call(SetActionQuality, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_KOOPER_SHELL_SPINUP) + Call(UseBattleCamPreset, BTL_CAM_PRESET_59) + Set(LVar9, 0) + Set(LVar1, 0) + Loop(50 * DT) + Wait(1) + Switch(LVar9) + CaseLt(20 * DT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) + CaseEq(20 * DT) + Call(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) + CaseLt(30 * DT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlower) + CaseEq(30 * DT) + Call(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) + CaseLt(40 * DT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFaster) + CaseEq(40 * DT) + Call(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) + CaseLt(50 * DT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFastest) + CaseEq(50 * DT) + Call(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) + EndSwitch + Add(LVar9, 1) + Call(GetActionQuality, LVar0) + IfNe(LVar0, 0) + IfNe(LVar1, TRUE) + Set(LVar1, 1) + EndIf + EndIf + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfEq(LVar0, FALSE) + BreakLoop + EndIf + EndLoop + Label(0) + Wait(1) + SetF(LVarA, Float(8.0)) + Switch(LVar9) + CaseLt(20 * DT) + SetF(LVarA, Float(10.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) + CaseLt(30 * DT) + SetF(LVarA, Float(12.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlower) + CaseLt(40 * DT) + SetF(LVarA, Float(14.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFaster) + CaseLt(50 * DT) + SetF(LVarA, Float(16.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFastest) + EndSwitch + Add(LVar9, 1) + Call(GetActionSuccess, LVar0) + IfEq(LVar0, 0) + Goto(0) + EndIf + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_PARAKARRY_AIR_RAID_1) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(MoveBattleCamOver, 15) + ExecWait(N(getShellTossMoveTime)) + Call(AddActorDecoration, ACTOR_SELF, PRT_ZERO, 0, ACTOR_DECORATION_GREY_SMOKE_TRAIL) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, LVarA) + Call(SetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENTS_KOOPER_TEST, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, HIT_RESULT_MISS) + Thread + Call(N(SlowDown)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 0) + EndThread + Wait(4) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellStill) + Call(SetActorRotationOffset, ACTOR_PARTNER, 8, 0, 0) + Set(LVar0, 0) + Loop(2) + Add(LVar0, -30) + Call(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0) + Wait(1) + EndLoop + Wait(5) + Call(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 16, 4, 0, 10, 0) + Loop(5) + Add(LVar0, 12) + Call(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0) + Call(SetActorRotation, ACTOR_PARTNER, 0, 0, 2) + Wait(2) + Call(SetActorRotation, ACTOR_PARTNER, 0, 0, -2) + Wait(2) + Call(SetActorRotation, ACTOR_PARTNER, 0, 0, 0) + Wait(10) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ExitShell) + Wait(10) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(7.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run) + Call(RunToGoal, ACTOR_PARTNER, 0) + Return + EndIf + Call(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 0) + Call(GetPartnerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(0) + Call(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENTS_KOOPER_DAMAGE, 0, LVarF, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) + CaseDefault + Call(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENTS_KOOPER_DAMAGE, 0, LVarE, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) + EndSwitch + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + ExecWait(N(returnHomeOnMiss)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(powerShell) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH) - EVT_CALL(action_command_hammer_init) - EVT_CALL(GetActorLevel, ACTOR_PARTNER, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SET(LVarE, 1) - EVT_SET(LVarF, 2) - EVT_CASE_EQ(1) - EVT_SET(LVarE, 1) - EVT_SET(LVarF, 3) - EVT_CASE_EQ(2) - EVT_SET(LVarE, 1) - EVT_SET(LVarF, 4) - EVT_END_SWITCH - EVT_CALL(InitTargetIterator) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_EnterShell) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) - EVT_LOOP(30) - EVT_WAIT(1) - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_NE(LVar0, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_59) - EVT_CALL(action_command_hammer_start, 0, 47, 3) - EVT_CALL(SetActionQuality, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_KOOPER_SHELL_SPINUP) - EVT_SET(LVar9, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(50) - EVT_WAIT(1) - EVT_SWITCH(LVar9) - EVT_CASE_LT(20) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) - EVT_CASE_EQ(20) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) - EVT_CASE_LT(30) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlower) - EVT_CASE_EQ(30) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) - EVT_CASE_LT(40) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFaster) - EVT_CASE_EQ(40) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) - EVT_CASE_LT(50) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFastest) - EVT_CASE_EQ(50) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) - EVT_END_SWITCH - EVT_ADD(LVar9, 1) - EVT_CALL(GetActionQuality, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_IF_NE(LVar1, TRUE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) - EVT_SET(LVar1, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LABEL(0) - EVT_WAIT(1) - EVT_SET(LVarA, EVT_FLOAT(8.0)) - EVT_SWITCH(LVar9) - EVT_CASE_LT(20) - EVT_SET(LVarA, EVT_FLOAT(10.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) - EVT_CASE_LT(30) - EVT_SET(LVarA, EVT_FLOAT(12.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlower) - EVT_CASE_LT(40) - EVT_SET(LVarA, EVT_FLOAT(14.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFaster) - EVT_CASE_LT(50) - EVT_SET(LVarA, EVT_FLOAT(16.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFastest) - EVT_END_SWITCH - EVT_ADD(LVar9, 1) - EVT_CALL(GetActionSuccess, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_PARAKARRY_AIR_RAID_2) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(MoveBattleCamOver, 15) - EVT_SET(LVarB, 260) - EVT_DIVF(LVarB, LVarA) - EVT_THREAD - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_ZERO, 1, ACTOR_DECORATION_GREY_SMOKE_TRAIL) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 260) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, LVarA) - EVT_CALL(SetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 1) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 1) - EVT_END_THREAD - EVT_SET(LFlag0, FALSE) - EVT_LABEL(10) - EVT_WAIT(1) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar3, LVar4, LVar5) - EVT_IF_GT(LVar0, LVar3) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENTS_KOOPER_TEST, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, 6) - EVT_GOTO(12) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_04) - EVT_CASE_DEFAULT - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_51) - EVT_END_SWITCH - EVT_END_IF - EVT_SET(LFlag0, TRUE) - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_KOOPER_DAMAGE, 0, LVarF, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_CASE_DEFAULT - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_KOOPER_DAMAGE, 0, LVarE, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) - EVT_LABEL(12) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar2) - EVT_IF_NE(LVar2, ITER_NO_MORE) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_04) - EVT_CASE_DEFAULT - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_51) - EVT_END_SWITCH - EVT_END_IF - EVT_LABEL(11) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(11) - EVT_END_IF - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(N(returnHomeOnMiss)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_SMASH) + Call(action_command_hammer_init) + Call(GetActorLevel, ACTOR_PARTNER, LVar0) + Switch(LVar0) + CaseEq(0) + Set(LVarE, 1) + Set(LVarF, 2) + CaseEq(1) + Set(LVarE, 1) + Set(LVarF, 3) + CaseEq(2) + Set(LVarE, 1) + Set(LVarF, 4) + EndSwitch + Call(InitTargetIterator) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(SetActorSpeed, ACTOR_PARTNER, Float(4.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_PARTNER, 0, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_EnterShell) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) + Wait(15) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) + Loop(30) + Wait(1) + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfNe(LVar0, FALSE) + BreakLoop + EndIf + EndLoop + Call(UseBattleCamPreset, BTL_CAM_PRESET_59) + Call(action_command_hammer_start, 0, 47, 3) + Call(SetActionQuality, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_KOOPER_SHELL_SPINUP) + Set(LVar9, 0) + Set(LVar1, 0) + Loop(50) + Wait(1) + Switch(LVar9) + CaseLt(20) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) + CaseEq(20) + Call(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) + CaseLt(30) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlower) + CaseEq(30) + Call(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) + CaseLt(40) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFaster) + CaseEq(40) + Call(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) + CaseLt(50) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFastest) + CaseEq(50) + Call(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) + EndSwitch + Add(LVar9, 1) + Call(GetActionQuality, LVar0) + IfNe(LVar0, 0) + IfNe(LVar1, TRUE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) + Set(LVar1, 1) + EndIf + EndIf + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfEq(LVar0, FALSE) + BreakLoop + EndIf + EndLoop + Label(0) + Wait(1) + Set(LVarA, Float(8.0)) + Switch(LVar9) + CaseLt(20) + Set(LVarA, Float(10.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) + CaseLt(30) + Set(LVarA, Float(12.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlower) + CaseLt(40) + Set(LVarA, Float(14.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFaster) + CaseLt(50) + Set(LVarA, Float(16.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFastest) + EndSwitch + Add(LVar9, 1) + Call(GetActionSuccess, LVar0) + IfEq(LVar0, 0) + Goto(0) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 0) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_PARAKARRY_AIR_RAID_2) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(MoveBattleCamOver, 15) + Set(LVarB, 260) + DivF(LVarB, LVarA) + Thread + Call(AddActorDecoration, ACTOR_SELF, PRT_ZERO, 1, ACTOR_DECORATION_GREY_SMOKE_TRAIL) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar0, 260) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_PARTNER, LVarA) + Call(SetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 1) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 1) + EndThread + Set(LFlag0, FALSE) + Label(10) + Wait(1) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(GetActorPos, ACTOR_PARTNER, LVar3, LVar4, LVar5) + IfGt(LVar0, LVar3) + Goto(10) + EndIf + Call(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENTS_KOOPER_TEST, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, 6) + Goto(12) + EndIf + IfEq(LFlag0, FALSE) + Call(GetPartnerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_04) + CaseDefault + Call(UseBattleCamPreset, BTL_CAM_PRESET_51) + EndSwitch + EndIf + Set(LFlag0, TRUE) + Call(GetPartnerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(0) + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_KOOPER_DAMAGE, 0, LVarF, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) + CaseDefault + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_KOOPER_DAMAGE, 0, LVarE, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) + EndSwitch + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) + Label(12) + Call(ChooseNextTarget, ITER_NEXT, LVar2) + IfNe(LVar2, ITER_NO_MORE) + Goto(10) + EndIf + IfEq(LFlag0, FALSE) + Call(GetPartnerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_04) + CaseDefault + Call(UseBattleCamPreset, BTL_CAM_PRESET_51) + EndSwitch + EndIf + Label(11) + Call(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0) + IfEq(LVar0, 0) + Wait(1) + Goto(11) + EndIf + Call(GetPartnerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(0) + ExecWait(N(EVS_ReturnHome)) + CaseDefault + ExecWait(N(returnHomeOnMiss)) + EndSwitch + Return + End }; EvtScript N(dizzyShell) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_DIZZY_SHELL) - EVT_CALL(action_command_dizzy_shell_init) - EVT_CALL(SetupMashMeter, 1, 100, 0, 0, 0, 0) - EVT_CALL(InitTargetIterator) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_EnterShell) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_59) - EVT_CALL(MoveBattleCamOver, 75 * DT) - EVT_SET(LVarD, 75 * DT) - EVT_SET(LVarA, LVarD) - EVT_ADD(LVarA, -3) - EVT_CALL(battle_partner_kooper_AverageTargetDizzyChance) - EVT_CALL(action_command_dizzy_shell_start, 0, LVarA, 3, LVar0) - EVT_CALL(SetActionQuality, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_KOOPER_SHELL_SPINUP) - EVT_SET(LVar9, 0) - EVT_SET(LVarA, EVT_FLOAT(8.0)) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_DIZZY_SHELL) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_ZERO, 1, ACTOR_DECORATION_WHIRLWIND) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 1) - EVT_SET(LVar9, 1) - EVT_LOOP(LVarD) - EVT_WAIT(1) - EVT_CALL(GetActionQuality, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_LT(20 * DT) - EVT_SET(LVarA, EVT_FLOAT(10.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) - EVT_CASE_LT(40 * DT) - EVT_SET(LVarA, EVT_FLOAT(12.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlower) - EVT_CASE_LT(60 * DT) - EVT_SET(LVarA, EVT_FLOAT(14.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFaster) - EVT_CASE_DEFAULT - EVT_SET(LVarA, EVT_FLOAT(16.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFastest) - EVT_END_SWITCH - EVT_SWITCH(LVarD) - EVT_CASE_EQ(10 * DT) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) - EVT_CASE_EQ(20 * DT) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) - EVT_CASE_EQ(40 * DT) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) - EVT_CASE_EQ(60 * DT) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) - EVT_END_SWITCH - EVT_END_LOOP - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_DIZZY_SHELL_LAUNCH) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(MoveBattleCamOver, 15) - EVT_SET(LVarB, 300) - EVT_DIVF(LVarB, LVarA) - EVT_THREAD - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_ZERO, 0, ACTOR_DECORATION_GREY_SMOKE_TRAIL) - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 350) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, LVarA) - EVT_CALL(SetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 0) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 1) - EVT_WAIT(20) - EVT_CALL(SetActorPos, ACTOR_PARTNER, -200, 0, 0) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, 40, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(12.0)) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 0, 0, EASING_QUARTIC_OUT) - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 1) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(SetTargetsYaw)) - EVT_END_THREAD - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 0) - EVT_SET(LFlag0, FALSE) - EVT_LABEL(10) - EVT_WAIT(1) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar3, LVar4, LVar5) - EVT_IF_GT(LVar0, LVar3) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENTS_KOOPER_TEST, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_GOTO(12) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(99) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_04) - EVT_CASE_DEFAULT - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_51) - EVT_END_SWITCH - EVT_END_IF - EVT_SET(LFlag0, TRUE) - EVT_CALL(GetActionQuality, LVarF) - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_IF_EQ(LVar9, 1) - EVT_IF_EQ(LVarF, 100) - EVT_CALL(PartnerAfflictEnemy, LVar0, DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_STATUS_ALWAYS_HITS, + Call(LoadActionCommand, ACTION_COMMAND_DIZZY_SHELL) + Call(action_command_dizzy_shell_init) + Call(SetupMashMeter, 1, 100, 0, 0, 0, 0) + Call(InitTargetIterator) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(SetActorSpeed, ACTOR_PARTNER, Float(4.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_PARTNER, 0, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_EnterShell) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) + Wait(15) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) + Call(UseBattleCamPreset, BTL_CAM_PRESET_59) + Call(MoveBattleCamOver, 75 * DT) + Set(LVarD, 75 * DT) + Set(LVarA, LVarD) + Add(LVarA, -3) + Call(battle_partner_kooper_AverageTargetDizzyChance) + Call(action_command_dizzy_shell_start, 0, LVarA, 3, LVar0) + Call(SetActionQuality, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_KOOPER_SHELL_SPINUP) + Set(LVar9, 0) + Set(LVarA, Float(8.0)) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_DIZZY_SHELL) + Call(AddActorDecoration, ACTOR_SELF, PRT_ZERO, 1, ACTOR_DECORATION_WHIRLWIND) + Call(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 1) + Set(LVar9, 1) + Loop(LVarD) + Wait(1) + Call(GetActionQuality, LVar0) + Switch(LVar0) + CaseLt(20 * DT) + Set(LVarA, Float(10.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) + CaseLt(40 * DT) + Set(LVarA, Float(12.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlower) + CaseLt(60 * DT) + Set(LVarA, Float(14.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFaster) + CaseDefault + Set(LVarA, Float(16.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFastest) + EndSwitch + Switch(LVarD) + CaseEq(10 * DT) + Call(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) + CaseEq(20 * DT) + Call(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) + CaseEq(40 * DT) + Call(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) + CaseEq(60 * DT) + Call(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 32, 4, 0, 10, 0) + EndSwitch + EndLoop + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_DIZZY_SHELL_LAUNCH) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(MoveBattleCamOver, 15) + Set(LVarB, 300) + DivF(LVarB, LVarA) + Thread + Call(AddActorDecoration, ACTOR_SELF, PRT_ZERO, 0, ACTOR_DECORATION_GREY_SMOKE_TRAIL) + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar0, 350) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_PARTNER, LVarA) + Call(SetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 0) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 1) + Wait(20) + Call(SetActorPos, ACTOR_PARTNER, -200, 0, 0) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(AddGoalPos, ACTOR_PARTNER, 40, 0, 0) + Call(SetActorSpeed, ACTOR_PARTNER, Float(12.0)) + Call(FlyToGoal, ACTOR_PARTNER, 0, 0, EASING_QUARTIC_OUT) + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE) + Call(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 1) + EndThread + Thread + Call(N(SetTargetsYaw)) + EndThread + Call(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 0) + Set(LFlag0, FALSE) + Label(10) + Wait(1) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(GetActorPos, ACTOR_PARTNER, LVar3, LVar4, LVar5) + IfGt(LVar0, LVar3) + Goto(10) + EndIf + Call(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENTS_KOOPER_TEST, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, HIT_RESULT_MISS) + Goto(12) + EndIf + IfEq(LFlag0, FALSE) + Call(GetPartnerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(99) + Call(UseBattleCamPreset, BTL_CAM_PRESET_04) + CaseDefault + Call(UseBattleCamPreset, BTL_CAM_PRESET_51) + EndSwitch + EndIf + Set(LFlag0, TRUE) + Call(GetActionQuality, LVarF) + Call(GetPartnerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(0) + IfEq(LVar9, 1) + IfEq(LVarF, 100) + Call(PartnerAfflictEnemy, LVar0, DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_STATUS_ALWAYS_HITS, SUPPRESS_EVENTS_KOOPER_DAMAGE, DMG_STATUS_ALWAYS(STATUS_FLAG_DIZZY, 3), 254, 0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_ELSE - EVT_CALL(PartnerAfflictEnemy, LVar0, DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_STATUS_ALWAYS_HITS, SUPPRESS_EVENTS_KOOPER_DAMAGE, DMG_STATUS_ALWAYS(STATUS_FLAG_DIZZY, 3), LVarF, 0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_END_IF - EVT_ELSE - EVT_CALL(PartnerAfflictEnemy, LVar0, DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_STATUS_ALWAYS_HITS, SUPPRESS_EVENTS_KOOPER_DAMAGE, DMG_STATUS_ALWAYS(STATUS_FLAG_DIZZY, 3), LVarF, 0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_IF_EQ(LVar9, 1) - EVT_CALL(PartnerAfflictEnemy, LVar0, DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_STATUS_ALWAYS_HITS, SUPPRESS_EVENTS_KOOPER_DAMAGE, DMG_STATUS_ALWAYS(STATUS_FLAG_DIZZY, 3), 255, 0, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_ELSE - EVT_CALL(PartnerAfflictEnemy, LVar0, DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_STATUS_ALWAYS_HITS, SUPPRESS_EVENTS_KOOPER_DAMAGE, DMG_STATUS_ALWAYS(STATUS_FLAG_DIZZY, 3), 255, 0, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) - EVT_LABEL(12) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar2) - EVT_IF_NE(LVar2, ITER_NO_MORE) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(99) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_04) - EVT_CASE_DEFAULT - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_51) - EVT_END_SWITCH - EVT_END_IF - EVT_LABEL(11) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(11) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(PartnerYieldTurn) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ExitShell) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(7.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle) - EVT_RETURN - EVT_END + Else + Call(PartnerAfflictEnemy, LVar0, DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_STATUS_ALWAYS_HITS, SUPPRESS_EVENTS_KOOPER_DAMAGE, DMG_STATUS_ALWAYS(STATUS_FLAG_DIZZY, 3), LVarF, 0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) + EndIf + Else + Call(PartnerAfflictEnemy, LVar0, DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_STATUS_ALWAYS_HITS, SUPPRESS_EVENTS_KOOPER_DAMAGE, DMG_STATUS_ALWAYS(STATUS_FLAG_DIZZY, 3), LVarF, 0, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) + EndIf + CaseDefault + IfEq(LVar9, 1) + Call(PartnerAfflictEnemy, LVar0, DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_STATUS_ALWAYS_HITS, SUPPRESS_EVENTS_KOOPER_DAMAGE, DMG_STATUS_ALWAYS(STATUS_FLAG_DIZZY, 3), 255, 0, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) + Else + Call(PartnerAfflictEnemy, LVar0, DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_STATUS_ALWAYS_HITS, SUPPRESS_EVENTS_KOOPER_DAMAGE, DMG_STATUS_ALWAYS(STATUS_FLAG_DIZZY, 3), 255, 0, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) + EndIf + EndSwitch + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) + Label(12) + Call(ChooseNextTarget, ITER_NEXT, LVar2) + IfNe(LVar2, ITER_NO_MORE) + Goto(10) + EndIf + IfEq(LFlag0, FALSE) + Call(GetPartnerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(99) + Call(UseBattleCamPreset, BTL_CAM_PRESET_04) + CaseDefault + Call(UseBattleCamPreset, BTL_CAM_PRESET_51) + EndSwitch + EndIf + Label(11) + Call(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0) + IfEq(LVar0, 0) + Wait(1) + Goto(11) + EndIf + Wait(15) + Call(PartnerYieldTurn) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ExitShell) + Wait(15) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(7.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle) + Return + End }; EvtScript N(fireShell) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_FIRE_SHELL) - EVT_CALL(action_command_fire_shell_init) - EVT_CALL(SetupMashMeter, 5, 35, 60, 80, 99, 100) - EVT_CALL(InitTargetIterator) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_EnterShell) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_59) - EVT_CALL(MoveBattleCamOver, 75 * DT) - EVT_SET(LVarD, 75 * DT) - EVT_SET(LVarC, LVarD) - EVT_ADD(LVarC, -3) - EVT_CALL(action_command_fire_shell_start, 0, LVarC, 3) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 0) - EVT_SET(LVarA, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_KOOPER_SHELL_SPINUP) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_ROARING_FIRE) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_ZERO, 0, ACTOR_DECORATION_RED_FLAMES) - EVT_WAIT(1) - EVT_CALL(ModifyActorDecoration, ACTOR_PARTNER, -1, 0, 10, 10, 255, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 1) - EVT_CALL(SetActorPaletteEffect, ACTOR_PARTNER, -1, ACTOR_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) - EVT_CALL(SetActorPaletteSwapParams, ACTOR_PARTNER, -1, SPR_PAL_BattleKooper, SPR_PAL_BattleKooper, 1, 10, 1000, 10, 0, 0) - EVT_CALL(EnableActorPaletteEffects, ACTOR_PARTNER, 0, TRUE) - EVT_SET(LVar6, SPR_PAL_BattleKooper) - EVT_SET(LVar7, SPR_PAL_BattleKooper) - EVT_SET(LVar8, 30) - EVT_SET(LVar9, 30) - EVT_LOOP(LVarD) - EVT_WAIT(1) - EVT_CALL(GetActionQuality, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GE(80 * DT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFastest) - EVT_SET(LVar9, 80 * DT) - EVT_SET(LVar7, SPR_PAL_BattleKooper_Red4) - EVT_IF_NE(LVar6, LVar7) - EVT_CALL(SetActorPaletteEffect, ACTOR_PARTNER, -1, ACTOR_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) - EVT_CALL(SetActorPaletteSwapParams, ACTOR_PARTNER, -1, LVar6, LVar7, 1, 10, 1000, 10, 0, 0) - EVT_SET(LVar6, LVar7) - EVT_END_IF - EVT_CASE_GE(60 * DT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFaster) - EVT_SET(LVar9, 60 * DT) - EVT_SET(LVar7, SPR_PAL_BattleKooper_Red3) - EVT_IF_NE(LVar6, LVar7) - EVT_CALL(SetActorPaletteEffect, ACTOR_PARTNER, -1, ACTOR_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) - EVT_CALL(SetActorPaletteSwapParams, ACTOR_PARTNER, -1, LVar6, LVar7, 1, 10, 1000, 10, 0, 0) - EVT_SET(LVar6, LVar7) - EVT_END_IF - EVT_CASE_GE(40 * DT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlower) - EVT_SET(LVar9, 40 * DT) - EVT_SET(LVar7, SPR_PAL_BattleKooper_Red2) - EVT_IF_NE(LVar6, LVar7) - EVT_CALL(SetActorPaletteEffect, ACTOR_PARTNER, -1, ACTOR_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) - EVT_CALL(SetActorPaletteSwapParams, ACTOR_PARTNER, -1, LVar6, LVar7, 1, 10, 1000, 10, 0, 0) - EVT_SET(LVar6, LVar7) - EVT_END_IF - EVT_CASE_GE(20 * DT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) - EVT_SET(LVar9, 35 * DT) - EVT_SET(LVar7, SPR_PAL_BattleKooper_Red1) - EVT_IF_NE(LVar6, LVar7) - EVT_CALL(SetActorPaletteEffect, ACTOR_PARTNER, -1, ACTOR_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) - EVT_CALL(SetActorPaletteSwapParams, ACTOR_PARTNER, -1, LVar6, LVar7, 1, 10, 1000, 10, 0, 0) - EVT_SET(LVar6, LVar7) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) - EVT_SET(LVar9, 30 * DT) - EVT_SET(LVar7, SPR_PAL_BattleKooper) - EVT_IF_NE(LVar6, LVar7) - EVT_CALL(SetActorPaletteEffect, ACTOR_PARTNER, -1, ACTOR_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) - EVT_CALL(SetActorPaletteSwapParams, ACTOR_PARTNER, -1, LVar6, LVar7, 1, 10, 1000, 10, 0, 0) - EVT_SET(LVar6, LVar7) - EVT_END_IF - EVT_END_SWITCH - EVT_IF_LT(LVar8, LVar9) - EVT_ADD(LVar8, 1) - EVT_END_IF - EVT_IF_GT(LVar8, LVar9) - EVT_SUB(LVar8, 1) - EVT_END_IF - EVT_CALL(ModifyActorDecoration, ACTOR_PARTNER, -1, 0, LVar8, LVar8, 255, 0) - EVT_SWITCH(LVarD) - EVT_CASE_EQ(10 * DT) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar3, LVar4, LVar5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar3, LVar4, LVar5, 32, 4, 0, 10, 0) - EVT_CASE_EQ(20 * DT) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar3, LVar4, LVar5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar3, LVar4, LVar5, 32, 4, 0, 10, 0) - EVT_CASE_EQ(40 * DT) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar3, LVar4, LVar5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar3, LVar4, LVar5, 32, 4, 0, 10, 0) - EVT_CASE_EQ(60 * DT) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar3, LVar4, LVar5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar3, LVar4, LVar5, 32, 4, 0, 10, 0) - EVT_END_SWITCH - EVT_END_LOOP - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_FIRE_SHELL_LAUNCH) - EVT_CALL(N(GetFireShellSpeedAndDamage)) - EVT_SWITCH(LVarE) - EVT_CASE_OR_EQ(0) - EVT_CASE_OR_EQ(1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(MoveBattleCamOver, 50) - EVT_SETF(LVarA, EVT_FLOAT(10.0)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(2) - EVT_CASE_OR_EQ(3) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(MoveBattleCamOver, 30) - EVT_SETF(LVarA, EVT_FLOAT(10.0)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(4) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(MoveBattleCamOver, 15) - EVT_SETF(LVarA, EVT_FLOAT(16.0)) - EVT_END_SWITCH - EVT_SET(LVarB, 350) - EVT_DIVF(LVarB, LVarA) - EVT_THREAD - EVT_CALL(AddActorDecoration, ACTOR_PARTNER, -1, 1, ACTOR_DECORATION_FIRE_SMOKE_TRAIL) - EVT_WAIT(1) - EVT_SWITCH(LVarE) - EVT_CASE_OR_EQ(0) - EVT_CASE_OR_EQ(1) - EVT_CALL(ModifyActorDecoration, ACTOR_PARTNER, -1, 1, 50, 0, 0, 0) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(2) - EVT_CASE_OR_EQ(3) - EVT_CALL(ModifyActorDecoration, ACTOR_PARTNER, -1, 1, 100, 0, 0, 0) - EVT_END_CASE_GROUP - EVT_CASE_EQ(4) - EVT_CALL(ModifyActorDecoration, ACTOR_PARTNER, -1, 1, 300, 0, 0, 0) - EVT_END_SWITCH - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 350) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, LVarA) - EVT_CALL(SetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 1) - EVT_WAIT(20) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 0) - EVT_CALL(EnableActorPaletteEffects, ACTOR_PARTNER, 0, FALSE) - EVT_CALL(SetActorPos, ACTOR_PARTNER, -200, 0, 0) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, 40, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(12.0)) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 0, 0, EASING_QUARTIC_OUT) - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 1) - EVT_END_THREAD - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 0) - EVT_SET(LFlag0, FALSE) - EVT_LABEL(10) - EVT_WAIT(1) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar3, LVar4, LVar5) - EVT_IF_GT(LVar0, LVar3) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENTS_KOOPER_TEST, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, 6) - EVT_GOTO(12) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(99) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_04) - EVT_CASE_DEFAULT - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_51) - EVT_END_SWITCH - EVT_END_IF - EVT_SET(LFlag0, TRUE) - EVT_CALL(GetActionQuality, LVar0) - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(99) - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_FIRE | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_KOOPER_DAMAGE, 0, LVarF, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_CASE_DEFAULT - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_FIRE | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_KOOPER_DAMAGE, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) - EVT_LABEL(12) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(99) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_04) - EVT_CASE_DEFAULT - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_51) - EVT_END_SWITCH - EVT_END_IF - EVT_LABEL(11) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(11) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(PartnerYieldTurn) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ExitShell) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(7.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_FIRE_SHELL) + Call(action_command_fire_shell_init) + Call(SetupMashMeter, 5, 35, 60, 80, 99, 100) + Call(InitTargetIterator) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(SetActorSpeed, ACTOR_PARTNER, Float(4.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(RunToGoal, ACTOR_PARTNER, 0, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_EnterShell) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) + Wait(15) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) + Call(UseBattleCamPreset, BTL_CAM_PRESET_59) + Call(MoveBattleCamOver, 75 * DT) + Set(LVarD, 75 * DT) + Set(LVarC, LVarD) + Add(LVarC, -3) + Call(action_command_fire_shell_start, 0, LVarC, 3) + Call(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 0) + Set(LVarA, Float(8.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_KOOPER_SHELL_SPINUP) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_ROARING_FIRE) + Call(AddActorDecoration, ACTOR_SELF, PRT_ZERO, 0, ACTOR_DECORATION_RED_FLAMES) + Wait(1) + Call(ModifyActorDecoration, ACTOR_PARTNER, -1, 0, 10, 10, 255, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Unk_1, 1) + Call(SetActorPaletteEffect, ACTOR_PARTNER, -1, ACTOR_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) + Call(SetActorPaletteSwapParams, ACTOR_PARTNER, -1, SPR_PAL_BattleKooper, SPR_PAL_BattleKooper, 1, 10, 1000, 10, 0, 0) + Call(EnableActorPaletteEffects, ACTOR_PARTNER, 0, TRUE) + Set(LVar6, SPR_PAL_BattleKooper) + Set(LVar7, SPR_PAL_BattleKooper) + Set(LVar8, 30) + Set(LVar9, 30) + Loop(LVarD) + Wait(1) + Call(GetActionQuality, LVar0) + Switch(LVar0) + CaseGe(80 * DT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFastest) + Set(LVar9, 80 * DT) + Set(LVar7, SPR_PAL_BattleKooper_Red4) + IfNe(LVar6, LVar7) + Call(SetActorPaletteEffect, ACTOR_PARTNER, -1, ACTOR_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) + Call(SetActorPaletteSwapParams, ACTOR_PARTNER, -1, LVar6, LVar7, 1, 10, 1000, 10, 0, 0) + Set(LVar6, LVar7) + EndIf + CaseGe(60 * DT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinFaster) + Set(LVar9, 60 * DT) + Set(LVar7, SPR_PAL_BattleKooper_Red3) + IfNe(LVar6, LVar7) + Call(SetActorPaletteEffect, ACTOR_PARTNER, -1, ACTOR_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) + Call(SetActorPaletteSwapParams, ACTOR_PARTNER, -1, LVar6, LVar7, 1, 10, 1000, 10, 0, 0) + Set(LVar6, LVar7) + EndIf + CaseGe(40 * DT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlower) + Set(LVar9, 40 * DT) + Set(LVar7, SPR_PAL_BattleKooper_Red2) + IfNe(LVar6, LVar7) + Call(SetActorPaletteEffect, ACTOR_PARTNER, -1, ACTOR_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) + Call(SetActorPaletteSwapParams, ACTOR_PARTNER, -1, LVar6, LVar7, 1, 10, 1000, 10, 0, 0) + Set(LVar6, LVar7) + EndIf + CaseGe(20 * DT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) + Set(LVar9, 35 * DT) + Set(LVar7, SPR_PAL_BattleKooper_Red1) + IfNe(LVar6, LVar7) + Call(SetActorPaletteEffect, ACTOR_PARTNER, -1, ACTOR_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) + Call(SetActorPaletteSwapParams, ACTOR_PARTNER, -1, LVar6, LVar7, 1, 10, 1000, 10, 0, 0) + Set(LVar6, LVar7) + EndIf + CaseDefault + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) + Set(LVar9, 30 * DT) + Set(LVar7, SPR_PAL_BattleKooper) + IfNe(LVar6, LVar7) + Call(SetActorPaletteEffect, ACTOR_PARTNER, -1, ACTOR_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) + Call(SetActorPaletteSwapParams, ACTOR_PARTNER, -1, LVar6, LVar7, 1, 10, 1000, 10, 0, 0) + Set(LVar6, LVar7) + EndIf + EndSwitch + IfLt(LVar8, LVar9) + Add(LVar8, 1) + EndIf + IfGt(LVar8, LVar9) + Sub(LVar8, 1) + EndIf + Call(ModifyActorDecoration, ACTOR_PARTNER, -1, 0, LVar8, LVar8, 255, 0) + Switch(LVarD) + CaseEq(10 * DT) + Call(GetActorPos, ACTOR_PARTNER, LVar3, LVar4, LVar5) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar3, LVar4, LVar5, 32, 4, 0, 10, 0) + CaseEq(20 * DT) + Call(GetActorPos, ACTOR_PARTNER, LVar3, LVar4, LVar5) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar3, LVar4, LVar5, 32, 4, 0, 10, 0) + CaseEq(40 * DT) + Call(GetActorPos, ACTOR_PARTNER, LVar3, LVar4, LVar5) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar3, LVar4, LVar5, 32, 4, 0, 10, 0) + CaseEq(60 * DT) + Call(GetActorPos, ACTOR_PARTNER, LVar3, LVar4, LVar5) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar3, LVar4, LVar5, 32, 4, 0, 10, 0) + EndSwitch + EndLoop + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_FIRE_SHELL_LAUNCH) + Call(N(GetFireShellSpeedAndDamage)) + Switch(LVarE) + CaseOrEq(0) + CaseOrEq(1) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(MoveBattleCamOver, 50) + SetF(LVarA, Float(10.0)) + EndCaseGroup + CaseOrEq(2) + CaseOrEq(3) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(MoveBattleCamOver, 30) + SetF(LVarA, Float(10.0)) + EndCaseGroup + CaseEq(4) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(MoveBattleCamOver, 15) + SetF(LVarA, Float(16.0)) + EndSwitch + Set(LVarB, 350) + DivF(LVarB, LVarA) + Thread + Call(AddActorDecoration, ACTOR_PARTNER, -1, 1, ACTOR_DECORATION_FIRE_SMOKE_TRAIL) + Wait(1) + Switch(LVarE) + CaseOrEq(0) + CaseOrEq(1) + Call(ModifyActorDecoration, ACTOR_PARTNER, -1, 1, 50, 0, 0, 0) + EndCaseGroup + CaseOrEq(2) + CaseOrEq(3) + Call(ModifyActorDecoration, ACTOR_PARTNER, -1, 1, 100, 0, 0, 0) + EndCaseGroup + CaseEq(4) + Call(ModifyActorDecoration, ACTOR_PARTNER, -1, 1, 300, 0, 0, 0) + EndSwitch + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar0, 350) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_PARTNER, LVarA) + Call(SetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 1) + Wait(20) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 0) + Call(EnableActorPaletteEffects, ACTOR_PARTNER, 0, FALSE) + Call(SetActorPos, ACTOR_PARTNER, -200, 0, 0) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(AddGoalPos, ACTOR_PARTNER, 40, 0, 0) + Call(SetActorSpeed, ACTOR_PARTNER, Float(12.0)) + Call(FlyToGoal, ACTOR_PARTNER, 0, 0, EASING_QUARTIC_OUT) + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE) + Call(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 1) + EndThread + Call(SetActorVar, ACTOR_SELF, AVAR_Unk_0, 0) + Set(LFlag0, FALSE) + Label(10) + Wait(1) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(GetActorPos, ACTOR_PARTNER, LVar3, LVar4, LVar5) + IfGt(LVar0, LVar3) + Goto(10) + EndIf + Call(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENTS_KOOPER_TEST, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, 6) + Goto(12) + EndIf + IfEq(LFlag0, FALSE) + Call(GetPartnerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(99) + Call(UseBattleCamPreset, BTL_CAM_PRESET_04) + CaseDefault + Call(UseBattleCamPreset, BTL_CAM_PRESET_51) + EndSwitch + EndIf + Set(LFlag0, TRUE) + Call(GetActionQuality, LVar0) + Call(GetPartnerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(99) + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_FIRE | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_KOOPER_DAMAGE, 0, LVarF, BS_FLAGS1_NICE_HIT | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) + CaseDefault + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_FIRE | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENTS_KOOPER_DAMAGE, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) + EndSwitch + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) + Label(12) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(10) + EndIf + IfEq(LFlag0, FALSE) + Call(GetPartnerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(99) + Call(UseBattleCamPreset, BTL_CAM_PRESET_04) + CaseDefault + Call(UseBattleCamPreset, BTL_CAM_PRESET_51) + EndSwitch + EndIf + Label(11) + Call(GetActorVar, ACTOR_SELF, AVAR_Unk_0, LVar0) + IfEq(LVar0, 0) + Wait(1) + Goto(11) + EndIf + Wait(15) + Call(PartnerYieldTurn) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ExitShell) + Wait(15) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(7.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle) + Return + End }; EvtScript N(shellTossOnFirstStrike) = { - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 60) - EVT_CALL(SetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(InitTargetIterator) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(MoveBattleCamOver, 15) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(16.0)) - EVT_CALL(SetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENTS_KOOPER_TEST, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_THREAD - EVT_CALL(N(SlowDown)) - EVT_CALL(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 0) - EVT_END_THREAD - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellStill) - EVT_CALL(SetActorRotationOffset, ACTOR_PARTNER, 8, 0, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(2) - EVT_ADD(LVar0, -30) - EVT_CALL(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(5) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 16, 4, 0, 10, 0) - EVT_LOOP(5) - EVT_ADD(LVar0, 12) - EVT_CALL(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_PARTNER, 0, 0, 2) - EVT_WAIT(2) - EVT_CALL(SetActorRotation, ACTOR_PARTNER, 0, 0, -2) - EVT_WAIT(2) - EVT_CALL(SetActorRotation, ACTOR_PARTNER, 0, 0, 0) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ExitShell) - EVT_WAIT(10) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(7.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_RETURN - EVT_END_IF - EVT_SET(LVarF, 1) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_SHELL_TOSS1) - EVT_SET(LVarF, 1) - EVT_CASE_EQ(MOVE_SHELL_TOSS2) - EVT_SET(LVarF, 2) - EVT_CASE_EQ(MOVE_SHELL_TOSS3) - EVT_SET(LVarF, 3) - EVT_END_SWITCH - EVT_CALL(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENTS_KOOPER_DAMAGE, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_SHELL_TOSS1) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) - EVT_CASE_EQ(MOVE_SHELL_TOSS2) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) - EVT_CASE_EQ(MOVE_SHELL_TOSS3) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) - EVT_END_SWITCH - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 40) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.1)) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 8, FALSE, FALSE, TRUE) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 6, FALSE, FALSE, TRUE) - EVT_SUB(LVar0, 10) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 4, FALSE, FALSE, TRUE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ExitShell) - EVT_WAIT(15) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(7.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle) - EVT_CALL(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, TRUE) - EVT_RETURN - EVT_END + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar0, 60) + Call(SetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(InitTargetIterator) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(MoveBattleCamOver, 15) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(16.0)) + Call(SetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_WALK, SOUND_NONE, SOUND_NONE) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENTS_KOOPER_TEST, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, HIT_RESULT_MISS) + Thread + Call(N(SlowDown)) + Call(RemoveActorDecoration, ACTOR_SELF, PRT_ZERO, 0) + EndThread + Wait(4) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellStill) + Call(SetActorRotationOffset, ACTOR_PARTNER, 8, 0, 0) + Set(LVar0, 0) + Loop(2) + Add(LVar0, -30) + Call(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0) + Wait(1) + EndLoop + Wait(5) + Call(GetActorPos, ACTOR_PARTNER, LVar4, LVar5, LVar6) + PlayEffect(EFFECT_SMOKE_IMPACT, 1, LVar4, LVar5, LVar6, 16, 4, 0, 10, 0) + Loop(5) + Add(LVar0, 12) + Call(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0) + Call(SetActorRotation, ACTOR_PARTNER, 0, 0, 2) + Wait(2) + Call(SetActorRotation, ACTOR_PARTNER, 0, 0, -2) + Wait(2) + Call(SetActorRotation, ACTOR_PARTNER, 0, 0, 0) + Wait(10) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ExitShell) + Wait(10) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(7.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run) + Call(RunToGoal, ACTOR_PARTNER, 0) + Return + EndIf + Set(LVarF, 1) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar2) + CaseEq(MOVE_SHELL_TOSS1) + Set(LVarF, 1) + CaseEq(MOVE_SHELL_TOSS2) + Set(LVarF, 2) + CaseEq(MOVE_SHELL_TOSS3) + Set(LVarF, 3) + EndSwitch + Call(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENTS_KOOPER_DAMAGE, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar2) + CaseEq(MOVE_SHELL_TOSS1) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) + CaseEq(MOVE_SHELL_TOSS2) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) + CaseEq(MOVE_SHELL_TOSS3) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) + EndSwitch + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Sub(LVar0, 40) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.1)) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 8, FALSE, FALSE, TRUE) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 6, FALSE, FALSE, TRUE) + Sub(LVar0, 10) + Call(JumpToGoal, ACTOR_PARTNER, 4, FALSE, FALSE, TRUE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ExitShell) + Wait(15) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(7.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Run) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_Idle) + Call(EnableIdleScript, ACTOR_SELF, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_SELF, TRUE) + Return + End }; diff --git a/src/battle/partner/lakilester.c b/src/battle/partner/lakilester.c index f968b889b61..b0d7fb7c2ee 100644 --- a/src/battle/partner/lakilester.c +++ b/src/battle/partner/lakilester.c @@ -178,190 +178,190 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(GetLastEvent, ACTOR_PARTNER, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_SET_CONST(LVar2, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Partner_LakilesterHit) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Partner_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIKE_CONTACT) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_SET_CONST(LVar2, 20) - EVT_EXEC_WAIT(EVS_Partner_SpikeContact) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_BURN_CONTACT) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_BurnHurt) - EVT_SET(LVar2, 20) - EVT_SET_CONST(LVar3, ANIM_BattleLakilester_BurnStill) - EVT_EXEC_WAIT(EVS_Partner_BurnContact) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleLakilester_BurnStill) - EVT_EXEC_WAIT(EVS_Partner_BurnHit) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_SET(LVar2, 20) - EVT_EXEC_WAIT(EVS_Partner_ShockHit) - EVT_CASE_EQ(EVENT_33) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_RECOVER_FROM_KO) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Walk) - EVT_SET_CONST(LVar2, ANIM_BattleLakilester_Run) - EVT_SET(LVar3, 10) - EVT_EXEC_WAIT(EVS_Partner_Recover) - EVT_CASE_OR_EQ(EVENT_18) - EVT_CASE_OR_EQ(EVENT_BLOCK) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Block) - EVT_EXEC_WAIT(EVS_Partner_NoDamageHit) - EVT_WAIT(10) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(CloseActionCommandInfo) + Call(GetLastEvent, ACTOR_PARTNER, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + SetConst(LVar2, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Partner_LakilesterHit) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Partner_Drop) + EndCaseGroup + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Partner_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_SPIKE_CONTACT) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + SetConst(LVar2, 20) + ExecWait(EVS_Partner_SpikeContact) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_BURN_CONTACT) + SetConst(LVar1, ANIM_BattleLakilester_BurnHurt) + Set(LVar2, 20) + SetConst(LVar3, ANIM_BattleLakilester_BurnStill) + ExecWait(EVS_Partner_BurnContact) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_BURN_HIT) + SetConst(LVar1, ANIM_BattleLakilester_BurnHurt) + SetConst(LVar2, ANIM_BattleLakilester_BurnStill) + ExecWait(EVS_Partner_BurnHit) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + Set(LVar2, 20) + ExecWait(EVS_Partner_ShockHit) + CaseEq(EVENT_33) + SetConst(LVar1, ANIM_BattleLakilester_Hurt) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_RECOVER_FROM_KO) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Walk) + SetConst(LVar2, ANIM_BattleLakilester_Run) + Set(LVar3, 10) + ExecWait(EVS_Partner_Recover) + CaseOrEq(EVENT_18) + CaseOrEq(EVENT_BLOCK) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Block) + ExecWait(EVS_Partner_NoDamageHit) + Wait(10) + EndCaseGroup + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_EXECUTE_ACTION) - EVT_EXEC_WAIT(N(EVS_ExecuteAction)) - EVT_CASE_EQ(PHASE_CELEBRATE) - EVT_EXEC_WAIT(N(EVS_Celebrate)) - EVT_CASE_EQ(PHASE_RUN_AWAY_START) - EVT_EXEC_WAIT(N(EVS_RunAway)) - EVT_CASE_EQ(PHASE_RUN_AWAY_FAIL) - EVT_EXEC_WAIT(N(EVS_RunAwayFail)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_EXECUTE_ACTION) + ExecWait(N(EVS_ExecuteAction)) + CaseEq(PHASE_CELEBRATE) + ExecWait(N(EVS_Celebrate)) + CaseEq(PHASE_RUN_AWAY_START) + ExecWait(N(EVS_RunAway)) + CaseEq(PHASE_RUN_AWAY_FAIL) + ExecWait(N(EVS_RunAwayFail)) + EndSwitch + Return + End }; EvtScript N(EVS_Celebrate) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Celebrate) - EVT_SET_CONST(LVar2, ANIM_BattleLakilester_Walk) - EVT_SET_CONST(LVar3, ANIM_BattleLakilester_Walk) - EVT_EXEC_WAIT(EVS_Partner_Celebrate) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Celebrate) + SetConst(LVar2, ANIM_BattleLakilester_Walk) + SetConst(LVar3, ANIM_BattleLakilester_Walk) + ExecWait(EVS_Partner_Celebrate) + Return + End }; EvtScript N(EVS_RunAway) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleLakilester_Run) - EVT_EXEC_WAIT(EVS_Partner_RunAway) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleLakilester_Run) + ExecWait(EVS_Partner_RunAway) + Return + End }; EvtScript N(EVS_RunAwayFail) = { - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Run) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, 0) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Walk) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(6.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Run) + Call(SetActorYaw, ACTOR_PARTNER, 0) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Walk) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_ExecuteAction) = { - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_CALL(ShowActionHud, TRUE) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(BTL_MENU_TYPE_STAR_POWERS) - EVT_CALL(LoadStarPowerScript) - EVT_EXEC_WAIT(LVar0) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_SPINY_FLIP1) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_EXEC_WAIT(N(EVS_Move_SpinyFlip)) - EVT_CASE_EQ(MOVE_SPINY_FLIP2) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_EXEC_WAIT(N(EVS_Move_SpinyFlip)) - EVT_CASE_EQ(MOVE_SPINY_FLIP3) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_EXEC_WAIT(N(EVS_Move_SpinyFlip)) - EVT_CASE_EQ(MOVE_SPINY_SURGE) - EVT_EXEC_WAIT(N(EVS_Move_SpinySurge)) - EVT_CASE_EQ(MOVE_CLOUD_NINE) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_EXEC_WAIT(N(EVS_Move_CloudNine)) - EVT_CASE_EQ(MOVE_HURRICANE) - EVT_EXEC_WAIT(N(EVS_Move_Hurricane)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Call(ShowActionHud, TRUE) + Switch(LVar0) + CaseEq(BTL_MENU_TYPE_STAR_POWERS) + Call(LoadStarPowerScript) + ExecWait(LVar0) + Return + EndSwitch + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar2) + CaseEq(MOVE_SPINY_FLIP1) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + ExecWait(N(EVS_Move_SpinyFlip)) + CaseEq(MOVE_SPINY_FLIP2) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + ExecWait(N(EVS_Move_SpinyFlip)) + CaseEq(MOVE_SPINY_FLIP3) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + ExecWait(N(EVS_Move_SpinyFlip)) + CaseEq(MOVE_SPINY_SURGE) + ExecWait(N(EVS_Move_SpinySurge)) + CaseEq(MOVE_CLOUD_NINE) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + ExecWait(N(EVS_Move_CloudNine)) + CaseEq(MOVE_HURRICANE) + ExecWait(N(EVS_Move_Hurricane)) + EndSwitch + Return + End }; EvtScript N(returnHome2) = { - EVT_CALL(PartnerYieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_04) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Run) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 15, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Walk) - EVT_RETURN - EVT_END + Call(PartnerYieldTurn) + Call(UseBattleCamPreset, BTL_CAM_PRESET_04) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Run) + Call(FlyToGoal, ACTOR_PARTNER, 15, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Walk) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(PartnerYieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_51) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Run) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 15, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Walk) - EVT_RETURN - EVT_END + Call(PartnerYieldTurn) + Call(UseBattleCamPreset, BTL_CAM_PRESET_51) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Run) + Call(FlyToGoal, ACTOR_PARTNER, 15, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Walk) + Return + End }; HudScript* N(AimDotHudScripts)[] = { @@ -834,523 +834,523 @@ API_CALLABLE(N(CanTargetBeBlown)) { } EvtScript N(EVS_Move_SpinyFlip) = { - EVT_THREAD - EVT_CALL(N(SpinyFlipUpdatePopup)) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Run) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_ADD(LVar1, 20) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Idle) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 47, 46, 12) - EVT_CALL(SetBattleCamOffsetZ, 7) - EVT_CALL(SetBattleCamZoom, 416) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 3) - EVT_ADD(LVar1, 10) - EVT_ADD(LVar2, 5) - EVT_CALL(SetPartPos, ACTOR_PARTNER, 2, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(SetPartFlagBits, ACTOR_PARTNER, 2, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_2, ANIM_BattleLakilester_Spiny) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_LiftSpiny) - EVT_LOOP(4) - EVT_ADD(LVar1, 6) - EVT_CALL(SetPartPos, ACTOR_PARTNER, 2, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 8) - EVT_ADD(LVar1, 40) - EVT_ADD(LVar2, 5) - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 80 * DT, 0) - EVT_CALL(SetActorVar, ACTOR_PARTNER, AVAR_Unk_0, 1) - EVT_THREAD - EVT_LOOP(40 * DT) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 1, 0, 0) - EVT_CALL(SetPartDispOffset, ACTOR_PARTNER, 2, 1, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, -1, 0, 0) - EVT_CALL(SetPartDispOffset, ACTOR_PARTNER, 2, -1, 0, 0) - EVT_WAIT(1) - EVT_CALL(GetActorVar, ACTOR_PARTNER, AVAR_Unk_0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 0, 0) - EVT_CALL(SetPartDispOffset, ACTOR_PARTNER, 2, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(N(SpinyFlipActionCommand)) - EVT_CALL(SetActorVar, ACTOR_PARTNER, AVAR_Unk_0, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_ThrowSpiny) - EVT_WAIT(3) - EVT_CALL(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_SET(LVarF, -1) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_LAKILESTER_THROW_SPINY_A) - EVT_SWITCH(LVarF) - EVT_CASE_EQ(-1) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_2, ANIM_BattleLakilester_SpinySpin) - EVT_CALL(SetPartJumpGravity, ACTOR_PARTNER, 2, EVT_FLOAT(1.5)) - EVT_SET(LVar0, LVar7) - EVT_SET(LVar1, LVar8) - EVT_SET(LVar2, LVar9) - EVT_CALL(JumpPartTo, ACTOR_PARTNER, 2, LVar7, LVar8, LVar9, 20) - EVT_CALL(LandJumpPart, ACTOR_PARTNER, 2) - EVT_CASE_EQ(0) - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_2, ANIM_BattleLakilester_SpinySpin) - EVT_CALL(SetPartJumpGravity, ACTOR_PARTNER, 2, EVT_FLOAT(1.5)) - EVT_SET(LVar0, LVar7) - EVT_SET(LVar1, LVar8) - EVT_SET(LVar2, LVar9) - EVT_CALL(JumpPartTo, ACTOR_PARTNER, 2, LVar7, LVar8, LVar9, 20) - EVT_CALL(LandJumpPart, ACTOR_PARTNER, 2) - EVT_CASE_DEFAULT - EVT_CALL(SetAnimation, ACTOR_SELF, PRT_2, ANIM_BattleLakilester_SpinySpin) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetPartJumpGravity, ACTOR_PARTNER, 2, EVT_FLOAT(1.5)) - EVT_CALL(JumpPartTo, ACTOR_PARTNER, 2, LVar0, LVar1, LVar2, 20) - EVT_END_SWITCH - EVT_THREAD - EVT_ADD(LVar0, 50) - EVT_SET(LVar1, 0) - EVT_CALL(SetPartJumpGravity, ACTOR_PARTNER, 2, EVT_FLOAT(1.5)) - EVT_CALL(JumpPartTo, ACTOR_PARTNER, 2, LVar0, LVar1, LVar2, 15) - EVT_CALL(SetPartFlagBits, ACTOR_PARTNER, 2, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_END_THREAD - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_SPINY_FLIP1) - EVT_SET(LVarE, 3) - EVT_CASE_EQ(MOVE_SPINY_FLIP2) - EVT_SET(LVarE, 4) - EVT_CASE_EQ(MOVE_SPINY_FLIP3) - EVT_SET(LVarE, 5) - EVT_END_SWITCH - EVT_SWITCH(LVarF) - EVT_CASE_GT(0) - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_SPINY_SURGE | DAMAGE_TYPE_NO_CONTACT, 0, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_SET(LVar0, HIT_RESULT_NO_DAMAGE) - EVT_END_SWITCH - EVT_SWITCH(LVarF) - EVT_CASE_EQ(1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_04) - EVT_CASE_DEFAULT - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_51) - EVT_END_SWITCH - EVT_WAIT(15) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_EXEC_WAIT(N(returnHome2)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Thread + Call(N(SpinyFlipUpdatePopup)) + EndThread + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Run) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Add(LVar1, 20) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_PARTNER, 30, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Idle) + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 47, 46, 12) + Call(SetBattleCamOffsetZ, 7) + Call(SetBattleCamZoom, 416) + Call(MoveBattleCamOver, 30) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar0, 3) + Add(LVar1, 10) + Add(LVar2, 5) + Call(SetPartPos, ACTOR_PARTNER, 2, LVar0, LVar1, LVar2) + Wait(1) + Call(SetPartFlagBits, ACTOR_PARTNER, 2, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(SetAnimation, ACTOR_SELF, PRT_2, ANIM_BattleLakilester_Spiny) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_LiftSpiny) + Loop(4) + Add(LVar1, 6) + Call(SetPartPos, ACTOR_PARTNER, 2, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar0, 8) + Add(LVar1, 40) + Add(LVar2, 5) + PlayEffect(EFFECT_ENERGY_IN_OUT, 0, LVar0, LVar1, LVar2, Float(1.0), 80 * DT, 0) + Call(SetActorVar, ACTOR_PARTNER, AVAR_Unk_0, 1) + Thread + Loop(40 * DT) + Call(SetActorDispOffset, ACTOR_PARTNER, 1, 0, 0) + Call(SetPartDispOffset, ACTOR_PARTNER, 2, 1, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_PARTNER, -1, 0, 0) + Call(SetPartDispOffset, ACTOR_PARTNER, 2, -1, 0, 0) + Wait(1) + Call(GetActorVar, ACTOR_PARTNER, AVAR_Unk_0, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(SetActorDispOffset, ACTOR_PARTNER, 0, 0, 0) + Call(SetPartDispOffset, ACTOR_PARTNER, 2, 0, 0, 0) + EndThread + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(N(SpinyFlipActionCommand)) + Call(SetActorVar, ACTOR_PARTNER, AVAR_Unk_0, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_ThrowSpiny) + Wait(3) + Call(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, HIT_RESULT_MISS) + Set(LVarF, -1) + EndIf + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_LAKILESTER_THROW_SPINY_A) + Switch(LVarF) + CaseEq(-1) + Call(SetAnimation, ACTOR_SELF, PRT_2, ANIM_BattleLakilester_SpinySpin) + Call(SetPartJumpGravity, ACTOR_PARTNER, 2, Float(1.5)) + Set(LVar0, LVar7) + Set(LVar1, LVar8) + Set(LVar2, LVar9) + Call(JumpPartTo, ACTOR_PARTNER, 2, LVar7, LVar8, LVar9, 20) + Call(LandJumpPart, ACTOR_PARTNER, 2) + CaseEq(0) + Call(SetAnimation, ACTOR_SELF, PRT_2, ANIM_BattleLakilester_SpinySpin) + Call(SetPartJumpGravity, ACTOR_PARTNER, 2, Float(1.5)) + Set(LVar0, LVar7) + Set(LVar1, LVar8) + Set(LVar2, LVar9) + Call(JumpPartTo, ACTOR_PARTNER, 2, LVar7, LVar8, LVar9, 20) + Call(LandJumpPart, ACTOR_PARTNER, 2) + CaseDefault + Call(SetAnimation, ACTOR_SELF, PRT_2, ANIM_BattleLakilester_SpinySpin) + Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(SetPartJumpGravity, ACTOR_PARTNER, 2, Float(1.5)) + Call(JumpPartTo, ACTOR_PARTNER, 2, LVar0, LVar1, LVar2, 20) + EndSwitch + Thread + Add(LVar0, 50) + Set(LVar1, 0) + Call(SetPartJumpGravity, ACTOR_PARTNER, 2, Float(1.5)) + Call(JumpPartTo, ACTOR_PARTNER, 2, LVar0, LVar1, LVar2, 15) + Call(SetPartFlagBits, ACTOR_PARTNER, 2, ACTOR_PART_FLAG_INVISIBLE, TRUE) + EndThread + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar2) + CaseEq(MOVE_SPINY_FLIP1) + Set(LVarE, 3) + CaseEq(MOVE_SPINY_FLIP2) + Set(LVarE, 4) + CaseEq(MOVE_SPINY_FLIP3) + Set(LVarE, 5) + EndSwitch + Switch(LVarF) + CaseGt(0) + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_SPINY_SURGE | DAMAGE_TYPE_NO_CONTACT, 0, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) + CaseDefault + Set(LVar0, HIT_RESULT_NO_DAMAGE) + EndSwitch + Switch(LVarF) + CaseEq(1) + Call(UseBattleCamPreset, BTL_CAM_PRESET_04) + CaseDefault + Call(UseBattleCamPreset, BTL_CAM_PRESET_51) + EndSwitch + Wait(15) + Switch(LVar0) + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + ExecWait(N(returnHome2)) + EndCaseGroup + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_Move_SpinySurge) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_SPINY_SURGE) - EVT_CALL(action_command_spiny_surge_init) - EVT_CALL(GetActorLevel, ACTOR_PARTNER, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetupMashMeter, 2, 99, 100, 0, 0, 0) - EVT_CASE_EQ(1) - EVT_CALL(SetupMashMeter, 3, 70, 99, 100, 0, 0) - EVT_CASE_EQ(2) - EVT_CALL(SetupMashMeter, 4, 40, 70, 99, 100, 0) - EVT_END_SWITCH - EVT_CALL(SetActionHudPrepareTime, 10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 45, 60, 0) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(SetBattleCamZoom, 400) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Run) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, 60, 20, 0) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Idle) - EVT_WAIT(10) - EVT_CALL(GetActorLevel, ACTOR_PARTNER, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SET(LVarA, 60 * DT) - EVT_CASE_EQ(1) - EVT_SET(LVarA, 60 * DT) - EVT_CASE_EQ(2) - EVT_SET(LVarA, 60 * DT) - EVT_END_SWITCH - EVT_SET(LVarB, LVarA) - EVT_ADD(LVarB, -3) - EVT_CALL(action_command_spiny_surge_start, 0, LVarB, 3) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetActorVar, ACTOR_PARTNER, AVAR_Unk_0, 0) - EVT_SET(LVar9, 0) - EVT_SET(LFlag2, FALSE) - EVT_SET(LFlag3, FALSE) - EVT_LOOP(LVarA) - EVT_CALL(GetActionQuality, LVar0) - EVT_IF_EQ(LVar9, 2) - EVT_SET(LVar0, 3) - EVT_END_IF - EVT_SWITCH(LVar0) - EVT_CASE_EQ(-1) - EVT_SET(LVar9, 0) - EVT_CALL(SetPartFlagBits, ACTOR_PARTNER, 2, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Idle) - EVT_CASE_EQ(1) - EVT_IF_EQ(LVar9, 1) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_CALL(SetPartFlagBits, ACTOR_PARTNER, 2, ACTOR_PART_FLAG_INVISIBLE, FALSE) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 3) - EVT_ADD(LVar1, 34) - EVT_ADD(LVar2, 5) - EVT_CALL(SetPartPos, ACTOR_PARTNER, 2, LVar0, LVar1, LVar2) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_LiftSpiny) - EVT_SET(LVar9, 1) - EVT_CASE_EQ(2) - EVT_IF_EQ(LVar9, 0) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_IF_EQ(LFlag2, FALSE) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_LAKILESTER_THROW_SPINY_A) - EVT_SET(LFlag2, TRUE) - EVT_ELSE - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_LAKILESTER_THROW_SPINY_B) - EVT_SET(LFlag2, FALSE) - EVT_END_IF - EVT_CALL(N(ThrowSpinyFX)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_ThrowSpinyAlt) - EVT_CALL(SetPartFlagBits, ACTOR_PARTNER, 2, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CHILD_THREAD - EVT_CALL(GetActorVar, ACTOR_PARTNER, AVAR_Unk_0, LVar0) - EVT_ADD(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_PARTNER, AVAR_Unk_0, LVar0) - EVT_WAIT(15) - EVT_CALL(GetActorVar, ACTOR_PARTNER, AVAR_Unk_0, LVar0) - EVT_SUB(LVar0, 1) - EVT_CALL(SetActorVar, ACTOR_PARTNER, AVAR_Unk_0, LVar0) - EVT_END_CHILD_THREAD - EVT_SET(LFlag3, TRUE) - EVT_SET(LVar9, 0) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartFlagBits, ACTOR_PARTNER, 2, ACTOR_PART_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Idle) - EVT_LOOP(0) - EVT_CALL(GetActorVar, ACTOR_PARTNER, AVAR_Unk_0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(10) - EVT_IF_EQ(LFlag3, FALSE) - EVT_SET(LVar0, 0) - EVT_SET(LVarF, 0) - EVT_WAIT(15) - EVT_GOTO(13) - EVT_END_IF - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_GOTO(12) - EVT_END_IF - EVT_CALL(GetPartnerActionSuccess, LVarA) - EVT_CALL(N(GetSpinySurgeDamage)) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_SPINY_SURGE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_SPINY_SURGE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_04) - EVT_CASE_DEFAULT - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_51) - EVT_END_SWITCH - EVT_WAIT(6) - EVT_LABEL(12) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar1) - EVT_IF_NE(LVar1, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(30) - EVT_LABEL(13) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_EXEC_WAIT(N(returnHome2)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_SPINY_SURGE) + Call(action_command_spiny_surge_init) + Call(GetActorLevel, ACTOR_PARTNER, LVar0) + Switch(LVar0) + CaseEq(0) + Call(SetupMashMeter, 2, 99, 100, 0, 0, 0) + CaseEq(1) + Call(SetupMashMeter, 3, 70, 99, 100, 0, 0) + CaseEq(2) + Call(SetupMashMeter, 4, 40, 70, 99, 100, 0) + EndSwitch + Call(SetActionHudPrepareTime, 10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 45, 60, 0) + Call(SetBattleCamOffsetZ, 0) + Call(SetBattleCamZoom, 400) + Call(MoveBattleCamOver, 30) + Call(InitTargetIterator) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Run) + Call(AddGoalPos, ACTOR_PARTNER, 60, 20, 0) + Call(FlyToGoal, ACTOR_PARTNER, 30, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Idle) + Wait(10) + Call(GetActorLevel, ACTOR_PARTNER, LVar0) + Switch(LVar0) + CaseEq(0) + Set(LVarA, 60 * DT) + CaseEq(1) + Set(LVarA, 60 * DT) + CaseEq(2) + Set(LVarA, 60 * DT) + EndSwitch + Set(LVarB, LVarA) + Add(LVarB, -3) + Call(action_command_spiny_surge_start, 0, LVarB, 3) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + Call(InitTargetIterator) + Call(SetActorVar, ACTOR_PARTNER, AVAR_Unk_0, 0) + Set(LVar9, 0) + Set(LFlag2, FALSE) + Set(LFlag3, FALSE) + Loop(LVarA) + Call(GetActionQuality, LVar0) + IfEq(LVar9, 2) + Set(LVar0, 3) + EndIf + Switch(LVar0) + CaseEq(-1) + Set(LVar9, 0) + Call(SetPartFlagBits, ACTOR_PARTNER, 2, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Idle) + CaseEq(1) + IfEq(LVar9, 1) + BreakSwitch + EndIf + Call(SetPartFlagBits, ACTOR_PARTNER, 2, ACTOR_PART_FLAG_INVISIBLE, FALSE) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar0, 3) + Add(LVar1, 34) + Add(LVar2, 5) + Call(SetPartPos, ACTOR_PARTNER, 2, LVar0, LVar1, LVar2) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_LiftSpiny) + Set(LVar9, 1) + CaseEq(2) + IfEq(LVar9, 0) + BreakSwitch + EndIf + IfEq(LFlag2, FALSE) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_LAKILESTER_THROW_SPINY_A) + Set(LFlag2, TRUE) + Else + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_LAKILESTER_THROW_SPINY_B) + Set(LFlag2, FALSE) + EndIf + Call(N(ThrowSpinyFX)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_ThrowSpinyAlt) + Call(SetPartFlagBits, ACTOR_PARTNER, 2, ACTOR_PART_FLAG_INVISIBLE, TRUE) + ChildThread + Call(GetActorVar, ACTOR_PARTNER, AVAR_Unk_0, LVar0) + Add(LVar0, 1) + Call(SetActorVar, ACTOR_PARTNER, AVAR_Unk_0, LVar0) + Wait(15) + Call(GetActorVar, ACTOR_PARTNER, AVAR_Unk_0, LVar0) + Sub(LVar0, 1) + Call(SetActorVar, ACTOR_PARTNER, AVAR_Unk_0, LVar0) + EndChildThread + Set(LFlag3, TRUE) + Set(LVar9, 0) + EndSwitch + Wait(1) + EndLoop + Call(SetPartFlagBits, ACTOR_PARTNER, 2, ACTOR_PART_FLAG_INVISIBLE, TRUE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Idle) + Loop(0) + Call(GetActorVar, ACTOR_PARTNER, AVAR_Unk_0, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Wait(10) + IfEq(LFlag3, FALSE) + Set(LVar0, 0) + Set(LVarF, 0) + Wait(15) + Goto(13) + EndIf + Call(InitTargetIterator) + Label(0) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, HIT_RESULT_MISS) + Goto(12) + EndIf + Call(GetPartnerActionSuccess, LVarA) + Call(N(GetSpinySurgeDamage)) + Switch(LVar0) + CaseGt(0) + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_SPINY_SURGE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_SPINY_SURGE | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseGt(0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_04) + CaseDefault + Call(UseBattleCamPreset, BTL_CAM_PRESET_51) + EndSwitch + Wait(6) + Label(12) + Call(ChooseNextTarget, ITER_NEXT, LVar1) + IfNe(LVar1, ITER_NO_MORE) + Goto(0) + EndIf + Wait(30) + Label(13) + Switch(LVar0) + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + ExecWait(N(returnHome2)) + EndCaseGroup + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(cloudNine_normal) = { - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_SHOW_PLAYER_DECORATIONS, FALSE) - EVT_CALL(SetActorFlagBits, ACTOR_PLAYER, ACTOR_FLAG_NO_INACTIVE_ANIM, TRUE) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_WATER_BLOCK) - EVT_CALL(action_command_water_block_init, 2) - EVT_CALL(SetActionHudPrepareTime, 50) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_10) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamOffsetZ, 17) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(func_8024EDA4) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 40) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 30, 0, EASING_COS_IN_OUT) - EVT_END_THREAD - EVT_WAIT(15) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 18) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_CloudNineBegin) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_CloudNineIdle) - EVT_WAIT(15) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -12) - EVT_ADD(LVar1, 13) - EVT_ADD(LVar2, -5) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_FightingStance) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 18, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_FightingStance) - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(action_command_water_block_start, 0, 97, 3) - EVT_CALL(AddBattleCamZoom, -75) - EVT_CALL(MoveBattleCamOver, 100) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) - EVT_WAIT(100) - EVT_WAIT(3) - EVT_CALL(AddBattleCamZoom, 50) - EVT_CALL(MoveBattleCamOver, 5) - EVT_CALL(GetPartnerActionSuccess, LVarA) - EVT_IF_GT(LVarA, 0) - EVT_CALL(N(RemoveCloudNineFX)) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_LAKILESTER_MAKE_CLOUD_NINE) - EVT_CALL(N(SpawnCloudNineFX)) - EVT_CALL(N(ApplyCloudNine)) - EVT_CALL(SetActorFlagBits, ACTOR_PLAYER, ACTOR_FLAG_SHOW_STATUS_ICONS, TRUE) - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_CloudNineEnd) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) - EVT_LOOP(10) - EVT_SET(LVar0, LVar3) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_CALL(RandInt, 40, LVar6) - EVT_SUB(LVar6, 20) - EVT_ADD(LVar0, LVar6) - EVT_CALL(RandInt, 30, LVar6) - EVT_SUB(LVar6, 15) - EVT_ADD(LVar1, LVar6) - EVT_PLAY_EFFECT(EFFECT_FLOATING_CLOUD_PUFF, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 20, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_FightingStance) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(PlayerFallToGoal, 10) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Walk) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_FightingStance) - EVT_WAIT(7) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_THREAD - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(PlayerRunToGoal, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(SetActorFlagBits, ACTOR_PLAYER, ACTOR_FLAG_NO_INACTIVE_ANIM, FALSE) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 40) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 30, 0, EASING_COS_IN_OUT) - EVT_END_THREAD - EVT_WAIT(15) - EVT_SET(LVar0, 180) - EVT_LOOP(10) - EVT_SUB(LVar0, 18) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(10) - EVT_IF_GT(LVarA, 0) - EVT_CALL(ShowMessageBox, BTL_MSG_CLOUD_NINE_BEGIN, 60) - EVT_CALL(WaitForMessageBoxDone) - EVT_END_IF - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_SHOW_PLAYER_DECORATIONS, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(SetBattleFlagBits, BS_FLAGS1_SHOW_PLAYER_DECORATIONS, FALSE) + Call(SetActorFlagBits, ACTOR_PLAYER, ACTOR_FLAG_NO_INACTIVE_ANIM, TRUE) + Call(LoadActionCommand, ACTION_COMMAND_WATER_BLOCK) + Call(action_command_water_block_init, 2) + Call(SetActionHudPrepareTime, 50) + Call(InitTargetIterator) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_10) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamOffsetZ, 17) + Call(SetBattleCamZoom, 300) + Call(MoveBattleCamOver, 30) + Call(func_8024EDA4) + Wait(10) + Thread + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 40) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_PARTNER, 30, 0, EASING_COS_IN_OUT) + EndThread + Wait(15) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 18) + Call(SetActorYaw, ACTOR_PARTNER, LVar0) + Wait(1) + EndLoop + Wait(10) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_CloudNineBegin) + Wait(5) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_CloudNineIdle) + Wait(15) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar0, -12) + Add(LVar1, 13) + Add(LVar2, -5) + Call(SetActorSpeed, ACTOR_PLAYER, Float(4.0)) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.0)) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_FightingStance) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 18, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_FightingStance) + Wait(3) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(action_command_water_block_start, 0, 97, 3) + Call(AddBattleCamZoom, -75) + Call(MoveBattleCamOver, 100) + Call(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) + Wait(100) + Wait(3) + Call(AddBattleCamZoom, 50) + Call(MoveBattleCamOver, 5) + Call(GetPartnerActionSuccess, LVarA) + IfGt(LVarA, 0) + Call(N(RemoveCloudNineFX)) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_LAKILESTER_MAKE_CLOUD_NINE) + Call(N(SpawnCloudNineFX)) + Call(N(ApplyCloudNine)) + Call(SetActorFlagBits, ACTOR_PLAYER, ACTOR_FLAG_SHOW_STATUS_ICONS, TRUE) + EndIf + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_CloudNineEnd) + Thread + Call(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) + Loop(10) + Set(LVar0, LVar3) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Call(RandInt, 40, LVar6) + Sub(LVar6, 20) + Add(LVar0, LVar6) + Call(RandInt, 30, LVar6) + Sub(LVar6, 15) + Add(LVar1, LVar6) + PlayEffect(EFFECT_FLOATING_CLOUD_PUFF, 0, LVar0, LVar1, LVar2, Float(1.0), 20, 0) + Wait(1) + EndLoop + EndThread + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_FightingStance) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(PlayerFallToGoal, 10) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Walk) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_FightingStance) + Wait(7) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Thread + Call(SetGoalToHome, ACTOR_PLAYER) + Call(SetActorSpeed, ACTOR_PLAYER, Float(8.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(PlayerRunToGoal, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(SetActorFlagBits, ACTOR_PLAYER, ACTOR_FLAG_NO_INACTIVE_ANIM, FALSE) + EndThread + Thread + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Sub(LVar1, 40) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_PARTNER, 30, 0, EASING_COS_IN_OUT) + EndThread + Wait(15) + Set(LVar0, 180) + Loop(10) + Sub(LVar0, 18) + Call(SetActorYaw, ACTOR_PARTNER, LVar0) + Wait(1) + EndLoop + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Wait(10) + IfGt(LVarA, 0) + Call(ShowMessageBox, BTL_MSG_CLOUD_NINE_BEGIN, 60) + Call(WaitForMessageBoxDone) + EndIf + Call(SetBattleFlagBits, BS_FLAGS1_SHOW_PLAYER_DECORATIONS, TRUE) + Return + End }; EvtScript N(cloudNine_immobile) = { - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_WATER_BLOCK) - EVT_CALL(action_command_water_block_init, 2) - EVT_CALL(SetActionHudPrepareTime, 50) - EVT_CALL(N(RemoveCloudNineFX)) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_10) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(SetBattleCamZoom, 300) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(func_8024EDA4) - EVT_WAIT(10) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 18) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_CloudNineBegin) - EVT_WAIT(20) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 12) - EVT_ADD(LVar1, -7) - EVT_ADD(LVar2, 5) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 20, -10, EASING_COS_IN_OUT) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 40) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_PLAYER, 20, 0, EASING_COS_IN_OUT) - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 40) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 20, 0, EASING_COS_IN_OUT) - EVT_CALL(action_command_water_block_start, 0, 97, 3) - EVT_CALL(AddBattleCamZoom, -75) - EVT_CALL(MoveBattleCamOver, 100) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) - EVT_WAIT(100) - EVT_WAIT(3) - EVT_CALL(AddBattleCamZoom, 50) - EVT_CALL(MoveBattleCamOver, 5) - EVT_CALL(GetPartnerActionSuccess, LVarA) - EVT_IF_GT(LVarA, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_LAKILESTER_MAKE_CLOUD_NINE) - EVT_CALL(N(SpawnCloudNineFX)) - EVT_CALL(N(ApplyCloudNine)) - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_CloudNineEnd) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) - EVT_LOOP(10) - EVT_SET(LVar0, LVar3) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_CALL(RandInt, 40, LVar6) - EVT_SUB(LVar6, 20) - EVT_ADD(LVar0, LVar6) - EVT_CALL(RandInt, 30, LVar6) - EVT_SUB(LVar6, 15) - EVT_ADD(LVar1, LVar6) - EVT_PLAY_EFFECT(EFFECT_FLOATING_CLOUD_PUFF, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 20, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(FallToGoal, ACTOR_PLAYER, 10) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Walk) - EVT_THREAD - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(PlayerRunToGoal, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 20, 0, EASING_COS_IN_OUT) - EVT_END_THREAD - EVT_SET(LVar0, 180) - EVT_LOOP(10) - EVT_SUB(LVar0, 18) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PartnerYieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(10) - EVT_IF_GT(LVarA, 0) - EVT_CALL(ShowMessageBox, BTL_MSG_CLOUD_NINE_BEGIN, 60) - EVT_CALL(WaitForMessageBoxDone) - EVT_END_IF - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(LoadActionCommand, ACTION_COMMAND_WATER_BLOCK) + Call(action_command_water_block_init, 2) + Call(SetActionHudPrepareTime, 50) + Call(N(RemoveCloudNineFX)) + Call(InitTargetIterator) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(UseBattleCamPreset, BTL_CAM_PRESET_10) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(SetBattleCamOffsetZ, 0) + Call(SetBattleCamZoom, 300) + Call(MoveBattleCamOver, 30) + Call(func_8024EDA4) + Wait(10) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 18) + Call(SetActorYaw, ACTOR_PARTNER, LVar0) + Wait(1) + EndLoop + Wait(10) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_CloudNineBegin) + Wait(20) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 12) + Add(LVar1, -7) + Add(LVar2, 5) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_PARTNER, 20, -10, EASING_COS_IN_OUT) + Thread + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 40) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_PLAYER, 20, 0, EASING_COS_IN_OUT) + EndThread + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 40) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_PARTNER, 20, 0, EASING_COS_IN_OUT) + Call(action_command_water_block_start, 0, 97, 3) + Call(AddBattleCamZoom, -75) + Call(MoveBattleCamOver, 100) + Call(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) + Wait(100) + Wait(3) + Call(AddBattleCamZoom, 50) + Call(MoveBattleCamOver, 5) + Call(GetPartnerActionSuccess, LVarA) + IfGt(LVarA, 0) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_LAKILESTER_MAKE_CLOUD_NINE) + Call(N(SpawnCloudNineFX)) + Call(N(ApplyCloudNine)) + EndIf + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_CloudNineEnd) + Thread + Call(GetActorPos, ACTOR_PLAYER, LVar3, LVar4, LVar5) + Loop(10) + Set(LVar0, LVar3) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Call(RandInt, 40, LVar6) + Sub(LVar6, 20) + Add(LVar0, LVar6) + Call(RandInt, 30, LVar6) + Sub(LVar6, 15) + Add(LVar1, LVar6) + PlayEffect(EFFECT_FLOATING_CLOUD_PUFF, 0, LVar0, LVar1, LVar2, Float(1.0), 20, 0) + Wait(1) + EndLoop + EndThread + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(FallToGoal, ACTOR_PLAYER, 10) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Walk) + Thread + Call(SetGoalToHome, ACTOR_PLAYER) + Call(SetActorSpeed, ACTOR_PLAYER, Float(8.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(PlayerRunToGoal, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + EndThread + Thread + Call(SetGoalToHome, ACTOR_PARTNER) + Call(FlyToGoal, ACTOR_PARTNER, 20, 0, EASING_COS_IN_OUT) + EndThread + Set(LVar0, 180) + Loop(10) + Sub(LVar0, 18) + Call(SetActorYaw, ACTOR_PARTNER, LVar0) + Wait(1) + EndLoop + Call(PartnerYieldTurn) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 30) + Wait(10) + IfGt(LVarA, 0) + Call(ShowMessageBox, BTL_MSG_CLOUD_NINE_BEGIN, 60) + Call(WaitForMessageBoxDone) + EndIf + Return + End }; EvtScript N(EVS_Move_CloudNine) = { - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_EXEC_WAIT(N(cloudNine_immobile)) - EVT_ELSE - EVT_EXEC_WAIT(N(cloudNine_normal)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + ExecWait(N(cloudNine_immobile)) + Else + ExecWait(N(cloudNine_normal)) + EndIf + Return + End }; enum { @@ -1713,87 +1713,87 @@ API_CALLABLE(N(IsHurricaneActive)) { } EvtScript N(EVS_Move_Hurricane) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_HURRICANE) - EVT_CALL(action_command_hurricane_init) - EVT_CALL(SetupMashMeter, 1, 100, 0, 0, 0, 0) - EVT_CALL(SetActionHudPrepareTime, 15) - EVT_CALL(SetDamageSource, DMG_SRC_HURRICANE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, -45, 54, 0) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(SetBattleCamZoom, 280) - EVT_CALL(MoveBattleCamOver, 40) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Run) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, 40, 20, 0) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Idle) - EVT_WAIT(15) - EVT_CALL(N(InitHurricane)) - EVT_CALL(action_command_hurricane_start, 0, 147 * DT, 3, LVar0) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_CALL(SetActorRotationOffset, ACTOR_PARTNER, 0, 20, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 35, 54, 0) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(SetBattleCamZoom, 430) - EVT_CALL(MoveBattleCamOver, 150 * DT) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_LAKILESTER_HURRICANE_WIND) - EVT_THREAD - EVT_CALL(N(ProcessHurricane)) - EVT_END_THREAD - EVT_WAIT(2) - EVT_LOOP(150 * DT) - EVT_CALL(N(IsHurricaneActive)) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(GetActionSuccessCopy, LVar0) - EVT_IF_EQ(LVar0, 100) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(15) - EVT_CALL(GetActionSuccessCopy, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(99) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_04) - EVT_CASE_DEFAULT - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_51) - EVT_END_SWITCH - EVT_CALL(InitTargetIterator) - EVT_LABEL(10) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(N(CanTargetBeBlown)) - EVT_IF_GT(LVar0, 0) - EVT_SET(LVarA, LVar0) - EVT_THREAD - EVT_CALL(N(BlowTargetAway)) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_STAR_POINTS_DROPPED, TRUE) - EVT_CALL(RemoveActor, LVarA) - EVT_END_THREAD - EVT_ELSE - EVT_IF_EQ(LVar0, 0) - EVT_CALL(PartnerDamageEnemy, LVar2, DAMAGE_TYPE_NO_CONTACT, 0, 0, 0, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_FORCE_IMMUNE_HIT) - EVT_END_IF - EVT_END_IF - EVT_LABEL(11) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(10) - EVT_END_IF - EVT_WAIT(34) - EVT_CALL(SetActorRotation, ACTOR_PARTNER, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Walk) - EVT_CALL(N(AllEnemiesBlownAway)) - EVT_CALL(PartnerYieldTurn) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_HURRICANE) + Call(action_command_hurricane_init) + Call(SetupMashMeter, 1, 100, 0, 0, 0, 0) + Call(SetActionHudPrepareTime, 15) + Call(SetDamageSource, DMG_SRC_HURRICANE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, -45, 54, 0) + Call(SetBattleCamOffsetZ, 0) + Call(SetBattleCamZoom, 280) + Call(MoveBattleCamOver, 40) + Call(InitTargetIterator) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Run) + Call(AddGoalPos, ACTOR_PARTNER, 40, 20, 0) + Call(FlyToGoal, ACTOR_PARTNER, 30, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Idle) + Wait(15) + Call(N(InitHurricane)) + Call(action_command_hurricane_start, 0, 147 * DT, 3, LVar0) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + Call(SetActorRotationOffset, ACTOR_PARTNER, 0, 20, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 35, 54, 0) + Call(SetBattleCamOffsetZ, 0) + Call(SetBattleCamZoom, 430) + Call(MoveBattleCamOver, 150 * DT) + Call(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_LAKILESTER_HURRICANE_WIND) + Thread + Call(N(ProcessHurricane)) + EndThread + Wait(2) + Loop(150 * DT) + Call(N(IsHurricaneActive)) + IfEq(LVar0, 0) + BreakLoop + EndIf + Call(GetActionSuccessCopy, LVar0) + IfEq(LVar0, 100) + BreakLoop + EndIf + Wait(1) + EndLoop + Wait(15) + Call(GetActionSuccessCopy, LVar0) + Switch(LVar0) + CaseGt(99) + Call(UseBattleCamPreset, BTL_CAM_PRESET_04) + CaseDefault + Call(UseBattleCamPreset, BTL_CAM_PRESET_51) + EndSwitch + Call(InitTargetIterator) + Label(10) + Call(SetGoalToTarget, ACTOR_SELF) + Call(N(CanTargetBeBlown)) + IfGt(LVar0, 0) + Set(LVarA, LVar0) + Thread + Call(N(BlowTargetAway)) + Call(SetBattleFlagBits, BS_FLAGS1_STAR_POINTS_DROPPED, TRUE) + Call(RemoveActor, LVarA) + EndThread + Else + IfEq(LVar0, 0) + Call(PartnerDamageEnemy, LVar2, DAMAGE_TYPE_NO_CONTACT, 0, 0, 0, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_FORCE_IMMUNE_HIT) + EndIf + EndIf + Label(11) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(10) + EndIf + Wait(34) + Call(SetActorRotation, ACTOR_PARTNER, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0) + ExecWait(N(EVS_ReturnHome)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Walk) + Call(N(AllEnemiesBlownAway)) + Call(PartnerYieldTurn) + Return + End }; MATCHING_BSS(0xCC0); diff --git a/src/battle/partner/parakarry.c b/src/battle/partner/parakarry.c index 9f7741e67a2..bb21a1b9c5d 100644 --- a/src/battle/partner/parakarry.c +++ b/src/battle/partner/parakarry.c @@ -697,606 +697,606 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_PARTNER, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_PARTNER, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_PARTNER, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_PARTNER, EVT_PTR(N(EVS_HandlePhase))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_PARTNER, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_PARTNER, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_PARTNER, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_PARTNER, Ref(N(EVS_HandlePhase))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(GetLastEvent, ACTOR_PARTNER, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_HurtStill) - EVT_SET_CONST(LVar2, ANIM_BattleParakarry_HurtStill) - EVT_EXEC_WAIT(EVS_Partner_Hit) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_HurtStill) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_HurtStill) - EVT_EXEC_WAIT(EVS_Partner_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIKE_CONTACT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_HurtStill) - EVT_SET(LVar2, 22) - EVT_EXEC_WAIT(EVS_Partner_SpikeContact) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_HurtStill) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_BURN_CONTACT) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_BurnHurt) - EVT_SET(LVar2, 22) - EVT_SET_CONST(LVar3, ANIM_BattleParakarry_BurnStill) - EVT_EXEC_WAIT(EVS_Partner_BurnContact) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_HurtStill) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_OR_EQ(EVENT_BURN_HIT) - EVT_CASE_OR_EQ(EVENT_15) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleParakarry_BurnStill) - EVT_EXEC_WAIT(EVS_Partner_BurnHit) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_HurtStill) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_HurtStill) - EVT_SET(LVar2, 22) - EVT_EXEC_WAIT(EVS_Partner_ShockHit) - EVT_CASE_EQ(EVENT_33) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_HurtStill) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_RECOVER_FROM_KO) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_Walk) - EVT_SET_CONST(LVar2, ANIM_BattleParakarry_Run) - EVT_SET(LVar3, 30) - EVT_EXEC_WAIT(EVS_Partner_Recover) - EVT_CASE_OR_EQ(EVENT_18) - EVT_CASE_OR_EQ(EVENT_BLOCK) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_OrientShell) - EVT_EXEC_WAIT(EVS_Partner_NoDamageHit) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_ExitShell) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(CloseActionCommandInfo) + Call(GetLastEvent, ACTOR_PARTNER, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar1, ANIM_BattleParakarry_HurtStill) + SetConst(LVar2, ANIM_BattleParakarry_HurtStill) + ExecWait(EVS_Partner_Hit) + SetConst(LVar1, ANIM_BattleParakarry_HurtStill) + ExecWait(EVS_Partner_Drop) + EndCaseGroup + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_HurtStill) + ExecWait(EVS_Partner_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_SPIKE_CONTACT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_HurtStill) + Set(LVar2, 22) + ExecWait(EVS_Partner_SpikeContact) + SetConst(LVar1, ANIM_BattleParakarry_HurtStill) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_BURN_CONTACT) + SetConst(LVar1, ANIM_BattleParakarry_BurnHurt) + Set(LVar2, 22) + SetConst(LVar3, ANIM_BattleParakarry_BurnStill) + ExecWait(EVS_Partner_BurnContact) + SetConst(LVar1, ANIM_BattleParakarry_HurtStill) + ExecWait(EVS_Partner_Drop) + CaseOrEq(EVENT_BURN_HIT) + CaseOrEq(EVENT_15) + SetConst(LVar1, ANIM_BattleParakarry_BurnHurt) + SetConst(LVar2, ANIM_BattleParakarry_BurnStill) + ExecWait(EVS_Partner_BurnHit) + SetConst(LVar1, ANIM_BattleParakarry_HurtStill) + ExecWait(EVS_Partner_Drop) + EndCaseGroup + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_HurtStill) + Set(LVar2, 22) + ExecWait(EVS_Partner_ShockHit) + CaseEq(EVENT_33) + SetConst(LVar1, ANIM_BattleParakarry_HurtStill) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_RECOVER_FROM_KO) + SetConst(LVar1, ANIM_BattleParakarry_Walk) + SetConst(LVar2, ANIM_BattleParakarry_Run) + Set(LVar3, 30) + ExecWait(EVS_Partner_Recover) + CaseOrEq(EVENT_18) + CaseOrEq(EVENT_BLOCK) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_OrientShell) + ExecWait(EVS_Partner_NoDamageHit) + Wait(10) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_ExitShell) + EndCaseGroup + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_FIRST_STRIKE) - EVT_EXEC_WAIT(N(firstStrike)) - EVT_CASE_EQ(PHASE_EXECUTE_ACTION) - EVT_EXEC_WAIT(N(EVS_ExecuteAction)) - EVT_CASE_EQ(PHASE_CELEBRATE) - EVT_EXEC_WAIT(N(EVS_Celebrate)) - EVT_CASE_EQ(PHASE_RUN_AWAY_START) - EVT_EXEC_WAIT(N(runAway)) - EVT_CASE_EQ(PHASE_RUN_AWAY_FAIL) - EVT_EXEC_WAIT(N(runAwayFail)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_FIRST_STRIKE) + ExecWait(N(firstStrike)) + CaseEq(PHASE_EXECUTE_ACTION) + ExecWait(N(EVS_ExecuteAction)) + CaseEq(PHASE_CELEBRATE) + ExecWait(N(EVS_Celebrate)) + CaseEq(PHASE_RUN_AWAY_START) + ExecWait(N(runAway)) + CaseEq(PHASE_RUN_AWAY_FAIL) + ExecWait(N(runAwayFail)) + EndSwitch + Return + End }; EvtScript N(EVS_Celebrate) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_Celebrate) - EVT_SET_CONST(LVar2, ANIM_BattleParakarry_Walk) - EVT_SET_CONST(LVar3, ANIM_BattleParakarry_Idle) - EVT_EXEC_WAIT(EVS_Partner_Celebrate) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_Celebrate) + SetConst(LVar2, ANIM_BattleParakarry_Walk) + SetConst(LVar3, ANIM_BattleParakarry_Idle) + ExecWait(EVS_Partner_Celebrate) + Return + End }; EvtScript N(EVS_ExecuteAction) = { - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(BTL_MENU_TYPE_STAR_POWERS) - EVT_CALL(LoadStarPowerScript) - EVT_EXEC_WAIT(LVar0) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_SKY_DIVE1) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_SET(LVarE, 1) - EVT_SET(LVarF, 2) - EVT_EXEC_WAIT(N(skyDive)) - EVT_CASE_EQ(MOVE_SKY_DIVE2) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_SET(LVarE, 2) - EVT_SET(LVarF, 3) - EVT_EXEC_WAIT(N(skyDive)) - EVT_CASE_EQ(MOVE_SKY_DIVE3) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_SET(LVarE, 4) - EVT_SET(LVarF, 5) - EVT_EXEC_WAIT(N(skyDive)) - EVT_CASE_EQ(MOVE_SHELL_SHOT) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_EXEC_WAIT(N(shellShot)) - EVT_CASE_EQ(MOVE_AIR_LIFT) - EVT_EXEC_WAIT(N(airLift)) - EVT_CASE_EQ(MOVE_AIR_RAID) - EVT_EXEC_WAIT(N(airRaid)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(ShowActionHud, TRUE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar0) + CaseEq(BTL_MENU_TYPE_STAR_POWERS) + Call(LoadStarPowerScript) + ExecWait(LVar0) + Return + EndSwitch + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar2) + CaseEq(MOVE_SKY_DIVE1) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + Set(LVarE, 1) + Set(LVarF, 2) + ExecWait(N(skyDive)) + CaseEq(MOVE_SKY_DIVE2) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + Set(LVarE, 2) + Set(LVarF, 3) + ExecWait(N(skyDive)) + CaseEq(MOVE_SKY_DIVE3) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + Set(LVarE, 4) + Set(LVarF, 5) + ExecWait(N(skyDive)) + CaseEq(MOVE_SHELL_SHOT) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + ExecWait(N(shellShot)) + CaseEq(MOVE_AIR_LIFT) + ExecWait(N(airLift)) + CaseEq(MOVE_AIR_RAID) + ExecWait(N(airRaid)) + EndSwitch + Return + End }; EvtScript N(firstStrike) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(runAway) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleParakarry_Run) - EVT_EXEC_WAIT(EVS_Partner_RunAway) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleParakarry_Run) + ExecWait(EVS_Partner_RunAway) + Return + End }; EvtScript N(runAwayFail) = { - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Run) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, 0) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Walk) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(6.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Run) + Call(SetActorYaw, ACTOR_PARTNER, 0) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Walk) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(returnHome2) = { - EVT_CALL(PartnerYieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_04) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, LVarA) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.4)) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, -50, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 15, FALSE, FALSE, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Still) - EVT_CHILD_THREAD - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Run) - EVT_END_CHILD_THREAD - EVT_CALL(AddGoalPos, ACTOR_PARTNER, -30, 0, 0) - EVT_CALL(JumpWithBounce, ACTOR_PARTNER, 5, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Idle) - EVT_WAIT(2) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Run) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 0, -5, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Walk) - EVT_RETURN - EVT_END + Call(PartnerYieldTurn) + Call(UseBattleCamPreset, BTL_CAM_PRESET_04) + Call(SetAnimation, ACTOR_PARTNER, -1, LVarA) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.4)) + Call(AddGoalPos, ACTOR_PARTNER, -50, 0, 0) + Call(JumpToGoal, ACTOR_PARTNER, 15, FALSE, FALSE, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Still) + ChildThread + Wait(4) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Run) + EndChildThread + Call(AddGoalPos, ACTOR_PARTNER, -30, 0, 0) + Call(JumpWithBounce, ACTOR_PARTNER, 5, Float(4.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Idle) + Wait(2) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(8.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Run) + Call(FlyToGoal, ACTOR_PARTNER, 0, -5, EASING_LINEAR) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Walk) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(PartnerYieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_51) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, LVarA) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.0)) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, -30, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 15, FALSE, FALSE, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Still) - EVT_CHILD_THREAD - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Run) - EVT_END_CHILD_THREAD - EVT_CALL(AddGoalPos, ACTOR_PARTNER, -20, 0, 0) - EVT_CALL(JumpWithBounce, ACTOR_PARTNER, 5, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Idle) - EVT_WAIT(2) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Run) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 0, -5, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Walk) - EVT_RETURN - EVT_END + Call(PartnerYieldTurn) + Call(UseBattleCamPreset, BTL_CAM_PRESET_51) + Call(SetAnimation, ACTOR_PARTNER, -1, LVarA) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.0)) + Call(AddGoalPos, ACTOR_PARTNER, -30, 0, 0) + Call(JumpToGoal, ACTOR_PARTNER, 15, FALSE, FALSE, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Still) + ChildThread + Wait(4) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Run) + EndChildThread + Call(AddGoalPos, ACTOR_PARTNER, -20, 0, 0) + Call(JumpWithBounce, ACTOR_PARTNER, 5, Float(4.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Idle) + Wait(2) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(8.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Run) + Call(FlyToGoal, ACTOR_PARTNER, 0, -5, EASING_LINEAR) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Walk) + Return + End }; s32 N(actionCommandTable)[] = { 7, 6, 5, 4, 3, 2, 1, 0 }; EvtScript N(skyDive) = { - EVT_CALL(EnableIdleScript, ACTOR_PARTNER, IDLE_SCRIPT_DISABLE) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP) - EVT_CALL(action_command_jump_init) - EVT_CALL(SetActionDifficultyTable, EVT_PTR(N(actionCommandTable))) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Run) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, -20, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(5.0)) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 0, -10, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Still) - EVT_WAIT(3) - EVT_CALL(action_command_jump_start, 32, 3) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_PARAKARRY_PREDIVE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_FlyFast) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, 0, 10, 0) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 5, 0, EASING_LINEAR) - EVT_WAIT(2) - EVT_CHILD_THREAD - EVT_WAIT(3) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_PreDive) - EVT_END_CHILD_THREAD - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, -26, 25, 0) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 20, -20, EASING_QUARTIC_OUT) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_PARAKARRY_DIVE) - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, -10, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Dive) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 5, 0, EASING_LINEAR) - EVT_CALL(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_CHILD_THREAD - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Idle) - EVT_END_CHILD_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, 40, 10, 0) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 10, -20, EASING_QUADRATIC_OUT) - EVT_WAIT(20) - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Run) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 0, -5, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Walk) - EVT_RETURN - EVT_END_IF - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_PostDive) - EVT_WAIT(2) - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_CALL(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_SET_CONST(LVarA, ANIM_BattleParakarry_Think) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_SET_CONST(LVarA, ANIM_BattleParakarry_Dive) - EVT_EXEC_WAIT(N(returnHome2)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableIdleScript, ACTOR_PARTNER, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_RETURN - EVT_END + Call(EnableIdleScript, ACTOR_PARTNER, IDLE_SCRIPT_DISABLE) + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(LoadActionCommand, ACTION_COMMAND_JUMP) + Call(action_command_jump_init) + Call(SetActionDifficultyTable, Ref(N(actionCommandTable))) + Call(UseBattleCamPreset, BTL_CAM_PRESET_52) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(InitTargetIterator) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Run) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(AddGoalPos, ACTOR_PARTNER, -20, 0, 0) + Call(SetActorSpeed, ACTOR_PARTNER, Float(5.0)) + Call(FlyToGoal, ACTOR_PARTNER, 0, -10, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Still) + Wait(3) + Call(action_command_jump_start, 32, 3) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_PARAKARRY_PREDIVE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_52) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_FlyFast) + Call(AddGoalPos, ACTOR_PARTNER, 0, 10, 0) + Call(FlyToGoal, ACTOR_PARTNER, 5, 0, EASING_LINEAR) + Wait(2) + ChildThread + Wait(3) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_PreDive) + EndChildThread + Call(UseBattleCamPreset, BTL_CAM_PRESET_52) + Call(AddGoalPos, ACTOR_PARTNER, -26, 25, 0) + Call(FlyToGoal, ACTOR_PARTNER, 20, -20, EASING_QUARTIC_OUT) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_PARAKARRY_DIVE) + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(AddGoalPos, ACTOR_PARTNER, -10, 0, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Dive) + Call(FlyToGoal, ACTOR_PARTNER, 5, 0, EASING_LINEAR) + Call(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, HIT_RESULT_MISS) + ChildThread + Wait(5) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Idle) + EndChildThread + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(AddGoalPos, ACTOR_PARTNER, 40, 10, 0) + Call(FlyToGoal, ACTOR_PARTNER, 10, -20, EASING_QUADRATIC_OUT) + Wait(20) + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(8.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Run) + Call(FlyToGoal, ACTOR_PARTNER, 0, -5, EASING_LINEAR) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Walk) + Return + EndIf + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_PostDive) + Wait(2) + Call(GetPartnerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(0) + Call(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + SetConst(LVarA, ANIM_BattleParakarry_Think) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + SetConst(LVarA, ANIM_BattleParakarry_Dive) + ExecWait(N(returnHome2)) + EndCaseGroup + EndSwitch + Call(EnableIdleScript, ACTOR_PARTNER, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Return + End }; EvtScript N(shellShot) = { - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_EnterShell) - EVT_WAIT(15) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_ShellFly) - EVT_CALL(N(ShellShotActionCommand)) - EVT_CALL(StopSound, SOUND_AIM_SHELL_SHOT) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_PARAKARRY_SHELL_SHOT) - EVT_CALL(GetActionQuality, LVar0) - EVT_CALL(PartnerTestEnemy, LVarA, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVarA, HIT_RESULT_MISS) - EVT_SET(LVar0, -2) - EVT_END_IF - EVT_SWITCH(LVar0) - EVT_CASE_EQ(1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52) - EVT_CALL(MoveBattleCamOver, 5) - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_ShellFlyFastest) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 7, 0, EASING_LINEAR) - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE) - EVT_CASE_EQ(-1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52) - EVT_CALL(MoveBattleCamOver, 5) - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, 50, -50, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_ShellFlyFastest) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 7, 0, 0x00000064) - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE) - EVT_CASE_EQ(0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52) - EVT_CALL(MoveBattleCamOver, 5) - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, 50, 50, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_ShellFlyFastest) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 7, 0, EASING_LINEAR) - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE) - EVT_CASE_EQ(-2) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52) - EVT_CALL(MoveBattleCamOver, 5) - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, 40, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_ShellFlyFastest) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 7, 0, EASING_LINEAR) - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE) - EVT_END_SWITCH - EVT_CALL(N(GetShellShotDamage)) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_CALL(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENTS_KOOPER_DAMAGE, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_HIT_RATTLE) - EVT_CASE_DEFAULT - EVT_SET(LVar0, HIT_RESULT_NO_DAMAGE) - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) - EVT_LABEL(10) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_SET_CONST(LVarA, ANIM_BattleParakarry_HurtStill) - EVT_ELSE - EVT_SET_CONST(LVarA, ANIM_BattleParakarry_Think) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_SET_CONST(LVarA, ANIM_BattleParakarry_ShellFly) - EVT_EXEC_WAIT(N(returnHome2)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_EnterShell) + Wait(15) + Call(InitTargetIterator) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_ShellFly) + Call(N(ShellShotActionCommand)) + Call(StopSound, SOUND_AIM_SHELL_SHOT) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_PARAKARRY_SHELL_SHOT) + Call(GetActionQuality, LVar0) + Call(PartnerTestEnemy, LVarA, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVarA, HIT_RESULT_MISS) + Set(LVar0, -2) + EndIf + Switch(LVar0) + CaseEq(1) + Call(UseBattleCamPreset, BTL_CAM_PRESET_52) + Call(MoveBattleCamOver, 5) + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_ShellFlyFastest) + Call(FlyToGoal, ACTOR_PARTNER, 7, 0, EASING_LINEAR) + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE) + CaseEq(-1) + Call(UseBattleCamPreset, BTL_CAM_PRESET_52) + Call(MoveBattleCamOver, 5) + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(AddGoalPos, ACTOR_PARTNER, 50, -50, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_ShellFlyFastest) + Call(FlyToGoal, ACTOR_PARTNER, 7, 0, 0x00000064) + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE) + CaseEq(0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_52) + Call(MoveBattleCamOver, 5) + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(AddGoalPos, ACTOR_PARTNER, 50, 50, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_ShellFlyFastest) + Call(FlyToGoal, ACTOR_PARTNER, 7, 0, EASING_LINEAR) + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE) + CaseEq(-2) + Call(UseBattleCamPreset, BTL_CAM_PRESET_52) + Call(MoveBattleCamOver, 5) + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(AddGoalPos, ACTOR_PARTNER, 40, 0, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_ShellFlyFastest) + Call(FlyToGoal, ACTOR_PARTNER, 7, 0, EASING_LINEAR) + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE) + EndSwitch + Call(N(GetShellShotDamage)) + Switch(LVar0) + CaseGt(0) + Call(PartnerDamageEnemy, LVar0, 0, SUPPRESS_EVENTS_KOOPER_DAMAGE, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_HIT_RATTLE) + CaseDefault + Set(LVar0, HIT_RESULT_NO_DAMAGE) + EndSwitch + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) + Label(10) + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + IfEq(LFlag0, TRUE) + SetConst(LVarA, ANIM_BattleParakarry_HurtStill) + Else + SetConst(LVarA, ANIM_BattleParakarry_Think) + EndIf + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + SetConst(LVarA, ANIM_BattleParakarry_ShellFly) + ExecWait(N(returnHome2)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(airLift) = { - EVT_CALL(InitTargetIterator) - EVT_CALL(N(AirLiftChance)) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_AIR_LIFT) - EVT_CALL(action_command_air_lift_init, LVar0) - EVT_CALL(SetupMashMeter, 1, 100, 0, 0, 0, 0) - EVT_CALL(SetActionHudPrepareTime, 0) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(GetDistanceToGoal, ACTOR_PARTNER, LVar0) - EVT_DIV(LVar0, 4) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52) - EVT_CALL(SetBattleCamOffsetZ, 8) - EVT_CALL(MoveBattleCamOver, LVar0) - EVT_SUB(LVar0, 12) - EVT_IF_LT(LVar0, 0) - EVT_SET(LVar0, 0) - EVT_END_IF - EVT_CALL(SetActionHudPrepareTime, LVar0) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(5.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Run) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 0, -4, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Idle) - EVT_WAIT(15) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(AddBattleCamZoom, -160) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_LiftLight) - EVT_CALL(SetAnimationRate, ACTOR_PARTNER, 0, EVT_FLOAT(2.0)) - EVT_WAIT(2) - EVT_CALL(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_51) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 10, -10, EASING_COS_IN) - EVT_CALL(SetAnimationRate, ACTOR_PARTNER, 0, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Idle) - EVT_WAIT(10) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimationRate, ACTOR_PARTNER, 0, EVT_FLOAT(1.0)) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Run) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 0, 0, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Walk) - EVT_RETURN - EVT_END_IF - EVT_WAIT(3) - EVT_CALL(PartnerTestEnemy, LVar0, DAMAGE_TYPE_AIR_LIFT, SUPPRESS_EVENT_SPIKY_FRONT, 0, 0, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(N(AirLiftChance)) - EVT_IF_NE(LVar0, -1) - EVT_CALL(action_command_air_lift_start, 0, 87 * DT, 3, 0) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_CHILD_THREAD - EVT_WAIT(1) - EVT_CALL(GetActionQuality, LVar1) - EVT_DIV(LVar1, 10) - EVT_ADD(LVar1, 1) - EVT_LOOP(88 * DT) - EVT_CALL(GetActionQuality, LVar0) - EVT_SET(LVar2, LVar1) - EVT_MUL(LVar2, 10) - EVT_IF_GT(LVar0, LVar2) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(AddBattleCamZoom, -2) - EVT_CALL(MoveBattleCamOver, 10) - EVT_ADD(LVar1, 1) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_WAIT(90 * DT) - EVT_CALL(GetActionSuccessCopy, LVar0) - EVT_ELSE - EVT_CALL(CloseActionCommandInfo) - EVT_SET(LVar0, 0) - EVT_END_IF - EVT_SWITCH(LVar0) - EVT_CASE_EQ(1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(DispatchEvent, LVar0, EVENT_BLOW_AWAY) - EVT_CALL(N(CarryAway), LVar0) - EVT_WAIT(30) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_STAR_POINTS_DROPPED, TRUE) - EVT_CALL(RemoveActor, LVar0) - EVT_CASE_DEFAULT - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(DispatchEvent, LVar0, EVENT_AIR_LIFT_FAILED) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_51) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 5, -10, EASING_COS_IN) - EVT_CALL(SetAnimationRate, ACTOR_PARTNER, 0, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Idle) - EVT_WAIT(10) - EVT_END_SWITCH - EVT_CALL(PartnerYieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(12.0)) - EVT_CALL(SetAnimationRate, ACTOR_PARTNER, 0, EVT_FLOAT(1.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Run) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 0, 0, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Walk) - EVT_RETURN - EVT_END + Call(InitTargetIterator) + Call(N(AirLiftChance)) + Call(LoadActionCommand, ACTION_COMMAND_AIR_LIFT) + Call(action_command_air_lift_init, LVar0) + Call(SetupMashMeter, 1, 100, 0, 0, 0, 0) + Call(SetActionHudPrepareTime, 0) + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(GetDistanceToGoal, ACTOR_PARTNER, LVar0) + Div(LVar0, 4) + Call(UseBattleCamPreset, BTL_CAM_PRESET_52) + Call(SetBattleCamOffsetZ, 8) + Call(MoveBattleCamOver, LVar0) + Sub(LVar0, 12) + IfLt(LVar0, 0) + Set(LVar0, 0) + EndIf + Call(SetActionHudPrepareTime, LVar0) + Call(SetActorSpeed, ACTOR_PARTNER, Float(5.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Run) + Call(FlyToGoal, ACTOR_PARTNER, 0, -4, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Idle) + Wait(15) + Call(SetBattleCamOffsetZ, 0) + Call(AddBattleCamZoom, -160) + Call(MoveBattleCamOver, 20) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_LiftLight) + Call(SetAnimationRate, ACTOR_PARTNER, 0, Float(2.0)) + Wait(2) + Call(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, HIT_RESULT_MISS) + Call(CloseActionCommandInfo) + Call(UseBattleCamPreset, BTL_CAM_PRESET_51) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_PARTNER, 10, -10, EASING_COS_IN) + Call(SetAnimationRate, ACTOR_PARTNER, 0, Float(8.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Idle) + Wait(10) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(4.0)) + Call(SetAnimationRate, ACTOR_PARTNER, 0, Float(1.0)) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Run) + Call(FlyToGoal, ACTOR_PARTNER, 0, 0, EASING_LINEAR) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Walk) + Return + EndIf + Wait(3) + Call(PartnerTestEnemy, LVar0, DAMAGE_TYPE_AIR_LIFT, SUPPRESS_EVENT_SPIKY_FRONT, 0, 0, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + Call(N(AirLiftChance)) + IfNe(LVar0, -1) + Call(action_command_air_lift_start, 0, 87 * DT, 3, 0) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + ChildThread + Wait(1) + Call(GetActionQuality, LVar1) + Div(LVar1, 10) + Add(LVar1, 1) + Loop(88 * DT) + Call(GetActionQuality, LVar0) + Set(LVar2, LVar1) + Mul(LVar2, 10) + IfGt(LVar0, LVar2) + Call(SetBattleCamOffsetZ, 0) + Call(AddBattleCamZoom, -2) + Call(MoveBattleCamOver, 10) + Add(LVar1, 1) + EndIf + Wait(1) + EndLoop + EndChildThread + Wait(90 * DT) + Call(GetActionSuccessCopy, LVar0) + Else + Call(CloseActionCommandInfo) + Set(LVar0, 0) + EndIf + Switch(LVar0) + CaseEq(1) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(GetOwnerTarget, LVar0, LVar1) + Call(DispatchEvent, LVar0, EVENT_BLOW_AWAY) + Call(N(CarryAway), LVar0) + Wait(30) + Call(GetOwnerTarget, LVar0, LVar1) + Call(SetBattleFlagBits, BS_FLAGS1_STAR_POINTS_DROPPED, TRUE) + Call(RemoveActor, LVar0) + CaseDefault + Call(GetOwnerTarget, LVar0, LVar1) + Call(DispatchEvent, LVar0, EVENT_AIR_LIFT_FAILED) + Call(UseBattleCamPreset, BTL_CAM_PRESET_51) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_PARTNER, 5, -10, EASING_COS_IN) + Call(SetAnimationRate, ACTOR_PARTNER, 0, Float(8.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Idle) + Wait(10) + EndSwitch + Call(PartnerYieldTurn) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(12.0)) + Call(SetAnimationRate, ACTOR_PARTNER, 0, Float(1.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Run) + Call(FlyToGoal, ACTOR_PARTNER, 0, 0, EASING_LINEAR) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Walk) + Return + End }; EvtScript N(airRaid) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_AIR_RAID) - EVT_CALL(action_command_air_raid_init) - EVT_CALL(SetupMashMeter, 4, 25, 50, 75, 100, 0) - EVT_CALL(SetActionHudPrepareTime, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 70) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Run) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 15, -2, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Idle) - EVT_CALL(action_command_air_raid_start, 0, 90 * DT, 3) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_WAIT(2) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_PreDive) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 50) - EVT_ADD(LVar1, 30) - EVT_ADD(LVar2, 40) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 10, -10, EASING_COS_IN_OUT) - EVT_WAIT(2) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) - EVT_CHILD_THREAD - EVT_LOOP(5) - EVT_WAIT(18) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 10, 0) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_LOOP(5) - EVT_WAIT(18) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 1, LVar0, LVar1, LVar2, 40, 0) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_ShellFlyFastest) - EVT_CALL(N(FlyAround)) - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(GetActionQuality, LVar0) - EVT_CALL(N(GetAirRaidDamage)) - EVT_CALL(InitTargetIterator) - EVT_LABEL(10) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, 6) - EVT_GOTO(11) - EVT_END_IF - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(99) - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT | SUPPRESS_EVENT_ALT_SPIKY, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_HIT_RATTLE) - EVT_CASE_DEFAULT - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT | SUPPRESS_EVENT_ALT_SPIKY, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) - EVT_WAIT(5) - EVT_LABEL(11) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(99) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_04) - EVT_CASE_DEFAULT - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_51) - EVT_END_SWITCH - EVT_CHILD_THREAD - EVT_WAIT(10) - EVT_CALL(SetActorPos, ACTOR_PARTNER, -200, 50, 0) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(12.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Run) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 0, 0, EASING_LINEAR) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Walk) - EVT_END_CHILD_THREAD - EVT_WAIT(20) - EVT_CALL(PartnerYieldTurn) - EVT_WAIT(20) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_AIR_RAID) + Call(action_command_air_raid_init) + Call(SetupMashMeter, 4, 25, 50, 75, 100, 0) + Call(SetActionHudPrepareTime, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_14) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 30) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar0, 70) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Run) + Call(FlyToGoal, ACTOR_PARTNER, 15, -2, EASING_LINEAR) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Idle) + Call(action_command_air_raid_start, 0, 90 * DT, 3) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + Wait(2) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_PreDive) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Sub(LVar0, 50) + Add(LVar1, 30) + Add(LVar2, 40) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_PARTNER, 10, -10, EASING_COS_IN_OUT) + Wait(2) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) + ChildThread + Loop(5) + Wait(18) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 10, 0) + EndLoop + EndChildThread + ChildThread + Loop(5) + Wait(18) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SPARKLES, 1, LVar0, LVar1, LVar2, 40, 0) + EndLoop + EndChildThread + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_ShellFlyFastest) + Call(N(FlyAround)) + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(MoveBattleCamOver, 20) + Call(GetActionQuality, LVar0) + Call(N(GetAirRaidDamage)) + Call(InitTargetIterator) + Label(10) + Call(SetGoalToTarget, ACTOR_SELF) + Call(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, 6) + Goto(11) + EndIf + Call(GetPartnerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(99) + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT | SUPPRESS_EVENT_ALT_SPIKY, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_HIT_RATTLE) + CaseDefault + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT | SUPPRESS_EVENT_ALT_SPIKY, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NONE) + Wait(5) + Label(11) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(10) + EndIf + Call(GetPartnerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(99) + Call(UseBattleCamPreset, BTL_CAM_PRESET_04) + CaseDefault + Call(UseBattleCamPreset, BTL_CAM_PRESET_51) + EndSwitch + ChildThread + Wait(10) + Call(SetActorPos, ACTOR_PARTNER, -200, 50, 0) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(12.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Run) + Call(FlyToGoal, ACTOR_PARTNER, 0, 0, EASING_LINEAR) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Walk) + EndChildThread + Wait(20) + Call(PartnerYieldTurn) + Wait(20) + Return + End }; diff --git a/src/battle/partner/sushie.c b/src/battle/partner/sushie.c index ebc68806450..3c37c2f9aba 100644 --- a/src/battle/partner/sushie.c +++ b/src/battle/partner/sushie.c @@ -467,772 +467,772 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(GetLastEvent, ACTOR_PARTNER, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_SET_CONST(LVar2, ANIM_BattleSushie_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Hit) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_EXEC_WAIT(EVS_Partner_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIKE_CONTACT) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_SET(LVar2, 20) - EVT_EXEC_WAIT(EVS_Partner_SpikeContact) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_BURN_CONTACT) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_BurnHurt) - EVT_SET(LVar2, 20) - EVT_SET_CONST(LVar3, ANIM_BattleSushie_BurnStill) - EVT_EXEC_WAIT(EVS_Partner_BurnContact) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleSushie_BurnStill) - EVT_EXEC_WAIT(EVS_Partner_BurnHit) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_SET(LVar2, 20) - EVT_EXEC_WAIT(EVS_Partner_ShockHit) - EVT_CASE_EQ(EVENT_33) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_RECOVER_FROM_KO) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Idle) - EVT_SET_CONST(LVar2, ANIM_BattleSushie_Run) - EVT_SET(LVar3, 0) - EVT_EXEC_WAIT(EVS_Partner_Recover) - EVT_CASE_OR_EQ(EVENT_18) - EVT_CASE_OR_EQ(EVENT_BLOCK) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Block) - EVT_EXEC_WAIT(EVS_Partner_NoDamageHit) - EVT_WAIT(10) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(CloseActionCommandInfo) + Call(GetLastEvent, ACTOR_PARTNER, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + SetConst(LVar2, ANIM_BattleSushie_Hurt) + ExecWait(EVS_Partner_Hit) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + ExecWait(EVS_Partner_Drop) + EndCaseGroup + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + ExecWait(EVS_Partner_NoDamageHit) + EndCaseGroup + CaseEq(EVENT_SPIKE_CONTACT) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + Set(LVar2, 20) + ExecWait(EVS_Partner_SpikeContact) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_BURN_CONTACT) + SetConst(LVar1, ANIM_BattleSushie_BurnHurt) + Set(LVar2, 20) + SetConst(LVar3, ANIM_BattleSushie_BurnStill) + ExecWait(EVS_Partner_BurnContact) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_BURN_HIT) + SetConst(LVar1, ANIM_BattleSushie_BurnHurt) + SetConst(LVar2, ANIM_BattleSushie_BurnStill) + ExecWait(EVS_Partner_BurnHit) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + Set(LVar2, 20) + ExecWait(EVS_Partner_ShockHit) + CaseEq(EVENT_33) + SetConst(LVar1, ANIM_BattleSushie_Hurt) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_RECOVER_FROM_KO) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Idle) + SetConst(LVar2, ANIM_BattleSushie_Run) + Set(LVar3, 0) + ExecWait(EVS_Partner_Recover) + CaseOrEq(EVENT_18) + CaseOrEq(EVENT_BLOCK) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Block) + ExecWait(EVS_Partner_NoDamageHit) + Wait(10) + EndCaseGroup + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_EXECUTE_ACTION) - EVT_EXEC_WAIT(N(EVS_ExecuteAction)) - EVT_CASE_EQ(PHASE_CELEBRATE) - EVT_EXEC_WAIT(N(EVS_Celebrate)) - EVT_CASE_EQ(PHASE_RUN_AWAY_START) - EVT_EXEC_WAIT(N(runAway)) - EVT_CASE_EQ(PHASE_RUN_AWAY_FAIL) - EVT_EXEC_WAIT(N(runAwayFail)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_EXECUTE_ACTION) + ExecWait(N(EVS_ExecuteAction)) + CaseEq(PHASE_CELEBRATE) + ExecWait(N(EVS_Celebrate)) + CaseEq(PHASE_RUN_AWAY_START) + ExecWait(N(runAway)) + CaseEq(PHASE_RUN_AWAY_FAIL) + ExecWait(N(runAwayFail)) + EndSwitch + Return + End }; EvtScript N(EVS_Celebrate) = { - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Celebrate) - EVT_WAIT(36) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Idle) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Celebrate) + Wait(36) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Idle) + Return + End }; EvtScript N(runAway) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleSushie_Run) - EVT_EXEC_WAIT(EVS_Partner_RunAway) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleSushie_Run) + ExecWait(EVS_Partner_RunAway) + Return + End }; EvtScript N(runAwayFail) = { - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Run) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, 0) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Idle) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(6.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Run) + Call(SetActorYaw, ACTOR_PARTNER, 0) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Idle) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_ExecuteAction) = { - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(BTL_MENU_TYPE_STAR_POWERS) - EVT_CALL(LoadStarPowerScript) - EVT_EXEC_WAIT(LVar0) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_BELLY_FLOP1) - EVT_EXEC_WAIT(N(bellyFlop)) - EVT_CASE_EQ(MOVE_BELLY_FLOP2) - EVT_EXEC_WAIT(N(bellyFlop)) - EVT_CASE_EQ(MOVE_BELLY_FLOP3) - EVT_EXEC_WAIT(N(bellyFlop)) - EVT_CASE_EQ(MOVE_SQUIRT) - EVT_EXEC_WAIT(N(squirt)) - EVT_CASE_EQ(MOVE_WATER_BLOCK) - EVT_EXEC_WAIT(N(waterBlock)) - EVT_CASE_EQ(MOVE_TIDAL_WAVE) - EVT_EXEC_WAIT(N(tidalWave)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(ShowActionHud, TRUE) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar0) + CaseEq(BTL_MENU_TYPE_STAR_POWERS) + Call(LoadStarPowerScript) + ExecWait(LVar0) + Return + EndSwitch + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar2) + CaseEq(MOVE_BELLY_FLOP1) + ExecWait(N(bellyFlop)) + CaseEq(MOVE_BELLY_FLOP2) + ExecWait(N(bellyFlop)) + CaseEq(MOVE_BELLY_FLOP3) + ExecWait(N(bellyFlop)) + CaseEq(MOVE_SQUIRT) + ExecWait(N(squirt)) + CaseEq(MOVE_WATER_BLOCK) + ExecWait(N(waterBlock)) + CaseEq(MOVE_TIDAL_WAVE) + ExecWait(N(tidalWave)) + EndSwitch + Return + End }; EvtScript N(returnHome2) = { - EVT_CALL(PartnerYieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_04) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Fall) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 60) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.4)) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 20, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 8, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 6, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 10) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 4, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Idle) - EVT_WAIT(15) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Run) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Idle) - EVT_RETURN - EVT_END + Call(PartnerYieldTurn) + Call(UseBattleCamPreset, BTL_CAM_PRESET_04) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Fall) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Sub(LVar0, 60) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.4)) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 20, FALSE, TRUE, FALSE) + Sub(LVar0, 30) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 8, FALSE, TRUE, FALSE) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 6, FALSE, TRUE, FALSE) + Sub(LVar0, 10) + Call(JumpToGoal, ACTOR_PARTNER, 4, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Idle) + Wait(15) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(6.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Run) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Idle) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(PartnerYieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_51) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Fall) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 15) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(0.4)) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 8, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 5) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 4, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Idle) - EVT_WAIT(15) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Run) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Idle) - EVT_RETURN - EVT_END + Call(PartnerYieldTurn) + Call(UseBattleCamPreset, BTL_CAM_PRESET_51) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Fall) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Sub(LVar0, 15) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.4)) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 8, FALSE, TRUE, FALSE) + Sub(LVar0, 5) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 4, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Idle) + Wait(15) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(6.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Run) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Idle) + Return + End }; EvtScript N(restoreFromSquirt2) = { - EVT_CALL(PartnerYieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_04) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Run) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Idle) - EVT_RETURN - EVT_END + Call(PartnerYieldTurn) + Call(UseBattleCamPreset, BTL_CAM_PRESET_04) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Run) + Call(FlyToGoal, ACTOR_PARTNER, 30, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Idle) + Return + End }; EvtScript N(restoreFromSquirt) = { - EVT_CALL(PartnerYieldTurn) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_51) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Run) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Idle) - EVT_RETURN - EVT_END + Call(PartnerYieldTurn) + Call(UseBattleCamPreset, BTL_CAM_PRESET_51) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Run) + Call(FlyToGoal, ACTOR_PARTNER, 30, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Idle) + Return + End }; EvtScript N(runToTarget) = { - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Run) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Idle) - EVT_RETURN - EVT_END + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_PARTNER, Float(4.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Run) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Idle) + Return + End }; EvtScript N(getJumpTime) = { - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVarB, LVarC, LVarD) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVarC, LVarD, LVarE) - EVT_IF_GT(LVarB, LVarC) - EVT_SUB(LVarB, LVarC) - EVT_ELSE - EVT_SUB(LVarC, LVarB) - EVT_SET(LVarB, LVarC) - EVT_END_IF - EVT_SUB(LVarB, 20) - EVT_DIVF(LVarB, EVT_FLOAT(10.588)) - EVT_ADDF(LVarB, 15) - EVT_SET(LVarA, LVarB) - EVT_RETURN - EVT_END + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(GetGoalPos, ACTOR_PARTNER, LVarB, LVarC, LVarD) + Call(GetActorPos, ACTOR_PARTNER, LVarC, LVarD, LVarE) + IfGt(LVarB, LVarC) + Sub(LVarB, LVarC) + Else + Sub(LVarC, LVarB) + Set(LVarB, LVarC) + EndIf + Sub(LVarB, 20) + DivF(LVarB, Float(10.588)) + AddF(LVarB, 15) + Set(LVarA, LVarB) + Return + End }; EvtScript N(bellyFlop) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH) - EVT_CALL(action_command_hammer_init) - EVT_EXEC_WAIT(N(runToTarget)) - EVT_EXEC_WAIT(N(getJumpTime)) - EVT_LOOP(30) - EVT_WAIT(1) - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(action_command_hammer_start, 0, 57, 3) - EVT_CALL(SetActionQuality, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Tense1) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_59) - EVT_SET(LVar0, 30) - EVT_LOOP(60) - EVT_WAIT(1) - EVT_SUB(LVar0, 1) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Tense2) - EVT_END_IF - EVT_CALL(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_THREAD - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52) - EVT_CALL(MoveBattleCamOver, 20) - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Jump) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_PARTNER, 0, 12, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 36) - EVT_CALL(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotation, ACTOR_PARTNER, 0, 0, 20) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_BELLY_FLOP1) - EVT_WAIT(13) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.1), EVT_FLOAT(1.1), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.1), EVT_FLOAT(1.1), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.2), EVT_FLOAT(1.2), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.2), EVT_FLOAT(1.2), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.3), EVT_FLOAT(1.3), EVT_FLOAT(1.0)) - EVT_CASE_EQ(MOVE_BELLY_FLOP2) - EVT_WAIT(13) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.15), EVT_FLOAT(1.15), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.2), EVT_FLOAT(1.2), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.35), EVT_FLOAT(1.35), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.4), EVT_FLOAT(1.4), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.55), EVT_FLOAT(1.55), EVT_FLOAT(1.0)) - EVT_CASE_EQ(MOVE_BELLY_FLOP3) - EVT_WAIT(13) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.2), EVT_FLOAT(1.2), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.3), EVT_FLOAT(1.3), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.5), EVT_FLOAT(1.5), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.6), EVT_FLOAT(1.6), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.8), EVT_FLOAT(1.8), EVT_FLOAT(1.0)) - EVT_END_SWITCH - EVT_ELSE - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(167) - EVT_WAIT(13) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CASE_EQ(168) - EVT_WAIT(13) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.05), EVT_FLOAT(1.05), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.1), EVT_FLOAT(1.1), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.15), EVT_FLOAT(1.15), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.2), EVT_FLOAT(1.2), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.25), EVT_FLOAT(1.25), EVT_FLOAT(1.0)) - EVT_CASE_EQ(169) - EVT_WAIT(13) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.1), EVT_FLOAT(1.1), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.2), EVT_FLOAT(1.2), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.3), EVT_FLOAT(1.3), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.4), EVT_FLOAT(1.4), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.5), EVT_FLOAT(1.5), EVT_FLOAT(1.0)) - EVT_END_SWITCH - EVT_END_IF - EVT_END_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_SUSHIE_BELLY_FLOP) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Jump) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Fall) - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.6)) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 20, FALSE, TRUE, FALSE) - EVT_ELSE - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Jump) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Fall) - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.0)) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 20, FALSE, TRUE, FALSE) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Land) - EVT_CALL(SetActorRotation, ACTOR_PARTNER, 0, 0, 0) - EVT_CALL(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_BELLY_FLOP1) - EVT_SET(LVarE, 1) - EVT_SET(LVarF, 3) - EVT_CASE_EQ(MOVE_BELLY_FLOP2) - EVT_SET(LVarE, 2) - EVT_SET(LVarF, 4) - EVT_CASE_EQ(MOVE_BELLY_FLOP3) - EVT_SET(LVarE, 3) - EVT_SET(LVarF, 5) - EVT_END_SWITCH - EVT_CALL(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(LandJump, ACTOR_PARTNER) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, 15, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 20, FALSE, TRUE, FALSE) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, 10, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) - EVT_WAIT(10) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Run) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_RETURN - EVT_END_IF - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, SUPPRESS_EVENT_SPIKY_FRONT, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, SUPPRESS_EVENT_SPIKY_FRONT, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_51) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(MoveBattleCamOver, 8) - EVT_EXEC_WAIT(N(returnHome2)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_SMASH) + Call(action_command_hammer_init) + ExecWait(N(runToTarget)) + ExecWait(N(getJumpTime)) + Loop(30) + Wait(1) + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfNe(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(action_command_hammer_start, 0, 57, 3) + Call(SetActionQuality, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Tense1) + Call(UseBattleCamPreset, BTL_CAM_PRESET_59) + Set(LVar0, 30) + Loop(60) + Wait(1) + Sub(LVar0, 1) + IfEq(LVar0, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Tense2) + EndIf + Call(CheckButtonDown, BUTTON_STICK_LEFT, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Thread + Call(GetPartnerActionSuccess, LVar0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_52) + Call(MoveBattleCamOver, 20) + EndThread + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Jump) + Thread + Call(SetActorRotationOffset, ACTOR_PARTNER, 0, 12, 0) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 36) + Call(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotation, ACTOR_PARTNER, 0, 0, 20) + EndThread + Thread + Call(GetPartnerActionSuccess, LVar0) + IfGt(LVar0, 0) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar2) + CaseEq(MOVE_BELLY_FLOP1) + Wait(13) + Call(SetActorScale, ACTOR_PARTNER, Float(1.1), Float(1.1), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.1), Float(1.1), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.2), Float(1.2), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.2), Float(1.2), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.3), Float(1.3), Float(1.0)) + CaseEq(MOVE_BELLY_FLOP2) + Wait(13) + Call(SetActorScale, ACTOR_PARTNER, Float(1.15), Float(1.15), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.2), Float(1.2), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.35), Float(1.35), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.4), Float(1.4), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.55), Float(1.55), Float(1.0)) + CaseEq(MOVE_BELLY_FLOP3) + Wait(13) + Call(SetActorScale, ACTOR_PARTNER, Float(1.2), Float(1.2), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.3), Float(1.3), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.5), Float(1.5), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.6), Float(1.6), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.8), Float(1.8), Float(1.0)) + EndSwitch + Else + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar2) + CaseEq(167) + Wait(13) + Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) + CaseEq(168) + Wait(13) + Call(SetActorScale, ACTOR_PARTNER, Float(1.05), Float(1.05), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.1), Float(1.1), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.15), Float(1.15), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.2), Float(1.2), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.25), Float(1.25), Float(1.0)) + CaseEq(169) + Wait(13) + Call(SetActorScale, ACTOR_PARTNER, Float(1.1), Float(1.1), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.2), Float(1.2), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.3), Float(1.3), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.4), Float(1.4), Float(1.0)) + Wait(1) + Call(SetActorScale, ACTOR_PARTNER, Float(1.5), Float(1.5), Float(1.0)) + EndSwitch + EndIf + EndThread + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_SUSHIE_BELLY_FLOP) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(GetPartnerActionSuccess, LVar0) + IfGt(LVar0, 0) + Thread + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Jump) + Wait(10) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Fall) + EndThread + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.6)) + Call(JumpToGoal, ACTOR_PARTNER, 20, FALSE, TRUE, FALSE) + Else + Thread + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Jump) + Wait(10) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Fall) + EndThread + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.0)) + Call(JumpToGoal, ACTOR_PARTNER, 20, FALSE, TRUE, FALSE) + EndIf + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Land) + Call(SetActorRotation, ACTOR_PARTNER, 0, 0, 0) + Call(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar2) + CaseEq(MOVE_BELLY_FLOP1) + Set(LVarE, 1) + Set(LVarF, 3) + CaseEq(MOVE_BELLY_FLOP2) + Set(LVarE, 2) + Set(LVarF, 4) + CaseEq(MOVE_BELLY_FLOP3) + Set(LVarE, 3) + Set(LVarF, 5) + EndSwitch + Call(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, HIT_RESULT_MISS) + Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) + Call(LandJump, ACTOR_PARTNER) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(AddGoalPos, ACTOR_PARTNER, 15, 0, 0) + Call(JumpToGoal, ACTOR_PARTNER, 20, FALSE, TRUE, FALSE) + Call(AddGoalPos, ACTOR_PARTNER, 10, 0, 0) + Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) + Wait(10) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(6.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Run) + Call(RunToGoal, ACTOR_PARTNER, 0) + Return + EndIf + Thread + Wait(3) + Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) + EndThread + Call(GetPartnerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(0) + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, SUPPRESS_EVENT_SPIKY_FRONT, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_JUMP, SUPPRESS_EVENT_SPIKY_FRONT, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_51) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(MoveBattleCamOver, 8) + ExecWait(N(returnHome2)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(squirt) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_SQUIRT) - EVT_CALL(action_command_squirt_init) - EVT_CALL(GetActorLevel, ACTOR_PARTNER, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetupMashMeter, 3, 40, 75, 100, 0, 0) - EVT_CASE_EQ(1) - EVT_CALL(SetupMashMeter, 4, 35, 60, 80, 100, 0) - EVT_CASE_EQ(2) - EVT_CALL(SetupMashMeter, 5, 20, 40, 60, 80, 100) - EVT_END_SWITCH - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_13) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(MoveBattleCamOver, 40) - EVT_CALL(InitTargetIterator) - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Jump) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Fall) - EVT_END_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) - EVT_CALL(N(SetSquirtAngle)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Inhale) - EVT_CALL(AddBattleCamZoom, -80) - EVT_CALL(MoveBattleCamOver, 90 * DT) - EVT_CALL(action_command_squirt_start, 0, 87 * DT, 3) - EVT_LOOP(90 * DT) - EVT_CALL(GetActionQuality, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(GetActorScale, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SETF(LVar1, LVar0) - EVT_SUBF(LVar1, EVT_FLOAT(1.0)) - EVT_DIVF(LVar1, 4) - EVT_SUBF(LVar0, LVar1) - EVT_ELSE - EVT_SETF(LVar0, LVar0) - EVT_DIVF(LVar0, 100) - EVT_SETF(LVar1, EVT_FLOAT(1.0)) - EVT_ADDF(LVar0, LVar1) - EVT_END_IF - EVT_CALL(SetActorScale, ACTOR_SELF, LVar0, LVar0, EVT_FLOAT(1.0)) - EVT_SETF(LVarE, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_SUSHIE_SQUIRT) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(PartnerTestEnemy, LVar0, DAMAGE_TYPE_WATER | DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Squirt) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_ADD(LVar1, 11) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar3, LVar4, LVar5) - EVT_CALL(N(GetSquirtTargetPos)) - EVT_PLAY_EFFECT(EFFECT_SQUIRT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, LVarE, 10, 0) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(restoreFromSquirt)) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Squirt) - EVT_THREAD - EVT_CALL(N(InflateSushie)) - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_ADD(LVar1, 11) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar3, LVar4, LVar5) - EVT_PLAY_EFFECT(EFFECT_SQUIRT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, LVarE, 10, 0) - EVT_WAIT(10) - EVT_CALL(GetActionQuality, LVar0) - EVT_CALL(N(GetSquirtDamage)) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_WATER | DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENT_EXPLODE_CONTACT | SUPPRESS_EVENT_BURN_CONTACT | SUPPRESS_EVENT_FLAG_200, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_HIT_RATTLE) - EVT_CASE_DEFAULT - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_WATER | DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENT_EXPLODE_CONTACT | SUPPRESS_EVENT_BURN_CONTACT | SUPPRESS_EVENT_FLAG_200, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_HIT_RATTLE) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(restoreFromSquirt)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_EXEC_WAIT(N(restoreFromSquirt2)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_SQUIRT) + Call(action_command_squirt_init) + Call(GetActorLevel, ACTOR_PARTNER, LVar0) + Switch(LVar0) + CaseEq(0) + Call(SetupMashMeter, 3, 40, 75, 100, 0, 0) + CaseEq(1) + Call(SetupMashMeter, 4, 35, 60, 80, 100, 0) + CaseEq(2) + Call(SetupMashMeter, 5, 20, 40, 60, 80, 100) + EndSwitch + Call(UseBattleCamPreset, BTL_CAM_PRESET_13) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(MoveBattleCamOver, 40) + Call(InitTargetIterator) + Thread + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Jump) + Wait(5) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Fall) + EndThread + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.0)) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) + Call(N(SetSquirtAngle)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Inhale) + Call(AddBattleCamZoom, -80) + Call(MoveBattleCamOver, 90 * DT) + Call(action_command_squirt_start, 0, 87 * DT, 3) + Loop(90 * DT) + Call(GetActionQuality, LVar0) + IfEq(LVar0, 0) + Call(GetActorScale, ACTOR_SELF, LVar0, LVar1, LVar2) + SetF(LVar1, LVar0) + SubF(LVar1, Float(1.0)) + DivF(LVar1, 4) + SubF(LVar0, LVar1) + Else + SetF(LVar0, LVar0) + DivF(LVar0, 100) + SetF(LVar1, Float(1.0)) + AddF(LVar0, LVar1) + EndIf + Call(SetActorScale, ACTOR_SELF, LVar0, LVar0, Float(1.0)) + SetF(LVarE, LVar0) + Wait(1) + EndLoop + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_SUSHIE_SQUIRT) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(MoveBattleCamOver, 10) + Call(PartnerTestEnemy, LVar0, DAMAGE_TYPE_WATER | DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, HIT_RESULT_MISS) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Squirt) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar0, 10) + Add(LVar1, 11) + Call(GetGoalPos, ACTOR_PARTNER, LVar3, LVar4, LVar5) + Call(N(GetSquirtTargetPos)) + PlayEffect(EFFECT_SQUIRT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, LVarE, 10, 0) + Wait(20) + ExecWait(N(restoreFromSquirt)) + Return + EndIf + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Squirt) + Thread + Call(N(InflateSushie)) + EndThread + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar0, 10) + Add(LVar1, 11) + Call(GetGoalPos, ACTOR_PARTNER, LVar3, LVar4, LVar5) + PlayEffect(EFFECT_SQUIRT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, LVarE, 10, 0) + Wait(10) + Call(GetActionQuality, LVar0) + Call(N(GetSquirtDamage)) + Switch(LVar0) + CaseGt(0) + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_WATER | DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENT_EXPLODE_CONTACT | SUPPRESS_EVENT_BURN_CONTACT | SUPPRESS_EVENT_FLAG_200, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_HIT_RATTLE) + CaseDefault + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_WATER | DAMAGE_TYPE_NO_CONTACT, SUPPRESS_EVENT_EXPLODE_CONTACT | SUPPRESS_EVENT_BURN_CONTACT | SUPPRESS_EVENT_FLAG_200, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_HIT_RATTLE) + EndSwitch + Switch(LVar0) + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(restoreFromSquirt)) + EndCaseGroup + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + ExecWait(N(restoreFromSquirt2)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(waterBlock) = { - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(InitTargetIterator) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, -95, 26, 10) - EVT_CALL(SetBattleCamOffsetZ, 11) - EVT_CALL(SetBattleCamZoom, 238) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Inhale) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_WATER_BLOCK) - EVT_CALL(action_command_water_block_init, 0) - EVT_CALL(SetActionHudPrepareTime, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(4) - EVT_ADD(LVar0, 45) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(4) - EVT_CALL(action_command_water_block_start, 0, 100, 3) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_HoldWater) - EVT_WAIT(110) - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LVarA, LVar0) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_SpitArc) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, -95, 27, 10) - EVT_CALL(SetBattleCamOffsetZ, 11) - EVT_CALL(SetBattleCamZoom, 277) - EVT_CALL(MoveBattleCamOver, 10) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_SUSHIE_FOUNTAIN) - EVT_CALL(N(PlaySquirtFX)) - EVT_WAIT(65) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Celebrate) - EVT_END_THREAD - EVT_WAIT(45) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 83) - EVT_PLAY_EFFECT(EFFECT_WATERFALL, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 50, 0) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_CREATE_WATER_BLOCK) - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 100) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 50, 0) - EVT_WAIT(5) - EVT_SUB(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 50, 0) - EVT_WAIT(5) - EVT_SUB(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 50, 0) - EVT_WAIT(5) - EVT_SUB(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 50, 0) - EVT_WAIT(5) - EVT_SUB(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 50, 0) - EVT_END_THREAD - EVT_WAIT(40) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(N(PlayWaterBlockFX), LVar0, LVar1, LVar2) - EVT_WAIT(30) - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_CALL(N(ApplyWaterBlock)) - EVT_SET(LVarA, LVar0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 15) - EVT_ADD(LVar1, 35) - EVT_ADD(LVarF, 6) - EVT_PLAY_EFFECT(EFFECT_STAT_CHANGE, LVarF, LVar0, LVar1, LVar2, EVT_FLOAT(1.5), 60, 0) - EVT_WAIT(4) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(PartnerYieldTurn) - EVT_LABEL(10) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Run) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) - EVT_SET(LVar1, 180) - EVT_LOOP(4) - EVT_SUB(LVar1, 45) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, LVar1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_PARTNER, 0) - EVT_IF_EQ(LVarA, 0) - EVT_ELSE - EVT_CALL(ShowVariableMessageBox, BTL_MSG_WATER_BLOCK_BEGIN, 60, LVarA) - EVT_END_IF - EVT_CALL(WaitForMessageBoxDone) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(InitTargetIterator) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, -95, 26, 10) + Call(SetBattleCamOffsetZ, 11) + Call(SetBattleCamZoom, 238) + Call(MoveBattleCamOver, 30) + Wait(10) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Inhale) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.0)) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) + Call(LoadActionCommand, ACTION_COMMAND_WATER_BLOCK) + Call(action_command_water_block_init, 0) + Call(SetActionHudPrepareTime, 0) + Set(LVar0, 0) + Loop(4) + Add(LVar0, 45) + Call(SetActorYaw, ACTOR_PARTNER, LVar0) + Wait(1) + EndLoop + Wait(4) + Call(action_command_water_block_start, 0, 100, 3) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_HoldWater) + Wait(110) + Call(GetPartnerActionSuccess, LVar0) + IfEq(LVar0, 0) + Set(LVarA, LVar0) + Goto(10) + EndIf + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_SpitArc) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, -95, 27, 10) + Call(SetBattleCamOffsetZ, 11) + Call(SetBattleCamZoom, 277) + Call(MoveBattleCamOver, 10) + Thread + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_SUSHIE_FOUNTAIN) + Call(N(PlaySquirtFX)) + Wait(65) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Celebrate) + EndThread + Wait(45) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 83) + PlayEffect(EFFECT_WATERFALL, 0, LVar0, LVar1, LVar2, Float(1.0), 50, 0) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_CREATE_WATER_BLOCK) + Thread + Wait(20) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 100) + PlayEffect(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 50, 0) + Wait(5) + Sub(LVar1, 20) + PlayEffect(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 50, 0) + Wait(5) + Sub(LVar1, 20) + PlayEffect(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 50, 0) + Wait(5) + Sub(LVar1, 20) + PlayEffect(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 50, 0) + Wait(5) + Sub(LVar1, 20) + PlayEffect(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 50, 0) + EndThread + Wait(40) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(N(PlayWaterBlockFX), LVar0, LVar1, LVar2) + Wait(30) + Call(GetPartnerActionSuccess, LVar0) + Call(N(ApplyWaterBlock)) + Set(LVarA, LVar0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 15) + Add(LVar1, 35) + Add(LVarF, 6) + PlayEffect(EFFECT_STAT_CHANGE, LVarF, LVar0, LVar1, LVar2, Float(1.5), 60, 0) + Wait(4) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 20) + Call(PartnerYieldTurn) + Label(10) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.0)) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Run) + Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) + Set(LVar1, 180) + Loop(4) + Sub(LVar1, 45) + Call(SetActorYaw, ACTOR_PARTNER, LVar1) + EndLoop + Call(SetActorYaw, ACTOR_PARTNER, 0) + IfEq(LVarA, 0) + Else + Call(ShowVariableMessageBox, BTL_MSG_WATER_BLOCK_BEGIN, 60, LVarA) + EndIf + Call(WaitForMessageBoxDone) + Return + End }; EvtScript N(tidalWave) = { - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_TIDAL_WAVE) - EVT_CALL(action_command_tidal_wave_init) - EVT_CALL(SetupMashMeter, 5, 20, 30, 60, 80, 100) - EVT_CALL(InitTargetIterator) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, -65, 53, 10) - EVT_CALL(SetBattleCamOffsetZ, 16) - EVT_CALL(SetBattleCamZoom, 214) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Run) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(0.5)) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 5, FALSE, TRUE, FALSE) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.0)) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, 30, 40, 0) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 15, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Idle) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_HoldWater) - EVT_CALL(action_command_tidal_wave_start, 0, 100, 3) - EVT_CALL(SetActorRotationOffset, ACTOR_PARTNER, 0, 12, 0) - EVT_THREAD - EVT_WAIT(54) - EVT_LOOP(8) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, -1, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(7) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 1, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, -1, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(8) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 1, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, -2, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 0, 0) - EVT_END_THREAD - EVT_LOOP(100) - EVT_CALL(GetActionQuality, LVar0) - EVT_CALL(N(SetScaleTidalWaveCharge)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 5) - EVT_WAIT(10) - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) - EVT_CALL(N(ProcessTidalWave)) - EVT_CALL(SetActorPos, ACTOR_PARTNER, -220, 0, 0) - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE) - EVT_WAIT(15) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(MoveBattleCamOver, 20) - EVT_CALL(GetActionSuccessCopy, LVar0) - EVT_SET(LVarE, LVar0) - EVT_SET(LVarF, LVar0) - EVT_CALL(InitTargetIterator) - EVT_LOOP(0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_GOTO(10) - EVT_END_IF - EVT_SWITCH(LVarE) - EVT_CASE_GE(6) - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_WATER | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_WATER | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_WAIT(5) - EVT_LABEL(10) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_EQ(LVar0, ITER_NO_MORE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PartnerYieldTurn) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, 0, 150, 0) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Idle) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 40, FALSE, TRUE, FALSE) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(0.7)) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 20, FALSE, TRUE, FALSE) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(LoadActionCommand, ACTION_COMMAND_TIDAL_WAVE) + Call(action_command_tidal_wave_init) + Call(SetupMashMeter, 5, 20, 30, 60, 80, 100) + Call(InitTargetIterator) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, -65, 53, 10) + Call(SetBattleCamOffsetZ, 16) + Call(SetBattleCamZoom, 214) + Call(MoveBattleCamOver, 20) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Run) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.5)) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 5, FALSE, TRUE, FALSE) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.0)) + Call(AddGoalPos, ACTOR_PARTNER, 30, 40, 0) + Call(JumpToGoal, ACTOR_PARTNER, 15, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Idle) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_HoldWater) + Call(action_command_tidal_wave_start, 0, 100, 3) + Call(SetActorRotationOffset, ACTOR_PARTNER, 0, 12, 0) + Thread + Wait(54) + Loop(8) + Call(SetActorDispOffset, ACTOR_PARTNER, 0, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_PARTNER, -1, 0, 0) + Wait(1) + EndLoop + Loop(7) + Call(SetActorDispOffset, ACTOR_PARTNER, 1, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_PARTNER, -1, 0, 0) + Wait(1) + EndLoop + Loop(8) + Call(SetActorDispOffset, ACTOR_PARTNER, 1, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_PARTNER, -2, 0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_PARTNER, 0, 0, 0) + EndThread + Loop(100) + Call(GetActionQuality, LVar0) + Call(N(SetScaleTidalWaveCharge)) + Wait(1) + EndLoop + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 5) + Wait(10) + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) + Call(N(ProcessTidalWave)) + Call(SetActorPos, ACTOR_PARTNER, -220, 0, 0) + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE) + Wait(15) + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(MoveBattleCamOver, 20) + Call(GetActionSuccessCopy, LVar0) + Set(LVarE, LVar0) + Set(LVarF, LVar0) + Call(InitTargetIterator) + Loop(0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 2, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, HIT_RESULT_MISS) + Goto(10) + EndIf + Switch(LVarE) + CaseGe(6) + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_WATER | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_WATER | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS, 0, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Wait(5) + Label(10) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfEq(LVar0, ITER_NO_MORE) + BreakLoop + EndIf + EndLoop + Call(PartnerYieldTurn) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(AddGoalPos, ACTOR_PARTNER, 0, 150, 0) + Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(SetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.0)) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Idle) + Call(JumpToGoal, ACTOR_PARTNER, 40, FALSE, TRUE, FALSE) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.7)) + Call(JumpToGoal, ACTOR_PARTNER, 20, FALSE, TRUE, FALSE) + Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) + Return + End }; diff --git a/src/battle/partner/twink.c b/src/battle/partner/twink.c index 1e977d35883..f7af63f76ed 100644 --- a/src/battle/partner/twink.c +++ b/src/battle/partner/twink.c @@ -112,20 +112,20 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_CALL(N(IsPeachBattle)) - EVT_IF_NE(LVar0, TRUE) - EVT_CALL(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_ATTACK, TRUE) - EVT_END_IF - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Twink_PowerLevel, 0) - EVT_CALL(SetActorVar, ACTOR_SELF, AVAR_Twink_DefensePtr, EVT_PTR(N(DefenseTable))) - EVT_CALL(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SPARKLES) - EVT_CALL(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 0, 0, 0, 0) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Call(N(IsPeachBattle)) + IfNe(LVar0, TRUE) + Call(SetActorFlagBits, ACTOR_SELF, ACTOR_FLAG_NO_ATTACK, TRUE) + EndIf + Call(SetActorVar, ACTOR_SELF, AVAR_Twink_PowerLevel, 0) + Call(SetActorVar, ACTOR_SELF, AVAR_Twink_DefensePtr, Ref(N(DefenseTable))) + Call(AddActorDecoration, ACTOR_SELF, PRT_MAIN, 0, ACTOR_DECORATION_SPARKLES) + Call(ModifyActorDecoration, ACTOR_SELF, PRT_MAIN, 0, 0, 0, 0, 0) + Return + End }; s32 N(BobPhase) = 0; @@ -140,154 +140,154 @@ API_CALLABLE(N(AddFlightBobbing)) { } EvtScript N(EVS_Idle) = { - EVT_LOOP(0) - EVT_CALL(N(AddFlightBobbing)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(N(AddFlightBobbing)) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(GetLastEvent, ACTOR_PARTNER, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach2_Gasp) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Twink_Hurt) - EVT_EXEC_WAIT(EVS_Enemy_Hit) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach1_Walk) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach2_Gasp) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Twink_Angry) - EVT_EXEC_WAIT(EVS_Enemy_NoDamageHit) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach1_Walk) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(CloseActionCommandInfo) + Call(GetLastEvent, ACTOR_PARTNER, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach2_Gasp) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Twink_Hurt) + ExecWait(EVS_Enemy_Hit) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach1_Walk) + EndCaseGroup + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach2_Gasp) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Twink_Angry) + ExecWait(EVS_Enemy_NoDamageHit) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Peach1_Walk) + EndCaseGroup + EndSwitch + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_EXECUTE_ACTION) - EVT_EXEC_WAIT(N(EVS_ExecuteAction)) - EVT_CASE_EQ(PHASE_CELEBRATE) - EVT_EXEC_WAIT(N(EVS_Celebrate)) - EVT_CASE_EQ(PHASE_RUN_AWAY_START) - EVT_EXEC_WAIT(N(EVS_RunAway)) - EVT_CASE_EQ(PHASE_RUN_AWAY_FAIL) - EVT_EXEC_WAIT(N(EVS_RunAwayFail)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_EXECUTE_ACTION) + ExecWait(N(EVS_ExecuteAction)) + CaseEq(PHASE_CELEBRATE) + ExecWait(N(EVS_Celebrate)) + CaseEq(PHASE_RUN_AWAY_START) + ExecWait(N(EVS_RunAway)) + CaseEq(PHASE_RUN_AWAY_FAIL) + ExecWait(N(EVS_RunAwayFail)) + EndSwitch + Return + End }; EvtScript N(EVS_Celebrate) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Twink_Fly) - EVT_SET_CONST(LVar2, ANIM_Twink_Fly) - EVT_EXEC_WAIT(EVS_Partner_Celebrate) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Twink_Fly) + SetConst(LVar2, ANIM_Twink_Fly) + ExecWait(EVS_Partner_Celebrate) + Return + End }; EvtScript N(EVS_RunAway) = { - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_Twink_Angry) - EVT_EXEC_WAIT(EVS_Partner_RunAway) - EVT_RETURN - EVT_END + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_Twink_Angry) + ExecWait(EVS_Partner_RunAway) + Return + End }; EvtScript N(EVS_RunAwayFail) = { - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_Twink_Angry) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, 0) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_Twink_Idle) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(6.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_Twink_Angry) + Call(SetActorYaw, ACTOR_PARTNER, 0) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_Twink_Idle) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_ExecuteAction) = { - EVT_CALL(EnableIdleScript, ACTOR_PARTNER, IDLE_SCRIPT_DISABLE) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(SetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_FLY, SOUND_TWINK_FLY_A, SOUND_TWINK_FLY_B) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52) - EVT_CALL(BattleCamTargetActor, ACTOR_SELF) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_Twink_Angry) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, -20, 0, 0) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0)) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 0, -10, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_Twink_Idle) - EVT_WAIT(3) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_Twink_Cringe) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, 0, 10, 0) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 5, 0, EASING_LINEAR) - EVT_WAIT(2) - EVT_CALL(SetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_ACTOR_JUMP) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, -40, 15, 0) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 20, -20, EASING_QUARTIC_OUT) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Twink_PowerLevel, LVarF) - EVT_IF_GT(LVarF, 1) - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_TWINK_ATTACK) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, -10, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_Twink_Angry) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 5, 0, EASING_LINEAR) - EVT_CALL(GetActorVar, ACTOR_SELF, AVAR_Twink_PowerLevel, LVarF) - EVT_IF_GT(LVarF, 0) - EVT_CALL(PartnerDamageEnemy, LVar0, 0, 0, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_ELSE - EVT_CALL(PartnerDamageEnemy, LVar0, 0, 0, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_03) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, 150, 100, 0) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 15, 20, EASING_LINEAR) - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE) - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetActorVar, ACTOR_ENEMY0, AVAR_Kammy_Speaking, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_FLY, SOUND_TWINK_FLY_A, SOUND_TWINK_FLY_B) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_Twink_Angry) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(8.0)) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 0, -20, EASING_COS_IN_OUT) - EVT_CALL(EnableIdleScript, ACTOR_PARTNER, IDLE_SCRIPT_ENABLE) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_RETURN - EVT_END + Call(EnableIdleScript, ACTOR_PARTNER, IDLE_SCRIPT_DISABLE) + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(SetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_FLY, SOUND_TWINK_FLY_A, SOUND_TWINK_FLY_B) + Call(UseBattleCamPreset, BTL_CAM_PRESET_52) + Call(BattleCamTargetActor, ACTOR_SELF) + Call(InitTargetIterator) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_Twink_Angry) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(AddGoalPos, ACTOR_PARTNER, -20, 0, 0) + Call(SetActorSpeed, ACTOR_PARTNER, Float(4.0)) + Call(FlyToGoal, ACTOR_PARTNER, 0, -10, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_Twink_Idle) + Wait(3) + Call(UseBattleCamPreset, BTL_CAM_PRESET_52) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_Twink_Cringe) + Call(AddGoalPos, ACTOR_PARTNER, 0, 10, 0) + Call(FlyToGoal, ACTOR_PARTNER, 5, 0, EASING_LINEAR) + Wait(2) + Call(SetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_FLY, SOUND_NONE, SOUND_NONE) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_ACTOR_JUMP) + Call(UseBattleCamPreset, BTL_CAM_PRESET_52) + Call(AddGoalPos, ACTOR_PARTNER, -40, 15, 0) + Call(FlyToGoal, ACTOR_PARTNER, 20, -20, EASING_QUARTIC_OUT) + Call(GetActorVar, ACTOR_SELF, AVAR_Twink_PowerLevel, LVarF) + IfGt(LVarF, 1) + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) + EndIf + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_TWINK_ATTACK) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(AddGoalPos, ACTOR_PARTNER, -10, 0, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_Twink_Angry) + Call(FlyToGoal, ACTOR_PARTNER, 5, 0, EASING_LINEAR) + Call(GetActorVar, ACTOR_SELF, AVAR_Twink_PowerLevel, LVarF) + IfGt(LVarF, 0) + Call(PartnerDamageEnemy, LVar0, 0, 0, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) + Else + Call(PartnerDamageEnemy, LVar0, 0, 0, 0, LVarF, BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_INCLUDE_POWER_UPS) + EndIf + Call(UseBattleCamPreset, BTL_CAM_PRESET_03) + Call(MoveBattleCamOver, 10) + Call(AddGoalPos, ACTOR_PARTNER, 150, 100, 0) + Call(FlyToGoal, ACTOR_PARTNER, 15, 20, EASING_LINEAR) + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE) + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Loop(0) + Wait(1) + Call(GetActorVar, ACTOR_ENEMY0, AVAR_Kammy_Speaking, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(SetActorSounds, ACTOR_PARTNER, ACTOR_SOUND_FLY, SOUND_TWINK_FLY_A, SOUND_TWINK_FLY_B) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_Twink_Angry) + Call(SetActorSpeed, ACTOR_PARTNER, Float(8.0)) + Call(FlyToGoal, ACTOR_PARTNER, 0, -20, EASING_COS_IN_OUT) + Call(EnableIdleScript, ACTOR_PARTNER, IDLE_SCRIPT_ENABLE) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Return + End }; diff --git a/src/battle/partner/watt.c b/src/battle/partner/watt.c index 4d6fdcf68d0..eb296c700fe 100644 --- a/src/battle/partner/watt.c +++ b/src/battle/partner/watt.c @@ -526,854 +526,854 @@ ActorBlueprint NAMESPACE = { }; EvtScript N(EVS_Init) = { - EVT_CALL(BindTakeTurn, ACTOR_SELF, EVT_PTR(N(EVS_TakeTurn))) - EVT_CALL(BindIdle, ACTOR_SELF, EVT_PTR(N(EVS_Idle))) - EVT_CALL(BindHandleEvent, ACTOR_SELF, EVT_PTR(N(EVS_HandleEvent))) - EVT_CALL(BindHandlePhase, ACTOR_SELF, EVT_PTR(N(EVS_HandlePhase))) - EVT_RETURN - EVT_END + Call(BindTakeTurn, ACTOR_SELF, Ref(N(EVS_TakeTurn))) + Call(BindIdle, ACTOR_SELF, Ref(N(EVS_Idle))) + Call(BindHandleEvent, ACTOR_SELF, Ref(N(EVS_HandleEvent))) + Call(BindHandlePhase, ACTOR_SELF, Ref(N(EVS_HandlePhase))) + Return + End }; EvtScript N(EVS_Idle) = { - EVT_SET_PRIORITY(99) - EVT_CALL(N(WattFXUpdate)) - EVT_RETURN - EVT_END + SetPriority(99) + Call(N(WattFXUpdate)) + Return + End }; EvtScript N(EVS_HandleEvent) = { - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(N(WattFXDisableBounce)) - EVT_CALL(N(WattFXEnable)) - EVT_CALL(N(WattFXSetEffect), 0) - EVT_CALL(GetLastEvent, ACTOR_PARTNER, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Hurt) - EVT_SET_CONST(LVar2, ANIM_BattleWatt_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Hit) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Hurt) - EVT_EXEC_WAIT(EVS_Partner_NoDamageHit) - EVT_CALL(N(WattFXBounce)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_SPIKE_CONTACT) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Hurt) - EVT_SET_CONST(LVar2, 12) - EVT_EXEC_WAIT(EVS_Partner_SpikeContact) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_BURN_CONTACT) - EVT_CALL(N(WattFXDisable)) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_BurnHurt) - EVT_SET(LVar2, 12) - EVT_SET_CONST(LVar3, ANIM_BattleWatt_BurnStill) - EVT_EXEC_WAIT(EVS_Partner_BurnContact) - EVT_CALL(N(WattFXEnable)) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_BurnHurt) - EVT_SET_CONST(LVar2, ANIM_BattleWatt_BurnStill) - EVT_EXEC_WAIT(EVS_Partner_BurnHit) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_SHOCK_HIT) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Hurt) - EVT_SET(LVar2, 12) - EVT_EXEC_WAIT(EVS_Partner_ShockHit) - EVT_CASE_EQ(EVENT_33) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Hurt) - EVT_EXEC_WAIT(EVS_Partner_Drop) - EVT_CASE_EQ(EVENT_RECOVER_FROM_KO) - EVT_CALL(N(WattFXBounce)) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Idle) - EVT_SET_CONST(LVar2, ANIM_BattleWatt_Run) - EVT_SET(LVar3, 20) - EVT_EXEC_WAIT(EVS_Partner_Recover) - EVT_CALL(N(WattFXBounce)) - EVT_CASE_EQ(EVENT_PUT_PARTNER_AWAY) - EVT_CALL(N(WattFXRemove)) - EVT_CASE_OR_EQ(EVENT_18) - EVT_CASE_OR_EQ(EVENT_BLOCK) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Block) - EVT_EXEC_WAIT(EVS_Partner_NoDamageHit) - EVT_WAIT(10) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_LIFE_SHROOM_PROC) - EVT_CALL(N(WattFXDisable)) - EVT_CASE_EQ(EVENT_REVIVE) - EVT_CALL(N(WattFXEnable)) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(CloseActionCommandInfo) + Call(N(WattFXDisableBounce)) + Call(N(WattFXEnable)) + Call(N(WattFXSetEffect), 0) + Call(GetLastEvent, ACTOR_PARTNER, LVar0) + Switch(LVar0) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar1, ANIM_BattleWatt_Hurt) + SetConst(LVar2, ANIM_BattleWatt_Hurt) + ExecWait(EVS_Partner_Hit) + SetConst(LVar1, ANIM_BattleWatt_Hurt) + ExecWait(EVS_Partner_Drop) + EndCaseGroup + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_Hurt) + ExecWait(EVS_Partner_NoDamageHit) + Call(N(WattFXBounce)) + EndCaseGroup + CaseEq(EVENT_SPIKE_CONTACT) + SetConst(LVar1, ANIM_BattleWatt_Hurt) + SetConst(LVar2, 12) + ExecWait(EVS_Partner_SpikeContact) + SetConst(LVar1, ANIM_BattleWatt_Hurt) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_BURN_CONTACT) + Call(N(WattFXDisable)) + SetConst(LVar1, ANIM_BattleWatt_BurnHurt) + Set(LVar2, 12) + SetConst(LVar3, ANIM_BattleWatt_BurnStill) + ExecWait(EVS_Partner_BurnContact) + Call(N(WattFXEnable)) + SetConst(LVar1, ANIM_BattleWatt_Hurt) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_BURN_HIT) + SetConst(LVar1, ANIM_BattleWatt_BurnHurt) + SetConst(LVar2, ANIM_BattleWatt_BurnStill) + ExecWait(EVS_Partner_BurnHit) + SetConst(LVar1, ANIM_BattleWatt_Hurt) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_SHOCK_HIT) + SetConst(LVar1, ANIM_BattleWatt_Hurt) + Set(LVar2, 12) + ExecWait(EVS_Partner_ShockHit) + CaseEq(EVENT_33) + SetConst(LVar1, ANIM_BattleWatt_Hurt) + ExecWait(EVS_Partner_Drop) + CaseEq(EVENT_RECOVER_FROM_KO) + Call(N(WattFXBounce)) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_Idle) + SetConst(LVar2, ANIM_BattleWatt_Run) + Set(LVar3, 20) + ExecWait(EVS_Partner_Recover) + Call(N(WattFXBounce)) + CaseEq(EVENT_PUT_PARTNER_AWAY) + Call(N(WattFXRemove)) + CaseOrEq(EVENT_18) + CaseOrEq(EVENT_BLOCK) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_NO_DAMGE) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_Block) + ExecWait(EVS_Partner_NoDamageHit) + Wait(10) + EndCaseGroup + CaseEq(EVENT_LIFE_SHROOM_PROC) + Call(N(WattFXDisable)) + CaseEq(EVENT_REVIVE) + Call(N(WattFXEnable)) + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Return + End }; EvtScript N(EVS_TakeTurn) = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_EXECUTE_ACTION) - EVT_EXEC_WAIT(N(EVS_ExecuteAction)) - EVT_CASE_EQ(PHASE_CELEBRATE) - EVT_EXEC_WAIT(N(EVS_Celebrate)) - EVT_CASE_EQ(PHASE_RUN_AWAY_START) - EVT_EXEC_WAIT(N(EVS_RunAway)) - EVT_CASE_EQ(PHASE_RUN_AWAY_FAIL) - EVT_EXEC_WAIT(N(EVS_RunAwayFail)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_EXECUTE_ACTION) + ExecWait(N(EVS_ExecuteAction)) + CaseEq(PHASE_CELEBRATE) + ExecWait(N(EVS_Celebrate)) + CaseEq(PHASE_RUN_AWAY_START) + ExecWait(N(EVS_RunAway)) + CaseEq(PHASE_RUN_AWAY_FAIL) + ExecWait(N(EVS_RunAwayFail)) + EndSwitch + Return + End }; EvtScript N(EVS_Celebrate) = { - EVT_CALL(N(WattFXEnable)) - EVT_CALL(N(WattFXSetEffect), 1) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Celebrate) - EVT_SET_CONST(LVar2, ANIM_BattleWatt_Walk) - EVT_SET_CONST(LVar3, ANIM_BattleWatt_Idle) - EVT_EXEC_WAIT(EVS_Partner_Celebrate) - EVT_RETURN - EVT_END + Call(N(WattFXEnable)) + Call(N(WattFXSetEffect), 1) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_Celebrate) + SetConst(LVar2, ANIM_BattleWatt_Walk) + SetConst(LVar3, ANIM_BattleWatt_Idle) + ExecWait(EVS_Partner_Celebrate) + Return + End }; EvtScript N(EVS_RunAway) = { - EVT_CALL(N(WattFXEnable)) - EVT_CALL(N(WattFXSetEffect), 1) - EVT_SET_CONST(LVar0, PRT_MAIN) - EVT_SET_CONST(LVar1, ANIM_BattleWatt_Run) - EVT_EXEC_WAIT(EVS_Partner_RunAway) - EVT_RETURN - EVT_END + Call(N(WattFXEnable)) + Call(N(WattFXSetEffect), 1) + SetConst(LVar0, PRT_MAIN) + SetConst(LVar1, ANIM_BattleWatt_Run) + ExecWait(EVS_Partner_RunAway) + Return + End }; EvtScript N(EVS_RunAwayFail) = { - EVT_CALL(N(WattFXEnable)) - EVT_CALL(N(WattFXSetEffect), 1) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Run) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, 0) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Idle) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_CALL(N(WattFXSetEffect), 0) - EVT_RETURN - EVT_END + Call(N(WattFXEnable)) + Call(N(WattFXSetEffect), 1) + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(6.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Run) + Call(SetActorYaw, ACTOR_PARTNER, 0) + Call(RunToGoal, ACTOR_PARTNER, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Idle) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Call(N(WattFXSetEffect), 0) + Return + End }; EvtScript N(EVS_HandlePhase) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_ExecuteAction) = { - EVT_CALL(ShowActionHud, TRUE) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(BTL_MENU_TYPE_STAR_POWERS) - EVT_CALL(LoadStarPowerScript) - EVT_EXEC_WAIT(LVar0) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_ELECTRO_DASH1) - EVT_EXEC_WAIT(N(EVS_Attack_ElectroDash)) - EVT_CASE_EQ(MOVE_ELECTRO_DASH2) - EVT_EXEC_WAIT(N(EVS_Attack_ElectroDash)) - EVT_CASE_EQ(MOVE_ELECTRO_DASH3) - EVT_EXEC_WAIT(N(EVS_Attack_ElectroDash)) - EVT_CASE_EQ(MOVE_POWER_SHOCK) - EVT_EXEC_WAIT(N(EVS_Attack_PowerShock)) - EVT_CASE_EQ(MOVE_TURBO_CHARGE) - EVT_EXEC_WAIT(N(EVS_Move_TurboCharge)) - EVT_CASE_EQ(MOVE_MEGA_SHOCK) - EVT_EXEC_WAIT(N(EVS_Attack_MegaShock)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(ShowActionHud, TRUE) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar0) + CaseEq(BTL_MENU_TYPE_STAR_POWERS) + Call(LoadStarPowerScript) + ExecWait(LVar0) + Return + EndSwitch + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar2) + CaseEq(MOVE_ELECTRO_DASH1) + ExecWait(N(EVS_Attack_ElectroDash)) + CaseEq(MOVE_ELECTRO_DASH2) + ExecWait(N(EVS_Attack_ElectroDash)) + CaseEq(MOVE_ELECTRO_DASH3) + ExecWait(N(EVS_Attack_ElectroDash)) + CaseEq(MOVE_POWER_SHOCK) + ExecWait(N(EVS_Attack_PowerShock)) + CaseEq(MOVE_TURBO_CHARGE) + ExecWait(N(EVS_Move_TurboCharge)) + CaseEq(MOVE_MEGA_SHOCK) + ExecWait(N(EVS_Attack_MegaShock)) + EndSwitch + Return + End }; EvtScript N(returnHome2) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_04) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Run) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Idle) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_PRESET_04) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Run) + Call(FlyToGoal, ACTOR_PARTNER, 30, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Idle) + Return + End }; EvtScript N(EVS_ReturnHome) = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_51) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Run) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Idle) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_PRESET_51) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Run) + Call(FlyToGoal, ACTOR_PARTNER, 30, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Idle) + Return + End }; EffectInstance* N(radialShimmer) = NULL; EvtScript N(dashToTarget) = { - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Run) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 20, 0, EASING_LINEAR) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Run) + Call(FlyToGoal, ACTOR_PARTNER, 20, 0, EASING_LINEAR) + Return + End }; EvtScript N(charge) = { - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Strain) - EVT_CALL(N(WattFXDisable)) - EVT_CALL(PlayLoopingSoundAtActor, ACTOR_PARTNER, 0, SOUND_WATT_CHARGE) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 12) - EVT_CALL(N(ElectroDashFX), LVar0, LVar1, LVar2) - EVT_CALL(N(UnkBackgroundFunc3)) - EVT_SET(LVar9, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_StrainBigger) - EVT_LOOP(55) - EVT_ADD(LVar9, 30) - EVT_IF_GT(LVar9, 200) - EVT_SET(LVar9, 200) - EVT_END_IF - EVT_CALL(N(SetBackgroundAlpha), LVar9) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorPaletteEffect, ACTOR_SELF, PRT_MAIN, ACTOR_PAL_ADJUST_WATT_IDLE) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Strain) + Call(N(WattFXDisable)) + Call(PlayLoopingSoundAtActor, ACTOR_PARTNER, 0, SOUND_WATT_CHARGE) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 12) + Call(N(ElectroDashFX), LVar0, LVar1, LVar2) + Call(N(UnkBackgroundFunc3)) + Set(LVar9, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_StrainBigger) + Loop(55) + Add(LVar9, 30) + IfGt(LVar9, 200) + Set(LVar9, 200) + EndIf + Call(N(SetBackgroundAlpha), LVar9) + Wait(1) + EndLoop + Call(SetActorPaletteEffect, ACTOR_SELF, PRT_MAIN, ACTOR_PAL_ADJUST_WATT_IDLE) + Return + End }; EvtScript N(EVS_ElectroDashDelay) = { - EVT_LOOP(30) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(30) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_Attack_ElectroDash) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_BODY_SLAM) - EVT_CALL(action_command_body_slam_init) - EVT_CALL(SetupMashMeter, 1, 100, 0, 0, 0, 0) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_48) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, -20, 0, 0) - EVT_SET(LFlag2, FALSE) - EVT_LOOP(60) - EVT_CALL(CheckButtonDown, BUTTON_A, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_SET(LFlag2, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(MoveBattleCamOver, 75) - EVT_IF_EQ(LFlag2, TRUE) - EVT_CALL(action_command_body_slam_start, 0, 102, 3, 1) - EVT_SET(LFlag0, FALSE) - EVT_EXEC_GET_TID(N(dashToTarget), LVarA) - EVT_LOOP(20) - EVT_CALL(CheckButtonDown, BUTTON_A, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_KILL_THREAD(LVarA) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SET(LFlag0, FALSE) - EVT_EXEC_GET_TID(N(charge), LVarA) - EVT_LOOP(55) - EVT_CALL(CheckButtonDown, BUTTON_A, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_KILL_THREAD(LVarA) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_EXEC_GET_TID(N(EVS_ElectroDashDelay), LVarA) - EVT_LOOP(30) - EVT_CALL(CheckButtonDown, BUTTON_A, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_KILL_THREAD(LVarA) - EVT_GOTO(10) - EVT_END_IF - EVT_END_IF - EVT_ELSE - EVT_SET(LFlag0, FALSE) - EVT_EXEC_GET_TID(N(dashToTarget), LVarA) - EVT_LOOP(20) - EVT_CALL(CheckButtonDown, BUTTON_A, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_IF_EQ(LFlag2, FALSE) - EVT_CALL(action_command_body_slam_start, 0, 92, 3, 1) - EVT_SET(LFlag2, TRUE) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LFlag2, TRUE) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_KILL_THREAD(LVarA) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_SET(LFlag0, FALSE) - EVT_EXEC_GET_TID(N(charge), LVarA) - EVT_LOOP(55) - EVT_CALL(CheckButtonDown, BUTTON_A, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_IF_EQ(LFlag2, FALSE) - EVT_CALL(action_command_body_slam_start, 0, 92, 3, 1) - EVT_SET(LFlag2, TRUE) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LFlag2, TRUE) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_KILL_THREAD(LVarA) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_EXEC_GET_TID(N(EVS_ElectroDashDelay), LVarA) - EVT_LOOP(30) - EVT_CALL(CheckButtonDown, BUTTON_A, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LFlag0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(LFlag0, TRUE) - EVT_KILL_THREAD(LVarA) - EVT_GOTO(10) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_LABEL(10) - EVT_WAIT(2) - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(N(ElectroDashFXDisable)) - EVT_CALL(StopLoopingSoundAtActor, ACTOR_PARTNER, 0) - EVT_CALL(SetDamageSource, DMG_SRC_ELECTRO_DASH) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Strain) - EVT_CALL(SetActorPaletteEffect, ACTOR_SELF, PRT_MAIN, ACTOR_PAL_ADJUST_WATT_ATTACK) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, -5, 0, 0) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 5, 0, EASING_LINEAR) - EVT_THREAD - EVT_WAIT(2) - EVT_CALL(N(SetBackgroundAlpha), 0) - EVT_END_THREAD - EVT_CALL(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Idle) - EVT_END_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, 40, 10, 0) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 10, -20, EASING_QUADRATIC_OUT) - EVT_WAIT(20) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Run) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Idle) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(WattFXEnable)) - EVT_CALL(N(WattFXBounce)) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(MOVE_ELECTRO_DASH1) - EVT_SET(LVarE, 1) - EVT_SET(LVarF, 3) - EVT_CASE_EQ(MOVE_ELECTRO_DASH2) - EVT_SET(LVarE, 1) - EVT_SET(LVarF, 4) - EVT_CASE_EQ(MOVE_ELECTRO_DASH3) - EVT_SET(LVarE, 1) - EVT_SET(LVarF, 5) - EVT_END_SWITCH - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_IGNORE_DEFENSE, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_SHOCK_CONTACT | SUPPRESS_EVENT_ALT_SPIKY, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_IGNORE_DEFENSE, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_SHOCK_CONTACT | SUPPRESS_EVENT_ALT_SPIKY, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_CALL(PartnerYieldTurn) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_EXEC_WAIT(N(returnHome2)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_BODY_SLAM) + Call(action_command_body_slam_init) + Call(SetupMashMeter, 1, 100, 0, 0, 0, 0) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_48) + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(AddGoalPos, ACTOR_PARTNER, -20, 0, 0) + Set(LFlag2, FALSE) + Loop(60) + Call(CheckButtonDown, BUTTON_A, LVar0) + IfNe(LVar0, 0) + Set(LFlag2, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(MoveBattleCamOver, 75) + IfEq(LFlag2, TRUE) + Call(action_command_body_slam_start, 0, 102, 3, 1) + Set(LFlag0, FALSE) + ExecGetTID(N(dashToTarget), LVarA) + Loop(20) + Call(CheckButtonDown, BUTTON_A, LVar0) + IfEq(LVar0, 0) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + KillThread(LVarA) + Goto(10) + EndIf + Call(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Set(LFlag0, FALSE) + ExecGetTID(N(charge), LVarA) + Loop(55) + Call(CheckButtonDown, BUTTON_A, LVar0) + IfEq(LVar0, 0) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + KillThread(LVarA) + Goto(10) + EndIf + IfEq(LFlag0, FALSE) + ExecGetTID(N(EVS_ElectroDashDelay), LVarA) + Loop(30) + Call(CheckButtonDown, BUTTON_A, LVar0) + IfEq(LVar0, 0) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + KillThread(LVarA) + Goto(10) + EndIf + EndIf + Else + Set(LFlag0, FALSE) + ExecGetTID(N(dashToTarget), LVarA) + Loop(20) + Call(CheckButtonDown, BUTTON_A, LVar0) + IfNe(LVar0, 0) + IfEq(LFlag2, FALSE) + Call(action_command_body_slam_start, 0, 92, 3, 1) + Set(LFlag2, TRUE) + EndIf + EndIf + IfEq(LFlag2, TRUE) + IfEq(LVar0, 0) + Set(LFlag0, TRUE) + BreakLoop + EndIf + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + KillThread(LVarA) + Goto(10) + EndIf + Call(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Set(LFlag0, FALSE) + ExecGetTID(N(charge), LVarA) + Loop(55) + Call(CheckButtonDown, BUTTON_A, LVar0) + IfNe(LVar0, 0) + IfEq(LFlag2, FALSE) + Call(action_command_body_slam_start, 0, 92, 3, 1) + Set(LFlag2, TRUE) + EndIf + EndIf + IfEq(LFlag2, TRUE) + IfEq(LVar0, 0) + Set(LFlag0, TRUE) + BreakLoop + EndIf + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + KillThread(LVarA) + Goto(10) + EndIf + IfEq(LFlag0, FALSE) + ExecGetTID(N(EVS_ElectroDashDelay), LVarA) + Loop(30) + Call(CheckButtonDown, BUTTON_A, LVar0) + IfEq(LVar0, 0) + Set(LFlag0, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(LFlag0, TRUE) + KillThread(LVarA) + Goto(10) + EndIf + EndIf + EndIf + Label(10) + Wait(2) + Call(CloseActionCommandInfo) + Call(N(ElectroDashFXDisable)) + Call(StopLoopingSoundAtActor, ACTOR_PARTNER, 0) + Call(SetDamageSource, DMG_SRC_ELECTRO_DASH) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Strain) + Call(SetActorPaletteEffect, ACTOR_SELF, PRT_MAIN, ACTOR_PAL_ADJUST_WATT_ATTACK) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(AddGoalPos, ACTOR_PARTNER, -5, 0, 0) + Call(FlyToGoal, ACTOR_PARTNER, 5, 0, EASING_LINEAR) + Thread + Wait(2) + Call(N(SetBackgroundAlpha), 0) + EndThread + Call(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, HIT_RESULT_MISS) + Thread + Wait(5) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Idle) + EndThread + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(AddGoalPos, ACTOR_PARTNER, 40, 10, 0) + Call(FlyToGoal, ACTOR_PARTNER, 10, -20, EASING_QUADRATIC_OUT) + Wait(20) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Run) + Call(FlyToGoal, ACTOR_PARTNER, 30, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Idle) + Return + EndIf + Call(N(WattFXEnable)) + Call(N(WattFXBounce)) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar2) + CaseEq(MOVE_ELECTRO_DASH1) + Set(LVarE, 1) + Set(LVarF, 3) + CaseEq(MOVE_ELECTRO_DASH2) + Set(LVarE, 1) + Set(LVarF, 4) + CaseEq(MOVE_ELECTRO_DASH3) + Set(LVarE, 1) + Set(LVarF, 5) + EndSwitch + Call(GetPartnerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(0) + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_IGNORE_DEFENSE, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_SHOCK_CONTACT | SUPPRESS_EVENT_ALT_SPIKY, 0, LVarF, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(PartnerDamageEnemy, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_IGNORE_DEFENSE, SUPPRESS_EVENT_SPIKY_TOP | SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_SHOCK_CONTACT | SUPPRESS_EVENT_ALT_SPIKY, 0, LVarE, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Call(PartnerYieldTurn) + Switch(LVar0) + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + ExecWait(N(returnHome2)) + EndCaseGroup + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_Attack_PowerShock) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_POWER_SHOCK) - EVT_CALL(action_command_power_shock_init) - EVT_CALL(SetupMashMeter, 1, 100, 0, 0, 0, 0) - EVT_CALL(SetActionHudPrepareTime, 0) - EVT_SET(LFlagF, FALSE) - EVT_CALL(GetOwnerTarget, LVarA, LVarB) - EVT_CALL(GetActorFlags, LVarA, LVar0) - EVT_IF_FLAG(LVar0, ACTOR_FLAG_UPSIDE_DOWN) - EVT_SET(LFlagF, TRUE) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_PARTNER_APPROACH) - EVT_CALL(MoveBattleCamOver, 40) - EVT_CALL(InitTargetIterator) - EVT_CALL(SetGoalToTarget, ACTOR_PARTNER) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Run) - EVT_CALL(N(WattFXSetEffect), 1) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, -15, -10, 0) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 30, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Idle) - EVT_CALL(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_CALL(AddBattleCamZoom, -100) - EVT_CALL(MoveBattleCamOver, 80) - EVT_CALL(N(WattFXDisable)) - EVT_CALL(N(TargetParalyzeChance)) - EVT_CALL(action_command_power_shock_start, 0, 75 * DT - 3, 3, LVar0) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_ADD(LVar2, 5) - EVT_PLAY_EFFECT(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 75 * DT, 0) - EVT_CALL(N(UnkBackgroundFunc3)) - EVT_SET(LVar9, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_StrainBigger) - EVT_CALL(SetActorPaletteEffect, ACTOR_SELF, PRT_MAIN, ACTOR_PAL_ADJUST_WATT_ATTACK) - EVT_THREAD - EVT_LOOP(75 * DT) - EVT_ADD(LVar9, 3) - EVT_CALL(N(SetBackgroundAlpha), LVar9) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(75 * DT) - EVT_CALL(SetActorPaletteEffect, ACTOR_SELF, PRT_MAIN, ACTOR_PAL_ADJUST_WATT_IDLE) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_WATT_POWER_SHOCK) - EVT_THREAD - EVT_SETF(LVar0, EVT_FLOAT(1.0)) - EVT_LOOP(3) - EVT_ADDF(LVar0, EVT_FLOAT(0.4)) - EVT_CALL(SetActorScale, ACTOR_PARTNER, LVar0, LVar0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 8) - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 6, LVar0, LVar1, LVar2, EVT_FLOAT(1.8), 30, 0) - EVT_END_THREAD - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar2, 5) - EVT_CALL(N(PowerShockFX), LVar0, LVar1, LVar2) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PARTNER_APPROACH) - EVT_CALL(AddBattleCamZoom, 100) - EVT_CALL(MoveBattleCamOver, 5) - EVT_THREAD - EVT_CALL(N(PowerShockDischargeFX), 20) - EVT_END_THREAD - EVT_LOOP(3) - EVT_CALL(N(SetBackgroundAlpha), 0) - EVT_WAIT(1) - EVT_CALL(N(SetBackgroundAlpha), 200) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(N(SetBackgroundAlpha), 0) - EVT_WAIT(10) - EVT_CALL(N(WattFXEnable)) - EVT_CALL(N(WattFXSetEffect), 0) - EVT_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 20, 0) - EVT_SETF(LVar0, EVT_FLOAT(2.2)) - EVT_LOOP(12) - EVT_SUBF(LVar0, EVT_FLOAT(0.1)) - EVT_CALL(SetActorScale, ACTOR_PARTNER, LVar0, LVar0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Idle) - EVT_END_THREAD - EVT_CALL(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_WAIT(15) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetActionQuality, LVarF) - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(0) - EVT_CALL(PartnerAfflictEnemy, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, DMG_STATUS_ALWAYS(STATUS_FLAG_PARALYZE, 3), 254, 0, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) - EVT_CASE_DEFAULT - EVT_CALL(PartnerAfflictEnemy, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, DMG_STATUS_ALWAYS(STATUS_FLAG_PARALYZE, 3), 255, 0, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) - EVT_END_SWITCH - EVT_CALL(PartnerYieldTurn) - EVT_IF_NE(LFlagF, TRUE) - EVT_CALL(AddGoalPos, ACTOR_PARTNER, -25, 10, 0) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 15, -10, EASING_COS_IN_OUT) - EVT_ELSE - EVT_CALL(AddGoalPos, ACTOR_PARTNER, -25, -10, 0) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 15, -10, EASING_COS_IN_OUT) - EVT_END_IF - EVT_WAIT(30) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(HIT_RESULT_NICE) - EVT_CASE_OR_EQ(HIT_RESULT_NICE_NO_DAMAGE) - EVT_EXEC_WAIT(N(returnHome2)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(HIT_RESULT_HIT) - EVT_CASE_OR_EQ(HIT_RESULT_NO_DAMAGE) - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_POWER_SHOCK) + Call(action_command_power_shock_init) + Call(SetupMashMeter, 1, 100, 0, 0, 0, 0) + Call(SetActionHudPrepareTime, 0) + Set(LFlagF, FALSE) + Call(GetOwnerTarget, LVarA, LVarB) + Call(GetActorFlags, LVarA, LVar0) + IfFlag(LVar0, ACTOR_FLAG_UPSIDE_DOWN) + Set(LFlagF, TRUE) + EndIf + Call(UseBattleCamPreset, BTL_CAM_PARTNER_APPROACH) + Call(MoveBattleCamOver, 40) + Call(InitTargetIterator) + Call(SetGoalToTarget, ACTOR_PARTNER) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Run) + Call(N(WattFXSetEffect), 1) + Call(AddGoalPos, ACTOR_PARTNER, -15, -10, 0) + Call(FlyToGoal, ACTOR_PARTNER, 30, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Idle) + Call(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + Call(AddBattleCamZoom, -100) + Call(MoveBattleCamOver, 80) + Call(N(WattFXDisable)) + Call(N(TargetParalyzeChance)) + Call(action_command_power_shock_start, 0, 75 * DT - 3, 3, LVar0) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 15) + Add(LVar2, 5) + PlayEffect(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, Float(1.0), 75 * DT, 0) + Call(N(UnkBackgroundFunc3)) + Set(LVar9, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_StrainBigger) + Call(SetActorPaletteEffect, ACTOR_SELF, PRT_MAIN, ACTOR_PAL_ADJUST_WATT_ATTACK) + Thread + Loop(75 * DT) + Add(LVar9, 3) + Call(N(SetBackgroundAlpha), LVar9) + Wait(1) + EndLoop + EndThread + Wait(75 * DT) + Call(SetActorPaletteEffect, ACTOR_SELF, PRT_MAIN, ACTOR_PAL_ADJUST_WATT_IDLE) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_WATT_POWER_SHOCK) + Thread + SetF(LVar0, Float(1.0)) + Loop(3) + AddF(LVar0, Float(0.4)) + Call(SetActorScale, ACTOR_PARTNER, LVar0, LVar0, LVar0) + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 8) + PlayEffect(EFFECT_ENERGY_IN_OUT, 6, LVar0, LVar1, LVar2, Float(1.8), 30, 0) + EndThread + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Add(LVar2, 5) + Call(N(PowerShockFX), LVar0, LVar1, LVar2) + Call(UseBattleCamPreset, BTL_CAM_PARTNER_APPROACH) + Call(AddBattleCamZoom, 100) + Call(MoveBattleCamOver, 5) + Thread + Call(N(PowerShockDischargeFX), 20) + EndThread + Loop(3) + Call(N(SetBackgroundAlpha), 0) + Wait(1) + Call(N(SetBackgroundAlpha), 200) + Wait(1) + EndLoop + Call(N(SetBackgroundAlpha), 0) + Wait(10) + Call(N(WattFXEnable)) + Call(N(WattFXSetEffect), 0) + Thread + Call(SetActorRotationOffset, ACTOR_SELF, 0, 20, 0) + SetF(LVar0, Float(2.2)) + Loop(12) + SubF(LVar0, Float(0.1)) + Call(SetActorScale, ACTOR_PARTNER, LVar0, LVar0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Idle) + EndThread + Call(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, HIT_RESULT_MISS) + Wait(15) + ExecWait(N(EVS_ReturnHome)) + Return + EndIf + Call(GetActionQuality, LVarF) + Call(GetPartnerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(0) + Call(PartnerAfflictEnemy, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, DMG_STATUS_ALWAYS(STATUS_FLAG_PARALYZE, 3), 254, 0, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) + CaseDefault + Call(PartnerAfflictEnemy, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, DMG_STATUS_ALWAYS(STATUS_FLAG_PARALYZE, 3), 255, 0, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS) + EndSwitch + Call(PartnerYieldTurn) + IfNe(LFlagF, TRUE) + Call(AddGoalPos, ACTOR_PARTNER, -25, 10, 0) + Call(FlyToGoal, ACTOR_PARTNER, 15, -10, EASING_COS_IN_OUT) + Else + Call(AddGoalPos, ACTOR_PARTNER, -25, -10, 0) + Call(FlyToGoal, ACTOR_PARTNER, 15, -10, EASING_COS_IN_OUT) + EndIf + Wait(30) + Switch(LVar0) + CaseOrEq(HIT_RESULT_NICE) + CaseOrEq(HIT_RESULT_NICE_NO_DAMAGE) + ExecWait(N(returnHome2)) + EndCaseGroup + CaseOrEq(HIT_RESULT_HIT) + CaseOrEq(HIT_RESULT_NO_DAMAGE) + ExecWait(N(EVS_ReturnHome)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_TurboCharge_HealthyPlayer) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_WATER_BLOCK) - EVT_CALL(action_command_water_block_init, 1) - EVT_CALL(SetActionHudPrepareTime, 0) - EVT_CALL(SetActorFlagBits, ACTOR_PLAYER, ACTOR_FLAG_NO_INACTIVE_ANIM, TRUE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_UsePower) - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, -125, 42, 0) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(SetBattleCamZoom, 340) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, 30) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, 60) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, 90) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, 120) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, 150) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, 180) - EVT_WAIT(10) - EVT_CALL(action_command_water_block_start, 0, 100 * DT, 3) - EVT_CALL(AddBattleCamZoom, -75) - EVT_CALL(MoveBattleCamOver, 100 * DT) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) - EVT_THREAD - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Strain) - EVT_CALL(N(TurboChargeUnwindWatt), 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Run) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 10, -10, EASING_CUBIC_OUT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Idle) - EVT_WAIT(10) - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE) - EVT_END_THREAD - EVT_WAIT(30) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_WATT_TURBO_CHARGE) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 42) - EVT_CALL(N(TurboChargeFX), LVar0, LVar1, LVar2) - EVT_WAIT(59) - EVT_CALL(AddBattleCamZoom, 100) - EVT_CALL(MoveBattleCamOver, 5) - EVT_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 20, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GROW) - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_CALL(N(ApplyTurboCharge)) - EVT_SET(LVarE, LVarF) - EVT_IF_GT(LVarA, 0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 15) - EVT_ADD(LVar1, 35) - EVT_ADD(LVarF, 0) - EVT_PLAY_EFFECT(EFFECT_STAT_CHANGE, LVarF, LVar0, LVar1, LVar2, EVT_FLOAT(1.5), 60, 0) - EVT_WAIT(4) - EVT_END_IF - EVT_IF_EQ(LVar0, 0) - EVT_ELSE - EVT_CALL(ShowVariableMessageBox, BTL_MSG_TURBO_CHARGE_BEGIN, 60, LVarA) - EVT_END_IF - EVT_CALL(WaitForMessageBoxDone) - EVT_CALL(SetActorFlagBits, ACTOR_PLAYER, ACTOR_FLAG_NO_INACTIVE_ANIM, FALSE) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_WATER_BLOCK) + Call(action_command_water_block_init, 1) + Call(SetActionHudPrepareTime, 0) + Call(SetActorFlagBits, ACTOR_PLAYER, ACTOR_FLAG_NO_INACTIVE_ANIM, TRUE) + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_UsePower) + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, -125, 42, 0) + Call(SetBattleCamOffsetZ, 0) + Call(SetBattleCamZoom, 340) + Call(MoveBattleCamOver, 30) + Call(SetActorYaw, ACTOR_PARTNER, 30) + Wait(1) + Call(SetActorYaw, ACTOR_PARTNER, 60) + Wait(1) + Call(SetActorYaw, ACTOR_PARTNER, 90) + Wait(1) + Call(SetActorYaw, ACTOR_PARTNER, 120) + Wait(1) + Call(SetActorYaw, ACTOR_PARTNER, 150) + Wait(1) + Call(SetActorYaw, ACTOR_PARTNER, 180) + Wait(10) + Call(action_command_water_block_start, 0, 100 * DT, 3) + Call(AddBattleCamZoom, -75) + Call(MoveBattleCamOver, 100 * DT) + Call(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) + Thread + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Strain) + Call(N(TurboChargeUnwindWatt), 0) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Run) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(FlyToGoal, ACTOR_PARTNER, 10, -10, EASING_CUBIC_OUT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Idle) + Wait(10) + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE) + EndThread + Wait(30) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_WATT_TURBO_CHARGE) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 42) + Call(N(TurboChargeFX), LVar0, LVar1, LVar2) + Wait(59) + Call(AddBattleCamZoom, 100) + Call(MoveBattleCamOver, 5) + Thread + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.0)) + Call(SetActorSpeed, ACTOR_PLAYER, Float(1.0)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 20, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) + Wait(4) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + EndThread + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GROW) + Call(GetPartnerActionSuccess, LVar0) + Call(N(ApplyTurboCharge)) + Set(LVarE, LVarF) + IfGt(LVarA, 0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 15) + Add(LVar1, 35) + Add(LVarF, 0) + PlayEffect(EFFECT_STAT_CHANGE, LVarF, LVar0, LVar1, LVar2, Float(1.5), 60, 0) + Wait(4) + EndIf + IfEq(LVar0, 0) + Else + Call(ShowVariableMessageBox, BTL_MSG_TURBO_CHARGE_BEGIN, 60, LVarA) + EndIf + Call(WaitForMessageBoxDone) + Call(SetActorFlagBits, ACTOR_PLAYER, ACTOR_FLAG_NO_INACTIVE_ANIM, FALSE) + Return + End }; EvtScript N(EVS_TurboCharge_ImmobilePlayer) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_WATER_BLOCK) - EVT_CALL(action_command_water_block_init, 1) - EVT_CALL(SetActionHudPrepareTime, 0) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, -125, 42, 0) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(SetBattleCamZoom, 340) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, 30) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, 60) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, 90) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, 120) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, 150) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PARTNER, 180) - EVT_WAIT(10) - EVT_CALL(action_command_water_block_start, 0, 100 * DT, 3) - EVT_CALL(AddBattleCamZoom, -100) - EVT_CALL(MoveBattleCamOver, 100 * DT) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) - EVT_THREAD - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Strain) - EVT_CALL(N(TurboChargeUnwindWatt), 1) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Run) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 10, -10, EASING_CUBIC_OUT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Idle) - EVT_WAIT(10) - EVT_CALL(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE) - EVT_END_THREAD - EVT_WAIT(30) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_WATT_TURBO_CHARGE) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 42) - EVT_CALL(N(TurboChargeFX), LVar0, LVar1, LVar2) - EVT_WAIT(59) - EVT_CALL(AddBattleCamZoom, 100) - EVT_CALL(MoveBattleCamOver, 5) - EVT_WAIT(30) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 10) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GROW) - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_CALL(N(ApplyTurboCharge)) - EVT_SET(LVarE, LVarF) - EVT_IF_GT(LVarA, 0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 15) - EVT_ADD(LVar1, 35) - EVT_ADD(LVarF, 0) - EVT_PLAY_EFFECT(EFFECT_STAT_CHANGE, LVarF, LVar0, LVar1, LVar2, EVT_FLOAT(1.5), 60, 0) - EVT_WAIT(4) - EVT_END_IF - EVT_IF_EQ(LVar0, 0) - EVT_ELSE - EVT_CALL(ShowVariableMessageBox, BTL_MSG_TURBO_CHARGE_BEGIN, 60, LVarA) - EVT_END_IF - EVT_CALL(WaitForMessageBoxDone) - EVT_CALL(SetActorFlagBits, ACTOR_PLAYER, ACTOR_FLAG_NO_INACTIVE_ANIM, FALSE) - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_WATER_BLOCK) + Call(action_command_water_block_init, 1) + Call(SetActionHudPrepareTime, 0) + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, -125, 42, 0) + Call(SetBattleCamOffsetZ, 0) + Call(SetBattleCamZoom, 340) + Call(MoveBattleCamOver, 30) + Call(SetActorYaw, ACTOR_PARTNER, 30) + Wait(1) + Call(SetActorYaw, ACTOR_PARTNER, 60) + Wait(1) + Call(SetActorYaw, ACTOR_PARTNER, 90) + Wait(1) + Call(SetActorYaw, ACTOR_PARTNER, 120) + Wait(1) + Call(SetActorYaw, ACTOR_PARTNER, 150) + Wait(1) + Call(SetActorYaw, ACTOR_PARTNER, 180) + Wait(10) + Call(action_command_water_block_start, 0, 100 * DT, 3) + Call(AddBattleCamZoom, -100) + Call(MoveBattleCamOver, 100 * DT) + Call(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) + Thread + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_ENABLE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Strain) + Call(N(TurboChargeUnwindWatt), 1) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Run) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(FlyToGoal, ACTOR_PARTNER, 10, -10, EASING_CUBIC_OUT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Idle) + Wait(10) + Call(EnableActorBlur, ACTOR_PARTNER, ACTOR_BLUR_DISABLE) + EndThread + Wait(30) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_WATT_TURBO_CHARGE) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 42) + Call(N(TurboChargeFX), LVar0, LVar1, LVar2) + Wait(59) + Call(AddBattleCamZoom, 100) + Call(MoveBattleCamOver, 5) + Wait(30) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 10) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_GROW) + Call(GetPartnerActionSuccess, LVar0) + Call(N(ApplyTurboCharge)) + Set(LVarE, LVarF) + IfGt(LVarA, 0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 15) + Add(LVar1, 35) + Add(LVarF, 0) + PlayEffect(EFFECT_STAT_CHANGE, LVarF, LVar0, LVar1, LVar2, Float(1.5), 60, 0) + Wait(4) + EndIf + IfEq(LVar0, 0) + Else + Call(ShowVariableMessageBox, BTL_MSG_TURBO_CHARGE_BEGIN, 60, LVarA) + EndIf + Call(WaitForMessageBoxDone) + Call(SetActorFlagBits, ACTOR_PLAYER, ACTOR_FLAG_NO_INACTIVE_ANIM, FALSE) + Return + End }; EvtScript N(EVS_Move_TurboCharge) = { - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_EXEC_WAIT(N(EVS_TurboCharge_ImmobilePlayer)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_TurboCharge_HealthyPlayer)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + ExecWait(N(EVS_TurboCharge_ImmobilePlayer)) + Else + ExecWait(N(EVS_TurboCharge_HealthyPlayer)) + EndIf + Return + End }; s32 D_8023B948_707438[] = { 3, 3, 4, 7, 10, 13, 16, 16, 16, 16 }; EvtScript N(EVS_Attack_MegaShock) = { - EVT_CALL(LoadActionCommand, ACTION_COMMAND_MEGA_SHOCK) - EVT_CALL(action_command_mega_shock_init) - EVT_CALL(SetupMashMeter, 1, 100, 0, 0, 0, 0) - EVT_CALL(SetActionHudPrepareTime, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, -54, 63, 10) - EVT_CALL(SetBattleCamOffsetZ, 15) - EVT_CALL(SetBattleCamZoom, 314) - EVT_CALL(MoveBattleCamOver, 30) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_ADD(LVar1, 30) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Run) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 20, 0, EASING_COS_IN_OUT) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Idle) - EVT_CALL(N(UnkBackgroundFunc3)) - EVT_SET(LVar9, 0) - EVT_THREAD - EVT_LOOP(75 * DT) - EVT_ADD(LVar9, 3) - EVT_CALL(N(SetBackgroundAlpha), LVar9) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(N(AverageTargetParalyzeChance)) - EVT_CALL(action_command_mega_shock_start, 0, 87 * DT, 3, LVar0) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_ADD(LVar2, 5) - EVT_PLAY_EFFECT(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 90 * DT, 0) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 12) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 8, LVar0, LVar1, LVar2, EVT_FLOAT(1.3), 90 * DT, 0) - EVT_CALL(AddBattleCamZoom, -100) - EVT_CALL(MoveBattleCamOver, 90 * DT) - EVT_CALL(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_StrainBigger) - EVT_CALL(SetActorPaletteEffect, ACTOR_SELF, PRT_MAIN, ACTOR_PAL_ADJUST_WATT_ATTACK) - EVT_CALL(N(WattFXDisable)) - EVT_CALL(GetActionQuality, LVar1) - EVT_WAIT(90 * DT) - EVT_CALL(N(SetBackgroundAlpha), 0) - EVT_THREAD - EVT_SET(LVar9, 60) - EVT_LOOP(20) - EVT_SUB(LVar9, 3) - EVT_CALL(N(SetBackgroundAlpha), LVar9) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetActorPaletteEffect, ACTOR_SELF, PRT_MAIN, ACTOR_PAL_ADJUST_WATT_IDLE) - EVT_CALL(InitTargetIterator) - EVT_THREAD - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 12) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_WATT_MEGA_DISCHARGE) - EVT_PLAY_EFFECT(EFFECT_FLASHING_BOX_SHOCKWAVE, 2, LVar0, LVar1, LVar2, 0, 0, 0) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_WATT_MEGA_CHARGE_WAVE) - EVT_PLAY_EFFECT(EFFECT_FLASHING_BOX_SHOCKWAVE, 2, LVar0, LVar1, LVar2, 0, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_StrainBiggest) - EVT_WAIT(5) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Strain) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetBattleCamZoom, 420) - EVT_CALL(SetBattleCamTarget, 6, 63, 10) - EVT_CALL(MoveBattleCamOver, 15) - EVT_WAIT(4) - EVT_SET(LVar0, 6) - EVT_LOOP(30) - EVT_ADD(LVar0, 1) - EVT_CALL(SetBattleCamTarget, LVar0, 63, 10) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(PowerShockDischargeFX), 10) - EVT_END_THREAD - EVT_CALL(GetActionQuality, LVar0) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar1, LVar2, LVar3) - EVT_ADD(LVar2, 12) - EVT_CALL(N(MegaShockFX), LVar0, LVar1, LVar2, LVar3) - EVT_LOOP(0) - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetPartnerActionSuccess, LVarF) - EVT_CALL(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) - EVT_IF_EQ(LVar0, HIT_RESULT_MISS) - EVT_GOTO(11) - EVT_END_IF - EVT_IF_EQ(LVarF, 100) - EVT_CALL(PartnerAfflictEnemy, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, DMG_STATUS_ALWAYS(STATUS_FLAG_PARALYZE, 3), 254, 0, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) - EVT_ELSE - EVT_CALL(PartnerAfflictEnemy, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, DMG_STATUS_ALWAYS(STATUS_FLAG_PARALYZE, 3), LVarF, 0, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) - EVT_END_IF - EVT_LABEL(11) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_EQ(LVar0, ITER_NO_MORE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(5) - EVT_END_LOOP - EVT_CALL(N(WattFXEnable)) - EVT_CALL(PartnerYieldTurn) - EVT_WAIT(30) - EVT_CALL(GetPartnerActionSuccess, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(99) - EVT_EXEC_WAIT(N(returnHome2)) - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(N(EVS_ReturnHome)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(LoadActionCommand, ACTION_COMMAND_MEGA_SHOCK) + Call(action_command_mega_shock_init) + Call(SetupMashMeter, 1, 100, 0, 0, 0, 0) + Call(SetActionHudPrepareTime, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, -54, 63, 10) + Call(SetBattleCamOffsetZ, 15) + Call(SetBattleCamZoom, 314) + Call(MoveBattleCamOver, 30) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Add(LVar1, 30) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Run) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(FlyToGoal, ACTOR_PARTNER, 20, 0, EASING_COS_IN_OUT) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Idle) + Call(N(UnkBackgroundFunc3)) + Set(LVar9, 0) + Thread + Loop(75 * DT) + Add(LVar9, 3) + Call(N(SetBackgroundAlpha), LVar9) + Wait(1) + EndLoop + EndThread + Call(N(AverageTargetParalyzeChance)) + Call(action_command_mega_shock_start, 0, 87 * DT, 3, LVar0) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 15) + Add(LVar2, 5) + PlayEffect(EFFECT_SNAKING_STATIC, 0, LVar0, LVar1, LVar2, Float(1.0), 90 * DT, 0) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 12) + PlayEffect(EFFECT_RADIAL_SHIMMER, 8, LVar0, LVar1, LVar2, Float(1.3), 90 * DT, 0) + Call(AddBattleCamZoom, -100) + Call(MoveBattleCamOver, 90 * DT) + Call(func_8024ECF8, BTL_CAM_MODEY_0, BTL_CAM_MODEX_0, TRUE) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_StrainBigger) + Call(SetActorPaletteEffect, ACTOR_SELF, PRT_MAIN, ACTOR_PAL_ADJUST_WATT_ATTACK) + Call(N(WattFXDisable)) + Call(GetActionQuality, LVar1) + Wait(90 * DT) + Call(N(SetBackgroundAlpha), 0) + Thread + Set(LVar9, 60) + Loop(20) + Sub(LVar9, 3) + Call(N(SetBackgroundAlpha), LVar9) + Wait(1) + EndLoop + EndThread + Call(SetActorPaletteEffect, ACTOR_SELF, PRT_MAIN, ACTOR_PAL_ADJUST_WATT_IDLE) + Call(InitTargetIterator) + Thread + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 12) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_WATT_MEGA_DISCHARGE) + PlayEffect(EFFECT_FLASHING_BOX_SHOCKWAVE, 2, LVar0, LVar1, LVar2, 0, 0, 0) + Wait(10) + Call(PlaySoundAtActor, ACTOR_PARTNER, SOUND_WATT_MEGA_CHARGE_WAVE) + PlayEffect(EFFECT_FLASHING_BOX_SHOCKWAVE, 2, LVar0, LVar1, LVar2, 0, 0, 0) + EndThread + Thread + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_StrainBiggest) + Wait(5) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Strain) + Wait(30) + Call(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleWatt_Idle) + EndThread + Thread + Call(SetBattleCamZoom, 420) + Call(SetBattleCamTarget, 6, 63, 10) + Call(MoveBattleCamOver, 15) + Wait(4) + Set(LVar0, 6) + Loop(30) + Add(LVar0, 1) + Call(SetBattleCamTarget, LVar0, 63, 10) + Wait(1) + EndLoop + EndThread + Thread + Call(N(PowerShockDischargeFX), 10) + EndThread + Call(GetActionQuality, LVar0) + Call(GetActorPos, ACTOR_PARTNER, LVar1, LVar2, LVar3) + Add(LVar2, 12) + Call(N(MegaShockFX), LVar0, LVar1, LVar2, LVar3) + Loop(0) + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetPartnerActionSuccess, LVarF) + Call(PartnerTestEnemy, LVar0, 0, SUPPRESS_EVENT_SPIKY_FRONT | SUPPRESS_EVENT_BURN_CONTACT, 0, 1, BS_FLAGS1_INCLUDE_POWER_UPS) + IfEq(LVar0, HIT_RESULT_MISS) + Goto(11) + EndIf + IfEq(LVarF, 100) + Call(PartnerAfflictEnemy, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, DMG_STATUS_ALWAYS(STATUS_FLAG_PARALYZE, 3), 254, 0, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) + Else + Call(PartnerAfflictEnemy, LVar0, DAMAGE_TYPE_SHOCK | DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_STATUS_ALWAYS_HITS, 0, DMG_STATUS_ALWAYS(STATUS_FLAG_PARALYZE, 3), LVarF, 0, BS_FLAGS1_INCLUDE_POWER_UPS | BS_FLAGS1_TRIGGER_EVENTS | BS_FLAGS1_NICE_HIT) + EndIf + Label(11) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfEq(LVar0, ITER_NO_MORE) + BreakLoop + EndIf + Wait(5) + EndLoop + Call(N(WattFXEnable)) + Call(PartnerYieldTurn) + Wait(30) + Call(GetPartnerActionSuccess, LVar0) + Switch(LVar0) + CaseGt(99) + ExecWait(N(returnHome2)) + CaseDefault + ExecWait(N(EVS_ReturnHome)) + EndSwitch + Return + End }; diff --git a/src/battle/player_events.c b/src/battle/player_events.c index c837aa4ed60..c0e2bc6a8f6 100644 --- a/src/battle/player_events.c +++ b/src/battle/player_events.c @@ -665,1197 +665,1197 @@ API_CALLABLE(AbilityItemUnkDelay) { } EvtScript EVS_Mario_OnActorCreate = { - EVT_RETURN - EVT_END + Return + End }; EvtScript EVS_Peach_OnActorCreate = { - EVT_RETURN - EVT_END + Return + End }; EvtScript EVS_MarioEnterStage = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_ENTRY) - EVT_CALL(SetBattleCamTarget, -80, 35, 8) - EVT_CALL(BattleCamTargetActor, ACTOR_PLAYER) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 100) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(RandInt, 100, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GT(50) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, 0, ANIM_Mario1_Run) - EVT_CALL(PlayerRunToGoal, 25) - EVT_CALL(SetAnimation, ACTOR_SELF, 0, ANIM_Mario1_Idle) - EVT_CASE_GT(20) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_BeforeJump) - EVT_CALL(func_80273444, 18, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_BeforeJump) - EVT_WAIT(7) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CASE_DEFAULT - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(PlayerRunToGoal, 20) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CHILD_THREAD - EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(1.0)) - EVT_END_CHILD_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_TRIP) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_GetUp) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_DustOff) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_PLAYER_ENTRY) + Call(SetBattleCamTarget, -80, 35, 8) + Call(BattleCamTargetActor, ACTOR_PLAYER) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 100) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(RandInt, 100, LVar0) + Switch(LVar0) + CaseGt(50) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, 0, ANIM_Mario1_Run) + Call(PlayerRunToGoal, 25) + Call(SetAnimation, ACTOR_SELF, 0, ANIM_Mario1_Idle) + CaseGt(20) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorSpeed, ACTOR_SELF, Float(4.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.0)) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_BeforeJump) + Call(func_80273444, 18, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_BeforeJump) + Wait(7) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + CaseDefault + Call(SetGoalToHome, ACTOR_SELF) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(PlayerRunToGoal, 20) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + ChildThread + Call(ShakeCam, 1, 0, 5, Float(1.0)) + EndChildThread + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_TRIP) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_GetUp) + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_DustOff) + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + EndSwitch + Return + End }; EvtScript EVS_PeachEnterStage = { - EVT_CALL(FreezeBattleState, TRUE) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_ENTRY) - EVT_CALL(SetBattleCamTarget, -80, 35, 8) - EVT_CALL(BattleCamTargetActor, ACTOR_PLAYER) - EVT_CHILD_THREAD - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 100) - EVT_ADD(LVar1, 50) - EVT_CALL(SetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetAnimation, ACTOR_PARTNER, 0, ANIM_Twink_Angry) - EVT_CALL(FlyToGoal, ACTOR_PARTNER, 45, -10, 10) - EVT_END_CHILD_THREAD - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 100) - EVT_CALL(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetAnimation, ACTOR_SELF, 0, ANIM_Peach1_Run) - EVT_CALL(PlayerRunToGoal, 40) - EVT_CALL(SetAnimation, ACTOR_SELF, 0, ANIM_Peach1_Walk) - EVT_WAIT(15) - EVT_CALL(FreezeBattleState, FALSE) - EVT_RETURN - EVT_END + Call(FreezeBattleState, TRUE) + Call(UseBattleCamPreset, BTL_CAM_PLAYER_ENTRY) + Call(SetBattleCamTarget, -80, 35, 8) + Call(BattleCamTargetActor, ACTOR_PLAYER) + ChildThread + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Sub(LVar0, 100) + Add(LVar1, 50) + Call(SetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetAnimation, ACTOR_PARTNER, 0, ANIM_Twink_Angry) + Call(FlyToGoal, ACTOR_PARTNER, 45, -10, 10) + EndChildThread + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 100) + Call(SetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetAnimation, ACTOR_SELF, 0, ANIM_Peach1_Run) + Call(PlayerRunToGoal, 40) + Call(SetAnimation, ACTOR_SELF, 0, ANIM_Peach1_Walk) + Wait(15) + Call(FreezeBattleState, FALSE) + Return + End }; EvtScript EVS_Mario_HandlePhase = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_EXECUTE_ACTION) - EVT_EXEC_WAIT(EVS_ExecuteMarioAction) - EVT_CASE_EQ(PHASE_FIRST_STRIKE) - EVT_EXEC_WAIT(EVS_PlayerFirstStrike) - EVT_CASE_EQ(PHASE_CELEBRATE) - EVT_EXEC_WAIT(EVS_Player_Celebrate) - EVT_CASE_EQ(PHASE_RUN_AWAY_START) - EVT_EXEC_WAIT(EVS_RunAwayStart) - EVT_CASE_EQ(PHASE_RUN_AWAY_FAIL) - EVT_EXEC_WAIT(EVS_RunAwayFail) - EVT_CASE_EQ(PHASE_DEATH) - EVT_EXEC_WAIT(EVS_PlayerDies) - EVT_CASE_EQ(PHASE_USE_LIFE_SHROOM) - EVT_EXEC_WAIT(EVS_UseLifeShroom) - EVT_CASE_EQ(PHASE_USE_DEFEND) - EVT_EXEC_WAIT(EVS_StartDefend) - EVT_CASE_EQ(PHASE_MERLEE_ATTACK_BONUS) - EVT_EXEC_WAIT(EVS_MerleeAttackBonus) - EVT_CASE_EQ(PHASE_MERLEE_DEFENSE_BONUS) - EVT_EXEC_WAIT(EVS_MerleeDefenseBonus) - EVT_CASE_EQ(PHASE_MERLEE_EXP_BONUS) - EVT_EXEC_WAIT(EVS_MerleeExpBonus) - EVT_CASE_EQ(PHASE_PLAYER_HAPPY) - EVT_EXEC_WAIT(EVS_PlayerHappy) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_EXECUTE_ACTION) + ExecWait(EVS_ExecuteMarioAction) + CaseEq(PHASE_FIRST_STRIKE) + ExecWait(EVS_PlayerFirstStrike) + CaseEq(PHASE_CELEBRATE) + ExecWait(EVS_Player_Celebrate) + CaseEq(PHASE_RUN_AWAY_START) + ExecWait(EVS_RunAwayStart) + CaseEq(PHASE_RUN_AWAY_FAIL) + ExecWait(EVS_RunAwayFail) + CaseEq(PHASE_DEATH) + ExecWait(EVS_PlayerDies) + CaseEq(PHASE_USE_LIFE_SHROOM) + ExecWait(EVS_UseLifeShroom) + CaseEq(PHASE_USE_DEFEND) + ExecWait(EVS_StartDefend) + CaseEq(PHASE_MERLEE_ATTACK_BONUS) + ExecWait(EVS_MerleeAttackBonus) + CaseEq(PHASE_MERLEE_DEFENSE_BONUS) + ExecWait(EVS_MerleeDefenseBonus) + CaseEq(PHASE_MERLEE_EXP_BONUS) + ExecWait(EVS_MerleeExpBonus) + CaseEq(PHASE_PLAYER_HAPPY) + ExecWait(EVS_PlayerHappy) + EndSwitch + Return + End }; EvtScript EVS_Peach_HandlePhase = { - EVT_CALL(GetBattlePhase, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PHASE_EXECUTE_ACTION) - EVT_EXEC_WAIT(EVS_ExecutePeachAction) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattlePhase, LVar0) + Switch(LVar0) + CaseEq(PHASE_EXECUTE_ACTION) + ExecWait(EVS_ExecutePeachAction) + EndSwitch + Return + End }; EvtScript EVS_ExecuteMarioAction = { - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(BTL_MENU_TYPE_JUMP) - EVT_CALL(LoadMoveScript) - EVT_EXEC_WAIT(LVar0) - EVT_CASE_EQ(BTL_MENU_TYPE_SMASH) - EVT_CALL(LoadMoveScript) - EVT_EXEC_WAIT(LVar0) - EVT_CASE_EQ(BTL_MENU_TYPE_ITEMS) - EVT_CALL(LoadItemScript) - EVT_EXEC_WAIT(LVar0) - EVT_CASE_EQ(BTL_MENU_TYPE_STAR_POWERS) - EVT_CALL(LoadStarPowerScript) - EVT_EXEC_WAIT(LVar0) - EVT_END_SWITCH - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(SetBattleFlagBits, BS_FLAGS1_4000, FALSE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar0) + CaseEq(BTL_MENU_TYPE_JUMP) + Call(LoadMoveScript) + ExecWait(LVar0) + CaseEq(BTL_MENU_TYPE_SMASH) + Call(LoadMoveScript) + ExecWait(LVar0) + CaseEq(BTL_MENU_TYPE_ITEMS) + Call(LoadItemScript) + ExecWait(LVar0) + CaseEq(BTL_MENU_TYPE_STAR_POWERS) + Call(LoadStarPowerScript) + ExecWait(LVar0) + EndSwitch + Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Return + End }; EvtScript EVS_ExecutePeachAction = { - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(BTL_MENU_TYPE_STAR_POWERS) - EVT_CALL(LoadStarPowerScript) - EVT_EXEC_WAIT(LVar0) - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar0) + CaseEq(BTL_MENU_TYPE_STAR_POWERS) + Call(LoadStarPowerScript) + ExecWait(LVar0) + EndSwitch + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Return + End }; EvtScript EVS_PlayerFirstStrike = { - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(LoadMoveScript) - EVT_EXEC_WAIT(LVar0) - EVT_CASE_EQ(1) - EVT_CALL(LoadMoveScript) - EVT_EXEC_WAIT(LVar0) - EVT_END_SWITCH - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(GetMenuSelection, LVar0, LVar1, LVar2) + Switch(LVar0) + CaseEq(0) + Call(LoadMoveScript) + ExecWait(LVar0) + CaseEq(1) + Call(LoadMoveScript) + ExecWait(LVar0) + EndSwitch + Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Return + End }; EvtScript EVS_StartDefend = { - EVT_CALL(ActivateDefend) - EVT_RETURN - EVT_END + Call(ActivateDefend) + Return + End }; EvtScript EVS_Player_HandleEvent = { - EVT_CALL(GetLastEvent, ACTOR_PLAYER, LVarF) - EVT_SWITCH(LVarF) - EVT_CASE_NE(EVENT_32) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_END_SWITCH - EVT_CALL(CloseActionCommandInfo) - EVT_CALL(SetBattleFlagBits, BS_FLAGS1_EXECUTING_MOVE, FALSE) - EVT_CALL(func_802693F0) - EVT_CALL(ForceDisablePlayerBlurImmediately) - EVT_CALL(GetLastEvent, ACTOR_PLAYER, LVarF) - EVT_SWITCH(LVarF) - EVT_CASE_OR_EQ(EVENT_SPIKE_CONTACT) - EVT_CASE_OR_EQ(EVENT_SPIKE_DEATH) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_HIT_SPIKE) - EVT_CALL(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 60) - EVT_ADD(LVar1, 40) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(0.1)) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_HurtFoot, ANIM_Mario1_HurtFoot, ANIM_Mario1_HurtFoot) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 5, 0, 1) - EVT_SET_CONST(LVar1, ANIM_Mario1_HurtFoot) - EVT_SET(LVar2, 0) - EVT_EXEC_WAIT(EVS_Player_SimpleHit) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.4)) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 10, 0, 2) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 7, 0, 2) - EVT_SUB(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 4, 0, 2) - EVT_IF_EQ(LVarF, 39) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_BURN_CONTACT) - EVT_CASE_OR_EQ(EVENT_BURN_DEATH) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_HIT_HAZARD) - EVT_CALL(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 60) - EVT_ADD(LVar1, 40) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(0.1)) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_MarioB3_BurnHurt, ANIM_MarioB3_BurnHurt, ANIM_MarioB3_BurnHurt) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 5, 0, 1) - EVT_CHILD_THREAD - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar5, LVar6, LVar7) - EVT_ADD(LVar5, 5) - EVT_ADD(LVar6, 4) - EVT_ADD(LVar7, 5) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 0, LVar5, LVar6, LVar7, EVT_FLOAT(1.5), 15) - EVT_WAIT(2) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar5, LVar6, LVar7) - EVT_ADD(LVar5, -5) - EVT_ADD(LVar6, 18) - EVT_ADD(LVar7, 5) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 0, LVar5, LVar6, LVar7, EVT_FLOAT(1.5), 15) - EVT_END_CHILD_THREAD - EVT_SET_CONST(LVar1, ANIM_MarioB3_BurnHurt) - EVT_SET(LVar2, 0) - EVT_EXEC_WAIT(EVS_Player_SimpleHit) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.4)) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 10, 0, 2) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 7, 0, 2) - EVT_SUB(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 4, 0, 2) - EVT_IF_EQ(LVarF, 36) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_SHOCK_HIT) - EVT_CASE_OR_EQ(EVENT_SHOCK_DEATH) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PLAYER_HIT_HAZARD) - EVT_CALL(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 60) - EVT_ADD(LVar1, 40) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(0.1)) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_HurtFoot, ANIM_Mario1_HurtFoot, ANIM_Mario1_HurtFoot) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 5, 0, 1) - EVT_CALL(ShowShockEffect, ACTOR_SELF) - EVT_SET_CONST(LVar1, ANIM_Mario1_HurtFoot) - EVT_SET(LVar2, 0) - EVT_EXEC_WAIT(EVS_Player_SimpleHit) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.4)) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 10, 0, 2) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 7, 0, 2) - EVT_SUB(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 4, 0, 2) - EVT_IF_EQ(LVarF, 38) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_LUCKY) - EVT_CALL(TryPlayerLucky) - EVT_IF_FALSE(LVar0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_AdjustCap) - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_ELSE - EVT_WAIT(30) - EVT_END_IF - EVT_CASE_EQ(EVENT_RECOVER_STATUS) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.8)) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 15, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(PlayerRunToGoal, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CASE_EQ(EVENT_32) - EVT_WAIT(10) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.8)) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 15, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(PlayerRunToGoal, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CASE_OR_EQ(EVENT_HIT_COMBO) - EVT_CASE_OR_EQ(EVENT_HIT) - EVT_SET_CONST(LVar1, ANIM_Mario1_Hurt) - EVT_SET(LVar2, 0) - EVT_EXEC_WAIT(EVS_Player_ComplexHit) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_ZERO_DAMAGE) - EVT_CASE_OR_EQ(EVENT_IMMUNE) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_NO_DAMGE) - EVT_SET_CONST(LVar1, ANIM_Mario1_Idle) - EVT_EXEC_WAIT(EVS_Player_NoDamageHit) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(EVENT_18) - EVT_CASE_OR_EQ(EVENT_BLOCK) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_NO_DAMGE) - EVT_SET_CONST(LVar0, 1) - EVT_SET_CONST(LVar1, ANIM_Mario1_Crouch) - EVT_EXEC_WAIT(EVS_Player_NoDamageHit) - EVT_WAIT(10) - EVT_END_CASE_GROUP - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_SET_CONST(LVar1, ANIM_MarioB3_BurnHurt) - EVT_SET(LVar2, 0) - EVT_EXEC_WAIT(EVS_Player_SimpleHit) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CASE_EQ(EVENT_FIRE_DEATH) - EVT_SET_CONST(LVar1, ANIM_MarioB3_BurnHurt) - EVT_SET(LVar2, 0) - EVT_EXEC_WAIT(EVS_Player_SimpleHit) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_RETURN - EVT_CASE_EQ(EVENT_DEATH) - EVT_SET_CONST(LVar1, ANIM_Mario1_Hurt) - EVT_SET(LVar2, 0) - EVT_EXEC_WAIT(EVS_Player_SimpleHit) - EVT_RETURN - EVT_CASE_EQ(EVENT_RECOVER_FROM_KO) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.8)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar7, LVar8, LVar9) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_BeforeJump) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar7, LVar8, LVar9) - EVT_CALL(func_80273444, 15, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_BeforeJump) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_RETURN - EVT_END + Call(GetLastEvent, ACTOR_PLAYER, LVarF) + Switch(LVarF) + CaseNe(EVENT_32) + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + EndSwitch + Call(CloseActionCommandInfo) + Call(SetBattleFlagBits, BS_FLAGS1_EXECUTING_MOVE, FALSE) + Call(func_802693F0) + Call(ForceDisablePlayerBlurImmediately) + Call(GetLastEvent, ACTOR_PLAYER, LVarF) + Switch(LVarF) + CaseOrEq(EVENT_SPIKE_CONTACT) + CaseOrEq(EVENT_SPIKE_DEATH) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(UseBattleCamPreset, BTL_CAM_PLAYER_HIT_SPIKE) + Call(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Sub(LVar0, 60) + Add(LVar1, 40) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(0.1)) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_HurtFoot, ANIM_Mario1_HurtFoot, ANIM_Mario1_HurtFoot) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 5, 0, 1) + SetConst(LVar1, ANIM_Mario1_HurtFoot) + Set(LVar2, 0) + ExecWait(EVS_Player_SimpleHit) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetGoalToHome, ACTOR_PLAYER) + Call(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.4)) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 10, 0, 2) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 7, 0, 2) + Sub(LVar0, 10) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 4, 0, 2) + IfEq(LVarF, 39) + Return + EndIf + EndCaseGroup + CaseOrEq(EVENT_BURN_CONTACT) + CaseOrEq(EVENT_BURN_DEATH) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(UseBattleCamPreset, BTL_CAM_PLAYER_HIT_HAZARD) + Call(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Sub(LVar0, 60) + Add(LVar1, 40) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(0.1)) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_MarioB3_BurnHurt, ANIM_MarioB3_BurnHurt, ANIM_MarioB3_BurnHurt) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 5, 0, 1) + ChildThread + Call(GetActorPos, ACTOR_PLAYER, LVar5, LVar6, LVar7) + Add(LVar5, 5) + Add(LVar6, 4) + Add(LVar7, 5) + PlayEffect(EFFECT_RING_BLAST, 0, LVar5, LVar6, LVar7, Float(1.5), 15) + Wait(2) + Call(GetActorPos, ACTOR_PLAYER, LVar5, LVar6, LVar7) + Add(LVar5, -5) + Add(LVar6, 18) + Add(LVar7, 5) + PlayEffect(EFFECT_RING_BLAST, 0, LVar5, LVar6, LVar7, Float(1.5), 15) + EndChildThread + SetConst(LVar1, ANIM_MarioB3_BurnHurt) + Set(LVar2, 0) + ExecWait(EVS_Player_SimpleHit) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetGoalToHome, ACTOR_PLAYER) + Call(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.4)) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 10, 0, 2) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 7, 0, 2) + Sub(LVar0, 10) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 4, 0, 2) + IfEq(LVarF, 36) + Return + EndIf + EndCaseGroup + CaseOrEq(EVENT_SHOCK_HIT) + CaseOrEq(EVENT_SHOCK_DEATH) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(UseBattleCamPreset, BTL_CAM_PLAYER_HIT_HAZARD) + Call(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Sub(LVar0, 60) + Add(LVar1, 40) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(0.1)) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_HurtFoot, ANIM_Mario1_HurtFoot, ANIM_Mario1_HurtFoot) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 5, 0, 1) + Call(ShowShockEffect, ACTOR_SELF) + SetConst(LVar1, ANIM_Mario1_HurtFoot) + Set(LVar2, 0) + ExecWait(EVS_Player_SimpleHit) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetGoalToHome, ACTOR_PLAYER) + Call(GetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.4)) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 10, 0, 2) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 7, 0, 2) + Sub(LVar0, 10) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 4, 0, 2) + IfEq(LVarF, 38) + Return + EndIf + EndCaseGroup + CaseEq(EVENT_LUCKY) + Call(TryPlayerLucky) + IfFalse(LVar0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_AdjustCap) + Wait(30) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Else + Wait(30) + EndIf + CaseEq(EVENT_RECOVER_STATUS) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.8)) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 15, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(SetGoalToHome, ACTOR_PLAYER) + Call(SetActorSpeed, ACTOR_PLAYER, Float(4.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(PlayerRunToGoal, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + CaseEq(EVENT_32) + Wait(10) + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.8)) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 15, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(SetGoalToHome, ACTOR_PLAYER) + Call(SetActorSpeed, ACTOR_PLAYER, Float(4.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(PlayerRunToGoal, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + CaseOrEq(EVENT_HIT_COMBO) + CaseOrEq(EVENT_HIT) + SetConst(LVar1, ANIM_Mario1_Hurt) + Set(LVar2, 0) + ExecWait(EVS_Player_ComplexHit) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + EndCaseGroup + CaseOrEq(EVENT_ZERO_DAMAGE) + CaseOrEq(EVENT_IMMUNE) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_NO_DAMGE) + SetConst(LVar1, ANIM_Mario1_Idle) + ExecWait(EVS_Player_NoDamageHit) + EndCaseGroup + CaseOrEq(EVENT_18) + CaseOrEq(EVENT_BLOCK) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_NO_DAMGE) + SetConst(LVar0, 1) + SetConst(LVar1, ANIM_Mario1_Crouch) + ExecWait(EVS_Player_NoDamageHit) + Wait(10) + EndCaseGroup + CaseEq(EVENT_BURN_HIT) + SetConst(LVar1, ANIM_MarioB3_BurnHurt) + Set(LVar2, 0) + ExecWait(EVS_Player_SimpleHit) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + CaseEq(EVENT_FIRE_DEATH) + SetConst(LVar1, ANIM_MarioB3_BurnHurt) + Set(LVar2, 0) + ExecWait(EVS_Player_SimpleHit) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Return + CaseEq(EVENT_DEATH) + SetConst(LVar1, ANIM_Mario1_Hurt) + Set(LVar2, 0) + ExecWait(EVS_Player_SimpleHit) + Return + CaseEq(EVENT_RECOVER_FROM_KO) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.8)) + Call(GetActorPos, ACTOR_PLAYER, LVar7, LVar8, LVar9) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_BeforeJump) + Call(SetGoalPos, ACTOR_PLAYER, LVar7, LVar8, LVar9) + Call(func_80273444, 15, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_BeforeJump) + CaseDefault + EndSwitch + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Return + End }; EvtScript EVS_Player_Celebrate = { - EVT_SET(LVar0, 0) - EVT_LOOP(5) - EVT_ADD(LVar0, 72) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(ChoosePlayerCelebrationAnim) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, LVar0) - EVT_WAIT(31) - EVT_RETURN - EVT_END + Set(LVar0, 0) + Loop(5) + Add(LVar0, 72) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + Call(ChoosePlayerCelebrationAnim) + Call(SetAnimation, ACTOR_PLAYER, 0, LVar0) + Wait(31) + Return + End }; EvtScript EVS_RunAwayNoCommand = { - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB3_Hustled) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_RUN_IN_PLACE) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 30) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 60) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 90) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 120) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 150) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 180) - EVT_WAIT(5) - EVT_CALL(AddActorPos, ACTOR_PLAYER, 2, 0, 0) - EVT_WAIT(2) - EVT_CALL(AddActorPos, ACTOR_PLAYER, 2, 0, 0) - EVT_WAIT(5) - EVT_CALL(AddActorPos, ACTOR_PLAYER, 2, 0, 0) - EVT_WAIT(2) - EVT_CALL(AddActorPos, ACTOR_PLAYER, 2, 0, 0) - EVT_WAIT(2) - EVT_CALL(AddActorPos, ACTOR_PLAYER, 2, 0, 0) - EVT_WAIT(5) - EVT_CALL(AddActorPos, ACTOR_PLAYER, 2, 0, 0) - EVT_WAIT(2) - EVT_CALL(AddActorPos, ACTOR_PLAYER, 2, 0, 0) - EVT_WAIT(5) - EVT_CALL(AddActorPos, ACTOR_PLAYER, 2, 0, 0) - EVT_WAIT(15) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.8)) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 8, 0, 0) - EVT_CALL(DetermineAutoRunAwaySuccess) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetFledBattleFlag) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_RUN_AWAY) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, -240, 0, 10) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(16.0)) - EVT_CALL(PlayerRunToGoal, 0) - EVT_WAIT(5) - EVT_ELSE - EVT_CHILD_THREAD - EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(1.0)) - EVT_END_CHILD_THREAD - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Trip) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_TRIP) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, -100, 0, 10) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(10.0)) - EVT_CALL(PlayerRunToGoal, 0) - EVT_SET(LVar3, 6) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CHILD_THREAD - EVT_LOOP(2) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, LVar0, LVar1, LVar2, EVT_FLOAT(1.0)) - EVT_WAIT(5) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_LOOP(10) - EVT_SUB(LVar0, LVar3) - EVT_SUB(LVar3, 1) - EVT_IF_LT(LVar3, 1) - EVT_SET(LVar3, 1) - EVT_END_IF - EVT_CALL(SetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_DUST_OFF) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_GetUp) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_DustOff) - EVT_CHILD_THREAD - EVT_WAIT(7) - EVT_LOOP(2) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 8) - EVT_ADD(LVar1, 14) - EVT_ADD(LVar2, 5) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(5) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(10) - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB3_Hustled) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_RUN_IN_PLACE) + Call(SetActorYaw, ACTOR_PLAYER, 30) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 60) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 90) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 120) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 150) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 180) + Wait(5) + Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0) + Wait(2) + Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0) + Wait(5) + Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0) + Wait(2) + Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0) + Wait(2) + Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0) + Wait(5) + Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0) + Wait(2) + Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0) + Wait(5) + Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0) + Wait(15) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.8)) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 8, 0, 0) + Call(DetermineAutoRunAwaySuccess) + IfEq(LVar0, 1) + Call(SetFledBattleFlag) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_RUN_AWAY) + Call(SetGoalPos, ACTOR_PLAYER, -240, 0, 10) + Call(SetActorSpeed, ACTOR_PLAYER, Float(16.0)) + Call(PlayerRunToGoal, 0) + Wait(5) + Else + ChildThread + Call(ShakeCam, 1, 0, 5, Float(1.0)) + EndChildThread + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Trip) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_TRIP) + Call(SetGoalPos, ACTOR_PLAYER, -100, 0, 10) + Call(SetActorSpeed, ACTOR_PLAYER, Float(10.0)) + Call(PlayerRunToGoal, 0) + Set(LVar3, 6) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + ChildThread + Loop(2) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_LANDING_DUST, 1, LVar0, LVar1, LVar2, Float(1.0)) + Wait(5) + EndLoop + EndChildThread + Loop(10) + Sub(LVar0, LVar3) + Sub(LVar3, 1) + IfLt(LVar3, 1) + Set(LVar3, 1) + EndIf + Call(SetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Wait(15) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_DUST_OFF) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_GetUp) + Wait(20) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_DustOff) + ChildThread + Wait(7) + Loop(2) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Sub(LVar0, 8) + Add(LVar1, 14) + Add(LVar2, 5) + PlayEffect(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, Float(1.0), Float(1.0)) + Wait(5) + EndLoop + EndChildThread + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(10) + EndIf + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Return + End }; EvtScript EVS_RunAwayStart = { - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(GetActionCommandMode, LVar2) - EVT_IF_EQ(LVar2, ACTION_COMMAND_MODE_NOT_LEARNED) - EVT_EXEC_WAIT(EVS_RunAwayNoCommand) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(ShowActionHud, 1) - EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0) - EVT_CALL(LoadActionCommand, ACTION_COMMAND_FLEE) - EVT_CALL(action_command_flee_init, LVar0) - EVT_CALL(SetupMashMeter, 1, 100, 0, 0, 0, 0) - EVT_CALL(func_80260E38) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB3_Hustled) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_RUN_IN_PLACE) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 30) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 60) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 90) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 120) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 150) - EVT_WAIT(1) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 180) - EVT_WAIT(5) - EVT_CALL(action_command_flee_start, 0, 60, 3) - EVT_CALL(func_80260E5C) - EVT_WAIT(5) - EVT_CALL(AddActorPos, ACTOR_PLAYER, 2, 0, 0) - EVT_WAIT(2) - EVT_CALL(AddActorPos, ACTOR_PLAYER, 2, 0, 0) - EVT_WAIT(5) - EVT_CALL(AddActorPos, ACTOR_PLAYER, 2, 0, 0) - EVT_WAIT(2) - EVT_CALL(AddActorPos, ACTOR_PLAYER, 2, 0, 0) - EVT_WAIT(2) - EVT_CALL(AddActorPos, ACTOR_PLAYER, 2, 0, 0) - EVT_WAIT(5) - EVT_CALL(AddActorPos, ACTOR_PLAYER, 2, 0, 0) - EVT_WAIT(2) - EVT_CALL(AddActorPos, ACTOR_PLAYER, 2, 0, 0) - EVT_WAIT(5) - EVT_CALL(AddActorPos, ACTOR_PLAYER, 2, 0, 0) - EVT_WAIT(15) - EVT_WAIT(30) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.8)) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 8, 0, 0) - EVT_CALL(GetActionSuccess, LVar0) - EVT_CALL(DetermineAutoRunAwaySuccess) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetFledBattleFlag) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_RUN_AWAY) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, -240, 0, 10) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(16.0)) - EVT_CALL(PlayerRunToGoal, 0) - EVT_WAIT(5) - EVT_ELSE - EVT_CHILD_THREAD - EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(1.0)) - EVT_END_CHILD_THREAD - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Trip) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_TRIP) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, -100, 0, 10) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(10.0)) - EVT_CALL(PlayerRunToGoal, 0) - EVT_SET(LVar3, 6) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CHILD_THREAD - EVT_LOOP(2) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, LVar0, LVar1, LVar2, EVT_FLOAT(1.0)) - EVT_WAIT(5) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_LOOP(10) - EVT_SUB(LVar0, LVar3) - EVT_SUB(LVar3, 1) - EVT_IF_LT(LVar3, 1) - EVT_SET(LVar3, 1) - EVT_END_IF - EVT_CALL(SetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(15) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_DUST_OFF) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_GetUp) - EVT_WAIT(20) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_DustOff) - EVT_CHILD_THREAD - EVT_WAIT(7) - EVT_LOOP(2) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 8) - EVT_ADD(LVar1, 14) - EVT_ADD(LVar2, 5) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(5) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_WAIT(5) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_WAIT(10) - EVT_END_IF - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(GetActionCommandMode, LVar2) + IfEq(LVar2, ACTION_COMMAND_MODE_NOT_LEARNED) + ExecWait(EVS_RunAwayNoCommand) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Return + EndIf + Call(ShowActionHud, 1) + Call(GetActorVar, ACTOR_SELF, 0, LVar0) + Call(LoadActionCommand, ACTION_COMMAND_FLEE) + Call(action_command_flee_init, LVar0) + Call(SetupMashMeter, 1, 100, 0, 0, 0, 0) + Call(func_80260E38) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB3_Hustled) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_RUN_IN_PLACE) + Call(SetActorYaw, ACTOR_PLAYER, 30) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 60) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 90) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 120) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 150) + Wait(1) + Call(SetActorYaw, ACTOR_PLAYER, 180) + Wait(5) + Call(action_command_flee_start, 0, 60, 3) + Call(func_80260E5C) + Wait(5) + Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0) + Wait(2) + Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0) + Wait(5) + Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0) + Wait(2) + Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0) + Wait(2) + Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0) + Wait(5) + Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0) + Wait(2) + Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0) + Wait(5) + Call(AddActorPos, ACTOR_PLAYER, 2, 0, 0) + Wait(15) + Wait(30) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.8)) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 8, 0, 0) + Call(GetActionSuccess, LVar0) + Call(DetermineAutoRunAwaySuccess) + IfEq(LVar0, 1) + Call(SetFledBattleFlag) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_RUN_AWAY) + Call(SetGoalPos, ACTOR_PLAYER, -240, 0, 10) + Call(SetActorSpeed, ACTOR_PLAYER, Float(16.0)) + Call(PlayerRunToGoal, 0) + Wait(5) + Else + ChildThread + Call(ShakeCam, 1, 0, 5, Float(1.0)) + EndChildThread + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Trip) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_TRIP) + Call(SetGoalPos, ACTOR_PLAYER, -100, 0, 10) + Call(SetActorSpeed, ACTOR_PLAYER, Float(10.0)) + Call(PlayerRunToGoal, 0) + Set(LVar3, 6) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + ChildThread + Loop(2) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_LANDING_DUST, 1, LVar0, LVar1, LVar2, Float(1.0)) + Wait(5) + EndLoop + EndChildThread + Loop(10) + Sub(LVar0, LVar3) + Sub(LVar3, 1) + IfLt(LVar3, 1) + Set(LVar3, 1) + EndIf + Call(SetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Wait(15) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_DUST_OFF) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_GetUp) + Wait(20) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_DustOff) + ChildThread + Wait(7) + Loop(2) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Sub(LVar0, 8) + Add(LVar1, 14) + Add(LVar2, 5) + PlayEffect(EFFECT_WALKING_DUST, 0, LVar0, LVar1, LVar2, Float(1.0), Float(1.0)) + Wait(5) + EndLoop + EndChildThread + Wait(5) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Wait(10) + EndIf + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Return + End }; EvtScript EVS_RunAwayFail = { - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, 0) - EVT_CALL(PlayerRunToGoal, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(SetGoalToHome, ACTOR_PLAYER) + Call(SetActorSpeed, ACTOR_PLAYER, Float(4.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(SetActorYaw, ACTOR_PLAYER, 0) + Call(PlayerRunToGoal, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Return + End }; EvtScript EVS_PlayerDies = { - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Dying) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_24) - EVT_WAIT(15) - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_ENABLE) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_SPINNING) - EVT_SET(LVar0, 0) - EVT_LOOP(30) - EVT_ADD(LVar0, 60) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 36) - EVT_CALL(SetActorYaw, ACTOR_PLAYER, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EnablePlayerBlur, ACTOR_BLUR_DISABLE) - EVT_WAIT(30) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_COLLAPSE) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 1) - EVT_LOOP(0) - EVT_IF_EQ(LVar0, 90) - EVT_BREAK_LOOP - EVT_END_IF - EVT_ADD(LVar0, LVar1) - EVT_ADD(LVar1, 2) - EVT_IF_GT(LVar0, 90) - EVT_SET(LVar0, 90) - EVT_END_IF - EVT_CALL(SetActorRotation, ACTOR_PLAYER, LVar0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 2) - EVT_CALL(SetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 20) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 1, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_WAIT(15) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioB1_Dying) + Call(UseBattleCamPreset, BTL_CAM_PRESET_24) + Wait(15) + Call(EnablePlayerBlur, ACTOR_BLUR_ENABLE) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_SPINNING) + Set(LVar0, 0) + Loop(30) + Add(LVar0, 60) + Call(SetActorYaw, ACTOR_PLAYER, LVar0) + Wait(1) + EndLoop + Set(LVar0, 0) + Loop(10) + Add(LVar0, 36) + Call(SetActorYaw, ACTOR_PLAYER, LVar0) + Wait(1) + EndLoop + Call(EnablePlayerBlur, ACTOR_BLUR_DISABLE) + Wait(30) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_COLLAPSE) + Set(LVar0, 0) + Set(LVar1, 1) + Loop(0) + IfEq(LVar0, 90) + BreakLoop + EndIf + Add(LVar0, LVar1) + Add(LVar1, 2) + IfGt(LVar0, 90) + Set(LVar0, 90) + EndIf + Call(SetActorRotation, ACTOR_PLAYER, LVar0, 0, 0) + Wait(1) + EndLoop + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 2) + Call(SetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar2, 20) + PlayEffect(EFFECT_WALKING_DUST, 1, LVar0, LVar1, LVar2, Float(1.0), Float(1.0)) + Wait(15) + Return + End }; EvtScript D_80287404 = { - EVT_IF_EQ(LVar1, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_69) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_USE_ITEM) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_UsePower) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 18) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0)) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(PlayerRunToGoal, 0) - EVT_ADD(LVar1, 45) - EVT_SET(LVar3, LVar1) - EVT_ADD(LVar3, 10) - EVT_ADD(LVar3, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 1, LVar0, LVar3, LVar2, EVT_FLOAT(1.0), 30) - EVT_CALL(MakeItemEntity, LVarA, LVar0, LVar1, LVar2, 1, 0) - EVT_SET(LVarA, LVar0) - EVT_CALL(GiveRefund) - EVT_WAIT(LVar0) - EVT_WAIT(15) - EVT_CALL(GiveRefundCleanup) - EVT_CALL(RemoveItemEntity, LVarA) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_USE_ITEM) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_UsePower) - EVT_WAIT(4) - EVT_ADD(LVar1, 45) - EVT_SET(LVar3, LVar1) - EVT_ADD(LVar3, 10) - EVT_ADD(LVar3, 2) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 1, LVar0, LVar3, LVar2, EVT_FLOAT(1.0), 30) - EVT_CALL(MakeItemEntity, LVarA, LVar0, LVar1, LVar2, 1, 0) - EVT_SET(LVarA, LVar0) - EVT_WAIT(15) - EVT_CALL(RemoveItemEntity, LVarA) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(LVar1, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_69) + Wait(10) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_USE_ITEM) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_UsePower) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 18) + Call(SetActorSpeed, ACTOR_PLAYER, Float(4.0)) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(PlayerRunToGoal, 0) + Add(LVar1, 45) + Set(LVar3, LVar1) + Add(LVar3, 10) + Add(LVar3, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 1, LVar0, LVar3, LVar2, Float(1.0), 30) + Call(MakeItemEntity, LVarA, LVar0, LVar1, LVar2, 1, 0) + Set(LVarA, LVar0) + Call(GiveRefund) + Wait(LVar0) + Wait(15) + Call(GiveRefundCleanup) + Call(RemoveItemEntity, LVarA) + Else + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_USE_ITEM) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_UsePower) + Wait(4) + Add(LVar1, 45) + Set(LVar3, LVar1) + Add(LVar3, 10) + Add(LVar3, 2) + PlayEffect(EFFECT_RADIAL_SHIMMER, 1, LVar0, LVar3, LVar2, Float(1.0), 30) + Call(MakeItemEntity, LVarA, LVar0, LVar1, LVar2, 1, 0) + Set(LVarA, LVar0) + Wait(15) + Call(RemoveItemEntity, LVarA) + EndIf + Return + End }; EvtScript D_80287708 = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, -85, 1, 0) - EVT_CALL(SetBattleCamOffsetZ, 41) - EVT_CALL(SetBattleCamZoom, 248) - EVT_CALL(MoveBattleCamOver, 30) - EVT_WAIT(10) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_UsePower) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 45) - EVT_CALL(MakeItemEntity, LVarA, LVar0, LVar1, LVar2, 1, 0) - EVT_SET(LVarE, LVar0) - EVT_CALL(GiveRefund) - EVT_WAIT(LVar0) - EVT_WAIT(15) - EVT_CALL(GiveRefundCleanup) - EVT_CALL(RemoveItemEntity, LVarE) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, -85, 1, 0) + Call(SetBattleCamOffsetZ, 41) + Call(SetBattleCamZoom, 248) + Call(MoveBattleCamOver, 30) + Wait(10) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_UsePower) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 45) + Call(MakeItemEntity, LVarA, LVar0, LVar1, LVar2, 1, 0) + Set(LVarE, LVar0) + Call(GiveRefund) + Wait(LVar0) + Wait(15) + Call(GiveRefundCleanup) + Call(RemoveItemEntity, LVarE) + Return + End }; EvtScript D_80287834 = { - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(SetGoalToHome, ACTOR_PLAYER) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) - EVT_CALL(PlayerRunToGoal, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(SetGoalToHome, ACTOR_PLAYER) + Call(SetActorSpeed, ACTOR_PLAYER, Float(8.0)) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Run) + Call(PlayerRunToGoal, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Return + End }; EvtScript EVS_PlayEatFX = { - EVT_THREAD - EVT_LOOP(4) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_EAT_OR_DRINK) - EVT_WAIT(10) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Eat) - EVT_WAIT(45) - EVT_RETURN - EVT_END + Thread + Loop(4) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_EAT_OR_DRINK) + Wait(10) + EndLoop + EndThread + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Eat) + Wait(45) + Return + End }; EvtScript EVS_PlayDrinkFX = { - EVT_THREAD - EVT_LOOP(4) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_EAT_OR_DRINK) - EVT_WAIT(10) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Drink) - EVT_WAIT(45) - EVT_RETURN - EVT_END + Thread + Loop(4) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_EAT_OR_DRINK) + Wait(10) + EndLoop + EndThread + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Drink) + Wait(45) + Return + End }; EvtScript EVS_UseLifeShroom = { - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CHILD_THREAD - EVT_CALL(func_80261388) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(DispatchEvent, ACTOR_PARTNER, EVENT_LIFE_SHROOM_PROC) - EVT_CALL(SetActorFlagBits, ACTOR_PARTNER, ACTOR_FLAG_NO_SHADOW, 1) - EVT_SET(LVar0, 255) - EVT_LOOP(10) - EVT_SUB(LVar0, 25) - EVT_IF_LT(LVar0, 0) - EVT_SET(LVar0, 0) - EVT_END_IF - EVT_CALL(SetPartAlpha, ACTOR_PARTNER, -1, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPartAlpha, ACTOR_PARTNER, -1, 0) - EVT_END_IF - EVT_END_CHILD_THREAD - EVT_CALL(LifeShroomShroudWorld) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(MakeItemEntity, ITEM_LIFE_SHROOM, LVar0, LVar1, LVar2, 1, 0) - EVT_SET(LVarA, LVar0) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SET(LVar3, 30) - EVT_SET(LVar4, 16) - EVT_LOOP(LVar3) - EVT_ADD(LVar4, 8) - EVT_IF_GT(LVar4, 255) - EVT_SET(LVar4, 255) - EVT_END_IF - EVT_ADDF(LVar1, EVT_FLOAT(1.0)) - EVT_CALL(SetItemPos, LVarA, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(LVar3, LVar0) - EVT_SET(LVar4, LVar1) - EVT_SET(LVar5, LVar2) - EVT_CALL(SetItemAsLifeShroom) - EVT_CALL(GiveRefund) - EVT_IF_GT(LVar0, 0) - EVT_WAIT(LVar0) - EVT_WAIT(15) - EVT_CALL(GiveRefundCleanup) - EVT_END_IF - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LIFE_SHROOM_CHIME) - EVT_ADD(LVar4, 15) - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 3, LVar3, LVar4, LVar5, EVT_FLOAT(1.0)) - EVT_SET(LVar0, LVarF) - EVT_LOOP(4) - EVT_CALL(SetItemFlags, LVarA, 64, 1) - EVT_WAIT(2) - EVT_CALL(SetItemFlags, LVarA, 64, 0) - EVT_WAIT(8) - EVT_END_LOOP - EVT_CALL(RemoveEffect, LVar0) - EVT_CALL(RemoveItemEntity, LVarA) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_START_RECOVERY) - EVT_PLAY_EFFECT(EFFECT_STARS_SHIMMER, 1, LVar3, LVar4, LVar5, 70, 70, 10, 20) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_REVIVAL_MAGIC) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_STARS_SHIMMER, 2, LVar0, LVar1, LVar2, 50, 20, 32, 30) - EVT_WAIT(40) - EVT_PLAY_EFFECT(EFFECT_STARS_SHIMMER, 2, LVar0, LVar1, LVar2, 30, 50, 32, 30) - EVT_CHILD_THREAD - EVT_LOOP(3) - EVT_CALL(SetActorDispOffset, ACTOR_PLAYER, 1, 0, 0) - EVT_WAIT(4) - EVT_CALL(SetActorDispOffset, ACTOR_PLAYER, -1, 0, 0) - EVT_WAIT(4) - EVT_END_LOOP - EVT_LOOP(3) - EVT_CALL(SetActorDispOffset, ACTOR_PLAYER, 1, 0, 0) - EVT_WAIT(2) - EVT_CALL(SetActorDispOffset, ACTOR_PLAYER, -1, 0, 0) - EVT_WAIT(2) - EVT_END_LOOP - EVT_LOOP(7) - EVT_CALL(SetActorDispOffset, ACTOR_PLAYER, 1, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_PLAYER, -1, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_WAIT(50) - EVT_CHILD_THREAD - EVT_CALL(LifeShroomRevealWorld) - EVT_END_CHILD_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_REVIVE) - EVT_CALL(SetActorRotation, ACTOR_PLAYER, 0, 0, 0) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CALL(ConsumeLifeShroom) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 25) - EVT_PLAY_EFFECT(EFFECT_RECOVER, 0, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(FreezeBattleCam, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 15) - EVT_CHILD_THREAD - EVT_CALL(func_80261388) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetActorFlagBits, ACTOR_PARTNER, ACTOR_FLAG_NO_SHADOW, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 25) - EVT_IF_GT(LVar0, 255) - EVT_SET(LVar0, 255) - EVT_END_IF - EVT_CALL(SetPartAlpha, ACTOR_PARTNER, -1, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(DispatchEvent, ACTOR_PARTNER, EVENT_REVIVE) - EVT_CALL(SetPartAlpha, ACTOR_PARTNER, -1, 255) - EVT_END_IF - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_LOOP(5) - EVT_WAIT(2) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_MISC_PARTICLES, 2, LVar0, LVar1, LVar2, 20, 20, EVT_FLOAT(1.0), 10, 50) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) - EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(1.0)) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 20, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) - EVT_WAIT(10) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_CALL(RestorePreDefeatState) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + ChildThread + Call(func_80261388) + IfEq(LVar0, 1) + Call(DispatchEvent, ACTOR_PARTNER, EVENT_LIFE_SHROOM_PROC) + Call(SetActorFlagBits, ACTOR_PARTNER, ACTOR_FLAG_NO_SHADOW, 1) + Set(LVar0, 255) + Loop(10) + Sub(LVar0, 25) + IfLt(LVar0, 0) + Set(LVar0, 0) + EndIf + Call(SetPartAlpha, ACTOR_PARTNER, -1, LVar0) + Wait(1) + EndLoop + Call(SetPartAlpha, ACTOR_PARTNER, -1, 0) + EndIf + EndChildThread + Call(LifeShroomShroudWorld) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(MakeItemEntity, ITEM_LIFE_SHROOM, LVar0, LVar1, LVar2, 1, 0) + Set(LVarA, LVar0) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Set(LVar3, 30) + Set(LVar4, 16) + Loop(LVar3) + Add(LVar4, 8) + IfGt(LVar4, 255) + Set(LVar4, 255) + EndIf + AddF(LVar1, Float(1.0)) + Call(SetItemPos, LVarA, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Set(LVar3, LVar0) + Set(LVar4, LVar1) + Set(LVar5, LVar2) + Call(SetItemAsLifeShroom) + Call(GiveRefund) + IfGt(LVar0, 0) + Wait(LVar0) + Wait(15) + Call(GiveRefundCleanup) + EndIf + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LIFE_SHROOM_CHIME) + Add(LVar4, 15) + PlayEffect(EFFECT_ENERGY_IN_OUT, 3, LVar3, LVar4, LVar5, Float(1.0)) + Set(LVar0, LVarF) + Loop(4) + Call(SetItemFlags, LVarA, 64, 1) + Wait(2) + Call(SetItemFlags, LVarA, 64, 0) + Wait(8) + EndLoop + Call(RemoveEffect, LVar0) + Call(RemoveItemEntity, LVarA) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_START_RECOVERY) + PlayEffect(EFFECT_STARS_SHIMMER, 1, LVar3, LVar4, LVar5, 70, 70, 10, 20) + Wait(20) + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_REVIVAL_MAGIC) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_STARS_SHIMMER, 2, LVar0, LVar1, LVar2, 50, 20, 32, 30) + Wait(40) + PlayEffect(EFFECT_STARS_SHIMMER, 2, LVar0, LVar1, LVar2, 30, 50, 32, 30) + ChildThread + Loop(3) + Call(SetActorDispOffset, ACTOR_PLAYER, 1, 0, 0) + Wait(4) + Call(SetActorDispOffset, ACTOR_PLAYER, -1, 0, 0) + Wait(4) + EndLoop + Loop(3) + Call(SetActorDispOffset, ACTOR_PLAYER, 1, 0, 0) + Wait(2) + Call(SetActorDispOffset, ACTOR_PLAYER, -1, 0, 0) + Wait(2) + EndLoop + Loop(7) + Call(SetActorDispOffset, ACTOR_PLAYER, 1, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_PLAYER, -1, 0, 0) + Wait(1) + EndLoop + EndChildThread + Wait(50) + ChildThread + Call(LifeShroomRevealWorld) + EndChildThread + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_PLAYER_REVIVE) + Call(SetActorRotation, ACTOR_PLAYER, 0, 0, 0) + Call(SetActorYaw, ACTOR_SELF, 0) + Call(ConsumeLifeShroom) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 25) + PlayEffect(EFFECT_RECOVER, 0, LVar0, LVar1, LVar2, LVar3) + Call(FreezeBattleCam, 0) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 15) + ChildThread + Call(func_80261388) + IfEq(LVar0, 1) + Call(SetActorFlagBits, ACTOR_PARTNER, ACTOR_FLAG_NO_SHADOW, 0) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 25) + IfGt(LVar0, 255) + Set(LVar0, 255) + EndIf + Call(SetPartAlpha, ACTOR_PARTNER, -1, LVar0) + Wait(1) + EndLoop + Call(DispatchEvent, ACTOR_PARTNER, EVENT_REVIVE) + Call(SetPartAlpha, ACTOR_PARTNER, -1, 255) + EndIf + EndChildThread + ChildThread + Loop(5) + Wait(2) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_MISC_PARTICLES, 2, LVar0, LVar1, LVar2, 20, 20, Float(1.0), 10, 50) + EndLoop + EndChildThread + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_LONG_PLAYER_JUMP) + Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.0)) + Call(SetActorSpeed, ACTOR_PLAYER, Float(1.0)) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 20, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) + Wait(4) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle) + Wait(10) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Call(RestorePreDefeatState) + Return + End }; EvtScript EVS_MerleeRunOut = { - EVT_CALL(HasMerleeCastsLeft) - EVT_IF_EQ(LVar0, 1) - EVT_RETURN - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(ShowMessageBox, BTL_MSG_MERLEE_DONE, 60) - EVT_CALL(WaitForMessageBoxDone) - EVT_RETURN - EVT_END + Call(HasMerleeCastsLeft) + IfEq(LVar0, 1) + Return + EndIf + Wait(15) + Call(ShowMessageBox, BTL_MSG_MERLEE_DONE, 60) + Call(WaitForMessageBoxDone) + Return + End }; EvtScript EVS_MerleeAttackBonus = { - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(BattleMerleeFadeStageToBlack) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 0, 80, 0) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(SetBattleCamZoom, 246) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(10) - EVT_CALL(CreateNpc, NPC_BTL_MERLEE, ANIM_BattleMerlee_Gather) - EVT_CALL(SetNpcFlagBits, NPC_BTL_MERLEE, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) - EVT_CALL(SetNpcRenderMode, NPC_BTL_MERLEE, 34) - EVT_CALL(SetNpcPos, NPC_BTL_MERLEE, 0, 65, 20) - EVT_CHILD_THREAD - EVT_CALL(BattleMerleeUpdateFX) - EVT_END_CHILD_THREAD - EVT_CALL(BattleFadeInMerlee) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_BTL_MERLEE, ANIM_BattleMerlee_Release) - EVT_CALL(func_802619B4) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 4) - EVT_CALL(BattleMerleeFadeStageFromBlack) - EVT_WAIT(20) - EVT_CHILD_THREAD - EVT_CALL(BattleFadeOutMerlee) - EVT_CALL(DeleteNpc, NPC_BTL_MERLEE) - EVT_END_CHILD_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_MAGIC_DESCENDING) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(PlayBattleMerleeGatherFX, LVar0, LVar1, LVar2) - EVT_CALL(PlayBattleMerleeOrbFX, LVar0, LVar1, LVar2) - EVT_WAIT(15) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 18, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_SELF, 0, ANIM_Mario1_Idle) - EVT_CALL(ShowMessageBox, BTL_MSG_MERLEE_ATK_UP, 60) - EVT_CALL(WaitForMessageBoxDone) - EVT_EXEC_WAIT(EVS_MerleeRunOut) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(BattleMerleeFadeStageToBlack) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 0, 80, 0) + Call(SetBattleCamOffsetZ, 0) + Call(SetBattleCamZoom, 246) + Call(MoveBattleCamOver, 20) + Wait(10) + Call(CreateNpc, NPC_BTL_MERLEE, ANIM_BattleMerlee_Gather) + Call(SetNpcFlagBits, NPC_BTL_MERLEE, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) + Call(SetNpcRenderMode, NPC_BTL_MERLEE, 34) + Call(SetNpcPos, NPC_BTL_MERLEE, 0, 65, 20) + ChildThread + Call(BattleMerleeUpdateFX) + EndChildThread + Call(BattleFadeInMerlee) + Wait(30) + Call(SetNpcAnimation, NPC_BTL_MERLEE, ANIM_BattleMerlee_Release) + Call(func_802619B4) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 4) + Call(BattleMerleeFadeStageFromBlack) + Wait(20) + ChildThread + Call(BattleFadeOutMerlee) + Call(DeleteNpc, NPC_BTL_MERLEE) + EndChildThread + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_MAGIC_DESCENDING) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(PlayBattleMerleeGatherFX, LVar0, LVar1, LVar2) + Call(PlayBattleMerleeOrbFX, LVar0, LVar1, LVar2) + Wait(15) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 18, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) + Wait(4) + Call(SetAnimation, ACTOR_SELF, 0, ANIM_Mario1_Idle) + Call(ShowMessageBox, BTL_MSG_MERLEE_ATK_UP, 60) + Call(WaitForMessageBoxDone) + ExecWait(EVS_MerleeRunOut) + Return + End }; EvtScript EVS_MerleeDefenseBonus = { - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(BattleMerleeFadeStageToBlack) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 0, 80, 0) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(SetBattleCamZoom, 246) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(10) - EVT_CALL(CreateNpc, NPC_BTL_MERLEE, ANIM_BattleMerlee_Gather) - EVT_CALL(SetNpcFlagBits, NPC_BTL_MERLEE, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) - EVT_CALL(SetNpcRenderMode, NPC_BTL_MERLEE, 34) - EVT_CALL(SetNpcPos, NPC_BTL_MERLEE, 0, 65, 20) - EVT_CHILD_THREAD - EVT_CALL(BattleMerleeUpdateFX) - EVT_END_CHILD_THREAD - EVT_CALL(BattleFadeInMerlee) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_BTL_MERLEE, ANIM_BattleMerlee_Release) - EVT_CALL(func_802619B4) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 4) - EVT_CALL(BattleMerleeFadeStageFromBlack) - EVT_WAIT(20) - EVT_CHILD_THREAD - EVT_CALL(BattleFadeOutMerlee) - EVT_CALL(DeleteNpc, NPC_BTL_MERLEE) - EVT_END_CHILD_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_MAGIC_DESCENDING) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(PlayBattleMerleeGatherFX, LVar0, LVar1, LVar2) - EVT_CALL(PlayBattleMerleeOrbFX, LVar0, LVar1, LVar2) - EVT_WAIT(15) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_WAIT(22) - EVT_ELSE - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 18, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_SELF, 0, ANIM_Mario1_Idle) - EVT_END_IF - EVT_CALL(ShowMessageBox, BTL_MSG_MERLEE_DEF_UP, 60) - EVT_CALL(WaitForMessageBoxDone) - EVT_EXEC_WAIT(EVS_MerleeRunOut) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(BattleMerleeFadeStageToBlack) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 0, 80, 0) + Call(SetBattleCamOffsetZ, 0) + Call(SetBattleCamZoom, 246) + Call(MoveBattleCamOver, 20) + Wait(10) + Call(CreateNpc, NPC_BTL_MERLEE, ANIM_BattleMerlee_Gather) + Call(SetNpcFlagBits, NPC_BTL_MERLEE, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) + Call(SetNpcRenderMode, NPC_BTL_MERLEE, 34) + Call(SetNpcPos, NPC_BTL_MERLEE, 0, 65, 20) + ChildThread + Call(BattleMerleeUpdateFX) + EndChildThread + Call(BattleFadeInMerlee) + Wait(30) + Call(SetNpcAnimation, NPC_BTL_MERLEE, ANIM_BattleMerlee_Release) + Call(func_802619B4) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 4) + Call(BattleMerleeFadeStageFromBlack) + Wait(20) + ChildThread + Call(BattleFadeOutMerlee) + Call(DeleteNpc, NPC_BTL_MERLEE) + EndChildThread + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_MAGIC_DESCENDING) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(PlayBattleMerleeGatherFX, LVar0, LVar1, LVar2) + Call(PlayBattleMerleeOrbFX, LVar0, LVar1, LVar2) + Wait(15) + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Wait(22) + Else + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 18, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) + Wait(4) + Call(SetAnimation, ACTOR_SELF, 0, ANIM_Mario1_Idle) + EndIf + Call(ShowMessageBox, BTL_MSG_MERLEE_DEF_UP, 60) + Call(WaitForMessageBoxDone) + ExecWait(EVS_MerleeRunOut) + Return + End }; EvtScript EVS_MerleeExpBonus = { - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(BattleMerleeFadeStageToBlack) - EVT_WAIT(10) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19) - EVT_CALL(SetBattleCamTarget, 0, 80, 0) - EVT_CALL(SetBattleCamOffsetZ, 0) - EVT_CALL(SetBattleCamZoom, 246) - EVT_CALL(MoveBattleCamOver, 20) - EVT_WAIT(10) - EVT_CALL(CreateNpc, NPC_BTL_MERLEE, ANIM_BattleMerlee_Gather) - EVT_CALL(SetNpcFlagBits, NPC_BTL_MERLEE, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) - EVT_CALL(SetNpcRenderMode, NPC_BTL_MERLEE, 34) - EVT_CALL(SetNpcPos, NPC_BTL_MERLEE, 0, 65, 20) - EVT_CHILD_THREAD - EVT_CALL(BattleMerleeUpdateFX) - EVT_END_CHILD_THREAD - EVT_CALL(BattleFadeInMerlee) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_BTL_MERLEE, ANIM_BattleMerlee_Release) - EVT_CALL(func_802619B4) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(MoveBattleCamOver, 4) - EVT_CALL(BattleMerleeFadeStageFromBlack) - EVT_WAIT(20) - EVT_CHILD_THREAD - EVT_CALL(BattleFadeOutMerlee) - EVT_CALL(DeleteNpc, NPC_BTL_MERLEE) - EVT_END_CHILD_THREAD - EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_MAGIC_DESCENDING) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(PlayBattleMerleeGatherFX, LVar0, LVar1, LVar2) - EVT_CALL(PlayBattleMerleeOrbFX, LVar0, LVar1, LVar2) - EVT_WAIT(15) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) - EVT_CALL(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(func_80273444, 18, 0, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) - EVT_WAIT(4) - EVT_CALL(SetAnimation, ACTOR_SELF, 0, ANIM_Mario1_Idle) - EVT_CALL(ShowMessageBox, BTL_MSG_MERLEE_EXP_UP, 60) - EVT_CALL(WaitForMessageBoxDone) - EVT_EXEC_WAIT(EVS_MerleeRunOut) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(BattleMerleeFadeStageToBlack) + Wait(10) + Call(UseBattleCamPreset, BTL_CAM_PRESET_19) + Call(SetBattleCamTarget, 0, 80, 0) + Call(SetBattleCamOffsetZ, 0) + Call(SetBattleCamZoom, 246) + Call(MoveBattleCamOver, 20) + Wait(10) + Call(CreateNpc, NPC_BTL_MERLEE, ANIM_BattleMerlee_Gather) + Call(SetNpcFlagBits, NPC_BTL_MERLEE, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) + Call(SetNpcRenderMode, NPC_BTL_MERLEE, 34) + Call(SetNpcPos, NPC_BTL_MERLEE, 0, 65, 20) + ChildThread + Call(BattleMerleeUpdateFX) + EndChildThread + Call(BattleFadeInMerlee) + Wait(30) + Call(SetNpcAnimation, NPC_BTL_MERLEE, ANIM_BattleMerlee_Release) + Call(func_802619B4) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(MoveBattleCamOver, 4) + Call(BattleMerleeFadeStageFromBlack) + Wait(20) + ChildThread + Call(BattleFadeOutMerlee) + Call(DeleteNpc, NPC_BTL_MERLEE) + EndChildThread + Call(PlaySoundAtActor, ACTOR_PLAYER, SOUND_MAGIC_DESCENDING) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(PlayBattleMerleeGatherFX, LVar0, LVar1, LVar2) + Call(PlayBattleMerleeOrbFX, LVar0, LVar1, LVar2) + Wait(15) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land) + Call(SetGoalPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(func_80273444, 18, 0, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Land) + Wait(4) + Call(SetAnimation, ACTOR_SELF, 0, ANIM_Mario1_Idle) + Call(ShowMessageBox, BTL_MSG_MERLEE_EXP_UP, 60) + Call(WaitForMessageBoxDone) + ExecWait(EVS_MerleeRunOut) + Return + End }; EvtScript EVS_PlayerHappy = { - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE) - EVT_CALL(UseBattleCamPresetWait, BTL_CAM_DEFAULT) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_ThumbsUp) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_CALL(SpawnTurnEndFX, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 0) - EVT_ADD(LVar1, 35) - EVT_SET(LVar3, LVarA) - EVT_ADD(LVar3, LVarB) - EVT_IF_GT(LVar3, 0) - EVT_CALL(SpawnRecoverHeartFX, LVar0, LVar1, LVar2, LVar3) - EVT_END_IF - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_ADD(LVar1, 25) - EVT_IF_GT(LVarC, 0) - EVT_CALL(SpawnRecoverFlowerFX, LVar0, LVar1, LVar2, LVarC) - EVT_END_IF - EVT_SET(LVar3, LVarA) - EVT_ADD(LVar3, LVarB) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 25) - EVT_CALL(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, LVar3) - EVT_WAIT(10) - EVT_SET(LVar0, LVarA) - EVT_IF_GT(LVar0, 0) - EVT_LOOP(LVar0) - EVT_CALL(IncrementPlayerHP) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_IF - EVT_SET(LVar0, LVarB) - EVT_IF_GT(LVar0, 0) - EVT_LOOP(LVar0) - EVT_CALL(IncrementPlayerHP) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_IF - EVT_SET(LVar0, LVarC) - EVT_IF_GT(LVar0, 0) - EVT_LOOP(LVar0) - EVT_CALL(IncrementPlayerFP) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(SetAnimation, ACTOR_SELF, 0, ANIM_Mario1_Idle) - EVT_CALL(RemoveTurnEndFX) - EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PLAYER, FALSE) + Call(UseBattleCamPresetWait, BTL_CAM_DEFAULT) + Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_ThumbsUp) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Call(SpawnTurnEndFX, LVar0, LVar1, LVar2) + Add(LVar0, 0) + Add(LVar1, 35) + Set(LVar3, LVarA) + Add(LVar3, LVarB) + IfGt(LVar3, 0) + Call(SpawnRecoverHeartFX, LVar0, LVar1, LVar2, LVar3) + EndIf + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Add(LVar1, 25) + IfGt(LVarC, 0) + Call(SpawnRecoverFlowerFX, LVar0, LVar1, LVar2, LVarC) + EndIf + Set(LVar3, LVarA) + Add(LVar3, LVarB) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 25) + Call(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, LVar3) + Wait(10) + Set(LVar0, LVarA) + IfGt(LVar0, 0) + Loop(LVar0) + Call(IncrementPlayerHP) + Wait(1) + EndLoop + EndIf + Set(LVar0, LVarB) + IfGt(LVar0, 0) + Loop(LVar0) + Call(IncrementPlayerHP) + Wait(1) + EndLoop + EndIf + Set(LVar0, LVarC) + IfGt(LVar0, 0) + Loop(LVar0) + Call(IncrementPlayerFP) + Wait(1) + EndLoop + EndIf + Wait(30) + Call(SetAnimation, ACTOR_SELF, 0, ANIM_Mario1_Idle) + Call(RemoveTurnEndFX) + Call(UseIdleAnimation, ACTOR_PLAYER, TRUE) + Return + End }; EvtScript EVS_ApplyDizzyAttack = { - EVT_SET(LVar0, 0) - EVT_LOOP(40) - EVT_ADD(LVar0, 72) - EVT_CALL(SetActorRotation, ACTOR_ENEMY0, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(InflictDizzyAttackStatus) - EVT_CALL(SetActorRotation, ACTOR_ENEMY0, 0, 0, 0) - EVT_RETURN - EVT_END + Set(LVar0, 0) + Loop(40) + Add(LVar0, 72) + Call(SetActorRotation, ACTOR_ENEMY0, 0, LVar0, 0) + Wait(1) + EndLoop + Call(InflictDizzyAttackStatus) + Call(SetActorRotation, ACTOR_ENEMY0, 0, 0, 0) + Return + End }; EvtScript EVS_PlayerRegainAbility = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVarF, LVar1, LVar2) - EVT_LOOP(LVar0) - EVT_ADD(LVarF, 3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetLostHammerAndBootsLevel) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(BTL_MENU_TYPE_ITEMS) - EVT_SET(LVarE, 0) - EVT_SET(LVarA, ITEM_MENU_ITEMS) - EVT_CASE_EQ(BTL_MENU_TYPE_SMASH) - EVT_SET(LVarE, 1) - EVT_SWITCH(LVarC) - EVT_CASE_EQ(0) - EVT_SET(LVarA, ITEM_MENU_HAMMER1) - EVT_CASE_EQ(1) - EVT_SET(LVarA, ITEM_MENU_HAMMER2) - EVT_CASE_EQ(2) - EVT_SET(LVarA, ITEM_MENU_HAMMER3) - EVT_END_SWITCH - EVT_CASE_EQ(BTL_MENU_TYPE_JUMP) - EVT_SET(LVarE, 2) - EVT_SWITCH(LVarB) - EVT_CASE_EQ(0) - EVT_SET(LVarA, ITEM_MENU_BOOTS1) - EVT_CASE_EQ(1) - EVT_SET(LVarA, ITEM_MENU_BOOTS2) - EVT_CASE_EQ(2) - EVT_SET(LVarA, ITEM_MENU_BOOTS3) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVarF, 24) - EVT_ADD(LVar1, 150) - EVT_CALL(MakeItemEntity, LVarA, LVarF, LVar1, LVar2, 1, 0) - EVT_SET(LVarA, LVar0) - EVT_CALL(DropAbilityItem) - EVT_CALL(AbilityItemUnkDelay) - EVT_CALL(PlayerGatherAbilityItem) - EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_STARS_SHIMMER, 0, LVar0, LVar1, LVar2, 30, 30, 10, 30) - EVT_CALL(RemoveItemEntity, LVarA) - EVT_CALL(FreezeBattleState, FALSE) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(GetActorPos, ACTOR_PLAYER, LVarF, LVar1, LVar2) + Loop(LVar0) + Add(LVarF, 3) + Wait(1) + EndLoop + Call(GetLostHammerAndBootsLevel) + Switch(LVarA) + CaseEq(BTL_MENU_TYPE_ITEMS) + Set(LVarE, 0) + Set(LVarA, ITEM_MENU_ITEMS) + CaseEq(BTL_MENU_TYPE_SMASH) + Set(LVarE, 1) + Switch(LVarC) + CaseEq(0) + Set(LVarA, ITEM_MENU_HAMMER1) + CaseEq(1) + Set(LVarA, ITEM_MENU_HAMMER2) + CaseEq(2) + Set(LVarA, ITEM_MENU_HAMMER3) + EndSwitch + CaseEq(BTL_MENU_TYPE_JUMP) + Set(LVarE, 2) + Switch(LVarB) + CaseEq(0) + Set(LVarA, ITEM_MENU_BOOTS1) + CaseEq(1) + Set(LVarA, ITEM_MENU_BOOTS2) + CaseEq(2) + Set(LVarA, ITEM_MENU_BOOTS3) + EndSwitch + EndSwitch + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVarF, 24) + Add(LVar1, 150) + Call(MakeItemEntity, LVarA, LVarF, LVar1, LVar2, 1, 0) + Set(LVarA, LVar0) + Call(DropAbilityItem) + Call(AbilityItemUnkDelay) + Call(PlayerGatherAbilityItem) + Call(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2) + Add(LVar1, 20) + PlayEffect(EFFECT_STARS_SHIMMER, 0, LVar0, LVar1, LVar2, 30, 30, 10, 30) + Call(RemoveItemEntity, LVarA) + Call(FreezeBattleState, FALSE) + Return + End }; diff --git a/src/battle/standard_events.c b/src/battle/standard_events.c index 75dd138d712..dc997c23380 100644 --- a/src/battle/standard_events.c +++ b/src/battle/standard_events.c @@ -37,81 +37,81 @@ API_CALLABLE(AddEffectOffset) { // (in) LVar2: celebration end animID // (in) LVar3: idle animID EvtScript EVS_Partner_Celebrate = { - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_LOOP(2) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, 6, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, 4, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, 2, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, -1, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, -3, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, -4, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, -6, 0) - EVT_WAIT(1) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, 6, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, 4, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, 2, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, -1, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, -2, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, -3, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, -4, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, -6, 0) - EVT_WAIT(1) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar3) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Loop(2) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(AddActorPos, ACTOR_SELF, 0, 6, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 0, 4, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 0, 3, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 0, 2, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 0, 1, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 0, -1, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 0, -2, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 0, -3, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 0, -4, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 0, -6, 0) + Wait(1) + Wait(1) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar2) + Wait(1) + EndLoop + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(AddActorPos, ACTOR_SELF, 0, 6, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 0, 4, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 0, 3, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 0, 2, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 0, 1, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 0, -1, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 0, -2, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 0, -3, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 0, -4, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 0, -6, 0) + Wait(1) + Wait(1) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar3) + Return + End }; // Partner actions during 'Run Away' // (in) LVar0: part idx // (in) LVar1: run animID EvtScript EVS_Partner_RunAway = { - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_WAIT(10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.2)) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) - EVT_WAIT(5) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(12.0)) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, -250, 0, 0) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE) - EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE) - EVT_RETURN - EVT_END + Call(UseIdleAnimation, ACTOR_PARTNER, FALSE) + Call(SetActorYaw, ACTOR_SELF, 180) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Wait(10) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.2)) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) + Wait(5) + Call(SetActorSpeed, ACTOR_SELF, Float(12.0)) + Call(SetGoalPos, ACTOR_PARTNER, -250, 0, 0) + Call(RunToGoal, ACTOR_PARTNER, 0, FALSE) + Call(UseIdleAnimation, ACTOR_PARTNER, TRUE) + Return + End }; // Partner reaction to touching a fiery enemy @@ -119,99 +119,99 @@ EvtScript EVS_Partner_RunAway = { // (in) LVar2: rotation y-offset // (in) LVar3: burn still animID EvtScript EVS_Partner_BurnContact = { - EVT_SET(LVarA, LVar1) - EVT_SET(LVarB, LVar2) - EVT_SET(LVarC, LVar3) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_62) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, LVarA) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 60) - EVT_ADD(LVar1, 40) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(0.1)) - EVT_CALL(SetJumpAnimations, ACTOR_PARTNER, 0, LVarA, LVarA, LVarA) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 5, FALSE, FALSE, FALSE) - EVT_SET(LVar1, LVarA) - EVT_SET(LVar2, LVarC) - EVT_EXEC_WAIT(EVS_Partner_BurnHit) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CHILD_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_PARTNER, 0, LVarB, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(15) - EVT_ADD(LVar0, 48) - EVT_CALL(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0) - EVT_END_CHILD_THREAD - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.4)) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 15, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 4, FALSE, TRUE, FALSE) - EVT_RETURN - EVT_END + Set(LVarA, LVar1) + Set(LVarB, LVar2) + Set(LVarC, LVar3) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_62) + Call(SetAnimation, ACTOR_PARTNER, -1, LVarA) + Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Sub(LVar0, 60) + Add(LVar1, 40) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.1)) + Call(SetJumpAnimations, ACTOR_PARTNER, 0, LVarA, LVarA, LVarA) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 5, FALSE, FALSE, FALSE) + Set(LVar1, LVarA) + Set(LVar2, LVarC) + ExecWait(EVS_Partner_BurnHit) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ChildThread + Call(SetActorRotationOffset, ACTOR_PARTNER, 0, LVarB, 0) + Set(LVar0, 0) + Loop(15) + Add(LVar0, 48) + Call(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0) + EndChildThread + Call(SetGoalToHome, ACTOR_PARTNER) + Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.4)) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 15, FALSE, TRUE, FALSE) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) + Sub(LVar0, 10) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 4, FALSE, TRUE, FALSE) + Return + End }; // Partner reaction to touching a spiky enemy // (in) LVar1: hurt still animID // (in) LVar2: rotation y-offset EvtScript EVS_Partner_SpikeContact = { - EVT_SET(LVarA, LVar1) - EVT_SET(LVarB, LVar2) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_61) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, LVarA) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 60) - EVT_ADD(LVar1, 40) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(0.1)) - EVT_CALL(SetJumpAnimations, ACTOR_PARTNER, 0, LVarA, LVarA, LVarA) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 5, FALSE, FALSE, FALSE) - EVT_SET(LVar1, LVarA) - EVT_SET(LVar2, 0) - EVT_EXEC_WAIT(EVS_Partner_Hit) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CHILD_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_PARTNER, 0, LVarB, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(15) - EVT_ADD(LVar0, 48) - EVT_CALL(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0) - EVT_END_CHILD_THREAD - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.4)) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 15, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 4, FALSE, TRUE, FALSE) - EVT_RETURN - EVT_END + Set(LVarA, LVar1) + Set(LVarB, LVar2) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_61) + Call(SetAnimation, ACTOR_PARTNER, -1, LVarA) + Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Sub(LVar0, 60) + Add(LVar1, 40) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.1)) + Call(SetJumpAnimations, ACTOR_PARTNER, 0, LVarA, LVarA, LVarA) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 5, FALSE, FALSE, FALSE) + Set(LVar1, LVarA) + Set(LVar2, 0) + ExecWait(EVS_Partner_Hit) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ChildThread + Call(SetActorRotationOffset, ACTOR_PARTNER, 0, LVarB, 0) + Set(LVar0, 0) + Loop(15) + Add(LVar0, 48) + Call(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0) + EndChildThread + Call(SetGoalToHome, ACTOR_PARTNER) + Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.4)) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 15, FALSE, TRUE, FALSE) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) + Sub(LVar0, 10) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 4, FALSE, TRUE, FALSE) + Return + End }; // Bombette-specific reaction to touching a spiky enemy @@ -219,106 +219,106 @@ EvtScript EVS_Partner_SpikeContact = { // (in) LVar2: rotation y-offset // (in) LVar3: injured animID EvtScript EVS_Partner_BombetteSpikeContact = { - EVT_SET(LVarA, LVar1) - EVT_SET(LVarB, LVar2) - EVT_SET(LVarC, LVar3) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_61) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, LVarA) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 60) - EVT_ADD(LVar1, 40) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(0.1)) - EVT_CALL(SetJumpAnimations, ACTOR_PARTNER, 0, LVarA, LVarA, LVarA) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 5, FALSE, FALSE, FALSE) - EVT_SET(LVar1, LVarA) - EVT_SET(LVar2, 0) - EVT_EXEC_WAIT(EVS_Partner_Hit) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CHILD_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_PARTNER, 0, LVarB, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(15) - EVT_ADD(LVar0, 48) - EVT_CALL(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0) - EVT_END_CHILD_THREAD - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.4)) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 15, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, LVarC) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, LVarA) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, LVarC) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, LVarA) - EVT_SUB(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 4, FALSE, TRUE, FALSE) - EVT_RETURN - EVT_END + Set(LVarA, LVar1) + Set(LVarB, LVar2) + Set(LVarC, LVar3) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_61) + Call(SetAnimation, ACTOR_PARTNER, -1, LVarA) + Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Sub(LVar0, 60) + Add(LVar1, 40) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.1)) + Call(SetJumpAnimations, ACTOR_PARTNER, 0, LVarA, LVarA, LVarA) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 5, FALSE, FALSE, FALSE) + Set(LVar1, LVarA) + Set(LVar2, 0) + ExecWait(EVS_Partner_Hit) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ChildThread + Call(SetActorRotationOffset, ACTOR_PARTNER, 0, LVarB, 0) + Set(LVar0, 0) + Loop(15) + Add(LVar0, 48) + Call(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0) + EndChildThread + Call(SetGoalToHome, ACTOR_PARTNER) + Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.4)) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 15, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, LVarC) + Wait(1) + Call(SetAnimation, ACTOR_PARTNER, -1, LVarA) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, LVarC) + Wait(1) + Call(SetAnimation, ACTOR_PARTNER, -1, LVarA) + Sub(LVar0, 10) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 4, FALSE, TRUE, FALSE) + Return + End }; // Partner reaction to being hit by a shocking attack // (in) LVar1: hurt loop animID // (in) LVar2: rotation y-offset EvtScript EVS_Partner_ShockHit = { - EVT_SET(LVarA, LVar1) - EVT_SET(LVarB, LVar2) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_62) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, LVarA) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 60) - EVT_ADD(LVar1, 40) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(0.1)) - EVT_CALL(SetJumpAnimations, ACTOR_PARTNER, 0, LVarA, LVarA, LVarA) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 5, FALSE, FALSE, FALSE) - EVT_CALL(ShowShockEffect, ACTOR_SELF) - EVT_SET(LVar1, LVarA) - EVT_SET(LVar2, 0) - EVT_EXEC_WAIT(EVS_Partner_Hit) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CHILD_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_PARTNER, 0, LVarB, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(15) - EVT_ADD(LVar0, 48) - EVT_CALL(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0) - EVT_END_CHILD_THREAD - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.4)) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 15, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) - EVT_SUB(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 4, FALSE, TRUE, FALSE) - EVT_RETURN - EVT_END + Set(LVarA, LVar1) + Set(LVarB, LVar2) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_62) + Call(SetAnimation, ACTOR_PARTNER, -1, LVarA) + Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Sub(LVar0, 60) + Add(LVar1, 40) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.1)) + Call(SetJumpAnimations, ACTOR_PARTNER, 0, LVarA, LVarA, LVarA) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 5, FALSE, FALSE, FALSE) + Call(ShowShockEffect, ACTOR_SELF) + Set(LVar1, LVarA) + Set(LVar2, 0) + ExecWait(EVS_Partner_Hit) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ChildThread + Call(SetActorRotationOffset, ACTOR_PARTNER, 0, LVarB, 0) + Set(LVar0, 0) + Loop(15) + Add(LVar0, 48) + Call(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0) + EndChildThread + Call(SetGoalToHome, ACTOR_PARTNER) + Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.4)) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 15, FALSE, TRUE, FALSE) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) + Sub(LVar0, 10) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 4, FALSE, TRUE, FALSE) + Return + End }; // Unused partner reaction to being hit by a shocking attack @@ -327,57 +327,57 @@ EvtScript EVS_Partner_ShockHit = { // (in) LVar2: rotation y-offset // (in) LVar3: jolt animID (?) EvtScript EVS_Partner_UnusedShockHit = { - EVT_SET(LVarA, LVar1) - EVT_SET(LVarB, LVar2) - EVT_SET(LVarC, LVar3) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_62) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, LVarA) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 60) - EVT_ADD(LVar1, 40) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(0.1)) - EVT_CALL(SetJumpAnimations, ACTOR_PARTNER, 0, LVarA, LVarA, LVarA) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 5, FALSE, FALSE, FALSE) - EVT_CALL(ShowShockEffect, ACTOR_SELF) - EVT_SET(LVar1, LVarA) - EVT_SET(LVar2, 0) - EVT_EXEC_WAIT(EVS_Partner_Hit) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CHILD_THREAD - EVT_CALL(SetActorRotationOffset, ACTOR_PARTNER, 0, LVarB, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(15) - EVT_ADD(LVar0, 48) - EVT_CALL(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0) - EVT_END_CHILD_THREAD - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.4)) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 15, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, LVarC) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, LVarA) - EVT_SUB(LVar0, 20) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, LVarC) - EVT_WAIT(1) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, LVarA) - EVT_SUB(LVar0, 10) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 4, FALSE, TRUE, FALSE) - EVT_RETURN - EVT_END + Set(LVarA, LVar1) + Set(LVarB, LVar2) + Set(LVarC, LVar3) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorScale, ACTOR_SELF, Float(1.0), Float(1.0), Float(1.0)) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(UseBattleCamPreset, BTL_CAM_PRESET_62) + Call(SetAnimation, ACTOR_PARTNER, -1, LVarA) + Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Sub(LVar0, 60) + Add(LVar1, 40) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(0.1)) + Call(SetJumpAnimations, ACTOR_PARTNER, 0, LVarA, LVarA, LVarA) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 5, FALSE, FALSE, FALSE) + Call(ShowShockEffect, ACTOR_SELF) + Set(LVar1, LVarA) + Set(LVar2, 0) + ExecWait(EVS_Partner_Hit) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ChildThread + Call(SetActorRotationOffset, ACTOR_PARTNER, 0, LVarB, 0) + Set(LVar0, 0) + Loop(15) + Add(LVar0, 48) + Call(SetActorRotation, ACTOR_PARTNER, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetActorRotationOffset, ACTOR_PARTNER, 0, 0, 0) + EndChildThread + Call(SetGoalToHome, ACTOR_PARTNER) + Call(GetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.4)) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 15, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, LVarC) + Wait(1) + Call(SetAnimation, ACTOR_PARTNER, -1, LVarA) + Sub(LVar0, 20) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) + Call(SetAnimation, ACTOR_PARTNER, -1, LVarC) + Wait(1) + Call(SetAnimation, ACTOR_PARTNER, -1, LVarA) + Sub(LVar0, 10) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 4, FALSE, TRUE, FALSE) + Return + End }; // Partner gets up from being KO @@ -386,433 +386,433 @@ EvtScript EVS_Partner_UnusedShockHit = { // (in) LVar2: run animID // (in) LVar3: idle y-pos EvtScript EVS_Partner_Recover = { - EVT_SET(LVar6, LVar3) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.8)) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar7, LVar8, LVar9) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, LVar2) - EVT_IF_EQ(LVar6, 0) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar7, LVar6, LVar9) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 15, FALSE, TRUE, FALSE) - EVT_ELSE - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar7, LVar6, LVar9) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 15, FALSE, FALSE, FALSE) - EVT_END_IF - EVT_CALL(SetGoalToHome, ACTOR_PARTNER) - EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(6.0)) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, LVar1) - EVT_CALL(RunToGoal, ACTOR_PARTNER, 0) - EVT_RETURN - EVT_END + Set(LVar6, LVar3) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.8)) + Call(GetActorPos, ACTOR_PARTNER, LVar7, LVar8, LVar9) + Call(SetAnimation, ACTOR_PARTNER, -1, LVar2) + IfEq(LVar6, 0) + Call(SetGoalPos, ACTOR_PARTNER, LVar7, LVar6, LVar9) + Call(JumpToGoal, ACTOR_PARTNER, 15, FALSE, TRUE, FALSE) + Else + Call(SetGoalPos, ACTOR_PARTNER, LVar7, LVar6, LVar9) + Call(JumpToGoal, ACTOR_PARTNER, 15, FALSE, FALSE, FALSE) + EndIf + Call(SetGoalToHome, ACTOR_PARTNER) + Call(SetActorSpeed, ACTOR_PARTNER, Float(6.0)) + Call(SetAnimation, ACTOR_PARTNER, -1, LVar1) + Call(RunToGoal, ACTOR_PARTNER, 0) + Return + End }; // Partner falls down if y > 0 // (in) LVar1: hurt animID EvtScript EVS_Partner_Drop = { - EVT_SET(LVarA, LVar1) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar1, 0) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(func_8026F1A0, ACTOR_PARTNER, 1) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, LVarA) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetActorJumpGravity, ACTOR_PARTNER, EVT_FLOAT(1.0)) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 8, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_PARTNER, 5, FALSE, TRUE, FALSE) - EVT_WAIT(8) - EVT_LABEL(10) - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 0, LVar0, LVar1, LVar2) - EVT_RETURN - EVT_END + Set(LVarA, LVar1) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + IfEq(LVar1, 0) + Goto(10) + EndIf + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(func_8026F1A0, ACTOR_PARTNER, 1) + Call(SetAnimation, ACTOR_PARTNER, -1, LVarA) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetActorJumpGravity, ACTOR_PARTNER, Float(1.0)) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 8, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_PARTNER, 5, FALSE, TRUE, FALSE) + Wait(8) + Label(10) + Call(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_LANDING_DUST, 0, LVar0, LVar1, LVar2) + Return + End }; // Partner reaction to being hit by a fiery attack // (in) LVar1: burn hurt loop animID // (in) LVar2: burn hurt end animID EvtScript EVS_Partner_BurnHit = { - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, LVar1) - EVT_CHILD_THREAD - EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar5, LVar6, LVar7) - EVT_ADD(LVar5, -5) - EVT_ADD(LVar6, 18) - EVT_ADD(LVar7, 5) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 0, LVar5, LVar6, LVar7, EVT_FLOAT(1.5), 15) - EVT_WAIT(2) - EVT_ADD(LVar5, 10) - EVT_ADD(LVar6, -14) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 0, LVar5, LVar6, LVar7, EVT_FLOAT(1.5), 15) - EVT_END_CHILD_THREAD - EVT_CALL(GetDamageIntensity) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(DAMAGE_INTENSITY_LIGHT) - EVT_CALL(StartRumble, BTL_RUMBLE_HIT_LIGHT) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 8, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(4) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(10) - EVT_CASE_EQ(DAMAGE_INTENSITY_MEDIUM) - EVT_CALL(StartRumble, BTL_RUMBLE_HIT_LIGHT) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 20, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 22, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(6) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(10) - EVT_CASE_EQ(DAMAGE_INTENSITY_HEAVY) - EVT_CALL(StartRumble, BTL_RUMBLE_HIT_HEAVY) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 6, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 22, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 12, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 25, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 12, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 17, 0) - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(6) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(10) - EVT_CASE_EQ(DAMAGE_INTENSITY_EXTREME) - EVT_CALL(StartRumble, BTL_RUMBLE_HIT_EXTREME) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 8, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 24, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 28, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 19, 0) - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(6) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(2) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 2, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(10) - EVT_END_SWITCH - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, LVar2) - EVT_WAIT(8) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_PARTNER, -1, LVar1) + ChildThread + Call(GetActorPos, ACTOR_PARTNER, LVar5, LVar6, LVar7) + Add(LVar5, -5) + Add(LVar6, 18) + Add(LVar7, 5) + PlayEffect(EFFECT_RING_BLAST, 0, LVar5, LVar6, LVar7, Float(1.5), 15) + Wait(2) + Add(LVar5, 10) + Add(LVar6, -14) + PlayEffect(EFFECT_RING_BLAST, 0, LVar5, LVar6, LVar7, Float(1.5), 15) + EndChildThread + Call(GetDamageIntensity) + Switch(LVar0) + CaseEq(DAMAGE_INTENSITY_LIGHT) + Call(StartRumble, BTL_RUMBLE_HIT_LIGHT) + Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 8, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) + Wait(1) + Loop(2) + Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Loop(4) + Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(10) + CaseEq(DAMAGE_INTENSITY_MEDIUM) + Call(StartRumble, BTL_RUMBLE_HIT_LIGHT) + Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 20, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 22, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) + Wait(1) + Loop(2) + Call(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Loop(6) + Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(10) + CaseEq(DAMAGE_INTENSITY_HEAVY) + Call(StartRumble, BTL_RUMBLE_HIT_HEAVY) + Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 6, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 22, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 12, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 25, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 12, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 17, 0) + Wait(1) + Loop(2) + Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Loop(6) + Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(10) + CaseEq(DAMAGE_INTENSITY_EXTREME) + Call(StartRumble, BTL_RUMBLE_HIT_EXTREME) + Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 8, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 24, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 28, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 19, 0) + Wait(1) + Loop(2) + Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Loop(6) + Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Loop(2) + Call(SetActorDispOffset, ACTOR_SELF, 0, 2, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(10) + EndSwitch + Call(SetAnimation, ACTOR_PARTNER, -1, LVar2) + Wait(8) + Return + End }; // Internal script for animating a partner hit by an attack // (in) LVar1: hurt loop animID EvtScript EVS_Partner_Hit_Impl = { - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, LVar1) - EVT_CALL(GetDamageIntensity) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(DAMAGE_INTENSITY_LIGHT) - EVT_CALL(StartRumble, BTL_RUMBLE_HIT_LIGHT) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 8, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(4) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(10) - EVT_CASE_EQ(DAMAGE_INTENSITY_MEDIUM) - EVT_CALL(StartRumble, BTL_RUMBLE_HIT_LIGHT) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 20, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 22, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(6) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(10) - EVT_CASE_EQ(DAMAGE_INTENSITY_HEAVY) - EVT_CALL(StartRumble, BTL_RUMBLE_HIT_HEAVY) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 6, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 22, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 12, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 25, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 12, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 17, 0) - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(6) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(10) - EVT_CASE_EQ(DAMAGE_INTENSITY_EXTREME) - EVT_CALL(StartRumble, BTL_RUMBLE_HIT_EXTREME) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 8, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 24, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 28, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 19, 0) - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(6) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(2) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 2, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(10) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_PARTNER, -1, LVar1) + Call(GetDamageIntensity) + Switch(LVar0) + CaseEq(DAMAGE_INTENSITY_LIGHT) + Call(StartRumble, BTL_RUMBLE_HIT_LIGHT) + Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 8, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) + Wait(1) + Loop(2) + Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Loop(4) + Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(10) + CaseEq(DAMAGE_INTENSITY_MEDIUM) + Call(StartRumble, BTL_RUMBLE_HIT_LIGHT) + Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 20, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 22, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) + Wait(1) + Loop(2) + Call(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Loop(6) + Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(10) + CaseEq(DAMAGE_INTENSITY_HEAVY) + Call(StartRumble, BTL_RUMBLE_HIT_HEAVY) + Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 6, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 22, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 12, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 25, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 12, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 17, 0) + Wait(1) + Loop(2) + Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Loop(6) + Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(10) + CaseEq(DAMAGE_INTENSITY_EXTREME) + Call(StartRumble, BTL_RUMBLE_HIT_EXTREME) + Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 8, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 24, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 28, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 19, 0) + Wait(1) + Loop(2) + Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Loop(6) + Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Loop(2) + Call(SetActorDispOffset, ACTOR_SELF, 0, 2, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(10) + EndSwitch + Return + End }; // Internal script for animating a partner hit by a crushing attack EvtScript EVS_Partner_Crushed_Impl = { - EVT_CALL(StartRumble, BTL_RUMBLE_HIT_MAX) - EVT_SETF(LVar0, EVT_FLOAT(1.0)) - EVT_SETF(LVar1, EVT_FLOAT(1.0)) - EVT_LOOP(10) - EVT_ADDF(LVar0, EVT_FLOAT(0.1)) - EVT_SUBF(LVar1, EVT_FLOAT(0.08)) - EVT_CALL(SetActorScale, ACTOR_PARTNER, LVar0, LVar1, EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(45) - EVT_LOOP(5) - EVT_SUBF(LVar0, EVT_FLOAT(0.22)) - EVT_ADDF(LVar1, EVT_FLOAT(0.2)) - EVT_CALL(SetActorScale, ACTOR_PARTNER, LVar0, LVar1, EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorScale, ACTOR_PARTNER, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(StartRumble, BTL_RUMBLE_HIT_MAX) + SetF(LVar0, Float(1.0)) + SetF(LVar1, Float(1.0)) + Loop(10) + AddF(LVar0, Float(0.1)) + SubF(LVar1, Float(0.08)) + Call(SetActorScale, ACTOR_PARTNER, LVar0, LVar1, Float(1.0)) + Wait(1) + EndLoop + Wait(45) + Loop(5) + SubF(LVar0, Float(0.22)) + AddF(LVar1, Float(0.2)) + Call(SetActorScale, ACTOR_PARTNER, LVar0, LVar1, Float(1.0)) + Wait(1) + EndLoop + Call(SetActorScale, ACTOR_PARTNER, Float(1.0), Float(1.0), Float(1.0)) + Return + End }; // Lakilester-specific reaction to being hit by an attack // (in) LVar1: hurt loop animID // (in) LVar2: hurt end animID EvtScript EVS_Partner_LakilesterHit = { - EVT_CALL(GetDamageSource, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(DMG_SRC_DEFAULT) - EVT_EXEC_WAIT(EVS_Partner_Hit_Impl) - EVT_CASE_OR_EQ(DMG_SRC_CRUSH) - EVT_CASE_OR_EQ(DMG_SRC_TUBBA_SMASH) - EVT_CASE_OR_EQ(DMG_SRC_CRUSH_PARTNER) - EVT_EXEC_WAIT(EVS_Partner_Crushed_Impl) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(EVS_Partner_Hit_Impl) - EVT_END_SWITCH - EVT_IF_NE(LVar2, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, LVar2) - EVT_WAIT(8) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetDamageSource, LVar0) + Switch(LVar0) + CaseEq(DMG_SRC_DEFAULT) + ExecWait(EVS_Partner_Hit_Impl) + CaseOrEq(DMG_SRC_CRUSH) + CaseOrEq(DMG_SRC_TUBBA_SMASH) + CaseOrEq(DMG_SRC_CRUSH_PARTNER) + ExecWait(EVS_Partner_Crushed_Impl) + EndCaseGroup + CaseDefault + ExecWait(EVS_Partner_Hit_Impl) + EndSwitch + IfNe(LVar2, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, LVar2) + Wait(8) + EndIf + Return + End }; // Partner reaction to being hit by an attack // (in) LVar1: hurt loop animID // (in) LVar2: hurt end animID EvtScript EVS_Partner_Hit = { - EVT_EXEC_WAIT(EVS_Partner_Hit_Impl) - EVT_IF_NE(LVar2, 0) - EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, LVar2) - EVT_WAIT(8) - EVT_END_IF - EVT_RETURN - EVT_END + ExecWait(EVS_Partner_Hit_Impl) + IfNe(LVar2, 0) + Call(SetAnimation, ACTOR_PARTNER, -1, LVar2) + Wait(8) + EndIf + Return + End }; // Partner reaction to being hit by an attack dealing no damage // (in) LVar0: part idx // (in) LVar1: hurt loop animID EvtScript EVS_Partner_NoDamageHit = { - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(AddActorPos, ACTOR_SELF, -2, 0, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 2, 0, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, -4, 0, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 4, 0, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, -2, 0, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 2, 0, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, -3, 0, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 3, 0, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, -2, 0, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 2, 0, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, -1, 0, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 1, 0, 0) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(AddActorPos, ACTOR_SELF, -2, 0, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 2, 0, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, -4, 0, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 4, 0, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, -2, 0, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 2, 0, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, -3, 0, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 3, 0, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, -2, 0, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 2, 0, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, -1, 0, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 1, 0, 0) + Wait(1) + Return + End }; // Internal script for animating player hit by an attack @@ -820,1319 +820,1319 @@ EvtScript EVS_Partner_NoDamageHit = { // (in) LVar1: hurt loop animID // (in) LVar2: hurt end animID (unused) EvtScript EVS_Player_Hit_Impl = { - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, LVar1) - EVT_CALL(GetDamageIntensity) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(DAMAGE_INTENSITY_LIGHT) - EVT_CALL(StartRumble, BTL_RUMBLE_HIT_LIGHT) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 8, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(4) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(10) - EVT_CASE_EQ(DAMAGE_INTENSITY_MEDIUM) - EVT_CALL(StartRumble, BTL_RUMBLE_HIT_LIGHT) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 20, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 22, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(6) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(10) - EVT_CASE_EQ(DAMAGE_INTENSITY_HEAVY) - EVT_CALL(StartRumble, BTL_RUMBLE_HIT_HEAVY) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 6, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 22, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 12, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 25, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 12, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 17, 0) - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(6) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(10) - EVT_CASE_EQ(DAMAGE_INTENSITY_EXTREME) - EVT_CALL(StartRumble, BTL_RUMBLE_HIT_EXTREME) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 8, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 24, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 28, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 19, 0) - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(6) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(2) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 2, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(10) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_PLAYER, 0, LVar1) + Call(GetDamageIntensity) + Switch(LVar0) + CaseEq(DAMAGE_INTENSITY_LIGHT) + Call(StartRumble, BTL_RUMBLE_HIT_LIGHT) + Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 8, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) + Wait(1) + Loop(2) + Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Loop(4) + Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(10) + CaseEq(DAMAGE_INTENSITY_MEDIUM) + Call(StartRumble, BTL_RUMBLE_HIT_LIGHT) + Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 20, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 22, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) + Wait(1) + Loop(2) + Call(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Loop(6) + Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(10) + CaseEq(DAMAGE_INTENSITY_HEAVY) + Call(StartRumble, BTL_RUMBLE_HIT_HEAVY) + Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 6, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 22, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 12, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 25, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 12, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 17, 0) + Wait(1) + Loop(2) + Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Loop(6) + Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(10) + CaseEq(DAMAGE_INTENSITY_EXTREME) + Call(StartRumble, BTL_RUMBLE_HIT_EXTREME) + Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 8, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 24, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 28, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 19, 0) + Wait(1) + Loop(2) + Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Loop(6) + Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Loop(2) + Call(SetActorDispOffset, ACTOR_SELF, 0, 2, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(10) + EndSwitch + Return + End }; EvtScript EVS_Player_Crushed_Impl = { - EVT_CALL(StartRumble, BTL_RUMBLE_HIT_MAX) - EVT_SETF(LVar0, EVT_FLOAT(1.0)) - EVT_SETF(LVar1, EVT_FLOAT(1.0)) - EVT_LOOP(10) - EVT_ADDF(LVar0, EVT_FLOAT(0.1)) - EVT_SUBF(LVar1, EVT_FLOAT(0.08)) - EVT_CALL(SetActorScale, ACTOR_PLAYER, LVar0, LVar1, EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(45) - EVT_LOOP(5) - EVT_SUBF(LVar0, EVT_FLOAT(0.22)) - EVT_ADDF(LVar1, EVT_FLOAT(0.2)) - EVT_CALL(SetActorScale, ACTOR_PLAYER, LVar0, LVar1, EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorScale, ACTOR_PLAYER, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(StartRumble, BTL_RUMBLE_HIT_MAX) + SetF(LVar0, Float(1.0)) + SetF(LVar1, Float(1.0)) + Loop(10) + AddF(LVar0, Float(0.1)) + SubF(LVar1, Float(0.08)) + Call(SetActorScale, ACTOR_PLAYER, LVar0, LVar1, Float(1.0)) + Wait(1) + EndLoop + Wait(45) + Loop(5) + SubF(LVar0, Float(0.22)) + AddF(LVar1, Float(0.2)) + Call(SetActorScale, ACTOR_PLAYER, LVar0, LVar1, Float(1.0)) + Wait(1) + EndLoop + Call(SetActorScale, ACTOR_PLAYER, Float(1.0), Float(1.0), Float(1.0)) + Return + End }; EvtScript EVS_Player_NextSlapRight_Impl = { - EVT_CHILD_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 36) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(GetDamageIntensity) - EVT_EXEC_WAIT(EVS_Player_Hit_Impl) - EVT_RETURN - EVT_END + ChildThread + Set(LVar0, 0) + Loop(10) + Add(LVar0, 36) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + EndChildThread + Call(GetDamageIntensity) + ExecWait(EVS_Player_Hit_Impl) + Return + End }; EvtScript EVS_Player_NextSlapLeft_Impl = { - EVT_CHILD_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, -36) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(GetDamageIntensity) - EVT_EXEC_WAIT(EVS_Player_Hit_Impl) - EVT_RETURN - EVT_END + ChildThread + Set(LVar0, 0) + Loop(10) + Add(LVar0, -36) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + EndChildThread + Call(GetDamageIntensity) + ExecWait(EVS_Player_Hit_Impl) + Return + End }; EvtScript EVS_Player_LastSlapRight_Impl = { - EVT_CHILD_THREAD - EVT_CALL(MakeLerp, 0, 2160, 60, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_CHILD_THREAD - EVT_CALL(GetDamageIntensity) - EVT_EXEC_WAIT(EVS_Player_Hit_Impl) - EVT_WAIT(40) - EVT_RETURN - EVT_END + ChildThread + Call(MakeLerp, 0, 2160, 60, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + EndChildThread + Call(GetDamageIntensity) + ExecWait(EVS_Player_Hit_Impl) + Wait(40) + Return + End }; EvtScript EVS_Player_LastSlapLeft_Impl = { - EVT_CHILD_THREAD - EVT_CALL(MakeLerp, 2160, 0, 60, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_CHILD_THREAD - EVT_CALL(GetDamageIntensity) - EVT_EXEC_WAIT(EVS_Player_Hit_Impl) - EVT_WAIT(40) - EVT_RETURN - EVT_END + ChildThread + Call(MakeLerp, 2160, 0, 60, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + EndChildThread + Call(GetDamageIntensity) + ExecWait(EVS_Player_Hit_Impl) + Wait(40) + Return + End }; // Player reaction to being hit by an attack, handling different damage sources // (in) LVar1: hurt loop animID // (in) LVar2: hurt end animID EvtScript EVS_Player_ComplexHit = { - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(GetDamageSource, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(DMG_SRC_LEECH) - EVT_WAIT(1000) - EVT_RETURN - EVT_CASE_EQ(DMG_SRC_DEFAULT) - EVT_EXEC_WAIT(EVS_Player_Hit_Impl) - EVT_CASE_OR_EQ(DMG_SRC_CRUSH) - EVT_CASE_OR_EQ(DMG_SRC_TUBBA_SMASH) - EVT_CASE_OR_EQ(DMG_SRC_CRUSH_PARTNER) - EVT_EXEC_WAIT(EVS_Player_Crushed_Impl) - EVT_END_CASE_GROUP - EVT_CASE_EQ(DMG_SRC_NEXT_SLAP_RIGHT) - EVT_EXEC_WAIT(EVS_Player_NextSlapRight_Impl) - EVT_CASE_EQ(DMG_SRC_NEXT_SLAP_LEFT) - EVT_EXEC_WAIT(EVS_Player_NextSlapLeft_Impl) - EVT_CASE_EQ(DMG_SRC_LAST_SLAP_RIGHT) - EVT_EXEC_WAIT(EVS_Player_LastSlapRight_Impl) - EVT_CASE_EQ(DMG_SRC_LAST_SLAP_LEFT) - EVT_EXEC_WAIT(EVS_Player_LastSlapLeft_Impl) - EVT_CASE_EQ(DMG_SRC_INK_BLAST) - EVT_SET(LVar1, ANIM_MarioB3_BurnHurt) - EVT_SET(LVar2, ANIM_Mario1_Burnt) - EVT_EXEC_WAIT(EVS_Player_Hit_Impl) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, LVar2) - EVT_WAIT(15) - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(EVS_Player_Hit_Impl) - EVT_END_SWITCH - EVT_IF_NE(LVar2, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, LVar2) - EVT_WAIT(8) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(GetDamageSource, LVar0) + Switch(LVar0) + CaseEq(DMG_SRC_LEECH) + Wait(1000) + Return + CaseEq(DMG_SRC_DEFAULT) + ExecWait(EVS_Player_Hit_Impl) + CaseOrEq(DMG_SRC_CRUSH) + CaseOrEq(DMG_SRC_TUBBA_SMASH) + CaseOrEq(DMG_SRC_CRUSH_PARTNER) + ExecWait(EVS_Player_Crushed_Impl) + EndCaseGroup + CaseEq(DMG_SRC_NEXT_SLAP_RIGHT) + ExecWait(EVS_Player_NextSlapRight_Impl) + CaseEq(DMG_SRC_NEXT_SLAP_LEFT) + ExecWait(EVS_Player_NextSlapLeft_Impl) + CaseEq(DMG_SRC_LAST_SLAP_RIGHT) + ExecWait(EVS_Player_LastSlapRight_Impl) + CaseEq(DMG_SRC_LAST_SLAP_LEFT) + ExecWait(EVS_Player_LastSlapLeft_Impl) + CaseEq(DMG_SRC_INK_BLAST) + Set(LVar1, ANIM_MarioB3_BurnHurt) + Set(LVar2, ANIM_Mario1_Burnt) + ExecWait(EVS_Player_Hit_Impl) + Call(SetAnimation, ACTOR_PLAYER, 0, LVar2) + Wait(15) + CaseDefault + ExecWait(EVS_Player_Hit_Impl) + EndSwitch + IfNe(LVar2, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, LVar2) + Wait(8) + EndIf + Return + End }; // Player reaction to being hit which ignores damage source // (in) LVar1: hurt loop animID // (in) LVar2: hurt end animID EvtScript EVS_Player_SimpleHit = { - EVT_EXEC_WAIT(EVS_Player_Hit_Impl) - EVT_IF_NE(LVar2, 0) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, LVar2) - EVT_WAIT(8) - EVT_END_IF - EVT_RETURN - EVT_END + ExecWait(EVS_Player_Hit_Impl) + IfNe(LVar2, 0) + Call(SetAnimation, ACTOR_PLAYER, 0, LVar2) + Wait(8) + EndIf + Return + End }; // Player reaction to being hit by an attack dealing no damage // (in) LVar0: part idx // (in) LVar1: hurt loop animID EvtScript EVS_Player_NoDamageHit = { - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0) - EVT_IF_NOT_FLAG(LVar0, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, LVar1) - EVT_END_IF - EVT_CALL(SetActorDispOffset, ACTOR_SELF, -2, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, -4, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, -2, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, -3, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, -2, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, -1, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_CALL(GetDamageSource, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(DMG_SRC_TUTORIAL_GOOMBARIO) - EVT_WAIT(15) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(GetStatusFlags, ACTOR_PLAYER, LVar0) + IfNotFlag(LVar0, STATUS_FLAGS_IMMOBILIZED) + Call(SetAnimation, ACTOR_PLAYER, 0, LVar1) + EndIf + Call(SetActorDispOffset, ACTOR_SELF, -2, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, -4, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, -2, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, -3, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, -2, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, -1, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + Call(GetDamageSource, LVar0) + Switch(LVar0) + CaseEq(DMG_SRC_TUTORIAL_GOOMBARIO) + Wait(15) + EndSwitch + Return + End }; EvtScript EVS_ForceNextTarget = { - EVT_CALL(GetOwnerID, LVarA) - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_IF_NE(LVar0, LVarA) - EVT_CALL(GetOriginalActorType, LVar0, LVar2) - EVT_IF_NE(LVar2, ACTOR_TYPE_DRY_BONES) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(1) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_IF_NE(LVar0, LVarA) - EVT_CALL(GetActorVar, LVar0, 8, LVar3) - EVT_IF_NE(LVar3, 1) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(2) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(SetActorFlagBits, LVar0, ACTOR_FLAG_NO_ATTACK | ACTOR_FLAG_NO_DMG_APPLY, TRUE) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_NE(LVar0, ITER_NO_MORE) - EVT_GOTO(2) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetOwnerID, LVarA) + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerTarget, LVar0, LVar1) + IfNe(LVar0, LVarA) + Call(GetOriginalActorType, LVar0, LVar2) + IfNe(LVar2, ACTOR_TYPE_DRY_BONES) + Return + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(0) + EndIf + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(1) + Call(GetOwnerTarget, LVar0, LVar1) + IfNe(LVar0, LVarA) + Call(GetActorVar, LVar0, 8, LVar3) + IfNe(LVar3, 1) + Return + EndIf + EndIf + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(1) + EndIf + Call(CreateHomeTargetList, TARGET_FLAG_2 | TARGET_FLAG_PRIMARY_ONLY) + Call(InitTargetIterator) + Label(2) + Call(GetOwnerTarget, LVar0, LVar1) + Call(SetActorFlagBits, LVar0, ACTOR_FLAG_NO_ATTACK | ACTOR_FLAG_NO_DMG_APPLY, TRUE) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfNe(LVar0, ITER_NO_MORE) + Goto(2) + EndIf + Return + End }; EvtScript EVS_Enemy_FanSmack_Impl = { - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FAN_SMACK_HIT) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorSize, ACTOR_SELF, LVar3, LVar4) - EVT_DIVF(LVar3, EVT_FLOAT(40.0)) - EVT_IF_LT(LVar3, 1) - EVT_SETF(LVar3, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_MULF(LVar3, EVT_FLOAT(0.4)) - EVT_END_IF - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar6) - EVT_IF_FLAG(LVar6, ACTOR_FLAG_UPSIDE_DOWN) - EVT_CALL(GetActorSize, ACTOR_SELF, LVar7, LVar8) - EVT_SUB(LVar1, LVar7) - EVT_END_IF - EVT_SUB(LVar1, 3) - EVT_PLAY_EFFECT(EFFECT_WHIRLWIND, 0, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(GetDamageSource, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_FAN_SMACK_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_FAN_SMACK_RIGHT) - EVT_WAIT(10) - EVT_CALL(RemoveEffect, LVarF) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_RIGHT) - EVT_WAIT(40) - EVT_CALL(DismissEffect, LVarF) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_FAN_SMACK_END) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FAN_SMACK_HIT) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorSize, ACTOR_SELF, LVar3, LVar4) + DivF(LVar3, Float(40.0)) + IfLt(LVar3, 1) + SetF(LVar3, Float(1.0)) + EndIf + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfFlag(LVar5, STATUS_FLAG_SHRINK) + MulF(LVar3, Float(0.4)) + EndIf + Call(GetActorFlags, ACTOR_SELF, LVar6) + IfFlag(LVar6, ACTOR_FLAG_UPSIDE_DOWN) + Call(GetActorSize, ACTOR_SELF, LVar7, LVar8) + Sub(LVar1, LVar7) + EndIf + Sub(LVar1, 3) + PlayEffect(EFFECT_WHIRLWIND, 0, LVar0, LVar1, LVar2, LVar3) + Call(GetDamageSource, LVar0) + Switch(LVar0) + CaseOrEq(DMG_SRC_NEXT_FAN_SMACK_LEFT) + CaseOrEq(DMG_SRC_NEXT_FAN_SMACK_RIGHT) + Wait(10) + Call(RemoveEffect, LVarF) + EndCaseGroup + CaseOrEq(DMG_SRC_LAST_FAN_SMACK_LEFT) + CaseOrEq(DMG_SRC_LAST_FAN_SMACK_RIGHT) + Wait(40) + Call(DismissEffect, LVarF) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_FAN_SMACK_END) + EndCaseGroup + EndSwitch + Return + End }; EvtScript EVS_Enemy_Hit = { - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(GetDamageSource, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(DMG_SRC_POWER_SHELL) - EVT_CALL(GetOriginalActorType, ACTOR_SELF, LVar5) - EVT_SWITCH(LVar5) - EVT_CASE_OR_EQ(ACTOR_TYPE_MONTY_MOLE) - EVT_CASE_OR_EQ(ACTOR_TYPE_MONTY_MOLE_BOSS) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.01)) - EVT_ADD(LVar1, 55) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) - EVT_END_SWITCH - EVT_SET(LVar5, 0) - EVT_LOOP(30) - EVT_ADD(LVar5, 48) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar5) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetOriginalActorType, ACTOR_SELF, LVar7) - EVT_SWITCH(LVar7) - EVT_CASE_OR_EQ(ACTOR_TYPE_MONTY_MOLE) - EVT_CASE_OR_EQ(ACTOR_TYPE_MONTY_MOLE_BOSS) - EVT_WAIT(30) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SUB(LVar1, 55) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_ELSE - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, FALSE, FALSE) - EVT_END_IF - EVT_END_SWITCH - EVT_CASE_OR_EQ(DMG_SRC_NEXT_SLAP_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_FAN_SMACK_LEFT) - EVT_IF_EQ(LVar2, DMG_SRC_NEXT_FAN_SMACK_LEFT) - EVT_EXEC(EVS_Enemy_FanSmack_Impl) - EVT_END_IF - EVT_CHILD_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 36) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(GetDamageIntensity) - EVT_EXEC_WAIT(EVS_Enemy_Hit_Impl) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(DMG_SRC_LAST_SLAP_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_LEFT) - EVT_IF_EQ(LVar2, DMG_SRC_LAST_FAN_SMACK_LEFT) - EVT_EXEC(EVS_Enemy_FanSmack_Impl) - EVT_END_IF - EVT_CHILD_THREAD - EVT_CALL(MakeLerp, 0, 0x00000870, 60, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_END_CHILD_THREAD - EVT_CALL(GetDamageIntensity) - EVT_EXEC_WAIT(EVS_Enemy_Hit_Impl) - EVT_WAIT(60) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(DMG_SRC_NEXT_SLAP_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_FAN_SMACK_RIGHT) - EVT_IF_EQ(LVar2, DMG_SRC_NEXT_FAN_SMACK_RIGHT) - EVT_EXEC(EVS_Enemy_FanSmack_Impl) - EVT_END_IF - EVT_CHILD_THREAD - EVT_SET(LVar0, 360) - EVT_LOOP(10) - EVT_SUB(LVar0, 36) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(GetDamageIntensity) - EVT_EXEC_WAIT(EVS_Enemy_Hit_Impl) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(DMG_SRC_LAST_SLAP_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_RIGHT) - EVT_IF_EQ(LVar2, DMG_SRC_LAST_FAN_SMACK_RIGHT) - EVT_EXEC(EVS_Enemy_FanSmack_Impl) - EVT_END_IF - EVT_CHILD_THREAD - EVT_CALL(MakeLerp, 0x00000870, 0, 60, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_CHILD_THREAD - EVT_CALL(GetDamageIntensity) - EVT_EXEC_WAIT(EVS_Enemy_Hit_Impl) - EVT_WAIT(60) - EVT_END_CASE_GROUP - EVT_CASE_EQ(DMG_SRC_SPOOK) - EVT_SET(LVar0, DAMAGE_INTENSITY_EXTREME) - EVT_EXEC_WAIT(EVS_Enemy_Hit_Impl) - EVT_CASE_EQ(DMG_SRC_SPIN_SMASH) - EVT_EXEC_GET_TID(EVS_Enemy_SpinAround_Impl, LVarE) - EVT_CALL(GetDamageIntensity) - EVT_EXEC_WAIT(EVS_Enemy_Hit_Impl) - EVT_LABEL(2) - EVT_CALL(GetActorRotation, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_MOD(LVar1, 360) - EVT_IF_NE(LVar1, 0) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_KILL_THREAD(LVarE) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_CASE_DEFAULT - EVT_CALL(GetDamageIntensity) - EVT_EXEC_WAIT(EVS_Enemy_Hit_Impl) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(GetDamageSource, LVar2) + Switch(LVar2) + CaseEq(DMG_SRC_POWER_SHELL) + Call(GetOriginalActorType, ACTOR_SELF, LVar5) + Switch(LVar5) + CaseOrEq(ACTOR_TYPE_MONTY_MOLE) + CaseOrEq(ACTOR_TYPE_MONTY_MOLE_BOSS) + EndCaseGroup + CaseDefault + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.01)) + Add(LVar1, 55) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) + EndSwitch + Set(LVar5, 0) + Loop(30) + Add(LVar5, 48) + Call(SetActorYaw, ACTOR_SELF, LVar5) + Wait(1) + EndLoop + Call(GetOriginalActorType, ACTOR_SELF, LVar7) + Switch(LVar7) + CaseOrEq(ACTOR_TYPE_MONTY_MOLE) + CaseOrEq(ACTOR_TYPE_MONTY_MOLE_BOSS) + Wait(30) + EndCaseGroup + CaseDefault + Sub(LVar1, 55) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + IfEq(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Else + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, FALSE, FALSE) + EndIf + EndSwitch + CaseOrEq(DMG_SRC_NEXT_SLAP_LEFT) + CaseOrEq(DMG_SRC_NEXT_FAN_SMACK_LEFT) + IfEq(LVar2, DMG_SRC_NEXT_FAN_SMACK_LEFT) + Exec(EVS_Enemy_FanSmack_Impl) + EndIf + ChildThread + Set(LVar0, 0) + Loop(10) + Add(LVar0, 36) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + EndChildThread + Call(GetDamageIntensity) + ExecWait(EVS_Enemy_Hit_Impl) + EndCaseGroup + CaseOrEq(DMG_SRC_LAST_SLAP_LEFT) + CaseOrEq(DMG_SRC_LAST_FAN_SMACK_LEFT) + IfEq(LVar2, DMG_SRC_LAST_FAN_SMACK_LEFT) + Exec(EVS_Enemy_FanSmack_Impl) + EndIf + ChildThread + Call(MakeLerp, 0, 0x00000870, 60, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + EndChildThread + Call(GetDamageIntensity) + ExecWait(EVS_Enemy_Hit_Impl) + Wait(60) + EndCaseGroup + CaseOrEq(DMG_SRC_NEXT_SLAP_RIGHT) + CaseOrEq(DMG_SRC_NEXT_FAN_SMACK_RIGHT) + IfEq(LVar2, DMG_SRC_NEXT_FAN_SMACK_RIGHT) + Exec(EVS_Enemy_FanSmack_Impl) + EndIf + ChildThread + Set(LVar0, 360) + Loop(10) + Sub(LVar0, 36) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + EndLoop + EndChildThread + Call(GetDamageIntensity) + ExecWait(EVS_Enemy_Hit_Impl) + EndCaseGroup + CaseOrEq(DMG_SRC_LAST_SLAP_RIGHT) + CaseOrEq(DMG_SRC_LAST_FAN_SMACK_RIGHT) + IfEq(LVar2, DMG_SRC_LAST_FAN_SMACK_RIGHT) + Exec(EVS_Enemy_FanSmack_Impl) + EndIf + ChildThread + Call(MakeLerp, 0x00000870, 0, 60, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + EndChildThread + Call(GetDamageIntensity) + ExecWait(EVS_Enemy_Hit_Impl) + Wait(60) + EndCaseGroup + CaseEq(DMG_SRC_SPOOK) + Set(LVar0, DAMAGE_INTENSITY_EXTREME) + ExecWait(EVS_Enemy_Hit_Impl) + CaseEq(DMG_SRC_SPIN_SMASH) + ExecGetTID(EVS_Enemy_SpinAround_Impl, LVarE) + Call(GetDamageIntensity) + ExecWait(EVS_Enemy_Hit_Impl) + Label(2) + Call(GetActorRotation, ACTOR_SELF, LVar0, LVar1, LVar2) + Mod(LVar1, 360) + IfNe(LVar1, 0) + Wait(1) + Goto(2) + EndIf + KillThread(LVarE) + Call(SetActorYaw, ACTOR_SELF, 0) + CaseDefault + Call(GetDamageIntensity) + ExecWait(EVS_Enemy_Hit_Impl) + EndSwitch + Return + End }; // Enemy shakes in reaction to being hit // (in) LVar0: damage intensity EvtScript EVS_Enemy_Hit_Impl = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 8, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(4) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CASE_EQ(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 20, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 22, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(6) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CASE_EQ(2) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 6, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 22, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 12, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 25, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 12, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 17, 0) - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(6) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CASE_EQ(3) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 8, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 24, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 28, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 19, 0) - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(6) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(2) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 2, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 8, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) + Wait(1) + Loop(2) + Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Loop(4) + Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + CaseEq(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 20, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 22, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) + Wait(1) + Loop(2) + Call(SetActorDispOffset, ACTOR_SELF, 0, 7, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Loop(6) + Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + CaseEq(2) + Call(SetActorDispOffset, ACTOR_SELF, 0, 1, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 6, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 22, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 12, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 25, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 12, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 17, 0) + Wait(1) + Loop(2) + Call(SetActorDispOffset, ACTOR_SELF, 0, 10, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Loop(6) + Call(SetActorDispOffset, ACTOR_SELF, 0, 4, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + CaseEq(3) + Call(SetActorDispOffset, ACTOR_SELF, 0, 3, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 8, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 24, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 28, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 19, 0) + Wait(1) + Loop(2) + Call(SetActorDispOffset, ACTOR_SELF, 0, 14, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Loop(6) + Call(SetActorDispOffset, ACTOR_SELF, 0, 5, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Loop(2) + Call(SetActorDispOffset, ACTOR_SELF, 0, 2, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + EndLoop + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + EndSwitch + Return + End }; EvtScript EVS_Enemy_BurnHit = { - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar3) - EVT_IF_EQ(LVar3, EVENT_BURN_DEATH) - EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(GetDamageSource, LVar3) - EVT_SWITCH(LVar3) - EVT_CASE_EQ(DMG_SRC_FIRE_SHELL) - EVT_CALL(GetOriginalActorType, ACTOR_SELF, LVar7) - EVT_SWITCH(LVar7) - EVT_CASE_OR_EQ(ACTOR_TYPE_MONTY_MOLE) - EVT_CASE_OR_EQ(ACTOR_TYPE_MONTY_MOLE_BOSS) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.01)) - EVT_ADD(LVar5, 55) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, FALSE, FALSE) - EVT_END_SWITCH - EVT_SET(LVar7, 0) - EVT_LOOP(30) - EVT_ADD(LVar7, 48) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar7) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetOriginalActorType, ACTOR_SELF, LVar7) - EVT_SWITCH(LVar7) - EVT_CASE_OR_EQ(ACTOR_TYPE_MONTY_MOLE) - EVT_CASE_OR_EQ(ACTOR_TYPE_MONTY_MOLE_BOSS) - EVT_WAIT(30) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SUB(LVar5, 55) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.8)) - EVT_IF_EQ(LVar5, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_ELSE - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, FALSE, FALSE) - EVT_END_IF - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_WAIT(20) - EVT_END_SWITCH - EVT_IF_NE(LVar2, -1) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar2) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar1) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(EVENT_BURN_HIT) - EVT_CALL(GetPartEventFlags, ACTOR_SELF, LVar0, LVar1) - EVT_IF_NOT_FLAG(LVar1, ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION | ACTOR_EVENT_FLAG_FIREY) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorSize, ACTOR_SELF, LVar3, LVar4) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_MULF(LVar3, EVT_FLOAT(0.4)) - EVT_MULF(LVar4, EVT_FLOAT(0.4)) - EVT_END_IF - EVT_DIVF(LVar3, EVT_FLOAT(2.0)) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar5) - EVT_IF_FLAG(LVar5, ACTOR_FLAG_UPSIDE_DOWN) - EVT_SUBF(LVar1, LVar3) - EVT_ELSE - EVT_ADDF(LVar1, LVar3) - EVT_END_IF - EVT_ADDF(LVar2, EVT_FLOAT(5.0)) - EVT_DIVF(LVar3, EVT_FLOAT(10.0)) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_MULF(LVar3, EVT_FLOAT(0.4)) - EVT_IF_LT(LVar3, 1) - EVT_SETF(LVar3, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, LVar3, 10) - EVT_END_IF - EVT_CASE_EQ(EVENT_BURN_DEATH) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetLastEvent, ACTOR_SELF, LVar3) + IfEq(LVar3, EVENT_BURN_DEATH) + Call(EnableActorGlow, ACTOR_SELF, FALSE) + EndIf + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(GetDamageSource, LVar3) + Switch(LVar3) + CaseEq(DMG_SRC_FIRE_SHELL) + Call(GetOriginalActorType, ACTOR_SELF, LVar7) + Switch(LVar7) + CaseOrEq(ACTOR_TYPE_MONTY_MOLE) + CaseOrEq(ACTOR_TYPE_MONTY_MOLE_BOSS) + EndCaseGroup + CaseDefault + Call(GetActorPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.01)) + Add(LVar5, 55) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, FALSE, FALSE) + EndSwitch + Set(LVar7, 0) + Loop(30) + Add(LVar7, 48) + Call(SetActorYaw, ACTOR_SELF, LVar7) + Wait(1) + EndLoop + Call(GetOriginalActorType, ACTOR_SELF, LVar7) + Switch(LVar7) + CaseOrEq(ACTOR_TYPE_MONTY_MOLE) + CaseOrEq(ACTOR_TYPE_MONTY_MOLE_BOSS) + Wait(30) + EndCaseGroup + CaseDefault + Sub(LVar5, 55) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.8)) + IfEq(LVar5, 0) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Else + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, FALSE, FALSE) + Call(SetGoalPos, ACTOR_SELF, LVar4, LVar5, LVar6) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, FALSE, FALSE) + EndIf + EndSwitch + CaseDefault + Wait(20) + EndSwitch + IfNe(LVar2, -1) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar2) + EndIf + Wait(10) + Call(GetLastEvent, ACTOR_SELF, LVar1) + Switch(LVar1) + CaseEq(EVENT_BURN_HIT) + Call(GetPartEventFlags, ACTOR_SELF, LVar0, LVar1) + IfNotFlag(LVar1, ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION | ACTOR_EVENT_FLAG_FIREY) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorSize, ACTOR_SELF, LVar3, LVar4) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfFlag(LVar5, STATUS_FLAG_SHRINK) + MulF(LVar3, Float(0.4)) + MulF(LVar4, Float(0.4)) + EndIf + DivF(LVar3, Float(2.0)) + Call(GetActorFlags, ACTOR_SELF, LVar5) + IfFlag(LVar5, ACTOR_FLAG_UPSIDE_DOWN) + SubF(LVar1, LVar3) + Else + AddF(LVar1, LVar3) + EndIf + AddF(LVar2, Float(5.0)) + DivF(LVar3, Float(10.0)) + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfFlag(LVar5, STATUS_FLAG_SHRINK) + MulF(LVar3, Float(0.4)) + IfLt(LVar3, 1) + SetF(LVar3, Float(1.0)) + EndIf + EndIf + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, LVar3, 10) + EndIf + CaseEq(EVENT_BURN_DEATH) + EndSwitch + Return + End }; EvtScript EVS_Enemy_ShockHit = { - EVT_CALL(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_EXEC_WAIT(EVS_Enemy_ShockHit_Impl) - EVT_RETURN - EVT_END + Call(SetActorRotationOffset, ACTOR_SELF, 0, 0, 0) + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + ExecWait(EVS_Enemy_ShockHit_Impl) + Return + End }; EvtScript EVS_Enemy_ShockHit_Impl = { - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetActorSize, ACTOR_SELF, LVar3, LVar4) - EVT_SETF(LVar5, LVar3) - EVT_DIVF(LVar5, EVT_FLOAT(20.0)) - EVT_ADDF(LVar1, LVar5) - EVT_PLAY_EFFECT(EFFECT_FLASHING_BOX_SHOCKWAVE, 0, LVar0, LVar1, LVar2, LVar4, LVar3) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_HIT_SHOCK) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(HPBarToCurrent, ACTOR_SELF) - EVT_CALL(ShowHealthBar, ACTOR_SELF) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, 1, 0) - EVT_CALL(AddEffectOffset, LVarF, 0, 1, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, 3, 0) - EVT_CALL(AddEffectOffset, LVarF, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, 12, 0) - EVT_CALL(AddEffectOffset, LVarF, 0, 12, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, -8, 0) - EVT_CALL(AddEffectOffset, LVarF, 0, -8, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, 12, 0) - EVT_CALL(AddEffectOffset, LVarF, 0, 12, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, -4, 0) - EVT_CALL(AddEffectOffset, LVarF, 0, -4, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, -4, 0) - EVT_CALL(AddEffectOffset, LVarF, 0, -4, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, -6, 0) - EVT_CALL(AddEffectOffset, LVarF, 0, -6, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, -6, 0) - EVT_CALL(AddEffectOffset, LVarF, 0, -6, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, 6, 0) - EVT_CALL(AddEffectOffset, LVarF, 0, 6, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, -6, 0) - EVT_CALL(AddEffectOffset, LVarF, 0, -6, 0) - EVT_WAIT(1) - EVT_LOOP(6) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, 2, 0) - EVT_CALL(AddEffectOffset, LVarF, 0, 2, 0) - EVT_WAIT(1) - EVT_CALL(AddActorPos, ACTOR_SELF, 0, -2, 0) - EVT_CALL(AddEffectOffset, LVarF, 0, -2, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(5) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(HPBarToHome, ACTOR_SELF) - EVT_CALL(GetLastEvent, ACTOR_SELF, LVar0) - EVT_IF_NE(LVar0, EVENT_SHOCK_DEATH) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(GetActorSize, ACTOR_SELF, LVar3, LVar4) + SetF(LVar5, LVar3) + DivF(LVar5, Float(20.0)) + AddF(LVar1, LVar5) + PlayEffect(EFFECT_FLASHING_BOX_SHOCKWAVE, 0, LVar0, LVar1, LVar2, LVar4, LVar3) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_HIT_SHOCK) + Call(HideHealthBar, ACTOR_SELF) + Call(HPBarToCurrent, ACTOR_SELF) + Call(ShowHealthBar, ACTOR_SELF) + Call(AddActorPos, ACTOR_SELF, 0, 1, 0) + Call(AddEffectOffset, LVarF, 0, 1, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 0, 3, 0) + Call(AddEffectOffset, LVarF, 0, 3, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 0, 12, 0) + Call(AddEffectOffset, LVarF, 0, 12, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 0, -8, 0) + Call(AddEffectOffset, LVarF, 0, -8, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 0, 12, 0) + Call(AddEffectOffset, LVarF, 0, 12, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 0, -4, 0) + Call(AddEffectOffset, LVarF, 0, -4, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 0, -4, 0) + Call(AddEffectOffset, LVarF, 0, -4, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 0, -6, 0) + Call(AddEffectOffset, LVarF, 0, -6, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 0, -6, 0) + Call(AddEffectOffset, LVarF, 0, -6, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 0, 6, 0) + Call(AddEffectOffset, LVarF, 0, 6, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 0, -6, 0) + Call(AddEffectOffset, LVarF, 0, -6, 0) + Wait(1) + Loop(6) + Call(AddActorPos, ACTOR_SELF, 0, 2, 0) + Call(AddEffectOffset, LVarF, 0, 2, 0) + Wait(1) + Call(AddActorPos, ACTOR_SELF, 0, -2, 0) + Call(AddEffectOffset, LVarF, 0, -2, 0) + Wait(1) + EndLoop + Wait(5) + Call(HideHealthBar, ACTOR_SELF) + Call(HPBarToHome, ACTOR_SELF) + Call(GetLastEvent, ACTOR_SELF, LVar0) + IfNe(LVar0, EVENT_SHOCK_DEATH) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + EndIf + Return + End }; // Enemy reaction to being hit by an attack dealing no damage // (in) LVar0: part idx // (in) LVar1: hurt loop animID EvtScript EVS_Enemy_NoDamageHit = { - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar2) - EVT_IF_NOT_FLAG(LVar2, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_END_IF - EVT_CALL(SetActorDispOffset, ACTOR_SELF, -2, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, -4, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, -2, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, -3, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, -2, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, -1, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(GetStatusFlags, ACTOR_SELF, LVar2) + IfNotFlag(LVar2, STATUS_FLAGS_IMMOBILIZED) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + EndIf + Call(SetActorDispOffset, ACTOR_SELF, -2, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, -4, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, -2, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, -3, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, -2, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, -1, 0, 0) + Wait(1) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Wait(1) + Return + End }; EvtScript EVS_Enemy_Death = { - EVT_EXEC_WAIT(EVS_Enemy_DeathWithoutRemove) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_EXEC_WAIT(EVS_ForceNextTarget) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + ExecWait(EVS_Enemy_DeathWithoutRemove) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + ExecWait(EVS_ForceNextTarget) + Call(RemoveActor, ACTOR_SELF) + Return + End }; // in LVar2: if set to EXEC_DEATH_NO_SPINNING, the actor will not spin around EvtScript EVS_Enemy_DeathWithoutRemove = { - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE) - EVT_IF_NE(LVar1, -1) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_WAIT(10) - EVT_END_IF - EVT_CALL(GetDamageSource, LVar5) - EVT_SWITCH(LVar5) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_SLAP_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_FAN_SMACK_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_SLAP_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_LEFT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_SLAP_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_NEXT_FAN_SMACK_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_SLAP_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_LAST_FAN_SMACK_RIGHT) - EVT_CASE_OR_EQ(DMG_SRC_SPIN_SMASH) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SET(LFlag0, FALSE) - EVT_CALL(GetOriginalActorType, ACTOR_SELF, LVar1) - EVT_SWITCH(LVar1) - EVT_CASE_OR_EQ(ACTOR_TYPE_BOB_OMB) - EVT_CASE_OR_EQ(ACTOR_TYPE_BULLET_BILL) - EVT_CASE_OR_EQ(ACTOR_TYPE_BOMBSHELL_BILL) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_IF_NE(LVar2, EXEC_DEATH_NO_SPINNING) // special signal value - EVT_SET(LVar2, 0) - EVT_LOOP(24) - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar2) - EVT_ADD(LVar2, 30) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_ADD(LVar2, 10) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_DEATH) - EVT_CALL(DropStarPoints, ACTOR_SELF) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_SET(LVar3, 0) - EVT_LOOP(12) - EVT_CALL(SetActorRotation, ACTOR_SELF, LVar3, 0, 0) - EVT_ADD(LVar3, 8) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(HideHealthBar, ACTOR_SELF) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(EnableActorGlow, ACTOR_SELF, FALSE) + IfNe(LVar1, -1) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Wait(10) + EndIf + Call(GetDamageSource, LVar5) + Switch(LVar5) + CaseOrEq(DMG_SRC_NEXT_SLAP_LEFT) + CaseOrEq(DMG_SRC_NEXT_FAN_SMACK_LEFT) + CaseOrEq(DMG_SRC_LAST_SLAP_LEFT) + CaseOrEq(DMG_SRC_LAST_FAN_SMACK_LEFT) + CaseOrEq(DMG_SRC_NEXT_SLAP_RIGHT) + CaseOrEq(DMG_SRC_NEXT_FAN_SMACK_RIGHT) + CaseOrEq(DMG_SRC_LAST_SLAP_RIGHT) + CaseOrEq(DMG_SRC_LAST_FAN_SMACK_RIGHT) + CaseOrEq(DMG_SRC_SPIN_SMASH) + EndCaseGroup + CaseDefault + Set(LFlag0, FALSE) + Call(GetOriginalActorType, ACTOR_SELF, LVar1) + Switch(LVar1) + CaseOrEq(ACTOR_TYPE_BOB_OMB) + CaseOrEq(ACTOR_TYPE_BULLET_BILL) + CaseOrEq(ACTOR_TYPE_BOMBSHELL_BILL) + EndCaseGroup + CaseDefault + EndSwitch + IfNe(LVar2, EXEC_DEATH_NO_SPINNING) // special signal value + Set(LVar2, 0) + Loop(24) + Call(SetActorYaw, ACTOR_SELF, LVar2) + Add(LVar2, 30) + Wait(1) + EndLoop + Call(SetActorYaw, ACTOR_SELF, 0) + EndIf + EndSwitch + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 10) + Add(LVar2, 10) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2) + Call(PlaySoundAtActor, ACTOR_SELF, SOUND_ACTOR_DEATH) + Call(DropStarPoints, ACTOR_SELF) + Call(SetActorYaw, ACTOR_SELF, 0) + Set(LVar3, 0) + Loop(12) + Call(SetActorRotation, ACTOR_SELF, LVar3, 0, 0) + Add(LVar3, 8) + Wait(1) + EndLoop + Return + End }; EvtScript EVS_Enemy_ScareAway = { - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar2) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar9) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.05)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_SET(LVarD, LVarB) - EVT_ADD(LVarD, 20) - EVT_IF_NOT_FLAG(LVar9, ACTOR_FLAG_FLYING) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarD, LVarC) - EVT_CALL(JumpToGoal, ACTOR_SELF, 3, FALSE, FALSE, FALSE) - EVT_WAIT(20) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE) - EVT_CALL(FallToGoal, ACTOR_SELF, 7) - EVT_ELSE - EVT_WAIT(15) - EVT_CALL(EnableActorGlow, ACTOR_SELF, FALSE) - EVT_END_IF - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_WAIT(17) - EVT_CALL(SetActorYaw, ACTOR_SELF, 180) - EVT_WAIT(3) - EVT_CALL(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0)) - EVT_ADD(LVarA, 300) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_EXEC_WAIT(EVS_ForceNextTarget) - EVT_CALL(HideHealthBar, ACTOR_SELF) - EVT_CALL(UseIdleAnimation, ACTOR_SELF, FALSE) - EVT_CALL(RemoveActor, ACTOR_SELF) - EVT_RETURN - EVT_END + Call(HideHealthBar, ACTOR_SELF) + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar2) + Call(GetActorFlags, ACTOR_SELF, LVar9) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.05)) + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Set(LVarD, LVarB) + Add(LVarD, 20) + IfNotFlag(LVar9, ACTOR_FLAG_FLYING) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarD, LVarC) + Call(JumpToGoal, ACTOR_SELF, 3, FALSE, FALSE, FALSE) + Wait(20) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(EnableActorGlow, ACTOR_SELF, FALSE) + Call(FallToGoal, ACTOR_SELF, 7) + Else + Wait(15) + Call(EnableActorGlow, ACTOR_SELF, FALSE) + EndIf + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Wait(17) + Call(SetActorYaw, ACTOR_SELF, 180) + Wait(3) + Call(EnableActorBlur, ACTOR_SELF, ACTOR_BLUR_ENABLE) + Call(SetActorSpeed, ACTOR_SELF, Float(10.0)) + Add(LVarA, 300) + Call(SetGoalPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + ExecWait(EVS_ForceNextTarget) + Call(HideHealthBar, ACTOR_SELF) + Call(UseIdleAnimation, ACTOR_SELF, FALSE) + Call(RemoveActor, ACTOR_SELF) + Return + End }; EvtScript EVS_Enemy_SpinSmash_HitNext = { - EVT_CALL(CreateCurrentPosTargetList, TARGET_FLAG_GROUND | TARGET_FLAG_ALLOW_TARGET_ONLY) - EVT_CALL(InitTargetIterator) - EVT_LABEL(0) - EVT_CALL(GetOwnerID, LVar1) - EVT_CALL(GetOwnerTarget, LVar0, LVar9) - EVT_IF_NE(LVar1, LVar0) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_GOTO(0) - EVT_END_IF - EVT_LABEL(1) - EVT_CALL(ChooseNextTarget, ITER_NEXT, LVar0) - EVT_IF_EQ(LVar0, ITER_NO_MORE) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GetOwnerTarget, LVar0, LVar9) - EVT_CALL(GetActorFlags, LVar0, LVar1) - EVT_IF_FLAG(LVar1, ACTOR_FLAG_TARGET_ONLY) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetStatusFlags, LVar0, LVar9) - EVT_IF_FLAG(LVar9, STATUS_FLAG_TRANSPARENT) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.1)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(7.0)) - EVT_CALL(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) - EVT_CHILD_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 2, EVT_FLOAT(1.0)) - EVT_END_CHILD_THREAD - EVT_CALL(SetGoalToTarget, ACTOR_SELF) - EVT_CALL(GetOwnerTarget, LVar0, LVar1) - EVT_CALL(GetOriginalActorType, LVar0, LVar1) - EVT_SWITCH(LVar1) - EVT_CASE_OR_EQ(ACTOR_TYPE_POKEY) - EVT_CASE_OR_EQ(ACTOR_TYPE_POKEY_MUMMY) - EVT_CASE_OR_EQ(ACTOR_TYPE_UNUSED_69) - EVT_CALL(DispatchDamageEvent, LVar0, 1, EVENT_SPIN_SMASH_LAUNCH_HIT) - EVT_GOTO(1) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, 1, BS_FLAGS1_TRIGGER_EVENTS) - EVT_GOTO(1) + Call(CreateCurrentPosTargetList, TARGET_FLAG_GROUND | TARGET_FLAG_ALLOW_TARGET_ONLY) + Call(InitTargetIterator) + Label(0) + Call(GetOwnerID, LVar1) + Call(GetOwnerTarget, LVar0, LVar9) + IfNe(LVar1, LVar0) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + Goto(0) + EndIf + Label(1) + Call(ChooseNextTarget, ITER_NEXT, LVar0) + IfEq(LVar0, ITER_NO_MORE) + Goto(10) + EndIf + Call(GetOwnerTarget, LVar0, LVar9) + Call(GetActorFlags, LVar0, LVar1) + IfFlag(LVar1, ACTOR_FLAG_TARGET_ONLY) + Goto(1) + EndIf + Call(GetStatusFlags, LVar0, LVar9) + IfFlag(LVar9, STATUS_FLAG_TRANSPARENT) + Goto(1) + EndIf + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetGoalPos, ACTOR_SELF, LVar0, 0, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.1)) + Call(SetActorSpeed, ACTOR_SELF, Float(7.0)) + Call(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) + ChildThread + Call(ShakeCam, CAM_BATTLE, 0, 2, Float(1.0)) + EndChildThread + Call(SetGoalToTarget, ACTOR_SELF) + Call(GetOwnerTarget, LVar0, LVar1) + Call(GetOriginalActorType, LVar0, LVar1) + Switch(LVar1) + CaseOrEq(ACTOR_TYPE_POKEY) + CaseOrEq(ACTOR_TYPE_POKEY_MUMMY) + CaseOrEq(ACTOR_TYPE_UNUSED_69) + Call(DispatchDamageEvent, LVar0, 1, EVENT_SPIN_SMASH_LAUNCH_HIT) + Goto(1) + EndCaseGroup + EndSwitch + Call(EnemyDamageTarget, ACTOR_SELF, LVar0, DAMAGE_TYPE_IGNORE_DEFENSE | DAMAGE_TYPE_MULTIPLE_POPUPS, SUPPRESS_EVENT_ALL, 0, 1, BS_FLAGS1_TRIGGER_EVENTS) + Goto(1) // done - EVT_LABEL(10) - EVT_CHILD_THREAD - EVT_WAIT(20) - EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_04) - EVT_END_CHILD_THREAD - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.1)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(6.0)) - EVT_CALL(SetGoalPos, ACTOR_SELF, 296, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) - EVT_RETURN - EVT_END + Label(10) + ChildThread + Wait(20) + Call(UseBattleCamPreset, BTL_CAM_PRESET_04) + EndChildThread + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.1)) + Call(SetActorSpeed, ACTOR_SELF, Float(6.0)) + Call(SetGoalPos, ACTOR_SELF, 296, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) + Return + End }; EvtScript EVS_Enemy_SpinAround_Impl = { - EVT_SET(LVar0, 0) - EVT_LABEL(0) - EVT_SUB(LVar0, 30) - EVT_IF_LT(LVar0, 0) - EVT_ADD(LVar0, 360) - EVT_END_IF - EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVar0, 0) + Label(0) + Sub(LVar0, 30) + IfLt(LVar0, 0) + Add(LVar0, 360) + EndIf + Call(SetActorYaw, ACTOR_SELF, LVar0) + Wait(1) + Goto(0) + Return + End }; EvtScript EVS_Enemy_SpinSmash_ShakeCam = { - EVT_CALL(GetActorSize, ACTOR_SELF, LVar0, LVar1) - EVT_MUL(LVar0, LVar1) - EVT_SWITCH(LVar0) - EVT_CASE_LT(1000) - EVT_CHILD_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 3, EVT_FLOAT(0.3)) - EVT_END_CHILD_THREAD - EVT_CASE_LT(2000) - EVT_CHILD_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 3, EVT_FLOAT(0.6)) - EVT_END_CHILD_THREAD - EVT_CASE_DEFAULT - EVT_CHILD_THREAD - EVT_CALL(ShakeCam, CAM_BATTLE, 0, 3, EVT_FLOAT(0.9)) - EVT_END_CHILD_THREAD - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetActorSize, ACTOR_SELF, LVar0, LVar1) + Mul(LVar0, LVar1) + Switch(LVar0) + CaseLt(1000) + ChildThread + Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.3)) + EndChildThread + CaseLt(2000) + ChildThread + Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.6)) + EndChildThread + CaseDefault + ChildThread + Call(ShakeCam, CAM_BATTLE, 0, 3, Float(0.9)) + EndChildThread + EndSwitch + Return + End }; EvtScript EVS_Enemy_SpinSmashHit = { - EVT_EXEC_GET_TID(EVS_Enemy_SpinAround_Impl, LVarE) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(GetPartEventFlags, ACTOR_SELF, LVar0, LVarA) - EVT_EXEC_WAIT(EVS_Enemy_SpinSmash_HitNext) - EVT_CALL(SetActorPos, ACTOR_SELF, -200, 30, 0) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(0.4)) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(10.0)) - EVT_CALL(AddGoalPos, ACTOR_SELF, -30, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) - EVT_EXEC(EVS_Enemy_SpinSmash_ShakeCam) - EVT_CALL(AddGoalPos, ACTOR_SELF, 20, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) - EVT_EXEC(EVS_Enemy_SpinSmash_ShakeCam) - EVT_CALL(AddGoalPos, ACTOR_SELF, 10, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) - EVT_EXEC(EVS_Enemy_SpinSmash_ShakeCam) - EVT_WAIT(15) - EVT_LABEL(0) - EVT_CALL(GetActorRotation, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_MOD(LVar1, 360) - EVT_IF_NE(LVar1, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_KILL_THREAD(LVarE) - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_RETURN - EVT_END + ExecGetTID(EVS_Enemy_SpinAround_Impl, LVarE) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(GetPartEventFlags, ACTOR_SELF, LVar0, LVarA) + ExecWait(EVS_Enemy_SpinSmash_HitNext) + Call(SetActorPos, ACTOR_SELF, -200, 30, 0) + Call(SetGoalToHome, ACTOR_SELF) + Call(SetActorJumpGravity, ACTOR_SELF, Float(0.4)) + Call(SetActorSpeed, ACTOR_SELF, Float(10.0)) + Call(AddGoalPos, ACTOR_SELF, -30, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) + Exec(EVS_Enemy_SpinSmash_ShakeCam) + Call(AddGoalPos, ACTOR_SELF, 20, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 10, FALSE, TRUE, FALSE) + Exec(EVS_Enemy_SpinSmash_ShakeCam) + Call(AddGoalPos, ACTOR_SELF, 10, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 6, FALSE, TRUE, FALSE) + Exec(EVS_Enemy_SpinSmash_ShakeCam) + Wait(15) + Label(0) + Call(GetActorRotation, ACTOR_SELF, LVar0, LVar1, LVar2) + Mod(LVar1, 360) + IfNe(LVar1, 0) + Wait(1) + Goto(0) + EndIf + KillThread(LVarE) + Call(SetActorYaw, ACTOR_SELF, 0) + Return + End }; EvtScript EVS_Enemy_FlipBackUp = { - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_CALL(SetAnimation, ACTOR_SELF, LVarA, LVarB) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LOOP(5) - EVT_ADD(LVar0, 30) - EVT_ADD(LVar1, 4) - EVT_ADD(LVar2, -2) - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, LVar2, LVar1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetActorRotation, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) - EVT_CALL(SetAnimation, ACTOR_SELF, LVarA, LVarC) - EVT_SET(LVar2, -10) - EVT_LOOP(5) - EVT_ADD(LVar2, 2) - EVT_CALL(SetActorDispOffset, ACTOR_SELF, LVar2, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Set(LVarB, LVar1) + Set(LVarC, LVar2) + Call(SetAnimation, ACTOR_SELF, LVarA, LVarB) + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Loop(5) + Add(LVar0, 30) + Add(LVar1, 4) + Add(LVar2, -2) + Call(SetActorRotation, ACTOR_SELF, 0, 0, LVar0) + Call(SetActorDispOffset, ACTOR_SELF, LVar2, LVar1, 0) + Wait(1) + EndLoop + Call(SetActorRotation, ACTOR_SELF, 0, 0, 0) + Call(SetActorDispOffset, ACTOR_SELF, 0, 0, 0) + Call(SetAnimation, ACTOR_SELF, LVarA, LVarC) + Set(LVar2, -10) + Loop(5) + Add(LVar2, 2) + Call(SetActorDispOffset, ACTOR_SELF, LVar2, 0, 0) + Wait(1) + EndLoop + Return + End }; EvtScript EVS_Enemy_Knockback = { - EVT_CALL(UseBattleCamPreset, BTL_CAM_DEFAULT) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.4)) - EVT_CALL(AddGoalPos, ACTOR_SELF, 30, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_CALL(AddGoalPos, ACTOR_SELF, 15, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) - EVT_CALL(AddGoalPos, ACTOR_SELF, 5, 0, 0) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_RETURN - EVT_END + Call(UseBattleCamPreset, BTL_CAM_DEFAULT) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.4)) + Call(AddGoalPos, ACTOR_SELF, 30, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + Call(AddGoalPos, ACTOR_SELF, 15, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 8, FALSE, TRUE, FALSE) + Call(AddGoalPos, ACTOR_SELF, 5, 0, 0) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Return + End }; EvtScript EVS_Enemy_ReturnHome = { - EVT_CALL(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVarD, LVarE, LVarF) - EVT_CALL(GetDist2D, LVar9, LVarA, LVarC, LVarD, LVarF) - EVT_IF_GE(LVar9, EVT_FLOAT(8.0)) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(RunToGoal, ACTOR_SELF, 0, FALSE) - EVT_END_IF - EVT_CALL(SetActorYaw, ACTOR_SELF, 0) - EVT_RETURN - EVT_END + Call(GetActorPos, ACTOR_SELF, LVarA, LVarB, LVarC) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVarD, LVarE, LVarF) + Call(GetDist2D, LVar9, LVarA, LVarC, LVarD, LVarF) + IfGe(LVar9, Float(8.0)) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(RunToGoal, ACTOR_SELF, 0, FALSE) + EndIf + Call(SetActorYaw, ACTOR_SELF, 0) + Return + End }; EvtScript EVS_Enemy_Recover = { - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(1.8)) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar7, LVar8, LVar9) - EVT_CALL(GetActorFlags, ACTOR_SELF, LVar0) - EVT_IF_FLAG(LVar0, ACTOR_FLAG_FLYING) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) - EVT_ELSE - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9) - EVT_CALL(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(SetActorJumpGravity, ACTOR_SELF, Float(1.8)) + Call(GetActorPos, ACTOR_SELF, LVar7, LVar8, LVar9) + Call(GetActorFlags, ACTOR_SELF, LVar0) + IfFlag(LVar0, ACTOR_FLAG_FLYING) + Call(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, FALSE, FALSE) + Else + Call(SetGoalPos, ACTOR_SELF, LVar7, LVar8, LVar9) + Call(JumpToGoal, ACTOR_SELF, 15, FALSE, TRUE, FALSE) + EndIf + Return + End }; // (in) LVar0: part idx // (in) LVar1: hopping animID EvtScript EVS_Enemy_HopHome = { - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(SetGoalToHome, ACTOR_SELF) - EVT_CALL(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetActorSpeed, ACTOR_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetActorJumpGravity, ACTOR_SELF, EVT_FLOAT(2.0)) - EVT_EXEC_WAIT(EVS_Enemy_HopToPos) - EVT_RETURN - EVT_END + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(SetGoalToHome, ACTOR_SELF) + Call(GetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(SetActorSpeed, ACTOR_SELF, Float(8.0)) + Call(SetActorJumpGravity, ACTOR_SELF, Float(2.0)) + ExecWait(EVS_Enemy_HopToPos) + Return + End }; // (in) LVar0: target posX // (in) LVar1: target posY // (in) LVar2: target posZ EvtScript EVS_Enemy_HopToPos = { - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_LABEL(0) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_IF_EQ(LVar3, LVar0) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_LT(LVar3, LVar0) - EVT_SET(LVar4, LVar0) - EVT_SUB(LVar4, LVar3) - EVT_IF_LT(LVar4, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_ELSE - EVT_SET(LVar4, LVar3) - EVT_ADD(LVar3, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar3, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) - EVT_END_IF - EVT_ELSE - EVT_SET(LVar4, LVar3) - EVT_SUB(LVar4, LVar0) - EVT_IF_LT(LVar4, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) - EVT_ELSE - EVT_SUB(LVar3, 30) - EVT_CALL(SetGoalPos, ACTOR_SELF, LVar3, LVar1, LVar2) - EVT_CALL(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) - EVT_END_IF - EVT_END_IF - EVT_GOTO(0) - EVT_LABEL(10) - EVT_RETURN - EVT_END + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Label(0) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + IfEq(LVar3, LVar0) + Goto(10) + EndIf + IfLt(LVar3, LVar0) + Set(LVar4, LVar0) + Sub(LVar4, LVar3) + IfLt(LVar4, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Else + Set(LVar4, LVar3) + Add(LVar3, 30) + Call(SetGoalPos, ACTOR_SELF, LVar3, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) + EndIf + Else + Set(LVar4, LVar3) + Sub(LVar4, LVar0) + IfLt(LVar4, 30) + Call(SetGoalPos, ACTOR_SELF, LVar0, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 5, FALSE, TRUE, FALSE) + Else + Sub(LVar3, 30) + Call(SetGoalPos, ACTOR_SELF, LVar3, LVar1, LVar2) + Call(JumpToGoal, ACTOR_SELF, 0, FALSE, TRUE, FALSE) + EndIf + EndIf + Goto(0) + Label(10) + Return + End }; EvtScript EVS_Enemy_AirLift = { - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar2) - EVT_IF_NOT_FLAG(LVar2, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_CALL(SetAnimationRate, ACTOR_SELF, LVar0, EVT_FLOAT(2.0)) - EVT_LOOP(10) - EVT_CALL(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) - EVT_CALL(GetActorSize, ACTOR_SELF, LVar6, LVar7) - EVT_ADD(LVar4, LVar6) - EVT_PLAY_EFFECT(EFFECT_SWEAT, 0, LVar3, LVar4, LVar5, 5, -45, 20) - EVT_WAIT(10) - EVT_END_LOOP - EVT_CALL(SetAnimationRate, ACTOR_SELF, LVar0, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetStatusFlags, ACTOR_SELF, LVar2) + IfNotFlag(LVar2, STATUS_FLAGS_IMMOBILIZED) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Call(SetAnimationRate, ACTOR_SELF, LVar0, Float(2.0)) + Loop(10) + Call(GetActorPos, ACTOR_SELF, LVar3, LVar4, LVar5) + Call(GetActorSize, ACTOR_SELF, LVar6, LVar7) + Add(LVar4, LVar6) + PlayEffect(EFFECT_SWEAT, 0, LVar3, LVar4, LVar5, 5, -45, 20) + Wait(10) + EndLoop + Call(SetAnimationRate, ACTOR_SELF, LVar0, Float(1.0)) + EndIf + Return + End }; EvtScript EVS_Enemy_BlowAway = { - EVT_CALL(GetStatusFlags, ACTOR_SELF, LVar5) - EVT_IF_NOT_FLAG(LVar5, STATUS_FLAGS_IMMOBILIZED) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_ELSE - EVT_SET(LFlag0, FALSE) - EVT_IF_FLAG(LVar2, STATUS_FLAG_SLEEP) - EVT_IF_FLAG(LVar5, STATUS_FLAG_SLEEP) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_IF_FLAG(LVar2, STATUS_FLAG_STATIC) - EVT_IF_FLAG(LVar5, STATUS_FLAG_STATIC) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_IF_FLAG(LVar2, STATUS_FLAG_FROZEN) - EVT_IF_FLAG(LVar5, STATUS_FLAG_FROZEN) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_IF_FLAG(LVar2, STATUS_FLAG_FEAR) - EVT_IF_FLAG(LVar5, STATUS_FLAG_FEAR) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_IF_FLAG(LVar2, STATUS_FLAG_PARALYZE) - EVT_IF_FLAG(LVar5, STATUS_FLAG_PARALYZE) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_IF_FLAG(LVar2, STATUS_FLAG_POISON) - EVT_IF_FLAG(LVar5, STATUS_FLAG_POISON) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_IF_FLAG(LVar2, STATUS_FLAG_DIZZY) - EVT_IF_FLAG(LVar5, STATUS_FLAG_DIZZY) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_IF_FLAG(LVar5, STATUS_FLAG_SHRINK) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_IF_FLAG(LVar2, STATUS_FLAG_STONE) - EVT_IF_FLAG(LVar5, STATUS_FLAG_STONE) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_IF_FLAG(LVar2, STATUS_FLAG_KO) - EVT_IF_FLAG(LVar5, STATUS_FLAG_KO) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(SetAnimation, ACTOR_SELF, LVar0, LVar1) - EVT_END_IF - EVT_END_IF - EVT_EXEC_WAIT(EVS_ForceNextTarget) - EVT_WAIT(1000) - EVT_RETURN - EVT_END + Call(GetStatusFlags, ACTOR_SELF, LVar5) + IfNotFlag(LVar5, STATUS_FLAGS_IMMOBILIZED) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + Else + Set(LFlag0, FALSE) + IfFlag(LVar2, STATUS_FLAG_SLEEP) + IfFlag(LVar5, STATUS_FLAG_SLEEP) + Set(LFlag0, TRUE) + EndIf + EndIf + IfFlag(LVar2, STATUS_FLAG_STATIC) + IfFlag(LVar5, STATUS_FLAG_STATIC) + Set(LFlag0, TRUE) + EndIf + EndIf + IfFlag(LVar2, STATUS_FLAG_FROZEN) + IfFlag(LVar5, STATUS_FLAG_FROZEN) + Set(LFlag0, TRUE) + EndIf + EndIf + IfFlag(LVar2, STATUS_FLAG_FEAR) + IfFlag(LVar5, STATUS_FLAG_FEAR) + Set(LFlag0, TRUE) + EndIf + EndIf + IfFlag(LVar2, STATUS_FLAG_PARALYZE) + IfFlag(LVar5, STATUS_FLAG_PARALYZE) + Set(LFlag0, TRUE) + EndIf + EndIf + IfFlag(LVar2, STATUS_FLAG_POISON) + IfFlag(LVar5, STATUS_FLAG_POISON) + Set(LFlag0, TRUE) + EndIf + EndIf + IfFlag(LVar2, STATUS_FLAG_DIZZY) + IfFlag(LVar5, STATUS_FLAG_DIZZY) + Set(LFlag0, TRUE) + EndIf + EndIf + IfFlag(LVar5, STATUS_FLAG_SHRINK) + Set(LFlag0, TRUE) + EndIf + IfFlag(LVar2, STATUS_FLAG_STONE) + IfFlag(LVar5, STATUS_FLAG_STONE) + Set(LFlag0, TRUE) + EndIf + EndIf + IfFlag(LVar2, STATUS_FLAG_KO) + IfFlag(LVar5, STATUS_FLAG_KO) + Set(LFlag0, TRUE) + EndIf + EndIf + IfEq(LFlag0, TRUE) + Call(SetAnimation, ACTOR_SELF, LVar0, LVar1) + EndIf + EndIf + ExecWait(EVS_ForceNextTarget) + Wait(1000) + Return + End }; diff --git a/src/battle/use_items.c b/src/battle/use_items.c index 9d9bfb1294e..639859a6fbb 100644 --- a/src/battle/use_items.c +++ b/src/battle/use_items.c @@ -201,9 +201,9 @@ API_CALLABLE(LoadMysteryItemScript) { } EvtScript EVS_UseMystery = { - EVT_WAIT(2) - EVT_CALL(LoadMysteryItemScript) - EVT_EXEC_WAIT(LVar0) - EVT_RETURN - EVT_END + Wait(2) + Call(LoadMysteryItemScript) + ExecWait(LVar0) + Return + End }; diff --git a/src/common/MakeSun.inc.c b/src/common/MakeSun.inc.c index f7b9439113c..674f506b938 100644 --- a/src/common/MakeSun.inc.c +++ b/src/common/MakeSun.inc.c @@ -32,9 +32,9 @@ API_CALLABLE(N(SpawnSunEffect)) { } EvtScript N(MakeSun) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Return + End }; diff --git a/src/common/foliage.inc.c b/src/common/foliage.inc.c index a038ea16ea2..1dd8cd7a925 100644 --- a/src/common/foliage.inc.c +++ b/src/common/foliage.inc.c @@ -4,176 +4,176 @@ #include "FoliageTransform.inc.c" EvtScript N(EVS_SearchBush) = { - EVT_USE_BUF(LVar0) - EVT_BUF_READ4(LVar1, LVar2, LVar3, LVar4) - EVT_CALL(GetPlayerPos, LVar5, LVarF, LVar7) - EVT_THREAD - EVT_SET(LFlag0, FALSE) - EVT_IF_NE(LVar1, 0) - EVT_LOOP(5) - EVT_USE_BUF(LVar1) - EVT_BUF_READ1(LVar2) - EVT_LOOP(LVar2) - EVT_BUF_READ1(LVar3) - EVT_CALL(N(TransformFoliage), LVar3, EVT_FLOAT(0.1), 1, LVarF, 0) - EVT_IF_EQ(LFlag0, FALSE) - EVT_SET(LFlag0, TRUE) - EVT_CALL(PlaySoundAtModel, LVar3, SOUND_SEARCH_BUSH, SOUND_SPACE_DEFAULT) - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(1) - EVT_USE_BUF(LVar1) - EVT_BUF_READ1(LVar2) - EVT_LOOP(LVar2) - EVT_BUF_READ1(LVar3) - EVT_CALL(N(TransformFoliage), LVar3, EVT_FLOAT(0.1), -1, LVarF, 0) - EVT_END_LOOP - EVT_WAIT(1) - EVT_END_LOOP - EVT_USE_BUF(LVar1) - EVT_BUF_READ1(LVar2) - EVT_LOOP(LVar2) - EVT_BUF_READ1(LVar3) - EVT_CALL(TranslateModel, LVar3, 0, 0, 0) - EVT_END_LOOP - EVT_WAIT(1) - EVT_END_IF - EVT_END_THREAD - EVT_THREAD - EVT_IF_NE(LVar2, 0) - EVT_USE_BUF(LVar2) - EVT_BUF_READ1(LVar3) - EVT_LOOP(LVar3) - EVT_BUF_READ1(LVar4) - EVT_BUF_READ3(LVar5, LVar6, LVar7) - EVT_BUF_READ3(LVar8, LVar9, LVarA) - EVT_IF_EQ(LVarA, 0) - EVT_CALL(DropItemEntity, LVar4, LVar5, LVar6, LVar7, LVar8, LVar9) - EVT_ELSE - EVT_CALL(GetValueByRef, LVarA, LVarB) - EVT_IF_EQ(LVarB, 0) - EVT_CALL(SetValueByRef, LVarA, 1) - EVT_CALL(DropItemEntity, LVar4, LVar5, LVar6, LVar7, LVar8, LVar9) - EVT_END_IF - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(15) - EVT_IF_NE(LVar4, 0) - EVT_EXEC_WAIT(LVar4) - EVT_END_IF - EVT_RETURN - EVT_END + UseBuf(LVar0) + BufRead4(LVar1, LVar2, LVar3, LVar4) + Call(GetPlayerPos, LVar5, LVarF, LVar7) + Thread + Set(LFlag0, FALSE) + IfNe(LVar1, 0) + Loop(5) + UseBuf(LVar1) + BufRead1(LVar2) + Loop(LVar2) + BufRead1(LVar3) + Call(N(TransformFoliage), LVar3, Float(0.1), 1, LVarF, 0) + IfEq(LFlag0, FALSE) + Set(LFlag0, TRUE) + Call(PlaySoundAtModel, LVar3, SOUND_SEARCH_BUSH, SOUND_SPACE_DEFAULT) + EndIf + EndLoop + Wait(1) + UseBuf(LVar1) + BufRead1(LVar2) + Loop(LVar2) + BufRead1(LVar3) + Call(N(TransformFoliage), LVar3, Float(0.1), -1, LVarF, 0) + EndLoop + Wait(1) + EndLoop + UseBuf(LVar1) + BufRead1(LVar2) + Loop(LVar2) + BufRead1(LVar3) + Call(TranslateModel, LVar3, 0, 0, 0) + EndLoop + Wait(1) + EndIf + EndThread + Thread + IfNe(LVar2, 0) + UseBuf(LVar2) + BufRead1(LVar3) + Loop(LVar3) + BufRead1(LVar4) + BufRead3(LVar5, LVar6, LVar7) + BufRead3(LVar8, LVar9, LVarA) + IfEq(LVarA, 0) + Call(DropItemEntity, LVar4, LVar5, LVar6, LVar7, LVar8, LVar9) + Else + Call(GetValueByRef, LVarA, LVarB) + IfEq(LVarB, 0) + Call(SetValueByRef, LVarA, 1) + Call(DropItemEntity, LVar4, LVar5, LVar6, LVar7, LVar8, LVar9) + EndIf + EndIf + EndLoop + EndIf + EndThread + Wait(15) + IfNe(LVar4, 0) + ExecWait(LVar4) + EndIf + Return + End }; EvtScript N(EVS_ShakeTree) = { - EVT_SET_TIMESCALE(EVT_FLOAT(2.0)) - EVT_USE_BUF(LVar0) - EVT_BUF_READ4(LVar1, LVar2, LVar3, LVar4) - EVT_BUF_READ1(LVar5) - EVT_CALL(GetPlayerPos, LVar6, LVarF, LVar8) - EVT_CALL(PlaySound, SOUND_SMACK_TREE) - EVT_CALL(PlaySound, SOUND_SHAKE_TREE_LEAVES) - EVT_THREAD - EVT_SET(LFlag0, FALSE) - EVT_IF_NE(LVar1, 0) - EVT_WAIT(1) - EVT_LOOP(5) - EVT_USE_BUF(LVar1) - EVT_BUF_READ1(LVar2) - EVT_LOOP(LVar2) - EVT_BUF_READ1(LVar3) - EVT_CALL(N(TransformFoliage), LVar3, EVT_FLOAT(0.1), EVT_FLOAT(0.2), LVarF, 0) - EVT_IF_EQ(LFlag0, FALSE) - EVT_SET(LFlag0, TRUE) - EVT_CALL(PlaySoundAtModel, LVar3, SOUND_SHAKE_TREE_LEAVES, SOUND_SPACE_DEFAULT) - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(1) - EVT_USE_BUF(LVar1) - EVT_BUF_READ1(LVar2) - EVT_LOOP(LVar2) - EVT_BUF_READ1(LVar3) - EVT_CALL(N(TransformFoliage), LVar3, EVT_FLOAT(0.1), EVT_FLOAT(-0.2), LVarF, 0) - EVT_END_LOOP - EVT_WAIT(1) - EVT_END_LOOP - EVT_USE_BUF(LVar1) - EVT_BUF_READ1(LVar2) - EVT_LOOP(LVar2) - EVT_BUF_READ1(LVar3) - EVT_CALL(TranslateModel, LVar3, 0, 0, 0) - EVT_END_LOOP - EVT_WAIT(1) - EVT_END_IF - EVT_END_THREAD - EVT_THREAD - EVT_SET(LFlag0, FALSE) - EVT_IF_NE(LVar2, 0) - EVT_LOOP(5) - EVT_USE_BUF(LVar2) - EVT_BUF_READ1(LVar3) - EVT_LOOP(LVar3) - EVT_BUF_READ1(LVar4) - EVT_CALL(N(TransformFoliage), LVar4, EVT_FLOAT(0.1), EVT_FLOAT(0.2), LVarF, 0) - EVT_IF_EQ(LFlag0, FALSE) - EVT_SET(LFlag0, TRUE) - EVT_CALL(PlaySoundAtModel, LVar4, SOUND_SMACK_TREE, SOUND_SPACE_DEFAULT) - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(1) - EVT_USE_BUF(LVar2) - EVT_BUF_READ1(LVar3) - EVT_LOOP(LVar3) - EVT_BUF_READ1(LVar4) - EVT_CALL(N(TransformFoliage), LVar4, EVT_FLOAT(0.1), EVT_FLOAT(-0.2), LVarF, 0) - EVT_END_LOOP - EVT_WAIT(1) - EVT_END_LOOP - EVT_USE_BUF(LVar2) - EVT_BUF_READ1(LVar3) - EVT_LOOP(LVar3) - EVT_BUF_READ1(LVar4) - EVT_CALL(TranslateModel, LVar4, 0, 0, 0) - EVT_END_LOOP - EVT_WAIT(1) - EVT_END_IF - EVT_END_THREAD - EVT_THREAD - EVT_IF_NE(LVar3, 0) - EVT_USE_BUF(LVar3) - EVT_BUF_READ1(LVar4) - EVT_LOOP(LVar4) - EVT_BUF_READ1(LVar5) - EVT_BUF_READ3(LVar6, LVar7, LVar8) - EVT_BUF_READ3(LVar9, LVarA, LVarB) - EVT_IF_EQ(LVarB, 0) - EVT_CALL(DropItemEntity, LVar5, LVar6, LVar7, LVar8, LVar9, LVarA) - EVT_ELSE - EVT_CALL(GetValueByRef, LVarB, LVarC) - EVT_IF_EQ(LVarC, 0) - EVT_CALL(SetValueByRef, LVarB, 1) - EVT_CALL(DropItemEntity, LVar5, LVar6, LVar7, LVar8, LVar9, LVarA) - EVT_END_IF - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_END_THREAD - EVT_THREAD - EVT_IF_NE(LVar4, 0) - EVT_USE_BUF(LVar4) - EVT_BUF_READ1(LVar5) - EVT_LOOP(LVar5) - EVT_BUF_READ3(LVar6, LVar7, LVar8) - EVT_PLAY_EFFECT(EFFECT_DROP_LEAVES, 0, LVar6, LVar7, LVar8, 100) - EVT_END_LOOP - EVT_END_IF - EVT_END_THREAD - EVT_IF_NE(LVar5, 0) - EVT_EXEC_WAIT(LVar5) - EVT_END_IF - EVT_WAIT(15) - EVT_RETURN - EVT_END + SetTimescale(Float(2.0)) + UseBuf(LVar0) + BufRead4(LVar1, LVar2, LVar3, LVar4) + BufRead1(LVar5) + Call(GetPlayerPos, LVar6, LVarF, LVar8) + Call(PlaySound, SOUND_SMACK_TREE) + Call(PlaySound, SOUND_SHAKE_TREE_LEAVES) + Thread + Set(LFlag0, FALSE) + IfNe(LVar1, 0) + Wait(1) + Loop(5) + UseBuf(LVar1) + BufRead1(LVar2) + Loop(LVar2) + BufRead1(LVar3) + Call(N(TransformFoliage), LVar3, Float(0.1), Float(0.2), LVarF, 0) + IfEq(LFlag0, FALSE) + Set(LFlag0, TRUE) + Call(PlaySoundAtModel, LVar3, SOUND_SHAKE_TREE_LEAVES, SOUND_SPACE_DEFAULT) + EndIf + EndLoop + Wait(1) + UseBuf(LVar1) + BufRead1(LVar2) + Loop(LVar2) + BufRead1(LVar3) + Call(N(TransformFoliage), LVar3, Float(0.1), Float(-0.2), LVarF, 0) + EndLoop + Wait(1) + EndLoop + UseBuf(LVar1) + BufRead1(LVar2) + Loop(LVar2) + BufRead1(LVar3) + Call(TranslateModel, LVar3, 0, 0, 0) + EndLoop + Wait(1) + EndIf + EndThread + Thread + Set(LFlag0, FALSE) + IfNe(LVar2, 0) + Loop(5) + UseBuf(LVar2) + BufRead1(LVar3) + Loop(LVar3) + BufRead1(LVar4) + Call(N(TransformFoliage), LVar4, Float(0.1), Float(0.2), LVarF, 0) + IfEq(LFlag0, FALSE) + Set(LFlag0, TRUE) + Call(PlaySoundAtModel, LVar4, SOUND_SMACK_TREE, SOUND_SPACE_DEFAULT) + EndIf + EndLoop + Wait(1) + UseBuf(LVar2) + BufRead1(LVar3) + Loop(LVar3) + BufRead1(LVar4) + Call(N(TransformFoliage), LVar4, Float(0.1), Float(-0.2), LVarF, 0) + EndLoop + Wait(1) + EndLoop + UseBuf(LVar2) + BufRead1(LVar3) + Loop(LVar3) + BufRead1(LVar4) + Call(TranslateModel, LVar4, 0, 0, 0) + EndLoop + Wait(1) + EndIf + EndThread + Thread + IfNe(LVar3, 0) + UseBuf(LVar3) + BufRead1(LVar4) + Loop(LVar4) + BufRead1(LVar5) + BufRead3(LVar6, LVar7, LVar8) + BufRead3(LVar9, LVarA, LVarB) + IfEq(LVarB, 0) + Call(DropItemEntity, LVar5, LVar6, LVar7, LVar8, LVar9, LVarA) + Else + Call(GetValueByRef, LVarB, LVarC) + IfEq(LVarC, 0) + Call(SetValueByRef, LVarB, 1) + Call(DropItemEntity, LVar5, LVar6, LVar7, LVar8, LVar9, LVarA) + EndIf + EndIf + EndLoop + EndIf + EndThread + Thread + IfNe(LVar4, 0) + UseBuf(LVar4) + BufRead1(LVar5) + Loop(LVar5) + BufRead3(LVar6, LVar7, LVar8) + PlayEffect(EFFECT_DROP_LEAVES, 0, LVar6, LVar7, LVar8, 100) + EndLoop + EndIf + EndThread + IfNe(LVar5, 0) + ExecWait(LVar5) + EndIf + Wait(15) + Return + End }; diff --git a/src/encounter.c b/src/encounter.c index 0cf391a2f35..459f69985a4 100644 --- a/src/encounter.c +++ b/src/encounter.c @@ -21,60 +21,60 @@ API_CALLABLE(PlayMerleeOrbFX); s32 D_80077C40 = 0; EvtScript EVS_MerleeDropCoins = { - EVT_WAIT(10) - EVT_CALL(FadeBackgroundDarken) - EVT_WAIT(10) - EVT_CALL(CreateNpc, NPC_BTL_MERLEE, ANIM_BattleMerlee_Gather) - EVT_CALL(SetNpcFlagBits, NPC_BTL_MERLEE, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcYaw, NPC_BTL_MERLEE, 0) - EVT_CALL(GetCamLookAtObjVector) - EVT_CALL(SetNpcPos, NPC_BTL_MERLEE, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_CALL(MerleeUpdateFX) - EVT_END_THREAD - EVT_CALL(FadeInMerlee) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_BTL_MERLEE, ANIM_BattleMerlee_Release) - EVT_CALL(MerleeStopFX) - EVT_CALL(FadeBackgroundLighten) - EVT_WAIT(20) - EVT_THREAD - EVT_CALL(FadeOutMerlee) - EVT_CALL(DeleteNpc, NPC_BTL_MERLEE) - EVT_END_THREAD - EVT_CALL(PlaySound, SOUND_MAGIC_DESCENDING) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(PlayMerleeGatherFX, LVar0, LVar1, LVar2) - EVT_CALL(PlayMerleeOrbFX, LVar0, LVar1, LVar2) - EVT_WAIT(15) - EVT_CALL(ShowMerleeCoinMessage) - EVT_WAIT(15) - EVT_CALL(HasMerleeCasts) - EVT_IF_EQ(LVar0, 1) - EVT_RETURN - EVT_END_IF - EVT_CALL(ShowMerleeRanOutMessage) - EVT_WAIT(15) - EVT_RETURN - EVT_END + Wait(10) + Call(FadeBackgroundDarken) + Wait(10) + Call(CreateNpc, NPC_BTL_MERLEE, ANIM_BattleMerlee_Gather) + Call(SetNpcFlagBits, NPC_BTL_MERLEE, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcYaw, NPC_BTL_MERLEE, 0) + Call(GetCamLookAtObjVector) + Call(SetNpcPos, NPC_BTL_MERLEE, LVar0, LVar1, LVar2) + Thread + Call(MerleeUpdateFX) + EndThread + Call(FadeInMerlee) + Wait(30) + Call(SetNpcAnimation, NPC_BTL_MERLEE, ANIM_BattleMerlee_Release) + Call(MerleeStopFX) + Call(FadeBackgroundLighten) + Wait(20) + Thread + Call(FadeOutMerlee) + Call(DeleteNpc, NPC_BTL_MERLEE) + EndThread + Call(PlaySound, SOUND_MAGIC_DESCENDING) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(PlayMerleeGatherFX, LVar0, LVar1, LVar2) + Call(PlayMerleeOrbFX, LVar0, LVar1, LVar2) + Wait(15) + Call(ShowMerleeCoinMessage) + Wait(15) + Call(HasMerleeCasts) + IfEq(LVar0, 1) + Return + EndIf + Call(ShowMerleeRanOutMessage) + Wait(15) + Return + End }; EvtScript EVS_NpcDefeat = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(OnDefeatEnemy) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(OnDefeatEnemy) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript EVS_FleeBattleDrops = { - EVT_CALL(OnFleeBattleDrops) - EVT_RETURN - EVT_END + Call(OnFleeBattleDrops) + Return + End }; EnemyDrops DefaultEnemyDrops = { @@ -126,46 +126,46 @@ EnemyDrops DefaultEnemyDrops = { }; EvtScript EnemyNpcHit = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_NONE) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_PARTNER) - EVT_CALL(GetSelfAnimationFromTable, ENEMY_ANIM_INDEX_HIT, LVar0) - EVT_EXEC_WAIT(EVS_NpcHitRecoil) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_SPIN) - EVT_THREAD - EVT_CALL(func_800458CC, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LVarA, 0) - EVT_LOOP(30) - EVT_ADD(LVarA, 40) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, LVarA, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_IF - EVT_END_THREAD - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_NONE) + CaseOrEq(ENCOUNTER_TRIGGER_JUMP) + CaseOrEq(ENCOUNTER_TRIGGER_HAMMER) + CaseOrEq(ENCOUNTER_TRIGGER_PARTNER) + Call(GetSelfAnimationFromTable, ENEMY_ANIM_INDEX_HIT, LVar0) + ExecWait(EVS_NpcHitRecoil) + CaseEq(ENCOUNTER_TRIGGER_SPIN) + Thread + Call(func_800458CC, LVar0) + IfEq(LVar0, 0) + Set(LVarA, 0) + Loop(30) + Add(LVarA, 40) + Call(SetNpcRotation, NPC_SELF, 0, LVarA, 0) + Wait(1) + EndLoop + EndIf + EndThread + EndCaseGroup + EndSwitch + Return + End }; EvtScript EnemyNpcDefeat = { - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, 0) - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(OnPlayerFled, 0) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_CALL(SetEnemyFlagBits, -1, ENEMY_FLAG_FLED, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetNpcRotation, NPC_SELF, 0, 0, 0) + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_FLED) + Call(OnPlayerFled, 0) + CaseEq(OUTCOME_ENEMY_FLED) + Call(SetEnemyFlagBits, -1, ENEMY_FLAG_FLED, 1) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; SHIFT_BSS s32 gEncounterState; diff --git a/src/entity/Chest.c b/src/entity/Chest.c index bd839b895b8..61c417487e4 100644 --- a/src/entity/Chest.c +++ b/src/entity/Chest.c @@ -16,50 +16,50 @@ extern Gfx Entity_Chest_RenderLid[]; extern Mtx Entity_Chest_LidMtx; EvtScript Entity_Chest_AdjustCam_ISK = { - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, 0, -195, -358, -555) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, EVT_FLOAT(290.0)) - EVT_CALL(SetCamPitch, 0, EVT_FLOAT(20.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(8.0)) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, 0, -195, -358, -555) + Call(SetPanTarget, 0, LVar0, LVar1, LVar2) + Call(SetCamDistance, 0, Float(290.0)) + Call(SetCamPitch, 0, Float(20.0), Float(-10.0)) + Call(SetCamSpeed, 0, Float(8.0)) + Call(PanToTarget, 0, 0, 1) + Call(WaitForCam, 0, Float(1.0)) + EndThread + Return + End }; EvtScript Entity_Chest_ResetCam_ISK = { - EVT_THREAD - EVT_CALL(ResetCam, 0, 3) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + Call(ResetCam, 0, 3) + EndThread + Return + End }; EvtScript Entity_Chest_AdjustCam_TIK = { - EVT_THREAD - EVT_CALL(AdjustCam, 0, EVT_FLOAT(8.0), 0, EVT_FLOAT(300.0), EVT_FLOAT(17.5), EVT_FLOAT(-9.5)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + Call(AdjustCam, 0, Float(8.0), 0, Float(300.0), Float(17.5), Float(-9.5)) + EndThread + Return + End }; EvtScript Entity_Chest_AdjustCam_KZN = { - EVT_THREAD - EVT_CALL(AdjustCam, 0, EVT_FLOAT(8.0), 0, EVT_FLOAT(210.0), EVT_FLOAT(21.0), EVT_FLOAT(-16.0)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + Call(AdjustCam, 0, Float(8.0), 0, Float(210.0), Float(21.0), Float(-16.0)) + EndThread + Return + End }; EvtScript Entity_Chest_ResetCam_Default = { - EVT_THREAD - EVT_CALL(ResetCam, 0, 3) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + Call(ResetCam, 0, 3) + EndThread + Return + End }; void entity_Chest_adjust_camera(Entity* entity) { diff --git a/src/evt/audio_api.c b/src/evt/audio_api.c index 5db7bc886d9..efb7281d96a 100644 --- a/src/evt/audio_api.c +++ b/src/evt/audio_api.c @@ -9,9 +9,9 @@ extern s32 RunningMusicEventIDs[10]; s32 MusicEventPollCount = 0; static EvtScript EVS_MusicEventMonitor = { - EVT_CALL(PollMusicEvents) - EVT_RETURN - EVT_END + Call(PollMusicEvents) + Return + End }; API_CALLABLE(PollMusicEvents) { diff --git a/src/evt/cam_api.c b/src/evt/cam_api.c index dab31d801f4..1794610a1a5 100644 --- a/src/evt/cam_api.c +++ b/src/evt/cam_api.c @@ -2,17 +2,17 @@ #include "camera.h" EvtScript ShakeCam1 = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(ShakeCam, LVar0, LVar1, LVar2, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(ShakeCam, LVar0, LVar1, LVar2, Float(1.0)) + Return + End }; EvtScript ShakeCamX = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(ShakeCam, LVar0, LVar1, LVar2, LVar3) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(ShakeCam, LVar0, LVar1, LVar2, LVar3) + Return + End }; API_CALLABLE(SetCamEnabled) { diff --git a/src/evt/evt.c b/src/evt/evt.c index e74d111bb62..beea879858e 100644 --- a/src/evt/evt.c +++ b/src/evt/evt.c @@ -21,7 +21,7 @@ f32 evt_fixed_var_to_float(Bytecode scriptVar) { } Bytecode evt_float_to_fixed_var(f32 value) { - // not equivalent to hte EVT_FLOAT_TO_FIXED() macro due to the s32 cast + // not equivalent to hte Float_TO_FIXED() macro due to the s32 cast // occuring *before* the add here and *after* the add in the macro return (s32)(value * 1024.0f) + -EVT_FIXED_OFFSET; } diff --git a/src/evt/fx_api.c b/src/evt/fx_api.c index d5217bb359d..b1421b01e4c 100644 --- a/src/evt/fx_api.c +++ b/src/evt/fx_api.c @@ -181,9 +181,9 @@ API_CALLABLE(InterpMotionBlurParams) { } EvtScript EVS_UpdateMotionBlurParams = { - EVT_CALL(InterpMotionBlurParams) - EVT_RETURN - EVT_END + Call(InterpMotionBlurParams) + Return + End }; API_CALLABLE(SetMotionBlurParams) { diff --git a/src/world/area_arn/arn_02/arn_02_1_music.c b/src/world/area_arn/arn_02/arn_02_1_music.c index cd3f21a2084..a3e4c4dad48 100644 --- a/src/world/area_arn/arn_02/arn_02_1_music.c +++ b/src/world/area_arn/arn_02/arn_02_1_music.c @@ -1,15 +1,15 @@ #include "arn_02.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) - EVT_END_SWITCH - EVT_CALL(PlayAmbientSounds, AMBIENT_WIND) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_WOKE_UP) + Call(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) + EndSwitch + Call(PlayAmbientSounds, AMBIENT_WIND) + Return + End }; diff --git a/src/world/area_arn/arn_02/arn_02_2_main.c b/src/world/area_arn/arn_02/arn_02_2_main.c index 2777fd21af5..863652c3284 100644 --- a/src/world/area_arn/arn_02/arn_02_2_main.c +++ b/src/world/area_arn/arn_02/arn_02_2_main.c @@ -4,22 +4,22 @@ EvtScript N(EVS_ExitWalk_arn_05_1) = EVT_EXIT_WALK(60, arn_02_ENTRY_0, "arn_05", EvtScript N(EVS_ExitWalk_arn_04_0) = EVT_EXIT_WALK(60, arn_02_ENTRY_1, "arn_04", arn_04_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_arn_05_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_arn_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_arn_05_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_arn_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_GUSTY_GULCH) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_GUSTY_GULCH) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; diff --git a/src/world/area_arn/arn_02/arn_02_3_entity.c b/src/world/area_arn/arn_02/arn_02_3_entity.c index a3944cb6844..5261066afb5 100644 --- a/src/world/area_arn/arn_02/arn_02_3_entity.c +++ b/src/world/area_arn/arn_02/arn_02_3_entity.c @@ -2,14 +2,14 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_DIZZY_DIAL, -248, 193, 45, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_ARN02_Item_DizzyDial) - EVT_CALL(MakeItemEntity, ITEM_LETTER_TO_FICE_T, 536, 260, 227, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_ARN02_Item_LetterFiceT) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -350, 172, 170, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_ARN02_ItemBlock_CoinA) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 225, 265, 30, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_ARN02_ItemBlock_CoinB) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 275, 265, 150, 0, ITEM_REPEL_GEL, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_ARN02_ItemBlock_RepelGel) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_DIZZY_DIAL, -248, 193, 45, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_ARN02_Item_DizzyDial) + Call(MakeItemEntity, ITEM_LETTER_TO_FICE_T, 536, 260, 227, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_ARN02_Item_LetterFiceT) + Call(MakeEntity, Ref(Entity_YellowBlock), -350, 172, 170, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_ARN02_ItemBlock_CoinA) + Call(MakeEntity, Ref(Entity_YellowBlock), 225, 265, 30, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_ARN02_ItemBlock_CoinB) + Call(MakeEntity, Ref(Entity_YellowBlock), 275, 265, 150, 0, ITEM_REPEL_GEL, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_ARN02_ItemBlock_RepelGel) + Return + End }; diff --git a/src/world/area_arn/arn_03/arn_03_1_music.c b/src/world/area_arn/arn_03/arn_03_1_music.c index 6be2e94bad9..8fd7eb46f56 100644 --- a/src/world/area_arn/arn_03/arn_03_1_music.c +++ b/src/world/area_arn/arn_03/arn_03_1_music.c @@ -1,15 +1,15 @@ #include "arn_03.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) - EVT_END_SWITCH - EVT_CALL(PlayAmbientSounds, AMBIENT_WIND) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_WOKE_UP) + Call(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) + EndSwitch + Call(PlayAmbientSounds, AMBIENT_WIND) + Return + End }; diff --git a/src/world/area_arn/arn_03/arn_03_2_main.c b/src/world/area_arn/arn_03/arn_03_2_main.c index 1e17220d99d..21fca86674d 100644 --- a/src/world/area_arn/arn_03/arn_03_2_main.c +++ b/src/world/area_arn/arn_03/arn_03_2_main.c @@ -4,59 +4,59 @@ EvtScript N(EVS_ExitWalk_arn_07_1) = EVT_EXIT_WALK(60, arn_03_ENTRY_0, "arn_07", EvtScript N(EVS_ExitWalk_arn_05_0) = EVT_EXIT_WALK(60, arn_03_ENTRY_1, "arn_05", arn_05_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_arn_07_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_arn_05_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_arn_07_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_arn_05_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH3_ARRIVED_AT_GHOST_TOWN) - EVT_CALL(SetPlayerPos, -175, 165, 160) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, -175, 165, 160) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + IfLt(GB_StoryProgress, STORY_CH3_ARRIVED_AT_GHOST_TOWN) + Call(SetPlayerPos, -175, 165, 160) + Call(InterpPlayerYaw, 90, 0) + Call(SetNpcPos, NPC_PARTNER, -175, 165, 160) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) #if VERSION_PAL - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(4 / DT)) + Call(SetPlayerSpeed, Float(4 / DT)) #else - EVT_CALL(SetPlayerSpeed, 4) + Call(SetPlayerSpeed, 4) #endif - EVT_CALL(PlayerMoveTo, -55, 160, 0) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Call(PlayerMoveTo, -55, 160, 0) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_GUSTY_GULCH) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_SET(AF_ARN_03, FALSE) - EVT_SET(AF_ARN_04, FALSE) - EVT_SET(AF_ARN_05, FALSE) - EVT_IF_LT(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(BeforeNPCs))) - EVT_ELSE - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(AfterNPCs))) - EVT_END_IF - EVT_IF_EQ(GF_ARN03_WaitingForPackage, TRUE) - EVT_SET(MV_Unk_00, 450) - EVT_SET(MV_Unk_01, 450) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_GUSTY_GULCH) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Set(AF_ARN_03, FALSE) + Set(AF_ARN_04, FALSE) + Set(AF_ARN_05, FALSE) + IfLt(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(MakeNpcs, FALSE, Ref(N(BeforeNPCs))) + Else + Call(MakeNpcs, FALSE, Ref(N(AfterNPCs))) + EndIf + IfEq(GF_ARN03_WaitingForPackage, TRUE) + Set(MV_Unk_00, 450) + Set(MV_Unk_01, 450) + EndIf + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_arn/arn_03/arn_03_3_npc.c b/src/world/area_arn/arn_03/arn_03_3_npc.c index a08a627c9b0..292bcf20b8e 100644 --- a/src/world/area_arn/arn_03/arn_03_3_npc.c +++ b/src/world/area_arn/arn_03/arn_03_3_npc.c @@ -10,367 +10,367 @@ #include "world/common/atomic/MarioSalute.inc.c" EvtScript N(EVS_NpcInteract_Boo_01) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) - EVT_IF_EQ(AF_ARN_02, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0073) - EVT_SET(AF_ARN_02, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0074) - EVT_SET(AF_ARN_02, FALSE) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0075) - EVT_CASE_LT(STORY_CH3_BEGAN_PEACH_MISSION) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0076) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0077) - EVT_CASE_GE(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0078) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(20) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) + IfEq(AF_ARN_02, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0073) + Set(AF_ARN_02, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0074) + Set(AF_ARN_02, FALSE) + EndIf + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0075) + CaseLt(STORY_CH3_BEGAN_PEACH_MISSION) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0076) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0077) + CaseGe(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0078) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(10) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(20) + Call(EndSpeech, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0) + EndSwitch + Return + End }; EvtScript N(EVS_NpcIdle_Boo_01) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(25 * DT) - EVT_THREAD - EVT_WAIT(50 * DT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 325) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(GetCurrentPartnerID, LVar6) - EVT_IF_NE(LVar6, PARTNER_BOW) - EVT_CALL(BringPartnerOut, PARTNER_BOW) - EVT_CALL(DisablePartnerAI, 0) - EVT_WAIT(1) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_SELF, 0) - EVT_WAIT(5 * DT) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, 0) - EVT_IF_EQ(LVar6, PARTNER_PARAKARRY) - EVT_CALL(NpcJump0, NPC_PARTNER, -81, 176, 171, 20 * DT) - EVT_ELSE - EVT_CALL(NpcJump0, NPC_PARTNER, -81, 186, 171, 20 * DT) - EVT_END_IF - EVT_CALL(EnablePartnerAI) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(SetNpcJumpscale, NPC_SELF, 0) - EVT_CALL(NpcJump0, NPC_SELF, -8, 186, 159, 60 * DT) - EVT_WAIT(15 * DT) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(InterpNpcYaw, NPC_SELF, -4, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_006E) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, -1, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 5, MSG_CH3_006F) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_0070) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, -1, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 5, MSG_CH3_0071) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_0072) - EVT_CALL(EnablePartnerAI) - EVT_WAIT(10 * DT) - EVT_CALL(GetCurrentPartnerID, LVar6) - EVT_IF_NE(LVar6, PARTNER_BOW) - EVT_CALL(PutPartnerAway) - EVT_END_IF - EVT_THREAD - EVT_CALL(NpcMoveTo, NPC_SELF, 30, 125, 30 * DT) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_END_THREAD - EVT_CALL(func_802CF56C, 2) - EVT_WAIT(15 * DT) - EVT_SET(GB_StoryProgress, STORY_CH3_ARRIVED_AT_GHOST_TOWN) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(DisablePlayerInput, TRUE) + Wait(25 * DT) + Thread + Wait(50 * DT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 325) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Thread + Wait(20 * DT) + Call(GetCurrentPartnerID, LVar6) + IfNe(LVar6, PARTNER_BOW) + Call(BringPartnerOut, PARTNER_BOW) + Call(DisablePartnerAI, 0) + Wait(1) + Call(NpcFaceNpc, NPC_PARTNER, NPC_SELF, 0) + Wait(5 * DT) + Call(SetNpcJumpscale, NPC_PARTNER, 0) + IfEq(LVar6, PARTNER_PARAKARRY) + Call(NpcJump0, NPC_PARTNER, -81, 176, 171, 20 * DT) + Else + Call(NpcJump0, NPC_PARTNER, -81, 186, 171, 20 * DT) + EndIf + Call(EnablePartnerAI) + EndIf + EndThread + Call(SetNpcJumpscale, NPC_SELF, 0) + Call(NpcJump0, NPC_SELF, -8, 186, 159, 60 * DT) + Wait(15 * DT) + Call(DisablePartnerAI, 0) + Call(InterpNpcYaw, NPC_SELF, -4, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_006E) + Call(InterpNpcYaw, NPC_PARTNER, -1, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 5, MSG_CH3_006F) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_0070) + Call(InterpNpcYaw, NPC_PARTNER, -1, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 5, MSG_CH3_0071) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_0072) + Call(EnablePartnerAI) + Wait(10 * DT) + Call(GetCurrentPartnerID, LVar6) + IfNe(LVar6, PARTNER_BOW) + Call(PutPartnerAway) + EndIf + Thread + Call(NpcMoveTo, NPC_SELF, 30, 125, 30 * DT) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + EndThread + Call(func_802CF56C, 2) + Wait(15 * DT) + Set(GB_StoryProgress, STORY_CH3_ARRIVED_AT_GHOST_TOWN) + Call(DisablePlayerInput, FALSE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) #if VERSION_PAL - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3 / DT)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3 / DT)) #else - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 3) + Call(SetCamSpeed, CAM_DEFAULT, 3) #endif - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_RETURN - EVT_END + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Return + End }; EvtScript N(EVS_NpcInit_Boo_01) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH3_ARRIVED_AT_GHOST_TOWN) - EVT_CALL(SetNpcPos, NPC_SELF, 175, 240, 145) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Boo_01))) - EVT_END_IF - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Boo_01))) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH3_ARRIVED_AT_GHOST_TOWN) + Call(SetNpcPos, NPC_SELF, 175, 240, 145) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Boo_01))) + EndIf + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Boo_01))) + Return + End }; EvtScript N(EVS_NpcInteract_Boo_02) = { - EVT_IF_NE(MV_Unk_00, 0) - EVT_IF_GE(MV_Unk_00, MV_Unk_01) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0081) - EVT_SET(LVar0, 118) - EVT_SET(LVar1, 1) - EVT_EXEC_WAIT(N(GiveItemReward)) - EVT_CALL(AddKeyItem, ITEM_KOOT_PACKAGE) - EVT_SET(MV_Unk_00, 0) - EVT_SET(GF_ARN03_RecievedPackage, TRUE) - EVT_SET(GF_ARN03_WaitingForPackage, FALSE) - EVT_RETURN - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0080) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) - EVT_IF_EQ(AF_ARN_03, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0079) - EVT_SET(AF_ARN_03, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_007A) - EVT_SET(AF_ARN_03, FALSE) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_007B) - EVT_CASE_LT(STORY_CH3_BEGAN_PEACH_MISSION) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_007C) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_007D) - EVT_CASE_GE(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_007E) - EVT_END_SWITCH - EVT_IF_EQ(GF_ARN03_RecievedPackage, FALSE) - EVT_IF_EQ(GB_KootFavor_Current, KOOT_FAVOR_CH7_2) - EVT_EXEC_WAIT(N(EVS_MarioSalute)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_007F) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0) - EVT_SET(MV_Unk_00, 0) - EVT_SET(MV_Unk_01, 450 * DT) - EVT_SET(GF_ARN03_WaitingForPackage, TRUE) - EVT_THREAD - EVT_LOOP(0) - EVT_ADD(MV_Unk_00, 1) - EVT_WAIT(1) - EVT_IF_GE(MV_Unk_00, MV_Unk_01) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfNe(MV_Unk_00, 0) + IfGe(MV_Unk_00, MV_Unk_01) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0081) + Set(LVar0, 118) + Set(LVar1, 1) + ExecWait(N(GiveItemReward)) + Call(AddKeyItem, ITEM_KOOT_PACKAGE) + Set(MV_Unk_00, 0) + Set(GF_ARN03_RecievedPackage, TRUE) + Set(GF_ARN03_WaitingForPackage, FALSE) + Return + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0080) + Return + EndIf + EndIf + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) + IfEq(AF_ARN_03, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0079) + Set(AF_ARN_03, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_007A) + Set(AF_ARN_03, FALSE) + EndIf + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_007B) + CaseLt(STORY_CH3_BEGAN_PEACH_MISSION) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_007C) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_007D) + CaseGe(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_007E) + EndSwitch + IfEq(GF_ARN03_RecievedPackage, FALSE) + IfEq(GB_KootFavor_Current, KOOT_FAVOR_CH7_2) + ExecWait(N(EVS_MarioSalute)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_007F) + Call(EndSpeech, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0) + Set(MV_Unk_00, 0) + Set(MV_Unk_01, 450 * DT) + Set(GF_ARN03_WaitingForPackage, TRUE) + Thread + Loop(0) + Add(MV_Unk_00, 1) + Wait(1) + IfGe(MV_Unk_00, MV_Unk_01) + BreakLoop + EndIf + EndLoop + EndThread + EndIf + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Boo_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Boo_02))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Boo_02))) + Return + End }; EvtScript N(802428CC) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_IF_GT(LVar0, LVar3) - EVT_ADD(LVar0, 60) - EVT_CALL(SetNpcYaw, NPC_Boo_05, 90) - EVT_ELSE - EVT_SUB(LVar0, 60) - EVT_CALL(SetNpcYaw, NPC_Boo_05, 270) - EVT_END_IF - EVT_ADD(LVar1, 20) - EVT_CALL(SetNpcPos, NPC_Boo_05, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcImgFXParams, NPC_Boo_05, IMGFX_SET_ALPHA, 0, 0, 0, 0) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + IfGt(LVar0, LVar3) + Add(LVar0, 60) + Call(SetNpcYaw, NPC_Boo_05, 90) + Else + Sub(LVar0, 60) + Call(SetNpcYaw, NPC_Boo_05, 270) + EndIf + Add(LVar1, 20) + Call(SetNpcPos, NPC_Boo_05, LVar0, LVar1, LVar2) + Call(SetNpcImgFXParams, NPC_Boo_05, IMGFX_SET_ALPHA, 0, 0, 0, 0) + Wait(1) + Return + End }; EvtScript N(802429D4) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_IF_GT(LVar0, LVar3) - EVT_ADD(LVar0, 30) - EVT_ELSE - EVT_SUB(LVar0, 30) - EVT_END_IF - EVT_THREAD - EVT_CALL(MakeLerp, 0, 255, 40, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcImgFXParams, NPC_Boo_05, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(NpcMoveTo, NPC_Boo_05, LVar0, LVar2, 40) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + IfGt(LVar0, LVar3) + Add(LVar0, 30) + Else + Sub(LVar0, 30) + EndIf + Thread + Call(MakeLerp, 0, 255, 40, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(SetNpcImgFXParams, NPC_Boo_05, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + EndThread + Call(NpcMoveTo, NPC_Boo_05, LVar0, LVar2, 40) + Return + End }; EvtScript N(80242B0C) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_IF_GT(LVar0, LVar3) - EVT_ADD(LVar0, 60) - EVT_ELSE - EVT_SUB(LVar0, 60) - EVT_END_IF - EVT_THREAD - EVT_CALL(MakeLerp, 255, 0, 40, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcImgFXParams, NPC_Boo_05, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(NpcMoveTo, NPC_Boo_05, LVar0, LVar2, 40) - EVT_CALL(SetNpcPos, NPC_Boo_05, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + IfGt(LVar0, LVar3) + Add(LVar0, 60) + Else + Sub(LVar0, 60) + EndIf + Thread + Call(MakeLerp, 255, 0, 40, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(SetNpcImgFXParams, NPC_Boo_05, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + EndThread + Call(NpcMoveTo, NPC_Boo_05, LVar0, LVar2, 40) + Call(SetNpcPos, NPC_Boo_05, NPC_DISPOSE_LOCATION) + Return + End }; EvtScript N(80242C60) = { - EVT_EXEC_WAIT(N(802429D4)) - EVT_SET(MV_Unk_02, 0) - EVT_SET(MV_Unk_03, 0) - EVT_THREAD - EVT_WAIT(25) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Flail) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Boo_Tan_Cower) - EVT_LOOP(0) - EVT_IF_EQ(MV_Unk_02, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Boo_Tan_Idle) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_Boo_05, ANIM_Boo_Tan_Spook) - EVT_CALL(EndSpeech, NPC_Boo_05, ANIM_Boo_Tan_Spook, ANIM_Boo_Tan_Spook, 5) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_Boo_05, ANIM_Boo_Tan_Idle) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(80242B0C)) - EVT_SET(MV_Unk_02, 1) - EVT_WAIT(15) - EVT_RETURN - EVT_END + ExecWait(N(802429D4)) + Set(MV_Unk_02, 0) + Set(MV_Unk_03, 0) + Thread + Wait(25) + Call(SetPlayerAnimation, ANIM_MarioW2_Flail) + Call(SetNpcAnimation, NPC_SELF, ANIM_Boo_Tan_Cower) + Loop(0) + IfEq(MV_Unk_02, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetNpcAnimation, NPC_SELF, ANIM_Boo_Tan_Idle) + EndThread + Call(SetNpcAnimation, NPC_Boo_05, ANIM_Boo_Tan_Spook) + Call(EndSpeech, NPC_Boo_05, ANIM_Boo_Tan_Spook, ANIM_Boo_Tan_Spook, 5) + Wait(30) + Call(SetNpcAnimation, NPC_Boo_05, ANIM_Boo_Tan_Idle) + Wait(10) + ExecWait(N(80242B0C)) + Set(MV_Unk_02, 1) + Wait(15) + Return + End }; EvtScript N(EVS_NpcInteract_Boo_03) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) - EVT_IF_EQ(AF_ARN_04, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0082) - EVT_SET(AF_ARN_04, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0083) - EVT_SET(AF_ARN_04, FALSE) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0084) - EVT_CASE_LT(STORY_CH3_BEGAN_PEACH_MISSION) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0085) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, -20) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(2.0)) - EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 0) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_SELF, 1) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0086) - EVT_EXEC_WAIT(N(802428CC)) - EVT_CALL(PlayerFaceNpc, NPC_Boo_05, TRUE) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Boo_05, 1) - EVT_CALL(SpeakToPlayer, NPC_Boo_05, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_0087) - EVT_EXEC_WAIT(N(80242C60)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0088) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CASE_GE(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, -20) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(2.0)) - EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 0) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_SELF, 1) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0089) - EVT_EXEC_WAIT(N(802428CC)) - EVT_CALL(PlayerFaceNpc, NPC_Boo_05, TRUE) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Boo_05, 1) - EVT_CALL(SpeakToPlayer, NPC_Boo_05, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_008A) - EVT_EXEC_WAIT(N(80242C60)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_008B) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) + IfEq(AF_ARN_04, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0082) + Set(AF_ARN_04, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0083) + Set(AF_ARN_04, FALSE) + EndIf + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0084) + CaseLt(STORY_CH3_BEGAN_PEACH_MISSION) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0085) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(DisablePartnerAI, 0) + Call(DisablePlayerPhysics, TRUE) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar2, -20) + Call(SetNpcSpeed, NPC_PARTNER, Float(2.0)) + Call(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 0) + Call(NpcFaceNpc, NPC_PARTNER, NPC_SELF, 1) + EndThread + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0086) + ExecWait(N(802428CC)) + Call(PlayerFaceNpc, NPC_Boo_05, TRUE) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Boo_05, 1) + Call(SpeakToPlayer, NPC_Boo_05, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_0087) + ExecWait(N(80242C60)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0088) + Call(DisablePlayerPhysics, FALSE) + Call(EnablePartnerAI) + CaseGe(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(DisablePartnerAI, 0) + Call(DisablePlayerPhysics, TRUE) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar2, -20) + Call(SetNpcSpeed, NPC_PARTNER, Float(2.0)) + Call(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 0) + Call(NpcFaceNpc, NPC_PARTNER, NPC_SELF, 1) + EndThread + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0089) + ExecWait(N(802428CC)) + Call(PlayerFaceNpc, NPC_Boo_05, TRUE) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Boo_05, 1) + Call(SpeakToPlayer, NPC_Boo_05, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_008A) + ExecWait(N(80242C60)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_008B) + Call(DisablePlayerPhysics, FALSE) + Call(EnablePartnerAI) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Boo_03) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Boo_03))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Boo_03))) + Return + End }; EvtScript N(EVS_NpcInteract_Boo_04) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) - EVT_IF_EQ(AF_ARN_05, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_008C) - EVT_SET(AF_ARN_05, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_008D) - EVT_SET(AF_ARN_05, FALSE) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_008E) - EVT_CASE_LT(STORY_CH3_BEGAN_PEACH_MISSION) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_008F) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0090) - EVT_CASE_GE(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0091) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) + IfEq(AF_ARN_05, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_008C) + Set(AF_ARN_05, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_008D) + Set(AF_ARN_05, FALSE) + EndIf + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_008E) + CaseLt(STORY_CH3_BEGAN_PEACH_MISSION) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_008F) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0090) + CaseGe(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0091) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Boo_04) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Boo_04))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Boo_04))) + Return + End }; EvtScript N(EVS_NpcInit_Boo_05) = { - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Return + End }; NpcData N(NpcData_Boo_01) = { @@ -461,55 +461,55 @@ NpcData N(NpcData_Boo_05) = { }; EvtScript N(EVS_NpcIdle_Boo_06) = { - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar0) - EVT_ADD(LVar3, -60) - EVT_SET(LVar4, LVar0) - EVT_ADD(LVar4, 60) - EVT_LOOP(0) - EVT_CALL(RandInt, 5, LVar5) - EVT_SETF(LVar6, LVar5) - EVT_MULF(LVar6, EVT_FLOAT(0.1)) - EVT_ADDF(LVar6, EVT_FLOAT(0.8)) - EVT_CALL(SetNpcSpeed, NPC_SELF, LVar6) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar3, LVar2, 0) - EVT_CALL(RandInt, 5, LVar5) - EVT_SETF(LVar6, LVar5) - EVT_MULF(LVar6, EVT_FLOAT(0.1)) - EVT_ADDF(LVar6, EVT_FLOAT(0.8)) - EVT_CALL(SetNpcSpeed, NPC_SELF, LVar6) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar4, LVar2, 0) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Set(LVar3, LVar0) + Add(LVar3, -60) + Set(LVar4, LVar0) + Add(LVar4, 60) + Loop(0) + Call(RandInt, 5, LVar5) + SetF(LVar6, LVar5) + MulF(LVar6, Float(0.1)) + AddF(LVar6, Float(0.8)) + Call(SetNpcSpeed, NPC_SELF, LVar6) + Call(NpcMoveTo, NPC_SELF, LVar3, LVar2, 0) + Call(RandInt, 5, LVar5) + SetF(LVar6, LVar5) + MulF(LVar6, Float(0.1)) + AddF(LVar6, Float(0.8)) + Call(SetNpcSpeed, NPC_SELF, LVar6) + Call(NpcMoveTo, NPC_SELF, LVar4, LVar2, 0) + EndLoop + Return + End }; EvtScript N(EVS_NpcInit_Boo_06) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Boo_06))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Boo_06))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Boo_07) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Boo_06))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Boo_06))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Boo_08) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Boo_06))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Boo_06))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Boo_09) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Boo_06))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Boo_06))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE) + Return + End }; NpcData N(NpcData_Boo_06)[] = { diff --git a/src/world/area_arn/arn_03/arn_03_4_entity.c b/src/world/area_arn/arn_03/arn_03_4_entity.c index 32e185c7d9b..93a9a3193aa 100644 --- a/src/world/area_arn/arn_03/arn_03_4_entity.c +++ b/src/world/area_arn/arn_03/arn_03_4_entity.c @@ -2,9 +2,9 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 300, 237, 60, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_ARN03_ItemBlock_Coin) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 250, 237, 125, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_YellowBlock), 300, 237, 60, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_ARN03_ItemBlock_Coin) + Call(MakeEntity, Ref(Entity_SavePoint), 250, 237, 125, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_arn/arn_04/arn_04_1_music.c b/src/world/area_arn/arn_04/arn_04_1_music.c index b2389d03fa9..c2c6f0c5fd1 100644 --- a/src/world/area_arn/arn_04/arn_04_1_music.c +++ b/src/world/area_arn/arn_04/arn_04_1_music.c @@ -1,15 +1,15 @@ #include "arn_04.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) - EVT_END_SWITCH - EVT_CALL(PlayAmbientSounds, AMBIENT_WIND) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_WOKE_UP) + Call(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) + EndSwitch + Call(PlayAmbientSounds, AMBIENT_WIND) + Return + End }; diff --git a/src/world/area_arn/arn_04/arn_04_2_main.c b/src/world/area_arn/arn_04/arn_04_2_main.c index b0b7a7e784b..b326bfe3f75 100644 --- a/src/world/area_arn/arn_04/arn_04_2_main.c +++ b/src/world/area_arn/arn_04/arn_04_2_main.c @@ -4,22 +4,22 @@ EvtScript N(EVS_ExitWalk_arn_02_1) = EVT_EXIT_WALK(60, arn_04_ENTRY_0, "arn_02", EvtScript N(EVS_ExitWalk_dgb_00_0) = EVT_EXIT_WALK(60, arn_04_ENTRY_1, "dgb_00", dgb_00_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_arn_02_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_dgb_00_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_arn_02_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_dgb_00_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_GUSTY_GULCH) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_GUSTY_GULCH) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; diff --git a/src/world/area_arn/arn_04/arn_04_4_entity.c b/src/world/area_arn/arn_04/arn_04_4_entity.c index a89cfa132a5..f2a7389ec18 100644 --- a/src/world/area_arn/arn_04/arn_04_4_entity.c +++ b/src/world/area_arn/arn_04/arn_04_4_entity.c @@ -2,13 +2,13 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 450, 285, 120, 0, ITEM_SUPER_SHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_ARN04_ItemBlock_SuperShroom) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 720, 333, 75, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_ARN04_ItemBlock_Coin) - EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), 600, 290, 200, 0, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_ARN04_MultiCoinBrick) - EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 540, 230, 13, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_ARN04_Item_StarPiece) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_YellowBlock), 450, 285, 120, 0, ITEM_SUPER_SHROOM, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_ARN04_ItemBlock_SuperShroom) + Call(MakeEntity, Ref(Entity_YellowBlock), 720, 333, 75, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_ARN04_ItemBlock_Coin) + Call(MakeEntity, Ref(Entity_MulticoinBlock), 600, 290, 200, 0, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_ARN04_MultiCoinBrick) + Call(MakeItemEntity, ITEM_STAR_PIECE, 540, 230, 13, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_ARN04_Item_StarPiece) + Return + End }; diff --git a/src/world/area_arn/arn_05/arn_05_1_music.c b/src/world/area_arn/arn_05/arn_05_1_music.c index 0bb859d6ed9..949cc899b07 100644 --- a/src/world/area_arn/arn_05/arn_05_1_music.c +++ b/src/world/area_arn/arn_05/arn_05_1_music.c @@ -2,17 +2,17 @@ #include "arn_05.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_SAW_TUBBA_EAT_BOO) - EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) - EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) - EVT_END_SWITCH - EVT_CALL(PlayAmbientSounds, AMBIENT_WIND) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_SAW_TUBBA_EAT_BOO) + Call(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) + CaseLt(STORY_CH3_TUBBA_WOKE_UP) + Call(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) + EndSwitch + Call(PlayAmbientSounds, AMBIENT_WIND) + Return + End }; diff --git a/src/world/area_arn/arn_05/arn_05_2_main.c b/src/world/area_arn/arn_05/arn_05_2_main.c index 01432eaeb75..f78ba163c83 100644 --- a/src/world/area_arn/arn_05/arn_05_2_main.c +++ b/src/world/area_arn/arn_05/arn_05_2_main.c @@ -4,39 +4,39 @@ EvtScript N(EVS_ExitWalk_arn_03_1) = EVT_EXIT_WALK(60, arn_05_ENTRY_0, "arn_03", EvtScript N(EVS_ExitWalk_arn_02_0) = EVT_EXIT_WALK(60, arn_05_ENTRY_1, "arn_02", arn_02_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_arn_03_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_arn_02_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_arn_03_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_arn_02_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_GUSTY_GULCH) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_IF_LT(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(BeforeNPCs))) - EVT_ELSE - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(AfterNPCs))) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupTubbaRaid)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_GUSTY_GULCH) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + IfLt(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(MakeNpcs, FALSE, Ref(N(BeforeNPCs))) + Else + Call(MakeNpcs, FALSE, Ref(N(AfterNPCs))) + EndIf + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupTubbaRaid)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_arn/arn_05/arn_05_3_npc.c b/src/world/area_arn/arn_05/arn_05_3_npc.c index c6991c57da1..22281c36090 100644 --- a/src/world/area_arn/arn_05/arn_05_3_npc.c +++ b/src/world/area_arn/arn_05/arn_05_3_npc.c @@ -7,8 +7,8 @@ #include "world/common/npc/Boo.inc.c" EvtScript N(EVS_NpcIdle_Boo_01) = { - EVT_RETURN - EVT_END + Return + End }; API_CALLABLE(N(AwaitCDownPress)) { @@ -22,210 +22,210 @@ API_CALLABLE(N(AwaitCDownPress)) { #include "world/common/todo/SwitchToPartner.inc.c" EvtScript N(EVS_NpcInteract_Boo_01) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) - EVT_IF_EQ(AF_ARN_06, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0092) - EVT_SET(AF_ARN_06, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0093) - EVT_SET(AF_ARN_06, FALSE) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0095) - EVT_CASE_LT(STORY_CH3_BEGAN_PEACH_MISSION) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0096) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0097) - EVT_CASE_GE(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0098) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) + IfEq(AF_ARN_06, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0092) + Set(AF_ARN_06, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0093) + Set(AF_ARN_06, FALSE) + EndIf + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0095) + CaseLt(STORY_CH3_BEGAN_PEACH_MISSION) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0096) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0097) + CaseGe(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0098) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Boo_01_Mourning) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0094) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0094) + Return + End }; EvtScript N(EVS_NpcInteract_Boo_02) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) - EVT_IF_EQ(AF_ARN_07, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0099) - EVT_SET(AF_ARN_07, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_009A) - EVT_SET(AF_ARN_07, FALSE) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_009C) - EVT_CASE_LT(STORY_CH3_BEGAN_PEACH_MISSION) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_009D) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_009E) - EVT_CASE_GE(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_009F) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) + IfEq(AF_ARN_07, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0099) + Set(AF_ARN_07, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_009A) + Set(AF_ARN_07, FALSE) + EndIf + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_009C) + CaseLt(STORY_CH3_BEGAN_PEACH_MISSION) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_009D) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_009E) + CaseGe(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_009F) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Boo_02_Mourning) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_009B) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_009B) + Return + End }; EvtScript N(EVS_NpcInteract_Boo_03) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CASE_LT(STORY_CH3_BEGAN_PEACH_MISSION) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00A9) - EVT_CASE_GE(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_ARN05_GaveGiftAdvice, TRUE) - EVT_IF_EQ(AF_ARN_09, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Wave, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00AE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B0) - EVT_END_IF - EVT_ELSE - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Boo_Tan_Conceal) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Conceal, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00AA) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Boo_Tan_Cower) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Boo_Tan_Cower, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00AB) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Boo_Tan_Confused) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Boo_Tan_Confused, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00AC) - EVT_CALL(ShowChoice, MSG_Choice_001E) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Boo_Tan_Wave) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Boo_Tan_Wave, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00AD) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Boo_Tan_Idle) - EVT_SET(GF_ARN05_GaveGiftAdvice, TRUE) - EVT_SET(AF_ARN_09, TRUE) - EVT_CASE_EQ(1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Boo_Tan_Wave) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Boo_Tan_Wave, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00AD) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Boo_Tan_Idle) - EVT_SET(GF_ARN05_GaveGiftAdvice, TRUE) - EVT_SET(AF_ARN_09, TRUE) - EVT_CASE_EQ(2) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00AF) - EVT_END_SWITCH - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + CaseLt(STORY_CH3_BEGAN_PEACH_MISSION) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00A9) + CaseGe(STORY_CH5_STAR_SPRIT_DEPARTED) + IfEq(GF_ARN05_GaveGiftAdvice, TRUE) + IfEq(AF_ARN_09, TRUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Wave, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00AE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B0) + EndIf + Else + Call(SetNpcAnimation, NPC_SELF, ANIM_Boo_Tan_Conceal) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Conceal, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00AA) + Call(SetNpcAnimation, NPC_SELF, ANIM_Boo_Tan_Cower) + Call(ContinueSpeech, NPC_SELF, ANIM_Boo_Tan_Cower, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00AB) + Call(SetNpcAnimation, NPC_SELF, ANIM_Boo_Tan_Confused) + Call(ContinueSpeech, NPC_SELF, ANIM_Boo_Tan_Confused, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00AC) + Call(ShowChoice, MSG_Choice_001E) + Switch(LVar0) + CaseEq(0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Boo_Tan_Wave) + Call(ContinueSpeech, NPC_SELF, ANIM_Boo_Tan_Wave, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00AD) + Call(SetNpcAnimation, NPC_SELF, ANIM_Boo_Tan_Idle) + Set(GF_ARN05_GaveGiftAdvice, TRUE) + Set(AF_ARN_09, TRUE) + CaseEq(1) + Call(SetNpcAnimation, NPC_SELF, ANIM_Boo_Tan_Wave) + Call(ContinueSpeech, NPC_SELF, ANIM_Boo_Tan_Wave, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00AD) + Call(SetNpcAnimation, NPC_SELF, ANIM_Boo_Tan_Idle) + Set(GF_ARN05_GaveGiftAdvice, TRUE) + Set(AF_ARN_09, TRUE) + CaseEq(2) + Call(ContinueSpeech, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00AF) + EndSwitch + EndIf + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Boo_04) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CASE_LT(STORY_CH3_BEGAN_PEACH_MISSION) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B1) - EVT_CASE_GE(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B2) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + CaseLt(STORY_CH3_BEGAN_PEACH_MISSION) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B1) + CaseGe(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B2) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Boo_05) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) - EVT_IF_EQ(AF_ARN_08, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B3) - EVT_SET(AF_ARN_08, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B4) - EVT_SET(AF_ARN_08, FALSE) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B6) - EVT_CASE_LT(STORY_CH3_BEGAN_PEACH_MISSION) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B7) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B8) - EVT_CASE_GE(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B9) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) + IfEq(AF_ARN_08, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B3) + Set(AF_ARN_08, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B4) + Set(AF_ARN_08, FALSE) + EndIf + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B6) + CaseLt(STORY_CH3_BEGAN_PEACH_MISSION) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B7) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B8) + CaseGe(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B9) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Boo_05_Mourning) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B5) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B5) + Return + End }; EvtScript N(EVS_NpcInit_Boo_01) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH3_SAW_TUBBA_EAT_BOO) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Boo_01))) - EVT_END_IF - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Boo_01))) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH3_SAW_TUBBA_EAT_BOO) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Boo_01))) + EndIf + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Boo_01))) + Return + End }; EvtScript N(EVS_NpcInit_Boo_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Boo_02))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Boo_02))) + Return + End }; EvtScript N(EVS_NpcInit_Boo_03) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Boo_03))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_SAW_TUBBA_EAT_BOO) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CASE_LT(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_CASE_LT(STORY_CH3_BEGAN_PEACH_MISSION) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CASE_GE(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Boo_03))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_SAW_TUBBA_EAT_BOO) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + CaseLt(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) + Call(RemoveNpc, NPC_SELF) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(RemoveNpc, NPC_SELF) + CaseLt(STORY_CH3_BEGAN_PEACH_MISSION) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(RemoveNpc, NPC_SELF) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + CaseGe(STORY_CH5_STAR_SPRIT_DEPARTED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Boo_04) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Boo_04))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_SAW_TUBBA_EAT_BOO) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_CASE_LT(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_CASE_LT(STORY_CH3_BEGAN_PEACH_MISSION) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CASE_GE(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Boo_04))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_SAW_TUBBA_EAT_BOO) + Call(RemoveNpc, NPC_SELF) + CaseLt(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) + Call(RemoveNpc, NPC_SELF) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(RemoveNpc, NPC_SELF) + CaseLt(STORY_CH3_BEGAN_PEACH_MISSION) + Call(RemoveNpc, NPC_SELF) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + CaseGe(STORY_CH5_STAR_SPRIT_DEPARTED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Boo_05) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH3_SAW_TUBBA_EAT_BOO) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Boo_01))) - EVT_END_IF - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Boo_05))) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH3_SAW_TUBBA_EAT_BOO) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Boo_01))) + EndIf + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Boo_05))) + Return + End }; NpcData N(NpcData_Boo_01)[] = { @@ -315,313 +315,313 @@ NpcData N(NpcData_Boo_01)[] = { }; EvtScript N(EVS_TubbaWalking) = { - EVT_LOOP(LVar0) - EVT_CALL(PlaySoundAtNpc, NPC_Tubba, SOUND_HEAVY_NPC_STEP_C, SOUND_SPACE_DEFAULT) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(0.5)) - EVT_WAIT(5) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(LVar0) + Call(PlaySoundAtNpc, NPC_Tubba, SOUND_HEAVY_NPC_STEP_C, SOUND_SPACE_DEFAULT) + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(0.5)) + Wait(5) + EndLoop + Return + End }; EvtScript N(EVS_Scene_TubbaRaid) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(NpcFacePlayer, NPC_Boo_03, 1) - EVT_CALL(PlaySoundAtNpc, NPC_Boo_03, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_Boo_03, EMOTE_EXCLAMATION, -45, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(20 * DT) - EVT_CALL(GetNpcPos, NPC_Boo_03, LVar0, LVar1, LVar2) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_SUB(LVar0, LVar3) - EVT_SUB(LVar0, 50) - EVT_SUB(LVar1, LVar4) - EVT_SUB(LVar2, LVar5) - EVT_CALL(GetNpcPos, NPC_Boo_03, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, LVar0) - EVT_SUB(LVar4, LVar1) - EVT_SUB(LVar5, LVar2) - EVT_CALL(NpcMoveTo, NPC_Boo_03, LVar3, LVar5, 30) - EVT_CALL(SetCamType, CAM_DEFAULT, 6, TRUE) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0 / DT)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Boo_03, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00A0) - EVT_CALL(PlaySoundAt, SOUND_HEAVY_NPC_STEP_C, SOUND_SPACE_DEFAULT, 450, 200, 160) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(0.8)) - EVT_CALL(PlaySoundAtNpc, NPC_Boo_01, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAtNpc, NPC_Boo_02, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAtNpc, NPC_Boo_03, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAtNpc, NPC_Boo_05, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_Boo_01, EMOTE_EXCLAMATION, -45, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(ShowEmote, NPC_Boo_02, EMOTE_EXCLAMATION, -45, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(ShowEmote, NPC_Boo_03, EMOTE_EXCLAMATION, -45, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(ShowEmote, NPC_Boo_05, EMOTE_EXCLAMATION, -45, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(FadeOutMusic, 0, 500) - EVT_CALL(ClearAmbientSounds, 250) - EVT_WAIT(20 * DT) - EVT_CALL(InterpNpcYaw, NPC_Boo_03, 90, 1) - EVT_CALL(InterpNpcYaw, NPC_Boo_05, 90, 1) - EVT_WAIT(20 * DT) - EVT_CALL(PlaySound, SOUND_BOO_APPEAR_A) - EVT_SETF(LVar0, EVT_FLOAT(240.0)) - EVT_LOOP(20 * DT) - EVT_SUBF(LVar0, EVT_FLOAT(240.0 / (s32) (20 * DT))) - EVT_CALL(SetNpcImgFXParams, NPC_Boo_01, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Boo_02, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Boo_05, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_Boo_01, 420, 300, 220) - EVT_CALL(SetNpcPos, NPC_Boo_02, 460, 250, 210) - EVT_CALL(SetNpcPos, NPC_Boo_05, NPC_DISPOSE_LOCATION) - EVT_CALL(EnableNpcShadow, NPC_Boo_01, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Boo_02, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Boo_05, FALSE) - EVT_CALL(PlaySound, SOUND_BOO_VANISH_A) - EVT_SETF(LVar0, EVT_FLOAT(0.0)) - EVT_LOOP(20 * DT) - EVT_ADDF(LVar0, EVT_FLOAT(240.0 / (s32) (20 * DT))) - EVT_CALL(SetNpcImgFXParams, NPC_Boo_01, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Boo_02, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SpeakToPlayer, NPC_Boo_03, ANIM_Boo_Tan_Flail, ANIM_Boo_Tan_Flail, 0, MSG_CH3_00A1) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_NE(LVar0, PARTNER_BOW) - EVT_CALL(N(SwitchToPartner), PARTNER_BOW) - EVT_THREAD - EVT_SET(MV_Unk_00, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH3_00A2, 160, 40) - EVT_SET(MV_Unk_00, 1) - EVT_END_THREAD - EVT_WAIT(50 * DT) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 90) - EVT_CALL(EnablePartnerAI) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_EQ(MV_Unk_00, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_00A3) - EVT_CALL(EnablePartnerAI) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_WAIT(5 * DT) - EVT_CALL(N(AwaitCDownPress)) - EVT_CALL(CloseMessage) - EVT_CALL(ForceUsePartner) - EVT_WAIT(60 * DT) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 1, 8) - EVT_CALL(SetCamType, CAM_DEFAULT, 6, TRUE) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-11.5)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -40, 206) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 530, 206) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 426, 190, 194) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcFlagBits, NPC_Tubba, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcSpeed, NPC_Tubba, EVT_FLOAT(2.5 / DT)) - EVT_CALL(SetNpcPos, NPC_Tubba, 675, 200, 180) - EVT_CALL(NpcFaceNpc, NPC_Boo_01, NPC_Tubba, 1) - EVT_CALL(NpcFaceNpc, NPC_Boo_02, NPC_Tubba, 1) - EVT_CALL(SetNpcPos, NPC_Boo_03, 272, 190, 214) - EVT_CALL(PlaySoundAtNpc, NPC_Boo_01, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAtNpc, NPC_Boo_02, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_Boo_01, EMOTE_EXCLAMATION, 45, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(ShowEmote, NPC_Boo_02, EMOTE_EXCLAMATION, 45, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_THREAD - EVT_CALL(PlaySound, SOUND_BOO_APPEAR_A) - EVT_WAIT(20 * DT) - EVT_SETF(LVar0, EVT_FLOAT(240.0)) - EVT_LOOP(20 * DT) - EVT_SUBF(LVar0, EVT_FLOAT(240.0 / (s32) (20 * DT))) - EVT_CALL(SetNpcImgFXParams, NPC_Boo_01, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Boo_02, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_Boo_01, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_Boo_02, NPC_DISPOSE_LOCATION) - EVT_WAIT(10 * DT) - EVT_END_THREAD - EVT_SET(LVar0, 4) - EVT_EXEC(N(EVS_TubbaWalking)) - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim09) - EVT_CALL(NpcMoveTo, NPC_Tubba, 550, 196, 0) - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim06) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-11.5)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 375) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -40, 206) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 530, 206) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 426, 190, 194) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(30 * DT) - EVT_SET(MV_Unk_01, 0) - EVT_THREAD - EVT_SET(LVar0, 7) - EVT_EXEC(N(EVS_TubbaWalking)) - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim09) - EVT_CALL(NpcMoveTo, NPC_Tubba, 370, 220, 0) - EVT_CALL(GetNpcPos, NPC_Boo_03, LVar0, LVar1, LVar2) - EVT_CALL(NpcMoveTo, NPC_Tubba, 330, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim06) - EVT_SET(MV_Unk_01, 1) - EVT_END_THREAD - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-11.5)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 375) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -40, 206) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 530, 206) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 240, 169, 206) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Boo_03, ANIM_Boo_Tan_Flail, ANIM_Boo_Tan_Flail, 0, MSG_CH3_00A4) - EVT_WAIT(15 * DT) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_EQ(MV_Unk_01, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(NpcFaceNpc, NPC_Boo_03, NPC_Tubba, 1) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToPlayer, NPC_Boo_03, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_00A5) - EVT_CALL(SetNpcAnimation, NPC_Boo_03, ANIM_Boo_Tan_Cower) - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim1E) - EVT_CALL(SetNpcJumpscale, NPC_Boo_03, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump1, NPC_Boo_03, 265, 206, 212, 3 * DT) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_Tubba, ANIM_WorldTubba_Anim1E, ANIM_WorldTubba_Anim1E, 5, MSG_CH3_00A6) - EVT_CALL(SetNpcPos, NPC_Boo_03, 303, 237, 228) - EVT_CALL(SetNpcAnimation, NPC_Boo_03, ANIM_Boo_Tan_Flail) - EVT_CALL(EnableNpcShadow, NPC_Boo_03, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim1F) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0 / DT)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-17.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -40, 206) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 530, 206) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 280, 169, 206) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_WAIT(50 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Tubba, SOUND_TUBBA_GULP, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_WAIT(40 * DT) - EVT_CALL(SetNpcPos, NPC_Boo_03, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim20) - EVT_WAIT(80 * DT) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-11.5)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 375) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -40, 206) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 530, 206) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 240, 169, 206) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim06) - EVT_WAIT(15 * DT) - EVT_CALL(SpeakToPlayer, NPC_Tubba, ANIM_WorldTubba_Anim21, ANIM_WorldTubba_Anim06, 5, MSG_CH3_00A7) - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim21) - EVT_CALL(GetNpcPos, NPC_Tubba, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -50) - EVT_ADD(LVar1, 50) - EVT_ADD(LVar2, 10) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, LVar0, LVar1, LVar2, 10) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim06) - EVT_CALL(InterpNpcYaw, NPC_Tubba, 90, 1) - EVT_WAIT(30 * DT) - EVT_SET(LVar0, 7) - EVT_EXEC(N(EVS_TubbaWalking)) - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim09) - EVT_CALL(NpcMoveTo, NPC_Tubba, 370, 220, 0) - EVT_CALL(NpcMoveTo, NPC_Tubba, 550, 196, 0) - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim06) - EVT_CALL(SetNpcPos, NPC_Tubba, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_Tubba, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(NpcFacePlayer, NPC_Boo_01, 3) - EVT_CALL(SetNpcPos, NPC_Boo_01, 55, 195, 160) - EVT_CALL(SetNpcPos, NPC_Boo_02, 160, 191, 250) - EVT_CALL(SetNpcPos, NPC_Boo_05, 350, 185, 197) - EVT_CALL(EnableNpcShadow, NPC_Boo_01, TRUE) - EVT_CALL(EnableNpcShadow, NPC_Boo_02, TRUE) - EVT_CALL(EnableNpcShadow, NPC_Boo_05, TRUE) - EVT_CALL(PlaySound, SOUND_BOO_VANISH_A) - EVT_SETF(LVar0, EVT_FLOAT(0.0)) - EVT_LOOP(20 * DT) - EVT_ADDF(LVar0, EVT_FLOAT(250.0 / (s32) (20 * DT))) - EVT_CALL(SetNpcImgFXParams, NPC_Boo_01, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Boo_02, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Boo_05, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcImgFXParams, NPC_Boo_01, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Boo_02, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Boo_05, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_WAIT(10 * DT) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SpeakToPlayer, NPC_Boo_05, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_00A8) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(NpcFacePlayer, NPC_Boo_03, 1) + Call(PlaySoundAtNpc, NPC_Boo_03, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_Boo_03, EMOTE_EXCLAMATION, -45, 20, EMOTER_NPC, 0, 0, 0, 0) + Wait(20 * DT) + Call(GetNpcPos, NPC_Boo_03, LVar0, LVar1, LVar2) + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Sub(LVar0, LVar3) + Sub(LVar0, 50) + Sub(LVar1, LVar4) + Sub(LVar2, LVar5) + Call(GetNpcPos, NPC_Boo_03, LVar3, LVar4, LVar5) + Sub(LVar3, LVar0) + Sub(LVar4, LVar1) + Sub(LVar5, LVar2) + Call(NpcMoveTo, NPC_Boo_03, LVar3, LVar5, 30) + Call(SetCamType, CAM_DEFAULT, 6, TRUE) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0 / DT)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Boo_03, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00A0) + Call(PlaySoundAt, SOUND_HEAVY_NPC_STEP_C, SOUND_SPACE_DEFAULT, 450, 200, 160) + Call(ShakeCam, CAM_DEFAULT, 0, 20, Float(0.8)) + Call(PlaySoundAtNpc, NPC_Boo_01, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(PlaySoundAtNpc, NPC_Boo_02, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(PlaySoundAtNpc, NPC_Boo_03, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(PlaySoundAtNpc, NPC_Boo_05, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_Boo_01, EMOTE_EXCLAMATION, -45, 20, EMOTER_NPC, 0, 0, 0, 0) + Call(ShowEmote, NPC_Boo_02, EMOTE_EXCLAMATION, -45, 20, EMOTER_NPC, 0, 0, 0, 0) + Call(ShowEmote, NPC_Boo_03, EMOTE_EXCLAMATION, -45, 20, EMOTER_NPC, 0, 0, 0, 0) + Call(ShowEmote, NPC_Boo_05, EMOTE_EXCLAMATION, -45, 20, EMOTER_NPC, 0, 0, 0, 0) + Call(FadeOutMusic, 0, 500) + Call(ClearAmbientSounds, 250) + Wait(20 * DT) + Call(InterpNpcYaw, NPC_Boo_03, 90, 1) + Call(InterpNpcYaw, NPC_Boo_05, 90, 1) + Wait(20 * DT) + Call(PlaySound, SOUND_BOO_APPEAR_A) + SetF(LVar0, Float(240.0)) + Loop(20 * DT) + SubF(LVar0, Float(240.0 / (s32) (20 * DT))) + Call(SetNpcImgFXParams, NPC_Boo_01, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Boo_02, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Boo_05, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + EndLoop + Call(SetNpcPos, NPC_Boo_01, 420, 300, 220) + Call(SetNpcPos, NPC_Boo_02, 460, 250, 210) + Call(SetNpcPos, NPC_Boo_05, NPC_DISPOSE_LOCATION) + Call(EnableNpcShadow, NPC_Boo_01, FALSE) + Call(EnableNpcShadow, NPC_Boo_02, FALSE) + Call(EnableNpcShadow, NPC_Boo_05, FALSE) + Call(PlaySound, SOUND_BOO_VANISH_A) + SetF(LVar0, Float(0.0)) + Loop(20 * DT) + AddF(LVar0, Float(240.0 / (s32) (20 * DT))) + Call(SetNpcImgFXParams, NPC_Boo_01, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Boo_02, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + EndLoop + Call(SpeakToPlayer, NPC_Boo_03, ANIM_Boo_Tan_Flail, ANIM_Boo_Tan_Flail, 0, MSG_CH3_00A1) + Call(GetCurrentPartnerID, LVar0) + IfNe(LVar0, PARTNER_BOW) + Call(N(SwitchToPartner), PARTNER_BOW) + Thread + Set(MV_Unk_00, 0) + Call(ShowMessageAtScreenPos, MSG_CH3_00A2, 160, 40) + Set(MV_Unk_00, 1) + EndThread + Wait(50 * DT) + Call(DisablePartnerAI, 0) + Call(SetNpcYaw, NPC_PARTNER, 90) + Call(EnablePartnerAI) + Loop(0) + Wait(1) + IfEq(MV_Unk_00, 1) + BreakLoop + EndIf + EndLoop + EndIf + Call(DisablePartnerAI, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_00A3) + Call(EnablePartnerAI) + Call(InterpPlayerYaw, 90, 0) + Wait(5 * DT) + Call(N(AwaitCDownPress)) + Call(CloseMessage) + Call(ForceUsePartner) + Wait(60 * DT) + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 1, 8) + Call(SetCamType, CAM_DEFAULT, 6, TRUE) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-11.5)) + Call(SetCamDistance, CAM_DEFAULT, 450) + Call(SetCamPosA, CAM_DEFAULT, -40, 206) + Call(SetCamPosB, CAM_DEFAULT, 530, 206) + Call(SetCamPosC, CAM_DEFAULT, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 426, 190, 194) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetNpcFlagBits, NPC_Tubba, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcSpeed, NPC_Tubba, Float(2.5 / DT)) + Call(SetNpcPos, NPC_Tubba, 675, 200, 180) + Call(NpcFaceNpc, NPC_Boo_01, NPC_Tubba, 1) + Call(NpcFaceNpc, NPC_Boo_02, NPC_Tubba, 1) + Call(SetNpcPos, NPC_Boo_03, 272, 190, 214) + Call(PlaySoundAtNpc, NPC_Boo_01, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(PlaySoundAtNpc, NPC_Boo_02, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_Boo_01, EMOTE_EXCLAMATION, 45, 20, EMOTER_NPC, 0, 0, 0, 0) + Call(ShowEmote, NPC_Boo_02, EMOTE_EXCLAMATION, 45, 20, EMOTER_NPC, 0, 0, 0, 0) + Thread + Call(PlaySound, SOUND_BOO_APPEAR_A) + Wait(20 * DT) + SetF(LVar0, Float(240.0)) + Loop(20 * DT) + SubF(LVar0, Float(240.0 / (s32) (20 * DT))) + Call(SetNpcImgFXParams, NPC_Boo_01, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Boo_02, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + EndLoop + Call(SetNpcPos, NPC_Boo_01, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_Boo_02, NPC_DISPOSE_LOCATION) + Wait(10 * DT) + EndThread + Set(LVar0, 4) + Exec(N(EVS_TubbaWalking)) + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim09) + Call(NpcMoveTo, NPC_Tubba, 550, 196, 0) + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim06) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-11.5)) + Call(SetCamDistance, CAM_DEFAULT, 375) + Call(SetCamPosA, CAM_DEFAULT, -40, 206) + Call(SetCamPosB, CAM_DEFAULT, 530, 206) + Call(SetCamPosC, CAM_DEFAULT, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 426, 190, 194) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(30 * DT) + Set(MV_Unk_01, 0) + Thread + Set(LVar0, 7) + Exec(N(EVS_TubbaWalking)) + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim09) + Call(NpcMoveTo, NPC_Tubba, 370, 220, 0) + Call(GetNpcPos, NPC_Boo_03, LVar0, LVar1, LVar2) + Call(NpcMoveTo, NPC_Tubba, 330, LVar2, 0) + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim06) + Set(MV_Unk_01, 1) + EndThread + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-11.5)) + Call(SetCamDistance, CAM_DEFAULT, 375) + Call(SetCamPosA, CAM_DEFAULT, -40, 206) + Call(SetCamPosB, CAM_DEFAULT, 530, 206) + Call(SetCamPosC, CAM_DEFAULT, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 240, 169, 206) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Boo_03, ANIM_Boo_Tan_Flail, ANIM_Boo_Tan_Flail, 0, MSG_CH3_00A4) + Wait(15 * DT) + Loop(0) + Wait(1) + IfEq(MV_Unk_01, 1) + BreakLoop + EndIf + EndLoop + Call(NpcFaceNpc, NPC_Boo_03, NPC_Tubba, 1) + Wait(30 * DT) + Call(SpeakToPlayer, NPC_Boo_03, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_00A5) + Call(SetNpcAnimation, NPC_Boo_03, ANIM_Boo_Tan_Cower) + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim1E) + Call(SetNpcJumpscale, NPC_Boo_03, Float(0.0)) + Call(NpcJump1, NPC_Boo_03, 265, 206, 212, 3 * DT) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_Tubba, ANIM_WorldTubba_Anim1E, ANIM_WorldTubba_Anim1E, 5, MSG_CH3_00A6) + Call(SetNpcPos, NPC_Boo_03, 303, 237, 228) + Call(SetNpcAnimation, NPC_Boo_03, ANIM_Boo_Tan_Flail) + Call(EnableNpcShadow, NPC_Boo_03, FALSE) + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim1F) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0 / DT)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-17.0)) + Call(SetCamDistance, CAM_DEFAULT, 250) + Call(SetCamPosA, CAM_DEFAULT, -40, 206) + Call(SetCamPosB, CAM_DEFAULT, 530, 206) + Call(SetCamPosC, CAM_DEFAULT, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 280, 169, 206) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Wait(50 * DT) + Call(PlaySoundAtNpc, NPC_Tubba, SOUND_TUBBA_GULP, SOUND_SPACE_DEFAULT) + EndThread + Wait(40 * DT) + Call(SetNpcPos, NPC_Boo_03, NPC_DISPOSE_LOCATION) + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim20) + Wait(80 * DT) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-11.5)) + Call(SetCamDistance, CAM_DEFAULT, 375) + Call(SetCamPosA, CAM_DEFAULT, -40, 206) + Call(SetCamPosB, CAM_DEFAULT, 530, 206) + Call(SetCamPosC, CAM_DEFAULT, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 240, 169, 206) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim06) + Wait(15 * DT) + Call(SpeakToPlayer, NPC_Tubba, ANIM_WorldTubba_Anim21, ANIM_WorldTubba_Anim06, 5, MSG_CH3_00A7) + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim21) + Call(GetNpcPos, NPC_Tubba, LVar0, LVar1, LVar2) + Add(LVar0, -50) + Add(LVar1, 50) + Add(LVar2, 10) + PlayEffect(EFFECT_LANDING_DUST, 1, LVar0, LVar1, LVar2, 10) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim06) + Call(InterpNpcYaw, NPC_Tubba, 90, 1) + Wait(30 * DT) + Set(LVar0, 7) + Exec(N(EVS_TubbaWalking)) + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim09) + Call(NpcMoveTo, NPC_Tubba, 370, 220, 0) + Call(NpcMoveTo, NPC_Tubba, 550, 196, 0) + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim06) + Call(SetNpcPos, NPC_Tubba, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_Tubba, NPC_FLAG_GRAVITY, FALSE) + Call(NpcFacePlayer, NPC_Boo_01, 3) + Call(SetNpcPos, NPC_Boo_01, 55, 195, 160) + Call(SetNpcPos, NPC_Boo_02, 160, 191, 250) + Call(SetNpcPos, NPC_Boo_05, 350, 185, 197) + Call(EnableNpcShadow, NPC_Boo_01, TRUE) + Call(EnableNpcShadow, NPC_Boo_02, TRUE) + Call(EnableNpcShadow, NPC_Boo_05, TRUE) + Call(PlaySound, SOUND_BOO_VANISH_A) + SetF(LVar0, Float(0.0)) + Loop(20 * DT) + AddF(LVar0, Float(250.0 / (s32) (20 * DT))) + Call(SetNpcImgFXParams, NPC_Boo_01, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Boo_02, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Boo_05, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + EndLoop + Call(SetNpcImgFXParams, NPC_Boo_01, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Boo_02, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Boo_05, IMGFX_CLEAR, 0, 0, 0, 0) + Wait(10 * DT) + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SpeakToPlayer, NPC_Boo_05, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_00A8) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SetupTubbaRaid) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH3_SAW_TUBBA_EAT_BOO) - EVT_CALL(SetNpcPos, NPC_Boo_03, 330, 184, 240) - EVT_LOOP(0) - EVT_SET(LVarA, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GE(LVar2, 110) - EVT_IF_GE(LVar0, 220) - EVT_SET(LVarA, 1) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVarA, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(InterruptUsePartner) - EVT_EXEC_WAIT(N(EVS_Scene_TubbaRaid)) - EVT_CALL(BindNpcInteract, NPC_Boo_01, EVT_PTR(N(EVS_NpcInteract_Boo_01_Mourning))) - EVT_CALL(BindNpcInteract, NPC_Boo_02, EVT_PTR(N(EVS_NpcInteract_Boo_02_Mourning))) - EVT_CALL(BindNpcInteract, NPC_Boo_05, EVT_PTR(N(EVS_NpcInteract_Boo_05_Mourning))) - EVT_SET(GB_StoryProgress, STORY_CH3_SAW_TUBBA_EAT_BOO) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH3_SAW_TUBBA_EAT_BOO) + Call(SetNpcPos, NPC_Boo_03, 330, 184, 240) + Loop(0) + Set(LVarA, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGe(LVar2, 110) + IfGe(LVar0, 220) + Set(LVarA, 1) + EndIf + EndIf + IfEq(LVarA, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(InterruptUsePartner) + ExecWait(N(EVS_Scene_TubbaRaid)) + Call(BindNpcInteract, NPC_Boo_01, Ref(N(EVS_NpcInteract_Boo_01_Mourning))) + Call(BindNpcInteract, NPC_Boo_02, Ref(N(EVS_NpcInteract_Boo_02_Mourning))) + Call(BindNpcInteract, NPC_Boo_05, Ref(N(EVS_NpcInteract_Boo_05_Mourning))) + Set(GB_StoryProgress, STORY_CH3_SAW_TUBBA_EAT_BOO) + Exec(N(EVS_SetupMusic)) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Tubba) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH3_SAW_TUBBA_EAT_BOO) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH3_SAW_TUBBA_EAT_BOO) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; AnimID N(ExtraAnims_Tubba)[] = { @@ -647,55 +647,55 @@ NpcData N(NpcData_Tubba) = { }; EvtScript N(EVS_NpcIdle_Boo_06) = { - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar0) - EVT_ADD(LVar3, -60) - EVT_SET(LVar4, LVar0) - EVT_ADD(LVar4, 60) - EVT_LOOP(0) - EVT_CALL(RandInt, 5, LVar5) - EVT_SETF(LVar6, LVar5) - EVT_MULF(LVar6, EVT_FLOAT(0.1)) - EVT_ADDF(LVar6, EVT_FLOAT(0.8)) - EVT_CALL(SetNpcSpeed, NPC_SELF, LVar6) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar3, LVar2, 0) - EVT_CALL(RandInt, 5, LVar5) - EVT_SETF(LVar6, LVar5) - EVT_MULF(LVar6, EVT_FLOAT(0.1)) - EVT_ADDF(LVar6, EVT_FLOAT(0.8)) - EVT_CALL(SetNpcSpeed, NPC_SELF, LVar6) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar4, LVar2, 0) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Set(LVar3, LVar0) + Add(LVar3, -60) + Set(LVar4, LVar0) + Add(LVar4, 60) + Loop(0) + Call(RandInt, 5, LVar5) + SetF(LVar6, LVar5) + MulF(LVar6, Float(0.1)) + AddF(LVar6, Float(0.8)) + Call(SetNpcSpeed, NPC_SELF, LVar6) + Call(NpcMoveTo, NPC_SELF, LVar3, LVar2, 0) + Call(RandInt, 5, LVar5) + SetF(LVar6, LVar5) + MulF(LVar6, Float(0.1)) + AddF(LVar6, Float(0.8)) + Call(SetNpcSpeed, NPC_SELF, LVar6) + Call(NpcMoveTo, NPC_SELF, LVar4, LVar2, 0) + EndLoop + Return + End }; EvtScript N(EVS_NpcInit_Boo_06) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Boo_06))) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Boo_06))) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Boo_07) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Boo_06))) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Boo_06))) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Boo_08) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Boo_06))) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Boo_06))) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Boo_09) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Boo_06))) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Boo_06))) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Return + End }; NpcData N(NpcData_Boo_06)[] = { diff --git a/src/world/area_arn/arn_05/arn_05_4_entity.c b/src/world/area_arn/arn_05/arn_05_4_entity.c index beb3a68fd3b..1c977ae147c 100644 --- a/src/world/area_arn/arn_05/arn_05_4_entity.c +++ b/src/world/area_arn/arn_05/arn_05_4_entity.c @@ -2,7 +2,7 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), 17, 238, 80, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HeartBlock), 17, 238, 80, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_arn/arn_07/arn_07_1_music.c b/src/world/area_arn/arn_07/arn_07_1_music.c index 43668d65edb..2830dd4ef94 100644 --- a/src/world/area_arn/arn_07/arn_07_1_music.c +++ b/src/world/area_arn/arn_07/arn_07_1_music.c @@ -1,22 +1,22 @@ #include "arn_07.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_WIND) - EVT_CASE_LT(STORY_CH3_HEART_ESCAPED_WINDY_MILL) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_WIND) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_WIND) - EVT_CASE_EQ(STORY_CH3_BEGAN_PEACH_MISSION) - EVT_CALL(SetMusicTrack, 0, SONG_STAR_SPIRIT_THEME, 1, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_WIND) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_WOKE_UP) + Call(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) + Call(PlayAmbientSounds, AMBIENT_WIND) + CaseLt(STORY_CH3_HEART_ESCAPED_WINDY_MILL) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + Call(PlayAmbientSounds, AMBIENT_WIND) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8) + Call(PlayAmbientSounds, AMBIENT_WIND) + CaseEq(STORY_CH3_BEGAN_PEACH_MISSION) + Call(SetMusicTrack, 0, SONG_STAR_SPIRIT_THEME, 1, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) + Call(PlayAmbientSounds, AMBIENT_WIND) + EndSwitch + Return + End }; diff --git a/src/world/area_arn/arn_07/arn_07_2_main.c b/src/world/area_arn/arn_07/arn_07_2_main.c index f89652d2981..1cd712bbedf 100644 --- a/src/world/area_arn/arn_07/arn_07_2_main.c +++ b/src/world/area_arn/arn_07/arn_07_2_main.c @@ -10,128 +10,128 @@ s32 N(KeyList)[] = { }; EvtScript N(EVS_SpawnStarCard) = { - EVT_CALL(FadeOutMusic, 0, 1000) - EVT_SET(LVar0, 0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 145, 65, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.6)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 145, 30, 0) + Call(FadeOutMusic, 0, 1000) + Set(LVar0, 0) + IfEq(LVar0, 0) + Call(DisablePlayerInput, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, 145, 65, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.6)) + Call(SetPanTarget, CAM_DEFAULT, 145, 30, 0) EVT_SPIRIT_ADJUST_CAM(10000) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(N(StarSpiritEffectFunc2), 2, 50, 100, 31, -6, 145, 65, 0, 30, 0) - EVT_THREAD - EVT_CALL(N(StarSpiritEffectFunc3)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(PlaySound, SOUND_LOOP_STAR_ORB_RISING) - EVT_CALL(N(StarSpiritEffectFunc1)) - EVT_CALL(StopSound, SOUND_LOOP_STAR_ORB_RISING) - EVT_CALL(PlaySoundAt, SOUND_STAR_ORB_BURST, SOUND_SPACE_DEFAULT, 145, 65, 0) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(12) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(50) - EVT_WAIT(115) - EVT_CALL(PlaySoundAt, SOUND_STAR_CARD_APPEARS, SOUND_SPACE_DEFAULT, 145, 65, 0) - EVT_END_THREAD - EVT_CALL(N(StarSpiritEffectFunc4), 1) - EVT_THREAD - EVT_WAIT(80) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_ADD(LVar1, 100) - EVT_CALL(SetCamDistance, CAM_DEFAULT, LVar1) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 145, 0, 0) - EVT_CALL(N(StarSpiritEffectFunc4), 2) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar2, LVar3, LVar4) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar2, LVar3, LVar4) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ELSE - EVT_CALL(N(StarSpiritEffectFunc5), 2, 145, 30, 0, 0) - EVT_THREAD - EVT_CALL(N(StarSpiritEffectFunc6)) - EVT_END_THREAD - EVT_WAIT(1) - EVT_END_IF - EVT_CALL(N(StarSpiritEffectFunc4), 3) - EVT_CALL(PlaySoundAtPlayer, SOUND_RESCUE_STAR_SPIRIT, SOUND_SPACE_DEFAULT) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_23"), kmr_23_ENTRY_2, TRANSITION_GET_STAR_CARD) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(N(StarSpiritEffectFunc2), 2, 50, 100, 31, -6, 145, 65, 0, 30, 0) + Thread + Call(N(StarSpiritEffectFunc3)) + EndThread + Thread + Wait(1) + Call(PlaySound, SOUND_LOOP_STAR_ORB_RISING) + Call(N(StarSpiritEffectFunc1)) + Call(StopSound, SOUND_LOOP_STAR_ORB_RISING) + Call(PlaySoundAt, SOUND_STAR_ORB_BURST, SOUND_SPACE_DEFAULT, 145, 65, 0) + EndThread + Thread + Wait(12) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + EndThread + Thread + Wait(50) + Wait(115) + Call(PlaySoundAt, SOUND_STAR_CARD_APPEARS, SOUND_SPACE_DEFAULT, 145, 65, 0) + EndThread + Call(N(StarSpiritEffectFunc4), 1) + Thread + Wait(80) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndThread + Add(LVar1, 100) + Call(SetCamDistance, CAM_DEFAULT, LVar1) + Call(SetPanTarget, CAM_DEFAULT, 145, 0, 0) + Call(N(StarSpiritEffectFunc4), 2) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Call(UseSettingsFrom, CAM_DEFAULT, LVar2, LVar3, LVar4) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar2, LVar3, LVar4) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Else + Call(N(StarSpiritEffectFunc5), 2, 145, 30, 0, 0) + Thread + Call(N(StarSpiritEffectFunc6)) + EndThread + Wait(1) + EndIf + Call(N(StarSpiritEffectFunc4), 3) + Call(PlaySoundAtPlayer, SOUND_RESCUE_STAR_SPIRIT, SOUND_SPACE_DEFAULT) + Call(DisablePlayerInput, TRUE) + Set(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED) + Call(GotoMapSpecial, Ref("kmr_23"), kmr_23_ENTRY_2, TRANSITION_GET_STAR_CARD) + Wait(100) + Return + End }; EvtScript N(EVS_RespawnStarCard) = { - EVT_SET(LVar0, 1) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 145, 65, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.6)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 145, 30, 0) + Set(LVar0, 1) + IfEq(LVar0, 0) + Call(DisablePlayerInput, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, 145, 65, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.6)) + Call(SetPanTarget, CAM_DEFAULT, 145, 30, 0) EVT_SPIRIT_ADJUST_CAM(10000) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(N(StarSpiritEffectFunc2), 2, 50, 100, 31, -6, 145, 65, 0, 30, 0) - EVT_THREAD - EVT_CALL(N(StarSpiritEffectFunc3)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(PlaySound, SOUND_LOOP_STAR_ORB_RISING) - EVT_CALL(N(StarSpiritEffectFunc1)) - EVT_CALL(StopSound, SOUND_LOOP_STAR_ORB_RISING) - EVT_CALL(PlaySoundAt, SOUND_STAR_ORB_BURST, SOUND_SPACE_DEFAULT, 145, 65, 0) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(12) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(50) - EVT_WAIT(115) - EVT_CALL(PlaySoundAt, SOUND_STAR_CARD_APPEARS, SOUND_SPACE_DEFAULT, 145, 65, 0) - EVT_END_THREAD - EVT_CALL(N(StarSpiritEffectFunc4), 1) - EVT_THREAD - EVT_WAIT(80) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_ADD(LVar1, 100) - EVT_CALL(SetCamDistance, CAM_DEFAULT, LVar1) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 145, 0, 0) - EVT_CALL(N(StarSpiritEffectFunc4), 2) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar2, LVar3, LVar4) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar2, LVar3, LVar4) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ELSE - EVT_CALL(N(StarSpiritEffectFunc5), 2, 145, 30, 0, 0) - EVT_THREAD - EVT_CALL(N(StarSpiritEffectFunc6)) - EVT_END_THREAD - EVT_WAIT(1) - EVT_END_IF - EVT_CALL(N(StarSpiritEffectFunc4), 3) - EVT_CALL(PlaySoundAtPlayer, SOUND_RESCUE_STAR_SPIRIT, SOUND_SPACE_DEFAULT) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_23"), kmr_23_ENTRY_2, TRANSITION_GET_STAR_CARD) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(N(StarSpiritEffectFunc2), 2, 50, 100, 31, -6, 145, 65, 0, 30, 0) + Thread + Call(N(StarSpiritEffectFunc3)) + EndThread + Thread + Wait(1) + Call(PlaySound, SOUND_LOOP_STAR_ORB_RISING) + Call(N(StarSpiritEffectFunc1)) + Call(StopSound, SOUND_LOOP_STAR_ORB_RISING) + Call(PlaySoundAt, SOUND_STAR_ORB_BURST, SOUND_SPACE_DEFAULT, 145, 65, 0) + EndThread + Thread + Wait(12) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + EndThread + Thread + Wait(50) + Wait(115) + Call(PlaySoundAt, SOUND_STAR_CARD_APPEARS, SOUND_SPACE_DEFAULT, 145, 65, 0) + EndThread + Call(N(StarSpiritEffectFunc4), 1) + Thread + Wait(80) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndThread + Add(LVar1, 100) + Call(SetCamDistance, CAM_DEFAULT, LVar1) + Call(SetPanTarget, CAM_DEFAULT, 145, 0, 0) + Call(N(StarSpiritEffectFunc4), 2) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Call(UseSettingsFrom, CAM_DEFAULT, LVar2, LVar3, LVar4) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar2, LVar3, LVar4) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Else + Call(N(StarSpiritEffectFunc5), 2, 145, 30, 0, 0) + Thread + Call(N(StarSpiritEffectFunc6)) + EndThread + Wait(1) + EndIf + Call(N(StarSpiritEffectFunc4), 3) + Call(PlaySoundAtPlayer, SOUND_RESCUE_STAR_SPIRIT, SOUND_SPACE_DEFAULT) + Call(DisablePlayerInput, TRUE) + Set(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED) + Call(GotoMapSpecial, Ref("kmr_23"), kmr_23_ENTRY_2, TRANSITION_GET_STAR_CARD) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoor_arn_08_0) = EVT_EXIT_SINGLE_DOOR(arn_07_ENTRY_0, "arn_08", arn_08_ENTRY_0, @@ -140,211 +140,211 @@ EvtScript N(EVS_ExitWalk_arn_03_0) = EVT_EXIT_WALK(60, arn_07_ENTRY_1, "arn_03", EvtScript N(EVS_ExitWalk_mim_12_1) = EVT_EXIT_WALK(60, arn_07_ENTRY_2, "mim_12", mim_12_ENTRY_1); EvtScript N(EVS_Scene_TubbaReunion) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetPlayerPos, -28, 0, -333) - EVT_CALL(SetNpcPos, NPC_PARTNER, -28, 0, -333) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamType, CAM_DEFAULT, 0, FALSE) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(25.0), EVT_FLOAT(-4.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 1100) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 500, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -500) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 5, 0, -147) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(RotateModel, MODEL_o39, 80, 0, -1, 0) - EVT_CALL(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcJumpscale, NPC_TubbasHeart, EVT_FLOAT(2.5)) - EVT_CALL(NpcJump0, NPC_TubbasHeart, 0, 20, -120, 8 * DT) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_TubbasHeart, 0, 10, -60, 12 * DT) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_TubbasHeart, 0, 0, 0, 12 * DT) - EVT_WAIT(1) - EVT_CALL(SetNpcVar, NPC_TubbasHeart, 0, 0) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_TubbasHeart, 0, 0, 0, 10 * DT) - EVT_WAIT(1) - EVT_CALL(GetNpcVar, NPC_TubbasHeart, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcVar, NPC_TubbasHeart, 0, 2) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 80, 0, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o39, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_tt3, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_CALL(NpcFaceNpc, NPC_TubbasHeart, NPC_Tubba, 0) - EVT_CALL(SpeakToPlayer, NPC_TubbasHeart, ANIM_TubbasHeart_Anim0A, ANIM_TubbasHeart_Anim01, 5, MSG_CH3_00C7) - EVT_CALL(SetNpcVar, NPC_TubbasHeart, 0, 1) - EVT_LOOP(0) - EVT_CALL(GetNpcVar, NPC_TubbasHeart, 0, LVar0) - EVT_IF_EQ(LVar0, 2) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_TubbasHeart, 75, 0, 10, 12) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_TubbasHeart, 150, 0, 20, 12) - EVT_WAIT(1) - EVT_THREAD - EVT_WAIT(4 * DT) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(2.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 700) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 500, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -500) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 65, 0, -137) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim22) - EVT_END_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_TubbasHeart, 298, 56, 31, 18) - EVT_CALL(SetNpcPos, NPC_TubbasHeart, NPC_DISPOSE_LOCATION) - EVT_CALL(EnableNpcShadow, NPC_TubbasHeart, FALSE) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim23) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim06) - EVT_END_THREAD - EVT_WAIT(20 * DT) - EVT_THREAD - EVT_CALL(PlaySoundAtCollider, COLLIDER_tt3, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 80, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o39, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 236, 0, -46) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(8.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 250, 0, -46) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetPlayerPos, 0, 20, -195) - EVT_CALL(SetNpcPos, NPC_PARTNER, 0, 20, -195) - EVT_CALL(EnablePartnerAI) - EVT_CALL(PlayerMoveTo, 0, 0, 45 * DT) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK) - EVT_THREAD - EVT_CALL(MakeLerp, 80, 0, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o39, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_tt3, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_CALL(PlayerMoveTo, 200, 0, 35 * DT) - EVT_WAIT(5 * DT) - EVT_CALL(SpeakToPlayer, NPC_Tubba, ANIM_WorldTubba_Anim10, ANIM_WorldTubba_Anim06, 0, MSG_CH3_00C8) - EVT_CALL(SetNpcVar, NPC_Tubba, 0, 1) - EVT_WAIT(30 * DT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(SetPlayerPos, -28, 0, -333) + Call(SetNpcPos, NPC_PARTNER, -28, 0, -333) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamType, CAM_DEFAULT, 0, FALSE) + Call(SetCamPitch, CAM_DEFAULT, Float(25.0), Float(-4.0)) + Call(SetCamDistance, CAM_DEFAULT, 1100) + Call(SetCamPosA, CAM_DEFAULT, 500, 0) + Call(SetCamPosB, CAM_DEFAULT, 0, -500) + Call(SetCamPosC, CAM_DEFAULT, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 5, 0, -147) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(RotateModel, MODEL_o39, 80, 0, -1, 0) + Call(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) + Call(SetNpcJumpscale, NPC_TubbasHeart, Float(2.5)) + Call(NpcJump0, NPC_TubbasHeart, 0, 20, -120, 8 * DT) + Wait(1) + Call(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_TubbasHeart, 0, 10, -60, 12 * DT) + Wait(1) + Call(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_TubbasHeart, 0, 0, 0, 12 * DT) + Wait(1) + Call(SetNpcVar, NPC_TubbasHeart, 0, 0) + Thread + Loop(0) + Call(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_TubbasHeart, 0, 0, 0, 10 * DT) + Wait(1) + Call(GetNpcVar, NPC_TubbasHeart, 0, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + EndLoop + Call(SetNpcVar, NPC_TubbasHeart, 0, 2) + EndThread + Thread + Call(MakeLerp, 80, 0, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o39, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_tt3, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + EndThread + Call(NpcFaceNpc, NPC_TubbasHeart, NPC_Tubba, 0) + Call(SpeakToPlayer, NPC_TubbasHeart, ANIM_TubbasHeart_Anim0A, ANIM_TubbasHeart_Anim01, 5, MSG_CH3_00C7) + Call(SetNpcVar, NPC_TubbasHeart, 0, 1) + Loop(0) + Call(GetNpcVar, NPC_TubbasHeart, 0, LVar0) + IfEq(LVar0, 2) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_TubbasHeart, 75, 0, 10, 12) + Wait(1) + Call(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_TubbasHeart, 150, 0, 20, 12) + Wait(1) + Thread + Wait(4 * DT) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(2.0), Float(-9.0)) + Call(SetCamDistance, CAM_DEFAULT, 700) + Call(SetCamPosA, CAM_DEFAULT, 500, 0) + Call(SetCamPosB, CAM_DEFAULT, 0, -500) + Call(SetCamPosC, CAM_DEFAULT, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 65, 0, -137) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim22) + EndThread + Call(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_TubbasHeart, 298, 56, 31, 18) + Call(SetNpcPos, NPC_TubbasHeart, NPC_DISPOSE_LOCATION) + Call(EnableNpcShadow, NPC_TubbasHeart, FALSE) + Thread + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim23) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim06) + EndThread + Wait(20 * DT) + Thread + Call(PlaySoundAtCollider, COLLIDER_tt3, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 80, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o39, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Wait(30 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, 236, 0, -46) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(8.0), Float(-9.0)) + Call(SetCamDistance, CAM_DEFAULT, 450) + Call(SetPanTarget, CAM_DEFAULT, 250, 0, -46) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK) + Call(SetPlayerPos, 0, 20, -195) + Call(SetNpcPos, NPC_PARTNER, 0, 20, -195) + Call(EnablePartnerAI) + Call(PlayerMoveTo, 0, 0, 45 * DT) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK) + Thread + Call(MakeLerp, 80, 0, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o39, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_tt3, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + EndThread + Call(PlayerMoveTo, 200, 0, 35 * DT) + Wait(5 * DT) + Call(SpeakToPlayer, NPC_Tubba, ANIM_WorldTubba_Anim10, ANIM_WorldTubba_Anim06, 0, MSG_CH3_00C8) + Call(SetNpcVar, NPC_Tubba, 0, 1) + Wait(30 * DT) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_arn_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_mim_12_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_IF_LT(GB_StoryProgress, STORY_CH3_UNLOCKED_WINDY_MILL) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_UnlockDoor)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(KeyList)), 0, 1) - EVT_ELSE - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_arn_08_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tt3, 1, 0) - EVT_END_IF - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_arn_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_mim_12_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + IfLt(GB_StoryProgress, STORY_CH3_UNLOCKED_WINDY_MILL) + BindPadlock(Ref(N(EVS_UnlockDoor)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), Ref(N(KeyList)), 0, 1) + Else + BindTrigger(Ref(N(EVS_ExitDoor_arn_08_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tt3, 1, 0) + EndIf + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(arn_07_ENTRY_0) - EVT_IF_EQ(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WINDY_MILL) - EVT_EXEC_WAIT(N(EVS_Scene_TubbaReunion)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_ELSE - EVT_SET(LVar2, MODEL_o39) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_IF - EVT_CASE_EQ(arn_07_ENTRY_1) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_CASE_EQ(arn_07_ENTRY_2) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_CASE_EQ(arn_07_ENTRY_3) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_WAIT(1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(arn_07_ENTRY_0) + IfEq(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WINDY_MILL) + ExecWait(N(EVS_Scene_TubbaReunion)) + Exec(N(EVS_BindExitTriggers)) + Else + Set(LVar2, MODEL_o39) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSingleDoor) + Exec(N(EVS_BindExitTriggers)) + EndIf + CaseEq(arn_07_ENTRY_1) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + CaseEq(arn_07_ENTRY_2) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + CaseEq(arn_07_ENTRY_3) + Exec(N(EVS_BindExitTriggers)) + Wait(1) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_GUSTY_GULCH) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_SET(GF_MAP_GustyGulch, TRUE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CASE_LT(STORY_CH3_BEGAN_PEACH_MISSION) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(BossNPCs))) - EVT_CASE_EQ(STORY_CH3_BEGAN_PEACH_MISSION) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(SpiritNPCs))) - EVT_CASE_DEFAULT - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_IF_EQ(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_EXEC(N(EVS_RespawnStarCard)) - EVT_END_IF - EVT_EXEC(N(EVS_EnterMap)) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, arn_07_ENTRY_3) - EVT_WAIT(65) - EVT_END_IF - EVT_EXEC(N(EVS_SetupWindmill)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.3)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_GUSTY_GULCH) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Set(GF_MAP_GustyGulch, TRUE) + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + CaseLt(STORY_CH3_BEGAN_PEACH_MISSION) + Call(MakeNpcs, FALSE, Ref(N(BossNPCs))) + CaseEq(STORY_CH3_BEGAN_PEACH_MISSION) + Call(MakeNpcs, FALSE, Ref(N(SpiritNPCs))) + CaseDefault + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + EndSwitch + ExecWait(N(EVS_MakeEntities)) + IfEq(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Exec(N(EVS_RespawnStarCard)) + EndIf + Exec(N(EVS_EnterMap)) + Call(GetEntryID, LVar0) + IfEq(LVar0, arn_07_ENTRY_3) + Wait(65) + EndIf + Exec(N(EVS_SetupWindmill)) + Exec(N(EVS_SetupMusic)) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.3)) + Return + End }; diff --git a/src/world/area_arn/arn_07/arn_07_3_windmill.c b/src/world/area_arn/arn_07/arn_07_3_windmill.c index 7f63c9d3767..d8925da3eeb 100644 --- a/src/world/area_arn/arn_07/arn_07_3_windmill.c +++ b/src/world/area_arn/arn_07/arn_07_3_windmill.c @@ -15,44 +15,44 @@ API_CALLABLE(N(WrapWindmillAngle)) { extern EvtScript(N(EVS_UpdateWindmill)); EvtScript N(EVS_SetupWindmill) = { - EVT_EXEC(N(EVS_UpdateWindmill)) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateWindmill)) + Return + End }; EvtScript N(EVS_UpdateWindmill) = { - EVT_SETF(LVar0, EVT_FLOAT(0.0)) - EVT_SET(LVar1, 30) - EVT_CALL(PlaySoundAtModel, MODEL_o36, SOUND_LOOP_WINDMILL_EXT, SOUND_SPACE_DEFAULT) - EVT_LABEL(0) - EVT_ADDF(LVar0, EVT_FLOAT(1.0)) - EVT_CALL(N(WrapWindmillAngle)) - EVT_CALL(RotateModel, MODEL_o40, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_SUB(LVar1, 1) - EVT_IF_GT(LVar1, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_SET(LVar1, 30) - EVT_CALL(RandInt, 100, LVar2) - EVT_IF_GT(LVar2, 10) - EVT_GOTO(0) - EVT_END_IF - EVT_SETF(LVar2, EVT_FLOAT(1.0)) - EVT_LOOP(50) - EVT_SUBF(LVar2, EVT_FLOAT(0.01)) - EVT_ADDF(LVar0, LVar2) - EVT_CALL(RotateModel, MODEL_o40, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(50) - EVT_ADDF(LVar2, EVT_FLOAT(0.01)) - EVT_ADDF(LVar0, LVar2) - EVT_CALL(RotateModel, MODEL_o40, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(LVar1, 30) - EVT_GOTO(0) - EVT_RETURN - EVT_END + SetF(LVar0, Float(0.0)) + Set(LVar1, 30) + Call(PlaySoundAtModel, MODEL_o36, SOUND_LOOP_WINDMILL_EXT, SOUND_SPACE_DEFAULT) + Label(0) + AddF(LVar0, Float(1.0)) + Call(N(WrapWindmillAngle)) + Call(RotateModel, MODEL_o40, LVar0, 0, 0, 1) + Wait(1) + Sub(LVar1, 1) + IfGt(LVar1, 0) + Goto(0) + EndIf + Set(LVar1, 30) + Call(RandInt, 100, LVar2) + IfGt(LVar2, 10) + Goto(0) + EndIf + SetF(LVar2, Float(1.0)) + Loop(50) + SubF(LVar2, Float(0.01)) + AddF(LVar0, LVar2) + Call(RotateModel, MODEL_o40, LVar0, 0, 0, 1) + Wait(1) + EndLoop + Loop(50) + AddF(LVar2, Float(0.01)) + AddF(LVar0, LVar2) + Call(RotateModel, MODEL_o40, LVar0, 0, 0, 1) + Wait(1) + EndLoop + Set(LVar1, 30) + Goto(0) + Return + End }; diff --git a/src/world/area_arn/arn_07/arn_07_4_entity.c b/src/world/area_arn/arn_07/arn_07_4_entity.c index fccfddf8bf7..e61017240c9 100644 --- a/src/world/area_arn/arn_07/arn_07_4_entity.c +++ b/src/world/area_arn/arn_07/arn_07_4_entity.c @@ -7,46 +7,46 @@ MAP_RODATA_PAD(1,entity); #include "world/common/todo/GetEntityPosition.inc.c" EvtScript N(EVS_UnlockDoor) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END_IF - EVT_CALL(FindKeyItem, ITEM_MYSTICAL_KEY, LVar0) - EVT_CALL(RemoveKeyItemAt, LVar0) - EVT_CALL(CloseChoicePopup) - EVT_SET(GB_StoryProgress, STORY_CH3_UNLOCKED_WINDY_MILL) - EVT_CALL(N(GetEntityPosition), MV_Unk_00, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_SET(LVar0, MV_Unk_00) - EVT_CALL(N(RemovePadlock)) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_UNBIND - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(ShowKeyChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + EndIf + IfEq(LVar0, -1) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + EndIf + Call(FindKeyItem, ITEM_MYSTICAL_KEY, LVar0) + Call(RemoveKeyItemAt, LVar0) + Call(CloseChoicePopup) + Set(GB_StoryProgress, STORY_CH3_UNLOCKED_WINDY_MILL) + Call(N(GetEntityPosition), MV_Unk_00, LVar0, LVar1, LVar2) + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Set(LVar0, MV_Unk_00) + Call(N(RemovePadlock)) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Unbind + Return + End }; EvtScript N(EVS_BindLockTrigger) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_arn_08_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tt3, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoor_arn_08_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tt3, 1, 0) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH3_UNLOCKED_WINDY_MILL) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), 10, 30, -155, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_BindLockTrigger))) - EVT_SET(MV_Unk_00, LVar0) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH3_UNLOCKED_WINDY_MILL) + Call(MakeEntity, Ref(Entity_Padlock), 10, 30, -155, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_BindLockTrigger))) + Set(MV_Unk_00, LVar0) + EndIf + Return + End }; diff --git a/src/world/area_arn/arn_07/arn_07_5_npc.c b/src/world/area_arn/arn_07/arn_07_5_npc.c index 6860d2f05b0..885dd04008d 100644 --- a/src/world/area_arn/arn_07/arn_07_5_npc.c +++ b/src/world/area_arn/arn_07/arn_07_5_npc.c @@ -17,352 +17,352 @@ API_CALLABLE(N(UpgradeStarPowerCh3)) { } EvtScript N(EVS_TubbaWalking) = { - EVT_LOOP(0) - EVT_CALL(PlaySoundAtNpc, NPC_Tubba, SOUND_HEAVY_NPC_STEP_C, SOUND_SPACE_DEFAULT) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 3, EVT_FLOAT(0.8)) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(PlaySoundAtNpc, NPC_Tubba, SOUND_HEAVY_NPC_STEP_C, SOUND_SPACE_DEFAULT) + Call(ShakeCam, CAM_DEFAULT, 0, 3, Float(0.8)) + EndLoop + Return + End }; EvtScript N(EVS_Scene_TubbaRelents) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 236, 0, -46) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 250, 0, -46) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim08) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldTubba_Anim12, ANIM_WorldTubba_Anim08, 5, MSG_CH3_00CA) - EVT_WAIT(10 * DT) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldTubba_Anim12, ANIM_WorldTubba_Anim08, 5, MSG_CH3_00CB) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(5.0), EVT_FLOAT(-16.0)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, 236, 0, -46) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetPanTarget, CAM_DEFAULT, 250, 0, -46) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim08) + Call(SetNpcYaw, NPC_SELF, 90) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldTubba_Anim12, ANIM_WorldTubba_Anim08, 5, MSG_CH3_00CA) + Wait(10 * DT) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldTubba_Anim12, ANIM_WorldTubba_Anim08, 5, MSG_CH3_00CB) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(5.0), Float(-16.0)) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_Scene_BossDefeated) = { - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim22) - EVT_WAIT(15 * DT) - EVT_LOOP(4) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SEQ_BOO_APPEAR, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcVar, NPC_Boo_02, 0, 1) - EVT_WAIT(4 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SEQ_BOO_APPEAR, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcVar, NPC_Boo_05, 0, 1) - EVT_WAIT(4 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SEQ_BOO_APPEAR, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcVar, NPC_Boo_01, 0, 1) - EVT_WAIT(6 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SEQ_BOO_APPEAR, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcVar, NPC_Boo_03, 0, 1) - EVT_WAIT(8 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SEQ_BOO_APPEAR, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcVar, NPC_Boo_04, 0, 1) - EVT_WAIT(6 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SEQ_BOO_APPEAR, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcVar, NPC_Boo_06, 0, 1) - EVT_WAIT(6 * DT) - EVT_END_LOOP - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim23) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim22) - EVT_WAIT(10 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SEQ_BOO_APPEAR, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcVar, NPC_Boo_02, 0, 1) - EVT_WAIT(15 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim21) - EVT_WAIT(45 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 236, 0, -46) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 50) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(5 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Still) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim0F) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldTubba_Anim12, ANIM_WorldTubba_Anim08, 0, MSG_CH3_00CC) - EVT_THREAD - EVT_WAIT(5 * DT) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_LOOP(40 * DT) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(func_802CF56C, 2) - EVT_LOOP(45 * DT) - EVT_CALL(PlayerFaceNpc, NPC_SELF, TRUE) - EVT_END_LOOP - EVT_END_THREAD - EVT_EXEC_GET_TID(N(EVS_TubbaWalking), LVarA) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 800) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, LVar2, 80 * DT) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_SET(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_CHEERFUL_BOOS_MANSION, 0, 8) - EVT_CALL(GetCurrentPartnerID, LVar6) - EVT_IF_EQ(LVar6, PARTNER_BOW) - EVT_SET(LVar5, -4) - EVT_CALL(func_802CF56C, 0) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, 257, 25, 0) - EVT_END_IF - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(10 * DT) - EVT_IF_NE(LVar6, PARTNER_BOW) - EVT_SET(LVar5, 8) - EVT_CALL(SetNpcPos, NPC_Bow, 257, 25, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Bow, IMGFX_SET_ALPHA, 0, 0, 0, 0) - EVT_CALL(NpcFacePlayer, NPC_Bow, 0) - EVT_CALL(MakeLerp, 0, 240, 20 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcImgFXParams, NPC_Bow, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(func_802CF56C, 0) - EVT_END_IF - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_IF_NE(LVar6, PARTNER_BOW) - EVT_CALL(DisablePartnerAI, 0) - EVT_WAIT(1) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Bow, 0) - EVT_WAIT(5 * DT) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, LVar5, ANIM_WorldBow_Celebrate, ANIM_WorldBow_Celebrate, 0, MSG_CH3_00CD) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_WAIT(10 * DT) - EVT_CALL(GetNpcPos, LVar5, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, -20) - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(2.0), LVar0, LVar1, LVar2, EVT_FLOAT(300.0), EVT_FLOAT(15.0), EVT_FLOAT(-7.0)) - EVT_CALL(PlayerFaceNpc, LVar5, FALSE) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, LVar5, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_00CE) - EVT_CALL(ShowChoice, MSG_Choice_000D) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ContinueSpeech, LVar5, ANIM_WorldBow_Celebrate, ANIM_WorldBow_Celebrate, 0, MSG_CH3_00CF) - EVT_ELSE - EVT_CALL(ContinueSpeech, LVar5, ANIM_WorldBow_Celebrate, ANIM_WorldBow_Celebrate, 0, MSG_CH3_00D0) - EVT_END_IF - EVT_CALL(SpeakToPlayer, LVar5, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_00D1) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 175, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 175, 0, 0) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcPos, NPC_Bootler, 93, 160, -6) - EVT_CALL(InterpNpcYaw, NPC_Bootler, 90, 0) - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_END_THREAD - EVT_THREAD - EVT_IF_NE(LVar6, PARTNER_BOW) - EVT_WAIT(12 * DT) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(MakeLerp, 160, 31, 70 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, NPC_Bootler, 93, LVar0, -6) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_THREAD - EVT_IF_NE(LVar6, PARTNER_BOW) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, LVar5, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_00D2) - EVT_THREAD - EVT_IF_NE(LVar6, PARTNER_BOW) - EVT_WAIT(12 * DT) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_EXEC(N(EVS_SpawnStarCard)) - EVT_WAIT(20 * DT) - EVT_THREAD - EVT_IF_NE(LVar6, 9) - EVT_CALL(MakeLerp, 240, 0, 20 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcImgFXParams, NPC_Bow, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_Bow, NPC_DISPOSE_LOCATION) - EVT_CALL(EnablePartnerAI) - EVT_ELSE - EVT_WAIT(20 * DT) - EVT_CALL(ClearPartnerMoveHistory, NPC_PARTNER) - EVT_CALL(EnablePartnerAI) - EVT_END_IF - EVT_WAIT(8 * DT) - EVT_CALL(func_802CF56C, 2) - EVT_END_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Wait(10 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim22) + Wait(15 * DT) + Loop(4) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SEQ_BOO_APPEAR, SOUND_SPACE_DEFAULT) + Call(SetNpcVar, NPC_Boo_02, 0, 1) + Wait(4 * DT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SEQ_BOO_APPEAR, SOUND_SPACE_DEFAULT) + Call(SetNpcVar, NPC_Boo_05, 0, 1) + Wait(4 * DT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SEQ_BOO_APPEAR, SOUND_SPACE_DEFAULT) + Call(SetNpcVar, NPC_Boo_01, 0, 1) + Wait(6 * DT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SEQ_BOO_APPEAR, SOUND_SPACE_DEFAULT) + Call(SetNpcVar, NPC_Boo_03, 0, 1) + Wait(8 * DT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SEQ_BOO_APPEAR, SOUND_SPACE_DEFAULT) + Call(SetNpcVar, NPC_Boo_04, 0, 1) + Wait(6 * DT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SEQ_BOO_APPEAR, SOUND_SPACE_DEFAULT) + Call(SetNpcVar, NPC_Boo_06, 0, 1) + Wait(6 * DT) + EndLoop + Wait(10 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim23) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim22) + Wait(10 * DT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SEQ_BOO_APPEAR, SOUND_SPACE_DEFAULT) + Call(SetNpcVar, NPC_Boo_02, 0, 1) + Wait(15 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim21) + Wait(45 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, 236, 0, -46) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 50) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(5 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Still) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim0F) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldTubba_Anim12, ANIM_WorldTubba_Anim08, 0, MSG_CH3_00CC) + Thread + Wait(5 * DT) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Loop(40 * DT) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + Thread + Call(func_802CF56C, 2) + Loop(45 * DT) + Call(PlayerFaceNpc, NPC_SELF, TRUE) + EndLoop + EndThread + ExecGetTID(N(EVS_TubbaWalking), LVarA) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 800) + Call(NpcMoveTo, NPC_SELF, LVar0, LVar2, 80 * DT) + KillThread(LVarA) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Set(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_CHEERFUL_BOOS_MANSION, 0, 8) + Call(GetCurrentPartnerID, LVar6) + IfEq(LVar6, PARTNER_BOW) + Set(LVar5, -4) + Call(func_802CF56C, 0) + Call(DisablePartnerAI, 0) + Call(SetNpcPos, NPC_PARTNER, 257, 25, 0) + EndIf + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(10 * DT) + IfNe(LVar6, PARTNER_BOW) + Set(LVar5, 8) + Call(SetNpcPos, NPC_Bow, 257, 25, 0) + Call(SetNpcImgFXParams, NPC_Bow, IMGFX_SET_ALPHA, 0, 0, 0, 0) + Call(NpcFacePlayer, NPC_Bow, 0) + Call(MakeLerp, 0, 240, 20 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcImgFXParams, NPC_Bow, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(func_802CF56C, 0) + EndIf + Wait(10 * DT) + Thread + IfNe(LVar6, PARTNER_BOW) + Call(DisablePartnerAI, 0) + Wait(1) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Bow, 0) + Wait(5 * DT) + EndIf + EndThread + Call(SpeakToPlayer, LVar5, ANIM_WorldBow_Celebrate, ANIM_WorldBow_Celebrate, 0, MSG_CH3_00CD) + Call(InterpPlayerYaw, 270, 0) + Wait(10 * DT) + Call(GetNpcPos, LVar5, LVar0, LVar1, LVar2) + Add(LVar1, -20) + Call(SetCamProperties, CAM_DEFAULT, Float(2.0), LVar0, LVar1, LVar2, Float(300.0), Float(15.0), Float(-7.0)) + Call(PlayerFaceNpc, LVar5, FALSE) + Wait(10 * DT) + Call(SpeakToPlayer, LVar5, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_00CE) + Call(ShowChoice, MSG_Choice_000D) + IfEq(LVar0, 0) + Call(ContinueSpeech, LVar5, ANIM_WorldBow_Celebrate, ANIM_WorldBow_Celebrate, 0, MSG_CH3_00CF) + Else + Call(ContinueSpeech, LVar5, ANIM_WorldBow_Celebrate, ANIM_WorldBow_Celebrate, 0, MSG_CH3_00D0) + EndIf + Call(SpeakToPlayer, LVar5, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_00D1) + Call(UseSettingsFrom, CAM_DEFAULT, 175, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(SetPanTarget, CAM_DEFAULT, 175, 0, 0) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetNpcPos, NPC_Bootler, 93, 160, -6) + Call(InterpNpcYaw, NPC_Bootler, 90, 0) + Thread + Wait(10 * DT) + Call(InterpPlayerYaw, 270, 0) + EndThread + Thread + IfNe(LVar6, PARTNER_BOW) + Wait(12 * DT) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + EndIf + EndThread + Call(MakeLerp, 160, 31, 70 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcPos, NPC_Bootler, 93, LVar0, -6) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Thread + IfNe(LVar6, PARTNER_BOW) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + EndIf + EndThread + Call(SpeakToPlayer, LVar5, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_00D2) + Thread + IfNe(LVar6, PARTNER_BOW) + Wait(12 * DT) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + EndIf + EndThread + Wait(10 * DT) + Call(InterpPlayerYaw, 270, 0) + Exec(N(EVS_SpawnStarCard)) + Wait(20 * DT) + Thread + IfNe(LVar6, 9) + Call(MakeLerp, 240, 0, 20 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcImgFXParams, NPC_Bow, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcPos, NPC_Bow, NPC_DISPOSE_LOCATION) + Call(EnablePartnerAI) + Else + Wait(20 * DT) + Call(ClearPartnerMoveHistory, NPC_PARTNER) + Call(EnablePartnerAI) + EndIf + Wait(8 * DT) + Call(func_802CF56C, 2) + EndThread + Wait(20 * DT) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcIdle_Tubba) = { - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(StartBossBattle, SONG_TUBBA_BLUBBA_BATTLE) - EVT_RETURN - EVT_END + Loop(0) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(StartBossBattle, SONG_TUBBA_BLUBBA_BATTLE) + Return + End }; EvtScript N(EVS_NpcIdle_Boo) = { - EVT_LABEL(10) - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_THREAD - EVT_SETF(LVar0, EVT_FLOAT(0.5)) - EVT_CALL(MakeLerp, 50, 80, 15 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, LVar0) - EVT_DIVF(LVar2, 100) - EVT_CALL(SetNpcScale, NPC_SELF, LVar2, LVar2, LVar2) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(RandInt, 80, LVar2) - EVT_CALL(RandInt, 10, LVar3) - EVT_ADD(LVar3, 5 * DT) - EVT_CALL(MakeLerp, LVar2, 240, LVar3, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcPos, NPC_SELF, 293, 59, 21) - EVT_WAIT(1) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(-0.3)) - EVT_CALL(RandInt, 100, LVar3) - EVT_SUB(LVar0, LVar3) - EVT_ADD(LVar1, 100) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 20 * DT) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(SetSelfVar, 0, 0) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Label(10) + Loop(0) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + Thread + SetF(LVar0, Float(0.5)) + Call(MakeLerp, 50, 80, 15 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, LVar0) + DivF(LVar2, 100) + Call(SetNpcScale, NPC_SELF, LVar2, LVar2, LVar2) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(RandInt, 80, LVar2) + Call(RandInt, 10, LVar3) + Add(LVar3, 5 * DT) + Call(MakeLerp, LVar2, 240, LVar3, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(SetNpcPos, NPC_SELF, 293, 59, 21) + Wait(1) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_SELF, Float(-0.3)) + Call(RandInt, 100, LVar3) + Sub(LVar0, LVar3) + Add(LVar1, 100) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 20 * DT) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(SetSelfVar, 0, 0) + Goto(10) + Return + End }; EvtScript N(EVS_NpcDefeat_Tubba) = { - EVT_CALL(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAG_2, TRUE) - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 1, 8) - EVT_EXEC_WAIT(N(EVS_Scene_TubbaRelents)) - EVT_EXEC(N(EVS_Scene_BossDefeated)) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAG_2, TRUE) + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 1, 8) + ExecWait(N(EVS_Scene_TubbaRelents)) + Exec(N(EVS_Scene_BossDefeated)) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_TubbasHeart) = { - EVT_IF_NE(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WINDY_MILL) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfNe(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WINDY_MILL) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Tubba) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Tubba))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Tubba))) - EVT_IF_NE(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WINDY_MILL) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Tubba))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Tubba))) + IfNe(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WINDY_MILL) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Boo) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Boo))) - EVT_IF_NE(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WINDY_MILL) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Boo))) + IfNe(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WINDY_MILL) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Bow) = { - EVT_IF_NE(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WINDY_MILL) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfNe(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WINDY_MILL) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Bootler) = { - EVT_IF_NE(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WINDY_MILL) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfNe(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WINDY_MILL) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; AnimID N(ExtraAnims_Tubba)[] = { @@ -393,170 +393,170 @@ AnimID N(ExtraAnims_Bootler)[] = { }; EvtScript N(EVS_NpcIdle_Skolar) = { - EVT_LOOP(0) - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Loop(10) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 1) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Loop(10) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 1) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_Scene_SkolarRescued) = { - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(func_802CF56C, 2) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar0) - EVT_ADD(LVar3, -50) - EVT_SET(LVar4, LVar1) - EVT_ADD(LVar4, 26) - EVT_CALL(SetNpcPos, NPC_Skolar, LVar3, LVar4, LVar2) - EVT_CALL(PlayerFaceNpc, NPC_Skolar, FALSE) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Skolar, 0) - EVT_ADD(LVar0, -25) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(475.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 18, -8) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(WaitForPlayerInputEnabled) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(40 * DT) - EVT_CALL(SpeakToPlayer, NPC_Skolar, ANIM_WorldSkolar_TalkAngry, ANIM_WorldSkolar_Idle, 512, MSG_CH3_00D3) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 18, -9) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(MakeLerp, 0, 360, 10 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Skolar, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(EnableNpcAI, NPC_Skolar, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Skolar, ANIM_WorldSkolar_Leap) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_UsePower) - EVT_CALL(PlaySoundAtPlayer, SOUND_RECEIVE_STAR_POWER, SOUND_SPACE_DEFAULT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar1) - EVT_ADD(LVar1, 50) - EVT_ADD(LVar2, 10) - EVT_ADD(LVar3, 30) - EVT_LOOP(5) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 20) - EVT_WAIT(6 * DT) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 1, LVar0, LVar3, LVar2, 20) - EVT_WAIT(6 * DT) - EVT_END_LOOP - EVT_WAIT(20 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_GET_STAR_POWER_WAVE, SOUND_SPACE_DEFAULT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 30) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetNpcAnimation, NPC_Skolar, ANIM_WorldSkolar_Idle) - EVT_CALL(EnableNpcAI, NPC_Skolar, TRUE) - EVT_CALL(N(UpgradeStarPowerCh3)) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0193, 160, 40) - EVT_WAIT(10 * DT) - EVT_CALL(GetNpcPos, NPC_Skolar, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Skolar, ANIM_WorldSkolar_TalkAngry, ANIM_WorldSkolar_Idle, 512, MSG_CH3_00D4) - EVT_WAIT(10 * DT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -25) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Skolar, ANIM_WorldSkolar_TalkAngry, ANIM_WorldSkolar_Idle, 512, MSG_CH3_00D5) - EVT_CALL(SetNpcFlagBits, NPC_Skolar, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) - EVT_THREAD - EVT_LOOP(25) - EVT_CALL(GetNpcPos, NPC_Skolar, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 20) - EVT_WAIT(4 * DT) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 1800) - EVT_CALL(MakeLerp, LVar2, LVar3, 100 * DT, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Skolar, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Skolar, LVar2, LVar3, LVar4) - EVT_SET(LVar5, LVar3) - EVT_ADD(LVar5, 180) - EVT_CALL(MakeLerp, LVar3, LVar5, 100 * DT, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, NPC_Skolar, LVar2, LVar0, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_Skolar, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(15 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Skolar, SOUND_STAR_SPIRIT_DEPART_1, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_WAIT(90 * DT) - EVT_CALL(ResetCam, CAM_DEFAULT, 3) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_SET(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePartnerAI, 0) + Call(func_802CF56C, 2) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar3, LVar0) + Add(LVar3, -50) + Set(LVar4, LVar1) + Add(LVar4, 26) + Call(SetNpcPos, NPC_Skolar, LVar3, LVar4, LVar2) + Call(PlayerFaceNpc, NPC_Skolar, FALSE) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Skolar, 0) + Add(LVar0, -25) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(475.0)) + Call(SetCamPitch, CAM_DEFAULT, 18, -8) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(WaitForPlayerInputEnabled) + Call(DisablePlayerInput, TRUE) + Wait(40 * DT) + Call(SpeakToPlayer, NPC_Skolar, ANIM_WorldSkolar_TalkAngry, ANIM_WorldSkolar_Idle, 512, MSG_CH3_00D3) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, 18, -9) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(MakeLerp, 0, 360, 10 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Skolar, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(EnableNpcAI, NPC_Skolar, FALSE) + Call(SetNpcAnimation, NPC_Skolar, ANIM_WorldSkolar_Leap) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_UsePower) + Call(PlaySoundAtPlayer, SOUND_RECEIVE_STAR_POWER, SOUND_SPACE_DEFAULT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar3, LVar1) + Add(LVar1, 50) + Add(LVar2, 10) + Add(LVar3, 30) + Loop(5) + PlayEffect(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 20) + Wait(6 * DT) + PlayEffect(EFFECT_SPARKLES, 1, LVar0, LVar3, LVar2, 20) + Wait(6 * DT) + EndLoop + Wait(20 * DT) + Call(PlaySoundAtPlayer, SOUND_GET_STAR_POWER_WAVE, SOUND_SPACE_DEFAULT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 20) + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 30) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetNpcAnimation, NPC_Skolar, ANIM_WorldSkolar_Idle) + Call(EnableNpcAI, NPC_Skolar, TRUE) + Call(N(UpgradeStarPowerCh3)) + Call(ShowMessageAtScreenPos, MSG_Menus_0193, 160, 40) + Wait(10 * DT) + Call(GetNpcPos, NPC_Skolar, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(250.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Skolar, ANIM_WorldSkolar_TalkAngry, ANIM_WorldSkolar_Idle, 512, MSG_CH3_00D4) + Wait(10 * DT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, -25) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Skolar, ANIM_WorldSkolar_TalkAngry, ANIM_WorldSkolar_Idle, 512, MSG_CH3_00D5) + Call(SetNpcFlagBits, NPC_Skolar, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) + Thread + Loop(25) + Call(GetNpcPos, NPC_Skolar, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 20) + Wait(4 * DT) + EndLoop + EndThread + Thread + Set(LVar2, 0) + Set(LVar3, 1800) + Call(MakeLerp, LVar2, LVar3, 100 * DT, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Skolar, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(GetNpcPos, NPC_Skolar, LVar2, LVar3, LVar4) + Set(LVar5, LVar3) + Add(LVar5, 180) + Call(MakeLerp, LVar3, LVar5, 100 * DT, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetNpcPos, NPC_Skolar, LVar2, LVar0, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcPos, NPC_Skolar, NPC_DISPOSE_LOCATION) + EndThread + Thread + Wait(15 * DT) + Call(PlaySoundAtNpc, NPC_Skolar, SOUND_STAR_SPIRIT_DEPART_1, SOUND_SPACE_DEFAULT) + EndThread + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Wait(90 * DT) + Call(ResetCam, CAM_DEFAULT, 3) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Set(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) + Exec(N(EVS_SetupMusic)) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Skolar) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, arn_07_ENTRY_3) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Skolar))) - EVT_EXEC(N(EVS_Scene_SkolarRescued)) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, arn_07_ENTRY_3) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Skolar))) + Exec(N(EVS_Scene_SkolarRescued)) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_Tubba)[] = { @@ -710,13 +710,13 @@ NpcData N(NpcData_Bootler) = { }; EvtScript N(EVS_NpcInit_HyperParagoomba) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) - EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) + IfLt(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED) + Call(RemoveNpc, NPC_SELF) + EndIf + EndIf + Return + End }; NpcData N(NpcData_HyperParagoomba_01) = { diff --git a/src/world/area_arn/arn_08/arn_08_1_music.c b/src/world/area_arn/arn_08/arn_08_1_music.c index 9e584a2a877..81124ef7eae 100644 --- a/src/world/area_arn/arn_08/arn_08_1_music.c +++ b/src/world/area_arn/arn_08/arn_08_1_music.c @@ -1,15 +1,15 @@ #include "arn_08.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_HEART_FLED_FIRST_TUNNEL) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) - EVT_END_SWITCH - EVT_CALL(ClearAmbientSounds, 250) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_HEART_FLED_FIRST_TUNNEL) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) + EndSwitch + Call(ClearAmbientSounds, 250) + Return + End }; diff --git a/src/world/area_arn/arn_08/arn_08_2_main.c b/src/world/area_arn/arn_08/arn_08_2_main.c index fe6a626d1d0..7d14300ae01 100644 --- a/src/world/area_arn/arn_08/arn_08_2_main.c +++ b/src/world/area_arn/arn_08/arn_08_2_main.c @@ -1,115 +1,115 @@ #include "arn_08.h" EvtScript N(EVS_ExitDoor_arn_07_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ClearDefeatedEnemies) - EVT_SET(LVar0, arn_08_ENTRY_0) - EVT_SET(LVar1, COLLIDER_tts) - EVT_SET(LVar2, MODEL_doa) - EVT_SET(LVar4, MODEL_o37) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(ExitSplitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("arn_07"), arn_07_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(ClearDefeatedEnemies) + Set(LVar0, arn_08_ENTRY_0) + Set(LVar1, COLLIDER_tts) + Set(LVar2, MODEL_doa) + Set(LVar4, MODEL_o37) + Set(LVar3, DOOR_SWING_IN) + Exec(ExitSplitSingleDoor) + Wait(17) + Call(GotoMap, Ref("arn_07"), arn_07_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_arn_07_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tts, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoor_arn_07_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tts, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(arn_08_ENTRY_0) - EVT_SET(LVar4, MODEL_o37) - EVT_SET(LVar2, MODEL_doa) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSplitSingleDoor) - EVT_SET(AF_ARN_01, FALSE) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(arn_08_ENTRY_1) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WELL) - EVT_CALL(SetPlayerPos, 1000, 1000, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, 1000, 1000, 0) - EVT_CALL(RotateModel, MODEL_doa, 80, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o37, 80, 0, -1, 0) - EVT_CALL(SetNpcAnimation, NPC_TubbasHeart, ANIM_TubbasHeart_Anim06) - EVT_CALL(SetNpcJumpscale, NPC_TubbasHeart, EVT_FLOAT(2.5)) - EVT_CALL(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_TubbasHeart, -50, 0, 50, 10 * DT) - EVT_CALL(SetNpcAnimation, NPC_TubbasHeart, ANIM_TubbasHeart_Anim07) - EVT_WAIT(1) - EVT_CALL(SetNpcAnimation, NPC_TubbasHeart, ANIM_TubbasHeart_Anim06) - EVT_CALL(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_TubbasHeart, -110, 0, 110, 10 * DT) - EVT_CALL(SetNpcAnimation, NPC_TubbasHeart, ANIM_TubbasHeart_Anim07) - EVT_WAIT(1) - EVT_CALL(SetNpcAnimation, NPC_TubbasHeart, ANIM_TubbasHeart_Anim06) - EVT_CALL(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_TubbasHeart, -180, 0, 180, 10 * DT) - EVT_CALL(SetNpcAnimation, NPC_TubbasHeart, ANIM_TubbasHeart_Anim07) - EVT_WAIT(1) - EVT_CALL(MakeLerp, 80, 0, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_doa, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o37, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_tts, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerPos, 0, 0, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, 0, 0, 0) - EVT_SET(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WINDY_MILL) - EVT_END_IF - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(2.0)) - EVT_CALL(PlayerJump, -10, 0, 75, 18) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(arn_08_ENTRY_0) + Set(LVar4, MODEL_o37) + Set(LVar2, MODEL_doa) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSplitSingleDoor) + Set(AF_ARN_01, FALSE) + Exec(N(EVS_BindExitTriggers)) + CaseEq(arn_08_ENTRY_1) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + IfEq(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WELL) + Call(SetPlayerPos, 1000, 1000, 0) + Call(SetNpcPos, NPC_PARTNER, 1000, 1000, 0) + Call(RotateModel, MODEL_doa, 80, 0, -1, 0) + Call(RotateModel, MODEL_o37, 80, 0, -1, 0) + Call(SetNpcAnimation, NPC_TubbasHeart, ANIM_TubbasHeart_Anim06) + Call(SetNpcJumpscale, NPC_TubbasHeart, Float(2.5)) + Call(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_TubbasHeart, -50, 0, 50, 10 * DT) + Call(SetNpcAnimation, NPC_TubbasHeart, ANIM_TubbasHeart_Anim07) + Wait(1) + Call(SetNpcAnimation, NPC_TubbasHeart, ANIM_TubbasHeart_Anim06) + Call(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_TubbasHeart, -110, 0, 110, 10 * DT) + Call(SetNpcAnimation, NPC_TubbasHeart, ANIM_TubbasHeart_Anim07) + Wait(1) + Call(SetNpcAnimation, NPC_TubbasHeart, ANIM_TubbasHeart_Anim06) + Call(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_TubbasHeart, -180, 0, 180, 10 * DT) + Call(SetNpcAnimation, NPC_TubbasHeart, ANIM_TubbasHeart_Anim07) + Wait(1) + Call(MakeLerp, 80, 0, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_doa, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_o37, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_tts, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Wait(20 * DT) + Call(SetPlayerPos, 0, 0, 0) + Call(SetNpcPos, NPC_PARTNER, 0, 0, 0) + Set(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WINDY_MILL) + EndIf + Call(DisablePlayerPhysics, FALSE) + Call(SetPlayerJumpscale, Float(2.0)) + Call(PlayerJump, -10, 0, 75, 18) + Call(DisablePlayerInput, FALSE) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_WINDY_MILL) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_SET(GF_MAP_WindyMill, TRUE) - EVT_IF_GE(GB_StoryProgress, STORY_CH4_FRYING_PAN_STOLEN) - EVT_SET(GF_ARN10_Defeated_Goomba, FALSE) - EVT_SET(GF_ARN12_Defeated_Goomba, FALSE) - EVT_SET(GF_ARN13_Defeated_Goomba, FALSE) - EVT_END_IF - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_AnimateGears)) - EVT_CALL(GetDemoState, LVar0) - EVT_IF_NE(LVar0, DEMO_STATE_NONE) - EVT_EXEC_WAIT(N(EVS_PlayDemoScene)) - EVT_RETURN - EVT_END_IF - EVT_EXEC(N(EVS_EnterMap)) - EVT_EXEC(N(EVS_SetupHole)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_WINDY_MILL) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Set(GF_MAP_WindyMill, TRUE) + IfGe(GB_StoryProgress, STORY_CH4_FRYING_PAN_STOLEN) + Set(GF_ARN10_Defeated_Goomba, FALSE) + Set(GF_ARN12_Defeated_Goomba, FALSE) + Set(GF_ARN13_Defeated_Goomba, FALSE) + EndIf + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_AnimateGears)) + Call(GetDemoState, LVar0) + IfNe(LVar0, DEMO_STATE_NONE) + ExecWait(N(EVS_PlayDemoScene)) + Return + EndIf + Exec(N(EVS_EnterMap)) + Exec(N(EVS_SetupHole)) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_arn/arn_08/arn_08_3_well.c b/src/world/area_arn/arn_08/arn_08_3_well.c index 5c35b771dcd..767c4aa7a03 100644 --- a/src/world/area_arn/arn_08/arn_08_3_well.c +++ b/src/world/area_arn/arn_08/arn_08_3_well.c @@ -31,29 +31,29 @@ API_CALLABLE(N(AwaitPlayerJumpDown)) { } EvtScript N(EVS_ExitWell) = { - EVT_LOOP(0) - EVT_IF_NE(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WELL) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(N(AwaitPlayerJumpDown)) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(N(AwaitPlayerFallDist)) - EVT_SET(AF_ARN_01, TRUE) - EVT_IF_LT(GB_StoryProgress, STORY_CH3_WENT_DOWN_THE_WELL) - EVT_SET(GB_StoryProgress, STORY_CH3_WENT_DOWN_THE_WELL) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("arn_09"), arn_09_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Loop(0) + IfNe(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WELL) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(N(AwaitPlayerJumpDown)) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(N(AwaitPlayerFallDist)) + Set(AF_ARN_01, TRUE) + IfLt(GB_StoryProgress, STORY_CH3_WENT_DOWN_THE_WELL) + Set(GB_StoryProgress, STORY_CH3_WENT_DOWN_THE_WELL) + EndIf + Call(GotoMap, Ref("arn_09"), arn_09_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_SetupHole) = { - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(90.0), 0, 0, 0, EVT_FLOAT(470.0), EVT_FLOAT(17.0), EVT_FLOAT(-7.0)) - EVT_EXEC(N(EVS_ExitWell)) - EVT_RETURN - EVT_END + Call(SetCamProperties, CAM_DEFAULT, Float(90.0), 0, 0, 0, Float(470.0), Float(17.0), Float(-7.0)) + Exec(N(EVS_ExitWell)) + Return + End }; diff --git a/src/world/area_arn/arn_08/arn_08_4_gears.c b/src/world/area_arn/arn_08/arn_08_4_gears.c index 4e93501149a..bdf20fe0efc 100644 --- a/src/world/area_arn/arn_08/arn_08_4_gears.c +++ b/src/world/area_arn/arn_08/arn_08_4_gears.c @@ -1,19 +1,19 @@ #include "arn_08.h" EvtScript N(EVS_AnimateGears) = { - EVT_CALL(PlaySound, SOUND_LOOP_WINDMILL_GEARS) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LABEL(10) - EVT_CALL(RotateModel, MODEL_o45, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o47, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o46, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o44, LVar0, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o48, LVar0, 0, 0, -1) - EVT_ADD(LVar0, 1) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(PlaySound, SOUND_LOOP_WINDMILL_GEARS) + Thread + Set(LVar0, 0) + Label(10) + Call(RotateModel, MODEL_o45, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o47, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o46, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o44, LVar0, 0, 0, -1) + Call(RotateModel, MODEL_o48, LVar0, 0, 0, -1) + Add(LVar0, 1) + Wait(1) + Goto(10) + EndThread + Return + End }; diff --git a/src/world/area_arn/arn_08/arn_08_5_demo.c b/src/world/area_arn/arn_08/arn_08_5_demo.c index 268f855e0c4..74eefa5f3b3 100644 --- a/src/world/area_arn/arn_08/arn_08_5_demo.c +++ b/src/world/area_arn/arn_08/arn_08_5_demo.c @@ -12,91 +12,91 @@ API_CALLABLE(N(SetPartnerFollowDist)) { } EvtScript N(EVS_ProvideDemoInputs) = { - EVT_CALL(N(InitializeDemoEquipment)) - EVT_CALL(DemoJoystickXY, 2, 0) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 12, 4) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 28, 11) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 47, 22) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 68, 38) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 67, 48) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 64, 59) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 64, 62) - EVT_WAIT(4) - EVT_CALL(DemoSetButtons, BUTTON_A) - EVT_WAIT(10) - EVT_CALL(DemoJoystickXY, 64, 58) - EVT_CALL(DemoSetButtons, 0) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 70, 34) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 77, -2) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 74, -23) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 71, -36) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 69, -44) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 67, -49) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 30, -30) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 0, 0) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 0, -1) - EVT_WAIT(8) - EVT_CALL(DemoSetButtons, BUTTON_A) - EVT_WAIT(2) - EVT_CALL(DemoJoystickXY, 0, -2) - EVT_WAIT(2) - EVT_CALL(DemoJoystickXY, 0, -1) - EVT_WAIT(2) - EVT_CALL(DemoJoystickXY, 0, 0) - EVT_WAIT(1) - EVT_CALL(DemoSetButtons, 0) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 1, 0) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 0, 0) - EVT_CALL(N(SetPartnerFollowDist)) - EVT_CALL(DemoSetButtons, BUTTON_A) - EVT_WAIT(12) - EVT_CALL(DemoSetButtons, 0) - EVT_WAIT(20) - EVT_IF_EQ(GF_DemoSceneDone, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_DemoSceneDone, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("arn_08"), arn_08_ENTRY_2, TRANSITION_END_DEMO_SCENE_BLACK) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(N(InitializeDemoEquipment)) + Call(DemoJoystickXY, 2, 0) + Wait(1) + Call(DemoJoystickXY, 12, 4) + Wait(1) + Call(DemoJoystickXY, 28, 11) + Wait(1) + Call(DemoJoystickXY, 47, 22) + Wait(1) + Call(DemoJoystickXY, 68, 38) + Wait(1) + Call(DemoJoystickXY, 67, 48) + Wait(1) + Call(DemoJoystickXY, 64, 59) + Wait(1) + Call(DemoJoystickXY, 64, 62) + Wait(4) + Call(DemoSetButtons, BUTTON_A) + Wait(10) + Call(DemoJoystickXY, 64, 58) + Call(DemoSetButtons, 0) + Wait(1) + Call(DemoJoystickXY, 70, 34) + Wait(1) + Call(DemoJoystickXY, 77, -2) + Wait(1) + Call(DemoJoystickXY, 74, -23) + Wait(1) + Call(DemoJoystickXY, 71, -36) + Wait(1) + Call(DemoJoystickXY, 69, -44) + Wait(1) + Call(DemoJoystickXY, 67, -49) + Wait(1) + Call(DemoJoystickXY, 30, -30) + Wait(1) + Call(DemoJoystickXY, 0, 0) + Wait(1) + Call(DemoJoystickXY, 0, -1) + Wait(8) + Call(DemoSetButtons, BUTTON_A) + Wait(2) + Call(DemoJoystickXY, 0, -2) + Wait(2) + Call(DemoJoystickXY, 0, -1) + Wait(2) + Call(DemoJoystickXY, 0, 0) + Wait(1) + Call(DemoSetButtons, 0) + Wait(1) + Call(DemoJoystickXY, 1, 0) + Wait(1) + Call(DemoJoystickXY, 0, 0) + Call(N(SetPartnerFollowDist)) + Call(DemoSetButtons, BUTTON_A) + Wait(12) + Call(DemoSetButtons, 0) + Wait(20) + IfEq(GF_DemoSceneDone, TRUE) + Return + EndIf + Set(GF_DemoSceneDone, TRUE) + Call(GotoMapSpecial, Ref("arn_08"), arn_08_ENTRY_2, TRANSITION_END_DEMO_SCENE_BLACK) + Wait(100) + Return + End }; EvtScript N(EVS_MonitorDemoState) = { - EVT_WAIT(10) - EVT_LOOP(0) - EVT_CALL(GetDemoState, LVar0) - EVT_IF_EQ(LVar0, DEMO_STATE_CHANGE_MAP) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(GF_DemoSceneDone, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_DemoSceneDone, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("arn_08"), arn_08_ENTRY_2, TRANSITION_END_DEMO_SCENE_WHITE) - EVT_WAIT(35) - EVT_RETURN - EVT_END + Wait(10) + Loop(0) + Call(GetDemoState, LVar0) + IfEq(LVar0, DEMO_STATE_CHANGE_MAP) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(GF_DemoSceneDone, TRUE) + Return + EndIf + Set(GF_DemoSceneDone, TRUE) + Call(GotoMapSpecial, Ref("arn_08"), arn_08_ENTRY_2, TRANSITION_END_DEMO_SCENE_WHITE) + Wait(35) + Return + End }; API_CALLABLE(N(func_802400F4_BF4894)) { @@ -120,9 +120,9 @@ API_CALLABLE(N(func_802400F4_BF4894)) { } EvtScript N(EVS_8024116C) = { - EVT_CALL(N(func_802400F4_BF4894)) - EVT_RETURN - EVT_END + Call(N(func_802400F4_BF4894)) + Return + End }; s32 N(DemoInitState) = 0; @@ -154,11 +154,11 @@ API_CALLABLE(N(SetupDemoScene)) { } EvtScript N(EVS_PlayDemoScene) = { - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(90.0), 0, 0, 0, EVT_FLOAT(470.0), EVT_FLOAT(17.0), EVT_FLOAT(-7.0)) - EVT_CALL(N(SetupDemoScene)) - EVT_SET(GF_DemoSceneDone, FALSE) - EVT_EXEC(N(EVS_MonitorDemoState)) - EVT_EXEC(N(EVS_ProvideDemoInputs)) - EVT_RETURN - EVT_END + Call(SetCamProperties, CAM_DEFAULT, Float(90.0), 0, 0, 0, Float(470.0), Float(17.0), Float(-7.0)) + Call(N(SetupDemoScene)) + Set(GF_DemoSceneDone, FALSE) + Exec(N(EVS_MonitorDemoState)) + Exec(N(EVS_ProvideDemoInputs)) + Return + End }; diff --git a/src/world/area_arn/arn_08/arn_08_6_npc.c b/src/world/area_arn/arn_08/arn_08_6_npc.c index 5da299754d6..25d2b7b3458 100644 --- a/src/world/area_arn/arn_08/arn_08_6_npc.c +++ b/src/world/area_arn/arn_08/arn_08_6_npc.c @@ -4,45 +4,45 @@ #include "world/common/npc/Yakkey.inc.c" EvtScript N(EVS_NpcIdle_TubbasHeart) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInit_TubbasHeart) = { - EVT_IF_NE(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WELL) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_ELSE - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TubbasHeart))) - EVT_END_IF - EVT_RETURN - EVT_END + IfNe(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WELL) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Else + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_TubbasHeart))) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Yakkey) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_WHALE_MOUTH_OPEN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 0, MSG_CH3_00BA) - EVT_CASE_LT(STORY_CH6_FLOWER_GATE_OPEN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 0, MSG_CH3_00BB) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 0, MSG_CH3_00BC) - EVT_CASE_LT(STORY_CH8_OPENED_PATH_TO_STAR_WAY) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 0, MSG_CH3_00BD) - EVT_CASE_GE(STORY_CH8_OPENED_PATH_TO_STAR_WAY) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 0, MSG_CH3_00BE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_WHALE_MOUTH_OPEN) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 0, MSG_CH3_00BA) + CaseLt(STORY_CH6_FLOWER_GATE_OPEN) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 0, MSG_CH3_00BB) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 0, MSG_CH3_00BC) + CaseLt(STORY_CH8_OPENED_PATH_TO_STAR_WAY) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 0, MSG_CH3_00BD) + CaseGe(STORY_CH8_OPENED_PATH_TO_STAR_WAY) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 0, MSG_CH3_00BE) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Yakkey) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH4_FRYING_PAN_STOLEN) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_ELSE - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Yakkey))) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH4_FRYING_PAN_STOLEN) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Else + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Yakkey))) + EndIf + Return + End }; NpcData N(NpcData_TubbasHeart) = { diff --git a/src/world/area_arn/arn_08/arn_08_7_entity.c b/src/world/area_arn/arn_08/arn_08_7_entity.c index d6aa214d0f9..2268574a019 100644 --- a/src/world/area_arn/arn_08/arn_08_7_entity.c +++ b/src/world/area_arn/arn_08/arn_08_7_entity.c @@ -2,9 +2,9 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH3_WENT_DOWN_THE_WELL) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BoardedFloor), 0, 30, 0, 0, MAKE_ENTITY_END) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH3_WENT_DOWN_THE_WELL) + Call(MakeEntity, Ref(Entity_BoardedFloor), 0, 30, 0, 0, MAKE_ENTITY_END) + EndIf + Return + End }; diff --git a/src/world/area_arn/arn_09/arn_09_1_music.c b/src/world/area_arn/arn_09/arn_09_1_music.c index f15656b781f..018e56433fe 100644 --- a/src/world/area_arn/arn_09/arn_09_1_music.c +++ b/src/world/area_arn/arn_09/arn_09_1_music.c @@ -1,14 +1,14 @@ #include "arn_09.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_HEART_FLED_FIRST_TUNNEL) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_HEART_FLED_FIRST_TUNNEL) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_arn/arn_09/arn_09_2_main.c b/src/world/area_arn/arn_09/arn_09_2_main.c index 4f20df5fcb5..2d6242131e2 100644 --- a/src/world/area_arn/arn_09/arn_09_2_main.c +++ b/src/world/area_arn/arn_09/arn_09_2_main.c @@ -4,36 +4,36 @@ EvtScript N(EVS_ExitDoor_arn_10_0) = EVT_EXIT_SPLIT_SINGLE_DOOR(arn_09_ENTRY_0, COLLIDER_tte, MODEL_doa, MODEL_o37, DOOR_SWING_OUT); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_arn_10_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoor_arn_10_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(arn_09_ENTRY_0) - EVT_SET(LVar2, MODEL_doa) - EVT_SET(LVar4, MODEL_o37) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSplitSingleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(arn_09_ENTRY_1) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(arn_09_ENTRY_0) + Set(LVar2, MODEL_doa) + Set(LVar4, MODEL_o37) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSplitSingleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(arn_09_ENTRY_1) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_WINDY_MILL) - EVT_CALL(SetSpriteShading, SHADING_ARN_09) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_EXEC(N(EVS_LaunchPlayer)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_WINDY_MILL) + Call(SetSpriteShading, SHADING_ARN_09) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_EnterMap)) + Exec(N(EVS_LaunchPlayer)) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_arn/arn_09/arn_09_3_entity.c b/src/world/area_arn/arn_09/arn_09_3_entity.c index c40ccc76b9a..683f8618a1b 100644 --- a/src/world/area_arn/arn_09/arn_09_3_entity.c +++ b/src/world/area_arn/arn_09/arn_09_3_entity.c @@ -2,27 +2,27 @@ #include "entity.h" EvtScript N(EVS_UseSpring) = { - EVT_IF_EQ(AF_ARN_01, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(AF_ARN_01, TRUE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAUNCH) - EVT_WAIT(1) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(PlayerJump, 0, 200, 0, 30) - EVT_CALL(GotoMap, EVT_PTR("arn_08"), arn_08_ENTRY_1) - EVT_WAIT(100) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_RETURN - EVT_END + IfEq(AF_ARN_01, TRUE) + Return + EndIf + Set(AF_ARN_01, TRUE) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAUNCH) + Wait(1) + Call(SetPlayerJumpscale, Float(1.0)) + Call(PlayerJump, 0, 200, 0, 30) + Call(GotoMap, Ref("arn_08"), arn_08_ENTRY_1) + Wait(100) + Call(DisablePlayerInput, FALSE) + Call(DisablePlayerPhysics, FALSE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_ScriptSpring), 0, 0, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_UseSpring))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_ScriptSpring), 0, 0, 0, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_UseSpring))) + Return + End }; diff --git a/src/world/area_arn/arn_09/arn_09_4_launch.c b/src/world/area_arn/arn_09/arn_09_4_launch.c index 4f120be6386..abb640301aa 100644 --- a/src/world/area_arn/arn_09/arn_09_4_launch.c +++ b/src/world/area_arn/arn_09/arn_09_4_launch.c @@ -2,19 +2,19 @@ #include "sprite/player.h" EvtScript N(EVS_LaunchPlayer) = { - EVT_IF_EQ(AF_ARN_01, FALSE) - EVT_RETURN - EVT_END_IF - EVT_SET(AF_ARN_01, TRUE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_FALLING) - EVT_CALL(func_802D2484) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAUNCH) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.5)) - EVT_CALL(PlayerJump, 50, 0, 0, 16) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_SET(AF_ARN_01, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + IfEq(AF_ARN_01, FALSE) + Return + EndIf + Set(AF_ARN_01, TRUE) + Call(DisablePlayerInput, TRUE) + Call(SetPlayerActionState, ACTION_STATE_FALLING) + Call(func_802D2484) + Call(SetPlayerActionState, ACTION_STATE_LAUNCH) + Call(SetPlayerJumpscale, Float(1.5)) + Call(PlayerJump, 50, 0, 0, 16) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Set(AF_ARN_01, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_arn/arn_09/arn_09_5_npc.c b/src/world/area_arn/arn_09/arn_09_5_npc.c index 15298679cfd..98e61915568 100644 --- a/src/world/area_arn/arn_09/arn_09_5_npc.c +++ b/src/world/area_arn/arn_09/arn_09_5_npc.c @@ -18,31 +18,31 @@ API_CALLABLE(N(PlaySpringAnimation)) { } EvtScript N(EVS_NpcIdle_TubbasHeart) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.5)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 0, 25, -10, 6 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SPRING, SOUND_SPACE_DEFAULT) - EVT_CALL(N(PlaySpringAnimation)) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.5)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 0, 200, 0, 15 * DT) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_SET(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WELL) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13) + Call(SetNpcJumpscale, NPC_SELF, Float(2.5)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 0, 25, -10, 6 * DT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SPRING, SOUND_SPACE_DEFAULT) + Call(N(PlaySpringAnimation)) + Call(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13) + Call(SetNpcJumpscale, NPC_SELF, Float(2.5)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 0, 200, 0, 15 * DT) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Set(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WELL) + Return + End }; EvtScript N(EVS_NpcInit_TubbasHeart) = { - EVT_IF_NE(GB_StoryProgress, STORY_CH3_HEART_FLED_SECOND_TUNNEL) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_ELSE - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TubbasHeart))) - EVT_END_IF - EVT_RETURN - EVT_END + IfNe(GB_StoryProgress, STORY_CH3_HEART_FLED_SECOND_TUNNEL) + Call(RemoveNpc, NPC_SELF) + Else + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_TubbasHeart))) + EndIf + Return + End }; NpcData N(NpcData_TubbasHeart) = { diff --git a/src/world/area_arn/arn_10/arn_10_1_music.c b/src/world/area_arn/arn_10/arn_10_1_music.c index 9da63224b31..2f956c38b64 100644 --- a/src/world/area_arn/arn_10/arn_10_1_music.c +++ b/src/world/area_arn/arn_10/arn_10_1_music.c @@ -1,14 +1,14 @@ #include "arn_10.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_HEART_FLED_FIRST_TUNNEL) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_HEART_FLED_FIRST_TUNNEL) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_arn/arn_10/arn_10_2_main.c b/src/world/area_arn/arn_10/arn_10_2_main.c index eb29886851f..cd542f2349d 100644 --- a/src/world/area_arn/arn_10/arn_10_2_main.c +++ b/src/world/area_arn/arn_10/arn_10_2_main.c @@ -7,39 +7,39 @@ EvtScript N(EVS_ExitDoor_arn_12_0) = EVT_EXIT_SINGLE_DOOR(arn_10_ENTRY_1, "arn_1 COLLIDER_tte, MODEL_o37, DOOR_SWING_OUT); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_arn_09_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_arn_12_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoor_arn_09_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoor_arn_12_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(arn_10_ENTRY_0) - EVT_SET(LVar2, MODEL_o44) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(arn_10_ENTRY_1) - EVT_SET(LVar2, MODEL_o37) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(arn_10_ENTRY_0) + Set(LVar2, MODEL_o44) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(arn_10_ENTRY_1) + Set(LVar2, MODEL_o37) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSingleDoor) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_WINDY_MILL) - EVT_CALL(SetSpriteShading, SHADING_ARN_10) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_WINDY_MILL) + Call(SetSpriteShading, SHADING_ARN_10) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_arn/arn_10/arn_10_3_npc.c b/src/world/area_arn/arn_10/arn_10_3_npc.c index 1c14b2a7de5..e8878f1c478 100644 --- a/src/world/area_arn/arn_10/arn_10_3_npc.c +++ b/src/world/area_arn/arn_10/arn_10_3_npc.c @@ -4,59 +4,59 @@ #include "world/common/enemy/HyperGoomba_Wander.inc.c" EvtScript N(EVS_NpcIdle_TubbasHeart) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(3.0)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 8) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim14) - EVT_WAIT(1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13) - EVT_SUB(LVar0, 80) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.5)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 12) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim14) - EVT_WAIT(1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13) - EVT_SUB(LVar0, 80) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.5)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 12) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_SET(GB_StoryProgress, STORY_CH3_HEART_FLED_SECOND_TUNNEL) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13) + Call(SetNpcJumpscale, NPC_SELF, Float(3.0)) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 8) + Call(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim14) + Wait(1) + Call(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13) + Sub(LVar0, 80) + Call(SetNpcJumpscale, NPC_SELF, Float(2.5)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 12) + Call(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim14) + Wait(1) + Call(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13) + Sub(LVar0, 80) + Call(SetNpcJumpscale, NPC_SELF, Float(2.5)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 12) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Set(GB_StoryProgress, STORY_CH3_HEART_FLED_SECOND_TUNNEL) + Return + End }; EvtScript N(EVS_NpcDefeat_HyperGoomba) = { - EVT_SET(GF_ARN10_Defeated_Goomba, TRUE) - EVT_CALL(DoNpcDefeat) - EVT_RETURN - EVT_END + Set(GF_ARN10_Defeated_Goomba, TRUE) + Call(DoNpcDefeat) + Return + End }; EvtScript N(EVS_NpcInit_TubbasHeart) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TubbasHeart))) - EVT_IF_NE(GB_StoryProgress, STORY_UNUSED_FFFFFFEC) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_TubbasHeart))) + IfNe(GB_StoryProgress, STORY_UNUSED_FFFFFFEC) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_HyperGoomba) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH4_FRYING_PAN_STOLEN) - EVT_IF_EQ(GF_ARN10_Defeated_Goomba, TRUE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_HyperGoomba))) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH4_FRYING_PAN_STOLEN) + IfEq(GF_ARN10_Defeated_Goomba, TRUE) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_HyperGoomba))) + EndIf + Return + End }; NpcData N(NpcData_TubbasHeart) = { diff --git a/src/world/area_arn/arn_10/arn_10_4_entity.c b/src/world/area_arn/arn_10/arn_10_4_entity.c index 206e3e2881d..febb6086eec 100644 --- a/src/world/area_arn/arn_10/arn_10_4_entity.c +++ b/src/world/area_arn/arn_10/arn_10_4_entity.c @@ -2,16 +2,16 @@ #include "entity.h" EvtScript N(EVS_ReadSign) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0182, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_0182, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Signpost), 200, 0, -40, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_ReadSign))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Signpost), 200, 0, -40, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_ReadSign))) + Return + End }; diff --git a/src/world/area_arn/arn_11/arn_11_1_music.c b/src/world/area_arn/arn_11/arn_11_1_music.c index d8754945f18..72e133c3b06 100644 --- a/src/world/area_arn/arn_11/arn_11_1_music.c +++ b/src/world/area_arn/arn_11/arn_11_1_music.c @@ -1,14 +1,14 @@ #include "arn_11.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_WENT_DOWN_THE_WELL) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_WENT_DOWN_THE_WELL) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_arn/arn_11/arn_11_2_main.c b/src/world/area_arn/arn_11/arn_11_2_main.c index 5d33369fa3f..bfa9642e331 100644 --- a/src/world/area_arn/arn_11/arn_11_2_main.c +++ b/src/world/area_arn/arn_11/arn_11_2_main.c @@ -2,101 +2,101 @@ #include "sprite/player.h" EvtScript N(EVS_SetupCamera) = { - EVT_CALL(SetCamType, CAM_DEFAULT, 6, TRUE) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 60, 30, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 60, 30, 0) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(20.0), EVT_FLOAT(-13.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 275) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(SetCamType, CAM_DEFAULT, 6, TRUE) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(UseSettingsFrom, CAM_DEFAULT, 60, 30, 0) + Call(SetPanTarget, CAM_DEFAULT, 60, 30, 0) + Call(SetCamPitch, CAM_DEFAULT, Float(20.0), Float(-13.0)) + Call(SetCamDistance, CAM_DEFAULT, 275) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_Scene_MeetHeart) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PlayerMoveTo, 6, 0, 0) - EVT_CALL(SpeakToPlayer, NPC_TubbasHeart, ANIM_TubbasHeart_Anim0B, ANIM_TubbasHeart_Anim01, 0, MSG_CH3_00BF) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(40 * DT) - EVT_CALL(SpeakToPlayer, NPC_TubbasHeart, ANIM_TubbasHeart_Anim0B, ANIM_TubbasHeart_Anim01, 0, MSG_CH3_00C0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW3_ShakeHead) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToPlayer, NPC_TubbasHeart, ANIM_TubbasHeart_Anim0B, ANIM_TubbasHeart_Anim01, 0, MSG_CH3_00C1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW3_ShakeHead) - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_TubbasHeart, EVT_FLOAT(2.5)) - EVT_CALL(GetNpcPos, NPC_TubbasHeart, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_TubbasHeart, LVar0, LVar1, LVar2, 10 * DT) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_TubbasHeart, LVar0, LVar1, LVar2, 10 * DT) - EVT_END_THREAD - EVT_WAIT(40 * DT) - EVT_CALL(SpeakToPlayer, NPC_TubbasHeart, ANIM_TubbasHeart_Anim0B, ANIM_TubbasHeart_Anim01, 0, MSG_CH3_00C2) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW3_ShakeHead) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcVar, NPC_TubbasHeart, 0, 1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Wait(30 * DT) + Call(SetPlayerSpeed, Float(3.0 / DT)) + Call(PlayerMoveTo, 6, 0, 0) + Call(SpeakToPlayer, NPC_TubbasHeart, ANIM_TubbasHeart_Anim0B, ANIM_TubbasHeart_Anim01, 0, MSG_CH3_00BF) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(40 * DT) + Call(SpeakToPlayer, NPC_TubbasHeart, ANIM_TubbasHeart_Anim0B, ANIM_TubbasHeart_Anim01, 0, MSG_CH3_00C0) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_MarioW3_ShakeHead) + Wait(30 * DT) + Call(SpeakToPlayer, NPC_TubbasHeart, ANIM_TubbasHeart_Anim0B, ANIM_TubbasHeart_Anim01, 0, MSG_CH3_00C1) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_MarioW3_ShakeHead) + Thread + Call(SetNpcJumpscale, NPC_TubbasHeart, Float(2.5)) + Call(GetNpcPos, NPC_TubbasHeart, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_TubbasHeart, LVar0, LVar1, LVar2, 10 * DT) + Wait(1) + Call(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_TubbasHeart, LVar0, LVar1, LVar2, 10 * DT) + EndThread + Wait(40 * DT) + Call(SpeakToPlayer, NPC_TubbasHeart, ANIM_TubbasHeart_Anim0B, ANIM_TubbasHeart_Anim01, 0, MSG_CH3_00C2) + Call(SetPlayerAnimation, ANIM_MarioW3_ShakeHead) + Wait(10 * DT) + Call(SetNpcVar, NPC_TubbasHeart, 0, 1) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_ExitDoor_arn_13_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, arn_11_ENTRY_0) - EVT_SET(LVar1, COLLIDER_ttw) - EVT_SET(LVar2, MODEL_o37) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("arn_13"), arn_13_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, arn_11_ENTRY_0) + Set(LVar1, COLLIDER_ttw) + Set(LVar2, MODEL_o37) + Set(LVar3, DOOR_SWING_IN) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("arn_13"), arn_13_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_arn_13_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoor_arn_13_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar2, MODEL_o37) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_IF_LT(GB_StoryProgress, STORY_CH3_HEART_FLED_FIRST_TUNNEL) - EVT_WAIT(10) - EVT_EXEC(N(EVS_SetupCamera)) - EVT_EXEC(N(EVS_Scene_MeetHeart)) - EVT_WAIT(1) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Set(LVar2, MODEL_o37) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + Exec(N(EVS_BindExitTriggers)) + IfLt(GB_StoryProgress, STORY_CH3_HEART_FLED_FIRST_TUNNEL) + Wait(10) + Exec(N(EVS_SetupCamera)) + Exec(N(EVS_Scene_MeetHeart)) + Wait(1) + EndIf + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_WINDY_MILL) - EVT_CALL(SetSpriteShading, SHADING_ARN_11) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_WINDY_MILL) + Call(SetSpriteShading, SHADING_ARN_11) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_arn/arn_11/arn_11_3_npc.c b/src/world/area_arn/arn_11/arn_11_3_npc.c index a2bb3e5d9bc..550608e28ee 100644 --- a/src/world/area_arn/arn_11/arn_11_3_npc.c +++ b/src/world/area_arn/arn_11/arn_11_3_npc.c @@ -3,58 +3,58 @@ #include "world/common/npc/TubbasHeart.inc.c" EvtScript N(EVS_NpcIdle_TubbasHeart) = { - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_THREAD - EVT_CALL(SetCamType, CAM_DEFAULT, 6, TRUE) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 3000) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(StartBossBattle, SONG_TUBBA_BLUBBA_BATTLE) - EVT_RETURN - EVT_END + Loop(0) + Call(GetSelfVar, 0, LVar0) + IfNe(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Thread + Call(SetCamType, CAM_DEFAULT, 6, TRUE) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 3000) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndThread + Call(StartBossBattle, SONG_TUBBA_BLUBBA_BATTLE) + Return + End }; EvtScript N(EVS_Heart_OpenDoor) = { - EVT_WAIT(15) - EVT_CALL(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 80, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o37, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Wait(15) + Call(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 80, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o37, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_Heart_CloseDoor) = { - EVT_CALL(MakeLerp, 80, 0, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o37, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_RETURN - EVT_END + Call(MakeLerp, 80, 0, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o37, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Return + End }; #define SUBLIST_DONE -10000 @@ -70,83 +70,83 @@ Vec3i N(HeartJumpPath)[] = { }; EvtScript N(EVS_Scene_HeartEscape) = { - EVT_THREAD - EVT_CALL(SetCamType, CAM_DEFAULT, 6, TRUE) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(PlayerFaceNpc, NPC_TubbasHeart, TRUE) - EVT_LOOP(2) - EVT_CALL(GetNpcPos, NPC_TubbasHeart, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_TubbasHeart, EVT_FLOAT(2.5)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_TubbasHeart, LVar0, LVar1, LVar2, 12 * DT) - EVT_WAIT(1) - EVT_END_LOOP - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, TRUE) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -56, 70) - EVT_CALL(SetCamPosB, CAM_DEFAULT, -90, 40) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_CALL(PlayerFaceNpc, NPC_TubbasHeart, TRUE) - EVT_USE_BUF(EVT_PTR(N(HeartJumpPath))) - EVT_LOOP(0) - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar0, SUBLIST_DONE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_TubbasHeart, LVar0, LVar1, LVar2, 12 * DT) - EVT_WAIT(1) - EVT_END_LOOP - EVT_EXEC(N(EVS_Heart_OpenDoor)) - EVT_LOOP(0) - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar0, SUBLIST_DONE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_TubbasHeart, LVar0, LVar1, LVar2, 12 * DT) - EVT_WAIT(1) - EVT_END_LOOP - EVT_EXEC(N(EVS_Heart_CloseDoor)) - EVT_WAIT(30 * DT) - EVT_CALL(SetCamType, CAM_DEFAULT, 6, TRUE) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_SET(GB_StoryProgress, STORY_CH3_HEART_FLED_FIRST_TUNNEL) - EVT_RETURN - EVT_END + Thread + Call(SetCamType, CAM_DEFAULT, 6, TRUE) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 450) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Wait(10 * DT) + Call(PlayerFaceNpc, NPC_TubbasHeart, TRUE) + Loop(2) + Call(GetNpcPos, NPC_TubbasHeart, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_TubbasHeart, Float(2.5)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_TubbasHeart, LVar0, LVar1, LVar2, 12 * DT) + Wait(1) + EndLoop + Thread + Wait(10 * DT) + Call(SetCamType, CAM_DEFAULT, 4, TRUE) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-7.0)) + Call(SetCamDistance, CAM_DEFAULT, 450) + Call(SetCamPosA, CAM_DEFAULT, -56, 70) + Call(SetCamPosB, CAM_DEFAULT, -90, 40) + Call(SetCamPosC, CAM_DEFAULT, 0, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Call(PlayerFaceNpc, NPC_TubbasHeart, TRUE) + UseBuf(Ref(N(HeartJumpPath))) + Loop(0) + BufRead3(LVar0, LVar1, LVar2) + IfEq(LVar0, SUBLIST_DONE) + BreakLoop + EndIf + Call(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_TubbasHeart, LVar0, LVar1, LVar2, 12 * DT) + Wait(1) + EndLoop + Exec(N(EVS_Heart_OpenDoor)) + Loop(0) + BufRead3(LVar0, LVar1, LVar2) + IfEq(LVar0, SUBLIST_DONE) + BreakLoop + EndIf + Call(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_TubbasHeart, LVar0, LVar1, LVar2, 12 * DT) + Wait(1) + EndLoop + Exec(N(EVS_Heart_CloseDoor)) + Wait(30 * DT) + Call(SetCamType, CAM_DEFAULT, 6, TRUE) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 450) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Set(GB_StoryProgress, STORY_CH3_HEART_FLED_FIRST_TUNNEL) + Return + End }; EvtScript N(EVS_NpcInit_TubbasHeart) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH3_HEART_FLED_FIRST_TUNNEL) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_ELSE - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TubbasHeart))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_Scene_HeartEscape))) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH3_HEART_FLED_FIRST_TUNNEL) + Call(RemoveNpc, NPC_SELF) + Else + Call(SetSelfVar, 0, 0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_TubbasHeart))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_Scene_HeartEscape))) + EndIf + Return + End }; NpcData N(NpcData_TubbasHeart) = { diff --git a/src/world/area_arn/arn_12/arn_12_1_music.c b/src/world/area_arn/arn_12/arn_12_1_music.c index 2d23eae15bb..ee66a8b482b 100644 --- a/src/world/area_arn/arn_12/arn_12_1_music.c +++ b/src/world/area_arn/arn_12/arn_12_1_music.c @@ -1,14 +1,14 @@ #include "arn_12.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_HEART_FLED_FIRST_TUNNEL) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_HEART_FLED_FIRST_TUNNEL) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_arn/arn_12/arn_12_2_main.c b/src/world/area_arn/arn_12/arn_12_2_main.c index 9fce7478e41..6672e43c869 100644 --- a/src/world/area_arn/arn_12/arn_12_2_main.c +++ b/src/world/area_arn/arn_12/arn_12_2_main.c @@ -7,38 +7,38 @@ EvtScript N(EVS_ExitDoor_arn_13_0) = EVT_EXIT_SINGLE_DOOR(arn_12_ENTRY_1, "arn_1 COLLIDER_tte, MODEL_o37, DOOR_SWING_OUT); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_arn_10_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_arn_13_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoor_arn_10_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoor_arn_13_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(arn_12_ENTRY_0) - EVT_SET(LVar2, MODEL_o44) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(arn_12_ENTRY_1) - EVT_SET(LVar2, MODEL_o37) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(arn_12_ENTRY_0) + Set(LVar2, MODEL_o44) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(arn_12_ENTRY_1) + Set(LVar2, MODEL_o37) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSingleDoor) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_WINDY_MILL) - EVT_CALL(SetSpriteShading, SHADING_ARN_12) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_WINDY_MILL) + Call(SetSpriteShading, SHADING_ARN_12) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_EnterMap)) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_arn/arn_12/arn_12_3_npc.c b/src/world/area_arn/arn_12/arn_12_3_npc.c index e181dcd45aa..7ee57bec6ba 100644 --- a/src/world/area_arn/arn_12/arn_12_3_npc.c +++ b/src/world/area_arn/arn_12/arn_12_3_npc.c @@ -4,60 +4,60 @@ #include "world/common/enemy/HyperGoomba_Wander.inc.c" EvtScript N(EVS_NpcIdle_TubbasHeart) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(3.0)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 8) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim14) - EVT_WAIT(1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13) - EVT_SUB(LVar0, 80) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.5)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 12) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim14) - EVT_WAIT(1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13) - EVT_SUB(LVar0, 80) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.5)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 12) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_SET(GB_StoryProgress, STORY_UNUSED_FFFFFFEC) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13) + Call(SetNpcJumpscale, NPC_SELF, Float(3.0)) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 8) + Call(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim14) + Wait(1) + Call(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13) + Sub(LVar0, 80) + Call(SetNpcJumpscale, NPC_SELF, Float(2.5)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 12) + Call(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim14) + Wait(1) + Call(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13) + Sub(LVar0, 80) + Call(SetNpcJumpscale, NPC_SELF, Float(2.5)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 12) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Set(GB_StoryProgress, STORY_UNUSED_FFFFFFEC) + Return + End }; EvtScript N(EVS_NpcDefeat_HyperGoomba) = { - EVT_SET(GF_ARN12_Defeated_Goomba, TRUE) - EVT_CALL(DoNpcDefeat) - EVT_RETURN - EVT_END + Set(GF_ARN12_Defeated_Goomba, TRUE) + Call(DoNpcDefeat) + Return + End }; EvtScript N(EVS_NpcInit_TubbasHeart) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TubbasHeart))) - EVT_IF_NE(GB_StoryProgress, STORY_UNUSED_FFFFFFEB) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_TubbasHeart))) + IfNe(GB_StoryProgress, STORY_UNUSED_FFFFFFEB) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_HyperGoomba) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH4_FRYING_PAN_STOLEN) - EVT_IF_EQ(GF_ARN12_Defeated_Goomba, TRUE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_HyperGoomba))) - EVT_END_IF - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_HyperGoomba))) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH4_FRYING_PAN_STOLEN) + IfEq(GF_ARN12_Defeated_Goomba, TRUE) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_HyperGoomba))) + EndIf + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_HyperGoomba))) + Return + End }; NpcData N(NpcData_TubbasHeart) = { diff --git a/src/world/area_arn/arn_12/arn_12_4_entity.c b/src/world/area_arn/arn_12/arn_12_4_entity.c index 7db7aa19730..b73ae54dc16 100644 --- a/src/world/area_arn/arn_12/arn_12_4_entity.c +++ b/src/world/area_arn/arn_12/arn_12_4_entity.c @@ -2,16 +2,16 @@ #include "entity.h" EvtScript N(EVS_ReadSign) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0183, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_0183, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Signpost), 200, 0, -40, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_ReadSign))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Signpost), 200, 0, -40, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_ReadSign))) + Return + End }; diff --git a/src/world/area_arn/arn_13/arn_13_1_music.c b/src/world/area_arn/arn_13/arn_13_1_music.c index 95248f8da4a..8eb6219f33e 100644 --- a/src/world/area_arn/arn_13/arn_13_1_music.c +++ b/src/world/area_arn/arn_13/arn_13_1_music.c @@ -1,14 +1,14 @@ #include "arn_13.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_HEART_FLED_FIRST_TUNNEL) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_HEART_FLED_FIRST_TUNNEL) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_arn/arn_13/arn_13_2_main.c b/src/world/area_arn/arn_13/arn_13_2_main.c index 86e805c318b..bbce3ad2458 100644 --- a/src/world/area_arn/arn_13/arn_13_2_main.c +++ b/src/world/area_arn/arn_13/arn_13_2_main.c @@ -7,39 +7,39 @@ EvtScript N(EVS_ExitDoor_arn_11_0) = EVT_EXIT_SINGLE_DOOR(arn_13_ENTRY_1, "arn_1 COLLIDER_tte, MODEL_o37, DOOR_SWING_OUT); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_arn_12_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_arn_11_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoor_arn_12_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoor_arn_11_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(arn_13_ENTRY_0) - EVT_SET(LVar2, MODEL_o44) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(arn_13_ENTRY_1) - EVT_SET(LVar2, MODEL_o37) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(arn_13_ENTRY_0) + Set(LVar2, MODEL_o44) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(arn_13_ENTRY_1) + Set(LVar2, MODEL_o37) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSingleDoor) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_WINDY_MILL) - EVT_CALL(SetSpriteShading, SHADING_ARN_13) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_WINDY_MILL) + Call(SetSpriteShading, SHADING_ARN_13) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_arn/arn_13/arn_13_3_npc.c b/src/world/area_arn/arn_13/arn_13_3_npc.c index 5efa177f991..17cc0be90d4 100644 --- a/src/world/area_arn/arn_13/arn_13_3_npc.c +++ b/src/world/area_arn/arn_13/arn_13_3_npc.c @@ -4,60 +4,60 @@ #include "world/common/enemy/HyperGoomba_Wander.inc.c" EvtScript N(EVS_NpcIdle_TubbasHeart) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(3.0)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 8 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim14) - EVT_WAIT(1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13) - EVT_SUB(LVar0, 80) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.5)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 12 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim14) - EVT_WAIT(1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13) - EVT_SUB(LVar0, 80) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.5)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 12 * DT) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_SET(GB_StoryProgress, STORY_CH3_HEART_FLED_SECOND_TUNNEL) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13) + Call(SetNpcJumpscale, NPC_SELF, Float(3.0)) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 8 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim14) + Wait(1) + Call(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13) + Sub(LVar0, 80) + Call(SetNpcJumpscale, NPC_SELF, Float(2.5)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 12 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim14) + Wait(1) + Call(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13) + Sub(LVar0, 80) + Call(SetNpcJumpscale, NPC_SELF, Float(2.5)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_HEART_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 12 * DT) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Set(GB_StoryProgress, STORY_CH3_HEART_FLED_SECOND_TUNNEL) + Return + End }; EvtScript N(EVS_NpcDefeat_HyperGoomba) = { - EVT_SET(GF_ARN13_Defeated_Goomba, TRUE) - EVT_CALL(DoNpcDefeat) - EVT_RETURN - EVT_END + Set(GF_ARN13_Defeated_Goomba, TRUE) + Call(DoNpcDefeat) + Return + End }; EvtScript N(EVS_NpcInit_TubbasHeart) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TubbasHeart))) - EVT_IF_NE(GB_StoryProgress, STORY_CH3_HEART_FLED_FIRST_TUNNEL) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_TubbasHeart))) + IfNe(GB_StoryProgress, STORY_CH3_HEART_FLED_FIRST_TUNNEL) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_HyperGoomba) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH4_FRYING_PAN_STOLEN) - EVT_IF_EQ(GF_ARN13_Defeated_Goomba, TRUE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_HyperGoomba))) - EVT_END_IF - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_HyperGoomba))) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH4_FRYING_PAN_STOLEN) + IfEq(GF_ARN13_Defeated_Goomba, TRUE) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_HyperGoomba))) + EndIf + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_HyperGoomba))) + Return + End }; NpcData N(NpcData_TubbasHeart) = { diff --git a/src/world/area_arn/arn_13/arn_13_4_entity.c b/src/world/area_arn/arn_13/arn_13_4_entity.c index 5e2b4a85d5b..adcd1739275 100644 --- a/src/world/area_arn/arn_13/arn_13_4_entity.c +++ b/src/world/area_arn/arn_13/arn_13_4_entity.c @@ -2,16 +2,16 @@ #include "entity.h" EvtScript N(EVS_ReadSign) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0184, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_0184, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Signpost), 200, 0, -40, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_ReadSign))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Signpost), 200, 0, -40, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_ReadSign))) + Return + End }; diff --git a/src/world/area_dgb/dgb_00/dgb_00_1_music.c b/src/world/area_dgb/dgb_00/dgb_00_1_music.c index 36b1a9951f0..7eb948814e7 100644 --- a/src/world/area_dgb/dgb_00/dgb_00_1_music.c +++ b/src/world/area_dgb/dgb_00/dgb_00_1_music.c @@ -1,15 +1,15 @@ #include "dgb_00.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) - EVT_END_SWITCH - EVT_CALL(ClearAmbientSounds, 250) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_WOKE_UP) + Call(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) + EndSwitch + Call(ClearAmbientSounds, 250) + Return + End }; diff --git a/src/world/area_dgb/dgb_00/dgb_00_2_main.c b/src/world/area_dgb/dgb_00/dgb_00_2_main.c index 9b71707835e..937ed3a7a4a 100644 --- a/src/world/area_dgb/dgb_00/dgb_00_2_main.c +++ b/src/world/area_dgb/dgb_00/dgb_00_2_main.c @@ -10,88 +10,88 @@ s32 N(map_init)(void) { EvtScript N(EVS_ExitWalk_arn_04_1) = EVT_EXIT_WALK(60, dgb_00_ENTRY_0, "arn_04", arn_04_ENTRY_1); EvtScript N(EVS_ExitDoors_dgb_01_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, dgb_00_ENTRY_1) - EVT_SET(LVar1, COLLIDER_deiliwt) - EVT_SET(LVar2, MODEL_d1) - EVT_SET(LVar3, MODEL_d2) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_01"), dgb_01_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, dgb_00_ENTRY_1) + Set(LVar1, COLLIDER_deiliwt) + Set(LVar2, MODEL_d1) + Set(LVar3, MODEL_d2) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_01"), dgb_01_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_arn_04_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_SMASHED_THE_BRIDGES) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_01_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deiliwt, 1, 0) - EVT_CASE_LT(STORY_CH3_ESCAPED_TUBBAS_MANOR) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_EXEC(N(EVS_TubbaTaunting)) - EVT_EXEC_WAIT(N(EVS_SetBoosBracingDoor)) - EVT_CASE_DEFAULT - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_01_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deiliwt, 1, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_arn_04_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_SMASHED_THE_BRIDGES) + BindTrigger(Ref(N(EVS_ExitDoors_dgb_01_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deiliwt, 1, 0) + CaseLt(STORY_CH3_ESCAPED_TUBBAS_MANOR) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Exec(N(EVS_TubbaTaunting)) + ExecWait(N(EVS_SetBoosBracingDoor)) + CaseDefault + BindTrigger(Ref(N(EVS_ExitDoors_dgb_01_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deiliwt, 1, 0) + EndSwitch + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(dgb_00_ENTRY_0) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_CASE_EQ(dgb_00_ENTRY_1) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_TUBBA_SMASHED_THE_BRIDGES) - EVT_IF_LT(GB_StoryProgress, STORY_CH3_ESCAPED_TUBBAS_MANOR) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_THREAD - EVT_EXEC_WAIT(N(EVS_Scene_BoosApproachManor)) - EVT_EXEC_WAIT(N(EVS_Scene_EscapeFromTubba)) - EVT_END_THREAD - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar2, MODEL_d1) - EVT_SET(LVar3, MODEL_d2) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(dgb_00_ENTRY_2) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_EXEC(N(EVS_Scene_ThrownOutBySentinel)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(dgb_00_ENTRY_0) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + CaseEq(dgb_00_ENTRY_1) + IfGe(GB_StoryProgress, STORY_CH3_TUBBA_SMASHED_THE_BRIDGES) + IfLt(GB_StoryProgress, STORY_CH3_ESCAPED_TUBBAS_MANOR) + Exec(N(EVS_BindExitTriggers)) + Thread + ExecWait(N(EVS_Scene_BoosApproachManor)) + ExecWait(N(EVS_Scene_EscapeFromTubba)) + EndThread + Return + EndIf + EndIf + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar2, MODEL_d1) + Set(LVar3, MODEL_d2) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(dgb_00_ENTRY_2) + Exec(N(EVS_BindExitTriggers)) + Exec(N(EVS_Scene_ThrownOutBySentinel)) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TUBBAS_MANOR) - EVT_SET(GF_MAP_TubbasManor, TRUE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, dgb_00_ENTRY_2) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_ELSE - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(BooNPCs))) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TUBBAS_MANOR) + Set(GF_MAP_TubbasManor, TRUE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Call(GetEntryID, LVar0) + IfEq(LVar0, dgb_00_ENTRY_2) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Else + Call(MakeNpcs, FALSE, Ref(N(BooNPCs))) + EndIf + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_dgb/dgb_00/dgb_00_3_npc.c b/src/world/area_dgb/dgb_00/dgb_00_3_npc.c index cfffcb1548a..111d7030f1a 100644 --- a/src/world/area_dgb/dgb_00/dgb_00_3_npc.c +++ b/src/world/area_dgb/dgb_00/dgb_00_3_npc.c @@ -14,426 +14,426 @@ API_CALLABLE(N(PlaySentinelSounds)) { #include "world/common/enemy/Sentinel.h" EvtScript N(EVS_SetDoorRots) = { - EVT_SET(LVar3, 0) - EVT_SUB(LVar3, LVar2) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deiliwt, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deiliwt, SOUND_CREAKY_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 80, 30, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_d2, LVar0, 0, LVar2, 0) - EVT_CALL(RotateModel, MODEL_d1, LVar0, 0, LVar3, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(10) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVar3, 0) + Sub(LVar3, LVar2) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deiliwt, COLLIDER_FLAGS_UPPER_MASK) + Call(PlaySoundAtCollider, COLLIDER_deiliwt, SOUND_CREAKY_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 80, 30, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(RotateModel, MODEL_d2, LVar0, 0, LVar2, 0) + Call(RotateModel, MODEL_d1, LVar0, 0, LVar3, 0) + Wait(1) + IfNe(LVar1, 0) + Goto(10) + EndIf + Return + End }; EvtScript N(EVS_CloseDoors) = { - EVT_SET(LVar3, 0) - EVT_SUB(LVar3, LVar2) - EVT_CALL(MakeLerp, 80, 0, 12, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_d2, LVar0, 0, LVar2, 0) - EVT_CALL(RotateModel, MODEL_d1, LVar0, 0, LVar3, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deiliwt, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deiliwt, SOUND_CREAKY_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_RETURN - EVT_END + Set(LVar3, 0) + Sub(LVar3, LVar2) + Call(MakeLerp, 80, 0, 12, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(RotateModel, MODEL_d2, LVar0, 0, LVar2, 0) + Call(RotateModel, MODEL_d1, LVar0, 0, LVar3, 0) + Wait(1) + IfNe(LVar1, 0) + Goto(10) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deiliwt, COLLIDER_FLAGS_UPPER_MASK) + Call(PlaySoundAtCollider, COLLIDER_deiliwt, SOUND_CREAKY_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Return + End }; EvtScript N(EVS_AdvanceBoo1) = { - EVT_CALL(GetNpcPos, NPC_Boo_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 200) - EVT_CALL(NpcMoveTo, NPC_Boo_01, LVar0, LVar2, 46 * DT) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_Boo_01, LVar0, LVar1, LVar2) + Add(LVar0, 200) + Call(NpcMoveTo, NPC_Boo_01, LVar0, LVar2, 46 * DT) + Return + End }; EvtScript N(EVS_AdvanceBoo2) = { - EVT_CALL(GetNpcPos, NPC_Boo_02, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 200) - EVT_CALL(NpcMoveTo, NPC_Boo_02, LVar0, LVar2, 50 * DT) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_Boo_02, LVar0, LVar1, LVar2) + Add(LVar0, 200) + Call(NpcMoveTo, NPC_Boo_02, LVar0, LVar2, 50 * DT) + Return + End }; EvtScript N(EVS_AdvanceBoo3) = { - EVT_CALL(GetNpcPos, NPC_Boo_03, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 200) - EVT_CALL(NpcMoveTo, NPC_Boo_03, LVar0, LVar2, 53 * DT) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_Boo_03, LVar0, LVar1, LVar2) + Add(LVar0, 200) + Call(NpcMoveTo, NPC_Boo_03, LVar0, LVar2, 53 * DT) + Return + End }; EvtScript N(EVS_AdvanceBoo4) = { - EVT_CALL(GetNpcPos, NPC_Boo_04, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 200) - EVT_CALL(NpcMoveTo, NPC_Boo_04, LVar0, LVar2, 46 * DT) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_Boo_04, LVar0, LVar1, LVar2) + Add(LVar0, 200) + Call(NpcMoveTo, NPC_Boo_04, LVar0, LVar2, 46 * DT) + Return + End }; EvtScript N(EVS_AdvanceBoo5) = { - EVT_CALL(GetNpcPos, NPC_Boo_05, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 200) - EVT_CALL(NpcMoveTo, NPC_Boo_05, LVar0, LVar2, 50 * DT) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_Boo_05, LVar0, LVar1, LVar2) + Add(LVar0, 200) + Call(NpcMoveTo, NPC_Boo_05, LVar0, LVar2, 50 * DT) + Return + End }; EvtScript N(EVS_AdvanceBoo6) = { - EVT_CALL(GetNpcPos, NPC_Boo_06, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 200) - EVT_CALL(NpcMoveTo, NPC_Boo_06, LVar0, LVar2, 53 * DT) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_Boo_06, LVar0, LVar1, LVar2) + Add(LVar0, 200) + Call(NpcMoveTo, NPC_Boo_06, LVar0, LVar2, 53 * DT) + Return + End }; EvtScript N(EVS_AdvanceBooPhalanx) = { - EVT_EXEC(N(EVS_AdvanceBoo1)) - EVT_EXEC(N(EVS_AdvanceBoo2)) - EVT_EXEC(N(EVS_AdvanceBoo3)) - EVT_EXEC(N(EVS_AdvanceBoo4)) - EVT_EXEC(N(EVS_AdvanceBoo5)) - EVT_EXEC(N(EVS_AdvanceBoo6)) - EVT_RETURN - EVT_END + Exec(N(EVS_AdvanceBoo1)) + Exec(N(EVS_AdvanceBoo2)) + Exec(N(EVS_AdvanceBoo3)) + Exec(N(EVS_AdvanceBoo4)) + Exec(N(EVS_AdvanceBoo5)) + Exec(N(EVS_AdvanceBoo6)) + Return + End }; EvtScript N(EVS_BraceDoor1) = { - EVT_CALL(SetNpcJumpscale, NPC_Boo_01, EVT_FLOAT(-0.2)) - EVT_CALL(NpcJump0, NPC_Boo_01, 257, 30, -90, 5 * DT) - EVT_CALL(EnableNpcShadow, NPC_Boo_01, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Boo_01, ANIM_Boo_Tan_Flail) - EVT_RETURN - EVT_END + Call(SetNpcJumpscale, NPC_Boo_01, Float(-0.2)) + Call(NpcJump0, NPC_Boo_01, 257, 30, -90, 5 * DT) + Call(EnableNpcShadow, NPC_Boo_01, FALSE) + Call(SetNpcAnimation, NPC_Boo_01, ANIM_Boo_Tan_Flail) + Return + End }; EvtScript N(EVS_BraceDoor2) = { - EVT_CALL(SetNpcJumpscale, NPC_Boo_02, EVT_FLOAT(-0.3)) - EVT_CALL(NpcJump0, NPC_Boo_02, 272, 112, -81, 12 * DT) - EVT_CALL(EnableNpcShadow, NPC_Boo_02, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Boo_02, ANIM_Boo_Tan_Flail) - EVT_RETURN - EVT_END + Call(SetNpcJumpscale, NPC_Boo_02, Float(-0.3)) + Call(NpcJump0, NPC_Boo_02, 272, 112, -81, 12 * DT) + Call(EnableNpcShadow, NPC_Boo_02, FALSE) + Call(SetNpcAnimation, NPC_Boo_02, ANIM_Boo_Tan_Flail) + Return + End }; EvtScript N(EVS_BraceDoor3) = { - EVT_CALL(SetNpcJumpscale, NPC_Boo_03, EVT_FLOAT(-0.4)) - EVT_CALL(NpcJump0, NPC_Boo_03, 237, 120, -118, 10 * DT) - EVT_CALL(EnableNpcShadow, NPC_Boo_03, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Boo_03, ANIM_Boo_Tan_Flail) - EVT_RETURN - EVT_END + Call(SetNpcJumpscale, NPC_Boo_03, Float(-0.4)) + Call(NpcJump0, NPC_Boo_03, 237, 120, -118, 10 * DT) + Call(EnableNpcShadow, NPC_Boo_03, FALSE) + Call(SetNpcAnimation, NPC_Boo_03, ANIM_Boo_Tan_Flail) + Return + End }; EvtScript N(EVS_BraceDoor4) = { - EVT_CALL(SetNpcJumpscale, NPC_Boo_04, EVT_FLOAT(-0.3)) - EVT_CALL(NpcJump0, NPC_Boo_04, 280, 60, -79, 8 * DT) - EVT_CALL(EnableNpcShadow, NPC_Boo_04, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Boo_04, ANIM_Boo_Tan_Flail) - EVT_RETURN - EVT_END + Call(SetNpcJumpscale, NPC_Boo_04, Float(-0.3)) + Call(NpcJump0, NPC_Boo_04, 280, 60, -79, 8 * DT) + Call(EnableNpcShadow, NPC_Boo_04, FALSE) + Call(SetNpcAnimation, NPC_Boo_04, ANIM_Boo_Tan_Flail) + Return + End }; EvtScript N(EVS_BraceDoor5) = { - EVT_CALL(SetNpcJumpscale, NPC_Boo_05, EVT_FLOAT(-0.4)) - EVT_CALL(NpcJump0, NPC_Boo_05, 250, 81, -97, 9 * DT) - EVT_CALL(EnableNpcShadow, NPC_Boo_05, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Boo_05, ANIM_Boo_Tan_Flail) - EVT_RETURN - EVT_END + Call(SetNpcJumpscale, NPC_Boo_05, Float(-0.4)) + Call(NpcJump0, NPC_Boo_05, 250, 81, -97, 9 * DT) + Call(EnableNpcShadow, NPC_Boo_05, FALSE) + Call(SetNpcAnimation, NPC_Boo_05, ANIM_Boo_Tan_Flail) + Return + End }; EvtScript N(EVS_BraceDoor6) = { - EVT_CALL(SetNpcJumpscale, NPC_Boo_06, EVT_FLOAT(-0.5)) - EVT_CALL(NpcJump0, NPC_Boo_06, 227, 43, -123, 15 * DT) - EVT_CALL(EnableNpcShadow, NPC_Boo_06, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Boo_06, ANIM_Boo_Tan_Flail) - EVT_RETURN - EVT_END + Call(SetNpcJumpscale, NPC_Boo_06, Float(-0.5)) + Call(NpcJump0, NPC_Boo_06, 227, 43, -123, 15 * DT) + Call(EnableNpcShadow, NPC_Boo_06, FALSE) + Call(SetNpcAnimation, NPC_Boo_06, ANIM_Boo_Tan_Flail) + Return + End }; EvtScript N(EVS_BoosBraceDoor) = { - EVT_EXEC(N(EVS_BraceDoor2)) - EVT_EXEC(N(EVS_BraceDoor3)) - EVT_EXEC(N(EVS_BraceDoor4)) - EVT_EXEC(N(EVS_BraceDoor5)) - EVT_EXEC(N(EVS_BraceDoor6)) - EVT_RETURN - EVT_END + Exec(N(EVS_BraceDoor2)) + Exec(N(EVS_BraceDoor3)) + Exec(N(EVS_BraceDoor4)) + Exec(N(EVS_BraceDoor5)) + Exec(N(EVS_BraceDoor6)) + Return + End }; EvtScript N(EVS_LeaderBooShivering) = { - EVT_CALL(GetNpcPos, NPC_Boo_01, LVar0, LVar1, LVar2) - EVT_LOOP(0) - EVT_CALL(RandInt, 5, LVarA) - EVT_ADD(LVarA, 2) - EVT_SET(LVarB, 0) - EVT_LABEL(10) - EVT_SET(LVar3, LVar0) - EVT_ADD(LVar3, 1) - EVT_CALL(SetNpcPos, NPC_Boo_01, LVar3, LVar1, LVar2) - EVT_WAIT(1) - EVT_SET(LVar3, LVar0) - EVT_ADD(LVar3, -1) - EVT_CALL(SetNpcPos, NPC_Boo_01, LVar3, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVarB, 1) - EVT_IF_LT(LVarB, LVarA) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(RandInt, 10, LVarA) - EVT_ADD(LVarA, 10) - EVT_WAIT(LVarA) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_Boo_01, LVar0, LVar1, LVar2) + Loop(0) + Call(RandInt, 5, LVarA) + Add(LVarA, 2) + Set(LVarB, 0) + Label(10) + Set(LVar3, LVar0) + Add(LVar3, 1) + Call(SetNpcPos, NPC_Boo_01, LVar3, LVar1, LVar2) + Wait(1) + Set(LVar3, LVar0) + Add(LVar3, -1) + Call(SetNpcPos, NPC_Boo_01, LVar3, LVar1, LVar2) + Wait(1) + Add(LVarB, 1) + IfLt(LVarB, LVarA) + Goto(10) + EndIf + Call(RandInt, 10, LVarA) + Add(LVarA, 10) + Wait(LVarA) + EndLoop + Return + End }; EvtScript N(EVS_TubbaTaunting) = { - EVT_SET_GROUP(EVT_GROUP_EF) - EVT_LOOP(0) - EVT_CALL(RandInt, 50 * DT, LVar0) - EVT_ADD(LVar0, 80 * DT) - EVT_WAIT(LVar0) - EVT_IF_EQ(MV_PreventTaunting, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(PlaySoundAt, SOUND_TUBBA_POUNDING, SOUND_SPACE_DEFAULT, 240, 10, -125) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(2.0)) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH3_00EF, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_EF) + Loop(0) + Call(RandInt, 50 * DT, LVar0) + Add(LVar0, 80 * DT) + Wait(LVar0) + IfEq(MV_PreventTaunting, FALSE) + Call(DisablePlayerInput, TRUE) + Call(PlaySoundAt, SOUND_TUBBA_POUNDING, SOUND_SPACE_DEFAULT, 240, 10, -125) + Call(ShakeCam, CAM_DEFAULT, 0, 20, Float(2.0)) + Call(ShowMessageAtScreenPos, MSG_CH3_00EF, 160, 40) + Call(DisablePlayerInput, FALSE) + EndIf + EndLoop + Return + End }; EvtScript N(EVS_Scene_BoosApproachManor) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetPlayerPos, 350, 10, -150) - EVT_CALL(InterpPlayerYaw, 270, 1) - EVT_CALL(SetNpcPos, NPC_PARTNER, 350, 10, -150) - EVT_CALL(EnablePartnerAI) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar0, 175) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, -75) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(40 * DT) - EVT_CALL(SetNpcPos, NPC_Boo_01, -60, 10, -70) - EVT_CALL(SetNpcPos, NPC_Boo_02, -100, 10, -110) - EVT_CALL(SetNpcPos, NPC_Boo_03, -140, 10, -150) - EVT_CALL(SetNpcPos, NPC_Boo_04, -100, 10, -30) - EVT_CALL(SetNpcPos, NPC_Boo_05, -140, 10, -70) - EVT_CALL(SetNpcPos, NPC_Boo_06, -180, 10, -100) - EVT_EXEC_WAIT(N(EVS_AdvanceBooPhalanx)) - EVT_WAIT(60 * DT) - EVT_CALL(InterpNpcYaw, NPC_Boo_01, 270, 1) - EVT_CALL(SpeakToPlayer, NPC_Boo_01, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_00DB) - EVT_CALL(SpeakToPlayer, NPC_Boo_05, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_00DC) - EVT_CALL(SpeakToPlayer, NPC_Boo_01, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_00DD) - EVT_CALL(PlaySoundAt, SOUND_TUBBA_POUNDING, SOUND_SPACE_DEFAULT, 240, 10, -125) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(2.0)) - EVT_WAIT(10 * DT) - EVT_CALL(PlaySoundAt, SOUND_TUBBA_POUNDING, SOUND_SPACE_DEFAULT, 240, 10, -125) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(2.0)) - EVT_CALL(InterpNpcYaw, NPC_Boo_01, 90, 1) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH3_00DE, 160, 40) - EVT_CALL(SetPlayerPos, 350, 10, -150) - EVT_CALL(InterpPlayerYaw, 270, 1) - EVT_CALL(SetNpcPos, NPC_PARTNER, 350, 10, -150) - EVT_SET(LVar2, 1) - EVT_EXEC_WAIT(N(EVS_SetDoorRots)) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(SetPlayerPos, 350, 10, -150) + Call(InterpPlayerYaw, 270, 1) + Call(SetNpcPos, NPC_PARTNER, 350, 10, -150) + Call(EnablePartnerAI) + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar0, 175) + Set(LVar1, 0) + Set(LVar2, -75) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(40 * DT) + Call(SetNpcPos, NPC_Boo_01, -60, 10, -70) + Call(SetNpcPos, NPC_Boo_02, -100, 10, -110) + Call(SetNpcPos, NPC_Boo_03, -140, 10, -150) + Call(SetNpcPos, NPC_Boo_04, -100, 10, -30) + Call(SetNpcPos, NPC_Boo_05, -140, 10, -70) + Call(SetNpcPos, NPC_Boo_06, -180, 10, -100) + ExecWait(N(EVS_AdvanceBooPhalanx)) + Wait(60 * DT) + Call(InterpNpcYaw, NPC_Boo_01, 270, 1) + Call(SpeakToPlayer, NPC_Boo_01, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_00DB) + Call(SpeakToPlayer, NPC_Boo_05, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_00DC) + Call(SpeakToPlayer, NPC_Boo_01, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_00DD) + Call(PlaySoundAt, SOUND_TUBBA_POUNDING, SOUND_SPACE_DEFAULT, 240, 10, -125) + Call(ShakeCam, CAM_DEFAULT, 0, 20, Float(2.0)) + Wait(10 * DT) + Call(PlaySoundAt, SOUND_TUBBA_POUNDING, SOUND_SPACE_DEFAULT, 240, 10, -125) + Call(ShakeCam, CAM_DEFAULT, 0, 20, Float(2.0)) + Call(InterpNpcYaw, NPC_Boo_01, 90, 1) + Call(ShowMessageAtScreenPos, MSG_CH3_00DE, 160, 40) + Call(SetPlayerPos, 350, 10, -150) + Call(InterpPlayerYaw, 270, 1) + Call(SetNpcPos, NPC_PARTNER, 350, 10, -150) + Set(LVar2, 1) + ExecWait(N(EVS_SetDoorRots)) + Return + End }; EvtScript N(EVS_Scene_EscapeFromTubba) = { - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(8.0 / DT)) - EVT_CALL(PlayerMoveTo, 184, -44, 0) - EVT_CALL(PlaySoundAtNpc, NPC_Boo_01, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAtNpc, NPC_Boo_02, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAtNpc, NPC_Boo_03, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAtNpc, NPC_Boo_04, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAtNpc, NPC_Boo_05, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAtNpc, NPC_Boo_06, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_Boo_01, EMOTE_EXCLAMATION, 45, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(ShowEmote, NPC_Boo_02, EMOTE_EXCLAMATION, 45, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(ShowEmote, NPC_Boo_03, EMOTE_EXCLAMATION, 45, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(ShowEmote, NPC_Boo_04, EMOTE_EXCLAMATION, 45, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(ShowEmote, NPC_Boo_05, EMOTE_EXCLAMATION, 45, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(ShowEmote, NPC_Boo_06, EMOTE_EXCLAMATION, 45, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(50 * DT) - EVT_SET(LVar2, 1) - EVT_EXEC(N(EVS_CloseDoors)) - EVT_EXEC(N(EVS_BoosBraceDoor)) - EVT_WAIT(20 * DT) - EVT_CALL(SetCamType, CAM_DEFAULT, 6, TRUE) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(6.0 / DT)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-15.0)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC_GET_TID(N(EVS_LeaderBooShivering), LVarA) - EVT_CALL(SpeakToPlayer, NPC_Boo_01, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00DF) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_Boo_01, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00E0) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_Boo_01, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00E1) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PARTNER_GOOMBARIO) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH3_00E2) - EVT_CASE_EQ(PARTNER_KOOPER) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH3_00E3) - EVT_CASE_EQ(PARTNER_BOMBETTE) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH3_00E4) - EVT_CASE_EQ(PARTNER_PARAKARRY) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH3_00E5) - EVT_CASE_EQ(PARTNER_BOW) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_00E6) - EVT_END_SWITCH - EVT_CALL(EnablePartnerAI) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(6.0 / DT)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(PlaySoundAt, SOUND_TUBBA_POUNDING, SOUND_SPACE_DEFAULT, 240, 10, -125) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(2.0)) - EVT_WAIT(5 * DT) - EVT_CALL(PlaySoundAt, SOUND_TUBBA_POUNDING, SOUND_SPACE_DEFAULT, 240, 10, -125) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(2.0)) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH3_00E7, 160, 40) - EVT_EXEC_WAIT(N(EVS_BraceDoor1)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Boo_01, ANIM_Boo_Tan_Flail, ANIM_Boo_Tan_Flail, 5, MSG_CH3_00E8) - EVT_CALL(SetNpcAnimation, NPC_Boo_01, ANIM_Boo_Tan_Flail) - EVT_EXEC(N(EVS_TubbaTaunting)) - EVT_SET(GB_StoryProgress, STORY_CH3_ESCAPED_TUBBAS_MANOR) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(SetPlayerSpeed, Float(8.0 / DT)) + Call(PlayerMoveTo, 184, -44, 0) + Call(PlaySoundAtNpc, NPC_Boo_01, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(PlaySoundAtNpc, NPC_Boo_02, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(PlaySoundAtNpc, NPC_Boo_03, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(PlaySoundAtNpc, NPC_Boo_04, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(PlaySoundAtNpc, NPC_Boo_05, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(PlaySoundAtNpc, NPC_Boo_06, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_Boo_01, EMOTE_EXCLAMATION, 45, 20, EMOTER_NPC, 0, 0, 0, 0) + Call(ShowEmote, NPC_Boo_02, EMOTE_EXCLAMATION, 45, 20, EMOTER_NPC, 0, 0, 0, 0) + Call(ShowEmote, NPC_Boo_03, EMOTE_EXCLAMATION, 45, 20, EMOTER_NPC, 0, 0, 0, 0) + Call(ShowEmote, NPC_Boo_04, EMOTE_EXCLAMATION, 45, 20, EMOTER_NPC, 0, 0, 0, 0) + Call(ShowEmote, NPC_Boo_05, EMOTE_EXCLAMATION, 45, 20, EMOTER_NPC, 0, 0, 0, 0) + Call(ShowEmote, NPC_Boo_06, EMOTE_EXCLAMATION, 45, 20, EMOTER_NPC, 0, 0, 0, 0) + Wait(50 * DT) + Set(LVar2, 1) + Exec(N(EVS_CloseDoors)) + Exec(N(EVS_BoosBraceDoor)) + Wait(20 * DT) + Call(SetCamType, CAM_DEFAULT, 6, TRUE) + Call(SetCamSpeed, CAM_DEFAULT, Float(6.0 / DT)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-15.0)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + ExecGetTID(N(EVS_LeaderBooShivering), LVarA) + Call(SpeakToPlayer, NPC_Boo_01, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00DF) + KillThread(LVarA) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_Boo_01, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00E0) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_Boo_01, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00E1) + Call(DisablePartnerAI, 0) + Call(GetCurrentPartnerID, LVar0) + Switch(LVar0) + CaseEq(PARTNER_GOOMBARIO) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH3_00E2) + CaseEq(PARTNER_KOOPER) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH3_00E3) + CaseEq(PARTNER_BOMBETTE) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH3_00E4) + CaseEq(PARTNER_PARAKARRY) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH3_00E5) + CaseEq(PARTNER_BOW) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_00E6) + EndSwitch + Call(EnablePartnerAI) + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamSpeed, CAM_DEFAULT, Float(6.0 / DT)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(PlaySoundAt, SOUND_TUBBA_POUNDING, SOUND_SPACE_DEFAULT, 240, 10, -125) + Call(ShakeCam, CAM_DEFAULT, 0, 20, Float(2.0)) + Wait(5 * DT) + Call(PlaySoundAt, SOUND_TUBBA_POUNDING, SOUND_SPACE_DEFAULT, 240, 10, -125) + Call(ShakeCam, CAM_DEFAULT, 0, 20, Float(2.0)) + Call(ShowMessageAtScreenPos, MSG_CH3_00E7, 160, 40) + ExecWait(N(EVS_BraceDoor1)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Boo_01, ANIM_Boo_Tan_Flail, ANIM_Boo_Tan_Flail, 5, MSG_CH3_00E8) + Call(SetNpcAnimation, NPC_Boo_01, ANIM_Boo_Tan_Flail) + Exec(N(EVS_TubbaTaunting)) + Set(GB_StoryProgress, STORY_CH3_ESCAPED_TUBBAS_MANOR) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SetBoosBracingDoor) = { - EVT_CALL(SetNpcPos, NPC_Boo_01, 246, 30, -110) - EVT_CALL(SetNpcPos, NPC_Boo_02, 276, 120, -80) - EVT_CALL(SetNpcPos, NPC_Boo_03, 216, 120, -140) - EVT_CALL(SetNpcPos, NPC_Boo_04, 276, 60, -80) - EVT_CALL(SetNpcPos, NPC_Boo_05, 246, 90, -110) - EVT_CALL(SetNpcPos, NPC_Boo_06, 216, 60, -130) - EVT_CALL(InterpNpcYaw, NPC_Boo_01, 70, 1) - EVT_CALL(InterpNpcYaw, NPC_Boo_02, 99, 1) - EVT_CALL(InterpNpcYaw, NPC_Boo_03, 93, 1) - EVT_CALL(InterpNpcYaw, NPC_Boo_04, 74, 1) - EVT_CALL(InterpNpcYaw, NPC_Boo_05, 78, 1) - EVT_CALL(InterpNpcYaw, NPC_Boo_06, 81, 1) - EVT_CALL(SetNpcAnimation, NPC_Boo_01, ANIM_Boo_Tan_Flail) - EVT_CALL(SetNpcAnimation, NPC_Boo_02, ANIM_Boo_Tan_Flail) - EVT_CALL(SetNpcAnimation, NPC_Boo_03, ANIM_Boo_Tan_Flail) - EVT_CALL(SetNpcAnimation, NPC_Boo_04, ANIM_Boo_Tan_Flail) - EVT_CALL(SetNpcAnimation, NPC_Boo_05, ANIM_Boo_Tan_Flail) - EVT_CALL(SetNpcAnimation, NPC_Boo_06, ANIM_Boo_Tan_Flail) - EVT_CALL(EnableNpcShadow, NPC_Boo_01, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Boo_02, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Boo_03, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Boo_04, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Boo_05, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Boo_06, FALSE) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Boo_01, 246, 30, -110) + Call(SetNpcPos, NPC_Boo_02, 276, 120, -80) + Call(SetNpcPos, NPC_Boo_03, 216, 120, -140) + Call(SetNpcPos, NPC_Boo_04, 276, 60, -80) + Call(SetNpcPos, NPC_Boo_05, 246, 90, -110) + Call(SetNpcPos, NPC_Boo_06, 216, 60, -130) + Call(InterpNpcYaw, NPC_Boo_01, 70, 1) + Call(InterpNpcYaw, NPC_Boo_02, 99, 1) + Call(InterpNpcYaw, NPC_Boo_03, 93, 1) + Call(InterpNpcYaw, NPC_Boo_04, 74, 1) + Call(InterpNpcYaw, NPC_Boo_05, 78, 1) + Call(InterpNpcYaw, NPC_Boo_06, 81, 1) + Call(SetNpcAnimation, NPC_Boo_01, ANIM_Boo_Tan_Flail) + Call(SetNpcAnimation, NPC_Boo_02, ANIM_Boo_Tan_Flail) + Call(SetNpcAnimation, NPC_Boo_03, ANIM_Boo_Tan_Flail) + Call(SetNpcAnimation, NPC_Boo_04, ANIM_Boo_Tan_Flail) + Call(SetNpcAnimation, NPC_Boo_05, ANIM_Boo_Tan_Flail) + Call(SetNpcAnimation, NPC_Boo_06, ANIM_Boo_Tan_Flail) + Call(EnableNpcShadow, NPC_Boo_01, FALSE) + Call(EnableNpcShadow, NPC_Boo_02, FALSE) + Call(EnableNpcShadow, NPC_Boo_03, FALSE) + Call(EnableNpcShadow, NPC_Boo_04, FALSE) + Call(EnableNpcShadow, NPC_Boo_05, FALSE) + Call(EnableNpcShadow, NPC_Boo_06, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_Boo_01) = { - EVT_SET(MV_PreventTaunting, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Boo_01, ANIM_Boo_Tan_Flail, ANIM_Boo_Tan_Flail, 5, MSG_CH3_00E9) - EVT_CALL(SetNpcAnimation, NPC_Boo_01, ANIM_Boo_Tan_Flail) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PARTNER_GOOMBARIO) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(6.0), 0, EVT_FLOAT(-275.0), EVT_FLOAT(15.0), EVT_FLOAT(-6.0)) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH3_00EA) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(6.0)) - EVT_CASE_EQ(PARTNER_KOOPER) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(6.0), 0, EVT_FLOAT(-275.0), EVT_FLOAT(15.0), EVT_FLOAT(-6.0)) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH3_00EB) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(6.0)) - EVT_CASE_EQ(PARTNER_BOMBETTE) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(6.0), 0, EVT_FLOAT(-275.0), EVT_FLOAT(15.0), EVT_FLOAT(-6.0)) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH3_00EC) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(6.0)) - EVT_CASE_EQ(PARTNER_PARAKARRY) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(6.0), 0, EVT_FLOAT(-275.0), EVT_FLOAT(15.0), EVT_FLOAT(-6.0)) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH3_00ED) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(6.0)) - EVT_CASE_EQ(PARTNER_BOW) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(6.0), 0, EVT_FLOAT(-275.0), EVT_FLOAT(15.0), EVT_FLOAT(-6.0)) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_00EE) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(6.0)) - EVT_END_SWITCH - EVT_CALL(EnablePartnerAI) - EVT_SET(MV_PreventTaunting, FALSE) - EVT_RETURN - EVT_END + Set(MV_PreventTaunting, TRUE) + Call(SpeakToPlayer, NPC_Boo_01, ANIM_Boo_Tan_Flail, ANIM_Boo_Tan_Flail, 5, MSG_CH3_00E9) + Call(SetNpcAnimation, NPC_Boo_01, ANIM_Boo_Tan_Flail) + Call(DisablePartnerAI, 0) + Call(GetCurrentPartnerID, LVar0) + Switch(LVar0) + CaseEq(PARTNER_GOOMBARIO) + Call(AdjustCam, CAM_DEFAULT, Float(6.0), 0, Float(-275.0), Float(15.0), Float(-6.0)) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH3_00EA) + Call(ResetCam, CAM_DEFAULT, Float(6.0)) + CaseEq(PARTNER_KOOPER) + Call(AdjustCam, CAM_DEFAULT, Float(6.0), 0, Float(-275.0), Float(15.0), Float(-6.0)) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH3_00EB) + Call(ResetCam, CAM_DEFAULT, Float(6.0)) + CaseEq(PARTNER_BOMBETTE) + Call(AdjustCam, CAM_DEFAULT, Float(6.0), 0, Float(-275.0), Float(15.0), Float(-6.0)) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH3_00EC) + Call(ResetCam, CAM_DEFAULT, Float(6.0)) + CaseEq(PARTNER_PARAKARRY) + Call(AdjustCam, CAM_DEFAULT, Float(6.0), 0, Float(-275.0), Float(15.0), Float(-6.0)) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH3_00ED) + Call(ResetCam, CAM_DEFAULT, Float(6.0)) + CaseEq(PARTNER_BOW) + Call(AdjustCam, CAM_DEFAULT, Float(6.0), 0, Float(-275.0), Float(15.0), Float(-6.0)) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_00EE) + Call(ResetCam, CAM_DEFAULT, Float(6.0)) + EndSwitch + Call(EnablePartnerAI) + Set(MV_PreventTaunting, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Boo_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Boo_01))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Boo_01))) + Return + End }; EvtScript N(EVS_NpcInit_Boo_02) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInit_Boo_03) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInit_Boo_04) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInit_Boo_05) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInit_Boo_06) = { - EVT_RETURN - EVT_END + Return + End }; NpcData N(NpcData_Boo_01) = { @@ -504,149 +504,149 @@ NpcData N(NpcData_Boo_06) = { }; EvtScript N(EVS_Scene_ThrownOutBySentinel) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, 320, 10, -160) - EVT_CALL(PlaySound, SOUND_LRAW_SENTINEL_ALARM) - EVT_THREAD - EVT_LOOP(180) - EVT_CALL(GetNpcPos, NPC_Sentinel, LVar0, LVar1, LVar2) - EVT_CALL(N(PlaySentinelSounds)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetPlayerPos, 320, 50, -160) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Flail) - EVT_CALL(SetNpcPos, NPC_Sentinel, 320, 70, -158) - EVT_CALL(InterpNpcYaw, NPC_Sentinel, 270, 0) - EVT_CALL(SetNpcAnimation, NPC_Sentinel, ANIM_Sentinel_Anim08) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 175, 0, -35) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 175, 0, -35) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(540.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(20) - EVT_THREAD - EVT_SET(LVar2, 1) - EVT_EXEC(N(EVS_SetDoorRots)) - EVT_END_THREAD - EVT_WAIT(15) - EVT_THREAD - EVT_CALL(SetPlayerJumpscale, 0) - EVT_CALL(PlayerJump1, 175, 50, -35, 40) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_WAIT(1) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_RUN) - EVT_WAIT(85) - EVT_CALL(func_802CF56C, 2) - EVT_WAIT(1) - EVT_CALL(EnablePartnerAI) - EVT_END_THREAD - EVT_CALL(NpcMoveTo, NPC_Sentinel, 175, -33, 40) - EVT_WAIT(20) - EVT_CALL(SetNpcPos, NPC_Sentinel, 175, 85, -33) - EVT_CALL(SetNpcAnimation, NPC_Sentinel, ANIM_Sentinel_Anim09) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtNpc, NPC_Sentinel, SOUND_SENTINEL_PICKUP, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_Sentinel, ANIM_Sentinel_Anim02) - EVT_CALL(SetNpcPos, NPC_Sentinel, 175, 70, -33) - EVT_THREAD - EVT_WAIT(40) - EVT_CALL(SetNpcAnimation, NPC_Sentinel, ANIM_Sentinel_Anim03) - EVT_CALL(NpcMoveTo, NPC_Sentinel, 270, -120, 30) - EVT_CALL(StopSound, SOUND_LRAW_SENTINEL_ALARM) - EVT_CALL(SetNpcPos, NPC_Sentinel, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(60) - EVT_SET(LVar2, 1) - EVT_EXEC(N(EVS_CloseDoors)) - EVT_END_THREAD - EVT_CALL(SetPlayerJumpscale, 0) - EVT_CALL(PlayerJump1, 175, 0, -35, 10) - EVT_CALL(PlaySoundAtNpc, NPC_Sentinel, SOUND_TRIP, SOUND_SPACE_DEFAULT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Collapse) - EVT_THREAD - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_EMOTE, EMOTE_FRUSTRATION, 0, 175, 0, -35, 20, -20, 30, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(320.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_WAIT(65) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PARTNER_GOOMBARIO) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE) - EVT_CASE_EQ(PARTNER_KOOPER) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE) - EVT_CASE_EQ(PARTNER_BOMBETTE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE) - EVT_END_SWITCH - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PARTNER_GOOMBARIO) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_TALK, PARTNER_ANIM_IDLE, 5, MSG_CH3_00D6) - EVT_CASE_EQ(PARTNER_KOOPER) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_TALK, PARTNER_ANIM_IDLE, 5, MSG_CH3_00D7) - EVT_CASE_EQ(PARTNER_BOMBETTE) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_TALK, PARTNER_ANIM_IDLE, 5, MSG_CH3_00D8) - EVT_CASE_EQ(PARTNER_PARAKARRY) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_TALK, PARTNER_ANIM_IDLE, 5, MSG_CH3_00D9) - EVT_CASE_EQ(PARTNER_BOW) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_TALK, PARTNER_ANIM_IDLE, 5, MSG_CH3_00DA) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_TALK, PARTNER_ANIM_IDLE, 5, MSG_CH3_00D6) - EVT_END_SWITCH - EVT_CALL(EnablePartnerAI) - EVT_WAIT(5) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_GetUp) - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_DustOff) - EVT_WAIT(7) - EVT_CALL(PlaySoundAtPlayer, SOUND_DUST_OFF, SOUND_SPACE_DEFAULT) - EVT_WAIT(8) - EVT_CALL(PlaySoundAtPlayer, SOUND_DUST_OFF, SOUND_SPACE_DEFAULT) - EVT_WAIT(15) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_DeepExhale) - EVT_WAIT(25) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(InterpPlayerYaw, 45, 0) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Jump) - EVT_CALL(SetPlayerJumpscale, 1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(PlayerJump1, LVar0, 0, LVar2, 10) - EVT_CALL(PlayerJump1, LVar0, 0, LVar2, 10) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcPos, NPC_PARTNER, 320, 10, -160) + Call(PlaySound, SOUND_LRAW_SENTINEL_ALARM) + Thread + Loop(180) + Call(GetNpcPos, NPC_Sentinel, LVar0, LVar1, LVar2) + Call(N(PlaySentinelSounds)) + Wait(1) + EndLoop + EndThread + Call(SetPlayerPos, 320, 50, -160) + Call(InterpPlayerYaw, 270, 0) + Call(SetPlayerAnimation, ANIM_MarioW2_Flail) + Call(SetNpcPos, NPC_Sentinel, 320, 70, -158) + Call(InterpNpcYaw, NPC_Sentinel, 270, 0) + Call(SetNpcAnimation, NPC_Sentinel, ANIM_Sentinel_Anim08) + Call(UseSettingsFrom, CAM_DEFAULT, 175, 0, -35) + Call(SetPanTarget, CAM_DEFAULT, 175, 0, -35) + Call(SetCamDistance, CAM_DEFAULT, Float(540.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(20) + Thread + Set(LVar2, 1) + Exec(N(EVS_SetDoorRots)) + EndThread + Wait(15) + Thread + Call(SetPlayerJumpscale, 0) + Call(PlayerJump1, 175, 50, -35, 40) + EndThread + Thread + Call(DisablePartnerAI, 0) + Wait(1) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_RUN) + Wait(85) + Call(func_802CF56C, 2) + Wait(1) + Call(EnablePartnerAI) + EndThread + Call(NpcMoveTo, NPC_Sentinel, 175, -33, 40) + Wait(20) + Call(SetNpcPos, NPC_Sentinel, 175, 85, -33) + Call(SetNpcAnimation, NPC_Sentinel, ANIM_Sentinel_Anim09) + Wait(20) + Call(PlaySoundAtNpc, NPC_Sentinel, SOUND_SENTINEL_PICKUP, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_Sentinel, ANIM_Sentinel_Anim02) + Call(SetNpcPos, NPC_Sentinel, 175, 70, -33) + Thread + Wait(40) + Call(SetNpcAnimation, NPC_Sentinel, ANIM_Sentinel_Anim03) + Call(NpcMoveTo, NPC_Sentinel, 270, -120, 30) + Call(StopSound, SOUND_LRAW_SENTINEL_ALARM) + Call(SetNpcPos, NPC_Sentinel, NPC_DISPOSE_LOCATION) + EndThread + Thread + Wait(60) + Set(LVar2, 1) + Exec(N(EVS_CloseDoors)) + EndThread + Call(SetPlayerJumpscale, 0) + Call(PlayerJump1, 175, 0, -35, 10) + Call(PlaySoundAtNpc, NPC_Sentinel, SOUND_TRIP, SOUND_SPACE_DEFAULT) + Call(SetPlayerAnimation, ANIM_MarioW2_Collapse) + Thread + Wait(2) + PlayEffect(EFFECT_EMOTE, EMOTE_FRUSTRATION, 0, 175, 0, -35, 20, -20, 30, 0) + EndThread + Thread + Call(SetCamDistance, CAM_DEFAULT, Float(320.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-7.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Wait(65) + Call(GetCurrentPartnerID, LVar0) + Switch(LVar0) + CaseEq(PARTNER_GOOMBARIO) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE) + CaseEq(PARTNER_KOOPER) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE) + CaseEq(PARTNER_BOMBETTE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE) + EndSwitch + Call(DisablePartnerAI, 0) + Call(GetCurrentPartnerID, LVar0) + Switch(LVar0) + CaseEq(PARTNER_GOOMBARIO) + Call(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_TALK, PARTNER_ANIM_IDLE, 5, MSG_CH3_00D6) + CaseEq(PARTNER_KOOPER) + Call(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_TALK, PARTNER_ANIM_IDLE, 5, MSG_CH3_00D7) + CaseEq(PARTNER_BOMBETTE) + Call(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_TALK, PARTNER_ANIM_IDLE, 5, MSG_CH3_00D8) + CaseEq(PARTNER_PARAKARRY) + Call(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_TALK, PARTNER_ANIM_IDLE, 5, MSG_CH3_00D9) + CaseEq(PARTNER_BOW) + Call(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_TALK, PARTNER_ANIM_IDLE, 5, MSG_CH3_00DA) + CaseDefault + Call(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_TALK, PARTNER_ANIM_IDLE, 5, MSG_CH3_00D6) + EndSwitch + Call(EnablePartnerAI) + Wait(5) + Call(SetPlayerAnimation, ANIM_Mario1_GetUp) + Wait(20) + Call(SetPlayerAnimation, ANIM_Mario1_DustOff) + Wait(7) + Call(PlaySoundAtPlayer, SOUND_DUST_OFF, SOUND_SPACE_DEFAULT) + Wait(8) + Call(PlaySoundAtPlayer, SOUND_DUST_OFF, SOUND_SPACE_DEFAULT) + Wait(15) + Call(SetPlayerAnimation, ANIM_MarioW2_DeepExhale) + Wait(25) + Call(InterpPlayerYaw, 90, 0) + Wait(1) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(InterpPlayerYaw, 45, 0) + Wait(10) + Call(SetPlayerAnimation, ANIM_Mario1_Jump) + Call(SetPlayerJumpscale, 1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(PlayerJump1, LVar0, 0, LVar2, 10) + Call(PlayerJump1, LVar0, 0, LVar2, 10) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(EnablePartnerAI) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Sentinel) = { - EVT_RETURN - EVT_END + Return + End }; NpcData N(NpcData_Sentinel) = { diff --git a/src/world/area_dgb/dgb_00/dgb_00_4_entity.c b/src/world/area_dgb/dgb_00/dgb_00_4_entity.c index 626bc6e5561..ce012ae3f1c 100644 --- a/src/world/area_dgb/dgb_00/dgb_00_4_entity.c +++ b/src/world/area_dgb/dgb_00/dgb_00_4_entity.c @@ -2,7 +2,7 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), -65, 60, -240, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_SavePoint), -65, 60, -240, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_dgb/dgb_01/dgb_01_1_music.c b/src/world/area_dgb/dgb_01/dgb_01_1_music.c index 839df262304..d750820fc48 100644 --- a/src/world/area_dgb/dgb_01/dgb_01_1_music.c +++ b/src/world/area_dgb/dgb_01/dgb_01_1_music.c @@ -1,15 +1,15 @@ #include "dgb_01.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_END_SWITCH - EVT_CALL(ClearAmbientSounds, 250) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_WOKE_UP) + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + EndSwitch + Call(ClearAmbientSounds, 250) + Return + End }; diff --git a/src/world/area_dgb/dgb_01/dgb_01_2_main.c b/src/world/area_dgb/dgb_01/dgb_01_2_main.c index 4c79aceb49f..2f4f1d53df2 100644 --- a/src/world/area_dgb/dgb_01/dgb_01_2_main.c +++ b/src/world/area_dgb/dgb_01/dgb_01_2_main.c @@ -1,156 +1,156 @@ #include "dgb_01.h" EvtScript N(EVS_ExitDoors_dgb_00_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, dgb_01_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilitts) - EVT_SET(LVar2, MODEL_o380) - EVT_SET(LVar3, MODEL_o381) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_00"), dgb_00_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, dgb_01_ENTRY_0) + Set(LVar1, COLLIDER_deilitts) + Set(LVar2, MODEL_o380) + Set(LVar3, MODEL_o381) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_00"), dgb_00_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_dgb_02_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, dgb_01_ENTRY_1) - EVT_SET(LVar1, COLLIDER_deilittsw) - EVT_SET(LVar2, MODEL_o163) - EVT_SET(LVar3, MODEL_o164) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_02"), dgb_02_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, dgb_01_ENTRY_1) + Set(LVar1, COLLIDER_deilittsw) + Set(LVar2, MODEL_o163) + Set(LVar3, MODEL_o164) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_02"), dgb_02_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_dgb_08_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, dgb_01_ENTRY_2) - EVT_SET(LVar1, COLLIDER_deilittse) - EVT_SET(LVar2, MODEL_o168) - EVT_SET(LVar3, MODEL_o167) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_08"), dgb_08_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, dgb_01_ENTRY_2) + Set(LVar1, COLLIDER_deilittse) + Set(LVar2, MODEL_o168) + Set(LVar3, MODEL_o167) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_08"), dgb_08_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_dgb_09_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, dgb_01_ENTRY_3) - EVT_SET(LVar1, COLLIDER_deilittw) - EVT_SET(LVar2, MODEL_o165) - EVT_SET(LVar3, MODEL_o166) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_09"), dgb_09_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, dgb_01_ENTRY_3) + Set(LVar1, COLLIDER_deilittw) + Set(LVar2, MODEL_o165) + Set(LVar3, MODEL_o166) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_09"), dgb_09_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_dgb_08_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, dgb_01_ENTRY_4) - EVT_SET(LVar1, COLLIDER_deilitte) - EVT_SET(LVar2, MODEL_o299) - EVT_SET(LVar3, MODEL_o298) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_08"), dgb_08_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, dgb_01_ENTRY_4) + Set(LVar1, COLLIDER_deilitte) + Set(LVar2, MODEL_o299) + Set(LVar3, MODEL_o298) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_08"), dgb_08_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_dgb_17_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, dgb_01_ENTRY_5) - EVT_SET(LVar1, COLLIDER_deilittnw) - EVT_SET(LVar2, MODEL_o161) - EVT_SET(LVar3, MODEL_o162) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_17"), dgb_17_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, dgb_01_ENTRY_5) + Set(LVar1, COLLIDER_deilittnw) + Set(LVar2, MODEL_o161) + Set(LVar3, MODEL_o162) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_17"), dgb_17_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_dgb_18_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, dgb_01_ENTRY_6) - EVT_SET(LVar1, COLLIDER_deilittne) - EVT_SET(LVar2, MODEL_o301) - EVT_SET(LVar3, MODEL_o300) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_18"), dgb_18_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, dgb_01_ENTRY_6) + Set(LVar1, COLLIDER_deilittne) + Set(LVar2, MODEL_o301) + Set(LVar3, MODEL_o300) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_18"), dgb_18_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(dgb_01_ENTRY_0) - EVT_IF_EQ(GF_DGB01_Visited, FALSE) - EVT_SET(GF_DGB01_Visited, TRUE) - EVT_SET(GB_StoryProgress, STORY_CH3_ARRIVED_AT_TUBBAS_MANOR) - EVT_END_IF - EVT_SET(LVar2, MODEL_o380) - EVT_SET(LVar3, MODEL_o381) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(dgb_01_ENTRY_1) - EVT_SET(LVar2, MODEL_o163) - EVT_SET(LVar3, MODEL_o164) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(dgb_01_ENTRY_2) - EVT_SET(LVar2, MODEL_o168) - EVT_SET(LVar3, MODEL_o167) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(dgb_01_ENTRY_3) - EVT_SET(LVar2, MODEL_o165) - EVT_SET(LVar3, MODEL_o166) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(dgb_01_ENTRY_4) - EVT_SET(LVar2, MODEL_o299) - EVT_SET(LVar3, MODEL_o298) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(dgb_01_ENTRY_5) - EVT_SET(LVar2, MODEL_o161) - EVT_SET(LVar3, MODEL_o162) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(dgb_01_ENTRY_6) - EVT_SET(LVar2, MODEL_o301) - EVT_SET(LVar3, MODEL_o300) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(dgb_01_ENTRY_0) + IfEq(GF_DGB01_Visited, FALSE) + Set(GF_DGB01_Visited, TRUE) + Set(GB_StoryProgress, STORY_CH3_ARRIVED_AT_TUBBAS_MANOR) + EndIf + Set(LVar2, MODEL_o380) + Set(LVar3, MODEL_o381) + ExecWait(EnterDoubleDoor) + CaseEq(dgb_01_ENTRY_1) + Set(LVar2, MODEL_o163) + Set(LVar3, MODEL_o164) + ExecWait(EnterDoubleDoor) + CaseEq(dgb_01_ENTRY_2) + Set(LVar2, MODEL_o168) + Set(LVar3, MODEL_o167) + ExecWait(EnterDoubleDoor) + CaseEq(dgb_01_ENTRY_3) + Set(LVar2, MODEL_o165) + Set(LVar3, MODEL_o166) + ExecWait(EnterDoubleDoor) + CaseEq(dgb_01_ENTRY_4) + Set(LVar2, MODEL_o299) + Set(LVar3, MODEL_o298) + ExecWait(EnterDoubleDoor) + CaseEq(dgb_01_ENTRY_5) + Set(LVar2, MODEL_o161) + Set(LVar3, MODEL_o162) + ExecWait(EnterDoubleDoor) + CaseEq(dgb_01_ENTRY_6) + Set(LVar2, MODEL_o301) + Set(LVar3, MODEL_o300) + ExecWait(EnterDoubleDoor) + EndSwitch + Return + End }; s32 N(KeyList)[] = { @@ -159,39 +159,39 @@ s32 N(KeyList)[] = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TUBBAS_MANOR) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_SET(GF_MAP_TubbasManor, TRUE) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupBridges)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_00_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitts, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_02_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_09_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_08_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitte, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_17_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_18_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) - EVT_IF_EQ(GF_DGB01_UnlockedEastWing, FALSE) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_UnlockPrompt_Door)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(KeyList)), 0, 1) - EVT_ELSE - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_08_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) - EVT_END_IF - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(dgb_01_ENTRY_2) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(FirstFloorEscapeNPCs))) - EVT_CASE_EQ(dgb_01_ENTRY_4) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(SecondFloorEscapeNPCs))) - EVT_CASE_EQ(dgb_01_ENTRY_6) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(ThirdFloorEscapeNPCs))) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TUBBAS_MANOR) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Set(GF_MAP_TubbasManor, TRUE) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupBridges)) + Exec(N(EVS_SetupMusic)) + BindTrigger(Ref(N(EVS_ExitDoors_dgb_00_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitts, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_dgb_02_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_dgb_09_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_dgb_08_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitte, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_dgb_17_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_dgb_18_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) + IfEq(GF_DGB01_UnlockedEastWing, FALSE) + BindPadlock(Ref(N(EVS_UnlockPrompt_Door)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), Ref(N(KeyList)), 0, 1) + Else + BindTrigger(Ref(N(EVS_ExitDoors_dgb_08_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) + EndIf + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_WOKE_UP) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(dgb_01_ENTRY_2) + Call(MakeNpcs, TRUE, Ref(N(FirstFloorEscapeNPCs))) + CaseEq(dgb_01_ENTRY_4) + Call(MakeNpcs, TRUE, Ref(N(SecondFloorEscapeNPCs))) + CaseEq(dgb_01_ENTRY_6) + Call(MakeNpcs, TRUE, Ref(N(ThirdFloorEscapeNPCs))) + EndSwitch + EndSwitch + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_dgb/dgb_01/dgb_01_3_bridges.c b/src/world/area_dgb/dgb_01/dgb_01_3_bridges.c index 99c7d24b5f8..6b38608bd2e 100644 --- a/src/world/area_dgb/dgb_01/dgb_01_3_bridges.c +++ b/src/world/area_dgb/dgb_01/dgb_01_3_bridges.c @@ -8,191 +8,191 @@ API_CALLABLE(N(LoadSmashBridgesGraphics)) { } EvtScript N(EVS_Scene_TubbaSmashBridges) = { - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 100) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(LoadSmashBridgesGraphics)) - EVT_CALL(InitAnimatedModels) - EVT_WAIT(1) - EVT_CALL(InterruptUsePartner) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Shocked) - EVT_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_Tubba, SOUND_HEAVY_NPC_STEP_C, SOUND_SPACE_DEFAULT) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtNpc, NPC_Tubba, SOUND_HEAVY_NPC_STEP_C, SOUND_SPACE_DEFAULT) - EVT_WAIT(5) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_WAIT(30) - EVT_THREAD - EVT_LOOP(12) - EVT_CALL(PlaySoundAtNpc, NPC_Tubba, SOUND_HEAVY_NPC_STEP_C, SOUND_SPACE_DEFAULT) - EVT_WAIT(5) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 60, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 400, 420, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 400, 420, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(450.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(20.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(500.0), EVT_FLOAT(0.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_SET(GB_ARN_Tubba_MapID, 1) - EVT_CALL(SetNpcVar, NPC_Tubba, 0, 1) - EVT_LOOP(0) - EVT_CALL(GetNpcVar, NPC_Tubba, 0, LVar0) - EVT_IF_EQ(LVar0, 3) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -50) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(750.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(0.0), EVT_FLOAT(3.0)) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(EnablePartnerAI) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(1.0)) - EVT_CALL(LoadAnimatedModel, 0, EVT_PTR(N(SmashBridgesSkeleton))) - EVT_CALL(PlayModelAnimation, 0, EVT_PTR(N(AS_SmashBridges))) - EVT_CALL(SetAnimatedModelRootPosition, 0, 0, 0, 0) - EVT_CALL(SetAnimatedModelRenderMode, 0, RENDER_MODE_SURFACE_OPA) - EVT_THREAD - EVT_CALL(PlaySound, SOUND_DGB_COLLAPSE_1) - EVT_WAIT(60) - EVT_CALL(PlaySound, SOUND_DGB_COLLAPSE_2) - EVT_WAIT(25) - EVT_CALL(PlaySound, SOUND_DGB_COLLAPSE_3) - EVT_WAIT(70) - EVT_CALL(PlaySound, SOUND_DGB_COLLAPSE_4) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(100) - EVT_CALL(PlaySound, SOUND_DGB_SMALL_THUD) - EVT_WAIT(50) - EVT_CALL(PlaySound, SOUND_DGB_SMALL_THUD) - EVT_WAIT(30) - EVT_CALL(PlaySound, SOUND_DGB_SMALL_THUD) - EVT_WAIT(70) - EVT_CALL(PlaySound, SOUND_DGB_SMALL_THUD) - EVT_WAIT(30) - EVT_CALL(PlaySound, SOUND_DGB_SMALL_THUD) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_WAIT(1) - EVT_CALL(SetGroupVisibility, MODEL_g96, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_g87, MODEL_GROUP_HIDDEN) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_PanicHover) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.5)) - EVT_CALL(PlayerJump1, 121, 210, 0, 60) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_FlailArms) - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_PanicRun) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(8.0)) - EVT_CALL(PlayerMoveTo, 412, -29, 0) - EVT_WAIT(10) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_after, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 210) - EVT_WAIT(1) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.5)) - EVT_CALL(NpcJump1, NPC_PARTNER, 151, LVar1, 0, 60) - EVT_WAIT(30) - EVT_CALL(EnablePartnerAI) - EVT_END_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 300, EVT_FLOAT(1.0)) - EVT_CALL(StopSound, SOUND_LOOP_DGB_COLLAPSE) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim0D) - EVT_CALL(SetNpcSpeed, NPC_Tubba, EVT_FLOAT(3.0)) - EVT_CALL(NpcMoveTo, NPC_Tubba, 176, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_Tubba, SOUND_HEAVY_NPC_STEP_C, SOUND_SPACE_DEFAULT) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.3)) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtNpc, NPC_Tubba, SOUND_HEAVY_NPC_STEP_C, SOUND_SPACE_DEFAULT) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 2, EVT_FLOAT(0.15)) - EVT_WAIT(8) - EVT_END_THREAD - EVT_WAIT(20) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_SET(GB_StoryProgress, STORY_CH3_TUBBA_SMASHED_THE_BRIDGES) - EVT_CALL(SetGroupVisibility, MODEL_g240, MODEL_GROUP_VISIBLE) - EVT_CALL(DeleteAnimatedModel, 0) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim0D) - EVT_CALL(SetNpcPos, NPC_Tubba, 137, 244, 35) - EVT_CALL(SetNpcSpeed, NPC_Tubba, EVT_FLOAT(3.0)) - EVT_CALL(NpcMoveTo, NPC_Tubba, 470, 0, 0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(3.0)) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(PlaySoundAtNpc, NPC_Tubba, SOUND_HEAVY_NPC_STEP_C, SOUND_SPACE_DEFAULT) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.3)) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtNpc, NPC_Tubba, SOUND_HEAVY_NPC_STEP_C, SOUND_SPACE_DEFAULT) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 2, EVT_FLOAT(0.15)) - EVT_WAIT(8) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, 470, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_EXEC(N(EVS_ExitDoors_dgb_08_1)) - EVT_RETURN - EVT_END + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, 100) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(DisablePlayerInput, TRUE) + Call(N(LoadSmashBridgesGraphics)) + Call(InitAnimatedModels) + Wait(1) + Call(InterruptUsePartner) + Call(SetPlayerAnimation, ANIM_MarioW2_Shocked) + Thread + Call(PlaySoundAtNpc, NPC_Tubba, SOUND_HEAVY_NPC_STEP_C, SOUND_SPACE_DEFAULT) + Wait(5) + Call(PlaySoundAtNpc, NPC_Tubba, SOUND_HEAVY_NPC_STEP_C, SOUND_SPACE_DEFAULT) + Wait(5) + EndThread + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(1.0)) + EndThread + Wait(30) + Thread + Loop(12) + Call(PlaySoundAtNpc, NPC_Tubba, SOUND_HEAVY_NPC_STEP_C, SOUND_SPACE_DEFAULT) + Wait(5) + EndLoop + EndThread + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 60, Float(1.0)) + EndThread + Call(UseSettingsFrom, CAM_DEFAULT, 400, 420, 0) + Call(SetPanTarget, CAM_DEFAULT, 400, 420, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(450.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(20.0), Float(-11.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(500.0), Float(0.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Set(GB_ARN_Tubba_MapID, 1) + Call(SetNpcVar, NPC_Tubba, 0, 1) + Loop(0) + Call(GetNpcVar, NPC_Tubba, 0, LVar0) + IfEq(LVar0, 3) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, -50) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(750.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(0.0), Float(3.0)) + Call(DisablePartnerAI, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Wait(1) + Call(EnablePartnerAI) + Call(ShakeCam, CAM_DEFAULT, 0, 20, Float(1.0)) + Call(LoadAnimatedModel, 0, Ref(N(SmashBridgesSkeleton))) + Call(PlayModelAnimation, 0, Ref(N(AS_SmashBridges))) + Call(SetAnimatedModelRootPosition, 0, 0, 0, 0) + Call(SetAnimatedModelRenderMode, 0, RENDER_MODE_SURFACE_OPA) + Thread + Call(PlaySound, SOUND_DGB_COLLAPSE_1) + Wait(60) + Call(PlaySound, SOUND_DGB_COLLAPSE_2) + Wait(25) + Call(PlaySound, SOUND_DGB_COLLAPSE_3) + Wait(70) + Call(PlaySound, SOUND_DGB_COLLAPSE_4) + EndThread + Thread + Wait(100) + Call(PlaySound, SOUND_DGB_SMALL_THUD) + Wait(50) + Call(PlaySound, SOUND_DGB_SMALL_THUD) + Wait(30) + Call(PlaySound, SOUND_DGB_SMALL_THUD) + Wait(70) + Call(PlaySound, SOUND_DGB_SMALL_THUD) + Wait(30) + Call(PlaySound, SOUND_DGB_SMALL_THUD) + EndThread + Thread + Call(DisablePlayerPhysics, TRUE) + Wait(1) + Call(SetGroupVisibility, MODEL_g96, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_g87, MODEL_GROUP_HIDDEN) + Call(SetPlayerAnimation, ANIM_MarioW2_PanicHover) + Call(SetPlayerJumpscale, Float(0.5)) + Call(PlayerJump1, 121, 210, 0, 60) + Wait(10) + Call(SetPlayerAnimation, ANIM_MarioW2_FlailArms) + Wait(20) + Call(SetPlayerAnimation, ANIM_Mario1_PanicRun) + Call(SetPlayerSpeed, Float(8.0)) + Call(PlayerMoveTo, 412, -29, 0) + Wait(10) + Call(InterpPlayerYaw, 270, 0) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_after, COLLIDER_FLAGS_UPPER_MASK) + Call(DisablePlayerPhysics, FALSE) + EndThread + Thread + Call(DisablePartnerAI, 0) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Sub(LVar1, 210) + Wait(1) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.5)) + Call(NpcJump1, NPC_PARTNER, 151, LVar1, 0, 60) + Wait(30) + Call(EnablePartnerAI) + EndThread + Call(ShakeCam, CAM_DEFAULT, 0, 300, Float(1.0)) + Call(StopSound, SOUND_LOOP_DGB_COLLAPSE) + Thread + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim0D) + Call(SetNpcSpeed, NPC_Tubba, Float(3.0)) + Call(NpcMoveTo, NPC_Tubba, 176, 0, 0) + EndThread + Thread + Call(PlaySoundAtNpc, NPC_Tubba, SOUND_HEAVY_NPC_STEP_C, SOUND_SPACE_DEFAULT) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(0.3)) + Wait(5) + Call(PlaySoundAtNpc, NPC_Tubba, SOUND_HEAVY_NPC_STEP_C, SOUND_SPACE_DEFAULT) + Call(ShakeCam, CAM_DEFAULT, 0, 2, Float(0.15)) + Wait(8) + EndThread + Wait(20) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Set(GB_StoryProgress, STORY_CH3_TUBBA_SMASHED_THE_BRIDGES) + Call(SetGroupVisibility, MODEL_g240, MODEL_GROUP_VISIBLE) + Call(DeleteAnimatedModel, 0) + Thread + Wait(30) + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim0D) + Call(SetNpcPos, NPC_Tubba, 137, 244, 35) + Call(SetNpcSpeed, NPC_Tubba, Float(3.0)) + Call(NpcMoveTo, NPC_Tubba, 470, 0, 0) + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(3.0)) + EndThread + Thread + Loop(0) + Call(PlaySoundAtNpc, NPC_Tubba, SOUND_HEAVY_NPC_STEP_C, SOUND_SPACE_DEFAULT) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(0.3)) + Wait(5) + Call(PlaySoundAtNpc, NPC_Tubba, SOUND_HEAVY_NPC_STEP_C, SOUND_SPACE_DEFAULT) + Call(ShakeCam, CAM_DEFAULT, 0, 2, Float(0.15)) + Wait(8) + EndLoop + EndThread + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, 470, 0, 0) + Call(DisablePlayerInput, FALSE) + Exec(N(EVS_ExitDoors_dgb_08_1)) + Return + End }; EvtScript N(EVS_SetupBridges) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetGroupVisibility, MODEL_g240, MODEL_GROUP_HIDDEN) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_after, COLLIDER_FLAGS_UPPER_MASK) - EVT_CASE_EQ(STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetGroupVisibility, MODEL_g240, MODEL_GROUP_HIDDEN) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_after, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_Scene_TubbaSmashBridges)) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetGroupVisibility, MODEL_g340, MODEL_GROUP_HIDDEN) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_before, COLLIDER_FLAGS_UPPER_MASK) - EVT_CASE_DEFAULT - EVT_CALL(SetGroupVisibility, MODEL_g240, MODEL_GROUP_HIDDEN) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_after, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_WOKE_UP) + Call(SetGroupVisibility, MODEL_g240, MODEL_GROUP_HIDDEN) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_after, COLLIDER_FLAGS_UPPER_MASK) + CaseEq(STORY_CH3_TUBBA_WOKE_UP) + Call(SetGroupVisibility, MODEL_g240, MODEL_GROUP_HIDDEN) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_after, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_Scene_TubbaSmashBridges)) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetGroupVisibility, MODEL_g340, MODEL_GROUP_HIDDEN) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_before, COLLIDER_FLAGS_UPPER_MASK) + CaseDefault + Call(SetGroupVisibility, MODEL_g240, MODEL_GROUP_HIDDEN) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_after, COLLIDER_FLAGS_UPPER_MASK) + EndSwitch + Return + End }; diff --git a/src/world/area_dgb/dgb_01/dgb_01_4_entity.c b/src/world/area_dgb/dgb_01/dgb_01_4_entity.c index b7a66489ee4..6cb09d56669 100644 --- a/src/world/area_dgb/dgb_01/dgb_01_4_entity.c +++ b/src/world/area_dgb/dgb_01/dgb_01_4_entity.c @@ -5,46 +5,46 @@ #include "world/common/todo/GetEntityPosition.inc.c" EvtScript N(EVS_UnlockPrompt_Door) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SUSPEND_GROUP(EVT_GROUP_01) - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_CALL(CloseChoicePopup) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_RETURN - EVT_END_IF - EVT_CALL(FindKeyItem, ITEM_TUBBA_CASTLE_KEY, LVar0) - EVT_CALL(RemoveKeyItemAt, LVar0) - EVT_CALL(CloseChoicePopup) - EVT_SET(GF_DGB01_UnlockedEastWing, TRUE) - EVT_CALL(N(GetEntityPosition), MV_PadlockEntityID, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_SET(LVar0, MV_PadlockEntityID) - EVT_CALL(N(RemovePadlock)) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_UNBIND - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + SuspendGroup(EVT_GROUP_01) + Call(ShowKeyChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) + Call(CloseChoicePopup) + ResumeGroup(EVT_GROUP_01) + Return + EndIf + IfEq(LVar0, -1) + Call(CloseChoicePopup) + ResumeGroup(EVT_GROUP_01) + Return + EndIf + Call(FindKeyItem, ITEM_TUBBA_CASTLE_KEY, LVar0) + Call(RemoveKeyItemAt, LVar0) + Call(CloseChoicePopup) + Set(GF_DGB01_UnlockedEastWing, TRUE) + Call(N(GetEntityPosition), MV_PadlockEntityID, LVar0, LVar1, LVar2) + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Set(LVar0, MV_PadlockEntityID) + Call(N(RemovePadlock)) + ResumeGroup(EVT_GROUP_01) + Unbind + Return + End }; EvtScript N(EVS_OpenLockedDoor) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_08_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_dgb_08_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_DGB01_UnlockedEastWing, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), 490, 8, 0, -80, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenLockedDoor))) - EVT_SET(MV_PadlockEntityID, LVar0) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_DGB01_UnlockedEastWing, FALSE) + Call(MakeEntity, Ref(Entity_Padlock), 490, 8, 0, -80, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OpenLockedDoor))) + Set(MV_PadlockEntityID, LVar0) + EndIf + Return + End }; diff --git a/src/world/area_dgb/dgb_01/dgb_01_5_npc.c b/src/world/area_dgb/dgb_01/dgb_01_5_npc.c index d44bb3b3465..12839545c9a 100644 --- a/src/world/area_dgb/dgb_01/dgb_01_5_npc.c +++ b/src/world/area_dgb/dgb_01/dgb_01_5_npc.c @@ -12,235 +12,235 @@ #include "world/common/todo/UnkFunc1.inc.c" EvtScript N(EVS_NpcIdle_Tubba_Floor3) = { - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(GB_ARN_Tubba_MapID, 1) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittne, SOUND_CREAKY_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 80, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o300, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o301, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim0A) - EVT_CALL(SetNpcPos, NPC_SELF, 520, 420, 0) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_CALL(NpcMoveTo, NPC_SELF, 390, 0, 30) - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim07) - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(MakeLerp, 80, 0, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o300, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o301, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittne, SOUND_CREAKY_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Tubba, ANIM_WorldTubba_Anim10, ANIM_WorldTubba_Anim06, 0, MSG_CH3_0101) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim19) - EVT_WAIT(4) - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim1A) - EVT_WAIT(17) - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim1B) - EVT_WAIT(11) - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim1C) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim1D) - EVT_END_THREAD - EVT_WAIT(4) - EVT_CALL(SetNpcJumpscale, NPC_Tubba, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_Tubba, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Tubba, LVar0, LVar1, LVar2, 30) - EVT_CALL(PlaySoundAtNpc, NPC_Tubba, SOUND_LARGE_NPC_IMPACT, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySound, SOUND_LOOP_DGB_COLLAPSE) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 15, EVT_FLOAT(4.0)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 15, EVT_FLOAT(2.0)) - EVT_CALL(SetSelfVar, 0, 3) - EVT_RETURN - EVT_END + Loop(0) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + Set(GB_ARN_Tubba_MapID, 1) + Call(PlaySoundAtCollider, COLLIDER_deilittne, SOUND_CREAKY_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 80, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o300, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o301, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim0A) + Call(SetNpcPos, NPC_SELF, 520, 420, 0) + Call(SetNpcYaw, NPC_SELF, 270) + Call(NpcMoveTo, NPC_SELF, 390, 0, 30) + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim07) + Thread + Wait(20) + Call(MakeLerp, 80, 0, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o300, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o301, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_deilittne, SOUND_CREAKY_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + EndThread + Call(SpeakToPlayer, NPC_Tubba, ANIM_WorldTubba_Anim10, ANIM_WorldTubba_Anim06, 0, MSG_CH3_0101) + Thread + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim19) + Wait(4) + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim1A) + Wait(17) + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim1B) + Wait(11) + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim1C) + Wait(30) + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim1D) + EndThread + Wait(4) + Call(SetNpcJumpscale, NPC_Tubba, Float(1.0)) + Call(GetNpcPos, NPC_Tubba, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Tubba, LVar0, LVar1, LVar2, 30) + Call(PlaySoundAtNpc, NPC_Tubba, SOUND_LARGE_NPC_IMPACT, SOUND_SPACE_DEFAULT) + Call(PlaySound, SOUND_LOOP_DGB_COLLAPSE) + Call(ShakeCam, CAM_DEFAULT, 0, 15, Float(4.0)) + Call(ShakeCam, CAM_DEFAULT, 0, 15, Float(2.0)) + Call(SetSelfVar, 0, 3) + Return + End }; EvtScript N(EVS_NpcInit_Tubba_Floor3) = { - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(1.25), EVT_FLOAT(1.25), EVT_FLOAT(1.25)) - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Tubba_Floor3))) - EVT_RETURN - EVT_END + Call(SetNpcScale, NPC_SELF, Float(1.25), Float(1.25), Float(1.25)) + Call(SetSelfVar, 0, 0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Tubba_Floor3))) + Return + End }; EvtScript N(EVS_NpcDefeat_Tubba_Floor2) = { - EVT_CALL(N(UnkFunc1)) - EVT_CALL(GotoMap, EVT_PTR("dgb_08"), dgb_08_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(N(UnkFunc1)) + Call(GotoMap, Ref("dgb_08"), dgb_08_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_NpcInit_Tubba_Floor2) = { - EVT_IF_NE(GB_ARN_Tubba_MapID, 1) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INACTIVE, TRUE) - EVT_RETURN - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH3_TUBBA_CHASED_MARIO_IN_HALL) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INACTIVE, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_Tubba, 137, 244, 35) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Tubba_Floor2))) - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(1.25), EVT_FLOAT(1.25), EVT_FLOAT(1.25)) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(2.0)) - EVT_WAIT(5) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 2, EVT_FLOAT(1.0)) - EVT_WAIT(8) - EVT_END_LOOP - EVT_END_THREAD - EVT_RETURN - EVT_END + IfNe(GB_ARN_Tubba_MapID, 1) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INACTIVE, TRUE) + Return + EndIf + IfGe(GB_StoryProgress, STORY_CH3_TUBBA_CHASED_MARIO_IN_HALL) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INACTIVE, TRUE) + Return + EndIf + Call(SetNpcPos, NPC_Tubba, 137, 244, 35) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Tubba_Floor2))) + Call(SetNpcScale, NPC_SELF, Float(1.25), Float(1.25), Float(1.25)) + Thread + Loop(0) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(2.0)) + Wait(5) + Call(ShakeCam, CAM_DEFAULT, 0, 2, Float(1.0)) + Wait(8) + EndLoop + EndThread + Return + End }; EvtScript N(EVS_NpcIdle_Tubba_Floor1) = { - EVT_CALL(AwaitPlayerApproach, 0, 420, 400) - EVT_SET(GB_ARN_Tubba_MapID, 1) - EVT_SET(GB_StoryProgress, STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittse, SOUND_CREAKY_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 80, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o167, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o168, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_SELF, 555, 0, 0) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim0A) - EVT_CALL(NpcMoveTo, NPC_SELF, 426, 0, 30) - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(MakeLerp, 80, 0, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o167, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o168, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittse, SOUND_CREAKY_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_HEAVY_NPC_STEP_C, SOUND_PARAM_QUIET) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(2.0)) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_HEAVY_NPC_STEP_C, SOUND_PARAM_QUIET) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 2, EVT_FLOAT(1.0)) - EVT_WAIT(8) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, 259, 167, 0) - EVT_CALL(N(PatrolNoAttackAI_Main), EVT_PTR(N(AISettings_Tubba_Patrol))) - EVT_RETURN - EVT_END + Call(AwaitPlayerApproach, 0, 420, 400) + Set(GB_ARN_Tubba_MapID, 1) + Set(GB_StoryProgress, STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) + Call(PlaySoundAtCollider, COLLIDER_deilittse, SOUND_CREAKY_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 80, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o167, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_o168, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcPos, NPC_SELF, 555, 0, 0) + Call(SetNpcYaw, NPC_SELF, 270) + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim0A) + Call(NpcMoveTo, NPC_SELF, 426, 0, 30) + Thread + Wait(20) + Call(MakeLerp, 80, 0, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o167, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_o168, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_deilittse, SOUND_CREAKY_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + EndThread + Thread + Loop(0) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_HEAVY_NPC_STEP_C, SOUND_PARAM_QUIET) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(2.0)) + Wait(5) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_HEAVY_NPC_STEP_C, SOUND_PARAM_QUIET) + Call(ShakeCam, CAM_DEFAULT, 0, 2, Float(1.0)) + Wait(8) + EndLoop + EndThread + Call(SetNpcSpeed, NPC_SELF, Float(5.0)) + Call(NpcMoveTo, NPC_SELF, 259, 167, 0) + Call(N(PatrolNoAttackAI_Main), Ref(N(AISettings_Tubba_Patrol))) + Return + End }; EvtScript N(EVS_NpcDefeat_Tubba_Floor1) = { - EVT_CALL(N(UnkFunc1)) - EVT_CALL(GotoMap, EVT_PTR("dgb_00"), dgb_00_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(N(UnkFunc1)) + Call(GotoMap, Ref("dgb_00"), dgb_00_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_NpcInit_Tubba_Floor1) = { - EVT_IF_NE(GB_ARN_Tubba_MapID, 1) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Tubba_Floor1))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, 136, 0, -330) - EVT_END_IF - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Tubba_Floor1))) - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(1.25), EVT_FLOAT(1.25), EVT_FLOAT(1.25)) - EVT_RETURN - EVT_END + IfNe(GB_ARN_Tubba_MapID, 1) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Tubba_Floor1))) + Else + Call(SetNpcPos, NPC_SELF, 136, 0, -330) + EndIf + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Tubba_Floor1))) + Call(SetNpcScale, NPC_SELF, Float(1.25), Float(1.25), Float(1.25)) + Return + End }; EvtScript N(EVS_NpcInit_Sentinel_01) = { - EVT_SET(LVar0, GB_StoryProgress) - EVT_IF_GE(LVar0, STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Sentinel_Anim01) - EVT_CALL(SetNpcPos, NPC_SELF, -33, -3, 8) - EVT_CALL(SetNpcRotation, NPC_SELF, -50, 30, 10) - EVT_CALL(BindNpcIdle, NPC_SELF, 0) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVar0, GB_StoryProgress) + IfGe(LVar0, STORY_CH3_TUBBA_WOKE_UP) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Sentinel_Anim01) + Call(SetNpcPos, NPC_SELF, -33, -3, 8) + Call(SetNpcRotation, NPC_SELF, -50, 30, 10) + Call(BindNpcIdle, NPC_SELF, 0) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Sentinel_02) = { - EVT_SET(LVar0, GB_StoryProgress) - EVT_IF_GE(LVar0, STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Sentinel_Anim01) - EVT_CALL(SetNpcPos, NPC_SELF, -486, 182, 28) - EVT_CALL(SetNpcRotation, NPC_SELF, -10, 50, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, 0) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVar0, GB_StoryProgress) + IfGe(LVar0, STORY_CH3_TUBBA_WOKE_UP) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Sentinel_Anim01) + Call(SetNpcPos, NPC_SELF, -486, 182, 28) + Call(SetNpcRotation, NPC_SELF, -10, 50, 0) + Call(BindNpcIdle, NPC_SELF, 0) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Sentinel_03) = { - EVT_SET(LVar0, GB_StoryProgress) - EVT_IF_GE(LVar0, STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Sentinel_Anim01) - EVT_CALL(SetNpcPos, NPC_SELF, -201, 0, -143) - EVT_CALL(SetNpcRotation, NPC_SELF, -50, 0, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, 0) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVar0, GB_StoryProgress) + IfGe(LVar0, STORY_CH3_TUBBA_WOKE_UP) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Sentinel_Anim01) + Call(SetNpcPos, NPC_SELF, -201, 0, -143) + Call(SetNpcRotation, NPC_SELF, -50, 0, 0) + Call(BindNpcIdle, NPC_SELF, 0) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Sentinel_04) = { - EVT_SET(LVar0, GB_StoryProgress) - EVT_IF_GE(LVar0, STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Sentinel_Anim01) - EVT_CALL(SetNpcPos, NPC_SELF, -305, -1, -80) - EVT_CALL(SetNpcRotation, NPC_SELF, -65, -30, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, 0) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVar0, GB_StoryProgress) + IfGe(LVar0, STORY_CH3_TUBBA_WOKE_UP) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Sentinel_Anim01) + Call(SetNpcPos, NPC_SELF, -305, -1, -80) + Call(SetNpcRotation, NPC_SELF, -65, -30, 0) + Call(BindNpcIdle, NPC_SELF, 0) + EndIf + Return + End }; NpcData N(NpcData_Sentinel_01) = { diff --git a/src/world/area_dgb/dgb_02/dgb_02_1_music.c b/src/world/area_dgb/dgb_02/dgb_02_1_music.c index 5e21451b752..a037c680d42 100644 --- a/src/world/area_dgb/dgb_02/dgb_02_1_music.c +++ b/src/world/area_dgb/dgb_02/dgb_02_1_music.c @@ -1,14 +1,14 @@ #include "dgb_02.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_WOKE_UP) + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_dgb/dgb_02/dgb_02_2_main.c b/src/world/area_dgb/dgb_02/dgb_02_2_main.c index 69fe5942c40..addbc0afaf4 100644 --- a/src/world/area_dgb/dgb_02/dgb_02_2_main.c +++ b/src/world/area_dgb/dgb_02/dgb_02_2_main.c @@ -1,110 +1,110 @@ #include "dgb_02.h" EvtScript N(EVS_ExitDoors_dgb_03_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, dgb_02_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittw) - EVT_SET(LVar2, MODEL_o30) - EVT_SET(LVar3, MODEL_o31) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_03"), dgb_03_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, dgb_02_ENTRY_0) + Set(LVar1, COLLIDER_deilittw) + Set(LVar2, MODEL_o30) + Set(LVar3, MODEL_o31) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_03"), dgb_03_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_dgb_01_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, dgb_02_ENTRY_1) - EVT_SET(LVar1, COLLIDER_deilitte) - EVT_SET(LVar2, MODEL_o102) - EVT_SET(LVar3, MODEL_o101) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_01"), dgb_01_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, dgb_02_ENTRY_1) + Set(LVar1, COLLIDER_deilitte) + Set(LVar2, MODEL_o102) + Set(LVar3, MODEL_o101) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_01"), dgb_01_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoor_dgb_07_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, dgb_02_ENTRY_2) - EVT_SET(LVar1, COLLIDER_deilittnw) - EVT_SET(LVar2, MODEL_o76) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_07"), dgb_07_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, dgb_02_ENTRY_2) + Set(LVar1, COLLIDER_deilittnw) + Set(LVar2, MODEL_o76) + Set(LVar3, DOOR_SWING_OUT) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_07"), dgb_07_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoor_dgb_11_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, dgb_02_ENTRY_3) - EVT_SET(LVar1, COLLIDER_deilittne) - EVT_SET(LVar2, MODEL_o123) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_11"), dgb_11_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, dgb_02_ENTRY_3) + Set(LVar1, COLLIDER_deilittne) + Set(LVar2, MODEL_o123) + Set(LVar3, DOOR_SWING_OUT) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_11"), dgb_11_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(dgb_02_ENTRY_0) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar2, MODEL_o30) - EVT_SET(LVar3, MODEL_o31) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(dgb_02_ENTRY_1) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar2, MODEL_o102) - EVT_SET(LVar3, MODEL_o101) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(dgb_02_ENTRY_2) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar2, MODEL_o76) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_CASE_EQ(dgb_02_ENTRY_3) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar2, MODEL_o123) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(dgb_02_ENTRY_0) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar2, MODEL_o30) + Set(LVar3, MODEL_o31) + ExecWait(EnterDoubleDoor) + CaseEq(dgb_02_ENTRY_1) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar2, MODEL_o102) + Set(LVar3, MODEL_o101) + ExecWait(EnterDoubleDoor) + CaseEq(dgb_02_ENTRY_2) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar2, MODEL_o76) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSingleDoor) + CaseEq(dgb_02_ENTRY_3) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar2, MODEL_o123) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSingleDoor) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TUBBAS_MANOR) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_03_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_01_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitte, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_dgb_07_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_dgb_11_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TUBBAS_MANOR) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + IfLt(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + EndIf + BindTrigger(Ref(N(EVS_ExitDoors_dgb_03_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_dgb_01_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitte, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoor_dgb_07_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoor_dgb_11_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_dgb/dgb_03/dgb_03_1_music.c b/src/world/area_dgb/dgb_03/dgb_03_1_music.c index 7aacd2bd017..fda711525be 100644 --- a/src/world/area_dgb/dgb_03/dgb_03_1_music.c +++ b/src/world/area_dgb/dgb_03/dgb_03_1_music.c @@ -1,14 +1,14 @@ #include "dgb_03.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_WOKE_UP) + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_dgb/dgb_03/dgb_03_2_main.c b/src/world/area_dgb/dgb_03/dgb_03_2_main.c index cc3af994030..76fbdbbaaad 100644 --- a/src/world/area_dgb/dgb_03/dgb_03_2_main.c +++ b/src/world/area_dgb/dgb_03/dgb_03_2_main.c @@ -1,133 +1,133 @@ #include "dgb_03.h" EvtScript N(EVS_ExitDoors_dgb_02_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, dgb_03_ENTRY_1) - EVT_SET(LVar1, COLLIDER_deilittse) - EVT_SET(LVar2, MODEL_o102) - EVT_SET(LVar3, MODEL_o101) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_02"), dgb_02_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, dgb_03_ENTRY_1) + Set(LVar1, COLLIDER_deilittse) + Set(LVar2, MODEL_o102) + Set(LVar3, MODEL_o101) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_02"), dgb_02_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_dgb_09_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, dgb_03_ENTRY_4) - EVT_SET(LVar1, COLLIDER_deilittne) - EVT_SET(LVar2, MODEL_o106) - EVT_SET(LVar3, MODEL_o105) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_09"), dgb_09_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, dgb_03_ENTRY_4) + Set(LVar1, COLLIDER_deilittne) + Set(LVar2, MODEL_o106) + Set(LVar3, MODEL_o105) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_09"), dgb_09_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_dgb_04_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, dgb_03_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittsw) - EVT_SET(LVar2, MODEL_o30) - EVT_SET(LVar3, MODEL_o31) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_04"), dgb_04_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, dgb_03_ENTRY_0) + Set(LVar1, COLLIDER_deilittsw) + Set(LVar2, MODEL_o30) + Set(LVar3, MODEL_o31) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_04"), dgb_04_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_dgb_13_0) = EVT_EXIT_WALK(26, dgb_03_ENTRY_2, "dgb_13", dgb_13_ENTRY_0); EvtScript N(EVS_ExitDoors_dgb_05_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, dgb_03_ENTRY_2) - EVT_SET(LVar1, COLLIDER_deilitts) - EVT_SET(LVar2, MODEL_o76) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_05"), dgb_05_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, dgb_03_ENTRY_2) + Set(LVar1, COLLIDER_deilitts) + Set(LVar2, MODEL_o76) + Set(LVar3, DOOR_SWING_OUT) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_05"), dgb_05_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_dgb_14_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, dgb_03_ENTRY_3) - EVT_SET(LVar1, COLLIDER_deilittnw) - EVT_SET(LVar2, MODEL_o103) - EVT_SET(LVar3, MODEL_o104) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_14"), dgb_14_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, dgb_03_ENTRY_3) + Set(LVar1, COLLIDER_deilittnw) + Set(LVar2, MODEL_o103) + Set(LVar3, MODEL_o104) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_14"), dgb_14_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_dgb_13_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_dgb_13_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(dgb_03_ENTRY_0) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar2, MODEL_o30) - EVT_SET(LVar3, MODEL_o31) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(dgb_03_ENTRY_1) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar2, MODEL_o102) - EVT_SET(LVar3, MODEL_o101) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(dgb_03_ENTRY_2) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar2, MODEL_o76) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(dgb_03_ENTRY_3) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar2, MODEL_o103) - EVT_SET(LVar3, MODEL_o104) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(dgb_03_ENTRY_4) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar2, MODEL_o106) - EVT_SET(LVar3, MODEL_o105) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(dgb_03_ENTRY_5) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalkShort) - EVT_WAIT(1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(dgb_03_ENTRY_0) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar2, MODEL_o30) + Set(LVar3, MODEL_o31) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(dgb_03_ENTRY_1) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar2, MODEL_o102) + Set(LVar3, MODEL_o101) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(dgb_03_ENTRY_2) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar2, MODEL_o76) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSingleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(dgb_03_ENTRY_3) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar2, MODEL_o103) + Set(LVar3, MODEL_o104) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(dgb_03_ENTRY_4) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar2, MODEL_o106) + Set(LVar3, MODEL_o105) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(dgb_03_ENTRY_5) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalkShort) + Wait(1) + EndSwitch + Return + End }; s32 N(KeyList_UpperDoor)[] = { @@ -136,25 +136,25 @@ s32 N(KeyList_UpperDoor)[] = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TUBBAS_MANOR) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupClock)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_02_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_09_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_04_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_05_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitts, 1, 0) - EVT_IF_EQ(GF_DGB03_UnlockedThirdFloor, FALSE) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_UnlockPrompt_UpperDoor)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(KeyList_UpperDoor)), 0, 1) - EVT_ELSE - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_14_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0) - EVT_END_IF - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TUBBAS_MANOR) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + IfLt(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + EndIf + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupClock)) + BindTrigger(Ref(N(EVS_ExitDoors_dgb_02_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_dgb_09_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_dgb_04_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_dgb_05_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitts, 1, 0) + IfEq(GF_DGB03_UnlockedThirdFloor, FALSE) + BindPadlock(Ref(N(EVS_UnlockPrompt_UpperDoor)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), Ref(N(KeyList_UpperDoor)), 0, 1) + Else + BindTrigger(Ref(N(EVS_ExitDoors_dgb_14_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0) + EndIf + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_dgb/dgb_03/dgb_03_3_clock.c b/src/world/area_dgb/dgb_03/dgb_03_3_clock.c index 463a4a32321..7527374288c 100644 --- a/src/world/area_dgb/dgb_03/dgb_03_3_clock.c +++ b/src/world/area_dgb/dgb_03/dgb_03_3_clock.c @@ -4,130 +4,130 @@ #include "world/common/todo/UnkFunc12.inc.c" EvtScript N(EVS_PushClock_Impl) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_LOOP(20) - EVT_CALL(GetPartnerInUse, LVarA) - EVT_IF_NE(LVarA, PARTNER_NONE) - EVT_SET(LVar8, -1) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(UnkFunc11), LVar9) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LVar8, -1) - EVT_RETURN - EVT_ELSE - EVT_CALL(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetPartnerInUse, LVarA) - EVT_IF_NE(LVarA, PARTNER_NONE) - EVT_SET(LVar8, -1) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 100, EVT_FLOAT(0.6)) - EVT_END_THREAD - EVT_THREAD - EVT_IF_GE(LVar6, LVar7) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_ELSE - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_END_IF - EVT_CALL(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar1, LVar0) - EVT_SET(LVar2, LVar7) - EVT_SUB(LVar2, LVar6) - EVT_ADD(LVar1, LVar2) - EVT_CALL(MakeLerp, LVar0, LVar1, 100, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) - EVT_CALL(UpdateLerp) - EVT_CALL(N(UnkFunc12)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_THREAD - EVT_CALL(MakeLerp, LVar6, LVar7, 100, EASING_LINEAR) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o77, SOUND_LOOP_MOVE_STATUE, SOUND_SPACE_DEFAULT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o77, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o77) - EVT_CALL(UpdateColliderTransform, COLLIDER_o112) - EVT_CALL(UpdateColliderTransform, COLLIDER_o113) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(StopSound, SOUND_LOOP_MOVE_STATUE) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Loop(20) + Call(GetPartnerInUse, LVarA) + IfNe(LVarA, PARTNER_NONE) + Set(LVar8, -1) + Return + EndIf + Call(N(UnkFunc11), LVar9) + IfEq(LVar0, 0) + Set(LVar8, -1) + Return + Else + Call(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) + EndIf + Wait(1) + EndLoop + Call(GetPartnerInUse, LVarA) + IfNe(LVarA, PARTNER_NONE) + Set(LVar8, -1) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 100, Float(0.6)) + EndThread + Thread + IfGe(LVar6, LVar7) + Call(InterpPlayerYaw, 270, 0) + Else + Call(InterpPlayerYaw, 90, 0) + EndIf + Call(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar1, LVar0) + Set(LVar2, LVar7) + Sub(LVar2, LVar6) + Add(LVar1, LVar2) + Call(MakeLerp, LVar0, LVar1, 100, EASING_LINEAR) + Loop(0) + Call(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) + Call(UpdateLerp) + Call(N(UnkFunc12)) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(DisablePlayerInput, FALSE) + EndThread + Call(MakeLerp, LVar6, LVar7, 100, EASING_LINEAR) + Call(PlaySoundAtCollider, COLLIDER_o77, SOUND_LOOP_MOVE_STATUE, SOUND_SPACE_DEFAULT) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o77, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o77) + Call(UpdateColliderTransform, COLLIDER_o112) + Call(UpdateColliderTransform, COLLIDER_o113) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(StopSound, SOUND_LOOP_MOVE_STATUE) + Return + End }; EvtScript N(EVS_PushClockRight) = { - EVT_IF_NE(GF_DGB03_PushedClock, FALSE) - EVT_GOTO(90) - EVT_END_IF - EVT_SET(LVar6, 0) - EVT_SET(LVar7, 48) - EVT_SET(LVar8, 0) - EVT_SET(LVar9, 27) - EVT_EXEC_WAIT(N(EVS_PushClock_Impl)) - EVT_LABEL(90) - EVT_IF_NE(LVar8, -1) - EVT_SET(GF_DGB03_PushedClockLeft, FALSE) - EVT_SET(GF_DGB03_PushedClock, TRUE) - EVT_UNBIND - EVT_END_IF - EVT_RETURN - EVT_END + IfNe(GF_DGB03_PushedClock, FALSE) + Goto(90) + EndIf + Set(LVar6, 0) + Set(LVar7, 48) + Set(LVar8, 0) + Set(LVar9, 27) + ExecWait(N(EVS_PushClock_Impl)) + Label(90) + IfNe(LVar8, -1) + Set(GF_DGB03_PushedClockLeft, FALSE) + Set(GF_DGB03_PushedClock, TRUE) + Unbind + EndIf + Return + End }; EvtScript N(EVS_PushClockLeft) = { - EVT_IF_NE(GF_DGB03_PushedClock, FALSE) - EVT_GOTO(90) - EVT_END_IF - EVT_SET(LVar6, 0) - EVT_SET(LVar7, -48) - EVT_SET(LVar8, 0) - EVT_SET(LVar9, 28) - EVT_EXEC_WAIT(N(EVS_PushClock_Impl)) - EVT_LABEL(90) - EVT_IF_NE(LVar8, -1) - EVT_SET(GF_DGB03_PushedClockLeft, TRUE) - EVT_SET(GF_DGB03_PushedClock, TRUE) - EVT_UNBIND - EVT_END_IF - EVT_RETURN - EVT_END + IfNe(GF_DGB03_PushedClock, FALSE) + Goto(90) + EndIf + Set(LVar6, 0) + Set(LVar7, -48) + Set(LVar8, 0) + Set(LVar9, 28) + ExecWait(N(EVS_PushClock_Impl)) + Label(90) + IfNe(LVar8, -1) + Set(GF_DGB03_PushedClockLeft, TRUE) + Set(GF_DGB03_PushedClock, TRUE) + Unbind + EndIf + Return + End }; EvtScript N(EVS_SetupClock) = { - EVT_CALL(ParentColliderToModel, COLLIDER_o77, MODEL_o77) - EVT_CALL(ParentColliderToModel, COLLIDER_o112, MODEL_o77) - EVT_CALL(ParentColliderToModel, COLLIDER_o113, MODEL_o77) - EVT_IF_EQ(GF_DGB03_PushedClock, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_PushClockRight)), TRIGGER_WALL_PUSH, COLLIDER_o77, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_PushClockLeft)), TRIGGER_WALL_PUSH, COLLIDER_o112, 1, 0) - EVT_ELSE - EVT_IF_EQ(GF_DGB03_PushedClockLeft, FALSE) - EVT_SET(LVar0, 48) - EVT_ELSE - EVT_SET(LVar0, -48) - EVT_END_IF - EVT_CALL(TranslateModel, MODEL_o77, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o77) - EVT_CALL(UpdateColliderTransform, COLLIDER_o112) - EVT_CALL(UpdateColliderTransform, COLLIDER_o113) - EVT_END_IF - EVT_RETURN - EVT_END + Call(ParentColliderToModel, COLLIDER_o77, MODEL_o77) + Call(ParentColliderToModel, COLLIDER_o112, MODEL_o77) + Call(ParentColliderToModel, COLLIDER_o113, MODEL_o77) + IfEq(GF_DGB03_PushedClock, FALSE) + BindTrigger(Ref(N(EVS_PushClockRight)), TRIGGER_WALL_PUSH, COLLIDER_o77, 1, 0) + BindTrigger(Ref(N(EVS_PushClockLeft)), TRIGGER_WALL_PUSH, COLLIDER_o112, 1, 0) + Else + IfEq(GF_DGB03_PushedClockLeft, FALSE) + Set(LVar0, 48) + Else + Set(LVar0, -48) + EndIf + Call(TranslateModel, MODEL_o77, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o77) + Call(UpdateColliderTransform, COLLIDER_o112) + Call(UpdateColliderTransform, COLLIDER_o113) + EndIf + Return + End }; diff --git a/src/world/area_dgb/dgb_03/dgb_03_4_entity.c b/src/world/area_dgb/dgb_03/dgb_03_4_entity.c index 558f09b3dc9..9e1b728d8e4 100644 --- a/src/world/area_dgb/dgb_03/dgb_03_4_entity.c +++ b/src/world/area_dgb/dgb_03/dgb_03_4_entity.c @@ -5,47 +5,47 @@ #include "world/common/todo/GetEntityPosition.inc.c" EvtScript N(EVS_UnlockPrompt_UpperDoor) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SUSPEND_GROUP(EVT_GROUP_01) - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_CALL(CloseChoicePopup) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_RETURN - EVT_END_IF - EVT_CALL(FindKeyItem, ITEM_TUBBA_CASTLE_KEY, LVar0) - EVT_CALL(RemoveKeyItemAt, LVar0) - EVT_CALL(CloseChoicePopup) - EVT_SET(GF_DGB03_UnlockedThirdFloor, TRUE) - EVT_CALL(N(GetEntityPosition), MV_PadlockEntityID, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_SET(LVar0, MV_PadlockEntityID) - EVT_CALL(N(RemovePadlock)) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_UNBIND - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + SuspendGroup(EVT_GROUP_01) + Call(ShowKeyChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) + Call(CloseChoicePopup) + ResumeGroup(EVT_GROUP_01) + Return + EndIf + IfEq(LVar0, -1) + Call(CloseChoicePopup) + ResumeGroup(EVT_GROUP_01) + Return + EndIf + Call(FindKeyItem, ITEM_TUBBA_CASTLE_KEY, LVar0) + Call(RemoveKeyItemAt, LVar0) + Call(CloseChoicePopup) + Set(GF_DGB03_UnlockedThirdFloor, TRUE) + Call(N(GetEntityPosition), MV_PadlockEntityID, LVar0, LVar1, LVar2) + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Set(LVar0, MV_PadlockEntityID) + Call(N(RemovePadlock)) + ResumeGroup(EVT_GROUP_01) + Unbind + Return + End }; EvtScript N(EVS_OpenLockedDoor) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_14_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_dgb_14_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_DGB03_UnlockedThirdFloor, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), -355, 218, 75, 80, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenLockedDoor))) - EVT_SET(MV_PadlockEntityID, LVar0) - EVT_END_IF - EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 0, 75, 100, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_DGB03_Item_StarPiece) - EVT_RETURN - EVT_END + IfEq(GF_DGB03_UnlockedThirdFloor, FALSE) + Call(MakeEntity, Ref(Entity_Padlock), -355, 218, 75, 80, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OpenLockedDoor))) + Set(MV_PadlockEntityID, LVar0) + EndIf + Call(MakeItemEntity, ITEM_STAR_PIECE, 0, 75, 100, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_DGB03_Item_StarPiece) + Return + End }; diff --git a/src/world/area_dgb/dgb_03/dgb_03_5_npc.c b/src/world/area_dgb/dgb_03/dgb_03_5_npc.c index b759f042d93..81cfe113165 100644 --- a/src/world/area_dgb/dgb_03/dgb_03_5_npc.c +++ b/src/world/area_dgb/dgb_03/dgb_03_5_npc.c @@ -6,12 +6,12 @@ #include "world/common/enemy/Clubba_Multi.inc.c" EvtScript N(EVS_NpcInit_Clubba_Napping) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, dgb_03_ENTRY_3) - EVT_CALL(SetNpcPos, NPC_SELF, -330, 210, -20) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, dgb_03_ENTRY_3) + Call(SetNpcPos, NPC_SELF, -330, 210, -20) + EndIf + Return + End }; NpcData N(NpcData_Clubba_Wander)[] = { diff --git a/src/world/area_dgb/dgb_04/dgb_04_1_music.c b/src/world/area_dgb/dgb_04/dgb_04_1_music.c index f853ba2b316..2f159f9ef77 100644 --- a/src/world/area_dgb/dgb_04/dgb_04_1_music.c +++ b/src/world/area_dgb/dgb_04/dgb_04_1_music.c @@ -1,14 +1,14 @@ #include "dgb_04.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_WOKE_UP) + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_dgb/dgb_04/dgb_04_2_main.c b/src/world/area_dgb/dgb_04/dgb_04_2_main.c index 6eff7477223..504e2a254cf 100644 --- a/src/world/area_dgb/dgb_04/dgb_04_2_main.c +++ b/src/world/area_dgb/dgb_04/dgb_04_2_main.c @@ -1,67 +1,67 @@ #include "dgb_04.h" EvtScript N(EVS_ExitDoor_dgb_06_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, dgb_04_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittse) - EVT_SET(LVar2, MODEL_o206) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_06"), dgb_06_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, dgb_04_ENTRY_0) + Set(LVar1, COLLIDER_deilittse) + Set(LVar2, MODEL_o206) + Set(LVar3, DOOR_SWING_OUT) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_06"), dgb_06_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_dgb_03_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, dgb_04_ENTRY_1) - EVT_SET(LVar1, COLLIDER_deilittne) - EVT_SET(LVar2, MODEL_o102) - EVT_SET(LVar3, MODEL_o101) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_03"), dgb_03_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, dgb_04_ENTRY_1) + Set(LVar1, COLLIDER_deilittne) + Set(LVar2, MODEL_o102) + Set(LVar3, MODEL_o101) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_03"), dgb_03_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(dgb_04_ENTRY_0) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar2, MODEL_o102) - EVT_SET(LVar3, MODEL_o101) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(dgb_04_ENTRY_1) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar2, MODEL_o206) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(dgb_04_ENTRY_0) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar2, MODEL_o102) + Set(LVar3, MODEL_o101) + ExecWait(EnterDoubleDoor) + CaseEq(dgb_04_ENTRY_1) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar2, MODEL_o206) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSingleDoor) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TUBBAS_MANOR) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_dgb_06_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_03_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TUBBAS_MANOR) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + IfLt(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + EndIf + ExecWait(N(EVS_MakeEntities)) + BindTrigger(Ref(N(EVS_ExitDoor_dgb_06_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_dgb_03_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_dgb/dgb_04/dgb_04_4_entity.c b/src/world/area_dgb/dgb_04/dgb_04_4_entity.c index 3a8492c7267..2ca6172300e 100644 --- a/src/world/area_dgb/dgb_04/dgb_04_4_entity.c +++ b/src/world/area_dgb/dgb_04/dgb_04_4_entity.c @@ -7,6 +7,6 @@ EvtScript N(EVS_MakeEntities) = { EVT_MAKE_SUPER_BLOCK(500, -360, 110, 0) - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/area_dgb/dgb_05/dgb_05_1_music.c b/src/world/area_dgb/dgb_05/dgb_05_1_music.c index 852b59d6903..fe3abd8eab0 100644 --- a/src/world/area_dgb/dgb_05/dgb_05_1_music.c +++ b/src/world/area_dgb/dgb_05/dgb_05_1_music.c @@ -1,14 +1,14 @@ #include "dgb_05.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_WOKE_UP) + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_dgb/dgb_05/dgb_05_2_main.c b/src/world/area_dgb/dgb_05/dgb_05_2_main.c index b9a9f2636ee..59a4140bf14 100644 --- a/src/world/area_dgb/dgb_05/dgb_05_2_main.c +++ b/src/world/area_dgb/dgb_05/dgb_05_2_main.c @@ -1,48 +1,48 @@ #include "dgb_05.h" EvtScript N(EVS_ExitDoor_dgb_03_2) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, dgb_05_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittn) - EVT_SET(LVar2, MODEL_o158) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_03"), dgb_03_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, dgb_05_ENTRY_0) + Set(LVar1, COLLIDER_deilittn) + Set(LVar2, MODEL_o158) + Set(LVar3, DOOR_SWING_IN) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_03"), dgb_03_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(dgb_05_ENTRY_0) - EVT_SET(LVar2, MODEL_o158) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(dgb_05_ENTRY_0) + Set(LVar2, MODEL_o158) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TUBBAS_MANOR) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupHole)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitts, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_o297, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_dgb_03_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittn, 1, 0) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TUBBAS_MANOR) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + IfLt(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + EndIf + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupHole)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitts, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_o297, FALSE) + BindTrigger(Ref(N(EVS_ExitDoor_dgb_03_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittn, 1, 0) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_dgb/dgb_05/dgb_05_3_hole.c b/src/world/area_dgb/dgb_05/dgb_05_3_hole.c index 406005660df..10fa0b4bb79 100644 --- a/src/world/area_dgb/dgb_05/dgb_05_3_hole.c +++ b/src/world/area_dgb/dgb_05/dgb_05_3_hole.c @@ -15,12 +15,12 @@ API_CALLABLE(N(AwaitFallDownHole)) { } EvtScript N(EVS_SetupHole) = { - EVT_CALL(N(AwaitFallInHole)) - EVT_CALL(func_802CA988, CAM_DEFAULT, LVar2, LVar3, LVar4, LVar5) - EVT_CALL(N(AwaitFallDownHole)) - EVT_SET(GF_DGB05_BoardedFloor, TRUE) - EVT_CALL(GotoMap, EVT_PTR("dgb_06"), dgb_06_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(N(AwaitFallInHole)) + Call(func_802CA988, CAM_DEFAULT, LVar2, LVar3, LVar4, LVar5) + Call(N(AwaitFallDownHole)) + Set(GF_DGB05_BoardedFloor, TRUE) + Call(GotoMap, Ref("dgb_06"), dgb_06_ENTRY_1) + Wait(100) + Return + End }; diff --git a/src/world/area_dgb/dgb_05/dgb_05_4_entity.c b/src/world/area_dgb/dgb_05/dgb_05_4_entity.c index 8905dc43eba..7991c54bdef 100644 --- a/src/world/area_dgb/dgb_05/dgb_05_4_entity.c +++ b/src/world/area_dgb/dgb_05/dgb_05_4_entity.c @@ -2,9 +2,9 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_DGB05_BoardedFloor, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BoardedFloor), 510, -210, 100, 0, MAKE_ENTITY_END) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_DGB05_BoardedFloor, FALSE) + Call(MakeEntity, Ref(Entity_BoardedFloor), 510, -210, 100, 0, MAKE_ENTITY_END) + EndIf + Return + End }; diff --git a/src/world/area_dgb/dgb_06/dgb_06_1_music.c b/src/world/area_dgb/dgb_06/dgb_06_1_music.c index b0134895fbc..78d6716c669 100644 --- a/src/world/area_dgb/dgb_06/dgb_06_1_music.c +++ b/src/world/area_dgb/dgb_06/dgb_06_1_music.c @@ -1,14 +1,14 @@ #include "dgb_06.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_WOKE_UP) + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_dgb/dgb_06/dgb_06_2_main.c b/src/world/area_dgb/dgb_06/dgb_06_2_main.c index a687cf762fe..bfa7fde0641 100644 --- a/src/world/area_dgb/dgb_06/dgb_06_2_main.c +++ b/src/world/area_dgb/dgb_06/dgb_06_2_main.c @@ -1,48 +1,48 @@ #include "dgb_06.h" EvtScript N(EVS_ExitDoor_dgb_04_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, dgb_06_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittw) - EVT_SET(LVar2, MODEL_o161) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_04"), dgb_04_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, dgb_06_ENTRY_0) + Set(LVar1, COLLIDER_deilittw) + Set(LVar2, MODEL_o161) + Set(LVar3, DOOR_SWING_IN) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_04"), dgb_04_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(dgb_06_ENTRY_0) - EVT_SET(LVar2, MODEL_o161) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(dgb_06_ENTRY_0) + Set(LVar2, MODEL_o161) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TUBBAS_MANOR) - EVT_CALL(SetSpriteShading, SHADING_DGB_06) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_IF_EQ(GF_DGB05_BoardedFloor, FALSE) - EVT_CALL(EnableGroup, MODEL_g52, FALSE) - EVT_ELSE - EVT_CALL(EnableGroup, MODEL_g53, FALSE) - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_dgb_04_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TUBBAS_MANOR) + Call(SetSpriteShading, SHADING_DGB_06) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + IfEq(GF_DGB05_BoardedFloor, FALSE) + Call(EnableGroup, MODEL_g52, FALSE) + Else + Call(EnableGroup, MODEL_g53, FALSE) + EndIf + BindTrigger(Ref(N(EVS_ExitDoor_dgb_04_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_dgb/dgb_06/dgb_06_3_entity.c b/src/world/area_dgb/dgb_06/dgb_06_3_entity.c index 5c708ec5ada..ebdd7c0b96a 100644 --- a/src/world/area_dgb/dgb_06/dgb_06_3_entity.c +++ b/src/world/area_dgb/dgb_06/dgb_06_3_entity.c @@ -6,10 +6,10 @@ EvtScript N(EVS_OpenChest_TubbaKey) = EVT_OPEN_CHEST_KEY(ITEM_TUBBA_CASTLE_KEY, GF_DGB06_Chest_CastleKey1); EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), -300, 50, -200, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_DGB06_Chest_CastleKey1) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenChest_TubbaKey))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), -125, 60, 175, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Chest), -300, 50, -200, 0, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_DGB06_Chest_CastleKey1) + Call(AssignScript, Ref(N(EVS_OpenChest_TubbaKey))) + Call(MakeEntity, Ref(Entity_HeartBlock), -125, 60, 175, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_dgb/dgb_06/dgb_06_4_npc.c b/src/world/area_dgb/dgb_06/dgb_06_4_npc.c index 3249984f48a..c052d66bfb1 100644 --- a/src/world/area_dgb/dgb_06/dgb_06_4_npc.c +++ b/src/world/area_dgb/dgb_06/dgb_06_4_npc.c @@ -3,24 +3,24 @@ #include "world/common/npc/Boo.inc.c" EvtScript N(EVS_NpcInteract_Boo) = { - EVT_IF_EQ(AF_DGB06_Boo_Dialogue, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00F0) - EVT_SET(AF_DGB06_Boo_Dialogue, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00F1) - EVT_SET(AF_DGB06_Boo_Dialogue, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(AF_DGB06_Boo_Dialogue, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00F0) + Set(AF_DGB06_Boo_Dialogue, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00F1) + Set(AF_DGB06_Boo_Dialogue, FALSE) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Boo) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Boo))) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Boo))) + Return + End }; NpcData N(NpcData_Boo) = { diff --git a/src/world/area_dgb/dgb_07/dgb_07_1_music.c b/src/world/area_dgb/dgb_07/dgb_07_1_music.c index d7dd88b37b5..f404715ff08 100644 --- a/src/world/area_dgb/dgb_07/dgb_07_1_music.c +++ b/src/world/area_dgb/dgb_07/dgb_07_1_music.c @@ -1,14 +1,14 @@ #include "dgb_07.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_WOKE_UP) + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_dgb/dgb_07/dgb_07_2_main.c b/src/world/area_dgb/dgb_07/dgb_07_2_main.c index bd01d50979e..08401b9ff56 100644 --- a/src/world/area_dgb/dgb_07/dgb_07_2_main.c +++ b/src/world/area_dgb/dgb_07/dgb_07_2_main.c @@ -1,47 +1,47 @@ #include "dgb_07.h" EvtScript N(EVS_ExitDoor_dgb_02_2) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, dgb_07_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilits) - EVT_SET(LVar2, MODEL_o158) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_02"), dgb_02_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, dgb_07_ENTRY_0) + Set(LVar1, COLLIDER_deilits) + Set(LVar2, MODEL_o158) + Set(LVar3, DOOR_SWING_IN) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_02"), dgb_02_ENTRY_2) + Wait(100) + Return + End }; MAP_RODATA_PAD(1, strings); EvtScript N(EVS_EnterMap) = { - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(dgb_07_ENTRY_0) - EVT_SET(LVar2, MODEL_o158) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(dgb_07_ENTRY_0) + Set(LVar2, MODEL_o158) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TUBBAS_MANOR) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_dgb_02_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilits, 1, 0) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TUBBAS_MANOR) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + IfLt(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + EndIf + ExecWait(N(EVS_MakeEntities)) + BindTrigger(Ref(N(EVS_ExitDoor_dgb_02_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilits, 1, 0) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_dgb/dgb_07/dgb_07_3_entity.c b/src/world/area_dgb/dgb_07/dgb_07_3_entity.c index 1bd5fec42de..294778aed15 100644 --- a/src/world/area_dgb/dgb_07/dgb_07_3_entity.c +++ b/src/world/area_dgb/dgb_07/dgb_07_3_entity.c @@ -2,9 +2,9 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, -220, 75, -210, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_DGB07_Item_StarPiece) - EVT_CALL(MakeEntity, EVT_PTR(Entity_WoodenCrate), -370, 0, -200, 0, -1, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_WoodenCrate), -410, 0, -200, 0, -1, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_STAR_PIECE, -220, 75, -210, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_DGB07_Item_StarPiece) + Call(MakeEntity, Ref(Entity_WoodenCrate), -370, 0, -200, 0, -1, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_WoodenCrate), -410, 0, -200, 0, -1, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_dgb/dgb_08/dgb_08_1_music.c b/src/world/area_dgb/dgb_08/dgb_08_1_music.c index 70f27fcaaed..5d48660f30b 100644 --- a/src/world/area_dgb/dgb_08/dgb_08_1_music.c +++ b/src/world/area_dgb/dgb_08/dgb_08_1_music.c @@ -1,14 +1,14 @@ #include "dgb_08.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_WOKE_UP) + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_dgb/dgb_08/dgb_08_2_main.c b/src/world/area_dgb/dgb_08/dgb_08_2_main.c index 2fa117325a4..6cf257a2b57 100644 --- a/src/world/area_dgb/dgb_08/dgb_08_2_main.c +++ b/src/world/area_dgb/dgb_08/dgb_08_2_main.c @@ -1,73 +1,73 @@ #include "dgb_08.h" EvtScript N(EVS_ExitDoors_dgb_01_2) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, dgb_08_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittse) - EVT_SET(LVar2, MODEL_o142) - EVT_SET(LVar3, MODEL_o143) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_01"), dgb_01_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, dgb_08_ENTRY_0) + Set(LVar1, COLLIDER_deilittse) + Set(LVar2, MODEL_o142) + Set(LVar3, MODEL_o143) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_01"), dgb_01_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_dgb_01_4) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, dgb_08_ENTRY_1) - EVT_SET(LVar1, COLLIDER_deilittne) - EVT_SET(LVar2, MODEL_o140) - EVT_SET(LVar3, MODEL_o141) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_01"), dgb_01_ENTRY_4) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, dgb_08_ENTRY_1) + Set(LVar1, COLLIDER_deilittne) + Set(LVar2, MODEL_o140) + Set(LVar3, MODEL_o141) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_01"), dgb_01_ENTRY_4) + Wait(100) + Return + End }; MAP_RODATA_PAD(1, strings); EvtScript N(EVS_EnterMap) = { - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(dgb_08_ENTRY_0) - EVT_SET(LVar2, MODEL_o142) - EVT_SET(LVar3, MODEL_o143) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(dgb_08_ENTRY_1) - EVT_SET(LVar2, MODEL_o140) - EVT_SET(LVar3, MODEL_o141) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(dgb_08_ENTRY_0) + Set(LVar2, MODEL_o142) + Set(LVar3, MODEL_o143) + ExecWait(EnterDoubleDoor) + CaseEq(dgb_08_ENTRY_1) + Set(LVar2, MODEL_o140) + Set(LVar3, MODEL_o141) + ExecWait(EnterDoubleDoor) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TUBBAS_MANOR) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_SMASHED_THE_BRIDGES) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(BeforeNPCs))) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(TubbaNPCs))) - EVT_CASE_LT(STORY_CH6_RETURNED_TO_TOAD_TOWN) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(AfterNPCs))) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_01_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_01_4)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TUBBAS_MANOR) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_SMASHED_THE_BRIDGES) + Call(MakeNpcs, TRUE, Ref(N(BeforeNPCs))) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(MakeNpcs, TRUE, Ref(N(TubbaNPCs))) + CaseLt(STORY_CH6_RETURNED_TO_TOAD_TOWN) + Call(MakeNpcs, TRUE, Ref(N(AfterNPCs))) + EndSwitch + ExecWait(N(EVS_MakeEntities)) + BindTrigger(Ref(N(EVS_ExitDoors_dgb_01_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_dgb_01_4)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_dgb/dgb_08/dgb_08_3_npc.c b/src/world/area_dgb/dgb_08/dgb_08_3_npc.c index 13d8125ff66..f27fb927697 100644 --- a/src/world/area_dgb/dgb_08/dgb_08_3_npc.c +++ b/src/world/area_dgb/dgb_08/dgb_08_3_npc.c @@ -25,48 +25,48 @@ NpcSettings N(NpcSettings_LastClubba) = { extern EvtScript N(EVS_NpcAI_Tubba); EvtScript N(EVS_NpcIdle_Tubba) = { - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GE(LVar0, -350) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(GB_ARN_Tubba_MapID, 8) - EVT_SET(GB_StoryProgress, STORY_CH3_TUBBA_CHASED_MARIO_IN_HALL) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittne, SOUND_CREAKY_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 80, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o140, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o141, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim0A) - EVT_CALL(SetNpcPos, NPC_SELF, -665, 210, 180) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_CALL(NpcMoveTo, NPC_SELF, -530, 180, 30) - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(MakeLerp, 80, 0, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o140, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o141, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittne, SOUND_CREAKY_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_CALL(NpcMoveTo, NPC_SELF, -500, 80, 10) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Tubba))) - EVT_RETURN - EVT_END + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGe(LVar0, -350) + BreakLoop + EndIf + Wait(1) + EndLoop + Set(GB_ARN_Tubba_MapID, 8) + Set(GB_StoryProgress, STORY_CH3_TUBBA_CHASED_MARIO_IN_HALL) + Call(PlaySoundAtCollider, COLLIDER_deilittne, SOUND_CREAKY_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 80, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o140, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_o141, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim0A) + Call(SetNpcPos, NPC_SELF, -665, 210, 180) + Call(SetNpcYaw, NPC_SELF, 90) + Call(NpcMoveTo, NPC_SELF, -530, 180, 30) + Thread + Wait(20) + Call(MakeLerp, 80, 0, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o140, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_o141, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_deilittne, SOUND_CREAKY_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + EndThread + Call(NpcMoveTo, NPC_SELF, -500, 80, 10) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_Tubba))) + Return + End }; #include "world/common/todo/UnkFunc1.inc.c" @@ -98,76 +98,76 @@ API_CALLABLE(N(SetTubbaPatrolMode)) { } EvtScript N(EVS_SetPatrolAfterWaiting) = { - EVT_LABEL(10) - EVT_CALL(GetNpcPos, NPC_Tubba, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar1, 0) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(N(SetTubbaPatrolTerritory)) - EVT_RETURN - EVT_END + Label(10) + Call(GetNpcPos, NPC_Tubba, LVar0, LVar1, LVar2) + IfGt(LVar1, 0) + Wait(1) + Goto(10) + EndIf + Call(N(SetTubbaPatrolTerritory)) + Return + End }; EvtScript N(EVS_NpcAI_Tubba) = { - EVT_CALL(N(SetTubbaPatrolMode)) - EVT_EXEC(N(EVS_SetPatrolAfterWaiting)) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_HEAVY_NPC_STEP_C, SOUND_PARAM_QUIET) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(2.0)) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_HEAVY_NPC_STEP_C, SOUND_PARAM_QUIET) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 2, EVT_FLOAT(1.0)) - EVT_WAIT(8) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(N(PatrolNoAttackAI_Main), EVT_PTR(N(AISettings_Tubba_Patrol))) - EVT_RETURN - EVT_END + Call(N(SetTubbaPatrolMode)) + Exec(N(EVS_SetPatrolAfterWaiting)) + Thread + Loop(0) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_HEAVY_NPC_STEP_C, SOUND_PARAM_QUIET) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(2.0)) + Wait(5) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_HEAVY_NPC_STEP_C, SOUND_PARAM_QUIET) + Call(ShakeCam, CAM_DEFAULT, 0, 2, Float(1.0)) + Wait(8) + EndLoop + EndThread + Call(N(PatrolNoAttackAI_Main), Ref(N(AISettings_Tubba_Patrol))) + Return + End }; EvtScript N(EVS_NpcDefeat_Tubba) = { - EVT_CALL(N(UnkFunc1)) - EVT_CALL(GotoMap, EVT_PTR("dgb_01"), dgb_01_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(N(UnkFunc1)) + Call(GotoMap, Ref("dgb_01"), dgb_01_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_NpcInit_Tubba) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH3_TUBBA_SMASHED_THE_BRIDGES) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INACTIVE, TRUE) - EVT_RETURN - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INACTIVE, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(1.25), EVT_FLOAT(1.25), EVT_FLOAT(1.25)) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Tubba))) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(dgb_08_ENTRY_0) - EVT_IF_NE(GB_ARN_Tubba_MapID, 8) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INACTIVE, TRUE) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, -130, 0, 200) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Tubba))) - EVT_END_IF - EVT_CASE_EQ(dgb_08_ENTRY_1) - EVT_IF_NE(GB_ARN_Tubba_MapID, 8) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Tubba))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, -130, 210, 80) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Tubba))) - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH3_TUBBA_SMASHED_THE_BRIDGES) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INACTIVE, TRUE) + Return + EndIf + IfGe(GB_StoryProgress, STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INACTIVE, TRUE) + Return + EndIf + Call(SetNpcScale, NPC_SELF, Float(1.25), Float(1.25), Float(1.25)) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Tubba))) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(dgb_08_ENTRY_0) + IfNe(GB_ARN_Tubba_MapID, 8) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INACTIVE, TRUE) + Else + Call(SetNpcPos, NPC_SELF, -130, 0, 200) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcAI_Tubba))) + EndIf + CaseEq(dgb_08_ENTRY_1) + IfNe(GB_ARN_Tubba_MapID, 8) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Tubba))) + Else + Call(SetNpcPos, NPC_SELF, -130, 210, 80) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcAI_Tubba))) + EndIf + EndSwitch + Return + End }; NpcData N(NpcData_Tubba) = { @@ -335,63 +335,63 @@ API_CALLABLE(N(PlayAlertSound)) { } EvtScript N(EVS_NpcIdle_LastClubba) = { - EVT_LABEL(0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim07) - EVT_WAIT(30) - EVT_LOOP(15) - EVT_CALL(N(PlayAlertSound)) - EVT_WAIT(60) - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim0C) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim07) - EVT_WAIT(30) - EVT_LOOP(5) - EVT_CALL(N(PlayAlertSound)) - EVT_WAIT(60) - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim0C) - EVT_WAIT(15) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim07) + Wait(30) + Loop(15) + Call(N(PlayAlertSound)) + Wait(60) + EndLoop + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim0C) + Wait(20) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim07) + Wait(30) + Loop(5) + Call(N(PlayAlertSound)) + Wait(60) + EndLoop + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim0C) + Wait(15) + Goto(0) + Return + End }; EvtScript N(EVS_NpcInteract_LastClubba) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim08) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SNAP_AWAKE_A, SOUND_SPACE_DEFAULT) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim02) - EVT_WAIT(20) - EVT_CALL(GetNpcYaw, NPC_SELF, LVar0) - EVT_ADD(LVar0, 180) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 0) - EVT_WAIT(10) - EVT_CALL(GetNpcYaw, NPC_SELF, LVar0) - EVT_ADD(LVar0, 180) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 0) - EVT_WAIT(25) - EVT_CALL(GetNpcYaw, NPC_SELF, LVar0) - EVT_ADD(LVar0, 180) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 0) - EVT_WAIT(15) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldClubba_Anim05, ANIM_WorldClubba_Anim02, 0, MSG_CH3_00F2) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim06) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim07) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim08) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SNAP_AWAKE_A, SOUND_SPACE_DEFAULT) + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim02) + Wait(20) + Call(GetNpcYaw, NPC_SELF, LVar0) + Add(LVar0, 180) + Call(InterpNpcYaw, NPC_SELF, LVar0, 0) + Wait(10) + Call(GetNpcYaw, NPC_SELF, LVar0) + Add(LVar0, 180) + Call(InterpNpcYaw, NPC_SELF, LVar0, 0) + Wait(25) + Call(GetNpcYaw, NPC_SELF, LVar0) + Add(LVar0, 180) + Call(InterpNpcYaw, NPC_SELF, LVar0, 0) + Wait(15) + Call(NpcFacePlayer, NPC_SELF, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldClubba_Anim05, ANIM_WorldClubba_Anim02, 0, MSG_CH3_00F2) + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim06) + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim07) + Return + End }; EvtScript N(EVS_NpcInit_LastClubba) = { - EVT_CALL(SetNpcCollisionSize, NPC_SELF, 36, 30) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim07) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_LastClubba))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_LastClubba))) - EVT_RETURN - EVT_END + Call(SetNpcCollisionSize, NPC_SELF, 36, 30) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim07) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_LastClubba))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_LastClubba))) + Return + End }; NpcData N(NpcData_LastClubba) = { @@ -420,15 +420,15 @@ NpcData N(NpcData_LastClubba) = { }; EvtScript N(EVS_NpcIdle_Clubba_Unused) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInit_Clubba_Unused) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Clubba_Unused))) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Clubba_Unused))) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Return + End }; NpcData N(NpcData_Clubba_Unused) = { diff --git a/src/world/area_dgb/dgb_08/dgb_08_4_entity.c b/src/world/area_dgb/dgb_08/dgb_08_4_entity.c index d8b9eea27de..0d60ea48096 100644 --- a/src/world/area_dgb/dgb_08/dgb_08_4_entity.c +++ b/src/world/area_dgb/dgb_08/dgb_08_4_entity.c @@ -1,6 +1,6 @@ #include "dgb_08.h" EvtScript N(EVS_MakeEntities) = { - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/area_dgb/dgb_09/dgb_09_1_music.c b/src/world/area_dgb/dgb_09/dgb_09_1_music.c index 5c9aaa86582..305571645eb 100644 --- a/src/world/area_dgb/dgb_09/dgb_09_1_music.c +++ b/src/world/area_dgb/dgb_09/dgb_09_1_music.c @@ -1,14 +1,14 @@ #include "dgb_09.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_WOKE_UP) + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_dgb/dgb_09/dgb_09_2_main.c b/src/world/area_dgb/dgb_09/dgb_09_2_main.c index 41168eeeca6..f7796c56af2 100644 --- a/src/world/area_dgb/dgb_09/dgb_09_2_main.c +++ b/src/world/area_dgb/dgb_09/dgb_09_2_main.c @@ -1,104 +1,104 @@ #include "dgb_09.h" EvtScript N(exitDoubleDoor_80243920) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, dgb_09_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittw) - EVT_SET(LVar2, MODEL_o30) - EVT_SET(LVar3, MODEL_o31) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_03"), dgb_03_ENTRY_4) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, dgb_09_ENTRY_0) + Set(LVar1, COLLIDER_deilittw) + Set(LVar2, MODEL_o30) + Set(LVar3, MODEL_o31) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_03"), dgb_03_ENTRY_4) + Wait(100) + Return + End }; EvtScript N(exitDoubleDoor_802439D4) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, dgb_09_ENTRY_1) - EVT_SET(LVar1, COLLIDER_deilitte) - EVT_SET(LVar2, MODEL_o102) - EVT_SET(LVar3, MODEL_o101) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_01"), dgb_01_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, dgb_09_ENTRY_1) + Set(LVar1, COLLIDER_deilitte) + Set(LVar2, MODEL_o102) + Set(LVar3, MODEL_o101) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_01"), dgb_01_ENTRY_3) + Wait(100) + Return + End }; EvtScript N(exitSingleDoor_80243A88) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, dgb_09_ENTRY_2) - EVT_SET(LVar1, COLLIDER_deilittnw) - EVT_SET(LVar2, MODEL_o76) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_12"), dgb_12_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, dgb_09_ENTRY_2) + Set(LVar1, COLLIDER_deilittnw) + Set(LVar2, MODEL_o76) + Set(LVar3, DOOR_SWING_OUT) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_12"), dgb_12_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(exitWalk_80243B3C) = EVT_EXIT_WALK(40, dgb_09_ENTRY_3, "dgb_10", dgb_10_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(exitWalk_80243B3C)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(exitWalk_80243B3C)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) + Return + End }; EvtScript N(enterWalk_80243BC4) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(dgb_09_ENTRY_0) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar2, MODEL_o30) - EVT_SET(LVar3, MODEL_o31) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(dgb_09_ENTRY_1) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar2, MODEL_o102) - EVT_SET(LVar3, MODEL_o101) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(dgb_09_ENTRY_2) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar2, MODEL_o76) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(dgb_09_ENTRY_3) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(dgb_09_ENTRY_0) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar2, MODEL_o30) + Set(LVar3, MODEL_o31) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(dgb_09_ENTRY_1) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar2, MODEL_o102) + Set(LVar3, MODEL_o101) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(dgb_09_ENTRY_2) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar2, MODEL_o76) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSingleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(dgb_09_ENTRY_3) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TUBBAS_MANOR) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_END_IF - EVT_EXEC(N(EVS_SetupBreakable)) - EVT_BIND_TRIGGER(EVT_PTR(N(exitDoubleDoor_80243920)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(exitDoubleDoor_802439D4)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitte, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(exitSingleDoor_80243A88)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(enterWalk_80243BC4)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TUBBAS_MANOR) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + IfLt(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + EndIf + Exec(N(EVS_SetupBreakable)) + BindTrigger(Ref(N(exitDoubleDoor_80243920)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0) + BindTrigger(Ref(N(exitDoubleDoor_802439D4)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitte, 1, 0) + BindTrigger(Ref(N(exitSingleDoor_80243A88)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0) + Exec(N(EVS_SetupMusic)) + Exec(N(enterWalk_80243BC4)) + Return + End }; diff --git a/src/world/area_dgb/dgb_09/dgb_09_3_breakable.c b/src/world/area_dgb/dgb_09/dgb_09_3_breakable.c index 6d313b90c68..fc4bbe9c30b 100644 --- a/src/world/area_dgb/dgb_09/dgb_09_3_breakable.c +++ b/src/world/area_dgb/dgb_09/dgb_09_3_breakable.c @@ -7,31 +7,31 @@ BombTrigger N(BombPos_Wall) = { }; EvtScript N(EVS_BlastWall) = { - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 1, 25, 3, 1, 10, 30) - EVT_LOOP(10) - EVT_CALL(EnableModel, MODEL_g29, FALSE) - EVT_CALL(EnableModel, MODEL_g28, TRUE) - EVT_WAIT(1) - EVT_CALL(EnableModel, MODEL_g29, TRUE) - EVT_CALL(EnableModel, MODEL_g28, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GF_DGB09_BombedWall, TRUE) - EVT_UNBIND - EVT_RETURN - EVT_END + Wait(2) + PlayEffect(EFFECT_BOMBETTE_BREAKING, 1, 25, 3, 1, 10, 30) + Loop(10) + Call(EnableModel, MODEL_g29, FALSE) + Call(EnableModel, MODEL_g28, TRUE) + Wait(1) + Call(EnableModel, MODEL_g29, TRUE) + Call(EnableModel, MODEL_g28, FALSE) + Wait(1) + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) + Set(GF_DGB09_BombedWall, TRUE) + Unbind + Return + End }; EvtScript N(EVS_SetupBreakable) = { - EVT_IF_EQ(GF_DGB09_BombedWall, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BlastWall)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Wall)), 1, 0) - EVT_CALL(EnableModel, MODEL_g29, FALSE) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_g28, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_DGB09_BombedWall, FALSE) + BindTrigger(Ref(N(EVS_BlastWall)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Wall)), 1, 0) + Call(EnableModel, MODEL_g29, FALSE) + Else + Call(EnableModel, MODEL_g28, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Return + End }; diff --git a/src/world/area_dgb/dgb_09/dgb_09_4_npc.c b/src/world/area_dgb/dgb_09/dgb_09_4_npc.c index 2fd2eac9caa..84faeeb565e 100644 --- a/src/world/area_dgb/dgb_09/dgb_09_4_npc.c +++ b/src/world/area_dgb/dgb_09/dgb_09_4_npc.c @@ -36,13 +36,13 @@ NpcData N(NpcData_Clubba_Wander)[] = { }; EvtScript N(EVS_NpcInit_Clubba_Napping) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, dgb_09_ENTRY_3) - EVT_CALL(SetNpcPos, NPC_SELF, 240, 0, 88) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, dgb_09_ENTRY_3) + Call(SetNpcPos, NPC_SELF, 240, 0, 88) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + EndIf + Return + End }; NpcData N(NpcData_Clubba_Napping)[] = { diff --git a/src/world/area_dgb/dgb_10/dgb_10_1_music.c b/src/world/area_dgb/dgb_10/dgb_10_1_music.c index ccb9d60b40f..3cc98ccf0f8 100644 --- a/src/world/area_dgb/dgb_10/dgb_10_1_music.c +++ b/src/world/area_dgb/dgb_10/dgb_10_1_music.c @@ -1,14 +1,14 @@ #include "dgb_10.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_WOKE_UP) + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_dgb/dgb_10/dgb_10_2_main.c b/src/world/area_dgb/dgb_10/dgb_10_2_main.c index 68a099ffd2f..3af757fff86 100644 --- a/src/world/area_dgb/dgb_10/dgb_10_2_main.c +++ b/src/world/area_dgb/dgb_10/dgb_10_2_main.c @@ -3,54 +3,54 @@ EvtScript N(EVS_ExitWalk_dgb_09_3) = EVT_EXIT_WALK(40, dgb_10_ENTRY_0, "dgb_09", dgb_09_ENTRY_3); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_dgb_09_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_dgb_09_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(dgb_10_ENTRY_0) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_CASE_EQ(dgb_10_ENTRY_1) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 375, 0, -188) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 375, 0, -188) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_JUMP) - EVT_WAIT(1) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7)) - EVT_CALL(PlayerJump, 375, 0, -188, 20) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(dgb_10_ENTRY_0) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + CaseEq(dgb_10_ENTRY_1) + Call(UseSettingsFrom, CAM_DEFAULT, 375, 0, -188) + Call(SetPanTarget, CAM_DEFAULT, 375, 0, -188) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_JUMP) + Wait(1) + Call(SetPlayerJumpscale, Float(0.7)) + Call(PlayerJump, 375, 0, -188, 20) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TUBBAS_MANOR) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupHoles)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilits, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_o117, FALSE) - EVT_CALL(EnableModel, MODEL_o116, FALSE) - EVT_CALL(EnableModel, MODEL_o113, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitt1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitt2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitt3, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TUBBAS_MANOR) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupHoles)) + Exec(N(EVS_SetupMusic)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilits, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_o117, FALSE) + Call(EnableModel, MODEL_o116, FALSE) + Call(EnableModel, MODEL_o113, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitt1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitt2, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitt3, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_dgb/dgb_10/dgb_10_3_hole.c b/src/world/area_dgb/dgb_10/dgb_10_3_hole.c index ae7ad919e4e..ab38d174c5e 100644 --- a/src/world/area_dgb/dgb_10/dgb_10_3_hole.c +++ b/src/world/area_dgb/dgb_10/dgb_10_3_hole.c @@ -31,16 +31,16 @@ API_CALLABLE(N(AwaitFallDownHole)) { } EvtScript N(EVS_SetupHoles) = { - EVT_CALL(N(AwaitFallInHole)) - EVT_CALL(func_802CA988, CAM_DEFAULT, LVar2, LVar3, LVar4, LVar5) - EVT_CALL(N(AwaitFallDownHole)) + Call(N(AwaitFallInHole)) + Call(func_802CA988, CAM_DEFAULT, LVar2, LVar3, LVar4, LVar5) + Call(N(AwaitFallDownHole)) #if VERSION_PAL - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(DisablePlayerPhysics, TRUE) #endif - EVT_CALL(InterruptUsePartner) - EVT_CALL(GotoMap, EVT_PTR("dgb_11"), LVar0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(InterruptUsePartner) + Call(GotoMap, Ref("dgb_11"), LVar0) + Wait(100) + Return + End }; diff --git a/src/world/area_dgb/dgb_10/dgb_10_4_entity.c b/src/world/area_dgb/dgb_10/dgb_10_4_entity.c index 7e723acfcdc..c42282bbb6f 100644 --- a/src/world/area_dgb/dgb_10/dgb_10_4_entity.c +++ b/src/world/area_dgb/dgb_10/dgb_10_4_entity.c @@ -2,36 +2,36 @@ #include "entity.h" EvtScript N(EVS_BreakFloor1) = { - EVT_SET(GF_DGB10_BoardedFloor1, TRUE) - EVT_RETURN - EVT_END + Set(GF_DGB10_BoardedFloor1, TRUE) + Return + End }; EvtScript N(EVS_BreakFloor2) = { - EVT_SET(GF_DGB10_BoardedFloor2, TRUE) - EVT_RETURN - EVT_END + Set(GF_DGB10_BoardedFloor2, TRUE) + Return + End }; EvtScript N(EVS_BreakFloor3) = { - EVT_SET(GF_DGB10_BoardedFloor3, TRUE) - EVT_RETURN - EVT_END + Set(GF_DGB10_BoardedFloor3, TRUE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_DGB10_BoardedFloor1, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BoardedFloor), 500, 0, -100, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_BreakFloor1))) - EVT_END_IF - EVT_IF_EQ(GF_DGB10_BoardedFloor2, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BoardedFloor), 500, 0, -250, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_BreakFloor2))) - EVT_END_IF - EVT_IF_EQ(GF_DGB10_BoardedFloor3, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BoardedFloor), 375, 0, -250, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_BreakFloor3))) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_DGB10_BoardedFloor1, FALSE) + Call(MakeEntity, Ref(Entity_BoardedFloor), 500, 0, -100, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_BreakFloor1))) + EndIf + IfEq(GF_DGB10_BoardedFloor2, FALSE) + Call(MakeEntity, Ref(Entity_BoardedFloor), 500, 0, -250, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_BreakFloor2))) + EndIf + IfEq(GF_DGB10_BoardedFloor3, FALSE) + Call(MakeEntity, Ref(Entity_BoardedFloor), 375, 0, -250, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_BreakFloor3))) + EndIf + Return + End }; diff --git a/src/world/area_dgb/dgb_11/dgb_11_1_music.c b/src/world/area_dgb/dgb_11/dgb_11_1_music.c index f14530909d8..a1937414cd4 100644 --- a/src/world/area_dgb/dgb_11/dgb_11_1_music.c +++ b/src/world/area_dgb/dgb_11/dgb_11_1_music.c @@ -1,14 +1,14 @@ #include "dgb_11.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_WOKE_UP) + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_dgb/dgb_11/dgb_11_2_main.c b/src/world/area_dgb/dgb_11/dgb_11_2_main.c index c26c5125aab..53e1549e814 100644 --- a/src/world/area_dgb/dgb_11/dgb_11_2_main.c +++ b/src/world/area_dgb/dgb_11/dgb_11_2_main.c @@ -1,70 +1,70 @@ #include "dgb_11.h" EvtScript N(EVS_ExitDoor_dgb_02_3) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, dgb_11_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilits) - EVT_SET(LVar2, MODEL_o109) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_02"), dgb_02_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, dgb_11_ENTRY_0) + Set(LVar1, COLLIDER_deilits) + Set(LVar2, MODEL_o109) + Set(LVar3, DOOR_SWING_IN) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_02"), dgb_02_ENTRY_3) + Wait(100) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(dgb_11_ENTRY_0) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar2, MODEL_o109) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_RETURN - EVT_CASE_EQ(dgb_11_ENTRY_1) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 500, 0, -100) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 500, 0, -100) - EVT_SET(LVar3, 1) - EVT_CASE_EQ(dgb_11_ENTRY_2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 500, 75, -250) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 500, 75, -250) - EVT_SET(LVar3, 75) - EVT_CASE_EQ(dgb_11_ENTRY_3) - EVT_CALL(SetZoneEnabled, ZONE_o203, FALSE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 375, 0, -175) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 375, 0, -175) - EVT_SET(AF_DGB_02, TRUE) - EVT_SET(LVar3, 1) - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterpPlayerYaw, 180, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LE(LVar1, LVar3) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(dgb_11_ENTRY_0) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar2, MODEL_o109) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + Return + CaseEq(dgb_11_ENTRY_1) + Call(UseSettingsFrom, CAM_DEFAULT, 500, 0, -100) + Call(SetPanTarget, CAM_DEFAULT, 500, 0, -100) + Set(LVar3, 1) + CaseEq(dgb_11_ENTRY_2) + Call(UseSettingsFrom, CAM_DEFAULT, 500, 75, -250) + Call(SetPanTarget, CAM_DEFAULT, 500, 75, -250) + Set(LVar3, 75) + CaseEq(dgb_11_ENTRY_3) + Call(SetZoneEnabled, ZONE_o203, FALSE) + Call(UseSettingsFrom, CAM_DEFAULT, 375, 0, -175) + Call(SetPanTarget, CAM_DEFAULT, 375, 0, -175) + Set(AF_DGB_02, TRUE) + Set(LVar3, 1) + EndSwitch + Call(DisablePlayerInput, TRUE) + Call(InterpPlayerYaw, 180, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLe(LVar1, LVar3) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TUBBAS_MANOR) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_dgb_02_3)), TRIGGER_WALL_PRESS_A, COLLIDER_deilits, 1, 0) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TUBBAS_MANOR) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + BindTrigger(Ref(N(EVS_ExitDoor_dgb_02_3)), TRIGGER_WALL_PRESS_A, COLLIDER_deilits, 1, 0) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_dgb/dgb_11/dgb_11_3_entity.c b/src/world/area_dgb/dgb_11/dgb_11_3_entity.c index 85852e7a44d..3ade956f050 100644 --- a/src/world/area_dgb/dgb_11/dgb_11_3_entity.c +++ b/src/world/area_dgb/dgb_11/dgb_11_3_entity.c @@ -18,105 +18,105 @@ API_CALLABLE(N(PlaySpringAnimation)) { } EvtScript N(EVS_TetherCamToPlayer) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GE(LVar1, LVar3) - EVT_SET(LVar1, LVar3) - EVT_END_IF - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGe(LVar1, LVar3) + Set(LVar1, LVar3) + EndIf + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_LaunchToCeiling) = { - EVT_CALL(PlayerJump, 375, 270, -250, 20) - EVT_RETURN - EVT_END + Call(PlayerJump, 375, 270, -250, 20) + Return + End }; EvtScript N(EVS_UseSpring) = { - EVT_IF_EQ(AF_DGB_03, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(AF_DGB_03, TRUE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetZoneEnabled, ZONE_o203, FALSE) - EVT_IF_EQ(AF_DGB_02, FALSE) - EVT_IF_EQ(GF_DGB10_BoardedFloor3, FALSE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_JUMP) - EVT_WAIT(1) - EVT_SET(LVar3, 500) - EVT_EXEC_GET_TID(N(EVS_TetherCamToPlayer), LVarA) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7)) - EVT_EXEC_GET_TID(N(EVS_LaunchToCeiling), LVarB) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GE(LVar1, 165) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerPos, LVar0, 165, LVar2) - EVT_KILL_THREAD(LVarB) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_JumpHitHead) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.0)) - EVT_CALL(PlayerJump1, 375, 25, -250, 10) - EVT_CALL(N(PlaySpringAnimation)) - EVT_CALL(PlaySoundAtPlayer, SOUND_SPRING, SOUND_SPACE_DEFAULT) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7)) - EVT_CALL(PlayerJump, 375, 0, -175, 15) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_WAIT(2) - EVT_CALL(SetZoneEnabled, ZONE_o203, TRUE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_SET(AF_DGB_03, FALSE) - EVT_ELSE - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_JUMP) - EVT_WAIT(1) - EVT_THREAD - EVT_WAIT(8) - EVT_CALL(GotoMap, EVT_PTR("dgb_10"), dgb_10_ENTRY_1) - EVT_WAIT(100) - EVT_END_THREAD - EVT_SET(LVar3, 500) - EVT_EXEC_GET_TID(N(EVS_TetherCamToPlayer), LVarA) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7)) - EVT_CALL(PlayerJump, 375, 270, -250, 20) - EVT_SET(AF_DGB_03, FALSE) - EVT_END_IF - EVT_ELSE - EVT_CALL(SetPlayerActionState, ACTION_STATE_JUMP) - EVT_WAIT(1) - EVT_SET(LVar3, 25) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7)) - EVT_CALL(PlayerJump, 375, 0, -175, 15) - EVT_SET(AF_DGB_02, FALSE) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_WAIT(2) - EVT_CALL(SetZoneEnabled, ZONE_o203, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_SET(AF_DGB_03, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(AF_DGB_03, TRUE) + Return + EndIf + Set(AF_DGB_03, TRUE) + Call(DisablePlayerInput, TRUE) + Call(SetZoneEnabled, ZONE_o203, FALSE) + IfEq(AF_DGB_02, FALSE) + IfEq(GF_DGB10_BoardedFloor3, FALSE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_JUMP) + Wait(1) + Set(LVar3, 500) + ExecGetTID(N(EVS_TetherCamToPlayer), LVarA) + Call(SetPlayerJumpscale, Float(0.7)) + ExecGetTID(N(EVS_LaunchToCeiling), LVarB) + Loop(0) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGe(LVar1, 165) + BreakLoop + EndIf + EndLoop + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerPos, LVar0, 165, LVar2) + KillThread(LVarB) + Call(SetPlayerAnimation, ANIM_MarioW2_JumpHitHead) + Call(ShakeCam, CAM_DEFAULT, 0, 20, Float(1.0)) + Wait(10) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetPlayerJumpscale, Float(0.0)) + Call(PlayerJump1, 375, 25, -250, 10) + Call(N(PlaySpringAnimation)) + Call(PlaySoundAtPlayer, SOUND_SPRING, SOUND_SPACE_DEFAULT) + Call(SetPlayerJumpscale, Float(0.7)) + Call(PlayerJump, 375, 0, -175, 15) + KillThread(LVarA) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Wait(2) + Call(SetZoneEnabled, ZONE_o203, TRUE) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Set(AF_DGB_03, FALSE) + Else + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_JUMP) + Wait(1) + Thread + Wait(8) + Call(GotoMap, Ref("dgb_10"), dgb_10_ENTRY_1) + Wait(100) + EndThread + Set(LVar3, 500) + ExecGetTID(N(EVS_TetherCamToPlayer), LVarA) + Call(SetPlayerJumpscale, Float(0.7)) + Call(PlayerJump, 375, 270, -250, 20) + Set(AF_DGB_03, FALSE) + EndIf + Else + Call(SetPlayerActionState, ACTION_STATE_JUMP) + Wait(1) + Set(LVar3, 25) + Call(SetPlayerJumpscale, Float(0.7)) + Call(PlayerJump, 375, 0, -175, 15) + Set(AF_DGB_02, FALSE) + KillThread(LVarA) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Wait(2) + Call(SetZoneEnabled, ZONE_o203, TRUE) + Call(DisablePlayerInput, FALSE) + Set(AF_DGB_03, FALSE) + EndIf + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_D_DOWN_JUMP, 250, 75, -100, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_DGB11_Item_DDownJump) - EVT_CALL(MakeEntity, EVT_PTR(Entity_ScriptSpring), 375, 0, -250, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_UseSpring))) - EVT_SET(MV_SpringEntityID, LVar0) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_D_DOWN_JUMP, 250, 75, -100, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_DGB11_Item_DDownJump) + Call(MakeEntity, Ref(Entity_ScriptSpring), 375, 0, -250, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_UseSpring))) + Set(MV_SpringEntityID, LVar0) + Return + End }; diff --git a/src/world/area_dgb/dgb_12/dgb_12_1_music.c b/src/world/area_dgb/dgb_12/dgb_12_1_music.c index f8beb336e96..30180801b76 100644 --- a/src/world/area_dgb/dgb_12/dgb_12_1_music.c +++ b/src/world/area_dgb/dgb_12/dgb_12_1_music.c @@ -1,14 +1,14 @@ #include "dgb_12.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_WOKE_UP) + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_dgb/dgb_12/dgb_12_2_main.c b/src/world/area_dgb/dgb_12/dgb_12_2_main.c index 2d33795dd79..f5187146c15 100644 --- a/src/world/area_dgb/dgb_12/dgb_12_2_main.c +++ b/src/world/area_dgb/dgb_12/dgb_12_2_main.c @@ -1,43 +1,43 @@ #include "dgb_12.h" EvtScript N(EVS_ExitDoor_dgb_09_2) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, dgb_12_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilits) - EVT_SET(LVar2, MODEL_o158) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_09"), dgb_09_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, dgb_12_ENTRY_0) + Set(LVar1, COLLIDER_deilits) + Set(LVar2, MODEL_o158) + Set(LVar3, DOOR_SWING_IN) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_09"), dgb_09_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(dgb_12_ENTRY_0) - EVT_SET(LVar2, MODEL_o158) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(dgb_12_ENTRY_0) + Set(LVar2, MODEL_o158) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TUBBAS_MANOR) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupSpikes)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_dgb_09_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilits, 1, 0) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TUBBAS_MANOR) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupSpikes)) + Exec(N(EVS_SetupMusic)) + BindTrigger(Ref(N(EVS_ExitDoor_dgb_09_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilits, 1, 0) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_dgb/dgb_12/dgb_12_3_spikes.c b/src/world/area_dgb/dgb_12/dgb_12_3_spikes.c index f7c99530267..e7e34e34e65 100644 --- a/src/world/area_dgb/dgb_12/dgb_12_3_spikes.c +++ b/src/world/area_dgb/dgb_12/dgb_12_3_spikes.c @@ -6,48 +6,48 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(EVS_SetupSpikes) = { - EVT_SET_GROUP(EVT_GROUP_EF) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o202, SURFACE_TYPE_SPIKES) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o215, SURFACE_TYPE_SPIKES) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o216, SURFACE_TYPE_SPIKES) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_WAIT(50) - EVT_CALL(TranslateModel, MODEL_o190, 0, 0, 0) - EVT_CALL(ParentColliderToModel, COLLIDER_o202, MODEL_o190) - EVT_LOOP(0) - EVT_THREAD - EVT_WAIT(2) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o215, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, -35, 15, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o190, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o202) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(60) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o215, SOUND_SPIKES_EXTEND, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o215, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_THREAD - EVT_CALL(MakeLerp, -35, 0, 4, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o190, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o202) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(35) - EVT_END_LOOP - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_EF) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o202, SURFACE_TYPE_SPIKES) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o215, SURFACE_TYPE_SPIKES) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o216, SURFACE_TYPE_SPIKES) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + Wait(50) + Call(TranslateModel, MODEL_o190, 0, 0, 0) + Call(ParentColliderToModel, COLLIDER_o202, MODEL_o190) + Loop(0) + Thread + Wait(2) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o215, COLLIDER_FLAGS_UPPER_MASK) + EndThread + Call(MakeLerp, 0, -35, 15, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o190, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o202) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(60) + Call(PlaySoundAtCollider, COLLIDER_o215, SOUND_SPIKES_EXTEND, SOUND_SPACE_DEFAULT) + Thread + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o215, COLLIDER_FLAGS_UPPER_MASK) + EndThread + Call(MakeLerp, -35, 0, 4, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o190, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o202) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(35) + EndLoop + Return + End }; diff --git a/src/world/area_dgb/dgb_12/dgb_12_4_entity.c b/src/world/area_dgb/dgb_12/dgb_12_4_entity.c index 253db1dfb66..bde177159c3 100644 --- a/src/world/area_dgb/dgb_12/dgb_12_4_entity.c +++ b/src/world/area_dgb/dgb_12/dgb_12_4_entity.c @@ -6,9 +6,9 @@ EvtScript N(EVS_Chest_Interact) = EVT_OPEN_CHEST_KEY(ITEM_TUBBA_CASTLE_KEY, GF_DGB12_Chest_CastleKey1); EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), -225, 0, -245, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_DGB12_Chest_CastleKey1) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_Chest_Interact))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Chest), -225, 0, -245, 0, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_DGB12_Chest_CastleKey1) + Call(AssignScript, Ref(N(EVS_Chest_Interact))) + Return + End }; diff --git a/src/world/area_dgb/dgb_13/dgb_13_1_music.c b/src/world/area_dgb/dgb_13/dgb_13_1_music.c index 3ff312293db..4ef9942c443 100644 --- a/src/world/area_dgb/dgb_13/dgb_13_1_music.c +++ b/src/world/area_dgb/dgb_13/dgb_13_1_music.c @@ -1,14 +1,14 @@ #include "dgb_13.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_WOKE_UP) + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_dgb/dgb_13/dgb_13_2_main.c b/src/world/area_dgb/dgb_13/dgb_13_2_main.c index ec01a9b5040..d5e8e0d4805 100644 --- a/src/world/area_dgb/dgb_13/dgb_13_2_main.c +++ b/src/world/area_dgb/dgb_13/dgb_13_2_main.c @@ -3,22 +3,22 @@ EvtScript N(EVS_ExitWalk_dgb_03_5) = EVT_EXIT_WALK(26, dgb_13_ENTRY_0, "dgb_03", dgb_03_ENTRY_5); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_dgb_03_5)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_dgb_03_5)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TUBBAS_MANOR) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilits, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC_WAIT(N(EVS_SetupDrawers)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TUBBAS_MANOR) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilits, COLLIDER_FLAGS_UPPER_MASK) + ExecWait(N(EVS_SetupDrawers)) + Exec(N(EVS_SetupMusic)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; diff --git a/src/world/area_dgb/dgb_13/dgb_13_3_entity.c b/src/world/area_dgb/dgb_13/dgb_13_3_entity.c index cb7629b5dad..3a645dcacbd 100644 --- a/src/world/area_dgb/dgb_13/dgb_13_3_entity.c +++ b/src/world/area_dgb/dgb_13/dgb_13_3_entity.c @@ -1,13 +1,13 @@ #include "dgb_13.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_MEGA_RUSH, -910, 50, -206, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_DGB13_Item_MegaRush) - EVT_CALL(MakeItemEntity, ITEM_COIN, -530, 55, -190, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_DGB13_Item_CoinA) - EVT_CALL(MakeItemEntity, ITEM_COIN, -510, 55, -175, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_DGB13_Item_CoinB) - EVT_CALL(MakeItemEntity, ITEM_COIN, -510, 55, -205, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_DGB13_Item_CoinC) - EVT_CALL(MakeItemEntity, ITEM_COIN, -490, 55, -160, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_DGB13_Item_CoinD) - EVT_CALL(MakeItemEntity, ITEM_COIN, -490, 55, -190, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_DGB13_Item_CoinE) - EVT_CALL(MakeItemEntity, ITEM_COIN, -490, 55, -220, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_DGB13_Item_CoinF) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_MEGA_RUSH, -910, 50, -206, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_DGB13_Item_MegaRush) + Call(MakeItemEntity, ITEM_COIN, -530, 55, -190, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_DGB13_Item_CoinA) + Call(MakeItemEntity, ITEM_COIN, -510, 55, -175, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_DGB13_Item_CoinB) + Call(MakeItemEntity, ITEM_COIN, -510, 55, -205, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_DGB13_Item_CoinC) + Call(MakeItemEntity, ITEM_COIN, -490, 55, -160, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_DGB13_Item_CoinD) + Call(MakeItemEntity, ITEM_COIN, -490, 55, -190, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_DGB13_Item_CoinE) + Call(MakeItemEntity, ITEM_COIN, -490, 55, -220, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_DGB13_Item_CoinF) + Return + End }; diff --git a/src/world/area_dgb/dgb_13/dgb_13_4_drawer.c b/src/world/area_dgb/dgb_13/dgb_13_4_drawer.c index 625bd8012ef..400f6ecaee2 100644 --- a/src/world/area_dgb/dgb_13/dgb_13_4_drawer.c +++ b/src/world/area_dgb/dgb_13/dgb_13_4_drawer.c @@ -1,81 +1,81 @@ #include "dgb_13.h" EvtScript N(EVS_OpenLowerDrawer) = { - EVT_CALL(MakeLerp, 0, 30, 15, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_b1, 0, 0, LVar0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o265) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(MakeLerp, 0, 30, 15, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_b1, 0, 0, LVar0) + Call(UpdateColliderTransform, COLLIDER_o265) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_CloseLowerDrawer) = { - EVT_CALL(MakeLerp, 30, 0, 15, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_b1, 0, 0, LVar0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o265) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(MakeLerp, 30, 0, 15, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_b1, 0, 0, LVar0) + Call(UpdateColliderTransform, COLLIDER_o265) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_OpenUpperDrawer) = { - EVT_CALL(MakeLerp, 0, 30, 15, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_b3, 0, 0, LVar0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o267) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(MakeLerp, 0, 30, 15, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_b3, 0, 0, LVar0) + Call(UpdateColliderTransform, COLLIDER_o267) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_CloseUpperDrawer) = { - EVT_CALL(MakeLerp, 30, 0, 15, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_b3, 0, 0, LVar0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o267) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(MakeLerp, 30, 0, 15, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_b3, 0, 0, LVar0) + Call(UpdateColliderTransform, COLLIDER_o267) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_Interact_LowerDrawer) = { - EVT_IF_EQ(MV_LowerDrawerOpen, FALSE) - EVT_EXEC_WAIT(N(EVS_OpenLowerDrawer)) - EVT_SET(MV_LowerDrawerOpen, TRUE) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_CloseLowerDrawer)) - EVT_SET(MV_LowerDrawerOpen, FALSE) - EVT_END_IF - EVT_UNBIND - EVT_RETURN - EVT_END + IfEq(MV_LowerDrawerOpen, FALSE) + ExecWait(N(EVS_OpenLowerDrawer)) + Set(MV_LowerDrawerOpen, TRUE) + Else + ExecWait(N(EVS_CloseLowerDrawer)) + Set(MV_LowerDrawerOpen, FALSE) + EndIf + Unbind + Return + End }; EvtScript N(EVS_SetupDrawers) = { - EVT_CALL(ParentColliderToModel, COLLIDER_o265, MODEL_o419) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Interact_LowerDrawer)), TRIGGER_WALL_PRESS_A, COLLIDER_o265, 1, 0) - EVT_RETURN - EVT_END + Call(ParentColliderToModel, COLLIDER_o265, MODEL_o419) + BindTrigger(Ref(N(EVS_Interact_LowerDrawer)), TRIGGER_WALL_PRESS_A, COLLIDER_o265, 1, 0) + Return + End }; diff --git a/src/world/area_dgb/dgb_14/dgb_14_1_music.c b/src/world/area_dgb/dgb_14/dgb_14_1_music.c index 8a3f5291f96..402fc27c06b 100644 --- a/src/world/area_dgb/dgb_14/dgb_14_1_music.c +++ b/src/world/area_dgb/dgb_14/dgb_14_1_music.c @@ -1,14 +1,14 @@ #include "dgb_14.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_WOKE_UP) + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_dgb/dgb_14/dgb_14_2_main.c b/src/world/area_dgb/dgb_14/dgb_14_2_main.c index 52fc1d53518..3c6359551e4 100644 --- a/src/world/area_dgb/dgb_14/dgb_14_2_main.c +++ b/src/world/area_dgb/dgb_14/dgb_14_2_main.c @@ -2,71 +2,71 @@ #include "sprite/player.h" EvtScript N(EVS_ExitDoors_dgb_03_3) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, dgb_14_ENTRY_1) - EVT_SET(LVar1, COLLIDER_deilittse) - EVT_SET(LVar2, MODEL_o102) - EVT_SET(LVar3, MODEL_o101) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_03"), dgb_03_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, dgb_14_ENTRY_1) + Set(LVar1, COLLIDER_deilittse) + Set(LVar2, MODEL_o102) + Set(LVar3, MODEL_o101) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_03"), dgb_03_ENTRY_3) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_dgb_15_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, dgb_14_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittne) - EVT_SET(LVar2, MODEL_o31) - EVT_SET(LVar3, MODEL_o30) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_15"), dgb_15_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, dgb_14_ENTRY_0) + Set(LVar1, COLLIDER_deilittne) + Set(LVar2, MODEL_o31) + Set(LVar3, MODEL_o30) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_15"), dgb_15_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(dgb_14_ENTRY_0) - EVT_SET(LVar2, MODEL_o102) - EVT_SET(LVar3, MODEL_o101) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(dgb_14_ENTRY_1) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar2, MODEL_o31) - EVT_SET(LVar3, MODEL_o30) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_IF_EQ(AF_DGB_01, TRUE) - EVT_WAIT(5) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(dgb_14_ENTRY_0) + Set(LVar2, MODEL_o102) + Set(LVar3, MODEL_o101) + ExecWait(EnterDoubleDoor) + CaseEq(dgb_14_ENTRY_1) + Call(DisablePlayerInput, TRUE) + Set(LVar2, MODEL_o31) + Set(LVar3, MODEL_o30) + ExecWait(EnterDoubleDoor) + IfEq(AF_DGB_01, TRUE) + Wait(5) + Call(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) + Wait(20) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndIf + Call(DisablePlayerInput, FALSE) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TUBBAS_MANOR) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_03_3)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_15_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TUBBAS_MANOR) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + BindTrigger(Ref(N(EVS_ExitDoors_dgb_03_3)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_dgb_15_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_dgb/dgb_14/dgb_14_3_entity.c b/src/world/area_dgb/dgb_14/dgb_14_3_entity.c index 2d32fddcb31..099fffb74b1 100644 --- a/src/world/area_dgb/dgb_14/dgb_14_3_entity.c +++ b/src/world/area_dgb/dgb_14/dgb_14_3_entity.c @@ -2,8 +2,8 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 500, 60, 75, 0, ITEM_MAPLE_SYRUP, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_DGB14_ItemBlock_MapleSyrup) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_YellowBlock), 500, 60, 75, 0, ITEM_MAPLE_SYRUP, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_DGB14_ItemBlock_MapleSyrup) + Return + End }; diff --git a/src/world/area_dgb/dgb_15/dgb_15_1_music.c b/src/world/area_dgb/dgb_15/dgb_15_1_music.c index f60884b5878..be2b0d8162d 100644 --- a/src/world/area_dgb/dgb_15/dgb_15_1_music.c +++ b/src/world/area_dgb/dgb_15/dgb_15_1_music.c @@ -1,18 +1,18 @@ #include "dgb_15.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP) - EVT_IF_EQ(GB_ARN_Tubba_MapID, 15) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_WOKE_UP) + IfEq(GB_ARN_Tubba_MapID, 15) + Call(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8) + Else + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + EndIf + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_dgb/dgb_15/dgb_15_2_main.c b/src/world/area_dgb/dgb_15/dgb_15_2_main.c index 644e4d37599..0431a57cc64 100644 --- a/src/world/area_dgb/dgb_15/dgb_15_2_main.c +++ b/src/world/area_dgb/dgb_15/dgb_15_2_main.c @@ -6,102 +6,102 @@ s32 N(KeyList)[] = { }; EvtScript N(EVS_ExitDoors_dgb_14_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, dgb_15_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittw) - EVT_SET(LVar2, MODEL_o135) - EVT_SET(LVar3, MODEL_o136) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_14"), dgb_14_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, dgb_15_ENTRY_0) + Set(LVar1, COLLIDER_deilittw) + Set(LVar2, MODEL_o135) + Set(LVar3, MODEL_o136) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_14"), dgb_14_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_dgb_17_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, dgb_15_ENTRY_1) - EVT_SET(LVar1, COLLIDER_deilitte) - EVT_SET(LVar2, MODEL_o102) - EVT_SET(LVar3, MODEL_o101) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_17"), dgb_17_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, dgb_15_ENTRY_1) + Set(LVar1, COLLIDER_deilitte) + Set(LVar2, MODEL_o102) + Set(LVar3, MODEL_o101) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_17"), dgb_17_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_dgb_16_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, dgb_15_ENTRY_2) - EVT_SET(LVar1, COLLIDER_deilittne) - EVT_SET(LVar2, MODEL_o123) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_16"), dgb_16_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, dgb_15_ENTRY_2) + Set(LVar1, COLLIDER_deilittne) + Set(LVar2, MODEL_o123) + Set(LVar3, DOOR_SWING_OUT) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_16"), dgb_16_ENTRY_0) + Wait(100) + Return + End }; MAP_RODATA_PAD(1, strings); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_14_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_16_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) - EVT_IF_EQ(GF_DGB15_UnlockedUpperFoyer, FALSE) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_UnlockPrompt_Door)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(KeyList)), 0, 1) - EVT_ELSE - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_17_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitte, 1, 0) - EVT_END_IF - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_dgb_14_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_dgb_16_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) + IfEq(GF_DGB15_UnlockedUpperFoyer, FALSE) + BindPadlock(Ref(N(EVS_UnlockPrompt_Door)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), Ref(N(KeyList)), 0, 1) + Else + BindTrigger(Ref(N(EVS_ExitDoors_dgb_17_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitte, 1, 0) + EndIf + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(dgb_15_ENTRY_0) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar2, MODEL_o135) - EVT_SET(LVar3, MODEL_o136) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(dgb_15_ENTRY_1) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar2, MODEL_o102) - EVT_SET(LVar3, MODEL_o101) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(dgb_15_ENTRY_2) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar2, MODEL_o123) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_END_SWITCH - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(dgb_15_ENTRY_0) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar2, MODEL_o135) + Set(LVar3, MODEL_o136) + ExecWait(EnterDoubleDoor) + CaseEq(dgb_15_ENTRY_1) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar2, MODEL_o102) + Set(LVar3, MODEL_o101) + ExecWait(EnterDoubleDoor) + CaseEq(dgb_15_ENTRY_2) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar2, MODEL_o123) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSingleDoor) + EndSwitch + Exec(N(EVS_BindExitTriggers)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TUBBAS_MANOR) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SET(AF_DGB_01, FALSE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_IF_EQ(GF_DGB16_EscapedFromTubba, FALSE) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TUBBAS_MANOR) + Call(SetSpriteShading, SHADING_NONE) + Set(AF_DGB_01, FALSE) + SetUP_CAMERA_NO_LEAD() + IfEq(GF_DGB16_EscapedFromTubba, FALSE) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + EndIf + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_dgb/dgb_15/dgb_15_3_npc.c b/src/world/area_dgb/dgb_15/dgb_15_3_npc.c index 27d61848932..c89ed07e592 100644 --- a/src/world/area_dgb/dgb_15/dgb_15_3_npc.c +++ b/src/world/area_dgb/dgb_15/dgb_15_3_npc.c @@ -14,98 +14,98 @@ NpcSettings N(NpcSettings_Yakkey) = { extern EvtScript N(EVS_NpcAI_Tubba); EvtScript N(EVS_WaitForCloseCall) = { - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Tubba, LVar1, LVar2, LVar3) - EVT_SUB(LVar1, LVar0) - EVT_IF_LT(LVar1, 150) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(GF_DGB15_CloseCallWithTubba, TRUE) - EVT_SET(AF_DGB_01, TRUE) - EVT_RETURN - EVT_END + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Tubba, LVar1, LVar2, LVar3) + Sub(LVar1, LVar0) + IfLt(LVar1, 150) + BreakLoop + EndIf + Wait(1) + EndLoop + Set(GF_DGB15_CloseCallWithTubba, TRUE) + Set(AF_DGB_01, TRUE) + Return + End }; EvtScript N(EVS_NpcIdle_Tubba) = { - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GE(LVar0, -1150) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8) - EVT_WAIT(15) - EVT_THREAD - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -50, 0, 180) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -50, 0, 180) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_SET(GB_ARN_Tubba_MapID, 15) - EVT_CALL(SetNpcPos, NPC_SELF, 0, 0, 88) - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim09) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_CALL(NpcMoveTo, NPC_SELF, -53, 180, 60) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim06) - EVT_WAIT(15) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldTubba_Anim10, ANIM_WorldTubba_Anim06, 0, MSG_CH3_00F3) - EVT_WAIT(15) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_THREAD - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Tubba))) - EVT_RETURN - EVT_END + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGe(LVar0, -1150) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(DisablePlayerInput, TRUE) + Call(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8) + Wait(15) + Thread + Call(UseSettingsFrom, CAM_DEFAULT, -50, 0, 180) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(SetPanTarget, CAM_DEFAULT, -50, 0, 180) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Set(GB_ARN_Tubba_MapID, 15) + Call(SetNpcPos, NPC_SELF, 0, 0, 88) + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim09) + Call(SetNpcYaw, NPC_SELF, 270) + Call(NpcMoveTo, NPC_SELF, -53, 180, 60) + Call(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim06) + Wait(15) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldTubba_Anim10, ANIM_WorldTubba_Anim06, 0, MSG_CH3_00F3) + Wait(15) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + EndThread + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_Tubba))) + Return + End }; EvtScript N(EVS_PlayFootstepFX) = { - EVT_CALL(GetNpcPos, NPC_SELF, LVar6, LVar7, LVar8) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_IF_NE(LVar3, LVar6) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_HEAVY_NPC_STEP_C, SOUND_PARAM_MUTE | SOUND_SPACE_FULL) - EVT_CALL(GetDist2D, LVarA, LVar0, LVar2, LVar3, LVar5) - EVT_SWITCH(LVarA) - EVT_CASE_LT(200) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.6)) - EVT_WAIT(5) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 2, EVT_FLOAT(0.8)) - EVT_END_THREAD - EVT_CASE_LT(300) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.6)) - EVT_WAIT(5) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 2, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_CASE_GE(300) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.1)) - EVT_WAIT(5) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 2, EVT_FLOAT(0.05)) - EVT_END_THREAD - EVT_END_SWITCH - EVT_WAIT(12) - EVT_ELSE - EVT_END_IF - EVT_CALL(GetNpcPos, NPC_SELF, LVar6, LVar7, LVar8) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_SELF, LVar6, LVar7, LVar8) + Loop(0) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + IfNe(LVar3, LVar6) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_HEAVY_NPC_STEP_C, SOUND_PARAM_MUTE | SOUND_SPACE_FULL) + Call(GetDist2D, LVarA, LVar0, LVar2, LVar3, LVar5) + Switch(LVarA) + CaseLt(200) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.6)) + Wait(5) + Call(ShakeCam, CAM_DEFAULT, 0, 2, Float(0.8)) + EndThread + CaseLt(300) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(0.6)) + Wait(5) + Call(ShakeCam, CAM_DEFAULT, 0, 2, Float(0.3)) + EndThread + CaseGe(300) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(0.1)) + Wait(5) + Call(ShakeCam, CAM_DEFAULT, 0, 2, Float(0.05)) + EndThread + EndSwitch + Wait(12) + Else + EndIf + Call(GetNpcPos, NPC_SELF, LVar6, LVar7, LVar8) + EndLoop + Return + End }; MobileAISettings N(AISettings_Tubba) = { @@ -126,40 +126,40 @@ MobileAISettings N(AISettings_Tubba) = { #include "world/common/enemy/ai/PatrolNoAttackAI.inc.c" EvtScript N(EVS_NpcAI_Tubba) = { - EVT_EXEC(N(EVS_WaitForCloseCall)) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim0C) - EVT_EXEC(N(EVS_PlayFootstepFX)) - EVT_CALL(N(PatrolNoAttackAI_Main), EVT_PTR(N(AISettings_Tubba))) - EVT_RETURN - EVT_END + Exec(N(EVS_WaitForCloseCall)) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim0C) + Exec(N(EVS_PlayFootstepFX)) + Call(N(PatrolNoAttackAI_Main), Ref(N(AISettings_Tubba))) + Return + End }; #include "world/common/todo/UnkFunc1.inc.c" EvtScript N(EVS_NpcDefeat_Tubba) = { - EVT_CALL(N(UnkFunc1)) - EVT_CALL(GotoMap, EVT_PTR("dgb_14"), dgb_14_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(N(UnkFunc1)) + Call(GotoMap, Ref("dgb_14"), dgb_14_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_NpcInit_Tubba) = { - EVT_IF_NE(GB_StoryProgress, STORY_CH3_ARRIVED_AT_TUBBAS_MANOR) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(1.25), EVT_FLOAT(1.25), EVT_FLOAT(1.25)) - EVT_IF_NE(GB_ARN_Tubba_MapID, 15) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Tubba))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, -310, 0, 180) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Tubba))) - EVT_END_IF - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Tubba))) - EVT_RETURN - EVT_END + IfNe(GB_StoryProgress, STORY_CH3_ARRIVED_AT_TUBBAS_MANOR) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + Call(SetNpcScale, NPC_SELF, Float(1.25), Float(1.25), Float(1.25)) + IfNe(GB_ARN_Tubba_MapID, 15) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Tubba))) + Else + Call(SetNpcPos, NPC_SELF, -310, 0, 180) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcAI_Tubba))) + EndIf + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Tubba))) + Return + End }; NpcData N(NpcData_Tubba) = { diff --git a/src/world/area_dgb/dgb_15/dgb_15_4_entity.c b/src/world/area_dgb/dgb_15/dgb_15_4_entity.c index 9f17c052b98..a1e2c487c4d 100644 --- a/src/world/area_dgb/dgb_15/dgb_15_4_entity.c +++ b/src/world/area_dgb/dgb_15/dgb_15_4_entity.c @@ -5,46 +5,46 @@ #include "world/common/todo/RemovePadlock.inc.c" EvtScript N(EVS_UnlockPrompt_Door) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SUSPEND_GROUP(EVT_GROUP_01) - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_CALL(CloseChoicePopup) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_RETURN - EVT_END_IF - EVT_CALL(FindKeyItem, ITEM_TUBBA_CASTLE_KEY, LVar0) - EVT_CALL(RemoveKeyItemAt, LVar0) - EVT_CALL(CloseChoicePopup) - EVT_SET(GF_DGB15_UnlockedUpperFoyer, TRUE) - EVT_CALL(N(GetEntityPosition), MV_PadlockEntityID, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_SET(LVar0, MV_PadlockEntityID) - EVT_CALL(N(RemovePadlock)) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_UNBIND - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + SuspendGroup(EVT_GROUP_01) + Call(ShowKeyChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) + Call(CloseChoicePopup) + ResumeGroup(EVT_GROUP_01) + Return + EndIf + IfEq(LVar0, -1) + Call(CloseChoicePopup) + ResumeGroup(EVT_GROUP_01) + Return + EndIf + Call(FindKeyItem, ITEM_TUBBA_CASTLE_KEY, LVar0) + Call(RemoveKeyItemAt, LVar0) + Call(CloseChoicePopup) + Set(GF_DGB15_UnlockedUpperFoyer, TRUE) + Call(N(GetEntityPosition), MV_PadlockEntityID, LVar0, LVar1, LVar2) + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Set(LVar0, MV_PadlockEntityID) + Call(N(RemovePadlock)) + ResumeGroup(EVT_GROUP_01) + Unbind + Return + End }; EvtScript N(EVS_OpenLockedDoor) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_17_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitte, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_dgb_17_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitte, 1, 0) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_DGB15_UnlockedUpperFoyer, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), 130, 8, 175, -80, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenLockedDoor))) - EVT_SET(MV_PadlockEntityID, LVar0) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_DGB15_UnlockedUpperFoyer, FALSE) + Call(MakeEntity, Ref(Entity_Padlock), 130, 8, 175, -80, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OpenLockedDoor))) + Set(MV_PadlockEntityID, LVar0) + EndIf + Return + End }; diff --git a/src/world/area_dgb/dgb_16/dgb_16_1_music.c b/src/world/area_dgb/dgb_16/dgb_16_1_music.c index a6e4b46cadb..11a5ef59bb4 100644 --- a/src/world/area_dgb/dgb_16/dgb_16_1_music.c +++ b/src/world/area_dgb/dgb_16/dgb_16_1_music.c @@ -1,14 +1,14 @@ #include "dgb_16.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_WOKE_UP) + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_dgb/dgb_16/dgb_16_2_main.c b/src/world/area_dgb/dgb_16/dgb_16_2_main.c index ca88c91af6b..1e89a7a2c48 100644 --- a/src/world/area_dgb/dgb_16/dgb_16_2_main.c +++ b/src/world/area_dgb/dgb_16/dgb_16_2_main.c @@ -1,51 +1,51 @@ #include "dgb_16.h" EvtScript N(EVS_ExitDoors_dgb_15_2) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, dgb_16_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittne) - EVT_SET(LVar2, MODEL_o123) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_15"), dgb_15_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, dgb_16_ENTRY_0) + Set(LVar1, COLLIDER_deilittne) + Set(LVar2, MODEL_o123) + Set(LVar3, DOOR_SWING_IN) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_15"), dgb_15_ENTRY_2) + Wait(100) + Return + End }; MAP_RODATA_PAD(1, strings); EvtScript N(EVS_EnterMap) = { - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(dgb_16_ENTRY_0) - EVT_IF_EQ(GF_DGB16_EscapedFromTubba, FALSE) - EVT_SET(GF_DGB16_EscapedFromTubba, TRUE) - EVT_SET(GB_ARN_Tubba_MapID, 18) - EVT_END_IF - EVT_SET(LVar2, MODEL_o123) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(dgb_16_ENTRY_0) + IfEq(GF_DGB16_EscapedFromTubba, FALSE) + Set(GF_DGB16_EscapedFromTubba, TRUE) + Set(GB_ARN_Tubba_MapID, 18) + EndIf + Set(LVar2, MODEL_o123) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TUBBAS_MANOR) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_15_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TUBBAS_MANOR) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + IfLt(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + EndIf + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + BindTrigger(Ref(N(EVS_ExitDoors_dgb_15_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_dgb/dgb_16/dgb_16_3_entity.c b/src/world/area_dgb/dgb_16/dgb_16_3_entity.c index 45b219a0cf6..153c324779d 100644 --- a/src/world/area_dgb/dgb_16/dgb_16_3_entity.c +++ b/src/world/area_dgb/dgb_16/dgb_16_3_entity.c @@ -3,7 +3,7 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_TUBBA_CASTLE_KEY, -235, 25, -165, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_DGB16_Item_CastleKey1) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_TUBBA_CASTLE_KEY, -235, 25, -165, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_DGB16_Item_CastleKey1) + Return + End }; diff --git a/src/world/area_dgb/dgb_17/dgb_17_1_music.c b/src/world/area_dgb/dgb_17/dgb_17_1_music.c index 9c2fc4b1588..694eb205bc1 100644 --- a/src/world/area_dgb/dgb_17/dgb_17_1_music.c +++ b/src/world/area_dgb/dgb_17/dgb_17_1_music.c @@ -1,14 +1,14 @@ #include "dgb_17.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_WOKE_UP) + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_dgb/dgb_17/dgb_17_2_main.c b/src/world/area_dgb/dgb_17/dgb_17_2_main.c index 0c3a3f45aed..a6202663036 100644 --- a/src/world/area_dgb/dgb_17/dgb_17_2_main.c +++ b/src/world/area_dgb/dgb_17/dgb_17_2_main.c @@ -1,75 +1,75 @@ #include "dgb_17.h" EvtScript N(EVS_ExitDoors_dgb_15_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, dgb_17_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittw) - EVT_SET(LVar2, MODEL_o142) - EVT_SET(LVar3, MODEL_o143) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_15"), dgb_15_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, dgb_17_ENTRY_0) + Set(LVar1, COLLIDER_deilittw) + Set(LVar2, MODEL_o142) + Set(LVar3, MODEL_o143) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_15"), dgb_15_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_dgb_01_5) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, dgb_17_ENTRY_1) - EVT_SET(LVar1, COLLIDER_deilitte) - EVT_SET(LVar2, MODEL_o199) - EVT_SET(LVar3, MODEL_o198) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_01"), dgb_01_ENTRY_5) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, dgb_17_ENTRY_1) + Set(LVar1, COLLIDER_deilitte) + Set(LVar2, MODEL_o199) + Set(LVar3, MODEL_o198) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_01"), dgb_01_ENTRY_5) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_15_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_01_5)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitte, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_dgb_15_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_dgb_01_5)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitte, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(dgb_17_ENTRY_0) - EVT_SET(LVar2, MODEL_o142) - EVT_SET(LVar3, MODEL_o143) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(dgb_17_ENTRY_1) - EVT_SET(LVar2, MODEL_o199) - EVT_SET(LVar3, MODEL_o198) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_END_SWITCH - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(dgb_17_ENTRY_0) + Set(LVar2, MODEL_o142) + Set(LVar3, MODEL_o143) + ExecWait(EnterDoubleDoor) + CaseEq(dgb_17_ENTRY_1) + Set(LVar2, MODEL_o199) + Set(LVar3, MODEL_o198) + ExecWait(EnterDoubleDoor) + EndSwitch + Exec(N(EVS_BindExitTriggers)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TUBBAS_MANOR) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TUBBAS_MANOR) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_dgb/dgb_17/dgb_17_3_entity.c b/src/world/area_dgb/dgb_17/dgb_17_3_entity.c index cd94c13bcc2..683bc0c14f0 100644 --- a/src/world/area_dgb/dgb_17/dgb_17_3_entity.c +++ b/src/world/area_dgb/dgb_17/dgb_17_3_entity.c @@ -2,8 +2,8 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), -300, 60, 75, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), -450, 60, 75, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_SavePoint), -300, 60, 75, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HeartBlock), -450, 60, 75, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_dgb/dgb_18/dgb_18_1_music.c b/src/world/area_dgb/dgb_18/dgb_18_1_music.c index 3f0bf79ebec..a65c7c2d847 100644 --- a/src/world/area_dgb/dgb_18/dgb_18_1_music.c +++ b/src/world/area_dgb/dgb_18/dgb_18_1_music.c @@ -1,14 +1,14 @@ #include "dgb_18.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_WOKE_UP) + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_dgb/dgb_18/dgb_18_2_main.c b/src/world/area_dgb/dgb_18/dgb_18_2_main.c index 408a3bcf23f..252cb03ccc0 100644 --- a/src/world/area_dgb/dgb_18/dgb_18_2_main.c +++ b/src/world/area_dgb/dgb_18/dgb_18_2_main.c @@ -1,45 +1,45 @@ #include "dgb_18.h" EvtScript N(EVS_ExitDoors_dgb_01_6) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, dgb_18_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittw) - EVT_SET(LVar2, MODEL_o140) - EVT_SET(LVar3, MODEL_o141) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("dgb_01"), dgb_01_ENTRY_6) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, dgb_18_ENTRY_0) + Set(LVar1, COLLIDER_deilittw) + Set(LVar2, MODEL_o140) + Set(LVar3, MODEL_o141) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("dgb_01"), dgb_01_ENTRY_6) + Wait(100) + Return + End }; MAP_RODATA_PAD(1, strings); EvtScript N(EVS_EnterMap) = { - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(dgb_18_ENTRY_0) - EVT_SET(LVar2, MODEL_o140) - EVT_SET(LVar3, MODEL_o141) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(dgb_18_ENTRY_0) + Set(LVar2, MODEL_o140) + Set(LVar3, MODEL_o141) + ExecWait(EnterDoubleDoor) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TUBBAS_MANOR) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_01_6)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TUBBAS_MANOR) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + BindTrigger(Ref(N(EVS_ExitDoors_dgb_01_6)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_dgb/dgb_18/dgb_18_3_npc.c b/src/world/area_dgb/dgb_18/dgb_18_3_npc.c index 1bdd481fbc2..8b5fbab268f 100644 --- a/src/world/area_dgb/dgb_18/dgb_18_3_npc.c +++ b/src/world/area_dgb/dgb_18/dgb_18_3_npc.c @@ -44,447 +44,447 @@ NpcSettings N(NpcSettings_Yakkey) = { }; EvtScript N(EVS_Scene_TubbaFallsAsleep) = { - EVT_LABEL(10) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_IF_LT(LVar0, 700) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_GT(LVar2, 185) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(10) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_END_THREAD - EVT_CALL(FadeOutMusic, 0, 500) - EVT_LOOP(3) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_JoltAwake) - EVT_CALL(PlaySoundAt, SOUND_HEAVY_NPC_STEP_C, SOUND_SPACE_DEFAULT, 382, 0, 218) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(10) - EVT_END_LOOP - EVT_LOOP(2) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_WAIT(10) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_WAIT(10) - EVT_END_LOOP - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -40, 0, 180) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -40, 0, 180) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetPlayerPos, 740, 0, 180) - EVT_CALL(SetNpcPos, NPC_PARTNER, 765, 0, 180) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_LookClosely) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittw, SOUND_CREAKY_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 80, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o140, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o141, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_THREAD - EVT_LOOP(3) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_HEAVY_NPC_STEP_C, SOUND_SPACE_DEFAULT) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.3)) - EVT_WAIT(5) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim09) - EVT_CALL(SetNpcPos, NPC_SELF, -210, 0, 180) - EVT_CALL(NpcMoveTo, NPC_SELF, -60, 180, 30) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim06) - EVT_THREAD - EVT_CALL(MakeLerp, 80, 0, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o140, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o141, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittw, SOUND_CREAKY_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldTubba_Anim10, ANIM_WorldTubba_Anim06, 5, MSG_CH3_00F4) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim09) - EVT_CALL(SetSelfVar, 0, 0) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_HEAVY_NPC_STEP_C, SOUND_SPACE_DEFAULT) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.3)) - EVT_WAIT(9) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_HEAVY_NPC_STEP_C, SOUND_SPACE_DEFAULT) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 2, EVT_FLOAT(0.15)) - EVT_WAIT(12) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(4.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, 45, 215, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, 140, 245, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, 615, 245, 0) - EVT_CALL(SetSelfVar, 0, 1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim06) - EVT_WAIT(15) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldTubba_Anim10, ANIM_WorldTubba_Anim06, 5, MSG_CH3_00F5) - EVT_WAIT(20) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim14) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim15) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim16) - EVT_WAIT(5) - EVT_END_THREAD - EVT_WAIT(5) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.7)) - EVT_CALL(NpcJump0, NPC_SELF, 600, 50, 115, 20) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim05) - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(1.25), EVT_FLOAT(1.2), EVT_FLOAT(1.25)) - EVT_WAIT(1) - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(1.35), EVT_FLOAT(1.15), EVT_FLOAT(1.25)) - EVT_WAIT(1) - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(1.45), EVT_FLOAT(1.05), EVT_FLOAT(1.25)) - EVT_WAIT(1) - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(1.35), EVT_FLOAT(1.15), EVT_FLOAT(1.25)) - EVT_WAIT(1) - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(1.25), EVT_FLOAT(1.2), EVT_FLOAT(1.25)) - EVT_WAIT(1) - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.5)) - EVT_CALL(NpcJump0, NPC_SELF, LVar3, 30, LVar5, 23) - EVT_END_THREAD - EVT_WAIT(2) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 50, 18, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotationPivot, NPC_SELF, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, -90, 18, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(0.4)) - EVT_END_THREAD - EVT_WAIT(5) - EVT_CALL(FadeOutMusic, 0, 1000) - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(1.25), EVT_FLOAT(1.25), EVT_FLOAT(1.25)) - EVT_CALL(SetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_CALL(SetNpcRotationPivot, NPC_SELF, 0) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim02) - EVT_WAIT(15) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim24) - EVT_WAIT(30) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_SNORE_INHALE, SOUND_SPACE_DEFAULT) - EVT_WAIT(30) - EVT_THREAD - EVT_CALL(SetSelfVar, 1, 0) - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 1, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_SNORE_EXHALE, SOUND_SPACE_DEFAULT) - EVT_CALL(RandInt, 10, LVar1) - EVT_ADD(LVar1, 15) - EVT_CALL(ShowSleepBubble, NPC_Tubba, 0, 0, 2, 628, 121, 127, LVar1, LVar0) - EVT_WAIT(48) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_SNORE_INHALE, SOUND_SPACE_DEFAULT) - EVT_CALL(RandInt, 10, LVar1) - EVT_ADD(LVar1, 10) - EVT_CALL(SetSleepBubbleTimeLeft, LVar0, LVar1) - EVT_WAIT(30) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(30) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_SET(GB_StoryProgress, STORY_CH3_TUBBA_BEGAN_NAPPING) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Label(10) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + IfLt(LVar0, 700) + Goto(10) + EndIf + IfGt(LVar2, 185) + Goto(10) + EndIf + Call(DisablePlayerInput, TRUE) + Wait(10) + Thread + Wait(10) + Call(InterpPlayerYaw, 270, 0) + EndThread + Call(FadeOutMusic, 0, 500) + Loop(3) + Call(SetPlayerAnimation, ANIM_MarioW2_JoltAwake) + Call(PlaySoundAt, SOUND_HEAVY_NPC_STEP_C, SOUND_SPACE_DEFAULT, 382, 0, 218) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.0)) + Wait(20) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(10) + EndLoop + Loop(2) + Call(InterpPlayerYaw, 270, 0) + Wait(10) + Call(InterpPlayerYaw, 90, 0) + Wait(10) + EndLoop + Call(UseSettingsFrom, CAM_DEFAULT, -40, 0, 180) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetPanTarget, CAM_DEFAULT, -40, 0, 180) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetPlayerPos, 740, 0, 180) + Call(SetNpcPos, NPC_PARTNER, 765, 0, 180) + Call(InterpPlayerYaw, 270, 0) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + Call(SetPlayerAnimation, ANIM_MarioW2_LookClosely) + Call(PlaySoundAtCollider, COLLIDER_deilittw, SOUND_CREAKY_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 80, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o140, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_o141, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Thread + Loop(3) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_HEAVY_NPC_STEP_C, SOUND_SPACE_DEFAULT) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(0.3)) + Wait(5) + EndLoop + EndThread + Call(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim09) + Call(SetNpcPos, NPC_SELF, -210, 0, 180) + Call(NpcMoveTo, NPC_SELF, -60, 180, 30) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim06) + Thread + Call(MakeLerp, 80, 0, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o140, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_o141, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_deilittw, SOUND_CREAKY_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + EndThread + Wait(20) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldTubba_Anim10, ANIM_WorldTubba_Anim06, 5, MSG_CH3_00F4) + Wait(20) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim09) + Call(SetSelfVar, 0, 0) + Thread + Loop(0) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Call(PlaySoundAtNpc, NPC_SELF, SOUND_HEAVY_NPC_STEP_C, SOUND_SPACE_DEFAULT) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(0.3)) + Wait(9) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Call(PlaySoundAtNpc, NPC_SELF, SOUND_HEAVY_NPC_STEP_C, SOUND_SPACE_DEFAULT) + Call(ShakeCam, CAM_DEFAULT, 0, 2, Float(0.15)) + Wait(12) + EndLoop + EndThread + Thread + Loop(0) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + EndLoop + EndThread + Call(SetNpcSpeed, NPC_SELF, Float(4.0)) + Call(NpcMoveTo, NPC_SELF, 45, 215, 0) + Call(NpcMoveTo, NPC_SELF, 140, 245, 0) + Call(NpcMoveTo, NPC_SELF, 615, 245, 0) + Call(SetSelfVar, 0, 1) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim06) + Wait(15) + Wait(20) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldTubba_Anim10, ANIM_WorldTubba_Anim06, 5, MSG_CH3_00F5) + Wait(20) + Thread + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim14) + Wait(5) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim15) + Wait(5) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim16) + Wait(5) + EndThread + Wait(5) + Call(SetNpcJumpscale, NPC_SELF, Float(0.7)) + Call(NpcJump0, NPC_SELF, 600, 50, 115, 20) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(0.3)) + EndThread + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim05) + Call(SetNpcScale, NPC_SELF, Float(1.25), Float(1.2), Float(1.25)) + Wait(1) + Call(SetNpcScale, NPC_SELF, Float(1.35), Float(1.15), Float(1.25)) + Wait(1) + Call(SetNpcScale, NPC_SELF, Float(1.45), Float(1.05), Float(1.25)) + Wait(1) + Call(SetNpcScale, NPC_SELF, Float(1.35), Float(1.15), Float(1.25)) + Wait(1) + Call(SetNpcScale, NPC_SELF, Float(1.25), Float(1.2), Float(1.25)) + Wait(1) + Call(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + Thread + Call(SetNpcJumpscale, NPC_SELF, Float(0.5)) + Call(NpcJump0, NPC_SELF, LVar3, 30, LVar5, 23) + EndThread + Wait(2) + Thread + Call(MakeLerp, 0, 50, 18, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotationPivot, NPC_SELF, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(MakeLerp, 0, -90, 18, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_SELF, 0, 0, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(0.4)) + EndThread + Wait(5) + Call(FadeOutMusic, 0, 1000) + Call(SetNpcScale, NPC_SELF, Float(1.25), Float(1.25), Float(1.25)) + Call(SetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + Call(SetNpcRotationPivot, NPC_SELF, 0) + Call(SetNpcRotation, NPC_SELF, 0, 0, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim02) + Wait(15) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim24) + Wait(30) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_SNORE_INHALE, SOUND_SPACE_DEFAULT) + Wait(30) + Thread + Call(SetSelfVar, 1, 0) + Loop(0) + Call(GetSelfVar, 1, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Call(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_SNORE_EXHALE, SOUND_SPACE_DEFAULT) + Call(RandInt, 10, LVar1) + Add(LVar1, 15) + Call(ShowSleepBubble, NPC_Tubba, 0, 0, 2, 628, 121, 127, LVar1, LVar0) + Wait(48) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_SNORE_INHALE, SOUND_SPACE_DEFAULT) + Call(RandInt, 10, LVar1) + Add(LVar1, 10) + Call(SetSleepBubbleTimeLeft, LVar0, LVar1) + Wait(30) + EndLoop + EndThread + Wait(30) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Set(GB_StoryProgress, STORY_CH3_TUBBA_BEGAN_NAPPING) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcIdle_Tubba_Asleep) = { - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(1.25), EVT_FLOAT(1.25), EVT_FLOAT(1.25)) - EVT_CALL(SetNpcPos, NPC_SELF, 600, 50, 115) - EVT_CALL(SetNpcRotationPivot, NPC_SELF, 0) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim02) - EVT_WAIT(15) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim24) - EVT_WAIT(30) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_SNORE_INHALE, SOUND_SPACE_DEFAULT) - EVT_WAIT(30) - EVT_THREAD - EVT_CALL(SetSelfVar, 1, 0) - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 1, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_SNORE_EXHALE, SOUND_SPACE_DEFAULT) - EVT_CALL(RandInt, 10, LVar1) - EVT_ADD(LVar1, 15) - EVT_CALL(ShowSleepBubble, NPC_Tubba, 0, 0, 2, 628, 121, 127, LVar1, LVar0) - EVT_WAIT(48) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_SNORE_INHALE, SOUND_SPACE_DEFAULT) - EVT_CALL(RandInt, 10, LVar1) - EVT_ADD(LVar1, 10) - EVT_CALL(SetSleepBubbleTimeLeft, LVar0, LVar1) - EVT_WAIT(30) - EVT_END_LOOP - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetNpcScale, NPC_SELF, Float(1.25), Float(1.25), Float(1.25)) + Call(SetNpcPos, NPC_SELF, 600, 50, 115) + Call(SetNpcRotationPivot, NPC_SELF, 0) + Call(SetNpcRotation, NPC_SELF, 0, 0, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim02) + Wait(15) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim24) + Wait(30) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_SNORE_INHALE, SOUND_SPACE_DEFAULT) + Wait(30) + Thread + Call(SetSelfVar, 1, 0) + Loop(0) + Call(GetSelfVar, 1, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Call(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_SNORE_EXHALE, SOUND_SPACE_DEFAULT) + Call(RandInt, 10, LVar1) + Add(LVar1, 15) + Call(ShowSleepBubble, NPC_Tubba, 0, 0, 2, 628, 121, 127, LVar1, LVar0) + Wait(48) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_SNORE_INHALE, SOUND_SPACE_DEFAULT) + Call(RandInt, 10, LVar1) + Add(LVar1, 10) + Call(SetSleepBubbleTimeLeft, LVar0, LVar1) + Wait(30) + EndLoop + EndThread + Return + End }; EvtScript N(EVS_NpcAI_Tubba_WakeUp) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_SNORE_EXHALE, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowSleepBubble, NPC_Tubba, 0, 50, 2, 552, 111, 128, 30, LVar0) - EVT_WAIT(360) - EVT_CALL(SetSleepBubbleTimeLeft, LVar0, 20) - EVT_CALL(SetNpcVar, NPC_SELF, 1, 2) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SNAP_AWAKE_A, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim19) - EVT_WAIT(30) - EVT_THREAD - EVT_CALL(NpcJump0, NPC_SELF, 650, 0, 250, 25) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim1A) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim1B) - EVT_WAIT(12) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim1C) - EVT_WAIT(5) - EVT_CALL(BindNpcAI, NPC_Tubba, EVT_PTR(N(EVS_NpcAI_Tubba_Chase))) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0B) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_TUBBA_SNORE_EXHALE, SOUND_SPACE_DEFAULT) + Call(ShowSleepBubble, NPC_Tubba, 0, 50, 2, 552, 111, 128, 30, LVar0) + Wait(360) + Call(SetSleepBubbleTimeLeft, LVar0, 20) + Call(SetNpcVar, NPC_SELF, 1, 2) + Wait(20) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SNAP_AWAKE_A, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim19) + Wait(30) + Thread + Call(NpcJump0, NPC_SELF, 650, 0, 250, 25) + EndThread + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim1A) + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim1B) + Wait(12) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim1C) + Wait(5) + Call(BindNpcAI, NPC_Tubba, Ref(N(EVS_NpcAI_Tubba_Chase))) + Return + End }; EvtScript N(EVS_NpcAI_Tubba_Chase) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim0D) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(2.0)) - EVT_WAIT(5) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 2, EVT_FLOAT(1.0)) - EVT_WAIT(8) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(N(PatrolNoAttackAI_Main), EVT_PTR(N(AISettings_Tubba_Patrol))) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0B) + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim0D) + Thread + Loop(0) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(2.0)) + Wait(5) + Call(ShakeCam, CAM_DEFAULT, 0, 2, Float(1.0)) + Wait(8) + EndLoop + EndThread + Call(N(PatrolNoAttackAI_Main), Ref(N(AISettings_Tubba_Patrol))) + Return + End }; EvtScript N(EVS_NpcDefeat_Tubba) = { - EVT_CALL(N(UnkFunc1)) - EVT_CALL(GotoMap, EVT_PTR("dgb_01"), dgb_01_ENTRY_6) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(N(UnkFunc1)) + Call(GotoMap, Ref("dgb_01"), dgb_01_ENTRY_6) + Wait(100) + Return + End }; EvtScript N(EVS_NpcInit_Tubba) = { - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(1.25), EVT_FLOAT(1.25), EVT_FLOAT(1.25)) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Tubba))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_BEGAN_NAPPING) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_Scene_TubbaFallsAsleep))) - EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Tubba_Asleep))) - EVT_CASE_LT(STORY_CH3_TUBBA_SMASHED_THE_BRIDGES) - EVT_CALL(SetNpcPos, NPC_SELF, 245, 0, 250) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Tubba_Chase))) - EVT_CASE_LT(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetNpcScale, NPC_SELF, Float(1.25), Float(1.25), Float(1.25)) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Tubba))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_BEGAN_NAPPING) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_Scene_TubbaFallsAsleep))) + CaseLt(STORY_CH3_TUBBA_WOKE_UP) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Tubba_Asleep))) + CaseLt(STORY_CH3_TUBBA_SMASHED_THE_BRIDGES) + Call(SetNpcPos, NPC_SELF, 245, 0, 250) + Call(SetNpcYaw, NPC_SELF, 270) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcAI_Tubba_Chase))) + CaseLt(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; EvtScript N(EVS_Scene_YakkeyShouts) = { - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(40) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, 845, 0, 140) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.8)) - EVT_CALL(NpcJump1, NPC_SELF, 845, 35, 145, 15) - EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE) - EVT_WAIT(15) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 800, 245) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 5, MSG_CH3_00F6) - EVT_WAIT(15) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 5, MSG_CH3_00F7) - EVT_CALL(ShowChoice, MSG_Choice_000D) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 0, MSG_CH3_00F8) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 0, MSG_CH3_00F9) - EVT_END_IF - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 740, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 600) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 800, 245) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 740, LVar1, LVar2) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_SET(MF_Sync_YakkeyDialogue, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 517, MSG_CH3_00FA) - EVT_SET(MF_Sync_YakkeyDialogue, TRUE) - EVT_END_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_LOOP(0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(550.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 740, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(600.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 740, LVar1, LVar2) - EVT_WAIT(1) - EVT_IF_EQ(MF_Sync_YakkeyDialogue, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CALL(SetNpcVar, NPC_Tubba, 1, 1) - EVT_WAIT(15) - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim25) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(GetNpcVar, NPC_Tubba, 1, LVar0) - EVT_IF_EQ(LVar0, 2) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(RandInt, 40, LVar0) - EVT_CALL(RandInt, 40, LVar1) - EVT_ADD(LVar0, 537) - EVT_ADD(LVar1, 110) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 2, LVar0, LVar1, 128, EVT_FLOAT(0.3), 24) - EVT_WAIT(5) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(15) - EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim05) - EVT_CALL(SpeakToPlayer, NPC_Tubba, ANIM_WorldTubba_Anim13, ANIM_WorldTubba_Anim05, 5, MSG_CH3_00FB) - EVT_WAIT(15) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PARTNER_GOOMBARIO) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH3_00FC) - EVT_CASE_EQ(PARTNER_KOOPER) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH3_00FD) - EVT_CASE_EQ(PARTNER_BOMBETTE) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH3_00FE) - EVT_CASE_EQ(PARTNER_PARAKARRY) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH3_00FF) - EVT_CASE_EQ(PARTNER_BOW) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_0100) - EVT_END_SWITCH - EVT_CALL(EnablePartnerAI) - EVT_WAIT(15) - EVT_CALL(BindNpcAI, NPC_Tubba, EVT_PTR(N(EVS_NpcAI_Tubba_WakeUp))) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_SUB(LVar1, 10) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 10) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_SET(GB_StoryProgress, STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Loop(0) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(DisablePlayerInput, TRUE) + Wait(40) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcPos, NPC_SELF, 845, 0, 140) + Call(SetNpcJumpscale, NPC_SELF, Float(0.8)) + Call(NpcJump1, NPC_SELF, 845, 35, 145, 15) + Call(PlayerFaceNpc, NPC_SELF, FALSE) + Wait(15) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPosB, CAM_DEFAULT, 800, 245) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 5, MSG_CH3_00F6) + Wait(15) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 5, MSG_CH3_00F7) + Call(ShowChoice, MSG_Choice_000D) + IfEq(LVar0, 0) + Call(ContinueSpeech, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 0, MSG_CH3_00F8) + Else + Call(ContinueSpeech, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 0, MSG_CH3_00F9) + EndIf + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(UseSettingsFrom, CAM_DEFAULT, 740, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 600) + Call(SetCamPosB, CAM_DEFAULT, 800, 245) + Call(SetPanTarget, CAM_DEFAULT, 740, LVar1, LVar2) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Set(MF_Sync_YakkeyDialogue, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 517, MSG_CH3_00FA) + Set(MF_Sync_YakkeyDialogue, TRUE) + EndThread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Loop(0) + Call(SetCamDistance, CAM_DEFAULT, Float(550.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetPanTarget, CAM_DEFAULT, 740, LVar1, LVar2) + Wait(1) + Call(SetCamDistance, CAM_DEFAULT, Float(600.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetPanTarget, CAM_DEFAULT, 740, LVar1, LVar2) + Wait(1) + IfEq(MF_Sync_YakkeyDialogue, TRUE) + BreakLoop + EndIf + EndLoop + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + Call(SetNpcVar, NPC_Tubba, 1, 1) + Wait(15) + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim25) + Thread + Loop(0) + Call(GetNpcVar, NPC_Tubba, 1, LVar0) + IfEq(LVar0, 2) + BreakLoop + EndIf + Call(RandInt, 40, LVar0) + Call(RandInt, 40, LVar1) + Add(LVar0, 537) + Add(LVar1, 110) + PlayEffect(EFFECT_SMOKE_BURST, 2, LVar0, LVar1, 128, Float(0.3), 24) + Wait(5) + EndLoop + EndThread + Wait(15) + Call(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim05) + Call(SpeakToPlayer, NPC_Tubba, ANIM_WorldTubba_Anim13, ANIM_WorldTubba_Anim05, 5, MSG_CH3_00FB) + Wait(15) + Call(DisablePartnerAI, 0) + Call(GetCurrentPartnerID, LVar0) + Switch(LVar0) + CaseEq(PARTNER_GOOMBARIO) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH3_00FC) + CaseEq(PARTNER_KOOPER) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH3_00FD) + CaseEq(PARTNER_BOMBETTE) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH3_00FE) + CaseEq(PARTNER_PARAKARRY) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH3_00FF) + CaseEq(PARTNER_BOW) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_0100) + EndSwitch + Call(EnablePartnerAI) + Wait(15) + Call(BindNpcAI, NPC_Tubba, Ref(N(EVS_NpcAI_Tubba_WakeUp))) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Sub(LVar1, 10) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 10) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Set(GB_StoryProgress, STORY_CH3_TUBBA_WOKE_UP) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Yakkey) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_Scene_YakkeyShouts))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_Scene_YakkeyShouts))) + Return + End }; NpcData N(NpcData_Tubba) = { diff --git a/src/world/area_dgb/dgb_18/dgb_18_4_entity.c b/src/world/area_dgb/dgb_18/dgb_18_4_entity.c index 9a0b103375c..6473581e98d 100644 --- a/src/world/area_dgb/dgb_18/dgb_18_4_entity.c +++ b/src/world/area_dgb/dgb_18/dgb_18_4_entity.c @@ -4,17 +4,17 @@ #include "world/common/entity/Chest.inc.c" EvtScript N(EVS_OpenChest_MysticalKey) = { - EVT_SET(GF_DGB18_Chest_MysticalKey, TRUE) - EVT_CALL(AddKeyItem, ITEM_MYSTICAL_KEY) - EVT_CALL(SetNpcVar, NPC_Yakkey, 0, 1) - EVT_RETURN - EVT_END + Set(GF_DGB18_Chest_MysticalKey, TRUE) + Call(AddKeyItem, ITEM_MYSTICAL_KEY) + Call(SetNpcVar, NPC_Yakkey, 0, 1) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 845, 0, 145, -35, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_DGB18_Chest_MysticalKey) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenChest_MysticalKey))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Chest), 845, 0, 145, -35, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_DGB18_Chest_MysticalKey) + Call(AssignScript, Ref(N(EVS_OpenChest_MysticalKey))) + Return + End }; diff --git a/src/world/area_dro/dro_01/dro_01_1_music.c b/src/world/area_dro/dro_01/dro_01_1_music.c index 92450da0628..7c9a07eb649 100644 --- a/src/world/area_dro/dro_01/dro_01_1_music.c +++ b/src/world/area_dro/dro_01/dro_01_1_music.c @@ -1,15 +1,15 @@ #include "dro_01.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(dro_01_ENTRY_3) - EVT_CASE_OR_EQ(dro_01_ENTRY_4) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_OUTPOST, 0, 8) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseOrEq(dro_01_ENTRY_3) + CaseOrEq(dro_01_ENTRY_4) + EndCaseGroup + CaseDefault + Call(SetMusicTrack, 0, SONG_DRY_DRY_OUTPOST, 0, 8) + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/world/area_dro/dro_01/dro_01_2_main.c b/src/world/area_dro/dro_01/dro_01_2_main.c index fc8ca8144f1..5ec3a6183e6 100644 --- a/src/world/area_dro/dro_01/dro_01_2_main.c +++ b/src/world/area_dro/dro_01/dro_01_2_main.c @@ -5,120 +5,120 @@ #include "world/common/atomic/ApplyTint.inc.c" EvtScript N(EVS_ExitWalk_sbk_36_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_SET(GF_DRO01_HeardHintAboutSpinningRoof, 0) - EVT_CALL(UseExitHeading, 60, 0) - EVT_EXEC(ExitWalk) - EVT_CALL(GotoMap, EVT_PTR("sbk_36"), 1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Set(GF_DRO01_HeardHintAboutSpinningRoof, 0) + Call(UseExitHeading, 60, 0) + Exec(ExitWalk) + Call(GotoMap, Ref("sbk_36"), 1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_dro_02_0) = EVT_EXIT_WALK(60, dro_01_ENTRY_1, "dro_02", dro_02_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(N(EVS_ExitWalk_sbk_36_1), TRIGGER_FLOOR_ABOVE, 1, 1, 0) - EVT_BIND_TRIGGER(N(EVS_ExitWalk_dro_02_0), TRIGGER_FLOOR_ABOVE, 5, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(N(EVS_ExitWalk_sbk_36_1), TRIGGER_FLOOR_ABOVE, 1, 1, 0) + BindTrigger(N(EVS_ExitWalk_dro_02_0), TRIGGER_FLOOR_ABOVE, 5, 1, 0) + Return + End }; EvtScript N(EVS_Scene_RuinsRising) = { - EVT_CALL(PlaySound, SOUND_LOOP_SBK_RUINS_RISING_DISTANT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 175, 0, -201) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 175, 0, -201) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(N(SetModelTintMode), APPLY_TINT_BG, NULL, ENV_TINT_REMAP) - EVT_CALL(N(SetModelTintMode), APPLY_TINT_GROUPS, -1, ENV_TINT_REMAP) - EVT_CALL(N(SetModelTintParams), ENV_TINT_REMAP, 44, 32, 177, 0, 0, 0, 0, 0, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 300, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(60) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, dro_01_ENTRY_3) - EVT_CALL(GotoMap, EVT_PTR("dro_02"), dro_02_ENTRY_2) - EVT_ELSE - EVT_CALL(GotoMap, EVT_PTR("dro_02"), dro_02_ENTRY_3) - EVT_END_IF - EVT_WAIT(100) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(PlaySound, SOUND_LOOP_SBK_RUINS_RISING_DISTANT) + Call(UseSettingsFrom, CAM_DEFAULT, 175, 0, -201) + Call(SetPanTarget, CAM_DEFAULT, 175, 0, -201) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(N(SetModelTintMode), APPLY_TINT_BG, NULL, ENV_TINT_REMAP) + Call(N(SetModelTintMode), APPLY_TINT_GROUPS, -1, ENV_TINT_REMAP) + Call(N(SetModelTintParams), ENV_TINT_REMAP, 44, 32, 177, 0, 0, 0, 0, 0, 0) + Call(DisablePlayerInput, TRUE) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 300, Float(0.2)) + EndThread + Thread + Wait(60) + Call(GetEntryID, LVar0) + IfEq(LVar0, dro_01_ENTRY_3) + Call(GotoMap, Ref("dro_02"), dro_02_ENTRY_2) + Else + Call(GotoMap, Ref("dro_02"), dro_02_ENTRY_3) + EndIf + Wait(100) + EndThread + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(dro_01_ENTRY_2) - EVT_IF_EQ(GF_DRO01_WarpPipe, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerPos, LVar0, NPC_DISPOSE_POS_Y, LVar2) - EVT_WAIT(30) - EVT_CALL(PlaySound, SOUND_GROW) - EVT_SET(GF_DRO01_WarpPipe, TRUE) - EVT_WAIT(30) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_SET(LVarA, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC_WAIT(N(EVS_Pipe_EnterVertical)) - EVT_CASE_OR_EQ(dro_01_ENTRY_3) - EVT_CASE_OR_EQ(dro_01_ENTRY_4) - EVT_EXEC_WAIT(N(EVS_Scene_RuinsRising)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(dro_01_ENTRY_A) - EVT_EXEC(EnterPostPipe) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_DEFAULT - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(dro_01_ENTRY_2) + IfEq(GF_DRO01_WarpPipe, FALSE) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(SetPlayerPos, LVar0, NPC_DISPOSE_POS_Y, LVar2) + Wait(30) + Call(PlaySound, SOUND_GROW) + Set(GF_DRO01_WarpPipe, TRUE) + Wait(30) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + EndIf + Set(LVarA, Ref(N(EVS_BindExitTriggers))) + ExecWait(N(EVS_Pipe_EnterVertical)) + CaseOrEq(dro_01_ENTRY_3) + CaseOrEq(dro_01_ENTRY_4) + ExecWait(N(EVS_Scene_RuinsRising)) + EndCaseGroup + CaseEq(dro_01_ENTRY_A) + Exec(EnterPostPipe) + Exec(N(EVS_BindExitTriggers)) + CaseDefault + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Wait(1) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_OUTPOST) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_SET(GF_MAP_DryDryOutpost, TRUE) - EVT_IF_LT(GB_StoryProgress, STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST) - EVT_SET(GB_StoryProgress, STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST) - EVT_END_IF - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH2_STAR_SPRIT_DEPARTED, STORY_CH4_BEGAN_PEACH_MISSION) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(Chapter3NPCs))) - EVT_CASE_DEFAULT - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_END_SWITCH - EVT_CALL(InitVirtualEntityList) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(MakeShop, EVT_PTR(N(Shop_ItemPositions)), EVT_PTR(N(Shop_Inventory)), EVT_PTR(N(Shop_PriceList)), 0) - EVT_CALL(MakeShopOwner, EVT_PTR(N(Shop_Owner))) - EVT_EXEC_WAIT(N(EVS_SetupRooms)) - EVT_EXEC(N(EVS_SwingSign_Shop)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_OUTPOST) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Set(GF_MAP_DryDryOutpost, TRUE) + IfLt(GB_StoryProgress, STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST) + Set(GB_StoryProgress, STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST) + EndIf + Switch(GB_StoryProgress) + CaseRange(STORY_CH2_STAR_SPRIT_DEPARTED, STORY_CH4_BEGAN_PEACH_MISSION) + Call(MakeNpcs, FALSE, Ref(N(Chapter3NPCs))) + CaseDefault + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + EndSwitch + Call(InitVirtualEntityList) + ExecWait(N(EVS_MakeEntities)) + Call(MakeShop, Ref(N(Shop_ItemPositions)), Ref(N(Shop_Inventory)), Ref(N(Shop_PriceList)), 0) + Call(MakeShopOwner, Ref(N(Shop_Owner))) + ExecWait(N(EVS_SetupRooms)) + Exec(N(EVS_SwingSign_Shop)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Wait(1) + Exec(N(EVS_SetupFoliage)) + Return + End }; diff --git a/src/world/area_dro/dro_01/dro_01_3_npc.c b/src/world/area_dro/dro_01/dro_01_3_npc.c index 9d2ad24f389..edc8ea824a3 100644 --- a/src/world/area_dro/dro_01/dro_01_3_npc.c +++ b/src/world/area_dro/dro_01/dro_01_3_npc.c @@ -25,100 +25,100 @@ s32 N(LetterList)[] = { }; EvtScript N(EVS_LetterPrompt_ShopOwner) = { - EVT_CALL(N(LetterDelivery_Init), + Call(N(LetterDelivery_Init), NPC_Mouser_ShopOwner, ANIM_Mouser_Purple_Talk, ANIM_Mouser_Purple_Idle, ITEM_LETTER_CHAIN_LITTLE_MOUSER, ITEM_LETTER_CHAIN_FRANKY, MSG_CH2_0089, MSG_CH2_008A, MSG_CH2_008B, MSG_CH2_008C, - EVT_PTR(N(LetterList))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) - EVT_RETURN - EVT_END + Ref(N(LetterList))) + ExecWait(N(EVS_DoLetterDelivery)) + Return + End }; EvtScript N(EVS_NpcInteract_Mouser_01) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_0062) - EVT_RETURN - EVT_END_IF - EVT_SWITCH(AB_DRO_0) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_005F) - EVT_ADD(AB_DRO_0, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_0060) - EVT_ADD(AB_DRO_0, 1) - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_0061) - EVT_SUB(AB_DRO_0, 1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH2_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_0062) + Return + EndIf + Switch(AB_DRO_0) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_005F) + Add(AB_DRO_0, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_0060) + Add(AB_DRO_0, 1) + CaseEq(2) + Call(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_0061) + Sub(AB_DRO_0, 1) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Mouser_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Mouser_01))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Mouser_01))) + Return + End }; EvtScript N(EVS_NpcInteract_Dryite_01) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_GE(GB_StoryProgress, STORY_CH2_BOUGHT_SECRET_ITEMS) - EVT_IF_EQ(AB_DRO_1, 2) - EVT_SET(AB_DRO_1, 0) - EVT_END_IF - EVT_END_IF - EVT_SWITCH(AB_DRO_1) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Yellow_Talk, ANIM_Dryite_Yellow_Idle, 0, MSG_CH2_0063) - EVT_ADD(AB_DRO_1, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Yellow_Talk, ANIM_Dryite_Yellow_Idle, 0, MSG_CH2_0064) - EVT_ADD(AB_DRO_1, 1) - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Yellow_Talk, ANIM_Dryite_Yellow_Idle, 0, MSG_CH2_0065) - EVT_SET(AB_DRO_1, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Yellow_Talk, ANIM_Dryite_Yellow_Idle, 0, MSG_CH2_0066) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Yellow_Talk, ANIM_Dryite_Yellow_Idle, 0, MSG_CH2_0067) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfGe(GB_StoryProgress, STORY_CH2_BOUGHT_SECRET_ITEMS) + IfEq(AB_DRO_1, 2) + Set(AB_DRO_1, 0) + EndIf + EndIf + Switch(AB_DRO_1) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Yellow_Talk, ANIM_Dryite_Yellow_Idle, 0, MSG_CH2_0063) + Add(AB_DRO_1, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Yellow_Talk, ANIM_Dryite_Yellow_Idle, 0, MSG_CH2_0064) + Add(AB_DRO_1, 1) + CaseEq(2) + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Yellow_Talk, ANIM_Dryite_Yellow_Idle, 0, MSG_CH2_0065) + Set(AB_DRO_1, 0) + EndSwitch + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Yellow_Talk, ANIM_Dryite_Yellow_Idle, 0, MSG_CH2_0066) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Yellow_Talk, ANIM_Dryite_Yellow_Idle, 0, MSG_CH2_0067) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Dryite_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Dryite_01))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Dryite_01))) + Return + End }; EvtScript N(EVS_NpcInteract_Dryite_02) = { //@bug this dialogue was probably supposed to cycle 0 --> 1 --> 2 --> 3 --> 0 ... - EVT_SWITCH(AB_DRO_2) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Blue_Talk, ANIM_Dryite_Blue_Idle, 0, MSG_CH2_0068) - EVT_ADD(AB_DRO_2, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Blue_Talk, ANIM_Dryite_Blue_Idle, 0, MSG_CH2_0069) - EVT_ADD(AB_DRO_2, 1) - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Blue_Talk, ANIM_Dryite_Blue_Idle, 0, MSG_CH2_006A) - EVT_ADD(AB_DRO_2, 1) - EVT_CASE_EQ(3) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Blue_Talk, ANIM_Dryite_Blue_Idle, 0, MSG_CH2_006B) - EVT_SET(AB_DRO_2, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(AB_DRO_2) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Blue_Talk, ANIM_Dryite_Blue_Idle, 0, MSG_CH2_0068) + Add(AB_DRO_2, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Blue_Talk, ANIM_Dryite_Blue_Idle, 0, MSG_CH2_0069) + Add(AB_DRO_2, 1) + CaseEq(2) + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Blue_Talk, ANIM_Dryite_Blue_Idle, 0, MSG_CH2_006A) + Add(AB_DRO_2, 1) + CaseEq(3) + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Blue_Talk, ANIM_Dryite_Blue_Idle, 0, MSG_CH2_006B) + Set(AB_DRO_2, 0) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Dryite_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Dryite_02))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Dryite_02))) + Return + End }; #include "npc_hint_dryite.c" @@ -127,66 +127,66 @@ EvtScript N(EVS_NpcInit_Dryite_02) = { #include "npc_shop_owner.c" EvtScript N(EVS_NpcInteract_Toadette) = { - EVT_CALL(SpeakToPlayer, NPC_Toadette_01, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 0, MSG_CH2_008E) - EVT_CALL(SpeakToPlayer, NPC_Toadette_02, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 0, MSG_CH2_008F) - EVT_CALL(SpeakToPlayer, NPC_Toadette_03, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 0, MSG_CH2_0090) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_Toadette_01, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 0, MSG_CH2_008E) + Call(SpeakToPlayer, NPC_Toadette_02, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 0, MSG_CH2_008F) + Call(SpeakToPlayer, NPC_Toadette_03, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 0, MSG_CH2_0090) + Return + End }; EvtScript N(EVS_NpcInit_Toadette) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toadette))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toadette))) + Return + End }; EvtScript N(EVS_NpcInteract_DojoGrad) = { - EVT_CALL(FindKeyItem, ITEM_FIRST_DEGREE_CARD, LVar1) - EVT_CALL(FindKeyItem, ITEM_SECOND_DEGREE_CARD, LVar2) - EVT_CALL(FindKeyItem, ITEM_THIRD_DEGREE_CARD, LVar3) - EVT_CALL(FindKeyItem, ITEM_FOURTH_DEGREE_CARD, LVar4) - EVT_CALL(FindKeyItem, ITEM_DIPLOMA, LVar5) - EVT_IF_NE(LVar1, -1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Brown_Talk, ANIM_Dryite_Brown_Idle, 0, MSG_CH2_009A) - EVT_RETURN - EVT_END_IF - EVT_IF_NE(LVar2, -1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Brown_Talk, ANIM_Dryite_Brown_Idle, 0, MSG_CH2_009B) - EVT_RETURN - EVT_END_IF - EVT_IF_NE(LVar3, -1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Brown_Talk, ANIM_Dryite_Brown_Idle, 0, MSG_CH2_009C) - EVT_RETURN - EVT_END_IF - EVT_IF_NE(LVar4, -1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Brown_Talk, ANIM_Dryite_Brown_Idle, 0, MSG_CH2_009D) - EVT_RETURN - EVT_END_IF - EVT_IF_NE(LVar5, -1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Brown_Talk, ANIM_Dryite_Brown_Idle, 0, MSG_CH2_009E) - EVT_RETURN - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Brown_Talk, ANIM_Dryite_Brown_Idle, 0, MSG_CH2_0099) - EVT_RETURN - EVT_END + Call(FindKeyItem, ITEM_FIRST_DEGREE_CARD, LVar1) + Call(FindKeyItem, ITEM_SECOND_DEGREE_CARD, LVar2) + Call(FindKeyItem, ITEM_THIRD_DEGREE_CARD, LVar3) + Call(FindKeyItem, ITEM_FOURTH_DEGREE_CARD, LVar4) + Call(FindKeyItem, ITEM_DIPLOMA, LVar5) + IfNe(LVar1, -1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Brown_Talk, ANIM_Dryite_Brown_Idle, 0, MSG_CH2_009A) + Return + EndIf + IfNe(LVar2, -1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Brown_Talk, ANIM_Dryite_Brown_Idle, 0, MSG_CH2_009B) + Return + EndIf + IfNe(LVar3, -1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Brown_Talk, ANIM_Dryite_Brown_Idle, 0, MSG_CH2_009C) + Return + EndIf + IfNe(LVar4, -1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Brown_Talk, ANIM_Dryite_Brown_Idle, 0, MSG_CH2_009D) + Return + EndIf + IfNe(LVar5, -1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Brown_Talk, ANIM_Dryite_Brown_Idle, 0, MSG_CH2_009E) + Return + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Brown_Talk, ANIM_Dryite_Brown_Idle, 0, MSG_CH2_0099) + Return + End }; EvtScript N(EVS_NpcInit_DojoGrad) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_DojoGrad))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_DojoGrad))) + Return + End }; EvtScript N(EVS_NpcInteract_Dryite_06) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Brown_Talk, ANIM_Dryite_Brown_Idle, 0, MSG_CH2_009F) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Brown_Talk, ANIM_Dryite_Brown_Idle, 0, MSG_CH2_009F) + Return + End }; EvtScript N(EVS_NpcInit_Dryite_06) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Dryite_06))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Dryite_06))) + Return + End }; NpcData N(PassiveNPCs)[] = { diff --git a/src/world/area_dro/dro_01/dro_01_4_shop.c b/src/world/area_dro/dro_01/dro_01_4_shop.c index 8356ff8aaac..e752a4c4853 100644 --- a/src/world/area_dro/dro_01/dro_01_4_shop.c +++ b/src/world/area_dro/dro_01/dro_01_4_shop.c @@ -57,53 +57,53 @@ API_CALLABLE(N(HideCoinCounter)) { } EvtScript N(EVS_JumpToPlayer) = { - EVT_CALL(NpcJump0, NPC_Mouser_ShopOwner, -31, 0, -283, 10) - EVT_CALL(NpcJump0, NPC_Mouser_ShopOwner, -30, 0, -283, 8) - EVT_RETURN - EVT_END + Call(NpcJump0, NPC_Mouser_ShopOwner, -31, 0, -283, 10) + Call(NpcJump0, NPC_Mouser_ShopOwner, -30, 0, -283, 8) + Return + End }; EvtScript N(EVS_JumpAway) = { - EVT_CALL(NpcJump0, NPC_Mouser_ShopOwner, 20, 0, -259, 10) - EVT_CALL(NpcJump0, NPC_Mouser_ShopOwner, 20, 0, -259, 4) - EVT_RETURN - EVT_END + Call(NpcJump0, NPC_Mouser_ShopOwner, 20, 0, -259, 10) + Call(NpcJump0, NPC_Mouser_ShopOwner, 20, 0, -259, 4) + Return + End }; EvtScript N(EVS_SecretPurcahseOrder_Moustafa) = { - EVT_CALL(N(HideCoinCounter)) - EVT_CALL(func_802D2C14, 1) - EVT_EXEC_WAIT(N(EVS_JumpToPlayer)) - EVT_IF_LT(GB_StoryProgress, STORY_CH2_BOUGHT_SECRET_ITEMS) - EVT_CALL(SpeakToPlayer, NPC_Mouser_ShopOwner, ANIM_Mouser_Purple_Talk, ANIM_Mouser_Purple_Idle, 0, MSG_CH2_0087) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(30) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_Mouser_ShopOwner, ANIM_Mouser_Purple_Talk, ANIM_Mouser_Purple_Idle, 0, MSG_CH2_0088) - EVT_SET(GB_StoryProgress, STORY_CH2_BOUGHT_SECRET_ITEMS) - EVT_CALL(func_802D2C14, 0) - EVT_EXEC_WAIT(N(EVS_JumpAway)) - EVT_END_IF /// @bug unmatched endif in script - EVT_RETURN - EVT_END + Call(N(HideCoinCounter)) + Call(func_802D2C14, 1) + ExecWait(N(EVS_JumpToPlayer)) + IfLt(GB_StoryProgress, STORY_CH2_BOUGHT_SECRET_ITEMS) + Call(SpeakToPlayer, NPC_Mouser_ShopOwner, ANIM_Mouser_Purple_Talk, ANIM_Mouser_Purple_Idle, 0, MSG_CH2_0087) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(10) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(30) + EndIf + Call(SpeakToPlayer, NPC_Mouser_ShopOwner, ANIM_Mouser_Purple_Talk, ANIM_Mouser_Purple_Idle, 0, MSG_CH2_0088) + Set(GB_StoryProgress, STORY_CH2_BOUGHT_SECRET_ITEMS) + Call(func_802D2C14, 0) + ExecWait(N(EVS_JumpAway)) + EndIf /// @bug unmatched endif in script + Return + End }; EvtScript N(EVS_SecretPurcahseOrder_RedJar) = { - EVT_IF_EQ(GF_DRO01_Gift_RedJar, FALSE) - EVT_CALL(N(HideCoinCounter)) - EVT_CALL(func_802D2C14, 1) - EVT_EXEC_WAIT(N(EVS_JumpToPlayer)) - EVT_CALL(SpeakToPlayer, NPC_Mouser_ShopOwner, ANIM_Mouser_Purple_Talk, ANIM_Mouser_Purple_Idle, 0, MSG_CH2_008D) + IfEq(GF_DRO01_Gift_RedJar, FALSE) + Call(N(HideCoinCounter)) + Call(func_802D2C14, 1) + ExecWait(N(EVS_JumpToPlayer)) + Call(SpeakToPlayer, NPC_Mouser_ShopOwner, ANIM_Mouser_Purple_Talk, ANIM_Mouser_Purple_Idle, 0, MSG_CH2_008D) EVT_GIVE_KEY_REWARD(ITEM_KOOT_RED_JAR) - EVT_SET(GF_DRO01_Gift_RedJar, TRUE) - EVT_WAIT(20) - EVT_CALL(func_802D2C14, 0) - EVT_EXEC_WAIT(N(EVS_JumpAway)) - EVT_END_IF - EVT_RETURN - EVT_END + Set(GF_DRO01_Gift_RedJar, TRUE) + Wait(20) + Call(func_802D2C14, 0) + ExecWait(N(EVS_JumpAway)) + EndIf + Return + End }; enum { @@ -114,45 +114,45 @@ enum { }; EvtScript N(EVS_OnBuy) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(SHOP_BUY_RESULT_CANCEL) - EVT_CASE_EQ(SHOP_BUY_RESULT_4) - EVT_CASE_EQ(SHOP_BUY_RESULT_OK) - EVT_SET(LVar2, AB_DRO_SHOP_PREV1) - EVT_SET(LVar3, AB_DRO_SHOP_PREV2) - EVT_SET(LVar4, AB_DRO_SHOP_PREV3) - EVT_SET(AB_DRO_SHOP_PREV2, LVar2) - EVT_SET(AB_DRO_SHOP_PREV3, LVar3) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(ITEM_DRIED_SHROOM) + Switch(LVar0) + CaseEq(SHOP_BUY_RESULT_CANCEL) + CaseEq(SHOP_BUY_RESULT_4) + CaseEq(SHOP_BUY_RESULT_OK) + Set(LVar2, AB_DRO_SHOP_PREV1) + Set(LVar3, AB_DRO_SHOP_PREV2) + Set(LVar4, AB_DRO_SHOP_PREV3) + Set(AB_DRO_SHOP_PREV2, LVar2) + Set(AB_DRO_SHOP_PREV3, LVar3) + Switch(LVar1) + CaseEq(ITEM_DRIED_SHROOM) // Dusty Hammer, Dried Pasta, Dusty Hammer, Dried Shroom -> Red jar - EVT_SET(AB_DRO_SHOP_PREV1, SEQ_DRIED_SHOOM) - EVT_IF_EQ(LVar2, SEQ_DUSTY_HAMMER) - EVT_IF_EQ(LVar3, SEQ_DRIED_PASTA) - EVT_IF_EQ(LVar4, SEQ_DUSTY_HAMMER) - EVT_EXEC_WAIT(N(EVS_SecretPurcahseOrder_RedJar)) - EVT_SET(AB_DRO_SHOP_PREV1, SEQ_NONE) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(ITEM_DUSTY_HAMMER) + Set(AB_DRO_SHOP_PREV1, SEQ_DRIED_SHOOM) + IfEq(LVar2, SEQ_DUSTY_HAMMER) + IfEq(LVar3, SEQ_DRIED_PASTA) + IfEq(LVar4, SEQ_DUSTY_HAMMER) + ExecWait(N(EVS_SecretPurcahseOrder_RedJar)) + Set(AB_DRO_SHOP_PREV1, SEQ_NONE) + EndIf + EndIf + EndIf + CaseEq(ITEM_DUSTY_HAMMER) // Dried Shroom, Dusty Hammer -> Moustafa information - EVT_SET(AB_DRO_SHOP_PREV1, SEQ_DUSTY_HAMMER) - EVT_IF_EQ(LVar2, SEQ_DRIED_SHOOM) - EVT_IF_LT(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_EXEC_WAIT(N(EVS_SecretPurcahseOrder_Moustafa)) - EVT_SET(AB_DRO_SHOP_PREV1, SEQ_NONE) - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(ITEM_DRIED_PASTA) - EVT_SET(AB_DRO_SHOP_PREV1, SEQ_DRIED_PASTA) - EVT_CASE_DEFAULT - EVT_SET(AB_DRO_SHOP_PREV1, SEQ_NONE) - EVT_END_SWITCH - EVT_CASE_EQ(SHOP_BUY_RESULT_2) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Set(AB_DRO_SHOP_PREV1, SEQ_DUSTY_HAMMER) + IfEq(LVar2, SEQ_DRIED_SHOOM) + IfLt(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + ExecWait(N(EVS_SecretPurcahseOrder_Moustafa)) + Set(AB_DRO_SHOP_PREV1, SEQ_NONE) + EndIf + EndIf + CaseEq(ITEM_DRIED_PASTA) + Set(AB_DRO_SHOP_PREV1, SEQ_DRIED_PASTA) + CaseDefault + Set(AB_DRO_SHOP_PREV1, SEQ_NONE) + EndSwitch + CaseEq(SHOP_BUY_RESULT_2) + EndSwitch + Return + End }; ShopItemLocation N(ItemPositions)[] = { diff --git a/src/world/area_dro/dro_01/dro_01_5_rooms.c b/src/world/area_dro/dro_01/dro_01_5_rooms.c index 0886e2dbcef..2757e8edbb9 100644 --- a/src/world/area_dro/dro_01/dro_01_5_rooms.c +++ b/src/world/area_dro/dro_01/dro_01_5_rooms.c @@ -1,143 +1,143 @@ #include "dro_01.h" EvtScript N(EVS_SetDoorRot_LeftHouse) = { - EVT_CALL(RotateModel, MODEL_doa1, LVar0, 0, 1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_doa1, LVar0, 0, 1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_LeftHouse) = { - EVT_SET(LVar1, LVar0) - EVT_DIVF(LVar1, 50) - EVT_CALL(TranslateModel, MODEL_1_m_kabe, 0, LVar1, 0) - EVT_CALL(TranslateModel, MODEL_mado1, 0, LVar1, 0) - EVT_CALL(RotateModel, MODEL_1_m_kabe, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_mado1, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_1_m_moyou, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_1_m_waku, LVar0, -1, 0, 0) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + DivF(LVar1, 50) + Call(TranslateModel, MODEL_1_m_kabe, 0, LVar1, 0) + Call(TranslateModel, MODEL_mado1, 0, LVar1, 0) + Call(RotateModel, MODEL_1_m_kabe, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_mado1, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_1_m_moyou, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_1_m_waku, LVar0, -1, 0, 0) + Return + End }; EvtScript N(EVS_DropDoor_LeftHouse) = { - EVT_SET(LVar1, LVar0) - EVT_DIVF(LVar1, 50) - EVT_CALL(TranslateModel, MODEL_doa1, 0, LVar1, 0) - EVT_CALL(RotateModel, MODEL_doa1, LVar0, 1, 0, 0) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + DivF(LVar1, 50) + Call(TranslateModel, MODEL_doa1, 0, LVar1, 0) + Call(RotateModel, MODEL_doa1, LVar0, 1, 0, 0) + Return + End }; EvtScript N(EVS_SetDoorRot_Shop) = { - EVT_CALL(RotateModel, MODEL_m_m_doa, LVar0, 0, 1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_m_m_doa, LVar0, 0, 1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_Shop) = { - EVT_SET(LVar1, LVar0) - EVT_DIVF(LVar1, 50) - EVT_CALL(TranslateModel, MODEL_m_m_kabe, 0, LVar1, 0) - EVT_CALL(TranslateModel, MODEL_m_m_mado, 0, LVar1, 0) - EVT_CALL(RotateModel, MODEL_m_m_kabe, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_m_m_mado, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_m_m_hari, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_m_m_moyou, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_m_m_waku, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_m_m_mado2, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_m_m_kabe2, LVar0, -1, 0, 0) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + DivF(LVar1, 50) + Call(TranslateModel, MODEL_m_m_kabe, 0, LVar1, 0) + Call(TranslateModel, MODEL_m_m_mado, 0, LVar1, 0) + Call(RotateModel, MODEL_m_m_kabe, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_m_m_mado, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_m_m_hari, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_m_m_moyou, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_m_m_waku, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_m_m_mado2, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_m_m_kabe2, LVar0, -1, 0, 0) + Return + End }; EvtScript N(EVS_SetDoorRot_RightHouse) = { - EVT_CALL(RotateModel, MODEL_doa2, LVar0, 0, 1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_doa2, LVar0, 0, 1, 0) + Return + End }; EvtScript N(EVS_DropDoor_RightHouse) = { - EVT_SET(LVar1, LVar0) - EVT_DIV(LVar1, 45) - EVT_CALL(TranslateModel, MODEL_doa2, 0, LVar1, 0) - EVT_CALL(RotateModel, MODEL_doa2, LVar0, 1, 0, 0) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + Div(LVar1, 45) + Call(TranslateModel, MODEL_doa2, 0, LVar1, 0) + Call(RotateModel, MODEL_doa2, LVar0, 1, 0, 0) + Return + End }; EvtScript N(EVS_SetWallRot_RightHouse) = { - EVT_IF_EQ(LVar0, 90) - EVT_CALL(EnableModel, MODEL_nuno, FALSE) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_nuno, TRUE) - EVT_END_IF - EVT_SET(LVar1, LVar0) - EVT_DIV(LVar1, 45) - EVT_SET(LVar2, LVar0) - EVT_SUB(LVar2, -90) - EVT_DIV(LVar2, -90) - EVT_CALL(TranslateModel, MODEL_si_ksbe, 0, LVar1, 0) - EVT_CALL(RotateModel, MODEL_si_ksbe, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_ue_waku, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_mado2, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_ue_kabe, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_ue_moyou, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_bou1, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_nuno, LVar0, 1, 0, 0) - EVT_RETURN - EVT_END + IfEq(LVar0, 90) + Call(EnableModel, MODEL_nuno, FALSE) + Else + Call(EnableModel, MODEL_nuno, TRUE) + EndIf + Set(LVar1, LVar0) + Div(LVar1, 45) + Set(LVar2, LVar0) + Sub(LVar2, -90) + Div(LVar2, -90) + Call(TranslateModel, MODEL_si_ksbe, 0, LVar1, 0) + Call(RotateModel, MODEL_si_ksbe, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_ue_waku, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_mado2, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_ue_kabe, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_ue_moyou, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_bou1, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_nuno, LVar0, 1, 0, 0) + Return + End }; EvtScript N(EVS_RoomListener_LeftHouse) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_CALL(SetGroupVisibility, MODEL_ie_naka, TRUE) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_CALL(SetGroupVisibility, MODEL_ie_naka, FALSE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Call(SetGroupVisibility, MODEL_ie_naka, TRUE) + CaseEq(ROOM_UPDATE_EXIT_END) + Call(SetGroupVisibility, MODEL_ie_naka, FALSE) + EndSwitch + Return + End }; EvtScript N(EVS_RoomListener_Shop) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_SPOKE_WITH_SHEEK) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_017B, 160, 40) - EVT_SET(LVar0, -1) - EVT_RETURN - EVT_CASE_LT(STORY_CH2_SHADY_MOUSE_ENTERED_SHOP) - EVT_SET(LVar0, -1) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(SetGroupVisibility, MODEL_mise_naka, MODEL_GROUP_VISIBLE) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_BEGIN) - EVT_THREAD - EVT_WAIT(45) - EVT_CALL(SetNpcPos, NPC_Mouser_ShopOwner, 33, 0, -375) - EVT_CALL(SetNpcYaw, NPC_Mouser_ShopOwner, 180) - EVT_END_THREAD - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_CALL(SetGroupVisibility, MODEL_mise_naka, MODEL_GROUP_HIDDEN) - EVT_SET(AB_DRO_SHOP_PREV1, 0) - EVT_SET(AB_DRO_SHOP_PREV2, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_SPOKE_WITH_SHEEK) + Call(ShowMessageAtScreenPos, MSG_Menus_017B, 160, 40) + Set(LVar0, -1) + Return + CaseLt(STORY_CH2_SHADY_MOUSE_ENTERED_SHOP) + Set(LVar0, -1) + Return + EndSwitch + Call(SetGroupVisibility, MODEL_mise_naka, MODEL_GROUP_VISIBLE) + CaseEq(ROOM_UPDATE_EXIT_BEGIN) + Thread + Wait(45) + Call(SetNpcPos, NPC_Mouser_ShopOwner, 33, 0, -375) + Call(SetNpcYaw, NPC_Mouser_ShopOwner, 180) + EndThread + CaseEq(ROOM_UPDATE_EXIT_END) + Call(SetGroupVisibility, MODEL_mise_naka, MODEL_GROUP_HIDDEN) + Set(AB_DRO_SHOP_PREV1, 0) + Set(AB_DRO_SHOP_PREV2, 0) + EndSwitch + Return + End }; EvtScript N(EVS_RoomListener_RightHouse) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_CALL(SetGroupVisibility, MODEL_ie2_naka, MODEL_GROUP_VISIBLE) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_BEGIN) + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Call(SetGroupVisibility, MODEL_ie2_naka, MODEL_GROUP_VISIBLE) + CaseEq(ROOM_UPDATE_EXIT_BEGIN) // do nothing - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_CALL(SetGroupVisibility, MODEL_ie2_naka, MODEL_GROUP_HIDDEN) - EVT_END_SWITCH - EVT_RETURN - EVT_END + CaseEq(ROOM_UPDATE_EXIT_END) + Call(SetGroupVisibility, MODEL_ie2_naka, MODEL_GROUP_HIDDEN) + EndSwitch + Return + End }; s32 N(InteriorNPCs_LeftHouse)[] = { @@ -156,93 +156,93 @@ s32 N(InteriorNPCs_RightHouse)[] = { }; EvtScript N(EVS_SetupRooms) = { - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_LARGE_DOOR_RIGHT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_LeftHouse)), - EVT_PTR(N(EVS_SetWallRot_LeftHouse)), - EVT_PTR(N(EVS_DropDoor_LeftHouse)), - EVT_PTR(N(EVS_RoomListener_LeftHouse)), + Ref(N(EVS_SetDoorRot_LeftHouse)), + Ref(N(EVS_SetWallRot_LeftHouse)), + Ref(N(EVS_DropDoor_LeftHouse)), + Ref(N(EVS_RoomListener_LeftHouse)), COLLIDER_ei1_1, COLLIDER_ei1_2, MODEL_k_i1, - EVT_PTR(N(InteriorNPCs_LeftHouse))) - EVT_CALL(CreateMapRoom, + Ref(N(InteriorNPCs_LeftHouse))) + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_LARGE_DOOR_RIGHT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_Shop)), - EVT_PTR(N(EVS_SetWallRot_Shop)), + Ref(N(EVS_SetDoorRot_Shop)), + Ref(N(EVS_SetWallRot_Shop)), NULL, - EVT_PTR(N(EVS_RoomListener_Shop)), + Ref(N(EVS_RoomListener_Shop)), COLLIDER_em_1, COLLIDER_em_2, MODEL_k_m1, - EVT_PTR(N(InteriorNPCs_Shop))) - EVT_CALL(CreateMapRoom, + Ref(N(InteriorNPCs_Shop))) + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_LARGE_DOOR_RIGHT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_RightHouse)), - EVT_PTR(N(EVS_SetWallRot_RightHouse)), - EVT_PTR(N(EVS_DropDoor_RightHouse)), - EVT_PTR(N(EVS_RoomListener_RightHouse)), + Ref(N(EVS_SetDoorRot_RightHouse)), + Ref(N(EVS_SetWallRot_RightHouse)), + Ref(N(EVS_DropDoor_RightHouse)), + Ref(N(EVS_RoomListener_RightHouse)), COLLIDER_ei2_1, COLLIDER_ei_2, MODEL_k_i2, - EVT_PTR(N(InteriorNPCs_RightHouse))) - EVT_SET(LVar0, ROOM_UPDATE_EXIT_END) - EVT_EXEC(N(EVS_RoomListener_LeftHouse)) - EVT_EXEC(N(EVS_RoomListener_Shop)) - EVT_EXEC(N(EVS_RoomListener_RightHouse)) - EVT_RETURN - EVT_END + Ref(N(InteriorNPCs_RightHouse))) + Set(LVar0, ROOM_UPDATE_EXIT_END) + Exec(N(EVS_RoomListener_LeftHouse)) + Exec(N(EVS_RoomListener_Shop)) + Exec(N(EVS_RoomListener_RightHouse)) + Return + End }; EvtScript N(EVS_SwingSign_Shop) = { - EVT_LABEL(9) - EVT_CALL(MakeLerp, 10, -10, 30, EASING_COS_IN_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o499, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(MakeLerp, -10, 10, 30, EASING_COS_IN_OUT) - EVT_LABEL(11) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o499, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(11) - EVT_END_IF - EVT_GOTO(9) - EVT_RETURN - EVT_END + Label(9) + Call(MakeLerp, 10, -10, 30, EASING_COS_IN_OUT) + Label(10) + Call(UpdateLerp) + Call(RotateModel, MODEL_o499, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(MakeLerp, -10, 10, 30, EASING_COS_IN_OUT) + Label(11) + Call(UpdateLerp) + Call(RotateModel, MODEL_o499, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(11) + EndIf + Goto(9) + Return + End }; EvtScript N(EVS_OpenShopDoor) = { - EVT_CALL(SetGroupVisibility, MODEL_mise_naka, MODEL_GROUP_VISIBLE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_em_1, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 100, 15, EASING_QUADRATIC_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_EXEC(N(EVS_SetDoorRot_Shop)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetGroupVisibility, MODEL_mise_naka, MODEL_GROUP_VISIBLE) + Call(PlaySoundAtCollider, COLLIDER_em_1, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 100, 15, EASING_QUADRATIC_OUT) + Label(10) + Call(UpdateLerp) + Exec(N(EVS_SetDoorRot_Shop)) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Return + End }; EvtScript N(EVS_CloseShopDoor) = { - EVT_CALL(MakeLerp, 100, 0, 15, EASING_QUADRATIC_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_EXEC(N(EVS_SetDoorRot_Shop)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, COLLIDER_em_1, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetGroupVisibility, MODEL_mise_naka, MODEL_GROUP_HIDDEN) - EVT_RETURN - EVT_END + Call(MakeLerp, 100, 0, 15, EASING_QUADRATIC_OUT) + Label(10) + Call(UpdateLerp) + Exec(N(EVS_SetDoorRot_Shop)) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(PlaySoundAtCollider, COLLIDER_em_1, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Call(SetGroupVisibility, MODEL_mise_naka, MODEL_GROUP_HIDDEN) + Return + End }; diff --git a/src/world/area_dro/dro_01/dro_01_6_entity.c b/src/world/area_dro/dro_01/dro_01_6_entity.c index 851d72c9a5c..77b662ad309 100644 --- a/src/world/area_dro/dro_01/dro_01_6_entity.c +++ b/src/world/area_dro/dro_01/dro_01_6_entity.c @@ -6,26 +6,26 @@ #define NAMESPACE dro_01 EvtScript N(EVS_WarpPipeExit) = { - EVT_SET(GF_DRO01_HeardHintAboutSpinningRoof, FALSE) - EVT_CALL(GotoMap, EVT_PTR("tik_01"), tik_01_ENTRY_4) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Set(GF_DRO01_HeardHintAboutSpinningRoof, FALSE) + Call(GotoMap, Ref("tik_01"), tik_01_ENTRY_4) + Wait(100) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), -211, 60, -50, 30, MAKE_ENTITY_END) - EVT_IF_EQ(GF_DRO01_WarpPipe, FALSE) - EVT_IF_EQ(GF_TIK01_WarpPipes, TRUE) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, dro_01_ENTRY_2) - EVT_SET(GF_DRO01_WarpPipe, TRUE) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueWarpPipe), 430, 0, -120, 0, - dro_01_ENTRY_2, EVT_PTR(N(EVS_WarpPipeExit)), + Call(MakeEntity, Ref(Entity_SavePoint), -211, 60, -50, 30, MAKE_ENTITY_END) + IfEq(GF_DRO01_WarpPipe, FALSE) + IfEq(GF_TIK01_WarpPipes, TRUE) + Call(GetEntryID, LVar0) + IfNe(LVar0, dro_01_ENTRY_2) + Set(GF_DRO01_WarpPipe, TRUE) + EndIf + EndIf + EndIf + Call(MakeEntity, Ref(Entity_BlueWarpPipe), 430, 0, -120, 0, + dro_01_ENTRY_2, Ref(N(EVS_WarpPipeExit)), EVT_INDEX_OF_GAME_FLAG(GF_DRO01_WarpPipe), MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/area_dro/dro_01/dro_01_7_foliage.c b/src/world/area_dro/dro_01/dro_01_7_foliage.c index d6b6ade54d7..a7aafdd6e6a 100644 --- a/src/world/area_dro/dro_01/dro_01_7_foliage.c +++ b/src/world/area_dro/dro_01/dro_01_7_foliage.c @@ -29,9 +29,9 @@ BombTrigger N(BombPos_Tree1) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_yasi, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_yasi, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Return + End }; diff --git a/src/world/area_dro/dro_01/npc_composer.c b/src/world/area_dro/dro_01/npc_composer.c index 80ef7f5212b..772ce651014 100644 --- a/src/world/area_dro/dro_01/npc_composer.c +++ b/src/world/area_dro/dro_01/npc_composer.c @@ -7,73 +7,73 @@ s32 N(LyricsList)[] = { }; EvtScript N(EVS_NpcInteract_Composer) = { - EVT_IF_EQ(GF_DRO01_Gift_Melody, TRUE) - EVT_CALL(FindKeyItem, ITEM_MELODY, LVar0) - EVT_IF_NE(LVar0, -1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_0084) - EVT_RETURN - EVT_ELSE - EVT_IF_EQ(GF_DRO01_Gift_ToldComposerAboutMelody, FALSE) - EVT_IF_LT(GB_StoryProgress, STORY_CH7_BEGAN_PEACH_MISSION) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_0085) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_WAIT(30) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_0086) - EVT_SET(GF_DRO01_Gift_ToldComposerAboutMelody, TRUE) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(AF_DRO_DialogueToggle_Composer, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_007C) - EVT_SET(AF_DRO_DialogueToggle_Composer, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_007D) - EVT_SET(AF_DRO_DialogueToggle_Composer, FALSE) - EVT_END_IF - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(AF_DRO_DialogueToggle_Composer, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_007E) - EVT_SET(AF_DRO_DialogueToggle_Composer, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_007F) - EVT_SET(AF_DRO_DialogueToggle_Composer, FALSE) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_IF_EQ(AF_DRO_DialogueToggle_Composer, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_0080) - EVT_SET(AF_DRO_DialogueToggle_Composer, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_0081) - EVT_SET(AF_DRO_DialogueToggle_Composer, FALSE) - EVT_END_IF - EVT_END_SWITCH - EVT_SET(LVar0, EVT_PTR(N(LyricsList))) - EVT_SET(LVar1, 5) - EVT_EXEC_WAIT(N(EVS_ChooseKeyItem)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CASE_EQ(-1) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_0082) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Musician_Composer_Write) - EVT_WAIT(60) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Musician_Composer_Idle) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_0083) + IfEq(GF_DRO01_Gift_Melody, TRUE) + Call(FindKeyItem, ITEM_MELODY, LVar0) + IfNe(LVar0, -1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_0084) + Return + Else + IfEq(GF_DRO01_Gift_ToldComposerAboutMelody, FALSE) + IfLt(GB_StoryProgress, STORY_CH7_BEGAN_PEACH_MISSION) + Call(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_0085) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + Wait(30) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_0086) + Set(GF_DRO01_Gift_ToldComposerAboutMelody, TRUE) + Return + EndIf + EndIf + EndIf + EndIf + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(AF_DRO_DialogueToggle_Composer, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_007C) + Set(AF_DRO_DialogueToggle_Composer, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_007D) + Set(AF_DRO_DialogueToggle_Composer, FALSE) + EndIf + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + IfEq(AF_DRO_DialogueToggle_Composer, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_007E) + Set(AF_DRO_DialogueToggle_Composer, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_007F) + Set(AF_DRO_DialogueToggle_Composer, FALSE) + EndIf + CaseDefault + IfEq(AF_DRO_DialogueToggle_Composer, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_0080) + Set(AF_DRO_DialogueToggle_Composer, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_0081) + Set(AF_DRO_DialogueToggle_Composer, FALSE) + EndIf + EndSwitch + Set(LVar0, Ref(N(LyricsList))) + Set(LVar1, 5) + ExecWait(N(EVS_ChooseKeyItem)) + Switch(LVar0) + CaseEq(0) + CaseEq(-1) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_0082) + Call(SetNpcAnimation, NPC_SELF, ANIM_Musician_Composer_Write) + Wait(60) + Call(SetNpcAnimation, NPC_SELF, ANIM_Musician_Composer_Idle) + Call(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 0, MSG_CH2_0083) EVT_GIVE_KEY_REWARD(ITEM_MELODY) - EVT_SET(GF_DRO01_Gift_Melody, TRUE) - EVT_RETURN - EVT_END_SWITCH - EVT_RETURN - EVT_END + Set(GF_DRO01_Gift_Melody, TRUE) + Return + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Composer) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Composer))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Composer))) + Return + End }; diff --git a/src/world/area_dro/dro_01/npc_hint_dryite.c b/src/world/area_dro/dro_01/npc_hint_dryite.c index 825ea03d900..73132b37a48 100644 --- a/src/world/area_dro/dro_01/npc_hint_dryite.c +++ b/src/world/area_dro/dro_01/npc_hint_dryite.c @@ -18,53 +18,53 @@ API_CALLABLE(N(GetFloorCollider)) { } EvtScript N(EVS_Scene_TreeOrbitReaction) = { - EVT_LOOP(0) - EVT_CALL(N(GetFloorCollider), LVar0) - EVT_IF_EQ(LVar0, COLLIDER_ground) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(func_802CF56C, 1) - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(func_802CF56C, 0) - EVT_CALL(NpcFacePlayer, NPC_PARTNER, 0) - EVT_END_THREAD - EVT_CALL(PlayerFaceNpc, NPC_Dryite_03, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0078) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Dryite_03, LVar3, LVar4, LVar5) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_ADDF(LVar0, LVar3) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_DIVF(LVar0, EVT_FLOAT(2.0)) - EVT_DIVF(LVar1, EVT_FLOAT(2.0)) - EVT_DIVF(LVar2, EVT_FLOAT(2.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(-300.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0079) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(30) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_007A) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(N(SaveSpinningRoofHintTime)) - EVT_SET(GF_DRO01_HeardHintAboutSpinningRoof, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Loop(0) + Call(N(GetFloorCollider), LVar0) + IfEq(LVar0, COLLIDER_ground) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(DisablePlayerInput, TRUE) + Call(func_802CF56C, 1) + Thread + Wait(20) + Call(func_802CF56C, 0) + Call(NpcFacePlayer, NPC_PARTNER, 0) + EndThread + Call(PlayerFaceNpc, NPC_Dryite_03, FALSE) + Call(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0078) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Dryite_03, LVar3, LVar4, LVar5) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + AddF(LVar0, LVar3) + AddF(LVar1, LVar4) + AddF(LVar2, LVar5) + DivF(LVar0, Float(2.0)) + DivF(LVar1, Float(2.0)) + DivF(LVar2, Float(2.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(-300.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0079) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(30) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_007A) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(N(SaveSpinningRoofHintTime)) + Set(GF_DRO01_HeardHintAboutSpinningRoof, TRUE) + Call(DisablePlayerInput, FALSE) + Return + End }; void N(red_tree_orbit_listener)(PlayerOrbitState* orbit, s32 event) { @@ -113,57 +113,57 @@ PlayerOrbitTarget N(RunAroundTarget) = { }; EvtScript N(EVS_NpcInteract_HintDryite) = { - EVT_IF_EQ(GF_MAC01_Merlon_HeardAboutDream, TRUE) - EVT_IF_EQ(GF_DRO01_HeardHintAboutSpinningRoof, TRUE) + IfEq(GF_MAC01_Merlon_HeardAboutDream, TRUE) + IfEq(GF_DRO01_HeardHintAboutSpinningRoof, TRUE) // in case the player forgets, remind them after a half hour - EVT_CALL(N(HasBeenHalfHourSinceTreeOrbit)) - EVT_IF_EQ(LVar0, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_007B) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(AF_DRO_01, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_006C) - EVT_CALL(SpeakToPlayer, NPC_Dryite_04, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_006D) - EVT_CALL(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_006E) - EVT_SET(AF_DRO_01, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_006F) - EVT_CALL(SpeakToPlayer, NPC_Dryite_04, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0070) - EVT_CALL(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0071) - EVT_SET(AF_DRO_01, FALSE) - EVT_END_IF - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0072) - EVT_CALL(SpeakToPlayer, NPC_Dryite_04, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0073) - EVT_CALL(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0074) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0075) - EVT_CALL(SpeakToPlayer, NPC_Dryite_04, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0076) - EVT_CALL(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0077) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(N(HasBeenHalfHourSinceTreeOrbit)) + IfEq(LVar0, TRUE) + Call(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_007B) + Return + EndIf + EndIf + EndIf + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(AF_DRO_01, FALSE) + Call(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_006C) + Call(SpeakToPlayer, NPC_Dryite_04, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_006D) + Call(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_006E) + Set(AF_DRO_01, TRUE) + Else + Call(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_006F) + Call(SpeakToPlayer, NPC_Dryite_04, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0070) + Call(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0071) + Set(AF_DRO_01, FALSE) + EndIf + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0072) + Call(SpeakToPlayer, NPC_Dryite_04, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0073) + Call(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0074) + CaseDefault + Call(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0075) + Call(SpeakToPlayer, NPC_Dryite_04, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0076) + Call(SpeakToPlayer, NPC_Dryite_03, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_0077) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_HintDryite) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(dro_01_ENTRY_3) - EVT_CASE_OR_EQ(dro_01_ENTRY_4) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Dryite_Green_Talk) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_HintDryite))) - EVT_IF_EQ(GF_MAC01_Merlon_HeardAboutDream, TRUE) - EVT_THREAD - EVT_CALL(N(MonitorPlayerOrbiting), EVT_PTR(N(RunAroundTarget))) - EVT_END_THREAD - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseOrEq(dro_01_ENTRY_3) + CaseOrEq(dro_01_ENTRY_4) + Call(SetNpcAnimation, NPC_SELF, ANIM_Dryite_Green_Talk) + Return + EndCaseGroup + EndSwitch + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_HintDryite))) + IfEq(GF_MAC01_Merlon_HeardAboutDream, TRUE) + Thread + Call(N(MonitorPlayerOrbiting), Ref(N(RunAroundTarget))) + EndThread + EndIf + Return + End }; diff --git a/src/world/area_dro/dro_01/npc_hint_dryite_companion.c b/src/world/area_dro/dro_01/npc_hint_dryite_companion.c index d8310cecb83..764fcb1a16d 100644 --- a/src/world/area_dro/dro_01/npc_hint_dryite_companion.c +++ b/src/world/area_dro/dro_01/npc_hint_dryite_companion.c @@ -25,36 +25,36 @@ API_CALLABLE(N(GetRunToPos)) { // run away from, the player, orbiting around the hint-giving dryite EvtScript N(EVS_NpcInteract_Dryite_04) = { - EVT_CHILD_THREAD - EVT_LOOP(0) - EVT_CALL(NpcFaceNpc, NPC_Dryite_03, NPC_Dryite_04, 1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(N(GetRunToPos)) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Dryite_Green_Run) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(3.5)) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, LVar1, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Dryite_Green_Idle) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_WAIT(5) - EVT_CALL(GetNpcYaw, NPC_SELF, LVar0) - EVT_ADD(LVar0, 180) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 0) - EVT_RETURN - EVT_END + ChildThread + Loop(0) + Call(NpcFaceNpc, NPC_Dryite_03, NPC_Dryite_04, 1) + EndLoop + EndChildThread + Call(N(GetRunToPos)) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Dryite_Green_Run) + Call(SetNpcSpeed, NPC_SELF, Float(3.5)) + Call(NpcMoveTo, NPC_SELF, LVar0, LVar1, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Dryite_Green_Idle) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Wait(5) + Call(GetNpcYaw, NPC_SELF, LVar0) + Add(LVar0, 180) + Call(InterpNpcYaw, NPC_SELF, LVar0, 0) + Return + End }; EvtScript N(EVS_NpcInit_Dryite_04) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(dro_01_ENTRY_3) - EVT_CASE_OR_EQ(dro_01_ENTRY_4) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Dryite_Green_Talk) - EVT_RETURN - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Dryite_04))) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseOrEq(dro_01_ENTRY_3) + CaseOrEq(dro_01_ENTRY_4) + Call(SetNpcAnimation, NPC_SELF, ANIM_Dryite_Green_Talk) + Return + EndCaseGroup + EndSwitch + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Dryite_04))) + Return + End }; diff --git a/src/world/area_dro/dro_01/npc_shop_owner.c b/src/world/area_dro/dro_01/npc_shop_owner.c index 7a82e821afc..98374480c95 100644 --- a/src/world/area_dro/dro_01/npc_shop_owner.c +++ b/src/world/area_dro/dro_01/npc_shop_owner.c @@ -19,106 +19,106 @@ API_CALLABLE(N(AwaitPlayerApproachShop)) { } EvtScript N(EVS_NpcIdle_ShopOwner) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_SHADY_MOUSE_LEFT_SHOP) - EVT_CALL(N(AwaitPlayerApproachShop), 16, 190, -134, -131) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, 0, 0, -180) - EVT_EXEC_WAIT(N(EVS_OpenShopDoor)) - EVT_WAIT(10 * DT) - EVT_CALL(GetPlayerPos, LVarA, LVarB, LVarC) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVarA, LVarB, LVarC) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 32, 0, -67) - EVT_CALL(SetCamDistance, CAM_DEFAULT, -210) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 20, -12) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(20 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVarA, LVarB, LVarC) - EVT_CALL(SetCamDistance, CAM_DEFAULT, -350) + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_SHADY_MOUSE_LEFT_SHOP) + Call(N(AwaitPlayerApproachShop), 16, 190, -134, -131) + Call(DisablePlayerInput, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcPos, NPC_SELF, 0, 0, -180) + ExecWait(N(EVS_OpenShopDoor)) + Wait(10 * DT) + Call(GetPlayerPos, LVarA, LVarB, LVarC) + Call(UseSettingsFrom, CAM_DEFAULT, LVarA, LVarB, LVarC) + Call(SetPanTarget, CAM_DEFAULT, 32, 0, -67) + Call(SetCamDistance, CAM_DEFAULT, -210) + Call(SetCamPitch, CAM_DEFAULT, 20, -12) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(20 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, LVarA, LVarB, LVarC) + Call(SetCamDistance, CAM_DEFAULT, -350) #if VERSION_PAL - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(0.961)) + Call(SetCamSpeed, 0, Float(0.961)) #else - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.8)) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.8)) #endif - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Run) - EVT_CALL(NpcMoveTo, NPC_SELF, -23, -105, 20) - EVT_WAIT(10 * DT) - EVT_CALL(InterpNpcYaw, NPC_SELF, 65, 0) - EVT_WAIT(10 * DT) - EVT_EXEC_WAIT(N(EVS_CloseShopDoor)) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Run) - EVT_CALL(NpcMoveTo, NPC_SELF, 37, -27, 20 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVarA, LVarB, LVarC) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 142, 0, -67) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(NpcMoveTo, NPC_SELF, 62, -6, 20 * DT) - EVT_CALL(NpcMoveTo, NPC_SELF, 103, 11, 20 * DT) - EVT_CALL(NpcMoveTo, NPC_SELF, 150, 18, 20 * DT) - EVT_CALL(EnableNpcBlur, NPC_SELF, TRUE) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_RUN_AWAY, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcMoveTo, NPC_SELF, 554, -12, 20 * DT) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_WAIT(30 * DT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_SET(GB_StoryProgress, STORY_CH2_SHADY_MOUSE_LEFT_SHOP) - EVT_CASE_LT(STORY_CH2_SPOKE_WITH_SHEEK) - EVT_CASE_LT(STORY_CH2_SHADY_MOUSE_ENTERED_SHOP) - EVT_CALL(EnableNpcBlur, NPC_SELF, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Run) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_RUN_AWAY, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcPos, NPC_SELF, 470, 0, 18) - EVT_CALL(NpcMoveTo, NPC_SELF, 287, 9, 20 * DT) - EVT_CALL(NpcMoveTo, NPC_SELF, 102, -14, 20 * DT) - EVT_CALL(NpcMoveTo, NPC_SELF, -32, -96, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Idle) - EVT_EXEC_WAIT(N(EVS_OpenShopDoor)) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Run) - EVT_CALL(NpcMoveTo, NPC_SELF, 20, -375, 30 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Idle) - EVT_EXEC_WAIT(N(EVS_CloseShopDoor)) - EVT_CALL(EnableNpcBlur, NPC_SELF, FALSE) - EVT_SET(GB_StoryProgress, STORY_CH2_SHADY_MOUSE_ENTERED_SHOP) - EVT_CASE_DEFAULT - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Idle) - EVT_CALL(SetNpcPos, NPC_SELF, 20, 0, -375) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Run) + Call(NpcMoveTo, NPC_SELF, -23, -105, 20) + Wait(10 * DT) + Call(InterpNpcYaw, NPC_SELF, 65, 0) + Wait(10 * DT) + ExecWait(N(EVS_CloseShopDoor)) + Call(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Run) + Call(NpcMoveTo, NPC_SELF, 37, -27, 20 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, LVarA, LVarB, LVarC) + Call(SetPanTarget, CAM_DEFAULT, 142, 0, -67) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(NpcMoveTo, NPC_SELF, 62, -6, 20 * DT) + Call(NpcMoveTo, NPC_SELF, 103, 11, 20 * DT) + Call(NpcMoveTo, NPC_SELF, 150, 18, 20 * DT) + Call(EnableNpcBlur, NPC_SELF, TRUE) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_RUN_AWAY, SOUND_SPACE_DEFAULT) + Call(NpcMoveTo, NPC_SELF, 554, -12, 20 * DT) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Wait(30 * DT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Set(GB_StoryProgress, STORY_CH2_SHADY_MOUSE_LEFT_SHOP) + CaseLt(STORY_CH2_SPOKE_WITH_SHEEK) + CaseLt(STORY_CH2_SHADY_MOUSE_ENTERED_SHOP) + Call(EnableNpcBlur, NPC_SELF, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Run) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_RUN_AWAY, SOUND_SPACE_DEFAULT) + Call(SetNpcPos, NPC_SELF, 470, 0, 18) + Call(NpcMoveTo, NPC_SELF, 287, 9, 20 * DT) + Call(NpcMoveTo, NPC_SELF, 102, -14, 20 * DT) + Call(NpcMoveTo, NPC_SELF, -32, -96, 20 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Idle) + ExecWait(N(EVS_OpenShopDoor)) + Call(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Run) + Call(NpcMoveTo, NPC_SELF, 20, -375, 30 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Idle) + ExecWait(N(EVS_CloseShopDoor)) + Call(EnableNpcBlur, NPC_SELF, FALSE) + Set(GB_StoryProgress, STORY_CH2_SHADY_MOUSE_ENTERED_SHOP) + CaseDefault + Call(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Idle) + Call(SetNpcPos, NPC_SELF, 20, 0, -375) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_ShopOwner) = { - EVT_IF_EQ(AB_DRO_SHOP_PREV1, 4) - EVT_IF_EQ(AB_DRO_SHOP_PREV2, 1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Purple_Talk, ANIM_Mouser_Purple_Idle, 0, MSG_CH2_0088) - EVT_EXEC_WAIT(N(EVS_LetterPrompt_ShopOwner)) - EVT_IF_NE(LVarC, DELIVERY_NOT_POSSIBLE) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_EXEC_WAIT(EVS_ShopOwnerDialog) - EVT_EXEC_WAIT(N(EVS_LetterPrompt_ShopOwner)) - EVT_IF_NE(LVarC, DELIVERY_NOT_POSSIBLE) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(AB_DRO_SHOP_PREV1, 4) + IfEq(AB_DRO_SHOP_PREV2, 1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Purple_Talk, ANIM_Mouser_Purple_Idle, 0, MSG_CH2_0088) + ExecWait(N(EVS_LetterPrompt_ShopOwner)) + IfNe(LVarC, DELIVERY_NOT_POSSIBLE) + Return + EndIf + Return + EndIf + EndIf + ExecWait(EVS_ShopOwnerDialog) + ExecWait(N(EVS_LetterPrompt_ShopOwner)) + IfNe(LVarC, DELIVERY_NOT_POSSIBLE) + Return + EndIf + Return + End }; EvtScript N(EVS_NpcInit_ShopOwner) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_ShopOwner))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ShopOwner))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_ShopOwner))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ShopOwner))) + Return + End }; diff --git a/src/world/area_dro/dro_02/dro_02_1_music.c b/src/world/area_dro/dro_02/dro_02_1_music.c index 9b2b2f62966..faa47ff0ab8 100644 --- a/src/world/area_dro/dro_02/dro_02_1_music.c +++ b/src/world/area_dro/dro_02/dro_02_1_music.c @@ -1,27 +1,27 @@ #include "dro_02.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(dro_02_ENTRY_2) - EVT_CASE_OR_EQ(dro_02_ENTRY_3) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_OUTPOST, 0, 8) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseOrEq(dro_02_ENTRY_2) + CaseOrEq(dro_02_ENTRY_3) + EndCaseGroup + CaseDefault + Call(SetMusicTrack, 0, SONG_DRY_DRY_OUTPOST, 0, 8) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_PlayRestMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_TAKING_REST, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TAKING_REST, 0, 8) + Return + End }; EvtScript N(EVS_PlayMoustafaMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_MOUSTAFA_THEME, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_MOUSTAFA_THEME, 0, 8) + Return + End }; diff --git a/src/world/area_dro/dro_02/dro_02_2_entity.c b/src/world/area_dro/dro_02/dro_02_2_entity.c index 9d500ae7d02..c61ee213afa 100644 --- a/src/world/area_dro/dro_02/dro_02_2_entity.c +++ b/src/world/area_dro/dro_02/dro_02_2_entity.c @@ -2,9 +2,9 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_LETTER_TO_NOMADIMOUSE, -135, 160, -245, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_DRO02_Item_Letter08) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 180, 173, -200, 0, MODEL_1_yane, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_DRO02_HiddenPanel) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_LETTER_TO_NOMADIMOUSE, -135, 160, -245, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_DRO02_Item_Letter08) + Call(MakeEntity, Ref(Entity_HiddenPanel), 180, 173, -200, 0, MODEL_1_yane, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_DRO02_HiddenPanel) + Return + End }; diff --git a/src/world/area_dro/dro_02/dro_02_3_main.c b/src/world/area_dro/dro_02/dro_02_3_main.c index 1ee3d10767f..592c3b0a5e1 100644 --- a/src/world/area_dro/dro_02/dro_02_3_main.c +++ b/src/world/area_dro/dro_02/dro_02_3_main.c @@ -5,94 +5,94 @@ EvtScript N(EVS_ExitWalk_dro_01_1) = EVT_EXIT_WALK(60, dro_02_ENTRY_0, "dro_01", dro_01_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_dro_01_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_dro_01_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + Return + End }; EvtScript N(EVS_OnReadPoster) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_017C, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_017C, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_EnterScene) = { - EVT_CALL(PlaySound, SOUND_LOOP_SBK_RUINS_RISING_DISTANT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 190, 0, -37) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 190, 0, -37) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(200.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(13.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(N(SetModelTintMode), APPLY_TINT_BG, NULL, ENV_TINT_REMAP) - EVT_CALL(N(SetModelTintMode), APPLY_TINT_GROUPS, -1, ENV_TINT_REMAP) - EVT_CALL(N(SetModelTintParams), ENV_TINT_REMAP, 44, 32, 177, 0, 0, 0, 0, 0, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 300, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(60) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, dro_02_ENTRY_2) - EVT_CALL(GotoMap, EVT_PTR("sbk_02"), sbk_02_ENTRY_6) - EVT_ELSE - EVT_CALL(GotoMap, EVT_PTR("sbk_02"), sbk_02_ENTRY_7) - EVT_END_IF - EVT_WAIT(100) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(PlaySound, SOUND_LOOP_SBK_RUINS_RISING_DISTANT) + Call(UseSettingsFrom, CAM_DEFAULT, 190, 0, -37) + Call(SetPanTarget, CAM_DEFAULT, 190, 0, -37) + Call(SetCamDistance, CAM_DEFAULT, Float(200.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(13.0), Float(-10.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(N(SetModelTintMode), APPLY_TINT_BG, NULL, ENV_TINT_REMAP) + Call(N(SetModelTintMode), APPLY_TINT_GROUPS, -1, ENV_TINT_REMAP) + Call(N(SetModelTintParams), ENV_TINT_REMAP, 44, 32, 177, 0, 0, 0, 0, 0, 0) + Call(DisablePlayerInput, TRUE) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 300, Float(0.2)) + EndThread + Thread + Wait(60) + Call(GetEntryID, LVar0) + IfEq(LVar0, dro_02_ENTRY_2) + Call(GotoMap, Ref("sbk_02"), sbk_02_ENTRY_6) + Else + Call(GotoMap, Ref("sbk_02"), sbk_02_ENTRY_7) + EndIf + Wait(100) + EndThread + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_OUTPOST) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(InitVirtualEntityList) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupRooms)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(dro_02_ENTRY_2) - EVT_CASE_OR_EQ(dro_02_ENTRY_3) - EVT_EXEC_WAIT(N(EVS_EnterScene)) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_THREAD - EVT_CALL(SetTexPanner, MODEL_kemuri, 1) - EVT_SET(LVar0, 0) - EVT_LABEL(123) - EVT_ADD(LVar0, 420) - EVT_IF_GT(LVar0, 0x10000) - EVT_ADD(LVar0, -0x10000) - EVT_END_IF - EVT_CALL(SetTexPanOffset, 1, 0, 0, LVar0) - EVT_WAIT(1) - EVT_GOTO(123) - EVT_END_THREAD - EVT_SET(MF_Unk_00, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnReadPoster)), TRIGGER_WALL_PRESS_A, COLLIDER_poster, 1, 0) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar2, -200) - EVT_CALL(EnableGroup, MODEL_mazinai, TRUE) - EVT_ELSE - EVT_CALL(EnableGroup, MODEL_mazinai, FALSE) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.334)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_OUTPOST) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(InitVirtualEntityList) + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupRooms)) + Exec(N(EVS_SetupMusic)) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseOrEq(dro_02_ENTRY_2) + CaseOrEq(dro_02_ENTRY_3) + ExecWait(N(EVS_EnterScene)) + EndCaseGroup + CaseDefault + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Wait(1) + Thread + Call(SetTexPanner, MODEL_kemuri, 1) + Set(LVar0, 0) + Label(123) + Add(LVar0, 420) + IfGt(LVar0, 0x10000) + Add(LVar0, -0x10000) + EndIf + Call(SetTexPanOffset, 1, 0, 0, LVar0) + Wait(1) + Goto(123) + EndThread + Set(MF_Unk_00, FALSE) + BindTrigger(Ref(N(EVS_OnReadPoster)), TRIGGER_WALL_PRESS_A, COLLIDER_poster, 1, 0) + Thread + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar2, -200) + Call(EnableGroup, MODEL_mazinai, TRUE) + Else + Call(EnableGroup, MODEL_mazinai, FALSE) + EndIf + Wait(1) + EndLoop + EndThread + Call(SetCamSpeed, CAM_DEFAULT, Float(1.334)) + Return + End }; diff --git a/src/world/area_dro/dro_02/dro_02_4_rooms.c b/src/world/area_dro/dro_02/dro_02_4_rooms.c index 5aa79810c66..908bdd910f2 100644 --- a/src/world/area_dro/dro_02/dro_02_4_rooms.c +++ b/src/world/area_dro/dro_02/dro_02_4_rooms.c @@ -1,199 +1,199 @@ #include "dro_02.h" EvtScript N(EVS_SwingToadHouseSign) = { - EVT_LABEL(9) - EVT_CALL(MakeLerp, 10, -10, 30, EASING_COS_IN_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o852, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(MakeLerp, -10, 10, 30, EASING_COS_IN_OUT) - EVT_LABEL(11) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o852, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(11) - EVT_END_IF - EVT_GOTO(9) - EVT_RETURN - EVT_END + Label(9) + Call(MakeLerp, 10, -10, 30, EASING_COS_IN_OUT) + Label(10) + Call(UpdateLerp) + Call(RotateModel, MODEL_o852, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(MakeLerp, -10, 10, 30, EASING_COS_IN_OUT) + Label(11) + Call(UpdateLerp) + Call(RotateModel, MODEL_o852, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(11) + EndIf + Goto(9) + Return + End }; EvtScript N(EVS_UnusedDoorSetup) = { - EVT_DIV(LVar0, 2) - EVT_ADD(LVar0, 18) - EVT_CALL(RotateModel, MODEL_1_doa, LVar0, 0, 1, 0) - EVT_RETURN - EVT_END + Div(LVar0, 2) + Add(LVar0, 18) + Call(RotateModel, MODEL_1_doa, LVar0, 0, 1, 0) + Return + End }; EvtScript N(EVS_SetDoorRot_Hideout) = { - EVT_CALL(RotateModel, MODEL_o769, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o770, LVar0, 0, 1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o769, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_o770, LVar0, 0, 1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_Hideout) = { - EVT_SET(LVar1, LVar0) - EVT_DIVF(LVar1, 50) - EVT_CALL(TranslateModel, MODEL_6_kabe, 0, LVar1, 0) - EVT_CALL(TranslateModel, MODEL_6_waku, 0, LVar1, 0) - EVT_CALL(TranslateModel, MODEL_6_moyou, 0, LVar1, 0) - EVT_CALL(RotateModel, MODEL_6_kabe, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_6_waku, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_6_moyou, LVar0, 1, 0, 0) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + DivF(LVar1, 50) + Call(TranslateModel, MODEL_6_kabe, 0, LVar1, 0) + Call(TranslateModel, MODEL_6_waku, 0, LVar1, 0) + Call(TranslateModel, MODEL_6_moyou, 0, LVar1, 0) + Call(RotateModel, MODEL_6_kabe, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_6_waku, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_6_moyou, LVar0, 1, 0, 0) + Return + End }; EvtScript N(EVS_DropDoor_Hideout) = { - EVT_SET(LVar1, LVar0) - EVT_DIVF(LVar1, 50) - EVT_CALL(TranslateModel, MODEL_o769, 0, LVar1, 0) - EVT_CALL(TranslateModel, MODEL_o770, 0, LVar1, 0) - EVT_CALL(RotateModel, MODEL_o769, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o770, LVar0, 1, 0, 0) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + DivF(LVar1, 50) + Call(TranslateModel, MODEL_o769, 0, LVar1, 0) + Call(TranslateModel, MODEL_o770, 0, LVar1, 0) + Call(RotateModel, MODEL_o769, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o770, LVar0, 1, 0, 0) + Return + End }; EvtScript N(EVS_SetDoorRot_ToadHouse) = { - EVT_CALL(RotateModel, MODEL_4_doa, LVar0, 0, 1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_4_doa, LVar0, 0, 1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_ToadHouse) = { - EVT_SET(LVar1, LVar0) - EVT_DIVF(LVar1, 50) - EVT_CALL(RotateGroup, MODEL_mobe, LVar0, 0, 0, -1) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + DivF(LVar1, 50) + Call(RotateGroup, MODEL_mobe, LVar0, 0, 0, -1) + Return + End }; EvtScript N(EVS_SetupCamSpeed) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CASE_EQ(3) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.334)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(0) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + CaseEq(3) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.334)) + EndSwitch + Return + End }; EvtScript N(EVS_RoomListener_ToadHouse) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_CALL(SetGroupVisibility, MODEL_ie4_naka, MODEL_GROUP_VISIBLE) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_CALL(SetGroupVisibility, MODEL_ie4_naka, MODEL_GROUP_HIDDEN) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.334)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Call(SetGroupVisibility, MODEL_ie4_naka, MODEL_GROUP_VISIBLE) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + CaseEq(ROOM_UPDATE_EXIT_END) + Call(SetGroupVisibility, MODEL_ie4_naka, MODEL_GROUP_HIDDEN) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.334)) + EndSwitch + Return + End }; EvtScript N(EVS_RoomListener_Hideout) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_CALL(SetGroupVisibility, MODEL_ie5_naka, MODEL_GROUP_VISIBLE) - EVT_CALL(SetCamType, CAM_DEFAULT, 0, FALSE) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 260) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 22, -13) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 290) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -290) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -395, 140, -150) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_BEGIN) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -365, 140, -145) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 20, -7) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 400) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_CALL(SetGroupVisibility, MODEL_ie5_naka, MODEL_GROUP_HIDDEN) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.334)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Call(SetGroupVisibility, MODEL_ie5_naka, MODEL_GROUP_VISIBLE) + Call(SetCamType, CAM_DEFAULT, 0, FALSE) + Call(SetCamDistance, CAM_DEFAULT, 260) + Call(SetCamPitch, CAM_DEFAULT, 22, -13) + Call(SetCamPosA, CAM_DEFAULT, 0, 290) + Call(SetCamPosB, CAM_DEFAULT, 0, -290) + Call(SetCamPosC, CAM_DEFAULT, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, -395, 140, -150) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + CaseEq(ROOM_UPDATE_EXIT_BEGIN) + Call(SetPanTarget, CAM_DEFAULT, -365, 140, -145) + Call(SetCamPitch, CAM_DEFAULT, 20, -7) + Call(SetCamDistance, CAM_DEFAULT, 400) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + CaseEq(ROOM_UPDATE_EXIT_END) + Call(SetGroupVisibility, MODEL_ie5_naka, MODEL_GROUP_HIDDEN) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.334)) + EndSwitch + Return + End }; EvtScript N(EVS_OpenSecretDoor_FromOutside) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(func_802D2C14, 1) - EVT_CALL(PlayerMoveTo, 230, 10, 20) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1287, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o1287, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 18, 80, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_1_doa, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlayerMoveTo, 230, -70, 15) - EVT_CALL(MakeLerp, 80, 18, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_1_doa, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_o1287, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o1287, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(func_802D2C14, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(DisablePlayerInput, TRUE) + Call(func_802D2C14, 1) + Call(PlayerMoveTo, 230, 10, 20) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1287, COLLIDER_FLAGS_UPPER_MASK) + Call(PlaySoundAtCollider, COLLIDER_o1287, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 18, 80, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_1_doa, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlayerMoveTo, 230, -70, 15) + Call(MakeLerp, 80, 18, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_1_doa, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_o1287, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o1287, COLLIDER_FLAGS_UPPER_MASK) + Call(func_802D2C14, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_OpenSecretDoor_FromInside) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(func_802D2C14, 1) - EVT_CALL(PlayerMoveTo, 230, -70, 20) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1289, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o1289, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 18, 80, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_1_doa, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlayerMoveTo, 230, 10, 15) - EVT_CALL(MakeLerp, 80, 18, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_1_doa, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_o1289, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o1289, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(func_802D2C14, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(DisablePlayerInput, TRUE) + Call(func_802D2C14, 1) + Call(PlayerMoveTo, 230, -70, 20) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1289, COLLIDER_FLAGS_UPPER_MASK) + Call(PlaySoundAtCollider, COLLIDER_o1289, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 18, 80, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_1_doa, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlayerMoveTo, 230, 10, 15) + Call(MakeLerp, 80, 18, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_1_doa, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_o1289, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o1289, COLLIDER_FLAGS_UPPER_MASK) + Call(func_802D2C14, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; s32 N(InsideNPCs_Hideout)[] = { @@ -208,40 +208,40 @@ s32 N(InsideNPCs_ToadHouse)[] = { }; EvtScript N(EVS_SetupRooms) = { - EVT_EXEC(N(EVS_SwingToadHouseSign)) - EVT_CALL(ParentColliderToModel, COLLIDER_o1287, MODEL_1_doa) - EVT_IF_GE(GB_StoryProgress, STORY_CH2_BOUGHT_SECRET_ITEMS) - EVT_CALL(RotateModel, MODEL_1_doa, 18, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o1287) - EVT_END_IF - EVT_CALL(CreateMapRoom, + Exec(N(EVS_SwingToadHouseSign)) + Call(ParentColliderToModel, COLLIDER_o1287, MODEL_1_doa) + IfGe(GB_StoryProgress, STORY_CH2_BOUGHT_SECRET_ITEMS) + Call(RotateModel, MODEL_1_doa, 18, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_o1287) + EndIf + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_STRAIGHT_THROUGH), - EVT_PTR(N(EVS_SetDoorRot_Hideout)), - EVT_PTR(N(EVS_SetWallRot_Hideout)), - EVT_PTR(N(EVS_DropDoor_Hideout)), - EVT_PTR(N(EVS_RoomListener_Hideout)), + Ref(N(EVS_SetDoorRot_Hideout)), + Ref(N(EVS_SetWallRot_Hideout)), + Ref(N(EVS_DropDoor_Hideout)), + Ref(N(EVS_RoomListener_Hideout)), COLLIDER_o1252, COLLIDER_o1253, MODEL_k_i5, - EVT_PTR(N(InsideNPCs_Hideout))) - EVT_IF_GE(GB_StoryProgress, STORY_CH2_BOUGHT_SECRET_ITEMS) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OpenSecretDoor_FromOutside)), TRIGGER_WALL_PRESS_A, COLLIDER_o1287, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OpenSecretDoor_FromInside)), TRIGGER_WALL_PRESS_A, COLLIDER_o1289, 1, 0) - EVT_END_IF - EVT_CALL(CreateMapRoom, + Ref(N(InsideNPCs_Hideout))) + IfGe(GB_StoryProgress, STORY_CH2_BOUGHT_SECRET_ITEMS) + BindTrigger(Ref(N(EVS_OpenSecretDoor_FromOutside)), TRIGGER_WALL_PRESS_A, COLLIDER_o1287, 1, 0) + BindTrigger(Ref(N(EVS_OpenSecretDoor_FromInside)), TRIGGER_WALL_PRESS_A, COLLIDER_o1289, 1, 0) + EndIf + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_1, ROOM_LARGE_DOOR_RIGHT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_ToadHouse)), - EVT_PTR(N(EVS_SetWallRot_ToadHouse)), + Ref(N(EVS_SetDoorRot_ToadHouse)), + Ref(N(EVS_SetWallRot_ToadHouse)), NULL, - EVT_PTR(N(EVS_RoomListener_ToadHouse)), + Ref(N(EVS_RoomListener_ToadHouse)), COLLIDER_o1204, COLLIDER_o1261, MODEL_k_i4, - EVT_PTR(N(InsideNPCs_ToadHouse))) - EVT_SET(LVar0, ROOM_UPDATE_EXIT_END) - EVT_EXEC(N(EVS_RoomListener_Hideout)) - EVT_EXEC(N(EVS_SetupCamSpeed)) - EVT_EXEC(N(EVS_RoomListener_ToadHouse)) - EVT_RETURN - EVT_END + Ref(N(InsideNPCs_ToadHouse))) + Set(LVar0, ROOM_UPDATE_EXIT_END) + Exec(N(EVS_RoomListener_Hideout)) + Exec(N(EVS_SetupCamSpeed)) + Exec(N(EVS_RoomListener_ToadHouse)) + Return + End }; diff --git a/src/world/area_dro/dro_02/dro_02_5_npc.c b/src/world/area_dro/dro_02/dro_02_5_npc.c index ad5ee3ffbd2..ca3baefdba4 100644 --- a/src/world/area_dro/dro_02/dro_02_5_npc.c +++ b/src/world/area_dro/dro_02/dro_02_5_npc.c @@ -24,9 +24,9 @@ MobileAISettings N(AISettings_Archeologist) = { }; EvtScript N(EVS_NpcAI_Archeologist) = { - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_Archeologist))) - EVT_RETURN - EVT_END + Call(BasicAI_Main, Ref(N(AISettings_Archeologist))) + Return + End }; NpcSettings N(NpcSettings_Archeologist_Wander) = { @@ -68,291 +68,291 @@ s32 N(LetterList)[] = { }; EvtScript N(EVS_LetterPrompt_MrE) = { - EVT_CALL(N(LetterDelivery_Init), + Call(N(LetterDelivery_Init), NPC_Dryite_01, ANIM_Dryite_Blue_Talk, ANIM_Dryite_Blue_Idle, ITEM_LETTER_CHAIN_MR_E, ITEM_LETTER_CHAIN_MISS_T, MSG_CH2_0095, MSG_CH2_0096, MSG_CH2_0097, MSG_CH2_0098, - EVT_PTR(N(LetterList))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) - EVT_RETURN - EVT_END + Ref(N(LetterList))) + ExecWait(N(EVS_DoLetterDelivery)) + Return + End }; EvtScript N(EVS_NpcInteract_Archeologist) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_SBK30_Kolorado_SharedRumorAboutMoustafa, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Archeologist_Talk, ANIM_Archeologist_Idle, 0, MSG_CH2_00B2) - EVT_ELSE - EVT_SWITCH(AB_DRO_3) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Archeologist_Talk, ANIM_Archeologist_Idle, 0, MSG_CH2_00AF) - EVT_SET(AB_DRO_3, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Archeologist_Talk, ANIM_Archeologist_Idle, 0, MSG_CH2_00B0) - EVT_SET(AB_DRO_3, 2) - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Archeologist_Talk, ANIM_Archeologist_Idle, 0, MSG_CH2_00B1) - EVT_SET(AB_DRO_3, 1) - EVT_END_SWITCH - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Archeologist_Talk, ANIM_Archeologist_Idle, 0, MSG_CH2_00B3) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_SBK30_Kolorado_SharedRumorAboutMoustafa, TRUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Archeologist_Talk, ANIM_Archeologist_Idle, 0, MSG_CH2_00B2) + Else + Switch(AB_DRO_3) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Archeologist_Talk, ANIM_Archeologist_Idle, 0, MSG_CH2_00AF) + Set(AB_DRO_3, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Archeologist_Talk, ANIM_Archeologist_Idle, 0, MSG_CH2_00B0) + Set(AB_DRO_3, 2) + CaseEq(2) + Call(SpeakToPlayer, NPC_SELF, ANIM_Archeologist_Talk, ANIM_Archeologist_Idle, 0, MSG_CH2_00B1) + Set(AB_DRO_3, 1) + EndSwitch + EndIf + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Archeologist_Talk, ANIM_Archeologist_Idle, 0, MSG_CH2_00B3) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Archeologist) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Archeologist))) - EVT_IF_GE(GB_StoryProgress, STORY_UNUSED_FFFFFFCC) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Archeologist))) + IfGe(GB_StoryProgress, STORY_UNUSED_FFFFFFCC) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_MrE) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_DRO02_Sheek_AskedAboutDesert, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Blue_Talk, ANIM_Dryite_Blue_Idle, 0, MSG_CH2_0091) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Blue_Talk, ANIM_Dryite_Blue_Idle, 0, MSG_CH2_0092) - EVT_END_IF - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Blue_Talk, ANIM_Dryite_Blue_Idle, 0, MSG_CH2_0093) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Blue_Talk, ANIM_Dryite_Blue_Idle, 0, MSG_CH2_0094) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_LetterPrompt_MrE)) - EVT_IF_NE(LVarC, 0) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_DRO02_Sheek_AskedAboutDesert, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Blue_Talk, ANIM_Dryite_Blue_Idle, 0, MSG_CH2_0091) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Blue_Talk, ANIM_Dryite_Blue_Idle, 0, MSG_CH2_0092) + EndIf + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Blue_Talk, ANIM_Dryite_Blue_Idle, 0, MSG_CH2_0093) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Blue_Talk, ANIM_Dryite_Blue_Idle, 0, MSG_CH2_0094) + EndSwitch + ExecWait(N(EVS_LetterPrompt_MrE)) + IfNe(LVarC, 0) + Return + EndIf + Return + End }; EvtScript N(EVS_NpcInit_MrE) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_MrE))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_MrE))) + Return + End }; EvtScript N(EVS_NpcInteract_Dryite_02) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(AF_DRO_03, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_00A1) - EVT_SET(AF_DRO_03, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_00A2) - EVT_SET(AF_DRO_03, FALSE) - EVT_END_IF - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_00A3) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_00A4) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(AF_DRO_03, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_00A1) + Set(AF_DRO_03, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_00A2) + Set(AF_DRO_03, FALSE) + EndIf + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_00A3) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_00A4) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Dryite_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Dryite_02))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Dryite_02))) + Return + End }; EvtScript N(EVS_NpcInteract_Dryite_03) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_00A0) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH2_00A0) + Return + End }; EvtScript N(EVS_NpcInit_Dryite_03) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Dryite_03))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Dryite_03))) + Return + End }; EvtScript N(EVS_NpcInteract_Mouser_01) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(AF_DRO_04, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00A5) - EVT_SET(AF_DRO_04, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00A6) - EVT_SET(AF_DRO_04, FALSE) - EVT_END_IF - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(AF_DRO_04, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00A7) - EVT_SET(AF_DRO_04, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00A8) - EVT_SET(AF_DRO_04, FALSE) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_IF_EQ(AF_DRO_04, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00A9) - EVT_SET(AF_DRO_04, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00AA) - EVT_SET(AF_DRO_04, FALSE) - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(AF_DRO_04, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00A5) + Set(AF_DRO_04, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00A6) + Set(AF_DRO_04, FALSE) + EndIf + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + IfEq(AF_DRO_04, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00A7) + Set(AF_DRO_04, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00A8) + Set(AF_DRO_04, FALSE) + EndIf + CaseDefault + IfEq(AF_DRO_04, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00A9) + Set(AF_DRO_04, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00AA) + Set(AF_DRO_04, FALSE) + EndIf + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Mouser_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Mouser_01))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Mouser_01))) + Return + End }; EvtScript N(EVS_NpcInteract_Mouser_02) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(AF_DRO_05, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00AB) - EVT_SET(AF_DRO_05, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00AC) - EVT_SET(AF_DRO_05, FALSE) - EVT_END_IF - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00AD) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00AE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(AF_DRO_05, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00AB) + Set(AF_DRO_05, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00AC) + Set(AF_DRO_05, FALSE) + EndIf + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00AD) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 0, MSG_CH2_00AE) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Mouser_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Mouser_02))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Mouser_02))) + Return + End }; #include "npc_moustafa.c" EvtScript N(EVS_NpcIdle_Mouser_03) = { - EVT_CALL(InterpNpcYaw, NPC_DisguisedMoustafa, 270, 0) - EVT_LABEL(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Gossip) - EVT_CALL(SetNpcAnimation, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Idle) - EVT_LOOP(50) - EVT_CALL(IsPlayerWithin, 200, 50, 100, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Idle) - EVT_CALL(SetNpcAnimation, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_TalkAlt) - EVT_LOOP(50) - EVT_CALL(IsPlayerWithin, 200, 50, 100, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(10) - EVT_LABEL(20) - EVT_CALL(SetNpcAnimation, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Idle) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Run) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Run) - EVT_CALL(NpcMoveTo, NPC_SELF, 150, 18, 20) - EVT_CALL(EnableNpcBlur, NPC_SELF, TRUE) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_RUN_AWAY, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcMoveTo, NPC_SELF, -83, 11, 20 * DT) - EVT_CALL(NpcMoveTo, NPC_SELF, -239, 5, 20 * DT) - EVT_CALL(NpcMoveTo, NPC_SELF, -371, 5, 20 * DT) - EVT_CALL(NpcMoveTo, NPC_SELF, -487, 5, 20 * DT) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_SET(GB_StoryProgress, STORY_CH2_SPOKE_WITH_SHEEK) - EVT_RETURN - EVT_END + Call(InterpNpcYaw, NPC_DisguisedMoustafa, 270, 0) + Label(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Gossip) + Call(SetNpcAnimation, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Idle) + Loop(50) + Call(IsPlayerWithin, 200, 50, 100, LVar0) + IfEq(LVar0, 1) + Goto(20) + EndIf + Wait(1) + EndLoop + Call(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Idle) + Call(SetNpcAnimation, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_TalkAlt) + Loop(50) + Call(IsPlayerWithin, 200, 50, 100, LVar0) + IfEq(LVar0, 1) + Goto(20) + EndIf + Wait(1) + EndLoop + Goto(10) + Label(20) + Call(SetNpcAnimation, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Idle) + Call(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Run) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Mouser_Purple_Run) + Call(NpcMoveTo, NPC_SELF, 150, 18, 20) + Call(EnableNpcBlur, NPC_SELF, TRUE) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_RUN_AWAY, SOUND_SPACE_DEFAULT) + Call(NpcMoveTo, NPC_SELF, -83, 11, 20 * DT) + Call(NpcMoveTo, NPC_SELF, -239, 5, 20 * DT) + Call(NpcMoveTo, NPC_SELF, -371, 5, 20 * DT) + Call(NpcMoveTo, NPC_SELF, -487, 5, 20 * DT) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Set(GB_StoryProgress, STORY_CH2_SPOKE_WITH_SHEEK) + Return + End }; EvtScript N(EVS_NpcInit_Mouser_03) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Mouser_03))) - EVT_IF_GE(GB_StoryProgress, STORY_CH2_SPOKE_WITH_SHEEK) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Mouser_03))) + IfGe(GB_StoryProgress, STORY_CH2_SPOKE_WITH_SHEEK) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_ToadHouse_SetDialogue) = { - EVT_SET(LVar0, MSG_CH2_00D1) - EVT_SET(LVar8, MSG_CH2_00D2) - EVT_SET(LVar1, MSG_CH2_00D3) - EVT_SET(LVar2, MSG_CH2_00D4) - EVT_SET(LVar3, MSG_CH2_00D5) - EVT_RETURN - EVT_END + Set(LVar0, MSG_CH2_00D1) + Set(LVar8, MSG_CH2_00D2) + Set(LVar1, MSG_CH2_00D3) + Set(LVar2, MSG_CH2_00D4) + Set(LVar3, MSG_CH2_00D5) + Return + End }; EvtScript N(EVS_ToadHouse_GetInBed) = { - EVT_EXEC(N(EVS_PlayRestMusic)) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, -179, -198, 0) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(N(ToadHouse_CamSetFOV), 0, 40) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 95, -61) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 108) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 202, 62) - EVT_CALL(SetCamPosB, CAM_DEFAULT, -89, -141) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_CALL(PlayerMoveTo, -187, -267, 0) - EVT_CALL(InterpPlayerYaw, 230, 1) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetPlayerImgFXFlags, IMGFX_FLAG_800) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_GET_IN_BED, 1, 1, 0) - EVT_THREAD - EVT_WAIT(60) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) - EVT_END_THREAD - EVT_WAIT(20) - EVT_THREAD - EVT_WAIT(81) - EVT_CALL(N(ToadHouse_CamSetFOV), 0, 25) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_PlayRestMusic)) + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, -179, -198, 0) + Thread + Wait(15) + Call(N(ToadHouse_CamSetFOV), 0, 40) + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamPitch, CAM_DEFAULT, 95, -61) + Call(SetCamDistance, CAM_DEFAULT, 108) + Call(SetCamPosA, CAM_DEFAULT, 202, 62) + Call(SetCamPosB, CAM_DEFAULT, -89, -141) + Call(SetCamPosC, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Call(PlayerMoveTo, -187, -267, 0) + Call(InterpPlayerYaw, 230, 1) + Call(HidePlayerShadow, TRUE) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetPlayerImgFXFlags, IMGFX_FLAG_800) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_GET_IN_BED, 1, 1, 0) + Thread + Wait(60) + Call(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) + EndThread + Wait(20) + Thread + Wait(81) + Call(N(ToadHouse_CamSetFOV), 0, 25) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + EndThread + Return + End }; EvtScript N(EVS_ToadHouse_ReturnFromRest) = { - EVT_CALL(HidePlayerShadow, FALSE) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetPlayerPos, -187, 0, -240) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, -168, -195, 0) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Call(HidePlayerShadow, FALSE) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetPlayerPos, -187, 0, -240) + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, -168, -195, 0) + Exec(N(EVS_SetupMusic)) + Return + End }; EvtScript N(EVS_NpcInit_ToadHouseKeeper) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ToadHouseKeeper))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ToadHouseKeeper))) + Return + End }; NpcData N(PassiveNPCs)[] = { diff --git a/src/world/area_dro/dro_02/npc_merlee.c b/src/world/area_dro/dro_02/npc_merlee.c index 4d68523c4f9..332c5542817 100644 --- a/src/world/area_dro/dro_02/npc_merlee.c +++ b/src/world/area_dro/dro_02/npc_merlee.c @@ -595,246 +595,246 @@ API_CALLABLE(N(func_80243068_96C228)) { } EvtScript N(EVS_NpcAuxAI_Merlee) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcAI_Merlee) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_PerformRitual) = { - EVT_USE_ARRAY(EVT_PTR(N(RitualBuffer))) - EVT_SET(RITUAL_VAR_STATE, RITUAL_STATE_INIT) - EVT_CALL(GetNpcPos, NPC_Merlee, RITUAL_VAR_POS_X, RITUAL_VAR_POS_Y, RITUAL_VAR_POS_Z) - EVT_ADD(RITUAL_VAR_POS_X, 60) - EVT_ADD(RITUAL_VAR_POS_Z, 0) - EVT_CALL(PlaySoundAtNpc, NPC_Merlee, SOUND_MERLEE_TWIRL, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_CALL(MakeLerp, 720, 0, 60, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Merlee, 0, LVar0, 0) - EVT_IF_GT(LVar0, 360) - EVT_ADD(LVar0, -360) - EVT_END_IF - EVT_SWITCH(LVar0) - EVT_CASE_RANGE(90, 270) - EVT_SET(LVar2, ANIM_WorldMerlee_SpinBack) - EVT_CASE_DEFAULT - EVT_SET(LVar2, ANIM_WorldMerlee_SpinFront) - EVT_END_SWITCH - EVT_CALL(SetNpcAnimation, NPC_Merlee, LVar2) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcRotation, NPC_Merlee, 0, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_Merlee, ANIM_WorldMerlee_Gather) - EVT_WAIT(200) - EVT_CALL(SetNpcAnimation, NPC_Merlee, ANIM_WorldMerlee_Bow) - EVT_WAIT(40) - EVT_CALL(SetNpcAnimation, NPC_Merlee, ANIM_WorldMerlee_Gather) - EVT_WAIT(75) - EVT_CALL(SetNpcAnimation, NPC_Merlee, ANIM_WorldMerlee_Release) - EVT_END_THREAD - EVT_WAIT(60) - EVT_CALL(PlaySoundAtNpc, NPC_Merlee, SOUND_MERLEE_GATHER_ENERGY, SOUND_SPACE_DEFAULT) - EVT_SET(LVar0, RITUAL_VAR_POS_Y) - EVT_ADD(LVar0, 25) - EVT_PLAY_EFFECT(EFFECT_RADIATING_ENERGY_ORB, 0, RITUAL_VAR_POS_X, LVar0, RITUAL_VAR_POS_Z, 1, -1) - EVT_SET(RITUAL_VAR_ORB_EFFECT, LVarF) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(DismissEffect, RITUAL_VAR_ORB_EFFECT) - EVT_END_THREAD - EVT_CALL(N(DarkenWorld)) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(InterpPlayerYaw, 0, 0) - EVT_CALL(N(CreateRitualCards)) - EVT_THREAD - EVT_LOOP(0) - EVT_IF_EQ(RITUAL_VAR_STATE, RITUAL_STATE_2) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySound, SOUND_SEQ_SHUFFLE_CARD) - EVT_WAIT(10) - EVT_CALL(PlaySound, SOUND_SEQ_SHUFFLE_CARD) - EVT_WAIT(9) - EVT_CALL(PlaySound, SOUND_SEQ_SHUFFLE_CARD) - EVT_WAIT(4) - EVT_CALL(PlaySound, SOUND_SEQ_SHUFFLE_CARD) - EVT_WAIT(4) - EVT_CALL(PlaySound, SOUND_SEQ_SHUFFLE_CARD) - EVT_WAIT(3) - EVT_CALL(PlaySound, SOUND_SEQ_SHUFFLE_CARD) - EVT_WAIT(2) - EVT_CALL(PlaySound, SOUND_SEQ_SHUFFLE_CARD) - EVT_WAIT(2) - EVT_CALL(PlaySound, SOUND_SEQ_SHUFFLE_CARD) - EVT_WAIT(2) - EVT_CALL(PlaySound, SOUND_SEQ_SHUFFLE_CARD) - EVT_WAIT(3) - EVT_CALL(PlaySound, SOUND_SEQ_SHUFFLE_CARD) - EVT_WAIT(2) - EVT_CALL(PlaySound, SOUND_SEQ_SHUFFLE_CARD) - EVT_WAIT(6) - EVT_CALL(PlaySound, SOUND_SEQ_SHUFFLE_CARD) - EVT_WAIT(3) - EVT_CALL(PlaySound, SOUND_SEQ_SHUFFLE_CARD) - EVT_WAIT(3) - EVT_CALL(PlaySound, SOUND_SEQ_SHUFFLE_CARD) - EVT_WAIT(3) - EVT_CALL(PlaySound, SOUND_SEQ_SHUFFLE_CARD) - EVT_WAIT(3) - EVT_CALL(PlaySound, SOUND_SEQ_SHUFFLE_CARD) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(0) - EVT_IF_GE(RITUAL_VAR_STATE, RITUAL_STATE_3) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(9) - EVT_CALL(N(func_8024303C_96C1FC)) - EVT_WAIT(2) - EVT_CALL(N(func_80243068_96C228)) - EVT_LOOP(0) - EVT_IF_GE(RITUAL_VAR_STATE, RITUAL_STATE_A) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(3) - EVT_CALL(PlaySound, SOUND_MERLEE_GATHER_CARDS) - EVT_LOOP(0) - EVT_IF_GE(RITUAL_VAR_STATE, RITUAL_STATE_B) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(15) - EVT_CALL(PlaySound, SOUND_MERLEE_RELEASE_PLAYER) - EVT_END_THREAD - EVT_LOOP(0) - EVT_IF_EQ(RITUAL_VAR_STATE, RITUAL_STATE_D) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPlayerPos, RITUAL_VAR_POS_X, RITUAL_VAR_POS_Y, RITUAL_VAR_POS_Z) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_UsePower) - EVT_WAIT(1) - EVT_CALL(SetPlayerPos, RITUAL_VAR_POS_X, RITUAL_VAR_POS_Y, RITUAL_VAR_POS_Z) - EVT_WAIT(1) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(N(DestroyRitualCards)) - EVT_THREAD - EVT_CALL(N(UndarkenWorld)) - EVT_END_THREAD - EVT_RETURN - EVT_END + UseArray(Ref(N(RitualBuffer))) + Set(RITUAL_VAR_STATE, RITUAL_STATE_INIT) + Call(GetNpcPos, NPC_Merlee, RITUAL_VAR_POS_X, RITUAL_VAR_POS_Y, RITUAL_VAR_POS_Z) + Add(RITUAL_VAR_POS_X, 60) + Add(RITUAL_VAR_POS_Z, 0) + Call(PlaySoundAtNpc, NPC_Merlee, SOUND_MERLEE_TWIRL, SOUND_SPACE_DEFAULT) + Thread + Call(MakeLerp, 720, 0, 60, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Merlee, 0, LVar0, 0) + IfGt(LVar0, 360) + Add(LVar0, -360) + EndIf + Switch(LVar0) + CaseRange(90, 270) + Set(LVar2, ANIM_WorldMerlee_SpinBack) + CaseDefault + Set(LVar2, ANIM_WorldMerlee_SpinFront) + EndSwitch + Call(SetNpcAnimation, NPC_Merlee, LVar2) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcRotation, NPC_Merlee, 0, 0, 0) + Call(SetNpcAnimation, NPC_Merlee, ANIM_WorldMerlee_Gather) + Wait(200) + Call(SetNpcAnimation, NPC_Merlee, ANIM_WorldMerlee_Bow) + Wait(40) + Call(SetNpcAnimation, NPC_Merlee, ANIM_WorldMerlee_Gather) + Wait(75) + Call(SetNpcAnimation, NPC_Merlee, ANIM_WorldMerlee_Release) + EndThread + Wait(60) + Call(PlaySoundAtNpc, NPC_Merlee, SOUND_MERLEE_GATHER_ENERGY, SOUND_SPACE_DEFAULT) + Set(LVar0, RITUAL_VAR_POS_Y) + Add(LVar0, 25) + PlayEffect(EFFECT_RADIATING_ENERGY_ORB, 0, RITUAL_VAR_POS_X, LVar0, RITUAL_VAR_POS_Z, 1, -1) + Set(RITUAL_VAR_ORB_EFFECT, LVarF) + Thread + Wait(30) + Call(DismissEffect, RITUAL_VAR_ORB_EFFECT) + EndThread + Call(N(DarkenWorld)) + Call(DisablePlayerPhysics, TRUE) + Call(InterpPlayerYaw, 0, 0) + Call(N(CreateRitualCards)) + Thread + Loop(0) + IfEq(RITUAL_VAR_STATE, RITUAL_STATE_2) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(PlaySound, SOUND_SEQ_SHUFFLE_CARD) + Wait(10) + Call(PlaySound, SOUND_SEQ_SHUFFLE_CARD) + Wait(9) + Call(PlaySound, SOUND_SEQ_SHUFFLE_CARD) + Wait(4) + Call(PlaySound, SOUND_SEQ_SHUFFLE_CARD) + Wait(4) + Call(PlaySound, SOUND_SEQ_SHUFFLE_CARD) + Wait(3) + Call(PlaySound, SOUND_SEQ_SHUFFLE_CARD) + Wait(2) + Call(PlaySound, SOUND_SEQ_SHUFFLE_CARD) + Wait(2) + Call(PlaySound, SOUND_SEQ_SHUFFLE_CARD) + Wait(2) + Call(PlaySound, SOUND_SEQ_SHUFFLE_CARD) + Wait(3) + Call(PlaySound, SOUND_SEQ_SHUFFLE_CARD) + Wait(2) + Call(PlaySound, SOUND_SEQ_SHUFFLE_CARD) + Wait(6) + Call(PlaySound, SOUND_SEQ_SHUFFLE_CARD) + Wait(3) + Call(PlaySound, SOUND_SEQ_SHUFFLE_CARD) + Wait(3) + Call(PlaySound, SOUND_SEQ_SHUFFLE_CARD) + Wait(3) + Call(PlaySound, SOUND_SEQ_SHUFFLE_CARD) + Wait(3) + Call(PlaySound, SOUND_SEQ_SHUFFLE_CARD) + EndThread + Thread + Loop(0) + IfGe(RITUAL_VAR_STATE, RITUAL_STATE_3) + BreakLoop + EndIf + Wait(1) + EndLoop + Wait(9) + Call(N(func_8024303C_96C1FC)) + Wait(2) + Call(N(func_80243068_96C228)) + Loop(0) + IfGe(RITUAL_VAR_STATE, RITUAL_STATE_A) + BreakLoop + EndIf + Wait(1) + EndLoop + Wait(3) + Call(PlaySound, SOUND_MERLEE_GATHER_CARDS) + Loop(0) + IfGe(RITUAL_VAR_STATE, RITUAL_STATE_B) + BreakLoop + EndIf + Wait(1) + EndLoop + Wait(15) + Call(PlaySound, SOUND_MERLEE_RELEASE_PLAYER) + EndThread + Loop(0) + IfEq(RITUAL_VAR_STATE, RITUAL_STATE_D) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetPlayerPos, RITUAL_VAR_POS_X, RITUAL_VAR_POS_Y, RITUAL_VAR_POS_Z) + Call(SetPlayerAnimation, ANIM_Mario1_UsePower) + Wait(1) + Call(SetPlayerPos, RITUAL_VAR_POS_X, RITUAL_VAR_POS_Y, RITUAL_VAR_POS_Z) + Wait(1) + Call(DisablePlayerPhysics, FALSE) + Call(N(DestroyRitualCards)) + Thread + Call(N(UndarkenWorld)) + EndThread + Return + End }; EvtScript N(EVS_BeginMerleeCamera) = { - EVT_CALL(GetNpcPos, NPC_Merlee, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, 0, 200) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(8.0)) - EVT_CALL(SetCamPitch, 0, 20, -15) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_Merlee, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, 0, LVar0, LVar1, LVar2) + Call(SetCamDistance, 0, 200) + Call(SetPanTarget, 0, LVar0, LVar1, LVar2) + Call(SetCamSpeed, 0, Float(8.0)) + Call(SetCamPitch, 0, 20, -15) + Call(PanToTarget, 0, 0, 1) + Call(WaitForCam, 0, Float(1.0)) + Return + End }; EvtScript N(EVS_EndMerleeCamera) = { - EVT_CALL(PanToTarget, 0, 0, 0) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(3.0)) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(PanToTarget, 0, 0, 0) + Call(SetCamSpeed, 0, Float(3.0)) + Call(WaitForCam, 0, Float(1.0)) + Return + End }; EvtScript N(EVS_NpcInteract_Merlee) = { - EVT_CALL(func_802D2C14, 1) - EVT_EXEC_WAIT(N(EVS_BeginMerleeCamera)) - EVT_SET(LVar0, 0) - EVT_IF_EQ(GB_KootFavor_Current, KOOT_FAVOR_CH4_1) - EVT_ADD(LVar0, 1) - EVT_END_IF - EVT_IF_EQ(GF_HOS06_MerluvleeRequestedCrystalBall, 1) - EVT_ADD(LVar0, 1) - EVT_END_IF - EVT_IF_EQ(GF_DRO01_Gift_CrystalBall, 0) - EVT_ADD(LVar0, 1) - EVT_END_IF - EVT_IF_EQ(LVar0, 3) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldMerlee_Talk, ANIM_WorldMerlee_Idle, 0, MSG_CH2_00DC) - EVT_SET(LVar0, ITEM_CRYSTAL_BALL) - EVT_SET(LVar1, 1) - EVT_EXEC_WAIT(N(GiveItemReward)) - EVT_CALL(AddKeyItem, ITEM_CRYSTAL_BALL) - EVT_SET(GF_DRO01_Gift_CrystalBall, 1) - EVT_WAIT(20) - EVT_CALL(func_802D2C14, 0) - EVT_EXEC_WAIT(N(EVS_EndMerleeCamera)) - EVT_RETURN - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldMerlee_Talk, ANIM_WorldMerlee_Idle, 0, MSG_CH2_00D6) - EVT_CALL(ShowChoice, MSG_Choice_0011) - EVT_IF_NE(LVar0, 0) - EVT_CALL(ContinueSpeech, -1, ANIM_WorldMerlee_Talk, ANIM_WorldMerlee_Idle, 0, MSG_CH2_00D7) - EVT_CALL(func_802D2C14, 0) - EVT_EXEC_WAIT(N(EVS_EndMerleeCamera)) - EVT_RETURN - EVT_END_IF - EVT_CALL(ContinueSpeech, -1, ANIM_WorldMerlee_Talk, ANIM_WorldMerlee_Idle, 0, MSG_CH2_00D8) - EVT_CALL(ShowCoinCounter, 1) - EVT_CALL(ShowChoice, MSG_Choice_0018) - EVT_CALL(ShowCoinCounter, 0) - EVT_IF_EQ(LVar0, 3) - EVT_CALL(ContinueSpeech, -1, ANIM_WorldMerlee_Talk, ANIM_WorldMerlee_Idle, 0, MSG_CH2_00D7) - EVT_CALL(func_802D2C14, 0) - EVT_EXEC_WAIT(N(EVS_EndMerleeCamera)) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(TryEnchantPlayer), LVar0, LVar1) - EVT_IF_NE(LVar1, 0) - EVT_CALL(ContinueSpeech, -1, ANIM_WorldMerlee_Talk, ANIM_WorldMerlee_Idle, 0, MSG_CH2_00D9) - EVT_CALL(func_802D2C14, 0) - EVT_EXEC_WAIT(N(EVS_EndMerleeCamera)) - EVT_RETURN - EVT_END_IF - EVT_CALL(ContinueSpeech, -1, ANIM_WorldMerlee_Talk, ANIM_WorldMerlee_Idle, 0, MSG_CH2_00DA) - EVT_CALL(SetMusicTrack, 0, SONG_MERLEE_SPELL, 0, 8) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_EXEC_GET_TID(N(EVS_PerformRitual), LVar9) - EVT_LOOP(0) - EVT_IS_THREAD_RUNNING(LVar9, LVar1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(60) - EVT_CALL(SetNpcAnimation, 4, ANIM_WorldMerlee_Idle) - EVT_CALL(PlayerMoveTo, -100, -370, 8) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldMerlee_Talk, ANIM_WorldMerlee_Idle, 0, MSG_CH2_00DB) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(EnablePartnerAI) - EVT_CALL(func_802D2C14, 0) - EVT_EXEC_WAIT(N(EVS_EndMerleeCamera)) - EVT_RETURN - EVT_END + Call(func_802D2C14, 1) + ExecWait(N(EVS_BeginMerleeCamera)) + Set(LVar0, 0) + IfEq(GB_KootFavor_Current, KOOT_FAVOR_CH4_1) + Add(LVar0, 1) + EndIf + IfEq(GF_HOS06_MerluvleeRequestedCrystalBall, 1) + Add(LVar0, 1) + EndIf + IfEq(GF_DRO01_Gift_CrystalBall, 0) + Add(LVar0, 1) + EndIf + IfEq(LVar0, 3) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldMerlee_Talk, ANIM_WorldMerlee_Idle, 0, MSG_CH2_00DC) + Set(LVar0, ITEM_CRYSTAL_BALL) + Set(LVar1, 1) + ExecWait(N(GiveItemReward)) + Call(AddKeyItem, ITEM_CRYSTAL_BALL) + Set(GF_DRO01_Gift_CrystalBall, 1) + Wait(20) + Call(func_802D2C14, 0) + ExecWait(N(EVS_EndMerleeCamera)) + Return + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldMerlee_Talk, ANIM_WorldMerlee_Idle, 0, MSG_CH2_00D6) + Call(ShowChoice, MSG_Choice_0011) + IfNe(LVar0, 0) + Call(ContinueSpeech, -1, ANIM_WorldMerlee_Talk, ANIM_WorldMerlee_Idle, 0, MSG_CH2_00D7) + Call(func_802D2C14, 0) + ExecWait(N(EVS_EndMerleeCamera)) + Return + EndIf + Call(ContinueSpeech, -1, ANIM_WorldMerlee_Talk, ANIM_WorldMerlee_Idle, 0, MSG_CH2_00D8) + Call(ShowCoinCounter, 1) + Call(ShowChoice, MSG_Choice_0018) + Call(ShowCoinCounter, 0) + IfEq(LVar0, 3) + Call(ContinueSpeech, -1, ANIM_WorldMerlee_Talk, ANIM_WorldMerlee_Idle, 0, MSG_CH2_00D7) + Call(func_802D2C14, 0) + ExecWait(N(EVS_EndMerleeCamera)) + Return + EndIf + Call(N(TryEnchantPlayer), LVar0, LVar1) + IfNe(LVar1, 0) + Call(ContinueSpeech, -1, ANIM_WorldMerlee_Talk, ANIM_WorldMerlee_Idle, 0, MSG_CH2_00D9) + Call(func_802D2C14, 0) + ExecWait(N(EVS_EndMerleeCamera)) + Return + EndIf + Call(ContinueSpeech, -1, ANIM_WorldMerlee_Talk, ANIM_WorldMerlee_Idle, 0, MSG_CH2_00DA) + Call(SetMusicTrack, 0, SONG_MERLEE_SPELL, 0, 8) + Call(DisablePartnerAI, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + ExecGetTID(N(EVS_PerformRitual), LVar9) + Loop(0) + IsThreadRunning(LVar9, LVar1) + IfEq(LVar1, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Wait(60) + Call(SetNpcAnimation, 4, ANIM_WorldMerlee_Idle) + Call(PlayerMoveTo, -100, -370, 8) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldMerlee_Talk, ANIM_WorldMerlee_Idle, 0, MSG_CH2_00DB) + Exec(N(EVS_SetupMusic)) + Call(EnablePartnerAI) + Call(func_802D2C14, 0) + ExecWait(N(EVS_EndMerleeCamera)) + Return + End }; NpcSettings N(NpcSettings_Merlee) = { diff --git a/src/world/area_dro/dro_02/npc_moustafa.c b/src/world/area_dro/dro_02/npc_moustafa.c index 58b02e8becd..3a35824c3aa 100644 --- a/src/world/area_dro/dro_02/npc_moustafa.c +++ b/src/world/area_dro/dro_02/npc_moustafa.c @@ -2,273 +2,273 @@ #include "sprite/player.h" EvtScript N(EVS_PartyWatchingMoustafa) = { - EVT_LOOP(0) - EVT_CALL(PlayerFaceNpc, NPC_Moustafa, FALSE) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Moustafa, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(PlayerFaceNpc, NPC_Moustafa, FALSE) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Moustafa, 0) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_Moustafa_SetCamBetween) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 275) - EVT_CALL(GetNpcPos, NPC_DisguisedMoustafa, LVar3, LVar4, LVar5) - EVT_ADD(LVar0, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_ADD(LVar2, LVar5) - EVT_DIV(LVar0, 2) - EVT_DIV(LVar1, 2) - EVT_DIV(LVar2, 2) - EVT_ADD(LVar1, 15) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(8.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 275) + Call(GetNpcPos, NPC_DisguisedMoustafa, LVar3, LVar4, LVar5) + Add(LVar0, LVar3) + Add(LVar1, LVar4) + Add(LVar2, LVar5) + Div(LVar0, 2) + Div(LVar1, 2) + Div(LVar2, 2) + Add(LVar1, 15) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(8.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_Moustafa_ResetCam) = { - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_Moustafa_Unveiling) = { - EVT_CALL(SetNpcYaw, NPC_Moustafa, 270) - EVT_CALL(SetNpcFlagBits, NPC_DisguisedMoustafa, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Moustafa, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_GrabCloak) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_ThrownCloak) - EVT_CALL(SetNpcAnimation, NPC_Moustafa, ANIM_Moustafa_Toss) - EVT_CALL(SetNpcPos, NPC_Moustafa, -335, 163, -260) - EVT_EXEC(N(EVS_PlayMoustafaMusic)) - EVT_CALL(MakeLerp, 0, 80, 30 * DT, EASING_CUBIC_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_SET(LVar2, -335) - EVT_SET(LVar3, 163) - EVT_SUB(LVar2, LVar0) - EVT_ADD(LVar3, LVar0) - EVT_CALL(SetNpcPos, NPC_DisguisedMoustafa, LVar2, LVar3, -260) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(SetNpcFlagBits, NPC_DisguisedMoustafa, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcPos, NPC_DisguisedMoustafa, 0, NPC_DISPOSE_POS_Y, -250) - EVT_CALL(SetNpcAnimation, NPC_Moustafa, ANIM_Moustafa_Idle) - EVT_CALL(SetNpcFlagBits, NPC_DisguisedMoustafa, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Moustafa, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_WAIT(30 * DT) - EVT_RETURN - EVT_END + Call(SetNpcYaw, NPC_Moustafa, 270) + Call(SetNpcFlagBits, NPC_DisguisedMoustafa, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Moustafa, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_GrabCloak) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_ThrownCloak) + Call(SetNpcAnimation, NPC_Moustafa, ANIM_Moustafa_Toss) + Call(SetNpcPos, NPC_Moustafa, -335, 163, -260) + Exec(N(EVS_PlayMoustafaMusic)) + Call(MakeLerp, 0, 80, 30 * DT, EASING_CUBIC_OUT) + Label(10) + Call(UpdateLerp) + Set(LVar2, -335) + Set(LVar3, 163) + Sub(LVar2, LVar0) + Add(LVar3, LVar0) + Call(SetNpcPos, NPC_DisguisedMoustafa, LVar2, LVar3, -260) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(SetNpcFlagBits, NPC_DisguisedMoustafa, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcPos, NPC_DisguisedMoustafa, 0, NPC_DISPOSE_POS_Y, -250) + Call(SetNpcAnimation, NPC_Moustafa, ANIM_Moustafa_Idle) + Call(SetNpcFlagBits, NPC_DisguisedMoustafa, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcFlagBits, NPC_Moustafa, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Wait(30 * DT) + Return + End }; EvtScript N(EVS_NpcIdle_DisguisedMoustafa) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_BOUGHT_SECRET_ITEMS) - EVT_CASE_LT(STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(SetNpcPos, NPC_SELF, -335, 163, -260) - EVT_CASE_GE(STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(SetNpcPos, NPC_SELF, 0, NPC_DISPOSE_POS_Y, -250) - EVT_CALL(SetNpcPos, NPC_Moustafa, -335, 163, -260) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_BOUGHT_SECRET_ITEMS) + CaseLt(STORY_CH2_GOT_PULSE_STONE) + Call(SetNpcPos, NPC_SELF, -335, 163, -260) + CaseGe(STORY_CH2_GOT_PULSE_STONE) + Call(SetNpcPos, NPC_SELF, 0, NPC_DISPOSE_POS_Y, -250) + Call(SetNpcPos, NPC_Moustafa, -335, 163, -260) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Moustafa) = { - EVT_IF_EQ(GF_DRO02_Moustafa_UnusedDialogOverride, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00CF) - EVT_RETURN - EVT_END_IF - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_BOUGHT_SECRET_ITEMS) - EVT_SET(LVarB, 0) - EVT_CALL(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00B4) - EVT_LABEL(0) - EVT_CALL(ShowChoice, MSG_Choice_0019) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(ContinueSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00B6) - EVT_EXEC(N(EVS_Moustafa_ResetCam)) - EVT_RETURN - EVT_ELSE - EVT_CALL(EndSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0) - EVT_END_IF - EVT_LABEL(1) + IfEq(GF_DRO02_Moustafa_UnusedDialogOverride, TRUE) + Call(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00CF) + Return + EndIf + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_BOUGHT_SECRET_ITEMS) + Set(LVarB, 0) + Call(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00B4) + Label(0) + Call(ShowChoice, MSG_Choice_0019) + IfEq(LVar0, 1) + Call(ContinueSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00B6) + Exec(N(EVS_Moustafa_ResetCam)) + Return + Else + Call(EndSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0) + EndIf + Label(1) EVT_CHOOSE_ANY_CONSUMABLE(2) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00B8) - EVT_EXEC(N(EVS_Moustafa_ResetCam)) - EVT_RETURN - EVT_CASE_EQ(-1) - EVT_CALL(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00B7) - EVT_EXEC(N(EVS_Moustafa_ResetCam)) - EVT_RETURN - EVT_END_SWITCH - EVT_SET(LVarA, LVar0) - EVT_IF_EQ(GB_DRO02_SheekLemonGiftCount, 0) - EVT_IF_EQ(LVarA, ITEM_LEMON) - EVT_SET(GB_DRO02_SheekLemonGiftCount, 1) - EVT_SET(GB_DRO02_SheekGiftCount, 10) - EVT_CALL(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00BB) - EVT_CALL(ShowChoice, MSG_Choice_001C) - EVT_ELSE - EVT_ADD(GB_DRO02_SheekGiftCount, 1) - EVT_IF_LE(GB_DRO02_SheekGiftCount, 2) - EVT_CALL(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00B5) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_EQ(GB_DRO02_SheekGiftCount, 3) - EVT_CALL(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00B9) - EVT_CALL(ShowChoice, MSG_Choice_001B) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00BA) - EVT_CALL(ShowChoice, MSG_Choice_001B) - EVT_SET(GB_DRO02_SheekGiftCount, 10) - EVT_END_IF - EVT_END_IF - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00BA) - EVT_CALL(ShowChoice, MSG_Choice_001C) - EVT_END_IF - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(ContinueSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00BC) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_Moustafa_SetCamBetween)) - EVT_CALL(ContinueSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00BD) - EVT_SET(GF_DRO02_Sheek_AskedAboutDesert, TRUE) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_Moustafa_SetCamBetween)) - EVT_CALL(ContinueSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00BE) - EVT_SET(GF_DRO02_Sheek_AskedAboutRuins, TRUE) - EVT_CASE_EQ(3) - EVT_EXEC_WAIT(N(EVS_Moustafa_SetCamBetween)) - EVT_CALL(ContinueSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00BF) - EVT_CASE_EQ(4) - EVT_EXEC_WAIT(N(EVS_Moustafa_SetCamBetween)) - EVT_CALL(ContinueSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00C1) - EVT_SET(GF_DRO02_Sheek_AskedAboutMoustafa, TRUE) - EVT_SET(LVarB, 1) - EVT_END_SWITCH - EVT_SET(GF_DRO02_Sheek_SpokeTo, TRUE) - EVT_CALL(ContinueSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00C0) - EVT_CALL(ShowChoice, MSG_Choice_001A) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(EndSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0) - EVT_GOTO(1) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00B6) - EVT_END_IF - EVT_IF_EQ(LVarB, 1) - EVT_IF_EQ(MF_Unk_00, FALSE) - EVT_SET(MF_Unk_00, TRUE) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(AwaitPlayerLeave, LVar0, LVar2, 50) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00C2) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_SET(MF_Unk_00, FALSE) - EVT_END_THREAD - EVT_END_IF - EVT_END_IF - EVT_EXEC(N(EVS_Moustafa_ResetCam)) - EVT_CASE_LT(STORY_CH2_GOT_PULSE_STONE) - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(func_802D2C14, 1) - EVT_END_THREAD - EVT_CALL(SetNpcFlagBits, NPC_DisguisedMoustafa, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PlayerMoveTo, -391, -260, 0) - EVT_CALL(InterpPlayerYaw, 90, 3) - EVT_CALL(SetNpcFlagBits, NPC_DisguisedMoustafa, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_EXEC_GET_TID(N(EVS_PartyWatchingMoustafa), LVarA) - EVT_CALL(SetNpcFlagBits, NPC_Moustafa, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(FadeOutMusic, 0, 500) - EVT_IF_EQ(GF_DRO02_Sheek_AskedAboutMoustafa, TRUE) - EVT_CALL(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00C3) - EVT_EXEC_WAIT(N(EVS_Moustafa_Unveiling)) - EVT_CALL(func_802D2C14, 0) - EVT_CALL(SetNpcJumpscale, NPC_Moustafa, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_Moustafa, -425, 140, -206, 20 * DT) - EVT_CALL(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00C4) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00C5) - EVT_EXEC_WAIT(N(EVS_Moustafa_Unveiling)) - EVT_CALL(func_802D2C14, 0) - EVT_CALL(SetNpcJumpscale, NPC_Moustafa, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_Moustafa, -425, 140, -206, 20 * DT) - EVT_CALL(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00C6) - EVT_END_IF - EVT_CALL(SetNpcJumpscale, NPC_Moustafa, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_Moustafa, -337, 140, -200, 20 * DT) - EVT_CALL(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00C7) - EVT_CALL(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00C8) - EVT_CALL(SetNpcJumpscale, NPC_Moustafa, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_Moustafa, -335, 163, -260, 20 * DT) - EVT_CALL(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00C9) + Switch(LVar0) + CaseEq(0) + Call(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00B8) + Exec(N(EVS_Moustafa_ResetCam)) + Return + CaseEq(-1) + Call(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00B7) + Exec(N(EVS_Moustafa_ResetCam)) + Return + EndSwitch + Set(LVarA, LVar0) + IfEq(GB_DRO02_SheekLemonGiftCount, 0) + IfEq(LVarA, ITEM_LEMON) + Set(GB_DRO02_SheekLemonGiftCount, 1) + Set(GB_DRO02_SheekGiftCount, 10) + Call(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00BB) + Call(ShowChoice, MSG_Choice_001C) + Else + Add(GB_DRO02_SheekGiftCount, 1) + IfLe(GB_DRO02_SheekGiftCount, 2) + Call(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00B5) + Goto(0) + EndIf + IfEq(GB_DRO02_SheekGiftCount, 3) + Call(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00B9) + Call(ShowChoice, MSG_Choice_001B) + Else + Call(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00BA) + Call(ShowChoice, MSG_Choice_001B) + Set(GB_DRO02_SheekGiftCount, 10) + EndIf + EndIf + Else + Call(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00BA) + Call(ShowChoice, MSG_Choice_001C) + EndIf + Switch(LVar0) + CaseEq(0) + Call(ContinueSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00BC) + CaseEq(1) + ExecWait(N(EVS_Moustafa_SetCamBetween)) + Call(ContinueSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00BD) + Set(GF_DRO02_Sheek_AskedAboutDesert, TRUE) + CaseEq(2) + ExecWait(N(EVS_Moustafa_SetCamBetween)) + Call(ContinueSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00BE) + Set(GF_DRO02_Sheek_AskedAboutRuins, TRUE) + CaseEq(3) + ExecWait(N(EVS_Moustafa_SetCamBetween)) + Call(ContinueSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00BF) + CaseEq(4) + ExecWait(N(EVS_Moustafa_SetCamBetween)) + Call(ContinueSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00C1) + Set(GF_DRO02_Sheek_AskedAboutMoustafa, TRUE) + Set(LVarB, 1) + EndSwitch + Set(GF_DRO02_Sheek_SpokeTo, TRUE) + Call(ContinueSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00C0) + Call(ShowChoice, MSG_Choice_001A) + IfEq(LVar0, 0) + Call(EndSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0) + Goto(1) + Else + Call(ContinueSpeech, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00B6) + EndIf + IfEq(LVarB, 1) + IfEq(MF_Unk_00, FALSE) + Set(MF_Unk_00, TRUE) + Thread + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(AwaitPlayerLeave, LVar0, LVar2, 50) + Call(DisablePlayerInput, TRUE) + Call(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00C2) + Call(DisablePlayerInput, FALSE) + Set(MF_Unk_00, FALSE) + EndThread + EndIf + EndIf + Exec(N(EVS_Moustafa_ResetCam)) + CaseLt(STORY_CH2_GOT_PULSE_STONE) + Thread + Wait(10 * DT) + Call(func_802D2C14, 1) + EndThread + Call(SetNpcFlagBits, NPC_DisguisedMoustafa, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetPlayerSpeed, Float(3.0 / DT)) + Call(PlayerMoveTo, -391, -260, 0) + Call(InterpPlayerYaw, 90, 3) + Call(SetNpcFlagBits, NPC_DisguisedMoustafa, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + ExecGetTID(N(EVS_PartyWatchingMoustafa), LVarA) + Call(SetNpcFlagBits, NPC_Moustafa, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(FadeOutMusic, 0, 500) + IfEq(GF_DRO02_Sheek_AskedAboutMoustafa, TRUE) + Call(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00C3) + ExecWait(N(EVS_Moustafa_Unveiling)) + Call(func_802D2C14, 0) + Call(SetNpcJumpscale, NPC_Moustafa, Float(1.0)) + Call(NpcJump0, NPC_Moustafa, -425, 140, -206, 20 * DT) + Call(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00C4) + Else + Call(SpeakToPlayer, NPC_DisguisedMoustafa, ANIM_DisguisedMoustafa_Talk, ANIM_DisguisedMoustafa_Idle, 0, MSG_CH2_00C5) + ExecWait(N(EVS_Moustafa_Unveiling)) + Call(func_802D2C14, 0) + Call(SetNpcJumpscale, NPC_Moustafa, Float(1.0)) + Call(NpcJump0, NPC_Moustafa, -425, 140, -206, 20 * DT) + Call(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00C6) + EndIf + Call(SetNpcJumpscale, NPC_Moustafa, Float(1.0)) + Call(NpcJump0, NPC_Moustafa, -337, 140, -200, 20 * DT) + Call(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00C7) + Call(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00C8) + Call(SetNpcJumpscale, NPC_Moustafa, Float(1.0)) + Call(NpcJump0, NPC_Moustafa, -335, 163, -260, 20 * DT) + Call(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00C9) EVT_GIVE_KEY_REWARD(ITEM_PULSE_STONE) - EVT_SET(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00CA) - EVT_KILL_THREAD(LVarA) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CASE_GE(STORY_CH2_GOT_PULSE_STONE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_UNCOVERED_DRY_DRY_RUINS) - EVT_CALL(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00CB) - EVT_CASE_GE(STORY_CH2_UNCOVERED_DRY_DRY_RUINS) - EVT_IF_GE(GB_StoryProgress, STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_IF_EQ(GF_DRO02_Moustafa_HeardAboutDryDryRuins, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00CD) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(15) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(30) - EVT_CALL(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00CE) - EVT_SET(GF_DRO02_Moustafa_HeardAboutDryDryRuins, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00D0) - EVT_END_IF - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00CC) - EVT_END_IF - EVT_END_SWITCH - EVT_END_SWITCH - EVT_RETURN - EVT_END + Set(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00CA) + KillThread(LVarA) + Exec(N(EVS_SetupMusic)) + CaseGe(STORY_CH2_GOT_PULSE_STONE) + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_UNCOVERED_DRY_DRY_RUINS) + Call(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00CB) + CaseGe(STORY_CH2_UNCOVERED_DRY_DRY_RUINS) + IfGe(GB_StoryProgress, STORY_CH2_DEFEATED_TUTANKOOPA) + IfEq(GF_DRO02_Moustafa_HeardAboutDryDryRuins, FALSE) + Call(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00CD) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(15) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(30) + Call(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00CE) + Set(GF_DRO02_Moustafa_HeardAboutDryDryRuins, TRUE) + Else + Call(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00D0) + EndIf + Else + Call(SpeakToPlayer, NPC_Moustafa, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_CH2_00CC) + EndIf + EndSwitch + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_DisguisedMoustafa) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(dro_02_ENTRY_2) - EVT_CASE_OR_EQ(dro_02_ENTRY_3) - EVT_CALL(SetNpcPos, NPC_SELF, 200, 0, -15) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_200000, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_DisguisedMoustafa_GrabCloak) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_DisguisedMoustafa))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Moustafa))) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseOrEq(dro_02_ENTRY_2) + CaseOrEq(dro_02_ENTRY_3) + Call(SetNpcPos, NPC_SELF, 200, 0, -15) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_200000, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_DisguisedMoustafa_GrabCloak) + EndCaseGroup + CaseDefault + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_DisguisedMoustafa))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Moustafa))) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Moustafa) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Moustafa))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Moustafa))) + Return + End }; diff --git a/src/world/area_end/end_00/end_00_1_main.c b/src/world/area_end/end_00/end_00_1_main.c index 0aff320cdcb..ed320444155 100644 --- a/src/world/area_end/end_00/end_00_1_main.c +++ b/src/world/area_end/end_00/end_00_1_main.c @@ -1,16 +1,16 @@ #include "end_00.h" EvtScript N(EVS_Main) = { - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 35, 16, 4096) - EVT_CALL(SetCamViewport, CAM_DEFAULT, 15, 28, 290, 128) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(FadeOutMusic, 0, 500) - EVT_CALL(ClearAmbientSounds, 250) - EVT_CALL(EnableWorldStatusBar, FALSE) - EVT_WAIT(30) - EVT_EXEC(N(EVS_ManageParade)) - EVT_RETURN - EVT_END + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 35, 16, 4096) + Call(SetCamViewport, CAM_DEFAULT, 15, 28, 290, 128) + Call(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(FadeOutMusic, 0, 500) + Call(ClearAmbientSounds, 250) + Call(EnableWorldStatusBar, FALSE) + Wait(30) + Exec(N(EVS_ManageParade)) + Return + End }; diff --git a/src/world/area_end/end_00/end_00_2_credits.c b/src/world/area_end/end_00/end_00_2_credits.c index ac0a01058f4..804fb89cbed 100644 --- a/src/world/area_end/end_00/end_00_2_credits.c +++ b/src/world/area_end/end_00/end_00_2_credits.c @@ -15,25 +15,25 @@ #endif EvtScript N(EVS_InitCredits) = { - EVT_CALL(N(InitCredits)) - EVT_RETURN - EVT_END + Call(N(InitCredits)) + Return + End }; EvtScript N(EVS_ShowCredits_Jobs) = { - EVT_CALL(N(ShowCreditList), EVT_PTR(N(Credits_Jobs))) - EVT_RETURN - EVT_END + Call(N(ShowCreditList), Ref(N(Credits_Jobs))) + Return + End }; EvtScript N(EVS_ShowCredits_Names) = { - EVT_CALL(N(ShowCreditList), EVT_PTR(N(Credits_Names))) - EVT_RETURN - EVT_END + Call(N(ShowCreditList), Ref(N(Credits_Names))) + Return + End }; EvtScript N(EVS_ShowCredits_Title) = { - EVT_CALL(N(ShowCreditList), EVT_PTR(N(Credits_Title))) - EVT_RETURN - EVT_END + Call(N(ShowCreditList), Ref(N(Credits_Title))) + Return + End }; diff --git a/src/world/area_end/end_00/end_00_3_parade_setup.c b/src/world/area_end/end_00/end_00_3_parade_setup.c index 410c8c12e17..a917d828532 100644 --- a/src/world/area_end/end_00/end_00_3_parade_setup.c +++ b/src/world/area_end/end_00/end_00_3_parade_setup.c @@ -98,113 +98,113 @@ API_CALLABLE(N(AddScrollToNpcPos)) { } EvtScript N(EVS_SetupInitialCamera) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, PARADE_START, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, PARADE_START, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, PARADE_START, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, PARADE_START, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Return + End }; EvtScript N(EVS_UpdateScrollPos) = { - EVT_CALL(SetPanTarget, CAM_DEFAULT, EVT_FLOAT(PARADE_START), 0, 0) - EVT_SETF(LVar1, EVT_FLOAT(0.0)) - EVT_LOOP(0) - EVT_CALL(N(UpdateCameraScroll)) - EVT_CALL(TranslateGroup, MODEL_bg, LVar1, 0, 0) - EVT_ADDF(LVar1, EVT_FLOAT(PARADE_SCROLL_RATE / DT)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetPanTarget, CAM_DEFAULT, Float(PARADE_START), 0, 0) + SetF(LVar1, Float(0.0)) + Loop(0) + Call(N(UpdateCameraScroll)) + Call(TranslateGroup, MODEL_bg, LVar1, 0, 0) + AddF(LVar1, Float(PARADE_SCROLL_RATE / DT)) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_SetNpcShadowScale) = { - EVT_CALL(N(SetNpcShadowScale), LVar0, LVar2) - EVT_CALL(SetNpcFlagBits, LVar0, NPC_FLAG_DIRTY_SHADOW, TRUE) - EVT_RETURN - EVT_END + Call(N(SetNpcShadowScale), LVar0, LVar2) + Call(SetNpcFlagBits, LVar0, NPC_FLAG_DIRTY_SHADOW, TRUE) + Return + End }; EvtScript N(EVS_OffsetNpcScroll) = { - EVT_CALL(N(AddScrollToNpcPos), LVar0) - EVT_RETURN - EVT_END + Call(N(AddScrollToNpcPos), LVar0) + Return + End }; EvtScript N(EVS_UpdateTexPan_Ground) = { - EVT_CALL(EnableTexPanning, MODEL_j1, TRUE) - EVT_CALL(EnableTexPanning, MODEL_j2, TRUE) - EVT_CALL(EnableTexPanning, MODEL_j3, TRUE) - EVT_CALL(EnableTexPanning, MODEL_j4, TRUE) - EVT_CALL(EnableTexPanning, MODEL_j5, TRUE) - EVT_CALL(EnableTexPanning, MODEL_j6, TRUE) - EVT_CALL(EnableTexPanning, MODEL_j7, TRUE) - EVT_CALL(EnableTexPanning, MODEL_j8, TRUE) - EVT_CALL(EnableTexPanning, MODEL_j9, TRUE) - EVT_CALL(EnableTexPanning, MODEL_j10, TRUE) - EVT_CALL(EnableTexPanning, MODEL_j11, TRUE) - EVT_CALL(EnableTexPanning, MODEL_j12, TRUE) - EVT_CALL(EnableTexPanning, MODEL_j13, TRUE) - EVT_CALL(EnableTexPanning, MODEL_j14, TRUE) - EVT_CALL(EnableTexPanning, MODEL_j15, TRUE) - EVT_CALL(EnableTexPanning, MODEL_j16, TRUE) - EVT_CALL(EnableTexPanning, MODEL_j17, TRUE) - EVT_CALL(EnableTexPanning, MODEL_j18, TRUE) - EVT_CALL(EnableTexPanning, MODEL_j19, TRUE) - EVT_CALL(EnableTexPanning, MODEL_j20, TRUE) - EVT_CALL(EnableTexPanning, MODEL_j21, TRUE) - EVT_CALL(EnableTexPanning, MODEL_j22, TRUE) - EVT_CALL(EnableTexPanning, MODEL_j23, TRUE) - EVT_CALL(EnableTexPanning, MODEL_j24, TRUE) - EVT_CALL(EnableTexPanning, MODEL_j25, TRUE) - EVT_CALL(EnableTexPanning, MODEL_j26, TRUE) - EVT_CALL(EnableTexPanning, MODEL_j27, TRUE) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 300) - EVT_IF_GT(LVar0, 0x20000) - EVT_ADD(LVar0, -0x20000) - EVT_END_IF - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(EnableTexPanning, MODEL_j1, TRUE) + Call(EnableTexPanning, MODEL_j2, TRUE) + Call(EnableTexPanning, MODEL_j3, TRUE) + Call(EnableTexPanning, MODEL_j4, TRUE) + Call(EnableTexPanning, MODEL_j5, TRUE) + Call(EnableTexPanning, MODEL_j6, TRUE) + Call(EnableTexPanning, MODEL_j7, TRUE) + Call(EnableTexPanning, MODEL_j8, TRUE) + Call(EnableTexPanning, MODEL_j9, TRUE) + Call(EnableTexPanning, MODEL_j10, TRUE) + Call(EnableTexPanning, MODEL_j11, TRUE) + Call(EnableTexPanning, MODEL_j12, TRUE) + Call(EnableTexPanning, MODEL_j13, TRUE) + Call(EnableTexPanning, MODEL_j14, TRUE) + Call(EnableTexPanning, MODEL_j15, TRUE) + Call(EnableTexPanning, MODEL_j16, TRUE) + Call(EnableTexPanning, MODEL_j17, TRUE) + Call(EnableTexPanning, MODEL_j18, TRUE) + Call(EnableTexPanning, MODEL_j19, TRUE) + Call(EnableTexPanning, MODEL_j20, TRUE) + Call(EnableTexPanning, MODEL_j21, TRUE) + Call(EnableTexPanning, MODEL_j22, TRUE) + Call(EnableTexPanning, MODEL_j23, TRUE) + Call(EnableTexPanning, MODEL_j24, TRUE) + Call(EnableTexPanning, MODEL_j25, TRUE) + Call(EnableTexPanning, MODEL_j26, TRUE) + Call(EnableTexPanning, MODEL_j27, TRUE) + Thread + Set(LVar0, 0) + Set(LVar1, 0) + Loop(0) + Add(LVar0, 300) + IfGt(LVar0, 0x20000) + Add(LVar0, -0x20000) + EndIf + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) + Wait(1) + EndLoop + EndThread + Return + End }; EvtScript N(EVS_TexPan_Clouds) = { - EVT_CALL(EnableTexPanning, MODEL_cloud, TRUE) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 0x8000) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, 0, LVar0) - EVT_WAIT(16) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(EnableTexPanning, MODEL_cloud, TRUE) + Set(LVar0, 0) + Loop(0) + Add(LVar0, 0x8000) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, 0, LVar0) + Wait(16) + EndLoop + Return + End }; EvtScript N(EVS_TexPan_Water) = { - EVT_CALL(EnableTexPanning, MODEL_umi, TRUE) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 50) - EVT_ADD(LVar1, 50) - EVT_CALL(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, LVar0, LVar1) - EVT_ADD(LVar2, -50) - EVT_ADD(LVar3, -50) - EVT_CALL(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_AUX, LVar2, LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(EnableTexPanning, MODEL_umi, TRUE) + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Set(LVar3, 0) + Loop(0) + Add(LVar0, 50) + Add(LVar1, 50) + Call(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, LVar0, LVar1) + Add(LVar2, -50) + Add(LVar3, -50) + Call(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_AUX, LVar2, LVar3) + Wait(1) + EndLoop + Return + End }; AnimID N(ExtraAnims_Tutankoopa)[] = { @@ -798,510 +798,510 @@ ParadeNpcInfo N(ParadeNpcsTable)[] = { }; EvtScript N(EVS_ManageNpcPool) = { - EVT_CALL(N(CreateParadeNPC), NPC_Luigi) - EVT_CALL(N(ParadeSpriteHeapMalloc), 0x25000, LVar0) - EVT_CALL(N(CreateParadeNPC), NPC_HornPlayer1) - EVT_CALL(N(CreateParadeNPC), NPC_HornPlayer2) - EVT_CALL(N(CreateParadeNPC), NPC_Drummer1) - EVT_CALL(N(CreateParadeNPC), NPC_Drummer2) - EVT_CALL(N(CreateParadeNPC), NPC_StandardBearer1) - EVT_CALL(N(CreateParadeNPC), NPC_StandardBearer2) - EVT_CALL(N(ParadeSpriteHeapFree), LVar0) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_PARTNERS) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DeleteNpc, NPC_Luigi) - EVT_CALL(N(CreateParadeNPC), NPC_Goombario) - EVT_CALL(N(CreateParadeNPC), NPC_Kooper) - EVT_CALL(N(CreateParadeNPC), NPC_Bombette) - EVT_CALL(N(CreateParadeNPC), NPC_Parakarry) - EVT_CALL(N(CreateParadeNPC), NPC_Bow) - EVT_CALL(N(CreateParadeNPC), NPC_Watt) - EVT_CALL(N(CreateParadeNPC), NPC_Sushie) - EVT_CALL(N(CreateParadeNPC), NPC_Lakilester) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_TOAD_TOWN) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DeleteNpc, NPC_HornPlayer1) - EVT_CALL(DeleteNpc, NPC_HornPlayer2) - EVT_CALL(DeleteNpc, NPC_Drummer1) - EVT_CALL(DeleteNpc, NPC_Drummer2) - EVT_CALL(DeleteNpc, NPC_StandardBearer1) - EVT_CALL(DeleteNpc, NPC_StandardBearer2) - EVT_WAIT(1) - EVT_CALL(N(ParadeSpriteHeapMalloc), 0x25000, LVar0) - EVT_CALL(N(CreateParadeNPC), NPC_Twirler1) - EVT_CALL(N(CreateParadeNPC), NPC_Twirler2) - EVT_CALL(N(CreateParadeNPC), NPC_Twirler3) - EVT_CALL(N(CreateParadeNPC), NPC_Baton1) - EVT_CALL(N(CreateParadeNPC), NPC_Baton2) - EVT_CALL(N(CreateParadeNPC), NPC_Baton3) - EVT_CALL(N(ParadeSpriteHeapFree), LVar0) - EVT_WAIT(60) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_TOAD_TOWN + 250) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DeleteNpc, NPC_Goombario) - EVT_CALL(DeleteNpc, NPC_Kooper) - EVT_CALL(DeleteNpc, NPC_Bombette) - EVT_CALL(DeleteNpc, NPC_Parakarry) - EVT_CALL(DeleteNpc, NPC_Bow) - EVT_CALL(DeleteNpc, NPC_Watt) - EVT_CALL(DeleteNpc, NPC_Sushie) - EVT_CALL(DeleteNpc, NPC_Lakilester) - EVT_WAIT(1) - EVT_CALL(N(CreateParadeNPC), NPC_ChuckQuizmo) - EVT_CALL(N(CreateParadeNPC), NPC_VannaT) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_KOLORADO + 20) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DeleteNpc, NPC_Twirler1) - EVT_CALL(DeleteNpc, NPC_Twirler2) - EVT_CALL(DeleteNpc, NPC_Twirler3) - EVT_CALL(DeleteNpc, NPC_Baton1) - EVT_CALL(DeleteNpc, NPC_Baton2) - EVT_CALL(DeleteNpc, NPC_Baton3) - EVT_WAIT(1) - EVT_CALL(N(ParadeSpriteHeapMalloc), 0xB000, LVar0) - EVT_CALL(N(CreateParadeNPC), NPC_KoopaBrosRed) - EVT_CALL(N(CreateParadeNPC), NPC_KoopaBrosBlack) - EVT_CALL(N(CreateParadeNPC), NPC_KoopaBrosYellow) - EVT_CALL(N(CreateParadeNPC), NPC_KoopaBrosGreen) - EVT_CALL(N(CreateParadeNPC), NPC_Bobomb1) - EVT_CALL(N(CreateParadeNPC), NPC_Bobomb2) - EVT_CALL(N(CreateParadeNPC), NPC_Bobomb3) - EVT_CALL(N(CreateParadeNPC), NPC_Bobomb4) - EVT_CALL(N(ParadeSpriteHeapFree), LVar0) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_KOLORADO + 200) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DeleteNpc, NPC_ChuckQuizmo) - EVT_CALL(DeleteNpc, NPC_VannaT) - EVT_WAIT(1) - EVT_CALL(N(CreateParadeNPC), NPC_Kolorado) - EVT_CALL(N(CreateParadeNPC), NPC_KoloradoWife) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_CARAVAN) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DeleteNpc, NPC_KoopaBrosRed) - EVT_CALL(DeleteNpc, NPC_KoopaBrosBlack) - EVT_CALL(DeleteNpc, NPC_KoopaBrosYellow) - EVT_CALL(DeleteNpc, NPC_KoopaBrosGreen) - EVT_CALL(DeleteNpc, NPC_Bobomb1) - EVT_CALL(DeleteNpc, NPC_Bobomb2) - EVT_CALL(DeleteNpc, NPC_Bobomb3) - EVT_CALL(DeleteNpc, NPC_Bobomb4) - EVT_WAIT(1) - EVT_CALL(N(ParadeSpriteHeapMalloc), 0x19F00, LVar0) - EVT_CALL(N(CreateParadeNPC), NPC_Tutankoopa1) - EVT_CALL(N(CreateParadeNPC), NPC_Rowf) - EVT_CALL(N(CreateParadeNPC), NPC_Rhuff) - EVT_CALL(N(CreateParadeNPC), NPC_Moustafa) - EVT_CALL(N(CreateParadeNPC), NPC_Mouser1) - EVT_CALL(N(CreateParadeNPC), NPC_Mouser2) - EVT_CALL(N(CreateParadeNPC), NPC_ChainChomp1) - EVT_CALL(N(ParadeSpriteHeapMalloc), 0x7000, LVarF) - EVT_CALL(N(ParadeSpriteHeapFree), LVar0) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_BUZZAR + 175) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DeleteNpc, NPC_Kolorado) - EVT_CALL(DeleteNpc, NPC_KoloradoWife) - EVT_WAIT(1) - EVT_CALL(N(CreateParadeNPC), NPC_Buzzar) - EVT_CALL(N(CreateParadeNPC), NPC_VultureChick1) - EVT_CALL(N(CreateParadeNPC), NPC_VultureChick2) - EVT_CALL(N(CreateParadeNPC), NPC_VultureChick3) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_BOOS) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DeleteNpc, NPC_Tutankoopa1) - EVT_CALL(DeleteNpc, NPC_Rowf) - EVT_CALL(DeleteNpc, NPC_Rhuff) - EVT_CALL(DeleteNpc, NPC_Moustafa) - EVT_CALL(DeleteNpc, NPC_Mouser1) - EVT_CALL(DeleteNpc, NPC_Mouser2) - EVT_CALL(DeleteNpc, NPC_ChainChomp1) - EVT_CALL(N(ParadeSpriteHeapFree), LVarF) - EVT_WAIT(1) - EVT_CALL(N(ParadeSpriteHeapMalloc), 0x11F00, LVar0) - EVT_CALL(N(CreateParadeNPC), NPC_Tutankoopa2) - EVT_CALL(N(CreateParadeNPC), NPC_ChainChomp2) - EVT_CALL(N(CreateParadeNPC), NPC_ChainChomp3) - EVT_CALL(N(CreateParadeNPC), NPC_ChainChomp4) - EVT_CALL(N(CreateParadeNPC), NPC_Bootler) - EVT_CALL(N(ParadeSpriteHeapMalloc), 0xA000, LVarF) - EVT_CALL(N(ParadeSpriteHeapFree), LVar0) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_BOOS + 420) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DeleteNpc, NPC_Buzzar) - EVT_CALL(DeleteNpc, NPC_VultureChick1) - EVT_CALL(DeleteNpc, NPC_VultureChick2) - EVT_CALL(DeleteNpc, NPC_VultureChick3) - EVT_WAIT(1) - EVT_CALL(N(CreateParadeNPC), NPC_TubbasHeart) - EVT_CALL(N(CreateParadeNPC), NPC_Boo1) - EVT_CALL(N(CreateParadeNPC), NPC_Boo2) - EVT_CALL(N(CreateParadeNPC), NPC_Boo3) - EVT_CALL(N(CreateParadeNPC), NPC_TubbasBody) - EVT_CALL(N(SetNpcShadowScale), NPC_TubbasBody, EVT_FLOAT(4.0)) - EVT_CALL(SetNpcFlagBits, NPC_TubbasBody, NPC_FLAG_DIRTY_SHADOW, TRUE) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_GOOMBA_KING) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DeleteNpc, NPC_Bootler) - EVT_CALL(DeleteNpc, NPC_Tutankoopa2) - EVT_CALL(DeleteNpc, NPC_ChainChomp2) - EVT_CALL(DeleteNpc, NPC_ChainChomp3) - EVT_CALL(DeleteNpc, NPC_ChainChomp4) - EVT_CALL(N(ParadeSpriteHeapFree), LVarF) - EVT_WAIT(1) - EVT_CALL(N(ParadeSpriteHeapMalloc), 0xF000, LVar0) - EVT_CALL(N(CreateParadeNPC), NPC_GoombaKing) - EVT_CALL(N(CreateParadeNPC), NPC_RedGoombaBros) - EVT_CALL(N(CreateParadeNPC), NPC_BlueGoombaBros) - EVT_CALL(N(ParadeSpriteHeapFree), LVar0) - EVT_CALL(N(SetNpcShadowScale), NPC_GoombaKing, EVT_FLOAT(3.0)) - EVT_CALL(SetNpcFlagBits, NPC_GoombaKing, NPC_FLAG_DIRTY_SHADOW, TRUE) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_YOSHIS) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DeleteNpc, NPC_TubbasBody) - EVT_CALL(DeleteNpc, NPC_Boo1) - EVT_CALL(DeleteNpc, NPC_Boo2) - EVT_CALL(DeleteNpc, NPC_Boo3) - EVT_CALL(DeleteNpc, NPC_TubbasHeart) - EVT_WAIT(1) - EVT_CALL(N(CreateParadeNPC), NPC_RaphaelRaven) - EVT_CALL(N(CreateParadeNPC), NPC_LavaPiranha) - EVT_CALL(N(CreateParadeNPC), NPC_Yoshi1) - EVT_CALL(N(CreateParadeNPC), NPC_Yoshi2) - EVT_CALL(N(CreateParadeNPC), NPC_Yoshi3) - EVT_CALL(N(CreateParadeNPC), NPC_Yoshi4) - EVT_CALL(N(CreateParadeNPC), NPC_YoshiChief) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_HUFF_PUFF) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DeleteNpc, NPC_GoombaKing) - EVT_CALL(DeleteNpc, NPC_RedGoombaBros) - EVT_CALL(DeleteNpc, NPC_BlueGoombaBros) - EVT_WAIT(1) - EVT_CALL(N(ParadeSpriteHeapMalloc), 0x20000, LVar0) - EVT_CALL(N(CreateParadeNPC), NPC_YoshiKidGreen) - EVT_CALL(N(CreateParadeNPC), NPC_YoshiKidBlue) - EVT_CALL(N(CreateParadeNPC), NPC_YoshiKidPurple) - EVT_CALL(N(CreateParadeNPC), NPC_YoshiKidYellow) - EVT_CALL(N(CreateParadeNPC), NPC_YoshiKidRed) - EVT_CALL(N(ParadeSpriteHeapFree), LVar0) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_HUFF_PUFF + 50) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DeleteNpc, NPC_Yoshi1) - EVT_CALL(DeleteNpc, NPC_Yoshi2) - EVT_CALL(DeleteNpc, NPC_Yoshi3) - EVT_CALL(DeleteNpc, NPC_Yoshi4) - EVT_CALL(DeleteNpc, NPC_YoshiChief) - EVT_CALL(DeleteNpc, NPC_RaphaelRaven) - EVT_CALL(DeleteNpc, NPC_LavaPiranha) - EVT_WAIT(1) - EVT_CALL(N(CreateParadeNPC), NPC_HuffNPuffBody) - EVT_CALL(N(CreateParadeNPC), NPC_HuffNPuffFace) - EVT_CALL(N(CreateParadeNPC), NPC_HuffNPuffArms) - EVT_CALL(N(CreateParadeNPC), NPC_GourmetGuy) - EVT_CALL(N(CreateParadeNPC), NPC_RuffPuff1) - EVT_CALL(N(CreateParadeNPC), NPC_RuffPuff2) - EVT_CALL(N(SetNpcShadowScale), 69, EVT_FLOAT(6.0)) - EVT_CALL(SetNpcFlagBits, NPC_HuffNPuffBody, NPC_FLAG_DIRTY_SHADOW, TRUE) - EVT_CALL(N(SetNpcShadowScale), 74, EVT_FLOAT(3.0)) - EVT_CALL(SetNpcFlagBits, NPC_GourmetGuy, NPC_FLAG_DIRTY_SHADOW, TRUE) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_CRYSTAL_KING) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DeleteNpc, NPC_YoshiKidGreen) - EVT_CALL(DeleteNpc, NPC_YoshiKidBlue) - EVT_CALL(DeleteNpc, NPC_YoshiKidPurple) - EVT_CALL(DeleteNpc, NPC_YoshiKidYellow) - EVT_CALL(DeleteNpc, NPC_YoshiKidRed) - EVT_WAIT(1) - EVT_CALL(N(ParadeSpriteHeapMalloc), 0x2000, LVar0) - EVT_CALL(N(CreateParadeNPC), NPC_TrueCrystalKing) - EVT_CALL(N(CreateParadeNPC), NPC_FakeCrystalKing) - EVT_CALL(N(CreateParadeNPC), NPC_CrystalBit1) - EVT_CALL(N(CreateParadeNPC), NPC_CrystalBit2) - EVT_CALL(N(CreateParadeNPC), NPC_CrystalBit3) - EVT_CALL(N(ParadeSpriteHeapFree), LVar0) - EVT_CALL(N(SetNpcShadowScale), NPC_TrueCrystalKing, EVT_FLOAT(2.0)) - EVT_CALL(SetNpcFlagBits, NPC_TrueCrystalKing, NPC_FLAG_DIRTY_SHADOW, TRUE) - EVT_CALL(N(SetNpcShadowScale), NPC_FakeCrystalKing, EVT_FLOAT(2.0)) - EVT_CALL(SetNpcFlagBits, NPC_FakeCrystalKing, NPC_FLAG_DIRTY_SHADOW, TRUE) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_CRYSTAL_KING + 150) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DeleteNpc, NPC_HuffNPuffBody) - EVT_CALL(DeleteNpc, NPC_HuffNPuffFace) - EVT_CALL(DeleteNpc, NPC_HuffNPuffArms) - EVT_CALL(DeleteNpc, NPC_GourmetGuy) - EVT_CALL(DeleteNpc, NPC_RuffPuff1) - EVT_CALL(DeleteNpc, NPC_RuffPuff2) - EVT_WAIT(1) - EVT_CALL(N(CreateParadeNPC), NPC_Duplighost1) - EVT_CALL(N(CreateParadeNPC), NPC_Duplighost2) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_BOWSER) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DeleteNpc, NPC_TrueCrystalKing) - EVT_CALL(DeleteNpc, NPC_FakeCrystalKing) - EVT_CALL(DeleteNpc, NPC_CrystalBit1) - EVT_CALL(DeleteNpc, NPC_CrystalBit2) - EVT_CALL(DeleteNpc, NPC_CrystalBit3) - EVT_WAIT(1) - EVT_CALL(N(CreateParadeNPC), NPC_JrTroopa) - EVT_CALL(N(CreateParadeNPC), NPC_Kammy) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_BOWSER + 100) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DeleteNpc, NPC_Duplighost1) - EVT_CALL(DeleteNpc, NPC_Duplighost2) - EVT_WAIT(1) - EVT_CALL(N(CreateParadeNPC), NPC_Bowser) - EVT_CALL(N(CreateParadeNPC), NPC_BowserPropeller) - EVT_CALL(N(CreateParadeNPC), NPC_HammerBros1) - EVT_CALL(N(CreateParadeNPC), NPC_HammerBros2) - EVT_CALL(N(CreateParadeNPC), NPC_Koopatrol1) - EVT_CALL(N(CreateParadeNPC), NPC_Koopatrol2) - EVT_CALL(N(CreateParadeNPC), NPC_BurntBowser) - EVT_CALL(N(CreateParadeNPC), NPC_BurntBowserPropeller) - EVT_CALL(N(SetNpcShadowScale), NPC_Bowser, EVT_FLOAT(3.0)) - EVT_CALL(SetNpcFlagBits, NPC_Bowser, NPC_FLAG_DIRTY_SHADOW, TRUE) - EVT_CALL(N(SetNpcShadowScale), NPC_BurntBowser, EVT_FLOAT(3.0)) - EVT_CALL(SetNpcFlagBits, NPC_BurntBowser, NPC_FLAG_DIRTY_SHADOW, TRUE) - EVT_CALL(EnableNpcShadow, NPC_BowserPropeller, FALSE) - EVT_CALL(EnableNpcShadow, NPC_BurntBowserPropeller, FALSE) - EVT_RETURN - EVT_END + Call(N(CreateParadeNPC), NPC_Luigi) + Call(N(ParadeSpriteHeapMalloc), 0x25000, LVar0) + Call(N(CreateParadeNPC), NPC_HornPlayer1) + Call(N(CreateParadeNPC), NPC_HornPlayer2) + Call(N(CreateParadeNPC), NPC_Drummer1) + Call(N(CreateParadeNPC), NPC_Drummer2) + Call(N(CreateParadeNPC), NPC_StandardBearer1) + Call(N(CreateParadeNPC), NPC_StandardBearer2) + Call(N(ParadeSpriteHeapFree), LVar0) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_PARTNERS) + BreakLoop + EndIf + EndLoop + Call(DeleteNpc, NPC_Luigi) + Call(N(CreateParadeNPC), NPC_Goombario) + Call(N(CreateParadeNPC), NPC_Kooper) + Call(N(CreateParadeNPC), NPC_Bombette) + Call(N(CreateParadeNPC), NPC_Parakarry) + Call(N(CreateParadeNPC), NPC_Bow) + Call(N(CreateParadeNPC), NPC_Watt) + Call(N(CreateParadeNPC), NPC_Sushie) + Call(N(CreateParadeNPC), NPC_Lakilester) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_TOAD_TOWN) + BreakLoop + EndIf + EndLoop + Call(DeleteNpc, NPC_HornPlayer1) + Call(DeleteNpc, NPC_HornPlayer2) + Call(DeleteNpc, NPC_Drummer1) + Call(DeleteNpc, NPC_Drummer2) + Call(DeleteNpc, NPC_StandardBearer1) + Call(DeleteNpc, NPC_StandardBearer2) + Wait(1) + Call(N(ParadeSpriteHeapMalloc), 0x25000, LVar0) + Call(N(CreateParadeNPC), NPC_Twirler1) + Call(N(CreateParadeNPC), NPC_Twirler2) + Call(N(CreateParadeNPC), NPC_Twirler3) + Call(N(CreateParadeNPC), NPC_Baton1) + Call(N(CreateParadeNPC), NPC_Baton2) + Call(N(CreateParadeNPC), NPC_Baton3) + Call(N(ParadeSpriteHeapFree), LVar0) + Wait(60) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_TOAD_TOWN + 250) + BreakLoop + EndIf + EndLoop + Call(DeleteNpc, NPC_Goombario) + Call(DeleteNpc, NPC_Kooper) + Call(DeleteNpc, NPC_Bombette) + Call(DeleteNpc, NPC_Parakarry) + Call(DeleteNpc, NPC_Bow) + Call(DeleteNpc, NPC_Watt) + Call(DeleteNpc, NPC_Sushie) + Call(DeleteNpc, NPC_Lakilester) + Wait(1) + Call(N(CreateParadeNPC), NPC_ChuckQuizmo) + Call(N(CreateParadeNPC), NPC_VannaT) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_KOLORADO + 20) + BreakLoop + EndIf + EndLoop + Call(DeleteNpc, NPC_Twirler1) + Call(DeleteNpc, NPC_Twirler2) + Call(DeleteNpc, NPC_Twirler3) + Call(DeleteNpc, NPC_Baton1) + Call(DeleteNpc, NPC_Baton2) + Call(DeleteNpc, NPC_Baton3) + Wait(1) + Call(N(ParadeSpriteHeapMalloc), 0xB000, LVar0) + Call(N(CreateParadeNPC), NPC_KoopaBrosRed) + Call(N(CreateParadeNPC), NPC_KoopaBrosBlack) + Call(N(CreateParadeNPC), NPC_KoopaBrosYellow) + Call(N(CreateParadeNPC), NPC_KoopaBrosGreen) + Call(N(CreateParadeNPC), NPC_Bobomb1) + Call(N(CreateParadeNPC), NPC_Bobomb2) + Call(N(CreateParadeNPC), NPC_Bobomb3) + Call(N(CreateParadeNPC), NPC_Bobomb4) + Call(N(ParadeSpriteHeapFree), LVar0) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_KOLORADO + 200) + BreakLoop + EndIf + EndLoop + Call(DeleteNpc, NPC_ChuckQuizmo) + Call(DeleteNpc, NPC_VannaT) + Wait(1) + Call(N(CreateParadeNPC), NPC_Kolorado) + Call(N(CreateParadeNPC), NPC_KoloradoWife) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_CARAVAN) + BreakLoop + EndIf + EndLoop + Call(DeleteNpc, NPC_KoopaBrosRed) + Call(DeleteNpc, NPC_KoopaBrosBlack) + Call(DeleteNpc, NPC_KoopaBrosYellow) + Call(DeleteNpc, NPC_KoopaBrosGreen) + Call(DeleteNpc, NPC_Bobomb1) + Call(DeleteNpc, NPC_Bobomb2) + Call(DeleteNpc, NPC_Bobomb3) + Call(DeleteNpc, NPC_Bobomb4) + Wait(1) + Call(N(ParadeSpriteHeapMalloc), 0x19F00, LVar0) + Call(N(CreateParadeNPC), NPC_Tutankoopa1) + Call(N(CreateParadeNPC), NPC_Rowf) + Call(N(CreateParadeNPC), NPC_Rhuff) + Call(N(CreateParadeNPC), NPC_Moustafa) + Call(N(CreateParadeNPC), NPC_Mouser1) + Call(N(CreateParadeNPC), NPC_Mouser2) + Call(N(CreateParadeNPC), NPC_ChainChomp1) + Call(N(ParadeSpriteHeapMalloc), 0x7000, LVarF) + Call(N(ParadeSpriteHeapFree), LVar0) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_BUZZAR + 175) + BreakLoop + EndIf + EndLoop + Call(DeleteNpc, NPC_Kolorado) + Call(DeleteNpc, NPC_KoloradoWife) + Wait(1) + Call(N(CreateParadeNPC), NPC_Buzzar) + Call(N(CreateParadeNPC), NPC_VultureChick1) + Call(N(CreateParadeNPC), NPC_VultureChick2) + Call(N(CreateParadeNPC), NPC_VultureChick3) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_BOOS) + BreakLoop + EndIf + EndLoop + Call(DeleteNpc, NPC_Tutankoopa1) + Call(DeleteNpc, NPC_Rowf) + Call(DeleteNpc, NPC_Rhuff) + Call(DeleteNpc, NPC_Moustafa) + Call(DeleteNpc, NPC_Mouser1) + Call(DeleteNpc, NPC_Mouser2) + Call(DeleteNpc, NPC_ChainChomp1) + Call(N(ParadeSpriteHeapFree), LVarF) + Wait(1) + Call(N(ParadeSpriteHeapMalloc), 0x11F00, LVar0) + Call(N(CreateParadeNPC), NPC_Tutankoopa2) + Call(N(CreateParadeNPC), NPC_ChainChomp2) + Call(N(CreateParadeNPC), NPC_ChainChomp3) + Call(N(CreateParadeNPC), NPC_ChainChomp4) + Call(N(CreateParadeNPC), NPC_Bootler) + Call(N(ParadeSpriteHeapMalloc), 0xA000, LVarF) + Call(N(ParadeSpriteHeapFree), LVar0) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_BOOS + 420) + BreakLoop + EndIf + EndLoop + Call(DeleteNpc, NPC_Buzzar) + Call(DeleteNpc, NPC_VultureChick1) + Call(DeleteNpc, NPC_VultureChick2) + Call(DeleteNpc, NPC_VultureChick3) + Wait(1) + Call(N(CreateParadeNPC), NPC_TubbasHeart) + Call(N(CreateParadeNPC), NPC_Boo1) + Call(N(CreateParadeNPC), NPC_Boo2) + Call(N(CreateParadeNPC), NPC_Boo3) + Call(N(CreateParadeNPC), NPC_TubbasBody) + Call(N(SetNpcShadowScale), NPC_TubbasBody, Float(4.0)) + Call(SetNpcFlagBits, NPC_TubbasBody, NPC_FLAG_DIRTY_SHADOW, TRUE) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_GOOMBA_KING) + BreakLoop + EndIf + EndLoop + Call(DeleteNpc, NPC_Bootler) + Call(DeleteNpc, NPC_Tutankoopa2) + Call(DeleteNpc, NPC_ChainChomp2) + Call(DeleteNpc, NPC_ChainChomp3) + Call(DeleteNpc, NPC_ChainChomp4) + Call(N(ParadeSpriteHeapFree), LVarF) + Wait(1) + Call(N(ParadeSpriteHeapMalloc), 0xF000, LVar0) + Call(N(CreateParadeNPC), NPC_GoombaKing) + Call(N(CreateParadeNPC), NPC_RedGoombaBros) + Call(N(CreateParadeNPC), NPC_BlueGoombaBros) + Call(N(ParadeSpriteHeapFree), LVar0) + Call(N(SetNpcShadowScale), NPC_GoombaKing, Float(3.0)) + Call(SetNpcFlagBits, NPC_GoombaKing, NPC_FLAG_DIRTY_SHADOW, TRUE) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_YOSHIS) + BreakLoop + EndIf + EndLoop + Call(DeleteNpc, NPC_TubbasBody) + Call(DeleteNpc, NPC_Boo1) + Call(DeleteNpc, NPC_Boo2) + Call(DeleteNpc, NPC_Boo3) + Call(DeleteNpc, NPC_TubbasHeart) + Wait(1) + Call(N(CreateParadeNPC), NPC_RaphaelRaven) + Call(N(CreateParadeNPC), NPC_LavaPiranha) + Call(N(CreateParadeNPC), NPC_Yoshi1) + Call(N(CreateParadeNPC), NPC_Yoshi2) + Call(N(CreateParadeNPC), NPC_Yoshi3) + Call(N(CreateParadeNPC), NPC_Yoshi4) + Call(N(CreateParadeNPC), NPC_YoshiChief) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_HUFF_PUFF) + BreakLoop + EndIf + EndLoop + Call(DeleteNpc, NPC_GoombaKing) + Call(DeleteNpc, NPC_RedGoombaBros) + Call(DeleteNpc, NPC_BlueGoombaBros) + Wait(1) + Call(N(ParadeSpriteHeapMalloc), 0x20000, LVar0) + Call(N(CreateParadeNPC), NPC_YoshiKidGreen) + Call(N(CreateParadeNPC), NPC_YoshiKidBlue) + Call(N(CreateParadeNPC), NPC_YoshiKidPurple) + Call(N(CreateParadeNPC), NPC_YoshiKidYellow) + Call(N(CreateParadeNPC), NPC_YoshiKidRed) + Call(N(ParadeSpriteHeapFree), LVar0) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_HUFF_PUFF + 50) + BreakLoop + EndIf + EndLoop + Call(DeleteNpc, NPC_Yoshi1) + Call(DeleteNpc, NPC_Yoshi2) + Call(DeleteNpc, NPC_Yoshi3) + Call(DeleteNpc, NPC_Yoshi4) + Call(DeleteNpc, NPC_YoshiChief) + Call(DeleteNpc, NPC_RaphaelRaven) + Call(DeleteNpc, NPC_LavaPiranha) + Wait(1) + Call(N(CreateParadeNPC), NPC_HuffNPuffBody) + Call(N(CreateParadeNPC), NPC_HuffNPuffFace) + Call(N(CreateParadeNPC), NPC_HuffNPuffArms) + Call(N(CreateParadeNPC), NPC_GourmetGuy) + Call(N(CreateParadeNPC), NPC_RuffPuff1) + Call(N(CreateParadeNPC), NPC_RuffPuff2) + Call(N(SetNpcShadowScale), 69, Float(6.0)) + Call(SetNpcFlagBits, NPC_HuffNPuffBody, NPC_FLAG_DIRTY_SHADOW, TRUE) + Call(N(SetNpcShadowScale), 74, Float(3.0)) + Call(SetNpcFlagBits, NPC_GourmetGuy, NPC_FLAG_DIRTY_SHADOW, TRUE) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_CRYSTAL_KING) + BreakLoop + EndIf + EndLoop + Call(DeleteNpc, NPC_YoshiKidGreen) + Call(DeleteNpc, NPC_YoshiKidBlue) + Call(DeleteNpc, NPC_YoshiKidPurple) + Call(DeleteNpc, NPC_YoshiKidYellow) + Call(DeleteNpc, NPC_YoshiKidRed) + Wait(1) + Call(N(ParadeSpriteHeapMalloc), 0x2000, LVar0) + Call(N(CreateParadeNPC), NPC_TrueCrystalKing) + Call(N(CreateParadeNPC), NPC_FakeCrystalKing) + Call(N(CreateParadeNPC), NPC_CrystalBit1) + Call(N(CreateParadeNPC), NPC_CrystalBit2) + Call(N(CreateParadeNPC), NPC_CrystalBit3) + Call(N(ParadeSpriteHeapFree), LVar0) + Call(N(SetNpcShadowScale), NPC_TrueCrystalKing, Float(2.0)) + Call(SetNpcFlagBits, NPC_TrueCrystalKing, NPC_FLAG_DIRTY_SHADOW, TRUE) + Call(N(SetNpcShadowScale), NPC_FakeCrystalKing, Float(2.0)) + Call(SetNpcFlagBits, NPC_FakeCrystalKing, NPC_FLAG_DIRTY_SHADOW, TRUE) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_CRYSTAL_KING + 150) + BreakLoop + EndIf + EndLoop + Call(DeleteNpc, NPC_HuffNPuffBody) + Call(DeleteNpc, NPC_HuffNPuffFace) + Call(DeleteNpc, NPC_HuffNPuffArms) + Call(DeleteNpc, NPC_GourmetGuy) + Call(DeleteNpc, NPC_RuffPuff1) + Call(DeleteNpc, NPC_RuffPuff2) + Wait(1) + Call(N(CreateParadeNPC), NPC_Duplighost1) + Call(N(CreateParadeNPC), NPC_Duplighost2) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_BOWSER) + BreakLoop + EndIf + EndLoop + Call(DeleteNpc, NPC_TrueCrystalKing) + Call(DeleteNpc, NPC_FakeCrystalKing) + Call(DeleteNpc, NPC_CrystalBit1) + Call(DeleteNpc, NPC_CrystalBit2) + Call(DeleteNpc, NPC_CrystalBit3) + Wait(1) + Call(N(CreateParadeNPC), NPC_JrTroopa) + Call(N(CreateParadeNPC), NPC_Kammy) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_BOWSER + 100) + BreakLoop + EndIf + EndLoop + Call(DeleteNpc, NPC_Duplighost1) + Call(DeleteNpc, NPC_Duplighost2) + Wait(1) + Call(N(CreateParadeNPC), NPC_Bowser) + Call(N(CreateParadeNPC), NPC_BowserPropeller) + Call(N(CreateParadeNPC), NPC_HammerBros1) + Call(N(CreateParadeNPC), NPC_HammerBros2) + Call(N(CreateParadeNPC), NPC_Koopatrol1) + Call(N(CreateParadeNPC), NPC_Koopatrol2) + Call(N(CreateParadeNPC), NPC_BurntBowser) + Call(N(CreateParadeNPC), NPC_BurntBowserPropeller) + Call(N(SetNpcShadowScale), NPC_Bowser, Float(3.0)) + Call(SetNpcFlagBits, NPC_Bowser, NPC_FLAG_DIRTY_SHADOW, TRUE) + Call(N(SetNpcShadowScale), NPC_BurntBowser, Float(3.0)) + Call(SetNpcFlagBits, NPC_BurntBowser, NPC_FLAG_DIRTY_SHADOW, TRUE) + Call(EnableNpcShadow, NPC_BowserPropeller, FALSE) + Call(EnableNpcShadow, NPC_BurntBowserPropeller, FALSE) + Return + End }; EvtScript N(EVS_ParadePhase_PlayCredits) = { #if VERSION_PAL - EVT_WAIT(180 * DT) + Wait(180 * DT) #else - EVT_WAIT(240) + Wait(240) #endif - EVT_EXEC(N(EVS_InitCredits)) - EVT_EXEC(N(EVS_ShowCredits_Title)) - EVT_EXEC(N(EVS_ShowCredits_Jobs)) - EVT_EXEC(N(EVS_ShowCredits_Names)) - EVT_RETURN - EVT_END + Exec(N(EVS_InitCredits)) + Exec(N(EVS_ShowCredits_Title)) + Exec(N(EVS_ShowCredits_Jobs)) + Exec(N(EVS_ShowCredits_Names)) + Return + End }; EvtScript N(EVS_ManageParade) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_THREAD - EVT_LABEL(0) - EVT_CALL(SetPlayerPos, NPC_DISPOSE_LOCATION) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_THREAD - EVT_EXEC(N(EVS_TexPan_Clouds)) - EVT_EXEC(N(EVS_TexPan_Water)) - EVT_EXEC(N(EVS_SetupInitialCamera)) - EVT_EXEC(N(EVS_ManageNpcPool)) - EVT_EXEC_GET_TID(N(EVS_ParadePhase_Luigi), LVarA) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IS_THREAD_RUNNING(LVarA, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_ParadePhase_PlayCredits)) - EVT_EXEC(N(EVS_UpdateScrollPos)) - EVT_EXEC(N(EVS_UpdateTexPan_Ground)) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_PARTNERS) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_ParadePhase_Partners)) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_TOAD_TOWN) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_ParadePhase_Toads)) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_KOOPA_BROS) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_ParadePhase_KoopaBros)) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_KOLORADO) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_ParadePhase_Kolorado)) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_CARAVAN) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_ParadePhase_Caravan)) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_BUZZAR) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_ParadePhase_BuzzarNest)) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_TUTANKOOPA) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_ParadePhase_Tutankoopa)) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_BOOS) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_ParadePhase_Boos)) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_GOOMBA_KING) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_ParadePhase_GoombaKing)) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_YOSHIS) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_ParadePhase_Yoshis)) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_HUFF_PUFF) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_ParadePhase_HuffNPuff)) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_CRYSTAL_KING) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_ParadePhase_CrystalKing)) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_BOWSER) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_ParadePhase_Bowser)) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_DONE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(GotoMap, EVT_PTR("end_01"), end_01_ENTRY_0) - EVT_CALL(FadeOutMusic, 0, 500) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Thread + Label(0) + Call(SetPlayerPos, NPC_DISPOSE_LOCATION) + Wait(1) + Goto(0) + EndThread + Exec(N(EVS_TexPan_Clouds)) + Exec(N(EVS_TexPan_Water)) + Exec(N(EVS_SetupInitialCamera)) + Exec(N(EVS_ManageNpcPool)) + ExecGetTID(N(EVS_ParadePhase_Luigi), LVarA) + Loop(0) + Wait(1) + IsThreadRunning(LVarA, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_ParadePhase_PlayCredits)) + Exec(N(EVS_UpdateScrollPos)) + Exec(N(EVS_UpdateTexPan_Ground)) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_PARTNERS) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_ParadePhase_Partners)) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_TOAD_TOWN) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_ParadePhase_Toads)) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_KOOPA_BROS) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_ParadePhase_KoopaBros)) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_KOLORADO) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_ParadePhase_Kolorado)) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_CARAVAN) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_ParadePhase_Caravan)) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_BUZZAR) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_ParadePhase_BuzzarNest)) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_TUTANKOOPA) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_ParadePhase_Tutankoopa)) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_BOOS) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_ParadePhase_Boos)) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_GOOMBA_KING) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_ParadePhase_GoombaKing)) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_YOSHIS) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_ParadePhase_Yoshis)) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_HUFF_PUFF) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_ParadePhase_HuffNPuff)) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_CRYSTAL_KING) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_ParadePhase_CrystalKing)) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_BOWSER) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_ParadePhase_Bowser)) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_DONE) + BreakLoop + EndIf + EndLoop + Call(GotoMap, Ref("end_01"), end_01_ENTRY_0) + Call(FadeOutMusic, 0, 500) + Wait(100) + Return + End }; diff --git a/src/world/area_end/end_00/end_00_4_allies.c b/src/world/area_end/end_00/end_00_4_allies.c index c01a1c35f81..b3543af2b6b 100644 --- a/src/world/area_end/end_00/end_00_4_allies.c +++ b/src/world/area_end/end_00/end_00_4_allies.c @@ -2,171 +2,171 @@ #include "effects.h" EvtScript N(EVS_ParadePhase_Luigi) = { - EVT_CALL(PlaySound, SOUND_LRAW_AUDIENCE_MURMUR) - EVT_WAIT(80 * DT) - EVT_THREAD - EVT_LOOP(9 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Luigi, SOUND_MSG_VOICE_1A, SOUND_SPACE_DEFAULT) - EVT_WAIT(15) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(NpcMoveTo, NPC_Luigi, PARADE_START, 0, 120 * DT) - EVT_CALL(SetNpcAnimation, NPC_Luigi, ANIM_ParadeLuigi_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(InterpNpcYaw, NPC_Luigi, 90, 0) - EVT_WAIT(25 * DT) - EVT_CALL(StopSound, SOUND_LRAW_AUDIENCE_MURMUR) - EVT_WAIT(15 * DT) - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_LOOP(4 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Luigi, SOUND_MSG_VOICE_2B, SOUND_SPACE_DEFAULT) - EVT_WAIT(15) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_Luigi, ANIM_ParadeLuigi_BlowWhistle) - EVT_WAIT(30 * DT) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Luigi, ANIM_ParadeLuigi_MarchInPlace) - EVT_WAIT(7 * DT) - EVT_CALL(SetMusicTrack, 0, SONG_PARADE_DAY, 0, 8) - EVT_WAIT(120 * DT) - EVT_WAIT(100 * DT) - EVT_CALL(InterpNpcYaw, NPC_Luigi, 270, 0) - EVT_WAIT(30 * DT) - EVT_RETURN - EVT_END + Call(PlaySound, SOUND_LRAW_AUDIENCE_MURMUR) + Wait(80 * DT) + Thread + Loop(9 * DT) + Call(PlaySoundAtNpc, NPC_Luigi, SOUND_MSG_VOICE_1A, SOUND_SPACE_DEFAULT) + Wait(15) + EndLoop + EndThread + Call(NpcMoveTo, NPC_Luigi, PARADE_START, 0, 120 * DT) + Call(SetNpcAnimation, NPC_Luigi, ANIM_ParadeLuigi_Idle) + Wait(10 * DT) + Call(InterpNpcYaw, NPC_Luigi, 90, 0) + Wait(25 * DT) + Call(StopSound, SOUND_LRAW_AUDIENCE_MURMUR) + Wait(15 * DT) + Thread + Wait(10 * DT) + Loop(4 * DT) + Call(PlaySoundAtNpc, NPC_Luigi, SOUND_MSG_VOICE_2B, SOUND_SPACE_DEFAULT) + Wait(15) + EndLoop + EndThread + Call(SetNpcAnimation, NPC_Luigi, ANIM_ParadeLuigi_BlowWhistle) + Wait(30 * DT) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Luigi, ANIM_ParadeLuigi_MarchInPlace) + Wait(7 * DT) + Call(SetMusicTrack, 0, SONG_PARADE_DAY, 0, 8) + Wait(120 * DT) + Wait(100 * DT) + Call(InterpNpcYaw, NPC_Luigi, 270, 0) + Wait(30 * DT) + Return + End }; EvtScript N(EVS_ParadePhase_Partners) = { - EVT_PLAY_EFFECT(EFFECT_CONFETTI, 3, -2545, 200, 0, 1, 800) - EVT_CALL(EnableNpcShadow, NPC_Goombario, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Bombette, FALSE) - EVT_CHILD_THREAD - EVT_LOOP(0) - EVT_WAIT(25) - EVT_PLAY_EFFECT(EFFECT_CONFETTI, 4, -2530, 95, 5, 1, 20) - EVT_WAIT(20) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Sushie, EVT_FLOAT(1.0)) - EVT_LOOP(0) - EVT_CALL(NpcJump0, NPC_Sushie, -2550, 35, 7, 15) - EVT_WAIT(10) - EVT_CALL(NpcJump0, NPC_Sushie, -2570, 61, 7, 15) - EVT_WAIT(10) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_PARTNERS + 545) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + PlayEffect(EFFECT_CONFETTI, 3, -2545, 200, 0, 1, 800) + Call(EnableNpcShadow, NPC_Goombario, FALSE) + Call(EnableNpcShadow, NPC_Bombette, FALSE) + ChildThread + Loop(0) + Wait(25) + PlayEffect(EFFECT_CONFETTI, 4, -2530, 95, 5, 1, 20) + Wait(20) + EndLoop + EndChildThread + ChildThread + Call(SetNpcJumpscale, NPC_Sushie, Float(1.0)) + Loop(0) + Call(NpcJump0, NPC_Sushie, -2550, 35, 7, 15) + Wait(10) + Call(NpcJump0, NPC_Sushie, -2570, 61, 7, 15) + Wait(10) + EndLoop + EndChildThread + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_PARTNERS + 545) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_Twirler) = { - EVT_CALL(EnableNpcShadow, LVar1, FALSE) - EVT_CALL(SetNpcJumpscale, LVar1, EVT_FLOAT(0.5)) - EVT_LOOP(0) - EVT_CALL(SetNpcAnimation, LVar0, ANIM_ParadeToad_Red_TwirlerWalk) - EVT_WAIT(30) - EVT_CHILD_THREAD - EVT_CALL(GetNpcPos, LVar0, LVar2, LVar3, LVar4) - EVT_ADD(LVar2, -7) - EVT_CALL(SetNpcPos, LVar1, LVar2, LVar3, LVar4) - EVT_CALL(NpcJump0, LVar1, LVar2, LVar3, LVar4, 40) - EVT_CALL(SetNpcPos, LVar1, 0, -500, 0) - EVT_END_CHILD_THREAD - EVT_CALL(SetNpcAnimation, LVar0, ANIM_ParadeToad_Red_TwirlerToss) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, LVar0, ANIM_ParadeToad_Red_TwirlerCatch) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, LVar0, ANIM_ParadeToad_Red_TwirlerSpin) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, LVar0, ANIM_ParadeToad_Red_TwirlerToss) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, LVar0, ANIM_ParadeToad_Red_TwirlerCatch) - EVT_WAIT(5) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(EnableNpcShadow, LVar1, FALSE) + Call(SetNpcJumpscale, LVar1, Float(0.5)) + Loop(0) + Call(SetNpcAnimation, LVar0, ANIM_ParadeToad_Red_TwirlerWalk) + Wait(30) + ChildThread + Call(GetNpcPos, LVar0, LVar2, LVar3, LVar4) + Add(LVar2, -7) + Call(SetNpcPos, LVar1, LVar2, LVar3, LVar4) + Call(NpcJump0, LVar1, LVar2, LVar3, LVar4, 40) + Call(SetNpcPos, LVar1, 0, -500, 0) + EndChildThread + Call(SetNpcAnimation, LVar0, ANIM_ParadeToad_Red_TwirlerToss) + Wait(5) + Call(SetNpcAnimation, LVar0, ANIM_ParadeToad_Red_TwirlerCatch) + Wait(5) + Call(SetNpcAnimation, LVar0, ANIM_ParadeToad_Red_TwirlerSpin) + Wait(20) + Call(SetNpcAnimation, LVar0, ANIM_ParadeToad_Red_TwirlerToss) + Wait(5) + Call(SetNpcAnimation, LVar0, ANIM_ParadeToad_Red_TwirlerCatch) + Wait(5) + EndLoop + Return + End }; EvtScript N(EVS_QuizCrew) = { - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_TOAD_TOWN + 420) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_ChuckQuizmo, ANIM_ChuckQuizmo_OpenHat) - EVT_WAIT(10) - EVT_CALL(GetNpcPos, NPC_ChuckQuizmo, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 80) - EVT_PLAY_EFFECT(EFFECT_EXPLOSION, 0, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcAnimation, NPC_VannaT, ANIM_VannaT_Clap) - EVT_WAIT(60) - EVT_CALL(SetNpcAnimation, NPC_ChuckQuizmo, ANIM_ChuckQuizmo_CloseHat) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_ChuckQuizmo, ANIM_ChuckQuizmo_Walk) - EVT_CALL(SetNpcAnimation, NPC_VannaT, ANIM_VannaT_Walk) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_TOAD_TOWN + 600) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(InterpNpcYaw, NPC_VannaT, 90, 5) - EVT_CALL(SetNpcAnimation, NPC_VannaT, ANIM_VannaT_Wave) - EVT_WAIT(30) - EVT_CALL(InterpNpcYaw, NPC_VannaT, 270, 5) - EVT_CALL(SetNpcAnimation, NPC_VannaT, ANIM_VannaT_Walk) - EVT_RETURN - EVT_END + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_TOAD_TOWN + 420) + BreakLoop + EndIf + EndLoop + Call(SetNpcAnimation, NPC_ChuckQuizmo, ANIM_ChuckQuizmo_OpenHat) + Wait(10) + Call(GetNpcPos, NPC_ChuckQuizmo, LVar0, LVar1, LVar2) + Add(LVar1, 80) + PlayEffect(EFFECT_EXPLOSION, 0, LVar0, LVar1, LVar2) + Call(SetNpcAnimation, NPC_VannaT, ANIM_VannaT_Clap) + Wait(60) + Call(SetNpcAnimation, NPC_ChuckQuizmo, ANIM_ChuckQuizmo_CloseHat) + Wait(10) + Call(SetNpcAnimation, NPC_ChuckQuizmo, ANIM_ChuckQuizmo_Walk) + Call(SetNpcAnimation, NPC_VannaT, ANIM_VannaT_Walk) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_TOAD_TOWN + 600) + BreakLoop + EndIf + EndLoop + Call(InterpNpcYaw, NPC_VannaT, 90, 5) + Call(SetNpcAnimation, NPC_VannaT, ANIM_VannaT_Wave) + Wait(30) + Call(InterpNpcYaw, NPC_VannaT, 270, 5) + Call(SetNpcAnimation, NPC_VannaT, ANIM_VannaT_Walk) + Return + End }; EvtScript N(EVS_ParadePhase_Toads) = { - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_TOAD_TOWN) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(LVar0, NPC_Twirler1) - EVT_SET(LVar1, NPC_Baton1) - EVT_EXEC_GET_TID(N(EVS_Twirler), LVarA) - EVT_SET(LVar0, NPC_Twirler2) - EVT_SET(LVar1, NPC_Baton2) - EVT_EXEC_GET_TID(N(EVS_Twirler), LVarB) - EVT_SET(LVar0, NPC_Twirler3) - EVT_SET(LVar1, NPC_Baton3) - EVT_EXEC_GET_TID(N(EVS_Twirler), LVarC) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_TOAD_TOWN + 250) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_QuizCrew)) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_TOAD_TOWN + 480) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_KILL_THREAD(LVarA) - EVT_KILL_THREAD(LVarB) - EVT_KILL_THREAD(LVarC) - EVT_RETURN - EVT_END + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_TOAD_TOWN) + BreakLoop + EndIf + EndLoop + Set(LVar0, NPC_Twirler1) + Set(LVar1, NPC_Baton1) + ExecGetTID(N(EVS_Twirler), LVarA) + Set(LVar0, NPC_Twirler2) + Set(LVar1, NPC_Baton2) + ExecGetTID(N(EVS_Twirler), LVarB) + Set(LVar0, NPC_Twirler3) + Set(LVar1, NPC_Baton3) + ExecGetTID(N(EVS_Twirler), LVarC) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_TOAD_TOWN + 250) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_QuizCrew)) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_TOAD_TOWN + 480) + BreakLoop + EndIf + EndLoop + KillThread(LVarA) + KillThread(LVarB) + KillThread(LVarC) + Return + End }; diff --git a/src/world/area_end/end_00/end_00_5_koopas.c b/src/world/area_end/end_00/end_00_5_koopas.c index ac21b3d6f1c..027db476bb2 100644 --- a/src/world/area_end/end_00/end_00_5_koopas.c +++ b/src/world/area_end/end_00/end_00_5_koopas.c @@ -3,304 +3,304 @@ #include "world/common/atomic/WhaleGeyser.inc.c" EvtScript N(EVS_FakeBowserFloat) = { - EVT_CALL(EnableModel, MODEL_o81, FALSE) - EVT_LOOP(0) - EVT_CALL(MakeLerp, 15, -15, 30, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g13, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, -15, 15, 30, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g13, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_o81, FALSE) + Loop(0) + Call(MakeLerp, 15, -15, 30, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g13, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, -15, 15, 30, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g13, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_KoopaBros_Red) = { - EVT_CALL(EnableNpcShadow, NPC_KoopaBrosRed, FALSE) - EVT_WAIT(150) - EVT_CALL(GetNpcPos, NPC_KoopaBrosRed, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_ADD(LVar1, 30) - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 40) - EVT_WAIT(100) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosRed, ANIM_KoopaBros_Red_ExitShell) - EVT_WAIT(60) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosRed, ANIM_KoopaBros_Red_BurnHurt) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBrosRed, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_KoopaBrosRed, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_KoopaBrosRed, LVar0, LVar1, LVar2, 20) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosRed, ANIM_KoopaBros_Red_BurnStill) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_KoopaBrosRed, FALSE) + Wait(150) + Call(GetNpcPos, NPC_KoopaBrosRed, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Add(LVar1, 30) + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 40) + Wait(100) + Call(SetNpcAnimation, NPC_KoopaBrosRed, ANIM_KoopaBros_Red_ExitShell) + Wait(60) + Call(SetNpcAnimation, NPC_KoopaBrosRed, ANIM_KoopaBros_Red_BurnHurt) + Call(SetNpcJumpscale, NPC_KoopaBrosRed, Float(1.0)) + Call(GetNpcPos, NPC_KoopaBrosRed, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_KoopaBrosRed, LVar0, LVar1, LVar2, 20) + Call(SetNpcAnimation, NPC_KoopaBrosRed, ANIM_KoopaBros_Red_BurnStill) + Return + End }; EvtScript N(EVS_KoopaBros_Black) = { - EVT_CALL(EnableNpcShadow, NPC_KoopaBrosBlack, FALSE) - EVT_WAIT(155) - EVT_CALL(GetNpcPos, NPC_KoopaBrosBlack, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -5) - EVT_ADD(LVar1, 30) - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 40) - EVT_WAIT(95) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosBlack, ANIM_KoopaBros_Black_ExitShell) - EVT_WAIT(60) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosBlack, ANIM_KoopaBros_Black_BurnHurt) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBrosBlack, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_KoopaBrosBlack, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_KoopaBrosBlack, LVar0, LVar1, LVar2, 20) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosBlack, ANIM_KoopaBros_Black_BurnStill) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_KoopaBrosBlack, FALSE) + Wait(155) + Call(GetNpcPos, NPC_KoopaBrosBlack, LVar0, LVar1, LVar2) + Add(LVar0, -5) + Add(LVar1, 30) + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 40) + Wait(95) + Call(SetNpcAnimation, NPC_KoopaBrosBlack, ANIM_KoopaBros_Black_ExitShell) + Wait(60) + Call(SetNpcAnimation, NPC_KoopaBrosBlack, ANIM_KoopaBros_Black_BurnHurt) + Call(SetNpcJumpscale, NPC_KoopaBrosBlack, Float(1.0)) + Call(GetNpcPos, NPC_KoopaBrosBlack, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_KoopaBrosBlack, LVar0, LVar1, LVar2, 20) + Call(SetNpcAnimation, NPC_KoopaBrosBlack, ANIM_KoopaBros_Black_BurnStill) + Return + End }; EvtScript N(EVS_KoopaBros_Yellow) = { - EVT_CALL(EnableNpcShadow, NPC_KoopaBrosYellow, FALSE) - EVT_WAIT(160) - EVT_CALL(GetNpcPos, NPC_KoopaBrosYellow, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_ADD(LVar1, 30) - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 40) - EVT_WAIT(90) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosYellow, ANIM_KoopaBros_Yellow_ExitShell) - EVT_WAIT(60) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosYellow, ANIM_KoopaBros_Yellow_BurnHurt) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBrosYellow, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_KoopaBrosYellow, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_KoopaBrosYellow, LVar0, LVar1, LVar2, 20) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosYellow, ANIM_KoopaBros_Yellow_BurnStill) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_KoopaBrosYellow, FALSE) + Wait(160) + Call(GetNpcPos, NPC_KoopaBrosYellow, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Add(LVar1, 30) + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 40) + Wait(90) + Call(SetNpcAnimation, NPC_KoopaBrosYellow, ANIM_KoopaBros_Yellow_ExitShell) + Wait(60) + Call(SetNpcAnimation, NPC_KoopaBrosYellow, ANIM_KoopaBros_Yellow_BurnHurt) + Call(SetNpcJumpscale, NPC_KoopaBrosYellow, Float(1.0)) + Call(GetNpcPos, NPC_KoopaBrosYellow, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_KoopaBrosYellow, LVar0, LVar1, LVar2, 20) + Call(SetNpcAnimation, NPC_KoopaBrosYellow, ANIM_KoopaBros_Yellow_BurnStill) + Return + End }; EvtScript N(EVS_KoopaBros_Green) = { - EVT_CALL(EnableNpcShadow, NPC_KoopaBrosGreen, FALSE) - EVT_WAIT(165) - EVT_CALL(GetNpcPos, NPC_KoopaBrosGreen, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -5) - EVT_ADD(LVar1, 30) - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 40) - EVT_WAIT(85) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosGreen, ANIM_KoopaBros_Green_ExitShell) - EVT_WAIT(60) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosGreen, ANIM_KoopaBros_Green_BurnHurt) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBrosGreen, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_KoopaBrosGreen, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_KoopaBrosGreen, LVar0, LVar1, LVar2, 20) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosGreen, ANIM_KoopaBros_Green_BurnStill) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_KoopaBrosGreen, FALSE) + Wait(165) + Call(GetNpcPos, NPC_KoopaBrosGreen, LVar0, LVar1, LVar2) + Add(LVar0, -5) + Add(LVar1, 30) + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 40) + Wait(85) + Call(SetNpcAnimation, NPC_KoopaBrosGreen, ANIM_KoopaBros_Green_ExitShell) + Wait(60) + Call(SetNpcAnimation, NPC_KoopaBrosGreen, ANIM_KoopaBros_Green_BurnHurt) + Call(SetNpcJumpscale, NPC_KoopaBrosGreen, Float(1.0)) + Call(GetNpcPos, NPC_KoopaBrosGreen, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_KoopaBrosGreen, LVar0, LVar1, LVar2, 20) + Call(SetNpcAnimation, NPC_KoopaBrosGreen, ANIM_KoopaBros_Green_BurnStill) + Return + End }; EvtScript N(EVS_Bobomb1) = { - EVT_CALL(SetNpcFlagBits, NPC_Bobomb1, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_WAIT(180) - EVT_CALL(NpcMoveTo, NPC_Bobomb1, -1900, 43, 70) - EVT_CALL(SetNpcAnimation, NPC_Bobomb1, ANIM_Bobomb_AngryIdle) - EVT_WAIT(40) - EVT_CALL(SetNpcAnimation, NPC_Bobomb1, ANIM_Bobomb_Buildup) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_Bobomb1, ANIM_Bobomb_FaceFwd) - EVT_CALL(GetNpcPos, NPC_Bobomb1, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_00, LVar0, LVar1, LVar2, 1, 20, 3, 2) - EVT_CALL(EnableNpcShadow, NPC_Bobomb1, FALSE) - EVT_CALL(NpcFlyTo, NPC_Bobomb1, LVar0, 200, LVar2, 10, 0, EASING_LINEAR) - EVT_CALL(SetNpcPos, NPC_Bobomb1, -1870, 200, 40) - EVT_CALL(NpcFlyTo, NPC_Bobomb1, -1870, 12, 40, 20, 0, EASING_LINEAR) - EVT_CALL(SetNpcYaw, NPC_Bobomb1, 270) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Bobomb1, ANIM_Bobomb_WaveFwd) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_Bobomb1, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Wait(180) + Call(NpcMoveTo, NPC_Bobomb1, -1900, 43, 70) + Call(SetNpcAnimation, NPC_Bobomb1, ANIM_Bobomb_AngryIdle) + Wait(40) + Call(SetNpcAnimation, NPC_Bobomb1, ANIM_Bobomb_Buildup) + Wait(20) + Call(SetNpcAnimation, NPC_Bobomb1, ANIM_Bobomb_FaceFwd) + Call(GetNpcPos, NPC_Bobomb1, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_00, LVar0, LVar1, LVar2, 1, 20, 3, 2) + Call(EnableNpcShadow, NPC_Bobomb1, FALSE) + Call(NpcFlyTo, NPC_Bobomb1, LVar0, 200, LVar2, 10, 0, EASING_LINEAR) + Call(SetNpcPos, NPC_Bobomb1, -1870, 200, 40) + Call(NpcFlyTo, NPC_Bobomb1, -1870, 12, 40, 20, 0, EASING_LINEAR) + Call(SetNpcYaw, NPC_Bobomb1, 270) + Wait(10) + Call(SetNpcAnimation, NPC_Bobomb1, ANIM_Bobomb_WaveFwd) + Return + End }; EvtScript N(EVS_Bobomb2) = { - EVT_CALL(SetNpcFlagBits, NPC_Bobomb2, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_WAIT(180) - EVT_CALL(NpcMoveTo, NPC_Bobomb2, -1870, 43, 70) - EVT_CALL(SetNpcAnimation, NPC_Bobomb2, ANIM_Bobomb_AngryIdle) - EVT_WAIT(40) - EVT_CALL(SetNpcAnimation, NPC_Bobomb2, ANIM_Bobomb_Buildup) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_Bobomb2, ANIM_Bobomb_FaceFwd) - EVT_CALL(GetNpcPos, NPC_Bobomb2, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_00, LVar0, LVar1, LVar2, 1, 20, 3, 2) - EVT_CALL(EnableNpcShadow, NPC_Bobomb2, FALSE) - EVT_CALL(NpcFlyTo, NPC_Bobomb2, LVar0, 200, LVar2, 10, 0, EASING_LINEAR) - EVT_CALL(SetNpcPos, NPC_Bobomb2, -1860, 200, 13) - EVT_CALL(NpcFlyTo, NPC_Bobomb2, -1860, 65, 13, 20, 0, EASING_LINEAR) - EVT_CALL(SetNpcYaw, NPC_Bobomb2, 270) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Bobomb2, ANIM_Bobomb_WaveFwd) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_Bobomb2, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Wait(180) + Call(NpcMoveTo, NPC_Bobomb2, -1870, 43, 70) + Call(SetNpcAnimation, NPC_Bobomb2, ANIM_Bobomb_AngryIdle) + Wait(40) + Call(SetNpcAnimation, NPC_Bobomb2, ANIM_Bobomb_Buildup) + Wait(20) + Call(SetNpcAnimation, NPC_Bobomb2, ANIM_Bobomb_FaceFwd) + Call(GetNpcPos, NPC_Bobomb2, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_00, LVar0, LVar1, LVar2, 1, 20, 3, 2) + Call(EnableNpcShadow, NPC_Bobomb2, FALSE) + Call(NpcFlyTo, NPC_Bobomb2, LVar0, 200, LVar2, 10, 0, EASING_LINEAR) + Call(SetNpcPos, NPC_Bobomb2, -1860, 200, 13) + Call(NpcFlyTo, NPC_Bobomb2, -1860, 65, 13, 20, 0, EASING_LINEAR) + Call(SetNpcYaw, NPC_Bobomb2, 270) + Wait(10) + Call(SetNpcAnimation, NPC_Bobomb2, ANIM_Bobomb_WaveFwd) + Return + End }; EvtScript N(EVS_Bobomb3) = { - EVT_CALL(SetNpcFlagBits, NPC_Bobomb3, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_WAIT(180) - EVT_CALL(NpcMoveTo, NPC_Bobomb3, -1840, 43, 70) - EVT_CALL(SetNpcAnimation, NPC_Bobomb3, ANIM_Bobomb_AngryIdle) - EVT_WAIT(40) - EVT_CALL(SetNpcAnimation, NPC_Bobomb3, ANIM_Bobomb_Buildup) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_Bobomb3, ANIM_Bobomb_FaceFwd) - EVT_CALL(GetNpcPos, NPC_Bobomb3, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_00, LVar0, LVar1, LVar2, 1, 20, 3, 2) - EVT_CALL(EnableNpcShadow, NPC_Bobomb3, FALSE) - EVT_CALL(NpcFlyTo, NPC_Bobomb3, LVar0, 200, LVar2, 10, 0, EASING_LINEAR) - EVT_CALL(SetNpcPos, NPC_Bobomb3, -1840, 200, 13) - EVT_CALL(NpcFlyTo, NPC_Bobomb3, -1840, 65, 13, 20, 0, EASING_LINEAR) - EVT_CALL(SetNpcYaw, NPC_Bobomb3, 90) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Bobomb3, ANIM_Bobomb_WaveFwd) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_Bobomb3, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Wait(180) + Call(NpcMoveTo, NPC_Bobomb3, -1840, 43, 70) + Call(SetNpcAnimation, NPC_Bobomb3, ANIM_Bobomb_AngryIdle) + Wait(40) + Call(SetNpcAnimation, NPC_Bobomb3, ANIM_Bobomb_Buildup) + Wait(20) + Call(SetNpcAnimation, NPC_Bobomb3, ANIM_Bobomb_FaceFwd) + Call(GetNpcPos, NPC_Bobomb3, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_00, LVar0, LVar1, LVar2, 1, 20, 3, 2) + Call(EnableNpcShadow, NPC_Bobomb3, FALSE) + Call(NpcFlyTo, NPC_Bobomb3, LVar0, 200, LVar2, 10, 0, EASING_LINEAR) + Call(SetNpcPos, NPC_Bobomb3, -1840, 200, 13) + Call(NpcFlyTo, NPC_Bobomb3, -1840, 65, 13, 20, 0, EASING_LINEAR) + Call(SetNpcYaw, NPC_Bobomb3, 90) + Wait(10) + Call(SetNpcAnimation, NPC_Bobomb3, ANIM_Bobomb_WaveFwd) + Return + End }; EvtScript N(EVS_Bobomb4) = { - EVT_CALL(SetNpcFlagBits, NPC_Bobomb4, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_WAIT(180) - EVT_CALL(NpcMoveTo, NPC_Bobomb4, -1810, 43, 70) - EVT_CALL(SetNpcAnimation, NPC_Bobomb4, ANIM_Bobomb_AngryIdle) - EVT_WAIT(40) - EVT_CALL(SetNpcAnimation, NPC_Bobomb4, ANIM_Bobomb_Buildup) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_Bobomb4, ANIM_Bobomb_FaceFwd) - EVT_CALL(GetNpcPos, NPC_Bobomb4, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_00, LVar0, LVar1, LVar2, 1, 20, 3, 2) - EVT_CALL(EnableNpcShadow, NPC_Bobomb4, FALSE) - EVT_CALL(NpcFlyTo, NPC_Bobomb4, LVar0, 200, LVar2, 10, 0, EASING_LINEAR) - EVT_CALL(SetNpcPos, NPC_Bobomb4, -1830, 200, 40) - EVT_CALL(NpcFlyTo, NPC_Bobomb4, -1830, 12, 40, 20, 0, EASING_LINEAR) - EVT_CALL(SetNpcYaw, NPC_Bobomb4, 90) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Bobomb4, ANIM_Bobomb_WaveFwd) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_Bobomb4, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Wait(180) + Call(NpcMoveTo, NPC_Bobomb4, -1810, 43, 70) + Call(SetNpcAnimation, NPC_Bobomb4, ANIM_Bobomb_AngryIdle) + Wait(40) + Call(SetNpcAnimation, NPC_Bobomb4, ANIM_Bobomb_Buildup) + Wait(20) + Call(SetNpcAnimation, NPC_Bobomb4, ANIM_Bobomb_FaceFwd) + Call(GetNpcPos, NPC_Bobomb4, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_00, LVar0, LVar1, LVar2, 1, 20, 3, 2) + Call(EnableNpcShadow, NPC_Bobomb4, FALSE) + Call(NpcFlyTo, NPC_Bobomb4, LVar0, 200, LVar2, 10, 0, EASING_LINEAR) + Call(SetNpcPos, NPC_Bobomb4, -1830, 200, 40) + Call(NpcFlyTo, NPC_Bobomb4, -1830, 12, 40, 20, 0, EASING_LINEAR) + Call(SetNpcYaw, NPC_Bobomb4, 90) + Wait(10) + Call(SetNpcAnimation, NPC_Bobomb4, ANIM_Bobomb_WaveFwd) + Return + End }; EvtScript N(EVS_ParadePhase_KoopaBros) = { - EVT_EXEC_GET_TID(N(EVS_FakeBowserFloat), LVarA) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_KOOPA_BROS + 80) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(1) - EVT_EXEC(N(EVS_KoopaBros_Red)) - EVT_EXEC(N(EVS_KoopaBros_Black)) - EVT_EXEC(N(EVS_KoopaBros_Yellow)) - EVT_EXEC(N(EVS_KoopaBros_Green)) - EVT_EXEC(N(EVS_Bobomb1)) - EVT_EXEC(N(EVS_Bobomb2)) - EVT_EXEC(N(EVS_Bobomb3)) - EVT_EXEC(N(EVS_Bobomb4)) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_KOOPA_BROS + 550) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_KILL_THREAD(LVarA) - EVT_RETURN - EVT_END + ExecGetTID(N(EVS_FakeBowserFloat), LVarA) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_KOOPA_BROS + 80) + BreakLoop + EndIf + EndLoop + Wait(1) + Exec(N(EVS_KoopaBros_Red)) + Exec(N(EVS_KoopaBros_Black)) + Exec(N(EVS_KoopaBros_Yellow)) + Exec(N(EVS_KoopaBros_Green)) + Exec(N(EVS_Bobomb1)) + Exec(N(EVS_Bobomb2)) + Exec(N(EVS_Bobomb3)) + Exec(N(EVS_Bobomb4)) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_KOOPA_BROS + 550) + BreakLoop + EndIf + EndLoop + KillThread(LVarA) + Return + End }; EvtScript N(EVS_Whale_WagTail) = { - EVT_LOOP(0) - EVT_CALL(MakeLerp, 20, -20, 40, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o88, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, -20, 20, 40, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o88, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(MakeLerp, 20, -20, 40, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o88, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, -20, 20, 40, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o88, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_ParadePhase_Kolorado) = { - EVT_EXEC_GET_TID(N(EVS_Whale_WagTail), LVarA) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_KOLORADO + 500) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(LVar1, 15) - EVT_CALL(N(CreateWhaleGeyser), 0, -1565, LVar1, -200, 0, -1, 0, 30) - EVT_CALL(GetNpcPos, NPC_Kolorado, LVar2, LVar3, LVar4) - EVT_CALL(GetNpcPos, NPC_KoloradoWife, LVar5, LVar6, LVar7) - EVT_LOOP(5) - EVT_ADD(LVar3, 8) - EVT_CALL(SetNpcPos, NPC_Kolorado, LVar2, LVar3, LVar4) - EVT_ADD(LVar6, 8) - EVT_CALL(SetNpcPos, NPC_KoloradoWife, LVar5, LVar6, LVar7) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_Kolorado, ANIM_ParadeKolorado_Wave) - EVT_CALL(SetNpcAnimation, NPC_KoloradoWife, ANIM_ParadeKolorado_WifeWave) - EVT_CHILD_THREAD - EVT_LOOP(0) - EVT_LOOP(20) - EVT_SUB(LVar1, 1) - EVT_CALL(N(SetWhaleGeyserPos), LVar0, -1565, LVar1, -200) - EVT_SUB(LVar3, 1) - EVT_CALL(SetNpcPos, NPC_Kolorado, LVar2, LVar3, LVar4) - EVT_SUB(LVar6, 1) - EVT_CALL(SetNpcPos, NPC_KoloradoWife, LVar5, LVar6, LVar7) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(20) - EVT_ADD(LVar1, 1) - EVT_CALL(N(SetWhaleGeyserPos), LVar0, -1565, LVar1, -200) - EVT_ADD(LVar3, 1) - EVT_CALL(SetNpcPos, NPC_Kolorado, LVar2, LVar3, LVar4) - EVT_ADD(LVar6, 1) - EVT_CALL(SetNpcPos, NPC_KoloradoWife, LVar5, LVar6, LVar7) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_SET(LVar3, LVar0) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_KOLORADO + 900) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(N(DisposeWhaleGeyser), LVar3) - EVT_KILL_THREAD(LVarA) - EVT_RETURN - EVT_END + ExecGetTID(N(EVS_Whale_WagTail), LVarA) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_KOLORADO + 500) + BreakLoop + EndIf + EndLoop + Set(LVar1, 15) + Call(N(CreateWhaleGeyser), 0, -1565, LVar1, -200, 0, -1, 0, 30) + Call(GetNpcPos, NPC_Kolorado, LVar2, LVar3, LVar4) + Call(GetNpcPos, NPC_KoloradoWife, LVar5, LVar6, LVar7) + Loop(5) + Add(LVar3, 8) + Call(SetNpcPos, NPC_Kolorado, LVar2, LVar3, LVar4) + Add(LVar6, 8) + Call(SetNpcPos, NPC_KoloradoWife, LVar5, LVar6, LVar7) + Wait(1) + EndLoop + Call(SetNpcAnimation, NPC_Kolorado, ANIM_ParadeKolorado_Wave) + Call(SetNpcAnimation, NPC_KoloradoWife, ANIM_ParadeKolorado_WifeWave) + ChildThread + Loop(0) + Loop(20) + Sub(LVar1, 1) + Call(N(SetWhaleGeyserPos), LVar0, -1565, LVar1, -200) + Sub(LVar3, 1) + Call(SetNpcPos, NPC_Kolorado, LVar2, LVar3, LVar4) + Sub(LVar6, 1) + Call(SetNpcPos, NPC_KoloradoWife, LVar5, LVar6, LVar7) + Wait(1) + EndLoop + Loop(20) + Add(LVar1, 1) + Call(N(SetWhaleGeyserPos), LVar0, -1565, LVar1, -200) + Add(LVar3, 1) + Call(SetNpcPos, NPC_Kolorado, LVar2, LVar3, LVar4) + Add(LVar6, 1) + Call(SetNpcPos, NPC_KoloradoWife, LVar5, LVar6, LVar7) + Wait(1) + EndLoop + EndLoop + EndChildThread + Set(LVar3, LVar0) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_KOLORADO + 900) + BreakLoop + EndIf + EndLoop + Call(N(DisposeWhaleGeyser), LVar3) + KillThread(LVarA) + Return + End }; diff --git a/src/world/area_end/end_00/end_00_6_caravan.c b/src/world/area_end/end_00/end_00_6_caravan.c index 8f41b34de75..5feef8e5611 100644 --- a/src/world/area_end/end_00/end_00_6_caravan.c +++ b/src/world/area_end/end_00/end_00_6_caravan.c @@ -1,176 +1,176 @@ #include "end_00.h" EvtScript N(EVS_CaravanStopMarching) = { - EVT_CALL(GetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_SETF(LVar1, LVar1) - EVT_LOOP(0) - EVT_ADDF(LVar1, EVT_FLOAT(0.8702 / DT)) - EVT_CALL(SetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(GetNpcPos, LVar0, LVar1, LVar2, LVar3) + SetF(LVar1, LVar1) + Loop(0) + AddF(LVar1, Float(0.8702 / DT)) + Call(SetNpcPos, LVar0, LVar1, LVar2, LVar3) + Wait(1) + EndLoop + Return + End }; // unused EvtScript N(EVS_MoustafaStopMarching) = { - EVT_CALL(GetNpcPos, NPC_Moustafa, LVar0, LVar1, LVar2) - EVT_SETF(LVar0, LVar0) - EVT_LOOP(0) - EVT_ADDF(LVar0, EVT_FLOAT(0.8702 / DT)) - EVT_CALL(SetNpcPos, NPC_Moustafa, LVar0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_Moustafa, LVar0, LVar1, LVar2) + SetF(LVar0, LVar0) + Loop(0) + AddF(LVar0, Float(0.8702 / DT)) + Call(SetNpcPos, NPC_Moustafa, LVar0, 0, 0) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_ParadePhase_Caravan) = { - EVT_CALL(SetNpcScale, NPC_Rhuff, EVT_FLOAT(0.75), EVT_FLOAT(0.75), EVT_FLOAT(0.75)) - EVT_THREAD - EVT_CALL(NpcMoveTo, NPC_Rowf, -1447, -2, 200 * DT) - EVT_SET(LVar0, NPC_Rowf) - EVT_EXEC_GET_TID(N(EVS_CaravanStopMarching), LVarA) - EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_PackedIdle) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_PackedTalk) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_PackedCheer) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_PackedIdle) - EVT_WAIT(60 * DT) - EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_PackedTalk) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_PackedCheer) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_PackedIdle) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_PackedWalk) - EVT_KILL_THREAD(LVarA) - EVT_CALL(NpcMoveTo, NPC_Rowf, -785, -2, 300 * DT) - EVT_CALL(SetNpcPos, NPC_Rowf, 0, -500, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(NpcMoveTo, NPC_Rhuff, -1412, -2, 200 * DT) - EVT_SET(LVar0, NPC_Rhuff) - EVT_EXEC_GET_TID(N(EVS_CaravanStopMarching), LVarA) - EVT_CALL(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_PackedIdle) - EVT_WAIT(220 * DT) - EVT_CALL(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_PackedWalk) - EVT_KILL_THREAD(LVarA) - EVT_CALL(NpcMoveTo, NPC_Rhuff, -750, -2, 300 * DT) - EVT_CALL(SetNpcPos, NPC_Rhuff, 0, -500, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(NpcMoveTo, NPC_Moustafa, -1380, 2, 180 * DT) - EVT_SET(LVar0, NPC_Moustafa) - EVT_EXEC_GET_TID(N(EVS_CaravanStopMarching), LVarA) - EVT_CALL(SetNpcAnimation, NPC_Moustafa, ANIM_Moustafa_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Moustafa, ANIM_Moustafa_Toss) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Moustafa, ANIM_Moustafa_Shout) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Moustafa, ANIM_Moustafa_Talk) - EVT_WAIT(30 * DT) - EVT_CALL(InterpNpcYaw, NPC_Moustafa, 90, 0) - EVT_CALL(SetNpcAnimation, NPC_Moustafa, ANIM_Moustafa_Shout) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Moustafa, ANIM_Moustafa_Talk) - EVT_WAIT(30 * DT) - EVT_CALL(InterpNpcYaw, NPC_Moustafa, 270, 0) - EVT_CALL(SetNpcAnimation, NPC_Moustafa, ANIM_Moustafa_Shout) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Moustafa, ANIM_Moustafa_Talk) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Moustafa, ANIM_Moustafa_Toss) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Moustafa, ANIM_Moustafa_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Moustafa, ANIM_Moustafa_Run) - EVT_KILL_THREAD(LVarA) - EVT_CALL(NpcMoveTo, NPC_Moustafa, -1360, 2, 180 * DT) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(NpcMoveTo, NPC_Mouser1, -1342, 2, 180 * DT) - EVT_SET(LVar0, NPC_Mouser1) - EVT_EXEC_GET_TID(N(EVS_CaravanStopMarching), LVarA) - EVT_CALL(SetNpcAnimation, NPC_Mouser1, ANIM_Mouser_Blue_IdleOnlyBlink) - EVT_WAIT(110 * DT) - EVT_CALL(SetNpcAnimation, NPC_Mouser1, ANIM_Mouser_Blue_Whisper) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Mouser1, ANIM_Mouser_Blue_IdleOnlyBlink) - EVT_WAIT(90 * DT) - EVT_CALL(SetNpcAnimation, NPC_Mouser1, ANIM_Mouser_Blue_Run) - EVT_KILL_THREAD(LVarA) - EVT_CALL(NpcMoveTo, NPC_Mouser1, -1330, 2, 180 * DT) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(NpcMoveTo, NPC_Mouser2, -1312, 2, 180 * DT) - EVT_SET(LVar0, NPC_Mouser2) - EVT_EXEC_GET_TID(N(EVS_CaravanStopMarching), LVarA) - EVT_CALL(SetNpcAnimation, NPC_Mouser2, ANIM_Mouser_Blue_IdleOnlyBlink) - EVT_WAIT(230 * DT) - EVT_CALL(SetNpcAnimation, NPC_Mouser2, ANIM_Mouser_Blue_Run) - EVT_KILL_THREAD(LVarA) - EVT_CALL(NpcMoveTo, NPC_Mouser2, -1300, 2, 180 * DT) - EVT_END_THREAD + Call(SetNpcScale, NPC_Rhuff, Float(0.75), Float(0.75), Float(0.75)) + Thread + Call(NpcMoveTo, NPC_Rowf, -1447, -2, 200 * DT) + Set(LVar0, NPC_Rowf) + ExecGetTID(N(EVS_CaravanStopMarching), LVarA) + Call(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_PackedIdle) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_PackedTalk) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_PackedCheer) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_PackedIdle) + Wait(60 * DT) + Call(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_PackedTalk) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_PackedCheer) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_PackedIdle) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_PackedWalk) + KillThread(LVarA) + Call(NpcMoveTo, NPC_Rowf, -785, -2, 300 * DT) + Call(SetNpcPos, NPC_Rowf, 0, -500, 0) + EndThread + Thread + Call(NpcMoveTo, NPC_Rhuff, -1412, -2, 200 * DT) + Set(LVar0, NPC_Rhuff) + ExecGetTID(N(EVS_CaravanStopMarching), LVarA) + Call(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_PackedIdle) + Wait(220 * DT) + Call(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_PackedWalk) + KillThread(LVarA) + Call(NpcMoveTo, NPC_Rhuff, -750, -2, 300 * DT) + Call(SetNpcPos, NPC_Rhuff, 0, -500, 0) + EndThread + Thread + Call(NpcMoveTo, NPC_Moustafa, -1380, 2, 180 * DT) + Set(LVar0, NPC_Moustafa) + ExecGetTID(N(EVS_CaravanStopMarching), LVarA) + Call(SetNpcAnimation, NPC_Moustafa, ANIM_Moustafa_Idle) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Moustafa, ANIM_Moustafa_Toss) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_Moustafa, ANIM_Moustafa_Shout) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Moustafa, ANIM_Moustafa_Talk) + Wait(30 * DT) + Call(InterpNpcYaw, NPC_Moustafa, 90, 0) + Call(SetNpcAnimation, NPC_Moustafa, ANIM_Moustafa_Shout) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Moustafa, ANIM_Moustafa_Talk) + Wait(30 * DT) + Call(InterpNpcYaw, NPC_Moustafa, 270, 0) + Call(SetNpcAnimation, NPC_Moustafa, ANIM_Moustafa_Shout) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Moustafa, ANIM_Moustafa_Talk) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Moustafa, ANIM_Moustafa_Toss) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_Moustafa, ANIM_Moustafa_Idle) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Moustafa, ANIM_Moustafa_Run) + KillThread(LVarA) + Call(NpcMoveTo, NPC_Moustafa, -1360, 2, 180 * DT) + EndThread + Thread + Wait(10 * DT) + Call(NpcMoveTo, NPC_Mouser1, -1342, 2, 180 * DT) + Set(LVar0, NPC_Mouser1) + ExecGetTID(N(EVS_CaravanStopMarching), LVarA) + Call(SetNpcAnimation, NPC_Mouser1, ANIM_Mouser_Blue_IdleOnlyBlink) + Wait(110 * DT) + Call(SetNpcAnimation, NPC_Mouser1, ANIM_Mouser_Blue_Whisper) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Mouser1, ANIM_Mouser_Blue_IdleOnlyBlink) + Wait(90 * DT) + Call(SetNpcAnimation, NPC_Mouser1, ANIM_Mouser_Blue_Run) + KillThread(LVarA) + Call(NpcMoveTo, NPC_Mouser1, -1330, 2, 180 * DT) + EndThread + Thread + Wait(10) + Call(NpcMoveTo, NPC_Mouser2, -1312, 2, 180 * DT) + Set(LVar0, NPC_Mouser2) + ExecGetTID(N(EVS_CaravanStopMarching), LVarA) + Call(SetNpcAnimation, NPC_Mouser2, ANIM_Mouser_Blue_IdleOnlyBlink) + Wait(230 * DT) + Call(SetNpcAnimation, NPC_Mouser2, ANIM_Mouser_Blue_Run) + KillThread(LVarA) + Call(NpcMoveTo, NPC_Mouser2, -1300, 2, 180 * DT) + EndThread // tutankoopa is chased around by chomp - EVT_THREAD - EVT_WAIT(240 * DT) - EVT_CALL(NpcMoveTo, NPC_Tutankoopa1, -1540, 30, 60 * DT) - EVT_WAIT(210 * DT) - EVT_CALL(SetNpcPos, NPC_Tutankoopa1, -1350, 0, 30 * DT) - EVT_CALL(SetNpcYaw, NPC_Tutankoopa1, 90) - EVT_CALL(NpcMoveTo, NPC_Tutankoopa1, -1110, 30, 30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Tutankoopa1, ANIM_Tutankoopa_LevitateStill) - EVT_CALL(MakeLerp, 0, 90, 5, EASING_LINEAR) - EVT_LOOP(5) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Tutankoopa1, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20 * DT) - EVT_CALL(ShowEmote, NPC_Tutankoopa1, EMOTE_ELLIPSIS, 0, 60 * DT, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(60 * DT) - EVT_CALL(MakeLerp, 90, 0, 5, EASING_LINEAR) - EVT_LOOP(5) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Tutankoopa1, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_Tutankoopa1, ANIM_Tutankoopa_Idle) - EVT_CALL(InterpNpcYaw, NPC_Tutankoopa1, 270, 7) - EVT_WAIT(15 * DT) - EVT_CALL(InterpNpcYaw, NPC_Tutankoopa1, 90, 7) - EVT_WAIT(15 * DT) - EVT_CALL(InterpNpcYaw, NPC_Tutankoopa1, 270, 7) - EVT_WAIT(15 * DT) - EVT_CALL(SetNpcAnimation, NPC_Tutankoopa1, ANIM_Tutankoopa_Lift) - EVT_CALL(SetNpcJumpscale, NPC_Tutankoopa1, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_Tutankoopa1, -1140, 0, 30, 15 * DT) - EVT_CALL(NpcJump0, NPC_Tutankoopa1, -1170, 0, 30, 15 * DT) - EVT_CALL(NpcJump0, NPC_Tutankoopa1, -1200, 0, 30, 15 * DT) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(240 * DT) - EVT_CALL(NpcMoveTo, NPC_ChainChomp1, -1480, 30, 60 * DT) - EVT_WAIT(210 * DT) - EVT_CALL(SetNpcPos, NPC_ChainChomp1, -1410, 0, 30 * DT) - EVT_CALL(SetNpcYaw, NPC_ChainChomp1, 90) - EVT_CALL(NpcMoveTo, NPC_ChainChomp1, -690, 30, 90 * DT) - EVT_CALL(SetNpcPos, NPC_ChainChomp1, 0, -500, 0) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + Wait(240 * DT) + Call(NpcMoveTo, NPC_Tutankoopa1, -1540, 30, 60 * DT) + Wait(210 * DT) + Call(SetNpcPos, NPC_Tutankoopa1, -1350, 0, 30 * DT) + Call(SetNpcYaw, NPC_Tutankoopa1, 90) + Call(NpcMoveTo, NPC_Tutankoopa1, -1110, 30, 30 * DT) + Call(SetNpcAnimation, NPC_Tutankoopa1, ANIM_Tutankoopa_LevitateStill) + Call(MakeLerp, 0, 90, 5, EASING_LINEAR) + Loop(5) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Tutankoopa1, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(20 * DT) + Call(ShowEmote, NPC_Tutankoopa1, EMOTE_ELLIPSIS, 0, 60 * DT, EMOTER_NPC, 0, 0, 0, 0) + Wait(60 * DT) + Call(MakeLerp, 90, 0, 5, EASING_LINEAR) + Loop(5) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Tutankoopa1, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcAnimation, NPC_Tutankoopa1, ANIM_Tutankoopa_Idle) + Call(InterpNpcYaw, NPC_Tutankoopa1, 270, 7) + Wait(15 * DT) + Call(InterpNpcYaw, NPC_Tutankoopa1, 90, 7) + Wait(15 * DT) + Call(InterpNpcYaw, NPC_Tutankoopa1, 270, 7) + Wait(15 * DT) + Call(SetNpcAnimation, NPC_Tutankoopa1, ANIM_Tutankoopa_Lift) + Call(SetNpcJumpscale, NPC_Tutankoopa1, Float(1.0)) + Call(NpcJump0, NPC_Tutankoopa1, -1140, 0, 30, 15 * DT) + Call(NpcJump0, NPC_Tutankoopa1, -1170, 0, 30, 15 * DT) + Call(NpcJump0, NPC_Tutankoopa1, -1200, 0, 30, 15 * DT) + EndThread + Thread + Wait(240 * DT) + Call(NpcMoveTo, NPC_ChainChomp1, -1480, 30, 60 * DT) + Wait(210 * DT) + Call(SetNpcPos, NPC_ChainChomp1, -1410, 0, 30 * DT) + Call(SetNpcYaw, NPC_ChainChomp1, 90) + Call(NpcMoveTo, NPC_ChainChomp1, -690, 30, 90 * DT) + Call(SetNpcPos, NPC_ChainChomp1, 0, -500, 0) + EndThread + Return + End }; Vec3f N(BuzzarFlightPath)[] = { @@ -182,54 +182,54 @@ Vec3f N(BuzzarFlightPath)[] = { }; EvtScript N(EVS_ParadePhase_BuzzarNest) = { - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_BUZZAR + 175) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(200 * DT) - EVT_CALL(ShowEmote, NPC_Buzzar, EMOTE_SHOCK, 45, 30, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(40 * DT) - EVT_CALL(SetNpcAnimation, NPC_Buzzar, ANIM_Buzzar_Anim03) - EVT_CALL(NpcFlyTo, NPC_Buzzar, -855, 100, -180, 60 * DT, 0, EASING_LINEAR) - EVT_CALL(SetNpcAnimation, NPC_VultureChick1, ANIM_ParadeChick_EggTremble) - EVT_CALL(SetNpcAnimation, NPC_VultureChick2, ANIM_ParadeChick_EggTremble) - EVT_CALL(SetNpcAnimation, NPC_VultureChick3, ANIM_ParadeChick_EggTremble) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_VultureChick1, ANIM_ParadeChick_BreakEgg) - EVT_CALL(SetNpcAnimation, NPC_VultureChick2, ANIM_ParadeChick_BreakEggFwd) - EVT_CALL(SetNpcAnimation, NPC_VultureChick3, ANIM_ParadeChick_BreakEgg) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_VultureChick1, ANIM_ParadeChick_Chirp) - EVT_CALL(SetNpcAnimation, NPC_VultureChick2, ANIM_ParadeChick_ChirpFwd) - EVT_CALL(SetNpcAnimation, NPC_VultureChick3, ANIM_ParadeChick_Chirp) - EVT_WAIT(30 * DT) - EVT_CALL(InterpNpcYaw, NPC_Buzzar, 90, 0) - EVT_CALL(NpcFlyTo, NPC_Buzzar, -805, 100, -80, 30 * DT, 0, EASING_LINEAR) - EVT_THREAD - EVT_LOOP(6) - EVT_WAIT(20 * DT) - EVT_CALL(InterpNpcYaw, NPC_Buzzar, 270, 0) - EVT_WAIT(40 * DT) - EVT_CALL(InterpNpcYaw, NPC_Buzzar, 90, 0) - EVT_WAIT(20 * DT) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(6) - EVT_CALL(LoadPath, 80 * DT, EVT_PTR(N(BuzzarFlightPath)), ARRAY_COUNT(N(BuzzarFlightPath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Buzzar, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_END_THREAD - EVT_RETURN - EVT_END + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_BUZZAR + 175) + BreakLoop + EndIf + EndLoop + Wait(200 * DT) + Call(ShowEmote, NPC_Buzzar, EMOTE_SHOCK, 45, 30, EMOTER_NPC, 0, 0, 0, 0) + Wait(40 * DT) + Call(SetNpcAnimation, NPC_Buzzar, ANIM_Buzzar_Anim03) + Call(NpcFlyTo, NPC_Buzzar, -855, 100, -180, 60 * DT, 0, EASING_LINEAR) + Call(SetNpcAnimation, NPC_VultureChick1, ANIM_ParadeChick_EggTremble) + Call(SetNpcAnimation, NPC_VultureChick2, ANIM_ParadeChick_EggTremble) + Call(SetNpcAnimation, NPC_VultureChick3, ANIM_ParadeChick_EggTremble) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_VultureChick1, ANIM_ParadeChick_BreakEgg) + Call(SetNpcAnimation, NPC_VultureChick2, ANIM_ParadeChick_BreakEggFwd) + Call(SetNpcAnimation, NPC_VultureChick3, ANIM_ParadeChick_BreakEgg) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_VultureChick1, ANIM_ParadeChick_Chirp) + Call(SetNpcAnimation, NPC_VultureChick2, ANIM_ParadeChick_ChirpFwd) + Call(SetNpcAnimation, NPC_VultureChick3, ANIM_ParadeChick_Chirp) + Wait(30 * DT) + Call(InterpNpcYaw, NPC_Buzzar, 90, 0) + Call(NpcFlyTo, NPC_Buzzar, -805, 100, -80, 30 * DT, 0, EASING_LINEAR) + Thread + Loop(6) + Wait(20 * DT) + Call(InterpNpcYaw, NPC_Buzzar, 270, 0) + Wait(40 * DT) + Call(InterpNpcYaw, NPC_Buzzar, 90, 0) + Wait(20 * DT) + EndLoop + EndThread + Thread + Loop(6) + Call(LoadPath, 80 * DT, Ref(N(BuzzarFlightPath)), ARRAY_COUNT(N(BuzzarFlightPath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Buzzar, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + EndLoop + EndThread + Return + End }; diff --git a/src/world/area_end/end_00/end_00_7_boos.c b/src/world/area_end/end_00/end_00_7_boos.c index 2296bd35e43..e649f2155eb 100644 --- a/src/world/area_end/end_00/end_00_7_boos.c +++ b/src/world/area_end/end_00/end_00_7_boos.c @@ -9,234 +9,234 @@ API_CALLABLE(N(SetUnusedAlpha)) { } EvtScript N(EVS_MoveBoosToTubbaBody) = { - EVT_CALL(GetNpcPos, NPC_TubbasBody, LVar0, LVar1, LVar2) - EVT_SETF(LVar0, LVar0) - EVT_SETF(LVar3, LVar0) - EVT_SETF(LVar4, LVar0) - EVT_SUBF(LVar3, EVT_FLOAT(25.0)) - EVT_ADDF(LVar4, EVT_FLOAT(25.0)) - EVT_CALL(SetNpcPos, NPC_Boo1, LVar0, 20, 2) - EVT_CALL(SetNpcPos, NPC_Boo2, LVar3, 20, -2) - EVT_CALL(SetNpcPos, NPC_Boo3, LVar4, 20, 2) - EVT_CHILD_THREAD - EVT_CALL(N(AddScrollToNpcPos), NPC_Boo1) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(N(AddScrollToNpcPos), NPC_Boo2) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(N(AddScrollToNpcPos), NPC_Boo3) - EVT_END_CHILD_THREAD - EVT_CALL(N(AddScrollToNpcPos), 49) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_TubbasBody, LVar0, LVar1, LVar2) + SetF(LVar0, LVar0) + SetF(LVar3, LVar0) + SetF(LVar4, LVar0) + SubF(LVar3, Float(25.0)) + AddF(LVar4, Float(25.0)) + Call(SetNpcPos, NPC_Boo1, LVar0, 20, 2) + Call(SetNpcPos, NPC_Boo2, LVar3, 20, -2) + Call(SetNpcPos, NPC_Boo3, LVar4, 20, 2) + ChildThread + Call(N(AddScrollToNpcPos), NPC_Boo1) + EndChildThread + ChildThread + Call(N(AddScrollToNpcPos), NPC_Boo2) + EndChildThread + ChildThread + Call(N(AddScrollToNpcPos), NPC_Boo3) + EndChildThread + Call(N(AddScrollToNpcPos), 49) + Return + End }; EvtScript N(EVS_ParadePhase_Tutankoopa) = { - EVT_THREAD - EVT_CALL(SetNpcPos, NPC_Tutankoopa2, -960, 0, 30) - EVT_CALL(NpcMoveTo, NPC_Tutankoopa2, -240, 30, 90 * DT) - EVT_CALL(SetNpcPos, NPC_Tutankoopa2, 0, -500, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcPos, NPC_ChainChomp2, -1020, 0, 30) - EVT_CALL(NpcMoveTo, NPC_ChainChomp2, -300, 30, 90 * DT) - EVT_CALL(SetNpcPos, NPC_ChainChomp2, 0, -500, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcPos, NPC_ChainChomp3, -1050, 0, 30) - EVT_CALL(NpcMoveTo, NPC_ChainChomp3, -330, 30, 90 * DT) - EVT_CALL(SetNpcPos, NPC_ChainChomp3, 0, -500, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcPos, NPC_ChainChomp4, -1080, 0, 30) - EVT_CALL(NpcMoveTo, NPC_ChainChomp4, -360, 30, 90 * DT) - EVT_CALL(SetNpcPos, NPC_ChainChomp4, 0, -500, 0) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + Call(SetNpcPos, NPC_Tutankoopa2, -960, 0, 30) + Call(NpcMoveTo, NPC_Tutankoopa2, -240, 30, 90 * DT) + Call(SetNpcPos, NPC_Tutankoopa2, 0, -500, 0) + EndThread + Thread + Call(SetNpcPos, NPC_ChainChomp2, -1020, 0, 30) + Call(NpcMoveTo, NPC_ChainChomp2, -300, 30, 90 * DT) + Call(SetNpcPos, NPC_ChainChomp2, 0, -500, 0) + EndThread + Thread + Call(SetNpcPos, NPC_ChainChomp3, -1050, 0, 30) + Call(NpcMoveTo, NPC_ChainChomp3, -330, 30, 90 * DT) + Call(SetNpcPos, NPC_ChainChomp3, 0, -500, 0) + EndThread + Thread + Call(SetNpcPos, NPC_ChainChomp4, -1080, 0, 30) + Call(NpcMoveTo, NPC_ChainChomp4, -360, 30, 90 * DT) + Call(SetNpcPos, NPC_ChainChomp4, 0, -500, 0) + EndThread + Return + End }; EvtScript N(EVS_ParadePhase_Boos) = { - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, -580) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(InterpNpcYaw, NPC_Bootler, 90, 0) - EVT_SET(LVar0, NPC_Bootler) - EVT_EXEC_GET_TID(N(EVS_OffsetNpcScroll), LVarA) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, -540) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(10 * DT) - EVT_CALL(N(SetUnusedAlpha), 255) - EVT_CALL(SetNpcImgFXParams, NPC_Boo1, IMGFX_SET_ALPHA, 0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Boo2, IMGFX_SET_ALPHA, 0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Boo3, IMGFX_SET_ALPHA, 0, 0, 0, 0) - EVT_CALL(EnableNpcShadow, NPC_Boo1, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Boo2, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Boo3, FALSE) - EVT_CALL(NpcMoveTo, NPC_TubbasBody, -460, 0, 100 * DT) - EVT_EXEC_GET_TID(N(EVS_MoveBoosToTubbaBody), LVarB) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcPos, NPC_TubbasHeart, -260, 0, 0) - EVT_CALL(SetNpcJumpscale, NPC_TubbasHeart, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_TubbasHeart, -290, 0, 0, 10 * DT) - EVT_CALL(NpcJump0, NPC_TubbasHeart, -320, 0, 0, 10 * DT) - EVT_SET(LVar0, 53) - EVT_EXEC_GET_TID(N(EVS_OffsetNpcScroll), LVarC) - EVT_CALL(InterpNpcYaw, NPC_TubbasBody, 90, 0) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 255, 30 * DT, EASING_LINEAR) - EVT_LOOP(30 * DT) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcImgFXParams, NPC_Boo1, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Boo2, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Boo3, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EnableNpcShadow, NPC_Boo1, TRUE) - EVT_CALL(EnableNpcShadow, NPC_Boo2, TRUE) - EVT_CALL(EnableNpcShadow, NPC_Boo3, TRUE) - EVT_END_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_TubbasHeart, ANIM_TubbasHeart_Anim0B) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Bootler, ANIM_Bootler_Spook) - EVT_CALL(SetNpcAnimation, NPC_Boo1, ANIM_Boo_CarryWalk) - EVT_CALL(SetNpcAnimation, NPC_Boo2, ANIM_Boo_CarryWalk) - EVT_CALL(SetNpcAnimation, NPC_Boo3, ANIM_Boo_CarryWalk) - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_LOOP(6) - EVT_CALL(SetNpcAnimation, NPC_TubbasHeart, ANIM_TubbasHeart_Anim16) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, NPC_TubbasHeart, ANIM_TubbasHeart_Anim0B) - EVT_WAIT(10) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(60 * DT) - EVT_KILL_THREAD(LVarA) - EVT_THREAD - EVT_CALL(InterpNpcYaw, NPC_Bootler, 270, 0) - EVT_CALL(SetNpcAnimation, NPC_Bootler, ANIM_Bootler_Talk) - EVT_CALL(GetNpcPos, NPC_Bootler, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 180) - EVT_CALL(NpcMoveTo, NPC_Bootler, LVar0, LVar2, 60 * DT) - EVT_END_THREAD - EVT_KILL_THREAD(LVarB) - EVT_THREAD - EVT_CALL(InterpNpcYaw, NPC_TubbasBody, 270, 0) - EVT_CALL(GetNpcPos, NPC_TubbasBody, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 180) - EVT_CALL(NpcMoveTo, NPC_TubbasBody, LVar0, LVar2, 60 * DT) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(InterpNpcYaw, NPC_Boo1, 270, 0) - EVT_CALL(SetNpcAnimation, NPC_Boo1, ANIM_Boo_Wave) - EVT_CALL(GetNpcPos, NPC_Boo1, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 180) - EVT_CALL(NpcMoveTo, NPC_Boo1, LVar0, LVar2, 60 * DT) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(InterpNpcYaw, NPC_Boo2, 270, 0) - EVT_CALL(SetNpcAnimation, NPC_Boo2, ANIM_Boo_Wave) - EVT_CALL(GetNpcPos, NPC_Boo2, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 180) - EVT_CALL(NpcMoveTo, NPC_Boo2, LVar0, LVar2, 60 * DT) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(InterpNpcYaw, NPC_Boo3, 270, 0) - EVT_CALL(SetNpcAnimation, NPC_Boo3, ANIM_Boo_Wave) - EVT_CALL(GetNpcPos, NPC_Boo3, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 180) - EVT_CALL(NpcMoveTo, NPC_Boo3, LVar0, LVar2, 60 * DT) - EVT_END_THREAD - EVT_WAIT(30 * DT) - EVT_KILL_THREAD(LVarC) - EVT_CALL(SetNpcAnimation, NPC_TubbasHeart, ANIM_TubbasHeart_Anim0B) - EVT_CALL(GetNpcPos, NPC_TubbasHeart, LVar0, LVar1, LVar2) - EVT_LOOP(6) - EVT_SUB(LVar0, 45) - EVT_CALL(NpcJump0, NPC_TubbasHeart, LVar0, LVar1, LVar2, 15 * DT) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, -580) + BreakLoop + EndIf + EndLoop + Call(InterpNpcYaw, NPC_Bootler, 90, 0) + Set(LVar0, NPC_Bootler) + ExecGetTID(N(EVS_OffsetNpcScroll), LVarA) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, -540) + BreakLoop + EndIf + EndLoop + Wait(10 * DT) + Call(N(SetUnusedAlpha), 255) + Call(SetNpcImgFXParams, NPC_Boo1, IMGFX_SET_ALPHA, 0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Boo2, IMGFX_SET_ALPHA, 0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Boo3, IMGFX_SET_ALPHA, 0, 0, 0, 0) + Call(EnableNpcShadow, NPC_Boo1, FALSE) + Call(EnableNpcShadow, NPC_Boo2, FALSE) + Call(EnableNpcShadow, NPC_Boo3, FALSE) + Call(NpcMoveTo, NPC_TubbasBody, -460, 0, 100 * DT) + ExecGetTID(N(EVS_MoveBoosToTubbaBody), LVarB) + Wait(20 * DT) + Call(SetNpcPos, NPC_TubbasHeart, -260, 0, 0) + Call(SetNpcJumpscale, NPC_TubbasHeart, Float(1.0)) + Call(NpcJump0, NPC_TubbasHeart, -290, 0, 0, 10 * DT) + Call(NpcJump0, NPC_TubbasHeart, -320, 0, 0, 10 * DT) + Set(LVar0, 53) + ExecGetTID(N(EVS_OffsetNpcScroll), LVarC) + Call(InterpNpcYaw, NPC_TubbasBody, 90, 0) + Thread + Call(MakeLerp, 0, 255, 30 * DT, EASING_LINEAR) + Loop(30 * DT) + Call(UpdateLerp) + Call(SetNpcImgFXParams, NPC_Boo1, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Boo2, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Boo3, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + EndLoop + Call(EnableNpcShadow, NPC_Boo1, TRUE) + Call(EnableNpcShadow, NPC_Boo2, TRUE) + Call(EnableNpcShadow, NPC_Boo3, TRUE) + EndThread + Wait(30 * DT) + Call(SetNpcAnimation, NPC_TubbasHeart, ANIM_TubbasHeart_Anim0B) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_Bootler, ANIM_Bootler_Spook) + Call(SetNpcAnimation, NPC_Boo1, ANIM_Boo_CarryWalk) + Call(SetNpcAnimation, NPC_Boo2, ANIM_Boo_CarryWalk) + Call(SetNpcAnimation, NPC_Boo3, ANIM_Boo_CarryWalk) + Wait(10 * DT) + Thread + Loop(6) + Call(SetNpcAnimation, NPC_TubbasHeart, ANIM_TubbasHeart_Anim16) + Wait(5) + Call(SetNpcAnimation, NPC_TubbasHeart, ANIM_TubbasHeart_Anim0B) + Wait(10) + EndLoop + EndThread + Wait(60 * DT) + KillThread(LVarA) + Thread + Call(InterpNpcYaw, NPC_Bootler, 270, 0) + Call(SetNpcAnimation, NPC_Bootler, ANIM_Bootler_Talk) + Call(GetNpcPos, NPC_Bootler, LVar0, LVar1, LVar2) + Sub(LVar0, 180) + Call(NpcMoveTo, NPC_Bootler, LVar0, LVar2, 60 * DT) + EndThread + KillThread(LVarB) + Thread + Call(InterpNpcYaw, NPC_TubbasBody, 270, 0) + Call(GetNpcPos, NPC_TubbasBody, LVar0, LVar1, LVar2) + Sub(LVar0, 180) + Call(NpcMoveTo, NPC_TubbasBody, LVar0, LVar2, 60 * DT) + EndThread + Thread + Call(InterpNpcYaw, NPC_Boo1, 270, 0) + Call(SetNpcAnimation, NPC_Boo1, ANIM_Boo_Wave) + Call(GetNpcPos, NPC_Boo1, LVar0, LVar1, LVar2) + Sub(LVar0, 180) + Call(NpcMoveTo, NPC_Boo1, LVar0, LVar2, 60 * DT) + EndThread + Thread + Call(InterpNpcYaw, NPC_Boo2, 270, 0) + Call(SetNpcAnimation, NPC_Boo2, ANIM_Boo_Wave) + Call(GetNpcPos, NPC_Boo2, LVar0, LVar1, LVar2) + Sub(LVar0, 180) + Call(NpcMoveTo, NPC_Boo2, LVar0, LVar2, 60 * DT) + EndThread + Thread + Call(InterpNpcYaw, NPC_Boo3, 270, 0) + Call(SetNpcAnimation, NPC_Boo3, ANIM_Boo_Wave) + Call(GetNpcPos, NPC_Boo3, LVar0, LVar1, LVar2) + Sub(LVar0, 180) + Call(NpcMoveTo, NPC_Boo3, LVar0, LVar2, 60 * DT) + EndThread + Wait(30 * DT) + KillThread(LVarC) + Call(SetNpcAnimation, NPC_TubbasHeart, ANIM_TubbasHeart_Anim0B) + Call(GetNpcPos, NPC_TubbasHeart, LVar0, LVar1, LVar2) + Loop(6) + Sub(LVar0, 45) + Call(NpcJump0, NPC_TubbasHeart, LVar0, LVar1, LVar2, 15 * DT) + EndLoop + Return + End }; EvtScript N(EVS_ParadePhase_GoombaKing) = { - EVT_WAIT(1) - EVT_CALL(SetNpcRotation, NPC_GoombaKing, 0, 0, 180) - EVT_THREAD - EVT_LOOP(8) - EVT_CALL(NpcMoveTo, NPC_RedGoombaBros, -30, -28, 20) - EVT_CALL(NpcMoveTo, NPC_RedGoombaBros, -110, -28, 20) - EVT_END_LOOP - EVT_CALL(NpcMoveTo, NPC_RedGoombaBros, -30, -28, 20) - EVT_CALL(GetNpcPos, NPC_RedGoombaBros, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_RedGoombaBros, LVar0, LVar1, LVar2, 20) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(8) - EVT_CALL(NpcMoveTo, NPC_BlueGoombaBros, -110, -32, 20) - EVT_CALL(NpcMoveTo, NPC_BlueGoombaBros, -30, -32, 20) - EVT_END_LOOP - EVT_CALL(NpcMoveTo, NPC_BlueGoombaBros, -110, -32, 20) - EVT_CALL(GetNpcPos, NPC_BlueGoombaBros, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_BlueGoombaBros, LVar0, LVar1, LVar2, 20) - EVT_END_THREAD - EVT_LOOP(16) - EVT_CALL(ShowSweat, NPC_RedGoombaBros, 0, 45, EMOTER_NPC, 0, 0, 0, 0, 20) - EVT_CALL(ShowSweat, NPC_BlueGoombaBros, 0, -45, EMOTER_NPC, 0, 0, 0, 0, 20) - EVT_WAIT(10) - EVT_CALL(ShowSweat, NPC_RedGoombaBros, 0, -45, EMOTER_NPC, 0, 0, 0, 0, 20) - EVT_CALL(ShowSweat, NPC_BlueGoombaBros, 0, 45, EMOTER_NPC, 0, 0, 0, 0, 20) - EVT_WAIT(10) - EVT_END_LOOP - EVT_CALL(SetNpcFlagBits, NPC_GoombaKing, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcAnimation, NPC_GoombaKing, ANIM_GoombaKing_Dead) - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_GoombaKing, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar1, 80) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, LVar0, 0, LVar2) - EVT_CALL(SetNpcFlagBits, NPC_GoombaKing, NPC_FLAG_GRAVITY, FALSE) - EVT_WAIT(60) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_GoombaKing, ANIM_GoombaKing_Angry) - EVT_CALL(MakeLerp, 180, 360, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_GoombaKing, 0, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(GetNpcPos, NPC_GoombaKing, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_GoombaKing, EVT_FLOAT(0.5)) - EVT_CALL(NpcJump0, NPC_GoombaKing, LVar0, 0, 0, 20) - EVT_WAIT(30) - EVT_THREAD - EVT_CALL(NpcMoveTo, NPC_RedGoombaBros, -30, 0, 15) - EVT_CALL(NpcMoveTo, NPC_RedGoombaBros, -210, 0, 180) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(NpcMoveTo, NPC_BlueGoombaBros, -30, 0, 55) - EVT_CALL(NpcMoveTo, NPC_BlueGoombaBros, -170, 0, 140) - EVT_END_THREAD - EVT_CALL(NpcMoveTo, NPC_GoombaKing, -250, 0, 180) - EVT_RETURN - EVT_END + Wait(1) + Call(SetNpcRotation, NPC_GoombaKing, 0, 0, 180) + Thread + Loop(8) + Call(NpcMoveTo, NPC_RedGoombaBros, -30, -28, 20) + Call(NpcMoveTo, NPC_RedGoombaBros, -110, -28, 20) + EndLoop + Call(NpcMoveTo, NPC_RedGoombaBros, -30, -28, 20) + Call(GetNpcPos, NPC_RedGoombaBros, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_RedGoombaBros, LVar0, LVar1, LVar2, 20) + EndThread + Thread + Loop(8) + Call(NpcMoveTo, NPC_BlueGoombaBros, -110, -32, 20) + Call(NpcMoveTo, NPC_BlueGoombaBros, -30, -32, 20) + EndLoop + Call(NpcMoveTo, NPC_BlueGoombaBros, -110, -32, 20) + Call(GetNpcPos, NPC_BlueGoombaBros, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_BlueGoombaBros, LVar0, LVar1, LVar2, 20) + EndThread + Loop(16) + Call(ShowSweat, NPC_RedGoombaBros, 0, 45, EMOTER_NPC, 0, 0, 0, 0, 20) + Call(ShowSweat, NPC_BlueGoombaBros, 0, -45, EMOTER_NPC, 0, 0, 0, 0, 20) + Wait(10) + Call(ShowSweat, NPC_RedGoombaBros, 0, -45, EMOTER_NPC, 0, 0, 0, 0, 20) + Call(ShowSweat, NPC_BlueGoombaBros, 0, 45, EMOTER_NPC, 0, 0, 0, 0, 20) + Wait(10) + EndLoop + Call(SetNpcFlagBits, NPC_GoombaKing, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcAnimation, NPC_GoombaKing, ANIM_GoombaKing_Dead) + Loop(0) + Call(GetNpcPos, NPC_GoombaKing, LVar0, LVar1, LVar2) + IfLt(LVar1, 80) + BreakLoop + EndIf + Wait(1) + EndLoop + PlayEffect(EFFECT_LANDING_DUST, 4, LVar0, 0, LVar2) + Call(SetNpcFlagBits, NPC_GoombaKing, NPC_FLAG_GRAVITY, FALSE) + Wait(60) + Thread + Call(SetNpcAnimation, NPC_GoombaKing, ANIM_GoombaKing_Angry) + Call(MakeLerp, 180, 360, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_GoombaKing, 0, 0, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(GetNpcPos, NPC_GoombaKing, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_GoombaKing, Float(0.5)) + Call(NpcJump0, NPC_GoombaKing, LVar0, 0, 0, 20) + Wait(30) + Thread + Call(NpcMoveTo, NPC_RedGoombaBros, -30, 0, 15) + Call(NpcMoveTo, NPC_RedGoombaBros, -210, 0, 180) + EndThread + Thread + Call(NpcMoveTo, NPC_BlueGoombaBros, -30, 0, 55) + Call(NpcMoveTo, NPC_BlueGoombaBros, -170, 0, 140) + EndThread + Call(NpcMoveTo, NPC_GoombaKing, -250, 0, 180) + Return + End }; diff --git a/src/world/area_end/end_00/end_00_8_yoshis.c b/src/world/area_end/end_00/end_00_8_yoshis.c index 9274b4d3cbb..50d27e3a6a5 100644 --- a/src/world/area_end/end_00/end_00_8_yoshis.c +++ b/src/world/area_end/end_00/end_00_8_yoshis.c @@ -1,50 +1,50 @@ #include "end_00.h" EvtScript N(EVS_ParadePhase_Yoshis) = { - EVT_CHILD_THREAD - EVT_CALL(EnableTexPanning, MODEL_o119, TRUE) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 512) - EVT_CALL(SetTexPanOffset, TEX_PANNER_4, TEX_PANNER_AUX, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(SetNpcScale, NPC_RaphaelRaven, EVT_FLOAT(2.0), EVT_FLOAT(2.0), 1) - EVT_LOOP(0) - EVT_CALL(NpcFlyTo, NPC_RaphaelRaven, 357, 0, -30, 10, 0, EASING_LINEAR) - EVT_WAIT(60) - EVT_CALL(NpcFlyTo, NPC_RaphaelRaven, 357, -120, -30, 10, 0, EASING_LINEAR) - EVT_WAIT(60) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(GetNpcPos, NPC_LavaPiranha, LVar0, LVar1, LVar2) - EVT_LOOP(0) - EVT_WAIT(60) - EVT_LOOP(10) - EVT_ADD(LVar0, 5) - EVT_ADD(LVar1, 5) - EVT_CALL(SetNpcPos, NPC_LavaPiranha, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(60) - EVT_LOOP(10) - EVT_SUB(LVar0, 5) - EVT_SUB(LVar1, 5) - EVT_CALL(SetNpcPos, NPC_LavaPiranha, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, 800) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + ChildThread + Call(EnableTexPanning, MODEL_o119, TRUE) + Set(LVar0, 0) + Loop(0) + Add(LVar0, 512) + Call(SetTexPanOffset, TEX_PANNER_4, TEX_PANNER_AUX, LVar0, 0) + Wait(1) + EndLoop + EndChildThread + ChildThread + Call(SetNpcScale, NPC_RaphaelRaven, Float(2.0), Float(2.0), 1) + Loop(0) + Call(NpcFlyTo, NPC_RaphaelRaven, 357, 0, -30, 10, 0, EASING_LINEAR) + Wait(60) + Call(NpcFlyTo, NPC_RaphaelRaven, 357, -120, -30, 10, 0, EASING_LINEAR) + Wait(60) + EndLoop + EndChildThread + ChildThread + Call(GetNpcPos, NPC_LavaPiranha, LVar0, LVar1, LVar2) + Loop(0) + Wait(60) + Loop(10) + Add(LVar0, 5) + Add(LVar1, 5) + Call(SetNpcPos, NPC_LavaPiranha, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Wait(60) + Loop(10) + Sub(LVar0, 5) + Sub(LVar1, 5) + Call(SetNpcPos, NPC_LavaPiranha, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndLoop + EndChildThread + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, 800) + BreakLoop + EndIf + EndLoop + Return + End }; diff --git a/src/world/area_end/end_00/end_00_9_huff_n_puff.c b/src/world/area_end/end_00/end_00_9_huff_n_puff.c index 3a98cb72160..3bf637c8986 100644 --- a/src/world/area_end/end_00/end_00_9_huff_n_puff.c +++ b/src/world/area_end/end_00/end_00_9_huff_n_puff.c @@ -4,445 +4,445 @@ extern EvtScript N(EVS_SetNpcShadowScale); EvtScript N(EVS_HoldPosition_Yoshis) = { - EVT_CALL(GetNpcPos, NPC_YoshiKidGreen, LVar0, LVar1, LVar2) - EVT_SETF(LVar0, LVar0) - EVT_SETF(LVar3, LVar0) - EVT_SUBF(LVar3, 40) - EVT_SETF(LVar4, LVar0) - EVT_SUBF(LVar4, 80) - EVT_SETF(LVar5, LVar0) - EVT_SUBF(LVar5, 120) - EVT_SETF(LVar6, LVar0) - EVT_SUBF(LVar6, 160) - EVT_CALL(SetNpcPos, NPC_YoshiKidGreen, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_YoshiKidBlue, LVar3, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_YoshiKidPurple, LVar4, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_YoshiKidYellow, LVar5, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_YoshiKidRed, LVar6, LVar1, LVar2) - EVT_CHILD_THREAD - EVT_CALL(N(AddScrollToNpcPos), NPC_YoshiKidBlue) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(N(AddScrollToNpcPos), NPC_YoshiKidPurple) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(N(AddScrollToNpcPos), NPC_YoshiKidYellow) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(N(AddScrollToNpcPos), NPC_YoshiKidRed) - EVT_END_CHILD_THREAD - EVT_CALL(N(AddScrollToNpcPos), NPC_YoshiKidGreen) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_YoshiKidGreen, LVar0, LVar1, LVar2) + SetF(LVar0, LVar0) + SetF(LVar3, LVar0) + SubF(LVar3, 40) + SetF(LVar4, LVar0) + SubF(LVar4, 80) + SetF(LVar5, LVar0) + SubF(LVar5, 120) + SetF(LVar6, LVar0) + SubF(LVar6, 160) + Call(SetNpcPos, NPC_YoshiKidGreen, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_YoshiKidBlue, LVar3, LVar1, LVar2) + Call(SetNpcPos, NPC_YoshiKidPurple, LVar4, LVar1, LVar2) + Call(SetNpcPos, NPC_YoshiKidYellow, LVar5, LVar1, LVar2) + Call(SetNpcPos, NPC_YoshiKidRed, LVar6, LVar1, LVar2) + ChildThread + Call(N(AddScrollToNpcPos), NPC_YoshiKidBlue) + EndChildThread + ChildThread + Call(N(AddScrollToNpcPos), NPC_YoshiKidPurple) + EndChildThread + ChildThread + Call(N(AddScrollToNpcPos), NPC_YoshiKidYellow) + EndChildThread + ChildThread + Call(N(AddScrollToNpcPos), NPC_YoshiKidRed) + EndChildThread + Call(N(AddScrollToNpcPos), NPC_YoshiKidGreen) + Return + End }; EvtScript N(EVS_HoldPosition_Puffs) = { - EVT_CALL(GetNpcPos, NPC_HuffNPuffBody, LVar0, LVar1, LVar2) - EVT_SETF(LVar0, LVar0) - EVT_SETF(LVar3, LVar0) - EVT_ADDF(LVar3, 80) - EVT_SETF(LVar4, LVar0) - EVT_SUBF(LVar4, 80) - EVT_CALL(SetNpcPos, NPC_HuffNPuffBody, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_HuffNPuffFace, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_HuffNPuffArms, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_RuffPuff1, LVar3, 60, 0) - EVT_CALL(SetNpcPos, NPC_RuffPuff2, LVar4, 60, 0) - EVT_CHILD_THREAD - EVT_CALL(N(AddScrollToNpcPos), NPC_HuffNPuffFace) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(N(AddScrollToNpcPos), NPC_HuffNPuffArms) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(N(AddScrollToNpcPos), NPC_RuffPuff1) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(N(AddScrollToNpcPos), NPC_RuffPuff2) - EVT_END_CHILD_THREAD - EVT_CALL(N(AddScrollToNpcPos), NPC_HuffNPuffBody) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_HuffNPuffBody, LVar0, LVar1, LVar2) + SetF(LVar0, LVar0) + SetF(LVar3, LVar0) + AddF(LVar3, 80) + SetF(LVar4, LVar0) + SubF(LVar4, 80) + Call(SetNpcPos, NPC_HuffNPuffBody, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_HuffNPuffFace, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_HuffNPuffArms, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_RuffPuff1, LVar3, 60, 0) + Call(SetNpcPos, NPC_RuffPuff2, LVar4, 60, 0) + ChildThread + Call(N(AddScrollToNpcPos), NPC_HuffNPuffFace) + EndChildThread + ChildThread + Call(N(AddScrollToNpcPos), NPC_HuffNPuffArms) + EndChildThread + ChildThread + Call(N(AddScrollToNpcPos), NPC_RuffPuff1) + EndChildThread + ChildThread + Call(N(AddScrollToNpcPos), NPC_RuffPuff2) + EndChildThread + Call(N(AddScrollToNpcPos), NPC_HuffNPuffBody) + Return + End }; EvtScript N(EVS_Puffs_Surprise) = { - EVT_CALL(SetNpcAnimation, NPC_HuffNPuffBody, ANIM_HuffNPuff_Anim26) - EVT_CALL(SetNpcAnimation, NPC_HuffNPuffFace, ANIM_HuffNPuff_Anim27) - EVT_CALL(SetNpcAnimation, NPC_HuffNPuffArms, ANIM_HuffNPuff_Anim28) - EVT_CALL(SetNpcAnimation, NPC_RuffPuff1, ANIM_RuffPuff_Blush) - EVT_CALL(SetNpcAnimation, NPC_RuffPuff2, ANIM_RuffPuff_Blush) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_HuffNPuffBody, ANIM_HuffNPuff_Anim26) + Call(SetNpcAnimation, NPC_HuffNPuffFace, ANIM_HuffNPuff_Anim27) + Call(SetNpcAnimation, NPC_HuffNPuffArms, ANIM_HuffNPuff_Anim28) + Call(SetNpcAnimation, NPC_RuffPuff1, ANIM_RuffPuff_Blush) + Call(SetNpcAnimation, NPC_RuffPuff2, ANIM_RuffPuff_Blush) + Return + End }; EvtScript N(EVS_Puffs_Hurt) = { - EVT_CALL(SetNpcAnimation, NPC_HuffNPuffBody, ANIM_HuffNPuff_Anim07) - EVT_CALL(SetNpcAnimation, NPC_HuffNPuffFace, ANIM_HuffNPuff_Anim08) - EVT_CALL(SetNpcAnimation, NPC_HuffNPuffArms, ANIM_HuffNPuff_Anim09) - EVT_CALL(SetNpcAnimation, NPC_RuffPuff1, ANIM_RuffPuff_Hurt) - EVT_CALL(SetNpcAnimation, NPC_RuffPuff2, ANIM_RuffPuff_Hurt) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_HuffNPuffBody, ANIM_HuffNPuff_Anim07) + Call(SetNpcAnimation, NPC_HuffNPuffFace, ANIM_HuffNPuff_Anim08) + Call(SetNpcAnimation, NPC_HuffNPuffArms, ANIM_HuffNPuff_Anim09) + Call(SetNpcAnimation, NPC_RuffPuff1, ANIM_RuffPuff_Hurt) + Call(SetNpcAnimation, NPC_RuffPuff2, ANIM_RuffPuff_Hurt) + Return + End }; EvtScript N(EVS_Puffs_Retreat) = { - EVT_CALL(GetNpcPos, NPC_HuffNPuffBody, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar0) - EVT_ADD(LVar3, 80) - EVT_SET(LVar4, LVar0) - EVT_ADD(LVar4, -80) - EVT_LOOP(10) - EVT_ADD(LVar0, -2) - EVT_CALL(SetNpcPos, NPC_HuffNPuffBody, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_HuffNPuffFace, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_HuffNPuffArms, LVar0, LVar1, LVar2) - EVT_ADD(LVar3, -2) - EVT_CALL(SetNpcPos, NPC_RuffPuff1, LVar3, 60, 0) - EVT_ADD(LVar4, -2) - EVT_CALL(SetNpcPos, NPC_RuffPuff2, LVar4, 60, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_HuffNPuffBody, LVar0, LVar1, LVar2) + Set(LVar3, LVar0) + Add(LVar3, 80) + Set(LVar4, LVar0) + Add(LVar4, -80) + Loop(10) + Add(LVar0, -2) + Call(SetNpcPos, NPC_HuffNPuffBody, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_HuffNPuffFace, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_HuffNPuffArms, LVar0, LVar1, LVar2) + Add(LVar3, -2) + Call(SetNpcPos, NPC_RuffPuff1, LVar3, 60, 0) + Add(LVar4, -2) + Call(SetNpcPos, NPC_RuffPuff2, LVar4, 60, 0) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_GourmetGuy_Enter) = { - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcPos, NPC_YoshiKidGreen, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, 1060) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(GetNpcPos, NPC_RuffPuff2, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcSpeed, NPC_GourmetGuy, EVT_FLOAT(1.0)) - EVT_CALL(NpcMoveTo, NPC_GourmetGuy, LVar0, -20, 0) - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Idle) - EVT_CALL(N(AddScrollToNpcPos), NPC_GourmetGuy) - EVT_RETURN - EVT_END + Loop(0) + Wait(1) + Call(GetNpcPos, NPC_YoshiKidGreen, LVar0, LVar1, LVar2) + IfGt(LVar0, 1060) + BreakLoop + EndIf + EndLoop + Call(GetNpcPos, NPC_RuffPuff2, LVar0, LVar1, LVar2) + Call(SetNpcSpeed, NPC_GourmetGuy, Float(1.0)) + Call(NpcMoveTo, NPC_GourmetGuy, LVar0, -20, 0) + Call(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Idle) + Call(N(AddScrollToNpcPos), NPC_GourmetGuy) + Return + End }; EvtScript N(EVS_HoldPosition_GourmetGuy) = { - EVT_CALL(N(AddScrollToNpcPos), NPC_GourmetGuy) - EVT_RETURN - EVT_END + Call(N(AddScrollToNpcPos), NPC_GourmetGuy) + Return + End }; EvtScript N(EVS_YoshiKids) = { - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcJumpscale, NPC_YoshiKidGreen, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_YoshiKidGreen, 680, 0, 0, 20 * DT) - EVT_CALL(NpcJump0, NPC_YoshiKidGreen, 740, 0, 0, 10 * DT) - EVT_CALL(SetNpcAnimation, NPC_YoshiKidGreen, ANIM_YoshiKid_Green_Idle) - EVT_LOOP(2) - EVT_CALL(InterpNpcYaw, NPC_YoshiKidGreen, 270, 7 * DT) - EVT_WAIT(10 * DT) - EVT_CALL(InterpNpcYaw, NPC_YoshiKidGreen, 90, 7 * DT) - EVT_WAIT(10 * DT) - EVT_END_LOOP - EVT_CALL(InterpNpcYaw, NPC_YoshiKidGreen, 270, 7 * DT) - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_YoshiKidGreen, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_YoshiKidGreen, LVar0, LVar1, LVar2, 7) - EVT_CALL(SetNpcAnimation, NPC_YoshiKidGreen, ANIM_YoshiKid_Green_Run) - EVT_CALL(NpcMoveTo, NPC_YoshiKidGreen, 980, 0, 60 * DT) - EVT_CALL(SetNpcAnimation, NPC_YoshiKidGreen, ANIM_YoshiKid_Green_LookUp) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcPos, NPC_YoshiKidBlue, 660, 0, 0) - EVT_CALL(NpcMoveTo, NPC_YoshiKidBlue, 940, 0, 70 * DT) - EVT_CALL(SetNpcAnimation, NPC_YoshiKidBlue, ANIM_YoshiKid_Blue_LookUp) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcPos, NPC_YoshiKidPurple, 660, 0, 0) - EVT_CALL(NpcMoveTo, NPC_YoshiKidPurple, 900, 0, 60 * DT) - EVT_CALL(SetNpcAnimation, NPC_YoshiKidPurple, ANIM_YoshiKid_Purple_LookUp) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcPos, NPC_YoshiKidYellow, 660, 0, 0) - EVT_CALL(NpcMoveTo, NPC_YoshiKidYellow, 860, 0, 50 * DT) - EVT_CALL(SetNpcAnimation, NPC_YoshiKidYellow, ANIM_YoshiKid_Yellow_LookUp) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcPos, NPC_YoshiKidRed, 660, 0, 0) - EVT_CALL(NpcMoveTo, NPC_YoshiKidRed, 820, 0, 40 * DT) - EVT_CALL(SetNpcAnimation, NPC_YoshiKidRed, ANIM_YoshiKid_Red_LookUp) - EVT_END_THREAD - EVT_WAIT(70 * DT) - EVT_EXEC_GET_TID(N(EVS_HoldPosition_Yoshis), LVarA) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcPos, NPC_YoshiKidGreen, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, 0x00000424) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_YoshiKidGreen, ANIM_YoshiKid_Green_Idle) - EVT_CALL(SetNpcAnimation, NPC_YoshiKidBlue, ANIM_YoshiKid_Blue_Idle) - EVT_CALL(SetNpcAnimation, NPC_YoshiKidPurple, ANIM_YoshiKid_Purple_Idle) - EVT_CALL(SetNpcAnimation, NPC_YoshiKidYellow, ANIM_YoshiKid_Yellow_Idle) - EVT_CALL(SetNpcAnimation, NPC_YoshiKidRed, ANIM_YoshiKid_Red_Idle) - EVT_CALL(InterpNpcYaw, NPC_YoshiKidGreen, 270, 0) - EVT_WAIT(5 * DT) - EVT_LOOP(3) - EVT_CALL(InterpNpcYaw, NPC_YoshiKidPurple, 270, 0) - EVT_WAIT(5 * DT) - EVT_CALL(InterpNpcYaw, NPC_YoshiKidBlue, 270, 0) - EVT_WAIT(5 * DT) - EVT_CALL(InterpNpcYaw, NPC_YoshiKidYellow, 270, 0) - EVT_WAIT(5 * DT) - EVT_CALL(InterpNpcYaw, NPC_YoshiKidPurple, 90, 0) - EVT_WAIT(5 * DT) - EVT_CALL(InterpNpcYaw, NPC_YoshiKidBlue, 90, 0) - EVT_WAIT(5 * DT) - EVT_CALL(InterpNpcYaw, NPC_YoshiKidYellow, 90, 0) - EVT_WAIT(5 * DT) - EVT_END_LOOP - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_HUFF_PUFF + 310) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcYaw, NPC_YoshiKidGreen, 270) - EVT_CALL(SetNpcAnimation, NPC_YoshiKidGreen, ANIM_YoshiKid_Green_EatMiss) - EVT_CALL(SetNpcYaw, NPC_YoshiKidBlue, 270) - EVT_CALL(SetNpcAnimation, NPC_YoshiKidBlue, ANIM_YoshiKid_Blue_EatMiss) - EVT_CALL(SetNpcYaw, NPC_YoshiKidPurple, 90) - EVT_CALL(SetNpcAnimation, NPC_YoshiKidPurple, ANIM_YoshiKid_Purple_EatMiss) - EVT_CALL(SetNpcYaw, NPC_YoshiKidYellow, 90) - EVT_CALL(SetNpcAnimation, NPC_YoshiKidYellow, ANIM_YoshiKid_Yellow_EatMiss) - EVT_CALL(SetNpcYaw, NPC_YoshiKidRed, 90) - EVT_CALL(SetNpcAnimation, NPC_YoshiKidRed, ANIM_YoshiKid_Red_EatMiss) - EVT_WAIT(10 * DT) - EVT_EXEC(N(EVS_Puffs_Hurt)) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_HuffNPuffBody, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_RING, 0, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_RuffPuff1, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_RING, 0, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_RuffPuff2, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_RING, 0, LVar0, LVar1, LVar2) - EVT_CALL(MakeLerp, 750, 375, 5, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, LVar0) - EVT_DIVF(LVar2, 1000) - EVT_CALL(SetNpcScale, NPC_HuffNPuffBody, LVar2, LVar2, 1) - EVT_CALL(SetNpcScale, NPC_HuffNPuffFace, LVar2, LVar2, 1) - EVT_CALL(SetNpcScale, NPC_HuffNPuffArms, LVar2, LVar2, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 100, 50, 5, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, LVar0) - EVT_DIVF(LVar2, 100) - EVT_CALL(SetNpcScale, NPC_RuffPuff1, LVar2, LVar2, 1) - EVT_CALL(SetNpcScale, NPC_RuffPuff2, LVar2, LVar2, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 600, 300, 5, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, LVar0) - EVT_DIVF(LVar2, 100) - EVT_SET(LVar0, 69) - EVT_EXEC(N(EVS_SetNpcShadowScale)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(40 * DT) - EVT_CALL(SetNpcAnimation, NPC_YoshiKidGreen, ANIM_YoshiKid_Green_Exhale) - EVT_CALL(SetNpcAnimation, NPC_YoshiKidBlue, ANIM_YoshiKid_Blue_Exhale) - EVT_CALL(SetNpcAnimation, NPC_YoshiKidPurple, ANIM_YoshiKid_Purple_Exhale) - EVT_CALL(SetNpcAnimation, NPC_YoshiKidYellow, ANIM_YoshiKid_Yellow_Exhale) - EVT_CALL(SetNpcAnimation, NPC_YoshiKidRed, ANIM_YoshiKid_Red_Exhale) - EVT_WAIT(50 * DT) - EVT_KILL_THREAD(LVarA) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_YoshiKidGreen, ANIM_YoshiKid_Green_Run) - EVT_CALL(GetNpcPos, NPC_YoshiKidGreen, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 300) - EVT_CALL(NpcMoveTo, NPC_YoshiKidGreen, LVar0, LVar2, 75 * DT) - EVT_CALL(SetNpcPos, NPC_YoshiKidGreen, 0, -500, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_YoshiKidBlue, ANIM_YoshiKid_Blue_Run) - EVT_CALL(GetNpcPos, NPC_YoshiKidBlue, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 300) - EVT_CALL(NpcMoveTo, NPC_YoshiKidBlue, LVar0, LVar2, 75 * DT) - EVT_CALL(SetNpcPos, NPC_YoshiKidBlue, 0, -500, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_YoshiKidPurple, ANIM_YoshiKid_Purple_Run) - EVT_CALL(GetNpcPos, NPC_YoshiKidPurple, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 300) - EVT_CALL(NpcMoveTo, NPC_YoshiKidPurple, LVar0, LVar2, 75 * DT) - EVT_CALL(SetNpcPos, NPC_YoshiKidPurple, 0, -500, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_YoshiKidYellow, ANIM_YoshiKid_Yellow_Run) - EVT_CALL(GetNpcPos, NPC_YoshiKidYellow, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 300) - EVT_CALL(NpcMoveTo, NPC_YoshiKidYellow, LVar0, LVar2, 75 * DT) - EVT_CALL(SetNpcPos, NPC_YoshiKidYellow, 0, -500, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_YoshiKidRed, ANIM_YoshiKid_Red_Run) - EVT_CALL(GetNpcPos, NPC_YoshiKidRed, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 300) - EVT_CALL(NpcMoveTo, NPC_YoshiKidRed, LVar0, LVar2, 75 * DT) - EVT_CALL(SetNpcPos, NPC_YoshiKidRed, 0, -500, 0) - EVT_END_THREAD - EVT_RETURN - EVT_END + Wait(20 * DT) + Call(SetNpcJumpscale, NPC_YoshiKidGreen, Float(1.0)) + Call(NpcJump0, NPC_YoshiKidGreen, 680, 0, 0, 20 * DT) + Call(NpcJump0, NPC_YoshiKidGreen, 740, 0, 0, 10 * DT) + Call(SetNpcAnimation, NPC_YoshiKidGreen, ANIM_YoshiKid_Green_Idle) + Loop(2) + Call(InterpNpcYaw, NPC_YoshiKidGreen, 270, 7 * DT) + Wait(10 * DT) + Call(InterpNpcYaw, NPC_YoshiKidGreen, 90, 7 * DT) + Wait(10 * DT) + EndLoop + Call(InterpNpcYaw, NPC_YoshiKidGreen, 270, 7 * DT) + Wait(10 * DT) + Thread + Call(GetNpcPos, NPC_YoshiKidGreen, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_YoshiKidGreen, LVar0, LVar1, LVar2, 7) + Call(SetNpcAnimation, NPC_YoshiKidGreen, ANIM_YoshiKid_Green_Run) + Call(NpcMoveTo, NPC_YoshiKidGreen, 980, 0, 60 * DT) + Call(SetNpcAnimation, NPC_YoshiKidGreen, ANIM_YoshiKid_Green_LookUp) + EndThread + Thread + Call(SetNpcPos, NPC_YoshiKidBlue, 660, 0, 0) + Call(NpcMoveTo, NPC_YoshiKidBlue, 940, 0, 70 * DT) + Call(SetNpcAnimation, NPC_YoshiKidBlue, ANIM_YoshiKid_Blue_LookUp) + EndThread + Thread + Wait(10 * DT) + Call(SetNpcPos, NPC_YoshiKidPurple, 660, 0, 0) + Call(NpcMoveTo, NPC_YoshiKidPurple, 900, 0, 60 * DT) + Call(SetNpcAnimation, NPC_YoshiKidPurple, ANIM_YoshiKid_Purple_LookUp) + EndThread + Thread + Wait(20 * DT) + Call(SetNpcPos, NPC_YoshiKidYellow, 660, 0, 0) + Call(NpcMoveTo, NPC_YoshiKidYellow, 860, 0, 50 * DT) + Call(SetNpcAnimation, NPC_YoshiKidYellow, ANIM_YoshiKid_Yellow_LookUp) + EndThread + Thread + Wait(30 * DT) + Call(SetNpcPos, NPC_YoshiKidRed, 660, 0, 0) + Call(NpcMoveTo, NPC_YoshiKidRed, 820, 0, 40 * DT) + Call(SetNpcAnimation, NPC_YoshiKidRed, ANIM_YoshiKid_Red_LookUp) + EndThread + Wait(70 * DT) + ExecGetTID(N(EVS_HoldPosition_Yoshis), LVarA) + Loop(0) + Wait(1) + Call(GetNpcPos, NPC_YoshiKidGreen, LVar0, LVar1, LVar2) + IfGt(LVar0, 0x00000424) + BreakLoop + EndIf + EndLoop + Call(SetNpcAnimation, NPC_YoshiKidGreen, ANIM_YoshiKid_Green_Idle) + Call(SetNpcAnimation, NPC_YoshiKidBlue, ANIM_YoshiKid_Blue_Idle) + Call(SetNpcAnimation, NPC_YoshiKidPurple, ANIM_YoshiKid_Purple_Idle) + Call(SetNpcAnimation, NPC_YoshiKidYellow, ANIM_YoshiKid_Yellow_Idle) + Call(SetNpcAnimation, NPC_YoshiKidRed, ANIM_YoshiKid_Red_Idle) + Call(InterpNpcYaw, NPC_YoshiKidGreen, 270, 0) + Wait(5 * DT) + Loop(3) + Call(InterpNpcYaw, NPC_YoshiKidPurple, 270, 0) + Wait(5 * DT) + Call(InterpNpcYaw, NPC_YoshiKidBlue, 270, 0) + Wait(5 * DT) + Call(InterpNpcYaw, NPC_YoshiKidYellow, 270, 0) + Wait(5 * DT) + Call(InterpNpcYaw, NPC_YoshiKidPurple, 90, 0) + Wait(5 * DT) + Call(InterpNpcYaw, NPC_YoshiKidBlue, 90, 0) + Wait(5 * DT) + Call(InterpNpcYaw, NPC_YoshiKidYellow, 90, 0) + Wait(5 * DT) + EndLoop + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_HUFF_PUFF + 310) + BreakLoop + EndIf + EndLoop + Call(SetNpcYaw, NPC_YoshiKidGreen, 270) + Call(SetNpcAnimation, NPC_YoshiKidGreen, ANIM_YoshiKid_Green_EatMiss) + Call(SetNpcYaw, NPC_YoshiKidBlue, 270) + Call(SetNpcAnimation, NPC_YoshiKidBlue, ANIM_YoshiKid_Blue_EatMiss) + Call(SetNpcYaw, NPC_YoshiKidPurple, 90) + Call(SetNpcAnimation, NPC_YoshiKidPurple, ANIM_YoshiKid_Purple_EatMiss) + Call(SetNpcYaw, NPC_YoshiKidYellow, 90) + Call(SetNpcAnimation, NPC_YoshiKidYellow, ANIM_YoshiKid_Yellow_EatMiss) + Call(SetNpcYaw, NPC_YoshiKidRed, 90) + Call(SetNpcAnimation, NPC_YoshiKidRed, ANIM_YoshiKid_Red_EatMiss) + Wait(10 * DT) + Exec(N(EVS_Puffs_Hurt)) + Thread + Call(GetNpcPos, NPC_HuffNPuffBody, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_RING, 0, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_RuffPuff1, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_RING, 0, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_RuffPuff2, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_RING, 0, LVar0, LVar1, LVar2) + Call(MakeLerp, 750, 375, 5, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, LVar0) + DivF(LVar2, 1000) + Call(SetNpcScale, NPC_HuffNPuffBody, LVar2, LVar2, 1) + Call(SetNpcScale, NPC_HuffNPuffFace, LVar2, LVar2, 1) + Call(SetNpcScale, NPC_HuffNPuffArms, LVar2, LVar2, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(MakeLerp, 100, 50, 5, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, LVar0) + DivF(LVar2, 100) + Call(SetNpcScale, NPC_RuffPuff1, LVar2, LVar2, 1) + Call(SetNpcScale, NPC_RuffPuff2, LVar2, LVar2, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(MakeLerp, 600, 300, 5, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, LVar0) + DivF(LVar2, 100) + Set(LVar0, 69) + Exec(N(EVS_SetNpcShadowScale)) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Wait(40 * DT) + Call(SetNpcAnimation, NPC_YoshiKidGreen, ANIM_YoshiKid_Green_Exhale) + Call(SetNpcAnimation, NPC_YoshiKidBlue, ANIM_YoshiKid_Blue_Exhale) + Call(SetNpcAnimation, NPC_YoshiKidPurple, ANIM_YoshiKid_Purple_Exhale) + Call(SetNpcAnimation, NPC_YoshiKidYellow, ANIM_YoshiKid_Yellow_Exhale) + Call(SetNpcAnimation, NPC_YoshiKidRed, ANIM_YoshiKid_Red_Exhale) + Wait(50 * DT) + KillThread(LVarA) + Thread + Call(SetNpcAnimation, NPC_YoshiKidGreen, ANIM_YoshiKid_Green_Run) + Call(GetNpcPos, NPC_YoshiKidGreen, LVar0, LVar1, LVar2) + Add(LVar0, 300) + Call(NpcMoveTo, NPC_YoshiKidGreen, LVar0, LVar2, 75 * DT) + Call(SetNpcPos, NPC_YoshiKidGreen, 0, -500, 0) + EndThread + Thread + Call(SetNpcAnimation, NPC_YoshiKidBlue, ANIM_YoshiKid_Blue_Run) + Call(GetNpcPos, NPC_YoshiKidBlue, LVar0, LVar1, LVar2) + Add(LVar0, 300) + Call(NpcMoveTo, NPC_YoshiKidBlue, LVar0, LVar2, 75 * DT) + Call(SetNpcPos, NPC_YoshiKidBlue, 0, -500, 0) + EndThread + Thread + Call(SetNpcAnimation, NPC_YoshiKidPurple, ANIM_YoshiKid_Purple_Run) + Call(GetNpcPos, NPC_YoshiKidPurple, LVar0, LVar1, LVar2) + Add(LVar0, 300) + Call(NpcMoveTo, NPC_YoshiKidPurple, LVar0, LVar2, 75 * DT) + Call(SetNpcPos, NPC_YoshiKidPurple, 0, -500, 0) + EndThread + Thread + Call(SetNpcAnimation, NPC_YoshiKidYellow, ANIM_YoshiKid_Yellow_Run) + Call(GetNpcPos, NPC_YoshiKidYellow, LVar0, LVar1, LVar2) + Add(LVar0, 300) + Call(NpcMoveTo, NPC_YoshiKidYellow, LVar0, LVar2, 75 * DT) + Call(SetNpcPos, NPC_YoshiKidYellow, 0, -500, 0) + EndThread + Thread + Call(SetNpcAnimation, NPC_YoshiKidRed, ANIM_YoshiKid_Red_Run) + Call(GetNpcPos, NPC_YoshiKidRed, LVar0, LVar1, LVar2) + Add(LVar0, 300) + Call(NpcMoveTo, NPC_YoshiKidRed, LVar0, LVar2, 75 * DT) + Call(SetNpcPos, NPC_YoshiKidRed, 0, -500, 0) + EndThread + Return + End }; EvtScript N(EVS_ParadePhase_HuffNPuff) = { - EVT_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_HUFF_PUFF + 50) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcFlagBits, NPC_HuffNPuffBody, NPC_FLAG_TOUCHES_GROUND, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_HuffNPuffFace, NPC_FLAG_TOUCHES_GROUND, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_HuffNPuffArms, NPC_FLAG_TOUCHES_GROUND, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_RuffPuff1, NPC_FLAG_TOUCHES_GROUND, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_RuffPuff2, NPC_FLAG_TOUCHES_GROUND, FALSE) - EVT_CALL(SetNpcScale, NPC_HuffNPuffBody, EVT_FLOAT(0.75), EVT_FLOAT(0.75), 1) - EVT_CALL(SetNpcScale, NPC_HuffNPuffFace, EVT_FLOAT(0.75), EVT_FLOAT(0.75), 1) - EVT_CALL(SetNpcScale, NPC_HuffNPuffArms, EVT_FLOAT(0.75), EVT_FLOAT(0.75), 1) - EVT_CALL(EnableNpcShadow, NPC_HuffNPuffFace, FALSE) - EVT_CALL(EnableNpcShadow, NPC_HuffNPuffArms, FALSE) - EVT_END_THREAD - EVT_EXEC(N(EVS_YoshiKids)) - EVT_EXEC_GET_TID(N(EVS_GourmetGuy_Enter), LVarB) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_HUFF_PUFF + 310) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC_GET_TID(N(EVS_HoldPosition_Puffs), LVarA) - EVT_WAIT(10 * DT) - EVT_KILL_THREAD(LVarB) - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Leap) - EVT_CALL(GetNpcPos, NPC_GourmetGuy, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_GourmetGuy, LVar0, LVar1, LVar2, 10) - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_TalkSurprise) - EVT_EXEC_GET_TID(N(EVS_HoldPosition_GourmetGuy), LVarB) - EVT_WAIT(130 * DT) - EVT_EXEC(N(EVS_Puffs_Surprise)) - EVT_WAIT(30 * DT) - EVT_CALL(InterpNpcYaw, NPC_HuffNPuffBody, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_HuffNPuffFace, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_HuffNPuffArms, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_RuffPuff1, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_RuffPuff2, 90, 0) - EVT_WAIT(30 * DT) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 90, 3, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_GourmetGuy, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Still) - EVT_CALL(MakeLerp, 270, 360, 3, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_GourmetGuy, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Idle) - EVT_END_THREAD - EVT_WAIT(6) - EVT_LOOP(2) - EVT_EXEC(N(EVS_Puffs_Hurt)) - EVT_KILL_THREAD(LVarA) - EVT_EXEC_WAIT(N(EVS_Puffs_Retreat)) - EVT_EXEC(N(EVS_Puffs_Surprise)) - EVT_EXEC_GET_TID(N(EVS_HoldPosition_Puffs), LVarA) - EVT_WAIT(10 * DT) - EVT_KILL_THREAD(LVarB) - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Walk) - EVT_CALL(GetNpcPos, NPC_GourmetGuy, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -20) - EVT_CALL(NpcMoveTo, NPC_GourmetGuy, LVar0, LVar2, 10) - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Idle) - EVT_EXEC_GET_TID(N(EVS_HoldPosition_GourmetGuy), LVarB) - EVT_WAIT(10 * DT) - EVT_END_LOOP - EVT_KILL_THREAD(LVarA) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_HuffNPuffBody, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_HuffNPuffBody, LVar0, LVar1, LVar2, 10 * DT) - EVT_ADD(LVar0, -200) - EVT_CALL(NpcMoveTo, NPC_HuffNPuffBody, LVar0, LVar2, 50 * DT) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_HuffNPuffFace, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_HuffNPuffFace, LVar0, LVar1, LVar2, 10 * DT) - EVT_ADD(LVar0, -200) - EVT_CALL(NpcMoveTo, NPC_HuffNPuffFace, LVar0, LVar2, 50 * DT) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_HuffNPuffArms, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_HuffNPuffArms, LVar0, LVar1, LVar2, 10 * DT) - EVT_ADD(LVar0, -200) - EVT_CALL(NpcMoveTo, NPC_HuffNPuffArms, LVar0, LVar2, 50 * DT) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_RuffPuff1, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_RuffPuff1, LVar0, LVar1, LVar2, 10 * DT) - EVT_ADD(LVar0, -200) - EVT_CALL(NpcMoveTo, NPC_RuffPuff1, LVar0, LVar2, 50 * DT) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_RuffPuff2, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_RuffPuff2, LVar0, LVar1, LVar2, 10 * DT) - EVT_ADD(LVar0, -200) - EVT_CALL(NpcMoveTo, NPC_RuffPuff2, LVar0, LVar2, 50 * DT) - EVT_END_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Inspect) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Walk) - EVT_KILL_THREAD(LVarB) - EVT_CALL(GetNpcPos, NPC_GourmetGuy, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -300) - EVT_CALL(NpcMoveTo, NPC_GourmetGuy, LVar0, LVar2, 50 * DT) - EVT_RETURN - EVT_END + Thread + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_HUFF_PUFF + 50) + BreakLoop + EndIf + EndLoop + Wait(10 * DT) + Call(SetNpcFlagBits, NPC_HuffNPuffBody, NPC_FLAG_TOUCHES_GROUND, FALSE) + Call(SetNpcFlagBits, NPC_HuffNPuffFace, NPC_FLAG_TOUCHES_GROUND, FALSE) + Call(SetNpcFlagBits, NPC_HuffNPuffArms, NPC_FLAG_TOUCHES_GROUND, FALSE) + Call(SetNpcFlagBits, NPC_RuffPuff1, NPC_FLAG_TOUCHES_GROUND, FALSE) + Call(SetNpcFlagBits, NPC_RuffPuff2, NPC_FLAG_TOUCHES_GROUND, FALSE) + Call(SetNpcScale, NPC_HuffNPuffBody, Float(0.75), Float(0.75), 1) + Call(SetNpcScale, NPC_HuffNPuffFace, Float(0.75), Float(0.75), 1) + Call(SetNpcScale, NPC_HuffNPuffArms, Float(0.75), Float(0.75), 1) + Call(EnableNpcShadow, NPC_HuffNPuffFace, FALSE) + Call(EnableNpcShadow, NPC_HuffNPuffArms, FALSE) + EndThread + Exec(N(EVS_YoshiKids)) + ExecGetTID(N(EVS_GourmetGuy_Enter), LVarB) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_HUFF_PUFF + 310) + BreakLoop + EndIf + EndLoop + ExecGetTID(N(EVS_HoldPosition_Puffs), LVarA) + Wait(10 * DT) + KillThread(LVarB) + Call(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Leap) + Call(GetNpcPos, NPC_GourmetGuy, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_GourmetGuy, LVar0, LVar1, LVar2, 10) + Call(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_TalkSurprise) + ExecGetTID(N(EVS_HoldPosition_GourmetGuy), LVarB) + Wait(130 * DT) + Exec(N(EVS_Puffs_Surprise)) + Wait(30 * DT) + Call(InterpNpcYaw, NPC_HuffNPuffBody, 90, 0) + Call(InterpNpcYaw, NPC_HuffNPuffFace, 90, 0) + Call(InterpNpcYaw, NPC_HuffNPuffArms, 90, 0) + Call(InterpNpcYaw, NPC_RuffPuff1, 90, 0) + Call(InterpNpcYaw, NPC_RuffPuff2, 90, 0) + Wait(30 * DT) + Thread + Call(MakeLerp, 0, 90, 3, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_GourmetGuy, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Still) + Call(MakeLerp, 270, 360, 3, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_GourmetGuy, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Idle) + EndThread + Wait(6) + Loop(2) + Exec(N(EVS_Puffs_Hurt)) + KillThread(LVarA) + ExecWait(N(EVS_Puffs_Retreat)) + Exec(N(EVS_Puffs_Surprise)) + ExecGetTID(N(EVS_HoldPosition_Puffs), LVarA) + Wait(10 * DT) + KillThread(LVarB) + Call(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Walk) + Call(GetNpcPos, NPC_GourmetGuy, LVar0, LVar1, LVar2) + Add(LVar0, -20) + Call(NpcMoveTo, NPC_GourmetGuy, LVar0, LVar2, 10) + Call(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Idle) + ExecGetTID(N(EVS_HoldPosition_GourmetGuy), LVarB) + Wait(10 * DT) + EndLoop + KillThread(LVarA) + Thread + Call(GetNpcPos, NPC_HuffNPuffBody, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_HuffNPuffBody, LVar0, LVar1, LVar2, 10 * DT) + Add(LVar0, -200) + Call(NpcMoveTo, NPC_HuffNPuffBody, LVar0, LVar2, 50 * DT) + EndThread + Thread + Call(GetNpcPos, NPC_HuffNPuffFace, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_HuffNPuffFace, LVar0, LVar1, LVar2, 10 * DT) + Add(LVar0, -200) + Call(NpcMoveTo, NPC_HuffNPuffFace, LVar0, LVar2, 50 * DT) + EndThread + Thread + Call(GetNpcPos, NPC_HuffNPuffArms, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_HuffNPuffArms, LVar0, LVar1, LVar2, 10 * DT) + Add(LVar0, -200) + Call(NpcMoveTo, NPC_HuffNPuffArms, LVar0, LVar2, 50 * DT) + EndThread + Thread + Call(GetNpcPos, NPC_RuffPuff1, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_RuffPuff1, LVar0, LVar1, LVar2, 10 * DT) + Add(LVar0, -200) + Call(NpcMoveTo, NPC_RuffPuff1, LVar0, LVar2, 50 * DT) + EndThread + Thread + Call(GetNpcPos, NPC_RuffPuff2, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_RuffPuff2, LVar0, LVar1, LVar2, 10 * DT) + Add(LVar0, -200) + Call(NpcMoveTo, NPC_RuffPuff2, LVar0, LVar2, 50 * DT) + EndThread + Wait(30 * DT) + Call(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Inspect) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Walk) + KillThread(LVarB) + Call(GetNpcPos, NPC_GourmetGuy, LVar0, LVar1, LVar2) + Add(LVar0, -300) + Call(NpcMoveTo, NPC_GourmetGuy, LVar0, LVar2, 50 * DT) + Return + End }; diff --git a/src/world/area_end/end_00/end_00_A_crystal_king.c b/src/world/area_end/end_00/end_00_A_crystal_king.c index 0023298b4f5..3406acf8f56 100644 --- a/src/world/area_end/end_00/end_00_A_crystal_king.c +++ b/src/world/area_end/end_00/end_00_A_crystal_king.c @@ -18,170 +18,170 @@ Vec3f N(CrystalsFlyOutPath)[] = { }; EvtScript N(EVS_ParadePhase_CrystalKing) = { - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_CRYSTAL_KING + 300) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_TrueCrystalKing, ANIM_CrystalKing_Anim09) - EVT_SET(LVar0, 77) - EVT_EXEC_GET_TID(N(EVS_OffsetNpcScroll), LVarA) - EVT_WAIT(10 * DT) - EVT_CALL(InterpNpcYaw, NPC_TrueCrystalKing, 90, 7) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_TrueCrystalKing, ANIM_CrystalKing_Anim10) - EVT_CALL(SetNpcAnimation, NPC_FakeCrystalKing, ANIM_CrystalKing_Anim10) - EVT_SET(LVar0, 78) - EVT_EXEC_GET_TID(N(EVS_OffsetNpcScroll), LVarB) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_FakeCrystalKing, ANIM_CrystalKing_Anim1C) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_TrueCrystalKing, ANIM_CrystalKing_Anim19) - EVT_WAIT(10 * DT) - EVT_KILL_THREAD(LVarA) - EVT_CALL(GetNpcPos, NPC_TrueCrystalKing, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 1, 1, 1, 1) - EVT_CALL(SetNpcPos, NPC_TrueCrystalKing, 1800, 0, 0) - EVT_CALL(SetNpcYaw, NPC_TrueCrystalKing, 270) - EVT_CALL(SetNpcAnimation, NPC_TrueCrystalKing, ANIM_CrystalKing_Anim0E) - EVT_CALL(SetNpcPos, NPC_Duplighost1, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_Duplighost1, EVT_FLOAT(0.5)) - EVT_ADD(LVar0, -40) - EVT_CALL(NpcJump1, NPC_Duplighost1, LVar0, LVar1, LVar2, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Duplighost1, ANIM_Duplighost_Anim02) - EVT_SET(LVar0, 75) - EVT_EXEC_GET_TID(N(EVS_OffsetNpcScroll), LVarA) - EVT_KILL_THREAD(LVarB) - EVT_CALL(SetNpcAnimation, NPC_FakeCrystalKing, ANIM_CrystalKing_Anim0F) - EVT_CALL(GetNpcPos, NPC_FakeCrystalKing, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -80) - EVT_CALL(NpcMoveTo, NPC_FakeCrystalKing, LVar0, LVar2, 40 * DT) - EVT_SET(LVar0, 78) - EVT_EXEC_GET_TID(N(EVS_OffsetNpcScroll), LVarB) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_FakeCrystalKing, ANIM_CrystalKing_Anim10) - EVT_WAIT(60 * DT) - EVT_CALL(SetNpcAnimation, NPC_FakeCrystalKing, ANIM_CrystalKing_Anim09) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_LOOP(4) - EVT_CALL(SetNpcAnimation, NPC_Duplighost1, ANIM_Duplighost_Anim00) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Duplighost1, ANIM_Duplighost_Anim07) - EVT_WAIT(10 * DT) - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_Duplighost1, ANIM_Duplighost_Anim02) - EVT_END_THREAD - EVT_WAIT(100 * DT) - EVT_CALL(InterpNpcYaw, NPC_FakeCrystalKing, 90, 7) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_FakeCrystalKing, ANIM_CrystalKing_Anim10) - EVT_CALL(SetNpcAnimation, NPC_TrueCrystalKing, ANIM_CrystalKing_Anim10) - EVT_SET(LVar0, 77) - EVT_EXEC_GET_TID(N(EVS_OffsetNpcScroll), LVarC) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_TrueCrystalKing, ANIM_CrystalKing_Anim1C) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_FakeCrystalKing, ANIM_CrystalKing_Anim19) - EVT_WAIT(10 * DT) - EVT_KILL_THREAD(LVarB) - EVT_CALL(GetNpcPos, NPC_FakeCrystalKing, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 1, 1, 1, 1) - EVT_CALL(SetNpcPos, NPC_FakeCrystalKing, 0, -500, 0) - EVT_CALL(SetNpcPos, NPC_Duplighost2, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_Duplighost2, EVT_FLOAT(0.5)) - EVT_ADD(LVar0, -40) - EVT_CALL(NpcJump1, NPC_Duplighost2, LVar0, LVar1, LVar2, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Duplighost2, ANIM_Duplighost_Anim02) - EVT_SET(LVar0, 76) - EVT_EXEC_GET_TID(N(EVS_OffsetNpcScroll), LVarB) - EVT_KILL_THREAD(LVarC) - EVT_CALL(SetNpcAnimation, NPC_TrueCrystalKing, ANIM_CrystalKing_Anim0F) - EVT_CALL(GetNpcPos, NPC_TrueCrystalKing, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -80) - EVT_CALL(NpcMoveTo, NPC_TrueCrystalKing, LVar0, LVar2, 40 * DT) - EVT_SET(LVar0, 77) - EVT_EXEC_GET_TID(N(EVS_OffsetNpcScroll), LVarC) - EVT_THREAD - EVT_LOOP(6) - EVT_CALL(SetNpcAnimation, NPC_TrueCrystalKing, ANIM_CrystalKing_Anim10) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_TrueCrystalKing, ANIM_CrystalKing_Anim11) - EVT_WAIT(10 * DT) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_LOOP(4) - EVT_CALL(SetNpcAnimation, NPC_Duplighost1, ANIM_Duplighost_Anim00) - EVT_CALL(SetNpcAnimation, NPC_Duplighost2, ANIM_Duplighost_Anim00) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Duplighost1, ANIM_Duplighost_Anim07) - EVT_CALL(SetNpcAnimation, NPC_Duplighost2, ANIM_Duplighost_Anim07) - EVT_WAIT(10 * DT) - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_Duplighost1, ANIM_Duplighost_Anim02) - EVT_CALL(SetNpcAnimation, NPC_Duplighost2, ANIM_Duplighost_Anim02) - EVT_END_THREAD - EVT_WAIT(60 * DT) - EVT_THREAD - EVT_CALL(LoadPath, 50 * DT, EVT_PTR(N(CrystalsFlyInPath)), ARRAY_COUNT(N(CrystalsFlyInPath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_SET(LVar4, LVar1) - EVT_ADD(LVar4, -30) - EVT_SET(LVar5, LVar1) - EVT_ADD(LVar5, 30) - EVT_SET(LVar6, LVar2) - EVT_ADD(LVar6, -25) - EVT_CALL(SetNpcPos, NPC_CrystalBit1, LVar5, LVar6, LVar3) - EVT_CALL(SetNpcPos, NPC_CrystalBit2, LVar1, LVar2, LVar3) - EVT_CALL(SetNpcPos, NPC_CrystalBit3, LVar4, LVar6, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(50 * DT) - EVT_KILL_THREAD(LVarC) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_TrueCrystalKing, ANIM_CrystalKing_Anim19) - EVT_CALL(LoadPath, 50 * DT, EVT_PTR(N(CrystalsFlyOutPath)), ARRAY_COUNT(N(CrystalsFlyInPath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_SET(LVar4, LVar1) - EVT_ADD(LVar4, -30) - EVT_SET(LVar5, LVar1) - EVT_ADD(LVar5, 30) - EVT_SET(LVar6, LVar2) - EVT_ADD(LVar6, -25) - EVT_CALL(SetNpcPos, NPC_CrystalBit1, LVar5, LVar6, LVar3) - EVT_CALL(SetNpcPos, NPC_CrystalBit2, LVar1, LVar2, LVar3) - EVT_CALL(SetNpcPos, NPC_CrystalBit3, LVar4, LVar6, LVar3) - EVT_ADD(LVar2, -50) - EVT_CALL(SetNpcPos, NPC_TrueCrystalKing, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_Duplighost1, ANIM_Duplighost_Anim02) - EVT_CALL(SetNpcAnimation, NPC_Duplighost2, ANIM_Duplighost_Anim02) - EVT_LOOP(50 * DT) - EVT_CALL(NpcFaceNpc, NPC_Duplighost1, NPC_TrueCrystalKing, 0) - EVT_CALL(NpcFaceNpc, NPC_Duplighost2, NPC_TrueCrystalKing, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Duplighost1, ANIM_Duplighost_Anim03) - EVT_CALL(SetNpcAnimation, NPC_Duplighost2, ANIM_Duplighost_Anim03) - EVT_KILL_THREAD(LVarA) - EVT_KILL_THREAD(LVarB) - EVT_RETURN - EVT_END + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_CRYSTAL_KING + 300) + BreakLoop + EndIf + EndLoop + Call(SetNpcAnimation, NPC_TrueCrystalKing, ANIM_CrystalKing_Anim09) + Set(LVar0, 77) + ExecGetTID(N(EVS_OffsetNpcScroll), LVarA) + Wait(10 * DT) + Call(InterpNpcYaw, NPC_TrueCrystalKing, 90, 7) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_TrueCrystalKing, ANIM_CrystalKing_Anim10) + Call(SetNpcAnimation, NPC_FakeCrystalKing, ANIM_CrystalKing_Anim10) + Set(LVar0, 78) + ExecGetTID(N(EVS_OffsetNpcScroll), LVarB) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_FakeCrystalKing, ANIM_CrystalKing_Anim1C) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_TrueCrystalKing, ANIM_CrystalKing_Anim19) + Wait(10 * DT) + KillThread(LVarA) + Call(GetNpcPos, NPC_TrueCrystalKing, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 1, 1, 1, 1) + Call(SetNpcPos, NPC_TrueCrystalKing, 1800, 0, 0) + Call(SetNpcYaw, NPC_TrueCrystalKing, 270) + Call(SetNpcAnimation, NPC_TrueCrystalKing, ANIM_CrystalKing_Anim0E) + Call(SetNpcPos, NPC_Duplighost1, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_Duplighost1, Float(0.5)) + Add(LVar0, -40) + Call(NpcJump1, NPC_Duplighost1, LVar0, LVar1, LVar2, 20 * DT) + Call(SetNpcAnimation, NPC_Duplighost1, ANIM_Duplighost_Anim02) + Set(LVar0, 75) + ExecGetTID(N(EVS_OffsetNpcScroll), LVarA) + KillThread(LVarB) + Call(SetNpcAnimation, NPC_FakeCrystalKing, ANIM_CrystalKing_Anim0F) + Call(GetNpcPos, NPC_FakeCrystalKing, LVar0, LVar1, LVar2) + Add(LVar0, -80) + Call(NpcMoveTo, NPC_FakeCrystalKing, LVar0, LVar2, 40 * DT) + Set(LVar0, 78) + ExecGetTID(N(EVS_OffsetNpcScroll), LVarB) + Thread + Call(SetNpcAnimation, NPC_FakeCrystalKing, ANIM_CrystalKing_Anim10) + Wait(60 * DT) + Call(SetNpcAnimation, NPC_FakeCrystalKing, ANIM_CrystalKing_Anim09) + EndThread + Thread + Wait(10 * DT) + Loop(4) + Call(SetNpcAnimation, NPC_Duplighost1, ANIM_Duplighost_Anim00) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Duplighost1, ANIM_Duplighost_Anim07) + Wait(10 * DT) + EndLoop + Call(SetNpcAnimation, NPC_Duplighost1, ANIM_Duplighost_Anim02) + EndThread + Wait(100 * DT) + Call(InterpNpcYaw, NPC_FakeCrystalKing, 90, 7) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_FakeCrystalKing, ANIM_CrystalKing_Anim10) + Call(SetNpcAnimation, NPC_TrueCrystalKing, ANIM_CrystalKing_Anim10) + Set(LVar0, 77) + ExecGetTID(N(EVS_OffsetNpcScroll), LVarC) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_TrueCrystalKing, ANIM_CrystalKing_Anim1C) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_FakeCrystalKing, ANIM_CrystalKing_Anim19) + Wait(10 * DT) + KillThread(LVarB) + Call(GetNpcPos, NPC_FakeCrystalKing, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 1, 1, 1, 1) + Call(SetNpcPos, NPC_FakeCrystalKing, 0, -500, 0) + Call(SetNpcPos, NPC_Duplighost2, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_Duplighost2, Float(0.5)) + Add(LVar0, -40) + Call(NpcJump1, NPC_Duplighost2, LVar0, LVar1, LVar2, 20 * DT) + Call(SetNpcAnimation, NPC_Duplighost2, ANIM_Duplighost_Anim02) + Set(LVar0, 76) + ExecGetTID(N(EVS_OffsetNpcScroll), LVarB) + KillThread(LVarC) + Call(SetNpcAnimation, NPC_TrueCrystalKing, ANIM_CrystalKing_Anim0F) + Call(GetNpcPos, NPC_TrueCrystalKing, LVar0, LVar1, LVar2) + Add(LVar0, -80) + Call(NpcMoveTo, NPC_TrueCrystalKing, LVar0, LVar2, 40 * DT) + Set(LVar0, 77) + ExecGetTID(N(EVS_OffsetNpcScroll), LVarC) + Thread + Loop(6) + Call(SetNpcAnimation, NPC_TrueCrystalKing, ANIM_CrystalKing_Anim10) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_TrueCrystalKing, ANIM_CrystalKing_Anim11) + Wait(10 * DT) + EndLoop + EndThread + Thread + Wait(10 * DT) + Loop(4) + Call(SetNpcAnimation, NPC_Duplighost1, ANIM_Duplighost_Anim00) + Call(SetNpcAnimation, NPC_Duplighost2, ANIM_Duplighost_Anim00) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Duplighost1, ANIM_Duplighost_Anim07) + Call(SetNpcAnimation, NPC_Duplighost2, ANIM_Duplighost_Anim07) + Wait(10 * DT) + EndLoop + Call(SetNpcAnimation, NPC_Duplighost1, ANIM_Duplighost_Anim02) + Call(SetNpcAnimation, NPC_Duplighost2, ANIM_Duplighost_Anim02) + EndThread + Wait(60 * DT) + Thread + Call(LoadPath, 50 * DT, Ref(N(CrystalsFlyInPath)), ARRAY_COUNT(N(CrystalsFlyInPath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Set(LVar4, LVar1) + Add(LVar4, -30) + Set(LVar5, LVar1) + Add(LVar5, 30) + Set(LVar6, LVar2) + Add(LVar6, -25) + Call(SetNpcPos, NPC_CrystalBit1, LVar5, LVar6, LVar3) + Call(SetNpcPos, NPC_CrystalBit2, LVar1, LVar2, LVar3) + Call(SetNpcPos, NPC_CrystalBit3, LVar4, LVar6, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + EndThread + Wait(50 * DT) + KillThread(LVarC) + Thread + Call(SetNpcAnimation, NPC_TrueCrystalKing, ANIM_CrystalKing_Anim19) + Call(LoadPath, 50 * DT, Ref(N(CrystalsFlyOutPath)), ARRAY_COUNT(N(CrystalsFlyInPath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Set(LVar4, LVar1) + Add(LVar4, -30) + Set(LVar5, LVar1) + Add(LVar5, 30) + Set(LVar6, LVar2) + Add(LVar6, -25) + Call(SetNpcPos, NPC_CrystalBit1, LVar5, LVar6, LVar3) + Call(SetNpcPos, NPC_CrystalBit2, LVar1, LVar2, LVar3) + Call(SetNpcPos, NPC_CrystalBit3, LVar4, LVar6, LVar3) + Add(LVar2, -50) + Call(SetNpcPos, NPC_TrueCrystalKing, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(SetNpcAnimation, NPC_Duplighost1, ANIM_Duplighost_Anim02) + Call(SetNpcAnimation, NPC_Duplighost2, ANIM_Duplighost_Anim02) + Loop(50 * DT) + Call(NpcFaceNpc, NPC_Duplighost1, NPC_TrueCrystalKing, 0) + Call(NpcFaceNpc, NPC_Duplighost2, NPC_TrueCrystalKing, 0) + Wait(1) + EndLoop + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Duplighost1, ANIM_Duplighost_Anim03) + Call(SetNpcAnimation, NPC_Duplighost2, ANIM_Duplighost_Anim03) + KillThread(LVarA) + KillThread(LVarB) + Return + End }; diff --git a/src/world/area_end/end_00/end_00_B_bowser.c b/src/world/area_end/end_00/end_00_B_bowser.c index 9284259c6db..b1814bc8bc7 100644 --- a/src/world/area_end/end_00/end_00_B_bowser.c +++ b/src/world/area_end/end_00/end_00_B_bowser.c @@ -2,212 +2,212 @@ #include "effects.h" EvtScript N(EVS_JrTroopa_SpinningDodge) = { - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_RaiseStaff) - EVT_WAIT(5 * DT) - EVT_CALL(MakeLerp, 0, 360, 10 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_JrTroopa, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_RaiseStaff) + Wait(5 * DT) + Call(MakeLerp, 0, 360, 10 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_JrTroopa, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_ParadePhase_Bowser) = { - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcJumpscale, NPC_JrTroopa, EVT_FLOAT(0.5)) - EVT_CALL(NpcJump1, NPC_JrTroopa, 2010, 0, 0, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_Run) - EVT_CALL(NpcMoveTo, NPC_JrTroopa, 1930, 0, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_Idle) - EVT_CALL(InterpNpcYaw, NPC_JrTroopa, 90, 0) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_RaiseStaff) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_SwingStaff) - EVT_PLAY_EFFECT(EFFECT_SHAPE_SPELL, 0, 1930, 0, 0, 2160, 100, 0, 10) - EVT_WAIT(30 * DT) - EVT_PLAY_EFFECT(EFFECT_SHAPE_SPELL, 0, 2160, 100, 0, 1930, 0, 0, 10) - EVT_EXEC(N(EVS_JrTroopa_SpinningDodge)) - EVT_CALL(NpcJump1, NPC_JrTroopa, 1890, 0, 0, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_Idle) - EVT_CALL(NpcFlyTo, NPC_Kammy, 2060, 60, 0, 10 * DT, -10, EASING_LINEAR) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0E) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0F) - EVT_PLAY_EFFECT(EFFECT_SHAPE_SPELL, 0, 2060, 60, 0, 1890, 0, 0, 10) - EVT_EXEC(N(EVS_JrTroopa_SpinningDodge)) - EVT_CALL(NpcJump1, NPC_JrTroopa, 2040, 0, 0, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_Idle) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim14) - EVT_CALL(NpcFlyTo, NPC_Kammy, 1940, 60, 0, 20 * DT, -10, EASING_LINEAR) - EVT_CALL(InterpNpcYaw, NPC_Kammy, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_JrTroopa, 270, 0) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0E) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0F) - EVT_PLAY_EFFECT(EFFECT_SHAPE_SPELL, 0, 1940, 60, 0, 2040, 0, 0, 10) - EVT_EXEC(N(EVS_JrTroopa_SpinningDodge)) - EVT_CALL(NpcJump1, NPC_JrTroopa, 2160, 0, 0, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_RaiseStaff) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_SwingStaff) - EVT_PLAY_EFFECT(EFFECT_SHAPE_SPELL, 0, 2160, 0, 0, 1940, 60, 0, 20) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim14) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 0, 1940, 60, 0, EVT_FLOAT(0.5), 10) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcPos, NPC_Kammy, 0, -500, 0) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 0, 2100, 60, 0, EVT_FLOAT(0.5), 10) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcPos, NPC_Kammy, 2100, 60, 0) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0E) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0F) - EVT_PLAY_EFFECT(EFFECT_SHAPE_SPELL, 0, 2100, 60, 0, 2160, 0, 0, 10) - EVT_EXEC(N(EVS_JrTroopa_SpinningDodge)) - EVT_CALL(NpcJump1, NPC_JrTroopa, 2100, 0, 0, 20 * DT) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_Run) - EVT_CALL(NpcMoveTo, NPC_JrTroopa, 1900, 0, 50 * DT) - EVT_END_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim14) - EVT_CALL(InterpNpcYaw, NPC_Kammy, 270, 0) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim12) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim14) - EVT_CALL(InterpNpcYaw, NPC_Kammy, 90, 0) - EVT_WAIT(20 * DT) - EVT_CALL(NpcFlyTo, NPC_Kammy, 1900, 40, 0, 25 * DT, -10, EASING_LINEAR) - EVT_WAIT(150 * DT) - EVT_THREAD - EVT_WAIT(35 * DT) - EVT_PLAY_EFFECT(EFFECT_SHAPE_SPELL, 0, 2040, 60, -20, 2180, 0, 20, 10) - EVT_WAIT(35 * DT) - EVT_CALL(SetNpcPos, NPC_Kammy, 2390, 120, -20) - EVT_CALL(NpcFlyTo, NPC_Kammy, 2440, 60, -20, 10 * DT, -10, EASING_LINEAR) - EVT_CALL(InterpNpcYaw, NPC_Kammy, 270, 0) - EVT_END_THREAD - EVT_CALL(SetNpcPos, NPC_JrTroopa, 2040, 0, 20 * DT) - EVT_CALL(SetNpcYaw, NPC_JrTroopa, 90) - EVT_CALL(NpcMoveTo, NPC_JrTroopa, 2400, 20, 90 * DT) - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_RaiseStaff) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_SwingStaff) - EVT_PLAY_EFFECT(EFFECT_SHAPE_SPELL, 0, 2400, 0, 20, 2440, 60, -20, 10) - EVT_THREAD - EVT_CALL(NpcFlyTo, NPC_Kammy, 2300, 60, -20, 20 * DT, -10, EASING_LINEAR) - EVT_CALL(InterpNpcYaw, NPC_Kammy, 90, 0) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0E) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0F) - EVT_PLAY_EFFECT(EFFECT_SHAPE_SPELL, 0, 2300, 60, -20, 2390, 40, 0, 10) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_Run) - EVT_CALL(NpcMoveTo, NPC_JrTroopa, 2480, 20, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_Idle) - EVT_CALL(InterpNpcYaw, NPC_JrTroopa, 270, 0) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_RaiseStaff) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_SwingStaff) - EVT_PLAY_EFFECT(EFFECT_SHAPE_SPELL, 0, 2480, 0, 20, 2390, 40, 0, 10) - EVT_END_THREAD - EVT_WAIT(60 * DT) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 0, 2390, 40, 5, EVT_FLOAT(5.0), 30) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_HammerBros1, ANIM_ParadeKoopas_Bowser_HammerBrosPanic) - EVT_CALL(NpcMoveTo, NPC_HammerBros1, 2180, 0, 30 * DT) - EVT_CALL(SetNpcPos, NPC_HammerBros1, 0, -500, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_HammerBros2, ANIM_ParadeKoopas_Bowser_HammerBrosPanic) - EVT_CALL(NpcMoveTo, NPC_HammerBros2, 2140, 0, 30 * DT) - EVT_CALL(SetNpcPos, NPC_HammerBros2, 0, -500, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Koopatrol1, ANIM_ParadeKoopas_Bowser_KoopatrolPanic) - EVT_CALL(NpcMoveTo, NPC_Koopatrol1, 2680, 0, 50 * DT) - EVT_CALL(SetNpcPos, NPC_Koopatrol1, 0, -500, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Koopatrol2, ANIM_ParadeKoopas_Bowser_KoopatrolPanic) - EVT_CALL(NpcMoveTo, NPC_Koopatrol2, 2720, 0, 50 * DT) - EVT_CALL(SetNpcPos, NPC_Koopatrol2, 0, -500, 0) - EVT_END_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcPos, NPC_Bowser, 0, -500, 0) - EVT_CALL(SetNpcPos, NPC_BowserPropeller, 0, -500, 0) - EVT_CALL(SetNpcPos, NPC_BurntBowser, 2390, 10, 0) - EVT_CALL(SetNpcPos, NPC_BurntBowserPropeller, 2390, 10, 0) - EVT_WAIT(60 * DT) - EVT_CALL(SetNpcAnimation, NPC_BurntBowser, ANIM_ParadeBurntBowser_BurntDrawBack) - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0C) - EVT_CALL(NpcFlyTo, NPC_Kammy, 2180, 60, -20, 30 * DT, -10, EASING_LINEAR) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_Run) - EVT_CALL(NpcMoveTo, NPC_JrTroopa, 2160, 20, 40 * DT) - EVT_END_THREAD - EVT_WAIT(40 * DT) - EVT_THREAD - EVT_CALL(NpcMoveTo, NPC_BurntBowserPropeller, 2270, 0, 60 * DT) - EVT_END_THREAD - EVT_CALL(NpcMoveTo, NPC_BurntBowser, 2270, 0, 60 * DT) - EVT_PLAY_EFFECT(EFFECT_FIRE_BREATH, 0, 2270, 40, -5, 2280, 40, -5, 5, 2, 30, 0, 0, 0) - EVT_WAIT(20 * DT) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim07) - EVT_CALL(SetNpcYaw, NPC_Kammy, 90) - EVT_CALL(SetNpcPos, NPC_Kammy, 2280, 0, 0) - EVT_CALL(SetNpcJumpscale, NPC_Kammy, EVT_FLOAT(0.5)) - EVT_CALL(NpcJump1, NPC_Kammy, 2380, 0, 0, 20 * DT) - EVT_CALL(NpcJump1, NPC_Kammy, 2430, 0, 0, 10 * DT) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_BurnStill) - EVT_CALL(SetNpcYaw, NPC_JrTroopa, 90) - EVT_CALL(SetNpcPos, NPC_JrTroopa, 2320, 0, 0) - EVT_CALL(SetNpcJumpscale, NPC_JrTroopa, EVT_FLOAT(0.5)) - EVT_CALL(NpcJump1, NPC_JrTroopa, 2420, 0, 0, 20 * DT) - EVT_CALL(NpcJump1, NPC_JrTroopa, 2470, 0, 0, 10 * DT) - EVT_END_THREAD - EVT_WAIT(30 * DT) - EVT_SETF(LVar0, 2430) - EVT_SETF(LVar1, 2470) - EVT_CHILD_THREAD - EVT_LOOP(0) - EVT_ADDF(LVar0, EVT_FLOAT(0.8702 / DT)) - EVT_CALL(SetNpcPos, NPC_Kammy, LVar0, 0, 0) - EVT_ADDF(LVar1, EVT_FLOAT(0.8702 / DT)) - EVT_CALL(SetNpcPos, NPC_JrTroopa, LVar1, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_DONE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(100 * DT) - EVT_RETURN - EVT_END + Wait(10 * DT) + Call(SetNpcJumpscale, NPC_JrTroopa, Float(0.5)) + Call(NpcJump1, NPC_JrTroopa, 2010, 0, 0, 20 * DT) + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_Run) + Call(NpcMoveTo, NPC_JrTroopa, 1930, 0, 20 * DT) + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_Idle) + Call(InterpNpcYaw, NPC_JrTroopa, 90, 0) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_RaiseStaff) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_SwingStaff) + PlayEffect(EFFECT_SHAPE_SPELL, 0, 1930, 0, 0, 2160, 100, 0, 10) + Wait(30 * DT) + PlayEffect(EFFECT_SHAPE_SPELL, 0, 2160, 100, 0, 1930, 0, 0, 10) + Exec(N(EVS_JrTroopa_SpinningDodge)) + Call(NpcJump1, NPC_JrTroopa, 1890, 0, 0, 20 * DT) + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_Idle) + Call(NpcFlyTo, NPC_Kammy, 2060, 60, 0, 10 * DT, -10, EASING_LINEAR) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0E) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0F) + PlayEffect(EFFECT_SHAPE_SPELL, 0, 2060, 60, 0, 1890, 0, 0, 10) + Exec(N(EVS_JrTroopa_SpinningDodge)) + Call(NpcJump1, NPC_JrTroopa, 2040, 0, 0, 20 * DT) + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_Idle) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim14) + Call(NpcFlyTo, NPC_Kammy, 1940, 60, 0, 20 * DT, -10, EASING_LINEAR) + Call(InterpNpcYaw, NPC_Kammy, 90, 0) + Call(InterpNpcYaw, NPC_JrTroopa, 270, 0) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0E) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0F) + PlayEffect(EFFECT_SHAPE_SPELL, 0, 1940, 60, 0, 2040, 0, 0, 10) + Exec(N(EVS_JrTroopa_SpinningDodge)) + Call(NpcJump1, NPC_JrTroopa, 2160, 0, 0, 20 * DT) + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_Idle) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_RaiseStaff) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_SwingStaff) + PlayEffect(EFFECT_SHAPE_SPELL, 0, 2160, 0, 0, 1940, 60, 0, 20) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim14) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 0, 1940, 60, 0, Float(0.5), 10) + Wait(10 * DT) + Call(SetNpcPos, NPC_Kammy, 0, -500, 0) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 0, 2100, 60, 0, Float(0.5), 10) + Wait(10 * DT) + Call(SetNpcPos, NPC_Kammy, 2100, 60, 0) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0E) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0F) + PlayEffect(EFFECT_SHAPE_SPELL, 0, 2100, 60, 0, 2160, 0, 0, 10) + Exec(N(EVS_JrTroopa_SpinningDodge)) + Call(NpcJump1, NPC_JrTroopa, 2100, 0, 0, 20 * DT) + Thread + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_Run) + Call(NpcMoveTo, NPC_JrTroopa, 1900, 0, 50 * DT) + EndThread + Wait(20 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim14) + Call(InterpNpcYaw, NPC_Kammy, 270, 0) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim12) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim14) + Call(InterpNpcYaw, NPC_Kammy, 90, 0) + Wait(20 * DT) + Call(NpcFlyTo, NPC_Kammy, 1900, 40, 0, 25 * DT, -10, EASING_LINEAR) + Wait(150 * DT) + Thread + Wait(35 * DT) + PlayEffect(EFFECT_SHAPE_SPELL, 0, 2040, 60, -20, 2180, 0, 20, 10) + Wait(35 * DT) + Call(SetNpcPos, NPC_Kammy, 2390, 120, -20) + Call(NpcFlyTo, NPC_Kammy, 2440, 60, -20, 10 * DT, -10, EASING_LINEAR) + Call(InterpNpcYaw, NPC_Kammy, 270, 0) + EndThread + Call(SetNpcPos, NPC_JrTroopa, 2040, 0, 20 * DT) + Call(SetNpcYaw, NPC_JrTroopa, 90) + Call(NpcMoveTo, NPC_JrTroopa, 2400, 20, 90 * DT) + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_Idle) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_RaiseStaff) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_SwingStaff) + PlayEffect(EFFECT_SHAPE_SPELL, 0, 2400, 0, 20, 2440, 60, -20, 10) + Thread + Call(NpcFlyTo, NPC_Kammy, 2300, 60, -20, 20 * DT, -10, EASING_LINEAR) + Call(InterpNpcYaw, NPC_Kammy, 90, 0) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0E) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0F) + PlayEffect(EFFECT_SHAPE_SPELL, 0, 2300, 60, -20, 2390, 40, 0, 10) + EndThread + Thread + Wait(10 * DT) + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_Run) + Call(NpcMoveTo, NPC_JrTroopa, 2480, 20, 20 * DT) + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_Idle) + Call(InterpNpcYaw, NPC_JrTroopa, 270, 0) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_RaiseStaff) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_SwingStaff) + PlayEffect(EFFECT_SHAPE_SPELL, 0, 2480, 0, 20, 2390, 40, 0, 10) + EndThread + Wait(60 * DT) + PlayEffect(EFFECT_RING_BLAST, 0, 2390, 40, 5, Float(5.0), 30) + Thread + Call(SetNpcAnimation, NPC_HammerBros1, ANIM_ParadeKoopas_Bowser_HammerBrosPanic) + Call(NpcMoveTo, NPC_HammerBros1, 2180, 0, 30 * DT) + Call(SetNpcPos, NPC_HammerBros1, 0, -500, 0) + EndThread + Thread + Call(SetNpcAnimation, NPC_HammerBros2, ANIM_ParadeKoopas_Bowser_HammerBrosPanic) + Call(NpcMoveTo, NPC_HammerBros2, 2140, 0, 30 * DT) + Call(SetNpcPos, NPC_HammerBros2, 0, -500, 0) + EndThread + Thread + Call(SetNpcAnimation, NPC_Koopatrol1, ANIM_ParadeKoopas_Bowser_KoopatrolPanic) + Call(NpcMoveTo, NPC_Koopatrol1, 2680, 0, 50 * DT) + Call(SetNpcPos, NPC_Koopatrol1, 0, -500, 0) + EndThread + Thread + Call(SetNpcAnimation, NPC_Koopatrol2, ANIM_ParadeKoopas_Bowser_KoopatrolPanic) + Call(NpcMoveTo, NPC_Koopatrol2, 2720, 0, 50 * DT) + Call(SetNpcPos, NPC_Koopatrol2, 0, -500, 0) + EndThread + Wait(10 * DT) + Call(SetNpcPos, NPC_Bowser, 0, -500, 0) + Call(SetNpcPos, NPC_BowserPropeller, 0, -500, 0) + Call(SetNpcPos, NPC_BurntBowser, 2390, 10, 0) + Call(SetNpcPos, NPC_BurntBowserPropeller, 2390, 10, 0) + Wait(60 * DT) + Call(SetNpcAnimation, NPC_BurntBowser, ANIM_ParadeBurntBowser_BurntDrawBack) + Wait(10 * DT) + Thread + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0C) + Call(NpcFlyTo, NPC_Kammy, 2180, 60, -20, 30 * DT, -10, EASING_LINEAR) + EndThread + Thread + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_Run) + Call(NpcMoveTo, NPC_JrTroopa, 2160, 20, 40 * DT) + EndThread + Wait(40 * DT) + Thread + Call(NpcMoveTo, NPC_BurntBowserPropeller, 2270, 0, 60 * DT) + EndThread + Call(NpcMoveTo, NPC_BurntBowser, 2270, 0, 60 * DT) + PlayEffect(EFFECT_FIRE_BREATH, 0, 2270, 40, -5, 2280, 40, -5, 5, 2, 30, 0, 0, 0) + Wait(20 * DT) + Thread + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim07) + Call(SetNpcYaw, NPC_Kammy, 90) + Call(SetNpcPos, NPC_Kammy, 2280, 0, 0) + Call(SetNpcJumpscale, NPC_Kammy, Float(0.5)) + Call(NpcJump1, NPC_Kammy, 2380, 0, 0, 20 * DT) + Call(NpcJump1, NPC_Kammy, 2430, 0, 0, 10 * DT) + EndThread + Thread + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_MageJrTroopa_BurnStill) + Call(SetNpcYaw, NPC_JrTroopa, 90) + Call(SetNpcPos, NPC_JrTroopa, 2320, 0, 0) + Call(SetNpcJumpscale, NPC_JrTroopa, Float(0.5)) + Call(NpcJump1, NPC_JrTroopa, 2420, 0, 0, 20 * DT) + Call(NpcJump1, NPC_JrTroopa, 2470, 0, 0, 10 * DT) + EndThread + Wait(30 * DT) + SetF(LVar0, 2430) + SetF(LVar1, 2470) + ChildThread + Loop(0) + AddF(LVar0, Float(0.8702 / DT)) + Call(SetNpcPos, NPC_Kammy, LVar0, 0, 0) + AddF(LVar1, Float(0.8702 / DT)) + Call(SetNpcPos, NPC_JrTroopa, LVar1, 0, 0) + Wait(1) + EndLoop + EndChildThread + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_DONE) + BreakLoop + EndIf + EndLoop + Wait(100 * DT) + Return + End }; diff --git a/src/world/area_end/end_01/end_01_1_main.c b/src/world/area_end/end_01/end_01_1_main.c index 5c53f51bd95..5c3434d74c6 100644 --- a/src/world/area_end/end_01/end_01_1_main.c +++ b/src/world/area_end/end_01/end_01_1_main.c @@ -6,15 +6,15 @@ API_CALLABLE(N(WidenCameraFOV)) { } EvtScript N(EVS_Main) = { - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamViewport, CAM_DEFAULT, 15, 28, 290, 128) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(N(WidenCameraFOV)) - EVT_CALL(EnableWorldStatusBar, FALSE) - EVT_EXEC(N(EVS_ManageParade)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamViewport, CAM_DEFAULT, 15, 28, 290, 128) + Call(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(N(WidenCameraFOV)) + Call(EnableWorldStatusBar, FALSE) + Exec(N(EVS_ManageParade)) + Wait(1) + Return + End }; diff --git a/src/world/area_end/end_01/end_01_2_credits.c b/src/world/area_end/end_01/end_01_2_credits.c index e6056a8d711..f4126748228 100644 --- a/src/world/area_end/end_01/end_01_2_credits.c +++ b/src/world/area_end/end_01/end_01_2_credits.c @@ -13,19 +13,19 @@ #endif EvtScript N(EVS_InitCredits) = { - EVT_CALL(N(InitCredits)) - EVT_RETURN - EVT_END + Call(N(InitCredits)) + Return + End }; EvtScript N(EVS_ShowCredits_Jobs) = { - EVT_CALL(N(ShowCreditList), EVT_PTR(N(Credits_Jobs))) - EVT_RETURN - EVT_END + Call(N(ShowCreditList), Ref(N(Credits_Jobs))) + Return + End }; EvtScript N(EVS_ShowCredits_Names) = { - EVT_CALL(N(ShowCreditList), EVT_PTR(N(Credits_Names))) - EVT_RETURN - EVT_END + Call(N(ShowCreditList), Ref(N(Credits_Names))) + Return + End }; diff --git a/src/world/area_end/end_01/end_01_3_parade_setup.c b/src/world/area_end/end_01/end_01_3_parade_setup.c index 1b67fff74cc..667c2fca051 100644 --- a/src/world/area_end/end_01/end_01_3_parade_setup.c +++ b/src/world/area_end/end_01/end_01_3_parade_setup.c @@ -94,73 +94,73 @@ API_CALLABLE(N(WaitForConfirmInput)) { } EvtScript N(EVS_SetupInitialCamera) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, PARADE_START, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, PARADE_START, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, PARADE_START, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, PARADE_START, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Return + End }; EvtScript N(EVS_UpdateScrollPos) = { - EVT_CALL(SetPanTarget, CAM_DEFAULT, EVT_FLOAT(PARADE_START), 0, 0) - EVT_SETF(LVar1, EVT_FLOAT(0.0)) - EVT_LOOP(0) - EVT_CALL(N(UpdateCameraScroll)) - EVT_CALL(TranslateGroup, MODEL_bg, LVar1, 0, 0) - EVT_ADDF(LVar1, EVT_FLOAT(PARADE_SCROLL_RATE / DT)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetPanTarget, CAM_DEFAULT, Float(PARADE_START), 0, 0) + SetF(LVar1, Float(0.0)) + Loop(0) + Call(N(UpdateCameraScroll)) + Call(TranslateGroup, MODEL_bg, LVar1, 0, 0) + AddF(LVar1, Float(PARADE_SCROLL_RATE / DT)) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_UpdateTexPan_Ground) = { - EVT_CALL(EnableTexPanning, MODEL_o145, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o146, TRUE) - EVT_CALL(EnableTexPanning, MODEL_j2, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o152, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o153, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o154, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o166, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o157, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o159, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o160, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o161, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o162, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o195, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o196, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o197, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o198, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o260, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o201, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o202, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o203, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o204, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o275, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o276, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o277, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o278, TRUE) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 150) - EVT_IF_GT(LVar0, 0x20000) - EVT_ADD(LVar0, -0x20000) - EVT_END_IF - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(EnableTexPanning, MODEL_o145, TRUE) + Call(EnableTexPanning, MODEL_o146, TRUE) + Call(EnableTexPanning, MODEL_j2, TRUE) + Call(EnableTexPanning, MODEL_o152, TRUE) + Call(EnableTexPanning, MODEL_o153, TRUE) + Call(EnableTexPanning, MODEL_o154, TRUE) + Call(EnableTexPanning, MODEL_o166, TRUE) + Call(EnableTexPanning, MODEL_o157, TRUE) + Call(EnableTexPanning, MODEL_o159, TRUE) + Call(EnableTexPanning, MODEL_o160, TRUE) + Call(EnableTexPanning, MODEL_o161, TRUE) + Call(EnableTexPanning, MODEL_o162, TRUE) + Call(EnableTexPanning, MODEL_o195, TRUE) + Call(EnableTexPanning, MODEL_o196, TRUE) + Call(EnableTexPanning, MODEL_o197, TRUE) + Call(EnableTexPanning, MODEL_o198, TRUE) + Call(EnableTexPanning, MODEL_o260, TRUE) + Call(EnableTexPanning, MODEL_o201, TRUE) + Call(EnableTexPanning, MODEL_o202, TRUE) + Call(EnableTexPanning, MODEL_o203, TRUE) + Call(EnableTexPanning, MODEL_o204, TRUE) + Call(EnableTexPanning, MODEL_o275, TRUE) + Call(EnableTexPanning, MODEL_o276, TRUE) + Call(EnableTexPanning, MODEL_o277, TRUE) + Call(EnableTexPanning, MODEL_o278, TRUE) + Thread + Set(LVar0, 0) + Set(LVar1, 0) + Loop(0) + Add(LVar0, 150) + IfGt(LVar0, 0x20000) + Add(LVar0, -0x20000) + EndIf + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) + Wait(1) + EndLoop + EndThread + Return + End }; EvtScript N(EVS_OffsetNpcScroll) = { - EVT_CALL(N(AddScrollToNpcPos), LVar0) - EVT_RETURN - EVT_END + Call(N(AddScrollToNpcPos), LVar0) + Return + End }; AnimID N(ExtraAnims_Eldstar)[] = { @@ -564,277 +564,277 @@ ParadeNpcInfo N(ParadeNpcsTable)[] = { }; EvtScript N(EVS_ManageNpcPool) = { - EVT_CALL(N(CreateParadeNPC), NPC_Eldstar) - EVT_CALL(N(CreateParadeNPC), NPC_Mamar) - EVT_CALL(N(CreateParadeNPC), NPC_Skolar) - EVT_CALL(N(CreateParadeNPC), NPC_Muskular) - EVT_CALL(N(CreateParadeNPC), NPC_Misstar) - EVT_CALL(N(CreateParadeNPC), NPC_Klevar) - EVT_CALL(N(CreateParadeNPC), NPC_Kalmar) - EVT_CALL(N(CreateParadeNPC), NPC_PenguinMayor) - EVT_CALL(N(CreateParadeNPC), NPC_PenguinMayorWife) - EVT_CALL(N(CreateParadeNPC), NPC_PenguinSkater1) - EVT_CALL(N(CreateParadeNPC), NPC_PenguinSkater2) - EVT_CALL(N(CreateParadeNPC), NPC_ViolinPlayer1) - EVT_CALL(N(CreateParadeNPC), NPC_ViolinPlayer2) - EVT_CALL(N(CreateParadeNPC), NPC_ViolinPlayer3) - EVT_CALL(N(CreateParadeNPC), NPC_Conductor) - EVT_CALL(N(CreateParadeNPC), NPC_Singer) - EVT_CALL(N(ParadeSpriteHeapMalloc), 0x13400, LVar0) - EVT_CALL(N(CreateParadeNPC), NPC_AmayzeDayzee1) - EVT_CALL(N(CreateParadeNPC), NPC_AmayzeDayzee2) - EVT_CALL(N(ParadeSpriteHeapFree), LVar0) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_WIZARDS + 100) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DeleteNpc, NPC_Eldstar) - EVT_CALL(DeleteNpc, NPC_Mamar) - EVT_CALL(DeleteNpc, NPC_Skolar) - EVT_CALL(DeleteNpc, NPC_Muskular) - EVT_CALL(DeleteNpc, NPC_Misstar) - EVT_CALL(DeleteNpc, NPC_Klevar) - EVT_CALL(DeleteNpc, NPC_Kalmar) - EVT_CALL(DeleteNpc, NPC_PenguinMayor) - EVT_CALL(DeleteNpc, NPC_PenguinMayorWife) - EVT_CALL(DeleteNpc, NPC_PenguinSkater1) - EVT_CALL(DeleteNpc, NPC_PenguinSkater2) - EVT_CALL(DeleteNpc, NPC_ViolinPlayer1) - EVT_CALL(DeleteNpc, NPC_ViolinPlayer2) - EVT_CALL(DeleteNpc, NPC_ViolinPlayer3) - EVT_CALL(DeleteNpc, NPC_Conductor) - EVT_CALL(DeleteNpc, NPC_Singer) - EVT_WAIT(1) - EVT_CALL(N(CreateParadeNPC), NPC_Merle) - EVT_CALL(N(CreateParadeNPC), NPC_Merlee) - EVT_CALL(N(CreateParadeNPC), NPC_Merlon) - EVT_CALL(N(CreateParadeNPC), NPC_Merluvlee) - EVT_CALL(N(CreateParadeNPC), NPC_Merlow) - EVT_CALL(N(CreateParadeNPC), NPC_Merlar) - EVT_CALL(N(CreateParadeNPC), NPC_SunSad) - EVT_CALL(N(CreateParadeNPC), NPC_SunHappy) - EVT_CALL(N(CreateParadeNPC), NPC_Bubulb1) - EVT_CALL(N(CreateParadeNPC), NPC_Bubulb2) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_SHYGUY_DANCE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DeleteNpc, NPC_AmayzeDayzee1) - EVT_CALL(DeleteNpc, NPC_AmayzeDayzee2) - EVT_WAIT(1) - EVT_CALL(N(ParadeSpriteHeapMalloc), 0x4700, LVar0) - EVT_CALL(N(CreateParadeNPC), NPC_PyroGuy1) - EVT_CALL(N(CreateParadeNPC), NPC_PyroGuy2) - EVT_CALL(N(CreateParadeNPC), NPC_Pratfaller) - EVT_CALL(N(CreateParadeNPC), NPC_ShyGuyMarshall) - EVT_CALL(N(CreateParadeNPC), NPC_GeneralGuy) - EVT_CALL(N(CreateParadeNPC), NPC_BackupDancer1) - EVT_CALL(N(CreateParadeNPC), NPC_BackupDancer2) - EVT_CALL(N(CreateParadeNPC), NPC_GrooveGuy1) - EVT_CALL(N(CreateParadeNPC), NPC_GrooveGuy2) - EVT_CALL(N(CreateParadeNPC), NPC_GrooveGuy3) - EVT_CALL(N(CreateParadeNPC), NPC_GrooveGuy4) - EVT_CALL(N(CreateParadeNPC), NPC_ShyGuyFormation11) - EVT_CALL(N(CreateParadeNPC), NPC_ShyGuyFormation12) - EVT_CALL(N(CreateParadeNPC), NPC_ShyGuyFormation13) - EVT_CALL(N(CreateParadeNPC), NPC_ShyGuyFormation21) - EVT_CALL(N(CreateParadeNPC), NPC_ShyGuyFormation22) - EVT_CALL(N(CreateParadeNPC), NPC_ShyGuyFormation23) - EVT_CALL(N(CreateParadeNPC), NPC_ShyGuyFormation31) - EVT_CALL(N(CreateParadeNPC), NPC_ShyGuyFormation32) - EVT_CALL(N(CreateParadeNPC), NPC_ShyGuyFormation33) - EVT_CALL(N(CreateParadeNPC), NPC_ShyGuyFormation41) - EVT_CALL(N(CreateParadeNPC), NPC_ShyGuyFormation42) - EVT_CALL(N(CreateParadeNPC), NPC_ShyGuyFormation43) - EVT_CALL(N(ParadeSpriteHeapFree), LVar0) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_TOADS) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DeleteNpc, NPC_Merle) - EVT_CALL(DeleteNpc, NPC_Merlee) - EVT_CALL(DeleteNpc, NPC_Merlon) - EVT_CALL(DeleteNpc, NPC_Merluvlee) - EVT_CALL(DeleteNpc, NPC_Merlow) - EVT_CALL(DeleteNpc, NPC_Merlar) - EVT_CALL(DeleteNpc, NPC_SunSad) - EVT_CALL(DeleteNpc, NPC_SunHappy) - EVT_CALL(DeleteNpc, NPC_Bubulb1) - EVT_CALL(DeleteNpc, NPC_Bubulb2) - EVT_WAIT(1) - EVT_CALL(N(CreateParadeNPC), NPC_HornPlayer1) - EVT_CALL(N(CreateParadeNPC), NPC_HornPlayer2) - EVT_CALL(N(CreateParadeNPC), NPC_Drummer1) - EVT_CALL(N(CreateParadeNPC), NPC_Drummer2) - EVT_CALL(N(CreateParadeNPC), NPC_StandardBearer1) - EVT_CALL(N(CreateParadeNPC), NPC_StandardBearer2) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_PEACH) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DeleteNpc, NPC_PyroGuy1) - EVT_CALL(DeleteNpc, NPC_PyroGuy2) - EVT_CALL(DeleteNpc, NPC_Pratfaller) - EVT_CALL(DeleteNpc, NPC_ShyGuyMarshall) - EVT_CALL(DeleteNpc, NPC_GeneralGuy) - EVT_CALL(DeleteNpc, NPC_BackupDancer1) - EVT_CALL(DeleteNpc, NPC_BackupDancer2) - EVT_CALL(DeleteNpc, NPC_GrooveGuy1) - EVT_CALL(DeleteNpc, NPC_GrooveGuy2) - EVT_CALL(DeleteNpc, NPC_GrooveGuy3) - EVT_CALL(DeleteNpc, NPC_GrooveGuy4) - EVT_CALL(DeleteNpc, NPC_ShyGuyFormation11) - EVT_CALL(DeleteNpc, NPC_ShyGuyFormation12) - EVT_CALL(DeleteNpc, NPC_ShyGuyFormation13) - EVT_CALL(DeleteNpc, NPC_ShyGuyFormation21) - EVT_CALL(DeleteNpc, NPC_ShyGuyFormation22) - EVT_CALL(DeleteNpc, NPC_ShyGuyFormation23) - EVT_CALL(DeleteNpc, NPC_ShyGuyFormation31) - EVT_CALL(DeleteNpc, NPC_ShyGuyFormation32) - EVT_CALL(DeleteNpc, NPC_ShyGuyFormation33) - EVT_CALL(DeleteNpc, NPC_ShyGuyFormation41) - EVT_CALL(DeleteNpc, NPC_ShyGuyFormation42) - EVT_CALL(DeleteNpc, NPC_ShyGuyFormation43) - EVT_WAIT(1) - EVT_CALL(N(CreateParadeNPC), NPC_Mario) - EVT_CALL(N(CreateParadeNPC), NPC_Peach) - EVT_CALL(N(CreateParadeNPC), NPC_Twink) - EVT_CALL(N(CreateParadeNPC), NPC_Twirler1) - EVT_CALL(N(CreateParadeNPC), NPC_Twirler2) - EVT_CALL(N(CreateParadeNPC), NPC_Twirler3) - EVT_CALL(N(CreateParadeNPC), NPC_Baton1) - EVT_CALL(N(CreateParadeNPC), NPC_Baton2) - EVT_CALL(N(CreateParadeNPC), NPC_Baton3) - EVT_CALL(N(CreateParadeNPC), NPC_StandardBearer3) - EVT_CALL(N(CreateParadeNPC), NPC_StandardBearer4) - EVT_RETURN - EVT_END + Call(N(CreateParadeNPC), NPC_Eldstar) + Call(N(CreateParadeNPC), NPC_Mamar) + Call(N(CreateParadeNPC), NPC_Skolar) + Call(N(CreateParadeNPC), NPC_Muskular) + Call(N(CreateParadeNPC), NPC_Misstar) + Call(N(CreateParadeNPC), NPC_Klevar) + Call(N(CreateParadeNPC), NPC_Kalmar) + Call(N(CreateParadeNPC), NPC_PenguinMayor) + Call(N(CreateParadeNPC), NPC_PenguinMayorWife) + Call(N(CreateParadeNPC), NPC_PenguinSkater1) + Call(N(CreateParadeNPC), NPC_PenguinSkater2) + Call(N(CreateParadeNPC), NPC_ViolinPlayer1) + Call(N(CreateParadeNPC), NPC_ViolinPlayer2) + Call(N(CreateParadeNPC), NPC_ViolinPlayer3) + Call(N(CreateParadeNPC), NPC_Conductor) + Call(N(CreateParadeNPC), NPC_Singer) + Call(N(ParadeSpriteHeapMalloc), 0x13400, LVar0) + Call(N(CreateParadeNPC), NPC_AmayzeDayzee1) + Call(N(CreateParadeNPC), NPC_AmayzeDayzee2) + Call(N(ParadeSpriteHeapFree), LVar0) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_WIZARDS + 100) + BreakLoop + EndIf + EndLoop + Call(DeleteNpc, NPC_Eldstar) + Call(DeleteNpc, NPC_Mamar) + Call(DeleteNpc, NPC_Skolar) + Call(DeleteNpc, NPC_Muskular) + Call(DeleteNpc, NPC_Misstar) + Call(DeleteNpc, NPC_Klevar) + Call(DeleteNpc, NPC_Kalmar) + Call(DeleteNpc, NPC_PenguinMayor) + Call(DeleteNpc, NPC_PenguinMayorWife) + Call(DeleteNpc, NPC_PenguinSkater1) + Call(DeleteNpc, NPC_PenguinSkater2) + Call(DeleteNpc, NPC_ViolinPlayer1) + Call(DeleteNpc, NPC_ViolinPlayer2) + Call(DeleteNpc, NPC_ViolinPlayer3) + Call(DeleteNpc, NPC_Conductor) + Call(DeleteNpc, NPC_Singer) + Wait(1) + Call(N(CreateParadeNPC), NPC_Merle) + Call(N(CreateParadeNPC), NPC_Merlee) + Call(N(CreateParadeNPC), NPC_Merlon) + Call(N(CreateParadeNPC), NPC_Merluvlee) + Call(N(CreateParadeNPC), NPC_Merlow) + Call(N(CreateParadeNPC), NPC_Merlar) + Call(N(CreateParadeNPC), NPC_SunSad) + Call(N(CreateParadeNPC), NPC_SunHappy) + Call(N(CreateParadeNPC), NPC_Bubulb1) + Call(N(CreateParadeNPC), NPC_Bubulb2) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_SHYGUY_DANCE) + BreakLoop + EndIf + EndLoop + Call(DeleteNpc, NPC_AmayzeDayzee1) + Call(DeleteNpc, NPC_AmayzeDayzee2) + Wait(1) + Call(N(ParadeSpriteHeapMalloc), 0x4700, LVar0) + Call(N(CreateParadeNPC), NPC_PyroGuy1) + Call(N(CreateParadeNPC), NPC_PyroGuy2) + Call(N(CreateParadeNPC), NPC_Pratfaller) + Call(N(CreateParadeNPC), NPC_ShyGuyMarshall) + Call(N(CreateParadeNPC), NPC_GeneralGuy) + Call(N(CreateParadeNPC), NPC_BackupDancer1) + Call(N(CreateParadeNPC), NPC_BackupDancer2) + Call(N(CreateParadeNPC), NPC_GrooveGuy1) + Call(N(CreateParadeNPC), NPC_GrooveGuy2) + Call(N(CreateParadeNPC), NPC_GrooveGuy3) + Call(N(CreateParadeNPC), NPC_GrooveGuy4) + Call(N(CreateParadeNPC), NPC_ShyGuyFormation11) + Call(N(CreateParadeNPC), NPC_ShyGuyFormation12) + Call(N(CreateParadeNPC), NPC_ShyGuyFormation13) + Call(N(CreateParadeNPC), NPC_ShyGuyFormation21) + Call(N(CreateParadeNPC), NPC_ShyGuyFormation22) + Call(N(CreateParadeNPC), NPC_ShyGuyFormation23) + Call(N(CreateParadeNPC), NPC_ShyGuyFormation31) + Call(N(CreateParadeNPC), NPC_ShyGuyFormation32) + Call(N(CreateParadeNPC), NPC_ShyGuyFormation33) + Call(N(CreateParadeNPC), NPC_ShyGuyFormation41) + Call(N(CreateParadeNPC), NPC_ShyGuyFormation42) + Call(N(CreateParadeNPC), NPC_ShyGuyFormation43) + Call(N(ParadeSpriteHeapFree), LVar0) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_TOADS) + BreakLoop + EndIf + EndLoop + Call(DeleteNpc, NPC_Merle) + Call(DeleteNpc, NPC_Merlee) + Call(DeleteNpc, NPC_Merlon) + Call(DeleteNpc, NPC_Merluvlee) + Call(DeleteNpc, NPC_Merlow) + Call(DeleteNpc, NPC_Merlar) + Call(DeleteNpc, NPC_SunSad) + Call(DeleteNpc, NPC_SunHappy) + Call(DeleteNpc, NPC_Bubulb1) + Call(DeleteNpc, NPC_Bubulb2) + Wait(1) + Call(N(CreateParadeNPC), NPC_HornPlayer1) + Call(N(CreateParadeNPC), NPC_HornPlayer2) + Call(N(CreateParadeNPC), NPC_Drummer1) + Call(N(CreateParadeNPC), NPC_Drummer2) + Call(N(CreateParadeNPC), NPC_StandardBearer1) + Call(N(CreateParadeNPC), NPC_StandardBearer2) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_PEACH) + BreakLoop + EndIf + EndLoop + Call(DeleteNpc, NPC_PyroGuy1) + Call(DeleteNpc, NPC_PyroGuy2) + Call(DeleteNpc, NPC_Pratfaller) + Call(DeleteNpc, NPC_ShyGuyMarshall) + Call(DeleteNpc, NPC_GeneralGuy) + Call(DeleteNpc, NPC_BackupDancer1) + Call(DeleteNpc, NPC_BackupDancer2) + Call(DeleteNpc, NPC_GrooveGuy1) + Call(DeleteNpc, NPC_GrooveGuy2) + Call(DeleteNpc, NPC_GrooveGuy3) + Call(DeleteNpc, NPC_GrooveGuy4) + Call(DeleteNpc, NPC_ShyGuyFormation11) + Call(DeleteNpc, NPC_ShyGuyFormation12) + Call(DeleteNpc, NPC_ShyGuyFormation13) + Call(DeleteNpc, NPC_ShyGuyFormation21) + Call(DeleteNpc, NPC_ShyGuyFormation22) + Call(DeleteNpc, NPC_ShyGuyFormation23) + Call(DeleteNpc, NPC_ShyGuyFormation31) + Call(DeleteNpc, NPC_ShyGuyFormation32) + Call(DeleteNpc, NPC_ShyGuyFormation33) + Call(DeleteNpc, NPC_ShyGuyFormation41) + Call(DeleteNpc, NPC_ShyGuyFormation42) + Call(DeleteNpc, NPC_ShyGuyFormation43) + Wait(1) + Call(N(CreateParadeNPC), NPC_Mario) + Call(N(CreateParadeNPC), NPC_Peach) + Call(N(CreateParadeNPC), NPC_Twink) + Call(N(CreateParadeNPC), NPC_Twirler1) + Call(N(CreateParadeNPC), NPC_Twirler2) + Call(N(CreateParadeNPC), NPC_Twirler3) + Call(N(CreateParadeNPC), NPC_Baton1) + Call(N(CreateParadeNPC), NPC_Baton2) + Call(N(CreateParadeNPC), NPC_Baton3) + Call(N(CreateParadeNPC), NPC_StandardBearer3) + Call(N(CreateParadeNPC), NPC_StandardBearer4) + Return + End }; EvtScript N(EVS_ParadePhase_PlayCredits) = { - EVT_WAIT(60) - EVT_EXEC(N(EVS_InitCredits)) - EVT_EXEC(N(EVS_ShowCredits_Jobs)) - EVT_EXEC(N(EVS_ShowCredits_Names)) - EVT_RETURN - EVT_END + Wait(60) + Exec(N(EVS_InitCredits)) + Exec(N(EVS_ShowCredits_Jobs)) + Exec(N(EVS_ShowCredits_Names)) + Return + End }; EvtScript N(EVS_ManageParade) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetMusicTrack, 0, SONG_PARADE_NIGHT, 0, 8) - EVT_EXEC(N(EVS_SetupInitialCamera)) - EVT_EXEC(N(EVS_ManageNpcPool)) - EVT_EXEC_GET_TID(N(EVS_ParadePhase_StarSpirits), LVarA) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IS_THREAD_RUNNING(LVarA, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_ParadePhase_PlayCredits)) - EVT_EXEC_GET_TID(N(EVS_UpdateScrollPos), LVarA) - EVT_EXEC_GET_TID(N(EVS_UpdateTexPan_Ground), LVarB) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_SKATERS) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_ParadePhase_SkatingPenguins)) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_MAYOR) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_ParadePhase_MayorPenguin)) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_OPERA) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_ParadePhase_Opera)) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_WIZARDS) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_ParadePhase_Wizards)) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_SHYGUY_DANCE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_ParadePhase_ShyGuyDancing)) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_SHYGUY_MARCH) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_ParadePhase_ShyGuyFormation)) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_TOADS) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_ParadePhase_Toads1)) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_PEACH) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC_GET_TID(N(EVS_ParadePhase_MarioPeach), LVarC) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_EXIT) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_KILL_THREAD(LVarA) - EVT_KILL_THREAD(LVarB) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IS_THREAD_RUNNING(LVarC, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_ParadePhase_Toads2)) - EVT_WAIT(150) - EVT_EXEC(N(EVS_MarioPeachExit)) - EVT_WAIT(200) - EVT_CALL(GotoMap, EVT_PTR("kmr_30"), kmr_30_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetMusicTrack, 0, SONG_PARADE_NIGHT, 0, 8) + Exec(N(EVS_SetupInitialCamera)) + Exec(N(EVS_ManageNpcPool)) + ExecGetTID(N(EVS_ParadePhase_StarSpirits), LVarA) + Loop(0) + Wait(1) + IsThreadRunning(LVarA, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_ParadePhase_PlayCredits)) + ExecGetTID(N(EVS_UpdateScrollPos), LVarA) + ExecGetTID(N(EVS_UpdateTexPan_Ground), LVarB) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_SKATERS) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_ParadePhase_SkatingPenguins)) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_MAYOR) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_ParadePhase_MayorPenguin)) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_OPERA) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_ParadePhase_Opera)) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_WIZARDS) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_ParadePhase_Wizards)) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_SHYGUY_DANCE) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_ParadePhase_ShyGuyDancing)) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_SHYGUY_MARCH) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_ParadePhase_ShyGuyFormation)) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_TOADS) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_ParadePhase_Toads1)) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_PEACH) + BreakLoop + EndIf + EndLoop + ExecGetTID(N(EVS_ParadePhase_MarioPeach), LVarC) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_EXIT) + BreakLoop + EndIf + EndLoop + KillThread(LVarA) + KillThread(LVarB) + Loop(0) + Wait(1) + IsThreadRunning(LVarC, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_ParadePhase_Toads2)) + Wait(150) + Exec(N(EVS_MarioPeachExit)) + Wait(200) + Call(GotoMap, Ref("kmr_30"), kmr_30_ENTRY_0) + Wait(100) + Return + End }; diff --git a/src/world/area_end/end_01/end_01_4_opera_float.c b/src/world/area_end/end_01/end_01_4_opera_float.c index 731436369af..c03ecde0af3 100644 --- a/src/world/area_end/end_01/end_01_4_opera_float.c +++ b/src/world/area_end/end_01/end_01_4_opera_float.c @@ -116,223 +116,223 @@ void N(gfx_build_set_spotlight_alpha)(void) { } EvtScript N(EVS_MakeSpiritAppear) = { - EVT_CALL(SetNpcFlagBits, NPC_PenguinSkater1, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) - EVT_CALL(GetNpcPos, LVarA, LVar2, LVar3, LVar4) - EVT_SUB(LVar3, 120) - EVT_SET(LVar5, LVar3) - EVT_ADD(LVar5, 15) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar2, LVar5, LVar4, 30) - EVT_CALL(SetNpcPos, LVarA, LVar2, LVar3, LVar4) - EVT_CALL(N(UpdateStarSpiritRotation)) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_PenguinSkater1, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) + Call(GetNpcPos, LVarA, LVar2, LVar3, LVar4) + Sub(LVar3, 120) + Set(LVar5, LVar3) + Add(LVar5, 15) + PlayEffect(EFFECT_SPARKLES, 0, LVar2, LVar5, LVar4, 30) + Call(SetNpcPos, LVarA, LVar2, LVar3, LVar4) + Call(N(UpdateStarSpiritRotation)) + Return + End }; EvtScript N(EVS_ParadePhase_StarSpirits) = { - EVT_CALL(N(SetWorldDark)) - EVT_WAIT(20) - EVT_SET(LVarA, NPC_Eldstar) - EVT_EXEC(N(EVS_MakeSpiritAppear)) - EVT_WAIT(2) - EVT_SET(LVarA, NPC_Mamar) - EVT_EXEC(N(EVS_MakeSpiritAppear)) - EVT_WAIT(2) - EVT_SET(LVarA, NPC_Skolar) - EVT_EXEC(N(EVS_MakeSpiritAppear)) - EVT_WAIT(3) - EVT_SET(LVarA, NPC_Misstar) - EVT_EXEC(N(EVS_MakeSpiritAppear)) - EVT_WAIT(5) - EVT_SET(LVarA, NPC_Klevar) - EVT_EXEC(N(EVS_MakeSpiritAppear)) - EVT_WAIT(3) - EVT_SET(LVarA, NPC_Muskular) - EVT_EXEC(N(EVS_MakeSpiritAppear)) - EVT_WAIT(7) - EVT_SET(LVarA, NPC_Kalmar) - EVT_EXEC(N(EVS_MakeSpiritAppear)) - EVT_WAIT(30) - EVT_CALL(N(FadeInWorld)) - EVT_WAIT(60) - EVT_RETURN - EVT_END + Call(N(SetWorldDark)) + Wait(20) + Set(LVarA, NPC_Eldstar) + Exec(N(EVS_MakeSpiritAppear)) + Wait(2) + Set(LVarA, NPC_Mamar) + Exec(N(EVS_MakeSpiritAppear)) + Wait(2) + Set(LVarA, NPC_Skolar) + Exec(N(EVS_MakeSpiritAppear)) + Wait(3) + Set(LVarA, NPC_Misstar) + Exec(N(EVS_MakeSpiritAppear)) + Wait(5) + Set(LVarA, NPC_Klevar) + Exec(N(EVS_MakeSpiritAppear)) + Wait(3) + Set(LVarA, NPC_Muskular) + Exec(N(EVS_MakeSpiritAppear)) + Wait(7) + Set(LVarA, NPC_Kalmar) + Exec(N(EVS_MakeSpiritAppear)) + Wait(30) + Call(N(FadeInWorld)) + Wait(60) + Return + End }; EvtScript N(EVS_SkatingPenguin1) = { - EVT_CALL(SetNpcFlagBits, NPC_PenguinSkater1, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) - EVT_CHILD_THREAD - EVT_LOOP(0) - EVT_CALL(SetNpcAnimation, NPC_PenguinSkater1, ANIM_ParadeIceShow_Violin_SkateKickLeft) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_PenguinSkater1, ANIM_ParadeIceShow_Violin_SkateKickRight) - EVT_WAIT(30) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(GetNpcPos, NPC_PenguinSkater1, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -180) - EVT_CALL(NpcMoveTo, NPC_PenguinSkater1, LVar0, LVar2, 120) - EVT_CALL(N(SkateInCirclePenguin1), NPC_PenguinSkater1) - EVT_CALL(GetNpcPos, NPC_PenguinSkater1, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -180) - EVT_CALL(NpcMoveTo, NPC_PenguinSkater1, LVar0, LVar2, 120) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_PenguinSkater1, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) + ChildThread + Loop(0) + Call(SetNpcAnimation, NPC_PenguinSkater1, ANIM_ParadeIceShow_Violin_SkateKickLeft) + Wait(30) + Call(SetNpcAnimation, NPC_PenguinSkater1, ANIM_ParadeIceShow_Violin_SkateKickRight) + Wait(30) + EndLoop + EndChildThread + Call(GetNpcPos, NPC_PenguinSkater1, LVar0, LVar1, LVar2) + Add(LVar0, -180) + Call(NpcMoveTo, NPC_PenguinSkater1, LVar0, LVar2, 120) + Call(N(SkateInCirclePenguin1), NPC_PenguinSkater1) + Call(GetNpcPos, NPC_PenguinSkater1, LVar0, LVar1, LVar2) + Add(LVar0, -180) + Call(NpcMoveTo, NPC_PenguinSkater1, LVar0, LVar2, 120) + Return + End }; EvtScript N(EVS_SkatingPenguin2) = { - EVT_CALL(SetNpcFlagBits, NPC_PenguinSkater2, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) - EVT_CHILD_THREAD - EVT_LOOP(0) - EVT_CALL(SetNpcAnimation, NPC_PenguinSkater2, ANIM_ParadeIceShow_Violin_SkateKickLeft) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_PenguinSkater2, ANIM_ParadeIceShow_Violin_SkateKickRight) - EVT_WAIT(30) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(GetNpcPos, NPC_PenguinSkater2, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -210) - EVT_CALL(NpcMoveTo, NPC_PenguinSkater2, LVar0, LVar2, 140) - EVT_CALL(N(SkateInCirclePenguin2), NPC_PenguinSkater2) - EVT_CALL(GetNpcPos, NPC_PenguinSkater2, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -180) - EVT_CALL(NpcMoveTo, NPC_PenguinSkater2, LVar0, LVar2, 120) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_PenguinSkater2, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) + ChildThread + Loop(0) + Call(SetNpcAnimation, NPC_PenguinSkater2, ANIM_ParadeIceShow_Violin_SkateKickLeft) + Wait(30) + Call(SetNpcAnimation, NPC_PenguinSkater2, ANIM_ParadeIceShow_Violin_SkateKickRight) + Wait(30) + EndLoop + EndChildThread + Call(GetNpcPos, NPC_PenguinSkater2, LVar0, LVar1, LVar2) + Add(LVar0, -210) + Call(NpcMoveTo, NPC_PenguinSkater2, LVar0, LVar2, 140) + Call(N(SkateInCirclePenguin2), NPC_PenguinSkater2) + Call(GetNpcPos, NPC_PenguinSkater2, LVar0, LVar1, LVar2) + Add(LVar0, -180) + Call(NpcMoveTo, NPC_PenguinSkater2, LVar0, LVar2, 120) + Return + End }; EvtScript N(EVS_ParadePhase_SkatingPenguins) = { - EVT_EXEC_GET_TID(N(EVS_SkatingPenguin1), LVarA) - EVT_EXEC_GET_TID(N(EVS_SkatingPenguin2), LVarB) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_SKATERS + 200) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_KILL_THREAD(LVarA) - EVT_KILL_THREAD(LVarB) - EVT_RETURN - EVT_END + ExecGetTID(N(EVS_SkatingPenguin1), LVarA) + ExecGetTID(N(EVS_SkatingPenguin2), LVarB) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_SKATERS + 200) + BreakLoop + EndIf + EndLoop + KillThread(LVarA) + KillThread(LVarB) + Return + End }; EvtScript N(EVS_ParadePhase_MayorPenguin) = { - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_PenguinMayor, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -300) - EVT_CALL(NpcMoveTo, NPC_PenguinMayor, LVar0, LVar2, 500) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_PenguinMayorWife, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -300) - EVT_CALL(NpcMoveTo, NPC_PenguinMayorWife, LVar0, LVar2, 500) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + Call(GetNpcPos, NPC_PenguinMayor, LVar0, LVar1, LVar2) + Add(LVar0, -300) + Call(NpcMoveTo, NPC_PenguinMayor, LVar0, LVar2, 500) + EndThread + Thread + Call(GetNpcPos, NPC_PenguinMayorWife, LVar0, LVar1, LVar2) + Add(LVar0, -300) + Call(NpcMoveTo, NPC_PenguinMayorWife, LVar0, LVar2, 500) + EndThread + Return + End }; s32 N(SpotlightsAlpha) = 0; EvtScript N(EVS_TexPan_OperaFloat_MainStageLights) = { - EVT_CALL(EnableTexPanning, MODEL_kino3, TRUE) - EVT_CALL(EnableTexPanning, MODEL_kino5, TRUE) - EVT_CALL(EnableTexPanning, MODEL_kino6, TRUE) - EVT_SET(LVar1, LVar0) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 0x2000) - EVT_CALL(SetTexPanOffset, TEX_PANNER_E, TEX_PANNER_MAIN, LVar0, 0) - EVT_WAIT(LVar1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(EnableTexPanning, MODEL_kino3, TRUE) + Call(EnableTexPanning, MODEL_kino5, TRUE) + Call(EnableTexPanning, MODEL_kino6, TRUE) + Set(LVar1, LVar0) + Set(LVar0, 0) + Loop(0) + Add(LVar0, 0x2000) + Call(SetTexPanOffset, TEX_PANNER_E, TEX_PANNER_MAIN, LVar0, 0) + Wait(LVar1) + EndLoop + Return + End }; EvtScript N(EVS_TexPan_OperaFloat_StageLights) = { - EVT_CALL(EnableTexPanning, MODEL_kino4, TRUE) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 0x2000) - EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, LVar0, 0) - EVT_WAIT(16) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(EnableTexPanning, MODEL_kino4, TRUE) + Set(LVar0, 0) + Loop(0) + Add(LVar0, 0x2000) + Call(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, LVar0, 0) + Wait(16) + EndLoop + Return + End }; EvtScript N(EVS_UpdateLightshow) = { - EVT_CALL(EnableModel, MODEL_kino7, TRUE) - EVT_CALL(EnableModel, MODEL_kino8, TRUE) - EVT_CALL(EnableTexPanning, MODEL_kino8, TRUE) - EVT_CALL(SetModelCustomGfx, MODEL_kino7, CUSTOM_GFX_1, -1) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(gfx_build_set_spotlight_alpha)), NULL) - EVT_CHILD_THREAD - EVT_CALL(MakeLerp, 0, 255, 90, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetSpotlightsAlpha), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 0x1000) - EVT_ADD(LVar1, 0x400) - EVT_CALL(SetTexPanOffset, TEX_PANNER_F, TEX_PANNER_MAIN, LVar0, LVar1) - EVT_WAIT(4) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_kino7, TRUE) + Call(EnableModel, MODEL_kino8, TRUE) + Call(EnableTexPanning, MODEL_kino8, TRUE) + Call(SetModelCustomGfx, MODEL_kino7, CUSTOM_GFX_1, -1) + Call(SetCustomGfxBuilders, CUSTOM_GFX_1, Ref(N(gfx_build_set_spotlight_alpha)), NULL) + ChildThread + Call(MakeLerp, 0, 255, 90, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(N(SetSpotlightsAlpha), LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndChildThread + Set(LVar0, 0) + Set(LVar1, 0) + Loop(0) + Add(LVar0, 0x1000) + Add(LVar1, 0x400) + Call(SetTexPanOffset, TEX_PANNER_F, TEX_PANNER_MAIN, LVar0, LVar1) + Wait(4) + EndLoop + Return + End }; EvtScript N(EVS_ParadePhase_Opera) = { - EVT_CALL(EnableModel, MODEL_kino7, FALSE) - EVT_CALL(EnableModel, MODEL_kino8, FALSE) - EVT_SET(LVar0, 8) - EVT_EXEC_GET_TID(N(EVS_TexPan_OperaFloat_MainStageLights), LVarA) - EVT_EXEC_GET_TID(N(EVS_TexPan_OperaFloat_StageLights), LVarB) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_OPERA + 335) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_KILL_THREAD(LVarA) - EVT_SET(LVar0, 1) - EVT_EXEC_GET_TID(N(EVS_TexPan_OperaFloat_MainStageLights), LVarA) - EVT_EXEC_GET_TID(N(EVS_UpdateLightshow), LVarC) - EVT_CALL(SetNpcFlagBits, NPC_Singer, NPC_FLAG_FLYING, TRUE) - EVT_CALL(MakeLerp, 0, 55, 90 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_kino1, 0, LVar0, 0) - EVT_ADD(LVar0, -19) - EVT_CALL(SetNpcPos, NPC_Singer, -2529, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_KILL_THREAD(LVarA) - EVT_SET(LVar0, 8) - EVT_EXEC_GET_TID(N(EVS_TexPan_OperaFloat_MainStageLights), LVarA) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Singer, ANIM_ParadeIceShow_Violin_ShadeDivaSing) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_OPERA + 600) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_KILL_THREAD(LVarA) - EVT_KILL_THREAD(LVarB) - EVT_KILL_THREAD(LVarC) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_kino7, FALSE) + Call(EnableModel, MODEL_kino8, FALSE) + Set(LVar0, 8) + ExecGetTID(N(EVS_TexPan_OperaFloat_MainStageLights), LVarA) + ExecGetTID(N(EVS_TexPan_OperaFloat_StageLights), LVarB) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_OPERA + 335) + BreakLoop + EndIf + EndLoop + KillThread(LVarA) + Set(LVar0, 1) + ExecGetTID(N(EVS_TexPan_OperaFloat_MainStageLights), LVarA) + ExecGetTID(N(EVS_UpdateLightshow), LVarC) + Call(SetNpcFlagBits, NPC_Singer, NPC_FLAG_FLYING, TRUE) + Call(MakeLerp, 0, 55, 90 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_kino1, 0, LVar0, 0) + Add(LVar0, -19) + Call(SetNpcPos, NPC_Singer, -2529, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + KillThread(LVarA) + Set(LVar0, 8) + ExecGetTID(N(EVS_TexPan_OperaFloat_MainStageLights), LVarA) + Wait(10) + Call(SetNpcAnimation, NPC_Singer, ANIM_ParadeIceShow_Violin_ShadeDivaSing) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_OPERA + 600) + BreakLoop + EndIf + EndLoop + KillThread(LVarA) + KillThread(LVarB) + KillThread(LVarC) + Return + End }; diff --git a/src/world/area_end/end_01/end_01_5_flower_float.c b/src/world/area_end/end_01/end_01_5_flower_float.c index 463d7de19cc..2201e1837b7 100644 --- a/src/world/area_end/end_01/end_01_5_flower_float.c +++ b/src/world/area_end/end_01/end_01_5_flower_float.c @@ -2,185 +2,185 @@ #include "effects.h" EvtScript N(EVS_TexPan_FlowerFloat_Base) = { - EVT_CALL(EnableTexPanning, MODEL_flo1, TRUE) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 0x2000) - EVT_CALL(SetTexPanOffset, TEX_PANNER_E, TEX_PANNER_MAIN, LVar0, 0) - EVT_WAIT(8) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(EnableTexPanning, MODEL_flo1, TRUE) + Set(LVar0, 0) + Loop(0) + Add(LVar0, 0x2000) + Call(SetTexPanOffset, TEX_PANNER_E, TEX_PANNER_MAIN, LVar0, 0) + Wait(8) + EndLoop + Return + End }; EvtScript N(EVS_TexPan_FlowerFloat_WisterwoodBody) = { - EVT_CALL(EnableTexPanning, MODEL_flo2, TRUE) - EVT_CALL(EnableTexPanning, MODEL_flo4, TRUE) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 0x400) - EVT_CALL(SetTexPanOffset, TEX_PANNER_A, TEX_PANNER_AUX, LVar0, LVar0) - EVT_WAIT(4) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(EnableTexPanning, MODEL_flo2, TRUE) + Call(EnableTexPanning, MODEL_flo4, TRUE) + Set(LVar0, 0) + Loop(0) + Add(LVar0, 0x400) + Call(SetTexPanOffset, TEX_PANNER_A, TEX_PANNER_AUX, LVar0, LVar0) + Wait(4) + EndLoop + Return + End }; EvtScript N(EVS_TexPan_FlowerFloat_WisterwoodBlink) = { - EVT_CALL(EnableTexPanning, MODEL_flo3, TRUE) - EVT_CALL(SetTexPanOffset, TEX_PANNER_B, TEX_PANNER_MAIN, 0x8000, 0) - EVT_LOOP(0) - EVT_CALL(RandInt, 30, LVar0) - EVT_ADD(LVar0, 10) - EVT_WAIT(LVar0) - EVT_CALL(RandInt, 1, LVar0) - EVT_ADD(LVar0, 1) - EVT_LOOP(LVar0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_B, TEX_PANNER_MAIN, 0, 0) - EVT_CALL(RandInt, 5, LVar1) - EVT_ADD(LVar1, 2) - EVT_WAIT(LVar1) - EVT_CALL(SetTexPanOffset, TEX_PANNER_B, TEX_PANNER_MAIN, 0x8000, 0) - EVT_CALL(RandInt, 5, LVar1) - EVT_ADD(LVar1, 2) - EVT_WAIT(LVar1) - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(EnableTexPanning, MODEL_flo3, TRUE) + Call(SetTexPanOffset, TEX_PANNER_B, TEX_PANNER_MAIN, 0x8000, 0) + Loop(0) + Call(RandInt, 30, LVar0) + Add(LVar0, 10) + Wait(LVar0) + Call(RandInt, 1, LVar0) + Add(LVar0, 1) + Loop(LVar0) + Call(SetTexPanOffset, TEX_PANNER_B, TEX_PANNER_MAIN, 0, 0) + Call(RandInt, 5, LVar1) + Add(LVar1, 2) + Wait(LVar1) + Call(SetTexPanOffset, TEX_PANNER_B, TEX_PANNER_MAIN, 0x8000, 0) + Call(RandInt, 5, LVar1) + Add(LVar1, 2) + Wait(LVar1) + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_Amayze_Dayzees) = { - EVT_CALL(GetNpcPos, NPC_AmayzeDayzee1, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 30) - EVT_SUB(LVar2, 2) - EVT_CALL(GetNpcPos, NPC_AmayzeDayzee2, LVar3, LVar4, LVar5) - EVT_ADD(LVar4, 30) - EVT_SUB(LVar5, 2) - EVT_LOOP(0) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 30) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 30) - EVT_WAIT(15) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_AmayzeDayzee1, LVar0, LVar1, LVar2) + Add(LVar1, 30) + Sub(LVar2, 2) + Call(GetNpcPos, NPC_AmayzeDayzee2, LVar3, LVar4, LVar5) + Add(LVar4, 30) + Sub(LVar5, 2) + Loop(0) + PlayEffect(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 30) + PlayEffect(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 30) + Wait(15) + EndLoop + Return + End }; EvtScript N(EVS_Sun) = { - EVT_THREAD - EVT_CALL(SetNpcPos, NPC_SunSad, -2185, 130, -30) - EVT_CALL(NpcFlyTo, NPC_SunSad, -2185, 50, -30, 10 * DT, 0, EASING_LINEAR) - EVT_CALL(NpcFlyTo, NPC_SunSad, -2045, 50, -30, 70 * DT, 0, EASING_LINEAR) - EVT_CALL(SetNpcAnimation, NPC_SunSad, ANIM_Sun_TalkPleased) - EVT_CALL(NpcFlyTo, NPC_SunSad, -1645, 50, -30, 200 * DT, 0, EASING_LINEAR) - EVT_CALL(SetNpcPos, NPC_SunSad, 0, -500, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcPos, NPC_SunHappy, -2185, 130, -30) - EVT_CALL(NpcFlyTo, NPC_SunHappy, -2185, 50, -30, 10 * DT, 0, EASING_LINEAR) - EVT_CALL(NpcFlyTo, NPC_SunHappy, -2045, 50, -30, 70 * DT, 0, EASING_LINEAR) - EVT_CALL(SetNpcAnimation, NPC_SunHappy, ANIM_Sun_FireTalkPleased) - EVT_CALL(NpcFlyTo, NPC_SunHappy, -1645, 50, -30, 200 * DT, 0, EASING_LINEAR) - EVT_CALL(SetNpcPos, NPC_SunHappy, 0, -500, 0) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + Call(SetNpcPos, NPC_SunSad, -2185, 130, -30) + Call(NpcFlyTo, NPC_SunSad, -2185, 50, -30, 10 * DT, 0, EASING_LINEAR) + Call(NpcFlyTo, NPC_SunSad, -2045, 50, -30, 70 * DT, 0, EASING_LINEAR) + Call(SetNpcAnimation, NPC_SunSad, ANIM_Sun_TalkPleased) + Call(NpcFlyTo, NPC_SunSad, -1645, 50, -30, 200 * DT, 0, EASING_LINEAR) + Call(SetNpcPos, NPC_SunSad, 0, -500, 0) + EndThread + Thread + Call(SetNpcPos, NPC_SunHappy, -2185, 130, -30) + Call(NpcFlyTo, NPC_SunHappy, -2185, 50, -30, 10 * DT, 0, EASING_LINEAR) + Call(NpcFlyTo, NPC_SunHappy, -2045, 50, -30, 70 * DT, 0, EASING_LINEAR) + Call(SetNpcAnimation, NPC_SunHappy, ANIM_Sun_FireTalkPleased) + Call(NpcFlyTo, NPC_SunHappy, -1645, 50, -30, 200 * DT, 0, EASING_LINEAR) + Call(SetNpcPos, NPC_SunHappy, 0, -500, 0) + EndThread + Return + End }; EvtScript N(EVS_Bubulbs) = { - EVT_CALL(GetNpcPos, NPC_Bubulb1, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar0) - EVT_ADD(LVar3, -120) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, LVar3) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 0, 360, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Bubulb1, 0, LVar0, 0) - EVT_CALL(SetNpcRotation, NPC_Bubulb2, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(GetNpcPos, NPC_Bubulb1, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar0) - EVT_ADD(LVar3, 100) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, LVar3) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 0, 360, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Bubulb1, 0, LVar0, 0) - EVT_CALL(SetNpcRotation, NPC_Bubulb2, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_Bubulb1, LVar0, LVar1, LVar2) + Set(LVar3, LVar0) + Add(LVar3, -120) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, LVar3) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 0, 360, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Bubulb1, 0, LVar0, 0) + Call(SetNpcRotation, NPC_Bubulb2, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(GetNpcPos, NPC_Bubulb1, LVar0, LVar1, LVar2) + Set(LVar3, LVar0) + Add(LVar3, 100) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, LVar3) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 0, 360, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Bubulb1, 0, LVar0, 0) + Call(SetNpcRotation, NPC_Bubulb2, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_ParadePhase_Wizards) = { - EVT_EXEC_GET_TID(N(EVS_Amayze_Dayzees), LVarD) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_WIZARDS + 100) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(1) - EVT_EXEC_GET_TID(N(EVS_TexPan_FlowerFloat_Base), LVarA) - EVT_EXEC(N(EVS_Bubulbs)) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_WIZARDS + 365) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_Merle, ANIM_ParadeWizard_Merle_MerleRelease) - EVT_CALL(SetNpcAnimation, NPC_Merlee, ANIM_ParadeWizard_Merle_MerleeRelease) - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_ParadeWizard_Merle_MerlonRelease) - EVT_CALL(SetNpcAnimation, NPC_Merluvlee, ANIM_ParadeWizard_Merle_MerluvleeRelease) - EVT_CALL(SetNpcAnimation, NPC_Merlow, ANIM_ParadeWizard_Merle_MerlowRelease) - EVT_CALL(SetNpcAnimation, NPC_Merlar, ANIM_ParadeWizard_Merle_MerlarRelease) - EVT_CALL(GetNpcPos, NPC_Merlon, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 6, LVar0, LVar1, LVar2, 1, 20, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(30) - EVT_EXEC(N(EVS_Sun)) - EVT_EXEC_GET_TID(N(EVS_TexPan_FlowerFloat_WisterwoodBody), LVarB) - EVT_EXEC_GET_TID(N(EVS_TexPan_FlowerFloat_WisterwoodBlink), LVarC) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_SHYGUY_DANCE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_KILL_THREAD(LVarD) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_WIZARDS + 600) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_KILL_THREAD(LVarA) - EVT_KILL_THREAD(LVarB) - EVT_KILL_THREAD(LVarC) - EVT_RETURN - EVT_END + ExecGetTID(N(EVS_Amayze_Dayzees), LVarD) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_WIZARDS + 100) + BreakLoop + EndIf + EndLoop + Wait(1) + ExecGetTID(N(EVS_TexPan_FlowerFloat_Base), LVarA) + Exec(N(EVS_Bubulbs)) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_WIZARDS + 365) + BreakLoop + EndIf + EndLoop + Call(SetNpcAnimation, NPC_Merle, ANIM_ParadeWizard_Merle_MerleRelease) + Call(SetNpcAnimation, NPC_Merlee, ANIM_ParadeWizard_Merle_MerleeRelease) + Call(SetNpcAnimation, NPC_Merlon, ANIM_ParadeWizard_Merle_MerlonRelease) + Call(SetNpcAnimation, NPC_Merluvlee, ANIM_ParadeWizard_Merle_MerluvleeRelease) + Call(SetNpcAnimation, NPC_Merlow, ANIM_ParadeWizard_Merle_MerlowRelease) + Call(SetNpcAnimation, NPC_Merlar, ANIM_ParadeWizard_Merle_MerlarRelease) + Call(GetNpcPos, NPC_Merlon, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 6, LVar0, LVar1, LVar2, 1, 20, 0, 0, 0, 0, 0, 0, 0) + Wait(30) + Exec(N(EVS_Sun)) + ExecGetTID(N(EVS_TexPan_FlowerFloat_WisterwoodBody), LVarB) + ExecGetTID(N(EVS_TexPan_FlowerFloat_WisterwoodBlink), LVarC) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_SHYGUY_DANCE) + BreakLoop + EndIf + EndLoop + KillThread(LVarD) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_WIZARDS + 600) + BreakLoop + EndIf + EndLoop + KillThread(LVarA) + KillThread(LVarB) + KillThread(LVarC) + Return + End }; diff --git a/src/world/area_end/end_01/end_01_6_shyguy_float.c b/src/world/area_end/end_01/end_01_6_shyguy_float.c index 2d96a5d9997..b33988794f2 100644 --- a/src/world/area_end/end_01/end_01_6_shyguy_float.c +++ b/src/world/area_end/end_01/end_01_6_shyguy_float.c @@ -3,31 +3,31 @@ #include "world/common/atomic/ApplyTint.inc.c" EvtScript N(EVS_TexPan_ShyGuyFloat_Sides) = { - EVT_CALL(EnableTexPanning, MODEL_omo1, TRUE) - EVT_CALL(EnableTexPanning, MODEL_omo4, TRUE) - EVT_CALL(EnableTexPanning, MODEL_omo6, TRUE) - EVT_SET(LVar1, LVar0) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 0x1000) - EVT_CALL(SetTexPanOffset, TEX_PANNER_9, TEX_PANNER_AUX, LVar0, LVar0) - EVT_WAIT(LVar1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(EnableTexPanning, MODEL_omo1, TRUE) + Call(EnableTexPanning, MODEL_omo4, TRUE) + Call(EnableTexPanning, MODEL_omo6, TRUE) + Set(LVar1, LVar0) + Set(LVar0, 0) + Loop(0) + Add(LVar0, 0x1000) + Call(SetTexPanOffset, TEX_PANNER_9, TEX_PANNER_AUX, LVar0, LVar0) + Wait(LVar1) + EndLoop + Return + End }; EvtScript N(EVS_TexPan_ShyGuyFloat_Top) = { - EVT_CALL(EnableTexPanning, MODEL_omo8, TRUE) - EVT_CALL(EnableTexPanning, MODEL_omo13, TRUE) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 0x4000) - EVT_CALL(SetTexPanOffset, TEX_PANNER_8, TEX_PANNER_MAIN, LVar0, LVar0) - EVT_WAIT(6) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(EnableTexPanning, MODEL_omo8, TRUE) + Call(EnableTexPanning, MODEL_omo13, TRUE) + Set(LVar0, 0) + Loop(0) + Add(LVar0, 0x4000) + Call(SetTexPanOffset, TEX_PANNER_8, TEX_PANNER_MAIN, LVar0, LVar0) + Wait(6) + EndLoop + Return + End }; s32 N(ShyGuyFloat_InteriorModels)[] = { @@ -36,346 +36,346 @@ s32 N(ShyGuyFloat_InteriorModels)[] = { }; EvtScript N(EVS_ShyGuyFloat_Open) = { - EVT_THREAD - EVT_CALL(MakeLerp, 0, -90, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_h2, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 0, 90, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_h3, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(N(SetModelTintMode), APPLY_TINT_MODELS, EVT_PTR(N(ShyGuyFloat_InteriorModels)), ENV_TINT_REMAP) - EVT_CALL(N(SetModelTintParams), ENV_TINT_REMAP, 255, 255, 255, 120, 120, 80, 0, 0, 0) - EVT_WAIT(30) - EVT_CALL(N(SetModelTintParams), ENV_TINT_REMAP, 255, 255, 255, 0, 0, 0, 0, 0, 0) - EVT_RETURN - EVT_END + Thread + Call(MakeLerp, 0, -90, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_h2, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(MakeLerp, 0, 90, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_h3, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(N(SetModelTintMode), APPLY_TINT_MODELS, Ref(N(ShyGuyFloat_InteriorModels)), ENV_TINT_REMAP) + Call(N(SetModelTintParams), ENV_TINT_REMAP, 255, 255, 255, 120, 120, 80, 0, 0, 0) + Wait(30) + Call(N(SetModelTintParams), ENV_TINT_REMAP, 255, 255, 255, 0, 0, 0, 0, 0, 0) + Return + End }; EvtScript N(EVS_GeneralGuy) = { - EVT_SET(LVar0, 270) - EVT_LOOP(0) - EVT_IF_EQ(LVar0, 270) - EVT_SET(LVar0, 90) - EVT_ELSE - EVT_SET(LVar0, 270) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_GeneralGuy, ANIM_ParadeShyGuy_GeneralStill) - EVT_CALL(InterpNpcYaw, NPC_GeneralGuy, LVar0, 0) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_GeneralGuy, ANIM_ParadeShyGuy_GeneralPoint) - EVT_WAIT(20) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVar0, 270) + Loop(0) + IfEq(LVar0, 270) + Set(LVar0, 90) + Else + Set(LVar0, 270) + EndIf + Call(SetNpcAnimation, NPC_GeneralGuy, ANIM_ParadeShyGuy_GeneralStill) + Call(InterpNpcYaw, NPC_GeneralGuy, LVar0, 0) + Wait(10) + Call(SetNpcAnimation, NPC_GeneralGuy, ANIM_ParadeShyGuy_GeneralPoint) + Wait(20) + EndLoop + Return + End }; EvtScript N(EVS_ShyGuy_BackupDancer) = { - EVT_SET(LVar2, LVar0) - EVT_LOOP(0) - EVT_LOOP(3) - EVT_CALL(SetNpcAnimation, LVar2, ANIM_ParadeShyGuy_StackLand) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, LVar2, ANIM_ParadeShyGuy_StackHold) - EVT_WAIT(10) - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, LVar2, ANIM_ParadeShyGuy_StackPointUp) - EVT_WAIT(10) - EVT_CALL(MakeLerp, 0, 360, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, LVar2, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(10) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVar2, LVar0) + Loop(0) + Loop(3) + Call(SetNpcAnimation, LVar2, ANIM_ParadeShyGuy_StackLand) + Wait(10) + Call(SetNpcAnimation, LVar2, ANIM_ParadeShyGuy_StackHold) + Wait(10) + EndLoop + Call(SetNpcAnimation, LVar2, ANIM_ParadeShyGuy_StackPointUp) + Wait(10) + Call(MakeLerp, 0, 360, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, LVar2, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(10) + EndLoop + Return + End }; EvtScript N(EVS_GrooveGuy) = { - EVT_WAIT(30) - EVT_SET(LVar2, LVar0) - EVT_SET(LVar3, LVar1) - EVT_CALL(SetNpcJumpscale, LVar2, EVT_FLOAT(0.5)) - EVT_CALL(NpcJump0, LVar2, LVar3, 10, 20, 20) - EVT_WAIT(10) - EVT_LOOP(0) - EVT_LOOP(2) - EVT_CALL(SetNpcAnimation, LVar2, ANIM_ParadeShyGuy_GrooveLeanLeft) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, LVar2, ANIM_ParadeShyGuy_GroovePivot) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, LVar2, ANIM_ParadeShyGuy_GrooveLeanRight) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, LVar2, ANIM_ParadeShyGuy_GroovePivot) - EVT_WAIT(5) - EVT_END_LOOP - EVT_CALL(MakeLerp, 0, 360, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, LVar2, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(10) - EVT_END_LOOP - EVT_RETURN - EVT_END + Wait(30) + Set(LVar2, LVar0) + Set(LVar3, LVar1) + Call(SetNpcJumpscale, LVar2, Float(0.5)) + Call(NpcJump0, LVar2, LVar3, 10, 20, 20) + Wait(10) + Loop(0) + Loop(2) + Call(SetNpcAnimation, LVar2, ANIM_ParadeShyGuy_GrooveLeanLeft) + Wait(5) + Call(SetNpcAnimation, LVar2, ANIM_ParadeShyGuy_GroovePivot) + Wait(5) + Call(SetNpcAnimation, LVar2, ANIM_ParadeShyGuy_GrooveLeanRight) + Wait(5) + Call(SetNpcAnimation, LVar2, ANIM_ParadeShyGuy_GroovePivot) + Wait(5) + EndLoop + Call(MakeLerp, 0, 360, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, LVar2, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(10) + EndLoop + Return + End }; EvtScript N(EVS_ShyGuyFloat_Performers) = { - EVT_EXEC_GET_TID(N(EVS_GeneralGuy), LVar7) - EVT_SET(LVar0, NPC_BackupDancer1) - EVT_EXEC_GET_TID(N(EVS_ShyGuy_BackupDancer), LVar8) - EVT_SET(LVar0, NPC_BackupDancer2) - EVT_EXEC_GET_TID(N(EVS_ShyGuy_BackupDancer), LVar9) - EVT_SET(LVar0, NPC_GrooveGuy1) - EVT_SET(LVar1, -1508) - EVT_EXEC_GET_TID(N(EVS_GrooveGuy), LVarA) - EVT_SET(LVar0, NPC_GrooveGuy2) - EVT_SET(LVar1, -1468) - EVT_EXEC_GET_TID(N(EVS_GrooveGuy), LVarB) - EVT_SET(LVar0, NPC_GrooveGuy3) - EVT_SET(LVar1, -1428) - EVT_EXEC_GET_TID(N(EVS_GrooveGuy), LVarC) - EVT_SET(LVar0, NPC_GrooveGuy4) - EVT_SET(LVar1, -1388) - EVT_EXEC_GET_TID(N(EVS_GrooveGuy), LVarD) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_SHYGUY_DANCE + 600) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_KILL_THREAD(LVar7) - EVT_KILL_THREAD(LVar8) - EVT_KILL_THREAD(LVar9) - EVT_KILL_THREAD(LVarA) - EVT_KILL_THREAD(LVarB) - EVT_KILL_THREAD(LVarC) - EVT_KILL_THREAD(LVarD) - EVT_RETURN - EVT_END + ExecGetTID(N(EVS_GeneralGuy), LVar7) + Set(LVar0, NPC_BackupDancer1) + ExecGetTID(N(EVS_ShyGuy_BackupDancer), LVar8) + Set(LVar0, NPC_BackupDancer2) + ExecGetTID(N(EVS_ShyGuy_BackupDancer), LVar9) + Set(LVar0, NPC_GrooveGuy1) + Set(LVar1, -1508) + ExecGetTID(N(EVS_GrooveGuy), LVarA) + Set(LVar0, NPC_GrooveGuy2) + Set(LVar1, -1468) + ExecGetTID(N(EVS_GrooveGuy), LVarB) + Set(LVar0, NPC_GrooveGuy3) + Set(LVar1, -1428) + ExecGetTID(N(EVS_GrooveGuy), LVarC) + Set(LVar0, NPC_GrooveGuy4) + Set(LVar1, -1388) + ExecGetTID(N(EVS_GrooveGuy), LVarD) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_SHYGUY_DANCE + 600) + BreakLoop + EndIf + EndLoop + KillThread(LVar7) + KillThread(LVar8) + KillThread(LVar9) + KillThread(LVarA) + KillThread(LVarB) + KillThread(LVarC) + KillThread(LVarD) + Return + End }; EvtScript N(EVS_ParadePhase_ShyGuyDancing) = { - EVT_SET(LVar0, 4) - EVT_EXEC_GET_TID(N(EVS_TexPan_ShyGuyFloat_Sides), LVarA) - EVT_EXEC_GET_TID(N(EVS_TexPan_ShyGuyFloat_Top), LVarB) - EVT_WAIT(10) - EVT_CALL(NpcMoveTo, NPC_ShyGuyMarshall, -1648, 0, 50) - EVT_CALL(SetNpcAnimation, NPC_ShyGuyMarshall, ANIM_ParadeShyGuy_MarshallStill) - EVT_CALL(InterpNpcYaw, NPC_ShyGuyMarshall, 90, 0) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_ShyGuyMarshall, ANIM_ParadeShyGuy_MarshallBeckon) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_SHYGUY_DANCE + 260) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_ShyGuyMarshall, ANIM_ParadeShyGuy_MarshallWalk) - EVT_CALL(NpcMoveTo, NPC_ShyGuyMarshall, -1748, 0, 50) - EVT_END_THREAD - EVT_EXEC(N(EVS_ShyGuyFloat_Performers)) - EVT_KILL_THREAD(LVarA) - EVT_SET(LVar0, 2) - EVT_EXEC_GET_TID(N(EVS_TexPan_ShyGuyFloat_Sides), LVarA) - EVT_EXEC_WAIT(N(EVS_ShyGuyFloat_Open)) - EVT_KILL_THREAD(LVarA) - EVT_SET(LVar0, 4) - EVT_EXEC_GET_TID(N(EVS_TexPan_ShyGuyFloat_Sides), LVarA) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_SHYGUY_DANCE + 600) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_KILL_THREAD(LVarA) - EVT_KILL_THREAD(LVarB) - EVT_RETURN - EVT_END + Set(LVar0, 4) + ExecGetTID(N(EVS_TexPan_ShyGuyFloat_Sides), LVarA) + ExecGetTID(N(EVS_TexPan_ShyGuyFloat_Top), LVarB) + Wait(10) + Call(NpcMoveTo, NPC_ShyGuyMarshall, -1648, 0, 50) + Call(SetNpcAnimation, NPC_ShyGuyMarshall, ANIM_ParadeShyGuy_MarshallStill) + Call(InterpNpcYaw, NPC_ShyGuyMarshall, 90, 0) + Wait(10) + Call(SetNpcAnimation, NPC_ShyGuyMarshall, ANIM_ParadeShyGuy_MarshallBeckon) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_SHYGUY_DANCE + 260) + BreakLoop + EndIf + EndLoop + Thread + Call(SetNpcAnimation, NPC_ShyGuyMarshall, ANIM_ParadeShyGuy_MarshallWalk) + Call(NpcMoveTo, NPC_ShyGuyMarshall, -1748, 0, 50) + EndThread + Exec(N(EVS_ShyGuyFloat_Performers)) + KillThread(LVarA) + Set(LVar0, 2) + ExecGetTID(N(EVS_TexPan_ShyGuyFloat_Sides), LVarA) + ExecWait(N(EVS_ShyGuyFloat_Open)) + KillThread(LVarA) + Set(LVar0, 4) + ExecGetTID(N(EVS_TexPan_ShyGuyFloat_Sides), LVarA) + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_SHYGUY_DANCE + 600) + BreakLoop + EndIf + EndLoop + KillThread(LVarA) + KillThread(LVarB) + Return + End }; EvtScript N(EVS_ShyGuy_PauseFormation) = { - EVT_CALL(GetNpcPos, NPC_ShyGuyFormation11, LVar0, LVar1, LVar2) - EVT_SETF(LVar0, LVar0) - EVT_SETF(LVar1, LVar0) - EVT_ADDF(LVar1, 30) - EVT_SETF(LVar2, LVar0) - EVT_ADDF(LVar2, 60) - EVT_SETF(LVar3, LVar0) - EVT_ADDF(LVar3, 90) - EVT_CALL(SetNpcPos, NPC_ShyGuyFormation11, LVar0, 0, -30) - EVT_CALL(SetNpcPos, NPC_ShyGuyFormation12, LVar0, 0, 0) - EVT_CALL(SetNpcPos, NPC_ShyGuyFormation13, LVar0, 0, 30) - EVT_CALL(SetNpcPos, NPC_ShyGuyFormation21, LVar1, 0, -30) - EVT_CALL(SetNpcPos, NPC_ShyGuyFormation22, LVar1, 0, 0) - EVT_CALL(SetNpcPos, NPC_ShyGuyFormation23, LVar1, 0, 30) - EVT_CALL(SetNpcPos, NPC_ShyGuyFormation31, LVar2, 0, -30) - EVT_CALL(SetNpcPos, NPC_ShyGuyFormation32, LVar2, 0, 0) - EVT_CALL(SetNpcPos, NPC_ShyGuyFormation33, LVar2, 0, 30) - EVT_CALL(SetNpcPos, NPC_ShyGuyFormation41, LVar3, 0, -30) - EVT_CALL(SetNpcPos, NPC_ShyGuyFormation42, LVar3, 0, 0) - EVT_CALL(SetNpcPos, NPC_ShyGuyFormation43, LVar3, 0, 30) - EVT_CHILD_THREAD - EVT_CALL(N(AddScrollToNpcPos), NPC_ShyGuyFormation12) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(N(AddScrollToNpcPos), NPC_ShyGuyFormation13) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(N(AddScrollToNpcPos), NPC_ShyGuyFormation21) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(N(AddScrollToNpcPos), NPC_ShyGuyFormation22) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(N(AddScrollToNpcPos), NPC_ShyGuyFormation23) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(N(AddScrollToNpcPos), NPC_ShyGuyFormation31) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(N(AddScrollToNpcPos), NPC_ShyGuyFormation32) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(N(AddScrollToNpcPos), NPC_ShyGuyFormation33) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(N(AddScrollToNpcPos), NPC_ShyGuyFormation41) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(N(AddScrollToNpcPos), NPC_ShyGuyFormation42) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(N(AddScrollToNpcPos), NPC_ShyGuyFormation43) - EVT_END_CHILD_THREAD - EVT_CALL(N(AddScrollToNpcPos), NPC_ShyGuyFormation11) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_ShyGuyFormation11, LVar0, LVar1, LVar2) + SetF(LVar0, LVar0) + SetF(LVar1, LVar0) + AddF(LVar1, 30) + SetF(LVar2, LVar0) + AddF(LVar2, 60) + SetF(LVar3, LVar0) + AddF(LVar3, 90) + Call(SetNpcPos, NPC_ShyGuyFormation11, LVar0, 0, -30) + Call(SetNpcPos, NPC_ShyGuyFormation12, LVar0, 0, 0) + Call(SetNpcPos, NPC_ShyGuyFormation13, LVar0, 0, 30) + Call(SetNpcPos, NPC_ShyGuyFormation21, LVar1, 0, -30) + Call(SetNpcPos, NPC_ShyGuyFormation22, LVar1, 0, 0) + Call(SetNpcPos, NPC_ShyGuyFormation23, LVar1, 0, 30) + Call(SetNpcPos, NPC_ShyGuyFormation31, LVar2, 0, -30) + Call(SetNpcPos, NPC_ShyGuyFormation32, LVar2, 0, 0) + Call(SetNpcPos, NPC_ShyGuyFormation33, LVar2, 0, 30) + Call(SetNpcPos, NPC_ShyGuyFormation41, LVar3, 0, -30) + Call(SetNpcPos, NPC_ShyGuyFormation42, LVar3, 0, 0) + Call(SetNpcPos, NPC_ShyGuyFormation43, LVar3, 0, 30) + ChildThread + Call(N(AddScrollToNpcPos), NPC_ShyGuyFormation12) + EndChildThread + ChildThread + Call(N(AddScrollToNpcPos), NPC_ShyGuyFormation13) + EndChildThread + ChildThread + Call(N(AddScrollToNpcPos), NPC_ShyGuyFormation21) + EndChildThread + ChildThread + Call(N(AddScrollToNpcPos), NPC_ShyGuyFormation22) + EndChildThread + ChildThread + Call(N(AddScrollToNpcPos), NPC_ShyGuyFormation23) + EndChildThread + ChildThread + Call(N(AddScrollToNpcPos), NPC_ShyGuyFormation31) + EndChildThread + ChildThread + Call(N(AddScrollToNpcPos), NPC_ShyGuyFormation32) + EndChildThread + ChildThread + Call(N(AddScrollToNpcPos), NPC_ShyGuyFormation33) + EndChildThread + ChildThread + Call(N(AddScrollToNpcPos), NPC_ShyGuyFormation41) + EndChildThread + ChildThread + Call(N(AddScrollToNpcPos), NPC_ShyGuyFormation42) + EndChildThread + ChildThread + Call(N(AddScrollToNpcPos), NPC_ShyGuyFormation43) + EndChildThread + Call(N(AddScrollToNpcPos), NPC_ShyGuyFormation11) + Return + End }; EvtScript N(EVS_ShyGuy_MarchInFormation) = { - EVT_CALL(GetNpcPos, LVar0, LVar2, LVar3, LVar4) - EVT_ADD(LVar2, -180) - EVT_CALL(NpcMoveTo, LVar0, LVar2, LVar4, 90) - EVT_SET(LVar2, LVar0) - EVT_SET(LVar3, 28) - EVT_SUB(LVar3, LVar1) - EVT_ADD(LVar1, 10) - EVT_CALL(SetNpcAnimation, LVar2, ANIM_ParadeShyGuy_ShadeStill) - EVT_WAIT(LVar1) - EVT_CALL(SetNpcAnimation, LVar2, ANIM_ParadeShyGuy_ShadePointUp) - EVT_CALL(MakeLerp, 0, 360, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, LVar2, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(LVar3) - EVT_CALL(SetNpcAnimation, LVar2, ANIM_ParadeShyGuy_ShadeWalk) - EVT_CALL(GetNpcPos, LVar2, LVar3, LVar4, LVar5) - EVT_ADD(LVar3, -180) - EVT_CALL(NpcMoveTo, LVar2, LVar3, LVar5, 90) - EVT_RETURN - EVT_END + Call(GetNpcPos, LVar0, LVar2, LVar3, LVar4) + Add(LVar2, -180) + Call(NpcMoveTo, LVar0, LVar2, LVar4, 90) + Set(LVar2, LVar0) + Set(LVar3, 28) + Sub(LVar3, LVar1) + Add(LVar1, 10) + Call(SetNpcAnimation, LVar2, ANIM_ParadeShyGuy_ShadeStill) + Wait(LVar1) + Call(SetNpcAnimation, LVar2, ANIM_ParadeShyGuy_ShadePointUp) + Call(MakeLerp, 0, 360, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, LVar2, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(LVar3) + Call(SetNpcAnimation, LVar2, ANIM_ParadeShyGuy_ShadeWalk) + Call(GetNpcPos, LVar2, LVar3, LVar4, LVar5) + Add(LVar3, -180) + Call(NpcMoveTo, LVar2, LVar3, LVar5, 90) + Return + End }; EvtScript N(EVS_ParadePhase_ShyGuyFormation) = { - EVT_SET(LVar1, 0) - EVT_SET(LVar0, NPC_ShyGuyFormation11) - EVT_EXEC(N(EVS_ShyGuy_MarchInFormation)) - EVT_SET(LVar0, NPC_ShyGuyFormation12) - EVT_EXEC(N(EVS_ShyGuy_MarchInFormation)) - EVT_SET(LVar0, NPC_ShyGuyFormation13) - EVT_EXEC(N(EVS_ShyGuy_MarchInFormation)) - EVT_SET(LVar1, 8) - EVT_SET(LVar0, NPC_ShyGuyFormation21) - EVT_EXEC(N(EVS_ShyGuy_MarchInFormation)) - EVT_SET(LVar0, NPC_ShyGuyFormation22) - EVT_EXEC(N(EVS_ShyGuy_MarchInFormation)) - EVT_SET(LVar0, NPC_ShyGuyFormation23) - EVT_EXEC(N(EVS_ShyGuy_MarchInFormation)) - EVT_SET(LVar1, 10) - EVT_SET(LVar0, NPC_ShyGuyFormation31) - EVT_EXEC(N(EVS_ShyGuy_MarchInFormation)) - EVT_SET(LVar0, NPC_ShyGuyFormation32) - EVT_EXEC(N(EVS_ShyGuy_MarchInFormation)) - EVT_SET(LVar0, NPC_ShyGuyFormation33) - EVT_EXEC(N(EVS_ShyGuy_MarchInFormation)) - EVT_SET(LVar1, 18) - EVT_SET(LVar0, NPC_ShyGuyFormation41) - EVT_EXEC(N(EVS_ShyGuy_MarchInFormation)) - EVT_SET(LVar0, NPC_ShyGuyFormation42) - EVT_EXEC(N(EVS_ShyGuy_MarchInFormation)) - EVT_SET(LVar0, NPC_ShyGuyFormation43) - EVT_EXEC(N(EVS_ShyGuy_MarchInFormation)) + Set(LVar1, 0) + Set(LVar0, NPC_ShyGuyFormation11) + Exec(N(EVS_ShyGuy_MarchInFormation)) + Set(LVar0, NPC_ShyGuyFormation12) + Exec(N(EVS_ShyGuy_MarchInFormation)) + Set(LVar0, NPC_ShyGuyFormation13) + Exec(N(EVS_ShyGuy_MarchInFormation)) + Set(LVar1, 8) + Set(LVar0, NPC_ShyGuyFormation21) + Exec(N(EVS_ShyGuy_MarchInFormation)) + Set(LVar0, NPC_ShyGuyFormation22) + Exec(N(EVS_ShyGuy_MarchInFormation)) + Set(LVar0, NPC_ShyGuyFormation23) + Exec(N(EVS_ShyGuy_MarchInFormation)) + Set(LVar1, 10) + Set(LVar0, NPC_ShyGuyFormation31) + Exec(N(EVS_ShyGuy_MarchInFormation)) + Set(LVar0, NPC_ShyGuyFormation32) + Exec(N(EVS_ShyGuy_MarchInFormation)) + Set(LVar0, NPC_ShyGuyFormation33) + Exec(N(EVS_ShyGuy_MarchInFormation)) + Set(LVar1, 18) + Set(LVar0, NPC_ShyGuyFormation41) + Exec(N(EVS_ShyGuy_MarchInFormation)) + Set(LVar0, NPC_ShyGuyFormation42) + Exec(N(EVS_ShyGuy_MarchInFormation)) + Set(LVar0, NPC_ShyGuyFormation43) + Exec(N(EVS_ShyGuy_MarchInFormation)) // at a certain point, cause the formation to stop moving - EVT_WAIT(90) - EVT_EXEC_GET_TID(N(EVS_ShyGuy_PauseFormation), LVarA) - EVT_WAIT(48) - EVT_KILL_THREAD(LVarA) - EVT_WAIT(130) + Wait(90) + ExecGetTID(N(EVS_ShyGuy_PauseFormation), LVarA) + Wait(48) + KillThread(LVarA) + Wait(130) // formation resumes moving - EVT_CALL(GetNpcPos, NPC_Pratfaller, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -180) - EVT_CALL(NpcMoveTo, NPC_Pratfaller, LVar0, LVar2, 45) - EVT_CALL(SetNpcRotationPivot, NPC_Pratfaller, 10) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 9) - EVT_CALL(SetNpcRotation, NPC_Pratfaller, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcRotation, NPC_Pratfaller, 0, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_Pratfaller, ANIM_ShyGuy_Red_Anim10) - EVT_END_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Pratfaller, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_Pratfaller, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -45) - EVT_CALL(NpcJump0, NPC_Pratfaller, LVar0, LVar1, LVar2, 10) - EVT_SET(LVar0, NPC_Pratfaller) - EVT_EXEC_GET_TID(N(EVS_OffsetNpcScroll), LVarA) - EVT_WAIT(80) - EVT_CALL(SetNpcRotationPivot, NPC_Pratfaller, 0) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetNpcAnimation, NPC_Pratfaller, ANIM_ShyGuy_Red_Anim01) - EVT_CALL(GetNpcPos, NPC_Pratfaller, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -5) - EVT_CALL(NpcJump0, NPC_Pratfaller, LVar0, LVar1, LVar2, 10) - EVT_CALL(SetNpcAnimation, NPC_Pratfaller, ANIM_ShyGuy_Red_Anim04) - EVT_CALL(GetNpcPos, NPC_Pratfaller, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -180) - EVT_CALL(NpcMoveTo, NPC_Pratfaller, LVar0, LVar2, 90) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_Pratfaller, LVar0, LVar1, LVar2) + Add(LVar0, -180) + Call(NpcMoveTo, NPC_Pratfaller, LVar0, LVar2, 45) + Call(SetNpcRotationPivot, NPC_Pratfaller, 10) + Thread + Set(LVar0, 0) + Loop(10) + Add(LVar0, 9) + Call(SetNpcRotation, NPC_Pratfaller, 0, 0, LVar0) + Wait(1) + EndLoop + Call(SetNpcRotation, NPC_Pratfaller, 0, 0, 0) + Call(SetNpcAnimation, NPC_Pratfaller, ANIM_ShyGuy_Red_Anim10) + EndThread + Call(SetNpcJumpscale, NPC_Pratfaller, Float(1.0)) + Call(GetNpcPos, NPC_Pratfaller, LVar0, LVar1, LVar2) + Add(LVar0, -45) + Call(NpcJump0, NPC_Pratfaller, LVar0, LVar1, LVar2, 10) + Set(LVar0, NPC_Pratfaller) + ExecGetTID(N(EVS_OffsetNpcScroll), LVarA) + Wait(80) + Call(SetNpcRotationPivot, NPC_Pratfaller, 0) + KillThread(LVarA) + Call(SetNpcAnimation, NPC_Pratfaller, ANIM_ShyGuy_Red_Anim01) + Call(GetNpcPos, NPC_Pratfaller, LVar0, LVar1, LVar2) + Add(LVar0, -5) + Call(NpcJump0, NPC_Pratfaller, LVar0, LVar1, LVar2, 10) + Call(SetNpcAnimation, NPC_Pratfaller, ANIM_ShyGuy_Red_Anim04) + Call(GetNpcPos, NPC_Pratfaller, LVar0, LVar1, LVar2) + Add(LVar0, -180) + Call(NpcMoveTo, NPC_Pratfaller, LVar0, LVar2, 90) + Return + End }; diff --git a/src/world/area_end/end_01/end_01_7_peach_float.c b/src/world/area_end/end_01/end_01_7_peach_float.c index d077727f98c..2967b180f06 100644 --- a/src/world/area_end/end_01/end_01_7_peach_float.c +++ b/src/world/area_end/end_01/end_01_7_peach_float.c @@ -1,84 +1,84 @@ #include "end_01.h" EvtScript N(EVS_ParadePhase_Toads1) = { - EVT_WAIT(10) - EVT_CALL(SetNpcPaletteSwapMode, NPC_HornPlayer1, NPC_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) - EVT_CALL(SetNpcPaletteSwapMode, NPC_HornPlayer2, NPC_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) - EVT_CALL(SetNpcPaletteSwapMode, NPC_Drummer1, NPC_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) - EVT_CALL(SetNpcPaletteSwapMode, NPC_Drummer2, NPC_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) - EVT_CALL(SetNpcPaletteSwapMode, NPC_StandardBearer1, NPC_PAL_ADJUST_BLEND_DOUBLE_PALETTES) - EVT_CALL(SetNpcPaletteSwapMode, NPC_StandardBearer2, NPC_PAL_ADJUST_BLEND_DOUBLE_PALETTES) - EVT_CALL(SetNpcPaletteSwapping, NPC_HornPlayer1, 1, 2, 10, 5, 10, 5, 0, 0) - EVT_CALL(SetNpcPaletteSwapping, NPC_HornPlayer2, 1, 2, 10, 5, 10, 5, 0, 0) - EVT_CALL(SetNpcPaletteSwapping, NPC_Drummer1, 1, 2, 10, 5, 10, 5, 0, 0) - EVT_CALL(SetNpcPaletteSwapping, NPC_Drummer2, 1, 2, 10, 5, 10, 5, 0, 0) - EVT_CALL(SetNpcPaletteSwapping, NPC_StandardBearer1, 1, 2, 10, 5, 10, 5, 4, 5) - EVT_CALL(SetNpcPaletteSwapping, NPC_StandardBearer2, 1, 2, 10, 5, 10, 5, 4, 5) - EVT_RETURN - EVT_END + Wait(10) + Call(SetNpcPaletteSwapMode, NPC_HornPlayer1, NPC_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) + Call(SetNpcPaletteSwapMode, NPC_HornPlayer2, NPC_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) + Call(SetNpcPaletteSwapMode, NPC_Drummer1, NPC_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) + Call(SetNpcPaletteSwapMode, NPC_Drummer2, NPC_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) + Call(SetNpcPaletteSwapMode, NPC_StandardBearer1, NPC_PAL_ADJUST_BLEND_DOUBLE_PALETTES) + Call(SetNpcPaletteSwapMode, NPC_StandardBearer2, NPC_PAL_ADJUST_BLEND_DOUBLE_PALETTES) + Call(SetNpcPaletteSwapping, NPC_HornPlayer1, 1, 2, 10, 5, 10, 5, 0, 0) + Call(SetNpcPaletteSwapping, NPC_HornPlayer2, 1, 2, 10, 5, 10, 5, 0, 0) + Call(SetNpcPaletteSwapping, NPC_Drummer1, 1, 2, 10, 5, 10, 5, 0, 0) + Call(SetNpcPaletteSwapping, NPC_Drummer2, 1, 2, 10, 5, 10, 5, 0, 0) + Call(SetNpcPaletteSwapping, NPC_StandardBearer1, 1, 2, 10, 5, 10, 5, 4, 5) + Call(SetNpcPaletteSwapping, NPC_StandardBearer2, 1, 2, 10, 5, 10, 5, 4, 5) + Return + End }; EvtScript N(EVS_TexPan_FinalFloat_MushroomTop) = { - EVT_CALL(EnableTexPanning, MODEL_mp1, TRUE) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 0x400) - EVT_CALL(SetTexPanOffset, TEX_PANNER_7, TEX_PANNER_MAIN, LVar0, 0) - EVT_ADD(LVar1, 0x4400) - EVT_CALL(SetTexPanOffset, TEX_PANNER_7, TEX_PANNER_AUX, LVar0, 0) - EVT_WAIT(12) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(EnableTexPanning, MODEL_mp1, TRUE) + Set(LVar0, 0) + Set(LVar1, 0) + Loop(0) + Add(LVar0, 0x400) + Call(SetTexPanOffset, TEX_PANNER_7, TEX_PANNER_MAIN, LVar0, 0) + Add(LVar1, 0x4400) + Call(SetTexPanOffset, TEX_PANNER_7, TEX_PANNER_AUX, LVar0, 0) + Wait(12) + EndLoop + Return + End }; EvtScript N(EVS_TexPan_FinalFloat_MushroomRim) = { - EVT_CALL(EnableTexPanning, MODEL_mp2, TRUE) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 0x2000) - EVT_CALL(SetTexPanOffset, TEX_PANNER_E, TEX_PANNER_MAIN, LVar0, 0) - EVT_WAIT(8) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(EnableTexPanning, MODEL_mp2, TRUE) + Set(LVar0, 0) + Loop(0) + Add(LVar0, 0x2000) + Call(SetTexPanOffset, TEX_PANNER_E, TEX_PANNER_MAIN, LVar0, 0) + Wait(8) + EndLoop + Return + End }; EvtScript N(EVS_TexPan_FinalFloat_Front) = { - EVT_CALL(EnableTexPanning, MODEL_mp3, TRUE) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 0x1000) - EVT_CALL(SetTexPanOffset, TEX_PANNER_6, TEX_PANNER_AUX, LVar0, 0) - EVT_WAIT(6) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(EnableTexPanning, MODEL_mp3, TRUE) + Set(LVar0, 0) + Loop(0) + Add(LVar0, 0x1000) + Call(SetTexPanOffset, TEX_PANNER_6, TEX_PANNER_AUX, LVar0, 0) + Wait(6) + EndLoop + Return + End }; EvtScript N(EVS_TexPan_FinalFloat_Star) = { - EVT_CALL(EnableTexPanning, MODEL_mp4, TRUE) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 0x1000) - EVT_CALL(SetTexPanOffset, TEX_PANNER_5, TEX_PANNER_MAIN, 0, LVar0) - EVT_WAIT(5) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(EnableTexPanning, MODEL_mp4, TRUE) + Set(LVar0, 0) + Loop(0) + Add(LVar0, 0x1000) + Call(SetTexPanOffset, TEX_PANNER_5, TEX_PANNER_MAIN, 0, LVar0) + Wait(5) + EndLoop + Return + End }; EvtScript N(EVS_TexPan_FinalFloat_Sides) = { - EVT_CALL(EnableTexPanning, MODEL_mp6, TRUE) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 0x3000) - EVT_CALL(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, LVar0, 0) - EVT_WAIT(8) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(EnableTexPanning, MODEL_mp6, TRUE) + Set(LVar0, 0) + Loop(0) + Add(LVar0, 0x3000) + Call(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, LVar0, 0) + Wait(8) + EndLoop + Return + End }; Vec3f N(TwinkFlightPath)[] = { @@ -99,225 +99,225 @@ Vec3f N(TwinkFlightPath)[] = { }; EvtScript N(EVS_Twink) = { - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, PARADE_PHASE_EXIT) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(30 * DT) - EVT_CALL(LoadPath, 60 * DT, EVT_PTR(N(TwinkFlightPath)), ARRAY_COUNT(N(TwinkFlightPath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Twink, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(10 * DT) - EVT_CALL(InterpNpcYaw, NPC_Twink, 270, 0) - EVT_WAIT(70 * DT) - EVT_CALL(NpcFlyTo, NPC_Twink, -249, 120, 0, 10 * DT, -10, EASING_LINEAR) - EVT_CALL(SetNpcPos, NPC_Twink, 0, -500, 0) - EVT_RETURN - EVT_END + Loop(0) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfGt(LVar0, PARADE_PHASE_EXIT) + BreakLoop + EndIf + EndLoop + Wait(30 * DT) + Call(LoadPath, 60 * DT, Ref(N(TwinkFlightPath)), ARRAY_COUNT(N(TwinkFlightPath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Twink, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Wait(10 * DT) + Call(InterpNpcYaw, NPC_Twink, 270, 0) + Wait(70 * DT) + Call(NpcFlyTo, NPC_Twink, -249, 120, 0, 10 * DT, -10, EASING_LINEAR) + Call(SetNpcPos, NPC_Twink, 0, -500, 0) + Return + End }; EvtScript N(EVS_Mario) = { - EVT_LOOP(5) - EVT_CALL(InterpNpcYaw, NPC_Mario, 90, 7 * DT) - EVT_WAIT(45 * DT) - EVT_CALL(InterpNpcYaw, NPC_Mario, 270, 7 * DT) - EVT_WAIT(45 * DT) - EVT_END_LOOP - EVT_WAIT(40 * DT) - EVT_CALL(SetNpcAnimation, NPC_Mario, ANIM_ParadeMario_Surprise) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Mario, ANIM_ParadeMario_LookUp) - EVT_WAIT(30 * DT) - EVT_CALL(InterpNpcYaw, NPC_Mario, 90, 0) - EVT_WAIT(70 * DT) - EVT_CALL(SetNpcAnimation, NPC_Mario, ANIM_ParadeMario_WaveUp) - EVT_WAIT(60 * DT) - EVT_CALL(SetNpcAnimation, NPC_Mario, ANIM_ParadeMario_LookUp) - EVT_WAIT(60 * DT) - EVT_CALL(SetNpcAnimation, NPC_Mario, ANIM_ParadeMario_Idle) - EVT_WAIT(40 * DT) - EVT_CALL(SetNpcAnimation, NPC_Mario, ANIM_ParadeMario_NodYes) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Mario, ANIM_ParadeMario_Idle) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Mario, ANIM_ParadeMario_WalkBack) - EVT_CALL(GetNpcPos, NPC_Mario, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_ADD(LVar2, -30) - EVT_CALL(NpcMoveTo, NPC_Mario, LVar0, LVar2, 20) - EVT_LOOP(7) - EVT_ADD(LVar1, -5) - EVT_CALL(SetNpcPos, NPC_Mario, LVar0, LVar1, LVar2) - EVT_WAIT(5 * DT) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_Mario, LVar0, 0, LVar2) - EVT_RETURN - EVT_END + Loop(5) + Call(InterpNpcYaw, NPC_Mario, 90, 7 * DT) + Wait(45 * DT) + Call(InterpNpcYaw, NPC_Mario, 270, 7 * DT) + Wait(45 * DT) + EndLoop + Wait(40 * DT) + Call(SetNpcAnimation, NPC_Mario, ANIM_ParadeMario_Surprise) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Mario, ANIM_ParadeMario_LookUp) + Wait(30 * DT) + Call(InterpNpcYaw, NPC_Mario, 90, 0) + Wait(70 * DT) + Call(SetNpcAnimation, NPC_Mario, ANIM_ParadeMario_WaveUp) + Wait(60 * DT) + Call(SetNpcAnimation, NPC_Mario, ANIM_ParadeMario_LookUp) + Wait(60 * DT) + Call(SetNpcAnimation, NPC_Mario, ANIM_ParadeMario_Idle) + Wait(40 * DT) + Call(SetNpcAnimation, NPC_Mario, ANIM_ParadeMario_NodYes) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Mario, ANIM_ParadeMario_Idle) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Mario, ANIM_ParadeMario_WalkBack) + Call(GetNpcPos, NPC_Mario, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Add(LVar2, -30) + Call(NpcMoveTo, NPC_Mario, LVar0, LVar2, 20) + Loop(7) + Add(LVar1, -5) + Call(SetNpcPos, NPC_Mario, LVar0, LVar1, LVar2) + Wait(5 * DT) + EndLoop + Call(SetNpcPos, NPC_Mario, LVar0, 0, LVar2) + Return + End }; EvtScript N(EVS_Peach) = { - EVT_LOOP(5) - EVT_CALL(InterpNpcYaw, NPC_Peach, 90, 7 * DT) - EVT_WAIT(45 * DT) - EVT_CALL(InterpNpcYaw, NPC_Peach, 270, 7 * DT) - EVT_WAIT(45 * DT) - EVT_END_LOOP - EVT_WAIT(40 * DT) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_ParadePeach_ShadeRaiseArms) - EVT_WAIT(60 * DT) - EVT_CALL(InterpNpcYaw, NPC_Peach, 90, 0) - EVT_WAIT(40 * DT) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_ParadePeach_ShadeWaveFast) - EVT_WAIT(60 * DT) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_ParadePeach_ShadeIdle) - EVT_WAIT(60 * DT) - EVT_CALL(InterpNpcYaw, NPC_Peach, 270, 0) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_ParadePeach_ShadeRaiseArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_ParadePeach_ShadeTalk) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_ParadePeach_ShadeLowerArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_ParadePeach_ShadeIdle) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_ParadePeach_ShadeSlightBow) - EVT_WAIT(40 * DT) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_ParadePeach_ShadeWalkBack) - EVT_CALL(GetNpcPos, NPC_Peach, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -5) - EVT_ADD(LVar2, -30) - EVT_CALL(NpcMoveTo, NPC_Peach, LVar0, LVar2, 20) - EVT_LOOP(7) - EVT_ADD(LVar1, -5) - EVT_CALL(SetNpcPos, NPC_Peach, LVar0, LVar1, LVar2) - EVT_WAIT(5 * DT) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_Peach, LVar0, 0, LVar2) - EVT_RETURN - EVT_END + Loop(5) + Call(InterpNpcYaw, NPC_Peach, 90, 7 * DT) + Wait(45 * DT) + Call(InterpNpcYaw, NPC_Peach, 270, 7 * DT) + Wait(45 * DT) + EndLoop + Wait(40 * DT) + Call(SetNpcAnimation, NPC_Peach, ANIM_ParadePeach_ShadeRaiseArms) + Wait(60 * DT) + Call(InterpNpcYaw, NPC_Peach, 90, 0) + Wait(40 * DT) + Call(SetNpcAnimation, NPC_Peach, ANIM_ParadePeach_ShadeWaveFast) + Wait(60 * DT) + Call(SetNpcAnimation, NPC_Peach, ANIM_ParadePeach_ShadeIdle) + Wait(60 * DT) + Call(InterpNpcYaw, NPC_Peach, 270, 0) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Peach, ANIM_ParadePeach_ShadeRaiseArms) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Peach, ANIM_ParadePeach_ShadeTalk) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_Peach, ANIM_ParadePeach_ShadeLowerArms) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Peach, ANIM_ParadePeach_ShadeIdle) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_Peach, ANIM_ParadePeach_ShadeSlightBow) + Wait(40 * DT) + Call(SetNpcAnimation, NPC_Peach, ANIM_ParadePeach_ShadeWalkBack) + Call(GetNpcPos, NPC_Peach, LVar0, LVar1, LVar2) + Add(LVar0, -5) + Add(LVar2, -30) + Call(NpcMoveTo, NPC_Peach, LVar0, LVar2, 20) + Loop(7) + Add(LVar1, -5) + Call(SetNpcPos, NPC_Peach, LVar0, LVar1, LVar2) + Wait(5 * DT) + EndLoop + Call(SetNpcPos, NPC_Peach, LVar0, 0, LVar2) + Return + End }; EvtScript N(EVS_ParadePhase_MarioPeach) = { - EVT_EXEC(N(EVS_TexPan_FinalFloat_MushroomTop)) - EVT_EXEC(N(EVS_TexPan_FinalFloat_MushroomRim)) - EVT_EXEC(N(EVS_TexPan_FinalFloat_Front)) - EVT_EXEC(N(EVS_TexPan_FinalFloat_Star)) - EVT_EXEC(N(EVS_TexPan_FinalFloat_Sides)) - EVT_EXEC(N(EVS_Peach)) - EVT_EXEC(N(EVS_Twink)) - EVT_EXEC_WAIT(N(EVS_Mario)) - EVT_RETURN - EVT_END + Exec(N(EVS_TexPan_FinalFloat_MushroomTop)) + Exec(N(EVS_TexPan_FinalFloat_MushroomRim)) + Exec(N(EVS_TexPan_FinalFloat_Front)) + Exec(N(EVS_TexPan_FinalFloat_Star)) + Exec(N(EVS_TexPan_FinalFloat_Sides)) + Exec(N(EVS_Peach)) + Exec(N(EVS_Twink)) + ExecWait(N(EVS_Mario)) + Return + End }; EvtScript N(EVS_Twirler) = { - EVT_CHILD_THREAD - EVT_CALL(EnableNpcShadow, LVar1, FALSE) - EVT_CALL(SetNpcJumpscale, LVar1, EVT_FLOAT(0.5)) - EVT_LOOP(0) - EVT_WAIT(30) - EVT_CALL(GetNpcPos, LVar0, LVar2, LVar3, LVar4) - EVT_ADD(LVar2, -7) - EVT_CALL(SetNpcPos, LVar1, LVar2, LVar3, LVar4) - EVT_ADD(LVar2, -25) - EVT_CALL(NpcJump0, LVar1, LVar2, LVar3, LVar4, 40) - EVT_CALL(SetNpcPos, LVar1, 0, -500, 0) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_LOOP(0) - EVT_CALL(SetNpcAnimation, LVar0, ANIM_ParadeTwirler_Walk) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, LVar0, ANIM_ParadeTwirler_Toss) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, LVar0, ANIM_ParadeTwirler_Catch) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, LVar0, ANIM_ParadeTwirler_Spin) - EVT_WAIT(21) - EVT_CALL(SetNpcAnimation, LVar0, ANIM_ParadeTwirler_Toss) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, LVar0, ANIM_ParadeTwirler_Catch) - EVT_WAIT(5) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(SetNpcSpeed, LVar0, EVT_FLOAT(PARADE_SCROLL_RATE / DT)) - EVT_CALL(GetNpcPos, LVar0, LVar2, LVar3, LVar4) - EVT_ADD(LVar2, -600) - EVT_CALL(NpcMoveTo, LVar0, LVar2, LVar4, 0) - EVT_RETURN - EVT_END + ChildThread + Call(EnableNpcShadow, LVar1, FALSE) + Call(SetNpcJumpscale, LVar1, Float(0.5)) + Loop(0) + Wait(30) + Call(GetNpcPos, LVar0, LVar2, LVar3, LVar4) + Add(LVar2, -7) + Call(SetNpcPos, LVar1, LVar2, LVar3, LVar4) + Add(LVar2, -25) + Call(NpcJump0, LVar1, LVar2, LVar3, LVar4, 40) + Call(SetNpcPos, LVar1, 0, -500, 0) + EndLoop + EndChildThread + ChildThread + Loop(0) + Call(SetNpcAnimation, LVar0, ANIM_ParadeTwirler_Walk) + Wait(30) + Call(SetNpcAnimation, LVar0, ANIM_ParadeTwirler_Toss) + Wait(5) + Call(SetNpcAnimation, LVar0, ANIM_ParadeTwirler_Catch) + Wait(5) + Call(SetNpcAnimation, LVar0, ANIM_ParadeTwirler_Spin) + Wait(21) + Call(SetNpcAnimation, LVar0, ANIM_ParadeTwirler_Toss) + Wait(5) + Call(SetNpcAnimation, LVar0, ANIM_ParadeTwirler_Catch) + Wait(5) + EndLoop + EndChildThread + Call(SetNpcSpeed, LVar0, Float(PARADE_SCROLL_RATE / DT)) + Call(GetNpcPos, LVar0, LVar2, LVar3, LVar4) + Add(LVar2, -600) + Call(NpcMoveTo, LVar0, LVar2, LVar4, 0) + Return + End }; EvtScript N(EVS_StandardBearer) = { - EVT_CALL(SetNpcSpeed, LVar0, EVT_FLOAT(PARADE_SCROLL_RATE / DT)) - EVT_CALL(GetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, -600) - EVT_CALL(NpcMoveTo, LVar0, LVar1, LVar2, 0) - EVT_RETURN - EVT_END + Call(SetNpcSpeed, LVar0, Float(PARADE_SCROLL_RATE / DT)) + Call(GetNpcPos, LVar0, LVar1, LVar2, LVar3) + Add(LVar1, -600) + Call(NpcMoveTo, LVar0, LVar1, LVar2, 0) + Return + End }; EvtScript N(EVS_ParadePhase_Toads2) = { - EVT_CALL(SetNpcPaletteSwapMode, NPC_Twirler1, NPC_PAL_ADJUST_BLEND_DOUBLE_PALETTES) - EVT_CALL(SetNpcPaletteSwapMode, NPC_Twirler2, NPC_PAL_ADJUST_BLEND_DOUBLE_PALETTES) - EVT_CALL(SetNpcPaletteSwapMode, NPC_Twirler3, NPC_PAL_ADJUST_BLEND_DOUBLE_PALETTES) - EVT_CALL(SetNpcPaletteSwapMode, NPC_StandardBearer3, NPC_PAL_ADJUST_BLEND_DOUBLE_PALETTES) - EVT_CALL(SetNpcPaletteSwapMode, NPC_StandardBearer4, NPC_PAL_ADJUST_BLEND_DOUBLE_PALETTES) - EVT_CALL(SetNpcPaletteSwapping, NPC_Twirler1, 1, 2, 10, 5, 10, 5, 4, 5) - EVT_CALL(SetNpcPaletteSwapping, NPC_Twirler2, 1, 2, 10, 5, 10, 5, 4, 5) - EVT_CALL(SetNpcPaletteSwapping, NPC_Twirler3, 1, 2, 10, 5, 10, 5, 4, 5) - EVT_CALL(SetNpcPaletteSwapping, NPC_StandardBearer3, 1, 2, 10, 5, 10, 5, 4, 5) - EVT_CALL(SetNpcPaletteSwapping, NPC_StandardBearer4, 1, 2, 10, 5, 10, 5, 4, 5) - EVT_SET(LVar0, NPC_Twirler1) - EVT_SET(LVar1, NPC_Baton1) - EVT_EXEC(N(EVS_Twirler)) - EVT_SET(LVar0, NPC_Twirler2) - EVT_SET(LVar1, NPC_Baton2) - EVT_EXEC(N(EVS_Twirler)) - EVT_SET(LVar0, NPC_Twirler3) - EVT_SET(LVar1, NPC_Baton3) - EVT_EXEC(N(EVS_Twirler)) - EVT_SET(LVar0, NPC_StandardBearer3) - EVT_EXEC(N(EVS_StandardBearer)) - EVT_SET(LVar0, NPC_StandardBearer4) - EVT_EXEC(N(EVS_StandardBearer)) - EVT_SETF(LVar0, 0) - EVT_LOOP(500) - EVT_SUBF(LVar0, EVT_FLOAT(PARADE_SCROLL_RATE / DT)) - EVT_CALL(TranslateGroup, MODEL_kinoko, LVar0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetNpcPaletteSwapMode, NPC_Twirler1, NPC_PAL_ADJUST_BLEND_DOUBLE_PALETTES) + Call(SetNpcPaletteSwapMode, NPC_Twirler2, NPC_PAL_ADJUST_BLEND_DOUBLE_PALETTES) + Call(SetNpcPaletteSwapMode, NPC_Twirler3, NPC_PAL_ADJUST_BLEND_DOUBLE_PALETTES) + Call(SetNpcPaletteSwapMode, NPC_StandardBearer3, NPC_PAL_ADJUST_BLEND_DOUBLE_PALETTES) + Call(SetNpcPaletteSwapMode, NPC_StandardBearer4, NPC_PAL_ADJUST_BLEND_DOUBLE_PALETTES) + Call(SetNpcPaletteSwapping, NPC_Twirler1, 1, 2, 10, 5, 10, 5, 4, 5) + Call(SetNpcPaletteSwapping, NPC_Twirler2, 1, 2, 10, 5, 10, 5, 4, 5) + Call(SetNpcPaletteSwapping, NPC_Twirler3, 1, 2, 10, 5, 10, 5, 4, 5) + Call(SetNpcPaletteSwapping, NPC_StandardBearer3, 1, 2, 10, 5, 10, 5, 4, 5) + Call(SetNpcPaletteSwapping, NPC_StandardBearer4, 1, 2, 10, 5, 10, 5, 4, 5) + Set(LVar0, NPC_Twirler1) + Set(LVar1, NPC_Baton1) + Exec(N(EVS_Twirler)) + Set(LVar0, NPC_Twirler2) + Set(LVar1, NPC_Baton2) + Exec(N(EVS_Twirler)) + Set(LVar0, NPC_Twirler3) + Set(LVar1, NPC_Baton3) + Exec(N(EVS_Twirler)) + Set(LVar0, NPC_StandardBearer3) + Exec(N(EVS_StandardBearer)) + Set(LVar0, NPC_StandardBearer4) + Exec(N(EVS_StandardBearer)) + SetF(LVar0, 0) + Loop(500) + SubF(LVar0, Float(PARADE_SCROLL_RATE / DT)) + Call(TranslateGroup, MODEL_kinoko, LVar0, 0, 0) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_MarioPeachExit) = { // walk away into the distance - EVT_THREAD - EVT_CALL(NpcMoveTo, NPC_Mario, -259, -150, 240 * DT) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(NpcMoveTo, NPC_Peach, -229, -150, 240 * DT) - EVT_END_THREAD - EVT_WAIT(60 * DT) + Thread + Call(NpcMoveTo, NPC_Mario, -259, -150, 240 * DT) + EndThread + Thread + Call(NpcMoveTo, NPC_Peach, -229, -150, 240 * DT) + EndThread + Wait(60 * DT) // slowly pan camera up - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_SETF(LVar1, EVT_FLOAT(0.0)) - EVT_LOOP(0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_ADDF(LVar1, EVT_FLOAT(0.334)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + SetF(LVar1, Float(0.0)) + Loop(0) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + AddF(LVar1, Float(0.334)) + Wait(1) + EndLoop + Return + End }; diff --git a/src/world/area_flo/common/DroppingVine.inc.c b/src/world/area_flo/common/DroppingVine.inc.c index 6df24a194d4..7d132280c28 100644 --- a/src/world/area_flo/common/DroppingVine.inc.c +++ b/src/world/area_flo/common/DroppingVine.inc.c @@ -12,62 +12,62 @@ API_CALLABLE(N(CheckVineTriggerDist)) { } EvtScript N(EVS_DroppingVine) = { - EVT_SET(LVar9, LVar6) - EVT_SET(LVar8, LVar5) - EVT_SET(LVar7, LVar4) - EVT_SET(LVar6, LVar3) - EVT_SET(LVar5, LVar2) - EVT_SET(LVar4, LVar1) - EVT_SET(LVar3, LVar0) - EVT_CALL(EnableModel, LVar6, FALSE) - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(N(CheckVineTriggerDist)) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(EnableModel, LVar6, TRUE) - EVT_END_THREAD - EVT_IF_NE(LVarA, 0) - EVT_THREAD - EVT_WAIT(5) - EVT_SET(LVar0, LVar3) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_ADD(LVar1, 10) - EVT_ADD(LVar2, 8) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 15) - EVT_WAIT(15) - EVT_SUB(LVar1, 10) - EVT_CALL(MakeItemEntity, LVarA, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_FALL, 0) - EVT_END_THREAD - EVT_END_IF - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(PlaySoundAt, SOUND_FLIP_PAGE, SOUND_SPACE_DEFAULT, LVar3, LVar4, LVar5) - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, 180, 20, EASING_CUBIC_IN) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, LVar8, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, LVar9, LVar0, 1, 0, 0) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(EnableModel, LVar7, FALSE) - EVT_RETURN - EVT_END + Set(LVar9, LVar6) + Set(LVar8, LVar5) + Set(LVar7, LVar4) + Set(LVar6, LVar3) + Set(LVar5, LVar2) + Set(LVar4, LVar1) + Set(LVar3, LVar0) + Call(EnableModel, LVar6, FALSE) + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(N(CheckVineTriggerDist)) + IfEq(LVar0, 0) + Wait(1) + Goto(0) + EndIf + Thread + Wait(5) + Call(EnableModel, LVar6, TRUE) + EndThread + IfNe(LVarA, 0) + Thread + Wait(5) + Set(LVar0, LVar3) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Add(LVar1, 10) + Add(LVar2, 8) + PlayEffect(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 15) + Wait(15) + Sub(LVar1, 10) + Call(MakeItemEntity, LVarA, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_FALL, 0) + EndThread + EndIf + Thread + Wait(10) + Call(PlaySoundAt, SOUND_FLIP_PAGE, SOUND_SPACE_DEFAULT, LVar3, LVar4, LVar5) + EndThread + Call(MakeLerp, 0, 180, 20, EASING_CUBIC_IN) + Label(1) + Call(UpdateLerp) + Call(RotateModel, LVar8, LVar0, 1, 0, 0) + Call(RotateModel, LVar9, LVar0, 1, 0, 0) + IfEq(LVar1, 1) + Wait(1) + Goto(1) + EndIf + Call(EnableModel, LVar7, FALSE) + Return + End }; #define EVT_DROPPING_VINE(itemID, modelUpperAfter, modelLowerBefore, modelLowerAfter, modelUpperBefore) \ - EVT_CALL(GetModelCenter, modelUpperAfter) \ - EVT_SET(LVar3, modelUpperAfter) \ - EVT_SET(LVar4, modelLowerBefore) \ - EVT_SET(LVar5, modelLowerAfter) \ - EVT_SET(LVar6, modelUpperBefore) \ - EVT_SET(LVarA, itemID) \ - EVT_EXEC(N(EVS_DroppingVine)) + Call(GetModelCenter, modelUpperAfter) \ + Set(LVar3, modelUpperAfter) \ + Set(LVar4, modelLowerBefore) \ + Set(LVar5, modelLowerAfter) \ + Set(LVar6, modelUpperBefore) \ + Set(LVarA, itemID) \ + Exec(N(EVS_DroppingVine)) diff --git a/src/world/area_flo/common/FlowerSpawnRegion.inc.c b/src/world/area_flo/common/FlowerSpawnRegion.inc.c index 796a32afcd5..6cab4a68e6c 100644 --- a/src/world/area_flo/common/FlowerSpawnRegion.inc.c +++ b/src/world/area_flo/common/FlowerSpawnRegion.inc.c @@ -2,56 +2,56 @@ #include "effects.h" EvtScript N(EVS_FlowerSpawnRegion) = { - EVT_SET_GROUP(EVT_GROUP_0B) + SetGroup(EVT_GROUP_0B) // save input args - EVT_SET(LVarA, LVar0) // minX - EVT_SET(LVarB, LVar1) // minZ - EVT_SET(LVarC, LVar2) // maxX - EVT_SET(LVarD, LVar3) // maxZ - EVT_SET(LVarE, LVar4) // posY + Set(LVarA, LVar0) // minX + Set(LVarB, LVar1) // minZ + Set(LVarC, LVar2) // maxX + Set(LVarD, LVar3) // maxZ + Set(LVarE, LVar4) // posY // calculate spawn region size - EVT_SUB(LVarC, LVar0) // sizeX - EVT_SUB(LVarD, LVar1) // sizeZ + Sub(LVarC, LVar0) // sizeX + Sub(LVarD, LVar1) // sizeZ // spawnDelay = 11 + (100.0 / (sizeX / 100.0)) - EVT_SETF(LVar0, LVarC) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SETF(LVarF, EVT_FLOAT(100.0)) - EVT_DIVF(LVarF, LVar0) - EVT_ADD(LVarF, 11) + SetF(LVar0, LVarC) + DivF(LVar0, Float(100.0)) + SetF(LVarF, Float(100.0)) + DivF(LVarF, LVar0) + Add(LVarF, 11) // initial spawn count = 1 + (200 / spawnDelay) - EVT_SET(LVar5, 200) - EVT_DIV(LVar5, LVarF) - EVT_ADD(LVar5, 1) + Set(LVar5, 200) + Div(LVar5, LVarF) + Add(LVar5, 1) // spawn intial flowers - EVT_LOOP(LVar5) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_CALL(RandInt, 199, LVar2) - EVT_SET(LVar3, 210) - EVT_SUB(LVar3, LVar2) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_ADD(LVar2, LVarE) - EVT_PLAY_EFFECT(EFFECT_FLOATING_FLOWER, LVar0, LVar2, LVar1, LVar3, 0) - EVT_END_LOOP - EVT_WAIT(LVarF) + Loop(LVar5) + Call(RandInt, LVarC, LVar0) + Call(RandInt, LVarD, LVar1) + Call(RandInt, 199, LVar2) + Set(LVar3, 210) + Sub(LVar3, LVar2) + Add(LVar0, LVarA) + Add(LVar1, LVarB) + Add(LVar2, LVarE) + PlayEffect(EFFECT_FLOATING_FLOWER, LVar0, LVar2, LVar1, LVar3, 0) + EndLoop + Wait(LVarF) // spawn flowers over time - EVT_LABEL(0) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_PLAY_EFFECT(EFFECT_FLOATING_FLOWER, LVar0, LVarE, LVar1, 200, 0) - EVT_WAIT(LVarF) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(RandInt, LVarC, LVar0) + Call(RandInt, LVarD, LVar1) + Add(LVar0, LVarA) + Add(LVar1, LVarB) + PlayEffect(EFFECT_FLOATING_FLOWER, LVar0, LVarE, LVar1, 200, 0) + Wait(LVarF) + Goto(0) + Return + End }; #define EVT_FLOWER_SPAWN_REGION(minX, minZ, maxX, maxZ, posY) \ - EVT_SET(LVar0, minX) \ - EVT_SET(LVar1, minZ) \ - EVT_SET(LVar2, maxX) \ - EVT_SET(LVar3, maxZ) \ - EVT_SET(LVar4, posY) \ - EVT_EXEC(N(EVS_FlowerSpawnRegion)) + Set(LVar0, minX) \ + Set(LVar1, minZ) \ + Set(LVar2, maxX) \ + Set(LVar3, maxZ) \ + Set(LVar4, posY) \ + Exec(N(EVS_FlowerSpawnRegion)) diff --git a/src/world/area_flo/common/LogBridge.inc.c b/src/world/area_flo/common/LogBridge.inc.c index 49bdc8806ab..b7cc4f8a38f 100644 --- a/src/world/area_flo/common/LogBridge.inc.c +++ b/src/world/area_flo/common/LogBridge.inc.c @@ -6,60 +6,60 @@ API_CALLABLE(N(GetFloorBelowLog)) { } EvtScript N(EVS_LogBridge) = { - EVT_LOOP(0) - EVT_CALL(N(GetFloorBelowLog), LVar0) - EVT_IF_EQ(LVar0, LVar4) - EVT_CALL(GetPlayerActionState, LVar0) - EVT_IF_NE(LVar0, ACTION_STATE_HIT_LAVA) - EVT_IF_EQ(LVar8, 0) - EVT_THREAD - EVT_CALL(GetModelCenter, LVar5) - EVT_CALL(PlaySoundAt, SOUND_FLO_LOG_OPEN, SOUND_PARAM_QUIET | SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_END_THREAD - EVT_END_IF - EVT_IF_LT(LVar7, 90) - EVT_IF_EQ(LVar7, 0) - EVT_WAIT(5) - EVT_SET(LVar8, 6) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVar9, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_ADD(LVar8, 1) - EVT_ADD(LVar7, LVar8) - EVT_END_IF - EVT_GOTO(50) - EVT_END_IF - EVT_END_IF - EVT_IF_NE(LVar7, 0) - EVT_SUB(LVar8, 1) - EVT_ADD(LVar7, LVar8) - EVT_IF_LE(LVar7, 0) - EVT_SET(LVar8, 0) - EVT_SET(LVar7, 0) - EVT_THREAD - EVT_CALL(GetModelCenter, LVar5) - EVT_CALL(PlaySoundAt, SOUND_FLO_LOG_CLOSE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_END_THREAD - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, LVar9, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_END_IF - EVT_LABEL(50) - EVT_IF_GE(LVar7, 90) - EVT_SET(LVar8, -1) - EVT_SET(LVar7, 90) - EVT_END_IF - EVT_CALL(RotateModel, LVar5, LVar7, -1, 0, 0) - EVT_CALL(RotateModel, LVar6, LVar7, -1, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(N(GetFloorBelowLog), LVar0) + IfEq(LVar0, LVar4) + Call(GetPlayerActionState, LVar0) + IfNe(LVar0, ACTION_STATE_HIT_LAVA) + IfEq(LVar8, 0) + Thread + Call(GetModelCenter, LVar5) + Call(PlaySoundAt, SOUND_FLO_LOG_OPEN, SOUND_PARAM_QUIET | SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + EndThread + EndIf + IfLt(LVar7, 90) + IfEq(LVar7, 0) + Wait(5) + Set(LVar8, 6) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVar9, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Add(LVar8, 1) + Add(LVar7, LVar8) + EndIf + Goto(50) + EndIf + EndIf + IfNe(LVar7, 0) + Sub(LVar8, 1) + Add(LVar7, LVar8) + IfLe(LVar7, 0) + Set(LVar8, 0) + Set(LVar7, 0) + Thread + Call(GetModelCenter, LVar5) + Call(PlaySoundAt, SOUND_FLO_LOG_CLOSE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + EndThread + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, LVar9, COLLIDER_FLAGS_UPPER_MASK) + EndIf + EndIf + Label(50) + IfGe(LVar7, 90) + Set(LVar8, -1) + Set(LVar7, 90) + EndIf + Call(RotateModel, LVar5, LVar7, -1, 0, 0) + Call(RotateModel, LVar6, LVar7, -1, 0, 0) + Wait(1) + EndLoop + Return + End }; #define EVT_MAKE_LOG_BRIDGE(collider, roofCollider, outsideModel, insideModel, rotAngleVar, rotVelocityVar) \ - EVT_SET(LVar4, collider) \ - EVT_SET(LVar5, outsideModel) \ - EVT_SET(LVar6, insideModel) \ - EVT_SET(LVar7, rotAngleVar) \ - EVT_SET(LVar8, rotVelocityVar) \ - EVT_SET(LVar9, roofCollider) \ - EVT_EXEC(N(EVS_LogBridge)) + Set(LVar4, collider) \ + Set(LVar5, outsideModel) \ + Set(LVar6, insideModel) \ + Set(LVar7, rotAngleVar) \ + Set(LVar8, rotVelocityVar) \ + Set(LVar9, roofCollider) \ + Exec(N(EVS_LogBridge)) diff --git a/src/world/area_flo/flo_00/flo_00_1_music.c b/src/world/area_flo/flo_00/flo_00_1_music.c index e85365b7c3f..0747c927406 100644 --- a/src/world/area_flo/flo_00/flo_00_1_music.c +++ b/src/world/area_flo/flo_00/flo_00_1_music.c @@ -1,37 +1,37 @@ #include "flo_00.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(flo_00_ENTRY_8) - EVT_IF_NE(AF_FLO_RidingBeanstalk, FALSE) - EVT_CALL(SetMusicTrack, 0, SONG_MAGIC_BEANSTALK, 1, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_IF - EVT_CASE_EQ(flo_00_ENTRY_9) - EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) - EVT_CASE_EQ(flo_00_ENTRY_A) - EVT_CALL(SetMusicTrack, 0, SONG_STAR_SPIRIT_THEME, 1, 8) - EVT_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_STAR_SPRIT_DEPARTED) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_THREAD - EVT_CASE_EQ(flo_00_ENTRY_B) - EVT_CALL(FadeInMusic, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 3000, 0, 127) - EVT_CASE_DEFAULT - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(flo_00_ENTRY_8) + IfNe(AF_FLO_RidingBeanstalk, FALSE) + Call(SetMusicTrack, 0, SONG_MAGIC_BEANSTALK, 1, 8) + Else + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndIf + CaseEq(flo_00_ENTRY_9) + Call(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) + CaseEq(flo_00_ENTRY_A) + Call(SetMusicTrack, 0, SONG_STAR_SPIRIT_THEME, 1, 8) + Thread + Loop(0) + Wait(1) + IfGe(GB_StoryProgress, STORY_CH6_STAR_SPRIT_DEPARTED) + BreakLoop + EndIf + EndLoop + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndThread + CaseEq(flo_00_ENTRY_B) + Call(FadeInMusic, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 3000, 0, 127) + CaseDefault + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndSwitch + EndSwitch + Return + End }; diff --git a/src/world/area_flo/flo_00/flo_00_2_main.c b/src/world/area_flo/flo_00/flo_00_2_main.c index e33fa1c305b..02d3199796b 100644 --- a/src/world/area_flo/flo_00/flo_00_2_main.c +++ b/src/world/area_flo/flo_00/flo_00_2_main.c @@ -9,73 +9,73 @@ API_CALLABLE(N(SpawnSunEffect)) { } EvtScript N(EVS_Wisterwood_Exit) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlayerMoveTo, 30, -170, 10) - EVT_CALL(InterpPlayerYaw, 0, 0) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittn, SOUND_WOODEN_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, -100, 20, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g27, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(func_802D2C14, 1) - EVT_CALL(PlayerMoveTo, 0, -310, 30) - EVT_CALL(func_802D2C14, 0) - EVT_IF_EQ(GB_StoryProgress, STORY_CH6_STAR_SPRIT_DEPARTED) - EVT_SET(GB_StoryProgress, STORY_CH6_RETURNED_TO_TOAD_TOWN) - EVT_END_IF - EVT_CALL(MakeLerp, -100, 0, 30, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g27, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittn, SOUND_WOODEN_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_CALL(GotoMap, EVT_PTR("mac_01"), mac_01_ENTRY_5) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK) + Call(PlayerMoveTo, 30, -170, 10) + Call(InterpPlayerYaw, 0, 0) + Call(PlaySoundAtCollider, COLLIDER_deilittn, SOUND_WOODEN_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, -100, 20, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g27, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(func_802D2C14, 1) + Call(PlayerMoveTo, 0, -310, 30) + Call(func_802D2C14, 0) + IfEq(GB_StoryProgress, STORY_CH6_STAR_SPRIT_DEPARTED) + Set(GB_StoryProgress, STORY_CH6_RETURNED_TO_TOAD_TOWN) + EndIf + Call(MakeLerp, -100, 0, 30, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g27, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_deilittn, SOUND_WOODEN_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Call(GotoMap, Ref("mac_01"), mac_01_ENTRY_5) + Wait(100) + Return + End }; EvtScript N(EVS_Wisterwood_Enter) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(InterpPlayerYaw, 180, 0) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittn, SOUND_WOODEN_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, -100, 30, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g27, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(func_802D2C14, 1) - EVT_CALL(PlayerMoveTo, 0, -135, 30) - EVT_CALL(func_802D2C14, 0) - EVT_CALL(MakeLerp, -100, 0, 30, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g27, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittn, SOUND_WOODEN_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK) + Call(InterpPlayerYaw, 180, 0) + Call(PlaySoundAtCollider, COLLIDER_deilittn, SOUND_WOODEN_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, -100, 30, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g27, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(func_802D2C14, 1) + Call(PlayerMoveTo, 0, -135, 30) + Call(func_802D2C14, 0) + Call(MakeLerp, -100, 0, 30, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g27, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_deilittn, SOUND_WOODEN_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Call(DisablePlayerInput, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_ExitWalk_flo_14_0) = EVT_EXIT_WALK(60, flo_00_ENTRY_1, "flo_14", flo_14_ENTRY_0); @@ -88,132 +88,132 @@ EvtScript N(EVS_ExitWalk_flo_08_0) = EVT_EXIT_WALK(60, flo_00_ENTRY_6, "flo_08", MAP_RODATA_PAD(1, exits); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_14_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_23_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_25_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_16_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_09_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_08_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_14_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_flo_23_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_flo_25_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_flo_16_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_flo_09_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_flo_08_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_ELSE - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, flo_00_ENTRY_8) - EVT_SET(AF_FLO_RidingBeanstalk, FALSE) - EVT_END_IF - EVT_SWITCH(LVar0) - EVT_CASE_EQ(flo_00_ENTRY_0) - EVT_THREAD - EVT_EXEC_WAIT(N(EVS_Wisterwood_Enter)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_THREAD - EVT_CASE_RANGE(flo_00_ENTRY_1, flo_00_ENTRY_6) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(flo_00_ENTRY_7) - EVT_THREAD - EVT_EXEC_WAIT(N(EVS_Scene_BeanstalkGrewRemark)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_THREAD - EVT_CASE_EQ(flo_00_ENTRY_8) - EVT_THREAD - EVT_EXEC_WAIT(N(EVS_Enter_Beanstalk)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_THREAD - EVT_CASE_EQ(flo_00_ENTRY_9) - EVT_EXEC(N(EVS_Scene_SunReturns)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(flo_00_ENTRY_A) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(flo_00_ENTRY_B) - EVT_EXEC(N(EVS_Scene_Epilogue)) - EVT_END_SWITCH - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Interact_Wisterwood)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittn, 1, 0) - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Else + Call(GetEntryID, LVar0) + IfNe(LVar0, flo_00_ENTRY_8) + Set(AF_FLO_RidingBeanstalk, FALSE) + EndIf + Switch(LVar0) + CaseEq(flo_00_ENTRY_0) + Thread + ExecWait(N(EVS_Wisterwood_Enter)) + Exec(N(EVS_BindExitTriggers)) + EndThread + CaseRange(flo_00_ENTRY_1, flo_00_ENTRY_6) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseEq(flo_00_ENTRY_7) + Thread + ExecWait(N(EVS_Scene_BeanstalkGrewRemark)) + Exec(N(EVS_BindExitTriggers)) + EndThread + CaseEq(flo_00_ENTRY_8) + Thread + ExecWait(N(EVS_Enter_Beanstalk)) + Exec(N(EVS_BindExitTriggers)) + EndThread + CaseEq(flo_00_ENTRY_9) + Exec(N(EVS_Scene_SunReturns)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseEq(flo_00_ENTRY_A) + Exec(N(EVS_BindExitTriggers)) + CaseEq(flo_00_ENTRY_B) + Exec(N(EVS_Scene_Epilogue)) + EndSwitch + EndIf + BindTrigger(Ref(N(EVS_Interact_Wisterwood)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittn, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_SET(GF_MAP_FlowerFields, TRUE) - EVT_IF_LT(GB_StoryProgress, STORY_CH6_GREW_MAGIC_BEANSTALK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_SET(GF_MAC01_RowfBadgesChosen, FALSE) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, flo_00_ENTRY_B) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(EpilogueNPCs))) - EVT_ELSE - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(ParentColliderToModel, COLLIDER_o240, MODEL_o142) - EVT_EXEC(N(EVS_SetupBeanstalk)) - EVT_EXEC(N(EVS_SetupBeanPatch)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o129, SURFACE_TYPE_FLOWERS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o363, SURFACE_TYPE_FLOWERS) + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + Set(GF_MAP_FlowerFields, TRUE) + IfLt(GB_StoryProgress, STORY_CH6_GREW_MAGIC_BEANSTALK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Set(GF_MAC01_RowfBadgesChosen, FALSE) + Call(GetEntryID, LVar0) + IfEq(LVar0, flo_00_ENTRY_B) + Call(MakeNpcs, FALSE, Ref(N(EpilogueNPCs))) + Else + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + EndIf + ExecWait(N(EVS_MakeEntities)) + Call(ParentColliderToModel, COLLIDER_o240, MODEL_o142) + Exec(N(EVS_SetupBeanstalk)) + Exec(N(EVS_SetupBeanPatch)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o129, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o363, SURFACE_TYPE_FLOWERS) EVT_FLOWER_SPAWN_REGION( 150, -270, 410, 170, 0) EVT_FLOWER_SPAWN_REGION( 115, -450, 250, -270, 0) EVT_FLOWER_SPAWN_REGION( -330, 220, 45, 410, 0) EVT_FLOWER_SPAWN_REGION( -420, -260, -140, 160, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitse, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitne, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitsw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitnw, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_EnterMap)) - EVT_CALL(GetLoadType, LVar1) - EVT_IF_NE(LVar1, LOAD_FROM_FILE_SELECT) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, flo_00_ENTRY_A) - EVT_WAIT(65) - EVT_END_IF - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitse, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitne, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitsw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitnw, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_EnterMap)) + Call(GetLoadType, LVar1) + IfNe(LVar1, LOAD_FROM_FILE_SELECT) + Call(GetEntryID, LVar0) + IfEq(LVar0, flo_00_ENTRY_A) + Wait(65) + EndIf + EndIf + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf // thread to manage wisterwood blinking - EVT_THREAD - EVT_CALL(EnableTexPanning, MODEL_o47, TRUE) - EVT_SET(LVar0, 0) - EVT_LABEL(0) - EVT_CALL(RandInt, 300, LVar1) - EVT_ADD(LVar1, 100) - EVT_CALL(RandInt, 1, LVar2) - EVT_ADD(LVar2, 1) - EVT_WAIT(LVar1) - EVT_LOOP(LVar2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x8000, 0) - EVT_WAIT(2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x10000, 0) - EVT_WAIT(2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x18000, 0) - EVT_CALL(RandInt, 5, LVar3) - EVT_ADD(LVar3, 2) - EVT_WAIT(LVar3) - EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x10000, 0) - EVT_WAIT(2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x8000, 0) - EVT_WAIT(2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, 0, 0) - EVT_CALL(RandInt, 5, LVar3) - EVT_ADD(LVar3, 2) - EVT_WAIT(LVar3) - EVT_END_LOOP - EVT_GOTO(0) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + Call(EnableTexPanning, MODEL_o47, TRUE) + Set(LVar0, 0) + Label(0) + Call(RandInt, 300, LVar1) + Add(LVar1, 100) + Call(RandInt, 1, LVar2) + Add(LVar2, 1) + Wait(LVar1) + Loop(LVar2) + Call(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x8000, 0) + Wait(2) + Call(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x10000, 0) + Wait(2) + Call(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x18000, 0) + Call(RandInt, 5, LVar3) + Add(LVar3, 2) + Wait(LVar3) + Call(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x10000, 0) + Wait(2) + Call(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x8000, 0) + Wait(2) + Call(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, 0, 0) + Call(RandInt, 5, LVar3) + Add(LVar3, 2) + Wait(LVar3) + EndLoop + Goto(0) + EndThread + Return + End }; diff --git a/src/world/area_flo/flo_00/flo_00_3_npc.c b/src/world/area_flo/flo_00/flo_00_3_npc.c index 7cd5db41eb1..c724c9725a0 100644 --- a/src/world/area_flo/flo_00/flo_00_3_npc.c +++ b/src/world/area_flo/flo_00/flo_00_3_npc.c @@ -20,603 +20,603 @@ API_CALLABLE(N(UpgradeStarPowerCh6)) { } EvtScript N(EVS_Scene_SunReturns) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 50, 0, -200) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 50, 0, -200) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 700) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(10.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -27, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -50) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_00C4, 0, 50, -200) - EVT_WAIT(10) - EVT_CALL(GotoMap, EVT_PTR("flo_07"), flo_07_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, 50, 0, -200) + Call(SetPanTarget, CAM_DEFAULT, 50, 0, -200) + Call(SetCamDistance, CAM_DEFAULT, 700) + Call(SetCamPitch, CAM_DEFAULT, Float(10.0), Float(-11.0)) + Call(SetCamPosA, CAM_DEFAULT, -27, 0) + Call(SetCamPosB, CAM_DEFAULT, 0, -50) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20) + Call(ShowMessageAtWorldPos, MSG_CH6_00C4, 0, 50, -200) + Wait(10) + Call(GotoMap, Ref("flo_07"), flo_07_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_Wisterwood_Introduction) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, -170) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, -170) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-8.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(75 * DT) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH6_0000, 160, 40) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.5)) - EVT_CALL(PlayerJump1, LVar0, LVar1, LVar2, 12 * DT) - EVT_WAIT(10 * DT) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_WAIT(15 * DT) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_WAIT(15 * DT) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 800) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-5.8)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -2, 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(15 * DT) - EVT_CALL(SpeakToPlayer, NPC_Dummy_Wisterwood, -1, -1, 5, MSG_CH6_0001) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(InterpPlayerYaw, 350, 0) - EVT_WAIT(15 * DT) - EVT_CALL(ContinueSpeech, NPC_Dummy_Wisterwood, -1, -1, 5, MSG_CH6_0002) - EVT_WAIT(10 * DT) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 333) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(9.0), EVT_FLOAT(-22.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -2, 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(EnablePartnerAI) - EVT_CALL(func_802D2C14, 1) - EVT_WAIT(10 * DT) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0003, 0, 70, -200) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(16.5), EVT_FLOAT(-11.8)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 525) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -14, 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0004, 0, 50, -200) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(9.0), EVT_FLOAT(-22.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 333) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -2, 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0005, 0, 70, -200) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_SET(GB_StoryProgress, STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_CALL(func_802D2C14, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, -170) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, -170) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-8.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(75 * DT) + Call(ShowMessageAtScreenPos, MSG_CH6_0000, 160, 40) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerJumpscale, Float(1.5)) + Call(PlayerJump1, LVar0, LVar1, LVar2, 12 * DT) + Wait(10 * DT) + Call(DisablePartnerAI, 0) + Call(InterpPlayerYaw, 270, 0) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + Wait(15 * DT) + Call(InterpPlayerYaw, 90, 0) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + Wait(15 * DT) + Call(SetCamDistance, CAM_DEFAULT, 800) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-5.8)) + Call(SetCamPosA, CAM_DEFAULT, -2, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(15 * DT) + Call(SpeakToPlayer, NPC_Dummy_Wisterwood, -1, -1, 5, MSG_CH6_0001) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(InterpPlayerYaw, 350, 0) + Wait(15 * DT) + Call(ContinueSpeech, NPC_Dummy_Wisterwood, -1, -1, 5, MSG_CH6_0002) + Wait(10 * DT) + Call(SetCamDistance, CAM_DEFAULT, 333) + Call(SetCamPitch, CAM_DEFAULT, Float(9.0), Float(-22.0)) + Call(SetCamPosA, CAM_DEFAULT, -2, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(EnablePartnerAI) + Call(func_802D2C14, 1) + Wait(10 * DT) + Call(ShowMessageAtWorldPos, MSG_CH6_0003, 0, 70, -200) + Call(SetCamPitch, CAM_DEFAULT, Float(16.5), Float(-11.8)) + Call(SetCamDistance, CAM_DEFAULT, 525) + Call(SetCamPosA, CAM_DEFAULT, -14, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(ShowMessageAtWorldPos, MSG_CH6_0004, 0, 50, -200) + Call(SetCamPitch, CAM_DEFAULT, Float(9.0), Float(-22.0)) + Call(SetCamDistance, CAM_DEFAULT, 333) + Call(SetCamPosA, CAM_DEFAULT, -2, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(ShowMessageAtWorldPos, MSG_CH6_0005, 0, 70, -200) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Set(GB_StoryProgress, STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Call(func_802D2C14, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Interact_Wisterwood) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(2) - EVT_CALL(GetPlayerActionState, LVar3) - EVT_SET(LVar4, 0) - EVT_IF_EQ(LVar3, ACTION_STATE_IDLE) - EVT_ADD(LVar4, 1) - EVT_END_IF - EVT_IF_EQ(LVar3, ACTION_STATE_WALK) - EVT_ADD(LVar4, 1) - EVT_END_IF - EVT_IF_EQ(LVar3, ACTION_STATE_RUN) - EVT_ADD(LVar4, 1) - EVT_END_IF - EVT_IF_EQ(LVar4, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0006, 0, 50, -200) - EVT_SET(GB_StoryProgress, STORY_CH6_WISTERWOOD_GAVE_HINT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH6_RETURNED_TO_TOAD_TOWN) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_000D, 0, 50, -200) - EVT_CALL(ShowChoice, MSG_Choice_001F) - EVT_WAIT(10) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN) - EVT_CALL(SwitchMessage, MSG_CH6_000E) - EVT_CASE_LT(STORY_CH6_GOT_FERTILE_SOIL) - EVT_CALL(SwitchMessage, MSG_CH6_000F) - EVT_CASE_LT(STORY_CH6_FILLED_SPRING_WITH_WATER) - EVT_CALL(SwitchMessage, MSG_CH6_0010) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SwitchMessage, MSG_CH6_0011) - EVT_CASE_LT(STORY_CH6_GREW_MAGIC_BEANSTALK) - EVT_CALL(SwitchMessage, MSG_CH6_0007) - EVT_CASE_LT(STORY_CH6_BEGAN_PEACH_MISSION) - EVT_CALL(SwitchMessage, MSG_CH6_0012) - EVT_CASE_DEFAULT - EVT_CALL(SwitchMessage, MSG_CH6_0013) - EVT_END_SWITCH - EVT_CASE_EQ(1) - EVT_CALL(CloseMessage) - EVT_EXEC(N(EVS_Wisterwood_Exit)) - EVT_RETURN - EVT_CASE_EQ(2) - EVT_CALL(CloseMessage) - EVT_END_SWITCH - EVT_ELSE - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0014, 0, 50, -200) - EVT_CALL(ShowChoice, MSG_Choice_001F) - EVT_WAIT(10) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SwitchMessage, MSG_CH6_0015) - EVT_CASE_EQ(1) - EVT_CALL(CloseMessage) - EVT_EXEC(N(EVS_Wisterwood_Exit)) - EVT_RETURN - EVT_CASE_EQ(2) - EVT_CALL(CloseMessage) - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Wait(2) + Call(GetPlayerActionState, LVar3) + Set(LVar4, 0) + IfEq(LVar3, ACTION_STATE_IDLE) + Add(LVar4, 1) + EndIf + IfEq(LVar3, ACTION_STATE_WALK) + Add(LVar4, 1) + EndIf + IfEq(LVar3, ACTION_STATE_RUN) + Add(LVar4, 1) + EndIf + IfEq(LVar4, 0) + Call(DisablePlayerInput, FALSE) + Return + EndIf + IfEq(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(ShowMessageAtWorldPos, MSG_CH6_0006, 0, 50, -200) + Set(GB_StoryProgress, STORY_CH6_WISTERWOOD_GAVE_HINT) + Call(DisablePlayerInput, FALSE) + Return + EndIf + IfLt(GB_StoryProgress, STORY_CH6_RETURNED_TO_TOAD_TOWN) + Call(ShowMessageAtWorldPos, MSG_CH6_000D, 0, 50, -200) + Call(ShowChoice, MSG_Choice_001F) + Wait(10) + Switch(LVar0) + CaseEq(0) + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_GOT_MAGICAL_BEAN) + Call(SwitchMessage, MSG_CH6_000E) + CaseLt(STORY_CH6_GOT_FERTILE_SOIL) + Call(SwitchMessage, MSG_CH6_000F) + CaseLt(STORY_CH6_FILLED_SPRING_WITH_WATER) + Call(SwitchMessage, MSG_CH6_0010) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SwitchMessage, MSG_CH6_0011) + CaseLt(STORY_CH6_GREW_MAGIC_BEANSTALK) + Call(SwitchMessage, MSG_CH6_0007) + CaseLt(STORY_CH6_BEGAN_PEACH_MISSION) + Call(SwitchMessage, MSG_CH6_0012) + CaseDefault + Call(SwitchMessage, MSG_CH6_0013) + EndSwitch + CaseEq(1) + Call(CloseMessage) + Exec(N(EVS_Wisterwood_Exit)) + Return + CaseEq(2) + Call(CloseMessage) + EndSwitch + Else + Call(ShowMessageAtWorldPos, MSG_CH6_0014, 0, 50, -200) + Call(ShowChoice, MSG_Choice_001F) + Wait(10) + Switch(LVar0) + CaseEq(0) + Call(SwitchMessage, MSG_CH6_0015) + CaseEq(1) + Call(CloseMessage) + Exec(N(EVS_Wisterwood_Exit)) + Return + CaseEq(2) + Call(CloseMessage) + EndSwitch + EndIf + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Wisterwood_Farewell) = { - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(90.0), 0, 600, EVT_FLOAT(21.0), EVT_FLOAT(-12.0)) - EVT_WAIT(20 * DT) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_000B, 0, 50, -200) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, -30) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(25.0), EVT_FLOAT(-25.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_000C, 0, 50, -200) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_RETURN - EVT_END + Call(AdjustCam, CAM_DEFAULT, Float(90.0), 0, 600, Float(21.0), Float(-12.0)) + Wait(20 * DT) + Call(ShowMessageAtWorldPos, MSG_CH6_000B, 0, 50, -200) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, -30) + Call(SetCamDistance, CAM_DEFAULT, 250) + Call(SetCamPitch, CAM_DEFAULT, Float(25.0), Float(-25.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(ShowMessageAtWorldPos, MSG_CH6_000C, 0, 50, -200) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Return + End }; EvtScript N(EVS_NpcInit_Wisterwood) = { - EVT_CALL(EnableGroup, MODEL_ha, FALSE) - EVT_CALL(EnableGroup, MODEL_tuta, FALSE) - EVT_CALL(EnableGroup, MODEL_g54, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, 50, 70, -230) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_IF_LT(GB_StoryProgress, STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_EXEC(N(EVS_Wisterwood_Introduction)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(EnableGroup, MODEL_ha, FALSE) + Call(EnableGroup, MODEL_tuta, FALSE) + Call(EnableGroup, MODEL_g54, FALSE) + Call(SetNpcPos, NPC_SELF, 50, 70, -230) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) + Call(EnableNpcShadow, NPC_SELF, FALSE) + IfLt(GB_StoryProgress, STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Exec(N(EVS_Wisterwood_Introduction)) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Bubulb1) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_CH6_0016) - EVT_CASE_LT(STORY_CH6_GOT_FERTILE_SOIL) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_CH6_0017) - EVT_CASE_LT(STORY_CH6_FILLED_SPRING_WITH_WATER) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_CH6_0018) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_CH6_0019) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SWITCH(AF_FLO_PinkBubulbDialogueToggle) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_HappyTalk, ANIM_Bubulb_Pink_HappyGentle, 0, MSG_CH6_001A) - EVT_SET(AF_FLO_PinkBubulbDialogueToggle, TRUE) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_HappyTalk, ANIM_Bubulb_Pink_HappyGentle, 0, MSG_CH6_001B) - EVT_SET(AF_FLO_PinkBubulbDialogueToggle, FALSE) - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_HappyTalk, ANIM_Bubulb_Pink_HappyGentle, 0, MSG_CH6_001C) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_GOT_MAGICAL_BEAN) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_CH6_0016) + CaseLt(STORY_CH6_GOT_FERTILE_SOIL) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_CH6_0017) + CaseLt(STORY_CH6_FILLED_SPRING_WITH_WATER) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_CH6_0018) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_CH6_0019) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Switch(AF_FLO_PinkBubulbDialogueToggle) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_HappyTalk, ANIM_Bubulb_Pink_HappyGentle, 0, MSG_CH6_001A) + Set(AF_FLO_PinkBubulbDialogueToggle, TRUE) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_HappyTalk, ANIM_Bubulb_Pink_HappyGentle, 0, MSG_CH6_001B) + Set(AF_FLO_PinkBubulbDialogueToggle, FALSE) + EndSwitch + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_HappyTalk, ANIM_Bubulb_Pink_HappyGentle, 0, MSG_CH6_001C) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Bubulb2) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_001D) - EVT_CASE_LT(STORY_CH6_GOT_FERTILE_SOIL) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_001E) - EVT_CASE_LT(STORY_CH6_FILLED_SPRING_WITH_WATER) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_001F) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_0020) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SWITCH(AF_FLO_PurpleBubulbDialogueToggle) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_0021) - EVT_SET(AF_FLO_PurpleBubulbDialogueToggle, TRUE) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_0022) - EVT_SET(AF_FLO_PurpleBubulbDialogueToggle, FALSE) - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_0023) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_GOT_MAGICAL_BEAN) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_001D) + CaseLt(STORY_CH6_GOT_FERTILE_SOIL) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_001E) + CaseLt(STORY_CH6_FILLED_SPRING_WITH_WATER) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_001F) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_0020) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Switch(AF_FLO_PurpleBubulbDialogueToggle) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_0021) + Set(AF_FLO_PurpleBubulbDialogueToggle, TRUE) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_0022) + Set(AF_FLO_PurpleBubulbDialogueToggle, FALSE) + EndSwitch + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_0023) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Bubulb_03) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH6_0024) - EVT_CASE_LT(STORY_CH6_GOT_FERTILE_SOIL) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH6_0025) - EVT_CASE_LT(STORY_CH6_FILLED_SPRING_WITH_WATER) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH6_0026) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH6_0027) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SWITCH(AF_FLO_GreenBubulbDialogueToggle) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_HappyTalk, ANIM_Bubulb_Green_HappyGentle, 0, MSG_CH6_0028) - EVT_SET(AF_FLO_GreenBubulbDialogueToggle, TRUE) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_HappyTalk, ANIM_Bubulb_Green_HappyGentle, 0, MSG_CH6_0029) - EVT_SET(AF_FLO_GreenBubulbDialogueToggle, FALSE) - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_HappyTalk, ANIM_Bubulb_Green_HappyGentle, 0, MSG_CH6_002A) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_GOT_MAGICAL_BEAN) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH6_0024) + CaseLt(STORY_CH6_GOT_FERTILE_SOIL) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH6_0025) + CaseLt(STORY_CH6_FILLED_SPRING_WITH_WATER) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH6_0026) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH6_0027) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Switch(AF_FLO_GreenBubulbDialogueToggle) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_HappyTalk, ANIM_Bubulb_Green_HappyGentle, 0, MSG_CH6_0028) + Set(AF_FLO_GreenBubulbDialogueToggle, TRUE) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_HappyTalk, ANIM_Bubulb_Green_HappyGentle, 0, MSG_CH6_0029) + Set(AF_FLO_GreenBubulbDialogueToggle, FALSE) + EndSwitch + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_HappyTalk, ANIM_Bubulb_Green_HappyGentle, 0, MSG_CH6_002A) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Bubulb_04) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH6_002B) - EVT_CASE_LT(STORY_CH6_GOT_FERTILE_SOIL) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH6_002C) - EVT_CASE_LT(STORY_CH6_FILLED_SPRING_WITH_WATER) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH6_002D) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH6_002E) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SWITCH(AF_FLO_YellowBubulbDialogueToggle) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_HappyTalk, ANIM_Bubulb_Yellow_HappyGentle, 0, MSG_CH6_002F) - EVT_SET(AF_FLO_YellowBubulbDialogueToggle, TRUE) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_HappyTalk, ANIM_Bubulb_Yellow_HappyGentle, 0, MSG_CH6_0030) - EVT_SET(AF_FLO_YellowBubulbDialogueToggle, FALSE) - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_HappyTalk, ANIM_Bubulb_Yellow_HappyGentle, 0, MSG_CH6_0031) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_GOT_MAGICAL_BEAN) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH6_002B) + CaseLt(STORY_CH6_GOT_FERTILE_SOIL) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH6_002C) + CaseLt(STORY_CH6_FILLED_SPRING_WITH_WATER) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH6_002D) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH6_002E) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Switch(AF_FLO_YellowBubulbDialogueToggle) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_HappyTalk, ANIM_Bubulb_Yellow_HappyGentle, 0, MSG_CH6_002F) + Set(AF_FLO_YellowBubulbDialogueToggle, TRUE) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_HappyTalk, ANIM_Bubulb_Yellow_HappyGentle, 0, MSG_CH6_0030) + Set(AF_FLO_YellowBubulbDialogueToggle, FALSE) + EndSwitch + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_HappyTalk, ANIM_Bubulb_Yellow_HappyGentle, 0, MSG_CH6_0031) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Bubulb_01) = { - EVT_SET(AF_FLO_PinkBubulbDialogueToggle, FALSE) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bubulb1))) - EVT_RETURN - EVT_END + Set(AF_FLO_PinkBubulbDialogueToggle, FALSE) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bubulb1))) + Return + End }; EvtScript N(EVS_NpcInit_Bubulb_02) = { - EVT_SET(AF_FLO_PurpleBubulbDialogueToggle, FALSE) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bubulb2))) - EVT_RETURN - EVT_END + Set(AF_FLO_PurpleBubulbDialogueToggle, FALSE) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bubulb2))) + Return + End }; EvtScript N(EVS_NpcInit_Bubulb_03) = { - EVT_SET(AF_FLO_GreenBubulbDialogueToggle, FALSE) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bubulb_03))) - EVT_RETURN - EVT_END + Set(AF_FLO_GreenBubulbDialogueToggle, FALSE) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bubulb_03))) + Return + End }; EvtScript N(EVS_NpcInit_Bubulb_04) = { - EVT_SET(AF_FLO_YellowBubulbDialogueToggle, FALSE) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bubulb_04))) - EVT_RETURN - EVT_END + Set(AF_FLO_YellowBubulbDialogueToggle, FALSE) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bubulb_04))) + Return + End }; EvtScript N(EVS_NpcInteract_Tolielup) = { - EVT_IF_EQ(GF_FLO00_Met_Tolielup, FALSE) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4.0), -30, 300, EVT_FLOAT(20.0), EVT_FLOAT(-9.5)) - EVT_SET(GF_FLO00_Met_Tolielup, TRUE) - EVT_END_IF - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN) - EVT_SWITCH(AB_FLO_TolielupDialogue) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0035) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AB_FLO_TolielupDialogue, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0038) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AB_FLO_TolielupDialogue, 2) - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0039) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AB_FLO_TolielupDialogue, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH6_GOT_CRYSTAL_BERRY) - EVT_SWITCH(AB_FLO_TolielupDialogue) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0036) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AB_FLO_TolielupDialogue, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0038) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AB_FLO_TolielupDialogue, 2) - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0039) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AB_FLO_TolielupDialogue, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_SWITCH(AB_FLO_TolielupDialogue) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0037) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AB_FLO_TolielupDialogue, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0038) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AB_FLO_TolielupDialogue, 2) - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0039) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AB_FLO_TolielupDialogue, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SWITCH(AB_FLO_TolielupDialogue) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0039) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AB_FLO_TolielupDialogue, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0038) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_003A) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_END_SWITCH - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_RETURN - EVT_END + IfEq(GF_FLO00_Met_Tolielup, FALSE) + Call(AdjustCam, CAM_DEFAULT, Float(4.0), -30, 300, Float(20.0), Float(-9.5)) + Set(GF_FLO00_Met_Tolielup, TRUE) + EndIf + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_GOT_MAGICAL_BEAN) + Switch(AB_FLO_TolielupDialogue) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0035) + Call(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + Set(AB_FLO_TolielupDialogue, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0038) + Call(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + Set(AB_FLO_TolielupDialogue, 2) + CaseEq(2) + Call(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0039) + Call(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + Set(AB_FLO_TolielupDialogue, 0) + EndSwitch + CaseLt(STORY_CH6_GOT_CRYSTAL_BERRY) + Switch(AB_FLO_TolielupDialogue) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0036) + Call(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + Set(AB_FLO_TolielupDialogue, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0038) + Call(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + Set(AB_FLO_TolielupDialogue, 2) + CaseEq(2) + Call(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0039) + Call(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + Set(AB_FLO_TolielupDialogue, 0) + EndSwitch + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Switch(AB_FLO_TolielupDialogue) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0037) + Call(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + Set(AB_FLO_TolielupDialogue, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0038) + Call(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + Set(AB_FLO_TolielupDialogue, 2) + CaseEq(2) + Call(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0039) + Call(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + Set(AB_FLO_TolielupDialogue, 0) + EndSwitch + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Switch(AB_FLO_TolielupDialogue) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0039) + Call(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + Set(AB_FLO_TolielupDialogue, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0038) + Call(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + EndSwitch + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_003A) + Call(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + EndSwitch + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + Return + End }; EvtScript N(EVS_NpcInit_Tolielup) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Tolielup))) - EVT_CALL(SetNpcCollisionSize, NPC_SELF, 65, 50) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Tolielup))) + Call(SetNpcCollisionSize, NPC_SELF, 65, 50) + Return + End }; EvtScript N(EVS_NpcIdle_Klevar) = { - EVT_LOOP(0) - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Loop(10) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 1) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Loop(10) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 1) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_Scene_RescuedKlevar) = { - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(func_802CF56C, 2) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar0) - EVT_ADD(LVar3, -50) - EVT_SET(LVar4, LVar1) - EVT_ADD(LVar4, 26) - EVT_CALL(SetNpcPos, NPC_Klevar, LVar3, LVar4, LVar2) - EVT_CALL(PlayerFaceNpc, NPC_Klevar, FALSE) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Klevar, 0) - EVT_ADD(LVar0, -25) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(475.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 18, -8) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(WaitForPlayerInputEnabled) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(40 * DT) - EVT_CALL(SpeakToPlayer, NPC_Klevar, ANIM_WorldKlevar_Talk, ANIM_WorldKlevar_Idle, SPEECH_FLAG_200, MSG_CH6_00D8) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 18, -9) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(MakeLerp, 0, 360, 10 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Klevar, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(EnableNpcAI, NPC_Klevar, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Leap) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_UsePower) - EVT_CALL(PlaySoundAtPlayer, SOUND_RECEIVE_STAR_POWER, SOUND_SPACE_DEFAULT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar1) - EVT_ADD(LVar1, 50) - EVT_ADD(LVar2, 10) - EVT_ADD(LVar3, 30) - EVT_LOOP(5) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 20) - EVT_WAIT(6 * DT) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 1, LVar0, LVar3, LVar2, 20) - EVT_WAIT(6 * DT) - EVT_END_LOOP - EVT_WAIT(20 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_GET_STAR_POWER_WAVE, SOUND_SPACE_DEFAULT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 30) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Idle) - EVT_CALL(EnableNpcAI, NPC_Klevar, TRUE) - EVT_CALL(N(UpgradeStarPowerCh6)) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0196, 160, 40) - EVT_WAIT(10 * DT) - EVT_CALL(GetNpcPos, NPC_Klevar, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Klevar, ANIM_WorldKlevar_Talk, ANIM_WorldKlevar_Idle, SPEECH_FLAG_200, MSG_CH6_00D9) - EVT_WAIT(10 * DT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -25) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Klevar, ANIM_WorldKlevar_Talk, ANIM_WorldKlevar_Idle, SPEECH_FLAG_200, MSG_CH6_00DA) - EVT_CALL(SetNpcFlagBits, NPC_Klevar, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) - EVT_THREAD - EVT_LOOP(25) - EVT_CALL(GetNpcPos, NPC_Klevar, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 20) - EVT_WAIT(4 * DT) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 1800) - EVT_CALL(MakeLerp, LVar2, LVar3, 100 * DT, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Klevar, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Klevar, LVar2, LVar3, LVar4) - EVT_SET(LVar5, LVar3) - EVT_ADD(LVar5, 180) - EVT_CALL(MakeLerp, LVar3, LVar5, 100 * DT, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, NPC_Klevar, LVar2, LVar0, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_Klevar, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(15 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Klevar, SOUND_STAR_SPIRIT_DEPART_1, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_WAIT(110 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_SET(GB_StoryProgress, STORY_CH6_STAR_SPRIT_DEPARTED) - EVT_EXEC_WAIT(N(EVS_Wisterwood_Farewell)) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePartnerAI, 0) + Call(func_802CF56C, 2) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar3, LVar0) + Add(LVar3, -50) + Set(LVar4, LVar1) + Add(LVar4, 26) + Call(SetNpcPos, NPC_Klevar, LVar3, LVar4, LVar2) + Call(PlayerFaceNpc, NPC_Klevar, FALSE) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Klevar, 0) + Add(LVar0, -25) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(475.0)) + Call(SetCamPitch, CAM_DEFAULT, 18, -8) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(WaitForPlayerInputEnabled) + Call(DisablePlayerInput, TRUE) + Wait(40 * DT) + Call(SpeakToPlayer, NPC_Klevar, ANIM_WorldKlevar_Talk, ANIM_WorldKlevar_Idle, SPEECH_FLAG_200, MSG_CH6_00D8) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, 18, -9) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(MakeLerp, 0, 360, 10 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Klevar, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(EnableNpcAI, NPC_Klevar, FALSE) + Call(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Leap) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_UsePower) + Call(PlaySoundAtPlayer, SOUND_RECEIVE_STAR_POWER, SOUND_SPACE_DEFAULT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar3, LVar1) + Add(LVar1, 50) + Add(LVar2, 10) + Add(LVar3, 30) + Loop(5) + PlayEffect(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 20) + Wait(6 * DT) + PlayEffect(EFFECT_SPARKLES, 1, LVar0, LVar3, LVar2, 20) + Wait(6 * DT) + EndLoop + Wait(20 * DT) + Call(PlaySoundAtPlayer, SOUND_GET_STAR_POWER_WAVE, SOUND_SPACE_DEFAULT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 20) + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 30) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Idle) + Call(EnableNpcAI, NPC_Klevar, TRUE) + Call(N(UpgradeStarPowerCh6)) + Call(ShowMessageAtScreenPos, MSG_Menus_0196, 160, 40) + Wait(10 * DT) + Call(GetNpcPos, NPC_Klevar, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(250.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Klevar, ANIM_WorldKlevar_Talk, ANIM_WorldKlevar_Idle, SPEECH_FLAG_200, MSG_CH6_00D9) + Wait(10 * DT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, -25) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Klevar, ANIM_WorldKlevar_Talk, ANIM_WorldKlevar_Idle, SPEECH_FLAG_200, MSG_CH6_00DA) + Call(SetNpcFlagBits, NPC_Klevar, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) + Thread + Loop(25) + Call(GetNpcPos, NPC_Klevar, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 20) + Wait(4 * DT) + EndLoop + EndThread + Thread + Set(LVar2, 0) + Set(LVar3, 1800) + Call(MakeLerp, LVar2, LVar3, 100 * DT, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Klevar, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(GetNpcPos, NPC_Klevar, LVar2, LVar3, LVar4) + Set(LVar5, LVar3) + Add(LVar5, 180) + Call(MakeLerp, LVar3, LVar5, 100 * DT, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetNpcPos, NPC_Klevar, LVar2, LVar0, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcPos, NPC_Klevar, NPC_DISPOSE_LOCATION) + EndThread + Thread + Wait(15 * DT) + Call(PlaySoundAtNpc, NPC_Klevar, SOUND_STAR_SPIRIT_DEPART_1, SOUND_SPACE_DEFAULT) + EndThread + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Wait(110 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Set(GB_StoryProgress, STORY_CH6_STAR_SPRIT_DEPARTED) + ExecWait(N(EVS_Wisterwood_Farewell)) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Klevar) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_NE(LVar1, 1) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, flo_00_ENTRY_A) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Klevar))) - EVT_EXEC(N(EVS_Scene_RescuedKlevar)) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfNe(LVar1, 1) + Call(GetEntryID, LVar0) + IfEq(LVar0, flo_00_ENTRY_A) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Klevar))) + Exec(N(EVS_Scene_RescuedKlevar)) + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Lakilulu) = { - EVT_IF_LE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0032) - EVT_ELSE - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_EQ(LVar0, PARTNER_LAKILESTER) - EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0032) - EVT_WAIT(10) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Shout, ANIM_WorldLakilester_IdleTough, 5, MSG_CH6_0033) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_WorldLakilester_Idle) - EVT_CALL(EndSpeech, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5) - EVT_CALL(EnablePartnerAI) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0034) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfLe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0032) + Else + Call(GetCurrentPartnerID, LVar0) + IfEq(LVar0, PARTNER_LAKILESTER) + Call(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0032) + Wait(10) + Call(DisablePartnerAI, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Shout, ANIM_WorldLakilester_IdleTough, 5, MSG_CH6_0033) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_WorldLakilester_Idle) + Call(EndSpeech, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5) + Call(EnablePartnerAI) + Else + Call(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0034) + EndIf + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Lakilulu) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lakilulu))) - EVT_CALL(SetNpcCollisionSize, NPC_SELF, 36, 28) - EVT_CALL(SetNpcPos, NPC_SELF, -200, 15, -300) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Lakilulu))) + Call(SetNpcCollisionSize, NPC_SELF, 36, 28) + Call(SetNpcPos, NPC_SELF, -200, 15, -300) + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; NpcData N(NpcData_Wisterwood) = { diff --git a/src/world/area_flo/flo_00/flo_00_4_epilogue.c b/src/world/area_flo/flo_00/flo_00_4_epilogue.c index 5771b2d6f17..0390dae9b57 100644 --- a/src/world/area_flo/flo_00/flo_00_4_epilogue.c +++ b/src/world/area_flo/flo_00/flo_00_4_epilogue.c @@ -16,63 +16,63 @@ Vec3f N(D_80245E88_CA3DA8)[] = { }; EvtScript N(EVS_Scene_Epilogue) = { - EVT_CALL(SetPlayerPos, -400, 0, 200) - EVT_CALL(SetNpcPos, NPC_PARTNER, -380, 0, 200) - EVT_CALL(func_802CF56C, 2) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) + Call(SetPlayerPos, -400, 0, 200) + Call(SetNpcPos, NPC_PARTNER, -380, 0, 200) + Call(func_802CF56C, 2) + Call(DisablePartnerAI, 0) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) EVT_VEC3I_SET(LVar0, 230, 0, 350) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(17.5), EVT_FLOAT(35.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -50) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(70) - EVT_CALL(InterpNpcYaw, NPC_Lakilester_Epilogue, 90, 0) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Lakilester_Epilogue, ANIM_WorldLakilester_Talk) - EVT_WAIT(40) - EVT_CALL(SetNpcAnimation, NPC_Lakilester_Epilogue, ANIM_WorldLakilester_Idle) - EVT_CALL(SetNpcAnimation, NPC_Parakarry_Epilogue, ANIM_WorldParakarry_Talk) - EVT_WAIT(40) - EVT_CALL(SetNpcAnimation, NPC_Parakarry_Epilogue, ANIM_WorldParakarry_Idle) - EVT_CALL(InterpNpcYaw, NPC_Parakarry_Epilogue, 90, 0) - EVT_CALL(NpcFlyTo, NPC_Parakarry_Epilogue, 400, 200, 287, 80, -5, EASING_LINEAR) - EVT_CALL(InterpNpcYaw, NPC_Lakilester_Epilogue, 270, 0) - EVT_WAIT(40) - EVT_CALL(FadeOutMusic, 0, 1000) - EVT_CALL(GotoMap, EVT_PTR("sam_11"), sam_11_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-10.0)) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(SetCamPosA, CAM_DEFAULT, Float(17.5), Float(35.0)) + Call(SetCamPosB, CAM_DEFAULT, 0, -50) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(70) + Call(InterpNpcYaw, NPC_Lakilester_Epilogue, 90, 0) + Wait(10) + Call(SetNpcAnimation, NPC_Lakilester_Epilogue, ANIM_WorldLakilester_Talk) + Wait(40) + Call(SetNpcAnimation, NPC_Lakilester_Epilogue, ANIM_WorldLakilester_Idle) + Call(SetNpcAnimation, NPC_Parakarry_Epilogue, ANIM_WorldParakarry_Talk) + Wait(40) + Call(SetNpcAnimation, NPC_Parakarry_Epilogue, ANIM_WorldParakarry_Idle) + Call(InterpNpcYaw, NPC_Parakarry_Epilogue, 90, 0) + Call(NpcFlyTo, NPC_Parakarry_Epilogue, 400, 200, 287, 80, -5, EASING_LINEAR) + Call(InterpNpcYaw, NPC_Lakilester_Epilogue, 270, 0) + Wait(40) + Call(FadeOutMusic, 0, 1000) + Call(GotoMap, Ref("sam_11"), sam_11_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_NpcInit_Lakilester_Epilogue) = { - EVT_CALL(SetPlayerPos, -400, 0, 200) - EVT_CALL(SetNpcPos, NPC_PARTNER, -380, 0, 200) - EVT_CALL(SetNpcPos, NPC_Lakilester_Epilogue, 196, 20, 354) - EVT_CALL(SetNpcYaw, NPC_Lakilester_Epilogue, 270) - EVT_RETURN - EVT_END + Call(SetPlayerPos, -400, 0, 200) + Call(SetNpcPos, NPC_PARTNER, -380, 0, 200) + Call(SetNpcPos, NPC_Lakilester_Epilogue, 196, 20, 354) + Call(SetNpcYaw, NPC_Lakilester_Epilogue, 270) + Return + End }; EvtScript N(EVS_NpcInit_Lakilulu_Epilogue) = { - EVT_CALL(SetNpcPos, NPC_Lakilulu_Epilogue, 163, 20, 370) - EVT_CALL(SetNpcYaw, NPC_Lakilulu_Epilogue, 90) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Lakilulu_Epilogue, 163, 20, 370) + Call(SetNpcYaw, NPC_Lakilulu_Epilogue, 90) + Return + End }; EvtScript N(EVS_NpcInit_Parakarry_Epilogue) = { - EVT_CALL(SetNpcPos, NPC_Parakarry_Epilogue, 266, 20, 322) - EVT_CALL(SetNpcYaw, NPC_Parakarry_Epilogue, 270) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Parakarry_Epilogue, 266, 20, 322) + Call(SetNpcYaw, NPC_Parakarry_Epilogue, 270) + Return + End }; NpcData N(NpcData_Lakilester_Epilogue)[] = { diff --git a/src/world/area_flo/flo_00/flo_00_5_beanstalk.c b/src/world/area_flo/flo_00/flo_00_5_beanstalk.c index a3bd8f4bf7d..5e861706191 100644 --- a/src/world/area_flo/flo_00/flo_00_5_beanstalk.c +++ b/src/world/area_flo/flo_00/flo_00_5_beanstalk.c @@ -61,396 +61,396 @@ API_CALLABLE(N(EnableWorldStatusBar)) { } EvtScript N(EVS_SetExteriorVineGrowth) = { - EVT_SETF(LVar1, LVar0) // input: expect range from -700 (no growth) to 0 (fully grown) - EVT_SUBF(LVar1, EVT_FLOAT(-700.0)) - EVT_DIVF(LVar1, EVT_FLOAT(100.0)) - EVT_SETF(LVar2, LVar1) - EVT_MULF(LVar2, EVT_FLOAT(100.0)) - EVT_IF_GT(LVar2, 100) - EVT_SETF(LVar1, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CALL(ScaleGroup, MODEL_g35, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o117, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o141, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o140, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o138, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o139, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o143, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o144, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o145, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o146, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o188, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o187, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o186, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o185, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o182, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o183, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o181, LVar1, 1, LVar1) - EVT_CALL(TranslateGroup, MODEL_g35, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o117, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o141, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o140, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o138, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o139, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o143, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o144, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o145, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o146, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o188, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o187, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o186, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o185, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o182, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o183, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o181, 0, LVar0, 0) - EVT_SETF(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-12.0)) - EVT_CALL(RotateGroup, MODEL_g35, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o117, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o141, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o140, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o138, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o139, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o143, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o144, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o145, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o146, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o188, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o187, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o186, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o185, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o182, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o183, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o181, LVar1, 0, 1, 0) - EVT_CALL(TranslateModel, MODEL_o117, EVT_FLOAT(8.122), EVT_FLOAT(56.153), EVT_FLOAT(1.166)) - EVT_CALL(TranslateModel, MODEL_o141, EVT_FLOAT(-6.8779296875), EVT_FLOAT(91.153), EVT_FLOAT(1.166)) - EVT_CALL(TranslateModel, MODEL_o140, EVT_FLOAT(13.122), EVT_FLOAT(106.153), EVT_FLOAT(1.166)) - EVT_CALL(TranslateModel, MODEL_o138, EVT_FLOAT(-9.8779296875), EVT_FLOAT(136.153), EVT_FLOAT(1.166)) - EVT_CALL(TranslateModel, MODEL_o139, EVT_FLOAT(-7.8779296875), EVT_FLOAT(201.153), EVT_FLOAT(1.166)) - EVT_CALL(TranslateModel, MODEL_o143, EVT_FLOAT(13.122), EVT_FLOAT(221.153), EVT_FLOAT(1.166)) - EVT_CALL(TranslateModel, MODEL_o144, EVT_FLOAT(8.127), EVT_FLOAT(261.229), EVT_FLOAT(1.166)) - EVT_CALL(TranslateModel, MODEL_o145, EVT_FLOAT(-12.8779296875), EVT_FLOAT(266.153), EVT_FLOAT(1.166)) - EVT_CALL(TranslateModel, MODEL_o146, EVT_FLOAT(8.122), EVT_FLOAT(316.153), EVT_FLOAT(-13.833984375)) - EVT_CALL(TranslateModel, MODEL_o188, EVT_FLOAT(-10.943359375), EVT_FLOAT(391.153), EVT_FLOAT(10.566)) - EVT_CALL(TranslateModel, MODEL_o187, EVT_FLOAT(-7.001953125), EVT_FLOAT(456.153), EVT_FLOAT(0.947)) - EVT_CALL(TranslateModel, MODEL_o186, EVT_FLOAT(12.998), EVT_FLOAT(471.153), EVT_FLOAT(0.947)) - EVT_CALL(TranslateModel, MODEL_o185, EVT_FLOAT(-10.001953125), EVT_FLOAT(501.153), EVT_FLOAT(0.947)) - EVT_CALL(TranslateModel, MODEL_o182, EVT_FLOAT(8.003), EVT_FLOAT(536.229), EVT_FLOAT(0.947)) - EVT_CALL(TranslateModel, MODEL_o183, EVT_FLOAT(12.998), EVT_FLOAT(586.153), EVT_FLOAT(0.947)) - EVT_CALL(TranslateModel, MODEL_o181, EVT_FLOAT(-13.001953125), EVT_FLOAT(631.153), EVT_FLOAT(0.947)) - EVT_SETF(LVar1, LVar0) - EVT_SUBF(LVar1, EVT_FLOAT(-700.0)) - EVT_DIVF(LVar1, EVT_FLOAT(300.0)) - EVT_SETF(LVar2, LVar1) - EVT_MULF(LVar2, EVT_FLOAT(100.0)) - EVT_IF_GT(LVar2, 100) - EVT_SETF(LVar1, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CALL(ScaleModel, MODEL_o117, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o141, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o140, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o138, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o139, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o143, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o144, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o145, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o146, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o188, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o187, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o186, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o185, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o182, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o183, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o181, LVar1, LVar1, LVar1) - EVT_CALL(TranslateModel, MODEL_o117, EVT_FLOAT(-8.12109375), EVT_FLOAT(-56.15234375), EVT_FLOAT(-1.1650390625)) - EVT_CALL(TranslateModel, MODEL_o141, EVT_FLOAT(6.879), EVT_FLOAT(-91.15234375), EVT_FLOAT(-1.1650390625)) - EVT_CALL(TranslateModel, MODEL_o140, EVT_FLOAT(-13.12109375), EVT_FLOAT(-106.15234375), EVT_FLOAT(-1.1650390625)) - EVT_CALL(TranslateModel, MODEL_o138, EVT_FLOAT(9.879), EVT_FLOAT(-136.15234375), EVT_FLOAT(-1.1650390625)) - EVT_CALL(TranslateModel, MODEL_o139, EVT_FLOAT(7.879), EVT_FLOAT(-201.15234375), EVT_FLOAT(-1.1650390625)) - EVT_CALL(TranslateModel, MODEL_o143, EVT_FLOAT(-13.12109375), EVT_FLOAT(-221.15234375), EVT_FLOAT(-1.1650390625)) - EVT_CALL(TranslateModel, MODEL_o144, EVT_FLOAT(-8.1259765625), EVT_FLOAT(-261.228515625), EVT_FLOAT(-1.1650390625)) - EVT_CALL(TranslateModel, MODEL_o145, EVT_FLOAT(12.879), EVT_FLOAT(-266.15234375), EVT_FLOAT(-1.1650390625)) - EVT_CALL(TranslateModel, MODEL_o146, EVT_FLOAT(-8.12109375), EVT_FLOAT(-316.15234375), EVT_FLOAT(13.835)) - EVT_CALL(TranslateModel, MODEL_o188, EVT_FLOAT(10.944), EVT_FLOAT(-391.15234375), EVT_FLOAT(-10.5654296875)) - EVT_CALL(TranslateModel, MODEL_o187, EVT_FLOAT(7.003), EVT_FLOAT(-456.15234375), EVT_FLOAT(-0.9462890625)) - EVT_CALL(TranslateModel, MODEL_o186, EVT_FLOAT(-12.9970703125), EVT_FLOAT(-471.15234375), EVT_FLOAT(-0.9462890625)) - EVT_CALL(TranslateModel, MODEL_o185, EVT_FLOAT(10.003), EVT_FLOAT(-501.15234375), EVT_FLOAT(-0.9462890625)) - EVT_CALL(TranslateModel, MODEL_o182, EVT_FLOAT(-8.001953125), EVT_FLOAT(-536.228515625), EVT_FLOAT(-0.9462890625)) - EVT_CALL(TranslateModel, MODEL_o183, EVT_FLOAT(-12.9970703125), EVT_FLOAT(-586.15234375), EVT_FLOAT(-0.9462890625)) - EVT_CALL(TranslateModel, MODEL_o181, EVT_FLOAT(13.003), EVT_FLOAT(-631.15234375), EVT_FLOAT(-0.9462890625)) - EVT_RETURN - EVT_END + SetF(LVar1, LVar0) // input: expect range from -700 (no growth) to 0 (fully grown) + SubF(LVar1, Float(-700.0)) + DivF(LVar1, Float(100.0)) + SetF(LVar2, LVar1) + MulF(LVar2, Float(100.0)) + IfGt(LVar2, 100) + SetF(LVar1, Float(1.0)) + EndIf + Call(ScaleGroup, MODEL_g35, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o117, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o141, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o140, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o138, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o139, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o143, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o144, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o145, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o146, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o188, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o187, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o186, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o185, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o182, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o183, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o181, LVar1, 1, LVar1) + Call(TranslateGroup, MODEL_g35, 0, LVar0, 0) + Call(TranslateModel, MODEL_o117, 0, LVar0, 0) + Call(TranslateModel, MODEL_o141, 0, LVar0, 0) + Call(TranslateModel, MODEL_o140, 0, LVar0, 0) + Call(TranslateModel, MODEL_o138, 0, LVar0, 0) + Call(TranslateModel, MODEL_o139, 0, LVar0, 0) + Call(TranslateModel, MODEL_o143, 0, LVar0, 0) + Call(TranslateModel, MODEL_o144, 0, LVar0, 0) + Call(TranslateModel, MODEL_o145, 0, LVar0, 0) + Call(TranslateModel, MODEL_o146, 0, LVar0, 0) + Call(TranslateModel, MODEL_o188, 0, LVar0, 0) + Call(TranslateModel, MODEL_o187, 0, LVar0, 0) + Call(TranslateModel, MODEL_o186, 0, LVar0, 0) + Call(TranslateModel, MODEL_o185, 0, LVar0, 0) + Call(TranslateModel, MODEL_o182, 0, LVar0, 0) + Call(TranslateModel, MODEL_o183, 0, LVar0, 0) + Call(TranslateModel, MODEL_o181, 0, LVar0, 0) + SetF(LVar1, LVar0) + MulF(LVar1, Float(-12.0)) + Call(RotateGroup, MODEL_g35, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o117, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o141, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o140, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o138, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o139, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o143, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o144, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o145, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o146, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o188, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o187, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o186, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o185, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o182, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o183, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o181, LVar1, 0, 1, 0) + Call(TranslateModel, MODEL_o117, Float(8.122), Float(56.153), Float(1.166)) + Call(TranslateModel, MODEL_o141, Float(-6.8779296875), Float(91.153), Float(1.166)) + Call(TranslateModel, MODEL_o140, Float(13.122), Float(106.153), Float(1.166)) + Call(TranslateModel, MODEL_o138, Float(-9.8779296875), Float(136.153), Float(1.166)) + Call(TranslateModel, MODEL_o139, Float(-7.8779296875), Float(201.153), Float(1.166)) + Call(TranslateModel, MODEL_o143, Float(13.122), Float(221.153), Float(1.166)) + Call(TranslateModel, MODEL_o144, Float(8.127), Float(261.229), Float(1.166)) + Call(TranslateModel, MODEL_o145, Float(-12.8779296875), Float(266.153), Float(1.166)) + Call(TranslateModel, MODEL_o146, Float(8.122), Float(316.153), Float(-13.833984375)) + Call(TranslateModel, MODEL_o188, Float(-10.943359375), Float(391.153), Float(10.566)) + Call(TranslateModel, MODEL_o187, Float(-7.001953125), Float(456.153), Float(0.947)) + Call(TranslateModel, MODEL_o186, Float(12.998), Float(471.153), Float(0.947)) + Call(TranslateModel, MODEL_o185, Float(-10.001953125), Float(501.153), Float(0.947)) + Call(TranslateModel, MODEL_o182, Float(8.003), Float(536.229), Float(0.947)) + Call(TranslateModel, MODEL_o183, Float(12.998), Float(586.153), Float(0.947)) + Call(TranslateModel, MODEL_o181, Float(-13.001953125), Float(631.153), Float(0.947)) + SetF(LVar1, LVar0) + SubF(LVar1, Float(-700.0)) + DivF(LVar1, Float(300.0)) + SetF(LVar2, LVar1) + MulF(LVar2, Float(100.0)) + IfGt(LVar2, 100) + SetF(LVar1, Float(1.0)) + EndIf + Call(ScaleModel, MODEL_o117, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o141, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o140, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o138, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o139, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o143, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o144, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o145, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o146, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o188, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o187, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o186, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o185, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o182, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o183, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o181, LVar1, LVar1, LVar1) + Call(TranslateModel, MODEL_o117, Float(-8.12109375), Float(-56.15234375), Float(-1.1650390625)) + Call(TranslateModel, MODEL_o141, Float(6.879), Float(-91.15234375), Float(-1.1650390625)) + Call(TranslateModel, MODEL_o140, Float(-13.12109375), Float(-106.15234375), Float(-1.1650390625)) + Call(TranslateModel, MODEL_o138, Float(9.879), Float(-136.15234375), Float(-1.1650390625)) + Call(TranslateModel, MODEL_o139, Float(7.879), Float(-201.15234375), Float(-1.1650390625)) + Call(TranslateModel, MODEL_o143, Float(-13.12109375), Float(-221.15234375), Float(-1.1650390625)) + Call(TranslateModel, MODEL_o144, Float(-8.1259765625), Float(-261.228515625), Float(-1.1650390625)) + Call(TranslateModel, MODEL_o145, Float(12.879), Float(-266.15234375), Float(-1.1650390625)) + Call(TranslateModel, MODEL_o146, Float(-8.12109375), Float(-316.15234375), Float(13.835)) + Call(TranslateModel, MODEL_o188, Float(10.944), Float(-391.15234375), Float(-10.5654296875)) + Call(TranslateModel, MODEL_o187, Float(7.003), Float(-456.15234375), Float(-0.9462890625)) + Call(TranslateModel, MODEL_o186, Float(-12.9970703125), Float(-471.15234375), Float(-0.9462890625)) + Call(TranslateModel, MODEL_o185, Float(10.003), Float(-501.15234375), Float(-0.9462890625)) + Call(TranslateModel, MODEL_o182, Float(-8.001953125), Float(-536.228515625), Float(-0.9462890625)) + Call(TranslateModel, MODEL_o183, Float(-12.9970703125), Float(-586.15234375), Float(-0.9462890625)) + Call(TranslateModel, MODEL_o181, Float(13.003), Float(-631.15234375), Float(-0.9462890625)) + Return + End }; EvtScript N(EVS_SetInteriorVineGrowth) = { - EVT_SETF(LVar1, LVar0) // input: expect range from -700 (no growth) to 0 (fully grown) - EVT_SUBF(LVar1, EVT_FLOAT(-700.0)) - EVT_DIVF(LVar1, EVT_FLOAT(100.0)) - EVT_SETF(LVar2, LVar1) - EVT_MULF(LVar2, EVT_FLOAT(100.0)) - EVT_IF_GT(LVar2, 100) - EVT_SETF(LVar1, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CALL(ScaleGroup, MODEL_g37, LVar1, 1, LVar1) - EVT_CALL(TranslateGroup, MODEL_g37, 0, LVar0, 0) - EVT_SETF(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-12.0)) - EVT_CALL(RotateGroup, MODEL_g37, LVar1, 0, 1, 0) - EVT_RETURN - EVT_END + SetF(LVar1, LVar0) // input: expect range from -700 (no growth) to 0 (fully grown) + SubF(LVar1, Float(-700.0)) + DivF(LVar1, Float(100.0)) + SetF(LVar2, LVar1) + MulF(LVar2, Float(100.0)) + IfGt(LVar2, 100) + SetF(LVar1, Float(1.0)) + EndIf + Call(ScaleGroup, MODEL_g37, LVar1, 1, LVar1) + Call(TranslateGroup, MODEL_g37, 0, LVar0, 0) + SetF(LVar1, LVar0) + MulF(LVar1, Float(-12.0)) + Call(RotateGroup, MODEL_g37, LVar1, 0, 1, 0) + Return + End }; EvtScript N(EVS_SetSproutGrowth) = { - EVT_CALL(TranslateModel, MODEL_o147, EVT_FLOAT(9.5), EVT_FLOAT(12.0), EVT_FLOAT(15.0)) - EVT_CALL(TranslateModel, MODEL_o149, EVT_FLOAT(-9.5), EVT_FLOAT(12.0), EVT_FLOAT(15.0)) - EVT_CALL(TranslateModel, MODEL_o148, EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(17.0)) - EVT_SETF(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(90.0)) - EVT_CALL(RotateModel, MODEL_o147, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o149, LVar1, 0, 0, 1) - EVT_CALL(TranslateModel, MODEL_o147, EVT_FLOAT(-9.5), EVT_FLOAT(-12.0), EVT_FLOAT(-15.0)) - EVT_CALL(TranslateModel, MODEL_o149, EVT_FLOAT(9.5), EVT_FLOAT(-12.0), EVT_FLOAT(-15.0)) - EVT_CALL(TranslateModel, MODEL_o148, EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(-17.0)) - EVT_CALL(ScaleModel, MODEL_o147, LVar0, LVar0, LVar0) - EVT_CALL(ScaleModel, MODEL_o149, LVar0, LVar0, LVar0) - EVT_CALL(ScaleModel, MODEL_o148, LVar0, LVar0, LVar0) - EVT_RETURN - EVT_END + Call(TranslateModel, MODEL_o147, Float(9.5), Float(12.0), Float(15.0)) + Call(TranslateModel, MODEL_o149, Float(-9.5), Float(12.0), Float(15.0)) + Call(TranslateModel, MODEL_o148, Float(0.0), Float(0.0), Float(17.0)) + SetF(LVar1, LVar0) + MulF(LVar1, Float(90.0)) + Call(RotateModel, MODEL_o147, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_o149, LVar1, 0, 0, 1) + Call(TranslateModel, MODEL_o147, Float(-9.5), Float(-12.0), Float(-15.0)) + Call(TranslateModel, MODEL_o149, Float(9.5), Float(-12.0), Float(-15.0)) + Call(TranslateModel, MODEL_o148, Float(0.0), Float(0.0), Float(-17.0)) + Call(ScaleModel, MODEL_o147, LVar0, LVar0, LVar0) + Call(ScaleModel, MODEL_o149, LVar0, LVar0, LVar0) + Call(ScaleModel, MODEL_o148, LVar0, LVar0, LVar0) + Return + End }; EvtScript N(EVS_SetBigLeafGrowth) = { - EVT_CALL(ScaleModel, MODEL_o142, LVar0, LVar0, LVar0) - EVT_SETF(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(90.0)) - EVT_ADDF(LVar1, EVT_FLOAT(-90.0)) - EVT_CALL(RotateModel, MODEL_o142, LVar1, 1, 0, 0) - EVT_RETURN - EVT_END + Call(ScaleModel, MODEL_o142, LVar0, LVar0, LVar0) + SetF(LVar1, LVar0) + MulF(LVar1, Float(90.0)) + AddF(LVar1, Float(-90.0)) + Call(RotateModel, MODEL_o142, LVar1, 1, 0, 0) + Return + End }; EvtScript N(EVS_SetBigLeafPosition) = { - EVT_SETF(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-3.0)) - EVT_CALL(TranslateModel, MODEL_o142, EVT_FLOAT(-0.26), LVar0, EVT_FLOAT(1.477)) - EVT_CALL(RotateModel, MODEL_o142, LVar1, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o240) - EVT_RETURN - EVT_END + SetF(LVar1, LVar0) + MulF(LVar1, Float(-3.0)) + Call(TranslateModel, MODEL_o142, Float(-0.26), LVar0, Float(1.477)) + Call(RotateModel, MODEL_o142, LVar1, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_o240) + Return + End }; EvtScript N(EVS_Exit_Beanstalk) = { - EVT_IF_EQ(AF_FLO_RidingBeanstalk, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterruptUsePartner) - EVT_WAIT(15) - EVT_CALL(DisablePartnerAI, 0) - EVT_SET(AF_FLO_RidingBeanstalk, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK) - EVT_VEC3I_SET(LVar9, EVT_FLOAT(-59.0), EVT_FLOAT(22.0), EVT_FLOAT(125.0)) // target player pos - EVT_VEC3I_SET(LVarC, EVT_FLOAT(-55.0), EVT_FLOAT(24.0), EVT_FLOAT(145.0)) // target partner pos - EVT_CALL(PlayerMoveTo, LVar9, LVarB, 8) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump0, NPC_PARTNER, LVarC, LVarD, LVarE, 5) - EVT_CALL(PlaySound, SOUND_FLO_RIDE_BEANSTALK_UP_LOOP) - EVT_CALL(SetMusicTrack, 0, SONG_MAGIC_BEANSTALK, 1, 8) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Walk) - EVT_CALL(N(GetPlayerAngles), LVar3, LVar4) - EVT_SWITCH(LVar4) - EVT_CASE_LT(90) - EVT_SET(AF_FLO_BeanstalkFacingRight, FALSE) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_CASE_GE(270) - EVT_SET(AF_FLO_BeanstalkFacingRight, TRUE) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_END_SWITCH - EVT_CALL(TranslateModel, MODEL_o142, EVT_FLOAT(-0.26), EVT_FLOAT(2.0), EVT_FLOAT(1.477)) - EVT_CALL(UpdateColliderTransform, COLLIDER_o240) - EVT_SET(MV_BeanstalkSceneSync, FALSE) - EVT_THREAD - EVT_SET(LVarF, 0) - EVT_LOOP(0) - EVT_ADD(LVarF, 1) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, 0, 700, 800, 0, 0) - EVT_EXEC(N(EVS_SetBigLeafPosition)) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(-3.0)) - EVT_SETF(LVar3, LVar0) - EVT_CALL(N(PlayerRideBeanstalk)) - EVT_CALL(N(PartnerRideBeanstalk)) - EVT_IF_EQ(LVarF, 350) - EVT_SET(MV_BeanstalkSceneSync, TRUE) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_LABEL(10) - EVT_IF_EQ(MV_BeanstalkSceneSync, FALSE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("flo_19"), flo_19_ENTRY_3) - EVT_WAIT(100) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(AF_FLO_RidingBeanstalk, FALSE) + Call(DisablePlayerInput, TRUE) + Call(InterruptUsePartner) + Wait(15) + Call(DisablePartnerAI, 0) + Set(AF_FLO_RidingBeanstalk, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK) + EVT_VEC3I_SET(LVar9, Float(-59.0), Float(22.0), Float(125.0)) // target player pos + EVT_VEC3I_SET(LVarC, Float(-55.0), Float(24.0), Float(145.0)) // target partner pos + Call(PlayerMoveTo, LVar9, LVarB, 8) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.0)) + Call(NpcJump0, NPC_PARTNER, LVarC, LVarD, LVarE, 5) + Call(PlaySound, SOUND_FLO_RIDE_BEANSTALK_UP_LOOP) + Call(SetMusicTrack, 0, SONG_MAGIC_BEANSTALK, 1, 8) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(SetPlayerAnimation, ANIM_Mario1_Walk) + Call(N(GetPlayerAngles), LVar3, LVar4) + Switch(LVar4) + CaseLt(90) + Set(AF_FLO_BeanstalkFacingRight, FALSE) + Call(InterpPlayerYaw, 90, 0) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + CaseGe(270) + Set(AF_FLO_BeanstalkFacingRight, TRUE) + Call(InterpPlayerYaw, 270, 0) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + EndSwitch + Call(TranslateModel, MODEL_o142, Float(-0.26), Float(2.0), Float(1.477)) + Call(UpdateColliderTransform, COLLIDER_o240) + Set(MV_BeanstalkSceneSync, FALSE) + Thread + Set(LVarF, 0) + Loop(0) + Add(LVarF, 1) + Call(N(CosInterpMinMax), LVarF, LVar0, 0, 700, 800, 0, 0) + Exec(N(EVS_SetBigLeafPosition)) + SetF(LVar2, LVar0) + MulF(LVar2, Float(-3.0)) + SetF(LVar3, LVar0) + Call(N(PlayerRideBeanstalk)) + Call(N(PartnerRideBeanstalk)) + IfEq(LVarF, 350) + Set(MV_BeanstalkSceneSync, TRUE) + EndIf + Wait(1) + EndLoop + EndThread + Label(10) + IfEq(MV_BeanstalkSceneSync, FALSE) + Wait(1) + Goto(10) + EndIf + Call(GotoMap, Ref("flo_19"), flo_19_ENTRY_3) + Wait(100) + EndIf + Return + End }; EvtScript N(EVS_Enter_Beanstalk) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_SET(LVar9, EVT_FLOAT(-59.0)) - EVT_SET(LVarA, EVT_FLOAT(22.0)) - EVT_SET(LVarB, EVT_FLOAT(125.0)) - EVT_SET(LVarC, EVT_FLOAT(-55.0)) - EVT_SET(LVarD, EVT_FLOAT(23.0)) - EVT_SET(LVarE, EVT_FLOAT(145.0)) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Walk) - EVT_SWITCH(AF_FLO_BeanstalkFacingRight) - EVT_CASE_EQ(0) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_CASE_EQ(1) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_END_SWITCH - EVT_END_THREAD - EVT_CALL(TranslateModel, MODEL_o142, EVT_FLOAT(-0.26), EVT_FLOAT(2.0), EVT_FLOAT(1.477)) - EVT_CALL(UpdateColliderTransform, COLLIDER_o240) - EVT_SET(LVarF, 0) - EVT_LOOP(120) - EVT_ADD(LVarF, 1) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, 70, 0, 120, 0, 0) - EVT_EXEC(N(EVS_SetBigLeafPosition)) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(-3.0)) - EVT_SETF(LVar3, LVar0) - EVT_CALL(N(PlayerRideBeanstalk)) - EVT_CALL(N(PartnerRideBeanstalk)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EnablePartnerAI) - EVT_CALL(ClearPartnerMoveHistory, NPC_PARTNER) - EVT_CALL(SetPlayerJumpscale, 1) - EVT_CALL(PlayerJump, 10, 0, 110, 20) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_WAIT(5) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(AF_FLO_RidingBeanstalk, FALSE) - EVT_CALL(StopSound, SOUND_FLO_RIDE_BEANSTALK_DOWN_LOOP) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Set(LVar9, Float(-59.0)) + Set(LVarA, Float(22.0)) + Set(LVarB, Float(125.0)) + Set(LVarC, Float(-55.0)) + Set(LVarD, Float(23.0)) + Set(LVarE, Float(145.0)) + Thread + Wait(5) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(SetPlayerAnimation, ANIM_Mario1_Walk) + Switch(AF_FLO_BeanstalkFacingRight) + CaseEq(0) + Call(InterpPlayerYaw, 90, 0) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + CaseEq(1) + Call(InterpPlayerYaw, 270, 0) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + EndSwitch + EndThread + Call(TranslateModel, MODEL_o142, Float(-0.26), Float(2.0), Float(1.477)) + Call(UpdateColliderTransform, COLLIDER_o240) + Set(LVarF, 0) + Loop(120) + Add(LVarF, 1) + Call(N(CosInterpMinMax), LVarF, LVar0, 70, 0, 120, 0, 0) + Exec(N(EVS_SetBigLeafPosition)) + SetF(LVar2, LVar0) + MulF(LVar2, Float(-3.0)) + SetF(LVar3, LVar0) + Call(N(PlayerRideBeanstalk)) + Call(N(PartnerRideBeanstalk)) + Wait(1) + EndLoop + Call(EnablePartnerAI) + Call(ClearPartnerMoveHistory, NPC_PARTNER) + Call(SetPlayerJumpscale, 1) + Call(PlayerJump, 10, 0, 110, 20) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(InterpPlayerYaw, 90, 0) + Wait(5) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK) + Set(AF_FLO_RidingBeanstalk, FALSE) + Call(StopSound, SOUND_FLO_RIDE_BEANSTALK_DOWN_LOOP) + ExecWait(N(EVS_SetupMusic)) + Call(ResetCam, CAM_DEFAULT, Float(1.0)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Scene_BeanstalkGrowing) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_o261, SOUND_FLO_BEANSTALK_START_GROWING, SOUND_SPACE_DEFAULT) - EVT_SET(LVarF, 0) - EVT_LOOP(100) - EVT_ADD(LVarF, 1) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, 0, EVT_FLOAT(1.0), 100, 0, 0) - EVT_EXEC(N(EVS_SetSproutGrowth)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(MV_BeanstalkSceneSync, FALSE) - EVT_THREAD - EVT_SET(LVarF, 0) - EVT_LOOP(1200) - EVT_ADD(LVarF, 1) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, -700, 0, 1200, 0, 0) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(1.0)) - EVT_SETF(LVar0, LVar2) - EVT_EXEC(N(EVS_SetExteriorVineGrowth)) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(1.0)) - EVT_SETF(LVar0, LVar2) - EVT_EXEC(N(EVS_SetInteriorVineGrowth)) - EVT_SWITCH(LVarF) - EVT_CASE_EQ(200) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_CASE_EQ(250) - EVT_SET(LVar0, -60) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 65) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(12.5), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 800) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -200, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -300) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_IF_GT(LVarF, 550) - EVT_SET(MV_BeanstalkSceneSync, TRUE) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_LABEL(10) - EVT_IF_EQ(MV_BeanstalkSceneSync, FALSE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(FadeInMusic, 0, SONG_CLOUDY_CLIMB, 0, 3000, 0, 127) - EVT_CALL(FadeOutMusic, 1, 3000) - EVT_CALL(GotoMap, EVT_PTR("flo_19"), flo_19_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_o261, SOUND_FLO_BEANSTALK_START_GROWING, SOUND_SPACE_DEFAULT) + Set(LVarF, 0) + Loop(100) + Add(LVarF, 1) + Call(N(CosInterpMinMax), LVarF, LVar0, 0, Float(1.0), 100, 0, 0) + Exec(N(EVS_SetSproutGrowth)) + Wait(1) + EndLoop + Set(MV_BeanstalkSceneSync, FALSE) + Thread + Set(LVarF, 0) + Loop(1200) + Add(LVarF, 1) + Call(N(CosInterpMinMax), LVarF, LVar0, -700, 0, 1200, 0, 0) + SetF(LVar2, LVar0) + MulF(LVar2, Float(1.0)) + SetF(LVar0, LVar2) + Exec(N(EVS_SetExteriorVineGrowth)) + SetF(LVar2, LVar0) + MulF(LVar2, Float(1.0)) + SetF(LVar0, LVar2) + Exec(N(EVS_SetInteriorVineGrowth)) + Switch(LVarF) + CaseEq(200) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + CaseEq(250) + Set(LVar0, -60) + Set(LVar1, 0) + Set(LVar2, 65) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(12.5), Float(-7.0)) + Call(SetCamDistance, CAM_DEFAULT, 800) + Call(SetCamPosA, CAM_DEFAULT, -200, 0) + Call(SetCamPosB, CAM_DEFAULT, 0, -300) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + CaseDefault + EndSwitch + IfGt(LVarF, 550) + Set(MV_BeanstalkSceneSync, TRUE) + EndIf + Wait(1) + EndLoop + EndThread + Label(10) + IfEq(MV_BeanstalkSceneSync, FALSE) + Wait(1) + Goto(10) + EndIf + Call(FadeInMusic, 0, SONG_CLOUDY_CLIMB, 0, 3000, 0, 127) + Call(FadeOutMusic, 1, 3000) + Call(GotoMap, Ref("flo_19"), flo_19_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_Scene_BeanstalkGrewRemark) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterpPlayerYaw, 200, 0) - EVT_CALL(SetPlayerPos, -60, 0, 30) - EVT_CALL(NpcFacePlayer, NPC_PARTNER, 1) - EVT_CALL(SetNpcPos, NPC_PARTNER, -20, 0, 10) - EVT_SET(LVar0, -60) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 65) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(12.5), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 800) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -200, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -300) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_SET(LVarF, 0) - EVT_LOOP(5) - EVT_ADD(LVarF, 20) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, EVT_FLOAT(0.0), EVT_FLOAT(1.0), 100, 0, 0) - EVT_EXEC(N(EVS_SetBigLeafGrowth)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o240, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_000A, 0, 50, -200) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(InterpPlayerYaw, 200, 0) + Call(SetPlayerPos, -60, 0, 30) + Call(NpcFacePlayer, NPC_PARTNER, 1) + Call(SetNpcPos, NPC_PARTNER, -20, 0, 10) + Set(LVar0, -60) + Set(LVar1, 0) + Set(LVar2, 65) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(12.5), Float(-7.0)) + Call(SetCamDistance, CAM_DEFAULT, 800) + Call(SetCamPosA, CAM_DEFAULT, -200, 0) + Call(SetCamPosB, CAM_DEFAULT, 0, -300) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Set(LVarF, 0) + Loop(5) + Add(LVarF, 20) + Call(N(CosInterpMinMax), LVarF, LVar0, Float(0.0), Float(1.0), 100, 0, 0) + Exec(N(EVS_SetBigLeafGrowth)) + Wait(1) + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o240, COLLIDER_FLAGS_UPPER_MASK) + Call(ShowMessageAtWorldPos, MSG_CH6_000A, 0, 50, -200) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Call(DisablePlayerInput, FALSE) + Return + End }; s32 N(BeanstalkIngredients)[] = { @@ -461,209 +461,209 @@ s32 N(BeanstalkIngredients)[] = { }; EvtScript N(EVS_BeanPatch_ItemPrompt) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(FacePlayerTowardPoint, -85, 85, 0) - EVT_CALL(func_802CF56C, 2) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_IF_EQ(GF_FLO00_PlacedFertileSoil, FALSE) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_LABEL(10) - EVT_CALL(ShowKeyChoicePopup) - EVT_SET(LVar2, LVar0) - EVT_SWITCH(LVar2) - EVT_CASE_LE(ITEM_NONE) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_CALL(AwaitPlayerLeave, -85, 85, 28) - EVT_RETURN - EVT_CASE_EQ(ITEM_FERTILE_SOIL) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_PlaceItem) - EVT_WAIT(5) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(MakeItemEntity, ITEM_FERTILE_SOIL, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(MV_BeanstalkItemEntity, LVar0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Still) - EVT_WAIT(20) - EVT_CASE_DEFAULT - EVT_SWITCH(AF_FLO_PlatingInstructionsToggle) - EVT_CASE_EQ(0) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0008, 0, 10, -200) - EVT_SET(AF_FLO_PlatingInstructionsToggle, TRUE) - EVT_CASE_DEFAULT - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0009, 0, 10, -200) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_IF_NE(LVar2, 89) - EVT_GOTO(10) - EVT_END_IF - EVT_SET(GF_FLO00_PlacedFertileSoil, TRUE) - EVT_END_IF - EVT_IF_EQ(GF_FLO00_PlacedMagicalBean, FALSE) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_LABEL(20) - EVT_CALL(ShowKeyChoicePopup) - EVT_SET(LVar2, LVar0) - EVT_SWITCH(LVar2) - EVT_CASE_LE(ITEM_NONE) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_CALL(AwaitPlayerLeave, -85, 85, 28) - EVT_RETURN - EVT_CASE_EQ(ITEM_MAGICAL_BEAN) - EVT_CALL(RemoveItemEntity, MV_BeanstalkItemEntity) - EVT_WAIT(5) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_PlaceItem) - EVT_WAIT(5) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(MakeItemEntity, ITEM_MAGICAL_BEAN, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(MV_BeanstalkItemEntity, LVar0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Still) - EVT_WAIT(20) - EVT_CASE_DEFAULT - EVT_SWITCH(AF_FLO_PlatingInstructionsToggle) - EVT_CASE_EQ(0) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0008, 0, 10, -200) - EVT_SET(AF_FLO_PlatingInstructionsToggle, TRUE) - EVT_CASE_DEFAULT - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0009, 0, 10, -200) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_IF_NE(LVar2, 88) - EVT_GOTO(20) - EVT_END_IF - EVT_SET(GF_FLO00_PlacedMagicalBean, TRUE) - EVT_END_IF - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_LABEL(30) - EVT_CALL(ShowKeyChoicePopup) - EVT_SET(LVar2, LVar0) - EVT_SWITCH(LVar2) - EVT_CASE_LE(ITEM_NONE) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_CALL(AwaitPlayerLeave, -85, 85, 28) - EVT_RETURN - EVT_CASE_EQ(ITEM_MIRACLE_WATER) - EVT_CALL(RemoveItemEntity, MV_BeanstalkItemEntity) - EVT_WAIT(5) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_PlaceItem) - EVT_WAIT(5) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(N(SyncStatusBar)) - EVT_CALL(MakeItemEntity, ITEM_MIRACLE_WATER, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(MV_BeanstalkItemEntity, LVar0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Still) - EVT_WAIT(30) - EVT_CALL(RemoveItemEntity, MV_BeanstalkItemEntity) - EVT_WAIT(30) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlayerMoveTo, -60, 30, 20) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(InterpPlayerYaw, 200, 0) - EVT_CALL(func_802CF56C, 2) - EVT_WAIT(60) - EVT_CALL(FadeInMusic, 1, SONG_MAGIC_BEANSTALK, 0, 3000, 0, 127) - EVT_CALL(FadeOutMusic, 0, 3000) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -85, 0, 75) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -85, 0, 75) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC_WAIT(N(EVS_Scene_BeanstalkGrowing)) - EVT_END_SWITCH - EVT_IF_NE(LVar2, 90) - EVT_GOTO(30) - EVT_END_IF - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(FacePlayerTowardPoint, -85, 85, 0) + Call(func_802CF56C, 2) + Call(DisablePlayerInput, FALSE) + IfEq(GF_FLO00_PlacedFertileSoil, FALSE) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Label(10) + Call(ShowKeyChoicePopup) + Set(LVar2, LVar0) + Switch(LVar2) + CaseLe(ITEM_NONE) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Call(AwaitPlayerLeave, -85, 85, 28) + Return + CaseEq(ITEM_FERTILE_SOIL) + Call(SetPlayerAnimation, ANIM_MarioW1_PlaceItem) + Wait(5) + Call(RemoveKeyItemAt, LVar1) + Call(MakeItemEntity, ITEM_FERTILE_SOIL, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0) + Set(MV_BeanstalkItemEntity, LVar0) + Call(SetPlayerAnimation, ANIM_Mario1_Still) + Wait(20) + CaseDefault + Switch(AF_FLO_PlatingInstructionsToggle) + CaseEq(0) + Call(ShowMessageAtWorldPos, MSG_CH6_0008, 0, 10, -200) + Set(AF_FLO_PlatingInstructionsToggle, TRUE) + CaseDefault + Call(ShowMessageAtWorldPos, MSG_CH6_0009, 0, 10, -200) + EndSwitch + EndSwitch + Call(DisablePlayerInput, FALSE) + Call(DisablePlayerPhysics, FALSE) + IfNe(LVar2, 89) + Goto(10) + EndIf + Set(GF_FLO00_PlacedFertileSoil, TRUE) + EndIf + IfEq(GF_FLO00_PlacedMagicalBean, FALSE) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Label(20) + Call(ShowKeyChoicePopup) + Set(LVar2, LVar0) + Switch(LVar2) + CaseLe(ITEM_NONE) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Call(AwaitPlayerLeave, -85, 85, 28) + Return + CaseEq(ITEM_MAGICAL_BEAN) + Call(RemoveItemEntity, MV_BeanstalkItemEntity) + Wait(5) + Call(SetPlayerAnimation, ANIM_MarioW1_PlaceItem) + Wait(5) + Call(RemoveKeyItemAt, LVar1) + Call(MakeItemEntity, ITEM_MAGICAL_BEAN, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0) + Set(MV_BeanstalkItemEntity, LVar0) + Call(SetPlayerAnimation, ANIM_Mario1_Still) + Wait(20) + CaseDefault + Switch(AF_FLO_PlatingInstructionsToggle) + CaseEq(0) + Call(ShowMessageAtWorldPos, MSG_CH6_0008, 0, 10, -200) + Set(AF_FLO_PlatingInstructionsToggle, TRUE) + CaseDefault + Call(ShowMessageAtWorldPos, MSG_CH6_0009, 0, 10, -200) + EndSwitch + EndSwitch + Call(DisablePlayerInput, FALSE) + Call(DisablePlayerPhysics, FALSE) + IfNe(LVar2, 88) + Goto(20) + EndIf + Set(GF_FLO00_PlacedMagicalBean, TRUE) + EndIf + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Label(30) + Call(ShowKeyChoicePopup) + Set(LVar2, LVar0) + Switch(LVar2) + CaseLe(ITEM_NONE) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Call(AwaitPlayerLeave, -85, 85, 28) + Return + CaseEq(ITEM_MIRACLE_WATER) + Call(RemoveItemEntity, MV_BeanstalkItemEntity) + Wait(5) + Call(SetPlayerAnimation, ANIM_MarioW1_PlaceItem) + Wait(5) + Call(RemoveKeyItemAt, LVar1) + Call(N(SyncStatusBar)) + Call(MakeItemEntity, ITEM_MIRACLE_WATER, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0) + Set(MV_BeanstalkItemEntity, LVar0) + Call(SetPlayerAnimation, ANIM_Mario1_Still) + Wait(30) + Call(RemoveItemEntity, MV_BeanstalkItemEntity) + Wait(30) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) + Call(PlayerMoveTo, -60, 30, 20) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK) + Call(InterpPlayerYaw, 200, 0) + Call(func_802CF56C, 2) + Wait(60) + Call(FadeInMusic, 1, SONG_MAGIC_BEANSTALK, 0, 3000, 0, 127) + Call(FadeOutMusic, 0, 3000) + Call(UseSettingsFrom, CAM_DEFAULT, -85, 0, 75) + Call(SetPanTarget, CAM_DEFAULT, -85, 0, 75) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-6.0)) + Call(SetCamDistance, CAM_DEFAULT, 250) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + ExecWait(N(EVS_Scene_BeanstalkGrowing)) + EndSwitch + IfNe(LVar2, 90) + Goto(30) + EndIf + Return + End }; EvtScript N(EVS_BeanPatch_TryInteract) = { - EVT_LABEL(0) - EVT_CALL(IsPlayerWithin, -85, 85, 20, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_ELSE - EVT_CALL(IsPlayerOnValidFloor, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(N(DisableStatusBar)) - EVT_EXEC_WAIT(N(EVS_BeanPatch_ItemPrompt)) - EVT_CALL(N(EnableWorldStatusBar)) - EVT_RETURN - EVT_END + Label(0) + Call(IsPlayerWithin, -85, 85, 20, LVar0) + IfEq(LVar0, 0) + Return + Else + Call(IsPlayerOnValidFloor, LVar0) + IfEq(LVar0, FALSE) + Wait(1) + Goto(0) + EndIf + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, PARTNER_NONE) + Return + EndIf + EndIf + Call(N(DisableStatusBar)) + ExecWait(N(EVS_BeanPatch_ItemPrompt)) + Call(N(EnableWorldStatusBar)) + Return + End }; EvtScript N(EVS_SetupBeanPatch) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH6_GREW_MAGIC_BEANSTALK) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_EQ(GB_StoryProgress, STORY_CH6_WISTERWOOD_GAVE_HINT) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_IF_EQ(GF_FLO00_PlacedFertileSoil, TRUE) - EVT_IF_EQ(GF_FLO00_PlacedMagicalBean, FALSE) - EVT_CALL(MakeItemEntity, ITEM_FERTILE_SOIL, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_ELSE - EVT_CALL(MakeItemEntity, ITEM_MAGICAL_BEAN, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_END_IF - EVT_SET(MV_BeanstalkItemEntity, LVar0) - EVT_END_IF - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_BeanPatch_TryInteract)), TRIGGER_FORCE_ACTIVATE, 0, EVT_PTR(N(BeanstalkIngredients)), 0, 1) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH6_GREW_MAGIC_BEANSTALK) + Loop(0) + Wait(1) + IfEq(GB_StoryProgress, STORY_CH6_WISTERWOOD_GAVE_HINT) + BreakLoop + EndIf + EndLoop + IfEq(GF_FLO00_PlacedFertileSoil, TRUE) + IfEq(GF_FLO00_PlacedMagicalBean, FALSE) + Call(MakeItemEntity, ITEM_FERTILE_SOIL, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0) + Else + Call(MakeItemEntity, ITEM_MAGICAL_BEAN, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0) + EndIf + Set(MV_BeanstalkItemEntity, LVar0) + EndIf + BindPadlock(Ref(N(EVS_BeanPatch_TryInteract)), TRIGGER_FORCE_ACTIVATE, 0, Ref(N(BeanstalkIngredients)), 0, 1) + EndIf + Return + End }; EvtScript N(EVS_SetupBeanstalk) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Exit_Beanstalk)), TRIGGER_FLOOR_TOUCH, COLLIDER_o240, 1, 0) - EVT_CALL(EnableGroup, MODEL_ha, TRUE) - EVT_CALL(EnableGroup, MODEL_tuta, TRUE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_CH6_WISTERWOOD_GAVE_HINT) - EVT_SET(LVar0, -700) - EVT_EXEC(N(EVS_SetExteriorVineGrowth)) - EVT_EXEC(N(EVS_SetInteriorVineGrowth)) - EVT_SET(LVar0, 0) - EVT_EXEC(N(EVS_SetSproutGrowth)) - EVT_SET(LVar0, 0) - EVT_EXEC(N(EVS_SetBigLeafGrowth)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o240, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) - EVT_CASE_GE(STORY_CH6_GREW_MAGIC_BEANSTALK) - EVT_SET(LVar0, 1) - EVT_EXEC(N(EVS_SetSproutGrowth)) - EVT_SET(LVar0, 1) - EVT_EXEC(N(EVS_SetBigLeafGrowth)) - EVT_CASE_DEFAULT - EVT_SET(LVar0, -700) - EVT_EXEC(N(EVS_SetExteriorVineGrowth)) - EVT_EXEC(N(EVS_SetInteriorVineGrowth)) - EVT_SET(LVar0, 0) - EVT_EXEC(N(EVS_SetSproutGrowth)) - EVT_SET(LVar0, 0) - EVT_EXEC(N(EVS_SetBigLeafGrowth)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o240, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_SWITCH - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_Exit_Beanstalk)), TRIGGER_FLOOR_TOUCH, COLLIDER_o240, 1, 0) + Call(EnableGroup, MODEL_ha, TRUE) + Call(EnableGroup, MODEL_tuta, TRUE) + Switch(GB_StoryProgress) + CaseEq(STORY_CH6_WISTERWOOD_GAVE_HINT) + Set(LVar0, -700) + Exec(N(EVS_SetExteriorVineGrowth)) + Exec(N(EVS_SetInteriorVineGrowth)) + Set(LVar0, 0) + Exec(N(EVS_SetSproutGrowth)) + Set(LVar0, 0) + Exec(N(EVS_SetBigLeafGrowth)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o240, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) + CaseGe(STORY_CH6_GREW_MAGIC_BEANSTALK) + Set(LVar0, 1) + Exec(N(EVS_SetSproutGrowth)) + Set(LVar0, 1) + Exec(N(EVS_SetBigLeafGrowth)) + CaseDefault + Set(LVar0, -700) + Exec(N(EVS_SetExteriorVineGrowth)) + Exec(N(EVS_SetInteriorVineGrowth)) + Set(LVar0, 0) + Exec(N(EVS_SetSproutGrowth)) + Set(LVar0, 0) + Exec(N(EVS_SetBigLeafGrowth)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o240, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) + EndSwitch + Return + End }; diff --git a/src/world/area_flo/flo_00/flo_00_6_entity.c b/src/world/area_flo/flo_00/flo_00_6_entity.c index 99bbcada6e0..f5578c5ba1e 100644 --- a/src/world/area_flo/flo_00/flo_00_6_entity.c +++ b/src/world/area_flo/flo_00/flo_00_6_entity.c @@ -2,9 +2,9 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_IF_LT(GB_StoryProgress, STORY_EPILOGUE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 110, 60, -100, 0, MAKE_ENTITY_END) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_EPILOGUE) + Call(MakeEntity, Ref(Entity_SavePoint), 110, 60, -100, 0, MAKE_ENTITY_END) + EndIf + Return + End }; diff --git a/src/world/area_flo/flo_03/flo_03_1_music.c b/src/world/area_flo/flo_03/flo_03_1_music.c index ec976c9d85f..42435085978 100644 --- a/src/world/area_flo/flo_03/flo_03_1_music.c +++ b/src/world/area_flo/flo_03/flo_03_1_music.c @@ -1,45 +1,45 @@ #include "flo_03.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, flo_03_ENTRY_2) - EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) - EVT_ELSE - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LE(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_IF_EQ(GF_FLO03_DefeatedAll_MontyMoles, FALSE) - EVT_CALL(SetMusicTrack, 0, SONG_MONTY_MOLE_ASSAULT, 0, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_END_IF - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, flo_03_ENTRY_2) + Call(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) + Else + Switch(GB_StoryProgress) + CaseLe(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + IfEq(GF_FLO03_DefeatedAll_MontyMoles, FALSE) + Call(SetMusicTrack, 0, SONG_MONTY_MOLE_ASSAULT, 0, 8) + Else + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + EndIf + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndSwitch + EndIf + Return + End }; EvtScript N(EVS_PushFlowerSong) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_IF_EQ(GF_FLO03_DefeatedAll_MontyMoles, TRUE) - EVT_CALL(PushSong, SONG_FLOWER_NPC_THEME, 0) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + IfEq(GF_FLO03_DefeatedAll_MontyMoles, TRUE) + Call(PushSong, SONG_FLOWER_NPC_THEME, 0) + EndIf + EndIf + Return + End }; EvtScript N(EVS_PopSong) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_IF_EQ(GF_FLO03_DefeatedAll_MontyMoles, TRUE) - EVT_CALL(FadeOutMusic, 0, 250) - EVT_WAIT(10) - EVT_CALL(PopSong) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + IfEq(GF_FLO03_DefeatedAll_MontyMoles, TRUE) + Call(FadeOutMusic, 0, 250) + Wait(10) + Call(PopSong) + EndIf + EndIf + Return + End }; diff --git a/src/world/area_flo/flo_03/flo_03_2_main.c b/src/world/area_flo/flo_03/flo_03_2_main.c index ff005631154..865116c6324 100644 --- a/src/world/area_flo/flo_03/flo_03_2_main.c +++ b/src/world/area_flo/flo_03/flo_03_2_main.c @@ -12,40 +12,40 @@ EvtScript N(EVS_ExitWalk_flo_09_1) = EVT_EXIT_WALK(60, flo_03_ENTRY_0, "flo_09", EvtScript N(EVS_ExitWalk_flo_22_0) = EVT_EXIT_WALK(60, flo_03_ENTRY_1, "flo_22", flo_22_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_09_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_22_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_09_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_flo_22_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_SET(AF_FLO_TreeDrop_RedBerry1, FALSE) - EVT_SET(AF_FLO_TreeDrop_RedBerry2, FALSE) - EVT_SET(AB_FLO_PetuniaDialogue, 0) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupMoles)) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_EXEC(N(EVS_EmptyEntityHandler)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o160, SURFACE_TYPE_FLOWERS) + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + Set(AF_FLO_TreeDrop_RedBerry1, FALSE) + Set(AF_FLO_TreeDrop_RedBerry2, FALSE) + Set(AB_FLO_PetuniaDialogue, 0) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupMoles)) + Exec(N(EVS_SetupFoliage)) + Exec(N(EVS_EmptyEntityHandler)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o160, SURFACE_TYPE_FLOWERS) EVT_FLOWER_SPAWN_REGION( -145, -335, 182, -180, 0) EVT_FLOWER_SPAWN_REGION( 200, -170, 310, 150, 0) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, flo_03_ENTRY_2) - EVT_EXEC(N(EVS_Scene_SunReturns)) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, flo_03_ENTRY_2) + Exec(N(EVS_Scene_SunReturns)) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndIf + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Return + End }; diff --git a/src/world/area_flo/flo_03/flo_03_3_npc.c b/src/world/area_flo/flo_03/flo_03_3_npc.c index d9d4e23e9ee..b42b820b70d 100644 --- a/src/world/area_flo/flo_03/flo_03_3_npc.c +++ b/src/world/area_flo/flo_03/flo_03_3_npc.c @@ -40,27 +40,27 @@ Vec3i N(BurrowLocations_Mole_04)[] = { }; EvtScript N(EVS_Scene_SunReturns) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetNpcYaw, NPC_Petunia, 90) - EVT_CALL(GetNpcPos, NPC_Petunia, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-9.5)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -27, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -50) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_Petunia, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_00C8) - EVT_CALL(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Dance) - EVT_WAIT(10) - EVT_CALL(GotoMap, EVT_PTR("flo_18"), flo_18_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetNpcYaw, NPC_Petunia, 90) + Call(GetNpcPos, NPC_Petunia, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-9.5)) + Call(SetCamPosA, CAM_DEFAULT, -27, 0) + Call(SetCamPosB, CAM_DEFAULT, 0, -50) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20) + Call(SpeakToPlayer, NPC_Petunia, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_00C8) + Call(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Dance) + Wait(10) + Call(GotoMap, Ref("flo_18"), flo_18_ENTRY_1) + Wait(100) + Return + End }; API_CALLABLE(N(HideBehindTree)) { @@ -117,664 +117,664 @@ API_CALLABLE(N(HideBehindTree)) { } EvtScript N(EVS_NpcAI_Dayzee) = { - EVT_CALL(N(HideBehindTree)) - EVT_RETURN - EVT_END + Call(N(HideBehindTree)) + Return + End }; EvtScript N(EVS_NpcDefeat_Dayzee) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_SET(GF_FLO03_Defeated_Dayzee, TRUE) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Set(GF_FLO03_Defeated_Dayzee, TRUE) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_FocusCamBetween) = { - EVT_CALL(GetPlayerPos, LVar3, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, LVar3) - EVT_DIV(LVar0, 2) - EVT_CALL(SetCamProperties, CAM_DEFAULT, LVar4, LVar0, LVar1, LVar2, 300, EVT_FLOAT(20.0), EVT_FLOAT(-9.5)) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar3, LVar1, LVar2) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar0, LVar3) + Div(LVar0, 2) + Call(SetCamProperties, CAM_DEFAULT, LVar4, LVar0, LVar1, LVar2, 300, Float(20.0), Float(-9.5)) + Return + End }; EvtScript N(EVS_NpcInteract_Petunia) = { - EVT_EXEC_WAIT(N(EVS_PushFlowerSong)) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_SET(MV_PauseBurrowing, TRUE) - EVT_SET(LVar4, EVT_FLOAT(3.5 / DT)) - EVT_EXEC_WAIT(N(EVS_FocusCamBetween)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0050) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Petunia_Angry) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0051) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim12) - EVT_CALL(SetNpcYaw, NPC_MontyMole_01, 270) - EVT_CALL(GetNpcPos, NPC_MontyMole_01, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-8.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 200) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim16) - EVT_WAIT(10 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_MontyMole_01, EMOTE_QUESTION, -45, 30, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(GetNpcPos, NPC_MontyMole_02, LVar0, LVar1, LVar2) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0052) - EVT_CALL(SetNpcYaw, NPC_MontyMole_02, 90) - EVT_CALL(SetNpcPos, NPC_MontyMole_02, NPC_DISPOSE_LOCATION) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 200) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-8.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim00) - EVT_WAIT(20 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_02, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcPos, NPC_MontyMole_02, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim10) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0053) - EVT_CALL(SetNpcYaw, NPC_MontyMole_03, 270) - EVT_CALL(GetNpcPos, NPC_MontyMole_03, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 200) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-8.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim14) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0054) - EVT_CALL(SetNpcYaw, NPC_MontyMole_04, 270) - EVT_CALL(GetNpcPos, NPC_MontyMole_04, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 200) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-9.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim06) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim07) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim08) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim16) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0055) - EVT_CALL(SetNpcPos, NPC_Dayzee, -233, 0, -217) - EVT_CALL(GetNpcPos, NPC_Dayzee, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-9.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcAnimation, NPC_Dayzee, ANIM_Dayzee_Anim0D) - EVT_CALL(PlaySoundAtNpc, NPC_Dayzee, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_Dayzee, EMOTE_EXCLAMATION, 45, 30, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(15 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0056) - EVT_SET(LVar4, EVT_FLOAT(90.0)) - EVT_EXEC_WAIT(N(EVS_FocusCamBetween)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0057) - EVT_CALL(SetEnemyFlagBits, NPC_Dayzee, ENEMY_FLAG_PASSIVE, 0) - EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_01, ENEMY_FLAG_PASSIVE, 0) - EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_02, ENEMY_FLAG_PASSIVE, 0) - EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_03, ENEMY_FLAG_PASSIVE, 0) - EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_04, ENEMY_FLAG_PASSIVE, 0) - EVT_CALL(BindNpcAI, NPC_Dayzee, EVT_PTR(N(EVS_NpcAI_Dayzee))) - EVT_SET(MV_PauseBurrowing, FALSE) - EVT_SET(MV_NextBurrowTriggerRadius, 60) - EVT_SET(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_CASE_EQ(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_IF_EQ(GF_FLO03_DefeatedAll_MontyMoles, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0058) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Petunia_Angry) - EVT_ELSE - EVT_SET(LVar4, EVT_FLOAT(3.5 / DT)) - EVT_EXEC_WAIT(N(EVS_FocusCamBetween)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_HappyTalk, ANIM_Petunia_Dance, 0, MSG_CH6_0059) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Petunia_GiveItem) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Petunia_Idle) + ExecWait(N(EVS_PushFlowerSong)) + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + Set(MV_PauseBurrowing, TRUE) + Set(LVar4, Float(3.5 / DT)) + ExecWait(N(EVS_FocusCamBetween)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0050) + Call(SetNpcAnimation, NPC_SELF, ANIM_Petunia_Angry) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0051) + Call(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim12) + Call(SetNpcYaw, NPC_MontyMole_01, 270) + Call(GetNpcPos, NPC_MontyMole_01, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-8.0)) + Call(SetCamDistance, CAM_DEFAULT, 200) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20 * DT) + Call(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim16) + Wait(10 * DT) + Call(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_MontyMole_01, EMOTE_QUESTION, -45, 30, EMOTER_NPC, 0, 0, 0, 0) + Call(GetNpcPos, NPC_MontyMole_02, LVar0, LVar1, LVar2) + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0052) + Call(SetNpcYaw, NPC_MontyMole_02, 90) + Call(SetNpcPos, NPC_MontyMole_02, NPC_DISPOSE_LOCATION) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 200) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-8.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim00) + Wait(20 * DT) + Call(PlaySoundAtNpc, NPC_MontyMole_02, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) + Call(SetNpcPos, NPC_MontyMole_02, LVar0, LVar1, LVar2) + Call(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim10) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0053) + Call(SetNpcYaw, NPC_MontyMole_03, 270) + Call(GetNpcPos, NPC_MontyMole_03, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 200) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-8.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim14) + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0054) + Call(SetNpcYaw, NPC_MontyMole_04, 270) + Call(GetNpcPos, NPC_MontyMole_04, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 200) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-9.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim06) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim07) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim08) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim16) + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0055) + Call(SetNpcPos, NPC_Dayzee, -233, 0, -217) + Call(GetNpcPos, NPC_Dayzee, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-9.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetNpcAnimation, NPC_Dayzee, ANIM_Dayzee_Anim0D) + Call(PlaySoundAtNpc, NPC_Dayzee, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_Dayzee, EMOTE_EXCLAMATION, 45, 30, EMOTER_NPC, 0, 0, 0, 0) + Wait(15 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0056) + Set(LVar4, Float(90.0)) + ExecWait(N(EVS_FocusCamBetween)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0057) + Call(SetEnemyFlagBits, NPC_Dayzee, ENEMY_FLAG_PASSIVE, 0) + Call(SetEnemyFlagBits, NPC_MontyMole_01, ENEMY_FLAG_PASSIVE, 0) + Call(SetEnemyFlagBits, NPC_MontyMole_02, ENEMY_FLAG_PASSIVE, 0) + Call(SetEnemyFlagBits, NPC_MontyMole_03, ENEMY_FLAG_PASSIVE, 0) + Call(SetEnemyFlagBits, NPC_MontyMole_04, ENEMY_FLAG_PASSIVE, 0) + Call(BindNpcAI, NPC_Dayzee, Ref(N(EVS_NpcAI_Dayzee))) + Set(MV_PauseBurrowing, FALSE) + Set(MV_NextBurrowTriggerRadius, 60) + Set(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + CaseEq(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + IfEq(GF_FLO03_DefeatedAll_MontyMoles, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0058) + Call(SetNpcAnimation, NPC_SELF, ANIM_Petunia_Angry) + Else + Set(LVar4, Float(3.5 / DT)) + ExecWait(N(EVS_FocusCamBetween)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_HappyTalk, ANIM_Petunia_Dance, 0, MSG_CH6_0059) + Call(EndSpeech, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Petunia_GiveItem) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_Petunia_Idle) EVT_GIVE_KEY_REWARD(ITEM_MAGICAL_BEAN) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005A) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0) - EVT_SET(GB_StoryProgress, STORY_CH6_GOT_MAGICAL_BEAN) - EVT_END_IF - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005B) - EVT_CASE_LT(STORY_CH6_RETURNED_TO_TOAD_TOWN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005C) - EVT_CASE_DEFAULT - EVT_IF_EQ(AB_FLO_PetuniaDialogue, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005D) - EVT_SET(AB_FLO_PetuniaDialogue, 1) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005E) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(8.0 / DT)) - EVT_EXEC_WAIT(N(EVS_PopSong)) - EVT_RETURN - EVT_END + Wait(20 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005A) + Call(EndSpeech, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0) + Set(GB_StoryProgress, STORY_CH6_GOT_MAGICAL_BEAN) + EndIf + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005B) + CaseLt(STORY_CH6_RETURNED_TO_TOAD_TOWN) + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005C) + CaseDefault + IfEq(AB_FLO_PetuniaDialogue, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005D) + Set(AB_FLO_PetuniaDialogue, 1) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005E) + EndIf + EndSwitch + Call(ResetCam, CAM_DEFAULT, Float(8.0 / DT)) + ExecWait(N(EVS_PopSong)) + Return + End }; EvtScript N(EVS_NpcInit_Petunia) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Petunia))) - EVT_IF_EQ(GF_FLO03_DefeatedAll_MontyMoles, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Angry) - EVT_ELSE - EVT_CALL(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Idle) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Petunia))) + IfEq(GF_FLO03_DefeatedAll_MontyMoles, FALSE) + Call(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Angry) + Else + Call(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Idle) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Dayzee) = { - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Dayzee))) - EVT_CALL(EnableNpcShadow, NPC_Dayzee, FALSE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_CALL(SetNpcPos, NPC_Dayzee, NPC_DISPOSE_LOCATION) - EVT_CASE_DEFAULT - EVT_IF_EQ(GF_FLO03_Defeated_Dayzee, FALSE) - EVT_CALL(SetEnemyFlagBits, NPC_Dayzee, ENEMY_FLAG_PASSIVE, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Dayzee))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_Dayzee, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Dayzee))) + Call(EnableNpcShadow, NPC_Dayzee, FALSE) + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + Call(SetNpcPos, NPC_Dayzee, NPC_DISPOSE_LOCATION) + CaseDefault + IfEq(GF_FLO03_Defeated_Dayzee, FALSE) + Call(SetEnemyFlagBits, NPC_Dayzee, ENEMY_FLAG_PASSIVE, 0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcAI_Dayzee))) + Else + Call(SetNpcPos, NPC_Dayzee, NPC_DISPOSE_LOCATION) + EndIf + EndSwitch + Return + End }; EvtScript N(EVS_SetupMoles) = { - EVT_SET(MV_PauseBurrowing, FALSE) - EVT_SET(MV_NextBurrowTime_Mole_01, 0) - EVT_SET(MV_NextBurrowTime_Mole_02, 0) - EVT_SET(MV_NextBurrowTime_Mole_03, 0) - EVT_SET(MV_NextBurrowTime_Mole_04, 0) - EVT_SET(MV_NextBurrowTriggerRadius, 100) - EVT_RETURN - EVT_END + Set(MV_PauseBurrowing, FALSE) + Set(MV_NextBurrowTime_Mole_01, 0) + Set(MV_NextBurrowTime_Mole_02, 0) + Set(MV_NextBurrowTime_Mole_03, 0) + Set(MV_NextBurrowTime_Mole_04, 0) + Set(MV_NextBurrowTriggerRadius, 100) + Return + End }; EvtScript N(EVS_NpcDefeat_MontyMole) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) // record defeat - EVT_CALL(GetSelfNpcID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(NPC_MontyMole_01) - EVT_SET(GF_FLO03_Defeated_MontyMoleA, TRUE) - EVT_CASE_EQ(NPC_MontyMole_02) - EVT_SET(GF_FLO03_Defeated_MontyMoleB, TRUE) - EVT_CASE_EQ(NPC_MontyMole_03) - EVT_SET(GF_FLO03_Defeated_MontyMoleC, TRUE) - EVT_CASE_EQ(NPC_MontyMole_04) - EVT_SET(GF_FLO03_Defeated_MontyMoleD, TRUE) - EVT_END_SWITCH + Call(GetSelfNpcID, LVar0) + Switch(LVar0) + CaseEq(NPC_MontyMole_01) + Set(GF_FLO03_Defeated_MontyMoleA, TRUE) + CaseEq(NPC_MontyMole_02) + Set(GF_FLO03_Defeated_MontyMoleB, TRUE) + CaseEq(NPC_MontyMole_03) + Set(GF_FLO03_Defeated_MontyMoleC, TRUE) + CaseEq(NPC_MontyMole_04) + Set(GF_FLO03_Defeated_MontyMoleD, TRUE) + EndSwitch // count number of defeated moles - EVT_SET(LVar0, 0) - EVT_ADD(LVar0, GF_FLO03_Defeated_MontyMoleA) - EVT_ADD(LVar0, GF_FLO03_Defeated_MontyMoleB) - EVT_ADD(LVar0, GF_FLO03_Defeated_MontyMoleC) - EVT_ADD(LVar0, GF_FLO03_Defeated_MontyMoleD) + Set(LVar0, 0) + Add(LVar0, GF_FLO03_Defeated_MontyMoleA) + Add(LVar0, GF_FLO03_Defeated_MontyMoleB) + Add(LVar0, GF_FLO03_Defeated_MontyMoleC) + Add(LVar0, GF_FLO03_Defeated_MontyMoleD) // end the mole-hunting minigame if all 4 are defeated - EVT_IF_NE(LVar0, 4) - EVT_CALL(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Angry) - EVT_ELSE - EVT_CALL(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Idle) - EVT_SET(GF_FLO03_DefeatedAll_MontyMoles, TRUE) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_END_IF - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MontyMole_Dark_Anim01) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MontyMole_Dark_Anim01) - EVT_END_SWITCH - EVT_RETURN - EVT_END + IfNe(LVar0, 4) + Call(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Angry) + Else + Call(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Idle) + Set(GF_FLO03_DefeatedAll_MontyMoles, TRUE) + ExecWait(N(EVS_SetupMusic)) + EndIf + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_LOST) + Call(SetNpcAnimation, NPC_SELF, ANIM_MontyMole_Dark_Anim01) + CaseEq(OUTCOME_PLAYER_FLED) + Call(SetNpcAnimation, NPC_SELF, ANIM_MontyMole_Dark_Anim01) + EndSwitch + Return + End }; EvtScript N(EVS_NpcHit_MontyMole) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_IF_NE(LVar0, ENCOUNTER_TRIGGER_NONE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MontyMole_Dark_Anim05) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + Call(GetOwnerEncounterTrigger, LVar0) + IfNe(LVar0, ENCOUNTER_TRIGGER_NONE) + Call(SetNpcAnimation, NPC_SELF, ANIM_MontyMole_Dark_Anim05) + EndIf + EndIf + Return + End }; EvtScript N(EVS_NpcIdle_MontyMole_01) = { #define LV_ShouldBurrow LVar3 - EVT_LOOP(0) - EVT_IF_EQ(MV_NextBurrowTime_Mole_01, 0) - EVT_IF_EQ(AF_FLO_IsUnderground_Mole_01, TRUE) - EVT_GOTO(0) - EVT_END_IF - EVT_SET(LV_ShouldBurrow, TRUE) - EVT_ELSE - EVT_LABEL(0) - EVT_CALL(GetNpcPos, NPC_MontyMole_01, LVar0, LVar1, LVar2) - EVT_CALL(IsPlayerWithin, LVar0, LVar2, MV_NextBurrowTriggerRadius, LV_ShouldBurrow) - EVT_END_IF - EVT_CALL(GetPartnerInUse, LVar9) - EVT_IF_EQ(LVar9, PARTNER_BOW) - EVT_SET(LVar3, FALSE) - EVT_END_IF - EVT_IF_EQ(MV_PauseBurrowing, TRUE) - EVT_SET(LV_ShouldBurrow, FALSE) - EVT_END_IF - EVT_IF_EQ(LV_ShouldBurrow, TRUE) - EVT_IF_EQ(AF_FLO_IsUnderground_Mole_01, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_MontyMole_01, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_CALL(NpcFacePlayer, NPC_MontyMole_01, 1) - EVT_WAIT(1) - EVT_SET(AF_FLO_IsUnderground_Mole_01, TRUE) - EVT_IF_NE(MV_NextBurrowTime_Mole_01, 0) - EVT_IF_LT(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_SET(LVar1, 4) - EVT_ELSE - EVT_SET(LVar1, 10) - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_MontyMole_01, EMOTE_EXCLAMATION, 0, LVar1, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(LVar1) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 1) - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_BURROW_DIG, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim11) - EVT_WAIT(20) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleA, FALSE) - EVT_CALL(SetNpcPos, NPC_MontyMole_01, 0, -50, 0) - EVT_END_IF - EVT_WAIT(45) - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(AF_FLO_IsUnderground_Mole_01, TRUE) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleA, FALSE) - EVT_CALL(RandInt, ARRAY_COUNT(N(BurrowLocations_Mole_01)) - 1, LVar0) - EVT_ADD(LVar0, 1) - EVT_USE_BUF(EVT_PTR(N(BurrowLocations_Mole_01))) - EVT_LOOP(LVar0) - EVT_BUF_READ3(LVar1, LVar2, LVar3) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_MontyMole_01, LVar1, LVar2, LVar3) - EVT_END_IF - EVT_CALL(SetNpcFlagBits, NPC_MontyMole_01, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_SET(AF_FLO_IsUnderground_Mole_01, FALSE) - EVT_CALL(NpcFacePlayer, NPC_MontyMole_01, 1) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim10) - EVT_WAIT(10) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 0) - EVT_CALL(RandInt, 30, LVar0) - EVT_ADD(LVar0, 60) - EVT_SET(MV_NextBurrowTime_Mole_01, LVar0) - EVT_ELSE - EVT_IF_GT(MV_NextBurrowTime_Mole_01, 0) - EVT_SUB(MV_NextBurrowTime_Mole_01, 1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + IfEq(MV_NextBurrowTime_Mole_01, 0) + IfEq(AF_FLO_IsUnderground_Mole_01, TRUE) + Goto(0) + EndIf + Set(LV_ShouldBurrow, TRUE) + Else + Label(0) + Call(GetNpcPos, NPC_MontyMole_01, LVar0, LVar1, LVar2) + Call(IsPlayerWithin, LVar0, LVar2, MV_NextBurrowTriggerRadius, LV_ShouldBurrow) + EndIf + Call(GetPartnerInUse, LVar9) + IfEq(LVar9, PARTNER_BOW) + Set(LVar3, FALSE) + EndIf + IfEq(MV_PauseBurrowing, TRUE) + Set(LV_ShouldBurrow, FALSE) + EndIf + IfEq(LV_ShouldBurrow, TRUE) + IfEq(AF_FLO_IsUnderground_Mole_01, FALSE) + Call(SetNpcFlagBits, NPC_MontyMole_01, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Call(NpcFacePlayer, NPC_MontyMole_01, 1) + Wait(1) + Set(AF_FLO_IsUnderground_Mole_01, TRUE) + IfNe(MV_NextBurrowTime_Mole_01, 0) + IfLt(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + Set(LVar1, 4) + Else + Set(LVar1, 10) + EndIf + Call(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_MontyMole_01, EMOTE_EXCLAMATION, 0, LVar1, EMOTER_NPC, 0, 0, 0, 0) + Wait(LVar1) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 1) + EndIf + Call(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_BURROW_DIG, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim11) + Wait(20) + IfEq(GF_FLO03_Defeated_MontyMoleA, FALSE) + Call(SetNpcPos, NPC_MontyMole_01, 0, -50, 0) + EndIf + Wait(45) + EndIf + Else + IfEq(AF_FLO_IsUnderground_Mole_01, TRUE) + IfEq(GF_FLO03_Defeated_MontyMoleA, FALSE) + Call(RandInt, ARRAY_COUNT(N(BurrowLocations_Mole_01)) - 1, LVar0) + Add(LVar0, 1) + UseBuf(Ref(N(BurrowLocations_Mole_01))) + Loop(LVar0) + BufRead3(LVar1, LVar2, LVar3) + EndLoop + Call(SetNpcPos, NPC_MontyMole_01, LVar1, LVar2, LVar3) + EndIf + Call(SetNpcFlagBits, NPC_MontyMole_01, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Set(AF_FLO_IsUnderground_Mole_01, FALSE) + Call(NpcFacePlayer, NPC_MontyMole_01, 1) + Wait(1) + Call(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim10) + Wait(10) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 0) + Call(RandInt, 30, LVar0) + Add(LVar0, 60) + Set(MV_NextBurrowTime_Mole_01, LVar0) + Else + IfGt(MV_NextBurrowTime_Mole_01, 0) + Sub(MV_NextBurrowTime_Mole_01, 1) + EndIf + EndIf + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_MontyMole_02) = { #define LV_ShouldBurrow LVar3 - EVT_LOOP(0) - EVT_IF_EQ(MV_NextBurrowTime_Mole_02, 0) - EVT_IF_EQ(AF_FLO_IsUnderground_Mole_02, TRUE) - EVT_GOTO(0) - EVT_END_IF - EVT_SET(LV_ShouldBurrow, TRUE) - EVT_ELSE - EVT_LABEL(0) - EVT_CALL(GetNpcPos, NPC_MontyMole_02, LVar0, LVar1, LVar2) - EVT_CALL(IsPlayerWithin, LVar0, LVar2, MV_NextBurrowTriggerRadius, LV_ShouldBurrow) - EVT_END_IF - EVT_CALL(GetPartnerInUse, LVar9) - EVT_IF_EQ(LVar9, PARTNER_BOW) - EVT_SET(LV_ShouldBurrow, FALSE) - EVT_END_IF - EVT_IF_EQ(MV_PauseBurrowing, TRUE) - EVT_SET(LV_ShouldBurrow, FALSE) - EVT_END_IF - EVT_IF_EQ(LV_ShouldBurrow, TRUE) - EVT_IF_EQ(AF_FLO_IsUnderground_Mole_02, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_MontyMole_02, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_CALL(NpcFacePlayer, NPC_MontyMole_02, 1) - EVT_WAIT(1) - EVT_SET(AF_FLO_IsUnderground_Mole_02, TRUE) - EVT_IF_NE(MV_NextBurrowTime_Mole_02, 0) - EVT_IF_LT(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_SET(LVar1, 4) - EVT_ELSE - EVT_SET(LVar1, 10) - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_02, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_MontyMole_02, EMOTE_EXCLAMATION, 0, LVar1, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(LVar1) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 1) - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_02, SOUND_BURROW_DIG, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim11) - EVT_WAIT(20) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleB, FALSE) - EVT_CALL(SetNpcPos, NPC_MontyMole_02, 0, -50, 0) - EVT_END_IF - EVT_WAIT(45) - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(AF_FLO_IsUnderground_Mole_02, TRUE) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleB, FALSE) - EVT_CALL(RandInt, ARRAY_COUNT(N(BurrowLocations_Mole_02)) - 1, LVar0) - EVT_ADD(LVar0, 1) - EVT_USE_BUF(EVT_PTR(N(BurrowLocations_Mole_02))) - EVT_LOOP(LVar0) - EVT_BUF_READ3(LVar1, LVar2, LVar3) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_MontyMole_02, LVar1, LVar2, LVar3) - EVT_END_IF - EVT_CALL(SetNpcFlagBits, NPC_MontyMole_02, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_SET(AF_FLO_IsUnderground_Mole_02, FALSE) - EVT_CALL(NpcFacePlayer, NPC_MontyMole_02, 1) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_02, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim10) - EVT_WAIT(10) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 0) - EVT_CALL(RandInt, 35, LVar0) - EVT_ADD(LVar0, 55) - EVT_SET(MV_NextBurrowTime_Mole_02, LVar0) - EVT_ELSE - EVT_IF_GT(MV_NextBurrowTime_Mole_02, 0) - EVT_SUB(MV_NextBurrowTime_Mole_02, 1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + IfEq(MV_NextBurrowTime_Mole_02, 0) + IfEq(AF_FLO_IsUnderground_Mole_02, TRUE) + Goto(0) + EndIf + Set(LV_ShouldBurrow, TRUE) + Else + Label(0) + Call(GetNpcPos, NPC_MontyMole_02, LVar0, LVar1, LVar2) + Call(IsPlayerWithin, LVar0, LVar2, MV_NextBurrowTriggerRadius, LV_ShouldBurrow) + EndIf + Call(GetPartnerInUse, LVar9) + IfEq(LVar9, PARTNER_BOW) + Set(LV_ShouldBurrow, FALSE) + EndIf + IfEq(MV_PauseBurrowing, TRUE) + Set(LV_ShouldBurrow, FALSE) + EndIf + IfEq(LV_ShouldBurrow, TRUE) + IfEq(AF_FLO_IsUnderground_Mole_02, FALSE) + Call(SetNpcFlagBits, NPC_MontyMole_02, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Call(NpcFacePlayer, NPC_MontyMole_02, 1) + Wait(1) + Set(AF_FLO_IsUnderground_Mole_02, TRUE) + IfNe(MV_NextBurrowTime_Mole_02, 0) + IfLt(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + Set(LVar1, 4) + Else + Set(LVar1, 10) + EndIf + Call(PlaySoundAtNpc, NPC_MontyMole_02, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_MontyMole_02, EMOTE_EXCLAMATION, 0, LVar1, EMOTER_NPC, 0, 0, 0, 0) + Wait(LVar1) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 1) + EndIf + Call(PlaySoundAtNpc, NPC_MontyMole_02, SOUND_BURROW_DIG, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim11) + Wait(20) + IfEq(GF_FLO03_Defeated_MontyMoleB, FALSE) + Call(SetNpcPos, NPC_MontyMole_02, 0, -50, 0) + EndIf + Wait(45) + EndIf + Else + IfEq(AF_FLO_IsUnderground_Mole_02, TRUE) + IfEq(GF_FLO03_Defeated_MontyMoleB, FALSE) + Call(RandInt, ARRAY_COUNT(N(BurrowLocations_Mole_02)) - 1, LVar0) + Add(LVar0, 1) + UseBuf(Ref(N(BurrowLocations_Mole_02))) + Loop(LVar0) + BufRead3(LVar1, LVar2, LVar3) + EndLoop + Call(SetNpcPos, NPC_MontyMole_02, LVar1, LVar2, LVar3) + EndIf + Call(SetNpcFlagBits, NPC_MontyMole_02, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Set(AF_FLO_IsUnderground_Mole_02, FALSE) + Call(NpcFacePlayer, NPC_MontyMole_02, 1) + Wait(1) + Call(PlaySoundAtNpc, NPC_MontyMole_02, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim10) + Wait(10) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 0) + Call(RandInt, 35, LVar0) + Add(LVar0, 55) + Set(MV_NextBurrowTime_Mole_02, LVar0) + Else + IfGt(MV_NextBurrowTime_Mole_02, 0) + Sub(MV_NextBurrowTime_Mole_02, 1) + EndIf + EndIf + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_MontyMole_03) = { #define LV_ShouldBurrow LVar3 - EVT_LOOP(0) - EVT_IF_EQ(MV_NextBurrowTime_Mole_03, 0) - EVT_IF_EQ(AF_FLO_IsUnderground_Mole_03, TRUE) - EVT_GOTO(0) - EVT_END_IF - EVT_SET(LV_ShouldBurrow, TRUE) - EVT_ELSE - EVT_LABEL(0) - EVT_CALL(GetNpcPos, NPC_MontyMole_03, LVar0, LVar1, LVar2) - EVT_CALL(IsPlayerWithin, LVar0, LVar2, MV_NextBurrowTriggerRadius, LV_ShouldBurrow) - EVT_END_IF - EVT_CALL(GetPartnerInUse, LVar9) - EVT_IF_EQ(LVar9, PARTNER_BOW) - EVT_SET(LV_ShouldBurrow, FALSE) - EVT_END_IF - EVT_IF_EQ(MV_PauseBurrowing, TRUE) - EVT_SET(LV_ShouldBurrow, FALSE) - EVT_END_IF - EVT_IF_EQ(LV_ShouldBurrow, TRUE) - EVT_IF_EQ(AF_FLO_IsUnderground_Mole_03, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_MontyMole_03, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_CALL(NpcFacePlayer, NPC_MontyMole_03, 1) - EVT_WAIT(1) - EVT_SET(AF_FLO_IsUnderground_Mole_03, TRUE) - EVT_IF_NE(MV_NextBurrowTime_Mole_03, 0) - EVT_IF_LT(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_SET(LVar1, 4) - EVT_ELSE - EVT_SET(LVar1, 10) - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_03, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_MontyMole_03, EMOTE_EXCLAMATION, 0, LVar1, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(LVar1) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 1) - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_03, SOUND_BURROW_DIG, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim11) - EVT_WAIT(20) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleC, FALSE) - EVT_CALL(SetNpcPos, NPC_MontyMole_03, 0, -50, 0) - EVT_END_IF - EVT_WAIT(45) - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(AF_FLO_IsUnderground_Mole_03, TRUE) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleC, FALSE) - EVT_CALL(RandInt, ARRAY_COUNT(N(BurrowLocations_Mole_03)) - 1, LVar0) - EVT_ADD(LVar0, 1) - EVT_USE_BUF(EVT_PTR(N(BurrowLocations_Mole_03))) - EVT_LOOP(LVar0) - EVT_BUF_READ3(LVar1, LVar2, LVar3) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_MontyMole_03, LVar1, LVar2, LVar3) - EVT_END_IF - EVT_CALL(SetNpcFlagBits, NPC_MontyMole_03, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_SET(AF_FLO_IsUnderground_Mole_03, FALSE) - EVT_CALL(NpcFacePlayer, NPC_MontyMole_03, 1) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_03, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim10) - EVT_WAIT(10) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 0) - EVT_CALL(RandInt, 40, LVar0) - EVT_ADD(LVar0, 50) - EVT_SET(MV_NextBurrowTime_Mole_03, LVar0) - EVT_ELSE - EVT_IF_GT(MV_NextBurrowTime_Mole_03, 0) - EVT_SUB(MV_NextBurrowTime_Mole_03, 1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + IfEq(MV_NextBurrowTime_Mole_03, 0) + IfEq(AF_FLO_IsUnderground_Mole_03, TRUE) + Goto(0) + EndIf + Set(LV_ShouldBurrow, TRUE) + Else + Label(0) + Call(GetNpcPos, NPC_MontyMole_03, LVar0, LVar1, LVar2) + Call(IsPlayerWithin, LVar0, LVar2, MV_NextBurrowTriggerRadius, LV_ShouldBurrow) + EndIf + Call(GetPartnerInUse, LVar9) + IfEq(LVar9, PARTNER_BOW) + Set(LV_ShouldBurrow, FALSE) + EndIf + IfEq(MV_PauseBurrowing, TRUE) + Set(LV_ShouldBurrow, FALSE) + EndIf + IfEq(LV_ShouldBurrow, TRUE) + IfEq(AF_FLO_IsUnderground_Mole_03, FALSE) + Call(SetNpcFlagBits, NPC_MontyMole_03, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Call(NpcFacePlayer, NPC_MontyMole_03, 1) + Wait(1) + Set(AF_FLO_IsUnderground_Mole_03, TRUE) + IfNe(MV_NextBurrowTime_Mole_03, 0) + IfLt(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + Set(LVar1, 4) + Else + Set(LVar1, 10) + EndIf + Call(PlaySoundAtNpc, NPC_MontyMole_03, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_MontyMole_03, EMOTE_EXCLAMATION, 0, LVar1, EMOTER_NPC, 0, 0, 0, 0) + Wait(LVar1) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 1) + EndIf + Call(PlaySoundAtNpc, NPC_MontyMole_03, SOUND_BURROW_DIG, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim11) + Wait(20) + IfEq(GF_FLO03_Defeated_MontyMoleC, FALSE) + Call(SetNpcPos, NPC_MontyMole_03, 0, -50, 0) + EndIf + Wait(45) + EndIf + Else + IfEq(AF_FLO_IsUnderground_Mole_03, TRUE) + IfEq(GF_FLO03_Defeated_MontyMoleC, FALSE) + Call(RandInt, ARRAY_COUNT(N(BurrowLocations_Mole_03)) - 1, LVar0) + Add(LVar0, 1) + UseBuf(Ref(N(BurrowLocations_Mole_03))) + Loop(LVar0) + BufRead3(LVar1, LVar2, LVar3) + EndLoop + Call(SetNpcPos, NPC_MontyMole_03, LVar1, LVar2, LVar3) + EndIf + Call(SetNpcFlagBits, NPC_MontyMole_03, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Set(AF_FLO_IsUnderground_Mole_03, FALSE) + Call(NpcFacePlayer, NPC_MontyMole_03, 1) + Wait(1) + Call(PlaySoundAtNpc, NPC_MontyMole_03, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim10) + Wait(10) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 0) + Call(RandInt, 40, LVar0) + Add(LVar0, 50) + Set(MV_NextBurrowTime_Mole_03, LVar0) + Else + IfGt(MV_NextBurrowTime_Mole_03, 0) + Sub(MV_NextBurrowTime_Mole_03, 1) + EndIf + EndIf + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_MontyMole_04) = { #define LV_ShouldBurrow LVar3 - EVT_LOOP(0) - EVT_IF_EQ(MV_NextBurrowTime_Mole_04, 0) - EVT_IF_EQ(AF_FLO_IsUnderground_Mole_04, TRUE) - EVT_GOTO(0) - EVT_END_IF - EVT_SET(LV_ShouldBurrow, TRUE) - EVT_ELSE - EVT_LABEL(0) - EVT_CALL(GetNpcPos, NPC_MontyMole_04, LVar0, LVar1, LVar2) - EVT_CALL(IsPlayerWithin, LVar0, LVar2, MV_NextBurrowTriggerRadius, LV_ShouldBurrow) - EVT_END_IF - EVT_CALL(GetPartnerInUse, LVar9) - EVT_IF_EQ(LVar9, PARTNER_BOW) - EVT_SET(LV_ShouldBurrow, FALSE) - EVT_END_IF - EVT_IF_EQ(MV_PauseBurrowing, TRUE) - EVT_SET(LV_ShouldBurrow, FALSE) - EVT_END_IF - EVT_IF_EQ(LV_ShouldBurrow, TRUE) - EVT_IF_EQ(AF_FLO_IsUnderground_Mole_04, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_MontyMole_04, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_CALL(NpcFacePlayer, NPC_MontyMole_04, 1) - EVT_WAIT(1) - EVT_SET(AF_FLO_IsUnderground_Mole_04, TRUE) - EVT_IF_NE(MV_NextBurrowTime_Mole_04, 0) - EVT_IF_LT(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_SET(LVar1, 4) - EVT_ELSE - EVT_SET(LVar1, 10) - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_04, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_MontyMole_04, EMOTE_EXCLAMATION, 0, LVar1, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(LVar1) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 1) - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_04, SOUND_BURROW_DIG, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim11) - EVT_WAIT(20) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleD, FALSE) - EVT_CALL(SetNpcPos, NPC_MontyMole_04, 0, -50, 0) - EVT_END_IF - EVT_WAIT(45) - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(AF_FLO_IsUnderground_Mole_04, TRUE) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleD, FALSE) - EVT_CALL(RandInt, ARRAY_COUNT(N(BurrowLocations_Mole_04)) - 1, LVar0) - EVT_ADD(LVar0, 1) - EVT_USE_BUF(EVT_PTR(N(BurrowLocations_Mole_04))) - EVT_LOOP(LVar0) - EVT_BUF_READ3(LVar1, LVar2, LVar3) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_MontyMole_04, LVar1, LVar2, LVar3) - EVT_END_IF - EVT_CALL(SetNpcFlagBits, NPC_MontyMole_04, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_SET(AF_FLO_IsUnderground_Mole_04, FALSE) - EVT_CALL(NpcFacePlayer, NPC_MontyMole_04, 1) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_04, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim10) - EVT_WAIT(10) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 0) - EVT_CALL(RandInt, 45, LVar0) - EVT_ADD(LVar0, 45) - EVT_SET(MV_NextBurrowTime_Mole_04, LVar0) - EVT_ELSE - EVT_IF_GT(MV_NextBurrowTime_Mole_04, 0) - EVT_SUB(MV_NextBurrowTime_Mole_04, 1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + IfEq(MV_NextBurrowTime_Mole_04, 0) + IfEq(AF_FLO_IsUnderground_Mole_04, TRUE) + Goto(0) + EndIf + Set(LV_ShouldBurrow, TRUE) + Else + Label(0) + Call(GetNpcPos, NPC_MontyMole_04, LVar0, LVar1, LVar2) + Call(IsPlayerWithin, LVar0, LVar2, MV_NextBurrowTriggerRadius, LV_ShouldBurrow) + EndIf + Call(GetPartnerInUse, LVar9) + IfEq(LVar9, PARTNER_BOW) + Set(LV_ShouldBurrow, FALSE) + EndIf + IfEq(MV_PauseBurrowing, TRUE) + Set(LV_ShouldBurrow, FALSE) + EndIf + IfEq(LV_ShouldBurrow, TRUE) + IfEq(AF_FLO_IsUnderground_Mole_04, FALSE) + Call(SetNpcFlagBits, NPC_MontyMole_04, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Call(NpcFacePlayer, NPC_MontyMole_04, 1) + Wait(1) + Set(AF_FLO_IsUnderground_Mole_04, TRUE) + IfNe(MV_NextBurrowTime_Mole_04, 0) + IfLt(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + Set(LVar1, 4) + Else + Set(LVar1, 10) + EndIf + Call(PlaySoundAtNpc, NPC_MontyMole_04, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_MontyMole_04, EMOTE_EXCLAMATION, 0, LVar1, EMOTER_NPC, 0, 0, 0, 0) + Wait(LVar1) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 1) + EndIf + Call(PlaySoundAtNpc, NPC_MontyMole_04, SOUND_BURROW_DIG, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim11) + Wait(20) + IfEq(GF_FLO03_Defeated_MontyMoleD, FALSE) + Call(SetNpcPos, NPC_MontyMole_04, 0, -50, 0) + EndIf + Wait(45) + EndIf + Else + IfEq(AF_FLO_IsUnderground_Mole_04, TRUE) + IfEq(GF_FLO03_Defeated_MontyMoleD, FALSE) + Call(RandInt, ARRAY_COUNT(N(BurrowLocations_Mole_04)) - 1, LVar0) + Add(LVar0, 1) + UseBuf(Ref(N(BurrowLocations_Mole_04))) + Loop(LVar0) + BufRead3(LVar1, LVar2, LVar3) + EndLoop + Call(SetNpcPos, NPC_MontyMole_04, LVar1, LVar2, LVar3) + EndIf + Call(SetNpcFlagBits, NPC_MontyMole_04, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Set(AF_FLO_IsUnderground_Mole_04, FALSE) + Call(NpcFacePlayer, NPC_MontyMole_04, 1) + Wait(1) + Call(PlaySoundAtNpc, NPC_MontyMole_04, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim10) + Wait(10) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 0) + Call(RandInt, 45, LVar0) + Add(LVar0, 45) + Set(MV_NextBurrowTime_Mole_04, LVar0) + Else + IfGt(MV_NextBurrowTime_Mole_04, 0) + Sub(MV_NextBurrowTime_Mole_04, 1) + EndIf + EndIf + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcInit_MontyMole_01) = { - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_MontyMole))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_MontyMole))) - EVT_CALL(EnableNpcShadow, NPC_MontyMole_01, FALSE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_01))) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim10) - EVT_CASE_EQ(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleA, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_01))) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim10) - EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_01, ENEMY_FLAG_PASSIVE, 0) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_MontyMole_01, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetNpcPos, NPC_MontyMole_01, NPC_DISPOSE_LOCATION) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_MontyMole))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_MontyMole))) + Call(EnableNpcShadow, NPC_MontyMole_01, FALSE) + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_MontyMole_01))) + Call(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim10) + CaseEq(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + IfEq(GF_FLO03_Defeated_MontyMoleA, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_MontyMole_01))) + Call(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim10) + Call(SetEnemyFlagBits, NPC_MontyMole_01, ENEMY_FLAG_PASSIVE, 0) + Else + Call(SetNpcPos, NPC_MontyMole_01, NPC_DISPOSE_LOCATION) + EndIf + CaseDefault + Call(SetNpcPos, NPC_MontyMole_01, NPC_DISPOSE_LOCATION) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_MontyMole_02) = { - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_MontyMole))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_MontyMole))) - EVT_CALL(EnableNpcShadow, NPC_MontyMole_02, FALSE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_02))) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim10) - EVT_CASE_EQ(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleB, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_02))) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim10) - EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_02, ENEMY_FLAG_PASSIVE, 0) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_MontyMole_02, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetNpcPos, NPC_MontyMole_02, NPC_DISPOSE_LOCATION) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_MontyMole))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_MontyMole))) + Call(EnableNpcShadow, NPC_MontyMole_02, FALSE) + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_MontyMole_02))) + Call(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim10) + CaseEq(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + IfEq(GF_FLO03_Defeated_MontyMoleB, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_MontyMole_02))) + Call(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim10) + Call(SetEnemyFlagBits, NPC_MontyMole_02, ENEMY_FLAG_PASSIVE, 0) + Else + Call(SetNpcPos, NPC_MontyMole_02, NPC_DISPOSE_LOCATION) + EndIf + CaseDefault + Call(SetNpcPos, NPC_MontyMole_02, NPC_DISPOSE_LOCATION) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_MontyMole_03) = { - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_MontyMole))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_MontyMole))) - EVT_CALL(EnableNpcShadow, NPC_MontyMole_03, FALSE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_03))) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim10) - EVT_CASE_EQ(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleC, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_03))) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim10) - EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_03, ENEMY_FLAG_PASSIVE, 0) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_MontyMole_03, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetNpcPos, NPC_MontyMole_03, NPC_DISPOSE_LOCATION) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_MontyMole))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_MontyMole))) + Call(EnableNpcShadow, NPC_MontyMole_03, FALSE) + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_MontyMole_03))) + Call(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim10) + CaseEq(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + IfEq(GF_FLO03_Defeated_MontyMoleC, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_MontyMole_03))) + Call(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim10) + Call(SetEnemyFlagBits, NPC_MontyMole_03, ENEMY_FLAG_PASSIVE, 0) + Else + Call(SetNpcPos, NPC_MontyMole_03, NPC_DISPOSE_LOCATION) + EndIf + CaseDefault + Call(SetNpcPos, NPC_MontyMole_03, NPC_DISPOSE_LOCATION) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_MontyMole_04) = { - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_MontyMole))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_MontyMole))) - EVT_CALL(EnableNpcShadow, NPC_MontyMole_04, FALSE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_04))) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim10) - EVT_CASE_EQ(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleD, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_04))) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim10) - EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_04, ENEMY_FLAG_PASSIVE, 0) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_MontyMole_04, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetNpcPos, NPC_MontyMole_04, NPC_DISPOSE_LOCATION) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_MontyMole))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_MontyMole))) + Call(EnableNpcShadow, NPC_MontyMole_04, FALSE) + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_MontyMole_04))) + Call(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim10) + CaseEq(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + IfEq(GF_FLO03_Defeated_MontyMoleD, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_MontyMole_04))) + Call(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim10) + Call(SetEnemyFlagBits, NPC_MontyMole_04, ENEMY_FLAG_PASSIVE, 0) + Else + Call(SetNpcPos, NPC_MontyMole_04, NPC_DISPOSE_LOCATION) + EndIf + CaseDefault + Call(SetNpcPos, NPC_MontyMole_04, NPC_DISPOSE_LOCATION) + EndSwitch + Return + End }; NpcData N(NpcData_Petunia) = { diff --git a/src/world/area_flo/flo_03/flo_03_4_foliage.c b/src/world/area_flo/flo_03/flo_03_4_foliage.c index 09bae8673f3..0a707f59a36 100644 --- a/src/world/area_flo/flo_03/flo_03_4_foliage.c +++ b/src/world/area_flo/flo_03/flo_03_4_foliage.c @@ -35,11 +35,11 @@ BombTrigger N(BombPos_Tree1) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(AF_FLO_TreeDrop_RedBerry1, FALSE) - EVT_SET(AF_FLO_TreeDrop_RedBerry2, FALSE) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o242, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_RETURN - EVT_END + Set(AF_FLO_TreeDrop_RedBerry1, FALSE) + Set(AF_FLO_TreeDrop_RedBerry2, FALSE) + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o242, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Return + End }; diff --git a/src/world/area_flo/flo_03/flo_03_5_entity.c b/src/world/area_flo/flo_03/flo_03_5_entity.c index 3afdd35e570..d9c6511a832 100644 --- a/src/world/area_flo/flo_03/flo_03_5_entity.c +++ b/src/world/area_flo/flo_03/flo_03_5_entity.c @@ -2,13 +2,13 @@ #include "entity.h" EvtScript N(EVS_EmptyEntityHandler) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), -175, 0, 150, 0, MODEL_o56, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_FLO03_HiddenPanel) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HiddenPanel), -175, 0, 150, 0, MODEL_o56, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_FLO03_HiddenPanel) + Return + End }; diff --git a/src/world/area_flo/flo_07/flo_07_1_music.c b/src/world/area_flo/flo_07/flo_07_1_music.c index 0bf6139960d..c0e51e32bfb 100644 --- a/src/world/area_flo/flo_07/flo_07_1_music.c +++ b/src/world/area_flo/flo_07/flo_07_1_music.c @@ -1,32 +1,32 @@ #include "flo_07.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, flo_07_ENTRY_1) - EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) - EVT_ELSE - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(PlaySound, SOUND_LOOP_FLO_WATER_FLOW_1) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, flo_07_ENTRY_1) + Call(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) + Else + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndSwitch + EndIf + Call(PlaySound, SOUND_LOOP_FLO_WATER_FLOW_1) + Return + End }; EvtScript N(EVS_PushFlowerSong) = { - EVT_CALL(PushSong, SONG_FLOWER_NPC_THEME, 1) - EVT_RETURN - EVT_END + Call(PushSong, SONG_FLOWER_NPC_THEME, 1) + Return + End }; EvtScript N(EVS_PopSong) = { - EVT_CALL(FadeOutMusic, 0, 250) - EVT_WAIT(10) - EVT_CALL(PopSong) - EVT_RETURN - EVT_END + Call(FadeOutMusic, 0, 250) + Wait(10) + Call(PopSong) + Return + End }; diff --git a/src/world/area_flo/flo_07/flo_07_2_main.c b/src/world/area_flo/flo_07/flo_07_2_main.c index 977cf1badfc..f2ae0c9220b 100644 --- a/src/world/area_flo/flo_07/flo_07_2_main.c +++ b/src/world/area_flo/flo_07/flo_07_2_main.c @@ -9,9 +9,9 @@ EvtScript N(EVS_ExitWalk_flo_25_1) = EVT_EXIT_WALK(60, flo_07_ENTRY_0, "flo_25", flo_25_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_25_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_25_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; API_CALLABLE(N(CreateCrystalTreeSparkles)) { @@ -27,50 +27,50 @@ API_CALLABLE(N(CreateCrystalTreeSparkles)) { } EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_SET(AF_FLO_MadeCrystalBerry, FALSE) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_SetupFoliage)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o76, SURFACE_TYPE_FLOWERS) + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + Set(AF_FLO_MadeCrystalBerry, FALSE) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_SetupFoliage)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o76, SURFACE_TYPE_FLOWERS) EVT_FLOWER_SPAWN_REGION( 297, -95, 383, -65, 0 ) EVT_FLOWER_SPAWN_REGION( 293, 71, 378, 113, 0 ) EVT_FLOWER_SPAWN_REGION( 21, -346, 147, -242, 20 ) EVT_FLOWER_SPAWN_REGION( -350, -190, -81, -106, 0 ) EVT_FLOWER_SPAWN_REGION( -380, 85, -95, 150, 0 ) - EVT_CALL(EnableTexPanning, MODEL_o51, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o36, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o37, TRUE) - EVT_THREAD + Call(EnableTexPanning, MODEL_o51, TRUE) + Call(EnableTexPanning, MODEL_o36, TRUE) + Call(EnableTexPanning, MODEL_o37, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( -100, 100, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_3) TEX_PAN_PARAMS_STEP( 0,-1200, 0, 0) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, flo_07_ENTRY_1) - EVT_EXEC(N(EVS_Scene_SunReturns)) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC(N(EVS_TryKickingPlayerOut)) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_CALL(N(CreateCrystalTreeSparkles)) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(GetEntryID, LVar0) + IfEq(LVar0, flo_07_ENTRY_1) + Exec(N(EVS_Scene_SunReturns)) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Exec(N(EVS_TryKickingPlayerOut)) + EndIf + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Call(N(CreateCrystalTreeSparkles)) + Return + End }; diff --git a/src/world/area_flo/flo_07/flo_07_3_npc.c b/src/world/area_flo/flo_07/flo_07_3_npc.c index 9073de80afc..cfcb3a29951 100644 --- a/src/world/area_flo/flo_07/flo_07_3_npc.c +++ b/src/world/area_flo/flo_07/flo_07_3_npc.c @@ -7,206 +7,206 @@ #include "world/common/complete/GiveReward.inc.c" EvtScript N(EVS_Scene_SunReturns) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(GetNpcPos, NPC_Posie, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(11.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_00C5) - EVT_WAIT(10) - EVT_CALL(GotoMap, EVT_PTR("flo_10"), flo_10_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(GetNpcPos, NPC_Posie, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, Float(11.0), Float(-11.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20) + Call(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_00C5) + Wait(10) + Call(GotoMap, Ref("flo_10"), flo_10_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ShakeGround) = { - EVT_LABEL(0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 1, EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(ShakeCam, CAM_DEFAULT, 0, 1, Float(1.0)) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_MakeCrystalBerry) = { - EVT_IF_EQ(AF_FLO_MadeCrystalBerry, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0068) - EVT_THREAD - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.0), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.5 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_CALL(PlaySound, SOUND_LOOP_RUMBLE) - EVT_EXEC_GET_TID(N(EVS_ShakeGround), MV_GroundShakingScript) - EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Strain, ANIM_Posie_Strain, 0, MSG_CH6_0069) - EVT_KILL_THREAD(MV_GroundShakingScript) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.0), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(8.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, LVar2) - EVT_IF_LT(LVar0, -250) - EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -225, 100, -25, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_FLO07_Item_CrystalBerry) - EVT_ELSE - EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -265, 100, 54, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_FLO07_Item_CrystalBerry) - EVT_SET(GF_FLO07_CrystalBerryFellOnLeftSide, TRUE) - EVT_END_IF - EVT_CALL(PlaySound, SOUND_LRAW_RUMBLE | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_CALL(StopTrackingSoundPos, SOUND_LRAW_RUMBLE) - EVT_SET(AF_FLO_MadeCrystalBerry, TRUE) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_006A) - EVT_SET(GB_StoryProgress, STORY_CH6_GOT_CRYSTAL_BERRY) - EVT_RETURN - EVT_END + IfEq(AF_FLO_MadeCrystalBerry, TRUE) + Return + EndIf + Call(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0068) + Thread + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, Float(18.0), Float(-7.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.5 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Call(PlaySound, SOUND_LOOP_RUMBLE) + ExecGetTID(N(EVS_ShakeGround), MV_GroundShakingScript) + Call(SpeakToPlayer, NPC_Posie, ANIM_Posie_Strain, ANIM_Posie_Strain, 0, MSG_CH6_0069) + KillThread(MV_GroundShakingScript) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(SetCamPitch, CAM_DEFAULT, Float(18.0), Float(-7.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(8.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar0, LVar2) + IfLt(LVar0, -250) + Call(MakeItemEntity, ITEM_CRYSTAL_BERRY, -225, 100, -25, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_FLO07_Item_CrystalBerry) + Else + Call(MakeItemEntity, ITEM_CRYSTAL_BERRY, -265, 100, 54, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_FLO07_Item_CrystalBerry) + Set(GF_FLO07_CrystalBerryFellOnLeftSide, TRUE) + EndIf + Call(PlaySound, SOUND_LRAW_RUMBLE | SOUND_ID_TRIGGER_CHANGE_SOUND) + Call(StopTrackingSoundPos, SOUND_LRAW_RUMBLE) + Set(AF_FLO_MadeCrystalBerry, TRUE) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_006A) + Set(GB_StoryProgress, STORY_CH6_GOT_CRYSTAL_BERRY) + Return + End }; EvtScript N(EVS_NpcInteract_Posie) = { - EVT_EXEC_WAIT(N(EVS_PushFlowerSong)) - EVT_CALL(NpcFacePlayer, NPC_SELF, 1) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN) - EVT_IF_EQ(AF_FLO_PoiseHintDialogue, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0070) - EVT_SET(AF_FLO_PoiseHintDialogue, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0071) - EVT_END_IF - EVT_CASE_LT(STORY_CH6_GOT_FERTILE_SOIL) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4.0 / DT), 0, EVT_FLOAT(350.0), EVT_FLOAT(18.0), EVT_FLOAT(-7.5)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0065) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Posie_GiveItem) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Posie_Still) + ExecWait(N(EVS_PushFlowerSong)) + Call(NpcFacePlayer, NPC_SELF, 1) + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_GOT_MAGICAL_BEAN) + IfEq(AF_FLO_PoiseHintDialogue, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0070) + Set(AF_FLO_PoiseHintDialogue, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0071) + EndIf + CaseLt(STORY_CH6_GOT_FERTILE_SOIL) + Call(AdjustCam, CAM_DEFAULT, Float(4.0 / DT), 0, Float(350.0), Float(18.0), Float(-7.5)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0065) + Call(SetNpcAnimation, NPC_SELF, ANIM_Posie_GiveItem) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_Posie_Still) EVT_GIVE_KEY_REWARD(ITEM_FERTILE_SOIL) - EVT_SET(GB_StoryProgress, STORY_CH6_GOT_FERTILE_SOIL) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0066) - EVT_IF_EQ(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE) - EVT_EXEC_WAIT(N(EVS_MakeCrystalBerry)) - EVT_END_IF - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CASE_LT(STORY_CH6_GOT_CRYSTAL_BERRY) - EVT_IF_EQ(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE) - EVT_IF_EQ(AF_FLO_MadeCrystalBerry, FALSE) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4.0), 0, EVT_FLOAT(350.0), EVT_FLOAT(18.0), EVT_FLOAT(-7.5)) - EVT_EXEC_WAIT(N(EVS_MakeCrystalBerry)) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0072) - EVT_END_IF - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0072) - EVT_END_IF - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_IF_EQ(GF_FLO07_Item_CrystalBerry, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0072) - EVT_ELSE - EVT_IF_LT(GB_StoryProgress, STORY_CH6_GOT_WATER_STONE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0073) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0074) - EVT_END_IF - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0075) - EVT_END_IF - EVT_CASE_LT(STORY_CH6_RETURNED_TO_TOAD_TOWN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0076) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0077) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_PopSong)) - EVT_RETURN - EVT_END + Set(GB_StoryProgress, STORY_CH6_GOT_FERTILE_SOIL) + Call(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0066) + IfEq(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE) + ExecWait(N(EVS_MakeCrystalBerry)) + EndIf + Call(ResetCam, CAM_DEFAULT, Float(4.0 / DT)) + CaseLt(STORY_CH6_GOT_CRYSTAL_BERRY) + IfEq(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE) + IfEq(AF_FLO_MadeCrystalBerry, FALSE) + Call(AdjustCam, CAM_DEFAULT, Float(4.0), 0, Float(350.0), Float(18.0), Float(-7.5)) + ExecWait(N(EVS_MakeCrystalBerry)) + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0072) + EndIf + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0072) + EndIf + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + IfEq(GF_FLO07_Item_CrystalBerry, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0072) + Else + IfLt(GB_StoryProgress, STORY_CH6_GOT_WATER_STONE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0073) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0074) + EndIf + Call(ContinueSpeech, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0075) + EndIf + CaseLt(STORY_CH6_RETURNED_TO_TOAD_TOWN) + Call(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0076) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0077) + EndSwitch + ExecWait(N(EVS_PopSong)) + Return + End }; EvtScript N(EVS_NpcInit_Posie) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH6_GOT_CRYSTAL_BERRY) - EVT_IF_EQ(GF_FLO07_Item_CrystalBerry, FALSE) - EVT_IF_EQ(GF_FLO07_CrystalBerryFellOnLeftSide, FALSE) - EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -225, 0, -25, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO07_Item_CrystalBerry) - EVT_ELSE - EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -265, 0, 54, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO07_Item_CrystalBerry) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_SET(AF_FLO_PoiseHintDialogue, FALSE) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Posie))) - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH6_GOT_CRYSTAL_BERRY) + IfEq(GF_FLO07_Item_CrystalBerry, FALSE) + IfEq(GF_FLO07_CrystalBerryFellOnLeftSide, FALSE) + Call(MakeItemEntity, ITEM_CRYSTAL_BERRY, -225, 0, -25, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO07_Item_CrystalBerry) + Else + Call(MakeItemEntity, ITEM_CRYSTAL_BERRY, -265, 0, 54, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO07_Item_CrystalBerry) + EndIf + EndIf + EndIf + Set(AF_FLO_PoiseHintDialogue, FALSE) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Posie))) + Return + End }; EvtScript N(EVS_TryKickingPlayerOut) = { - EVT_IF_NE(AB_FLO_PoiseKickedOutCount, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(10) - EVT_IF_LT(AB_FLO_PoiseKickedOutCount, 5) - EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_006E) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_CALL(PlayerMoveTo, 410, LVar3, 10) - EVT_ADD(AB_FLO_PoiseKickedOutCount, 1) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_006F) - EVT_SET(AB_FLO_PoiseKickedOutCount, 0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END + IfNe(AB_FLO_PoiseKickedOutCount, 0) + Call(DisablePlayerInput, TRUE) + Wait(10) + IfLt(AB_FLO_PoiseKickedOutCount, 5) + Call(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_006E) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + Call(PlayerMoveTo, 410, LVar3, 10) + Add(AB_FLO_PoiseKickedOutCount, 1) + Else + Call(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_006F) + Set(AB_FLO_PoiseKickedOutCount, 0) + EndIf + Call(DisablePlayerInput, FALSE) + EndIf + Return + End }; EvtScript N(EVS_OnHit_CrystalTree) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_LT(GB_StoryProgress, STORY_CH6_GOT_CRYSTAL_BERRY) - EVT_CALL(NpcFacePlayer, NPC_Posie, 1) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Confused, ANIM_Posie_Idle, 0, MSG_CH6_0067) - EVT_IF_EQ(GB_StoryProgress, STORY_CH6_GOT_FERTILE_SOIL) - EVT_IF_EQ(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -250, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -250, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_EXEC_WAIT(N(EVS_MakeCrystalBerry)) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_END_IF - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(GF_FLO07_Item_CrystalBerry, FALSE) - EVT_CALL(NpcFacePlayer, NPC_Posie, 1) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Confused, ANIM_Posie_Idle, 0, MSG_CH6_0067) - EVT_ELSE - EVT_ADD(AB_FLO_CrystalTreeHitCount, 1) - EVT_SWITCH(AB_FLO_CrystalTreeHitCount) - EVT_CASE_LT(2) - EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_TalkAngry, ANIM_Posie_Idle, 0, MSG_CH6_006B) - EVT_CASE_LT(5) - EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_TalkAngry, ANIM_Posie_Idle, 0, MSG_CH6_006C) - EVT_CASE_GE(5) - EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_TalkAngry, ANIM_Posie_Idle, 0, MSG_CH6_006D) - EVT_SET(AB_FLO_PoiseKickedOutCount, 1) - EVT_CALL(GotoMap, EVT_PTR("flo_25"), flo_25_ENTRY_1) - EVT_WAIT(100) - EVT_END_SWITCH - EVT_END_IF - EVT_END_IF - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + IfLt(GB_StoryProgress, STORY_CH6_GOT_CRYSTAL_BERRY) + Call(NpcFacePlayer, NPC_Posie, 1) + Wait(10) + Call(SpeakToPlayer, NPC_Posie, ANIM_Posie_Confused, ANIM_Posie_Idle, 0, MSG_CH6_0067) + IfEq(GB_StoryProgress, STORY_CH6_GOT_FERTILE_SOIL) + IfEq(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, -250, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, -250, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + ExecWait(N(EVS_MakeCrystalBerry)) + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + EndIf + EndIf + Else + IfEq(GF_FLO07_Item_CrystalBerry, FALSE) + Call(NpcFacePlayer, NPC_Posie, 1) + Wait(10) + Call(SpeakToPlayer, NPC_Posie, ANIM_Posie_Confused, ANIM_Posie_Idle, 0, MSG_CH6_0067) + Else + Add(AB_FLO_CrystalTreeHitCount, 1) + Switch(AB_FLO_CrystalTreeHitCount) + CaseLt(2) + Call(SpeakToPlayer, NPC_Posie, ANIM_Posie_TalkAngry, ANIM_Posie_Idle, 0, MSG_CH6_006B) + CaseLt(5) + Call(SpeakToPlayer, NPC_Posie, ANIM_Posie_TalkAngry, ANIM_Posie_Idle, 0, MSG_CH6_006C) + CaseGe(5) + Call(SpeakToPlayer, NPC_Posie, ANIM_Posie_TalkAngry, ANIM_Posie_Idle, 0, MSG_CH6_006D) + Set(AB_FLO_PoiseKickedOutCount, 1) + Call(GotoMap, Ref("flo_25"), flo_25_ENTRY_1) + Wait(100) + EndSwitch + EndIf + EndIf + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + Call(DisablePlayerInput, FALSE) + Return + End }; FoliageModelList N(CrystalTree_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o6, MODEL_o7, MODEL_o8); @@ -224,11 +224,11 @@ BombTrigger N(BombPos_CrystalTree) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_CrystalTree))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o5, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_CrystalTree)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_CrystalTree))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o5, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_CrystalTree)), 1, 0) + Return + End }; NpcData N(NpcData_Posie) = { diff --git a/src/world/area_flo/flo_08/flo_08_1_music.c b/src/world/area_flo/flo_08/flo_08_1_music.c index 7c2bbc4f0f5..2611463150b 100644 --- a/src/world/area_flo/flo_08/flo_08_1_music.c +++ b/src/world/area_flo/flo_08/flo_08_1_music.c @@ -1,12 +1,12 @@ #include "flo_08.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_flo/flo_08/flo_08_2_entity.c b/src/world/area_flo/flo_08/flo_08_2_entity.c index 9504762b66a..10353001c00 100644 --- a/src/world/area_flo/flo_08/flo_08_2_entity.c +++ b/src/world/area_flo/flo_08/flo_08_2_entity.c @@ -7,7 +7,7 @@ EvtScript N(EVS_MakeEntities) = { EVT_MAKE_SUPER_BLOCK(-780, 120, -110, 0) - EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 510, 0, -90, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO08_Item_StarPiece) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_STAR_PIECE, 510, 0, -90, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO08_Item_StarPiece) + Return + End }; diff --git a/src/world/area_flo/flo_08/flo_08_3_main.c b/src/world/area_flo/flo_08/flo_08_3_main.c index 395f7022945..101c2d7fc02 100644 --- a/src/world/area_flo/flo_08/flo_08_3_main.c +++ b/src/world/area_flo/flo_08/flo_08_3_main.c @@ -12,10 +12,10 @@ EvtScript N(EVS_ExitWalk_flo_00_6) = EVT_EXIT_WALK(60, flo_08_ENTRY_0, "flo_00", EvtScript N(EVS_ExitWalk_flo_24_0) = EVT_EXIT_WALK(60, flo_08_ENTRY_1, "flo_24", flo_24_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_00_6)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_24_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_00_6)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_flo_24_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -26,58 +26,58 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupVines)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o114, SURFACE_TYPE_SPIKES) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_o25, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o27, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o31, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o33, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o35, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o37, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o55, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o28, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o32, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o34, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o36, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o38, TRUE) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LABEL(0) - EVT_ADD(LVar0, 140) - EVT_IF_GT(LVar0, 0x10000) - EVT_ADD(LVar0, -0x10000) - EVT_END_IF - EVT_CALL(SetTexPanOffset, 1, 0, LVar0, 0) - EVT_ADD(LVar1, -200) - EVT_IF_LT(LVar1, 0) - EVT_ADD(LVar1, 0x10000) - EVT_END_IF - EVT_CALL(SetTexPanOffset, 2, 0, LVar1, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_THREAD - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o129, SURFACE_TYPE_FLOWERS) + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupVines)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o114, SURFACE_TYPE_SPIKES) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + Call(EnableTexPanning, MODEL_o25, TRUE) + Call(EnableTexPanning, MODEL_o27, TRUE) + Call(EnableTexPanning, MODEL_o31, TRUE) + Call(EnableTexPanning, MODEL_o33, TRUE) + Call(EnableTexPanning, MODEL_o35, TRUE) + Call(EnableTexPanning, MODEL_o37, TRUE) + Call(EnableTexPanning, MODEL_o55, TRUE) + Call(EnableTexPanning, MODEL_o28, TRUE) + Call(EnableTexPanning, MODEL_o32, TRUE) + Call(EnableTexPanning, MODEL_o34, TRUE) + Call(EnableTexPanning, MODEL_o36, TRUE) + Call(EnableTexPanning, MODEL_o38, TRUE) + Thread + Set(LVar0, 0) + Set(LVar1, 0) + Label(0) + Add(LVar0, 140) + IfGt(LVar0, 0x10000) + Add(LVar0, -0x10000) + EndIf + Call(SetTexPanOffset, 1, 0, LVar0, 0) + Add(LVar1, -200) + IfLt(LVar1, 0) + Add(LVar1, 0x10000) + EndIf + Call(SetTexPanOffset, 2, 0, LVar1, 0) + Wait(1) + Goto(0) + EndThread + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o129, SURFACE_TYPE_FLOWERS) EVT_FLOWER_SPAWN_REGION(140, -137, 340, -60, 0) EVT_FLOWER_SPAWN_REGION(450, -137, 590, -60, 0) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_RETURN - EVT_END + Exec(N(EVS_SetupFoliage)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Return + End }; diff --git a/src/world/area_flo/flo_08/flo_08_4_npc.c b/src/world/area_flo/flo_08/flo_08_4_npc.c index 15a9ccc065c..2c740151b9b 100644 --- a/src/world/area_flo/flo_08/flo_08_4_npc.c +++ b/src/world/area_flo/flo_08/flo_08_4_npc.c @@ -11,151 +11,151 @@ BSS s32 N(FlowerGuard_ItemChoiceList)[ITEM_NUM_CONSUMABLES + 1]; #include "../common/ItemChoice_FlowerGuard.inc.c" EvtScript N(EVS_NpcInteract_GateFlower) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_EQ(GF_FLO08_GaveYellowBerry, FALSE) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.5), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Talk, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0042) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Thinking) - EVT_CALL(N(FlowerGuard_MakeItemList)) + Call(DisablePlayerInput, TRUE) + IfEq(GF_FLO08_GaveYellowBerry, FALSE) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(SetCamPitch, CAM_DEFAULT, Float(18.5), Float(-7.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Talk, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0042) + Call(SetPlayerAnimation, ANIM_Mario1_Thinking) + Call(N(FlowerGuard_MakeItemList)) EVT_CHOOSE_CONSUMABLE_FROM(N(FlowerGuard_ItemChoiceList), 0) - EVT_SWITCH(LVar0) - EVT_CASE_LE(0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Still) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Talk, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0043) - EVT_CASE_DEFAULT - EVT_SET(LVar8, LVar0) - EVT_CALL(N(FlowerGuard_JudgeItemTastiness), LVar0) - EVT_CALL(MakeItemEntity, LVar8, -695, 20, -29, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVar7, LVar0) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_EAT_OR_DRINK, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Eat) - EVT_WAIT(20 * DT) - EVT_CALL(RemoveItemEntity, LVar7) - EVT_SWITCH(LVar8) - EVT_CASE_EQ(160) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Chew, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0046) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_APPROVE, SOUND_SPACE_DEFAULT) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_GateFlower_Yellow_HappyTalk, ANIM_GateFlower_Yellow_HappyIdle, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_OpenGate) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o96, SOUND_METAL_GATE_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o96, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(MakeLerp, 0, 100, 30, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar8, LVar0) - EVT_SETF(LVar9, LVar0) - EVT_MULF(LVar8, EVT_FLOAT(0.5)) - EVT_MULF(LVar9, EVT_FLOAT(1.2)) - EVT_CALL(RotateModel, MODEL_o69, LVar8, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o70, LVar8, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o71, LVar8, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o148, LVar9, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o149, LVar9, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o150, LVar9, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_HappyDance) - EVT_SET(GF_FLO08_GaveYellowBerry, TRUE) - EVT_CASE_EQ(159) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Chew, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0045) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Idle) - EVT_CASE_EQ(158) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Chew, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0045) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Idle) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Chew, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0044) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Disgust) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SPIT_OUT, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeItemEntity, LVar8, 125, 20, 0, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVar7, LVar0) - EVT_WAIT(5 * DT) - EVT_CALL(GetAngleToPlayer, NPC_SELF, LVar0) - EVT_IF_LT(LVar0, 180) - EVT_CALL(MakeLerp, 0, 100, 7, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, EVT_FLOAT(-0.5)) - EVT_SETF(LVar3, EVT_FLOAT(-0.2)) - EVT_SETF(LVar4, EVT_FLOAT(0.9)) - EVT_MULF(LVar2, LVar0) - EVT_MULF(LVar3, LVar0) - EVT_MULF(LVar4, LVar0) - EVT_ADDF(LVar2, EVT_FLOAT(-700.0)) - EVT_ADDF(LVar3, EVT_FLOAT(15.0)) - EVT_ADDF(LVar4, EVT_FLOAT(-25.0)) - EVT_CALL(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_ELSE - EVT_CALL(MakeLerp, 0, 100, 7, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, EVT_FLOAT(0.5)) - EVT_SETF(LVar3, EVT_FLOAT(-0.2)) - EVT_SETF(LVar4, EVT_FLOAT(0.9)) - EVT_MULF(LVar2, LVar0) - EVT_MULF(LVar3, LVar0) - EVT_MULF(LVar4, LVar0) - EVT_ADDF(LVar2, EVT_FLOAT(-690.0)) - EVT_ADDF(LVar3, EVT_FLOAT(15.0)) - EVT_ADDF(LVar4, EVT_FLOAT(-25.0)) - EVT_CALL(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Idle) - EVT_CALL(RemoveItemEntity, LVar7) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Idle) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_GateFlower_Yellow_Talk, ANIM_GateFlower_Yellow_Idle, 0) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_THREAD - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(6.0 / DT)) - EVT_END_THREAD - EVT_WAIT(10 * DT) - EVT_ELSE - EVT_IF_LT(GB_StoryProgress, STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_HappyTalk, ANIM_GateFlower_Yellow_HappyIdle, 0, MSG_CH6_0047) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_HappyTalk, ANIM_GateFlower_Yellow_HappyIdle, 0, MSG_CH6_0048) - EVT_END_IF - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END + Switch(LVar0) + CaseLe(0) + Call(SetPlayerAnimation, ANIM_Mario1_Still) + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Talk, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0043) + CaseDefault + Set(LVar8, LVar0) + Call(N(FlowerGuard_JudgeItemTastiness), LVar0) + Call(MakeItemEntity, LVar8, -695, 20, -29, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVar7, LVar0) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_EAT_OR_DRINK, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Eat) + Wait(20 * DT) + Call(RemoveItemEntity, LVar7) + Switch(LVar8) + CaseEq(160) + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Chew, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0046) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_APPROVE, SOUND_SPACE_DEFAULT) + Call(EndSpeech, NPC_SELF, ANIM_GateFlower_Yellow_HappyTalk, ANIM_GateFlower_Yellow_HappyIdle, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_OpenGate) + Call(PlaySoundAtCollider, COLLIDER_o96, SOUND_METAL_GATE_OPEN, SOUND_SPACE_DEFAULT) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o96, COLLIDER_FLAGS_UPPER_MASK) + Call(MakeLerp, 0, 100, 30, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + SetF(LVar8, LVar0) + SetF(LVar9, LVar0) + MulF(LVar8, Float(0.5)) + MulF(LVar9, Float(1.2)) + Call(RotateModel, MODEL_o69, LVar8, 0, 1, 0) + Call(RotateModel, MODEL_o70, LVar8, 0, 1, 0) + Call(RotateModel, MODEL_o71, LVar8, 0, 1, 0) + Call(RotateModel, MODEL_o148, LVar9, 0, -1, 0) + Call(RotateModel, MODEL_o149, LVar9, 0, -1, 0) + Call(RotateModel, MODEL_o150, LVar9, 0, -1, 0) + Wait(1) + IfNe(LVar1, 1) + BreakLoop + EndIf + EndLoop + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_HappyDance) + Set(GF_FLO08_GaveYellowBerry, TRUE) + CaseEq(159) + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Chew, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0045) + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Idle) + CaseEq(158) + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Chew, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0045) + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Idle) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Chew, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0044) + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Disgust) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SPIT_OUT, SOUND_SPACE_DEFAULT) + Call(MakeItemEntity, LVar8, 125, 20, 0, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVar7, LVar0) + Wait(5 * DT) + Call(GetAngleToPlayer, NPC_SELF, LVar0) + IfLt(LVar0, 180) + Call(MakeLerp, 0, 100, 7, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, Float(-0.5)) + SetF(LVar3, Float(-0.2)) + SetF(LVar4, Float(0.9)) + MulF(LVar2, LVar0) + MulF(LVar3, LVar0) + MulF(LVar4, LVar0) + AddF(LVar2, Float(-700.0)) + AddF(LVar3, Float(15.0)) + AddF(LVar4, Float(-25.0)) + Call(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Else + Call(MakeLerp, 0, 100, 7, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, Float(0.5)) + SetF(LVar3, Float(-0.2)) + SetF(LVar4, Float(0.9)) + MulF(LVar2, LVar0) + MulF(LVar3, LVar0) + MulF(LVar4, LVar0) + AddF(LVar2, Float(-690.0)) + AddF(LVar3, Float(15.0)) + AddF(LVar4, Float(-25.0)) + Call(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Idle) + Call(RemoveItemEntity, LVar7) + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Idle) + Call(EndSpeech, NPC_SELF, ANIM_GateFlower_Yellow_Talk, ANIM_GateFlower_Yellow_Idle, 0) + EndSwitch + EndSwitch + Thread + Call(ResetCam, CAM_DEFAULT, Float(6.0 / DT)) + EndThread + Wait(10 * DT) + Else + IfLt(GB_StoryProgress, STORY_CH6_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_HappyTalk, ANIM_GateFlower_Yellow_HappyIdle, 0, MSG_CH6_0047) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_HappyTalk, ANIM_GateFlower_Yellow_HappyIdle, 0, MSG_CH6_0048) + EndIf + EndIf + Call(DisablePlayerInput, FALSE) + Unbind + Return + End }; EvtScript N(EVS_NpcInit_GateFlower) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_GateFlower))) - EVT_IF_EQ(GF_FLO08_GaveYellowBerry, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_HappyDance) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o96, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(RotateModel, MODEL_o69, 50, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o70, 50, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o71, 50, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o148, 120, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o149, 120, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o150, 120, 0, -1, 0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_GateFlower))) + IfEq(GF_FLO08_GaveYellowBerry, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_HappyDance) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o96, COLLIDER_FLAGS_UPPER_MASK) + Call(RotateModel, MODEL_o69, 50, 0, 1, 0) + Call(RotateModel, MODEL_o70, 50, 0, 1, 0) + Call(RotateModel, MODEL_o71, 50, 0, 1, 0) + Call(RotateModel, MODEL_o148, 120, 0, -1, 0) + Call(RotateModel, MODEL_o149, 120, 0, -1, 0) + Call(RotateModel, MODEL_o150, 120, 0, -1, 0) + EndIf + Return + End }; NpcData N(NpcData_GateFlower) = { @@ -332,24 +332,24 @@ NpcData N(NpcData_Dayzee_07) = { }; EvtScript N(EVS_NpcInit_AmazyDayzee) = { - EVT_THREAD - EVT_WAIT(2) - EVT_CALL(GetNpcPointer, NPC_Dayzee_02, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 30) - EVT_CALL(SetNpcFlagBits, NPC_Dayzee_02, NPC_FLAG_INVISIBLE | NPC_FLAG_INACTIVE, TRUE) - EVT_CALL(SetNpcPos, NPC_Dayzee_02, NPC_DISPOSE_LOCATION) - EVT_ELSE - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_INACTIVE, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + Wait(2) + Call(GetNpcPointer, NPC_Dayzee_02, LVar0) + IfEq(LVar0, 0) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + Call(RandInt, 100, LVar0) + IfLt(LVar0, 30) + Call(SetNpcFlagBits, NPC_Dayzee_02, NPC_FLAG_INVISIBLE | NPC_FLAG_INACTIVE, TRUE) + Call(SetNpcPos, NPC_Dayzee_02, NPC_DISPOSE_LOCATION) + Else + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_INACTIVE, TRUE) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + EndThread + Return + End }; NpcData N(NpcData_AmazyDayzee) = { diff --git a/src/world/area_flo/flo_08/flo_08_5_foliage.c b/src/world/area_flo/flo_08/flo_08_5_foliage.c index f9f1fafcf23..7955e91f6e0 100644 --- a/src/world/area_flo/flo_08/flo_08_5_foliage.c +++ b/src/world/area_flo/flo_08/flo_08_5_foliage.c @@ -35,11 +35,11 @@ BombTrigger N(BombPos_Tree1) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(AF_FLO_TreeDrop_BlueBerry1, FALSE) - EVT_SET(AF_FLO_TreeDrop_BlueBerry2, FALSE) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o172, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_RETURN - EVT_END + Set(AF_FLO_TreeDrop_BlueBerry1, FALSE) + Set(AF_FLO_TreeDrop_BlueBerry2, FALSE) + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o172, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Return + End }; diff --git a/src/world/area_flo/flo_08/flo_08_6_vines.c b/src/world/area_flo/flo_08/flo_08_6_vines.c index d28c804c441..4841deff9ad 100644 --- a/src/world/area_flo/flo_08/flo_08_6_vines.c +++ b/src/world/area_flo/flo_08/flo_08_6_vines.c @@ -12,6 +12,6 @@ EvtScript N(EVS_SetupVines) = { EVT_DROPPING_VINE(ITEM_NONE, MODEL_o82, MODEL_o83, MODEL_o84, MODEL_o85) EVT_DROPPING_VINE(ITEM_NONE, MODEL_o88, MODEL_o89, MODEL_o90, MODEL_o91) EVT_DROPPING_VINE(ITEM_STINKY_HERB, MODEL_o159, MODEL_o158, MODEL_o160, MODEL_o161) - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/area_flo/flo_09/flo_09_1_music.c b/src/world/area_flo/flo_09/flo_09_1_music.c index effb8d484c5..495a8fcceaf 100644 --- a/src/world/area_flo/flo_09/flo_09_1_music.c +++ b/src/world/area_flo/flo_09/flo_09_1_music.c @@ -1,12 +1,12 @@ #include "flo_09.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_flo/flo_09/flo_09_2_main.c b/src/world/area_flo/flo_09/flo_09_2_main.c index 7171df61df7..f5535706469 100644 --- a/src/world/area_flo/flo_09/flo_09_2_main.c +++ b/src/world/area_flo/flo_09/flo_09_2_main.c @@ -12,34 +12,34 @@ EvtScript N(EVS_ExitWalk_flo_00_5) = EVT_EXIT_WALK(60, flo_09_ENTRY_0, "flo_00", EvtScript N(EVS_ExitWalk_flo_03_0) = EVT_EXIT_WALK(60, flo_09_ENTRY_1, "flo_03", flo_03_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_00_5)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_00_5)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_flo_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_SetupVines)) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o104, SURFACE_TYPE_FLOWERS) + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Exec(N(EVS_SetupVines)) + Exec(N(EVS_SetupFoliage)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o104, SURFACE_TYPE_FLOWERS) EVT_FLOWER_SPAWN_REGION( -511, -4, -319, 10, 0) EVT_FLOWER_SPAWN_REGION( -302, 77, -32, 116, 0) EVT_FLOWER_SPAWN_REGION( 51, 18, 141, 127, 0) EVT_FLOWER_SPAWN_REGION( 234, 38, 502, 98, 0) EVT_FLOWER_SPAWN_REGION( -525, -163, -400, -80, 60) EVT_FLOWER_SPAWN_REGION( -346, -148, 517, -91, 60) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Return + End }; diff --git a/src/world/area_flo/flo_09/flo_09_3_vines.c b/src/world/area_flo/flo_09/flo_09_3_vines.c index 63c101a672b..a93ef36f43d 100644 --- a/src/world/area_flo/flo_09/flo_09_3_vines.c +++ b/src/world/area_flo/flo_09/flo_09_3_vines.c @@ -14,6 +14,6 @@ EvtScript N(EVS_SetupVines) = { EVT_DROPPING_VINE(ITEM_NONE, MODEL_o84, MODEL_o85, MODEL_o86, MODEL_o87) EVT_DROPPING_VINE(ITEM_NONE, MODEL_o96, MODEL_o97, MODEL_o98, MODEL_o99) EVT_DROPPING_VINE(ITEM_NONE, MODEL_o92, MODEL_o93, MODEL_o94, MODEL_o95) - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/area_flo/flo_09/flo_09_4_foliage.c b/src/world/area_flo/flo_09/flo_09_4_foliage.c index 7c8ce0c3137..24467e8022a 100644 --- a/src/world/area_flo/flo_09/flo_09_4_foliage.c +++ b/src/world/area_flo/flo_09/flo_09_4_foliage.c @@ -3,55 +3,55 @@ #include "common/foliage.inc.c" EvtScript N(EVS_SpawnBzzap) = { - EVT_CALL(GetNpcPos, NPC_Bzzap_02, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar1, 0) - EVT_CALL(GetModelCenter, LVar9) - EVT_ADD(LVar2, 35) - EVT_CALL(SetNpcPos, NPC_Bzzap_02, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_Bzzap_02, LVar0, LVar1, LVar2) + IfLt(LVar1, 0) + Call(GetModelCenter, LVar9) + Add(LVar2, 35) + Call(SetNpcPos, NPC_Bzzap_02, LVar0, LVar1, LVar2) + EndIf + Return + End }; EvtScript N(EVS_OnShakeTree1) = { - EVT_IF_EQ(GF_FLO09_Item_HappyFlowerB, FALSE) - EVT_IF_EQ(AB_FLO_TreePuzzle_SecondCorrect, 1) - EVT_CALL(MakeItemEntity, ITEM_HAPPY_FLOWER_B, -250, 100, 0, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_FLO09_Item_HappyFlowerB) - EVT_ELSE - EVT_SET(LVar9, MODEL_o10) - EVT_EXEC(N(EVS_SpawnBzzap)) - EVT_END_IF - EVT_SET(AB_FLO_TreePuzzle_FirstCorrect, 0) - EVT_SET(AB_FLO_TreePuzzle_SecondCorrect, 0) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_FLO09_Item_HappyFlowerB, FALSE) + IfEq(AB_FLO_TreePuzzle_SecondCorrect, 1) + Call(MakeItemEntity, ITEM_HAPPY_FLOWER_B, -250, 100, 0, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_FLO09_Item_HappyFlowerB) + Else + Set(LVar9, MODEL_o10) + Exec(N(EVS_SpawnBzzap)) + EndIf + Set(AB_FLO_TreePuzzle_FirstCorrect, 0) + Set(AB_FLO_TreePuzzle_SecondCorrect, 0) + EndIf + Return + End }; EvtScript N(EVS_OnShakeTree2) = { - EVT_IF_EQ(GF_FLO09_Item_HappyFlowerB, FALSE) - EVT_SET(AB_FLO_TreePuzzle_FirstCorrect, 1) - EVT_SET(AB_FLO_TreePuzzle_SecondCorrect, 0) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_FLO09_Item_HappyFlowerB, FALSE) + Set(AB_FLO_TreePuzzle_FirstCorrect, 1) + Set(AB_FLO_TreePuzzle_SecondCorrect, 0) + EndIf + Return + End }; EvtScript N(EVS_OnShakeTree3) = { - EVT_IF_EQ(GF_FLO09_Item_HappyFlowerB, FALSE) - EVT_IF_EQ(AB_FLO_TreePuzzle_FirstCorrect, 1) - EVT_IF_EQ(AB_FLO_TreePuzzle_SecondCorrect, 0) - EVT_SET(AB_FLO_TreePuzzle_SecondCorrect, 1) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_SET(LVar9, MODEL_o13) - EVT_EXEC(N(EVS_SpawnBzzap)) - EVT_SET(AB_FLO_TreePuzzle_FirstCorrect, 0) - EVT_SET(AB_FLO_TreePuzzle_SecondCorrect, 0) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_FLO09_Item_HappyFlowerB, FALSE) + IfEq(AB_FLO_TreePuzzle_FirstCorrect, 1) + IfEq(AB_FLO_TreePuzzle_SecondCorrect, 0) + Set(AB_FLO_TreePuzzle_SecondCorrect, 1) + Return + EndIf + EndIf + Set(LVar9, MODEL_o13) + Exec(N(EVS_SpawnBzzap)) + Set(AB_FLO_TreePuzzle_FirstCorrect, 0) + Set(AB_FLO_TreePuzzle_SecondCorrect, 0) + EndIf + Return + End }; FoliageModelList N(Tree1_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o11, MODEL_o12); @@ -97,17 +97,17 @@ BombTrigger N(BombPos_Tree3) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(AB_FLO_TreePuzzle_FirstCorrect, 0) - EVT_SET(AB_FLO_TreePuzzle_SecondCorrect, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o10, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o3, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o13, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree3)), 1, 0) - EVT_RETURN - EVT_END + Set(AB_FLO_TreePuzzle_FirstCorrect, 0) + Set(AB_FLO_TreePuzzle_SecondCorrect, 0) + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o10, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o3, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree3))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o13, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree3)), 1, 0) + Return + End }; diff --git a/src/world/area_flo/flo_09/flo_09_5_npc.c b/src/world/area_flo/flo_09/flo_09_5_npc.c index 5be737f1c9f..0692d7515af 100644 --- a/src/world/area_flo/flo_09/flo_09_5_npc.c +++ b/src/world/area_flo/flo_09/flo_09_5_npc.c @@ -11,51 +11,51 @@ NpcSettings N(NpcSettings_Bzzap_02) = { }; EvtScript N(EVS_NpcAI_Bzzap_02) = { - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar1, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_SELF, 0) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 50, LVar2, 15) - EVT_CALL(SetSelfVar, 0, 1) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Bzzap))) - EVT_END_IF - EVT_CASE_EQ(2) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(25) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetSelfVar, 0, LVar0) + Switch(LVar0) + CaseEq(0) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + IfGt(LVar1, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_SELF, 0) + Call(NpcJump0, NPC_SELF, LVar0, 50, LVar2, 15) + Call(SetSelfVar, 0, 1) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_Bzzap))) + EndIf + CaseEq(2) + Call(DisablePlayerInput, TRUE) + Wait(25) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) + Call(SetSelfVar, 0, 0) + Call(DisablePlayerInput, FALSE) + EndSwitch + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcDefeat_Bzzap_02) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(SetSelfVar, 0, 2) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Bzzap_02))) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(SetSelfVar, 0, 2) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_Bzzap_02))) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Bzzap_02) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Bzzap_02))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Bzzap_02))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcAI_Bzzap_02))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Bzzap_02))) + Return + End }; NpcData N(NpcData_Dayzee_01) = { diff --git a/src/world/area_flo/flo_10/flo_10_1_music.c b/src/world/area_flo/flo_10/flo_10_1_music.c index 5289a4af6f2..4760bd6a6c8 100644 --- a/src/world/area_flo/flo_10/flo_10_1_music.c +++ b/src/world/area_flo/flo_10/flo_10_1_music.c @@ -1,34 +1,34 @@ #include "flo_10.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, flo_10_ENTRY_1) - EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) - EVT_ELSE - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER) - EVT_CALL(PlaySound, SOUND_LOOP_FLO_WATER_FLOW_2) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, flo_10_ENTRY_1) + Call(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) + Else + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndSwitch + EndIf + IfGe(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER) + Call(PlaySound, SOUND_LOOP_FLO_WATER_FLOW_2) + EndIf + Return + End }; EvtScript N(EVS_PushFlowerSong) = { - EVT_CALL(PushSong, SONG_FLOWER_NPC_THEME, 2) - EVT_RETURN - EVT_END + Call(PushSong, SONG_FLOWER_NPC_THEME, 2) + Return + End }; EvtScript N(EVS_PopSong) = { - EVT_CALL(FadeOutMusic, 0, 250) - EVT_WAIT(10) - EVT_CALL(PopSong) - EVT_RETURN - EVT_END + Call(FadeOutMusic, 0, 250) + Wait(10) + Call(PopSong) + Return + End }; diff --git a/src/world/area_flo/flo_10/flo_10_2_entity.c b/src/world/area_flo/flo_10/flo_10_2_entity.c index 7b5a111cd02..fa94ddec39f 100644 --- a/src/world/area_flo/flo_10/flo_10_2_entity.c +++ b/src/world/area_flo/flo_10/flo_10_2_entity.c @@ -1,9 +1,9 @@ #include "flo_10.h" EvtScript N(EVS_MakeEntities) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER) - EVT_CALL(MakeItemEntity, ITEM_WATER_STONE, 0, -60, 6, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER) + Call(MakeItemEntity, ITEM_WATER_STONE, 0, -60, 6, ITEM_SPAWN_MODE_DECORATION, 0) + EndIf + Return + End }; diff --git a/src/world/area_flo/flo_10/flo_10_3_main.c b/src/world/area_flo/flo_10/flo_10_3_main.c index 6604f059611..d46e5aa9709 100644 --- a/src/world/area_flo/flo_10/flo_10_3_main.c +++ b/src/world/area_flo/flo_10/flo_10_3_main.c @@ -11,43 +11,43 @@ API_CALLABLE(N(SpawnSunEffect)) { EvtScript N(EVS_ExitWalk_flo_24_1) = EVT_EXIT_WALK(60, flo_10_ENTRY_0, "flo_24", flo_24_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_24_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_24_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_EXEC(N(EVS_SetupWaterStoneSocket)) - EVT_EXEC(N(EVS_SetupFountain)) - EVT_EXEC(N(EVS_SetupWaterEffect)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o80, SURFACE_TYPE_FLOWERS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o93, SURFACE_TYPE_FLOWERS) + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupFoliage)) + Exec(N(EVS_SetupWaterStoneSocket)) + Exec(N(EVS_SetupFountain)) + Exec(N(EVS_SetupWaterEffect)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o80, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o93, SURFACE_TYPE_FLOWERS) EVT_FLOWER_SPAWN_REGION( -265, 247, 199, 313, 0) EVT_FLOWER_SPAWN_REGION( -300, -275, -140, -185, 0) EVT_FLOWER_SPAWN_REGION( 263, -248, 362, 146, 0) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(flo_10_ENTRY_1) - EVT_EXEC(N(EVS_Scene_SunReturns)) - EVT_CASE_EQ(flo_10_ENTRY_2) - EVT_EXEC(N(EVS_Scene_PostReleaseFountain)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_DEFAULT - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(flo_10_ENTRY_1) + Exec(N(EVS_Scene_SunReturns)) + CaseEq(flo_10_ENTRY_2) + Exec(N(EVS_Scene_PostReleaseFountain)) + Exec(N(EVS_BindExitTriggers)) + CaseDefault + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Return + End }; diff --git a/src/world/area_flo/flo_10/flo_10_4_fountain.c b/src/world/area_flo/flo_10/flo_10_4_fountain.c index f8c405074ef..f1fc5c2bbfd 100644 --- a/src/world/area_flo/flo_10/flo_10_4_fountain.c +++ b/src/world/area_flo/flo_10/flo_10_4_fountain.c @@ -7,309 +7,309 @@ #include "world/common/atomic/TexturePan.inc.c" EvtScript N(EVS_RaiseFountain) = { - EVT_CALL(MakeLerp, -50, 170, 385, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g22, 0, LVar0, 0) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeLerp, -50, 170, 385, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g22, 0, LVar0, 0) + IfEq(LVar1, 1) + Wait(1) + Goto(1) + EndIf + Return + End }; EvtScript N(EVS_GrowFountain) = { - EVT_CALL(MakeLerp, 0, 100, 90, EASING_QUADRATIC_IN) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, LVar0) - EVT_SETF(LVar3, LVar0) - EVT_DIVF(LVar2, EVT_FLOAT(333.0)) - EVT_DIVF(LVar3, EVT_FLOAT(100.0)) - EVT_ADDF(LVar2, EVT_FLOAT(0.703)) - EVT_CALL(ScaleGroup, MODEL_g22, LVar2, LVar3, LVar2) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeLerp, 0, 100, 90, EASING_QUADRATIC_IN) + Label(1) + Call(UpdateLerp) + SetF(LVar2, LVar0) + SetF(LVar3, LVar0) + DivF(LVar2, Float(333.0)) + DivF(LVar3, Float(100.0)) + AddF(LVar2, Float(0.703)) + Call(ScaleGroup, MODEL_g22, LVar2, LVar3, LVar2) + IfEq(LVar1, 1) + Wait(1) + Goto(1) + EndIf + Return + End }; EvtScript N(EVS_TexPan_Rainbow) = { - EVT_CALL(EnableTexPanning, MODEL_o73, TRUE) - EVT_THREAD + Call(EnableTexPanning, MODEL_o73, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_A) TEX_PAN_PARAMS_STEP( -150, 0, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; EvtScript N(EVS_EnableRainbow) = { - EVT_WAIT(60) - EVT_CALL(EnableModel, MODEL_o73, TRUE) - EVT_EXEC(N(EVS_TexPan_Rainbow)) - EVT_RETURN - EVT_END + Wait(60) + Call(EnableModel, MODEL_o73, TRUE) + Exec(N(EVS_TexPan_Rainbow)) + Return + End }; EvtScript N(EVS_RaiseLily) = { - EVT_WAIT(80) - EVT_CALL(EnableNpcShadow, NPC_Lily, FALSE) - EVT_CALL(GetNpcPos, NPC_Lily, LVar3, LVar4, LVar5) - EVT_CALL(MakeLerp, 10, 55, 108, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(LVar6, LVar4) - EVT_ADD(LVar6, LVar0) - EVT_ADD(LVar6, -10) - EVT_CALL(SetNpcPos, NPC_Lily, LVar3, LVar6, LVar5) - EVT_CALL(TranslateGroup, MODEL_g31, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Wait(80) + Call(EnableNpcShadow, NPC_Lily, FALSE) + Call(GetNpcPos, NPC_Lily, LVar3, LVar4, LVar5) + Call(MakeLerp, 10, 55, 108, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Set(LVar6, LVar4) + Add(LVar6, LVar0) + Add(LVar6, -10) + Call(SetNpcPos, NPC_Lily, LVar3, LVar6, LVar5) + Call(TranslateGroup, MODEL_g31, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_RaisePlayer) = { - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_WAIT(40) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SitIdle) - EVT_CALL(GetPlayerPos, LVar2, LVar0, LVar3) - EVT_CALL(MakeLerp, -50, 90, 60, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar2, EVT_FLOAT(1.2)) - EVT_DIVF(LVar3, EVT_FLOAT(1.2)) - EVT_CALL(SetPlayerPos, LVar2, LVar0, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 90, 270, 280, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetPlayerPos, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerPhysics, TRUE) + Wait(40) + Call(SetPlayerAnimation, ANIM_MarioW2_SitIdle) + Call(GetPlayerPos, LVar2, LVar0, LVar3) + Call(MakeLerp, -50, 90, 60, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + DivF(LVar2, Float(1.2)) + DivF(LVar3, Float(1.2)) + Call(SetPlayerPos, LVar2, LVar0, LVar3) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 90, 270, 280, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetPlayerPos, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerPhysics, FALSE) + Return + End }; EvtScript N(EVS_RaiseCamera) = { - EVT_WAIT(80) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.7)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(25.0), EVT_FLOAT(-22.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Wait(80) + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Call(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.7)) + Call(SetCamPitch, CAM_DEFAULT, Float(25.0), Float(-22.0)) + Call(SetCamDistance, CAM_DEFAULT, 450) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_UnleashFountain) = { - EVT_CALL(DisablePartnerAI, 0) - EVT_EXEC(N(EVS_RaiseFountain)) - EVT_EXEC(N(EVS_GrowFountain)) - EVT_EXEC(N(EVS_EnableRainbow)) - EVT_EXEC(N(EVS_RaiseLily)) - EVT_EXEC(N(EVS_RaisePlayer)) - EVT_EXEC(N(EVS_RaiseCamera)) - EVT_RETURN - EVT_END + Call(DisablePartnerAI, 0) + Exec(N(EVS_RaiseFountain)) + Exec(N(EVS_GrowFountain)) + Exec(N(EVS_EnableRainbow)) + Exec(N(EVS_RaiseLily)) + Exec(N(EVS_RaisePlayer)) + Exec(N(EVS_RaiseCamera)) + Return + End }; EvtScript N(EVS_LowerFountain) = { - EVT_CALL(MakeLerp, 170, 75, 150, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g22, 0, LVar0, 0) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeLerp, 170, 75, 150, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g22, 0, LVar0, 0) + IfEq(LVar1, 1) + Wait(1) + Goto(1) + EndIf + Return + End }; EvtScript N(EVS_ShrinkFountain) = { - EVT_CALL(MakeLerp, 100, 15, 150, EASING_QUADRATIC_IN) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, LVar0) - EVT_SETF(LVar3, LVar0) - EVT_DIVF(LVar2, EVT_FLOAT(333.0)) - EVT_DIVF(LVar3, EVT_FLOAT(100.0)) - EVT_ADDF(LVar2, EVT_FLOAT(0.703)) - EVT_CALL(ScaleGroup, MODEL_g22, LVar2, LVar3, LVar2) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeLerp, 100, 15, 150, EASING_QUADRATIC_IN) + Label(1) + Call(UpdateLerp) + SetF(LVar2, LVar0) + SetF(LVar3, LVar0) + DivF(LVar2, Float(333.0)) + DivF(LVar3, Float(100.0)) + AddF(LVar2, Float(0.703)) + Call(ScaleGroup, MODEL_g22, LVar2, LVar3, LVar2) + IfEq(LVar1, 1) + Wait(1) + Goto(1) + EndIf + Return + End }; EvtScript N(EVS_FountainSlowing) = { - EVT_EXEC(N(EVS_LowerFountain)) - EVT_EXEC(N(EVS_ShrinkFountain)) - EVT_RETURN - EVT_END + Exec(N(EVS_LowerFountain)) + Exec(N(EVS_ShrinkFountain)) + Return + End }; EvtScript N(EVS_Scene_ReleaseFountain) = { - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Still) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 600) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(EnableGroup, MODEL_g22, TRUE) - EVT_CALL(TranslateGroup, MODEL_g22, 0, -50, 0) - EVT_CALL(ScaleGroup, MODEL_g22, 0, 0, 0) - EVT_CALL(EnableGroup, MODEL_g31, TRUE) - EVT_EXEC_WAIT(N(EVS_UnleashFountain)) - EVT_WAIT(20) - EVT_CALL(PlaySound, SOUND_LOOP_FLO_RELEASE_FOUNTAIN) - EVT_WAIT(360) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Flail) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.2)) - EVT_CALL(PlayerJump1, -100, -10, -172, 75) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0)) - EVT_EXEC_WAIT(N(EVS_FountainSlowing)) - EVT_WAIT(60) - EVT_CALL(GotoMap, EVT_PTR("flo_24"), flo_24_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Still) + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Call(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Call(SetCamDistance, CAM_DEFAULT, 600) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(EnableGroup, MODEL_g22, TRUE) + Call(TranslateGroup, MODEL_g22, 0, -50, 0) + Call(ScaleGroup, MODEL_g22, 0, 0, 0) + Call(EnableGroup, MODEL_g31, TRUE) + ExecWait(N(EVS_UnleashFountain)) + Wait(20) + Call(PlaySound, SOUND_LOOP_FLO_RELEASE_FOUNTAIN) + Wait(360) + Call(InterpPlayerYaw, 90, 0) + Call(SetPlayerAnimation, ANIM_MarioW2_Flail) + Call(SetPlayerJumpscale, Float(0.2)) + Call(PlayerJump1, -100, -10, -172, 75) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.0)) + ExecWait(N(EVS_FountainSlowing)) + Wait(60) + Call(GotoMap, Ref("flo_24"), flo_24_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_Scene_PostReleaseFountain) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerPos, -100, -10, -172) - EVT_CALL(InterpPlayerYaw, 150, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Fallen) - EVT_CALL(SetNpcPos, NPC_PARTNER, -129, 9, -177) - EVT_CALL(EnablePartnerAI) - EVT_CALL(ClearPartnerMoveHistory, NPC_PARTNER) - EVT_CALL(EnableGroup, MODEL_water, TRUE) - EVT_CALL(EnableGroup, MODEL_g2, FALSE) - EVT_CALL(EnableGroup, MODEL_g12, FALSE) - EVT_CALL(EnableGroup, MODEL_g31, FALSE) - EVT_CALL(SetNpcPos, NPC_Lily, -57, -20, -105) - EVT_CALL(InterpNpcYaw, NPC_Lily, 90, 0) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(90.0), 0, 450, EVT_FLOAT(25.0), EVT_FLOAT(-6.0)) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_GetUp) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(10 * DT) - EVT_EXEC_WAIT(N(EVS_PushFlowerSong)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Lily, ANIM_Lily_Talk, ANIM_Lily_Idle, 5, MSG_CH6_0082) - EVT_CALL(NpcFacePlayer, NPC_Lily, 1) - EVT_CALL(SpeakToPlayer, NPC_Lily, ANIM_Lily_TalkHappy, ANIM_Lily_IdleHappy, 0, MSG_CH6_0083) - EVT_CALL(SetNpcAnimation, NPC_Lily, ANIM_Lily_GiveItem) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Lily, ANIM_Lily_Idle) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerPos, -100, -10, -172) + Call(InterpPlayerYaw, 150, 0) + Call(SetPlayerAnimation, ANIM_Mario1_Fallen) + Call(SetNpcPos, NPC_PARTNER, -129, 9, -177) + Call(EnablePartnerAI) + Call(ClearPartnerMoveHistory, NPC_PARTNER) + Call(EnableGroup, MODEL_water, TRUE) + Call(EnableGroup, MODEL_g2, FALSE) + Call(EnableGroup, MODEL_g12, FALSE) + Call(EnableGroup, MODEL_g31, FALSE) + Call(SetNpcPos, NPC_Lily, -57, -20, -105) + Call(InterpNpcYaw, NPC_Lily, 90, 0) + Call(AdjustCam, CAM_DEFAULT, Float(90.0), 0, 450, Float(25.0), Float(-6.0)) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_GetUp) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(10 * DT) + ExecWait(N(EVS_PushFlowerSong)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Lily, ANIM_Lily_Talk, ANIM_Lily_Idle, 5, MSG_CH6_0082) + Call(NpcFacePlayer, NPC_Lily, 1) + Call(SpeakToPlayer, NPC_Lily, ANIM_Lily_TalkHappy, ANIM_Lily_IdleHappy, 0, MSG_CH6_0083) + Call(SetNpcAnimation, NPC_Lily, ANIM_Lily_GiveItem) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_Lily, ANIM_Lily_Idle) EVT_GIVE_KEY_REWARD(ITEM_MIRACLE_WATER) - EVT_CALL(SpeakToPlayer, NPC_Lily, ANIM_Lily_TalkHappy, ANIM_Lily_IdleHappy, 0, MSG_CH6_0084) - EVT_CALL(EndSpeech, NPC_Lily, ANIM_Lily_Talk, ANIM_Lily_Idle, 0) - EVT_CALL(SetNpcAnimation, NPC_Lily, ANIM_Lily_Idle) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_EXEC_WAIT(N(EVS_PopSong)) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_Lily, ANIM_Lily_TalkHappy, ANIM_Lily_IdleHappy, 0, MSG_CH6_0084) + Call(EndSpeech, NPC_Lily, ANIM_Lily_Talk, ANIM_Lily_Idle, 0) + Call(SetNpcAnimation, NPC_Lily, ANIM_Lily_Idle) + Call(ResetCam, CAM_DEFAULT, Float(4.0 / DT)) + ExecWait(N(EVS_PopSong)) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SetupFountain) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER) - EVT_CALL(EnableGroup, MODEL_water, FALSE) - EVT_CALL(EnableGroup, MODEL_g12, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_water, COLLIDER_FLAGS_UPPER_MASK) - EVT_ELSE - EVT_CALL(EnableGroup, MODEL_g2, FALSE) - EVT_CALL(EnableGroup, MODEL_g12, FALSE) - EVT_CALL(EnableGroup, MODEL_g31, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o83, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o86, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o87, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_CALL(EnableTexPanning, MODEL_o25, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o40, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o78, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o77, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o118, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o119, TRUE) - EVT_THREAD + IfLt(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER) + Call(EnableGroup, MODEL_water, FALSE) + Call(EnableGroup, MODEL_g12, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_water, COLLIDER_FLAGS_UPPER_MASK) + Else + Call(EnableGroup, MODEL_g2, FALSE) + Call(EnableGroup, MODEL_g12, FALSE) + Call(EnableGroup, MODEL_g31, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o83, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o86, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o87, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Call(EnableTexPanning, MODEL_o25, TRUE) + Call(EnableTexPanning, MODEL_o40, TRUE) + Call(EnableTexPanning, MODEL_o78, TRUE) + Call(EnableTexPanning, MODEL_o77, TRUE) + Call(EnableTexPanning, MODEL_o118, TRUE) + Call(EnableTexPanning, MODEL_o119, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 0,-2000, 0, 0) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_3) TEX_PAN_PARAMS_STEP( -100, 80, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_5) TEX_PAN_PARAMS_STEP(-1000, 2000, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_6) TEX_PAN_PARAMS_STEP( 0,-2000, 0, 0) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_8) TEX_PAN_PARAMS_STEP( 0,-1500, 0, 0) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_9) TEX_PAN_PARAMS_STEP( 0,-1000, 0, 0) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_IF_GE(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER) - EVT_EXEC(N(EVS_TexPan_Rainbow)) - EVT_END_IF - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + IfGe(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER) + Exec(N(EVS_TexPan_Rainbow)) + EndIf + Return + End }; diff --git a/src/world/area_flo/flo_10/flo_10_5_npc.c b/src/world/area_flo/flo_10/flo_10_5_npc.c index d5547bd8930..c396e7605ff 100644 --- a/src/world/area_flo/flo_10/flo_10_5_npc.c +++ b/src/world/area_flo/flo_10/flo_10_5_npc.c @@ -4,23 +4,23 @@ #include "world/common/npc/Lily.inc.c" EvtScript N(EVS_Scene_SunReturns) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetNpcPos, NPC_Lily, 60, 0, 55) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_Lily, ANIM_Lily_Talk, ANIM_Lily_Idle, 0, MSG_CH6_00C6) - EVT_WAIT(10) - EVT_CALL(GotoMap, EVT_PTR("flo_12"), flo_12_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetNpcPos, NPC_Lily, 60, 0, 55) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, 450) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-6.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20) + Call(SpeakToPlayer, NPC_Lily, ANIM_Lily_Talk, ANIM_Lily_Idle, 0, MSG_CH6_00C6) + Wait(10) + Call(GotoMap, Ref("flo_12"), flo_12_ENTRY_1) + Wait(100) + Return + End }; s32 N(KeyList)[] = { @@ -29,174 +29,174 @@ s32 N(KeyList)[] = { }; EvtScript N(EVS_OnInteract_WaterStoneSocket) = { - EVT_IF_EQ(GF_FLO10_ShowedLilyTheWaterStone, TRUE) - EVT_CALL(GetPartnerInUse, LVarA) - EVT_IF_NE(LVarA, 0) - EVT_CALL(AwaitPlayerLeave, 0, 0, 19) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(ShowKeyChoicePopup) - EVT_SET(LVar2, LVar0) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(-1) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Lily, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 0, MSG_CH6_0081) - EVT_CASE_DEFAULT - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_CALL(PlayerMoveTo, -17, -17, 20) - EVT_CALL(func_802CF56C, 2) - EVT_CALL(InterpPlayerYaw, 100, 1) - EVT_WAIT(10 * DT) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(1.0 / DT), 0, 450, EVT_FLOAT(25.0), EVT_FLOAT(-6.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_PlaceItem) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(MakeItemEntity, ITEM_WATER_STONE, 0, -60, 6, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVarA, LVar0) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_EXEC_WAIT(N(EVS_Scene_ReleaseFountain)) - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(AwaitPlayerLeave, 0, 0, 19) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_FLO10_ShowedLilyTheWaterStone, TRUE) + Call(GetPartnerInUse, LVarA) + IfNe(LVarA, 0) + Call(AwaitPlayerLeave, 0, 0, 19) + Return + EndIf + Call(DisablePlayerInput, TRUE) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(ShowKeyChoicePopup) + Set(LVar2, LVar0) + Switch(LVar2) + CaseEq(-1) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Lily, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 0, MSG_CH6_0081) + CaseDefault + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Call(PlayerMoveTo, -17, -17, 20) + Call(func_802CF56C, 2) + Call(InterpPlayerYaw, 100, 1) + Wait(10 * DT) + Call(AdjustCam, CAM_DEFAULT, Float(1.0 / DT), 0, 450, Float(25.0), Float(-6.0)) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_MarioW1_PlaceItem) + Call(RemoveKeyItemAt, LVar1) + Call(MakeItemEntity, ITEM_WATER_STONE, 0, -60, 6, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVarA, LVar0) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + ExecWait(N(EVS_Scene_ReleaseFountain)) + EndSwitch + Call(DisablePlayerInput, FALSE) + Call(AwaitPlayerLeave, 0, 0, 19) + EndIf + Return + End }; EvtScript N(EVS_SetupWaterStoneSocket) = { - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_OnInteract_WaterStoneSocket)), TRIGGER_FLOOR_TOUCH, COLLIDER_o83, EVT_PTR(N(KeyList)), 0, 1) - EVT_RETURN - EVT_END + BindPadlock(Ref(N(EVS_OnInteract_WaterStoneSocket)), TRIGGER_FLOOR_TOUCH, COLLIDER_o83, Ref(N(KeyList)), 0, 1) + Return + End }; EvtScript N(EVS_MovePlayerToTalk) = { - EVT_WAIT(10 * DT) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_IF_LT(LVar5, LVar2) - EVT_SET(LVar6, 30) - EVT_ELSE - EVT_SET(LVar6, 20) - EVT_END_IF - EVT_SET(LVar1, LVar0) - EVT_SET(LVar4, LVar0) - EVT_SUB(LVar1, LVar6) - EVT_ADD(LVar4, LVar6) - EVT_SWITCH(LVar3) - EVT_CASE_RANGE(LVar1, LVar4) - EVT_THREAD - EVT_IF_LT(LVar3, LVar0) - EVT_SUB(LVar0, 40) - EVT_ELSE - EVT_ADD(LVar0, 40) - EVT_END_IF - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(PlayerMoveTo, LVar0, LVar5, 15 * DT) - EVT_CALL(PlayerFaceNpc, NPC_Lily, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_END_THREAD - EVT_END_SWITCH - EVT_RETURN - EVT_END + Wait(10 * DT) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(GetPlayerPos, LVar3, LVar4, LVar5) + IfLt(LVar5, LVar2) + Set(LVar6, 30) + Else + Set(LVar6, 20) + EndIf + Set(LVar1, LVar0) + Set(LVar4, LVar0) + Sub(LVar1, LVar6) + Add(LVar4, LVar6) + Switch(LVar3) + CaseRange(LVar1, LVar4) + Thread + IfLt(LVar3, LVar0) + Sub(LVar0, 40) + Else + Add(LVar0, 40) + EndIf + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(PlayerMoveTo, LVar0, LVar5, 15 * DT) + Call(PlayerFaceNpc, NPC_Lily, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + EndThread + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Lily) = { - EVT_EXEC_WAIT(N(EVS_PushFlowerSong)) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN) - EVT_EXEC(N(EVS_MovePlayerToTalk)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 325) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(23.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 5, MSG_CH6_0078) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Lily_DreadLoop, ANIM_Lily_Dread, 5) - EVT_CASE_LT(STORY_CH6_GOT_WATER_STONE) - EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, FALSE) - EVT_EXEC(N(EVS_MovePlayerToTalk)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 325) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(23.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 5, MSG_CH6_0079) - EVT_CALL(NpcFacePlayer, NPC_SELF, 1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Lily_Idle) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 15, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(15 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_Idle, ANIM_Lily_Idle, 0, MSG_CH6_007A) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Lily_Dread, ANIM_Lily_Idle, 0) - EVT_CALL(GetPlayerTargetYaw, LVar0) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 1) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 5, MSG_CH6_007B) - EVT_CALL(NpcFacePlayer, NPC_SELF, 1) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 0, MSG_CH6_007C) - EVT_CALL(ShowChoice, MSG_Choice_0011) - EVT_WAIT(10 * DT) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Lily_TalkHappy, ANIM_Lily_IdleHappy, 0, MSG_CH6_007D) - EVT_CASE_EQ(1) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 0, MSG_CH6_007E) - EVT_END_SWITCH - EVT_WAIT(10 * DT) - EVT_SET(GF_FLO10_LilyRequestedWaterStone, TRUE) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_400000, 0) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 5, MSG_CH6_007F) - EVT_END_IF - EVT_CASE_LT(STORY_CH6_FILLED_SPRING_WITH_WATER) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 0, MSG_CH6_0080) - EVT_SET(GF_FLO10_ShowedLilyTheWaterStone, TRUE) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 0, MSG_CH6_0085) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 0) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 0) - EVT_CASE_LT(STORY_CH6_RETURNED_TO_TOAD_TOWN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkHappy, ANIM_Lily_IdleHappy, 0, MSG_CH6_0086) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 0, MSG_CH6_0087) - EVT_END_SWITCH - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_EXEC_WAIT(N(EVS_PopSong)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_PushFlowerSong)) + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_GOT_MAGICAL_BEAN) + Exec(N(EVS_MovePlayerToTalk)) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 325) + Call(SetCamPitch, CAM_DEFAULT, Float(23.0), Float(-9.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 5, MSG_CH6_0078) + Call(EndSpeech, NPC_SELF, ANIM_Lily_DreadLoop, ANIM_Lily_Dread, 5) + CaseLt(STORY_CH6_GOT_WATER_STONE) + IfEq(GF_FLO10_LilyRequestedWaterStone, FALSE) + Exec(N(EVS_MovePlayerToTalk)) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 325) + Call(SetCamPitch, CAM_DEFAULT, Float(23.0), Float(-9.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 5, MSG_CH6_0079) + Call(NpcFacePlayer, NPC_SELF, 1) + Call(SetNpcAnimation, NPC_SELF, ANIM_Lily_Idle) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 15, EMOTER_NPC, 0, 0, 0, 0) + Wait(15 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_Lily_Idle, ANIM_Lily_Idle, 0, MSG_CH6_007A) + Call(EndSpeech, NPC_SELF, ANIM_Lily_Dread, ANIM_Lily_Idle, 0) + Call(GetPlayerTargetYaw, LVar0) + Call(InterpNpcYaw, NPC_SELF, LVar0, 1) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 5, MSG_CH6_007B) + Call(NpcFacePlayer, NPC_SELF, 1) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 0, MSG_CH6_007C) + Call(ShowChoice, MSG_Choice_0011) + Wait(10 * DT) + Switch(LVar0) + CaseEq(0) + Call(ContinueSpeech, NPC_SELF, ANIM_Lily_TalkHappy, ANIM_Lily_IdleHappy, 0, MSG_CH6_007D) + CaseEq(1) + Call(ContinueSpeech, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 0, MSG_CH6_007E) + EndSwitch + Wait(10 * DT) + Set(GF_FLO10_LilyRequestedWaterStone, TRUE) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_400000, 0) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 5, MSG_CH6_007F) + EndIf + CaseLt(STORY_CH6_FILLED_SPRING_WITH_WATER) + Call(SpeakToPlayer, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 0, MSG_CH6_0080) + Set(GF_FLO10_ShowedLilyTheWaterStone, TRUE) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 0, MSG_CH6_0085) + Call(EndSpeech, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 0) + Call(EndSpeech, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 0) + CaseLt(STORY_CH6_RETURNED_TO_TOAD_TOWN) + Call(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkHappy, ANIM_Lily_IdleHappy, 0, MSG_CH6_0086) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 0, MSG_CH6_0087) + EndSwitch + Call(ResetCam, CAM_DEFAULT, Float(4.0 / DT)) + ExecWait(N(EVS_PopSong)) + Return + End }; EvtScript N(EVS_NpcInit_Lily) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lily))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_GOT_WATER_STONE) - EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Lily_IdlePlead) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 1) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_400000, 1) - EVT_END_IF - EVT_CASE_EQ(STORY_CH6_GOT_WATER_STONE) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 1) - EVT_CASE_GE(STORY_CH6_FILLED_SPRING_WITH_WATER) - EVT_CALL(SetNpcPos, NPC_SELF, -67, -20, -105) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Lily))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_GOT_WATER_STONE) + IfEq(GF_FLO10_LilyRequestedWaterStone, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Lily_IdlePlead) + Call(InterpNpcYaw, NPC_SELF, 90, 1) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_400000, 1) + EndIf + CaseEq(STORY_CH6_GOT_WATER_STONE) + Call(InterpNpcYaw, NPC_SELF, 270, 1) + CaseGe(STORY_CH6_FILLED_SPRING_WITH_WATER) + Call(SetNpcPos, NPC_SELF, -67, -20, -105) + EndSwitch + Return + End }; NpcData N(NpcData_Lily) = { diff --git a/src/world/area_flo/flo_10/flo_10_6_waterfx.c b/src/world/area_flo/flo_10/flo_10_6_waterfx.c index 25e226392cb..b23e736b3c8 100644 --- a/src/world/area_flo/flo_10/flo_10_6_waterfx.c +++ b/src/world/area_flo/flo_10/flo_10_6_waterfx.c @@ -8,8 +8,8 @@ s32 N(WavePhase) = { // unused wavy distortion effect for edge water -- unclear how it would have been used EvtScript N(EVS_SetupWaterEffect) = { - EVT_RETURN - EVT_END + Return + End }; void N(UnkModelFunc000)(s32 x1, s32 y1, s32 x2, s32 y2) { diff --git a/src/world/area_flo/flo_10/flo_10_7_foliage.c b/src/world/area_flo/flo_10/flo_10_7_foliage.c index dd7b4ee3b3a..c5c8957ffe6 100644 --- a/src/world/area_flo/flo_10/flo_10_7_foliage.c +++ b/src/world/area_flo/flo_10/flo_10_7_foliage.c @@ -29,9 +29,9 @@ BombTrigger N(BombPos_Tree1) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o85, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o85, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Return + End }; diff --git a/src/world/area_flo/flo_11/flo_11_1_music.c b/src/world/area_flo/flo_11/flo_11_1_music.c index 0fe004dc968..eb4e98a91ab 100644 --- a/src/world/area_flo/flo_11/flo_11_1_music.c +++ b/src/world/area_flo/flo_11/flo_11_1_music.c @@ -1,12 +1,12 @@ #include "flo_11.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_flo/flo_11/flo_11_2_main.c b/src/world/area_flo/flo_11/flo_11_2_main.c index 4b47d841740..d47441a9567 100644 --- a/src/world/area_flo/flo_11/flo_11_2_main.c +++ b/src/world/area_flo/flo_11/flo_11_2_main.c @@ -14,80 +14,80 @@ EvtScript N(EVS_ExitWalk_flo_23_1) = EVT_EXIT_WALK(60, flo_11_ENTRY_0, "flo_23", EvtScript N(EVS_ExitWalk_flo_12_0) = EVT_EXIT_WALK(60, flo_11_ENTRY_1, "flo_12", flo_12_ENTRY_0); // template for GotoMap exits used with pipes in the maze -#define EVT_GOTO_MAP(mapName, entry) \ +#define Goto_MAP(mapName, entry) \ { \ - EVT_SET_GROUP(EVT_GROUP_1B) \ - EVT_CALL(GotoMap, EVT_PTR(mapName), entry) \ - EVT_WAIT(100) \ - EVT_RETURN \ - EVT_END \ + SetGroup(EVT_GROUP_1B) \ + Call(GotoMap, Ref(mapName), entry) \ + Wait(100) \ + Return \ + End \ } // template for binding the event for the generic EVS_OnEnterPipe -#define EVT_SETUP_PIPE(entry, collider, exitScript) \ - EVT_SET(LVar0, entry) \ - EVT_SET(LVar1, collider) \ - EVT_SET(LVar2, EVT_PTR(exitScript)) \ - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnEnterPipe)), TRIGGER_FLOOR_TOUCH, LVar1, 1, 0) +#define SetUP_PIPE(entry, collider, exitScript) \ + Set(LVar0, entry) \ + Set(LVar1, collider) \ + Set(LVar2, Ref(exitScript)) \ + BindTrigger(Ref(N(EVS_OnEnterPipe)), TRIGGER_FLOOR_TOUCH, LVar1, 1, 0) -EvtScript N(EVS_GotoMap_flo_11_5) = EVT_GOTO_MAP("flo_11", flo_11_ENTRY_5); -EvtScript N(EVS_GotoMap_flo_11_6) = EVT_GOTO_MAP("flo_11", flo_11_ENTRY_6); -EvtScript N(EVS_GotoMap_flo_11_7) = EVT_GOTO_MAP("flo_11", flo_11_ENTRY_7); -EvtScript N(EVS_GotoMap_flo_11_2) = EVT_GOTO_MAP("flo_11", flo_11_ENTRY_2); -EvtScript N(EVS_GotoMap_flo_11_3) = EVT_GOTO_MAP("flo_11", flo_11_ENTRY_3); -EvtScript N(EVS_GotoMap_flo_11_4) = EVT_GOTO_MAP("flo_11", flo_11_ENTRY_4); +EvtScript N(EVS_GotoMap_flo_11_5) = Goto_MAP("flo_11", flo_11_ENTRY_5); +EvtScript N(EVS_GotoMap_flo_11_6) = Goto_MAP("flo_11", flo_11_ENTRY_6); +EvtScript N(EVS_GotoMap_flo_11_7) = Goto_MAP("flo_11", flo_11_ENTRY_7); +EvtScript N(EVS_GotoMap_flo_11_2) = Goto_MAP("flo_11", flo_11_ENTRY_2); +EvtScript N(EVS_GotoMap_flo_11_3) = Goto_MAP("flo_11", flo_11_ENTRY_3); +EvtScript N(EVS_GotoMap_flo_11_4) = Goto_MAP("flo_11", flo_11_ENTRY_4); EvtScript N(EVS_OnEnterPipe) = { - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_EXEC_WAIT(N(EVS_Pipe_ExitVertical)) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Set(LVarB, LVar1) + Set(LVarC, LVar2) + ExecWait(N(EVS_Pipe_ExitVertical)) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_12_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_23_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_SETUP_PIPE(flo_11_ENTRY_2, COLLIDER_o91, N(EVS_GotoMap_flo_11_5)) // link 2 <--> 5 - EVT_SETUP_PIPE(flo_11_ENTRY_3, COLLIDER_o92, N(EVS_GotoMap_flo_11_6)) // link 3 <--> 6 - EVT_SETUP_PIPE(flo_11_ENTRY_4, COLLIDER_o93, N(EVS_GotoMap_flo_11_7)) // link 4 <--> 7 - EVT_SETUP_PIPE(flo_11_ENTRY_5, COLLIDER_o94, N(EVS_GotoMap_flo_11_2)) // link 2 <--> 5 - EVT_SETUP_PIPE(flo_11_ENTRY_6, COLLIDER_o95, N(EVS_GotoMap_flo_11_3)) // link 3 <--> 6 - EVT_SETUP_PIPE(flo_11_ENTRY_7, COLLIDER_o96, N(EVS_GotoMap_flo_11_4)) // link 4 <--> 7 - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_12_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_flo_23_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + SetUP_PIPE(flo_11_ENTRY_2, COLLIDER_o91, N(EVS_GotoMap_flo_11_5)) // link 2 <--> 5 + SetUP_PIPE(flo_11_ENTRY_3, COLLIDER_o92, N(EVS_GotoMap_flo_11_6)) // link 3 <--> 6 + SetUP_PIPE(flo_11_ENTRY_4, COLLIDER_o93, N(EVS_GotoMap_flo_11_7)) // link 4 <--> 7 + SetUP_PIPE(flo_11_ENTRY_5, COLLIDER_o94, N(EVS_GotoMap_flo_11_2)) // link 2 <--> 5 + SetUP_PIPE(flo_11_ENTRY_6, COLLIDER_o95, N(EVS_GotoMap_flo_11_3)) // link 3 <--> 6 + SetUP_PIPE(flo_11_ENTRY_7, COLLIDER_o96, N(EVS_GotoMap_flo_11_4)) // link 4 <--> 7 + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(func_80044238, 5) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_LE(LVar0, flo_11_ENTRY_1) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC(N(EVS_Scene_LakituAmbush)) - EVT_WAIT(1) - EVT_ELSE - EVT_SET(LVarA, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(N(EVS_Pipe_EnterVertical)) - EVT_WAIT(1) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o90, SURFACE_TYPE_HEDGES) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o104, SURFACE_TYPE_HEDGES) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o105, SURFACE_TYPE_HEDGES) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o109, SURFACE_TYPE_HEDGES) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + Call(func_80044238, 5) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Call(GetEntryID, LVar0) + IfLe(LVar0, flo_11_ENTRY_1) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Exec(N(EVS_Scene_LakituAmbush)) + Wait(1) + Else + Set(LVarA, Ref(N(EVS_BindExitTriggers))) + Exec(N(EVS_Pipe_EnterVertical)) + Wait(1) + EndIf + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o90, SURFACE_TYPE_HEDGES) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o104, SURFACE_TYPE_HEDGES) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o105, SURFACE_TYPE_HEDGES) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o109, SURFACE_TYPE_HEDGES) + Return + End }; diff --git a/src/world/area_flo/flo_11/flo_11_3_npc.c b/src/world/area_flo/flo_11/flo_11_3_npc.c index d52eb719a77..4e0e562d7eb 100644 --- a/src/world/area_flo/flo_11/flo_11_3_npc.c +++ b/src/world/area_flo/flo_11/flo_11_3_npc.c @@ -65,307 +65,307 @@ Vec3f N(FlightPath_Lakitu_02_Flee)[] = { }; EvtScript N(EVS_PlayFlightSounds) = { - EVT_LOOP(0) - EVT_CALL(PlaySound, SOUND_FLIGHT) - EVT_WAIT(LVar0) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(PlaySound, SOUND_FLIGHT) + Wait(LVar0) + EndLoop + Return + End }; EvtScript N(EVS_LakitusFlying_Search) = { - EVT_SET(LVar0, 5) - EVT_EXEC_GET_TID(N(EVS_PlayFlightSounds), MV_FlyingSoundsScript) - EVT_THREAD - EVT_CALL(LoadPath, 160 * DT, EVT_PTR(N(FlightPath_Lakitu_01_Search)), + Set(LVar0, 5) + ExecGetTID(N(EVS_PlayFlightSounds), MV_FlyingSoundsScript) + Thread + Call(LoadPath, 160 * DT, Ref(N(FlightPath_Lakitu_01_Search)), ARRAY_COUNT(N(FlightPath_Lakitu_01_Search)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Lakitu_01, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(LoadPath, 160 * DT, EVT_PTR(N(FlightPath_Lakitu_02_Search)), + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Lakitu_01, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(LoadPath, 160 * DT, Ref(N(FlightPath_Lakitu_02_Search)), ARRAY_COUNT(N(FlightPath_Lakitu_02_Search)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Lakitu_02, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(MV_LakituSearchSync, 1) - EVT_RETURN - EVT_END + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Lakitu_02, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Set(MV_LakituSearchSync, 1) + Return + End }; EvtScript N(EVS_LakitusFlying_Gather) = { - EVT_THREAD - EVT_CALL(LoadPath, 30 * DT, EVT_PTR(N(FlightPath_Lakitu_01_Gather)), + Thread + Call(LoadPath, 30 * DT, Ref(N(FlightPath_Lakitu_01_Gather)), ARRAY_COUNT(N(FlightPath_Lakitu_01_Gather)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Lakitu_01, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(LoadPath, 45 * DT, EVT_PTR(N(FlightPath_Lakitu_02_Gather)), + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Lakitu_01, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(LoadPath, 45 * DT, Ref(N(FlightPath_Lakitu_02_Gather)), ARRAY_COUNT(N(FlightPath_Lakitu_02_Gather)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Lakitu_02, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_KILL_THREAD(MV_FlyingSoundsScript) - EVT_RETURN - EVT_END + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Lakitu_02, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + KillThread(MV_FlyingSoundsScript) + Return + End }; EvtScript N(EVS_LakitusFlying_Attack) = { - EVT_SET(LVar0, 4) - EVT_EXEC_GET_TID(N(EVS_PlayFlightSounds), MV_FlyingSoundsScript) - EVT_THREAD - EVT_CALL(LoadPath, 35 * DT, EVT_PTR(N(FlightPath_Lakitu_01_Attack)), + Set(LVar0, 4) + ExecGetTID(N(EVS_PlayFlightSounds), MV_FlyingSoundsScript) + Thread + Call(LoadPath, 35 * DT, Ref(N(FlightPath_Lakitu_01_Attack)), ARRAY_COUNT(N(FlightPath_Lakitu_01_Attack)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Lakitu_01, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(LoadPath, 35 * DT, EVT_PTR(N(FlightPath_Lakitu_02_Attack)), + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Lakitu_01, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(LoadPath, 35 * DT, Ref(N(FlightPath_Lakitu_02_Attack)), ARRAY_COUNT(N(FlightPath_Lakitu_02_Attack)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Lakitu_02, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Lakitu_02, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_LakitusFlying_Flee) = { - EVT_THREAD - EVT_CALL(LoadPath, 40 * DT, EVT_PTR(N(FlightPath_Lakitu_01_Flee)), + Thread + Call(LoadPath, 40 * DT, Ref(N(FlightPath_Lakitu_01_Flee)), ARRAY_COUNT(N(FlightPath_Lakitu_01_Flee)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Lakitu_01, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_Lakitu_01, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_CALL(LoadPath, 40 * DT, EVT_PTR(N(FlightPath_Lakitu_02_Flee)), + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Lakitu_01, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcPos, NPC_Lakitu_01, NPC_DISPOSE_LOCATION) + EndThread + Call(LoadPath, 40 * DT, Ref(N(FlightPath_Lakitu_02_Flee)), ARRAY_COUNT(N(FlightPath_Lakitu_02_Flee)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Lakitu_02, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_Lakitu_02, NPC_DISPOSE_LOCATION) - EVT_WAIT(40 * DT) - EVT_KILL_THREAD(MV_FlyingSoundsScript) - EVT_RETURN - EVT_END + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Lakitu_02, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcPos, NPC_Lakitu_02, NPC_DISPOSE_LOCATION) + Wait(40 * DT) + KillThread(MV_FlyingSoundsScript) + Return + End }; EvtScript N(EVS_Scene_LakituAmbush) = { - EVT_IF_EQ(GF_FLO11_Defeated_Lakitus, TRUE) - EVT_RETURN - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH6_GOT_MAGICAL_BEAN) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_Lakitu_01, 460, 200, -240) - EVT_CALL(SetNpcPos, NPC_Lakitu_02, -100, 200, -50) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 440) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(MV_LakituSearchSync, 0) - EVT_EXEC(N(EVS_LakitusFlying_Search)) - EVT_CALL(SetCamType, CAM_DEFAULT, 1, FALSE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(25.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_SET(LVar0, 270) - EVT_SET(LVar1, 100) - EVT_SET(LVar2, -87) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(14.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 87, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -50) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 87, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(30 * DT) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 150) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-16.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_EQ(MV_LakituSearchSync, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(NpcFaceNpc, NPC_Lakitu_01, NPC_Lakitu_02, 1) - EVT_CALL(NpcFaceNpc, NPC_Lakitu_02, NPC_Lakitu_01, 1) - EVT_EXEC(N(EVS_LakitusFlying_Gather)) - EVT_WAIT(30) - EVT_CALL(SpeakToPlayer, NPC_Lakitu_01, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0, MSG_CH6_0088) - EVT_CALL(NpcFaceNpc, NPC_Lakitu_02, NPC_Lakitu_01, 1) - EVT_CALL(SpeakToPlayer, NPC_Lakitu_02, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0, MSG_CH6_0089) - EVT_CALL(InterpNpcYaw, NPC_Lakitu_01, 0, 1) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_Lakitu_01, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0, MSG_CH6_008A) - EVT_CALL(SpeakToPlayer, NPC_Lakitu_02, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0, MSG_CH6_008B) - EVT_CALL(SetCamType, CAM_DEFAULT, 1, FALSE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(14.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 87, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -50) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC(N(EVS_LakitusFlying_Attack)) - EVT_CALL(SetNpcVar, NPC_Lakitu_01, 0, 1) - EVT_RETURN - EVT_END + IfEq(GF_FLO11_Defeated_Lakitus, TRUE) + Return + EndIf + IfLt(GB_StoryProgress, STORY_CH6_GOT_MAGICAL_BEAN) + Return + EndIf + IfEq(GF_FLO10_LilyRequestedWaterStone, FALSE) + Return + EndIf + Call(SetNpcPos, NPC_Lakitu_01, 460, 200, -240) + Call(SetNpcPos, NPC_Lakitu_02, -100, 200, -50) + Loop(0) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, 440) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, TRUE) + Set(MV_LakituSearchSync, 0) + Exec(N(EVS_LakitusFlying_Search)) + Call(SetCamType, CAM_DEFAULT, 1, FALSE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(25.0), Float(-7.0)) + Call(SetCamDistance, CAM_DEFAULT, 450) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20) + Set(LVar0, 270) + Set(LVar1, 100) + Set(LVar2, -87) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamPitch, CAM_DEFAULT, Float(14.0), Float(-11.0)) + Call(SetCamPosA, CAM_DEFAULT, 87, 0) + Call(SetCamPosB, CAM_DEFAULT, 0, -50) + Call(SetCamPosC, CAM_DEFAULT, 87, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(30 * DT) + Call(SetCamDistance, CAM_DEFAULT, 150) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-16.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Loop(0) + Wait(1) + IfEq(MV_LakituSearchSync, 1) + BreakLoop + EndIf + EndLoop + Call(NpcFaceNpc, NPC_Lakitu_01, NPC_Lakitu_02, 1) + Call(NpcFaceNpc, NPC_Lakitu_02, NPC_Lakitu_01, 1) + Exec(N(EVS_LakitusFlying_Gather)) + Wait(30) + Call(SpeakToPlayer, NPC_Lakitu_01, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0, MSG_CH6_0088) + Call(NpcFaceNpc, NPC_Lakitu_02, NPC_Lakitu_01, 1) + Call(SpeakToPlayer, NPC_Lakitu_02, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0, MSG_CH6_0089) + Call(InterpNpcYaw, NPC_Lakitu_01, 0, 1) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_Lakitu_01, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0, MSG_CH6_008A) + Call(SpeakToPlayer, NPC_Lakitu_02, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0, MSG_CH6_008B) + Call(SetCamType, CAM_DEFAULT, 1, FALSE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(14.0), Float(-11.0)) + Call(SetCamDistance, CAM_DEFAULT, 450) + Call(SetCamPosA, CAM_DEFAULT, 87, 0) + Call(SetCamPosB, CAM_DEFAULT, 0, -50) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Exec(N(EVS_LakitusFlying_Attack)) + Call(SetNpcVar, NPC_Lakitu_01, 0, 1) + Return + End }; EvtScript N(EVS_NpcIdle_Lakitu_01) = { - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_THREAD - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4.0), 0, 1000, EVT_FLOAT(14.0), EVT_FLOAT(-11.0)) - EVT_END_THREAD - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_RETURN - EVT_END + Loop(0) + Call(GetSelfVar, 0, LVar0) + IfNe(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Thread + Call(AdjustCam, CAM_DEFAULT, Float(4.0), 0, 1000, Float(14.0), Float(-11.0)) + EndThread + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Return + End }; EvtScript N(EVS_NpcDefeat_Lakitu_01) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(SetNpcPos, NPC_Lakitu_01, 400, 20, -40) - EVT_CALL(SetNpcPos, NPC_Lakitu_02, 400, 20, 40) - EVT_CALL(InterpNpcYaw, NPC_Lakitu_01, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_Lakitu_02, 270, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, -60) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 900) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(24.0), EVT_FLOAT(-4.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-95.0), EVT_FLOAT(0.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(0.0), EVT_FLOAT(-50.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC_WAIT(N(EVS_LakitusFlying_Flee)) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_SET(GF_FLO11_Defeated_Lakitus, TRUE) - EVT_SET(MV_LakituAmbushState, 1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(SetNpcPos, NPC_Lakitu_01, 400, 20, -40) + Call(SetNpcPos, NPC_Lakitu_02, 400, 20, 40) + Call(InterpNpcYaw, NPC_Lakitu_01, 270, 0) + Call(InterpNpcYaw, NPC_Lakitu_02, 270, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar2, -60) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 900) + Call(SetCamPitch, CAM_DEFAULT, Float(24.0), Float(-4.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(-95.0), Float(0.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(0.0), Float(-50.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + ExecWait(N(EVS_LakitusFlying_Flee)) + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + Set(GF_FLO11_Defeated_Lakitus, TRUE) + Set(MV_LakituAmbushState, 1) + Call(DisablePlayerInput, FALSE) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcDefeat_Lakitu_02) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_LABEL(0) - EVT_IF_EQ(MV_LakituAmbushState, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Label(0) + IfEq(MV_LakituAmbushState, 0) + Wait(1) + Goto(0) + EndIf + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Lakitu_01) = { - EVT_CALL(SetNpcPos, NPC_Lakitu_01, NPC_DISPOSE_LOCATION) - EVT_IF_EQ(GF_FLO11_Defeated_Lakitus, FALSE) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_GOT_MAGICAL_BEAN) - EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, TRUE) - EVT_SET(MV_LakituAmbushState, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Lakitu_01))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Lakitu_01))) - EVT_CALL(SetNpcPos, NPC_Lakitu_01, 350, 120, -220) - EVT_CALL(InterpNpcYaw, NPC_Lakitu_01, 270, 1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Lakitu_01, NPC_DISPOSE_LOCATION) + IfEq(GF_FLO11_Defeated_Lakitus, FALSE) + IfGe(GB_StoryProgress, STORY_CH6_GOT_MAGICAL_BEAN) + IfEq(GF_FLO10_LilyRequestedWaterStone, TRUE) + Set(MV_LakituAmbushState, 0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Lakitu_01))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Lakitu_01))) + Call(SetNpcPos, NPC_Lakitu_01, 350, 120, -220) + Call(InterpNpcYaw, NPC_Lakitu_01, 270, 1) + EndIf + EndIf + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Lakitu_02) = { - EVT_CALL(SetNpcPos, NPC_Lakitu_02, NPC_DISPOSE_LOCATION) - EVT_IF_EQ(GF_FLO11_Defeated_Lakitus, FALSE) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_GOT_MAGICAL_BEAN) - EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, TRUE) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Lakitu_02))) - EVT_CALL(SetNpcPos, NPC_Lakitu_02, 200, 110, 29) - EVT_CALL(InterpNpcYaw, NPC_Lakitu_02, 0, 1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Lakitu_02, NPC_DISPOSE_LOCATION) + IfEq(GF_FLO11_Defeated_Lakitus, FALSE) + IfGe(GB_StoryProgress, STORY_CH6_GOT_MAGICAL_BEAN) + IfEq(GF_FLO10_LilyRequestedWaterStone, TRUE) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Lakitu_02))) + Call(SetNpcPos, NPC_Lakitu_02, 200, 110, 29) + Call(InterpNpcYaw, NPC_Lakitu_02, 0, 1) + EndIf + EndIf + EndIf + Return + End }; NpcData N(NpcData_Lakitus)[] = { diff --git a/src/world/area_flo/flo_11/flo_11_4_entity.c b/src/world/area_flo/flo_11/flo_11_4_entity.c index a0b15ab008c..a40eeeb9b59 100644 --- a/src/world/area_flo/flo_11/flo_11_4_entity.c +++ b/src/world/area_flo/flo_11/flo_11_4_entity.c @@ -2,8 +2,8 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), -220, 60, -75, 0, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_FLO11_MultiCoinBrick) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_MulticoinBlock), -220, 60, -75, 0, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_FLO11_MultiCoinBrick) + Return + End }; diff --git a/src/world/area_flo/flo_12/flo_12_1_music.c b/src/world/area_flo/flo_12/flo_12_1_music.c index 8acf9d369b1..2ad1e5a598c 100644 --- a/src/world/area_flo/flo_12/flo_12_1_music.c +++ b/src/world/area_flo/flo_12/flo_12_1_music.c @@ -1,31 +1,31 @@ #include "flo_12.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, flo_12_ENTRY_1) - EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) - EVT_ELSE - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, flo_12_ENTRY_1) + Call(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) + Else + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndSwitch + EndIf + Return + End }; EvtScript N(EVS_PushFlowerSong) = { - EVT_CALL(PushSong, SONG_FLOWER_NPC_THEME, 3) - EVT_RETURN - EVT_END + Call(PushSong, SONG_FLOWER_NPC_THEME, 3) + Return + End }; EvtScript N(EVS_PopMusic) = { - EVT_CALL(FadeOutMusic, 0, 250) - EVT_WAIT(10) - EVT_CALL(PopSong) - EVT_RETURN - EVT_END + Call(FadeOutMusic, 0, 250) + Wait(10) + Call(PopSong) + Return + End }; diff --git a/src/world/area_flo/flo_12/flo_12_2_main.c b/src/world/area_flo/flo_12/flo_12_2_main.c index 4b1dffe5ed6..51c7ea5256c 100644 --- a/src/world/area_flo/flo_12/flo_12_2_main.c +++ b/src/world/area_flo/flo_12/flo_12_2_main.c @@ -11,34 +11,34 @@ API_CALLABLE(N(SpawnSunEffect)) { EvtScript N(EVS_ExitWalk_flo_11_1) = EVT_EXIT_WALK(60, flo_12_ENTRY_0, "flo_11", flo_11_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_11_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_11_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_SET(AF_FLO_GivenCrystalBerry, FALSE) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o180, SURFACE_TYPE_FLOWERS) + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + Set(AF_FLO_GivenCrystalBerry, FALSE) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o180, SURFACE_TYPE_FLOWERS) EVT_FLOWER_SPAWN_REGION( -65, -210, 90, -110, 0) EVT_FLOWER_SPAWN_REGION( -200, 130, -80, 170, 0) EVT_FLOWER_SPAWN_REGION( -270, -80, -225, 125, 0) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, flo_12_ENTRY_1) - EVT_EXEC(N(EVS_Scene_SunReturns)) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, flo_12_ENTRY_1) + Exec(N(EVS_Scene_SunReturns)) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndIf + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Return + End }; diff --git a/src/world/area_flo/flo_12/flo_12_3_npc.c b/src/world/area_flo/flo_12/flo_12_3_npc.c index 00c5e1b2ae9..f0fbd6ca573 100644 --- a/src/world/area_flo/flo_12/flo_12_3_npc.c +++ b/src/world/area_flo/flo_12/flo_12_3_npc.c @@ -15,178 +15,178 @@ s32 N(KeyList)[] = { }; EvtScript N(EVS_Scene_SunReturns) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(GetNpcPos, NPC_Rosie, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-9.5)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -50) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_Rosie, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_00C7) - EVT_WAIT(10) - EVT_CALL(GotoMap, EVT_PTR("flo_03"), flo_03_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(GetNpcPos, NPC_Rosie, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-9.5)) + Call(SetCamPosA, CAM_DEFAULT, 0, 0) + Call(SetCamPosB, CAM_DEFAULT, 0, -50) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20) + Call(SpeakToPlayer, NPC_Rosie, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_00C7) + Wait(10) + Call(GotoMap, Ref("flo_03"), flo_03_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_PlayerApproachRosie) = { - EVT_WAIT(10) - EVT_CALL(SetNpcFlagBits, NPC_Rosie, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(PlayerMoveTo, -5, 20, 20) - EVT_CALL(SetNpcFlagBits, NPC_Rosie, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(PlayerFaceNpc, NPC_Rosie, TRUE) - EVT_RETURN - EVT_END + Wait(10) + Call(SetNpcFlagBits, NPC_Rosie, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(PlayerMoveTo, -5, 20, 20) + Call(SetNpcFlagBits, NPC_Rosie, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(PlayerFaceNpc, NPC_Rosie, TRUE) + Return + End }; EvtScript N(EVS_PlayerApproachRosieAndItem) = { - EVT_WAIT(10) - EVT_CALL(SetNpcFlagBits, NPC_Rosie, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(PlayerMoveTo, -5, 20, 20) - EVT_CALL(SetNpcFlagBits, NPC_Rosie, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(PlayerFaceNpc, NPC_Rosie, TRUE) - EVT_RETURN - EVT_END + Wait(10) + Call(SetNpcFlagBits, NPC_Rosie, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(PlayerMoveTo, -5, 20, 20) + Call(SetNpcFlagBits, NPC_Rosie, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(PlayerFaceNpc, NPC_Rosie, TRUE) + Return + End }; EvtScript N(EVS_NpcInteract_Rosie) = { - EVT_EXEC_WAIT(N(EVS_PushFlowerSong)) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_GOT_CRYSTAL_BERRY) - EVT_SWITCH(GF_FLO12_Met_Rosie) - EVT_CASE_EQ(0) - EVT_EXEC(N(EVS_PlayerApproachRosie)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(4.0), LVar0, LVar1, LVar2, 325, EVT_FLOAT(19.0), EVT_FLOAT(-9.5)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_Talk, ANIM_Rosie_Idle, 5, MSG_CH6_008C) - EVT_CALL(ShowChoice, MSG_Choice_0011) - EVT_WAIT(10) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Rosie_Talk, ANIM_Rosie_Idle, 5, MSG_CH6_008D) - EVT_CASE_EQ(1) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Rosie_Talk, ANIM_Rosie_Idle, 5, MSG_CH6_008E) - EVT_END_SWITCH - EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rosie_TakeOut) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rosie_IdleHold) - EVT_CALL(MakeItemEntity, ITEM_WATER_STONE, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, EVT_INDEX_OF_GAME_FLAG(GF_FLO12_HeldItemPickup)) - EVT_WAIT(10) - EVT_SWITCH(GF_FLO10_LilyRequestedWaterStone) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_TalkHold, 5, MSG_CH6_008F) - EVT_CASE_EQ(1) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_CarryRun) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_TalkHold, 5, MSG_CH6_008F) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_TakeItem) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0091) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Pray) - EVT_WAIT(40) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0092) - EVT_SET(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE) - EVT_END_SWITCH - EVT_SET(GF_FLO12_Met_Rosie, TRUE) - EVT_CASE_EQ(1) - EVT_SWITCH(GF_FLO12_RosieRequestedSomethingBeautiful) - EVT_CASE_EQ(0) - EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, TRUE) - EVT_EXEC(N(EVS_PlayerApproachRosieAndItem)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_TalkHold, 5, MSG_CH6_0090) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_TakeItem) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0091) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Pray) - EVT_WAIT(40) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0092) - EVT_SET(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_TalkHold, 5, MSG_CH6_0090) - EVT_END_IF - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0093) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH6_GOT_WATER_STONE) - EVT_CALL(FindKeyItem, ITEM_CRYSTAL_BERRY, LVar0) - EVT_IF_NE(LVar0, -1) - EVT_EXEC(N(EVS_PlayerApproachRosieAndItem)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(4.0), LVar0, LVar1, LVar2, 325, EVT_FLOAT(19.0), EVT_FLOAT(-9.5)) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0094) + ExecWait(N(EVS_PushFlowerSong)) + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_GOT_CRYSTAL_BERRY) + Switch(GF_FLO12_Met_Rosie) + CaseEq(0) + Exec(N(EVS_PlayerApproachRosie)) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(SetCamProperties, CAM_DEFAULT, Float(4.0), LVar0, LVar1, LVar2, 325, Float(19.0), Float(-9.5)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_Talk, ANIM_Rosie_Idle, 5, MSG_CH6_008C) + Call(ShowChoice, MSG_Choice_0011) + Wait(10) + Switch(LVar0) + CaseEq(0) + Call(ContinueSpeech, NPC_SELF, ANIM_Rosie_Talk, ANIM_Rosie_Idle, 5, MSG_CH6_008D) + CaseEq(1) + Call(ContinueSpeech, NPC_SELF, ANIM_Rosie_Talk, ANIM_Rosie_Idle, 5, MSG_CH6_008E) + EndSwitch + Call(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Rosie_TakeOut) + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_Rosie_IdleHold) + Call(MakeItemEntity, ITEM_WATER_STONE, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, EVT_INDEX_OF_GAME_FLAG(GF_FLO12_HeldItemPickup)) + Wait(10) + Switch(GF_FLO10_LilyRequestedWaterStone) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_TalkHold, 5, MSG_CH6_008F) + CaseEq(1) + Call(SetPlayerAnimation, ANIM_MarioW1_CarryRun) + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_TalkHold, 5, MSG_CH6_008F) + Call(SetPlayerAnimation, ANIM_MarioW1_TakeItem) + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0091) + Call(SetPlayerAnimation, ANIM_Mario1_Pray) + Wait(40) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0092) + Set(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE) + EndSwitch + Set(GF_FLO12_Met_Rosie, TRUE) + CaseEq(1) + Switch(GF_FLO12_RosieRequestedSomethingBeautiful) + CaseEq(0) + IfEq(GF_FLO10_LilyRequestedWaterStone, TRUE) + Exec(N(EVS_PlayerApproachRosieAndItem)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_TalkHold, 5, MSG_CH6_0090) + Call(SetPlayerAnimation, ANIM_MarioW1_TakeItem) + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0091) + Call(SetPlayerAnimation, ANIM_Mario1_Pray) + Wait(40) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0092) + Set(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_TalkHold, 5, MSG_CH6_0090) + EndIf + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0093) + EndSwitch + EndSwitch + CaseLt(STORY_CH6_GOT_WATER_STONE) + Call(FindKeyItem, ITEM_CRYSTAL_BERRY, LVar0) + IfNe(LVar0, -1) + Exec(N(EVS_PlayerApproachRosieAndItem)) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(SetCamProperties, CAM_DEFAULT, Float(4.0), LVar0, LVar1, LVar2, 325, Float(19.0), Float(-9.5)) + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0094) EVT_CHOOSE_KEY_ITEM_FROM(N(KeyList)) - EVT_SWITCH(LVar0) - EVT_CASE_LE(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0093) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0095) - EVT_CALL(RemoveItemEntity, LVar7) - EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, EVT_INDEX_OF_GAME_FLAG(GF_FLO12_HeldItemPickup)) + Switch(LVar0) + CaseLe(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0093) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0095) + Call(RemoveItemEntity, LVar7) + Call(MakeItemEntity, ITEM_CRYSTAL_BERRY, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, EVT_INDEX_OF_GAME_FLAG(GF_FLO12_HeldItemPickup)) EVT_GIVE_KEY_REWARD(ITEM_WATER_STONE) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0096) - EVT_SET(AF_FLO_GivenCrystalBerry, TRUE) - EVT_SET(GB_StoryProgress, STORY_CH6_GOT_WATER_STONE) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_SWITCH(AF_FLO_GivenCrystalBerry) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0097) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0096) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH6_RETURNED_TO_TOAD_TOWN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0098) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0099) - EVT_END_SWITCH - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_EXEC_WAIT(N(EVS_PopMusic)) - EVT_RETURN - EVT_END + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0096) + Set(AF_FLO_GivenCrystalBerry, TRUE) + Set(GB_StoryProgress, STORY_CH6_GOT_WATER_STONE) + EndSwitch + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Switch(AF_FLO_GivenCrystalBerry) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0097) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0096) + EndSwitch + CaseLt(STORY_CH6_RETURNED_TO_TOAD_TOWN) + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0098) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0099) + EndSwitch + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + ExecWait(N(EVS_PopMusic)) + Return + End }; EvtScript N(EVS_NpcInit_Rosie) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Rosie))) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 35) - EVT_CALL(SetNpcPos, NPC_Dummy, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_HAS_SHADOW, TRUE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_GOT_CRYSTAL_BERRY) - EVT_IF_EQ(GF_FLO12_Met_Rosie, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rosie_IdleHold) - EVT_CALL(MakeItemEntity, ITEM_WATER_STONE, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, EVT_INDEX_OF_GAME_FLAG(GF_FLO12_HeldItemPickup)) - EVT_SET(LVarA, LVar0) - EVT_END_IF - EVT_CASE_LT(STORY_CH6_GOT_WATER_STONE) - EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rosie_IdleHold) - EVT_CALL(MakeItemEntity, ITEM_WATER_STONE, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, EVT_INDEX_OF_GAME_FLAG(GF_FLO12_HeldItemPickup)) - EVT_SET(LVarA, LVar0) - EVT_CASE_DEFAULT - EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rosie_IdleHold) - EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, EVT_INDEX_OF_GAME_FLAG(GF_FLO12_HeldItemPickup)) - EVT_SET(LVarA, LVar0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Rosie))) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 35) + Call(SetNpcPos, NPC_Dummy, LVar0, LVar1, LVar2) + Call(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_INVISIBLE, TRUE) + Call(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_HAS_SHADOW, TRUE) + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_GOT_CRYSTAL_BERRY) + IfEq(GF_FLO12_Met_Rosie, TRUE) + Call(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Rosie_IdleHold) + Call(MakeItemEntity, ITEM_WATER_STONE, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, EVT_INDEX_OF_GAME_FLAG(GF_FLO12_HeldItemPickup)) + Set(LVarA, LVar0) + EndIf + CaseLt(STORY_CH6_GOT_WATER_STONE) + Call(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Rosie_IdleHold) + Call(MakeItemEntity, ITEM_WATER_STONE, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, EVT_INDEX_OF_GAME_FLAG(GF_FLO12_HeldItemPickup)) + Set(LVarA, LVar0) + CaseDefault + Call(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Rosie_IdleHold) + Call(MakeItemEntity, ITEM_CRYSTAL_BERRY, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, EVT_INDEX_OF_GAME_FLAG(GF_FLO12_HeldItemPickup)) + Set(LVarA, LVar0) + EndSwitch + Return + End }; NpcData N(NpcData_Rosie)[] = { diff --git a/src/world/area_flo/flo_13/flo_13_1_music.c b/src/world/area_flo/flo_13/flo_13_1_music.c index 01494355457..4750aeb400a 100644 --- a/src/world/area_flo/flo_13/flo_13_1_music.c +++ b/src/world/area_flo/flo_13/flo_13_1_music.c @@ -1,59 +1,59 @@ #include "flo_13.h" EvtScript N(EVS_PlaySongForPlayerPos) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, -500) - EVT_GOTO(10) - EVT_END_IF - EVT_LABEL(0) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, -500) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_LABEL(10) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_SUN_TOWER_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_SUN_TOWER_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, -500) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, -500) + Goto(10) + EndIf + Label(0) + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndSwitch + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, -500) + BreakLoop + EndIf + Wait(1) + EndLoop + Label(10) + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_SUN_TOWER_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_SUN_TOWER_SUNNY, 0, 8) + EndSwitch + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar0, -500) + BreakLoop + EndIf + Wait(1) + EndLoop + Goto(0) + Return + End }; EvtScript N(EVS_SetupMusic) = { - EVT_EXEC(N(EVS_PlaySongForPlayerPos)) - EVT_RETURN - EVT_END + Exec(N(EVS_PlaySongForPlayerPos)) + Return + End }; EvtScript N(EVS_PushPartnerSong) = { - EVT_CALL(SetMusicTrack, 0, SONG_NEW_PARTNER, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_NEW_PARTNER, 0, 8) + Return + End }; EvtScript N(EVS_PopSong) = { - EVT_CALL(FadeOutMusic, 0, 500) - EVT_WAIT(15) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_RETURN - EVT_END + Call(FadeOutMusic, 0, 500) + Wait(15) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + Return + End }; diff --git a/src/world/area_flo/flo_13/flo_13_2_entity.c b/src/world/area_flo/flo_13/flo_13_2_entity.c index e2ce62e5e01..1f6db154c22 100644 --- a/src/world/area_flo/flo_13/flo_13_2_entity.c +++ b/src/world/area_flo/flo_13/flo_13_2_entity.c @@ -2,20 +2,20 @@ #include "entity.h" EvtScript N(EVS_OnBlast_Rock) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o85, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o85, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_MEGA_SMASH, -61, 60, -85, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO13_Item_MegaSmash) - EVT_CALL(MakeItemEntity, ITEM_SHOOTING_STAR, 128, 0, 157, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO13_Item_ShootingStar) - EVT_IF_EQ(GF_FLO13_Item_MegaSmash, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BombableRock), -160, 160, -90, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBlast_Rock))) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o85, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_MEGA_SMASH, -61, 60, -85, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO13_Item_MegaSmash) + Call(MakeItemEntity, ITEM_SHOOTING_STAR, 128, 0, 157, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO13_Item_ShootingStar) + IfEq(GF_FLO13_Item_MegaSmash, FALSE) + Call(MakeEntity, Ref(Entity_BombableRock), -160, 160, -90, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnBlast_Rock))) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o85, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Return + End }; diff --git a/src/world/area_flo/flo_13/flo_13_3_main.c b/src/world/area_flo/flo_13/flo_13_3_main.c index a7ee2277b2c..84701865d77 100644 --- a/src/world/area_flo/flo_13/flo_13_3_main.c +++ b/src/world/area_flo/flo_13/flo_13_3_main.c @@ -11,33 +11,33 @@ EvtScript N(EVS_ExitWalk_flo_14_1) = EVT_EXIT_WALK(60, flo_13_ENTRY_0, "flo_14", EvtScript N(EVS_ExitWalk_flo_15_0) = EVT_EXIT_WALK(60, flo_13_ENTRY_1, "flo_15", flo_15_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_15_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_14_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_15_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_flo_14_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o48, SURFACE_TYPE_FLOWERS) + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o48, SURFACE_TYPE_FLOWERS) EVT_FLOWER_SPAWN_REGION( 274, -137, 583, -64, 0) EVT_FLOWER_SPAWN_REGION( 433, 108, 580, 169, 0) EVT_FLOWER_SPAWN_REGION( -460, 90, -125, 130, 0) EVT_FLOWER_SPAWN_REGION( -420, -130, -260, -90, 0) EVT_FLOWER_SPAWN_REGION( -220, -137, 0, -50, 160) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Return + End }; diff --git a/src/world/area_flo/flo_13/flo_13_4_npc.c b/src/world/area_flo/flo_13/flo_13_4_npc.c index 5997c967eaf..222d2d0a2c8 100644 --- a/src/world/area_flo/flo_13/flo_13_4_npc.c +++ b/src/world/area_flo/flo_13/flo_13_4_npc.c @@ -94,503 +94,503 @@ Vec3f N(FlightPath_LakiluluDeparts)[] = { }; EvtScript N(EVS_Lakliester_ManageYaw) = { - EVT_CALL(GetNpcPos, NPC_Lakilester, LVar0, LVar1, LVar2) - EVT_LABEL(0) - EVT_CALL(GetNpcPos, NPC_Lakilester, LVar3, LVar4, LVar5) - EVT_CALL(N(UnkFunc42)) - EVT_CALL(InterpNpcYaw, NPC_Lakilester, LVarA, 0) - EVT_SET(LVar0, LVar3) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_CALL(GetAngleBetweenNPCs, NPC_PARTNER, NPC_Lakilester, LVarA) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, LVarA, 0) - EVT_CALL(PlayerFaceNpc, NPC_Lakilester, FALSE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_Lakilester, LVar0, LVar1, LVar2) + Label(0) + Call(GetNpcPos, NPC_Lakilester, LVar3, LVar4, LVar5) + Call(N(UnkFunc42)) + Call(InterpNpcYaw, NPC_Lakilester, LVarA, 0) + Set(LVar0, LVar3) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Call(GetAngleBetweenNPCs, NPC_PARTNER, NPC_Lakilester, LVarA) + Call(InterpNpcYaw, NPC_PARTNER, LVarA, 0) + Call(PlayerFaceNpc, NPC_Lakilester, FALSE) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_Laklilulu_ManageYaw) = { - EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) - EVT_LABEL(0) - EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar3, LVar4, LVar5) - EVT_CALL(N(UnkFunc42)) - EVT_CALL(InterpNpcYaw, NPC_Lakilulu, LVarA, 0) - EVT_SET(LVar0, LVar3) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_CALL(GetAngleBetweenNPCs, NPC_PARTNER, NPC_Lakilulu, LVarA) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, LVarA, 0) - EVT_IF_LT(GB_StoryProgress, STORY_CH6_LAKILESTER_JOINED_PARTY) - EVT_CALL(GetAngleBetweenNPCs, NPC_Lakilester, NPC_Lakilulu, LVarB) - EVT_CALL(InterpNpcYaw, NPC_Lakilester, LVarB, 0) - EVT_END_IF - EVT_CALL(PlayerFaceNpc, NPC_Lakilulu, FALSE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + Label(0) + Call(GetNpcPos, NPC_Lakilulu, LVar3, LVar4, LVar5) + Call(N(UnkFunc42)) + Call(InterpNpcYaw, NPC_Lakilulu, LVarA, 0) + Set(LVar0, LVar3) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Call(GetAngleBetweenNPCs, NPC_PARTNER, NPC_Lakilulu, LVarA) + Call(InterpNpcYaw, NPC_PARTNER, LVarA, 0) + IfLt(GB_StoryProgress, STORY_CH6_LAKILESTER_JOINED_PARTY) + Call(GetAngleBetweenNPCs, NPC_Lakilester, NPC_Lakilulu, LVarB) + Call(InterpNpcYaw, NPC_Lakilester, LVarB, 0) + EndIf + Call(PlayerFaceNpc, NPC_Lakilulu, FALSE) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_LakiluluAndSpiny_HoverBobbing) = { - EVT_SET(MV_LakiluluSpinySceneState, 0) - EVT_LOOP(0) - EVT_LOOP(2) - EVT_CALL(GetNpcPos, NPC_Lakilulu_Spiny, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_Lakilulu_Spiny, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) - EVT_WAIT(2) - EVT_END_LOOP - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(GetNpcPos, NPC_Lakilulu_Spiny, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, -1) - EVT_CALL(SetNpcPos, NPC_Lakilulu_Spiny, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, -1) - EVT_CALL(SetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) - EVT_WAIT(2) - EVT_END_LOOP - EVT_WAIT(1) - EVT_IF_EQ(MV_LakiluluSpinySceneState, 1) - EVT_SET(MV_LakiluluSpinySceneState, 2) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(MV_LakiluluSpinySceneState, 0) + Loop(0) + Loop(2) + Call(GetNpcPos, NPC_Lakilulu_Spiny, LVar0, LVar1, LVar2) + Add(LVar1, 1) + Call(SetNpcPos, NPC_Lakilulu_Spiny, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + Add(LVar1, 1) + Call(SetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + Wait(2) + EndLoop + Wait(1) + Loop(2) + Call(GetNpcPos, NPC_Lakilulu_Spiny, LVar0, LVar1, LVar2) + Add(LVar1, -1) + Call(SetNpcPos, NPC_Lakilulu_Spiny, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + Add(LVar1, -1) + Call(SetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + Wait(2) + EndLoop + Wait(1) + IfEq(MV_LakiluluSpinySceneState, 1) + Set(MV_LakiluluSpinySceneState, 2) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_Lakilulu_SpinyToss) = { - EVT_EXEC(N(EVS_LakiluluAndSpiny_HoverBobbing)) - EVT_CALL(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Lift) - EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, -5) - EVT_ADD(LVar2, 30) - EVT_ADD(LVar3, 2) - EVT_CALL(SetNpcYaw, NPC_Lakilulu_Spiny, 270) - EVT_CALL(SetNpcPos, NPC_Lakilulu_Spiny, LVar1, LVar2, LVar3) - EVT_THREAD - EVT_WAIT(5 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_END_THREAD - EVT_CALL(ContinueSpeech, NPC_Lakilulu, -1, -1, SPEECH_FLAG_200, MSG_CH6_00A8) - EVT_THREAD - EVT_WAIT(15 * DT) - EVT_CALL(EndSpeech, NPC_Lakilulu, -1, -1, SPEECH_FLAG_200) - EVT_END_THREAD - EVT_SET(MV_LakiluluSpinySceneState, 1) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_EQ(MV_LakiluluSpinySceneState, 2) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Throw) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, 5) - EVT_ADD(LVar2, 20) - EVT_CALL(SetNpcJumpscale, NPC_Lakilulu_Spiny, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump0, NPC_Lakilulu_Spiny, LVar1, LVar2, LVar3, 7) - EVT_ADD(LVar1, -100) - EVT_ADD(LVar2, 10) - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Lakilulu_Spiny, EVT_FLOAT(1.5)) - EVT_CALL(NpcJump0, NPC_Lakilulu_Spiny, LVar1, LVar2, LVar3, 15 * DT) - EVT_CALL(SetNpcPos, NPC_Lakilulu_Spiny, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(2.0)) - EVT_END_THREAD - EVT_CALL(PlaySoundAtPlayer, SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_DEFAULT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Hurt) - EVT_SET(LVar0, 90) - EVT_LOOP(20) - EVT_ADD(LVar0, 144) - EVT_IF_GT(LVar0, 359) - EVT_SUB(LVar0, 360) - EVT_END_IF - EVT_CALL(InterpPlayerYaw, LVar0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Still) - EVT_CALL(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Idle) - EVT_RETURN - EVT_END + Exec(N(EVS_LakiluluAndSpiny_HoverBobbing)) + Call(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Lift) + Call(GetNpcPos, NPC_Lakilulu, LVar1, LVar2, LVar3) + Add(LVar1, -5) + Add(LVar2, 30) + Add(LVar3, 2) + Call(SetNpcYaw, NPC_Lakilulu_Spiny, 270) + Call(SetNpcPos, NPC_Lakilulu_Spiny, LVar1, LVar2, LVar3) + Thread + Wait(5 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + EndThread + Call(ContinueSpeech, NPC_Lakilulu, -1, -1, SPEECH_FLAG_200, MSG_CH6_00A8) + Thread + Wait(15 * DT) + Call(EndSpeech, NPC_Lakilulu, -1, -1, SPEECH_FLAG_200) + EndThread + Set(MV_LakiluluSpinySceneState, 1) + Loop(0) + Wait(1) + IfEq(MV_LakiluluSpinySceneState, 2) + BreakLoop + EndIf + EndLoop + Call(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Throw) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + Add(LVar1, 5) + Add(LVar2, 20) + Call(SetNpcJumpscale, NPC_Lakilulu_Spiny, Float(0.0)) + Call(NpcJump0, NPC_Lakilulu_Spiny, LVar1, LVar2, LVar3, 7) + Add(LVar1, -100) + Add(LVar2, 10) + Thread + Call(SetNpcJumpscale, NPC_Lakilulu_Spiny, Float(1.5)) + Call(NpcJump0, NPC_Lakilulu_Spiny, LVar1, LVar2, LVar3, 15 * DT) + Call(SetNpcPos, NPC_Lakilulu_Spiny, NPC_DISPOSE_LOCATION) + EndThread + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(2.0)) + EndThread + Call(PlaySoundAtPlayer, SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_DEFAULT) + Call(SetPlayerAnimation, ANIM_Mario1_Hurt) + Set(LVar0, 90) + Loop(20) + Add(LVar0, 144) + IfGt(LVar0, 359) + Sub(LVar0, 360) + EndIf + Call(InterpPlayerYaw, LVar0, 1) + Wait(1) + EndLoop + Call(SetPlayerAnimation, ANIM_Mario1_Still) + Call(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Idle) + Return + End }; EvtScript N(EVS_NpcIdle_Lakilester) = { - EVT_IF_NE(GB_StoryProgress, STORY_CH6_SPOKE_WITH_THE_SUN) - EVT_RETURN - EVT_END_IF - EVT_CALL(AwaitPlayerApproach, 200, 20, 275) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcPos, NPC_Lakilester, -250, 120, 45) - EVT_CALL(SetMusicTrack, 0, SONG_LAKILESTER_THEME, 0, 8) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH6_00A0, 160, 40) - EVT_CALL(InterruptUsePartner) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_WAIT(20 * DT) - EVT_CALL(InterpPlayerYaw, 270, 1) - EVT_WAIT(20 * DT) - EVT_CALL(InterpPlayerYaw, 90, 1) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Still) - EVT_CALL(func_802CF56C, 2) - EVT_CALL(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Run) - EVT_THREAD - EVT_CALL(N(PlayLakilesterFlightSounds)) - EVT_END_THREAD - EVT_EXEC_GET_TID(N(EVS_Lakliester_ManageYaw), LVar9) - EVT_CALL(LoadPath, 80 * DT, EVT_PTR(N(FlightPath_LakilesterAmbush)), ARRAY_COUNT(N(FlightPath_LakilesterAmbush)), EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Lakilester, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_KILL_THREAD(LVar9) - EVT_CALL(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Idle) - EVT_CALL(PlayerFaceNpc, NPC_Lakilester, FALSE) - EVT_WAIT(15 * DT) - EVT_CALL(GetNpcPos, NPC_Lakilester, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 200) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.0), EVT_FLOAT(-8.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_CALL(PlayerMoveTo, -75, 65, 10 * DT) - EVT_CALL(PlayerFaceNpc, NPC_Lakilester, FALSE) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00A1) - EVT_CALL(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Run) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Idle) - EVT_THREAD - EVT_CALL(SetCamDistance, CAM_DEFAULT, 1000) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_RETURN - EVT_END + IfNe(GB_StoryProgress, STORY_CH6_SPOKE_WITH_THE_SUN) + Return + EndIf + Call(AwaitPlayerApproach, 200, 20, 275) + Call(DisablePlayerInput, TRUE) + Call(SetNpcPos, NPC_Lakilester, -250, 120, 45) + Call(SetMusicTrack, 0, SONG_LAKILESTER_THEME, 0, 8) + Call(ShowMessageAtScreenPos, MSG_CH6_00A0, 160, 40) + Call(InterruptUsePartner) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Wait(20 * DT) + Call(InterpPlayerYaw, 270, 1) + Wait(20 * DT) + Call(InterpPlayerYaw, 90, 1) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Still) + Call(func_802CF56C, 2) + Call(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Run) + Thread + Call(N(PlayLakilesterFlightSounds)) + EndThread + ExecGetTID(N(EVS_Lakliester_ManageYaw), LVar9) + Call(LoadPath, 80 * DT, Ref(N(FlightPath_LakilesterAmbush)), ARRAY_COUNT(N(FlightPath_LakilesterAmbush)), EASING_LINEAR) + Label(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Lakilester, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(0) + EndIf + KillThread(LVar9) + Call(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Idle) + Call(PlayerFaceNpc, NPC_Lakilester, FALSE) + Wait(15 * DT) + Call(GetNpcPos, NPC_Lakilester, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 200) + Call(SetCamPitch, CAM_DEFAULT, Float(18.0), Float(-8.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Call(PlayerMoveTo, -75, 65, 10 * DT) + Call(PlayerFaceNpc, NPC_Lakilester, FALSE) + EndThread + Call(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00A1) + Call(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Run) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Idle) + Thread + Call(SetCamDistance, CAM_DEFAULT, 1000) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-6.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndThread + Call(DisablePlayerInput, FALSE) + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Return + End }; EvtScript N(EVS_Lakilulu_FlyAway) = { - EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) - EVT_CALL(AwaitPlayerLeave, LVar0, LVar2, 120) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, 0, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(5.5), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(NpcFaceNpc, NPC_Lakilulu, NPC_Lakilester, 1) - EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_00B4) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Lakilulu, 1) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 600) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(10.0), EVT_FLOAT(-8.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 130, -200) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_CALL(N(PlayLakiluluFlightSounds), 55 * DT) - EVT_END_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Lakilulu, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_EXEC_GET_TID(N(EVS_Laklilulu_ManageYaw), LVar9) - EVT_CALL(LoadPath, 55 * DT, EVT_PTR(N(FlightPath_LakiluluDeparts)), ARRAY_COUNT(N(FlightPath_LakiluluDeparts)), EASING_LINEAR) - EVT_LABEL(20) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Lakilulu, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_KILL_THREAD(LVar9) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_CALL(BringPartnerOut, PARTNER_LAKILESTER) - EVT_IF_NE(LVar0, PARTNER_LAKILESTER) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0)) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar2, 20) - EVT_ADD(LVar3, 20) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar1, LVar2, LVar3, 30 * DT) - EVT_END_IF - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_WAIT(5 * DT) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5, MSG_CH6_00B5) - EVT_CALL(EnablePartnerAI) - EVT_CALL(PutPartnerAway) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + Call(AwaitPlayerLeave, LVar0, LVar2, 120) + Call(DisablePlayerInput, TRUE) + Call(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, 0, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 250) + Call(SetCamPitch, CAM_DEFAULT, Float(5.5), Float(-7.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(NpcFaceNpc, NPC_Lakilulu, NPC_Lakilester, 1) + Call(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_00B4) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Lakilulu, 1) + Call(SetCamDistance, CAM_DEFAULT, 600) + Call(SetCamPitch, CAM_DEFAULT, Float(10.0), Float(-8.0)) + Call(SetCamPosA, CAM_DEFAULT, 0, 0) + Call(SetCamPosB, CAM_DEFAULT, 130, -200) + Call(SetCamPosC, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Call(N(PlayLakiluluFlightSounds), 55 * DT) + EndThread + Call(SetNpcFlagBits, NPC_Lakilulu, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + ExecGetTID(N(EVS_Laklilulu_ManageYaw), LVar9) + Call(LoadPath, 55 * DT, Ref(N(FlightPath_LakiluluDeparts)), ARRAY_COUNT(N(FlightPath_LakiluluDeparts)), EASING_LINEAR) + Label(20) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Lakilulu, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(20) + EndIf + KillThread(LVar9) + Call(GetCurrentPartnerID, LVar0) + Call(BringPartnerOut, PARTNER_LAKILESTER) + IfNe(LVar0, PARTNER_LAKILESTER) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.0)) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + Add(LVar1, 20) + Add(LVar2, 20) + Add(LVar3, 20) + Call(NpcJump0, NPC_PARTNER, LVar1, LVar2, LVar3, 30 * DT) + EndIf + Call(DisablePartnerAI, 0) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + Wait(5 * DT) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5, MSG_CH6_00B5) + Call(EnablePartnerAI) + Call(PutPartnerAway) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Scene_LakilesterDefeated) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_TiredTalk, ANIM_WorldLakilester_Tired, 0, MSG_CH6_00A2) - EVT_CALL(SetNpcPos, NPC_Lakilulu, -290, 120, 45) - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldLakilester_Idle) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_WAIT(20 * DT) - EVT_CALL(InterpPlayerYaw, 270, 1) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 5, MSG_CH6_00A3) - EVT_CALL(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Panic) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 500) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(5.5), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 130, -200) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_THREAD - EVT_CALL(SetCamDistance, CAM_DEFAULT, 400) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 130, 60) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(PlayLakiluluFlightSounds), 80 * DT) - EVT_END_THREAD - EVT_EXEC_GET_TID(N(EVS_Laklilulu_ManageYaw), LVar9) - EVT_CALL(LoadPath, 80 * DT, EVT_PTR(N(FlightPath_LakiluluArrives)), ARRAY_COUNT(N(FlightPath_LakiluluArrives)), EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Lakilulu, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_KILL_THREAD(LVar9) - EVT_CALL(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_ConcernedNod) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Still) - EVT_WAIT(20 * DT) - EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(5.5), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00A4) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Shout, ANIM_Lakilulu_Shout, 0, MSG_CH6_00A5) - EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Shout, ANIM_WorldLakilester_IdleTough, 0, MSG_CH6_00A6) - EVT_CALL(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Idle) - EVT_CALL(EndSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(10.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_LABEL(10) - EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_ConcernedTalk, ANIM_Lakilulu_ConcernedNod, 0, MSG_CH6_00A7) - EVT_CALL(ShowChoice, MSG_Choice_0020) - EVT_IF_NE(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_Lakilulu_SpinyToss)) - EVT_WAIT(10 * DT) - EVT_GOTO(10) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_00A9) - EVT_CALL(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Idle) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Still) - EVT_WAIT(20 * DT) - EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Shout, ANIM_WorldLakilester_IdleTough, 0, MSG_CH6_00AA) - EVT_CALL(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Idle) - EVT_CALL(EndSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Shout, ANIM_WorldLakilester_IdleTough, 0, MSG_CH6_00AB) - EVT_WAIT(10 * DT) - EVT_CALL(ShowChoice, MSG_Choice_0021) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(-1) - EVT_CASE_EQ(0) - EVT_CALL(ContinueSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00AC) - EVT_CASE_EQ(1) - EVT_CALL(ContinueSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00AD) - EVT_CASE_EQ(2) - EVT_CALL(ContinueSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00AE) - EVT_CASE_EQ(3) - EVT_CALL(ContinueSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00AF) - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(InterpNpcYaw, NPC_Lakilulu, 90, 1) - EVT_CALL(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_ConcernedNod) - EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_ConcernedTalk, ANIM_Lakilulu_ConcernedNod, 5, MSG_CH6_00B0) - EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00B1) - EVT_WAIT(15 * DT) - EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_ConcernedTalk, ANIM_Lakilulu_ConcernedNod, 5, MSG_CH6_00B2) - EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00B3) - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_END_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetNpcSpeed, NPC_Lakilester, EVT_FLOAT(3.5 / DT)) - EVT_CALL(NpcMoveTo, NPC_Lakilester, LVar0, 60, 0) - EVT_CALL(N(ChangeNpcToPartner), 0, 8) - EVT_CALL(N(LoadPartyImage)) - EVT_EXEC(N(EVS_PushPartnerSong)) - EVT_WAIT(15 * DT) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0190, 160, 40) - EVT_EXEC(N(EVS_PopSong)) - EVT_WAIT(10 * DT) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_SET(GB_StoryProgress, STORY_CH6_LAKILESTER_JOINED_PARTY) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_EXEC_WAIT(N(EVS_Lakilulu_FlyAway)) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Wait(30 * DT) + Call(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_TiredTalk, ANIM_WorldLakilester_Tired, 0, MSG_CH6_00A2) + Call(SetNpcPos, NPC_Lakilulu, -290, 120, 45) + Thread + Wait(10 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldLakilester_Idle) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Wait(20 * DT) + Call(InterpPlayerYaw, 270, 1) + EndThread + Call(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 5, MSG_CH6_00A3) + Call(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Panic) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, 500) + Call(SetCamPitch, CAM_DEFAULT, Float(5.5), Float(-6.0)) + Call(SetCamPosA, CAM_DEFAULT, 0, 0) + Call(SetCamPosB, CAM_DEFAULT, 130, -200) + Call(SetCamPosC, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Thread + Call(SetCamDistance, CAM_DEFAULT, 400) + Call(SetCamPosB, CAM_DEFAULT, 130, 60) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndThread + Thread + Call(N(PlayLakiluluFlightSounds), 80 * DT) + EndThread + ExecGetTID(N(EVS_Laklilulu_ManageYaw), LVar9) + Call(LoadPath, 80 * DT, Ref(N(FlightPath_LakiluluArrives)), ARRAY_COUNT(N(FlightPath_LakiluluArrives)), EASING_LINEAR) + Label(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Lakilulu, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(0) + EndIf + KillThread(LVar9) + Call(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_ConcernedNod) + Call(SetPlayerAnimation, ANIM_Mario1_Still) + Wait(20 * DT) + Call(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 250) + Call(SetCamPitch, CAM_DEFAULT, Float(5.5), Float(-7.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00A4) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Shout, ANIM_Lakilulu_Shout, 0, MSG_CH6_00A5) + Call(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 250) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Shout, ANIM_WorldLakilester_IdleTough, 0, MSG_CH6_00A6) + Call(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Idle) + Call(EndSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(SetCamSpeed, CAM_DEFAULT, Float(10.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Label(10) + Call(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_ConcernedTalk, ANIM_Lakilulu_ConcernedNod, 0, MSG_CH6_00A7) + Call(ShowChoice, MSG_Choice_0020) + IfNe(LVar0, 0) + ExecWait(N(EVS_Lakilulu_SpinyToss)) + Wait(10 * DT) + Goto(10) + Else + Call(ContinueSpeech, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_00A9) + Call(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Idle) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Still) + Wait(20 * DT) + Call(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 250) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Shout, ANIM_WorldLakilester_IdleTough, 0, MSG_CH6_00AA) + Call(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Idle) + Call(EndSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Shout, ANIM_WorldLakilester_IdleTough, 0, MSG_CH6_00AB) + Wait(10 * DT) + Call(ShowChoice, MSG_Choice_0021) + Switch(LVar0) + CaseEq(-1) + CaseEq(0) + Call(ContinueSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00AC) + CaseEq(1) + Call(ContinueSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00AD) + CaseEq(2) + Call(ContinueSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00AE) + CaseEq(3) + Call(ContinueSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00AF) + EndSwitch + EndIf + Call(InterpNpcYaw, NPC_Lakilulu, 90, 1) + Call(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_ConcernedNod) + Call(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_ConcernedTalk, ANIM_Lakilulu_ConcernedNod, 5, MSG_CH6_00B0) + Call(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00B1) + Wait(15 * DT) + Call(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_ConcernedTalk, ANIM_Lakilulu_ConcernedNod, 5, MSG_CH6_00B2) + Call(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00B3) + Wait(10 * DT) + Thread + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + EndThread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(SetNpcSpeed, NPC_Lakilester, Float(3.5 / DT)) + Call(NpcMoveTo, NPC_Lakilester, LVar0, 60, 0) + Call(N(ChangeNpcToPartner), 0, 8) + Call(N(LoadPartyImage)) + Exec(N(EVS_PushPartnerSong)) + Wait(15 * DT) + Call(ShowMessageAtScreenPos, MSG_Menus_0190, 160, 40) + Exec(N(EVS_PopSong)) + Wait(10 * DT) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Set(GB_StoryProgress, STORY_CH6_LAKILESTER_JOINED_PARTY) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + ExecWait(N(EVS_Lakilulu_FlyAway)) + Return + End }; EvtScript N(EVS_NpcDefeat_Lakilester) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldLakilester_Tired) - EVT_CALL(SetCamType, CAM_DEFAULT, 6, TRUE) - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar1, LVar2) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, LVar3) - EVT_DIV(LVar0, 2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC(N(EVS_Scene_LakilesterDefeated)) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldLakilester_Tired) + Call(SetCamType, CAM_DEFAULT, 6, TRUE) + Call(GetNpcPos, NPC_SELF, LVar3, LVar1, LVar2) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, LVar3) + Div(LVar0, 2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-7.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Exec(N(EVS_Scene_LakilesterDefeated)) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Lakilulu) = { - EVT_IF_LE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0032) - EVT_ELSE - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_NE(LVar0, PARTNER_LAKILESTER) - EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0034) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0032) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfLe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0032) + Else + Call(GetCurrentPartnerID, LVar0) + IfNe(LVar0, PARTNER_LAKILESTER) + Call(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0034) + Else + Call(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0032) + EndIf + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Lakilester) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH6_LAKILESTER_JOINED_PARTY) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Lakilester))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Lakilester))) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH6_LAKILESTER_JOINED_PARTY) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Lakilester))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Lakilester))) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Lakilulu) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lakilulu))) - EVT_CALL(SetNpcCollisionSize, NPC_SELF, 36, 28) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetNpcPos, NPC_SELF, -50, 180, -50) - EVT_END_IF - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Lakilulu))) + Call(SetNpcCollisionSize, NPC_SELF, 36, 28) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetNpcPos, NPC_SELF, -50, 180, -50) + EndIf + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Lakilulu_Spiny) = { - EVT_CALL(SetNpcPos, NPC_Lakilulu_Spiny, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcAnimation, NPC_Lakilulu_Spiny, ANIM_Lakilulu_Spiny) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Lakilulu_Spiny, NPC_DISPOSE_LOCATION) + Call(SetNpcAnimation, NPC_Lakilulu_Spiny, ANIM_Lakilulu_Spiny) + Return + End }; EvtScript N(EVS_NpcInit_Lakitu) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH6_SPOKE_WITH_THE_SUN) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH6_SPOKE_WITH_THE_SUN) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Spiny) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH6_SPOKE_WITH_THE_SUN) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_CALL(SetSelfVar, 13, 1) - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH6_SPOKE_WITH_THE_SUN) + Call(RemoveNpc, NPC_SELF) + EndIf + Call(SetSelfVar, 13, 1) + Return + End }; NpcData N(NpcData_Lakilester) = { diff --git a/src/world/area_flo/flo_14/flo_14_1_music.c b/src/world/area_flo/flo_14/flo_14_1_music.c index b59f8bf4e91..8a64cc9f69d 100644 --- a/src/world/area_flo/flo_14/flo_14_1_music.c +++ b/src/world/area_flo/flo_14/flo_14_1_music.c @@ -1,12 +1,12 @@ #include "flo_14.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_flo/flo_14/flo_14_2_main.c b/src/world/area_flo/flo_14/flo_14_2_main.c index a96c80b1e31..ec6e2d41029 100644 --- a/src/world/area_flo/flo_14/flo_14_2_main.c +++ b/src/world/area_flo/flo_14/flo_14_2_main.c @@ -12,10 +12,10 @@ EvtScript N(EVS_ExitWalk_flo_00_1) = EVT_EXIT_WALK(60, flo_14_ENTRY_0, "flo_00", EvtScript N(EVS_ExitWalk_flo_13_0) = EVT_EXIT_WALK(60, flo_14_ENTRY_1, "flo_13", flo_13_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_13_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_00_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_13_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_flo_00_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -34,64 +34,64 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_MakeEntities)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o114, SURFACE_TYPE_SPIKES) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_o39, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o41, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o43, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o49, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o51, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o55, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o123, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o125, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o127, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o129, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o131, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o133, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o135, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o40, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o44, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o48, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o52, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o54, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o124, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o126, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o128, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o130, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o132, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o134, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o136, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Exec(N(EVS_MakeEntities)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o114, SURFACE_TYPE_SPIKES) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + Call(EnableTexPanning, MODEL_o39, TRUE) + Call(EnableTexPanning, MODEL_o41, TRUE) + Call(EnableTexPanning, MODEL_o43, TRUE) + Call(EnableTexPanning, MODEL_o49, TRUE) + Call(EnableTexPanning, MODEL_o51, TRUE) + Call(EnableTexPanning, MODEL_o55, TRUE) + Call(EnableTexPanning, MODEL_o123, TRUE) + Call(EnableTexPanning, MODEL_o125, TRUE) + Call(EnableTexPanning, MODEL_o127, TRUE) + Call(EnableTexPanning, MODEL_o129, TRUE) + Call(EnableTexPanning, MODEL_o131, TRUE) + Call(EnableTexPanning, MODEL_o133, TRUE) + Call(EnableTexPanning, MODEL_o135, TRUE) + Call(EnableTexPanning, MODEL_o40, TRUE) + Call(EnableTexPanning, MODEL_o44, TRUE) + Call(EnableTexPanning, MODEL_o48, TRUE) + Call(EnableTexPanning, MODEL_o52, TRUE) + Call(EnableTexPanning, MODEL_o54, TRUE) + Call(EnableTexPanning, MODEL_o124, TRUE) + Call(EnableTexPanning, MODEL_o126, TRUE) + Call(EnableTexPanning, MODEL_o128, TRUE) + Call(EnableTexPanning, MODEL_o130, TRUE) + Call(EnableTexPanning, MODEL_o132, TRUE) + Call(EnableTexPanning, MODEL_o134, TRUE) + Call(EnableTexPanning, MODEL_o136, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 140, 0, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( -200, 0, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_EXEC(N(EVS_SetupBubbles)) - EVT_EXEC(N(EVS_SetupLogBridges)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Exec(N(EVS_SetupBubbles)) + Exec(N(EVS_SetupLogBridges)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Return + End }; diff --git a/src/world/area_flo/flo_14/flo_14_3_bubbles.c b/src/world/area_flo/flo_14/flo_14_3_bubbles.c index 4dd05c646fa..3bd9cc4543c 100644 --- a/src/world/area_flo/flo_14/flo_14_3_bubbles.c +++ b/src/world/area_flo/flo_14/flo_14_3_bubbles.c @@ -8,37 +8,37 @@ s32 N(BlowingBubbles) = FALSE; EvtScript N(EVS_BubbleUpdateCamera) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(MakeLerp, LVar1, 48, 15, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar2, LVar0, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, 48, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(MakeLerp, LVar1, 48, 15, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Call(SetCamTarget, CAM_DEFAULT, LVar2, LVar0, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetCamTarget, CAM_DEFAULT, LVar0, 48, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_TetherParterToPlayer) = { - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar2, -5) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Add(LVar2, -5) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; API_CALLABLE(N(SavePartnerFlags)) { @@ -84,121 +84,121 @@ Vec3f N(BubbleFlightPath)[] = { }; EvtScript N(EVS_BubbleFollowPath) = { - EVT_WAIT(20) - EVT_CALL(PlaySound, SOUND_LOOP_BUBBLE_DRIFT) - EVT_CALL(LoadPath, 165, EVT_PTR(N(BubbleFlightPath)), ARRAY_COUNT(N(BubbleFlightPath)), EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(TranslateModel, MODEL_o167, LVar1, LVar2, LVar3) - EVT_ADD(LVar2, -27) - EVT_ADD(LVar3, -10) - EVT_CALL(SetPlayerPos, LVar1, LVar2, LVar3) - EVT_CALL(N(UpdateBubbleSoundPos), LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(StopSound, SOUND_LOOP_BUBBLE_DRIFT) - EVT_RETURN - EVT_END + Wait(20) + Call(PlaySound, SOUND_LOOP_BUBBLE_DRIFT) + Call(LoadPath, 165, Ref(N(BubbleFlightPath)), ARRAY_COUNT(N(BubbleFlightPath)), EASING_COS_IN_OUT) + Label(0) + Call(GetNextPathPos) + Call(TranslateModel, MODEL_o167, LVar1, LVar2, LVar3) + Add(LVar2, -27) + Add(LVar3, -10) + Call(SetPlayerPos, LVar1, LVar2, LVar3) + Call(N(UpdateBubbleSoundPos), LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(0) + EndIf + Call(StopSound, SOUND_LOOP_BUBBLE_DRIFT) + Return + End }; EvtScript N(EVS_RideBigBubble) = { - EVT_CALL(IsPlayerWithin, 531, 81, 30, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(InterruptUsePartner) - EVT_WAIT(20) - EVT_END_IF - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(GetModelCenter, MODEL_o167) - EVT_THREAD - EVT_ADD(LVar2, -10) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.2)) - EVT_CALL(PlayerJump, 531, 48, LVar2, 10) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(5) - EVT_ADD(LVar2, -15) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.2)) - EVT_CALL(NpcJump0, NPC_PARTNER, 531, 68, LVar2, 10) - EVT_END_THREAD - EVT_EXEC_GET_TID(N(EVS_BubbleUpdateCamera), MV_BubbleCamScript) - EVT_WAIT(15) - EVT_CALL(N(SavePartnerFlags)) - EVT_IF_TRUE(LVarE) - EVT_EXEC_GET_TID(N(EVS_TetherParterToPlayer), LVarE) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_BubbleFollowPath)) - EVT_IF_TRUE(LVarE) - EVT_KILL_THREAD(LVarE) - EVT_CALL(N(RestorePartnerFlags)) - EVT_END_IF - EVT_CALL(GetModelCenter, MODEL_o167) - EVT_PLAY_EFFECT(EFFECT_FIREWORK, 0, LVar0, LVar1, LVar2, 2, 0) - EVT_CALL(PlaySoundAt, SOUND_BUBBLE_BURST, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(ClearPartnerMoveHistory, NPC_PARTNER) - EVT_CALL(EnableModel, MODEL_o167, FALSE) - EVT_SET(AF_FLO_BigBubbleReady, FALSE) - EVT_KILL_THREAD(MV_BubbleCamScript) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(IsPlayerWithin, 531, 81, 30, LVar0) + IfEq(LVar0, 0) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, PARTNER_NONE) + Call(InterruptUsePartner) + Wait(20) + EndIf + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(GetModelCenter, MODEL_o167) + Thread + Add(LVar2, -10) + Call(SetPlayerJumpscale, Float(0.2)) + Call(PlayerJump, 531, 48, LVar2, 10) + Call(SetPlayerActionState, ACTION_STATE_LAND) + EndThread + Thread + Wait(5) + Add(LVar2, -15) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.2)) + Call(NpcJump0, NPC_PARTNER, 531, 68, LVar2, 10) + EndThread + ExecGetTID(N(EVS_BubbleUpdateCamera), MV_BubbleCamScript) + Wait(15) + Call(N(SavePartnerFlags)) + IfTrue(LVarE) + ExecGetTID(N(EVS_TetherParterToPlayer), LVarE) + EndIf + ExecWait(N(EVS_BubbleFollowPath)) + IfTrue(LVarE) + KillThread(LVarE) + Call(N(RestorePartnerFlags)) + EndIf + Call(GetModelCenter, MODEL_o167) + PlayEffect(EFFECT_FIREWORK, 0, LVar0, LVar1, LVar2, 2, 0) + Call(PlaySoundAt, SOUND_BUBBLE_BURST, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Call(ClearPartnerMoveHistory, NPC_PARTNER) + Call(EnableModel, MODEL_o167, FALSE) + Set(AF_FLO_BigBubbleReady, FALSE) + KillThread(MV_BubbleCamScript) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE) + Call(EnablePartnerAI) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Unbind + Return + End }; EvtScript N(EVS_BlowBigBubble) = { - EVT_CALL(PlaySoundAt, SOUND_FLO_BLOW_BUBBLE, SOUND_SPACE_DEFAULT, 591, 55, 121) - EVT_CALL(EnableModel, MODEL_o167, TRUE) - EVT_SETF(LVar2, EVT_FLOAT(1.0)) - EVT_SETF(LVar4, EVT_FLOAT(0.0)) - EVT_SETF(LVar5, EVT_FLOAT(0.0)) - EVT_SETF(LVar6, EVT_FLOAT(0.0)) - EVT_SET(LVar7, -30) - EVT_SET(LVar8, 20) - EVT_DIVF(LVar7, EVT_FLOAT(90.0)) - EVT_DIVF(LVar8, EVT_FLOAT(90.0)) - EVT_SET(LVar9, 180) - EVT_LOOP(LVar9) - EVT_CALL(TranslateModel, MODEL_o167, 591, 55, 121) - EVT_SETF(LVar3, LVar2) - EVT_DIVF(LVar3, 10) - EVT_CALL(ScaleModel, MODEL_o167, LVar3, LVar3, LVar3) - EVT_CALL(TranslateModel, MODEL_o167, LVar4, LVar5, LVar6) - EVT_ADDF(LVar2, EVT_FLOAT(0.05)) - EVT_IF_GT(LVar9, 90) - EVT_ADDF(LVar4, LVar7) - EVT_ADDF(LVar5, LVar8) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(LVar7, -30) - EVT_SET(LVar8, -40) - EVT_DIVF(LVar7, EVT_FLOAT(60.0)) - EVT_DIVF(LVar8, EVT_FLOAT(60.0)) - EVT_LOOP(60) - EVT_CALL(TranslateModel, MODEL_o167, 591, 55, 121) - EVT_CALL(ScaleModel, MODEL_o167, LVar3, LVar3, LVar3) - EVT_CALL(TranslateModel, MODEL_o167, LVar4, LVar5, LVar6) - EVT_ADDF(LVar4, LVar7) - EVT_ADDF(LVar6, LVar8) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(AF_FLO_BlowingBigBubble, FALSE) - EVT_SET(AF_FLO_BigBubbleReady, TRUE) - EVT_RETURN - EVT_END + Call(PlaySoundAt, SOUND_FLO_BLOW_BUBBLE, SOUND_SPACE_DEFAULT, 591, 55, 121) + Call(EnableModel, MODEL_o167, TRUE) + SetF(LVar2, Float(1.0)) + SetF(LVar4, Float(0.0)) + SetF(LVar5, Float(0.0)) + SetF(LVar6, Float(0.0)) + Set(LVar7, -30) + Set(LVar8, 20) + DivF(LVar7, Float(90.0)) + DivF(LVar8, Float(90.0)) + Set(LVar9, 180) + Loop(LVar9) + Call(TranslateModel, MODEL_o167, 591, 55, 121) + SetF(LVar3, LVar2) + DivF(LVar3, 10) + Call(ScaleModel, MODEL_o167, LVar3, LVar3, LVar3) + Call(TranslateModel, MODEL_o167, LVar4, LVar5, LVar6) + AddF(LVar2, Float(0.05)) + IfGt(LVar9, 90) + AddF(LVar4, LVar7) + AddF(LVar5, LVar8) + EndIf + Wait(1) + EndLoop + Set(LVar7, -30) + Set(LVar8, -40) + DivF(LVar7, Float(60.0)) + DivF(LVar8, Float(60.0)) + Loop(60) + Call(TranslateModel, MODEL_o167, 591, 55, 121) + Call(ScaleModel, MODEL_o167, LVar3, LVar3, LVar3) + Call(TranslateModel, MODEL_o167, LVar4, LVar5, LVar6) + AddF(LVar4, LVar7) + AddF(LVar6, LVar8) + Wait(1) + EndLoop + Set(AF_FLO_BlowingBigBubble, FALSE) + Set(AF_FLO_BigBubbleReady, TRUE) + Return + End }; f32 N(BubblePhase) = 0.0f; @@ -291,70 +291,70 @@ void N(gfx_build_bubble_flower)(void) { } EvtScript N(EVS_ManageBlownBubble) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SET(LVarF, LVar0) - EVT_LABEL(0) - EVT_IF_EQ(AF_FLO_PauseBlowingBubbles, TRUE) - EVT_WAIT(10) - EVT_GOTO(0) - EVT_END_IF - EVT_USE_BUF(EVT_PTR(N(BlowingBubbles))) - EVT_BUF_READ1(LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_CALL(RandInt, 10, LVar0) - EVT_ADD(LVar0, 1) - EVT_WAIT(LVar0) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(EnableModel, LVarF, TRUE) - EVT_CALL(RandInt, 4, LVar0) - EVT_ADDF(LVar0, EVT_FLOAT(4.0)) - EVT_MULF(LVar0, EVT_FLOAT(-1.0)) - EVT_SETF(LVar1, EVT_FLOAT(2.0)) - EVT_SETF(LVar2, LVar0) - EVT_DIVF(LVar2, EVT_FLOAT(10.0)) - EVT_SETF(LVar3, EVT_FLOAT(0.4)) - EVT_SETF(LVar4, EVT_FLOAT(591.0)) - EVT_SETF(LVar5, EVT_FLOAT(60.0)) - EVT_SETF(LVar6, EVT_FLOAT(121.0)) - EVT_CALL(RandInt, 3, LVar7) - EVT_ADDF(LVar7, EVT_FLOAT(3.0)) - EVT_MULF(LVar7, EVT_FLOAT(0.04)) - EVT_SETF(LVar9, LVar7) - EVT_DIVF(LVar9, EVT_FLOAT(5.0)) - EVT_CALL(RandInt, 50, LVar8) - EVT_ADD(LVar8, 50) - EVT_LOOP(LVar8) - EVT_SETF(LVarE, LVar2) - EVT_SUBF(LVarE, LVar0) - EVT_MULF(LVarE, EVT_FLOAT(0.046)) - EVT_ADDF(LVar0, LVarE) - EVT_SETF(LVarE, LVar3) - EVT_SUBF(LVarE, LVar1) - EVT_MULF(LVarE, EVT_FLOAT(0.046)) - EVT_ADDF(LVar1, LVarE) - EVT_ADDF(LVar4, LVar0) - EVT_ADDF(LVar5, LVar1) - EVT_SETF(LVarE, LVar7) - EVT_SUBF(LVarE, LVar9) - EVT_MULF(LVarE, EVT_FLOAT(0.203)) - EVT_ADDF(LVar9, LVarE) - EVT_CALL(TranslateModel, LVarF, LVar4, LVar5, LVar6) - EVT_CALL(ScaleModel, LVarF, LVar9, LVar9, LVar9) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EnableModel, LVarF, FALSE) - EVT_GOTO(0) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Set(LVarF, LVar0) + Label(0) + IfEq(AF_FLO_PauseBlowingBubbles, TRUE) + Wait(10) + Goto(0) + EndIf + UseBuf(Ref(N(BlowingBubbles))) + BufRead1(LVar0) + IfEq(LVar0, FALSE) + Call(RandInt, 10, LVar0) + Add(LVar0, 1) + Wait(LVar0) + Goto(0) + EndIf + Call(EnableModel, LVarF, TRUE) + Call(RandInt, 4, LVar0) + AddF(LVar0, Float(4.0)) + MulF(LVar0, Float(-1.0)) + SetF(LVar1, Float(2.0)) + SetF(LVar2, LVar0) + DivF(LVar2, Float(10.0)) + SetF(LVar3, Float(0.4)) + SetF(LVar4, Float(591.0)) + SetF(LVar5, Float(60.0)) + SetF(LVar6, Float(121.0)) + Call(RandInt, 3, LVar7) + AddF(LVar7, Float(3.0)) + MulF(LVar7, Float(0.04)) + SetF(LVar9, LVar7) + DivF(LVar9, Float(5.0)) + Call(RandInt, 50, LVar8) + Add(LVar8, 50) + Loop(LVar8) + SetF(LVarE, LVar2) + SubF(LVarE, LVar0) + MulF(LVarE, Float(0.046)) + AddF(LVar0, LVarE) + SetF(LVarE, LVar3) + SubF(LVarE, LVar1) + MulF(LVarE, Float(0.046)) + AddF(LVar1, LVarE) + AddF(LVar4, LVar0) + AddF(LVar5, LVar1) + SetF(LVarE, LVar7) + SubF(LVarE, LVar9) + MulF(LVarE, Float(0.203)) + AddF(LVar9, LVarE) + Call(TranslateModel, LVarF, LVar4, LVar5, LVar6) + Call(ScaleModel, LVarF, LVar9, LVar9, LVar9) + Wait(1) + EndLoop + Call(EnableModel, LVarF, FALSE) + Goto(0) + Return + End }; EvtScript N(EVS_SetupBubbles) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o129, SURFACE_TYPE_FLOWERS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o155, SURFACE_TYPE_FLOWERS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o156, SURFACE_TYPE_FLOWERS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o157, SURFACE_TYPE_FLOWERS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o158, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o129, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o155, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o156, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o157, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o158, SURFACE_TYPE_FLOWERS) EVT_FLOWER_SPAWN_REGION( -730, -130, -470, -70, 0) EVT_FLOWER_SPAWN_REGION( -730, 70, -470, 140, 0) EVT_FLOWER_SPAWN_REGION( -280, 130, -110, -70, 0) @@ -363,40 +363,40 @@ EvtScript N(EVS_SetupBubbles) = { EVT_DROPPING_VINE(ITEM_NONE, MODEL_o82, MODEL_o83, MODEL_o84, MODEL_o85) EVT_DROPPING_VINE(ITEM_NONE, MODEL_o78, MODEL_o79, MODEL_o80, MODEL_o81) EVT_DROPPING_VINE(ITEM_NONE, MODEL_o88, MODEL_o89, MODEL_o90, MODEL_o91) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o113, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(CloneModel, MODEL_o169, CLONED_MODEL(1)) - EVT_CALL(CloneModel, MODEL_o169, CLONED_MODEL(2)) - EVT_CALL(CloneModel, MODEL_o169, CLONED_MODEL(3)) - EVT_CALL(CloneModel, MODEL_o169, CLONED_MODEL(4)) - EVT_CALL(CloneModel, MODEL_o169, CLONED_MODEL(5)) - EVT_CALL(EnableModel, MODEL_o167, FALSE) - EVT_CALL(EnableModel, MODEL_o169, FALSE) - EVT_CALL(EnableModel, CLONED_MODEL(1), FALSE) - EVT_CALL(EnableModel, CLONED_MODEL(2), FALSE) - EVT_CALL(EnableModel, CLONED_MODEL(3), FALSE) - EVT_CALL(EnableModel, CLONED_MODEL(4), FALSE) - EVT_CALL(EnableModel, CLONED_MODEL(5), FALSE) - EVT_SET(LVar0, CLONED_MODEL(1)) - EVT_EXEC(N(EVS_ManageBlownBubble)) - EVT_SET(LVar0, CLONED_MODEL(2)) - EVT_EXEC(N(EVS_ManageBlownBubble)) - EVT_SET(LVar0, CLONED_MODEL(3)) - EVT_EXEC(N(EVS_ManageBlownBubble)) - EVT_SET(LVar0, CLONED_MODEL(4)) - EVT_EXEC(N(EVS_ManageBlownBubble)) - EVT_SET(LVar0, CLONED_MODEL(5)) - EVT_EXEC(N(EVS_ManageBlownBubble)) - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_0, MODEL_o167, TRUE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(gfx_build_big_bubble)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_o167, CUSTOM_GFX_1, -1) - EVT_CALL(SetModelCustomGfx, CLONED_MODEL(1), 1, -1) - EVT_CALL(SetModelCustomGfx, CLONED_MODEL(2), 1, -1) - EVT_CALL(SetModelCustomGfx, CLONED_MODEL(3), 1, -1) - EVT_CALL(SetModelCustomGfx, CLONED_MODEL(4), 1, -1) - EVT_CALL(SetModelCustomGfx, CLONED_MODEL(5), 1, -1) - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_1, MODEL_o57, TRUE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_2, EVT_PTR(N(gfx_build_bubble_flower)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_o57, CUSTOM_GFX_2, -1) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o113, COLLIDER_FLAGS_UPPER_MASK) + Call(CloneModel, MODEL_o169, CLONED_MODEL(1)) + Call(CloneModel, MODEL_o169, CLONED_MODEL(2)) + Call(CloneModel, MODEL_o169, CLONED_MODEL(3)) + Call(CloneModel, MODEL_o169, CLONED_MODEL(4)) + Call(CloneModel, MODEL_o169, CLONED_MODEL(5)) + Call(EnableModel, MODEL_o167, FALSE) + Call(EnableModel, MODEL_o169, FALSE) + Call(EnableModel, CLONED_MODEL(1), FALSE) + Call(EnableModel, CLONED_MODEL(2), FALSE) + Call(EnableModel, CLONED_MODEL(3), FALSE) + Call(EnableModel, CLONED_MODEL(4), FALSE) + Call(EnableModel, CLONED_MODEL(5), FALSE) + Set(LVar0, CLONED_MODEL(1)) + Exec(N(EVS_ManageBlownBubble)) + Set(LVar0, CLONED_MODEL(2)) + Exec(N(EVS_ManageBlownBubble)) + Set(LVar0, CLONED_MODEL(3)) + Exec(N(EVS_ManageBlownBubble)) + Set(LVar0, CLONED_MODEL(4)) + Exec(N(EVS_ManageBlownBubble)) + Set(LVar0, CLONED_MODEL(5)) + Exec(N(EVS_ManageBlownBubble)) + Call(MakeLocalVertexCopy, VTX_COPY_0, MODEL_o167, TRUE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_1, Ref(N(gfx_build_big_bubble)), NULL) + Call(SetModelCustomGfx, MODEL_o167, CUSTOM_GFX_1, -1) + Call(SetModelCustomGfx, CLONED_MODEL(1), 1, -1) + Call(SetModelCustomGfx, CLONED_MODEL(2), 1, -1) + Call(SetModelCustomGfx, CLONED_MODEL(3), 1, -1) + Call(SetModelCustomGfx, CLONED_MODEL(4), 1, -1) + Call(SetModelCustomGfx, CLONED_MODEL(5), 1, -1) + Call(MakeLocalVertexCopy, VTX_COPY_1, MODEL_o57, TRUE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_2, Ref(N(gfx_build_bubble_flower)), NULL) + Call(SetModelCustomGfx, MODEL_o57, CUSTOM_GFX_2, -1) + Return + End }; diff --git a/src/world/area_flo/flo_14/flo_14_4_npc.c b/src/world/area_flo/flo_14/flo_14_4_npc.c index 2afc52988df..d9d4d61ca44 100644 --- a/src/world/area_flo/flo_14/flo_14_4_npc.c +++ b/src/world/area_flo/flo_14/flo_14_4_npc.c @@ -20,61 +20,61 @@ s32 N(KeyList)[] = { }; EvtScript N(EVS_NpcInteract_BubbleFlower) = { - EVT_IF_EQ(AF_FLO_BigBubbleReady, TRUE) - EVT_SET(AF_FLO_PauseBlowingBubbles, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0063) - EVT_SET(AF_FLO_PauseBlowingBubbles, FALSE) - EVT_RETURN - EVT_END_IF - EVT_SET(AF_FLO_PauseBlowingBubbles, TRUE) - EVT_IF_EQ(GF_FLO14_GaveBerryToBubblePlant, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_005F) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0060) - EVT_END_IF - EVT_CALL(FindItem, ITEM_BUBBLE_BERRY, LVar0) - EVT_IF_NE(LVar0, -1) + IfEq(AF_FLO_BigBubbleReady, TRUE) + Set(AF_FLO_PauseBlowingBubbles, TRUE) + Call(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0063) + Set(AF_FLO_PauseBlowingBubbles, FALSE) + Return + EndIf + Set(AF_FLO_PauseBlowingBubbles, TRUE) + IfEq(GF_FLO14_GaveBerryToBubblePlant, FALSE) + Call(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_005F) + Else + Call(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0060) + EndIf + Call(FindItem, ITEM_BUBBLE_BERRY, LVar0) + IfNe(LVar0, -1) EVT_CHOOSE_CONSUMABLE_FROM(N(KeyList), 0) - EVT_IF_EQ(LVar0, -1) - EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0064) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0061) - EVT_SET(AF_FLO_BlowingBigBubble, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(PlayerMoveTo, 555, 110, 20) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(func_802CF56C, 2) - EVT_WAIT(5) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(1.0), 0, 350, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_EXEC(N(EVS_BlowBigBubble)) - EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0062) - EVT_THREAD - EVT_WAIT(40) - EVT_CALL(InterpPlayerYaw, 315, 0) - EVT_END_THREAD - EVT_LABEL(10) - EVT_IF_EQ(AF_FLO_BigBubbleReady, FALSE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 5, MSG_CH6_0063) - EVT_SET(GF_FLO14_GaveBerryToBubblePlant, TRUE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_RideBigBubble)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o154, 1, 0) - EVT_END_IF - EVT_END_IF - EVT_SET(AF_FLO_PauseBlowingBubbles, FALSE) - EVT_RETURN - EVT_END + IfEq(LVar0, -1) + Call(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0064) + Else + Call(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0061) + Set(AF_FLO_BlowingBigBubble, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(PlayerMoveTo, 555, 110, 20) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(InterpPlayerYaw, 90, 0) + Call(func_802CF56C, 2) + Wait(5) + Call(AdjustCam, CAM_DEFAULT, Float(1.0), 0, 350, Float(17.0), Float(-6.0)) + Exec(N(EVS_BlowBigBubble)) + Call(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0062) + Thread + Wait(40) + Call(InterpPlayerYaw, 315, 0) + EndThread + Label(10) + IfEq(AF_FLO_BigBubbleReady, FALSE) + Wait(1) + Goto(10) + EndIf + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + Call(SpeakToPlayer, NPC_SELF, -1, -1, 5, MSG_CH6_0063) + Set(GF_FLO14_GaveBerryToBubblePlant, TRUE) + BindTrigger(Ref(N(EVS_RideBigBubble)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o154, 1, 0) + EndIf + EndIf + Set(AF_FLO_PauseBlowingBubbles, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_BubbleFlower) = { - EVT_SET(AF_FLO_BlowingBigBubble, FALSE) - EVT_SET(AF_FLO_BigBubbleReady, FALSE) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_BubbleFlower))) - EVT_RETURN - EVT_END + Set(AF_FLO_BlowingBigBubble, FALSE) + Set(AF_FLO_BigBubbleReady, FALSE) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_BubbleFlower))) + Return + End }; // uses a dummy bubulb for collision diff --git a/src/world/area_flo/flo_14/flo_14_5_entity.c b/src/world/area_flo/flo_14/flo_14_5_entity.c index 4e3f160f74e..2e6362ee384 100644 --- a/src/world/area_flo/flo_14/flo_14_5_entity.c +++ b/src/world/area_flo/flo_14/flo_14_5_entity.c @@ -1,7 +1,7 @@ #include "flo_14.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 675, 60, -100, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO14_Item_StarPiece) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_STAR_PIECE, 675, 60, -100, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO14_Item_StarPiece) + Return + End }; diff --git a/src/world/area_flo/flo_14/flo_14_6_logs.c b/src/world/area_flo/flo_14/flo_14_6_logs.c index 3de9e5a1547..a9ce45f1fe6 100644 --- a/src/world/area_flo/flo_14/flo_14_6_logs.c +++ b/src/world/area_flo/flo_14/flo_14_6_logs.c @@ -5,6 +5,6 @@ EvtScript N(EVS_SetupLogBridges) = { EVT_MAKE_LOG_BRIDGE(COLLIDER_o162, COLLIDER_o166, MODEL_o15, MODEL_o16, MV_RotAngle_Log_01, MV_RotVelocity_Log_01) EVT_MAKE_LOG_BRIDGE(COLLIDER_o161, COLLIDER_o167, MODEL_o17, MODEL_o18, MV_RotAngle_Log_02, MV_RotVelocity_Log_02) - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/area_flo/flo_15/flo_15_1_music.c b/src/world/area_flo/flo_15/flo_15_1_music.c index d0d926c1847..4d1969911b7 100644 --- a/src/world/area_flo/flo_15/flo_15_1_music.c +++ b/src/world/area_flo/flo_15/flo_15_1_music.c @@ -1,17 +1,17 @@ #include "flo_15.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, flo_15_ENTRY_1) - EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) - EVT_ELSE - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_SUN_TOWER_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_SUN_TOWER_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, flo_15_ENTRY_1) + Call(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) + Else + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_SUN_TOWER_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_SUN_TOWER_SUNNY, 0, 8) + EndSwitch + EndIf + Return + End }; diff --git a/src/world/area_flo/flo_15/flo_15_2_main.c b/src/world/area_flo/flo_15/flo_15_2_main.c index 4dbee813c06..94a9de2f228 100644 --- a/src/world/area_flo/flo_15/flo_15_2_main.c +++ b/src/world/area_flo/flo_15/flo_15_2_main.c @@ -3,29 +3,29 @@ EvtScript N(EVS_ExitWalk_flo_13_1) = EVT_EXIT_WALK(60, flo_15_ENTRY_0, "flo_13", flo_13_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_13_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_13_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, flo_15_ENTRY_1) - EVT_EXEC(N(EVS_Scene_SunReturns)) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g58, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_MonitorFallingStairs)) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(GetEntryID, LVar0) + IfEq(LVar0, flo_15_ENTRY_1) + Exec(N(EVS_Scene_SunReturns)) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g58, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_MonitorFallingStairs)) + ExecWait(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_flo/flo_15/flo_15_3_npc.c b/src/world/area_flo/flo_15/flo_15_3_npc.c index 46228e6fa35..6c955de56cc 100644 --- a/src/world/area_flo/flo_15/flo_15_3_npc.c +++ b/src/world/area_flo/flo_15/flo_15_3_npc.c @@ -4,198 +4,198 @@ #include "world/common/npc/Sun.inc.c" EvtScript N(EVS_Sun_AnimateBobbing) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_SET(LVar3, 7) - EVT_SET(LVar4, 5) - EVT_ELSE - EVT_SET(LVar3, 15) - EVT_SET(LVar4, 1) - EVT_END_IF - EVT_LOOP(0) - EVT_SET(LVar5, LVar3) - EVT_LOOP(LVar5) - EVT_CALL(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Sun_02, LVar0, LVar1, LVar2) - EVT_WAIT(LVar4) - EVT_END_LOOP - EVT_SET(LVar5, LVar3) - EVT_LOOP(LVar5) - EVT_CALL(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, -1) - EVT_CALL(SetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Sun_02, LVar0, LVar1, LVar2) - EVT_WAIT(LVar4) - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Set(LVar3, 7) + Set(LVar4, 5) + Else + Set(LVar3, 15) + Set(LVar4, 1) + EndIf + Loop(0) + Set(LVar5, LVar3) + Loop(LVar5) + Call(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) + Add(LVar1, 1) + Call(SetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Sun_02, LVar0, LVar1, LVar2) + Wait(LVar4) + EndLoop + Set(LVar5, LVar3) + Loop(LVar5) + Call(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) + Add(LVar1, -1) + Call(SetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Sun_02, LVar0, LVar1, LVar2) + Wait(LVar4) + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_Scene_SunReturns) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetNpcPos, NPC_Sun_01, 0, 270, 0) - EVT_CALL(SetNpcPos, NPC_Sun_02, NPC_DISPOSE_LOCATION) - EVT_WAIT(1) - EVT_CALL(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 1050) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(10.0), EVT_FLOAT(4.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(6.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkJoy, ANIM_Sun_TalkJoy, SPEECH_FLAG_200 | 5, MSG_CH6_00C3) - EVT_CALL(SetNpcAnimation, NPC_Sun_01, ANIM_Sun_TalkJoy) - EVT_THREAD - EVT_CALL(SetCamDistance, CAM_DEFAULT, 1000) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_WAIT(15) - EVT_CALL(SetNpcJumpscale, NPC_Sun_01, EVT_FLOAT(0.0)) - EVT_CALL(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 400) - EVT_CALL(NpcJump0, NPC_Sun_01, LVar0, LVar1, LVar2, 40) - EVT_CALL(GotoMap, EVT_PTR("flo_00"), flo_00_ENTRY_9) - EVT_WAIT(70) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetNpcPos, NPC_Sun_01, 0, 270, 0) + Call(SetNpcPos, NPC_Sun_02, NPC_DISPOSE_LOCATION) + Wait(1) + Call(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 1050) + Call(SetCamPitch, CAM_DEFAULT, Float(10.0), Float(4.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-10.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(6.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkJoy, ANIM_Sun_TalkJoy, SPEECH_FLAG_200 | 5, MSG_CH6_00C3) + Call(SetNpcAnimation, NPC_Sun_01, ANIM_Sun_TalkJoy) + Thread + Call(SetCamDistance, CAM_DEFAULT, 1000) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndThread + Wait(15) + Call(SetNpcJumpscale, NPC_Sun_01, Float(0.0)) + Call(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) + Add(LVar1, 400) + Call(NpcJump0, NPC_Sun_01, LVar0, LVar1, LVar2, 40) + Call(GotoMap, Ref("flo_00"), flo_00_ENTRY_9) + Wait(70) + Return + End }; EvtScript N(EVS_NpcAux_Sun_02) = { - EVT_CALL(SetNpcRotationPivot, NPC_Sun_02, 48) - EVT_LOOP(0) - EVT_CALL(MakeLerp, -30, 30, 20, EASING_SIN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Sun_02, 0, 0, LVar0) - EVT_CALL(GetNpcPos, NPC_Sun_01, LVar2, LVar3, LVar4) - EVT_CALL(SetNpcPos, NPC_Sun_02, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 30, -30, 20, EASING_SIN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Sun_02, 0, 0, LVar0) - EVT_CALL(GetNpcPos, NPC_Sun_01, LVar2, LVar3, LVar4) - EVT_CALL(SetNpcPos, NPC_Sun_02, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetNpcRotationPivot, NPC_Sun_02, 48) + Loop(0) + Call(MakeLerp, -30, 30, 20, EASING_SIN_OUT) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Sun_02, 0, 0, LVar0) + Call(GetNpcPos, NPC_Sun_01, LVar2, LVar3, LVar4) + Call(SetNpcPos, NPC_Sun_02, LVar2, LVar3, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 30, -30, 20, EASING_SIN_OUT) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Sun_02, 0, 0, LVar0) + Call(GetNpcPos, NPC_Sun_01, LVar2, LVar3, LVar4) + Call(SetNpcPos, NPC_Sun_02, LVar2, LVar3, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_Sun_DescendFromSky) = { - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar1, 220) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlayerFaceNpc, NPC_Sun_01, FALSE) - EVT_END_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Sun_01, EVT_FLOAT(0.0)) - EVT_CALL(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 400) - EVT_CALL(NpcJump0, NPC_Sun_01, LVar0, 275, LVar2, 30) - EVT_EXEC_GET_TID(N(EVS_Sun_AnimateBobbing), LVar9) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_EQ(AF_FLO_MetTheSun, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(10) - EVT_KILL_THREAD(LVar9) - EVT_CALL(SetNpcFlagBits, NPC_Sun_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Sun_01, LVar0, 450, LVar2, 30) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END + Loop(0) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar1, 220) + BreakLoop + EndIf + EndLoop + Thread + Wait(15) + Call(PlayerFaceNpc, NPC_Sun_01, FALSE) + EndThread + Call(SetNpcJumpscale, NPC_Sun_01, Float(0.0)) + Call(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) + Sub(LVar1, 400) + Call(NpcJump0, NPC_Sun_01, LVar0, 275, LVar2, 30) + ExecGetTID(N(EVS_Sun_AnimateBobbing), LVar9) + Loop(0) + Wait(1) + IfEq(AF_FLO_MetTheSun, TRUE) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, TRUE) + Wait(10) + KillThread(LVar9) + Call(SetNpcFlagBits, NPC_Sun_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Sun_01, LVar0, 450, LVar2, 30) + Call(DisablePlayerInput, FALSE) + Unbind + Return + End }; EvtScript N(EVS_NpcInteract_Sun_01) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_SPOKE_WITH_THE_SUN) - EVT_CALL(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009A) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Thinking) - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009B) - EVT_SET(GB_StoryProgress, STORY_CH6_SPOKE_WITH_THE_SUN) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009C) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_IF_EQ(GF_FLO15_SunThankedPlayer, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009D) - EVT_SET(GF_FLO15_SunThankedPlayer, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009E) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009F) - EVT_END_SWITCH - EVT_SET(AF_FLO_MetTheSun, TRUE) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_SPOKE_WITH_THE_SUN) + Call(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009A) + Call(SetPlayerAnimation, ANIM_Mario1_Thinking) + Wait(20) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(20) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009B) + Set(GB_StoryProgress, STORY_CH6_SPOKE_WITH_THE_SUN) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009C) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + IfEq(GF_FLO15_SunThankedPlayer, FALSE) + Call(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009D) + Set(GF_FLO15_SunThankedPlayer, TRUE) + Else + Call(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009E) + EndIf + CaseDefault + Call(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009F) + EndSwitch + Set(AF_FLO_MetTheSun, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_Sun_01) = { - EVT_CALL(SetNpcCollisionSize, NPC_Sun_01, 64, 40) - EVT_CALL(EnableNpcShadow, NPC_Sun_01, FALSE) - EVT_IF_LT(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetNpcPos, NPC_Sun_01, 0, 270, 0) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Sun_01))) - EVT_EXEC(N(EVS_Sun_AnimateBobbing)) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_Sun_01, 0, 450, 0) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Sun_01))) - EVT_SET(AF_FLO_MetTheSun, FALSE) - EVT_EXEC(N(EVS_Sun_DescendFromSky)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetNpcCollisionSize, NPC_Sun_01, 64, 40) + Call(EnableNpcShadow, NPC_Sun_01, FALSE) + IfLt(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetNpcPos, NPC_Sun_01, 0, 270, 0) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Sun_01))) + Exec(N(EVS_Sun_AnimateBobbing)) + Else + Call(SetNpcPos, NPC_Sun_01, 0, 450, 0) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Sun_01))) + Set(AF_FLO_MetTheSun, FALSE) + Exec(N(EVS_Sun_DescendFromSky)) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Sun_02) = { - EVT_CALL(EnableNpcShadow, NPC_Sun_02, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Sun_02, ANIM_Sun_FireIdle) - EVT_CALL(SetNpcPaletteSwapMode, NPC_Sun_01, NPC_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) - EVT_CALL(SetNpcPaletteSwapMode, NPC_Sun_02, NPC_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) - EVT_CALL(SetNpcPaletteSwapping, NPC_Sun_01, 0, 1, 5, 5, 13, 5, 0, 0) - EVT_CALL(SetNpcPaletteSwapping, NPC_Sun_02, 0, 1, 5, 5, 13, 5, 0, 0) - EVT_IF_LT(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetNpcPos, NPC_Sun_02, 0, 270, -5) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_Sun_02, 0, 450, -5) - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_Sun_02))) - EVT_END_IF - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_Sun_02, FALSE) + Call(SetNpcAnimation, NPC_Sun_02, ANIM_Sun_FireIdle) + Call(SetNpcPaletteSwapMode, NPC_Sun_01, NPC_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) + Call(SetNpcPaletteSwapMode, NPC_Sun_02, NPC_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) + Call(SetNpcPaletteSwapping, NPC_Sun_01, 0, 1, 5, 5, 13, 5, 0, 0) + Call(SetNpcPaletteSwapping, NPC_Sun_02, 0, 1, 5, 5, 13, 5, 0, 0) + IfLt(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetNpcPos, NPC_Sun_02, 0, 270, -5) + Else + Call(SetNpcPos, NPC_Sun_02, 0, 450, -5) + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_Sun_02))) + EndIf + Return + End }; NpcData N(NpcData_Sun)[] = { diff --git a/src/world/area_flo/flo_15/flo_15_4_entity.c b/src/world/area_flo/flo_15/flo_15_4_entity.c index 21223931588..33cf79abfae 100644 --- a/src/world/area_flo/flo_15/flo_15_4_entity.c +++ b/src/world/area_flo/flo_15/flo_15_4_entity.c @@ -2,16 +2,16 @@ #include "entity.h" EvtScript N(EVS_OnBlast_Rock) = { - EVT_SET(GF_FLO15_BombedRock, TRUE) - EVT_RETURN - EVT_END + Set(GF_FLO15_BombedRock, TRUE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_FLO15_BombedRock, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BombableRock), -180, 0, -18, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBlast_Rock))) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_FLO15_BombedRock, FALSE) + Call(MakeEntity, Ref(Entity_BombableRock), -180, 0, -18, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnBlast_Rock))) + EndIf + Return + End }; diff --git a/src/world/area_flo/flo_15/flo_15_5_stairs.c b/src/world/area_flo/flo_15/flo_15_5_stairs.c index 242bfcf2700..1a6e165e3b2 100644 --- a/src/world/area_flo/flo_15/flo_15_5_stairs.c +++ b/src/world/area_flo/flo_15/flo_15_5_stairs.c @@ -2,71 +2,71 @@ #include "effects.h" s32 N(ShakeCamParams)[] = { - 10, EVT_FLOAT(0.6), - 13, EVT_FLOAT(0.75), - 16, EVT_FLOAT(0.9), - 19, EVT_FLOAT(1.05), - 22, EVT_FLOAT(1.2), - 25, EVT_FLOAT(1.05), - 24, EVT_FLOAT(0.9), - 25, EVT_FLOAT(0.75), - 24, EVT_FLOAT(0.6), - 10, EVT_FLOAT(1.7), + 10, Float(0.6), + 13, Float(0.75), + 16, Float(0.9), + 19, Float(1.05), + 22, Float(1.2), + 25, Float(1.05), + 24, Float(0.9), + 25, Float(0.75), + 24, Float(0.6), + 10, Float(1.7), }; EvtScript N(EVS_MonitorFallingStairs) = { - EVT_IF_EQ(GF_FLO15_BombedRock, FALSE) - EVT_LABEL(0) - EVT_IF_EQ(GF_FLO15_BombedRock, FALSE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_THREAD - EVT_USE_BUF(EVT_PTR(N(ShakeCamParams))) - EVT_LOOP(10) - EVT_BUF_READ2(LVar1, LVar2) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, LVar1, LVar2) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -170, 0, 35) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -170, 0, 35) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 600) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(25.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-50.0), EVT_FLOAT(25.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_WAIT(100) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, -180, 0, -15, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, -190, 0, -35, 0) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(6) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o175, SOUND_FLO_STAIRS_LOWERING, SOUND_SPACE_DEFAULT) - EVT_WAIT(20) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, -50, 120, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g20, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g54, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_g58, COLLIDER_FLAGS_UPPER_MASK) - EVT_WAIT(15) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g54, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_g58, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(TranslateGroup, MODEL_g20, 0, -50, 0) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_FLO15_BombedRock, FALSE) + Label(0) + IfEq(GF_FLO15_BombedRock, FALSE) + Wait(1) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Thread + UseBuf(Ref(N(ShakeCamParams))) + Loop(10) + BufRead2(LVar1, LVar2) + Call(ShakeCam, CAM_DEFAULT, 0, LVar1, LVar2) + EndLoop + EndThread + Call(UseSettingsFrom, CAM_DEFAULT, -170, 0, 35) + Call(SetPanTarget, CAM_DEFAULT, -170, 0, 35) + Call(SetCamDistance, CAM_DEFAULT, 600) + Call(SetCamPitch, CAM_DEFAULT, Float(25.0), Float(-9.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(-50.0), Float(25.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Wait(100) + PlayEffect(EFFECT_LANDING_DUST, 4, -180, 0, -15, 0) + PlayEffect(EFFECT_LANDING_DUST, 4, -190, 0, -35, 0) + EndThread + Thread + Loop(6) + Call(PlaySoundAtCollider, COLLIDER_o175, SOUND_FLO_STAIRS_LOWERING, SOUND_SPACE_DEFAULT) + Wait(20) + EndLoop + EndThread + Call(MakeLerp, 0, -50, 120, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g20, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g54, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_g58, COLLIDER_FLAGS_UPPER_MASK) + Wait(15) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Call(DisablePlayerInput, FALSE) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g54, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_g58, COLLIDER_FLAGS_UPPER_MASK) + Call(TranslateGroup, MODEL_g20, 0, -50, 0) + EndIf + Return + End }; diff --git a/src/world/area_flo/flo_16/flo_16_1_music.c b/src/world/area_flo/flo_16/flo_16_1_music.c index 720dbd0fab5..0ddb4dff52f 100644 --- a/src/world/area_flo/flo_16/flo_16_1_music.c +++ b/src/world/area_flo/flo_16/flo_16_1_music.c @@ -1,12 +1,12 @@ #include "flo_16.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_flo/flo_16/flo_16_2_main.c b/src/world/area_flo/flo_16/flo_16_2_main.c index 4666ff1eaa3..8cf53b87d7d 100644 --- a/src/world/area_flo/flo_16/flo_16_2_main.c +++ b/src/world/area_flo/flo_16/flo_16_2_main.c @@ -10,10 +10,10 @@ EvtScript N(EVS_ExitWalk_flo_00_4) = EVT_EXIT_WALK(60, flo_16_ENTRY_0, "flo_00", EvtScript N(EVS_ExitWalk_flo_17_0) = EVT_EXIT_WALK(60, flo_16_ENTRY_1, "flo_17", flo_17_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_00_4)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_17_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_00_4)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_flo_17_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -23,52 +23,52 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupVines)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o174, SURFACE_TYPE_SPIKES) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_o59, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o142, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o58, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o136, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o146, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o143, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o135, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o138, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o139, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o140, TRUE) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LABEL(0) - EVT_ADD(LVar0, 140) - EVT_IF_GT(LVar0, 0x10000) - EVT_ADD(LVar0, -0x10000) - EVT_END_IF - EVT_CALL(SetTexPanOffset, 1, 0, LVar0, 0) - EVT_ADD(LVar1, -200) - EVT_IF_LT(LVar1, 0) - EVT_ADD(LVar1, 0x10000) - EVT_END_IF - EVT_CALL(SetTexPanOffset, 2, 0, LVar1, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_THREAD - EVT_EXEC(N(EVS_SetupPillarPuzzle)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupVines)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o174, SURFACE_TYPE_SPIKES) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + Call(EnableTexPanning, MODEL_o59, TRUE) + Call(EnableTexPanning, MODEL_o142, TRUE) + Call(EnableTexPanning, MODEL_o58, TRUE) + Call(EnableTexPanning, MODEL_o136, TRUE) + Call(EnableTexPanning, MODEL_o146, TRUE) + Call(EnableTexPanning, MODEL_o143, TRUE) + Call(EnableTexPanning, MODEL_o135, TRUE) + Call(EnableTexPanning, MODEL_o138, TRUE) + Call(EnableTexPanning, MODEL_o139, TRUE) + Call(EnableTexPanning, MODEL_o140, TRUE) + Thread + Set(LVar0, 0) + Set(LVar1, 0) + Label(0) + Add(LVar0, 140) + IfGt(LVar0, 0x10000) + Add(LVar0, -0x10000) + EndIf + Call(SetTexPanOffset, 1, 0, LVar0, 0) + Add(LVar1, -200) + IfLt(LVar1, 0) + Add(LVar1, 0x10000) + EndIf + Call(SetTexPanOffset, 2, 0, LVar1, 0) + Wait(1) + Goto(0) + EndThread + Exec(N(EVS_SetupPillarPuzzle)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Return + End }; diff --git a/src/world/area_flo/flo_16/flo_16_3_vines.c b/src/world/area_flo/flo_16/flo_16_3_vines.c index 3d60cc9bf18..4a2a3fb48a0 100644 --- a/src/world/area_flo/flo_16/flo_16_3_vines.c +++ b/src/world/area_flo/flo_16/flo_16_3_vines.c @@ -5,13 +5,13 @@ #include "../common/DroppingVine.inc.c" EvtScript N(EVS_SetupVines) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o214, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o214, SURFACE_TYPE_FLOWERS) EVT_FLOWER_SPAWN_REGION( -740, -140, -260, -55, 100) EVT_FLOWER_SPAWN_REGION( 250, -140, 725, -55, 180) EVT_DROPPING_VINE(ITEM_NONE, MODEL_o199, MODEL_o200, MODEL_o201, MODEL_o202) EVT_DROPPING_VINE(ITEM_STINKY_HERB, MODEL_o203, MODEL_o204, MODEL_o205, MODEL_o206) EVT_DROPPING_VINE(ITEM_NONE, MODEL_o209, MODEL_o210, MODEL_o211, MODEL_o212) EVT_DROPPING_VINE(ITEM_NONE, MODEL_o213, MODEL_o214, MODEL_o215, MODEL_o216) - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/area_flo/flo_16/flo_16_4_entity.c b/src/world/area_flo/flo_16/flo_16_4_entity.c index 4139b4c35da..0591236a772 100644 --- a/src/world/area_flo/flo_16/flo_16_4_entity.c +++ b/src/world/area_flo/flo_16/flo_16_4_entity.c @@ -6,29 +6,29 @@ #include "world/common/entity/SuperBlock.inc.c" EvtScript N(EVS_TetherCameraToPlayer) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_UseSpring) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAUNCH) - EVT_WAIT(2) - EVT_CALL(GetPlayerPos, LVar7, LVar8, LVar9) - EVT_EXEC_GET_TID(N(EVS_TetherCameraToPlayer), LVarA) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7)) - EVT_CALL(PlayerJump, 450, 180, -120, 30) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAUNCH) + Wait(2) + Call(GetPlayerPos, LVar7, LVar8, LVar9) + ExecGetTID(N(EVS_TetherCameraToPlayer), LVarA) + Call(SetPlayerJumpscale, Float(0.7)) + Call(PlayerJump, 450, 180, -120, 30) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; API_CALLABLE(N(IsPlayerPounding)) { @@ -40,28 +40,28 @@ API_CALLABLE(N(IsPlayerPounding)) { } EvtScript N(EVS_MonitorCeilingPound) = { - EVT_IF_EQ(AF_FLO16_FoundHiddenStarPiece, FALSE) - EVT_CALL(N(IsPlayerPounding)) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar0) - EVT_CASE_RANGE(620, 660) - EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 640, 145, -100, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_FLO16_Item_StarPiece) - EVT_SET(AF_FLO16_FoundHiddenStarPiece, TRUE) - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(AF_FLO16_FoundHiddenStarPiece, FALSE) + Call(N(IsPlayerPounding)) + IfEq(LVar0, 0) + Return + EndIf + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Switch(LVar0) + CaseRange(620, 660) + Call(MakeItemEntity, ITEM_STAR_PIECE, 640, 145, -100, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_FLO16_Item_StarPiece) + Set(AF_FLO16_FoundHiddenStarPiece, TRUE) + EndSwitch + EndIf + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_SET(AF_FLO16_FoundHiddenStarPiece, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_MonitorCeilingPound)), TRIGGER_FLOOR_TOUCH, COLLIDER_o214, 1, 0) + Set(AF_FLO16_FoundHiddenStarPiece, FALSE) + BindTrigger(Ref(N(EVS_MonitorCeilingPound)), TRIGGER_FLOOR_TOUCH, COLLIDER_o214, 1, 0) EVT_MAKE_SUPER_BLOCK(350, 240, -100, 0) - EVT_CALL(MakeEntity, EVT_PTR(Entity_ScriptSpring), 472, 100, -100, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_UseSpring))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_ScriptSpring), 472, 100, -100, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_UseSpring))) + Return + End }; diff --git a/src/world/area_flo/flo_16/flo_16_6_puzzle.c b/src/world/area_flo/flo_16/flo_16_6_puzzle.c index c8409edde77..b151a14deb6 100644 --- a/src/world/area_flo/flo_16/flo_16_6_puzzle.c +++ b/src/world/area_flo/flo_16/flo_16_6_puzzle.c @@ -9,227 +9,227 @@ API_CALLABLE(N(CheckForPoundInput)) { } EvtScript N(EVS_OnTouch_RedPillar) = { - EVT_CALL(N(CheckForPoundInput)) - EVT_IF_EQ(LVar0, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_EQ(AF_FLO_RaisedRedPillar, FALSE) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, 50) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 180) - EVT_SET(AF_FLO_RaisedRedPillar, TRUE) - EVT_ELSE - EVT_SET(LVar5, 50) - EVT_SET(LVar6, 0) - EVT_SET(LVar7, 180) - EVT_SET(LVar8, 0) - EVT_SET(AF_FLO_RaisedRedPillar, FALSE) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(PlaySound, SOUND_FLO_MOVE_PILLAR) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30, EVT_FLOAT(0.8)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_CALL(MakeLerp, LVar5, LVar6, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_g81, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_g82, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_g85, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_g86, 0, LVar0, 0) - EVT_CALL(RotateGroup, MODEL_g82, LVar7, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_g86, LVar7, 1, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o242) - EVT_CALL(UpdateColliderTransform, COLLIDER_o250) - EVT_CALL(UpdateColliderTransform, COLLIDER_o244) - EVT_CALL(UpdateColliderTransform, COLLIDER_o252) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, FALSE) - EVT_WAIT(10) - EVT_CALL(MakeLerp, LVar7, LVar8, 15, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_g81, 0, LVar6, 0) - EVT_CALL(TranslateGroup, MODEL_g82, 0, LVar6, 0) - EVT_CALL(TranslateModel, MODEL_g85, 0, LVar6, 0) - EVT_CALL(TranslateGroup, MODEL_g86, 0, LVar6, 0) - EVT_CALL(RotateGroup, MODEL_g82, LVar0, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_g86, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(N(CheckForPoundInput)) + IfEq(LVar0, FALSE) + Return + EndIf + Call(DisablePlayerInput, TRUE) + IfEq(AF_FLO_RaisedRedPillar, FALSE) + Set(LVar5, 0) + Set(LVar6, 50) + Set(LVar7, 0) + Set(LVar8, 180) + Set(AF_FLO_RaisedRedPillar, TRUE) + Else + Set(LVar5, 50) + Set(LVar6, 0) + Set(LVar7, 180) + Set(LVar8, 0) + Set(AF_FLO_RaisedRedPillar, FALSE) + EndIf + Wait(15) + Call(PlaySound, SOUND_FLO_MOVE_PILLAR) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 30, Float(0.8)) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(0.2)) + EndThread + Call(MakeLerp, LVar5, LVar6, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_g81, 0, LVar0, 0) + Call(TranslateGroup, MODEL_g82, 0, LVar0, 0) + Call(TranslateModel, MODEL_g85, 0, LVar0, 0) + Call(TranslateGroup, MODEL_g86, 0, LVar0, 0) + Call(RotateGroup, MODEL_g82, LVar7, 1, 0, 0) + Call(RotateGroup, MODEL_g86, LVar7, 1, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o242) + Call(UpdateColliderTransform, COLLIDER_o250) + Call(UpdateColliderTransform, COLLIDER_o244) + Call(UpdateColliderTransform, COLLIDER_o252) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, FALSE) + Wait(10) + Call(MakeLerp, LVar7, LVar8, 15, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_g81, 0, LVar6, 0) + Call(TranslateGroup, MODEL_g82, 0, LVar6, 0) + Call(TranslateModel, MODEL_g85, 0, LVar6, 0) + Call(TranslateGroup, MODEL_g86, 0, LVar6, 0) + Call(RotateGroup, MODEL_g82, LVar0, 1, 0, 0) + Call(RotateGroup, MODEL_g86, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_OnTouch_GreenPillar) = { - EVT_CALL(N(CheckForPoundInput)) - EVT_IF_EQ(LVar0, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_EQ(AF_FLO_RaisedGreenPillar, FALSE) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, 50) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 180) - EVT_SET(AF_FLO_RaisedGreenPillar, TRUE) - EVT_ELSE - EVT_SET(LVar5, 50) - EVT_SET(LVar6, 0) - EVT_SET(LVar7, 180) - EVT_SET(LVar8, 0) - EVT_SET(AF_FLO_RaisedGreenPillar, FALSE) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(PlaySound, SOUND_FLO_MOVE_PILLAR) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30, EVT_FLOAT(0.8)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_CALL(MakeLerp, LVar5, LVar6, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_g83, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_g84, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_g87, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_g88, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_g91, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_g92, 0, LVar0, 0) - EVT_CALL(RotateGroup, MODEL_g84, LVar7, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_g88, LVar7, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_g92, LVar7, 1, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o243) - EVT_CALL(UpdateColliderTransform, COLLIDER_o251) - EVT_CALL(UpdateColliderTransform, COLLIDER_o245) - EVT_CALL(UpdateColliderTransform, COLLIDER_o253) - EVT_CALL(UpdateColliderTransform, COLLIDER_o247) - EVT_CALL(UpdateColliderTransform, COLLIDER_o255) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, FALSE) - EVT_WAIT(10) - EVT_CALL(MakeLerp, LVar7, LVar8, 15, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_g83, 0, LVar6, 0) - EVT_CALL(TranslateGroup, MODEL_g84, 0, LVar6, 0) - EVT_CALL(TranslateModel, MODEL_g87, 0, LVar6, 0) - EVT_CALL(TranslateGroup, MODEL_g88, 0, LVar6, 0) - EVT_CALL(TranslateModel, MODEL_g91, 0, LVar6, 0) - EVT_CALL(TranslateGroup, MODEL_g92, 0, LVar6, 0) - EVT_CALL(RotateGroup, MODEL_g84, LVar0, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_g88, LVar0, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_g92, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(N(CheckForPoundInput)) + IfEq(LVar0, FALSE) + Return + EndIf + Call(DisablePlayerInput, TRUE) + IfEq(AF_FLO_RaisedGreenPillar, FALSE) + Set(LVar5, 0) + Set(LVar6, 50) + Set(LVar7, 0) + Set(LVar8, 180) + Set(AF_FLO_RaisedGreenPillar, TRUE) + Else + Set(LVar5, 50) + Set(LVar6, 0) + Set(LVar7, 180) + Set(LVar8, 0) + Set(AF_FLO_RaisedGreenPillar, FALSE) + EndIf + Wait(15) + Call(PlaySound, SOUND_FLO_MOVE_PILLAR) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 30, Float(0.8)) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(0.2)) + EndThread + Call(MakeLerp, LVar5, LVar6, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_g83, 0, LVar0, 0) + Call(TranslateGroup, MODEL_g84, 0, LVar0, 0) + Call(TranslateModel, MODEL_g87, 0, LVar0, 0) + Call(TranslateGroup, MODEL_g88, 0, LVar0, 0) + Call(TranslateModel, MODEL_g91, 0, LVar0, 0) + Call(TranslateGroup, MODEL_g92, 0, LVar0, 0) + Call(RotateGroup, MODEL_g84, LVar7, 1, 0, 0) + Call(RotateGroup, MODEL_g88, LVar7, 1, 0, 0) + Call(RotateGroup, MODEL_g92, LVar7, 1, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o243) + Call(UpdateColliderTransform, COLLIDER_o251) + Call(UpdateColliderTransform, COLLIDER_o245) + Call(UpdateColliderTransform, COLLIDER_o253) + Call(UpdateColliderTransform, COLLIDER_o247) + Call(UpdateColliderTransform, COLLIDER_o255) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, FALSE) + Wait(10) + Call(MakeLerp, LVar7, LVar8, 15, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_g83, 0, LVar6, 0) + Call(TranslateGroup, MODEL_g84, 0, LVar6, 0) + Call(TranslateModel, MODEL_g87, 0, LVar6, 0) + Call(TranslateGroup, MODEL_g88, 0, LVar6, 0) + Call(TranslateModel, MODEL_g91, 0, LVar6, 0) + Call(TranslateGroup, MODEL_g92, 0, LVar6, 0) + Call(RotateGroup, MODEL_g84, LVar0, 1, 0, 0) + Call(RotateGroup, MODEL_g88, LVar0, 1, 0, 0) + Call(RotateGroup, MODEL_g92, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_OnTouch_PurplePillar) = { - EVT_CALL(N(CheckForPoundInput)) - EVT_IF_EQ(LVar0, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_EQ(AF_FLO_LoweredPurplePillar, FALSE) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, -50) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 180) - EVT_SET(AF_FLO_LoweredPurplePillar, TRUE) - EVT_ELSE - EVT_SET(LVar5, -50) - EVT_SET(LVar6, 0) - EVT_SET(LVar7, 180) - EVT_SET(LVar8, 0) - EVT_SET(AF_FLO_LoweredPurplePillar, FALSE) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(PlaySound, SOUND_FLO_MOVE_PILLAR) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30, EVT_FLOAT(0.8)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_CALL(MakeLerp, LVar5, LVar6, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_g89, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_g90, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_g93, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_g94, 0, LVar0, 0) - EVT_CALL(RotateGroup, MODEL_g90, LVar7, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_g94, LVar7, 1, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o246) - EVT_CALL(UpdateColliderTransform, COLLIDER_o254) - EVT_CALL(UpdateColliderTransform, COLLIDER_o248) - EVT_CALL(UpdateColliderTransform, COLLIDER_o256) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, FALSE) - EVT_WAIT(10) - EVT_CALL(MakeLerp, LVar7, LVar8, 15, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_g89, 0, LVar6, 0) - EVT_CALL(TranslateGroup, MODEL_g90, 0, LVar6, 0) - EVT_CALL(TranslateModel, MODEL_g93, 0, LVar6, 0) - EVT_CALL(TranslateGroup, MODEL_g94, 0, LVar6, 0) - EVT_CALL(RotateGroup, MODEL_g90, LVar0, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_g94, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(N(CheckForPoundInput)) + IfEq(LVar0, FALSE) + Return + EndIf + Call(DisablePlayerInput, TRUE) + IfEq(AF_FLO_LoweredPurplePillar, FALSE) + Set(LVar5, 0) + Set(LVar6, -50) + Set(LVar7, 0) + Set(LVar8, 180) + Set(AF_FLO_LoweredPurplePillar, TRUE) + Else + Set(LVar5, -50) + Set(LVar6, 0) + Set(LVar7, 180) + Set(LVar8, 0) + Set(AF_FLO_LoweredPurplePillar, FALSE) + EndIf + Wait(15) + Call(PlaySound, SOUND_FLO_MOVE_PILLAR) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 30, Float(0.8)) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(0.2)) + EndThread + Call(MakeLerp, LVar5, LVar6, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_g89, 0, LVar0, 0) + Call(TranslateGroup, MODEL_g90, 0, LVar0, 0) + Call(TranslateModel, MODEL_g93, 0, LVar0, 0) + Call(TranslateGroup, MODEL_g94, 0, LVar0, 0) + Call(RotateGroup, MODEL_g90, LVar7, 1, 0, 0) + Call(RotateGroup, MODEL_g94, LVar7, 1, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o246) + Call(UpdateColliderTransform, COLLIDER_o254) + Call(UpdateColliderTransform, COLLIDER_o248) + Call(UpdateColliderTransform, COLLIDER_o256) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, FALSE) + Wait(10) + Call(MakeLerp, LVar7, LVar8, 15, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_g89, 0, LVar6, 0) + Call(TranslateGroup, MODEL_g90, 0, LVar6, 0) + Call(TranslateModel, MODEL_g93, 0, LVar6, 0) + Call(TranslateGroup, MODEL_g94, 0, LVar6, 0) + Call(RotateGroup, MODEL_g90, LVar0, 1, 0, 0) + Call(RotateGroup, MODEL_g94, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_SetupPillarPuzzle) = { - EVT_SET(AF_FLO_RaisedRedPillar, FALSE) - EVT_SET(AF_FLO_RaisedGreenPillar, FALSE) - EVT_SET(AF_FLO_LoweredPurplePillar, FALSE) - EVT_CALL(ParentColliderToModel, COLLIDER_o242, MODEL_g81) - EVT_CALL(ParentColliderToModel, COLLIDER_o250, MODEL_g81) - EVT_CALL(ParentColliderToModel, COLLIDER_o243, MODEL_g83) - EVT_CALL(ParentColliderToModel, COLLIDER_o251, MODEL_g83) - EVT_CALL(ParentColliderToModel, COLLIDER_o244, MODEL_g85) - EVT_CALL(ParentColliderToModel, COLLIDER_o252, MODEL_g85) - EVT_CALL(ParentColliderToModel, COLLIDER_o245, MODEL_g87) - EVT_CALL(ParentColliderToModel, COLLIDER_o253, MODEL_g87) - EVT_CALL(ParentColliderToModel, COLLIDER_o246, MODEL_g89) - EVT_CALL(ParentColliderToModel, COLLIDER_o254, MODEL_g89) - EVT_CALL(ParentColliderToModel, COLLIDER_o247, MODEL_g91) - EVT_CALL(ParentColliderToModel, COLLIDER_o255, MODEL_g91) - EVT_CALL(ParentColliderToModel, COLLIDER_o248, MODEL_g93) - EVT_CALL(ParentColliderToModel, COLLIDER_o256, MODEL_g93) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_RedPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o242, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_GreenPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o243, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_RedPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o244, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_GreenPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o245, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_PurplePillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o246, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_GreenPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o247, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_PurplePillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o248, 1, 0) - EVT_RETURN - EVT_END + Set(AF_FLO_RaisedRedPillar, FALSE) + Set(AF_FLO_RaisedGreenPillar, FALSE) + Set(AF_FLO_LoweredPurplePillar, FALSE) + Call(ParentColliderToModel, COLLIDER_o242, MODEL_g81) + Call(ParentColliderToModel, COLLIDER_o250, MODEL_g81) + Call(ParentColliderToModel, COLLIDER_o243, MODEL_g83) + Call(ParentColliderToModel, COLLIDER_o251, MODEL_g83) + Call(ParentColliderToModel, COLLIDER_o244, MODEL_g85) + Call(ParentColliderToModel, COLLIDER_o252, MODEL_g85) + Call(ParentColliderToModel, COLLIDER_o245, MODEL_g87) + Call(ParentColliderToModel, COLLIDER_o253, MODEL_g87) + Call(ParentColliderToModel, COLLIDER_o246, MODEL_g89) + Call(ParentColliderToModel, COLLIDER_o254, MODEL_g89) + Call(ParentColliderToModel, COLLIDER_o247, MODEL_g91) + Call(ParentColliderToModel, COLLIDER_o255, MODEL_g91) + Call(ParentColliderToModel, COLLIDER_o248, MODEL_g93) + Call(ParentColliderToModel, COLLIDER_o256, MODEL_g93) + BindTrigger(Ref(N(EVS_OnTouch_RedPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o242, 1, 0) + BindTrigger(Ref(N(EVS_OnTouch_GreenPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o243, 1, 0) + BindTrigger(Ref(N(EVS_OnTouch_RedPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o244, 1, 0) + BindTrigger(Ref(N(EVS_OnTouch_GreenPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o245, 1, 0) + BindTrigger(Ref(N(EVS_OnTouch_PurplePillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o246, 1, 0) + BindTrigger(Ref(N(EVS_OnTouch_GreenPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o247, 1, 0) + BindTrigger(Ref(N(EVS_OnTouch_PurplePillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o248, 1, 0) + Return + End }; diff --git a/src/world/area_flo/flo_17/flo_17_1_music.c b/src/world/area_flo/flo_17/flo_17_1_music.c index 1424ce37ccf..47ad5d845c1 100644 --- a/src/world/area_flo/flo_17/flo_17_1_music.c +++ b/src/world/area_flo/flo_17/flo_17_1_music.c @@ -1,12 +1,12 @@ #include "flo_17.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_flo/flo_17/flo_17_2_main.c b/src/world/area_flo/flo_17/flo_17_2_main.c index bde30aa15b2..e36324c7b33 100644 --- a/src/world/area_flo/flo_17/flo_17_2_main.c +++ b/src/world/area_flo/flo_17/flo_17_2_main.c @@ -12,10 +12,10 @@ EvtScript N(EVS_ExitWalk_flo_16_1) = EVT_EXIT_WALK(60, flo_17_ENTRY_0, "flo_16", EvtScript N(EVS_ExitWalk_flo_18_0) = EVT_EXIT_WALK(60, flo_17_ENTRY_1, "flo_18", flo_18_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_16_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_18_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_16_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_flo_18_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -42,89 +42,89 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupLogBridges)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o116, SURFACE_TYPE_FLOWERS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o117, SURFACE_TYPE_FLOWERS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o121, SURFACE_TYPE_FLOWERS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o124, SURFACE_TYPE_FLOWERS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o126, SURFACE_TYPE_FLOWERS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o128, SURFACE_TYPE_FLOWERS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o129, SURFACE_TYPE_FLOWERS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o132, SURFACE_TYPE_FLOWERS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o133, SURFACE_TYPE_FLOWERS) + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupLogBridges)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o116, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o117, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o121, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o124, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o126, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o128, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o129, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o132, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o133, SURFACE_TYPE_FLOWERS) EVT_FLOWER_SPAWN_REGION( -736, -137, -522, -118, 0) EVT_FLOWER_SPAWN_REGION( -728, 76, -496, 137, 0) EVT_FLOWER_SPAWN_REGION( -160, -117, -92, -54, 0) EVT_FLOWER_SPAWN_REGION( 76, -124, 150, -55, 0) EVT_FLOWER_SPAWN_REGION( 192, 60, 309, 133, 0) EVT_FLOWER_SPAWN_REGION( 488, 46, 733, 137, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o103, SURFACE_TYPE_SPIKES) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_o34, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o36, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o37, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o40, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o41, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o44, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o45, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o47, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o48, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o51, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o52, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o55, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o23, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o25, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o26, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o29, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o30, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o33, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o35, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o38, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o39, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o42, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o43, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o46, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o49, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o50, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o53, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o54, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o24, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o27, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o28, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o31, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o32, TRUE) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LABEL(0) - EVT_ADD(LVar0, 140) - EVT_IF_GT(LVar0, 0x10000) - EVT_ADD(LVar0, -0x10000) - EVT_END_IF - EVT_CALL(SetTexPanOffset, 1, 0, LVar0, 0) - EVT_ADD(LVar1, -200) - EVT_IF_LT(LVar1, 0) - EVT_ADD(LVar1, 0x10000) - EVT_END_IF - EVT_CALL(SetTexPanOffset, 2, 0, LVar1, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_THREAD - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o103, SURFACE_TYPE_SPIKES) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + Call(EnableTexPanning, MODEL_o34, TRUE) + Call(EnableTexPanning, MODEL_o36, TRUE) + Call(EnableTexPanning, MODEL_o37, TRUE) + Call(EnableTexPanning, MODEL_o40, TRUE) + Call(EnableTexPanning, MODEL_o41, TRUE) + Call(EnableTexPanning, MODEL_o44, TRUE) + Call(EnableTexPanning, MODEL_o45, TRUE) + Call(EnableTexPanning, MODEL_o47, TRUE) + Call(EnableTexPanning, MODEL_o48, TRUE) + Call(EnableTexPanning, MODEL_o51, TRUE) + Call(EnableTexPanning, MODEL_o52, TRUE) + Call(EnableTexPanning, MODEL_o55, TRUE) + Call(EnableTexPanning, MODEL_o23, TRUE) + Call(EnableTexPanning, MODEL_o25, TRUE) + Call(EnableTexPanning, MODEL_o26, TRUE) + Call(EnableTexPanning, MODEL_o29, TRUE) + Call(EnableTexPanning, MODEL_o30, TRUE) + Call(EnableTexPanning, MODEL_o33, TRUE) + Call(EnableTexPanning, MODEL_o35, TRUE) + Call(EnableTexPanning, MODEL_o38, TRUE) + Call(EnableTexPanning, MODEL_o39, TRUE) + Call(EnableTexPanning, MODEL_o42, TRUE) + Call(EnableTexPanning, MODEL_o43, TRUE) + Call(EnableTexPanning, MODEL_o46, TRUE) + Call(EnableTexPanning, MODEL_o49, TRUE) + Call(EnableTexPanning, MODEL_o50, TRUE) + Call(EnableTexPanning, MODEL_o53, TRUE) + Call(EnableTexPanning, MODEL_o54, TRUE) + Call(EnableTexPanning, MODEL_o24, TRUE) + Call(EnableTexPanning, MODEL_o27, TRUE) + Call(EnableTexPanning, MODEL_o28, TRUE) + Call(EnableTexPanning, MODEL_o31, TRUE) + Call(EnableTexPanning, MODEL_o32, TRUE) + Thread + Set(LVar0, 0) + Set(LVar1, 0) + Label(0) + Add(LVar0, 140) + IfGt(LVar0, 0x10000) + Add(LVar0, -0x10000) + EndIf + Call(SetTexPanOffset, 1, 0, LVar0, 0) + Add(LVar1, -200) + IfLt(LVar1, 0) + Add(LVar1, 0x10000) + EndIf + Call(SetTexPanOffset, 2, 0, LVar1, 0) + Wait(1) + Goto(0) + EndThread + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Return + End }; diff --git a/src/world/area_flo/flo_17/flo_17_3_logs.c b/src/world/area_flo/flo_17/flo_17_3_logs.c index 34aec80f5cd..b1f1e074c86 100644 --- a/src/world/area_flo/flo_17/flo_17_3_logs.c +++ b/src/world/area_flo/flo_17/flo_17_3_logs.c @@ -6,6 +6,6 @@ EvtScript N(EVS_SetupLogBridges) = { EVT_MAKE_LOG_BRIDGE(COLLIDER_o22, COLLIDER_o138, MODEL_o19, MODEL_o20, MV_RotAngle_Log_01, MV_RotVelocity_Log_01) EVT_MAKE_LOG_BRIDGE(COLLIDER_o15, COLLIDER_o139, MODEL_o17, MODEL_o18, MV_RotAngle_Log_02, MV_RotVelocity_Log_02) EVT_MAKE_LOG_BRIDGE(COLLIDER_o13, COLLIDER_o140, MODEL_o11, MODEL_o12, MV_RotAngle_Log_03, MV_RotVelocity_Log_03) - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/area_flo/flo_17/flo_17_5_entity.c b/src/world/area_flo/flo_17/flo_17_5_entity.c index 4e42cf8abb9..7c1c3760a9e 100644 --- a/src/world/area_flo/flo_17/flo_17_5_entity.c +++ b/src/world/area_flo/flo_17/flo_17_5_entity.c @@ -2,9 +2,9 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 660, 60, -115, 0, ITEM_THUNDER_RAGE, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_FLO17_HiddenItem_ThunderRage) - EVT_CALL(MakeItemEntity, ITEM_LETTER_TO_MINH_T, -245, 0, 105, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO17_Item_Letter09) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 660, 60, -115, 0, ITEM_THUNDER_RAGE, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_FLO17_HiddenItem_ThunderRage) + Call(MakeItemEntity, ITEM_LETTER_TO_MINH_T, -245, 0, 105, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO17_Item_Letter09) + Return + End }; diff --git a/src/world/area_flo/flo_18/flo_18_1_music.c b/src/world/area_flo/flo_18/flo_18_1_music.c index d6983650817..445a9842290 100644 --- a/src/world/area_flo/flo_18/flo_18_1_music.c +++ b/src/world/area_flo/flo_18/flo_18_1_music.c @@ -1,13 +1,13 @@ #include "flo_18.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_PUFF_PUFF_MACHINE, 0, 8) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o126, SOUND_LOOP_PUFF_PUFF_MACHINE, SOUND_SPACE_DEFAULT) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_PUFF_PUFF_MACHINE, 0, 8) + Call(PlaySoundAtCollider, COLLIDER_o126, SOUND_LOOP_PUFF_PUFF_MACHINE, SOUND_SPACE_DEFAULT) + CaseDefault + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_flo/flo_18/flo_18_2_main.c b/src/world/area_flo/flo_18/flo_18_2_main.c index 4de072b0f96..607467b709b 100644 --- a/src/world/area_flo/flo_18/flo_18_2_main.c +++ b/src/world/area_flo/flo_18/flo_18_2_main.c @@ -11,9 +11,9 @@ API_CALLABLE(N(SpawnSunEffect)) { EvtScript N(EVS_ExitWalk_flo_17_1) = EVT_EXIT_WALK(60, flo_18_ENTRY_0, "flo_17", flo_17_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_17_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_17_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -24,56 +24,56 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_EXEC(N(EVS_SetupMachine)) - EVT_EXEC(N(EVS_SetupMachineDamageReactions)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o44, SURFACE_TYPE_SPIKES) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_o48, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o50, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o52, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o54, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o58, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o60, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o49, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o51, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o53, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o57, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o59, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Exec(N(EVS_SetupFoliage)) + Exec(N(EVS_SetupMachine)) + Exec(N(EVS_SetupMachineDamageReactions)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o44, SURFACE_TYPE_SPIKES) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + Call(EnableTexPanning, MODEL_o48, TRUE) + Call(EnableTexPanning, MODEL_o50, TRUE) + Call(EnableTexPanning, MODEL_o52, TRUE) + Call(EnableTexPanning, MODEL_o54, TRUE) + Call(EnableTexPanning, MODEL_o58, TRUE) + Call(EnableTexPanning, MODEL_o60, TRUE) + Call(EnableTexPanning, MODEL_o49, TRUE) + Call(EnableTexPanning, MODEL_o51, TRUE) + Call(EnableTexPanning, MODEL_o53, TRUE) + Call(EnableTexPanning, MODEL_o57, TRUE) + Call(EnableTexPanning, MODEL_o59, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( -140, 0, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( -200, 0, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, flo_18_ENTRY_0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_ELSE - EVT_EXEC(N(EVS_Scene_LakilesterLikesBeingGood)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(GetEntryID, LVar0) + IfEq(LVar0, flo_18_ENTRY_0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Else + Exec(N(EVS_Scene_LakilesterLikesBeingGood)) + Exec(N(EVS_BindExitTriggers)) + EndIf + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Return + End }; diff --git a/src/world/area_flo/flo_18/flo_18_3_machine.c b/src/world/area_flo/flo_18/flo_18_3_machine.c index 4050c7e04e7..ce12b7e1e27 100644 --- a/src/world/area_flo/flo_18/flo_18_3_machine.c +++ b/src/world/area_flo/flo_18/flo_18_3_machine.c @@ -22,471 +22,471 @@ API_CALLABLE(N(SetMachineLightningColor)) { } EvtScript N(EVS_AnimateMachineLightning) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_LOOP(0) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, EVT_FLOAT(-16.0), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(80.9), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(0.5), 6) - EVT_CALL(N(SetMachineLightningColor)) - EVT_WAIT(4) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, EVT_FLOAT(80.9), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(-16.0), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(0.5), 6) - EVT_CALL(N(SetMachineLightningColor)) - EVT_WAIT(4) - EVT_IF_GE(GB_FLO18_MachineDamage_Right, 3) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(LVar0, 6) - EVT_LOOP(5) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, EVT_FLOAT(-16.0), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(80.9), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(0.5), 6) - EVT_CALL(N(SetMachineLightningColor)) - EVT_WAIT(LVar0) - EVT_ADD(LVar0, 2) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, EVT_FLOAT(80.9), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(-16.0), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(0.5), 6) - EVT_CALL(N(SetMachineLightningColor)) - EVT_WAIT(LVar0) - EVT_ADD(LVar0, 2) - EVT_END_LOOP - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0B) + Loop(0) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, Float(-16.0), Float(102.0), Float(-4.1), Float(80.9), Float(102.0), Float(-4.1), Float(0.5), 6) + Call(N(SetMachineLightningColor)) + Wait(4) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, Float(80.9), Float(102.0), Float(-4.1), Float(-16.0), Float(102.0), Float(-4.1), Float(0.5), 6) + Call(N(SetMachineLightningColor)) + Wait(4) + IfGe(GB_FLO18_MachineDamage_Right, 3) + BreakLoop + EndIf + EndLoop + Set(LVar0, 6) + Loop(5) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, Float(-16.0), Float(102.0), Float(-4.1), Float(80.9), Float(102.0), Float(-4.1), Float(0.5), 6) + Call(N(SetMachineLightningColor)) + Wait(LVar0) + Add(LVar0, 2) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, Float(80.9), Float(102.0), Float(-4.1), Float(-16.0), Float(102.0), Float(-4.1), Float(0.5), 6) + Call(N(SetMachineLightningColor)) + Wait(LVar0) + Add(LVar0, 2) + EndLoop + Return + End }; #include "common/CosInterpMinMax.inc.c" EvtScript N(EVS_UpdateSmokeParticle) = { - EVT_CALL(EnableModel, LVarF, TRUE) - EVT_SET(LVarE, 159) - EVT_LOOP(LVarE) - EVT_ADDF(LVar3, 0) - EVT_ADDF(LVar4, EVT_FLOAT(0.0)) - EVT_SETF(LVar5, EVT_FLOAT(0.01)) - EVT_ADDF(LVar0, LVar3) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_MULF(LVar6, EVT_FLOAT(1.01)) - EVT_ADDF(LVar7, EVT_FLOAT(0.01)) - EVT_SETF(LVar8, LVar6) - EVT_CALL(N(CosInterpMinMax), LVarE, LVarA, EVT_FLOAT(0.0), EVT_FLOAT(0.203), 15, 0, 0) - EVT_ADDF(LVar8, LVarA) - EVT_SETF(LVar9, LVar7) - EVT_CALL(N(CosInterpMinMax), LVarE, LVarA, EVT_FLOAT(0.0), EVT_FLOAT(0.203), 20, 0, 90) - EVT_ADDF(LVar9, LVarA) - EVT_SETF(LVarA, LVar0) - EVT_MULF(LVarA, EVT_FLOAT(10.0)) - EVT_CALL(TranslateModel, LVarF, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, LVarF, LVar8, LVar9, 1) - EVT_CALL(RotateModel, LVarF, LVarA, 0, 0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EnableModel, LVarF, FALSE) - EVT_RETURN - EVT_END + Call(EnableModel, LVarF, TRUE) + Set(LVarE, 159) + Loop(LVarE) + AddF(LVar3, 0) + AddF(LVar4, Float(0.0)) + SetF(LVar5, Float(0.01)) + AddF(LVar0, LVar3) + AddF(LVar1, LVar4) + AddF(LVar2, LVar5) + MulF(LVar6, Float(1.01)) + AddF(LVar7, Float(0.01)) + SetF(LVar8, LVar6) + Call(N(CosInterpMinMax), LVarE, LVarA, Float(0.0), Float(0.203), 15, 0, 0) + AddF(LVar8, LVarA) + SetF(LVar9, LVar7) + Call(N(CosInterpMinMax), LVarE, LVarA, Float(0.0), Float(0.203), 20, 0, 90) + AddF(LVar9, LVarA) + SetF(LVarA, LVar0) + MulF(LVarA, Float(10.0)) + Call(TranslateModel, LVarF, LVar0, LVar1, LVar2) + Call(ScaleModel, LVarF, LVar8, LVar9, 1) + Call(RotateModel, LVarF, LVarA, 0, 0, 1) + Wait(1) + EndLoop + Call(EnableModel, LVarF, FALSE) + Return + End }; EvtScript N(EVS_ManageSmoke) = { - EVT_SET(LVarE, 0) - EVT_LABEL(0) - EVT_IF_GE(GB_FLO18_MachineDamage_Right, 3) - EVT_RETURN - EVT_END_IF - EVT_SETF(LVar0, EVT_FLOAT(132.0)) - EVT_SETF(LVar1, EVT_FLOAT(90.0)) - EVT_SETF(LVar2, EVT_FLOAT(-30.0)) - EVT_CALL(RandInt, 100, LVar3) - EVT_ADDF(LVar3, -50) - EVT_DIVF(LVar3, EVT_FLOAT(200.0)) - EVT_SETF(LVar4, EVT_FLOAT(1.0)) - EVT_SETF(LVar5, 0) - EVT_SETF(LVar6, EVT_FLOAT(0.296)) - EVT_SETF(LVar7, EVT_FLOAT(0.296)) - EVT_SET(LVarF, LVarE) - EVT_ADD(LVarF, CLONED_MODEL(0)) - EVT_EXEC(N(EVS_UpdateSmokeParticle)) - EVT_ADD(LVarE, 1) - EVT_IF_GE(LVarE, 16) - EVT_SET(LVarE, 0) - EVT_END_IF - EVT_WAIT(10) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVarE, 0) + Label(0) + IfGe(GB_FLO18_MachineDamage_Right, 3) + Return + EndIf + SetF(LVar0, Float(132.0)) + SetF(LVar1, Float(90.0)) + SetF(LVar2, Float(-30.0)) + Call(RandInt, 100, LVar3) + AddF(LVar3, -50) + DivF(LVar3, Float(200.0)) + SetF(LVar4, Float(1.0)) + SetF(LVar5, 0) + SetF(LVar6, Float(0.296)) + SetF(LVar7, Float(0.296)) + Set(LVarF, LVarE) + Add(LVarF, CLONED_MODEL(0)) + Exec(N(EVS_UpdateSmokeParticle)) + Add(LVarE, 1) + IfGe(LVarE, 16) + Set(LVarE, 0) + EndIf + Wait(10) + Goto(0) + Return + End }; EvtScript N(EVS_ShakeMachine) = { - EVT_IF_EQ(MF_MachineShaking, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(MF_MachineShaking, TRUE) - EVT_SET(LVarF, 0) - EVT_LOOP(12) - EVT_CALL(RandInt, 80, LVar0) - EVT_SUB(LVar0, 40) - EVT_CALL(RandInt, 50, LVar1) - EVT_CALL(RandInt, 50, LVar2) - EVT_SUB(LVar2, 25) - EVT_PLAY_EFFECT(EFFECT_00, LVar0, LVar1, LVar2, 5, 10, 1, 1) - EVT_ADD(LVarF, 1) - EVT_CALL(N(CosInterpMinMax), LVarF, LVarE, EVT_FLOAT(1.0), EVT_FLOAT(1.093), 2, 0, 0) - EVT_CALL(N(CosInterpMinMax), LVarF, LVarD, EVT_FLOAT(1.093), EVT_FLOAT(1.0), 2, 0, 0) - EVT_SETF(LVar0, LVarE) - EVT_SETF(LVar1, LVarD) - EVT_SETF(LVar2, LVarE) - EVT_IF_EQ(GB_FLO18_MachineDamage_Left, 0) - EVT_CALL(ScaleModel, MODEL_o115, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o116, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_IF_EQ(GB_FLO18_MachineDamage_Right, 0) - EVT_CALL(ScaleModel, MODEL_o117, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o118, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_IF_LE(GB_FLO18_MachineDamage_Left, 1) - EVT_CALL(ScaleModel, MODEL_o119, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_IF_LE(GB_FLO18_MachineDamage_Left, 2) - EVT_IF_LE(GB_FLO18_MachineDamage_Right, 1) - EVT_CALL(ScaleModel, MODEL_o120, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o121, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o122, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o123, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o124, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_END_IF - EVT_CALL(ScaleModel, MODEL_o113, LVar0, LVar1, LVar2) - EVT_IF_LE(GB_FLO18_MachineDamage_Left, 2) - EVT_IF_LE(GB_FLO18_MachineDamage_Right, 2) - EVT_CALL(ScaleModel, MODEL_o100, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o99, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o125, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_END_IF - EVT_CALL(ScaleModel, MODEL_o92, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o93, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o94, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o95, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o91, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o114, LVar0, LVar1, LVar2) - EVT_SUBF(LVar0, EVT_FLOAT(1.046)) - EVT_MULF(LVar0, EVT_FLOAT(100.0)) - EVT_IF_EQ(GB_FLO18_MachineDamage_Left, 0) - EVT_CALL(RotateModel, MODEL_o115, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o116, LVar0, 0, 0, 1) - EVT_END_IF - EVT_IF_EQ(GB_FLO18_MachineDamage_Right, 0) - EVT_CALL(RotateModel, MODEL_o117, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o118, LVar0, 0, 0, 1) - EVT_END_IF - EVT_IF_LE(GB_FLO18_MachineDamage_Left, 1) - EVT_CALL(RotateModel, MODEL_o119, LVar0, 0, 0, 1) - EVT_END_IF - EVT_IF_LE(GB_FLO18_MachineDamage_Left, 2) - EVT_IF_LE(GB_FLO18_MachineDamage_Right, 1) - EVT_CALL(RotateModel, MODEL_o120, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o121, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o122, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o123, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o124, LVar0, 0, 0, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(RotateModel, MODEL_o113, LVar0, 0, 0, 1) - EVT_IF_LE(GB_FLO18_MachineDamage_Left, 2) - EVT_IF_LE(GB_FLO18_MachineDamage_Right, 2) - EVT_CALL(RotateModel, MODEL_o100, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o99, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o125, LVar0, 0, 0, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(RotateModel, MODEL_o92, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o93, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o94, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o95, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o91, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o114, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SETF(LVar0, 1) - EVT_SETF(LVar1, 1) - EVT_SETF(LVar2, 1) - EVT_IF_EQ(GB_FLO18_MachineDamage_Left, 0) - EVT_CALL(ScaleModel, MODEL_o115, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o116, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_IF_EQ(GB_FLO18_MachineDamage_Right, 0) - EVT_CALL(ScaleModel, MODEL_o117, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o118, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_IF_LE(GB_FLO18_MachineDamage_Left, 1) - EVT_CALL(ScaleModel, MODEL_o119, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_IF_LE(GB_FLO18_MachineDamage_Left, 2) - EVT_IF_LE(GB_FLO18_MachineDamage_Right, 1) - EVT_CALL(ScaleModel, MODEL_o120, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o121, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o122, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o123, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o124, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_END_IF - EVT_CALL(ScaleModel, MODEL_o113, LVar0, LVar1, LVar2) - EVT_IF_LE(GB_FLO18_MachineDamage_Left, 2) - EVT_IF_LE(GB_FLO18_MachineDamage_Right, 2) - EVT_CALL(ScaleModel, MODEL_o100, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o99, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o125, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_END_IF - EVT_CALL(ScaleModel, MODEL_o92, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o93, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o94, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o95, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o91, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o114, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_SET(MF_MachineShaking, FALSE) - EVT_RETURN - EVT_END + IfEq(MF_MachineShaking, TRUE) + Return + EndIf + Set(MF_MachineShaking, TRUE) + Set(LVarF, 0) + Loop(12) + Call(RandInt, 80, LVar0) + Sub(LVar0, 40) + Call(RandInt, 50, LVar1) + Call(RandInt, 50, LVar2) + Sub(LVar2, 25) + PlayEffect(EFFECT_00, LVar0, LVar1, LVar2, 5, 10, 1, 1) + Add(LVarF, 1) + Call(N(CosInterpMinMax), LVarF, LVarE, Float(1.0), Float(1.093), 2, 0, 0) + Call(N(CosInterpMinMax), LVarF, LVarD, Float(1.093), Float(1.0), 2, 0, 0) + SetF(LVar0, LVarE) + SetF(LVar1, LVarD) + SetF(LVar2, LVarE) + IfEq(GB_FLO18_MachineDamage_Left, 0) + Call(ScaleModel, MODEL_o115, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o116, LVar0, LVar1, LVar2) + EndIf + IfEq(GB_FLO18_MachineDamage_Right, 0) + Call(ScaleModel, MODEL_o117, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o118, LVar0, LVar1, LVar2) + EndIf + IfLe(GB_FLO18_MachineDamage_Left, 1) + Call(ScaleModel, MODEL_o119, LVar0, LVar1, LVar2) + EndIf + IfLe(GB_FLO18_MachineDamage_Left, 2) + IfLe(GB_FLO18_MachineDamage_Right, 1) + Call(ScaleModel, MODEL_o120, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o121, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o122, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o123, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o124, LVar0, LVar1, LVar2) + EndIf + EndIf + Call(ScaleModel, MODEL_o113, LVar0, LVar1, LVar2) + IfLe(GB_FLO18_MachineDamage_Left, 2) + IfLe(GB_FLO18_MachineDamage_Right, 2) + Call(ScaleModel, MODEL_o100, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o99, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o125, LVar0, LVar1, LVar2) + EndIf + EndIf + Call(ScaleModel, MODEL_o92, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o93, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o94, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o95, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o91, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o114, LVar0, LVar1, LVar2) + SubF(LVar0, Float(1.046)) + MulF(LVar0, Float(100.0)) + IfEq(GB_FLO18_MachineDamage_Left, 0) + Call(RotateModel, MODEL_o115, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o116, LVar0, 0, 0, 1) + EndIf + IfEq(GB_FLO18_MachineDamage_Right, 0) + Call(RotateModel, MODEL_o117, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o118, LVar0, 0, 0, 1) + EndIf + IfLe(GB_FLO18_MachineDamage_Left, 1) + Call(RotateModel, MODEL_o119, LVar0, 0, 0, 1) + EndIf + IfLe(GB_FLO18_MachineDamage_Left, 2) + IfLe(GB_FLO18_MachineDamage_Right, 1) + Call(RotateModel, MODEL_o120, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o121, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o122, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o123, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o124, LVar0, 0, 0, 1) + EndIf + EndIf + Call(RotateModel, MODEL_o113, LVar0, 0, 0, 1) + IfLe(GB_FLO18_MachineDamage_Left, 2) + IfLe(GB_FLO18_MachineDamage_Right, 2) + Call(RotateModel, MODEL_o100, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o99, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o125, LVar0, 0, 0, 1) + EndIf + EndIf + Call(RotateModel, MODEL_o92, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o93, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o94, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o95, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o91, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o114, LVar0, 0, 0, 1) + Wait(1) + EndLoop + SetF(LVar0, 1) + SetF(LVar1, 1) + SetF(LVar2, 1) + IfEq(GB_FLO18_MachineDamage_Left, 0) + Call(ScaleModel, MODEL_o115, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o116, LVar0, LVar1, LVar2) + EndIf + IfEq(GB_FLO18_MachineDamage_Right, 0) + Call(ScaleModel, MODEL_o117, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o118, LVar0, LVar1, LVar2) + EndIf + IfLe(GB_FLO18_MachineDamage_Left, 1) + Call(ScaleModel, MODEL_o119, LVar0, LVar1, LVar2) + EndIf + IfLe(GB_FLO18_MachineDamage_Left, 2) + IfLe(GB_FLO18_MachineDamage_Right, 1) + Call(ScaleModel, MODEL_o120, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o121, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o122, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o123, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o124, LVar0, LVar1, LVar2) + EndIf + EndIf + Call(ScaleModel, MODEL_o113, LVar0, LVar1, LVar2) + IfLe(GB_FLO18_MachineDamage_Left, 2) + IfLe(GB_FLO18_MachineDamage_Right, 2) + Call(ScaleModel, MODEL_o100, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o99, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o125, LVar0, LVar1, LVar2) + EndIf + EndIf + Call(ScaleModel, MODEL_o92, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o93, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o94, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o95, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o91, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o114, LVar0, LVar1, LVar2) + Wait(1) + Set(MF_MachineShaking, FALSE) + Return + End }; EvtScript N(EVS_DamagedLeftOnce) = { - EVT_SETF(LVar0, 0) - EVT_SETF(LVar1, 0) - EVT_SETF(LVar2, 0) - EVT_SETF(LVar3, EVT_FLOAT(-1.0)) - EVT_SETF(LVar4, EVT_FLOAT(0.0)) - EVT_SETF(LVar5, EVT_FLOAT(3.0)) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o130, SOUND_PUFF_PUFF_PART_BREAKS, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_LOOP(300) - EVT_ADDF(LVar4, EVT_FLOAT(-0.5)) - EVT_ADDF(LVar5, EVT_FLOAT(0.093)) - EVT_ADDF(LVar0, LVar3) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_IF_LT(LVar1, -10) - EVT_SETF(LVar1, EVT_FLOAT(-10.0)) - EVT_SETF(LVar3, EVT_FLOAT(0.0)) - EVT_SETF(LVar4, EVT_FLOAT(0.0)) - EVT_IF_GE(LVar2, 80) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(TranslateModel, MODEL_o115, -78, 19, 2) - EVT_CALL(TranslateModel, MODEL_o116, -78, 19, 2) - EVT_CALL(TranslateModel, MODEL_o115, LVar0, LVar1, 0) - EVT_CALL(TranslateModel, MODEL_o116, LVar0, LVar1, 0) - EVT_CALL(RotateModel, MODEL_o115, LVar2, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o116, LVar2, 0, 0, 1) - EVT_CALL(TranslateModel, MODEL_o115, 78, -19, -2) - EVT_CALL(TranslateModel, MODEL_o116, 78, -19, -2) - EVT_WAIT(1) -EVT_END_LOOP -EVT_LABEL(0) -EVT_WAIT(30) -EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o130, COLLIDER_FLAGS_UPPER_MASK) -EVT_RETURN -EVT_END + SetF(LVar0, 0) + SetF(LVar1, 0) + SetF(LVar2, 0) + SetF(LVar3, Float(-1.0)) + SetF(LVar4, Float(0.0)) + SetF(LVar5, Float(3.0)) + Thread + Wait(10) + Call(PlaySoundAtCollider, COLLIDER_o130, SOUND_PUFF_PUFF_PART_BREAKS, SOUND_SPACE_DEFAULT) + EndThread + Loop(300) + AddF(LVar4, Float(-0.5)) + AddF(LVar5, Float(0.093)) + AddF(LVar0, LVar3) + AddF(LVar1, LVar4) + AddF(LVar2, LVar5) + IfLt(LVar1, -10) + SetF(LVar1, Float(-10.0)) + SetF(LVar3, Float(0.0)) + SetF(LVar4, Float(0.0)) + IfGe(LVar2, 80) + Goto(0) + EndIf + EndIf + EndIf + Call(TranslateModel, MODEL_o115, -78, 19, 2) + Call(TranslateModel, MODEL_o116, -78, 19, 2) + Call(TranslateModel, MODEL_o115, LVar0, LVar1, 0) + Call(TranslateModel, MODEL_o116, LVar0, LVar1, 0) + Call(RotateModel, MODEL_o115, LVar2, 0, 0, 1) + Call(RotateModel, MODEL_o116, LVar2, 0, 0, 1) + Call(TranslateModel, MODEL_o115, 78, -19, -2) + Call(TranslateModel, MODEL_o116, 78, -19, -2) + Wait(1) +EndLoop +Label(0) +Wait(30) +Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o130, COLLIDER_FLAGS_UPPER_MASK) +Return +End }; EvtScript N(EVS_DamagedRightOnce) = { - EVT_SETF(LVar0, 0) - EVT_SETF(LVar1, 0) - EVT_SETF(LVar2, 0) - EVT_SETF(LVar3, EVT_FLOAT(0.0)) - EVT_SETF(LVar4, EVT_FLOAT(0.0)) - EVT_SETF(LVar5, EVT_FLOAT(-5.0)) - EVT_THREAD - EVT_WAIT(12) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o175, SOUND_PUFF_PUFF_PANEL_BREAKS, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_LOOP(300) - EVT_ADDF(LVar4, EVT_FLOAT(-0.5)) - EVT_ADDF(LVar0, LVar3) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_IF_LT(LVar2, -45) - EVT_SET(LVar5, 5) - EVT_END_IF - EVT_IF_GT(LVar2, 0) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 5) - EVT_END_IF - EVT_IF_LT(LVar1, -25) - EVT_SET(LVar4, 0) - EVT_SET(LVar1, -25) - EVT_END_IF - EVT_IF_GT(LVar0, 90) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(TranslateModel, MODEL_o117, 50, 28, 27) - EVT_CALL(TranslateModel, MODEL_o118, 50, 28, 27) - EVT_CALL(TranslateModel, MODEL_o117, 0, LVar1, 1) - EVT_CALL(TranslateModel, MODEL_o118, 0, LVar1, 1) - EVT_CALL(RotateModel, MODEL_o117, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o118, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o117, LVar2, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o118, LVar2, 0, 0, 1) - EVT_CALL(TranslateModel, MODEL_o117, -50, -28, -27) - EVT_CALL(TranslateModel, MODEL_o118, -50, -28, -27) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LABEL(0) - EVT_WAIT(30) - EVT_RETURN - EVT_END + SetF(LVar0, 0) + SetF(LVar1, 0) + SetF(LVar2, 0) + SetF(LVar3, Float(0.0)) + SetF(LVar4, Float(0.0)) + SetF(LVar5, Float(-5.0)) + Thread + Wait(12) + Call(PlaySoundAtCollider, COLLIDER_o175, SOUND_PUFF_PUFF_PANEL_BREAKS, SOUND_SPACE_DEFAULT) + EndThread + Loop(300) + AddF(LVar4, Float(-0.5)) + AddF(LVar0, LVar3) + AddF(LVar1, LVar4) + AddF(LVar2, LVar5) + IfLt(LVar2, -45) + Set(LVar5, 5) + EndIf + IfGt(LVar2, 0) + Set(LVar2, 0) + Set(LVar3, 5) + EndIf + IfLt(LVar1, -25) + Set(LVar4, 0) + Set(LVar1, -25) + EndIf + IfGt(LVar0, 90) + Goto(0) + EndIf + Call(TranslateModel, MODEL_o117, 50, 28, 27) + Call(TranslateModel, MODEL_o118, 50, 28, 27) + Call(TranslateModel, MODEL_o117, 0, LVar1, 1) + Call(TranslateModel, MODEL_o118, 0, LVar1, 1) + Call(RotateModel, MODEL_o117, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o118, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o117, LVar2, 0, 0, 1) + Call(RotateModel, MODEL_o118, LVar2, 0, 0, 1) + Call(TranslateModel, MODEL_o117, -50, -28, -27) + Call(TranslateModel, MODEL_o118, -50, -28, -27) + Wait(1) + EndLoop + Label(0) + Wait(30) + Return + End }; EvtScript N(EVS_DamagedLeftTwice) = { - EVT_SETF(LVar2, 0) - EVT_SETF(LVar1, 0) - EVT_SETF(LVar0, 0) - EVT_SETF(LVar5, EVT_FLOAT(0.0)) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o174, SOUND_PUFF_PUFF_PANEL_BREAKS, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_LOOP(300) - EVT_ADDF(LVar5, EVT_FLOAT(0.5)) - EVT_ADDF(LVar2, LVar5) - EVT_IF_GE(LVar2, 80) - EVT_SETF(LVar2, 80) - EVT_MULF(LVar5, EVT_FLOAT(-0.5)) - EVT_IF_EQ(LVar5, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_CALL(TranslateModel, MODEL_o119, -55, 5, 16) - EVT_CALL(TranslateModel, MODEL_o119, LVar0, LVar1, 0) - EVT_CALL(RotateModel, MODEL_o119, LVar2, 0, 0, 1) - EVT_CALL(TranslateModel, MODEL_o119, 55, -5, -16) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LABEL(0) - EVT_WAIT(30) - EVT_RETURN - EVT_END + SetF(LVar2, 0) + SetF(LVar1, 0) + SetF(LVar0, 0) + SetF(LVar5, Float(0.0)) + Thread + Wait(15) + Call(PlaySoundAtCollider, COLLIDER_o174, SOUND_PUFF_PUFF_PANEL_BREAKS, SOUND_SPACE_DEFAULT) + EndThread + Loop(300) + AddF(LVar5, Float(0.5)) + AddF(LVar2, LVar5) + IfGe(LVar2, 80) + SetF(LVar2, 80) + MulF(LVar5, Float(-0.5)) + IfEq(LVar5, 0) + Goto(0) + EndIf + EndIf + Call(TranslateModel, MODEL_o119, -55, 5, 16) + Call(TranslateModel, MODEL_o119, LVar0, LVar1, 0) + Call(RotateModel, MODEL_o119, LVar2, 0, 0, 1) + Call(TranslateModel, MODEL_o119, 55, -5, -16) + Wait(1) + EndLoop + Label(0) + Wait(30) + Return + End }; EvtScript N(EVS_DamagedRightTwice) = { - EVT_SETF(LVar2, 0) - EVT_SETF(LVar1, 0) - EVT_SETF(LVar0, 0) - EVT_SETF(LVar5, EVT_FLOAT(0.0)) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o127, SOUND_PUFF_PUFF_PANEL_BREAKS, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_LOOP(300) - EVT_ADDF(LVar5, EVT_FLOAT(0.5)) - EVT_ADDF(LVar2, LVar5) - EVT_IF_GE(LVar2, 80) - EVT_SETF(LVar2, 80) - EVT_MULF(LVar5, EVT_FLOAT(-0.5)) - EVT_IF_EQ(LVar5, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_CALL(TranslateModel, MODEL_o122, 60, 0, 16) - EVT_CALL(RotateModel, MODEL_o122, LVar2, 0, 0, -1) - EVT_CALL(TranslateModel, MODEL_o122, -60, 0, -16) - EVT_CALL(TranslateModel, MODEL_o120, 0, 0, 27) - EVT_CALL(TranslateModel, MODEL_o121, 0, 0, 27) - EVT_CALL(RotateModel, MODEL_o120, LVar2, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o121, LVar2, 1, 0, 0) - EVT_CALL(TranslateModel, MODEL_o120, 0, 0, -27) - EVT_CALL(TranslateModel, MODEL_o121, 0, 0, -27) - EVT_CALL(TranslateModel, MODEL_o123, 0, 0, -41) - EVT_CALL(TranslateModel, MODEL_o124, 0, 0, -41) - EVT_CALL(RotateModel, MODEL_o123, LVar2, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o124, LVar2, -1, 0, 0) - EVT_CALL(TranslateModel, MODEL_o123, 0, 0, 41) - EVT_CALL(TranslateModel, MODEL_o124, 0, 0, 41) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LABEL(0) - EVT_WAIT(30) - EVT_RETURN - EVT_END + SetF(LVar2, 0) + SetF(LVar1, 0) + SetF(LVar0, 0) + SetF(LVar5, Float(0.0)) + Thread + Wait(15) + Call(PlaySoundAtCollider, COLLIDER_o127, SOUND_PUFF_PUFF_PANEL_BREAKS, SOUND_SPACE_DEFAULT) + EndThread + Loop(300) + AddF(LVar5, Float(0.5)) + AddF(LVar2, LVar5) + IfGe(LVar2, 80) + SetF(LVar2, 80) + MulF(LVar5, Float(-0.5)) + IfEq(LVar5, 0) + Goto(0) + EndIf + EndIf + Call(TranslateModel, MODEL_o122, 60, 0, 16) + Call(RotateModel, MODEL_o122, LVar2, 0, 0, -1) + Call(TranslateModel, MODEL_o122, -60, 0, -16) + Call(TranslateModel, MODEL_o120, 0, 0, 27) + Call(TranslateModel, MODEL_o121, 0, 0, 27) + Call(RotateModel, MODEL_o120, LVar2, 1, 0, 0) + Call(RotateModel, MODEL_o121, LVar2, 1, 0, 0) + Call(TranslateModel, MODEL_o120, 0, 0, -27) + Call(TranslateModel, MODEL_o121, 0, 0, -27) + Call(TranslateModel, MODEL_o123, 0, 0, -41) + Call(TranslateModel, MODEL_o124, 0, 0, -41) + Call(RotateModel, MODEL_o123, LVar2, -1, 0, 0) + Call(RotateModel, MODEL_o124, LVar2, -1, 0, 0) + Call(TranslateModel, MODEL_o123, 0, 0, 41) + Call(TranslateModel, MODEL_o124, 0, 0, 41) + Wait(1) + EndLoop + Label(0) + Wait(30) + Return + End }; EvtScript N(EVS_BreakSmokestack) = { - EVT_SETF(LVar0, 0) - EVT_SETF(LVar1, 0) - EVT_SETF(LVar2, 0) - EVT_SETF(LVar3, EVT_FLOAT(-1.0)) - EVT_SETF(LVar4, EVT_FLOAT(0.0)) - EVT_SETF(LVar5, EVT_FLOAT(3.0)) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o131, SOUND_PUFF_PUFF_PART_BREAKS, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_LOOP(300) - EVT_ADDF(LVar4, EVT_FLOAT(-0.5)) - EVT_ADDF(LVar5, EVT_FLOAT(0.093)) - EVT_ADDF(LVar0, LVar3) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_IF_LT(LVar1, -25) - EVT_SETF(LVar1, EVT_FLOAT(-25.0)) - EVT_SETF(LVar3, EVT_FLOAT(0.0)) - EVT_SETF(LVar4, EVT_FLOAT(0.0)) - EVT_IF_GE(LVar2, 80) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(TranslateModel, MODEL_o100, 124, 17, 3) - EVT_CALL(TranslateModel, MODEL_o100, LVar0, LVar1, 0) - EVT_CALL(RotateModel, MODEL_o100, LVar2, 0, 0, -1) - EVT_CALL(TranslateModel, MODEL_o100, -124, -17, -3) - EVT_WAIT(1) -EVT_END_LOOP -EVT_LABEL(0) -EVT_RETURN -EVT_END + SetF(LVar0, 0) + SetF(LVar1, 0) + SetF(LVar2, 0) + SetF(LVar3, Float(-1.0)) + SetF(LVar4, Float(0.0)) + SetF(LVar5, Float(3.0)) + Thread + Wait(15) + Call(PlaySoundAtCollider, COLLIDER_o131, SOUND_PUFF_PUFF_PART_BREAKS, SOUND_SPACE_DEFAULT) + EndThread + Loop(300) + AddF(LVar4, Float(-0.5)) + AddF(LVar5, Float(0.093)) + AddF(LVar0, LVar3) + AddF(LVar1, LVar4) + AddF(LVar2, LVar5) + IfLt(LVar1, -25) + SetF(LVar1, Float(-25.0)) + SetF(LVar3, Float(0.0)) + SetF(LVar4, Float(0.0)) + IfGe(LVar2, 80) + Goto(0) + EndIf + EndIf + EndIf + Call(TranslateModel, MODEL_o100, 124, 17, 3) + Call(TranslateModel, MODEL_o100, LVar0, LVar1, 0) + Call(RotateModel, MODEL_o100, LVar2, 0, 0, -1) + Call(TranslateModel, MODEL_o100, -124, -17, -3) + Wait(1) +EndLoop +Label(0) +Return +End }; EvtScript N(EVS_BreakAntenna) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o131, COLLIDER_FLAGS_UPPER_MASK) - EVT_SETF(LVar0, 0) - EVT_SETF(LVar1, 0) - EVT_SETF(LVar2, 0) - EVT_SETF(LVar3, EVT_FLOAT(3.0)) - EVT_SETF(LVar4, EVT_FLOAT(1.0)) - EVT_SETF(LVar5, EVT_FLOAT(5.0)) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o126, SOUND_PUFF_PUFF_PART_BREAKS, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_LOOP(300) - EVT_ADDF(LVar4, EVT_FLOAT(-0.5)) - EVT_ADDF(LVar0, LVar3) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_IF_LE(LVar1, -40) - EVT_SETF(LVar1, -40) - EVT_MULF(LVar4, EVT_FLOAT(-0.5)) - EVT_IF_LE(LVar4, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_IF - EVT_IF_GE(LVar2, 60) - EVT_SETF(LVar2, 60) - EVT_SETF(LVar5, 0) - EVT_END_IF - EVT_CALL(TranslateModel, MODEL_o99, -34, 50, 10) - EVT_CALL(TranslateModel, MODEL_o125, -34, 50, 10) - EVT_CALL(TranslateModel, MODEL_o99, 0, LVar1, LVar0) - EVT_CALL(RotateModel, MODEL_o99, LVar2, 0, 0, 1) - EVT_CALL(TranslateModel, MODEL_o125, 0, LVar1, LVar0) - EVT_CALL(RotateModel, MODEL_o125, LVar2, 0, 0, 1) - EVT_CALL(TranslateModel, MODEL_o99, 34, -50, -10) - EVT_CALL(TranslateModel, MODEL_o125, 34, -50, -10) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LABEL(1) - EVT_WAIT(30) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o131, COLLIDER_FLAGS_UPPER_MASK) + SetF(LVar0, 0) + SetF(LVar1, 0) + SetF(LVar2, 0) + SetF(LVar3, Float(3.0)) + SetF(LVar4, Float(1.0)) + SetF(LVar5, Float(5.0)) + Thread + Wait(15) + Call(PlaySoundAtCollider, COLLIDER_o126, SOUND_PUFF_PUFF_PART_BREAKS, SOUND_SPACE_DEFAULT) + EndThread + Loop(300) + AddF(LVar4, Float(-0.5)) + AddF(LVar0, LVar3) + AddF(LVar1, LVar4) + AddF(LVar2, LVar5) + IfLe(LVar1, -40) + SetF(LVar1, -40) + MulF(LVar4, Float(-0.5)) + IfLe(LVar4, 1) + Goto(1) + EndIf + EndIf + IfGe(LVar2, 60) + SetF(LVar2, 60) + SetF(LVar5, 0) + EndIf + Call(TranslateModel, MODEL_o99, -34, 50, 10) + Call(TranslateModel, MODEL_o125, -34, 50, 10) + Call(TranslateModel, MODEL_o99, 0, LVar1, LVar0) + Call(RotateModel, MODEL_o99, LVar2, 0, 0, 1) + Call(TranslateModel, MODEL_o125, 0, LVar1, LVar0) + Call(RotateModel, MODEL_o125, LVar2, 0, 0, 1) + Call(TranslateModel, MODEL_o99, 34, -50, -10) + Call(TranslateModel, MODEL_o125, 34, -50, -10) + Wait(1) + EndLoop + Label(1) + Wait(30) + Return + End }; Vec3i N(SmokeBurstPositions)[] = { @@ -502,125 +502,125 @@ Vec3i N(SmokeBurstPositions)[] = { EvtScript N(EVS_DamageMachine) = { #define LABEL_DONE 0 - EVT_SET(LVarA, LVar0) // in: damage part - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, -210) - EVT_RETURN - EVT_END_IF - EVT_CALL(PlaySound, SOUND_PUFF_PUFF_SMASH) - EVT_EXEC_WAIT(N(EVS_ShakeMachine)) - EVT_SET(LVar0, LVarA) - EVT_IF_LT(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) - EVT_SET(MF_HitGuardedMachine, TRUE) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(MF_MachineBeingDamaged, TRUE) - EVT_RETURN - EVT_END_IF + Set(LVarA, LVar0) // in: damage part + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, -210) + Return + EndIf + Call(PlaySound, SOUND_PUFF_PUFF_SMASH) + ExecWait(N(EVS_ShakeMachine)) + Set(LVar0, LVarA) + IfLt(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) + Set(MF_HitGuardedMachine, TRUE) + Return + EndIf + IfEq(MF_MachineBeingDamaged, TRUE) + Return + EndIf // check damage type - EVT_SET(MF_MachineBeingDamaged, TRUE) - EVT_IF_GT(LVar0, DAMAGE_PART_PROTRUSTIONS) - EVT_GOTO(LABEL_DONE) - EVT_END_IF - EVT_IF_EQ(LVar0, DAMAGE_PART_PROTRUSTIONS) - EVT_GOTO(11) - EVT_END_IF - EVT_IF_EQ(LVar0, DAMAGE_PART_LEFT_SIDE) - EVT_LABEL(11) - EVT_IF_EQ(GB_FLO18_MachineDamage_Left, 0) - EVT_SET(GB_FLO18_MachineDamage_Left, 1) - EVT_EXEC(N(EVS_DamagedLeftOnce)) - EVT_GOTO(LABEL_DONE) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVar0, DAMAGE_PART_RIGHT_SIDE) - EVT_IF_EQ(GB_FLO18_MachineDamage_Right, 0) - EVT_SET(GB_FLO18_MachineDamage_Right, 1) - EVT_EXEC(N(EVS_DamagedRightOnce)) - EVT_GOTO(LABEL_DONE) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVar0, DAMAGE_PART_LEFT_SIDE) - EVT_IF_EQ(GB_FLO18_MachineDamage_Left, 1) - EVT_SET(GB_FLO18_MachineDamage_Left, 2) - EVT_EXEC(N(EVS_DamagedLeftTwice)) - EVT_GOTO(LABEL_DONE) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(GB_FLO18_MachineDamage_Left, 2) - EVT_IF_EQ(GB_FLO18_MachineDamage_Right, 1) - EVT_SET(GB_FLO18_MachineDamage_Right, 2) - EVT_EXEC(N(EVS_DamagedRightTwice)) - EVT_GOTO(LABEL_DONE) - EVT_END_IF - EVT_END_IF + Set(MF_MachineBeingDamaged, TRUE) + IfGt(LVar0, DAMAGE_PART_PROTRUSTIONS) + Goto(LABEL_DONE) + EndIf + IfEq(LVar0, DAMAGE_PART_PROTRUSTIONS) + Goto(11) + EndIf + IfEq(LVar0, DAMAGE_PART_LEFT_SIDE) + Label(11) + IfEq(GB_FLO18_MachineDamage_Left, 0) + Set(GB_FLO18_MachineDamage_Left, 1) + Exec(N(EVS_DamagedLeftOnce)) + Goto(LABEL_DONE) + EndIf + EndIf + IfEq(LVar0, DAMAGE_PART_RIGHT_SIDE) + IfEq(GB_FLO18_MachineDamage_Right, 0) + Set(GB_FLO18_MachineDamage_Right, 1) + Exec(N(EVS_DamagedRightOnce)) + Goto(LABEL_DONE) + EndIf + EndIf + IfEq(LVar0, DAMAGE_PART_LEFT_SIDE) + IfEq(GB_FLO18_MachineDamage_Left, 1) + Set(GB_FLO18_MachineDamage_Left, 2) + Exec(N(EVS_DamagedLeftTwice)) + Goto(LABEL_DONE) + EndIf + EndIf + IfEq(GB_FLO18_MachineDamage_Left, 2) + IfEq(GB_FLO18_MachineDamage_Right, 1) + Set(GB_FLO18_MachineDamage_Right, 2) + Exec(N(EVS_DamagedRightTwice)) + Goto(LABEL_DONE) + EndIf + EndIf // check if machine is fully broken (2 damage to each side) - EVT_IF_EQ(GB_FLO18_MachineDamage_Left, 2) - EVT_IF_EQ(GB_FLO18_MachineDamage_Right, 2) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 40, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 40, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_SET(GB_FLO18_MachineDamage_Right, 3) - EVT_EXEC_WAIT(N(EVS_ShakeMachine)) - EVT_EXEC_WAIT(N(EVS_ShakeMachine)) - EVT_EXEC_WAIT(N(EVS_ShakeMachine)) - EVT_WAIT(30) - EVT_CALL(GetModelCenter, MODEL_o113) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, 50, LVar2, 100, 20, 0, 30) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, 30, LVar2, 120, 20, 0, 30) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, 10, LVar2, 100, 20, 0, 30) - EVT_WAIT(15) - EVT_THREAD - EVT_SET(LVar3, 6) - EVT_USE_BUF(EVT_PTR(N(SmokeBurstPositions))) - EVT_LOOP(ARRAY_COUNT(N(SmokeBurstPositions))) - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAt, SOUND_FLO_PUFF_PUFF_SMOKE_BURST, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, 1, 6) - EVT_WAIT(2) - EVT_ADD(LVar1, 5) - EVT_CALL(PlaySoundAt, SOUND_FLO_PUFF_PUFF_SMOKE_BURST, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, 2, 15) - EVT_WAIT(LVar3) - EVT_ADD(LVar3, 1) - EVT_END_LOOP - EVT_SETF(LVar4, EVT_FLOAT(2.0)) - EVT_LOOP(2) - EVT_USE_BUF(EVT_PTR(N(SmokeBurstPositions))) - EVT_LOOP(ARRAY_COUNT(N(SmokeBurstPositions))) - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAt, SOUND_FLO_PUFF_PUFF_SMOKE_BURST, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, 1, 25) - EVT_WAIT(LVar3) - EVT_ADD(LVar3, LVar4) - EVT_ADDF(LVar4, EVT_FLOAT(0.5)) - EVT_END_LOOP - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(PlaySoundAt, SOUND_FLO_PUFF_PUFF_EXPLODE, SOUND_SPACE_DEFAULT, 70, 40, 10) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 0, 70, 40, 10, EVT_FLOAT(3.0), 30) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(1.0)) - EVT_CALL(PlaySoundAt, SOUND_FLO_PUFF_PUFF_EXPLODE, SOUND_SPACE_DEFAULT, 0, 30, 30) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 0, 0, 30, 30, EVT_FLOAT(4.0), 40) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(2.0)) - EVT_EXEC_WAIT(N(EVS_BreakSmokestack)) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o126, SOUND_LRAW_PUFF_PUFF_MACHINE | SOUND_ID_TRIGGER_CHANGE_SOUND, SOUND_SPACE_DEFAULT) - EVT_CALL(FadeOutMusic, 0, 1000) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_WAIT(30) - EVT_EXEC_WAIT(N(EVS_BreakAntenna)) - EVT_SET(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(GotoMap, EVT_PTR("flo_15"), flo_15_ENTRY_1) - EVT_WAIT(70) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_LABEL(LABEL_DONE) - EVT_SET(MF_MachineBeingDamaged, FALSE) - EVT_RETURN - EVT_END + IfEq(GB_FLO18_MachineDamage_Left, 2) + IfEq(GB_FLO18_MachineDamage_Right, 2) + Call(DisablePlayerInput, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, 40, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 40, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Set(GB_FLO18_MachineDamage_Right, 3) + ExecWait(N(EVS_ShakeMachine)) + ExecWait(N(EVS_ShakeMachine)) + ExecWait(N(EVS_ShakeMachine)) + Wait(30) + Call(GetModelCenter, MODEL_o113) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, 50, LVar2, 100, 20, 0, 30) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, 30, LVar2, 120, 20, 0, 30) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, 10, LVar2, 100, 20, 0, 30) + Wait(15) + Thread + Set(LVar3, 6) + UseBuf(Ref(N(SmokeBurstPositions))) + Loop(ARRAY_COUNT(N(SmokeBurstPositions))) + BufRead3(LVar0, LVar1, LVar2) + Call(PlaySoundAt, SOUND_FLO_PUFF_PUFF_SMOKE_BURST, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, 1, 6) + Wait(2) + Add(LVar1, 5) + Call(PlaySoundAt, SOUND_FLO_PUFF_PUFF_SMOKE_BURST, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, 2, 15) + Wait(LVar3) + Add(LVar3, 1) + EndLoop + SetF(LVar4, Float(2.0)) + Loop(2) + UseBuf(Ref(N(SmokeBurstPositions))) + Loop(ARRAY_COUNT(N(SmokeBurstPositions))) + BufRead3(LVar0, LVar1, LVar2) + Call(PlaySoundAt, SOUND_FLO_PUFF_PUFF_SMOKE_BURST, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, 1, 25) + Wait(LVar3) + Add(LVar3, LVar4) + AddF(LVar4, Float(0.5)) + EndLoop + EndLoop + EndThread + Call(PlaySoundAt, SOUND_FLO_PUFF_PUFF_EXPLODE, SOUND_SPACE_DEFAULT, 70, 40, 10) + PlayEffect(EFFECT_RING_BLAST, 0, 70, 40, 10, Float(3.0), 30) + Call(ShakeCam, CAM_DEFAULT, 0, 20, Float(1.0)) + Call(PlaySoundAt, SOUND_FLO_PUFF_PUFF_EXPLODE, SOUND_SPACE_DEFAULT, 0, 30, 30) + PlayEffect(EFFECT_RING_BLAST, 0, 0, 30, 30, Float(4.0), 40) + Call(ShakeCam, CAM_DEFAULT, 0, 20, Float(2.0)) + ExecWait(N(EVS_BreakSmokestack)) + Call(PlaySoundAtCollider, COLLIDER_o126, SOUND_LRAW_PUFF_PUFF_MACHINE | SOUND_ID_TRIGGER_CHANGE_SOUND, SOUND_SPACE_DEFAULT) + Call(FadeOutMusic, 0, 1000) + Call(DisablePlayerPhysics, TRUE) + Wait(30) + ExecWait(N(EVS_BreakAntenna)) + Set(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(GotoMap, Ref("flo_15"), flo_15_ENTRY_1) + Wait(70) + Return + EndIf + EndIf + Label(LABEL_DONE) + Set(MF_MachineBeingDamaged, FALSE) + Return + End }; BombTrigger N(Machine_BombTrigger_01) = { @@ -644,124 +644,124 @@ BombTrigger N(Machine_BombTrigger_04) = { }; EvtScript N(EVS_SetupMachine) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(EnableModel, MODEL_o101, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o130, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_o115, FALSE) - EVT_CALL(EnableModel, MODEL_o116, FALSE) - EVT_CALL(EnableModel, MODEL_o117, FALSE) - EVT_CALL(EnableModel, MODEL_o118, FALSE) - EVT_CALL(EnableModel, MODEL_o119, FALSE) - EVT_CALL(EnableModel, MODEL_o120, FALSE) - EVT_CALL(EnableModel, MODEL_o121, FALSE) - EVT_CALL(EnableModel, MODEL_o122, FALSE) - EVT_CALL(EnableModel, MODEL_o123, FALSE) - EVT_CALL(EnableModel, MODEL_o124, FALSE) - EVT_CALL(EnableModel, MODEL_o100, FALSE) - EVT_CALL(EnableModel, MODEL_o99, FALSE) - EVT_CALL(EnableModel, MODEL_o125, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o131, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END_IF - EVT_EXEC(N(EVS_AnimateMachineLightning)) - EVT_CALL(EnableModel, MODEL_o101, FALSE) - EVT_IF_GE(GB_FLO18_MachineDamage_Left, 1) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o130, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_o115, FALSE) - EVT_CALL(EnableModel, MODEL_o116, FALSE) - EVT_END_IF - EVT_IF_GE(GB_FLO18_MachineDamage_Right, 1) - EVT_CALL(EnableModel, MODEL_o117, FALSE) - EVT_CALL(EnableModel, MODEL_o118, FALSE) - EVT_END_IF - EVT_IF_GE(GB_FLO18_MachineDamage_Left, 2) - EVT_CALL(EnableModel, MODEL_o119, FALSE) - EVT_END_IF - EVT_IF_GE(GB_FLO18_MachineDamage_Right, 2) - EVT_CALL(EnableModel, MODEL_o120, FALSE) - EVT_CALL(EnableModel, MODEL_o121, FALSE) - EVT_CALL(EnableModel, MODEL_o122, FALSE) - EVT_CALL(EnableModel, MODEL_o123, FALSE) - EVT_CALL(EnableModel, MODEL_o124, FALSE) - EVT_END_IF - EVT_IF_GE(GB_FLO18_MachineDamage_Right, 3) - EVT_CALL(EnableModel, MODEL_o100, FALSE) - EVT_CALL(EnableModel, MODEL_o99, FALSE) - EVT_CALL(EnableModel, MODEL_o125, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o131, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar0, DAMAGE_PART_LEFT_SIDE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_DamageMachine)), TRIGGER_WALL_HAMMER, COLLIDER_o174, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_DamageMachine)), TRIGGER_POINT_BOMB, EVT_PTR(N(Machine_BombTrigger_01)), 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_DamageMachine)), TRIGGER_POINT_BOMB, EVT_PTR(N(Machine_BombTrigger_02)), 1, 0) - EVT_SET(LVar0, DAMAGE_PART_RIGHT_SIDE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_DamageMachine)), TRIGGER_WALL_HAMMER, COLLIDER_o127, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_DamageMachine)), TRIGGER_POINT_BOMB, EVT_PTR(N(Machine_BombTrigger_03)), 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_DamageMachine)), TRIGGER_POINT_BOMB, EVT_PTR(N(Machine_BombTrigger_04)), 1, 0) - EVT_SET(LVar0, DAMAGE_PART_LEVER) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_DamageMachine)), TRIGGER_WALL_HAMMER, COLLIDER_o130, 1, 0) - EVT_SET(LVar0, DAMAGE_PART_SMOKE_STACK) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_DamageMachine)), TRIGGER_WALL_HAMMER, COLLIDER_o131, 1, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_SET(LVar1, LVar0) - EVT_ADD(LVar1, CLONED_MODEL(0)) - EVT_ADD(LVar0, 1) - EVT_CALL(CloneModel, MODEL_o101, LVar1) - EVT_CALL(EnableModel, LVar1, FALSE) - EVT_END_LOOP - EVT_EXEC(N(EVS_ManageSmoke)) - EVT_CALL(EnableTexPanning, MODEL_o92, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o93, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o94, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o95, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o91, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o99, TRUE) - EVT_THREAD - EVT_SETF(LVarE, EVT_FLOAT(1.0)) - EVT_LABEL(0) - EVT_IF_GE(GB_FLO18_MachineDamage_Right, 3) - EVT_MULF(LVarE, EVT_FLOAT(0.953)) - EVT_END_IF - EVT_ADDF(LVarF, LVarE) - EVT_IF_EQ(LVarF, 1080) - EVT_SETF(LVarF, 0) - EVT_END_IF - EVT_SET(LVar0, LVarF) - EVT_DIV(LVar0, 9) - EVT_MOD(LVar0, 4) - EVT_MUL(LVar0, 0x4000) - EVT_SET(LVar1, LVarF) - EVT_DIV(LVar1, 4) - EVT_MOD(LVar1, 2) - EVT_MUL(LVar1, 0x4000) - EVT_SET(LVar2, LVarF) - EVT_DIV(LVar2, 5) - EVT_MOD(LVar2, 2) - EVT_MUL(LVar2, 0x4000) - EVT_SET(LVar3, LVarF) - EVT_DIV(LVar3, 6) - EVT_MOD(LVar3, 2) - EVT_MUL(LVar3, 0x4000) - EVT_SET(LVar4, LVarF) - EVT_DIV(LVar4, 2) - EVT_MOD(LVar4, 2) - EVT_MUL(LVar4, 0x8000) - EVT_SET(LVar5, LVarF) - EVT_DIV(LVar5, 8) - EVT_MOD(LVar5, 2) - EVT_MUL(LVar5, 0x4000) - EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, LVar1, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_E, TEX_PANNER_MAIN, LVar2, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_F, TEX_PANNER_MAIN, LVar3, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_B, TEX_PANNER_MAIN, LVar4, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_A, TEX_PANNER_MAIN, LVar5, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_9, TEX_PANNER_MAIN, LVar5, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_THREAD - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(EnableModel, MODEL_o101, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o130, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_o115, FALSE) + Call(EnableModel, MODEL_o116, FALSE) + Call(EnableModel, MODEL_o117, FALSE) + Call(EnableModel, MODEL_o118, FALSE) + Call(EnableModel, MODEL_o119, FALSE) + Call(EnableModel, MODEL_o120, FALSE) + Call(EnableModel, MODEL_o121, FALSE) + Call(EnableModel, MODEL_o122, FALSE) + Call(EnableModel, MODEL_o123, FALSE) + Call(EnableModel, MODEL_o124, FALSE) + Call(EnableModel, MODEL_o100, FALSE) + Call(EnableModel, MODEL_o99, FALSE) + Call(EnableModel, MODEL_o125, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o131, COLLIDER_FLAGS_UPPER_MASK) + Return + EndIf + Exec(N(EVS_AnimateMachineLightning)) + Call(EnableModel, MODEL_o101, FALSE) + IfGe(GB_FLO18_MachineDamage_Left, 1) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o130, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_o115, FALSE) + Call(EnableModel, MODEL_o116, FALSE) + EndIf + IfGe(GB_FLO18_MachineDamage_Right, 1) + Call(EnableModel, MODEL_o117, FALSE) + Call(EnableModel, MODEL_o118, FALSE) + EndIf + IfGe(GB_FLO18_MachineDamage_Left, 2) + Call(EnableModel, MODEL_o119, FALSE) + EndIf + IfGe(GB_FLO18_MachineDamage_Right, 2) + Call(EnableModel, MODEL_o120, FALSE) + Call(EnableModel, MODEL_o121, FALSE) + Call(EnableModel, MODEL_o122, FALSE) + Call(EnableModel, MODEL_o123, FALSE) + Call(EnableModel, MODEL_o124, FALSE) + EndIf + IfGe(GB_FLO18_MachineDamage_Right, 3) + Call(EnableModel, MODEL_o100, FALSE) + Call(EnableModel, MODEL_o99, FALSE) + Call(EnableModel, MODEL_o125, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o131, COLLIDER_FLAGS_UPPER_MASK) + Return + EndIf + Set(LVar0, DAMAGE_PART_LEFT_SIDE) + BindTrigger(Ref(N(EVS_DamageMachine)), TRIGGER_WALL_HAMMER, COLLIDER_o174, 1, 0) + BindTrigger(Ref(N(EVS_DamageMachine)), TRIGGER_POINT_BOMB, Ref(N(Machine_BombTrigger_01)), 1, 0) + BindTrigger(Ref(N(EVS_DamageMachine)), TRIGGER_POINT_BOMB, Ref(N(Machine_BombTrigger_02)), 1, 0) + Set(LVar0, DAMAGE_PART_RIGHT_SIDE) + BindTrigger(Ref(N(EVS_DamageMachine)), TRIGGER_WALL_HAMMER, COLLIDER_o127, 1, 0) + BindTrigger(Ref(N(EVS_DamageMachine)), TRIGGER_POINT_BOMB, Ref(N(Machine_BombTrigger_03)), 1, 0) + BindTrigger(Ref(N(EVS_DamageMachine)), TRIGGER_POINT_BOMB, Ref(N(Machine_BombTrigger_04)), 1, 0) + Set(LVar0, DAMAGE_PART_LEVER) + BindTrigger(Ref(N(EVS_DamageMachine)), TRIGGER_WALL_HAMMER, COLLIDER_o130, 1, 0) + Set(LVar0, DAMAGE_PART_SMOKE_STACK) + BindTrigger(Ref(N(EVS_DamageMachine)), TRIGGER_WALL_HAMMER, COLLIDER_o131, 1, 0) + Set(LVar0, 0) + Loop(16) + Set(LVar1, LVar0) + Add(LVar1, CLONED_MODEL(0)) + Add(LVar0, 1) + Call(CloneModel, MODEL_o101, LVar1) + Call(EnableModel, LVar1, FALSE) + EndLoop + Exec(N(EVS_ManageSmoke)) + Call(EnableTexPanning, MODEL_o92, TRUE) + Call(EnableTexPanning, MODEL_o93, TRUE) + Call(EnableTexPanning, MODEL_o94, TRUE) + Call(EnableTexPanning, MODEL_o95, TRUE) + Call(EnableTexPanning, MODEL_o91, TRUE) + Call(EnableTexPanning, MODEL_o99, TRUE) + Thread + SetF(LVarE, Float(1.0)) + Label(0) + IfGe(GB_FLO18_MachineDamage_Right, 3) + MulF(LVarE, Float(0.953)) + EndIf + AddF(LVarF, LVarE) + IfEq(LVarF, 1080) + SetF(LVarF, 0) + EndIf + Set(LVar0, LVarF) + Div(LVar0, 9) + Mod(LVar0, 4) + Mul(LVar0, 0x4000) + Set(LVar1, LVarF) + Div(LVar1, 4) + Mod(LVar1, 2) + Mul(LVar1, 0x4000) + Set(LVar2, LVarF) + Div(LVar2, 5) + Mod(LVar2, 2) + Mul(LVar2, 0x4000) + Set(LVar3, LVarF) + Div(LVar3, 6) + Mod(LVar3, 2) + Mul(LVar3, 0x4000) + Set(LVar4, LVarF) + Div(LVar4, 2) + Mod(LVar4, 2) + Mul(LVar4, 0x8000) + Set(LVar5, LVarF) + Div(LVar5, 8) + Mod(LVar5, 2) + Mul(LVar5, 0x4000) + Call(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, LVar0, 0) + Call(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, LVar1, 0) + Call(SetTexPanOffset, TEX_PANNER_E, TEX_PANNER_MAIN, LVar2, 0) + Call(SetTexPanOffset, TEX_PANNER_F, TEX_PANNER_MAIN, LVar3, 0) + Call(SetTexPanOffset, TEX_PANNER_B, TEX_PANNER_MAIN, LVar4, 0) + Call(SetTexPanOffset, TEX_PANNER_A, TEX_PANNER_MAIN, LVar5, 0) + Call(SetTexPanOffset, TEX_PANNER_9, TEX_PANNER_MAIN, LVar5, 0) + Wait(1) + Goto(0) + EndThread + Return + End }; diff --git a/src/world/area_flo/flo_18/flo_18_4_npc.c b/src/world/area_flo/flo_18/flo_18_4_npc.c index ac0f06f36b0..1195f9e5889 100644 --- a/src/world/area_flo/flo_18/flo_18_4_npc.c +++ b/src/world/area_flo/flo_18/flo_18_4_npc.c @@ -55,414 +55,414 @@ Vec3f N(RetreatPath_Lakitu_03)[] = { }; EvtScript N(EVS_Scene_LakilesterLikesBeingGood) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetPlayerPos, 30, 0, 50) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, 65, 0, 50) - EVT_WAIT(30 * DT) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(8.0 / DT), 0, 300, EVT_FLOAT(19.0), EVT_FLOAT(-8.5)) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_CALL(BringPartnerOut, PARTNER_LAKILESTER) - EVT_IF_NE(LVar0, PARTNER_LAKILESTER) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0)) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar2, 20) - EVT_ADD(LVar3, 20) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar1, LVar2, LVar3, 30 * DT) - EVT_END_IF - EVT_CALL(PlayerFaceNpc, NPC_PARTNER, FALSE) - EVT_CALL(NpcFacePlayer, NPC_PARTNER, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5, MSG_CH6_00C9) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Still) - EVT_WAIT(20 * DT) - EVT_CALL(EnablePartnerAI) - EVT_CALL(PutPartnerAway) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(SetPlayerPos, 30, 0, 50) + Call(InterpPlayerYaw, 90, 0) + Call(SetNpcPos, NPC_PARTNER, 65, 0, 50) + Wait(30 * DT) + Call(AdjustCam, CAM_DEFAULT, Float(8.0 / DT), 0, 300, Float(19.0), Float(-8.5)) + Call(GetCurrentPartnerID, LVar0) + Call(BringPartnerOut, PARTNER_LAKILESTER) + IfNe(LVar0, PARTNER_LAKILESTER) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.0)) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + Add(LVar1, 20) + Add(LVar2, 20) + Add(LVar3, 20) + Call(NpcJump0, NPC_PARTNER, LVar1, LVar2, LVar3, 30 * DT) + EndIf + Call(PlayerFaceNpc, NPC_PARTNER, FALSE) + Call(NpcFacePlayer, NPC_PARTNER, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5, MSG_CH6_00C9) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Still) + Wait(20 * DT) + Call(EnablePartnerAI) + Call(PutPartnerAway) + Call(ResetCam, CAM_DEFAULT, Float(4.0 / DT)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_GangRetreat) = { - EVT_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_FlyingMagikoopa, SOUND_FLO_MAGIKOOPA_FLY_AWAY, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcFlagBits, NPC_FlyingMagikoopa, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(InterpNpcYaw, NPC_FlyingMagikoopa, 270, 0) - EVT_CALL(LoadPath, 60 * DT, EVT_PTR(N(RetreatPath_Magikoopa)), ARRAY_COUNT(N(RetreatPath_Magikoopa)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_FlyingMagikoopa, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_NE(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(15 * DT) - EVT_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_Lakitu_01, SOUND_FLO_LAKITU_FLY_AWAY, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcFlagBits, NPC_Lakitu_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(InterpNpcYaw, NPC_Lakitu_01, 270, 0) - EVT_CALL(LoadPath, 60 * DT, EVT_PTR(N(RetreatPath_Lakitu_01)), ARRAY_COUNT(N(RetreatPath_Lakitu_01)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Lakitu_01, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_NE(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Lakitu_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(InterpNpcYaw, NPC_Lakitu_02, 270, 0) - EVT_CALL(LoadPath, 70 * DT, EVT_PTR(N(RetreatPath_Lakitu_02)), ARRAY_COUNT(N(RetreatPath_Lakitu_02)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Lakitu_02, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_NE(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_Lakitu_03, SOUND_FLO_LAKITU_FLY_AWAY, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcFlagBits, NPC_Lakitu_03, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(InterpNpcYaw, NPC_Lakitu_03, 270, 0) - EVT_CALL(LoadPath, 80 * DT, EVT_PTR(N(RetreatPath_Lakitu_03)), ARRAY_COUNT(N(RetreatPath_Lakitu_03)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Lakitu_03, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_NE(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Thread + Call(PlaySoundAtNpc, NPC_FlyingMagikoopa, SOUND_FLO_MAGIKOOPA_FLY_AWAY, SOUND_SPACE_DEFAULT) + Call(SetNpcFlagBits, NPC_FlyingMagikoopa, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(InterpNpcYaw, NPC_FlyingMagikoopa, 270, 0) + Call(LoadPath, 60 * DT, Ref(N(RetreatPath_Magikoopa)), ARRAY_COUNT(N(RetreatPath_Magikoopa)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_FlyingMagikoopa, LVar1, LVar2, LVar3) + Wait(1) + IfNe(LVar0, 1) + BreakLoop + EndIf + EndLoop + EndThread + Wait(15 * DT) + Thread + Call(PlaySoundAtNpc, NPC_Lakitu_01, SOUND_FLO_LAKITU_FLY_AWAY, SOUND_SPACE_DEFAULT) + Call(SetNpcFlagBits, NPC_Lakitu_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(InterpNpcYaw, NPC_Lakitu_01, 270, 0) + Call(LoadPath, 60 * DT, Ref(N(RetreatPath_Lakitu_01)), ARRAY_COUNT(N(RetreatPath_Lakitu_01)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Lakitu_01, LVar1, LVar2, LVar3) + Wait(1) + IfNe(LVar0, 1) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(SetNpcFlagBits, NPC_Lakitu_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(InterpNpcYaw, NPC_Lakitu_02, 270, 0) + Call(LoadPath, 70 * DT, Ref(N(RetreatPath_Lakitu_02)), ARRAY_COUNT(N(RetreatPath_Lakitu_02)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Lakitu_02, LVar1, LVar2, LVar3) + Wait(1) + IfNe(LVar0, 1) + BreakLoop + EndIf + EndLoop + EndThread + Call(PlaySoundAtNpc, NPC_Lakitu_03, SOUND_FLO_LAKITU_FLY_AWAY, SOUND_SPACE_DEFAULT) + Call(SetNpcFlagBits, NPC_Lakitu_03, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(InterpNpcYaw, NPC_Lakitu_03, 270, 0) + Call(LoadPath, 80 * DT, Ref(N(RetreatPath_Lakitu_03)), ARRAY_COUNT(N(RetreatPath_Lakitu_03)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Lakitu_03, LVar1, LVar2, LVar3) + Wait(1) + IfNe(LVar0, 1) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_ChargeAtPlayer) = { - EVT_WAIT(5) - EVT_CALL(IsPlayerWithin, 40, 0, 200, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LVar3, 45) - EVT_ELSE - EVT_SET(LVar3, 25) - EVT_END_IF - EVT_SET(LVar4, LVar3) - EVT_ADD(LVar4, -5) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar2, -61) - EVT_CHILD_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Lakitu_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(NpcMoveTo, NPC_Lakitu_01, LVar0, 55, LVar3) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Lakitu_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(NpcMoveTo, NPC_Lakitu_02, LVar0, 55, LVar3) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Lakitu_03, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(NpcMoveTo, NPC_Lakitu_03, LVar0, 55, LVar3) - EVT_END_CHILD_THREAD - EVT_WAIT(LVar4) - EVT_END_IF - EVT_RETURN - EVT_END + Wait(5) + Call(IsPlayerWithin, 40, 0, 200, LVar0) + IfEq(LVar0, 0) + Set(LVar3, 45) + Else + Set(LVar3, 25) + EndIf + Set(LVar4, LVar3) + Add(LVar4, -5) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar2, -61) + ChildThread + Call(SetNpcFlagBits, NPC_Lakitu_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(NpcMoveTo, NPC_Lakitu_01, LVar0, 55, LVar3) + EndChildThread + ChildThread + Call(SetNpcFlagBits, NPC_Lakitu_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(NpcMoveTo, NPC_Lakitu_02, LVar0, 55, LVar3) + EndChildThread + ChildThread + Call(SetNpcFlagBits, NPC_Lakitu_03, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(NpcMoveTo, NPC_Lakitu_03, LVar0, 55, LVar3) + EndChildThread + Wait(LVar4) + EndIf + Return + End }; EvtScript N(EVS_Scene_GangDefeated) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_PARTNER, 65, LVar1, 80) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 270) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(8.0 / DT), 0, 450, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_CALL(SpeakToPlayer, NPC_FlyingMagikoopa, ANIM_FlyingMagikoopa_Yellow_Anim09, ANIM_FlyingMagikoopa_Yellow_Anim01, 0, MSG_CH6_00BB) - EVT_WAIT(20 * DT) - EVT_EXEC(N(EVS_GangRetreat)) - EVT_WAIT(80 * DT) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(8.0 / DT), 0, 300, EVT_FLOAT(19.0), EVT_FLOAT(-8.5)) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_CALL(BringPartnerOut, PARTNER_LAKILESTER) - EVT_IF_NE(LVar0, PARTNER_LAKILESTER) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0)) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar2, 20) - EVT_ADD(LVar3, 20) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar1, LVar2, LVar3, 30 * DT) - EVT_END_IF - EVT_CALL(NpcFacePlayer, NPC_PARTNER, 0) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5, MSG_CH6_00C1) - EVT_CALL(EnablePartnerAI) - EVT_WAIT(20 * DT) - EVT_CALL(PutPartnerAway) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_SET(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(AwaitPlayerApproach, -250, 0, 50) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_CALL(BringPartnerOut, PARTNER_LAKILESTER) - EVT_IF_NE(LVar0, PARTNER_LAKILESTER) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0)) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar2, 20) - EVT_ADD(LVar3, 20) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar1, LVar2, LVar3, 30 * DT) - EVT_END_IF - EVT_CALL(PlayerFaceNpc, NPC_PARTNER, FALSE) - EVT_CALL(NpcFacePlayer, NPC_PARTNER, 0) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5, MSG_CH6_00C2) - EVT_CALL(EnablePartnerAI) - EVT_CALL(PutPartnerAway) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_PARTNER, 65, LVar1, 80) + Call(SetNpcYaw, NPC_PARTNER, 270) + Call(AdjustCam, CAM_DEFAULT, Float(8.0 / DT), 0, 450, Float(17.0), Float(-6.0)) + Call(SpeakToPlayer, NPC_FlyingMagikoopa, ANIM_FlyingMagikoopa_Yellow_Anim09, ANIM_FlyingMagikoopa_Yellow_Anim01, 0, MSG_CH6_00BB) + Wait(20 * DT) + Exec(N(EVS_GangRetreat)) + Wait(80 * DT) + Call(AdjustCam, CAM_DEFAULT, Float(8.0 / DT), 0, 300, Float(19.0), Float(-8.5)) + Call(GetCurrentPartnerID, LVar0) + Call(BringPartnerOut, PARTNER_LAKILESTER) + IfNe(LVar0, PARTNER_LAKILESTER) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.0)) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + Add(LVar1, 20) + Add(LVar2, 20) + Add(LVar3, 20) + Call(NpcJump0, NPC_PARTNER, LVar1, LVar2, LVar3, 30 * DT) + EndIf + Call(NpcFacePlayer, NPC_PARTNER, 0) + Call(DisablePartnerAI, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5, MSG_CH6_00C1) + Call(EnablePartnerAI) + Wait(20 * DT) + Call(PutPartnerAway) + Call(ResetCam, CAM_DEFAULT, Float(4.0 / DT)) + Set(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) + Call(DisablePlayerInput, FALSE) + Call(AwaitPlayerApproach, -250, 0, 50) + Call(DisablePlayerInput, TRUE) + Call(GetCurrentPartnerID, LVar0) + Call(BringPartnerOut, PARTNER_LAKILESTER) + IfNe(LVar0, PARTNER_LAKILESTER) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.0)) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + Add(LVar1, 20) + Add(LVar2, 20) + Add(LVar3, 20) + Call(NpcJump0, NPC_PARTNER, LVar1, LVar2, LVar3, 30 * DT) + EndIf + Call(PlayerFaceNpc, NPC_PARTNER, FALSE) + Call(NpcFacePlayer, NPC_PARTNER, 0) + Call(DisablePartnerAI, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5, MSG_CH6_00C2) + Call(EnablePartnerAI) + Call(PutPartnerAway) + Call(ResetCam, CAM_DEFAULT, Float(4.0 / DT)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcIdle_Magikoopa) = { - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(10) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 1000) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_RETURN - EVT_END + Loop(0) + Call(GetSelfVar, 0, LVar0) + IfNe(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(DisablePlayerInput, TRUE) + Wait(10) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 1000) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-6.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(DisablePlayerInput, FALSE) + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Return + End }; EvtScript N(EVS_NpcDefeat_Lakitu) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_IF_EQ(LVar0, 3) - EVT_CALL(SetNpcPos, NPC_Magikoopa, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_FlyingMagikoopa, -55, 15, 35) - EVT_CALL(GetNpcYaw, NPC_Magikoopa, LVar0) - EVT_CALL(SetNpcYaw, NPC_FlyingMagikoopa, 90) - EVT_CALL(InterpPlayerYaw, 180, 0) - EVT_CALL(SetPlayerPos, 30, 0, 80) - EVT_CALL(SetNpcYaw, NPC_Lakitu_01, 90) - EVT_CALL(SetNpcPos, NPC_Lakitu_01, -20, 15, 30) - EVT_CALL(SetNpcYaw, NPC_Lakitu_02, 270) - EVT_CALL(SetNpcPos, NPC_Lakitu_02, 65, 15, 30) - EVT_CALL(SetNpcYaw, NPC_Lakitu_03, 270) - EVT_CALL(SetNpcPos, NPC_Lakitu_03, 120, 15, 30) - EVT_EXEC(N(EVS_Scene_GangDefeated)) - EVT_END_IF - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(GetSelfNpcID, LVar0) + IfEq(LVar0, 3) + Call(SetNpcPos, NPC_Magikoopa, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_FlyingMagikoopa, -55, 15, 35) + Call(GetNpcYaw, NPC_Magikoopa, LVar0) + Call(SetNpcYaw, NPC_FlyingMagikoopa, 90) + Call(InterpPlayerYaw, 180, 0) + Call(SetPlayerPos, 30, 0, 80) + Call(SetNpcYaw, NPC_Lakitu_01, 90) + Call(SetNpcPos, NPC_Lakitu_01, -20, 15, 30) + Call(SetNpcYaw, NPC_Lakitu_02, 270) + Call(SetNpcPos, NPC_Lakitu_02, 65, 15, 30) + Call(SetNpcYaw, NPC_Lakitu_03, 270) + Call(SetNpcPos, NPC_Lakitu_03, 120, 15, 30) + Exec(N(EVS_Scene_GangDefeated)) + EndIf + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_ReactionFacePlayer) = { - EVT_SWITCH(MV_ReactingNpc) - EVT_CASE_EQ(0) - EVT_CALL(NpcFacePlayer, NPC_Magikoopa, 1) - EVT_CASE_EQ(1) - EVT_CALL(NpcFacePlayer, NPC_Lakitu_01, 1) - EVT_CASE_EQ(2) - EVT_CALL(NpcFacePlayer, NPC_Lakitu_02, 1) - EVT_CASE_EQ(3) - EVT_CALL(NpcFacePlayer, NPC_Lakitu_03, 1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(MV_ReactingNpc) + CaseEq(0) + Call(NpcFacePlayer, NPC_Magikoopa, 1) + CaseEq(1) + Call(NpcFacePlayer, NPC_Lakitu_01, 1) + CaseEq(2) + Call(NpcFacePlayer, NPC_Lakitu_02, 1) + CaseEq(3) + Call(NpcFacePlayer, NPC_Lakitu_03, 1) + EndSwitch + Return + End }; EvtScript N(EVS_FirstReactionDialogue) = { - EVT_SWITCH(MV_ReactingNpc) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_Magikoopa, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 16, MSG_CH6_00B9) - EVT_CALL(InterpNpcYaw, NPC_Magikoopa, 90, 0) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_Lakitu_01, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00BF) - EVT_CALL(InterpNpcYaw, NPC_Lakitu_01, 90, 0) - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, NPC_Lakitu_02, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00BF) - EVT_CALL(InterpNpcYaw, NPC_Lakitu_02, 270, 0) - EVT_CASE_EQ(3) - EVT_CALL(SpeakToPlayer, NPC_Lakitu_03, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00BF) - EVT_CALL(InterpNpcYaw, NPC_Lakitu_03, 270, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(MV_ReactingNpc) + CaseEq(0) + Call(SpeakToPlayer, NPC_Magikoopa, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 16, MSG_CH6_00B9) + Call(InterpNpcYaw, NPC_Magikoopa, 90, 0) + CaseEq(1) + Call(SpeakToPlayer, NPC_Lakitu_01, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00BF) + Call(InterpNpcYaw, NPC_Lakitu_01, 90, 0) + CaseEq(2) + Call(SpeakToPlayer, NPC_Lakitu_02, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00BF) + Call(InterpNpcYaw, NPC_Lakitu_02, 270, 0) + CaseEq(3) + Call(SpeakToPlayer, NPC_Lakitu_03, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00BF) + Call(InterpNpcYaw, NPC_Lakitu_03, 270, 0) + EndSwitch + Return + End }; EvtScript N(EVS_SecondReactionDialogue) = { - EVT_SWITCH(MV_ReactingNpc) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_Magikoopa, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 16, MSG_CH6_00BA) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_Lakitu_01, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00C0) - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, NPC_Lakitu_02, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00C0) - EVT_CASE_EQ(3) - EVT_CALL(SpeakToPlayer, NPC_Lakitu_03, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00C0) - EVT_END_SWITCH - EVT_CALL(SetNpcVar, NPC_Magikoopa, 0, 1) - EVT_WAIT(5) - EVT_EXEC(N(EVS_ChargeAtPlayer)) - EVT_RETURN - EVT_END + Switch(MV_ReactingNpc) + CaseEq(0) + Call(SpeakToPlayer, NPC_Magikoopa, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 16, MSG_CH6_00BA) + CaseEq(1) + Call(SpeakToPlayer, NPC_Lakitu_01, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00C0) + CaseEq(2) + Call(SpeakToPlayer, NPC_Lakitu_02, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00C0) + CaseEq(3) + Call(SpeakToPlayer, NPC_Lakitu_03, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00C0) + EndSwitch + Call(SetNpcVar, NPC_Magikoopa, 0, 1) + Wait(5) + Exec(N(EVS_ChargeAtPlayer)) + Return + End }; EvtScript N(EVS_GenericHitReaction) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(func_802D2C14, 1) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(8.0 / DT), 0, 300, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_EXEC_WAIT(N(EVS_ReactionFacePlayer)) - EVT_SWITCH(AB_FLO_GuardedMachineHitCount) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_FirstReactionDialogue)) - EVT_ADD(AB_FLO_GuardedMachineHitCount, 1) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_SecondReactionDialogue)) - EVT_END_SWITCH - EVT_CALL(func_802D2C14, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(func_802D2C14, 1) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(AdjustCam, CAM_DEFAULT, Float(8.0 / DT), 0, 300, Float(17.0), Float(-6.0)) + ExecWait(N(EVS_ReactionFacePlayer)) + Switch(AB_FLO_GuardedMachineHitCount) + CaseEq(0) + ExecWait(N(EVS_FirstReactionDialogue)) + Add(AB_FLO_GuardedMachineHitCount, 1) + Call(ResetCam, CAM_DEFAULT, Float(4.0 / DT)) + CaseEq(1) + ExecWait(N(EVS_SecondReactionDialogue)) + EndSwitch + Call(func_802D2C14, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_HitReaction_Magikoopa) = { - EVT_IF_EQ(MV_ReactingNpc, -1) - EVT_SET(MV_ReactingNpc, 0) - EVT_EXEC_WAIT(N(EVS_GenericHitReaction)) - EVT_SET(MV_ReactingNpc, -1) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MV_ReactingNpc, -1) + Set(MV_ReactingNpc, 0) + ExecWait(N(EVS_GenericHitReaction)) + Set(MV_ReactingNpc, -1) + EndIf + Return + End }; EvtScript N(EVS_HitReaction_Lakitu_01) = { - EVT_IF_EQ(MV_ReactingNpc, -1) - EVT_SET(MV_ReactingNpc, 1) - EVT_EXEC_WAIT(N(EVS_GenericHitReaction)) - EVT_SET(MV_ReactingNpc, -1) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MV_ReactingNpc, -1) + Set(MV_ReactingNpc, 1) + ExecWait(N(EVS_GenericHitReaction)) + Set(MV_ReactingNpc, -1) + EndIf + Return + End }; EvtScript N(EVS_HitReaction_Lakitu_02) = { - EVT_IF_EQ(MV_ReactingNpc, -1) - EVT_SET(MV_ReactingNpc, 2) - EVT_EXEC_WAIT(N(EVS_GenericHitReaction)) - EVT_SET(MV_ReactingNpc, -1) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MV_ReactingNpc, -1) + Set(MV_ReactingNpc, 2) + ExecWait(N(EVS_GenericHitReaction)) + Set(MV_ReactingNpc, -1) + EndIf + Return + End }; EvtScript N(EVS_HitReaction_Lakitu_03) = { - EVT_IF_EQ(MV_ReactingNpc, -1) - EVT_SET(MV_ReactingNpc, 3) - EVT_EXEC_WAIT(N(EVS_GenericHitReaction)) - EVT_SET(MV_ReactingNpc, -1) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MV_ReactingNpc, -1) + Set(MV_ReactingNpc, 3) + ExecWait(N(EVS_GenericHitReaction)) + Set(MV_ReactingNpc, -1) + EndIf + Return + End }; EvtScript N(EVS_GenericBombReaction) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(8.0 / DT)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC_WAIT(N(EVS_ReactionFacePlayer)) - EVT_IF_EQ(AB_FLO_GuardedMachineHitCount, 0) - EVT_EXEC_WAIT(N(EVS_FirstReactionDialogue)) - EVT_ADD(AB_FLO_GuardedMachineHitCount, 1) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_SecondReactionDialogue)) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(8.0 / DT)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-6.0)) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + ExecWait(N(EVS_ReactionFacePlayer)) + IfEq(AB_FLO_GuardedMachineHitCount, 0) + ExecWait(N(EVS_FirstReactionDialogue)) + Add(AB_FLO_GuardedMachineHitCount, 1) + Call(ResetCam, CAM_DEFAULT, Float(4.0 / DT)) + Else + ExecWait(N(EVS_SecondReactionDialogue)) + EndIf + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_BombReaction_Magikoopa) = { - EVT_IF_EQ(MV_ReactingNpc, -1) - EVT_SET(MV_ReactingNpc, 0) - EVT_CALL(GetNpcPos, NPC_Magikoopa, LVar0, LVar1, LVar2) - EVT_EXEC_WAIT(N(EVS_GenericBombReaction)) - EVT_SET(MV_ReactingNpc, -1) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MV_ReactingNpc, -1) + Set(MV_ReactingNpc, 0) + Call(GetNpcPos, NPC_Magikoopa, LVar0, LVar1, LVar2) + ExecWait(N(EVS_GenericBombReaction)) + Set(MV_ReactingNpc, -1) + EndIf + Return + End }; EvtScript N(EVS_BombReaction_Lakitu_01) = { - EVT_IF_EQ(MV_ReactingNpc, -1) - EVT_SET(MV_ReactingNpc, 1) - EVT_CALL(GetNpcPos, NPC_Lakitu_01, LVar0, LVar1, LVar2) - EVT_EXEC_WAIT(N(EVS_GenericBombReaction)) - EVT_SET(MV_ReactingNpc, -1) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MV_ReactingNpc, -1) + Set(MV_ReactingNpc, 1) + Call(GetNpcPos, NPC_Lakitu_01, LVar0, LVar1, LVar2) + ExecWait(N(EVS_GenericBombReaction)) + Set(MV_ReactingNpc, -1) + EndIf + Return + End }; EvtScript N(EVS_BombReaction_Lakitu_02) = { - EVT_IF_EQ(MV_ReactingNpc, -1) - EVT_SET(MV_ReactingNpc, 2) - EVT_CALL(GetNpcPos, NPC_Lakitu_02, LVar0, LVar1, LVar2) - EVT_EXEC_WAIT(N(EVS_GenericBombReaction)) - EVT_SET(MV_ReactingNpc, -1) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MV_ReactingNpc, -1) + Set(MV_ReactingNpc, 2) + Call(GetNpcPos, NPC_Lakitu_02, LVar0, LVar1, LVar2) + ExecWait(N(EVS_GenericBombReaction)) + Set(MV_ReactingNpc, -1) + EndIf + Return + End }; EvtScript N(EVS_BombReaction_Lakitu_03) = { - EVT_IF_EQ(MV_ReactingNpc, -1) - EVT_SET(MV_ReactingNpc, 3) - EVT_CALL(GetNpcPos, NPC_Lakitu_03, LVar0, LVar1, LVar2) - EVT_EXEC_WAIT(N(EVS_GenericBombReaction)) - EVT_SET(MV_ReactingNpc, -1) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MV_ReactingNpc, -1) + Set(MV_ReactingNpc, 3) + Call(GetNpcPos, NPC_Lakitu_03, LVar0, LVar1, LVar2) + ExecWait(N(EVS_GenericBombReaction)) + Set(MV_ReactingNpc, -1) + EndIf + Return + End }; BombTrigger N(Npc_BombTrigger_01) = { @@ -486,116 +486,116 @@ BombTrigger N(Npc_BombTrigger_04) = { }; EvtScript N(EVS_SetupMachineDamageReactions) = { - EVT_SET(MV_ReactingNpc, -1) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_HitReaction_Magikoopa)), TRIGGER_WALL_HAMMER, COLLIDER_o174, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_HitReaction_Magikoopa)), TRIGGER_WALL_HAMMER, COLLIDER_o130, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BombReaction_Magikoopa)), TRIGGER_POINT_BOMB, EVT_PTR(N(Npc_BombTrigger_02)), 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BombReaction_Lakitu_01)), TRIGGER_POINT_BOMB, EVT_PTR(N(Npc_BombTrigger_01)), 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_HitReaction_Lakitu_02)), TRIGGER_WALL_HAMMER, COLLIDER_o127, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BombReaction_Lakitu_02)), TRIGGER_POINT_BOMB, EVT_PTR(N(Npc_BombTrigger_03)), 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_HitReaction_Lakitu_03)), TRIGGER_WALL_HAMMER, COLLIDER_o131, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BombReaction_Lakitu_03)), TRIGGER_POINT_BOMB, EVT_PTR(N(Npc_BombTrigger_04)), 1, 0) - EVT_RETURN - EVT_END + Set(MV_ReactingNpc, -1) + BindTrigger(Ref(N(EVS_HitReaction_Magikoopa)), TRIGGER_WALL_HAMMER, COLLIDER_o174, 1, 0) + BindTrigger(Ref(N(EVS_HitReaction_Magikoopa)), TRIGGER_WALL_HAMMER, COLLIDER_o130, 1, 0) + BindTrigger(Ref(N(EVS_BombReaction_Magikoopa)), TRIGGER_POINT_BOMB, Ref(N(Npc_BombTrigger_02)), 1, 0) + BindTrigger(Ref(N(EVS_BombReaction_Lakitu_01)), TRIGGER_POINT_BOMB, Ref(N(Npc_BombTrigger_01)), 1, 0) + BindTrigger(Ref(N(EVS_HitReaction_Lakitu_02)), TRIGGER_WALL_HAMMER, COLLIDER_o127, 1, 0) + BindTrigger(Ref(N(EVS_BombReaction_Lakitu_02)), TRIGGER_POINT_BOMB, Ref(N(Npc_BombTrigger_03)), 1, 0) + BindTrigger(Ref(N(EVS_HitReaction_Lakitu_03)), TRIGGER_WALL_HAMMER, COLLIDER_o131, 1, 0) + BindTrigger(Ref(N(EVS_BombReaction_Lakitu_03)), TRIGGER_POINT_BOMB, Ref(N(Npc_BombTrigger_04)), 1, 0) + Return + End }; EvtScript N(EVS_NpcInteract_Lakitu) = { - EVT_SWITCH(AB_FLO_GuardLakituTalkCount) - EVT_CASE_EQ(0) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_IF_EQ(LVar0, 3) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 5, MSG_CH6_00B6) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 5, MSG_CH6_00BC) - EVT_END_IF - EVT_ADD(AB_FLO_GuardLakituTalkCount, 1) - EVT_CASE_EQ(1) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_IF_EQ(LVar0, 3) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 5, MSG_CH6_00B7) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 5, MSG_CH6_00BD) - EVT_END_IF - EVT_ADD(AB_FLO_GuardLakituTalkCount, 1) - EVT_CASE_EQ(2) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(8.0 / DT), 0, 300, EVT_FLOAT(19.0), EVT_FLOAT(-9.0)) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_IF_EQ(LVar0, 3) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 5, MSG_CH6_00B8) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_WAIT(15) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 0) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 5, MSG_CH6_00BE) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_WAIT(15) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0) - EVT_END_IF - EVT_CALL(SetNpcVar, NPC_Magikoopa, 0, 1) - EVT_WAIT(5) - EVT_EXEC(N(EVS_ChargeAtPlayer)) - EVT_CALL(BindNpcInteract, NPC_Lakitu_01, 0) - EVT_CALL(BindNpcInteract, NPC_Lakitu_02, 0) - EVT_CALL(BindNpcInteract, NPC_Lakitu_03, 0) - EVT_CALL(BindNpcInteract, NPC_Magikoopa, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(AB_FLO_GuardLakituTalkCount) + CaseEq(0) + Call(GetSelfNpcID, LVar0) + IfEq(LVar0, 3) + Call(SpeakToPlayer, NPC_SELF, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 5, MSG_CH6_00B6) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 5, MSG_CH6_00BC) + EndIf + Add(AB_FLO_GuardLakituTalkCount, 1) + CaseEq(1) + Call(GetSelfNpcID, LVar0) + IfEq(LVar0, 3) + Call(SpeakToPlayer, NPC_SELF, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 5, MSG_CH6_00B7) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 5, MSG_CH6_00BD) + EndIf + Add(AB_FLO_GuardLakituTalkCount, 1) + CaseEq(2) + Call(AdjustCam, CAM_DEFAULT, Float(8.0 / DT), 0, 300, Float(19.0), Float(-9.0)) + Call(GetSelfNpcID, LVar0) + IfEq(LVar0, 3) + Call(SpeakToPlayer, NPC_SELF, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 5, MSG_CH6_00B8) + Call(NpcFacePlayer, NPC_SELF, 0) + Wait(15) + Call(EndSpeech, NPC_SELF, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 0) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 5, MSG_CH6_00BE) + Call(NpcFacePlayer, NPC_SELF, 0) + Wait(15) + Call(EndSpeech, NPC_SELF, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0) + EndIf + Call(SetNpcVar, NPC_Magikoopa, 0, 1) + Wait(5) + Exec(N(EVS_ChargeAtPlayer)) + Call(BindNpcInteract, NPC_Lakitu_01, 0) + Call(BindNpcInteract, NPC_Lakitu_02, 0) + Call(BindNpcInteract, NPC_Lakitu_03, 0) + Call(BindNpcInteract, NPC_Magikoopa, 0) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Magikoopa) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Magikoopa))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lakitu))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Lakitu))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Magikoopa))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Lakitu))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Lakitu))) + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_FlyingMagikoopa) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Lakitu))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Lakitu))) + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Lakitu_01) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lakitu))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Lakitu))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Lakitu))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Lakitu))) + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Lakitu_02) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lakitu))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Lakitu))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Lakitu))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Lakitu))) + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Lakitu_03) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lakitu))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Lakitu))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Lakitu))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Lakitu))) + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; NpcData N(NpcData_MachineGang)[] = { diff --git a/src/world/area_flo/flo_18/flo_18_5_foliage.c b/src/world/area_flo/flo_18/flo_18_5_foliage.c index 611317396b5..74ddcc7eb85 100644 --- a/src/world/area_flo/flo_18/flo_18_5_foliage.c +++ b/src/world/area_flo/flo_18/flo_18_5_foliage.c @@ -3,6 +3,6 @@ #include "common/foliage.inc.c" EvtScript N(EVS_SetupFoliage) = { - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/area_flo/flo_19/flo_19_1_music.c b/src/world/area_flo/flo_19/flo_19_1_music.c index 07cbb890ac3..4b39d4f5a0b 100644 --- a/src/world/area_flo/flo_19/flo_19_1_music.c +++ b/src/world/area_flo/flo_19/flo_19_1_music.c @@ -1,23 +1,23 @@ #include "flo_19.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(flo_19_ENTRY_0) - EVT_CASE_OR_EQ(flo_19_ENTRY_1) - EVT_CALL(SetMusicTrack, 0, SONG_CLOUDY_CLIMB, 0, 8) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(flo_19_ENTRY_2) - EVT_CASE_OR_EQ(7) - EVT_END_CASE_GROUP - EVT_CASE_EQ(flo_19_ENTRY_3) - EVT_IF_NE(AF_FLO_RidingBeanstalk, FALSE) - EVT_ELSE - EVT_CALL(FadeOutMusic, 1, 3000) - EVT_CALL(FadeInMusic, 0, SONG_CLOUDY_CLIMB, 0, 3000, 0, 127) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseOrEq(flo_19_ENTRY_0) + CaseOrEq(flo_19_ENTRY_1) + Call(SetMusicTrack, 0, SONG_CLOUDY_CLIMB, 0, 8) + EndCaseGroup + CaseOrEq(flo_19_ENTRY_2) + CaseOrEq(7) + EndCaseGroup + CaseEq(flo_19_ENTRY_3) + IfNe(AF_FLO_RidingBeanstalk, FALSE) + Else + Call(FadeOutMusic, 1, 3000) + Call(FadeInMusic, 0, SONG_CLOUDY_CLIMB, 0, 3000, 0, 127) + EndIf + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/world/area_flo/flo_19/flo_19_2_entity.c b/src/world/area_flo/flo_19/flo_19_2_entity.c index 2747d4affc2..ecf3e5e6502 100644 --- a/src/world/area_flo/flo_19/flo_19_2_entity.c +++ b/src/world/area_flo/flo_19/flo_19_2_entity.c @@ -1,7 +1,7 @@ #include "flo_19.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_S_JUMP_CHG, -200, 160, -213, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO19_Item_SJumpChg) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_S_JUMP_CHG, -200, 160, -213, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO19_Item_SJumpChg) + Return + End }; diff --git a/src/world/area_flo/flo_19/flo_19_3_main.c b/src/world/area_flo/flo_19/flo_19_3_main.c index b308a4d2630..6a24ff5fcf4 100644 --- a/src/world/area_flo/flo_19/flo_19_3_main.c +++ b/src/world/area_flo/flo_19/flo_19_3_main.c @@ -11,61 +11,61 @@ API_CALLABLE(N(SpawnSunEffect)) { EvtScript N(EVS_ExitWalk_flo_21_0) = EVT_EXIT_WALK(60, flo_19_ENTRY_1, "flo_21", flo_21_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_21_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_21_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CLOUDY_CLIMB) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_SET(GF_MAP_CloudyClimb, TRUE) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(ParentColliderToModel, COLLIDER_o117, MODEL_o142) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_EXEC(N(EVS_SetupBeanstalk)) - EVT_EXEC(N(EVS_SetupClouds)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o122, SURFACE_TYPE_CLOUD) - EVT_CALL(EnableTexPanning, MODEL_o59, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o60, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_CLOUDY_CLIMB) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + Set(GF_MAP_CloudyClimb, TRUE) + ExecWait(N(EVS_MakeEntities)) + Call(ParentColliderToModel, COLLIDER_o117, MODEL_o142) + Call(HidePlayerShadow, TRUE) + Exec(N(EVS_SetupBeanstalk)) + Exec(N(EVS_SetupClouds)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o122, SURFACE_TYPE_CLOUD) + Call(EnableTexPanning, MODEL_o59, TRUE) + Call(EnableTexPanning, MODEL_o60, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( -120, 0, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( -90, 0, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, flo_19_ENTRY_3) - EVT_SET(AF_FLO_RidingBeanstalk, FALSE) - EVT_END_IF - EVT_SWITCH(LVar0) - EVT_CASE_EQ(flo_19_ENTRY_0) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(flo_19_ENTRY_1) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(flo_19_ENTRY_2) - EVT_EXEC(N(EVS_Scene_BeanstalkGrowing)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(flo_19_ENTRY_3) - EVT_EXEC(N(EVS_Enter_Beanstalk)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(GetEntryID, LVar0) + IfNe(LVar0, flo_19_ENTRY_3) + Set(AF_FLO_RidingBeanstalk, FALSE) + EndIf + Switch(LVar0) + CaseEq(flo_19_ENTRY_0) + Exec(N(EVS_BindExitTriggers)) + CaseEq(flo_19_ENTRY_1) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseEq(flo_19_ENTRY_2) + Exec(N(EVS_Scene_BeanstalkGrowing)) + Exec(N(EVS_BindExitTriggers)) + CaseEq(flo_19_ENTRY_3) + Exec(N(EVS_Enter_Beanstalk)) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Return + End }; diff --git a/src/world/area_flo/flo_19/flo_19_4_clouds.c b/src/world/area_flo/flo_19/flo_19_4_clouds.c index e11a9ce67ba..805d15db2bf 100644 --- a/src/world/area_flo/flo_19/flo_19_4_clouds.c +++ b/src/world/area_flo/flo_19/flo_19_4_clouds.c @@ -25,167 +25,167 @@ API_CALLABLE(N(CosInterpAbsMinMax)) { } EvtScript N(EVS_AnimatePlatforms) = { - EVT_SET_GROUP(EVT_GROUP_EF) - EVT_SET(LVarF, 0) - EVT_LABEL(0) - EVT_SETF(LVar0, EVT_FLOAT(-215.4375)) - EVT_SETF(LVar1, EVT_FLOAT(128.593)) - EVT_SETF(LVar2, EVT_FLOAT(-200.0)) - EVT_ADDF(LVar1, MV_Distortion_Platform_01) - EVT_CALL(TranslateGroup, MODEL_g17, LVar0, LVar1, LVar2) - EVT_SETF(LVar0, EVT_FLOAT(-79.86)) - EVT_CALL(N(CosInterpAbsMinMax), LVarF, LVar1, EVT_FLOAT(5.0), EVT_FLOAT(136.765), 300, 0, 0) - EVT_SETF(LVar2, EVT_FLOAT(-200.0)) - EVT_ADDF(LVar1, MV_Distortion_Platform_02) - EVT_CALL(TranslateGroup, MODEL_g21, LVar0, LVar1, LVar2) - EVT_SETF(LVar0, EVT_FLOAT(-364.265625)) - EVT_CALL(N(CosInterpAbsMinMax), LVarF, LVar1, EVT_FLOAT(5.0), EVT_FLOAT(106.765), 300, 0, 0) - EVT_SETF(LVar2, EVT_FLOAT(10.0)) - EVT_ADDF(LVar1, MV_Distortion_Platform_03) - EVT_CALL(TranslateGroup, MODEL_g22, LVar0, LVar1, LVar2) - EVT_SETF(LVar0, EVT_FLOAT(295.734)) - EVT_CALL(N(CosInterpAbsMinMax), LVarF, LVar1, EVT_FLOAT(65.0), EVT_FLOAT(86.984), 200, 0, 0) - EVT_SETF(LVar2, EVT_FLOAT(-80.0)) - EVT_ADDF(LVar1, MV_Distortion_Platform_04) - EVT_CALL(TranslateGroup, MODEL_g23, LVar0, LVar1, LVar2) - EVT_CALL(N(CosInterpAbsMinMax), LVarF, LVar2, EVT_FLOAT(0.968), EVT_FLOAT(1.031), 15, 0, 0) - EVT_CALL(N(CosInterpAbsMinMax), LVarF, LVar3, EVT_FLOAT(1.031), EVT_FLOAT(0.968), 15, 0, 0) - EVT_SETF(LVar0, MV_Distortion_Platform_01) - EVT_SETF(LVar1, MV_Distortion_Platform_01) - EVT_MULF(LVar0, EVT_FLOAT(-0.02)) - EVT_MULF(LVar1, EVT_FLOAT(0.04)) - EVT_ADDF(LVar0, LVar2) - EVT_ADDF(LVar1, LVar3) - EVT_CALL(ScaleGroup, MODEL_g17, LVar0, LVar1, 1) - EVT_SETF(LVar0, MV_Distortion_Platform_02) - EVT_SETF(LVar1, MV_Distortion_Platform_02) - EVT_MULF(LVar0, EVT_FLOAT(-0.02)) - EVT_MULF(LVar1, EVT_FLOAT(0.04)) - EVT_ADDF(LVar0, LVar2) - EVT_ADDF(LVar1, LVar3) - EVT_CALL(ScaleGroup, MODEL_g21, LVar0, LVar1, 1) - EVT_SETF(LVar0, MV_Distortion_Platform_03) - EVT_SETF(LVar1, MV_Distortion_Platform_03) - EVT_MULF(LVar0, EVT_FLOAT(-0.02)) - EVT_MULF(LVar1, EVT_FLOAT(0.04)) - EVT_ADDF(LVar0, LVar2) - EVT_ADDF(LVar1, LVar3) - EVT_CALL(ScaleGroup, MODEL_g22, LVar0, LVar1, 1) - EVT_SETF(LVar0, MV_Distortion_Platform_04) - EVT_SETF(LVar1, MV_Distortion_Platform_04) - EVT_MULF(LVar0, EVT_FLOAT(-0.02)) - EVT_MULF(LVar1, EVT_FLOAT(0.04)) - EVT_ADDF(LVar0, LVar2) - EVT_ADDF(LVar1, LVar3) - EVT_CALL(ScaleGroup, MODEL_g23, LVar0, LVar1, 1) - EVT_CALL(UpdateColliderTransform, COLLIDER_o77) - EVT_CALL(UpdateColliderTransform, COLLIDER_o78) - EVT_CALL(UpdateColliderTransform, COLLIDER_o76) - EVT_CALL(UpdateColliderTransform, COLLIDER_o79) - EVT_ADD(LVarF, 1) - EVT_IF_GE(LVarF, 1200) - EVT_SET(LVarF, 0) - EVT_END_IF - EVT_SETF(LVar0, LVarA) - EVT_SETF(LVar1, LVarB) - EVT_SETF(LVar2, LVarC) - EVT_SETF(LVar3, LVarD) - EVT_MULF(LVar0, EVT_FLOAT(-0.046875)) - EVT_MULF(LVar1, EVT_FLOAT(-0.09375)) - EVT_MULF(LVar2, EVT_FLOAT(-0.09375)) - EVT_MULF(LVar3, EVT_FLOAT(-0.09375)) - EVT_ADDF(MV_Distortion_Platform_01, LVar0) - EVT_ADDF(MV_Distortion_Platform_02, LVar1) - EVT_ADDF(MV_Distortion_Platform_03, LVar2) - EVT_ADDF(MV_Distortion_Platform_04, LVar3) - EVT_MULF(MV_Distortion_Platform_01, EVT_FLOAT(0.843)) - EVT_MULF(MV_Distortion_Platform_02, EVT_FLOAT(0.843)) - EVT_MULF(MV_Distortion_Platform_03, EVT_FLOAT(0.843)) - EVT_MULF(MV_Distortion_Platform_04, EVT_FLOAT(0.843)) - EVT_ADDF(LVarA, MV_Distortion_Platform_01) - EVT_ADDF(LVarB, MV_Distortion_Platform_02) - EVT_ADDF(LVarC, MV_Distortion_Platform_03) - EVT_ADDF(LVarD, MV_Distortion_Platform_04) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_EF) + Set(LVarF, 0) + Label(0) + SetF(LVar0, Float(-215.4375)) + SetF(LVar1, Float(128.593)) + SetF(LVar2, Float(-200.0)) + AddF(LVar1, MV_Distortion_Platform_01) + Call(TranslateGroup, MODEL_g17, LVar0, LVar1, LVar2) + SetF(LVar0, Float(-79.86)) + Call(N(CosInterpAbsMinMax), LVarF, LVar1, Float(5.0), Float(136.765), 300, 0, 0) + SetF(LVar2, Float(-200.0)) + AddF(LVar1, MV_Distortion_Platform_02) + Call(TranslateGroup, MODEL_g21, LVar0, LVar1, LVar2) + SetF(LVar0, Float(-364.265625)) + Call(N(CosInterpAbsMinMax), LVarF, LVar1, Float(5.0), Float(106.765), 300, 0, 0) + SetF(LVar2, Float(10.0)) + AddF(LVar1, MV_Distortion_Platform_03) + Call(TranslateGroup, MODEL_g22, LVar0, LVar1, LVar2) + SetF(LVar0, Float(295.734)) + Call(N(CosInterpAbsMinMax), LVarF, LVar1, Float(65.0), Float(86.984), 200, 0, 0) + SetF(LVar2, Float(-80.0)) + AddF(LVar1, MV_Distortion_Platform_04) + Call(TranslateGroup, MODEL_g23, LVar0, LVar1, LVar2) + Call(N(CosInterpAbsMinMax), LVarF, LVar2, Float(0.968), Float(1.031), 15, 0, 0) + Call(N(CosInterpAbsMinMax), LVarF, LVar3, Float(1.031), Float(0.968), 15, 0, 0) + SetF(LVar0, MV_Distortion_Platform_01) + SetF(LVar1, MV_Distortion_Platform_01) + MulF(LVar0, Float(-0.02)) + MulF(LVar1, Float(0.04)) + AddF(LVar0, LVar2) + AddF(LVar1, LVar3) + Call(ScaleGroup, MODEL_g17, LVar0, LVar1, 1) + SetF(LVar0, MV_Distortion_Platform_02) + SetF(LVar1, MV_Distortion_Platform_02) + MulF(LVar0, Float(-0.02)) + MulF(LVar1, Float(0.04)) + AddF(LVar0, LVar2) + AddF(LVar1, LVar3) + Call(ScaleGroup, MODEL_g21, LVar0, LVar1, 1) + SetF(LVar0, MV_Distortion_Platform_03) + SetF(LVar1, MV_Distortion_Platform_03) + MulF(LVar0, Float(-0.02)) + MulF(LVar1, Float(0.04)) + AddF(LVar0, LVar2) + AddF(LVar1, LVar3) + Call(ScaleGroup, MODEL_g22, LVar0, LVar1, 1) + SetF(LVar0, MV_Distortion_Platform_04) + SetF(LVar1, MV_Distortion_Platform_04) + MulF(LVar0, Float(-0.02)) + MulF(LVar1, Float(0.04)) + AddF(LVar0, LVar2) + AddF(LVar1, LVar3) + Call(ScaleGroup, MODEL_g23, LVar0, LVar1, 1) + Call(UpdateColliderTransform, COLLIDER_o77) + Call(UpdateColliderTransform, COLLIDER_o78) + Call(UpdateColliderTransform, COLLIDER_o76) + Call(UpdateColliderTransform, COLLIDER_o79) + Add(LVarF, 1) + IfGe(LVarF, 1200) + Set(LVarF, 0) + EndIf + SetF(LVar0, LVarA) + SetF(LVar1, LVarB) + SetF(LVar2, LVarC) + SetF(LVar3, LVarD) + MulF(LVar0, Float(-0.046875)) + MulF(LVar1, Float(-0.09375)) + MulF(LVar2, Float(-0.09375)) + MulF(LVar3, Float(-0.09375)) + AddF(MV_Distortion_Platform_01, LVar0) + AddF(MV_Distortion_Platform_02, LVar1) + AddF(MV_Distortion_Platform_03, LVar2) + AddF(MV_Distortion_Platform_04, LVar3) + MulF(MV_Distortion_Platform_01, Float(0.843)) + MulF(MV_Distortion_Platform_02, Float(0.843)) + MulF(MV_Distortion_Platform_03, Float(0.843)) + MulF(MV_Distortion_Platform_04, Float(0.843)) + AddF(LVarA, MV_Distortion_Platform_01) + AddF(LVarB, MV_Distortion_Platform_02) + AddF(LVarC, MV_Distortion_Platform_03) + AddF(LVarD, MV_Distortion_Platform_04) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_AddPlayerWeight_Platform_01) = { - EVT_THREAD - EVT_ADDF(MV_Distortion_Platform_01, EVT_FLOAT(-1.5)) - EVT_WAIT(1) - EVT_ADDF(MV_Distortion_Platform_01, EVT_FLOAT(-1.5)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + AddF(MV_Distortion_Platform_01, Float(-1.5)) + Wait(1) + AddF(MV_Distortion_Platform_01, Float(-1.5)) + EndThread + Return + End }; EvtScript N(EVS_AddPlayerWeight_Platform_02) = { - EVT_THREAD - EVT_ADDF(MV_Distortion_Platform_02, EVT_FLOAT(-1.5)) - EVT_WAIT(1) - EVT_ADDF(MV_Distortion_Platform_02, EVT_FLOAT(-1.5)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + AddF(MV_Distortion_Platform_02, Float(-1.5)) + Wait(1) + AddF(MV_Distortion_Platform_02, Float(-1.5)) + EndThread + Return + End }; EvtScript N(EVS_AddPlayerWeight_Platform_03) = { - EVT_THREAD - EVT_ADDF(MV_Distortion_Platform_03, EVT_FLOAT(-1.5)) - EVT_WAIT(1) - EVT_ADDF(MV_Distortion_Platform_03, EVT_FLOAT(-1.5)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + AddF(MV_Distortion_Platform_03, Float(-1.5)) + Wait(1) + AddF(MV_Distortion_Platform_03, Float(-1.5)) + EndThread + Return + End }; EvtScript N(EVS_AddPlayerWeight_Platform_04) = { - EVT_THREAD - EVT_ADDF(MV_Distortion_Platform_04, EVT_FLOAT(-1.5)) - EVT_WAIT(1) - EVT_ADDF(MV_Distortion_Platform_04, EVT_FLOAT(-1.5)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + AddF(MV_Distortion_Platform_04, Float(-1.5)) + Wait(1) + AddF(MV_Distortion_Platform_04, Float(-1.5)) + EndThread + Return + End }; EvtScript N(EVS_SetupClouds) = { - EVT_CALL(ParentColliderToModel, COLLIDER_o77, MODEL_g17) - EVT_CALL(ParentColliderToModel, COLLIDER_o78, MODEL_g21) - EVT_CALL(ParentColliderToModel, COLLIDER_o76, MODEL_g22) - EVT_CALL(ParentColliderToModel, COLLIDER_o79, MODEL_g23) - EVT_CALL(SetModelFlags, MODEL_g17, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_CALL(SetModelFlags, MODEL_g21, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_CALL(SetModelFlags, MODEL_g22, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_CALL(SetModelFlags, MODEL_g23, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_EXEC(N(EVS_AnimatePlatforms)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_AddPlayerWeight_Platform_01)), TRIGGER_FLOOR_TOUCH, COLLIDER_o77, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_AddPlayerWeight_Platform_02)), TRIGGER_FLOOR_TOUCH, COLLIDER_o78, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_AddPlayerWeight_Platform_03)), TRIGGER_FLOOR_TOUCH, COLLIDER_o76, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_AddPlayerWeight_Platform_04)), TRIGGER_FLOOR_TOUCH, COLLIDER_o79, 1, 0) - EVT_THREAD - EVT_SET(LVarF, 0) - EVT_LABEL(0) - EVT_CALL(N(CosInterpAbsMinMax), LVarF, LVar0, EVT_FLOAT(0.968), EVT_FLOAT(1.031), 15, 0, 0) - EVT_CALL(N(CosInterpAbsMinMax), LVarF, LVar1, EVT_FLOAT(1.031), EVT_FLOAT(0.968), 15, 0, 0) - EVT_CALL(ScaleModel, MODEL_o73, LVar1, LVar0, 1) - EVT_CALL(ScaleModel, MODEL_o74, LVar1, LVar0, 1) - EVT_CALL(ScaleModel, MODEL_o75, LVar0, LVar1, 1) - EVT_CALL(ScaleModel, MODEL_o76, LVar0, LVar1, 1) - EVT_CALL(ScaleModel, MODEL_o77, LVar0, LVar1, 1) - EVT_CALL(ScaleModel, MODEL_o78, LVar1, LVar0, 1) - EVT_CALL(ScaleModel, MODEL_o45, LVar0, LVar1, 1) - EVT_CALL(ScaleModel, MODEL_o56, LVar0, LVar1, 1) - EVT_ADD(LVarF, 1) - EVT_IF_GE(LVarF, 30) - EVT_SET(LVarF, 0) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(ParentColliderToModel, COLLIDER_o77, MODEL_g17) + Call(ParentColliderToModel, COLLIDER_o78, MODEL_g21) + Call(ParentColliderToModel, COLLIDER_o76, MODEL_g22) + Call(ParentColliderToModel, COLLIDER_o79, MODEL_g23) + Call(SetModelFlags, MODEL_g17, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Call(SetModelFlags, MODEL_g21, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Call(SetModelFlags, MODEL_g22, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Call(SetModelFlags, MODEL_g23, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Exec(N(EVS_AnimatePlatforms)) + BindTrigger(Ref(N(EVS_AddPlayerWeight_Platform_01)), TRIGGER_FLOOR_TOUCH, COLLIDER_o77, 1, 0) + BindTrigger(Ref(N(EVS_AddPlayerWeight_Platform_02)), TRIGGER_FLOOR_TOUCH, COLLIDER_o78, 1, 0) + BindTrigger(Ref(N(EVS_AddPlayerWeight_Platform_03)), TRIGGER_FLOOR_TOUCH, COLLIDER_o76, 1, 0) + BindTrigger(Ref(N(EVS_AddPlayerWeight_Platform_04)), TRIGGER_FLOOR_TOUCH, COLLIDER_o79, 1, 0) + Thread + Set(LVarF, 0) + Label(0) + Call(N(CosInterpAbsMinMax), LVarF, LVar0, Float(0.968), Float(1.031), 15, 0, 0) + Call(N(CosInterpAbsMinMax), LVarF, LVar1, Float(1.031), Float(0.968), 15, 0, 0) + Call(ScaleModel, MODEL_o73, LVar1, LVar0, 1) + Call(ScaleModel, MODEL_o74, LVar1, LVar0, 1) + Call(ScaleModel, MODEL_o75, LVar0, LVar1, 1) + Call(ScaleModel, MODEL_o76, LVar0, LVar1, 1) + Call(ScaleModel, MODEL_o77, LVar0, LVar1, 1) + Call(ScaleModel, MODEL_o78, LVar1, LVar0, 1) + Call(ScaleModel, MODEL_o45, LVar0, LVar1, 1) + Call(ScaleModel, MODEL_o56, LVar0, LVar1, 1) + Add(LVarF, 1) + IfGe(LVarF, 30) + Set(LVarF, 0) + EndIf + Wait(1) + Goto(0) + EndThread + Return + End }; diff --git a/src/world/area_flo/flo_19/flo_19_5_beanstalk.c b/src/world/area_flo/flo_19/flo_19_5_beanstalk.c index dee8719908a..e7472fbf3f5 100644 --- a/src/world/area_flo/flo_19/flo_19_5_beanstalk.c +++ b/src/world/area_flo/flo_19/flo_19_5_beanstalk.c @@ -52,342 +52,342 @@ API_CALLABLE(N(SetScreenFadeAmount)) { #include "common/CosInterpMinMax.inc.c" EvtScript N(EVS_FadeOutToBlack) = { - EVT_SET(LVar0, 0) - EVT_LABEL(10) - EVT_CALL(N(SetScreenFadeAmount)) - EVT_ADD(LVar0, 25) - EVT_WAIT(1) - EVT_IF_LT(LVar0, 255) - EVT_GOTO(10) - EVT_END_IF - EVT_SET(LVar0, 255) - EVT_CALL(N(SetScreenFadeAmount)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(LVar0, 0) + Label(10) + Call(N(SetScreenFadeAmount)) + Add(LVar0, 25) + Wait(1) + IfLt(LVar0, 255) + Goto(10) + EndIf + Set(LVar0, 255) + Call(N(SetScreenFadeAmount)) + Wait(1) + Return + End }; EvtScript N(EVS_FadeInFromBlack) = { - EVT_SET(LVar0, 255) - EVT_LABEL(10) - EVT_CALL(N(SetScreenFadeAmount)) - EVT_SUB(LVar0, 25) - EVT_WAIT(1) - EVT_IF_GT(LVar0, 0) - EVT_GOTO(10) - EVT_END_IF - EVT_SET(LVar0, 0) - EVT_CALL(N(SetScreenFadeAmount)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(LVar0, 255) + Label(10) + Call(N(SetScreenFadeAmount)) + Sub(LVar0, 25) + Wait(1) + IfGt(LVar0, 0) + Goto(10) + EndIf + Set(LVar0, 0) + Call(N(SetScreenFadeAmount)) + Wait(1) + Return + End }; EvtScript N(EVS_SetExteriorVineGrowth) = { - EVT_CALL(TranslateGroup, MODEL_g83, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_ha, 0, LVar0, 0) - EVT_SETF(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-12.0)) - EVT_CALL(RotateGroup, MODEL_g83, LVar1, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_ha, LVar1, 0, 1, 0) - EVT_RETURN - EVT_END + Call(TranslateGroup, MODEL_g83, 0, LVar0, 0) + Call(TranslateGroup, MODEL_ha, 0, LVar0, 0) + SetF(LVar1, LVar0) + MulF(LVar1, Float(-12.0)) + Call(RotateGroup, MODEL_g83, LVar1, 0, 1, 0) + Call(RotateGroup, MODEL_ha, LVar1, 0, 1, 0) + Return + End }; EvtScript N(EVS_SetInteriorVineGrowth) = { - EVT_CALL(TranslateGroup, MODEL_g84, 0, LVar0, 0) - EVT_SETF(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-12.0)) - EVT_CALL(RotateGroup, MODEL_g84, LVar1, 0, 1, 0) - EVT_RETURN - EVT_END + Call(TranslateGroup, MODEL_g84, 0, LVar0, 0) + SetF(LVar1, LVar0) + MulF(LVar1, Float(-12.0)) + Call(RotateGroup, MODEL_g84, LVar1, 0, 1, 0) + Return + End }; EvtScript N(EVS_Enter_Beanstalk) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o108, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o122, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetCamType, CAM_DEFAULT, 1, FALSE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(11.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(EnableGroup, MODEL_g16, FALSE) - EVT_CALL(EnableGroup, MODEL_g2, FALSE) - EVT_CALL(EnableGroup, MODEL_g3, FALSE) - EVT_CALL(EnableGroup, MODEL_g19, FALSE) - EVT_CALL(EnableGroup, MODEL_g93, FALSE) - EVT_CALL(EnableGroup, MODEL_g15, FALSE) - EVT_CALL(EnableGroup, MODEL_g25, FALSE) - EVT_SET(LVar9, EVT_FLOAT(45.0)) - EVT_SET(LVarA, EVT_FLOAT(28.0)) - EVT_SET(LVarB, EVT_FLOAT(5.0)) - EVT_SET(LVarC, EVT_FLOAT(60.0)) - EVT_SET(LVarD, EVT_FLOAT(28.0)) - EVT_SET(LVarE, EVT_FLOAT(10.0)) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Walk) - EVT_SWITCH(AF_FLO_BeanstalkFacingRight) - EVT_CASE_EQ(0) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_CASE_EQ(1) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_END_SWITCH - EVT_END_THREAD - EVT_CALL(TranslateModel, MODEL_o142, EVT_FLOAT(1.313), EVT_FLOAT(3.0), EVT_FLOAT(-0.56640625)) - EVT_CALL(UpdateColliderTransform, COLLIDER_o117) - EVT_THREAD - EVT_SET(AF_FLO_BeanstalkFadedOut, FALSE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Walk) - EVT_WAIT(200) - EVT_EXEC_WAIT(N(EVS_FadeOutToBlack)) - EVT_SET(AF_FLO_BeanstalkFadedOut, TRUE) - EVT_WAIT(10) - EVT_CALL(EnableGroup, MODEL_g16, TRUE) - EVT_CALL(EnableGroup, MODEL_g2, TRUE) - EVT_CALL(EnableGroup, MODEL_g3, TRUE) - EVT_CALL(EnableGroup, MODEL_g19, TRUE) - EVT_CALL(EnableGroup, MODEL_g93, TRUE) - EVT_CALL(EnableGroup, MODEL_g15, TRUE) - EVT_CALL(EnableGroup, MODEL_g25, TRUE) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC_WAIT(N(EVS_FadeInFromBlack)) - EVT_WAIT(20) - EVT_SET(AF_FLO_BeanstalkFadedOut, FALSE) - EVT_END_THREAD - EVT_SET(LVarF, 0) - EVT_LOOP(344) - EVT_ADD(LVarF, 1) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, -210, 0, 344, 0, 0) - EVT_SETF(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-3.0)) - EVT_CALL(TranslateModel, MODEL_o142, EVT_FLOAT(1.313), LVar0, EVT_FLOAT(-0.56640625)) - EVT_CALL(RotateModel, MODEL_o142, LVar1, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o117) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(-3.0)) - EVT_SETF(LVar3, LVar0) - EVT_CALL(N(PlayerRideBeanstalk)) - EVT_CALL(N(PartnerRideBeanstalk)) - EVT_LABEL(11) - EVT_WAIT(1) - EVT_IF_EQ(AF_FLO_BeanstalkFadedOut, TRUE) - EVT_GOTO(11) - EVT_END_IF - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o108, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o122, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnablePartnerAI) - EVT_CALL(ClearPartnerMoveHistory, NPC_PARTNER) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(PlayerJump, 100, 0, 60, 20) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_WAIT(5) - EVT_SET(AF_FLO_RidingBeanstalk, FALSE) - EVT_CALL(StopSound, SOUND_FLO_RIDE_BEANSTALK_UP_LOOP) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o108, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o122, COLLIDER_FLAGS_UPPER_MASK) + Call(SetCamType, CAM_DEFAULT, 1, FALSE) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(11.0)) + Call(SetCamPosA, CAM_DEFAULT, 0, 0) + Call(SetCamPosB, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(EnableGroup, MODEL_g16, FALSE) + Call(EnableGroup, MODEL_g2, FALSE) + Call(EnableGroup, MODEL_g3, FALSE) + Call(EnableGroup, MODEL_g19, FALSE) + Call(EnableGroup, MODEL_g93, FALSE) + Call(EnableGroup, MODEL_g15, FALSE) + Call(EnableGroup, MODEL_g25, FALSE) + Set(LVar9, Float(45.0)) + Set(LVarA, Float(28.0)) + Set(LVarB, Float(5.0)) + Set(LVarC, Float(60.0)) + Set(LVarD, Float(28.0)) + Set(LVarE, Float(10.0)) + Thread + Wait(5) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(SetPlayerAnimation, ANIM_Mario1_Walk) + Switch(AF_FLO_BeanstalkFacingRight) + CaseEq(0) + Call(InterpPlayerYaw, 90, 0) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + CaseEq(1) + Call(InterpPlayerYaw, 270, 0) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + EndSwitch + EndThread + Call(TranslateModel, MODEL_o142, Float(1.313), Float(3.0), Float(-0.56640625)) + Call(UpdateColliderTransform, COLLIDER_o117) + Thread + Set(AF_FLO_BeanstalkFadedOut, FALSE) + Call(SetPlayerAnimation, ANIM_Mario1_Walk) + Wait(200) + ExecWait(N(EVS_FadeOutToBlack)) + Set(AF_FLO_BeanstalkFadedOut, TRUE) + Wait(10) + Call(EnableGroup, MODEL_g16, TRUE) + Call(EnableGroup, MODEL_g2, TRUE) + Call(EnableGroup, MODEL_g3, TRUE) + Call(EnableGroup, MODEL_g19, TRUE) + Call(EnableGroup, MODEL_g93, TRUE) + Call(EnableGroup, MODEL_g15, TRUE) + Call(EnableGroup, MODEL_g25, TRUE) + Call(SetCamDistance, CAM_DEFAULT, 450) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-6.0)) + Call(SetCamPosA, CAM_DEFAULT, 0, 0) + Call(SetCamPosB, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + ExecWait(N(EVS_FadeInFromBlack)) + Wait(20) + Set(AF_FLO_BeanstalkFadedOut, FALSE) + EndThread + Set(LVarF, 0) + Loop(344) + Add(LVarF, 1) + Call(N(CosInterpMinMax), LVarF, LVar0, -210, 0, 344, 0, 0) + SetF(LVar1, LVar0) + MulF(LVar1, Float(-3.0)) + Call(TranslateModel, MODEL_o142, Float(1.313), LVar0, Float(-0.56640625)) + Call(RotateModel, MODEL_o142, LVar1, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_o117) + SetF(LVar2, LVar0) + MulF(LVar2, Float(-3.0)) + SetF(LVar3, LVar0) + Call(N(PlayerRideBeanstalk)) + Call(N(PartnerRideBeanstalk)) + Label(11) + Wait(1) + IfEq(AF_FLO_BeanstalkFadedOut, TRUE) + Goto(11) + EndIf + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o108, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o122, COLLIDER_FLAGS_UPPER_MASK) + Call(EnablePartnerAI) + Call(ClearPartnerMoveHistory, NPC_PARTNER) + Call(SetPlayerJumpscale, Float(1.0)) + Call(PlayerJump, 100, 0, 60, 20) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(InterpPlayerYaw, 90, 0) + Wait(5) + Set(AF_FLO_RidingBeanstalk, FALSE) + Call(StopSound, SOUND_FLO_RIDE_BEANSTALK_UP_LOOP) + ExecWait(N(EVS_SetupMusic)) + Call(ResetCam, CAM_DEFAULT, Float(1.0)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Exit_Beanstalk) = { - EVT_IF_EQ(AF_FLO_RidingBeanstalk, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterruptUsePartner) - EVT_WAIT(15) - EVT_CALL(DisablePartnerAI, 0) - EVT_SET(AF_FLO_RidingBeanstalk, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o108, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o122, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar9, EVT_FLOAT(45.0)) - EVT_SET(LVarA, EVT_FLOAT(28.0)) - EVT_SET(LVarB, EVT_FLOAT(5.0)) - EVT_SET(LVarC, EVT_FLOAT(60.0)) - EVT_SET(LVarD, EVT_FLOAT(28.0)) - EVT_SET(LVarE, EVT_FLOAT(10.0)) - EVT_CALL(PlayerMoveTo, LVar9, LVarB, 8) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump0, NPC_PARTNER, LVarC, LVarD, LVarE, 5) - EVT_CALL(PlaySound, SOUND_FLO_RIDE_BEANSTALK_DOWN_LOOP) - EVT_CALL(SetMusicTrack, 0, SONG_MAGIC_BEANSTALK, 1, 8) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Walk) - EVT_CALL(N(GetPlayerAngles), LVar3, LVar4) - EVT_SWITCH(LVar4) - EVT_CASE_LT(90) - EVT_SET(AF_FLO_BeanstalkFacingRight, FALSE) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_CASE_GE(270) - EVT_SET(AF_FLO_BeanstalkFacingRight, TRUE) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_END_SWITCH - EVT_CALL(TranslateModel, MODEL_o142, EVT_FLOAT(1.313), EVT_FLOAT(3.0), EVT_FLOAT(-0.56640625)) - EVT_CALL(UpdateColliderTransform, COLLIDER_o117) - EVT_SET(MV_BeanstalkSceneSync, FALSE) - EVT_THREAD - EVT_SET(AF_FLO_BeanstalkFadedOut, FALSE) - EVT_WAIT(120) - EVT_SET(AF_FLO_BeanstalkFadedOut, TRUE) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(EVS_FadeOutToBlack)) - EVT_WAIT(10) - EVT_CALL(EnableGroup, MODEL_g16, FALSE) - EVT_CALL(EnableGroup, MODEL_g2, FALSE) - EVT_CALL(EnableGroup, MODEL_g3, FALSE) - EVT_CALL(EnableGroup, MODEL_g19, FALSE) - EVT_CALL(EnableGroup, MODEL_g93, FALSE) - EVT_CALL(EnableGroup, MODEL_g15, FALSE) - EVT_CALL(EnableGroup, MODEL_g25, FALSE) - EVT_CALL(SetCamType, CAM_DEFAULT, 1, FALSE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(7.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_SET(AF_FLO_BeanstalkFadedOut, FALSE) - EVT_EXEC_WAIT(N(EVS_FadeInFromBlack)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVarF, 0) - EVT_LOOP(344) - EVT_ADD(LVarF, 1) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, 0, -210, 344, 0, 0) - EVT_SETF(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-3.0)) - EVT_CALL(TranslateModel, MODEL_o142, EVT_FLOAT(1.313), LVar0, EVT_FLOAT(-0.56640625)) - EVT_CALL(RotateModel, MODEL_o142, LVar1, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o117) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(-3.0)) - EVT_SETF(LVar3, LVar0) - EVT_CALL(N(PlayerRideBeanstalk)) - EVT_CALL(N(PartnerRideBeanstalk)) - EVT_IF_EQ(LVarF, 300) - EVT_SET(MV_BeanstalkSceneSync, TRUE) - EVT_END_IF - EVT_LABEL(11) - EVT_WAIT(1) - EVT_IF_EQ(AF_FLO_BeanstalkFadedOut, TRUE) - EVT_GOTO(11) - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_LABEL(10) - EVT_IF_EQ(MV_BeanstalkSceneSync, FALSE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("flo_00"), flo_00_ENTRY_8) - EVT_WAIT(100) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(AF_FLO_RidingBeanstalk, FALSE) + Call(DisablePlayerInput, TRUE) + Call(InterruptUsePartner) + Wait(15) + Call(DisablePartnerAI, 0) + Set(AF_FLO_RidingBeanstalk, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o108, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o122, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar9, Float(45.0)) + Set(LVarA, Float(28.0)) + Set(LVarB, Float(5.0)) + Set(LVarC, Float(60.0)) + Set(LVarD, Float(28.0)) + Set(LVarE, Float(10.0)) + Call(PlayerMoveTo, LVar9, LVarB, 8) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.0)) + Call(NpcJump0, NPC_PARTNER, LVarC, LVarD, LVarE, 5) + Call(PlaySound, SOUND_FLO_RIDE_BEANSTALK_DOWN_LOOP) + Call(SetMusicTrack, 0, SONG_MAGIC_BEANSTALK, 1, 8) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(SetPlayerAnimation, ANIM_Mario1_Walk) + Call(N(GetPlayerAngles), LVar3, LVar4) + Switch(LVar4) + CaseLt(90) + Set(AF_FLO_BeanstalkFacingRight, FALSE) + Call(InterpPlayerYaw, 90, 0) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + CaseGe(270) + Set(AF_FLO_BeanstalkFacingRight, TRUE) + Call(InterpPlayerYaw, 270, 0) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + EndSwitch + Call(TranslateModel, MODEL_o142, Float(1.313), Float(3.0), Float(-0.56640625)) + Call(UpdateColliderTransform, COLLIDER_o117) + Set(MV_BeanstalkSceneSync, FALSE) + Thread + Set(AF_FLO_BeanstalkFadedOut, FALSE) + Wait(120) + Set(AF_FLO_BeanstalkFadedOut, TRUE) + Wait(20) + ExecWait(N(EVS_FadeOutToBlack)) + Wait(10) + Call(EnableGroup, MODEL_g16, FALSE) + Call(EnableGroup, MODEL_g2, FALSE) + Call(EnableGroup, MODEL_g3, FALSE) + Call(EnableGroup, MODEL_g19, FALSE) + Call(EnableGroup, MODEL_g93, FALSE) + Call(EnableGroup, MODEL_g15, FALSE) + Call(EnableGroup, MODEL_g25, FALSE) + Call(SetCamType, CAM_DEFAULT, 1, FALSE) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(7.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Set(AF_FLO_BeanstalkFadedOut, FALSE) + ExecWait(N(EVS_FadeInFromBlack)) + EndThread + Thread + Set(LVarF, 0) + Loop(344) + Add(LVarF, 1) + Call(N(CosInterpMinMax), LVarF, LVar0, 0, -210, 344, 0, 0) + SetF(LVar1, LVar0) + MulF(LVar1, Float(-3.0)) + Call(TranslateModel, MODEL_o142, Float(1.313), LVar0, Float(-0.56640625)) + Call(RotateModel, MODEL_o142, LVar1, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_o117) + SetF(LVar2, LVar0) + MulF(LVar2, Float(-3.0)) + SetF(LVar3, LVar0) + Call(N(PlayerRideBeanstalk)) + Call(N(PartnerRideBeanstalk)) + IfEq(LVarF, 300) + Set(MV_BeanstalkSceneSync, TRUE) + EndIf + Label(11) + Wait(1) + IfEq(AF_FLO_BeanstalkFadedOut, TRUE) + Goto(11) + EndIf + EndLoop + EndThread + Label(10) + IfEq(MV_BeanstalkSceneSync, FALSE) + Wait(1) + Goto(10) + EndIf + Call(GotoMap, Ref("flo_00"), flo_00_ENTRY_8) + Wait(100) + EndIf + Return + End }; EvtScript N(EVS_Scene_BeanstalkGrowing) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(EnableModel, MODEL_o142, FALSE) - EVT_CALL(EnableGroup, MODEL_g16, FALSE) - EVT_CALL(EnableGroup, MODEL_g2, FALSE) - EVT_CALL(EnableGroup, MODEL_g3, FALSE) - EVT_CALL(EnableGroup, MODEL_g19, FALSE) - EVT_CALL(EnableGroup, MODEL_g93, FALSE) - EVT_CALL(EnableGroup, MODEL_g15, FALSE) - EVT_CALL(EnableGroup, MODEL_g25, FALSE) - EVT_CALL(SetCamType, CAM_DEFAULT, 1, FALSE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 800) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(-20.0), EVT_FLOAT(8.5)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_SET(LVarF, 100) - EVT_SET(MV_BeanstalkGrowthProgress, LVarF) - EVT_SET(AF_FLO_BeanstalkGrowing, FALSE) - EVT_LOOP(400) - EVT_IF_EQ(AF_FLO_BeanstalkGrowing, FALSE) - EVT_IF_GT(MV_BeanstalkGrowthProgress, 400) - EVT_CALL(EnableGroup, MODEL_tuta, FALSE) - EVT_CALL(EnableGroup, MODEL_ha, FALSE) - EVT_CALL(EnableGroup, MODEL_g16, TRUE) - EVT_CALL(EnableGroup, MODEL_g2, TRUE) - EVT_CALL(EnableGroup, MODEL_g3, TRUE) - EVT_CALL(EnableGroup, MODEL_g19, TRUE) - EVT_CALL(EnableGroup, MODEL_g93, TRUE) - EVT_CALL(EnableGroup, MODEL_g15, TRUE) - EVT_CALL(EnableGroup, MODEL_g25, TRUE) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 1000) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(45.0), EVT_FLOAT(-3.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_SET(LVarF, 150) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(EnableGroup, MODEL_tuta, TRUE) - EVT_CALL(EnableGroup, MODEL_ha, TRUE) - EVT_CALL(EnableModel, MODEL_o142, FALSE) - EVT_WAIT(48) - EVT_PLAY_EFFECT(EFFECT_CLOUD_PUFF, 0, 22, 15, 0) - EVT_WAIT(10) - EVT_PLAY_EFFECT(EFFECT_CLOUD_PUFF, 0, 22, 15, 0) - EVT_END_THREAD - EVT_SET(AF_FLO_BeanstalkGrowing, TRUE) - EVT_END_IF - EVT_END_IF - EVT_ADD(LVarF, 1) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, -350, 0, 400, 0, 0) - EVT_SETF(MV_BeanstalkGrowthProgress, LVarF) - EVT_MULF(MV_BeanstalkGrowthProgress, EVT_FLOAT(1.6)) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(1.0)) - EVT_SETF(LVar0, LVar2) - EVT_EXEC(N(EVS_SetExteriorVineGrowth)) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(1.0)) - EVT_SETF(LVar0, LVar2) - EVT_EXEC(N(EVS_SetInteriorVineGrowth)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(15) - EVT_SET(GB_StoryProgress, STORY_CH6_GREW_MAGIC_BEANSTALK) - EVT_CALL(GotoMap, EVT_PTR("flo_00"), flo_00_ENTRY_7) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(EnableModel, MODEL_o142, FALSE) + Call(EnableGroup, MODEL_g16, FALSE) + Call(EnableGroup, MODEL_g2, FALSE) + Call(EnableGroup, MODEL_g3, FALSE) + Call(EnableGroup, MODEL_g19, FALSE) + Call(EnableGroup, MODEL_g93, FALSE) + Call(EnableGroup, MODEL_g15, FALSE) + Call(EnableGroup, MODEL_g25, FALSE) + Call(SetCamType, CAM_DEFAULT, 1, FALSE) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, 800) + Call(SetCamPitch, CAM_DEFAULT, Float(-20.0), Float(8.5)) + Call(SetCamPosA, CAM_DEFAULT, 0, 0) + Call(SetCamPosB, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Set(LVarF, 100) + Set(MV_BeanstalkGrowthProgress, LVarF) + Set(AF_FLO_BeanstalkGrowing, FALSE) + Loop(400) + IfEq(AF_FLO_BeanstalkGrowing, FALSE) + IfGt(MV_BeanstalkGrowthProgress, 400) + Call(EnableGroup, MODEL_tuta, FALSE) + Call(EnableGroup, MODEL_ha, FALSE) + Call(EnableGroup, MODEL_g16, TRUE) + Call(EnableGroup, MODEL_g2, TRUE) + Call(EnableGroup, MODEL_g3, TRUE) + Call(EnableGroup, MODEL_g19, TRUE) + Call(EnableGroup, MODEL_g93, TRUE) + Call(EnableGroup, MODEL_g15, TRUE) + Call(EnableGroup, MODEL_g25, TRUE) + Call(SetCamDistance, CAM_DEFAULT, 1000) + Call(SetCamPitch, CAM_DEFAULT, Float(45.0), Float(-3.0)) + Call(SetCamPosA, CAM_DEFAULT, 0, 0) + Call(SetCamPosB, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Set(LVarF, 150) + Thread + Wait(5) + Call(EnableGroup, MODEL_tuta, TRUE) + Call(EnableGroup, MODEL_ha, TRUE) + Call(EnableModel, MODEL_o142, FALSE) + Wait(48) + PlayEffect(EFFECT_CLOUD_PUFF, 0, 22, 15, 0) + Wait(10) + PlayEffect(EFFECT_CLOUD_PUFF, 0, 22, 15, 0) + EndThread + Set(AF_FLO_BeanstalkGrowing, TRUE) + EndIf + EndIf + Add(LVarF, 1) + Call(N(CosInterpMinMax), LVarF, LVar0, -350, 0, 400, 0, 0) + SetF(MV_BeanstalkGrowthProgress, LVarF) + MulF(MV_BeanstalkGrowthProgress, Float(1.6)) + SetF(LVar2, LVar0) + MulF(LVar2, Float(1.0)) + SetF(LVar0, LVar2) + Exec(N(EVS_SetExteriorVineGrowth)) + SetF(LVar2, LVar0) + MulF(LVar2, Float(1.0)) + SetF(LVar0, LVar2) + Exec(N(EVS_SetInteriorVineGrowth)) + Wait(1) + EndLoop + Wait(15) + Set(GB_StoryProgress, STORY_CH6_GREW_MAGIC_BEANSTALK) + Call(GotoMap, Ref("flo_00"), flo_00_ENTRY_7) + Return + End }; EvtScript N(EVS_SetupBeanstalk) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Exit_Beanstalk)), TRIGGER_FLOOR_TOUCH, COLLIDER_o117, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_Exit_Beanstalk)), TRIGGER_FLOOR_TOUCH, COLLIDER_o117, 1, 0) + Return + End }; diff --git a/src/world/area_flo/flo_21/flo_21_1_music.c b/src/world/area_flo/flo_21/flo_21_1_music.c index 885dd1bdbea..8a3e0c5f36d 100644 --- a/src/world/area_flo/flo_21/flo_21_1_music.c +++ b/src/world/area_flo/flo_21/flo_21_1_music.c @@ -1,11 +1,11 @@ #include "flo_21.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH6_DEFEATED_HUFF_N_PUFF) - EVT_CALL(FadeOutMusic, 0, 500) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_CLOUDY_CLIMB, 0, 8) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH6_DEFEATED_HUFF_N_PUFF) + Call(FadeOutMusic, 0, 500) + Else + Call(SetMusicTrack, 0, SONG_CLOUDY_CLIMB, 0, 8) + EndIf + Return + End }; diff --git a/src/world/area_flo/flo_21/flo_21_2_main.c b/src/world/area_flo/flo_21/flo_21_2_main.c index 9bdda3f7fc4..9f3cbe98460 100644 --- a/src/world/area_flo/flo_21/flo_21_2_main.c +++ b/src/world/area_flo/flo_21/flo_21_2_main.c @@ -12,106 +12,106 @@ API_CALLABLE(N(SpawnSunEffect)) { } EvtScript N(EVS_TrySpawningStarCard) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_CH6_GREW_MAGIC_BEANSTALK) - EVT_SET(LVar0, FALSE) - EVT_IF_EQ(MV_BossDefeated, FALSE) - EVT_RETURN - EVT_END_IF - EVT_SET(GB_StoryProgress, STORY_CH6_DEFEATED_HUFF_N_PUFF) - EVT_CASE_EQ(STORY_CH6_DEFEATED_HUFF_N_PUFF) - EVT_SET(LVar0, TRUE) - EVT_CASE_DEFAULT - EVT_RETURN - EVT_END_SWITCH - EVT_IF_EQ(LVar0, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 650, 205, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.6)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 650, 150, 0) - EVT_SPIRIT_ADJUST_CAM(EVT_FLOAT(-5.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(N(StarSpiritEffectFunc2), 5, 180, 650, 170, 0, 650, 205, 0, 150, 120) - EVT_THREAD - EVT_CALL(N(StarSpiritEffectFunc3)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(PlaySound, SOUND_LOOP_STAR_ORB_RISING) - EVT_CALL(N(StarSpiritEffectFunc1)) - EVT_CALL(StopSound, SOUND_LOOP_STAR_ORB_RISING) - EVT_CALL(PlaySoundAt, SOUND_STAR_ORB_BURST, SOUND_SPACE_DEFAULT, 650, 205, 0) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(45) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(180) - EVT_WAIT(115) - EVT_CALL(PlaySoundAt, SOUND_STAR_CARD_APPEARS, SOUND_SPACE_DEFAULT, 650, 205, 0) - EVT_END_THREAD - EVT_CALL(N(StarSpiritEffectFunc4), 1) - EVT_THREAD - EVT_WAIT(80) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_ADD(LVar1, 100) - EVT_CALL(SetCamDistance, CAM_DEFAULT, LVar1) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 650, 120, 0) - EVT_CALL(N(StarSpiritEffectFunc4), 2) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar2, LVar3, LVar4) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar2, LVar3, LVar4) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ELSE - EVT_CALL(N(StarSpiritEffectFunc5), 5, 650, 150, 0, 120) - EVT_THREAD - EVT_CALL(N(StarSpiritEffectFunc6)) - EVT_END_THREAD - EVT_WAIT(1) - EVT_END_IF - EVT_CALL(N(StarSpiritEffectFunc4), 3) - EVT_CALL(PlaySoundAtPlayer, SOUND_RESCUE_STAR_SPIRIT, SOUND_SPACE_DEFAULT) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(GB_StoryProgress, STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_23"), kmr_23_ENTRY_5, TRANSITION_GET_STAR_CARD) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseEq(STORY_CH6_GREW_MAGIC_BEANSTALK) + Set(LVar0, FALSE) + IfEq(MV_BossDefeated, FALSE) + Return + EndIf + Set(GB_StoryProgress, STORY_CH6_DEFEATED_HUFF_N_PUFF) + CaseEq(STORY_CH6_DEFEATED_HUFF_N_PUFF) + Set(LVar0, TRUE) + CaseDefault + Return + EndSwitch + IfEq(LVar0, FALSE) + Call(DisablePlayerInput, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, 650, 205, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.6)) + Call(SetPanTarget, CAM_DEFAULT, 650, 150, 0) + EVT_SPIRIT_ADJUST_CAM(Float(-5.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(N(StarSpiritEffectFunc2), 5, 180, 650, 170, 0, 650, 205, 0, 150, 120) + Thread + Call(N(StarSpiritEffectFunc3)) + EndThread + Thread + Wait(1) + Call(PlaySound, SOUND_LOOP_STAR_ORB_RISING) + Call(N(StarSpiritEffectFunc1)) + Call(StopSound, SOUND_LOOP_STAR_ORB_RISING) + Call(PlaySoundAt, SOUND_STAR_ORB_BURST, SOUND_SPACE_DEFAULT, 650, 205, 0) + EndThread + Thread + Wait(45) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + EndThread + Thread + Wait(180) + Wait(115) + Call(PlaySoundAt, SOUND_STAR_CARD_APPEARS, SOUND_SPACE_DEFAULT, 650, 205, 0) + EndThread + Call(N(StarSpiritEffectFunc4), 1) + Thread + Wait(80) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndThread + Add(LVar1, 100) + Call(SetCamDistance, CAM_DEFAULT, LVar1) + Call(SetPanTarget, CAM_DEFAULT, 650, 120, 0) + Call(N(StarSpiritEffectFunc4), 2) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Call(UseSettingsFrom, CAM_DEFAULT, LVar2, LVar3, LVar4) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar2, LVar3, LVar4) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Else + Call(N(StarSpiritEffectFunc5), 5, 650, 150, 0, 120) + Thread + Call(N(StarSpiritEffectFunc6)) + EndThread + Wait(1) + EndIf + Call(N(StarSpiritEffectFunc4), 3) + Call(PlaySoundAtPlayer, SOUND_RESCUE_STAR_SPIRIT, SOUND_SPACE_DEFAULT) + Call(DisablePlayerInput, TRUE) + Set(GB_StoryProgress, STORY_CH6_STAR_SPIRIT_RESCUED) + Call(GotoMapSpecial, Ref("kmr_23"), kmr_23_ENTRY_5, TRANSITION_GET_STAR_CARD) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_flo_19_1) = EVT_EXIT_WALK(60, flo_21_ENTRY_0, "flo_19", flo_19_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_19_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_19_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CLOUDY_CLIMB) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_Scene_HuffNPuffAmbush)) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_EXEC(N(EVS_SetupCloudPuffs)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o114, SURFACE_TYPE_CLOUD) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o115, SURFACE_TYPE_CLOUD) - EVT_CALL(GetEntryID, LVar0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_EXEC(N(EVS_TrySpawningStarCard)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CLOUDY_CLIMB) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Exec(N(EVS_Scene_HuffNPuffAmbush)) + Call(HidePlayerShadow, TRUE) + Exec(N(EVS_SetupCloudPuffs)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o114, SURFACE_TYPE_CLOUD) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o115, SURFACE_TYPE_CLOUD) + Call(GetEntryID, LVar0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Exec(N(EVS_TrySpawningStarCard)) + Return + End }; diff --git a/src/world/area_flo/flo_21/flo_21_3_clouds.c b/src/world/area_flo/flo_21/flo_21_3_clouds.c index 2fe81279138..4efe8622b7d 100644 --- a/src/world/area_flo/flo_21/flo_21_3_clouds.c +++ b/src/world/area_flo/flo_21/flo_21_3_clouds.c @@ -1,73 +1,73 @@ #include "flo_21.h" s32 N(UnusedScaleVectors)[] = { - EVT_FLOAT(1.0), EVT_FLOAT(1.0), - EVT_FLOAT(1.0), EVT_FLOAT(1.0), - EVT_FLOAT(1.0), EVT_FLOAT(1.0), - EVT_FLOAT(1.1), EVT_FLOAT(1.1), - EVT_FLOAT(1.1), EVT_FLOAT(1.1), - EVT_FLOAT(1.1), EVT_FLOAT(1.1), - EVT_FLOAT(1.0), EVT_FLOAT(1.0), - EVT_FLOAT(1.0), EVT_FLOAT(1.0), - EVT_FLOAT(1.0), EVT_FLOAT(1.0), - EVT_FLOAT(0.9), EVT_FLOAT(0.9), - EVT_FLOAT(0.9), EVT_FLOAT(0.9), - EVT_FLOAT(0.9), EVT_FLOAT(0.9), + Float(1.0), Float(1.0), + Float(1.0), Float(1.0), + Float(1.0), Float(1.0), + Float(1.1), Float(1.1), + Float(1.1), Float(1.1), + Float(1.1), Float(1.1), + Float(1.0), Float(1.0), + Float(1.0), Float(1.0), + Float(1.0), Float(1.0), + Float(0.9), Float(0.9), + Float(0.9), Float(0.9), + Float(0.9), Float(0.9), }; EvtScript N(EVS_UnkInit_00) = { - EVT_ADDF(MV_Unk_00, EVT_FLOAT(-1.5)) - EVT_RETURN - EVT_END + AddF(MV_Unk_00, Float(-1.5)) + Return + End }; EvtScript N(EVS_UnkInit_01) = { - EVT_ADDF(MV_Unk_01, EVT_FLOAT(-1.5)) - EVT_RETURN - EVT_END + AddF(MV_Unk_01, Float(-1.5)) + Return + End }; EvtScript N(EVS_UnkInit_02) = { - EVT_ADDF(MV_Unk_02, EVT_FLOAT(-1.5)) - EVT_RETURN - EVT_END + AddF(MV_Unk_02, Float(-1.5)) + Return + End }; EvtScript N(EVS_UnkInit_03) = { - EVT_ADDF(MV_Unk_03, EVT_FLOAT(-1.5)) - EVT_RETURN - EVT_END + AddF(MV_Unk_03, Float(-1.5)) + Return + End }; EvtScript N(EVS_UnkInit_04) = { - EVT_ADDF(MV_Unk_04, EVT_FLOAT(-1.5)) - EVT_RETURN - EVT_END + AddF(MV_Unk_04, Float(-1.5)) + Return + End }; #include "common/CosInterpMinMax.inc.c" EvtScript N(EVS_SetupCloudPuffs) = { - EVT_THREAD - EVT_SET(LVarF, 0) - EVT_LABEL(0) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, EVT_FLOAT(0.968), EVT_FLOAT(1.031), 15, 0, 0) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar1, EVT_FLOAT(1.031), EVT_FLOAT(0.968), 15, 0, 0) - EVT_CALL(ScaleModel, MODEL_o1, LVar1, LVar0, 1) - EVT_CALL(ScaleModel, MODEL_o2, LVar1, LVar0, 1) - EVT_CALL(ScaleModel, MODEL_o3, LVar0, LVar1, 1) - EVT_CALL(ScaleModel, MODEL_o4, LVar0, LVar1, 1) - EVT_CALL(ScaleModel, MODEL_o9, LVar0, LVar1, 1) - EVT_CALL(ScaleModel, MODEL_o14, LVar1, LVar0, 1) - EVT_CALL(ScaleModel, MODEL_o15, LVar0, LVar1, 1) - EVT_CALL(ScaleModel, MODEL_o16, LVar0, LVar1, 1) - EVT_ADD(LVarF, 1) - EVT_IF_GE(LVarF, 30) - EVT_SET(LVarF, 0) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + Set(LVarF, 0) + Label(0) + Call(N(CosInterpMinMax), LVarF, LVar0, Float(0.968), Float(1.031), 15, 0, 0) + Call(N(CosInterpMinMax), LVarF, LVar1, Float(1.031), Float(0.968), 15, 0, 0) + Call(ScaleModel, MODEL_o1, LVar1, LVar0, 1) + Call(ScaleModel, MODEL_o2, LVar1, LVar0, 1) + Call(ScaleModel, MODEL_o3, LVar0, LVar1, 1) + Call(ScaleModel, MODEL_o4, LVar0, LVar1, 1) + Call(ScaleModel, MODEL_o9, LVar0, LVar1, 1) + Call(ScaleModel, MODEL_o14, LVar1, LVar0, 1) + Call(ScaleModel, MODEL_o15, LVar0, LVar1, 1) + Call(ScaleModel, MODEL_o16, LVar0, LVar1, 1) + Add(LVarF, 1) + IfGe(LVarF, 30) + Set(LVarF, 0) + EndIf + Wait(1) + Goto(0) + EndThread + Return + End }; diff --git a/src/world/area_flo/flo_21/flo_21_4_npc.c b/src/world/area_flo/flo_21/flo_21_4_npc.c index 48732fee31c..17a61c82076 100644 --- a/src/world/area_flo/flo_21/flo_21_4_npc.c +++ b/src/world/area_flo/flo_21/flo_21_4_npc.c @@ -30,190 +30,190 @@ Vec3f N(Path_JumpOut)[] = { }; EvtScript N(EVS_PlayRumbleSounds) = { - EVT_LABEL(0) - EVT_CALL(PlaySound, SOUND_HUFF_N_PUFF_JIGGLE) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 15, EVT_FLOAT(1.0)) - EVT_WAIT(15) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(PlaySound, SOUND_HUFF_N_PUFF_JIGGLE) + Call(ShakeCam, CAM_DEFAULT, 0, 15, Float(1.0)) + Wait(15) + Goto(0) + Return + End }; EvtScript N(EVS_HuffNPuff_JumpOut) = { - EVT_CALL(PlaySoundAtNpc, NPC_HuffNPuff_01, SOUND_HUFF_N_PUFF_EMERGE, SOUND_SPACE_DEFAULT) - EVT_PLAY_EFFECT(EFFECT_SHOCKWAVE, 3, 650, 104, 0) - EVT_WAIT(15) - EVT_CALL(SetNpcJumpscale, NPC_HuffNPuff_02, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump0, NPC_HuffNPuff_02, 650, 50, 0, 5) - EVT_CALL(SetNpcPos, NPC_HuffNPuff_01, 650, 50, 5) - EVT_CALL(SetNpcPos, NPC_HuffNPuff_02, 650, 50, 0) - EVT_CALL(SetNpcPos, NPC_HuffNPuff_03, 650, 50, 0) - EVT_CALL(SetNpcJumpscale, NPC_HuffNPuff_01, EVT_FLOAT(0.0)) - EVT_CALL(SetNpcJumpscale, NPC_HuffNPuff_02, EVT_FLOAT(0.0)) - EVT_CALL(SetNpcJumpscale, NPC_HuffNPuff_03, EVT_FLOAT(0.0)) - EVT_THREAD - EVT_CALL(NpcJump0, NPC_HuffNPuff_01, 650, 150, 5, 10) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(NpcJump0, NPC_HuffNPuff_02, 650, 150, 0, 10) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(NpcJump0, NPC_HuffNPuff_03, 650, 150, 0, 10) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Flail) - EVT_CALL(LoadPath, 30, EVT_PTR(N(Path_JumpOut)), ARRAY_COUNT(N(Path_JumpOut)), EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetPlayerPos, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_RETURN - EVT_END + Call(PlaySoundAtNpc, NPC_HuffNPuff_01, SOUND_HUFF_N_PUFF_EMERGE, SOUND_SPACE_DEFAULT) + PlayEffect(EFFECT_SHOCKWAVE, 3, 650, 104, 0) + Wait(15) + Call(SetNpcJumpscale, NPC_HuffNPuff_02, Float(0.0)) + Call(NpcJump0, NPC_HuffNPuff_02, 650, 50, 0, 5) + Call(SetNpcPos, NPC_HuffNPuff_01, 650, 50, 5) + Call(SetNpcPos, NPC_HuffNPuff_02, 650, 50, 0) + Call(SetNpcPos, NPC_HuffNPuff_03, 650, 50, 0) + Call(SetNpcJumpscale, NPC_HuffNPuff_01, Float(0.0)) + Call(SetNpcJumpscale, NPC_HuffNPuff_02, Float(0.0)) + Call(SetNpcJumpscale, NPC_HuffNPuff_03, Float(0.0)) + Thread + Call(NpcJump0, NPC_HuffNPuff_01, 650, 150, 5, 10) + EndThread + Thread + Call(NpcJump0, NPC_HuffNPuff_02, 650, 150, 0, 10) + EndThread + Thread + Call(NpcJump0, NPC_HuffNPuff_03, 650, 150, 0, 10) + EndThread + Thread + Call(SetPlayerAnimation, ANIM_MarioW2_Flail) + Call(LoadPath, 30, Ref(N(Path_JumpOut)), ARRAY_COUNT(N(Path_JumpOut)), EASING_LINEAR) + Label(0) + Call(GetNextPathPos) + Call(SetPlayerPos, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(0) + EndIf + EndThread + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + Return + End }; EvtScript N(EVS_Scene_HuffNPuffAmbush) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DEFEATED_HUFF_N_PUFF) - EVT_RETURN - EVT_END_IF - EVT_CALL(AwaitPlayerApproach, 650, 0, 30) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetMusicTrack, 0, SONG_HUFF_N_PUFF_THEME, 0, 8) - EVT_EXEC_GET_TID(N(EVS_PlayRumbleSounds), LVar9) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(InterruptUsePartner) - EVT_WAIT(20) - EVT_END_IF - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(InterpPlayerYaw, 90, 1) - EVT_WAIT(5) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_CALL(SetNpcFlagBits, NPC_HuffNPuff_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar2, LVar3, LVar4) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar2, LVar3, LVar4) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(MakeLerp, LVar2, 600, 20, EASING_LINEAR) - EVT_SET(LVar2, LVar3) - EVT_SET(LVar5, LVar3) - EVT_ADD(LVar5, 15) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_ADD(LVar3, 3) - EVT_CALL(SetPlayerPos, LVar0, LVar3, LVar4) - EVT_IF_GT(LVar3, LVar5) - EVT_SET(LVar3, LVar2) - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar2, LVar4) - EVT_END_LOOP - EVT_CALL(func_802D2C14, 1) - EVT_CALL(SetPlayerPos, LVar0, LVar2, LVar4) - EVT_CALL(SetNpcFlagBits, NPC_HuffNPuff_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_WAIT(10) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 25) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_00CA, 630, 120, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(600.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(30.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(10) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_00CB, 630, 120, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-9.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(func_802D2C14, 0) - EVT_WAIT(10) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_NE(LVar0, PARTNER_LAKILESTER) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_00CC, 630, 120, 0) - EVT_ELSE - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_00CD, 630, 120, 0) - EVT_END_IF - EVT_CHILD_THREAD - EVT_WAIT(15) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 25) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_SET(LVar3, 40) - EVT_LOOP(5) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, LVar3) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_SUB(LVar3, 10) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(600.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, LVar3) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_ADD(LVar3, 7) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_EXEC_WAIT(N(EVS_HuffNPuff_JumpOut)) - EVT_KILL_THREAD(LVar9) - EVT_WAIT(30) - EVT_CALL(SetNpcVar, NPC_HuffNPuff_01, 0, 1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_WAIT(15) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH6_DEFEATED_HUFF_N_PUFF) + Return + EndIf + Call(AwaitPlayerApproach, 650, 0, 30) + Call(DisablePlayerInput, TRUE) + Call(SetMusicTrack, 0, SONG_HUFF_N_PUFF_THEME, 0, 8) + ExecGetTID(N(EVS_PlayRumbleSounds), LVar9) + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, PARTNER_NONE) + Call(InterruptUsePartner) + Wait(20) + EndIf + Call(DisablePlayerPhysics, TRUE) + Call(InterpPlayerYaw, 90, 1) + Wait(5) + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + Call(SetNpcFlagBits, NPC_HuffNPuff_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Call(UseSettingsFrom, CAM_DEFAULT, LVar2, LVar3, LVar4) + Call(SetPanTarget, CAM_DEFAULT, LVar2, LVar3, LVar4) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(MakeLerp, LVar2, 600, 20, EASING_LINEAR) + Set(LVar2, LVar3) + Set(LVar5, LVar3) + Add(LVar5, 15) + Loop(0) + Call(UpdateLerp) + Add(LVar3, 3) + Call(SetPlayerPos, LVar0, LVar3, LVar4) + IfGt(LVar3, LVar5) + Set(LVar3, LVar2) + EndIf + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar2, LVar4) + EndLoop + Call(func_802D2C14, 1) + Call(SetPlayerPos, LVar0, LVar2, LVar4) + Call(SetNpcFlagBits, NPC_HuffNPuff_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(DisablePlayerPhysics, FALSE) + Wait(10) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Add(LVar0, 25) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-9.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10) + Call(ShowMessageAtWorldPos, MSG_CH6_00CA, 630, 120, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(600.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(30.0), Float(-9.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(10) + Call(ShowMessageAtWorldPos, MSG_CH6_00CB, 630, 120, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-9.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(func_802D2C14, 0) + Wait(10) + Call(GetCurrentPartnerID, LVar0) + IfNe(LVar0, PARTNER_LAKILESTER) + Call(ShowMessageAtWorldPos, MSG_CH6_00CC, 630, 120, 0) + Else + Call(ShowMessageAtWorldPos, MSG_CH6_00CD, 630, 120, 0) + EndIf + ChildThread + Wait(15) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 25) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-6.0)) + Set(LVar3, 40) + Loop(5) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(SetCamSpeed, CAM_DEFAULT, LVar3) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Sub(LVar3, 10) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(600.0)) + Call(SetCamSpeed, CAM_DEFAULT, LVar3) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Add(LVar3, 7) + EndLoop + EndChildThread + ExecWait(N(EVS_HuffNPuff_JumpOut)) + KillThread(LVar9) + Wait(30) + Call(SetNpcVar, NPC_HuffNPuff_01, 0, 1) + Call(DisablePlayerInput, FALSE) + Wait(15) + Return + End }; EvtScript N(EVS_HuffNPuff_AnimateBodyScale) = { - EVT_SETF(LVar0, EVT_FLOAT(0.95)) - EVT_SETF(LVar1, EVT_FLOAT(1.1)) - EVT_LABEL(0) - EVT_SWITCH(MV_BossFightState) - EVT_CASE_EQ(0) - EVT_SET(LVar3, 10) - EVT_SET(LVar2, 2) - EVT_CASE_EQ(1) - EVT_SET(LVar3, 5) - EVT_SET(LVar2, 1) - EVT_CASE_DEFAULT - EVT_RETURN - EVT_END_SWITCH - EVT_SET(LVar4, LVar3) - EVT_LOOP(LVar4) - EVT_CALL(SetNpcScale, NPC_HuffNPuff_01, LVar0, LVar1, 1) - EVT_CALL(SetNpcScale, NPC_HuffNPuff_02, LVar0, LVar1, 1) - EVT_CALL(SetNpcScale, NPC_HuffNPuff_03, LVar0, LVar1, 1) - EVT_ADDF(LVar0, EVT_FLOAT(0.015)) - EVT_SUBF(LVar1, EVT_FLOAT(0.01)) - EVT_WAIT(LVar2) - EVT_END_LOOP - EVT_SET(LVar4, LVar3) - EVT_LOOP(LVar4) - EVT_CALL(SetNpcScale, NPC_HuffNPuff_01, LVar0, LVar1, 1) - EVT_CALL(SetNpcScale, NPC_HuffNPuff_02, LVar0, LVar1, 1) - EVT_CALL(SetNpcScale, NPC_HuffNPuff_03, LVar0, LVar1, 1) - EVT_SUBF(LVar0, EVT_FLOAT(0.015)) - EVT_ADDF(LVar1, EVT_FLOAT(0.01)) - EVT_WAIT(LVar2) - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + SetF(LVar0, Float(0.95)) + SetF(LVar1, Float(1.1)) + Label(0) + Switch(MV_BossFightState) + CaseEq(0) + Set(LVar3, 10) + Set(LVar2, 2) + CaseEq(1) + Set(LVar3, 5) + Set(LVar2, 1) + CaseDefault + Return + EndSwitch + Set(LVar4, LVar3) + Loop(LVar4) + Call(SetNpcScale, NPC_HuffNPuff_01, LVar0, LVar1, 1) + Call(SetNpcScale, NPC_HuffNPuff_02, LVar0, LVar1, 1) + Call(SetNpcScale, NPC_HuffNPuff_03, LVar0, LVar1, 1) + AddF(LVar0, Float(0.015)) + SubF(LVar1, Float(0.01)) + Wait(LVar2) + EndLoop + Set(LVar4, LVar3) + Loop(LVar4) + Call(SetNpcScale, NPC_HuffNPuff_01, LVar0, LVar1, 1) + Call(SetNpcScale, NPC_HuffNPuff_02, LVar0, LVar1, 1) + Call(SetNpcScale, NPC_HuffNPuff_03, LVar0, LVar1, 1) + SubF(LVar0, Float(0.015)) + AddF(LVar1, Float(0.01)) + Wait(LVar2) + EndLoop + Goto(0) + Return + End }; // start and end positions for each of the Ruff Puffs when HuffNPuff explodes @@ -264,315 +264,315 @@ Vec2i N(LoopAnimScaleY)[] = { }; EvtScript N(EVS_HuffNPuff_Defeat_Flashing) = { - EVT_SETF(LVar0, 10) - EVT_SETF(LVar1, 1) - EVT_CHILD_THREAD - EVT_LOOP(8) - EVT_CALL(SetNpcFlagBits, NPC_HuffNPuff_01, NPC_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_HuffNPuff_02, NPC_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_HuffNPuff_03, NPC_FLAG_INVISIBLE, FALSE) - EVT_WAIT(LVar0) - EVT_CALL(SetNpcFlagBits, NPC_HuffNPuff_01, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_HuffNPuff_02, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_HuffNPuff_03, NPC_FLAG_INVISIBLE, TRUE) - EVT_WAIT(LVar1) - EVT_SUBF(LVar0, 0) - EVT_ADDF(LVar1, 0) - EVT_END_LOOP - EVT_LOOP(0) - EVT_CALL(SetNpcFlagBits, NPC_HuffNPuff_01, NPC_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_HuffNPuff_02, NPC_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_HuffNPuff_03, NPC_FLAG_INVISIBLE, FALSE) - EVT_WAIT(LVar0) - EVT_CALL(SetNpcFlagBits, NPC_HuffNPuff_01, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_HuffNPuff_02, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_HuffNPuff_03, NPC_FLAG_INVISIBLE, TRUE) - EVT_WAIT(LVar1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_LOOP(0) - EVT_CALL(MakeLerp, 0, 255, 10, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcImgFXParams, NPC_HuffNPuff_01, IMGFX_SET_WHITE_FADE, LVar0, LVar0, LVar0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_HuffNPuff_02, IMGFX_SET_WHITE_FADE, LVar0, LVar0, LVar0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_HuffNPuff_03, IMGFX_SET_WHITE_FADE, LVar0, LVar0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetF(LVar0, 10) + SetF(LVar1, 1) + ChildThread + Loop(8) + Call(SetNpcFlagBits, NPC_HuffNPuff_01, NPC_FLAG_INVISIBLE, FALSE) + Call(SetNpcFlagBits, NPC_HuffNPuff_02, NPC_FLAG_INVISIBLE, FALSE) + Call(SetNpcFlagBits, NPC_HuffNPuff_03, NPC_FLAG_INVISIBLE, FALSE) + Wait(LVar0) + Call(SetNpcFlagBits, NPC_HuffNPuff_01, NPC_FLAG_INVISIBLE, TRUE) + Call(SetNpcFlagBits, NPC_HuffNPuff_02, NPC_FLAG_INVISIBLE, TRUE) + Call(SetNpcFlagBits, NPC_HuffNPuff_03, NPC_FLAG_INVISIBLE, TRUE) + Wait(LVar1) + SubF(LVar0, 0) + AddF(LVar1, 0) + EndLoop + Loop(0) + Call(SetNpcFlagBits, NPC_HuffNPuff_01, NPC_FLAG_INVISIBLE, FALSE) + Call(SetNpcFlagBits, NPC_HuffNPuff_02, NPC_FLAG_INVISIBLE, FALSE) + Call(SetNpcFlagBits, NPC_HuffNPuff_03, NPC_FLAG_INVISIBLE, FALSE) + Wait(LVar0) + Call(SetNpcFlagBits, NPC_HuffNPuff_01, NPC_FLAG_INVISIBLE, TRUE) + Call(SetNpcFlagBits, NPC_HuffNPuff_02, NPC_FLAG_INVISIBLE, TRUE) + Call(SetNpcFlagBits, NPC_HuffNPuff_03, NPC_FLAG_INVISIBLE, TRUE) + Wait(LVar1) + EndLoop + EndChildThread + ChildThread + Loop(0) + Call(MakeLerp, 0, 255, 10, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(SetNpcImgFXParams, NPC_HuffNPuff_01, IMGFX_SET_WHITE_FADE, LVar0, LVar0, LVar0, 0) + Call(SetNpcImgFXParams, NPC_HuffNPuff_02, IMGFX_SET_WHITE_FADE, LVar0, LVar0, LVar0, 0) + Call(SetNpcImgFXParams, NPC_HuffNPuff_03, IMGFX_SET_WHITE_FADE, LVar0, LVar0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + EndChildThread + Wait(100) + Return + End }; EvtScript N(EVS_HuffNPuff_Defeat_AnimateScale) = { - EVT_SETF(MV_HuffScaleX, EVT_FLOAT(1.0)) - EVT_SETF(MV_HuffScaleY, EVT_FLOAT(1.0)) - EVT_CHILD_THREAD - EVT_USE_BUF(EVT_PTR(N(BeginAnimScaleX))) - EVT_LOOP(ARRAY_COUNT(N(BeginAnimScaleX))) - EVT_CALL(PlaySoundAtNpc, NPC_HuffNPuff_01, SOUND_HUFF_N_PUFF_JIGGLE, SOUND_SPACE_DEFAULT) - EVT_BUF_READ3(LVar6, LVar7, LVar8) - EVT_CALL(MakeLerp, LVar6, LVar7, LVar8, EASING_SIN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, 10) - EVT_SETF(MV_HuffScaleX, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(0) - EVT_USE_BUF(EVT_PTR(N(LoopAnimScaleX))) - EVT_LOOP(ARRAY_COUNT(N(LoopAnimScaleX))) - EVT_CALL(PlaySoundAtNpc, NPC_HuffNPuff_01, SOUND_HUFF_N_PUFF_JIGGLE, SOUND_SPACE_DEFAULT) - EVT_BUF_READ2(LVar6, LVar7) - EVT_CALL(MakeLerp, LVar6, LVar7, 4, EASING_SIN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, 10) - EVT_SETF(MV_HuffScaleX, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_USE_BUF(EVT_PTR(N(BeginAnimScaleY))) - EVT_LOOP(ARRAY_COUNT(N(BeginAnimScaleY))) - EVT_BUF_READ3(LVar6, LVar7, LVar8) - EVT_CALL(MakeLerp, LVar6, LVar7, LVar8, EASING_SIN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, 10) - EVT_SETF(MV_HuffScaleY, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(0) - EVT_USE_BUF(EVT_PTR(N(LoopAnimScaleY))) - EVT_LOOP(ARRAY_COUNT(N(LoopAnimScaleY))) - EVT_BUF_READ2(LVar6, LVar7) - EVT_CALL(MakeLerp, LVar6, LVar7, 4, EASING_SIN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, 10) - EVT_SETF(MV_HuffScaleY, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_LOOP(100) - EVT_CALL(SetNpcScale, NPC_HuffNPuff_01, MV_HuffScaleX, MV_HuffScaleY, 1) - EVT_CALL(SetNpcScale, NPC_HuffNPuff_02, MV_HuffScaleX, MV_HuffScaleY, 1) - EVT_CALL(SetNpcScale, NPC_HuffNPuff_03, MV_HuffScaleX, MV_HuffScaleY, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + SetF(MV_HuffScaleX, Float(1.0)) + SetF(MV_HuffScaleY, Float(1.0)) + ChildThread + UseBuf(Ref(N(BeginAnimScaleX))) + Loop(ARRAY_COUNT(N(BeginAnimScaleX))) + Call(PlaySoundAtNpc, NPC_HuffNPuff_01, SOUND_HUFF_N_PUFF_JIGGLE, SOUND_SPACE_DEFAULT) + BufRead3(LVar6, LVar7, LVar8) + Call(MakeLerp, LVar6, LVar7, LVar8, EASING_SIN_OUT) + Loop(0) + Call(UpdateLerp) + DivF(LVar0, 10) + SetF(MV_HuffScaleX, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(1) + EndLoop + Loop(0) + UseBuf(Ref(N(LoopAnimScaleX))) + Loop(ARRAY_COUNT(N(LoopAnimScaleX))) + Call(PlaySoundAtNpc, NPC_HuffNPuff_01, SOUND_HUFF_N_PUFF_JIGGLE, SOUND_SPACE_DEFAULT) + BufRead2(LVar6, LVar7) + Call(MakeLerp, LVar6, LVar7, 4, EASING_SIN_OUT) + Loop(0) + Call(UpdateLerp) + DivF(LVar0, 10) + SetF(MV_HuffScaleX, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + EndLoop + EndChildThread + ChildThread + UseBuf(Ref(N(BeginAnimScaleY))) + Loop(ARRAY_COUNT(N(BeginAnimScaleY))) + BufRead3(LVar6, LVar7, LVar8) + Call(MakeLerp, LVar6, LVar7, LVar8, EASING_SIN_OUT) + Loop(0) + Call(UpdateLerp) + DivF(LVar0, 10) + SetF(MV_HuffScaleY, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(1) + EndLoop + Loop(0) + UseBuf(Ref(N(LoopAnimScaleY))) + Loop(ARRAY_COUNT(N(LoopAnimScaleY))) + BufRead2(LVar6, LVar7) + Call(MakeLerp, LVar6, LVar7, 4, EASING_SIN_OUT) + Loop(0) + Call(UpdateLerp) + DivF(LVar0, 10) + SetF(MV_HuffScaleY, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + EndLoop + EndChildThread + Loop(100) + Call(SetNpcScale, NPC_HuffNPuff_01, MV_HuffScaleX, MV_HuffScaleY, 1) + Call(SetNpcScale, NPC_HuffNPuff_02, MV_HuffScaleX, MV_HuffScaleY, 1) + Call(SetNpcScale, NPC_HuffNPuff_03, MV_HuffScaleX, MV_HuffScaleY, 1) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_HuffNPuff_Defeat_BlowUp) = { - EVT_CHILD_THREAD - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_SET(LVar0, 3) - EVT_LOOP(15) - EVT_CALL(SetNpcRotation, LVar0, 0, LVar1, 0) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_ADD(LVar1, 60) - EVT_IF_GT(LVar1, 360) - EVT_ADD(LVar1, -360) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_USE_BUF(EVT_PTR(N(BlowUpPositions))) - EVT_SET(LVar8, 3) + ChildThread + Set(LVar1, 0) + Loop(0) + Set(LVar0, 3) + Loop(15) + Call(SetNpcRotation, LVar0, 0, LVar1, 0) + Add(LVar0, 1) + EndLoop + Add(LVar1, 60) + IfGt(LVar1, 360) + Add(LVar1, -360) + EndIf + Wait(1) + EndLoop + EndChildThread + UseBuf(Ref(N(BlowUpPositions))) + Set(LVar8, 3) // all except the last one - EVT_LOOP((ARRAY_COUNT(N(BlowUpPositions))/ 2) - 1) - EVT_BUF_READ4(LVar1, LVar2, LVar3, LVar4) - EVT_THREAD - EVT_CALL(RandInt, 5, LVar5) - EVT_WAIT(LVar5) - EVT_CALL(SetNpcPos, LVar8, LVar1, LVar2, -30) - EVT_CALL(RandInt, 2, LVar5) - EVT_ADD(LVar5, 8) - EVT_CALL(PlaySoundAtNpc, LVar8, SOUND_RUFF_PUFF_FLY_A, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, LVar8, LVar3, LVar4, -15, LVar5) - EVT_CALL(SetNpcPos, LVar8, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_ADD(LVar8, 1) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_HuffNPuff_01, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_HuffNPuff_02, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_HuffNPuff_03, NPC_DISPOSE_LOCATION) + Loop((ARRAY_COUNT(N(BlowUpPositions))/ 2) - 1) + BufRead4(LVar1, LVar2, LVar3, LVar4) + Thread + Call(RandInt, 5, LVar5) + Wait(LVar5) + Call(SetNpcPos, LVar8, LVar1, LVar2, -30) + Call(RandInt, 2, LVar5) + Add(LVar5, 8) + Call(PlaySoundAtNpc, LVar8, SOUND_RUFF_PUFF_FLY_A, SOUND_SPACE_DEFAULT) + Call(NpcJump0, LVar8, LVar3, LVar4, -15, LVar5) + Call(SetNpcPos, LVar8, NPC_DISPOSE_LOCATION) + EndThread + Add(LVar8, 1) + EndLoop + Call(SetNpcPos, NPC_HuffNPuff_01, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_HuffNPuff_02, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_HuffNPuff_03, NPC_DISPOSE_LOCATION) // the last one - EVT_BUF_READ4(LVar1, LVar2, LVar3, LVar4) - EVT_WAIT(5) - EVT_CALL(SetNpcPos, LVar8, LVar1, LVar2, -30) - EVT_CALL(PlaySoundAtNpc, LVar8, SOUND_RUFF_PUFF_FLY_B, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, LVar8, LVar3, LVar4, -15, 10) - EVT_CALL(SetNpcPos, LVar8, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END + BufRead4(LVar1, LVar2, LVar3, LVar4) + Wait(5) + Call(SetNpcPos, LVar8, LVar1, LVar2, -30) + Call(PlaySoundAtNpc, LVar8, SOUND_RUFF_PUFF_FLY_B, SOUND_SPACE_DEFAULT) + Call(NpcJump0, LVar8, LVar3, LVar4, -15, 10) + Call(SetNpcPos, LVar8, NPC_DISPOSE_LOCATION) + Return + End }; EvtScript N(EVS_Scene_BossDefeated) = { - EVT_CALL(SetNpcAnimation, NPC_HuffNPuff_02, ANIM_HuffNPuff_Anim04) - EVT_CALL(SetNpcAnimation, NPC_HuffNPuff_01, ANIM_HuffNPuff_Anim05) - EVT_CALL(SetNpcAnimation, NPC_HuffNPuff_03, ANIM_HuffNPuff_Anim06) - EVT_CALL(GetNpcPos, NPC_HuffNPuff_01, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -15) - EVT_ADD(LVar2, 40) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-5.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_HuffNPuff_01, ANIM_HuffNPuff_Anim30, ANIM_HuffNPuff_Anim05, 256, -30, 30, MSG_CH6_00CE) - EVT_CALL(FadeOutMusic, 0, 1500) - EVT_SET(MV_BossFightState, 2) - EVT_CALL(GetNpcPos, NPC_HuffNPuff_01, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_SET(LVar3, LVar0) - EVT_SET(LVar4, LVar0) - EVT_ADD(LVar3, -35) - EVT_ADD(LVar4, 35) - EVT_LOOP(3) - EVT_PLAY_EFFECT(EFFECT_EXPLOSION, 0, LVar0, LVar1, LVar2) - EVT_WAIT(12) - EVT_PLAY_EFFECT(EFFECT_EXPLOSION, 0, LVar3, LVar1, LVar2) - EVT_ADD(LVar3, 7) - EVT_WAIT(8) - EVT_PLAY_EFFECT(EFFECT_EXPLOSION, 0, LVar4, LVar1, LVar2) - EVT_ADD(LVar4, -7) - EVT_WAIT(14) - EVT_END_LOOP - EVT_PLAY_EFFECT(EFFECT_EXPLOSION, 2, LVar0, LVar1, LVar2) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30, EVT_FLOAT(1.5)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(30) - EVT_LOOP(10) - EVT_PLAY_EFFECT(EFFECT_SHIMMER_WAVE, 0, LVar0, LVar1, LVar2, 40, 65, 12, 15) - EVT_WAIT(7) - EVT_END_LOOP - EVT_END_THREAD - EVT_EXEC(N(EVS_HuffNPuff_Defeat_Flashing)) - EVT_EXEC_WAIT(N(EVS_HuffNPuff_Defeat_AnimateScale)) - EVT_EXEC_WAIT(N(EVS_HuffNPuff_Defeat_BlowUp)) - EVT_WAIT(10) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_HuffNPuff_02, ANIM_HuffNPuff_Anim04) + Call(SetNpcAnimation, NPC_HuffNPuff_01, ANIM_HuffNPuff_Anim05) + Call(SetNpcAnimation, NPC_HuffNPuff_03, ANIM_HuffNPuff_Anim06) + Call(GetNpcPos, NPC_HuffNPuff_01, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Add(LVar0, -15) + Add(LVar2, 40) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(350.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-5.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_HuffNPuff_01, ANIM_HuffNPuff_Anim30, ANIM_HuffNPuff_Anim05, 256, -30, 30, MSG_CH6_00CE) + Call(FadeOutMusic, 0, 1500) + Set(MV_BossFightState, 2) + Call(GetNpcPos, NPC_HuffNPuff_01, LVar0, LVar1, LVar2) + Thread + Set(LVar3, LVar0) + Set(LVar4, LVar0) + Add(LVar3, -35) + Add(LVar4, 35) + Loop(3) + PlayEffect(EFFECT_EXPLOSION, 0, LVar0, LVar1, LVar2) + Wait(12) + PlayEffect(EFFECT_EXPLOSION, 0, LVar3, LVar1, LVar2) + Add(LVar3, 7) + Wait(8) + PlayEffect(EFFECT_EXPLOSION, 0, LVar4, LVar1, LVar2) + Add(LVar4, -7) + Wait(14) + EndLoop + PlayEffect(EFFECT_EXPLOSION, 2, LVar0, LVar1, LVar2) + Call(ShakeCam, CAM_DEFAULT, 0, 30, Float(1.5)) + EndThread + Thread + Wait(30) + Loop(10) + PlayEffect(EFFECT_SHIMMER_WAVE, 0, LVar0, LVar1, LVar2, 40, 65, 12, 15) + Wait(7) + EndLoop + EndThread + Exec(N(EVS_HuffNPuff_Defeat_Flashing)) + ExecWait(N(EVS_HuffNPuff_Defeat_AnimateScale)) + ExecWait(N(EVS_HuffNPuff_Defeat_BlowUp)) + Wait(10) + Return + End }; EvtScript N(EVS_NpcIdle_HuffNPuff_01) = { - EVT_LABEL(0) - EVT_CALL(SetSelfVar, 0, 0) - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(MV_BossFightState, 1) - EVT_CALL(StartBossBattle, SONG_HUFF_N_PUFF_BATTLE) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(SetSelfVar, 0, 0) + Loop(0) + Call(GetSelfVar, 0, LVar0) + IfNe(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Set(MV_BossFightState, 1) + Call(StartBossBattle, SONG_HUFF_N_PUFF_BATTLE) + Goto(0) + Return + End }; EvtScript N(EVS_NpcDefeat_HuffNPuff_Main) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAG_1, TRUE) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 90) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar3) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar3, -20) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar3) - EVT_EXEC_WAIT(N(EVS_Scene_BossDefeated)) - EVT_WAIT(50) - EVT_SET(MV_BossDefeated, TRUE) - EVT_EXEC(N(EVS_TrySpawningStarCard)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAG_1, TRUE) + Call(SetNpcYaw, NPC_PARTNER, 90) + Call(GetPlayerPos, LVar0, LVar1, LVar3) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Add(LVar3, -20) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar3) + ExecWait(N(EVS_Scene_BossDefeated)) + Wait(50) + Set(MV_BossDefeated, TRUE) + Exec(N(EVS_TrySpawningStarCard)) + EndSwitch + Return + End }; EvtScript N(EVS_NpcDefeat_HuffNPuff_Aux) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInit_HuffNPuff_Face) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH6_DEFEATED_HUFF_N_PUFF) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_400000, 1) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_HuffNPuff_01))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_HuffNPuff_Main))) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HuffNPuff_Anim02) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH6_DEFEATED_HUFF_N_PUFF) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_400000, 1) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_HuffNPuff_01))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_HuffNPuff_Main))) + Call(SetNpcAnimation, NPC_SELF, ANIM_HuffNPuff_Anim02) + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_HuffNPuff_Body) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH6_DEFEATED_HUFF_N_PUFF) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_400000, 1) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_HuffNPuff_Aux))) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HuffNPuff_Anim01) - EVT_EXEC(N(EVS_HuffNPuff_AnimateBodyScale)) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH6_DEFEATED_HUFF_N_PUFF) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_400000, 1) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_HuffNPuff_Aux))) + Call(SetNpcAnimation, NPC_SELF, ANIM_HuffNPuff_Anim01) + Exec(N(EVS_HuffNPuff_AnimateBodyScale)) + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_HuffNPuff_Arms) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH6_DEFEATED_HUFF_N_PUFF) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_400000, 1) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_HuffNPuff_Aux))) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HuffNPuff_Anim19) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH6_DEFEATED_HUFF_N_PUFF) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_400000, 1) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_HuffNPuff_Aux))) + Call(SetNpcAnimation, NPC_SELF, ANIM_HuffNPuff_Anim19) + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_RuffPuff) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_RuffPuff_Dizzy) - EVT_CALL(SetNpcJumpscale, NPC_SELF, 0) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_RuffPuff_Dizzy) + Call(SetNpcJumpscale, NPC_SELF, 0) + Return + End }; AnimID N(ExtraAnims_HuffNPuff)[] = { diff --git a/src/world/area_flo/flo_22/flo_22_1_music.c b/src/world/area_flo/flo_22/flo_22_1_music.c index 6fa2c7d61d9..2dda67bc1ff 100644 --- a/src/world/area_flo/flo_22/flo_22_1_music.c +++ b/src/world/area_flo/flo_22/flo_22_1_music.c @@ -1,12 +1,12 @@ #include "flo_22.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_flo/flo_22/flo_22_2_main.c b/src/world/area_flo/flo_22/flo_22_2_main.c index 079f4837083..b025b67b7f6 100644 --- a/src/world/area_flo/flo_22/flo_22_2_main.c +++ b/src/world/area_flo/flo_22/flo_22_2_main.c @@ -9,28 +9,28 @@ API_CALLABLE(N(SpawnSunEffect)) { EvtScript N(EVS_ExitWalk_flo_03_1) = EVT_EXIT_WALK(60, flo_22_ENTRY_0, "flo_03", flo_03_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_03_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_03_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_EXEC(N(EVS_SetupWell)) - EVT_CALL(GetEntryID, LVar0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC(N(EVS_SniffleHint)) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Exec(N(EVS_SetupFoliage)) + Exec(N(EVS_SetupWell)) + Call(GetEntryID, LVar0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Exec(N(EVS_SniffleHint)) + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Return + End }; diff --git a/src/world/area_flo/flo_22/flo_22_3_npc.c b/src/world/area_flo/flo_22/flo_22_3_npc.c index 44c894b0bd6..d3e022cd595 100644 --- a/src/world/area_flo/flo_22/flo_22_3_npc.c +++ b/src/world/area_flo/flo_22/flo_22_3_npc.c @@ -6,102 +6,102 @@ #include "world/common/enemy/CrazyDayzee.h" EvtScript N(EVS_NpcIdle_Bzzap) = { - EVT_SET(MV_Bzzap_State, 0) - EVT_LOOP(0) - EVT_SWITCH(MV_Bzzap_State) - EVT_CASE_EQ(0) - EVT_CASE_EQ(1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_FallBack) - EVT_SET(MV_Bzzap_State, 0) - EVT_CALL(StartBattle) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(MV_Bzzap_State, 0) + Loop(0) + Switch(MV_Bzzap_State) + CaseEq(0) + CaseEq(1) + Call(SetPlayerAnimation, ANIM_Mario1_FallBack) + Set(MV_Bzzap_State, 0) + Call(StartBattle) + EndSwitch + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcDefeat_Bzzap) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_THREAD - EVT_WAIT(25) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) - EVT_END_THREAD - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Bzzap_Anim01) - EVT_CALL(SetNpcPos, NPC_SELF, 30, 60, 0) - EVT_WAIT(10) - EVT_CALL(SetNpcJumpscale, NPC_SELF, 0) - EVT_CALL(NpcJump0, NPC_SELF, 30, 0, 0, 15) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Thread + Wait(25) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) + EndThread + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_LOST) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + CaseEq(OUTCOME_PLAYER_FLED) + Call(SetNpcAnimation, NPC_SELF, ANIM_Bzzap_Anim01) + Call(SetNpcPos, NPC_SELF, 30, 60, 0) + Wait(10) + Call(SetNpcJumpscale, NPC_SELF, 0) + Call(NpcJump0, NPC_SELF, 30, 0, 0, 15) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Bzzap) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Bzzap))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Bzzap))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Bzzap))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Bzzap))) + Return + End }; EvtScript N(EVS_NpcIdle_Dayzee) = { - EVT_SET(MV_Dayzee_State, 0) - EVT_LOOP(0) - EVT_SWITCH(MV_Dayzee_State) - EVT_CASE_EQ(0) - EVT_CASE_EQ(1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_FallBack) - EVT_SET(MV_Dayzee_State, 0) - EVT_CALL(StartBattle) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(MV_Dayzee_State, 0) + Loop(0) + Switch(MV_Dayzee_State) + CaseEq(0) + CaseEq(1) + Call(SetPlayerAnimation, ANIM_Mario1_FallBack) + Set(MV_Dayzee_State, 0) + Call(StartBattle) + EndSwitch + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcDefeat_Dayzee) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_THREAD - EVT_WAIT(25) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) - EVT_END_THREAD - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Dayzee_Anim01) - EVT_WAIT(10) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.0)) - EVT_CALL(NpcJump0, NPC_SELF, 30, 0, 0, 15) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Dayzee_Anim01) - EVT_WAIT(10) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.0)) - EVT_CALL(NpcJump0, NPC_SELF, 30, 0, 0, 15) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Thread + Wait(25) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) + EndThread + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_LOST) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + CaseEq(OUTCOME_ENEMY_FLED) + Call(SetNpcAnimation, NPC_SELF, ANIM_Dayzee_Anim01) + Wait(10) + Call(SetNpcJumpscale, NPC_SELF, Float(2.0)) + Call(NpcJump0, NPC_SELF, 30, 0, 0, 15) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + CaseEq(OUTCOME_PLAYER_FLED) + Call(SetNpcAnimation, NPC_SELF, ANIM_Dayzee_Anim01) + Wait(10) + Call(SetNpcJumpscale, NPC_SELF, Float(2.0)) + Call(NpcJump0, NPC_SELF, 30, 0, 0, 15) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Dayzee) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Dayzee))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Dayzee))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Dayzee))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Dayzee))) + Return + End }; NpcData N(NpcData_Bzzap) = { diff --git a/src/world/area_flo/flo_22/flo_22_4_well.c b/src/world/area_flo/flo_22/flo_22_4_well.c index e263b6e9010..477eee2ee3a 100644 --- a/src/world/area_flo/flo_22/flo_22_4_well.c +++ b/src/world/area_flo/flo_22/flo_22_4_well.c @@ -14,122 +14,122 @@ s32 N(BerryList)[] = { }; EvtScript N(EVS_SniffleHint) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(20) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH6_00DB, 300, 120) - EVT_WAIT(10) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Wait(20) + Call(ShowMessageAtScreenPos, MSG_CH6_00DB, 300, 120) + Wait(10) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_TossItemIntoWell) = { - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_Toss) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_SET(LVar6, 35) - EVT_SET(LVar5, 5) - EVT_CALL(MakeItemEntity, LVar8, LVar2, LVar6, 0, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVar7, LVar0) - EVT_CALL(MakeLerp, LVar2, 35, 20, EASING_CUBIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetItemPos, LVar7, LVar0, LVar6, 0) - EVT_ADD(LVar6, LVar5) - EVT_ADD(LVar5, -1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(RemoveItemEntity, LVar7) - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(PlaySoundAt, SOUND_FALL_LONG, SOUND_SPACE_DEFAULT, 35, 0, 0) - EVT_WAIT(5) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(10) - EVT_RETURN - EVT_END + Call(SetPlayerAnimation, ANIM_MarioW1_Toss) + Thread + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Set(LVar6, 35) + Set(LVar5, 5) + Call(MakeItemEntity, LVar8, LVar2, LVar6, 0, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVar7, LVar0) + Call(MakeLerp, LVar2, 35, 20, EASING_CUBIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(SetItemPos, LVar7, LVar0, LVar6, 0) + Add(LVar6, LVar5) + Add(LVar5, -1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(RemoveItemEntity, LVar7) + EndThread + Wait(10) + Call(PlaySoundAt, SOUND_FALL_LONG, SOUND_SPACE_DEFAULT, 35, 0, 0) + Wait(5) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(10) + Return + End }; EvtScript N(EVS_OnInteract_Well) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(ShowConsumableChoicePopup) - EVT_CALL(CloseChoicePopup) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar8, LVar0) - EVT_SWITCH(LVar8) - EVT_CASE_LE(-1) - EVT_CASE_LE(ITEM_NONE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_Well, 160, 40) - EVT_CASE_EQ(ITEM_BLUE_BERRY) - EVT_EXEC_WAIT(N(EVS_TossItemIntoWell)) - EVT_CALL(RemoveItemAt, LVar1) - EVT_IF_EQ(GF_FLO22_ThrewBlueBerryDownWell, FALSE) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_00DD, 35, 35, 0) - EVT_SET(GF_FLO22_ThrewBlueBerryDownWell, TRUE) - EVT_CALL(MakeItemEntity, ITEM_FLOWER_SAVER_B, -35, 0, 0, ITEM_SPAWN_MODE_KEY, GF_FLO22_Item_FlowerSaverB) - EVT_SET(LVar7, LVar0) - EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_HAS_SHADOW, FALSE) - EVT_CALL(SetNpcPos, NPC_Dummy, 35, 0, 0) - EVT_CALL(SetNpcJumpscale, NPC_Dummy, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_CALL(NpcJump0, NPC_Dummy, -53, 0, 0, 25) - EVT_CALL(NpcJump0, NPC_Dummy, -73, 0, 0, 15) - EVT_CALL(NpcJump0, NPC_Dummy, -83, 0, 0, 8) - EVT_END_THREAD - EVT_LOOP(53) - EVT_CALL(GetNpcPos, NPC_Dummy, LVar1, LVar2, LVar3) - EVT_CALL(SetItemPos, LVar7, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_Dummy, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_HAS_SHADOW, TRUE) - EVT_ELSE - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_00DE, 35, 35, 0) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(N(EVS_TossItemIntoWell)) - EVT_CALL(RemoveItemAt, LVar1) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_00DC, 35, 35, 0) - EVT_CALL(RandInt, 1, LVar1) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(SetNpcJumpscale, NPC_Bzzap, EVT_FLOAT(0.0)) - EVT_CALL(NpcFacePlayer, NPC_Bzzap, 0) - EVT_WAIT(1) - EVT_CALL(SetNpcPos, NPC_Bzzap, 30, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_Bzzap, ANIM_Bzzap_Anim01) - EVT_CALL(NpcJump0, NPC_Bzzap, 30, 60, 0, 20) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Bzzap, ANIM_Bzzap_Anim04) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(NpcJump0, NPC_Bzzap, LVar0, LVar1, LVar2, 5) - EVT_SET(MV_Bzzap_State, 1) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_Dayzee, 30, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_Dayzee, ANIM_Dayzee_Anim0E) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(SetNpcJumpscale, NPC_Dayzee, EVT_FLOAT(2.0)) - EVT_CALL(NpcJump0, NPC_Dayzee, LVar0, LVar1, LVar2, 20) - EVT_SET(MV_Dayzee_State, 1) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerInput, FALSE) + Call(ShowConsumableChoicePopup) + Call(CloseChoicePopup) + Call(DisablePlayerInput, TRUE) + Set(LVar8, LVar0) + Switch(LVar8) + CaseLe(-1) + CaseLe(ITEM_NONE) + Call(ShowMessageAtScreenPos, MSG_Menus_Inspect_Well, 160, 40) + CaseEq(ITEM_BLUE_BERRY) + ExecWait(N(EVS_TossItemIntoWell)) + Call(RemoveItemAt, LVar1) + IfEq(GF_FLO22_ThrewBlueBerryDownWell, FALSE) + Call(ShowMessageAtWorldPos, MSG_CH6_00DD, 35, 35, 0) + Set(GF_FLO22_ThrewBlueBerryDownWell, TRUE) + Call(MakeItemEntity, ITEM_FLOWER_SAVER_B, -35, 0, 0, ITEM_SPAWN_MODE_KEY, GF_FLO22_Item_FlowerSaverB) + Set(LVar7, LVar0) + Call(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_INVISIBLE, TRUE) + Call(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_HAS_SHADOW, FALSE) + Call(SetNpcPos, NPC_Dummy, 35, 0, 0) + Call(SetNpcJumpscale, NPC_Dummy, Float(1.0)) + Thread + Call(NpcJump0, NPC_Dummy, -53, 0, 0, 25) + Call(NpcJump0, NPC_Dummy, -73, 0, 0, 15) + Call(NpcJump0, NPC_Dummy, -83, 0, 0, 8) + EndThread + Loop(53) + Call(GetNpcPos, NPC_Dummy, LVar1, LVar2, LVar3) + Call(SetItemPos, LVar7, LVar1, LVar2, LVar3) + Wait(1) + EndLoop + Call(SetNpcPos, NPC_Dummy, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_INVISIBLE, FALSE) + Call(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_HAS_SHADOW, TRUE) + Else + Call(ShowMessageAtWorldPos, MSG_CH6_00DE, 35, 35, 0) + EndIf + CaseDefault + ExecWait(N(EVS_TossItemIntoWell)) + Call(RemoveItemAt, LVar1) + Call(ShowMessageAtWorldPos, MSG_CH6_00DC, 35, 35, 0) + Call(RandInt, 1, LVar1) + IfEq(LVar1, 0) + Call(SetNpcJumpscale, NPC_Bzzap, Float(0.0)) + Call(NpcFacePlayer, NPC_Bzzap, 0) + Wait(1) + Call(SetNpcPos, NPC_Bzzap, 30, 0, 0) + Call(SetNpcAnimation, NPC_Bzzap, ANIM_Bzzap_Anim01) + Call(NpcJump0, NPC_Bzzap, 30, 60, 0, 20) + Wait(10) + Call(SetNpcAnimation, NPC_Bzzap, ANIM_Bzzap_Anim04) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(NpcJump0, NPC_Bzzap, LVar0, LVar1, LVar2, 5) + Set(MV_Bzzap_State, 1) + Else + Call(SetNpcPos, NPC_Dayzee, 30, 0, 0) + Call(SetNpcAnimation, NPC_Dayzee, ANIM_Dayzee_Anim0E) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(SetNpcJumpscale, NPC_Dayzee, Float(2.0)) + Call(NpcJump0, NPC_Dayzee, LVar0, LVar1, LVar2, 20) + Set(MV_Dayzee_State, 1) + EndIf + EndSwitch + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SetupWell) = { - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_OnInteract_Well)), TRIGGER_WALL_PRESS_A, COLLIDER_o5, EVT_PTR(N(BerryList)), 0, 1) - EVT_IF_EQ(GF_FLO22_ThrewBlueBerryDownWell, TRUE) - EVT_CALL(MakeItemEntity, ITEM_FLOWER_SAVER_B, -83, 0, 0, ITEM_SPAWN_MODE_KEY, GF_FLO22_Item_FlowerSaverB) - EVT_END_IF - EVT_RETURN - EVT_END + BindPadlock(Ref(N(EVS_OnInteract_Well)), TRIGGER_WALL_PRESS_A, COLLIDER_o5, Ref(N(BerryList)), 0, 1) + IfEq(GF_FLO22_ThrewBlueBerryDownWell, TRUE) + Call(MakeItemEntity, ITEM_FLOWER_SAVER_B, -83, 0, 0, ITEM_SPAWN_MODE_KEY, GF_FLO22_Item_FlowerSaverB) + EndIf + Return + End }; diff --git a/src/world/area_flo/flo_22/flo_22_5_foliage.c b/src/world/area_flo/flo_22/flo_22_5_foliage.c index c5ad3bc2df3..5aab6d36941 100644 --- a/src/world/area_flo/flo_22/flo_22_5_foliage.c +++ b/src/world/area_flo/flo_22/flo_22_5_foliage.c @@ -25,12 +25,12 @@ BombTrigger N(BombPos_Tree2) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o27, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o30, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o27, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o30, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Return + End }; diff --git a/src/world/area_flo/flo_23/flo_23_1_music.c b/src/world/area_flo/flo_23/flo_23_1_music.c index a05c85f393b..1d6e4322b52 100644 --- a/src/world/area_flo/flo_23/flo_23_1_music.c +++ b/src/world/area_flo/flo_23/flo_23_1_music.c @@ -1,12 +1,12 @@ #include "flo_23.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_flo/flo_23/flo_23_2_main.c b/src/world/area_flo/flo_23/flo_23_2_main.c index b42c9d62944..68914fc2882 100644 --- a/src/world/area_flo/flo_23/flo_23_2_main.c +++ b/src/world/area_flo/flo_23/flo_23_2_main.c @@ -12,28 +12,28 @@ EvtScript N(EVS_ExitWalk_flo_00_2) = EVT_EXIT_WALK(60, flo_23_ENTRY_0, "flo_00", EvtScript N(EVS_ExitWalk_flo_11_0) = EVT_EXIT_WALK(60, flo_23_ENTRY_1, "flo_11", flo_11_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_11_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_00_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_11_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_flo_00_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) EVT_FLOWER_SPAWN_REGION( -290, -190, 480, -90, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Return + End }; diff --git a/src/world/area_flo/flo_23/flo_23_3_npc.c b/src/world/area_flo/flo_23/flo_23_3_npc.c index 757cdca6ad9..23747b68290 100644 --- a/src/world/area_flo/flo_23/flo_23_3_npc.c +++ b/src/world/area_flo/flo_23/flo_23_3_npc.c @@ -11,151 +11,151 @@ BSS s32 N(FlowerGuard_ItemChoiceList)[ITEM_NUM_CONSUMABLES + 1]; #include "../common/ItemChoice_FlowerGuard.inc.c" EvtScript N(EVS_NpcInteract_GateFlower) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_EQ(GF_FLO23_GaveBlueBerry, FALSE) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.5), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_Talk, ANIM_GateFlower_Blue_Idle, 0, MSG_CH6_0049) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Thinking) - EVT_CALL(N(FlowerGuard_MakeItemList)) + Call(DisablePlayerInput, TRUE) + IfEq(GF_FLO23_GaveBlueBerry, FALSE) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(SetCamPitch, CAM_DEFAULT, Float(18.5), Float(-7.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_Talk, ANIM_GateFlower_Blue_Idle, 0, MSG_CH6_0049) + Call(SetPlayerAnimation, ANIM_Mario1_Thinking) + Call(N(FlowerGuard_MakeItemList)) EVT_CHOOSE_CONSUMABLE_FROM(N(FlowerGuard_ItemChoiceList), 2) - EVT_SWITCH(LVar0) - EVT_CASE_LE(0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Still) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_Talk, ANIM_GateFlower_Blue_Idle, 0, MSG_CH6_004A) - EVT_CASE_DEFAULT - EVT_SET(LVar8, LVar0) - EVT_CALL(N(FlowerGuard_JudgeItemTastiness), LVar0) - EVT_CALL(MakeItemEntity, LVar8, 385, 20, -34, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVar7, LVar0) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_EAT_OR_DRINK, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_Eat) - EVT_WAIT(20 * DT) - EVT_CALL(RemoveItemEntity, LVar7) - EVT_SWITCH(LVar8) - EVT_CASE_EQ(158) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_Chew, ANIM_GateFlower_Blue_Idle, 0, MSG_CH6_004D) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_APPROVE, SOUND_SPACE_DEFAULT) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_GateFlower_Blue_HappyTalk, ANIM_GateFlower_Blue_HappyIdle, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_OpenGate) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o95, SOUND_METAL_GATE_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o95, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(MakeLerp, 0, 100, 30, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar8, LVar0) - EVT_SETF(LVar9, LVar0) - EVT_MULF(LVar8, EVT_FLOAT(0.5)) - EVT_MULF(LVar9, EVT_FLOAT(1.2)) - EVT_CALL(RotateModel, MODEL_o86, LVar8, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o87, LVar8, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o88, LVar8, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o83, LVar9, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o84, LVar9, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o85, LVar9, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_HappyDance) - EVT_SET(GF_FLO23_GaveBlueBerry, TRUE) - EVT_CASE_EQ(159) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_Chew, ANIM_GateFlower_Blue_Idle, 0, MSG_CH6_004C) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_Idle) - EVT_CASE_EQ(160) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_Chew, ANIM_GateFlower_Blue_Idle, 0, MSG_CH6_004C) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_Idle) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_Chew, ANIM_GateFlower_Blue_Idle, 0, MSG_CH6_004B) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_Disgust) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SPIT_OUT, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeItemEntity, LVar8, 375, 20, 0, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVar7, LVar0) - EVT_WAIT(5 * DT) - EVT_CALL(GetAngleToPlayer, NPC_SELF, LVar0) - EVT_IF_LT(LVar0, 180) - EVT_CALL(MakeLerp, 0, 100, 7, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, EVT_FLOAT(-0.5)) - EVT_SETF(LVar3, EVT_FLOAT(-0.2)) - EVT_SETF(LVar4, EVT_FLOAT(0.9)) - EVT_MULF(LVar2, LVar0) - EVT_MULF(LVar3, LVar0) - EVT_MULF(LVar4, LVar0) - EVT_ADDF(LVar2, EVT_FLOAT(380.0)) - EVT_ADDF(LVar3, EVT_FLOAT(15.0)) - EVT_ADDF(LVar4, EVT_FLOAT(-30.0)) - EVT_CALL(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_ELSE - EVT_CALL(MakeLerp, 0, 100, 7, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, EVT_FLOAT(0.5)) - EVT_SETF(LVar3, EVT_FLOAT(-0.2)) - EVT_SETF(LVar4, EVT_FLOAT(1.0)) - EVT_MULF(LVar2, LVar0) - EVT_MULF(LVar3, LVar0) - EVT_MULF(LVar4, LVar0) - EVT_ADDF(LVar2, EVT_FLOAT(390.0)) - EVT_ADDF(LVar3, EVT_FLOAT(15.0)) - EVT_ADDF(LVar4, EVT_FLOAT(-30.0)) - EVT_CALL(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_Idle) - EVT_CALL(RemoveItemEntity, LVar7) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_Idle) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_GateFlower_Blue_Talk, ANIM_GateFlower_Blue_Idle, 0) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_THREAD - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(6.0 / DT)) - EVT_END_THREAD - EVT_WAIT(10 * DT) - EVT_ELSE - EVT_IF_LT(GB_StoryProgress, STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_HappyTalk, ANIM_GateFlower_Blue_HappyIdle, 0, MSG_CH6_004E) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_HappyTalk, ANIM_GateFlower_Blue_HappyIdle, 0, MSG_CH6_004F) - EVT_END_IF - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END + Switch(LVar0) + CaseLe(0) + Call(SetPlayerAnimation, ANIM_Mario1_Still) + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_Talk, ANIM_GateFlower_Blue_Idle, 0, MSG_CH6_004A) + CaseDefault + Set(LVar8, LVar0) + Call(N(FlowerGuard_JudgeItemTastiness), LVar0) + Call(MakeItemEntity, LVar8, 385, 20, -34, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVar7, LVar0) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_EAT_OR_DRINK, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_Eat) + Wait(20 * DT) + Call(RemoveItemEntity, LVar7) + Switch(LVar8) + CaseEq(158) + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_Chew, ANIM_GateFlower_Blue_Idle, 0, MSG_CH6_004D) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_APPROVE, SOUND_SPACE_DEFAULT) + Call(EndSpeech, NPC_SELF, ANIM_GateFlower_Blue_HappyTalk, ANIM_GateFlower_Blue_HappyIdle, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_OpenGate) + Call(PlaySoundAtCollider, COLLIDER_o95, SOUND_METAL_GATE_OPEN, SOUND_SPACE_DEFAULT) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o95, COLLIDER_FLAGS_UPPER_MASK) + Call(MakeLerp, 0, 100, 30, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + SetF(LVar8, LVar0) + SetF(LVar9, LVar0) + MulF(LVar8, Float(0.5)) + MulF(LVar9, Float(1.2)) + Call(RotateModel, MODEL_o86, LVar8, 0, -1, 0) + Call(RotateModel, MODEL_o87, LVar8, 0, -1, 0) + Call(RotateModel, MODEL_o88, LVar8, 0, -1, 0) + Call(RotateModel, MODEL_o83, LVar9, 0, 1, 0) + Call(RotateModel, MODEL_o84, LVar9, 0, 1, 0) + Call(RotateModel, MODEL_o85, LVar9, 0, 1, 0) + Wait(1) + IfNe(LVar1, 1) + BreakLoop + EndIf + EndLoop + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_HappyDance) + Set(GF_FLO23_GaveBlueBerry, TRUE) + CaseEq(159) + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_Chew, ANIM_GateFlower_Blue_Idle, 0, MSG_CH6_004C) + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_Idle) + CaseEq(160) + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_Chew, ANIM_GateFlower_Blue_Idle, 0, MSG_CH6_004C) + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_Idle) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_Chew, ANIM_GateFlower_Blue_Idle, 0, MSG_CH6_004B) + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_Disgust) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SPIT_OUT, SOUND_SPACE_DEFAULT) + Call(MakeItemEntity, LVar8, 375, 20, 0, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVar7, LVar0) + Wait(5 * DT) + Call(GetAngleToPlayer, NPC_SELF, LVar0) + IfLt(LVar0, 180) + Call(MakeLerp, 0, 100, 7, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, Float(-0.5)) + SetF(LVar3, Float(-0.2)) + SetF(LVar4, Float(0.9)) + MulF(LVar2, LVar0) + MulF(LVar3, LVar0) + MulF(LVar4, LVar0) + AddF(LVar2, Float(380.0)) + AddF(LVar3, Float(15.0)) + AddF(LVar4, Float(-30.0)) + Call(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4) + Wait(1) + IfNe(LVar1, 1) + BreakLoop + EndIf + EndLoop + Else + Call(MakeLerp, 0, 100, 7, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, Float(0.5)) + SetF(LVar3, Float(-0.2)) + SetF(LVar4, Float(1.0)) + MulF(LVar2, LVar0) + MulF(LVar3, LVar0) + MulF(LVar4, LVar0) + AddF(LVar2, Float(390.0)) + AddF(LVar3, Float(15.0)) + AddF(LVar4, Float(-30.0)) + Call(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4) + Wait(1) + IfNe(LVar1, 1) + BreakLoop + EndIf + EndLoop + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_Idle) + Call(RemoveItemEntity, LVar7) + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_Idle) + Call(EndSpeech, NPC_SELF, ANIM_GateFlower_Blue_Talk, ANIM_GateFlower_Blue_Idle, 0) + EndSwitch + EndSwitch + Thread + Call(ResetCam, CAM_DEFAULT, Float(6.0 / DT)) + EndThread + Wait(10 * DT) + Else + IfLt(GB_StoryProgress, STORY_CH6_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_HappyTalk, ANIM_GateFlower_Blue_HappyIdle, 0, MSG_CH6_004E) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Blue_HappyTalk, ANIM_GateFlower_Blue_HappyIdle, 0, MSG_CH6_004F) + EndIf + EndIf + Call(DisablePlayerInput, FALSE) + Unbind + Return + End }; EvtScript N(EVS_NpcInit_GateFlower) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_GateFlower))) - EVT_IF_EQ(GF_FLO23_GaveBlueBerry, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_HappyDance) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o95, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(RotateModel, MODEL_o86, 50, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o87, 50, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o88, 50, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o83, 120, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o84, 120, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o85, 120, 0, 1, 0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_GateFlower))) + IfEq(GF_FLO23_GaveBlueBerry, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Blue_HappyDance) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o95, COLLIDER_FLAGS_UPPER_MASK) + Call(RotateModel, MODEL_o86, 50, 0, -1, 0) + Call(RotateModel, MODEL_o87, 50, 0, -1, 0) + Call(RotateModel, MODEL_o88, 50, 0, -1, 0) + Call(RotateModel, MODEL_o83, 120, 0, 1, 0) + Call(RotateModel, MODEL_o84, 120, 0, 1, 0) + Call(RotateModel, MODEL_o85, 120, 0, 1, 0) + EndIf + Return + End }; NpcData N(NpcData_GateFlower) = { diff --git a/src/world/area_flo/flo_23/flo_23_4_entity.c b/src/world/area_flo/flo_23/flo_23_4_entity.c index 1d74bca534b..b74f11efe55 100644 --- a/src/world/area_flo/flo_23/flo_23_4_entity.c +++ b/src/world/area_flo/flo_23/flo_23_4_entity.c @@ -2,12 +2,12 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 100, 60, 5, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 100, 145, 0, 0, ITEM_SHOOTING_STAR, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_FLO23_HiddenItem_ShootingStar) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 25, 60, 0, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_FLO23_HiddenItem_Coin) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SimpleSpring), -50, 0, 0, 90, 60, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_BrickBlock), 100, 60, 5, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 100, 145, 0, 0, ITEM_SHOOTING_STAR, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_FLO23_HiddenItem_ShootingStar) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 25, 60, 0, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_FLO23_HiddenItem_Coin) + Call(MakeEntity, Ref(Entity_SimpleSpring), -50, 0, 0, 90, 60, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_flo/flo_24/flo_24_1_music.c b/src/world/area_flo/flo_24/flo_24_1_music.c index 84a87e816c5..9f5dca0e254 100644 --- a/src/world/area_flo/flo_24/flo_24_1_music.c +++ b/src/world/area_flo/flo_24/flo_24_1_music.c @@ -1,14 +1,14 @@ #include "flo_24.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER) - EVT_CALL(PlaySound, SOUND_LOOP_FLO_WATER_FLOW_2) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + Else + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndIf + IfGe(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER) + Call(PlaySound, SOUND_LOOP_FLO_WATER_FLOW_2) + EndIf + Return + End }; diff --git a/src/world/area_flo/flo_24/flo_24_2_main.c b/src/world/area_flo/flo_24/flo_24_2_main.c index bac4f1e901e..702ad498a10 100644 --- a/src/world/area_flo/flo_24/flo_24_2_main.c +++ b/src/world/area_flo/flo_24/flo_24_2_main.c @@ -12,45 +12,45 @@ EvtScript N(EVS_ExitWalk_flo_08_1) = EVT_EXIT_WALK(60, flo_24_ENTRY_0, "flo_08", EvtScript N(EVS_ExitWalk_flo_10_0) = EVT_EXIT_WALK(60, flo_24_ENTRY_1, "flo_10", flo_10_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_08_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_10_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_08_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_flo_10_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(MakeTransformGroup, MODEL_g58) - EVT_CALL(MakeTransformGroup, MODEL_g73) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_EXEC(N(EVS_SetupWater)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o177, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o178, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o179, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o177, COLLIDER_FLAG_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o178, COLLIDER_FLAG_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o179, COLLIDER_FLAG_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o176, SURFACE_TYPE_WATER) + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + ExecWait(N(EVS_MakeEntities)) + Call(MakeTransformGroup, MODEL_g58) + Call(MakeTransformGroup, MODEL_g73) + Exec(N(EVS_SetupFoliage)) + Exec(N(EVS_SetupWater)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o177, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o178, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o179, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o177, COLLIDER_FLAG_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o178, COLLIDER_FLAG_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o179, COLLIDER_FLAG_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o176, SURFACE_TYPE_WATER) EVT_FLOWER_SPAWN_REGION( -480, -350, -65, -260, 0) EVT_FLOWER_SPAWN_REGION( 100, -350, 480, -260, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, flo_24_ENTRY_2) - EVT_EXEC(N(EVS_Scene_FillWithWater)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Call(GetEntryID, LVar0) + IfEq(LVar0, flo_24_ENTRY_2) + Exec(N(EVS_Scene_FillWithWater)) + Exec(N(EVS_BindExitTriggers)) + Else + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndIf + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Return + End }; diff --git a/src/world/area_flo/flo_24/flo_24_3_foliage.c b/src/world/area_flo/flo_24/flo_24_3_foliage.c index 16ed4483ee8..0bd9750165f 100644 --- a/src/world/area_flo/flo_24/flo_24_3_foliage.c +++ b/src/world/area_flo/flo_24/flo_24_3_foliage.c @@ -35,11 +35,11 @@ BombTrigger N(BombPos_Tree1) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(AF_FLO_TreeDrop_BubbleBerry1, FALSE) - EVT_SET(AF_FLO_TreeDrop_BubbleBerry2, FALSE) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o124, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_RETURN - EVT_END + Set(AF_FLO_TreeDrop_BubbleBerry1, FALSE) + Set(AF_FLO_TreeDrop_BubbleBerry2, FALSE) + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o124, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Return + End }; diff --git a/src/world/area_flo/flo_24/flo_24_4_water.c b/src/world/area_flo/flo_24/flo_24_4_water.c index e44b01c6538..42894671ba8 100644 --- a/src/world/area_flo/flo_24/flo_24_4_water.c +++ b/src/world/area_flo/flo_24/flo_24_4_water.c @@ -3,111 +3,111 @@ #include "world/common/atomic/TexturePan.inc.c" EvtScript N(EVS_Scene_FillWithWater) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(TranslateGroup, MODEL_g73, 0, 45, 0) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 170, 0, 160) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 170, -90, 160) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 800) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.5), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-300.0), EVT_FLOAT(200.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(300.0), EVT_FLOAT(-150.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(PlaySound, SOUND_LOOP_FLO_FILL_WATER_POOL) + Call(DisablePlayerInput, TRUE) + Call(TranslateGroup, MODEL_g73, 0, 45, 0) + Call(UseSettingsFrom, CAM_DEFAULT, 170, 0, 160) + Call(SetPanTarget, CAM_DEFAULT, 170, -90, 160) + Call(SetCamDistance, CAM_DEFAULT, 800) + Call(SetCamPitch, CAM_DEFAULT, Float(18.5), Float(-7.5)) + Call(SetCamPosA, CAM_DEFAULT, Float(-300.0), Float(200.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(300.0), Float(-150.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(PlaySound, SOUND_LOOP_FLO_FILL_WATER_POOL) //@bug thread is never terminated - EVT_THREAD - EVT_CALL(MakeLerp, 80, 90, 10, EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o219, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o220, LVar0, 1, 0, 0) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF + Thread + Call(MakeLerp, 80, 90, 10, EASING_LINEAR) + Label(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o219, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o220, LVar0, 1, 0, 0) + IfEq(LVar1, 1) + Wait(1) + Goto(0) + EndIf // should end thread here //@bug thread is never terminated - EVT_THREAD - EVT_CALL(MakeLerp, 45, 100, 150, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g73, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP + Thread + Call(MakeLerp, 45, 100, 150, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g73, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop // should end thread here - EVT_WAIT(30) - EVT_SET(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER) - EVT_CALL(GotoMap, EVT_PTR("flo_10"), flo_10_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Wait(30) + Set(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER) + Call(GotoMap, Ref("flo_10"), flo_10_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_SetupWater) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER) - EVT_CALL(EnableGroup, MODEL_water1, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g58, COLLIDER_FLAGS_UPPER_MASK) - EVT_ELSE - EVT_CALL(EnableGroup, MODEL_g60, FALSE) - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, flo_24_ENTRY_2) - EVT_CALL(EnableGroup, MODEL_g67, FALSE) - EVT_END_IF - EVT_CALL(EnableTexPanning, MODEL_o165, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o215, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o166, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o216, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o189, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o192, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o219, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o220, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o218, TRUE) - EVT_THREAD + IfLt(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER) + Call(EnableGroup, MODEL_water1, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g58, COLLIDER_FLAGS_UPPER_MASK) + Else + Call(EnableGroup, MODEL_g60, FALSE) + EndIf + Call(GetEntryID, LVar0) + IfNe(LVar0, flo_24_ENTRY_2) + Call(EnableGroup, MODEL_g67, FALSE) + EndIf + Call(EnableTexPanning, MODEL_o165, TRUE) + Call(EnableTexPanning, MODEL_o215, TRUE) + Call(EnableTexPanning, MODEL_o166, TRUE) + Call(EnableTexPanning, MODEL_o216, TRUE) + Call(EnableTexPanning, MODEL_o189, TRUE) + Call(EnableTexPanning, MODEL_o192, TRUE) + Call(EnableTexPanning, MODEL_o219, TRUE) + Call(EnableTexPanning, MODEL_o220, TRUE) + Call(EnableTexPanning, MODEL_o218, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 140, -80, -70, 100) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( -70, 100, 100, -40) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_3) TEX_PAN_PARAMS_STEP( 0, -800, 0, 0) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_4) TEX_PAN_PARAMS_STEP( 0, -800, -200, 100) TEX_PAN_PARAMS_FREQ( 0, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_5) TEX_PAN_PARAMS_STEP( 0,-2500, 0, 0) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_6) TEX_PAN_PARAMS_STEP( 0,-2500, -200, 100) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; diff --git a/src/world/area_flo/flo_24/flo_24_5_entity.c b/src/world/area_flo/flo_24/flo_24_5_entity.c index 99e66a5ecb6..5b894d43021 100644 --- a/src/world/area_flo/flo_24/flo_24_5_entity.c +++ b/src/world/area_flo/flo_24/flo_24_5_entity.c @@ -2,12 +2,12 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -325, 60, -140, 0, ITEM_DIZZY_DIAL, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_FLO24_ItemBlock_DizzyDial) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 325, 60, -140, 0, ITEM_MAPLE_SYRUP, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_FLO24_HiddenItem_MapleSyrup) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 335, 0, -160, 0, MODEL_o136, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_FLO24_HiddenPanel) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_YellowBlock), -325, 60, -140, 0, ITEM_DIZZY_DIAL, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_FLO24_ItemBlock_DizzyDial) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 325, 60, -140, 0, ITEM_MAPLE_SYRUP, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_FLO24_HiddenItem_MapleSyrup) + Call(MakeEntity, Ref(Entity_HiddenPanel), 335, 0, -160, 0, MODEL_o136, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_FLO24_HiddenPanel) + Return + End }; diff --git a/src/world/area_flo/flo_25/flo_25_1_music.c b/src/world/area_flo/flo_25/flo_25_1_music.c index f17d9a94fdb..d15877264ae 100644 --- a/src/world/area_flo/flo_25/flo_25_1_music.c +++ b/src/world/area_flo/flo_25/flo_25_1_music.c @@ -1,12 +1,12 @@ #include "flo_25.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_flo/flo_25/flo_25_2_main.c b/src/world/area_flo/flo_25/flo_25_2_main.c index 92ab7a113a0..9f06c688925 100644 --- a/src/world/area_flo/flo_25/flo_25_2_main.c +++ b/src/world/area_flo/flo_25/flo_25_2_main.c @@ -12,30 +12,30 @@ EvtScript N(EVS_ExitWalk_flo_00_3) = EVT_EXIT_WALK(60, flo_25_ENTRY_0, "flo_00", EvtScript N(EVS_ExitWalk_flo_07_0) = EVT_EXIT_WALK(60, flo_25_ENTRY_1, "flo_07", flo_07_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_07_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_00_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_07_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_flo_00_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupVines)) - EVT_EXEC(N(EVS_SetupFoliage)) + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupVines)) + Exec(N(EVS_SetupFoliage)) EVT_FLOWER_SPAWN_REGION( -270, -190, 640, -60, 60) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Return + End }; diff --git a/src/world/area_flo/flo_25/flo_25_3_npc.c b/src/world/area_flo/flo_25/flo_25_3_npc.c index 0a02f163b0e..177f7e60ad3 100644 --- a/src/world/area_flo/flo_25/flo_25_3_npc.c +++ b/src/world/area_flo/flo_25/flo_25_3_npc.c @@ -11,151 +11,151 @@ BSS s32 N(FlowerGuard_ItemChoiceList)[ITEM_NUM_CONSUMABLES + 1]; #include "../common/ItemChoice_FlowerGuard.inc.c" EvtScript N(EVS_NpcInteract_GateFlower) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_EQ(GF_FLO25_GaveRedBerry, FALSE) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.5), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_Talk, ANIM_GateFlower_Red_Idle, 0, MSG_CH6_003B) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Thinking) - EVT_CALL(N(FlowerGuard_MakeItemList)) + Call(DisablePlayerInput, TRUE) + IfEq(GF_FLO25_GaveRedBerry, FALSE) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(SetCamPitch, CAM_DEFAULT, Float(18.5), Float(-7.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_Talk, ANIM_GateFlower_Red_Idle, 0, MSG_CH6_003B) + Call(SetPlayerAnimation, ANIM_Mario1_Thinking) + Call(N(FlowerGuard_MakeItemList)) EVT_CHOOSE_CONSUMABLE_FROM(N(FlowerGuard_ItemChoiceList), 0) - EVT_SWITCH(LVar0) - EVT_CASE_LE(0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Still) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_Talk, ANIM_GateFlower_Red_Idle, 0, MSG_CH6_003C) - EVT_CASE_DEFAULT - EVT_SET(LVar8, LVar0) - EVT_CALL(N(FlowerGuard_JudgeItemTastiness), LVar0) - EVT_CALL(MakeItemEntity, LVar8, 505, 20, -24, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVar7, LVar0) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_EAT_OR_DRINK, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_Eat) - EVT_WAIT(20 * DT) - EVT_CALL(RemoveItemEntity, LVar7) - EVT_SWITCH(LVar8) - EVT_CASE_EQ(159) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_Chew, ANIM_GateFlower_Red_Idle, 0, MSG_CH6_003F) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_APPROVE, SOUND_SPACE_DEFAULT) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_GateFlower_Red_HappyTalk, ANIM_GateFlower_Red_HappyIdle, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_OpenGate) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o94, SOUND_METAL_GATE_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o94, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(MakeLerp, 0, 100, 30, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar8, LVar0) - EVT_SETF(LVar9, LVar0) - EVT_MULF(LVar8, EVT_FLOAT(0.5)) - EVT_MULF(LVar9, EVT_FLOAT(1.2)) - EVT_CALL(RotateModel, MODEL_o137, LVar8, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o138, LVar8, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o139, LVar8, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o134, LVar9, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o135, LVar9, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o136, LVar9, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_HappyDance) - EVT_SET(GF_FLO25_GaveRedBerry, TRUE) - EVT_CASE_EQ(160) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_Chew, ANIM_GateFlower_Red_Idle, 0, MSG_CH6_003E) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_Idle) - EVT_CASE_EQ(158) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_Chew, ANIM_GateFlower_Red_Idle, 0, MSG_CH6_003E) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_Idle) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_Chew, ANIM_GateFlower_Red_Idle, 0, MSG_CH6_003D) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_Disgust) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SPIT_OUT, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeItemEntity, LVar8, -125, 20, 0, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVar7, LVar0) - EVT_WAIT(5 * DT) - EVT_CALL(GetAngleToPlayer, NPC_SELF, LVar0) - EVT_IF_LT(LVar0, 180) - EVT_CALL(MakeLerp, 0, 100, 7, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, EVT_FLOAT(-0.5)) - EVT_SETF(LVar3, EVT_FLOAT(-0.2)) - EVT_SETF(LVar4, EVT_FLOAT(0.9)) - EVT_MULF(LVar2, LVar0) - EVT_MULF(LVar3, LVar0) - EVT_MULF(LVar4, LVar0) - EVT_ADDF(LVar2, EVT_FLOAT(500.0)) - EVT_ADDF(LVar3, EVT_FLOAT(15.0)) - EVT_ADDF(LVar4, EVT_FLOAT(-20.0)) - EVT_CALL(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_ELSE - EVT_CALL(MakeLerp, 0, 100, 7, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, EVT_FLOAT(0.5)) - EVT_SETF(LVar3, EVT_FLOAT(-0.2)) - EVT_SETF(LVar4, EVT_FLOAT(0.9)) - EVT_MULF(LVar2, LVar0) - EVT_MULF(LVar3, LVar0) - EVT_MULF(LVar4, LVar0) - EVT_ADDF(LVar2, EVT_FLOAT(510.0)) - EVT_ADDF(LVar3, EVT_FLOAT(15.0)) - EVT_ADDF(LVar4, EVT_FLOAT(-20.0)) - EVT_CALL(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_Idle) - EVT_CALL(RemoveItemEntity, LVar7) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_Idle) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_GateFlower_Red_Talk, ANIM_GateFlower_Red_Idle, 0) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_THREAD - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(6.0 / DT)) - EVT_END_THREAD - EVT_WAIT(10 * DT) - EVT_ELSE - EVT_IF_LT(GB_StoryProgress, STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_HappyTalk, ANIM_GateFlower_Red_HappyIdle, 0, MSG_CH6_0040) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_HappyTalk, ANIM_GateFlower_Red_HappyIdle, 0, MSG_CH6_0041) - EVT_END_IF - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END + Switch(LVar0) + CaseLe(0) + Call(SetPlayerAnimation, ANIM_Mario1_Still) + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_Talk, ANIM_GateFlower_Red_Idle, 0, MSG_CH6_003C) + CaseDefault + Set(LVar8, LVar0) + Call(N(FlowerGuard_JudgeItemTastiness), LVar0) + Call(MakeItemEntity, LVar8, 505, 20, -24, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVar7, LVar0) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_EAT_OR_DRINK, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_Eat) + Wait(20 * DT) + Call(RemoveItemEntity, LVar7) + Switch(LVar8) + CaseEq(159) + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_Chew, ANIM_GateFlower_Red_Idle, 0, MSG_CH6_003F) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_APPROVE, SOUND_SPACE_DEFAULT) + Call(EndSpeech, NPC_SELF, ANIM_GateFlower_Red_HappyTalk, ANIM_GateFlower_Red_HappyIdle, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_OpenGate) + Call(PlaySoundAtCollider, COLLIDER_o94, SOUND_METAL_GATE_OPEN, SOUND_SPACE_DEFAULT) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o94, COLLIDER_FLAGS_UPPER_MASK) + Call(MakeLerp, 0, 100, 30, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + SetF(LVar8, LVar0) + SetF(LVar9, LVar0) + MulF(LVar8, Float(0.5)) + MulF(LVar9, Float(1.2)) + Call(RotateModel, MODEL_o137, LVar8, 0, -1, 0) + Call(RotateModel, MODEL_o138, LVar8, 0, -1, 0) + Call(RotateModel, MODEL_o139, LVar8, 0, -1, 0) + Call(RotateModel, MODEL_o134, LVar9, 0, 1, 0) + Call(RotateModel, MODEL_o135, LVar9, 0, 1, 0) + Call(RotateModel, MODEL_o136, LVar9, 0, 1, 0) + Wait(1) + IfNe(LVar1, 1) + BreakLoop + EndIf + EndLoop + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_HappyDance) + Set(GF_FLO25_GaveRedBerry, TRUE) + CaseEq(160) + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_Chew, ANIM_GateFlower_Red_Idle, 0, MSG_CH6_003E) + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_Idle) + CaseEq(158) + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_Chew, ANIM_GateFlower_Red_Idle, 0, MSG_CH6_003E) + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_Idle) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_Chew, ANIM_GateFlower_Red_Idle, 0, MSG_CH6_003D) + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_Disgust) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SPIT_OUT, SOUND_SPACE_DEFAULT) + Call(MakeItemEntity, LVar8, -125, 20, 0, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVar7, LVar0) + Wait(5 * DT) + Call(GetAngleToPlayer, NPC_SELF, LVar0) + IfLt(LVar0, 180) + Call(MakeLerp, 0, 100, 7, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, Float(-0.5)) + SetF(LVar3, Float(-0.2)) + SetF(LVar4, Float(0.9)) + MulF(LVar2, LVar0) + MulF(LVar3, LVar0) + MulF(LVar4, LVar0) + AddF(LVar2, Float(500.0)) + AddF(LVar3, Float(15.0)) + AddF(LVar4, Float(-20.0)) + Call(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4) + Wait(1) + IfNe(LVar1, 1) + BreakLoop + EndIf + EndLoop + Else + Call(MakeLerp, 0, 100, 7, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, Float(0.5)) + SetF(LVar3, Float(-0.2)) + SetF(LVar4, Float(0.9)) + MulF(LVar2, LVar0) + MulF(LVar3, LVar0) + MulF(LVar4, LVar0) + AddF(LVar2, Float(510.0)) + AddF(LVar3, Float(15.0)) + AddF(LVar4, Float(-20.0)) + Call(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4) + Wait(1) + IfNe(LVar1, 1) + BreakLoop + EndIf + EndLoop + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_Idle) + Call(RemoveItemEntity, LVar7) + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_Idle) + Call(EndSpeech, NPC_SELF, ANIM_GateFlower_Red_Talk, ANIM_GateFlower_Red_Idle, 0) + EndSwitch + EndSwitch + Thread + Call(ResetCam, CAM_DEFAULT, Float(6.0 / DT)) + EndThread + Wait(10 * DT) + Else + IfLt(GB_StoryProgress, STORY_CH6_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_HappyTalk, ANIM_GateFlower_Red_HappyIdle, 0, MSG_CH6_0040) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Red_HappyTalk, ANIM_GateFlower_Red_HappyIdle, 0, MSG_CH6_0041) + EndIf + EndIf + Call(DisablePlayerInput, FALSE) + Unbind + Return + End }; EvtScript N(EVS_NpcInit_GateFlower) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_GateFlower))) - EVT_IF_EQ(GF_FLO25_GaveRedBerry, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_HappyDance) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o94, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(RotateModel, MODEL_o137, 50, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o138, 50, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o139, 50, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o134, 120, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o135, 120, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o136, 120, 0, 1, 0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_GateFlower))) + IfEq(GF_FLO25_GaveRedBerry, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Red_HappyDance) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o94, COLLIDER_FLAGS_UPPER_MASK) + Call(RotateModel, MODEL_o137, 50, 0, -1, 0) + Call(RotateModel, MODEL_o138, 50, 0, -1, 0) + Call(RotateModel, MODEL_o139, 50, 0, -1, 0) + Call(RotateModel, MODEL_o134, 120, 0, 1, 0) + Call(RotateModel, MODEL_o135, 120, 0, 1, 0) + Call(RotateModel, MODEL_o136, 120, 0, 1, 0) + EndIf + Return + End }; NpcData N(NpcData_GateFlower) = { diff --git a/src/world/area_flo/flo_25/flo_25_4_entity.c b/src/world/area_flo/flo_25/flo_25_4_entity.c index 05da88f30ad..d376b9b7433 100644 --- a/src/world/area_flo/flo_25/flo_25_4_entity.c +++ b/src/world/area_flo/flo_25/flo_25_4_entity.c @@ -2,8 +2,8 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), -390, 0, 0, 0, MODEL_o3, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_FLO25_HiddenPanel) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HiddenPanel), -390, 0, 0, 0, MODEL_o3, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_FLO25_HiddenPanel) + Return + End }; diff --git a/src/world/area_flo/flo_25/flo_25_5_foliage.c b/src/world/area_flo/flo_25/flo_25_5_foliage.c index 6a67499161f..1652b4eb30b 100644 --- a/src/world/area_flo/flo_25/flo_25_5_foliage.c +++ b/src/world/area_flo/flo_25/flo_25_5_foliage.c @@ -35,11 +35,11 @@ BombTrigger N(BombPos_Tree1) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(AF_FLO_TreeDrop_YellowBerry1, FALSE) - EVT_SET(AF_FLO_TreeDrop_YellowBerry2, FALSE) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o42, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_RETURN - EVT_END + Set(AF_FLO_TreeDrop_YellowBerry1, FALSE) + Set(AF_FLO_TreeDrop_YellowBerry2, FALSE) + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o42, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Return + End }; diff --git a/src/world/area_flo/flo_25/flo_25_6_vine.c b/src/world/area_flo/flo_25/flo_25_6_vine.c index 86028720370..b909e7a20f2 100644 --- a/src/world/area_flo/flo_25/flo_25_6_vine.c +++ b/src/world/area_flo/flo_25/flo_25_6_vine.c @@ -12,6 +12,6 @@ EvtScript N(EVS_SetupVines) = { EVT_DROPPING_VINE(ITEM_NONE, MODEL_o101, MODEL_o102, MODEL_o103, MODEL_o104) EVT_DROPPING_VINE(ITEM_STINKY_HERB, MODEL_o105, MODEL_o106, MODEL_o107, MODEL_o108) EVT_DROPPING_VINE(ITEM_NONE, MODEL_o130, MODEL_o131, MODEL_o132, MODEL_o133) - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/area_gv/gv_01/gv_01_1_main.c b/src/world/area_gv/gv_01/gv_01_1_main.c index 63f8e08fca5..237988a96dd 100644 --- a/src/world/area_gv/gv_01/gv_01_1_main.c +++ b/src/world/area_gv/gv_01/gv_01_1_main.c @@ -25,24 +25,24 @@ API_CALLABLE(N(FadeToTitleScreen)); API_CALLABLE(N(ChangeStateToTitleScreen)); EvtScript N(EVS_DropLetter) = { - EVT_USE_BUF(N(DropLetterYCurve)) - EVT_LOOP(ARRAY_COUNT(N(DropLetterYCurve))) - EVT_BUF_READ1(LVar1) - EVT_CALL(TranslateGroup, LVar0, 0, LVar1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN + UseBuf(N(DropLetterYCurve)) + Loop(ARRAY_COUNT(N(DropLetterYCurve))) + BufRead1(LVar1) + Call(TranslateGroup, LVar0, 0, LVar1, 0) + Wait(1) + EndLoop + Return //@bug not terminated! }; EvtScript N(EVS_DropLastLetter) = { - EVT_USE_BUF(N(DropLastLetterYCurve)) - EVT_LOOP(ARRAY_COUNT(N(DropLastLetterYCurve))) - EVT_BUF_READ1(LVar1) - EVT_CALL(TranslateGroup, LVar0, 0, LVar1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN + UseBuf(N(DropLastLetterYCurve)) + Loop(ARRAY_COUNT(N(DropLastLetterYCurve))) + BufRead1(LVar1) + Call(TranslateGroup, LVar0, 0, LVar1, 0) + Wait(1) + EndLoop + Return //@bug not terminated! }; @@ -50,217 +50,217 @@ EvtScript N(EVS_DropLastLetter) = { // TODO: define MODEL_ constants for PAL version of gv_01 map EvtScript N(EVS_E8C6F8) = { - EVT_CALL(EnableGroup, 20, 0) - EVT_CALL(EnableGroup, 22, 0) - EVT_CALL(EnableGroup, 24, 0) - EVT_CALL(EnableGroup, 26, 0) - EVT_CALL(EnableGroup, 28, 0) - EVT_CALL(EnableGroup, 30, 0) - EVT_CALL(EnableGroup, 32, 0) - EVT_CALL(EnableGroup, 34, 0) - EVT_CALL(EnableGroup, 36, 0) - EVT_CALL(EnableGroup, 38, 0) - EVT_CALL(EnableGroup, 40, 0) - EVT_CALL(TranslateGroup, 4, 0, 200, 0) - EVT_CALL(TranslateGroup, 6, 0, 200, 0) - EVT_CALL(TranslateGroup, 8, 0, 200, 0) - EVT_CALL(TranslateGroup, 10, 0, 200, 0) - EVT_CALL(TranslateGroup, 12, 0, 200, 0) - EVT_CALL(TranslateGroup, 14, 0, 200, 0) - EVT_CALL(TranslateGroup, 16, 0, 200, 0) - EVT_CALL(TranslateGroup, 18, 0, 200, 0) - EVT_WAIT(5) - EVT_SET(LVar0, 4) - EVT_EXEC(N(EVS_DropLetter)) - EVT_WAIT(5) - EVT_SET(LVar0, 6) - EVT_EXEC(N(EVS_DropLetter)) - EVT_WAIT(10) - EVT_SET(LVar0, 8) - EVT_EXEC(N(EVS_DropLetter)) - EVT_WAIT(5) - EVT_SET(LVar0, 10) - EVT_EXEC(N(EVS_DropLetter)) - EVT_WAIT(5) - EVT_SET(LVar0, 12) - EVT_EXEC(N(EVS_DropLetter)) - EVT_WAIT(5) - EVT_SET(LVar0, 14) - EVT_EXEC(N(EVS_DropLetter)) - EVT_WAIT(5) - EVT_SET(LVar0, 16) - EVT_EXEC(N(EVS_DropLetter)) - EVT_WAIT(15) - EVT_SET(LVar0, 18) - EVT_EXEC(N(EVS_DropLastLetter)) - EVT_RETURN - EVT_END + Call(EnableGroup, 20, 0) + Call(EnableGroup, 22, 0) + Call(EnableGroup, 24, 0) + Call(EnableGroup, 26, 0) + Call(EnableGroup, 28, 0) + Call(EnableGroup, 30, 0) + Call(EnableGroup, 32, 0) + Call(EnableGroup, 34, 0) + Call(EnableGroup, 36, 0) + Call(EnableGroup, 38, 0) + Call(EnableGroup, 40, 0) + Call(TranslateGroup, 4, 0, 200, 0) + Call(TranslateGroup, 6, 0, 200, 0) + Call(TranslateGroup, 8, 0, 200, 0) + Call(TranslateGroup, 10, 0, 200, 0) + Call(TranslateGroup, 12, 0, 200, 0) + Call(TranslateGroup, 14, 0, 200, 0) + Call(TranslateGroup, 16, 0, 200, 0) + Call(TranslateGroup, 18, 0, 200, 0) + Wait(5) + Set(LVar0, 4) + Exec(N(EVS_DropLetter)) + Wait(5) + Set(LVar0, 6) + Exec(N(EVS_DropLetter)) + Wait(10) + Set(LVar0, 8) + Exec(N(EVS_DropLetter)) + Wait(5) + Set(LVar0, 10) + Exec(N(EVS_DropLetter)) + Wait(5) + Set(LVar0, 12) + Exec(N(EVS_DropLetter)) + Wait(5) + Set(LVar0, 14) + Exec(N(EVS_DropLetter)) + Wait(5) + Set(LVar0, 16) + Exec(N(EVS_DropLetter)) + Wait(15) + Set(LVar0, 18) + Exec(N(EVS_DropLastLetter)) + Return + End }; EvtScript N(EVS_E8CA04) = { - EVT_CALL(EnableGroup, 4, 0) - EVT_CALL(EnableGroup, 6, 0) - EVT_CALL(EnableGroup, 8, 0) - EVT_CALL(EnableGroup, 10, 0) - EVT_CALL(EnableGroup, 12, 0) - EVT_CALL(EnableGroup, 14, 0) - EVT_CALL(EnableGroup, 16, 0) - EVT_CALL(EnableGroup, 18, 0) - EVT_CALL(TranslateGroup, 20, 0, 200, 0) - EVT_CALL(TranslateGroup, 22, 0, 200, 0) - EVT_CALL(TranslateGroup, 24, 0, 200, 0) - EVT_CALL(TranslateGroup, 26, 0, 200, 0) - EVT_CALL(TranslateGroup, 28, 0, 200, 0) - EVT_CALL(TranslateGroup, 30, 0, 200, 0) - EVT_CALL(TranslateGroup, 32, 0, 200, 0) - EVT_CALL(TranslateGroup, 34, 0, 200, 0) - EVT_CALL(TranslateGroup, 36, 0, 200, 0) - EVT_CALL(TranslateGroup, 38, 0, 200, 0) - EVT_CALL(TranslateGroup, 40, 0, 200, 0) - EVT_WAIT(5) - EVT_SET(LVar0, 20) - EVT_EXEC(N(EVS_DropLetter)) - EVT_WAIT(4) - EVT_SET(LVar0, 22) - EVT_EXEC(N(EVS_DropLetter)) - EVT_WAIT(7) - EVT_SET(LVar0, 24) - EVT_EXEC(N(EVS_DropLetter)) - EVT_WAIT(4) - EVT_SET(LVar0, 26) - EVT_EXEC(N(EVS_DropLetter)) - EVT_WAIT(4) - EVT_SET(LVar0, 28) - EVT_EXEC(N(EVS_DropLetter)) - EVT_WAIT(4) - EVT_SET(LVar0, 30) - EVT_EXEC(N(EVS_DropLetter)) - EVT_WAIT(7) - EVT_SET(LVar0, 32) - EVT_EXEC(N(EVS_DropLetter)) - EVT_WAIT(4) - EVT_SET(LVar0, 34) - EVT_EXEC(N(EVS_DropLetter)) - EVT_WAIT(4) - EVT_SET(LVar0, 36) - EVT_EXEC(N(EVS_DropLetter)) - EVT_WAIT(4) - EVT_SET(LVar0, 38) - EVT_EXEC(N(EVS_DropLetter)) - EVT_WAIT(12) - EVT_SET(LVar0, 40) - EVT_EXEC(N(EVS_DropLastLetter)) - EVT_RETURN - EVT_END + Call(EnableGroup, 4, 0) + Call(EnableGroup, 6, 0) + Call(EnableGroup, 8, 0) + Call(EnableGroup, 10, 0) + Call(EnableGroup, 12, 0) + Call(EnableGroup, 14, 0) + Call(EnableGroup, 16, 0) + Call(EnableGroup, 18, 0) + Call(TranslateGroup, 20, 0, 200, 0) + Call(TranslateGroup, 22, 0, 200, 0) + Call(TranslateGroup, 24, 0, 200, 0) + Call(TranslateGroup, 26, 0, 200, 0) + Call(TranslateGroup, 28, 0, 200, 0) + Call(TranslateGroup, 30, 0, 200, 0) + Call(TranslateGroup, 32, 0, 200, 0) + Call(TranslateGroup, 34, 0, 200, 0) + Call(TranslateGroup, 36, 0, 200, 0) + Call(TranslateGroup, 38, 0, 200, 0) + Call(TranslateGroup, 40, 0, 200, 0) + Wait(5) + Set(LVar0, 20) + Exec(N(EVS_DropLetter)) + Wait(4) + Set(LVar0, 22) + Exec(N(EVS_DropLetter)) + Wait(7) + Set(LVar0, 24) + Exec(N(EVS_DropLetter)) + Wait(4) + Set(LVar0, 26) + Exec(N(EVS_DropLetter)) + Wait(4) + Set(LVar0, 28) + Exec(N(EVS_DropLetter)) + Wait(4) + Set(LVar0, 30) + Exec(N(EVS_DropLetter)) + Wait(7) + Set(LVar0, 32) + Exec(N(EVS_DropLetter)) + Wait(4) + Set(LVar0, 34) + Exec(N(EVS_DropLetter)) + Wait(4) + Set(LVar0, 36) + Exec(N(EVS_DropLetter)) + Wait(4) + Set(LVar0, 38) + Exec(N(EVS_DropLetter)) + Wait(12) + Set(LVar0, 40) + Exec(N(EVS_DropLastLetter)) + Return + End }; #endif EvtScript N(EVS_Main) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ModifyGlobalOverrideFlags, 0, GLOBAL_OVERRIDES_DONT_RESUME_SONG_AFTER_BATTLE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_THREAD - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcPos, NPC_PARTNER, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, TRUE) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_WAIT(2) - EVT_CALL(RandInt, 4, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_SpinLand) - EVT_CASE_EQ(1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Crouch) - EVT_CASE_EQ(2) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_VacantStare) - EVT_CASE_EQ(3) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Pray) - EVT_CASE_EQ(4) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Fallen) - EVT_END_SWITCH - EVT_END_THREAD - EVT_CALL(SetMusicTrack, 0, SONG_GAME_OVER, 0, 8) - EVT_CALL(ClearAmbientSounds, 0) - EVT_THREAD - EVT_WAIT(200 * DT) - EVT_CALL(N(FadeToTitleScreen)) - EVT_CALL(N(ChangeStateToTitleScreen)) - EVT_WAIT(100 * DT) - EVT_END_THREAD - EVT_CALL(SetMotionBlurParams, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 128, 10) + Call(DisablePlayerInput, TRUE) + Call(ModifyGlobalOverrideFlags, 0, GLOBAL_OVERRIDES_DONT_RESUME_SONG_AFTER_BATTLE) + SetUP_CAMERA_NO_LEAD() + Thread + Call(GetCurrentPartnerID, LVar0) + IfNe(LVar0, PARTNER_NONE) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcPos, NPC_PARTNER, NPC_DISPOSE_LOCATION) + EndIf + Call(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, TRUE) + Call(InterpPlayerYaw, 90, 0) + Wait(2) + Call(RandInt, 4, LVar0) + Switch(LVar0) + CaseEq(0) + Call(SetPlayerAnimation, ANIM_Mario1_SpinLand) + CaseEq(1) + Call(SetPlayerAnimation, ANIM_Mario1_Crouch) + CaseEq(2) + Call(SetPlayerAnimation, ANIM_Mario1_VacantStare) + CaseEq(3) + Call(SetPlayerAnimation, ANIM_Mario1_Pray) + CaseEq(4) + Call(SetPlayerAnimation, ANIM_Mario1_Fallen) + EndSwitch + EndThread + Call(SetMusicTrack, 0, SONG_GAME_OVER, 0, 8) + Call(ClearAmbientSounds, 0) + Thread + Wait(200 * DT) + Call(N(FadeToTitleScreen)) + Call(N(ChangeStateToTitleScreen)) + Wait(100 * DT) + EndThread + Call(SetMotionBlurParams, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 128, 10) #if VERSION_PAL - EVT_CALL(GetLanguage, LVar0) - EVT_IF_EQ(LVar0, LANGUAGE_ES) - EVT_EXEC(N(EVS_E8CA04)) - EVT_ELSE - EVT_EXEC(N(EVS_E8C6F8)) - EVT_END_IF + Call(GetLanguage, LVar0) + IfEq(LVar0, LANGUAGE_ES) + Exec(N(EVS_E8CA04)) + Else + Exec(N(EVS_E8C6F8)) + EndIf #else - EVT_CALL(TranslateGroup, MODEL_g, 0, 200, 0) - EVT_CALL(TranslateGroup, MODEL_a, 0, 200, 0) - EVT_CALL(TranslateGroup, MODEL_m, 0, 200, 0) - EVT_CALL(TranslateGroup, MODEL_e, 0, 200, 0) - EVT_CALL(TranslateGroup, MODEL_o, 0, 200, 0) - EVT_CALL(TranslateGroup, MODEL_v, 0, 200, 0) - EVT_CALL(TranslateGroup, MODEL_e2, 0, 200, 0) - EVT_CALL(TranslateGroup, MODEL_r, 0, 200, 0) - EVT_THREAD + Call(TranslateGroup, MODEL_g, 0, 200, 0) + Call(TranslateGroup, MODEL_a, 0, 200, 0) + Call(TranslateGroup, MODEL_m, 0, 200, 0) + Call(TranslateGroup, MODEL_e, 0, 200, 0) + Call(TranslateGroup, MODEL_o, 0, 200, 0) + Call(TranslateGroup, MODEL_v, 0, 200, 0) + Call(TranslateGroup, MODEL_e2, 0, 200, 0) + Call(TranslateGroup, MODEL_r, 0, 200, 0) + Thread #if VERSION_IQUE - EVT_WAIT(6) - EVT_SET(LVar0, MODEL_g) - EVT_EXEC(N(EVS_DropLetter)) - EVT_WAIT(6) - EVT_SET(LVar0, MODEL_m) - EVT_EXEC(N(EVS_DropLetter)) - EVT_WAIT(6) - EVT_SET(LVar0, MODEL_o) - EVT_EXEC(N(EVS_DropLetter)) - EVT_WAIT(6) - EVT_SET(LVar0, MODEL_e2) - EVT_EXEC(N(EVS_DropLetter)) - EVT_WAIT(18) + Wait(6) + Set(LVar0, MODEL_g) + Exec(N(EVS_DropLetter)) + Wait(6) + Set(LVar0, MODEL_m) + Exec(N(EVS_DropLetter)) + Wait(6) + Set(LVar0, MODEL_o) + Exec(N(EVS_DropLetter)) + Wait(6) + Set(LVar0, MODEL_e2) + Exec(N(EVS_DropLetter)) + Wait(18) #else - EVT_WAIT(6) - EVT_SET(LVar0, MODEL_g) - EVT_EXEC(N(EVS_DropLetter)) - EVT_WAIT(6) - EVT_SET(LVar0, MODEL_a) - EVT_EXEC(N(EVS_DropLetter)) - EVT_WAIT(12) - EVT_SET(LVar0, MODEL_m) - EVT_EXEC(N(EVS_DropLetter)) - EVT_WAIT(6) - EVT_SET(LVar0, MODEL_e) - EVT_EXEC(N(EVS_DropLetter)) - EVT_WAIT(6) - EVT_SET(LVar0, MODEL_o) - EVT_EXEC(N(EVS_DropLetter)) - EVT_WAIT(6) - EVT_SET(LVar0, MODEL_v) - EVT_EXEC(N(EVS_DropLetter)) - EVT_WAIT(6) - EVT_SET(LVar0, MODEL_e2) - EVT_EXEC(N(EVS_DropLetter)) - EVT_WAIT(18) - EVT_SET(LVar0, MODEL_r) - EVT_EXEC(N(EVS_DropLastLetter)) + Wait(6) + Set(LVar0, MODEL_g) + Exec(N(EVS_DropLetter)) + Wait(6) + Set(LVar0, MODEL_a) + Exec(N(EVS_DropLetter)) + Wait(12) + Set(LVar0, MODEL_m) + Exec(N(EVS_DropLetter)) + Wait(6) + Set(LVar0, MODEL_e) + Exec(N(EVS_DropLetter)) + Wait(6) + Set(LVar0, MODEL_o) + Exec(N(EVS_DropLetter)) + Wait(6) + Set(LVar0, MODEL_v) + Exec(N(EVS_DropLetter)) + Wait(6) + Set(LVar0, MODEL_e2) + Exec(N(EVS_DropLetter)) + Wait(18) + Set(LVar0, MODEL_r) + Exec(N(EVS_DropLastLetter)) #endif - EVT_END_THREAD + EndThread #endif - EVT_THREAD - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 10, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.3)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(94) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 1000) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + Call(UseSettingsFrom, CAM_DEFAULT, 0, 10, 0) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.3)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(94) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 1000) + EndThread + Return + End }; API_CALLABLE(N(FadeToTitleScreen)) { diff --git a/src/world/area_hos/common/FallingStars.inc.c b/src/world/area_hos/common/FallingStars.inc.c index a0f91d3ce63..ad9007277e9 100644 --- a/src/world/area_hos/common/FallingStars.inc.c +++ b/src/world/area_hos/common/FallingStars.inc.c @@ -126,96 +126,96 @@ EvtScript N(EVS_Starfall_Directed) = { #define LV_Dz LVarC #define LV_Time LVarD #define LV_SoundDelay LVarE - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_SET(LV_Time, 0) - EVT_SET(LV_SoundDelay, 0) - EVT_LABEL(0) + SetGroup(EVT_GROUP_0B) + Set(LV_Time, 0) + Set(LV_SoundDelay, 0) + Label(0) // no shooting stars if player x < -50 - EVT_CALL(GetPlayerPos, LV_PosX, LV_PosY, LV_PosZ) - EVT_IF_LT(LV_PosX, -50) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF + Call(GetPlayerPos, LV_PosX, LV_PosY, LV_PosZ) + IfLt(LV_PosX, -50) + Wait(1) + Goto(0) + EndIf // choose delay from ~100 to 20 as a function of player x position - EVT_SET(LV_Delay, 1000) - EVT_SUB(LV_Delay, LV_PosX) - EVT_DIV(LV_Delay, 10) - EVT_IF_LT(LV_Delay, 20) - EVT_SET(LV_Delay, 20) - EVT_END_IF + Set(LV_Delay, 1000) + Sub(LV_Delay, LV_PosX) + Div(LV_Delay, 10) + IfLt(LV_Delay, 20) + Set(LV_Delay, 20) + EndIf // choose a random spawn position within 400 units of the player in x and z - EVT_CALL(GetPlayerPos, LV_PosX, LV_PosY, LV_PosZ) - EVT_CALL(RandInt, 400, LV_Dx) - EVT_SET(LV_Dy, 200) - EVT_CALL(RandInt, 400, LV_Dz) - EVT_SUB(LV_Dz, 200) - EVT_ADD(LV_PosX, LV_Dx) - EVT_ADD(LV_PosY, LV_Dy) - EVT_ADD(LV_PosZ, LV_Dz) + Call(GetPlayerPos, LV_PosX, LV_PosY, LV_PosZ) + Call(RandInt, 400, LV_Dx) + Set(LV_Dy, 200) + Call(RandInt, 400, LV_Dz) + Sub(LV_Dz, 200) + Add(LV_PosX, LV_Dx) + Add(LV_PosY, LV_Dy) + Add(LV_PosZ, LV_Dz) // choose a final position relative to the spawn position, with y = 0 and a random x offset - EVT_SET(LV_EndX, LV_PosX) - EVT_CALL(RandInt, 100, LV_Dx) - EVT_ADD(LV_Dx, 50) - EVT_SUB(LV_EndX, LV_Dx) - EVT_SET(LV_EndY, 0) - EVT_SET(LV_EndZ, LV_PosZ) + Set(LV_EndX, LV_PosX) + Call(RandInt, 100, LV_Dx) + Add(LV_Dx, 50) + Sub(LV_EndX, LV_Dx) + Set(LV_EndY, 0) + Set(LV_EndZ, LV_PosZ) // choose random speed - EVT_CALL(RandInt, 4, LV_Speed) - EVT_ADD(LV_Speed, 10) + Call(RandInt, 4, LV_Speed) + Add(LV_Speed, 10) // choose random star type - EVT_SWITCH(LV_PosZ) - EVT_CASE_LT(-290) - EVT_SET(LV_Type, FX_STAR_BACKGROUND) - EVT_CASE_LT(40) - EVT_SET(LV_Type, FX_STAR_LARGE_BOUNCING) - EVT_CASE_GE(40) - EVT_SET(LV_Type, FX_STAR_FOREGROUND) - EVT_END_SWITCH + Switch(LV_PosZ) + CaseLt(-290) + Set(LV_Type, FX_STAR_BACKGROUND) + CaseLt(40) + Set(LV_Type, FX_STAR_LARGE_BOUNCING) + CaseGe(40) + Set(LV_Type, FX_STAR_FOREGROUND) + EndSwitch // play sound (subject to minimum delay) - EVT_IF_LT(LV_SoundDelay, 2) - EVT_CALL(PlaySoundAt, SOUND_SEQ_SHOOTING_STAR_FALL, SOUND_SPACE_DEFAULT, LV_PosX, LV_PosY, LV_PosZ) - EVT_ADD(LV_SoundDelay, 1) - EVT_END_IF - EVT_ADD(LV_Time, LV_Delay) - EVT_IF_GT(LV_Time, 30) - EVT_SET(LV_Time, 0) - EVT_SET(LV_SoundDelay, 0) - EVT_END_IF + IfLt(LV_SoundDelay, 2) + Call(PlaySoundAt, SOUND_SEQ_SHOOTING_STAR_FALL, SOUND_SPACE_DEFAULT, LV_PosX, LV_PosY, LV_PosZ) + Add(LV_SoundDelay, 1) + EndIf + Add(LV_Time, LV_Delay) + IfGt(LV_Time, 30) + Set(LV_Time, 0) + Set(LV_SoundDelay, 0) + EndIf // spawn the effect - EVT_CALL(N(SpawnDirectedShootingStarFX), LV_Type, LV_PosX, LV_PosY, LV_PosZ, LV_EndX, LV_EndY, LV_EndZ, LV_Speed) - EVT_WAIT(LV_Delay) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(N(SpawnDirectedShootingStarFX), LV_Type, LV_PosX, LV_PosY, LV_PosZ, LV_EndX, LV_EndY, LV_EndZ, LV_Speed) + Wait(LV_Delay) + Goto(0) + Return + End }; EvtScript N(EVS_Starfall_Random) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_THREAD - EVT_LABEL(0) - EVT_CALL(RandInt, 50, LVar0) - EVT_ADD(LVar0, 10) - EVT_CALL(N(SpawnRandomBackgroundShootingStarFX)) - EVT_WAIT(LVar0) - EVT_GOTO(0) - EVT_END_THREAD - EVT_THREAD - EVT_LABEL(1) - EVT_CALL(RandInt, 50, LVar0) - EVT_ADD(LVar0, 20) - EVT_CALL(N(SpawnRandomForegroundShootingStarFX)) - EVT_WAIT(LVar0) - EVT_GOTO(1) - EVT_END_THREAD - EVT_THREAD - EVT_LABEL(2) - EVT_CALL(RandInt, 50, LVar0) - EVT_ADD(LVar0, 20) - EVT_CALL(N(SpawnRandomBouncingShootingStarFX)) - EVT_CALL(PlaySoundAt, SOUND_SEQ_SHOOTING_STAR_FALL, SOUND_SPACE_DEFAULT, LVar1, LVar2, LVar3) - EVT_WAIT(LVar0) - EVT_GOTO(2) - EVT_END_THREAD - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0B) + Thread + Label(0) + Call(RandInt, 50, LVar0) + Add(LVar0, 10) + Call(N(SpawnRandomBackgroundShootingStarFX)) + Wait(LVar0) + Goto(0) + EndThread + Thread + Label(1) + Call(RandInt, 50, LVar0) + Add(LVar0, 20) + Call(N(SpawnRandomForegroundShootingStarFX)) + Wait(LVar0) + Goto(1) + EndThread + Thread + Label(2) + Call(RandInt, 50, LVar0) + Add(LVar0, 20) + Call(N(SpawnRandomBouncingShootingStarFX)) + Call(PlaySoundAt, SOUND_SEQ_SHOOTING_STAR_FALL, SOUND_SPACE_DEFAULT, LVar1, LVar2, LVar3) + Wait(LVar0) + Goto(2) + EndThread + Return + End }; diff --git a/src/world/area_hos/hos_00/hos_00_1_music.c b/src/world/area_hos/hos_00/hos_00_1_music.c index ce3f358b7cb..ee5e5a25e4a 100644 --- a/src/world/area_hos/hos_00/hos_00_1_music.c +++ b/src/world/area_hos/hos_00/hos_00_1_music.c @@ -1,72 +1,72 @@ #include "hos_00.h" EvtScript N(EVS_PlayToadTownSong) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_INVASION, 0, 6) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN, 0, 6) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseRange(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) + Call(SetMusicTrack, 0, SONG_SHY_GUY_INVASION, 0, 6) + CaseDefault + Call(SetMusicTrack, 0, SONG_TOAD_TOWN, 0, 6) + EndSwitch + Return + End }; EvtScript N(EVS_PlayMusicByPosition) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(hos_00_ENTRY_0) - EVT_EXEC(N(EVS_PlayToadTownSong)) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(hos_00_ENTRY_1) - EVT_CASE_OR_EQ(hos_00_ENTRY_2) - EVT_CALL(SetMusicTrack, 0, SONG_SHOOTING_STAR_SUMMIT, 0, 8) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_IF_NE(LVar0, 0) - EVT_GOTO(20) - EVT_END_IF - EVT_LABEL(10) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_IF_GT(LVar1, 210) - EVT_CALL(FadeOutMusic, 0, 833) - EVT_WAIT(25) - EVT_CALL(SetMusicTrack, 0, SONG_SHOOTING_STAR_SUMMIT, 0, 8) - EVT_WAIT(30) - EVT_GOTO(20) - EVT_END_IF - EVT_GOTO(10) - EVT_LABEL(20) - EVT_WAIT(1) - EVT_IF_EQ(GB_StoryProgress, STORY_CH0_BEGAN_PEACH_MISSION) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_IF_LT(LVar1, -55) - EVT_CALL(FadeOutMusic, 0, 833) - EVT_WAIT(25) - EVT_EXEC(N(EVS_PlayToadTownSong)) - EVT_WAIT(30) - EVT_GOTO(10) - EVT_END_IF - EVT_GOTO(20) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(hos_00_ENTRY_0) + Exec(N(EVS_PlayToadTownSong)) + EndCaseGroup + CaseOrEq(hos_00_ENTRY_1) + CaseOrEq(hos_00_ENTRY_2) + Call(SetMusicTrack, 0, SONG_SHOOTING_STAR_SUMMIT, 0, 8) + EndCaseGroup + EndSwitch + IfNe(LVar0, 0) + Goto(20) + EndIf + Label(10) + Wait(1) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + IfGt(LVar1, 210) + Call(FadeOutMusic, 0, 833) + Wait(25) + Call(SetMusicTrack, 0, SONG_SHOOTING_STAR_SUMMIT, 0, 8) + Wait(30) + Goto(20) + EndIf + Goto(10) + Label(20) + Wait(1) + IfEq(GB_StoryProgress, STORY_CH0_BEGAN_PEACH_MISSION) + Goto(20) + EndIf + Call(GetPlayerPos, LVar1, LVar2, LVar3) + IfLt(LVar1, -55) + Call(FadeOutMusic, 0, 833) + Wait(25) + Exec(N(EVS_PlayToadTownSong)) + Wait(30) + Goto(10) + EndIf + Goto(20) + Return + End }; EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, hos_00_ENTRY_3) - EVT_CALL(SetMusicTrack, 0, SONG_STARSHIP_THEME, 0, 8) - EVT_ELSE - EVT_EXEC(N(EVS_PlayMusicByPosition)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, hos_00_ENTRY_3) + Call(SetMusicTrack, 0, SONG_STARSHIP_THEME, 0, 8) + Else + Exec(N(EVS_PlayMusicByPosition)) + EndIf + Return + End }; EvtScript N(EVS_PlayKammyKoopaSong) = { - EVT_CALL(SetMusicTrack, 0, SONG_KAMMY_KOOPA_THEME, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_KAMMY_KOOPA_THEME, 0, 8) + Return + End }; diff --git a/src/world/area_hos/hos_00/hos_00_2_main.c b/src/world/area_hos/hos_00/hos_00_2_main.c index 7b15ebe6d64..f58c6ac25a2 100644 --- a/src/world/area_hos/hos_00/hos_00_2_main.c +++ b/src/world/area_hos/hos_00/hos_00_2_main.c @@ -3,93 +3,93 @@ #include "../common/FallingStars.inc.c" EvtScript N(EVS_ExitWalk_osr) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(UseExitHeading, 60, hos_00_ENTRY_0) - EVT_EXEC(ExitWalk) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH0_WAKE_UP, STORY_CH8_REACHED_PEACHS_CASTLE) - EVT_CALL(GotoMap, EVT_PTR("osr_01"), osr_01_ENTRY_1) - EVT_CASE_DEFAULT - EVT_CALL(GotoMap, EVT_PTR("osr_00"), osr_00_ENTRY_1) - EVT_END_SWITCH - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(UseExitHeading, 60, hos_00_ENTRY_0) + Exec(ExitWalk) + Switch(GB_StoryProgress) + CaseRange(STORY_CH0_WAKE_UP, STORY_CH8_REACHED_PEACHS_CASTLE) + Call(GotoMap, Ref("osr_01"), osr_01_ENTRY_1) + CaseDefault + Call(GotoMap, Ref("osr_00"), osr_00_ENTRY_1) + EndSwitch + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_hos_01_0) = EVT_EXIT_WALK(60, hos_00_ENTRY_1, "hos_01", hos_01_ENTRY_0); EvtScript N(EVS_ExitWalk_hos_06_0) = EVT_EXIT_WALK(60, hos_00_ENTRY_2, "hos_06", hos_06_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_osr)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_hos_01_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_hos_06_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_osr)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_hos_01_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_hos_06_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) + Return + End }; EvtScript N(EVS_TexPan_Unknown) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, LVar0, 0) - EVT_ADD(LVar0, 0x4000) - EVT_WAIT(15) - EVT_END_LOOP - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Set(LVar0, 0) + Loop(0) + Call(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, LVar0, 0) + Add(LVar0, 0x4000) + Wait(15) + EndLoop + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(N(EVS_SetupBackgroundShade)) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, hos_00_ENTRY_3) - EVT_CALL(SetGroupVisibility, MODEL_g107, MODEL_GROUP_HIDDEN) - EVT_EXEC(N(EVS_Scene_Wishing)) - EVT_RETURN - EVT_ELSE - EVT_EXEC(N(EVS_SetupBackgroundShade)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(N(EVS_SetupBackgroundShade)) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(GetEntryID, LVar0) + IfEq(LVar0, hos_00_ENTRY_3) + Call(SetGroupVisibility, MODEL_g107, MODEL_GROUP_HIDDEN) + Exec(N(EVS_Scene_Wishing)) + Return + Else + Exec(N(EVS_SetupBackgroundShade)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + EndIf + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHOOTING_STAR_SUMMIT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_SET(GF_MAP_ShootingStarSummit, TRUE) - EVT_SET(GF_MAC01_RowfBadgesChosen, FALSE) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, hos_00_ENTRY_3) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(WishingNPCs))) - EVT_ELSE - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, hos_00_ENTRY_3) - EVT_EXEC(N(EVS_Starfall_Directed)) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_EQ(GB_StoryProgress, STORY_CH0_BEGAN_PEACH_MISSION) - EVT_IF_EQ(AF_HOS_B4, FALSE) - EVT_WAIT(50) - EVT_SET(AF_HOS_B4, TRUE) - EVT_END_IF - EVT_EXEC(N(EVS_Scene_MeetingTwink)) - EVT_END_IF - EVT_EXEC(N(EVS_EnterMap)) - EVT_EXEC(N(EVS_TexPan_Unknown)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_SHOOTING_STAR_SUMMIT) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Set(GF_MAP_ShootingStarSummit, TRUE) + Set(GF_MAC01_RowfBadgesChosen, FALSE) + Call(GetEntryID, LVar0) + IfEq(LVar0, hos_00_ENTRY_3) + Call(MakeNpcs, FALSE, Ref(N(WishingNPCs))) + Else + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + EndIf + ExecWait(N(EVS_MakeEntities)) + Call(GetEntryID, LVar0) + IfNe(LVar0, hos_00_ENTRY_3) + Exec(N(EVS_Starfall_Directed)) + EndIf + ExecWait(N(EVS_SetupMusic)) + IfEq(GB_StoryProgress, STORY_CH0_BEGAN_PEACH_MISSION) + IfEq(AF_HOS_B4, FALSE) + Wait(50) + Set(AF_HOS_B4, TRUE) + EndIf + Exec(N(EVS_Scene_MeetingTwink)) + EndIf + Exec(N(EVS_EnterMap)) + Exec(N(EVS_TexPan_Unknown)) + Return + End }; diff --git a/src/world/area_hos/hos_00/hos_00_3_unused.c b/src/world/area_hos/hos_00/hos_00_3_unused.c index 7f4b1cb833a..f2094f4a409 100644 --- a/src/world/area_hos/hos_00/hos_00_3_unused.c +++ b/src/world/area_hos/hos_00/hos_00_3_unused.c @@ -1,12 +1,12 @@ #include "hos_00.h" EvtScript N(EVS_TexPan_ToggleUnused) = { - EVT_LABEL(0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, 0, 0) - EVT_WAIT(10) - EVT_CALL(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, 0x4000, 0) - EVT_WAIT(10) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, 0, 0) + Wait(10) + Call(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, 0x4000, 0) + Wait(10) + Goto(0) + Return + End }; diff --git a/src/world/area_hos/hos_00/hos_00_4_npc.c b/src/world/area_hos/hos_00/hos_00_4_npc.c index 20d132abd2e..dc66cabd8c9 100644 --- a/src/world/area_hos/hos_00/hos_00_4_npc.c +++ b/src/world/area_hos/hos_00/hos_00_4_npc.c @@ -14,71 +14,71 @@ NpcSettings N(NpcSettings_FlyingMagikoopa) = { }; EvtScript N(EVS_Scene_Wishing) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 305, -10, -50) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 305, -10, -50) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(9.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(30) - EVT_CALL(SpeakToPlayer, NPC_ToadKid, ANIM_ToadKid_Red_Talk, ANIM_ToadKid_Red_Disappointed, 0, MSG_HOS_006C) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_ToadKid, ANIM_ToadKid_Red_Idle) - EVT_CALL(SpeakToPlayer, NPC_Toadette, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 0, MSG_HOS_006D) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_ToadKid, ANIM_ToadKid_Red_Talk, ANIM_ToadKid_Red_Idle, 0, MSG_HOS_006E) - EVT_WAIT(50) - EVT_CALL(GotoMap, EVT_PTR("osr_01"), osr_01_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, 305, -10, -50) + Call(SetPanTarget, CAM_DEFAULT, 305, -10, -50) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(9.0), Float(-10.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(30) + Call(SpeakToPlayer, NPC_ToadKid, ANIM_ToadKid_Red_Talk, ANIM_ToadKid_Red_Disappointed, 0, MSG_HOS_006C) + Wait(10) + Call(SetNpcAnimation, NPC_ToadKid, ANIM_ToadKid_Red_Idle) + Call(SpeakToPlayer, NPC_Toadette, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 0, MSG_HOS_006D) + Wait(10) + Call(SpeakToPlayer, NPC_ToadKid, ANIM_ToadKid_Red_Talk, ANIM_ToadKid_Red_Idle, 0, MSG_HOS_006E) + Wait(50) + Call(GotoMap, Ref("osr_01"), osr_01_ENTRY_3) + Wait(100) + Return + End }; EvtScript N(EVS_NpcDefeat_FlyingMagikoopa) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(GetPlayerPos, LVar3, LVar1, LVar2) - EVT_CALL(SetPlayerPos, LVar3, LVar1, -45) - EVT_ADD(LVar3, 40) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar3, LVar1, -45) - EVT_CALL(GetNpcPos, NPC_Twink, LVar3, LVar1, LVar2) - EVT_ADD(LVar3, -25) - EVT_CALL(SetNpcPos, NPC_Twink, LVar3, LVar1, -45) - EVT_EXEC(N(EVS_Scene_TwinkDeparts)) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(GetPlayerPos, LVar3, LVar1, LVar2) + Call(SetPlayerPos, LVar3, LVar1, -45) + Add(LVar3, 40) + Call(SetNpcPos, NPC_PARTNER, LVar3, LVar1, -45) + Call(GetNpcPos, NPC_Twink, LVar3, LVar1, LVar2) + Add(LVar3, -25) + Call(SetNpcPos, NPC_Twink, LVar3, LVar1, -45) + Exec(N(EVS_Scene_TwinkDeparts)) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcIdle_FlyingMagikoopa) = { - EVT_LABEL(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CASE_EQ(1) - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetSelfVar, 0, LVar0) + Switch(LVar0) + CaseEq(0) + CaseEq(1) + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + EndSwitch + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_NpcInit_FlyingMagikoopa) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH0_TWINK_GAVE_LUCKY_STAR) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_FlyingMagikoopa))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_FlyingMagikoopa))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH0_TWINK_GAVE_LUCKY_STAR) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_FlyingMagikoopa))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_FlyingMagikoopa))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; API_CALLABLE(N(SetCurrentPartner)) { @@ -87,40 +87,40 @@ API_CALLABLE(N(SetCurrentPartner)) { } EvtScript N(EVS_NpcIdle_Twink) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EnablePartner, PARTNER_TWINK) - EVT_CALL(N(SetCurrentPartner), PARTNER_TWINK) - EVT_CALL(StartBattle) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Loop(0) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(EnablePartner, PARTNER_TWINK) + Call(N(SetCurrentPartner), PARTNER_TWINK) + Call(StartBattle) + Return + End }; EvtScript N(EVS_NpcInteract_Twink) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcDefeat_Twink) = { - EVT_CALL(SetSelfVar, 0, 2) - EVT_CALL(DisablePartner, PARTNER_TWINK) - EVT_CALL(N(SetCurrentPartner), PARTNER_GOOMBARIO) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 2) + Call(DisablePartner, PARTNER_TWINK) + Call(N(SetCurrentPartner), PARTNER_GOOMBARIO) + Return + End }; EvtScript N(EVS_NpcInit_Twink) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Twink))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Twink))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Twink))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Twink))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Twink))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Twink))) + Return + End }; NpcData N(NpcData_Twink) = { diff --git a/src/world/area_hos/hos_00/hos_00_5_entity.c b/src/world/area_hos/hos_00/hos_00_5_entity.c index fa0ec0a6ce7..347548f12bd 100644 --- a/src/world/area_hos/hos_00/hos_00_5_entity.c +++ b/src/world/area_hos/hos_00/hos_00_5_entity.c @@ -2,28 +2,28 @@ #include "entity.h" EvtScript N(EVS_ReadSign_ToSummit) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_016E, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_016E, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_ReadSign_ToMerluvlee) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_016D, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_016D, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Signpost), 450, 10, -185, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_ReadSign_ToSummit))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Signpost), 855, -10, -40, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_ReadSign_ToMerluvlee))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 380, -10, 25, 0, MODEL_o239, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_HOS00_HiddenPanel) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Signpost), 450, 10, -185, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_ReadSign_ToSummit))) + Call(MakeEntity, Ref(Entity_Signpost), 855, -10, -40, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_ReadSign_ToMerluvlee))) + Call(MakeEntity, Ref(Entity_HiddenPanel), 380, -10, 25, 0, MODEL_o239, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_HOS00_HiddenPanel) + Return + End }; diff --git a/src/world/area_hos/hos_00/hos_00_6_scenes.c b/src/world/area_hos/hos_00/hos_00_6_scenes.c index 160fc077d92..f7cf5812d9f 100644 --- a/src/world/area_hos/hos_00/hos_00_6_scenes.c +++ b/src/world/area_hos/hos_00/hos_00_6_scenes.c @@ -115,468 +115,468 @@ API_CALLABLE(N(AddOffsetForCamPos)) { } EvtScript N(EVS_UpdateFacingMagikoopa) = { - EVT_CALL(GetNpcPos, NPC_FlyingMagikoopa, LVar6, LVar7, LVar8) - EVT_LABEL(0) - EVT_CALL(GetNpcPos, NPC_FlyingMagikoopa, LVar3, LVar4, LVar5) - EVT_SET(LVar9, LVar3) - EVT_SET(LVarA, LVar4) - EVT_SET(LVarB, LVar5) - EVT_SUB(LVar3, LVar6) - EVT_SUB(LVar4, LVar7) - EVT_SUB(LVar5, LVar8) - EVT_CALL(N(UpdateMagikoopaAngles)) - EVT_SET(LVar6, LVar9) - EVT_SET(LVar7, LVarA) - EVT_SET(LVar8, LVarB) - EVT_CALL(PlayerFaceNpc, NPC_FlyingMagikoopa, FALSE) - EVT_CALL(GetAngleBetweenNPCs, NPC_Twink, NPC_FlyingMagikoopa, LVar0) - EVT_CALL(InterpNpcYaw, NPC_Twink, LVar0, 0) - EVT_CALL(GetAngleBetweenNPCs, NPC_PARTNER, NPC_FlyingMagikoopa, LVar0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_FlyingMagikoopa, LVar6, LVar7, LVar8) + Label(0) + Call(GetNpcPos, NPC_FlyingMagikoopa, LVar3, LVar4, LVar5) + Set(LVar9, LVar3) + Set(LVarA, LVar4) + Set(LVarB, LVar5) + Sub(LVar3, LVar6) + Sub(LVar4, LVar7) + Sub(LVar5, LVar8) + Call(N(UpdateMagikoopaAngles)) + Set(LVar6, LVar9) + Set(LVar7, LVarA) + Set(LVar8, LVarB) + Call(PlayerFaceNpc, NPC_FlyingMagikoopa, FALSE) + Call(GetAngleBetweenNPCs, NPC_Twink, NPC_FlyingMagikoopa, LVar0) + Call(InterpNpcYaw, NPC_Twink, LVar0, 0) + Call(GetAngleBetweenNPCs, NPC_PARTNER, NPC_FlyingMagikoopa, LVar0) + Call(InterpNpcYaw, NPC_PARTNER, LVar0, 0) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_ConfusedTwinkLookingAround) = { - EVT_LOOP(0) - EVT_CALL(InterpNpcYaw, NPC_Twink, 270, 0) - EVT_WAIT(10 * DT) - EVT_CALL(InterpNpcYaw, NPC_Twink, 90, 0) - EVT_WAIT(10 * DT) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(InterpNpcYaw, NPC_Twink, 270, 0) + Wait(10 * DT) + Call(InterpNpcYaw, NPC_Twink, 90, 0) + Wait(10 * DT) + EndLoop + Return + End }; // add an offset to Twink's position to counter the one from his sprite EvtScript N(EVS_Twink_CancelHoverOffset) = { - EVT_LOOP(0) - EVT_LOOP(5) - EVT_CALL(GetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) - EVT_WAIT(3) - EVT_END_LOOP - EVT_WAIT(3) - EVT_LOOP(5) - EVT_CALL(GetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, -1) - EVT_CALL(SetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) - EVT_WAIT(3) - EVT_END_LOOP - EVT_WAIT(3) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Loop(5) + Call(GetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) + Add(LVar1, 1) + Call(SetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) + Wait(3) + EndLoop + Wait(3) + Loop(5) + Call(GetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) + Add(LVar1, -1) + Call(SetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) + Wait(3) + EndLoop + Wait(3) + EndLoop + Return + End }; EvtScript N(EVS_Twink_CarryItem) = { - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_ADD(LVar2, 2) - EVT_CALL(SetItemPos, MV_LuckyStarItem, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) + Add(LVar1, 15) + Add(LVar2, 2) + Call(SetItemPos, MV_LuckyStarItem, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_Scene_MeetingTwink) = { - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, -100) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(func_802CF56C, 2) - EVT_THREAD - EVT_ADD(LVar0, -20) - EVT_CALL(PlayerMoveTo, LVar0, LVar2, 10 * DT) - EVT_END_THREAD - EVT_CALL(SetNpcPos, NPC_Twink, 50, 180, 0) - EVT_CALL(SetNpcJumpscale, NPC_Twink, 0) - EVT_ADD(LVar0, -10) - EVT_CALL(NpcJump0, NPC_Twink, LVar0, 20, LVar2, 15 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_DEFAULT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_VacantStare) - EVT_CALL(SetNpcAnimation, NPC_Twink, ANIM_Twink_Cringe) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Twink, ANIM_Twink_Disappointed) - EVT_CALL(SetNpcJumpscale, NPC_Twink, EVT_FLOAT(0.6)) - EVT_CALL(GetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -100) - EVT_CALL(NpcJump0, NPC_Twink, LVar0, 10, LVar2, 20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(2.0)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar3, 360) - EVT_LOOP(3) - EVT_LABEL(22) - EVT_WAIT(1) - EVT_SUB(LVar3, 45) - EVT_IF_GT(LVar3, 0) - EVT_CALL(SetNpcRotation, NPC_Twink, 0, LVar3, 0) - EVT_IF_EQ(LVar3, 270) - EVT_CALL(SetNpcAnimation, NPC_Twink, ANIM_Twink_Back) - EVT_END_IF - EVT_IF_EQ(LVar3, 90) - EVT_CALL(SetNpcAnimation, NPC_Twink, ANIM_Twink_Disappointed) - EVT_END_IF - EVT_GOTO(22) - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcRotation, NPC_Twink, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(ShowMessageAtScreenPos, MSG_HOS_000D, 160, 40) - EVT_CALL(SetMusicTrack, 0, SONG_TWINK_THEME, 0, 8) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetNpcAnimation, NPC_Twink, ANIM_Twink_Idle) - EVT_CALL(NpcFacePlayer, NPC_Twink, 0) - EVT_CALL(SpeakToPlayer, NPC_Twink, ANIM_Twink_Shout, ANIM_Twink_Idle, 0, MSG_HOS_000E) - EVT_CALL(N(DisableCameraLeadingPlayer)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -20) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 275) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(16.0), EVT_FLOAT(-8.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetNpcSpeed, NPC_Twink, EVT_FLOAT(3.0 / DT)) - EVT_CALL(GetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_CALL(NpcMoveTo, NPC_Twink, LVar0, LVar2, 0) - EVT_CALL(ShowEmote, NPC_Twink, EMOTE_SHOCK, 45, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Twink, ANIM_Twink_ShoutJoy) - EVT_CALL(SetNpcJumpscale, NPC_Twink, EVT_FLOAT(1.0)) - EVT_LOOP(2) - EVT_CALL(GetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Twink, LVar0, LVar1, LVar2, 15 * DT) - EVT_END_LOOP - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 25) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_HOS_000F) - EVT_WAIT(5 * DT) - EVT_CALL(GetNpcPos, NPC_Twink, LVar4, LVar5, LVar6) - EVT_CALL(LoadPath, 70 * DT, EVT_PTR(N(TwinkArrivePath)), ARRAY_COUNT(N(TwinkArrivePath)), EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(GetNextPathPos) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_ADDF(LVar3, LVar6) - EVT_CALL(SetNpcPos, NPC_Twink, LVar1, LVar2, LVar3) - EVT_CALL(N(HavePartyFaceTwink)) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_Twink, ANIM_Twink_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_HOS_0010) - EVT_CALL(SetNpcYaw, NPC_Twink, 270) - EVT_CALL(SetNpcAnimation, NPC_Twink, ANIM_Twink_Back) - EVT_CALL(SpeakToPlayer, NPC_Twink, -1, -1, 5, MSG_HOS_0011) - EVT_CALL(GetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_CALL(MakeItemEntity, ITEM_LUCKY_STAR, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(MV_LuckyStarItem, LVar0) - EVT_EXEC_GET_TID(N(EVS_Twink_CancelHoverOffset), LVar8) - EVT_EXEC_GET_TID(N(EVS_Twink_CarryItem), LVar9) - EVT_CALL(SetNpcAnimation, NPC_Twink, ANIM_Twink_Wink) - EVT_CALL(ContinueSpeech, NPC_Twink, -1, -1, 512, MSG_HOS_0012) - EVT_CALL(GetPlayerPos, LVar5, LVar3, LVar4) - EVT_ADD(LVar5, -30) - EVT_CALL(NpcMoveTo, NPC_Twink, LVar5, LVar4, 15 * DT) - EVT_KILL_THREAD(LVar9) - EVT_KILL_THREAD(LVar8) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_SET(LVar4, LVar1) - EVT_ADD(LVar4, 30) - EVT_SET(LVar3, LVar0) - EVT_CALL(MakeLerp, LVar1, LVar4, 7, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetItemPos, MV_LuckyStarItem, LVar3, LVar0, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar3, 2) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(GetPlayerPos, LVar5, LVar6, LVar7) - EVT_ADD(LVar6, 38) - EVT_CALL(MakeLerp, LVar0, LVar6, 7, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetItemPos, MV_LuckyStarItem, LVar3, LVar0, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar3, 2) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(RemoveItemEntity, MV_LuckyStarItem) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_Twink, ANIM_Twink_TossItem) - EVT_WAIT(11) - EVT_CALL(SetNpcAnimation, NPC_Twink, ANIM_Twink_Pleased) - EVT_SET(LVar0, 7) - EVT_SET(LVar1, 4) - EVT_CALL(ShowGotItem, LVar0, TRUE, 0) - EVT_CALL(AddKeyItem, LVar0) - EVT_CALL(N(EnableActionCommands)) - EVT_CALL(SetNpcAnimation, NPC_Twink, ANIM_Twink_Idle) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_HOS_0013) - EVT_CALL(ShowChoice, MSG_Choice_0013) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(ContinueSpeech, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_HOS_0014) - EVT_CALL(ShowChoice, MSG_Choice_0013) - EVT_IF_NE(LVar0, 0) - EVT_CALL(ContinueSpeech, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_HOS_0015) - EVT_ELSE - EVT_GOTO(15) - EVT_END_IF - EVT_ELSE - EVT_LABEL(15) - EVT_CALL(ContinueSpeech, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_HOS_0016) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_HOS_0017) - EVT_CALL(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_HOS_0018) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_CALL(SetNpcVar, NPC_Twink, 0, 1) - EVT_LOOP(0) - EVT_CALL(GetNpcVar, NPC_Twink, 0, LVar0) - EVT_IF_EQ(LVar0, 2) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_IF - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_HOS_002F) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_HOS_0030) - EVT_WAIT(20 * DT) - EVT_EXEC(N(EVS_PlayKammyKoopaSong)) - EVT_CALL(ShowMessageAtScreenPos, MSG_HOS_0031, 320, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -250) - EVT_DIV(LVar0, 2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -250, 53, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.4 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_EXEC_GET_TID(N(EVS_UpdateFacingMagikoopa), LVarA) - EVT_CALL(LoadPath, 67 * DT, EVT_PTR(N(FlightPath_Magikoopa)), ARRAY_COUNT(N(FlightPath_Magikoopa)), EASING_LINEAR) - EVT_LABEL(2) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_FlyingMagikoopa, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_KILL_THREAD(LVarA) - EVT_CHILD_THREAD - EVT_LOOP(0) - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_FlyingMagikoopa, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_FlyingMagikoopa, LVar0, LVar1, LVar2) - EVT_WAIT(2) - EVT_END_LOOP - EVT_WAIT(3) - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_FlyingMagikoopa, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, -1) - EVT_CALL(SetNpcPos, NPC_FlyingMagikoopa, LVar0, LVar1, LVar2) - EVT_WAIT(2) - EVT_END_LOOP - EVT_WAIT(3) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(SetNpcAnimation, NPC_FlyingMagikoopa, ANIM_FlyingMagikoopa_Anim00) - EVT_LOOP(3) - EVT_CALL(SetNpcRotation, NPC_FlyingMagikoopa, 0, 0, 10) - EVT_WAIT(1) - EVT_CALL(SetNpcRotation, NPC_FlyingMagikoopa, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(20 * DT) - EVT_EXEC_GET_TID(N(EVS_ConfusedTwinkLookingAround), LVarA) - EVT_CALL(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Still, 5, MSG_HOS_0032) - EVT_KILL_THREAD(LVarA) - EVT_WAIT(10 * DT) - EVT_CALL(GetNpcPos, NPC_FlyingMagikoopa, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, 0, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(260.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(13.0), EVT_FLOAT(-8.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(SpeakToPlayer, NPC_FlyingMagikoopa, ANIM_FlyingMagikoopa_Anim09, ANIM_FlyingMagikoopa_Anim00, 512, MSG_HOS_0033) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -250) - EVT_DIV(LVar0, 2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetNpcVar, NPC_FlyingMagikoopa, 0, 1) - EVT_CALL(EnablePartnerAI) - EVT_UNBIND - EVT_RETURN - EVT_END + Loop(0) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, -100) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, TRUE) + Call(func_802CF56C, 2) + Thread + Add(LVar0, -20) + Call(PlayerMoveTo, LVar0, LVar2, 10 * DT) + EndThread + Call(SetNpcPos, NPC_Twink, 50, 180, 0) + Call(SetNpcJumpscale, NPC_Twink, 0) + Add(LVar0, -10) + Call(NpcJump0, NPC_Twink, LVar0, 20, LVar2, 15 * DT) + Call(PlaySoundAtPlayer, SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_DEFAULT) + Call(SetPlayerAnimation, ANIM_Mario1_VacantStare) + Call(SetNpcAnimation, NPC_Twink, ANIM_Twink_Cringe) + Thread + Call(SetNpcAnimation, NPC_Twink, ANIM_Twink_Disappointed) + Call(SetNpcJumpscale, NPC_Twink, Float(0.6)) + Call(GetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) + Add(LVar0, -100) + Call(NpcJump0, NPC_Twink, LVar0, 10, LVar2, 20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndThread + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(2.0)) + EndThread + Thread + Set(LVar3, 360) + Loop(3) + Label(22) + Wait(1) + Sub(LVar3, 45) + IfGt(LVar3, 0) + Call(SetNpcRotation, NPC_Twink, 0, LVar3, 0) + IfEq(LVar3, 270) + Call(SetNpcAnimation, NPC_Twink, ANIM_Twink_Back) + EndIf + IfEq(LVar3, 90) + Call(SetNpcAnimation, NPC_Twink, ANIM_Twink_Disappointed) + EndIf + Goto(22) + EndIf + EndLoop + Call(SetNpcRotation, NPC_Twink, 0, 0, 0) + EndThread + Call(ShowMessageAtScreenPos, MSG_HOS_000D, 160, 40) + Call(SetMusicTrack, 0, SONG_TWINK_THEME, 0, 8) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetNpcAnimation, NPC_Twink, ANIM_Twink_Idle) + Call(NpcFacePlayer, NPC_Twink, 0) + Call(SpeakToPlayer, NPC_Twink, ANIM_Twink_Shout, ANIM_Twink_Idle, 0, MSG_HOS_000E) + Call(N(DisableCameraLeadingPlayer)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, -20) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 275) + Call(SetCamPitch, CAM_DEFAULT, Float(16.0), Float(-8.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetNpcSpeed, NPC_Twink, Float(3.0 / DT)) + Call(GetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Call(NpcMoveTo, NPC_Twink, LVar0, LVar2, 0) + Call(ShowEmote, NPC_Twink, EMOTE_SHOCK, 45, 20, EMOTER_NPC, 0, 0, 0, 0) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_Twink, ANIM_Twink_ShoutJoy) + Call(SetNpcJumpscale, NPC_Twink, Float(1.0)) + Loop(2) + Call(GetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Twink, LVar0, LVar1, LVar2, 15 * DT) + EndLoop + Call(DisablePartnerAI, 0) + Call(SetNpcJumpscale, NPC_PARTNER, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 25) + Call(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10 * DT) + Call(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_HOS_000F) + Wait(5 * DT) + Call(GetNpcPos, NPC_Twink, LVar4, LVar5, LVar6) + Call(LoadPath, 70 * DT, Ref(N(TwinkArrivePath)), ARRAY_COUNT(N(TwinkArrivePath)), EASING_LINEAR) + Label(1) + Call(GetNextPathPos) + AddF(LVar1, LVar4) + AddF(LVar2, LVar5) + AddF(LVar3, LVar6) + Call(SetNpcPos, NPC_Twink, LVar1, LVar2, LVar3) + Call(N(HavePartyFaceTwink)) + Wait(1) + IfEq(LVar0, 1) + Goto(1) + EndIf + Call(SetNpcAnimation, NPC_Twink, ANIM_Twink_Idle) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_HOS_0010) + Call(SetNpcYaw, NPC_Twink, 270) + Call(SetNpcAnimation, NPC_Twink, ANIM_Twink_Back) + Call(SpeakToPlayer, NPC_Twink, -1, -1, 5, MSG_HOS_0011) + Call(GetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) + Add(LVar1, 15) + Call(MakeItemEntity, ITEM_LUCKY_STAR, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_DECORATION, 0) + Set(MV_LuckyStarItem, LVar0) + ExecGetTID(N(EVS_Twink_CancelHoverOffset), LVar8) + ExecGetTID(N(EVS_Twink_CarryItem), LVar9) + Call(SetNpcAnimation, NPC_Twink, ANIM_Twink_Wink) + Call(ContinueSpeech, NPC_Twink, -1, -1, 512, MSG_HOS_0012) + Call(GetPlayerPos, LVar5, LVar3, LVar4) + Add(LVar5, -30) + Call(NpcMoveTo, NPC_Twink, LVar5, LVar4, 15 * DT) + KillThread(LVar9) + KillThread(LVar8) + Thread + Call(GetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) + Add(LVar1, 15) + Set(LVar4, LVar1) + Add(LVar4, 30) + Set(LVar3, LVar0) + Call(MakeLerp, LVar1, LVar4, 7, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(SetItemPos, MV_LuckyStarItem, LVar3, LVar0, LVar2) + Wait(1) + Add(LVar3, 2) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(GetPlayerPos, LVar5, LVar6, LVar7) + Add(LVar6, 38) + Call(MakeLerp, LVar0, LVar6, 7, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetItemPos, MV_LuckyStarItem, LVar3, LVar0, LVar2) + Wait(1) + Add(LVar3, 2) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(RemoveItemEntity, MV_LuckyStarItem) + EndThread + Call(SetNpcAnimation, NPC_Twink, ANIM_Twink_TossItem) + Wait(11) + Call(SetNpcAnimation, NPC_Twink, ANIM_Twink_Pleased) + Set(LVar0, 7) + Set(LVar1, 4) + Call(ShowGotItem, LVar0, TRUE, 0) + Call(AddKeyItem, LVar0) + Call(N(EnableActionCommands)) + Call(SetNpcAnimation, NPC_Twink, ANIM_Twink_Idle) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_HOS_0013) + Call(ShowChoice, MSG_Choice_0013) + IfEq(LVar0, 1) + Call(ContinueSpeech, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_HOS_0014) + Call(ShowChoice, MSG_Choice_0013) + IfNe(LVar0, 0) + Call(ContinueSpeech, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_HOS_0015) + Else + Goto(15) + EndIf + Else + Label(15) + Call(ContinueSpeech, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_HOS_0016) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_HOS_0017) + Call(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_HOS_0018) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Call(SetNpcVar, NPC_Twink, 0, 1) + Loop(0) + Call(GetNpcVar, NPC_Twink, 0, LVar0) + IfEq(LVar0, 2) + BreakLoop + EndIf + Wait(1) + EndLoop + EndIf + Call(DisablePartnerAI, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_HOS_002F) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_HOS_0030) + Wait(20 * DT) + Exec(N(EVS_PlayKammyKoopaSong)) + Call(ShowMessageAtScreenPos, MSG_HOS_0031, 320, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Wait(20 * DT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, -250) + Div(LVar0, 2) + Call(SetPanTarget, CAM_DEFAULT, -250, 53, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.4 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(SetPanTarget, CAM_DEFAULT, LVar0, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndThread + ExecGetTID(N(EVS_UpdateFacingMagikoopa), LVarA) + Call(LoadPath, 67 * DT, Ref(N(FlightPath_Magikoopa)), ARRAY_COUNT(N(FlightPath_Magikoopa)), EASING_LINEAR) + Label(2) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_FlyingMagikoopa, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(2) + EndIf + KillThread(LVarA) + ChildThread + Loop(0) + Loop(10) + Call(GetNpcPos, NPC_FlyingMagikoopa, LVar0, LVar1, LVar2) + Add(LVar1, 1) + Call(SetNpcPos, NPC_FlyingMagikoopa, LVar0, LVar1, LVar2) + Wait(2) + EndLoop + Wait(3) + Loop(10) + Call(GetNpcPos, NPC_FlyingMagikoopa, LVar0, LVar1, LVar2) + Add(LVar1, -1) + Call(SetNpcPos, NPC_FlyingMagikoopa, LVar0, LVar1, LVar2) + Wait(2) + EndLoop + Wait(3) + EndLoop + EndChildThread + Call(SetNpcAnimation, NPC_FlyingMagikoopa, ANIM_FlyingMagikoopa_Anim00) + Loop(3) + Call(SetNpcRotation, NPC_FlyingMagikoopa, 0, 0, 10) + Wait(1) + Call(SetNpcRotation, NPC_FlyingMagikoopa, 0, 0, 0) + Wait(1) + EndLoop + Wait(20 * DT) + ExecGetTID(N(EVS_ConfusedTwinkLookingAround), LVarA) + Call(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Still, 5, MSG_HOS_0032) + KillThread(LVarA) + Wait(10 * DT) + Call(GetNpcPos, NPC_FlyingMagikoopa, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, 0, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(260.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(13.0), Float(-8.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(SpeakToPlayer, NPC_FlyingMagikoopa, ANIM_FlyingMagikoopa_Anim09, ANIM_FlyingMagikoopa_Anim00, 512, MSG_HOS_0033) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, -250) + Div(LVar0, 2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, LVar0, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetNpcVar, NPC_FlyingMagikoopa, 0, 1) + Call(EnablePartnerAI) + Unbind + Return + End }; EvtScript N(EVS_Scene_TwinkDeparts) = { - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(SetMusicTrack, 0, SONG_TWINK_THEME, 0, 8) - EVT_WAIT(60 * DT) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, TRUE) - EVT_CALL(GetNpcPos, NPC_Twink, LVar3, LVar1, LVar2) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, LVar3) - EVT_DIV(LVar0, 2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(275.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(16.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(InterpNpcYaw, NPC_Twink, 90, 0) - EVT_CALL(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_HOS_0034) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.5)) - EVT_CALL(PlayerJump, LVar0, LVar1, LVar2, 15 * DT) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_HOS_0035) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(700.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.3 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(GetNpcPos, NPC_Twink, LVar4, LVar5, LVar6) - EVT_CALL(LoadPath, 85 * DT, EVT_PTR(N(TwinkDepartPath1)), ARRAY_COUNT(N(TwinkDepartPath1)), EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_ADDF(LVar3, LVar6) - EVT_CALL(SetNpcPos, NPC_Twink, LVar1, LVar2, LVar3) - EVT_CALL(N(HavePartyFaceTwink)) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(45 * DT) - EVT_THREAD - EVT_CALL(LoadPath, 60 * DT, EVT_PTR(N(TwinkReturnPath)), ARRAY_COUNT(N(TwinkReturnPath)), EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Twink, LVar1, LVar2, LVar3) - EVT_CALL(N(HavePartyFaceTwink)) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(GetNpcPos, NPC_Twink, LVar3, LVar1, LVar2) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, LVar3) - EVT_DIV(LVar0, 2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(275.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(16.0), EVT_FLOAT(-8.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_HOS_0036) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Twink, LVar4, LVar5, LVar6) - EVT_CALL(LoadPath, 120 * DT, EVT_PTR(N(TwinkDepartPath2)), ARRAY_COUNT(N(TwinkDepartPath2)), EASING_QUADRATIC_IN) - EVT_LABEL(2) - EVT_CALL(GetNextPathPos) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_ADDF(LVar3, LVar6) - EVT_CALL(SetNpcPos, NPC_Twink, LVar1, LVar2, LVar3) - EVT_CALL(N(HavePartyFaceTwink)) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(12.5), EVT_FLOAT(-10.0)) - EVT_CALL(N(AddOffsetForCamPos)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, LVar0, LVar1) - EVT_CALL(SetCamPosB, CAM_DEFAULT, LVar2, LVar3) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcFlagBits, NPC_Twink, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) - EVT_SETF(LVar0, EVT_FLOAT(0.0)) - EVT_LOOP(10) - EVT_ADDF(LVar0, EVT_FLOAT(36.0)) - EVT_CALL(SetNpcRotation, NPC_Twink, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcFlagBits, NPC_Twink, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, FALSE) - EVT_WAIT(120 * DT) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_CALL(PlayerFaceNpc, NPC_PARTNER, FALSE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(275.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(13.0), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(10 * DT) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_HOS_0037) - EVT_CALL(EnablePartnerAI) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_THREAD - EVT_SET(GB_StoryProgress, STORY_CH0_TWINK_GAVE_LUCKY_STAR) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_END_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(SetMusicTrack, 0, SONG_TWINK_THEME, 0, 8) + Wait(60 * DT) + Call(SetCamLeadPlayer, CAM_DEFAULT, TRUE) + Call(GetNpcPos, NPC_Twink, LVar3, LVar1, LVar2) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, LVar3) + Div(LVar0, 2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(275.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(16.0), Float(-9.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(InterpNpcYaw, NPC_Twink, 90, 0) + Call(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_HOS_0034) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerJumpscale, Float(0.5)) + Call(PlayerJump, LVar0, LVar1, LVar2, 15 * DT) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_HOS_0035) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(700.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.3 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(GetNpcPos, NPC_Twink, LVar4, LVar5, LVar6) + Call(LoadPath, 85 * DT, Ref(N(TwinkDepartPath1)), ARRAY_COUNT(N(TwinkDepartPath1)), EASING_LINEAR) + Label(0) + Call(GetNextPathPos) + AddF(LVar1, LVar4) + AddF(LVar2, LVar5) + AddF(LVar3, LVar6) + Call(SetNpcPos, NPC_Twink, LVar1, LVar2, LVar3) + Call(N(HavePartyFaceTwink)) + Wait(1) + IfEq(LVar0, 1) + Goto(0) + EndIf + Wait(45 * DT) + Thread + Call(LoadPath, 60 * DT, Ref(N(TwinkReturnPath)), ARRAY_COUNT(N(TwinkReturnPath)), EASING_LINEAR) + Label(1) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Twink, LVar1, LVar2, LVar3) + Call(N(HavePartyFaceTwink)) + Wait(1) + IfEq(LVar0, 1) + Goto(1) + EndIf + EndThread + Wait(30 * DT) + Call(GetNpcPos, NPC_Twink, LVar3, LVar1, LVar2) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, LVar3) + Div(LVar0, 2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(275.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(16.0), Float(-8.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_HOS_0036) + Thread + Call(GetNpcPos, NPC_Twink, LVar4, LVar5, LVar6) + Call(LoadPath, 120 * DT, Ref(N(TwinkDepartPath2)), ARRAY_COUNT(N(TwinkDepartPath2)), EASING_QUADRATIC_IN) + Label(2) + Call(GetNextPathPos) + AddF(LVar1, LVar4) + AddF(LVar2, LVar5) + AddF(LVar3, LVar6) + Call(SetNpcPos, NPC_Twink, LVar1, LVar2, LVar3) + Call(N(HavePartyFaceTwink)) + Wait(1) + IfEq(LVar0, 1) + Goto(2) + EndIf + EndThread + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(12.5), Float(-10.0)) + Call(N(AddOffsetForCamPos)) + Call(SetCamPosA, CAM_DEFAULT, LVar0, LVar1) + Call(SetCamPosB, CAM_DEFAULT, LVar2, LVar3) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(30 * DT) + Call(SetNpcFlagBits, NPC_Twink, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) + SetF(LVar0, Float(0.0)) + Loop(10) + AddF(LVar0, Float(36.0)) + Call(SetNpcRotation, NPC_Twink, 0, LVar0, 0) + Wait(1) + EndLoop + Call(SetNpcFlagBits, NPC_Twink, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, FALSE) + Wait(120 * DT) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + Call(PlayerFaceNpc, NPC_PARTNER, FALSE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(275.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(13.0), Float(-7.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(10 * DT) + Call(DisablePartnerAI, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_HOS_0037) + Call(EnablePartnerAI) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Thread + Set(GB_StoryProgress, STORY_CH0_TWINK_GAVE_LUCKY_STAR) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Call(ResetCam, CAM_DEFAULT, Float(4.0 / DT)) + EndThread + Wait(10 * DT) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_hos/hos_00/hos_00_7_shade_gfx.c b/src/world/area_hos/hos_00/hos_00_7_shade_gfx.c index d48d63f5b2c..8cbb1dc5985 100644 --- a/src/world/area_hos/hos_00/hos_00_7_shade_gfx.c +++ b/src/world/area_hos/hos_00/hos_00_7_shade_gfx.c @@ -15,8 +15,8 @@ void N(setup_gfx_background_shade)(void) { } EvtScript N(EVS_SetupBackgroundShade) = { - EVT_CALL(SetModelCustomGfx, MODEL_g107, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(setup_gfx_background_shade)), NULL) - EVT_RETURN - EVT_END + Call(SetModelCustomGfx, MODEL_g107, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) + Call(SetCustomGfxBuilders, CUSTOM_GFX_1, Ref(N(setup_gfx_background_shade)), NULL) + Return + End }; diff --git a/src/world/area_hos/hos_01/hos_01_1_music.c b/src/world/area_hos/hos_01/hos_01_1_music.c index 6f2d5e8cfd3..ae22502bc70 100644 --- a/src/world/area_hos/hos_01/hos_01_1_music.c +++ b/src/world/area_hos/hos_01/hos_01_1_music.c @@ -1,10 +1,10 @@ #include "hos_01.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, hos_01_ENTRY_0) - EVT_CALL(SetMusicTrack, 0, SONG_SHOOTING_STAR_SUMMIT, 0, 8) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, hos_01_ENTRY_0) + Call(SetMusicTrack, 0, SONG_SHOOTING_STAR_SUMMIT, 0, 8) + EndIf + Return + End }; diff --git a/src/world/area_hos/hos_01/hos_01_2_main.c b/src/world/area_hos/hos_01/hos_01_2_main.c index c99dfd1684c..1d3ef882034 100644 --- a/src/world/area_hos/hos_01/hos_01_2_main.c +++ b/src/world/area_hos/hos_01/hos_01_2_main.c @@ -4,147 +4,147 @@ #include "world/common/todo/GetFloorCollider.inc.c" -//@bug malformed script is missing EVT_RETURN and EVT_END, only works because another EvtScript follows +//@bug malformed script is missing Return and End, only works because another EvtScript follows EvtScript N(EVS_GotoMap_kmr_24_0) = { - EVT_CALL(FadeOutMusic, 0, 1500) - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_24"), kmr_24_ENTRY_0, TRANSITION_AFTER_SAVE_PROMPT) - EVT_WAIT(100) + Call(FadeOutMusic, 0, 1500) + Call(GotoMapSpecial, Ref("kmr_24"), kmr_24_ENTRY_0, TRANSITION_AFTER_SAVE_PROMPT) + Wait(100) }; EvtScript N(EVS_ExitWalk_hos_00_1) = EVT_EXIT_WALK(60, hos_01_ENTRY_0, "hos_00", hos_00_ENTRY_1); EvtScript N(EVS_ExitStarBeam) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_IF_LT(GB_StoryProgress, STORY_CH8_OPENED_PATH_TO_STAR_WAY) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(InterruptUsePartner) - EVT_WAIT(20) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(IsPlayerOnValidFloor, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_EXEC_WAIT(N(EVS_AscendStarBeam)) - EVT_CALL(GotoMap, EVT_PTR("hos_02"), hos_02_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + IfLt(GB_StoryProgress, STORY_CH8_OPENED_PATH_TO_STAR_WAY) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, PARTNER_NONE) + Call(InterruptUsePartner) + Wait(20) + Loop(0) + Wait(1) + Call(IsPlayerOnValidFloor, LVar0) + IfEq(LVar0, TRUE) + BreakLoop + EndIf + EndLoop + EndIf + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + ExecWait(N(EVS_AscendStarBeam)) + Call(GotoMap, Ref("hos_02"), hos_02_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_hos_00_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, hos_01_ENTRY_1) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitStarBeam)), TRIGGER_FLOOR_TOUCH, COLLIDER_deilin, 1, 0) - EVT_END_IF - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_hos_00_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) + Call(GetEntryID, LVar0) + IfNe(LVar0, hos_01_ENTRY_1) + BindTrigger(Ref(N(EVS_ExitStarBeam)), TRIGGER_FLOOR_TOUCH, COLLIDER_deilin, 1, 0) + EndIf + Return + End }; EvtScript N(EVS_EnterStarBeam) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -30, 250, -160) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -30, 250, -160) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_SET(LVar2, 360) - EVT_CALL(MakeLerp, 500, 250, 60, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetPlayerPos, -30, LVar0, -160) - EVT_CALL(SetNpcPos, NPC_PARTNER, -30, LVar0, -170) - EVT_ADD(LVar2, 40) - EVT_CALL(InterpPlayerYaw, LVar2, 0) - EVT_CALL(SetNpcRotation, NPC_PARTNER, 0, LVar2, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(LVar0, LVar2) - EVT_SUB(LVar0, 360) - EVT_SUB(LVar2, LVar0) - EVT_SET(LVar0, 40) - EVT_LABEL(10) - EVT_IF_LT(LVar2, 540) - EVT_CALL(InterpPlayerYaw, LVar2, 0) - EVT_CALL(SetNpcRotation, NPC_PARTNER, 0, LVar2, 0) - EVT_ADD(LVar2, LVar0) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_SET(LVar2, 180) - EVT_SUB(LVar0, 5) - EVT_IF_GT(LVar0, 20) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(SetNpcRotation, NPC_PARTNER, 0, 0, 0) - EVT_CALL(N(func_80240AAC_A1132C), MV_StarBeamFXPtr) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetMusicTrack, 0, SONG_SHOOTING_STAR_SUMMIT, 0, 8) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_LABEL(20) - EVT_CALL(N(GetFloorCollider), LVar0) - EVT_IF_NE(LVar0, COLLIDER_o234) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitStarBeam)), TRIGGER_FLOOR_TOUCH, COLLIDER_deilin, 1, 0) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, -30, 250, -160) + Call(SetPanTarget, CAM_DEFAULT, -30, 250, -160) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Set(LVar2, 360) + Call(MakeLerp, 500, 250, 60, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(SetPlayerPos, -30, LVar0, -160) + Call(SetNpcPos, NPC_PARTNER, -30, LVar0, -170) + Add(LVar2, 40) + Call(InterpPlayerYaw, LVar2, 0) + Call(SetNpcRotation, NPC_PARTNER, 0, LVar2, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Set(LVar0, LVar2) + Sub(LVar0, 360) + Sub(LVar2, LVar0) + Set(LVar0, 40) + Label(10) + IfLt(LVar2, 540) + Call(InterpPlayerYaw, LVar2, 0) + Call(SetNpcRotation, NPC_PARTNER, 0, LVar2, 0) + Add(LVar2, LVar0) + Wait(1) + Goto(10) + EndIf + Set(LVar2, 180) + Sub(LVar0, 5) + IfGt(LVar0, 20) + Goto(10) + EndIf + Call(SetNpcRotation, NPC_PARTNER, 0, 0, 0) + Call(N(func_80240AAC_A1132C), MV_StarBeamFXPtr) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE) + Call(EnablePartnerAI) + Call(DisablePlayerPhysics, FALSE) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetMusicTrack, 0, SONG_SHOOTING_STAR_SUMMIT, 0, 8) + Call(DisablePlayerInput, FALSE) + Label(20) + Call(N(GetFloorCollider), LVar0) + IfNe(LVar0, COLLIDER_o234) + Wait(1) + Goto(20) + EndIf + BindTrigger(Ref(N(EVS_ExitStarBeam)), TRIGGER_FLOOR_TOUCH, COLLIDER_deilin, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHOOTING_STAR_SUMMIT) - EVT_CALL(SetSpriteShading, SHADING_HOS_01) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_THREAD - EVT_LABEL(1) - EVT_IF_NE(GB_StoryProgress, STORY_CH0_MET_STAR_SPIRITS) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC_WAIT(N(EVS_GotoMap_kmr_24_0)) - EVT_END_THREAD - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupModelFX)) - EVT_EXEC(N(EVS_Starfall_Random)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(hos_01_ENTRY_0) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_CASE_EQ(hos_01_ENTRY_1) - EVT_THREAD - EVT_EXEC_WAIT(N(EVS_EnterStarBeam)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_THREAD - EVT_END_SWITCH - EVT_IF_EQ(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_EXEC(N(EVS_Scene_StarWayOpened)) - EVT_END_IF - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_SHOOTING_STAR_SUMMIT) + Call(SetSpriteShading, SHADING_HOS_01) + SetUP_CAMERA_NO_LEAD() + Thread + Label(1) + IfNe(GB_StoryProgress, STORY_CH0_MET_STAR_SPIRITS) + Wait(1) + Goto(1) + EndIf + Call(DisablePlayerInput, TRUE) + ExecWait(N(EVS_GotoMap_kmr_24_0)) + EndThread + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupModelFX)) + Exec(N(EVS_Starfall_Random)) + Exec(N(EVS_SetupMusic)) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(hos_01_ENTRY_0) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + CaseEq(hos_01_ENTRY_1) + Thread + ExecWait(N(EVS_EnterStarBeam)) + Exec(N(EVS_BindExitTriggers)) + EndThread + EndSwitch + IfEq(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) + Exec(N(EVS_Scene_StarWayOpened)) + EndIf + Return + End }; diff --git a/src/world/area_hos/hos_01/hos_01_3_model_fx.c b/src/world/area_hos/hos_01/hos_01_3_model_fx.c index b429243686d..0cba339af27 100644 --- a/src/world/area_hos/hos_01/hos_01_3_model_fx.c +++ b/src/world/area_hos/hos_01/hos_01_3_model_fx.c @@ -59,147 +59,147 @@ API_CALLABLE(N(SetGivingPowerAlpha)) { } EvtScript N(EVS_UpdateGivingPower) = { - EVT_LOOP(0) - EVT_CALL(MakeLerp, 180, 80, 45, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetGivingPowerAlpha), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 80, 180, 35, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetGivingPowerAlpha), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(MakeLerp, 180, 80, 45, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(N(SetGivingPowerAlpha), LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 80, 180, 35, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(N(SetGivingPowerAlpha), LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_SetupModelFX) = { - EVT_THREAD + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_4) TEX_PAN_PARAMS_STEP( 0, 0, -170, -70) TEX_PAN_PARAMS_FREQ( 0, 0, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_5) TEX_PAN_PARAMS_STEP( 0, 0, 200, -100) TEX_PAN_PARAMS_FREQ( 0, 0, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_o178, TEX_PANNER_4) - EVT_CALL(SetTexPanner, MODEL_o179, TEX_PANNER_4) - EVT_CALL(SetTexPanner, MODEL_o208, TEX_PANNER_5) - EVT_CALL(SetTexPanner, MODEL_o211, TEX_PANNER_5) - EVT_IF_LT(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(EnableModel, MODEL_7, FALSE) - EVT_IF_LT(GB_StoryProgress, STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_CALL(EnableModel, MODEL_6, FALSE) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(EnableModel, MODEL_5, FALSE) - EVT_IF_LT(GB_StoryProgress, STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_CALL(EnableModel, MODEL_4, FALSE) - EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_CALL(EnableModel, MODEL_3, FALSE) - EVT_IF_LT(GB_StoryProgress, STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_CALL(EnableModel, MODEL_2, FALSE) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_CALL(EnableModel, MODEL_1, FALSE) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH8_OPENED_PATH_TO_STAR_WAY) - EVT_CALL(EnableModel, MODEL_power, FALSE) - EVT_ELSE - EVT_PLAY_EFFECT(EFFECT_75, 0, -30, 250, -160, 1, -1) - EVT_SET(MV_StarBeamFXPtr, LVarF) - EVT_SET(LVar0, 255) - EVT_CALL(N(SetStarBeamMasterAlpha), MV_StarBeamFXPtr, LVar0) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, hos_01_ENTRY_1) - EVT_CALL(N(func_80240B10_A11390), MV_StarBeamFXPtr) - EVT_ELSE - EVT_CALL(N(func_80240AAC_A1132C), MV_StarBeamFXPtr) - EVT_END_IF - EVT_END_IF - EVT_CALL(SetRenderMode, MODEL_1, RENDER_MODE_SURFACE_XLU_LAYER2) - EVT_CALL(SetRenderMode, MODEL_2, RENDER_MODE_SURFACE_XLU_LAYER2) - EVT_CALL(SetRenderMode, MODEL_3, RENDER_MODE_SURFACE_XLU_LAYER2) - EVT_CALL(SetRenderMode, MODEL_4, RENDER_MODE_SURFACE_XLU_LAYER2) - EVT_CALL(SetRenderMode, MODEL_5, RENDER_MODE_SURFACE_XLU_LAYER2) - EVT_CALL(SetRenderMode, MODEL_6, RENDER_MODE_SURFACE_XLU_LAYER2) - EVT_CALL(SetRenderMode, MODEL_7, RENDER_MODE_SURFACE_XLU_LAYER2) - EVT_CALL(SetModelCustomGfx, MODEL_1, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_2, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_3, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_4, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_5, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_6, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_7, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_0, EVT_PTR(N(setup_gfx_glowing_star)), NULL) - EVT_CALL(TranslateModel, MODEL_power, 0, 2, 0) - EVT_CALL(SetModelCustomGfx, MODEL_power, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(setup_gfx_giving_power)), NULL) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(MakeLerp, 255, 100, 60, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetGlowingStarAlpha), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 100, 255, 35, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetGlowingStarAlpha), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_IF_GE(GB_StoryProgress, STORY_CH8_OPENED_PATH_TO_STAR_WAY) - EVT_EXEC_WAIT(N(EVS_UpdateGivingPower)) - EVT_ELSE - EVT_CALL(N(SetGivingPowerAlpha), 0) - EVT_LABEL(10) - EVT_IF_NE(MV_StarBeamState, 1) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(MakeLerp, 0, 180, 55, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetGivingPowerAlpha), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(MV_StarBeamState, 2) - EVT_EXEC_WAIT(N(EVS_UpdateGivingPower)) - EVT_END_IF - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetTexPanner, MODEL_o178, TEX_PANNER_4) + Call(SetTexPanner, MODEL_o179, TEX_PANNER_4) + Call(SetTexPanner, MODEL_o208, TEX_PANNER_5) + Call(SetTexPanner, MODEL_o211, TEX_PANNER_5) + IfLt(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) + Call(EnableModel, MODEL_7, FALSE) + IfLt(GB_StoryProgress, STORY_CH6_STAR_SPIRIT_RESCUED) + Call(EnableModel, MODEL_6, FALSE) + IfLt(GB_StoryProgress, STORY_CH5_STAR_SPRIT_DEPARTED) + Call(EnableModel, MODEL_5, FALSE) + IfLt(GB_StoryProgress, STORY_CH4_STAR_SPRIT_DEPARTED) + Call(EnableModel, MODEL_4, FALSE) + IfLt(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED) + Call(EnableModel, MODEL_3, FALSE) + IfLt(GB_StoryProgress, STORY_CH2_STAR_SPRIT_DEPARTED) + Call(EnableModel, MODEL_2, FALSE) + IfLt(GB_StoryProgress, STORY_CH1_STAR_SPRIT_DEPARTED) + Call(EnableModel, MODEL_1, FALSE) + EndIf + EndIf + EndIf + EndIf + EndIf + EndIf + EndIf + IfLt(GB_StoryProgress, STORY_CH8_OPENED_PATH_TO_STAR_WAY) + Call(EnableModel, MODEL_power, FALSE) + Else + PlayEffect(EFFECT_75, 0, -30, 250, -160, 1, -1) + Set(MV_StarBeamFXPtr, LVarF) + Set(LVar0, 255) + Call(N(SetStarBeamMasterAlpha), MV_StarBeamFXPtr, LVar0) + Call(GetEntryID, LVar0) + IfEq(LVar0, hos_01_ENTRY_1) + Call(N(func_80240B10_A11390), MV_StarBeamFXPtr) + Else + Call(N(func_80240AAC_A1132C), MV_StarBeamFXPtr) + EndIf + EndIf + Call(SetRenderMode, MODEL_1, RENDER_MODE_SURFACE_XLU_LAYER2) + Call(SetRenderMode, MODEL_2, RENDER_MODE_SURFACE_XLU_LAYER2) + Call(SetRenderMode, MODEL_3, RENDER_MODE_SURFACE_XLU_LAYER2) + Call(SetRenderMode, MODEL_4, RENDER_MODE_SURFACE_XLU_LAYER2) + Call(SetRenderMode, MODEL_5, RENDER_MODE_SURFACE_XLU_LAYER2) + Call(SetRenderMode, MODEL_6, RENDER_MODE_SURFACE_XLU_LAYER2) + Call(SetRenderMode, MODEL_7, RENDER_MODE_SURFACE_XLU_LAYER2) + Call(SetModelCustomGfx, MODEL_1, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_2, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_3, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_4, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_5, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_6, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_7, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetCustomGfxBuilders, CUSTOM_GFX_0, Ref(N(setup_gfx_glowing_star)), NULL) + Call(TranslateModel, MODEL_power, 0, 2, 0) + Call(SetModelCustomGfx, MODEL_power, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) + Call(SetCustomGfxBuilders, CUSTOM_GFX_1, Ref(N(setup_gfx_giving_power)), NULL) + Thread + Loop(0) + Call(MakeLerp, 255, 100, 60, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(N(SetGlowingStarAlpha), LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 100, 255, 35, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(N(SetGlowingStarAlpha), LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + EndThread + Thread + IfGe(GB_StoryProgress, STORY_CH8_OPENED_PATH_TO_STAR_WAY) + ExecWait(N(EVS_UpdateGivingPower)) + Else + Call(N(SetGivingPowerAlpha), 0) + Label(10) + IfNe(MV_StarBeamState, 1) + Wait(1) + Goto(10) + EndIf + Call(MakeLerp, 0, 180, 55, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(N(SetGivingPowerAlpha), LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Set(MV_StarBeamState, 2) + ExecWait(N(EVS_UpdateGivingPower)) + EndIf + EndThread + Return + End }; diff --git a/src/world/area_hos/hos_01/hos_01_4_npc.c b/src/world/area_hos/hos_01/hos_01_4_npc.c index ce8dc6b9d1c..b407dfe13ec 100644 --- a/src/world/area_hos/hos_01/hos_01_4_npc.c +++ b/src/world/area_hos/hos_01/hos_01_4_npc.c @@ -18,436 +18,436 @@ API_CALLABLE(N(DrawAppearSparkles)) { #include "world/common/npc/StarSpirit.inc.c" EvtScript N(EVS_MuteMusicOnPlayerApproach) = { - EVT_SET(LVarA, 0) - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GE(LVar1, 245) - EVT_CALL(IsPlayerWithin, -30, -165, 180, LVar3) - EVT_IF_EQ(LVar3, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_LABEL(10) - EVT_SET(LVarA, 1) - EVT_CALL(FadeOutMusic, 0, 2000) - EVT_WAIT(60) - EVT_LABEL(20) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar1, 245) - EVT_CALL(IsPlayerWithin, -30, -165, 180, LVar3) - EVT_IF_EQ(LVar3, 0) - EVT_GOTO(30) - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(20) - EVT_LABEL(30) - EVT_CALL(SetMusicTrack, 0, SONG_SHOOTING_STAR_SUMMIT, 0, 8) - EVT_WAIT(30) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVarA, 0) + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGe(LVar1, 245) + Call(IsPlayerWithin, -30, -165, 180, LVar3) + IfEq(LVar3, 1) + Goto(10) + EndIf + EndIf + Wait(1) + Goto(0) + Label(10) + Set(LVarA, 1) + Call(FadeOutMusic, 0, 2000) + Wait(60) + Label(20) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar1, 245) + Call(IsPlayerWithin, -30, -165, 180, LVar3) + IfEq(LVar3, 0) + Goto(30) + EndIf + EndIf + Wait(1) + Goto(20) + Label(30) + Call(SetMusicTrack, 0, SONG_SHOOTING_STAR_SUMMIT, 0, 8) + Wait(30) + Goto(0) + Return + End }; EvtScript N(EVS_Scene_StarSpiritsPlea) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -35, 250, -145) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -35, 250, -145) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(20.0), EVT_FLOAT(-5.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.5 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(func_802D2C14, 2) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 30) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, 0) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 15 * DT) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_END_THREAD - EVT_CALL(SetMusicTrack, 0, SONG_STAR_SPIRIT_THEME, 1, 8) - EVT_CALL(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 0, MSG_HOS_0000) - EVT_WAIT(10 * DT) - EVT_WAIT(1) - EVT_CALL(PlayerFaceNpc, NPC_Eldstar, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Eldstar, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcJumpscale, NPC_Eldstar, 0) - EVT_CALL(NpcJump0, NPC_Eldstar, 21, 260, -277, 30 * DT) - EVT_CALL(EnableModel, MODEL_1, TRUE) - EVT_CALL(PlaySound, SOUND_MULTIPLE_STAR_SPIRITS_APPEAR) - EVT_CALL(GetNpcPos, NPC_Mamar, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_CALL(N(DrawAppearSparkles), 0, LVar0, LVar1, LVar2, 10) - EVT_CALL(GetNpcPos, NPC_Skolar, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_CALL(N(DrawAppearSparkles), 0, LVar0, LVar1, LVar2, 10) - EVT_CALL(GetNpcPos, NPC_Muskular, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_CALL(N(DrawAppearSparkles), 0, LVar0, LVar1, LVar2, 10) - EVT_CALL(GetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_CALL(N(DrawAppearSparkles), 0, LVar0, LVar1, LVar2, 10) - EVT_CALL(GetNpcPos, NPC_Klevar, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_CALL(N(DrawAppearSparkles), 0, LVar0, LVar1, LVar2, 10) - EVT_CALL(GetNpcPos, NPC_Kalmar, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_CALL(N(DrawAppearSparkles), 0, LVar0, LVar1, LVar2, 10) - EVT_CALL(EnableModel, MODEL_2, TRUE) - EVT_CALL(EnableModel, MODEL_3, TRUE) - EVT_CALL(EnableModel, MODEL_4, TRUE) - EVT_CALL(EnableModel, MODEL_5, TRUE) - EVT_CALL(EnableModel, MODEL_6, TRUE) - EVT_CALL(EnableModel, MODEL_7, TRUE) - EVT_SETF(MV_AlphaAmt_Others, EVT_FLOAT(-80.0)) - EVT_LOOP(20 * DT) + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(UseSettingsFrom, CAM_DEFAULT, -35, 250, -145) + Call(SetPanTarget, CAM_DEFAULT, -35, 250, -145) + Call(SetCamDistance, CAM_DEFAULT, 450) + Call(SetCamPitch, CAM_DEFAULT, Float(20.0), Float(-5.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.5 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(func_802D2C14, 2) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar2, 30) + Call(SetNpcJumpscale, NPC_PARTNER, 0) + Call(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 15 * DT) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + EndThread + Call(SetMusicTrack, 0, SONG_STAR_SPIRIT_THEME, 1, 8) + Call(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 0, MSG_HOS_0000) + Wait(10 * DT) + Wait(1) + Call(PlayerFaceNpc, NPC_Eldstar, TRUE) + Call(SetNpcFlagBits, NPC_Eldstar, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcJumpscale, NPC_Eldstar, 0) + Call(NpcJump0, NPC_Eldstar, 21, 260, -277, 30 * DT) + Call(EnableModel, MODEL_1, TRUE) + Call(PlaySound, SOUND_MULTIPLE_STAR_SPIRITS_APPEAR) + Call(GetNpcPos, NPC_Mamar, LVar0, LVar1, LVar2) + Add(LVar1, 15) + Call(N(DrawAppearSparkles), 0, LVar0, LVar1, LVar2, 10) + Call(GetNpcPos, NPC_Skolar, LVar0, LVar1, LVar2) + Add(LVar1, 15) + Call(N(DrawAppearSparkles), 0, LVar0, LVar1, LVar2, 10) + Call(GetNpcPos, NPC_Muskular, LVar0, LVar1, LVar2) + Add(LVar1, 15) + Call(N(DrawAppearSparkles), 0, LVar0, LVar1, LVar2, 10) + Call(GetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) + Add(LVar1, 15) + Call(N(DrawAppearSparkles), 0, LVar0, LVar1, LVar2, 10) + Call(GetNpcPos, NPC_Klevar, LVar0, LVar1, LVar2) + Add(LVar1, 15) + Call(N(DrawAppearSparkles), 0, LVar0, LVar1, LVar2, 10) + Call(GetNpcPos, NPC_Kalmar, LVar0, LVar1, LVar2) + Add(LVar1, 15) + Call(N(DrawAppearSparkles), 0, LVar0, LVar1, LVar2, 10) + Call(EnableModel, MODEL_2, TRUE) + Call(EnableModel, MODEL_3, TRUE) + Call(EnableModel, MODEL_4, TRUE) + Call(EnableModel, MODEL_5, TRUE) + Call(EnableModel, MODEL_6, TRUE) + Call(EnableModel, MODEL_7, TRUE) + SetF(MV_AlphaAmt_Others, Float(-80.0)) + Loop(20 * DT) #if VERSION_PAL - EVT_ADDF(MV_AlphaAmt_Others, EVT_FLOAT(7.203)) + AddF(MV_AlphaAmt_Others, Float(7.203)) #else - EVT_ADDF(MV_AlphaAmt_Others, EVT_FLOAT(6.0)) + AddF(MV_AlphaAmt_Others, Float(6.0)) #endif - EVT_WAIT(1) - EVT_END_LOOP + Wait(1) + EndLoop #if VERSION_PAL - EVT_SETF(MV_AlphaAmt_Others, EVT_FLOAT(40.0)) + SetF(MV_AlphaAmt_Others, Float(40.0)) #endif - EVT_CALL(EnableNpcShadow, NPC_Mamar, TRUE) - EVT_CALL(EnableNpcShadow, NPC_Skolar, TRUE) - EVT_CALL(EnableNpcShadow, NPC_Muskular, TRUE) - EVT_CALL(EnableNpcShadow, NPC_Misstar, TRUE) - EVT_CALL(EnableNpcShadow, NPC_Klevar, TRUE) - EVT_CALL(EnableNpcShadow, NPC_Kalmar, TRUE) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 0, MSG_HOS_0001) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 270) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.8 / DT)) - EVT_CALL(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(20.0), EVT_FLOAT(-6.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 0, MSG_HOS_0002) - EVT_CALL(GetNpcPos, NPC_Mamar, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(20.0), EVT_FLOAT(-6.9)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Mamar, ANIM_WorldMamar_TalkHappy, ANIM_WorldEldstar_Idle, 0, MSG_HOS_0003) - EVT_CALL(GetNpcPos, NPC_Skolar, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(20.0), EVT_FLOAT(-7.3)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Skolar, ANIM_WorldSkolar_TalkAngry, ANIM_WorldMamar_Idle, 0, MSG_HOS_0004) - EVT_CALL(GetNpcPos, NPC_Muskular, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(20.0), EVT_FLOAT(-7.7)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Muskular, ANIM_WorldMuskular_Talk, ANIM_WorldMuskular_Idle, 0, MSG_HOS_0005) - EVT_CALL(GetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(20.0), EVT_FLOAT(-7.7)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Misstar, ANIM_WorldMisstar_Talk, ANIM_WorldMisstar_Idle, 0, MSG_HOS_0006) - EVT_CALL(GetNpcPos, NPC_Klevar, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(20.0), EVT_FLOAT(-7.3)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Klevar, ANIM_WorldKlevar_Talk, ANIM_WorldKlevar_Idle, 0, MSG_HOS_0007) - EVT_CALL(GetNpcPos, NPC_Kalmar, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(20.0), EVT_FLOAT(-6.9)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Kalmar, ANIM_WorldKalmar_Talk, ANIM_WorldKalmar_Idle, 0, MSG_HOS_0008) - EVT_SET(AB_HOS_StatcAmt_Kalmar, 200) - EVT_WAIT(30 * DT) - EVT_SET(AB_HOS_StatcAmt_Kalmar, 0) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_Kalmar, ANIM_WorldKalmar_Talk, ANIM_WorldKalmar_Idle, 0, MSG_HOS_0009) - EVT_CALL(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, -300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(16.0), EVT_FLOAT(-6.0)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 0, MSG_HOS_000A) - EVT_SET(AB_HOS_StatcAmt_Eldstar, 200) - EVT_SET(AB_HOS_StatcAmt_Mamar, 200) - EVT_SET(AB_HOS_StatcAmt_Skolar, 200) - EVT_SET(AB_HOS_StatcAmt_Muskular, 200) - EVT_SET(AB_HOS_StatcAmt_Misstar, 200) - EVT_SET(AB_HOS_StatcAmt_Klevar, 200) - EVT_SET(AB_HOS_StatcAmt_Kalmar, 200) - EVT_WAIT(30 * DT) - EVT_SET(AB_HOS_StatcAmt_Eldstar, 0) - EVT_SET(AB_HOS_StatcAmt_Mamar, 0) - EVT_SET(AB_HOS_StatcAmt_Skolar, 0) - EVT_SET(AB_HOS_StatcAmt_Muskular, 0) - EVT_SET(AB_HOS_StatcAmt_Misstar, 0) - EVT_SET(AB_HOS_StatcAmt_Klevar, 0) - EVT_SET(AB_HOS_StatcAmt_Kalmar, 0) - EVT_CALL(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 0, MSG_HOS_000B) - EVT_CALL(EnableNpcShadow, NPC_Eldstar, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Mamar, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Skolar, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Muskular, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Misstar, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Klevar, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Kalmar, FALSE) - EVT_CALL(FullyRestoreHPandFP) - EVT_SET(AB_HOS_StatcAmt_Eldstar, 100) - EVT_SET(AB_HOS_StatcAmt_Mamar, 100) - EVT_SET(AB_HOS_StatcAmt_Skolar, 100) - EVT_SET(AB_HOS_StatcAmt_Muskular, 100) - EVT_SET(AB_HOS_StatcAmt_Misstar, 100) - EVT_SET(AB_HOS_StatcAmt_Klevar, 100) - EVT_SET(AB_HOS_StatcAmt_Kalmar, 100) - EVT_SETF(MV_AlphaAmt_Eldstar, EVT_FLOAT(40.0)) - EVT_SETF(MV_AlphaAmt_Others, EVT_FLOAT(40.0)) - EVT_LOOP(20 * DT) - EVT_ADDF(MV_AlphaAmt_Eldstar, EVT_FLOAT(-6.0 / DT)) - EVT_ADDF(MV_AlphaAmt_Others, EVT_FLOAT(-6.0 / DT)) - EVT_WAIT(1) - EVT_END_LOOP + Call(EnableNpcShadow, NPC_Mamar, TRUE) + Call(EnableNpcShadow, NPC_Skolar, TRUE) + Call(EnableNpcShadow, NPC_Muskular, TRUE) + Call(EnableNpcShadow, NPC_Misstar, TRUE) + Call(EnableNpcShadow, NPC_Klevar, TRUE) + Call(EnableNpcShadow, NPC_Kalmar, TRUE) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 0, MSG_HOS_0001) + Call(SetCamDistance, CAM_DEFAULT, 270) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.8 / DT)) + Call(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamPitch, CAM_DEFAULT, Float(20.0), Float(-6.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 0, MSG_HOS_0002) + Call(GetNpcPos, NPC_Mamar, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamPitch, CAM_DEFAULT, Float(20.0), Float(-6.9)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Mamar, ANIM_WorldMamar_TalkHappy, ANIM_WorldEldstar_Idle, 0, MSG_HOS_0003) + Call(GetNpcPos, NPC_Skolar, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamPitch, CAM_DEFAULT, Float(20.0), Float(-7.3)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Skolar, ANIM_WorldSkolar_TalkAngry, ANIM_WorldMamar_Idle, 0, MSG_HOS_0004) + Call(GetNpcPos, NPC_Muskular, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamPitch, CAM_DEFAULT, Float(20.0), Float(-7.7)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Muskular, ANIM_WorldMuskular_Talk, ANIM_WorldMuskular_Idle, 0, MSG_HOS_0005) + Call(GetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamPitch, CAM_DEFAULT, Float(20.0), Float(-7.7)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Misstar, ANIM_WorldMisstar_Talk, ANIM_WorldMisstar_Idle, 0, MSG_HOS_0006) + Call(GetNpcPos, NPC_Klevar, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamPitch, CAM_DEFAULT, Float(20.0), Float(-7.3)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Klevar, ANIM_WorldKlevar_Talk, ANIM_WorldKlevar_Idle, 0, MSG_HOS_0007) + Call(GetNpcPos, NPC_Kalmar, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamPitch, CAM_DEFAULT, Float(20.0), Float(-6.9)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Kalmar, ANIM_WorldKalmar_Talk, ANIM_WorldKalmar_Idle, 0, MSG_HOS_0008) + Set(AB_HOS_StatcAmt_Kalmar, 200) + Wait(30 * DT) + Set(AB_HOS_StatcAmt_Kalmar, 0) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_Kalmar, ANIM_WorldKalmar_Talk, ANIM_WorldKalmar_Idle, 0, MSG_HOS_0009) + Call(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, -300) + Call(SetCamPitch, CAM_DEFAULT, Float(16.0), Float(-6.0)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 0, MSG_HOS_000A) + Set(AB_HOS_StatcAmt_Eldstar, 200) + Set(AB_HOS_StatcAmt_Mamar, 200) + Set(AB_HOS_StatcAmt_Skolar, 200) + Set(AB_HOS_StatcAmt_Muskular, 200) + Set(AB_HOS_StatcAmt_Misstar, 200) + Set(AB_HOS_StatcAmt_Klevar, 200) + Set(AB_HOS_StatcAmt_Kalmar, 200) + Wait(30 * DT) + Set(AB_HOS_StatcAmt_Eldstar, 0) + Set(AB_HOS_StatcAmt_Mamar, 0) + Set(AB_HOS_StatcAmt_Skolar, 0) + Set(AB_HOS_StatcAmt_Muskular, 0) + Set(AB_HOS_StatcAmt_Misstar, 0) + Set(AB_HOS_StatcAmt_Klevar, 0) + Set(AB_HOS_StatcAmt_Kalmar, 0) + Call(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 0, MSG_HOS_000B) + Call(EnableNpcShadow, NPC_Eldstar, FALSE) + Call(EnableNpcShadow, NPC_Mamar, FALSE) + Call(EnableNpcShadow, NPC_Skolar, FALSE) + Call(EnableNpcShadow, NPC_Muskular, FALSE) + Call(EnableNpcShadow, NPC_Misstar, FALSE) + Call(EnableNpcShadow, NPC_Klevar, FALSE) + Call(EnableNpcShadow, NPC_Kalmar, FALSE) + Call(FullyRestoreHPandFP) + Set(AB_HOS_StatcAmt_Eldstar, 100) + Set(AB_HOS_StatcAmt_Mamar, 100) + Set(AB_HOS_StatcAmt_Skolar, 100) + Set(AB_HOS_StatcAmt_Muskular, 100) + Set(AB_HOS_StatcAmt_Misstar, 100) + Set(AB_HOS_StatcAmt_Klevar, 100) + Set(AB_HOS_StatcAmt_Kalmar, 100) + SetF(MV_AlphaAmt_Eldstar, Float(40.0)) + SetF(MV_AlphaAmt_Others, Float(40.0)) + Loop(20 * DT) + AddF(MV_AlphaAmt_Eldstar, Float(-6.0 / DT)) + AddF(MV_AlphaAmt_Others, Float(-6.0 / DT)) + Wait(1) + EndLoop #if VERSION_PAL - EVT_SETF(MapVar(0), EVT_FLOAT(-80.0)) - EVT_SETF(MapVar(1), EVT_FLOAT(-80.0)) + SetF(MapVar(0), Float(-80.0)) + SetF(MapVar(1), Float(-80.0)) #endif - EVT_SET(MF_SpiritsGone, TRUE) - EVT_SET(AB_HOS_StatcAmt_Eldstar, 0) - EVT_SET(AB_HOS_StatcAmt_Mamar, 0) - EVT_SET(AB_HOS_StatcAmt_Skolar, 0) - EVT_SET(AB_HOS_StatcAmt_Muskular, 0) - EVT_SET(AB_HOS_StatcAmt_Misstar, 0) - EVT_SET(AB_HOS_StatcAmt_Klevar, 0) - EVT_SET(AB_HOS_StatcAmt_Kalmar, 0) - EVT_CALL(EnableModel, MODEL_1, FALSE) - EVT_CALL(EnableModel, MODEL_2, FALSE) - EVT_CALL(EnableModel, MODEL_3, FALSE) - EVT_CALL(EnableModel, MODEL_4, FALSE) - EVT_CALL(EnableModel, MODEL_5, FALSE) - EVT_CALL(EnableModel, MODEL_6, FALSE) - EVT_CALL(EnableModel, MODEL_7, FALSE) - EVT_CALL(DisablePartnerAI, 0) - EVT_WAIT(10 * DT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(N(SwitchToPartner), PARTNER_GOOMBARIO) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_ADD(LVar2, 30) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(2.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 0) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(PlayerFaceNpc, NPC_PARTNER, FALSE) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_HOS_000C) - EVT_CALL(EnablePartnerAI) - EVT_THREAD - EVT_SET(GB_StoryProgress, STORY_CH0_MET_STAR_SPIRITS) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(1.5 / DT)) - EVT_END_THREAD - EVT_CALL(FadeOutMusic, 0, 3000 * DT) - EVT_WAIT(10 * DT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Set(MF_SpiritsGone, TRUE) + Set(AB_HOS_StatcAmt_Eldstar, 0) + Set(AB_HOS_StatcAmt_Mamar, 0) + Set(AB_HOS_StatcAmt_Skolar, 0) + Set(AB_HOS_StatcAmt_Muskular, 0) + Set(AB_HOS_StatcAmt_Misstar, 0) + Set(AB_HOS_StatcAmt_Klevar, 0) + Set(AB_HOS_StatcAmt_Kalmar, 0) + Call(EnableModel, MODEL_1, FALSE) + Call(EnableModel, MODEL_2, FALSE) + Call(EnableModel, MODEL_3, FALSE) + Call(EnableModel, MODEL_4, FALSE) + Call(EnableModel, MODEL_5, FALSE) + Call(EnableModel, MODEL_6, FALSE) + Call(EnableModel, MODEL_7, FALSE) + Call(DisablePartnerAI, 0) + Wait(10 * DT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(N(SwitchToPartner), PARTNER_GOOMBARIO) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Add(LVar2, 30) + Call(SetNpcSpeed, NPC_PARTNER, Float(2.0 / DT)) + Call(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 0) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(PlayerFaceNpc, NPC_PARTNER, FALSE) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_HOS_000C) + Call(EnablePartnerAI) + Thread + Set(GB_StoryProgress, STORY_CH0_MET_STAR_SPIRITS) + Call(ResetCam, CAM_DEFAULT, Float(1.5 / DT)) + EndThread + Call(FadeOutMusic, 0, 3000 * DT) + Wait(10 * DT) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_Eldstar) = { - EVT_EXEC(N(EVS_Scene_StarSpiritsPlea)) - EVT_RETURN - EVT_END + Exec(N(EVS_Scene_StarSpiritsPlea)) + Return + End }; EvtScript N(EVS_NpcAux_Eldstar) = { - EVT_SET(AB_HOS_StatcAmt_Eldstar, 0) - EVT_SET(AB_HOS_StatcAmt_Mamar, 0) - EVT_SET(AB_HOS_StatcAmt_Skolar, 0) - EVT_SET(AB_HOS_StatcAmt_Muskular, 0) - EVT_SET(AB_HOS_StatcAmt_Misstar, 0) - EVT_SET(AB_HOS_StatcAmt_Klevar, 0) - EVT_SET(AB_HOS_StatcAmt_Kalmar, 0) - EVT_THREAD - EVT_LOOP(0) - EVT_IF_EQ(AB_HOS_StatcAmt_Eldstar, 0) - EVT_CALL(RandInt, 45, LVar1) - EVT_ADD(LVar1, 105) - EVT_SET(AB_HOS_StatcAmt_Eldstar, 200) - EVT_WAIT(10) - EVT_SET(AB_HOS_StatcAmt_Eldstar, 0) - EVT_WAIT(LVar1) - EVT_ELSE - EVT_WAIT(1) - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(0) - EVT_IF_EQ(AB_HOS_StatcAmt_Mamar, 0) - EVT_CALL(RandInt, 45, LVar1) - EVT_ADD(LVar1, 105) - EVT_SET(AB_HOS_StatcAmt_Mamar, 200) - EVT_WAIT(10) - EVT_SET(AB_HOS_StatcAmt_Mamar, 0) - EVT_WAIT(LVar1) - EVT_ELSE - EVT_WAIT(1) - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(0) - EVT_IF_EQ(AB_HOS_StatcAmt_Skolar, 0) - EVT_CALL(RandInt, 45, LVar1) - EVT_ADD(LVar1, 105) - EVT_SET(AB_HOS_StatcAmt_Skolar, 200) - EVT_WAIT(10) - EVT_SET(AB_HOS_StatcAmt_Skolar, 0) - EVT_WAIT(LVar1) - EVT_ELSE - EVT_WAIT(1) - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(0) - EVT_IF_EQ(AB_HOS_StatcAmt_Muskular, 0) - EVT_CALL(RandInt, 45, LVar1) - EVT_ADD(LVar1, 105) - EVT_SET(AB_HOS_StatcAmt_Muskular, 200) - EVT_WAIT(10) - EVT_SET(AB_HOS_StatcAmt_Muskular, 0) - EVT_WAIT(LVar1) - EVT_ELSE - EVT_WAIT(1) - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(0) - EVT_IF_EQ(AB_HOS_StatcAmt_Misstar, 0) - EVT_CALL(RandInt, 45, LVar1) - EVT_ADD(LVar1, 105) - EVT_SET(AB_HOS_StatcAmt_Misstar, 200) - EVT_WAIT(10) - EVT_SET(AB_HOS_StatcAmt_Misstar, 0) - EVT_WAIT(LVar1) - EVT_ELSE - EVT_WAIT(1) - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(0) - EVT_IF_EQ(AB_HOS_StatcAmt_Klevar, 0) - EVT_CALL(RandInt, 45, LVar1) - EVT_ADD(LVar1, 105) - EVT_SET(AB_HOS_StatcAmt_Klevar, 200) - EVT_WAIT(10) - EVT_SET(AB_HOS_StatcAmt_Klevar, 0) - EVT_WAIT(LVar1) - EVT_ELSE - EVT_WAIT(1) - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(0) - EVT_IF_EQ(AB_HOS_StatcAmt_Kalmar, 0) - EVT_CALL(RandInt, 45, LVar1) - EVT_ADD(LVar1, 105) - EVT_SET(AB_HOS_StatcAmt_Kalmar, 200) - EVT_WAIT(10) - EVT_SET(AB_HOS_StatcAmt_Kalmar, 0) - EVT_WAIT(LVar1) - EVT_ELSE - EVT_WAIT(1) - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_LOOP(0) - EVT_SETF(LVar0, 0) - EVT_SETF(LVar1, 0) - EVT_LOOP(20) - EVT_ADDF(LVar0, EVT_FLOAT(4.0)) - EVT_ADDF(LVar1, EVT_FLOAT(4.0)) - EVT_SETF(LVar2, LVar0) - EVT_ADDF(LVar2, MV_AlphaAmt_Eldstar) - EVT_SETF(LVar3, LVar1) - EVT_ADDF(LVar3, MV_AlphaAmt_Others) - EVT_IF_LT(LVar2, 0) - EVT_SETF(LVar2, EVT_FLOAT(0.0)) - EVT_END_IF - EVT_IF_LT(LVar3, 0) - EVT_SETF(LVar3, EVT_FLOAT(0.0)) - EVT_END_IF - EVT_CALL(SetNpcImgFXParams, NPC_Eldstar, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, AB_HOS_StatcAmt_Eldstar, 1, LVar2) - EVT_CALL(SetNpcImgFXParams, NPC_Mamar, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, AB_HOS_StatcAmt_Mamar, 1, LVar3) - EVT_CALL(SetNpcImgFXParams, NPC_Skolar, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, AB_HOS_StatcAmt_Skolar, 1, LVar3) - EVT_CALL(SetNpcImgFXParams, NPC_Muskular, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, AB_HOS_StatcAmt_Muskular, 1, LVar3) - EVT_CALL(SetNpcImgFXParams, NPC_Misstar, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, AB_HOS_StatcAmt_Misstar, 1, LVar3) - EVT_CALL(SetNpcImgFXParams, NPC_Klevar, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, AB_HOS_StatcAmt_Klevar, 1, LVar3) - EVT_CALL(SetNpcImgFXParams, NPC_Kalmar, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, AB_HOS_StatcAmt_Kalmar, 1, LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(20) - EVT_ADDF(LVar0, EVT_FLOAT(-4.0)) - EVT_ADDF(LVar1, EVT_FLOAT(-4.0)) - EVT_SETF(LVar2, LVar0) - EVT_ADDF(LVar2, MV_AlphaAmt_Eldstar) - EVT_SETF(LVar3, LVar1) - EVT_ADDF(LVar3, MV_AlphaAmt_Others) - EVT_IF_LT(LVar2, 0) - EVT_SETF(LVar2, EVT_FLOAT(0.0)) - EVT_END_IF - EVT_IF_LT(LVar3, 0) - EVT_SETF(LVar3, EVT_FLOAT(0.0)) - EVT_END_IF - EVT_CALL(SetNpcImgFXParams, NPC_Eldstar, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, AB_HOS_StatcAmt_Eldstar, 1, LVar2) - EVT_CALL(SetNpcImgFXParams, NPC_Mamar, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, AB_HOS_StatcAmt_Mamar, 1, LVar3) - EVT_CALL(SetNpcImgFXParams, NPC_Skolar, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, AB_HOS_StatcAmt_Skolar, 1, LVar3) - EVT_CALL(SetNpcImgFXParams, NPC_Muskular, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, AB_HOS_StatcAmt_Muskular, 1, LVar3) - EVT_CALL(SetNpcImgFXParams, NPC_Misstar, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, AB_HOS_StatcAmt_Misstar, 1, LVar3) - EVT_CALL(SetNpcImgFXParams, NPC_Klevar, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, AB_HOS_StatcAmt_Klevar, 1, LVar3) - EVT_CALL(SetNpcImgFXParams, NPC_Kalmar, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, AB_HOS_StatcAmt_Kalmar, 1, LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(AB_HOS_StatcAmt_Eldstar, 0) + Set(AB_HOS_StatcAmt_Mamar, 0) + Set(AB_HOS_StatcAmt_Skolar, 0) + Set(AB_HOS_StatcAmt_Muskular, 0) + Set(AB_HOS_StatcAmt_Misstar, 0) + Set(AB_HOS_StatcAmt_Klevar, 0) + Set(AB_HOS_StatcAmt_Kalmar, 0) + Thread + Loop(0) + IfEq(AB_HOS_StatcAmt_Eldstar, 0) + Call(RandInt, 45, LVar1) + Add(LVar1, 105) + Set(AB_HOS_StatcAmt_Eldstar, 200) + Wait(10) + Set(AB_HOS_StatcAmt_Eldstar, 0) + Wait(LVar1) + Else + Wait(1) + EndIf + EndLoop + EndThread + Thread + Loop(0) + IfEq(AB_HOS_StatcAmt_Mamar, 0) + Call(RandInt, 45, LVar1) + Add(LVar1, 105) + Set(AB_HOS_StatcAmt_Mamar, 200) + Wait(10) + Set(AB_HOS_StatcAmt_Mamar, 0) + Wait(LVar1) + Else + Wait(1) + EndIf + EndLoop + EndThread + Thread + Loop(0) + IfEq(AB_HOS_StatcAmt_Skolar, 0) + Call(RandInt, 45, LVar1) + Add(LVar1, 105) + Set(AB_HOS_StatcAmt_Skolar, 200) + Wait(10) + Set(AB_HOS_StatcAmt_Skolar, 0) + Wait(LVar1) + Else + Wait(1) + EndIf + EndLoop + EndThread + Thread + Loop(0) + IfEq(AB_HOS_StatcAmt_Muskular, 0) + Call(RandInt, 45, LVar1) + Add(LVar1, 105) + Set(AB_HOS_StatcAmt_Muskular, 200) + Wait(10) + Set(AB_HOS_StatcAmt_Muskular, 0) + Wait(LVar1) + Else + Wait(1) + EndIf + EndLoop + EndThread + Thread + Loop(0) + IfEq(AB_HOS_StatcAmt_Misstar, 0) + Call(RandInt, 45, LVar1) + Add(LVar1, 105) + Set(AB_HOS_StatcAmt_Misstar, 200) + Wait(10) + Set(AB_HOS_StatcAmt_Misstar, 0) + Wait(LVar1) + Else + Wait(1) + EndIf + EndLoop + EndThread + Thread + Loop(0) + IfEq(AB_HOS_StatcAmt_Klevar, 0) + Call(RandInt, 45, LVar1) + Add(LVar1, 105) + Set(AB_HOS_StatcAmt_Klevar, 200) + Wait(10) + Set(AB_HOS_StatcAmt_Klevar, 0) + Wait(LVar1) + Else + Wait(1) + EndIf + EndLoop + EndThread + Thread + Loop(0) + IfEq(AB_HOS_StatcAmt_Kalmar, 0) + Call(RandInt, 45, LVar1) + Add(LVar1, 105) + Set(AB_HOS_StatcAmt_Kalmar, 200) + Wait(10) + Set(AB_HOS_StatcAmt_Kalmar, 0) + Wait(LVar1) + Else + Wait(1) + EndIf + EndLoop + EndThread + Loop(0) + SetF(LVar0, 0) + SetF(LVar1, 0) + Loop(20) + AddF(LVar0, Float(4.0)) + AddF(LVar1, Float(4.0)) + SetF(LVar2, LVar0) + AddF(LVar2, MV_AlphaAmt_Eldstar) + SetF(LVar3, LVar1) + AddF(LVar3, MV_AlphaAmt_Others) + IfLt(LVar2, 0) + SetF(LVar2, Float(0.0)) + EndIf + IfLt(LVar3, 0) + SetF(LVar3, Float(0.0)) + EndIf + Call(SetNpcImgFXParams, NPC_Eldstar, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, AB_HOS_StatcAmt_Eldstar, 1, LVar2) + Call(SetNpcImgFXParams, NPC_Mamar, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, AB_HOS_StatcAmt_Mamar, 1, LVar3) + Call(SetNpcImgFXParams, NPC_Skolar, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, AB_HOS_StatcAmt_Skolar, 1, LVar3) + Call(SetNpcImgFXParams, NPC_Muskular, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, AB_HOS_StatcAmt_Muskular, 1, LVar3) + Call(SetNpcImgFXParams, NPC_Misstar, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, AB_HOS_StatcAmt_Misstar, 1, LVar3) + Call(SetNpcImgFXParams, NPC_Klevar, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, AB_HOS_StatcAmt_Klevar, 1, LVar3) + Call(SetNpcImgFXParams, NPC_Kalmar, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, AB_HOS_StatcAmt_Kalmar, 1, LVar3) + Wait(1) + EndLoop + Loop(20) + AddF(LVar0, Float(-4.0)) + AddF(LVar1, Float(-4.0)) + SetF(LVar2, LVar0) + AddF(LVar2, MV_AlphaAmt_Eldstar) + SetF(LVar3, LVar1) + AddF(LVar3, MV_AlphaAmt_Others) + IfLt(LVar2, 0) + SetF(LVar2, Float(0.0)) + EndIf + IfLt(LVar3, 0) + SetF(LVar3, Float(0.0)) + EndIf + Call(SetNpcImgFXParams, NPC_Eldstar, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, AB_HOS_StatcAmt_Eldstar, 1, LVar2) + Call(SetNpcImgFXParams, NPC_Mamar, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, AB_HOS_StatcAmt_Mamar, 1, LVar3) + Call(SetNpcImgFXParams, NPC_Skolar, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, AB_HOS_StatcAmt_Skolar, 1, LVar3) + Call(SetNpcImgFXParams, NPC_Muskular, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, AB_HOS_StatcAmt_Muskular, 1, LVar3) + Call(SetNpcImgFXParams, NPC_Misstar, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, AB_HOS_StatcAmt_Misstar, 1, LVar3) + Call(SetNpcImgFXParams, NPC_Klevar, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, AB_HOS_StatcAmt_Klevar, 1, LVar3) + Call(SetNpcImgFXParams, NPC_Kalmar, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, AB_HOS_StatcAmt_Kalmar, 1, LVar3) + Wait(1) + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_NpcInit_Eldstar) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Eldstar))) - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_Eldstar))) - EVT_IF_LT(GB_StoryProgress, STORY_CH0_MET_STAR_SPIRITS) - EVT_EXEC(N(EVS_MuteMusicOnPlayerApproach)) - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH0_MET_STAR_SPIRITS) - EVT_CALL(SetNpcPos, NPC_Eldstar, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_Mamar, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_Skolar, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_Muskular, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_Misstar, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_Klevar, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_Kalmar, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END_IF - EVT_CALL(EnableNpcShadow, NPC_Mamar, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Skolar, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Muskular, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Misstar, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Klevar, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Kalmar, FALSE) - EVT_SET(MV_AlphaAmt_Eldstar, 40) - EVT_SET(MV_AlphaAmt_Others, -80) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Eldstar))) + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_Eldstar))) + IfLt(GB_StoryProgress, STORY_CH0_MET_STAR_SPIRITS) + Exec(N(EVS_MuteMusicOnPlayerApproach)) + EndIf + IfGe(GB_StoryProgress, STORY_CH0_MET_STAR_SPIRITS) + Call(SetNpcPos, NPC_Eldstar, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_Mamar, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_Skolar, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_Muskular, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_Misstar, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_Klevar, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_Kalmar, NPC_DISPOSE_LOCATION) + Return + EndIf + Call(EnableNpcShadow, NPC_Mamar, FALSE) + Call(EnableNpcShadow, NPC_Skolar, FALSE) + Call(EnableNpcShadow, NPC_Muskular, FALSE) + Call(EnableNpcShadow, NPC_Misstar, FALSE) + Call(EnableNpcShadow, NPC_Klevar, FALSE) + Call(EnableNpcShadow, NPC_Kalmar, FALSE) + Set(MV_AlphaAmt_Eldstar, 40) + Set(MV_AlphaAmt_Others, -80) + Return + End }; NpcData N(NpcData_StarSpirits)[] = { diff --git a/src/world/area_hos/hos_01/hos_01_5_entity.c b/src/world/area_hos/hos_01/hos_01_5_entity.c index 81bc19c3f27..6bcbf6278f9 100644 --- a/src/world/area_hos/hos_01/hos_01_5_entity.c +++ b/src/world/area_hos/hos_01/hos_01_5_entity.c @@ -2,9 +2,9 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), -210, 30, 285, 0, MODEL_o210, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_HOS01_HiddenPanel) - EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, -350, 0, -275, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_HOS01_Item_StarPiece) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HiddenPanel), -210, 30, 285, 0, MODEL_o210, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_HOS01_HiddenPanel) + Call(MakeItemEntity, ITEM_STAR_PIECE, -350, 0, -275, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_HOS01_Item_StarPiece) + Return + End }; diff --git a/src/world/area_hos/hos_01/hos_01_6_star_way.c b/src/world/area_hos/hos_01/hos_01_6_star_way.c index b078d06acda..bb3466240a0 100644 --- a/src/world/area_hos/hos_01/hos_01_6_star_way.c +++ b/src/world/area_hos/hos_01/hos_01_6_star_way.c @@ -8,142 +8,142 @@ #define NAME_SUFFIX EvtScript N(EVS_Scene_StarWayOpened) = { - EVT_LABEL(0) - EVT_CALL(N(GetFloorCollider_StarWay), LVar0) - EVT_IF_NE(LVar0, COLLIDER_o234) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(FacePlayerTowardPoint, -30, -160, 0) - EVT_WAIT(15) - EVT_CALL(ShowMessageAtScreenPos, MSG_HOS_005C, 160, 40) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -100) - EVT_DIV(LVar0, 2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 3) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(ShowMessageAtScreenPos, MSG_HOS_005D, 160, 40) - EVT_CALL(SetMusicTrack, 0, SONG_STAR_WAY_OPENS, 0, 8) + Label(0) + Call(N(GetFloorCollider_StarWay), LVar0) + IfNe(LVar0, COLLIDER_o234) + Wait(1) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(FacePlayerTowardPoint, -30, -160, 0) + Wait(15) + Call(ShowMessageAtScreenPos, MSG_HOS_005C, 160, 40) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, -100) + Div(LVar0, 2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-9.0)) + Call(SetCamSpeed, CAM_DEFAULT, 3) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10) + Call(ShowMessageAtScreenPos, MSG_HOS_005D, 160, 40) + Call(SetMusicTrack, 0, SONG_STAR_WAY_OPENS, 0, 8) #if VERSION_PAL - EVT_WAIT(30) + Wait(30) #else - EVT_WAIT(10) + Wait(10) #endif - EVT_CALL(EnableModel, MODEL_power, TRUE) - EVT_SET(MV_StarBeamState, 1) - EVT_LABEL(10) - EVT_IF_NE(MV_StarBeamState, 2) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -100, 245, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -100, 245, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 600) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_PLAY_EFFECT(EFFECT_75, 0, -30, 250, -160, 1, -1) - EVT_SET(MV_StarBeamFXPtr, LVarF) - EVT_CALL(N(func_80240AAC_A1132C), MV_StarBeamFXPtr) - EVT_CALL(MakeLerp, 1, 255, 55, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetStarBeamMasterAlpha), MV_StarBeamFXPtr, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(45) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -100) - EVT_DIV(LVar0, 2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(ShowMessageAtScreenPos, MSG_HOS_005E, 160, 40) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5.0)) - EVT_SET(GB_StoryProgress, STORY_CH8_OPENED_PATH_TO_STAR_WAY) - EVT_CALL(SetMusicTrack, 0, SONG_SHOOTING_STAR_SUMMIT, 0, 8) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_power, TRUE) + Set(MV_StarBeamState, 1) + Label(10) + IfNe(MV_StarBeamState, 2) + Wait(1) + Goto(10) + EndIf + Call(UseSettingsFrom, CAM_DEFAULT, -100, 245, 0) + Call(SetPanTarget, CAM_DEFAULT, -100, 245, 0) + Call(SetCamDistance, CAM_DEFAULT, 600) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-11.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + PlayEffect(EFFECT_75, 0, -30, 250, -160, 1, -1) + Set(MV_StarBeamFXPtr, LVarF) + Call(N(func_80240AAC_A1132C), MV_StarBeamFXPtr) + Call(MakeLerp, 1, 255, 55, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(N(SetStarBeamMasterAlpha), MV_StarBeamFXPtr, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(45) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, -100) + Div(LVar0, 2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-9.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10) + Call(ShowMessageAtScreenPos, MSG_HOS_005E, 160, 40) + Call(ResetCam, CAM_DEFAULT, Float(5.0)) + Set(GB_StoryProgress, STORY_CH8_OPENED_PATH_TO_STAR_WAY) + Call(SetMusicTrack, 0, SONG_SHOOTING_STAR_SUMMIT, 0, 8) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_AscendStarBeam) = { - EVT_CALL(N(func_80240B10_A11390), MV_StarBeamFXPtr) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -30, 250, -160) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -30, 250, -160) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, -30, -160, 0) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(SetMusicTrack, 0, SONG_STAR_WAY_OPENS, 1, 8) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_PARTNER, -30, 250, -170, 15) - EVT_THREAD - EVT_SET(LVar2, 90) - EVT_CALL(MakeLerp, 1, 90, 60, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_ADD(LVar2, LVar0) - EVT_CALL(InterpPlayerYaw, LVar2, 0) - EVT_CALL(SetNpcRotation, NPC_PARTNER, 0, LVar2, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LOOP(0) - EVT_ADD(LVar2, LVar0) - EVT_CALL(InterpPlayerYaw, LVar2, 0) - EVT_CALL(SetNpcRotation, NPC_PARTNER, 0, LVar2, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(30) - EVT_CALL(N(EnableCameraFollowPlayerY)) - EVT_THREAD - EVT_LABEL(10) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar1, 430) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_SET(LVar5, LVar4) - EVT_ADD(LVar5, -10) - EVT_CALL(MakeLerp, LVar3, 700, 90, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetPlayerPos, LVar2, LVar0, LVar4) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar2, LVar0, LVar5) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(N(func_80240B10_A11390), MV_StarBeamFXPtr) + Call(UseSettingsFrom, CAM_DEFAULT, -30, 250, -160) + Call(SetPanTarget, CAM_DEFAULT, -30, 250, -160) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, -30, -160, 0) + Call(InterpPlayerYaw, 90, 0) + Call(SetMusicTrack, 0, SONG_STAR_WAY_OPENS, 1, 8) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcJumpscale, NPC_PARTNER, Float(1.0)) + Call(NpcJump0, NPC_PARTNER, -30, 250, -170, 15) + Thread + Set(LVar2, 90) + Call(MakeLerp, 1, 90, 60, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Add(LVar2, LVar0) + Call(InterpPlayerYaw, LVar2, 0) + Call(SetNpcRotation, NPC_PARTNER, 0, LVar2, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Loop(0) + Add(LVar2, LVar0) + Call(InterpPlayerYaw, LVar2, 0) + Call(SetNpcRotation, NPC_PARTNER, 0, LVar2, 0) + Wait(1) + EndLoop + EndThread + Wait(30) + Call(N(EnableCameraFollowPlayerY)) + Thread + Label(10) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfLt(LVar1, 430) + Wait(1) + Goto(10) + EndIf + EndThread + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Set(LVar5, LVar4) + Add(LVar5, -10) + Call(MakeLerp, LVar3, 700, 90, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetPlayerPos, LVar2, LVar0, LVar4) + Call(SetNpcPos, NPC_PARTNER, LVar2, LVar0, LVar5) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; diff --git a/src/world/area_hos/hos_02/hos_02_1_music.c b/src/world/area_hos/hos_02/hos_02_1_music.c index 5ec4211d2b7..4c5a2daff0f 100644 --- a/src/world/area_hos/hos_02/hos_02_1_music.c +++ b/src/world/area_hos/hos_02/hos_02_1_music.c @@ -1,10 +1,10 @@ #include "hos_02.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, hos_02_ENTRY_1) - EVT_CALL(SetMusicTrack, 0, SONG_STAR_WAY_OPENS, 3, 8) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, hos_02_ENTRY_1) + Call(SetMusicTrack, 0, SONG_STAR_WAY_OPENS, 3, 8) + EndIf + Return + End }; diff --git a/src/world/area_hos/hos_02/hos_02_2_main.c b/src/world/area_hos/hos_02/hos_02_2_main.c index 001ecfed5f6..21663f273bc 100644 --- a/src/world/area_hos/hos_02/hos_02_2_main.c +++ b/src/world/area_hos/hos_02/hos_02_2_main.c @@ -1,118 +1,118 @@ #include "hos_02.h" EvtScript N(EVS_ExitStarBeam) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(InterruptUsePartner) - EVT_WAIT(20) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(IsPlayerOnValidFloor, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_EXEC_WAIT(N(EVS_DescendStarBeam)) - EVT_CALL(GotoMap, EVT_PTR("hos_01"), hos_01_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, PARTNER_NONE) + Call(InterruptUsePartner) + Wait(20) + Loop(0) + Wait(1) + Call(IsPlayerOnValidFloor, LVar0) + IfEq(LVar0, TRUE) + BreakLoop + EndIf + EndLoop + EndIf + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + ExecWait(N(EVS_DescendStarBeam)) + Call(GotoMap, Ref("hos_01"), hos_01_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_hos_03_0) = EVT_EXIT_WALK(60, hos_02_ENTRY_1, "hos_03", hos_03_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, hos_02_ENTRY_0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitStarBeam)), TRIGGER_FLOOR_TOUCH, COLLIDER_deiliw, 1, 0) - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_hos_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfNe(LVar0, hos_02_ENTRY_0) + BindTrigger(Ref(N(EVS_ExitStarBeam)), TRIGGER_FLOOR_TOUCH, COLLIDER_deiliw, 1, 0) + EndIf + BindTrigger(Ref(N(EVS_ExitWalk_hos_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_EnterStarBeam) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -1105, -171, 225) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -1105, -171, 225) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_SET(LVar2, 360) - EVT_CALL(MakeLerp, -400, -171, 60, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetPlayerPos, -1105, LVar0, 225) - EVT_CALL(SetNpcPos, NPC_PARTNER, -1105, LVar0, 215) - EVT_ADD(LVar2, 40) - EVT_CALL(InterpPlayerYaw, LVar2, 0) - EVT_CALL(SetNpcRotation, NPC_PARTNER, 0, LVar2, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(LVar0, LVar2) - EVT_SUB(LVar0, 360) - EVT_SUB(LVar2, LVar0) - EVT_SET(LVar0, 40) - EVT_LABEL(10) - EVT_IF_LT(LVar2, 450) - EVT_CALL(InterpPlayerYaw, LVar2, 0) - EVT_CALL(SetNpcRotation, NPC_PARTNER, 0, LVar2, 0) - EVT_ADD(LVar2, LVar0) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_SET(LVar2, 90) - EVT_SUB(LVar0, 5) - EVT_IF_GT(LVar0, 20) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(SetNpcRotation, NPC_PARTNER, 0, 0, 0) - EVT_CALL(N(func_80240EF4_A17114), MV_StarBeamEffect) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetMusicTrack, 0, SONG_STAR_WAY_OPENS, 3, 8) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(AwaitPlayerLeave, -1105, 225, 40) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitStarBeam)), TRIGGER_FLOOR_TOUCH, COLLIDER_deiliw, 1, 0) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(UseSettingsFrom, CAM_DEFAULT, -1105, -171, 225) + Call(SetPanTarget, CAM_DEFAULT, -1105, -171, 225) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Set(LVar2, 360) + Call(MakeLerp, -400, -171, 60, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(SetPlayerPos, -1105, LVar0, 225) + Call(SetNpcPos, NPC_PARTNER, -1105, LVar0, 215) + Add(LVar2, 40) + Call(InterpPlayerYaw, LVar2, 0) + Call(SetNpcRotation, NPC_PARTNER, 0, LVar2, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Set(LVar0, LVar2) + Sub(LVar0, 360) + Sub(LVar2, LVar0) + Set(LVar0, 40) + Label(10) + IfLt(LVar2, 450) + Call(InterpPlayerYaw, LVar2, 0) + Call(SetNpcRotation, NPC_PARTNER, 0, LVar2, 0) + Add(LVar2, LVar0) + Wait(1) + Goto(10) + EndIf + Set(LVar2, 90) + Sub(LVar0, 5) + IfGt(LVar0, 20) + Goto(10) + EndIf + Call(SetNpcRotation, NPC_PARTNER, 0, 0, 0) + Call(N(func_80240EF4_A17114), MV_StarBeamEffect) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE) + Call(EnablePartnerAI) + Call(DisablePlayerPhysics, FALSE) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetMusicTrack, 0, SONG_STAR_WAY_OPENS, 3, 8) + Call(DisablePlayerInput, FALSE) + Call(AwaitPlayerLeave, -1105, 225, 40) + BindTrigger(Ref(N(EVS_ExitStarBeam)), TRIGGER_FLOOR_TOUCH, COLLIDER_deiliw, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_STAR_WAY) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_SET(GF_MAP_StarWay, TRUE) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(hos_02_ENTRY_0) - EVT_THREAD - EVT_EXEC_WAIT(N(EVS_EnterStarBeam)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_THREAD - EVT_CASE_EQ(hos_02_ENTRY_1) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_EXEC(N(EVS_SetupModelFX)) - EVT_EXEC(N(EVS_SetupUnused)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_STAR_WAY) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Set(GF_MAP_StarWay, TRUE) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(hos_02_ENTRY_0) + Thread + ExecWait(N(EVS_EnterStarBeam)) + Exec(N(EVS_BindExitTriggers)) + EndThread + CaseEq(hos_02_ENTRY_1) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Exec(N(EVS_SetupModelFX)) + Exec(N(EVS_SetupUnused)) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_hos/hos_02/hos_02_3_model_fx.c b/src/world/area_hos/hos_02/hos_02_3_model_fx.c index 36d41c35baf..80b31bbfc03 100644 --- a/src/world/area_hos/hos_02/hos_02_3_model_fx.c +++ b/src/world/area_hos/hos_02/hos_02_3_model_fx.c @@ -137,208 +137,208 @@ API_CALLABLE(N(func_80240F68_A17188)) { } EvtScript N(EVS_SetupModelFX) = { - EVT_PLAY_EFFECT(EFFECT_75, 1, -1105, -86, 230, 1, -1) - EVT_SET(MV_StarBeamEffect, LVarF) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(hos_02_ENTRY_0) - EVT_CALL(N(func_80240F68_A17188), MV_StarBeamEffect) - EVT_CASE_EQ(hos_02_ENTRY_1) - EVT_CALL(N(func_80240EF4_A17114), MV_StarBeamEffect) - EVT_END_SWITCH - EVT_CALL(EnableTexPanning, MODEL_o380, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o395, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o549, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o552, TRUE) - EVT_THREAD + PlayEffect(EFFECT_75, 1, -1105, -86, 230, 1, -1) + Set(MV_StarBeamEffect, LVarF) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(hos_02_ENTRY_0) + Call(N(func_80240F68_A17188), MV_StarBeamEffect) + CaseEq(hos_02_ENTRY_1) + Call(N(func_80240EF4_A17114), MV_StarBeamEffect) + EndSwitch + Call(EnableTexPanning, MODEL_o380, TRUE) + Call(EnableTexPanning, MODEL_o395, TRUE) + Call(EnableTexPanning, MODEL_o549, TRUE) + Call(EnableTexPanning, MODEL_o552, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 80, -200, -50, 100) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread // custom gfx for lantern glow halos, flags for the entire lamp posts - EVT_CALL(SetModelCustomGfx, MODEL_o414, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_o415, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_o399, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_o398, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_o347, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_o348, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_0, EVT_PTR(N(build_gfx_lamp_halos)), NULL) - EVT_CALL(SetModelFlags, MODEL_o414, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_CALL(SetModelFlags, MODEL_o415, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_CALL(SetModelFlags, MODEL_o399, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_CALL(SetModelFlags, MODEL_o398, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_CALL(SetModelFlags, MODEL_o347, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_CALL(SetModelFlags, MODEL_o348, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_CALL(SetModelFlags, MODEL_o407, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_CALL(SetModelFlags, MODEL_o408, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_CALL(SetModelFlags, MODEL_o413, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_CALL(SetModelFlags, MODEL_o446, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_CALL(SetModelFlags, MODEL_o447, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_CALL(SetModelFlags, MODEL_o448, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_CALL(SetModelFlags, MODEL_o456, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_CALL(SetModelFlags, MODEL_o457, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_CALL(SetModelFlags, MODEL_o458, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Call(SetModelCustomGfx, MODEL_o414, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_o415, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_o399, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_o398, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_o347, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_o348, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetCustomGfxBuilders, CUSTOM_GFX_0, Ref(N(build_gfx_lamp_halos)), NULL) + Call(SetModelFlags, MODEL_o414, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Call(SetModelFlags, MODEL_o415, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Call(SetModelFlags, MODEL_o399, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Call(SetModelFlags, MODEL_o398, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Call(SetModelFlags, MODEL_o347, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Call(SetModelFlags, MODEL_o348, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Call(SetModelFlags, MODEL_o407, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Call(SetModelFlags, MODEL_o408, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Call(SetModelFlags, MODEL_o413, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Call(SetModelFlags, MODEL_o446, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Call(SetModelFlags, MODEL_o447, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Call(SetModelFlags, MODEL_o448, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Call(SetModelFlags, MODEL_o456, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Call(SetModelFlags, MODEL_o457, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Call(SetModelFlags, MODEL_o458, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) // yellow stars - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_0, MODEL_o466, TRUE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(build_gfx_yellow_stars)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_o466, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_o467, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_o468, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_o469, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_o470, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_o471, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_o472, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_o541, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_o542, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_o545, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_o548, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelFlags, MODEL_o466, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) - EVT_CALL(SetModelFlags, MODEL_o467, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) - EVT_CALL(SetModelFlags, MODEL_o468, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) - EVT_CALL(SetModelFlags, MODEL_o469, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) - EVT_CALL(SetModelFlags, MODEL_o470, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) - EVT_CALL(SetModelFlags, MODEL_o471, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) - EVT_CALL(SetModelFlags, MODEL_o472, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) - EVT_CALL(SetModelFlags, MODEL_o541, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) - EVT_CALL(SetModelFlags, MODEL_o542, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) - EVT_CALL(SetModelFlags, MODEL_o545, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) - EVT_CALL(SetModelFlags, MODEL_o548, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) + Call(MakeLocalVertexCopy, VTX_COPY_0, MODEL_o466, TRUE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_1, Ref(N(build_gfx_yellow_stars)), NULL) + Call(SetModelCustomGfx, MODEL_o466, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_o467, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_o468, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_o469, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_o470, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_o471, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_o472, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_o541, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_o542, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_o545, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_o548, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) + Call(SetModelFlags, MODEL_o466, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) + Call(SetModelFlags, MODEL_o467, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) + Call(SetModelFlags, MODEL_o468, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) + Call(SetModelFlags, MODEL_o469, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) + Call(SetModelFlags, MODEL_o470, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) + Call(SetModelFlags, MODEL_o471, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) + Call(SetModelFlags, MODEL_o472, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) + Call(SetModelFlags, MODEL_o541, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) + Call(SetModelFlags, MODEL_o542, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) + Call(SetModelFlags, MODEL_o545, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) + Call(SetModelFlags, MODEL_o548, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) // blue stars - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_1, MODEL_o466, TRUE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_2, EVT_PTR(N(build_gfx_blue_stars)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_o543, CUSTOM_GFX_2, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_o539, CUSTOM_GFX_2, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelFlags, MODEL_o543, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) - EVT_CALL(SetModelFlags, MODEL_o539, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) + Call(MakeLocalVertexCopy, VTX_COPY_1, MODEL_o466, TRUE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_2, Ref(N(build_gfx_blue_stars)), NULL) + Call(SetModelCustomGfx, MODEL_o543, CUSTOM_GFX_2, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_o539, CUSTOM_GFX_2, ENV_TINT_UNCHANGED) + Call(SetModelFlags, MODEL_o543, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) + Call(SetModelFlags, MODEL_o539, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) // green stars - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_2, MODEL_o466, TRUE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_3, EVT_PTR(N(build_gfx_green_stars)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_o546, CUSTOM_GFX_3, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_o540, CUSTOM_GFX_3, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelFlags, MODEL_o546, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) - EVT_CALL(SetModelFlags, MODEL_o540, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) + Call(MakeLocalVertexCopy, VTX_COPY_2, MODEL_o466, TRUE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_3, Ref(N(build_gfx_green_stars)), NULL) + Call(SetModelCustomGfx, MODEL_o546, CUSTOM_GFX_3, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_o540, CUSTOM_GFX_3, ENV_TINT_UNCHANGED) + Call(SetModelFlags, MODEL_o546, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) + Call(SetModelFlags, MODEL_o540, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) // pink stars - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_3, MODEL_o466, TRUE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_4, EVT_PTR(N(build_gfx_pink_stars)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_o544, CUSTOM_GFX_4, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_o547, CUSTOM_GFX_4, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelFlags, MODEL_o544, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) - EVT_CALL(SetModelFlags, MODEL_o547, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(MakeLerp, -13, 13, 20, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o466, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o470, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o471, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o472, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o541, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o543, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o545, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o547, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o539, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 13, -13, 20, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o466, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o470, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o471, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o472, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o541, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o543, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o545, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o547, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o539, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(MakeLerp, 13, -13, 20, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o467, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o468, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o469, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o542, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o544, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o546, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o548, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o540, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, -13, 13, 20, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o467, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o468, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o469, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o542, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o544, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o546, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o548, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o540, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(MakeLerp, 0, 360, 50, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o466, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o470, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o471, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o472, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o541, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o543, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o545, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o547, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o539, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_END_THREAD - EVT_LOOP(0) - EVT_CALL(MakeLerp, 360, 0, 44, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o467, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o468, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o469, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o542, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o544, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o546, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o548, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o540, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(MakeLocalVertexCopy, VTX_COPY_3, MODEL_o466, TRUE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_4, Ref(N(build_gfx_pink_stars)), NULL) + Call(SetModelCustomGfx, MODEL_o544, CUSTOM_GFX_4, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_o547, CUSTOM_GFX_4, ENV_TINT_UNCHANGED) + Call(SetModelFlags, MODEL_o544, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) + Call(SetModelFlags, MODEL_o547, MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) + Thread + Loop(0) + Call(MakeLerp, -13, 13, 20, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o466, 0, LVar0, 0) + Call(TranslateModel, MODEL_o470, 0, LVar0, 0) + Call(TranslateModel, MODEL_o471, 0, LVar0, 0) + Call(TranslateModel, MODEL_o472, 0, LVar0, 0) + Call(TranslateModel, MODEL_o541, 0, LVar0, 0) + Call(TranslateModel, MODEL_o543, 0, LVar0, 0) + Call(TranslateModel, MODEL_o545, 0, LVar0, 0) + Call(TranslateModel, MODEL_o547, 0, LVar0, 0) + Call(TranslateModel, MODEL_o539, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 13, -13, 20, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o466, 0, LVar0, 0) + Call(TranslateModel, MODEL_o470, 0, LVar0, 0) + Call(TranslateModel, MODEL_o471, 0, LVar0, 0) + Call(TranslateModel, MODEL_o472, 0, LVar0, 0) + Call(TranslateModel, MODEL_o541, 0, LVar0, 0) + Call(TranslateModel, MODEL_o543, 0, LVar0, 0) + Call(TranslateModel, MODEL_o545, 0, LVar0, 0) + Call(TranslateModel, MODEL_o547, 0, LVar0, 0) + Call(TranslateModel, MODEL_o539, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + EndThread + Thread + Loop(0) + Call(MakeLerp, 13, -13, 20, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o467, 0, LVar0, 0) + Call(TranslateModel, MODEL_o468, 0, LVar0, 0) + Call(TranslateModel, MODEL_o469, 0, LVar0, 0) + Call(TranslateModel, MODEL_o542, 0, LVar0, 0) + Call(TranslateModel, MODEL_o544, 0, LVar0, 0) + Call(TranslateModel, MODEL_o546, 0, LVar0, 0) + Call(TranslateModel, MODEL_o548, 0, LVar0, 0) + Call(TranslateModel, MODEL_o540, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, -13, 13, 20, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o467, 0, LVar0, 0) + Call(TranslateModel, MODEL_o468, 0, LVar0, 0) + Call(TranslateModel, MODEL_o469, 0, LVar0, 0) + Call(TranslateModel, MODEL_o542, 0, LVar0, 0) + Call(TranslateModel, MODEL_o544, 0, LVar0, 0) + Call(TranslateModel, MODEL_o546, 0, LVar0, 0) + Call(TranslateModel, MODEL_o548, 0, LVar0, 0) + Call(TranslateModel, MODEL_o540, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + EndThread + Thread + Loop(0) + Call(MakeLerp, 0, 360, 50, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o466, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o470, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o471, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o472, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o541, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o543, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o545, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o547, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o539, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + EndThread + Loop(0) + Call(MakeLerp, 360, 0, 44, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o467, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o468, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o469, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o542, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o544, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o546, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o548, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o540, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + Return + End }; diff --git a/src/world/area_hos/hos_02/hos_02_4_unused.c b/src/world/area_hos/hos_02/hos_02_4_unused.c index 5f34c563a66..4690eed8bb8 100644 --- a/src/world/area_hos/hos_02/hos_02_4_unused.c +++ b/src/world/area_hos/hos_02/hos_02_4_unused.c @@ -6,6 +6,6 @@ API_CALLABLE(N(FetchEntryID)) { } EvtScript N(EVS_SetupUnused) = { - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/area_hos/hos_02/hos_02_6_descent.c b/src/world/area_hos/hos_02/hos_02_6_descent.c index 7a8a1e8316d..99ee5b65f16 100644 --- a/src/world/area_hos/hos_02/hos_02_6_descent.c +++ b/src/world/area_hos/hos_02/hos_02_6_descent.c @@ -1,39 +1,39 @@ #include "hos_02.h" EvtScript N(EVS_DescendStarBeam) = { - EVT_CALL(SetMusicTrack, 0, SONG_STAR_WAY_OPENS, 2, 8) - EVT_CALL(N(func_80240F68_A17188), MV_StarBeamEffect) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, -1105, 230, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.5)) - EVT_CALL(NpcJump0, NPC_PARTNER, -1105, -171, 220, 5) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 90) - EVT_LOOP(0) - EVT_ADD(LVar0, 2) - EVT_ADD(LVar1, LVar0) - EVT_CALL(InterpPlayerYaw, LVar1, 0) - EVT_CALL(SetNpcRotation, NPC_PARTNER, 0, LVar1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(60) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_SET(LVar5, LVar4) - EVT_ADD(LVar5, -10) - EVT_CALL(MakeLerp, LVar3, -600, 40, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetPlayerPos, LVar2, LVar0, LVar4) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar2, LVar0, LVar5) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_STAR_WAY_OPENS, 2, 8) + Call(N(func_80240F68_A17188), MV_StarBeamEffect) + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, -1105, 230, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.5)) + Call(NpcJump0, NPC_PARTNER, -1105, -171, 220, 5) + Thread + Set(LVar0, 0) + Set(LVar1, 90) + Loop(0) + Add(LVar0, 2) + Add(LVar1, LVar0) + Call(InterpPlayerYaw, LVar1, 0) + Call(SetNpcRotation, NPC_PARTNER, 0, LVar1, 0) + Wait(1) + EndLoop + EndThread + Wait(60) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Set(LVar5, LVar4) + Add(LVar5, -10) + Call(MakeLerp, LVar3, -600, 40, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetPlayerPos, LVar2, LVar0, LVar4) + Call(SetNpcPos, NPC_PARTNER, LVar2, LVar0, LVar5) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; diff --git a/src/world/area_hos/hos_03/hos_03_1_music.c b/src/world/area_hos/hos_03/hos_03_1_music.c index eb3598c67de..704e3ae35a0 100644 --- a/src/world/area_hos/hos_03/hos_03_1_music.c +++ b/src/world/area_hos/hos_03/hos_03_1_music.c @@ -1,13 +1,13 @@ #include "hos_03.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_STAR_HAVEN, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_STAR_HAVEN, 0, 8) + Return + End }; EvtScript N(EVS_PlayRestingSong) = { - EVT_CALL(SetMusicTrack, 0, SONG_TAKING_REST, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TAKING_REST, 0, 8) + Return + End }; diff --git a/src/world/area_hos/hos_03/hos_03_2_main.c b/src/world/area_hos/hos_03/hos_03_2_main.c index d6ac5244c19..f68bc4b548e 100644 --- a/src/world/area_hos/hos_03/hos_03_2_main.c +++ b/src/world/area_hos/hos_03/hos_03_2_main.c @@ -4,80 +4,80 @@ EvtScript N(EVS_ExitWalk_hos_02_1) = EVT_EXIT_WALK(60, hos_03_ENTRY_0, "hos_02", EvtScript N(EVS_ExitWalk_hos_04_0) = EVT_EXIT_WALK(60, hos_03_ENTRY_1, "hos_04", hos_04_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_hos_02_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_hos_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_hos_02_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_hos_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; #include "world/common/todo/GetFloorCollider.inc.c" EvtScript N(EVS_ControlUpperVisibility) = { - EVT_LABEL(0) - EVT_CALL(N(GetFloorCollider), LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(COLLIDER_o18) - EVT_GOTO(10) - EVT_CASE_EQ(COLLIDER_o218) - EVT_GOTO(10) - EVT_CASE_EQ(COLLIDER_o224) - EVT_GOTO(10) - EVT_CASE_EQ(COLLIDER_o7) - EVT_GOTO(10) - EVT_CASE_EQ(COLLIDER_o234) - EVT_GOTO(10) - EVT_CASE_EQ(COLLIDER_o235) - EVT_LABEL(10) - EVT_CALL(EnableGroup, MODEL_g50, FALSE) - EVT_CALL(EnableGroup, MODEL_g39, FALSE) - EVT_WAIT(1) - EVT_LABEL(15) - EVT_CALL(N(GetFloorCollider), LVar1) - EVT_IF_EQ(LVar1, -1) - EVT_WAIT(1) - EVT_GOTO(15) - EVT_END_IF - EVT_IF_EQ(LVar0, LVar1) - EVT_WAIT(1) - EVT_GOTO(15) - EVT_END_IF - EVT_CALL(EnableGroup, MODEL_g50, TRUE) // house - EVT_CALL(EnableGroup, MODEL_g39, TRUE) // shop - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(N(GetFloorCollider), LVar0) + Switch(LVar0) + CaseEq(COLLIDER_o18) + Goto(10) + CaseEq(COLLIDER_o218) + Goto(10) + CaseEq(COLLIDER_o224) + Goto(10) + CaseEq(COLLIDER_o7) + Goto(10) + CaseEq(COLLIDER_o234) + Goto(10) + CaseEq(COLLIDER_o235) + Label(10) + Call(EnableGroup, MODEL_g50, FALSE) + Call(EnableGroup, MODEL_g39, FALSE) + Wait(1) + Label(15) + Call(N(GetFloorCollider), LVar1) + IfEq(LVar1, -1) + Wait(1) + Goto(15) + EndIf + IfEq(LVar0, LVar1) + Wait(1) + Goto(15) + EndIf + Call(EnableGroup, MODEL_g50, TRUE) // house + Call(EnableGroup, MODEL_g39, TRUE) // shop + EndSwitch + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_STAR_HAVEN) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_IF_EQ(GB_StoryProgress, STORY_CH8_OPENED_PATH_TO_STAR_WAY) - EVT_SET(GB_StoryProgress, STORY_CH8_REACHED_STAR_HAVEN) - EVT_END_IF - EVT_SET(GF_MAP_StarHaven, TRUE) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_END_IF - EVT_EXEC(N(EVS_SetupAurora)) - EVT_CALL(UseRoomDoorSounds, DOOR_SOUNDS_UNUSED) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(PlaySound, SOUND_LOOP_STAR_SANCTUARY_FAR) - EVT_EXEC(N(EVS_SetupRooms)) - EVT_EXEC(N(EVS_SetupShop)) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_EXEC(N(EVS_ControlUpperVisibility)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_STAR_HAVEN) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + IfEq(GB_StoryProgress, STORY_CH8_OPENED_PATH_TO_STAR_WAY) + Set(GB_StoryProgress, STORY_CH8_REACHED_STAR_HAVEN) + EndIf + Set(GF_MAP_StarHaven, TRUE) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Else + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + EndIf + Exec(N(EVS_SetupAurora)) + Call(UseRoomDoorSounds, DOOR_SOUNDS_UNUSED) + Exec(N(EVS_SetupMusic)) + Call(PlaySound, SOUND_LOOP_STAR_SANCTUARY_FAR) + Exec(N(EVS_SetupRooms)) + Exec(N(EVS_SetupShop)) + Exec(N(EVS_SetupFoliage)) + Exec(N(EVS_ControlUpperVisibility)) + Return + End }; diff --git a/src/world/area_hos/hos_03/hos_03_3_model_fx.c b/src/world/area_hos/hos_03/hos_03_3_model_fx.c index c7235079102..d643e2cefd1 100644 --- a/src/world/area_hos/hos_03/hos_03_3_model_fx.c +++ b/src/world/area_hos/hos_03/hos_03_3_model_fx.c @@ -97,64 +97,64 @@ API_CALLABLE(N(func_80240A50_A1BB50)) { } EvtScript N(EVS_SetupAurora) = { - EVT_THREAD + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 100, -80, -50, 120) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_o29, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_o204, TEX_PANNER_1) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetTexPanner, MODEL_o29, TEX_PANNER_1) + Call(SetTexPanner, MODEL_o204, TEX_PANNER_1) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_3) TEX_PAN_PARAMS_STEP( -300, 500, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_o87, TEX_PANNER_3) - EVT_CALL(SetTexPanner, MODEL_o134, TEX_PANNER_3) - EVT_CALL(SetTexPanner, MODEL_o171, TEX_PANNER_3) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetTexPanner, MODEL_o87, TEX_PANNER_3) + Call(SetTexPanner, MODEL_o134, TEX_PANNER_3) + Call(SetTexPanner, MODEL_o171, TEX_PANNER_3) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_4) TEX_PAN_PARAMS_STEP( 0, -800, 0, 0) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_o90, TEX_PANNER_4) - EVT_CALL(SetTexPanner, MODEL_o135, TEX_PANNER_4) - EVT_CALL(SetTexPanner, MODEL_o172, TEX_PANNER_4) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetTexPanner, MODEL_o90, TEX_PANNER_4) + Call(SetTexPanner, MODEL_o135, TEX_PANNER_4) + Call(SetTexPanner, MODEL_o172, TEX_PANNER_4) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_5) TEX_PAN_PARAMS_STEP( 0,-1500, 0, 0) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_o91, TEX_PANNER_5) - EVT_CALL(SetTexPanner, MODEL_o136, TEX_PANNER_5) - EVT_CALL(SetTexPanner, MODEL_o173, TEX_PANNER_5) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetTexPanner, MODEL_o91, TEX_PANNER_5) + Call(SetTexPanner, MODEL_o136, TEX_PANNER_5) + Call(SetTexPanner, MODEL_o173, TEX_PANNER_5) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_6) TEX_PAN_PARAMS_STEP( 0, 3000, 0, 0) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_o159, TEX_PANNER_6) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetTexPanner, MODEL_o159, TEX_PANNER_6) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_7) TEX_PAN_PARAMS_STEP( 0, 4000, 0, 0) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_o160, TEX_PANNER_7) - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_0, MODEL_o76, TRUE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(build_gfx_aurora)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_o76, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetTexPanner, MODEL_o160, TEX_PANNER_7) + Call(MakeLocalVertexCopy, VTX_COPY_0, MODEL_o76, TRUE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_1, Ref(N(build_gfx_aurora)), NULL) + Call(SetModelCustomGfx, MODEL_o76, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) + Return + End }; diff --git a/src/world/area_hos/hos_03/hos_03_4_rooms.c b/src/world/area_hos/hos_03/hos_03_4_rooms.c index 37d67379b1f..681168a8246 100644 --- a/src/world/area_hos/hos_03/hos_03_4_rooms.c +++ b/src/world/area_hos/hos_03/hos_03_4_rooms.c @@ -1,49 +1,49 @@ #include "hos_03.h" EvtScript N(EVS_SetDoorRot_House) = { - EVT_CALL(RotateGroup, MODEL_g54, LVar0, 0, 1, 0) - EVT_RETURN - EVT_END + Call(RotateGroup, MODEL_g54, LVar0, 0, 1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_House) = { - EVT_SET(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-1.0)) - EVT_CALL(RotateGroup, MODEL_g71, LVar1, 0, 0, 1) - EVT_SET(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-0.5)) - EVT_CALL(RotateGroup, MODEL_g72, LVar1, 0, 1, 0) - EVT_SET(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(0.5)) - EVT_CALL(RotateGroup, MODEL_g73, LVar1, 0, 1, 0) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + MulF(LVar1, Float(-1.0)) + Call(RotateGroup, MODEL_g71, LVar1, 0, 0, 1) + Set(LVar1, LVar0) + MulF(LVar1, Float(-0.5)) + Call(RotateGroup, MODEL_g72, LVar1, 0, 1, 0) + Set(LVar1, LVar0) + MulF(LVar1, Float(0.5)) + Call(RotateGroup, MODEL_g73, LVar1, 0, 1, 0) + Return + End }; EvtScript N(EVS_DropDoor_House) = { - EVT_CALL(RotateGroup, MODEL_g54, LVar0, 1, 0, 0) - EVT_RETURN - EVT_END + Call(RotateGroup, MODEL_g54, LVar0, 1, 0, 0) + Return + End }; EvtScript N(EVS_SetDoorRot_Shop) = { - EVT_CALL(RotateGroup, MODEL_g42, LVar0, 0, 1, 0) - EVT_RETURN - EVT_END + Call(RotateGroup, MODEL_g42, LVar0, 0, 1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_Shop) = { - EVT_SET(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-1.0)) - EVT_CALL(RotateGroup, MODEL_g64, LVar1, 0, 0, 1) - EVT_SET(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-0.5)) - EVT_CALL(RotateGroup, MODEL_g65, LVar1, 0, 1, 0) - EVT_SET(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(0.5)) - EVT_CALL(RotateGroup, MODEL_g66, LVar1, 0, 1, 0) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + MulF(LVar1, Float(-1.0)) + Call(RotateGroup, MODEL_g64, LVar1, 0, 0, 1) + Set(LVar1, LVar0) + MulF(LVar1, Float(-0.5)) + Call(RotateGroup, MODEL_g65, LVar1, 0, 1, 0) + Set(LVar1, LVar0) + MulF(LVar1, Float(0.5)) + Call(RotateGroup, MODEL_g66, LVar1, 0, 1, 0) + Return + End }; s32 N(InteriorNPCs_Shop)[] = { @@ -52,29 +52,29 @@ s32 N(InteriorNPCs_Shop)[] = { }; EvtScript N(EVS_SetDoorRot_ToadHouse) = { - EVT_CALL(RotateGroup, MODEL_g33, LVar0, 0, 1, 0) - EVT_RETURN - EVT_END + Call(RotateGroup, MODEL_g33, LVar0, 0, 1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_ToadHouse) = { - EVT_SET(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-1.0)) - EVT_CALL(RotateGroup, MODEL_g58, LVar1, 0, 0, 1) - EVT_SET(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-0.5)) - EVT_CALL(RotateGroup, MODEL_g55, LVar1, 0, 1, 0) - EVT_SET(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(0.5)) - EVT_CALL(RotateGroup, MODEL_g56, LVar1, 0, 1, 0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(90) - EVT_CALL(EnableModel, MODEL_o177, FALSE) - EVT_CASE_DEFAULT - EVT_CALL(EnableModel, MODEL_o177, TRUE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + MulF(LVar1, Float(-1.0)) + Call(RotateGroup, MODEL_g58, LVar1, 0, 0, 1) + Set(LVar1, LVar0) + MulF(LVar1, Float(-0.5)) + Call(RotateGroup, MODEL_g55, LVar1, 0, 1, 0) + Set(LVar1, LVar0) + MulF(LVar1, Float(0.5)) + Call(RotateGroup, MODEL_g56, LVar1, 0, 1, 0) + Switch(LVar0) + CaseEq(90) + Call(EnableModel, MODEL_o177, FALSE) + CaseDefault + Call(EnableModel, MODEL_o177, TRUE) + EndSwitch + Return + End }; s32 N(InteriorNPCs_ToadHouse)[] = { @@ -84,38 +84,38 @@ s32 N(InteriorNPCs_ToadHouse)[] = { EvtScript N(EVS_SetupRooms) = { // house - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_RIGHT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_House)), - EVT_PTR(N(EVS_SetWallRot_House)), - EVT_PTR(N(EVS_DropDoor_House)), + Ref(N(EVS_SetDoorRot_House)), + Ref(N(EVS_SetWallRot_House)), + Ref(N(EVS_DropDoor_House)), NULL, COLLIDER_o99, COLLIDER_o184, MODEL_o76, NULL) // shop - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_RIGHT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_Shop)), - EVT_PTR(N(EVS_SetWallRot_Shop)), + Ref(N(EVS_SetDoorRot_Shop)), + Ref(N(EVS_SetWallRot_Shop)), NULL, NULL, COLLIDER_o72, COLLIDER_o185, MODEL_o76, - EVT_PTR(N(InteriorNPCs_Shop))) + Ref(N(InteriorNPCs_Shop))) // toad house - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_RIGHT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_ToadHouse)), - EVT_PTR(N(EVS_SetWallRot_ToadHouse)), + Ref(N(EVS_SetDoorRot_ToadHouse)), + Ref(N(EVS_SetWallRot_ToadHouse)), NULL, NULL, COLLIDER_o100, COLLIDER_o186, MODEL_o76, - EVT_PTR(N(InteriorNPCs_ToadHouse))) - EVT_RETURN - EVT_END + Ref(N(InteriorNPCs_ToadHouse))) + Return + End }; diff --git a/src/world/area_hos/hos_03/hos_03_5_foliage.c b/src/world/area_hos/hos_03/hos_03_5_foliage.c index d6bb949bbf7..06178d116e3 100644 --- a/src/world/area_hos/hos_03/hos_03_5_foliage.c +++ b/src/world/area_hos/hos_03/hos_03_5_foliage.c @@ -4,105 +4,105 @@ #include "common/foliage.inc.c" EvtScript N(EVS_ShakeTree_StarHaven) = { - EVT_SET_TIMESCALE(EVT_FLOAT(2.0)) - EVT_USE_BUF(LVar0) - EVT_BUF_READ4(LVar1, LVar2, LVar3, LVar4) - EVT_BUF_READ1(LVar5) - EVT_CALL(GetPlayerPos, LVar6, LVarF, LVar8) - EVT_CALL(PlaySoundAtPlayer, SOUND_SMACK_TREE, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAtPlayer, SOUND_SHAKE_TREE_LEAVES, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_IF_NE(LVar1, 0) - EVT_WAIT(1) - EVT_LOOP(5) - EVT_USE_BUF(LVar1) - EVT_BUF_READ1(LVar2) - EVT_LOOP(LVar2) - EVT_BUF_READ1(LVar3) - EVT_CALL(N(TransformFoliage), LVar3, EVT_FLOAT(0.1), EVT_FLOAT(0.2), LVarF, 0) - EVT_END_LOOP - EVT_WAIT(1) - EVT_USE_BUF(LVar1) - EVT_BUF_READ1(LVar2) - EVT_LOOP(LVar2) - EVT_BUF_READ1(LVar3) - EVT_CALL(N(TransformFoliage), LVar3, EVT_FLOAT(0.1), EVT_FLOAT(-0.2), LVarF, 0) - EVT_END_LOOP - EVT_WAIT(1) - EVT_END_LOOP - EVT_USE_BUF(LVar1) - EVT_BUF_READ1(LVar2) - EVT_LOOP(LVar2) - EVT_BUF_READ1(LVar3) - EVT_CALL(TranslateModel, LVar3, 0, 0, 0) - EVT_END_LOOP - EVT_WAIT(1) - EVT_END_IF - EVT_END_THREAD - EVT_THREAD - EVT_IF_NE(LVar2, 0) - EVT_LOOP(5) - EVT_USE_BUF(LVar2) - EVT_BUF_READ1(LVar3) - EVT_LOOP(LVar3) - EVT_BUF_READ1(LVar4) - EVT_CALL(N(TransformFoliage), LVar4, EVT_FLOAT(0.1), EVT_FLOAT(0.2), LVarF, 0) - EVT_END_LOOP - EVT_WAIT(1) - EVT_USE_BUF(LVar2) - EVT_BUF_READ1(LVar3) - EVT_LOOP(LVar3) - EVT_BUF_READ1(LVar4) - EVT_CALL(N(TransformFoliage), LVar4, EVT_FLOAT(0.1), EVT_FLOAT(-0.2), LVarF, 0) - EVT_END_LOOP - EVT_WAIT(1) - EVT_END_LOOP - EVT_USE_BUF(LVar2) - EVT_BUF_READ1(LVar3) - EVT_LOOP(LVar3) - EVT_BUF_READ1(LVar4) - EVT_CALL(TranslateModel, LVar4, 0, 0, 0) - EVT_END_LOOP - EVT_WAIT(1) - EVT_END_IF - EVT_END_THREAD - EVT_THREAD - EVT_IF_NE(LVar3, 0) - EVT_USE_BUF(LVar3) - EVT_BUF_READ1(LVar4) - EVT_LOOP(LVar4) - EVT_BUF_READ1(LVar5) - EVT_BUF_READ3(LVar6, LVar7, LVar8) - EVT_BUF_READ3(LVar9, LVarA, LVarB) - EVT_IF_EQ(LVarB, 0) - EVT_CALL(DropItemEntity, LVar5, LVar6, LVar7, LVar8, LVar9, LVarA) - EVT_ELSE - EVT_CALL(GetValueByRef, LVarB, LVarC) - EVT_IF_EQ(LVarC, 0) - EVT_CALL(SetValueByRef, LVarB, 1) - EVT_CALL(DropItemEntity, LVar5, LVar6, LVar7, LVar8, LVar9, LVarA) - EVT_END_IF - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_END_THREAD - EVT_THREAD - EVT_IF_NE(LVar4, 0) - EVT_USE_BUF(LVar4) - EVT_BUF_READ1(LVar5) - EVT_LOOP(LVar5) - EVT_BUF_READ3(LVar6, LVar7, LVar8) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 2, LVar6, LVar7, LVar8, 50) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 2, LVar6, LVar7, LVar8, 50) - EVT_END_LOOP - EVT_END_IF - EVT_END_THREAD - EVT_IF_NE(LVar5, 0) - EVT_EXEC_WAIT(LVar5) - EVT_END_IF - EVT_WAIT(15) - EVT_RETURN - EVT_END + SetTimescale(Float(2.0)) + UseBuf(LVar0) + BufRead4(LVar1, LVar2, LVar3, LVar4) + BufRead1(LVar5) + Call(GetPlayerPos, LVar6, LVarF, LVar8) + Call(PlaySoundAtPlayer, SOUND_SMACK_TREE, SOUND_SPACE_DEFAULT) + Call(PlaySoundAtPlayer, SOUND_SHAKE_TREE_LEAVES, SOUND_SPACE_DEFAULT) + Thread + IfNe(LVar1, 0) + Wait(1) + Loop(5) + UseBuf(LVar1) + BufRead1(LVar2) + Loop(LVar2) + BufRead1(LVar3) + Call(N(TransformFoliage), LVar3, Float(0.1), Float(0.2), LVarF, 0) + EndLoop + Wait(1) + UseBuf(LVar1) + BufRead1(LVar2) + Loop(LVar2) + BufRead1(LVar3) + Call(N(TransformFoliage), LVar3, Float(0.1), Float(-0.2), LVarF, 0) + EndLoop + Wait(1) + EndLoop + UseBuf(LVar1) + BufRead1(LVar2) + Loop(LVar2) + BufRead1(LVar3) + Call(TranslateModel, LVar3, 0, 0, 0) + EndLoop + Wait(1) + EndIf + EndThread + Thread + IfNe(LVar2, 0) + Loop(5) + UseBuf(LVar2) + BufRead1(LVar3) + Loop(LVar3) + BufRead1(LVar4) + Call(N(TransformFoliage), LVar4, Float(0.1), Float(0.2), LVarF, 0) + EndLoop + Wait(1) + UseBuf(LVar2) + BufRead1(LVar3) + Loop(LVar3) + BufRead1(LVar4) + Call(N(TransformFoliage), LVar4, Float(0.1), Float(-0.2), LVarF, 0) + EndLoop + Wait(1) + EndLoop + UseBuf(LVar2) + BufRead1(LVar3) + Loop(LVar3) + BufRead1(LVar4) + Call(TranslateModel, LVar4, 0, 0, 0) + EndLoop + Wait(1) + EndIf + EndThread + Thread + IfNe(LVar3, 0) + UseBuf(LVar3) + BufRead1(LVar4) + Loop(LVar4) + BufRead1(LVar5) + BufRead3(LVar6, LVar7, LVar8) + BufRead3(LVar9, LVarA, LVarB) + IfEq(LVarB, 0) + Call(DropItemEntity, LVar5, LVar6, LVar7, LVar8, LVar9, LVarA) + Else + Call(GetValueByRef, LVarB, LVarC) + IfEq(LVarC, 0) + Call(SetValueByRef, LVarB, 1) + Call(DropItemEntity, LVar5, LVar6, LVar7, LVar8, LVar9, LVarA) + EndIf + EndIf + EndLoop + EndIf + EndThread + Thread + IfNe(LVar4, 0) + UseBuf(LVar4) + BufRead1(LVar5) + Loop(LVar5) + BufRead3(LVar6, LVar7, LVar8) + PlayEffect(EFFECT_SPARKLES, 2, LVar6, LVar7, LVar8, 50) + PlayEffect(EFFECT_SPARKLES, 2, LVar6, LVar7, LVar8, 50) + EndLoop + EndIf + EndThread + IfNe(LVar5, 0) + ExecWait(LVar5) + EndIf + Wait(15) + Return + End }; FoliageModelList N(Tree1_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o37, MODEL_o38, MODEL_o39); @@ -150,12 +150,12 @@ BombTrigger N(BombPos_Tree2) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_StarHaven)), TRIGGER_WALL_HAMMER, COLLIDER_o35, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_StarHaven)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_StarHaven)), TRIGGER_WALL_HAMMER, COLLIDER_o32, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_StarHaven)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree_StarHaven)), TRIGGER_WALL_HAMMER, COLLIDER_o35, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_StarHaven)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree_StarHaven)), TRIGGER_WALL_HAMMER, COLLIDER_o32, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_StarHaven)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Return + End }; diff --git a/src/world/area_hos/hos_03/hos_03_6_npc.c b/src/world/area_hos/hos_03/hos_03_6_npc.c index 56b4cb26bbf..8867ad1e25b 100644 --- a/src/world/area_hos/hos_03/hos_03_6_npc.c +++ b/src/world/area_hos/hos_03/hos_03_6_npc.c @@ -12,136 +12,136 @@ #include "world/common/complete/Quizmo.inc.c" EvtScript N(EVS_NpcInteract_StarKid_01) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_HOS_005F) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_HOS_005F) + Return + End }; EvtScript N(EVS_NpcInit_StarKid_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_StarKid_01))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_StarKid_01))) + Return + End }; EvtScript N(EVS_NpcInteract_StarKid_02) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_HOS_0060) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_HOS_0060) + Return + End }; EvtScript N(EVS_NpcInit_StarKid_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_StarKid_02))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_StarKid_02))) + Return + End }; EvtScript N(EVS_NpcInteract_StarKid_03) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_HOS_0061) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_HOS_0061) + Return + End }; EvtScript N(EVS_NpcInit_StarKid_03) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_StarKid_03))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_StarKid_03))) + Return + End }; EvtScript N(EVS_NpcInteract_StarKid_04) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_HOS_0062) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_HOS_0062) + Return + End }; EvtScript N(EVS_NpcInit_StarKid_04) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_StarKid_04))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_StarKid_04))) + Return + End }; EvtScript N(EVS_NpcInteract_StarKid_05) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_HOS_0063) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_HOS_0063) + Return + End }; EvtScript N(EVS_NpcInit_StarKid_05) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_StarKid_05))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_StarKid_05))) + Return + End }; EvtScript N(EVS_ToadHouse_GetInBed) = { - EVT_EXEC(N(EVS_PlayRestingSong)) - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(N(ToadHouse_CamSetFOV), 0, 40) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 34, -8) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 220) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(448.0), EVT_FLOAT(180.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(410.0), EVT_FLOAT(150.0)) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 25) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_CALL(func_802D1270, 442, 140, EVT_FLOAT(3.0)) - EVT_CALL(InterpPlayerYaw, 191, 1) - EVT_WAIT(5) - EVT_CALL(InterpPlayerYaw, 204, 1) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetPlayerImgFXFlags, IMGFX_FLAG_800) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_GET_IN_BED, 1, 1, 0) - EVT_WAIT(61) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) - EVT_THREAD - EVT_WAIT(70) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_PlayRestingSong)) + Thread + Wait(20) + Call(N(ToadHouse_CamSetFOV), 0, 40) + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamPitch, CAM_DEFAULT, 34, -8) + Call(SetCamDistance, CAM_DEFAULT, 220) + Call(SetCamPosA, CAM_DEFAULT, Float(448.0), Float(180.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(410.0), Float(150.0)) + Call(SetCamPosC, CAM_DEFAULT, 0, 25) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Call(func_802D1270, 442, 140, Float(3.0)) + Call(InterpPlayerYaw, 191, 1) + Wait(5) + Call(InterpPlayerYaw, 204, 1) + Call(HidePlayerShadow, TRUE) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetPlayerImgFXFlags, IMGFX_FLAG_800) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_GET_IN_BED, 1, 1, 0) + Wait(61) + Call(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) + Thread + Wait(70) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + EndThread + Return + End }; EvtScript N(EVS_ToadHouse_ReturnFromRest) = { - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(N(ToadHouse_CamSetFOV), 0, 25) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetPlayerPos, 445, 25, 185) - EVT_CALL(PlayerMoveTo, 440, 215, 20) - EVT_RETURN - EVT_END + Exec(N(EVS_SetupMusic)) + Call(N(ToadHouse_CamSetFOV), 0, 25) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetPlayerPos, 445, 25, 185) + Call(PlayerMoveTo, 440, 215, 20) + Return + End }; EvtScript N(EVS_ToadHouse_SetDialogue) = { - EVT_SET(LVar0, MSG_HOS_0064) - EVT_SET(LVar8, MSG_HOS_0065) - EVT_SET(LVar1, MSG_HOS_0066) - EVT_SET(LVar2, MSG_HOS_0067) - EVT_SET(LVar3, MSG_HOS_0068) - EVT_RETURN - EVT_END + Set(LVar0, MSG_HOS_0064) + Set(LVar8, MSG_HOS_0065) + Set(LVar1, MSG_HOS_0066) + Set(LVar2, MSG_HOS_0067) + Set(LVar3, MSG_HOS_0068) + Return + End }; EvtScript N(EVS_NpcInit_ToadHouseKeeper) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ToadHouseKeeper))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ToadHouseKeeper))) + Return + End }; EvtScript N(EVS_NpcInteract_ShopOwner) = { - EVT_EXEC_WAIT(EVS_ShopOwnerDialog) - EVT_RETURN - EVT_END + ExecWait(EVS_ShopOwnerDialog) + Return + End }; EvtScript N(EVS_NpcInit_ShopOwner) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ShopOwner))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ShopOwner))) + Return + End }; NpcData N(NpcData_Townsfolk)[] = { diff --git a/src/world/area_hos/hos_03/hos_03_7_shop.c b/src/world/area_hos/hos_03/hos_03_7_shop.c index cb33fbb1c67..a7f24505e0e 100644 --- a/src/world/area_hos/hos_03/hos_03_7_shop.c +++ b/src/world/area_hos/hos_03/hos_03_7_shop.c @@ -51,14 +51,14 @@ ShopSellPriceData N(PriceList)[] = { }; EvtScript N(EVS_OnBuy) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(SHOP_BUY_RESULT_CANCEL) - EVT_CASE_EQ(SHOP_BUY_RESULT_4) - EVT_CASE_EQ(SHOP_BUY_RESULT_OK) - EVT_CASE_EQ(SHOP_BUY_RESULT_2) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(SHOP_BUY_RESULT_CANCEL) + CaseEq(SHOP_BUY_RESULT_4) + CaseEq(SHOP_BUY_RESULT_OK) + CaseEq(SHOP_BUY_RESULT_2) + EndSwitch + Return + End }; ShopItemLocation N(ItemPositions)[] = { @@ -79,8 +79,8 @@ ShopOwner N(Owner) = { }; EvtScript N(EVS_SetupShop) = { - EVT_CALL(MakeShop, EVT_PTR(N(ItemPositions)), EVT_PTR(N(Inventory)), EVT_PTR(N(PriceList)), 0) - EVT_CALL(MakeShopOwner, EVT_PTR(N(Owner))) - EVT_RETURN - EVT_END + Call(MakeShop, Ref(N(ItemPositions)), Ref(N(Inventory)), Ref(N(PriceList)), 0) + Call(MakeShopOwner, Ref(N(Owner))) + Return + End }; diff --git a/src/world/area_hos/hos_03/hos_03_8_entity.c b/src/world/area_hos/hos_03/hos_03_8_entity.c index 12533628fbf..c7479817319 100644 --- a/src/world/area_hos/hos_03/hos_03_8_entity.c +++ b/src/world/area_hos/hos_03/hos_03_8_entity.c @@ -2,8 +2,8 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 200, 60, 275, 0, MAKE_ENTITY_END) - EVT_CALL(SetEntityCullMode, 3) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_SavePoint), 200, 60, 275, 0, MAKE_ENTITY_END) + Call(SetEntityCullMode, 3) + Return + End }; diff --git a/src/world/area_hos/hos_04/hos_04_1_music.c b/src/world/area_hos/hos_04/hos_04_1_music.c index 570e9fbea66..e9f75a4dfdc 100644 --- a/src/world/area_hos/hos_04/hos_04_1_music.c +++ b/src/world/area_hos/hos_04/hos_04_1_music.c @@ -1,28 +1,28 @@ #include "hos_04.h" EvtScript N(EVS_PlayIntroSong) = { - EVT_WAIT(80) - EVT_CALL(SetMusicTrack, 0, SONG_INTRO_STORY, 2, 8) - EVT_RETURN - EVT_END + Wait(80) + Call(SetMusicTrack, 0, SONG_INTRO_STORY, 2, 8) + Return + End }; EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(hos_04_ENTRY_2) - EVT_CALL(SetMusicTrack, 0, SONG_STARSHIP_THEME, 0, 8) - EVT_CASE_EQ(hos_04_ENTRY_3) - EVT_CASE_EQ(hos_04_ENTRY_4) - EVT_EXEC(N(EVS_PlayIntroSong)) - EVT_CASE_DEFAULT - EVT_IF_EQ(GF_HOS04_Visited, FALSE) - EVT_CALL(SetMusicTrack, 0, SONG_STAR_SANCTUARY, 1, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_STAR_HAVEN, 0, 8) - EVT_END_IF - EVT_CALL(PlaySound, SOUND_LOOP_STAR_SANCTUARY_NEAR) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(hos_04_ENTRY_2) + Call(SetMusicTrack, 0, SONG_STARSHIP_THEME, 0, 8) + CaseEq(hos_04_ENTRY_3) + CaseEq(hos_04_ENTRY_4) + Exec(N(EVS_PlayIntroSong)) + CaseDefault + IfEq(GF_HOS04_Visited, FALSE) + Call(SetMusicTrack, 0, SONG_STAR_SANCTUARY, 1, 8) + Else + Call(SetMusicTrack, 0, SONG_STAR_HAVEN, 0, 8) + EndIf + Call(PlaySound, SOUND_LOOP_STAR_SANCTUARY_NEAR) + EndSwitch + Return + End }; diff --git a/src/world/area_hos/hos_04/hos_04_2_main.c b/src/world/area_hos/hos_04/hos_04_2_main.c index bba25a63675..9c7dfc61477 100644 --- a/src/world/area_hos/hos_04/hos_04_2_main.c +++ b/src/world/area_hos/hos_04/hos_04_2_main.c @@ -4,99 +4,99 @@ EvtScript N(EVS_ExitWalk_hos_03_1) = EVT_EXIT_WALK(60, hos_04_ENTRY_0, "hos_03", EvtScript N(EVS_ExitWalk_hos_05_0) = EVT_EXIT_WALK(60, hos_04_ENTRY_1, "hos_05", hos_05_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_hos_03_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_hos_05_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_o163, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_hos_03_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_hos_05_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_o163, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_SET(AF_HOS_B5, FALSE) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(hos_04_ENTRY_0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitnw, COLLIDER_FLAGS_UPPER_MASK) - EVT_IF_EQ(GF_HOS04_Visited, FALSE) - EVT_THREAD - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetPlayerPos, -630, 0, 0) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_EQ(LVar0, PARTNER_NONE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, -660, 0, 0) - EVT_WAIT(1) - EVT_CALL(EnablePartnerAI) - EVT_END_IF - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -565, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -565, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 1350) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-25.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-15.0), EVT_FLOAT(-100.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(87.5), EVT_FLOAT(50.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(4.0), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.15)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(30) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC_WAIT(EnterWalk) - EVT_WAIT(20) - EVT_SET(GF_HOS04_Visited, TRUE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, 0, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, 0, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_SET(AF_HOS_B5, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_THREAD - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_END_IF - EVT_CASE_EQ(hos_04_ENTRY_1) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitnw, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(hos_04_ENTRY_2) - EVT_EXEC(N(EVS_Starship_FlyingAway)) - EVT_CASE_EQ(hos_04_ENTRY_3) - EVT_EXEC_WAIT(N(EVS_Intro_PreHeist_Unused)) - EVT_CASE_EQ(hos_04_ENTRY_4) - EVT_EXEC_WAIT(N(EVS_Intro_PostHeist)) - EVT_CASE_EQ(hos_04_ENTRY_5) - EVT_CALL(EnableGroup, MODEL_g1, FALSE) - EVT_EXEC(N(EVS_BetaStarship_Flight1)) - EVT_CASE_EQ(hos_04_ENTRY_6) - EVT_CALL(EnableGroup, MODEL_g1, FALSE) - EVT_EXEC(N(EVS_BetaStarship_Flight2)) - EVT_CASE_EQ(hos_04_ENTRY_7) - EVT_CALL(EnableGroup, MODEL_g1, FALSE) - EVT_EXEC(N(EVS_BetaStarship_Return)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Set(AF_HOS_B5, FALSE) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(hos_04_ENTRY_0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitnw, COLLIDER_FLAGS_UPPER_MASK) + IfEq(GF_HOS04_Visited, FALSE) + Thread + Call(DisablePlayerInput, TRUE) + Call(SetPlayerPos, -630, 0, 0) + Call(GetPartnerInUse, LVar0) + IfEq(LVar0, PARTNER_NONE) + Call(DisablePartnerAI, 0) + Call(SetNpcPos, NPC_PARTNER, -660, 0, 0) + Wait(1) + Call(EnablePartnerAI) + EndIf + Call(UseSettingsFrom, CAM_DEFAULT, -565, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, -565, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, 1350) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-25.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(-15.0), Float(-100.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(87.5), Float(50.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10) + Call(SetCamPitch, CAM_DEFAULT, Float(4.0), Float(-7.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.15)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(30) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + ExecWait(EnterWalk) + Wait(20) + Set(GF_HOS04_Visited, TRUE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, 0, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, 0, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Set(AF_HOS_B5, TRUE) + Call(DisablePlayerInput, FALSE) + EndThread + Else + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + EndIf + CaseEq(hos_04_ENTRY_1) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitnw, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseEq(hos_04_ENTRY_2) + Exec(N(EVS_Starship_FlyingAway)) + CaseEq(hos_04_ENTRY_3) + ExecWait(N(EVS_Intro_PreHeist_Unused)) + CaseEq(hos_04_ENTRY_4) + ExecWait(N(EVS_Intro_PostHeist)) + CaseEq(hos_04_ENTRY_5) + Call(EnableGroup, MODEL_g1, FALSE) + Exec(N(EVS_BetaStarship_Flight1)) + CaseEq(hos_04_ENTRY_6) + Call(EnableGroup, MODEL_g1, FALSE) + Exec(N(EVS_BetaStarship_Flight2)) + CaseEq(hos_04_ENTRY_7) + Call(EnableGroup, MODEL_g1, FALSE) + Exec(N(EVS_BetaStarship_Return)) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_STAR_HAVEN) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_THREAD - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_END_THREAD - EVT_EXEC(N(EVS_SetupFountains)) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupNarrator)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_STAR_HAVEN) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Thread + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + EndThread + Exec(N(EVS_SetupFountains)) + ExecWait(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Wait(1) + Exec(N(EVS_SetupNarrator)) + Return + End }; diff --git a/src/world/area_hos/hos_04/hos_04_3_fountains.c b/src/world/area_hos/hos_04/hos_04_3_fountains.c index 9953e198470..f66964600d2 100644 --- a/src/world/area_hos/hos_04/hos_04_3_fountains.c +++ b/src/world/area_hos/hos_04/hos_04_3_fountains.c @@ -23,29 +23,29 @@ void N(setup_gfx_fountain_stars)(void) { #include "world/common/atomic/TexturePan.inc.c" EvtScript N(EVS_SetupFountains) = { - EVT_THREAD + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 100, -80, -50, 120) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( 0,-2000, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_o438, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o462, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o469, TRUE) - EVT_CALL(SetModelCustomGfx, MODEL_o469, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_o462, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_o465, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_o461, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_0, EVT_PTR(N(setup_gfx_fountain_water)), NULL) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(setup_gfx_fountain_stars)), NULL) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(EnableTexPanning, MODEL_o438, TRUE) + Call(EnableTexPanning, MODEL_o462, TRUE) + Call(EnableTexPanning, MODEL_o469, TRUE) + Call(SetModelCustomGfx, MODEL_o469, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_o462, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_o465, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_o461, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) + Call(SetCustomGfxBuilders, CUSTOM_GFX_0, Ref(N(setup_gfx_fountain_water)), NULL) + Call(SetCustomGfxBuilders, CUSTOM_GFX_1, Ref(N(setup_gfx_fountain_stars)), NULL) + Return + End }; diff --git a/src/world/area_hos/hos_04/hos_04_4_unused.c b/src/world/area_hos/hos_04/hos_04_4_unused.c index 87d355da19c..9a05a8cd081 100644 --- a/src/world/area_hos/hos_04/hos_04_4_unused.c +++ b/src/world/area_hos/hos_04/hos_04_4_unused.c @@ -6,17 +6,17 @@ API_CALLABLE(N(GetLastEntryID)) { } EvtScript N(EVS_DoNothing) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_SetupUnused) = { - EVT_CALL(N(GetLastEntryID)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(hos_04_ENTRY_0) - EVT_SET(LVar0, -1) - EVT_EXEC(N(EVS_DoNothing)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(N(GetLastEntryID)) + Switch(LVar0) + CaseEq(hos_04_ENTRY_0) + Set(LVar0, -1) + Exec(N(EVS_DoNothing)) + EndSwitch + Return + End }; diff --git a/src/world/area_hos/hos_04/hos_04_6_intro.c b/src/world/area_hos/hos_04/hos_04_6_intro.c index 78a4e552a67..89693c069fc 100644 --- a/src/world/area_hos/hos_04/hos_04_6_intro.c +++ b/src/world/area_hos/hos_04/hos_04_6_intro.c @@ -115,86 +115,86 @@ API_CALLABLE(N(AnimateViewPitchPostHeist)) { extern EvtScript N(EVS_ControlTwink); EvtScript N(EVS_Intro_PostHeist) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(N(SetCamVfov), CAM_DEFAULT, 75) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 30, 0) - EVT_CALL(LoadSettings, CAM_DEFAULT, EVT_PTR(N(CamSettings_PostHeist))) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_THREAD - EVT_EXEC(N(EVS_ControlTwink)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(N(SetCamVfov), CAM_DEFAULT, 75) + Call(SetPanTarget, CAM_DEFAULT, 0, 30, 0) + Call(LoadSettings, CAM_DEFAULT, Ref(N(CamSettings_PostHeist))) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Thread + Exec(N(EVS_ControlTwink)) + EndThread + Return + End }; EvtScript N(EVS_ControlTwink) = { - EVT_CALL(SetNpcAnimation, NPC_Twink, ANIM_Twink_Back) - EVT_CALL(SetNpcYaw, NPC_Twink, 180) - EVT_CALL(N(AnimateBoomLengthPostHeist)) - EVT_WAIT(15 * DT) - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(InterpNpcYaw, NPC_Twink, 0, 0) - EVT_WAIT(2) - EVT_CALL(SetNpcAnimation, NPC_Twink, ANIM_Twink_Still) - EVT_WAIT(20 * DT) - EVT_CALL(InterpNpcYaw, NPC_Twink, 180, 0) - EVT_WAIT(2) - EVT_CALL(SetNpcAnimation, NPC_Twink, ANIM_Twink_Back) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(100 * DT) - EVT_CALL(N(AnimateViewPitchPostHeist)) - EVT_END_THREAD - EVT_CALL(LoadPath, 200 * DT, EVT_PTR(N(TwinkFlightPath)), ARRAY_COUNT(N(TwinkFlightPath)), EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Twink, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_Twink, NPC_DISPOSE_LOCATION) - EVT_THREAD - EVT_WAIT(85 * DT) - EVT_CALL(N(BlockForever)) - EVT_END_THREAD - EVT_WAIT(120 * DT) - EVT_CALL(N(ResumeIntroState)) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_Twink, ANIM_Twink_Back) + Call(SetNpcYaw, NPC_Twink, 180) + Call(N(AnimateBoomLengthPostHeist)) + Wait(15 * DT) + Thread + Wait(10 * DT) + Call(InterpNpcYaw, NPC_Twink, 0, 0) + Wait(2) + Call(SetNpcAnimation, NPC_Twink, ANIM_Twink_Still) + Wait(20 * DT) + Call(InterpNpcYaw, NPC_Twink, 180, 0) + Wait(2) + Call(SetNpcAnimation, NPC_Twink, ANIM_Twink_Back) + EndThread + Thread + Wait(100 * DT) + Call(N(AnimateViewPitchPostHeist)) + EndThread + Call(LoadPath, 200 * DT, Ref(N(TwinkFlightPath)), ARRAY_COUNT(N(TwinkFlightPath)), EASING_LINEAR) + Label(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Twink, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(0) + EndIf + Call(SetNpcPos, NPC_Twink, NPC_DISPOSE_LOCATION) + Thread + Wait(85 * DT) + Call(N(BlockForever)) + EndThread + Wait(120 * DT) + Call(N(ResumeIntroState)) + Return + End }; // establishing shot of the star shrine; camera slowly moves along the path toward it EvtScript N(EVS_Intro_PreHeist_Unused) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(N(SetCamVfov), CAM_DEFAULT, 75) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 30, 0) - EVT_CALL(LoadSettings, CAM_DEFAULT, EVT_PTR(N(CamSettings_PreHeist))) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_THREAD - EVT_CALL(N(AnimateBoomLengthPreHeist)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(300) - EVT_CALL(N(ResumeIntroState)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(N(SetCamVfov), CAM_DEFAULT, 75) + Call(SetPanTarget, CAM_DEFAULT, 0, 30, 0) + Call(LoadSettings, CAM_DEFAULT, Ref(N(CamSettings_PreHeist))) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Thread + Call(N(AnimateBoomLengthPreHeist)) + EndThread + Thread + Wait(300) + Call(N(ResumeIntroState)) + EndThread + Return + End }; #include "world/common/npc/StarSpirit.inc.c" #include "world/common/npc/Twink.h" EvtScript N(EVS_NpcInit_Twink) = { - EVT_RETURN - EVT_END + Return + End }; NpcData N(NpcData_Twink) = { diff --git a/src/world/area_hos/hos_04/hos_04_7_starship.c b/src/world/area_hos/hos_04/hos_04_7_starship.c index a61d1a6146f..f09ffd66ab1 100644 --- a/src/world/area_hos/hos_04/hos_04_7_starship.c +++ b/src/world/area_hos/hos_04/hos_04_7_starship.c @@ -21,283 +21,283 @@ API_CALLABLE(N(ScreenOverlayFadeIn)) { } EvtScript N(EVS_Starship_FlyingAway) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 45, 16, 4096) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -280, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -280, 0, 0) - EVT_CALL(SetCamType, CAM_DEFAULT, 0, FALSE) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(550.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-688.0), EVT_FLOAT(50.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(-544.0), EVT_FLOAT(50.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(2.0), EVT_FLOAT(-20.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(PlaySound, SOUND_STARSHIP_ASCEND) - EVT_CALL(MakeLerp, 0, 900, 45, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g161, 0, LVar0, 0) - EVT_ADD(LVar0, 520) - EVT_CALL(SetPlayerPos, 315, LVar0, 5) - EVT_CALL(SetNpcPos, NPC_PARTNER, 313, LVar0, 5) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(55) - EVT_CALL(GotoMap, EVT_PTR("hos_20"), hos_20_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 45, 16, 4096) + Call(UseSettingsFrom, CAM_DEFAULT, -280, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, -280, 0, 0) + Call(SetCamType, CAM_DEFAULT, 0, FALSE) + Call(SetCamDistance, CAM_DEFAULT, Float(550.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(-688.0), Float(50.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(-544.0), Float(50.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(2.0), Float(-20.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10) + Thread + Call(PlaySound, SOUND_STARSHIP_ASCEND) + Call(MakeLerp, 0, 900, 45, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g161, 0, LVar0, 0) + Add(LVar0, 520) + Call(SetPlayerPos, 315, LVar0, 5) + Call(SetNpcPos, NPC_PARTNER, 313, LVar0, 5) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Wait(55) + Call(GotoMap, Ref("hos_20"), hos_20_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_SetStarshipPosRot) = { - EVT_SET(LVar4, 0) - EVT_SET(LVar5, 100) - EVT_LABEL(10) - EVT_SET(LVar3, LVar4) - EVT_SET(LVar4, LVar5) - EVT_SET(LVar5, LVar3) - EVT_CALL(MakeLerp, LVar3, LVar4, 30, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(0.1)) - EVT_ADDF(LVar2, MV_Starship_PosY) - EVT_CALL(TranslateGroup, MODEL_g161, MV_Starship_PosX, LVar2, 0) - EVT_CALL(RotateGroup, MODEL_g161, MV_Starship_PosZ, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_GOTO(10) - EVT_RETURN - EVT_END + Set(LVar4, 0) + Set(LVar5, 100) + Label(10) + Set(LVar3, LVar4) + Set(LVar4, LVar5) + Set(LVar5, LVar3) + Call(MakeLerp, LVar3, LVar4, 30, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, LVar0) + MulF(LVar2, Float(0.1)) + AddF(LVar2, MV_Starship_PosY) + Call(TranslateGroup, MODEL_g161, MV_Starship_PosX, LVar2, 0) + Call(RotateGroup, MODEL_g161, MV_Starship_PosZ, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Goto(10) + Return + End }; // flight1 (same as hos_20 entry 0, without motion lines) EvtScript N(EVS_BetaStarship_Flight1) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -500, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -5000, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -5000, 50) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 5000, 50) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_SET(MV_Starship_Yaw, 0) - EVT_SET(MV_Starship_PosX, -5000) - EVT_SET(MV_Starship_PosY, -525) - EVT_SET(MV_Starship_PosZ, 180) - EVT_EXEC(N(EVS_SetStarshipPosRot)) - EVT_WAIT(1) - EVT_THREAD - EVT_SET(LVar7, 45) - EVT_LOOP(20) - EVT_ADD(MV_Starship_PosX, LVar7) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(LVar7, 50) - EVT_LOOP(0) - EVT_ADD(MV_Starship_PosX, LVar7) - EVT_WAIT(1) - EVT_CALL(GetModelCenter, MODEL_o480) - EVT_ADD(LVar0, 25) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_ADD(LVar2, 2) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_IF_GT(LVar0, LVar3) - EVT_IF_GT(LVar7, 45) - EVT_SUB(LVar7, 1) - EVT_END_IF - EVT_END_IF - EVT_IF_GT(MV_Starship_PosX, 2000) - EVT_SET(MV_Starship_Yaw, 1) - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, -5000) - EVT_LOOP(0) - EVT_ADD(LVar0, 45) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, 0, 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_LABEL(20) - EVT_IF_EQ(MV_Starship_Yaw, 0) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_UNUSED_0000005D) - EVT_CALL(GotoMap, EVT_PTR("hos_00"), hos_00_ENTRY_3) - EVT_ELSE - EVT_SET(LVar0, 2) - EVT_LOOP(10) - EVT_MUL(LVar0, 2) - EVT_ADD(MV_Starship_PosX, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(20) - EVT_CALL(GotoMap, EVT_PTR("kpa_60"), kpa_60_ENTRY_4) - EVT_END_IF - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g1, COLLIDER_FLAGS_UPPER_MASK) + Call(InterpPlayerYaw, 90, 0) + Call(UseSettingsFrom, CAM_DEFAULT, -500, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, -5000, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(350.0)) + Call(SetCamPosA, CAM_DEFAULT, -5000, 50) + Call(SetCamPosB, CAM_DEFAULT, 5000, 50) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-7.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Set(MV_Starship_Yaw, 0) + Set(MV_Starship_PosX, -5000) + Set(MV_Starship_PosY, -525) + Set(MV_Starship_PosZ, 180) + Exec(N(EVS_SetStarshipPosRot)) + Wait(1) + Thread + Set(LVar7, 45) + Loop(20) + Add(MV_Starship_PosX, LVar7) + Wait(1) + EndLoop + Set(LVar7, 50) + Loop(0) + Add(MV_Starship_PosX, LVar7) + Wait(1) + Call(GetModelCenter, MODEL_o480) + Add(LVar0, 25) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Add(LVar2, 2) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(GetCamPosition, CAM_DEFAULT, LVar3, LVar4, LVar5) + IfGt(LVar0, LVar3) + IfGt(LVar7, 45) + Sub(LVar7, 1) + EndIf + EndIf + IfGt(MV_Starship_PosX, 2000) + Set(MV_Starship_Yaw, 1) + EndIf + EndLoop + EndThread + Thread + Set(LVar0, -5000) + Loop(0) + Add(LVar0, 45) + Call(SetPanTarget, CAM_DEFAULT, LVar0, 0, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + EndLoop + EndThread + Label(20) + IfEq(MV_Starship_Yaw, 0) + Wait(1) + Goto(20) + EndIf + IfLt(GB_StoryProgress, STORY_UNUSED_0000005D) + Call(GotoMap, Ref("hos_00"), hos_00_ENTRY_3) + Else + Set(LVar0, 2) + Loop(10) + Mul(LVar0, 2) + Add(MV_Starship_PosX, LVar0) + Wait(1) + EndLoop + Wait(20) + Call(GotoMap, Ref("kpa_60"), kpa_60_ENTRY_4) + EndIf + Wait(100) + Return + End }; // flight2 (same as hos_20 entry 1, without motion lines) EvtScript N(EVS_BetaStarship_Flight2) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -500, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -5000, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -5000, 50) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 5000, 50) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_SET(MV_Starship_Yaw, 0) - EVT_SET(MV_Starship_PosX, -4673) - EVT_SET(MV_Starship_PosY, -525) - EVT_SET(MV_Starship_PosZ, 180) - EVT_EXEC(N(EVS_SetStarshipPosRot)) - EVT_WAIT(1) - EVT_THREAD - EVT_LOOP(0) - EVT_ADD(MV_Starship_PosX, 45) - EVT_WAIT(1) - EVT_CALL(GetModelCenter, MODEL_o480) - EVT_ADD(LVar0, 25) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_ADD(LVar2, 2) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, -5000) - EVT_LOOP(0) - EVT_ADD(LVar0, 45) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, 0, 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_IF_GT(LVar0, 0) - EVT_SET(MV_Starship_Yaw, 1) - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_LABEL(20) - EVT_IF_EQ(MV_Starship_Yaw, 0) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_END_IF - EVT_SET(LVar0, 2) - EVT_LOOP(10) - EVT_MUL(LVar0, 2) - EVT_ADD(MV_Starship_PosX, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(20) - EVT_CALL(GotoMap, EVT_PTR("osr_03"), osr_03_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g1, COLLIDER_FLAGS_UPPER_MASK) + Call(UseSettingsFrom, CAM_DEFAULT, -500, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, -5000, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(350.0)) + Call(SetCamPosA, CAM_DEFAULT, -5000, 50) + Call(SetCamPosB, CAM_DEFAULT, 5000, 50) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-7.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Set(MV_Starship_Yaw, 0) + Set(MV_Starship_PosX, -4673) + Set(MV_Starship_PosY, -525) + Set(MV_Starship_PosZ, 180) + Exec(N(EVS_SetStarshipPosRot)) + Wait(1) + Thread + Loop(0) + Add(MV_Starship_PosX, 45) + Wait(1) + Call(GetModelCenter, MODEL_o480) + Add(LVar0, 25) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Add(LVar2, 2) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + EndLoop + EndThread + Thread + Set(LVar0, -5000) + Loop(0) + Add(LVar0, 45) + Call(SetPanTarget, CAM_DEFAULT, LVar0, 0, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + IfGt(LVar0, 0) + Set(MV_Starship_Yaw, 1) + EndIf + EndLoop + EndThread + Label(20) + IfEq(MV_Starship_Yaw, 0) + Wait(1) + Goto(20) + EndIf + Set(LVar0, 2) + Loop(10) + Mul(LVar0, 2) + Add(MV_Starship_PosX, LVar0) + Wait(1) + EndLoop + Wait(20) + Call(GotoMap, Ref("osr_03"), osr_03_ENTRY_3) + Wait(100) + Return + End }; // return flight (same as hos_20 entry 2, without motion lines) EvtScript N(EVS_BetaStarship_Return) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 90) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -500, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 5000, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -5000, 50) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 5000, 50) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_SET(MV_Starship_Yaw, 0) - EVT_SET(MV_Starship_PosX, 5000) - EVT_SET(MV_Starship_PosY, -525) - EVT_SET(MV_Starship_PosZ, 0) - EVT_EXEC(N(EVS_SetStarshipPosRot)) - EVT_WAIT(2) - EVT_THREAD - EVT_CALL(InterpPlayerYaw, 225, 0) - EVT_SET(LVar7, -50) - EVT_LOOP(0) - EVT_ADD(MV_Starship_PosX, LVar7) - EVT_CALL(GetModelCenter, MODEL_o480) - EVT_ADD(LVar0, -25) - EVT_ADD(LVar2, -5) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 10) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_IF_LT(LVar0, LVar3) - EVT_IF_LT(LVar7, -45) - EVT_ADD(LVar7, 1) - EVT_END_IF - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 5000) - EVT_LOOP(0) - EVT_ADD(LVar0, -45) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, 0, 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_IF_LT(LVar0, -1000) - EVT_SET(MV_Starship_Yaw, 1) - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_LABEL(20) - EVT_IF_EQ(MV_Starship_Yaw, 0) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_END_IF - EVT_SET(LVar0, -2) - EVT_LOOP(10) - EVT_MUL(LVar0, 2) - EVT_ADD(MV_Starship_PosX, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GotoMap, EVT_PTR("hos_05"), hos_05_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g1, COLLIDER_FLAGS_UPPER_MASK) + Call(SetNpcYaw, NPC_PARTNER, 90) + Call(UseSettingsFrom, CAM_DEFAULT, -500, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 5000, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(350.0)) + Call(SetCamPosA, CAM_DEFAULT, -5000, 50) + Call(SetCamPosB, CAM_DEFAULT, 5000, 50) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-7.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Set(MV_Starship_Yaw, 0) + Set(MV_Starship_PosX, 5000) + Set(MV_Starship_PosY, -525) + Set(MV_Starship_PosZ, 0) + Exec(N(EVS_SetStarshipPosRot)) + Wait(2) + Thread + Call(InterpPlayerYaw, 225, 0) + Set(LVar7, -50) + Loop(0) + Add(MV_Starship_PosX, LVar7) + Call(GetModelCenter, MODEL_o480) + Add(LVar0, -25) + Add(LVar2, -5) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar2, 10) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Wait(1) + Call(GetCamPosition, CAM_DEFAULT, LVar3, LVar4, LVar5) + IfLt(LVar0, LVar3) + IfLt(LVar7, -45) + Add(LVar7, 1) + EndIf + EndIf + EndLoop + EndThread + Thread + Set(LVar0, 5000) + Loop(0) + Add(LVar0, -45) + Call(SetPanTarget, CAM_DEFAULT, LVar0, 0, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + IfLt(LVar0, -1000) + Set(MV_Starship_Yaw, 1) + EndIf + EndLoop + EndThread + Label(20) + IfEq(MV_Starship_Yaw, 0) + Wait(1) + Goto(20) + EndIf + Set(LVar0, -2) + Loop(10) + Mul(LVar0, 2) + Add(MV_Starship_PosX, LVar0) + Wait(1) + EndLoop + Call(GotoMap, Ref("hos_05"), hos_05_ENTRY_1) + Wait(100) + Return + End }; diff --git a/src/world/area_hos/hos_04/hos_04_8_narrator.c b/src/world/area_hos/hos_04/hos_04_8_narrator.c index 6f1de820219..9018ab13982 100644 --- a/src/world/area_hos/hos_04/hos_04_8_narrator.c +++ b/src/world/area_hos/hos_04/hos_04_8_narrator.c @@ -30,11 +30,11 @@ void N(curtain_callback_narration)(void) { } EvtScript N(EVS_SetupNarrator) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(hos_04_ENTRY_4) - EVT_CALL(N(SetCurtainCallback), EVT_PTR(N(curtain_callback_narration))) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(hos_04_ENTRY_4) + Call(N(SetCurtainCallback), Ref(N(curtain_callback_narration))) + EndSwitch + Return + End }; diff --git a/src/world/area_hos/hos_05/hos_05_1_music.c b/src/world/area_hos/hos_05/hos_05_1_music.c index 1f3f1ef5da3..cedacc0027f 100644 --- a/src/world/area_hos/hos_05/hos_05_1_music.c +++ b/src/world/area_hos/hos_05/hos_05_1_music.c @@ -1,29 +1,29 @@ #include "hos_05.h" EvtScript N(EVS_PlayIntroStoryMusic) = { - EVT_WAIT(40) - EVT_CALL(SetMusicTrack, 0, SONG_INTRO_STORY, 0, 8) - EVT_WAIT(2030) - EVT_CALL(SetMusicTrack, 0, SONG_INTRO_STORY, 1, 8) - EVT_RETURN - EVT_END + Wait(40) + Call(SetMusicTrack, 0, SONG_INTRO_STORY, 0, 8) + Wait(2030) + Call(SetMusicTrack, 0, SONG_INTRO_STORY, 1, 8) + Return + End }; EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(hos_05_ENTRY_1) - EVT_CALL(SetMusicTrack, 0, SONG_STARSHIP_THEME, 1, 8) - EVT_CALL(PlaySound, SOUND_LOOP_STAR_SANCTUARY_INSIDE) - EVT_CASE_EQ(hos_05_ENTRY_3) - EVT_EXEC(N(EVS_PlayIntroStoryMusic)) - EVT_CASE_EQ(hos_05_ENTRY_4) - EVT_CASE_DEFAULT - EVT_IF_EQ(AF_HOS_B5, FALSE) - EVT_CALL(SetMusicTrack, 0, SONG_STAR_SANCTUARY, 0, 8) - EVT_END_IF - EVT_CALL(PlaySound, SOUND_LOOP_STAR_SANCTUARY_INSIDE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(hos_05_ENTRY_1) + Call(SetMusicTrack, 0, SONG_STARSHIP_THEME, 1, 8) + Call(PlaySound, SOUND_LOOP_STAR_SANCTUARY_INSIDE) + CaseEq(hos_05_ENTRY_3) + Exec(N(EVS_PlayIntroStoryMusic)) + CaseEq(hos_05_ENTRY_4) + CaseDefault + IfEq(AF_HOS_B5, FALSE) + Call(SetMusicTrack, 0, SONG_STAR_SANCTUARY, 0, 8) + EndIf + Call(PlaySound, SOUND_LOOP_STAR_SANCTUARY_INSIDE) + EndSwitch + Return + End }; diff --git a/src/world/area_hos/hos_05/hos_05_2_main.c b/src/world/area_hos/hos_05/hos_05_2_main.c index a4e5ef5748a..bf5af9e392a 100644 --- a/src/world/area_hos/hos_05/hos_05_2_main.c +++ b/src/world/area_hos/hos_05/hos_05_2_main.c @@ -5,47 +5,47 @@ EvtScript N(EVS_ExitWalk_hos_04_1) = EVT_EXIT_WALK(60, hos_05_ENTRY_0, "hos_04", MAP_RODATA_PAD(1, exits); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_hos_04_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Starship_Depart)), TRIGGER_FLOOR_TOUCH, COLLIDER_o630, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_hos_04_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_Starship_Depart)), TRIGGER_FLOOR_TOUCH, COLLIDER_o630, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_STAR_HAVEN) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, hos_05_ENTRY_3) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(IntroNPCs))) - EVT_ELSE - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_END_IF - EVT_EXEC(N(EVS_SetupStarshipAndWater)) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(hos_05_ENTRY_0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.5)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(hos_05_ENTRY_1) - EVT_THREAD - EVT_EXEC_WAIT(N(EVS_EnterStarship)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_THREAD - EVT_CASE_EQ(hos_05_ENTRY_3) - EVT_EXEC_WAIT(N(EVS_Intro_Main)) - EVT_END_SWITCH - EVT_EXEC(N(EVS_SetupNarrator)) - EVT_CALL(EnableGroup, MODEL_g277, FALSE) - EVT_CALL(EnableGroup, MODEL_g279, FALSE) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_RANGE(hos_05_ENTRY_0, hos_05_ENTRY_1) - EVT_EXEC(N(EVS_SetupLightBeam)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_STAR_HAVEN) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Call(GetEntryID, LVar0) + IfEq(LVar0, hos_05_ENTRY_3) + Call(MakeNpcs, FALSE, Ref(N(IntroNPCs))) + Else + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + EndIf + Exec(N(EVS_SetupStarshipAndWater)) + ExecWait(N(EVS_SetupMusic)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(hos_05_ENTRY_0) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.5)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseEq(hos_05_ENTRY_1) + Thread + ExecWait(N(EVS_EnterStarship)) + Exec(N(EVS_BindExitTriggers)) + EndThread + CaseEq(hos_05_ENTRY_3) + ExecWait(N(EVS_Intro_Main)) + EndSwitch + Exec(N(EVS_SetupNarrator)) + Call(EnableGroup, MODEL_g277, FALSE) + Call(EnableGroup, MODEL_g279, FALSE) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseRange(hos_05_ENTRY_0, hos_05_ENTRY_1) + Exec(N(EVS_SetupLightBeam)) + EndSwitch + Return + End }; diff --git a/src/world/area_hos/hos_05/hos_05_3_misc.c b/src/world/area_hos/hos_05/hos_05_3_misc.c index 35b09922933..cd4e42cc430 100644 --- a/src/world/area_hos/hos_05/hos_05_3_misc.c +++ b/src/world/area_hos/hos_05/hos_05_3_misc.c @@ -28,152 +28,152 @@ API_CALLABLE(N(func_80240690_A2A8D0)) { f32 magnitude; f32 angle; - script->varTable[2] = EVT_FLOAT(0.0); - script->varTable[3] = EVT_FLOAT(100.0); - script->varTable[4] = EVT_FLOAT(0.0); + script->varTable[2] = Float(0.0); + script->varTable[3] = Float(100.0); + script->varTable[4] = Float(0.0); angle = (script->varTable[1] * 180.0f) / PI; magnitude = (rand_int(10) / vt2) + 3.0f; - script->varTable[10] = EVT_FLOAT_TO_FIXED(magnitude * cos_rad(angle)); - script->varTable[11] = EVT_FLOAT_TO_FIXED(rand_int(15) + 5); - script->varTable[12] = EVT_FLOAT_TO_FIXED(magnitude * sin_rad(angle)); - script->varTable[13] = EVT_FLOAT_TO_FIXED((f32)(rand_int(10) + 10) * -0.05); + script->varTable[10] = Float_TO_FIXED(magnitude * cos_rad(angle)); + script->varTable[11] = Float_TO_FIXED(rand_int(15) + 5); + script->varTable[12] = Float_TO_FIXED(magnitude * sin_rad(angle)); + script->varTable[13] = Float_TO_FIXED((f32)(rand_int(10) + 10) * -0.05); return ApiStatus_DONE2; } EvtScript N(EVS_SetupStarshipAndWater) = { - EVT_EXEC(N(EVS_SetupStarship)) - EVT_THREAD + Exec(N(EVS_SetupStarship)) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 100, -80, -50, 120) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_o33, TEX_PANNER_1) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetTexPanner, MODEL_o33, TEX_PANNER_1) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_C) TEX_PAN_PARAMS_STEP( -80, 140, 80, -100) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_o34, TEX_PANNER_C) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetTexPanner, MODEL_o34, TEX_PANNER_C) + Return + End }; EvtScript N(D_80246028_A30268) = { - EVT_CALL(N(func_80240690_A2A8D0)) - EVT_LABEL(0) - EVT_ADDF(LVarB, LVarD) - EVT_ADDF(LVar2, LVarA) - EVT_ADDF(LVar3, LVarB) - EVT_ADDF(LVar4, LVarC) - EVT_CALL(TranslateModel, LVar0, LVar2, LVar3, LVar4) - EVT_CALL(N(CastToLocalFloat), 6, LVar2) - EVT_MUL(LVar6, LVar6) - EVT_CALL(N(CastToLocalFloat), 7, LVar4) - EVT_MUL(LVar7, LVar7) - EVT_ADD(LVar6, LVar7) - EVT_IF_LT(LVar6, 10000) - EVT_CALL(N(CastToLocalFloat), 5, LVar3) - EVT_IF_LT(LVar5, 136) - EVT_CALL(N(CastToLocalFloat), 5, LVarB) - EVT_IF_LT(LVar5, 0) - EVT_MULF(LVarB, EVT_FLOAT(-1.0)) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(N(CastToLocalFloat), 5, LVar2) - EVT_CALL(N(CastToLocalFloat), 6, LVar3) - EVT_CALL(N(CastToLocalFloat), 7, LVar4) - EVT_IF_LT(LVar6, 0) - EVT_RETURN - EVT_END_IF - EVT_IF_GT(LVar6, 300) - EVT_RETURN - EVT_END_IF - EVT_IF_LT(LVar5, -300) - EVT_RETURN - EVT_END_IF - EVT_IF_GT(LVar5, 300) - EVT_RETURN - EVT_END_IF - EVT_IF_LT(LVar7, -300) - EVT_RETURN - EVT_END_IF - EVT_IF_GT(LVar7, 600) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(N(func_80240690_A2A8D0)) + Label(0) + AddF(LVarB, LVarD) + AddF(LVar2, LVarA) + AddF(LVar3, LVarB) + AddF(LVar4, LVarC) + Call(TranslateModel, LVar0, LVar2, LVar3, LVar4) + Call(N(CastToLocalFloat), 6, LVar2) + Mul(LVar6, LVar6) + Call(N(CastToLocalFloat), 7, LVar4) + Mul(LVar7, LVar7) + Add(LVar6, LVar7) + IfLt(LVar6, 10000) + Call(N(CastToLocalFloat), 5, LVar3) + IfLt(LVar5, 136) + Call(N(CastToLocalFloat), 5, LVarB) + IfLt(LVar5, 0) + MulF(LVarB, Float(-1.0)) + EndIf + EndIf + EndIf + Call(N(CastToLocalFloat), 5, LVar2) + Call(N(CastToLocalFloat), 6, LVar3) + Call(N(CastToLocalFloat), 7, LVar4) + IfLt(LVar6, 0) + Return + EndIf + IfGt(LVar6, 300) + Return + EndIf + IfLt(LVar5, -300) + Return + EndIf + IfGt(LVar5, 300) + Return + EndIf + IfLt(LVar7, -300) + Return + EndIf + IfGt(LVar7, 600) + Return + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(D_80246298_A304D8) = { - EVT_SET(LVarF, LVar2) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_CALL(RandInt, 40, LVar2) - EVT_ADDF(LVar2, EVT_FLOAT(-20.0)) - EVT_ADDF(LVar3, EVT_FLOAT(-5.0)) - EVT_CALL(RandInt, 40, LVar4) - EVT_ADDF(LVar4, EVT_FLOAT(-20.0)) - EVT_CALL(RandInt, 30, LVar5) - EVT_ADDF(LVar5, EVT_FLOAT(30.0)) - EVT_MULF(LVar5, EVT_FLOAT(0.01)) - EVT_LABEL(0) - EVT_ADDF(LVar2, 0) - EVT_ADDF(LVar3, 0) - EVT_ADDF(LVar4, 0) - EVT_MULF(LVar5, EVT_FLOAT(0.9)) - EVT_CALL(TranslateModel, LVar0, LVar2, LVar3, LVar4) - EVT_CALL(ScaleModel, LVar0, LVar5, LVar5, LVar5) - EVT_SETF(LVar6, LVar5) - EVT_MULF(LVar6, EVT_FLOAT(10.0)) - EVT_CALL(N(CastToLocalFloat), 6, LVar6) - EVT_IF_LT(LVar6, 2) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVarF, LVar2) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Call(RandInt, 40, LVar2) + AddF(LVar2, Float(-20.0)) + AddF(LVar3, Float(-5.0)) + Call(RandInt, 40, LVar4) + AddF(LVar4, Float(-20.0)) + Call(RandInt, 30, LVar5) + AddF(LVar5, Float(30.0)) + MulF(LVar5, Float(0.01)) + Label(0) + AddF(LVar2, 0) + AddF(LVar3, 0) + AddF(LVar4, 0) + MulF(LVar5, Float(0.9)) + Call(TranslateModel, LVar0, LVar2, LVar3, LVar4) + Call(ScaleModel, LVar0, LVar5, LVar5, LVar5) + SetF(LVar6, LVar5) + MulF(LVar6, Float(10.0)) + Call(N(CastToLocalFloat), 6, LVar6) + IfLt(LVar6, 2) + Return + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_8024644C) = { - EVT_SET(LVar0, LVar3) - EVT_SET(LVar2, 5) - EVT_LOOP(LVar2) - EVT_CALL(RandInt, 360, LVar1) - EVT_EXEC_GET_TID(N(D_80246028_A30268), LVar3) - EVT_IF_NE(LVar3, 0) - EVT_CALL(N(AwaitScriptComplete), LVar3) - EVT_END_IF - EVT_END_LOOP - EVT_LABEL(0) - EVT_CALL(RandInt, 360, LVar1) - EVT_EXEC_GET_TID(N(D_80246298_A304D8), LVar3) - EVT_IF_NE(LVar3, 0) - EVT_CALL(N(AwaitScriptComplete), LVar3) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVar0, LVar3) + Set(LVar2, 5) + Loop(LVar2) + Call(RandInt, 360, LVar1) + ExecGetTID(N(D_80246028_A30268), LVar3) + IfNe(LVar3, 0) + Call(N(AwaitScriptComplete), LVar3) + EndIf + EndLoop + Label(0) + Call(RandInt, 360, LVar1) + ExecGetTID(N(D_80246298_A304D8), LVar3) + IfNe(LVar3, 0) + Call(N(AwaitScriptComplete), LVar3) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_80246540) = { - EVT_SET(LVar0, LVar3) - EVT_LABEL(0) - EVT_CALL(RandInt, 360, LVar1) - EVT_EXEC_GET_TID(N(D_80246298_A304D8), LVar3) - EVT_IF_NE(LVar3, 0) - EVT_CALL(N(AwaitScriptComplete), LVar3) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVar0, LVar3) + Label(0) + Call(RandInt, 360, LVar1) + ExecGetTID(N(D_80246298_A304D8), LVar3) + IfNe(LVar3, 0) + Call(N(AwaitScriptComplete), LVar3) + EndIf + Goto(0) + Return + End }; diff --git a/src/world/area_hos/hos_05/hos_05_4_npc.c b/src/world/area_hos/hos_05/hos_05_4_npc.c index 4fafdfa9f3e..7f73c7080fe 100644 --- a/src/world/area_hos/hos_05/hos_05_4_npc.c +++ b/src/world/area_hos/hos_05/hos_05_4_npc.c @@ -19,300 +19,300 @@ API_CALLABLE(N(UnlockStarBeam)) { #include "world/common/npc/StarRod.inc.c" EvtScript N(EVS_StarSpirit_HoverBobbing) = { - EVT_CALL(SetNpcVar, NPC_Eldstar, 0, 0) - EVT_CALL(GetNpcPos, NPC_Eldstar, LVar2, LVar3, LVar4) - EVT_LOOP(0) - EVT_CALL(MakeLerp, 0, 15, 20, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(LVar5, LVar3) - EVT_ADD(LVar5, LVar0) - EVT_CALL(GetNpcPos, NPC_Eldstar, LVar2, LVar0, LVar4) - EVT_CALL(SetNpcPos, NPC_Eldstar, LVar2, LVar5, LVar4) - EVT_CALL(GetNpcPos, NPC_Mamar, LVar2, LVar0, LVar4) - EVT_CALL(SetNpcPos, NPC_Mamar, LVar2, LVar5, LVar4) - EVT_CALL(GetNpcPos, NPC_Skolar, LVar2, LVar0, LVar4) - EVT_CALL(SetNpcPos, NPC_Skolar, LVar2, LVar5, LVar4) - EVT_CALL(GetNpcPos, NPC_Muskular, LVar2, LVar0, LVar4) - EVT_CALL(SetNpcPos, NPC_Muskular, LVar2, LVar5, LVar4) - EVT_CALL(GetNpcPos, NPC_Misstar, LVar2, LVar0, LVar4) - EVT_CALL(SetNpcPos, NPC_Misstar, LVar2, LVar5, LVar4) - EVT_CALL(GetNpcPos, NPC_Klevar, LVar2, LVar0, LVar4) - EVT_CALL(SetNpcPos, NPC_Klevar, LVar2, LVar5, LVar4) - EVT_CALL(GetNpcPos, NPC_Kalmar, LVar2, LVar0, LVar4) - EVT_CALL(SetNpcPos, NPC_Kalmar, LVar2, LVar5, LVar4) - EVT_LABEL(10) - EVT_WAIT(2) - EVT_CALL(GetNpcVar, NPC_Eldstar, 0, LVar6) - EVT_IF_NE(LVar6, 0) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 15, 0, 20, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(LVar5, LVar3) - EVT_ADD(LVar5, LVar0) - EVT_CALL(GetNpcPos, NPC_Eldstar, LVar2, LVar0, LVar4) - EVT_CALL(SetNpcPos, NPC_Eldstar, LVar2, LVar5, LVar4) - EVT_CALL(GetNpcPos, NPC_Mamar, LVar2, LVar0, LVar4) - EVT_CALL(SetNpcPos, NPC_Mamar, LVar2, LVar5, LVar4) - EVT_CALL(GetNpcPos, NPC_Skolar, LVar2, LVar0, LVar4) - EVT_CALL(SetNpcPos, NPC_Skolar, LVar2, LVar5, LVar4) - EVT_CALL(GetNpcPos, NPC_Muskular, LVar2, LVar0, LVar4) - EVT_CALL(SetNpcPos, NPC_Muskular, LVar2, LVar5, LVar4) - EVT_CALL(GetNpcPos, NPC_Misstar, LVar2, LVar0, LVar4) - EVT_CALL(SetNpcPos, NPC_Misstar, LVar2, LVar5, LVar4) - EVT_CALL(GetNpcPos, NPC_Klevar, LVar2, LVar0, LVar4) - EVT_CALL(SetNpcPos, NPC_Klevar, LVar2, LVar5, LVar4) - EVT_CALL(GetNpcPos, NPC_Kalmar, LVar2, LVar0, LVar4) - EVT_CALL(SetNpcPos, NPC_Kalmar, LVar2, LVar5, LVar4) - EVT_LABEL(11) - EVT_WAIT(2) - EVT_CALL(GetNpcVar, NPC_Eldstar, 0, LVar6) - EVT_IF_NE(LVar6, 0) - EVT_GOTO(11) - EVT_END_IF - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetNpcVar, NPC_Eldstar, 0, 0) + Call(GetNpcPos, NPC_Eldstar, LVar2, LVar3, LVar4) + Loop(0) + Call(MakeLerp, 0, 15, 20, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Set(LVar5, LVar3) + Add(LVar5, LVar0) + Call(GetNpcPos, NPC_Eldstar, LVar2, LVar0, LVar4) + Call(SetNpcPos, NPC_Eldstar, LVar2, LVar5, LVar4) + Call(GetNpcPos, NPC_Mamar, LVar2, LVar0, LVar4) + Call(SetNpcPos, NPC_Mamar, LVar2, LVar5, LVar4) + Call(GetNpcPos, NPC_Skolar, LVar2, LVar0, LVar4) + Call(SetNpcPos, NPC_Skolar, LVar2, LVar5, LVar4) + Call(GetNpcPos, NPC_Muskular, LVar2, LVar0, LVar4) + Call(SetNpcPos, NPC_Muskular, LVar2, LVar5, LVar4) + Call(GetNpcPos, NPC_Misstar, LVar2, LVar0, LVar4) + Call(SetNpcPos, NPC_Misstar, LVar2, LVar5, LVar4) + Call(GetNpcPos, NPC_Klevar, LVar2, LVar0, LVar4) + Call(SetNpcPos, NPC_Klevar, LVar2, LVar5, LVar4) + Call(GetNpcPos, NPC_Kalmar, LVar2, LVar0, LVar4) + Call(SetNpcPos, NPC_Kalmar, LVar2, LVar5, LVar4) + Label(10) + Wait(2) + Call(GetNpcVar, NPC_Eldstar, 0, LVar6) + IfNe(LVar6, 0) + Goto(10) + EndIf + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 15, 0, 20, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Set(LVar5, LVar3) + Add(LVar5, LVar0) + Call(GetNpcPos, NPC_Eldstar, LVar2, LVar0, LVar4) + Call(SetNpcPos, NPC_Eldstar, LVar2, LVar5, LVar4) + Call(GetNpcPos, NPC_Mamar, LVar2, LVar0, LVar4) + Call(SetNpcPos, NPC_Mamar, LVar2, LVar5, LVar4) + Call(GetNpcPos, NPC_Skolar, LVar2, LVar0, LVar4) + Call(SetNpcPos, NPC_Skolar, LVar2, LVar5, LVar4) + Call(GetNpcPos, NPC_Muskular, LVar2, LVar0, LVar4) + Call(SetNpcPos, NPC_Muskular, LVar2, LVar5, LVar4) + Call(GetNpcPos, NPC_Misstar, LVar2, LVar0, LVar4) + Call(SetNpcPos, NPC_Misstar, LVar2, LVar5, LVar4) + Call(GetNpcPos, NPC_Klevar, LVar2, LVar0, LVar4) + Call(SetNpcPos, NPC_Klevar, LVar2, LVar5, LVar4) + Call(GetNpcPos, NPC_Kalmar, LVar2, LVar0, LVar4) + Call(SetNpcPos, NPC_Kalmar, LVar2, LVar5, LVar4) + Label(11) + Wait(2) + Call(GetNpcVar, NPC_Eldstar, 0, LVar6) + IfNe(LVar6, 0) + Goto(11) + EndIf + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_Scene_RecieveStarBeam) = { - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar2, 85) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(InterruptUsePartner) - EVT_WAIT(15) - EVT_END_IF - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_THREAD - EVT_CALL(func_802D2C14, 1) - EVT_WAIT(30 * DT) - EVT_CALL(PlayerMoveTo, 0, 80, 10) - EVT_CALL(PlayerFaceNpc, NPC_Eldstar, FALSE) - EVT_END_THREAD - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 136, 80) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 136, 80) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(510.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -50) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(10.0), EVT_FLOAT(-2.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.5 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(30 * DT) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 220, -275) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(-4.5), EVT_FLOAT(-3.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 512, MSG_HOS_0069) - EVT_CALL(func_802D2C14, 0) - EVT_WAIT(30 * DT) - EVT_CALL(SetSelfVar, 0, 1) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 136, 80) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(600.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -50) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(10.0), EVT_FLOAT(-2.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(MakeLerp, 0, 360, 25, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Eldstar, 0, LVar0, 0) - EVT_CALL(SetNpcRotation, NPC_Mamar, 0, LVar0, 0) - EVT_CALL(SetNpcRotation, NPC_Skolar, 0, LVar0, 0) - EVT_CALL(SetNpcRotation, NPC_Muskular, 0, LVar0, 0) - EVT_CALL(SetNpcRotation, NPC_Misstar, 0, LVar0, 0) - EVT_CALL(SetNpcRotation, NPC_Klevar, 0, LVar0, 0) - EVT_CALL(SetNpcRotation, NPC_Kalmar, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(GetPlayerPos, LVar6, LVar7, LVar8) - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Eldstar, NPC_FLAG_TOUCHES_GROUND, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Eldstar, ANIM_WorldEldstar_Leap) - EVT_CALL(SetNpcJumpscale, NPC_Eldstar, EVT_FLOAT(3.2)) - EVT_CALL(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Eldstar, LVar0, LVar1, LVar2, 5) - EVT_CALL(SetNpcAnimation, NPC_Eldstar, ANIM_WorldEldstar_Idle) - EVT_ADD(LVar7, 20) - EVT_CALL(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, LVar6, LVar7, LVar8) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar6, LVar7, LVar8, 10) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Mamar, NPC_FLAG_TOUCHES_GROUND, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_Leap) - EVT_CALL(SetNpcJumpscale, NPC_Mamar, EVT_FLOAT(3.2)) - EVT_CALL(GetNpcPos, NPC_Mamar, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Mamar, LVar0, LVar1, LVar2, 5) - EVT_CALL(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Skolar, NPC_FLAG_TOUCHES_GROUND, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Skolar, ANIM_WorldSkolar_Leap) - EVT_CALL(SetNpcJumpscale, NPC_Skolar, EVT_FLOAT(3.2)) - EVT_CALL(GetNpcPos, NPC_Skolar, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Skolar, LVar0, LVar1, LVar2, 5) - EVT_CALL(SetNpcAnimation, NPC_Skolar, ANIM_WorldSkolar_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Muskular, NPC_FLAG_TOUCHES_GROUND, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Muskular, ANIM_WorldMuskular_Leap) - EVT_CALL(SetNpcJumpscale, NPC_Muskular, EVT_FLOAT(3.2)) - EVT_CALL(GetNpcPos, NPC_Muskular, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Muskular, LVar0, LVar1, LVar2, 5) - EVT_CALL(SetNpcAnimation, NPC_Muskular, ANIM_WorldMuskular_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Misstar, NPC_FLAG_TOUCHES_GROUND, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Misstar, ANIM_WorldMisstar_Leap) - EVT_CALL(SetNpcJumpscale, NPC_Misstar, EVT_FLOAT(3.2)) - EVT_CALL(GetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Misstar, LVar0, LVar1, LVar2, 5) - EVT_CALL(SetNpcAnimation, NPC_Misstar, ANIM_WorldMisstar_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Klevar, NPC_FLAG_TOUCHES_GROUND, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Leap) - EVT_CALL(SetNpcJumpscale, NPC_Klevar, EVT_FLOAT(3.2)) - EVT_CALL(GetNpcPos, NPC_Klevar, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Klevar, LVar0, LVar1, LVar2, 5) - EVT_CALL(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Idle) - EVT_END_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Kalmar, NPC_FLAG_TOUCHES_GROUND, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_Leap) - EVT_CALL(SetNpcJumpscale, NPC_Kalmar, EVT_FLOAT(3.2)) - EVT_CALL(GetNpcPos, NPC_Kalmar, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Kalmar, LVar0, LVar1, LVar2, 5) - EVT_CALL(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_Idle) - EVT_THREAD - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 2, 0, 154, 85, EVT_FLOAT(2.8), 100) - EVT_CALL(PlaySound, SOUND_RELEASE_ENERGY) - EVT_WAIT(115) - EVT_CALL(PlaySoundAtPlayer, SOUND_GET_STAR_POWER_WAVE, SOUND_SPACE_DEFAULT) - EVT_ADD(LVar7, 20) - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 4, LVar6, LVar7, LVar8, EVT_FLOAT(0.3), 30) - EVT_END_THREAD - EVT_WAIT(40) - EVT_CALL(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, 10, 154, 88) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, 10, 154, 88, 10) - EVT_WAIT(6) - EVT_CALL(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, 10, 154, 88) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, 10, 154, 88, 15) - EVT_WAIT(6) - EVT_CALL(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, -10, 154, 88) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, -10, 154, 88, 20) - EVT_WAIT(6) - EVT_CALL(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, 10, 154, 88) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, 10, 154, 88, 25) - EVT_WAIT(6) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_UsePower) - EVT_LOOP(3) - EVT_CALL(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, 0, 154, 88) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, 0, 154, 88, 30) - EVT_WAIT(6) - EVT_CALL(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, -10, 154, 88) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, -10, 154, 88, 30) - EVT_WAIT(6) - EVT_CALL(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, 10, 154, 88) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, 10, 154, 88, 30) - EVT_WAIT(6) - EVT_END_LOOP - EVT_CALL(N(UnlockStarBeam)) - EVT_CALL(SetSelfVar, 0, 0) - EVT_WAIT(30 * DT) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0198, 160, 40) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(30 * DT) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 220, -275) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(-4.5), EVT_FLOAT(-3.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 512, MSG_HOS_006A) - EVT_WAIT(30 * DT) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 136, 80) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(510.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -50) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(8.0), EVT_FLOAT(-7.9)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(30 * DT) - EVT_SET(GB_StoryProgress, STORY_CH8_STAR_SHIP_ACTIVATED) - EVT_EXEC_WAIT(N(EVS_Starship_Summon)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 220, -275) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(-4.5), EVT_FLOAT(-3.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 512, MSG_HOS_006B) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_Back) - EVT_CALL(SetNpcAnimation, NPC_Muskular, ANIM_WorldMuskular_Back) - EVT_CALL(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Back) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o616, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetZoneEnabled, ZONE_o622, FALSE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.5)) - EVT_CALL(EnableModel, MODEL_o362, FALSE) - EVT_CALL(EnableModel, MODEL_o397, FALSE) - EVT_WAIT(15 * DT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar2, 85) + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, PARTNER_NONE) + Call(InterruptUsePartner) + Wait(15) + EndIf + BreakLoop + EndIf + Wait(1) + EndLoop + Call(DisablePlayerInput, TRUE) + Thread + Call(func_802D2C14, 1) + Wait(30 * DT) + Call(PlayerMoveTo, 0, 80, 10) + Call(PlayerFaceNpc, NPC_Eldstar, FALSE) + EndThread + Call(UseSettingsFrom, CAM_DEFAULT, 0, 136, 80) + Call(SetPanTarget, CAM_DEFAULT, 0, 136, 80) + Call(SetCamDistance, CAM_DEFAULT, Float(510.0)) + Call(SetCamPosA, CAM_DEFAULT, 0, 0) + Call(SetCamPosB, CAM_DEFAULT, 0, -50) + Call(SetCamPitch, CAM_DEFAULT, Float(10.0), Float(-2.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.5 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(30 * DT) + Call(SetPanTarget, CAM_DEFAULT, 0, 220, -275) + Call(SetCamDistance, CAM_DEFAULT, Float(1.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(-4.5), Float(-3.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 512, MSG_HOS_0069) + Call(func_802D2C14, 0) + Wait(30 * DT) + Call(SetSelfVar, 0, 1) + Call(SetPanTarget, CAM_DEFAULT, 0, 136, 80) + Call(SetCamDistance, CAM_DEFAULT, Float(600.0)) + Call(SetCamPosA, CAM_DEFAULT, 0, 0) + Call(SetCamPosB, CAM_DEFAULT, 0, -50) + Call(SetCamPitch, CAM_DEFAULT, Float(10.0), Float(-2.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(MakeLerp, 0, 360, 25, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Eldstar, 0, LVar0, 0) + Call(SetNpcRotation, NPC_Mamar, 0, LVar0, 0) + Call(SetNpcRotation, NPC_Skolar, 0, LVar0, 0) + Call(SetNpcRotation, NPC_Muskular, 0, LVar0, 0) + Call(SetNpcRotation, NPC_Misstar, 0, LVar0, 0) + Call(SetNpcRotation, NPC_Klevar, 0, LVar0, 0) + Call(SetNpcRotation, NPC_Kalmar, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(GetPlayerPos, LVar6, LVar7, LVar8) + Thread + Call(SetNpcFlagBits, NPC_Eldstar, NPC_FLAG_TOUCHES_GROUND, FALSE) + Call(SetNpcAnimation, NPC_Eldstar, ANIM_WorldEldstar_Leap) + Call(SetNpcJumpscale, NPC_Eldstar, Float(3.2)) + Call(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Eldstar, LVar0, LVar1, LVar2, 5) + Call(SetNpcAnimation, NPC_Eldstar, ANIM_WorldEldstar_Idle) + Add(LVar7, 20) + Call(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, LVar6, LVar7, LVar8) + PlayEffect(EFFECT_SPARKLES, 0, LVar6, LVar7, LVar8, 10) + EndThread + Thread + Call(SetNpcFlagBits, NPC_Mamar, NPC_FLAG_TOUCHES_GROUND, FALSE) + Call(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_Leap) + Call(SetNpcJumpscale, NPC_Mamar, Float(3.2)) + Call(GetNpcPos, NPC_Mamar, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Mamar, LVar0, LVar1, LVar2, 5) + Call(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_Idle) + EndThread + Thread + Call(SetNpcFlagBits, NPC_Skolar, NPC_FLAG_TOUCHES_GROUND, FALSE) + Call(SetNpcAnimation, NPC_Skolar, ANIM_WorldSkolar_Leap) + Call(SetNpcJumpscale, NPC_Skolar, Float(3.2)) + Call(GetNpcPos, NPC_Skolar, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Skolar, LVar0, LVar1, LVar2, 5) + Call(SetNpcAnimation, NPC_Skolar, ANIM_WorldSkolar_Idle) + EndThread + Thread + Call(SetNpcFlagBits, NPC_Muskular, NPC_FLAG_TOUCHES_GROUND, FALSE) + Call(SetNpcAnimation, NPC_Muskular, ANIM_WorldMuskular_Leap) + Call(SetNpcJumpscale, NPC_Muskular, Float(3.2)) + Call(GetNpcPos, NPC_Muskular, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Muskular, LVar0, LVar1, LVar2, 5) + Call(SetNpcAnimation, NPC_Muskular, ANIM_WorldMuskular_Idle) + EndThread + Thread + Call(SetNpcFlagBits, NPC_Misstar, NPC_FLAG_TOUCHES_GROUND, FALSE) + Call(SetNpcAnimation, NPC_Misstar, ANIM_WorldMisstar_Leap) + Call(SetNpcJumpscale, NPC_Misstar, Float(3.2)) + Call(GetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Misstar, LVar0, LVar1, LVar2, 5) + Call(SetNpcAnimation, NPC_Misstar, ANIM_WorldMisstar_Idle) + EndThread + Thread + Call(SetNpcFlagBits, NPC_Klevar, NPC_FLAG_TOUCHES_GROUND, FALSE) + Call(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Leap) + Call(SetNpcJumpscale, NPC_Klevar, Float(3.2)) + Call(GetNpcPos, NPC_Klevar, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Klevar, LVar0, LVar1, LVar2, 5) + Call(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Idle) + EndThread + Call(SetNpcFlagBits, NPC_Kalmar, NPC_FLAG_TOUCHES_GROUND, FALSE) + Call(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_Leap) + Call(SetNpcJumpscale, NPC_Kalmar, Float(3.2)) + Call(GetNpcPos, NPC_Kalmar, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Kalmar, LVar0, LVar1, LVar2, 5) + Call(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_Idle) + Thread + PlayEffect(EFFECT_RADIAL_SHIMMER, 2, 0, 154, 85, Float(2.8), 100) + Call(PlaySound, SOUND_RELEASE_ENERGY) + Wait(115) + Call(PlaySoundAtPlayer, SOUND_GET_STAR_POWER_WAVE, SOUND_SPACE_DEFAULT) + Add(LVar7, 20) + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 4, LVar6, LVar7, LVar8, Float(0.3), 30) + EndThread + Wait(40) + Call(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, 10, 154, 88) + PlayEffect(EFFECT_SPARKLES, 0, 10, 154, 88, 10) + Wait(6) + Call(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, 10, 154, 88) + PlayEffect(EFFECT_SPARKLES, 0, 10, 154, 88, 15) + Wait(6) + Call(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, -10, 154, 88) + PlayEffect(EFFECT_SPARKLES, 0, -10, 154, 88, 20) + Wait(6) + Call(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, 10, 154, 88) + PlayEffect(EFFECT_SPARKLES, 0, 10, 154, 88, 25) + Wait(6) + Call(SetPlayerAnimation, ANIM_Mario1_UsePower) + Loop(3) + Call(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, 0, 154, 88) + PlayEffect(EFFECT_SPARKLES, 0, 0, 154, 88, 30) + Wait(6) + Call(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, -10, 154, 88) + PlayEffect(EFFECT_SPARKLES, 0, -10, 154, 88, 30) + Wait(6) + Call(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, 10, 154, 88) + PlayEffect(EFFECT_SPARKLES, 0, 10, 154, 88, 30) + Wait(6) + EndLoop + Call(N(UnlockStarBeam)) + Call(SetSelfVar, 0, 0) + Wait(30 * DT) + Call(ShowMessageAtScreenPos, MSG_Menus_0198, 160, 40) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(30 * DT) + Call(SetPanTarget, CAM_DEFAULT, 0, 220, -275) + Call(SetCamDistance, CAM_DEFAULT, Float(1.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(-4.5), Float(-3.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 512, MSG_HOS_006A) + Wait(30 * DT) + Call(SetPanTarget, CAM_DEFAULT, 0, 136, 80) + Call(SetCamDistance, CAM_DEFAULT, Float(510.0)) + Call(SetCamPosA, CAM_DEFAULT, 0, 0) + Call(SetCamPosB, CAM_DEFAULT, 0, -50) + Call(SetCamPitch, CAM_DEFAULT, Float(8.0), Float(-7.9)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(30 * DT) + Set(GB_StoryProgress, STORY_CH8_STAR_SHIP_ACTIVATED) + ExecWait(N(EVS_Starship_Summon)) + Call(SetPanTarget, CAM_DEFAULT, 0, 220, -275) + Call(SetCamDistance, CAM_DEFAULT, Float(1.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(-4.5), Float(-3.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 512, MSG_HOS_006B) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_Back) + Call(SetNpcAnimation, NPC_Muskular, ANIM_WorldMuskular_Back) + Call(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Back) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o616, COLLIDER_FLAGS_UPPER_MASK) + Call(SetZoneEnabled, ZONE_o622, FALSE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.5)) + Call(EnableModel, MODEL_o362, FALSE) + Call(EnableModel, MODEL_o397, FALSE) + Wait(15 * DT) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_StarSpirit) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_RANGE(hos_05_ENTRY_0, hos_05_ENTRY_1) - EVT_CALL(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_Back) - EVT_CALL(SetNpcAnimation, NPC_Muskular, ANIM_WorldMuskular_Back) - EVT_CALL(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Back) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_CH8_REACHED_STAR_HAVEN) - EVT_EXEC(N(EVS_StarSpirit_HoverBobbing)) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_IF_EQ(LVar0, NPC_Eldstar) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_Scene_RecieveStarBeam))) - EVT_END_IF - EVT_CASE_GE(STORY_CH8_STAR_SHIP_ACTIVATED) - EVT_EXEC(N(EVS_StarSpirit_HoverBobbing)) - EVT_CASE_DEFAULT - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseRange(hos_05_ENTRY_0, hos_05_ENTRY_1) + Call(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_Back) + Call(SetNpcAnimation, NPC_Muskular, ANIM_WorldMuskular_Back) + Call(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Back) + Switch(GB_StoryProgress) + CaseEq(STORY_CH8_REACHED_STAR_HAVEN) + Exec(N(EVS_StarSpirit_HoverBobbing)) + Call(GetSelfNpcID, LVar0) + IfEq(LVar0, NPC_Eldstar) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_Scene_RecieveStarBeam))) + EndIf + CaseGe(STORY_CH8_STAR_SHIP_ACTIVATED) + Exec(N(EVS_StarSpirit_HoverBobbing)) + CaseDefault + Call(RemoveNpc, NPC_SELF) + EndSwitch + EndSwitch + Return + End }; AnimID N(ExtraAnims_Eldstar)[] = { diff --git a/src/world/area_hos/hos_05/hos_05_5_intro.c b/src/world/area_hos/hos_05/hos_05_5_intro.c index 59c3a44554f..20c30fa9301 100644 --- a/src/world/area_hos/hos_05/hos_05_5_intro.c +++ b/src/world/area_hos/hos_05/hos_05_5_intro.c @@ -1072,189 +1072,189 @@ API_CALLABLE(func_802428C8_A2CB08) { } EvtScript N(EVS_UpdateWorldFogParams) = { - EVT_SET(LVar0, 120) - EVT_SET(LVar1, 895) - EVT_LOOP(10) - EVT_ADD(LVar0, -12) - EVT_ADD(LVar1, 10) - EVT_CALL(N(SetWorldFogParams), 0, 0, 0, LVar0, 255, 255, 255, LVar1, 1000) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVar0, 120) + Set(LVar1, 895) + Loop(10) + Add(LVar0, -12) + Add(LVar1, 10) + Call(N(SetWorldFogParams), 0, 0, 0, LVar0, 255, 255, 255, LVar1, 1000) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_CaptureSpirits) = { - EVT_CALL(DismissEffect, ArrayVar(6)) - EVT_CALL(GetNpcPos, NPC_Klevar, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 1, LVar0, LVar1, LVar2, 4, 20) - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(GetNpcPos, NPC_Klevar, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_MISC_PARTICLES, 3, LVar0, LVar1, LVar2, 16, 16, 2, 20, 0) - EVT_SET(ArrayVar(13), LVarF) - EVT_CALL(func_802428C8_A2CB08, 6, 80, EVT_FLOAT(0.5)) - EVT_CALL(LoadPath, LVar0, LVar1, LVar2, EASING_LINEAR) - EVT_SETF(LVar4, EVT_FLOAT(1.0)) - EVT_LABEL(6) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Klevar, LVar1, LVar2, LVar3) - EVT_CALL(N(SetStarSpiritSparkleTrailPos), ArrayVar(13), ArrayVar(24), LVar1, LVar2, LVar3) - EVT_ADDF(LVar4, EVT_FLOAT(-0.03125)) - EVT_CALL(SetNpcScale, NPC_Klevar, LVar4, LVar4, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(6) - EVT_END_IF - EVT_CALL(N(SetCardCaptureState1)) - EVT_CALL(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Panic) - EVT_CALL(SetNpcImgFXParams, NPC_Klevar, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetNpcFlagBits, NPC_Klevar, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(DismissEffect, ArrayVar(13)) - EVT_END_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(DismissEffect, ArrayVar(3)) - EVT_CALL(GetNpcPos, NPC_Skolar, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 1, LVar0, LVar1, LVar2, 4, 20) - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(GetNpcPos, NPC_Skolar, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_MISC_PARTICLES, 3, LVar0, LVar1, LVar2, 16, 16, 2, 20, 0) - EVT_SET(ArrayVar(10), LVarF) - EVT_CALL(func_802428C8_A2CB08, 3, 30, EVT_FLOAT(0.5)) - EVT_CALL(LoadPath, LVar0, LVar1, LVar2, EASING_LINEAR) - EVT_SETF(LVar4, EVT_FLOAT(1.0)) - EVT_LABEL(3) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Skolar, LVar1, LVar2, LVar3) - EVT_CALL(N(SetStarSpiritSparkleTrailPos), ArrayVar(10), ArrayVar(21), LVar1, LVar2, LVar3) - EVT_ADDF(LVar4, EVT_FLOAT(-0.03125)) - EVT_CALL(SetNpcScale, NPC_Skolar, LVar4, LVar4, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(3) - EVT_END_IF - EVT_CALL(N(SetCardCaptureState1)) - EVT_CALL(SetNpcAnimation, NPC_Skolar, ANIM_WorldSkolar_IdleSad) - EVT_CALL(SetNpcImgFXParams, NPC_Skolar, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetNpcFlagBits, NPC_Skolar, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(DismissEffect, ArrayVar(10)) - EVT_END_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(DismissEffect, ArrayVar(4)) - EVT_CALL(GetNpcPos, NPC_Muskular, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 1, LVar0, LVar1, LVar2, 4, 20) - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(GetNpcPos, NPC_Muskular, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_MISC_PARTICLES, 3, LVar0, LVar1, LVar2, 16, 16, 2, 20, 0) - EVT_SET(ArrayVar(11), LVarF) - EVT_CALL(func_802428C8_A2CB08, 4, -80, EVT_FLOAT(0.3)) - EVT_CALL(LoadPath, LVar0, LVar1, LVar2, EASING_LINEAR) - EVT_SETF(LVar4, EVT_FLOAT(1.0)) - EVT_LABEL(4) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Muskular, LVar1, LVar2, LVar3) - EVT_CALL(N(SetStarSpiritSparkleTrailPos), ArrayVar(11), ArrayVar(22), LVar1, LVar2, LVar3) - EVT_ADDF(LVar4, EVT_FLOAT(-0.03125)) - EVT_CALL(SetNpcScale, NPC_Muskular, LVar4, LVar4, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(4) - EVT_END_IF - EVT_CALL(N(SetCardCaptureState1)) - EVT_CALL(SetNpcAnimation, NPC_Muskular, ANIM_WorldMuskular_Panic) - EVT_CALL(SetNpcImgFXParams, NPC_Muskular, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetNpcFlagBits, NPC_Muskular, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(DismissEffect, ArrayVar(11)) - EVT_END_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(DismissEffect, ArrayVar(7)) - EVT_CALL(GetNpcPos, NPC_Kalmar, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 1, LVar0, LVar1, LVar2, 4, 20) - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(GetNpcPos, NPC_Kalmar, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_MISC_PARTICLES, 3, LVar0, LVar1, LVar2, 16, 16, 2, 20, 0) - EVT_SET(ArrayVar(14), LVarF) - EVT_CALL(func_802428C8_A2CB08, 7, 120, EVT_FLOAT(0.5)) - EVT_CALL(LoadPath, LVar0, LVar1, LVar2, EASING_LINEAR) - EVT_SETF(LVar4, EVT_FLOAT(1.0)) - EVT_LABEL(7) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Kalmar, LVar1, LVar2, LVar3) - EVT_CALL(N(SetStarSpiritSparkleTrailPos), ArrayVar(14), ArrayVar(25), LVar1, LVar2, LVar3) - EVT_ADDF(LVar4, EVT_FLOAT(-0.03125)) - EVT_CALL(SetNpcScale, NPC_Kalmar, LVar4, LVar4, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(7) - EVT_END_IF - EVT_CALL(N(SetCardCaptureState1)) - EVT_CALL(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_Panic) - EVT_CALL(SetNpcImgFXParams, NPC_Kalmar, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetNpcFlagBits, NPC_Kalmar, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(DismissEffect, ArrayVar(14)) - EVT_END_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(DismissEffect, ArrayVar(5)) - EVT_CALL(GetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 1, LVar0, LVar1, LVar2, 4, 20) - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(GetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_MISC_PARTICLES, 3, LVar0, LVar1, LVar2, 16, 16, 2, 20, 0) - EVT_SET(ArrayVar(12), LVarF) - EVT_CALL(func_802428C8_A2CB08, 5, 120, EVT_FLOAT(0.5)) - EVT_CALL(LoadPath, LVar0, LVar1, LVar2, EASING_LINEAR) - EVT_SETF(LVar4, EVT_FLOAT(1.0)) - EVT_LABEL(5) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Misstar, LVar1, LVar2, LVar3) - EVT_CALL(N(SetStarSpiritSparkleTrailPos), ArrayVar(12), ArrayVar(23), LVar1, LVar2, LVar3) - EVT_ADDF(LVar4, EVT_FLOAT(-0.03125)) - EVT_CALL(SetNpcScale, NPC_Misstar, LVar4, LVar4, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(5) - EVT_END_IF - EVT_CALL(N(SetCardCaptureState1)) - EVT_CALL(SetNpcAnimation, NPC_Misstar, ANIM_WorldMisstar_Panic) - EVT_CALL(SetNpcImgFXParams, NPC_Misstar, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetNpcFlagBits, NPC_Misstar, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(DismissEffect, ArrayVar(12)) - EVT_END_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(DismissEffect, ArrayVar(2)) - EVT_CALL(GetNpcPos, NPC_Mamar, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 1, LVar0, LVar1, LVar2, 4, 20) - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(GetNpcPos, NPC_Mamar, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_MISC_PARTICLES, 3, LVar0, LVar1, LVar2, 16, 16, 2, 20, 0) - EVT_SET(ArrayVar(9), LVarF) - EVT_CALL(func_802428C8_A2CB08, 2, -60, EVT_FLOAT(0.5)) - EVT_CALL(LoadPath, LVar0, LVar1, LVar2, EASING_LINEAR) - EVT_SETF(LVar4, EVT_FLOAT(1.0)) - EVT_LABEL(2) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Mamar, LVar1, LVar2, LVar3) - EVT_CALL(N(SetStarSpiritSparkleTrailPos), ArrayVar(9), ArrayVar(20), LVar1, LVar2, LVar3) - EVT_ADDF(LVar4, EVT_FLOAT(-0.03125)) - EVT_CALL(SetNpcScale, NPC_Mamar, LVar4, LVar4, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_CALL(N(SetCardCaptureState1)) - EVT_CALL(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_Panic) - EVT_CALL(SetNpcImgFXParams, NPC_Mamar, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetNpcFlagBits, NPC_Mamar, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(DismissEffect, ArrayVar(9)) - EVT_END_THREAD - EVT_WAIT(20 * DT) - EVT_RETURN - EVT_END + Call(DismissEffect, ArrayVar(6)) + Call(GetNpcPos, NPC_Klevar, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_RING_BLAST, 1, LVar0, LVar1, LVar2, 4, 20) + Thread + Wait(3) + Call(GetNpcPos, NPC_Klevar, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_MISC_PARTICLES, 3, LVar0, LVar1, LVar2, 16, 16, 2, 20, 0) + Set(ArrayVar(13), LVarF) + Call(func_802428C8_A2CB08, 6, 80, Float(0.5)) + Call(LoadPath, LVar0, LVar1, LVar2, EASING_LINEAR) + SetF(LVar4, Float(1.0)) + Label(6) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Klevar, LVar1, LVar2, LVar3) + Call(N(SetStarSpiritSparkleTrailPos), ArrayVar(13), ArrayVar(24), LVar1, LVar2, LVar3) + AddF(LVar4, Float(-0.03125)) + Call(SetNpcScale, NPC_Klevar, LVar4, LVar4, LVar4) + Wait(1) + IfEq(LVar0, 1) + Goto(6) + EndIf + Call(N(SetCardCaptureState1)) + Call(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Panic) + Call(SetNpcImgFXParams, NPC_Klevar, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetNpcFlagBits, NPC_Klevar, NPC_FLAG_INVISIBLE, TRUE) + Call(DismissEffect, ArrayVar(13)) + EndThread + Wait(20 * DT) + Call(DismissEffect, ArrayVar(3)) + Call(GetNpcPos, NPC_Skolar, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_RING_BLAST, 1, LVar0, LVar1, LVar2, 4, 20) + Thread + Wait(3) + Call(GetNpcPos, NPC_Skolar, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_MISC_PARTICLES, 3, LVar0, LVar1, LVar2, 16, 16, 2, 20, 0) + Set(ArrayVar(10), LVarF) + Call(func_802428C8_A2CB08, 3, 30, Float(0.5)) + Call(LoadPath, LVar0, LVar1, LVar2, EASING_LINEAR) + SetF(LVar4, Float(1.0)) + Label(3) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Skolar, LVar1, LVar2, LVar3) + Call(N(SetStarSpiritSparkleTrailPos), ArrayVar(10), ArrayVar(21), LVar1, LVar2, LVar3) + AddF(LVar4, Float(-0.03125)) + Call(SetNpcScale, NPC_Skolar, LVar4, LVar4, LVar4) + Wait(1) + IfEq(LVar0, 1) + Goto(3) + EndIf + Call(N(SetCardCaptureState1)) + Call(SetNpcAnimation, NPC_Skolar, ANIM_WorldSkolar_IdleSad) + Call(SetNpcImgFXParams, NPC_Skolar, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetNpcFlagBits, NPC_Skolar, NPC_FLAG_INVISIBLE, TRUE) + Call(DismissEffect, ArrayVar(10)) + EndThread + Wait(20 * DT) + Call(DismissEffect, ArrayVar(4)) + Call(GetNpcPos, NPC_Muskular, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_RING_BLAST, 1, LVar0, LVar1, LVar2, 4, 20) + Thread + Wait(3) + Call(GetNpcPos, NPC_Muskular, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_MISC_PARTICLES, 3, LVar0, LVar1, LVar2, 16, 16, 2, 20, 0) + Set(ArrayVar(11), LVarF) + Call(func_802428C8_A2CB08, 4, -80, Float(0.3)) + Call(LoadPath, LVar0, LVar1, LVar2, EASING_LINEAR) + SetF(LVar4, Float(1.0)) + Label(4) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Muskular, LVar1, LVar2, LVar3) + Call(N(SetStarSpiritSparkleTrailPos), ArrayVar(11), ArrayVar(22), LVar1, LVar2, LVar3) + AddF(LVar4, Float(-0.03125)) + Call(SetNpcScale, NPC_Muskular, LVar4, LVar4, LVar4) + Wait(1) + IfEq(LVar0, 1) + Goto(4) + EndIf + Call(N(SetCardCaptureState1)) + Call(SetNpcAnimation, NPC_Muskular, ANIM_WorldMuskular_Panic) + Call(SetNpcImgFXParams, NPC_Muskular, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetNpcFlagBits, NPC_Muskular, NPC_FLAG_INVISIBLE, TRUE) + Call(DismissEffect, ArrayVar(11)) + EndThread + Wait(20 * DT) + Call(DismissEffect, ArrayVar(7)) + Call(GetNpcPos, NPC_Kalmar, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_RING_BLAST, 1, LVar0, LVar1, LVar2, 4, 20) + Thread + Wait(3) + Call(GetNpcPos, NPC_Kalmar, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_MISC_PARTICLES, 3, LVar0, LVar1, LVar2, 16, 16, 2, 20, 0) + Set(ArrayVar(14), LVarF) + Call(func_802428C8_A2CB08, 7, 120, Float(0.5)) + Call(LoadPath, LVar0, LVar1, LVar2, EASING_LINEAR) + SetF(LVar4, Float(1.0)) + Label(7) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Kalmar, LVar1, LVar2, LVar3) + Call(N(SetStarSpiritSparkleTrailPos), ArrayVar(14), ArrayVar(25), LVar1, LVar2, LVar3) + AddF(LVar4, Float(-0.03125)) + Call(SetNpcScale, NPC_Kalmar, LVar4, LVar4, LVar4) + Wait(1) + IfEq(LVar0, 1) + Goto(7) + EndIf + Call(N(SetCardCaptureState1)) + Call(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_Panic) + Call(SetNpcImgFXParams, NPC_Kalmar, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetNpcFlagBits, NPC_Kalmar, NPC_FLAG_INVISIBLE, TRUE) + Call(DismissEffect, ArrayVar(14)) + EndThread + Wait(20 * DT) + Call(DismissEffect, ArrayVar(5)) + Call(GetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_RING_BLAST, 1, LVar0, LVar1, LVar2, 4, 20) + Thread + Wait(3) + Call(GetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_MISC_PARTICLES, 3, LVar0, LVar1, LVar2, 16, 16, 2, 20, 0) + Set(ArrayVar(12), LVarF) + Call(func_802428C8_A2CB08, 5, 120, Float(0.5)) + Call(LoadPath, LVar0, LVar1, LVar2, EASING_LINEAR) + SetF(LVar4, Float(1.0)) + Label(5) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Misstar, LVar1, LVar2, LVar3) + Call(N(SetStarSpiritSparkleTrailPos), ArrayVar(12), ArrayVar(23), LVar1, LVar2, LVar3) + AddF(LVar4, Float(-0.03125)) + Call(SetNpcScale, NPC_Misstar, LVar4, LVar4, LVar4) + Wait(1) + IfEq(LVar0, 1) + Goto(5) + EndIf + Call(N(SetCardCaptureState1)) + Call(SetNpcAnimation, NPC_Misstar, ANIM_WorldMisstar_Panic) + Call(SetNpcImgFXParams, NPC_Misstar, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetNpcFlagBits, NPC_Misstar, NPC_FLAG_INVISIBLE, TRUE) + Call(DismissEffect, ArrayVar(12)) + EndThread + Wait(20 * DT) + Call(DismissEffect, ArrayVar(2)) + Call(GetNpcPos, NPC_Mamar, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_RING_BLAST, 1, LVar0, LVar1, LVar2, 4, 20) + Thread + Wait(3) + Call(GetNpcPos, NPC_Mamar, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_MISC_PARTICLES, 3, LVar0, LVar1, LVar2, 16, 16, 2, 20, 0) + Set(ArrayVar(9), LVarF) + Call(func_802428C8_A2CB08, 2, -60, Float(0.5)) + Call(LoadPath, LVar0, LVar1, LVar2, EASING_LINEAR) + SetF(LVar4, Float(1.0)) + Label(2) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Mamar, LVar1, LVar2, LVar3) + Call(N(SetStarSpiritSparkleTrailPos), ArrayVar(9), ArrayVar(20), LVar1, LVar2, LVar3) + AddF(LVar4, Float(-0.03125)) + Call(SetNpcScale, NPC_Mamar, LVar4, LVar4, LVar4) + Wait(1) + IfEq(LVar0, 1) + Goto(2) + EndIf + Call(N(SetCardCaptureState1)) + Call(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_Panic) + Call(SetNpcImgFXParams, NPC_Mamar, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetNpcFlagBits, NPC_Mamar, NPC_FLAG_INVISIBLE, TRUE) + Call(DismissEffect, ArrayVar(9)) + EndThread + Wait(20 * DT) + Return + End }; f32 N(FinalCamMoveBoomLength) = 130.0; @@ -1302,16 +1302,16 @@ void N(appendGfx_image_strips)( // when the spirits leap back in shock, their radial position is multuplied by these; xz by the first, y by the second s32 N(StarSpiritLeapBackScalars)[] = { - EVT_FLOAT(0.93), EVT_FLOAT(0.9), - EVT_FLOAT(0.938), EVT_FLOAT(0.91), - EVT_FLOAT(0.955), EVT_FLOAT(0.93), - EVT_FLOAT(0.968), EVT_FLOAT(0.95), - EVT_FLOAT(0.979), EVT_FLOAT(0.97), - EVT_FLOAT(0.985), EVT_FLOAT(0.985), - EVT_FLOAT(0.995), EVT_FLOAT(0.995), - EVT_FLOAT(0.998), EVT_FLOAT(0.998), - EVT_FLOAT(0.999), EVT_FLOAT(0.999), - EVT_FLOAT(1.0), EVT_FLOAT(1.0), + Float(0.93), Float(0.9), + Float(0.938), Float(0.91), + Float(0.955), Float(0.93), + Float(0.968), Float(0.95), + Float(0.979), Float(0.97), + Float(0.985), Float(0.985), + Float(0.995), Float(0.995), + Float(0.998), Float(0.998), + Float(0.999), Float(0.999), + Float(1.0), Float(1.0), }; StoryGraphicData* N(StoryGraphicsPtr) = &N(StoryGraphics); @@ -1878,34 +1878,34 @@ API_CALLABLE(func_80244550_A2E790) { extern EvtScript N(EVS_Scene_IntroStory); EvtScript N(EVS_Intro_Main) = { - EVT_USE_ARRAY(EVT_PTR(N(D_8024F380))) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(N(SetWorldFogParams), 0, 0, 0, 0, 0, 0, 0, 995, 1000) - EVT_CALL(N(InitWorldTintMode)) - EVT_CALL(N(SetWorldColorParams), 255, 255, 255, 0, 0, 0, 0) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(N(AdjustCamVfov), 0, 62) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 157, 0) - EVT_CALL(LoadSettings, CAM_DEFAULT, EVT_PTR(N(IntroCamSettings1))) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(N(InitializeStoryGraphicsData)) - EVT_THREAD - EVT_WAIT(2) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, FALSE) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_o33, FALSE) - EVT_CALL(EnableTexPanning, MODEL_o34, FALSE) - EVT_CALL(EnableGroup, MODEL_g271, FALSE) - EVT_CALL(EnableGroup, MODEL_g272, FALSE) - EVT_CALL(EnableGroup, MODEL_g273, FALSE) - EVT_CALL(N(InitializeStoryCamera)) - EVT_CALL(EnableGroup, MODEL_g277, FALSE) - EVT_CALL(EnableModel, MODEL_o8, FALSE) - EVT_EXEC(N(EVS_Scene_IntroStory)) - EVT_RETURN - EVT_END + UseArray(Ref(N(D_8024F380))) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(N(SetWorldFogParams), 0, 0, 0, 0, 0, 0, 0, 995, 1000) + Call(N(InitWorldTintMode)) + Call(N(SetWorldColorParams), 255, 255, 255, 0, 0, 0, 0) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(N(AdjustCamVfov), 0, 62) + Call(SetPanTarget, CAM_DEFAULT, 0, 157, 0) + Call(LoadSettings, CAM_DEFAULT, Ref(N(IntroCamSettings1))) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(N(InitializeStoryGraphicsData)) + Thread + Wait(2) + Call(SetCamEnabled, CAM_DEFAULT, FALSE) + EndThread + Call(EnableTexPanning, MODEL_o33, FALSE) + Call(EnableTexPanning, MODEL_o34, FALSE) + Call(EnableGroup, MODEL_g271, FALSE) + Call(EnableGroup, MODEL_g272, FALSE) + Call(EnableGroup, MODEL_g273, FALSE) + Call(N(InitializeStoryCamera)) + Call(EnableGroup, MODEL_g277, FALSE) + Call(EnableModel, MODEL_o8, FALSE) + Exec(N(EVS_Scene_IntroStory)) + Return + End }; f32 N(AnimBowser_FlyOff_Time) = 0.0; @@ -1974,553 +1974,553 @@ API_CALLABLE(N(func_80244934_A2EB74)) { } EvtScript N(EVS_Scene_IntroStory) = { - EVT_CALL(SetNpcPaletteSwapMode, NPC_StarRod, NPC_PAL_ADJUST_BLEND_PALETTES_UNIFORM_INTERVALS) - EVT_CALL(SetNpcPaletteSwapLower, NPC_StarRod, 0, 1, 20, 5) - EVT_CALL(SetNpcPaletteSwapMode, NPC_Eldstar, NPC_PAL_ADJUST_BLEND_PALETTES_UNIFORM_INTERVALS) - EVT_CALL(SetNpcPaletteSwapMode, NPC_Mamar, NPC_PAL_ADJUST_BLEND_PALETTES_UNIFORM_INTERVALS) - EVT_CALL(SetNpcPaletteSwapMode, NPC_Skolar, NPC_PAL_ADJUST_BLEND_PALETTES_UNIFORM_INTERVALS) - EVT_CALL(SetNpcPaletteSwapMode, NPC_Muskular, NPC_PAL_ADJUST_BLEND_PALETTES_UNIFORM_INTERVALS) - EVT_CALL(SetNpcPaletteSwapMode, NPC_Misstar, NPC_PAL_ADJUST_BLEND_PALETTES_UNIFORM_INTERVALS) - EVT_CALL(SetNpcPaletteSwapMode, NPC_Klevar, NPC_PAL_ADJUST_BLEND_PALETTES_UNIFORM_INTERVALS) - EVT_CALL(SetNpcPaletteSwapMode, NPC_Kalmar, NPC_PAL_ADJUST_BLEND_PALETTES_UNIFORM_INTERVALS) - EVT_CALL(SetNpcPaletteSwapping, NPC_Eldstar, 0, 1, 25, 12, 4, 18, 0, 0) - EVT_CALL(SetNpcPaletteSwapping, NPC_Mamar, 0, 1, 25, 12, 4, 18, 0, 0) - EVT_CALL(SetNpcPaletteSwapping, NPC_Skolar, 0, 1, 25, 12, 4, 18, 0, 0) - EVT_CALL(SetNpcPaletteSwapping, NPC_Muskular, 0, 1, 25, 12, 4, 18, 0, 0) - EVT_CALL(SetNpcPaletteSwapping, NPC_Misstar, 0, 1, 25, 12, 4, 18, 0, 0) - EVT_CALL(SetNpcPaletteSwapping, NPC_Klevar, 0, 1, 25, 12, 4, 18, 0, 0) - EVT_CALL(SetNpcPaletteSwapping, NPC_Kalmar, 0, 1, 25, 12, 4, 18, 0, 0) - EVT_CALL(SetNpcFlagBits, NPC_StarRod, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarStill) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Prop, ANIM_WorldBowser_ClownCarPropeller) - EVT_CALL(EnableNpcShadow, NPC_Bowser_Body, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Bowser_Prop, FALSE) - EVT_CALL(EnableNpcShadow, NPC_StarRod, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Eldstar, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Mamar, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Skolar, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Muskular, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Misstar, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Klevar, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Kalmar, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Kammy, FALSE) - EVT_THREAD - EVT_CALL(N(ForceStarRodAlwaysFaceCamera)) - EVT_END_THREAD - EVT_CALL(InterpNpcYaw, NPC_Bowser_Body, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_Bowser_Prop, 90, 0) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarTalk) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Prop, ANIM_WorldBowser_ClownCarPropeller) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim17) - EVT_CALL(InterpNpcYaw, NPC_Kammy, 45, 0) - EVT_CALL(SetNpcPos, NPC_Kammy, -145, 147, 84) - EVT_CALL(SetNpcAnimation, NPC_Misstar, ANIM_WorldMisstar_Still) - EVT_CALL(N(SetWorldFogParams), 0, 0, 0, 0, 0, 0, 0, 995, 1000) - EVT_CALL(N(SetWorldColorParams), 130, 130, 130, 0, 0, 0, 15) - EVT_CALL(N(AdjustCamVfov), 0, 35) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -145, 147, 84) - EVT_CALL(LoadSettings, CAM_DEFAULT, EVT_PTR(N(IntroCamSettings6))) - EVT_CALL(N(AnimateStorybookPages)) - EVT_WAIT(50 * DT) - EVT_CALL(SetNpcImgFXParams, NPC_Bowser_Body, IMGFX_SET_TINT, 0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Bowser_Prop, IMGFX_SET_TINT, 0, 0, 0, 0) - EVT_CALL(SetNpcPos, NPC_Bowser_Body, -64, 135, 85) - EVT_CALL(SetNpcPos, NPC_Bowser_Prop, -64, 135, 85) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(50 * DT) - EVT_ADD(LVar0, 6) - EVT_IF_GT(LVar0, 255) - EVT_SET(LVar0, 255) - EVT_END_IF - EVT_CALL(SetNpcImgFXParams, NPC_Bowser_Body, IMGFX_SET_TINT, 0, 0, 0, LVar0) - EVT_CALL(SetNpcImgFXParams, NPC_Bowser_Prop, IMGFX_SET_TINT, 0, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(InterpNpcYaw, NPC_Bowser_Prop, 90, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(40 * DT) - EVT_ADD(LVar0, 36) - EVT_CALL(SetNpcRotation, NPC_Bowser_Body, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcRotation, NPC_Bowser_Body, 0, 0, 0) - EVT_CALL(InterpNpcYaw, NPC_Bowser_Body, 90, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(SetWorldColorParams), 117, 28, 42, 0, 0, 0, 15) - EVT_END_THREAD - EVT_PLAY_EFFECT(EFFECT_LIGHTNING, 1, 0, 20, 0, 0, 0) - EVT_SET(ArrayVar(17), LVarF) - EVT_THREAD - EVT_CALL(N(FadeAwayTapeGraphic)) - EVT_END_THREAD - EVT_WAIT(16 * DT) - EVT_THREAD - EVT_CALL(N(func_80244934_A2EB74)) - EVT_END_THREAD - EVT_LOOP(2) - EVT_CALL(N(SetWorldColorParams), 117, 28, 42, 165, 96, 152, 0) - EVT_CALL(N(SetWorldFogParams), 0, 0, 0, 127, 0, 0, 0, 975, 1000) - EVT_WAIT(1) - EVT_CALL(N(SetWorldColorParams), 117, 28, 42, 64, 34, 58, 0) - EVT_CALL(N(SetWorldFogParams), 0, 0, 0, 127, 0, 0, 0, 995, 1000) - EVT_WAIT(1) - EVT_CALL(N(SetWorldColorParams), 117, 28, 42, 0, 0, 0, 0) - EVT_CALL(N(SetWorldFogParams), 0, 0, 0, 0, 0, 0, 0, 995, 1000) - EVT_WAIT(5) - EVT_END_LOOP - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcImgFXParams, NPC_Bowser_Body, IMGFX_SET_TINT, 0, 0, 0, 255) - EVT_CALL(SetNpcImgFXParams, NPC_Bowser_Prop, IMGFX_SET_TINT, 0, 0, 0, 255) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(4) - EVT_ADD(LVar0, 70) - EVT_IF_GT(LVar0, 255) - EVT_SET(LVar0, 255) - EVT_END_IF - EVT_CALL(SetNpcImgFXParams, NPC_Bowser_Body, IMGFX_SET_TINT, LVar0, LVar0, LVar0, 255) - EVT_CALL(SetNpcImgFXParams, NPC_Bowser_Prop, IMGFX_SET_TINT, LVar0, LVar0, LVar0, 255) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(3) - EVT_CALL(DismissEffect, ArrayVar(17)) - EVT_THREAD - EVT_CALL(EnableTexPanning, MODEL_o33, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o34, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Eldstar, ANIM_WorldEldstar_Hurt) - EVT_CALL(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_Hurt) - EVT_CALL(SetNpcAnimation, NPC_Skolar, ANIM_WorldSkolar_IdleSad) - EVT_CALL(SetNpcAnimation, NPC_Muskular, ANIM_WorldMuskular_Panic) - EVT_CALL(SetNpcAnimation, NPC_Misstar, ANIM_WorldMisstar_Panic) - EVT_CALL(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Panic) - EVT_CALL(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_Panic) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0E) - EVT_PLAY_EFFECT(EFFECT_ENDING_DECALS, 2, 0, 180, 0, EVT_FLOAT(2.59375), ArrayVar(15)) - EVT_PLAY_EFFECT(EFFECT_LIGHT_RAYS, 1, 0, 200, 0, EVT_FLOAT(1.0), ArrayVar(16)) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(AddBowserHoverOffset)) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(AddKammyHoverOffset)) - EVT_END_THREAD - EVT_WAIT(50 * DT) - EVT_CALL(N(AdjustCamVfov), 0, 40) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 157, 0) - EVT_CALL(LoadSettings, CAM_DEFAULT, EVT_PTR(N(IntroCamSettings7))) - EVT_CALL(SetNpcAnimation, NPC_Skolar, ANIM_WorldSkolar_IdleSad) - EVT_CALL(SetNpcAnimation, NPC_Muskular, ANIM_WorldMuskular_Panic) - EVT_CALL(SetNpcAnimation, NPC_Misstar, ANIM_WorldMisstar_Panic) - EVT_CALL(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Panic) - EVT_CALL(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_Hurt) - EVT_THREAD - EVT_WAIT(10) - EVT_SET(LVar0, 0) - EVT_LOOP(20) - EVT_ADD(LVar0, 36) - EVT_CALL(SetNpcRotation, NPC_Eldstar, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(10) - EVT_SET(LVar0, 0) - EVT_LOOP(20) - EVT_ADD(LVar0, 36) - EVT_CALL(SetNpcRotation, NPC_Eldstar, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10) - EVT_SET(LVar0, 0) - EVT_LOOP(20) - EVT_ADD(LVar0, 36) - EVT_CALL(SetNpcRotation, NPC_Muskular, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(34) - EVT_SET(LVar0, 0) - EVT_LOOP(20) - EVT_ADD(LVar0, 36) - EVT_CALL(SetNpcRotation, NPC_Misstar, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(16) - EVT_SET(LVar0, 0) - EVT_LOOP(20) - EVT_ADD(LVar0, 36) - EVT_CALL(SetNpcRotation, NPC_Klevar, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(28) - EVT_SET(LVar0, 0) - EVT_LOOP(20) - EVT_ADD(LVar0, 36) - EVT_CALL(SetNpcRotation, NPC_Kalmar, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_PLAY_EFFECT(EFFECT_LIGHTNING, 2, 0, 0, 0, 0, 0) - EVT_SET(ArrayVar(17), LVarF) - EVT_SET(LVar0, 120) - EVT_SET(LVar1, 895) - EVT_LOOP(10) - EVT_ADD(LVar0, -12) - EVT_ADD(LVar1, 10) - EVT_CALL(N(SetWorldFogParams), 0, 0, 0, LVar0, 255, 255, 255, LVar1, 1000) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(2) - EVT_CALL(N(SetWorldColorParams), 117, 28, 42, 165, 96, 152, 0) - EVT_CALL(N(SetWorldFogParams), 0, 0, 0, 127, 0, 0, 0, 975, 1000) - EVT_WAIT(1) - EVT_CALL(N(SetWorldColorParams), 117, 28, 42, 105, 60, 102, 0) - EVT_CALL(N(SetWorldFogParams), 0, 0, 0, 127, 0, 0, 0, 975, 1000) - EVT_WAIT(1) - EVT_CALL(N(SetWorldColorParams), 117, 28, 42, 64, 34, 58, 0) - EVT_CALL(N(SetWorldFogParams), 0, 0, 0, 127, 0, 0, 0, 995, 1000) - EVT_WAIT(1) - EVT_CALL(N(SetWorldColorParams), 117, 28, 42, 34, 14, 28, 0) - EVT_CALL(N(SetWorldFogParams), 0, 0, 0, 127, 0, 0, 0, 995, 1000) - EVT_WAIT(1) - EVT_CALL(N(SetWorldColorParams), 117, 28, 42, 0, 0, 0, 0) - EVT_CALL(N(SetWorldFogParams), 0, 0, 0, 0, 0, 0, 0, 995, 1000) - EVT_WAIT(5) - EVT_END_LOOP - EVT_WAIT(27 * DT) - EVT_CALL(DismissEffect, ArrayVar(17)) - EVT_CALL(N(SetWorldFogParams), 0, 0, 0, 0, 0, 0, 0, 995, 1000) - EVT_CALL(N(AdjustCamVfov), 0, 25) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -38, 210, 85) - EVT_CALL(LoadSettings, CAM_DEFAULT, EVT_PTR(N(IntroCamSettings8))) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarCloseMouth) - EVT_CALL(SetNpcPos, NPC_Bowser_Body, -30, 150, 162) - EVT_CALL(SetNpcPos, NPC_Bowser_Prop, -30, 150, 162) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim11) - EVT_THREAD - EVT_CALL(N(SetWorldColorParams), 23, 10, 10, 0, 0, 0, 15) - EVT_WAIT(28) - EVT_CALL(N(SetWorldColorParams), 102, 45, 0, 114, 0, 0, 3) - EVT_CALL(N(SetWorldColorParams), 102, 45, 0, 0, 0, 0, 13) - EVT_CALL(N(SetWorldColorParams), 180, 180, 180, 0, 0, 0, 20) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 995) - EVT_LOOP(30) - EVT_SUB(LVar0, 10) - EVT_CALL(N(SetWorldFogParams), 0, 0, 0, 0, 0, 0, 0, LVar0, 1000) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(10) - EVT_SET(LVar0, 875) - EVT_LOOP(60) - EVT_ADD(LVar0, 2) - EVT_CALL(N(SetWorldFogParams), 0, 0, 0, 0, 255, 0, 0, LVar0, 1000) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_SET(LVar0, -28) - EVT_SET(LVar1, 210) - EVT_SET(LVar2, 155) - EVT_SET(LVar3, -28) - EVT_SET(LVar4, 209) - EVT_SET(LVar5, 153) - EVT_CALL(N(CamPushIn_BowserInhale)) - EVT_PLAY_EFFECT(EFFECT_FIRE_BREATH, 0, -30, 210, 142, 0, 180, 0, 5, 2, 30) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarFireBreath) - EVT_THREAD - EVT_CALL(N(CamPullBack_BowserExhale)) - EVT_END_THREAD - EVT_WAIT(20 * DT) - EVT_PLAY_EFFECT(EFFECT_SHIMMER_BURST, 0, 0, 180, 0, EVT_FLOAT(0.703125), 30) - EVT_THREAD - EVT_WAIT(2) - EVT_CALL(RemoveEffect, ArrayVar(15)) - EVT_END_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(N(AdjustCamVfov), 0, 25) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -38, 210, 85) - EVT_CALL(LoadSettings, CAM_DEFAULT, EVT_PTR(N(IntroCamSettings9))) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarOpenMouth) - EVT_THREAD - EVT_CALL(N(BowserFlyToStarRod)) - EVT_END_THREAD - EVT_WAIT(25 * DT) - EVT_CALL(N(AdjustCamVfov), 0, 35) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -240, 200, 113) - EVT_CALL(LoadSettings, CAM_DEFAULT, EVT_PTR(N(IntroCamSettings10))) - EVT_CALL(SetNpcAnimation, NPC_Skolar, ANIM_WorldSkolar_IdleSad) - EVT_CALL(SetNpcAnimation, NPC_Misstar, ANIM_WorldMisstar_Panic) - EVT_CALL(GetNpcPos, NPC_Skolar, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_WAIT(5) - EVT_USE_BUF(EVT_PTR(N(StarSpiritLeapBackScalars))) - EVT_LOOP(10) - EVT_FBUF_READ2(LVarA, LVarB) - EVT_SETF(LVar3, LVar0) - EVT_SETF(LVar4, LVar1) - EVT_SETF(LVar5, LVar2) - EVT_MULF(LVar3, LVarB) - EVT_MULF(LVar4, LVarA) - EVT_MULF(LVar5, LVarB) - EVT_CALL(SetNpcPos, NPC_Skolar, LVar3, LVar4, LVar5) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(GetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_WAIT(9) - EVT_USE_BUF(EVT_PTR(N(StarSpiritLeapBackScalars))) - EVT_LOOP(10) - EVT_FBUF_READ2(LVarA, LVarB) - EVT_SETF(LVar3, LVar0) - EVT_SETF(LVar4, LVar1) - EVT_SETF(LVar5, LVar2) - EVT_MULF(LVar3, LVarB) - EVT_MULF(LVar4, LVarA) - EVT_MULF(LVar5, LVarB) - EVT_CALL(SetNpcPos, NPC_Misstar, LVar3, LVar4, LVar5) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(GetNpcPos, NPC_Skolar, LVar0, LVar1, LVar2) - EVT_MULF(LVar0, EVT_FLOAT(0.9)) - EVT_MULF(LVar1, EVT_FLOAT(0.93)) - EVT_MULF(LVar2, EVT_FLOAT(0.9)) - EVT_CALL(SetNpcPos, NPC_Skolar, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) - EVT_MULF(LVar0, EVT_FLOAT(0.9)) - EVT_MULF(LVar1, EVT_FLOAT(0.93)) - EVT_MULF(LVar2, EVT_FLOAT(0.9)) - EVT_CALL(SetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) - EVT_WAIT(35 * DT) - EVT_CALL(N(AdjustCamVfov), 0, 35) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 30, 232, 0) - EVT_CALL(LoadSettings, CAM_DEFAULT, EVT_PTR(N(IntroCamSettings11))) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarBrandish) - EVT_CALL(SetNpcPos, NPC_Bowser_Body, 0, 170, 0) - EVT_CALL(SetNpcPos, NPC_Bowser_Prop, 0, 170, 0) - EVT_CALL(SetNpcPos, NPC_StarRod, NPC_DISPOSE_LOCATION) - EVT_THREAD - EVT_CALL(N(SetWorldColorParams), 20, 20, 20, 0, 0, 0, 15) - EVT_END_THREAD - EVT_SET(LVar0, 21) - EVT_SET(LVar1, 260) - EVT_SET(LVar2, -21) - EVT_CALL(N(SetLightRayPos)) - EVT_WAIT(35 * DT) - EVT_THREAD - EVT_WAIT(70 * DT) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 12) - EVT_CALL(N(SetWorldFogParams), 0, 0, 0, LVar0, 255, 0, 0, 995, 1000) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(92 * DT) - EVT_CALL(N(SetWorldColorParams), 106, 94, 110, 216, 195, 131, 8) - EVT_CALL(N(SetWorldColorParams), 100, 105, 107, 159, 118, 50, 20) - EVT_CALL(N(SetWorldColorParams), 122, 180, 110, 0, 0, 0, 15) - EVT_CALL(N(SetWorldColorParams), 128, 128, 128, 255, 255, 200, 60) - EVT_END_THREAD - EVT_CALL(N(CamPullBack_BowserHoldingStarRod)) - EVT_CALL(N(AdjustCamVfov), 0, 35) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 177, 0) - EVT_CALL(LoadSettings, CAM_DEFAULT, EVT_PTR(N(IntroCamSettings12))) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarStarRod) - EVT_PLAY_EFFECT(EFFECT_LIGHT_RAYS, 2, 20, 265, -21, EVT_FLOAT(1.0), ArrayVar(18)) - EVT_PLAY_EFFECT(EFFECT_BULB_GLOW, 2, 20, 265, -21, EVT_FLOAT(1.0), ArrayVar(19)) - EVT_SET(LVar0, 120) - EVT_SET(LVar1, 895) - EVT_LOOP(20) - EVT_ADD(LVar0, -6) - EVT_ADD(LVar1, 5) - EVT_CALL(N(SetWorldFogParams), 0, 0, 0, LVar0, 255, 255, 255, LVar1, 1000) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(5) - EVT_CALL(N(AdjustCamVfov), 0, 40) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 157, 0) - EVT_CALL(LoadSettings, CAM_DEFAULT, EVT_PTR(N(IntroCamSettings7))) - EVT_CALL(SetNpcAnimation, NPC_Eldstar, ANIM_WorldEldstar_Panic) - EVT_CALL(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_Panic) - EVT_CALL(SetNpcAnimation, NPC_Skolar, ANIM_WorldSkolar_IdleSad) - EVT_CALL(SetNpcAnimation, NPC_Muskular, ANIM_WorldMuskular_Panic) - EVT_CALL(SetNpcAnimation, NPC_Misstar, ANIM_WorldMisstar_Panic) - EVT_CALL(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Panic) - EVT_CALL(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_Panic) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(DismissEffect, ArrayVar(18)) - EVT_CALL(DismissEffect, ArrayVar(19)) - EVT_END_THREAD - EVT_PLAY_EFFECT(EFFECT_ENERGY_SHOCKWAVE, 0, 18, 256, -21, EVT_FLOAT(0.40625), 60) - EVT_SET(LVar0, 120) - EVT_SETF(LVar1, 895) - EVT_LOOP(40) - EVT_ADD(LVar0, -3) - EVT_ADDF(LVar1, EVT_FLOAT(2.5)) - EVT_CALL(N(SetWorldFogParams), 0, 0, 0, LVar0, 255, 255, 255, LVar1, 1000) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(N(AdjustCamVfov), 0, 35) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 70, 200, -239) - EVT_CALL(LoadSettings, CAM_DEFAULT, EVT_PTR(N(IntroCamSettings5))) - EVT_CALL(SetNpcAnimation, NPC_Eldstar, ANIM_WorldEldstar_Hurt) - EVT_CALL(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_Hurt) - EVT_CALL(SetNpcAnimation, NPC_Skolar, ANIM_WorldSkolar_Hurt) - EVT_CALL(SetNpcAnimation, NPC_Muskular, ANIM_WorldMuskular_Hurt) - EVT_CALL(SetNpcAnimation, NPC_Misstar, ANIM_WorldMisstar_Hurt) - EVT_CALL(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Hurt) - EVT_CALL(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_Hurt) - EVT_CALL(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_AURA, FX_AURA_CAPTURE, LVar0, LVar1, LVar2, 1, ArrayVar(1)) - EVT_CALL(GetNpcPos, NPC_Mamar, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_AURA, FX_AURA_CAPTURE, LVar0, LVar1, LVar2, 1, ArrayVar(2)) - EVT_CALL(GetNpcPos, NPC_Skolar, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_AURA, FX_AURA_CAPTURE, LVar0, LVar1, LVar2, 1, ArrayVar(3)) - EVT_CALL(GetNpcPos, NPC_Muskular, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_AURA, FX_AURA_CAPTURE, LVar0, LVar1, LVar2, 1, ArrayVar(4)) - EVT_CALL(GetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_AURA, FX_AURA_CAPTURE, LVar0, LVar1, LVar2, 1, ArrayVar(5)) - EVT_CALL(GetNpcPos, NPC_Klevar, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_AURA, FX_AURA_CAPTURE, LVar0, LVar1, LVar2, 1, ArrayVar(6)) - EVT_CALL(GetNpcPos, NPC_Kalmar, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_AURA, FX_AURA_CAPTURE, LVar0, LVar1, LVar2, 1, ArrayVar(7)) - EVT_CALL(N(SetWorldColorParams), 110, 110, 110, 255, 255, 255, 0) - EVT_THREAD - EVT_CALL(N(SetWorldColorParams), 230, 230, 230, 0, 0, 0, 30) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(28) - EVT_CALL(SetNpcImgFXParams, NPC_Eldstar, IMGFX_SET_ANIM, IMGFX_ANIM_SPIRIT_CAPTURE, 1, 1, 0) - EVT_END_THREAD - EVT_SET(LVar0, 255) - EVT_LOOP(20) - EVT_CALL(SetNpcImgFXParams, NPC_Mamar, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Skolar, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Muskular, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Misstar, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Klevar, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Kalmar, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(15 * DT) - EVT_CALL(SetNpcImgFXParams, NPC_Eldstar, IMGFX_SET_ALPHA, 255, 0, 0, 0) - EVT_PLAY_EFFECT(EFFECT_SOMETHING_ROTATING, 2, -130, 220, 130, 1, 0) - EVT_SET(ArrayVar(0), LVarF) - EVT_SET(LVar0, -130) - EVT_SET(LVar1, 220) - EVT_SET(LVar2, 130) - EVT_ADDF(LVar1, EVT_FLOAT(-30.0)) - EVT_CALL(SetNpcPos, NPC_Kammy, LVar0, LVar1, LVar2) - EVT_EXEC(N(EVS_UpdateWorldFogParams)) - EVT_CALL(DismissEffect, ArrayVar(1)) - EVT_CALL(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 1, LVar0, LVar1, LVar2, 4, 20) - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_MISC_PARTICLES, 3, LVar0, LVar1, LVar2, 16, 16, 2, 20, 0) - EVT_SET(ArrayVar(8), LVarF) - EVT_CALL(func_802428C8_A2CB08, 1, 30, EVT_FLOAT(0.5)) - EVT_CALL(LoadPath, LVar0, LVar1, LVar2, EASING_LINEAR) - EVT_SETF(LVar4, EVT_FLOAT(1.0)) - EVT_LABEL(1) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Eldstar, LVar1, LVar2, LVar3) - EVT_CALL(N(SetStarSpiritSparkleTrailPos), ArrayVar(8), ArrayVar(19), LVar1, LVar2, LVar3) - EVT_ADDF(LVar4, EVT_FLOAT(-0.03125)) - EVT_CALL(SetNpcScale, NPC_Eldstar, LVar4, LVar4, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(N(SetCardCaptureState1)) - EVT_CALL(SetNpcAnimation, NPC_Eldstar, ANIM_WorldEldstar_Panic) - EVT_CALL(SetNpcImgFXParams, NPC_Eldstar, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetNpcFlagBits, NPC_Eldstar, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(DismissEffect, ArrayVar(8)) - EVT_END_THREAD - EVT_WAIT(15 * DT) - EVT_CALL(N(AdjustCamVfov), 0, 50) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 40, 200, -40) - EVT_CALL(LoadSettings, CAM_DEFAULT, EVT_PTR(N(IntroCamSettings13))) - EVT_CALL(RemoveEffect, ArrayVar(16)) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarIdle) - EVT_THREAD - EVT_WAIT(45) - EVT_CALL(NpcFaceNpc, NPC_Bowser_Body, NPC_Eldstar, 0) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim12) - EVT_EXEC(N(EVS_CaptureSpirits)) - EVT_CALL(N(CamPanAcrossRoom)) - EVT_WAIT(15 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim09) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim12) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0D) - EVT_WAIT(40) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim09) - EVT_END_THREAD - EVT_CALL(N(CamMove_OrbitKammy)) - EVT_CALL(N(AdjustCamVfov), 0, 50) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 200, 0) - EVT_CALL(LoadSettings, CAM_DEFAULT, EVT_PTR(N(IntroCamSettings15))) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarLaugh) - EVT_THREAD - EVT_CALL(N(CamPullBack_Final)) - EVT_END_THREAD - EVT_WAIT(20 * DT) - EVT_THREAD - EVT_CALL(func_80244550_A2E790) - EVT_END_THREAD - EVT_WAIT(1) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0B) - EVT_CALL(N(KammyFlyToBowser)) - EVT_THREAD - EVT_CALL(N(SetCardCaptureState3)) - EVT_CALL(N(SetCardCaptureState3)) - EVT_CALL(N(SetCardCaptureState3)) - EVT_CALL(N(SetCardCaptureState3)) - EVT_CALL(N(SetCardCaptureState3)) - EVT_CALL(N(SetCardCaptureState3)) - EVT_CALL(N(SetCardCaptureState3)) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0D) - EVT_WAIT(15 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim11) - EVT_WAIT(32 * DT) - EVT_CALL(SetNpcJumpscale, NPC_Eldstar, EVT_FLOAT(0.0)) - EVT_CALL(SetNpcJumpscale, NPC_Mamar, EVT_FLOAT(0.0)) - EVT_CALL(SetNpcJumpscale, NPC_Skolar, EVT_FLOAT(0.0)) - EVT_CALL(SetNpcJumpscale, NPC_Muskular, EVT_FLOAT(0.0)) - EVT_CALL(SetNpcJumpscale, NPC_Misstar, EVT_FLOAT(0.0)) - EVT_CALL(SetNpcJumpscale, NPC_Klevar, EVT_FLOAT(0.0)) - EVT_CALL(SetNpcJumpscale, NPC_Kalmar, EVT_FLOAT(0.0)) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarStill) - EVT_THREAD - EVT_CALL(N(AnimBowser_FlyOff)) - EVT_END_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(N(AnimKammy_FlyOff)) - EVT_WAIT(20 * DT) - EVT_CALL(N(ResumeIntro)) - EVT_RETURN - EVT_END + Call(SetNpcPaletteSwapMode, NPC_StarRod, NPC_PAL_ADJUST_BLEND_PALETTES_UNIFORM_INTERVALS) + Call(SetNpcPaletteSwapLower, NPC_StarRod, 0, 1, 20, 5) + Call(SetNpcPaletteSwapMode, NPC_Eldstar, NPC_PAL_ADJUST_BLEND_PALETTES_UNIFORM_INTERVALS) + Call(SetNpcPaletteSwapMode, NPC_Mamar, NPC_PAL_ADJUST_BLEND_PALETTES_UNIFORM_INTERVALS) + Call(SetNpcPaletteSwapMode, NPC_Skolar, NPC_PAL_ADJUST_BLEND_PALETTES_UNIFORM_INTERVALS) + Call(SetNpcPaletteSwapMode, NPC_Muskular, NPC_PAL_ADJUST_BLEND_PALETTES_UNIFORM_INTERVALS) + Call(SetNpcPaletteSwapMode, NPC_Misstar, NPC_PAL_ADJUST_BLEND_PALETTES_UNIFORM_INTERVALS) + Call(SetNpcPaletteSwapMode, NPC_Klevar, NPC_PAL_ADJUST_BLEND_PALETTES_UNIFORM_INTERVALS) + Call(SetNpcPaletteSwapMode, NPC_Kalmar, NPC_PAL_ADJUST_BLEND_PALETTES_UNIFORM_INTERVALS) + Call(SetNpcPaletteSwapping, NPC_Eldstar, 0, 1, 25, 12, 4, 18, 0, 0) + Call(SetNpcPaletteSwapping, NPC_Mamar, 0, 1, 25, 12, 4, 18, 0, 0) + Call(SetNpcPaletteSwapping, NPC_Skolar, 0, 1, 25, 12, 4, 18, 0, 0) + Call(SetNpcPaletteSwapping, NPC_Muskular, 0, 1, 25, 12, 4, 18, 0, 0) + Call(SetNpcPaletteSwapping, NPC_Misstar, 0, 1, 25, 12, 4, 18, 0, 0) + Call(SetNpcPaletteSwapping, NPC_Klevar, 0, 1, 25, 12, 4, 18, 0, 0) + Call(SetNpcPaletteSwapping, NPC_Kalmar, 0, 1, 25, 12, 4, 18, 0, 0) + Call(SetNpcFlagBits, NPC_StarRod, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarStill) + Call(SetNpcAnimation, NPC_Bowser_Prop, ANIM_WorldBowser_ClownCarPropeller) + Call(EnableNpcShadow, NPC_Bowser_Body, FALSE) + Call(EnableNpcShadow, NPC_Bowser_Prop, FALSE) + Call(EnableNpcShadow, NPC_StarRod, FALSE) + Call(EnableNpcShadow, NPC_Eldstar, FALSE) + Call(EnableNpcShadow, NPC_Mamar, FALSE) + Call(EnableNpcShadow, NPC_Skolar, FALSE) + Call(EnableNpcShadow, NPC_Muskular, FALSE) + Call(EnableNpcShadow, NPC_Misstar, FALSE) + Call(EnableNpcShadow, NPC_Klevar, FALSE) + Call(EnableNpcShadow, NPC_Kalmar, FALSE) + Call(EnableNpcShadow, NPC_Kammy, FALSE) + Thread + Call(N(ForceStarRodAlwaysFaceCamera)) + EndThread + Call(InterpNpcYaw, NPC_Bowser_Body, 90, 0) + Call(InterpNpcYaw, NPC_Bowser_Prop, 90, 0) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarTalk) + Call(SetNpcAnimation, NPC_Bowser_Prop, ANIM_WorldBowser_ClownCarPropeller) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim17) + Call(InterpNpcYaw, NPC_Kammy, 45, 0) + Call(SetNpcPos, NPC_Kammy, -145, 147, 84) + Call(SetNpcAnimation, NPC_Misstar, ANIM_WorldMisstar_Still) + Call(N(SetWorldFogParams), 0, 0, 0, 0, 0, 0, 0, 995, 1000) + Call(N(SetWorldColorParams), 130, 130, 130, 0, 0, 0, 15) + Call(N(AdjustCamVfov), 0, 35) + Call(SetPanTarget, CAM_DEFAULT, -145, 147, 84) + Call(LoadSettings, CAM_DEFAULT, Ref(N(IntroCamSettings6))) + Call(N(AnimateStorybookPages)) + Wait(50 * DT) + Call(SetNpcImgFXParams, NPC_Bowser_Body, IMGFX_SET_TINT, 0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Bowser_Prop, IMGFX_SET_TINT, 0, 0, 0, 0) + Call(SetNpcPos, NPC_Bowser_Body, -64, 135, 85) + Call(SetNpcPos, NPC_Bowser_Prop, -64, 135, 85) + Thread + Set(LVar0, 0) + Loop(50 * DT) + Add(LVar0, 6) + IfGt(LVar0, 255) + Set(LVar0, 255) + EndIf + Call(SetNpcImgFXParams, NPC_Bowser_Body, IMGFX_SET_TINT, 0, 0, 0, LVar0) + Call(SetNpcImgFXParams, NPC_Bowser_Prop, IMGFX_SET_TINT, 0, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Thread + Call(InterpNpcYaw, NPC_Bowser_Prop, 90, 0) + Set(LVar0, 0) + Loop(40 * DT) + Add(LVar0, 36) + Call(SetNpcRotation, NPC_Bowser_Body, 0, LVar0, 0) + Wait(1) + EndLoop + Call(SetNpcRotation, NPC_Bowser_Body, 0, 0, 0) + Call(InterpNpcYaw, NPC_Bowser_Body, 90, 0) + EndThread + Thread + Call(N(SetWorldColorParams), 117, 28, 42, 0, 0, 0, 15) + EndThread + PlayEffect(EFFECT_LIGHTNING, 1, 0, 20, 0, 0, 0) + Set(ArrayVar(17), LVarF) + Thread + Call(N(FadeAwayTapeGraphic)) + EndThread + Wait(16 * DT) + Thread + Call(N(func_80244934_A2EB74)) + EndThread + Loop(2) + Call(N(SetWorldColorParams), 117, 28, 42, 165, 96, 152, 0) + Call(N(SetWorldFogParams), 0, 0, 0, 127, 0, 0, 0, 975, 1000) + Wait(1) + Call(N(SetWorldColorParams), 117, 28, 42, 64, 34, 58, 0) + Call(N(SetWorldFogParams), 0, 0, 0, 127, 0, 0, 0, 995, 1000) + Wait(1) + Call(N(SetWorldColorParams), 117, 28, 42, 0, 0, 0, 0) + Call(N(SetWorldFogParams), 0, 0, 0, 0, 0, 0, 0, 995, 1000) + Wait(5) + EndLoop + Wait(30 * DT) + Call(SetNpcImgFXParams, NPC_Bowser_Body, IMGFX_SET_TINT, 0, 0, 0, 255) + Call(SetNpcImgFXParams, NPC_Bowser_Prop, IMGFX_SET_TINT, 0, 0, 0, 255) + Thread + Set(LVar0, 0) + Loop(4) + Add(LVar0, 70) + IfGt(LVar0, 255) + Set(LVar0, 255) + EndIf + Call(SetNpcImgFXParams, NPC_Bowser_Body, IMGFX_SET_TINT, LVar0, LVar0, LVar0, 255) + Call(SetNpcImgFXParams, NPC_Bowser_Prop, IMGFX_SET_TINT, LVar0, LVar0, LVar0, 255) + Wait(1) + EndLoop + EndThread + Wait(3) + Call(DismissEffect, ArrayVar(17)) + Thread + Call(EnableTexPanning, MODEL_o33, TRUE) + Call(EnableTexPanning, MODEL_o34, TRUE) + Call(SetNpcAnimation, NPC_Eldstar, ANIM_WorldEldstar_Hurt) + Call(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_Hurt) + Call(SetNpcAnimation, NPC_Skolar, ANIM_WorldSkolar_IdleSad) + Call(SetNpcAnimation, NPC_Muskular, ANIM_WorldMuskular_Panic) + Call(SetNpcAnimation, NPC_Misstar, ANIM_WorldMisstar_Panic) + Call(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Panic) + Call(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_Panic) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0E) + PlayEffect(EFFECT_ENDING_DECALS, 2, 0, 180, 0, Float(2.59375), ArrayVar(15)) + PlayEffect(EFFECT_LIGHT_RAYS, 1, 0, 200, 0, Float(1.0), ArrayVar(16)) + EndThread + Thread + Call(N(AddBowserHoverOffset)) + EndThread + Thread + Call(N(AddKammyHoverOffset)) + EndThread + Wait(50 * DT) + Call(N(AdjustCamVfov), 0, 40) + Call(SetPanTarget, CAM_DEFAULT, 0, 157, 0) + Call(LoadSettings, CAM_DEFAULT, Ref(N(IntroCamSettings7))) + Call(SetNpcAnimation, NPC_Skolar, ANIM_WorldSkolar_IdleSad) + Call(SetNpcAnimation, NPC_Muskular, ANIM_WorldMuskular_Panic) + Call(SetNpcAnimation, NPC_Misstar, ANIM_WorldMisstar_Panic) + Call(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Panic) + Call(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_Hurt) + Thread + Wait(10) + Set(LVar0, 0) + Loop(20) + Add(LVar0, 36) + Call(SetNpcRotation, NPC_Eldstar, 0, LVar0, 0) + Wait(1) + EndLoop + Wait(10) + Set(LVar0, 0) + Loop(20) + Add(LVar0, 36) + Call(SetNpcRotation, NPC_Eldstar, 0, LVar0, 0) + Wait(1) + EndLoop + EndThread + Thread + Wait(10) + Set(LVar0, 0) + Loop(20) + Add(LVar0, 36) + Call(SetNpcRotation, NPC_Muskular, 0, LVar0, 0) + Wait(1) + EndLoop + EndThread + Thread + Wait(34) + Set(LVar0, 0) + Loop(20) + Add(LVar0, 36) + Call(SetNpcRotation, NPC_Misstar, 0, LVar0, 0) + Wait(1) + EndLoop + EndThread + Thread + Wait(16) + Set(LVar0, 0) + Loop(20) + Add(LVar0, 36) + Call(SetNpcRotation, NPC_Klevar, 0, LVar0, 0) + Wait(1) + EndLoop + EndThread + Thread + Wait(28) + Set(LVar0, 0) + Loop(20) + Add(LVar0, 36) + Call(SetNpcRotation, NPC_Kalmar, 0, LVar0, 0) + Wait(1) + EndLoop + EndThread + PlayEffect(EFFECT_LIGHTNING, 2, 0, 0, 0, 0, 0) + Set(ArrayVar(17), LVarF) + Set(LVar0, 120) + Set(LVar1, 895) + Loop(10) + Add(LVar0, -12) + Add(LVar1, 10) + Call(N(SetWorldFogParams), 0, 0, 0, LVar0, 255, 255, 255, LVar1, 1000) + Wait(1) + EndLoop + Loop(2) + Call(N(SetWorldColorParams), 117, 28, 42, 165, 96, 152, 0) + Call(N(SetWorldFogParams), 0, 0, 0, 127, 0, 0, 0, 975, 1000) + Wait(1) + Call(N(SetWorldColorParams), 117, 28, 42, 105, 60, 102, 0) + Call(N(SetWorldFogParams), 0, 0, 0, 127, 0, 0, 0, 975, 1000) + Wait(1) + Call(N(SetWorldColorParams), 117, 28, 42, 64, 34, 58, 0) + Call(N(SetWorldFogParams), 0, 0, 0, 127, 0, 0, 0, 995, 1000) + Wait(1) + Call(N(SetWorldColorParams), 117, 28, 42, 34, 14, 28, 0) + Call(N(SetWorldFogParams), 0, 0, 0, 127, 0, 0, 0, 995, 1000) + Wait(1) + Call(N(SetWorldColorParams), 117, 28, 42, 0, 0, 0, 0) + Call(N(SetWorldFogParams), 0, 0, 0, 0, 0, 0, 0, 995, 1000) + Wait(5) + EndLoop + Wait(27 * DT) + Call(DismissEffect, ArrayVar(17)) + Call(N(SetWorldFogParams), 0, 0, 0, 0, 0, 0, 0, 995, 1000) + Call(N(AdjustCamVfov), 0, 25) + Call(SetPanTarget, CAM_DEFAULT, -38, 210, 85) + Call(LoadSettings, CAM_DEFAULT, Ref(N(IntroCamSettings8))) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarCloseMouth) + Call(SetNpcPos, NPC_Bowser_Body, -30, 150, 162) + Call(SetNpcPos, NPC_Bowser_Prop, -30, 150, 162) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim11) + Thread + Call(N(SetWorldColorParams), 23, 10, 10, 0, 0, 0, 15) + Wait(28) + Call(N(SetWorldColorParams), 102, 45, 0, 114, 0, 0, 3) + Call(N(SetWorldColorParams), 102, 45, 0, 0, 0, 0, 13) + Call(N(SetWorldColorParams), 180, 180, 180, 0, 0, 0, 20) + EndThread + Thread + Set(LVar0, 995) + Loop(30) + Sub(LVar0, 10) + Call(N(SetWorldFogParams), 0, 0, 0, 0, 0, 0, 0, LVar0, 1000) + Wait(1) + EndLoop + Wait(10) + Set(LVar0, 875) + Loop(60) + Add(LVar0, 2) + Call(N(SetWorldFogParams), 0, 0, 0, 0, 255, 0, 0, LVar0, 1000) + Wait(1) + EndLoop + EndThread + Set(LVar0, -28) + Set(LVar1, 210) + Set(LVar2, 155) + Set(LVar3, -28) + Set(LVar4, 209) + Set(LVar5, 153) + Call(N(CamPushIn_BowserInhale)) + PlayEffect(EFFECT_FIRE_BREATH, 0, -30, 210, 142, 0, 180, 0, 5, 2, 30) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarFireBreath) + Thread + Call(N(CamPullBack_BowserExhale)) + EndThread + Wait(20 * DT) + PlayEffect(EFFECT_SHIMMER_BURST, 0, 0, 180, 0, Float(0.703125), 30) + Thread + Wait(2) + Call(RemoveEffect, ArrayVar(15)) + EndThread + Wait(20 * DT) + Call(N(AdjustCamVfov), 0, 25) + Call(SetPanTarget, CAM_DEFAULT, -38, 210, 85) + Call(LoadSettings, CAM_DEFAULT, Ref(N(IntroCamSettings9))) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarOpenMouth) + Thread + Call(N(BowserFlyToStarRod)) + EndThread + Wait(25 * DT) + Call(N(AdjustCamVfov), 0, 35) + Call(SetPanTarget, CAM_DEFAULT, -240, 200, 113) + Call(LoadSettings, CAM_DEFAULT, Ref(N(IntroCamSettings10))) + Call(SetNpcAnimation, NPC_Skolar, ANIM_WorldSkolar_IdleSad) + Call(SetNpcAnimation, NPC_Misstar, ANIM_WorldMisstar_Panic) + Call(GetNpcPos, NPC_Skolar, LVar0, LVar1, LVar2) + Thread + Wait(5) + UseBuf(Ref(N(StarSpiritLeapBackScalars))) + Loop(10) + FBufRead2(LVarA, LVarB) + SetF(LVar3, LVar0) + SetF(LVar4, LVar1) + SetF(LVar5, LVar2) + MulF(LVar3, LVarB) + MulF(LVar4, LVarA) + MulF(LVar5, LVarB) + Call(SetNpcPos, NPC_Skolar, LVar3, LVar4, LVar5) + Wait(1) + EndLoop + EndThread + Call(GetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) + Thread + Wait(9) + UseBuf(Ref(N(StarSpiritLeapBackScalars))) + Loop(10) + FBufRead2(LVarA, LVarB) + SetF(LVar3, LVar0) + SetF(LVar4, LVar1) + SetF(LVar5, LVar2) + MulF(LVar3, LVarB) + MulF(LVar4, LVarA) + MulF(LVar5, LVarB) + Call(SetNpcPos, NPC_Misstar, LVar3, LVar4, LVar5) + Wait(1) + EndLoop + EndThread + Call(GetNpcPos, NPC_Skolar, LVar0, LVar1, LVar2) + MulF(LVar0, Float(0.9)) + MulF(LVar1, Float(0.93)) + MulF(LVar2, Float(0.9)) + Call(SetNpcPos, NPC_Skolar, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) + MulF(LVar0, Float(0.9)) + MulF(LVar1, Float(0.93)) + MulF(LVar2, Float(0.9)) + Call(SetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) + Wait(35 * DT) + Call(N(AdjustCamVfov), 0, 35) + Call(SetPanTarget, CAM_DEFAULT, 30, 232, 0) + Call(LoadSettings, CAM_DEFAULT, Ref(N(IntroCamSettings11))) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarBrandish) + Call(SetNpcPos, NPC_Bowser_Body, 0, 170, 0) + Call(SetNpcPos, NPC_Bowser_Prop, 0, 170, 0) + Call(SetNpcPos, NPC_StarRod, NPC_DISPOSE_LOCATION) + Thread + Call(N(SetWorldColorParams), 20, 20, 20, 0, 0, 0, 15) + EndThread + Set(LVar0, 21) + Set(LVar1, 260) + Set(LVar2, -21) + Call(N(SetLightRayPos)) + Wait(35 * DT) + Thread + Wait(70 * DT) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 12) + Call(N(SetWorldFogParams), 0, 0, 0, LVar0, 255, 0, 0, 995, 1000) + Wait(1) + EndLoop + EndThread + Thread + Wait(92 * DT) + Call(N(SetWorldColorParams), 106, 94, 110, 216, 195, 131, 8) + Call(N(SetWorldColorParams), 100, 105, 107, 159, 118, 50, 20) + Call(N(SetWorldColorParams), 122, 180, 110, 0, 0, 0, 15) + Call(N(SetWorldColorParams), 128, 128, 128, 255, 255, 200, 60) + EndThread + Call(N(CamPullBack_BowserHoldingStarRod)) + Call(N(AdjustCamVfov), 0, 35) + Call(SetPanTarget, CAM_DEFAULT, 0, 177, 0) + Call(LoadSettings, CAM_DEFAULT, Ref(N(IntroCamSettings12))) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarStarRod) + PlayEffect(EFFECT_LIGHT_RAYS, 2, 20, 265, -21, Float(1.0), ArrayVar(18)) + PlayEffect(EFFECT_BULB_GLOW, 2, 20, 265, -21, Float(1.0), ArrayVar(19)) + Set(LVar0, 120) + Set(LVar1, 895) + Loop(20) + Add(LVar0, -6) + Add(LVar1, 5) + Call(N(SetWorldFogParams), 0, 0, 0, LVar0, 255, 255, 255, LVar1, 1000) + Wait(1) + EndLoop + Wait(5) + Call(N(AdjustCamVfov), 0, 40) + Call(SetPanTarget, CAM_DEFAULT, 0, 157, 0) + Call(LoadSettings, CAM_DEFAULT, Ref(N(IntroCamSettings7))) + Call(SetNpcAnimation, NPC_Eldstar, ANIM_WorldEldstar_Panic) + Call(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_Panic) + Call(SetNpcAnimation, NPC_Skolar, ANIM_WorldSkolar_IdleSad) + Call(SetNpcAnimation, NPC_Muskular, ANIM_WorldMuskular_Panic) + Call(SetNpcAnimation, NPC_Misstar, ANIM_WorldMisstar_Panic) + Call(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Panic) + Call(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_Panic) + Thread + Wait(5) + Call(DismissEffect, ArrayVar(18)) + Call(DismissEffect, ArrayVar(19)) + EndThread + PlayEffect(EFFECT_ENERGY_SHOCKWAVE, 0, 18, 256, -21, Float(0.40625), 60) + Set(LVar0, 120) + SetF(LVar1, 895) + Loop(40) + Add(LVar0, -3) + AddF(LVar1, Float(2.5)) + Call(N(SetWorldFogParams), 0, 0, 0, LVar0, 255, 255, 255, LVar1, 1000) + Wait(1) + EndLoop + Call(N(AdjustCamVfov), 0, 35) + Call(SetPanTarget, CAM_DEFAULT, 70, 200, -239) + Call(LoadSettings, CAM_DEFAULT, Ref(N(IntroCamSettings5))) + Call(SetNpcAnimation, NPC_Eldstar, ANIM_WorldEldstar_Hurt) + Call(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_Hurt) + Call(SetNpcAnimation, NPC_Skolar, ANIM_WorldSkolar_Hurt) + Call(SetNpcAnimation, NPC_Muskular, ANIM_WorldMuskular_Hurt) + Call(SetNpcAnimation, NPC_Misstar, ANIM_WorldMisstar_Hurt) + Call(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Hurt) + Call(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_Hurt) + Call(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_AURA, FX_AURA_CAPTURE, LVar0, LVar1, LVar2, 1, ArrayVar(1)) + Call(GetNpcPos, NPC_Mamar, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_AURA, FX_AURA_CAPTURE, LVar0, LVar1, LVar2, 1, ArrayVar(2)) + Call(GetNpcPos, NPC_Skolar, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_AURA, FX_AURA_CAPTURE, LVar0, LVar1, LVar2, 1, ArrayVar(3)) + Call(GetNpcPos, NPC_Muskular, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_AURA, FX_AURA_CAPTURE, LVar0, LVar1, LVar2, 1, ArrayVar(4)) + Call(GetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_AURA, FX_AURA_CAPTURE, LVar0, LVar1, LVar2, 1, ArrayVar(5)) + Call(GetNpcPos, NPC_Klevar, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_AURA, FX_AURA_CAPTURE, LVar0, LVar1, LVar2, 1, ArrayVar(6)) + Call(GetNpcPos, NPC_Kalmar, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_AURA, FX_AURA_CAPTURE, LVar0, LVar1, LVar2, 1, ArrayVar(7)) + Call(N(SetWorldColorParams), 110, 110, 110, 255, 255, 255, 0) + Thread + Call(N(SetWorldColorParams), 230, 230, 230, 0, 0, 0, 30) + EndThread + Thread + Wait(28) + Call(SetNpcImgFXParams, NPC_Eldstar, IMGFX_SET_ANIM, IMGFX_ANIM_SPIRIT_CAPTURE, 1, 1, 0) + EndThread + Set(LVar0, 255) + Loop(20) + Call(SetNpcImgFXParams, NPC_Mamar, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Skolar, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Muskular, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Misstar, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Klevar, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Kalmar, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + EndLoop + Wait(15 * DT) + Call(SetNpcImgFXParams, NPC_Eldstar, IMGFX_SET_ALPHA, 255, 0, 0, 0) + PlayEffect(EFFECT_SOMETHING_ROTATING, 2, -130, 220, 130, 1, 0) + Set(ArrayVar(0), LVarF) + Set(LVar0, -130) + Set(LVar1, 220) + Set(LVar2, 130) + AddF(LVar1, Float(-30.0)) + Call(SetNpcPos, NPC_Kammy, LVar0, LVar1, LVar2) + Exec(N(EVS_UpdateWorldFogParams)) + Call(DismissEffect, ArrayVar(1)) + Call(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_RING_BLAST, 1, LVar0, LVar1, LVar2, 4, 20) + Thread + Wait(3) + Call(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_MISC_PARTICLES, 3, LVar0, LVar1, LVar2, 16, 16, 2, 20, 0) + Set(ArrayVar(8), LVarF) + Call(func_802428C8_A2CB08, 1, 30, Float(0.5)) + Call(LoadPath, LVar0, LVar1, LVar2, EASING_LINEAR) + SetF(LVar4, Float(1.0)) + Label(1) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Eldstar, LVar1, LVar2, LVar3) + Call(N(SetStarSpiritSparkleTrailPos), ArrayVar(8), ArrayVar(19), LVar1, LVar2, LVar3) + AddF(LVar4, Float(-0.03125)) + Call(SetNpcScale, NPC_Eldstar, LVar4, LVar4, LVar4) + Wait(1) + IfEq(LVar0, 1) + Goto(1) + EndIf + Call(N(SetCardCaptureState1)) + Call(SetNpcAnimation, NPC_Eldstar, ANIM_WorldEldstar_Panic) + Call(SetNpcImgFXParams, NPC_Eldstar, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetNpcFlagBits, NPC_Eldstar, NPC_FLAG_INVISIBLE, TRUE) + Call(DismissEffect, ArrayVar(8)) + EndThread + Wait(15 * DT) + Call(N(AdjustCamVfov), 0, 50) + Call(SetPanTarget, CAM_DEFAULT, 40, 200, -40) + Call(LoadSettings, CAM_DEFAULT, Ref(N(IntroCamSettings13))) + Call(RemoveEffect, ArrayVar(16)) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarIdle) + Thread + Wait(45) + Call(NpcFaceNpc, NPC_Bowser_Body, NPC_Eldstar, 0) + EndThread + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim12) + Exec(N(EVS_CaptureSpirits)) + Call(N(CamPanAcrossRoom)) + Wait(15 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim09) + Thread + Wait(10) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim12) + Wait(20) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0D) + Wait(40) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim09) + EndThread + Call(N(CamMove_OrbitKammy)) + Call(N(AdjustCamVfov), 0, 50) + Call(SetPanTarget, CAM_DEFAULT, 0, 200, 0) + Call(LoadSettings, CAM_DEFAULT, Ref(N(IntroCamSettings15))) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarLaugh) + Thread + Call(N(CamPullBack_Final)) + EndThread + Wait(20 * DT) + Thread + Call(func_80244550_A2E790) + EndThread + Wait(1) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0B) + Call(N(KammyFlyToBowser)) + Thread + Call(N(SetCardCaptureState3)) + Call(N(SetCardCaptureState3)) + Call(N(SetCardCaptureState3)) + Call(N(SetCardCaptureState3)) + Call(N(SetCardCaptureState3)) + Call(N(SetCardCaptureState3)) + Call(N(SetCardCaptureState3)) + EndThread + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0D) + Wait(15 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim11) + Wait(32 * DT) + Call(SetNpcJumpscale, NPC_Eldstar, Float(0.0)) + Call(SetNpcJumpscale, NPC_Mamar, Float(0.0)) + Call(SetNpcJumpscale, NPC_Skolar, Float(0.0)) + Call(SetNpcJumpscale, NPC_Muskular, Float(0.0)) + Call(SetNpcJumpscale, NPC_Misstar, Float(0.0)) + Call(SetNpcJumpscale, NPC_Klevar, Float(0.0)) + Call(SetNpcJumpscale, NPC_Kalmar, Float(0.0)) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarStill) + Thread + Call(N(AnimBowser_FlyOff)) + EndThread + Wait(10 * DT) + Call(N(AnimKammy_FlyOff)) + Wait(20 * DT) + Call(N(ResumeIntro)) + Return + End }; diff --git a/src/world/area_hos/hos_05/hos_05_6_narrator.c b/src/world/area_hos/hos_05/hos_05_6_narrator.c index c704bff9fc4..9c73cdd625e 100644 --- a/src/world/area_hos/hos_05/hos_05_6_narrator.c +++ b/src/world/area_hos/hos_05/hos_05_6_narrator.c @@ -72,11 +72,11 @@ void N(curtain_callback_narration)(void) { } EvtScript N(EVS_SetupNarrator) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(hos_05_ENTRY_3) - EVT_CALL(N(SetCurtainCallback), EVT_PTR(N(curtain_callback_narration))) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(hos_05_ENTRY_3) + Call(N(SetCurtainCallback), Ref(N(curtain_callback_narration))) + EndSwitch + Return + End }; diff --git a/src/world/area_hos/hos_05/hos_05_7_model_fx.c b/src/world/area_hos/hos_05/hos_05_7_model_fx.c index e0919152700..c875cbd2358 100644 --- a/src/world/area_hos/hos_05/hos_05_7_model_fx.c +++ b/src/world/area_hos/hos_05/hos_05_7_model_fx.c @@ -93,66 +93,66 @@ API_CALLABLE(N(SetUnusedAlphaParam)) { } EvtScript N(EVS_Starship_Update) = { - EVT_LOOP(0) - EVT_CALL(MakeLerp, 0, 60, 30, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(0.1)) - EVT_ADDF(LVar2, MV_Starship_PosY) - EVT_CALL(TranslateGroup, MODEL_g279, 0, LVar2, 0) - EVT_CALL(TranslateGroup, MODEL_g277, 0, LVar2, 0) - EVT_CALL(RotateGroup, MODEL_g277, MV_Starship_Yaw, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 60, 0, 30, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(0.1)) - EVT_ADDF(LVar2, MV_Starship_PosY) - EVT_CALL(TranslateGroup, MODEL_g279, 0, LVar2, 0) - EVT_CALL(TranslateGroup, MODEL_g277, 0, LVar2, 0) - EVT_CALL(RotateGroup, MODEL_g277, MV_Starship_Yaw, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(MakeLerp, 0, 60, 30, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, LVar0) + MulF(LVar2, Float(0.1)) + AddF(LVar2, MV_Starship_PosY) + Call(TranslateGroup, MODEL_g279, 0, LVar2, 0) + Call(TranslateGroup, MODEL_g277, 0, LVar2, 0) + Call(RotateGroup, MODEL_g277, MV_Starship_Yaw, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 60, 0, 30, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, LVar0) + MulF(LVar2, Float(0.1)) + AddF(LVar2, MV_Starship_PosY) + Call(TranslateGroup, MODEL_g279, 0, LVar2, 0) + Call(TranslateGroup, MODEL_g277, 0, LVar2, 0) + Call(RotateGroup, MODEL_g277, MV_Starship_Yaw, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_UpdateStarshipCollision) = { - EVT_LOOP(0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o630) - EVT_CALL(UpdateColliderTransform, COLLIDER_o627) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(UpdateColliderTransform, COLLIDER_o630) + Call(UpdateColliderTransform, COLLIDER_o627) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_SetupStarship) = { - EVT_CALL(ParentColliderToModel, COLLIDER_o630, MODEL_o637) - EVT_CALL(ParentColliderToModel, COLLIDER_o627, MODEL_o637) - EVT_IF_GE(GB_StoryProgress, STORY_CH8_STAR_SHIP_ACTIVATED) - EVT_EXEC(N(EVS_UpdateStarshipCollision)) - EVT_SET(MV_Starship_Yaw, -110) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, hos_05_ENTRY_3) - EVT_SET(MV_Starship_PosY, 900) - EVT_ELSE - EVT_SET(MV_Starship_PosY, -85) - EVT_END_IF - EVT_EXEC(N(EVS_Starship_Update)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(ParentColliderToModel, COLLIDER_o630, MODEL_o637) + Call(ParentColliderToModel, COLLIDER_o627, MODEL_o637) + IfGe(GB_StoryProgress, STORY_CH8_STAR_SHIP_ACTIVATED) + Exec(N(EVS_UpdateStarshipCollision)) + Set(MV_Starship_Yaw, -110) + Call(GetEntryID, LVar0) + IfEq(LVar0, hos_05_ENTRY_3) + Set(MV_Starship_PosY, 900) + Else + Set(MV_Starship_PosY, -85) + EndIf + Exec(N(EVS_Starship_Update)) + EndIf + Return + End }; s32 N(MostSolidGeometry)[] = { @@ -160,114 +160,114 @@ s32 N(MostSolidGeometry)[] = { }; EvtScript N(EVS_SetupLightBeam) = { - EVT_CALL(EnableGroup, MODEL_g268, FALSE) - EVT_CALL(EnableGroup, MODEL_g178, FALSE) - EVT_IF_LT(GB_StoryProgress, STORY_CH8_STAR_SHIP_ACTIVATED) - EVT_CALL(EnableModel, MODEL_o8, FALSE) - EVT_ELSE - EVT_CALL(SetModelCustomGfx, MODEL_o8, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_0, EVT_PTR(N(setup_gfx_light_beam)), NULL) - EVT_CALL(EnableModel, MODEL_o8, TRUE) - EVT_CALL(N(SetLightBeamAlpha), 127) - EVT_CALL(EnableGroup, MODEL_g277, TRUE) - EVT_CALL(EnableModel, MODEL_o362, FALSE) - EVT_CALL(EnableModel, MODEL_o397, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o616, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetZoneEnabled, ZONE_o622, FALSE) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.5)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(EnableGroup, MODEL_g268, FALSE) + Call(EnableGroup, MODEL_g178, FALSE) + IfLt(GB_StoryProgress, STORY_CH8_STAR_SHIP_ACTIVATED) + Call(EnableModel, MODEL_o8, FALSE) + Else + Call(SetModelCustomGfx, MODEL_o8, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetCustomGfxBuilders, CUSTOM_GFX_0, Ref(N(setup_gfx_light_beam)), NULL) + Call(EnableModel, MODEL_o8, TRUE) + Call(N(SetLightBeamAlpha), 127) + Call(EnableGroup, MODEL_g277, TRUE) + Call(EnableModel, MODEL_o362, FALSE) + Call(EnableModel, MODEL_o397, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o616, COLLIDER_FLAGS_UPPER_MASK) + Call(SetZoneEnabled, ZONE_o622, FALSE) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.5)) + EndIf + Return + End }; EvtScript N(EVS_Starship_Summon) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_THREAD - EVT_CALL(N(SetModelTintMode_Starship), 2, NULL, ENV_TINT_REMAP) - EVT_CALL(N(SetModelTintMode_Starship), 1, EVT_PTR(N(MostSolidGeometry)), ENV_TINT_REMAP) - EVT_CALL(N(SetWorldColorParams_Starship), 255, 255, 255, 0, 0, 0, 0) - EVT_WAIT(1) - EVT_CALL(N(SetWorldColorParams_Starship), 102, 102, 102, 0, 0, 0, 60) - EVT_END_THREAD - EVT_EXEC(N(EVS_UpdateStarshipCollision)) - EVT_SET(MV_Starship_Yaw, 0) - EVT_SET(MV_Starship_PosY, 0) - EVT_EXEC(N(EVS_Starship_Update)) - EVT_THREAD + Call(DisablePlayerInput, TRUE) + Thread + Call(N(SetModelTintMode_Starship), 2, NULL, ENV_TINT_REMAP) + Call(N(SetModelTintMode_Starship), 1, Ref(N(MostSolidGeometry)), ENV_TINT_REMAP) + Call(N(SetWorldColorParams_Starship), 255, 255, 255, 0, 0, 0, 0) + Wait(1) + Call(N(SetWorldColorParams_Starship), 102, 102, 102, 0, 0, 0, 60) + EndThread + Exec(N(EVS_UpdateStarshipCollision)) + Set(MV_Starship_Yaw, 0) + Set(MV_Starship_PosY, 0) + Exec(N(EVS_Starship_Update)) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_9) TEX_PAN_PARAMS_STEP( -90, 70, -60, 90) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan_Starship)) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_o646, 9) - EVT_CALL(PlaySoundAt, SOUND_STARSHIP_APPEARS, SOUND_SPACE_DEFAULT, 0, 250, 0) - EVT_PLAY_EFFECT(EFFECT_LIGHT_RAYS, 2, 0, 250, 0, 10, LVar9) - EVT_WAIT(20) - EVT_CALL(SetModelCustomGfx, MODEL_o646, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(setup_gfx_starship_shimmer)), NULL) - EVT_CALL(EnableGroup, MODEL_g279, TRUE) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 200, 75, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetStarshipShimmerAmt), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(60) - EVT_CALL(SetModelCustomGfx, MODEL_o8, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_0, EVT_PTR(N(setup_gfx_light_beam)), NULL) - EVT_CALL(EnableModel, MODEL_o8, TRUE) - EVT_CALL(MakeLerp, 0, 127, 60, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetLightBeamAlpha), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(40) - EVT_CALL(PlaySoundAt, SOUND_STARSHIP_APPEARS | SOUND_ID_TRIGGER_CHANGE_SOUND, 0, 0, 250, 0) - EVT_CALL(DismissEffect, LVar9) - EVT_CALL(EnableGroup, MODEL_g277, TRUE) - EVT_CALL(MakeLerp, 200, 0, 45, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetStarshipShimmerAmt), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(EnableGroup, MODEL_g279, FALSE) - EVT_THREAD - EVT_CALL(MakeLerp, 0, -110, 90, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(MV_Starship_Yaw, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, -85, 60, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(MV_Starship_PosY, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(30) - EVT_CALL(N(SetWorldColorParams_Starship), 255, 255, 255, 0, 0, 0, 60) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan_Starship)) + EndThread + Call(SetTexPanner, MODEL_o646, 9) + Call(PlaySoundAt, SOUND_STARSHIP_APPEARS, SOUND_SPACE_DEFAULT, 0, 250, 0) + PlayEffect(EFFECT_LIGHT_RAYS, 2, 0, 250, 0, 10, LVar9) + Wait(20) + Call(SetModelCustomGfx, MODEL_o646, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) + Call(SetCustomGfxBuilders, CUSTOM_GFX_1, Ref(N(setup_gfx_starship_shimmer)), NULL) + Call(EnableGroup, MODEL_g279, TRUE) + Thread + Call(MakeLerp, 0, 200, 75, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(N(SetStarshipShimmerAmt), LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Wait(60) + Call(SetModelCustomGfx, MODEL_o8, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetCustomGfxBuilders, CUSTOM_GFX_0, Ref(N(setup_gfx_light_beam)), NULL) + Call(EnableModel, MODEL_o8, TRUE) + Call(MakeLerp, 0, 127, 60, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(N(SetLightBeamAlpha), LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(40) + Call(PlaySoundAt, SOUND_STARSHIP_APPEARS | SOUND_ID_TRIGGER_CHANGE_SOUND, 0, 0, 250, 0) + Call(DismissEffect, LVar9) + Call(EnableGroup, MODEL_g277, TRUE) + Call(MakeLerp, 200, 0, 45, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(N(SetStarshipShimmerAmt), LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(EnableGroup, MODEL_g279, FALSE) + Thread + Call(MakeLerp, 0, -110, 90, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Set(MV_Starship_Yaw, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(MakeLerp, 0, -85, 60, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Set(MV_Starship_PosY, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(30) + Call(N(SetWorldColorParams_Starship), 255, 255, 255, 0, 0, 0, 60) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_hos/hos_05/hos_05_8_star_ship.c b/src/world/area_hos/hos_05/hos_05_8_star_ship.c index 1c8d71712c1..f1a09c2adee 100644 --- a/src/world/area_hos/hos_05/hos_05_8_star_ship.c +++ b/src/world/area_hos/hos_05/hos_05_8_star_ship.c @@ -23,180 +23,180 @@ API_CALLABLE(N(SwingCameraPitchUpward)) { } EvtScript N(EVS_UpdatePassengers) = { - EVT_LABEL(0) - EVT_CALL(GetModelCenter, MODEL_o637) - EVT_ADD(LVar0, -5) - EVT_IF_EQ(MV_PlayerOnBoard, TRUE) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_ADD(LVar0, 10) - EVT_IF_EQ(MV_PartnerOnBoard, TRUE) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetModelCenter, MODEL_o637) + Add(LVar0, -5) + IfEq(MV_PlayerOnBoard, TRUE) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + EndIf + Add(LVar0, 10) + IfEq(MV_PartnerOnBoard, TRUE) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_Starship_Depart) = { - EVT_CALL(GetPartnerInUse, LVar9) - EVT_IF_NE(LVar9, PARTNER_NONE) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_EXEC_GET_TID(N(EVS_UpdatePassengers), LVar9) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_CALL(GetModelCenter, MODEL_o637) - EVT_ADD(LVar0, -5) - EVT_CALL(SetPlayerJumpscale, 0) - EVT_CALL(PlayerJump2, LVar0, LVar1, LVar2, 2) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_SET(MV_PlayerOnBoard, TRUE) - EVT_CALL(InterpPlayerYaw, 0, 0) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_ADD(LVar0, 10) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(1.5)) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 12) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_SET(MV_PartnerOnBoard, TRUE) - EVT_CALL(EnableNpcShadow, NPC_PARTNER, FALSE) - EVT_WAIT(10) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0188, 160, 40) - EVT_CALL(ShowChoice, MSG_Choice_000C) - EVT_CALL(CloseMessage) - EVT_IF_EQ(LVar0, 1) + Call(GetPartnerInUse, LVar9) + IfNe(LVar9, PARTNER_NONE) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + ExecGetTID(N(EVS_UpdatePassengers), LVar9) + Call(HidePlayerShadow, TRUE) + Call(GetModelCenter, MODEL_o637) + Add(LVar0, -5) + Call(SetPlayerJumpscale, 0) + Call(PlayerJump2, LVar0, LVar1, LVar2, 2) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Set(MV_PlayerOnBoard, TRUE) + Call(InterpPlayerYaw, 0, 0) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Add(LVar0, 10) + Call(SetNpcJumpscale, NPC_PARTNER, Float(1.5)) + Call(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 12) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Set(MV_PartnerOnBoard, TRUE) + Call(EnableNpcShadow, NPC_PARTNER, FALSE) + Wait(10) + Call(ShowMessageAtScreenPos, MSG_Menus_0188, 160, 40) + Call(ShowChoice, MSG_Choice_000C) + Call(CloseMessage) + IfEq(LVar0, 1) // player chose "not ready to take off" - EVT_KILL_THREAD(LVar9) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_SET(MV_PlayerOnBoard, FALSE) - EVT_THREAD - EVT_SET(MV_PartnerOnBoard, FALSE) - EVT_CALL(PartnerIsFlying, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_WAIT(10) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, 1) - EVT_CALL(NpcJump0, NPC_PARTNER, 45, 162, 25, 10) - EVT_END_IF - EVT_CALL(EnableNpcShadow, NPC_PARTNER, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_END_THREAD - EVT_CALL(SetPlayerJumpscale, 1) - EVT_CALL(PlayerJump, 25, 162, 45, 10) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(HidePlayerShadow, FALSE) - EVT_WAIT(10) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_WAIT(20) - EVT_IF_LT(GB_StoryProgress, STORY_UNUSED_0000005D) - EVT_CALL(SetMusicTrack, 0, SONG_STARSHIP_THEME, 0, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_STARSHIP_THEME, 1, 8) - EVT_END_IF - EVT_THREAD - EVT_WAIT(25) - EVT_CALL(N(SwingCameraPitchUpward)) - EVT_END_THREAD - EVT_CALL(PlaySoundAtPlayer, SOUND_STARSHIP_TAKEOFF_LONG, SOUND_SPACE_DEFAULT) - EVT_SET(LVar2, MV_Starship_PosY) - EVT_CALL(MakeLerp, 0, 1000, 100, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_ADD(LVar0, LVar2) - EVT_SET(MV_Starship_PosY, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_IF_LT(GB_StoryProgress, STORY_UNUSED_0000005D) - EVT_CALL(GotoMap, EVT_PTR("hos_04"), hos_04_ENTRY_2) - EVT_ELSE - EVT_CALL(GotoMap, EVT_PTR("hos_20"), hos_20_ENTRY_0) - EVT_END_IF - EVT_WAIT(100) - EVT_RETURN - EVT_END + KillThread(LVar9) + Call(DisablePlayerPhysics, FALSE) + Set(MV_PlayerOnBoard, FALSE) + Thread + Set(MV_PartnerOnBoard, FALSE) + Call(PartnerIsFlying, LVar0) + IfEq(LVar0, TRUE) + Wait(10) + Call(SetNpcJumpscale, NPC_PARTNER, 1) + Call(NpcJump0, NPC_PARTNER, 45, 162, 25, 10) + EndIf + Call(EnableNpcShadow, NPC_PARTNER, TRUE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(EnablePartnerAI) + EndThread + Call(SetPlayerJumpscale, 1) + Call(PlayerJump, 25, 162, 45, 10) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(HidePlayerShadow, FALSE) + Wait(10) + Call(DisablePlayerInput, FALSE) + Return + EndIf + Wait(20) + IfLt(GB_StoryProgress, STORY_UNUSED_0000005D) + Call(SetMusicTrack, 0, SONG_STARSHIP_THEME, 0, 8) + Else + Call(SetMusicTrack, 0, SONG_STARSHIP_THEME, 1, 8) + EndIf + Thread + Wait(25) + Call(N(SwingCameraPitchUpward)) + EndThread + Call(PlaySoundAtPlayer, SOUND_STARSHIP_TAKEOFF_LONG, SOUND_SPACE_DEFAULT) + Set(LVar2, MV_Starship_PosY) + Call(MakeLerp, 0, 1000, 100, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Add(LVar0, LVar2) + Set(MV_Starship_PosY, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + IfLt(GB_StoryProgress, STORY_UNUSED_0000005D) + Call(GotoMap, Ref("hos_04"), hos_04_ENTRY_2) + Else + Call(GotoMap, Ref("hos_20"), hos_20_ENTRY_0) + EndIf + Wait(100) + Return + End }; EvtScript N(EVS_EnterStarship) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_CALL(EnableNpcShadow, NPC_PARTNER, FALSE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 180, -5) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 180, -5) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(550.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-35.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_SET(MV_PlayerOnBoard, TRUE) - EVT_SET(MV_PartnerOnBoard, TRUE) - EVT_EXEC_GET_TID(N(EVS_UpdatePassengers), LVar9) - EVT_THREAD - EVT_WAIT(25) - EVT_CALL(MakeLerp, -350, -70, 60, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, LVar0) - EVT_DIVF(LVar2, 10) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(PlaySoundAtPlayer, SOUND_STARSHIP_ARRIVE, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 750, -85, 90, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(MV_Starship_PosY, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_KILL_THREAD(LVar9) - EVT_SET(MV_PlayerOnBoard, FALSE) - EVT_CALL(SetPlayerJumpscale, 1) - EVT_CALL(PlayerJump, 25, 162, 45, 10) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(HidePlayerShadow, FALSE) - EVT_THREAD - EVT_SET(MV_PartnerOnBoard, FALSE) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PARTNER_PARAKARRY) - EVT_CASE_EQ(PARTNER_BOW) - EVT_CASE_EQ(PARTNER_WATT) - EVT_CASE_EQ(PARTNER_LAKILESTER) - EVT_CASE_DEFAULT - EVT_WAIT(10) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, 1) - EVT_CALL(NpcJump0, NPC_PARTNER, 45, 162, 25, 10) - EVT_END_SWITCH - EVT_CALL(EnableNpcShadow, NPC_PARTNER, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_END_THREAD - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(SetMusicTrack, 0, SONG_STAR_SANCTUARY, 0, 8) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.5)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(HidePlayerShadow, TRUE) + Call(EnableNpcShadow, NPC_PARTNER, FALSE) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 180, -5) + Call(SetPanTarget, CAM_DEFAULT, 0, 180, -5) + Call(SetCamDistance, CAM_DEFAULT, Float(550.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-35.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Set(MV_PlayerOnBoard, TRUE) + Set(MV_PartnerOnBoard, TRUE) + ExecGetTID(N(EVS_UpdatePassengers), LVar9) + Thread + Wait(25) + Call(MakeLerp, -350, -70, 60, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, LVar0) + DivF(LVar2, 10) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(PlaySoundAtPlayer, SOUND_STARSHIP_ARRIVE, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 750, -85, 90, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Set(MV_Starship_PosY, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + KillThread(LVar9) + Set(MV_PlayerOnBoard, FALSE) + Call(SetPlayerJumpscale, 1) + Call(PlayerJump, 25, 162, 45, 10) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(HidePlayerShadow, FALSE) + Thread + Set(MV_PartnerOnBoard, FALSE) + Call(GetCurrentPartnerID, LVar0) + Switch(LVar0) + CaseEq(PARTNER_PARAKARRY) + CaseEq(PARTNER_BOW) + CaseEq(PARTNER_WATT) + CaseEq(PARTNER_LAKILESTER) + CaseDefault + Wait(10) + Call(SetNpcJumpscale, NPC_PARTNER, 1) + Call(NpcJump0, NPC_PARTNER, 45, 162, 25, 10) + EndSwitch + Call(EnableNpcShadow, NPC_PARTNER, TRUE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(EnablePartnerAI) + EndThread + Call(DisablePlayerPhysics, FALSE) + Call(SetMusicTrack, 0, SONG_STAR_SANCTUARY, 0, 8) + Call(ResetCam, CAM_DEFAULT, Float(1.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.5)) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_hos/hos_06/hos_06_1_entity.c b/src/world/area_hos/hos_06/hos_06_1_entity.c index c573077e5df..e7714a8e469 100644 --- a/src/world/area_hos/hos_06/hos_06_1_entity.c +++ b/src/world/area_hos/hos_06/hos_06_1_entity.c @@ -2,8 +2,8 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), -50, 0, 350, -90, MODEL_o4, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_HOS06_HiddenPanel) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HiddenPanel), -50, 0, 350, -90, MODEL_o4, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_HOS06_HiddenPanel) + Return + End }; diff --git a/src/world/area_hos/hos_06/hos_06_2_main.c b/src/world/area_hos/hos_06/hos_06_2_main.c index 18713274846..ef0d4bf28a7 100644 --- a/src/world/area_hos/hos_06/hos_06_2_main.c +++ b/src/world/area_hos/hos_06/hos_06_2_main.c @@ -3,75 +3,75 @@ #include "world/common/atomic/TexturePan.inc.c" EvtScript N(EVS_TexPan_MysticPyramid) = { - EVT_CALL(EnableTexPanning, MODEL_o185, TRUE) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 0x4000) - EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, LVar0, 0) - EVT_WAIT(3) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(EnableTexPanning, MODEL_o185, TRUE) + Set(LVar0, 0) + Loop(0) + Add(LVar0, 0x4000) + Call(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, LVar0, 0) + Wait(3) + EndLoop + Return + End }; EvtScript N(EVS_Animate_MysticPyramid) = { - EVT_EXEC(N(EVS_TexPan_MysticPyramid)) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_CALL(RotateGroup, MODEL_g87, LVar0, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_g88, LVar0, 0, 1, 0) - EVT_ADD(LVar0, 6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Exec(N(EVS_TexPan_MysticPyramid)) + Set(LVar0, 0) + Loop(0) + Call(RotateGroup, MODEL_g87, LVar0, 0, 1, 0) + Call(RotateGroup, MODEL_g88, LVar0, 0, 1, 0) + Add(LVar0, 6) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_ExitWalk_hos_00_2) = EVT_EXIT_WALK(60, hos_06_ENTRY_0, "hos_00", hos_00_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_hos_00_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_hos_00_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + Return + End }; EvtScript N(EVS_TexPan_Stars) = { - EVT_THREAD + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_3) TEX_PAN_PARAMS_STEP( -100, 0, 40, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 1, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_o103, TEX_PANNER_3) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetTexPanner, MODEL_o103, TEX_PANNER_3) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( -200, 0, 100, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 1, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_o105, TEX_PANNER_1) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetTexPanner, MODEL_o105, TEX_PANNER_1) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHOOTING_STAR_SUMMIT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_SET(AF_HOS06_SpokeWithMerluvlee, FALSE) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMagicChest)) - EVT_EXEC(N(EVS_Animate_MysticPyramid)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_CALL(SetMusicTrack, 0, SONG_SHOOTING_STAR_SUMMIT, 0, 8) - EVT_EXEC(N(EVS_SetupRooms)) - EVT_EXEC(N(EVS_TexPan_Stars)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_AskForHint)), TRIGGER_WALL_PRESS_A, COLLIDER_o224, 1, 0) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_SHOOTING_STAR_SUMMIT) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Set(AF_HOS06_SpokeWithMerluvlee, FALSE) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMagicChest)) + Exec(N(EVS_Animate_MysticPyramid)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Call(SetMusicTrack, 0, SONG_SHOOTING_STAR_SUMMIT, 0, 8) + Exec(N(EVS_SetupRooms)) + Exec(N(EVS_TexPan_Stars)) + BindTrigger(Ref(N(EVS_AskForHint)), TRIGGER_WALL_PRESS_A, COLLIDER_o224, 1, 0) + Return + End }; diff --git a/src/world/area_hos/hos_06/hos_06_3_merlow.c b/src/world/area_hos/hos_06/hos_06_3_merlow.c index bbe41580bbe..2eba36b9a4f 100644 --- a/src/world/area_hos/hos_06/hos_06_3_merlow.c +++ b/src/world/area_hos/hos_06/hos_06_3_merlow.c @@ -24,29 +24,29 @@ s32 N(LetterList)[] = { }; EvtScript N(EVS_LetterPrompt) = { - EVT_CALL(N(LetterDelivery_Init), + Call(N(LetterDelivery_Init), NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, ITEM_LETTER_TO_MERLOW, ITEM_NONE, MSG_HOS_0058, MSG_HOS_0059, MSG_HOS_005A, MSG_HOS_005B, - EVT_PTR(N(LetterList))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) - EVT_RETURN - EVT_END + Ref(N(LetterList))) + ExecWait(N(EVS_DoLetterDelivery)) + Return + End }; EvtScript N(EVS_LetterReward) = { - EVT_IF_EQ(LVarC, DELIVERY_ACCEPTED) + IfEq(LVarC, DELIVERY_ACCEPTED) EVT_GIVE_STAR_PIECE() - EVT_END_IF - EVT_RETURN - EVT_END + EndIf + Return + End }; #define NAME_SUFFIX EvtScript N(EVS_NpcInteract_Merluvlee_Passthrough) = { - EVT_EXEC_WAIT(N(EVS_NpcInteract_Merluvlee)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_NpcInteract_Merluvlee)) + Return + End }; ShopItemData N(MerlowBadgeInventory)[MERLOW_BADGE_COUNT] = { @@ -151,105 +151,105 @@ API_CALLABLE(N(Merlow_ShopBadgesPopup)) { } EvtScript N(EVS_NpcInteract_Merlow) = { - EVT_EXEC_WAIT(N(EVS_LetterPrompt_Merlow)) - EVT_EXEC_WAIT(N(EVS_LetterReward_Merlow)) - EVT_IF_NE(LVarC, 0) - EVT_RETURN - EVT_END_IF - EVT_IF_GE(GB_HOS06_Merlow_PurchaseCount, MERLOW_BADGE_COUNT) - EVT_CALL(SpeakToPlayer, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_004C) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(MF_PurchasedBadge, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_004D) - EVT_ELSE - EVT_IF_EQ(GF_HOS06_Met_Merlow, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_004A) - EVT_SET(GF_HOS06_Met_Merlow, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_004B) - EVT_END_IF - EVT_END_IF - EVT_CALL(ShowChoice, MSG_Choice_0014) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(ContinueSpeech, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_004E) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(Merlow_GetPlayerStarPieces), LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ContinueSpeech, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_004F) - EVT_RETURN - EVT_END_IF - EVT_CALL(ContinueSpeech, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_0050) - EVT_LABEL(0) - EVT_CALL(N(Merlow_ShopBadgesPopup)) - EVT_WAIT(10) - EVT_IF_EQ(LVar0, -1) - EVT_CALL(SpeakToPlayer, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_0051) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(Merlow_GetPlayerStarPieces), LVar3) - EVT_IF_LT(LVar3, LVar1) - EVT_CALL(SpeakToPlayer, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_0051) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetMessageText, LVar4, 0) - EVT_CALL(SetMessageValue, LVar1, 1) - EVT_CALL(SetMessageValue, LVar5, 2) - EVT_IF_EQ(LVar1, 1) - EVT_CALL(SpeakToPlayer, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_0053) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_0052) - EVT_END_IF - EVT_SET(LVar3, LVar0) - EVT_CALL(ShowChoice, MSG_Choice_000D) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(ContinueSpeech, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_0054) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(CloseMessage) - EVT_MUL(LVar1, -1) - EVT_CALL(AddStarPieces, LVar1) - EVT_ADD(GB_HOS06_Merlow_PurchaseCount, 1) - EVT_SET(MF_PurchasedBadge, TRUE) - EVT_CALL(N(Merlow_SetBadgePurchased), LVar2) + ExecWait(N(EVS_LetterPrompt_Merlow)) + ExecWait(N(EVS_LetterReward_Merlow)) + IfNe(LVarC, 0) + Return + EndIf + IfGe(GB_HOS06_Merlow_PurchaseCount, MERLOW_BADGE_COUNT) + Call(SpeakToPlayer, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_004C) + Return + EndIf + IfEq(MF_PurchasedBadge, TRUE) + Call(SpeakToPlayer, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_004D) + Else + IfEq(GF_HOS06_Met_Merlow, FALSE) + Call(SpeakToPlayer, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_004A) + Set(GF_HOS06_Met_Merlow, TRUE) + Else + Call(SpeakToPlayer, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_004B) + EndIf + EndIf + Call(ShowChoice, MSG_Choice_0014) + IfEq(LVar0, 1) + Call(ContinueSpeech, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_004E) + Return + EndIf + Call(N(Merlow_GetPlayerStarPieces), LVar0) + IfEq(LVar0, 0) + Call(ContinueSpeech, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_004F) + Return + EndIf + Call(ContinueSpeech, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_0050) + Label(0) + Call(N(Merlow_ShopBadgesPopup)) + Wait(10) + IfEq(LVar0, -1) + Call(SpeakToPlayer, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_0051) + Return + EndIf + Call(N(Merlow_GetPlayerStarPieces), LVar3) + IfLt(LVar3, LVar1) + Call(SpeakToPlayer, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_0051) + Goto(0) + EndIf + Call(SetMessageText, LVar4, 0) + Call(SetMessageValue, LVar1, 1) + Call(SetMessageValue, LVar5, 2) + IfEq(LVar1, 1) + Call(SpeakToPlayer, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_0053) + Else + Call(SpeakToPlayer, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_0052) + EndIf + Set(LVar3, LVar0) + Call(ShowChoice, MSG_Choice_000D) + IfEq(LVar0, 1) + Call(ContinueSpeech, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_0054) + Goto(0) + EndIf + Call(CloseMessage) + Mul(LVar1, -1) + Call(AddStarPieces, LVar1) + Add(GB_HOS06_Merlow_PurchaseCount, 1) + Set(MF_PurchasedBadge, TRUE) + Call(N(Merlow_SetBadgePurchased), LVar2) // awkward #define NAME_SUFFIX _Merlow EVT_GIVE_BADGE_REWARD_ALT(LVar3, LVar1) #define NAME_SUFFIX - EVT_IF_GE(GB_HOS06_Merlow_PurchaseCount, MERLOW_BADGE_COUNT) - EVT_CALL(SpeakToPlayer, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_0055) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(Merlow_GetPlayerStarPieces), LVar0) - EVT_IF_LE(LVar0, 0) - EVT_CALL(SpeakToPlayer, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_0055) - EVT_RETURN - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_0056) - EVT_CALL(ShowChoice, MSG_Choice_000D) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(ContinueSpeech, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_0057) - EVT_RETURN - EVT_END_IF - EVT_CALL(CloseMessage) - EVT_GOTO(0) - EVT_RETURN - EVT_END + IfGe(GB_HOS06_Merlow_PurchaseCount, MERLOW_BADGE_COUNT) + Call(SpeakToPlayer, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_0055) + Return + EndIf + Call(N(Merlow_GetPlayerStarPieces), LVar0) + IfLe(LVar0, 0) + Call(SpeakToPlayer, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_0055) + Return + EndIf + Call(SpeakToPlayer, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_0056) + Call(ShowChoice, MSG_Choice_000D) + IfEq(LVar0, 1) + Call(ContinueSpeech, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_0057) + Return + EndIf + Call(CloseMessage) + Goto(0) + Return + End }; EvtScript N(EVS_NpcInit_Merluvlee_Passthrough) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Merluvlee_Passthrough))) - EVT_EXEC(N(EVS_NpcInit_Merluvlee)) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Merluvlee_Passthrough))) + Exec(N(EVS_NpcInit_Merluvlee)) + Return + End }; EvtScript N(EVS_NpcInit_Merlow) = { - EVT_SET(MF_PurchasedBadge, FALSE) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Merlow))) - EVT_RETURN - EVT_END + Set(MF_PurchasedBadge, FALSE) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Merlow))) + Return + End }; NpcData N(NpcData_Merluvlee)[] = { diff --git a/src/world/area_hos/hos_06/hos_06_4_rooms.c b/src/world/area_hos/hos_06/hos_06_4_rooms.c index c0e602f432a..54150d4779d 100644 --- a/src/world/area_hos/hos_06/hos_06_4_rooms.c +++ b/src/world/area_hos/hos_06/hos_06_4_rooms.c @@ -7,111 +7,111 @@ API_CALLABLE(N(GetEntryID)) { } EvtScript N(EVS_SetDoorRot_House) = { - EVT_CALL(RotateGroup, MODEL_g10, LVar0, 0, 1, 0) - EVT_RETURN - EVT_END + Call(RotateGroup, MODEL_g10, LVar0, 0, 1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_House) = { - EVT_SET(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(2.0)) - EVT_CALL(RotateGroup, MODEL_g12, LVar1, 0, 0, 1) - EVT_SET(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(2.0)) - EVT_CALL(RotateGroup, MODEL_g54, LVar1, 0, 1, 0) - EVT_SET(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(2.0)) - EVT_CALL(RotateGroup, MODEL_g55, LVar1, 0, 1, 0) - EVT_SET(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(2.0)) - EVT_CALL(RotateGroup, MODEL_g56, LVar1, 0, 1, 0) - EVT_SET(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(2.0)) - EVT_CALL(RotateGroup, MODEL_g57, LVar1, 0, 1, 0) - EVT_SET(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(2.0)) - EVT_CALL(RotateGroup, MODEL_g58, LVar1, 0, 1, 0) - EVT_SET(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(2.0)) - EVT_CALL(RotateGroup, MODEL_g86, LVar1, 0, 1, 0) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + MulF(LVar1, Float(2.0)) + Call(RotateGroup, MODEL_g12, LVar1, 0, 0, 1) + Set(LVar1, LVar0) + MulF(LVar1, Float(2.0)) + Call(RotateGroup, MODEL_g54, LVar1, 0, 1, 0) + Set(LVar1, LVar0) + MulF(LVar1, Float(2.0)) + Call(RotateGroup, MODEL_g55, LVar1, 0, 1, 0) + Set(LVar1, LVar0) + MulF(LVar1, Float(2.0)) + Call(RotateGroup, MODEL_g56, LVar1, 0, 1, 0) + Set(LVar1, LVar0) + MulF(LVar1, Float(2.0)) + Call(RotateGroup, MODEL_g57, LVar1, 0, 1, 0) + Set(LVar1, LVar0) + MulF(LVar1, Float(2.0)) + Call(RotateGroup, MODEL_g58, LVar1, 0, 1, 0) + Set(LVar1, LVar0) + MulF(LVar1, Float(2.0)) + Call(RotateGroup, MODEL_g86, LVar1, 0, 1, 0) + Return + End }; EvtScript N(EVS_DropDoor_House) = { - EVT_CALL(RotateGroup, MODEL_g10, LVar0, 1, 0, 1) - EVT_RETURN - EVT_END + Call(RotateGroup, MODEL_g10, LVar0, 1, 0, 1) + Return + End }; EvtScript N(EVS_RoomListener_House) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_CALL(SetGroupVisibility, MODEL_g29, MODEL_GROUP_VISIBLE) - EVT_CALL(SetGroupVisibility, MODEL_g81, MODEL_GROUP_VISIBLE) - EVT_CALL(SetGroupVisibility, MODEL_g51, MODEL_GROUP_VISIBLE) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_DONE) - EVT_CALL(SetGroupVisibility, MODEL_g1, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_g35, MODEL_GROUP_HIDDEN) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_BEGIN) - EVT_CALL(SetGroupVisibility, MODEL_g1, MODEL_GROUP_VISIBLE) - EVT_CALL(SetGroupVisibility, MODEL_g35, MODEL_GROUP_VISIBLE) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_CALL(SetGroupVisibility, MODEL_g29, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_g81, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_g31, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_g51, MODEL_GROUP_HIDDEN) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Call(SetGroupVisibility, MODEL_g29, MODEL_GROUP_VISIBLE) + Call(SetGroupVisibility, MODEL_g81, MODEL_GROUP_VISIBLE) + Call(SetGroupVisibility, MODEL_g51, MODEL_GROUP_VISIBLE) + CaseEq(ROOM_UPDATE_ENTER_DONE) + Call(SetGroupVisibility, MODEL_g1, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_g35, MODEL_GROUP_HIDDEN) + CaseEq(ROOM_UPDATE_EXIT_BEGIN) + Call(SetGroupVisibility, MODEL_g1, MODEL_GROUP_VISIBLE) + Call(SetGroupVisibility, MODEL_g35, MODEL_GROUP_VISIBLE) + CaseEq(ROOM_UPDATE_EXIT_END) + Call(SetGroupVisibility, MODEL_g29, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_g81, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_g31, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_g51, MODEL_GROUP_HIDDEN) + EndSwitch + Return + End }; EvtScript N(EVS_SetDoorRot_Downstairs) = { - EVT_CALL(RotateGroup, MODEL_g32, LVar0, 0, 1, 0) - EVT_RETURN - EVT_END + Call(RotateGroup, MODEL_g32, LVar0, 0, 1, 0) + Return + End }; EvtScript N(EVS_SetDoorRot_Upstairs) = { - EVT_CALL(RotateGroup, MODEL_g61, LVar0, 0, 1, 0) - EVT_RETURN - EVT_END + Call(RotateGroup, MODEL_g61, LVar0, 0, 1, 0) + Return + End }; EvtScript N(EVS_ManageUpstairsVisibility) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar1, 100) - EVT_CALL(SetGroupVisibility, MODEL_g31, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_g50, MODEL_GROUP_VISIBLE) - EVT_ELSE - EVT_CALL(SetGroupVisibility, MODEL_g31, MODEL_GROUP_VISIBLE) - EVT_CALL(SetGroupVisibility, MODEL_g50, MODEL_GROUP_HIDDEN) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar1, 100) + Call(SetGroupVisibility, MODEL_g31, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_g50, MODEL_GROUP_VISIBLE) + Else + Call(SetGroupVisibility, MODEL_g31, MODEL_GROUP_VISIBLE) + Call(SetGroupVisibility, MODEL_g50, MODEL_GROUP_HIDDEN) + EndIf + Return + End }; EvtScript N(EVS_SetupRooms) = { - EVT_CALL(SetGroupVisibility, MODEL_g29, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_g81, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_g31, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_g51, MODEL_GROUP_HIDDEN) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_ManageUpstairsVisibility)), TRIGGER_FLOOR_TOUCH, COLLIDER_o92, 0, 0, 1) + Call(SetGroupVisibility, MODEL_g29, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_g81, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_g31, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_g51, MODEL_GROUP_HIDDEN) + BindPadlock(Ref(N(EVS_ManageUpstairsVisibility)), TRIGGER_FLOOR_TOUCH, COLLIDER_o92, 0, 0, 1) // front door - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_RIGHT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_House)), - EVT_PTR(N(EVS_SetWallRot_House)), - EVT_PTR(N(EVS_DropDoor_House)), - EVT_PTR(N(EVS_RoomListener_House)), + Ref(N(EVS_SetDoorRot_House)), + Ref(N(EVS_SetWallRot_House)), + Ref(N(EVS_DropDoor_House)), + Ref(N(EVS_RoomListener_House)), COLLIDER_o158, COLLIDER_o159, MODEL_g2, NULL) // staircase - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_RIGHT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_Downstairs)), + Ref(N(EVS_SetDoorRot_Downstairs)), NULL, NULL, NULL, @@ -120,9 +120,9 @@ EvtScript N(EVS_SetupRooms) = { MODEL_o1, NULL) // loft - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_RIGHT_HINGE_OPENS_IN), - EVT_PTR(N(EVS_SetDoorRot_Upstairs)), + Ref(N(EVS_SetDoorRot_Upstairs)), NULL, NULL, NULL, @@ -130,6 +130,6 @@ EvtScript N(EVS_SetupRooms) = { COLLIDER_o162, MODEL_o1, NULL) - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/area_hos/hos_06/hos_06_5_merluvlee.c b/src/world/area_hos/hos_06/hos_06_5_merluvlee.c index bf82fe5cf3d..bf55c016868 100644 --- a/src/world/area_hos/hos_06/hos_06_5_merluvlee.c +++ b/src/world/area_hos/hos_06/hos_06_5_merluvlee.c @@ -566,108 +566,108 @@ API_CALLABLE(N(func_80241F98_A3B478)) { } EvtScript N(EVS_PerformHintRitual) = { - EVT_CALL(SetMusicTrack, 0, SONG_MERLEE_SPELL, 2, 8) - EVT_CALL(SetNpcAnimation, NPC_Merluvlee, ANIM_Merluvlee_Release) - EVT_CALL(GetModelCenter, MODEL_o100) - EVT_ADD(LVar1, 20) - EVT_CALL(PlaySoundAt, SOUND_LRAW_CRYSTAL_BALL_GLOW, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 1, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), -1) - EVT_SET(ArrayVar(1), LVarF) - EVT_CALL(EnableModel, MODEL_o185, FALSE) - EVT_CALL(EnableModel, MODEL_o186, FALSE) - EVT_WAIT(30) - EVT_THREAD - EVT_CALL(N(func_802418E8_A3ADC8)) - EVT_END_THREAD - EVT_CALL(GetModelCenter, MODEL_o100) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, -20) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-91.5), EVT_FLOAT(18.40625)) - EVT_CALL(GetCamDistance, CAM_DEFAULT, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_SETF(LVar0, EVT_FLOAT(284.6)) - EVT_ELSE - EVT_SETF(LVar0, EVT_FLOAT(-284.6)) - EVT_END_IF - EVT_CALL(SetCamDistance, CAM_DEFAULT, LVar0) - EVT_CALL(GetCamPitch, CAM_DEFAULT, LVar0, LVar1) - EVT_SETF(LVar1, EVT_FLOAT(-11.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, LVar0, LVar1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_PLAY_EFFECT(EFFECT_MERLIN_HOUSE_STARS, 0, -298, 21, -330) - EVT_SET(ArrayVar(2), LVarF) - EVT_CALL(GetModelCenter, MODEL_o100) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_MOTION_BLUR_FLAME, 0, LVar0, LVar1, LVar2, 1, -1) - EVT_SET(ArrayVar(3), LVarF) - EVT_PLAY_EFFECT(EFFECT_MOTION_BLUR_FLAME, 0, LVar0, LVar1, LVar2, 1, -1) - EVT_SET(ArrayVar(4), LVarF) - EVT_PLAY_EFFECT(EFFECT_MOTION_BLUR_FLAME, 0, LVar0, LVar1, LVar2, 1, -1) - EVT_SET(ArrayVar(5), LVarF) - EVT_THREAD - EVT_CALL(N(func_80241CCC_A3B1AC)) - EVT_END_THREAD - EVT_WAIT(50) - EVT_CALL(GetModelCenter, MODEL_o100) - EVT_ADD(LVar1, 20) - EVT_CALL(PlaySoundAt, SOUND_CRYSTAL_BALL_WAVE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.5), 20) - EVT_WAIT(30) - EVT_CALL(GetModelCenter, MODEL_o100) - EVT_ADD(LVar1, 20) - EVT_CALL(PlaySoundAt, SOUND_CRYSTAL_BALL_WAVE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 5, LVar0, LVar1, LVar2, EVT_FLOAT(0.5), 20) - EVT_WAIT(30) - EVT_THREAD - EVT_CALL(N(func_80241A58_A3AF38)) - EVT_END_THREAD - EVT_CALL(GetModelCenter, MODEL_o100) - EVT_ADD(LVar1, 20) - EVT_CALL(PlaySoundAt, SOUND_CRYSTAL_BALL_WAVE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 6, LVar0, LVar1, LVar2, EVT_FLOAT(0.5), 20) - EVT_WAIT(70) - EVT_CALL(DismissEffect, ArrayVar(2)) - EVT_WAIT(40) - EVT_CALL(PlaySoundAt, SOUND_LRAW_CRYSTAL_BALL_GLOW | SOUND_ID_TRIGGER_CHANGE_SOUND, 0, LVar0, LVar1, LVar2) - EVT_CALL(N(func_80241F98_A3B478), ArrayVar(1)) - EVT_WAIT(15) - EVT_CALL(EnableModel, MODEL_o185, TRUE) - EVT_CALL(EnableModel, MODEL_o186, TRUE) - EVT_CALL(DismissEffect, ArrayVar(1)) - EVT_THREAD - EVT_CALL(N(func_80241B74_A3B054)) - EVT_END_THREAD - EVT_WAIT(46) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5.0)) - EVT_CALL(SetNpcAnimation, NPC_Merluvlee, ANIM_Merluvlee_Idle) - EVT_CALL(SetMusicTrack, 0, SONG_SHOOTING_STAR_SUMMIT, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_MERLEE_SPELL, 2, 8) + Call(SetNpcAnimation, NPC_Merluvlee, ANIM_Merluvlee_Release) + Call(GetModelCenter, MODEL_o100) + Add(LVar1, 20) + Call(PlaySoundAt, SOUND_LRAW_CRYSTAL_BALL_GLOW, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 1, LVar0, LVar1, LVar2, Float(1.0), -1) + Set(ArrayVar(1), LVarF) + Call(EnableModel, MODEL_o185, FALSE) + Call(EnableModel, MODEL_o186, FALSE) + Wait(30) + Thread + Call(N(func_802418E8_A3ADC8)) + EndThread + Call(GetModelCenter, MODEL_o100) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Add(LVar1, -20) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamPosA, CAM_DEFAULT, Float(-91.5), Float(18.40625)) + Call(GetCamDistance, CAM_DEFAULT, LVar0) + IfGt(LVar0, 0) + SetF(LVar0, Float(284.6)) + Else + SetF(LVar0, Float(-284.6)) + EndIf + Call(SetCamDistance, CAM_DEFAULT, LVar0) + Call(GetCamPitch, CAM_DEFAULT, LVar0, LVar1) + SetF(LVar1, Float(-11.0)) + Call(SetCamPitch, CAM_DEFAULT, LVar0, LVar1) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + PlayEffect(EFFECT_MERLIN_HOUSE_STARS, 0, -298, 21, -330) + Set(ArrayVar(2), LVarF) + Call(GetModelCenter, MODEL_o100) + Add(LVar1, 20) + PlayEffect(EFFECT_MOTION_BLUR_FLAME, 0, LVar0, LVar1, LVar2, 1, -1) + Set(ArrayVar(3), LVarF) + PlayEffect(EFFECT_MOTION_BLUR_FLAME, 0, LVar0, LVar1, LVar2, 1, -1) + Set(ArrayVar(4), LVarF) + PlayEffect(EFFECT_MOTION_BLUR_FLAME, 0, LVar0, LVar1, LVar2, 1, -1) + Set(ArrayVar(5), LVarF) + Thread + Call(N(func_80241CCC_A3B1AC)) + EndThread + Wait(50) + Call(GetModelCenter, MODEL_o100) + Add(LVar1, 20) + Call(PlaySoundAt, SOUND_CRYSTAL_BALL_WAVE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 5, LVar0, LVar1, LVar2, Float(0.5), 20) + Wait(30) + Call(GetModelCenter, MODEL_o100) + Add(LVar1, 20) + Call(PlaySoundAt, SOUND_CRYSTAL_BALL_WAVE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 5, LVar0, LVar1, LVar2, Float(0.5), 20) + Wait(30) + Thread + Call(N(func_80241A58_A3AF38)) + EndThread + Call(GetModelCenter, MODEL_o100) + Add(LVar1, 20) + Call(PlaySoundAt, SOUND_CRYSTAL_BALL_WAVE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 6, LVar0, LVar1, LVar2, Float(0.5), 20) + Wait(70) + Call(DismissEffect, ArrayVar(2)) + Wait(40) + Call(PlaySoundAt, SOUND_LRAW_CRYSTAL_BALL_GLOW | SOUND_ID_TRIGGER_CHANGE_SOUND, 0, LVar0, LVar1, LVar2) + Call(N(func_80241F98_A3B478), ArrayVar(1)) + Wait(15) + Call(EnableModel, MODEL_o185, TRUE) + Call(EnableModel, MODEL_o186, TRUE) + Call(DismissEffect, ArrayVar(1)) + Thread + Call(N(func_80241B74_A3B054)) + EndThread + Wait(46) + Call(ResetCam, CAM_DEFAULT, Float(5.0)) + Call(SetNpcAnimation, NPC_Merluvlee, ANIM_Merluvlee_Idle) + Call(SetMusicTrack, 0, SONG_SHOOTING_STAR_SUMMIT, 0, 8) + Return + End }; EvtScript N(EVS_NpcInit_Merluvlee) = { - EVT_CALL(N(ResetHintFlags)) - EVT_RETURN - EVT_END + Call(N(ResetHintFlags)) + Return + End }; EvtScript N(EVS_KootRequestBall_Merluvlee) = { - EVT_IF_EQ(GB_KootFavor_Current, KOOT_FAVOR_CH4_1) - EVT_IF_EQ(GF_HOS06_MerluvleeRequestedCrystalBall, FALSE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_0046) - EVT_WAIT(10) - EVT_CALL(ContinueSpeech, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_0047) - EVT_SET(GF_HOS06_MerluvleeRequestedCrystalBall, TRUE) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_KootFavor_Current, KOOT_FAVOR_CH4_1) + IfEq(GF_HOS06_MerluvleeRequestedCrystalBall, FALSE) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(1) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(20) + Call(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_0046) + Wait(10) + Call(ContinueSpeech, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_0047) + Set(GF_HOS06_MerluvleeRequestedCrystalBall, TRUE) + EndIf + EndIf + Return + End }; s32 N(CrystalBallItems)[] = { @@ -676,123 +676,123 @@ s32 N(CrystalBallItems)[] = { }; EvtScript N(EVS_KootCheckBall_Merluvlee) = { - EVT_IF_EQ(GF_HOS06_MerluvleeRequestedCrystalBall, FALSE) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GF_HOS06_Gift_MerluvleesAutograph, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(FindKeyItem, ITEM_CRYSTAL_BALL, LVar0) - EVT_IF_EQ(LVar0, -1) - EVT_CALL(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_0048) - EVT_ELSE + IfEq(GF_HOS06_MerluvleeRequestedCrystalBall, FALSE) + Return + EndIf + IfEq(GF_HOS06_Gift_MerluvleesAutograph, TRUE) + Return + EndIf + Call(FindKeyItem, ITEM_CRYSTAL_BALL, LVar0) + IfEq(LVar0, -1) + Call(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_0048) + Else EVT_CHOOSE_KEY_ITEM_FROM(N(CrystalBallItems)) - EVT_IF_NE(LVar0, -1) - EVT_CALL(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_0049) + IfNe(LVar0, -1) + Call(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_0049) EVT_GIVE_KEY_REWARD(ITEM_KOOT_MERLUVLEE_AUTOGRAPH) - EVT_SET(GF_HOS06_Gift_MerluvleesAutograph, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_0048) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Set(GF_HOS06_Gift_MerluvleesAutograph, TRUE) + Else + Call(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_0048) + EndIf + EndIf + Return + End }; EvtScript N(EVS_AskForHint) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(func_802CF56C, 1) - EVT_CALL(PlayerMoveTo, -49, 0, 6) - EVT_CALL(PlayerFaceNpc, NPC_Merluvlee, FALSE) - EVT_IF_EQ(MV_RitualFXArrayPtr, 0) - EVT_MALLOC_ARRAY(20, MV_RitualFXArrayPtr) - EVT_END_IF - EVT_USE_ARRAY(MV_RitualFXArrayPtr) - EVT_IF_EQ(AF_HOS06_SpokeWithMerluvlee, FALSE) - EVT_SET(AF_HOS06_SpokeWithMerluvlee, TRUE) - EVT_IF_EQ(GF_HOS06_Met_Merluvlee, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_0038) - EVT_SET(GF_HOS06_Met_Merluvlee, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_0039) - EVT_END_IF - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_003A) - EVT_END_IF - EVT_LABEL(10) - EVT_CALL(ShowChoice, MSG_Choice_0011) - EVT_IF_NE(LVar0, 0) - EVT_CALL(ContinueSpeech, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_003C) - EVT_CALL(func_802CF56C, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(ShowCoinCounter, TRUE) - EVT_CALL(ShowChoice, MSG_Choice_0000) - EVT_CALL(ShowCoinCounter, FALSE) - EVT_IF_EQ(LVar0, 4) - EVT_CALL(ContinueSpeech, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_003C) - EVT_CALL(func_802CF56C, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(HasEnoughCoinsForHint), LVar0, LVar1) - EVT_IF_NE(LVar1, 0) - EVT_CALL(ContinueSpeech, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_003D) - EVT_CALL(func_802CF56C, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(DeductHintCoins), LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(ContinueSpeech, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_003E) - EVT_CALL(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Gather, ANIM_Merluvlee_Gather, 0, MSG_HOS_0041) - EVT_EXEC_WAIT(N(EVS_PerformHintRitual)) - EVT_CALL(N(GetStarPieceHint)) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Think, ANIM_Merluvlee_Think, 0, MSG_HOS_0042) - EVT_CALL(N(RefundHintCoins), 0) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, LVar1) - EVT_END_IF - EVT_GOTO(99) - EVT_CASE_EQ(1) - EVT_CALL(ContinueSpeech, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_003F) - EVT_CALL(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Gather, ANIM_Merluvlee_Gather, 0, MSG_HOS_0041) - EVT_EXEC_WAIT(N(EVS_PerformHintRitual)) - EVT_CALL(N(GetBadgeHint)) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Think, ANIM_Merluvlee_Think, 0, MSG_HOS_0043) - EVT_CALL(N(RefundHintCoins), 1) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, LVar1) - EVT_END_IF - EVT_GOTO(99) - EVT_CASE_EQ(2) - EVT_CALL(ContinueSpeech, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_0040) - EVT_CALL(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Gather, ANIM_Merluvlee_Gather, 0, MSG_HOS_0041) - EVT_EXEC_WAIT(N(EVS_PerformHintRitual)) - EVT_CALL(N(GetSuperBlockHint)) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Think, ANIM_Merluvlee_Think, 0, MSG_HOS_0044) - EVT_CALL(N(RefundHintCoins), 2) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, LVar1) - EVT_END_IF - EVT_GOTO(99) - EVT_END_SWITCH - EVT_LABEL(99) - EVT_CALL(func_802CF56C, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(func_802CF56C, 1) + Call(PlayerMoveTo, -49, 0, 6) + Call(PlayerFaceNpc, NPC_Merluvlee, FALSE) + IfEq(MV_RitualFXArrayPtr, 0) + MallocArray(20, MV_RitualFXArrayPtr) + EndIf + UseArray(MV_RitualFXArrayPtr) + IfEq(AF_HOS06_SpokeWithMerluvlee, FALSE) + Set(AF_HOS06_SpokeWithMerluvlee, TRUE) + IfEq(GF_HOS06_Met_Merluvlee, FALSE) + Call(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_0038) + Set(GF_HOS06_Met_Merluvlee, TRUE) + Else + Call(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_0039) + EndIf + Else + Call(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_003A) + EndIf + Label(10) + Call(ShowChoice, MSG_Choice_0011) + IfNe(LVar0, 0) + Call(ContinueSpeech, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_003C) + Call(func_802CF56C, 0) + Call(DisablePlayerInput, FALSE) + Return + EndIf + Call(ShowCoinCounter, TRUE) + Call(ShowChoice, MSG_Choice_0000) + Call(ShowCoinCounter, FALSE) + IfEq(LVar0, 4) + Call(ContinueSpeech, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_003C) + Call(func_802CF56C, 0) + Call(DisablePlayerInput, FALSE) + Return + EndIf + Call(N(HasEnoughCoinsForHint), LVar0, LVar1) + IfNe(LVar1, 0) + Call(ContinueSpeech, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_003D) + Call(func_802CF56C, 0) + Call(DisablePlayerInput, FALSE) + Return + EndIf + Call(N(DeductHintCoins), LVar0) + Switch(LVar0) + CaseEq(0) + Call(ContinueSpeech, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_003E) + Call(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Gather, ANIM_Merluvlee_Gather, 0, MSG_HOS_0041) + ExecWait(N(EVS_PerformHintRitual)) + Call(N(GetStarPieceHint)) + IfEq(LVar1, 0) + Call(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Think, ANIM_Merluvlee_Think, 0, MSG_HOS_0042) + Call(N(RefundHintCoins), 0) + Else + Call(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, LVar1) + EndIf + Goto(99) + CaseEq(1) + Call(ContinueSpeech, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_003F) + Call(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Gather, ANIM_Merluvlee_Gather, 0, MSG_HOS_0041) + ExecWait(N(EVS_PerformHintRitual)) + Call(N(GetBadgeHint)) + IfEq(LVar1, 0) + Call(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Think, ANIM_Merluvlee_Think, 0, MSG_HOS_0043) + Call(N(RefundHintCoins), 1) + Else + Call(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, LVar1) + EndIf + Goto(99) + CaseEq(2) + Call(ContinueSpeech, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_0040) + Call(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Gather, ANIM_Merluvlee_Gather, 0, MSG_HOS_0041) + ExecWait(N(EVS_PerformHintRitual)) + Call(N(GetSuperBlockHint)) + IfEq(LVar1, 0) + Call(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Think, ANIM_Merluvlee_Think, 0, MSG_HOS_0044) + Call(N(RefundHintCoins), 2) + Else + Call(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, LVar1) + EndIf + Goto(99) + EndSwitch + Label(99) + Call(func_802CF56C, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_Merluvlee) = { - EVT_CALL(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_0045) - EVT_EXEC_WAIT(N(EVS_KootCheckBall_Merluvlee)) - EVT_EXEC_WAIT(N(EVS_KootRequestBall_Merluvlee)) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_Merluvlee, ANIM_Merluvlee_Talk, ANIM_Merluvlee_Idle, 0, MSG_HOS_0045) + ExecWait(N(EVS_KootCheckBall_Merluvlee)) + ExecWait(N(EVS_KootRequestBall_Merluvlee)) + Return + End }; diff --git a/src/world/area_hos/hos_06/hos_06_6_chest.c b/src/world/area_hos/hos_06/hos_06_6_chest.c index 0e24269e6eb..6ce3311b369 100644 --- a/src/world/area_hos/hos_06/hos_06_6_chest.c +++ b/src/world/area_hos/hos_06/hos_06_6_chest.c @@ -19,14 +19,14 @@ s32** N(varStash) = NULL; #define NAME_SUFFIX EvtScript N(EVS_Chest_ShowGotItem) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_FULL) - EVT_WAIT(40) - EVT_CALL(ShowGotItem, LVar0, FALSE, 0) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_FULL) + Wait(40) + Call(ShowGotItem, LVar0, FALSE, 0) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + Return + End }; s32 N(ChestItems)[] = { @@ -149,72 +149,72 @@ API_CALLABLE(N(SetItemRetrieved)) { #include "world/common/todo/GetItemEmptyCount.inc.c" EvtScript N(EVS_OpenChest) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_o207, SOUND_OPEN_MAGIC_CHEST, 0) - EVT_CALL(MakeLerp, 0, 80, 20, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g82, LVar0, -1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_o207, SOUND_OPEN_MAGIC_CHEST, 0) + Call(MakeLerp, 0, 80, 20, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g82, LVar0, -1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_CloseChest) = { - EVT_CALL(MakeLerp, 80, 0, 20, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g82, LVar0, -1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_o207, SOUND_CLOSE_MAGIC_CHEST, 0) - EVT_RETURN - EVT_END + Call(MakeLerp, 80, 0, 20, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g82, LVar0, -1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_o207, SOUND_CLOSE_MAGIC_CHEST, 0) + Return + End }; EvtScript N(EVS_Interact_MagicChest_Mario) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC_WAIT(N(EVS_OpenChest)) - EVT_SET(LVar0, 1) - EVT_CALL(N(ChestItemPrompt)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(-1) - EVT_CASE_EQ(0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D4, 160, 40) - EVT_CASE_OR_EQ(ITEM_POWER_RUSH) - EVT_CASE_OR_EQ(ITEM_DEEP_FOCUS1) - EVT_CASE_OR_EQ(ITEM_LAST_STAND) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_FULL) - EVT_CALL(ShowGotItem, LVar0, FALSE, 0) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_CALL(AddBadge, LVar0, LVar1) - EVT_CALL(N(SetItemRetrieved)) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(N(GetItemEmptyCount)) - EVT_IF_LE(LVar1, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D5, 160, 40) - EVT_ELSE - EVT_CALL(ShowGotItem, LVar0, FALSE, ITEM_PICKUP_FLAG_NO_ANIMS) - EVT_CALL(AddItem, LVar0, LVar1) - EVT_CALL(N(SetItemRetrieved)) - EVT_END_IF - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_CloseChest)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + ExecWait(N(EVS_OpenChest)) + Set(LVar0, 1) + Call(N(ChestItemPrompt)) + Switch(LVar0) + CaseEq(-1) + CaseEq(0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D4, 160, 40) + CaseOrEq(ITEM_POWER_RUSH) + CaseOrEq(ITEM_DEEP_FOCUS1) + CaseOrEq(ITEM_LAST_STAND) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_FULL) + Call(ShowGotItem, LVar0, FALSE, 0) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Call(AddBadge, LVar0, LVar1) + Call(N(SetItemRetrieved)) + EndCaseGroup + CaseDefault + Call(N(GetItemEmptyCount)) + IfLe(LVar1, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D5, 160, 40) + Else + Call(ShowGotItem, LVar0, FALSE, ITEM_PICKUP_FLAG_NO_ANIMS) + Call(AddItem, LVar0, LVar1) + Call(N(SetItemRetrieved)) + EndIf + EndSwitch + ExecWait(N(EVS_CloseChest)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SetupMagicChest) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Interact_MagicChest_Mario)), TRIGGER_WALL_PRESS_A, COLLIDER_o207, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_Interact_MagicChest_Mario)), TRIGGER_WALL_PRESS_A, COLLIDER_o207, 1, 0) + Return + End }; diff --git a/src/world/area_hos/hos_10/hos_10_1_music.c b/src/world/area_hos/hos_10/hos_10_1_music.c index 7439e1b74d9..70eb4390703 100644 --- a/src/world/area_hos/hos_10/hos_10_1_music.c +++ b/src/world/area_hos/hos_10/hos_10_1_music.c @@ -1,22 +1,22 @@ #include "hos_10.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(hos_10_ENTRY_1) - EVT_CALL(SetMusicTrack, 0, SONG_INTRO_STORY, 3, 8) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(hos_10_ENTRY_2) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(hos_10_ENTRY_3) - EVT_CASE_OR_EQ(hos_10_ENTRY_4) - EVT_END_CASE_GROUP - EVT_CASE_EQ(hos_10_ENTRY_5) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetMusicTrack, 0, SONG_MARIO_FALLS, 0, 8) - EVT_END_THREAD - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseOrEq(hos_10_ENTRY_1) + Call(SetMusicTrack, 0, SONG_INTRO_STORY, 3, 8) + EndCaseGroup + CaseOrEq(hos_10_ENTRY_2) + EndCaseGroup + CaseOrEq(hos_10_ENTRY_3) + CaseOrEq(hos_10_ENTRY_4) + EndCaseGroup + CaseEq(hos_10_ENTRY_5) + Thread + Wait(10) + Call(SetMusicTrack, 0, SONG_MARIO_FALLS, 0, 8) + EndThread + EndSwitch + Return + End }; diff --git a/src/world/area_hos/hos_10/hos_10_2_npc1.c b/src/world/area_hos/hos_10/hos_10_2_npc1.c index f60ed5f8fe4..c983d969882 100644 --- a/src/world/area_hos/hos_10/hos_10_2_npc1.c +++ b/src/world/area_hos/hos_10/hos_10_2_npc1.c @@ -13,57 +13,57 @@ NpcSettings N(NpcSettings_Dummy) = { #include "world/common/npc/StarSpirit.inc.c" EvtScript N(EVS_NpcInit_Peach) = { - EVT_CALL(SetNpcPos, NPC_Peach, -100, 200, 1300) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Peach, -100, 200, 1300) + Return + End }; EvtScript N(EVS_NpcInit_Twink) = { - EVT_CALL(SetNpcPos, NPC_Twink, -130, 260, 1300) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Twink, -130, 260, 1300) + Return + End }; EvtScript N(EVS_NpcInit_Eldstar) = { - EVT_CALL(SetNpcPos, NPC_Eldstar, -121, 200, 1369) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Eldstar, -121, 200, 1369) + Return + End }; EvtScript N(EVS_NpcInit_Mamar) = { - EVT_CALL(SetNpcPos, NPC_Mamar, -175, 200, 1342) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Mamar, -175, 200, 1342) + Return + End }; EvtScript N(EVS_NpcInit_Skolar) = { - EVT_CALL(SetNpcPos, NPC_Skolar, -188, 200, 1284) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Skolar, -188, 200, 1284) + Return + End }; EvtScript N(EVS_NpcInit_Muskular) = { - EVT_CALL(SetNpcPos, NPC_Muskular, -150, 200, 1237) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Muskular, -150, 200, 1237) + Return + End }; EvtScript N(EVS_NpcInit_Misstar) = { - EVT_CALL(SetNpcPos, NPC_Misstar, -100, 200, 1237) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Misstar, -100, 200, 1237) + Return + End }; EvtScript N(EVS_NpcInit_Klevar) = { - EVT_CALL(SetNpcPos, NPC_Klevar, -52, 200, 1284) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Klevar, -52, 200, 1284) + Return + End }; EvtScript N(EVS_NpcInit_Kalmar) = { - EVT_CALL(SetNpcPos, NPC_Kalmar, -65, 200, 1342) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Kalmar, -65, 200, 1342) + Return + End }; AnimID N(ExtraAnims_Peach)[] = { diff --git a/src/world/area_hos/hos_10/hos_10_3_npc2.c b/src/world/area_hos/hos_10/hos_10_3_npc2.c index a753a38c049..cdcdcc93080 100644 --- a/src/world/area_hos/hos_10/hos_10_3_npc2.c +++ b/src/world/area_hos/hos_10/hos_10_3_npc2.c @@ -12,52 +12,52 @@ NpcSettings N(NpcSettings_Dummy) = { #include "world/common/npc/StarSpirit.inc.c" EvtScript N(EVS_NpcInit_Twink) = { - EVT_CALL(SetNpcPos, NPC_Twink, 0, 0, -400) - EVT_CALL(SetNpcYaw, NPC_Twink, 90) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Twink, 0, 0, -400) + Call(SetNpcYaw, NPC_Twink, 90) + Return + End }; EvtScript N(EVS_NpcInit_Eldstar) = { - EVT_CALL(SetNpcPos, NPC_Eldstar, 0, 0, -400) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Eldstar, 0, 0, -400) + Return + End }; EvtScript N(EVS_NpcInit_Mamar) = { - EVT_CALL(SetNpcPos, NPC_Mamar, 0, 0, -400) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Mamar, 0, 0, -400) + Return + End }; EvtScript N(EVS_NpcInit_Skolar) = { - EVT_CALL(SetNpcPos, NPC_Skolar, 0, 0, -400) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Skolar, 0, 0, -400) + Return + End }; EvtScript N(EVS_NpcInit_Muskular) = { - EVT_CALL(SetNpcPos, NPC_Muskular, 0, 0, -400) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Muskular, 0, 0, -400) + Return + End }; EvtScript N(EVS_NpcInit_Misstar) = { - EVT_CALL(SetNpcPos, NPC_Misstar, 0, 0, -400) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Misstar, 0, 0, -400) + Return + End }; EvtScript N(EVS_NpcInit_Klevar) = { - EVT_CALL(SetNpcPos, NPC_Klevar, 0, 0, -400) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Klevar, 0, 0, -400) + Return + End }; EvtScript N(EVS_NpcInit_Kalmar) = { - EVT_CALL(SetNpcPos, NPC_Kalmar, 0, 0, -400) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Kalmar, 0, 0, -400) + Return + End }; AnimID N(ExtraAnims_Twink)[] = { diff --git a/src/world/area_hos/hos_10/hos_10_4_main.c b/src/world/area_hos/hos_10/hos_10_4_main.c index 8006fd66542..93ed687aec6 100644 --- a/src/world/area_hos/hos_10/hos_10_4_main.c +++ b/src/world/area_hos/hos_10/hos_10_4_main.c @@ -1,39 +1,39 @@ #include "hos_10.h" EvtScript N(EVS_Main) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, hos_10_ENTRY_1) - EVT_WAIT(75) - EVT_END_IF - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(hos_10_ENTRY_1) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NpcGroup_Descent))) - EVT_CASE_EQ(hos_10_ENTRY_2) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NpcGroup_FlyAway))) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_IF_NE(GB_StoryProgress, STORY_INTRO) - EVT_CALL(EnableModel, MODEL_mario_o, FALSE) - EVT_END_IF - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(hos_10_ENTRY_1) - EVT_WAIT(50) - EVT_EXEC(N(EVS_Scene_CastleDescending)) - EVT_CASE_EQ(hos_10_ENTRY_2) - EVT_EXEC(N(EVS_Scene_SpiritsFlyingAway)) - EVT_CASE_EQ(hos_10_ENTRY_3) - EVT_EXEC_WAIT(N(EVS_Scene_RisingAboveClouds)) - EVT_CASE_EQ(hos_10_ENTRY_4) - EVT_EXEC_WAIT(N(EVS_Scene_UnusedWhiteScreen)) - EVT_CASE_EQ(hos_10_ENTRY_5) - EVT_WAIT(30) - EVT_EXEC(N(EVS_Scene_PreTitle)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, hos_10_ENTRY_1) + Wait(75) + EndIf + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(hos_10_ENTRY_1) + Call(MakeNpcs, FALSE, Ref(N(NpcGroup_Descent))) + CaseEq(hos_10_ENTRY_2) + Call(MakeNpcs, FALSE, Ref(N(NpcGroup_FlyAway))) + CaseDefault + EndSwitch + IfNe(GB_StoryProgress, STORY_INTRO) + Call(EnableModel, MODEL_mario_o, FALSE) + EndIf + Exec(N(EVS_SetupMusic)) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(hos_10_ENTRY_1) + Wait(50) + Exec(N(EVS_Scene_CastleDescending)) + CaseEq(hos_10_ENTRY_2) + Exec(N(EVS_Scene_SpiritsFlyingAway)) + CaseEq(hos_10_ENTRY_3) + ExecWait(N(EVS_Scene_RisingAboveClouds)) + CaseEq(hos_10_ENTRY_4) + ExecWait(N(EVS_Scene_UnusedWhiteScreen)) + CaseEq(hos_10_ENTRY_5) + Wait(30) + Exec(N(EVS_Scene_PreTitle)) + EndSwitch + Return + End }; diff --git a/src/world/area_hos/hos_10/hos_10_5_intro.c b/src/world/area_hos/hos_10/hos_10_5_intro.c index 36d18293ba2..33f694c6b45 100644 --- a/src/world/area_hos/hos_10/hos_10_5_intro.c +++ b/src/world/area_hos/hos_10/hos_10_5_intro.c @@ -37,150 +37,150 @@ API_CALLABLE(N(MakeShootingStar)) { } EvtScript N(EVS_Scene_Unused_Impl) = { - EVT_THREAD - EVT_SETF(LVar0, 0) - EVT_LOOP(310) - EVT_CALL(TranslateModel, MODEL_o3, 0, LVar0, 0) - EVT_ADDF(LVar0, EVT_FLOAT(-1.5)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(100) - EVT_CALL(N(ResumeIntroState)) - EVT_RETURN - EVT_END + Thread + SetF(LVar0, 0) + Loop(310) + Call(TranslateModel, MODEL_o3, 0, LVar0, 0) + AddF(LVar0, Float(-1.5)) + Wait(1) + EndLoop + EndThread + Wait(100) + Call(N(ResumeIntroState)) + Return + End }; EvtScript N(EVS_Scene_Rising_Impl) = { - EVT_THREAD + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( 400, 0, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_3) TEX_PAN_PARAMS_STEP( 600, 0, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_4) TEX_PAN_PARAMS_STEP( 1000, 0, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_F) TEX_PAN_PARAMS_STEP( 0, 1000, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_E) TEX_PAN_PARAMS_STEP( 0, 400, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_k2, TRUE) - EVT_CALL(EnableTexPanning, MODEL_k7, TRUE) - EVT_CALL(EnableTexPanning, MODEL_k1, TRUE) - EVT_CALL(EnableTexPanning, MODEL_k5, TRUE) - EVT_CALL(EnableTexPanning, MODEL_k9, TRUE) - EVT_CALL(EnableTexPanning, MODEL_k12, TRUE) - EVT_CALL(EnableTexPanning, MODEL_s1, TRUE) - EVT_CALL(EnableTexPanning, MODEL_s2, TRUE) - EVT_THREAD - EVT_WAIT(510) - EVT_CALL(N(MakeShootingStar)) - EVT_END_THREAD - EVT_CALL(EnableModel, MODEL_nagare, FALSE) - EVT_CALL(SetTexPanner, MODEL_nagare, 1) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) - EVT_WAIT(560) - EVT_CALL(EnableModel, MODEL_nagare, TRUE) - EVT_LOOP(32) - EVT_ADD(LVar0, 0x800) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EnableModel, MODEL_nagare, FALSE) - EVT_CALL(TranslateModel, MODEL_nagare, -400, 100, 0) - EVT_SET(LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) - EVT_WAIT(100) - EVT_CALL(EnableModel, MODEL_nagare, TRUE) - EVT_LOOP(32) - EVT_ADD(LVar0, 0x800) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EnableModel, MODEL_nagare, FALSE) - EVT_END_THREAD - EVT_THREAD - EVT_SETF(LVar0, -1125) - EVT_LOOP(1450) - EVT_CALL(TranslateModel, MODEL_o3, 0, LVar0, 0) - EVT_ADDF(LVar0, EVT_FLOAT(-1.5)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_SETF(LVar0, -500) - EVT_LOOP(1450) - EVT_CALL(TranslateGroup, MODEL_kumo, 0, LVar0, 0) - EVT_ADDF(LVar0, EVT_FLOAT(-2.5)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(600) - EVT_SETF(LVar0, 0) - EVT_SETF(LVar1, 0) - EVT_LOOP(1000) - EVT_CALL(TranslateGroup, MODEL_starland, 0, LVar0, 0) - EVT_CALL(RotateGroup, MODEL_stl_1, LVar1, 0, -1, 0) - EVT_ADDF(LVar0, EVT_FLOAT(-3.59375)) - EVT_ADDF(LVar1, EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(740) - EVT_CALL(N(ResumeIntroState)) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(EnableTexPanning, MODEL_k2, TRUE) + Call(EnableTexPanning, MODEL_k7, TRUE) + Call(EnableTexPanning, MODEL_k1, TRUE) + Call(EnableTexPanning, MODEL_k5, TRUE) + Call(EnableTexPanning, MODEL_k9, TRUE) + Call(EnableTexPanning, MODEL_k12, TRUE) + Call(EnableTexPanning, MODEL_s1, TRUE) + Call(EnableTexPanning, MODEL_s2, TRUE) + Thread + Wait(510) + Call(N(MakeShootingStar)) + EndThread + Call(EnableModel, MODEL_nagare, FALSE) + Call(SetTexPanner, MODEL_nagare, 1) + Thread + Set(LVar0, 0) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) + Wait(560) + Call(EnableModel, MODEL_nagare, TRUE) + Loop(32) + Add(LVar0, 0x800) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) + Wait(1) + EndLoop + Call(EnableModel, MODEL_nagare, FALSE) + Call(TranslateModel, MODEL_nagare, -400, 100, 0) + Set(LVar0, 0) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) + Wait(100) + Call(EnableModel, MODEL_nagare, TRUE) + Loop(32) + Add(LVar0, 0x800) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) + Wait(1) + EndLoop + Call(EnableModel, MODEL_nagare, FALSE) + EndThread + Thread + SetF(LVar0, -1125) + Loop(1450) + Call(TranslateModel, MODEL_o3, 0, LVar0, 0) + AddF(LVar0, Float(-1.5)) + Wait(1) + EndLoop + EndThread + Thread + SetF(LVar0, -500) + Loop(1450) + Call(TranslateGroup, MODEL_kumo, 0, LVar0, 0) + AddF(LVar0, Float(-2.5)) + Wait(1) + EndLoop + EndThread + Thread + Wait(600) + SetF(LVar0, 0) + SetF(LVar1, 0) + Loop(1000) + Call(TranslateGroup, MODEL_starland, 0, LVar0, 0) + Call(RotateGroup, MODEL_stl_1, LVar1, 0, -1, 0) + AddF(LVar0, Float(-3.59375)) + AddF(LVar1, Float(1.0)) + Wait(1) + EndLoop + EndThread + Wait(740) + Call(N(ResumeIntroState)) + Return + End }; EvtScript N(EVS_Scene_UnusedWhiteScreen) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(EnableModel, MODEL_nagare, FALSE) - EVT_EXEC(N(EVS_Scene_Unused_Impl)) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(EnableModel, MODEL_nagare, FALSE) + Exec(N(EVS_Scene_Unused_Impl)) + Return + End }; EvtScript N(EVS_Scene_RisingAboveClouds) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_EXEC(N(EVS_Scene_Rising_Impl)) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Exec(N(EVS_Scene_Rising_Impl)) + Return + End }; diff --git a/src/world/area_hos/hos_10/hos_10_6_pre_title.c b/src/world/area_hos/hos_10/hos_10_6_pre_title.c index c93f25a5a79..1a25853c585 100644 --- a/src/world/area_hos/hos_10/hos_10_6_pre_title.c +++ b/src/world/area_hos/hos_10/hos_10_6_pre_title.c @@ -7,85 +7,85 @@ #define NAME_SUFFIX EvtScript N(EVS_Scene_PreTitle) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Hurt) - EVT_CALL(SetPlayerPos, NPC_DISPOSE_LOCATION) - EVT_CALL(EnableModel, MODEL_o2, FALSE) - EVT_CALL(EnableModel, MODEL_nagare, FALSE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerAnimation, ANIM_Mario1_Hurt) + Call(SetPlayerPos, NPC_DISPOSE_LOCATION) + Call(EnableModel, MODEL_o2, FALSE) + Call(EnableModel, MODEL_nagare, FALSE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( 400, 0, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan_PreTitle)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan_PreTitle)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_3) TEX_PAN_PARAMS_STEP( 600, 0, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan_PreTitle)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan_PreTitle)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_4) TEX_PAN_PARAMS_STEP( 1000, 0, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan_PreTitle)) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_k2, TRUE) - EVT_CALL(EnableTexPanning, MODEL_k7, TRUE) - EVT_CALL(EnableTexPanning, MODEL_k1, TRUE) - EVT_CALL(EnableTexPanning, MODEL_k5, TRUE) - EVT_CALL(EnableTexPanning, MODEL_k9, TRUE) - EVT_CALL(EnableTexPanning, MODEL_k12, TRUE) - EVT_THREAD - EVT_SETF(LVar0, -1800) - EVT_LOOP(450 * DT) - EVT_CALL(TranslateModel, MODEL_o3, 0, LVar0, 0) - EVT_ADDF(LVar0, EVT_FLOAT(1.5 / DT)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_SETF(LVar0, -1725) - EVT_LOOP(450 * DT) - EVT_CALL(TranslateGroup, MODEL_kumo, 0, LVar0, 0) - EVT_ADDF(LVar0, EVT_FLOAT(2.5 / DT)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetModelCenter, MODEL_mario_o) - EVT_IF_LT(LVar1, -130) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, 0, -130, 480, 0) - EVT_END_THREAD - EVT_CALL(MakeLerp, 350, -200, 400 * DT, EASING_LINEAR) - EVT_SET(LVar2, 0) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_mario_o, 0, LVar0, 480) - EVT_CALL(ScaleModel, MODEL_mario_o, EVT_FLOAT(1.25), EVT_FLOAT(1.25), EVT_FLOAT(1.25)) - EVT_CALL(RotateModel, MODEL_mario_o, LVar2, 1, 0, 0) - EVT_ADD(LVar2, EVT_FLOAT(22.5)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_21"), kmr_21_ENTRY_0, TRANSITION_SLOW_FADE_TO_WHITE) - EVT_WAIT(100 * DT) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan_PreTitle)) + EndThread + Call(EnableTexPanning, MODEL_k2, TRUE) + Call(EnableTexPanning, MODEL_k7, TRUE) + Call(EnableTexPanning, MODEL_k1, TRUE) + Call(EnableTexPanning, MODEL_k5, TRUE) + Call(EnableTexPanning, MODEL_k9, TRUE) + Call(EnableTexPanning, MODEL_k12, TRUE) + Thread + SetF(LVar0, -1800) + Loop(450 * DT) + Call(TranslateModel, MODEL_o3, 0, LVar0, 0) + AddF(LVar0, Float(1.5 / DT)) + Wait(1) + EndLoop + EndThread + Thread + SetF(LVar0, -1725) + Loop(450 * DT) + Call(TranslateGroup, MODEL_kumo, 0, LVar0, 0) + AddF(LVar0, Float(2.5 / DT)) + Wait(1) + EndLoop + EndThread + Thread + Loop(0) + Wait(1) + Call(GetModelCenter, MODEL_mario_o) + IfLt(LVar1, -130) + BreakLoop + EndIf + EndLoop + PlayEffect(EFFECT_LANDING_DUST, 4, 0, -130, 480, 0) + EndThread + Call(MakeLerp, 350, -200, 400 * DT, EASING_LINEAR) + Set(LVar2, 0) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_mario_o, 0, LVar0, 480) + Call(ScaleModel, MODEL_mario_o, Float(1.25), Float(1.25), Float(1.25)) + Call(RotateModel, MODEL_mario_o, LVar2, 1, 0, 0) + Add(LVar2, Float(22.5)) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(GotoMapSpecial, Ref("kmr_21"), kmr_21_ENTRY_0, TRANSITION_SLOW_FADE_TO_WHITE) + Wait(100 * DT) + Return + End }; diff --git a/src/world/area_hos/hos_10/hos_10_7_ending.c b/src/world/area_hos/hos_10/hos_10_7_ending.c index 7019b106626..56ee0c65dc8 100644 --- a/src/world/area_hos/hos_10/hos_10_7_ending.c +++ b/src/world/area_hos/hos_10/hos_10_7_ending.c @@ -180,377 +180,377 @@ Vec3f N(TwinkPath)[] = { }; EvtScript N(EVS_Scene_CastleDescending) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(PlaySound, SOUND_KPA_LIGHT_RAYS | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_CALL(SetPlayerPos, -130, 200, 1300) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, -150, 200, 1300) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 90) - EVT_CALL(EnableModel, MODEL_o2, FALSE) - EVT_CALL(EnableGroup, MODEL_kumo, FALSE) - EVT_CALL(EnableModel, MODEL_nagare, FALSE) - EVT_CALL(TranslateGroup, MODEL_castle, 0, -2500, 0) - EVT_CALL(ScaleGroup, MODEL_castle, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_PLAY_EFFECT(EFFECT_ENDING_DECALS, 2, 0, 35, 70, EVT_FLOAT(7.0), MV_BubbleFXPtr) - EVT_CALL(N(SetHaloAlpha), MV_BubbleFXPtr, 128) - EVT_CHILD_THREAD - EVT_PLAY_EFFECT(EFFECT_ENDING_DECALS, 2, 0, 0, 0, EVT_FLOAT(10.0), MV_Unk_01) - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 12) - EVT_ADD(LVar2, 60) - EVT_CALL(N(SetHaloPos), MV_Unk_01, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(0.0), EVT_FLOAT(0.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_SETF(LVar0, -2250) - EVT_LOOP(1500) - EVT_CALL(TranslateModel, MODEL_o3, 0, LVar0, 0) - EVT_ADDF(LVar0, EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.0)) - EVT_CALL(PlayerJump1, -130, 0, 1300, 250) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump0, NPC_PARTNER, -150, 0, 1300, 250) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Peach, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump0, NPC_Peach, -100, 0, 1300, 250) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Twink, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump0, NPC_Twink, -130, 60, 1300, 250) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(NpcOrbitPlayerPos), NPC_Eldstar, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(NpcOrbitPlayerPos), NPC_Mamar, 1, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(NpcOrbitPlayerPos), NPC_Skolar, 2, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(NpcOrbitPlayerPos), NPC_Muskular, 3, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(NpcOrbitPlayerPos), NPC_Misstar, 4, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(NpcOrbitPlayerPos), NPC_Klevar, 5, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(NpcOrbitPlayerPos), NPC_Kalmar, 6, 0) - EVT_END_THREAD - EVT_WAIT(350) - EVT_THREAD - EVT_CALL(LoadPath, 190, EVT_PTR(N(PlayerPath)), ARRAY_COUNT(N(PlayerPath)), EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetPlayerPos, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 100, 20, 190, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, 100) - EVT_SETF(LVar1, -20) - EVT_MULF(LVar1, LVar0) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_ADDF(LVar2, LVar1) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 100, 20, 190, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, 100) - EVT_SETF(LVar1, 30) - EVT_MULF(LVar1, LVar0) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_ADDF(LVar2, LVar1) - EVT_CALL(SetNpcPos, NPC_Peach, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 100, 20, 190, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, 100) - EVT_SETF(LVar1, 60) - EVT_MULF(LVar1, LVar0) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_ADDF(LVar3, LVar1) - EVT_CALL(SetNpcPos, NPC_Twink, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 100, 5, 190, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, 100) - EVT_CALL(SetNpcScale, NPC_PARTNER, LVar0, LVar0, LVar0) - EVT_CALL(SetNpcScale, NPC_Peach, LVar0, LVar0, LVar0) - EVT_CALL(SetNpcScale, NPC_Twink, LVar0, LVar0, LVar0) - EVT_CALL(SetNpcScale, NPC_Eldstar, LVar0, LVar0, LVar0) - EVT_CALL(SetNpcScale, NPC_Mamar, LVar0, LVar0, LVar0) - EVT_CALL(SetNpcScale, NPC_Skolar, LVar0, LVar0, LVar0) - EVT_CALL(SetNpcScale, NPC_Muskular, LVar0, LVar0, LVar0) - EVT_CALL(SetNpcScale, NPC_Misstar, LVar0, LVar0, LVar0) - EVT_CALL(SetNpcScale, NPC_Klevar, LVar0, LVar0, LVar0) - EVT_CALL(SetNpcScale, NPC_Kalmar, LVar0, LVar0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 1000, 50, 190, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, 100) - EVT_CALL(N(SetHaloScale), MV_Unk_01, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(290) - EVT_CALL(GotoMap, EVT_PTR("osr_02"), osr_02_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(PlaySound, SOUND_KPA_LIGHT_RAYS | SOUND_ID_TRIGGER_CHANGE_SOUND) + Call(SetPlayerPos, -130, 200, 1300) + Call(InterpPlayerYaw, 90, 0) + Call(SetNpcPos, NPC_PARTNER, -150, 200, 1300) + Call(SetNpcYaw, NPC_PARTNER, 90) + Call(EnableModel, MODEL_o2, FALSE) + Call(EnableGroup, MODEL_kumo, FALSE) + Call(EnableModel, MODEL_nagare, FALSE) + Call(TranslateGroup, MODEL_castle, 0, -2500, 0) + Call(ScaleGroup, MODEL_castle, Float(0.4), Float(0.4), Float(0.4)) + PlayEffect(EFFECT_ENDING_DECALS, 2, 0, 35, 70, Float(7.0), MV_BubbleFXPtr) + Call(N(SetHaloAlpha), MV_BubbleFXPtr, 128) + ChildThread + PlayEffect(EFFECT_ENDING_DECALS, 2, 0, 0, 0, Float(10.0), MV_Unk_01) + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 12) + Add(LVar2, 60) + Call(N(SetHaloPos), MV_Unk_01, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndChildThread + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetCamPitch, CAM_DEFAULT, Float(0.0), Float(0.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + SetF(LVar0, -2250) + Loop(1500) + Call(TranslateModel, MODEL_o3, 0, LVar0, 0) + AddF(LVar0, Float(1.0)) + Wait(1) + EndLoop + EndThread + Thread + Call(SetPlayerJumpscale, Float(0.0)) + Call(PlayerJump1, -130, 0, 1300, 250) + EndThread + Thread + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.0)) + Call(NpcJump0, NPC_PARTNER, -150, 0, 1300, 250) + EndThread + Thread + Call(SetNpcJumpscale, NPC_Peach, Float(0.0)) + Call(NpcJump0, NPC_Peach, -100, 0, 1300, 250) + EndThread + Thread + Call(SetNpcJumpscale, NPC_Twink, Float(0.0)) + Call(NpcJump0, NPC_Twink, -130, 60, 1300, 250) + EndThread + Thread + Call(N(NpcOrbitPlayerPos), NPC_Eldstar, 0, 0) + EndThread + Thread + Call(N(NpcOrbitPlayerPos), NPC_Mamar, 1, 0) + EndThread + Thread + Call(N(NpcOrbitPlayerPos), NPC_Skolar, 2, 0) + EndThread + Thread + Call(N(NpcOrbitPlayerPos), NPC_Muskular, 3, 0) + EndThread + Thread + Call(N(NpcOrbitPlayerPos), NPC_Misstar, 4, 0) + EndThread + Thread + Call(N(NpcOrbitPlayerPos), NPC_Klevar, 5, 0) + EndThread + Thread + Call(N(NpcOrbitPlayerPos), NPC_Kalmar, 6, 0) + EndThread + Wait(350) + Thread + Call(LoadPath, 190, Ref(N(PlayerPath)), ARRAY_COUNT(N(PlayerPath)), EASING_LINEAR) + Label(0) + Call(GetNextPathPos) + Call(SetPlayerPos, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(0) + EndIf + EndThread + Thread + Call(MakeLerp, 100, 20, 190, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + DivF(LVar0, 100) + SetF(LVar1, -20) + MulF(LVar1, LVar0) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + AddF(LVar2, LVar1) + Call(SetNpcPos, NPC_PARTNER, LVar2, LVar3, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(MakeLerp, 100, 20, 190, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + DivF(LVar0, 100) + SetF(LVar1, 30) + MulF(LVar1, LVar0) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + AddF(LVar2, LVar1) + Call(SetNpcPos, NPC_Peach, LVar2, LVar3, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(MakeLerp, 100, 20, 190, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + DivF(LVar0, 100) + SetF(LVar1, 60) + MulF(LVar1, LVar0) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + AddF(LVar3, LVar1) + Call(SetNpcPos, NPC_Twink, LVar2, LVar3, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(MakeLerp, 100, 5, 190, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + DivF(LVar0, 100) + Call(SetNpcScale, NPC_PARTNER, LVar0, LVar0, LVar0) + Call(SetNpcScale, NPC_Peach, LVar0, LVar0, LVar0) + Call(SetNpcScale, NPC_Twink, LVar0, LVar0, LVar0) + Call(SetNpcScale, NPC_Eldstar, LVar0, LVar0, LVar0) + Call(SetNpcScale, NPC_Mamar, LVar0, LVar0, LVar0) + Call(SetNpcScale, NPC_Skolar, LVar0, LVar0, LVar0) + Call(SetNpcScale, NPC_Muskular, LVar0, LVar0, LVar0) + Call(SetNpcScale, NPC_Misstar, LVar0, LVar0, LVar0) + Call(SetNpcScale, NPC_Klevar, LVar0, LVar0, LVar0) + Call(SetNpcScale, NPC_Kalmar, LVar0, LVar0, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(MakeLerp, 1000, 50, 190, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + DivF(LVar0, 100) + Call(N(SetHaloScale), MV_Unk_01, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Wait(290) + Call(GotoMap, Ref("osr_02"), osr_02_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_MakeNpcSparkleTrail) = { - EVT_CHILD_THREAD - EVT_LOOP(30) - EVT_CALL(GetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 3, LVar1, LVar2, LVar3, 20) - EVT_WAIT(6) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_LOOP(30) - EVT_CALL(GetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 4, LVar1, LVar2, LVar3, 40) - EVT_WAIT(8) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_LOOP(0) - EVT_CALL(GetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_IF_GE(LVar3, 1800) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + ChildThread + Loop(30) + Call(GetNpcPos, LVar0, LVar1, LVar2, LVar3) + PlayEffect(EFFECT_SPARKLES, 3, LVar1, LVar2, LVar3, 20) + Wait(6) + EndLoop + EndChildThread + ChildThread + Loop(30) + Call(GetNpcPos, LVar0, LVar1, LVar2, LVar3) + Add(LVar1, 20) + PlayEffect(EFFECT_SPARKLES, 4, LVar1, LVar2, LVar3, 40) + Wait(8) + EndLoop + EndChildThread + Loop(0) + Call(GetNpcPos, LVar0, LVar1, LVar2, LVar3) + IfGe(LVar3, 1800) + BreakLoop + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_Scene_SpiritsFlyingAway) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetPlayerPos, NPC_DISPOSE_LOCATION) - EVT_CALL(EnableModel, MODEL_o2, FALSE) - EVT_CALL(EnableModel, MODEL_nagare, FALSE) - EVT_CALL(TranslateGroup, MODEL_castle, 0, -2500, 0) - EVT_CALL(ScaleGroup, MODEL_castle, EVT_FLOAT(0.4), EVT_FLOAT(0.4), EVT_FLOAT(0.4)) - EVT_PLAY_EFFECT(EFFECT_ENDING_DECALS, 2, 0, 35, 70, EVT_FLOAT(7.0), LVarA) - EVT_CALL(N(SetHaloAlpha), LVarA, 128) - EVT_CALL(EnableTexPanning, MODEL_k2, TRUE) - EVT_CALL(EnableTexPanning, MODEL_k7, TRUE) - EVT_CALL(EnableTexPanning, MODEL_k1, TRUE) - EVT_CALL(EnableTexPanning, MODEL_k5, TRUE) - EVT_CALL(EnableTexPanning, MODEL_k9, TRUE) - EVT_CALL(EnableTexPanning, MODEL_k12, TRUE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_SET(LVar0, NPC_Eldstar) - EVT_EXEC(N(EVS_MakeNpcSparkleTrail)) - EVT_CALL(LoadPath, 75, EVT_PTR(N(EldstarPath)), ARRAY_COUNT(N(EldstarPath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Eldstar, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(50) - EVT_SET(LVar0, NPC_Misstar) - EVT_EXEC(N(EVS_MakeNpcSparkleTrail)) - EVT_CALL(LoadPath, 75, EVT_PTR(N(MisstarPath)), ARRAY_COUNT(N(MisstarPath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Misstar, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(100) - EVT_SET(LVar0, NPC_Skolar) - EVT_EXEC(N(EVS_MakeNpcSparkleTrail)) - EVT_CALL(LoadPath, 75, EVT_PTR(N(SkolarPath)), ARRAY_COUNT(N(SkolarPath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Skolar, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(150) - EVT_SET(LVar0, NPC_Mamar) - EVT_EXEC(N(EVS_MakeNpcSparkleTrail)) - EVT_CALL(LoadPath, 75, EVT_PTR(N(MamarPath)), ARRAY_COUNT(N(MamarPath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Mamar, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(200) - EVT_SET(LVar0, NPC_Kalmar) - EVT_EXEC(N(EVS_MakeNpcSparkleTrail)) - EVT_CALL(LoadPath, 75, EVT_PTR(N(KalmarPath)), ARRAY_COUNT(N(KalmarPath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Kalmar, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(250) - EVT_SET(LVar0, NPC_Muskular) - EVT_EXEC(N(EVS_MakeNpcSparkleTrail)) - EVT_CALL(LoadPath, 75, EVT_PTR(N(MuskularPath)), ARRAY_COUNT(N(MuskularPath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Muskular, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(300) - EVT_SET(LVar0, NPC_Klevar) - EVT_EXEC(N(EVS_MakeNpcSparkleTrail)) - EVT_CALL(LoadPath, 75, EVT_PTR(N(KlevarPath)), ARRAY_COUNT(N(KlevarPath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Klevar, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(450) - EVT_SET(LVar0, NPC_Twink) - EVT_EXEC(N(EVS_MakeNpcSparkleTrail)) - EVT_CALL(LoadPath, 75, EVT_PTR(N(TwinkPath)), ARRAY_COUNT(N(TwinkPath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Twink, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_CALL(InterpNpcYaw, NPC_Twink, 270, 0) - EVT_CALL(SetNpcAnimation, NPC_Twink, ANIM_Twink_Back) - EVT_WAIT(50) - EVT_CALL(InterpNpcYaw, NPC_Twink, 90, 0) - EVT_CALL(SetNpcAnimation, NPC_Twink, ANIM_Twink_Idle) - EVT_WAIT(10) - EVT_CALL(NpcFlyTo, NPC_Twink, 100, 60, 1800, 20, -10, EASING_LINEAR) - EVT_END_THREAD - EVT_THREAD - EVT_SETF(LVar0, -2250) - EVT_LOOP(1500) - EVT_CALL(TranslateModel, MODEL_o3, 0, LVar0, 0) - EVT_ADDF(LVar0, EVT_FLOAT(1.5)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_SETF(LVar0, -2700) - EVT_LOOP(1200) - EVT_CALL(TranslateGroup, MODEL_kumo, 0, LVar0, 0) - EVT_ADDF(LVar0, EVT_FLOAT(2.5)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(840) - EVT_CALL(FadeOutMusic, 0, 3000) - EVT_END_THREAD - EVT_WAIT(800) - EVT_CALL(N(FadeScreenToWhite)) - EVT_WAIT(90) - EVT_CALL(N(ClearCurrentPartner)) - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_20"), kmr_20_ENTRY_2, TRANSITION_OUTRO_END_SCENE) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetPlayerPos, NPC_DISPOSE_LOCATION) + Call(EnableModel, MODEL_o2, FALSE) + Call(EnableModel, MODEL_nagare, FALSE) + Call(TranslateGroup, MODEL_castle, 0, -2500, 0) + Call(ScaleGroup, MODEL_castle, Float(0.4), Float(0.4), Float(0.4)) + PlayEffect(EFFECT_ENDING_DECALS, 2, 0, 35, 70, Float(7.0), LVarA) + Call(N(SetHaloAlpha), LVarA, 128) + Call(EnableTexPanning, MODEL_k2, TRUE) + Call(EnableTexPanning, MODEL_k7, TRUE) + Call(EnableTexPanning, MODEL_k1, TRUE) + Call(EnableTexPanning, MODEL_k5, TRUE) + Call(EnableTexPanning, MODEL_k9, TRUE) + Call(EnableTexPanning, MODEL_k12, TRUE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Set(LVar0, NPC_Eldstar) + Exec(N(EVS_MakeNpcSparkleTrail)) + Call(LoadPath, 75, Ref(N(EldstarPath)), ARRAY_COUNT(N(EldstarPath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Eldstar, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Wait(50) + Set(LVar0, NPC_Misstar) + Exec(N(EVS_MakeNpcSparkleTrail)) + Call(LoadPath, 75, Ref(N(MisstarPath)), ARRAY_COUNT(N(MisstarPath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Misstar, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Wait(100) + Set(LVar0, NPC_Skolar) + Exec(N(EVS_MakeNpcSparkleTrail)) + Call(LoadPath, 75, Ref(N(SkolarPath)), ARRAY_COUNT(N(SkolarPath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Skolar, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Wait(150) + Set(LVar0, NPC_Mamar) + Exec(N(EVS_MakeNpcSparkleTrail)) + Call(LoadPath, 75, Ref(N(MamarPath)), ARRAY_COUNT(N(MamarPath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Mamar, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Wait(200) + Set(LVar0, NPC_Kalmar) + Exec(N(EVS_MakeNpcSparkleTrail)) + Call(LoadPath, 75, Ref(N(KalmarPath)), ARRAY_COUNT(N(KalmarPath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Kalmar, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Wait(250) + Set(LVar0, NPC_Muskular) + Exec(N(EVS_MakeNpcSparkleTrail)) + Call(LoadPath, 75, Ref(N(MuskularPath)), ARRAY_COUNT(N(MuskularPath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Muskular, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Wait(300) + Set(LVar0, NPC_Klevar) + Exec(N(EVS_MakeNpcSparkleTrail)) + Call(LoadPath, 75, Ref(N(KlevarPath)), ARRAY_COUNT(N(KlevarPath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Klevar, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Wait(450) + Set(LVar0, NPC_Twink) + Exec(N(EVS_MakeNpcSparkleTrail)) + Call(LoadPath, 75, Ref(N(TwinkPath)), ARRAY_COUNT(N(TwinkPath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Twink, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Wait(20) + Call(InterpNpcYaw, NPC_Twink, 270, 0) + Call(SetNpcAnimation, NPC_Twink, ANIM_Twink_Back) + Wait(50) + Call(InterpNpcYaw, NPC_Twink, 90, 0) + Call(SetNpcAnimation, NPC_Twink, ANIM_Twink_Idle) + Wait(10) + Call(NpcFlyTo, NPC_Twink, 100, 60, 1800, 20, -10, EASING_LINEAR) + EndThread + Thread + SetF(LVar0, -2250) + Loop(1500) + Call(TranslateModel, MODEL_o3, 0, LVar0, 0) + AddF(LVar0, Float(1.5)) + Wait(1) + EndLoop + EndThread + Thread + SetF(LVar0, -2700) + Loop(1200) + Call(TranslateGroup, MODEL_kumo, 0, LVar0, 0) + AddF(LVar0, Float(2.5)) + Wait(1) + EndLoop + EndThread + Thread + Wait(840) + Call(FadeOutMusic, 0, 3000) + EndThread + Wait(800) + Call(N(FadeScreenToWhite)) + Wait(90) + Call(N(ClearCurrentPartner)) + Call(GotoMapSpecial, Ref("kmr_20"), kmr_20_ENTRY_2, TRANSITION_OUTRO_END_SCENE) + Wait(100) + Return + End }; diff --git a/src/world/area_hos/hos_20/hos_20_1_main.c b/src/world/area_hos/hos_20/hos_20_1_main.c index 751698b1b41..0160ac28ccd 100644 --- a/src/world/area_hos/hos_20/hos_20_1_main.c +++ b/src/world/area_hos/hos_20/hos_20_1_main.c @@ -3,63 +3,63 @@ #include "world/common/atomic/TexturePan.inc.c" EvtScript N(EVS_TexPan_MotionLines) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, hos_20_ENTRY_2) - EVT_CALL(RotateModel, MODEL_h1, 180, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_h2, 180, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_h3, 180, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_h4, 180, 0, 0, 1) - EVT_END_IF - EVT_CALL(EnableTexPanning, MODEL_h1, TRUE) - EVT_CALL(EnableTexPanning, MODEL_h2, TRUE) - EVT_CALL(EnableTexPanning, MODEL_h3, TRUE) - EVT_CALL(EnableTexPanning, MODEL_h4, TRUE) - EVT_THREAD + SetGroup(EVT_GROUP_00) + Call(GetEntryID, LVar0) + IfEq(LVar0, hos_20_ENTRY_2) + Call(RotateModel, MODEL_h1, 180, 0, 0, 1) + Call(RotateModel, MODEL_h2, 180, 0, 0, 1) + Call(RotateModel, MODEL_h3, 180, 0, 0, 1) + Call(RotateModel, MODEL_h4, 180, 0, 0, 1) + EndIf + Call(EnableTexPanning, MODEL_h1, TRUE) + Call(EnableTexPanning, MODEL_h2, TRUE) + Call(EnableTexPanning, MODEL_h3, TRUE) + Call(EnableTexPanning, MODEL_h4, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_C) TEX_PAN_PARAMS_STEP(-2048,-2048, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_B) TEX_PAN_PARAMS_STEP(-6144, 0, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_D) TEX_PAN_PARAMS_STEP( 0,-5120, 0, 0) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_A) TEX_PAN_PARAMS_STEP( 1024,-3072, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; EvtScript N(EVS_Main) = { - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_EXEC(N(EVS_TexPan_MotionLines)) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(hos_20_ENTRY_0) - EVT_EXEC(N(EVS_Starship_Flight1)) - EVT_CASE_EQ(hos_20_ENTRY_1) - EVT_EXEC(N(EVS_Starship_Flight2)) - EVT_CASE_EQ(hos_20_ENTRY_2) - EVT_EXEC(N(EVS_Starship_Return)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Exec(N(EVS_TexPan_MotionLines)) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(hos_20_ENTRY_0) + Exec(N(EVS_Starship_Flight1)) + CaseEq(hos_20_ENTRY_1) + Exec(N(EVS_Starship_Flight2)) + CaseEq(hos_20_ENTRY_2) + Exec(N(EVS_Starship_Return)) + EndSwitch + Return + End }; diff --git a/src/world/area_hos/hos_20/hos_20_2_starship.c b/src/world/area_hos/hos_20/hos_20_2_starship.c index 4932e6b3509..6736e5729c9 100644 --- a/src/world/area_hos/hos_20/hos_20_2_starship.c +++ b/src/world/area_hos/hos_20/hos_20_2_starship.c @@ -12,219 +12,219 @@ API_CALLABLE(N(CheckForSkipInput)) { } EvtScript N(EVS_AnimateStarship) = { - EVT_THREAD - EVT_SET(LVar4, 185) - EVT_SET(LVar5, 50) - EVT_LOOP(0) - EVT_SET(LVar3, LVar4) - EVT_SET(LVar4, LVar5) - EVT_SET(LVar5, LVar3) - EVT_CALL(MakeLerp, LVar3, LVar4, 30, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, 10) - EVT_CALL(SetCamPitch, CAM_DEFAULT, LVar0, EVT_FLOAT(-3.0)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_END_THREAD - EVT_SET(LVar4, -20) - EVT_SET(LVar5, 80) - EVT_CALL(GetEntryID, LVar8) - EVT_LOOP(0) - EVT_SET(LVar3, LVar4) - EVT_SET(LVar4, LVar5) - EVT_SET(LVar5, LVar3) - EVT_CALL(MakeLerp, LVar3, LVar4, 30, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(0.1)) - EVT_CALL(TranslateGroup, MODEL_ry, MV_Starship_PosX, LVar2, 0) - EVT_CALL(RotateGroup, MODEL_ry, MV_Starship_Yaw, 0, 1, 0) - EVT_CALL(GetModelCenter, MODEL_ry3) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_NE(LVar8, hos_20_ENTRY_2) - EVT_ADD(LVar0, -10) - EVT_ELSE - EVT_ADD(LVar0, 10) - EVT_END_IF - EVT_ADD(LVar2, 5) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Thread + Set(LVar4, 185) + Set(LVar5, 50) + Loop(0) + Set(LVar3, LVar4) + Set(LVar4, LVar5) + Set(LVar5, LVar3) + Call(MakeLerp, LVar3, LVar4, 30, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + DivF(LVar0, 10) + Call(SetCamPitch, CAM_DEFAULT, LVar0, Float(-3.0)) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + EndThread + Set(LVar4, -20) + Set(LVar5, 80) + Call(GetEntryID, LVar8) + Loop(0) + Set(LVar3, LVar4) + Set(LVar4, LVar5) + Set(LVar5, LVar3) + Call(MakeLerp, LVar3, LVar4, 30, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, LVar0) + MulF(LVar2, Float(0.1)) + Call(TranslateGroup, MODEL_ry, MV_Starship_PosX, LVar2, 0) + Call(RotateGroup, MODEL_ry, MV_Starship_Yaw, 0, 1, 0) + Call(GetModelCenter, MODEL_ry3) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + IfNe(LVar8, hos_20_ENTRY_2) + Add(LVar0, -10) + Else + Add(LVar0, 10) + EndIf + Add(LVar2, 5) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_Starship_Flight1) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(InterpPlayerYaw, 135, 0) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 90) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.5), EVT_FLOAT(-3.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_SET(MV_Starship_PosX, -300) - EVT_SET(MV_Starship_Yaw, 0) - EVT_EXEC(N(EVS_AnimateStarship)) - EVT_WAIT(1) - EVT_CALL(PlaySound, SOUND_STARSHIP_ENGINE_LOOP) - EVT_IF_LT(GB_StoryProgress, STORY_UNUSED_0000005D) - EVT_CALL(MakeLerp, -300, 0, 120, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(MV_Starship_PosX, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(100) - EVT_CALL(PlaySound, SOUND_STARSHIP_ENGINE_LOOP | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_CALL(GotoMap, EVT_PTR("hos_00"), hos_00_ENTRY_3) - EVT_ELSE - EVT_THREAD - EVT_CALL(MakeLerp, -300, 0, 120, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(MV_Starship_PosX, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(75) - EVT_CALL(PlaySound, SOUND_STARSHIP_ENGINE_LOOP | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_CALL(PlaySound, SOUND_STARSHIP_BOOST) - EVT_CALL(MakeLerp, 0, 300, 60, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(MV_Starship_PosX, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_END_THREAD - EVT_WAIT(60) - EVT_LOOP(215) - EVT_WAIT(1) - EVT_CALL(N(CheckForSkipInput)) - EVT_IF_EQ(LVar8, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySound, SOUND_STARSHIP_ENGINE_LOOP | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_CALL(GotoMap, EVT_PTR("kpa_60"), kpa_60_ENTRY_4) - EVT_END_IF - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(InterpPlayerYaw, 135, 0) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcYaw, NPC_PARTNER, 90) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetCamPitch, CAM_DEFAULT, Float(18.5), Float(-3.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Set(MV_Starship_PosX, -300) + Set(MV_Starship_Yaw, 0) + Exec(N(EVS_AnimateStarship)) + Wait(1) + Call(PlaySound, SOUND_STARSHIP_ENGINE_LOOP) + IfLt(GB_StoryProgress, STORY_UNUSED_0000005D) + Call(MakeLerp, -300, 0, 120, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Set(MV_Starship_PosX, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(100) + Call(PlaySound, SOUND_STARSHIP_ENGINE_LOOP | SOUND_ID_TRIGGER_CHANGE_SOUND) + Call(GotoMap, Ref("hos_00"), hos_00_ENTRY_3) + Else + Thread + Call(MakeLerp, -300, 0, 120, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Set(MV_Starship_PosX, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(75) + Call(PlaySound, SOUND_STARSHIP_ENGINE_LOOP | SOUND_ID_TRIGGER_CHANGE_SOUND) + Call(PlaySound, SOUND_STARSHIP_BOOST) + Call(MakeLerp, 0, 300, 60, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Set(MV_Starship_PosX, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(20) + EndThread + Wait(60) + Loop(215) + Wait(1) + Call(N(CheckForSkipInput)) + IfEq(LVar8, TRUE) + BreakLoop + EndIf + EndLoop + Call(PlaySound, SOUND_STARSHIP_ENGINE_LOOP | SOUND_ID_TRIGGER_CHANGE_SOUND) + Call(GotoMap, Ref("kpa_60"), kpa_60_ENTRY_4) + EndIf + Wait(100) + Return + End }; EvtScript N(EVS_Starship_Flight2) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(InterpPlayerYaw, 135, 0) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 90) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.5), EVT_FLOAT(-3.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(PlaySound, SOUND_STARSHIP_ENGINE_LOOP) - EVT_SET(MV_Starship_PosX, 0) - EVT_SET(MV_Starship_Yaw, 0) - EVT_EXEC(N(EVS_AnimateStarship)) - EVT_WAIT(100) - EVT_CALL(PlaySound, SOUND_STARSHIP_ENGINE_LOOP | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_CALL(PlaySound, SOUND_STARSHIP_BOOST) - EVT_CALL(MakeLerp, 0, 300, 60, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(MV_Starship_PosX, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_CALL(GotoMap, EVT_PTR("osr_03"), osr_03_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(InterpPlayerYaw, 135, 0) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcYaw, NPC_PARTNER, 90) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetCamPitch, CAM_DEFAULT, Float(18.5), Float(-3.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(PlaySound, SOUND_STARSHIP_ENGINE_LOOP) + Set(MV_Starship_PosX, 0) + Set(MV_Starship_Yaw, 0) + Exec(N(EVS_AnimateStarship)) + Wait(100) + Call(PlaySound, SOUND_STARSHIP_ENGINE_LOOP | SOUND_ID_TRIGGER_CHANGE_SOUND) + Call(PlaySound, SOUND_STARSHIP_BOOST) + Call(MakeLerp, 0, 300, 60, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Set(MV_Starship_PosX, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(20) + Call(GotoMap, Ref("osr_03"), osr_03_ENTRY_3) + Wait(100) + Return + End }; EvtScript N(EVS_Starship_Return) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(InterpPlayerYaw, 225, 0) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 270) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.5), EVT_FLOAT(-3.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_SET(MV_Starship_PosX, 300) - EVT_SET(MV_Starship_Yaw, 180) - EVT_EXEC(N(EVS_AnimateStarship)) - EVT_WAIT(2) - EVT_CALL(PlaySound, SOUND_STARSHIP_ENGINE_LOOP) - EVT_THREAD - EVT_CALL(MakeLerp, 300, 0, 120, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(MV_Starship_PosX, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(75) - EVT_CALL(PlaySound, SOUND_STARSHIP_ENGINE_LOOP | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_CALL(PlaySound, SOUND_STARSHIP_BOOST) - EVT_CALL(MakeLerp, 0, -300, 60, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(MV_Starship_PosX, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_END_THREAD - EVT_WAIT(60) - EVT_LOOP(215) - EVT_WAIT(1) - EVT_CALL(N(CheckForSkipInput)) - EVT_IF_EQ(LVar8, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySound, SOUND_STARSHIP_ENGINE_LOOP | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_CALL(GotoMap, EVT_PTR("hos_05"), hos_05_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(InterpPlayerYaw, 225, 0) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcYaw, NPC_PARTNER, 270) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetCamPitch, CAM_DEFAULT, Float(18.5), Float(-3.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Set(MV_Starship_PosX, 300) + Set(MV_Starship_Yaw, 180) + Exec(N(EVS_AnimateStarship)) + Wait(2) + Call(PlaySound, SOUND_STARSHIP_ENGINE_LOOP) + Thread + Call(MakeLerp, 300, 0, 120, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Set(MV_Starship_PosX, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(75) + Call(PlaySound, SOUND_STARSHIP_ENGINE_LOOP | SOUND_ID_TRIGGER_CHANGE_SOUND) + Call(PlaySound, SOUND_STARSHIP_BOOST) + Call(MakeLerp, 0, -300, 60, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Set(MV_Starship_PosX, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(20) + EndThread + Wait(60) + Loop(215) + Wait(1) + Call(N(CheckForSkipInput)) + IfEq(LVar8, TRUE) + BreakLoop + EndIf + EndLoop + Call(PlaySound, SOUND_STARSHIP_ENGINE_LOOP | SOUND_ID_TRIGGER_CHANGE_SOUND) + Call(GotoMap, Ref("hos_05"), hos_05_ENTRY_1) + Wait(100) + Return + End }; diff --git a/src/world/area_isk/isk_01/isk_01_1_music.c b/src/world/area_isk/isk_01/isk_01_1_music.c index 503a7e7f0ed..c849dbb0fa7 100644 --- a/src/world/area_isk/isk_01/isk_01_1_music.c +++ b/src/world/area_isk/isk_01/isk_01_1_music.c @@ -1,35 +1,35 @@ #include "isk_01.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_EQ(GF_ISK01_FirstWarning, FALSE) - EVT_THREAD - EVT_CALL(FadeInMusic, 1, SONG_TUTANKOOPA_WARNING, 0, 2000, 0, 127) - EVT_CALL(FadeOutMusic, 0, 2000) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(20) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH2_00DD, 160, 40) - EVT_SET(GF_ISK01_FirstWarning, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_CALL(FadeInMusic, 0, SONG_DRY_DRY_RUINS, 0, 2000, 0, 127) - EVT_CALL(FadeOutMusic, 1, 2000) - EVT_END_THREAD - EVT_RETURN - EVT_END_IF + IfEq(GF_ISK01_FirstWarning, FALSE) + Thread + Call(FadeInMusic, 1, SONG_TUTANKOOPA_WARNING, 0, 2000, 0, 127) + Call(FadeOutMusic, 0, 2000) + Call(DisablePlayerInput, TRUE) + Wait(20) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(ShowMessageAtScreenPos, MSG_CH2_00DD, 160, 40) + Set(GF_ISK01_FirstWarning, TRUE) + Call(DisablePlayerInput, FALSE) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Call(FadeInMusic, 0, SONG_DRY_DRY_RUINS, 0, 2000, 0, 127) + Call(FadeOutMusic, 1, 2000) + EndThread + Return + EndIf #if VERSION_PAL - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) #else - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_CASE_LT(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) - EVT_CASE_GE(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_END_SWITCH + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + CaseLt(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) + CaseGe(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + EndSwitch #endif - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/area_isk/isk_01/isk_01_2_main.c b/src/world/area_isk/isk_01/isk_01_2_main.c index 9a88873ae54..ba0c4e2cc88 100644 --- a/src/world/area_isk/isk_01/isk_01_2_main.c +++ b/src/world/area_isk/isk_01/isk_01_2_main.c @@ -4,35 +4,35 @@ EvtScript N(D_80240220_978360) = EVT_EXIT_WALK(40, isk_01_ENTRY_0, "sbk_02", sbk EvtScript N(D_8024027C_9783BC) = EVT_EXIT_WALK(40, isk_01_ENTRY_1, "isk_02", isk_02_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(D_80240220_978360)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(D_8024027C_9783BC)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(D_80240220_978360)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(D_8024027C_9783BC)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_SET(GF_MAP_DryDryRuins, TRUE) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_SetupHaze)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Set(GF_MAP_DryDryRuins, TRUE) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_SetupHaze)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_isk/isk_01/isk_01_3_haze.c b/src/world/area_isk/isk_01/isk_01_3_haze.c index 1c37c93a3a1..076943bb63c 100644 --- a/src/world/area_isk/isk_01/isk_01_3_haze.c +++ b/src/world/area_isk/isk_01/isk_01_3_haze.c @@ -6,19 +6,19 @@ Gfx N(HazePreGfx)[] = { }; EvtScript N(EVS_SetupHaze) = { - EVT_CALL(SetTexPanner, MODEL_o99, TEX_PANNER_2) - EVT_CALL(EnableTexPanning, MODEL_o99, TRUE) - EVT_SET(LVar0, 0) - EVT_CALL(SetCustomGfx, 0, EVT_PTR(N(HazePreGfx)), NULL) - EVT_CALL(SetModelFlags, MODEL_o99, MODEL_FLAG_USES_CUSTOM_GFX, TRUE) - EVT_LABEL(0) - EVT_ADD(LVar0, 70) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar0, 0) - EVT_IF_GT(LVar0, 0x4000) - EVT_ADD(LVar0, -0x4000) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(SetTexPanner, MODEL_o99, TEX_PANNER_2) + Call(EnableTexPanning, MODEL_o99, TRUE) + Set(LVar0, 0) + Call(SetCustomGfx, 0, Ref(N(HazePreGfx)), NULL) + Call(SetModelFlags, MODEL_o99, MODEL_FLAG_USES_CUSTOM_GFX, TRUE) + Label(0) + Add(LVar0, 70) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar0, 0) + IfGt(LVar0, 0x4000) + Add(LVar0, -0x4000) + EndIf + Wait(1) + Goto(0) + Return + End }; diff --git a/src/world/area_isk/isk_01/isk_01_4_entity.c b/src/world/area_isk/isk_01/isk_01_4_entity.c index d8c3ea4f131..f4d4f91bc29 100644 --- a/src/world/area_isk/isk_01/isk_01_4_entity.c +++ b/src/world/area_isk/isk_01/isk_01_4_entity.c @@ -2,7 +2,7 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), -530, 60, 43, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_SavePoint), -530, 60, 43, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_isk/isk_02/isk_02_1_main.c b/src/world/area_isk/isk_02/isk_02_1_main.c index a6f9b150aa0..1407854cf08 100644 --- a/src/world/area_isk/isk_02/isk_02_1_main.c +++ b/src/world/area_isk/isk_02/isk_02_1_main.c @@ -5,35 +5,35 @@ EvtScript N(EVS_ExitWalk_isk_03_0) = EVT_EXIT_WALK(40, isk_02_ENTRY_1, "isk_03", EvtScript N(EVS_ExitWalk_isk_03_1) = EVT_EXIT_WALK(40, isk_02_ENTRY_2, "isk_03", isk_03_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_01_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_03_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_isk_01_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_isk_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_isk_03_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupLock)) - EVT_EXEC(N(EVS_SetupSarcophagi)) + Set(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupLock)) + Exec(N(EVS_SetupSarcophagi)) #if VERSION_PAL - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) #else - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_CASE_LT(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) - EVT_CASE_GE(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_END_SWITCH + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + CaseLt(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) + CaseGe(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + EndSwitch #endif - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_isk/isk_02/isk_02_2_lock.c b/src/world/area_isk/isk_02/isk_02_2_lock.c index e274ecd556f..d536ab060a2 100644 --- a/src/world/area_isk/isk_02/isk_02_2_lock.c +++ b/src/world/area_isk/isk_02/isk_02_2_lock.c @@ -8,47 +8,47 @@ s32 N(KeyList)[] = { }; EvtScript N(EVS_UnlockDoor) = { - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, 272, 60, 486) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_SET(GF_ISK02_UnlockedDoor, TRUE) - EVT_SET(LVar0, MV_EntityID_Padlock) - EVT_CALL(N(RemovePadlock)) - EVT_SET(LVar1, 0) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittne, SOUND_ISK_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 65, 65, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g304, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(CloseChoicePopup) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(ShowKeyChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) + Call(CloseChoicePopup) + Return + EndIf + IfEq(LVar0, -1) + Call(CloseChoicePopup) + Return + EndIf + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, 272, 60, 486) + Call(RemoveKeyItemAt, LVar1) + Set(GF_ISK02_UnlockedDoor, TRUE) + Set(LVar0, MV_EntityID_Padlock) + Call(N(RemovePadlock)) + Set(LVar1, 0) + Wait(5) + Call(PlaySoundAtCollider, COLLIDER_deilittne, SOUND_ISK_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 65, 65, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g304, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) + Call(CloseChoicePopup) + Unbind + Return + End }; EvtScript N(EVS_SetupLock) = { - EVT_IF_EQ(GF_ISK02_UnlockedDoor, FALSE) - EVT_CALL(MakeTransformGroup, MODEL_g304) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_UnlockDoor)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(KeyList)), 0, 1) - EVT_ELSE - EVT_CALL(EnableGroup, MODEL_g304, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_SURFACE_TYPE_MASK | COLLIDER_FLAG_SAFE_FLOOR | COLLIDER_FLAG_IGNORE_SHELL | COLLIDER_FLAG_IGNORE_PLAYER | COLLIDER_FLAG_DOCK_WALL | 0x7FF47E00) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_ISK02_UnlockedDoor, FALSE) + Call(MakeTransformGroup, MODEL_g304) + BindPadlock(Ref(N(EVS_UnlockDoor)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), Ref(N(KeyList)), 0, 1) + Else + Call(EnableGroup, MODEL_g304, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_SURFACE_TYPE_MASK | COLLIDER_FLAG_SAFE_FLOOR | COLLIDER_FLAG_IGNORE_SHELL | COLLIDER_FLAG_IGNORE_PLAYER | COLLIDER_FLAG_DOCK_WALL | 0x7FF47E00) + EndIf + Return + End }; diff --git a/src/world/area_isk/isk_02/isk_02_3_ambush.c b/src/world/area_isk/isk_02/isk_02_3_ambush.c index 99d4432e6b9..94481461332 100644 --- a/src/world/area_isk/isk_02/isk_02_3_ambush.c +++ b/src/world/area_isk/isk_02/isk_02_3_ambush.c @@ -18,108 +18,108 @@ API_CALLABLE(N(AwaitPlayerMummyAmbush)) { } EvtScript N(EVS_SetupSarcophagi) = { - EVT_SET(AF_ISK02_OpeningSarcophagus1, FALSE) - EVT_SET(AF_ISK02_OpeningSarcophagus2, FALSE) - EVT_SET(AF_ISK02_OpeningSarcophagus3, FALSE) - EVT_EXEC(N(EVS_ManageSarcophagus1)) - EVT_EXEC(N(EVS_ManageSarcophagus2)) - EVT_EXEC(N(EVS_ManageSarcophagus3)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_h1o, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_h2o, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_h3o, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Set(AF_ISK02_OpeningSarcophagus1, FALSE) + Set(AF_ISK02_OpeningSarcophagus2, FALSE) + Set(AF_ISK02_OpeningSarcophagus3, FALSE) + Exec(N(EVS_ManageSarcophagus1)) + Exec(N(EVS_ManageSarcophagus2)) + Exec(N(EVS_ManageSarcophagus3)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_h1o, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_h2o, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_h3o, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_OpenSarcophagus) = { - EVT_IF_EQ(LVar0, 0) - EVT_CALL(PlaySoundAtModel, LVar3, SOUND_SARCOPHAGUS_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(TranslateModel, LVar3, 0, 0, 13) - EVT_WAIT(3) - EVT_CALL(MakeLerp, 0, 35, 9, EASING_COS_IN_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_SET(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(1.1)) - EVT_CALL(TranslateModel, LVar3, LVar2, 0, 13) - EVT_CALL(RotateModel, LVar3, LVar0, 0, 1, 0) - EVT_ADD(LVar0, 1) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(10) - EVT_END_IF - EVT_WAIT(3) - EVT_ELSE - EVT_CALL(TranslateModel, LVar3, EVT_FLOAT(38.5), 0, 13) - EVT_CALL(RotateModel, LVar3, 35, 0, 1, 0) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(LVar0, 0) + Call(PlaySoundAtModel, LVar3, SOUND_SARCOPHAGUS_OPEN, SOUND_SPACE_DEFAULT) + Call(TranslateModel, LVar3, 0, 0, 13) + Wait(3) + Call(MakeLerp, 0, 35, 9, EASING_COS_IN_OUT) + Label(10) + Call(UpdateLerp) + Set(LVar2, LVar0) + MulF(LVar2, Float(1.1)) + Call(TranslateModel, LVar3, LVar2, 0, 13) + Call(RotateModel, LVar3, LVar0, 0, 1, 0) + Add(LVar0, 1) + Wait(1) + IfNe(LVar1, 0) + Goto(10) + EndIf + Wait(3) + Else + Call(TranslateModel, LVar3, Float(38.5), 0, 13) + Call(RotateModel, LVar3, 35, 0, 1, 0) + EndIf + Return + End }; EvtScript N(EVS_ManageSarcophagus1) = { - EVT_IF_EQ(AF_ISK02_Sarcophagus1Opened, FALSE) - EVT_LABEL(5) - EVT_CALL(N(AwaitPlayerMummyAmbush), -210, 580) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(5) - EVT_END_IF - EVT_END_IF - EVT_SET(AF_ISK02_OpeningSarcophagus1, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Pokey_01, NPC_FLAG_INVISIBLE, FALSE) - EVT_SET(LVar0, AF_ISK02_Sarcophagus1Opened) - EVT_SET(LVar3, MODEL_g346) - EVT_EXEC_WAIT(N(EVS_OpenSarcophagus)) - EVT_SET(AF_ISK02_OpeningSarcophagus1, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_h1c, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_h1o, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(AF_ISK02_Sarcophagus1Opened, TRUE) - EVT_RETURN - EVT_END + IfEq(AF_ISK02_Sarcophagus1Opened, FALSE) + Label(5) + Call(N(AwaitPlayerMummyAmbush), -210, 580) + Wait(1) + IfEq(LVar0, 0) + Goto(5) + EndIf + EndIf + Set(AF_ISK02_OpeningSarcophagus1, TRUE) + Call(SetNpcFlagBits, NPC_Pokey_01, NPC_FLAG_INVISIBLE, FALSE) + Set(LVar0, AF_ISK02_Sarcophagus1Opened) + Set(LVar3, MODEL_g346) + ExecWait(N(EVS_OpenSarcophagus)) + Set(AF_ISK02_OpeningSarcophagus1, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_h1c, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_h1o, COLLIDER_FLAGS_UPPER_MASK) + Set(AF_ISK02_Sarcophagus1Opened, TRUE) + Return + End }; EvtScript N(EVS_ManageSarcophagus2) = { - EVT_IF_EQ(AF_ISK02_Sarcophagus2Opened, FALSE) - EVT_LABEL(5) - EVT_CALL(N(AwaitPlayerMummyAmbush), -30, 670) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(5) - EVT_END_IF - EVT_END_IF - EVT_CALL(MakeItemEntity, ITEM_SPIKE_SHIELD, -133, 1, 500, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_ISK02_Item_SpikeShield) - EVT_SET(AF_ISK02_OpeningSarcophagus2, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Pokey_02, NPC_FLAG_INVISIBLE, FALSE) - EVT_SET(LVar0, AF_ISK02_Sarcophagus2Opened) - EVT_SET(LVar3, MODEL_g348) - EVT_EXEC_WAIT(N(EVS_OpenSarcophagus)) - EVT_SET(AF_ISK02_OpeningSarcophagus2, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_h2c, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_h2o, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(AF_ISK02_Sarcophagus2Opened, TRUE) - EVT_RETURN - EVT_END + IfEq(AF_ISK02_Sarcophagus2Opened, FALSE) + Label(5) + Call(N(AwaitPlayerMummyAmbush), -30, 670) + Wait(1) + IfEq(LVar0, 0) + Goto(5) + EndIf + EndIf + Call(MakeItemEntity, ITEM_SPIKE_SHIELD, -133, 1, 500, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_ISK02_Item_SpikeShield) + Set(AF_ISK02_OpeningSarcophagus2, TRUE) + Call(SetNpcFlagBits, NPC_Pokey_02, NPC_FLAG_INVISIBLE, FALSE) + Set(LVar0, AF_ISK02_Sarcophagus2Opened) + Set(LVar3, MODEL_g348) + ExecWait(N(EVS_OpenSarcophagus)) + Set(AF_ISK02_OpeningSarcophagus2, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_h2c, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_h2o, COLLIDER_FLAGS_UPPER_MASK) + Set(AF_ISK02_Sarcophagus2Opened, TRUE) + Return + End }; EvtScript N(EVS_ManageSarcophagus3) = { - EVT_IF_EQ(AF_ISK02_Sarcophagus3Opened, FALSE) - EVT_LABEL(5) - EVT_CALL(N(AwaitPlayerMummyAmbush), 220, 600) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(5) - EVT_END_IF - EVT_END_IF - EVT_SET(AF_ISK02_OpeningSarcophagus3, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Pokey_03, NPC_FLAG_INVISIBLE, FALSE) - EVT_SET(LVar0, AF_ISK02_Sarcophagus3Opened) - EVT_SET(LVar3, MODEL_g350) - EVT_EXEC_WAIT(N(EVS_OpenSarcophagus)) - EVT_SET(AF_ISK02_OpeningSarcophagus3, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_h3c, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_h3o, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(AF_ISK02_Sarcophagus3Opened, TRUE) - EVT_RETURN - EVT_END + IfEq(AF_ISK02_Sarcophagus3Opened, FALSE) + Label(5) + Call(N(AwaitPlayerMummyAmbush), 220, 600) + Wait(1) + IfEq(LVar0, 0) + Goto(5) + EndIf + EndIf + Set(AF_ISK02_OpeningSarcophagus3, TRUE) + Call(SetNpcFlagBits, NPC_Pokey_03, NPC_FLAG_INVISIBLE, FALSE) + Set(LVar0, AF_ISK02_Sarcophagus3Opened) + Set(LVar3, MODEL_g350) + ExecWait(N(EVS_OpenSarcophagus)) + Set(AF_ISK02_OpeningSarcophagus3, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_h3c, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_h3o, COLLIDER_FLAGS_UPPER_MASK) + Set(AF_ISK02_Sarcophagus3Opened, TRUE) + Return + End }; diff --git a/src/world/area_isk/isk_02/isk_02_4_entity.c b/src/world/area_isk/isk_02/isk_02_4_entity.c index d0ff5d76d11..816240fdd1c 100644 --- a/src/world/area_isk/isk_02/isk_02_4_entity.c +++ b/src/world/area_isk/isk_02/isk_02_4_entity.c @@ -2,10 +2,10 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_ISK02_UnlockedDoor, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), 272, 60, 486, 300, MAKE_ENTITY_END) - EVT_SET(MV_EntityID_Padlock, LVar0) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_ISK02_UnlockedDoor, FALSE) + Call(MakeEntity, Ref(Entity_Padlock), 272, 60, 486, 300, MAKE_ENTITY_END) + Set(MV_EntityID_Padlock, LVar0) + EndIf + Return + End }; diff --git a/src/world/area_isk/isk_02/isk_02_5_npc.c b/src/world/area_isk/isk_02/isk_02_5_npc.c index 6daff1d9f86..f4279d7b919 100644 --- a/src/world/area_isk/isk_02/isk_02_5_npc.c +++ b/src/world/area_isk/isk_02/isk_02_5_npc.c @@ -3,81 +3,81 @@ #include "world/common/enemy/PokeyMummy.inc.c" EvtScript N(EVS_NpcIdle_Pokey_01) = { - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 1) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) - EVT_LABEL(1) - EVT_IF_EQ(AF_ISK02_OpeningSarcophagus1, FALSE) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, -315, 455, 10) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_BEGIN_WITH_CHASING, 1) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_PokeyMummy))) - EVT_RETURN - EVT_END + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 1) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) + Label(1) + IfEq(AF_ISK02_OpeningSarcophagus1, FALSE) + Wait(1) + Goto(1) + EndIf + Wait(15) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 0) + Call(NpcMoveTo, NPC_SELF, -315, 455, 10) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_BEGIN_WITH_CHASING, 1) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_PokeyMummy))) + Return + End }; EvtScript N(EVS_NpcIdle_Pokey_02) = { - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 1) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) - EVT_LABEL(1) - EVT_IF_EQ(AF_ISK02_OpeningSarcophagus2, FALSE) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, -145, 535, 10) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_BEGIN_WITH_CHASING, 1) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_PokeyMummy))) - EVT_RETURN - EVT_END + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 1) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) + Label(1) + IfEq(AF_ISK02_OpeningSarcophagus2, FALSE) + Wait(1) + Goto(1) + EndIf + Wait(15) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 0) + Call(NpcMoveTo, NPC_SELF, -145, 535, 10) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_BEGIN_WITH_CHASING, 1) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_PokeyMummy))) + Return + End }; EvtScript N(EVS_NpcIdle_Pokey_03) = { - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 1) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) - EVT_LABEL(1) - EVT_IF_EQ(AF_ISK02_OpeningSarcophagus3, FALSE) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, 50, 550, 10) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_BEGIN_WITH_CHASING, 1) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_PokeyMummy))) - EVT_RETURN - EVT_END + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 1) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) + Label(1) + IfEq(AF_ISK02_OpeningSarcophagus3, FALSE) + Wait(1) + Goto(1) + EndIf + Wait(15) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 0) + Call(NpcMoveTo, NPC_SELF, 50, 550, 10) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_BEGIN_WITH_CHASING, 1) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_PokeyMummy))) + Return + End }; EvtScript N(EVS_NpcInit_Pokey_01) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Pokey_01))) - EVT_CALL(SetOwnerInstigatorValue, 3) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Pokey_01))) + Call(SetOwnerInstigatorValue, 3) + Return + End }; EvtScript N(EVS_NpcInit_Pokey_02) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Pokey_02))) - EVT_CALL(SetOwnerInstigatorValue, 3) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Pokey_02))) + Call(SetOwnerInstigatorValue, 3) + Return + End }; EvtScript N(EVS_NpcInit_Pokey_03) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Pokey_03))) - EVT_CALL(SetOwnerInstigatorValue, 3) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Pokey_03))) + Call(SetOwnerInstigatorValue, 3) + Return + End }; NpcData N(NpcData_Pokey_01) = { diff --git a/src/world/area_isk/isk_03/isk_03_1_main.c b/src/world/area_isk/isk_03/isk_03_1_main.c index 603ccadc83a..6837c16a484 100644 --- a/src/world/area_isk/isk_03/isk_03_1_main.c +++ b/src/world/area_isk/isk_03/isk_03_1_main.c @@ -5,41 +5,41 @@ EvtScript N(EVS_ExitWalk_isk_02_2) = EVT_EXIT_WALK(40, isk_03_ENTRY_1, "isk_02", EvtScript N(EVS_ExitWalk_isk_04_0) = EVT_EXIT_WALK(40, isk_03_ENTRY_2, "isk_04", isk_04_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_02_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_02_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_isk_02_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_isk_02_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_isk_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) - EVT_CALL(SetSpriteShading, SHADING_ISK_03) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_IF_LT(GB_StoryProgress, STORY_CH2_DRAINED_FIRST_SAND_ROOM) - EVT_CALL(SetZoneEnabled, ZONE_o2023, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_03, FALSE) - EVT_ELSE - EVT_CALL(SetZoneEnabled, ZONE_o2023, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_o2008, FALSE) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupSand)) - EVT_EXEC(N(EVS_SetupSwitch)) + Set(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) + Call(SetSpriteShading, SHADING_ISK_03) + SetUP_CAMERA_ALT_NO_LEAD() + IfLt(GB_StoryProgress, STORY_CH2_DRAINED_FIRST_SAND_ROOM) + Call(SetZoneEnabled, ZONE_o2023, FALSE) + Call(SetZoneEnabled, ZONE_03, FALSE) + Else + Call(SetZoneEnabled, ZONE_o2023, FALSE) + Call(SetZoneEnabled, ZONE_o2008, FALSE) + EndIf + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupSand)) + Exec(N(EVS_SetupSwitch)) #if VERSION_PAL - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) #else - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_CASE_LT(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) - EVT_CASE_GE(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_END_SWITCH + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + CaseLt(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) + CaseGe(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + EndSwitch #endif - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_isk/isk_03/isk_03_2_sand.c b/src/world/area_isk/isk_03/isk_03_2_sand.c index 9f6c339bdcf..fcb47fd288f 100644 --- a/src/world/area_isk/isk_03/isk_03_2_sand.c +++ b/src/world/area_isk/isk_03/isk_03_2_sand.c @@ -1,294 +1,294 @@ #include "isk_03.h" EvtScript N(EVS_TexPan_DrippingSand) = { - EVT_CALL(SetTexPanner, MODEL_o6000, TEX_PANNER_4) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LABEL(10) - EVT_ADD(LVar1, -1000) - EVT_ADD(LVar2, 200) - EVT_CALL(SetTexPanOffset, TEX_PANNER_4, TEX_PANNER_MAIN, 0, LVar1) - EVT_CALL(SetTexPanOffset, TEX_PANNER_4, TEX_PANNER_AUX, LVar2, 0) - EVT_WAIT(1) - EVT_IF_LT(GB_StoryProgress, STORY_CH2_DRAINED_FIRST_SAND_ROOM) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(EnableModel, MODEL_o6000, FALSE) - EVT_RETURN - EVT_END + Call(SetTexPanner, MODEL_o6000, TEX_PANNER_4) + Set(LVar1, 0) + Set(LVar2, 0) + Label(10) + Add(LVar1, -1000) + Add(LVar2, 200) + Call(SetTexPanOffset, TEX_PANNER_4, TEX_PANNER_MAIN, 0, LVar1) + Call(SetTexPanOffset, TEX_PANNER_4, TEX_PANNER_AUX, LVar2, 0) + Wait(1) + IfLt(GB_StoryProgress, STORY_CH2_DRAINED_FIRST_SAND_ROOM) + Goto(10) + EndIf + Call(EnableModel, MODEL_o6000, FALSE) + Return + End }; EvtScript N(EVS_Camera_LookAtDrain) = { - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 454, 35, 285) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 400) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 250, 40) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 566, -50) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(13.6), EVT_FLOAT(-1.5)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 429, 35, 278) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_RETURN - EVT_END + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(UseSettingsFrom, CAM_DEFAULT, 454, 35, 285) + Call(SetCamDistance, CAM_DEFAULT, 400) + Call(SetCamPosA, CAM_DEFAULT, 250, 40) + Call(SetCamPosB, CAM_DEFAULT, 566, -50) + Call(SetCamPitch, CAM_DEFAULT, Float(13.6), Float(-1.5)) + Call(SetPanTarget, CAM_DEFAULT, 429, 35, 278) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Return + End }; EvtScript N(EVS_Camera_LookBelow) = { - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.5)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(3.4), EVT_FLOAT(-5.5)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 429, -153, 278) - EVT_RETURN - EVT_END + Call(SetCamSpeed, CAM_DEFAULT, Float(0.5)) + Call(SetCamPitch, CAM_DEFAULT, Float(3.4), Float(-5.5)) + Call(SetPanTarget, CAM_DEFAULT, 429, -153, 278) + Return + End }; EvtScript N(EVS_Camera_Reset) = { - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 430, 35, 295) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_RETURN - EVT_END + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(UseSettingsFrom, CAM_DEFAULT, 430, 35, 295) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Return + End }; EvtScript N(EVS_TexPan_UpperSand) = { - EVT_CALL(SetTexPanner, MODEL_o1350, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o1351, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o1352, TEX_PANNER_0) - EVT_SET(LVar2, 0) - EVT_CALL(MakeLerp, 0, 500, 60, EASING_QUADRATIC_IN) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_ADD(LVar2, LVar0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, LVar2) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_LABEL(20) - EVT_ADD(LVar2, 500) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, LVar2) - EVT_WAIT(1) - EVT_IF_LT(GB_StoryProgress, STORY_CH2_DRAINED_FIRST_SAND_ROOM) - EVT_GOTO(20) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetTexPanner, MODEL_o1350, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o1351, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o1352, TEX_PANNER_0) + Set(LVar2, 0) + Call(MakeLerp, 0, 500, 60, EASING_QUADRATIC_IN) + Label(10) + Call(UpdateLerp) + Add(LVar2, LVar0) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, LVar2) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Label(20) + Add(LVar2, 500) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, LVar2) + Wait(1) + IfLt(GB_StoryProgress, STORY_CH2_DRAINED_FIRST_SAND_ROOM) + Goto(20) + EndIf + Return + End }; EvtScript N(EVS_TexPan_LowerSand) = { - EVT_CALL(SetTexPanner, MODEL_o1341, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_o1346, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_o1343, TEX_PANNER_3) - EVT_CALL(SetTexPanner, MODEL_o1344, TEX_PANNER_3) - EVT_CALL(SetTexPanner, MODEL_o1345, TEX_PANNER_3) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 0) - EVT_LABEL(10) - EVT_ADD(LVar2, 0x1800) - EVT_ADD(LVar3, -500) - EVT_ADD(LVar4, -100) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, LVar2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, 0, LVar3) - EVT_CALL(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, 0, LVar4) - EVT_WAIT(1) - EVT_IF_LT(GB_StoryProgress, STORY_CH2_DRAINED_FIRST_SAND_ROOM) - EVT_GOTO(10) - EVT_END_IF - EVT_SET(LVar5, 0x1800) - EVT_SET(LVar6, -500) - EVT_SET(LVar7, -100) - EVT_LOOP(10) - EVT_ADD(LVar5, -512) - EVT_ADD(LVar6, 50) - EVT_ADD(LVar7, 10) - EVT_ADD(LVar2, LVar5) - EVT_ADD(LVar3, LVar6) - EVT_ADD(LVar4, LVar7) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, LVar2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, 0, LVar3) - EVT_CALL(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, 0, LVar4) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetTexPanner, MODEL_o1341, TEX_PANNER_1) + Call(SetTexPanner, MODEL_o1346, TEX_PANNER_2) + Call(SetTexPanner, MODEL_o1343, TEX_PANNER_3) + Call(SetTexPanner, MODEL_o1344, TEX_PANNER_3) + Call(SetTexPanner, MODEL_o1345, TEX_PANNER_3) + Set(LVar2, 0) + Set(LVar3, 0) + Set(LVar4, 0) + Label(10) + Add(LVar2, 0x1800) + Add(LVar3, -500) + Add(LVar4, -100) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, LVar2) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, 0, LVar3) + Call(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, 0, LVar4) + Wait(1) + IfLt(GB_StoryProgress, STORY_CH2_DRAINED_FIRST_SAND_ROOM) + Goto(10) + EndIf + Set(LVar5, 0x1800) + Set(LVar6, -500) + Set(LVar7, -100) + Loop(10) + Add(LVar5, -512) + Add(LVar6, 50) + Add(LVar7, 10) + Add(LVar2, LVar5) + Add(LVar3, LVar6) + Add(LVar4, LVar7) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, LVar2) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, 0, LVar3) + Call(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, 0, LVar4) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_RescaleDrainingSand) = { - EVT_CALL(MakeLerp, 0, 100, 60, EASING_QUADRATIC_IN) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(ScaleModel, MODEL_o1351, EVT_FLOAT(1.0), LVar0, EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeLerp, 0, 100, 60, EASING_QUADRATIC_IN) + Label(10) + Call(UpdateLerp) + Call(ScaleModel, MODEL_o1351, Float(1.0), LVar0, Float(1.0)) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Return + End }; EvtScript N(EVS_CollapseSandPile) = { - EVT_CALL(MakeLerp, 0, 50, 10, EASING_QUADRATIC_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, 100) - EVT_SETF(LVar2, 1) - EVT_ADDF(LVar2, LVar0) - EVT_SETF(LVar3, 1) - EVT_SUBF(LVar3, LVar0) - EVT_CALL(ScaleModel, MODEL_o1346, LVar2, LVar3, LVar2) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeLerp, 0, 50, 10, EASING_QUADRATIC_OUT) + Label(10) + Call(UpdateLerp) + DivF(LVar0, 100) + SetF(LVar2, 1) + AddF(LVar2, LVar0) + SetF(LVar3, 1) + SubF(LVar3, LVar0) + Call(ScaleModel, MODEL_o1346, LVar2, LVar3, LVar2) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Return + End }; EvtScript N(EVS_DrainUpperSand) = { - EVT_CALL(MakeLerp, 0, -100, 60, EASING_QUADRATIC_IN) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, 10) - EVT_SETF(LVar2, 0) - EVT_SUBF(LVar2, LVar0) - EVT_CALL(TranslateGroup, MODEL_g206, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o1952, 0, LVar2, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(MakeLerp, -100, -250, 30, EASING_LINEAR) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, 10) - EVT_SETF(LVar2, 0) - EVT_SUBF(LVar2, LVar0) - EVT_CALL(TranslateGroup, MODEL_g206, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o1952, 0, LVar2, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeLerp, 0, -100, 60, EASING_QUADRATIC_IN) + Label(10) + Call(UpdateLerp) + DivF(LVar0, 10) + SetF(LVar2, 0) + SubF(LVar2, LVar0) + Call(TranslateGroup, MODEL_g206, 0, LVar0, 0) + Call(TranslateModel, MODEL_o1952, 0, LVar2, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(MakeLerp, -100, -250, 30, EASING_LINEAR) + Label(20) + Call(UpdateLerp) + DivF(LVar0, 10) + SetF(LVar2, 0) + SubF(LVar2, LVar0) + Call(TranslateGroup, MODEL_g206, 0, LVar0, 0) + Call(TranslateModel, MODEL_o1952, 0, LVar2, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Return + End }; EvtScript N(EVS_FillLowerSand) = { - EVT_CALL(MakeTransformGroup, MODEL_g210) - EVT_CALL(MakeLerp, -200, 0, 120, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, 10) - EVT_CALL(TranslateGroup, MODEL_g210, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o1346, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeTransformGroup, MODEL_g210) + Call(MakeLerp, -200, 0, 120, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + DivF(LVar0, 10) + Call(TranslateGroup, MODEL_g210, 0, LVar0, 0) + Call(TranslateModel, MODEL_o1346, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Return + End }; EvtScript N(EVS_LowerSandColumn) = { - EVT_CALL(MakeLerp, 0, -200, 10, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o1341, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeLerp, 0, -200, 10, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o1341, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Return + End }; EvtScript N(EVS_Scene_DrainSand) = { - EVT_WAIT(5) - EVT_CALL(InterpPlayerYaw, 179, 0) - EVT_CALL(EnableModel, MODEL_o1343, TRUE) - EVT_CALL(EnableModel, MODEL_o1344, TRUE) - EVT_CALL(EnableModel, MODEL_o1345, TRUE) - EVT_CALL(EnableModel, MODEL_o1354, TRUE) - EVT_CALL(EnableModel, MODEL_o1355, TRUE) - EVT_CALL(EnableModel, MODEL_o1356, TRUE) - EVT_CALL(EnableModel, MODEL_o1341, TRUE) - EVT_CALL(EnableModel, MODEL_o1346, TRUE) - EVT_EXEC(N(EVS_Camera_LookAtDrain)) - EVT_WAIT(30) - EVT_EXEC(N(EVS_TexPan_UpperSand)) - EVT_EXEC(N(EVS_RescaleDrainingSand)) - EVT_EXEC(N(EVS_DrainUpperSand)) - EVT_CALL(PlaySound, SOUND_ISK_DRAINING_SAND) - EVT_WAIT(75) - EVT_EXEC(N(EVS_Camera_LookBelow)) - EVT_WAIT(30) - EVT_EXEC(N(EVS_TexPan_LowerSand)) - EVT_EXEC(N(EVS_FillLowerSand)) - EVT_CALL(PlaySound, SOUND_ISK_DRAINING_SAND | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_WAIT(120) - EVT_EXEC(N(EVS_LowerSandColumn)) - EVT_WAIT(5) - EVT_EXEC(N(EVS_CollapseSandPile)) - EVT_CALL(PlaySound, SOUND_ISK_DRAINING_SAND | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_WAIT(10) - EVT_CALL(EnableModel, MODEL_o1347, FALSE) - EVT_CALL(EnableModel, MODEL_o1348, FALSE) - EVT_CALL(EnableModel, MODEL_o1349, FALSE) - EVT_CALL(EnableModel, MODEL_o1350, FALSE) - EVT_CALL(EnableModel, MODEL_o1351, FALSE) - EVT_CALL(EnableModel, MODEL_o1352, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1350, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1351, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1352, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GB_StoryProgress, STORY_CH2_DRAINED_FIRST_SAND_ROOM) - EVT_CALL(SetZoneEnabled, ZONE_o2008, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_o2023, TRUE) - EVT_WAIT(20) - EVT_EXEC(N(EVS_Camera_Reset)) - EVT_WAIT(5) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END + Wait(5) + Call(InterpPlayerYaw, 179, 0) + Call(EnableModel, MODEL_o1343, TRUE) + Call(EnableModel, MODEL_o1344, TRUE) + Call(EnableModel, MODEL_o1345, TRUE) + Call(EnableModel, MODEL_o1354, TRUE) + Call(EnableModel, MODEL_o1355, TRUE) + Call(EnableModel, MODEL_o1356, TRUE) + Call(EnableModel, MODEL_o1341, TRUE) + Call(EnableModel, MODEL_o1346, TRUE) + Exec(N(EVS_Camera_LookAtDrain)) + Wait(30) + Exec(N(EVS_TexPan_UpperSand)) + Exec(N(EVS_RescaleDrainingSand)) + Exec(N(EVS_DrainUpperSand)) + Call(PlaySound, SOUND_ISK_DRAINING_SAND) + Wait(75) + Exec(N(EVS_Camera_LookBelow)) + Wait(30) + Exec(N(EVS_TexPan_LowerSand)) + Exec(N(EVS_FillLowerSand)) + Call(PlaySound, SOUND_ISK_DRAINING_SAND | SOUND_ID_TRIGGER_CHANGE_SOUND) + Wait(120) + Exec(N(EVS_LowerSandColumn)) + Wait(5) + Exec(N(EVS_CollapseSandPile)) + Call(PlaySound, SOUND_ISK_DRAINING_SAND | SOUND_ID_TRIGGER_CHANGE_SOUND) + Wait(10) + Call(EnableModel, MODEL_o1347, FALSE) + Call(EnableModel, MODEL_o1348, FALSE) + Call(EnableModel, MODEL_o1349, FALSE) + Call(EnableModel, MODEL_o1350, FALSE) + Call(EnableModel, MODEL_o1351, FALSE) + Call(EnableModel, MODEL_o1352, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1350, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1351, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1352, COLLIDER_FLAGS_UPPER_MASK) + Set(GB_StoryProgress, STORY_CH2_DRAINED_FIRST_SAND_ROOM) + Call(SetZoneEnabled, ZONE_o2008, FALSE) + Call(SetZoneEnabled, ZONE_o2023, TRUE) + Wait(20) + Exec(N(EVS_Camera_Reset)) + Wait(5) + Call(DisablePlayerInput, FALSE) + Unbind + Return + End }; EvtScript N(EVS_SetupSand) = { - EVT_SET(AF_ISK03_SandSwitchActivated, FALSE) - EVT_CALL(MakeTransformGroup, MODEL_g206) - EVT_IF_LT(GB_StoryProgress, STORY_CH2_DRAINED_FIRST_SAND_ROOM) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Scene_DrainSand)), TRIGGER_AREA_FLAG_SET, AF_ISK03_SandSwitchActivated, 1, 0) - EVT_CALL(EnableModel, MODEL_o1343, FALSE) - EVT_CALL(EnableModel, MODEL_o1344, FALSE) - EVT_CALL(EnableModel, MODEL_o1345, FALSE) - EVT_CALL(EnableModel, MODEL_o1354, FALSE) - EVT_CALL(EnableModel, MODEL_o1355, FALSE) - EVT_CALL(EnableModel, MODEL_o1356, FALSE) - EVT_CALL(EnableModel, MODEL_o1341, FALSE) - EVT_CALL(EnableModel, MODEL_o1346, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1343, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1344, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1345, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_TexPan_DrippingSand)) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_o1347, FALSE) - EVT_CALL(EnableModel, MODEL_o1348, FALSE) - EVT_CALL(EnableModel, MODEL_o1349, FALSE) - EVT_CALL(EnableModel, MODEL_o1350, FALSE) - EVT_CALL(EnableModel, MODEL_o1351, FALSE) - EVT_CALL(EnableModel, MODEL_o1352, FALSE) - EVT_CALL(EnableModel, MODEL_o1341, FALSE) - EVT_CALL(EnableModel, MODEL_o1346, FALSE) - EVT_CALL(EnableModel, MODEL_o6000, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1350, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1351, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1352, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH2_DRAINED_FIRST_SAND_ROOM) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_o6000, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END + Set(AF_ISK03_SandSwitchActivated, FALSE) + Call(MakeTransformGroup, MODEL_g206) + IfLt(GB_StoryProgress, STORY_CH2_DRAINED_FIRST_SAND_ROOM) + BindTrigger(Ref(N(EVS_Scene_DrainSand)), TRIGGER_AREA_FLAG_SET, AF_ISK03_SandSwitchActivated, 1, 0) + Call(EnableModel, MODEL_o1343, FALSE) + Call(EnableModel, MODEL_o1344, FALSE) + Call(EnableModel, MODEL_o1345, FALSE) + Call(EnableModel, MODEL_o1354, FALSE) + Call(EnableModel, MODEL_o1355, FALSE) + Call(EnableModel, MODEL_o1356, FALSE) + Call(EnableModel, MODEL_o1341, FALSE) + Call(EnableModel, MODEL_o1346, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1343, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1344, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1345, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_TexPan_DrippingSand)) + Else + Call(EnableModel, MODEL_o1347, FALSE) + Call(EnableModel, MODEL_o1348, FALSE) + Call(EnableModel, MODEL_o1349, FALSE) + Call(EnableModel, MODEL_o1350, FALSE) + Call(EnableModel, MODEL_o1351, FALSE) + Call(EnableModel, MODEL_o1352, FALSE) + Call(EnableModel, MODEL_o1341, FALSE) + Call(EnableModel, MODEL_o1346, FALSE) + Call(EnableModel, MODEL_o6000, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1350, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1351, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1352, COLLIDER_FLAGS_UPPER_MASK) + EndIf + IfLt(GB_StoryProgress, STORY_CH2_DRAINED_FIRST_SAND_ROOM) + Else + Call(EnableModel, MODEL_o6000, FALSE) + EndIf + Return + End }; diff --git a/src/world/area_isk/isk_03/isk_03_3_entity.c b/src/world/area_isk/isk_03/isk_03_3_entity.c index fd2fdaf07d2..98ba2d959e4 100644 --- a/src/world/area_isk/isk_03/isk_03_3_entity.c +++ b/src/world/area_isk/isk_03/isk_03_3_entity.c @@ -2,9 +2,9 @@ #include "effects.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_RUINS_KEY, 467, -170, 218, ITEM_SPAWN_MODE_KEY, GF_ISK03_Item_RuinsKey) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 358, -123, 358, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 457, -123, 214, EVT_FLOAT(0.3), LVar0) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_RUINS_KEY, 467, -170, 218, ITEM_SPAWN_MODE_KEY, GF_ISK03_Item_RuinsKey) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 358, -123, 358, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 457, -123, 214, Float(0.3), LVar0) + Return + End }; diff --git a/src/world/area_isk/isk_03/isk_03_4_switch.c b/src/world/area_isk/isk_03/isk_03_4_switch.c index 9fe3b26df57..8ee172981dc 100644 --- a/src/world/area_isk/isk_03/isk_03_4_switch.c +++ b/src/world/area_isk/isk_03/isk_03_4_switch.c @@ -3,55 +3,55 @@ extern EvtScript N(EVS_OnTouch_DrainSwitch); EvtScript N(EVS_SetupSwitch) = { - EVT_CALL(ParentColliderToModel, COLLIDER_o1989, MODEL_o1992) - EVT_CALL(ParentColliderToModel, COLLIDER_o1990, MODEL_o1992) - EVT_IF_EQ(AF_ISK03_SandSwitchActivated, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_DrainSwitch)), TRIGGER_FLOOR_TOUCH, COLLIDER_o1990, 1, 0) - EVT_ELSE - EVT_CALL(TranslateGroup, MODEL_g319, 0, -14, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o1989) - EVT_CALL(UpdateColliderTransform, COLLIDER_o1990) - EVT_END_IF - EVT_RETURN - EVT_END + Call(ParentColliderToModel, COLLIDER_o1989, MODEL_o1992) + Call(ParentColliderToModel, COLLIDER_o1990, MODEL_o1992) + IfEq(AF_ISK03_SandSwitchActivated, FALSE) + BindTrigger(Ref(N(EVS_OnTouch_DrainSwitch)), TRIGGER_FLOOR_TOUCH, COLLIDER_o1990, 1, 0) + Else + Call(TranslateGroup, MODEL_g319, 0, -14, 0) + Call(UpdateColliderTransform, COLLIDER_o1989) + Call(UpdateColliderTransform, COLLIDER_o1990) + EndIf + Return + End }; EvtScript N(EVS_OnTouch_DrainSwitch) = { - EVT_CALL(IsPlayerOnValidFloor, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_LABEL(5) - EVT_WAIT(1) - EVT_CALL(PartnerCanUseAbility, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_GOTO(5) - EVT_END_IF - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar1, 50) - EVT_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(2.5)) - EVT_CALL(NpcJump0, NPC_PARTNER, 470, 50, 268, 10) - EVT_WAIT(10) - EVT_CALL(EnablePartnerAI) - EVT_END_THREAD - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, COLLIDER_o1990, SOUND_FLOOR_SWITCH_DEPRESS, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, -14, 30, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g319, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o1989) - EVT_CALL(UpdateColliderTransform, COLLIDER_o1990) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, COLLIDER_o1990, SOUND_FLOOR_SWITCH_ACTIVATE, SOUND_SPACE_DEFAULT) - EVT_SET(AF_ISK03_SandSwitchActivated, TRUE) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(IsPlayerOnValidFloor, LVar0) + IfEq(LVar0, FALSE) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Label(5) + Wait(1) + Call(PartnerCanUseAbility, LVar0) + IfEq(LVar0, TRUE) + Goto(5) + EndIf + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + IfLt(LVar1, 50) + Thread + Call(DisablePartnerAI, 0) + Call(SetNpcJumpscale, NPC_PARTNER, Float(2.5)) + Call(NpcJump0, NPC_PARTNER, 470, 50, 268, 10) + Wait(10) + Call(EnablePartnerAI) + EndThread + EndIf + Call(PlaySoundAtCollider, COLLIDER_o1990, SOUND_FLOOR_SWITCH_DEPRESS, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, -14, 30, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g319, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o1989) + Call(UpdateColliderTransform, COLLIDER_o1990) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(PlaySoundAtCollider, COLLIDER_o1990, SOUND_FLOOR_SWITCH_ACTIVATE, SOUND_SPACE_DEFAULT) + Set(AF_ISK03_SandSwitchActivated, TRUE) + Unbind + Return + End }; diff --git a/src/world/area_isk/isk_04/isk_04_1_music.c b/src/world/area_isk/isk_04/isk_04_1_music.c index 26b36e6299c..ba7f36c4ba2 100644 --- a/src/world/area_isk/isk_04/isk_04_1_music.c +++ b/src/world/area_isk/isk_04/isk_04_1_music.c @@ -1,35 +1,35 @@ #include "isk_04.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_EQ(GF_ISK04_SecondWarning, FALSE) - EVT_THREAD - EVT_CALL(FadeInMusic, 1, SONG_TUTANKOOPA_WARNING, 0, 2000, 0, 127) - EVT_CALL(FadeOutMusic, 0, 2000) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(20) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH2_00DE, 160, 40) - EVT_SET(GF_ISK04_SecondWarning, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_CALL(FadeInMusic, 0, SONG_DRY_DRY_RUINS, 0, 2000, 0, 127) - EVT_CALL(FadeOutMusic, 1, 2000) - EVT_END_THREAD - EVT_RETURN - EVT_END_IF + IfEq(GF_ISK04_SecondWarning, FALSE) + Thread + Call(FadeInMusic, 1, SONG_TUTANKOOPA_WARNING, 0, 2000, 0, 127) + Call(FadeOutMusic, 0, 2000) + Call(DisablePlayerInput, TRUE) + Wait(20) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(ShowMessageAtScreenPos, MSG_CH2_00DE, 160, 40) + Set(GF_ISK04_SecondWarning, TRUE) + Call(DisablePlayerInput, FALSE) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Call(FadeInMusic, 0, SONG_DRY_DRY_RUINS, 0, 2000, 0, 127) + Call(FadeOutMusic, 1, 2000) + EndThread + Return + EndIf #if VERSION_PAL - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) #else - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_CASE_LT(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) - EVT_CASE_GE(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_END_SWITCH + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + CaseLt(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) + CaseGe(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + EndSwitch #endif - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/area_isk/isk_04/isk_04_2_main.c b/src/world/area_isk/isk_04/isk_04_2_main.c index b2a0b6d7fe9..d5ccd6f889c 100644 --- a/src/world/area_isk/isk_04/isk_04_2_main.c +++ b/src/world/area_isk/isk_04/isk_04_2_main.c @@ -7,38 +7,38 @@ EvtScript N(EVS_ExitWalk_isk_06_1) = EVT_EXIT_WALK(40, isk_04_ENTRY_3, "isk_06", EvtScript N(EVS_ExitWalk_isk_05_0) = EVT_EXIT_WALK(40, isk_04_ENTRY_4, "isk_05", isk_05_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_03_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_07_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_06_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_06_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_05_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_isk_03_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_isk_07_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_isk_06_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_isk_06_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_isk_05_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) - EVT_CALL(SetSpriteShading, SHADING_ISK_04) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(GetDemoState, LVar0) - EVT_IF_NE(LVar0, DEMO_STATE_NONE) - EVT_EXEC_WAIT(N(EVS_SetupObstructions)) - EVT_EXEC_WAIT(N(EVS_SetupDemo)) - EVT_RETURN - EVT_END_IF - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupObstructions)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) + Call(SetSpriteShading, SHADING_ISK_04) + SetUP_CAMERA_ALT_NO_LEAD() + Call(GetDemoState, LVar0) + IfNe(LVar0, DEMO_STATE_NONE) + ExecWait(N(EVS_SetupObstructions)) + ExecWait(N(EVS_SetupDemo)) + Return + EndIf + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupObstructions)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_isk/isk_04/isk_04_3_obstructions.c b/src/world/area_isk/isk_04/isk_04_3_obstructions.c index ac9625e2576..135532f03b3 100644 --- a/src/world/area_isk/isk_04/isk_04_3_obstructions.c +++ b/src/world/area_isk/isk_04/isk_04_3_obstructions.c @@ -14,68 +14,68 @@ BombTrigger N(BombPos_Wall) = { }; EvtScript N(EVS_OnBlast_Wall) = { - EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 0, 63, 22, 1, 10, 30) - EVT_LOOP(10) - EVT_CALL(EnableModel, MODEL_g262, TRUE) - EVT_WAIT(1) - EVT_CALL(EnableModel, MODEL_g262, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GF_ISK04_BombedWall, TRUE) - EVT_UNBIND - EVT_RETURN - EVT_END + PlayEffect(EFFECT_BOMBETTE_BREAKING, 0, 63, 22, 1, 10, 30) + Loop(10) + Call(EnableModel, MODEL_g262, TRUE) + Wait(1) + Call(EnableModel, MODEL_g262, FALSE) + Wait(1) + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) + Set(GF_ISK04_BombedWall, TRUE) + Unbind + Return + End }; EvtScript N(EVS_UnlockDoorPrompt) = { - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, 600, -330, 100) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_SET(GF_ISK04_UnlockedDoor, TRUE) - EVT_SET(LVar0, MV_RuinsLockEntityID) - EVT_CALL(N(RemovePadlock)) - EVT_SET(LVar1, 0) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittsw, SOUND_ISK_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 65, 65, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g304, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittsw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(CloseChoicePopup) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(ShowKeyChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) + Call(CloseChoicePopup) + Return + EndIf + IfEq(LVar0, -1) + Call(CloseChoicePopup) + Return + EndIf + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, 600, -330, 100) + Call(RemoveKeyItemAt, LVar1) + Set(GF_ISK04_UnlockedDoor, TRUE) + Set(LVar0, MV_RuinsLockEntityID) + Call(N(RemovePadlock)) + Set(LVar1, 0) + Wait(5) + Call(PlaySoundAtCollider, COLLIDER_deilittsw, SOUND_ISK_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 65, 65, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g304, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittsw, COLLIDER_FLAGS_UPPER_MASK) + Call(CloseChoicePopup) + Unbind + Return + End }; EvtScript N(EVS_SetupObstructions) = { - EVT_IF_EQ(GF_ISK04_BombedWall, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnBlast_Wall)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Wall)), 1, 0) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_g262, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_IF_EQ(GF_ISK04_UnlockedDoor, FALSE) - EVT_CALL(MakeTransformGroup, MODEL_g304) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_UnlockDoorPrompt)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(ItemList_RuinsKey)), 0, 1) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittsw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_g304, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_ISK04_BombedWall, FALSE) + BindTrigger(Ref(N(EVS_OnBlast_Wall)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Wall)), 1, 0) + Else + Call(EnableModel, MODEL_g262, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) + EndIf + IfEq(GF_ISK04_UnlockedDoor, FALSE) + Call(MakeTransformGroup, MODEL_g304) + BindPadlock(Ref(N(EVS_UnlockDoorPrompt)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), Ref(N(ItemList_RuinsKey)), 0, 1) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittsw, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_g304, FALSE) + EndIf + Return + End }; diff --git a/src/world/area_isk/isk_04/isk_04_4_entity.c b/src/world/area_isk/isk_04/isk_04_4_entity.c index e3ab09897a0..e054a054259 100644 --- a/src/world/area_isk/isk_04/isk_04_4_entity.c +++ b/src/world/area_isk/isk_04/isk_04_4_entity.c @@ -3,12 +3,12 @@ #include "effects.h" EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_ISK04_UnlockedDoor, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), 600, -330, 100, 160, MAKE_ENTITY_END) - EVT_SET(MV_RuinsLockEntityID, LVar0) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 504, -193, 43, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 486, -193, -128, EVT_FLOAT(0.3), LVar0) - EVT_RETURN - EVT_END + IfEq(GF_ISK04_UnlockedDoor, FALSE) + Call(MakeEntity, Ref(Entity_Padlock), 600, -330, 100, 160, MAKE_ENTITY_END) + Set(MV_RuinsLockEntityID, LVar0) + EndIf + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 504, -193, 43, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 486, -193, -128, Float(0.3), LVar0) + Return + End }; diff --git a/src/world/area_isk/isk_04/isk_04_6_demo.c b/src/world/area_isk/isk_04/isk_04_6_demo.c index 52bf404bc74..97dc933f770 100644 --- a/src/world/area_isk/isk_04/isk_04_6_demo.c +++ b/src/world/area_isk/isk_04/isk_04_6_demo.c @@ -4,108 +4,108 @@ #include "world/common/todo/SwitchToPartner.inc.c" EvtScript N(EVS_ProvideDemoInputs) = { - EVT_CALL(EnableWorldStatusBar, FALSE) - EVT_CALL(DemoSetButtons, BUTTON_C_DOWN) - EVT_WAIT(5) - EVT_CALL(DemoSetButtons, 0) - EVT_WAIT(93) - EVT_CALL(DemoJoystickXY, 2, 0) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 15, 0) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 45, 19) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 75, 11) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 76, 11) - EVT_WAIT(8) - EVT_CALL(DemoJoystickXY, 69, 11) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -2, 21) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -1, -1) - EVT_CALL(N(SwitchToPartner), PARTNER_BOMBETTE) - EVT_WAIT(57) - EVT_CALL(DemoSetButtons, BUTTON_C_DOWN) - EVT_WAIT(4) - EVT_CALL(DemoSetButtons, 0) - EVT_WAIT(34) - EVT_CALL(DemoJoystickXY, -1, 0) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -4, 0) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -23, 3) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -48, 4) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -67, 6) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -76, 7) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -78, 7) - EVT_WAIT(4) - EVT_CALL(DemoJoystickXY, -36, 6) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 1, -1) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 47, -6) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 74, -12) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 63, -9) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -1, 0) - EVT_WAIT(70) - EVT_CALL(DemoJoystickXY, 0, 0) - EVT_WAIT(2) - EVT_CALL(DemoJoystickXY, 3, 0) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 17, 0) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 38, 0) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 64, -3) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 76, -6) - EVT_WAIT(8) - EVT_CALL(DemoJoystickXY, 77, -5) - EVT_WAIT(3) - EVT_CALL(DemoJoystickXY, 77, -4) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 77, -2) - EVT_WAIT(2) - EVT_CALL(DemoJoystickXY, 77, -1) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 78, -1) - EVT_WAIT(2) - EVT_CALL(DemoJoystickXY, 78, 0) - EVT_IF_EQ(GF_DemoSceneDone, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_DemoSceneDone, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("isk_04"), isk_04_ENTRY_5, TRANSITION_END_DEMO_SCENE_BLACK) - EVT_WAIT(323) - EVT_RETURN - EVT_END + Call(EnableWorldStatusBar, FALSE) + Call(DemoSetButtons, BUTTON_C_DOWN) + Wait(5) + Call(DemoSetButtons, 0) + Wait(93) + Call(DemoJoystickXY, 2, 0) + Wait(1) + Call(DemoJoystickXY, 15, 0) + Wait(1) + Call(DemoJoystickXY, 45, 19) + Wait(1) + Call(DemoJoystickXY, 75, 11) + Wait(1) + Call(DemoJoystickXY, 76, 11) + Wait(8) + Call(DemoJoystickXY, 69, 11) + Wait(1) + Call(DemoJoystickXY, -2, 21) + Wait(1) + Call(DemoJoystickXY, -1, -1) + Call(N(SwitchToPartner), PARTNER_BOMBETTE) + Wait(57) + Call(DemoSetButtons, BUTTON_C_DOWN) + Wait(4) + Call(DemoSetButtons, 0) + Wait(34) + Call(DemoJoystickXY, -1, 0) + Wait(1) + Call(DemoJoystickXY, -4, 0) + Wait(1) + Call(DemoJoystickXY, -23, 3) + Wait(1) + Call(DemoJoystickXY, -48, 4) + Wait(1) + Call(DemoJoystickXY, -67, 6) + Wait(1) + Call(DemoJoystickXY, -76, 7) + Wait(1) + Call(DemoJoystickXY, -78, 7) + Wait(4) + Call(DemoJoystickXY, -36, 6) + Wait(1) + Call(DemoJoystickXY, 1, -1) + Wait(1) + Call(DemoJoystickXY, 47, -6) + Wait(1) + Call(DemoJoystickXY, 74, -12) + Wait(1) + Call(DemoJoystickXY, 63, -9) + Wait(1) + Call(DemoJoystickXY, -1, 0) + Wait(70) + Call(DemoJoystickXY, 0, 0) + Wait(2) + Call(DemoJoystickXY, 3, 0) + Wait(1) + Call(DemoJoystickXY, 17, 0) + Wait(1) + Call(DemoJoystickXY, 38, 0) + Wait(1) + Call(DemoJoystickXY, 64, -3) + Wait(1) + Call(DemoJoystickXY, 76, -6) + Wait(8) + Call(DemoJoystickXY, 77, -5) + Wait(3) + Call(DemoJoystickXY, 77, -4) + Wait(1) + Call(DemoJoystickXY, 77, -2) + Wait(2) + Call(DemoJoystickXY, 77, -1) + Wait(1) + Call(DemoJoystickXY, 78, -1) + Wait(2) + Call(DemoJoystickXY, 78, 0) + IfEq(GF_DemoSceneDone, TRUE) + Return + EndIf + Set(GF_DemoSceneDone, TRUE) + Call(GotoMapSpecial, Ref("isk_04"), isk_04_ENTRY_5, TRANSITION_END_DEMO_SCENE_BLACK) + Wait(323) + Return + End }; EvtScript N(EVS_MonitorDemoState) = { - EVT_WAIT(10) - EVT_LOOP(0) - EVT_CALL(GetDemoState, LVar0) - EVT_IF_EQ(LVar0, DEMO_STATE_CHANGE_MAP) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(GF_DemoSceneDone, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_DemoSceneDone, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("isk_04"), isk_04_ENTRY_2, TRANSITION_END_DEMO_SCENE_WHITE) - EVT_WAIT(313) - EVT_RETURN - EVT_END + Wait(10) + Loop(0) + Call(GetDemoState, LVar0) + IfEq(LVar0, DEMO_STATE_CHANGE_MAP) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(GF_DemoSceneDone, TRUE) + Return + EndIf + Set(GF_DemoSceneDone, TRUE) + Call(GotoMapSpecial, Ref("isk_04"), isk_04_ENTRY_2, TRANSITION_END_DEMO_SCENE_WHITE) + Wait(313) + Return + End }; s32 N(DemoInitState) = 0; @@ -138,26 +138,26 @@ API_CALLABLE(N(SetupDemoScene)) { EvtScript N(EVS_SetupDemo) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 530, 25, -50) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 12, -3) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, 25, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_WAIT(1) - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 12, -3) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, 25, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(N(SetupDemoScene)) - EVT_SET(GF_DemoSceneDone, FALSE) - EVT_EXEC(N(EVS_MonitorDemoState)) - EVT_EXEC(N(EVS_ProvideDemoInputs)) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, 530, 25, -50) + Call(SetCamPitch, CAM_DEFAULT, 12, -3) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar0, 25, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Wait(1) + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamPitch, CAM_DEFAULT, 12, -3) + Call(SetPanTarget, CAM_DEFAULT, LVar0, 25, LVar2) + Wait(1) + EndLoop + EndThread + Call(N(SetupDemoScene)) + Set(GF_DemoSceneDone, FALSE) + Exec(N(EVS_MonitorDemoState)) + Exec(N(EVS_ProvideDemoInputs)) + Return + End }; diff --git a/src/world/area_isk/isk_05/isk_05_1_main.c b/src/world/area_isk/isk_05/isk_05_1_main.c index 5a05cfa58c9..36a3b3d7752 100644 --- a/src/world/area_isk/isk_05/isk_05_1_main.c +++ b/src/world/area_isk/isk_05/isk_05_1_main.c @@ -3,50 +3,50 @@ EvtScript N(D_80241F10_97F9E0) = EVT_EXIT_WALK(40, isk_05_ENTRY_0, "isk_04", isk_04_ENTRY_4); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(D_80241F10_97F9E0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(D_80241F10_97F9E0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + Return + End }; EvtScript N(EVS_EnterWalk_80241F98) = { - EVT_CALL(TranslateGroup, MODEL_g304, 0, 65, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittw, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Call(TranslateGroup, MODEL_g304, 0, 65, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittw, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) - EVT_CALL(SetSpriteShading, SHADING_ISK_05) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) + Set(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) + Call(SetSpriteShading, SHADING_ISK_05) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) #if VERSION_PAL - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) #else - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_CASE_LT(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) - EVT_CASE_GE(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_END_SWITCH + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + CaseLt(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) + CaseGe(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + EndSwitch #endif - EVT_CALL(TranslateGroup, MODEL_g304, 0, 65, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittw, COLLIDER_FLAGS_UPPER_MASK) - EVT_IF_EQ(GF_ISK05_Hammer2Block, FALSE) - EVT_CALL(SetGroupVisibility, MODEL_wan1, MODEL_GROUP_VISIBLE) - EVT_CALL(SetGroupVisibility, MODEL_wan2, MODEL_GROUP_HIDDEN) - EVT_ELSE - EVT_CALL(SetGroupVisibility, MODEL_wan1, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_wan2, MODEL_GROUP_VISIBLE) - EVT_END_IF - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Call(TranslateGroup, MODEL_g304, 0, 65, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittw, COLLIDER_FLAGS_UPPER_MASK) + IfEq(GF_ISK05_Hammer2Block, FALSE) + Call(SetGroupVisibility, MODEL_wan1, MODEL_GROUP_VISIBLE) + Call(SetGroupVisibility, MODEL_wan2, MODEL_GROUP_HIDDEN) + Else + Call(SetGroupVisibility, MODEL_wan1, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_wan2, MODEL_GROUP_VISIBLE) + EndIf + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; diff --git a/src/world/area_isk/isk_05/isk_05_2_entity.c b/src/world/area_isk/isk_05/isk_05_2_entity.c index e7d93913867..1747c96e9b6 100644 --- a/src/world/area_isk/isk_05/isk_05_2_entity.c +++ b/src/world/area_isk/isk_05/isk_05_2_entity.c @@ -3,20 +3,20 @@ #include "entity.h" EvtScript N(D_80242210_97FCE0) = { - EVT_SET(GF_ISK05_Hammer2Block, TRUE) - EVT_RETURN - EVT_END + Set(GF_ISK05_Hammer2Block, TRUE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_PYRAMID_STONE, 316, 82, -481, ITEM_SPAWN_MODE_KEY, GF_ISK05_Item_PyramidStone) - EVT_IF_EQ(GF_ISK05_Hammer2Block, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer2Block_WideX), 431, 0, -478, 45, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(D_80242210_97FCE0))) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 415, 196, -290, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 290, 196, -411, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 415, 66, -290, EVT_FLOAT(0.3), LVar0) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_PYRAMID_STONE, 316, 82, -481, ITEM_SPAWN_MODE_KEY, GF_ISK05_Item_PyramidStone) + IfEq(GF_ISK05_Hammer2Block, FALSE) + Call(MakeEntity, Ref(Entity_Hammer2Block_WideX), 431, 0, -478, 45, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(D_80242210_97FCE0))) + EndIf + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 415, 196, -290, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 290, 196, -411, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 415, 66, -290, Float(0.3), LVar0) + Return + End }; diff --git a/src/world/area_isk/isk_05/isk_05_3_npc.c b/src/world/area_isk/isk_05/isk_05_3_npc.c index 581a149f26d..96f49ca0794 100644 --- a/src/world/area_isk/isk_05/isk_05_3_npc.c +++ b/src/world/area_isk/isk_05/isk_05_3_npc.c @@ -155,116 +155,116 @@ API_CALLABLE(N(func_80241E24_97F8F4)) { } EvtScript N(EVS_NpcIdle_StoneChomp) = { - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_DISABLE_AI, 1) - EVT_LABEL(100) - EVT_IF_EQ(GF_ISK05_Hammer2Block, FALSE) - EVT_WAIT(1) - EVT_GOTO(100) - EVT_END_IF - EVT_CALL(PlaySound, SOUND_CHIME_BEGIN_AMBUSH) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_DISABLE_AI, 0) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittw, SOUND_ISK_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 65, 0, 15, EASING_QUADRATIC_IN) - EVT_LABEL(101) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g304, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(101) - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittw, SOUND_ISK_DOOR_SLAM, SOUND_SPACE_DEFAULT) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilittw, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_THREAD - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(5) - EVT_CALL(N(func_80241B28_97F5F8)) - EVT_CALL(MakeLerp, 0, 255, 30, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(N(func_80241DF8_97F8C8), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(SetGroupVisibility, MODEL_wan1, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_wan2, MODEL_GROUP_VISIBLE) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(MakeLerp, 0, 360, 15, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(N(func_80241D44_97F814), LVar0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(GetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) - EVT_CALL(N(func_80241C5C_97F72C), LVar2, LVar3, LVar4) - EVT_CALL(MakeLerp, LVar3, 0, 30, EASING_QUARTIC_IN) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, NPC_SELF, LVar2, LVar0, LVar4) - EVT_CALL(N(func_80241C5C_97F72C), LVar2, LVar0, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(N(func_80241E24_97F8F4)) - EVT_WAIT(5) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) - EVT_CALL(EnableNpcShadow, NPC_SELF, TRUE) - EVT_WAIT(1) - EVT_CALL(N(DestroyAmbushWorker)) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_StoneChomp))) - EVT_RETURN - EVT_END + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_DISABLE_AI, 1) + Label(100) + IfEq(GF_ISK05_Hammer2Block, FALSE) + Wait(1) + Goto(100) + EndIf + Call(PlaySound, SOUND_CHIME_BEGIN_AMBUSH) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_DISABLE_AI, 0) + Thread + Wait(5) + Call(PlaySoundAtCollider, COLLIDER_deilittw, SOUND_ISK_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 65, 0, 15, EASING_QUADRATIC_IN) + Label(101) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g304, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(101) + EndIf + Call(PlaySoundAtCollider, COLLIDER_deilittw, SOUND_ISK_DOOR_SLAM, SOUND_SPACE_DEFAULT) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilittw, COLLIDER_FLAGS_UPPER_MASK) + EndThread + Call(DisablePlayerInput, TRUE) + Wait(5) + Call(N(func_80241B28_97F5F8)) + Call(MakeLerp, 0, 255, 30, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(N(func_80241DF8_97F8C8), LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(SetGroupVisibility, MODEL_wan1, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_wan2, MODEL_GROUP_VISIBLE) + Thread + Wait(15) + Call(MakeLerp, 0, 360, 15, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(N(func_80241D44_97F814), LVar0, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + EndThread + Call(GetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) + Call(N(func_80241C5C_97F72C), LVar2, LVar3, LVar4) + Call(MakeLerp, LVar3, 0, 30, EASING_QUARTIC_IN) + Label(1) + Call(UpdateLerp) + Call(SetNpcPos, NPC_SELF, LVar2, LVar0, LVar4) + Call(N(func_80241C5C_97F72C), LVar2, LVar0, LVar4) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(N(func_80241E24_97F8F4)) + Wait(5) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) + Call(EnableNpcShadow, NPC_SELF, TRUE) + Wait(1) + Call(N(DestroyAmbushWorker)) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_CLEAR, 0, 0, 0, 0) + Call(DisablePlayerInput, FALSE) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_StoneChomp))) + Return + End }; EvtScript N(EVS_NpcDefeat_StoneChomp_Override) = { - EVT_SET(GF_ISK05_Defeated_StoneChomp, TRUE) - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_SET(GF_ISK05_Defeated_StoneChomp, TRUE) - EVT_SET(AF_ISK05_StoneChompDefeated, TRUE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittw, SOUND_ISK_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(MakeLerp, 0, 65, 65, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g304, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittw, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_THREAD - EVT_CALL(N(StoneChompFXC)) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Set(GF_ISK05_Defeated_StoneChomp, TRUE) + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Set(GF_ISK05_Defeated_StoneChomp, TRUE) + Set(AF_ISK05_StoneChompDefeated, TRUE) + Call(PlaySoundAtCollider, COLLIDER_deilittw, SOUND_ISK_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Thread + Wait(5) + Call(MakeLerp, 0, 65, 65, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g304, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittw, COLLIDER_FLAGS_UPPER_MASK) + EndThread + Call(N(StoneChompFXC)) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_StoneChomp) = { - EVT_IF_EQ(GF_ISK05_Defeated_StoneChomp, TRUE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_StoneChomp))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_StoneChomp_Override))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_RETURN - EVT_END + IfEq(GF_ISK05_Defeated_StoneChomp, TRUE) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_StoneChomp))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_StoneChomp_Override))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Return + End }; NpcData N(NpcData_StoneChomp) = { diff --git a/src/world/area_isk/isk_06/isk_06_1_main.c b/src/world/area_isk/isk_06/isk_06_1_main.c index 7c3bcb567e1..f3a809d2e35 100644 --- a/src/world/area_isk/isk_06/isk_06_1_main.c +++ b/src/world/area_isk/isk_06/isk_06_1_main.c @@ -4,39 +4,39 @@ EvtScript N(EVS_ExitWalk_isk_04_2) = EVT_EXIT_WALK(40, isk_06_ENTRY_0, "isk_04", EvtScript N(EVS_ExitWalk_isk_04_3) = EVT_EXIT_WALK(40, isk_06_ENTRY_1, "isk_04", isk_04_ENTRY_3); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_04_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_04_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_isk_04_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_isk_04_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) - EVT_CALL(SetSpriteShading, SHADING_ISK_06) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_IF_LT(GB_StoryProgress, STORY_CH2_DRAINED_SECOND_SAND_ROOM) - EVT_CALL(SetZoneEnabled, ZONE_o2016, FALSE) - EVT_ELSE - EVT_CALL(SetZoneEnabled, ZONE_C2, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_o2012, FALSE) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupSand)) - EVT_EXEC(N(EVS_SetupSwitch)) + Set(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) + Call(SetSpriteShading, SHADING_ISK_06) + SetUP_CAMERA_ALT_NO_LEAD() + IfLt(GB_StoryProgress, STORY_CH2_DRAINED_SECOND_SAND_ROOM) + Call(SetZoneEnabled, ZONE_o2016, FALSE) + Else + Call(SetZoneEnabled, ZONE_C2, FALSE) + Call(SetZoneEnabled, ZONE_o2012, FALSE) + EndIf + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupSand)) + Exec(N(EVS_SetupSwitch)) #if VERSION_PAL - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) #else - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_CASE_LT(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) - EVT_CASE_GE(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_END_SWITCH + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + CaseLt(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) + CaseGe(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + EndSwitch #endif - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_isk/isk_06/isk_06_2_entity.c b/src/world/area_isk/isk_06/isk_06_2_entity.c index a2f9168bd1d..d7e1f06f479 100644 --- a/src/world/area_isk/isk_06/isk_06_2_entity.c +++ b/src/world/area_isk/isk_06/isk_06_2_entity.c @@ -2,10 +2,10 @@ #include "effects.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 335, -130, -550, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_ISK06_Item_StarPiece) - EVT_CALL(MakeItemEntity, ITEM_RUINS_KEY, 304, -270, -434, ITEM_SPAWN_MODE_KEY, GF_ISK06_Item_RuinsKey) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 415, -253, -291, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 291, -253, -415, EVT_FLOAT(0.3), LVar0) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_STAR_PIECE, 335, -130, -550, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_ISK06_Item_StarPiece) + Call(MakeItemEntity, ITEM_RUINS_KEY, 304, -270, -434, ITEM_SPAWN_MODE_KEY, GF_ISK06_Item_RuinsKey) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 415, -253, -291, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 291, -253, -415, Float(0.3), LVar0) + Return + End }; diff --git a/src/world/area_isk/isk_06/isk_06_3_sand.c b/src/world/area_isk/isk_06/isk_06_3_sand.c index 66d61c1978a..13a3a6da925 100644 --- a/src/world/area_isk/isk_06/isk_06_3_sand.c +++ b/src/world/area_isk/isk_06/isk_06_3_sand.c @@ -1,326 +1,326 @@ #include "isk_06.h" EvtScript N(EVS_TexPan_DrippingSand) = { - EVT_CALL(SetTexPanner, MODEL_o2057, TEX_PANNER_4) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LABEL(10) - EVT_ADD(LVar1, -1000) - EVT_ADD(LVar2, 200) - EVT_CALL(SetTexPanOffset, TEX_PANNER_4, TEX_PANNER_MAIN, 0, LVar1) - EVT_CALL(SetTexPanOffset, TEX_PANNER_4, TEX_PANNER_AUX, LVar2, 0) - EVT_WAIT(1) - EVT_IF_LT(GB_StoryProgress, STORY_CH2_DRAINED_SECOND_SAND_ROOM) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(EnableModel, MODEL_o2057, FALSE) - EVT_RETURN - EVT_END + Call(SetTexPanner, MODEL_o2057, TEX_PANNER_4) + Set(LVar1, 0) + Set(LVar2, 0) + Label(10) + Add(LVar1, -1000) + Add(LVar2, 200) + Call(SetTexPanOffset, TEX_PANNER_4, TEX_PANNER_MAIN, 0, LVar1) + Call(SetTexPanOffset, TEX_PANNER_4, TEX_PANNER_AUX, LVar2, 0) + Wait(1) + IfLt(GB_StoryProgress, STORY_CH2_DRAINED_SECOND_SAND_ROOM) + Goto(10) + EndIf + Call(EnableModel, MODEL_o2057, FALSE) + Return + End }; EvtScript N(EVS_Camera_LookAtDrain) = { - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 356, -95, -373) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 364) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -623, 192) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 566, 0) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(13.6), EVT_FLOAT(-1.5)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 356, -95, -373) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_RETURN - EVT_END + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(UseSettingsFrom, CAM_DEFAULT, 356, -95, -373) + Call(SetCamDistance, CAM_DEFAULT, 364) + Call(SetCamPosA, CAM_DEFAULT, -623, 192) + Call(SetCamPosB, CAM_DEFAULT, 566, 0) + Call(SetCamPitch, CAM_DEFAULT, Float(13.6), Float(-1.5)) + Call(SetPanTarget, CAM_DEFAULT, 356, -95, -373) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Return + End }; EvtScript N(EVS_Camera_LookBelow) = { - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.5)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(3.4), EVT_FLOAT(-5.5)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 356, -285, -373) - EVT_RETURN - EVT_END + Call(SetCamSpeed, CAM_DEFAULT, Float(0.5)) + Call(SetCamPitch, CAM_DEFAULT, Float(3.4), Float(-5.5)) + Call(SetPanTarget, CAM_DEFAULT, 356, -285, -373) + Return + End }; EvtScript N(EVS_Camera_Reset) = { - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 356, -95, -373) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_RETURN - EVT_END + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(UseSettingsFrom, CAM_DEFAULT, 356, -95, -373) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Return + End }; EvtScript N(EVS_TexPan_UpperSand) = { - EVT_CALL(SetTexPanner, MODEL_o1689, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o1690, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o1691, TEX_PANNER_0) - EVT_SET(LVar2, 0) - EVT_CALL(MakeLerp, 0, 500, 60, EASING_QUADRATIC_IN) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_ADD(LVar2, LVar0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, LVar2) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_LABEL(20) - EVT_ADD(LVar2, 500) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, LVar2) - EVT_WAIT(1) - EVT_IF_LT(GB_StoryProgress, STORY_CH2_DRAINED_SECOND_SAND_ROOM) - EVT_GOTO(20) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetTexPanner, MODEL_o1689, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o1690, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o1691, TEX_PANNER_0) + Set(LVar2, 0) + Call(MakeLerp, 0, 500, 60, EASING_QUADRATIC_IN) + Label(10) + Call(UpdateLerp) + Add(LVar2, LVar0) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, LVar2) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Label(20) + Add(LVar2, 500) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, LVar2) + Wait(1) + IfLt(GB_StoryProgress, STORY_CH2_DRAINED_SECOND_SAND_ROOM) + Goto(20) + EndIf + Return + End }; EvtScript N(EVS_TexPan_LowerSand) = { - EVT_CALL(SetTexPanner, MODEL_o1682, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_o1681, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_o1675, TEX_PANNER_3) - EVT_CALL(SetTexPanner, MODEL_o1676, TEX_PANNER_3) - EVT_CALL(SetTexPanner, MODEL_o1677, TEX_PANNER_3) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 0) - EVT_LABEL(10) - EVT_ADD(LVar2, 0x1800) - EVT_ADD(LVar3, -500) - EVT_ADD(LVar4, -100) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, LVar2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, 0, LVar3) - EVT_CALL(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, 0, LVar4) - EVT_WAIT(1) - EVT_IF_LT(GB_StoryProgress, STORY_CH2_DRAINED_SECOND_SAND_ROOM) - EVT_GOTO(10) - EVT_END_IF - EVT_SET(LVar5, 0x00001800) - EVT_SET(LVar6, -500) - EVT_SET(LVar7, -100) - EVT_LOOP(10) - EVT_ADD(LVar5, -512) - EVT_ADD(LVar6, 50) - EVT_ADD(LVar7, 10) - EVT_ADD(LVar2, LVar5) - EVT_ADD(LVar3, LVar6) - EVT_ADD(LVar4, LVar7) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, LVar2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, 0, LVar3) - EVT_CALL(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, 0, LVar4) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetTexPanner, MODEL_o1682, TEX_PANNER_1) + Call(SetTexPanner, MODEL_o1681, TEX_PANNER_2) + Call(SetTexPanner, MODEL_o1675, TEX_PANNER_3) + Call(SetTexPanner, MODEL_o1676, TEX_PANNER_3) + Call(SetTexPanner, MODEL_o1677, TEX_PANNER_3) + Set(LVar2, 0) + Set(LVar3, 0) + Set(LVar4, 0) + Label(10) + Add(LVar2, 0x1800) + Add(LVar3, -500) + Add(LVar4, -100) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, LVar2) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, 0, LVar3) + Call(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, 0, LVar4) + Wait(1) + IfLt(GB_StoryProgress, STORY_CH2_DRAINED_SECOND_SAND_ROOM) + Goto(10) + EndIf + Set(LVar5, 0x00001800) + Set(LVar6, -500) + Set(LVar7, -100) + Loop(10) + Add(LVar5, -512) + Add(LVar6, 50) + Add(LVar7, 10) + Add(LVar2, LVar5) + Add(LVar3, LVar6) + Add(LVar4, LVar7) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, LVar2) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, 0, LVar3) + Call(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, 0, LVar4) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_RescaleDrainingSand) = { - EVT_CALL(MakeLerp, 0, 100, 60, EASING_QUADRATIC_IN) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(ScaleModel, MODEL_o1690, EVT_FLOAT(1.0), LVar0, EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeLerp, 0, 100, 60, EASING_QUADRATIC_IN) + Label(10) + Call(UpdateLerp) + Call(ScaleModel, MODEL_o1690, Float(1.0), LVar0, Float(1.0)) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Return + End }; EvtScript N(EVS_CollapseSandPile) = { - EVT_CALL(MakeLerp, 0, 50, 10, EASING_QUADRATIC_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, 100) - EVT_SETF(LVar2, 1) - EVT_ADDF(LVar2, LVar0) - EVT_SETF(LVar3, 1) - EVT_SUBF(LVar3, LVar0) - EVT_CALL(ScaleModel, MODEL_o1681, LVar2, LVar3, LVar2) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeLerp, 0, 50, 10, EASING_QUADRATIC_OUT) + Label(10) + Call(UpdateLerp) + DivF(LVar0, 100) + SetF(LVar2, 1) + AddF(LVar2, LVar0) + SetF(LVar3, 1) + SubF(LVar3, LVar0) + Call(ScaleModel, MODEL_o1681, LVar2, LVar3, LVar2) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Return + End }; EvtScript N(EVS_DrainUpperSand) = { - EVT_CALL(MakeLerp, 0, -100, 60, EASING_QUADRATIC_IN) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, 10) - EVT_SETF(LVar2, 0) - EVT_SUBF(LVar2, LVar0) - EVT_CALL(TranslateGroup, MODEL_g279, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o1959, 0, LVar2, 0) - EVT_CALL(TranslateModel, MODEL_o1960, 0, LVar2, 0) - EVT_CALL(TranslateModel, MODEL_o1961, 0, LVar2, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(MakeLerp, -100, -250, 30, EASING_LINEAR) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, 10) - EVT_SETF(LVar2, 0) - EVT_SUBF(LVar2, LVar0) - EVT_CALL(TranslateGroup, MODEL_g279, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o1959, 0, LVar2, 0) - EVT_CALL(TranslateModel, MODEL_o1960, 0, LVar2, 0) - EVT_CALL(TranslateModel, MODEL_o1961, 0, LVar2, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeLerp, 0, -100, 60, EASING_QUADRATIC_IN) + Label(10) + Call(UpdateLerp) + DivF(LVar0, 10) + SetF(LVar2, 0) + SubF(LVar2, LVar0) + Call(TranslateGroup, MODEL_g279, 0, LVar0, 0) + Call(TranslateModel, MODEL_o1959, 0, LVar2, 0) + Call(TranslateModel, MODEL_o1960, 0, LVar2, 0) + Call(TranslateModel, MODEL_o1961, 0, LVar2, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(MakeLerp, -100, -250, 30, EASING_LINEAR) + Label(20) + Call(UpdateLerp) + DivF(LVar0, 10) + SetF(LVar2, 0) + SubF(LVar2, LVar0) + Call(TranslateGroup, MODEL_g279, 0, LVar0, 0) + Call(TranslateModel, MODEL_o1959, 0, LVar2, 0) + Call(TranslateModel, MODEL_o1960, 0, LVar2, 0) + Call(TranslateModel, MODEL_o1961, 0, LVar2, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Return + End }; EvtScript N(EVS_FillLowerSand) = { - EVT_CALL(MakeTransformGroup, MODEL_g277) - EVT_CALL(MakeLerp, -200, 0, 120, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, 10) - EVT_CALL(TranslateGroup, MODEL_g277, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o1681, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeTransformGroup, MODEL_g277) + Call(MakeLerp, -200, 0, 120, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + DivF(LVar0, 10) + Call(TranslateGroup, MODEL_g277, 0, LVar0, 0) + Call(TranslateModel, MODEL_o1681, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Return + End }; EvtScript N(EVS_LowerSandColumn) = { - EVT_CALL(MakeLerp, 0, -200, 10, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o1682, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeLerp, 0, -200, 10, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o1682, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Return + End }; EvtScript N(EVS_Scene_DrainSand) = { - EVT_WAIT(5) - EVT_CALL(InterpPlayerYaw, 98, 0) - EVT_CALL(EnableModel, MODEL_o1675, TRUE) - EVT_CALL(EnableModel, MODEL_o1676, TRUE) - EVT_CALL(EnableModel, MODEL_o1677, TRUE) - EVT_CALL(EnableModel, MODEL_o1678, TRUE) - EVT_CALL(EnableModel, MODEL_o1679, TRUE) - EVT_CALL(EnableModel, MODEL_o1680, TRUE) - EVT_CALL(EnableModel, MODEL_o1681, TRUE) - EVT_CALL(EnableModel, MODEL_o1682, TRUE) - EVT_EXEC(N(EVS_Camera_LookAtDrain)) - EVT_WAIT(30) - EVT_EXEC(N(EVS_TexPan_UpperSand)) - EVT_EXEC(N(EVS_RescaleDrainingSand)) - EVT_EXEC(N(EVS_DrainUpperSand)) - EVT_CALL(PlaySound, SOUND_ISK_DRAINING_SAND) - EVT_WAIT(75) - EVT_EXEC(N(EVS_Camera_LookBelow)) - EVT_WAIT(30) - EVT_EXEC(N(EVS_TexPan_LowerSand)) - EVT_EXEC(N(EVS_FillLowerSand)) - EVT_CALL(PlaySound, SOUND_ISK_DRAINING_SAND | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_WAIT(120) - EVT_EXEC(N(EVS_LowerSandColumn)) - EVT_WAIT(5) - EVT_EXEC(N(EVS_CollapseSandPile)) - EVT_CALL(PlaySound, SOUND_ISK_DRAINING_SAND | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_WAIT(10) - EVT_CALL(EnableModel, MODEL_o1686, FALSE) - EVT_CALL(EnableModel, MODEL_o1687, FALSE) - EVT_CALL(EnableModel, MODEL_o1688, FALSE) - EVT_CALL(EnableModel, MODEL_o1689, FALSE) - EVT_CALL(EnableModel, MODEL_o1690, FALSE) - EVT_CALL(EnableModel, MODEL_o1691, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1689, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1690, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1691, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o1675, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o1676, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o1677, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_o2047, TRUE) - EVT_CALL(EnableModel, MODEL_o2048, TRUE) - EVT_CALL(EnableModel, MODEL_o2049, TRUE) - EVT_CALL(EnableModel, MODEL_o2050, TRUE) - EVT_CALL(EnableModel, MODEL_o2051, TRUE) - EVT_CALL(EnableModel, MODEL_o2052, FALSE) - EVT_CALL(EnableModel, MODEL_o2053, FALSE) - EVT_CALL(EnableModel, MODEL_o2054, FALSE) - EVT_CALL(EnableModel, MODEL_o2055, FALSE) - EVT_CALL(EnableModel, MODEL_o2056, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2077, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2078, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GB_StoryProgress, STORY_CH2_DRAINED_SECOND_SAND_ROOM) - EVT_CALL(SetZoneEnabled, ZONE_o2012, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_o2016, TRUE) - EVT_WAIT(20) - EVT_EXEC(N(EVS_Camera_Reset)) - EVT_WAIT(5) - EVT_CALL(EnableModel, MODEL_o1681, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END + Wait(5) + Call(InterpPlayerYaw, 98, 0) + Call(EnableModel, MODEL_o1675, TRUE) + Call(EnableModel, MODEL_o1676, TRUE) + Call(EnableModel, MODEL_o1677, TRUE) + Call(EnableModel, MODEL_o1678, TRUE) + Call(EnableModel, MODEL_o1679, TRUE) + Call(EnableModel, MODEL_o1680, TRUE) + Call(EnableModel, MODEL_o1681, TRUE) + Call(EnableModel, MODEL_o1682, TRUE) + Exec(N(EVS_Camera_LookAtDrain)) + Wait(30) + Exec(N(EVS_TexPan_UpperSand)) + Exec(N(EVS_RescaleDrainingSand)) + Exec(N(EVS_DrainUpperSand)) + Call(PlaySound, SOUND_ISK_DRAINING_SAND) + Wait(75) + Exec(N(EVS_Camera_LookBelow)) + Wait(30) + Exec(N(EVS_TexPan_LowerSand)) + Exec(N(EVS_FillLowerSand)) + Call(PlaySound, SOUND_ISK_DRAINING_SAND | SOUND_ID_TRIGGER_CHANGE_SOUND) + Wait(120) + Exec(N(EVS_LowerSandColumn)) + Wait(5) + Exec(N(EVS_CollapseSandPile)) + Call(PlaySound, SOUND_ISK_DRAINING_SAND | SOUND_ID_TRIGGER_CHANGE_SOUND) + Wait(10) + Call(EnableModel, MODEL_o1686, FALSE) + Call(EnableModel, MODEL_o1687, FALSE) + Call(EnableModel, MODEL_o1688, FALSE) + Call(EnableModel, MODEL_o1689, FALSE) + Call(EnableModel, MODEL_o1690, FALSE) + Call(EnableModel, MODEL_o1691, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1689, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1690, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1691, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o1675, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o1676, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o1677, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_o2047, TRUE) + Call(EnableModel, MODEL_o2048, TRUE) + Call(EnableModel, MODEL_o2049, TRUE) + Call(EnableModel, MODEL_o2050, TRUE) + Call(EnableModel, MODEL_o2051, TRUE) + Call(EnableModel, MODEL_o2052, FALSE) + Call(EnableModel, MODEL_o2053, FALSE) + Call(EnableModel, MODEL_o2054, FALSE) + Call(EnableModel, MODEL_o2055, FALSE) + Call(EnableModel, MODEL_o2056, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2077, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2078, COLLIDER_FLAGS_UPPER_MASK) + Set(GB_StoryProgress, STORY_CH2_DRAINED_SECOND_SAND_ROOM) + Call(SetZoneEnabled, ZONE_o2012, FALSE) + Call(SetZoneEnabled, ZONE_o2016, TRUE) + Wait(20) + Exec(N(EVS_Camera_Reset)) + Wait(5) + Call(EnableModel, MODEL_o1681, FALSE) + Call(DisablePlayerInput, FALSE) + Unbind + Return + End }; EvtScript N(EVS_SetupSand) = { - EVT_SET(AF_ISK06_SandSwitchActivated, FALSE) - EVT_CALL(MakeTransformGroup, MODEL_g279) - EVT_IF_LT(GB_StoryProgress, STORY_CH2_DRAINED_SECOND_SAND_ROOM) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Scene_DrainSand)), TRIGGER_AREA_FLAG_SET, AF_ISK06_SandSwitchActivated, 1, 0) - EVT_CALL(EnableModel, MODEL_o1675, FALSE) - EVT_CALL(EnableModel, MODEL_o1676, FALSE) - EVT_CALL(EnableModel, MODEL_o1677, FALSE) - EVT_CALL(EnableModel, MODEL_o1678, FALSE) - EVT_CALL(EnableModel, MODEL_o1679, FALSE) - EVT_CALL(EnableModel, MODEL_o1680, FALSE) - EVT_CALL(EnableModel, MODEL_o1681, FALSE) - EVT_CALL(EnableModel, MODEL_o1682, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1675, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1676, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1677, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_o2047, FALSE) - EVT_CALL(EnableModel, MODEL_o2048, FALSE) - EVT_CALL(EnableModel, MODEL_o2049, FALSE) - EVT_CALL(EnableModel, MODEL_o2050, FALSE) - EVT_CALL(EnableModel, MODEL_o2051, FALSE) - EVT_EXEC(N(EVS_TexPan_DrippingSand)) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_o1686, FALSE) - EVT_CALL(EnableModel, MODEL_o1687, FALSE) - EVT_CALL(EnableModel, MODEL_o1688, FALSE) - EVT_CALL(EnableModel, MODEL_o1689, FALSE) - EVT_CALL(EnableModel, MODEL_o1690, FALSE) - EVT_CALL(EnableModel, MODEL_o1691, FALSE) - EVT_CALL(EnableModel, MODEL_o1681, FALSE) - EVT_CALL(EnableModel, MODEL_o1682, FALSE) - EVT_CALL(EnableModel, MODEL_o2052, FALSE) - EVT_CALL(EnableModel, MODEL_o2053, FALSE) - EVT_CALL(EnableModel, MODEL_o2054, FALSE) - EVT_CALL(EnableModel, MODEL_o2055, FALSE) - EVT_CALL(EnableModel, MODEL_o2056, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2077, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2078, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_o2057, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1689, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1690, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1691, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH2_DRAINED_SECOND_SAND_ROOM) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_o2057, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END + Set(AF_ISK06_SandSwitchActivated, FALSE) + Call(MakeTransformGroup, MODEL_g279) + IfLt(GB_StoryProgress, STORY_CH2_DRAINED_SECOND_SAND_ROOM) + BindTrigger(Ref(N(EVS_Scene_DrainSand)), TRIGGER_AREA_FLAG_SET, AF_ISK06_SandSwitchActivated, 1, 0) + Call(EnableModel, MODEL_o1675, FALSE) + Call(EnableModel, MODEL_o1676, FALSE) + Call(EnableModel, MODEL_o1677, FALSE) + Call(EnableModel, MODEL_o1678, FALSE) + Call(EnableModel, MODEL_o1679, FALSE) + Call(EnableModel, MODEL_o1680, FALSE) + Call(EnableModel, MODEL_o1681, FALSE) + Call(EnableModel, MODEL_o1682, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1675, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1676, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1677, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_o2047, FALSE) + Call(EnableModel, MODEL_o2048, FALSE) + Call(EnableModel, MODEL_o2049, FALSE) + Call(EnableModel, MODEL_o2050, FALSE) + Call(EnableModel, MODEL_o2051, FALSE) + Exec(N(EVS_TexPan_DrippingSand)) + Else + Call(EnableModel, MODEL_o1686, FALSE) + Call(EnableModel, MODEL_o1687, FALSE) + Call(EnableModel, MODEL_o1688, FALSE) + Call(EnableModel, MODEL_o1689, FALSE) + Call(EnableModel, MODEL_o1690, FALSE) + Call(EnableModel, MODEL_o1691, FALSE) + Call(EnableModel, MODEL_o1681, FALSE) + Call(EnableModel, MODEL_o1682, FALSE) + Call(EnableModel, MODEL_o2052, FALSE) + Call(EnableModel, MODEL_o2053, FALSE) + Call(EnableModel, MODEL_o2054, FALSE) + Call(EnableModel, MODEL_o2055, FALSE) + Call(EnableModel, MODEL_o2056, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2077, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2078, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_o2057, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1689, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1690, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1691, COLLIDER_FLAGS_UPPER_MASK) + EndIf + IfLt(GB_StoryProgress, STORY_CH2_DRAINED_SECOND_SAND_ROOM) + Else + Call(EnableModel, MODEL_o2057, FALSE) + EndIf + Return + End }; diff --git a/src/world/area_isk/isk_06/isk_06_4_switch.c b/src/world/area_isk/isk_06/isk_06_4_switch.c index 2a6416a69ee..78f4c33004f 100644 --- a/src/world/area_isk/isk_06/isk_06_4_switch.c +++ b/src/world/area_isk/isk_06/isk_06_4_switch.c @@ -3,55 +3,55 @@ extern EvtScript N(EVS_OnTouch_DrainSwitch); EvtScript N(EVS_SetupSwitch) = { - EVT_CALL(ParentColliderToModel, COLLIDER_o2090, MODEL_g336) - EVT_CALL(ParentColliderToModel, COLLIDER_o2091, MODEL_g336) - EVT_IF_EQ(AF_ISK06_SandSwitchActivated, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_DrainSwitch)), TRIGGER_FLOOR_TOUCH, COLLIDER_o2091, 1, 0) - EVT_ELSE - EVT_CALL(TranslateModel, MODEL_g336, 0, -14, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o2090) - EVT_CALL(UpdateColliderTransform, COLLIDER_o2091) - EVT_END_IF - EVT_RETURN - EVT_END + Call(ParentColliderToModel, COLLIDER_o2090, MODEL_g336) + Call(ParentColliderToModel, COLLIDER_o2091, MODEL_g336) + IfEq(AF_ISK06_SandSwitchActivated, FALSE) + BindTrigger(Ref(N(EVS_OnTouch_DrainSwitch)), TRIGGER_FLOOR_TOUCH, COLLIDER_o2091, 1, 0) + Else + Call(TranslateModel, MODEL_g336, 0, -14, 0) + Call(UpdateColliderTransform, COLLIDER_o2090) + Call(UpdateColliderTransform, COLLIDER_o2091) + EndIf + Return + End }; EvtScript N(EVS_OnTouch_DrainSwitch) = { - EVT_CALL(IsPlayerOnValidFloor, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_LABEL(5) - EVT_WAIT(1) - EVT_CALL(PartnerCanUseAbility, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_GOTO(5) - EVT_END_IF - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar1, -80) - EVT_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(2.5)) - EVT_CALL(NpcJump0, NPC_PARTNER, 343, -80, -421, 10) - EVT_WAIT(10) - EVT_CALL(EnablePartnerAI) - EVT_END_THREAD - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, COLLIDER_o2091, SOUND_FLOOR_SWITCH_DEPRESS, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, -14, 30, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_g336, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o2090) - EVT_CALL(UpdateColliderTransform, COLLIDER_o2091) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, COLLIDER_o2091, SOUND_FLOOR_SWITCH_ACTIVATE, SOUND_SPACE_DEFAULT) - EVT_SET(AF_ISK06_SandSwitchActivated, TRUE) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(IsPlayerOnValidFloor, LVar0) + IfEq(LVar0, FALSE) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Label(5) + Wait(1) + Call(PartnerCanUseAbility, LVar0) + IfEq(LVar0, TRUE) + Goto(5) + EndIf + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + IfLt(LVar1, -80) + Thread + Call(DisablePartnerAI, 0) + Call(SetNpcJumpscale, NPC_PARTNER, Float(2.5)) + Call(NpcJump0, NPC_PARTNER, 343, -80, -421, 10) + Wait(10) + Call(EnablePartnerAI) + EndThread + EndIf + Call(PlaySoundAtCollider, COLLIDER_o2091, SOUND_FLOOR_SWITCH_DEPRESS, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, -14, 30, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(TranslateModel, MODEL_g336, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o2090) + Call(UpdateColliderTransform, COLLIDER_o2091) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(PlaySoundAtCollider, COLLIDER_o2091, SOUND_FLOOR_SWITCH_ACTIVATE, SOUND_SPACE_DEFAULT) + Set(AF_ISK06_SandSwitchActivated, TRUE) + Unbind + Return + End }; diff --git a/src/world/area_isk/isk_07/isk_07_1_main.c b/src/world/area_isk/isk_07/isk_07_1_main.c index 970eacfa824..dbec0cbc963 100644 --- a/src/world/area_isk/isk_07/isk_07_1_main.c +++ b/src/world/area_isk/isk_07/isk_07_1_main.c @@ -4,38 +4,38 @@ EvtScript N(EVS_ExitWalk_isk_08_2) = EVT_EXIT_WALK(40, isk_07_ENTRY_0, "isk_08", EvtScript N(EVS_ExitWalk_isk_04_1) = EVT_EXIT_WALK(40, isk_07_ENTRY_1, "isk_04", isk_04_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_08_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_04_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_isk_08_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_isk_04_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) - EVT_CALL(SetSpriteShading, SHADING_ISK_07) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_IF_EQ(GF_ISK07_Defeated_Mummies, FALSE) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupLock)) - EVT_EXEC(N(EVS_SetupStairs)) - EVT_EXEC(N(EVS_SetupSwitch)) - EVT_EXEC(N(EVS_SetupSarcophagi)) + Set(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) + Call(SetSpriteShading, SHADING_ISK_07) + SetUP_CAMERA_ALT_NO_LEAD() + IfEq(GF_ISK07_Defeated_Mummies, FALSE) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + EndIf + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupLock)) + Exec(N(EVS_SetupStairs)) + Exec(N(EVS_SetupSwitch)) + Exec(N(EVS_SetupSarcophagi)) #if VERSION_PAL - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) #else - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_CASE_LT(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) - EVT_CASE_GE(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_END_SWITCH + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + CaseLt(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) + CaseGe(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + EndSwitch #endif - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_isk/isk_07/isk_07_2_entity.c b/src/world/area_isk/isk_07/isk_07_2_entity.c index dd0273c41dc..01e5b8b1190 100644 --- a/src/world/area_isk/isk_07/isk_07_2_entity.c +++ b/src/world/area_isk/isk_07/isk_07_2_entity.c @@ -3,44 +3,44 @@ #include "effects.h" EvtScript N(EVS_HitBlock_Trigger) = { - EVT_SET(GF_ISK07_OpenedSarcophagi, TRUE) - EVT_RETURN - EVT_END + Set(GF_ISK07_OpenedSarcophagi, TRUE) + Return + End }; EvtScript N(EVS_SmashBlock_Stone) = { - EVT_SET(GF_ISK07_Hammer2Block, TRUE) - EVT_RETURN - EVT_END + Set(GF_ISK07_Hammer2Block, TRUE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_ISK07_UnlockedDoor, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), -300, -380, 530, 50, MAKE_ENTITY_END) - EVT_SET(MV_LockEntityID, LVar0) - EVT_END_IF - EVT_IF_EQ(GF_ISK07_Hammer2Block, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer2Block_WideX), 470, -250, 270, 150, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_SmashBlock_Stone))) - EVT_END_IF - EVT_IF_EQ(GF_ISK07_OpenedSarcophagi, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_TriggerBlock), -250, -330, 545, -25, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_HitBlock_Trigger))) - EVT_END_IF - EVT_IF_EQ(GF_ISK07_Defeated_Mummies, TRUE) - EVT_CALL(MakeItemEntity, ITEM_RUINS_KEY, -250, -390, 545, ITEM_SPAWN_MODE_KEY, GF_ISK07_Item_RuinsKey) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 415, -193, 291, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 291, -193, 415, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 131, -193, 489, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -44, -193, 505, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -214, -193, 459, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 415, -323, 291, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 291, -323, 415, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 131, -323, 489, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -44, -323, 505, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -214, -323, 459, EVT_FLOAT(0.3), LVar0) - EVT_CALL(MakeItemEntity, ITEM_ARTIFACT, 490, -250, 215, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_ISK07_Item_Artifact) - EVT_RETURN - EVT_END + IfEq(GF_ISK07_UnlockedDoor, FALSE) + Call(MakeEntity, Ref(Entity_Padlock), -300, -380, 530, 50, MAKE_ENTITY_END) + Set(MV_LockEntityID, LVar0) + EndIf + IfEq(GF_ISK07_Hammer2Block, FALSE) + Call(MakeEntity, Ref(Entity_Hammer2Block_WideX), 470, -250, 270, 150, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_SmashBlock_Stone))) + EndIf + IfEq(GF_ISK07_OpenedSarcophagi, FALSE) + Call(MakeEntity, Ref(Entity_TriggerBlock), -250, -330, 545, -25, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_HitBlock_Trigger))) + EndIf + IfEq(GF_ISK07_Defeated_Mummies, TRUE) + Call(MakeItemEntity, ITEM_RUINS_KEY, -250, -390, 545, ITEM_SPAWN_MODE_KEY, GF_ISK07_Item_RuinsKey) + EndIf + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 415, -193, 291, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 291, -193, 415, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 131, -193, 489, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -44, -193, 505, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -214, -193, 459, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 415, -323, 291, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 291, -323, 415, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 131, -323, 489, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -44, -323, 505, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -214, -323, 459, Float(0.3), LVar0) + Call(MakeItemEntity, ITEM_ARTIFACT, 490, -250, 215, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_ISK07_Item_Artifact) + Return + End }; diff --git a/src/world/area_isk/isk_07/isk_07_3_npc.c b/src/world/area_isk/isk_07/isk_07_3_npc.c index 8a00f754ca4..758d5338f59 100644 --- a/src/world/area_isk/isk_07/isk_07_3_npc.c +++ b/src/world/area_isk/isk_07/isk_07_3_npc.c @@ -33,143 +33,143 @@ API_CALLABLE(N(IsLastEnemy)) { } EvtScript N(EVS_NpcDefeat_Pokey_01) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_IF_EQ(GF_ISK07_Defeated_Mummies, FALSE) - EVT_THREAD - EVT_CALL(N(IsLastEnemy)) - EVT_IF_EQ(LVar1, TRUE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(PlaySound, SOUND_CHIME_SOLVED_PUZZLE) - EVT_WAIT(30) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -150, -390, 571) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -251, -390, 553) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -251, -390, 553) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(45) - EVT_CALL(MakeItemEntity, ITEM_RUINS_KEY, -250, -240, 545, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_ISK07_Item_RuinsKey) - EVT_SET(GF_ISK07_Defeated_Mummies, TRUE) - EVT_EXEC_WAIT(N(EVS_OpenEntryDoor)) - EVT_WAIT(60) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_END_THREAD - EVT_END_IF - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(OnPlayerFled, 0) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + IfEq(GF_ISK07_Defeated_Mummies, FALSE) + Thread + Call(N(IsLastEnemy)) + IfEq(LVar1, TRUE) + Call(DisablePlayerInput, TRUE) + Call(PlaySound, SOUND_CHIME_SOLVED_PUZZLE) + Wait(30) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(UseSettingsFrom, CAM_DEFAULT, -150, -390, 571) + Call(UseSettingsFrom, CAM_DEFAULT, -251, -390, 553) + Call(SetPanTarget, CAM_DEFAULT, -251, -390, 553) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(45) + Call(MakeItemEntity, ITEM_RUINS_KEY, -250, -240, 545, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_ISK07_Item_RuinsKey) + Set(GF_ISK07_Defeated_Mummies, TRUE) + ExecWait(N(EVS_OpenEntryDoor)) + Wait(60) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Call(DisablePlayerInput, FALSE) + EndIf + EndThread + EndIf + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_FLED) + Call(OnPlayerFled, 0) + CaseEq(OUTCOME_ENEMY_FLED) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; EvtScript N(EVS_NpcIdle_Pokey_01) = { - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 1) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) - EVT_LABEL(1) - EVT_IF_EQ(AF_ISK07_MummiesReleased, FALSE) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(SetNpcYaw, NPC_SELF, 105) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, -140, 528, 10) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_BEGIN_WITH_CHASING, 1) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_PokeyMummy))) - EVT_RETURN - EVT_END + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 1) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) + Label(1) + IfEq(AF_ISK07_MummiesReleased, FALSE) + Wait(1) + Goto(1) + EndIf + Call(SetNpcYaw, NPC_SELF, 105) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 0) + Call(NpcMoveTo, NPC_SELF, -140, 528, 10) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_BEGIN_WITH_CHASING, 1) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_PokeyMummy))) + Return + End }; EvtScript N(EVS_NpcIdle_Pokey_02) = { - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 1) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) - EVT_LABEL(1) - EVT_IF_EQ(AF_ISK07_MummiesReleased, FALSE) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) - EVT_WAIT(15) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, 47, 543, 10) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_BEGIN_WITH_CHASING, 1) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_PokeyMummy))) - EVT_RETURN - EVT_END + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 1) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) + Label(1) + IfEq(AF_ISK07_MummiesReleased, FALSE) + Wait(1) + Goto(1) + EndIf + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) + Wait(15) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 0) + Call(NpcMoveTo, NPC_SELF, 47, 543, 10) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_BEGIN_WITH_CHASING, 1) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_PokeyMummy))) + Return + End }; EvtScript N(EVS_NpcIdle_Pokey_03) = { - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 1) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) - EVT_LABEL(1) - EVT_IF_EQ(AF_ISK07_MummiesReleased, FALSE) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) - EVT_WAIT(15) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, 227, 489, 10) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_BEGIN_WITH_CHASING, 1) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_PokeyMummy))) - EVT_RETURN - EVT_END + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 1) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) + Label(1) + IfEq(AF_ISK07_MummiesReleased, FALSE) + Wait(1) + Goto(1) + EndIf + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) + Wait(15) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 0) + Call(NpcMoveTo, NPC_SELF, 227, 489, 10) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_BEGIN_WITH_CHASING, 1) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_PokeyMummy))) + Return + End }; EvtScript N(EVS_NpcInit_Pokey_01) = { - EVT_IF_EQ(GF_ISK07_Defeated_Mummies, FALSE) - EVT_CALL(SetSelfEnemyFlags, ENEMY_FLAG_NO_DROPS) - EVT_END_IF - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Pokey_01))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Pokey_01))) - EVT_CALL(InterpNpcYaw, NPC_SELF, 100, 0) - EVT_CALL(SetOwnerInstigatorValue, 3) - EVT_RETURN - EVT_END + IfEq(GF_ISK07_Defeated_Mummies, FALSE) + Call(SetSelfEnemyFlags, ENEMY_FLAG_NO_DROPS) + EndIf + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Pokey_01))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Pokey_01))) + Call(InterpNpcYaw, NPC_SELF, 100, 0) + Call(SetOwnerInstigatorValue, 3) + Return + End }; EvtScript N(EVS_NpcInit_Pokey_02) = { - EVT_IF_EQ(GF_ISK07_Defeated_Mummies, FALSE) - EVT_CALL(SetSelfEnemyFlags, ENEMY_FLAG_NO_DROPS) - EVT_END_IF - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Pokey_02))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Pokey_01))) - EVT_CALL(SetOwnerInstigatorValue, 3) - EVT_RETURN - EVT_END + IfEq(GF_ISK07_Defeated_Mummies, FALSE) + Call(SetSelfEnemyFlags, ENEMY_FLAG_NO_DROPS) + EndIf + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Pokey_02))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Pokey_01))) + Call(SetOwnerInstigatorValue, 3) + Return + End }; EvtScript N(EVS_NpcInit_Pokey_03) = { - EVT_IF_EQ(GF_ISK07_Defeated_Mummies, FALSE) - EVT_CALL(SetSelfEnemyFlags, ENEMY_FLAG_NO_DROPS) - EVT_END_IF - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Pokey_03))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Pokey_01))) - EVT_CALL(SetOwnerInstigatorValue, 3) - EVT_RETURN - EVT_END + IfEq(GF_ISK07_Defeated_Mummies, FALSE) + Call(SetSelfEnemyFlags, ENEMY_FLAG_NO_DROPS) + EndIf + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Pokey_03))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Pokey_01))) + Call(SetOwnerInstigatorValue, 3) + Return + End }; NpcData N(NpcData_Pokey_01) = { diff --git a/src/world/area_isk/isk_07/isk_07_4_stairs.c b/src/world/area_isk/isk_07/isk_07_4_stairs.c index 85017a0eb1e..0d6c3db9b01 100644 --- a/src/world/area_isk/isk_07/isk_07_4_stairs.c +++ b/src/world/area_isk/isk_07/isk_07_4_stairs.c @@ -1,70 +1,70 @@ #include "isk_07.h" EvtScript N(EVS_RedStairs_FlipCCW) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1994, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o2000, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o2000, SOUND_LOOP_ISK_FLIP_STAIRS, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 90, 30, EASING_QUADRATIC_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_g311, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(StopSound, SOUND_LOOP_ISK_FLIP_STAIRS) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1994, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o2000, COLLIDER_FLAGS_UPPER_MASK) + Call(PlaySoundAtCollider, COLLIDER_o2000, SOUND_LOOP_ISK_FLIP_STAIRS, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 90, 30, EASING_QUADRATIC_OUT) + Label(10) + Call(UpdateLerp) + Call(RotateModel, MODEL_g311, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(StopSound, SOUND_LOOP_ISK_FLIP_STAIRS) + Return + End }; EvtScript N(EVS_RedStairs_FlipCW) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o1994, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2000, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o1994, SOUND_LOOP_ISK_FLIP_STAIRS, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 90, 0, 30, EASING_QUADRATIC_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_g311, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(StopSound, SOUND_LOOP_ISK_FLIP_STAIRS) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o1994, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2000, COLLIDER_FLAGS_UPPER_MASK) + Call(PlaySoundAtCollider, COLLIDER_o1994, SOUND_LOOP_ISK_FLIP_STAIRS, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 90, 0, 30, EASING_QUADRATIC_OUT) + Label(10) + Call(UpdateLerp) + Call(RotateModel, MODEL_g311, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(StopSound, SOUND_LOOP_ISK_FLIP_STAIRS) + Return + End }; EvtScript N(EVS_FlipRedStairs) = { - EVT_CALL(InterpCamTargetPos, 0, 1, 369, -349, 369, 20) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 369, -349, 369) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 369, -349, 369) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_IF_EQ(MF_StairsFlipped, FALSE) - EVT_EXEC_WAIT(N(EVS_RedStairs_FlipCCW)) - EVT_SET(MF_StairsFlipped, TRUE) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_RedStairs_FlipCW)) - EVT_SET(MF_StairsFlipped, FALSE) - EVT_END_IF - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 3, EVT_FLOAT(0.1)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_SET(AF_ISK07_FlippingRedStairs, FALSE) - EVT_RETURN - EVT_END + Call(InterpCamTargetPos, 0, 1, 369, -349, 369, 20) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(UseSettingsFrom, CAM_DEFAULT, 369, -349, 369) + Call(SetPanTarget, CAM_DEFAULT, 369, -349, 369) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + IfEq(MF_StairsFlipped, FALSE) + ExecWait(N(EVS_RedStairs_FlipCCW)) + Set(MF_StairsFlipped, TRUE) + Else + ExecWait(N(EVS_RedStairs_FlipCW)) + Set(MF_StairsFlipped, FALSE) + EndIf + Call(ShakeCam, CAM_DEFAULT, 0, 3, Float(0.1)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Set(AF_ISK07_FlippingRedStairs, FALSE) + Return + End }; EvtScript N(EVS_SetupStairs) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o1994, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2000, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(MF_StairsFlipped, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_FlipRedStairs)), TRIGGER_AREA_FLAG_SET, AF_ISK07_FlippingRedStairs, 1, 0) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o1994, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2000, COLLIDER_FLAGS_UPPER_MASK) + Set(MF_StairsFlipped, FALSE) + BindTrigger(Ref(N(EVS_FlipRedStairs)), TRIGGER_AREA_FLAG_SET, AF_ISK07_FlippingRedStairs, 1, 0) + Return + End }; diff --git a/src/world/area_isk/isk_07/isk_07_5_lock.c b/src/world/area_isk/isk_07/isk_07_5_lock.c index 6ed29772857..a126a2bcb17 100644 --- a/src/world/area_isk/isk_07/isk_07_5_lock.c +++ b/src/world/area_isk/isk_07/isk_07_5_lock.c @@ -8,88 +8,88 @@ s32 N(ItemList_RuinsKey)[] = { }; EvtScript N(EVS_UnlockPrompt_RuinsDoor) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(ShowKeyChoicePopup) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_CASE_EQ(-1) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, -300, -380, 530) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_SET(GF_ISK07_UnlockedDoor, TRUE) - EVT_SET(LVar0, MV_LockEntityID) - EVT_CALL(N(RemovePadlock)) - EVT_SET(LVar1, 0) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittw, SOUND_ISK_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 65, 65, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g310, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_UNBIND - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(ShowKeyChoicePopup) + Switch(LVar0) + CaseEq(0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + CaseEq(-1) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + EndSwitch + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, -300, -380, 530) + Call(RemoveKeyItemAt, LVar1) + Set(GF_ISK07_UnlockedDoor, TRUE) + Set(LVar0, MV_LockEntityID) + Call(N(RemovePadlock)) + Set(LVar1, 0) + Wait(5) + Call(PlaySoundAtCollider, COLLIDER_deilittw, SOUND_ISK_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 65, 65, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g310, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittw, COLLIDER_FLAGS_UPPER_MASK) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Unbind + Return + End }; EvtScript N(EVS_SetupLock) = { - EVT_IF_EQ(GF_ISK07_UnlockedDoor, FALSE) - EVT_CALL(MakeTransformGroup, MODEL_g310) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_UnlockPrompt_RuinsDoor)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(ItemList_RuinsKey)), 0, 1) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_g310, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittw, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_CALL(TranslateModel, MODEL_o2057, 0, 65, 0) - EVT_CALL(TranslateModel, MODEL_o2058, 0, 65, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitte, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + IfEq(GF_ISK07_UnlockedDoor, FALSE) + Call(MakeTransformGroup, MODEL_g310) + BindPadlock(Ref(N(EVS_UnlockPrompt_RuinsDoor)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), Ref(N(ItemList_RuinsKey)), 0, 1) + Else + Call(EnableModel, MODEL_g310, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittw, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Call(TranslateModel, MODEL_o2057, 0, 65, 0) + Call(TranslateModel, MODEL_o2058, 0, 65, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitte, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_ShutEntryDoor) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilitte, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitte, SOUND_ISK_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 65, 0, 15, EASING_QUADRATIC_IN) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o2057, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o2058, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitte, SOUND_ISK_DOOR_SLAM, SOUND_SPACE_DEFAULT) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(0.3)) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilitte, COLLIDER_FLAGS_UPPER_MASK) + Call(PlaySoundAtCollider, COLLIDER_deilitte, SOUND_ISK_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 65, 0, 15, EASING_QUADRATIC_IN) + Label(10) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o2057, 0, LVar0, 0) + Call(TranslateModel, MODEL_o2058, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(PlaySoundAtCollider, COLLIDER_deilitte, SOUND_ISK_DOOR_SLAM, SOUND_SPACE_DEFAULT) + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(0.3)) + Return + End }; EvtScript N(EVS_OpenEntryDoor) = { - EVT_CALL(MakeLerp, 0, 65, 15, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o2057, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o2058, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitte, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Call(MakeLerp, 0, 65, 15, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o2057, 0, LVar0, 0) + Call(TranslateModel, MODEL_o2058, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitte, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; diff --git a/src/world/area_isk/isk_07/isk_07_6_switch.c b/src/world/area_isk/isk_07/isk_07_6_switch.c index dd418d8daa7..2fc787a193c 100644 --- a/src/world/area_isk/isk_07/isk_07_6_switch.c +++ b/src/world/area_isk/isk_07/isk_07_6_switch.c @@ -11,45 +11,45 @@ API_CALLABLE(N(WaitForPlayerTouchingGround)) { } EvtScript N(EVS_SetupSwitch) = { - EVT_CALL(ParentColliderToModel, COLLIDER_o2022, MODEL_g313) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_StairSwitch)), TRIGGER_FLOOR_TOUCH, COLLIDER_o2022, 1, 0) - EVT_RETURN - EVT_END + Call(ParentColliderToModel, COLLIDER_o2022, MODEL_g313) + BindTrigger(Ref(N(EVS_OnTouch_StairSwitch)), TRIGGER_FLOOR_TOUCH, COLLIDER_o2022, 1, 0) + Return + End }; EvtScript N(EVS_OnTouch_StairSwitch) = { - EVT_CALL(IsPlayerOnValidFloor, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o2022, SOUND_FLOOR_SWITCH_DEPRESS, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, -14, 30, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_g313, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o2022) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, COLLIDER_o2022, SOUND_FLOOR_SWITCH_ACTIVATE, SOUND_SPACE_DEFAULT) - EVT_SET(AF_ISK07_FlippingRedStairs, TRUE) - EVT_LABEL(15) - EVT_WAIT(1) - EVT_IF_EQ(AF_ISK07_FlippingRedStairs, TRUE) - EVT_GOTO(15) - EVT_END_IF - EVT_CALL(MakeLerp, -14, 0, 5, EASING_LINEAR) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_g313, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o2022) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(N(WaitForPlayerTouchingGround)) - EVT_RETURN - EVT_END + Call(IsPlayerOnValidFloor, LVar0) + IfEq(LVar0, FALSE) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(PlaySoundAtCollider, COLLIDER_o2022, SOUND_FLOOR_SWITCH_DEPRESS, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, -14, 30, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(TranslateModel, MODEL_g313, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o2022) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(PlaySoundAtCollider, COLLIDER_o2022, SOUND_FLOOR_SWITCH_ACTIVATE, SOUND_SPACE_DEFAULT) + Set(AF_ISK07_FlippingRedStairs, TRUE) + Label(15) + Wait(1) + IfEq(AF_ISK07_FlippingRedStairs, TRUE) + Goto(15) + EndIf + Call(MakeLerp, -14, 0, 5, EASING_LINEAR) + Label(20) + Call(UpdateLerp) + Call(TranslateModel, MODEL_g313, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o2022) + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Call(N(WaitForPlayerTouchingGround)) + Return + End }; diff --git a/src/world/area_isk/isk_07/isk_07_7_ambush.c b/src/world/area_isk/isk_07/isk_07_7_ambush.c index 51e01b46b24..a96473bdc83 100644 --- a/src/world/area_isk/isk_07/isk_07_7_ambush.c +++ b/src/world/area_isk/isk_07/isk_07_7_ambush.c @@ -6,135 +6,135 @@ extern EvtScript N(EVS_OpenSarcophagus2); extern EvtScript N(EVS_OpenSarcophagus3); EvtScript N(EVS_SetupSarcophagi) = { - EVT_IF_EQ(GF_ISK07_OpenedSarcophagi, FALSE) - EVT_SET(AF_ISK07_OpeningSarcophagus1, FALSE) - EVT_SET(AF_ISK07_OpeningSarcophagus2, FALSE) - EVT_SET(AF_ISK07_OpeningSarcophagus3, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2039, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2040, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2041, COLLIDER_FLAGS_UPPER_MASK) - EVT_LABEL(10) - EVT_IF_EQ(GF_ISK07_OpenedSarcophagi, FALSE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(PlaySound, SOUND_CHIME_BEGIN_AMBUSH) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcYaw, NPC_Pokey_01, 105) - EVT_CALL(SetNpcFlagBits, NPC_Pokey_01, NPC_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Pokey_02, NPC_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Pokey_03, NPC_FLAG_INVISIBLE, FALSE) - EVT_THREAD - EVT_WAIT(12) - EVT_CALL(InterpPlayerYaw, 109, 0) - EVT_WAIT(3) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_SHOCK, 1, 1, 0) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Shocked) - EVT_WAIT(20) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -151, -390, 576) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -151, -390, 576) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC(N(EVS_OpenSarcophagus1)) - EVT_WAIT(15) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 51, -390, 589) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC(N(EVS_OpenSarcophagus2)) - EVT_WAIT(15) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 239, -390, 515) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC(N(EVS_OpenSarcophagus3)) - EVT_WAIT(15) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 517, -390, 292) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC(N(EVS_ShutEntryDoor)) - EVT_WAIT(30) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_SET(AF_ISK07_MummiesReleased, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ELSE - EVT_SET(AF_ISK07_OpeningSarcophagus1, TRUE) - EVT_SET(AF_ISK07_OpeningSarcophagus2, TRUE) - EVT_SET(AF_ISK07_OpeningSarcophagus3, TRUE) - EVT_CALL(TranslateModel, MODEL_g323, 38, 0, 13) - EVT_CALL(RotateModel, MODEL_g323, 35, 0, 1, 0) - EVT_CALL(TranslateModel, MODEL_g327, 38, 0, 13) - EVT_CALL(RotateModel, MODEL_g327, 35, 0, 1, 0) - EVT_CALL(TranslateModel, MODEL_g331, 38, 0, 13) - EVT_CALL(RotateModel, MODEL_g331, 35, 0, 1, 0) - EVT_WAIT(5) - EVT_SET(AF_ISK07_OpeningSarcophagus1, FALSE) - EVT_SET(AF_ISK07_OpeningSarcophagus2, FALSE) - EVT_SET(AF_ISK07_OpeningSarcophagus3, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2036, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2037, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2038, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(AF_ISK07_MummiesReleased, TRUE) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_ISK07_OpenedSarcophagi, FALSE) + Set(AF_ISK07_OpeningSarcophagus1, FALSE) + Set(AF_ISK07_OpeningSarcophagus2, FALSE) + Set(AF_ISK07_OpeningSarcophagus3, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2039, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2040, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2041, COLLIDER_FLAGS_UPPER_MASK) + Label(10) + IfEq(GF_ISK07_OpenedSarcophagi, FALSE) + Wait(1) + Goto(10) + EndIf + Call(PlaySound, SOUND_CHIME_BEGIN_AMBUSH) + Call(DisablePlayerInput, TRUE) + Call(ShakeCam, CAM_DEFAULT, 0, 30, Float(1.0)) + Call(SetNpcYaw, NPC_Pokey_01, 105) + Call(SetNpcFlagBits, NPC_Pokey_01, NPC_FLAG_INVISIBLE, FALSE) + Call(SetNpcFlagBits, NPC_Pokey_02, NPC_FLAG_INVISIBLE, FALSE) + Call(SetNpcFlagBits, NPC_Pokey_03, NPC_FLAG_INVISIBLE, FALSE) + Thread + Wait(12) + Call(InterpPlayerYaw, 109, 0) + Wait(3) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_SHOCK, 1, 1, 0) + Call(SetPlayerAnimation, ANIM_MarioW2_Shocked) + Wait(20) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndThread + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(UseSettingsFrom, CAM_DEFAULT, -151, -390, 576) + Call(SetPanTarget, CAM_DEFAULT, -151, -390, 576) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Exec(N(EVS_OpenSarcophagus1)) + Wait(15) + Call(SetPanTarget, CAM_DEFAULT, 51, -390, 589) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Exec(N(EVS_OpenSarcophagus2)) + Wait(15) + Call(SetPanTarget, CAM_DEFAULT, 239, -390, 515) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Exec(N(EVS_OpenSarcophagus3)) + Wait(15) + Call(SetPanTarget, CAM_DEFAULT, 517, -390, 292) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Exec(N(EVS_ShutEntryDoor)) + Wait(30) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Set(AF_ISK07_MummiesReleased, TRUE) + Call(DisablePlayerInput, FALSE) + Else + Set(AF_ISK07_OpeningSarcophagus1, TRUE) + Set(AF_ISK07_OpeningSarcophagus2, TRUE) + Set(AF_ISK07_OpeningSarcophagus3, TRUE) + Call(TranslateModel, MODEL_g323, 38, 0, 13) + Call(RotateModel, MODEL_g323, 35, 0, 1, 0) + Call(TranslateModel, MODEL_g327, 38, 0, 13) + Call(RotateModel, MODEL_g327, 35, 0, 1, 0) + Call(TranslateModel, MODEL_g331, 38, 0, 13) + Call(RotateModel, MODEL_g331, 35, 0, 1, 0) + Wait(5) + Set(AF_ISK07_OpeningSarcophagus1, FALSE) + Set(AF_ISK07_OpeningSarcophagus2, FALSE) + Set(AF_ISK07_OpeningSarcophagus3, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2036, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2037, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2038, COLLIDER_FLAGS_UPPER_MASK) + Set(AF_ISK07_MummiesReleased, TRUE) + EndIf + Return + End }; EvtScript N(EVS_OpenSarcophagusAnim) = { - EVT_CALL(PlaySoundAtModel, LVar3, SOUND_SARCOPHAGUS_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(TranslateModel, LVar3, 0, 0, 13) - EVT_WAIT(3) - EVT_CALL(MakeLerp, 0, 35, 9, EASING_COS_IN_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_SET(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(1.1)) - EVT_CALL(TranslateModel, LVar3, LVar2, 0, 13) - EVT_CALL(RotateModel, LVar3, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(10) - EVT_END_IF - EVT_WAIT(3) - EVT_RETURN - EVT_END + Call(PlaySoundAtModel, LVar3, SOUND_SARCOPHAGUS_OPEN, SOUND_SPACE_DEFAULT) + Call(TranslateModel, LVar3, 0, 0, 13) + Wait(3) + Call(MakeLerp, 0, 35, 9, EASING_COS_IN_OUT) + Label(10) + Call(UpdateLerp) + Set(LVar2, LVar0) + MulF(LVar2, Float(1.1)) + Call(TranslateModel, LVar3, LVar2, 0, 13) + Call(RotateModel, LVar3, LVar0, 0, 1, 0) + Wait(1) + IfNe(LVar1, 0) + Goto(10) + EndIf + Wait(3) + Return + End }; EvtScript N(EVS_OpenSarcophagus1) = { - EVT_SET(AF_ISK07_OpeningSarcophagus1, TRUE) - EVT_SET(LVar3, MODEL_g323) - EVT_EXEC_WAIT(N(EVS_OpenSarcophagusAnim)) - EVT_SET(AF_ISK07_OpeningSarcophagus1, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2036, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o2039, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Set(AF_ISK07_OpeningSarcophagus1, TRUE) + Set(LVar3, MODEL_g323) + ExecWait(N(EVS_OpenSarcophagusAnim)) + Set(AF_ISK07_OpeningSarcophagus1, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2036, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o2039, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_OpenSarcophagus2) = { - EVT_SET(AF_ISK07_OpeningSarcophagus2, TRUE) - EVT_SET(LVar3, MODEL_g327) - EVT_EXEC_WAIT(N(EVS_OpenSarcophagusAnim)) - EVT_SET(AF_ISK07_OpeningSarcophagus2, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2037, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o2040, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Set(AF_ISK07_OpeningSarcophagus2, TRUE) + Set(LVar3, MODEL_g327) + ExecWait(N(EVS_OpenSarcophagusAnim)) + Set(AF_ISK07_OpeningSarcophagus2, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2037, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o2040, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_OpenSarcophagus3) = { - EVT_SET(AF_ISK07_OpeningSarcophagus3, TRUE) - EVT_SET(LVar3, MODEL_g331) - EVT_EXEC_WAIT(N(EVS_OpenSarcophagusAnim)) - EVT_SET(AF_ISK07_OpeningSarcophagus3, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2038, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o2041, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Set(AF_ISK07_OpeningSarcophagus3, TRUE) + Set(LVar3, MODEL_g331) + ExecWait(N(EVS_OpenSarcophagusAnim)) + Set(AF_ISK07_OpeningSarcophagus3, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2038, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o2041, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; diff --git a/src/world/area_isk/isk_08/isk_08_1_main.c b/src/world/area_isk/isk_08/isk_08_1_main.c index 364dd5e0c7f..40197c5d48d 100644 --- a/src/world/area_isk/isk_08/isk_08_1_main.c +++ b/src/world/area_isk/isk_08/isk_08_1_main.c @@ -6,35 +6,35 @@ EvtScript N(EVS_ExitWalk_isk_07_0) = EVT_EXIT_WALK(40, isk_08_ENTRY_2, "isk_07", EvtScript N(EVS_ExitWalk_isk_11_0) = EVT_EXIT_WALK(40, isk_08_ENTRY_3, "isk_11", isk_11_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_09_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_10_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_07_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_11_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_isk_09_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_isk_10_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_isk_07_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_isk_11_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) - EVT_CALL(SetSpriteShading, SHADING_ISK_08) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_SetupFlames)) - EVT_EXEC_WAIT(N(EVS_SetupBombableWall)) + Set(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) + Call(SetSpriteShading, SHADING_ISK_08) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_SetupFlames)) + ExecWait(N(EVS_SetupBombableWall)) #if VERSION_PAL - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) #else - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_CASE_LT(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) - EVT_CASE_GE(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_END_SWITCH + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + CaseLt(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) + CaseGe(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + EndSwitch #endif - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_isk/isk_08/isk_08_3_entity.c b/src/world/area_isk/isk_08/isk_08_3_entity.c index 679d3613acc..6c7db83d955 100644 --- a/src/world/area_isk/isk_08/isk_08_3_entity.c +++ b/src/world/area_isk/isk_08/isk_08_3_entity.c @@ -2,12 +2,12 @@ #include "effects.h" EvtScript N(EVS_SetupFlames) = { - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -358, -323, 358, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -459, -323, 214, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -358, -453, 358, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -459, -453, 214, EVT_FLOAT(0.3), LVar0) - EVT_RETURN - EVT_END + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -358, -323, 358, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -459, -323, 214, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -358, -453, 358, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -459, -453, 214, Float(0.3), LVar0) + Return + End }; BombTrigger N(BombPos_Wall) = { @@ -16,49 +16,49 @@ BombTrigger N(BombPos_Wall) = { }; EvtScript N(EVS_OnBlast_Wall) = { - EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 0, 36, 12, 1, 10, 30) - EVT_LOOP(10) - EVT_CALL(EnableModel, MODEL_g293, TRUE) - EVT_WAIT(1) - EVT_CALL(EnableModel, MODEL_g293, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittw, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GF_ISK_BombedWallFrom08, TRUE) - EVT_UNBIND - EVT_RETURN - EVT_END + PlayEffect(EFFECT_BOMBETTE_BREAKING, 0, 36, 12, 1, 10, 30) + Loop(10) + Call(EnableModel, MODEL_g293, TRUE) + Wait(1) + Call(EnableModel, MODEL_g293, FALSE) + Wait(1) + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittw, COLLIDER_FLAGS_UPPER_MASK) + Set(GF_ISK_BombedWallFrom08, TRUE) + Unbind + Return + End }; EvtScript N(EVS_HideDestroyedWall) = { - EVT_CALL(EnableModel, MODEL_o2012, FALSE) - EVT_CALL(EnableModel, MODEL_o2019, FALSE) - EVT_CALL(EnableModel, MODEL_o2021, FALSE) - EVT_CALL(EnableModel, MODEL_o2018, FALSE) - EVT_CALL(EnableModel, MODEL_o2020, FALSE) - EVT_CALL(EnableModel, MODEL_o2022, FALSE) - EVT_CALL(EnableModel, MODEL_o2023, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2029, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2030, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2032, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_o2012, FALSE) + Call(EnableModel, MODEL_o2019, FALSE) + Call(EnableModel, MODEL_o2021, FALSE) + Call(EnableModel, MODEL_o2018, FALSE) + Call(EnableModel, MODEL_o2020, FALSE) + Call(EnableModel, MODEL_o2022, FALSE) + Call(EnableModel, MODEL_o2023, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2029, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2030, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2032, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_SetupBombableWall) = { - EVT_IF_EQ(GF_ISK_BombedWallFrom08, FALSE) - EVT_IF_EQ(GF_ISK_BombedWallFrom10, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnBlast_Wall)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Wall)), 1, 0) - EVT_EXEC_WAIT(N(EVS_HideDestroyedWall)) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_g293, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittw, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_ELSE - EVT_CALL(EnableModel, MODEL_g293, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittw, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC_WAIT(N(EVS_HideDestroyedWall)) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_ISK_BombedWallFrom08, FALSE) + IfEq(GF_ISK_BombedWallFrom10, FALSE) + BindTrigger(Ref(N(EVS_OnBlast_Wall)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Wall)), 1, 0) + ExecWait(N(EVS_HideDestroyedWall)) + Else + Call(EnableModel, MODEL_g293, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittw, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Else + Call(EnableModel, MODEL_g293, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittw, COLLIDER_FLAGS_UPPER_MASK) + ExecWait(N(EVS_HideDestroyedWall)) + EndIf + Return + End }; diff --git a/src/world/area_isk/isk_09/isk_09_1_music.c b/src/world/area_isk/isk_09/isk_09_1_music.c index 248b5c3dcbe..c6b19d93f0e 100644 --- a/src/world/area_isk/isk_09/isk_09_1_music.c +++ b/src/world/area_isk/isk_09/isk_09_1_music.c @@ -1,43 +1,43 @@ #include "isk_09.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_EQ(GF_ISK09_ThirdWarning, FALSE) - EVT_THREAD - EVT_CALL(FadeInMusic, 1, SONG_TUTANKOOPA_WARNING, 0, 2000, 0, 127) - EVT_CALL(FadeOutMusic, 0, 2000) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(20) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH2_00DF, 160, 40) - EVT_SET(GF_ISK09_ThirdWarning, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_CALL(FadeInMusic, 0, SONG_DRY_DRY_RUINS, 0, 2000, 0, 127) - EVT_CALL(FadeOutMusic, 1, 2000) - EVT_END_THREAD - EVT_RETURN - EVT_END_IF + IfEq(GF_ISK09_ThirdWarning, FALSE) + Thread + Call(FadeInMusic, 1, SONG_TUTANKOOPA_WARNING, 0, 2000, 0, 127) + Call(FadeOutMusic, 0, 2000) + Call(DisablePlayerInput, TRUE) + Wait(20) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(ShowMessageAtScreenPos, MSG_CH2_00DF, 160, 40) + Set(GF_ISK09_ThirdWarning, TRUE) + Call(DisablePlayerInput, FALSE) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Call(FadeInMusic, 0, SONG_DRY_DRY_RUINS, 0, 2000, 0, 127) + Call(FadeOutMusic, 1, 2000) + EndThread + Return + EndIf #if VERSION_PAL - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) #else - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_CASE_LT(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) - EVT_CASE_GE(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_END_SWITCH + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + CaseLt(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) + CaseGe(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + EndSwitch #endif - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_PlayUpgradeSong) = { - EVT_CALL(PushSong, SONG_ITEM_UPGRADE, 1) - EVT_WAIT(130) - EVT_CALL(PopSong) - EVT_RETURN - EVT_END + Call(PushSong, SONG_ITEM_UPGRADE, 1) + Wait(130) + Call(PopSong) + Return + End }; diff --git a/src/world/area_isk/isk_09/isk_09_2_main.c b/src/world/area_isk/isk_09/isk_09_2_main.c index 3a0000182ca..dbc987e15e4 100644 --- a/src/world/area_isk/isk_09/isk_09_2_main.c +++ b/src/world/area_isk/isk_09/isk_09_2_main.c @@ -3,21 +3,21 @@ EvtScript N(EVS_ExitWalk_isk_08_0) = EVT_EXIT_WALK(40, isk_09_ENTRY_0, "isk_08", isk_08_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_08_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_isk_08_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) - EVT_CALL(SetSpriteShading, SHADING_ISK_09) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupSwitches)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC_WAIT(N(EVS_SetupStairs)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) + Call(SetSpriteShading, SHADING_ISK_09) + SetUP_CAMERA_ALT_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupSwitches)) + Exec(N(EVS_SetupMusic)) + ExecWait(N(EVS_SetupStairs)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_isk/isk_09/isk_09_3_entity.c b/src/world/area_isk/isk_09/isk_09_3_entity.c index f8114fd4df8..5152c624319 100644 --- a/src/world/area_isk/isk_09/isk_09_3_entity.c +++ b/src/world/area_isk/isk_09/isk_09_3_entity.c @@ -11,91 +11,91 @@ API_CALLABLE(N(DismissGotItem)) { } EvtScript N(EVS_SetChestCollisionClosed) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_takara00, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_takara01, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_takara00, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_takara01, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_SetChestCollisionOpened) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_takara00, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_takara01, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_takara00, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_takara01, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_SetupGiantChest_SuperHammer) = { - EVT_IF_EQ(GF_ISK09_GiantChest, FALSE) - EVT_EXEC_WAIT(N(EVS_SetChestCollisionClosed)) - EVT_LOOP(0) - EVT_IF_EQ(GF_ISK09_GiantChest, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PartnerIsFlying, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(NpcFlyTo, NPC_PARTNER, -222, -347, -531, 20, 0, EASING_LINEAR) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 70, 0) - EVT_LOOP(0) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_SUPER_HAMMER) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EnablePartnerAI) - EVT_END_THREAD - EVT_END_IF - EVT_WAIT(60) - EVT_EXEC(N(EVS_PlayUpgradeSong)) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_017D, 160, 40) - EVT_CALL(N(DismissGotItem)) - EVT_SET(GB_StoryProgress, STORY_CH2_GOT_SUPER_HAMMER) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_SetChestCollisionOpened)) - EVT_RETURN - EVT_END + IfEq(GF_ISK09_GiantChest, FALSE) + ExecWait(N(EVS_SetChestCollisionClosed)) + Loop(0) + IfEq(GF_ISK09_GiantChest, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(PartnerIsFlying, LVar0) + IfEq(LVar0, FALSE) + Thread + Call(DisablePartnerAI, 0) + Call(NpcFlyTo, NPC_PARTNER, -222, -347, -531, 20, 0, EASING_LINEAR) + Call(InterpNpcYaw, NPC_PARTNER, 70, 0) + Loop(0) + IfEq(GB_StoryProgress, STORY_CH2_GOT_SUPER_HAMMER) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(EnablePartnerAI) + EndThread + EndIf + Wait(60) + Exec(N(EVS_PlayUpgradeSong)) + Call(ShowMessageAtScreenPos, MSG_Menus_017D, 160, 40) + Call(N(DismissGotItem)) + Set(GB_StoryProgress, STORY_CH2_GOT_SUPER_HAMMER) + EndIf + ExecWait(N(EVS_SetChestCollisionOpened)) + Return + End }; EvtScript N(EVS_OpenChest_SlowGo) = EVT_OPEN_CHEST_BADGE(ITEM_SLOW_GO, GF_ISK09_Chest_SlowGo); EvtScript N(EVS_SmashBlock_Stone) = { - EVT_SET(GF_ISK09_Hammer2Block, TRUE) - EVT_RETURN - EVT_END + Set(GF_ISK09_Hammer2Block, TRUE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_GiantChest), -158, -358, -562, 283, ITEM_SUPER_HAMMER, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_ISK09_GiantChest) - EVT_EXEC(N(EVS_SetupGiantChest_SuperHammer)) - EVT_IF_EQ(GF_ISK09_Hammer2Block, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer2Block), -274, -390, -517, 115, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_SmashBlock_Stone))) - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 50, -240, -535, 222, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_ISK09_Chest_SlowGo) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenChest_SlowGo))) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -503, -323, -44, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -481, -323, -130, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -413, -323, -290, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -358, -323, -358, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -211, -323, -459, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -130, -323, -486, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -503, -193, -44, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -481, -193, -130, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -413, -193, -290, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -358, -193, -358, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -211, -193, -459, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -130, -193, -486, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -503, -63, -44, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -481, -63, -130, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -413, -63, -290, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -358, -63, -358, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -211, -63, -459, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -130, -63, -486, EVT_FLOAT(0.3), LVar0) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_GiantChest), -158, -358, -562, 283, ITEM_SUPER_HAMMER, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_ISK09_GiantChest) + Exec(N(EVS_SetupGiantChest_SuperHammer)) + IfEq(GF_ISK09_Hammer2Block, FALSE) + Call(MakeEntity, Ref(Entity_Hammer2Block), -274, -390, -517, 115, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_SmashBlock_Stone))) + EndIf + Call(MakeEntity, Ref(Entity_Chest), 50, -240, -535, 222, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_ISK09_Chest_SlowGo) + Call(AssignScript, Ref(N(EVS_OpenChest_SlowGo))) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -503, -323, -44, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -481, -323, -130, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -413, -323, -290, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -358, -323, -358, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -211, -323, -459, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -130, -323, -486, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -503, -193, -44, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -481, -193, -130, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -413, -193, -290, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -358, -193, -358, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -211, -193, -459, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -130, -193, -486, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -503, -63, -44, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -481, -63, -130, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -413, -63, -290, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -358, -63, -358, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -211, -63, -459, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -130, -63, -486, Float(0.3), LVar0) + Return + End }; diff --git a/src/world/area_isk/isk_09/isk_09_4_stairs.c b/src/world/area_isk/isk_09/isk_09_4_stairs.c index 016403cc77d..71b28eb5d41 100644 --- a/src/world/area_isk/isk_09/isk_09_4_stairs.c +++ b/src/world/area_isk/isk_09/isk_09_4_stairs.c @@ -1,251 +1,251 @@ #include "isk_09.h" EvtScript N(EVS_FlipStairsCCW) = { - EVT_WAIT(20) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVar3, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, LVar4, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlaySoundAtCollider, LVar4, SOUND_LOOP_ISK_FLIP_STAIRS, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 90, LVar5, EASING_COS_IN) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, LVar2, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(StopSound, SOUND_LOOP_ISK_FLIP_STAIRS) - EVT_RETURN - EVT_END + Wait(20) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVar3, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, LVar4, COLLIDER_FLAGS_UPPER_MASK) + Call(PlaySoundAtCollider, LVar4, SOUND_LOOP_ISK_FLIP_STAIRS, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 90, LVar5, EASING_COS_IN) + Label(10) + Call(UpdateLerp) + Call(RotateModel, LVar2, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(StopSound, SOUND_LOOP_ISK_FLIP_STAIRS) + Return + End }; EvtScript N(EVS_FlipStairsCW) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, LVar3, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVar4, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlaySoundAtCollider, LVar3, SOUND_LOOP_ISK_FLIP_STAIRS, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 90, 0, LVar5, EASING_COS_IN) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, LVar2, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(StopSound, SOUND_LOOP_ISK_FLIP_STAIRS) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, LVar3, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVar4, COLLIDER_FLAGS_UPPER_MASK) + Call(PlaySoundAtCollider, LVar3, SOUND_LOOP_ISK_FLIP_STAIRS, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 90, 0, LVar5, EASING_COS_IN) + Label(10) + Call(UpdateLerp) + Call(RotateModel, LVar2, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(StopSound, SOUND_LOOP_ISK_FLIP_STAIRS) + Return + End }; EvtScript N(EVS_FlipStairsCCW_BottomBlue) = { - EVT_SET(LVar2, MODEL_g321) - EVT_SET(LVar3, COLLIDER_o2031) - EVT_SET(LVar4, COLLIDER_o2032) - EVT_SET(LVar5, 30) - EVT_EXEC_WAIT(N(EVS_FlipStairsCCW)) - EVT_RETURN - EVT_END + Set(LVar2, MODEL_g321) + Set(LVar3, COLLIDER_o2031) + Set(LVar4, COLLIDER_o2032) + Set(LVar5, 30) + ExecWait(N(EVS_FlipStairsCCW)) + Return + End }; EvtScript N(EVS_FlipStairsCW_BottomBlue) = { - EVT_SET(LVar2, MODEL_g321) - EVT_SET(LVar3, COLLIDER_o2031) - EVT_SET(LVar4, COLLIDER_o2032) - EVT_SET(LVar5, 30) - EVT_EXEC_WAIT(N(EVS_FlipStairsCW)) - EVT_RETURN - EVT_END + Set(LVar2, MODEL_g321) + Set(LVar3, COLLIDER_o2031) + Set(LVar4, COLLIDER_o2032) + Set(LVar5, 30) + ExecWait(N(EVS_FlipStairsCW)) + Return + End }; EvtScript N(EVS_FlipStairsCCW_TopBlue) = { - EVT_SET(LVar2, MODEL_g327) - EVT_SET(LVar3, COLLIDER_o2034) - EVT_SET(LVar4, COLLIDER_o2033) - EVT_SET(LVar5, 30) - EVT_EXEC_WAIT(N(EVS_FlipStairsCCW)) - EVT_RETURN - EVT_END + Set(LVar2, MODEL_g327) + Set(LVar3, COLLIDER_o2034) + Set(LVar4, COLLIDER_o2033) + Set(LVar5, 30) + ExecWait(N(EVS_FlipStairsCCW)) + Return + End }; EvtScript N(EVS_FlipStairsCW_TopBlue) = { - EVT_SET(LVar2, MODEL_g327) - EVT_SET(LVar3, COLLIDER_o2034) - EVT_SET(LVar4, COLLIDER_o2033) - EVT_SET(LVar5, 30) - EVT_EXEC_WAIT(N(EVS_FlipStairsCW)) - EVT_RETURN - EVT_END + Set(LVar2, MODEL_g327) + Set(LVar3, COLLIDER_o2034) + Set(LVar4, COLLIDER_o2033) + Set(LVar5, 30) + ExecWait(N(EVS_FlipStairsCW)) + Return + End }; EvtScript N(EVS_FlipStairsCCW_BottomRed) = { - EVT_SET(LVar2, MODEL_g328) - EVT_SET(LVar3, COLLIDER_o2036) - EVT_SET(LVar4, COLLIDER_o2035) - EVT_SET(LVar5, 30) - EVT_EXEC_WAIT(N(EVS_FlipStairsCCW)) - EVT_RETURN - EVT_END + Set(LVar2, MODEL_g328) + Set(LVar3, COLLIDER_o2036) + Set(LVar4, COLLIDER_o2035) + Set(LVar5, 30) + ExecWait(N(EVS_FlipStairsCCW)) + Return + End }; EvtScript N(EVS_FlipStairsCW_BottomRed) = { - EVT_SET(LVar2, MODEL_g328) - EVT_SET(LVar3, COLLIDER_o2036) - EVT_SET(LVar4, COLLIDER_o2035) - EVT_SET(LVar5, 30) - EVT_EXEC_WAIT(N(EVS_FlipStairsCW)) - EVT_RETURN - EVT_END + Set(LVar2, MODEL_g328) + Set(LVar3, COLLIDER_o2036) + Set(LVar4, COLLIDER_o2035) + Set(LVar5, 30) + ExecWait(N(EVS_FlipStairsCW)) + Return + End }; EvtScript N(EVS_FlipStairsCCW_TopRed) = { - EVT_SET(LVar2, MODEL_g329) - EVT_SET(LVar3, COLLIDER_o2037) - EVT_SET(LVar4, COLLIDER_o2038) - EVT_SET(LVar5, 30) - EVT_EXEC_WAIT(N(EVS_FlipStairsCCW)) - EVT_RETURN - EVT_END + Set(LVar2, MODEL_g329) + Set(LVar3, COLLIDER_o2037) + Set(LVar4, COLLIDER_o2038) + Set(LVar5, 30) + ExecWait(N(EVS_FlipStairsCCW)) + Return + End }; EvtScript N(EVS_FlipStairsCW_TopRed) = { - EVT_SET(LVar2, MODEL_g329) - EVT_SET(LVar3, COLLIDER_o2037) - EVT_SET(LVar4, COLLIDER_o2038) - EVT_SET(LVar5, 30) - EVT_EXEC_WAIT(N(EVS_FlipStairsCW)) - EVT_RETURN - EVT_END + Set(LVar2, MODEL_g329) + Set(LVar3, COLLIDER_o2037) + Set(LVar4, COLLIDER_o2038) + Set(LVar5, 30) + ExecWait(N(EVS_FlipStairsCW)) + Return + End }; EvtScript N(EVS_BlueStairs_FlipCCW) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -522, -310, -95) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -522, -377, -92) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC_WAIT(N(EVS_FlipStairsCCW_BottomBlue)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 3, EVT_FLOAT(0.1)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -522, -222, -92) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC_WAIT(N(EVS_FlipStairsCCW_TopBlue)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 3, EVT_FLOAT(0.1)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(UseSettingsFrom, CAM_DEFAULT, -522, -310, -95) + Call(SetPanTarget, CAM_DEFAULT, -522, -377, -92) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + ExecWait(N(EVS_FlipStairsCCW_BottomBlue)) + Call(ShakeCam, CAM_DEFAULT, 0, 3, Float(0.1)) + Call(SetPanTarget, CAM_DEFAULT, -522, -222, -92) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + ExecWait(N(EVS_FlipStairsCCW_TopBlue)) + Call(ShakeCam, CAM_DEFAULT, 0, 3, Float(0.1)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_BlueStairs_FlipCW) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -522, -310, -95) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -522, -377, -92) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC_WAIT(N(EVS_FlipStairsCW_BottomBlue)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 3, EVT_FLOAT(0.1)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -522, -222, -92) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC_WAIT(N(EVS_FlipStairsCW_TopBlue)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 3, EVT_FLOAT(0.1)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(UseSettingsFrom, CAM_DEFAULT, -522, -310, -95) + Call(SetPanTarget, CAM_DEFAULT, -522, -377, -92) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + ExecWait(N(EVS_FlipStairsCW_BottomBlue)) + Call(ShakeCam, CAM_DEFAULT, 0, 3, Float(0.1)) + Call(SetPanTarget, CAM_DEFAULT, -522, -222, -92) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + ExecWait(N(EVS_FlipStairsCW_TopBlue)) + Call(ShakeCam, CAM_DEFAULT, 0, 3, Float(0.1)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_RedStairs_FlipCCW) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -408, -310, -347) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -408, -377, -347) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC_WAIT(N(EVS_FlipStairsCCW_BottomRed)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 3, EVT_FLOAT(0.1)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -408, -222, -347) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC_WAIT(N(EVS_FlipStairsCCW_TopRed)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 3, EVT_FLOAT(0.1)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(UseSettingsFrom, CAM_DEFAULT, -408, -310, -347) + Call(SetPanTarget, CAM_DEFAULT, -408, -377, -347) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + ExecWait(N(EVS_FlipStairsCCW_BottomRed)) + Call(ShakeCam, CAM_DEFAULT, 0, 3, Float(0.1)) + Call(SetPanTarget, CAM_DEFAULT, -408, -222, -347) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + ExecWait(N(EVS_FlipStairsCCW_TopRed)) + Call(ShakeCam, CAM_DEFAULT, 0, 3, Float(0.1)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_RedStairs_FlipCW) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -408, -310, -347) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -408, -377, -347) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC_WAIT(N(EVS_FlipStairsCW_BottomRed)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 3, EVT_FLOAT(0.1)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -408, -222, -347) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC_WAIT(N(EVS_FlipStairsCW_TopRed)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 3, EVT_FLOAT(0.1)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(UseSettingsFrom, CAM_DEFAULT, -408, -310, -347) + Call(SetPanTarget, CAM_DEFAULT, -408, -377, -347) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + ExecWait(N(EVS_FlipStairsCW_BottomRed)) + Call(ShakeCam, CAM_DEFAULT, 0, 3, Float(0.1)) + Call(SetPanTarget, CAM_DEFAULT, -408, -222, -347) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + ExecWait(N(EVS_FlipStairsCW_TopRed)) + Call(ShakeCam, CAM_DEFAULT, 0, 3, Float(0.1)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_FlipBlueStairs) = { - EVT_IF_EQ(MF_BlueStairsFlipped, FALSE) - EVT_EXEC_WAIT(N(EVS_BlueStairs_FlipCCW)) - EVT_SET(MF_BlueStairsFlipped, TRUE) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_BlueStairs_FlipCW)) - EVT_SET(MF_BlueStairsFlipped, FALSE) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_SET(AF_ISK09_FlippingBlueStairs, FALSE) - EVT_RETURN - EVT_END + IfEq(MF_BlueStairsFlipped, FALSE) + ExecWait(N(EVS_BlueStairs_FlipCCW)) + Set(MF_BlueStairsFlipped, TRUE) + Else + ExecWait(N(EVS_BlueStairs_FlipCW)) + Set(MF_BlueStairsFlipped, FALSE) + EndIf + Call(DisablePlayerInput, FALSE) + Set(AF_ISK09_FlippingBlueStairs, FALSE) + Return + End }; EvtScript N(EVS_FlipRedStairs) = { - EVT_IF_EQ(MF_RedStairsFlipped, FALSE) - EVT_EXEC_WAIT(N(EVS_RedStairs_FlipCW)) - EVT_SET(MF_RedStairsFlipped, TRUE) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_RedStairs_FlipCCW)) - EVT_SET(MF_RedStairsFlipped, FALSE) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_SET(AF_ISK09_FlippingRedStairs, FALSE) - EVT_RETURN - EVT_END + IfEq(MF_RedStairsFlipped, FALSE) + ExecWait(N(EVS_RedStairs_FlipCW)) + Set(MF_RedStairsFlipped, TRUE) + Else + ExecWait(N(EVS_RedStairs_FlipCCW)) + Set(MF_RedStairsFlipped, FALSE) + EndIf + Call(DisablePlayerInput, FALSE) + Set(AF_ISK09_FlippingRedStairs, FALSE) + Return + End }; EvtScript N(EVS_SetupStairs) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2032, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2033, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(RotateModel, MODEL_g328, 90, 0, 0, 1) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2036, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(RotateModel, MODEL_g329, 90, 0, 0, 1) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2037, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(MF_BlueStairsFlipped, FALSE) - EVT_SET(MF_RedStairsFlipped, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_FlipBlueStairs)), TRIGGER_AREA_FLAG_SET, AF_ISK09_FlippingBlueStairs, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_FlipRedStairs)), TRIGGER_AREA_FLAG_SET, AF_ISK09_FlippingRedStairs, 1, 0) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2032, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2033, COLLIDER_FLAGS_UPPER_MASK) + Call(RotateModel, MODEL_g328, 90, 0, 0, 1) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2036, COLLIDER_FLAGS_UPPER_MASK) + Call(RotateModel, MODEL_g329, 90, 0, 0, 1) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2037, COLLIDER_FLAGS_UPPER_MASK) + Set(MF_BlueStairsFlipped, FALSE) + Set(MF_RedStairsFlipped, FALSE) + BindTrigger(Ref(N(EVS_FlipBlueStairs)), TRIGGER_AREA_FLAG_SET, AF_ISK09_FlippingBlueStairs, 1, 0) + BindTrigger(Ref(N(EVS_FlipRedStairs)), TRIGGER_AREA_FLAG_SET, AF_ISK09_FlippingRedStairs, 1, 0) + Return + End }; diff --git a/src/world/area_isk/isk_09/isk_09_5_switch.c b/src/world/area_isk/isk_09/isk_09_5_switch.c index 6ed820d16d2..329a4a36c35 100644 --- a/src/world/area_isk/isk_09/isk_09_5_switch.c +++ b/src/world/area_isk/isk_09/isk_09_5_switch.c @@ -16,162 +16,162 @@ API_CALLABLE(N(WaitForPlayerTouchingGround)) { } EvtScript N(EVS_SetupSwitches) = { - EVT_CALL(ParentColliderToModel, COLLIDER_o2096, MODEL_g332) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_BlueSwitchCenter)), TRIGGER_FLOOR_TOUCH, COLLIDER_o2096, 1, 0) - EVT_CALL(ParentColliderToModel, COLLIDER_o2099, MODEL_g334) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_BlueSwitchMidLeft)), TRIGGER_FLOOR_TOUCH, COLLIDER_o2099, 1, 0) - EVT_CALL(ParentColliderToModel, COLLIDER_o2102, MODEL_g335) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_BlueSwitchTopLeft)), TRIGGER_FLOOR_TOUCH, COLLIDER_o2102, 1, 0) - EVT_CALL(ParentColliderToModel, COLLIDER_o2105, MODEL_g336) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_RedSwitch)), TRIGGER_FLOOR_TOUCH, COLLIDER_o2105, 1, 0) - EVT_RETURN - EVT_END + Call(ParentColliderToModel, COLLIDER_o2096, MODEL_g332) + BindTrigger(Ref(N(EVS_OnTouch_BlueSwitchCenter)), TRIGGER_FLOOR_TOUCH, COLLIDER_o2096, 1, 0) + Call(ParentColliderToModel, COLLIDER_o2099, MODEL_g334) + BindTrigger(Ref(N(EVS_OnTouch_BlueSwitchMidLeft)), TRIGGER_FLOOR_TOUCH, COLLIDER_o2099, 1, 0) + Call(ParentColliderToModel, COLLIDER_o2102, MODEL_g335) + BindTrigger(Ref(N(EVS_OnTouch_BlueSwitchTopLeft)), TRIGGER_FLOOR_TOUCH, COLLIDER_o2102, 1, 0) + Call(ParentColliderToModel, COLLIDER_o2105, MODEL_g336) + BindTrigger(Ref(N(EVS_OnTouch_RedSwitch)), TRIGGER_FLOOR_TOUCH, COLLIDER_o2105, 1, 0) + Return + End }; EvtScript N(EVS_OnTouch_BlueSwitchCenter) = { - EVT_CALL(IsPlayerOnValidFloor, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o2096, SOUND_FLOOR_SWITCH_DEPRESS, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, -14, 30, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_g332, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o2096) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, COLLIDER_o2096, SOUND_FLOOR_SWITCH_ACTIVATE, SOUND_SPACE_DEFAULT) - EVT_SET(AF_ISK09_FlippingBlueStairs, TRUE) - EVT_LABEL(15) - EVT_WAIT(1) - EVT_IF_EQ(AF_ISK09_FlippingBlueStairs, TRUE) - EVT_GOTO(15) - EVT_END_IF - EVT_CALL(MakeLerp, -14, 0, 5, EASING_LINEAR) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_g332, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o2096) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(N(WaitForPlayerTouchingGround), COLLIDER_o2096) - EVT_RETURN - EVT_END + Call(IsPlayerOnValidFloor, LVar0) + IfEq(LVar0, FALSE) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(PlaySoundAtCollider, COLLIDER_o2096, SOUND_FLOOR_SWITCH_DEPRESS, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, -14, 30, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(TranslateModel, MODEL_g332, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o2096) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(PlaySoundAtCollider, COLLIDER_o2096, SOUND_FLOOR_SWITCH_ACTIVATE, SOUND_SPACE_DEFAULT) + Set(AF_ISK09_FlippingBlueStairs, TRUE) + Label(15) + Wait(1) + IfEq(AF_ISK09_FlippingBlueStairs, TRUE) + Goto(15) + EndIf + Call(MakeLerp, -14, 0, 5, EASING_LINEAR) + Label(20) + Call(UpdateLerp) + Call(TranslateModel, MODEL_g332, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o2096) + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Call(N(WaitForPlayerTouchingGround), COLLIDER_o2096) + Return + End }; EvtScript N(EVS_OnTouch_BlueSwitchMidLeft) = { - EVT_CALL(IsPlayerOnValidFloor, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o2099, SOUND_FLOOR_SWITCH_DEPRESS, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, -14, 30, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_g334, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o2099) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, COLLIDER_o2099, SOUND_FLOOR_SWITCH_ACTIVATE, SOUND_SPACE_DEFAULT) - EVT_SET(AF_ISK09_FlippingBlueStairs, TRUE) - EVT_LABEL(15) - EVT_WAIT(1) - EVT_IF_EQ(AF_ISK09_FlippingBlueStairs, TRUE) - EVT_GOTO(15) - EVT_END_IF - EVT_CALL(MakeLerp, -14, 0, 5, EASING_LINEAR) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_g334, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o2099) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(N(WaitForPlayerTouchingGround), COLLIDER_o2099) - EVT_RETURN - EVT_END + Call(IsPlayerOnValidFloor, LVar0) + IfEq(LVar0, FALSE) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(PlaySoundAtCollider, COLLIDER_o2099, SOUND_FLOOR_SWITCH_DEPRESS, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, -14, 30, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(TranslateModel, MODEL_g334, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o2099) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(PlaySoundAtCollider, COLLIDER_o2099, SOUND_FLOOR_SWITCH_ACTIVATE, SOUND_SPACE_DEFAULT) + Set(AF_ISK09_FlippingBlueStairs, TRUE) + Label(15) + Wait(1) + IfEq(AF_ISK09_FlippingBlueStairs, TRUE) + Goto(15) + EndIf + Call(MakeLerp, -14, 0, 5, EASING_LINEAR) + Label(20) + Call(UpdateLerp) + Call(TranslateModel, MODEL_g334, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o2099) + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Call(N(WaitForPlayerTouchingGround), COLLIDER_o2099) + Return + End }; EvtScript N(EVS_OnTouch_BlueSwitchTopLeft) = { - EVT_CALL(IsPlayerOnValidFloor, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o2102, SOUND_FLOOR_SWITCH_DEPRESS, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, -14, 30, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_g335, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o2102) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, COLLIDER_o2102, SOUND_FLOOR_SWITCH_ACTIVATE, SOUND_SPACE_DEFAULT) - EVT_SET(AF_ISK09_FlippingBlueStairs, TRUE) - EVT_LABEL(15) - EVT_WAIT(1) - EVT_IF_EQ(AF_ISK09_FlippingBlueStairs, TRUE) - EVT_GOTO(15) - EVT_END_IF - EVT_CALL(MakeLerp, -14, 0, 5, EASING_LINEAR) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_g335, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o2102) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(N(WaitForPlayerTouchingGround), COLLIDER_o2102) - EVT_RETURN - EVT_END + Call(IsPlayerOnValidFloor, LVar0) + IfEq(LVar0, FALSE) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(PlaySoundAtCollider, COLLIDER_o2102, SOUND_FLOOR_SWITCH_DEPRESS, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, -14, 30, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(TranslateModel, MODEL_g335, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o2102) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(PlaySoundAtCollider, COLLIDER_o2102, SOUND_FLOOR_SWITCH_ACTIVATE, SOUND_SPACE_DEFAULT) + Set(AF_ISK09_FlippingBlueStairs, TRUE) + Label(15) + Wait(1) + IfEq(AF_ISK09_FlippingBlueStairs, TRUE) + Goto(15) + EndIf + Call(MakeLerp, -14, 0, 5, EASING_LINEAR) + Label(20) + Call(UpdateLerp) + Call(TranslateModel, MODEL_g335, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o2102) + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Call(N(WaitForPlayerTouchingGround), COLLIDER_o2102) + Return + End }; EvtScript N(EVS_OnTouch_RedSwitch) = { - EVT_CALL(IsPlayerOnValidFloor, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o2105, SOUND_FLOOR_SWITCH_DEPRESS, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, -14, 30, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_g336, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o2105) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, COLLIDER_o2105, SOUND_FLOOR_SWITCH_ACTIVATE, SOUND_SPACE_DEFAULT) - EVT_SET(AF_ISK09_FlippingRedStairs, TRUE) - EVT_LABEL(15) - EVT_WAIT(1) - EVT_IF_EQ(AF_ISK09_FlippingRedStairs, TRUE) - EVT_GOTO(15) - EVT_END_IF - EVT_CALL(MakeLerp, -14, 0, 5, EASING_LINEAR) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_g336, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o2105) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(N(WaitForPlayerTouchingGround), COLLIDER_o2105) - EVT_RETURN - EVT_END + Call(IsPlayerOnValidFloor, LVar0) + IfEq(LVar0, FALSE) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(PlaySoundAtCollider, COLLIDER_o2105, SOUND_FLOOR_SWITCH_DEPRESS, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, -14, 30, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(TranslateModel, MODEL_g336, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o2105) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(PlaySoundAtCollider, COLLIDER_o2105, SOUND_FLOOR_SWITCH_ACTIVATE, SOUND_SPACE_DEFAULT) + Set(AF_ISK09_FlippingRedStairs, TRUE) + Label(15) + Wait(1) + IfEq(AF_ISK09_FlippingRedStairs, TRUE) + Goto(15) + EndIf + Call(MakeLerp, -14, 0, 5, EASING_LINEAR) + Label(20) + Call(UpdateLerp) + Call(TranslateModel, MODEL_g336, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o2105) + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Call(N(WaitForPlayerTouchingGround), COLLIDER_o2105) + Return + End }; diff --git a/src/world/area_isk/isk_10/isk_10_1_main.c b/src/world/area_isk/isk_10/isk_10_1_main.c index 259de204242..6b42e21057d 100644 --- a/src/world/area_isk/isk_10/isk_10_1_main.c +++ b/src/world/area_isk/isk_10/isk_10_1_main.c @@ -6,34 +6,34 @@ EvtScript N(EVS_ExitWalk_isk_18_0) = EVT_EXIT_WALK(40, isk_10_ENTRY_2, "isk_18", MAP_RODATA_PAD(1,unk); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_08_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_14_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_18_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_isk_08_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_isk_14_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_isk_18_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) - EVT_CALL(SetSpriteShading, SHADING_ISK_10) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.8)) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupBombableWall)) + Set(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) + Call(SetSpriteShading, SHADING_ISK_10) + SetUP_CAMERA_NO_LEAD() + Call(SetCamSpeed, CAM_DEFAULT, Float(2.8)) + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupBombableWall)) #if VERSION_PAL - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) #else - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_CASE_LT(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) - EVT_CASE_GE(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_END_SWITCH + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + CaseLt(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) + CaseGe(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + EndSwitch #endif - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_isk/isk_10/isk_10_2_entity.c b/src/world/area_isk/isk_10/isk_10_2_entity.c index 68c38a19e27..6d1b4c01431 100644 --- a/src/world/area_isk/isk_10/isk_10_2_entity.c +++ b/src/world/area_isk/isk_10/isk_10_2_entity.c @@ -21,40 +21,40 @@ API_CALLABLE(N(MonitorPlayerLastFloor)) { } EvtScript N(EVS_UseSpring) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_JUMP) - EVT_WAIT(1) - EVT_IF_EQ(MV_LastFloorLevel, 0) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.4)) - EVT_CALL(PlayerJump, -577, -780, -75, 15) - EVT_ELSE - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.8)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, -520) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.4)) - EVT_CALL(PlayerJump, -561, -520, 23, 30) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.8)) - EVT_END_IF - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_JUMP) + Wait(1) + IfEq(MV_LastFloorLevel, 0) + Call(SetPlayerJumpscale, Float(1.4)) + Call(PlayerJump, -577, -780, -75, 15) + Else + Call(SetCamSpeed, CAM_DEFAULT, Float(2.8)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamPosC, CAM_DEFAULT, 0, -520) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetPlayerJumpscale, Float(1.4)) + Call(PlayerJump, -561, -520, 23, 30) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.8)) + EndIf + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_MakeEntities) = { EVT_MAKE_SUPER_BLOCK(-550, -720, 0, 0) - EVT_THREAD - EVT_CALL(N(MonitorPlayerLastFloor)) - EVT_END_THREAD - EVT_CALL(MakeEntity, EVT_PTR(Entity_ScriptSpring), -516, -780, -71, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_UseSpring))) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -510, -453, 43, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -510, -713, 43, EVT_FLOAT(0.3), LVar0) - EVT_RETURN - EVT_END + Thread + Call(N(MonitorPlayerLastFloor)) + EndThread + Call(MakeEntity, Ref(Entity_ScriptSpring), -516, -780, -71, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_UseSpring))) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -510, -453, 43, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -510, -713, 43, Float(0.3), LVar0) + Return + End }; diff --git a/src/world/area_isk/isk_10/isk_10_3_bombable.c b/src/world/area_isk/isk_10/isk_10_3_bombable.c index 3c1131e16c7..3c97cdbe6da 100644 --- a/src/world/area_isk/isk_10/isk_10_3_bombable.c +++ b/src/world/area_isk/isk_10/isk_10_3_bombable.c @@ -12,76 +12,76 @@ BombTrigger N(BombPos_LowerWall) = { }; EvtScript N(EVS_OnBlast_UpperWall) = { - EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 0, 30, 14, 1, 10, 30) - EVT_LOOP(10) - EVT_CALL(EnableModel, MODEL_g328, TRUE) - EVT_WAIT(1) - EVT_CALL(EnableModel, MODEL_g328, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GF_ISK_BombedWallFrom10, TRUE) - EVT_UNBIND - EVT_RETURN - EVT_END + PlayEffect(EFFECT_BOMBETTE_BREAKING, 0, 30, 14, 1, 10, 30) + Loop(10) + Call(EnableModel, MODEL_g328, TRUE) + Wait(1) + Call(EnableModel, MODEL_g328, FALSE) + Wait(1) + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK) + Set(GF_ISK_BombedWallFrom10, TRUE) + Unbind + Return + End }; EvtScript N(EVS_OnBlast_LowerWall) = { - EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 0, 27, 19, 1, 10, 30) - EVT_LOOP(10) - EVT_CALL(EnableModel, MODEL_g327, TRUE) - EVT_WAIT(1) - EVT_CALL(EnableModel, MODEL_g327, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittw, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GF_ISK10_BombedWall, TRUE) - EVT_UNBIND - EVT_RETURN - EVT_END + PlayEffect(EFFECT_BOMBETTE_BREAKING, 0, 27, 19, 1, 10, 30) + Loop(10) + Call(EnableModel, MODEL_g327, TRUE) + Wait(1) + Call(EnableModel, MODEL_g327, FALSE) + Wait(1) + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittw, COLLIDER_FLAGS_UPPER_MASK) + Set(GF_ISK10_BombedWall, TRUE) + Unbind + Return + End }; EvtScript N(EVS_HideDestroyedWall) = { - EVT_CALL(EnableModel, MODEL_o2029, FALSE) - EVT_CALL(EnableModel, MODEL_o2030, FALSE) - EVT_CALL(EnableModel, MODEL_o2031, FALSE) - EVT_CALL(EnableModel, MODEL_o2032, FALSE) - EVT_CALL(EnableModel, MODEL_o2033, FALSE) - EVT_CALL(EnableModel, MODEL_o2034, FALSE) - EVT_CALL(EnableModel, MODEL_o2035, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2031, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2032, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2034, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_o2029, FALSE) + Call(EnableModel, MODEL_o2030, FALSE) + Call(EnableModel, MODEL_o2031, FALSE) + Call(EnableModel, MODEL_o2032, FALSE) + Call(EnableModel, MODEL_o2033, FALSE) + Call(EnableModel, MODEL_o2034, FALSE) + Call(EnableModel, MODEL_o2035, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2031, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2032, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2034, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_SetupBombableWall) = { - EVT_IF_EQ(GF_ISK_BombedWallFrom08, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnBlast_UpperWall)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_UpperWall)), 1, 0) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_g328, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_IF_EQ(GF_ISK_BombedWallFrom10, FALSE) - EVT_IF_EQ(GF_ISK_BombedWallFrom08, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnBlast_UpperWall)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_UpperWall)), 1, 0) - EVT_EXEC_WAIT(N(EVS_HideDestroyedWall)) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_g328, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_ELSE - EVT_CALL(EnableModel, MODEL_g328, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC_WAIT(N(EVS_HideDestroyedWall)) - EVT_END_IF - EVT_IF_EQ(GF_ISK10_BombedWall, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnBlast_LowerWall)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_LowerWall)), 1, 0) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_g327, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittw, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_ISK_BombedWallFrom08, FALSE) + BindTrigger(Ref(N(EVS_OnBlast_UpperWall)), TRIGGER_POINT_BOMB, Ref(N(BombPos_UpperWall)), 1, 0) + Else + Call(EnableModel, MODEL_g328, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK) + EndIf + IfEq(GF_ISK_BombedWallFrom10, FALSE) + IfEq(GF_ISK_BombedWallFrom08, FALSE) + BindTrigger(Ref(N(EVS_OnBlast_UpperWall)), TRIGGER_POINT_BOMB, Ref(N(BombPos_UpperWall)), 1, 0) + ExecWait(N(EVS_HideDestroyedWall)) + Else + Call(EnableModel, MODEL_g328, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Else + Call(EnableModel, MODEL_g328, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK) + ExecWait(N(EVS_HideDestroyedWall)) + EndIf + IfEq(GF_ISK10_BombedWall, FALSE) + BindTrigger(Ref(N(EVS_OnBlast_LowerWall)), TRIGGER_POINT_BOMB, Ref(N(BombPos_LowerWall)), 1, 0) + Else + Call(EnableModel, MODEL_g327, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittw, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Return + End }; diff --git a/src/world/area_isk/isk_11/isk_11_1_music.c b/src/world/area_isk/isk_11/isk_11_1_music.c index 5f5768243d9..83ec829e9eb 100644 --- a/src/world/area_isk/isk_11/isk_11_1_music.c +++ b/src/world/area_isk/isk_11/isk_11_1_music.c @@ -1,31 +1,31 @@ #include "isk_11.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_EQ(GF_ISK11_FourthWarning, FALSE) - EVT_THREAD - EVT_CALL(FadeInMusic, 1, SONG_TUTANKOOPA_WARNING, 0, 2000, 0, 127) - EVT_CALL(FadeOutMusic, 0, 2000) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(20) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH2_00E0, 160, 40) - EVT_SET(GF_ISK11_FourthWarning, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_CALL(FadeInMusic, 0, SONG_DRY_DRY_RUINS, 0, 2000, 0, 127) - EVT_CALL(FadeOutMusic, 1, 2000) - EVT_END_THREAD - EVT_RETURN - EVT_END_IF - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_CASE_LT(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) - EVT_CASE_GE(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + IfEq(GF_ISK11_FourthWarning, FALSE) + Thread + Call(FadeInMusic, 1, SONG_TUTANKOOPA_WARNING, 0, 2000, 0, 127) + Call(FadeOutMusic, 0, 2000) + Call(DisablePlayerInput, TRUE) + Wait(20) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(ShowMessageAtScreenPos, MSG_CH2_00E0, 160, 40) + Set(GF_ISK11_FourthWarning, TRUE) + Call(DisablePlayerInput, FALSE) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Call(FadeInMusic, 0, SONG_DRY_DRY_RUINS, 0, 2000, 0, 127) + Call(FadeOutMusic, 1, 2000) + EndThread + Return + EndIf + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + CaseLt(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) + CaseGe(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_isk/isk_11/isk_11_2_main.c b/src/world/area_isk/isk_11/isk_11_2_main.c index 07241974053..b584b3cdd46 100644 --- a/src/world/area_isk/isk_11/isk_11_2_main.c +++ b/src/world/area_isk/isk_11/isk_11_2_main.c @@ -6,54 +6,54 @@ EvtScript N(EVS_ExitWalk_isk_12_1) = EVT_EXIT_WALK(40, isk_11_ENTRY_2, "isk_12", EvtScript N(EVS_ExitWalk_isk_19_0) = EVT_EXIT_WALK(40, isk_11_ENTRY_3, "isk_19", isk_19_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_08_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_12_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_12_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_19_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_isk_08_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_isk_12_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_isk_12_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_isk_19_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) - EVT_CALL(SetSpriteShading, SHADING_ISK_11) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.8)) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC_WAIT(N(EVS_SetupPuzzle)) - EVT_EXEC_WAIT(N(EVS_SetupLock)) - EVT_IF_LT(GB_StoryProgress, STORY_CH2_SOLVED_ARTIFACT_PUZZLE) - EVT_EXEC(N(EVS_ManageSecretPassage)) - EVT_CALL(EnableGroup, MODEL_15, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2222, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2223, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2224, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2225, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2226, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2226, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2227, COLLIDER_FLAGS_UPPER_MASK) - EVT_ELSE - EVT_CALL(EnableGroup, MODEL_g377, FALSE) - EVT_CALL(EnableModel, MODEL_o2205, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2087, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2088, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2089, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2090, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2091, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2092, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2186, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(TranslateModel, MODEL_o2155, 0, -30, 0) - EVT_CALL(TranslateModel, MODEL_o2156, 0, -30, 0) - EVT_CALL(TranslateModel, MODEL_o2198, 0, -55, 0) - EVT_CALL(TranslateModel, MODEL_o2199, 0, -55, 0) - EVT_CALL(TranslateModel, MODEL_o2200, 0, -80, 0) - EVT_CALL(TranslateModel, MODEL_o2201, 0, -80, 0) - EVT_CALL(TranslateModel, MODEL_o2202, 0, -105, 0) - EVT_CALL(TranslateModel, MODEL_o2203, 0, -105, 0) - EVT_END_IF - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) + Call(SetSpriteShading, SHADING_ISK_11) + SetUP_CAMERA_ALT_NO_LEAD() + Call(SetCamSpeed, CAM_DEFAULT, Float(2.8)) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + ExecWait(N(EVS_SetupPuzzle)) + ExecWait(N(EVS_SetupLock)) + IfLt(GB_StoryProgress, STORY_CH2_SOLVED_ARTIFACT_PUZZLE) + Exec(N(EVS_ManageSecretPassage)) + Call(EnableGroup, MODEL_15, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2222, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2223, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2224, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2225, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2226, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2226, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2227, COLLIDER_FLAGS_UPPER_MASK) + Else + Call(EnableGroup, MODEL_g377, FALSE) + Call(EnableModel, MODEL_o2205, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2087, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2088, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2089, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2090, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2091, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2092, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2186, COLLIDER_FLAGS_UPPER_MASK) + Call(TranslateModel, MODEL_o2155, 0, -30, 0) + Call(TranslateModel, MODEL_o2156, 0, -30, 0) + Call(TranslateModel, MODEL_o2198, 0, -55, 0) + Call(TranslateModel, MODEL_o2199, 0, -55, 0) + Call(TranslateModel, MODEL_o2200, 0, -80, 0) + Call(TranslateModel, MODEL_o2201, 0, -80, 0) + Call(TranslateModel, MODEL_o2202, 0, -105, 0) + Call(TranslateModel, MODEL_o2203, 0, -105, 0) + EndIf + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_isk/isk_11/isk_11_3_entity.c b/src/world/area_isk/isk_11/isk_11_3_entity.c index c512bc35b83..0bcdb3c0492 100644 --- a/src/world/area_isk/isk_11/isk_11_3_entity.c +++ b/src/world/area_isk/isk_11/isk_11_3_entity.c @@ -3,20 +3,20 @@ #include "effects.h" EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_ISK11_UnlockedDoor, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), 355, -460, 430, -40, MAKE_ENTITY_END) - EVT_SET(MV_LockEntityID, LVar0) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -131, -453, 489, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 131, -453, 489, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 291, -453, 415, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -44, -583, 505, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 131, -583, 489, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -44, -713, 505, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 131, -713, 489, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -44, -843, 505, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 131, -843, 489, EVT_FLOAT(0.3), LVar0) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), -75, -720, 625, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + IfEq(GF_ISK11_UnlockedDoor, FALSE) + Call(MakeEntity, Ref(Entity_Padlock), 355, -460, 430, -40, MAKE_ENTITY_END) + Set(MV_LockEntityID, LVar0) + EndIf + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -131, -453, 489, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 131, -453, 489, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 291, -453, 415, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -44, -583, 505, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 131, -583, 489, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -44, -713, 505, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 131, -713, 489, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -44, -843, 505, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 131, -843, 489, Float(0.3), LVar0) + Call(MakeEntity, Ref(Entity_HeartBlock), -75, -720, 625, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_isk/isk_11/isk_11_4_scene.c b/src/world/area_isk/isk_11/isk_11_4_scene.c index 7a70e910117..563787bab07 100644 --- a/src/world/area_isk/isk_11/isk_11_4_scene.c +++ b/src/world/area_isk/isk_11/isk_11_4_scene.c @@ -14,192 +14,192 @@ API_CALLABLE(N(SpawnLensFlare)) { } EvtScript N(EVS_DropHiddenStairs) = { - EVT_CALL(MakeLerp, 0, -300, 30 * DT, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_SET(LVar2, LVar0) - EVT_DIVF(LVar2, 10) - EVT_CALL(TranslateModel, MODEL_o2155, 0, LVar2, 0) - EVT_CALL(TranslateModel, MODEL_o2156, 0, LVar2, 0) - EVT_CALL(TranslateModel, MODEL_o2198, 0, LVar2, 0) - EVT_CALL(TranslateModel, MODEL_o2199, 0, LVar2, 0) - EVT_CALL(TranslateModel, MODEL_o2200, 0, LVar2, 0) - EVT_CALL(TranslateModel, MODEL_o2201, 0, LVar2, 0) - EVT_CALL(TranslateModel, MODEL_o2202, 0, LVar2, 0) - EVT_CALL(TranslateModel, MODEL_o2203, 0, LVar2, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_ISK_STAIR_DROP_THUD, SOUND_SPACE_DEFAULT, 16, -562, 621) - EVT_CALL(MakeLerp, LVar0, -550, 25 * DT, EASING_LINEAR) - EVT_CALL(UpdateLerp) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_SET(LVar2, LVar0) - EVT_DIVF(LVar2, 10) - EVT_CALL(TranslateModel, MODEL_o2198, 0, LVar2, 0) - EVT_CALL(TranslateModel, MODEL_o2199, 0, LVar2, 0) - EVT_CALL(TranslateModel, MODEL_o2200, 0, LVar2, 0) - EVT_CALL(TranslateModel, MODEL_o2201, 0, LVar2, 0) - EVT_CALL(TranslateModel, MODEL_o2202, 0, LVar2, 0) - EVT_CALL(TranslateModel, MODEL_o2203, 0, LVar2, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_ISK_STAIR_DROP_THUD, SOUND_SPACE_DEFAULT, 41, -587, 618) - EVT_CALL(MakeLerp, LVar0, -800, 25 * DT, EASING_LINEAR) - EVT_CALL(UpdateLerp) - EVT_LABEL(30) - EVT_CALL(UpdateLerp) - EVT_SET(LVar2, LVar0) - EVT_DIVF(LVar2, 10) - EVT_CALL(TranslateModel, MODEL_o2200, 0, LVar2, 0) - EVT_CALL(TranslateModel, MODEL_o2201, 0, LVar2, 0) - EVT_CALL(TranslateModel, MODEL_o2202, 0, LVar2, 0) - EVT_CALL(TranslateModel, MODEL_o2203, 0, LVar2, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(30) - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_ISK_STAIR_DROP_THUD, SOUND_SPACE_DEFAULT, 66, -612, 616) - EVT_CALL(MakeLerp, LVar0, 0xFFFFFBE6, 25 * DT, EASING_LINEAR) - EVT_CALL(UpdateLerp) - EVT_LABEL(40) - EVT_CALL(UpdateLerp) - EVT_SET(LVar2, LVar0) - EVT_DIVF(LVar2, 10) - EVT_CALL(TranslateModel, MODEL_o2202, 0, LVar2, 0) - EVT_CALL(TranslateModel, MODEL_o2203, 0, LVar2, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(40) - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_ISK_STAIR_DROP_THUD, SOUND_SPACE_DEFAULT, 95, -637, 614) - EVT_RETURN - EVT_END + Call(MakeLerp, 0, -300, 30 * DT, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Set(LVar2, LVar0) + DivF(LVar2, 10) + Call(TranslateModel, MODEL_o2155, 0, LVar2, 0) + Call(TranslateModel, MODEL_o2156, 0, LVar2, 0) + Call(TranslateModel, MODEL_o2198, 0, LVar2, 0) + Call(TranslateModel, MODEL_o2199, 0, LVar2, 0) + Call(TranslateModel, MODEL_o2200, 0, LVar2, 0) + Call(TranslateModel, MODEL_o2201, 0, LVar2, 0) + Call(TranslateModel, MODEL_o2202, 0, LVar2, 0) + Call(TranslateModel, MODEL_o2203, 0, LVar2, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(PlaySoundAt, SOUND_ISK_STAIR_DROP_THUD, SOUND_SPACE_DEFAULT, 16, -562, 621) + Call(MakeLerp, LVar0, -550, 25 * DT, EASING_LINEAR) + Call(UpdateLerp) + Label(20) + Call(UpdateLerp) + Set(LVar2, LVar0) + DivF(LVar2, 10) + Call(TranslateModel, MODEL_o2198, 0, LVar2, 0) + Call(TranslateModel, MODEL_o2199, 0, LVar2, 0) + Call(TranslateModel, MODEL_o2200, 0, LVar2, 0) + Call(TranslateModel, MODEL_o2201, 0, LVar2, 0) + Call(TranslateModel, MODEL_o2202, 0, LVar2, 0) + Call(TranslateModel, MODEL_o2203, 0, LVar2, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Call(PlaySoundAt, SOUND_ISK_STAIR_DROP_THUD, SOUND_SPACE_DEFAULT, 41, -587, 618) + Call(MakeLerp, LVar0, -800, 25 * DT, EASING_LINEAR) + Call(UpdateLerp) + Label(30) + Call(UpdateLerp) + Set(LVar2, LVar0) + DivF(LVar2, 10) + Call(TranslateModel, MODEL_o2200, 0, LVar2, 0) + Call(TranslateModel, MODEL_o2201, 0, LVar2, 0) + Call(TranslateModel, MODEL_o2202, 0, LVar2, 0) + Call(TranslateModel, MODEL_o2203, 0, LVar2, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(30) + EndIf + Call(PlaySoundAt, SOUND_ISK_STAIR_DROP_THUD, SOUND_SPACE_DEFAULT, 66, -612, 616) + Call(MakeLerp, LVar0, 0xFFFFFBE6, 25 * DT, EASING_LINEAR) + Call(UpdateLerp) + Label(40) + Call(UpdateLerp) + Set(LVar2, LVar0) + DivF(LVar2, 10) + Call(TranslateModel, MODEL_o2202, 0, LVar2, 0) + Call(TranslateModel, MODEL_o2203, 0, LVar2, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(40) + EndIf + Call(PlaySoundAt, SOUND_ISK_STAIR_DROP_THUD, SOUND_SPACE_DEFAULT, 95, -637, 614) + Return + End }; EvtScript N(EVS_ManageSecretPassage) = { - EVT_WAIT(1) - EVT_LABEL(10) - EVT_WAIT(1) - EVT_IF_NE(GB_ISK11_ItemSocket1, ITEM_PYRAMID_STONE) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_NE(GB_ISK11_ItemSocket3, ITEM_DIAMOND_STONE) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_NE(GB_ISK11_ItemSocket5, ITEM_LUNAR_STONE) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2087, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2088, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2089, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2090, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2091, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2092, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o2222, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o2223, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o2224, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o2225, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o2226, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o2226, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o2227, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_CALL(PlaySoundAtCollider, COLLIDER_o2092, SOUND_LARGE_LENS_FLARE, SOUND_SPACE_DEFAULT) - EVT_CALL(N(SpawnLensFlare), -16, -438, 510, 240) - EVT_CALL(N(SpawnLensFlare), 16, -438, 510, 240) - EVT_WAIT(5 * DT) - EVT_CALL(N(SpawnLensFlare), -27, -438, 508, 240) - EVT_CALL(N(SpawnLensFlare), -64, -438, 505, 240) - EVT_CALL(N(SpawnLensFlare), 27, -438, 508, 240) - EVT_CALL(N(SpawnLensFlare), 64, -438, 505, 240) - EVT_WAIT(5 * DT) - EVT_CALL(N(SpawnLensFlare), -74, -438, 504, 240) - EVT_CALL(N(SpawnLensFlare), -104, -438, 499, 240) - EVT_CALL(N(SpawnLensFlare), 74, -438, 504, 240) - EVT_CALL(N(SpawnLensFlare), 104, -438, 499, 240) - EVT_END_THREAD - EVT_WAIT(30 * DT) - EVT_THREAD - EVT_CALL(PlaySound, SOUND_LOOP_ISK_LOWER_STAIRS) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 330, EVT_FLOAT(0.5)) - EVT_CALL(StopSound, SOUND_LOOP_ISK_LOWER_STAIRS) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(12) - EVT_PLAY_EFFECT(EFFECT_DUST, 0, 0, -390, 550, 30) - EVT_WAIT(20 * DT) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(10 * DT) - EVT_SET(MV_HiddenStairsRevealed, FALSE) - EVT_SET(MV_PlayerPanicDone, FALSE) - EVT_THREAD - EVT_WAIT(20 * DT) - EVT_LABEL(20) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_CarryRun) - EVT_WAIT(8 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_CarryAboveRun) - EVT_WAIT(8 * DT) - EVT_IF_FALSE(MV_PlayerPanicDone) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(20 * DT) + Wait(1) + Label(10) + Wait(1) + IfNe(GB_ISK11_ItemSocket1, ITEM_PYRAMID_STONE) + Goto(10) + EndIf + IfNe(GB_ISK11_ItemSocket3, ITEM_DIAMOND_STONE) + Goto(10) + EndIf + IfNe(GB_ISK11_ItemSocket5, ITEM_LUNAR_STONE) + Goto(10) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2087, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2088, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2089, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2090, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2091, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2092, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o2222, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o2223, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o2224, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o2225, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o2226, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o2226, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o2227, COLLIDER_FLAGS_UPPER_MASK) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Wait(10 * DT) + Thread + Call(PlaySoundAtCollider, COLLIDER_o2092, SOUND_LARGE_LENS_FLARE, SOUND_SPACE_DEFAULT) + Call(N(SpawnLensFlare), -16, -438, 510, 240) + Call(N(SpawnLensFlare), 16, -438, 510, 240) + Wait(5 * DT) + Call(N(SpawnLensFlare), -27, -438, 508, 240) + Call(N(SpawnLensFlare), -64, -438, 505, 240) + Call(N(SpawnLensFlare), 27, -438, 508, 240) + Call(N(SpawnLensFlare), 64, -438, 505, 240) + Wait(5 * DT) + Call(N(SpawnLensFlare), -74, -438, 504, 240) + Call(N(SpawnLensFlare), -104, -438, 499, 240) + Call(N(SpawnLensFlare), 74, -438, 504, 240) + Call(N(SpawnLensFlare), 104, -438, 499, 240) + EndThread + Wait(30 * DT) + Thread + Call(PlaySound, SOUND_LOOP_ISK_LOWER_STAIRS) + Call(ShakeCam, CAM_DEFAULT, 0, 330, Float(0.5)) + Call(StopSound, SOUND_LOOP_ISK_LOWER_STAIRS) + EndThread + Thread + Loop(12) + PlayEffect(EFFECT_DUST, 0, 0, -390, 550, 30) + Wait(20 * DT) + EndLoop + EndThread + Wait(10 * DT) + Set(MV_HiddenStairsRevealed, FALSE) + Set(MV_PlayerPanicDone, FALSE) + Thread + Wait(20 * DT) + Label(20) + Call(SetPlayerAnimation, ANIM_MarioW1_CarryRun) + Wait(8 * DT) + Call(SetPlayerAnimation, ANIM_MarioW1_CarryAboveRun) + Wait(8 * DT) + IfFalse(MV_PlayerPanicDone) + Goto(20) + EndIf + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndThread + Thread + Wait(20 * DT) #if VERSION_PAL - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(4.0 / DT)) + Call(SetPlayerSpeed, Float(4.0 / DT)) #else - EVT_CALL(SetPlayerSpeed, 4) + Call(SetPlayerSpeed, 4) #endif - EVT_LABEL(30) - EVT_CALL(PlayerMoveTo, 66, 555, 0) - EVT_CALL(PlayerMoveTo, -66, 555, 0) - EVT_IF_FALSE(MV_HiddenStairsRevealed) - EVT_GOTO(30) - EVT_END_IF - EVT_CALL(PlayerMoveTo, 0, 555, 0) - EVT_SET(MV_PlayerPanicDone, TRUE) - EVT_END_THREAD - EVT_WAIT(40 * DT) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, -520, 530) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 140) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(22.7), EVT_FLOAT(-22.7)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, -520, 530) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(EnableGroup, MODEL_15, TRUE) - EVT_CALL(EnableGroup, MODEL_g377, FALSE) - EVT_CALL(EnableModel, MODEL_o2205, FALSE) - EVT_WAIT(60) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, -520, 530) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, -520, 530) - EVT_WAIT(10 * DT) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(10.0), EVT_FLOAT(12.0)) - EVT_WAIT(90 * DT) - EVT_EXEC(N(EVS_DropHiddenStairs)) - EVT_WAIT(60 * DT) - EVT_SET(MV_HiddenStairsRevealed, TRUE) - EVT_WAIT(100 * DT) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_SET(GB_StoryProgress, STORY_CH2_SOLVED_ARTIFACT_PUZZLE) - EVT_CALL(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2186, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Label(30) + Call(PlayerMoveTo, 66, 555, 0) + Call(PlayerMoveTo, -66, 555, 0) + IfFalse(MV_HiddenStairsRevealed) + Goto(30) + EndIf + Call(PlayerMoveTo, 0, 555, 0) + Set(MV_PlayerPanicDone, TRUE) + EndThread + Wait(40 * DT) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(UseSettingsFrom, CAM_DEFAULT, 0, -520, 530) + Call(SetCamDistance, CAM_DEFAULT, 140) + Call(SetCamPitch, CAM_DEFAULT, Float(22.7), Float(-22.7)) + Call(SetPanTarget, CAM_DEFAULT, 0, -520, 530) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(EnableGroup, MODEL_15, TRUE) + Call(EnableGroup, MODEL_g377, FALSE) + Call(EnableModel, MODEL_o2205, FALSE) + Wait(60) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(UseSettingsFrom, CAM_DEFAULT, 0, -520, 530) + Call(SetPanTarget, CAM_DEFAULT, 0, -520, 530) + Wait(10 * DT) + Call(SetCamPitch, CAM_DEFAULT, Float(10.0), Float(12.0)) + Wait(90 * DT) + Exec(N(EVS_DropHiddenStairs)) + Wait(60 * DT) + Set(MV_HiddenStairsRevealed, TRUE) + Wait(100 * DT) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Set(GB_StoryProgress, STORY_CH2_SOLVED_ARTIFACT_PUZZLE) + Call(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2186, COLLIDER_FLAGS_UPPER_MASK) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_isk/isk_11/isk_11_5_puzzle.c b/src/world/area_isk/isk_11/isk_11_5_puzzle.c index 2f6b643d241..a96d7c27574 100644 --- a/src/world/area_isk/isk_11/isk_11_5_puzzle.c +++ b/src/world/area_isk/isk_11/isk_11_5_puzzle.c @@ -22,293 +22,293 @@ s32 N(ItemList_Artifacts)[] = { }; EvtScript N(EVS_SetupPuzzle) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH2_SOLVED_ARTIFACT_PUZZLE) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_ItemPrompt_Socket1)), TRIGGER_WALL_PRESS_A, COLLIDER_o2087, EVT_PTR(N(ItemList_Artifacts)), 0, 1) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_ItemPrompt_Socket2)), TRIGGER_WALL_PRESS_A, COLLIDER_o2091, EVT_PTR(N(ItemList_Artifacts)), 0, 1) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_ItemPrompt_Socket3)), TRIGGER_WALL_PRESS_A, COLLIDER_o2090, EVT_PTR(N(ItemList_Artifacts)), 0, 1) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_ItemPrompt_Socket4)), TRIGGER_WALL_PRESS_A, COLLIDER_o2089, EVT_PTR(N(ItemList_Artifacts)), 0, 1) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_ItemPrompt_Socket5)), TRIGGER_WALL_PRESS_A, COLLIDER_o2088, EVT_PTR(N(ItemList_Artifacts)), 0, 1) - EVT_END_IF - EVT_SET(MV_Socket1_ItemEntity, -1) - EVT_SET(MV_Socket2_ItemEntity, -1) - EVT_SET(MV_Socket3_ItemEntity, -1) - EVT_SET(MV_Socket4_ItemEntity, -1) - EVT_SET(MV_Socket5_ItemEntity, -1) - EVT_IF_NE(GB_ISK11_ItemSocket1, 0) - EVT_CALL(MakeItemEntity, GB_ISK11_ItemSocket1, -88, -508, 502, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(MV_Socket1_ItemEntity, LVar0) - EVT_END_IF - EVT_IF_NE(GB_ISK11_ItemSocket2, 0) - EVT_CALL(MakeItemEntity, GB_ISK11_ItemSocket2, -44, -508, 508, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(MV_Socket2_ItemEntity, LVar0) - EVT_END_IF - EVT_IF_NE(GB_ISK11_ItemSocket3, 0) - EVT_CALL(MakeItemEntity, GB_ISK11_ItemSocket3, 0, -508, 510, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(MV_Socket3_ItemEntity, LVar0) - EVT_END_IF - EVT_IF_NE(GB_ISK11_ItemSocket4, 0) - EVT_CALL(MakeItemEntity, GB_ISK11_ItemSocket4, 44, -508, 508, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(MV_Socket4_ItemEntity, LVar0) - EVT_END_IF - EVT_IF_NE(GB_ISK11_ItemSocket5, 0) - EVT_CALL(MakeItemEntity, GB_ISK11_ItemSocket5, 88, -508, 502, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(MV_Socket5_ItemEntity, LVar0) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH2_SOLVED_ARTIFACT_PUZZLE) + BindPadlock(Ref(N(EVS_ItemPrompt_Socket1)), TRIGGER_WALL_PRESS_A, COLLIDER_o2087, Ref(N(ItemList_Artifacts)), 0, 1) + BindPadlock(Ref(N(EVS_ItemPrompt_Socket2)), TRIGGER_WALL_PRESS_A, COLLIDER_o2091, Ref(N(ItemList_Artifacts)), 0, 1) + BindPadlock(Ref(N(EVS_ItemPrompt_Socket3)), TRIGGER_WALL_PRESS_A, COLLIDER_o2090, Ref(N(ItemList_Artifacts)), 0, 1) + BindPadlock(Ref(N(EVS_ItemPrompt_Socket4)), TRIGGER_WALL_PRESS_A, COLLIDER_o2089, Ref(N(ItemList_Artifacts)), 0, 1) + BindPadlock(Ref(N(EVS_ItemPrompt_Socket5)), TRIGGER_WALL_PRESS_A, COLLIDER_o2088, Ref(N(ItemList_Artifacts)), 0, 1) + EndIf + Set(MV_Socket1_ItemEntity, -1) + Set(MV_Socket2_ItemEntity, -1) + Set(MV_Socket3_ItemEntity, -1) + Set(MV_Socket4_ItemEntity, -1) + Set(MV_Socket5_ItemEntity, -1) + IfNe(GB_ISK11_ItemSocket1, 0) + Call(MakeItemEntity, GB_ISK11_ItemSocket1, -88, -508, 502, ITEM_SPAWN_MODE_DECORATION, 0) + Set(MV_Socket1_ItemEntity, LVar0) + EndIf + IfNe(GB_ISK11_ItemSocket2, 0) + Call(MakeItemEntity, GB_ISK11_ItemSocket2, -44, -508, 508, ITEM_SPAWN_MODE_DECORATION, 0) + Set(MV_Socket2_ItemEntity, LVar0) + EndIf + IfNe(GB_ISK11_ItemSocket3, 0) + Call(MakeItemEntity, GB_ISK11_ItemSocket3, 0, -508, 510, ITEM_SPAWN_MODE_DECORATION, 0) + Set(MV_Socket3_ItemEntity, LVar0) + EndIf + IfNe(GB_ISK11_ItemSocket4, 0) + Call(MakeItemEntity, GB_ISK11_ItemSocket4, 44, -508, 508, ITEM_SPAWN_MODE_DECORATION, 0) + Set(MV_Socket4_ItemEntity, LVar0) + EndIf + IfNe(GB_ISK11_ItemSocket5, 0) + Call(MakeItemEntity, GB_ISK11_ItemSocket5, 88, -508, 502, ITEM_SPAWN_MODE_DECORATION, 0) + Set(MV_Socket5_ItemEntity, LVar0) + EndIf + Return + End }; EvtScript N(EVS_ItemPrompt_Socket1) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH2_SOLVED_ARTIFACT_PUZZLE) - EVT_UNBIND - EVT_RETURN - EVT_END_IF - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_IF_NE(GB_ISK11_ItemSocket1, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(GetItemNameInSocket), GB_ISK11_ItemSocket1, LVar0) - EVT_CALL(SetMessageText, LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_ISK11_TakeItemPrompt, 160, 40) - EVT_CALL(ShowChoice, MSG_Choice_000D) - EVT_CALL(CloseMessage) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o2087, SOUND_ISK_PLACE_IN_SOCKET, SOUND_SPACE_DEFAULT) - EVT_CALL(AddKeyItem, GB_ISK11_ItemSocket1) - EVT_SET(LVar0, GB_ISK11_ItemSocket1) - EVT_SET(GB_ISK11_ItemSocket1, 0) - EVT_CALL(RemoveItemEntity, MV_Socket1_ItemEntity) - EVT_SET(MV_Socket1_ItemEntity, -1) - EVT_CALL(ShowGotItem, LVar0, FALSE, ITEM_PICKUP_FLAG_NO_SOUND) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END_IF - EVT_CALL(ShowKeyChoicePopup) - EVT_SET(LVar2, LVar0) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_ChompStatue, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_CASE_EQ(-1) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END_SWITCH - EVT_SET(GB_ISK11_ItemSocket1, LVar2) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(MakeItemEntity, GB_ISK11_ItemSocket1, -88, -508, 502, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(MV_Socket1_ItemEntity, LVar0) - EVT_CALL(CloseChoicePopup) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o2087, SOUND_ISK_PLACE_IN_SOCKET, SOUND_SPACE_DEFAULT) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH2_SOLVED_ARTIFACT_PUZZLE) + Unbind + Return + EndIf + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + IfNe(GB_ISK11_ItemSocket1, 0) + Call(DisablePlayerInput, TRUE) + Call(N(GetItemNameInSocket), GB_ISK11_ItemSocket1, LVar0) + Call(SetMessageText, LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_ISK11_TakeItemPrompt, 160, 40) + Call(ShowChoice, MSG_Choice_000D) + Call(CloseMessage) + IfEq(LVar0, 0) + Call(PlaySoundAtCollider, COLLIDER_o2087, SOUND_ISK_PLACE_IN_SOCKET, SOUND_SPACE_DEFAULT) + Call(AddKeyItem, GB_ISK11_ItemSocket1) + Set(LVar0, GB_ISK11_ItemSocket1) + Set(GB_ISK11_ItemSocket1, 0) + Call(RemoveItemEntity, MV_Socket1_ItemEntity) + Set(MV_Socket1_ItemEntity, -1) + Call(ShowGotItem, LVar0, FALSE, ITEM_PICKUP_FLAG_NO_SOUND) + EndIf + Call(DisablePlayerInput, FALSE) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + EndIf + Call(ShowKeyChoicePopup) + Set(LVar2, LVar0) + Switch(LVar2) + CaseEq(0) + Call(ShowMessageAtScreenPos, MSG_Menus_Inspect_ChompStatue, 160, 40) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + CaseEq(-1) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + EndSwitch + Set(GB_ISK11_ItemSocket1, LVar2) + Call(RemoveKeyItemAt, LVar1) + Call(MakeItemEntity, GB_ISK11_ItemSocket1, -88, -508, 502, ITEM_SPAWN_MODE_DECORATION, 0) + Set(MV_Socket1_ItemEntity, LVar0) + Call(CloseChoicePopup) + Call(PlaySoundAtCollider, COLLIDER_o2087, SOUND_ISK_PLACE_IN_SOCKET, SOUND_SPACE_DEFAULT) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + End }; EvtScript N(EVS_ItemPrompt_Socket2) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH2_SOLVED_ARTIFACT_PUZZLE) - EVT_UNBIND - EVT_RETURN - EVT_END_IF - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_IF_NE(GB_ISK11_ItemSocket2, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(GetItemNameInSocket), GB_ISK11_ItemSocket2, LVar0) - EVT_CALL(SetMessageText, LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_ISK11_TakeItemPrompt, 160, 40) - EVT_CALL(ShowChoice, MSG_Choice_000D) - EVT_CALL(CloseMessage) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o2091, SOUND_ISK_PLACE_IN_SOCKET, SOUND_SPACE_DEFAULT) - EVT_CALL(AddKeyItem, GB_ISK11_ItemSocket2) - EVT_SET(LVar0, GB_ISK11_ItemSocket2) - EVT_SET(GB_ISK11_ItemSocket2, 0) - EVT_CALL(RemoveItemEntity, MV_Socket2_ItemEntity) - EVT_SET(MV_Socket2_ItemEntity, -1) - EVT_CALL(ShowGotItem, LVar0, FALSE, ITEM_PICKUP_FLAG_NO_SOUND) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END_IF - EVT_CALL(ShowKeyChoicePopup) - EVT_SET(LVar2, LVar0) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_ChompStatue, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_CASE_EQ(-1) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END_SWITCH - EVT_SET(GB_ISK11_ItemSocket2, LVar2) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(MakeItemEntity, GB_ISK11_ItemSocket2, -44, -508, 508, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(MV_Socket2_ItemEntity, LVar0) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o2091, SOUND_ISK_PLACE_IN_SOCKET, SOUND_SPACE_DEFAULT) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH2_SOLVED_ARTIFACT_PUZZLE) + Unbind + Return + EndIf + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + IfNe(GB_ISK11_ItemSocket2, 0) + Call(DisablePlayerInput, TRUE) + Call(N(GetItemNameInSocket), GB_ISK11_ItemSocket2, LVar0) + Call(SetMessageText, LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_ISK11_TakeItemPrompt, 160, 40) + Call(ShowChoice, MSG_Choice_000D) + Call(CloseMessage) + IfEq(LVar0, 0) + Call(PlaySoundAtCollider, COLLIDER_o2091, SOUND_ISK_PLACE_IN_SOCKET, SOUND_SPACE_DEFAULT) + Call(AddKeyItem, GB_ISK11_ItemSocket2) + Set(LVar0, GB_ISK11_ItemSocket2) + Set(GB_ISK11_ItemSocket2, 0) + Call(RemoveItemEntity, MV_Socket2_ItemEntity) + Set(MV_Socket2_ItemEntity, -1) + Call(ShowGotItem, LVar0, FALSE, ITEM_PICKUP_FLAG_NO_SOUND) + EndIf + Call(DisablePlayerInput, FALSE) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + EndIf + Call(ShowKeyChoicePopup) + Set(LVar2, LVar0) + Switch(LVar2) + CaseEq(0) + Call(ShowMessageAtScreenPos, MSG_Menus_Inspect_ChompStatue, 160, 40) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + CaseEq(-1) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + EndSwitch + Set(GB_ISK11_ItemSocket2, LVar2) + Call(RemoveKeyItemAt, LVar1) + Call(MakeItemEntity, GB_ISK11_ItemSocket2, -44, -508, 508, ITEM_SPAWN_MODE_DECORATION, 0) + Set(MV_Socket2_ItemEntity, LVar0) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Call(PlaySoundAtCollider, COLLIDER_o2091, SOUND_ISK_PLACE_IN_SOCKET, SOUND_SPACE_DEFAULT) + Return + End }; EvtScript N(EVS_ItemPrompt_Socket3) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH2_SOLVED_ARTIFACT_PUZZLE) - EVT_UNBIND - EVT_RETURN - EVT_END_IF - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_IF_NE(GB_ISK11_ItemSocket3, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(GetItemNameInSocket), GB_ISK11_ItemSocket3, LVar0) - EVT_CALL(SetMessageText, LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_ISK11_TakeItemPrompt, 160, 40) - EVT_CALL(ShowChoice, MSG_Choice_000D) - EVT_CALL(CloseMessage) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o2090, SOUND_ISK_PLACE_IN_SOCKET, SOUND_SPACE_DEFAULT) - EVT_CALL(AddKeyItem, GB_ISK11_ItemSocket3) - EVT_SET(LVar0, GB_ISK11_ItemSocket3) - EVT_SET(GB_ISK11_ItemSocket3, 0) - EVT_CALL(RemoveItemEntity, MV_Socket3_ItemEntity) - EVT_SET(MV_Socket3_ItemEntity, -1) - EVT_CALL(ShowGotItem, LVar0, FALSE, ITEM_PICKUP_FLAG_NO_SOUND) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END_IF - EVT_CALL(ShowKeyChoicePopup) - EVT_SET(LVar2, LVar0) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_ChompStatue, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_CASE_EQ(-1) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END_SWITCH - EVT_SET(GB_ISK11_ItemSocket3, LVar2) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(MakeItemEntity, GB_ISK11_ItemSocket3, 0, -508, 510, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(MV_Socket3_ItemEntity, LVar0) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o2090, SOUND_ISK_PLACE_IN_SOCKET, SOUND_SPACE_DEFAULT) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH2_SOLVED_ARTIFACT_PUZZLE) + Unbind + Return + EndIf + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + IfNe(GB_ISK11_ItemSocket3, 0) + Call(DisablePlayerInput, TRUE) + Call(N(GetItemNameInSocket), GB_ISK11_ItemSocket3, LVar0) + Call(SetMessageText, LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_ISK11_TakeItemPrompt, 160, 40) + Call(ShowChoice, MSG_Choice_000D) + Call(CloseMessage) + IfEq(LVar0, 0) + Call(PlaySoundAtCollider, COLLIDER_o2090, SOUND_ISK_PLACE_IN_SOCKET, SOUND_SPACE_DEFAULT) + Call(AddKeyItem, GB_ISK11_ItemSocket3) + Set(LVar0, GB_ISK11_ItemSocket3) + Set(GB_ISK11_ItemSocket3, 0) + Call(RemoveItemEntity, MV_Socket3_ItemEntity) + Set(MV_Socket3_ItemEntity, -1) + Call(ShowGotItem, LVar0, FALSE, ITEM_PICKUP_FLAG_NO_SOUND) + EndIf + Call(DisablePlayerInput, FALSE) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + EndIf + Call(ShowKeyChoicePopup) + Set(LVar2, LVar0) + Switch(LVar2) + CaseEq(0) + Call(ShowMessageAtScreenPos, MSG_Menus_Inspect_ChompStatue, 160, 40) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + CaseEq(-1) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + EndSwitch + Set(GB_ISK11_ItemSocket3, LVar2) + Call(RemoveKeyItemAt, LVar1) + Call(MakeItemEntity, GB_ISK11_ItemSocket3, 0, -508, 510, ITEM_SPAWN_MODE_DECORATION, 0) + Set(MV_Socket3_ItemEntity, LVar0) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Call(PlaySoundAtCollider, COLLIDER_o2090, SOUND_ISK_PLACE_IN_SOCKET, SOUND_SPACE_DEFAULT) + Return + End }; EvtScript N(EVS_ItemPrompt_Socket4) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH2_SOLVED_ARTIFACT_PUZZLE) - EVT_UNBIND - EVT_RETURN - EVT_END_IF - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_IF_NE(GB_ISK11_ItemSocket4, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(GetItemNameInSocket), GB_ISK11_ItemSocket4, LVar0) - EVT_CALL(SetMessageText, LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_ISK11_TakeItemPrompt, 160, 40) - EVT_CALL(ShowChoice, MSG_Choice_000D) - EVT_CALL(CloseMessage) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o2089, SOUND_ISK_PLACE_IN_SOCKET, SOUND_SPACE_DEFAULT) - EVT_CALL(AddKeyItem, GB_ISK11_ItemSocket4) - EVT_SET(LVar0, GB_ISK11_ItemSocket4) - EVT_SET(GB_ISK11_ItemSocket4, 0) - EVT_CALL(RemoveItemEntity, MV_Socket4_ItemEntity) - EVT_SET(MV_Socket4_ItemEntity, -1) - EVT_CALL(ShowGotItem, LVar0, FALSE, ITEM_PICKUP_FLAG_NO_SOUND) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END_IF - EVT_CALL(ShowKeyChoicePopup) - EVT_SET(LVar2, LVar0) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_ChompStatue, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_CASE_EQ(-1) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END_SWITCH - EVT_SET(GB_ISK11_ItemSocket4, LVar2) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(MakeItemEntity, GB_ISK11_ItemSocket4, 44, -508, 508, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(MV_Socket4_ItemEntity, LVar0) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o2089, SOUND_ISK_PLACE_IN_SOCKET, SOUND_SPACE_DEFAULT) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH2_SOLVED_ARTIFACT_PUZZLE) + Unbind + Return + EndIf + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + IfNe(GB_ISK11_ItemSocket4, 0) + Call(DisablePlayerInput, TRUE) + Call(N(GetItemNameInSocket), GB_ISK11_ItemSocket4, LVar0) + Call(SetMessageText, LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_ISK11_TakeItemPrompt, 160, 40) + Call(ShowChoice, MSG_Choice_000D) + Call(CloseMessage) + IfEq(LVar0, 0) + Call(PlaySoundAtCollider, COLLIDER_o2089, SOUND_ISK_PLACE_IN_SOCKET, SOUND_SPACE_DEFAULT) + Call(AddKeyItem, GB_ISK11_ItemSocket4) + Set(LVar0, GB_ISK11_ItemSocket4) + Set(GB_ISK11_ItemSocket4, 0) + Call(RemoveItemEntity, MV_Socket4_ItemEntity) + Set(MV_Socket4_ItemEntity, -1) + Call(ShowGotItem, LVar0, FALSE, ITEM_PICKUP_FLAG_NO_SOUND) + EndIf + Call(DisablePlayerInput, FALSE) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + EndIf + Call(ShowKeyChoicePopup) + Set(LVar2, LVar0) + Switch(LVar2) + CaseEq(0) + Call(ShowMessageAtScreenPos, MSG_Menus_Inspect_ChompStatue, 160, 40) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + CaseEq(-1) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + EndSwitch + Set(GB_ISK11_ItemSocket4, LVar2) + Call(RemoveKeyItemAt, LVar1) + Call(MakeItemEntity, GB_ISK11_ItemSocket4, 44, -508, 508, ITEM_SPAWN_MODE_DECORATION, 0) + Set(MV_Socket4_ItemEntity, LVar0) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Call(PlaySoundAtCollider, COLLIDER_o2089, SOUND_ISK_PLACE_IN_SOCKET, SOUND_SPACE_DEFAULT) + Return + End }; EvtScript N(EVS_ItemPrompt_Socket5) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH2_SOLVED_ARTIFACT_PUZZLE) - EVT_UNBIND - EVT_RETURN - EVT_END_IF - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_IF_NE(GB_ISK11_ItemSocket5, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(GetItemNameInSocket), GB_ISK11_ItemSocket5, LVar0) - EVT_CALL(SetMessageText, LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_ISK11_TakeItemPrompt, 160, 40) - EVT_CALL(ShowChoice, MSG_Choice_000D) - EVT_CALL(CloseMessage) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o2088, SOUND_ISK_PLACE_IN_SOCKET, SOUND_SPACE_DEFAULT) - EVT_CALL(AddKeyItem, GB_ISK11_ItemSocket5) - EVT_SET(LVar0, GB_ISK11_ItemSocket5) - EVT_SET(GB_ISK11_ItemSocket5, 0) - EVT_CALL(RemoveItemEntity, MV_Socket5_ItemEntity) - EVT_SET(MV_Socket5_ItemEntity, -1) - EVT_CALL(ShowGotItem, LVar0, FALSE, ITEM_PICKUP_FLAG_NO_SOUND) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END_IF - EVT_CALL(ShowKeyChoicePopup) - EVT_SET(LVar2, LVar0) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_ChompStatue, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_CASE_EQ(-1) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END_SWITCH - EVT_SET(GB_ISK11_ItemSocket5, LVar2) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(MakeItemEntity, GB_ISK11_ItemSocket5, 88, -508, 502, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(MV_Socket5_ItemEntity, LVar0) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o2088, SOUND_ISK_PLACE_IN_SOCKET, SOUND_SPACE_DEFAULT) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH2_SOLVED_ARTIFACT_PUZZLE) + Unbind + Return + EndIf + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + IfNe(GB_ISK11_ItemSocket5, 0) + Call(DisablePlayerInput, TRUE) + Call(N(GetItemNameInSocket), GB_ISK11_ItemSocket5, LVar0) + Call(SetMessageText, LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_ISK11_TakeItemPrompt, 160, 40) + Call(ShowChoice, MSG_Choice_000D) + Call(CloseMessage) + IfEq(LVar0, 0) + Call(PlaySoundAtCollider, COLLIDER_o2088, SOUND_ISK_PLACE_IN_SOCKET, SOUND_SPACE_DEFAULT) + Call(AddKeyItem, GB_ISK11_ItemSocket5) + Set(LVar0, GB_ISK11_ItemSocket5) + Set(GB_ISK11_ItemSocket5, 0) + Call(RemoveItemEntity, MV_Socket5_ItemEntity) + Set(MV_Socket5_ItemEntity, -1) + Call(ShowGotItem, LVar0, FALSE, ITEM_PICKUP_FLAG_NO_SOUND) + EndIf + Call(DisablePlayerInput, FALSE) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + EndIf + Call(ShowKeyChoicePopup) + Set(LVar2, LVar0) + Switch(LVar2) + CaseEq(0) + Call(ShowMessageAtScreenPos, MSG_Menus_Inspect_ChompStatue, 160, 40) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + CaseEq(-1) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + EndSwitch + Set(GB_ISK11_ItemSocket5, LVar2) + Call(RemoveKeyItemAt, LVar1) + Call(MakeItemEntity, GB_ISK11_ItemSocket5, 88, -508, 502, ITEM_SPAWN_MODE_DECORATION, 0) + Set(MV_Socket5_ItemEntity, LVar0) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Call(PlaySoundAtCollider, COLLIDER_o2088, SOUND_ISK_PLACE_IN_SOCKET, SOUND_SPACE_DEFAULT) + Return + End }; diff --git a/src/world/area_isk/isk_11/isk_11_6_lock.c b/src/world/area_isk/isk_11/isk_11_6_lock.c index 9bbde336c8f..44b4a0c6d52 100644 --- a/src/world/area_isk/isk_11/isk_11_6_lock.c +++ b/src/world/area_isk/isk_11/isk_11_6_lock.c @@ -8,47 +8,47 @@ s32 N(ItemList_RuinsKey)[] = { }; EvtScript N(EVS_UnlockPrompt_RuinsKey) = { - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, 355, -460, 430) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_SET(GF_ISK11_UnlockedDoor, TRUE) - EVT_SET(LVar0, MV_LockEntityID) - EVT_CALL(N(RemovePadlock)) - EVT_SET(LVar1, 0) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittne, SOUND_ISK_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 65, 65, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g374, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(CloseChoicePopup) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(ShowKeyChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) + Call(CloseChoicePopup) + Return + EndIf + IfEq(LVar0, -1) + Call(CloseChoicePopup) + Return + EndIf + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, 355, -460, 430) + Call(RemoveKeyItemAt, LVar1) + Set(GF_ISK11_UnlockedDoor, TRUE) + Set(LVar0, MV_LockEntityID) + Call(N(RemovePadlock)) + Set(LVar1, 0) + Wait(5) + Call(PlaySoundAtCollider, COLLIDER_deilittne, SOUND_ISK_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 65, 65, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g374, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) + Call(CloseChoicePopup) + Unbind + Return + End }; EvtScript N(EVS_SetupLock) = { - EVT_IF_EQ(GF_ISK11_UnlockedDoor, FALSE) - EVT_CALL(MakeTransformGroup, MODEL_g374) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_UnlockPrompt_RuinsKey)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(ItemList_RuinsKey)), 0, 1) - EVT_ELSE - EVT_CALL(EnableGroup, MODEL_g374, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_SURFACE_TYPE_MASK | COLLIDER_FLAG_SAFE_FLOOR | COLLIDER_FLAG_IGNORE_SHELL | COLLIDER_FLAG_IGNORE_PLAYER | COLLIDER_FLAG_DOCK_WALL | 0x7FF47E00) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_ISK11_UnlockedDoor, FALSE) + Call(MakeTransformGroup, MODEL_g374) + BindPadlock(Ref(N(EVS_UnlockPrompt_RuinsKey)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), Ref(N(ItemList_RuinsKey)), 0, 1) + Else + Call(EnableGroup, MODEL_g374, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_SURFACE_TYPE_MASK | COLLIDER_FLAG_SAFE_FLOOR | COLLIDER_FLAG_IGNORE_SHELL | COLLIDER_FLAG_IGNORE_PLAYER | COLLIDER_FLAG_DOCK_WALL | 0x7FF47E00) + EndIf + Return + End }; diff --git a/src/world/area_isk/isk_12/isk_12_1_main.c b/src/world/area_isk/isk_12/isk_12_1_main.c index 91720d8b490..075299492be 100644 --- a/src/world/area_isk/isk_12/isk_12_1_main.c +++ b/src/world/area_isk/isk_12/isk_12_1_main.c @@ -6,41 +6,41 @@ EvtScript N(EVS_ExitWalk_isk_18_1) = EVT_EXIT_WALK(40, isk_12_ENTRY_2, "isk_18", EvtScript N(EVS_ExitWalk_isk_13_0) = EVT_EXIT_WALK(40, isk_12_ENTRY_3, "isk_13", isk_13_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_11_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_11_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_18_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_13_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_isk_11_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_isk_11_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_isk_18_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_isk_13_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) - EVT_CALL(SetSpriteShading, SHADING_ISK_12) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_IF_LT(GB_StoryProgress, STORY_CH2_DRAINED_THIRD_SAND_ROOM) - EVT_CALL(SetZoneEnabled, ZONE_deiliw, FALSE) - EVT_ELSE - EVT_CALL(SetZoneEnabled, ZONE_deiliw, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_on, FALSE) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupSand)) - EVT_EXEC(N(EVS_SetupSwitches)) + Set(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) + Call(SetSpriteShading, SHADING_ISK_12) + SetUP_CAMERA_NO_LEAD() + IfLt(GB_StoryProgress, STORY_CH2_DRAINED_THIRD_SAND_ROOM) + Call(SetZoneEnabled, ZONE_deiliw, FALSE) + Else + Call(SetZoneEnabled, ZONE_deiliw, FALSE) + Call(SetZoneEnabled, ZONE_on, FALSE) + EndIf + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupSand)) + Exec(N(EVS_SetupSwitches)) #if VERSION_PAL - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) #else - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_CASE_LT(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) - EVT_CASE_GE(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_END_SWITCH + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + CaseLt(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) + CaseGe(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + EndSwitch #endif - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_isk/isk_12/isk_12_2_entity.c b/src/world/area_isk/isk_12/isk_12_2_entity.c index 582016fcc39..22bbbbf01a7 100644 --- a/src/world/area_isk/isk_12/isk_12_2_entity.c +++ b/src/world/area_isk/isk_12/isk_12_2_entity.c @@ -3,23 +3,23 @@ #include "effects.h" EvtScript N(EVS_SmashBlock_Stone) = { - EVT_SET(GF_ISK12_Hammer2Block, TRUE) - EVT_RETURN - EVT_END + Set(GF_ISK12_Hammer2Block, TRUE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_ISK12_Hammer2Block, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer2Block), 627, -840, 135, 75, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_SmashBlock_Stone))) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 415, -453, 291, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 505, -453, 44, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 415, -643, 291, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 505, -643, 44, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 417, -643, 196, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 444, -643, 120, EVT_FLOAT(0.3), LVar0) - EVT_CALL(MakeItemEntity, ITEM_RUINS_KEY, 461, -760, 109, ITEM_SPAWN_MODE_KEY, GF_ISK12_Item_RuinsKey) - EVT_RETURN - EVT_END + IfEq(GF_ISK12_Hammer2Block, FALSE) + Call(MakeEntity, Ref(Entity_Hammer2Block), 627, -840, 135, 75, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_SmashBlock_Stone))) + EndIf + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 415, -453, 291, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 505, -453, 44, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 415, -643, 291, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 505, -643, 44, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 417, -643, 196, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 444, -643, 120, Float(0.3), LVar0) + Call(MakeItemEntity, ITEM_RUINS_KEY, 461, -760, 109, ITEM_SPAWN_MODE_KEY, GF_ISK12_Item_RuinsKey) + Return + End }; diff --git a/src/world/area_isk/isk_12/isk_12_3_sand.c b/src/world/area_isk/isk_12/isk_12_3_sand.c index ed8cc0746b4..0b1fbff736b 100644 --- a/src/world/area_isk/isk_12/isk_12_3_sand.c +++ b/src/world/area_isk/isk_12/isk_12_3_sand.c @@ -1,293 +1,293 @@ #include "isk_12.h" EvtScript N(EVS_TexPan_DrippingSand) = { - EVT_CALL(SetTexPanner, MODEL_o6000, TEX_PANNER_4) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LABEL(10) - EVT_ADD(LVar1, -1000) - EVT_ADD(LVar2, 200) - EVT_CALL(SetTexPanOffset, TEX_PANNER_4, TEX_PANNER_MAIN, 0, LVar1) - EVT_CALL(SetTexPanOffset, TEX_PANNER_4, TEX_PANNER_AUX, LVar2, 0) - EVT_WAIT(1) - EVT_IF_LT(GB_StoryProgress, STORY_CH2_DRAINED_THIRD_SAND_ROOM) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(EnableModel, MODEL_o6000, FALSE) - EVT_RETURN - EVT_END + Call(SetTexPanner, MODEL_o6000, TEX_PANNER_4) + Set(LVar1, 0) + Set(LVar2, 0) + Label(10) + Add(LVar1, -1000) + Add(LVar2, 200) + Call(SetTexPanOffset, TEX_PANNER_4, TEX_PANNER_MAIN, 0, LVar1) + Call(SetTexPanOffset, TEX_PANNER_4, TEX_PANNER_AUX, LVar2, 0) + Wait(1) + IfLt(GB_StoryProgress, STORY_CH2_DRAINED_THIRD_SAND_ROOM) + Goto(10) + EndIf + Call(EnableModel, MODEL_o6000, FALSE) + Return + End }; EvtScript N(EVS_Camera_LookAtDrain) = { - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 500, -485, 178) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 400) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 50, -202) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 566, 0) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(13.6), EVT_FLOAT(-1.5)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 525, -485, 152) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_RETURN - EVT_END + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(UseSettingsFrom, CAM_DEFAULT, 500, -485, 178) + Call(SetCamDistance, CAM_DEFAULT, 400) + Call(SetCamPosA, CAM_DEFAULT, 50, -202) + Call(SetCamPosB, CAM_DEFAULT, 566, 0) + Call(SetCamPitch, CAM_DEFAULT, Float(13.6), Float(-1.5)) + Call(SetPanTarget, CAM_DEFAULT, 525, -485, 152) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Return + End }; EvtScript N(EVS_Camera_LookBelow) = { - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.5)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(3.4), EVT_FLOAT(-3.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 525, -720, 152) - EVT_RETURN - EVT_END + Call(SetCamSpeed, CAM_DEFAULT, Float(0.5)) + Call(SetCamPitch, CAM_DEFAULT, Float(3.4), Float(-3.0)) + Call(SetPanTarget, CAM_DEFAULT, 525, -720, 152) + Return + End }; EvtScript N(EVS_Camera_Reset) = { - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 525, -485, 152) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_RETURN - EVT_END + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(UseSettingsFrom, CAM_DEFAULT, 525, -485, 152) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Return + End }; EvtScript N(EVS_TexPan_UpperSand) = { - EVT_CALL(SetTexPanner, MODEL_o1706, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o1707, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o1708, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o1939, TEX_PANNER_0) - EVT_SET(LVar2, 0) - EVT_CALL(MakeLerp, 0, 500, 60, EASING_QUADRATIC_IN) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_ADD(LVar2, LVar0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, LVar2) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_LABEL(20) - EVT_ADD(LVar2, 500) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, LVar2) - EVT_WAIT(1) - EVT_IF_LT(GB_StoryProgress, STORY_CH2_DRAINED_THIRD_SAND_ROOM) - EVT_GOTO(20) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetTexPanner, MODEL_o1706, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o1707, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o1708, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o1939, TEX_PANNER_0) + Set(LVar2, 0) + Call(MakeLerp, 0, 500, 60, EASING_QUADRATIC_IN) + Label(10) + Call(UpdateLerp) + Add(LVar2, LVar0) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, LVar2) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Label(20) + Add(LVar2, 500) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, LVar2) + Wait(1) + IfLt(GB_StoryProgress, STORY_CH2_DRAINED_THIRD_SAND_ROOM) + Goto(20) + EndIf + Return + End }; EvtScript N(EVS_TexPan_LowerSand) = { - EVT_CALL(SetTexPanner, MODEL_o1699, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_o1698, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_o1692, TEX_PANNER_3) - EVT_CALL(SetTexPanner, MODEL_o1693, TEX_PANNER_3) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 0) - EVT_LABEL(10) - EVT_ADD(LVar2, 0x1800) - EVT_ADD(LVar3, -500) - EVT_ADD(LVar4, -100) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, LVar2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, 0, LVar3) - EVT_CALL(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, 0, LVar4) - EVT_WAIT(1) - EVT_IF_LT(GB_StoryProgress, STORY_CH2_DRAINED_THIRD_SAND_ROOM) - EVT_GOTO(10) - EVT_END_IF - EVT_SET(LVar5, 0x1800) - EVT_SET(LVar6, -500) - EVT_SET(LVar7, -100) - EVT_LOOP(10) - EVT_ADD(LVar5, -512) - EVT_ADD(LVar6, 50) - EVT_ADD(LVar7, 10) - EVT_ADD(LVar2, LVar5) - EVT_ADD(LVar3, LVar6) - EVT_ADD(LVar4, LVar7) - EVT_CALL(SetTexPanOffset, 1, 0, 0, LVar2) - EVT_CALL(SetTexPanOffset, 2, 0, 0, LVar3) - EVT_CALL(SetTexPanOffset, 3, 0, 0, LVar4) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetTexPanner, MODEL_o1699, TEX_PANNER_1) + Call(SetTexPanner, MODEL_o1698, TEX_PANNER_2) + Call(SetTexPanner, MODEL_o1692, TEX_PANNER_3) + Call(SetTexPanner, MODEL_o1693, TEX_PANNER_3) + Set(LVar2, 0) + Set(LVar3, 0) + Set(LVar4, 0) + Label(10) + Add(LVar2, 0x1800) + Add(LVar3, -500) + Add(LVar4, -100) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, LVar2) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, 0, LVar3) + Call(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, 0, LVar4) + Wait(1) + IfLt(GB_StoryProgress, STORY_CH2_DRAINED_THIRD_SAND_ROOM) + Goto(10) + EndIf + Set(LVar5, 0x1800) + Set(LVar6, -500) + Set(LVar7, -100) + Loop(10) + Add(LVar5, -512) + Add(LVar6, 50) + Add(LVar7, 10) + Add(LVar2, LVar5) + Add(LVar3, LVar6) + Add(LVar4, LVar7) + Call(SetTexPanOffset, 1, 0, 0, LVar2) + Call(SetTexPanOffset, 2, 0, 0, LVar3) + Call(SetTexPanOffset, 3, 0, 0, LVar4) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_RescaleDrainingSand) = { - EVT_CALL(MakeLerp, 0, 100, 60, EASING_QUADRATIC_IN) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(ScaleModel, MODEL_o1707, EVT_FLOAT(1.0), LVar0, EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeLerp, 0, 100, 60, EASING_QUADRATIC_IN) + Label(10) + Call(UpdateLerp) + Call(ScaleModel, MODEL_o1707, Float(1.0), LVar0, Float(1.0)) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Return + End }; EvtScript N(EVS_CollapseSandPile) = { - EVT_CALL(MakeLerp, 0, 50, 10, EASING_QUADRATIC_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, 100) - EVT_SETF(LVar2, 1) - EVT_ADDF(LVar2, LVar0) - EVT_SETF(LVar3, 1) - EVT_SUBF(LVar3, LVar0) - EVT_CALL(ScaleModel, MODEL_o1698, LVar2, LVar3, LVar2) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeLerp, 0, 50, 10, EASING_QUADRATIC_OUT) + Label(10) + Call(UpdateLerp) + DivF(LVar0, 100) + SetF(LVar2, 1) + AddF(LVar2, LVar0) + SetF(LVar3, 1) + SubF(LVar3, LVar0) + Call(ScaleModel, MODEL_o1698, LVar2, LVar3, LVar2) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Return + End }; EvtScript N(EVS_DrainUpperSand) = { - EVT_CALL(MakeLerp, 0, -100, 60, EASING_QUADRATIC_IN) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, 10) - EVT_SETF(LVar2, 0) - EVT_SUBF(LVar2, LVar0) - EVT_CALL(TranslateGroup, MODEL_g285, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o2007, 0, LVar2, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(MakeLerp, -100, -250, 30, EASING_LINEAR) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, 10) - EVT_SETF(LVar2, 0) - EVT_SUBF(LVar2, LVar0) - EVT_CALL(TranslateGroup, MODEL_g285, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o2007, 0, LVar2, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeLerp, 0, -100, 60, EASING_QUADRATIC_IN) + Label(10) + Call(UpdateLerp) + DivF(LVar0, 10) + SetF(LVar2, 0) + SubF(LVar2, LVar0) + Call(TranslateGroup, MODEL_g285, 0, LVar0, 0) + Call(TranslateModel, MODEL_o2007, 0, LVar2, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(MakeLerp, -100, -250, 30, EASING_LINEAR) + Label(20) + Call(UpdateLerp) + DivF(LVar0, 10) + SetF(LVar2, 0) + SubF(LVar2, LVar0) + Call(TranslateGroup, MODEL_g285, 0, LVar0, 0) + Call(TranslateModel, MODEL_o2007, 0, LVar2, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Return + End }; EvtScript N(EVS_FillLowerSand) = { - EVT_CALL(MakeTransformGroup, MODEL_g283) - EVT_CALL(MakeLerp, -200, 0, 120, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, 10) - EVT_CALL(TranslateGroup, MODEL_g283, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o1698, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeTransformGroup, MODEL_g283) + Call(MakeLerp, -200, 0, 120, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + DivF(LVar0, 10) + Call(TranslateGroup, MODEL_g283, 0, LVar0, 0) + Call(TranslateModel, MODEL_o1698, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Return + End }; EvtScript N(EVS_LowerSandColumn) = { - EVT_CALL(MakeLerp, 0, -200, 10, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o1699, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeLerp, 0, -200, 10, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o1699, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Return + End }; EvtScript N(EVS_Scene_DrainSand) = { - EVT_WAIT(5) - EVT_CALL(EnableModel, MODEL_o1692, TRUE) - EVT_CALL(EnableModel, MODEL_o1693, TRUE) - EVT_CALL(EnableModel, MODEL_o1696, TRUE) - EVT_CALL(EnableModel, MODEL_o1697, TRUE) - EVT_CALL(EnableModel, MODEL_o1698, TRUE) - EVT_CALL(EnableModel, MODEL_o1699, TRUE) - EVT_EXEC(N(EVS_Camera_LookAtDrain)) - EVT_WAIT(30) - EVT_EXEC(N(EVS_TexPan_UpperSand)) - EVT_EXEC(N(EVS_RescaleDrainingSand)) - EVT_EXEC(N(EVS_DrainUpperSand)) - EVT_CALL(PlaySound, SOUND_ISK_DRAINING_SAND) - EVT_WAIT(75) - EVT_EXEC(N(EVS_Camera_LookBelow)) - EVT_WAIT(30) - EVT_EXEC(N(EVS_TexPan_LowerSand)) - EVT_EXEC(N(EVS_FillLowerSand)) - EVT_CALL(PlaySound, SOUND_ISK_DRAINING_SAND | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_WAIT(120) - EVT_EXEC(N(EVS_LowerSandColumn)) - EVT_WAIT(5) - EVT_EXEC(N(EVS_CollapseSandPile)) - EVT_CALL(PlaySound, SOUND_ISK_DRAINING_SAND | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_WAIT(10) - EVT_CALL(EnableModel, MODEL_o1703, FALSE) - EVT_CALL(EnableModel, MODEL_o1704, FALSE) - EVT_CALL(EnableModel, MODEL_o1705, FALSE) - EVT_CALL(EnableModel, MODEL_o1706, FALSE) - EVT_CALL(EnableModel, MODEL_o1707, FALSE) - EVT_CALL(EnableModel, MODEL_o1708, FALSE) - EVT_CALL(EnableModel, MODEL_o1938, FALSE) - EVT_CALL(EnableModel, MODEL_o1939, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2040, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2041, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2042, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2043, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o2044, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o2045, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GB_StoryProgress, STORY_CH2_DRAINED_THIRD_SAND_ROOM) - EVT_CALL(SetZoneEnabled, ZONE_on, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_deiliw, TRUE) - EVT_WAIT(20) - EVT_EXEC(N(EVS_Camera_Reset)) - EVT_WAIT(5) - EVT_CALL(EnableModel, MODEL_o1698, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END + Wait(5) + Call(EnableModel, MODEL_o1692, TRUE) + Call(EnableModel, MODEL_o1693, TRUE) + Call(EnableModel, MODEL_o1696, TRUE) + Call(EnableModel, MODEL_o1697, TRUE) + Call(EnableModel, MODEL_o1698, TRUE) + Call(EnableModel, MODEL_o1699, TRUE) + Exec(N(EVS_Camera_LookAtDrain)) + Wait(30) + Exec(N(EVS_TexPan_UpperSand)) + Exec(N(EVS_RescaleDrainingSand)) + Exec(N(EVS_DrainUpperSand)) + Call(PlaySound, SOUND_ISK_DRAINING_SAND) + Wait(75) + Exec(N(EVS_Camera_LookBelow)) + Wait(30) + Exec(N(EVS_TexPan_LowerSand)) + Exec(N(EVS_FillLowerSand)) + Call(PlaySound, SOUND_ISK_DRAINING_SAND | SOUND_ID_TRIGGER_CHANGE_SOUND) + Wait(120) + Exec(N(EVS_LowerSandColumn)) + Wait(5) + Exec(N(EVS_CollapseSandPile)) + Call(PlaySound, SOUND_ISK_DRAINING_SAND | SOUND_ID_TRIGGER_CHANGE_SOUND) + Wait(10) + Call(EnableModel, MODEL_o1703, FALSE) + Call(EnableModel, MODEL_o1704, FALSE) + Call(EnableModel, MODEL_o1705, FALSE) + Call(EnableModel, MODEL_o1706, FALSE) + Call(EnableModel, MODEL_o1707, FALSE) + Call(EnableModel, MODEL_o1708, FALSE) + Call(EnableModel, MODEL_o1938, FALSE) + Call(EnableModel, MODEL_o1939, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2040, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2041, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2042, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2043, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o2044, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o2045, COLLIDER_FLAGS_UPPER_MASK) + Set(GB_StoryProgress, STORY_CH2_DRAINED_THIRD_SAND_ROOM) + Call(SetZoneEnabled, ZONE_on, FALSE) + Call(SetZoneEnabled, ZONE_deiliw, TRUE) + Wait(20) + Exec(N(EVS_Camera_Reset)) + Wait(5) + Call(EnableModel, MODEL_o1698, FALSE) + Call(DisablePlayerInput, FALSE) + Unbind + Return + End }; EvtScript N(EVS_SetupSand) = { - EVT_SET(AF_ISK12_SandSwitchActivated, FALSE) - EVT_CALL(MakeTransformGroup, MODEL_g285) - EVT_IF_LT(GB_StoryProgress, STORY_CH2_DRAINED_THIRD_SAND_ROOM) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Scene_DrainSand)), TRIGGER_AREA_FLAG_SET, AF_ISK12_SandSwitchActivated, 1, 0) - EVT_CALL(EnableModel, MODEL_o1692, FALSE) - EVT_CALL(EnableModel, MODEL_o1693, FALSE) - EVT_CALL(EnableModel, MODEL_o1696, FALSE) - EVT_CALL(EnableModel, MODEL_o1697, FALSE) - EVT_CALL(EnableModel, MODEL_o1698, FALSE) - EVT_CALL(EnableModel, MODEL_o1699, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2044, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2045, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_TexPan_DrippingSand)) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_o1703, FALSE) - EVT_CALL(EnableModel, MODEL_o1704, FALSE) - EVT_CALL(EnableModel, MODEL_o1705, FALSE) - EVT_CALL(EnableModel, MODEL_o1706, FALSE) - EVT_CALL(EnableModel, MODEL_o1707, FALSE) - EVT_CALL(EnableModel, MODEL_o1708, FALSE) - EVT_CALL(EnableModel, MODEL_o1938, FALSE) - EVT_CALL(EnableModel, MODEL_o1939, FALSE) - EVT_CALL(EnableModel, MODEL_o1698, FALSE) - EVT_CALL(EnableModel, MODEL_o1699, FALSE) - EVT_CALL(EnableModel, MODEL_o6000, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2040, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2041, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2042, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2043, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_RETURN - EVT_END + Set(AF_ISK12_SandSwitchActivated, FALSE) + Call(MakeTransformGroup, MODEL_g285) + IfLt(GB_StoryProgress, STORY_CH2_DRAINED_THIRD_SAND_ROOM) + BindTrigger(Ref(N(EVS_Scene_DrainSand)), TRIGGER_AREA_FLAG_SET, AF_ISK12_SandSwitchActivated, 1, 0) + Call(EnableModel, MODEL_o1692, FALSE) + Call(EnableModel, MODEL_o1693, FALSE) + Call(EnableModel, MODEL_o1696, FALSE) + Call(EnableModel, MODEL_o1697, FALSE) + Call(EnableModel, MODEL_o1698, FALSE) + Call(EnableModel, MODEL_o1699, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2044, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2045, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_TexPan_DrippingSand)) + Else + Call(EnableModel, MODEL_o1703, FALSE) + Call(EnableModel, MODEL_o1704, FALSE) + Call(EnableModel, MODEL_o1705, FALSE) + Call(EnableModel, MODEL_o1706, FALSE) + Call(EnableModel, MODEL_o1707, FALSE) + Call(EnableModel, MODEL_o1708, FALSE) + Call(EnableModel, MODEL_o1938, FALSE) + Call(EnableModel, MODEL_o1939, FALSE) + Call(EnableModel, MODEL_o1698, FALSE) + Call(EnableModel, MODEL_o1699, FALSE) + Call(EnableModel, MODEL_o6000, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2040, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2041, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2042, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2043, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Return + End }; diff --git a/src/world/area_isk/isk_12/isk_12_4_switch.c b/src/world/area_isk/isk_12/isk_12_4_switch.c index 2aa508866bc..1a3a31a77cc 100644 --- a/src/world/area_isk/isk_12/isk_12_4_switch.c +++ b/src/world/area_isk/isk_12/isk_12_4_switch.c @@ -2,174 +2,174 @@ // switch for draining the sand into the lower chamber EvtScript N(EVS_OnTouch_DrainSwitch) = { - EVT_CALL(IsPlayerOnValidFloor, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_LABEL(5) - EVT_WAIT(1) - EVT_CALL(PartnerCanUseAbility, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_GOTO(5) - EVT_END_IF - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar1, -470) - EVT_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(2.5)) - EVT_CALL(NpcJump0, NPC_PARTNER, 529, -470, 82, 10) - EVT_WAIT(10) - EVT_CALL(EnablePartnerAI) - EVT_END_THREAD - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, COLLIDER_o2059, SOUND_FLOOR_SWITCH_DEPRESS, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, -14, 30, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_g367, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o2056) - EVT_CALL(UpdateColliderTransform, COLLIDER_o2059) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, COLLIDER_o2059, SOUND_FLOOR_SWITCH_ACTIVATE, SOUND_SPACE_DEFAULT) - EVT_SET(AF_ISK12_SandSwitchActivated, TRUE) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(IsPlayerOnValidFloor, LVar0) + IfEq(LVar0, FALSE) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Label(5) + Wait(1) + Call(PartnerCanUseAbility, LVar0) + IfEq(LVar0, TRUE) + Goto(5) + EndIf + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + IfLt(LVar1, -470) + Thread + Call(DisablePartnerAI, 0) + Call(SetNpcJumpscale, NPC_PARTNER, Float(2.5)) + Call(NpcJump0, NPC_PARTNER, 529, -470, 82, 10) + Wait(10) + Call(EnablePartnerAI) + EndThread + EndIf + Call(PlaySoundAtCollider, COLLIDER_o2059, SOUND_FLOOR_SWITCH_DEPRESS, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, -14, 30, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(TranslateModel, MODEL_g367, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o2056) + Call(UpdateColliderTransform, COLLIDER_o2059) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(PlaySoundAtCollider, COLLIDER_o2059, SOUND_FLOOR_SWITCH_ACTIVATE, SOUND_SPACE_DEFAULT) + Set(AF_ISK12_SandSwitchActivated, TRUE) + Unbind + Return + End }; // switch for creating a staircase of bricks emerging from the wall EvtScript N(EVS_OnTouch_StaircaseSwitch) = { - EVT_CALL(IsPlayerOnValidFloor, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o2090, SOUND_FLOOR_SWITCH_DEPRESS, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, -14, 30, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_B2, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o2090) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, COLLIDER_o2090, SOUND_FLOOR_SWITCH_ACTIVATE, SOUND_SPACE_DEFAULT) - EVT_CALL(InterpPlayerYaw, 260, 0) - EVT_SET(AF_ISK12_StairSwitchActivated, TRUE) - EVT_THREAD - EVT_CALL(PlaySoundAt, SOUND_ISK_STAIRS_EMERGE_RUMBLE, SOUND_SPACE_DEFAULT, 449, -822, 148) - EVT_CALL(MakeLerp, -50, 0, 60, EASING_QUADRATIC_IN) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g378, LVar0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_ISK_STAIRS_EMERGE_THUD, SOUND_SPACE_DEFAULT, 449, -822, 148) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 3, EVT_FLOAT(0.1)) - EVT_END_THREAD - EVT_WAIT(50) - EVT_THREAD - EVT_CALL(PlaySoundAt, SOUND_ISK_STAIRS_EMERGE_RUMBLE, SOUND_SPACE_DEFAULT, 460, -806, 108) - EVT_CALL(MakeLerp, -50, 0, 60, EASING_QUADRATIC_IN) - EVT_LABEL(22) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g379, LVar0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(22) - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_ISK_STAIRS_EMERGE_THUD, SOUND_SPACE_DEFAULT, 460, -806, 108) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 3, EVT_FLOAT(0.1)) - EVT_END_THREAD - EVT_WAIT(30) - EVT_THREAD - EVT_CALL(PlaySoundAt, SOUND_ISK_STAIRS_EMERGE_RUMBLE, SOUND_SPACE_DEFAULT, 432, -825, 189) - EVT_CALL(MakeLerp, -50, 0, 60, EASING_QUADRATIC_IN) - EVT_LABEL(24) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g376, LVar0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(24) - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_ISK_STAIRS_EMERGE_THUD, SOUND_SPACE_DEFAULT, 432, -825, 189) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 3, EVT_FLOAT(0.1)) - EVT_END_THREAD - EVT_WAIT(30) - EVT_THREAD - EVT_CALL(PlaySoundAt, SOUND_ISK_STAIRS_EMERGE_RUMBLE, SOUND_SPACE_DEFAULT, 451, -812, 137) - EVT_CALL(MakeLerp, -50, 0, 50, EASING_QUADRATIC_IN) - EVT_LABEL(26) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g373, LVar0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(26) - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_ISK_STAIRS_EMERGE_THUD, SOUND_SPACE_DEFAULT, 451, -812, 137) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_WAIT(50) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o2080, COLLIDER_FLAGS_UPPER_MASK) - EVT_WAIT(3) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(IsPlayerOnValidFloor, LVar0) + IfEq(LVar0, FALSE) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(PlaySoundAtCollider, COLLIDER_o2090, SOUND_FLOOR_SWITCH_DEPRESS, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, -14, 30, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(TranslateModel, MODEL_B2, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o2090) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(PlaySoundAtCollider, COLLIDER_o2090, SOUND_FLOOR_SWITCH_ACTIVATE, SOUND_SPACE_DEFAULT) + Call(InterpPlayerYaw, 260, 0) + Set(AF_ISK12_StairSwitchActivated, TRUE) + Thread + Call(PlaySoundAt, SOUND_ISK_STAIRS_EMERGE_RUMBLE, SOUND_SPACE_DEFAULT, 449, -822, 148) + Call(MakeLerp, -50, 0, 60, EASING_QUADRATIC_IN) + Label(20) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g378, LVar0, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Call(PlaySoundAt, SOUND_ISK_STAIRS_EMERGE_THUD, SOUND_SPACE_DEFAULT, 449, -822, 148) + Call(ShakeCam, CAM_DEFAULT, 0, 3, Float(0.1)) + EndThread + Wait(50) + Thread + Call(PlaySoundAt, SOUND_ISK_STAIRS_EMERGE_RUMBLE, SOUND_SPACE_DEFAULT, 460, -806, 108) + Call(MakeLerp, -50, 0, 60, EASING_QUADRATIC_IN) + Label(22) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g379, LVar0, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(22) + EndIf + Call(PlaySoundAt, SOUND_ISK_STAIRS_EMERGE_THUD, SOUND_SPACE_DEFAULT, 460, -806, 108) + Call(ShakeCam, CAM_DEFAULT, 0, 3, Float(0.1)) + EndThread + Wait(30) + Thread + Call(PlaySoundAt, SOUND_ISK_STAIRS_EMERGE_RUMBLE, SOUND_SPACE_DEFAULT, 432, -825, 189) + Call(MakeLerp, -50, 0, 60, EASING_QUADRATIC_IN) + Label(24) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g376, LVar0, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(24) + EndIf + Call(PlaySoundAt, SOUND_ISK_STAIRS_EMERGE_THUD, SOUND_SPACE_DEFAULT, 432, -825, 189) + Call(ShakeCam, CAM_DEFAULT, 0, 3, Float(0.1)) + EndThread + Wait(30) + Thread + Call(PlaySoundAt, SOUND_ISK_STAIRS_EMERGE_RUMBLE, SOUND_SPACE_DEFAULT, 451, -812, 137) + Call(MakeLerp, -50, 0, 50, EASING_QUADRATIC_IN) + Label(26) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g373, LVar0, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(26) + EndIf + Call(PlaySoundAt, SOUND_ISK_STAIRS_EMERGE_THUD, SOUND_SPACE_DEFAULT, 451, -812, 137) + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(0.3)) + EndThread + Wait(50) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o2080, COLLIDER_FLAGS_UPPER_MASK) + Wait(3) + Call(DisablePlayerInput, FALSE) + Unbind + Return + End }; EvtScript N(EVS_SetupSwitches) = { - EVT_CALL(ParentColliderToModel, COLLIDER_o2056, MODEL_g367) - EVT_CALL(ParentColliderToModel, COLLIDER_o2059, MODEL_g367) - EVT_CALL(ParentColliderToModel, COLLIDER_o2090, MODEL_B2) - EVT_IF_EQ(AF_ISK12_SandSwitchActivated, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_DrainSwitch)), TRIGGER_FLOOR_TOUCH, COLLIDER_o2059, 1, 0) - EVT_ELSE - EVT_CALL(TranslateModel, MODEL_g367, 0, -14, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o2056) - EVT_CALL(UpdateColliderTransform, COLLIDER_o2059) - EVT_END_IF - EVT_IF_EQ(AF_ISK12_StairSwitchActivated, TRUE) - EVT_CALL(TranslateModel, MODEL_B2, 0, -14, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o2090) - EVT_ELSE - EVT_THREAD - EVT_CALL(TranslateGroup, MODEL_g378, -52, 0, 0) - EVT_CALL(TranslateGroup, MODEL_g379, -52, 0, 0) - EVT_CALL(TranslateGroup, MODEL_g376, -52, 0, 0) - EVT_CALL(TranslateGroup, MODEL_g373, -52, 0, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2080, COLLIDER_FLAGS_UPPER_MASK) - EVT_IF_EQ(GF_ISK12_Hammer2Block, FALSE) - EVT_CALL(TranslateModel, MODEL_B2, 0, -14, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o2090) - EVT_LABEL(10) - EVT_IF_EQ(GF_ISK12_Hammer2Block, FALSE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(MakeLerp, -14, 0, 30, EASING_LINEAR) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_B2, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o2090) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_WAIT(3) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_StaircaseSwitch)), TRIGGER_FLOOR_TOUCH, COLLIDER_o2090, 1, 0) - EVT_END_THREAD - EVT_END_IF - EVT_RETURN - EVT_END + Call(ParentColliderToModel, COLLIDER_o2056, MODEL_g367) + Call(ParentColliderToModel, COLLIDER_o2059, MODEL_g367) + Call(ParentColliderToModel, COLLIDER_o2090, MODEL_B2) + IfEq(AF_ISK12_SandSwitchActivated, FALSE) + BindTrigger(Ref(N(EVS_OnTouch_DrainSwitch)), TRIGGER_FLOOR_TOUCH, COLLIDER_o2059, 1, 0) + Else + Call(TranslateModel, MODEL_g367, 0, -14, 0) + Call(UpdateColliderTransform, COLLIDER_o2056) + Call(UpdateColliderTransform, COLLIDER_o2059) + EndIf + IfEq(AF_ISK12_StairSwitchActivated, TRUE) + Call(TranslateModel, MODEL_B2, 0, -14, 0) + Call(UpdateColliderTransform, COLLIDER_o2090) + Else + Thread + Call(TranslateGroup, MODEL_g378, -52, 0, 0) + Call(TranslateGroup, MODEL_g379, -52, 0, 0) + Call(TranslateGroup, MODEL_g376, -52, 0, 0) + Call(TranslateGroup, MODEL_g373, -52, 0, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o2080, COLLIDER_FLAGS_UPPER_MASK) + IfEq(GF_ISK12_Hammer2Block, FALSE) + Call(TranslateModel, MODEL_B2, 0, -14, 0) + Call(UpdateColliderTransform, COLLIDER_o2090) + Label(10) + IfEq(GF_ISK12_Hammer2Block, FALSE) + Wait(1) + Goto(10) + EndIf + Call(DisablePlayerInput, TRUE) + Call(MakeLerp, -14, 0, 30, EASING_LINEAR) + Label(20) + Call(UpdateLerp) + Call(TranslateModel, MODEL_B2, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o2090) + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Wait(3) + Call(DisablePlayerInput, FALSE) + EndIf + BindTrigger(Ref(N(EVS_OnTouch_StaircaseSwitch)), TRIGGER_FLOOR_TOUCH, COLLIDER_o2090, 1, 0) + EndThread + EndIf + Return + End }; diff --git a/src/world/area_isk/isk_13/isk_13_1_main.c b/src/world/area_isk/isk_13/isk_13_1_main.c index 010b710c3b6..2a343b0f645 100644 --- a/src/world/area_isk/isk_13/isk_13_1_main.c +++ b/src/world/area_isk/isk_13/isk_13_1_main.c @@ -3,31 +3,31 @@ EvtScript N(EVS_ExitWalk_isk_12_3) = EVT_EXIT_WALK(40, isk_13_ENTRY_0, "isk_12", isk_12_ENTRY_3); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_12_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_isk_12_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) - EVT_CALL(SetSpriteShading, SHADING_ISK_13) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) + Set(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) + Call(SetSpriteShading, SHADING_ISK_13) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) #if VERSION_PAL - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) #else - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_CASE_LT(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) - EVT_CASE_GE(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_END_SWITCH + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + CaseLt(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) + CaseGe(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + EndSwitch #endif - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_isk/isk_13/isk_13_2_entity.c b/src/world/area_isk/isk_13/isk_13_2_entity.c index 47e42089bb0..5faea5afe7f 100644 --- a/src/world/area_isk/isk_13/isk_13_2_entity.c +++ b/src/world/area_isk/isk_13/isk_13_2_entity.c @@ -3,21 +3,21 @@ #include "effects.h" EvtScript N(EVS_OnSmash_Block) = { - EVT_SET(GF_ISK13_Hammer2Block, TRUE) - EVT_RETURN - EVT_END + Set(GF_ISK13_Hammer2Block, TRUE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_LUNAR_STONE, 460, -568, -342, ITEM_SPAWN_MODE_KEY, GF_ISK13_Item_LunarStone) - EVT_IF_EQ(GF_ISK13_Hammer2Block, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer2Block_WideX), 568, -650, -302, 25, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnSmash_Block))) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 415, -453, -291, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 415, -583, -291, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 489, -453, -131, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 489, -583, -131, EVT_FLOAT(0.3), LVar0) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_LUNAR_STONE, 460, -568, -342, ITEM_SPAWN_MODE_KEY, GF_ISK13_Item_LunarStone) + IfEq(GF_ISK13_Hammer2Block, FALSE) + Call(MakeEntity, Ref(Entity_Hammer2Block_WideX), 568, -650, -302, 25, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnSmash_Block))) + EndIf + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 415, -453, -291, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 415, -583, -291, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 489, -453, -131, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 489, -583, -131, Float(0.3), LVar0) + Return + End }; diff --git a/src/world/area_isk/isk_13/isk_13_3_npc.c b/src/world/area_isk/isk_13/isk_13_3_npc.c index ea136d72cc8..0f61985434c 100644 --- a/src/world/area_isk/isk_13/isk_13_3_npc.c +++ b/src/world/area_isk/isk_13/isk_13_3_npc.c @@ -195,105 +195,105 @@ API_CALLABLE(N(func_80242044_991824)) { } EvtScript N(EVS_NpcIdle_StoneChomp) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_IF_EQ(GF_ISK13_Item_LunarStone, FALSE) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(func_80241BA8_991388)) - EVT_CALL(N(func_80241EF8_9916D8), 255, 128, 255, 0) - EVT_THREAD - EVT_SETF(LVar0, 0) - EVT_LOOP(10) - EVT_ADDF(LVar0, EVT_FLOAT(12.796)) - EVT_CALL(N(func_80241EF8_9916D8), 255, 128, 255, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(N(func_80241EF8_9916D8), 255, 128, 255, 128) - EVT_SETF(LVar0, 128) - EVT_LOOP(20) - EVT_ADDF(LVar0, EVT_FLOAT(6.343)) - EVT_CALL(N(func_80241EF8_9916D8), 255, LVar0, 255, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(N(func_80241EF8_9916D8), 255, 255, 255, 255) - EVT_END_THREAD - EVT_WAIT(30) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(MakeLerp, 0, 360, 10, EASING_COS_IN_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(N(func_80241E34_991614), LVar0, 0, EVT_FLOAT(90.0)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(GetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) - EVT_CALL(GetPlayerPos, LVar5, LVar6, LVar7) - EVT_CALL(N(func_80241D38_991518), LVar2, LVar3, LVar4) - EVT_CALL(MakeLerp, LVar3, LVar6, 20, EASING_CUBIC_IN) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, NPC_SELF, LVar2, LVar0, LVar4) - EVT_CALL(N(func_80241D38_991518), LVar2, LVar0, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(N(func_80242044_991824)) - EVT_THREAD - EVT_CALL(InterpPlayerYaw, 180, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 20) - EVT_LOOP(30) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_PanicHover) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_LOOP(20) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(N(func_80241D38_991518), LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + IfEq(GF_ISK13_Item_LunarStone, FALSE) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Call(N(func_80241BA8_991388)) + Call(N(func_80241EF8_9916D8), 255, 128, 255, 0) + Thread + SetF(LVar0, 0) + Loop(10) + AddF(LVar0, Float(12.796)) + Call(N(func_80241EF8_9916D8), 255, 128, 255, LVar0) + Wait(1) + EndLoop + Call(N(func_80241EF8_9916D8), 255, 128, 255, 128) + SetF(LVar0, 128) + Loop(20) + AddF(LVar0, Float(6.343)) + Call(N(func_80241EF8_9916D8), 255, LVar0, 255, LVar0) + Wait(1) + EndLoop + Call(N(func_80241EF8_9916D8), 255, 255, 255, 255) + EndThread + Wait(30) + Thread + Wait(5) + Call(MakeLerp, 0, 360, 10, EASING_COS_IN_OUT) + Label(10) + Call(UpdateLerp) + Call(N(func_80241E34_991614), LVar0, 0, Float(90.0)) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + EndThread + Call(GetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) + Call(GetPlayerPos, LVar5, LVar6, LVar7) + Call(N(func_80241D38_991518), LVar2, LVar3, LVar4) + Call(MakeLerp, LVar3, LVar6, 20, EASING_CUBIC_IN) + Label(1) + Call(UpdateLerp) + Call(SetNpcPos, NPC_SELF, LVar2, LVar0, LVar4) + Call(N(func_80241D38_991518), LVar2, LVar0, LVar4) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(N(func_80242044_991824)) + Thread + Call(InterpPlayerYaw, 180, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 20) + Loop(30) + Call(SetPlayerAnimation, ANIM_MarioW2_PanicHover) + Wait(1) + EndLoop + EndThread + Loop(20) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(N(func_80241D38_991518), LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(DisablePlayerInput, FALSE) + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Return + End }; EvtScript N(EVS_NpcDefeat_StoneChomp_Override) = { - EVT_SET(GF_ISK13_Defeated_StoneChomp, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) - EVT_CALL(EnableNpcShadow, NPC_SELF, TRUE) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(N(DestroyAmbushWorker)) - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(N(StoneChompFXC)) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Set(GF_ISK13_Defeated_StoneChomp, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) + Call(EnableNpcShadow, NPC_SELF, TRUE) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_CLEAR, 0, 0, 0, 0) + Call(N(DestroyAmbushWorker)) + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(N(StoneChompFXC)) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_StoneChomp) = { - EVT_IF_EQ(GF_ISK13_Defeated_StoneChomp, TRUE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_StoneChomp))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_StoneChomp_Override))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_RETURN - EVT_END + IfEq(GF_ISK13_Defeated_StoneChomp, TRUE) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_StoneChomp))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_StoneChomp_Override))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Return + End }; NpcData N(NpcData_StoneChomp) = { diff --git a/src/world/area_isk/isk_14/isk_14_1_main.c b/src/world/area_isk/isk_14/isk_14_1_main.c index 86d7607f045..8c8afc8b8c9 100644 --- a/src/world/area_isk/isk_14/isk_14_1_main.c +++ b/src/world/area_isk/isk_14/isk_14_1_main.c @@ -3,31 +3,31 @@ EvtScript N(D_80241DB0_9944E0) = EVT_EXIT_WALK(40, isk_14_ENTRY_0, "isk_10", isk_10_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(D_80241DB0_9944E0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(D_80241DB0_9944E0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) - EVT_CALL(SetSpriteShading, SHADING_ISK_14) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) + Set(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) + Call(SetSpriteShading, SHADING_ISK_14) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) #if VERSION_PAL - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) #else - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_CASE_LT(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) - EVT_CASE_GE(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_END_SWITCH + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + CaseLt(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) + CaseGe(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + EndSwitch #endif - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_isk/isk_14/isk_14_2_entity.c b/src/world/area_isk/isk_14/isk_14_2_entity.c index c6eb36d9041..db6c9ff4652 100644 --- a/src/world/area_isk/isk_14/isk_14_2_entity.c +++ b/src/world/area_isk/isk_14/isk_14_2_entity.c @@ -3,21 +3,21 @@ #include "effects.h" EvtScript N(EVS_OnSmash_Block) = { - EVT_SET(GF_ISK14_Hammer2Block, TRUE) - EVT_CALL(SetNpcVar, NPC_StoneChomp, 1, 1) - EVT_RETURN - EVT_END + Set(GF_ISK14_Hammer2Block, TRUE) + Call(SetNpcVar, NPC_StoneChomp, 1, 1) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_DIAMOND_STONE, -389, -698, -424, ITEM_SPAWN_MODE_KEY, GF_ISK14_Item_DiamondStone) - EVT_IF_EQ(GF_ISK14_Hammer2Block, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer2Block_WideX), -507, -780, -396, 143, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnSmash_Block))) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -459, -583, -214, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -358, -583, -358, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -459, -713, -214, EVT_FLOAT(0.3), LVar0) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_DIAMOND_STONE, -389, -698, -424, ITEM_SPAWN_MODE_KEY, GF_ISK14_Item_DiamondStone) + IfEq(GF_ISK14_Hammer2Block, FALSE) + Call(MakeEntity, Ref(Entity_Hammer2Block_WideX), -507, -780, -396, 143, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnSmash_Block))) + EndIf + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -459, -583, -214, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -358, -583, -358, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -459, -713, -214, Float(0.3), LVar0) + Return + End }; diff --git a/src/world/area_isk/isk_14/isk_14_3_npc.c b/src/world/area_isk/isk_14/isk_14_3_npc.c index 948a4e5bc0f..7156e36a00c 100644 --- a/src/world/area_isk/isk_14/isk_14_3_npc.c +++ b/src/world/area_isk/isk_14/isk_14_3_npc.c @@ -136,84 +136,84 @@ API_CALLABLE(N(func_80241CA0_9943D0)) { } EvtScript N(EVS_NpcIdle_StoneChomp) = { - EVT_LABEL(0) - EVT_CALL(GetSelfVar, 1, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(5) - EVT_CALL(SetNpcPos, NPC_SELF, -517, -780, -402) - EVT_CALL(N(func_80241AF0_994220)) - EVT_CALL(N(func_80241BEC_99431C), -517, -780, -402) - EVT_CALL(N(func_80241CA0_9943D0), 85, 20, 0) - EVT_WAIT(5) - EVT_CALL(MakeLerp, 85, 0, 20, EASING_COS_FAST_OVERSHOOT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(N(func_80241CA0_9943D0), LVar0, 20, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(N(DestroyAmbushWorker)) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_StoneChomp_Bite) - EVT_WAIT(18) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) - EVT_CALL(EnableNpcShadow, NPC_SELF, TRUE) - EVT_WAIT(1) - EVT_CALL(N(DestroyAmbushWorker)) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_4 | ENEMY_FLAG_100000, 0) - EVT_WAIT(3) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_SELF, 1) - EVT_ADD(LVar1, 20) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 10) - EVT_THREAD - EVT_LOOP(30) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_WAIT(15) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_StoneChomp))) - EVT_RETURN - EVT_END + Label(0) + Call(GetSelfVar, 1, LVar0) + Wait(1) + IfEq(LVar0, 0) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Wait(5) + Call(SetNpcPos, NPC_SELF, -517, -780, -402) + Call(N(func_80241AF0_994220)) + Call(N(func_80241BEC_99431C), -517, -780, -402) + Call(N(func_80241CA0_9943D0), 85, 20, 0) + Wait(5) + Call(MakeLerp, 85, 0, 20, EASING_COS_FAST_OVERSHOOT) + Label(1) + Call(UpdateLerp) + Call(N(func_80241CA0_9943D0), LVar0, 20, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(N(DestroyAmbushWorker)) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_StoneChomp_Bite) + Wait(18) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) + Call(EnableNpcShadow, NPC_SELF, TRUE) + Wait(1) + Call(N(DestroyAmbushWorker)) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_4 | ENEMY_FLAG_100000, 0) + Wait(3) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_SELF, 1) + Add(LVar1, 20) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 10) + Thread + Loop(30) + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + Wait(1) + EndLoop + EndThread + Call(DisablePlayerInput, FALSE) + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Wait(15) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_StoneChomp))) + Return + End }; EvtScript N(EVS_NpcDefeat_StoneChomp_Override) = { - EVT_SET(GF_ISK14_Defeated_StoneChomp, TRUE) - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_SET(AF_ISK14_StoneChompDefeated, TRUE) - EVT_CALL(N(StoneChompFXC)) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Set(GF_ISK14_Defeated_StoneChomp, TRUE) + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Set(AF_ISK14_StoneChompDefeated, TRUE) + Call(N(StoneChompFXC)) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_StoneChomp) = { - EVT_IF_EQ(GF_ISK14_Defeated_StoneChomp, TRUE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetSelfVar, 1, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_StoneChomp))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_StoneChomp_Override))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_RETURN - EVT_END + IfEq(GF_ISK14_Defeated_StoneChomp, TRUE) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + Call(SetSelfVar, 1, 0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_StoneChomp))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_StoneChomp_Override))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Return + End }; NpcData N(NpcData_StoneChomp) = { diff --git a/src/world/area_isk/isk_16/isk_16_1_main.c b/src/world/area_isk/isk_16/isk_16_1_main.c index fec874e8e62..0d69908de13 100644 --- a/src/world/area_isk/isk_16/isk_16_1_main.c +++ b/src/world/area_isk/isk_16/isk_16_1_main.c @@ -5,106 +5,106 @@ #include "world/common/todo/StarSpiritEffectFunc.inc.c" EvtScript N(EVS_SpawnStarCard) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) - EVT_SET(LVar0, 0) - EVT_SET(GB_StoryProgress, STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CASE_EQ(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_SET(LVar0, 1) - EVT_CASE_DEFAULT - EVT_RETURN - EVT_END_SWITCH - EVT_IF_EQ(LVar0, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 408, -825, 414) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.6)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 408, -880, 414) + Switch(GB_StoryProgress) + CaseEq(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) + Set(LVar0, 0) + Set(GB_StoryProgress, STORY_CH2_DEFEATED_TUTANKOOPA) + CaseEq(STORY_CH2_DEFEATED_TUTANKOOPA) + Set(LVar0, 1) + CaseDefault + Return + EndSwitch + IfEq(LVar0, 0) + Call(DisablePlayerInput, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, 408, -825, 414) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.6)) + Call(SetPanTarget, CAM_DEFAULT, 408, -880, 414) EVT_SPIRIT_ADJUST_CAM(10000) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(N(StarSpiritEffectFunc2), 1, 180, 408, -900, 414, 408, -825, 414, -880, -910) - EVT_THREAD - EVT_CALL(N(StarSpiritEffectFunc3)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(PlaySound, SOUND_LOOP_STAR_ORB_RISING) - EVT_CALL(N(StarSpiritEffectFunc1)) - EVT_CALL(StopSound, SOUND_LOOP_STAR_ORB_RISING) - EVT_CALL(PlaySoundAt, SOUND_STAR_ORB_BURST, SOUND_SPACE_DEFAULT, 408, -825, 414) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(45) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(180) - EVT_WAIT(115) - EVT_CALL(PlaySoundAt, SOUND_STAR_CARD_APPEARS, SOUND_SPACE_DEFAULT, 408, -825, 414) - EVT_END_THREAD - EVT_CALL(N(StarSpiritEffectFunc4), 1) - EVT_THREAD - EVT_WAIT(80) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_ADD(LVar1, 100) - EVT_CALL(SetCamDistance, CAM_DEFAULT, LVar1) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 408, -910, 414) - EVT_CALL(N(StarSpiritEffectFunc4), 2) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar2, LVar3, LVar4) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar2, LVar3, LVar4) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ELSE - EVT_CALL(N(StarSpiritEffectFunc5), 1, 408, -880, 414, -910) - EVT_THREAD - EVT_CALL(N(StarSpiritEffectFunc6)) - EVT_END_THREAD - EVT_WAIT(1) - EVT_END_IF - EVT_CALL(N(StarSpiritEffectFunc4), 3) - EVT_CALL(PlaySoundAtPlayer, SOUND_RESCUE_STAR_SPIRIT, SOUND_SPACE_DEFAULT) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(GB_StoryProgress, STORY_CH2_STAR_SPIRIT_RESCUED) - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_23"), kmr_23_ENTRY_1, TRANSITION_GET_STAR_CARD) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(N(StarSpiritEffectFunc2), 1, 180, 408, -900, 414, 408, -825, 414, -880, -910) + Thread + Call(N(StarSpiritEffectFunc3)) + EndThread + Thread + Wait(1) + Call(PlaySound, SOUND_LOOP_STAR_ORB_RISING) + Call(N(StarSpiritEffectFunc1)) + Call(StopSound, SOUND_LOOP_STAR_ORB_RISING) + Call(PlaySoundAt, SOUND_STAR_ORB_BURST, SOUND_SPACE_DEFAULT, 408, -825, 414) + EndThread + Thread + Wait(45) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + EndThread + Thread + Wait(180) + Wait(115) + Call(PlaySoundAt, SOUND_STAR_CARD_APPEARS, SOUND_SPACE_DEFAULT, 408, -825, 414) + EndThread + Call(N(StarSpiritEffectFunc4), 1) + Thread + Wait(80) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndThread + Add(LVar1, 100) + Call(SetCamDistance, CAM_DEFAULT, LVar1) + Call(SetPanTarget, CAM_DEFAULT, 408, -910, 414) + Call(N(StarSpiritEffectFunc4), 2) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Call(UseSettingsFrom, CAM_DEFAULT, LVar2, LVar3, LVar4) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar2, LVar3, LVar4) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Else + Call(N(StarSpiritEffectFunc5), 1, 408, -880, 414, -910) + Thread + Call(N(StarSpiritEffectFunc6)) + EndThread + Wait(1) + EndIf + Call(N(StarSpiritEffectFunc4), 3) + Call(PlaySoundAtPlayer, SOUND_RESCUE_STAR_SPIRIT, SOUND_SPACE_DEFAULT) + Call(DisablePlayerInput, TRUE) + Set(GB_StoryProgress, STORY_CH2_STAR_SPIRIT_RESCUED) + Call(GotoMapSpecial, Ref("kmr_23"), kmr_23_ENTRY_1, TRANSITION_GET_STAR_CARD) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_isk_19_1) = EVT_EXIT_WALK(40, isk_16_ENTRY_0, "isk_19", isk_19_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_19_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_isk_19_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) - EVT_CALL(SetSpriteShading, SHADING_ISK_16) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_SetupFlames)) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_EXEC(N(EVS_SpawnStarCard)) - EVT_END_IF - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_TUTANKOOPA_REVEALED, 0, 8) - EVT_CASE_EQ(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(FadeOutMusic, 0, 500) - EVT_CASE_GT(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_END_SWITCH - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_EXEC(N(EVS_Scene_TutankoopaAppears)) - EVT_CASE_GE(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) + Call(SetSpriteShading, SHADING_ISK_16) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_SetupFlames)) + IfEq(GB_StoryProgress, STORY_CH2_DEFEATED_TUTANKOOPA) + Exec(N(EVS_SpawnStarCard)) + EndIf + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_TUTANKOOPA_REVEALED, 0, 8) + CaseEq(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(FadeOutMusic, 0, 500) + CaseGt(STORY_CH2_DEFEATED_TUTANKOOPA) + EndSwitch + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_DEFEATED_TUTANKOOPA) + Exec(N(EVS_Scene_TutankoopaAppears)) + CaseGe(STORY_CH2_DEFEATED_TUTANKOOPA) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; diff --git a/src/world/area_isk/isk_16/isk_16_2_npc.c b/src/world/area_isk/isk_16/isk_16_2_npc.c index bd48d6c4e5b..e0b9cfe3258 100644 --- a/src/world/area_isk/isk_16/isk_16_2_npc.c +++ b/src/world/area_isk/isk_16/isk_16_2_npc.c @@ -1,48 +1,48 @@ #include "isk_16.h" EvtScript N(EVS_NpcIdle_Tutankoopa_01) = { - EVT_LABEL(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(StartBossBattle, SONG_TUTANKOOPA_BATTLE) - EVT_RETURN - EVT_END + Label(0) + Call(GetSelfVar, 0, LVar0) + Wait(1) + IfEq(LVar0, 0) + Goto(0) + EndIf + Call(StartBossBattle, SONG_TUTANKOOPA_BATTLE) + Return + End }; EvtScript N(EVS_NpcDefeat_Tutankoopa_01) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAG_1, TRUE) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_EXEC_WAIT(N(EVS_Scene_TutankoopaDefeated)) - EVT_EXEC(N(EVS_SpawnStarCard)) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAG_1, TRUE) + Call(InterpPlayerYaw, 90, 0) + ExecWait(N(EVS_Scene_TutankoopaDefeated)) + Exec(N(EVS_SpawnStarCard)) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Tutankoopa_01) = { - EVT_CALL(InterpNpcYaw, NPC_Tutankoopa_01, 150, 1) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Tutankoopa_01))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Tutankoopa_01))) - EVT_CASE_GE(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetNpcPos, NPC_Tutankoopa_01, 0, -1500, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(InterpNpcYaw, NPC_Tutankoopa_01, 150, 1) + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Tutankoopa_01))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Tutankoopa_01))) + CaseGe(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetNpcPos, NPC_Tutankoopa_01, 0, -1500, 0) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_ChainChomp) = { - EVT_RETURN - EVT_END + Return + End }; NpcSettings N(NpcSettings_Tutankoopa_01) = { diff --git a/src/world/area_isk/isk_16/isk_16_3_boss.c b/src/world/area_isk/isk_16/isk_16_3_boss.c index 8aab2764a40..1c4ca554816 100644 --- a/src/world/area_isk/isk_16/isk_16_3_boss.c +++ b/src/world/area_isk/isk_16/isk_16_3_boss.c @@ -4,249 +4,249 @@ #include "world/common/atomic/ApplyTint.inc.c" EvtScript N(EVS_Scene_TutankoopaAppears) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(N(SetModelTintMode), APPLY_TINT_MODELS, -1, ENV_TINT_SHROUD) - EVT_CALL(N(SetModelTintMode), APPLY_TINT_BG, NULL, ENV_TINT_SHROUD) - EVT_CALL(N(SetModelTintParams), ENV_TINT_SHROUD, 0, 0, 0, 255, 0, 0, 0, 0, 0) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 410, -910, 410) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 336, -910, 467) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetPlayerPos, 279, -910, 520) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_EQ(LVar0, PARTNER_PARAKARRY) - EVT_SET(LVar1, -899) - EVT_ELSE - EVT_SET(LVar1, -910) - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_PARTNER, 243, LVar1, 535) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 45) - EVT_CALL(ClearPartnerMoveHistory, NPC_PARTNER) - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(2.5 / DT)) - EVT_CALL(NpcMoveTo, NPC_PARTNER, 311, 487, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_END_THREAD - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PlayerMoveTo, 343, 460, 0) - EVT_EXEC_WAIT(N(EVS_BindExitTriggers)) - EVT_WAIT(20 * DT) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 410, -910, 410) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.5 / DT)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH2_00E2, 160, 40) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcPos, NPC_Tutankoopa_01, 410, -1300, 410) - EVT_THREAD - EVT_WAIT(50 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_CALL(SetNpcImgFXParams, NPC_Tutankoopa_02, IMGFX_SET_ALPHA, 0, 0, 0, 0) - EVT_CALL(SetNpcPos, NPC_Tutankoopa_02, 410, -905, 410) - EVT_CALL(SetNpcAnimation, NPC_Tutankoopa_02, ANIM_Tutankoopa_HeaddressWithEyes) - EVT_CALL(MakeLerp, 0, 255, 100 * DT, EASING_QUADRATIC_IN) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcImgFXParams, NPC_Tutankoopa_02, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_CALL(SetNpcImgFXParams, NPC_Tutankoopa_02, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_WAIT(30 * DT) - EVT_SET(LVar0, 255) - EVT_LOOP(60 * DT) + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(N(SetModelTintMode), APPLY_TINT_MODELS, -1, ENV_TINT_SHROUD) + Call(N(SetModelTintMode), APPLY_TINT_BG, NULL, ENV_TINT_SHROUD) + Call(N(SetModelTintParams), ENV_TINT_SHROUD, 0, 0, 0, 255, 0, 0, 0, 0, 0) + Call(UseSettingsFrom, CAM_DEFAULT, 410, -910, 410) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetPanTarget, CAM_DEFAULT, 336, -910, 467) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetPlayerPos, 279, -910, 520) + Call(GetCurrentPartnerID, LVar0) + IfEq(LVar0, PARTNER_PARAKARRY) + Set(LVar1, -899) + Else + Set(LVar1, -910) + EndIf + Call(SetNpcPos, NPC_PARTNER, 243, LVar1, 535) + Call(SetNpcYaw, NPC_PARTNER, 45) + Call(ClearPartnerMoveHistory, NPC_PARTNER) + Thread + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) + Call(SetNpcSpeed, NPC_PARTNER, Float(2.5 / DT)) + Call(NpcMoveTo, NPC_PARTNER, 311, 487, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + EndThread + Call(SetPlayerSpeed, Float(4.0 / DT)) + Call(PlayerMoveTo, 343, 460, 0) + ExecWait(N(EVS_BindExitTriggers)) + Wait(20 * DT) + Call(SetPanTarget, CAM_DEFAULT, 410, -910, 410) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.5 / DT)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(ShowMessageAtScreenPos, MSG_CH2_00E2, 160, 40) + Wait(30 * DT) + Call(SetNpcPos, NPC_Tutankoopa_01, 410, -1300, 410) + Thread + Wait(50 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndThread + Call(SetNpcImgFXParams, NPC_Tutankoopa_02, IMGFX_SET_ALPHA, 0, 0, 0, 0) + Call(SetNpcPos, NPC_Tutankoopa_02, 410, -905, 410) + Call(SetNpcAnimation, NPC_Tutankoopa_02, ANIM_Tutankoopa_HeaddressWithEyes) + Call(MakeLerp, 0, 255, 100 * DT, EASING_QUADRATIC_IN) + Label(2) + Call(UpdateLerp) + Call(SetNpcImgFXParams, NPC_Tutankoopa_02, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(2) + EndIf + Call(SetNpcImgFXParams, NPC_Tutankoopa_02, IMGFX_CLEAR, 0, 0, 0, 0) + Wait(30 * DT) + Set(LVar0, 255) + Loop(60 * DT) #if VERSION_PAL - EVT_ADD(LVar0, -5) + Add(LVar0, -5) #else - EVT_ADD(LVar0, -4) + Add(LVar0, -4) #endif - EVT_CALL(N(SetModelTintParams), ENV_TINT_SHROUD, 0, 0, 0, LVar0, 0, 0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(N(SetModelTintParams), ENV_TINT_SHROUD, 0, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(530.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.5 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_END_THREAD - EVT_CALL(GetNpcPos, NPC_Tutankoopa_02, LVar2, LVar3, LVar4) - EVT_CALL(MakeLerp, 0, 110, 100 * DT, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_ADD(LVar0, LVar3) - EVT_CALL(SetNpcPos, NPC_Tutankoopa_02, LVar2, LVar0, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetNpcPos, NPC_Tutankoopa_02, LVar2, LVar3, LVar4) - EVT_CALL(MakeLerp, 0, 100, 60 * DT, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar5, EVT_FLOAT(0.47)) - EVT_SETF(LVar6, EVT_FLOAT(-0.94)) - EVT_MULF(LVar5, LVar0) - EVT_MULF(LVar6, LVar0) - EVT_ADDF(LVar5, LVar2) - EVT_ADDF(LVar6, LVar4) - EVT_CALL(SetNpcPos, NPC_Tutankoopa_02, LVar5, LVar3, LVar6) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_Tutankoopa_01, 457, -800, 316) - EVT_CALL(SetNpcAnimation, NPC_Tutankoopa_01, ANIM_Tutankoopa_Idle) - EVT_THREAD - EVT_WAIT(59) - EVT_CALL(PlaySoundAtNpc, NPC_Tutankoopa_01, SOUND_BOWSER_CHARGE_LIGHTNING, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_CALL(SetNpcImgFXParams, NPC_Tutankoopa_01, IMGFX_SET_ALPHA, 255, 0, 0, 0) - EVT_CALL(SetNpcImgFXFlags, NPC_Tutankoopa_01, IMGFX_FLAG_800) - EVT_CALL(SetNpcImgFXParams, NPC_Tutankoopa_01, IMGFX_SET_ANIM, IMGFX_ANIM_TUTANKOOPA_SWIRL_1, 2, 1, 0) - EVT_WAIT(39) - EVT_CALL(SetNpcImgFXFlags, NPC_Tutankoopa_01, IMGFX_FLAG_800) - EVT_CALL(SetNpcImgFXParams, NPC_Tutankoopa_01, IMGFX_SET_ANIM, IMGFX_ANIM_TUTANKOOPA_SWIRL_2, 2, 1, 0) - EVT_WAIT(39) - EVT_CALL(SetNpcImgFXFlags, NPC_Tutankoopa_01, IMGFX_FLAG_800) - EVT_CALL(SetNpcImgFXParams, NPC_Tutankoopa_01, IMGFX_SET_ANIM, IMGFX_ANIM_TUTANKOOPA_GATHER, 2, 1, 0) - EVT_WAIT(55) - EVT_CALL(SetNpcImgFXParams, NPC_Tutankoopa_01, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetNpcPos, NPC_Tutankoopa_02, 457, -1300, 316) - EVT_WAIT(10 * DT) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 438, -800, 332) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(225.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(-7.5), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Tutankoopa_01, ANIM_Tutankoopa_Talk, ANIM_Tutankoopa_Idle, 0, MSG_CH2_00E3) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(SetNpcVar, NPC_Tutankoopa_01, 0, 1) - EVT_RETURN - EVT_END + Call(N(SetModelTintParams), ENV_TINT_SHROUD, 0, 0, 0, LVar0, 0, 0, 0, 0, 0) + Wait(1) + EndLoop + Call(N(SetModelTintParams), ENV_TINT_SHROUD, 0, 0, 0, 0, 0, 0, 0, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(530.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.5 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + EndThread + Call(GetNpcPos, NPC_Tutankoopa_02, LVar2, LVar3, LVar4) + Call(MakeLerp, 0, 110, 100 * DT, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Add(LVar0, LVar3) + Call(SetNpcPos, NPC_Tutankoopa_02, LVar2, LVar0, LVar4) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(GetNpcPos, NPC_Tutankoopa_02, LVar2, LVar3, LVar4) + Call(MakeLerp, 0, 100, 60 * DT, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + SetF(LVar5, Float(0.47)) + SetF(LVar6, Float(-0.94)) + MulF(LVar5, LVar0) + MulF(LVar6, LVar0) + AddF(LVar5, LVar2) + AddF(LVar6, LVar4) + Call(SetNpcPos, NPC_Tutankoopa_02, LVar5, LVar3, LVar6) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(SetNpcPos, NPC_Tutankoopa_01, 457, -800, 316) + Call(SetNpcAnimation, NPC_Tutankoopa_01, ANIM_Tutankoopa_Idle) + Thread + Wait(59) + Call(PlaySoundAtNpc, NPC_Tutankoopa_01, SOUND_BOWSER_CHARGE_LIGHTNING, SOUND_SPACE_DEFAULT) + EndThread + Call(SetNpcImgFXParams, NPC_Tutankoopa_01, IMGFX_SET_ALPHA, 255, 0, 0, 0) + Call(SetNpcImgFXFlags, NPC_Tutankoopa_01, IMGFX_FLAG_800) + Call(SetNpcImgFXParams, NPC_Tutankoopa_01, IMGFX_SET_ANIM, IMGFX_ANIM_TUTANKOOPA_SWIRL_1, 2, 1, 0) + Wait(39) + Call(SetNpcImgFXFlags, NPC_Tutankoopa_01, IMGFX_FLAG_800) + Call(SetNpcImgFXParams, NPC_Tutankoopa_01, IMGFX_SET_ANIM, IMGFX_ANIM_TUTANKOOPA_SWIRL_2, 2, 1, 0) + Wait(39) + Call(SetNpcImgFXFlags, NPC_Tutankoopa_01, IMGFX_FLAG_800) + Call(SetNpcImgFXParams, NPC_Tutankoopa_01, IMGFX_SET_ANIM, IMGFX_ANIM_TUTANKOOPA_GATHER, 2, 1, 0) + Wait(55) + Call(SetNpcImgFXParams, NPC_Tutankoopa_01, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetNpcPos, NPC_Tutankoopa_02, 457, -1300, 316) + Wait(10 * DT) + Call(SetPanTarget, CAM_DEFAULT, 438, -800, 332) + Call(SetCamDistance, CAM_DEFAULT, Float(225.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(-7.5), Float(-7.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Tutankoopa_01, ANIM_Tutankoopa_Talk, ANIM_Tutankoopa_Idle, 0, MSG_CH2_00E3) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(DisablePlayerInput, FALSE) + Call(EnablePartnerAI) + Call(SetNpcVar, NPC_Tutankoopa_01, 0, 1) + Return + End }; EvtScript N(EVS_PlayChompSounds) = { - EVT_LOOP(0) - EVT_CALL(PlaySoundAtNpc, NPC_ChainChomp, SOUND_CHAIN_CHOMP_BITE, SOUND_SPACE_DEFAULT) - EVT_WAIT(5) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(PlaySoundAtNpc, NPC_ChainChomp, SOUND_CHAIN_CHOMP_BITE, SOUND_SPACE_DEFAULT) + Wait(5) + EndLoop + Return + End }; EvtScript N(EVS_Scene_TutankoopaDefeated) = { - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_THREAD - EVT_CALL(ShowMessageAtScreenPos, MSG_CH2_00E8, 160, 40) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_Tutankoopa_01, ANIM_Tutankoopa_Hurt) - EVT_CALL(SetNpcJumpscale, NPC_Tutankoopa_01, EVT_FLOAT(1.0)) - EVT_CALL(PlaySoundAtNpc, NPC_Tutankoopa_01, SOUND_ACTOR_WITHER, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Tutankoopa_01, 442, -910, 393, 30 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Tutankoopa_01, SOUND_ACTOR_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Tutankoopa_01, 416, -910, 420, 20 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Tutankoopa_01, SOUND_ACTOR_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Tutankoopa_01, 395, -910, 440, 10 * DT) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Tutankoopa_01, ANIM_Tutankoopa_Idle) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 410, -910, 410) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 490, -910, 327) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(200.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(EnableModel, MODEL_o2359, FALSE) - EVT_EXEC_GET_TID(N(EVS_PlayChompSounds), LVarA) - EVT_CALL(SetNpcPos, NPC_ChainChomp, 516, -910, 263) - EVT_CALL(SetNpcSpeed, NPC_ChainChomp, EVT_FLOAT(3.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_ChainChomp, 493, 292, 0) - EVT_WAIT(30 * DT) - EVT_CALL(GetNpcPos, NPC_Tutankoopa_01, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(EnableModel, MODEL_o2359, TRUE) - EVT_CALL(NpcFaceNpc, NPC_Tutankoopa_01, NPC_ChainChomp, 0) - EVT_CALL(SetNpcAnimation, NPC_Tutankoopa_01, ANIM_Tutankoopa_Hurt) - EVT_CALL(GetNpcPos, NPC_Tutankoopa_01, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_Tutankoopa_01, SOUND_ACTOR_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Tutankoopa_01, LVar0, LVar1, LVar2, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Tutankoopa_01, ANIM_Tutankoopa_Idle) - EVT_CALL(SpeakToPlayer, NPC_Tutankoopa_01, ANIM_Tutankoopa_Talk, ANIM_Tutankoopa_Idle, 5, MSG_CH2_00E9) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_ChainChomp, ANIM_ChainChomp_QuickBite) - EVT_CALL(SetNpcSpeed, NPC_ChainChomp, EVT_FLOAT(8.0 / DT)) - EVT_CALL(SetNpcPos, NPC_ChainChomp, 486, -910, 340) - EVT_CALL(GetNpcPos, NPC_Tutankoopa_01, LVar0, LVar1, LVar2) - EVT_CALL(NpcMoveTo, NPC_ChainChomp, LVar0, LVar2, 0) - EVT_LOOP(2) - EVT_CALL(NpcMoveTo, NPC_ChainChomp, 304, 434, 0) - EVT_CALL(NpcMoveTo, NPC_ChainChomp, 444, 316, 0) - EVT_CALL(NpcMoveTo, NPC_ChainChomp, 473, 337, 0) - EVT_CALL(NpcMoveTo, NPC_ChainChomp, 318, 460, 0) - EVT_END_LOOP - EVT_CALL(NpcMoveTo, NPC_ChainChomp, 259, 522, 0) - EVT_CALL(SetNpcPos, NPC_ChainChomp, 0, -1500, 0) - EVT_KILL_THREAD(LVarA) - EVT_END_THREAD - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_ChainChomp, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Tutankoopa_01, LVar3, LVar4, LVar5) - EVT_CALL(GetDist2D, LVar6, LVar0, LVar2, LVar3, LVar5) - EVT_IF_LT(LVar6, 50) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetSelfVar, 1, 1) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Tutankoopa_01, ANIM_Tutankoopa_Run) - EVT_CALL(SetNpcSpeed, NPC_Tutankoopa_01, EVT_FLOAT(8.0 / DT)) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_LookAround) - EVT_LOOP(2) - EVT_CALL(NpcMoveTo, NPC_Tutankoopa_01, 304, 434, 0) - EVT_CALL(NpcMoveTo, NPC_Tutankoopa_01, 444, 316, 0) - EVT_CALL(NpcMoveTo, NPC_Tutankoopa_01, 473, 337, 0) - EVT_CALL(NpcMoveTo, NPC_Tutankoopa_01, 318, 460, 0) - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_CALL(NpcMoveTo, NPC_Tutankoopa_01, 259, 522, 0) - EVT_CALL(SetNpcPos, NPC_Tutankoopa_01, 0, -1500, 0) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetSelfVar, 1, 0) - EVT_END_THREAD - EVT_CALL(ShowMessageAtScreenPos, MSG_CH2_00EA, 160, 40) - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 1, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(10 * DT) - EVT_SET(GF_ISK16_Defeated_Tutankoopa, TRUE) - EVT_CALL(FadeOutMusic, 0, 500) - EVT_RETURN - EVT_END + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Thread + Call(ShowMessageAtScreenPos, MSG_CH2_00E8, 160, 40) + EndThread + Call(SetNpcAnimation, NPC_Tutankoopa_01, ANIM_Tutankoopa_Hurt) + Call(SetNpcJumpscale, NPC_Tutankoopa_01, Float(1.0)) + Call(PlaySoundAtNpc, NPC_Tutankoopa_01, SOUND_ACTOR_WITHER, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Tutankoopa_01, 442, -910, 393, 30 * DT) + Call(PlaySoundAtNpc, NPC_Tutankoopa_01, SOUND_ACTOR_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Tutankoopa_01, 416, -910, 420, 20 * DT) + Call(PlaySoundAtNpc, NPC_Tutankoopa_01, SOUND_ACTOR_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Tutankoopa_01, 395, -910, 440, 10 * DT) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_Tutankoopa_01, ANIM_Tutankoopa_Idle) + Call(UseSettingsFrom, CAM_DEFAULT, 410, -910, 410) + Call(SetPanTarget, CAM_DEFAULT, 490, -910, 327) + Call(SetCamDistance, CAM_DEFAULT, Float(200.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(EnableModel, MODEL_o2359, FALSE) + ExecGetTID(N(EVS_PlayChompSounds), LVarA) + Call(SetNpcPos, NPC_ChainChomp, 516, -910, 263) + Call(SetNpcSpeed, NPC_ChainChomp, Float(3.0 / DT)) + Call(NpcMoveTo, NPC_ChainChomp, 493, 292, 0) + Wait(30 * DT) + Call(GetNpcPos, NPC_Tutankoopa_01, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(EnableModel, MODEL_o2359, TRUE) + Call(NpcFaceNpc, NPC_Tutankoopa_01, NPC_ChainChomp, 0) + Call(SetNpcAnimation, NPC_Tutankoopa_01, ANIM_Tutankoopa_Hurt) + Call(GetNpcPos, NPC_Tutankoopa_01, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_Tutankoopa_01, SOUND_ACTOR_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Tutankoopa_01, LVar0, LVar1, LVar2, 20 * DT) + Call(SetNpcAnimation, NPC_Tutankoopa_01, ANIM_Tutankoopa_Idle) + Call(SpeakToPlayer, NPC_Tutankoopa_01, ANIM_Tutankoopa_Talk, ANIM_Tutankoopa_Idle, 5, MSG_CH2_00E9) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Thread + Call(SetNpcAnimation, NPC_ChainChomp, ANIM_ChainChomp_QuickBite) + Call(SetNpcSpeed, NPC_ChainChomp, Float(8.0 / DT)) + Call(SetNpcPos, NPC_ChainChomp, 486, -910, 340) + Call(GetNpcPos, NPC_Tutankoopa_01, LVar0, LVar1, LVar2) + Call(NpcMoveTo, NPC_ChainChomp, LVar0, LVar2, 0) + Loop(2) + Call(NpcMoveTo, NPC_ChainChomp, 304, 434, 0) + Call(NpcMoveTo, NPC_ChainChomp, 444, 316, 0) + Call(NpcMoveTo, NPC_ChainChomp, 473, 337, 0) + Call(NpcMoveTo, NPC_ChainChomp, 318, 460, 0) + EndLoop + Call(NpcMoveTo, NPC_ChainChomp, 259, 522, 0) + Call(SetNpcPos, NPC_ChainChomp, 0, -1500, 0) + KillThread(LVarA) + EndThread + Loop(0) + Call(GetNpcPos, NPC_ChainChomp, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Tutankoopa_01, LVar3, LVar4, LVar5) + Call(GetDist2D, LVar6, LVar0, LVar2, LVar3, LVar5) + IfLt(LVar6, 50) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetSelfVar, 1, 1) + Thread + Call(SetNpcAnimation, NPC_Tutankoopa_01, ANIM_Tutankoopa_Run) + Call(SetNpcSpeed, NPC_Tutankoopa_01, Float(8.0 / DT)) + Call(SetPlayerAnimation, ANIM_MarioW2_LookAround) + Loop(2) + Call(NpcMoveTo, NPC_Tutankoopa_01, 304, 434, 0) + Call(NpcMoveTo, NPC_Tutankoopa_01, 444, 316, 0) + Call(NpcMoveTo, NPC_Tutankoopa_01, 473, 337, 0) + Call(NpcMoveTo, NPC_Tutankoopa_01, 318, 460, 0) + EndLoop + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + Call(NpcMoveTo, NPC_Tutankoopa_01, 259, 522, 0) + Call(SetNpcPos, NPC_Tutankoopa_01, 0, -1500, 0) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetSelfVar, 1, 0) + EndThread + Call(ShowMessageAtScreenPos, MSG_CH2_00EA, 160, 40) + Loop(0) + Call(GetSelfVar, 1, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Wait(10 * DT) + Set(GF_ISK16_Defeated_Tutankoopa, TRUE) + Call(FadeOutMusic, 0, 500) + Return + End }; diff --git a/src/world/area_isk/isk_16/isk_16_4_entity.c b/src/world/area_isk/isk_16/isk_16_4_entity.c index f1d2fd5119e..d185000292b 100644 --- a/src/world/area_isk/isk_16/isk_16_4_entity.c +++ b/src/world/area_isk/isk_16/isk_16_4_entity.c @@ -2,10 +2,10 @@ #include "effects.h" EvtScript N(EVS_SetupFlames) = { - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 415, -713, 291, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 291, -713, 415, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 415, -843, 291, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 291, -843, 415, EVT_FLOAT(0.3), LVar0) - EVT_RETURN - EVT_END + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 415, -713, 291, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 291, -713, 415, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 415, -843, 291, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 291, -843, 415, Float(0.3), LVar0) + Return + End }; diff --git a/src/world/area_isk/isk_18/isk_18_1_main.c b/src/world/area_isk/isk_18/isk_18_1_main.c index 9ac6b63a64c..82405f68b08 100644 --- a/src/world/area_isk/isk_18/isk_18_1_main.c +++ b/src/world/area_isk/isk_18/isk_18_1_main.c @@ -4,38 +4,38 @@ EvtScript N(EVS_ExitWalk_isk_10_2) = EVT_EXIT_WALK(40, isk_18_ENTRY_0, "isk_10", EvtScript N(EVS_ExitWalk_isk_12_2) = EVT_EXIT_WALK(40, isk_18_ENTRY_1, "isk_12", isk_12_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_10_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_12_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_isk_10_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_isk_12_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) - EVT_CALL(SetSpriteShading, SHADING_ISK_18) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_SetupFlames)) + Set(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) + Call(SetSpriteShading, SHADING_ISK_18) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_SetupFlames)) #if VERSION_PAL - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) #else - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_CASE_LT(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) - EVT_CASE_GE(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_END_SWITCH + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + CaseLt(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) + CaseGe(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + EndSwitch #endif - EVT_IF_LT(GB_StoryProgress, STORY_CH2_DRAINED_THIRD_SAND_ROOM) - EVT_CALL(EnableModel, MODEL_o1956, FALSE) - EVT_CALL(EnableModel, MODEL_o1957, FALSE) - EVT_CALL(EnableModel, MODEL_o1958, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitte, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH2_DRAINED_THIRD_SAND_ROOM) + Call(EnableModel, MODEL_o1956, FALSE) + Call(EnableModel, MODEL_o1957, FALSE) + Call(EnableModel, MODEL_o1958, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitte, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_isk/isk_18/isk_18_3_entity.c b/src/world/area_isk/isk_18/isk_18_3_entity.c index 3d08528a757..462b77e1531 100644 --- a/src/world/area_isk/isk_18/isk_18_3_entity.c +++ b/src/world/area_isk/isk_18/isk_18_3_entity.c @@ -2,12 +2,12 @@ #include "effects.h" EvtScript N(EVS_SetupFlames) = { - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 305, -738, 435, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 138, -738, 514, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -46, -738, 530, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -225, -738, 482, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -376, -738, 376, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, -482, -738, 225, EVT_FLOAT(0.3), LVar0) - EVT_RETURN - EVT_END + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 305, -738, 435, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 138, -738, 514, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -46, -738, 530, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -225, -738, 482, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -376, -738, 376, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, -482, -738, 225, Float(0.3), LVar0) + Return + End }; diff --git a/src/world/area_isk/isk_19/isk_19_1_music.c b/src/world/area_isk/isk_19/isk_19_1_music.c index 5e166f71847..3a46a689635 100644 --- a/src/world/area_isk/isk_19/isk_19_1_music.c +++ b/src/world/area_isk/isk_19/isk_19_1_music.c @@ -1,31 +1,31 @@ #include "isk_19.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_EQ(GF_ISK19_FinalWarning, FALSE) - EVT_THREAD - EVT_CALL(FadeInMusic, 1, SONG_TUTANKOOPA_WARNING, 0, 2000, 0, 127) - EVT_CALL(FadeOutMusic, 0, 2000) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(20) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH2_00E1, 160, 40) - EVT_SET(GF_ISK19_FinalWarning, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_CALL(FadeInMusic, 0, SONG_RUINS_BASEMENT, 0, 2000, 0, 127) - EVT_CALL(FadeOutMusic, 1, 2000) - EVT_END_THREAD - EVT_RETURN - EVT_END_IF - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_CASE_LT(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) - EVT_CASE_GE(STORY_CH2_DEFEATED_TUTANKOOPA) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + IfEq(GF_ISK19_FinalWarning, FALSE) + Thread + Call(FadeInMusic, 1, SONG_TUTANKOOPA_WARNING, 0, 2000, 0, 127) + Call(FadeOutMusic, 0, 2000) + Call(DisablePlayerInput, TRUE) + Wait(20) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(ShowMessageAtScreenPos, MSG_CH2_00E1, 160, 40) + Set(GF_ISK19_FinalWarning, TRUE) + Call(DisablePlayerInput, FALSE) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Call(FadeInMusic, 0, SONG_RUINS_BASEMENT, 0, 2000, 0, 127) + Call(FadeOutMusic, 1, 2000) + EndThread + Return + EndIf + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + CaseLt(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_RUINS_BASEMENT, 0, 8) + CaseGe(STORY_CH2_DEFEATED_TUTANKOOPA) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_isk/isk_19/isk_19_2_main.c b/src/world/area_isk/isk_19/isk_19_2_main.c index 6a2a7837491..e6de2855ca1 100644 --- a/src/world/area_isk/isk_19/isk_19_2_main.c +++ b/src/world/area_isk/isk_19/isk_19_2_main.c @@ -4,33 +4,33 @@ EvtScript N(EVS_ExitWalk_isk_11_3) = EVT_EXIT_WALK(40, isk_19_ENTRY_0, "isk_11", EvtScript N(EVS_ExitWalk_isk_16_0) = EVT_EXIT_WALK(40, isk_19_ENTRY_1, "isk_16", isk_16_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_11_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_16_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_isk_11_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_isk_16_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) - EVT_CALL(SetSpriteShading, SHADING_ISK_19) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_RUINS) + Call(SetSpriteShading, SHADING_ISK_19) + SetUP_CAMERA_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_isk/isk_19/isk_19_3_entity.c b/src/world/area_isk/isk_19/isk_19_3_entity.c index 78820ab338b..086993f0b95 100644 --- a/src/world/area_isk/isk_19/isk_19_3_entity.c +++ b/src/world/area_isk/isk_19/isk_19_3_entity.c @@ -3,9 +3,9 @@ #include "effects.h" EvtScript N(EVS_MakeEntities) = { - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 486, -845, 130, EVT_FLOAT(0.3), LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_RED, 499, -845, 42, EVT_FLOAT(0.3), LVar0) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 560, -850, 100, -10, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 486, -845, 130, Float(0.3), LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_RED, 499, -845, 42, Float(0.3), LVar0) + Call(MakeEntity, Ref(Entity_SavePoint), 560, -850, 100, -10, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_iwa/iwa_00/iwa_00_1_main.c b/src/world/area_iwa/iwa_00/iwa_00_1_main.c index 698842cd234..21b76979395 100644 --- a/src/world/area_iwa/iwa_00/iwa_00_1_main.c +++ b/src/world/area_iwa/iwa_00/iwa_00_1_main.c @@ -4,39 +4,39 @@ EvtScript N(EVS_ExitWalk_iwa_10_1) = EVT_EXIT_WALK(60, iwa_00_ENTRY_0, "iwa_10", EvtScript N(EVS_ExitWalk_iwa_01_0) = EVT_EXIT_WALK(60, iwa_00_ENTRY_1, "iwa_01", iwa_01_ENTRY_0); EvtScript N(EVS_TexPan_Water) = { - EVT_CALL(EnableTexPanning, MODEL_o949, TRUE) - EVT_CALL(EnableTexPanning, MODEL_water, TRUE) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 3000) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(EnableTexPanning, MODEL_o949, TRUE) + Call(EnableTexPanning, MODEL_water, TRUE) + Set(LVar0, 0) + Loop(0) + Add(LVar0, 3000) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, LVar0) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_iwa_10_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_iwa_01_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_iwa_10_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_iwa_01_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_RUGGED) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_TexPan_Water)) - EVT_EXEC(N(EVS_BindSlideTriggers)) - EVT_CALL(SetMusicTrack, 0, SONG_MT_RUGGED, 0, 8) - EVT_CALL(PlaySoundAtF, SOUND_LOOP_IWA00_FLOW3, SOUND_SPACE_WITH_DEPTH, 35, -80, -120) - EVT_CALL(PlaySoundAtF, SOUND_LOOP_IWA00_FLOW2, SOUND_SPACE_WITH_DEPTH, 500, 85, -120) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_RUGGED) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_TexPan_Water)) + Exec(N(EVS_BindSlideTriggers)) + Call(SetMusicTrack, 0, SONG_MT_RUGGED, 0, 8) + Call(PlaySoundAtF, SOUND_LOOP_IWA00_FLOW3, SOUND_SPACE_WITH_DEPTH, 35, -80, -120) + Call(PlaySoundAtF, SOUND_LOOP_IWA00_FLOW2, SOUND_SPACE_WITH_DEPTH, 500, 85, -120) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; diff --git a/src/world/area_iwa/iwa_00/iwa_00_2_entity.c b/src/world/area_iwa/iwa_00/iwa_00_2_entity.c index 7e5ba045d27..42fc013fc08 100644 --- a/src/world/area_iwa/iwa_00/iwa_00_2_entity.c +++ b/src/world/area_iwa/iwa_00/iwa_00_2_entity.c @@ -2,23 +2,23 @@ #include "entity.h" EvtScript N(EVS_OnSmashBlock) = { - EVT_SET(GF_IWA01_Hammer1Block, TRUE) - EVT_RETURN - EVT_END + Set(GF_IWA01_Hammer1Block, TRUE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_IWA01_Hammer1Block, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer1Block_WideZ), 900, -30, 220, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnSmashBlock))) - EVT_END_IF - EVT_CALL(MakeItemEntity, ITEM_COIN, 405, 25, 25, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA00_Item_CoinA) - EVT_CALL(MakeItemEntity, ITEM_COIN, 465, 53, 25, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA00_Item_CoinB) - EVT_CALL(MakeItemEntity, ITEM_COIN, 515, 92, 25, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA00_Item_CoinC) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 1260, 30, 140, 0, ITEM_SLEEPY_SHEEP, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_IWA00_ItemBlock_SleepySheep) - EVT_CALL(MakeEntity, EVT_PTR(Entity_ArrowSign), 58, -5, -73, -30, 90, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_ArrowSign), 926, 70, -45, 22, 90, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + IfEq(GF_IWA01_Hammer1Block, FALSE) + Call(MakeEntity, Ref(Entity_Hammer1Block_WideZ), 900, -30, 220, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnSmashBlock))) + EndIf + Call(MakeItemEntity, ITEM_COIN, 405, 25, 25, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA00_Item_CoinA) + Call(MakeItemEntity, ITEM_COIN, 465, 53, 25, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA00_Item_CoinB) + Call(MakeItemEntity, ITEM_COIN, 515, 92, 25, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA00_Item_CoinC) + Call(MakeEntity, Ref(Entity_YellowBlock), 1260, 30, 140, 0, ITEM_SLEEPY_SHEEP, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_IWA00_ItemBlock_SleepySheep) + Call(MakeEntity, Ref(Entity_ArrowSign), 58, -5, -73, -30, 90, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_ArrowSign), 926, 70, -45, 22, 90, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_iwa/iwa_00/iwa_00_3_npc.c b/src/world/area_iwa/iwa_00/iwa_00_3_npc.c index 4f23c81baa7..d8d20c7a1dc 100644 --- a/src/world/area_iwa/iwa_00/iwa_00_3_npc.c +++ b/src/world/area_iwa/iwa_00/iwa_00_3_npc.c @@ -136,202 +136,202 @@ NpcData N(NpcData_MontyMole_WallAmbush)[] = { }; EvtScript N(EVS_NpcInteract_Whacka_01) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_IF_LT(LVar0, LVar3) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_ELSE - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_END_IF - EVT_SWITCH(GB_IWA00_Whacka_HitCount) - EVT_CASE_EQ(0) - EVT_IF_EQ(GF_IWA00_Met_Whacka, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Whacka_Talk, ANIM_Whacka_Idle, 0, MSG_CH2_0027) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Whacka_Talk, ANIM_Whacka_Idle, 0, MSG_CH2_0028) - EVT_END_IF - EVT_CASE_LE(2) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Whacka_Talk, ANIM_Whacka_Idle, 0, MSG_CH2_0028) - EVT_CASE_LE(4) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Whacka_Talk, ANIM_Whacka_Idle, 0, MSG_CH2_0029) - EVT_CASE_LE(6) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Whacka_Talk, ANIM_Whacka_Idle, 0, MSG_CH2_002A) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Whacka_Talk, ANIM_Whacka_Idle, 0, MSG_CH2_002B) - EVT_END_SWITCH - EVT_SET(GF_IWA00_Met_Whacka, TRUE) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + IfLt(LVar0, LVar3) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Else + Call(InterpNpcYaw, NPC_SELF, 90, 0) + EndIf + Switch(GB_IWA00_Whacka_HitCount) + CaseEq(0) + IfEq(GF_IWA00_Met_Whacka, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Whacka_Talk, ANIM_Whacka_Idle, 0, MSG_CH2_0027) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Whacka_Talk, ANIM_Whacka_Idle, 0, MSG_CH2_0028) + EndIf + CaseLe(2) + Call(SpeakToPlayer, NPC_SELF, ANIM_Whacka_Talk, ANIM_Whacka_Idle, 0, MSG_CH2_0028) + CaseLe(4) + Call(SpeakToPlayer, NPC_SELF, ANIM_Whacka_Talk, ANIM_Whacka_Idle, 0, MSG_CH2_0029) + CaseLe(6) + Call(SpeakToPlayer, NPC_SELF, ANIM_Whacka_Talk, ANIM_Whacka_Idle, 0, MSG_CH2_002A) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Whacka_Talk, ANIM_Whacka_Idle, 0, MSG_CH2_002B) + EndSwitch + Set(GF_IWA00_Met_Whacka, TRUE) + Return + End }; EvtScript N(EVS_NpcIdle_Whacka_01) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Whacka_Idle) - EVT_CALL(GetNpcPos, NPC_SELF, LVarA, LVarB, LVarC) - EVT_CALL(SetNpcPos, NPC_Whacka_01, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_Whacka_02, NPC_DISPOSE_LOCATION) - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GE(LVar1, 20) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_LT(LVar0, 600) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_GT(LVar0, 850) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_Whacka_01, LVarA, LVarB, LVarC) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Whacka_PopUp) - EVT_WAIT(15) - EVT_CALL(SetNpcPos, NPC_Whacka_02, LVarA, LVarB, LVarC) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Whacka_Idle) - EVT_WAIT(30) - EVT_LABEL(10) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LE(LVar0, 900) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Whacka_Burrow) - EVT_CALL(SetNpcPos, NPC_Whacka_02, NPC_DISPOSE_LOCATION) - EVT_WAIT(15) - EVT_CALL(SetNpcPos, NPC_Whacka_01, NPC_DISPOSE_LOCATION) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_Whacka_Idle) + Call(GetNpcPos, NPC_SELF, LVarA, LVarB, LVarC) + Call(SetNpcPos, NPC_Whacka_01, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_Whacka_02, NPC_DISPOSE_LOCATION) + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGe(LVar1, 20) + Wait(1) + Goto(0) + EndIf + IfLt(LVar0, 600) + Wait(1) + Goto(0) + EndIf + IfGt(LVar0, 850) + Wait(1) + Goto(0) + EndIf + Call(SetNpcPos, NPC_Whacka_01, LVarA, LVarB, LVarC) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_SELF, ANIM_Whacka_PopUp) + Wait(15) + Call(SetNpcPos, NPC_Whacka_02, LVarA, LVarB, LVarC) + Wait(5) + Call(SetNpcAnimation, NPC_SELF, ANIM_Whacka_Idle) + Wait(30) + Label(10) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLe(LVar0, 900) + Goto(10) + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_Whacka_Burrow) + Call(SetNpcPos, NPC_Whacka_02, NPC_DISPOSE_LOCATION) + Wait(15) + Call(SetNpcPos, NPC_Whacka_01, NPC_DISPOSE_LOCATION) + Goto(0) + Return + End }; EvtScript N(EVS_NpcHit_Whacka_02) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(LVarA, 1) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_SET(LVarA, 1) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_PARTNER) - EVT_CALL(GetCurrentPartnerID, LVar2) - EVT_IF_EQ(LVar2, PARTNER_KOOPER) - EVT_SET(LVarA, 2) - EVT_ELSE - EVT_SET(LVarA, 3) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_SET(LVarA, 0) - EVT_END_SWITCH - EVT_IF_EQ(LVarA, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(BindNpcInteract, NPC_Whacka_01, 0) - EVT_CALL(EnableNpcAI, NPC_Whacka_01, FALSE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_IF_LT(LVar0, LVar3) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_SET(LVarB, 0) - EVT_ELSE - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_SET(LVarB, 1) - EVT_END_IF - EVT_ADD(GB_IWA00_Whacka_HitCount, 1) - EVT_IF_EQ(LVarA, 3) - EVT_ADD(GB_IWA00_Whacka_HitCount, 1) - EVT_END_IF - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(2) - EVT_CASE_OR_EQ(3) - EVT_CALL(PlaySoundAtNpc, NPC_Whacka_01, SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_DEFAULT) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_SWITCH(LVarA) - EVT_CASE_OR_EQ(1) - EVT_CASE_OR_EQ(2) - EVT_WAIT(1) - EVT_CALL(SetNpcAnimation, NPC_Whacka_01, ANIM_Whacka_Hurt) - EVT_WAIT(15) - EVT_CALL(GetNpcPos, NPC_Whacka_01, LVar0, LVar1, LVar2) - EVT_IF_EQ(LVarB, 0) - EVT_ADD(LVar0, 14) - EVT_ELSE - EVT_SUB(LVar0, 14) - EVT_END_IF - EVT_ADD(LVar1, 30) - EVT_ADD(LVar2, 2) - EVT_CALL(MakeItemEntity, ITEM_WHACKAS_BUMP, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, 0) - EVT_CALL(SetNpcAnimation, NPC_Whacka_01, ANIM_Whacka_Idle) - EVT_WAIT(5) - EVT_END_CASE_GROUP - EVT_CASE_EQ(3) - EVT_CALL(GetNpcPos, NPC_Whacka_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 1) - EVT_CALL(SetNpcPos, NPC_Whacka_01, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_SUB(LVar0, 2) - EVT_CALL(SetNpcPos, NPC_Whacka_01, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar0, 2) - EVT_CALL(SetNpcPos, NPC_Whacka_01, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_SUB(LVar0, 1) - EVT_CALL(SetNpcPos, NPC_Whacka_01, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_IF_LT(GB_IWA00_Whacka_HitCount, 8) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_Whacka_01, ANIM_Whacka_Talk, ANIM_Whacka_Idle, 0, MSG_CH2_002C) - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, NPC_Whacka_01, ANIM_Whacka_Talk, ANIM_Whacka_Idle, 0, MSG_CH2_002D) - EVT_CASE_EQ(3) - EVT_CALL(SpeakToPlayer, NPC_Whacka_01, ANIM_Whacka_Talk, ANIM_Whacka_Idle, 0, MSG_CH2_002E) - EVT_END_SWITCH - EVT_CALL(SetNpcAnimation, NPC_Whacka_01, ANIM_Whacka_Burrow) - EVT_WAIT(15) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Whacka_01, ANIM_Whacka_Talk, ANIM_Whacka_Idle, 0, MSG_CH2_002F) - EVT_WAIT(2) - EVT_END_IF - EVT_IF_GE(GB_IWA00_Whacka_HitCount, 8) - EVT_CALL(N(func_80240118_90CD58)) - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_Whacka_01, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_Whacka_02, NPC_DISPOSE_LOCATION) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(RemoveNpc, NPC_Whacka_01) - EVT_CALL(RemoveNpc, NPC_Whacka_02) - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(LVarA, 1) + CaseEq(ENCOUNTER_TRIGGER_JUMP) + Set(LVarA, 1) + CaseEq(ENCOUNTER_TRIGGER_PARTNER) + Call(GetCurrentPartnerID, LVar2) + IfEq(LVar2, PARTNER_KOOPER) + Set(LVarA, 2) + Else + Set(LVarA, 3) + EndIf + CaseDefault + Set(LVarA, 0) + EndSwitch + IfEq(LVarA, 0) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(BindNpcInteract, NPC_Whacka_01, 0) + Call(EnableNpcAI, NPC_Whacka_01, FALSE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + IfLt(LVar0, LVar3) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Set(LVarB, 0) + Else + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Set(LVarB, 1) + EndIf + Add(GB_IWA00_Whacka_HitCount, 1) + IfEq(LVarA, 3) + Add(GB_IWA00_Whacka_HitCount, 1) + EndIf + Switch(LVarA) + CaseOrEq(2) + CaseOrEq(3) + Call(PlaySoundAtNpc, NPC_Whacka_01, SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_DEFAULT) + EndCaseGroup + EndSwitch + Switch(LVarA) + CaseOrEq(1) + CaseOrEq(2) + Wait(1) + Call(SetNpcAnimation, NPC_Whacka_01, ANIM_Whacka_Hurt) + Wait(15) + Call(GetNpcPos, NPC_Whacka_01, LVar0, LVar1, LVar2) + IfEq(LVarB, 0) + Add(LVar0, 14) + Else + Sub(LVar0, 14) + EndIf + Add(LVar1, 30) + Add(LVar2, 2) + Call(MakeItemEntity, ITEM_WHACKAS_BUMP, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, 0) + Call(SetNpcAnimation, NPC_Whacka_01, ANIM_Whacka_Idle) + Wait(5) + EndCaseGroup + CaseEq(3) + Call(GetNpcPos, NPC_Whacka_01, LVar0, LVar1, LVar2) + Add(LVar0, 1) + Call(SetNpcPos, NPC_Whacka_01, LVar0, LVar1, LVar2) + Wait(1) + Sub(LVar0, 2) + Call(SetNpcPos, NPC_Whacka_01, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar0, 2) + Call(SetNpcPos, NPC_Whacka_01, LVar0, LVar1, LVar2) + Wait(1) + Sub(LVar0, 1) + Call(SetNpcPos, NPC_Whacka_01, LVar0, LVar1, LVar2) + Wait(1) + EndCaseGroup + EndSwitch + IfLt(GB_IWA00_Whacka_HitCount, 8) + Switch(LVarA) + CaseEq(1) + Call(SpeakToPlayer, NPC_Whacka_01, ANIM_Whacka_Talk, ANIM_Whacka_Idle, 0, MSG_CH2_002C) + CaseEq(2) + Call(SpeakToPlayer, NPC_Whacka_01, ANIM_Whacka_Talk, ANIM_Whacka_Idle, 0, MSG_CH2_002D) + CaseEq(3) + Call(SpeakToPlayer, NPC_Whacka_01, ANIM_Whacka_Talk, ANIM_Whacka_Idle, 0, MSG_CH2_002E) + EndSwitch + Call(SetNpcAnimation, NPC_Whacka_01, ANIM_Whacka_Burrow) + Wait(15) + Else + Call(SpeakToPlayer, NPC_Whacka_01, ANIM_Whacka_Talk, ANIM_Whacka_Idle, 0, MSG_CH2_002F) + Wait(2) + EndIf + IfGe(GB_IWA00_Whacka_HitCount, 8) + Call(N(func_80240118_90CD58)) + EndIf + Call(SetNpcPos, NPC_Whacka_01, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_Whacka_02, NPC_DISPOSE_LOCATION) + Call(DisablePlayerInput, FALSE) + Call(RemoveNpc, NPC_Whacka_01) + Call(RemoveNpc, NPC_Whacka_02) + Return + End }; EvtScript N(EVS_NpcInit_Whacka_01) = { - EVT_CALL(SetNpcVar, NPC_Whacka_01, 8, 0) - EVT_IF_LT(GB_IWA00_Whacka_HitCount, 8) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Whacka_01))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Whacka_01))) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_200000, TRUE) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetNpcVar, NPC_Whacka_01, 8, 0) + IfLt(GB_IWA00_Whacka_HitCount, 8) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Whacka_01))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Whacka_01))) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_200000, TRUE) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Whacka_02) = { - EVT_IF_LT(GB_IWA00_Whacka_HitCount, 8) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_Whacka_02))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_IWA00_Whacka_HitCount, 8) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_Whacka_02))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_Whacka)[] = { diff --git a/src/world/area_iwa/iwa_00/iwa_00_4_slide.c b/src/world/area_iwa/iwa_00/iwa_00_4_slide.c index 9587c8180c9..f434cf1788f 100644 --- a/src/world/area_iwa/iwa_00/iwa_00_4_slide.c +++ b/src/world/area_iwa/iwa_00/iwa_00_4_slide.c @@ -15,53 +15,53 @@ API_CALLABLE(N(SetPlayerSliding)) { } EvtScript N(EVS_UpdateSliding) = { - EVT_SET(LVar0, EVT_PTR(N(SlideData))) - EVT_CALL(N(SetPlayerSliding)) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(SlideData))) + Call(N(SetPlayerSliding)) + Return + End }; EvtScript N(EVS_UseSlide) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(PlaySoundAtCollider, COLLIDER_st1, SOUND_IWA_SLIDE_GATE, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 80, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_se1, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(15) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_st1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlayerMoveTo, 543, 17, 20) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_WAIT(100) - EVT_THREAD - EVT_CALL(PlaySoundAtCollider, COLLIDER_st1, SOUND_IWA_SLIDE_GATE, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 80, 0, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_se1, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_st1, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Wait(10) + Thread + Call(PlaySoundAtCollider, COLLIDER_st1, SOUND_IWA_SLIDE_GATE, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 80, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_se1, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Wait(15) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_st1, COLLIDER_FLAGS_UPPER_MASK) + Call(PlayerMoveTo, 543, 17, 20) + Call(DisablePlayerInput, FALSE) + Wait(100) + Thread + Call(PlaySoundAtCollider, COLLIDER_st1, SOUND_IWA_SLIDE_GATE, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 80, 0, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_se1, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_st1, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_BindSlideTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseSlide)), TRIGGER_WALL_PRESS_A, COLLIDER_st1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UpdateSliding)), TRIGGER_FLOOR_TOUCH, COLLIDER_suberi01, 1, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_suberi01, SURFACE_TYPE_SLIDE) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_UseSlide)), TRIGGER_WALL_PRESS_A, COLLIDER_st1, 1, 0) + BindTrigger(Ref(N(EVS_UpdateSliding)), TRIGGER_FLOOR_TOUCH, COLLIDER_suberi01, 1, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_suberi01, SURFACE_TYPE_SLIDE) + Return + End }; diff --git a/src/world/area_iwa/iwa_01/iwa_01_1_main.c b/src/world/area_iwa/iwa_01/iwa_01_1_main.c index e80893517f1..c8cd6aca19d 100644 --- a/src/world/area_iwa/iwa_01/iwa_01_1_main.c +++ b/src/world/area_iwa/iwa_01/iwa_01_1_main.c @@ -6,72 +6,72 @@ EvtScript N(EVS_ExitWalk_iwa_02_0) = EVT_EXIT_WALK(60, iwa_01_ENTRY_2, "iwa_02", EvtScript N(EVS_ExitWalk_iwa_02_1) = EVT_EXIT_WALK(60, iwa_01_ENTRY_3, "iwa_02", iwa_02_ENTRY_1); EvtScript N(EVS_TexPan_Water) = { - EVT_CALL(EnableTexPanning, MODEL_o946, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o947, TRUE) - EVT_SET(LVar0, 0) - EVT_LABEL(10) - EVT_SUB(LVar0, 3000) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, LVar0) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Call(EnableTexPanning, MODEL_o946, TRUE) + Call(EnableTexPanning, MODEL_o947, TRUE) + Set(LVar0, 0) + Label(10) + Sub(LVar0, 3000) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, LVar0) + Wait(1) + Goto(10) + Return + End }; EvtScript N(D_80243568_912C18) = { - EVT_CALL(EnableTexPanning, MODEL_o952, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o956, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o957, TRUE) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LABEL(10) - EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, 0, LVar1) - EVT_ADD(LVar0, 0x8000) - EVT_ADD(LVar1, 0x8000) - EVT_WAIT(2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, 0, LVar1) - EVT_ADD(LVar1, 0x8000) - EVT_WAIT(2) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Call(EnableTexPanning, MODEL_o952, TRUE) + Call(EnableTexPanning, MODEL_o956, TRUE) + Call(EnableTexPanning, MODEL_o957, TRUE) + Set(LVar0, 0) + Set(LVar1, 0) + Label(10) + Call(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, LVar0, 0) + Call(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, 0, LVar1) + Add(LVar0, 0x8000) + Add(LVar1, 0x8000) + Wait(2) + Call(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, 0, LVar1) + Add(LVar1, 0x8000) + Wait(2) + Goto(10) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_iwa_00_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_iwa_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_iwa_02_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_iwa_02_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili4, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_iwa_00_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_iwa_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_iwa_02_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_iwa_02_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili4, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_RUGGED) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_TexPan_Water)) - EVT_EXEC(N(D_80243568_912C18)) - EVT_EXEC_WAIT(N(EVS_MakeSplashes)) - EVT_EXEC(N(EVS_BindSlideTriggers2)) - EVT_EXEC(N(EVS_BindSlideTriggers1)) - EVT_CALL(SetMusicTrack, 0, SONG_MT_RUGGED, 0, 8) - EVT_CALL(PlaySoundAtF, SOUND_LOOP_IWA01_FLOW1, SOUND_SPACE_WITH_DEPTH, -570, -180, 425) - EVT_CALL(PlaySoundAtF, SOUND_LOOP_IWA01_FLOW2, SOUND_SPACE_WITH_DEPTH, 740, -170, 330) - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_IF - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_RUGGED) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_TexPan_Water)) + Exec(N(D_80243568_912C18)) + ExecWait(N(EVS_MakeSplashes)) + Exec(N(EVS_BindSlideTriggers2)) + Exec(N(EVS_BindSlideTriggers1)) + Call(SetMusicTrack, 0, SONG_MT_RUGGED, 0, 8) + Call(PlaySoundAtF, SOUND_LOOP_IWA01_FLOW1, SOUND_SPACE_WITH_DEPTH, -570, -180, 425) + Call(PlaySoundAtF, SOUND_LOOP_IWA01_FLOW2, SOUND_SPACE_WITH_DEPTH, 740, -170, 330) + Call(GetLoadType, LVar1) + IfEq(LVar1, 1) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Else + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndIf + Wait(1) + Return + End }; MAP_RODATA_PAD(1, pad); diff --git a/src/world/area_iwa/iwa_01/iwa_01_2_entity.c b/src/world/area_iwa/iwa_01/iwa_01_2_entity.c index a9e1ff1e1d4..4694b5d2630 100644 --- a/src/world/area_iwa/iwa_01/iwa_01_2_entity.c +++ b/src/world/area_iwa/iwa_01/iwa_01_2_entity.c @@ -2,13 +2,13 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), -650, 123, 375, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_ArrowSign), -503, 63, 225, 0, 90, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_ArrowSign), 825, 170, 115, 0, 90, MAKE_ENTITY_END) - EVT_CALL(MakeItemEntity, ITEM_QUAKE_HAMMER, 160, 125, 125, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA01_Item_QuakeHammer) - EVT_CALL(MakeItemEntity, ITEM_LETTER_TO_MERLON, 410, 140, 135, ITEM_SPAWN_MODE_KEY, GF_IWA01_Item_Letter01) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 45, 10, 60, 0, MODEL_cam2b, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_IWA01_HiddenPanel) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_SavePoint), -650, 123, 375, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_ArrowSign), -503, 63, 225, 0, 90, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_ArrowSign), 825, 170, 115, 0, 90, MAKE_ENTITY_END) + Call(MakeItemEntity, ITEM_QUAKE_HAMMER, 160, 125, 125, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA01_Item_QuakeHammer) + Call(MakeItemEntity, ITEM_LETTER_TO_MERLON, 410, 140, 135, ITEM_SPAWN_MODE_KEY, GF_IWA01_Item_Letter01) + Call(MakeEntity, Ref(Entity_HiddenPanel), 45, 10, 60, 0, MODEL_cam2b, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_IWA01_HiddenPanel) + Return + End }; diff --git a/src/world/area_iwa/iwa_01/iwa_01_3_splash.c b/src/world/area_iwa/iwa_01/iwa_01_3_splash.c index abcb4e79438..56485218da5 100644 --- a/src/world/area_iwa/iwa_01/iwa_01_3_splash.c +++ b/src/world/area_iwa/iwa_01/iwa_01_3_splash.c @@ -95,9 +95,9 @@ API_CALLABLE(N(InitSplashes)) { } EvtScript N(EVS_MakeSplashes) = { - EVT_CALL(N(InitSplashes)) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_0, 0, EVT_PTR(N(gfx_build_splashes))) - EVT_CALL(SetModelCustomGfx, MODEL_dummy_sprash2, CUSTOM_GFX_0, -1) - EVT_RETURN - EVT_END + Call(N(InitSplashes)) + Call(SetCustomGfxBuilders, CUSTOM_GFX_0, 0, Ref(N(gfx_build_splashes))) + Call(SetModelCustomGfx, MODEL_dummy_sprash2, CUSTOM_GFX_0, -1) + Return + End }; diff --git a/src/world/area_iwa/iwa_01/iwa_01_5_slide.c b/src/world/area_iwa/iwa_01/iwa_01_5_slide.c index 55c177e1c52..29b9b581017 100644 --- a/src/world/area_iwa/iwa_01/iwa_01_5_slide.c +++ b/src/world/area_iwa/iwa_01/iwa_01_5_slide.c @@ -23,105 +23,105 @@ SlideParams N(SlideData2) = { }; EvtScript N(EVS_UpdateSliding1) = { - EVT_SET(LVar0, EVT_PTR(N(SlideData1))) - EVT_CALL(N(SetPlayerSliding)) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(SlideData1))) + Call(N(SetPlayerSliding)) + Return + End }; EvtScript N(EVS_UpdateSliding2) = { - EVT_SET(LVar0, EVT_PTR(N(SlideData2))) - EVT_CALL(N(SetPlayerSliding)) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(SlideData2))) + Call(N(SetPlayerSliding)) + Return + End }; EvtScript N(EVS_UseSlide1) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(PlaySoundAtCollider, COLLIDER_st1, SOUND_IWA_SLIDE_GATE, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, -80, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_se1, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(15) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_st1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlayerMoveTo, -440, 60, 30) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_WAIT(100) - EVT_THREAD - EVT_CALL(PlaySoundAtCollider, COLLIDER_st1, SOUND_IWA_SLIDE_GATE, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, -80, 0, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_se1, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_st1, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Wait(10) + Thread + Call(PlaySoundAtCollider, COLLIDER_st1, SOUND_IWA_SLIDE_GATE, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, -80, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_se1, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Wait(15) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_st1, COLLIDER_FLAGS_UPPER_MASK) + Call(PlayerMoveTo, -440, 60, 30) + Call(DisablePlayerInput, FALSE) + Wait(100) + Thread + Call(PlaySoundAtCollider, COLLIDER_st1, SOUND_IWA_SLIDE_GATE, SOUND_SPACE_DEFAULT) + Call(MakeLerp, -80, 0, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_se1, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_st1, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_UseSlide2) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(PlaySoundAtCollider, COLLIDER_st2, SOUND_IWA_SLIDE_GATE, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 80, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_se2, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(15) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_st2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlayerMoveTo, 543, 50, 20) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_WAIT(100) - EVT_THREAD - EVT_CALL(PlaySoundAtCollider, COLLIDER_st2, SOUND_IWA_SLIDE_GATE, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 80, 0, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_se2, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_st2, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Wait(10) + Thread + Call(PlaySoundAtCollider, COLLIDER_st2, SOUND_IWA_SLIDE_GATE, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 80, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_se2, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Wait(15) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_st2, COLLIDER_FLAGS_UPPER_MASK) + Call(PlayerMoveTo, 543, 50, 20) + Call(DisablePlayerInput, FALSE) + Wait(100) + Thread + Call(PlaySoundAtCollider, COLLIDER_st2, SOUND_IWA_SLIDE_GATE, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 80, 0, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_se2, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_st2, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_BindSlideTriggers1) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseSlide1)), TRIGGER_WALL_PRESS_A, COLLIDER_st1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UpdateSliding1)), TRIGGER_FLOOR_TOUCH, COLLIDER_suberi1, 1, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_suberi1, SURFACE_TYPE_SLIDE) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_UseSlide1)), TRIGGER_WALL_PRESS_A, COLLIDER_st1, 1, 0) + BindTrigger(Ref(N(EVS_UpdateSliding1)), TRIGGER_FLOOR_TOUCH, COLLIDER_suberi1, 1, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_suberi1, SURFACE_TYPE_SLIDE) + Return + End }; EvtScript N(EVS_BindSlideTriggers2) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseSlide2)), TRIGGER_WALL_PRESS_A, COLLIDER_st2, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UpdateSliding2)), TRIGGER_FLOOR_TOUCH, COLLIDER_suberi01, 1, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_suberi01, SURFACE_TYPE_SLIDE) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_UseSlide2)), TRIGGER_WALL_PRESS_A, COLLIDER_st2, 1, 0) + BindTrigger(Ref(N(EVS_UpdateSliding2)), TRIGGER_FLOOR_TOUCH, COLLIDER_suberi01, 1, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_suberi01, SURFACE_TYPE_SLIDE) + Return + End }; diff --git a/src/world/area_iwa/iwa_02/iwa_02_1_main.c b/src/world/area_iwa/iwa_02/iwa_02_1_main.c index b2cd86858d4..94d4564a9c4 100644 --- a/src/world/area_iwa/iwa_02/iwa_02_1_main.c +++ b/src/world/area_iwa/iwa_02/iwa_02_1_main.c @@ -5,24 +5,24 @@ EvtScript N(EVS_ExitWalk_iwa_01_3) = EVT_EXIT_WALK(60, iwa_02_ENTRY_1, "iwa_01", EvtScript N(EVS_ExitWalk_iwa_04_0) = EVT_EXIT_WALK(60, iwa_02_ENTRY_2, "iwa_04", iwa_04_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_iwa_01_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_iwa_01_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_iwa_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_iwa_01_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_iwa_01_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_iwa_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_RUGGED) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(SetMusicTrack, 0, SONG_MT_RUGGED, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_RUGGED) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(SetMusicTrack, 0, SONG_MT_RUGGED, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; diff --git a/src/world/area_iwa/iwa_02/iwa_02_2_entity.c b/src/world/area_iwa/iwa_02/iwa_02_2_entity.c index b737531eb48..d8bb7bad9e3 100644 --- a/src/world/area_iwa/iwa_02/iwa_02_2_entity.c +++ b/src/world/area_iwa/iwa_02/iwa_02_2_entity.c @@ -2,10 +2,10 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_ArrowSign), 64, 0, 95, 0, 120, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_ArrowSign), 307, 67, 99, 0, 120, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_ArrowSign), 700, 238, 15, 0, 90, MAKE_ENTITY_END) - EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 35, 167, 120, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA02_Item_StarPiece) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_ArrowSign), 64, 0, 95, 0, 120, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_ArrowSign), 307, 67, 99, 0, 120, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_ArrowSign), 700, 238, 15, 0, 90, MAKE_ENTITY_END) + Call(MakeItemEntity, ITEM_STAR_PIECE, 35, 167, 120, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA02_Item_StarPiece) + Return + End }; diff --git a/src/world/area_iwa/iwa_02/iwa_02_3_npc.c b/src/world/area_iwa/iwa_02/iwa_02_3_npc.c index dd4ad7a3d1b..d31a9fa2223 100644 --- a/src/world/area_iwa/iwa_02/iwa_02_3_npc.c +++ b/src/world/area_iwa/iwa_02/iwa_02_3_npc.c @@ -124,60 +124,60 @@ NpcData N(NpcData_MontyMole_01)[] = { }; EvtScript N(EVS_Bubulb_Conversation) = { - EVT_IF_EQ(AF_IWA_SpokeWithBubulb, FALSE) - EVT_SET(LVar2, LVar0) - EVT_SET(AF_IWA_SpokeWithBubulb, TRUE) - EVT_ELSE - EVT_SET(LVar2, LVar1) - EVT_SET(AF_IWA_SpokeWithBubulb, FALSE) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_Bubulb, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, LVar2) - EVT_RETURN - EVT_END + IfEq(AF_IWA_SpokeWithBubulb, FALSE) + Set(LVar2, LVar0) + Set(AF_IWA_SpokeWithBubulb, TRUE) + Else + Set(LVar2, LVar1) + Set(AF_IWA_SpokeWithBubulb, FALSE) + EndIf + Call(SpeakToPlayer, NPC_Bubulb, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, LVar2) + Return + End }; EvtScript N(EVS_NpcInteract_Bubulb) = { - EVT_IF_EQ(GF_IWA02_Gift_MagicalSeed2, FALSE) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_MOLE_POP, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Bubulb_Purple_PopUp) - EVT_WAIT(45) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Bubulb_Purple_Idle) - EVT_CALL(SetNpcCollisionSize, NPC_SELF, 45, 26) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(10.0), 0, 350, EVT_FLOAT(15.0), EVT_FLOAT(-6.5)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH2_001F) + IfEq(GF_IWA02_Gift_MagicalSeed2, FALSE) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_MOLE_POP, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_SELF, ANIM_Bubulb_Purple_PopUp) + Wait(45) + Call(SetNpcAnimation, NPC_SELF, ANIM_Bubulb_Purple_Idle) + Call(SetNpcCollisionSize, NPC_SELF, 45, 26) + Call(AdjustCam, CAM_DEFAULT, Float(10.0), 0, 350, Float(15.0), Float(-6.5)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH2_001F) EVT_GIVE_KEY_REWARD(ITEM_MAGICAL_SEED2) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH2_0020) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(10.0)) - EVT_SET(GF_IWA02_Gift_MagicalSeed2, TRUE) - EVT_CALL(SetTattleMessage, NPC_Bubulb, MSG_NpcTattle_IWA_Bubulb_Revealed) - EVT_ELSE - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_CH2_0021) - EVT_SET(LVar1, MSG_CH2_0022) - EVT_CASE_LT(STORY_CH5_HIDDEN_PASSAGE_OPEN) - EVT_SET(LVar0, MSG_CH2_0023) - EVT_SET(LVar1, MSG_CH2_0024) - EVT_CASE_DEFAULT - EVT_SET(LVar0, MSG_CH2_0025) - EVT_SET(LVar1, MSG_CH2_0026) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_Bubulb_Conversation)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH2_0020) + Call(ResetCam, CAM_DEFAULT, Float(10.0)) + Set(GF_IWA02_Gift_MagicalSeed2, TRUE) + Call(SetTattleMessage, NPC_Bubulb, MSG_NpcTattle_IWA_Bubulb_Revealed) + Else + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_CH2_0021) + Set(LVar1, MSG_CH2_0022) + CaseLt(STORY_CH5_HIDDEN_PASSAGE_OPEN) + Set(LVar0, MSG_CH2_0023) + Set(LVar1, MSG_CH2_0024) + CaseDefault + Set(LVar0, MSG_CH2_0025) + Set(LVar1, MSG_CH2_0026) + EndSwitch + ExecWait(N(EVS_Bubulb_Conversation)) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Bubulb) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bubulb))) - EVT_IF_EQ(GF_IWA02_Gift_MagicalSeed2, FALSE) - EVT_CALL(SetNpcCollisionSize, NPC_SELF, 25, 25) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Bubulb_Purple_BuriedIdle) - EVT_CALL(SetTattleMessage, NPC_Bubulb, MSG_NpcTattle_IWA_Bubulb_Hidden) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bubulb))) + IfEq(GF_IWA02_Gift_MagicalSeed2, FALSE) + Call(SetNpcCollisionSize, NPC_SELF, 25, 25) + Call(SetNpcAnimation, NPC_SELF, ANIM_Bubulb_Purple_BuriedIdle) + Call(SetTattleMessage, NPC_Bubulb, MSG_NpcTattle_IWA_Bubulb_Hidden) + EndIf + Return + End }; NpcData N(NpcData_Bubulb) = { diff --git a/src/world/area_iwa/iwa_03/iwa_03_1_main.c b/src/world/area_iwa/iwa_03/iwa_03_1_main.c index 709dbf835c6..170e7f21c41 100644 --- a/src/world/area_iwa/iwa_03/iwa_03_1_main.c +++ b/src/world/area_iwa/iwa_03/iwa_03_1_main.c @@ -3,23 +3,23 @@ EvtScript N(EVS_ExitWalk_iwa_01_1) = EVT_EXIT_WALK(60, iwa_03_ENTRY_0, "iwa_01", iwa_01_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_iwa_01_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_iwa_01_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_RUGGED) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_BindSlideTriggers)) - EVT_CALL(SetMusicTrack, 0, SONG_MT_RUGGED, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_patapata, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_RUGGED) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_BindSlideTriggers)) + Call(SetMusicTrack, 0, SONG_MT_RUGGED, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_patapata, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; diff --git a/src/world/area_iwa/iwa_03/iwa_03_2_entity.c b/src/world/area_iwa/iwa_03/iwa_03_2_entity.c index 5f567986ad5..99a6b95d34e 100644 --- a/src/world/area_iwa/iwa_03/iwa_03_2_entity.c +++ b/src/world/area_iwa/iwa_03/iwa_03_2_entity.c @@ -21,63 +21,63 @@ API_CALLABLE(N(MonitorPlayerAltitude)) { } EvtScript N(EVS_TetherCameraToPlayer) = { - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_UseSpring) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAUNCH) - EVT_WAIT(1) - EVT_EXEC_GET_TID(N(EVS_TetherCameraToPlayer), LVarA) - EVT_IF_EQ(MV_PlayerCliffLevel, 0) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.4)) - EVT_CALL(PlayerJump, -1582, 23, 60, 15) - EVT_ELSE - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7)) - EVT_CALL(PlayerJump, -1582, 408, -60, 40) - EVT_END_IF - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAUNCH) + Wait(1) + ExecGetTID(N(EVS_TetherCameraToPlayer), LVarA) + IfEq(MV_PlayerCliffLevel, 0) + Call(SetPlayerJumpscale, Float(1.4)) + Call(PlayerJump, -1582, 23, 60, 15) + Else + Call(SetPlayerJumpscale, Float(0.7)) + Call(PlayerJump, -1582, 408, -60, 40) + EndIf + KillThread(LVarA) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_OpenChest) = EVT_OPEN_CHEST_BADGE(ITEM_DAMAGE_DODGE_B, GF_IWA03_Chest_DamageDodgeB); EvtScript N(EVS_MakeEntities) = { - EVT_THREAD - EVT_CALL(N(MonitorPlayerAltitude)) - EVT_END_THREAD - EVT_CALL(MakeEntity, EVT_PTR(Entity_ScriptSpring), -1580, 23, 20, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_UseSpring))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -1775, 408, -120, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_IWA03_ItemBlock_Coin) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -620, -15, -69, 0, ITEM_MUSHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_IWA03_ItemBlock_Mushroom) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -1090, 408, -130, 0, ITEM_HONEY_SYRUP, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_IWA03_ItemBlock_HoneySyrup) - EVT_CALL(MakeItemEntity, ITEM_LETTER_TO_KOLORADO, -20, 95, -85, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA03_Item_LettertoKolorado) - EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, -1865, 23, 20, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA03_Item_StarPiece) - EVT_CALL(MakeItemEntity, ITEM_COIN, -1815, 23, 20, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA03_Item_CoinC) - EVT_CALL(MakeItemEntity, ITEM_COIN, -1915, 23, 20, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA03_Item_CoinD) - EVT_CALL(MakeItemEntity, ITEM_COIN, -1840, 23, 63, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA03_Item_CoinE) - EVT_CALL(MakeItemEntity, ITEM_COIN, -1890, 23, 63, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA03_Item_CoinF) - EVT_CALL(MakeItemEntity, ITEM_COIN, -1840, 23, -23, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA03_Item_CoinG) - EVT_CALL(MakeItemEntity, ITEM_COIN, -1890, 23, -23, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA03_Item_CoinH) - EVT_CALL(MakeItemEntity, ITEM_COIN, -1707, -60, 0, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA03_Item_CoinA) - EVT_CALL(MakeItemEntity, ITEM_COIN, -1707, -60, 60, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA03_Item_CoinB) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), -1717, 93, -127, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_IWA03_Chest_DamageDodgeB) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenChest))) - EVT_RETURN - EVT_END + Thread + Call(N(MonitorPlayerAltitude)) + EndThread + Call(MakeEntity, Ref(Entity_ScriptSpring), -1580, 23, 20, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_UseSpring))) + Call(MakeEntity, Ref(Entity_YellowBlock), -1775, 408, -120, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_IWA03_ItemBlock_Coin) + Call(MakeEntity, Ref(Entity_YellowBlock), -620, -15, -69, 0, ITEM_MUSHROOM, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_IWA03_ItemBlock_Mushroom) + Call(MakeEntity, Ref(Entity_YellowBlock), -1090, 408, -130, 0, ITEM_HONEY_SYRUP, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_IWA03_ItemBlock_HoneySyrup) + Call(MakeItemEntity, ITEM_LETTER_TO_KOLORADO, -20, 95, -85, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA03_Item_LettertoKolorado) + Call(MakeItemEntity, ITEM_STAR_PIECE, -1865, 23, 20, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA03_Item_StarPiece) + Call(MakeItemEntity, ITEM_COIN, -1815, 23, 20, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA03_Item_CoinC) + Call(MakeItemEntity, ITEM_COIN, -1915, 23, 20, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA03_Item_CoinD) + Call(MakeItemEntity, ITEM_COIN, -1840, 23, 63, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA03_Item_CoinE) + Call(MakeItemEntity, ITEM_COIN, -1890, 23, 63, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA03_Item_CoinF) + Call(MakeItemEntity, ITEM_COIN, -1840, 23, -23, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA03_Item_CoinG) + Call(MakeItemEntity, ITEM_COIN, -1890, 23, -23, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA03_Item_CoinH) + Call(MakeItemEntity, ITEM_COIN, -1707, -60, 0, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA03_Item_CoinA) + Call(MakeItemEntity, ITEM_COIN, -1707, -60, 60, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA03_Item_CoinB) + Call(MakeEntity, Ref(Entity_Chest), -1717, 93, -127, 0, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_IWA03_Chest_DamageDodgeB) + Call(AssignScript, Ref(N(EVS_OpenChest))) + Return + End }; diff --git a/src/world/area_iwa/iwa_03/iwa_03_4_slide.c b/src/world/area_iwa/iwa_03/iwa_03_4_slide.c index 5d3bf86d363..19a92ddb657 100644 --- a/src/world/area_iwa/iwa_03/iwa_03_4_slide.c +++ b/src/world/area_iwa/iwa_03/iwa_03_4_slide.c @@ -15,54 +15,54 @@ API_CALLABLE(N(SetPlayerSliding)) { } EvtScript N(EVS_UpdateSliding) = { - EVT_SET(LVar0, EVT_PTR(N(SlideData))) - EVT_CALL(N(SetPlayerSliding)) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(SlideData))) + Call(N(SetPlayerSliding)) + Return + End }; EvtScript N(EVS_UseSlide) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(PlaySoundAtCollider, COLLIDER_st1, SOUND_IWA_SLIDE_GATE, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, -80, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_se1, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(15) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_st1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, -1460, -60, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_WAIT(100) - EVT_THREAD - EVT_CALL(PlaySoundAtCollider, COLLIDER_st1, SOUND_IWA_SLIDE_GATE, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, -80, 0, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_se1, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_st1, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Wait(10) + Thread + Call(PlaySoundAtCollider, COLLIDER_st1, SOUND_IWA_SLIDE_GATE, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, -80, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_se1, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Wait(15) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_st1, COLLIDER_FLAGS_UPPER_MASK) + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, -1460, -60, 0) + Call(DisablePlayerInput, FALSE) + Wait(100) + Thread + Call(PlaySoundAtCollider, COLLIDER_st1, SOUND_IWA_SLIDE_GATE, SOUND_SPACE_DEFAULT) + Call(MakeLerp, -80, 0, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_se1, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_st1, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_BindSlideTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseSlide)), TRIGGER_WALL_PRESS_A, COLLIDER_st1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UpdateSliding)), TRIGGER_FLOOR_TOUCH, COLLIDER_suberi0, 1, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_suberi0, SURFACE_TYPE_SLIDE) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_UseSlide)), TRIGGER_WALL_PRESS_A, COLLIDER_st1, 1, 0) + BindTrigger(Ref(N(EVS_UpdateSliding)), TRIGGER_FLOOR_TOUCH, COLLIDER_suberi0, 1, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_suberi0, SURFACE_TYPE_SLIDE) + Return + End }; diff --git a/src/world/area_iwa/iwa_04/iwa_04_1_music.c b/src/world/area_iwa/iwa_04/iwa_04_1_music.c index 0f2cf132c4d..ccda7a752f4 100644 --- a/src/world/area_iwa/iwa_04/iwa_04_1_music.c +++ b/src/world/area_iwa/iwa_04/iwa_04_1_music.c @@ -1,7 +1,7 @@ #include "iwa_04.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_MT_RUGGED, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_MT_RUGGED, 0, 8) + Return + End }; diff --git a/src/world/area_iwa/iwa_04/iwa_04_2_main.c b/src/world/area_iwa/iwa_04/iwa_04_2_main.c index 51fd171605e..3efff1601a1 100644 --- a/src/world/area_iwa/iwa_04/iwa_04_2_main.c +++ b/src/world/area_iwa/iwa_04/iwa_04_2_main.c @@ -4,32 +4,32 @@ EvtScript N(EVS_ExitWalk_iwa_02_2) = EVT_EXIT_WALK(60, iwa_04_ENTRY_0, "iwa_02", EvtScript N(EVS_ExitWalk_sbk_99_0) = EVT_EXIT_WALK(60, iwa_04_ENTRY_1, "sbk_99", sbk_99_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_iwa_02_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_99_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_iwa_02_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_99_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_RUGGED) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(ParentColliderToModel, COLLIDER_o962, MODEL_o962) - EVT_CALL(ParentColliderToModel, COLLIDER_o979, MODEL_o979) - EVT_CALL(ParentColliderToModel, COLLIDER_o980, MODEL_o980) - EVT_CALL(ParentColliderToModel, COLLIDER_o981, MODEL_o981) - EVT_CALL(ParentColliderToModel, COLLIDER_o982, MODEL_o982) - EVT_CALL(ParentColliderToModel, COLLIDER_o983, MODEL_o983) - EVT_CALL(ParentColliderToModel, COLLIDER_o984, MODEL_o984) - EVT_CALL(ParentColliderToModel, COLLIDER_o985, MODEL_o985) - EVT_CALL(ParentColliderToModel, COLLIDER_o992, MODEL_o992) - EVT_CALL(ParentColliderToModel, COLLIDER_o993, MODEL_o993) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_RUGGED) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Call(ParentColliderToModel, COLLIDER_o962, MODEL_o962) + Call(ParentColliderToModel, COLLIDER_o979, MODEL_o979) + Call(ParentColliderToModel, COLLIDER_o980, MODEL_o980) + Call(ParentColliderToModel, COLLIDER_o981, MODEL_o981) + Call(ParentColliderToModel, COLLIDER_o982, MODEL_o982) + Call(ParentColliderToModel, COLLIDER_o983, MODEL_o983) + Call(ParentColliderToModel, COLLIDER_o984, MODEL_o984) + Call(ParentColliderToModel, COLLIDER_o985, MODEL_o985) + Call(ParentColliderToModel, COLLIDER_o992, MODEL_o992) + Call(ParentColliderToModel, COLLIDER_o993, MODEL_o993) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; diff --git a/src/world/area_iwa/iwa_04/iwa_04_3_entity.c b/src/world/area_iwa/iwa_04/iwa_04_3_entity.c index a7eb660e7a9..3d19ad1103b 100644 --- a/src/world/area_iwa/iwa_04/iwa_04_3_entity.c +++ b/src/world/area_iwa/iwa_04/iwa_04_3_entity.c @@ -18,47 +18,47 @@ API_CALLABLE(N(MonitorPlayerAltitude)) { } EvtScript N(TetherCameraToPlayer) = { - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_UseSpring) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAUNCH) - EVT_WAIT(1) - EVT_EXEC_GET_TID(N(TetherCameraToPlayer), LVarA) - EVT_IF_EQ(MV_PlayerCliffLevel, 0) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.4)) - EVT_CALL(PlayerJump, -560, -250, 190, 15) - EVT_ELSE - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7)) - EVT_CALL(PlayerJump, -560, 0, 90, 40) - EVT_END_IF - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAUNCH) + Wait(1) + ExecGetTID(N(TetherCameraToPlayer), LVarA) + IfEq(MV_PlayerCliffLevel, 0) + Call(SetPlayerJumpscale, Float(1.4)) + Call(PlayerJump, -560, -250, 190, 15) + Else + Call(SetPlayerJumpscale, Float(0.7)) + Call(PlayerJump, -560, 0, 90, 40) + EndIf + KillThread(LVarA) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_THREAD - EVT_CALL(N(MonitorPlayerAltitude)) - EVT_END_THREAD - EVT_CALL(MakeEntity, EVT_PTR(Entity_ScriptSpring), -561, -250, 121, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_UseSpring))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_ArrowSign), -513, 0, -97, 0, 90, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_ArrowSign), 600, 0, 200, 0, 270, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_ArrowSign), 336, -140, 203, 0, 70, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_ArrowSign), 730, -250, -95, 0, 90, MAKE_ENTITY_END) - EVT_CALL(MakeItemEntity, ITEM_LETTER_CHAIN_GOOMPAPA_1, -275, -250, 150, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA04_Item_Letter10) - EVT_RETURN - EVT_END + Thread + Call(N(MonitorPlayerAltitude)) + EndThread + Call(MakeEntity, Ref(Entity_ScriptSpring), -561, -250, 121, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_UseSpring))) + Call(MakeEntity, Ref(Entity_ArrowSign), -513, 0, -97, 0, 90, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_ArrowSign), 600, 0, 200, 0, 270, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_ArrowSign), 336, -140, 203, 0, 70, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_ArrowSign), 730, -250, -95, 0, 90, MAKE_ENTITY_END) + Call(MakeItemEntity, ITEM_LETTER_CHAIN_GOOMPAPA_1, -275, -250, 150, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_IWA04_Item_Letter10) + Return + End }; diff --git a/src/world/area_iwa/iwa_04/iwa_04_4_npc.c b/src/world/area_iwa/iwa_04/iwa_04_4_npc.c index 8cb5229b045..70537ffed87 100644 --- a/src/world/area_iwa/iwa_04/iwa_04_4_npc.c +++ b/src/world/area_iwa/iwa_04/iwa_04_4_npc.c @@ -16,257 +16,257 @@ API_CALLABLE(N(func_8024107C_91C95C)) { } EvtScript N(EVS_FlapWingSounds) = { - EVT_LOOP(0) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_BUZZAR_FLAP, SOUND_SPACE_DEFAULT) - EVT_WAIT(16) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_BUZZAR_FLAP, SOUND_SPACE_DEFAULT) + Wait(16) + EndLoop + Return + End }; EvtScript N(EVS_MonitorFlyingAnimation) = { - EVT_LOOP(0) - EVT_LOOP(0) - EVT_CALL(GetNpcAnimation, NPC_SELF, LVar0) - EVT_IF_EQ(LVar0, ANIM_Buzzar_Anim02) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_EXEC_GET_TID(N(EVS_FlapWingSounds), LVarA) - EVT_LOOP(0) - EVT_CALL(GetNpcAnimation, NPC_SELF, LVar0) - EVT_IF_NE(LVar0, ANIM_Buzzar_Anim02) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_KILL_THREAD(LVarA) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Loop(0) + Call(GetNpcAnimation, NPC_SELF, LVar0) + IfEq(LVar0, ANIM_Buzzar_Anim02) + BreakLoop + EndIf + Wait(1) + EndLoop + ExecGetTID(N(EVS_FlapWingSounds), LVarA) + Loop(0) + Call(GetNpcAnimation, NPC_SELF, LVar0) + IfNe(LVar0, ANIM_Buzzar_Anim02) + BreakLoop + EndIf + Wait(1) + EndLoop + KillThread(LVarA) + EndLoop + Return + End }; EvtScript N(EVS_NpcAuxAI_Buzzar) = { - EVT_IF_EQ(GF_IWA04_Defeated_Buzzar, TRUE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_ELSE - EVT_EXEC(N(EVS_MonitorFlyingAnimation)) - EVT_CALL(SetNpcPos, NPC_SELF, 10, 96, -347) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_IWA04_Defeated_Buzzar, TRUE) + Call(RemoveNpc, NPC_SELF) + Else + Exec(N(EVS_MonitorFlyingAnimation)) + Call(SetNpcPos, NPC_SELF, 10, 96, -347) + Call(EnableNpcShadow, NPC_SELF, FALSE) + EndIf + Return + End }; EvtScript N(EVS_NpcAI_Buzzar) = { - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Buzzar, LVar3, LVar4, LVar5) - EVT_IF_LT(LVar0, LVar3) - EVT_CALL(InterpNpcYaw, NPC_Buzzar, 270, 0) - EVT_ELSE - EVT_CALL(InterpNpcYaw, NPC_Buzzar, 90, 0) - EVT_END_IF - EVT_IF_GE(LVar0, 400) - EVT_IF_LT(LVar0, 450) - EVT_IF_LT(LVar2, 100) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetMusicTrack, 0, SONG_MINIBOSS_BATTLE, 0, 8) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(InterruptUsePartner) - EVT_WAIT(5 * DT) - EVT_END_IF - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH2_0030, 160, 40) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetAngleToPlayer, NPC_SELF, LVarA) - EVT_WAIT(4 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 430, 0, -25) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 30, 180, -600) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(100.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Buzzar_Anim05, ANIM_Buzzar_Anim05, 5, MSG_CH2_0031) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Buzzar_Anim02) - EVT_CALL(GetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) - EVT_SET(LVar5, LVar3) - EVT_ADD(LVar5, 150) - EVT_CALL(MakeLerp, LVar3, LVar5, 15 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, NPC_SELF, LVar2, LVar0, LVar4) - EVT_WAIT(5) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPlayerPos, 430, 0, -25) - EVT_CALL(func_802CF56C, 2) - EVT_CALL(SetNpcPos, NPC_SELF, 538, 200, -25) - EVT_CALL(EnableNpcShadow, NPC_SELF, TRUE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 100, -100) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 600) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 500) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, EVT_FLOAT(0.5), 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(func_802CF56C, 2) - EVT_END_THREAD - EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) - EVT_SET(LVar5, LVar3) - EVT_SUB(LVar5, 150) - EVT_CALL(MakeLerp, LVar3, LVar5, 15 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, NPC_SELF, LVar2, LVar0, LVar4) - EVT_WAIT(5) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_Buzzar, ANIM_Buzzar_Anim01) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Buzzar, ANIM_Buzzar_Anim07) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Buzzar, ANIM_Buzzar_Anim08) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Buzzar, ANIM_Buzzar_Anim09) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Buzzar, ANIM_Buzzar_Anim0A) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Buzzar, ANIM_Buzzar_Anim01) - EVT_WAIT(30 * DT) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, 0, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 275) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Buzzar_Anim03, ANIM_Buzzar_Anim01, 0, MSG_CH2_0032) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(90.0), 50, 350, EVT_FLOAT(15.0), EVT_FLOAT(-12.0)) - EVT_CALL(ShowChoice, MSG_Choice_0017) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Buzzar_Anim03, ANIM_Buzzar_Anim01, 0) - EVT_SET(LVarA, LVar0) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(0) - EVT_SET(LVarB, MSG_CH2_0033) - EVT_SET(LVarC, ANIM_Buzzar_Anim04) - EVT_CASE_EQ(1) - EVT_SET(LVarB, MSG_CH2_0034) - EVT_SET(LVarC, ANIM_Buzzar_Anim03) - EVT_CASE_EQ(2) - EVT_SET(LVarB, MSG_CH2_0035) - EVT_SET(LVarC, ANIM_Buzzar_Anim04) - EVT_END_SWITCH - EVT_WAIT(10 * DT) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, 0, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 275) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, LVarC, ANIM_Buzzar_Anim01, 0, LVarB) - EVT_IF_EQ(LVarA, 1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Buzzar_Anim06) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Buzzar_Anim02) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) - EVT_SET(LVar5, LVar3) - EVT_ADD(LVar5, 150) - EVT_CALL(MakeLerp, LVar3, LVar5, 15 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, NPC_SELF, LVar2, LVar0, LVar4) - EVT_WAIT(5) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_SELF, 10, 96, -347) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Buzzar_Anim05) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ELSE - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_WAIT(5 * DT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_END_IF - EVT_RETURN - EVT_END + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Buzzar, LVar3, LVar4, LVar5) + IfLt(LVar0, LVar3) + Call(InterpNpcYaw, NPC_Buzzar, 270, 0) + Else + Call(InterpNpcYaw, NPC_Buzzar, 90, 0) + EndIf + IfGe(LVar0, 400) + IfLt(LVar0, 450) + IfLt(LVar2, 100) + BreakLoop + EndIf + EndIf + EndIf + Wait(1) + EndLoop + Call(SetMusicTrack, 0, SONG_MINIBOSS_BATTLE, 0, 8) + Call(DisablePlayerInput, TRUE) + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, 0) + Call(InterruptUsePartner) + Wait(5 * DT) + EndIf + Call(NpcFacePlayer, NPC_SELF, 0) + Call(ShowMessageAtScreenPos, MSG_CH2_0030, 160, 40) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 15) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(GetAngleToPlayer, NPC_SELF, LVarA) + Wait(4 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, 430, 0, -25) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(SetPanTarget, CAM_DEFAULT, 30, 180, -600) + Call(SetCamDistance, CAM_DEFAULT, Float(100.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Buzzar_Anim05, ANIM_Buzzar_Anim05, 5, MSG_CH2_0031) + Call(SetNpcAnimation, NPC_SELF, ANIM_Buzzar_Anim02) + Call(GetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) + Set(LVar5, LVar3) + Add(LVar5, 150) + Call(MakeLerp, LVar3, LVar5, 15 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcPos, NPC_SELF, LVar2, LVar0, LVar4) + Wait(5) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetPlayerPos, 430, 0, -25) + Call(func_802CF56C, 2) + Call(SetNpcPos, NPC_SELF, 538, 200, -25) + Call(EnableNpcShadow, NPC_SELF, TRUE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamPosA, CAM_DEFAULT, 0, 0) + Call(SetCamPosB, CAM_DEFAULT, 100, -100) + Call(SetCamDistance, CAM_DEFAULT, 600) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 500) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, Float(0.5), 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(func_802CF56C, 2) + EndThread + Call(PlayerFaceNpc, NPC_SELF, FALSE) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Call(NpcFacePlayer, NPC_SELF, 0) + Call(GetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) + Set(LVar5, LVar3) + Sub(LVar5, 150) + Call(MakeLerp, LVar3, LVar5, 15 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcPos, NPC_SELF, LVar2, LVar0, LVar4) + Wait(5) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcAnimation, NPC_Buzzar, ANIM_Buzzar_Anim01) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Buzzar, ANIM_Buzzar_Anim07) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Buzzar, ANIM_Buzzar_Anim08) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Buzzar, ANIM_Buzzar_Anim09) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Buzzar, ANIM_Buzzar_Anim0A) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Buzzar, ANIM_Buzzar_Anim01) + Wait(30 * DT) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, 0, LVar2) + Add(LVar1, 20) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 275) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_Buzzar_Anim03, ANIM_Buzzar_Anim01, 0, MSG_CH2_0032) + Call(AdjustCam, CAM_DEFAULT, Float(90.0), 50, 350, Float(15.0), Float(-12.0)) + Call(ShowChoice, MSG_Choice_0017) + Call(EndSpeech, NPC_SELF, ANIM_Buzzar_Anim03, ANIM_Buzzar_Anim01, 0) + Set(LVarA, LVar0) + Switch(LVarA) + CaseEq(0) + Set(LVarB, MSG_CH2_0033) + Set(LVarC, ANIM_Buzzar_Anim04) + CaseEq(1) + Set(LVarB, MSG_CH2_0034) + Set(LVarC, ANIM_Buzzar_Anim03) + CaseEq(2) + Set(LVarB, MSG_CH2_0035) + Set(LVarC, ANIM_Buzzar_Anim04) + EndSwitch + Wait(10 * DT) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, 0, LVar2) + Add(LVar1, 20) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 275) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_SELF, LVarC, ANIM_Buzzar_Anim01, 0, LVarB) + IfEq(LVarA, 1) + Exec(N(EVS_SetupMusic)) + Call(SetNpcAnimation, NPC_SELF, ANIM_Buzzar_Anim06) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_Buzzar_Anim02) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(GetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) + Set(LVar5, LVar3) + Add(LVar5, 150) + Call(MakeLerp, LVar3, LVar5, 15 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcPos, NPC_SELF, LVar2, LVar0, LVar4) + Wait(5) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcPos, NPC_SELF, 10, 96, -347) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Buzzar_Anim05) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(DisablePlayerInput, FALSE) + Else + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Wait(5 * DT) + Call(DisablePlayerInput, FALSE) + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + EndIf + Return + End }; EvtScript N(EVS_NpcDefeat_Buzzar) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_SET(GF_IWA04_Defeated_Buzzar, TRUE) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(SetNpcPos, NPC_SELF, 530, 15, -20) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Buzzar_Anim0B) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(90.0), 50, 350, EVT_FLOAT(15.0), EVT_FLOAT(-12.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH2_0036) - EVT_THREAD - EVT_CALL(GetNpcYaw, NPC_SELF, LVar0) - EVT_LOOP(55) - EVT_ADD(LVar0, 30) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.75)) - EVT_CALL(NpcJump1, NPC_SELF, 400, -200, -300, 60 * DT) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(2.5 / DT)) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Set(GF_IWA04_Defeated_Buzzar, TRUE) + Exec(N(EVS_SetupMusic)) + Call(SetNpcPos, NPC_SELF, 530, 15, -20) + Call(SetNpcAnimation, NPC_SELF, ANIM_Buzzar_Anim0B) + Call(AdjustCam, CAM_DEFAULT, Float(90.0), 50, 350, Float(15.0), Float(-12.0)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH2_0036) + Thread + Call(GetNpcYaw, NPC_SELF, LVar0) + Loop(55) + Add(LVar0, 30) + Call(SetNpcRotation, NPC_SELF, 0, LVar0, 0) + Wait(1) + EndLoop + EndThread + Call(SetNpcJumpscale, NPC_SELF, Float(0.75)) + Call(NpcJump1, NPC_SELF, 400, -200, -300, 60 * DT) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(ResetCam, CAM_DEFAULT, Float(2.5 / DT)) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; NpcSettings N(NpcSettings_Buzzar) = { diff --git a/src/world/area_iwa/iwa_10/iwa_10_1_music.c b/src/world/area_iwa/iwa_10/iwa_10_1_music.c index f0d1d32815c..8c62046ddf1 100644 --- a/src/world/area_iwa/iwa_10/iwa_10_1_music.c +++ b/src/world/area_iwa/iwa_10/iwa_10_1_music.c @@ -1,23 +1,23 @@ #include "iwa_10.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_MT_RUGGED, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_MT_RUGGED, 0, 8) + Return + End }; EvtScript N(EVS_PushSong) = { - EVT_CALL(StopSound, SOUND_LOOP_IWA10_FLOW1) - EVT_CALL(PushSong, SONG_NEW_PARTNER, 0) - EVT_RETURN - EVT_END + Call(StopSound, SOUND_LOOP_IWA10_FLOW1) + Call(PushSong, SONG_NEW_PARTNER, 0) + Return + End }; EvtScript N(EVS_PopSong) = { - EVT_CALL(FadeOutMusic, 0, 500) - EVT_WAIT(15) - EVT_CALL(PopSong) - EVT_CALL(PlaySoundAtF, SOUND_LOOP_IWA10_FLOW1, SOUND_SPACE_WITH_DEPTH, -560, 0, -233) - EVT_RETURN - EVT_END + Call(FadeOutMusic, 0, 500) + Wait(15) + Call(PopSong) + Call(PlaySoundAtF, SOUND_LOOP_IWA10_FLOW1, SOUND_SPACE_WITH_DEPTH, -560, 0, -233) + Return + End }; diff --git a/src/world/area_iwa/iwa_10/iwa_10_2_main.c b/src/world/area_iwa/iwa_10/iwa_10_2_main.c index e5755f8ff54..ca5cd0e91dd 100644 --- a/src/world/area_iwa/iwa_10/iwa_10_2_main.c +++ b/src/world/area_iwa/iwa_10/iwa_10_2_main.c @@ -3,28 +3,28 @@ EvtScript N(EVS_ExitWalk_iwa_00_0) = EVT_EXIT_WALK(60, iwa_10_ENTRY_1, "iwa_00", iwa_00_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_iwa_00_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_iwa_00_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, iwa_10_ENTRY_1) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_ELSE - EVT_EXEC(N(EVS_ArriveFromToadTown)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(GetEntryID, LVar0) + IfEq(LVar0, iwa_10_ENTRY_1) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Else + Exec(N(EVS_ArriveFromToadTown)) + Exec(N(EVS_BindExitTriggers)) + EndIf + Return + End }; API_CALLABLE(N(GetClockHandAngles)) { @@ -37,48 +37,48 @@ API_CALLABLE(N(GetClockHandAngles)) { } EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_RUGGED) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() + Set(GB_WorldLocation, LOCATION_MT_RUGGED) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() #if VERSION_PAL - EVT_CALL(GetLanguage, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_o110, LVar0) + Call(GetLanguage, LVar0) + Call(SetModelTexVariant, MODEL_o110, LVar0) #endif - EVT_SET(GF_MAP_MtRugged, TRUE) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(ClearDefeatedEnemies) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_InitializeTrainScene)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_CALL(PlaySoundAtF, SOUND_LOOP_IWA10_FLOW1, SOUND_SPACE_WITH_DEPTH, -560, 0, -233) - EVT_THREAD - EVT_SET(LVarF, 0) - EVT_LABEL(10) - EVT_ADD(LVarF, 1) - EVT_CALL(N(GetClockHandAngles)) - EVT_CALL(RotateModel, MODEL_o148, LVar0, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o147, LVar1, 0, 0, -1) - EVT_WAIT(10) - EVT_GOTO(10) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetTexPanner, MODEL_o256, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_o266, TEX_PANNER_2) - EVT_CALL(EnableTexPanning, MODEL_o256, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o266, TRUE) - EVT_SET(LVar0, 0) - EVT_LABEL(20) - EVT_SUB(LVar0, 3000) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, 0, LVar0) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_END_THREAD - EVT_IF_LT(GB_StoryProgress, STORY_CH2_SPOKE_WITH_PARAKARRY) - EVT_EXEC(N(EVS_Scene_MeetParakarry)) - EVT_END_IF - EVT_RETURN - EVT_END + Set(GF_MAP_MtRugged, TRUE) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Call(ClearDefeatedEnemies) + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_InitializeTrainScene)) + Exec(N(EVS_EnterMap)) + Wait(1) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_SetupFoliage)) + Call(PlaySoundAtF, SOUND_LOOP_IWA10_FLOW1, SOUND_SPACE_WITH_DEPTH, -560, 0, -233) + Thread + Set(LVarF, 0) + Label(10) + Add(LVarF, 1) + Call(N(GetClockHandAngles)) + Call(RotateModel, MODEL_o148, LVar0, 0, 0, -1) + Call(RotateModel, MODEL_o147, LVar1, 0, 0, -1) + Wait(10) + Goto(10) + EndThread + Thread + Call(SetTexPanner, MODEL_o256, TEX_PANNER_2) + Call(SetTexPanner, MODEL_o266, TEX_PANNER_2) + Call(EnableTexPanning, MODEL_o256, TRUE) + Call(EnableTexPanning, MODEL_o266, TRUE) + Set(LVar0, 0) + Label(20) + Sub(LVar0, 3000) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, 0, LVar0) + Wait(1) + Goto(20) + EndThread + IfLt(GB_StoryProgress, STORY_CH2_SPOKE_WITH_PARAKARRY) + Exec(N(EVS_Scene_MeetParakarry)) + EndIf + Return + End }; diff --git a/src/world/area_iwa/iwa_10/iwa_10_3_npc.c b/src/world/area_iwa/iwa_10/iwa_10_3_npc.c index 0cf5f22bc1f..12d55d3ed81 100644 --- a/src/world/area_iwa/iwa_10/iwa_10_3_npc.c +++ b/src/world/area_iwa/iwa_10/iwa_10_3_npc.c @@ -7,119 +7,119 @@ #include "world/common/complete/GiveReward.inc.c" EvtScript N(EVS_NpcInteract_TrainToad_01) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, iwa_10_ENTRY_0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_White_Talk, ANIM_TrainToad_White_Idle, 0, MSG_CH2_0001) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_White_Talk, ANIM_TrainToad_White_Idle, 0, MSG_CH2_0002) - EVT_CALL(ShowChoice, MSG_Choice_000C) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_TrainToad_White_Talk, ANIM_TrainToad_White_Idle, 0) - EVT_IF_EQ(LVar0, 0) - EVT_EXEC(N(EVS_DepartForToadTown)) - EVT_ELSE - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, iwa_10_ENTRY_0) + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_White_Talk, ANIM_TrainToad_White_Idle, 0, MSG_CH2_0001) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_White_Talk, ANIM_TrainToad_White_Idle, 0, MSG_CH2_0002) + Call(ShowChoice, MSG_Choice_000C) + Call(EndSpeech, NPC_SELF, ANIM_TrainToad_White_Talk, ANIM_TrainToad_White_Idle, 0) + IfEq(LVar0, 0) + Exec(N(EVS_DepartForToadTown)) + Else + EndIf + EndIf + Return + End }; EvtScript N(EVS_NpcInit_TrainToad_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_TrainToad_01))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_TrainToad_01))) + Return + End }; EvtScript N(EVS_NpcInit_TrainToad_02) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, iwa_10_ENTRY_0) - EVT_CALL(SetNpcPos, NPC_SELF, -425, 70, -20) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, -425, 70, -20) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(GetEntryID, LVar0) + IfEq(LVar0, iwa_10_ENTRY_0) + Call(SetNpcPos, NPC_SELF, -425, 70, -20) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Else + Call(SetNpcPos, NPC_SELF, -425, 70, -20) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Toad) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH2_0004) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH2_0004) + Return + End }; EvtScript N(EVS_NpcInit_Toad) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad))) - EVT_IF_GE(GB_StoryProgress, STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad))) + IfGe(GB_StoryProgress, STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Toadette_02) = { - EVT_CALL(SpeakToPlayer, NPC_Toadette_02, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 0, MSG_CH2_000B) - EVT_CALL(SpeakToPlayer, NPC_Toadette_03, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 0, MSG_CH2_000C) - EVT_CALL(SpeakToPlayer, NPC_Toadette_04, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 0, MSG_CH2_000D) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_Toadette_02, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 0, MSG_CH2_000B) + Call(SpeakToPlayer, NPC_Toadette_03, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 0, MSG_CH2_000C) + Call(SpeakToPlayer, NPC_Toadette_04, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 0, MSG_CH2_000D) + Return + End }; EvtScript N(EVS_NpcInit_Toadette_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toadette_02))) - EVT_IF_LT(GB_StoryProgress, STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toadette_02))) + IfLt(GB_StoryProgress, STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + IfGe(GB_StoryProgress, STORY_CH2_STAR_SPRIT_DEPARTED) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Dryite) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(AF_IWA_SpokeWIthDryite, FALSE) - EVT_SET(LVar0, MSG_CH2_0005) - EVT_SET(AF_IWA_SpokeWIthDryite, TRUE) - EVT_ELSE - EVT_SET(LVar0, MSG_CH2_0006) - EVT_SET(AF_IWA_SpokeWIthDryite, TRUE) - EVT_END_IF - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_CH2_0007) - EVT_CASE_DEFAULT - EVT_SET(LVar0, MSG_CH2_0008) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(AF_IWA_SpokeWIthDryite, FALSE) + Set(LVar0, MSG_CH2_0005) + Set(AF_IWA_SpokeWIthDryite, TRUE) + Else + Set(LVar0, MSG_CH2_0006) + Set(AF_IWA_SpokeWIthDryite, TRUE) + EndIf + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_CH2_0007) + CaseDefault + Set(LVar0, MSG_CH2_0008) + EndSwitch + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_Dryite) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Dryite))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Dryite))) + Return + End }; EvtScript N(EVS_NpcInteract_Toadette_01) = { - EVT_IF_LT(GB_IWA00_Whacka_HitCount, 8) - EVT_SET(LVar0, MSG_CH2_0009) - EVT_ELSE - EVT_SET(LVar0, MSG_CH2_000A) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toadette_Green_Talk, ANIM_Toadette_Green_Idle, 0, LVar0) - EVT_RETURN - EVT_END + IfLt(GB_IWA00_Whacka_HitCount, 8) + Set(LVar0, MSG_CH2_0009) + Else + Set(LVar0, MSG_CH2_000A) + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_Toadette_Green_Talk, ANIM_Toadette_Green_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_Toadette_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toadette_01))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toadette_01))) + Return + End }; NpcData N(NpcData_TrainToad)[] = { diff --git a/src/world/area_iwa/iwa_10/iwa_10_4_train.c b/src/world/area_iwa/iwa_10/iwa_10_4_train.c index 4e80aa9f28e..2f76830ef6a 100644 --- a/src/world/area_iwa/iwa_10/iwa_10_4_train.c +++ b/src/world/area_iwa/iwa_10/iwa_10_4_train.c @@ -3,557 +3,557 @@ #include "common/CosInterpMinMax.inc.c" EvtScript N(EVS_SpawnSmoke) = { - EVT_CALL(PlaySoundAtModel, MODEL_07, SOUND_SEQ_TRAIN_CHUG, SOUND_SPACE_DEFAULT) - EVT_SETF(LVar0, MV_TrainMoveDist) - EVT_IF_EQ(MF_TrainReverseDir, FALSE) - EVT_ADDF(LVar0, -310) - EVT_ELSE - EVT_ADDF(LVar0, -450) - EVT_END_IF - EVT_SETF(LVar1, 140) - EVT_SETF(LVar2, 0) - EVT_SETF(LVar3, EVT_FLOAT(1.0)) - EVT_SETF(LVar4, EVT_FLOAT(3.0)) - EVT_ADD(LVarB, CLONED_MODEL(0)) - EVT_CALL(EnableModel, LVarB, TRUE) - EVT_LOOP(20) - EVT_CALL(TranslateModel, LVarB, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, LVarB, LVar3, LVar3, 1) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar3, EVT_FLOAT(0.046)) - EVT_MULF(LVar4, EVT_FLOAT(0.906)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EnableModel, LVarB, FALSE) - EVT_RETURN - EVT_END + Call(PlaySoundAtModel, MODEL_07, SOUND_SEQ_TRAIN_CHUG, SOUND_SPACE_DEFAULT) + SetF(LVar0, MV_TrainMoveDist) + IfEq(MF_TrainReverseDir, FALSE) + AddF(LVar0, -310) + Else + AddF(LVar0, -450) + EndIf + SetF(LVar1, 140) + SetF(LVar2, 0) + SetF(LVar3, Float(1.0)) + SetF(LVar4, Float(3.0)) + Add(LVarB, CLONED_MODEL(0)) + Call(EnableModel, LVarB, TRUE) + Loop(20) + Call(TranslateModel, LVarB, LVar0, LVar1, LVar2) + Call(ScaleModel, LVarB, LVar3, LVar3, 1) + AddF(LVar1, LVar4) + AddF(LVar3, Float(0.046)) + MulF(LVar4, Float(0.906)) + Wait(1) + EndLoop + Call(EnableModel, LVarB, FALSE) + Return + End }; EvtScript N(EVS_OpenCrossingGates) = { - EVT_CALL(MakeLerp, 0, 105, 30, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_fumi1, LVar0, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_fumi2, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tt4, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Call(MakeLerp, 0, 105, 30, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_fumi1, LVar0, 0, 1, 0) + Call(RotateGroup, MODEL_fumi2, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt2, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tt4, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_CloseCrossingGates) = { - EVT_CALL(MakeLerp, 105, 0, 30, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_fumi1, LVar0, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_fumi2, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tt2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt4, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Call(MakeLerp, 105, 0, 30, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_fumi1, LVar0, 0, 1, 0) + Call(RotateGroup, MODEL_fumi2, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tt2, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt4, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_AnimateTrain) = { - EVT_LABEL(0) - EVT_SET(LVar0, MV_TrainMoveDist) - EVT_CALL(TranslateModel, MODEL_08, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_07, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_10, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_11, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_12, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_13, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_09, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_01, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_02, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_03, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_04, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_05, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_06, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_ura, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_omote, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_ura2, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_omote2, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_14, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_15, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_16, LVar0, 0, 0) - EVT_IF_EQ(MF_TrainReverseDir, TRUE) - EVT_SET(LVar0, 180) - EVT_CALL(TranslateModel, MODEL_08, -69, -50, 0) - EVT_CALL(TranslateModel, MODEL_07, -69, -50, 0) - EVT_CALL(TranslateModel, MODEL_10, 75, 25, 2) - EVT_CALL(TranslateModel, MODEL_11, 30, 30, 2) - EVT_CALL(TranslateModel, MODEL_12, -10, 30, 2) - EVT_CALL(TranslateModel, MODEL_13, -50, 30, 2) - EVT_CALL(TranslateModel, MODEL_09, -1, -58, 0) - EVT_CALL(TranslateModel, MODEL_ura, 82, -19, -35) - EVT_CALL(TranslateModel, MODEL_omote, 82, -19, -35) - EVT_CALL(TranslateModel, MODEL_ura2, 82, -19, 35) - EVT_CALL(TranslateModel, MODEL_omote2, 82, -19, 35) - EVT_CALL(TranslateModel, MODEL_14, -21, 30, 0) - EVT_CALL(TranslateModel, MODEL_15, -25, 30, 0) - EVT_CALL(TranslateModel, MODEL_16, -63, 15, 0) - EVT_CALL(RotateModel, MODEL_08, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_07, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_10, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_11, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_12, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_13, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_09, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_01, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_02, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_03, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_04, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_05, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_06, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_ura, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_omote, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_ura2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_omote2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_14, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_15, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_16, LVar0, 0, 1, 0) - EVT_CALL(TranslateModel, MODEL_08, 69, 50, 0) - EVT_CALL(TranslateModel, MODEL_07, 69, 50, 0) - EVT_CALL(TranslateModel, MODEL_10, -75, -25, -2) - EVT_CALL(TranslateModel, MODEL_11, -30, -30, -2) - EVT_CALL(TranslateModel, MODEL_12, 10, -30, -2) - EVT_CALL(TranslateModel, MODEL_13, 50, -30, -2) - EVT_CALL(TranslateModel, MODEL_09, 1, 58, 0) - EVT_CALL(TranslateModel, MODEL_ura, -82, 19, 35) - EVT_CALL(TranslateModel, MODEL_omote, -82, 19, 35) - EVT_CALL(TranslateModel, MODEL_ura2, -82, 19, -35) - EVT_CALL(TranslateModel, MODEL_omote2, -82, 19, -35) - EVT_CALL(TranslateModel, MODEL_14, 21, -30, 0) - EVT_CALL(TranslateModel, MODEL_15, 25, -30, 0) - EVT_CALL(TranslateModel, MODEL_16, 63, -15, 0) - EVT_END_IF - EVT_IF_EQ(MF_TrainReverseDir, FALSE) - EVT_SET(LVar2, MV_TrainMoveDist) - EVT_ELSE - EVT_SET(LVar2, 1000) - EVT_SUB(LVar2, MV_TrainMoveDist) - EVT_END_IF - EVT_SETF(LVar0, LVar2) - EVT_MULF(LVar0, EVT_FLOAT(-2.40625)) - EVT_CALL(RotateModel, MODEL_11, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_12, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_13, LVar0, 0, 0, 1) - EVT_MULF(LVar0, EVT_FLOAT(0.6)) - EVT_CALL(RotateModel, MODEL_10, LVar0, 0, 0, 1) - EVT_CALL(N(CosInterpMinMax), LVar2, LVar0, 0, -20, 75, 0, 0) - EVT_CALL(N(CosInterpMinMax), LVar2, LVar1, -10, 10, 75, 0, -90) - EVT_CALL(TranslateModel, MODEL_14, LVar0, LVar1, 0) - EVT_CALL(N(CosInterpMinMax), LVar2, LVar0, 0, -20, 75, 0, 0) - EVT_ADD(LVar0, 5) - EVT_CALL(TranslateModel, MODEL_16, LVar0, -14, 0) - EVT_CALL(N(CosInterpMinMax), LVar2, LVar0, 0, -20, 75, 0, 0) - EVT_CALL(N(CosInterpMinMax), LVar2, LVar1, -10, 10, 75, 0, -90) - EVT_CALL(TranslateModel, MODEL_15, LVar0, LVar1, 0) - EVT_CALL(N(CosInterpMinMax), LVar2, LVar0, -40, 40, 75, 0, 90) - EVT_CALL(RotateModel, MODEL_15, LVar0, 0, 0, 1) - EVT_CALL(N(CosInterpMinMax), LVarC, LVar0, -30, 30, 10, 0, 0) - EVT_CALL(RotateModel, MODEL_09, LVar0, 0, 0, 1) - EVT_IF_NE(MV_TrainMoveSpeed, 0) - EVT_IF_EQ(LVarD, 0) - EVT_THREAD - EVT_WAIT(18) - EVT_EXEC(N(EVS_SpawnSmoke)) - EVT_END_THREAD - EVT_END_IF - EVT_END_IF - EVT_IF_LE(LVarD, 20) - EVT_CALL(N(CosInterpMinMax), LVarD, LVar0, EVT_FLOAT(0.703), EVT_FLOAT(1.0), 10, 0, 180) - EVT_CALL(N(CosInterpMinMax), LVarD, LVar2, EVT_FLOAT(0.0), EVT_FLOAT(0.296), 10, 0, 180) - EVT_SETF(LVar1, EVT_FLOAT(0.296)) - EVT_SUBF(LVar1, LVar2) - EVT_ADDF(LVar1, EVT_FLOAT(1.0)) - EVT_CALL(ScaleModel, MODEL_07, LVar1, LVar0, LVar1) - EVT_CALL(ScaleModel, MODEL_08, LVar1, LVar0, LVar1) - EVT_ELSE - EVT_SETF(LVar0, EVT_FLOAT(1.0)) - EVT_SETF(LVar2, EVT_FLOAT(0.296)) - EVT_SETF(LVar1, EVT_FLOAT(0.296)) - EVT_SUBF(LVar1, LVar2) - EVT_ADDF(LVar1, EVT_FLOAT(1.0)) - EVT_CALL(ScaleModel, MODEL_07, LVar1, LVar0, LVar1) - EVT_CALL(ScaleModel, MODEL_08, LVar1, LVar0, LVar1) - EVT_END_IF - EVT_IF_EQ(MF_TrainArriveDoorOpen, TRUE) - EVT_CALL(PlaySoundAt, SOUND_TRAIN_DOOR_OPEN, SOUND_SPACE_DEFAULT, -435, 84, 37) - EVT_SET(LVar8, 10) - EVT_SET(LFlag1, TRUE) - EVT_SET(MF_TrainArriveDoorOpen, FALSE) - EVT_END_IF - EVT_IF_EQ(MF_TrainArrivePlayerDisembark, TRUE) - EVT_SET(LVar8, -10) - EVT_SET(LFlag1, TRUE) - EVT_SET(MF_TrainArrivePlayerDisembark, FALSE) - EVT_END_IF - EVT_IF_EQ(MF_TrainDepartDoorOpen, TRUE) - EVT_CALL(PlaySoundAt, SOUND_TRAIN_DOOR_OPEN, SOUND_SPACE_DEFAULT, -413, 84, 38) - EVT_SET(LVar8, 10) - EVT_SET(LFlag2, TRUE) - EVT_SET(MF_TrainDepartDoorOpen, FALSE) - EVT_END_IF - EVT_IF_EQ(MF_TrainDepartPlayerBoard, TRUE) - EVT_SET(LVar8, -10) - EVT_SET(LFlag2, TRUE) - EVT_SET(MF_TrainDepartPlayerBoard, FALSE) - EVT_END_IF - EVT_IF_EQ(LFlag1, TRUE) - EVT_ADD(LVar9, LVar8) - EVT_IF_GE(LVar9, 90) - EVT_SET(LVar9, 90) - EVT_SET(LFlag1, FALSE) - EVT_END_IF - EVT_IF_LE(LVar9, 0) - EVT_SET(LVar9, 0) - EVT_SET(LFlag1, FALSE) - EVT_CALL(PlaySoundAt, SOUND_TRAIN_DOOR_CLOSE, SOUND_SPACE_DEFAULT, -435, 84, 37) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LFlag2, TRUE) - EVT_ADD(LVarA, LVar8) - EVT_IF_GE(LVarA, 90) - EVT_SET(LVarA, 90) - EVT_SET(LFlag2, FALSE) - EVT_END_IF - EVT_IF_LE(LVarA, 0) - EVT_SET(LVarA, 0) - EVT_SET(LFlag2, FALSE) - EVT_CALL(PlaySoundAt, SOUND_TRAIN_DOOR_CLOSE, SOUND_SPACE_DEFAULT, -413, 84, 38) - EVT_END_IF - EVT_END_IF - EVT_CALL(RotateModel, MODEL_omote, LVar9, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_ura, LVar9, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_omote2, LVarA, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_ura2, LVarA, 0, 1, 0) - EVT_IF_EQ(MF_TrainMoving, TRUE) - EVT_IF_EQ(MF_TrainReverseDir, FALSE) - EVT_SET(LVar0, MV_TrainMoveDist) - EVT_ADD(LVar0, -425) - EVT_ADD(LVar1, 75) - EVT_ADD(LVar2, 20) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_ELSE - EVT_SET(LVar0, MV_TrainMoveDist) - EVT_ADD(LVar0, -335) - EVT_ADD(LVar1, 75) - EVT_ADD(LVar2, 20) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_END_IF - EVT_ADD(MV_TrainMoveDist, MV_TrainMoveSpeed) - EVT_SET(LVar0, MV_TrainMoveDist) - EVT_DIV(LVar0, 75) - EVT_IF_NE(LVar0, LVarE) - EVT_SET(LVarE, LVar0) - EVT_SET(LVarD, -1) - EVT_ADD(LVarB, 1) - EVT_IF_EQ(LVarB, 10) - EVT_SET(LVarB, 0) - EVT_END_IF - EVT_END_IF - EVT_ADDF(LVarD, 1) - EVT_IF_GT(LVarD, 1000) - EVT_SET(LVarD, 1000) - EVT_END_IF - EVT_ADDF(LVarC, 1) - EVT_IF_GT(LVarC, 1000) - EVT_SET(LVarC, 0) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Set(LVar0, MV_TrainMoveDist) + Call(TranslateModel, MODEL_08, LVar0, 0, 0) + Call(TranslateModel, MODEL_07, LVar0, 0, 0) + Call(TranslateModel, MODEL_10, LVar0, 0, 0) + Call(TranslateModel, MODEL_11, LVar0, 0, 0) + Call(TranslateModel, MODEL_12, LVar0, 0, 0) + Call(TranslateModel, MODEL_13, LVar0, 0, 0) + Call(TranslateModel, MODEL_09, LVar0, 0, 0) + Call(TranslateModel, MODEL_01, LVar0, 0, 0) + Call(TranslateModel, MODEL_02, LVar0, 0, 0) + Call(TranslateModel, MODEL_03, LVar0, 0, 0) + Call(TranslateModel, MODEL_04, LVar0, 0, 0) + Call(TranslateModel, MODEL_05, LVar0, 0, 0) + Call(TranslateModel, MODEL_06, LVar0, 0, 0) + Call(TranslateModel, MODEL_ura, LVar0, 0, 0) + Call(TranslateModel, MODEL_omote, LVar0, 0, 0) + Call(TranslateModel, MODEL_ura2, LVar0, 0, 0) + Call(TranslateModel, MODEL_omote2, LVar0, 0, 0) + Call(TranslateModel, MODEL_14, LVar0, 0, 0) + Call(TranslateModel, MODEL_15, LVar0, 0, 0) + Call(TranslateModel, MODEL_16, LVar0, 0, 0) + IfEq(MF_TrainReverseDir, TRUE) + Set(LVar0, 180) + Call(TranslateModel, MODEL_08, -69, -50, 0) + Call(TranslateModel, MODEL_07, -69, -50, 0) + Call(TranslateModel, MODEL_10, 75, 25, 2) + Call(TranslateModel, MODEL_11, 30, 30, 2) + Call(TranslateModel, MODEL_12, -10, 30, 2) + Call(TranslateModel, MODEL_13, -50, 30, 2) + Call(TranslateModel, MODEL_09, -1, -58, 0) + Call(TranslateModel, MODEL_ura, 82, -19, -35) + Call(TranslateModel, MODEL_omote, 82, -19, -35) + Call(TranslateModel, MODEL_ura2, 82, -19, 35) + Call(TranslateModel, MODEL_omote2, 82, -19, 35) + Call(TranslateModel, MODEL_14, -21, 30, 0) + Call(TranslateModel, MODEL_15, -25, 30, 0) + Call(TranslateModel, MODEL_16, -63, 15, 0) + Call(RotateModel, MODEL_08, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_07, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_10, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_11, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_12, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_13, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_09, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_01, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_02, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_03, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_04, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_05, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_06, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_ura, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_omote, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_ura2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_omote2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_14, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_15, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_16, LVar0, 0, 1, 0) + Call(TranslateModel, MODEL_08, 69, 50, 0) + Call(TranslateModel, MODEL_07, 69, 50, 0) + Call(TranslateModel, MODEL_10, -75, -25, -2) + Call(TranslateModel, MODEL_11, -30, -30, -2) + Call(TranslateModel, MODEL_12, 10, -30, -2) + Call(TranslateModel, MODEL_13, 50, -30, -2) + Call(TranslateModel, MODEL_09, 1, 58, 0) + Call(TranslateModel, MODEL_ura, -82, 19, 35) + Call(TranslateModel, MODEL_omote, -82, 19, 35) + Call(TranslateModel, MODEL_ura2, -82, 19, -35) + Call(TranslateModel, MODEL_omote2, -82, 19, -35) + Call(TranslateModel, MODEL_14, 21, -30, 0) + Call(TranslateModel, MODEL_15, 25, -30, 0) + Call(TranslateModel, MODEL_16, 63, -15, 0) + EndIf + IfEq(MF_TrainReverseDir, FALSE) + Set(LVar2, MV_TrainMoveDist) + Else + Set(LVar2, 1000) + Sub(LVar2, MV_TrainMoveDist) + EndIf + SetF(LVar0, LVar2) + MulF(LVar0, Float(-2.40625)) + Call(RotateModel, MODEL_11, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_12, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_13, LVar0, 0, 0, 1) + MulF(LVar0, Float(0.6)) + Call(RotateModel, MODEL_10, LVar0, 0, 0, 1) + Call(N(CosInterpMinMax), LVar2, LVar0, 0, -20, 75, 0, 0) + Call(N(CosInterpMinMax), LVar2, LVar1, -10, 10, 75, 0, -90) + Call(TranslateModel, MODEL_14, LVar0, LVar1, 0) + Call(N(CosInterpMinMax), LVar2, LVar0, 0, -20, 75, 0, 0) + Add(LVar0, 5) + Call(TranslateModel, MODEL_16, LVar0, -14, 0) + Call(N(CosInterpMinMax), LVar2, LVar0, 0, -20, 75, 0, 0) + Call(N(CosInterpMinMax), LVar2, LVar1, -10, 10, 75, 0, -90) + Call(TranslateModel, MODEL_15, LVar0, LVar1, 0) + Call(N(CosInterpMinMax), LVar2, LVar0, -40, 40, 75, 0, 90) + Call(RotateModel, MODEL_15, LVar0, 0, 0, 1) + Call(N(CosInterpMinMax), LVarC, LVar0, -30, 30, 10, 0, 0) + Call(RotateModel, MODEL_09, LVar0, 0, 0, 1) + IfNe(MV_TrainMoveSpeed, 0) + IfEq(LVarD, 0) + Thread + Wait(18) + Exec(N(EVS_SpawnSmoke)) + EndThread + EndIf + EndIf + IfLe(LVarD, 20) + Call(N(CosInterpMinMax), LVarD, LVar0, Float(0.703), Float(1.0), 10, 0, 180) + Call(N(CosInterpMinMax), LVarD, LVar2, Float(0.0), Float(0.296), 10, 0, 180) + SetF(LVar1, Float(0.296)) + SubF(LVar1, LVar2) + AddF(LVar1, Float(1.0)) + Call(ScaleModel, MODEL_07, LVar1, LVar0, LVar1) + Call(ScaleModel, MODEL_08, LVar1, LVar0, LVar1) + Else + SetF(LVar0, Float(1.0)) + SetF(LVar2, Float(0.296)) + SetF(LVar1, Float(0.296)) + SubF(LVar1, LVar2) + AddF(LVar1, Float(1.0)) + Call(ScaleModel, MODEL_07, LVar1, LVar0, LVar1) + Call(ScaleModel, MODEL_08, LVar1, LVar0, LVar1) + EndIf + IfEq(MF_TrainArriveDoorOpen, TRUE) + Call(PlaySoundAt, SOUND_TRAIN_DOOR_OPEN, SOUND_SPACE_DEFAULT, -435, 84, 37) + Set(LVar8, 10) + Set(LFlag1, TRUE) + Set(MF_TrainArriveDoorOpen, FALSE) + EndIf + IfEq(MF_TrainArrivePlayerDisembark, TRUE) + Set(LVar8, -10) + Set(LFlag1, TRUE) + Set(MF_TrainArrivePlayerDisembark, FALSE) + EndIf + IfEq(MF_TrainDepartDoorOpen, TRUE) + Call(PlaySoundAt, SOUND_TRAIN_DOOR_OPEN, SOUND_SPACE_DEFAULT, -413, 84, 38) + Set(LVar8, 10) + Set(LFlag2, TRUE) + Set(MF_TrainDepartDoorOpen, FALSE) + EndIf + IfEq(MF_TrainDepartPlayerBoard, TRUE) + Set(LVar8, -10) + Set(LFlag2, TRUE) + Set(MF_TrainDepartPlayerBoard, FALSE) + EndIf + IfEq(LFlag1, TRUE) + Add(LVar9, LVar8) + IfGe(LVar9, 90) + Set(LVar9, 90) + Set(LFlag1, FALSE) + EndIf + IfLe(LVar9, 0) + Set(LVar9, 0) + Set(LFlag1, FALSE) + Call(PlaySoundAt, SOUND_TRAIN_DOOR_CLOSE, SOUND_SPACE_DEFAULT, -435, 84, 37) + EndIf + EndIf + IfEq(LFlag2, TRUE) + Add(LVarA, LVar8) + IfGe(LVarA, 90) + Set(LVarA, 90) + Set(LFlag2, FALSE) + EndIf + IfLe(LVarA, 0) + Set(LVarA, 0) + Set(LFlag2, FALSE) + Call(PlaySoundAt, SOUND_TRAIN_DOOR_CLOSE, SOUND_SPACE_DEFAULT, -413, 84, 38) + EndIf + EndIf + Call(RotateModel, MODEL_omote, LVar9, 0, -1, 0) + Call(RotateModel, MODEL_ura, LVar9, 0, -1, 0) + Call(RotateModel, MODEL_omote2, LVarA, 0, 1, 0) + Call(RotateModel, MODEL_ura2, LVarA, 0, 1, 0) + IfEq(MF_TrainMoving, TRUE) + IfEq(MF_TrainReverseDir, FALSE) + Set(LVar0, MV_TrainMoveDist) + Add(LVar0, -425) + Add(LVar1, 75) + Add(LVar2, 20) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Else + Set(LVar0, MV_TrainMoveDist) + Add(LVar0, -335) + Add(LVar1, 75) + Add(LVar2, 20) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + EndIf + EndIf + Add(MV_TrainMoveDist, MV_TrainMoveSpeed) + Set(LVar0, MV_TrainMoveDist) + Div(LVar0, 75) + IfNe(LVar0, LVarE) + Set(LVarE, LVar0) + Set(LVarD, -1) + Add(LVarB, 1) + IfEq(LVarB, 10) + Set(LVarB, 0) + EndIf + EndIf + AddF(LVarD, 1) + IfGt(LVarD, 1000) + Set(LVarD, 1000) + EndIf + AddF(LVarC, 1) + IfGt(LVarC, 1000) + Set(LVarC, 0) + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_UpdatePassengerPos) = { - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar0, MV_TrainMoveDist) - EVT_IF_EQ(MF_TrainReverseDir, FALSE) - EVT_ADD(LVar0, -425) - EVT_ELSE - EVT_ADD(LVar0, -335) - EVT_END_IF - EVT_SET(LVar3, LVar0) - EVT_SET(LVar4, LVar1) - EVT_SET(LVar5, LVar2) - EVT_IF_EQ(MF_TrainReverseDir, FALSE) - EVT_ADD(LVar3, -57) - EVT_ELSE - EVT_ADD(LVar3, 57) - EVT_END_IF - EVT_ADD(LVar4, -31) - EVT_ADD(LVar5, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar3, LVar4, LVar5) - EVT_IF_EQ(MF_TrainReverseDir, FALSE) - EVT_ADD(LVar0, 0) - EVT_ELSE - EVT_ADD(LVar0, 0) - EVT_END_IF - EVT_ADD(LVar1, -6) - EVT_ADD(LVar2, -40) - EVT_CALL(SetNpcPos, NPC_TrainToad_02, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar0, MV_TrainMoveDist) + IfEq(MF_TrainReverseDir, FALSE) + Add(LVar0, -425) + Else + Add(LVar0, -335) + EndIf + Set(LVar3, LVar0) + Set(LVar4, LVar1) + Set(LVar5, LVar2) + IfEq(MF_TrainReverseDir, FALSE) + Add(LVar3, -57) + Else + Add(LVar3, 57) + EndIf + Add(LVar4, -31) + Add(LVar5, 0) + Call(SetNpcPos, NPC_PARTNER, LVar3, LVar4, LVar5) + IfEq(MF_TrainReverseDir, FALSE) + Add(LVar0, 0) + Else + Add(LVar0, 0) + EndIf + Add(LVar1, -6) + Add(LVar2, -40) + Call(SetNpcPos, NPC_TrainToad_02, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_FollowTrainCamera) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_EQ(MF_TrainReverseDir, FALSE) - EVT_IF_LT(LVar0, -1100) - EVT_SET(LVar0, -1100) - EVT_END_IF - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 30) - EVT_ADD(LVar2, 40) - EVT_ELSE - EVT_IF_LT(LVar0, -1100) - EVT_SET(LVar0, -1100) - EVT_END_IF - EVT_ADD(LVar0, -40) - EVT_SET(LVar1, 30) - EVT_ADD(LVar2, 40) - EVT_END_IF - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfEq(MF_TrainReverseDir, FALSE) + IfLt(LVar0, -1100) + Set(LVar0, -1100) + EndIf + Add(LVar0, 40) + Set(LVar1, 30) + Add(LVar2, 40) + Else + IfLt(LVar0, -1100) + Set(LVar0, -1100) + EndIf + Add(LVar0, -40) + Set(LVar1, 30) + Add(LVar2, 40) + EndIf + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_ArriveFromToadTown) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_CALL(EnableNpcShadow, NPC_PARTNER, FALSE) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitk, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o284, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt4, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o273, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC_GET_TID(N(EVS_FollowTrainCamera), LVar9) - EVT_EXEC_GET_TID(N(EVS_UpdatePassengerPos), LVarE) - EVT_SET(MF_TrainMoving, TRUE) - EVT_SET(MV_TrainMoveDist, -1200) - EVT_SET(MV_TrainMoveSpeed, 0) - EVT_SET(MF_TrainReverseDir, FALSE) - EVT_WAIT(60) - EVT_EXEC(N(EVS_CloseCrossingGates)) - EVT_SET(MV_TrainMoveDist, -1200) - EVT_SET(MV_TrainMoveSpeed, -10) - EVT_SET(MF_TrainReverseDir, FALSE) - EVT_LABEL(0) - EVT_SETF(MV_TrainMoveSpeed, 0) - EVT_SUBF(MV_TrainMoveSpeed, MV_TrainMoveDist) - EVT_ADDF(MV_TrainMoveSpeed, EVT_FLOAT(10.0)) - EVT_DIVF(MV_TrainMoveSpeed, EVT_FLOAT(10.0)) - EVT_IF_GT(MV_TrainMoveSpeed, 10) - EVT_SET(MV_TrainMoveSpeed, 10) - EVT_END_IF - EVT_IF_GE(MV_TrainMoveDist, 0) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_LABEL(1) - EVT_SET(MV_TrainMoveDist, 0) - EVT_SET(MV_TrainMoveSpeed, 0) - EVT_CALL(PlaySound, SOUND_TRAIN_RELEASE_STEAM) - EVT_KILL_THREAD(LVarE) - EVT_SET(MF_TrainMoving, FALSE) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_SET(LVar0, -425) - EVT_SET(LVar1, 45) - EVT_SET(LVar2, 20) - EVT_CALL(SetPlayerActionState, ACTION_STATE_JUMP) - EVT_CALL(PlayerJump, LVar0, LVar1, LVar2, 15) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(3.0)) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar0, -440) - EVT_SET(LVar1, 45) - EVT_SET(LVar2, 20) - EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_KILL_THREAD(LVar9) - EVT_CALL(EnableNpcShadow, NPC_PARTNER, TRUE) - EVT_CALL(HidePlayerShadow, FALSE) - EVT_SET(MF_TrainArriveDoorOpen, TRUE) - EVT_WAIT(20) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -420, 20, 97) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -420, 20, 97) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitk, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(SetPlayerActionState, ACTION_STATE_JUMP) - EVT_CALL(PlayerJump, -420, 20, 97, 15) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_PARTNER, -412, 20, 76, 15) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilitk, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_EXEC(N(EVS_OpenCrossingGates)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilitk, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o284, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tt4, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o273, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(MF_TrainArrivePlayerDisembark, TRUE) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_TrainToad_01, ANIM_TrainToad_White_Talk, ANIM_TrainToad_White_Idle, 0, MSG_CH2_0000) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(InterpPlayerYaw, 90, 0) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + Call(EnableNpcShadow, NPC_PARTNER, FALSE) + Call(HidePlayerShadow, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitk, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o284, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt4, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o273, COLLIDER_FLAGS_UPPER_MASK) + ExecGetTID(N(EVS_FollowTrainCamera), LVar9) + ExecGetTID(N(EVS_UpdatePassengerPos), LVarE) + Set(MF_TrainMoving, TRUE) + Set(MV_TrainMoveDist, -1200) + Set(MV_TrainMoveSpeed, 0) + Set(MF_TrainReverseDir, FALSE) + Wait(60) + Exec(N(EVS_CloseCrossingGates)) + Set(MV_TrainMoveDist, -1200) + Set(MV_TrainMoveSpeed, -10) + Set(MF_TrainReverseDir, FALSE) + Label(0) + SetF(MV_TrainMoveSpeed, 0) + SubF(MV_TrainMoveSpeed, MV_TrainMoveDist) + AddF(MV_TrainMoveSpeed, Float(10.0)) + DivF(MV_TrainMoveSpeed, Float(10.0)) + IfGt(MV_TrainMoveSpeed, 10) + Set(MV_TrainMoveSpeed, 10) + EndIf + IfGe(MV_TrainMoveDist, 0) + Goto(1) + EndIf + Wait(1) + Goto(0) + Label(1) + Set(MV_TrainMoveDist, 0) + Set(MV_TrainMoveSpeed, 0) + Call(PlaySound, SOUND_TRAIN_RELEASE_STEAM) + KillThread(LVarE) + Set(MF_TrainMoving, FALSE) + Call(SetPlayerJumpscale, Float(1.0)) + Set(LVar0, -425) + Set(LVar1, 45) + Set(LVar2, 20) + Call(SetPlayerActionState, ACTION_STATE_JUMP) + Call(PlayerJump, LVar0, LVar1, LVar2, 15) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcSpeed, NPC_PARTNER, Float(3.0)) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar0, -440) + Set(LVar1, 45) + Set(LVar2, 20) + Call(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + KillThread(LVar9) + Call(EnableNpcShadow, NPC_PARTNER, TRUE) + Call(HidePlayerShadow, FALSE) + Set(MF_TrainArriveDoorOpen, TRUE) + Wait(20) + Call(UseSettingsFrom, CAM_DEFAULT, -420, 20, 97) + Call(SetPanTarget, CAM_DEFAULT, -420, 20, 97) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitk, COLLIDER_FLAGS_UPPER_MASK) + Call(SetPlayerJumpscale, Float(1.0)) + Call(SetPlayerActionState, ACTION_STATE_JUMP) + Call(PlayerJump, -420, 20, 97, 15) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(SetNpcJumpscale, NPC_PARTNER, Float(1.0)) + Call(NpcJump0, NPC_PARTNER, -412, 20, 76, 15) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilitk, COLLIDER_FLAGS_UPPER_MASK) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(DisablePlayerPhysics, FALSE) + Call(EnablePartnerAI) + Exec(N(EVS_OpenCrossingGates)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilitk, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o284, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tt4, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o273, COLLIDER_FLAGS_UPPER_MASK) + Set(MF_TrainArrivePlayerDisembark, TRUE) + Wait(20) + Call(SpeakToPlayer, NPC_TrainToad_01, ANIM_TrainToad_White_Talk, ANIM_TrainToad_White_Idle, 0, MSG_CH2_0000) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_DepartForToadTown) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_SET(MV_TrainMoveDist, -90) - EVT_SET(MV_TrainMoveSpeed, 0) - EVT_SET(MF_TrainReverseDir, TRUE) - EVT_SET(MF_TrainDepartDoorOpen, TRUE) - EVT_WAIT(20) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitk, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o284, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt4, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o273, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, -425, 70, 0) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_SET(LVar0, -425) - EVT_SET(LVar1, 45) - EVT_SET(LVar2, 20) - EVT_CALL(SetPlayerActionState, ACTION_STATE_JUMP) - EVT_CALL(PlayerJump, LVar0, LVar1, LVar2, 15) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(3.0)) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) - EVT_CALL(NpcMoveTo, NPC_PARTNER, -425, 70, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(1.0)) - EVT_SET(LVar0, -425) - EVT_SET(LVar1, 45) - EVT_SET(LVar2, 20) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10) - EVT_SET(MF_TrainDepartPlayerBoard, TRUE) - EVT_WAIT(20) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, -50) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(EnableNpcShadow, NPC_PARTNER, FALSE) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_SET(LVar0, -425) - EVT_SET(LVar1, 75) - EVT_SET(LVar2, 20) - EVT_CALL(SetPlayerActionState, ACTION_STATE_JUMP) - EVT_CALL(PlayerJump, LVar0, LVar1, LVar2, 15) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_SET(MF_TrainMoving, TRUE) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(3.0)) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 57) - EVT_ADD(LVar1, -31) - EVT_ADD(LVar2, 0) - EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_EXEC(N(EVS_UpdatePassengerPos)) - EVT_EXEC(N(EVS_CloseCrossingGates)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -1000, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(245.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-538.5), EVT_FLOAT(-60.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(0.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_SUB(LVar0, 150) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_TrainToad_02, ANIM_TrainToad_Talk, ANIM_TrainToad_Still, 5, MSG_CH2_0003) - EVT_CALL(PlaySound, SOUND_TRAIN_DEPARTURE) - EVT_THREAD - EVT_LOOP(1000) - EVT_SUBF(MV_TrainMoveSpeed, EVT_FLOAT(0.031)) - EVT_IF_LT(MV_TrainMoveSpeed, -10) - EVT_SETF(MV_TrainMoveSpeed, EVT_FLOAT(-10.0)) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(90) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_EXEC_GET_TID(N(EVS_FollowTrainCamera), LVar9) - EVT_WAIT(130) - EVT_WAIT(100) - EVT_CALL(GotoMap, EVT_PTR("iwa_11"), iwa_11_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Set(MV_TrainMoveDist, -90) + Set(MV_TrainMoveSpeed, 0) + Set(MF_TrainReverseDir, TRUE) + Set(MF_TrainDepartDoorOpen, TRUE) + Wait(20) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitk, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o284, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt4, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o273, COLLIDER_FLAGS_UPPER_MASK) + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, -425, 70, 0) + Call(SetPlayerJumpscale, Float(1.0)) + Set(LVar0, -425) + Set(LVar1, 45) + Set(LVar2, 20) + Call(SetPlayerActionState, ACTION_STATE_JUMP) + Call(PlayerJump, LVar0, LVar1, LVar2, 15) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(SetNpcSpeed, NPC_PARTNER, Float(3.0)) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) + Call(NpcMoveTo, NPC_PARTNER, -425, 70, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(SetNpcJumpscale, NPC_PARTNER, Float(1.0)) + Set(LVar0, -425) + Set(LVar1, 45) + Set(LVar2, 20) + Call(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10) + Set(MF_TrainDepartPlayerBoard, TRUE) + Wait(20) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Add(LVar2, -50) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(EnableNpcShadow, NPC_PARTNER, FALSE) + Call(HidePlayerShadow, TRUE) + Call(SetPlayerJumpscale, Float(1.0)) + Set(LVar0, -425) + Set(LVar1, 75) + Set(LVar2, 20) + Call(SetPlayerActionState, ACTION_STATE_JUMP) + Call(PlayerJump, LVar0, LVar1, LVar2, 15) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(InterpPlayerYaw, 270, 0) + Set(MF_TrainMoving, TRUE) + Call(SetNpcSpeed, NPC_PARTNER, Float(3.0)) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 57) + Add(LVar1, -31) + Add(LVar2, 0) + Call(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + Exec(N(EVS_UpdatePassengerPos)) + Exec(N(EVS_CloseCrossingGates)) + Call(UseSettingsFrom, CAM_DEFAULT, -1000, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(245.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(-538.5), Float(-60.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(0.0), Float(-10.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Sub(LVar0, 150) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_TrainToad_02, ANIM_TrainToad_Talk, ANIM_TrainToad_Still, 5, MSG_CH2_0003) + Call(PlaySound, SOUND_TRAIN_DEPARTURE) + Thread + Loop(1000) + SubF(MV_TrainMoveSpeed, Float(0.031)) + IfLt(MV_TrainMoveSpeed, -10) + SetF(MV_TrainMoveSpeed, Float(-10.0)) + EndIf + Wait(1) + EndLoop + EndThread + Wait(90) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + ExecGetTID(N(EVS_FollowTrainCamera), LVar9) + Wait(130) + Wait(100) + Call(GotoMap, Ref("iwa_11"), iwa_11_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_InitializeTrainScene) = { - EVT_CALL(EnableModel, MODEL_km, FALSE) - EVT_CALL(SetModelFlags, MODEL_km, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(0)) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(1)) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(2)) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(3)) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(4)) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(5)) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(6)) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(7)) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(8)) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(9)) - EVT_SET(MF_TrainReverseDir, TRUE) - EVT_SET(MV_TrainMoveDist, -90) - EVT_EXEC(N(EVS_AnimateTrain)) - EVT_WAIT(1) - EVT_CALL(RotateGroup, MODEL_fumi1, 105, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_fumi2, 105, 0, 1, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tt4, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_km, FALSE) + Call(SetModelFlags, MODEL_km, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Call(CloneModel, MODEL_km, CLONED_MODEL(0)) + Call(CloneModel, MODEL_km, CLONED_MODEL(1)) + Call(CloneModel, MODEL_km, CLONED_MODEL(2)) + Call(CloneModel, MODEL_km, CLONED_MODEL(3)) + Call(CloneModel, MODEL_km, CLONED_MODEL(4)) + Call(CloneModel, MODEL_km, CLONED_MODEL(5)) + Call(CloneModel, MODEL_km, CLONED_MODEL(6)) + Call(CloneModel, MODEL_km, CLONED_MODEL(7)) + Call(CloneModel, MODEL_km, CLONED_MODEL(8)) + Call(CloneModel, MODEL_km, CLONED_MODEL(9)) + Set(MF_TrainReverseDir, TRUE) + Set(MV_TrainMoveDist, -90) + Exec(N(EVS_AnimateTrain)) + Wait(1) + Call(RotateGroup, MODEL_fumi1, 105, 0, 1, 0) + Call(RotateGroup, MODEL_fumi2, 105, 0, 1, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt2, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tt4, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; diff --git a/src/world/area_iwa/iwa_10/iwa_10_5_entity.c b/src/world/area_iwa/iwa_10/iwa_10_5_entity.c index 119e3f42d60..37d7b863571 100644 --- a/src/world/area_iwa/iwa_10/iwa_10_5_entity.c +++ b/src/world/area_iwa/iwa_10/iwa_10_5_entity.c @@ -6,22 +6,22 @@ #include "world/common/entity/SuperBlock.inc.c" EvtScript N(EVS_OnSmashBlock) = { - EVT_SET(GF_IWA10_Hammer1Block, TRUE) - EVT_RETURN - EVT_END + Set(GF_IWA10_Hammer1Block, TRUE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_IWA10_Hammer1Block, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer2Block_WideZ), -1040, 160, -425, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnSmashBlock))) - EVT_END_IF + IfEq(GF_IWA10_Hammer1Block, FALSE) + Call(MakeEntity, Ref(Entity_Hammer2Block_WideZ), -1040, 160, -425, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnSmashBlock))) + EndIf EVT_MAKE_SUPER_BLOCK(-1350, 220, -210, 0) - EVT_CALL(MakeEntity, EVT_PTR(Entity_ArrowSign), -780, 0, -227, -15, 270, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_ArrowSign), -1157, 70, -282, 40, 120, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_ArrowSign), -901, 185, -555, 0, 120, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), -525, 80, 115, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), -730, 275, -510, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_ArrowSign), -780, 0, -227, -15, 270, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_ArrowSign), -1157, 70, -282, 40, 120, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_ArrowSign), -901, 185, -555, 0, 120, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_SavePoint), -525, 80, 115, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HeartBlock), -730, 275, -510, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_iwa/iwa_10/iwa_10_6_parakarry.c b/src/world/area_iwa/iwa_10/iwa_10_6_parakarry.c index e1aeb438366..390d4e7b0c1 100644 --- a/src/world/area_iwa/iwa_10/iwa_10_6_parakarry.c +++ b/src/world/area_iwa/iwa_10/iwa_10_6_parakarry.c @@ -9,152 +9,152 @@ #include "world/common/complete/KeyItemChoice.inc.c" EvtScript N(EVS_Scene_MeetParakarry) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar1, 215) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_LT(LVar0, -600) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH2_000E, 320, 150) - EVT_THREAD - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_CALL(PlaySoundAtPlayer, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, 0, EMOTE_QUESTION, 0, 20, EMOTER_PLAYER, 0, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(3.0 / DT), 30, 300, EVT_FLOAT(15.0), EVT_FLOAT(-9.5)) - EVT_THREAD - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_LookAround) - EVT_WAIT(20 * DT) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_WAIT(55 * DT) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_END_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcPos, NPC_Parakarry, -400, 215, -510) - EVT_CALL(SetNpcFlagBits, NPC_Parakarry, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_THREAD - EVT_CALL(SetNpcRotation, NPC_Parakarry, 0, 0, 15) - EVT_CALL(InterpNpcYaw, NPC_Parakarry, 270, 0) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcRotation, NPC_Parakarry, 0, 0, 0) - EVT_CALL(InterpNpcYaw, NPC_Parakarry, 90, 0) - EVT_WAIT(5 * DT) - EVT_CALL(SetNpcRotation, NPC_Parakarry, 0, 0, -15) - EVT_WAIT(30 * DT) - EVT_CALL(InterpNpcYaw, NPC_Parakarry, 270, 0) - EVT_CALL(SetNpcRotation, NPC_Parakarry, 0, 0, 0) - EVT_END_THREAD - EVT_SET(MV_ParakarryPosZ, -510) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_CALL(MakeLerp, -510, LVar2, 60 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(MV_ParakarryPosZ, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_ADD(LVar0, 25) - EVT_CALL(MakeLerp, -400, LVar0, 55 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, NPC_Parakarry, LVar0, 220, MV_ParakarryPosZ) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Hurt) - EVT_CALL(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_HurtStill) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(2.0)) - EVT_END_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Parakarry, LVar3, LVar4, LVar5) - EVT_ADD(LVar0, LVar3) - EVT_DIV(LVar0, 2) - EVT_ADD(LVar2, LVar5) - EVT_DIV(LVar2, 2) - EVT_CALL(PlaySoundAt, SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_DEFAULT, LVar0, 230, LVar2) - EVT_PLAY_EFFECT(EFFECT_DAMAGE_STARS, FX_DAMAGE_STARS_3, LVar0, 230, LVar2, 0, -1, 0, 2) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, 230) - EVT_SET(LVarC, LVar2) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar2, -380) - EVT_SET(LVar2, -380) - EVT_END_IF - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Parakarry, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_Parakarry, LVar0, LVar1, LVar3) - EVT_ADD(LVar0, 30) - EVT_CALL(NpcJump1, NPC_Parakarry, LVar0, 215, LVar2, 15 * DT) - EVT_ADD(LVar0, 15) - EVT_CALL(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Hurt) - EVT_CALL(NpcJump1, NPC_Parakarry, LVar0, 215, LVar2, 8 * DT) - EVT_END_THREAD - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_SUB(LVar0, 30) - EVT_CALL(PlayerJump1, LVar0, LVar1, LVar2, 15 * DT) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAt, SOUND_TRIP, SOUND_SPACE_DEFAULT, LVarA, LVarB, LVarC) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_SUB(LVar0, 15) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, TRUE) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Fallen) - EVT_CALL(PlayerJump1, LVar0, LVar1, LVar2, 8 * DT) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 3, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Parakarry, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_GetUp) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Idle) - EVT_CALL(GetNpcPos, NPC_Parakarry, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(NpcJump1, NPC_Parakarry, LVar0, LVar1, LVar2, 8 * DT) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, FALSE) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(30 * DT) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(3.0 / DT), 35, 255, EVT_FLOAT(17.5), EVT_FLOAT(-11.5)) - EVT_CALL(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Walk) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 60) - EVT_CALL(SetNpcSpeed, NPC_Parakarry, EVT_FLOAT(3.0)) - EVT_CALL(NpcMoveTo, NPC_Parakarry, LVar0, LVar2, 0) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Idle) - EVT_CALL(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_000F) - EVT_WAIT(10 * DT) - EVT_CALL(GetNpcPos, NPC_Parakarry, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Parakarry, LVar0, LVar1, LVar2, 10) - EVT_CALL(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_0010) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_0011) - EVT_SET(GB_StoryProgress, STORY_CH2_SPOKE_WITH_PARAKARRY) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(BindNpcAI, NPC_Parakarry, EVT_PTR(N(EVS_NpcIdle_Parakarry))) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar1, 215) + Goto(0) + EndIf + IfLt(LVar0, -600) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_CH2_000E, 320, 150) + Thread + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Call(PlaySoundAtPlayer, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) + Call(ShowEmote, 0, EMOTE_QUESTION, 0, 20, EMOTER_PLAYER, 0, 0, 0, 0) + EndThread + Call(AdjustCam, CAM_DEFAULT, Float(3.0 / DT), 30, 300, Float(15.0), Float(-9.5)) + Thread + Call(SetPlayerAnimation, ANIM_MarioW2_LookAround) + Wait(20 * DT) + Call(InterpPlayerYaw, 270, 0) + Wait(55 * DT) + Call(InterpPlayerYaw, 90, 0) + EndThread + Wait(20 * DT) + Call(SetNpcPos, NPC_Parakarry, -400, 215, -510) + Call(SetNpcFlagBits, NPC_Parakarry, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Thread + Call(SetNpcRotation, NPC_Parakarry, 0, 0, 15) + Call(InterpNpcYaw, NPC_Parakarry, 270, 0) + Wait(20 * DT) + Call(SetNpcRotation, NPC_Parakarry, 0, 0, 0) + Call(InterpNpcYaw, NPC_Parakarry, 90, 0) + Wait(5 * DT) + Call(SetNpcRotation, NPC_Parakarry, 0, 0, -15) + Wait(30 * DT) + Call(InterpNpcYaw, NPC_Parakarry, 270, 0) + Call(SetNpcRotation, NPC_Parakarry, 0, 0, 0) + EndThread + Set(MV_ParakarryPosZ, -510) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Thread + Call(MakeLerp, -510, LVar2, 60 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Set(MV_ParakarryPosZ, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Add(LVar0, 25) + Call(MakeLerp, -400, LVar0, 55 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcPos, NPC_Parakarry, LVar0, 220, MV_ParakarryPosZ) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetPlayerAnimation, ANIM_Mario1_Hurt) + Call(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_HurtStill) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(2.0)) + EndThread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Parakarry, LVar3, LVar4, LVar5) + Add(LVar0, LVar3) + Div(LVar0, 2) + Add(LVar2, LVar5) + Div(LVar2, 2) + Call(PlaySoundAt, SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_DEFAULT, LVar0, 230, LVar2) + PlayEffect(EFFECT_DAMAGE_STARS, FX_DAMAGE_STARS_3, LVar0, 230, LVar2, 0, -1, 0, 2) + Set(LVarA, LVar0) + Set(LVarB, 230) + Set(LVarC, LVar2) + Call(DisablePlayerPhysics, TRUE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar2, -380) + Set(LVar2, -380) + EndIf + Thread + Call(SetNpcJumpscale, NPC_Parakarry, Float(1.0)) + Call(GetNpcPos, NPC_Parakarry, LVar0, LVar1, LVar3) + Add(LVar0, 30) + Call(NpcJump1, NPC_Parakarry, LVar0, 215, LVar2, 15 * DT) + Add(LVar0, 15) + Call(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Hurt) + Call(NpcJump1, NPC_Parakarry, LVar0, 215, LVar2, 8 * DT) + EndThread + Call(SetPlayerJumpscale, Float(1.0)) + Sub(LVar0, 30) + Call(PlayerJump1, LVar0, LVar1, LVar2, 15 * DT) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Call(PlaySoundAt, SOUND_TRIP, SOUND_SPACE_DEFAULT, LVarA, LVarB, LVarC) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.0)) + EndThread + Sub(LVar0, 15) + Call(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, TRUE) + Call(InterpPlayerYaw, 270, 0) + Wait(1) + Call(SetPlayerAnimation, ANIM_Mario1_Fallen) + Call(PlayerJump1, LVar0, LVar1, LVar2, 8 * DT) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 3, Float(1.0)) + EndThread + Wait(20 * DT) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Parakarry, 0) + Call(SetPlayerAnimation, ANIM_Mario1_GetUp) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Idle) + Call(GetNpcPos, NPC_Parakarry, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(NpcJump1, NPC_Parakarry, LVar0, LVar1, LVar2, 8 * DT) + Call(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, FALSE) + Call(InterpPlayerYaw, 90, 0) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(30 * DT) + Call(AdjustCam, CAM_DEFAULT, Float(3.0 / DT), 35, 255, Float(17.5), Float(-11.5)) + Call(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Walk) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 60) + Call(SetNpcSpeed, NPC_Parakarry, Float(3.0)) + Call(NpcMoveTo, NPC_Parakarry, LVar0, LVar2, 0) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Idle) + Call(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_000F) + Wait(10 * DT) + Call(GetNpcPos, NPC_Parakarry, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Parakarry, LVar0, LVar1, LVar2, 10) + Call(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_0010) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_0011) + Set(GB_StoryProgress, STORY_CH2_SPOKE_WITH_PARAKARRY) + Call(ResetCam, CAM_DEFAULT, Float(3.0 / DT)) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Call(BindNpcAI, NPC_Parakarry, Ref(N(EVS_NpcIdle_Parakarry))) + Return + End }; s32 N(LetterList)[] = { @@ -165,145 +165,145 @@ s32 N(LetterList)[] = { }; EvtScript N(EVS_NpcInteract_Parakarry) = { - EVT_SET(LFlag0, FALSE) - EVT_IF_EQ(GB_IWA10_ReturnedLetterCount, 2) - EVT_SET(LVar0, 0) - EVT_IF_EQ(GF_IWA01_Item_Letter01, TRUE) - EVT_ADD(LVar0, 1) - EVT_END_IF - EVT_IF_EQ(GF_IWA03_Item_LettertoKolorado, TRUE) - EVT_ADD(LVar0, 1) - EVT_END_IF - EVT_IF_EQ(GF_IWA04_Item_Letter10, TRUE) - EVT_ADD(LVar0, 1) - EVT_END_IF - EVT_IF_EQ(LVar0, 3) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_CALL(GetNpcPos, NPC_Parakarry, LVar4, LVar5, LVar6) - EVT_IF_LT(LVar1, LVar4) - EVT_ADD(LVar4, -30) - EVT_ELSE - EVT_ADD(LVar4, 30) - EVT_END_IF - EVT_CALL(PlayerMoveTo, LVar4, LVar6, 20 * DT) - EVT_CALL(PlayerFaceNpc, NPC_Parakarry, FALSE) - EVT_WAIT(10 * DT) - EVT_CALL(func_802CF56C, 2) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4.0 / DT), EVT_FLOAT(0.0), EVT_FLOAT(300.0), EVT_FLOAT(17.5), EVT_FLOAT(-10.0)) - EVT_END_IF - EVT_END_IF - EVT_SET(LVar0, EVT_PTR(N(LetterList))) - EVT_SET(LVar1, 4) - EVT_EXEC_WAIT(N(EVS_ChooseKeyItem)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SWITCH(GB_IWA10_ReturnedLetterCount) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_0012) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_0015) - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_0017) - EVT_CASE_EQ(3) - EVT_CALL(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_001C) - EVT_CALL(ShowChoice, MSG_Choice_000F) - EVT_IF_NE(LVar0, 0) - EVT_CALL(ContinueSpeech, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_001B) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_RETURN - EVT_END_IF - EVT_SET(LFlag0, TRUE) - EVT_END_SWITCH - EVT_CASE_EQ(-1) - EVT_CALL(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_0013) - EVT_CASE_DEFAULT - EVT_CALL(RemoveKeyItemAt, LVar0) - EVT_ADD(GB_IWA10_ReturnedLetterCount, 1) - EVT_SWITCH(GB_IWA10_ReturnedLetterCount) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_0014) - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_0016) - EVT_CASE_EQ(3) - EVT_CALL(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Celebrate, ANIM_WorldParakarry_Idle, 0, MSG_CH2_0018) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Question) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_0019) - EVT_CALL(ShowChoice, MSG_Choice_000F) - EVT_IF_NE(LVar0, 0) - EVT_CALL(ContinueSpeech, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_001A) - EVT_CALL(ShowChoice, MSG_Choice_000F) - EVT_IF_NE(LVar0, 0) - EVT_CALL(ContinueSpeech, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_001B) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_SET(LFlag0, TRUE) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_IF_EQ(LFlag0, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(ContinueSpeech, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_001D) - EVT_CALL(N(ChangeNpcToPartner), 4, 4) - EVT_SET(GB_StoryProgress, STORY_CH2_PARAKARRY_JOINED_PARTY) - EVT_CALL(N(LoadPartyImage)) - EVT_EXEC(N(EVS_PushSong)) - EVT_WAIT(15 * DT) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_018C, 160, 40) - EVT_EXEC(N(EVS_PopSong)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_001E) - EVT_CALL(AddKeyItem, ITEM_LETTER_TO_MERLON) - EVT_CALL(AddKeyItem, ITEM_LETTER_TO_KOLORADO) - EVT_CALL(AddKeyItem, ITEM_LETTER_CHAIN_GOOMPAPA_1) - EVT_END_IF - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(EnablePartnerAI) - EVT_RETURN - EVT_RETURN - EVT_END + Set(LFlag0, FALSE) + IfEq(GB_IWA10_ReturnedLetterCount, 2) + Set(LVar0, 0) + IfEq(GF_IWA01_Item_Letter01, TRUE) + Add(LVar0, 1) + EndIf + IfEq(GF_IWA03_Item_LettertoKolorado, TRUE) + Add(LVar0, 1) + EndIf + IfEq(GF_IWA04_Item_Letter10, TRUE) + Add(LVar0, 1) + EndIf + IfEq(LVar0, 3) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + Call(GetNpcPos, NPC_Parakarry, LVar4, LVar5, LVar6) + IfLt(LVar1, LVar4) + Add(LVar4, -30) + Else + Add(LVar4, 30) + EndIf + Call(PlayerMoveTo, LVar4, LVar6, 20 * DT) + Call(PlayerFaceNpc, NPC_Parakarry, FALSE) + Wait(10 * DT) + Call(func_802CF56C, 2) + Call(AdjustCam, CAM_DEFAULT, Float(4.0 / DT), Float(0.0), Float(300.0), Float(17.5), Float(-10.0)) + EndIf + EndIf + Set(LVar0, Ref(N(LetterList))) + Set(LVar1, 4) + ExecWait(N(EVS_ChooseKeyItem)) + Switch(LVar0) + CaseEq(0) + Switch(GB_IWA10_ReturnedLetterCount) + CaseEq(0) + Call(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_0012) + CaseEq(1) + Call(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_0015) + CaseEq(2) + Call(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_0017) + CaseEq(3) + Call(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_001C) + Call(ShowChoice, MSG_Choice_000F) + IfNe(LVar0, 0) + Call(ContinueSpeech, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_001B) + Call(ResetCam, CAM_DEFAULT, Float(4.0 / DT)) + Return + EndIf + Set(LFlag0, TRUE) + EndSwitch + CaseEq(-1) + Call(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_0013) + CaseDefault + Call(RemoveKeyItemAt, LVar0) + Add(GB_IWA10_ReturnedLetterCount, 1) + Switch(GB_IWA10_ReturnedLetterCount) + CaseEq(1) + Call(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_0014) + CaseEq(2) + Call(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_0016) + CaseEq(3) + Call(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Celebrate, ANIM_WorldParakarry_Idle, 0, MSG_CH2_0018) + Call(SetPlayerAnimation, ANIM_Mario1_Question) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_0019) + Call(ShowChoice, MSG_Choice_000F) + IfNe(LVar0, 0) + Call(ContinueSpeech, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_001A) + Call(ShowChoice, MSG_Choice_000F) + IfNe(LVar0, 0) + Call(ContinueSpeech, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_001B) + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + Return + EndIf + EndIf + Set(LFlag0, TRUE) + EndSwitch + EndSwitch + IfEq(LFlag0, TRUE) + Call(DisablePartnerAI, 0) + Call(ContinueSpeech, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_001D) + Call(N(ChangeNpcToPartner), 4, 4) + Set(GB_StoryProgress, STORY_CH2_PARAKARRY_JOINED_PARTY) + Call(N(LoadPartyImage)) + Exec(N(EVS_PushSong)) + Wait(15 * DT) + Call(ShowMessageAtScreenPos, MSG_Menus_018C, 160, 40) + Exec(N(EVS_PopSong)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH2_001E) + Call(AddKeyItem, ITEM_LETTER_TO_MERLON) + Call(AddKeyItem, ITEM_LETTER_TO_KOLORADO) + Call(AddKeyItem, ITEM_LETTER_CHAIN_GOOMPAPA_1) + EndIf + Call(ResetCam, CAM_DEFAULT, Float(4.0 / DT)) + Call(EnablePartnerAI) + Return + Return + End }; EvtScript N(EVS_NpcIdle_Parakarry) = { - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(1.0)) - EVT_ADD(LVar0, -670) - EVT_ADD(LVar2, -485) - EVT_LOOP(0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldParakarry_Walk) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldParakarry_Idle) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 7) - EVT_WAIT(10) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 7) - EVT_WAIT(30) - EVT_ADD(LVar0, 120) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldParakarry_Walk) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldParakarry_Idle) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 7) - EVT_WAIT(10) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 7) - EVT_WAIT(30) - EVT_ADD(LVar0, -120) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetNpcSpeed, NPC_SELF, Float(1.0)) + Add(LVar0, -670) + Add(LVar2, -485) + Loop(0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldParakarry_Walk) + Call(NpcMoveTo, NPC_SELF, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldParakarry_Idle) + Call(InterpNpcYaw, NPC_SELF, 90, 7) + Wait(10) + Call(InterpNpcYaw, NPC_SELF, 270, 7) + Wait(30) + Add(LVar0, 120) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldParakarry_Walk) + Call(NpcMoveTo, NPC_SELF, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldParakarry_Idle) + Call(InterpNpcYaw, NPC_SELF, 270, 7) + Wait(10) + Call(InterpNpcYaw, NPC_SELF, 90, 7) + Wait(30) + Add(LVar0, -120) + EndLoop + Return + End }; EvtScript N(EVS_NpcInit_Parakarry) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Parakarry))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_SPOKE_WITH_PARAKARRY) - EVT_CALL(SetNpcPos, NPC_Parakarry, NPC_DISPOSE_LOCATION) - EVT_CASE_LT(STORY_CH2_PARAKARRY_JOINED_PARTY) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Parakarry))) - EVT_CASE_DEFAULT - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Parakarry))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_SPOKE_WITH_PARAKARRY) + Call(SetNpcPos, NPC_Parakarry, NPC_DISPOSE_LOCATION) + CaseLt(STORY_CH2_PARAKARRY_JOINED_PARTY) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Parakarry))) + CaseDefault + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; NpcData N(NpcData_Parakarry) = { diff --git a/src/world/area_iwa/iwa_10/iwa_10_8_foliage.c b/src/world/area_iwa/iwa_10/iwa_10_8_foliage.c index 9ecd166d131..41f1d8611f9 100644 --- a/src/world/area_iwa/iwa_10/iwa_10_8_foliage.c +++ b/src/world/area_iwa/iwa_10/iwa_10_8_foliage.c @@ -114,14 +114,14 @@ SearchBushConfig N(SearchBush_Bush4) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_k4, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_k5, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_k6, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush4))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_k7, 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(SearchBush_Bush1))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_k4, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush2))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_k5, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush3))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_k6, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush4))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_k7, 1, 0) + Return + End }; diff --git a/src/world/area_iwa/iwa_11/iwa_11_1_music.c b/src/world/area_iwa/iwa_11/iwa_11_1_music.c index a88d9cdc1e7..a994f2a80d9 100644 --- a/src/world/area_iwa/iwa_11/iwa_11_1_music.c +++ b/src/world/area_iwa/iwa_11/iwa_11_1_music.c @@ -1,7 +1,7 @@ #include "iwa_11.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_RIDING_THE_RAILS, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_RIDING_THE_RAILS, 0, 8) + Return + End }; diff --git a/src/world/area_iwa/iwa_11/iwa_11_2_main.c b/src/world/area_iwa/iwa_11/iwa_11_2_main.c index 51c387e2128..7ec61d11932 100644 --- a/src/world/area_iwa/iwa_11/iwa_11_2_main.c +++ b/src/world/area_iwa/iwa_11/iwa_11_2_main.c @@ -9,49 +9,49 @@ API_CALLABLE(N(CheckForSkipInput)) { } EvtScript N(EVS_MonitorSceneSkip) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH2_ARRIVED_AT_MT_RUGGED) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_CALL(N(CheckForSkipInput)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(iwa_11_ENTRY_0) - EVT_CALL(GotoMap, EVT_PTR("iwa_10"), iwa_10_ENTRY_0) - EVT_CASE_EQ(iwa_11_ENTRY_1) - EVT_CALL(GotoMap, EVT_PTR("mac_03"), mac_03_ENTRY_1) - EVT_END_SWITCH - EVT_WAIT(100) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH2_ARRIVED_AT_MT_RUGGED) + Return + EndIf + Call(GetEntryID, LVar0) + Call(N(CheckForSkipInput)) + Switch(LVar0) + CaseEq(iwa_11_ENTRY_0) + Call(GotoMap, Ref("iwa_10"), iwa_10_ENTRY_0) + CaseEq(iwa_11_ENTRY_1) + Call(GotoMap, Ref("mac_03"), mac_03_ENTRY_1) + EndSwitch + Wait(100) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_RUGGED) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 30, 16, 4096) // uses fov 25 instead of 30 - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -5800, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 5700, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deiliti, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitm, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC_WAIT(N(EVS_InitializeTrainScene)) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(iwa_11_ENTRY_0) - EVT_EXEC(N(EVS_TravelToMtRugged)) - EVT_CASE_EQ(iwa_11_ENTRY_1) - EVT_EXEC(N(EVS_TravelToToadTown)) - EVT_END_SWITCH - EVT_EXEC(N(EVS_UpdateSceneryPos)) - EVT_EXEC(N(EVS_MonitorSceneSkip)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_RUGGED) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 30, 16, 4096) // uses fov 25 instead of 30 + Call(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetCamPosA, CAM_DEFAULT, -5800, 0) + Call(SetCamPosB, CAM_DEFAULT, 5700, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deiliti, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitm, COLLIDER_FLAGS_UPPER_MASK) + ExecWait(N(EVS_InitializeTrainScene)) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(iwa_11_ENTRY_0) + Exec(N(EVS_TravelToMtRugged)) + CaseEq(iwa_11_ENTRY_1) + Exec(N(EVS_TravelToToadTown)) + EndSwitch + Exec(N(EVS_UpdateSceneryPos)) + Exec(N(EVS_MonitorSceneSkip)) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_iwa/iwa_11/iwa_11_3_train.c b/src/world/area_iwa/iwa_11/iwa_11_3_train.c index 86377b06b35..d92145fd165 100644 --- a/src/world/area_iwa/iwa_11/iwa_11_3_train.c +++ b/src/world/area_iwa/iwa_11/iwa_11_3_train.c @@ -17,391 +17,391 @@ API_CALLABLE(N(GetLargeWheelAngle)) { } EvtScript N(EVS_SpawnSmoke) = { - EVT_CALL(PlaySoundAtModel, MODEL_07, SOUND_SEQ_TRAIN_CHUG, SOUND_SPACE_DEFAULT) - EVT_SETF(LVar0, MV_TrainMoveDist) - EVT_IF_EQ(MF_TrainReverseDir, FALSE) - EVT_ADDF(LVar0, -310) - EVT_ELSE - EVT_ADDF(LVar0, -450) - EVT_END_IF - EVT_SETF(LVar1, 140) - EVT_SETF(LVar2, 0) - EVT_SETF(LVar3, EVT_FLOAT(1.0)) - EVT_SETF(LVar4, EVT_FLOAT(3.0)) - EVT_ADD(LVarB, CLONED_MODEL(0)) - EVT_CALL(EnableModel, LVarB, TRUE) - EVT_LOOP(20) - EVT_CALL(TranslateModel, LVarB, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, LVarB, LVar3, LVar3, 1) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar3, EVT_FLOAT(0.046)) - EVT_MULF(LVar4, EVT_FLOAT(0.906)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EnableModel, LVarB, FALSE) - EVT_RETURN - EVT_END + Call(PlaySoundAtModel, MODEL_07, SOUND_SEQ_TRAIN_CHUG, SOUND_SPACE_DEFAULT) + SetF(LVar0, MV_TrainMoveDist) + IfEq(MF_TrainReverseDir, FALSE) + AddF(LVar0, -310) + Else + AddF(LVar0, -450) + EndIf + SetF(LVar1, 140) + SetF(LVar2, 0) + SetF(LVar3, Float(1.0)) + SetF(LVar4, Float(3.0)) + Add(LVarB, CLONED_MODEL(0)) + Call(EnableModel, LVarB, TRUE) + Loop(20) + Call(TranslateModel, LVarB, LVar0, LVar1, LVar2) + Call(ScaleModel, LVarB, LVar3, LVar3, 1) + AddF(LVar1, LVar4) + AddF(LVar3, Float(0.046)) + MulF(LVar4, Float(0.906)) + Wait(1) + EndLoop + Call(EnableModel, LVarB, FALSE) + Return + End }; EvtScript N(EVS_AnimateTrain) = { - EVT_LABEL(0) - EVT_SET(LVar0, MV_TrainMoveDist) - EVT_CALL(TranslateModel, MODEL_08, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_07, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_10, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_11, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_12, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_13, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_09, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_01, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_02, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_03, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_04, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_05, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_06, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_ura, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_omote, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_ura2, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_omote2, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_14, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_15, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_16, LVar0, 0, 0) - EVT_IF_EQ(MF_TrainReverseDir, TRUE) - EVT_SET(LVar0, 180) - EVT_CALL(TranslateModel, MODEL_08, -69, -50, 0) - EVT_CALL(TranslateModel, MODEL_07, -69, -50, 0) - EVT_CALL(TranslateModel, MODEL_10, 75, 25, 2) - EVT_CALL(TranslateModel, MODEL_11, 30, 30, 2) - EVT_CALL(TranslateModel, MODEL_12, -10, 30, 2) - EVT_CALL(TranslateModel, MODEL_13, -50, 30, 2) - EVT_CALL(TranslateModel, MODEL_09, -1, -58, 0) - EVT_CALL(TranslateModel, MODEL_ura, 82, -19, -35) - EVT_CALL(TranslateModel, MODEL_omote, 82, -19, -35) - EVT_CALL(TranslateModel, MODEL_ura2, 82, -19, 35) - EVT_CALL(TranslateModel, MODEL_omote2, 82, -19, 35) - EVT_CALL(TranslateModel, MODEL_14, -21, 30, 0) - EVT_CALL(TranslateModel, MODEL_15, -25, 30, 0) - EVT_CALL(TranslateModel, MODEL_16, -63, 15, 0) - EVT_CALL(RotateModel, MODEL_08, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_07, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_10, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_11, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_12, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_13, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_09, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_01, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_02, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_03, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_04, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_05, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_06, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_ura, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_omote, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_ura2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_omote2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_14, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_15, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_16, LVar0, 0, 1, 0) - EVT_CALL(TranslateModel, MODEL_08, 69, 50, 0) - EVT_CALL(TranslateModel, MODEL_07, 69, 50, 0) - EVT_CALL(TranslateModel, MODEL_10, -75, -25, -2) - EVT_CALL(TranslateModel, MODEL_11, -30, -30, -2) - EVT_CALL(TranslateModel, MODEL_12, 10, -30, -2) - EVT_CALL(TranslateModel, MODEL_13, 50, -30, -2) - EVT_CALL(TranslateModel, MODEL_09, 1, 58, 0) - EVT_CALL(TranslateModel, MODEL_ura, -82, 19, 35) - EVT_CALL(TranslateModel, MODEL_omote, -82, 19, 35) - EVT_CALL(TranslateModel, MODEL_ura2, -82, 19, -35) - EVT_CALL(TranslateModel, MODEL_omote2, -82, 19, -35) - EVT_CALL(TranslateModel, MODEL_14, 21, -30, 0) - EVT_CALL(TranslateModel, MODEL_15, 25, -30, 0) - EVT_CALL(TranslateModel, MODEL_16, 63, -15, 0) - EVT_END_IF - EVT_IF_EQ(MF_TrainReverseDir, FALSE) - EVT_SET(LVar2, MV_TrainMoveDist) - EVT_ELSE - EVT_SET(LVar2, 1000) - EVT_SUB(LVar2, MV_TrainMoveDist) - EVT_END_IF - EVT_CALL(N(GetSmallWheelsAngle)) - EVT_CALL(RotateModel, MODEL_11, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_12, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_13, LVar0, 0, 0, 1) - EVT_CALL(N(GetLargeWheelAngle)) - EVT_CALL(RotateModel, MODEL_10, LVar0, 0, 0, 1) - EVT_CALL(N(CosInterpMinMax), LVar2, LVar0, 0, -20, 75, 0, 0) - EVT_CALL(N(CosInterpMinMax), LVar2, LVar1, -10, 10, 75, 0, -90) - EVT_CALL(TranslateModel, MODEL_14, LVar0, LVar1, 0) - EVT_CALL(N(CosInterpMinMax), LVar2, LVar0, 0, -20, 75, 0, 0) - EVT_ADD(LVar0, 5) - EVT_CALL(TranslateModel, MODEL_16, LVar0, -14, 0) - EVT_CALL(N(CosInterpMinMax), LVar2, LVar0, 0, -20, 75, 0, 0) - EVT_CALL(N(CosInterpMinMax), LVar2, LVar1, -10, 10, 75, 0, -90) - EVT_CALL(TranslateModel, MODEL_15, LVar0, LVar1, 0) - EVT_CALL(N(CosInterpMinMax), LVar2, LVar0, -40, 40, 75, 0, 90) - EVT_CALL(RotateModel, MODEL_15, LVar0, 0, 0, 1) - EVT_CALL(N(CosInterpMinMax), LVarC, LVar0, -30, 30, 10, 0, 0) - EVT_CALL(RotateModel, MODEL_09, LVar0, 0, 0, 1) - EVT_IF_NE(MV_TrainMoveSpeed, 0) - EVT_IF_EQ(LVarD, 0) - EVT_THREAD - EVT_WAIT(18) - EVT_EXEC(N(EVS_SpawnSmoke)) - EVT_END_THREAD - EVT_END_IF - EVT_END_IF - EVT_IF_LE(LVarD, 20) - EVT_CALL(N(CosInterpMinMax), LVarD, LVar0, EVT_FLOAT(0.703), EVT_FLOAT(1.0), 10, 0, 180) - EVT_CALL(N(CosInterpMinMax), LVarD, LVar2, EVT_FLOAT(0.0), EVT_FLOAT(0.296), 10, 0, 180) - EVT_SETF(LVar1, EVT_FLOAT(0.296)) - EVT_SUBF(LVar1, LVar2) - EVT_ADDF(LVar1, EVT_FLOAT(1.0)) - EVT_CALL(ScaleModel, MODEL_07, LVar1, LVar0, LVar1) - EVT_CALL(ScaleModel, MODEL_08, LVar1, LVar0, LVar1) - EVT_ELSE - EVT_SETF(LVar0, EVT_FLOAT(1.0)) - EVT_SETF(LVar2, EVT_FLOAT(0.296)) - EVT_SETF(LVar1, EVT_FLOAT(0.296)) - EVT_SUBF(LVar1, LVar2) - EVT_ADDF(LVar1, EVT_FLOAT(1.0)) - EVT_CALL(ScaleModel, MODEL_07, LVar1, LVar0, LVar1) - EVT_CALL(ScaleModel, MODEL_08, LVar1, LVar0, LVar1) - EVT_END_IF - EVT_IF_EQ(MF_TrainArriveDoorOpen, TRUE) - EVT_SET(LVar8, 10) - EVT_SET(LFlag1, TRUE) - EVT_SET(MF_TrainArriveDoorOpen, FALSE) - EVT_END_IF - EVT_IF_EQ(MF_TrainArrivePlayerDisembark, TRUE) - EVT_SET(LVar8, -10) - EVT_SET(LFlag1, TRUE) - EVT_SET(MF_TrainArrivePlayerDisembark, FALSE) - EVT_END_IF - EVT_IF_EQ(MF_TrainDepartDoorOpen, TRUE) - EVT_SET(LVar8, 10) - EVT_SET(LFlag2, TRUE) - EVT_SET(MF_TrainDepartDoorOpen, FALSE) - EVT_END_IF - EVT_IF_EQ(MF_TrainDepartPlayerBoard, TRUE) - EVT_SET(LVar8, -10) - EVT_SET(LFlag2, TRUE) - EVT_SET(MF_TrainDepartPlayerBoard, FALSE) - EVT_END_IF - EVT_IF_EQ(LFlag1, TRUE) - EVT_ADD(LVar9, LVar8) - EVT_IF_GE(LVar9, 90) - EVT_SET(LVar9, 90) - EVT_SET(LFlag1, FALSE) - EVT_END_IF - EVT_IF_LE(LVar9, 0) - EVT_SET(LVar9, 0) - EVT_SET(LFlag1, FALSE) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LFlag2, TRUE) - EVT_ADD(LVarA, LVar8) - EVT_IF_GE(LVarA, 90) - EVT_SET(LVarA, 90) - EVT_SET(LFlag2, FALSE) - EVT_END_IF - EVT_IF_LE(LVarA, 0) - EVT_SET(LVarA, 0) - EVT_SET(LFlag2, FALSE) - EVT_END_IF - EVT_END_IF - EVT_CALL(RotateModel, MODEL_omote, LVar9, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_ura, LVar9, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_omote2, LVarA, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_ura2, LVarA, 0, 1, 0) - EVT_IF_EQ(MF_TrainScrolling, TRUE) - EVT_IF_EQ(MF_TrainReverseDir, FALSE) - EVT_SET(LVar0, MV_TrainMoveDist) - EVT_ADD(LVar0, -425) - EVT_ADD(LVar1, 75) - EVT_ADD(LVar2, 20) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_ELSE - EVT_SET(LVar0, MV_TrainMoveDist) - EVT_ADD(LVar0, -335) - EVT_ADD(LVar1, 75) - EVT_ADD(LVar2, 20) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_END_IF - EVT_ADD(MV_TrainMoveDist, MV_TrainMoveSpeed) - EVT_SET(LVar0, MV_TrainMoveDist) - EVT_DIV(LVar0, 75) - EVT_IF_NE(LVar0, LVarE) - EVT_SET(LVarE, LVar0) - EVT_SET(LVarD, -1) - EVT_ADD(LVarB, 1) - EVT_IF_EQ(LVarB, 10) - EVT_SET(LVarB, 0) - EVT_END_IF - EVT_END_IF - EVT_ADDF(LVarD, 1) - EVT_IF_GT(LVarD, 1000) - EVT_SET(LVarD, 1000) - EVT_END_IF - EVT_ADDF(LVarC, 1) - EVT_IF_GT(LVarC, 1000) - EVT_SET(LVarC, 0) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Set(LVar0, MV_TrainMoveDist) + Call(TranslateModel, MODEL_08, LVar0, 0, 0) + Call(TranslateModel, MODEL_07, LVar0, 0, 0) + Call(TranslateModel, MODEL_10, LVar0, 0, 0) + Call(TranslateModel, MODEL_11, LVar0, 0, 0) + Call(TranslateModel, MODEL_12, LVar0, 0, 0) + Call(TranslateModel, MODEL_13, LVar0, 0, 0) + Call(TranslateModel, MODEL_09, LVar0, 0, 0) + Call(TranslateModel, MODEL_01, LVar0, 0, 0) + Call(TranslateModel, MODEL_02, LVar0, 0, 0) + Call(TranslateModel, MODEL_03, LVar0, 0, 0) + Call(TranslateModel, MODEL_04, LVar0, 0, 0) + Call(TranslateModel, MODEL_05, LVar0, 0, 0) + Call(TranslateModel, MODEL_06, LVar0, 0, 0) + Call(TranslateModel, MODEL_ura, LVar0, 0, 0) + Call(TranslateModel, MODEL_omote, LVar0, 0, 0) + Call(TranslateModel, MODEL_ura2, LVar0, 0, 0) + Call(TranslateModel, MODEL_omote2, LVar0, 0, 0) + Call(TranslateModel, MODEL_14, LVar0, 0, 0) + Call(TranslateModel, MODEL_15, LVar0, 0, 0) + Call(TranslateModel, MODEL_16, LVar0, 0, 0) + IfEq(MF_TrainReverseDir, TRUE) + Set(LVar0, 180) + Call(TranslateModel, MODEL_08, -69, -50, 0) + Call(TranslateModel, MODEL_07, -69, -50, 0) + Call(TranslateModel, MODEL_10, 75, 25, 2) + Call(TranslateModel, MODEL_11, 30, 30, 2) + Call(TranslateModel, MODEL_12, -10, 30, 2) + Call(TranslateModel, MODEL_13, -50, 30, 2) + Call(TranslateModel, MODEL_09, -1, -58, 0) + Call(TranslateModel, MODEL_ura, 82, -19, -35) + Call(TranslateModel, MODEL_omote, 82, -19, -35) + Call(TranslateModel, MODEL_ura2, 82, -19, 35) + Call(TranslateModel, MODEL_omote2, 82, -19, 35) + Call(TranslateModel, MODEL_14, -21, 30, 0) + Call(TranslateModel, MODEL_15, -25, 30, 0) + Call(TranslateModel, MODEL_16, -63, 15, 0) + Call(RotateModel, MODEL_08, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_07, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_10, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_11, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_12, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_13, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_09, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_01, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_02, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_03, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_04, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_05, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_06, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_ura, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_omote, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_ura2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_omote2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_14, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_15, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_16, LVar0, 0, 1, 0) + Call(TranslateModel, MODEL_08, 69, 50, 0) + Call(TranslateModel, MODEL_07, 69, 50, 0) + Call(TranslateModel, MODEL_10, -75, -25, -2) + Call(TranslateModel, MODEL_11, -30, -30, -2) + Call(TranslateModel, MODEL_12, 10, -30, -2) + Call(TranslateModel, MODEL_13, 50, -30, -2) + Call(TranslateModel, MODEL_09, 1, 58, 0) + Call(TranslateModel, MODEL_ura, -82, 19, 35) + Call(TranslateModel, MODEL_omote, -82, 19, 35) + Call(TranslateModel, MODEL_ura2, -82, 19, -35) + Call(TranslateModel, MODEL_omote2, -82, 19, -35) + Call(TranslateModel, MODEL_14, 21, -30, 0) + Call(TranslateModel, MODEL_15, 25, -30, 0) + Call(TranslateModel, MODEL_16, 63, -15, 0) + EndIf + IfEq(MF_TrainReverseDir, FALSE) + Set(LVar2, MV_TrainMoveDist) + Else + Set(LVar2, 1000) + Sub(LVar2, MV_TrainMoveDist) + EndIf + Call(N(GetSmallWheelsAngle)) + Call(RotateModel, MODEL_11, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_12, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_13, LVar0, 0, 0, 1) + Call(N(GetLargeWheelAngle)) + Call(RotateModel, MODEL_10, LVar0, 0, 0, 1) + Call(N(CosInterpMinMax), LVar2, LVar0, 0, -20, 75, 0, 0) + Call(N(CosInterpMinMax), LVar2, LVar1, -10, 10, 75, 0, -90) + Call(TranslateModel, MODEL_14, LVar0, LVar1, 0) + Call(N(CosInterpMinMax), LVar2, LVar0, 0, -20, 75, 0, 0) + Add(LVar0, 5) + Call(TranslateModel, MODEL_16, LVar0, -14, 0) + Call(N(CosInterpMinMax), LVar2, LVar0, 0, -20, 75, 0, 0) + Call(N(CosInterpMinMax), LVar2, LVar1, -10, 10, 75, 0, -90) + Call(TranslateModel, MODEL_15, LVar0, LVar1, 0) + Call(N(CosInterpMinMax), LVar2, LVar0, -40, 40, 75, 0, 90) + Call(RotateModel, MODEL_15, LVar0, 0, 0, 1) + Call(N(CosInterpMinMax), LVarC, LVar0, -30, 30, 10, 0, 0) + Call(RotateModel, MODEL_09, LVar0, 0, 0, 1) + IfNe(MV_TrainMoveSpeed, 0) + IfEq(LVarD, 0) + Thread + Wait(18) + Exec(N(EVS_SpawnSmoke)) + EndThread + EndIf + EndIf + IfLe(LVarD, 20) + Call(N(CosInterpMinMax), LVarD, LVar0, Float(0.703), Float(1.0), 10, 0, 180) + Call(N(CosInterpMinMax), LVarD, LVar2, Float(0.0), Float(0.296), 10, 0, 180) + SetF(LVar1, Float(0.296)) + SubF(LVar1, LVar2) + AddF(LVar1, Float(1.0)) + Call(ScaleModel, MODEL_07, LVar1, LVar0, LVar1) + Call(ScaleModel, MODEL_08, LVar1, LVar0, LVar1) + Else + SetF(LVar0, Float(1.0)) + SetF(LVar2, Float(0.296)) + SetF(LVar1, Float(0.296)) + SubF(LVar1, LVar2) + AddF(LVar1, Float(1.0)) + Call(ScaleModel, MODEL_07, LVar1, LVar0, LVar1) + Call(ScaleModel, MODEL_08, LVar1, LVar0, LVar1) + EndIf + IfEq(MF_TrainArriveDoorOpen, TRUE) + Set(LVar8, 10) + Set(LFlag1, TRUE) + Set(MF_TrainArriveDoorOpen, FALSE) + EndIf + IfEq(MF_TrainArrivePlayerDisembark, TRUE) + Set(LVar8, -10) + Set(LFlag1, TRUE) + Set(MF_TrainArrivePlayerDisembark, FALSE) + EndIf + IfEq(MF_TrainDepartDoorOpen, TRUE) + Set(LVar8, 10) + Set(LFlag2, TRUE) + Set(MF_TrainDepartDoorOpen, FALSE) + EndIf + IfEq(MF_TrainDepartPlayerBoard, TRUE) + Set(LVar8, -10) + Set(LFlag2, TRUE) + Set(MF_TrainDepartPlayerBoard, FALSE) + EndIf + IfEq(LFlag1, TRUE) + Add(LVar9, LVar8) + IfGe(LVar9, 90) + Set(LVar9, 90) + Set(LFlag1, FALSE) + EndIf + IfLe(LVar9, 0) + Set(LVar9, 0) + Set(LFlag1, FALSE) + EndIf + EndIf + IfEq(LFlag2, TRUE) + Add(LVarA, LVar8) + IfGe(LVarA, 90) + Set(LVarA, 90) + Set(LFlag2, FALSE) + EndIf + IfLe(LVarA, 0) + Set(LVarA, 0) + Set(LFlag2, FALSE) + EndIf + EndIf + Call(RotateModel, MODEL_omote, LVar9, 0, -1, 0) + Call(RotateModel, MODEL_ura, LVar9, 0, -1, 0) + Call(RotateModel, MODEL_omote2, LVarA, 0, 1, 0) + Call(RotateModel, MODEL_ura2, LVarA, 0, 1, 0) + IfEq(MF_TrainScrolling, TRUE) + IfEq(MF_TrainReverseDir, FALSE) + Set(LVar0, MV_TrainMoveDist) + Add(LVar0, -425) + Add(LVar1, 75) + Add(LVar2, 20) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Else + Set(LVar0, MV_TrainMoveDist) + Add(LVar0, -335) + Add(LVar1, 75) + Add(LVar2, 20) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + EndIf + EndIf + Add(MV_TrainMoveDist, MV_TrainMoveSpeed) + Set(LVar0, MV_TrainMoveDist) + Div(LVar0, 75) + IfNe(LVar0, LVarE) + Set(LVarE, LVar0) + Set(LVarD, -1) + Add(LVarB, 1) + IfEq(LVarB, 10) + Set(LVarB, 0) + EndIf + EndIf + AddF(LVarD, 1) + IfGt(LVarD, 1000) + Set(LVarD, 1000) + EndIf + AddF(LVarC, 1) + IfGt(LVarC, 1000) + Set(LVarC, 0) + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_UpdatePassengerPos) = { - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar0, MV_TrainMoveDist) - EVT_IF_EQ(MF_TrainReverseDir, FALSE) - EVT_ADD(LVar0, -425) - EVT_ELSE - EVT_ADD(LVar0, -335) - EVT_END_IF + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar0, MV_TrainMoveDist) + IfEq(MF_TrainReverseDir, FALSE) + Add(LVar0, -425) + Else + Add(LVar0, -335) + EndIf EVT_VEC3I_VSET(LVar3, LVar0) - EVT_IF_EQ(MF_TrainReverseDir, FALSE) - EVT_ADD(LVar3, -57) - EVT_ELSE - EVT_ADD(LVar3, 57) - EVT_END_IF - EVT_ADD(LVar4, -31) - EVT_ADD(LVar5, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar3, LVar4, LVar5) - EVT_IF_EQ(MF_TrainReverseDir, FALSE) - EVT_ADD(LVar0, 0) - EVT_ELSE - EVT_ADD(LVar0, 0) - EVT_END_IF - EVT_ADD(LVar1, -6) - EVT_ADD(LVar2, -40) - EVT_CALL(SetNpcPos, NPC_TrainToad, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + IfEq(MF_TrainReverseDir, FALSE) + Add(LVar3, -57) + Else + Add(LVar3, 57) + EndIf + Add(LVar4, -31) + Add(LVar5, 0) + Call(SetNpcPos, NPC_PARTNER, LVar3, LVar4, LVar5) + IfEq(MF_TrainReverseDir, FALSE) + Add(LVar0, 0) + Else + Add(LVar0, 0) + EndIf + Add(LVar1, -6) + Add(LVar2, -40) + Call(SetNpcPos, NPC_TrainToad, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_FollowTrainCamera) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_EQ(MF_TrainReverseDir, FALSE) - EVT_IF_LT(LVar0, -1100) - EVT_SET(LVar0, -1100) - EVT_END_IF - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 30) - EVT_ADD(LVar2, 40) - EVT_ELSE - EVT_IF_LT(LVar0, -1100) - EVT_SET(LVar0, -1100) - EVT_END_IF - EVT_ADD(LVar0, -40) - EVT_SET(LVar1, 30) - EVT_ADD(LVar2, 40) - EVT_END_IF - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfEq(MF_TrainReverseDir, FALSE) + IfLt(LVar0, -1100) + Set(LVar0, -1100) + EndIf + Add(LVar0, 40) + Set(LVar1, 30) + Add(LVar2, 40) + Else + IfLt(LVar0, -1100) + Set(LVar0, -1100) + EndIf + Add(LVar0, -40) + Set(LVar1, 30) + Add(LVar2, 40) + EndIf + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_TravelToToadTown) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_CALL(EnableNpcShadow, NPC_PARTNER, FALSE) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_SET(MF_TrainScrolling, TRUE) - EVT_SET(MF_TrainReverseDir, TRUE) - EVT_EXEC(N(EVS_UpdatePassengerPos)) - EVT_THREAD - EVT_CALL(MakeLerp, 6400, -5600, 1200, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(MV_TrainMoveDist, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(1200) - EVT_CALL(GotoMap, EVT_PTR("mac_03"), mac_03_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(InterpPlayerYaw, 270, 0) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + Call(EnableNpcShadow, NPC_PARTNER, FALSE) + Call(HidePlayerShadow, TRUE) + Set(MF_TrainScrolling, TRUE) + Set(MF_TrainReverseDir, TRUE) + Exec(N(EVS_UpdatePassengerPos)) + Thread + Call(MakeLerp, 6400, -5600, 1200, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Set(MV_TrainMoveDist, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Loop(0) + Wait(1) + EndLoop + EndThread + Wait(1200) + Call(GotoMap, Ref("mac_03"), mac_03_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_TravelToMtRugged) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_CALL(EnableNpcShadow, NPC_PARTNER, FALSE) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_EXEC(N(EVS_UpdatePassengerPos)) - EVT_SET(MF_TrainScrolling, TRUE) - EVT_CALL(MakeLerp, 0, 6350, 600, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(MV_TrainMoveDist, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_IF_LT(GB_StoryProgress, STORY_CH2_ARRIVED_AT_MT_RUGGED) - EVT_SET(GB_StoryProgress, STORY_CH2_ARRIVED_AT_MT_RUGGED) - EVT_END_IF - EVT_IF_EQ(GF_StartedChapter2, FALSE) - EVT_SET(GF_StartedChapter2, TRUE) - EVT_CALL(FadeOutMusic, 0, 1500) - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_22"), kmr_22_ENTRY_2, TRANSITION_BEGIN_OR_END_CHAPTER) - EVT_WAIT(100) - EVT_RETURN - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("iwa_10"), iwa_10_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(InterpPlayerYaw, 90, 0) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + Call(EnableNpcShadow, NPC_PARTNER, FALSE) + Call(HidePlayerShadow, TRUE) + Exec(N(EVS_UpdatePassengerPos)) + Set(MF_TrainScrolling, TRUE) + Call(MakeLerp, 0, 6350, 600, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Set(MV_TrainMoveDist, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + IfLt(GB_StoryProgress, STORY_CH2_ARRIVED_AT_MT_RUGGED) + Set(GB_StoryProgress, STORY_CH2_ARRIVED_AT_MT_RUGGED) + EndIf + IfEq(GF_StartedChapter2, FALSE) + Set(GF_StartedChapter2, TRUE) + Call(FadeOutMusic, 0, 1500) + Call(GotoMapSpecial, Ref("kmr_22"), kmr_22_ENTRY_2, TRANSITION_BEGIN_OR_END_CHAPTER) + Wait(100) + Return + EndIf + Call(GotoMap, Ref("iwa_10"), iwa_10_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_InitializeTrainScene) = { - EVT_CALL(EnableModel, MODEL_km, FALSE) - EVT_CALL(SetModelFlags, MODEL_km, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(0)) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(1)) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(2)) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(3)) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(4)) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(5)) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(6)) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(7)) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(8)) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(9)) - EVT_SET(MF_TrainReverseDir, FALSE) - EVT_SET(MV_TrainMoveDist, -6000) - EVT_SET(MV_TrainMoveSpeed, 10) - EVT_EXEC(N(EVS_AnimateTrain)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_km, FALSE) + Call(SetModelFlags, MODEL_km, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Call(CloneModel, MODEL_km, CLONED_MODEL(0)) + Call(CloneModel, MODEL_km, CLONED_MODEL(1)) + Call(CloneModel, MODEL_km, CLONED_MODEL(2)) + Call(CloneModel, MODEL_km, CLONED_MODEL(3)) + Call(CloneModel, MODEL_km, CLONED_MODEL(4)) + Call(CloneModel, MODEL_km, CLONED_MODEL(5)) + Call(CloneModel, MODEL_km, CLONED_MODEL(6)) + Call(CloneModel, MODEL_km, CLONED_MODEL(7)) + Call(CloneModel, MODEL_km, CLONED_MODEL(8)) + Call(CloneModel, MODEL_km, CLONED_MODEL(9)) + Set(MF_TrainReverseDir, FALSE) + Set(MV_TrainMoveDist, -6000) + Set(MV_TrainMoveSpeed, 10) + Exec(N(EVS_AnimateTrain)) + Wait(1) + Return + End }; diff --git a/src/world/area_iwa/iwa_11/iwa_11_4_scenery.c b/src/world/area_iwa/iwa_11/iwa_11_4_scenery.c index 55195ec582f..61340916f14 100644 --- a/src/world/area_iwa/iwa_11/iwa_11_4_scenery.c +++ b/src/world/area_iwa/iwa_11/iwa_11_4_scenery.c @@ -47,31 +47,31 @@ API_CALLABLE(N(GetSectionPosOffsets)) { } EvtScript N(EVS_UpdateSceneryPos) = { - EVT_CALL(TranslateGroup, MODEL_mac_side, -5750, 0, 0) - EVT_CALL(TranslateGroup, MODEL_turen, -3250, 0, 0) - EVT_CALL(TranslateGroup, MODEL_iwa_side, 1750, 0, 0) - EVT_CALL(GetEntryID, LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(iwa_11_ENTRY_0) - EVT_SET(LVar3, 350) - EVT_SET(MV_TrainMoveSpeed, 10) - EVT_CASE_EQ(iwa_11_ENTRY_1) - EVT_SET(LVar3, 400) - EVT_SET(MV_TrainMoveSpeed, -10) - EVT_END_SWITCH - EVT_LOOP(0) - EVT_SET(LVar0, MV_TrainMoveDist) - EVT_SUB(LVar0, LVar3) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, 0, 0) - EVT_CALL(N(GetSectionPosOffsets)) - EVT_CALL(TranslateGroup, MODEL_field_a, LVar5, 0, 0) - EVT_CALL(TranslateGroup, MODEL_field_b, LVar6, 0, 0) - EVT_CALL(TranslateGroup, MODEL_field_c, LVar7, 0, 0) - EVT_CALL(TranslateGroup, MODEL_field_d, LVar8, 0, 0) - EVT_CALL(TranslateGroup, MODEL_field_e, LVar9, 0, 0) - EVT_CALL(TranslateGroup, MODEL_field_f, LVarA, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(TranslateGroup, MODEL_mac_side, -5750, 0, 0) + Call(TranslateGroup, MODEL_turen, -3250, 0, 0) + Call(TranslateGroup, MODEL_iwa_side, 1750, 0, 0) + Call(GetEntryID, LVar2) + Switch(LVar2) + CaseEq(iwa_11_ENTRY_0) + Set(LVar3, 350) + Set(MV_TrainMoveSpeed, 10) + CaseEq(iwa_11_ENTRY_1) + Set(LVar3, 400) + Set(MV_TrainMoveSpeed, -10) + EndSwitch + Loop(0) + Set(LVar0, MV_TrainMoveDist) + Sub(LVar0, LVar3) + Call(SetPanTarget, CAM_DEFAULT, LVar0, 0, 0) + Call(N(GetSectionPosOffsets)) + Call(TranslateGroup, MODEL_field_a, LVar5, 0, 0) + Call(TranslateGroup, MODEL_field_b, LVar6, 0, 0) + Call(TranslateGroup, MODEL_field_c, LVar7, 0, 0) + Call(TranslateGroup, MODEL_field_d, LVar8, 0, 0) + Call(TranslateGroup, MODEL_field_e, LVar9, 0, 0) + Call(TranslateGroup, MODEL_field_f, LVarA, 0, 0) + Wait(1) + EndLoop + Return + End }; diff --git a/src/world/area_iwa/iwa_11/iwa_11_5_npc.c b/src/world/area_iwa/iwa_11/iwa_11_5_npc.c index f1592751265..87be4a8559e 100644 --- a/src/world/area_iwa/iwa_11/iwa_11_5_npc.c +++ b/src/world/area_iwa/iwa_11/iwa_11_5_npc.c @@ -5,17 +5,17 @@ #include "world/common/npc/Dryite_Stationary.inc.c" EvtScript N(EVS_NpcInit_TrainToad) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, iwa_11_ENTRY_0) - EVT_CALL(SetNpcPos, NPC_SELF, -425, 70, -20) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, -425, 70, -20) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(GetEntryID, LVar0) + IfEq(LVar0, iwa_11_ENTRY_0) + Call(SetNpcPos, NPC_SELF, -425, 70, -20) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Else + Call(SetNpcPos, NPC_SELF, -425, 70, -20) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + EndIf + Return + End }; NpcData N(NpcData_TrainToad) = { diff --git a/src/world/area_jan/common/MoveBushTemplates.h b/src/world/area_jan/common/MoveBushTemplates.h index e0687f7e251..8fe01eb0464 100644 --- a/src/world/area_jan/common/MoveBushTemplates.h +++ b/src/world/area_jan/common/MoveBushTemplates.h @@ -3,53 +3,53 @@ #define EVT_MOVE_BUSHES(collider, bushModelL, bushmodelR, moveVarL, moveVarR) \ { \ - EVT_CALL(PlaySoundAtCollider, collider, SOUND_SEPARATE_BUSHES, 0) \ - EVT_SET(LVar0, moveVarL) \ - EVT_SET(LVar1, moveVarR) \ - EVT_SET(LVar6, 0) \ - EVT_SET(LVar7, 0) \ - EVT_LOOP(60) \ - EVT_SETF(LVar2, moveVarL) \ - EVT_SETF(LVar3, moveVarR) \ - EVT_SUBF(LVar2, LVar0) \ - EVT_SUBF(LVar3, LVar1) \ - EVT_SETF(LVar4, LVar2) \ - EVT_SETF(LVar5, LVar3) \ - EVT_MULF(LVar4, EVT_FLOAT(0.09375)) \ - EVT_MULF(LVar5, EVT_FLOAT(0.09375)) \ - EVT_MULF(LVar6, EVT_FLOAT(0.8)) \ - EVT_MULF(LVar7, EVT_FLOAT(0.8)) \ - EVT_ADDF(LVar6, LVar4) \ - EVT_ADDF(LVar7, LVar5) \ - EVT_ADDF(LVar0, LVar6) \ - EVT_ADDF(LVar1, LVar7) \ - EVT_CALL(TranslateModel, bushModelL, moveVarL, 0, 0) \ - EVT_CALL(TranslateModel, bushmodelR, moveVarR, 0, 0) \ - EVT_CALL(N(MoveBush_AnimateShearing), bushModelL, LVar6) \ - EVT_CALL(N(MoveBush_AnimateShearing), bushmodelR, LVar7) \ - EVT_WAIT(1) \ - EVT_END_LOOP \ - EVT_RETURN \ - EVT_END \ + Call(PlaySoundAtCollider, collider, SOUND_SEPARATE_BUSHES, 0) \ + Set(LVar0, moveVarL) \ + Set(LVar1, moveVarR) \ + Set(LVar6, 0) \ + Set(LVar7, 0) \ + Loop(60) \ + SetF(LVar2, moveVarL) \ + SetF(LVar3, moveVarR) \ + SubF(LVar2, LVar0) \ + SubF(LVar3, LVar1) \ + SetF(LVar4, LVar2) \ + SetF(LVar5, LVar3) \ + MulF(LVar4, Float(0.09375)) \ + MulF(LVar5, Float(0.09375)) \ + MulF(LVar6, Float(0.8)) \ + MulF(LVar7, Float(0.8)) \ + AddF(LVar6, LVar4) \ + AddF(LVar7, LVar5) \ + AddF(LVar0, LVar6) \ + AddF(LVar1, LVar7) \ + Call(TranslateModel, bushModelL, moveVarL, 0, 0) \ + Call(TranslateModel, bushmodelR, moveVarR, 0, 0) \ + Call(N(MoveBush_AnimateShearing), bushModelL, LVar6) \ + Call(N(MoveBush_AnimateShearing), bushmodelR, LVar7) \ + Wait(1) \ + EndLoop \ + Return \ + End \ } #define EVT_MOVE_BUSH(collider, bushModel, moveVar) \ { \ - EVT_CALL(PlaySoundAtCollider, collider, SOUND_SEPARATE_BUSHES, 0) \ - EVT_SET(LVar0, MV_CliffTopBush1OffsetR) \ - EVT_SET(LVar6, 0) \ - EVT_LOOP(60) \ - EVT_SETF(LVar2, moveVar) \ - EVT_SUBF(LVar2, LVar0) \ - EVT_SETF(LVar4, LVar2) \ - EVT_MULF(LVar4, EVT_FLOAT(0.09375)) \ - EVT_MULF(LVar6, EVT_FLOAT(0.8)) \ - EVT_ADDF(LVar6, LVar4) \ - EVT_ADDF(LVar0, LVar6) \ - EVT_CALL(TranslateModel, bushModel, moveVar, 0, 0) \ - EVT_CALL(N(MoveBush_AnimateShearing), bushModel, LVar6) \ - EVT_WAIT(1) \ - EVT_END_LOOP \ - EVT_RETURN \ - EVT_END \ + Call(PlaySoundAtCollider, collider, SOUND_SEPARATE_BUSHES, 0) \ + Set(LVar0, MV_CliffTopBush1OffsetR) \ + Set(LVar6, 0) \ + Loop(60) \ + SetF(LVar2, moveVar) \ + SubF(LVar2, LVar0) \ + SetF(LVar4, LVar2) \ + MulF(LVar4, Float(0.09375)) \ + MulF(LVar6, Float(0.8)) \ + AddF(LVar6, LVar4) \ + AddF(LVar0, LVar6) \ + Call(TranslateModel, bushModel, moveVar, 0, 0) \ + Call(N(MoveBush_AnimateShearing), bushModel, LVar6) \ + Wait(1) \ + EndLoop \ + Return \ + End \ } diff --git a/src/world/area_jan/common/PullVine.inc.c b/src/world/area_jan/common/PullVine.inc.c index e4c6596db50..acb92eeb714 100644 --- a/src/world/area_jan/common/PullVine.inc.c +++ b/src/world/area_jan/common/PullVine.inc.c @@ -52,143 +52,143 @@ API_CALLABLE(N(PullVine_UpdatePosition)) { // LVarC unique vine index // LVar5 drop delay EvtScript N(EVS_PullVine_Manage) = { - EVT_CALL(GetModelCenter, LVarE) - EVT_SET(LVar6, LVar0) - EVT_SET(LVar7, LVar1) - EVT_SET(LVar8, LVar2) - EVT_ADD(LVar7, -20) - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(N(PullVine_WaitForPlayerGrab), LVar6, LVar7, LVar8, 20) - EVT_CALL(GetPlayerActionState, LVar1) - EVT_IF_NE(LVar1, ACTION_STATE_JUMP) - EVT_SET(LVar0, 0) - EVT_END_IF - EVT_IF_EQ(LVar0, 1) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(GetModelCenter, LVarD) - EVT_CALL(PlaySoundAt, SOUND_PULL_VINE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_SETF(LVar0, EVT_FLOAT(0.0)) - EVT_SETF(LVar1, EVT_FLOAT(0.0)) - EVT_THREAD - EVT_LOOP(3) - EVT_IF_NE(LVar9, 0) - EVT_CALL(TranslateModel, LVar9, -2, 0, 0) - EVT_END_IF - EVT_IF_NE(LVarA, 0) - EVT_CALL(TranslateModel, LVarA, -1, 0, 0) - EVT_END_IF - EVT_IF_NE(LVarB, 0) - EVT_CALL(TranslateModel, LVarB, 2, 0, 0) - EVT_END_IF - EVT_WAIT(1) - EVT_IF_NE(LVar9, 0) - EVT_CALL(TranslateModel, LVar9, 2, 0, 0) - EVT_END_IF - EVT_IF_NE(LVarA, 0) - EVT_CALL(TranslateModel, LVarA, 1, 0, 0) - EVT_END_IF - EVT_IF_NE(LVarB, 0) - EVT_CALL(TranslateModel, LVarB, -2, 0, 0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_NE(LVar9, 0) - EVT_CALL(TranslateModel, LVar9, 0, 0, 0) - EVT_END_IF - EVT_IF_NE(LVarA, 0) - EVT_CALL(TranslateModel, LVarA, 0, 0, 0) - EVT_END_IF - EVT_IF_NE(LVarB, 0) - EVT_CALL(TranslateModel, LVarB, 0, 0, 0) - EVT_END_IF - EVT_END_THREAD - EVT_IF_EQ(LVar5, 0) - EVT_EXEC(PULL_VINE_CALLBACK_SCRIPT) - EVT_ELSE - EVT_THREAD - EVT_WAIT(LVar5) - EVT_EXEC(PULL_VINE_CALLBACK_SCRIPT) - EVT_END_THREAD - EVT_END_IF - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_HoldOnto) - EVT_LOOP(50) - EVT_CALL(N(PullVine_UpdatePosition), LVar0, EVT_FLOAT(-15.0), LVar2) - EVT_ADDF(LVar1, LVar2) - EVT_MULF(LVar1, EVT_FLOAT(0.93)) - EVT_ADDF(LVar0, LVar1) - EVT_CALL(TranslateModel, LVarD, 0, LVar0, 0) - EVT_CALL(TranslateModel, LVarE, 0, LVar0, 0) - EVT_SET(LVar3, LVar7) - EVT_ADD(LVar3, LVar0) - EVT_SET(LVar4, LVar8) - EVT_ADD(LVar4, 2) - EVT_ADD(LVar3, 5) - EVT_CALL(SetPlayerPos, LVar6, LVar3, LVar4) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetModelCenter, LVarF) - EVT_CALL(SetPlayerJumpscale, 1) - EVT_CALL(PlayerJump, LVar6, LVar1, LVar4, 10) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(GetModelCenter, LVarD) - EVT_CALL(PlaySoundAt, SOUND_PULL_VINE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_WAIT(10) - EVT_LOOP(5) - EVT_IF_NE(LVar9, 0) - EVT_CALL(TranslateModel, LVar9, -2, 0, 0) - EVT_END_IF - EVT_IF_NE(LVarA, 0) - EVT_CALL(TranslateModel, LVarA, -1, 0, 0) - EVT_END_IF - EVT_IF_NE(LVarB, 0) - EVT_CALL(TranslateModel, LVarB, 2, 0, 0) - EVT_END_IF - EVT_WAIT(1) - EVT_IF_NE(LVar9, 0) - EVT_CALL(TranslateModel, LVar9, 2, 0, 0) - EVT_END_IF - EVT_IF_NE(LVarA, 0) - EVT_CALL(TranslateModel, LVarA, 1, 0, 0) - EVT_END_IF - EVT_IF_NE(LVarB, 0) - EVT_CALL(TranslateModel, LVarB, -2, 0, 0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_NE(LVar9, 0) - EVT_CALL(TranslateModel, LVar9, 0, 0, 0) - EVT_END_IF - EVT_IF_NE(LVarA, 0) - EVT_CALL(TranslateModel, LVarA, 0, 0, 0) - EVT_END_IF - EVT_IF_NE(LVarB, 0) - EVT_CALL(TranslateModel, LVarB, 0, 0, 0) - EVT_END_IF - EVT_END_THREAD - EVT_THREAD - EVT_SETF(LVar0, EVT_FLOAT(-15.0)) - EVT_SETF(LVar1, EVT_FLOAT(0.0)) - EVT_LOOP(100) - EVT_CALL(N(PullVine_UpdatePosition), LVar0, EVT_FLOAT(20.0), LVar2) - EVT_ADDF(LVar1, LVar2) - EVT_MULF(LVar1, EVT_FLOAT(0.93)) - EVT_ADDF(LVar0, LVar1) - EVT_CALL(TranslateModel, LVarD, 0, LVar0, 0) - EVT_CALL(TranslateModel, LVarE, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(GetModelCenter, LVarE) + Set(LVar6, LVar0) + Set(LVar7, LVar1) + Set(LVar8, LVar2) + Add(LVar7, -20) + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(N(PullVine_WaitForPlayerGrab), LVar6, LVar7, LVar8, 20) + Call(GetPlayerActionState, LVar1) + IfNe(LVar1, ACTION_STATE_JUMP) + Set(LVar0, 0) + EndIf + IfEq(LVar0, 1) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(GetModelCenter, LVarD) + Call(PlaySoundAt, SOUND_PULL_VINE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + SetF(LVar0, Float(0.0)) + SetF(LVar1, Float(0.0)) + Thread + Loop(3) + IfNe(LVar9, 0) + Call(TranslateModel, LVar9, -2, 0, 0) + EndIf + IfNe(LVarA, 0) + Call(TranslateModel, LVarA, -1, 0, 0) + EndIf + IfNe(LVarB, 0) + Call(TranslateModel, LVarB, 2, 0, 0) + EndIf + Wait(1) + IfNe(LVar9, 0) + Call(TranslateModel, LVar9, 2, 0, 0) + EndIf + IfNe(LVarA, 0) + Call(TranslateModel, LVarA, 1, 0, 0) + EndIf + IfNe(LVarB, 0) + Call(TranslateModel, LVarB, -2, 0, 0) + EndIf + Wait(1) + EndLoop + IfNe(LVar9, 0) + Call(TranslateModel, LVar9, 0, 0, 0) + EndIf + IfNe(LVarA, 0) + Call(TranslateModel, LVarA, 0, 0, 0) + EndIf + IfNe(LVarB, 0) + Call(TranslateModel, LVarB, 0, 0, 0) + EndIf + EndThread + IfEq(LVar5, 0) + Exec(PULL_VINE_CALLBACK_SCRIPT) + Else + Thread + Wait(LVar5) + Exec(PULL_VINE_CALLBACK_SCRIPT) + EndThread + EndIf + Call(SetPlayerActionState, ACTION_STATE_LAND) + Wait(1) + Call(SetPlayerAnimation, ANIM_MarioW2_HoldOnto) + Loop(50) + Call(N(PullVine_UpdatePosition), LVar0, Float(-15.0), LVar2) + AddF(LVar1, LVar2) + MulF(LVar1, Float(0.93)) + AddF(LVar0, LVar1) + Call(TranslateModel, LVarD, 0, LVar0, 0) + Call(TranslateModel, LVarE, 0, LVar0, 0) + Set(LVar3, LVar7) + Add(LVar3, LVar0) + Set(LVar4, LVar8) + Add(LVar4, 2) + Add(LVar3, 5) + Call(SetPlayerPos, LVar6, LVar3, LVar4) + Wait(1) + EndLoop + Call(GetModelCenter, LVarF) + Call(SetPlayerJumpscale, 1) + Call(PlayerJump, LVar6, LVar1, LVar4, 10) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(GetModelCenter, LVarD) + Call(PlaySoundAt, SOUND_PULL_VINE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Thread + Wait(10) + Loop(5) + IfNe(LVar9, 0) + Call(TranslateModel, LVar9, -2, 0, 0) + EndIf + IfNe(LVarA, 0) + Call(TranslateModel, LVarA, -1, 0, 0) + EndIf + IfNe(LVarB, 0) + Call(TranslateModel, LVarB, 2, 0, 0) + EndIf + Wait(1) + IfNe(LVar9, 0) + Call(TranslateModel, LVar9, 2, 0, 0) + EndIf + IfNe(LVarA, 0) + Call(TranslateModel, LVarA, 1, 0, 0) + EndIf + IfNe(LVarB, 0) + Call(TranslateModel, LVarB, -2, 0, 0) + EndIf + Wait(1) + EndLoop + IfNe(LVar9, 0) + Call(TranslateModel, LVar9, 0, 0, 0) + EndIf + IfNe(LVarA, 0) + Call(TranslateModel, LVarA, 0, 0, 0) + EndIf + IfNe(LVarB, 0) + Call(TranslateModel, LVarB, 0, 0, 0) + EndIf + EndThread + Thread + SetF(LVar0, Float(-15.0)) + SetF(LVar1, Float(0.0)) + Loop(100) + Call(N(PullVine_UpdatePosition), LVar0, Float(20.0), LVar2) + AddF(LVar1, LVar2) + MulF(LVar1, Float(0.93)) + AddF(LVar0, LVar1) + Call(TranslateModel, LVarD, 0, LVar0, 0) + Call(TranslateModel, LVarE, 0, LVar0, 0) + Wait(1) + EndLoop + EndThread + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + EndIf + Wait(1) + Goto(0) + Return + End }; diff --git a/src/world/area_jan/jan_00/jan_00_0_header.c b/src/world/area_jan/jan_00/jan_00_0_header.c index fb5cb603a9c..1f0083ffc4d 100644 --- a/src/world/area_jan/jan_00/jan_00_0_header.c +++ b/src/world/area_jan/jan_00/jan_00_0_header.c @@ -18,8 +18,8 @@ MapSettings N(settings) = { }; EvtScript N(EVS_80241C10) = { - EVT_CALL(SetMusicTrack, 0, SONG_YOSHIS_VILLAGE, 0, 8) - EVT_CALL(ClearAmbientSounds, 250) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_YOSHIS_VILLAGE, 0, 8) + Call(ClearAmbientSounds, 250) + Return + End }; diff --git a/src/world/area_jan/jan_00/jan_00_1_main.c b/src/world/area_jan/jan_00/jan_00_1_main.c index ed11b11988e..bbbcea579af 100644 --- a/src/world/area_jan/jan_00/jan_00_1_main.c +++ b/src/world/area_jan/jan_00/jan_00_1_main.c @@ -21,53 +21,53 @@ EvtScript N(EVS_ExitWalk_jan_01_0) = EVT_EXIT_WALK(60, jan_00_ENTRY_1, "jan_01", EvtScript N(EVS_ExitWalk_jan_08_0) = EVT_EXIT_WALK(60, jan_00_ENTRY_2, "jan_08", jan_08_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_01_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_08_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_jan_01_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_jan_08_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_JADE_JUNGLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SET(GF_MAP_JadeJungle, TRUE) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(EnableTexPanning, MODEL_o135, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o142, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o52, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_JADE_JUNGLE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Set(GF_MAP_JadeJungle, TRUE) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(EnableTexPanning, MODEL_o135, TRUE) + Call(EnableTexPanning, MODEL_o142, TRUE) + Call(EnableTexPanning, MODEL_o52, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 0, 400, 0, 0) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_3) TEX_PAN_PARAMS_STEP( -100, 200, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_EXEC(N(EVS_802467AC)) - EVT_EXEC(N(EVS_80247A2C)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitne, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitse, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, jan_00_ENTRY_0) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_IF - EVT_CALL(func_8024030C_B2084C) - EVT_EXEC_WAIT(N(EVS_80241C10)) - EVT_CALL(PlaySound, SOUND_LOOP_JAN_BEACH_WAVES) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Exec(N(EVS_802467AC)) + Exec(N(EVS_80247A2C)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitne, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitse, COLLIDER_FLAGS_UPPER_MASK) + Call(GetEntryID, LVar0) + IfEq(LVar0, jan_00_ENTRY_0) + Exec(N(EVS_BindExitTriggers)) + Else + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndIf + Call(func_8024030C_B2084C) + ExecWait(N(EVS_80241C10)) + Call(PlaySound, SOUND_LOOP_JAN_BEACH_WAVES) + Return + End }; diff --git a/src/world/area_jan/jan_00/jan_00_2_npc.c b/src/world/area_jan/jan_00/jan_00_2_npc.c index b99d6c19a94..52d3057b365 100644 --- a/src/world/area_jan/jan_00/jan_00_2_npc.c +++ b/src/world/area_jan/jan_00/jan_00_2_npc.c @@ -21,22 +21,22 @@ s32 N(LetterList)[] = { }; EvtScript N(EVS_LetterPrompt_Kolorado) = { - EVT_CALL(N(LetterDelivery_Init), + Call(N(LetterDelivery_Init), NPC_Kolorado_02, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, ITEM_LETTER_TO_KOLORADO, ITEM_NONE, MSG_CH5_001D, MSG_CH5_001E, MSG_CH5_001F, MSG_CH5_0020, - EVT_PTR(N(LetterList))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) - EVT_RETURN - EVT_END + Ref(N(LetterList))) + ExecWait(N(EVS_DoLetterDelivery)) + Return + End }; EvtScript N(EVS_LetterReward_Kolorado) = { - EVT_IF_EQ(LVarC, DELIVERY_ACCEPTED) + IfEq(LVarC, DELIVERY_ACCEPTED) EVT_GIVE_STAR_PIECE() - EVT_END_IF - EVT_RETURN - EVT_END + EndIf + Return + End }; API_CALLABLE(func_80240B4C_B2108C) { @@ -226,173 +226,173 @@ API_CALLABLE(func_80241134_B21674) { } EvtScript N(D_80242D90_B232D0) = { - EVT_CALL(N(func_80240CF8_B21238), LVar0) - EVT_RETURN - EVT_END + Call(N(func_80240CF8_B21238), LVar0) + Return + End }; EvtScript N(D_80242DB0_B232F0) = { - EVT_CALL(GetNpcPos, NPC_Whale, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_ELSE - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 1) - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 1) - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, -300) - EVT_CALL(GetNpcPos, NPC_Whale, LVar0, LVar1, LVar2) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_ELSE - EVT_SET(LVar3, LVar0) - EVT_SUB(LVar3, -300) - EVT_CALL(GetNpcPos, NPC_Whale, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, LVar3) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_Whale, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + IfEq(LVar0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Else + Call(SetCamSpeed, CAM_DEFAULT, 1) + EndIf + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, 1) + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar0, -300) + Call(GetNpcPos, NPC_Whale, LVar0, LVar1, LVar2) + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Else + Set(LVar3, LVar0) + Sub(LVar3, -300) + Call(GetNpcPos, NPC_Whale, LVar0, LVar1, LVar2) + Sub(LVar0, LVar3) + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(D_80242FA8_B234E8) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_THREAD - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 310) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 310) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(5.0), EVT_FLOAT(0.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(60) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 180, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(500.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(0.0), EVT_FLOAT(0.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.4)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_SET(LVar0, 0) - EVT_EXEC_GET_TID(N(D_80242D90_B232D0), LVar3) - EVT_SET(LVar0, 1) - EVT_EXEC_GET_TID(N(D_80242D90_B232D0), LVar4) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_REACHED_LAVA_LAVA_ISLAND) - EVT_SET(LVar0, 2) - EVT_EXEC_GET_TID(N(D_80242D90_B232D0), LVar5) - EVT_END_IF - EVT_CALL(N(func_80240F14_B21454), 1) - EVT_KILL_THREAD(LVar3) - EVT_KILL_THREAD(LVar4) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_REACHED_LAVA_LAVA_ISLAND) - EVT_KILL_THREAD(LVar5) - EVT_END_IF - EVT_WAIT(1) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_REACHED_LAVA_LAVA_ISLAND) - EVT_CALL(func_80240B4C_B2108C, 3, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcFlagBits, NPC_Kolorado_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Kolorado_02, ANIM_Kolorado_Walk) - EVT_CALL(NpcMoveTo, NPC_Kolorado_02, LVar0, LVar2, 10) - EVT_CALL(SetNpcAnimation, NPC_Kolorado_02, ANIM_Kolorado_Thrown) - EVT_CALL(SetNpcJumpscale, NPC_Kolorado_02, EVT_FLOAT(1.0)) - EVT_CALL(PlaySoundAtNpc, NPC_Kolorado_02, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Kolorado_02, 224, 0, 20, 20) - EVT_CALL(SetNpcAnimation, NPC_Kolorado_02, ANIM_Kolorado_Walk) - EVT_CALL(NpcMoveTo, NPC_Kolorado_02, 290, 20, 20) - EVT_CALL(SetNpcAnimation, NPC_Kolorado_02, ANIM_Kolorado_Idle) - EVT_CALL(SetNpcFlagBits, NPC_Kolorado_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(InterpNpcYaw, NPC_Kolorado_02, 270, 0) - EVT_END_IF - EVT_CALL(func_80240B4C_B2108C, 3, LVar0, LVar1, LVar2) - EVT_CALL(PlayerMoveTo, LVar0, LVar2, 15) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(PlayerJump, 224, 0, 20, 20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Walk) - EVT_CALL(PlayerMoveTo, 260, 20, 15) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(func_80240B4C_B2108C, 3, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) - EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 20) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_PARTNER, 224, 0, 20, 20) - EVT_CALL(PartnerIsFlying, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_WAIT(10) - EVT_CALL(DisablePartnerAI, 0) - EVT_END_IF - EVT_CALL(NpcMoveTo, NPC_PARTNER, 230, 20, 10) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_TalkSad) - EVT_CALL(SetNpcJumpscale, NPC_Whale, 0) - EVT_CALL(NpcJump0, NPC_Whale, 158, -10, -38, 20) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Still, 5, MSG_CH5_0000) - EVT_CALL(SetMusicTrack, 0, SONG_YOSHIS_VILLAGE, 0, 8) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_REACHED_LAVA_LAVA_ISLAND) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(5.0), 0, 300, 15, EVT_FLOAT(-6.0)) - EVT_CALL(InterpNpcYaw, NPC_Kolorado_02, 90, 0) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_Kolorado_02, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 1, MSG_CH5_0001) - EVT_WAIT(5) - EVT_CALL(InterpNpcYaw, NPC_Kolorado_02, 270, 4) - EVT_WAIT(10) - EVT_CALL(InterpNpcYaw, NPC_Kolorado_02, 90, 4) - EVT_WAIT(15) - EVT_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_Kolorado_02, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(GetNpcPos, NPC_Kolorado_02, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Kolorado_02, LVar0, LVar1, LVar2, 15) - EVT_WAIT(25) - EVT_CALL(NpcFacePlayer, NPC_Kolorado_02, 4) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Kolorado_02, ANIM_Kolorado_Panic, ANIM_Kolorado_Yell, 5, MSG_CH5_0002) - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Idle) - EVT_CALL(SetNpcSpeed, NPC_Kolorado_02, EVT_FLOAT(6.0)) - EVT_CALL(SetNpcAnimation, NPC_Kolorado_02, ANIM_Kolorado_Walk) - EVT_CALL(NpcMoveTo, NPC_Kolorado_02, 330, 190, 0) - EVT_CALL(SetNpcPos, NPC_Kolorado_02, NPC_DISPOSE_LOCATION) - EVT_SET(GB_StoryProgress, STORY_CH5_REACHED_LAVA_LAVA_ISLAND) - EVT_SETF(LVar9, EVT_FLOAT(4.0)) - EVT_ELSE - EVT_SETF(LVar9, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_EXEC(N(D_80245860_B25DA0)) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(ResetCam, CAM_DEFAULT, LVar9) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Thread + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 310) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 310) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-7.5)) + Call(SetCamPosA, CAM_DEFAULT, Float(5.0), Float(0.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(60) + Call(SetPanTarget, CAM_DEFAULT, 180, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(500.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-7.5)) + Call(SetCamPosA, CAM_DEFAULT, Float(0.0), Float(0.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.4)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Set(LVar0, 0) + ExecGetTID(N(D_80242D90_B232D0), LVar3) + Set(LVar0, 1) + ExecGetTID(N(D_80242D90_B232D0), LVar4) + IfLt(GB_StoryProgress, STORY_CH5_REACHED_LAVA_LAVA_ISLAND) + Set(LVar0, 2) + ExecGetTID(N(D_80242D90_B232D0), LVar5) + EndIf + Call(N(func_80240F14_B21454), 1) + KillThread(LVar3) + KillThread(LVar4) + IfLt(GB_StoryProgress, STORY_CH5_REACHED_LAVA_LAVA_ISLAND) + KillThread(LVar5) + EndIf + Wait(1) + IfLt(GB_StoryProgress, STORY_CH5_REACHED_LAVA_LAVA_ISLAND) + Call(func_80240B4C_B2108C, 3, LVar0, LVar1, LVar2) + Call(SetNpcFlagBits, NPC_Kolorado_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_Kolorado_02, ANIM_Kolorado_Walk) + Call(NpcMoveTo, NPC_Kolorado_02, LVar0, LVar2, 10) + Call(SetNpcAnimation, NPC_Kolorado_02, ANIM_Kolorado_Thrown) + Call(SetNpcJumpscale, NPC_Kolorado_02, Float(1.0)) + Call(PlaySoundAtNpc, NPC_Kolorado_02, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Kolorado_02, 224, 0, 20, 20) + Call(SetNpcAnimation, NPC_Kolorado_02, ANIM_Kolorado_Walk) + Call(NpcMoveTo, NPC_Kolorado_02, 290, 20, 20) + Call(SetNpcAnimation, NPC_Kolorado_02, ANIM_Kolorado_Idle) + Call(SetNpcFlagBits, NPC_Kolorado_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(InterpNpcYaw, NPC_Kolorado_02, 270, 0) + EndIf + Call(func_80240B4C_B2108C, 3, LVar0, LVar1, LVar2) + Call(PlayerMoveTo, LVar0, LVar2, 15) + Call(SetPlayerJumpscale, Float(1.0)) + Call(PlayerJump, 224, 0, 20, 20) + Call(SetPlayerAnimation, ANIM_Mario1_Walk) + Call(PlayerMoveTo, 260, 20, 15) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(func_80240B4C_B2108C, 3, LVar0, LVar1, LVar2) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) + Call(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 20) + Call(SetNpcJumpscale, NPC_PARTNER, Float(1.0)) + Call(NpcJump0, NPC_PARTNER, 224, 0, 20, 20) + Call(PartnerIsFlying, LVar0) + IfEq(LVar0, FALSE) + Call(EnablePartnerAI) + Wait(10) + Call(DisablePartnerAI, 0) + EndIf + Call(NpcMoveTo, NPC_PARTNER, 230, 20, 10) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_TalkSad) + Call(SetNpcJumpscale, NPC_Whale, 0) + Call(NpcJump0, NPC_Whale, 158, -10, -38, 20) + Call(InterpPlayerYaw, 270, 0) + Call(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Still, 5, MSG_CH5_0000) + Call(SetMusicTrack, 0, SONG_YOSHIS_VILLAGE, 0, 8) + IfLt(GB_StoryProgress, STORY_CH5_REACHED_LAVA_LAVA_ISLAND) + Call(AdjustCam, CAM_DEFAULT, Float(5.0), 0, 300, 15, Float(-6.0)) + Call(InterpNpcYaw, NPC_Kolorado_02, 90, 0) + Wait(20) + Call(SpeakToPlayer, NPC_Kolorado_02, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 1, MSG_CH5_0001) + Wait(5) + Call(InterpNpcYaw, NPC_Kolorado_02, 270, 4) + Wait(10) + Call(InterpNpcYaw, NPC_Kolorado_02, 90, 4) + Wait(15) + Thread + Call(PlaySoundAtNpc, NPC_Kolorado_02, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(GetNpcPos, NPC_Kolorado_02, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Kolorado_02, LVar0, LVar1, LVar2, 15) + Wait(25) + Call(NpcFacePlayer, NPC_Kolorado_02, 4) + EndThread + Call(SpeakToPlayer, NPC_Kolorado_02, ANIM_Kolorado_Panic, ANIM_Kolorado_Yell, 5, MSG_CH5_0002) + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Idle) + Call(SetNpcSpeed, NPC_Kolorado_02, Float(6.0)) + Call(SetNpcAnimation, NPC_Kolorado_02, ANIM_Kolorado_Walk) + Call(NpcMoveTo, NPC_Kolorado_02, 330, 190, 0) + Call(SetNpcPos, NPC_Kolorado_02, NPC_DISPOSE_LOCATION) + Set(GB_StoryProgress, STORY_CH5_REACHED_LAVA_LAVA_ISLAND) + SetF(LVar9, Float(4.0)) + Else + SetF(LVar9, Float(1.0)) + EndIf + Exec(N(D_80245860_B25DA0)) + Call(DisablePlayerPhysics, FALSE) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Call(ResetCam, CAM_DEFAULT, LVar9) + Return + End }; EvtScript N(D_802437C4_B23D04) = { - EVT_LABEL(0) - EVT_CALL(GetNpcYaw, NPC_Whale, LVar0) - EVT_CALL(InterpPlayerYaw, LVar0, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetNpcYaw, NPC_Whale, LVar0) + Call(InterpPlayerYaw, LVar0, 0) + Call(InterpNpcYaw, NPC_PARTNER, LVar0, 0) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_NpcIdle_Kolorado_01) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 250, 0, 200) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 250, 0, 200) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(20.0), EVT_FLOAT(0.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC(N(D_80242FA8_B234E8)) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, 250, 0, 200) + Call(SetPanTarget, CAM_DEFAULT, 250, 0, 200) + Call(SetCamPosA, CAM_DEFAULT, Float(20.0), Float(0.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Exec(N(D_80242FA8_B234E8)) + Return + End }; Vec3f N(D_802438E4_B23E24)[] = { @@ -402,241 +402,241 @@ Vec3f N(D_802438E4_B23E24)[] = { }; EvtScript N(EVS_NpcInteract_Kolorado_01) = { - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Still, 5, MSG_CH5_0003) - EVT_CALL(ShowChoice, MSG_Choice_0010) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(ContinueSpeech, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Still, 5, MSG_CH5_0005) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(EndSpeech, NPC_SELF, -1, -1, 5) - EVT_IF_EQ(GB_StoryProgress, STORY_CH5_TRADED_VASE_FOR_SEED) - EVT_CALL(NpcFacePlayer, NPC_Kolorado_02, 0) - EVT_END_IF - EVT_CALL(SetNpcJumpscale, NPC_SELF, 0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_SELF, 158, -50, -38, 20) - EVT_SET(LVar0, 0) - EVT_EXEC(N(D_80242DB0_B232F0)) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_CALL(func_80240B4C_B2108C, 3, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.5)) - EVT_CALL(PlayerJump, LVar0, LVar1, LVar2, 20) - EVT_CALL(func_80240B4C_B2108C, 0, LVar0, LVar1, LVar2) - EVT_CALL(PlayerMoveTo, LVar0, LVar2, 10) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_THREAD - EVT_CALL(N(func_80240CF8_B21238), 0) - EVT_END_THREAD - EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar3, LVar5, 20) - EVT_CALL(func_80240B4C_B2108C, 3, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.5)) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 18) - EVT_CALL(func_80240B4C_B2108C, 1, LVar0, LVar1, LVar2) - EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 18) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_THREAD - EVT_CALL(N(func_80240CF8_B21238), 1) - EVT_END_THREAD - EVT_IF_EQ(GB_StoryProgress, STORY_CH5_TRADED_VASE_FOR_SEED) - EVT_CALL(SetNpcAnimation, NPC_Kolorado_02, ANIM_Kolorado_Walk) - EVT_CALL(LoadPath, 20, EVT_PTR(N(D_802438E4_B23E24)), ARRAY_COUNT(N(D_802438E4_B23E24)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Kolorado_02, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(func_80240B4C_B2108C, 2, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcAnimation, NPC_Kolorado_02, ANIM_Kolorado_Thrown) - EVT_CALL(SetNpcJumpscale, NPC_Kolorado_02, EVT_FLOAT(0.5)) - EVT_CALL(PlaySoundAtNpc, NPC_Kolorado_02, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Kolorado_02, LVar0, LVar1, LVar2, 20) - EVT_CALL(SetNpcAnimation, NPC_Kolorado_02, ANIM_Kolorado_Idle) - EVT_CALL(InterpNpcYaw, NPC_Kolorado_02, 90, 0) - EVT_THREAD - EVT_CALL(N(func_80240CF8_B21238), 2) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Kolorado_02, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0007) - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH5_SUSHIE_JOINED_PARTY) - EVT_IF_EQ(GF_MAC01_Defeated_JrTroopa4, TRUE) - EVT_GOTO(90) - EVT_END_IF - EVT_CALL(SetNpcVar, NPC_JrTroopa, 0, 1) - EVT_LOOP(0) - EVT_CALL(GetNpcVar, NPC_JrTroopa, 0, LVar0) - EVT_WAIT(1) - EVT_IF_NE(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(D_802437C4_B23D04)) - EVT_CALL(N(func_80240F14_B21454), 0) - EVT_CALL(EnableGroup, MODEL_kujira, FALSE) - EVT_ELSE - EVT_LABEL(90) - EVT_EXEC(N(D_802437C4_B23D04)) - EVT_CALL(N(func_80240F14_B21454), 0) - EVT_CALL(EnableGroup, MODEL_kujira, FALSE) - EVT_CALL(GotoMap, EVT_PTR("mac_06"), mac_06_ENTRY_1) - EVT_WAIT(100) - EVT_END_IF - EVT_RETURN - EVT_END + Call(DisablePlayerPhysics, TRUE) + Call(InterpPlayerYaw, 270, 0) + Call(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Still, 5, MSG_CH5_0003) + Call(ShowChoice, MSG_Choice_0010) + IfEq(LVar0, 1) + Call(ContinueSpeech, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Still, 5, MSG_CH5_0005) + Call(DisablePlayerPhysics, FALSE) + Return + EndIf + Call(EndSpeech, NPC_SELF, -1, -1, 5) + IfEq(GB_StoryProgress, STORY_CH5_TRADED_VASE_FOR_SEED) + Call(NpcFacePlayer, NPC_Kolorado_02, 0) + EndIf + Call(SetNpcJumpscale, NPC_SELF, 0) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_SELF, 158, -50, -38, 20) + Set(LVar0, 0) + Exec(N(D_80242DB0_B232F0)) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Call(func_80240B4C_B2108C, 3, LVar0, LVar1, LVar2) + Call(SetPlayerJumpscale, Float(0.5)) + Call(PlayerJump, LVar0, LVar1, LVar2, 20) + Call(func_80240B4C_B2108C, 0, LVar0, LVar1, LVar2) + Call(PlayerMoveTo, LVar0, LVar2, 10) + Call(InterpPlayerYaw, 90, 0) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Thread + Call(N(func_80240CF8_B21238), 0) + EndThread + Call(NpcMoveTo, NPC_PARTNER, LVar3, LVar5, 20) + Call(func_80240B4C_B2108C, 3, LVar0, LVar1, LVar2) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.5)) + Call(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 18) + Call(func_80240B4C_B2108C, 1, LVar0, LVar1, LVar2) + Call(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 18) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + Thread + Call(N(func_80240CF8_B21238), 1) + EndThread + IfEq(GB_StoryProgress, STORY_CH5_TRADED_VASE_FOR_SEED) + Call(SetNpcAnimation, NPC_Kolorado_02, ANIM_Kolorado_Walk) + Call(LoadPath, 20, Ref(N(D_802438E4_B23E24)), ARRAY_COUNT(N(D_802438E4_B23E24)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Kolorado_02, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(func_80240B4C_B2108C, 2, LVar0, LVar1, LVar2) + Call(SetNpcAnimation, NPC_Kolorado_02, ANIM_Kolorado_Thrown) + Call(SetNpcJumpscale, NPC_Kolorado_02, Float(0.5)) + Call(PlaySoundAtNpc, NPC_Kolorado_02, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Kolorado_02, LVar0, LVar1, LVar2, 20) + Call(SetNpcAnimation, NPC_Kolorado_02, ANIM_Kolorado_Idle) + Call(InterpNpcYaw, NPC_Kolorado_02, 90, 0) + Thread + Call(N(func_80240CF8_B21238), 2) + EndThread + Call(SpeakToPlayer, NPC_Kolorado_02, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0007) + EndIf + IfGe(GB_StoryProgress, STORY_CH5_SUSHIE_JOINED_PARTY) + IfEq(GF_MAC01_Defeated_JrTroopa4, TRUE) + Goto(90) + EndIf + Call(SetNpcVar, NPC_JrTroopa, 0, 1) + Loop(0) + Call(GetNpcVar, NPC_JrTroopa, 0, LVar0) + Wait(1) + IfNe(LVar0, 1) + BreakLoop + EndIf + EndLoop + Exec(N(D_802437C4_B23D04)) + Call(N(func_80240F14_B21454), 0) + Call(EnableGroup, MODEL_kujira, FALSE) + Else + Label(90) + Exec(N(D_802437C4_B23D04)) + Call(N(func_80240F14_B21454), 0) + Call(EnableGroup, MODEL_kujira, FALSE) + Call(GotoMap, Ref("mac_06"), mac_06_ENTRY_1) + Wait(100) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Kolorado_01) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_NO_SPRITE, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Still) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, jan_00_ENTRY_0) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 90) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Kolorado_01))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Kolorado_01))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, 158, -10, -38) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Kolorado_01))) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_NO_SPRITE, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Still) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Call(GetEntryID, LVar0) + IfEq(LVar0, jan_00_ENTRY_0) + Call(DisablePlayerPhysics, TRUE) + Call(InterpPlayerYaw, 90, 0) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcYaw, NPC_PARTNER, 90) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Kolorado_01))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Kolorado_01))) + Else + Call(SetNpcPos, NPC_SELF, 158, -10, -38) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Kolorado_01))) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Kolorado_02) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0006) - EVT_EXEC_WAIT(N(EVS_LetterPrompt_Kolorado)) - EVT_EXEC_WAIT(N(EVS_LetterReward_Kolorado)) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0006) + ExecWait(N(EVS_LetterPrompt_Kolorado)) + ExecWait(N(EVS_LetterReward_Kolorado)) + Return + End }; EvtScript N(EVS_NpcInit_Kolorado_02) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH5_TRADED_VASE_FOR_SEED) - EVT_CALL(SetNpcPos, NPC_SELF, 290, 0, 20) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 1) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Kolorado_02))) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH5_TRADED_VASE_FOR_SEED) + Call(SetNpcPos, NPC_SELF, 290, 0, 20) + Call(InterpNpcYaw, NPC_SELF, 270, 1) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Kolorado_02))) + EndIf + Return + End }; EvtScript N(D_802441C8_B24708) = { - EVT_LOOP(0) - EVT_CALL(PlayerFaceNpc, NPC_JrTroopa, FALSE) - EVT_CALL(NpcFaceNpc, NPC_Kolorado_02, NPC_JrTroopa, 0) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_JrTroopa, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(PlayerFaceNpc, NPC_JrTroopa, FALSE) + Call(NpcFaceNpc, NPC_Kolorado_02, NPC_JrTroopa, 0) + Call(NpcFaceNpc, NPC_PARTNER, NPC_JrTroopa, 0) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_JrTroopa) = { - EVT_LABEL(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, 0xFFFFFFFF, 0xFFFFFFFF, 5, MSG_CH5_0008) - EVT_EXEC_GET_TID(N(D_802441C8_B24708), LVar9) - EVT_CALL(SetMusicTrack, 0, SONG_JR_TROOPA_THEME, 0, 8) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_LOOP_JR_TROOPA_SWIM, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_CALL(func_80241134_B21674) - EVT_END_THREAD - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 85, 0, 320) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 85, 0, 320) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(22.5), EVT_FLOAT(-12.5)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(23.0), EVT_FLOAT(0.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_ChargeTripped) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(4.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, 80, 90, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 250, 0, 90) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(14.5), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.7)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Charge) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_CALL(StopSound, SOUND_LOOP_JR_TROOPA_SWIM) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_JR_TROOPA_SPLASH, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 250, 0, 90, 20) - EVT_KILL_THREAD(LVar9) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(SetSelfVar, 0, 2) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_OutOfBreath) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_TiredTalk, ANIM_JrTroopa_OutOfBreath, 5, MSG_CH5_0009) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_TiredTalk, ANIM_JrTroopa_OutOfBreath, 0, MSG_CH5_000A) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Panic) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(20) - EVT_CALL(NpcJump0, NPC_SELF, 250, 0, 90, 10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Panic, ANIM_JrTroopa_Panic, 0, MSG_CH5_000B) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Charge) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_ChargeArmsUp, ANIM_JrTroopa_Charge, 0, MSG_CH5_000C) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_ChargeTripped) - EVT_END_THREAD - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 85, 0, 320) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 85, 0, 320) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(20.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(24.0), EVT_FLOAT(0.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.5)) - EVT_CALL(NpcJump0, NPC_SELF, 80, -50, 90, 20) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_JR_TROOPA_SPLASH, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, -20, 0) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_LOOP_JR_TROOPA_SWIM, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(2.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, -555, -32, 0) - EVT_END_THREAD - EVT_WAIT(100) - EVT_CALL(GotoMap, EVT_PTR("mac_06"), mac_06_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Label(0) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Wait(1) + Goto(0) + EndIf + Call(SpeakToPlayer, NPC_SELF, 0xFFFFFFFF, 0xFFFFFFFF, 5, MSG_CH5_0008) + ExecGetTID(N(D_802441C8_B24708), LVar9) + Call(SetMusicTrack, 0, SONG_JR_TROOPA_THEME, 0, 8) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_LOOP_JR_TROOPA_SWIM, SOUND_SPACE_DEFAULT) + Thread + Call(func_80241134_B21674) + EndThread + Call(UseSettingsFrom, CAM_DEFAULT, 85, 0, 320) + Call(SetPanTarget, CAM_DEFAULT, 85, 0, 320) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, Float(22.5), Float(-12.5)) + Call(SetCamPosA, CAM_DEFAULT, Float(23.0), Float(0.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_ChargeTripped) + Call(SetNpcSpeed, NPC_SELF, Float(4.0)) + Call(NpcMoveTo, NPC_SELF, 80, 90, 0) + Call(SetPanTarget, CAM_DEFAULT, 250, 0, 90) + Call(SetCamDistance, CAM_DEFAULT, Float(250.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(14.5), Float(-10.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.7)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Charge) + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Call(StopSound, SOUND_LOOP_JR_TROOPA_SWIM) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_JR_TROOPA_SPLASH, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 250, 0, 90, 20) + KillThread(LVar9) + Thread + Wait(15) + Call(SetSelfVar, 0, 2) + EndThread + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_OutOfBreath) + Call(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_TiredTalk, ANIM_JrTroopa_OutOfBreath, 5, MSG_CH5_0009) + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_TiredTalk, ANIM_JrTroopa_OutOfBreath, 0, MSG_CH5_000A) + Wait(20) + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Panic) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) + Wait(20) + Call(NpcJump0, NPC_SELF, 250, 0, 90, 10) + Call(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Panic, ANIM_JrTroopa_Panic, 0, MSG_CH5_000B) + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Charge) + Wait(10) + Thread + Call(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_ChargeArmsUp, ANIM_JrTroopa_Charge, 0, MSG_CH5_000C) + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_ChargeTripped) + EndThread + Call(UseSettingsFrom, CAM_DEFAULT, 85, 0, 320) + Call(SetPanTarget, CAM_DEFAULT, 85, 0, 320) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, Float(20.0), Float(-10.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(24.0), Float(0.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetNpcJumpscale, NPC_SELF, Float(1.5)) + Call(NpcJump0, NPC_SELF, 80, -50, 90, 20) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_JR_TROOPA_SPLASH, SOUND_SPACE_DEFAULT) + Call(SetNpcRotation, NPC_SELF, 0, -20, 0) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_LOOP_JR_TROOPA_SWIM, SOUND_SPACE_DEFAULT) + Thread + Call(SetNpcSpeed, NPC_SELF, Float(2.0)) + Call(NpcMoveTo, NPC_SELF, -555, -32, 0) + EndThread + Wait(100) + Call(GotoMap, Ref("mac_06"), mac_06_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_NpcInit_JrTroopa) = { - EVT_IF_EQ(GF_MAC01_Defeated_JrTroopa4, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, -530, -50, 20) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_JrTroopa))) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_MAC01_Defeated_JrTroopa4, FALSE) + Call(SetNpcPos, NPC_SELF, -530, -50, 20) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_JrTroopa))) + EndIf + Return + End }; NpcData N(NpcData_Characters)[] = { diff --git a/src/world/area_jan/jan_00/jan_00_3_entity.c b/src/world/area_jan/jan_00/jan_00_3_entity.c index 92d9e9f638c..12a499ab662 100644 --- a/src/world/area_jan/jan_00/jan_00_3_entity.c +++ b/src/world/area_jan/jan_00/jan_00_3_entity.c @@ -2,19 +2,19 @@ #include "entity.h" EvtScript N(D_80245860_B25DA0) = { - EVT_CALL(MakeItemEntity, ITEM_COIN, 15, 100, 415, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_JAN00_Item_CoinA) - EVT_CALL(MakeItemEntity, ITEM_COIN, 15, 125, 415, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_JAN00_Item_CoinB) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_COIN, 15, 100, 415, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_JAN00_Item_CoinA) + Call(MakeItemEntity, ITEM_COIN, 15, 125, 415, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_JAN00_Item_CoinB) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_STOP_WATCH, 370, 0, -210, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_JAN00_Item_StopWatch) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, jan_00_ENTRY_0) - EVT_EXEC(N(D_80245860_B25DA0)) - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_SpinningFlower), 15, 0, 415, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_STOP_WATCH, 370, 0, -210, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_JAN00_Item_StopWatch) + Call(GetEntryID, LVar0) + IfNe(LVar0, jan_00_ENTRY_0) + Exec(N(D_80245860_B25DA0)) + EndIf + Call(MakeEntity, Ref(Entity_SpinningFlower), 15, 0, 415, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_jan/jan_00/jan_00_4_whale.c b/src/world/area_jan/jan_00/jan_00_4_whale.c index ea0471c69f3..909acd1324a 100644 --- a/src/world/area_jan/jan_00/jan_00_4_whale.c +++ b/src/world/area_jan/jan_00/jan_00_4_whale.c @@ -21,312 +21,312 @@ API_CALLABLE(N(UnkPlayerPosFunc)) { } EvtScript N(D_8024595C_B25E9C) = { - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, 30, 60, 30, 0, 0) - EVT_CALL(RotateModel, MODEL_o167, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o168, LVar0, -1, 0, 0) - EVT_RETURN - EVT_END + Call(N(UnkFloatFunc001), LVarC, LVar0, 30, 60, 30, 0, 0) + Call(RotateModel, MODEL_o167, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o168, LVar0, -1, 0, 0) + Return + End }; EvtScript N(D_802459D4_B25F14) = { - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, 0, 30, 30, 1, 0) - EVT_SETF(LVar1, LVar0) - EVT_DIVF(LVar1, EVT_FLOAT(3.0)) - EVT_CALL(RotateModel, MODEL_o173, LVar0, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_dou, LVar1, 0, 0, -1) - EVT_CALL(TranslateModel, MODEL_o170, -5, -68, 0) - EVT_CALL(TranslateModel, MODEL_o183, -5, -68, 0) - EVT_CALL(TranslateModel, MODEL_o167, 60, 29, -51) - EVT_CALL(TranslateModel, MODEL_o168, 60, 29, 51) - EVT_CALL(RotateModel, MODEL_o170, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o183, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o167, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o168, LVar1, 0, 0, -1) - EVT_CALL(TranslateModel, MODEL_o170, 5, 68, 0) - EVT_CALL(TranslateModel, MODEL_o183, 5, 68, 0) - EVT_CALL(TranslateModel, MODEL_o167, -60, -29, 51) - EVT_CALL(TranslateModel, MODEL_o168, -60, -29, -51) - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, 0, -40, 30, 1, 0) - EVT_CALL(TranslateModel, MODEL_bero, LVar0, 0, 0) - EVT_RETURN - EVT_END + Call(N(UnkFloatFunc001), LVarC, LVar0, 0, 30, 30, 1, 0) + SetF(LVar1, LVar0) + DivF(LVar1, Float(3.0)) + Call(RotateModel, MODEL_o173, LVar0, 0, 0, 1) + Call(RotateGroup, MODEL_dou, LVar1, 0, 0, -1) + Call(TranslateModel, MODEL_o170, -5, -68, 0) + Call(TranslateModel, MODEL_o183, -5, -68, 0) + Call(TranslateModel, MODEL_o167, 60, 29, -51) + Call(TranslateModel, MODEL_o168, 60, 29, 51) + Call(RotateModel, MODEL_o170, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_o183, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_o167, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_o168, LVar1, 0, 0, -1) + Call(TranslateModel, MODEL_o170, 5, 68, 0) + Call(TranslateModel, MODEL_o183, 5, 68, 0) + Call(TranslateModel, MODEL_o167, -60, -29, 51) + Call(TranslateModel, MODEL_o168, -60, -29, -51) + Call(N(UnkFloatFunc001), LVarC, LVar0, 0, -40, 30, 1, 0) + Call(TranslateModel, MODEL_bero, LVar0, 0, 0) + Return + End }; EvtScript N(D_80245C10_B26150) = { - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, 0, -30, 8, 1, 0) - EVT_ADDF(LVar0, EVT_FLOAT(30.0)) - EVT_SETF(LVar1, LVar0) - EVT_DIVF(LVar1, EVT_FLOAT(3.0)) - EVT_CALL(RotateModel, MODEL_o173, LVar0, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_dou, LVar1, 0, 0, -1) - EVT_CALL(TranslateModel, MODEL_o170, -5, -68, 0) - EVT_CALL(TranslateModel, MODEL_o183, -5, -68, 0) - EVT_CALL(TranslateModel, MODEL_o167, 60, 29, -51) - EVT_CALL(TranslateModel, MODEL_o168, 60, 29, 51) - EVT_CALL(RotateModel, MODEL_o170, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o183, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o167, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o168, LVar1, 0, 0, -1) - EVT_CALL(TranslateModel, MODEL_o170, 5, 68, 0) - EVT_CALL(TranslateModel, MODEL_o183, 5, 68, 0) - EVT_CALL(TranslateModel, MODEL_o167, -60, -29, 51) - EVT_CALL(TranslateModel, MODEL_o168, -60, -29, -51) - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, 0, -40, 120, 1, 0) - EVT_CALL(TranslateModel, MODEL_bero, LVar0, 0, 0) - EVT_RETURN - EVT_END + Call(N(UnkFloatFunc001), LVarC, LVar0, 0, -30, 8, 1, 0) + AddF(LVar0, Float(30.0)) + SetF(LVar1, LVar0) + DivF(LVar1, Float(3.0)) + Call(RotateModel, MODEL_o173, LVar0, 0, 0, 1) + Call(RotateGroup, MODEL_dou, LVar1, 0, 0, -1) + Call(TranslateModel, MODEL_o170, -5, -68, 0) + Call(TranslateModel, MODEL_o183, -5, -68, 0) + Call(TranslateModel, MODEL_o167, 60, 29, -51) + Call(TranslateModel, MODEL_o168, 60, 29, 51) + Call(RotateModel, MODEL_o170, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_o183, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_o167, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_o168, LVar1, 0, 0, -1) + Call(TranslateModel, MODEL_o170, 5, 68, 0) + Call(TranslateModel, MODEL_o183, 5, 68, 0) + Call(TranslateModel, MODEL_o167, -60, -29, 51) + Call(TranslateModel, MODEL_o168, -60, -29, -51) + Call(N(UnkFloatFunc001), LVarC, LVar0, 0, -40, 120, 1, 0) + Call(TranslateModel, MODEL_bero, LVar0, 0, 0) + Return + End }; EvtScript N(D_80245E5C_B2639C) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(D_80245E6C_B263AC) = { - EVT_SET(LVar1, LVarC) - EVT_MOD(LVar1, 4) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(N(UnkPlayerPosFunc)) - EVT_PLAY_EFFECT(EFFECT_DAMAGE_STARS, FX_DAMAGE_STARS_2, LVar0, LVar1, LVar2, 0, -1, 0, 5) - EVT_END_IF - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, 30, 60, 30, 0, 0) - EVT_CALL(RotateModel, MODEL_o167, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o168, LVar0, -1, 0, 0) - EVT_RETURN - EVT_END + Set(LVar1, LVarC) + Mod(LVar1, 4) + IfEq(LVar1, 0) + Call(N(UnkPlayerPosFunc)) + PlayEffect(EFFECT_DAMAGE_STARS, FX_DAMAGE_STARS_2, LVar0, LVar1, LVar2, 0, -1, 0, 5) + EndIf + Call(N(UnkFloatFunc001), LVarC, LVar0, 30, 60, 30, 0, 0) + Call(RotateModel, MODEL_o167, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o168, LVar0, -1, 0, 0) + Return + End }; EvtScript N(D_80245F6C_B264AC) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(D_80245F7C_B264BC) = { - EVT_IF_GE(LVarC, 0) - EVT_IF_LE(LVarC, 2) - EVT_CALL(EnableModel, MODEL_o170, FALSE) - EVT_CALL(EnableModel, MODEL_o183, TRUE) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVarC, 15) - EVT_CALL(EnableModel, MODEL_o170, FALSE) - EVT_CALL(EnableModel, MODEL_o183, TRUE) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVarC, 22) - EVT_CALL(EnableModel, MODEL_o170, FALSE) - EVT_CALL(EnableModel, MODEL_o183, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(EnableModel, MODEL_o170, TRUE) - EVT_CALL(EnableModel, MODEL_o183, FALSE) - EVT_RETURN - EVT_END + IfGe(LVarC, 0) + IfLe(LVarC, 2) + Call(EnableModel, MODEL_o170, FALSE) + Call(EnableModel, MODEL_o183, TRUE) + Return + EndIf + EndIf + IfEq(LVarC, 15) + Call(EnableModel, MODEL_o170, FALSE) + Call(EnableModel, MODEL_o183, TRUE) + Return + EndIf + IfEq(LVarC, 22) + Call(EnableModel, MODEL_o170, FALSE) + Call(EnableModel, MODEL_o183, TRUE) + Return + EndIf + Call(EnableModel, MODEL_o170, TRUE) + Call(EnableModel, MODEL_o183, FALSE) + Return + End }; EvtScript N(D_802460A4_B265E4) = { - EVT_SET(LVar0, LVarC) - EVT_DIV(LVar0, 20) - EVT_MOD(LVar0, 2) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, EVT_FLOAT(-1.0), EVT_FLOAT(1.0), 3, 0, 0) - EVT_CALL(TranslateModel, MODEL_o173, LVar0, 0, 0) - EVT_CALL(TranslateGroup, MODEL_dou, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o170, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o183, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o167, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o168, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o167, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o168, LVar0, 0, 0) - EVT_RETURN - EVT_END + Set(LVar0, LVarC) + Div(LVar0, 20) + Mod(LVar0, 2) + IfEq(LVar0, 0) + Return + EndIf + Call(N(UnkFloatFunc001), LVarC, LVar0, Float(-1.0), Float(1.0), 3, 0, 0) + Call(TranslateModel, MODEL_o173, LVar0, 0, 0) + Call(TranslateGroup, MODEL_dou, LVar0, 0, 0) + Call(TranslateModel, MODEL_o170, LVar0, 0, 0) + Call(TranslateModel, MODEL_o183, LVar0, 0, 0) + Call(TranslateModel, MODEL_o167, LVar0, 0, 0) + Call(TranslateModel, MODEL_o168, LVar0, 0, 0) + Call(TranslateModel, MODEL_o167, LVar0, 0, 0) + Call(TranslateModel, MODEL_o168, LVar0, 0, 0) + Return + End }; EvtScript N(D_8024620C_B2674C) = { - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, EVT_FLOAT(-6.0), EVT_FLOAT(6.0), 3, 0, 0) - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar1, EVT_FLOAT(6.0), EVT_FLOAT(-6.0), 2, 0, 0) - EVT_CALL(TranslateModel, MODEL_o173, LVar0, LVar1, 0) - EVT_CALL(TranslateGroup, MODEL_dou, LVar0, LVar1, 0) - EVT_CALL(TranslateModel, MODEL_o170, LVar0, LVar1, 0) - EVT_CALL(TranslateModel, MODEL_o183, LVar0, LVar1, 0) - EVT_CALL(TranslateModel, MODEL_o167, LVar0, LVar1, 0) - EVT_CALL(TranslateModel, MODEL_o168, LVar0, LVar1, 0) - EVT_CALL(TranslateModel, MODEL_o167, LVar0, LVar1, 0) - EVT_CALL(TranslateModel, MODEL_o168, LVar0, LVar1, 0) - EVT_RETURN - EVT_END + Call(N(UnkFloatFunc001), LVarC, LVar0, Float(-6.0), Float(6.0), 3, 0, 0) + Call(N(UnkFloatFunc001), LVarC, LVar1, Float(6.0), Float(-6.0), 2, 0, 0) + Call(TranslateModel, MODEL_o173, LVar0, LVar1, 0) + Call(TranslateGroup, MODEL_dou, LVar0, LVar1, 0) + Call(TranslateModel, MODEL_o170, LVar0, LVar1, 0) + Call(TranslateModel, MODEL_o183, LVar0, LVar1, 0) + Call(TranslateModel, MODEL_o167, LVar0, LVar1, 0) + Call(TranslateModel, MODEL_o168, LVar0, LVar1, 0) + Call(TranslateModel, MODEL_o167, LVar0, LVar1, 0) + Call(TranslateModel, MODEL_o168, LVar0, LVar1, 0) + Return + End }; EvtScript N(D_8024634C_B2688C) = { - EVT_SET(LVar0, LVarC) - EVT_DIV(LVar0, 20) - EVT_MOD(LVar0, 2) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, EVT_FLOAT(-1.0), EVT_FLOAT(1.0), 3, 0, 0) - EVT_CALL(TranslateModel, MODEL_o173, LVar0, 0, 0) - EVT_CALL(TranslateGroup, MODEL_dou, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o170, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o183, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o167, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o168, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o167, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o168, LVar0, 0, 0) - EVT_RETURN - EVT_END + Set(LVar0, LVarC) + Div(LVar0, 20) + Mod(LVar0, 2) + IfEq(LVar0, 0) + Return + EndIf + Call(N(UnkFloatFunc001), LVarC, LVar0, Float(-1.0), Float(1.0), 3, 0, 0) + Call(TranslateModel, MODEL_o173, LVar0, 0, 0) + Call(TranslateGroup, MODEL_dou, LVar0, 0, 0) + Call(TranslateModel, MODEL_o170, LVar0, 0, 0) + Call(TranslateModel, MODEL_o183, LVar0, 0, 0) + Call(TranslateModel, MODEL_o167, LVar0, 0, 0) + Call(TranslateModel, MODEL_o168, LVar0, 0, 0) + Call(TranslateModel, MODEL_o167, LVar0, 0, 0) + Call(TranslateModel, MODEL_o168, LVar0, 0, 0) + Return + End }; EvtScript N(D_802464B4_B269F4) = { - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, 30, 60, 30, 0, 0) - EVT_CALL(RotateModel, MODEL_o167, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o168, LVar0, -1, 0, 0) - EVT_RETURN - EVT_END + Call(N(UnkFloatFunc001), LVarC, LVar0, 30, 60, 30, 0, 0) + Call(RotateModel, MODEL_o167, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o168, LVar0, -1, 0, 0) + Return + End }; EvtScript N(D_8024652C_B26A6C) = { - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, 0, 8, 3, 0, 0) - EVT_SET(LVar1, LVar0) - EVT_DIV(LVar1, 3) - EVT_CALL(RotateModel, MODEL_o173, LVar0, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_dou, LVar1, 0, 0, -1) - EVT_CALL(TranslateModel, MODEL_o170, -5, -68, 0) - EVT_CALL(TranslateModel, MODEL_o183, -5, -68, 0) - EVT_CALL(TranslateModel, MODEL_o167, 60, 29, -51) - EVT_CALL(TranslateModel, MODEL_o168, 60, 29, 51) - EVT_CALL(RotateModel, MODEL_o170, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o183, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o167, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o168, LVar1, 0, 0, -1) - EVT_CALL(TranslateModel, MODEL_o170, 5, 68, 0) - EVT_CALL(TranslateModel, MODEL_o183, 5, 68, 0) - EVT_CALL(TranslateModel, MODEL_o167, -60, -29, 51) - EVT_CALL(TranslateModel, MODEL_o168, -60, -29, -51) - EVT_SET(LVar0, LVarC) - EVT_MUL(LVar0, 2) - EVT_CALL(N(UnkFloatFunc001), LVar0, LVar0, 30, 60, 3, 0, 0) - EVT_CALL(RotateModel, MODEL_o167, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o168, LVar0, -1, 0, 0) - EVT_RETURN - EVT_END + Call(N(UnkFloatFunc001), LVarC, LVar0, 0, 8, 3, 0, 0) + Set(LVar1, LVar0) + Div(LVar1, 3) + Call(RotateModel, MODEL_o173, LVar0, 0, 0, 1) + Call(RotateGroup, MODEL_dou, LVar1, 0, 0, -1) + Call(TranslateModel, MODEL_o170, -5, -68, 0) + Call(TranslateModel, MODEL_o183, -5, -68, 0) + Call(TranslateModel, MODEL_o167, 60, 29, -51) + Call(TranslateModel, MODEL_o168, 60, 29, 51) + Call(RotateModel, MODEL_o170, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_o183, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_o167, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_o168, LVar1, 0, 0, -1) + Call(TranslateModel, MODEL_o170, 5, 68, 0) + Call(TranslateModel, MODEL_o183, 5, 68, 0) + Call(TranslateModel, MODEL_o167, -60, -29, 51) + Call(TranslateModel, MODEL_o168, -60, -29, -51) + Set(LVar0, LVarC) + Mul(LVar0, 2) + Call(N(UnkFloatFunc001), LVar0, LVar0, 30, 60, 3, 0, 0) + Call(RotateModel, MODEL_o167, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o168, LVar0, -1, 0, 0) + Return + End }; EvtScript N(EVS_802467AC) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_1, MODEL_karada, TRUE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(unkAngleFunc002)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_karada, CUSTOM_GFX_1, -1) - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_2, MODEL_onaka, TRUE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_2, EVT_PTR(N(unkAngleFunc003)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_onaka, CUSTOM_GFX_2, -1) - EVT_THREAD - EVT_LABEL(0) - EVT_CALL(N(UnkAngleFunc001), 0, LVar0, LVar1, LVar2) - EVT_SUBF(LVar0, -80) - EVT_SUBF(LVar1, -18) - EVT_SUBF(LVar2, 420) - EVT_ADDF(LVar0, 55) - EVT_ADDF(LVar1, -20) - EVT_ADDF(LVar2, 0) - EVT_CALL(TranslateModel, MODEL_bero, LVar0, LVar1, LVar2) - EVT_CALL(TranslateModel, MODEL_o170, LVar0, LVar1, LVar2) - EVT_CALL(TranslateModel, MODEL_o183, LVar0, LVar1, LVar2) - EVT_CALL(TranslateModel, MODEL_o173, LVar0, LVar1, LVar2) - EVT_CALL(TranslateModel, MODEL_o167, LVar0, LVar1, LVar2) - EVT_CALL(TranslateModel, MODEL_o168, LVar0, LVar1, LVar2) - EVT_CALL(TranslateGroup, MODEL_dou, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcYaw, NPC_Whale, LVar0) - EVT_MULF(LVar0, -1) - EVT_ADDF(LVar0, -90) - EVT_CALL(TranslateModel, MODEL_bero, -100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o170, -100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o183, -100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o173, -100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o167, -100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o168, -100, 0, 0) - EVT_CALL(TranslateGroup, MODEL_dou, -100, 0, 0) - EVT_CALL(TranslateModel, MODEL_bero, 100, -1, 0) - EVT_CALL(TranslateModel, MODEL_o170, -5, -68, 0) - EVT_CALL(TranslateModel, MODEL_o183, -5, -68, 0) - EVT_CALL(TranslateModel, MODEL_o173, 102, 4, 0) - EVT_CALL(TranslateModel, MODEL_o167, 60, 29, -51) - EVT_CALL(TranslateModel, MODEL_o168, 60, 29, 51) - EVT_CALL(RotateModel, MODEL_bero, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o170, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o183, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o173, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o167, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o168, LVar0, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_dou, LVar0, 0, 1, 0) - EVT_CALL(TranslateModel, MODEL_bero, -100, 1, 0) - EVT_CALL(TranslateModel, MODEL_o170, 5, 68, 0) - EVT_CALL(TranslateModel, MODEL_o183, 5, 68, 0) - EVT_CALL(TranslateModel, MODEL_o173, -102, -4, 0) - EVT_CALL(TranslateModel, MODEL_o167, -60, -29, 51) - EVT_CALL(TranslateModel, MODEL_o168, -60, -29, -51) - EVT_CALL(TranslateModel, MODEL_bero, 100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o170, 100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o183, 100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o173, 100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o167, 100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o168, 100, 0, 0) - EVT_CALL(TranslateGroup, MODEL_dou, 100, 0, 0) - EVT_CALL(GetNpcAnimation, NPC_Whale, LVar0) - EVT_IF_NE(LVar0, LVarB) - EVT_SET(LVarB, LVar0) - EVT_SET(LVarC, 0) - EVT_CALL(EnableModel, MODEL_o170, TRUE) - EVT_CALL(EnableModel, MODEL_o183, FALSE) - EVT_SWITCH(LVarB) - EVT_CASE_EQ(0x00B60003) - EVT_SET(LVarD, EVT_PTR(N(D_80245C10_B26150))) - EVT_CASE_EQ(0x00B60000) - EVT_SET(LVarD, EVT_PTR(N(D_8024595C_B25E9C))) - EVT_CASE_EQ(0x00B60002) - EVT_SET(LVarD, EVT_PTR(N(D_802459D4_B25F14))) - EVT_CASE_EQ(0x00B60001) - EVT_SET(LVarD, EVT_PTR(N(D_802464B4_B269F4))) - EVT_CASE_EQ(0x00B60004) - EVT_SET(LVarD, EVT_PTR(N(D_8024652C_B26A6C))) - EVT_CASE_EQ(0x00B60005) - EVT_SET(LVarD, EVT_PTR(N(D_80245E5C_B2639C))) - EVT_CALL(EnableModel, MODEL_o170, FALSE) - EVT_CALL(EnableModel, MODEL_o183, FALSE) - EVT_CASE_EQ(0x00B60006) - EVT_SET(LVarD, EVT_PTR(N(D_802460A4_B265E4))) - EVT_CALL(EnableModel, MODEL_o170, FALSE) - EVT_CALL(EnableModel, MODEL_o183, FALSE) - EVT_CASE_EQ(0x00B60007) - EVT_SET(LVarD, EVT_PTR(N(D_8024620C_B2674C))) - EVT_CALL(EnableModel, MODEL_o170, FALSE) - EVT_CALL(EnableModel, MODEL_o183, FALSE) - EVT_CASE_EQ(0x00B60008) - EVT_SET(LVarD, EVT_PTR(N(D_8024634C_B2688C))) - EVT_CASE_EQ(0x00B60009) - EVT_SET(LVarD, EVT_PTR(N(D_80245E6C_B263AC))) - EVT_CASE_EQ(0x00B6000A) - EVT_SET(LVarD, EVT_PTR(N(D_80245F6C_B264AC))) - EVT_CASE_EQ(0x00B6000C) - EVT_SET(LVarD, EVT_PTR(N(D_80245F7C_B264BC))) - EVT_END_SWITCH - EVT_END_IF - EVT_EXEC_WAIT(LVarD) - EVT_ADD(LVarC, 1) - EVT_IF_GT(LVarC, 1000) - EVT_SET(LVarC, 0) - EVT_END_IF - EVT_GOTO(0) - EVT_END_THREAD - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(MakeLocalVertexCopy, VTX_COPY_1, MODEL_karada, TRUE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_1, Ref(N(unkAngleFunc002)), NULL) + Call(SetModelCustomGfx, MODEL_karada, CUSTOM_GFX_1, -1) + Call(MakeLocalVertexCopy, VTX_COPY_2, MODEL_onaka, TRUE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_2, Ref(N(unkAngleFunc003)), NULL) + Call(SetModelCustomGfx, MODEL_onaka, CUSTOM_GFX_2, -1) + Thread + Label(0) + Call(N(UnkAngleFunc001), 0, LVar0, LVar1, LVar2) + SubF(LVar0, -80) + SubF(LVar1, -18) + SubF(LVar2, 420) + AddF(LVar0, 55) + AddF(LVar1, -20) + AddF(LVar2, 0) + Call(TranslateModel, MODEL_bero, LVar0, LVar1, LVar2) + Call(TranslateModel, MODEL_o170, LVar0, LVar1, LVar2) + Call(TranslateModel, MODEL_o183, LVar0, LVar1, LVar2) + Call(TranslateModel, MODEL_o173, LVar0, LVar1, LVar2) + Call(TranslateModel, MODEL_o167, LVar0, LVar1, LVar2) + Call(TranslateModel, MODEL_o168, LVar0, LVar1, LVar2) + Call(TranslateGroup, MODEL_dou, LVar0, LVar1, LVar2) + Call(GetNpcYaw, NPC_Whale, LVar0) + MulF(LVar0, -1) + AddF(LVar0, -90) + Call(TranslateModel, MODEL_bero, -100, 0, 0) + Call(TranslateModel, MODEL_o170, -100, 0, 0) + Call(TranslateModel, MODEL_o183, -100, 0, 0) + Call(TranslateModel, MODEL_o173, -100, 0, 0) + Call(TranslateModel, MODEL_o167, -100, 0, 0) + Call(TranslateModel, MODEL_o168, -100, 0, 0) + Call(TranslateGroup, MODEL_dou, -100, 0, 0) + Call(TranslateModel, MODEL_bero, 100, -1, 0) + Call(TranslateModel, MODEL_o170, -5, -68, 0) + Call(TranslateModel, MODEL_o183, -5, -68, 0) + Call(TranslateModel, MODEL_o173, 102, 4, 0) + Call(TranslateModel, MODEL_o167, 60, 29, -51) + Call(TranslateModel, MODEL_o168, 60, 29, 51) + Call(RotateModel, MODEL_bero, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o170, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o183, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o173, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o167, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o168, LVar0, 0, 1, 0) + Call(RotateGroup, MODEL_dou, LVar0, 0, 1, 0) + Call(TranslateModel, MODEL_bero, -100, 1, 0) + Call(TranslateModel, MODEL_o170, 5, 68, 0) + Call(TranslateModel, MODEL_o183, 5, 68, 0) + Call(TranslateModel, MODEL_o173, -102, -4, 0) + Call(TranslateModel, MODEL_o167, -60, -29, 51) + Call(TranslateModel, MODEL_o168, -60, -29, -51) + Call(TranslateModel, MODEL_bero, 100, 0, 0) + Call(TranslateModel, MODEL_o170, 100, 0, 0) + Call(TranslateModel, MODEL_o183, 100, 0, 0) + Call(TranslateModel, MODEL_o173, 100, 0, 0) + Call(TranslateModel, MODEL_o167, 100, 0, 0) + Call(TranslateModel, MODEL_o168, 100, 0, 0) + Call(TranslateGroup, MODEL_dou, 100, 0, 0) + Call(GetNpcAnimation, NPC_Whale, LVar0) + IfNe(LVar0, LVarB) + Set(LVarB, LVar0) + Set(LVarC, 0) + Call(EnableModel, MODEL_o170, TRUE) + Call(EnableModel, MODEL_o183, FALSE) + Switch(LVarB) + CaseEq(0x00B60003) + Set(LVarD, Ref(N(D_80245C10_B26150))) + CaseEq(0x00B60000) + Set(LVarD, Ref(N(D_8024595C_B25E9C))) + CaseEq(0x00B60002) + Set(LVarD, Ref(N(D_802459D4_B25F14))) + CaseEq(0x00B60001) + Set(LVarD, Ref(N(D_802464B4_B269F4))) + CaseEq(0x00B60004) + Set(LVarD, Ref(N(D_8024652C_B26A6C))) + CaseEq(0x00B60005) + Set(LVarD, Ref(N(D_80245E5C_B2639C))) + Call(EnableModel, MODEL_o170, FALSE) + Call(EnableModel, MODEL_o183, FALSE) + CaseEq(0x00B60006) + Set(LVarD, Ref(N(D_802460A4_B265E4))) + Call(EnableModel, MODEL_o170, FALSE) + Call(EnableModel, MODEL_o183, FALSE) + CaseEq(0x00B60007) + Set(LVarD, Ref(N(D_8024620C_B2674C))) + Call(EnableModel, MODEL_o170, FALSE) + Call(EnableModel, MODEL_o183, FALSE) + CaseEq(0x00B60008) + Set(LVarD, Ref(N(D_8024634C_B2688C))) + CaseEq(0x00B60009) + Set(LVarD, Ref(N(D_80245E6C_B263AC))) + CaseEq(0x00B6000A) + Set(LVarD, Ref(N(D_80245F6C_B264AC))) + CaseEq(0x00B6000C) + Set(LVarD, Ref(N(D_80245F7C_B264BC))) + EndSwitch + EndIf + ExecWait(LVarD) + Add(LVarC, 1) + IfGt(LVarC, 1000) + Set(LVarC, 0) + EndIf + Goto(0) + EndThread + Return + End }; EvtScript N(EVS_80247040) = { - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_IdleSad) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_IdleSad) + Return + End }; diff --git a/src/world/area_jan/jan_00/jan_00_5_foliage.c b/src/world/area_jan/jan_00/jan_00_5_foliage.c index 9ab655c7695..206e28114ce 100644 --- a/src/world/area_jan/jan_00/jan_00_5_foliage.c +++ b/src/world/area_jan/jan_00/jan_00_5_foliage.c @@ -30,10 +30,10 @@ BombTrigger N(D_80247A1C_B27F5C) = { }; EvtScript N(EVS_80247A2C) = { - EVT_SET(AF_JAN00_TreeDrop1, FALSE) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o282, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(D_80247A1C_B27F5C)), 1, 0) - EVT_RETURN - EVT_END + Set(AF_JAN00_TreeDrop1, FALSE) + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o282, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(D_80247A1C_B27F5C)), 1, 0) + Return + End }; diff --git a/src/world/area_jan/jan_01/jan_01_1_music.c b/src/world/area_jan/jan_01/jan_01_1_music.c index 2b8d5b7e5b6..34b8ee640cf 100644 --- a/src/world/area_jan/jan_01/jan_01_1_music.c +++ b/src/world/area_jan/jan_01/jan_01_1_music.c @@ -1,8 +1,8 @@ #include "jan_01.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_YOSHIS_VILLAGE, 0, 8) - EVT_CALL(ClearAmbientSounds, 250) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_YOSHIS_VILLAGE, 0, 8) + Call(ClearAmbientSounds, 250) + Return + End }; diff --git a/src/world/area_jan/jan_01/jan_01_2_main.c b/src/world/area_jan/jan_01/jan_01_2_main.c index 9669723b949..ab3dd7eee7e 100644 --- a/src/world/area_jan/jan_01/jan_01_2_main.c +++ b/src/world/area_jan/jan_01/jan_01_2_main.c @@ -12,46 +12,46 @@ EvtScript N(EVS_ExitWalk_jan_00_1) = EVT_EXIT_WALK(60, jan_01_ENTRY_0, "jan_00", EvtScript N(EVS_ExitWalk_jan_02_0) = EVT_EXIT_WALK(60, jan_01_ENTRY_1, "jan_02", jan_02_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_00_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_02_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_jan_00_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_jan_02_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_JADE_JUNGLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(PlaySound, SOUND_LOOP_JAN_BEACH_WAVES) - EVT_CALL(EnableTexPanning, MODEL_o75, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o7, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o6, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_JADE_JUNGLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupFoliage)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Exec(N(EVS_SetupMusic)) + Call(PlaySound, SOUND_LOOP_JAN_BEACH_WAVES) + Call(EnableTexPanning, MODEL_o75, TRUE) + Call(EnableTexPanning, MODEL_o7, TRUE) + Call(EnableTexPanning, MODEL_o6, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( -100, 350, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( 100, 200, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o144, SURFACE_TYPE_WATER) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o145, SURFACE_TYPE_WATER) - EVT_CALL(N(SpawnSunEffect)) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o144, SURFACE_TYPE_WATER) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o145, SURFACE_TYPE_WATER) + Call(N(SpawnSunEffect)) + Return + End }; diff --git a/src/world/area_jan/jan_01/jan_01_3_npc.c b/src/world/area_jan/jan_01/jan_01_3_npc.c index fd13aed5a72..ac8ad3e04b9 100644 --- a/src/world/area_jan/jan_01/jan_01_3_npc.c +++ b/src/world/area_jan/jan_01/jan_01_3_npc.c @@ -8,265 +8,265 @@ #include "world/common/EnableCameraLeadingPlayer.inc.c" EvtScript N(EVS_PlayerWatchKolorado) = { - EVT_LOOP(0) - EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(PlayerFaceNpc, NPC_SELF, FALSE) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_Kolorado_RunToVillage) = { - EVT_EXEC_GET_TID(N(EVS_PlayerWatchKolorado), LVar9) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Run) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(4.5 / DT)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 150) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, 60, 0) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) - EVT_KILL_THREAD(LVar9) - EVT_CALL(N(EnableCameraLeadingPlayer)) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5.0 / DT)) - EVT_CALL(SetSelfVar, 0, 3) - EVT_RETURN - EVT_END + ExecGetTID(N(EVS_PlayerWatchKolorado), LVar9) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Run) + Call(SetNpcSpeed, NPC_SELF, Float(4.5 / DT)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 150) + Call(NpcMoveTo, NPC_SELF, LVar0, 60, 0) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) + KillThread(LVar9) + Call(N(EnableCameraLeadingPlayer)) + Call(ResetCam, CAM_DEFAULT, Float(5.0 / DT)) + Call(SetSelfVar, 0, 3) + Return + End }; EvtScript N(EVS_NpcIdle_Kolorado) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Fallen) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, -600) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH5_000D, 320, 60) - EVT_CALL(PlaySoundAtPlayer, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, 0, EMOTE_EXCLAMATION, 0, 25, EMOTER_PLAYER, 0, 0, 0, 0) - EVT_CALL(PlaySoundAtNpc, NPC_PARTNER, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_PARTNER, EMOTE_EXCLAMATION, 0, 25, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(25 * DT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_LABEL(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, 430) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(InterruptUsePartner) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(RemoveNpc, NPC_JungleFuzzy_01) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH5_0010, 0, 60) - EVT_CALL(InterpPlayerYaw, 270, 4) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) - EVT_CALL(NpcMoveTo, NPC_SELF, 250, 90, 5 * DT) - EVT_CALL(func_802CF56C, 2) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar0) - EVT_ADD(LVar3, -50) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(5.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar3, LVar2, 0) - EVT_ADD(LVar0, LVar3) - EVT_DIV(LVar0, 2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(N(DisableCameraLeadingPlayer)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0011) - EVT_SET(GB_StoryProgress, STORY_CH5_KOLORADO_ESCAPED_FUZZIES) - EVT_EXEC_WAIT(N(EVS_Kolorado_RunToVillage)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_CASE_EQ(1) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(func_802D2C14, 1) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Idle, 0, MSG_CH5_000F) - EVT_SET(GF_JAN01_SavedKolorado, TRUE) - EVT_CALL(SetSelfVar, 0, 2) - EVT_SET(GB_StoryProgress, STORY_CH5_KOLORADO_ESCAPED_FUZZIES) - EVT_EXEC_WAIT(N(EVS_Kolorado_RunToVillage)) - EVT_CALL(func_802D2C14, 0) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_SWITCH - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 3) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Fallen) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) + Loop(0) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar0, -600) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_CH5_000D, 320, 60) + Call(PlaySoundAtPlayer, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, 0, EMOTE_EXCLAMATION, 0, 25, EMOTER_PLAYER, 0, 0, 0, 0) + Call(PlaySoundAtNpc, NPC_PARTNER, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_PARTNER, EMOTE_EXCLAMATION, 0, 25, EMOTER_NPC, 0, 0, 0, 0) + Wait(25 * DT) + Call(DisablePlayerInput, FALSE) + Label(0) + Call(GetSelfVar, 0, LVar0) + Switch(LVar0) + CaseEq(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar0, 430) + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, PARTNER_NONE) + Call(InterruptUsePartner) + EndIf + Call(DisablePlayerInput, TRUE) + Call(RemoveNpc, NPC_JungleFuzzy_01) + Call(ShowMessageAtScreenPos, MSG_CH5_0010, 0, 60) + Call(InterpPlayerYaw, 270, 4) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) + Call(NpcMoveTo, NPC_SELF, 250, 90, 5 * DT) + Call(func_802CF56C, 2) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar3, LVar0) + Add(LVar3, -50) + Call(SetNpcSpeed, NPC_SELF, Float(5.0 / DT)) + Call(NpcMoveTo, NPC_SELF, LVar3, LVar2, 0) + Add(LVar0, LVar3) + Div(LVar0, 2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-7.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(N(DisableCameraLeadingPlayer)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0011) + Set(GB_StoryProgress, STORY_CH5_KOLORADO_ESCAPED_FUZZIES) + ExecWait(N(EVS_Kolorado_RunToVillage)) + Call(DisablePlayerInput, FALSE) + EndIf + CaseEq(1) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(func_802D2C14, 1) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Idle, 0, MSG_CH5_000F) + Set(GF_JAN01_SavedKolorado, TRUE) + Call(SetSelfVar, 0, 2) + Set(GB_StoryProgress, STORY_CH5_KOLORADO_ESCAPED_FUZZIES) + ExecWait(N(EVS_Kolorado_RunToVillage)) + Call(func_802D2C14, 0) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + SetGroup(EVT_GROUP_0B) + Call(DisablePlayerInput, FALSE) + EndSwitch + Call(GetSelfVar, 0, LVar0) + IfNe(LVar0, 3) + Wait(1) + Goto(0) + EndIf + Return + End }; EvtScript N(EVS_NpcHit_Kolorado) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(LVar1, 1) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_SET(LVar1, 1) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_PARTNER) - EVT_SET(LVar1, 1) - EVT_CASE_DEFAULT - EVT_SET(LVar1, 0) - EVT_END_SWITCH - EVT_IF_NE(LVar1, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(5) - EVT_SET(AF_JAN01_KoloradoShouting, TRUE) - EVT_WAIT(10) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Yell, 0, MSG_CH5_000E) - EVT_SET(AF_JAN01_KoloradoShouting, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(LVar1, 1) + CaseEq(ENCOUNTER_TRIGGER_JUMP) + Set(LVar1, 1) + CaseEq(ENCOUNTER_TRIGGER_PARTNER) + Set(LVar1, 1) + CaseDefault + Set(LVar1, 0) + EndSwitch + IfNe(LVar1, 0) + Call(DisablePlayerInput, TRUE) + Wait(5) + Set(AF_JAN01_KoloradoShouting, TRUE) + Wait(10) + Call(NpcFacePlayer, NPC_SELF, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Yell, 0, MSG_CH5_000E) + Set(AF_JAN01_KoloradoShouting, FALSE) + Call(DisablePlayerInput, FALSE) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Kolorado) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH5_KOLORADO_ESCAPED_FUZZIES) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Kolorado))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_Kolorado))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH5_KOLORADO_ESCAPED_FUZZIES) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Kolorado))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_Kolorado))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcIdle_JungleFuzzy_01) = { - EVT_CHILD_THREAD - EVT_CALL(GetNpcPos, NPC_Kolorado, LVar3, LVar1, LVar2) - EVT_SET(LVar4, LVar3) - EVT_ADD(LVar3, -200) - EVT_ADD(LVar4, 200) - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar0) - EVT_CASE_RANGE(LVar3, LVar4) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH, 0) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_PARTNER, 0) - EVT_CASE_DEFAULT - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH, 1) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_PARTNER, 1) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_SET(AF_JAN01_KoloradoShouting, FALSE) - EVT_CALL(GetNpcPos, NPC_Kolorado, LVar7, LVar8, LVar9) - EVT_ADD(LVar8, 20) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 5) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(4.0)) - EVT_SET(LVar4, 40) - EVT_SET(LVar5, 90) - EVT_SET(LVar6, 45) - EVT_LOOP(0) - EVT_MUL(LVar4, -1) - EVT_MUL(LVar5, -1) - EVT_MUL(LVar6, -1) - EVT_ADD(LVar0, LVar4) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 18, LVar2, 15) - EVT_CALL(PlaySoundAtNpc, NPC_Kolorado, SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_DEFAULT) - EVT_IF_NE(AF_JAN01_KoloradoShouting, TRUE) - EVT_CHILD_THREAD - EVT_CALL(InterpNpcYaw, NPC_Kolorado, LVar5, 2) - EVT_PLAY_EFFECT(EFFECT_DAMAGE_STARS, FX_DAMAGE_STARS_3, LVar7, LVar8, LVar9, 0, -1, 0, 3) - EVT_END_CHILD_THREAD - EVT_END_IF - EVT_ADD(LVar0, LVar4) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, -12, LVar2, 15) - EVT_LABEL(1) - EVT_WAIT(1) - EVT_IF_EQ(AF_JAN01_KoloradoShouting, TRUE) - EVT_GOTO(1) - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + ChildThread + Call(GetNpcPos, NPC_Kolorado, LVar3, LVar1, LVar2) + Set(LVar4, LVar3) + Add(LVar3, -200) + Add(LVar4, 200) + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Switch(LVar0) + CaseRange(LVar3, LVar4) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH, 0) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_PARTNER, 0) + CaseDefault + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH, 1) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_PARTNER, 1) + EndSwitch + Wait(1) + EndLoop + EndChildThread + Set(AF_JAN01_KoloradoShouting, FALSE) + Call(GetNpcPos, NPC_Kolorado, LVar7, LVar8, LVar9) + Add(LVar8, 20) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar2, 5) + Call(SetNpcJumpscale, NPC_SELF, Float(4.0)) + Set(LVar4, 40) + Set(LVar5, 90) + Set(LVar6, 45) + Loop(0) + Mul(LVar4, -1) + Mul(LVar5, -1) + Mul(LVar6, -1) + Add(LVar0, LVar4) + Call(NpcJump0, NPC_SELF, LVar0, 18, LVar2, 15) + Call(PlaySoundAtNpc, NPC_Kolorado, SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_DEFAULT) + IfNe(AF_JAN01_KoloradoShouting, TRUE) + ChildThread + Call(InterpNpcYaw, NPC_Kolorado, LVar5, 2) + PlayEffect(EFFECT_DAMAGE_STARS, FX_DAMAGE_STARS_3, LVar7, LVar8, LVar9, 0, -1, 0, 3) + EndChildThread + EndIf + Add(LVar0, LVar4) + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Call(NpcJump0, NPC_SELF, LVar0, -12, LVar2, 15) + Label(1) + Wait(1) + IfEq(AF_JAN01_KoloradoShouting, TRUE) + Goto(1) + EndIf + EndLoop + Return + End }; EvtScript N(EVS_NpcDefeat_JungleFuzzyBoss) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Idle) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(InterruptUsePartner) - EVT_END_IF - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(GetNpcPos, NPC_Kolorado, LVar3, LVar1, LVar2) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar4, LVar0) - EVT_IF_LT(LVar3, LVar0) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_ADD(LVar4, -30) - EVT_ELSE - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_ADD(LVar4, 30) - EVT_END_IF - EVT_ADD(LVar0, LVar4) - EVT_DIV(LVar0, 2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CALL(N(DisableCameraLeadingPlayer)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetNpcFlagBits, NPC_Kolorado, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Run) - EVT_CALL(SetNpcSpeed, NPC_Kolorado, EVT_FLOAT(3.0)) - EVT_IF_LT(LVar2, -45) - EVT_SET(LVar2, -45) - EVT_END_IF - EVT_CALL(NpcMoveTo, NPC_Kolorado, LVar4, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Idle) - EVT_CALL(NpcFacePlayer, NPC_Kolorado, 0) - EVT_CALL(SetNpcVar, NPC_Kolorado, 0, 1) - EVT_END_THREAD - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(DisablePlayerInput, TRUE) + Call(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Idle) + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, PARTNER_NONE) + Call(InterruptUsePartner) + EndIf + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Thread + Wait(30) + Call(GetNpcPos, NPC_Kolorado, LVar3, LVar1, LVar2) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar4, LVar0) + IfLt(LVar3, LVar0) + Call(InterpPlayerYaw, 270, 0) + Add(LVar4, -30) + Else + Call(InterpPlayerYaw, 90, 0) + Add(LVar4, 30) + EndIf + Add(LVar0, LVar4) + Div(LVar0, 2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Call(N(DisableCameraLeadingPlayer)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetNpcFlagBits, NPC_Kolorado, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Run) + Call(SetNpcSpeed, NPC_Kolorado, Float(3.0)) + IfLt(LVar2, -45) + Set(LVar2, -45) + EndIf + Call(NpcMoveTo, NPC_Kolorado, LVar4, LVar2, 0) + Call(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Idle) + Call(NpcFacePlayer, NPC_Kolorado, 0) + Call(SetNpcVar, NPC_Kolorado, 0, 1) + EndThread + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_JungleFuzzy_01) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH5_KOLORADO_ESCAPED_FUZZIES) - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Fuzzy_Jungle_Anim04) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_JungleFuzzy_01))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_JungleFuzzyBoss))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH5_KOLORADO_ESCAPED_FUZZIES) + Call(SetSelfVar, 0, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Fuzzy_Jungle_Anim04) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_JungleFuzzy_01))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_JungleFuzzyBoss))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_Kolorado) = { @@ -293,11 +293,11 @@ NpcData N(NpcData_JungleFuzzy_01) = { }; EvtScript N(EVS_NpcInit_JungleFuzzy_02) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH5_KOLORADO_ESCAPED_FUZZIES) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH5_KOLORADO_ESCAPED_FUZZIES) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_JungleFuzzy_02) = { diff --git a/src/world/area_jan/jan_01/jan_01_4_entity.c b/src/world/area_jan/jan_01/jan_01_4_entity.c index 710ba0ae741..1b0dc3256ef 100644 --- a/src/world/area_jan/jan_01/jan_01_4_entity.c +++ b/src/world/area_jan/jan_01/jan_01_4_entity.c @@ -2,16 +2,16 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_LETTER_TO_IGOR, -110, 90, -230, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_JAN01_Item_Letter11) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BellbellPlant), -375, -3, -75, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), -335, 57, -55, 0, ITEM_REPEL_GEL, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_JAN01_HiddenItem_RepelGel) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BellbellPlant), 180, -3, -115, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 140, 57, -85, 0, ITEM_MYSTERY, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_JAN01_HiddenItem_Mystery) - EVT_CALL(MakeItemEntity, ITEM_COIN, 340, 100, -90, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_JAN01_Item_CoinA) - EVT_CALL(MakeItemEntity, ITEM_COIN, 340, 125, -90, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_JAN01_Item_CoinB) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SpinningFlower), 340, 0, -90, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_LETTER_TO_IGOR, -110, 90, -230, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_JAN01_Item_Letter11) + Call(MakeEntity, Ref(Entity_BellbellPlant), -375, -3, -75, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), -335, 57, -55, 0, ITEM_REPEL_GEL, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_JAN01_HiddenItem_RepelGel) + Call(MakeEntity, Ref(Entity_BellbellPlant), 180, -3, -115, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 140, 57, -85, 0, ITEM_MYSTERY, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_JAN01_HiddenItem_Mystery) + Call(MakeItemEntity, ITEM_COIN, 340, 100, -90, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_JAN01_Item_CoinA) + Call(MakeItemEntity, ITEM_COIN, 340, 125, -90, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_JAN01_Item_CoinB) + Call(MakeEntity, Ref(Entity_SpinningFlower), 340, 0, -90, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_jan/jan_01/jan_01_5_foliage.c b/src/world/area_jan/jan_01/jan_01_5_foliage.c index 01cfad54d60..e7978909b91 100644 --- a/src/world/area_jan/jan_01/jan_01_5_foliage.c +++ b/src/world/area_jan/jan_01/jan_01_5_foliage.c @@ -191,37 +191,37 @@ BombTrigger N(BombPos_Tree7) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(AF_JAN01_TreeDrop2, FALSE) - EVT_SET(AF_JAN01_TreeDrop3, FALSE) - EVT_SET(AF_JAN01_TreeDrop4, FALSE) - EVT_SET(AF_JAN01_TreeDrop5, FALSE) - EVT_SET(AF_JAN01_TreeDrop6, FALSE) - EVT_SET(AF_JAN01_TreeDrop7, FALSE) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o204, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o84, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o203, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree3)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree4))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o152, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree4)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree5))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o155, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree5)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree6))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o103, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree6)), 1, 0) - EVT_IF_EQ(GF_JAN01_Tree7_StarPiece, FALSE) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree7A))) - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree7B))) - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o205, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree7)), 1, 0) - EVT_RETURN - EVT_END + Set(AF_JAN01_TreeDrop2, FALSE) + Set(AF_JAN01_TreeDrop3, FALSE) + Set(AF_JAN01_TreeDrop4, FALSE) + Set(AF_JAN01_TreeDrop5, FALSE) + Set(AF_JAN01_TreeDrop6, FALSE) + Set(AF_JAN01_TreeDrop7, FALSE) + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o204, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o84, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree3))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o203, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree3)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree4))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o152, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree4)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree5))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o155, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree5)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree6))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o103, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree6)), 1, 0) + IfEq(GF_JAN01_Tree7_StarPiece, FALSE) + Set(LVar0, Ref(N(ShakeTree_Tree7A))) + Else + Set(LVar0, Ref(N(ShakeTree_Tree7B))) + EndIf + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o205, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree7)), 1, 0) + Return + End }; diff --git a/src/world/area_jan/jan_02/jan_02_1_music.c b/src/world/area_jan/jan_02/jan_02_1_music.c index 82fd4be2acd..04e045318c9 100644 --- a/src/world/area_jan/jan_02/jan_02_1_music.c +++ b/src/world/area_jan/jan_02/jan_02_1_music.c @@ -6,17 +6,17 @@ API_CALLABLE(N(AdjustTrackVolumes)) { } EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING, STORY_CH5_SUSHIE_JOINED_PARTY) - EVT_CALL(SetMusicTrack, 0, SONG_YOSHIS_PANIC, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_YOSHIS_VILLAGE, 0, 8) - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(N(AdjustTrackVolumes)) - EVT_END_THREAD - EVT_END_SWITCH - EVT_CALL(ClearAmbientSounds, 250) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseRange(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING, STORY_CH5_SUSHIE_JOINED_PARTY) + Call(SetMusicTrack, 0, SONG_YOSHIS_PANIC, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_YOSHIS_VILLAGE, 0, 8) + Thread + Wait(3) + Call(N(AdjustTrackVolumes)) + EndThread + EndSwitch + Call(ClearAmbientSounds, 250) + Return + End }; diff --git a/src/world/area_jan/jan_02/jan_02_2_main.c b/src/world/area_jan/jan_02/jan_02_2_main.c index 1263bd662ce..eabe51719b4 100644 --- a/src/world/area_jan/jan_02/jan_02_2_main.c +++ b/src/world/area_jan/jan_02/jan_02_2_main.c @@ -33,69 +33,69 @@ API_CALLABLE(N(SpawnSunEffect)) { } EvtScript N(EVS_ExitWalk_jan_01_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(N(ClearTrackVols)) - EVT_CALL(UseExitHeading, 60, jan_02_ENTRY_0) - EVT_EXEC(ExitWalk) - EVT_CALL(GotoMap, EVT_PTR("jan_01"), jan_01_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(N(ClearTrackVols)) + Call(UseExitHeading, 60, jan_02_ENTRY_0) + Exec(ExitWalk) + Call(GotoMap, Ref("jan_01"), jan_01_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_jan_03_0) = EVT_EXIT_WALK(60, jan_02_ENTRY_1, "jan_03", jan_03_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_01_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_jan_01_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_jan_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; s32 N(PrevPalmTreeVisibility) = TRUE; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_YOSHIS_VILLAGE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() + Set(GB_WorldLocation, LOCATION_YOSHIS_VILLAGE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() #if VERSION_PAL - EVT_CALL(GetLanguage, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_o120, LVar0) + Call(GetLanguage, LVar0) + Call(SetModelTexVariant, MODEL_o120, LVar0) #endif - EVT_SET(GF_MAP_YoshisVillage, TRUE) - EVT_SET(AF_JAN02_RaphaelComment, FALSE) - EVT_SET(AF_JAN02_MetCouncillor, FALSE) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitnw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(PlaySound, SOUND_LOOP_JAN_BEACH_WAVES) - EVT_CALL(EnableTexPanning, MODEL_o202, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o203, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o103, TRUE) - EVT_THREAD + Set(GF_MAP_YoshisVillage, TRUE) + Set(AF_JAN02_RaphaelComment, FALSE) + Set(AF_JAN02_MetCouncillor, FALSE) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupFoliage)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitnw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Exec(N(EVS_SetupMusic)) + Call(PlaySound, SOUND_LOOP_JAN_BEACH_WAVES) + Call(EnableTexPanning, MODEL_o202, TRUE) + Call(EnableTexPanning, MODEL_o203, TRUE) + Call(EnableTexPanning, MODEL_o103, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 0, 400, 0, 0) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( -100, 200, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(ManageBigPalmTreeVisibility)) - EVT_END_THREAD - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o337, SURFACE_TYPE_WATER) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o338, SURFACE_TYPE_WATER) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread + Call(N(ManageBigPalmTreeVisibility)) + EndThread + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o337, SURFACE_TYPE_WATER) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o338, SURFACE_TYPE_WATER) + Return + End }; diff --git a/src/world/area_jan/jan_02/jan_02_3_npc.c b/src/world/area_jan/jan_02/jan_02_3_npc.c index 52f554156ef..b3c15973315 100644 --- a/src/world/area_jan/jan_02/jan_02_3_npc.c +++ b/src/world/area_jan/jan_02/jan_02_3_npc.c @@ -13,372 +13,372 @@ #include "world/common/todo/SwitchToPartner.inc.c" EvtScript N(EVS_GetRescuedYoshiCount) = { - EVT_SET(LVar0, 0) - EVT_ADD(LVar0, GF_JAN05_SavedYoshi) - EVT_ADD(LVar0, GF_JAN07_SavedYoshi) - EVT_ADD(LVar0, GF_JAN08_SavedYoshi) - EVT_ADD(LVar0, GF_JAN10_SavedYoshi) - EVT_ADD(LVar0, GF_JAN11_SavedYoshi) - EVT_RETURN - EVT_END + Set(LVar0, 0) + Add(LVar0, GF_JAN05_SavedYoshi) + Add(LVar0, GF_JAN07_SavedYoshi) + Add(LVar0, GF_JAN08_SavedYoshi) + Add(LVar0, GF_JAN10_SavedYoshi) + Add(LVar0, GF_JAN11_SavedYoshi) + Return + End }; EvtScript N(EVS_Scene_GetJadeRaven) = { - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_IF_EQ(GF_JAN02_Met_VillageLeader, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_Talk, ANIM_VillageLeader_Idle, 0, MSG_CH5_0023) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_Talk, ANIM_VillageLeader_Idle, 0, MSG_CH5_0024) - EVT_END_IF - EVT_WAIT(5 * DT) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_VillageLeader_Walk) - EVT_CALL(NpcMoveTo, NPC_SELF, 8, -140, 25) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_VillageLeader_Idle) - EVT_WAIT(5 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 25, 15, -150) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 25, 15, -150) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(16.0), EVT_FLOAT(-8.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(5 * DT) - EVT_CALL(PlayerMoveTo, 58, -140, 25) - EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE) - EVT_CALL(func_802D2C14, 1) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_VillageLeader_Rummage) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_Rummage, ANIM_VillageLeader_Rummage, 5, MSG_CH5_0025) - EVT_WAIT(60 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_VillageLeader_Idle) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_Talk, ANIM_VillageLeader_Idle, 0, MSG_CH5_0026) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + IfEq(GF_JAN02_Met_VillageLeader, TRUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_Talk, ANIM_VillageLeader_Idle, 0, MSG_CH5_0023) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_Talk, ANIM_VillageLeader_Idle, 0, MSG_CH5_0024) + EndIf + Wait(5 * DT) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_VillageLeader_Walk) + Call(NpcMoveTo, NPC_SELF, 8, -140, 25) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_VillageLeader_Idle) + Wait(5 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, 25, 15, -150) + Call(SetPanTarget, CAM_DEFAULT, 25, 15, -150) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(16.0), Float(-8.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(5 * DT) + Call(PlayerMoveTo, 58, -140, 25) + Call(PlayerFaceNpc, NPC_SELF, FALSE) + Call(func_802D2C14, 1) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_VillageLeader_Rummage) + Wait(30 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_Rummage, ANIM_VillageLeader_Rummage, 5, MSG_CH5_0025) + Wait(60 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_VillageLeader_Idle) + Call(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_Talk, ANIM_VillageLeader_Idle, 0, MSG_CH5_0026) EVT_GIVE_KEY_REWARD(ITEM_JADE_RAVEN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_Talk, ANIM_VillageLeader_Idle, 0, MSG_CH5_0027) - EVT_SET(GB_StoryProgress, STORY_CH5_GOT_JADE_RAVEN) - EVT_WAIT(15 * DT) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_ADD(LVar3, 25) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.5 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(func_802D2C14, 0) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_EQ(LVar0, PARTNER_SUSHIE) - EVT_THREAD - EVT_WAIT(15 * DT) - EVT_CALL(PlayerFaceNpc, NPC_PARTNER, FALSE) - EVT_END_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldSushie_Talk, ANIM_WorldSushie_Idle, 2, MSG_CH5_0028) - EVT_ELSE - EVT_CALL(N(SwitchToPartner), PARTNER_SUSHIE) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, -1, -1, 5, MSG_CH5_0029) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_WAIT(15 * DT) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar2, LVar3, LVar4) - EVT_CALL(MakeLerp, LVar2, 85, 10 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(PlayerFaceNpc, NPC_PARTNER, FALSE) - EVT_END_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(ContinueSpeech, NPC_PARTNER, ANIM_WorldSushie_Talk, ANIM_WorldSushie_Idle, 5, MSG_CH5_002A) - EVT_WAIT(10 * DT) - EVT_END_IF - EVT_CALL(ContinueSpeech, NPC_PARTNER, ANIM_WorldSushie_Talk, ANIM_WorldSushie_Idle, 5, MSG_CH5_002B) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldSushie_Talk, ANIM_WorldSushie_Idle, 5, MSG_CH5_002C) - EVT_WAIT(10 * DT) - EVT_CALL(EnablePartnerAI) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_Talk, ANIM_VillageLeader_Idle, 0, MSG_CH5_0027) + Set(GB_StoryProgress, STORY_CH5_GOT_JADE_RAVEN) + Wait(15 * DT) + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Add(LVar3, 25) + Call(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.5 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(func_802D2C14, 0) + Call(GetCurrentPartnerID, LVar0) + IfEq(LVar0, PARTNER_SUSHIE) + Thread + Wait(15 * DT) + Call(PlayerFaceNpc, NPC_PARTNER, FALSE) + EndThread + Call(DisablePartnerAI, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldSushie_Talk, ANIM_WorldSushie_Idle, 2, MSG_CH5_0028) + Else + Call(N(SwitchToPartner), PARTNER_SUSHIE) + Call(SpeakToPlayer, NPC_PARTNER, -1, -1, 5, MSG_CH5_0029) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Wait(15 * DT) + Call(GetNpcPos, NPC_PARTNER, LVar2, LVar3, LVar4) + Call(MakeLerp, LVar2, 85, 10 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar3, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + Wait(10 * DT) + Thread + Wait(10 * DT) + Call(PlayerFaceNpc, NPC_PARTNER, FALSE) + EndThread + Call(DisablePartnerAI, 0) + Call(ContinueSpeech, NPC_PARTNER, ANIM_WorldSushie_Talk, ANIM_WorldSushie_Idle, 5, MSG_CH5_002A) + Wait(10 * DT) + EndIf + Call(ContinueSpeech, NPC_PARTNER, ANIM_WorldSushie_Talk, ANIM_WorldSushie_Idle, 5, MSG_CH5_002B) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(30 * DT) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldSushie_Talk, ANIM_WorldSushie_Idle, 5, MSG_CH5_002C) + Wait(10 * DT) + Call(EnablePartnerAI) + Call(ResetCam, CAM_DEFAULT, Float(2.0 / DT)) + Return + End }; EvtScript N(EVS_NpcInteract_VillageLeader) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_IF_EQ(GF_JAN02_Met_VillageLeader, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_TalkSit, ANIM_VillageLeader_IdleSit, 0, MSG_CH5_0021) - EVT_SET(GF_JAN02_Met_VillageLeader, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_TalkSit, ANIM_VillageLeader_IdleSit, 0, MSG_CH5_0022) - EVT_END_IF - EVT_CASE_LT(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_CASE_LT(STORY_CH5_GOT_JADE_RAVEN) - EVT_EXEC_WAIT(N(EVS_Scene_GetJadeRaven)) - EVT_CASE_LT(STORY_CH5_RAPHAEL_LEFT_NEST) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_Talk, ANIM_VillageLeader_Idle, 0, MSG_CH5_002D) - EVT_CASE_LT(STORY_CH5_ZIP_LINE_READY) - EVT_IF_EQ(AF_JAN02_RaphaelComment, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_TalkSit, ANIM_VillageLeader_IdleSit, 0, MSG_CH5_002E) - EVT_SET(AF_JAN02_RaphaelComment, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_TalkSit, ANIM_VillageLeader_IdleSit, 0, MSG_CH5_002F) - EVT_END_IF - EVT_CASE_LT(STORY_CH5_ENTERED_MT_LAVA_LAVA) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_TalkSit, ANIM_VillageLeader_IdleSit, 0, MSG_CH5_0030) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_TalkSit, ANIM_VillageLeader_IdleSit, 0, MSG_CH5_0031) - EVT_CASE_LT(STORY_CH6_FLOWER_GATE_OPEN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_TalkSit, ANIM_VillageLeader_IdleSit, 0, MSG_CH5_0032) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_TalkSit, ANIM_VillageLeader_IdleSit, 0, MSG_CH5_0033) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + IfEq(GF_JAN02_Met_VillageLeader, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_TalkSit, ANIM_VillageLeader_IdleSit, 0, MSG_CH5_0021) + Set(GF_JAN02_Met_VillageLeader, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_TalkSit, ANIM_VillageLeader_IdleSit, 0, MSG_CH5_0022) + EndIf + CaseLt(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + CaseLt(STORY_CH5_GOT_JADE_RAVEN) + ExecWait(N(EVS_Scene_GetJadeRaven)) + CaseLt(STORY_CH5_RAPHAEL_LEFT_NEST) + Call(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_Talk, ANIM_VillageLeader_Idle, 0, MSG_CH5_002D) + CaseLt(STORY_CH5_ZIP_LINE_READY) + IfEq(AF_JAN02_RaphaelComment, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_TalkSit, ANIM_VillageLeader_IdleSit, 0, MSG_CH5_002E) + Set(AF_JAN02_RaphaelComment, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_TalkSit, ANIM_VillageLeader_IdleSit, 0, MSG_CH5_002F) + EndIf + CaseLt(STORY_CH5_ENTERED_MT_LAVA_LAVA) + Call(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_TalkSit, ANIM_VillageLeader_IdleSit, 0, MSG_CH5_0030) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_TalkSit, ANIM_VillageLeader_IdleSit, 0, MSG_CH5_0031) + CaseLt(STORY_CH6_FLOWER_GATE_OPEN) + Call(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_TalkSit, ANIM_VillageLeader_IdleSit, 0, MSG_CH5_0032) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_TalkSit, ANIM_VillageLeader_IdleSit, 0, MSG_CH5_0033) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_VillageLeader) = { - EVT_CALL(BindNpcIdle, NPC_SELF, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_VillageLeader_IdleSit) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_VillageLeader))) - EVT_CASE_LT(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CASE_LT(STORY_CH5_GOT_JADE_RAVEN) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_VillageLeader_Idle) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 1) - EVT_CALL(SetNpcPos, NPC_SELF, 0, 15, -50) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_VillageLeader))) - EVT_CASE_LT(STORY_CH5_RAPHAEL_LEFT_NEST) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_VillageLeader_Idle) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 1) - EVT_CALL(SetNpcPos, NPC_SELF, 30, 15, -30) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_VillageLeader))) - EVT_CASE_DEFAULT - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_VillageLeader))) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_VillageLeader_IdleSit) + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_VillageLeader))) + CaseLt(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + CaseLt(STORY_CH5_GOT_JADE_RAVEN) + Call(SetNpcAnimation, NPC_SELF, ANIM_VillageLeader_Idle) + Call(InterpNpcYaw, NPC_SELF, 90, 1) + Call(SetNpcPos, NPC_SELF, 0, 15, -50) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_VillageLeader))) + CaseLt(STORY_CH5_RAPHAEL_LEFT_NEST) + Call(SetNpcAnimation, NPC_SELF, ANIM_VillageLeader_Idle) + Call(InterpNpcYaw, NPC_SELF, 90, 1) + Call(SetNpcPos, NPC_SELF, 30, 15, -30) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_VillageLeader))) + CaseDefault + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_VillageLeader))) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Councillor) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_IF_EQ(AF_JAN02_MetCouncillor, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_LeadersFriend_TalkSit, ANIM_LeadersFriend_IdleSit, 0, MSG_CH5_0034) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_LeadersFriend_TalkSit, ANIM_LeadersFriend_IdleSit, 0) - EVT_SET(AF_JAN02_MetCouncillor, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_LeadersFriend_TalkSit, ANIM_LeadersFriend_IdleSit, 0, MSG_CH5_0035) - EVT_END_IF - EVT_CASE_LT(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_IF_EQ(GF_JAN03_AgreedToRescueChildren, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_LeadersFriend_TalkSitSad, ANIM_LeadersFriend_BowSit, 0, MSG_CH5_0036) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_LeadersFriend_TalkSitSad, ANIM_LeadersFriend_BowSit, 0, MSG_CH5_0037) - EVT_END_IF - EVT_CASE_LT(STORY_CH5_GOT_JADE_RAVEN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_LeadersFriend_TalkSit, ANIM_LeadersFriend_IdleSit, 0, MSG_CH5_0038) - EVT_CASE_LT(STORY_CH5_ENTERED_MT_LAVA_LAVA) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_LeadersFriend_TalkSit, ANIM_LeadersFriend_IdleSit, 0, MSG_CH5_0039) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_LeadersFriend_TalkSit, ANIM_LeadersFriend_IdleSit, 0, MSG_CH5_003A) - EVT_CASE_LT(STORY_CH6_FLOWER_GATE_OPEN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_LeadersFriend_TalkSit, ANIM_LeadersFriend_IdleSit, 0, MSG_CH5_003B) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_LeadersFriend_TalkSit, ANIM_LeadersFriend_IdleSit, 0, MSG_CH5_003C) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + IfEq(AF_JAN02_MetCouncillor, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_LeadersFriend_TalkSit, ANIM_LeadersFriend_IdleSit, 0, MSG_CH5_0034) + Call(EndSpeech, NPC_SELF, ANIM_LeadersFriend_TalkSit, ANIM_LeadersFriend_IdleSit, 0) + Set(AF_JAN02_MetCouncillor, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_LeadersFriend_TalkSit, ANIM_LeadersFriend_IdleSit, 0, MSG_CH5_0035) + EndIf + CaseLt(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + IfEq(GF_JAN03_AgreedToRescueChildren, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_LeadersFriend_TalkSitSad, ANIM_LeadersFriend_BowSit, 0, MSG_CH5_0036) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_LeadersFriend_TalkSitSad, ANIM_LeadersFriend_BowSit, 0, MSG_CH5_0037) + EndIf + CaseLt(STORY_CH5_GOT_JADE_RAVEN) + Call(SpeakToPlayer, NPC_SELF, ANIM_LeadersFriend_TalkSit, ANIM_LeadersFriend_IdleSit, 0, MSG_CH5_0038) + CaseLt(STORY_CH5_ENTERED_MT_LAVA_LAVA) + Call(SpeakToPlayer, NPC_SELF, ANIM_LeadersFriend_TalkSit, ANIM_LeadersFriend_IdleSit, 0, MSG_CH5_0039) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_LeadersFriend_TalkSit, ANIM_LeadersFriend_IdleSit, 0, MSG_CH5_003A) + CaseLt(STORY_CH6_FLOWER_GATE_OPEN) + Call(SpeakToPlayer, NPC_SELF, ANIM_LeadersFriend_TalkSit, ANIM_LeadersFriend_IdleSit, 0, MSG_CH5_003B) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_LeadersFriend_TalkSit, ANIM_LeadersFriend_IdleSit, 0, MSG_CH5_003C) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Councillor) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_LeadersFriend_IdleSit) - EVT_CALL(SetNpcCollisionSize, NPC_SELF, 40, 32) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_CASE_LT(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_LeadersFriend_BowSit) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(BindNpcIdle, NPC_SELF, 0) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Councillor))) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_LeadersFriend_IdleSit) + Call(SetNpcCollisionSize, NPC_SELF, 40, 32) + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + CaseLt(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + Call(SetNpcAnimation, NPC_SELF, ANIM_LeadersFriend_BowSit) + EndIf + EndSwitch + Call(BindNpcIdle, NPC_SELF, 0) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Councillor))) + Return + End }; EvtScript N(EVS_NpcInteract_Yoshi_01) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Red_Talk, ANIM_Yoshi_Red_Idle, 0, MSG_CH5_003D) - EVT_CASE_LT(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_EXEC_WAIT(N(EVS_GetRescuedYoshiCount)) - EVT_IF_EQ(LVar0, 0) - EVT_IF_EQ(GF_JAN03_AgreedToRescueChildren, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Red_CryTalk, ANIM_Yoshi_Red_Cry, 0, MSG_CH5_003E) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Red_CryTalk, ANIM_Yoshi_Red_Cry, 0, MSG_CH5_003F) - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(GF_JAN08_SavedYoshi, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Red_CryTalk, ANIM_Yoshi_Red_Cry, 0, MSG_CH5_0040) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Red_Talk, ANIM_Yoshi_Red_Idle, 0, MSG_CH5_0041) - EVT_END_IF - EVT_END_IF - EVT_CASE_LE(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Red_Talk, ANIM_Yoshi_Red_Idle, 0, MSG_CH5_0042) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Red_Talk, ANIM_Yoshi_Red_Idle, 0, MSG_CH5_0043) - EVT_CASE_LT(STORY_CH6_FLOWER_GATE_OPEN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Red_Talk, ANIM_Yoshi_Red_Idle, 0, MSG_CH5_0044) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Red_Talk, ANIM_Yoshi_Red_Idle, 0, MSG_CH5_0045) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Red_Talk, ANIM_Yoshi_Red_Idle, 0, MSG_CH5_003D) + CaseLt(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + ExecWait(N(EVS_GetRescuedYoshiCount)) + IfEq(LVar0, 0) + IfEq(GF_JAN03_AgreedToRescueChildren, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Red_CryTalk, ANIM_Yoshi_Red_Cry, 0, MSG_CH5_003E) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Red_CryTalk, ANIM_Yoshi_Red_Cry, 0, MSG_CH5_003F) + EndIf + Else + IfEq(GF_JAN08_SavedYoshi, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Red_CryTalk, ANIM_Yoshi_Red_Cry, 0, MSG_CH5_0040) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Red_Talk, ANIM_Yoshi_Red_Idle, 0, MSG_CH5_0041) + EndIf + EndIf + CaseLe(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Red_Talk, ANIM_Yoshi_Red_Idle, 0, MSG_CH5_0042) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Red_Talk, ANIM_Yoshi_Red_Idle, 0, MSG_CH5_0043) + CaseLt(STORY_CH6_FLOWER_GATE_OPEN) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Red_Talk, ANIM_Yoshi_Red_Idle, 0, MSG_CH5_0044) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Red_Talk, ANIM_Yoshi_Red_Idle, 0, MSG_CH5_0045) + EndSwitch + Return + End }; EvtScript N(EVS_NpcIdle_Yoshi_01) = { - EVT_LOOP(0) - EVT_CALL(NpcMoveTo, NPC_SELF, -520, -270, 50) - EVT_CALL(NpcMoveTo, NPC_SELF, -420, -270, 50) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(NpcMoveTo, NPC_SELF, -520, -270, 50) + Call(NpcMoveTo, NPC_SELF, -420, -270, 50) + EndLoop + Return + End }; EvtScript N(EVS_NpcInit_Yoshi_01) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_CASE_LT(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_IF_EQ(GF_JAN08_SavedYoshi, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Yoshi_Red_Panic) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Yoshi_01))) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Yoshi_01))) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + CaseLt(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + IfEq(GF_JAN08_SavedYoshi, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Yoshi_Red_Panic) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Yoshi_01))) + EndIf + EndSwitch + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Yoshi_01))) + Return + End }; EvtScript N(EVS_NpcInteract_Yoshi_02) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Blue_Talk, ANIM_Yoshi_Blue_Idle, 0, MSG_CH5_0046) - EVT_CASE_LT(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_EXEC_WAIT(N(EVS_GetRescuedYoshiCount)) - EVT_IF_EQ(LVar0, 0) - EVT_IF_EQ(GF_JAN03_AgreedToRescueChildren, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Blue_CryTalk, ANIM_Yoshi_Blue_Cry, 0, MSG_CH5_0047) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Blue_CryTalk, ANIM_Yoshi_Blue_Cry, 0, MSG_CH5_0048) - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(GF_JAN10_SavedYoshi, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Blue_CryTalk, ANIM_Yoshi_Blue_Cry, 0, MSG_CH5_0049) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Blue_Talk, ANIM_Yoshi_Blue_Idle, 0, MSG_CH5_004A) - EVT_END_IF - EVT_END_IF - EVT_CASE_LE(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Blue_Talk, ANIM_Yoshi_Blue_Idle, 0, MSG_CH5_004B) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Blue_Talk, ANIM_Yoshi_Blue_Idle, 0, MSG_CH5_004C) - EVT_CASE_LT(STORY_CH6_FLOWER_GATE_OPEN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Blue_Talk, ANIM_Yoshi_Blue_Idle, 0, MSG_CH5_004D) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Blue_Talk, ANIM_Yoshi_Blue_Idle, 0, MSG_CH5_004E) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Blue_Talk, ANIM_Yoshi_Blue_Idle, 0, MSG_CH5_0046) + CaseLt(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + ExecWait(N(EVS_GetRescuedYoshiCount)) + IfEq(LVar0, 0) + IfEq(GF_JAN03_AgreedToRescueChildren, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Blue_CryTalk, ANIM_Yoshi_Blue_Cry, 0, MSG_CH5_0047) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Blue_CryTalk, ANIM_Yoshi_Blue_Cry, 0, MSG_CH5_0048) + EndIf + Else + IfEq(GF_JAN10_SavedYoshi, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Blue_CryTalk, ANIM_Yoshi_Blue_Cry, 0, MSG_CH5_0049) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Blue_Talk, ANIM_Yoshi_Blue_Idle, 0, MSG_CH5_004A) + EndIf + EndIf + CaseLe(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Blue_Talk, ANIM_Yoshi_Blue_Idle, 0, MSG_CH5_004B) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Blue_Talk, ANIM_Yoshi_Blue_Idle, 0, MSG_CH5_004C) + CaseLt(STORY_CH6_FLOWER_GATE_OPEN) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Blue_Talk, ANIM_Yoshi_Blue_Idle, 0, MSG_CH5_004D) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Blue_Talk, ANIM_Yoshi_Blue_Idle, 0, MSG_CH5_004E) + EndSwitch + Return + End }; EvtScript N(EVS_NpcIdle_Yoshi_02) = { - EVT_LOOP(0) - EVT_CALL(NpcMoveTo, NPC_SELF, 180, -520, 50) - EVT_CALL(NpcMoveTo, NPC_SELF, 80, -520, 50) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(NpcMoveTo, NPC_SELF, 180, -520, 50) + Call(NpcMoveTo, NPC_SELF, 80, -520, 50) + EndLoop + Return + End }; EvtScript N(EVS_NpcInit_Yoshi_02) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_CASE_LT(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_IF_EQ(GF_JAN10_SavedYoshi, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Yoshi_Blue_Panic) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Yoshi_02))) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Yoshi_02))) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + CaseLt(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + IfEq(GF_JAN10_SavedYoshi, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Yoshi_Blue_Panic) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Yoshi_02))) + EndIf + EndSwitch + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Yoshi_02))) + Return + End }; EvtScript N(EVS_NpcInteract_Yoshi_03) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Purple_Talk, ANIM_Yoshi_Purple_Idle, 0, MSG_CH5_004F) - EVT_CASE_LT(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_EXEC_WAIT(N(EVS_GetRescuedYoshiCount)) - EVT_IF_EQ(LVar0, 0) - EVT_IF_EQ(GF_JAN03_AgreedToRescueChildren, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Purple_CryTalk, ANIM_Yoshi_Purple_Cry, 0, MSG_CH5_0050) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Purple_CryTalk, ANIM_Yoshi_Purple_Cry, 0, MSG_CH5_0051) - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(GF_JAN05_SavedYoshi, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Purple_CryTalk, ANIM_Yoshi_Purple_Cry, 0, MSG_CH5_0052) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Purple_Talk, ANIM_Yoshi_Purple_Idle, 0, MSG_CH5_0053) - EVT_END_IF - EVT_END_IF - EVT_CASE_LE(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Purple_Talk, ANIM_Yoshi_Purple_Idle, 0, MSG_CH5_0054) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Purple_Talk, ANIM_Yoshi_Purple_Idle, 0, MSG_CH5_0055) - EVT_CASE_LT(STORY_CH6_FLOWER_GATE_OPEN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Purple_Talk, ANIM_Yoshi_Purple_Idle, 0, MSG_CH5_0056) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Purple_Talk, ANIM_Yoshi_Purple_Idle, 0, MSG_CH5_0057) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Purple_Talk, ANIM_Yoshi_Purple_Idle, 0, MSG_CH5_004F) + CaseLt(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + ExecWait(N(EVS_GetRescuedYoshiCount)) + IfEq(LVar0, 0) + IfEq(GF_JAN03_AgreedToRescueChildren, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Purple_CryTalk, ANIM_Yoshi_Purple_Cry, 0, MSG_CH5_0050) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Purple_CryTalk, ANIM_Yoshi_Purple_Cry, 0, MSG_CH5_0051) + EndIf + Else + IfEq(GF_JAN05_SavedYoshi, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Purple_CryTalk, ANIM_Yoshi_Purple_Cry, 0, MSG_CH5_0052) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Purple_Talk, ANIM_Yoshi_Purple_Idle, 0, MSG_CH5_0053) + EndIf + EndIf + CaseLe(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Purple_Talk, ANIM_Yoshi_Purple_Idle, 0, MSG_CH5_0054) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Purple_Talk, ANIM_Yoshi_Purple_Idle, 0, MSG_CH5_0055) + CaseLt(STORY_CH6_FLOWER_GATE_OPEN) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Purple_Talk, ANIM_Yoshi_Purple_Idle, 0, MSG_CH5_0056) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Purple_Talk, ANIM_Yoshi_Purple_Idle, 0, MSG_CH5_0057) + EndSwitch + Return + End }; EvtScript N(EVS_NpcIdle_Yoshi_03) = { - EVT_LOOP(0) - EVT_CALL(NpcMoveTo, NPC_SELF, 600, -150, 50) - EVT_CALL(NpcMoveTo, NPC_SELF, 500, -150, 50) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(NpcMoveTo, NPC_SELF, 600, -150, 50) + Call(NpcMoveTo, NPC_SELF, 500, -150, 50) + EndLoop + Return + End }; EvtScript N(EVS_NpcInit_Yoshi_03) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_CASE_LT(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_IF_EQ(GF_JAN05_SavedYoshi, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Yoshi_Purple_Panic) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Yoshi_03))) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Yoshi_03))) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + CaseLt(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + IfEq(GF_JAN05_SavedYoshi, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Yoshi_Purple_Panic) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Yoshi_03))) + EndIf + EndSwitch + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Yoshi_03))) + Return + End }; AnimID N(ExtraAnims_Councillor)[] = { diff --git a/src/world/area_jan/jan_02/jan_02_4_entity.c b/src/world/area_jan/jan_02/jan_02_4_entity.c index 790bf0cd21f..8fe0f271d9b 100644 --- a/src/world/area_jan/jan_02/jan_02_4_entity.c +++ b/src/world/area_jan/jan_02/jan_02_4_entity.c @@ -2,8 +2,8 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 25, 15, -60, 0, MODEL_o222, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_JAN02_HiddenPanel) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HiddenPanel), 25, 15, -60, 0, MODEL_o222, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_JAN02_HiddenPanel) + Return + End }; diff --git a/src/world/area_jan/jan_02/jan_02_5_foliage.c b/src/world/area_jan/jan_02/jan_02_5_foliage.c index b20ca307bde..b89d298b0d3 100644 --- a/src/world/area_jan/jan_02/jan_02_5_foliage.c +++ b/src/world/area_jan/jan_02/jan_02_5_foliage.c @@ -82,20 +82,20 @@ BombTrigger N(BombPos_Tree4) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(AF_JAN02_TreeDrop2, FALSE) - EVT_SET(AF_JAN02_TreeDrop3, FALSE) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o239, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o259, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o343, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree3)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree4))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o364, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree4)), 1, 0) - EVT_RETURN - EVT_END + Set(AF_JAN02_TreeDrop2, FALSE) + Set(AF_JAN02_TreeDrop3, FALSE) + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o239, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o259, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree3))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o343, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree3)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree4))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o364, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree4)), 1, 0) + Return + End }; diff --git a/src/world/area_jan/jan_03/jan_03_1_music.c b/src/world/area_jan/jan_03/jan_03_1_music.c index b118a003706..7e98fd4b063 100644 --- a/src/world/area_jan/jan_03/jan_03_1_music.c +++ b/src/world/area_jan/jan_03/jan_03_1_music.c @@ -1,19 +1,19 @@ #include "jan_03.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING, STORY_CH5_SUSHIE_JOINED_PARTY) - EVT_CALL(SetMusicTrack, 0, SONG_YOSHIS_PANIC, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_YOSHIS_VILLAGE, 0, 8) - EVT_END_SWITCH - EVT_CALL(ClearAmbientSounds, 250) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseRange(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING, STORY_CH5_SUSHIE_JOINED_PARTY) + Call(SetMusicTrack, 0, SONG_YOSHIS_PANIC, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_YOSHIS_VILLAGE, 0, 8) + EndSwitch + Call(ClearAmbientSounds, 250) + Return + End }; EvtScript N(EVS_PlayRestingSong) = { - EVT_CALL(SetMusicTrack, 0, SONG_TAKING_REST, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TAKING_REST, 0, 8) + Return + End }; diff --git a/src/world/area_jan/jan_03/jan_03_2_main.c b/src/world/area_jan/jan_03/jan_03_2_main.c index 9f55f80ec15..8891ffb32a1 100644 --- a/src/world/area_jan/jan_03/jan_03_2_main.c +++ b/src/world/area_jan/jan_03/jan_03_2_main.c @@ -17,97 +17,97 @@ EvtScript N(EVS_ExitWalk_jan_22_0) = EVT_EXIT_WALK(60, jan_03_ENTRY_2, "jan_22", MAP_RODATA_PAD(1, exits); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_02_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_05_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_22_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_jan_02_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_jan_05_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_jan_22_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, jan_03_ENTRY_3) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_ELSE - EVT_IF_EQ(GF_JAN03_WarpPipe, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerPos, LVar0, NPC_DISPOSE_POS_Y, LVar2) - EVT_WAIT(30) - EVT_CALL(PlaySound, SOUND_GROW) - EVT_SET(GF_JAN03_WarpPipe, TRUE) - EVT_WAIT(30) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_SET(LVarA, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC_WAIT(N(EVS_Pipe_EnterVertical)) - EVT_WAIT(1) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(GetEntryID, LVar0) + IfNe(LVar0, jan_03_ENTRY_3) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Else + IfEq(GF_JAN03_WarpPipe, FALSE) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(SetPlayerPos, LVar0, NPC_DISPOSE_POS_Y, LVar2) + Wait(30) + Call(PlaySound, SOUND_GROW) + Set(GF_JAN03_WarpPipe, TRUE) + Wait(30) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + EndIf + Set(LVarA, Ref(N(EVS_BindExitTriggers))) + ExecWait(N(EVS_Pipe_EnterVertical)) + Wait(1) + EndIf + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_YOSHIS_VILLAGE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(CrisisNPCs))) - EVT_CASE_LT(STORY_CH5_ZIP_LINE_READY) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(ChapterNPCs))) - EVT_CASE_EQ(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(ChapterNPCs))) - EVT_CASE_GT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(AfterNPCs))) - EVT_CASE_DEFAULT - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitnw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(PlaySound, SOUND_LOOP_JAN_BEACH_WAVES) - EVT_EXEC(N(EVS_SetupRooms)) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_CALL(EnableTexPanning, MODEL_o121, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o371, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o119, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_YOSHIS_VILLAGE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + Call(MakeNpcs, FALSE, Ref(N(CrisisNPCs))) + CaseLt(STORY_CH5_ZIP_LINE_READY) + Call(MakeNpcs, FALSE, Ref(N(ChapterNPCs))) + CaseEq(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(MakeNpcs, FALSE, Ref(N(ChapterNPCs))) + CaseGt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(MakeNpcs, FALSE, Ref(N(AfterNPCs))) + CaseDefault + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + EndSwitch + ExecWait(N(EVS_MakeEntities)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitnw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_EnterMap)) + Wait(1) + Exec(N(EVS_SetupMusic)) + Call(PlaySound, SOUND_LOOP_JAN_BEACH_WAVES) + Exec(N(EVS_SetupRooms)) + Exec(N(EVS_SetupFoliage)) + Call(EnableTexPanning, MODEL_o121, TRUE) + Call(EnableTexPanning, MODEL_o371, TRUE) + Call(EnableTexPanning, MODEL_o119, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 0, 400, 0, 0) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( -100, 200, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetModelFlags, MODEL_o189, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_CALL(SetModelFlags, MODEL_o186, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_CALL(SetModelFlags, MODEL_o192, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_CALL(SetModelFlags, MODEL_o195, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_EXEC(N(EVS_SetupShop)) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetModelFlags, MODEL_o189, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Call(SetModelFlags, MODEL_o186, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Call(SetModelFlags, MODEL_o192, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Call(SetModelFlags, MODEL_o195, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Exec(N(EVS_SetupShop)) + Return + End }; diff --git a/src/world/area_jan/jan_03/jan_03_3_shop.c b/src/world/area_jan/jan_03/jan_03_3_shop.c index dc5af59c77f..43bc1edc24a 100644 --- a/src/world/area_jan/jan_03/jan_03_3_shop.c +++ b/src/world/area_jan/jan_03/jan_03_3_shop.c @@ -47,14 +47,14 @@ ShopSellPriceData N(PriceList)[] = { }; EvtScript N(EVS_OnBuy) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(SHOP_BUY_RESULT_CANCEL) - EVT_CASE_EQ(SHOP_BUY_RESULT_4) - EVT_CASE_EQ(SHOP_BUY_RESULT_OK) - EVT_CASE_EQ(SHOP_BUY_RESULT_2) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(SHOP_BUY_RESULT_CANCEL) + CaseEq(SHOP_BUY_RESULT_4) + CaseEq(SHOP_BUY_RESULT_OK) + CaseEq(SHOP_BUY_RESULT_2) + EndSwitch + Return + End }; ShopItemLocation N(ItemPositions)[] = { @@ -75,9 +75,9 @@ ShopOwner N(Owner) = { }; EvtScript N(EVS_SetupShop) = { - EVT_CALL(EnableGroup, MODEL_g126, FALSE) - EVT_CALL(MakeShop, EVT_PTR(N(ItemPositions)), EVT_PTR(N(Inventory)), EVT_PTR(N(PriceList)), ITEM_ENTITY_FLAG_TOSS_LOWER) - EVT_CALL(MakeShopOwner, EVT_PTR(N(Owner))) - EVT_RETURN - EVT_END + Call(EnableGroup, MODEL_g126, FALSE) + Call(MakeShop, Ref(N(ItemPositions)), Ref(N(Inventory)), Ref(N(PriceList)), ITEM_ENTITY_FLAG_TOSS_LOWER) + Call(MakeShopOwner, Ref(N(Owner))) + Return + End }; diff --git a/src/world/area_jan/jan_03/jan_03_4_npc.c b/src/world/area_jan/jan_03/jan_03_4_npc.c index 5d585d100ef..4503b738c82 100644 --- a/src/world/area_jan/jan_03/jan_03_4_npc.c +++ b/src/world/area_jan/jan_03/jan_03_4_npc.c @@ -36,14 +36,14 @@ s32 N(RedYoshiKidLetters)[] = { }; EvtScript N(EVS_LetterPrompt_RedYoshiKid) = { - EVT_CALL(N(LetterDelivery_Init), + Call(N(LetterDelivery_Init), NPC_YoshiKid_02, ANIM_YoshiKid_Red_Talk, ANIM_YoshiKid_Red_Idle, ITEM_LETTER_CHAIN_YOSHI_KID, ITEM_LETTER_CHAIN_DANE_T_2, MSG_CH5_0079, MSG_CH5_007A, MSG_CH5_007B, MSG_CH5_007C, - EVT_PTR(N(RedYoshiKidLetters))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) - EVT_RETURN - EVT_END + Ref(N(RedYoshiKidLetters))) + ExecWait(N(EVS_DoLetterDelivery)) + Return + End }; s32 N(KoloradoLetters)[] = { @@ -52,22 +52,22 @@ s32 N(KoloradoLetters)[] = { }; EvtScript N(EVS_LetterPrompt_Kolorado) = { - EVT_CALL(N(LetterDelivery_Init), + Call(N(LetterDelivery_Init), NPC_Kolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, ITEM_LETTER_TO_KOLORADO, ITEM_NONE, MSG_CH5_001D, MSG_CH5_001E, MSG_CH5_001F, MSG_CH5_0020, - EVT_PTR(N(KoloradoLetters))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) - EVT_RETURN - EVT_END + Ref(N(KoloradoLetters))) + ExecWait(N(EVS_DoLetterDelivery)) + Return + End }; EvtScript N(EVS_LetterReward_Kolorado) = { - EVT_IF_EQ(LVarC, DELIVERY_ACCEPTED) + IfEq(LVarC, DELIVERY_ACCEPTED) EVT_GIVE_STAR_PIECE() - EVT_END_IF - EVT_RETURN - EVT_END + EndIf + Return + End }; s32 N(FoodItemList)[] = { @@ -134,489 +134,489 @@ API_CALLABLE(N(CountFoodItems)) { EvtScript N(EVS_GetRescuedYoshiCount) = { - EVT_SET(LVar0, 0) - EVT_ADD(LVar0, GF_JAN05_SavedYoshi) - EVT_ADD(LVar0, GF_JAN07_SavedYoshi) - EVT_ADD(LVar0, GF_JAN08_SavedYoshi) - EVT_ADD(LVar0, GF_JAN10_SavedYoshi) - EVT_ADD(LVar0, GF_JAN11_SavedYoshi) - EVT_RETURN - EVT_END + Set(LVar0, 0) + Add(LVar0, GF_JAN05_SavedYoshi) + Add(LVar0, GF_JAN07_SavedYoshi) + Add(LVar0, GF_JAN08_SavedYoshi) + Add(LVar0, GF_JAN10_SavedYoshi) + Add(LVar0, GF_JAN11_SavedYoshi) + Return + End }; EvtScript N(EVS_ToadHouse_SetDialogue) = { - EVT_SET(LVar0, MSG_CH5_0094) - EVT_SET(LVar8, MSG_CH5_0095) - EVT_SET(LVar1, MSG_CH5_0096) - EVT_SET(LVar2, MSG_CH5_0097) - EVT_SET(LVar3, MSG_CH5_0098) - EVT_RETURN - EVT_END + Set(LVar0, MSG_CH5_0094) + Set(LVar8, MSG_CH5_0095) + Set(LVar1, MSG_CH5_0096) + Set(LVar2, MSG_CH5_0097) + Set(LVar3, MSG_CH5_0098) + Return + End }; EvtScript N(EVS_ToadHouse_GetInBed) = { - EVT_EXEC(N(EVS_PlayRestingSong)) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.5)) - EVT_CALL(PlayerMoveTo, 322, -178, 0) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(N(ToadHouse_CamSetFOV), 0, 40) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 54, -27) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 135) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 406, -130) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 361, -190) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, -1) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, 361, -194, 0) - EVT_CALL(PlayerMoveTo, 370, -257, 0) - EVT_CALL(InterpPlayerYaw, 229, 1) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetPlayerImgFXFlags, IMGFX_FLAG_800) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_GET_IN_BED, 1, 1, 0) - EVT_THREAD - EVT_WAIT(60) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) - EVT_END_THREAD - EVT_WAIT(20) - EVT_THREAD - EVT_WAIT(81) - EVT_CALL(N(ToadHouse_CamSetFOV), 0, 25) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_PlayRestingSong)) + Call(SetPlayerSpeed, Float(3.5)) + Call(PlayerMoveTo, 322, -178, 0) + Thread + Wait(15) + Call(N(ToadHouse_CamSetFOV), 0, 40) + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamPitch, CAM_DEFAULT, 54, -27) + Call(SetCamDistance, CAM_DEFAULT, 135) + Call(SetCamPosA, CAM_DEFAULT, 406, -130) + Call(SetCamPosB, CAM_DEFAULT, 361, -190) + Call(SetCamPosC, CAM_DEFAULT, 0, -1) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, 361, -194, 0) + Call(PlayerMoveTo, 370, -257, 0) + Call(InterpPlayerYaw, 229, 1) + Call(HidePlayerShadow, TRUE) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetPlayerImgFXFlags, IMGFX_FLAG_800) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_GET_IN_BED, 1, 1, 0) + Thread + Wait(60) + Call(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) + EndThread + Wait(20) + Thread + Wait(81) + Call(N(ToadHouse_CamSetFOV), 0, 25) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + EndThread + Return + End }; EvtScript N(EVS_ToadHouse_ReturnFromRest) = { - EVT_CALL(HidePlayerShadow, FALSE) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetPlayerPos, 345, 0, -186) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, 291, -100, 0) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Call(HidePlayerShadow, FALSE) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetPlayerPos, 345, 0, -186) + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, 291, -100, 0) + Exec(N(EVS_SetupMusic)) + Return + End }; EvtScript N(EVS_NpcInit_Toad) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ToadHouseKeeper))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ToadHouseKeeper))) + Return + End }; EvtScript N(EVS_NpcInteract_Yoshi_01) = { - EVT_EXEC_WAIT(EVS_ShopOwnerDialog) - EVT_RETURN - EVT_END + ExecWait(EVS_ShopOwnerDialog) + Return + End }; EvtScript N(EVS_NpcInit_Yoshi_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Yoshi_01))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Yoshi_01))) + Return + End }; EvtScript N(EVS_NpcInteract_VillageLeader) = { - EVT_EXEC_WAIT(N(EVS_GetRescuedYoshiCount)) - EVT_SWITCH(LVar0) - EVT_CASE_LT(1) - EVT_IF_EQ(GF_JAN03_AgreedToRescueChildren, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_Shout, ANIM_VillageLeader_IdleSad, 0, MSG_CH5_0099) - EVT_SET(GF_JAN03_AgreedToRescueChildren, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_Shout, ANIM_VillageLeader_IdleSad, 0, MSG_CH5_009A) - EVT_END_IF - EVT_CASE_LT(3) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_Shout, ANIM_VillageLeader_IdleSad, 0, MSG_CH5_009B) - EVT_CASE_LT(4) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_Shout, ANIM_VillageLeader_IdleSad, 0, MSG_CH5_009C) - EVT_CASE_LT(5) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_Shout, ANIM_VillageLeader_IdleSad, 0, MSG_CH5_009D) - EVT_END_SWITCH - EVT_RETURN - EVT_END + ExecWait(N(EVS_GetRescuedYoshiCount)) + Switch(LVar0) + CaseLt(1) + IfEq(GF_JAN03_AgreedToRescueChildren, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_Shout, ANIM_VillageLeader_IdleSad, 0, MSG_CH5_0099) + Set(GF_JAN03_AgreedToRescueChildren, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_Shout, ANIM_VillageLeader_IdleSad, 0, MSG_CH5_009A) + EndIf + CaseLt(3) + Call(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_Shout, ANIM_VillageLeader_IdleSad, 0, MSG_CH5_009B) + CaseLt(4) + Call(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_Shout, ANIM_VillageLeader_IdleSad, 0, MSG_CH5_009C) + CaseLt(5) + Call(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_Shout, ANIM_VillageLeader_IdleSad, 0, MSG_CH5_009D) + EndSwitch + Return + End }; EvtScript N(EVS_NpcIdle_VillageLeader) = { - EVT_LOOP(0) - EVT_CALL(NpcMoveTo, NPC_SELF, -300, -70, 50) - EVT_CALL(NpcMoveTo, NPC_SELF, -350, -70, 50) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(NpcMoveTo, NPC_SELF, -300, -70, 50) + Call(NpcMoveTo, NPC_SELF, -350, -70, 50) + EndLoop + Return + End }; EvtScript N(EVS_NpcInit_VillageLeader) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_CASE_LT(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_VillageLeader_Panic) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_VillageLeader))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_VillageLeader))) - EVT_CASE_DEFAULT - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + Call(RemoveNpc, NPC_SELF) + CaseLt(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + Call(SetNpcAnimation, NPC_SELF, ANIM_VillageLeader_Panic) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_VillageLeader))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_VillageLeader))) + CaseDefault + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Yoshi_02) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Green_Talk, ANIM_Yoshi_Green_Idle, 0, MSG_CH5_005A) - EVT_CASE_LT(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_EXEC_WAIT(N(EVS_GetRescuedYoshiCount)) - EVT_IF_EQ(LVar0, 0) - EVT_IF_EQ(GF_JAN03_AgreedToRescueChildren, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Green_CryTalk, ANIM_Yoshi_Green_Cry, 0, MSG_CH5_005B) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Green_CryTalk, ANIM_Yoshi_Green_Cry, 0, MSG_CH5_005C) - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(GF_JAN11_SavedYoshi, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Green_CryTalk, ANIM_Yoshi_Green_Cry, 0, MSG_CH5_005D) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Green_Talk, ANIM_Yoshi_Green_Idle, 0, MSG_CH5_005E) - EVT_END_IF - EVT_END_IF - EVT_CASE_LE(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Green_Talk, ANIM_Yoshi_Green_Idle, 0, MSG_CH5_005F) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Green_Talk, ANIM_Yoshi_Green_Idle, 0, MSG_CH5_0060) - EVT_CASE_LT(STORY_CH6_FLOWER_GATE_OPEN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Green_Talk, ANIM_Yoshi_Green_Idle, 0, MSG_CH5_0061) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Green_Talk, ANIM_Yoshi_Green_Idle, 0, MSG_CH5_0062) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Green_Talk, ANIM_Yoshi_Green_Idle, 0, MSG_CH5_005A) + CaseLt(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + ExecWait(N(EVS_GetRescuedYoshiCount)) + IfEq(LVar0, 0) + IfEq(GF_JAN03_AgreedToRescueChildren, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Green_CryTalk, ANIM_Yoshi_Green_Cry, 0, MSG_CH5_005B) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Green_CryTalk, ANIM_Yoshi_Green_Cry, 0, MSG_CH5_005C) + EndIf + Else + IfEq(GF_JAN11_SavedYoshi, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Green_CryTalk, ANIM_Yoshi_Green_Cry, 0, MSG_CH5_005D) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Green_Talk, ANIM_Yoshi_Green_Idle, 0, MSG_CH5_005E) + EndIf + EndIf + CaseLe(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Green_Talk, ANIM_Yoshi_Green_Idle, 0, MSG_CH5_005F) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Green_Talk, ANIM_Yoshi_Green_Idle, 0, MSG_CH5_0060) + CaseLt(STORY_CH6_FLOWER_GATE_OPEN) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Green_Talk, ANIM_Yoshi_Green_Idle, 0, MSG_CH5_0061) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Green_Talk, ANIM_Yoshi_Green_Idle, 0, MSG_CH5_0062) + EndSwitch + Return + End }; EvtScript N(EVS_NpcIdle_Yoshi_02) = { - EVT_LOOP(0) - EVT_CALL(NpcMoveTo, NPC_SELF, -430, -220, 50) - EVT_CALL(NpcMoveTo, NPC_SELF, -340, -220, 50) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(NpcMoveTo, NPC_SELF, -430, -220, 50) + Call(NpcMoveTo, NPC_SELF, -340, -220, 50) + EndLoop + Return + End }; EvtScript N(EVS_NpcInit_Yoshi_02) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_CASE_LT(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_IF_EQ(GF_JAN11_SavedYoshi, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Yoshi_Green_Panic) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Yoshi_02))) - EVT_ELSE - EVT_CALL(BindNpcIdle, NPC_SELF, 0) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Yoshi_02))) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + CaseLt(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + IfEq(GF_JAN11_SavedYoshi, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Yoshi_Green_Panic) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Yoshi_02))) + Else + Call(BindNpcIdle, NPC_SELF, 0) + EndIf + EndSwitch + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Yoshi_02))) + Return + End }; EvtScript N(EVS_NpcInteract_Yoshi_03) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(N(CountFoodItems), LVar0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Yellow_Talk, ANIM_Yoshi_Yellow_Idle, 0, MSG_CH5_006C) + IfGe(GB_StoryProgress, STORY_CH5_STAR_SPRIT_DEPARTED) + Call(N(CountFoodItems), LVar0) + IfNe(LVar0, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Yellow_Talk, ANIM_Yoshi_Yellow_Idle, 0, MSG_CH5_006C) EVT_CHOOSE_CONSUMABLE_FROM(N(FoodItemList), 4) - EVT_IF_LE(LVar0, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Yellow_Talk, ANIM_Yoshi_Yellow_Idle, 0, MSG_CH5_006E) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Yellow_Talk, ANIM_Yoshi_Yellow_Idle, 0, MSG_CH5_006D) - EVT_SET(LVar0, ITEM_MELON) - EVT_SET(LVar1, ITEM_TYPE_CONSUMABLE) - EVT_EXEC_WAIT(N(GiveItemReward)) // misuse? - EVT_CALL(AddItem, ITEM_MELON, LVar0) - EVT_END_IF - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Yellow_Talk, ANIM_Yoshi_Yellow_Idle, 0, MSG_CH5_0063) - EVT_CASE_LT(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_EXEC_WAIT(N(EVS_GetRescuedYoshiCount)) - EVT_IF_EQ(LVar0, 0) - EVT_IF_EQ(GF_JAN03_AgreedToRescueChildren, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Yellow_CryTalk, ANIM_Yoshi_Yellow_Cry, 0, MSG_CH5_0064) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Yellow_CryTalk, ANIM_Yoshi_Yellow_Cry, 0, MSG_CH5_0065) - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(GF_JAN07_SavedYoshi, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Yellow_CryTalk, ANIM_Yoshi_Yellow_Cry, 0, MSG_CH5_0066) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Yellow_Talk, ANIM_Yoshi_Yellow_Idle, 0, MSG_CH5_0067) - EVT_END_IF - EVT_END_IF - EVT_CASE_LE(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Yellow_Talk, ANIM_Yoshi_Yellow_Idle, 0, MSG_CH5_0068) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Yellow_Talk, ANIM_Yoshi_Yellow_Idle, 0, MSG_CH5_0069) - EVT_CASE_LT(STORY_CH6_FLOWER_GATE_OPEN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Yellow_Talk, ANIM_Yoshi_Yellow_Idle, 0, MSG_CH5_006A) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Yellow_Talk, ANIM_Yoshi_Yellow_Idle, 0, MSG_CH5_006B) - EVT_END_SWITCH - EVT_RETURN - EVT_END + IfLe(LVar0, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Yellow_Talk, ANIM_Yoshi_Yellow_Idle, 0, MSG_CH5_006E) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Yellow_Talk, ANIM_Yoshi_Yellow_Idle, 0, MSG_CH5_006D) + Set(LVar0, ITEM_MELON) + Set(LVar1, ITEM_TYPE_CONSUMABLE) + ExecWait(N(GiveItemReward)) // misuse? + Call(AddItem, ITEM_MELON, LVar0) + EndIf + Return + EndIf + EndIf + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Yellow_Talk, ANIM_Yoshi_Yellow_Idle, 0, MSG_CH5_0063) + CaseLt(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + ExecWait(N(EVS_GetRescuedYoshiCount)) + IfEq(LVar0, 0) + IfEq(GF_JAN03_AgreedToRescueChildren, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Yellow_CryTalk, ANIM_Yoshi_Yellow_Cry, 0, MSG_CH5_0064) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Yellow_CryTalk, ANIM_Yoshi_Yellow_Cry, 0, MSG_CH5_0065) + EndIf + Else + IfEq(GF_JAN07_SavedYoshi, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Yellow_CryTalk, ANIM_Yoshi_Yellow_Cry, 0, MSG_CH5_0066) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Yellow_Talk, ANIM_Yoshi_Yellow_Idle, 0, MSG_CH5_0067) + EndIf + EndIf + CaseLe(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Yellow_Talk, ANIM_Yoshi_Yellow_Idle, 0, MSG_CH5_0068) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Yellow_Talk, ANIM_Yoshi_Yellow_Idle, 0, MSG_CH5_0069) + CaseLt(STORY_CH6_FLOWER_GATE_OPEN) + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Yellow_Talk, ANIM_Yoshi_Yellow_Idle, 0, MSG_CH5_006A) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Yellow_Talk, ANIM_Yoshi_Yellow_Idle, 0, MSG_CH5_006B) + EndSwitch + Return + End }; EvtScript N(EVS_NpcIdle_Yoshi_03) = { - EVT_LOOP(0) - EVT_CALL(NpcMoveTo, NPC_SELF, -105, -20, 50) - EVT_CALL(NpcMoveTo, NPC_SELF, -190, -80, 50) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(NpcMoveTo, NPC_SELF, -105, -20, 50) + Call(NpcMoveTo, NPC_SELF, -190, -80, 50) + EndLoop + Return + End }; EvtScript N(EVS_NpcInit_Yoshi_03) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_CASE_LT(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_IF_EQ(GF_JAN07_SavedYoshi, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Yoshi_Yellow_Panic) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Yoshi_03))) - EVT_ELSE - EVT_CALL(BindNpcIdle, NPC_SELF, 0) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Yoshi_03))) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + CaseLt(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + IfEq(GF_JAN07_SavedYoshi, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Yoshi_Yellow_Panic) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Yoshi_03))) + Else + Call(BindNpcIdle, NPC_SELF, 0) + EndIf + EndSwitch + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Yoshi_03))) + Return + End }; EvtScript N(EVS_NpcIdle_YoshiKid_01) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcIdle_YoshiKid_04) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInteract_YoshiKid_01) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Green_Talk, ANIM_YoshiKid_Green_Idle, 0, MSG_CH5_006F) - EVT_CASE_LT(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Green_Talk, ANIM_YoshiKid_Green_Idle, 0, MSG_CH5_0070) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Green_Talk, ANIM_YoshiKid_Green_Idle, 0, MSG_CH5_0071) - EVT_CASE_LT(STORY_CH6_FLOWER_GATE_OPEN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Green_Talk, ANIM_YoshiKid_Green_Idle, 0, MSG_CH5_0072) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Green_Talk, ANIM_YoshiKid_Green_Idle, 0, MSG_CH5_0073) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Green_Talk, ANIM_YoshiKid_Green_Idle, 0, MSG_CH5_006F) + CaseLt(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Green_Talk, ANIM_YoshiKid_Green_Idle, 0, MSG_CH5_0070) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Green_Talk, ANIM_YoshiKid_Green_Idle, 0, MSG_CH5_0071) + CaseLt(STORY_CH6_FLOWER_GATE_OPEN) + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Green_Talk, ANIM_YoshiKid_Green_Idle, 0, MSG_CH5_0072) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Green_Talk, ANIM_YoshiKid_Green_Idle, 0, MSG_CH5_0073) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_YoshiKid_02) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Red_Talk, ANIM_YoshiKid_Red_Idle, 0, MSG_CH5_0074) - EVT_CASE_LT(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Red_Talk, ANIM_YoshiKid_Red_Idle, 0, MSG_CH5_0075) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Red_Talk, ANIM_YoshiKid_Red_Idle, 0, MSG_CH5_0076) - EVT_CASE_LT(STORY_CH6_FLOWER_GATE_OPEN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Red_Talk, ANIM_YoshiKid_Red_Idle, 0, MSG_CH5_0077) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Red_Talk, ANIM_YoshiKid_Red_Idle, 0, MSG_CH5_0078) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_LetterPrompt_RedYoshiKid)) - EVT_IF_NE(LVarC, 0) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Red_Talk, ANIM_YoshiKid_Red_Idle, 0, MSG_CH5_0074) + CaseLt(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Red_Talk, ANIM_YoshiKid_Red_Idle, 0, MSG_CH5_0075) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Red_Talk, ANIM_YoshiKid_Red_Idle, 0, MSG_CH5_0076) + CaseLt(STORY_CH6_FLOWER_GATE_OPEN) + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Red_Talk, ANIM_YoshiKid_Red_Idle, 0, MSG_CH5_0077) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Red_Talk, ANIM_YoshiKid_Red_Idle, 0, MSG_CH5_0078) + EndSwitch + ExecWait(N(EVS_LetterPrompt_RedYoshiKid)) + IfNe(LVarC, 0) + Return + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_YoshiKid_03) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Blue_Talk, ANIM_YoshiKid_Blue_Idle, 0, MSG_CH5_007D) - EVT_CASE_LT(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Blue_Talk, ANIM_YoshiKid_Blue_Idle, 0, MSG_CH5_007E) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Blue_Talk, ANIM_YoshiKid_Blue_Idle, 0, MSG_CH5_007F) - EVT_CASE_LT(STORY_CH6_FLOWER_GATE_OPEN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Blue_Talk, ANIM_YoshiKid_Blue_Idle, 0, MSG_CH5_0080) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Blue_Talk, ANIM_YoshiKid_Blue_Idle, 0, MSG_CH5_0081) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Blue_Talk, ANIM_YoshiKid_Blue_Idle, 0, MSG_CH5_007D) + CaseLt(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Blue_Talk, ANIM_YoshiKid_Blue_Idle, 0, MSG_CH5_007E) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Blue_Talk, ANIM_YoshiKid_Blue_Idle, 0, MSG_CH5_007F) + CaseLt(STORY_CH6_FLOWER_GATE_OPEN) + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Blue_Talk, ANIM_YoshiKid_Blue_Idle, 0, MSG_CH5_0080) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Blue_Talk, ANIM_YoshiKid_Blue_Idle, 0, MSG_CH5_0081) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_YoshiKid_04) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Yellow_Talk, ANIM_YoshiKid_Yellow_Idle, 0, MSG_CH5_0082) - EVT_CASE_LT(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Yellow_Talk, ANIM_YoshiKid_Yellow_Idle, 0, MSG_CH5_0083) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Yellow_Talk, ANIM_YoshiKid_Yellow_Idle, 0, MSG_CH5_0084) - EVT_CASE_LT(STORY_CH6_FLOWER_GATE_OPEN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Yellow_Talk, ANIM_YoshiKid_Yellow_Idle, 0, MSG_CH5_0085) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Yellow_Talk, ANIM_YoshiKid_Yellow_Idle, 0, MSG_CH5_0086) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Yellow_Talk, ANIM_YoshiKid_Yellow_Idle, 0, MSG_CH5_0082) + CaseLt(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Yellow_Talk, ANIM_YoshiKid_Yellow_Idle, 0, MSG_CH5_0083) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Yellow_Talk, ANIM_YoshiKid_Yellow_Idle, 0, MSG_CH5_0084) + CaseLt(STORY_CH6_FLOWER_GATE_OPEN) + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Yellow_Talk, ANIM_YoshiKid_Yellow_Idle, 0, MSG_CH5_0085) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Yellow_Talk, ANIM_YoshiKid_Yellow_Idle, 0, MSG_CH5_0086) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_YoshiKid_05) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Purple_Talk, ANIM_YoshiKid_Purple_Idle, 0, MSG_CH5_0087) - EVT_CASE_LT(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Purple_Talk, ANIM_YoshiKid_Purple_Idle, 0, MSG_CH5_0088) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Purple_Talk, ANIM_YoshiKid_Purple_Idle, 0, MSG_CH5_0089) - EVT_CASE_LT(STORY_CH6_FLOWER_GATE_OPEN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Purple_Talk, ANIM_YoshiKid_Purple_Idle, 0, MSG_CH5_008A) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Purple_Talk, ANIM_YoshiKid_Purple_Idle, 0, MSG_CH5_008B) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Purple_Talk, ANIM_YoshiKid_Purple_Idle, 0, MSG_CH5_0087) + CaseLt(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Purple_Talk, ANIM_YoshiKid_Purple_Idle, 0, MSG_CH5_0088) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Purple_Talk, ANIM_YoshiKid_Purple_Idle, 0, MSG_CH5_0089) + CaseLt(STORY_CH6_FLOWER_GATE_OPEN) + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Purple_Talk, ANIM_YoshiKid_Purple_Idle, 0, MSG_CH5_008A) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Purple_Talk, ANIM_YoshiKid_Purple_Idle, 0, MSG_CH5_008B) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_YoshiKid_01) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_IF_EQ(GF_JAN11_SavedYoshi, FALSE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_ELSE - EVT_IF_EQ(GB_StoryProgress, STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SetNpcPos, NPC_SELF, -490, 0, -90) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, -450, 0, -190) - EVT_END_IF - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_YoshiKid_01))) - EVT_END_IF - EVT_END_IF - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_YoshiKid_01))) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + IfEq(GF_JAN11_SavedYoshi, FALSE) + Call(RemoveNpc, NPC_SELF) + Return + Else + IfEq(GB_StoryProgress, STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SetNpcPos, NPC_SELF, -490, 0, -90) + Else + Call(SetNpcPos, NPC_SELF, -450, 0, -190) + EndIf + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_YoshiKid_01))) + EndIf + EndIf + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_YoshiKid_01))) + Return + End }; EvtScript N(EVS_NpcInit_YoshiKid_02) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_IF_EQ(GF_JAN08_SavedYoshi, FALSE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_YoshiKid_02))) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + IfEq(GF_JAN08_SavedYoshi, FALSE) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + EndIf + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_YoshiKid_02))) + Return + End }; EvtScript N(EVS_NpcInit_YoshiKid_03) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_IF_EQ(GF_JAN10_SavedYoshi, FALSE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_YoshiKid_03))) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + IfEq(GF_JAN10_SavedYoshi, FALSE) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + EndIf + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_YoshiKid_03))) + Return + End }; EvtScript N(EVS_NpcInit_YoshiKid_04) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_IF_EQ(GF_JAN07_SavedYoshi, FALSE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, -135, 0, -70) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_YoshiKid_04))) - EVT_END_IF - EVT_END_IF - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_YoshiKid_04))) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + IfEq(GF_JAN07_SavedYoshi, FALSE) + Call(RemoveNpc, NPC_SELF) + Return + Else + Call(SetNpcPos, NPC_SELF, -135, 0, -70) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_YoshiKid_04))) + EndIf + EndIf + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_YoshiKid_04))) + Return + End }; EvtScript N(EVS_NpcInit_YoshiKid_05) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_IF_EQ(GF_JAN05_SavedYoshi, FALSE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_YoshiKid_05))) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + IfEq(GF_JAN05_SavedYoshi, FALSE) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + EndIf + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_YoshiKid_05))) + Return + End }; EvtScript N(EVS_NpcInteract_Raven) = { - EVT_CALL(GetSelfNpcID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(NPC_Raven_01) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_RAPHAEL_LEFT_NEST) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Raven_Talk, ANIM_Raven_Idle, 0, MSG_CH5_008C) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Raven_Talk, ANIM_Raven_Idle, 0, MSG_CH5_008D) - EVT_END_IF - EVT_CASE_EQ(NPC_Raven_03) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_RAPHAEL_LEFT_NEST) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Raven_Talk, ANIM_Raven_Idle, 0, MSG_CH5_008E) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Raven_Talk, ANIM_Raven_Idle, 0, MSG_CH5_008F) - EVT_END_IF - EVT_CASE_EQ(NPC_Raven_04) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_RAPHAEL_LEFT_NEST) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Raven_Talk, ANIM_Raven_Idle, 0, MSG_CH5_0090) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Raven_Talk, ANIM_Raven_Idle, 0, MSG_CH5_0091) - EVT_END_IF - EVT_CASE_EQ(NPC_Raven_05) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_RAPHAEL_LEFT_NEST) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Raven_Talk, ANIM_Raven_Idle, 0, MSG_CH5_0092) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Raven_Talk, ANIM_Raven_Idle, 0, MSG_CH5_0093) - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetSelfNpcID, LVar0) + Switch(LVar0) + CaseEq(NPC_Raven_01) + IfLt(GB_StoryProgress, STORY_CH5_RAPHAEL_LEFT_NEST) + Call(SpeakToPlayer, NPC_SELF, ANIM_Raven_Talk, ANIM_Raven_Idle, 0, MSG_CH5_008C) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Raven_Talk, ANIM_Raven_Idle, 0, MSG_CH5_008D) + EndIf + CaseEq(NPC_Raven_03) + IfLt(GB_StoryProgress, STORY_CH5_RAPHAEL_LEFT_NEST) + Call(SpeakToPlayer, NPC_SELF, ANIM_Raven_Talk, ANIM_Raven_Idle, 0, MSG_CH5_008E) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Raven_Talk, ANIM_Raven_Idle, 0, MSG_CH5_008F) + EndIf + CaseEq(NPC_Raven_04) + IfLt(GB_StoryProgress, STORY_CH5_RAPHAEL_LEFT_NEST) + Call(SpeakToPlayer, NPC_SELF, ANIM_Raven_Talk, ANIM_Raven_Idle, 0, MSG_CH5_0090) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Raven_Talk, ANIM_Raven_Idle, 0, MSG_CH5_0091) + EndIf + CaseEq(NPC_Raven_05) + IfLt(GB_StoryProgress, STORY_CH5_RAPHAEL_LEFT_NEST) + Call(SpeakToPlayer, NPC_SELF, ANIM_Raven_Talk, ANIM_Raven_Idle, 0, MSG_CH5_0092) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Raven_Talk, ANIM_Raven_Idle, 0, MSG_CH5_0093) + EndIf + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Raven) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Raven))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_RAPHAEL_LEFT_NEST) - EVT_CASE_RANGE(STORY_CH5_ZIP_LINE_READY, STORY_CH5_OPENED_ESCAPE_ROUTE) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_IF_EQ(LVar0, 14) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_CASE_GE(STORY_CH5_BEGAN_PEACH_MISSION) - EVT_CASE_DEFAULT - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Raven))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_RAPHAEL_LEFT_NEST) + CaseRange(STORY_CH5_ZIP_LINE_READY, STORY_CH5_OPENED_ESCAPE_ROUTE) + Call(GetSelfNpcID, LVar0) + IfEq(LVar0, 14) + Call(RemoveNpc, NPC_SELF) + EndIf + CaseGe(STORY_CH5_BEGAN_PEACH_MISSION) + CaseDefault + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; s32 N(VolcanoVaseList)[] = { @@ -625,122 +625,122 @@ s32 N(VolcanoVaseList)[] = { }; EvtScript N(EVS_NpcInteract_Kolorado) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0012) - EVT_EXEC_WAIT(N(EVS_LetterPrompt_Kolorado)) - EVT_EXEC_WAIT(N(EVS_LetterReward_Kolorado)) - EVT_CASE_LT(STORY_CH5_GOT_JADE_RAVEN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0013) - EVT_EXEC_WAIT(N(EVS_LetterPrompt_Kolorado)) - EVT_EXEC_WAIT(N(EVS_LetterReward_Kolorado)) - EVT_CASE_LT(STORY_CH5_ZIP_LINE_READY) - EVT_IF_EQ(AF_JAN_06, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0014) - EVT_SET(AF_JAN_06, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0015) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_LetterPrompt_Kolorado)) - EVT_EXEC_WAIT(N(EVS_LetterReward_Kolorado)) - EVT_CASE_EQ(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(FindKeyItem, ITEM_VOLCANO_VASE, LVar0) - EVT_IF_EQ(LVar0, -1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0016) - EVT_EXEC_WAIT(N(EVS_LetterPrompt_Kolorado)) - EVT_EXEC_WAIT(N(EVS_LetterReward_Kolorado)) - EVT_ELSE - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(5.0), 0, 325, EVT_FLOAT(20.0), EVT_FLOAT(-7.5)) - EVT_SET(LVar0, EVT_PTR(N(VolcanoVaseList))) - EVT_SET(LVar1, 15) - EVT_EXEC_WAIT(N(EVS_ChooseKeyItem)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(-1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0017) - EVT_EXEC_WAIT(N(EVS_LetterPrompt_Kolorado)) - EVT_EXEC_WAIT(N(EVS_LetterReward_Kolorado)) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0018) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0019) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_IdleSad) - EVT_WAIT(15) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(25) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_001A) + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0012) + ExecWait(N(EVS_LetterPrompt_Kolorado)) + ExecWait(N(EVS_LetterReward_Kolorado)) + CaseLt(STORY_CH5_GOT_JADE_RAVEN) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0013) + ExecWait(N(EVS_LetterPrompt_Kolorado)) + ExecWait(N(EVS_LetterReward_Kolorado)) + CaseLt(STORY_CH5_ZIP_LINE_READY) + IfEq(AF_JAN_06, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0014) + Set(AF_JAN_06, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0015) + EndIf + ExecWait(N(EVS_LetterPrompt_Kolorado)) + ExecWait(N(EVS_LetterReward_Kolorado)) + CaseEq(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(FindKeyItem, ITEM_VOLCANO_VASE, LVar0) + IfEq(LVar0, -1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0016) + ExecWait(N(EVS_LetterPrompt_Kolorado)) + ExecWait(N(EVS_LetterReward_Kolorado)) + Else + Call(AdjustCam, CAM_DEFAULT, Float(5.0), 0, 325, Float(20.0), Float(-7.5)) + Set(LVar0, Ref(N(VolcanoVaseList))) + Set(LVar1, 15) + ExecWait(N(EVS_ChooseKeyItem)) + Switch(LVar0) + CaseEq(-1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0017) + ExecWait(N(EVS_LetterPrompt_Kolorado)) + ExecWait(N(EVS_LetterReward_Kolorado)) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0018) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + Wait(20) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0019) + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_IdleSad) + Wait(15) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) + Wait(25) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_001A) EVT_GIVE_KEY_REWARD(ITEM_MAGICAL_SEED4) - EVT_SET(GF_JAN03_Gift_MagicalSeed4, TRUE) - EVT_WAIT(20) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_001B) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_001C) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(4.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, -465, -185, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, -540, -70, 0) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_SET(GB_StoryProgress, STORY_CH5_TRADED_VASE_FOR_SEED) - EVT_END_SWITCH - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5.0)) - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Set(GF_JAN03_Gift_MagicalSeed4, TRUE) + Wait(20) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_001B) + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_001C) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) + Call(SetNpcSpeed, NPC_SELF, Float(4.0)) + Call(NpcMoveTo, NPC_SELF, -465, -185, 0) + Call(NpcMoveTo, NPC_SELF, -540, -70, 0) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Set(GB_StoryProgress, STORY_CH5_TRADED_VASE_FOR_SEED) + EndSwitch + Call(ResetCam, CAM_DEFAULT, Float(5.0)) + EndIf + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Kolorado) = { - EVT_SET(LVar0, 0) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_ZIP_LINE_READY) - EVT_SET(LVar0, 1) - EVT_CASE_EQ(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SetNpcPos, NPC_SELF, -433, 0, -205) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_400000, 0) - EVT_SET(LVar0, 1) - EVT_END_SWITCH - EVT_IF_EQ(LVar0, 1) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Kolorado))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVar0, 0) + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_ZIP_LINE_READY) + Set(LVar0, 1) + CaseEq(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SetNpcPos, NPC_SELF, -433, 0, -205) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_400000, 0) + Set(LVar0, 1) + EndSwitch + IfEq(LVar0, 1) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Kolorado))) + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Sushie) = { - EVT_IF_EQ(AF_JAN_07, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldSushie_Talk, ANIM_WorldSushie_Idle, 0, MSG_CH5_0058) - EVT_SET(AF_JAN_07, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldSushie_Talk, ANIM_WorldSushie_Idle, 0, MSG_CH5_0059) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(AF_JAN_07, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldSushie_Talk, ANIM_WorldSushie_Idle, 0, MSG_CH5_0058) + Set(AF_JAN_07, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldSushie_Talk, ANIM_WorldSushie_Idle, 0, MSG_CH5_0059) + EndIf + Return + End }; EvtScript N(EVS_NpcIdle_Sushie) = { - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_SELF, 1) - EVT_LOOP(0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldSushie_Talk) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldSushie_Run) - EVT_WAIT(15) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_SELF, 1) + Loop(0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldSushie_Talk) + Wait(30) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldSushie_Run) + Wait(15) + EndLoop + Return + End }; EvtScript N(EVS_NpcInit_Sushie) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Sushie))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Sushie))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Sushie))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Sushie))) + Return + End }; #include "world/common/npc/Raven.inc.c" diff --git a/src/world/area_jan/jan_03/jan_03_5_entity.c b/src/world/area_jan/jan_03/jan_03_5_entity.c index 106e1a9cb9c..30648d59d61 100644 --- a/src/world/area_jan/jan_03/jan_03_5_entity.c +++ b/src/world/area_jan/jan_03/jan_03_5_entity.c @@ -3,10 +3,10 @@ #include "sprite/player.h" EvtScript N(EVS_GotoMap_tik_08_4) = { - EVT_CALL(GotoMap, EVT_PTR("tik_08"), tik_08_ENTRY_4) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("tik_08"), tik_08_ENTRY_4) + Wait(100) + Return + End }; @@ -20,51 +20,51 @@ API_CALLABLE(N(GiveInitialSpringBoost)) { } EvtScript N(EVS_TetherCamToPlayer) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_UseSpring) = { - EVT_CALL(N(GiveInitialSpringBoost)) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_WAIT(1) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAUNCH) - EVT_WAIT(1) - EVT_EXEC_GET_TID(N(EVS_TetherCamToPlayer), LVarA) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.1)) - EVT_CALL(PlayerJump, -556, 300, -195, 15) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(FacePlayerTowardPoint, -630, -50, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Fall) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(PlayerJump2, -601, 376, -105, 30) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_KILL_THREAD(LVarA) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(N(GiveInitialSpringBoost)) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Wait(1) + Call(SetPlayerActionState, ACTION_STATE_LAUNCH) + Wait(1) + ExecGetTID(N(EVS_TetherCamToPlayer), LVarA) + Call(SetPlayerJumpscale, Float(0.1)) + Call(PlayerJump, -556, 300, -195, 15) + Call(DisablePlayerPhysics, FALSE) + Call(FacePlayerTowardPoint, -630, -50, 0) + Call(SetPlayerAnimation, ANIM_Mario1_Fall) + Call(SetPlayerJumpscale, Float(1.0)) + Call(PlayerJump2, -601, 376, -105, 30) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + KillThread(LVarA) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_JAN03_WarpPipe, FALSE) - EVT_IF_EQ(GF_TIK08_WarpPipe, TRUE) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, jan_03_ENTRY_3) - EVT_SET(GF_JAN03_WarpPipe, TRUE) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueWarpPipe), -540, 0, 195, 30, jan_03_ENTRY_3, EVT_PTR(N(EVS_GotoMap_tik_08_4)), EVT_INDEX_OF_GAME_FLAG(GF_JAN03_WarpPipe), MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 100, 60, -25, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_ScriptSpring), -556, 0, -195, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_UseSpring))) - EVT_RETURN - EVT_END + IfEq(GF_JAN03_WarpPipe, FALSE) + IfEq(GF_TIK08_WarpPipe, TRUE) + Call(GetEntryID, LVar0) + IfNe(LVar0, jan_03_ENTRY_3) + Set(GF_JAN03_WarpPipe, TRUE) + EndIf + EndIf + EndIf + Call(MakeEntity, Ref(Entity_BlueWarpPipe), -540, 0, 195, 30, jan_03_ENTRY_3, Ref(N(EVS_GotoMap_tik_08_4)), EVT_INDEX_OF_GAME_FLAG(GF_JAN03_WarpPipe), MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_SavePoint), 100, 60, -25, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_ScriptSpring), -556, 0, -195, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_UseSpring))) + Return + End }; diff --git a/src/world/area_jan/jan_03/jan_03_6_rooms.c b/src/world/area_jan/jan_03/jan_03_6_rooms.c index 3990134ea54..1150df1120e 100644 --- a/src/world/area_jan/jan_03/jan_03_6_rooms.c +++ b/src/world/area_jan/jan_03/jan_03_6_rooms.c @@ -1,31 +1,31 @@ #include "jan_03.h" EvtScript N(EVS_SetDoorRot_Shop) = { - EVT_CALL(RotateGroup, MODEL_g48, LVar0, 0, -1, 0) - EVT_RETURN - EVT_END + Call(RotateGroup, MODEL_g48, LVar0, 0, -1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_Shop) = { - EVT_SET(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-1.328125)) - EVT_CALL(RotateGroup, MODEL_g109, LVar1, 0, 0, 1) - EVT_SET(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(1.0)) - EVT_CALL(RotateGroup, MODEL_g110, LVar1, 0, 0, 1) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + MulF(LVar1, Float(-1.328125)) + Call(RotateGroup, MODEL_g109, LVar1, 0, 0, 1) + Set(LVar1, LVar0) + MulF(LVar1, Float(1.0)) + Call(RotateGroup, MODEL_g110, LVar1, 0, 0, 1) + Return + End }; EvtScript N(EVS_RoomListener_Shop) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_CALL(EnableGroup, MODEL_g126, TRUE) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_CALL(EnableGroup, MODEL_g126, FALSE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Call(EnableGroup, MODEL_g126, TRUE) + CaseEq(ROOM_UPDATE_EXIT_END) + Call(EnableGroup, MODEL_g126, FALSE) + EndSwitch + Return + End }; s32 N(InteriorNPCs_Shop)[] = { @@ -34,31 +34,31 @@ s32 N(InteriorNPCs_Shop)[] = { }; EvtScript N(EVS_SetDoorRot_ToadHouse) = { - EVT_CALL(RotateGroup, MODEL_g111, LVar0, 0, 1, 0) - EVT_RETURN - EVT_END + Call(RotateGroup, MODEL_g111, LVar0, 0, 1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_ToadHouse) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_RoomListener_ToadHouse) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_CALL(SetGroupVisibility, MODEL_g73, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_g97, MODEL_GROUP_HIDDEN) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_DONE) + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Call(SetGroupVisibility, MODEL_g73, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_g97, MODEL_GROUP_HIDDEN) + CaseEq(ROOM_UPDATE_ENTER_DONE) // do nothing - EVT_CASE_EQ(ROOM_UPDATE_EXIT_BEGIN) + CaseEq(ROOM_UPDATE_EXIT_BEGIN) // do nothing - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_CALL(SetGroupVisibility, MODEL_g73, MODEL_GROUP_VISIBLE) - EVT_CALL(SetGroupVisibility, MODEL_g97, MODEL_GROUP_VISIBLE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + CaseEq(ROOM_UPDATE_EXIT_END) + Call(SetGroupVisibility, MODEL_g73, MODEL_GROUP_VISIBLE) + Call(SetGroupVisibility, MODEL_g97, MODEL_GROUP_VISIBLE) + EndSwitch + Return + End }; s32 N(InteriorNPCs_ToadHouse)[] = { @@ -68,29 +68,29 @@ s32 N(InteriorNPCs_ToadHouse)[] = { EvtScript N(EVS_SetupRooms) = { // shop - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_1, ROOM_LARGE_DOOR_RIGHT_HINGE_OPENS_IN), - EVT_PTR(N(EVS_SetDoorRot_Shop)), - EVT_PTR(N(EVS_SetWallRot_Shop)), + Ref(N(EVS_SetDoorRot_Shop)), + Ref(N(EVS_SetWallRot_Shop)), NULL, - EVT_PTR(N(EVS_RoomListener_Shop)), + Ref(N(EVS_RoomListener_Shop)), COLLIDER_o156, COLLIDER_o161, MODEL_g41, - EVT_PTR(N(InteriorNPCs_Shop))) - EVT_SET(LVar0, ROOM_UPDATE_EXIT_END) - EVT_EXEC(N(EVS_RoomListener_Shop)) + Ref(N(InteriorNPCs_Shop))) + Set(LVar0, ROOM_UPDATE_EXIT_END) + Exec(N(EVS_RoomListener_Shop)) // toad house - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_LARGE_DOOR_RIGHT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_ToadHouse)), - EVT_PTR(N(EVS_SetWallRot_ToadHouse)), + Ref(N(EVS_SetDoorRot_ToadHouse)), + Ref(N(EVS_SetWallRot_ToadHouse)), NULL, - EVT_PTR(N(EVS_RoomListener_ToadHouse)), + Ref(N(EVS_RoomListener_ToadHouse)), COLLIDER_o199, COLLIDER_o200, MODEL_o2, - EVT_PTR(N(InteriorNPCs_ToadHouse))) - EVT_RETURN - EVT_END + Ref(N(InteriorNPCs_ToadHouse))) + Return + End }; diff --git a/src/world/area_jan/jan_03/jan_03_7_foliage.c b/src/world/area_jan/jan_03/jan_03_7_foliage.c index e3f17baf671..d0f4e544eda 100644 --- a/src/world/area_jan/jan_03/jan_03_7_foliage.c +++ b/src/world/area_jan/jan_03/jan_03_7_foliage.c @@ -29,11 +29,11 @@ BombTrigger N(BombPos_Tree1) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(AF_JAN_16, FALSE) - EVT_SET(AF_JAN03_TreeDrop1, FALSE) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o440, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_RETURN - EVT_END + Set(AF_JAN_16, FALSE) + Set(AF_JAN03_TreeDrop1, FALSE) + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o440, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Return + End }; diff --git a/src/world/area_jan/jan_04/jan_04_10_demo.c b/src/world/area_jan/jan_04/jan_04_10_demo.c index 894ab90e218..6d648df69ee 100644 --- a/src/world/area_jan/jan_04/jan_04_10_demo.c +++ b/src/world/area_jan/jan_04/jan_04_10_demo.c @@ -4,97 +4,97 @@ extern Evt* D_8024A290; EvtScript N(EVS_ProvideDemoInputs) = { - EVT_CALL(DemoJoystickXY, -40, 30) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -67, 50) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -67, 53) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -67, 60) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -67, 65) - EVT_WAIT(48) - EVT_CALL(DemoJoystickXY, -65, 66) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -63, 66) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -58, 68) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -53, 70) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -46, 72) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -41, 73) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -36, 74) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -34, 74) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -30, 75) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -27, 76) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -20, 77) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -14, 78) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -10, 79) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -4, 79) - EVT_WAIT(2) - EVT_CALL(DemoSetButtons, BUTTON_C_DOWN) - EVT_WAIT(28) - EVT_CALL(DemoSetButtons, 0) - EVT_WAIT(25) - EVT_CALL(DemoJoystickXY, 4, 80) - EVT_WAIT(2) - EVT_CALL(DemoJoystickXY, 5, 80) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 7, 81) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 11, 81) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 16, 80) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 21, 79) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 31, 77) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 40, 75) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 50, 72) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 60, 70) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 64, 69) - EVT_WAIT(30) - EVT_IF_EQ(GF_DemoSceneDone, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_DemoSceneDone, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("jan_04"), jan_04_ENTRY_2, TRANSITION_END_DEMO_SCENE_BLACK) - EVT_WAIT(110) - EVT_RETURN - EVT_END + Call(DemoJoystickXY, -40, 30) + Wait(1) + Call(DemoJoystickXY, -67, 50) + Wait(1) + Call(DemoJoystickXY, -67, 53) + Wait(1) + Call(DemoJoystickXY, -67, 60) + Wait(1) + Call(DemoJoystickXY, -67, 65) + Wait(48) + Call(DemoJoystickXY, -65, 66) + Wait(1) + Call(DemoJoystickXY, -63, 66) + Wait(1) + Call(DemoJoystickXY, -58, 68) + Wait(1) + Call(DemoJoystickXY, -53, 70) + Wait(1) + Call(DemoJoystickXY, -46, 72) + Wait(1) + Call(DemoJoystickXY, -41, 73) + Wait(1) + Call(DemoJoystickXY, -36, 74) + Wait(1) + Call(DemoJoystickXY, -34, 74) + Wait(1) + Call(DemoJoystickXY, -30, 75) + Wait(1) + Call(DemoJoystickXY, -27, 76) + Wait(1) + Call(DemoJoystickXY, -20, 77) + Wait(1) + Call(DemoJoystickXY, -14, 78) + Wait(1) + Call(DemoJoystickXY, -10, 79) + Wait(1) + Call(DemoJoystickXY, -4, 79) + Wait(2) + Call(DemoSetButtons, BUTTON_C_DOWN) + Wait(28) + Call(DemoSetButtons, 0) + Wait(25) + Call(DemoJoystickXY, 4, 80) + Wait(2) + Call(DemoJoystickXY, 5, 80) + Wait(1) + Call(DemoJoystickXY, 7, 81) + Wait(1) + Call(DemoJoystickXY, 11, 81) + Wait(1) + Call(DemoJoystickXY, 16, 80) + Wait(1) + Call(DemoJoystickXY, 21, 79) + Wait(1) + Call(DemoJoystickXY, 31, 77) + Wait(1) + Call(DemoJoystickXY, 40, 75) + Wait(1) + Call(DemoJoystickXY, 50, 72) + Wait(1) + Call(DemoJoystickXY, 60, 70) + Wait(1) + Call(DemoJoystickXY, 64, 69) + Wait(30) + IfEq(GF_DemoSceneDone, TRUE) + Return + EndIf + Set(GF_DemoSceneDone, TRUE) + Call(GotoMapSpecial, Ref("jan_04"), jan_04_ENTRY_2, TRANSITION_END_DEMO_SCENE_BLACK) + Wait(110) + Return + End }; EvtScript N(EVS_MonitorDemoState) = { - EVT_WAIT(10) - EVT_LOOP(0) - EVT_CALL(GetDemoState, LVar0) - EVT_IF_EQ(LVar0, DEMO_STATE_CHANGE_MAP) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(GF_DemoSceneDone, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_DemoSceneDone, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("jan_04"), jan_04_ENTRY_2, TRANSITION_END_DEMO_SCENE_WHITE) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Wait(10) + Loop(0) + Call(GetDemoState, LVar0) + IfEq(LVar0, DEMO_STATE_CHANGE_MAP) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(GF_DemoSceneDone, TRUE) + Return + EndIf + Set(GF_DemoSceneDone, TRUE) + Call(GotoMapSpecial, Ref("jan_04"), jan_04_ENTRY_2, TRANSITION_END_DEMO_SCENE_WHITE) + Wait(100) + Return + End }; s32 N(DemoInitState) = 0; @@ -134,10 +134,10 @@ API_CALLABLE(N(SetupDemoScene)) { } EvtScript N(EVS_PlayDemoScene) = { - EVT_CALL(N(SetupDemoScene)) - EVT_SET(GF_DemoSceneDone, FALSE) - EVT_EXEC(N(EVS_MonitorDemoState)) - EVT_EXEC(N(EVS_ProvideDemoInputs)) - EVT_RETURN - EVT_END + Call(N(SetupDemoScene)) + Set(GF_DemoSceneDone, FALSE) + Exec(N(EVS_MonitorDemoState)) + Exec(N(EVS_ProvideDemoInputs)) + Return + End }; diff --git a/src/world/area_jan/jan_04/jan_04_1_music.c b/src/world/area_jan/jan_04/jan_04_1_music.c index ab41fab849b..1bb637a2a9d 100644 --- a/src/world/area_jan/jan_04/jan_04_1_music.c +++ b/src/world/area_jan/jan_04/jan_04_1_music.c @@ -1,30 +1,30 @@ #include "jan_04.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_RANGE(jan_04_ENTRY_1, jan_04_ENTRY_2) - EVT_CALL(SetMusicTrack, 0, SONG_VOLCANO_ESCAPE, 0, 8) - EVT_CASE_EQ(jan_04_ENTRY_3) - EVT_CALL(FadeInMusic, 0, SONG_JADE_JUNGLE, 0, 3000, 0, 127) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_JADE_JUNGLE, 0, 8) - EVT_END_SWITCH - EVT_CALL(ClearAmbientSounds, 250) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseRange(jan_04_ENTRY_1, jan_04_ENTRY_2) + Call(SetMusicTrack, 0, SONG_VOLCANO_ESCAPE, 0, 8) + CaseEq(jan_04_ENTRY_3) + Call(FadeInMusic, 0, SONG_JADE_JUNGLE, 0, 3000, 0, 127) + CaseDefault + Call(SetMusicTrack, 0, SONG_JADE_JUNGLE, 0, 8) + EndSwitch + Call(ClearAmbientSounds, 250) + Return + End }; EvtScript N(EVS_PushNewPartnerSong) = { - EVT_CALL(PushSong, SONG_NEW_PARTNER, 0) - EVT_RETURN - EVT_END + Call(PushSong, SONG_NEW_PARTNER, 0) + Return + End }; EvtScript N(EVS_PopSong) = { - EVT_CALL(FadeOutMusic, 0, 500) - EVT_WAIT(15) - EVT_CALL(PopSong) - EVT_RETURN - EVT_END + Call(FadeOutMusic, 0, 500) + Wait(15) + Call(PopSong) + Return + End }; diff --git a/src/world/area_jan/jan_04/jan_04_2_main.c b/src/world/area_jan/jan_04/jan_04_2_main.c index 5f4670afabf..3c1ff168bfa 100644 --- a/src/world/area_jan/jan_04/jan_04_2_main.c +++ b/src/world/area_jan/jan_04/jan_04_2_main.c @@ -3,83 +3,83 @@ #include "world/common/atomic/TexturePan.inc.c" EvtScript N(EVS_GotoMap_kmr_24_0) = { - EVT_CALL(FadeOutMusic, 0, 1500) - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_24"), kmr_24_ENTRY_0, TRANSITION_MARIO_WHITE) - EVT_WAIT(100) + Call(FadeOutMusic, 0, 1500) + Call(GotoMapSpecial, Ref("kmr_24"), kmr_24_ENTRY_0, TRANSITION_MARIO_WHITE) + Wait(100) }; //@bug script not terminated EvtScript N(EVS_ExitWalk_jan_05_2) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(UseExitHeading, 60, jan_04_ENTRY_0) - EVT_EXEC(ExitWalk) - EVT_CALL(GotoMap, EVT_PTR("jan_05"), jan_05_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(UseExitHeading, 60, jan_04_ENTRY_0) + Exec(ExitWalk) + Call(GotoMap, Ref("jan_05"), jan_05_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_05_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_jan_05_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(jan_04_ENTRY_0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_RANGE(jan_04_ENTRY_1, jan_04_ENTRY_2) - EVT_EXEC(N(EVS_Scene_TreasureChest)) - EVT_CASE_EQ(jan_04_ENTRY_3) - EVT_EXEC(N(EVS_Scene_Epilogue)) - EVT_CASE_EQ(jan_04_ENTRY_4) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(jan_04_ENTRY_0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseRange(jan_04_ENTRY_1, jan_04_ENTRY_2) + Exec(N(EVS_Scene_TreasureChest)) + CaseEq(jan_04_ENTRY_3) + Exec(N(EVS_Scene_Epilogue)) + CaseEq(jan_04_ENTRY_4) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_JADE_JUNGLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(jan_04_ENTRY_0) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CASE_EQ(jan_04_ENTRY_3) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(EpilogueNPCs))) - EVT_END_SWITCH - EVT_EXEC(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupTrees)) - EVT_EXEC(N(EVS_SetupBushes)) - EVT_EXEC(N(EVS_SetupUnused)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o52, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o53, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o54, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o52, COLLIDER_FLAG_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o53, COLLIDER_FLAG_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o54, COLLIDER_FLAG_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1, SURFACE_TYPE_WATER) - EVT_CALL(MakeTransformGroup, MODEL_g12) - EVT_CALL(EnableTexPanning, MODEL_o61, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_JADE_JUNGLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(jan_04_ENTRY_0) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + CaseEq(jan_04_ENTRY_3) + Call(MakeNpcs, FALSE, Ref(N(EpilogueNPCs))) + EndSwitch + Exec(N(EVS_MakeEntities)) + Exec(N(EVS_SetupTrees)) + Exec(N(EVS_SetupBushes)) + Exec(N(EVS_SetupUnused)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o52, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o53, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o54, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o52, COLLIDER_FLAG_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o53, COLLIDER_FLAG_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o54, COLLIDER_FLAG_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1, SURFACE_TYPE_WATER) + Call(MakeTransformGroup, MODEL_g12) + Call(EnableTexPanning, MODEL_o61, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( -80, 140, 80, -100) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(GetDemoState, LVar0) - EVT_IF_NE(LVar0, DEMO_STATE_NONE) - EVT_EXEC_WAIT(N(EVS_PlayDemoScene)) - EVT_RETURN - EVT_END_IF - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(GetDemoState, LVar0) + IfNe(LVar0, DEMO_STATE_NONE) + ExecWait(N(EVS_PlayDemoScene)) + Return + EndIf + Exec(N(EVS_EnterMap)) + Wait(1) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_jan/jan_04/jan_04_3_entity.c b/src/world/area_jan/jan_04/jan_04_3_entity.c index 464b8117ffc..1a88d49bd6d 100644 --- a/src/world/area_jan/jan_04/jan_04_3_entity.c +++ b/src/world/area_jan/jan_04/jan_04_3_entity.c @@ -6,13 +6,13 @@ EvtScript N(EVS_OpenChest_VolcanoVase) = EVT_OPEN_CHEST_KEY(ITEM_VOLCANO_VASE, GF_JAN04_Chest_VolcanoVase); EvtScript N(EVS_MakeEntities) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH5_BEGAN_PEACH_MISSION, STORY_CH8_REACHED_PEACHS_CASTLE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 0, 0, 0, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_JAN04_Chest_VolcanoVase) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenChest_VolcanoVase))) - EVT_END_SWITCH - EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 300, 0, -225, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_JAN04_Item_StarPiece) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseRange(STORY_CH5_BEGAN_PEACH_MISSION, STORY_CH8_REACHED_PEACHS_CASTLE) + Call(MakeEntity, Ref(Entity_Chest), 0, 0, 0, 0, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_JAN04_Chest_VolcanoVase) + Call(AssignScript, Ref(N(EVS_OpenChest_VolcanoVase))) + EndSwitch + Call(MakeItemEntity, ITEM_STAR_PIECE, 300, 0, -225, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_JAN04_Item_StarPiece) + Return + End }; diff --git a/src/world/area_jan/jan_04/jan_04_4_npc.c b/src/world/area_jan/jan_04/jan_04_4_npc.c index ba33ee85779..abf5501486d 100644 --- a/src/world/area_jan/jan_04/jan_04_4_npc.c +++ b/src/world/area_jan/jan_04/jan_04_4_npc.c @@ -6,120 +6,120 @@ #include "world/common/npc/YoshiKid.inc.c" EvtScript N(EVS_ShakeTree_Sushie) = { - EVT_CALL(GetNpcVar, NPC_Sushie, 0, LVar0) - EVT_IF_EQ(LVar0, 2) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(AF_JAN_08, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(AF_JAN_08, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Sushie, NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_IF_EQ(GF_JAN04_SushieTreeHitCounterB, FALSE) - EVT_IF_EQ(GF_JAN04_SushieTreeHitCounterA, FALSE) - EVT_CALL(SetNpcJumpscale, NPC_Sushie, EVT_FLOAT(1.0)) - EVT_CALL(PlaySoundAtNpc, NPC_Sushie, SOUND_SUSHIE_FLOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Sushie, 90, 140, -85, 20 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 90, 140, -85) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 90, 140, -85) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 280) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 16, EVT_FLOAT(-6.0)) + Call(GetNpcVar, NPC_Sushie, 0, LVar0) + IfEq(LVar0, 2) + Return + EndIf + IfEq(AF_JAN_08, TRUE) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Set(AF_JAN_08, TRUE) + Call(SetNpcFlagBits, NPC_Sushie, NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + IfEq(GF_JAN04_SushieTreeHitCounterB, FALSE) + IfEq(GF_JAN04_SushieTreeHitCounterA, FALSE) + Call(SetNpcJumpscale, NPC_Sushie, Float(1.0)) + Call(PlaySoundAtNpc, NPC_Sushie, SOUND_SUSHIE_FLOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Sushie, 90, 140, -85, 20 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, 90, 140, -85) + Call(SetPanTarget, CAM_DEFAULT, 90, 140, -85) + Call(SetCamDistance, CAM_DEFAULT, 280) + Call(SetCamPitch, CAM_DEFAULT, 16, Float(-6.0)) #if VERSION_PAL - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3 / DT)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3 / DT)) #else - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 3) + Call(SetCamSpeed, CAM_DEFAULT, 3) #endif - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Sushie, ANIM_WorldSushie_Talk, ANIM_WorldSushie_Idle, 0, MSG_CH5_00A1) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_SET(GF_JAN04_SushieTreeHitCounterA, TRUE) - EVT_WAIT(10 * DT) - EVT_SET(AF_JAN_08, FALSE) - EVT_ELSE - EVT_CALL(SetNpcJumpscale, NPC_Sushie, EVT_FLOAT(1.0)) - EVT_CALL(PlaySoundAtNpc, NPC_Sushie, SOUND_SUSHIE_FLOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Sushie, -10, 112, -80, 15 * DT) - EVT_SET(GF_JAN04_SushieTreeHitCounterA, FALSE) - EVT_SET(GF_JAN04_SushieTreeHitCounterB, TRUE) - EVT_WAIT(10 * DT) - EVT_SET(AF_JAN_08, FALSE) - EVT_END_IF - EVT_ELSE - EVT_CALL(SetNpcJumpscale, NPC_Sushie, EVT_FLOAT(1.0)) - EVT_CALL(PlaySoundAtNpc, NPC_Sushie, SOUND_SUSHIE_FLOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Sushie, 50, 0, 0, 20 * DT) - EVT_SET(GF_JAN04_SushieTreeHitCounterA, TRUE) - EVT_CALL(EnableNpcShadow, NPC_Sushie, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Sushie, ANIM_WorldSushie_Hurt) - EVT_CALL(SetNpcVar, NPC_Sushie, 0, 10) - EVT_UNBIND - EVT_END_IF - EVT_CALL(SetNpcFlagBits, NPC_Sushie, NPC_FLAG_IGNORE_ENTITY_COLLISION, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Sushie, ANIM_WorldSushie_Talk, ANIM_WorldSushie_Idle, 0, MSG_CH5_00A1) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Set(GF_JAN04_SushieTreeHitCounterA, TRUE) + Wait(10 * DT) + Set(AF_JAN_08, FALSE) + Else + Call(SetNpcJumpscale, NPC_Sushie, Float(1.0)) + Call(PlaySoundAtNpc, NPC_Sushie, SOUND_SUSHIE_FLOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Sushie, -10, 112, -80, 15 * DT) + Set(GF_JAN04_SushieTreeHitCounterA, FALSE) + Set(GF_JAN04_SushieTreeHitCounterB, TRUE) + Wait(10 * DT) + Set(AF_JAN_08, FALSE) + EndIf + Else + Call(SetNpcJumpscale, NPC_Sushie, Float(1.0)) + Call(PlaySoundAtNpc, NPC_Sushie, SOUND_SUSHIE_FLOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Sushie, 50, 0, 0, 20 * DT) + Set(GF_JAN04_SushieTreeHitCounterA, TRUE) + Call(EnableNpcShadow, NPC_Sushie, TRUE) + Call(SetNpcAnimation, NPC_Sushie, ANIM_WorldSushie_Hurt) + Call(SetNpcVar, NPC_Sushie, 0, 10) + Unbind + EndIf + Call(SetNpcFlagBits, NPC_Sushie, NPC_FLAG_IGNORE_ENTITY_COLLISION, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Sushie_ScoldPlayerLeaving) = { - EVT_LABEL(1) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(AwaitPlayerLeave, 0, 0, 170) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetSelfVar, 0, 2) - EVT_SET(LVar0, GF_JAN04_SushieTreeHitCounterA) - EVT_SET(LVar1, GF_JAN04_SushieTreeHitCounterB) - EVT_ADD(LVar0, LVar1) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH5_00A2, 160, 40) - EVT_ELSE - EVT_CALL(ShowMessageAtScreenPos, MSG_CH5_00A3, 160, 40) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetSelfVar, 0, 1) - EVT_CASE_EQ(1) - EVT_CALL(AwaitPlayerApproach, 0, 0, 130) - EVT_CALL(SetSelfVar, 0, 0) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(1) - EVT_RETURN - EVT_END + Label(1) + Call(GetSelfVar, 0, LVar0) + Switch(LVar0) + CaseEq(0) + Call(AwaitPlayerLeave, 0, 0, 170) + Call(DisablePlayerInput, TRUE) + Call(SetSelfVar, 0, 2) + Set(LVar0, GF_JAN04_SushieTreeHitCounterA) + Set(LVar1, GF_JAN04_SushieTreeHitCounterB) + Add(LVar0, LVar1) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_CH5_00A2, 160, 40) + Else + Call(ShowMessageAtScreenPos, MSG_CH5_00A3, 160, 40) + EndIf + Call(DisablePlayerInput, FALSE) + Call(SetSelfVar, 0, 1) + CaseEq(1) + Call(AwaitPlayerApproach, 0, 0, 130) + Call(SetSelfVar, 0, 0) + EndSwitch + Wait(1) + Goto(1) + Return + End }; EvtScript N(EVS_Sushie_ShoutAtChildren) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH5_009E, 320, 60) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(AwaitPlayerApproach, 0, 0, 130) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH5_009F, 160, 40) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_LookAround) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 30, 140, -60) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 16, EVT_FLOAT(-6.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldSushie_Hurt, ANIM_WorldSushie_Idle, 0, MSG_CH5_00A0) + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_CH5_009E, 320, 60) + Call(DisablePlayerInput, FALSE) + Call(AwaitPlayerApproach, 0, 0, 130) + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_CH5_009F, 160, 40) + Call(SetPlayerAnimation, ANIM_MarioW2_LookAround) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetPanTarget, CAM_DEFAULT, 30, 140, -60) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, 16, Float(-6.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldSushie_Hurt, ANIM_WorldSushie_Idle, 0, MSG_CH5_00A0) #if VERSION_PAL - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(3 / DT)) + Call(ResetCam, CAM_DEFAULT, Float(3 / DT)) #else - EVT_CALL(ResetCam, CAM_DEFAULT, 3) + Call(ResetCam, CAM_DEFAULT, 3) #endif - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(DisablePlayerInput, FALSE) + Return + End }; BombTrigger N(BombPos_SushieTree) = { @@ -130,133 +130,133 @@ BombTrigger N(BombPos_SushieTree) = { #include "world/common/util/ChangeNpcToPartner.inc.c" EvtScript N(EVS_NpcIdle_Sushie) = { - EVT_SET(LVar0, GF_JAN04_SushieTreeHitCounterA) - EVT_SET(LVar1, GF_JAN04_SushieTreeHitCounterB) - EVT_ADD(LVar0, LVar1) - EVT_IF_EQ(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_Sushie_ShoutAtChildren)) - EVT_ELSE - EVT_CALL(SetSelfVar, 0, 1) - EVT_END_IF - EVT_SET(AF_JAN_08, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Sushie)), TRIGGER_WALL_HAMMER, COLLIDER_o34, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Sushie)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_SushieTree)), 1, 0) - EVT_EXEC_GET_TID(N(EVS_Sushie_ScoldPlayerLeaving), LVar9) - EVT_LABEL(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 10) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_KILL_THREAD(LVar9) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PlayerMoveTo, 10, 0, 0) - EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldSushie_Idle) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(5.0 / DT), 20, 301, EVT_FLOAT(17.0), EVT_FLOAT(-7.0)) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldSushie_Talk, ANIM_WorldSushie_Idle, 0, MSG_CH5_00A4) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(40 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldSushie_Talk, ANIM_WorldSushie_Idle, 0, MSG_CH5_00A5) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldSushie_Sad) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldSushie_Idle) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldSushie_Talk, ANIM_WorldSushie_Idle, 0, MSG_CH5_00A6) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(40 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldSushie_Talk, ANIM_WorldSushie_Idle, 0, MSG_CH5_00A7) - EVT_CALL(CloseMessage) - EVT_CALL(N(ChangeNpcToPartner), NPC_Sushie, PARTNER_SUSHIE) - EVT_CALL(N(LoadPartyImage)) - EVT_EXEC(N(EVS_PushNewPartnerSong)) - EVT_WAIT(15 * DT) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_018F, 160, 40) - EVT_EXEC(N(EVS_PopSong)) - EVT_WAIT(10 * DT) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5.0)) - EVT_SET(GB_StoryProgress, STORY_CH5_SUSHIE_JOINED_PARTY) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Set(LVar0, GF_JAN04_SushieTreeHitCounterA) + Set(LVar1, GF_JAN04_SushieTreeHitCounterB) + Add(LVar0, LVar1) + IfEq(LVar0, 0) + ExecWait(N(EVS_Sushie_ShoutAtChildren)) + Else + Call(SetSelfVar, 0, 1) + EndIf + Set(AF_JAN_08, FALSE) + BindTrigger(Ref(N(EVS_ShakeTree_Sushie)), TRIGGER_WALL_HAMMER, COLLIDER_o34, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Sushie)), TRIGGER_POINT_BOMB, Ref(N(BombPos_SushieTree)), 1, 0) + ExecGetTID(N(EVS_Sushie_ScoldPlayerLeaving), LVar9) + Label(0) + Call(GetSelfVar, 0, LVar0) + IfNe(LVar0, 10) + Wait(1) + Goto(0) + EndIf + KillThread(LVar9) + Call(DisablePlayerInput, TRUE) + Call(SetPlayerSpeed, Float(4.0 / DT)) + Call(PlayerMoveTo, 10, 0, 0) + Call(PlayerFaceNpc, NPC_SELF, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldSushie_Idle) + Call(AdjustCam, CAM_DEFAULT, Float(5.0 / DT), 20, 301, Float(17.0), Float(-7.0)) + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldSushie_Talk, ANIM_WorldSushie_Idle, 0, MSG_CH5_00A4) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(40 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldSushie_Talk, ANIM_WorldSushie_Idle, 0, MSG_CH5_00A5) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldSushie_Sad) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldSushie_Idle) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldSushie_Talk, ANIM_WorldSushie_Idle, 0, MSG_CH5_00A6) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(40 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldSushie_Talk, ANIM_WorldSushie_Idle, 0, MSG_CH5_00A7) + Call(CloseMessage) + Call(N(ChangeNpcToPartner), NPC_Sushie, PARTNER_SUSHIE) + Call(N(LoadPartyImage)) + Exec(N(EVS_PushNewPartnerSong)) + Wait(15 * DT) + Call(ShowMessageAtScreenPos, MSG_Menus_018F, 160, 40) + Exec(N(EVS_PopSong)) + Wait(10 * DT) + Call(ResetCam, CAM_DEFAULT, Float(5.0)) + Set(GB_StoryProgress, STORY_CH5_SUSHIE_JOINED_PARTY) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Sushie) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, jan_04_ENTRY_3) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GB_StoryProgress, STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldSushie_Sad) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_IF_EQ(GF_JAN04_SushieTreeHitCounterB, FALSE) - EVT_IF_EQ(GF_JAN04_SushieTreeHitCounterA, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, 55, 150, -95) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, 90, 140, -85) - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(GF_JAN04_SushieTreeHitCounterA, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, -10, 112, -80) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, 50, 0, 0) - EVT_CALL(EnableNpcShadow, NPC_SELF, TRUE) - EVT_END_IF - EVT_END_IF - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Sushie))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, jan_04_ENTRY_3) + Return + EndIf + IfEq(GB_StoryProgress, STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldSushie_Sad) + Call(SetNpcYaw, NPC_SELF, 270) + IfEq(GF_JAN04_SushieTreeHitCounterB, FALSE) + IfEq(GF_JAN04_SushieTreeHitCounterA, FALSE) + Call(SetNpcPos, NPC_SELF, 55, 150, -95) + Else + Call(SetNpcPos, NPC_SELF, 90, 140, -85) + EndIf + Else + IfEq(GF_JAN04_SushieTreeHitCounterA, FALSE) + Call(SetNpcPos, NPC_SELF, -10, 112, -80) + Else + Call(SetNpcPos, NPC_SELF, 50, 0, 0) + Call(EnableNpcShadow, NPC_SELF, TRUE) + EndIf + EndIf + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Sushie))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Bubulb) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_RAPHAEL_LEFT_NEST) - EVT_IF_EQ(GF_JAN04_Met_Bubulb, FALSE) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Bubulb_Yellow_PopUp) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_MOLE_POP, SOUND_SPACE_DEFAULT) - EVT_WAIT(35) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Bubulb_Yellow_Idle) - EVT_CALL(SetNpcCollisionSize, NPC_SELF, 45, 26) - EVT_CALL(SpeakToPlayer, NPC_Bubulb, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH5_00A8) - EVT_SET(GF_JAN04_Met_Bubulb, TRUE) - EVT_CALL(SetTattleMessage, NPC_Bubulb, MSG_NpcTattle_JAN_Bubulb_Revealed) - EVT_RETURN - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Bubulb, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH5_00A9) - EVT_END_IF - EVT_CASE_LT(STORY_CH5_TRADED_VASE_FOR_SEED) - EVT_CALL(SpeakToPlayer, NPC_Bubulb, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH5_00AA) - EVT_CASE_LT(STORY_CH6_FLOWER_GATE_OPEN) - EVT_CALL(SpeakToPlayer, NPC_Bubulb, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH5_00AB) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_Bubulb, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH5_00AC) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_RAPHAEL_LEFT_NEST) + IfEq(GF_JAN04_Met_Bubulb, FALSE) + Wait(30) + Call(SetNpcAnimation, NPC_SELF, ANIM_Bubulb_Yellow_PopUp) + Wait(10) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_MOLE_POP, SOUND_SPACE_DEFAULT) + Wait(35) + Call(SetNpcAnimation, NPC_SELF, ANIM_Bubulb_Yellow_Idle) + Call(SetNpcCollisionSize, NPC_SELF, 45, 26) + Call(SpeakToPlayer, NPC_Bubulb, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH5_00A8) + Set(GF_JAN04_Met_Bubulb, TRUE) + Call(SetTattleMessage, NPC_Bubulb, MSG_NpcTattle_JAN_Bubulb_Revealed) + Return + Else + Call(SpeakToPlayer, NPC_Bubulb, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH5_00A9) + EndIf + CaseLt(STORY_CH5_TRADED_VASE_FOR_SEED) + Call(SpeakToPlayer, NPC_Bubulb, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH5_00AA) + CaseLt(STORY_CH6_FLOWER_GATE_OPEN) + Call(SpeakToPlayer, NPC_Bubulb, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH5_00AB) + CaseDefault + Call(SpeakToPlayer, NPC_Bubulb, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH5_00AC) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Bubulb) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bubulb))) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_RAPHAEL_LEFT_NEST) - EVT_IF_EQ(GF_JAN04_Met_Bubulb, FALSE) - EVT_CALL(SetNpcCollisionSize, NPC_SELF, 25, 25) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Bubulb_Yellow_BuriedIdle) - EVT_CALL(SetTattleMessage, NPC_Bubulb, MSG_NpcTattle_MAC_Bubulb_Hidden) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bubulb))) + IfLt(GB_StoryProgress, STORY_CH5_RAPHAEL_LEFT_NEST) + IfEq(GF_JAN04_Met_Bubulb, FALSE) + Call(SetNpcCollisionSize, NPC_SELF, 25, 25) + Call(SetNpcAnimation, NPC_SELF, ANIM_Bubulb_Yellow_BuriedIdle) + Call(SetTattleMessage, NPC_Bubulb, MSG_NpcTattle_MAC_Bubulb_Hidden) + EndIf + EndIf + Return + End }; NpcData N(NpcData_Characters)[] = { diff --git a/src/world/area_jan/jan_04/jan_04_5_unused.c b/src/world/area_jan/jan_04/jan_04_5_unused.c index 464f18798fc..938c348a0f5 100644 --- a/src/world/area_jan/jan_04/jan_04_5_unused.c +++ b/src/world/area_jan/jan_04/jan_04_5_unused.c @@ -1,33 +1,33 @@ #include "jan_04.h" EvtScript N(D_80243750_B47EC0) = { - EVT_IF_EQ(MV_Unk_00, 0) - EVT_SET(MV_Unk_01, 6) - EVT_END_IF - EVT_ADD(MV_Unk_01, 2) - EVT_RETURN - EVT_END + IfEq(MV_Unk_00, 0) + Set(MV_Unk_01, 6) + EndIf + Add(MV_Unk_01, 2) + Return + End }; EvtScript N(EVS_80243798) = { - EVT_LABEL(0) - EVT_SUB(MV_Unk_01, 1) - EVT_ADD(MV_Unk_00, MV_Unk_01) - EVT_IF_LT(MV_Unk_00, 0) - EVT_SET(MV_Unk_01, 0) - EVT_SET(MV_Unk_00, 0) - EVT_END_IF - EVT_IF_GT(MV_Unk_00, 90) - EVT_SET(MV_Unk_01, 0) - EVT_SET(MV_Unk_00, 90) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Sub(MV_Unk_01, 1) + Add(MV_Unk_00, MV_Unk_01) + IfLt(MV_Unk_00, 0) + Set(MV_Unk_01, 0) + Set(MV_Unk_00, 0) + EndIf + IfGt(MV_Unk_00, 90) + Set(MV_Unk_01, 0) + Set(MV_Unk_00, 90) + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_SetupUnused) = { - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/area_jan/jan_04/jan_04_6_trees.c b/src/world/area_jan/jan_04/jan_04_6_trees.c index 6b96752846b..811b557afc6 100644 --- a/src/world/area_jan/jan_04/jan_04_6_trees.c +++ b/src/world/area_jan/jan_04/jan_04_6_trees.c @@ -85,15 +85,15 @@ BombTrigger N(BombPos_Tree3) = { }; EvtScript N(EVS_SetupTrees) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o156, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o157, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o34, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree3)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o156, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o157, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree3))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o34, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree3)), 1, 0) + Return + End }; diff --git a/src/world/area_jan/jan_04/jan_04_7_scenes.c b/src/world/area_jan/jan_04/jan_04_7_scenes.c index dc00517ade0..34657d24397 100644 --- a/src/world/area_jan/jan_04/jan_04_7_scenes.c +++ b/src/world/area_jan/jan_04/jan_04_7_scenes.c @@ -34,76 +34,76 @@ Vec3f N(YoshiKidsRunPath)[] = { }; EvtScript N(EVS_Scene_Epilogue) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(SetNpcPos, NPC_Sushie, -40, 0, 15) - EVT_CALL(SetNpcYaw, NPC_Sushie, 270) - EVT_CALL(SetNpcAnimation, NPC_Sushie, ANIM_WorldSushie_Read) - EVT_CALL(SetNpcAnimation, NPC_YoshiKid_04, ANIM_YoshiKid_Yellow_Sleep) - EVT_CALL(SetNpcAnimation, NPC_YoshiKid_02, ANIM_YoshiKid_Red_Sleep) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -20, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -20, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(16.0), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(90) - EVT_THREAD - EVT_CALL(SetNpcPos, NPC_YoshiKid_01, -350, 0, 15) - EVT_CALL(SetNpcAnimation, NPC_YoshiKid_01, ANIM_YoshiKid_Green_Run) - EVT_CALL(LoadPath, 90, EVT_PTR(N(YoshiKidsRunPath)), ARRAY_COUNT(N(YoshiKidsRunPath)), EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_YoshiKid_01, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(SetNpcPos, NPC_YoshiKid_05, -350, 0, 15) - EVT_CALL(SetNpcAnimation, NPC_YoshiKid_05, ANIM_YoshiKid_Purple_Run) - EVT_CALL(LoadPath, 90, EVT_PTR(N(YoshiKidsRunPath)), ARRAY_COUNT(N(YoshiKidsRunPath)), EASING_LINEAR) - EVT_LABEL(11) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_YoshiKid_05, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(11) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(60) - EVT_CALL(InterpNpcYaw, NPC_Sushie, 90, 0) - EVT_CALL(SetNpcAnimation, NPC_Sushie, ANIM_WorldSushie_Talk) - EVT_CALL(SetNpcJumpscale, NPC_Sushie, EVT_FLOAT(2.0)) - EVT_CALL(GetNpcPos, NPC_Sushie, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Sushie, LVar0, LVar1, LVar2, 10) - EVT_CALL(SetNpcAnimation, NPC_YoshiKid_01, ANIM_YoshiKid_Green_Talk) - EVT_CALL(SetNpcFlagBits, NPC_YoshiKid_03, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcPos, NPC_YoshiKid_03, -350, 0, 15) - EVT_CALL(SetNpcAnimation, NPC_YoshiKid_03, ANIM_YoshiKid_Blue_Run) - EVT_CALL(SetNpcSpeed, NPC_YoshiKid_03, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_YoshiKid_03, -100, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_YoshiKid_03, ANIM_YoshiKid_Blue_Idle) - EVT_CHILD_THREAD - EVT_WAIT(20) - EVT_CALL(SetNpcJumpscale, NPC_YoshiKid_03, EVT_FLOAT(2.0)) - EVT_LOOP(10) - EVT_CALL(SetNpcAnimation, NPC_YoshiKid_03, ANIM_YoshiKid_Blue_Jump) - EVT_CALL(GetNpcPos, NPC_YoshiKid_03, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_YoshiKid_03, LVar0, LVar1, LVar2, 10) - EVT_CALL(SetNpcAnimation, NPC_YoshiKid_03, ANIM_YoshiKid_Blue_Land) - EVT_WAIT(8) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_WAIT(90) - EVT_CALL(FadeOutMusic, 0, 1000) - EVT_CALL(GotoMap, EVT_PTR("flo_00"), flo_00_ENTRY_B) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(SetNpcPos, NPC_Sushie, -40, 0, 15) + Call(SetNpcYaw, NPC_Sushie, 270) + Call(SetNpcAnimation, NPC_Sushie, ANIM_WorldSushie_Read) + Call(SetNpcAnimation, NPC_YoshiKid_04, ANIM_YoshiKid_Yellow_Sleep) + Call(SetNpcAnimation, NPC_YoshiKid_02, ANIM_YoshiKid_Red_Sleep) + Call(UseSettingsFrom, CAM_DEFAULT, -20, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, -20, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(SetCamPitch, CAM_DEFAULT, Float(16.0), Float(-7.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(90) + Thread + Call(SetNpcPos, NPC_YoshiKid_01, -350, 0, 15) + Call(SetNpcAnimation, NPC_YoshiKid_01, ANIM_YoshiKid_Green_Run) + Call(LoadPath, 90, Ref(N(YoshiKidsRunPath)), ARRAY_COUNT(N(YoshiKidsRunPath)), EASING_LINEAR) + Label(10) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_YoshiKid_01, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(10) + EndIf + EndThread + Thread + Wait(15) + Call(SetNpcPos, NPC_YoshiKid_05, -350, 0, 15) + Call(SetNpcAnimation, NPC_YoshiKid_05, ANIM_YoshiKid_Purple_Run) + Call(LoadPath, 90, Ref(N(YoshiKidsRunPath)), ARRAY_COUNT(N(YoshiKidsRunPath)), EASING_LINEAR) + Label(11) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_YoshiKid_05, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(11) + EndIf + EndThread + Wait(60) + Call(InterpNpcYaw, NPC_Sushie, 90, 0) + Call(SetNpcAnimation, NPC_Sushie, ANIM_WorldSushie_Talk) + Call(SetNpcJumpscale, NPC_Sushie, Float(2.0)) + Call(GetNpcPos, NPC_Sushie, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Sushie, LVar0, LVar1, LVar2, 10) + Call(SetNpcAnimation, NPC_YoshiKid_01, ANIM_YoshiKid_Green_Talk) + Call(SetNpcFlagBits, NPC_YoshiKid_03, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcPos, NPC_YoshiKid_03, -350, 0, 15) + Call(SetNpcAnimation, NPC_YoshiKid_03, ANIM_YoshiKid_Blue_Run) + Call(SetNpcSpeed, NPC_YoshiKid_03, Float(5.0)) + Call(NpcMoveTo, NPC_YoshiKid_03, -100, 0, 0) + Call(SetNpcAnimation, NPC_YoshiKid_03, ANIM_YoshiKid_Blue_Idle) + ChildThread + Wait(20) + Call(SetNpcJumpscale, NPC_YoshiKid_03, Float(2.0)) + Loop(10) + Call(SetNpcAnimation, NPC_YoshiKid_03, ANIM_YoshiKid_Blue_Jump) + Call(GetNpcPos, NPC_YoshiKid_03, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_YoshiKid_03, LVar0, LVar1, LVar2, 10) + Call(SetNpcAnimation, NPC_YoshiKid_03, ANIM_YoshiKid_Blue_Land) + Wait(8) + EndLoop + EndChildThread + Wait(90) + Call(FadeOutMusic, 0, 1000) + Call(GotoMap, Ref("flo_00"), flo_00_ENTRY_B) + Wait(100) + Return + End }; MAP_RODATA_PAD(2, epilogue); diff --git a/src/world/area_jan/jan_04/jan_04_8_treasure.c b/src/world/area_jan/jan_04/jan_04_8_treasure.c index 9bf1c3a0275..04a5fed918b 100644 --- a/src/world/area_jan/jan_04/jan_04_8_treasure.c +++ b/src/world/area_jan/jan_04/jan_04_8_treasure.c @@ -63,89 +63,89 @@ Vec3f N(ChestBouncePath)[] = { }; EvtScript N(EVS_Scene_TreasureChest) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, jan_04_ENTRY_1) - EVT_CALL(PlaySound, SOUND_FALL_LONG) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -350, 300, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -350, 300, 0) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 10, EVT_FLOAT(-7.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 0, 2650, 0, 148, MAKE_ENTITY_END) - EVT_SET(LVarA, LVar0) - EVT_THREAD - EVT_CALL(N(AnimateFlyingChestRotScale)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar9, LVarA) - EVT_CALL(LoadPath, 70, EVT_PTR(N(ChestFlightArc)), ARRAY_COUNT(N(ChestFlightArc)), EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(N(SetEntityPositionF), LVar9, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(50) - EVT_CALL(GotoMap, EVT_PTR("jan_04"), jan_04_ENTRY_2) - EVT_WAIT(100) - EVT_ELSE - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 170, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 16, EVT_FLOAT(-6.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.2)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 0, 2650, 0, 0, MAKE_ENTITY_END) - EVT_SET(LVarA, LVar0) - EVT_THREAD - EVT_CALL(N(AnimateFallingChestRot)) - EVT_END_THREAD - EVT_SET(LVar9, LVarA) - EVT_CALL(LoadPath, 12, EVT_PTR(N(ChestFallPath)), ARRAY_COUNT(N(ChestFallPath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(N(SetEntityPositionF), LVar9, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAt, SOUND_JAN_CHEST_IMPACT, SOUND_SPACE_DEFAULT, LVar1, LVar2, LVar3) - EVT_THREAD - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, -15, 0, 0, 10, 10) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, 0, 0, 0, 0, 0) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, 15, 0, 0, 350, 350) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(LoadPath, 10, EVT_PTR(N(ChestBouncePath)), ARRAY_COUNT(N(ChestBouncePath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(N(SetEntityPositionF), LVar9, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAt, SOUND_JAN_CHEST_IMPACT, SOUND_SPACE_DEFAULT, LVar1, LVar2, LVar3) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, -10, 0, 15, 0, 0) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, -10, 0, 15, 0, 0) - EVT_WAIT(60) - EVT_EXEC(N(EVS_GotoMap_kmr_24_0)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(GetEntryID, LVar0) + IfEq(LVar0, jan_04_ENTRY_1) + Call(PlaySound, SOUND_FALL_LONG) + Call(UseSettingsFrom, CAM_DEFAULT, -350, 300, 0) + Call(SetPanTarget, CAM_DEFAULT, -350, 300, 0) + Call(SetCamPitch, CAM_DEFAULT, 10, Float(-7.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(MakeEntity, Ref(Entity_Chest), 0, 2650, 0, 148, MAKE_ENTITY_END) + Set(LVarA, LVar0) + Thread + Call(N(AnimateFlyingChestRotScale)) + EndThread + Thread + Set(LVar9, LVarA) + Call(LoadPath, 70, Ref(N(ChestFlightArc)), ARRAY_COUNT(N(ChestFlightArc)), EASING_QUADRATIC_OUT) + Loop(0) + Call(GetNextPathPos) + Call(N(SetEntityPositionF), LVar9, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + EndThread + Wait(50) + Call(GotoMap, Ref("jan_04"), jan_04_ENTRY_2) + Wait(100) + Else + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 0, 170, 0) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(SetCamPitch, CAM_DEFAULT, 16, Float(-6.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.2)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(MakeEntity, Ref(Entity_Chest), 0, 2650, 0, 0, MAKE_ENTITY_END) + Set(LVarA, LVar0) + Thread + Call(N(AnimateFallingChestRot)) + EndThread + Set(LVar9, LVarA) + Call(LoadPath, 12, Ref(N(ChestFallPath)), ARRAY_COUNT(N(ChestFallPath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(N(SetEntityPositionF), LVar9, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAt, SOUND_JAN_CHEST_IMPACT, SOUND_SPACE_DEFAULT, LVar1, LVar2, LVar3) + Thread + PlayEffect(EFFECT_WALKING_DUST, 2, -15, 0, 0, 10, 10) + PlayEffect(EFFECT_WALKING_DUST, 2, 0, 0, 0, 0, 0) + PlayEffect(EFFECT_WALKING_DUST, 2, 15, 0, 0, 350, 350) + Call(ShakeCam, CAM_DEFAULT, 0, 30, Float(1.0)) + EndThread + Call(LoadPath, 10, Ref(N(ChestBouncePath)), ARRAY_COUNT(N(ChestBouncePath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(N(SetEntityPositionF), LVar9, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAt, SOUND_JAN_CHEST_IMPACT, SOUND_SPACE_DEFAULT, LVar1, LVar2, LVar3) + PlayEffect(EFFECT_WALKING_DUST, 2, -10, 0, 15, 0, 0) + PlayEffect(EFFECT_WALKING_DUST, 2, -10, 0, 15, 0, 0) + Wait(60) + Exec(N(EVS_GotoMap_kmr_24_0)) + EndIf + Return + End }; diff --git a/src/world/area_jan/jan_04/jan_04_9_bushes.c b/src/world/area_jan/jan_04/jan_04_9_bushes.c index 745d9900a46..a7295c65431 100644 --- a/src/world/area_jan/jan_04/jan_04_9_bushes.c +++ b/src/world/area_jan/jan_04/jan_04_9_bushes.c @@ -145,26 +145,26 @@ SearchBushConfig N(SearchBush_Bush10) = { }; EvtScript N(EVS_SetupBushes) = { - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o118, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o162, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o119, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush4))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o163, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush5))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o121, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush6))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o122, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush7))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o166, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush8))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o120, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush9))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o164, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush10))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o165, 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(SearchBush_Bush1))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o118, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush2))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o162, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush3))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o119, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush4))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o163, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush5))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o121, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush6))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o122, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush7))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o166, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush8))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o120, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush9))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o164, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush10))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o165, 1, 0) + Return + End }; diff --git a/src/world/area_jan/jan_05/jan_05_1_music.c b/src/world/area_jan/jan_05/jan_05_1_music.c index 29745c79198..9364160422b 100644 --- a/src/world/area_jan/jan_05/jan_05_1_music.c +++ b/src/world/area_jan/jan_05/jan_05_1_music.c @@ -1,8 +1,8 @@ #include "jan_05.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_JADE_JUNGLE, 0, 8) - EVT_CALL(ClearAmbientSounds, 250) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_JADE_JUNGLE, 0, 8) + Call(ClearAmbientSounds, 250) + Return + End }; diff --git a/src/world/area_jan/jan_05/jan_05_2_main.c b/src/world/area_jan/jan_05/jan_05_2_main.c index 3d273406b7f..1450af8240a 100644 --- a/src/world/area_jan/jan_05/jan_05_2_main.c +++ b/src/world/area_jan/jan_05/jan_05_2_main.c @@ -8,46 +8,46 @@ EvtScript N(EVS_ExitWalk_jan_04_0) = EVT_EXIT_WALK(60, jan_05_ENTRY_2, "jan_04", EvtScript N(EVS_ExitWalk_jan_06_0) = EVT_EXIT_WALK(60, jan_05_ENTRY_3, "jan_06", jan_06_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_08_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_o227, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_03_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_06_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_jan_08_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_o227, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_jan_03_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_jan_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_jan_06_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_JADE_JUNGLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupLogs)) - EVT_EXEC(N(EVS_SetupTrees)) - EVT_EXEC(N(EVS_SetupBushes)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o75, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o77, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o75, COLLIDER_FLAG_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o77, COLLIDER_FLAG_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1, SURFACE_TYPE_WATER) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deiliw, SURFACE_TYPE_WATER) - EVT_EXEC(N(EVS_SetupTrees)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitn, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitse, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(MakeTransformGroup, MODEL_g25) - EVT_CALL(EnableTexPanning, MODEL_o101, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_JADE_JUNGLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupLogs)) + Exec(N(EVS_SetupTrees)) + Exec(N(EVS_SetupBushes)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o75, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o77, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o75, COLLIDER_FLAG_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o77, COLLIDER_FLAG_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1, SURFACE_TYPE_WATER) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deiliw, SURFACE_TYPE_WATER) + Exec(N(EVS_SetupTrees)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitn, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitse, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Exec(N(EVS_SetupMusic)) + Call(MakeTransformGroup, MODEL_g25) + Call(EnableTexPanning, MODEL_o101, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( -80, 140, 80, -100) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; diff --git a/src/world/area_jan/jan_05/jan_05_3_log.c b/src/world/area_jan/jan_05/jan_05_3_log.c index fda49f8e3f3..805903fb330 100644 --- a/src/world/area_jan/jan_05/jan_05_3_log.c +++ b/src/world/area_jan/jan_05/jan_05_3_log.c @@ -3,153 +3,153 @@ #include "sprite/player.h" EvtScript N(EVS_SetupLogObjects) = { - EVT_IF_EQ(GF_JAN05_CreateLogBridge, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o21, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_o147, FALSE) - EVT_CALL(EnableModel, MODEL_o148, FALSE) - EVT_CALL(TranslateGroup, MODEL_g31, 0, -240, 0) - EVT_CALL(TranslateGroup, MODEL_g32, 0, -240, 0) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o94, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o92, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o21, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_o147, TRUE) - EVT_CALL(EnableModel, MODEL_o148, TRUE) - EVT_CALL(TranslateGroup, MODEL_g31, 0, 10, 0) - EVT_CALL(TranslateGroup, MODEL_g32, 0, 10, 0) - EVT_CALL(RotateGroup, MODEL_g31, -90, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_g32, -90, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_g31, 90, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_g32, -90, 0, 1, 0) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_JAN05_CreateLogBridge, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o21, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_o147, FALSE) + Call(EnableModel, MODEL_o148, FALSE) + Call(TranslateGroup, MODEL_g31, 0, -240, 0) + Call(TranslateGroup, MODEL_g32, 0, -240, 0) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o94, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o92, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o21, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_o147, TRUE) + Call(EnableModel, MODEL_o148, TRUE) + Call(TranslateGroup, MODEL_g31, 0, 10, 0) + Call(TranslateGroup, MODEL_g32, 0, 10, 0) + Call(RotateGroup, MODEL_g31, -90, 0, 0, 1) + Call(RotateGroup, MODEL_g32, -90, 0, 0, 1) + Call(RotateGroup, MODEL_g31, 90, 0, 1, 0) + Call(RotateGroup, MODEL_g32, -90, 0, 1, 0) + EndIf + Return + End }; EvtScript N(EVS_LogAnim_RiseUp) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_o94, SOUND_SMACK_TREE, 0) - EVT_CALL(MakeLerp, -240, -259, 5, EASING_QUARTIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g31, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_g32, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_o94, SOUND_SMACK_TREE, 0) + Call(MakeLerp, -240, -259, 5, EASING_QUARTIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g31, 0, LVar0, 0) + Call(TranslateGroup, MODEL_g32, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; #include "world/common/todo/UpdateLogShadow.inc.c" EvtScript N(EVS_LogAnim_FallDown) = { - EVT_THREAD - EVT_WAIT(17) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_CALL(N(UpdateLogShadow), MODEL_o147, MF_KillLogShadow) - EVT_END_THREAD - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o94, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(MakeLerp, -259, 60, 30, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g31, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_g32, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(1) - EVT_CALL(MakeLerp, 60, 0, 30, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g31, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_g32, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o94, SOUND_JAN_LOG_LAND, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, -185, 0, 320, 0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 2, 3, 1) - EVT_RETURN - EVT_END + Thread + Wait(17) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Call(N(UpdateLogShadow), MODEL_o147, MF_KillLogShadow) + EndThread + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o94, COLLIDER_FLAGS_UPPER_MASK) + Call(MakeLerp, -259, 60, 30, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g31, 0, LVar0, 0) + Call(TranslateGroup, MODEL_g32, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(1) + Call(MakeLerp, 60, 0, 30, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g31, 0, LVar0, 0) + Call(TranslateGroup, MODEL_g32, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(PlaySoundAtCollider, COLLIDER_o94, SOUND_JAN_LOG_LAND, 0) + PlayEffect(EFFECT_LANDING_DUST, 4, -185, 0, 320, 0) + Call(ShakeCam, CAM_DEFAULT, 2, 3, 1) + Return + End }; EvtScript N(EVS_LogAnim_FallOver) = { - EVT_THREAD - EVT_WAIT(50) - EVT_SET(MF_KillLogShadow, TRUE) - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, -90, 60, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g31, 0, 0, 0) - EVT_CALL(TranslateGroup, MODEL_g32, 0, 0, 0) - EVT_CALL(RotateGroup, MODEL_g31, LVar0, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_g32, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 2, 3, 1) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + Wait(50) + Set(MF_KillLogShadow, TRUE) + EndThread + Call(MakeLerp, 0, -90, 60, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g31, 0, 0, 0) + Call(TranslateGroup, MODEL_g32, 0, 0, 0) + Call(RotateGroup, MODEL_g31, LVar0, 0, 0, 1) + Call(RotateGroup, MODEL_g32, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Thread + Call(ShakeCam, CAM_DEFAULT, 2, 3, 1) + EndThread + Return + End }; EvtScript N(EVS_LogAnim_Split) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_o94, SOUND_JAN_LOG_SPLIT, 0) - EVT_CALL(EnableModel, MODEL_o147, TRUE) - EVT_CALL(EnableModel, MODEL_o148, TRUE) - EVT_CALL(MakeLerp, 0, 90, 30, EASING_COS_FAST_OVERSHOOT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(LVar2, LVar0) - EVT_DIVF(LVar2, 9) - EVT_CALL(TranslateGroup, MODEL_g31, 0, LVar2, 0) - EVT_CALL(TranslateGroup, MODEL_g32, 0, LVar2, 0) - EVT_CALL(RotateGroup, MODEL_g31, -90, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_g32, -90, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_g31, LVar0, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_g32, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_o94, SOUND_JAN_LOG_SPLIT, 0) + Call(EnableModel, MODEL_o147, TRUE) + Call(EnableModel, MODEL_o148, TRUE) + Call(MakeLerp, 0, 90, 30, EASING_COS_FAST_OVERSHOOT) + Loop(0) + Call(UpdateLerp) + Set(LVar2, LVar0) + DivF(LVar2, 9) + Call(TranslateGroup, MODEL_g31, 0, LVar2, 0) + Call(TranslateGroup, MODEL_g32, 0, LVar2, 0) + Call(RotateGroup, MODEL_g31, -90, 0, 0, 1) + Call(RotateGroup, MODEL_g32, -90, 0, 0, 1) + Call(RotateGroup, MODEL_g31, LVar0, 0, 1, 0) + Call(RotateGroup, MODEL_g32, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_Smash_BuriedLog) = { - EVT_SET(GF_JAN05_CreateLogBridge, TRUE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC_WAIT(N(EVS_LogAnim_RiseUp)) - EVT_WAIT(1) - EVT_EXEC_WAIT(N(EVS_LogAnim_FallDown)) - EVT_WAIT(1) - EVT_EXEC_WAIT(N(EVS_LogAnim_FallOver)) - EVT_WAIT(1) - EVT_EXEC_WAIT(N(EVS_LogAnim_Split)) - EVT_WAIT(1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_EXEC(N(EVS_SetupLogObjects)) - EVT_RETURN - EVT_END + Set(GF_JAN05_CreateLogBridge, TRUE) + Call(DisablePlayerInput, TRUE) + ExecWait(N(EVS_LogAnim_RiseUp)) + Wait(1) + ExecWait(N(EVS_LogAnim_FallDown)) + Wait(1) + ExecWait(N(EVS_LogAnim_FallOver)) + Wait(1) + ExecWait(N(EVS_LogAnim_Split)) + Wait(1) + Call(DisablePlayerInput, FALSE) + Exec(N(EVS_SetupLogObjects)) + Return + End }; EvtScript N(EVS_SetupLogs) = { - EVT_IF_EQ(GF_JAN05_CreateLogBridge, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Smash_BuriedLog)), TRIGGER_WALL_HAMMER, COLLIDER_o94, 1, 0) - EVT_END_IF - EVT_EXEC(N(EVS_SetupLogObjects)) - EVT_RETURN - EVT_END + IfEq(GF_JAN05_CreateLogBridge, FALSE) + BindTrigger(Ref(N(EVS_Smash_BuriedLog)), TRIGGER_WALL_HAMMER, COLLIDER_o94, 1, 0) + EndIf + Exec(N(EVS_SetupLogObjects)) + Return + End }; diff --git a/src/world/area_jan/jan_05/jan_05_4_bushes.c b/src/world/area_jan/jan_05/jan_05_4_bushes.c index b765b0a1799..1e4495d71ee 100644 --- a/src/world/area_jan/jan_05/jan_05_4_bushes.c +++ b/src/world/area_jan/jan_05/jan_05_4_bushes.c @@ -11,22 +11,22 @@ EvtScript N(EVS_MoveBushes_Separate) = EVT_MOVE_BUSHES(COLLIDER_o64, MODEL_o64, MODEL_o65, MV_BushOffsetL, MV_BushOffsetR); EvtScript N(EVS_MoveBushes) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o64, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_MoveBushes_Separate)) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(MakeLerp, 0, 45, 30, EASING_CUBIC_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_SETF(MV_BushOffsetR, LVar0) - EVT_SETF(MV_BushOffsetL, MV_BushOffsetR) - EVT_MULF(MV_BushOffsetL, -1) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o64, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_MoveBushes_Separate)) + Call(DisablePlayerInput, TRUE) + Call(MakeLerp, 0, 45, 30, EASING_CUBIC_OUT) + Label(0) + Call(UpdateLerp) + SetF(MV_BushOffsetR, LVar0) + SetF(MV_BushOffsetL, MV_BushOffsetR) + MulF(MV_BushOffsetL, -1) + IfEq(LVar1, 1) + Wait(1) + Goto(0) + EndIf + Call(DisablePlayerInput, FALSE) + Return + End }; FoliageModelList N(Bush1_BushModels) = FOLIAGE_MODEL_LIST(MODEL_o63); @@ -253,35 +253,35 @@ SearchBushConfig N(SearchBush_Bush14) = { }; EvtScript N(EVS_SetupBushes) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_MoveBushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o64, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o135, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o213, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o214, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush4))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o215, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush5))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o216, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush6))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o217, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush7))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o218, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush8))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o219, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush9))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o220, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush10))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o221, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush11))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o222, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush12))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o223, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush13))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o224, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush14))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o225, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_MoveBushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o64, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush1))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o135, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush2))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o213, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush3))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o214, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush4))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o215, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush5))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o216, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush6))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o217, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush7))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o218, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush8))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o219, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush9))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o220, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush10))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o221, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush11))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o222, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush12))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o223, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush13))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o224, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush14))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o225, 1, 0) + Return + End }; diff --git a/src/world/area_jan/jan_05/jan_05_5_npc.c b/src/world/area_jan/jan_05/jan_05_5_npc.c index 7091d5bfc32..908d6f6ffb4 100644 --- a/src/world/area_jan/jan_05/jan_05_5_npc.c +++ b/src/world/area_jan/jan_05/jan_05_5_npc.c @@ -9,215 +9,215 @@ #include "world/common/enemy/SpearGuy_Wander.inc.c" EvtScript N(EVS_NpcIdle_JungleFuzzy) = { - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_LABEL(0) - EVT_CALL(GetSelfVar, 7, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Fuzzy_Jungle_Anim09) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, 125, 100, -392) - EVT_CALL(PlaySoundWithVolume, SOUND_FUZZY_HOP_A, 110) - EVT_WAIT(20) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING, TRUE) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_JungleFuzzy_Wander))) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Label(0) + Call(GetSelfVar, 7, LVar0) + Wait(1) + IfEq(LVar0, 0) + Goto(0) + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_Fuzzy_Jungle_Anim09) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING, FALSE) + Call(SetNpcPos, NPC_SELF, 125, 100, -392) + Call(PlaySoundWithVolume, SOUND_FUZZY_HOP_A, 110) + Wait(20) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING, TRUE) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_JungleFuzzy_Wander))) + Return + End }; EvtScript N(EVS_NpcInit_JungleFuzzy) = { - EVT_CALL(SetSelfVar, 7, 0) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_ACTIVE_WHILE_OFFSCREEN, 1) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING, TRUE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_JungleFuzzy))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 7, 0) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_ACTIVE_WHILE_OFFSCREEN, 1) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING, TRUE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_JungleFuzzy))) + Return + End }; EvtScript N(EVS_YoshiKid_WatchPlayerProximinity) = { - EVT_LABEL(1) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(AwaitPlayerLeave, -308, -270, 70) - EVT_CALL(SetSelfVar, 0, 1) - EVT_CASE_EQ(1) - EVT_CALL(AwaitPlayerApproach, -308, -270, 50) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH5_00B8, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetSelfVar, 0, 0) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(1) - EVT_RETURN - EVT_END + Label(1) + Call(GetSelfVar, 0, LVar0) + Switch(LVar0) + CaseEq(0) + Call(AwaitPlayerLeave, -308, -270, 70) + Call(SetSelfVar, 0, 1) + CaseEq(1) + Call(AwaitPlayerApproach, -308, -270, 50) + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_CH5_00B8, 160, 40) + Call(DisablePlayerInput, FALSE) + Call(SetSelfVar, 0, 0) + EndSwitch + Wait(1) + Goto(1) + Return + End }; EvtScript N(EVS_OnShakeTree_Yoshi) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcVar, NPC_YoshiKid, 0, 9) - EVT_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_YoshiKid, SOUND_FALL_QUICK, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcJumpscale, NPC_YoshiKid, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_YoshiKid, -308, 0, -248, 30) - EVT_END_THREAD - EVT_CALL(EnableNpcShadow, NPC_YoshiKid, TRUE) - EVT_WAIT(40) - EVT_CALL(SetNpcVar, NPC_YoshiKid, 0, 10) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(SetNpcVar, NPC_YoshiKid, 0, 9) + Thread + Call(PlaySoundAtNpc, NPC_YoshiKid, SOUND_FALL_QUICK, SOUND_SPACE_DEFAULT) + Call(SetNpcJumpscale, NPC_YoshiKid, Float(1.0)) + Call(NpcJump0, NPC_YoshiKid, -308, 0, -248, 30) + EndThread + Call(EnableNpcShadow, NPC_YoshiKid, TRUE) + Wait(40) + Call(SetNpcVar, NPC_YoshiKid, 0, 10) + Call(DisablePlayerInput, FALSE) + Unbind + Return + End }; EvtScript N(EVS_YoshiKid_Sleeping) = { - EVT_LOOP(0) - EVT_CALL(PlaySoundAtNpc, NPC_YoshiKid, SOUND_SNORE_INHALE_A, SOUND_SPACE_DEFAULT) - EVT_WAIT(24) - EVT_CALL(PlaySoundAtNpc, NPC_YoshiKid, SOUND_SNORE_EXHALE_A, SOUND_SPACE_DEFAULT) - EVT_WAIT(21) - EVT_CALL(GetNpcVar, NPC_YoshiKid, 0, LVar0) - EVT_IF_GE(LVar0, 9) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(PlaySoundAtNpc, NPC_YoshiKid, SOUND_SNORE_INHALE_A, SOUND_SPACE_DEFAULT) + Wait(24) + Call(PlaySoundAtNpc, NPC_YoshiKid, SOUND_SNORE_EXHALE_A, SOUND_SPACE_DEFAULT) + Wait(21) + Call(GetNpcVar, NPC_YoshiKid, 0, LVar0) + IfGe(LVar0, 9) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_YoshiKid_PlaySounds) = { - EVT_EXEC_GET_TID(N(EVS_YoshiKid_Sleeping), LVar9) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcVar, NPC_YoshiKid, 0, LVar0) - EVT_IF_GE(LVar0, 9) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_KILL_THREAD(LVar9) - EVT_CALL(SetNpcAnimation, NPC_YoshiKid, ANIM_YoshiKid_Purple_Cry) - EVT_LOOP(3) - EVT_CALL(PlaySoundAtNpc, NPC_YoshiKid, SOUND_YOSHI_KID_CRY, SOUND_SPACE_DEFAULT) - EVT_WAIT(13) - EVT_END_LOOP - EVT_RETURN - EVT_END + ExecGetTID(N(EVS_YoshiKid_Sleeping), LVar9) + Loop(0) + Wait(1) + Call(GetNpcVar, NPC_YoshiKid, 0, LVar0) + IfGe(LVar0, 9) + BreakLoop + EndIf + EndLoop + KillThread(LVar9) + Call(SetNpcAnimation, NPC_YoshiKid, ANIM_YoshiKid_Purple_Cry) + Loop(3) + Call(PlaySoundAtNpc, NPC_YoshiKid, SOUND_YOSHI_KID_CRY, SOUND_SPACE_DEFAULT) + Wait(13) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_YoshiKid) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, jan_05_ENTRY_3) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH5_00B8, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnShakeTree_Yoshi)), TRIGGER_WALL_HAMMER, COLLIDER_o87, 1, 0) - EVT_EXEC_GET_TID(N(EVS_YoshiKid_WatchPlayerProximinity), LVar9) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 10) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_KILL_THREAD(LVar9) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, -270) - EVT_SET(LVar0, -324) - EVT_SET(LVar1, -355) - EVT_SET(LVar2, 27) - EVT_ELSE - EVT_SET(LVar0, -216) - EVT_SET(LVar1, -185) - EVT_SET(LVar2, -27) - EVT_END_IF - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_YoshiKid_Purple_Walk) - EVT_CALL(NpcMoveTo, NPC_SELF, -270, -248, 30) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar1, -250, 30) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_YoshiKid, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(PlayerMoveTo, LVar0, -248, 30) - EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE) - EVT_END_THREAD - EVT_ADD(LVar0, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, 0, -248) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, 0, -248) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(15) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_EQ(LVar0, PARTNER_SUSHIE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Purple_SadTalk, ANIM_YoshiKid_Purple_SadIdle, 0, MSG_CH5_00B9) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Purple_SadTalk, ANIM_YoshiKid_Purple_SadIdle, 0, MSG_CH5_00BA) - EVT_END_IF - EVT_CALL(EndSpeech, NPC_SELF, ANIM_YoshiKid_Purple_Talk, ANIM_YoshiKid_Purple_Idle, 0) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_YoshiKid_Purple_Run) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, -315, -135, 0) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.5)) - EVT_CALL(NpcJump0, NPC_SELF, -325, 0, 215, 25) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_SET(GF_JAN05_SavedYoshi, TRUE) - EVT_SET(LVar0, 0) - EVT_ADD(LVar0, GF_JAN05_SavedYoshi) - EVT_ADD(LVar0, GF_JAN07_SavedYoshi) - EVT_ADD(LVar0, GF_JAN08_SavedYoshi) - EVT_ADD(LVar0, GF_JAN10_SavedYoshi) - EVT_ADD(LVar0, GF_JAN11_SavedYoshi) - EVT_IF_EQ(LVar0, 5) - EVT_CALL(SetMusicTrack, 0, SONG_YOSHI_KIDS_FOUND, 0, 8) - EVT_SET(GB_StoryProgress, STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_ThumbsUp) - EVT_WAIT(120) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_ELSE - EVT_WAIT(30) - EVT_END_IF - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, jan_05_ENTRY_3) + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_CH5_00B8, 160, 40) + Call(DisablePlayerInput, FALSE) + EndIf + BindTrigger(Ref(N(EVS_OnShakeTree_Yoshi)), TRIGGER_WALL_HAMMER, COLLIDER_o87, 1, 0) + ExecGetTID(N(EVS_YoshiKid_WatchPlayerProximinity), LVar9) + Loop(0) + Wait(1) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 10) + BreakLoop + EndIf + EndLoop + KillThread(LVar9) + Call(DisablePlayerInput, TRUE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, -270) + Set(LVar0, -324) + Set(LVar1, -355) + Set(LVar2, 27) + Else + Set(LVar0, -216) + Set(LVar1, -185) + Set(LVar2, -27) + EndIf + Thread + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_YoshiKid_Purple_Walk) + Call(NpcMoveTo, NPC_SELF, -270, -248, 30) + Call(NpcFacePlayer, NPC_SELF, 0) + EndThread + Thread + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Call(NpcMoveTo, NPC_PARTNER, LVar1, -250, 30) + Call(NpcFaceNpc, NPC_PARTNER, NPC_YoshiKid, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, FALSE) + Call(EnablePartnerAI) + EndThread + Thread + Call(PlayerMoveTo, LVar0, -248, 30) + Call(PlayerFaceNpc, NPC_SELF, FALSE) + EndThread + Add(LVar0, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, 0, -248) + Call(SetPanTarget, CAM_DEFAULT, LVar0, 0, -248) + Call(SetCamDistance, CAM_DEFAULT, Float(350.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-7.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(15) + Call(GetCurrentPartnerID, LVar0) + IfEq(LVar0, PARTNER_SUSHIE) + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Purple_SadTalk, ANIM_YoshiKid_Purple_SadIdle, 0, MSG_CH5_00B9) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Purple_SadTalk, ANIM_YoshiKid_Purple_SadIdle, 0, MSG_CH5_00BA) + EndIf + Call(EndSpeech, NPC_SELF, ANIM_YoshiKid_Purple_Talk, ANIM_YoshiKid_Purple_Idle, 0) + Thread + Call(SetNpcAnimation, NPC_SELF, ANIM_YoshiKid_Purple_Run) + Call(SetNpcSpeed, NPC_SELF, Float(5.0)) + Call(NpcMoveTo, NPC_SELF, -315, -135, 0) + Call(SetNpcJumpscale, NPC_SELF, Float(0.5)) + Call(NpcJump0, NPC_SELF, -325, 0, 215, 25) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndThread + Set(GF_JAN05_SavedYoshi, TRUE) + Set(LVar0, 0) + Add(LVar0, GF_JAN05_SavedYoshi) + Add(LVar0, GF_JAN07_SavedYoshi) + Add(LVar0, GF_JAN08_SavedYoshi) + Add(LVar0, GF_JAN10_SavedYoshi) + Add(LVar0, GF_JAN11_SavedYoshi) + IfEq(LVar0, 5) + Call(SetMusicTrack, 0, SONG_YOSHI_KIDS_FOUND, 0, 8) + Set(GB_StoryProgress, STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + Call(SetPlayerAnimation, ANIM_Mario1_ThumbsUp) + Wait(120) + Exec(N(EVS_SetupMusic)) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Else + Wait(30) + EndIf + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + Call(DisablePlayerInput, FALSE) + Call(RemoveNpc, NPC_SELF) + Return + End }; EvtScript N(EVS_NpcInit_YoshiKid) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH5_SUSHIE_JOINED_PARTY) - EVT_IF_EQ(GF_JAN05_SavedYoshi, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, -308, 110, -300) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_YoshiKid_Purple_Sleep) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_YoshiKid))) - EVT_EXEC(N(EVS_YoshiKid_PlaySounds)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH5_SUSHIE_JOINED_PARTY) + IfEq(GF_JAN05_SavedYoshi, FALSE) + Call(SetNpcPos, NPC_SELF, -308, 110, -300) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_YoshiKid_Purple_Sleep) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_YoshiKid))) + Exec(N(EVS_YoshiKid_PlaySounds)) + Return + EndIf + EndIf + Call(RemoveNpc, NPC_SELF) + Return + End }; NpcData N(NpcData_YoshiKid) = { diff --git a/src/world/area_jan/jan_05/jan_05_6_trees.c b/src/world/area_jan/jan_05/jan_05_6_trees.c index 7f7fea289c7..f91e6e66d1f 100644 --- a/src/world/area_jan/jan_05/jan_05_6_trees.c +++ b/src/world/area_jan/jan_05/jan_05_6_trees.c @@ -14,13 +14,13 @@ API_CALLABLE(N(func_8024268C_B4D0FC)) { } EvtScript N(EVS_OnShakeTree1) = { - EVT_WAIT(15) - EVT_CALL(N(func_8024268C_B4D0FC)) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetNpcVar, NPC_JungleFuzzy, 7, 1) - EVT_END_IF - EVT_RETURN - EVT_END + Wait(15) + Call(N(func_8024268C_B4D0FC)) + IfEq(LVar0, 1) + Call(SetNpcVar, NPC_JungleFuzzy, 7, 1) + EndIf + Return + End }; FoliageModelList N(Tree1_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o95, MODEL_o96, MODEL_o97, MODEL_o98, MODEL_o99); @@ -104,15 +104,15 @@ BombTrigger N(BombPos_Tree3) = { }; EvtScript N(EVS_SetupTrees) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o187, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o188, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o87, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree3)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o187, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o188, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree3))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o87, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree3)), 1, 0) + Return + End }; diff --git a/src/world/area_jan/jan_05/jan_05_7_entity.c b/src/world/area_jan/jan_05/jan_05_7_entity.c index 43dc2486f0e..ee556d84347 100644 --- a/src/world/area_jan/jan_05/jan_05_7_entity.c +++ b/src/world/area_jan/jan_05/jan_05_7_entity.c @@ -2,10 +2,10 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_RedBlock), 0, 60, 0, 0, ITEM_POWER_QUAKE, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_JAN05_BadgeBlock_PowerQuake) - EVT_CALL(MakeEntity, EVT_PTR(Entity_CymbalPlant), 205, 0, 220, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_TrumpetPlant), -386, 0, -214, 160, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_RedBlock), 0, 60, 0, 0, ITEM_POWER_QUAKE, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_JAN05_BadgeBlock_PowerQuake) + Call(MakeEntity, Ref(Entity_CymbalPlant), 205, 0, 220, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_TrumpetPlant), -386, 0, -214, 160, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_jan/jan_06/jan_06_1_main.c b/src/world/area_jan/jan_06/jan_06_1_main.c index 29a40af061b..ba02e018f11 100644 --- a/src/world/area_jan/jan_06/jan_06_1_main.c +++ b/src/world/area_jan/jan_06/jan_06_1_main.c @@ -8,91 +8,91 @@ EvtScript N(EVS_ExitWalk_jan_12_0) = EVT_EXIT_WALK(60, jan_06_ENTRY_2, "jan_12", EvtScript N(EVS_ExitWalk_jan_09_1) = EVT_EXIT_WALK(60, jan_06_ENTRY_3, "jan_09", jan_09_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_05_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_07_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_12_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_09_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_jan_05_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_jan_07_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_jan_12_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_jan_09_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + Return + End }; EvtScript N(EVS_InitRavenStatueObjects) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH5_MOVED_RAVEN_STATUE) - EVT_CALL(TranslateModel, MODEL_o55, 0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o56, 0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o57, 0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o58, 0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o146, 0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o147, 0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o148, 0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o151, 0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o162, 0, 0, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o180, COLLIDER_FLAGS_UPPER_MASK) - EVT_ELSE - EVT_CALL(TranslateModel, MODEL_o55, -100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o56, -100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o57, -100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o58, -100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o146, -100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o147, -100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o148, -100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o151, -100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o162, -100, 0, 0) - EVT_CALL(RotateModel, MODEL_o55, 0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o56, 0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o57, 0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o146, 0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o147, 0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o148, 0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o151, 0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o162, 0, 0, 1, 0) - EVT_CALL(MakeItemEntity, ITEM_JADE_RAVEN, -100, 15, -400, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o166, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o247, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH5_MOVED_RAVEN_STATUE) + Call(TranslateModel, MODEL_o55, 0, 0, 0) + Call(TranslateModel, MODEL_o56, 0, 0, 0) + Call(TranslateModel, MODEL_o57, 0, 0, 0) + Call(TranslateModel, MODEL_o58, 0, 0, 0) + Call(TranslateModel, MODEL_o146, 0, 0, 0) + Call(TranslateModel, MODEL_o147, 0, 0, 0) + Call(TranslateModel, MODEL_o148, 0, 0, 0) + Call(TranslateModel, MODEL_o151, 0, 0, 0) + Call(TranslateModel, MODEL_o162, 0, 0, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o180, COLLIDER_FLAGS_UPPER_MASK) + Else + Call(TranslateModel, MODEL_o55, -100, 0, 0) + Call(TranslateModel, MODEL_o56, -100, 0, 0) + Call(TranslateModel, MODEL_o57, -100, 0, 0) + Call(TranslateModel, MODEL_o58, -100, 0, 0) + Call(TranslateModel, MODEL_o146, -100, 0, 0) + Call(TranslateModel, MODEL_o147, -100, 0, 0) + Call(TranslateModel, MODEL_o148, -100, 0, 0) + Call(TranslateModel, MODEL_o151, -100, 0, 0) + Call(TranslateModel, MODEL_o162, -100, 0, 0) + Call(RotateModel, MODEL_o55, 0, 0, 1, 0) + Call(RotateModel, MODEL_o56, 0, 0, 1, 0) + Call(RotateModel, MODEL_o57, 0, 0, 1, 0) + Call(RotateModel, MODEL_o146, 0, 0, 1, 0) + Call(RotateModel, MODEL_o147, 0, 0, 1, 0) + Call(RotateModel, MODEL_o148, 0, 0, 1, 0) + Call(RotateModel, MODEL_o151, 0, 0, 1, 0) + Call(RotateModel, MODEL_o162, 0, 0, 1, 0) + Call(MakeItemEntity, ITEM_JADE_RAVEN, -100, 15, -400, ITEM_SPAWN_MODE_DECORATION, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o166, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o247, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_JADE_JUNGLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(SetZoneEnabled, ZONE_o59, FALSE) - EVT_EXEC(N(EVS_InitRavenStatueObjects)) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o69, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o71, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o74, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o69, COLLIDER_FLAG_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o71, COLLIDER_FLAG_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o74, COLLIDER_FLAG_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1, SURFACE_TYPE_WATER) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o257, SURFACE_TYPE_WATER) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o258, SURFACE_TYPE_WATER) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o259, SURFACE_TYPE_WATER) - EVT_EXEC(N(EVS_SetupStatue)) - EVT_EXEC(N(EVS_SetupTrees)) - EVT_EXEC(N(EVS_SetupBushes)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilits, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitn, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC(N(EVS_SetupLogs)) - EVT_CALL(SetMusicTrack, 0, SONG_JADE_JUNGLE, 0, 8) - EVT_CALL(ClearAmbientSounds, 250) - EVT_CALL(MakeTransformGroup, MODEL_g14) - EVT_CALL(EnableTexPanning, MODEL_o61, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_JADE_JUNGLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(SetZoneEnabled, ZONE_o59, FALSE) + Exec(N(EVS_InitRavenStatueObjects)) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o69, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o71, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o74, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o69, COLLIDER_FLAG_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o71, COLLIDER_FLAG_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o74, COLLIDER_FLAG_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1, SURFACE_TYPE_WATER) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o257, SURFACE_TYPE_WATER) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o258, SURFACE_TYPE_WATER) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o259, SURFACE_TYPE_WATER) + Exec(N(EVS_SetupStatue)) + Exec(N(EVS_SetupTrees)) + Exec(N(EVS_SetupBushes)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilits, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitn, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Exec(N(EVS_SetupLogs)) + Call(SetMusicTrack, 0, SONG_JADE_JUNGLE, 0, 8) + Call(ClearAmbientSounds, 250) + Call(MakeTransformGroup, MODEL_g14) + Call(EnableTexPanning, MODEL_o61, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( -80, 140, 80, -100) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; diff --git a/src/world/area_jan/jan_06/jan_06_2_statue.c b/src/world/area_jan/jan_06/jan_06_2_statue.c index ab829903eb6..5c32fc09cdb 100644 --- a/src/world/area_jan/jan_06/jan_06_2_statue.c +++ b/src/world/area_jan/jan_06/jan_06_2_statue.c @@ -8,46 +8,46 @@ s32 N(JadeRavenList)[] = { }; EvtScript N(EVS_MoveStatue) = { - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 25, EVT_FLOAT(0.8)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 25, EVT_FLOAT(0.7)) - EVT_END_THREAD - EVT_CALL(MakeLerp, 1, 5, 50, EASING_CUBIC_IN) - EVT_SET(LVar2, 1) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_MUL(LVar2, -1) - EVT_SET(LVar3, LVar2) - EVT_MUL(LVar3, LVar0) - EVT_CALL(TranslateGroup, MODEL_g11, LVar3, 0, 0) - EVT_CALL(RotateGroup, MODEL_g11, 0, 0, 1, 0) - EVT_CALL(SetItemPos, MV_JadeRavenItemIdx, LVar3, 15, -400) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 25, EVT_FLOAT(0.6)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 25, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 25, EVT_FLOAT(0.4)) - EVT_END_THREAD - EVT_CALL(MakeLerp, 5, 0, 75, EASING_CUBIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_MUL(LVar2, -1) - EVT_SET(LVar3, LVar2) - EVT_MUL(LVar3, LVar0) - EVT_CALL(TranslateGroup, MODEL_g11, LVar3, 0, 0) - EVT_CALL(RotateGroup, MODEL_g11, 0, 0, 1, 0) - EVT_CALL(SetItemPos, MV_JadeRavenItemIdx, LVar3, 15, -400) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 25, Float(0.8)) + Call(ShakeCam, CAM_DEFAULT, 0, 25, Float(0.7)) + EndThread + Call(MakeLerp, 1, 5, 50, EASING_CUBIC_IN) + Set(LVar2, 1) + Loop(0) + Call(UpdateLerp) + Mul(LVar2, -1) + Set(LVar3, LVar2) + Mul(LVar3, LVar0) + Call(TranslateGroup, MODEL_g11, LVar3, 0, 0) + Call(RotateGroup, MODEL_g11, 0, 0, 1, 0) + Call(SetItemPos, MV_JadeRavenItemIdx, LVar3, 15, -400) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 25, Float(0.6)) + Call(ShakeCam, CAM_DEFAULT, 0, 25, Float(0.5)) + Call(ShakeCam, CAM_DEFAULT, 0, 25, Float(0.4)) + EndThread + Call(MakeLerp, 5, 0, 75, EASING_CUBIC_OUT) + Loop(0) + Call(UpdateLerp) + Mul(LVar2, -1) + Set(LVar3, LVar2) + Mul(LVar3, LVar0) + Call(TranslateGroup, MODEL_g11, LVar3, 0, 0) + Call(RotateGroup, MODEL_g11, 0, 0, 1, 0) + Call(SetItemPos, MV_JadeRavenItemIdx, LVar3, 15, -400) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; API_CALLABLE(N(AdjustEnvSoundPosition)) { @@ -62,81 +62,81 @@ API_CALLABLE(N(AdjustEnvSoundPosition)) { } EvtScript N(PlayMovingStatueSound) = { - EVT_LOOP(0) - EVT_CALL(GetModelCenter, MODEL_o162) - EVT_CALL(N(AdjustEnvSoundPosition), LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetModelCenter, MODEL_o162) + Call(N(AdjustEnvSoundPosition), LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_Scene_MoveStatue) = { - EVT_CALL(PlaySound, SOUND_LOOP_MOVE_LARGE_STATUE) - EVT_EXEC_WAIT(N(EVS_MoveStatue)) - EVT_CALL(GetModelCenter, MODEL_o162) - EVT_CALL(PlaySoundAt, SOUND_LOOP_MOVE_STATUE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_EXEC_GET_TID(N(PlayMovingStatueSound), LVar9) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 180, EVT_FLOAT(0.4)) - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, -100, 180, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g11, LVar0, 0, 0) - EVT_CALL(RotateGroup, MODEL_g11, 0, 0, 1, 0) - EVT_CALL(SetItemPos, MV_JadeRavenItemIdx, LVar0, 15, -400) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 15, EVT_FLOAT(1.0)) - EVT_KILL_THREAD(LVar9) - EVT_CALL(StopSound, SOUND_LOOP_MOVE_STATUE) - EVT_CALL(StopSound, SOUND_LOOP_MOVE_LARGE_STATUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o166, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o247, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o180, COLLIDER_FLAGS_UPPER_MASK) - EVT_WAIT(10) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_RETURN - EVT_END + Call(PlaySound, SOUND_LOOP_MOVE_LARGE_STATUE) + ExecWait(N(EVS_MoveStatue)) + Call(GetModelCenter, MODEL_o162) + Call(PlaySoundAt, SOUND_LOOP_MOVE_STATUE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + ExecGetTID(N(PlayMovingStatueSound), LVar9) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 180, Float(0.4)) + EndThread + Call(MakeLerp, 0, -100, 180, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g11, LVar0, 0, 0) + Call(RotateGroup, MODEL_g11, 0, 0, 1, 0) + Call(SetItemPos, MV_JadeRavenItemIdx, LVar0, 15, -400) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(ShakeCam, CAM_DEFAULT, 0, 15, Float(1.0)) + KillThread(LVar9) + Call(StopSound, SOUND_LOOP_MOVE_STATUE) + Call(StopSound, SOUND_LOOP_MOVE_LARGE_STATUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o166, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o247, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o180, COLLIDER_FLAGS_UPPER_MASK) + Wait(10) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Return + End }; EvtScript N(ItemPrompt_Statue) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_LE(LVar0, 0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_RaphaelStatue, 160, 40) - EVT_END_IF - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(MakeItemEntity, ITEM_JADE_RAVEN, 0, 15, -400, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(MV_JadeRavenItemIdx, LVar0) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_PlaceItem | SPRITE_ID_BACK_FACING) - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Still) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_Scene_MoveStatue)) - EVT_SET(GB_StoryProgress, STORY_CH5_MOVED_RAVEN_STATUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(ShowKeyChoicePopup) + IfLe(LVar0, 0) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_Inspect_RaphaelStatue, 160, 40) + EndIf + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(RemoveKeyItemAt, LVar1) + Call(MakeItemEntity, ITEM_JADE_RAVEN, 0, 15, -400, ITEM_SPAWN_MODE_DECORATION, 0) + Set(MV_JadeRavenItemIdx, LVar0) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Call(SetPlayerAnimation, ANIM_MarioW1_PlaceItem | SPRITE_ID_BACK_FACING) + Wait(20) + Call(SetPlayerAnimation, ANIM_Mario1_Still) + Wait(10) + ExecWait(N(EVS_Scene_MoveStatue)) + Set(GB_StoryProgress, STORY_CH5_MOVED_RAVEN_STATUE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SetupStatue) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH5_MOVED_RAVEN_STATUE) - EVT_BIND_PADLOCK(EVT_PTR(N(ItemPrompt_Statue)), TRIGGER_WALL_PRESS_A, COLLIDER_o166, EVT_PTR(N(JadeRavenList)), 0, 1) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH5_MOVED_RAVEN_STATUE) + BindPadlock(Ref(N(ItemPrompt_Statue)), TRIGGER_WALL_PRESS_A, COLLIDER_o166, Ref(N(JadeRavenList)), 0, 1) + EndIf + Return + End }; diff --git a/src/world/area_jan/jan_06/jan_06_3_log.c b/src/world/area_jan/jan_06/jan_06_3_log.c index 6bc50b2ab2f..4859431a473 100644 --- a/src/world/area_jan/jan_06/jan_06_3_log.c +++ b/src/world/area_jan/jan_06/jan_06_3_log.c @@ -3,153 +3,153 @@ #include "sprite/player.h" EvtScript N(EVS_SetupLogObjects) = { - EVT_IF_EQ(GF_JAN06_CreateLogBridge, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o169, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_o95, FALSE) - EVT_CALL(EnableModel, MODEL_o96, FALSE) - EVT_CALL(TranslateGroup, MODEL_g20, 0, -150, 0) - EVT_CALL(TranslateGroup, MODEL_g21, 0, -150, 0) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o167, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o168, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o169, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_o95, TRUE) - EVT_CALL(EnableModel, MODEL_o96, TRUE) - EVT_CALL(TranslateGroup, MODEL_g20, 0, 10, 0) - EVT_CALL(TranslateGroup, MODEL_g21, 0, 10, 0) - EVT_CALL(RotateGroup, MODEL_g20, -90, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_g21, -90, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_g20, 90, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_g21, -90, 0, 1, 0) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_JAN06_CreateLogBridge, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o169, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_o95, FALSE) + Call(EnableModel, MODEL_o96, FALSE) + Call(TranslateGroup, MODEL_g20, 0, -150, 0) + Call(TranslateGroup, MODEL_g21, 0, -150, 0) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o167, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o168, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o169, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_o95, TRUE) + Call(EnableModel, MODEL_o96, TRUE) + Call(TranslateGroup, MODEL_g20, 0, 10, 0) + Call(TranslateGroup, MODEL_g21, 0, 10, 0) + Call(RotateGroup, MODEL_g20, -90, 0, 0, 1) + Call(RotateGroup, MODEL_g21, -90, 0, 0, 1) + Call(RotateGroup, MODEL_g20, 90, 0, 1, 0) + Call(RotateGroup, MODEL_g21, -90, 0, 1, 0) + EndIf + Return + End }; EvtScript N(EVS_LogAnim_RiseUp) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_o167, SOUND_SMACK_TREE, 0) - EVT_CALL(MakeLerp, -150, -169, 5, EASING_QUARTIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g20, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_g21, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_o167, SOUND_SMACK_TREE, 0) + Call(MakeLerp, -150, -169, 5, EASING_QUARTIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g20, 0, LVar0, 0) + Call(TranslateGroup, MODEL_g21, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; #include "world/common/todo/UpdateLogShadow.inc.c" EvtScript N(EVS_LogAnim_FallDown) = { - EVT_THREAD - EVT_WAIT(17) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_CALL(N(UpdateLogShadow), 130, MF_KillLogShadow) - EVT_END_THREAD - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o167, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(MakeLerp, -169, 60, 30, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g20, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_g21, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(1) - EVT_CALL(MakeLerp, 60, 0, 30, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g20, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_g21, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o167, SOUND_JAN_LOG_LAND, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, -100, 0, 60, 0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 2, 3, 1) - EVT_RETURN - EVT_END + Thread + Wait(17) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Call(N(UpdateLogShadow), 130, MF_KillLogShadow) + EndThread + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o167, COLLIDER_FLAGS_UPPER_MASK) + Call(MakeLerp, -169, 60, 30, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g20, 0, LVar0, 0) + Call(TranslateGroup, MODEL_g21, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(1) + Call(MakeLerp, 60, 0, 30, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g20, 0, LVar0, 0) + Call(TranslateGroup, MODEL_g21, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(PlaySoundAtCollider, COLLIDER_o167, SOUND_JAN_LOG_LAND, 0) + PlayEffect(EFFECT_LANDING_DUST, 4, -100, 0, 60, 0) + Call(ShakeCam, CAM_DEFAULT, 2, 3, 1) + Return + End }; EvtScript N(EVS_LogAnim_FallOver) = { - EVT_THREAD - EVT_WAIT(50) - EVT_SET(MF_KillLogShadow, TRUE) - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, -90, 60, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g20, 0, 0, 0) - EVT_CALL(TranslateGroup, MODEL_g21, 0, 0, 0) - EVT_CALL(RotateGroup, MODEL_g20, LVar0, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_g21, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 2, 3, 1) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + Wait(50) + Set(MF_KillLogShadow, TRUE) + EndThread + Call(MakeLerp, 0, -90, 60, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g20, 0, 0, 0) + Call(TranslateGroup, MODEL_g21, 0, 0, 0) + Call(RotateGroup, MODEL_g20, LVar0, 0, 0, 1) + Call(RotateGroup, MODEL_g21, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Thread + Call(ShakeCam, CAM_DEFAULT, 2, 3, 1) + EndThread + Return + End }; EvtScript N(EVS_LogAnim_Split) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_o167, SOUND_JAN_LOG_SPLIT, 0) - EVT_CALL(EnableModel, MODEL_o95, TRUE) - EVT_CALL(EnableModel, MODEL_o96, TRUE) - EVT_CALL(MakeLerp, 0, 90, 30, EASING_COS_FAST_OVERSHOOT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(LVar2, LVar0) - EVT_DIVF(LVar2, 9) - EVT_CALL(TranslateGroup, MODEL_g20, 0, LVar2, 0) - EVT_CALL(TranslateGroup, MODEL_g21, 0, LVar2, 0) - EVT_CALL(RotateGroup, MODEL_g20, -90, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_g21, -90, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_g20, LVar0, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_g21, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_o167, SOUND_JAN_LOG_SPLIT, 0) + Call(EnableModel, MODEL_o95, TRUE) + Call(EnableModel, MODEL_o96, TRUE) + Call(MakeLerp, 0, 90, 30, EASING_COS_FAST_OVERSHOOT) + Loop(0) + Call(UpdateLerp) + Set(LVar2, LVar0) + DivF(LVar2, 9) + Call(TranslateGroup, MODEL_g20, 0, LVar2, 0) + Call(TranslateGroup, MODEL_g21, 0, LVar2, 0) + Call(RotateGroup, MODEL_g20, -90, 0, 0, 1) + Call(RotateGroup, MODEL_g21, -90, 0, 0, 1) + Call(RotateGroup, MODEL_g20, LVar0, 0, 1, 0) + Call(RotateGroup, MODEL_g21, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_Smash_BuriedLog) = { - EVT_SET(GF_JAN06_CreateLogBridge, TRUE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC_WAIT(N(EVS_LogAnim_RiseUp)) - EVT_WAIT(1) - EVT_EXEC_WAIT(N(EVS_LogAnim_FallDown)) - EVT_WAIT(1) - EVT_EXEC_WAIT(N(EVS_LogAnim_FallOver)) - EVT_WAIT(1) - EVT_EXEC_WAIT(N(EVS_LogAnim_Split)) - EVT_WAIT(1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_EXEC(N(EVS_SetupLogObjects)) - EVT_RETURN - EVT_END + Set(GF_JAN06_CreateLogBridge, TRUE) + Call(DisablePlayerInput, TRUE) + ExecWait(N(EVS_LogAnim_RiseUp)) + Wait(1) + ExecWait(N(EVS_LogAnim_FallDown)) + Wait(1) + ExecWait(N(EVS_LogAnim_FallOver)) + Wait(1) + ExecWait(N(EVS_LogAnim_Split)) + Wait(1) + Call(DisablePlayerInput, FALSE) + Exec(N(EVS_SetupLogObjects)) + Return + End }; EvtScript N(EVS_SetupLogs) = { - EVT_IF_EQ(GF_JAN06_CreateLogBridge, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Smash_BuriedLog)), TRIGGER_WALL_HAMMER, COLLIDER_o167, 1, 0) - EVT_END_IF - EVT_EXEC(N(EVS_SetupLogObjects)) - EVT_RETURN - EVT_END + IfEq(GF_JAN06_CreateLogBridge, FALSE) + BindTrigger(Ref(N(EVS_Smash_BuriedLog)), TRIGGER_WALL_HAMMER, COLLIDER_o167, 1, 0) + EndIf + Exec(N(EVS_SetupLogObjects)) + Return + End }; diff --git a/src/world/area_jan/jan_06/jan_06_4_trees.c b/src/world/area_jan/jan_06/jan_06_4_trees.c index 48ac8a5f72f..a85ef094ad5 100644 --- a/src/world/area_jan/jan_06/jan_06_4_trees.c +++ b/src/world/area_jan/jan_06/jan_06_4_trees.c @@ -63,12 +63,12 @@ BombTrigger N(BombPos_Tree2) = { }; EvtScript N(EVS_SetupTrees) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o183, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o185, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o183, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o185, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Return + End }; diff --git a/src/world/area_jan/jan_06/jan_06_5_entity.c b/src/world/area_jan/jan_06/jan_06_5_entity.c index cf26303439d..6f5b9cc14f6 100644 --- a/src/world/area_jan/jan_06/jan_06_5_entity.c +++ b/src/world/area_jan/jan_06/jan_06_5_entity.c @@ -2,8 +2,8 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_PinkFlower), 84, 0, -320, 5, MAKE_ENTITY_END) - EVT_CALL(MakeItemEntity, ITEM_COIN, 285, -60, 220, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_JAN06_Item_Coin) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_PinkFlower), 84, 0, -320, 5, MAKE_ENTITY_END) + Call(MakeItemEntity, ITEM_COIN, 285, -60, 220, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_JAN06_Item_Coin) + Return + End }; diff --git a/src/world/area_jan/jan_06/jan_06_7_bushes.c b/src/world/area_jan/jan_06/jan_06_7_bushes.c index cc8d7e5d68b..4140dfbf33e 100644 --- a/src/world/area_jan/jan_06/jan_06_7_bushes.c +++ b/src/world/area_jan/jan_06/jan_06_7_bushes.c @@ -201,34 +201,34 @@ SearchBushConfig N(SearchBush_Bush14) = { }; EvtScript N(EVS_SetupBushes) = { - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o232, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o233, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o234, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush4))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o235, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush5))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o236, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush6))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o237, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush7))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o238, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush8))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o239, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush9))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o240, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush10))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o241, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush11))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o242, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush12))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o243, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush13))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o244, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush14))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o245, 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(SearchBush_Bush1))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o232, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush2))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o233, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush3))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o234, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush4))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o235, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush5))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o236, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush6))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o237, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush7))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o238, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush8))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o239, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush9))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o240, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush10))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o241, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush11))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o242, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush12))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o243, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush13))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o244, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush14))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o245, 1, 0) + Return + End }; diff --git a/src/world/area_jan/jan_07/jan_07_1_music.c b/src/world/area_jan/jan_07/jan_07_1_music.c index 524dc858af1..fd687fe8374 100644 --- a/src/world/area_jan/jan_07/jan_07_1_music.c +++ b/src/world/area_jan/jan_07/jan_07_1_music.c @@ -1,8 +1,8 @@ #include "jan_07.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_JADE_JUNGLE, 0, 8) - EVT_CALL(ClearAmbientSounds, 250) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_JADE_JUNGLE, 0, 8) + Call(ClearAmbientSounds, 250) + Return + End }; diff --git a/src/world/area_jan/jan_07/jan_07_2_main.c b/src/world/area_jan/jan_07/jan_07_2_main.c index a8ca89db1c2..627757459a5 100644 --- a/src/world/area_jan/jan_07/jan_07_2_main.c +++ b/src/world/area_jan/jan_07/jan_07_2_main.c @@ -5,22 +5,22 @@ EvtScript N(EVS_ExitWalk_jan_06_1) = EVT_EXIT_WALK(60, jan_07_ENTRY_0, "jan_06", MAP_RODATA_PAD(1, exits); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_06_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_jan_06_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_JADE_JUNGLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_SetupTrees)) - EVT_EXEC(N(EVS_SetupBushes)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_JADE_JUNGLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Exec(N(EVS_SetupTrees)) + Exec(N(EVS_SetupBushes)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_jan/jan_07/jan_07_3_npc.c b/src/world/area_jan/jan_07/jan_07_3_npc.c index 0c18f59f1d3..247c7a2b4e1 100644 --- a/src/world/area_jan/jan_07/jan_07_3_npc.c +++ b/src/world/area_jan/jan_07/jan_07_3_npc.c @@ -14,283 +14,283 @@ NpcSettings N(NpcSettings_PutridPiranha) = { #include "world/common/enemy/SpearGuy_Wander.inc.c" EvtScript N(EVS_YoshiKid_CryForHelp) = { - EVT_SET(AF_JAN_02, FALSE) - EVT_LOOP(0) - EVT_CALL(PlaySoundAtNpc, NPC_YoshiKid, SOUND_YOSHI_KID_CRY, SOUND_SPACE_DEFAULT) - EVT_WAIT(20) - EVT_IF_EQ(AF_JAN_02, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(AF_JAN_02, FALSE) + Loop(0) + Call(PlaySoundAtNpc, NPC_YoshiKid, SOUND_YOSHI_KID_CRY, SOUND_SPACE_DEFAULT) + Wait(20) + IfEq(AF_JAN_02, TRUE) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_YoshiKid) = { - EVT_IF_EQ(GF_JAN07_YoshiCriedForHelp, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH5_00B4, 320, 60) - EVT_CALL(PlaySoundAtPlayer, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, 0, EMOTE_EXCLAMATION, 0, 30, EMOTER_PLAYER, 0, 0, 0, 0) - EVT_CALL(PlaySoundAtNpc, NPC_PARTNER, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_PARTNER, EMOTE_EXCLAMATION, 0, 30, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(30) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -183, 50, -11) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 50, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 500) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 16, EVT_FLOAT(-6.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 3) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Yellow_Cry, ANIM_YoshiKid_Yellow_Cry, 5, MSG_CH5_00B5) - EVT_WAIT(10) - EVT_EXEC(N(EVS_YoshiKid_CryForHelp)) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_SET(GF_JAN07_YoshiCriedForHelp, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_LABEL(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 1) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -20, 0, 20) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -20, 0, 20) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) - EVT_CALL(NpcMoveTo, NPC_PARTNER, -55, 5, 30) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_SELF, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_END_THREAD - EVT_CALL(PlayerMoveTo, -20, 10, 25) - EVT_WAIT(15) - EVT_SET(AF_JAN_02, TRUE) - EVT_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 30, EMOTER_NPC, 0, 0, 0, 0) - EVT_END_THREAD - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_YoshiKid_Yellow_SadIdle) - EVT_WAIT(10) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_WAIT(30) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_WAIT(15) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_WAIT(10) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_EQ(LVar0, PARTNER_SUSHIE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Yellow_SadTalk, ANIM_YoshiKid_Yellow_SadIdle, 0, MSG_CH5_00B6) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Yellow_SadTalk, ANIM_YoshiKid_Yellow_SadIdle, 0, MSG_CH5_00B7) - EVT_END_IF - EVT_CALL(EndSpeech, NPC_SELF, ANIM_YoshiKid_Yellow_Talk, ANIM_YoshiKid_Yellow_Idle, 0) - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_YoshiKid_Yellow_Run) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, -150, 15, 0) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_SET(GF_JAN07_SavedYoshi, TRUE) - EVT_SET(LVar0, 0) - EVT_ADD(LVar0, GF_JAN05_SavedYoshi) - EVT_ADD(LVar0, GF_JAN07_SavedYoshi) - EVT_ADD(LVar0, GF_JAN08_SavedYoshi) - EVT_ADD(LVar0, GF_JAN10_SavedYoshi) - EVT_ADD(LVar0, GF_JAN11_SavedYoshi) - EVT_IF_EQ(LVar0, 5) - EVT_CALL(SetMusicTrack, 0, SONG_YOSHI_KIDS_FOUND, 0, 8) - EVT_SET(GB_StoryProgress, STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_ThumbsUp) - EVT_WAIT(120) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_ELSE - EVT_THREAD - EVT_WAIT(12) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_END_THREAD - EVT_WAIT(30) - EVT_END_IF - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.5)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + IfEq(GF_JAN07_YoshiCriedForHelp, FALSE) + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_CH5_00B4, 320, 60) + Call(PlaySoundAtPlayer, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, 0, EMOTE_EXCLAMATION, 0, 30, EMOTER_PLAYER, 0, 0, 0, 0) + Call(PlaySoundAtNpc, NPC_PARTNER, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_PARTNER, EMOTE_EXCLAMATION, 0, 30, EMOTER_NPC, 0, 0, 0, 0) + Wait(30) + Call(UseSettingsFrom, CAM_DEFAULT, -183, 50, -11) + Call(SetPanTarget, CAM_DEFAULT, 50, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, 500) + Call(SetCamPitch, CAM_DEFAULT, 16, Float(-6.0)) + Call(SetCamSpeed, CAM_DEFAULT, 3) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Yellow_Cry, ANIM_YoshiKid_Yellow_Cry, 5, MSG_CH5_00B5) + Wait(10) + Exec(N(EVS_YoshiKid_CryForHelp)) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Set(GF_JAN07_YoshiCriedForHelp, TRUE) + Call(DisablePlayerInput, FALSE) + EndIf + Label(0) + Call(GetSelfVar, 0, LVar0) + IfNe(LVar0, 1) + Wait(1) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, -20, 0, 20) + Call(SetPanTarget, CAM_DEFAULT, -20, 0, 20) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) + Call(NpcMoveTo, NPC_PARTNER, -55, 5, 30) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(NpcFaceNpc, NPC_PARTNER, NPC_SELF, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, FALSE) + Call(EnablePartnerAI) + EndThread + Call(PlayerMoveTo, -20, 10, 25) + Wait(15) + Set(AF_JAN_02, TRUE) + Thread + Call(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 30, EMOTER_NPC, 0, 0, 0, 0) + EndThread + Wait(30) + Call(SetNpcAnimation, NPC_SELF, ANIM_YoshiKid_Yellow_SadIdle) + Wait(10) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Wait(30) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Wait(15) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Wait(10) + Call(GetCurrentPartnerID, LVar0) + IfEq(LVar0, PARTNER_SUSHIE) + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Yellow_SadTalk, ANIM_YoshiKid_Yellow_SadIdle, 0, MSG_CH5_00B6) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Yellow_SadTalk, ANIM_YoshiKid_Yellow_SadIdle, 0, MSG_CH5_00B7) + EndIf + Call(EndSpeech, NPC_SELF, ANIM_YoshiKid_Yellow_Talk, ANIM_YoshiKid_Yellow_Idle, 0) + Thread + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_YoshiKid_Yellow_Run) + Call(SetNpcSpeed, NPC_SELF, Float(5.0)) + Call(NpcMoveTo, NPC_SELF, -150, 15, 0) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndThread + Set(GF_JAN07_SavedYoshi, TRUE) + Set(LVar0, 0) + Add(LVar0, GF_JAN05_SavedYoshi) + Add(LVar0, GF_JAN07_SavedYoshi) + Add(LVar0, GF_JAN08_SavedYoshi) + Add(LVar0, GF_JAN10_SavedYoshi) + Add(LVar0, GF_JAN11_SavedYoshi) + IfEq(LVar0, 5) + Call(SetMusicTrack, 0, SONG_YOSHI_KIDS_FOUND, 0, 8) + Set(GB_StoryProgress, STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + Call(SetPlayerAnimation, ANIM_Mario1_ThumbsUp) + Wait(120) + Exec(N(EVS_SetupMusic)) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Else + Thread + Wait(12) + Call(InterpPlayerYaw, 270, 0) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + EndThread + Wait(30) + EndIf + Call(ResetCam, CAM_DEFAULT, Float(4.5)) + Call(DisablePlayerInput, FALSE) + Call(RemoveNpc, NPC_SELF) + Return + End }; EvtScript N(EVS_NpcInit_YoshiKid) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH5_SUSHIE_JOINED_PARTY) - EVT_IF_EQ(GF_JAN07_SavedYoshi, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_YoshiKid_Yellow_Cry) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_YoshiKid))) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH5_SUSHIE_JOINED_PARTY) + IfEq(GF_JAN07_SavedYoshi, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_YoshiKid_Yellow_Cry) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_YoshiKid))) + Return + EndIf + EndIf + Call(RemoveNpc, NPC_SELF) + Return + End }; EvtScript N(EVS_NpcIdle_PutridPiranha) = { #if VERSION_PAL - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH, 1) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_PARTNER, 1) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH, 1) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_PARTNER, 1) #else - EVT_CHILD_THREAD - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, -190) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH, 1) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_PARTNER, 1) - EVT_ELSE - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH, 0) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_PARTNER, 0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD + ChildThread + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, -190) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH, 1) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_PARTNER, 1) + Else + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH, 0) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_PARTNER, 0) + EndIf + Wait(1) + EndLoop + EndChildThread #endif - EVT_CALL(SetNpcCollisionSize, NPC_PutridPiranha_01, 48, 40) - EVT_CALL(SetNpcCollisionSize, NPC_PutridPiranha_02, 48, 40) - EVT_CALL(AwaitPlayerApproach, 60, 20, 140) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(InterruptUsePartner) - EVT_END_IF - EVT_WAIT(5) - EVT_THREAD - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -60, 0, 20) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -50, 0, 20) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(InterpNpcYaw, NPC_PutridPiranha_01, 270, 0) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim04) - EVT_CALL(PlaySoundAtNpc, NPC_PutridPiranha_02, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_PutridPiranha_02, EMOTE_EXCLAMATION, 0, 38, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(3) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_01, ANIM_LargePiranha_Putrid_Anim04) - EVT_CALL(PlaySoundAtNpc, NPC_PutridPiranha_01, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_PutridPiranha_01, EMOTE_EXCLAMATION, 0, 35, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(35) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_01, ANIM_LargePiranha_Putrid_Anim01) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim01) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_01, ANIM_LargePiranha_Putrid_Anim04) - EVT_SET(LVar0, 0) - EVT_LOOP(15) - EVT_ADD(LVar0, 24) - EVT_CALL(SetNpcRotation, NPC_PutridPiranha_01, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAtNpc, NPC_PutridPiranha_01, SOUND_PIRANHA_SPIN_1, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_01, ANIM_LargePiranha_Putrid_Anim01) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim04) - EVT_SET(LVar0, 0) - EVT_LOOP(15) - EVT_ADD(LVar0, 24) - EVT_CALL(SetNpcRotation, NPC_PutridPiranha_02, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAtNpc, NPC_PutridPiranha_02, SOUND_PIRANHA_SPIN_1, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim01) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_01, ANIM_LargePiranha_Putrid_Anim04) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim04) - EVT_SET(LVar0, 0) - EVT_LOOP(12) - EVT_ADD(LVar0, 30) - EVT_CALL(SetNpcRotation, NPC_PutridPiranha_01, 0, LVar0, 0) - EVT_CALL(SetNpcRotation, NPC_PutridPiranha_02, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAtNpc, NPC_PutridPiranha_01, SOUND_PIRANHA_SPIN_2, SOUND_SPACE_DEFAULT) - EVT_SET(LVar0, 0) - EVT_LOOP(12) - EVT_ADD(LVar0, 30) - EVT_CALL(SetNpcRotation, NPC_PutridPiranha_01, 0, LVar0, 0) - EVT_CALL(SetNpcRotation, NPC_PutridPiranha_02, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAtNpc, NPC_PutridPiranha_01, SOUND_PIRANHA_SPIN_2, SOUND_SPACE_DEFAULT) - EVT_SET(LVar0, 0) - EVT_LOOP(12) - EVT_ADD(LVar0, 30) - EVT_CALL(SetNpcRotation, NPC_PutridPiranha_01, 0, LVar0, 0) - EVT_CALL(SetNpcRotation, NPC_PutridPiranha_02, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAtNpc, NPC_PutridPiranha_01, SOUND_PIRANHA_SPIN_2, SOUND_SPACE_DEFAULT) - EVT_LOOP(3) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtNpc, NPC_PutridPiranha_01, SOUND_PIRANHA_TENSE, SOUND_SPACE_DEFAULT) - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_01, ANIM_LargePiranha_Putrid_Anim05) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim05) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_01, ANIM_LargePiranha_Putrid_Anim06) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim06) - EVT_CALL(PlaySoundAtNpc, NPC_PutridPiranha_01, SOUND_PIRANHA_CHOMP, SOUND_SPACE_DEFAULT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_RETURN - EVT_END + Call(SetNpcCollisionSize, NPC_PutridPiranha_01, 48, 40) + Call(SetNpcCollisionSize, NPC_PutridPiranha_02, 48, 40) + Call(AwaitPlayerApproach, 60, 20, 140) + Call(DisablePlayerInput, TRUE) + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, 0) + Call(InterruptUsePartner) + EndIf + Wait(5) + Thread + Call(UseSettingsFrom, CAM_DEFAULT, -60, 0, 20) + Call(SetPanTarget, CAM_DEFAULT, -50, 0, 20) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Thread + Call(InterpNpcYaw, NPC_PutridPiranha_01, 270, 0) + EndThread + Call(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim04) + Call(PlaySoundAtNpc, NPC_PutridPiranha_02, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_PutridPiranha_02, EMOTE_EXCLAMATION, 0, 38, EMOTER_NPC, 0, 0, 0, 0) + Wait(3) + Call(SetNpcAnimation, NPC_PutridPiranha_01, ANIM_LargePiranha_Putrid_Anim04) + Call(PlaySoundAtNpc, NPC_PutridPiranha_01, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_PutridPiranha_01, EMOTE_EXCLAMATION, 0, 35, EMOTER_NPC, 0, 0, 0, 0) + Wait(35) + Call(SetNpcAnimation, NPC_PutridPiranha_01, ANIM_LargePiranha_Putrid_Anim01) + Call(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim01) + Wait(5) + Call(SetNpcAnimation, NPC_PutridPiranha_01, ANIM_LargePiranha_Putrid_Anim04) + Set(LVar0, 0) + Loop(15) + Add(LVar0, 24) + Call(SetNpcRotation, NPC_PutridPiranha_01, 0, LVar0, 0) + Wait(1) + EndLoop + Call(PlaySoundAtNpc, NPC_PutridPiranha_01, SOUND_PIRANHA_SPIN_1, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_PutridPiranha_01, ANIM_LargePiranha_Putrid_Anim01) + Wait(5) + Call(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim04) + Set(LVar0, 0) + Loop(15) + Add(LVar0, 24) + Call(SetNpcRotation, NPC_PutridPiranha_02, 0, LVar0, 0) + Wait(1) + EndLoop + Call(PlaySoundAtNpc, NPC_PutridPiranha_02, SOUND_PIRANHA_SPIN_1, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim01) + Wait(5) + Call(SetNpcAnimation, NPC_PutridPiranha_01, ANIM_LargePiranha_Putrid_Anim04) + Call(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim04) + Set(LVar0, 0) + Loop(12) + Add(LVar0, 30) + Call(SetNpcRotation, NPC_PutridPiranha_01, 0, LVar0, 0) + Call(SetNpcRotation, NPC_PutridPiranha_02, 0, LVar0, 0) + Wait(1) + EndLoop + Call(PlaySoundAtNpc, NPC_PutridPiranha_01, SOUND_PIRANHA_SPIN_2, SOUND_SPACE_DEFAULT) + Set(LVar0, 0) + Loop(12) + Add(LVar0, 30) + Call(SetNpcRotation, NPC_PutridPiranha_01, 0, LVar0, 0) + Call(SetNpcRotation, NPC_PutridPiranha_02, 0, LVar0, 0) + Wait(1) + EndLoop + Call(PlaySoundAtNpc, NPC_PutridPiranha_01, SOUND_PIRANHA_SPIN_2, SOUND_SPACE_DEFAULT) + Set(LVar0, 0) + Loop(12) + Add(LVar0, 30) + Call(SetNpcRotation, NPC_PutridPiranha_01, 0, LVar0, 0) + Call(SetNpcRotation, NPC_PutridPiranha_02, 0, LVar0, 0) + Wait(1) + EndLoop + Call(PlaySoundAtNpc, NPC_PutridPiranha_01, SOUND_PIRANHA_SPIN_2, SOUND_SPACE_DEFAULT) + Loop(3) + Wait(5) + Call(PlaySoundAtNpc, NPC_PutridPiranha_01, SOUND_PIRANHA_TENSE, SOUND_SPACE_DEFAULT) + EndLoop + Call(SetNpcAnimation, NPC_PutridPiranha_01, ANIM_LargePiranha_Putrid_Anim05) + Call(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim05) + Wait(20) + Call(SetNpcAnimation, NPC_PutridPiranha_01, ANIM_LargePiranha_Putrid_Anim06) + Call(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim06) + Call(PlaySoundAtNpc, NPC_PutridPiranha_01, SOUND_PIRANHA_CHOMP, SOUND_SPACE_DEFAULT) + Call(DisablePlayerInput, FALSE) + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Return + End }; EvtScript N(EVS_NpcDefeat_PutridPiranha) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -20, 0, 20) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -20, 0, 20) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(500.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(SetNpcVar, NPC_YoshiKid, 0, 1) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, -20, 0, 20) + Call(SetPanTarget, CAM_DEFAULT, -20, 0, 20) + Call(SetCamDistance, CAM_DEFAULT, Float(500.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(SetNpcVar, NPC_YoshiKid, 0, 1) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_PutridPiranha) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH5_SUSHIE_JOINED_PARTY) - EVT_IF_EQ(GF_JAN07_SavedYoshi, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_PutridPiranha))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_PutridPiranha))) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(RemoveEncounter, NPC_SELF) - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH5_SUSHIE_JOINED_PARTY) + IfEq(GF_JAN07_SavedYoshi, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_PutridPiranha))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_PutridPiranha))) + Return + EndIf + EndIf + Call(RemoveEncounter, NPC_SELF) + Return + End }; EvtScript N(EVS_NpcInit_SpearGuy_Hitbox) = { - EVT_IF_EQ(GF_JAN07_SavedYoshi, FALSE) - EVT_CALL(RemoveNpc, NPC_SpearGuy) - EVT_CALL(RemoveNpc, NPC_SpearGuy_Hitbox) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_JAN07_SavedYoshi, FALSE) + Call(RemoveNpc, NPC_SpearGuy) + Call(RemoveNpc, NPC_SpearGuy_Hitbox) + EndIf + Return + End }; NpcData N(NpcData_SpearGuy)[] = { diff --git a/src/world/area_jan/jan_07/jan_07_4_trees.c b/src/world/area_jan/jan_07/jan_07_4_trees.c index ecb1597d847..5875ed3b0e5 100644 --- a/src/world/area_jan/jan_07/jan_07_4_trees.c +++ b/src/world/area_jan/jan_07/jan_07_4_trees.c @@ -40,9 +40,9 @@ BombTrigger N(BombPos_Tree1) = { }; EvtScript N(EVS_SetupTrees) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o62, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o62, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Return + End }; diff --git a/src/world/area_jan/jan_07/jan_07_5_bushes.c b/src/world/area_jan/jan_07/jan_07_5_bushes.c index c59d07a7ab5..66af8ced03d 100644 --- a/src/world/area_jan/jan_07/jan_07_5_bushes.c +++ b/src/world/area_jan/jan_07/jan_07_5_bushes.c @@ -61,14 +61,14 @@ SearchBushConfig N(SearchBush_Bush4) = { }; EvtScript N(EVS_SetupBushes) = { - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o65, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o66, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o67, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush4))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o68, 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(SearchBush_Bush1))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o65, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush2))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o66, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush3))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o67, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush4))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o68, 1, 0) + Return + End }; diff --git a/src/world/area_jan/jan_08/jan_08_1_music.c b/src/world/area_jan/jan_08/jan_08_1_music.c index e1bb07b2a9f..8ceaa49b4a0 100644 --- a/src/world/area_jan/jan_08/jan_08_1_music.c +++ b/src/world/area_jan/jan_08/jan_08_1_music.c @@ -1,8 +1,8 @@ #include "jan_08.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_JADE_JUNGLE, 0, 8) - EVT_CALL(ClearAmbientSounds, 250) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_JADE_JUNGLE, 0, 8) + Call(ClearAmbientSounds, 250) + Return + End }; diff --git a/src/world/area_jan/jan_08/jan_08_2_main.c b/src/world/area_jan/jan_08/jan_08_2_main.c index 28b0d64a52a..80d1fed7ac5 100644 --- a/src/world/area_jan/jan_08/jan_08_2_main.c +++ b/src/world/area_jan/jan_08/jan_08_2_main.c @@ -9,42 +9,42 @@ EvtScript N(EVS_ExitWalk_jan_09_0) = EVT_EXIT_WALK(60, jan_08_ENTRY_2, "jan_09", MAP_RODATA_PAD(1, exits); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_00_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_05_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_o221, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_09_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_jan_00_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_jan_05_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_o221, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_jan_09_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_JADE_JUNGLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o79, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o81, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o79, COLLIDER_FLAG_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o81, COLLIDER_FLAG_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1, SURFACE_TYPE_WATER) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_odeilie, SURFACE_TYPE_WATER) - EVT_EXEC(N(EVS_SetupBushes)) - EVT_EXEC(N(EVS_SetupTrees)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitn, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitsw, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(MakeTransformGroup, MODEL_g40) - EVT_CALL(EnableTexPanning, MODEL_o111, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_JADE_JUNGLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o79, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o81, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o79, COLLIDER_FLAG_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o81, COLLIDER_FLAG_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1, SURFACE_TYPE_WATER) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_odeilie, SURFACE_TYPE_WATER) + Exec(N(EVS_SetupBushes)) + Exec(N(EVS_SetupTrees)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitn, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitsw, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Exec(N(EVS_SetupMusic)) + Call(MakeTransformGroup, MODEL_g40) + Call(EnableTexPanning, MODEL_o111, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( -80, 140, 80, -100) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; diff --git a/src/world/area_jan/jan_08/jan_08_3_bushes.c b/src/world/area_jan/jan_08/jan_08_3_bushes.c index dcb9f78ab71..4d360361a4e 100644 --- a/src/world/area_jan/jan_08/jan_08_3_bushes.c +++ b/src/world/area_jan/jan_08/jan_08_3_bushes.c @@ -11,78 +11,78 @@ EvtScript N(EVS_MoveBush_Separate) = EVT_MOVE_BUSHES(COLLIDER_o70, MODEL_o67, MODEL_o68, MV_Unk_00, MV_Unk_01); EvtScript N(EVS_Inspect_SeparateBushes) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o70, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_MoveBush_Separate)) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(MakeLerp, 0, 45, 30, EASING_CUBIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(MV_Unk_01, LVar0) - EVT_SETF(MV_Unk_00, MV_Unk_01) - EVT_MULF(MV_Unk_00, -1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o70, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_MoveBush_Separate)) + Call(DisablePlayerInput, TRUE) + Call(MakeLerp, 0, 45, 30, EASING_CUBIC_OUT) + Loop(0) + Call(UpdateLerp) + SetF(MV_Unk_01, LVar0) + SetF(MV_Unk_00, MV_Unk_01) + MulF(MV_Unk_00, -1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Inspect_FlipBush) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o88, SOUND_SEARCH_BUSH, 0) - EVT_LOOP(3) - EVT_CALL(N(MoveBush_AnimateShearing), LVar1, 1) - EVT_WAIT(1) - EVT_CALL(N(MoveBush_AnimateShearing), LVar1, 0) - EVT_WAIT(1) - EVT_CALL(N(MoveBush_AnimateShearing), LVar1, -1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(TranslateModel, LVar1, 0, 0, 0) - EVT_IF_EQ(GB_StoryProgress, STORY_CH5_SUSHIE_JOINED_PARTY) - EVT_IF_EQ(GF_JAN08_SavedYoshi, FALSE) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_CALL(NpcMoveTo, NPC_PARTNER, -315, LVar5, 20) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_YoshiKid, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_END_THREAD - EVT_CALL(PlayerMoveTo, -340, LVar5, 20) - EVT_CALL(PlayerFaceNpc, NPC_YoshiKid, FALSE) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o88, SOUND_SEPARATE_BUSHES, 0) - EVT_SET(LVar3, 0) - EVT_LOOP(10) - EVT_ADD(LVar3, 9) - EVT_CALL(RotateModel, LVar1, LVar3, 0, 1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(LVar4, 270) - EVT_CALL(SetNpcRotation, NPC_YoshiKid, 0, LVar4, 0) - EVT_CALL(SetNpcPos, NPC_YoshiKid, -391, 0, -144) - EVT_CALL(SetNpcFlagBits, NPC_YoshiKid, NPC_FLAG_INVISIBLE | NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_LOOP(10) - EVT_ADD(LVar3, 9) - EVT_CALL(RotateModel, LVar1, LVar3, 0, 1, 0) - EVT_ADD(LVar4, 9) - EVT_CALL(SetNpcRotation, NPC_YoshiKid, 0, LVar4, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EnableNpcShadow, NPC_YoshiKid, TRUE) - EVT_CALL(PlayerFaceNpc, NPC_YoshiKid, FALSE) - EVT_WAIT(20) - EVT_CALL(SetNpcVar, NPC_YoshiKid, 0, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(PlaySoundAtCollider, COLLIDER_o88, SOUND_SEARCH_BUSH, 0) + Loop(3) + Call(N(MoveBush_AnimateShearing), LVar1, 1) + Wait(1) + Call(N(MoveBush_AnimateShearing), LVar1, 0) + Wait(1) + Call(N(MoveBush_AnimateShearing), LVar1, -1) + Wait(1) + EndLoop + Call(TranslateModel, LVar1, 0, 0, 0) + IfEq(GB_StoryProgress, STORY_CH5_SUSHIE_JOINED_PARTY) + IfEq(GF_JAN08_SavedYoshi, FALSE) + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Thread + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Call(NpcMoveTo, NPC_PARTNER, -315, LVar5, 20) + Call(NpcFaceNpc, NPC_PARTNER, NPC_YoshiKid, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, FALSE) + Call(EnablePartnerAI) + EndThread + Call(PlayerMoveTo, -340, LVar5, 20) + Call(PlayerFaceNpc, NPC_YoshiKid, FALSE) + Wait(10) + Call(PlaySoundAtCollider, COLLIDER_o88, SOUND_SEPARATE_BUSHES, 0) + Set(LVar3, 0) + Loop(10) + Add(LVar3, 9) + Call(RotateModel, LVar1, LVar3, 0, 1, 0) + Wait(1) + EndLoop + Set(LVar4, 270) + Call(SetNpcRotation, NPC_YoshiKid, 0, LVar4, 0) + Call(SetNpcPos, NPC_YoshiKid, -391, 0, -144) + Call(SetNpcFlagBits, NPC_YoshiKid, NPC_FLAG_INVISIBLE | NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Loop(10) + Add(LVar3, 9) + Call(RotateModel, LVar1, LVar3, 0, 1, 0) + Add(LVar4, 9) + Call(SetNpcRotation, NPC_YoshiKid, 0, LVar4, 0) + Wait(1) + EndLoop + Call(EnableNpcShadow, NPC_YoshiKid, TRUE) + Call(PlayerFaceNpc, NPC_YoshiKid, FALSE) + Wait(20) + Call(SetNpcVar, NPC_YoshiKid, 0, 1) + EndIf + EndIf + Call(DisablePlayerInput, FALSE) + Return + End }; FoliageModelList N(Bush1_BushModels) = FOLIAGE_MODEL_LIST(MODEL_o59);; @@ -280,33 +280,33 @@ SearchBushConfig N(SearchBush_Bush12) = { }; EvtScript N(EVS_SetupBushes) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Inspect_SeparateBushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o70, 1, 0) - EVT_SET(LVar1, MODEL_o64) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_Inspect_FlipBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o88, 0, 0, 1) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o59, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o209, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o210, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush4))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o211, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush5))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o212, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush6))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o213, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush7))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o214, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush8))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o215, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush9))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o216, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush10))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o217, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush11))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o218, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush12))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o219, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_Inspect_SeparateBushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o70, 1, 0) + Set(LVar1, MODEL_o64) + BindPadlock(Ref(N(EVS_Inspect_FlipBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o88, 0, 0, 1) + Set(LVar0, Ref(N(SearchBush_Bush1))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o59, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush2))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o209, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush3))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o210, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush4))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o211, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush5))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o212, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush6))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o213, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush7))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o214, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush8))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o215, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush9))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o216, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush10))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o217, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush11))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o218, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush12))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o219, 1, 0) + Return + End }; diff --git a/src/world/area_jan/jan_08/jan_08_4_entity.c b/src/world/area_jan/jan_08/jan_08_4_entity.c index 030b70db601..6d073ef9688 100644 --- a/src/world/area_jan/jan_08/jan_08_4_entity.c +++ b/src/world/area_jan/jan_08/jan_08_4_entity.c @@ -7,13 +7,13 @@ EvtScript N(EVS_MakeEntities) = { EVT_MAKE_SUPER_BLOCK(250, 60, 300, 0) - EVT_CALL(MakeItemEntity, ITEM_COIN, 75, -60, 90, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_JAN08_Item_CoinA) - EVT_CALL(MakeItemEntity, ITEM_COIN, 100, -60, 90, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_JAN08_Item_CoinB) - EVT_CALL(MakeItemEntity, ITEM_COIN, 125, -60, 90, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_JAN08_Item_CoinC) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BellbellPlant), 54, 0, -380, 35, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 24, 60, -410, 0, ITEM_THUNDER_RAGE, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_JAN08_HiddenItem_ThunderRage) - EVT_CALL(MakeEntity, EVT_PTR(Entity_TrumpetPlant), -450, 0, 166, 170, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_COIN, 75, -60, 90, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_JAN08_Item_CoinA) + Call(MakeItemEntity, ITEM_COIN, 100, -60, 90, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_JAN08_Item_CoinB) + Call(MakeItemEntity, ITEM_COIN, 125, -60, 90, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_JAN08_Item_CoinC) + Call(MakeEntity, Ref(Entity_BellbellPlant), 54, 0, -380, 35, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 24, 60, -410, 0, ITEM_THUNDER_RAGE, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_JAN08_HiddenItem_ThunderRage) + Call(MakeEntity, Ref(Entity_TrumpetPlant), -450, 0, 166, 170, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_jan/jan_08/jan_08_5_npc.c b/src/world/area_jan/jan_08/jan_08_5_npc.c index c4848cc0d01..90bdda186e6 100644 --- a/src/world/area_jan/jan_08/jan_08_5_npc.c +++ b/src/world/area_jan/jan_08/jan_08_5_npc.c @@ -9,136 +9,136 @@ #include "world/common/enemy/SpearGuy_Wander.inc.c" EvtScript N(EVS_YoshiKid_CryForHelp) = { - EVT_SET(AF_JAN_02, FALSE) - EVT_LOOP(0) - EVT_CALL(PlaySoundAtNpc, NPC_YoshiKid, SOUND_YOSHI_KID_CRY, SOUND_SPACE_DEFAULT) - EVT_WAIT(20) - EVT_IF_EQ(AF_JAN_02, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(AF_JAN_02, FALSE) + Loop(0) + Call(PlaySoundAtNpc, NPC_YoshiKid, SOUND_YOSHI_KID_CRY, SOUND_SPACE_DEFAULT) + Wait(20) + IfEq(AF_JAN_02, TRUE) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_YoshiKid) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_IF_LE(LVar1, -90) - EVT_IF_GT(LVar3, 280) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, jan_08_ENTRY_0) - EVT_WAIT(18) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH5_00AF, 160, 40) - EVT_EXEC(N(EVS_YoshiKid_CryForHelp)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_SET(LVar0, 1) - EVT_END_IF - EVT_END_IF - EVT_IF_NE(LVar0, 1) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_LABEL(10) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4.0), -23, 350, EVT_FLOAT(17.0), EVT_FLOAT(-7.0)) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_SET(AF_JAN_02, TRUE) - EVT_WAIT(15) - EVT_IF_EQ(LVar0, PARTNER_SUSHIE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Red_SadTalk, ANIM_YoshiKid_Red_SadIdle, 0, MSG_CH5_00B0) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Red_SadTalk, ANIM_YoshiKid_Red_SadIdle, 0, MSG_CH5_00B1) - EVT_END_IF - EVT_CALL(EndSpeech, NPC_SELF, ANIM_YoshiKid_Red_Talk, ANIM_YoshiKid_Red_Idle, 0) - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_YoshiKid_Red_Run) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, -418, -60, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, -300, 80, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, -320, 115, 0) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_SET(GF_JAN08_SavedYoshi, TRUE) - EVT_SET(LVar0, 0) - EVT_ADD(LVar0, GF_JAN05_SavedYoshi) - EVT_ADD(LVar0, GF_JAN07_SavedYoshi) - EVT_ADD(LVar0, GF_JAN08_SavedYoshi) - EVT_ADD(LVar0, GF_JAN10_SavedYoshi) - EVT_ADD(LVar0, GF_JAN11_SavedYoshi) - EVT_IF_EQ(LVar0, 5) - EVT_CALL(SetMusicTrack, 0, SONG_YOSHI_KIDS_FOUND, 0, 8) - EVT_SET(GB_StoryProgress, STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_ThumbsUp) - EVT_WAIT(120) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_ELSE - EVT_WAIT(40) - EVT_END_IF - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Label(0) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + IfLe(LVar1, -90) + IfGt(LVar3, 280) + Call(GetEntryID, LVar0) + IfEq(LVar0, jan_08_ENTRY_0) + Wait(18) + EndIf + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_CH5_00AF, 160, 40) + Exec(N(EVS_YoshiKid_CryForHelp)) + Call(DisablePlayerInput, FALSE) + Set(LVar0, 1) + EndIf + EndIf + IfNe(LVar0, 1) + Wait(1) + Goto(0) + EndIf + Label(10) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Wait(1) + Goto(10) + EndIf + Call(DisablePlayerInput, TRUE) + Call(AdjustCam, CAM_DEFAULT, Float(4.0), -23, 350, Float(17.0), Float(-7.0)) + Call(NpcFacePlayer, NPC_SELF, 0) + Call(GetCurrentPartnerID, LVar0) + Set(AF_JAN_02, TRUE) + Wait(15) + IfEq(LVar0, PARTNER_SUSHIE) + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Red_SadTalk, ANIM_YoshiKid_Red_SadIdle, 0, MSG_CH5_00B0) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Red_SadTalk, ANIM_YoshiKid_Red_SadIdle, 0, MSG_CH5_00B1) + EndIf + Call(EndSpeech, NPC_SELF, ANIM_YoshiKid_Red_Talk, ANIM_YoshiKid_Red_Idle, 0) + Thread + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_YoshiKid_Red_Run) + Call(SetNpcSpeed, NPC_SELF, Float(5.0)) + Call(NpcMoveTo, NPC_SELF, -418, -60, 0) + Call(NpcMoveTo, NPC_SELF, -300, 80, 0) + Call(NpcMoveTo, NPC_SELF, -320, 115, 0) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndThread + Set(GF_JAN08_SavedYoshi, TRUE) + Set(LVar0, 0) + Add(LVar0, GF_JAN05_SavedYoshi) + Add(LVar0, GF_JAN07_SavedYoshi) + Add(LVar0, GF_JAN08_SavedYoshi) + Add(LVar0, GF_JAN10_SavedYoshi) + Add(LVar0, GF_JAN11_SavedYoshi) + IfEq(LVar0, 5) + Call(SetMusicTrack, 0, SONG_YOSHI_KIDS_FOUND, 0, 8) + Set(GB_StoryProgress, STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + Call(SetPlayerAnimation, ANIM_Mario1_ThumbsUp) + Wait(120) + Exec(N(EVS_SetupMusic)) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Else + Wait(40) + EndIf + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + Call(DisablePlayerInput, FALSE) + Call(RemoveNpc, NPC_SELF) + Return + End }; EvtScript N(EVS_NpcInit_YoshiKid) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH5_SUSHIE_JOINED_PARTY) - EVT_IF_EQ(GF_JAN08_SavedYoshi, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_YoshiKid_Red_Cry) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_CALL(SetNpcPos, NPC_SELF, -391, 0, -164) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_YoshiKid))) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH5_SUSHIE_JOINED_PARTY) + IfEq(GF_JAN08_SavedYoshi, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_YoshiKid_Red_Cry) + Call(SetNpcYaw, NPC_SELF, 90) + Call(SetNpcPos, NPC_SELF, -391, 0, -164) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_YoshiKid))) + Return + EndIf + EndIf + Call(RemoveNpc, NPC_SELF) + Return + End }; // unchanged from MBush.inc.c EvtScript N(EVS_NpcDefeat_MBush_Copy) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MBush_Anim05) - EVT_CALL(GetSelfVar, 10, LVar0) - EVT_CALL(GetSelfVar, 11, LVar1) - EVT_CALL(GetSelfVar, 12, LVar2) - EVT_CALL(NpcJump1, NPC_SELF, LVar0, LVar1, LVar2, 8) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MBush_Anim00) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_MBush))) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_FLED) + Call(SetNpcAnimation, NPC_SELF, ANIM_MBush_Anim05) + Call(GetSelfVar, 10, LVar0) + Call(GetSelfVar, 11, LVar1) + Call(GetSelfVar, 12, LVar2) + Call(NpcJump1, NPC_SELF, LVar0, LVar1, LVar2, 8) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_MBush_Anim00) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_MBush))) + CaseEq(OUTCOME_ENEMY_FLED) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_MBush_01) = { - EVT_CALL(SetNpcCollisionSize, NPC_SELF, 60, 30) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_MBush_Copy))) - EVT_RETURN - EVT_END + Call(SetNpcCollisionSize, NPC_SELF, 60, 30) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_MBush_Copy))) + Return + End }; NpcData N(NpcData_SpearGuy)[] = { diff --git a/src/world/area_jan/jan_08/jan_08_6_trees.c b/src/world/area_jan/jan_08/jan_08_6_trees.c index 7b9ddf44c81..490865a4114 100644 --- a/src/world/area_jan/jan_08/jan_08_6_trees.c +++ b/src/world/area_jan/jan_08/jan_08_6_trees.c @@ -97,15 +97,15 @@ BombTrigger N(BombPos_Tree3) = { }; EvtScript N(EVS_SetupTrees) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o202, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o203, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o204, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree3)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o202, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o203, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree3))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o204, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree3)), 1, 0) + Return + End }; diff --git a/src/world/area_jan/jan_09/jan_09_1_main.c b/src/world/area_jan/jan_09/jan_09_1_main.c index 6fd9019847e..c0d8b6909aa 100644 --- a/src/world/area_jan/jan_09/jan_09_1_main.c +++ b/src/world/area_jan/jan_09/jan_09_1_main.c @@ -9,72 +9,72 @@ EvtScript N(EVS_ExitWalk_jan_08_2) = EVT_EXIT_WALK(60, jan_09_ENTRY_0, "jan_08", EvtScript N(EVS_ExitWalk_jan_06_3) = EVT_EXIT_WALK(60, jan_09_ENTRY_1, "jan_06", jan_06_ENTRY_3); EvtScript N(EVS_GotoMap_jan_11_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(GotoMap, EVT_PTR("jan_11"), jan_11_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(GotoMap, Ref("jan_11"), jan_11_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_TouchFloor_Pipe) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_EXEC_WAIT(N(EVS_Pipe_ExitVertical)) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Set(LVarA, LVar0) + Set(LVarB, LVar1) + Set(LVarC, LVar2) + ExecWait(N(EVS_Pipe_ExitVertical)) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_10_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_o245, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_08_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_06_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_SET(LVar0, jan_09_ENTRY_3) - EVT_SET(LVar1, COLLIDER_o208) - EVT_SET(LVar2, EVT_PTR(N(EVS_GotoMap_jan_11_0))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_TouchFloor_Pipe)), TRIGGER_FLOOR_TOUCH, LVar1, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_jan_10_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_o245, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_jan_08_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_jan_06_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Set(LVar0, jan_09_ENTRY_3) + Set(LVar1, COLLIDER_o208) + Set(LVar2, Ref(N(EVS_GotoMap_jan_11_0))) + BindTrigger(Ref(N(EVS_TouchFloor_Pipe)), TRIGGER_FLOOR_TOUCH, LVar1, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_JADE_JUNGLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(SetZoneEnabled, ZONE_o79, FALSE) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupBushes)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o97, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o99, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o97, COLLIDER_FLAG_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o99, COLLIDER_FLAG_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1, SURFACE_TYPE_WATER) - EVT_EXEC(N(EVS_SetupTrees)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilits, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, jan_09_ENTRY_3) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_ELSE - EVT_SET(LVarA, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(N(EVS_Pipe_EnterVertical)) - EVT_WAIT(1) - EVT_END_IF - EVT_CALL(SetMusicTrack, 0, SONG_JADE_JUNGLE, 0, 8) - EVT_CALL(ClearAmbientSounds, 250) - EVT_CALL(MakeTransformGroup, MODEL_g51) - EVT_CALL(EnableTexPanning, MODEL_o180, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_JADE_JUNGLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(SetZoneEnabled, ZONE_o79, FALSE) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupBushes)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o97, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o99, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o97, COLLIDER_FLAG_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o99, COLLIDER_FLAG_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1, SURFACE_TYPE_WATER) + Exec(N(EVS_SetupTrees)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilits, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Call(GetEntryID, LVar0) + IfNe(LVar0, jan_09_ENTRY_3) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Else + Set(LVarA, Ref(N(EVS_BindExitTriggers))) + Exec(N(EVS_Pipe_EnterVertical)) + Wait(1) + EndIf + Call(SetMusicTrack, 0, SONG_JADE_JUNGLE, 0, 8) + Call(ClearAmbientSounds, 250) + Call(MakeTransformGroup, MODEL_g51) + Call(EnableTexPanning, MODEL_o180, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( -80, 140, 80, -100) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; diff --git a/src/world/area_jan/jan_09/jan_09_2_bushes.c b/src/world/area_jan/jan_09/jan_09_2_bushes.c index aa34cc61ccb..2b22f60e6c1 100644 --- a/src/world/area_jan/jan_09/jan_09_2_bushes.c +++ b/src/world/area_jan/jan_09/jan_09_2_bushes.c @@ -17,157 +17,157 @@ EvtScript N(EVS_MoveBush_CliffTop2) = EVT_MOVE_BUSHES(COLLIDER_o88, MODEL_o88, MODEL_o81, MV_CliffTopBush2OffsetL, MV_CliffTopBush2OffsetR); EvtScript N(EVS_Inspect_MoveBush_RightShore) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o84, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_MoveBush_RightShore)) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(MakeLerp, 0, 45, 30, EASING_CUBIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(MV_RightShoreBushOffsetR, LVar0) - EVT_SETF(MV_RightShoreBushOffsetL, MV_RightShoreBushOffsetR) - EVT_MULF(MV_RightShoreBushOffsetL, -1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o84, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_MoveBush_RightShore)) + Call(DisablePlayerInput, TRUE) + Call(MakeLerp, 0, 45, 30, EASING_CUBIC_OUT) + Loop(0) + Call(UpdateLerp) + SetF(MV_RightShoreBushOffsetR, LVar0) + SetF(MV_RightShoreBushOffsetL, MV_RightShoreBushOffsetR) + MulF(MV_RightShoreBushOffsetL, -1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Inspect_MoveBush_CliffTop1) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o82, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_MoveBush_CliffTop1)) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(MakeLerp, 0, 45, 30, EASING_CUBIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(MV_CliffTopBush1OffsetR, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o82, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_MoveBush_CliffTop1)) + Call(DisablePlayerInput, TRUE) + Call(MakeLerp, 0, 45, 30, EASING_CUBIC_OUT) + Loop(0) + Call(UpdateLerp) + SetF(MV_CliffTopBush1OffsetR, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Inspect_MoveBush_CliffTop2) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o88, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_MoveBush_CliffTop2)) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(MakeLerp, 0, 45, 30, EASING_CUBIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(MV_CliffTopBush2OffsetR, LVar0) - EVT_SETF(MV_CliffTopBush2OffsetL, MV_CliffTopBush2OffsetR) - EVT_MULF(MV_CliffTopBush2OffsetL, -1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o88, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_MoveBush_CliffTop2)) + Call(DisablePlayerInput, TRUE) + Call(MakeLerp, 0, 45, 30, EASING_CUBIC_OUT) + Loop(0) + Call(UpdateLerp) + SetF(MV_CliffTopBush2OffsetR, LVar0) + SetF(MV_CliffTopBush2OffsetL, MV_CliffTopBush2OffsetR) + MulF(MV_CliffTopBush2OffsetL, -1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_ForceMoveCliffTopBushes) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o82, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o88, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_MoveBush_CliffTop1)) - EVT_EXEC(N(EVS_MoveBush_CliffTop2)) - EVT_CALL(MakeLerp, 0, 45, 30, EASING_CUBIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(MV_CliffTopBush1OffsetR, LVar0) - EVT_SETF(MV_CliffTopBush2OffsetR, LVar0) - EVT_SETF(MV_CliffTopBush2OffsetL, MV_CliffTopBush2OffsetR) - EVT_MULF(MV_CliffTopBush2OffsetL, -1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o82, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o88, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_MoveBush_CliffTop1)) + Exec(N(EVS_MoveBush_CliffTop2)) + Call(MakeLerp, 0, 45, 30, EASING_CUBIC_OUT) + Loop(0) + Call(UpdateLerp) + SetF(MV_CliffTopBush1OffsetR, LVar0) + SetF(MV_CliffTopBush2OffsetR, LVar0) + SetF(MV_CliffTopBush2OffsetL, MV_CliffTopBush2OffsetR) + MulF(MV_CliffTopBush2OffsetL, -1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_80243EC0) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_LOOP(3) - EVT_CALL(N(MoveBush_AnimateShearing), LVar1, 1) - EVT_WAIT(1) - EVT_CALL(N(MoveBush_AnimateShearing), LVar1, 0) - EVT_WAIT(1) - EVT_CALL(N(MoveBush_AnimateShearing), LVar1, -1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(TranslateModel, LVar1, 0, 0, 0) - EVT_SET(LVarA, LVar2) - EVT_CALL(GetModelCenter, LVar1) - EVT_CALL(DropItemEntity, ITEM_COIN, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_TOSS_SPAWN_ONCE, LVarA) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Loop(3) + Call(N(MoveBush_AnimateShearing), LVar1, 1) + Wait(1) + Call(N(MoveBush_AnimateShearing), LVar1, 0) + Wait(1) + Call(N(MoveBush_AnimateShearing), LVar1, -1) + Wait(1) + EndLoop + Call(TranslateModel, LVar1, 0, 0, 0) + Set(LVarA, LVar2) + Call(GetModelCenter, LVar1) + Call(DropItemEntity, ITEM_COIN, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_TOSS_SPAWN_ONCE, LVarA) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(D_80243FC4_B69A74) = { - EVT_LABEL(10) - EVT_LABEL(0) - EVT_IF_EQ(MV_Unk_05, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_SET(LVar3, MV_Unk_05) - EVT_CALL(MakeLerp, 0, MV_Unk_05, 120, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(MV_Unk_05, LVar3) - EVT_SUB(MV_Unk_05, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_GOTO(10) - EVT_RETURN - EVT_END + Label(10) + Label(0) + IfEq(MV_Unk_05, 0) + Wait(1) + Goto(0) + EndIf + Set(LVar3, MV_Unk_05) + Call(MakeLerp, 0, MV_Unk_05, 120, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Set(MV_Unk_05, LVar3) + Sub(MV_Unk_05, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Goto(10) + Return + End }; EvtScript N(EVS_802440C0) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(20) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_SET(MV_Unk_05, 3600) - EVT_LOOP(60) - EVT_CALL(InterpPlayerYaw, MV_Unk_05, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADDF(LVar0, EVT_FLOAT(6.0)) - EVT_ADDF(LVar1, EVT_FLOAT(3.0)) - EVT_ADDF(LVar2, EVT_FLOAT(-29.0)) - EVT_DIVF(LVar0, EVT_FLOAT(1.09375)) - EVT_DIVF(LVar1, EVT_FLOAT(1.09375)) - EVT_DIVF(LVar2, EVT_FLOAT(1.09375)) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -25, 90, -330) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -25, 90, -330) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.296875)) - EVT_CALL(PlayerJump, -25, 90, -330, 60) - EVT_CALL(SetPlayerPos, -25, 90, -330) - EVT_CALL(SetCamTarget, CAM_DEFAULT, -25, 90, -330) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Wait(20) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Set(MV_Unk_05, 3600) + Loop(60) + Call(InterpPlayerYaw, MV_Unk_05, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + AddF(LVar0, Float(6.0)) + AddF(LVar1, Float(3.0)) + AddF(LVar2, Float(-29.0)) + DivF(LVar0, Float(1.09375)) + DivF(LVar1, Float(1.09375)) + DivF(LVar2, Float(1.09375)) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(UseSettingsFrom, CAM_DEFAULT, -25, 90, -330) + Call(SetPanTarget, CAM_DEFAULT, -25, 90, -330) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetPlayerJumpscale, Float(0.296875)) + Call(PlayerJump, -25, 90, -330, 60) + Call(SetPlayerPos, -25, 90, -330) + Call(SetCamTarget, CAM_DEFAULT, -25, 90, -330) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Wait(100) + Return + End }; FoliageModelList N(Bush1_BushModels) = FOLIAGE_MODEL_LIST(MODEL_o78); @@ -449,50 +449,50 @@ SearchBushConfig N(SearchBush_Bush18) = { }; EvtScript N(EVS_SetupBushes) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, jan_09_ENTRY_3) - EVT_EXEC(N(EVS_ForceMoveCliffTopBushes)) - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Inspect_MoveBush_RightShore)), TRIGGER_WALL_PRESS_A, COLLIDER_o84, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Inspect_MoveBush_CliffTop1)), TRIGGER_WALL_PRESS_A, COLLIDER_o82, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Inspect_MoveBush_CliffTop2)), TRIGGER_WALL_PRESS_A, COLLIDER_o88, 1, 0) - EVT_EXEC(N(D_80243FC4_B69A74)) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o78, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o228, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o229, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush4))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o230, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush5))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o231, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush6))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o232, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush7))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o233, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush8))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o234, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush9))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o235, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush10))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o236, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush11))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o237, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush12))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o238, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush13))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o239, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush14))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o240, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush15))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o241, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush16))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o242, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush17))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o243, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush18))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o244, 1, 0) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, jan_09_ENTRY_3) + Exec(N(EVS_ForceMoveCliffTopBushes)) + EndIf + BindTrigger(Ref(N(EVS_Inspect_MoveBush_RightShore)), TRIGGER_WALL_PRESS_A, COLLIDER_o84, 1, 0) + BindTrigger(Ref(N(EVS_Inspect_MoveBush_CliffTop1)), TRIGGER_WALL_PRESS_A, COLLIDER_o82, 1, 0) + BindTrigger(Ref(N(EVS_Inspect_MoveBush_CliffTop2)), TRIGGER_WALL_PRESS_A, COLLIDER_o88, 1, 0) + Exec(N(D_80243FC4_B69A74)) + Set(LVar0, Ref(N(SearchBush_Bush1))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o78, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush2))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o228, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush3))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o229, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush4))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o230, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush5))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o231, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush6))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o232, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush7))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o233, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush8))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o234, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush9))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o235, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush10))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o236, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush11))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o237, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush12))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o238, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush13))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o239, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush14))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o240, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush15))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o241, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush16))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o242, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush17))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o243, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush18))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o244, 1, 0) + Return + End }; diff --git a/src/world/area_jan/jan_09/jan_09_4_trees.c b/src/world/area_jan/jan_09/jan_09_4_trees.c index bba626c04f1..0bc64ff1dfc 100644 --- a/src/world/area_jan/jan_09/jan_09_4_trees.c +++ b/src/world/area_jan/jan_09/jan_09_4_trees.c @@ -97,15 +97,15 @@ BombTrigger N(BombPos_Tree3) = { }; EvtScript N(EVS_SetupTrees) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o218, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o219, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o220, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree3)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o218, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o219, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree3))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o220, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree3)), 1, 0) + Return + End }; diff --git a/src/world/area_jan/jan_09/jan_09_5_entity.c b/src/world/area_jan/jan_09/jan_09_5_entity.c index ca7fcd36356..133c8c5d25c 100644 --- a/src/world/area_jan/jan_09/jan_09_5_entity.c +++ b/src/world/area_jan/jan_09/jan_09_5_entity.c @@ -2,8 +2,8 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_SpinningFlower), 30, 0, -250, 0, -33, 90, -347, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Munchlesia), 271, 0, 336, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_SpinningFlower), 30, 0, -250, 0, -33, 90, -347, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_Munchlesia), 271, 0, 336, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_jan/jan_10/jan_10_1_music.c b/src/world/area_jan/jan_10/jan_10_1_music.c index e3630ff257a..0db59fe4eb0 100644 --- a/src/world/area_jan/jan_10/jan_10_1_music.c +++ b/src/world/area_jan/jan_10/jan_10_1_music.c @@ -1,8 +1,8 @@ #include "jan_10.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_JADE_JUNGLE, 0, 8) - EVT_CALL(ClearAmbientSounds, 250) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_JADE_JUNGLE, 0, 8) + Call(ClearAmbientSounds, 250) + Return + End }; diff --git a/src/world/area_jan/jan_10/jan_10_2_main.c b/src/world/area_jan/jan_10/jan_10_2_main.c index b14ee9b0432..545f2615845 100644 --- a/src/world/area_jan/jan_10/jan_10_2_main.c +++ b/src/world/area_jan/jan_10/jan_10_2_main.c @@ -7,36 +7,36 @@ EvtScript N(EVS_ExitWalk_jan_09_2) = EVT_EXIT_WALK(60, jan_10_ENTRY_0, "jan_09", MAP_RODATA_PAD(1, exits); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_09_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_o100, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_jan_09_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_o100, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_JADE_JUNGLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupLogs)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o20, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o20, COLLIDER_FLAG_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1, SURFACE_TYPE_WATER) - EVT_EXEC(N(EVS_SetupTrees)) - EVT_EXEC(N(EVS_SetupBushes)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(MakeTransformGroup, MODEL_g11) - EVT_CALL(EnableTexPanning, MODEL_o28, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_JADE_JUNGLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupLogs)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o20, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o20, COLLIDER_FLAG_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1, SURFACE_TYPE_WATER) + Exec(N(EVS_SetupTrees)) + Exec(N(EVS_SetupBushes)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Exec(N(EVS_SetupMusic)) + Call(MakeTransformGroup, MODEL_g11) + Call(EnableTexPanning, MODEL_o28, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( -80, 140, 80, -100) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; diff --git a/src/world/area_jan/jan_10/jan_10_3_npc.c b/src/world/area_jan/jan_10/jan_10_3_npc.c index 391a55fde16..38f05e4d401 100644 --- a/src/world/area_jan/jan_10/jan_10_3_npc.c +++ b/src/world/area_jan/jan_10/jan_10_3_npc.c @@ -5,104 +5,104 @@ #include "world/common/npc/YoshiKid.inc.c" EvtScript N(EVS_NpcIdle_JungleFuzzy) = { - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_LABEL(0) - EVT_CALL(GetSelfVar, 7, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, FALSE) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Fuzzy_Jungle_Anim09) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, -566, 100, 65) - EVT_CALL(PlaySoundWithVolume, SOUND_FUZZY_HOP_A, 110) - EVT_WAIT(20) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING, TRUE) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_JungleFuzzy_Wander))) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Label(0) + Call(GetSelfVar, 7, LVar0) + Wait(1) + IfEq(LVar0, FALSE) + Goto(0) + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_Fuzzy_Jungle_Anim09) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING, FALSE) + Call(SetNpcPos, NPC_SELF, -566, 100, 65) + Call(PlaySoundWithVolume, SOUND_FUZZY_HOP_A, 110) + Wait(20) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING, TRUE) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_JungleFuzzy_Wander))) + Return + End }; EvtScript N(EVS_NpcInit_JungleFuzzy) = { - EVT_CALL(SetSelfVar, 7, FALSE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_ACTIVE_WHILE_OFFSCREEN, 1) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING, TRUE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_JungleFuzzy))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 7, FALSE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_ACTIVE_WHILE_OFFSCREEN, 1) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING, TRUE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_JungleFuzzy))) + Return + End }; EvtScript N(EVS_YoshiKid_CryForHelp) = { - EVT_SET(AF_JAN_02, FALSE) - EVT_LOOP(0) - EVT_CALL(PlaySoundAtNpc, NPC_YoshiKid, SOUND_YOSHI_KID_CRY, SOUND_SPACE_DEFAULT) - EVT_WAIT(20) - EVT_IF_EQ(AF_JAN_02, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(AF_JAN_02, FALSE) + Loop(0) + Call(PlaySoundAtNpc, NPC_YoshiKid, SOUND_YOSHI_KID_CRY, SOUND_SPACE_DEFAULT) + Wait(20) + IfEq(AF_JAN_02, TRUE) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_NpcInteract_YoshiKid) = { - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4.0), 0, 350, EVT_FLOAT(17.0), EVT_FLOAT(-7.0)) - EVT_SET(AF_JAN_02, TRUE) - EVT_WAIT(15) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_EQ(LVar0, PARTNER_SUSHIE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Blue_SadTalk, ANIM_YoshiKid_Blue_SadIdle, 0, MSG_CH5_00B2) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Blue_SadTalk, ANIM_YoshiKid_Blue_SadIdle, 0, MSG_CH5_00B3) - EVT_END_IF - EVT_CALL(EndSpeech, NPC_SELF, ANIM_YoshiKid_Blue_Talk, ANIM_YoshiKid_Blue_Idle, 0) - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_YoshiKid_Blue_Run) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, -240, 10, 0) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_SET(GF_JAN10_SavedYoshi, TRUE) - EVT_SET(LVar0, 0) - EVT_ADD(LVar0, GF_JAN05_SavedYoshi) - EVT_ADD(LVar0, GF_JAN07_SavedYoshi) - EVT_ADD(LVar0, GF_JAN08_SavedYoshi) - EVT_ADD(LVar0, GF_JAN10_SavedYoshi) - EVT_ADD(LVar0, GF_JAN11_SavedYoshi) - EVT_IF_EQ(LVar0, 5) - EVT_CALL(SetMusicTrack, 0, SONG_YOSHI_KIDS_FOUND, 0, 8) - EVT_SET(GB_StoryProgress, STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_ThumbsUp) - EVT_WAIT(120) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_ELSE - EVT_WAIT(30) - EVT_END_IF - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + Call(AdjustCam, CAM_DEFAULT, Float(4.0), 0, 350, Float(17.0), Float(-7.0)) + Set(AF_JAN_02, TRUE) + Wait(15) + Call(GetCurrentPartnerID, LVar0) + IfEq(LVar0, PARTNER_SUSHIE) + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Blue_SadTalk, ANIM_YoshiKid_Blue_SadIdle, 0, MSG_CH5_00B2) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Blue_SadTalk, ANIM_YoshiKid_Blue_SadIdle, 0, MSG_CH5_00B3) + EndIf + Call(EndSpeech, NPC_SELF, ANIM_YoshiKid_Blue_Talk, ANIM_YoshiKid_Blue_Idle, 0) + Thread + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_YoshiKid_Blue_Run) + Call(SetNpcSpeed, NPC_SELF, Float(5.0)) + Call(NpcMoveTo, NPC_SELF, -240, 10, 0) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndThread + Set(GF_JAN10_SavedYoshi, TRUE) + Set(LVar0, 0) + Add(LVar0, GF_JAN05_SavedYoshi) + Add(LVar0, GF_JAN07_SavedYoshi) + Add(LVar0, GF_JAN08_SavedYoshi) + Add(LVar0, GF_JAN10_SavedYoshi) + Add(LVar0, GF_JAN11_SavedYoshi) + IfEq(LVar0, 5) + Call(SetMusicTrack, 0, SONG_YOSHI_KIDS_FOUND, 0, 8) + Set(GB_StoryProgress, STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + Call(SetPlayerAnimation, ANIM_Mario1_ThumbsUp) + Wait(120) + Exec(N(EVS_SetupMusic)) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Else + Wait(30) + EndIf + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + Call(RemoveNpc, NPC_SELF) + Return + End }; EvtScript N(EVS_NpcInit_YoshiKid) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH5_SUSHIE_JOINED_PARTY) - EVT_EXEC(N(EVS_YoshiKid_CryForHelp)) - EVT_IF_EQ(GF_JAN10_SavedYoshi, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_YoshiKid_Blue_Cry) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_CALL(SetNpcPos, NPC_SELF, -450, 0, 70) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_YoshiKid))) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH5_SUSHIE_JOINED_PARTY) + Exec(N(EVS_YoshiKid_CryForHelp)) + IfEq(GF_JAN10_SavedYoshi, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_YoshiKid_Blue_Cry) + Call(SetNpcYaw, NPC_SELF, 90) + Call(SetNpcPos, NPC_SELF, -450, 0, 70) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_YoshiKid))) + Return + EndIf + EndIf + Call(RemoveNpc, NPC_SELF) + Return + End }; NpcData N(NpcData_YoshiKid) = { diff --git a/src/world/area_jan/jan_10/jan_10_4_log.c b/src/world/area_jan/jan_10/jan_10_4_log.c index 4160d3f2077..b086c9f2a61 100644 --- a/src/world/area_jan/jan_10/jan_10_4_log.c +++ b/src/world/area_jan/jan_10/jan_10_4_log.c @@ -3,153 +3,153 @@ #include "sprite/player.h" EvtScript N(EVS_SetupLogObjects) = { - EVT_IF_EQ(GF_JAN10_CreateLogBridge, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o23, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_o79, FALSE) - EVT_CALL(EnableModel, MODEL_o76, FALSE) - EVT_CALL(TranslateGroup, MODEL_g24, 0, -165, 0) - EVT_CALL(TranslateGroup, MODEL_g23, 0, -165, 0) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o11, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o22, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o23, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_o79, TRUE) - EVT_CALL(EnableModel, MODEL_o76, TRUE) - EVT_CALL(TranslateGroup, MODEL_g24, 0, 10, 0) - EVT_CALL(TranslateGroup, MODEL_g23, 0, 10, 0) - EVT_CALL(RotateGroup, MODEL_g24, 90, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_g23, 90, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_g24, 90, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_g23, -90, 0, 1, 0) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_JAN10_CreateLogBridge, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o23, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_o79, FALSE) + Call(EnableModel, MODEL_o76, FALSE) + Call(TranslateGroup, MODEL_g24, 0, -165, 0) + Call(TranslateGroup, MODEL_g23, 0, -165, 0) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o11, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o22, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o23, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_o79, TRUE) + Call(EnableModel, MODEL_o76, TRUE) + Call(TranslateGroup, MODEL_g24, 0, 10, 0) + Call(TranslateGroup, MODEL_g23, 0, 10, 0) + Call(RotateGroup, MODEL_g24, 90, 0, 0, 1) + Call(RotateGroup, MODEL_g23, 90, 0, 0, 1) + Call(RotateGroup, MODEL_g24, 90, 0, 1, 0) + Call(RotateGroup, MODEL_g23, -90, 0, 1, 0) + EndIf + Return + End }; EvtScript N(EVS_LogAnim_RiseUp) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_o11, SOUND_SMACK_TREE, 0) - EVT_CALL(MakeLerp, -165, -184, 5, EASING_QUARTIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g24, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_g23, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_o11, SOUND_SMACK_TREE, 0) + Call(MakeLerp, -165, -184, 5, EASING_QUARTIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g24, 0, LVar0, 0) + Call(TranslateGroup, MODEL_g23, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; #include "world/common/todo/UpdateLogShadow.inc.c" EvtScript N(EVS_LogAnim_FallDown) = { - EVT_THREAD - EVT_WAIT(17) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_CALL(N(UpdateLogShadow), MODEL_o79, MF_KillLogShadow) - EVT_END_THREAD - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o11, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(MakeLerp, -184, 60, 30, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g24, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_g23, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(1) - EVT_CALL(MakeLerp, 60, 0, 30, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g24, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_g23, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o11, SOUND_JAN_LOG_LAND, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, 0, 0, 0, 0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 2, 3, 1) - EVT_RETURN - EVT_END + Thread + Wait(17) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Call(N(UpdateLogShadow), MODEL_o79, MF_KillLogShadow) + EndThread + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o11, COLLIDER_FLAGS_UPPER_MASK) + Call(MakeLerp, -184, 60, 30, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g24, 0, LVar0, 0) + Call(TranslateGroup, MODEL_g23, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(1) + Call(MakeLerp, 60, 0, 30, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g24, 0, LVar0, 0) + Call(TranslateGroup, MODEL_g23, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(PlaySoundAtCollider, COLLIDER_o11, SOUND_JAN_LOG_LAND, 0) + PlayEffect(EFFECT_LANDING_DUST, 4, 0, 0, 0, 0) + Call(ShakeCam, CAM_DEFAULT, 2, 3, 1) + Return + End }; EvtScript N(EVS_LogAnim_FallOver) = { - EVT_THREAD - EVT_WAIT(50) - EVT_SET(MF_KillLogShadow, TRUE) - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, 90, 60, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g24, 0, 0, 0) - EVT_CALL(TranslateGroup, MODEL_g23, 0, 0, 0) - EVT_CALL(RotateGroup, MODEL_g24, LVar0, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_g23, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 2, 3, 1) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + Wait(50) + Set(MF_KillLogShadow, TRUE) + EndThread + Call(MakeLerp, 0, 90, 60, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g24, 0, 0, 0) + Call(TranslateGroup, MODEL_g23, 0, 0, 0) + Call(RotateGroup, MODEL_g24, LVar0, 0, 0, 1) + Call(RotateGroup, MODEL_g23, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Thread + Call(ShakeCam, CAM_DEFAULT, 2, 3, 1) + EndThread + Return + End }; EvtScript N(EVS_LogAnim_Split) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_o11, SOUND_JAN_LOG_SPLIT, 0) - EVT_CALL(EnableModel, MODEL_o79, TRUE) - EVT_CALL(EnableModel, MODEL_o76, TRUE) - EVT_CALL(MakeLerp, 0, 90, 30, EASING_COS_FAST_OVERSHOOT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(LVar2, LVar0) - EVT_DIVF(LVar2, 9) - EVT_CALL(TranslateGroup, MODEL_g24, 0, LVar2, 0) - EVT_CALL(TranslateGroup, MODEL_g23, 0, LVar2, 0) - EVT_CALL(RotateGroup, MODEL_g24, 90, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_g23, 90, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_g24, LVar0, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_g23, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_o11, SOUND_JAN_LOG_SPLIT, 0) + Call(EnableModel, MODEL_o79, TRUE) + Call(EnableModel, MODEL_o76, TRUE) + Call(MakeLerp, 0, 90, 30, EASING_COS_FAST_OVERSHOOT) + Loop(0) + Call(UpdateLerp) + Set(LVar2, LVar0) + DivF(LVar2, 9) + Call(TranslateGroup, MODEL_g24, 0, LVar2, 0) + Call(TranslateGroup, MODEL_g23, 0, LVar2, 0) + Call(RotateGroup, MODEL_g24, 90, 0, 0, 1) + Call(RotateGroup, MODEL_g23, 90, 0, 0, 1) + Call(RotateGroup, MODEL_g24, LVar0, 0, 1, 0) + Call(RotateGroup, MODEL_g23, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_Smash_BuriedLog) = { - EVT_SET(GF_JAN10_CreateLogBridge, TRUE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC_WAIT(N(EVS_LogAnim_RiseUp)) - EVT_WAIT(1) - EVT_EXEC_WAIT(N(EVS_LogAnim_FallDown)) - EVT_WAIT(1) - EVT_EXEC_WAIT(N(EVS_LogAnim_FallOver)) - EVT_WAIT(1) - EVT_EXEC_WAIT(N(EVS_LogAnim_Split)) - EVT_WAIT(1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_EXEC(N(EVS_SetupLogObjects)) - EVT_RETURN - EVT_END + Set(GF_JAN10_CreateLogBridge, TRUE) + Call(DisablePlayerInput, TRUE) + ExecWait(N(EVS_LogAnim_RiseUp)) + Wait(1) + ExecWait(N(EVS_LogAnim_FallDown)) + Wait(1) + ExecWait(N(EVS_LogAnim_FallOver)) + Wait(1) + ExecWait(N(EVS_LogAnim_Split)) + Wait(1) + Call(DisablePlayerInput, FALSE) + Exec(N(EVS_SetupLogObjects)) + Return + End }; EvtScript N(EVS_SetupLogs) = { - EVT_IF_EQ(GF_JAN10_CreateLogBridge, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Smash_BuriedLog)), TRIGGER_WALL_HAMMER, COLLIDER_o11, 1, 0) - EVT_END_IF - EVT_EXEC(N(EVS_SetupLogObjects)) - EVT_RETURN - EVT_END + IfEq(GF_JAN10_CreateLogBridge, FALSE) + BindTrigger(Ref(N(EVS_Smash_BuriedLog)), TRIGGER_WALL_HAMMER, COLLIDER_o11, 1, 0) + EndIf + Exec(N(EVS_SetupLogObjects)) + Return + End }; diff --git a/src/world/area_jan/jan_10/jan_10_5_trees.c b/src/world/area_jan/jan_10/jan_10_5_trees.c index 12029a0597f..979c96edb33 100644 --- a/src/world/area_jan/jan_10/jan_10_5_trees.c +++ b/src/world/area_jan/jan_10/jan_10_5_trees.c @@ -14,13 +14,13 @@ API_CALLABLE(N(IsJungleFuzzyAlive)) { } EvtScript N(EVS_OnShakeTree1) = { - EVT_WAIT(15) - EVT_CALL(N(IsJungleFuzzyAlive)) - EVT_IF_EQ(LVar0, TRUE) - EVT_CALL(SetNpcVar, NPC_JungleFuzzy, 7, 1) - EVT_END_IF - EVT_RETURN - EVT_END + Wait(15) + Call(N(IsJungleFuzzyAlive)) + IfEq(LVar0, TRUE) + Call(SetNpcVar, NPC_JungleFuzzy, 7, 1) + EndIf + Return + End }; FoliageModelList N(Tree1_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o59, MODEL_o60, MODEL_o61, MODEL_o62, MODEL_o63); @@ -47,9 +47,9 @@ BombTrigger N(BombPos_Tree1) = { }; EvtScript N(EVS_SetupTrees) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o91, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o91, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Return + End }; diff --git a/src/world/area_jan/jan_10/jan_10_6_bushes.c b/src/world/area_jan/jan_10/jan_10_6_bushes.c index de7a6182634..fd1867d04fd 100644 --- a/src/world/area_jan/jan_10/jan_10_6_bushes.c +++ b/src/world/area_jan/jan_10/jan_10_6_bushes.c @@ -89,18 +89,18 @@ SearchBushConfig N(SearchBush_Bush6) = { }; EvtScript N(EVS_SetupBushes) = { - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o94, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o95, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o96, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush4))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o97, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush5))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o98, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush6))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o99, 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(SearchBush_Bush1))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o94, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush2))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o95, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush3))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o96, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush4))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o97, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush5))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o98, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush6))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o99, 1, 0) + Return + End }; diff --git a/src/world/area_jan/jan_10/jan_10_7_entity.c b/src/world/area_jan/jan_10/jan_10_7_entity.c index 25f8d7c96ce..b825eb61d3d 100644 --- a/src/world/area_jan/jan_10/jan_10_7_entity.c +++ b/src/world/area_jan/jan_10/jan_10_7_entity.c @@ -2,7 +2,7 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, -150, -60, 60, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_JAN10_Item_StarPiece) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_STAR_PIECE, -150, -60, 60, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_JAN10_Item_StarPiece) + Return + End }; diff --git a/src/world/area_jan/jan_11/jan_11_1_music.c b/src/world/area_jan/jan_11/jan_11_1_music.c index a915b4f89ca..fd1351070ec 100644 --- a/src/world/area_jan/jan_11/jan_11_1_music.c +++ b/src/world/area_jan/jan_11/jan_11_1_music.c @@ -1,8 +1,8 @@ #include "jan_11.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_JADE_JUNGLE, 0, 6) - EVT_CALL(ClearAmbientSounds, 250) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_JADE_JUNGLE, 0, 6) + Call(ClearAmbientSounds, 250) + Return + End }; diff --git a/src/world/area_jan/jan_11/jan_11_2_main.c b/src/world/area_jan/jan_11/jan_11_2_main.c index 28aeae51d8f..682aa2aa689 100644 --- a/src/world/area_jan/jan_11/jan_11_2_main.c +++ b/src/world/area_jan/jan_11/jan_11_2_main.c @@ -30,37 +30,37 @@ DripVolumeList N(DripVolumes) = { }; EvtScript N(EVS_SetupDrips) = { - EVT_SET(LVar0, EVT_PTR(N(DripVolumes))) - EVT_EXEC(N(EVS_CreateDripVolumes)) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(DripVolumes))) + Exec(N(EVS_CreateDripVolumes)) + Return + End }; EvtScript N(EVS_GotoMap_jan_09_3) = { - EVT_CALL(GotoMap, EVT_PTR("jan_09"), jan_09_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("jan_09"), jan_09_ENTRY_3) + Wait(100) + Return + End }; EvtScript N(EVS_ExitPipe_jan_09_3) = EVT_EXIT_PIPE_HORIZONTAL(jan_11_ENTRY_0, COLLIDER_o10, N(EVS_GotoMap_jan_09_3)); EvtScript N(D_80241F38_B72798) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitPipe_jan_09_3)), TRIGGER_WALL_PUSH, COLLIDER_o10, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitPipe_jan_09_3)), TRIGGER_WALL_PUSH, COLLIDER_o10, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_JADE_JUNGLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_CreateDarkness)) - EVT_SET(LVar0, EVT_PTR(N(D_80241F38_B72798))) - EVT_EXEC(EnterWalk) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC_WAIT(N(EVS_SetupDrips)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_JADE_JUNGLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Exec(N(EVS_CreateDarkness)) + Set(LVar0, Ref(N(D_80241F38_B72798))) + Exec(EnterWalk) + Exec(N(EVS_SetupMusic)) + ExecWait(N(EVS_SetupDrips)) + Return + End }; diff --git a/src/world/area_jan/jan_11/jan_11_3_npc.c b/src/world/area_jan/jan_11/jan_11_3_npc.c index 1e282841e79..e0d4d5225c9 100644 --- a/src/world/area_jan/jan_11/jan_11_3_npc.c +++ b/src/world/area_jan/jan_11/jan_11_3_npc.c @@ -4,16 +4,16 @@ #include "world/common/npc/YoshiKid.inc.c" EvtScript N(EVS_YoshiKid_CryForHelp) = { - EVT_SET(AF_JAN_02, FALSE) - EVT_LOOP(0) - EVT_CALL(PlaySoundAtNpc, NPC_YoshiKid, SOUND_YOSHI_KID_CRY, SOUND_SPACE_DEFAULT) - EVT_WAIT(20) - EVT_IF_EQ(AF_JAN_02, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(AF_JAN_02, FALSE) + Loop(0) + Call(PlaySoundAtNpc, NPC_YoshiKid, SOUND_YOSHI_KID_CRY, SOUND_SPACE_DEFAULT) + Wait(20) + IfEq(AF_JAN_02, TRUE) + BreakLoop + EndIf + EndLoop + Return + End }; #include "world/common/todo/GetFloorCollider.inc.c" @@ -28,97 +28,97 @@ API_CALLABLE(N(IsPartnerWatt)) { } EvtScript N(EVS_NpcIdle_YoshiKid) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(N(GetFloorCollider), LVar0) - EVT_IF_NE(LVar0, 10) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(N(IsPartnerWatt)) - EVT_IF_EQ(LVar9, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_IF_LT(LVar2, 85) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetNpcPos, NPC_SELF, LVar4, LVar5, LVar6) - EVT_IF_LT(LVar1, LVar4) - EVT_SET(LVar1, LVar4) - EVT_ADD(LVar1, -50) - EVT_ELSE - EVT_SET(LVar1, LVar4) - EVT_ADD(LVar1, 30) - EVT_END_IF - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(1.0)) - EVT_CALL(PlayerMoveTo, LVar1, LVar3, 0) - EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE) - EVT_SUB(LVar4, LVar1) - EVT_DIV(LVar4, 2) - EVT_ADD(LVar1, LVar4) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4.0), LVar4, 350, EVT_FLOAT(17.0), EVT_FLOAT(-7.0)) - EVT_SET(AF_JAN_02, TRUE) - EVT_WAIT(15) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Green_SadTalk, ANIM_YoshiKid_Green_SadIdle, 0, MSG_CH5_00AE) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_YoshiKid_Green_Talk, ANIM_YoshiKid_Green_Idle, 0) - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_YoshiKid_Green_Run) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, -100, 50, 0) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_SET(GF_JAN11_SavedYoshi, TRUE) - EVT_SET(LVar0, 0) - EVT_ADD(LVar0, GF_JAN05_SavedYoshi) - EVT_ADD(LVar0, GF_JAN07_SavedYoshi) - EVT_ADD(LVar0, GF_JAN08_SavedYoshi) - EVT_ADD(LVar0, GF_JAN10_SavedYoshi) - EVT_ADD(LVar0, GF_JAN11_SavedYoshi) - EVT_IF_EQ(LVar0, 5) - EVT_CALL(SetMusicTrack, 0, SONG_YOSHI_KIDS_FOUND, 0, 8) - EVT_SET(GB_StoryProgress, STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_ThumbsUp) - EVT_WAIT(120) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_ELSE - EVT_WAIT(35) - EVT_END_IF - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Call(N(GetFloorCollider), LVar0) + IfNe(LVar0, 10) + Goto(0) + EndIf + Call(N(IsPartnerWatt)) + IfEq(LVar9, 0) + Goto(0) + EndIf + Call(GetPlayerPos, LVar1, LVar2, LVar3) + IfLt(LVar2, 85) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Call(GetNpcPos, NPC_SELF, LVar4, LVar5, LVar6) + IfLt(LVar1, LVar4) + Set(LVar1, LVar4) + Add(LVar1, -50) + Else + Set(LVar1, LVar4) + Add(LVar1, 30) + EndIf + Call(SetPlayerSpeed, Float(1.0)) + Call(PlayerMoveTo, LVar1, LVar3, 0) + Call(PlayerFaceNpc, NPC_SELF, FALSE) + Sub(LVar4, LVar1) + Div(LVar4, 2) + Add(LVar1, LVar4) + Call(AdjustCam, CAM_DEFAULT, Float(4.0), LVar4, 350, Float(17.0), Float(-7.0)) + Set(AF_JAN_02, TRUE) + Wait(15) + Call(NpcFacePlayer, NPC_SELF, 0) + Thread + Wait(10) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndThread + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Green_SadTalk, ANIM_YoshiKid_Green_SadIdle, 0, MSG_CH5_00AE) + Call(EndSpeech, NPC_SELF, ANIM_YoshiKid_Green_Talk, ANIM_YoshiKid_Green_Idle, 0) + Thread + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_YoshiKid_Green_Run) + Call(SetNpcSpeed, NPC_SELF, Float(5.0)) + Call(NpcMoveTo, NPC_SELF, -100, 50, 0) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndThread + Set(GF_JAN11_SavedYoshi, TRUE) + Set(LVar0, 0) + Add(LVar0, GF_JAN05_SavedYoshi) + Add(LVar0, GF_JAN07_SavedYoshi) + Add(LVar0, GF_JAN08_SavedYoshi) + Add(LVar0, GF_JAN10_SavedYoshi) + Add(LVar0, GF_JAN11_SavedYoshi) + IfEq(LVar0, 5) + Call(SetMusicTrack, 0, SONG_YOSHI_KIDS_FOUND, 0, 8) + Set(GB_StoryProgress, STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + Call(SetPlayerAnimation, ANIM_Mario1_ThumbsUp) + Wait(120) + Exec(N(EVS_SetupMusic)) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Else + Wait(35) + EndIf + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + Call(DisablePlayerInput, FALSE) + Call(RemoveNpc, NPC_SELF) + Return + End }; EvtScript N(EVS_NpcInteract_YoshiKid) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Green_Cry, ANIM_YoshiKid_Green_Cry, 0, MSG_CH5_00AD) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Green_Cry, ANIM_YoshiKid_Green_Cry, 0, MSG_CH5_00AD) + Return + End }; EvtScript N(EVS_NpcInit_YoshiKid) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH5_SUSHIE_JOINED_PARTY) - EVT_EXEC(N(EVS_YoshiKid_CryForHelp)) - EVT_IF_EQ(GF_JAN11_SavedYoshi, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_YoshiKid_Green_Cry) - EVT_CALL(SetNpcPos, NPC_SELF, 132, 85, 11) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_YoshiKid))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_YoshiKid))) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH5_SUSHIE_JOINED_PARTY) + Exec(N(EVS_YoshiKid_CryForHelp)) + IfEq(GF_JAN11_SavedYoshi, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_YoshiKid_Green_Cry) + Call(SetNpcPos, NPC_SELF, 132, 85, 11) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_YoshiKid))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_YoshiKid))) + Return + EndIf + EndIf + Call(RemoveNpc, NPC_SELF) + Return + End }; NpcData N(NpcData_YoshiKid) = { diff --git a/src/world/area_jan/jan_12/jan_12_1_main.c b/src/world/area_jan/jan_12/jan_12_1_main.c index 7e0b02a6fa2..f122bde5443 100644 --- a/src/world/area_jan/jan_12/jan_12_1_main.c +++ b/src/world/area_jan/jan_12/jan_12_1_main.c @@ -4,26 +4,26 @@ EvtScript N(EVS_ExitWalk_jan_13_0) = EVT_EXIT_WALK(60, jan_12_ENTRY_1, "jan_13", EvtScript N(EVS_ExitWalk_jan_06_2) = EVT_EXIT_WALK(60, jan_12_ENTRY_0, "jan_06", jan_06_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_06_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_13_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_jan_06_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_jan_13_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_JADE_JUNGLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupVines)) - EVT_EXEC(N(EVS_SetupTrees)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilits, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitn, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CALL(SetMusicTrack, 0, SONG_DEEP_JUNGLE, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_JUNGLE) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_JADE_JUNGLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupVines)) + Exec(N(EVS_SetupTrees)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilits, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitn, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Call(SetMusicTrack, 0, SONG_DEEP_JUNGLE, 0, 8) + Call(PlayAmbientSounds, AMBIENT_JUNGLE) + Return + End }; diff --git a/src/world/area_jan/jan_12/jan_12_2_vines.c b/src/world/area_jan/jan_12/jan_12_2_vines.c index b36548f9900..88b198ed810 100644 --- a/src/world/area_jan/jan_12/jan_12_2_vines.c +++ b/src/world/area_jan/jan_12/jan_12_2_vines.c @@ -10,49 +10,49 @@ EvtScript N(EVS_MoveBushes_Separate) = EVT_MOVE_BUSHES(COLLIDER_o12, MODEL_o12, MODEL_o26, MV_BushOffsetL, MV_BushOffsetR); EvtScript N(EVS_Inspect_MoveBushes) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o12, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_MoveBushes_Separate)) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(MakeLerp, 0, 45, 30, EASING_CUBIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(MV_BushOffsetR, LVar0) - EVT_SETF(MV_BushOffsetL, MV_BushOffsetR) - EVT_MULF(MV_BushOffsetL, -1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o12, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_MoveBushes_Separate)) + Call(DisablePlayerInput, TRUE) + Call(MakeLerp, 0, 45, 30, EASING_CUBIC_OUT) + Loop(0) + Call(UpdateLerp) + SetF(MV_BushOffsetR, LVar0) + SetF(MV_BushOffsetL, MV_BushOffsetR) + MulF(MV_BushOffsetL, -1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_OnPullVine) = { - EVT_CALL(GetModelCenter, LVar9) - EVT_ADD(LVar2, 10) - EVT_CALL(MakeItemEntity, ITEM_EGG, LVar0, 100, LVar2, ITEM_SPAWN_MODE_FALL, GF_JAN12_PullVine_Egg2) - EVT_RETURN - EVT_END + Call(GetModelCenter, LVar9) + Add(LVar2, 10) + Call(MakeItemEntity, ITEM_EGG, LVar0, 100, LVar2, ITEM_SPAWN_MODE_FALL, GF_JAN12_PullVine_Egg2) + Return + End }; EvtScript N(EVS_SetupVines) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Inspect_MoveBushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o12, 1, 0) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, jan_12_ENTRY_1) - EVT_EXEC(N(EVS_Inspect_MoveBushes)) - EVT_END_IF - EVT_SET(MV_PullVineCallback, EVT_PTR(N(EVS_OnPullVine))) - EVT_SET(LVarF, MODEL_o47) - EVT_SET(LVarC, 0) - EVT_SET(LVarD, MODEL_o76) - EVT_SET(LVarE, MODEL_o77) - EVT_SET(LVar9, MODEL_o6) - EVT_SET(LVarA, MODEL_o62) - EVT_SET(LVarB, MODEL_o63) - EVT_SET(LVar5, 15) - EVT_EXEC(N(EVS_PullVine_Manage)) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_Inspect_MoveBushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o12, 1, 0) + Call(GetEntryID, LVar0) + IfEq(LVar0, jan_12_ENTRY_1) + Exec(N(EVS_Inspect_MoveBushes)) + EndIf + Set(MV_PullVineCallback, Ref(N(EVS_OnPullVine))) + Set(LVarF, MODEL_o47) + Set(LVarC, 0) + Set(LVarD, MODEL_o76) + Set(LVarE, MODEL_o77) + Set(LVar9, MODEL_o6) + Set(LVarA, MODEL_o62) + Set(LVarB, MODEL_o63) + Set(LVar5, 15) + Exec(N(EVS_PullVine_Manage)) + Return + End }; diff --git a/src/world/area_jan/jan_12/jan_12_3_trees.c b/src/world/area_jan/jan_12/jan_12_3_trees.c index ec13f10d3a2..650d422c269 100644 --- a/src/world/area_jan/jan_12/jan_12_3_trees.c +++ b/src/world/area_jan/jan_12/jan_12_3_trees.c @@ -62,12 +62,12 @@ BombTrigger N(BombPos_Tree2) = { }; EvtScript N(EVS_SetupTrees) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o96, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o97, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o96, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o97, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Return + End }; diff --git a/src/world/area_jan/jan_12/jan_12_4_entity.c b/src/world/area_jan/jan_12/jan_12_4_entity.c index 08fa805aec8..af6e491427a 100644 --- a/src/world/area_jan/jan_12/jan_12_4_entity.c +++ b/src/world/area_jan/jan_12/jan_12_4_entity.c @@ -2,10 +2,10 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_PinkFlower), 130, 0, -110, 170, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BellbellPlant), -350, 30, -55, 25, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), -310, 90, -25, 0, ITEM_STONE_CAP, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_JAN12_HiddenItem_StoneCap) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_PinkFlower), 130, 0, -110, 170, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BellbellPlant), -350, 30, -55, 25, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), -310, 90, -25, 0, ITEM_STONE_CAP, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_JAN12_HiddenItem_StoneCap) + Return + End }; diff --git a/src/world/area_jan/jan_13/jan_13_1_main.c b/src/world/area_jan/jan_13/jan_13_1_main.c index aa014505eea..c32f443341d 100644 --- a/src/world/area_jan/jan_13/jan_13_1_main.c +++ b/src/world/area_jan/jan_13/jan_13_1_main.c @@ -4,25 +4,25 @@ EvtScript N(EVS_ExitWalk_jan_14_0) = EVT_EXIT_WALK(60, jan_13_ENTRY_1, "jan_14", EvtScript N(EVS_ExitWalk_jan_12_1) = EVT_EXIT_WALK(60, jan_13_ENTRY_0, "jan_12", jan_12_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_12_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_14_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_jan_12_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_jan_14_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_JADE_JUNGLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_EXEC(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupPuzzle)) - EVT_EXEC(N(EVS_SetupTrees)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilits, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitn, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CALL(SetMusicTrack, 0, SONG_DEEP_JUNGLE, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_JUNGLE) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_JADE_JUNGLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Exec(N(EVS_MakeEntities)) + Exec(N(EVS_SetupPuzzle)) + Exec(N(EVS_SetupTrees)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilits, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitn, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Call(SetMusicTrack, 0, SONG_DEEP_JUNGLE, 0, 8) + Call(PlayAmbientSounds, AMBIENT_JUNGLE) + Return + End }; diff --git a/src/world/area_jan/jan_13/jan_13_2_puzzle.c b/src/world/area_jan/jan_13/jan_13_2_puzzle.c index 399d4ea2600..509633b1977 100644 --- a/src/world/area_jan/jan_13/jan_13_2_puzzle.c +++ b/src/world/area_jan/jan_13/jan_13_2_puzzle.c @@ -28,8 +28,8 @@ void N(setup_gfx_geyser)(void) { } API_CALLABLE(N(GetRatioFromPercent)) { - script->varTable[2] = EVT_FLOAT_TO_FIXED(script->varTable[1] / 100.0f); - script->varTable[3] = EVT_FLOAT_TO_FIXED(script->varTable[1] / 100.0f); + script->varTable[2] = Float_TO_FIXED(script->varTable[1] / 100.0f); + script->varTable[3] = Float_TO_FIXED(script->varTable[1] / 100.0f); return ApiStatus_DONE2; } @@ -64,155 +64,155 @@ API_CALLABLE(N(GetPlayerPosAfterPush)) { } EvtScript N(EVS_ManageSmallGeyser) = { - EVT_SET(LVarA, LVar0) // geyser model - EVT_SET(LVarB, LVar1) // index in solution - EVT_SET(LVarD, LVar2) // central collider - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(0) + Set(LVarA, LVar0) // geyser model + Set(LVarB, LVar1) // index in solution + Set(LVarD, LVar2) // central collider + Set(LVar0, 0) + Set(LVar1, 0) + Loop(0) // get percent delta - EVT_IF_EQ(LVarB, MV_PuzzleProgress) - EVT_ADD(LVar0, 10) - EVT_ELSE - EVT_ADD(LVar0, -10) - EVT_END_IF + IfEq(LVarB, MV_PuzzleProgress) + Add(LVar0, 10) + Else + Add(LVar0, -10) + EndIf // clamp delta to [-10, 10] - EVT_IF_LT(LVar0, -10) - EVT_SET(LVar0, -10) - EVT_END_IF - EVT_IF_GT(LVar0, 10) - EVT_SET(LVar0, 10) - EVT_END_IF - EVT_ADD(LVar1, LVar0) + IfLt(LVar0, -10) + Set(LVar0, -10) + EndIf + IfGt(LVar0, 10) + Set(LVar0, 10) + EndIf + Add(LVar1, LVar0) // clamp percent to [0, 100] - EVT_IF_LT(LVar1, 0) - EVT_SET(LVar1, 0) - EVT_END_IF - EVT_IF_GT(LVar1, 100) - EVT_SET(LVar1, 100) - EVT_END_IF + IfLt(LVar1, 0) + Set(LVar1, 0) + EndIf + IfGt(LVar1, 100) + Set(LVar1, 100) + EndIf // set geyser scale - EVT_CALL(N(GetRatioFromPercent)) - EVT_IF_EQ(LVar1, 0) - EVT_IF_NE(LVarD, 0) - EVT_END_IF - EVT_CALL(EnableModel, LVarA, FALSE) - EVT_ELSE - EVT_IF_NE(LVarD, 0) - EVT_END_IF - EVT_CALL(EnableModel, LVarA, TRUE) - EVT_CALL(ScaleModel, LVarA, LVar3, LVar2, LVar3) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(N(GetRatioFromPercent)) + IfEq(LVar1, 0) + IfNe(LVarD, 0) + EndIf + Call(EnableModel, LVarA, FALSE) + Else + IfNe(LVarD, 0) + EndIf + Call(EnableModel, LVarA, TRUE) + Call(ScaleModel, LVarA, LVar3, LVar2, LVar3) + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(SetLargeGeyserScale) = { - EVT_CALL(N(GetRatioFromPercent)) - EVT_IF_LT(LVar3, EVT_FLOAT(1.0)) - EVT_SETF(LVar4, LVar3) - EVT_ELSE - EVT_SETF(LVar4, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CALL(ScaleModel, LVarA, LVar4, LVar2, LVar3) - EVT_RETURN - EVT_END + Call(N(GetRatioFromPercent)) + IfLt(LVar3, Float(1.0)) + SetF(LVar4, LVar3) + Else + SetF(LVar4, Float(1.0)) + EndIf + Call(ScaleModel, LVarA, LVar4, LVar2, LVar3) + Return + End }; EvtScript N(EVS_ManageLargeGeyser) = { - EVT_SET(LVarA, LVar0) // geyser model - EVT_SET(LVarB, LVar1) // index in solution - EVT_SET(LVarD, LVar2) // central collider - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_IF_EQ(GF_JAN13_SolvedBlockPuzzle, TRUE) - EVT_GOTO(10) - EVT_END_IF - EVT_LOOP(0) - EVT_IF_EQ(MV_PuzzleProgress, 5) - EVT_IF_EQ(AB_JAN_2, 1) - EVT_ADD(LVar0, 10) - EVT_ELSE - EVT_ADD(LVar0, -10) - EVT_END_IF - EVT_ELSE - EVT_ADD(LVar0, -10) - EVT_END_IF - EVT_IF_LT(LVar0, -10) - EVT_SET(LVar0, -10) - EVT_END_IF - EVT_IF_GT(LVar0, 10) - EVT_SET(LVar0, 10) - EVT_END_IF - EVT_ADD(LVar1, LVar0) - EVT_IF_LT(LVar1, 50) - EVT_SET(LVar1, 50) - EVT_END_IF - EVT_IF_GT(LVar1, 70) - EVT_SET(LVar1, 70) - EVT_END_IF - EVT_IF_EQ(LVar1, 0) - EVT_CALL(EnableModel, LVarA, FALSE) - EVT_WAIT(1) - EVT_ELSE - EVT_CALL(EnableModel, LVarA, TRUE) - EVT_EXEC_WAIT(N(SetLargeGeyserScale)) - EVT_END_IF - EVT_IF_EQ(AB_JAN_2, 2) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(LVar0, 10) - EVT_LOOP(0) - EVT_IF_EQ(MV_PuzzleProgress, 5) - EVT_ADD(LVar1, LVar0) - EVT_IF_GT(LVar1, 300) - EVT_SET(LVar1, 300) - EVT_END_IF - EVT_EXEC_WAIT(N(SetLargeGeyserScale)) - EVT_ELSE - EVT_WAIT(1) - EVT_END_IF - EVT_IF_NE(GF_JAN13_SolvedBlockPuzzle, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(LVar0, -7) - EVT_LOOP(28) - EVT_ADD(LVar1, LVar0) - EVT_EXEC_WAIT(N(SetLargeGeyserScale)) - EVT_END_LOOP - EVT_LABEL(10) - EVT_IF_EQ(MV_PuzzleProgress, 5) - EVT_ADD(LVar0, 10) - EVT_ELSE - EVT_ADD(LVar0, -10) - EVT_END_IF - EVT_IF_LT(LVar0, -10) - EVT_SET(LVar0, -10) - EVT_END_IF - EVT_IF_GT(LVar0, 10) - EVT_SET(LVar0, 10) - EVT_END_IF - EVT_ADD(LVar1, LVar0) - EVT_IF_LT(LVar1, 0) - EVT_SET(LVar1, 0) - EVT_END_IF - EVT_IF_GT(LVar1, 100) - EVT_SET(LVar1, 100) - EVT_END_IF - EVT_IF_EQ(LVar1, 0) - EVT_CALL(EnableModel, LVarA, FALSE) - EVT_WAIT(1) - EVT_ELSE - EVT_CALL(EnableModel, LVarA, TRUE) - EVT_EXEC_WAIT(N(SetLargeGeyserScale)) - EVT_END_IF - EVT_GOTO(10) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) // geyser model + Set(LVarB, LVar1) // index in solution + Set(LVarD, LVar2) // central collider + Set(LVar0, 0) + Set(LVar1, 0) + IfEq(GF_JAN13_SolvedBlockPuzzle, TRUE) + Goto(10) + EndIf + Loop(0) + IfEq(MV_PuzzleProgress, 5) + IfEq(AB_JAN_2, 1) + Add(LVar0, 10) + Else + Add(LVar0, -10) + EndIf + Else + Add(LVar0, -10) + EndIf + IfLt(LVar0, -10) + Set(LVar0, -10) + EndIf + IfGt(LVar0, 10) + Set(LVar0, 10) + EndIf + Add(LVar1, LVar0) + IfLt(LVar1, 50) + Set(LVar1, 50) + EndIf + IfGt(LVar1, 70) + Set(LVar1, 70) + EndIf + IfEq(LVar1, 0) + Call(EnableModel, LVarA, FALSE) + Wait(1) + Else + Call(EnableModel, LVarA, TRUE) + ExecWait(N(SetLargeGeyserScale)) + EndIf + IfEq(AB_JAN_2, 2) + BreakLoop + EndIf + EndLoop + Set(LVar0, 10) + Loop(0) + IfEq(MV_PuzzleProgress, 5) + Add(LVar1, LVar0) + IfGt(LVar1, 300) + Set(LVar1, 300) + EndIf + ExecWait(N(SetLargeGeyserScale)) + Else + Wait(1) + EndIf + IfNe(GF_JAN13_SolvedBlockPuzzle, FALSE) + BreakLoop + EndIf + EndLoop + Set(LVar0, -7) + Loop(28) + Add(LVar1, LVar0) + ExecWait(N(SetLargeGeyserScale)) + EndLoop + Label(10) + IfEq(MV_PuzzleProgress, 5) + Add(LVar0, 10) + Else + Add(LVar0, -10) + EndIf + IfLt(LVar0, -10) + Set(LVar0, -10) + EndIf + IfGt(LVar0, 10) + Set(LVar0, 10) + EndIf + Add(LVar1, LVar0) + IfLt(LVar1, 0) + Set(LVar1, 0) + EndIf + IfGt(LVar1, 100) + Set(LVar1, 100) + EndIf + IfEq(LVar1, 0) + Call(EnableModel, LVarA, FALSE) + Wait(1) + Else + Call(EnableModel, LVarA, TRUE) + ExecWait(N(SetLargeGeyserScale)) + EndIf + Goto(10) + Return + End }; Vec3i N(GeyserSoundPositions)[] = { @@ -225,457 +225,457 @@ Vec3i N(GeyserSoundPositions)[] = { }; EvtScript N(EVS_ManageGeyserSounds) = { - EVT_IF_NE(AB_JAN13_LastPuzzleProgress, MV_PuzzleProgress) - EVT_SET(AB_JAN13_LastPuzzleProgress, MV_PuzzleProgress) - EVT_SET(MF_GeyserSoundPlaying, FALSE) - EVT_CALL(StopSound, SOUND_LOOP_JAN_SMALL_GEYSER) - EVT_CALL(StopSound, SOUND_LOOP_JAN_LARGE_GEYSER) - EVT_IF_EQ(MV_PuzzleProgress, 5) - EVT_IF_EQ(GF_JAN13_SolvedBlockPuzzle, FALSE) - EVT_RETURN - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(MV_PuzzleProgress, 6) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(PlaySound, SOUND_LOOP_JAN_SMALL_GEYSER) - EVT_SET(MF_GeyserSoundPlaying, TRUE) - EVT_SET(LVar0, MV_PuzzleProgress) - EVT_ADD(LVar0, 1) - EVT_USE_BUF(EVT_PTR(N(GeyserSoundPositions))) - EVT_LOOP(LVar0) - EVT_BUF_READ3(LVar1, LVar2, LVar3) - EVT_END_LOOP - EVT_CALL(N(AdjustEnvSoundPosition), MF_GeyserSoundPlaying, LVar1, LVar2, LVar3) - EVT_END_IF - EVT_RETURN - EVT_END + IfNe(AB_JAN13_LastPuzzleProgress, MV_PuzzleProgress) + Set(AB_JAN13_LastPuzzleProgress, MV_PuzzleProgress) + Set(MF_GeyserSoundPlaying, FALSE) + Call(StopSound, SOUND_LOOP_JAN_SMALL_GEYSER) + Call(StopSound, SOUND_LOOP_JAN_LARGE_GEYSER) + IfEq(MV_PuzzleProgress, 5) + IfEq(GF_JAN13_SolvedBlockPuzzle, FALSE) + Return + EndIf + Else + IfEq(MV_PuzzleProgress, 6) + Return + EndIf + EndIf + Call(PlaySound, SOUND_LOOP_JAN_SMALL_GEYSER) + Set(MF_GeyserSoundPlaying, TRUE) + Set(LVar0, MV_PuzzleProgress) + Add(LVar0, 1) + UseBuf(Ref(N(GeyserSoundPositions))) + Loop(LVar0) + BufRead3(LVar1, LVar2, LVar3) + EndLoop + Call(N(AdjustEnvSoundPosition), MF_GeyserSoundPlaying, LVar1, LVar2, LVar3) + EndIf + Return + End }; EvtScript N(EVS_BoulderTremble) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_o33, SOUND_JAN_BOULDER_TREMBLE, 0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.5)) - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_o33, SOUND_JAN_BOULDER_TREMBLE, 0) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.5)) + Return + End }; EvtScript N(EVS_ManagePuzzle) = { - EVT_SET(LFlag0, FALSE) - EVT_SET(AB_JAN_2, 0) - EVT_SET(AB_JAN13_LastPuzzleProgress, -1) - EVT_EXEC(N(EVS_ManageGeyserSounds)) - EVT_LABEL(0) - EVT_IF_EQ(GF_JAN13_SolvedBlockPuzzle, TRUE) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(EnableModel, MODEL_o33, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o33, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetPushBlock, 0, 15, 0, PUSH_GRID_EMPTY) - EVT_CALL(SetPushBlock, 0, 16, 0, PUSH_GRID_EMPTY) - EVT_CALL(SetPushBlock, 0, 17, 0, PUSH_GRID_EMPTY) - EVT_CALL(SetPushBlock, 0, 18, 0, PUSH_GRID_EMPTY) - EVT_CALL(SetPushBlock, 0, 19, 0, PUSH_GRID_EMPTY) - EVT_CALL(SetPushBlock, 0, 15, 1, PUSH_GRID_EMPTY) - EVT_CALL(SetPushBlock, 0, 16, 1, PUSH_GRID_EMPTY) - EVT_CALL(SetPushBlock, 0, 17, 1, PUSH_GRID_EMPTY) - EVT_CALL(SetPushBlock, 0, 18, 1, PUSH_GRID_EMPTY) - EVT_CALL(SetPushBlock, 0, 19, 1, PUSH_GRID_EMPTY) - EVT_CALL(SetPushBlock, 0, 15, 2, PUSH_GRID_EMPTY) - EVT_CALL(SetPushBlock, 0, 16, 2, PUSH_GRID_EMPTY) - EVT_CALL(SetPushBlock, 0, 17, 2, PUSH_GRID_EMPTY) - EVT_CALL(SetPushBlock, 0, 18, 2, PUSH_GRID_EMPTY) - EVT_CALL(SetPushBlock, 0, 19, 2, PUSH_GRID_EMPTY) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_CALL(GetPushBlock, 0, POS_0_I, POS_0_J, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET(MV_PuzzleProgress, 0) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetPushBlock, 0, POS_1_I, POS_1_J, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET(MV_PuzzleProgress, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetPushBlock, 0, POS_2_I, POS_2_J, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET(MV_PuzzleProgress, 2) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetPushBlock, 0, POS_3_I, POS_3_J, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET(MV_PuzzleProgress, 3) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetPushBlock, 0, POS_4_I, POS_4_J, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET(MV_PuzzleProgress, 4) - EVT_GOTO(1) - EVT_END_IF - EVT_IF_EQ(GF_JAN13_SolvedBlockPuzzle, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetPushBlock, 0, 15, 0, PUSH_GRID_EMPTY) - EVT_CALL(SetPushBlock, 0, 16, 0, PUSH_GRID_EMPTY) - EVT_CALL(SetPushBlock, 0, 17, 0, PUSH_GRID_EMPTY) - EVT_CALL(SetPushBlock, 0, 18, 0, PUSH_GRID_EMPTY) - EVT_CALL(SetPushBlock, 0, 19, 0, PUSH_GRID_EMPTY) - EVT_CALL(SetPushBlock, 0, 15, 1, PUSH_GRID_EMPTY) - EVT_CALL(SetPushBlock, 0, 16, 1, PUSH_GRID_EMPTY) - EVT_CALL(SetPushBlock, 0, 17, 1, PUSH_GRID_EMPTY) - EVT_CALL(SetPushBlock, 0, 18, 1, PUSH_GRID_EMPTY) - EVT_CALL(SetPushBlock, 0, 19, 1, PUSH_GRID_EMPTY) - EVT_CALL(SetPushBlock, 0, 15, 2, PUSH_GRID_EMPTY) - EVT_CALL(SetPushBlock, 0, 16, 2, PUSH_GRID_EMPTY) - EVT_CALL(SetPushBlock, 0, 17, 2, PUSH_GRID_EMPTY) - EVT_CALL(SetPushBlock, 0, 18, 2, PUSH_GRID_EMPTY) - EVT_CALL(SetPushBlock, 0, 19, 2, PUSH_GRID_EMPTY) - EVT_SET(MV_PuzzleProgress, 5) - EVT_WAIT(30) - EVT_LOOP(2) - EVT_EXEC(N(EVS_BoulderTremble)) - EVT_CALL(RotateModel, MODEL_o33, 3, 0, EVT_FLOAT(0.2), 1) - EVT_WAIT(8) - EVT_CALL(RotateModel, MODEL_o33, -3, 0, EVT_FLOAT(0.2), 1) - EVT_WAIT(8) - EVT_END_LOOP - EVT_THREAD - EVT_CALL(PlaySoundAtPlayer, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, 0, EMOTE_EXCLAMATION, 0, 20, EMOTER_PLAYER, 0, 0, 0, 0) - EVT_CALL(GetModelCenter, MODEL_o33) - EVT_CALL(FacePlayerTowardPoint, LVar0, LVar2, 4) - EVT_CALL(GetPlayerPos, LVar3, LVar1, LVar2) - EVT_SET(LVar4, LVar0) - EVT_SET(LVar5, LVar0) - EVT_SUB(LVar4, 120) - EVT_ADD(LVar5, 120) - EVT_SWITCH(LVar3) - EVT_CASE_RANGE(LVar4, LVar5) - EVT_ADD(LVar0, LVar3) - EVT_DIV(LVar0, 2) - EVT_END_SWITCH - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 400) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_LOOP(3) - EVT_EXEC(N(EVS_BoulderTremble)) - EVT_CALL(RotateModel, MODEL_o33, 5, 0, EVT_FLOAT(0.2), 1) - EVT_WAIT(5) - EVT_CALL(RotateModel, MODEL_o33, -5, 0, EVT_FLOAT(0.2), 1) - EVT_WAIT(5) - EVT_END_LOOP - EVT_LOOP(7) - EVT_EXEC(N(EVS_BoulderTremble)) - EVT_CALL(RotateModel, MODEL_o33, 7, 0, EVT_FLOAT(0.2), 1) - EVT_WAIT(3) - EVT_CALL(RotateModel, MODEL_o33, -7, 0, EVT_FLOAT(0.2), 1) - EVT_WAIT(3) - EVT_END_LOOP - EVT_LOOP(8) - EVT_CALL(RandInt, 2, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, 8, 0, -82, 0) - EVT_CASE_EQ(1) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, 38, 0, -62, 0) - EVT_CASE_EQ(2) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, 78, 0, -77, 0) - EVT_END_SWITCH - EVT_EXEC(N(EVS_BoulderTremble)) - EVT_CALL(RotateModel, MODEL_o33, 10, 0, EVT_FLOAT(0.2), 1) - EVT_WAIT(3) - EVT_CALL(RotateModel, MODEL_o33, -10, 0, EVT_FLOAT(0.2), 1) - EVT_WAIT(3) - EVT_END_LOOP - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 15, EVT_FLOAT(0.4)) - EVT_END_THREAD - EVT_CALL(PlaySoundAt, SOUND_LOOP_JAN_LARGE_GEYSER, SOUND_SPACE_DEFAULT, 37, 0, -138) - EVT_SET(AB_JAN_2, 1) - EVT_THREAD - EVT_LOOP(200) - EVT_CALL(RotateModel, MODEL_o33, 10, 0, EVT_FLOAT(0.2), 1) - EVT_WAIT(3) - EVT_CALL(RotateModel, MODEL_o33, -10, 0, EVT_FLOAT(0.2), 1) - EVT_WAIT(3) - EVT_END_LOOP - EVT_END_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(18) - EVT_ADD(LVar0, 3) - EVT_CALL(TranslateModel, MODEL_o33, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(60) - EVT_CALL(TranslateModel, MODEL_o33, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(AB_JAN_2, 2) - EVT_LOOP(25) - EVT_ADD(LVar0, 8) - EVT_CALL(TranslateModel, MODEL_o33, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(LVar0, 200) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LOOP(60) - EVT_ADD(LVar1, 1) - EVT_SUB(LVar0, LVar1) - EVT_ADD(LVar2, 10) - EVT_ADD(LVar2, -10) - EVT_CALL(TranslateModel, MODEL_o33, -200, LVar0, -500) - EVT_CALL(RotateModel, MODEL_o33, LVar2, -1, EVT_FLOAT(0.1), EVT_FLOAT(0.1)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EnableModel, MODEL_o33, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o33, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GF_JAN13_SolvedBlockPuzzle, TRUE) - EVT_SET(LFlag0, TRUE) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ELSE - EVT_CALL(GetPushBlock, 0, 17, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET(MV_PuzzleProgress, 5) - EVT_GOTO(1) - EVT_END_IF - EVT_END_IF - EVT_SET(MV_PuzzleProgress, 6) - EVT_LABEL(1) - EVT_EXEC(N(EVS_ManageGeyserSounds)) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LFlag0, FALSE) + Set(AB_JAN_2, 0) + Set(AB_JAN13_LastPuzzleProgress, -1) + Exec(N(EVS_ManageGeyserSounds)) + Label(0) + IfEq(GF_JAN13_SolvedBlockPuzzle, TRUE) + IfEq(LFlag0, FALSE) + Call(EnableModel, MODEL_o33, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o33, COLLIDER_FLAGS_UPPER_MASK) + Call(SetPushBlock, 0, 15, 0, PUSH_GRID_EMPTY) + Call(SetPushBlock, 0, 16, 0, PUSH_GRID_EMPTY) + Call(SetPushBlock, 0, 17, 0, PUSH_GRID_EMPTY) + Call(SetPushBlock, 0, 18, 0, PUSH_GRID_EMPTY) + Call(SetPushBlock, 0, 19, 0, PUSH_GRID_EMPTY) + Call(SetPushBlock, 0, 15, 1, PUSH_GRID_EMPTY) + Call(SetPushBlock, 0, 16, 1, PUSH_GRID_EMPTY) + Call(SetPushBlock, 0, 17, 1, PUSH_GRID_EMPTY) + Call(SetPushBlock, 0, 18, 1, PUSH_GRID_EMPTY) + Call(SetPushBlock, 0, 19, 1, PUSH_GRID_EMPTY) + Call(SetPushBlock, 0, 15, 2, PUSH_GRID_EMPTY) + Call(SetPushBlock, 0, 16, 2, PUSH_GRID_EMPTY) + Call(SetPushBlock, 0, 17, 2, PUSH_GRID_EMPTY) + Call(SetPushBlock, 0, 18, 2, PUSH_GRID_EMPTY) + Call(SetPushBlock, 0, 19, 2, PUSH_GRID_EMPTY) + Set(LFlag0, TRUE) + EndIf + EndIf + Call(GetPushBlock, 0, POS_0_I, POS_0_J, LVar0) + IfEq(LVar0, 0) + Set(MV_PuzzleProgress, 0) + Goto(1) + EndIf + Call(GetPushBlock, 0, POS_1_I, POS_1_J, LVar0) + IfEq(LVar0, 0) + Set(MV_PuzzleProgress, 1) + Goto(1) + EndIf + Call(GetPushBlock, 0, POS_2_I, POS_2_J, LVar0) + IfEq(LVar0, 0) + Set(MV_PuzzleProgress, 2) + Goto(1) + EndIf + Call(GetPushBlock, 0, POS_3_I, POS_3_J, LVar0) + IfEq(LVar0, 0) + Set(MV_PuzzleProgress, 3) + Goto(1) + EndIf + Call(GetPushBlock, 0, POS_4_I, POS_4_J, LVar0) + IfEq(LVar0, 0) + Set(MV_PuzzleProgress, 4) + Goto(1) + EndIf + IfEq(GF_JAN13_SolvedBlockPuzzle, FALSE) + Call(DisablePlayerInput, TRUE) + Call(SetPushBlock, 0, 15, 0, PUSH_GRID_EMPTY) + Call(SetPushBlock, 0, 16, 0, PUSH_GRID_EMPTY) + Call(SetPushBlock, 0, 17, 0, PUSH_GRID_EMPTY) + Call(SetPushBlock, 0, 18, 0, PUSH_GRID_EMPTY) + Call(SetPushBlock, 0, 19, 0, PUSH_GRID_EMPTY) + Call(SetPushBlock, 0, 15, 1, PUSH_GRID_EMPTY) + Call(SetPushBlock, 0, 16, 1, PUSH_GRID_EMPTY) + Call(SetPushBlock, 0, 17, 1, PUSH_GRID_EMPTY) + Call(SetPushBlock, 0, 18, 1, PUSH_GRID_EMPTY) + Call(SetPushBlock, 0, 19, 1, PUSH_GRID_EMPTY) + Call(SetPushBlock, 0, 15, 2, PUSH_GRID_EMPTY) + Call(SetPushBlock, 0, 16, 2, PUSH_GRID_EMPTY) + Call(SetPushBlock, 0, 17, 2, PUSH_GRID_EMPTY) + Call(SetPushBlock, 0, 18, 2, PUSH_GRID_EMPTY) + Call(SetPushBlock, 0, 19, 2, PUSH_GRID_EMPTY) + Set(MV_PuzzleProgress, 5) + Wait(30) + Loop(2) + Exec(N(EVS_BoulderTremble)) + Call(RotateModel, MODEL_o33, 3, 0, Float(0.2), 1) + Wait(8) + Call(RotateModel, MODEL_o33, -3, 0, Float(0.2), 1) + Wait(8) + EndLoop + Thread + Call(PlaySoundAtPlayer, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, 0, EMOTE_EXCLAMATION, 0, 20, EMOTER_PLAYER, 0, 0, 0, 0) + Call(GetModelCenter, MODEL_o33) + Call(FacePlayerTowardPoint, LVar0, LVar2, 4) + Call(GetPlayerPos, LVar3, LVar1, LVar2) + Set(LVar4, LVar0) + Set(LVar5, LVar0) + Sub(LVar4, 120) + Add(LVar5, 120) + Switch(LVar3) + CaseRange(LVar4, LVar5) + Add(LVar0, LVar3) + Div(LVar0, 2) + EndSwitch + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 400) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Loop(3) + Exec(N(EVS_BoulderTremble)) + Call(RotateModel, MODEL_o33, 5, 0, Float(0.2), 1) + Wait(5) + Call(RotateModel, MODEL_o33, -5, 0, Float(0.2), 1) + Wait(5) + EndLoop + Loop(7) + Exec(N(EVS_BoulderTremble)) + Call(RotateModel, MODEL_o33, 7, 0, Float(0.2), 1) + Wait(3) + Call(RotateModel, MODEL_o33, -7, 0, Float(0.2), 1) + Wait(3) + EndLoop + Loop(8) + Call(RandInt, 2, LVar0) + Switch(LVar0) + CaseEq(0) + PlayEffect(EFFECT_LANDING_DUST, 1, 8, 0, -82, 0) + CaseEq(1) + PlayEffect(EFFECT_LANDING_DUST, 1, 38, 0, -62, 0) + CaseEq(2) + PlayEffect(EFFECT_LANDING_DUST, 1, 78, 0, -77, 0) + EndSwitch + Exec(N(EVS_BoulderTremble)) + Call(RotateModel, MODEL_o33, 10, 0, Float(0.2), 1) + Wait(3) + Call(RotateModel, MODEL_o33, -10, 0, Float(0.2), 1) + Wait(3) + EndLoop + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 15, Float(0.4)) + EndThread + Call(PlaySoundAt, SOUND_LOOP_JAN_LARGE_GEYSER, SOUND_SPACE_DEFAULT, 37, 0, -138) + Set(AB_JAN_2, 1) + Thread + Loop(200) + Call(RotateModel, MODEL_o33, 10, 0, Float(0.2), 1) + Wait(3) + Call(RotateModel, MODEL_o33, -10, 0, Float(0.2), 1) + Wait(3) + EndLoop + EndThread + Set(LVar0, 0) + Loop(18) + Add(LVar0, 3) + Call(TranslateModel, MODEL_o33, 0, LVar0, 0) + Wait(1) + EndLoop + Loop(60) + Call(TranslateModel, MODEL_o33, 0, LVar0, 0) + Wait(1) + EndLoop + Set(AB_JAN_2, 2) + Loop(25) + Add(LVar0, 8) + Call(TranslateModel, MODEL_o33, 0, LVar0, 0) + Wait(1) + EndLoop + Set(LVar0, 200) + Set(LVar1, 0) + Set(LVar2, 0) + Loop(60) + Add(LVar1, 1) + Sub(LVar0, LVar1) + Add(LVar2, 10) + Add(LVar2, -10) + Call(TranslateModel, MODEL_o33, -200, LVar0, -500) + Call(RotateModel, MODEL_o33, LVar2, -1, Float(0.1), Float(0.1)) + Wait(1) + EndLoop + Call(EnableModel, MODEL_o33, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o33, COLLIDER_FLAGS_UPPER_MASK) + Set(GF_JAN13_SolvedBlockPuzzle, TRUE) + Set(LFlag0, TRUE) + Call(ResetCam, CAM_DEFAULT, Float(5.0)) + Call(DisablePlayerInput, FALSE) + Else + Call(GetPushBlock, 0, 17, 0, LVar0) + IfEq(LVar0, 0) + Set(MV_PuzzleProgress, 5) + Goto(1) + EndIf + EndIf + Set(MV_PuzzleProgress, 6) + Label(1) + Exec(N(EVS_ManageGeyserSounds)) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_ManageGeyserPlayerPhysics) = { - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetGridIndexFromPos, 0, LVar0, LVar1, LVar2, LVar3, LVar4) - EVT_SET(LVar5, 0) - EVT_IF_EQ(MV_PuzzleProgress, 0) - EVT_IF_EQ(LVar3, POS_0_I) - EVT_IF_EQ(LVar4, POS_0_J) - EVT_SET(LVar5, 1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(MV_PuzzleProgress, 1) - EVT_IF_EQ(LVar3, POS_1_I) - EVT_IF_EQ(LVar4, POS_1_J) - EVT_SET(LVar5, 1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(MV_PuzzleProgress, 2) - EVT_IF_EQ(LVar3, POS_2_I) - EVT_IF_EQ(LVar4, POS_2_J) - EVT_SET(LVar5, 1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(MV_PuzzleProgress, 3) - EVT_IF_EQ(LVar3, POS_3_I) - EVT_IF_EQ(LVar4, POS_3_J) - EVT_SET(LVar5, 1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(MV_PuzzleProgress, 4) - EVT_IF_EQ(LVar3, POS_4_I) - EVT_IF_EQ(LVar4, POS_4_J) - EVT_SET(LVar5, 1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(MV_PuzzleProgress, 5) - EVT_IF_EQ(LVar3, 17) - EVT_IF_EQ(LVar4, 0) - EVT_SET(LVar5, 1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(MV_PuzzleProgress, 5) - EVT_IF_EQ(LVar3, 16) - EVT_IF_EQ(LVar4, 0) - EVT_SET(LVar5, 1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(MV_PuzzleProgress, 5) - EVT_IF_EQ(LVar3, 18) - EVT_IF_EQ(LVar4, 0) - EVT_SET(LVar5, 1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(MV_PuzzleProgress, 5) - EVT_IF_EQ(LVar3, 19) - EVT_IF_EQ(LVar4, 0) - EVT_SET(LVar5, 1) - EVT_END_IF - EVT_END_IF - EVT_END_IF + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetGridIndexFromPos, 0, LVar0, LVar1, LVar2, LVar3, LVar4) + Set(LVar5, 0) + IfEq(MV_PuzzleProgress, 0) + IfEq(LVar3, POS_0_I) + IfEq(LVar4, POS_0_J) + Set(LVar5, 1) + EndIf + EndIf + EndIf + IfEq(MV_PuzzleProgress, 1) + IfEq(LVar3, POS_1_I) + IfEq(LVar4, POS_1_J) + Set(LVar5, 1) + EndIf + EndIf + EndIf + IfEq(MV_PuzzleProgress, 2) + IfEq(LVar3, POS_2_I) + IfEq(LVar4, POS_2_J) + Set(LVar5, 1) + EndIf + EndIf + EndIf + IfEq(MV_PuzzleProgress, 3) + IfEq(LVar3, POS_3_I) + IfEq(LVar4, POS_3_J) + Set(LVar5, 1) + EndIf + EndIf + EndIf + IfEq(MV_PuzzleProgress, 4) + IfEq(LVar3, POS_4_I) + IfEq(LVar4, POS_4_J) + Set(LVar5, 1) + EndIf + EndIf + EndIf + IfEq(MV_PuzzleProgress, 5) + IfEq(LVar3, 17) + IfEq(LVar4, 0) + Set(LVar5, 1) + EndIf + EndIf + EndIf + IfEq(MV_PuzzleProgress, 5) + IfEq(LVar3, 16) + IfEq(LVar4, 0) + Set(LVar5, 1) + EndIf + EndIf + EndIf + IfEq(MV_PuzzleProgress, 5) + IfEq(LVar3, 18) + IfEq(LVar4, 0) + Set(LVar5, 1) + EndIf + EndIf + EndIf + IfEq(MV_PuzzleProgress, 5) + IfEq(LVar3, 19) + IfEq(LVar4, 0) + Set(LVar5, 1) + EndIf + EndIf + EndIf // player is standing in a geyser - EVT_IF_EQ(LVar5, 1) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(GetPlayerPosAfterPush)) - EVT_CALL(InterruptUsePartner) - EVT_LOOP(10) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_IF_LT(LVar4, 40) - EVT_ADDF(LVar4, 6) - EVT_END_IF - EVT_MULF(LVar3, 10) - EVT_MULF(LVar5, 10) - EVT_ADDF(LVar3, LVar0) - EVT_ADDF(LVar5, LVar2) - EVT_DIVF(LVar3, 11) - EVT_DIVF(LVar5, 11) - EVT_CALL(SetPlayerPos, LVar3, LVar4, LVar5) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_FallBack) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + IfEq(LVar5, 1) + Call(DisablePlayerInput, TRUE) + Call(N(GetPlayerPosAfterPush)) + Call(InterruptUsePartner) + Loop(10) + Call(GetPlayerPos, LVar3, LVar4, LVar5) + IfLt(LVar4, 40) + AddF(LVar4, 6) + EndIf + MulF(LVar3, 10) + MulF(LVar5, 10) + AddF(LVar3, LVar0) + AddF(LVar5, LVar2) + DivF(LVar3, 11) + DivF(LVar5, 11) + Call(SetPlayerPos, LVar3, LVar4, LVar5) + Call(SetPlayerAnimation, ANIM_Mario1_FallBack) + Wait(1) + EndLoop + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(DisablePlayerInput, FALSE) + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_SetupPuzzle) = { - EVT_CALL(CreatePushBlockGrid, 0, 32, 12, -400, 0, -150, 0) - EVT_CALL(SetPushBlock, 0, 7, 5, PUSH_GRID_BLOCK) - EVT_CALL(SetPushBlock, 0, 13, 9, PUSH_GRID_BLOCK) - EVT_CALL(SetPushBlock, 0, 16, 5, PUSH_GRID_BLOCK) - EVT_CALL(SetPushBlock, 0, 21, 2, PUSH_GRID_BLOCK) - EVT_CALL(SetPushBlock, 0, 22, 4, PUSH_GRID_BLOCK) - EVT_CALL(SetPushBlock, 0, 26, 6, PUSH_GRID_BLOCK) - EVT_CALL(SetPushBlock, 0, 27, 7, PUSH_GRID_BLOCK) - EVT_CALL(SetPushBlock, 0, 15, 0, PUSH_GRID_OBSTRUCTION) - EVT_CALL(SetPushBlock, 0, 16, 0, PUSH_GRID_OBSTRUCTION) - EVT_CALL(SetPushBlock, 0, 17, 0, PUSH_GRID_OBSTRUCTION) - EVT_CALL(SetPushBlock, 0, 18, 0, PUSH_GRID_OBSTRUCTION) - EVT_CALL(SetPushBlock, 0, 19, 0, PUSH_GRID_OBSTRUCTION) - EVT_CALL(SetPushBlock, 0, 15, 1, PUSH_GRID_OBSTRUCTION) - EVT_CALL(SetPushBlock, 0, 16, 1, PUSH_GRID_OBSTRUCTION) - EVT_CALL(SetPushBlock, 0, 17, 1, PUSH_GRID_OBSTRUCTION) - EVT_CALL(SetPushBlock, 0, 18, 1, PUSH_GRID_OBSTRUCTION) - EVT_CALL(SetPushBlock, 0, 19, 1, PUSH_GRID_OBSTRUCTION) - EVT_CALL(SetPushBlock, 0, 15, 2, PUSH_GRID_OBSTRUCTION) - EVT_CALL(SetPushBlock, 0, 16, 2, PUSH_GRID_OBSTRUCTION) - EVT_CALL(SetPushBlock, 0, 17, 2, PUSH_GRID_OBSTRUCTION) - EVT_CALL(SetPushBlock, 0, 18, 2, PUSH_GRID_OBSTRUCTION) - EVT_CALL(SetPushBlock, 0, 19, 2, PUSH_GRID_OBSTRUCTION) + Call(CreatePushBlockGrid, 0, 32, 12, -400, 0, -150, 0) + Call(SetPushBlock, 0, 7, 5, PUSH_GRID_BLOCK) + Call(SetPushBlock, 0, 13, 9, PUSH_GRID_BLOCK) + Call(SetPushBlock, 0, 16, 5, PUSH_GRID_BLOCK) + Call(SetPushBlock, 0, 21, 2, PUSH_GRID_BLOCK) + Call(SetPushBlock, 0, 22, 4, PUSH_GRID_BLOCK) + Call(SetPushBlock, 0, 26, 6, PUSH_GRID_BLOCK) + Call(SetPushBlock, 0, 27, 7, PUSH_GRID_BLOCK) + Call(SetPushBlock, 0, 15, 0, PUSH_GRID_OBSTRUCTION) + Call(SetPushBlock, 0, 16, 0, PUSH_GRID_OBSTRUCTION) + Call(SetPushBlock, 0, 17, 0, PUSH_GRID_OBSTRUCTION) + Call(SetPushBlock, 0, 18, 0, PUSH_GRID_OBSTRUCTION) + Call(SetPushBlock, 0, 19, 0, PUSH_GRID_OBSTRUCTION) + Call(SetPushBlock, 0, 15, 1, PUSH_GRID_OBSTRUCTION) + Call(SetPushBlock, 0, 16, 1, PUSH_GRID_OBSTRUCTION) + Call(SetPushBlock, 0, 17, 1, PUSH_GRID_OBSTRUCTION) + Call(SetPushBlock, 0, 18, 1, PUSH_GRID_OBSTRUCTION) + Call(SetPushBlock, 0, 19, 1, PUSH_GRID_OBSTRUCTION) + Call(SetPushBlock, 0, 15, 2, PUSH_GRID_OBSTRUCTION) + Call(SetPushBlock, 0, 16, 2, PUSH_GRID_OBSTRUCTION) + Call(SetPushBlock, 0, 17, 2, PUSH_GRID_OBSTRUCTION) + Call(SetPushBlock, 0, 18, 2, PUSH_GRID_OBSTRUCTION) + Call(SetPushBlock, 0, 19, 2, PUSH_GRID_OBSTRUCTION) // obstruct row 0 - EVT_SET(LVar0, 0) - EVT_LOOP(32) - EVT_CALL(SetPushBlock, 0, LVar0, 0, PUSH_GRID_OBSTRUCTION) - EVT_ADD(LVar0, 1) - EVT_END_LOOP + Set(LVar0, 0) + Loop(32) + Call(SetPushBlock, 0, LVar0, 0, PUSH_GRID_OBSTRUCTION) + Add(LVar0, 1) + EndLoop // obstruct row 1 from 0 to 15 - EVT_SET(LVar0, 0) - EVT_LOOP(15) - EVT_CALL(SetPushBlock, 0, LVar0, 1, PUSH_GRID_OBSTRUCTION) - EVT_ADD(LVar0, 1) - EVT_END_LOOP + Set(LVar0, 0) + Loop(15) + Call(SetPushBlock, 0, LVar0, 1, PUSH_GRID_OBSTRUCTION) + Add(LVar0, 1) + EndLoop // obstruct row 1 from 0 to 32 - EVT_SET(LVar0, 20) - EVT_LOOP(12) - EVT_CALL(SetPushBlock, 0, LVar0, 1, PUSH_GRID_OBSTRUCTION) - EVT_ADD(LVar0, 1) - EVT_END_LOOP + Set(LVar0, 20) + Loop(12) + Call(SetPushBlock, 0, LVar0, 1, PUSH_GRID_OBSTRUCTION) + Add(LVar0, 1) + EndLoop // obstruct row 2 from 0 to 3 - EVT_SET(LVar0, 0) - EVT_LOOP(3) - EVT_CALL(SetPushBlock, 0, LVar0, 2, PUSH_GRID_OBSTRUCTION) - EVT_ADD(LVar0, 1) - EVT_END_LOOP + Set(LVar0, 0) + Loop(3) + Call(SetPushBlock, 0, LVar0, 2, PUSH_GRID_OBSTRUCTION) + Add(LVar0, 1) + EndLoop // obstruct row 2 from 10 to 14 - EVT_SET(LVar0, 10) - EVT_LOOP(4) - EVT_CALL(SetPushBlock, 0, LVar0, 2, PUSH_GRID_OBSTRUCTION) - EVT_ADD(LVar0, 1) - EVT_END_LOOP + Set(LVar0, 10) + Loop(4) + Call(SetPushBlock, 0, LVar0, 2, PUSH_GRID_OBSTRUCTION) + Add(LVar0, 1) + EndLoop // obstruct row 2 from 26 to 32 - EVT_SET(LVar0, 26) - EVT_LOOP(6) - EVT_CALL(SetPushBlock, 0, LVar0, 2, PUSH_GRID_OBSTRUCTION) - EVT_ADD(LVar0, 1) - EVT_END_LOOP + Set(LVar0, 26) + Loop(6) + Call(SetPushBlock, 0, LVar0, 2, PUSH_GRID_OBSTRUCTION) + Add(LVar0, 1) + EndLoop // obstruct row 3 from 0 to 2 - EVT_SET(LVar0, 0) - EVT_LOOP(2) - EVT_CALL(SetPushBlock, 0, LVar0, 3, PUSH_GRID_OBSTRUCTION) - EVT_ADD(LVar0, 1) - EVT_END_LOOP + Set(LVar0, 0) + Loop(2) + Call(SetPushBlock, 0, LVar0, 3, PUSH_GRID_OBSTRUCTION) + Add(LVar0, 1) + EndLoop // obstruct row 3 from 10 to 14 - EVT_SET(LVar0, 10) - EVT_LOOP(4) - EVT_CALL(SetPushBlock, 0, LVar0, 3, PUSH_GRID_OBSTRUCTION) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_EXEC(N(EVS_ManagePuzzle)) - EVT_SET(LVar0, MODEL_o72) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, COLLIDER_o50) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVar2, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_ManageSmallGeyser)) - EVT_SET(LVar0, MODEL_o73) - EVT_SET(LVar1, 1) - EVT_SET(LVar2, COLLIDER_o51) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVar2, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_ManageSmallGeyser)) - EVT_SET(LVar0, MODEL_o74) - EVT_SET(LVar1, 2) - EVT_SET(LVar2, COLLIDER_o52) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVar2, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_ManageSmallGeyser)) - EVT_SET(LVar0, MODEL_o75) - EVT_SET(LVar1, 3) - EVT_SET(LVar2, COLLIDER_o53) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVar2, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_ManageSmallGeyser)) - EVT_SET(LVar0, MODEL_o76) - EVT_SET(LVar1, 4) - EVT_SET(LVar2, COLLIDER_o49) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVar2, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_ManageSmallGeyser)) - EVT_SET(LVar0, MODEL_o71) - EVT_SET(LVar1, 5) - EVT_SET(LVar2, COLLIDER_o76) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVar2, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_ManageLargeGeyser)) - EVT_EXEC(N(EVS_ManageGeyserPlayerPhysics)) - EVT_CALL(EnableTexPanning, MODEL_o72, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o73, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o74, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o75, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o76, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o71, TRUE) - EVT_CALL(SetModelCustomGfx, MODEL_o72, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_o73, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_o74, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_o75, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_o76, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_o71, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_0, EVT_PTR(N(setup_gfx_geyser)), NULL) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_SUB(LVar0, 2000) - EVT_IF_LT(LVar0, -0x10000) - EVT_ADD(LVar0, 0x10000) - EVT_END_IF - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVar0, 10) + Loop(4) + Call(SetPushBlock, 0, LVar0, 3, PUSH_GRID_OBSTRUCTION) + Add(LVar0, 1) + EndLoop + Exec(N(EVS_ManagePuzzle)) + Set(LVar0, MODEL_o72) + Set(LVar1, 0) + Set(LVar2, COLLIDER_o50) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVar2, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_ManageSmallGeyser)) + Set(LVar0, MODEL_o73) + Set(LVar1, 1) + Set(LVar2, COLLIDER_o51) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVar2, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_ManageSmallGeyser)) + Set(LVar0, MODEL_o74) + Set(LVar1, 2) + Set(LVar2, COLLIDER_o52) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVar2, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_ManageSmallGeyser)) + Set(LVar0, MODEL_o75) + Set(LVar1, 3) + Set(LVar2, COLLIDER_o53) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVar2, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_ManageSmallGeyser)) + Set(LVar0, MODEL_o76) + Set(LVar1, 4) + Set(LVar2, COLLIDER_o49) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVar2, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_ManageSmallGeyser)) + Set(LVar0, MODEL_o71) + Set(LVar1, 5) + Set(LVar2, COLLIDER_o76) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVar2, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_ManageLargeGeyser)) + Exec(N(EVS_ManageGeyserPlayerPhysics)) + Call(EnableTexPanning, MODEL_o72, TRUE) + Call(EnableTexPanning, MODEL_o73, TRUE) + Call(EnableTexPanning, MODEL_o74, TRUE) + Call(EnableTexPanning, MODEL_o75, TRUE) + Call(EnableTexPanning, MODEL_o76, TRUE) + Call(EnableTexPanning, MODEL_o71, TRUE) + Call(SetModelCustomGfx, MODEL_o72, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_o73, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_o74, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_o75, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_o76, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_o71, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetCustomGfxBuilders, CUSTOM_GFX_0, Ref(N(setup_gfx_geyser)), NULL) + Set(LVar0, 0) + Loop(0) + Sub(LVar0, 2000) + IfLt(LVar0, -0x10000) + Add(LVar0, 0x10000) + EndIf + Call(SetTexPanOffset, TEX_PANNER_1, 0, 0, LVar0) + Wait(1) + EndLoop + Return + End }; diff --git a/src/world/area_jan/jan_13/jan_13_3_trees.c b/src/world/area_jan/jan_13/jan_13_3_trees.c index 9e543f08c9a..bffe7cd59a5 100644 --- a/src/world/area_jan/jan_13/jan_13_3_trees.c +++ b/src/world/area_jan/jan_13/jan_13_3_trees.c @@ -62,12 +62,12 @@ BombTrigger N(BombPos_Tree2) = { }; EvtScript N(EVS_SetupTrees) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o113, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o110, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o113, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o110, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Return + End }; diff --git a/src/world/area_jan/jan_13/jan_13_4_entity.c b/src/world/area_jan/jan_13/jan_13_4_entity.c index 7189febdfca..e28d9974193 100644 --- a/src/world/area_jan/jan_13/jan_13_4_entity.c +++ b/src/world/area_jan/jan_13/jan_13_4_entity.c @@ -2,10 +2,10 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_PinkFlower), -169, 0, -115, 10, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), -185, 85, -35, 0, ITEM_VOLT_SHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_JAN13_HiddenItem_VoltShroom) - EVT_CALL(UseDynamicShadow, TRUE) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_PinkFlower), -169, 0, -115, 10, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), -185, 85, -35, 0, ITEM_VOLT_SHROOM, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_JAN13_HiddenItem_VoltShroom) + Call(UseDynamicShadow, TRUE) + Return + End }; diff --git a/src/world/area_jan/jan_14/jan_14_1_main.c b/src/world/area_jan/jan_14/jan_14_1_main.c index 691032465f9..84291cad3f5 100644 --- a/src/world/area_jan/jan_14/jan_14_1_main.c +++ b/src/world/area_jan/jan_14/jan_14_1_main.c @@ -4,25 +4,25 @@ EvtScript N(EVS_ExitWalk_jan_15_0) = EVT_EXIT_WALK(60, jan_14_ENTRY_1, "jan_15", EvtScript N(EVS_ExitWalk_jan_13_1) = EVT_EXIT_WALK(60, jan_14_ENTRY_0, "jan_13", jan_13_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_13_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_15_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_jan_13_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_jan_15_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_JADE_JUNGLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_SetupVines)) - EVT_EXEC(N(EVS_SetupTrees)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilits, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitn, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CALL(SetMusicTrack, 0, SONG_DEEP_JUNGLE, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_JUNGLE) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_JADE_JUNGLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Exec(N(EVS_SetupVines)) + Exec(N(EVS_SetupTrees)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilits, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitn, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Call(SetMusicTrack, 0, SONG_DEEP_JUNGLE, 0, 8) + Call(PlayAmbientSounds, AMBIENT_JUNGLE) + Return + End }; diff --git a/src/world/area_jan/jan_14/jan_14_2_vines.c b/src/world/area_jan/jan_14/jan_14_2_vines.c index 89fba3a4daf..b4ead3a80bb 100644 --- a/src/world/area_jan/jan_14/jan_14_2_vines.c +++ b/src/world/area_jan/jan_14/jan_14_2_vines.c @@ -19,108 +19,108 @@ EvtScript N(EVS_MoveBushes_Separate) = EVT_MOVE_BUSHES(COLLIDER_o12, MODEL_o40, MODEL_o54, MV_BushOffsetL, MV_BushOffsetR); EvtScript N(EVS_MoveBushes) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o12, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(MakeLerp, 0, 45, 30, EASING_CUBIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(MV_BushOffsetR, LVar0) - EVT_SETF(MV_BushOffsetL, MV_BushOffsetR) - EVT_MULF(MV_BushOffsetR, EVT_FLOAT(1.5)) - EVT_MULF(MV_BushOffsetL, -1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o12, COLLIDER_FLAGS_UPPER_MASK) + Call(MakeLerp, 0, 45, 30, EASING_CUBIC_OUT) + Loop(0) + Call(UpdateLerp) + SetF(MV_BushOffsetR, LVar0) + SetF(MV_BushOffsetL, MV_BushOffsetR) + MulF(MV_BushOffsetR, Float(1.5)) + MulF(MV_BushOffsetL, -1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_OnPullVine) = { - EVT_SWITCH(LVarC) - EVT_CASE_EQ(VINE_IDX_1) - EVT_EXEC(N(EVS_MoveBushes_Separate)) - EVT_EXEC(N(EVS_MoveBushes)) - EVT_CASE_EQ(VINE_IDX_2) - EVT_CALL(GetModelCenter, LVar9) - EVT_ADD(LVar0, -20) - EVT_ADD(LVar2, 15) - EVT_CALL(SetNpcPos, NPC_JungleFuzzy_01, LVar0, 100, LVar2) - EVT_CALL(SetNpcFlagBits, NPC_JungleFuzzy_01, NPC_FLAG_GRAVITY | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_CASE_EQ(VINE_IDX_3) - EVT_CALL(GetModelCenter, LVar9) - EVT_ADD(LVar2, 15) - EVT_CALL(MakeItemEntity, ITEM_FIRE_FLOWER, LVar0, 100, LVar2, ITEM_SPAWN_MODE_FALL, GF_JAN14_PullVine_FireFlower) - EVT_CASE_EQ(VINE_IDX_4) - EVT_CALL(GetModelCenter, LVar9) - EVT_ADD(LVar0, -20) - EVT_ADD(LVar2, 15) - EVT_CALL(SetNpcPos, NPC_JungleFuzzy_02, LVar0, 100, LVar2) - EVT_CALL(SetNpcFlagBits, NPC_JungleFuzzy_02, NPC_FLAG_GRAVITY | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_CASE_EQ(VINE_IDX_5) - EVT_CALL(GetModelCenter, LVar9) - EVT_ADD(LVar2, 15) - EVT_CALL(MakeItemEntity, ITEM_MUSHROOM, LVar0, 100, LVar2, ITEM_SPAWN_MODE_FALL, GF_JAN14_PullVine_Mushroom) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVarC) + CaseEq(VINE_IDX_1) + Exec(N(EVS_MoveBushes_Separate)) + Exec(N(EVS_MoveBushes)) + CaseEq(VINE_IDX_2) + Call(GetModelCenter, LVar9) + Add(LVar0, -20) + Add(LVar2, 15) + Call(SetNpcPos, NPC_JungleFuzzy_01, LVar0, 100, LVar2) + Call(SetNpcFlagBits, NPC_JungleFuzzy_01, NPC_FLAG_GRAVITY | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + CaseEq(VINE_IDX_3) + Call(GetModelCenter, LVar9) + Add(LVar2, 15) + Call(MakeItemEntity, ITEM_FIRE_FLOWER, LVar0, 100, LVar2, ITEM_SPAWN_MODE_FALL, GF_JAN14_PullVine_FireFlower) + CaseEq(VINE_IDX_4) + Call(GetModelCenter, LVar9) + Add(LVar0, -20) + Add(LVar2, 15) + Call(SetNpcPos, NPC_JungleFuzzy_02, LVar0, 100, LVar2) + Call(SetNpcFlagBits, NPC_JungleFuzzy_02, NPC_FLAG_GRAVITY | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + CaseEq(VINE_IDX_5) + Call(GetModelCenter, LVar9) + Add(LVar2, 15) + Call(MakeItemEntity, ITEM_MUSHROOM, LVar0, 100, LVar2, ITEM_SPAWN_MODE_FALL, GF_JAN14_PullVine_Mushroom) + EndSwitch + Return + End }; EvtScript N(EVS_SetupVines) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o10, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o78, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o79, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o76, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o80, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, jan_14_ENTRY_1) - EVT_SET(LVarC, VINE_IDX_1) - EVT_ELSE - EVT_SET(LVarC, VINE_IDX_0) - EVT_EXEC(N(EVS_MoveBushes_Separate)) - EVT_EXEC(N(EVS_MoveBushes)) - EVT_END_IF - EVT_SET(LVarF, MODEL_o28) - EVT_SET(MV_PullVineCallback, EVT_PTR(N(EVS_OnPullVine))) - EVT_SET(LVarD, MODEL_o8) - EVT_SET(LVarE, MODEL_o9) - EVT_SET(LVar9, MODEL_o57) - EVT_SET(LVarA, MODEL_o58) - EVT_SET(LVarB, MODEL_o59) - EVT_SET(LVar5, 0) - EVT_EXEC(N(EVS_PullVine_Manage)) - EVT_SET(LVarC, VINE_IDX_2) - EVT_SET(LVarD, MODEL_o78) - EVT_SET(LVarE, MODEL_o79) - EVT_SET(LVar9, MODEL_o61) - EVT_SET(LVarA, MODEL_o62) - EVT_SET(LVarB, MODEL_o63) - EVT_SET(LVar5, 15) - EVT_EXEC(N(EVS_PullVine_Manage)) - EVT_SET(LVarC, VINE_IDX_3) - EVT_SET(LVarD, MODEL_o77) - EVT_SET(LVarE, MODEL_o76) - EVT_SET(LVar9, MODEL_o65) - EVT_SET(LVarA, MODEL_o67) - EVT_SET(LVarB, MODEL_o2) - EVT_SET(LVar5, 15) - EVT_EXEC(N(EVS_PullVine_Manage)) - EVT_SET(LVarC, VINE_IDX_4) - EVT_SET(LVarD, MODEL_o81) - EVT_SET(LVarE, MODEL_o80) - EVT_SET(LVar9, MODEL_o69) - EVT_SET(LVarA, MODEL_o70) - EVT_SET(LVarB, MODEL_o71) - EVT_SET(LVar5, 15) - EVT_EXEC(N(EVS_PullVine_Manage)) - EVT_SET(LVarC, VINE_IDX_5) - EVT_SET(LVarD, MODEL_o82) - EVT_SET(LVarE, MODEL_o83) - EVT_SET(LVar9, MODEL_o75) - EVT_SET(LVarA, MODEL_o73) - EVT_SET(LVarB, MODEL_o2) - EVT_SET(LVar5, 15) - EVT_EXEC(N(EVS_PullVine_Manage)) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o10, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o78, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o79, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o76, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o80, COLLIDER_FLAGS_UPPER_MASK) + Call(GetEntryID, LVar0) + IfNe(LVar0, jan_14_ENTRY_1) + Set(LVarC, VINE_IDX_1) + Else + Set(LVarC, VINE_IDX_0) + Exec(N(EVS_MoveBushes_Separate)) + Exec(N(EVS_MoveBushes)) + EndIf + Set(LVarF, MODEL_o28) + Set(MV_PullVineCallback, Ref(N(EVS_OnPullVine))) + Set(LVarD, MODEL_o8) + Set(LVarE, MODEL_o9) + Set(LVar9, MODEL_o57) + Set(LVarA, MODEL_o58) + Set(LVarB, MODEL_o59) + Set(LVar5, 0) + Exec(N(EVS_PullVine_Manage)) + Set(LVarC, VINE_IDX_2) + Set(LVarD, MODEL_o78) + Set(LVarE, MODEL_o79) + Set(LVar9, MODEL_o61) + Set(LVarA, MODEL_o62) + Set(LVarB, MODEL_o63) + Set(LVar5, 15) + Exec(N(EVS_PullVine_Manage)) + Set(LVarC, VINE_IDX_3) + Set(LVarD, MODEL_o77) + Set(LVarE, MODEL_o76) + Set(LVar9, MODEL_o65) + Set(LVarA, MODEL_o67) + Set(LVarB, MODEL_o2) + Set(LVar5, 15) + Exec(N(EVS_PullVine_Manage)) + Set(LVarC, VINE_IDX_4) + Set(LVarD, MODEL_o81) + Set(LVarE, MODEL_o80) + Set(LVar9, MODEL_o69) + Set(LVarA, MODEL_o70) + Set(LVarB, MODEL_o71) + Set(LVar5, 15) + Exec(N(EVS_PullVine_Manage)) + Set(LVarC, VINE_IDX_5) + Set(LVarD, MODEL_o82) + Set(LVarE, MODEL_o83) + Set(LVar9, MODEL_o75) + Set(LVarA, MODEL_o73) + Set(LVarB, MODEL_o2) + Set(LVar5, 15) + Exec(N(EVS_PullVine_Manage)) + Return + End }; diff --git a/src/world/area_jan/jan_14/jan_14_3_trees.c b/src/world/area_jan/jan_14/jan_14_3_trees.c index 86b8b8b5e40..1cf2885f8f3 100644 --- a/src/world/area_jan/jan_14/jan_14_3_trees.c +++ b/src/world/area_jan/jan_14/jan_14_3_trees.c @@ -115,21 +115,21 @@ BombTrigger N(BombPos_Tree5) = { }; EvtScript N(EVS_SetupTrees) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o117, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o103, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o118, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree3)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree4))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o119, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree4)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree5))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o120, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree5)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o117, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o103, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree3))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o118, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree3)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree4))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o119, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree4)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree5))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o120, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree5)), 1, 0) + Return + End }; diff --git a/src/world/area_jan/jan_14/jan_14_4_npc.c b/src/world/area_jan/jan_14/jan_14_4_npc.c index e801b66a834..9a0a709fff8 100644 --- a/src/world/area_jan/jan_14/jan_14_4_npc.c +++ b/src/world/area_jan/jan_14/jan_14_4_npc.c @@ -7,35 +7,35 @@ #include "world/common/enemy/Fuzzy.inc.c" EvtScript N(EVS_NpcIdle_JungleFuzzy) = { - EVT_LABEL(0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar1, 40) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(45) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Fuzzy_Wander))) - EVT_RETURN - EVT_END + Label(0) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + IfGt(LVar1, 40) + Wait(1) + Goto(0) + EndIf + Wait(45) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_Fuzzy_Wander))) + Return + End }; EvtScript N(EVS_NpcDefeat_Unused) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(RemoveNpc, NPC_SELF) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_JungleFuzzy) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_JungleFuzzy))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_JungleFuzzy))) + Return + End }; NpcData N(NpcData_JungleFuzzy_01) = { diff --git a/src/world/area_jan/jan_15/jan_15_1_main.c b/src/world/area_jan/jan_15/jan_15_1_main.c index 63908d3a403..31f429bbffc 100644 --- a/src/world/area_jan/jan_15/jan_15_1_main.c +++ b/src/world/area_jan/jan_15/jan_15_1_main.c @@ -1,41 +1,41 @@ #include "jan_15.h" EvtScript N(EVS_ExitWalk_jan_16) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(UseExitHeading, 60, jan_15_ENTRY_1) - EVT_EXEC(ExitWalk) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_REACHED_RAPHAELS_TREE) - EVT_CALL(GotoMap, EVT_PTR("jan_16"), jan_16_ENTRY_3) - EVT_ELSE - EVT_CALL(GotoMap, EVT_PTR("jan_16"), jan_16_ENTRY_0) - EVT_END_IF - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(UseExitHeading, 60, jan_15_ENTRY_1) + Exec(ExitWalk) + IfLt(GB_StoryProgress, STORY_CH5_REACHED_RAPHAELS_TREE) + Call(GotoMap, Ref("jan_16"), jan_16_ENTRY_3) + Else + Call(GotoMap, Ref("jan_16"), jan_16_ENTRY_0) + EndIf + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_jan_14_1) = EVT_EXIT_WALK(60, jan_15_ENTRY_0, "jan_14", jan_14_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_14_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_16)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_jan_14_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_jan_16)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_JADE_JUNGLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupTrees)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilits, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CALL(SetMusicTrack, 0, SONG_DEEP_JUNGLE, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_JUNGLE) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_JADE_JUNGLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupTrees)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilits, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Call(SetMusicTrack, 0, SONG_DEEP_JUNGLE, 0, 8) + Call(PlayAmbientSounds, AMBIENT_JUNGLE) + Return + End }; diff --git a/src/world/area_jan/jan_15/jan_15_2_npc.c b/src/world/area_jan/jan_15/jan_15_2_npc.c index 6093516a2f9..f7de8ad38ef 100644 --- a/src/world/area_jan/jan_15/jan_15_2_npc.c +++ b/src/world/area_jan/jan_15/jan_15_2_npc.c @@ -4,174 +4,174 @@ #include "world/common/enemy/HeartPlant.inc.c" EvtScript N(EVS_PutridPiranhas_IdleChomping) = { - EVT_CHILD_THREAD - EVT_LOOP(0) - EVT_CALL(RandInt, 5, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_LargePiranha_Putrid_Anim01) - EVT_WAIT(15) - EVT_ELSE - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_LargePiranha_Putrid_Anim05) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_LargePiranha_Putrid_Anim06) - EVT_WAIT(5) - EVT_END_IF - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_LOOP(0) - EVT_CALL(RandInt, 5, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim01) - EVT_WAIT(15) - EVT_ELSE - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim05) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim06) - EVT_WAIT(5) - EVT_END_IF - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_LOOP(0) - EVT_CALL(RandInt, 5, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_03, ANIM_LargePiranha_Putrid_Anim01) - EVT_WAIT(15) - EVT_ELSE - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_03, ANIM_LargePiranha_Putrid_Anim05) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_03, ANIM_LargePiranha_Putrid_Anim06) - EVT_WAIT(5) - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + ChildThread + Loop(0) + Call(RandInt, 5, LVar0) + IfNe(LVar0, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_LargePiranha_Putrid_Anim01) + Wait(15) + Else + Call(SetNpcAnimation, NPC_SELF, ANIM_LargePiranha_Putrid_Anim05) + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_LargePiranha_Putrid_Anim06) + Wait(5) + EndIf + EndLoop + EndChildThread + ChildThread + Loop(0) + Call(RandInt, 5, LVar0) + IfNe(LVar0, 0) + Call(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim01) + Wait(15) + Else + Call(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim05) + Wait(10) + Call(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim06) + Wait(5) + EndIf + EndLoop + EndChildThread + Loop(0) + Call(RandInt, 5, LVar0) + IfNe(LVar0, 0) + Call(SetNpcAnimation, NPC_PutridPiranha_03, ANIM_LargePiranha_Putrid_Anim01) + Wait(15) + Else + Call(SetNpcAnimation, NPC_PutridPiranha_03, ANIM_LargePiranha_Putrid_Anim05) + Wait(10) + Call(SetNpcAnimation, NPC_PutridPiranha_03, ANIM_LargePiranha_Putrid_Anim06) + Wait(5) + EndIf + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_PutridPiranha) = { - EVT_IF_EQ(GF_JAN15_EncounteredMiniboss, FALSE) - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 34) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH5_00BB, 320, 60) - EVT_SET(GF_JAN15_EncounteredMiniboss, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_EXEC_GET_TID(N(EVS_PutridPiranhas_IdleChomping), LVar9) - EVT_CALL(AwaitPlayerApproach, 400, -10, 135) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_KILL_THREAD(LVar9) - EVT_WAIT(15) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_01, ANIM_LargePiranha_Putrid_Anim01) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim01) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_03, ANIM_LargePiranha_Putrid_Anim01) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_03, ANIM_LargePiranha_Putrid_Anim04) - EVT_SET(LVar0, 0) - EVT_LOOP(15) - EVT_ADD(LVar0, 24) - EVT_CALL(SetNpcRotation, NPC_PutridPiranha_03, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAtNpc, NPC_PutridPiranha_03, SOUND_PIRANHA_SPIN, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_03, ANIM_LargePiranha_Putrid_Anim01) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_01, ANIM_LargePiranha_Putrid_Anim04) - EVT_SET(LVar0, 0) - EVT_LOOP(15) - EVT_ADD(LVar0, 24) - EVT_CALL(SetNpcRotation, NPC_PutridPiranha_01, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAtNpc, NPC_PutridPiranha_01, SOUND_PIRANHA_SPIN_1, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_01, ANIM_LargePiranha_Putrid_Anim01) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim04) - EVT_SET(LVar0, 0) - EVT_LOOP(15) - EVT_ADD(LVar0, 24) - EVT_CALL(SetNpcRotation, NPC_PutridPiranha_02, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAtNpc, NPC_PutridPiranha_02, SOUND_PIRANHA_SPIN_1, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim01) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_01, ANIM_LargePiranha_Putrid_Anim04) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim04) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_03, ANIM_LargePiranha_Putrid_Anim04) - EVT_SET(LVar0, 0) - EVT_LOOP(12) - EVT_ADD(LVar0, 30) - EVT_CALL(SetNpcRotation, NPC_PutridPiranha_01, 0, LVar0, 0) - EVT_CALL(SetNpcRotation, NPC_PutridPiranha_02, 0, LVar0, 0) - EVT_CALL(SetNpcRotation, NPC_PutridPiranha_03, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAtNpc, NPC_PutridPiranha_01, SOUND_PIRANHA_SPIN_2, SOUND_SPACE_DEFAULT) - EVT_SET(LVar0, 0) - EVT_LOOP(12) - EVT_ADD(LVar0, 30) - EVT_CALL(SetNpcRotation, NPC_PutridPiranha_01, 0, LVar0, 0) - EVT_CALL(SetNpcRotation, NPC_PutridPiranha_02, 0, LVar0, 0) - EVT_CALL(SetNpcRotation, NPC_PutridPiranha_03, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAtNpc, NPC_PutridPiranha_01, SOUND_PIRANHA_SPIN_2, SOUND_SPACE_DEFAULT) - EVT_SET(LVar0, 0) - EVT_LOOP(12) - EVT_ADD(LVar0, 30) - EVT_CALL(SetNpcRotation, NPC_PutridPiranha_01, 0, LVar0, 0) - EVT_CALL(SetNpcRotation, NPC_PutridPiranha_02, 0, LVar0, 0) - EVT_CALL(SetNpcRotation, NPC_PutridPiranha_03, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAtNpc, NPC_PutridPiranha_01, SOUND_PIRANHA_SPIN_2, SOUND_SPACE_DEFAULT) - EVT_LOOP(3) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtNpc, NPC_PutridPiranha_01, SOUND_PIRANHA_TENSE, SOUND_SPACE_DEFAULT) - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_01, ANIM_LargePiranha_Putrid_Anim05) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim05) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_03, ANIM_LargePiranha_Putrid_Anim05) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_01, ANIM_LargePiranha_Putrid_Anim06) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim06) - EVT_CALL(SetNpcAnimation, NPC_PutridPiranha_03, ANIM_LargePiranha_Putrid_Anim06) - EVT_CALL(PlaySoundAtNpc, NPC_PutridPiranha_01, SOUND_PIRANHA_CHOMP, SOUND_SPACE_DEFAULT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_RETURN - EVT_END + IfEq(GF_JAN15_EncounteredMiniboss, FALSE) + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, 34) + Wait(1) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_CH5_00BB, 320, 60) + Set(GF_JAN15_EncounteredMiniboss, TRUE) + Call(DisablePlayerInput, FALSE) + EndIf + ExecGetTID(N(EVS_PutridPiranhas_IdleChomping), LVar9) + Call(AwaitPlayerApproach, 400, -10, 135) + Call(DisablePlayerInput, TRUE) + KillThread(LVar9) + Wait(15) + Call(SetNpcAnimation, NPC_PutridPiranha_01, ANIM_LargePiranha_Putrid_Anim01) + Call(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim01) + Call(SetNpcAnimation, NPC_PutridPiranha_03, ANIM_LargePiranha_Putrid_Anim01) + Thread + Wait(10) + Call(SetNpcAnimation, NPC_PutridPiranha_03, ANIM_LargePiranha_Putrid_Anim04) + Set(LVar0, 0) + Loop(15) + Add(LVar0, 24) + Call(SetNpcRotation, NPC_PutridPiranha_03, 0, LVar0, 0) + Wait(1) + EndLoop + Call(PlaySoundAtNpc, NPC_PutridPiranha_03, SOUND_PIRANHA_SPIN, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_PutridPiranha_03, ANIM_LargePiranha_Putrid_Anim01) + EndThread + Call(SetNpcAnimation, NPC_PutridPiranha_01, ANIM_LargePiranha_Putrid_Anim04) + Set(LVar0, 0) + Loop(15) + Add(LVar0, 24) + Call(SetNpcRotation, NPC_PutridPiranha_01, 0, LVar0, 0) + Wait(1) + EndLoop + Call(PlaySoundAtNpc, NPC_PutridPiranha_01, SOUND_PIRANHA_SPIN_1, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_PutridPiranha_01, ANIM_LargePiranha_Putrid_Anim01) + Wait(5) + Call(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim04) + Set(LVar0, 0) + Loop(15) + Add(LVar0, 24) + Call(SetNpcRotation, NPC_PutridPiranha_02, 0, LVar0, 0) + Wait(1) + EndLoop + Call(PlaySoundAtNpc, NPC_PutridPiranha_02, SOUND_PIRANHA_SPIN_1, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim01) + Wait(5) + Call(SetNpcAnimation, NPC_PutridPiranha_01, ANIM_LargePiranha_Putrid_Anim04) + Call(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim04) + Call(SetNpcAnimation, NPC_PutridPiranha_03, ANIM_LargePiranha_Putrid_Anim04) + Set(LVar0, 0) + Loop(12) + Add(LVar0, 30) + Call(SetNpcRotation, NPC_PutridPiranha_01, 0, LVar0, 0) + Call(SetNpcRotation, NPC_PutridPiranha_02, 0, LVar0, 0) + Call(SetNpcRotation, NPC_PutridPiranha_03, 0, LVar0, 0) + Wait(1) + EndLoop + Call(PlaySoundAtNpc, NPC_PutridPiranha_01, SOUND_PIRANHA_SPIN_2, SOUND_SPACE_DEFAULT) + Set(LVar0, 0) + Loop(12) + Add(LVar0, 30) + Call(SetNpcRotation, NPC_PutridPiranha_01, 0, LVar0, 0) + Call(SetNpcRotation, NPC_PutridPiranha_02, 0, LVar0, 0) + Call(SetNpcRotation, NPC_PutridPiranha_03, 0, LVar0, 0) + Wait(1) + EndLoop + Call(PlaySoundAtNpc, NPC_PutridPiranha_01, SOUND_PIRANHA_SPIN_2, SOUND_SPACE_DEFAULT) + Set(LVar0, 0) + Loop(12) + Add(LVar0, 30) + Call(SetNpcRotation, NPC_PutridPiranha_01, 0, LVar0, 0) + Call(SetNpcRotation, NPC_PutridPiranha_02, 0, LVar0, 0) + Call(SetNpcRotation, NPC_PutridPiranha_03, 0, LVar0, 0) + Wait(1) + EndLoop + Call(PlaySoundAtNpc, NPC_PutridPiranha_01, SOUND_PIRANHA_SPIN_2, SOUND_SPACE_DEFAULT) + Loop(3) + Wait(5) + Call(PlaySoundAtNpc, NPC_PutridPiranha_01, SOUND_PIRANHA_TENSE, SOUND_SPACE_DEFAULT) + EndLoop + Call(SetNpcAnimation, NPC_PutridPiranha_01, ANIM_LargePiranha_Putrid_Anim05) + Call(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim05) + Call(SetNpcAnimation, NPC_PutridPiranha_03, ANIM_LargePiranha_Putrid_Anim05) + Wait(20) + Call(SetNpcAnimation, NPC_PutridPiranha_01, ANIM_LargePiranha_Putrid_Anim06) + Call(SetNpcAnimation, NPC_PutridPiranha_02, ANIM_LargePiranha_Putrid_Anim06) + Call(SetNpcAnimation, NPC_PutridPiranha_03, ANIM_LargePiranha_Putrid_Anim06) + Call(PlaySoundAtNpc, NPC_PutridPiranha_01, SOUND_PIRANHA_CHOMP, SOUND_SPACE_DEFAULT) + Call(DisablePlayerInput, FALSE) + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Return + End }; EvtScript N(EVS_NpcHit_PutridPiranha) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_SET(GB_StoryProgress, STORY_CH5_DEFEATED_PIRANHAS_MINIBOSS) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Set(GB_StoryProgress, STORY_CH5_DEFEATED_PIRANHAS_MINIBOSS) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_PutridPiranha) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH5_DEFEATED_PIRANHAS_MINIBOSS) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_PutridPiranha))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_PutridPiranha))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_PutridPiranha_01, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_PutridPiranha_02, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_PutridPiranha_03, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH5_DEFEATED_PIRANHAS_MINIBOSS) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_PutridPiranha))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_PutridPiranha))) + Else + Call(SetNpcPos, NPC_PutridPiranha_01, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_PutridPiranha_02, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_PutridPiranha_03, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; NpcData N(NpcData_Piranhas)[] = { diff --git a/src/world/area_jan/jan_15/jan_15_3_trees.c b/src/world/area_jan/jan_15/jan_15_3_trees.c index 92d826d0cd4..c850cae87b8 100644 --- a/src/world/area_jan/jan_15/jan_15_3_trees.c +++ b/src/world/area_jan/jan_15/jan_15_3_trees.c @@ -62,12 +62,12 @@ BombTrigger N(BombPos_Tree2) = { }; EvtScript N(EVS_SetupTrees) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o97, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o98, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o97, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o98, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Return + End }; diff --git a/src/world/area_jan/jan_15/jan_15_4_entity.c b/src/world/area_jan/jan_15/jan_15_4_entity.c index 81e4f20e612..992e2dd5bad 100644 --- a/src/world/area_jan/jan_15/jan_15_4_entity.c +++ b/src/world/area_jan/jan_15/jan_15_4_entity.c @@ -2,9 +2,9 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_PinkFlower), 385, 0, -75, 10, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 0, 0, 0, 0, MODEL_o87, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_JAN15_HiddenPanel) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_PinkFlower), 385, 0, -75, 10, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HiddenPanel), 0, 0, 0, 0, MODEL_o87, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_JAN15_HiddenPanel) + Return + End }; diff --git a/src/world/area_jan/jan_16/jan_16_1_music.c b/src/world/area_jan/jan_16/jan_16_1_music.c index f28e9f49ac8..050b77eae19 100644 --- a/src/world/area_jan/jan_16/jan_16_1_music.c +++ b/src/world/area_jan/jan_16/jan_16_1_music.c @@ -1,20 +1,20 @@ #include "jan_16.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(jan_16_ENTRY_0) - EVT_CALL(SetMusicTrack, 0, SONG_RAPHAEL_RAVEN, 0, 8) - EVT_SET(AF_JAN_03, FALSE) - EVT_CASE_EQ(jan_16_ENTRY_3) - EVT_CALL(SetMusicTrack, 0, SONG_RAPHAEL_RAVEN, 1, 8) - EVT_SET(AF_JAN_03, TRUE) - EVT_CASE_DEFAULT - EVT_IF_EQ(AF_JAN_03, FALSE) - EVT_CALL(SetMusicTrack, 0, SONG_RAPHAEL_RAVEN, 0, 8) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(PlayAmbientSounds, AMBIENT_JUNGLE) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(jan_16_ENTRY_0) + Call(SetMusicTrack, 0, SONG_RAPHAEL_RAVEN, 0, 8) + Set(AF_JAN_03, FALSE) + CaseEq(jan_16_ENTRY_3) + Call(SetMusicTrack, 0, SONG_RAPHAEL_RAVEN, 1, 8) + Set(AF_JAN_03, TRUE) + CaseDefault + IfEq(AF_JAN_03, FALSE) + Call(SetMusicTrack, 0, SONG_RAPHAEL_RAVEN, 0, 8) + EndIf + EndSwitch + Call(PlayAmbientSounds, AMBIENT_JUNGLE) + Return + End }; diff --git a/src/world/area_jan/jan_16/jan_16_2_main.c b/src/world/area_jan/jan_16/jan_16_2_main.c index e4edee53752..0012d3122e7 100644 --- a/src/world/area_jan/jan_16/jan_16_2_main.c +++ b/src/world/area_jan/jan_16/jan_16_2_main.c @@ -6,145 +6,145 @@ EvtScript N(EVS_ExitWalk_jan_22_1) = EVT_EXIT_WALK(60, jan_16_ENTRY_1, "jan_22", EvtScript N(EVS_ExitWalk_jan_17_0) = EVT_EXIT_WALK(60, jan_16_ENTRY_2, "jan_17", jan_17_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_15_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_22_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_17_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_o83, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_jan_15_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_jan_22_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_jan_17_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_o83, 1, 0) + Return + End }; EvtScript N(EVS_SpawnButterflies) = { - EVT_IF_NE(GB_StoryProgress, STORY_CH5_RAPHAEL_LEFT_NEST) - EVT_PLAY_EFFECT(EFFECT_BUTTERFLIES, 5, -310, 10, 0) - EVT_PLAY_EFFECT(EFFECT_BUTTERFLIES, 5, -210, 10, 240) - EVT_PLAY_EFFECT(EFFECT_BUTTERFLIES, 5, 330, 10, 260) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_BUTTERFLIES, 5, -300, 10, 270) - EVT_PLAY_EFFECT(EFFECT_BUTTERFLIES, 5, -80, 10, 390) - EVT_PLAY_EFFECT(EFFECT_BUTTERFLIES, 5, 430, 10, 0) - EVT_RETURN - EVT_END + IfNe(GB_StoryProgress, STORY_CH5_RAPHAEL_LEFT_NEST) + PlayEffect(EFFECT_BUTTERFLIES, 5, -310, 10, 0) + PlayEffect(EFFECT_BUTTERFLIES, 5, -210, 10, 240) + PlayEffect(EFFECT_BUTTERFLIES, 5, 330, 10, 260) + EndIf + PlayEffect(EFFECT_BUTTERFLIES, 5, -300, 10, 270) + PlayEffect(EFFECT_BUTTERFLIES, 5, -80, 10, 390) + PlayEffect(EFFECT_BUTTERFLIES, 5, 430, 10, 0) + Return + End }; EvtScript N(EVS_AnimateFallBreakingBranch) = { - EVT_SET(LVarF, 0) - EVT_LOOP(0) - EVT_SETF(LVar0, MV_Unk_0A) - EVT_SETF(LVar1, MV_Unk_0A) - EVT_MULF(LVar0, EVT_FLOAT(-0.02)) - EVT_MULF(LVar1, EVT_FLOAT(0.04)) - EVT_ADDF(LVar0, 1) - EVT_ADDF(LVar1, 1) - EVT_CALL(ScaleGroup, MODEL_g47, LVar0, LVar1, 1) - EVT_ADD(LVarF, 1) - EVT_IF_GE(LVarF, 600) - EVT_SET(LVarF, 0) - EVT_END_IF - EVT_SETF(LVar0, LVarA) - EVT_MULF(LVar0, EVT_FLOAT(-0.046875)) - EVT_ADDF(MV_Unk_0A, LVar0) - EVT_MULF(MV_Unk_0A, EVT_FLOAT(0.84375)) - EVT_ADDF(LVarA, MV_Unk_0A) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVarF, 0) + Loop(0) + SetF(LVar0, MV_Unk_0A) + SetF(LVar1, MV_Unk_0A) + MulF(LVar0, Float(-0.02)) + MulF(LVar1, Float(0.04)) + AddF(LVar0, 1) + AddF(LVar1, 1) + Call(ScaleGroup, MODEL_g47, LVar0, LVar1, 1) + Add(LVarF, 1) + IfGe(LVarF, 600) + Set(LVarF, 0) + EndIf + SetF(LVar0, LVarA) + MulF(LVar0, Float(-0.046875)) + AddF(MV_Unk_0A, LVar0) + MulF(MV_Unk_0A, Float(0.84375)) + AddF(LVarA, MV_Unk_0A) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_EnterFalling) = { - EVT_EXEC(N(EVS_AnimateFallBreakingBranch)) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 35, 100, 330) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 35, 100, 330) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(InterruptUsePartner) - EVT_END_IF - EVT_WAIT(15) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 35, 0, 330) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.8)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetPlayerPos, 35, 600, 340) - EVT_CALL(MakeLerp, 600, 130, 15, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetPlayerPos, 35, LVar0, 340) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_PLAY_EFFECT(EFFECT_DROP_LEAVES, 0, 35, 120, 340, 100) - EVT_PLAY_EFFECT(EFFECT_DROP_LEAVES, 0, 55, 120, 330, 100) - EVT_ADDF(MV_Unk_0A, EVT_FLOAT(-7.5)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 190, 350) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.2)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(2.0)) - EVT_CALL(PlaySoundAtPlayer, SOUND_SHAKE_TREE_LEAVES, SOUND_SPACE_DEFAULT) - EVT_CALL(PlayerJump, -35, 0, 385, 30) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_END_THREAD - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, 0) - EVT_CALL(NpcJump0, NPC_PARTNER, 35, 130, 330, 15) - EVT_THREAD - EVT_LOOP(3) - EVT_PLAY_EFFECT(EFFECT_DROP_LEAVES, 0, 35, 120, 340, 100) - EVT_PLAY_EFFECT(EFFECT_DROP_LEAVES, 0, 55, 120, 340, 100) - EVT_WAIT(5) - EVT_END_LOOP - EVT_END_THREAD - EVT_ADDF(MV_Unk_0A, EVT_FLOAT(-7.5)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -35, 0, 385) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.8)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(2.0)) - EVT_CALL(NpcJump0, NPC_PARTNER, -10, 0, 395, 20) - EVT_CALL(EnablePartnerAI) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Exec(N(EVS_AnimateFallBreakingBranch)) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(UseSettingsFrom, CAM_DEFAULT, 35, 100, 330) + Call(SetPanTarget, CAM_DEFAULT, 35, 100, 330) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, PARTNER_NONE) + Call(InterruptUsePartner) + EndIf + Wait(15) + Thread + Wait(30) + Call(SetPanTarget, CAM_DEFAULT, 35, 0, 330) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.8)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Call(DisablePlayerPhysics, FALSE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE) + Call(SetPlayerPos, 35, 600, 340) + Call(MakeLerp, 600, 130, 15, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetPlayerPos, 35, LVar0, 340) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + PlayEffect(EFFECT_DROP_LEAVES, 0, 35, 120, 340, 100) + PlayEffect(EFFECT_DROP_LEAVES, 0, 55, 120, 330, 100) + AddF(MV_Unk_0A, Float(-7.5)) + Call(SetPanTarget, CAM_DEFAULT, 0, 190, 350) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.2)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Call(SetPlayerJumpscale, Float(2.0)) + Call(PlaySoundAtPlayer, SOUND_SHAKE_TREE_LEAVES, SOUND_SPACE_DEFAULT) + Call(PlayerJump, -35, 0, 385, 30) + Call(SetPlayerActionState, ACTION_STATE_LAND) + EndThread + Call(SetNpcJumpscale, NPC_PARTNER, 0) + Call(NpcJump0, NPC_PARTNER, 35, 130, 330, 15) + Thread + Loop(3) + PlayEffect(EFFECT_DROP_LEAVES, 0, 35, 120, 340, 100) + PlayEffect(EFFECT_DROP_LEAVES, 0, 55, 120, 340, 100) + Wait(5) + EndLoop + EndThread + AddF(MV_Unk_0A, Float(-7.5)) + Call(SetPanTarget, CAM_DEFAULT, -35, 0, 385) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.8)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetNpcJumpscale, NPC_PARTNER, Float(2.0)) + Call(NpcJump0, NPC_PARTNER, -10, 0, 395, 20) + Call(EnablePartnerAI) + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + Call(DisablePlayerInput, FALSE) + Return + End }; #include "world/common/atomic/ApplyTint.inc.c" EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_JADE_JUNGLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(D_802412D4_B812D4)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, jan_16_ENTRY_4) - EVT_EXEC(N(EVS_EnterFalling)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_SetupBushes)) - EVT_EXEC(N(EVS_SpawnButterflies)) - EVT_CALL(N(SetModelTintMode), APPLY_TINT_MODELS, -1, 3) - EVT_CALL(N(SetModelTintMode), APPLY_TINT_BG, NULL, 3) - EVT_CALL(N(SetModelTintParams), ENV_TINT_REMAP, 255, 255, 255, 0, 0, 25, 0, 0, 0) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_JADE_JUNGLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(D_802412D4_B812D4)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Call(GetEntryID, LVar0) + IfEq(LVar0, jan_16_ENTRY_4) + Exec(N(EVS_EnterFalling)) + Exec(N(EVS_BindExitTriggers)) + Else + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndIf + ExecWait(N(EVS_SetupMusic)) + Exec(N(EVS_SetupBushes)) + Exec(N(EVS_SpawnButterflies)) + Call(N(SetModelTintMode), APPLY_TINT_MODELS, -1, 3) + Call(N(SetModelTintMode), APPLY_TINT_BG, NULL, 3) + Call(N(SetModelTintParams), ENV_TINT_REMAP, 255, 255, 255, 0, 0, 25, 0, 0, 0) + Return + End }; diff --git a/src/world/area_jan/jan_16/jan_16_3_npc.c b/src/world/area_jan/jan_16/jan_16_3_npc.c index 0baf0f578ab..ca1d0905df1 100644 --- a/src/world/area_jan/jan_16/jan_16_3_npc.c +++ b/src/world/area_jan/jan_16/jan_16_3_npc.c @@ -3,9 +3,9 @@ #include "sprite/player.h" EvtScript N(EVS_NpcAuxAI_RaphaelRaven) = { - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(1.5), EVT_FLOAT(1.5), EVT_FLOAT(1.5)) - EVT_RETURN - EVT_END + Call(SetNpcScale, NPC_SELF, Float(1.5), Float(1.5), Float(1.5)) + Return + End }; NpcSettings N(NpcSettings_RaphaelRaven) = { @@ -22,204 +22,204 @@ NpcSettings N(NpcSettings_Raven) = { }; EvtScript N(D_802412D4_B812D4) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_REACHED_RAPHAELS_TREE) - EVT_CALL(EnableGroup, MODEL_g38, FALSE) - EVT_CALL(EnableGroup, MODEL_g54, FALSE) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamType, CAM_DEFAULT, 1, FALSE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -269, 94, -8) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -269, 94, -8) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 1000) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 20, 0) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -410, -85) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 400) - EVT_CALL(SetCamPitch, CAM_DEFAULT, -13, 1) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.45 / DT)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -207, -85) - EVT_CALL(PanToTarget, CAM_DEFAULT, EVT_FLOAT(0.8), 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(30 * DT) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_SET(GB_StoryProgress, STORY_CH5_REACHED_RAPHAELS_TREE) - EVT_END_IF - EVT_CALL(EnableGroup, MODEL_g38, TRUE) - EVT_CALL(EnableGroup, MODEL_g54, TRUE) - EVT_CALL(EnableGroup, MODEL_g39, FALSE) - EVT_CALL(EnableGroup, MODEL_g56, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + IfLt(GB_StoryProgress, STORY_CH5_REACHED_RAPHAELS_TREE) + Call(EnableGroup, MODEL_g38, FALSE) + Call(EnableGroup, MODEL_g54, FALSE) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamType, CAM_DEFAULT, 1, FALSE) + Call(UseSettingsFrom, CAM_DEFAULT, -269, 94, -8) + Call(SetPanTarget, CAM_DEFAULT, -269, 94, -8) + Call(SetCamDistance, CAM_DEFAULT, 1000) + Call(SetCamPitch, CAM_DEFAULT, 20, 0) + Call(SetCamPosA, CAM_DEFAULT, -410, -85) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10) + Call(SetCamDistance, CAM_DEFAULT, 400) + Call(SetCamPitch, CAM_DEFAULT, -13, 1) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.45 / DT)) + Call(SetCamPosA, CAM_DEFAULT, -207, -85) + Call(PanToTarget, CAM_DEFAULT, Float(0.8), 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(30 * DT) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Set(GB_StoryProgress, STORY_CH5_REACHED_RAPHAELS_TREE) + EndIf + Call(EnableGroup, MODEL_g38, TRUE) + Call(EnableGroup, MODEL_g54, TRUE) + Call(EnableGroup, MODEL_g39, FALSE) + Call(EnableGroup, MODEL_g56, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_Raven) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Raven_Talk, ANIM_Raven_Idle, 0, MSG_CH5_00E3) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Raven_Talk, ANIM_Raven_Idle, 0, MSG_CH5_00E3) + Return + End }; EvtScript N(EVS_NpcInit_Raven) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_RAPHAEL_LEFT_NEST) - EVT_GOTO(20) - EVT_CASE_RANGE(STORY_CH5_RAPHAEL_LEFT_NEST, STORY_CH5_RAPHAEL_MOVED_ROOT) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Raven))) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetNpcPos, NPC_Raven_01, -450, 0, 26) - EVT_CALL(SetNpcPos, NPC_Raven_02, -430, 0, 4) - EVT_CALL(SetNpcPos, NPC_Raven_03, -410, 0, -18) - EVT_CALL(SetNpcPos, NPC_Raven_04, -390, 0, -40) - EVT_CALL(SetNpcPos, NPC_Raven_05, -411, 93, -16) - EVT_END_IF - EVT_CASE_GT(STORY_CH5_RAPHAEL_MOVED_ROOT) - EVT_LABEL(20) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o113, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_RAPHAEL_LEFT_NEST) + Goto(20) + CaseRange(STORY_CH5_RAPHAEL_LEFT_NEST, STORY_CH5_RAPHAEL_MOVED_ROOT) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Raven))) + Call(GetSelfNpcID, LVar0) + IfEq(LVar0, 1) + Call(SetNpcPos, NPC_Raven_01, -450, 0, 26) + Call(SetNpcPos, NPC_Raven_02, -430, 0, 4) + Call(SetNpcPos, NPC_Raven_03, -410, 0, -18) + Call(SetNpcPos, NPC_Raven_04, -390, 0, -40) + Call(SetNpcPos, NPC_Raven_05, -411, 93, -16) + EndIf + CaseGt(STORY_CH5_RAPHAEL_MOVED_ROOT) + Label(20) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o113, COLLIDER_FLAGS_UPPER_MASK) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_RaphaelRaven) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o130, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_RaphaelRaven_Idle) - EVT_CALL(NpcFacePlayer, NPC_SELF, 4) - EVT_WAIT(5 * DT) - EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(4.5 / DT), LVar0, LVar1, LVar2, 450, EVT_FLOAT(20.0), EVT_FLOAT(-9.5)) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_WAIT(10 * DT) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_WAIT(20 * DT) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_RaphaelRaven_Jump) - EVT_WAIT(8 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_RaphaelRaven_Fall) - EVT_WAIT(15 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_RaphaelRaven_TalkNoFeetAngry) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RaphaelRaven_TalkNoFeetAngry, ANIM_RaphaelRaven_TalkNoFeetAngry, 5, MSG_CH5_00E1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_RaphaelRaven_IdleNoFeet) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_RaphaelRaven_Idle) - EVT_END_THREAD - EVT_CALL(SetNpcJumpscale, NPC_SELF, 2) - EVT_CALL(NpcJump1, NPC_SELF, LVar0, LVar1, LVar2, 30) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_JAN_RAPHAEL_POUND, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 50, EVT_FLOAT(1.0)) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_THREAD - EVT_WAIT(20) - EVT_LOOP(10) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, 115, 0, 355, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, 205, 0, 475, 0) - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, 190, 0, 445, 0) - EVT_WAIT(2) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, 140, 0, 380, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, 170, 0, 400, 0) - EVT_WAIT(2) - EVT_END_LOOP - EVT_END_THREAD - EVT_LOOP(15) - EVT_CALL(ScaleGroup, MODEL_g40, 1, EVT_FLOAT(1.05), 1) - EVT_WAIT(2) - EVT_CALL(ScaleGroup, MODEL_g40, 1, EVT_FLOAT(0.95), 1) - EVT_WAIT(2) - EVT_END_LOOP - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(MakeLerp, 0, 100, 100, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g40, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 1) - EVT_LOOP(6) - EVT_SWITCH(LVar0) - EVT_CASE_RANGE(1, 4) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o97, SOUND_JAN_ROOT_WOBBLE_1, 0) - EVT_CASE_EQ(5) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o97, SOUND_JAN_ROOT_WOBBLE_2, 0) - EVT_CASE_EQ(6) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o97, SOUND_JAN_ROOT_WOBBLE_3, 0) - EVT_END_SWITCH - EVT_ADD(LVar0, 1) - EVT_WAIT(20) - EVT_END_LOOP - EVT_END_THREAD - EVT_SETF(LVar2, EVT_FLOAT(1.0)) - EVT_SETF(LVar3, EVT_FLOAT(0.25)) - EVT_LOOP(5) - EVT_LOOP(10) - EVT_ADDF(LVar2, LVar3) - EVT_CALL(ScaleGroup, MODEL_g40, 1, LVar2, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, 123, 0, 352, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, 193, 0, 450, 0) - EVT_LOOP(10) - EVT_SUBF(LVar2, LVar3) - EVT_CALL(ScaleGroup, MODEL_g40, 1, LVar2, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, 115, 0, 355, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, 205, 0, 475, 0) - EVT_SUBF(LVar3, EVT_FLOAT(0.05)) - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o97, COLLIDER_FLAGS_UPPER_MASK) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RaphaelRaven_Talk, ANIM_RaphaelRaven_Idle, 0, MSG_CH5_00E2) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_RaphaelRaven_Walk) - EVT_CALL(SetNpcSpeed, NPC_RaphaelRaven, EVT_FLOAT(4.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_SELF, 340, 270, 0) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(DisablePlayerInput, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o130, COLLIDER_FLAGS_UPPER_MASK) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_RaphaelRaven_Idle) + Call(NpcFacePlayer, NPC_SELF, 4) + Wait(5 * DT) + Call(PlayerFaceNpc, NPC_SELF, FALSE) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(SetCamProperties, CAM_DEFAULT, Float(4.5 / DT), LVar0, LVar1, LVar2, 450, Float(20.0), Float(-9.5)) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Wait(10 * DT) + Call(InterpPlayerYaw, 90, 0) + Wait(20 * DT) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Thread + Call(SetNpcAnimation, NPC_SELF, ANIM_RaphaelRaven_Jump) + Wait(8 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_RaphaelRaven_Fall) + Wait(15 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_RaphaelRaven_TalkNoFeetAngry) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_RaphaelRaven_TalkNoFeetAngry, ANIM_RaphaelRaven_TalkNoFeetAngry, 5, MSG_CH5_00E1) + Call(SetNpcAnimation, NPC_SELF, ANIM_RaphaelRaven_IdleNoFeet) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_RaphaelRaven_Idle) + EndThread + Call(SetNpcJumpscale, NPC_SELF, 2) + Call(NpcJump1, NPC_SELF, LVar0, LVar1, LVar2, 30) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_JAN_RAPHAEL_POUND, SOUND_SPACE_DEFAULT) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 50, Float(1.0)) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndThread + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + Thread + Wait(20) + Loop(10) + PlayEffect(EFFECT_LANDING_DUST, 1, 115, 0, 355, 0) + PlayEffect(EFFECT_LANDING_DUST, 1, 205, 0, 475, 0) + Wait(2) + PlayEffect(EFFECT_LANDING_DUST, 1, 190, 0, 445, 0) + Wait(2) + PlayEffect(EFFECT_LANDING_DUST, 1, 140, 0, 380, 0) + PlayEffect(EFFECT_LANDING_DUST, 1, 170, 0, 400, 0) + Wait(2) + EndLoop + EndThread + Loop(15) + Call(ScaleGroup, MODEL_g40, 1, Float(1.05), 1) + Wait(2) + Call(ScaleGroup, MODEL_g40, 1, Float(0.95), 1) + Wait(2) + EndLoop + Thread + Wait(15) + Call(MakeLerp, 0, 100, 100, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g40, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Set(LVar0, 1) + Loop(6) + Switch(LVar0) + CaseRange(1, 4) + Call(PlaySoundAtCollider, COLLIDER_o97, SOUND_JAN_ROOT_WOBBLE_1, 0) + CaseEq(5) + Call(PlaySoundAtCollider, COLLIDER_o97, SOUND_JAN_ROOT_WOBBLE_2, 0) + CaseEq(6) + Call(PlaySoundAtCollider, COLLIDER_o97, SOUND_JAN_ROOT_WOBBLE_3, 0) + EndSwitch + Add(LVar0, 1) + Wait(20) + EndLoop + EndThread + SetF(LVar2, Float(1.0)) + SetF(LVar3, Float(0.25)) + Loop(5) + Loop(10) + AddF(LVar2, LVar3) + Call(ScaleGroup, MODEL_g40, 1, LVar2, 1) + Wait(1) + EndLoop + PlayEffect(EFFECT_LANDING_DUST, 1, 123, 0, 352, 0) + PlayEffect(EFFECT_LANDING_DUST, 1, 193, 0, 450, 0) + Loop(10) + SubF(LVar2, LVar3) + Call(ScaleGroup, MODEL_g40, 1, LVar2, 1) + Wait(1) + EndLoop + PlayEffect(EFFECT_LANDING_DUST, 1, 115, 0, 355, 0) + PlayEffect(EFFECT_LANDING_DUST, 1, 205, 0, 475, 0) + SubF(LVar3, Float(0.05)) + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o97, COLLIDER_FLAGS_UPPER_MASK) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_RaphaelRaven_Talk, ANIM_RaphaelRaven_Idle, 0, MSG_CH5_00E2) + Call(SetNpcAnimation, NPC_SELF, ANIM_RaphaelRaven_Walk) + Call(SetNpcSpeed, NPC_RaphaelRaven, Float(4.0 / DT)) + Call(NpcMoveTo, NPC_SELF, 340, 270, 0) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) #if VERSION_PAL - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5 * DT)) + Call(ResetCam, CAM_DEFAULT, Float(5 * DT)) #else - EVT_CALL(ResetCam, CAM_DEFAULT, 5) + Call(ResetCam, CAM_DEFAULT, 5) #endif - EVT_SET(GB_StoryProgress, STORY_CH5_RAPHAEL_MOVED_ROOT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Set(GB_StoryProgress, STORY_CH5_RAPHAEL_MOVED_ROOT) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_RaphaelRaven) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH5_RAPHAEL_LEFT_NEST) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, 85, 0, 410) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_RaphaelRaven))) - EVT_RETURN - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o130, COLLIDER_FLAGS_UPPER_MASK) - EVT_IF_GE(GB_StoryProgress, STORY_CH5_RAPHAEL_MOVED_ROOT) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o97, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(TranslateGroup, MODEL_g40, 0, 100, 0) - EVT_END_IF - EVT_END_IF - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH5_RAPHAEL_LEFT_NEST) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcPos, NPC_SELF, 85, 0, 410) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_RaphaelRaven))) + Return + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o130, COLLIDER_FLAGS_UPPER_MASK) + IfGe(GB_StoryProgress, STORY_CH5_RAPHAEL_MOVED_ROOT) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o97, COLLIDER_FLAGS_UPPER_MASK) + Call(TranslateGroup, MODEL_g40, 0, 100, 0) + EndIf + EndIf + Call(RemoveNpc, NPC_SELF) + Return + End }; NpcData N(NpcData_RaphaelRaven)[] = { diff --git a/src/world/area_jan/jan_16/jan_16_4_entity.c b/src/world/area_jan/jan_16/jan_16_4_entity.c index 3cdcd8486be..e791f1bfea4 100644 --- a/src/world/area_jan/jan_16/jan_16_4_entity.c +++ b/src/world/area_jan/jan_16/jan_16_4_entity.c @@ -2,8 +2,8 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_PinkFlower), -112, 0, 210, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_PinkFlower), -453, 0, 188, 170, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_PinkFlower), -112, 0, 210, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_PinkFlower), -453, 0, 188, 170, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_jan/jan_16/jan_16_5_bushes.c b/src/world/area_jan/jan_16/jan_16_5_bushes.c index d0bcc8f78b4..7e752c7406b 100644 --- a/src/world/area_jan/jan_16/jan_16_5_bushes.c +++ b/src/world/area_jan/jan_16/jan_16_5_bushes.c @@ -61,14 +61,14 @@ SearchBushConfig N(SearchBush_Bush4) = { }; EvtScript N(EVS_SetupBushes) = { - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o126, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o127, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o128, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush4))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o129, 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(SearchBush_Bush1))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o126, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush2))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o127, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush3))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o128, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush4))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o129, 1, 0) + Return + End }; diff --git a/src/world/area_jan/jan_17/jan_17_1_music.c b/src/world/area_jan/jan_17/jan_17_1_music.c index dfa72b1ac99..421da316da9 100644 --- a/src/world/area_jan/jan_17/jan_17_1_music.c +++ b/src/world/area_jan/jan_17/jan_17_1_music.c @@ -1,12 +1,12 @@ #include "jan_17.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_CALL(SetMusicTrack, 0, SONG_RAPHAEL_RAVEN, 0, 8) - EVT_SET(AF_JAN_03, FALSE) - EVT_END_IF - EVT_CALL(ClearAmbientSounds, 250) - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Call(SetMusicTrack, 0, SONG_RAPHAEL_RAVEN, 0, 8) + Set(AF_JAN_03, FALSE) + EndIf + Call(ClearAmbientSounds, 250) + Return + End }; diff --git a/src/world/area_jan/jan_17/jan_17_2_main.c b/src/world/area_jan/jan_17/jan_17_2_main.c index cfbc4f6fcde..8a416ea975e 100644 --- a/src/world/area_jan/jan_17/jan_17_2_main.c +++ b/src/world/area_jan/jan_17/jan_17_2_main.c @@ -9,31 +9,31 @@ EvtScript N(EVS_ExitWalk_jan_16_2) = EVT_EXIT_WALK(60, jan_17_ENTRY_0, "jan_16", EvtScript N(EVS_ExitWalk_jan_18_0) = EVT_EXIT_WALK(60, jan_17_ENTRY_1, "jan_18", jan_18_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_16_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_18_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_jan_16_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_jan_18_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_JADE_JUNGLE) - EVT_CALL(SetSpriteShading, SHADING_JAN_17) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(N(EnableFog)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_IF - EVT_WAIT(1) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_JADE_JUNGLE) + Call(SetSpriteShading, SHADING_JAN_17) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + ExecWait(N(EVS_MakeEntities)) + Call(N(EnableFog)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Call(GetLoadType, LVar1) + IfEq(LVar1, 1) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Else + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndIf + Wait(1) + ExecWait(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_jan/jan_17/jan_17_3_entity.c b/src/world/area_jan/jan_17/jan_17_3_entity.c index de699c32d7a..f53480f7925 100644 --- a/src/world/area_jan/jan_17/jan_17_3_entity.c +++ b/src/world/area_jan/jan_17/jan_17_3_entity.c @@ -2,8 +2,8 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 0, 60, 0, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_PinkFlower), -61, 0, -7, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_SavePoint), 0, 60, 0, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_PinkFlower), -61, 0, -7, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_jan/jan_18/jan_18_1_music.c b/src/world/area_jan/jan_18/jan_18_1_music.c index d252064fe54..cf3bf64fb53 100644 --- a/src/world/area_jan/jan_18/jan_18_1_music.c +++ b/src/world/area_jan/jan_18/jan_18_1_music.c @@ -1,7 +1,7 @@ #include "jan_18.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(PlayAmbientSounds, AMBIENT_JUNGLE) - EVT_RETURN - EVT_END + Call(PlayAmbientSounds, AMBIENT_JUNGLE) + Return + End }; diff --git a/src/world/area_jan/jan_18/jan_18_2_main.c b/src/world/area_jan/jan_18/jan_18_2_main.c index 1af08638876..2d7dec56fee 100644 --- a/src/world/area_jan/jan_18/jan_18_2_main.c +++ b/src/world/area_jan/jan_18/jan_18_2_main.c @@ -4,23 +4,23 @@ EvtScript N(EVS_ExitWalk_jan_17_1) = EVT_EXIT_WALK(60, jan_18_ENTRY_0, "jan_17", EvtScript N(EVS_ExitWalk_jan_19_0) = EVT_EXIT_WALK(60, jan_18_ENTRY_1, "jan_19", jan_19_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_17_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_19_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_jan_17_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_jan_19_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_JADE_JUNGLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitse, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitn, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_JADE_JUNGLE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + ExecWait(N(EVS_MakeEntities)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitse, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitn, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + ExecWait(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_jan/jan_18/jan_18_3_entity.c b/src/world/area_jan/jan_18/jan_18_3_entity.c index 26c925d202b..273f32e483a 100644 --- a/src/world/area_jan/jan_18/jan_18_3_entity.c +++ b/src/world/area_jan/jan_18/jan_18_3_entity.c @@ -2,7 +2,7 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_HAPPY_HEART_B, -230, 460, 100, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_JAN18_Item_HappyHeartB) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_HAPPY_HEART_B, -230, 460, 100, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_JAN18_Item_HappyHeartB) + Return + End }; diff --git a/src/world/area_jan/jan_19/jan_19_1_music.c b/src/world/area_jan/jan_19/jan_19_1_music.c index 7dfb202e3d2..f41fd853963 100644 --- a/src/world/area_jan/jan_19/jan_19_1_music.c +++ b/src/world/area_jan/jan_19/jan_19_1_music.c @@ -1,7 +1,7 @@ #include "jan_19.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(ClearAmbientSounds, 250) - EVT_RETURN - EVT_END + Call(ClearAmbientSounds, 250) + Return + End }; diff --git a/src/world/area_jan/jan_19/jan_19_2_main.c b/src/world/area_jan/jan_19/jan_19_2_main.c index b0b61c90026..cd667e0535e 100644 --- a/src/world/area_jan/jan_19/jan_19_2_main.c +++ b/src/world/area_jan/jan_19/jan_19_2_main.c @@ -9,24 +9,24 @@ EvtScript N(EVS_ExitWalk_jan_18_1) = EVT_EXIT_WALK(60, jan_19_ENTRY_0, "jan_18", EvtScript N(EVS_ExitWalk_jan_23_0) = EVT_EXIT_WALK(60, jan_19_ENTRY_1, "jan_23", jan_23_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_18_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_23_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_jan_18_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_jan_23_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_JADE_JUNGLE) - EVT_CALL(SetSpriteShading, SHADING_JAN_19) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(N(EnableFog)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_JADE_JUNGLE) + Call(SetSpriteShading, SHADING_JAN_19) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + ExecWait(N(EVS_MakeEntities)) + Call(N(EnableFog)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + ExecWait(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_jan/jan_19/jan_19_3_entity.c b/src/world/area_jan/jan_19/jan_19_3_entity.c index c824840b6eb..a450eba192a 100644 --- a/src/world/area_jan/jan_19/jan_19_3_entity.c +++ b/src/world/area_jan/jan_19/jan_19_3_entity.c @@ -2,8 +2,8 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_PinkFlower), -154, 0, -20, 150, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_PinkFlower), 145, 450, 50, 120, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_PinkFlower), -154, 0, -20, 150, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_PinkFlower), 145, 450, 50, 120, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_jan/jan_22/jan_22_1_music.c b/src/world/area_jan/jan_22/jan_22_1_music.c index 1fc0f1dedd7..5bdc38a4ffa 100644 --- a/src/world/area_jan/jan_22/jan_22_1_music.c +++ b/src/world/area_jan/jan_22/jan_22_1_music.c @@ -1,40 +1,40 @@ #include "jan_22.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, jan_22_ENTRY_3) - EVT_CALL(SetMusicTrack, 0, SONG_STAR_SPIRIT_THEME, 1, 8) - EVT_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_GE(GB_StoryProgress, STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetMusicTrack, 0, SONG_DEEP_JUNGLE, 0, 8) - EVT_END_THREAD - EVT_ELSE - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH5_RAPHAEL_MOVED_ROOT, STORY_CH5_RAPHAEL_WAITING_FOR_MARIO) - EVT_IF_NE(LVar0, jan_22_ENTRY_1) - EVT_CALL(SetMusicTrack, 0, SONG_RAPHAEL_RAVEN, 0, 8) - EVT_SET(AF_JAN_03, FALSE) - EVT_END_IF - EVT_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_GE(GB_StoryProgress, STORY_CH5_ZIP_LINE_READY) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetMusicTrack, 0, SONG_DEEP_JUNGLE, 0, 8) - EVT_SET(AF_JAN_03, FALSE) - EVT_END_THREAD - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_DEEP_JUNGLE, 0, 8) - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(PlayAmbientSounds, AMBIENT_JUNGLE) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, jan_22_ENTRY_3) + Call(SetMusicTrack, 0, SONG_STAR_SPIRIT_THEME, 1, 8) + Thread + Loop(0) + Wait(1) + IfGe(GB_StoryProgress, STORY_CH5_STAR_SPRIT_DEPARTED) + BreakLoop + EndIf + EndLoop + Call(SetMusicTrack, 0, SONG_DEEP_JUNGLE, 0, 8) + EndThread + Else + Switch(GB_StoryProgress) + CaseRange(STORY_CH5_RAPHAEL_MOVED_ROOT, STORY_CH5_RAPHAEL_WAITING_FOR_MARIO) + IfNe(LVar0, jan_22_ENTRY_1) + Call(SetMusicTrack, 0, SONG_RAPHAEL_RAVEN, 0, 8) + Set(AF_JAN_03, FALSE) + EndIf + Thread + Loop(0) + Wait(1) + IfGe(GB_StoryProgress, STORY_CH5_ZIP_LINE_READY) + BreakLoop + EndIf + EndLoop + Call(SetMusicTrack, 0, SONG_DEEP_JUNGLE, 0, 8) + Set(AF_JAN_03, FALSE) + EndThread + CaseDefault + Call(SetMusicTrack, 0, SONG_DEEP_JUNGLE, 0, 8) + EndSwitch + EndIf + Call(PlayAmbientSounds, AMBIENT_JUNGLE) + Return + End }; diff --git a/src/world/area_jan/jan_22/jan_22_2_main.c b/src/world/area_jan/jan_22/jan_22_2_main.c index e62163afd17..1ca603b2ab6 100644 --- a/src/world/area_jan/jan_22/jan_22_2_main.c +++ b/src/world/area_jan/jan_22/jan_22_2_main.c @@ -7,68 +7,68 @@ EvtScript N(EVS_ExitWalk_kzn_01_0) = EVT_EXIT_WALK(60, jan_22_ENTRY_2, "kzn_01", MAP_RODATA_PAD(1, exits); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_03_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_16_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kzn_01_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_jan_03_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_jan_16_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kzn_01_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_TexPan_LavaFalls) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, MODEL_o262, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_o269, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_o261, TEX_PANNER_1) - EVT_SET(LVar0, 0) - EVT_LABEL(10) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, LVar0) - EVT_SUB(LVar0, 300) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, MODEL_o262, TEX_PANNER_1) + Call(SetTexPanner, MODEL_o269, TEX_PANNER_1) + Call(SetTexPanner, MODEL_o261, TEX_PANNER_1) + Set(LVar0, 0) + Label(10) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, LVar0) + Sub(LVar0, 300) + Wait(1) + Goto(10) + Return + End }; EvtScript N(EVS_TexPan_LavaSpread) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, MODEL_o275, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_o274, TEX_PANNER_2) - EVT_SET(LVar0, 0) - EVT_LABEL(10) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, 0, LVar0) - EVT_SUB(LVar0, 300) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, MODEL_o275, TEX_PANNER_2) + Call(SetTexPanner, MODEL_o274, TEX_PANNER_2) + Set(LVar0, 0) + Label(10) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, 0, LVar0) + Sub(LVar0, 300) + Wait(1) + Goto(10) + Return + End }; EvtScript N(EVS_TexPan_LavaFlow) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, MODEL_o263, TEX_PANNER_3) - EVT_CALL(SetTexPanner, MODEL_o271, TEX_PANNER_3) - EVT_SET(LVar0, 0) - EVT_LABEL(10) - EVT_CALL(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, 0, LVar0) - EVT_SUB(LVar0, 170) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, MODEL_o263, TEX_PANNER_3) + Call(SetTexPanner, MODEL_o271, TEX_PANNER_3) + Set(LVar0, 0) + Label(10) + Call(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, 0, LVar0) + Sub(LVar0, 170) + Wait(1) + Goto(10) + Return + End }; EvtScript N(EVS_TexPan_LavaGather) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, MODEL_o267, TEX_PANNER_4) - EVT_CALL(SetTexPanner, MODEL_o272, TEX_PANNER_4) - EVT_SET(LVar0, 0) - EVT_LABEL(10) - EVT_CALL(SetTexPanOffset, TEX_PANNER_4, TEX_PANNER_MAIN, 0, LVar0) - EVT_ADD(LVar0, 300) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, MODEL_o267, TEX_PANNER_4) + Call(SetTexPanner, MODEL_o272, TEX_PANNER_4) + Set(LVar0, 0) + Label(10) + Call(SetTexPanOffset, TEX_PANNER_4, TEX_PANNER_MAIN, 0, LVar0) + Add(LVar0, 300) + Wait(1) + Goto(10) + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -80,70 +80,70 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(D_8024202C_B861AC) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH5_ZIP_LINE_READY) - EVT_CALL(SetGroupVisibility, MODEL_g39, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_g52, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_g58, MODEL_GROUP_HIDDEN) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g29, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g39, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g86, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH5_RAPHAEL_WAITING_FOR_MARIO) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o149, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC_WAIT(N(EVS_SeparateBushesImmediately)) - EVT_END_IF - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_CH5_RAPHAEL_MOVED_ROOT) - EVT_THREAD - EVT_EXEC(N(EVS_Scene_RaphaelComingThrough)) - EVT_WAIT(200) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_THREAD - EVT_CASE_EQ(STORY_CH5_BEGAN_PEACH_MISSION) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_DEFAULT - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH5_ZIP_LINE_READY) + Call(SetGroupVisibility, MODEL_g39, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_g52, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_g58, MODEL_GROUP_HIDDEN) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g29, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g39, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g86, COLLIDER_FLAGS_UPPER_MASK) + EndIf + IfGe(GB_StoryProgress, STORY_CH5_RAPHAEL_WAITING_FOR_MARIO) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o149, COLLIDER_FLAGS_UPPER_MASK) + ExecWait(N(EVS_SeparateBushesImmediately)) + EndIf + Switch(GB_StoryProgress) + CaseEq(STORY_CH5_RAPHAEL_MOVED_ROOT) + Thread + Exec(N(EVS_Scene_RaphaelComingThrough)) + Wait(200) + Exec(N(EVS_BindExitTriggers)) + EndThread + CaseEq(STORY_CH5_BEGAN_PEACH_MISSION) + Exec(N(EVS_BindExitTriggers)) + CaseDefault + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_JADE_JUNGLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o304, COLLIDER_FLAGS_UPPER_MASK) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_RAPHAEL_MOVED_ROOT) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CASE_EQ(STORY_CH5_BEGAN_PEACH_MISSION) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CASE_DEFAULT - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(RavenNPCs))) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupZiplines)) - EVT_EXEC(N(EVS_SetupBasketElevator)) - EVT_EXEC(N(EVS_SetupTrees)) - EVT_EXEC(N(EVS_SetupBushes)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o294, SURFACE_TYPE_LAVA) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_EXEC(N(EVS_TexPan_LavaFalls)) - EVT_EXEC(N(EVS_TexPan_LavaSpread)) - EVT_EXEC(N(EVS_TexPan_LavaFlow)) - EVT_EXEC(N(EVS_TexPan_LavaGather)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitn, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(D_8024202C_B861AC)) - EVT_IF_EQ(GB_StoryProgress, STORY_CH5_BEGAN_PEACH_MISSION) - EVT_WAIT(65) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_JADE_JUNGLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o304, COLLIDER_FLAGS_UPPER_MASK) + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_RAPHAEL_MOVED_ROOT) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + CaseEq(STORY_CH5_BEGAN_PEACH_MISSION) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + CaseDefault + Call(MakeNpcs, FALSE, Ref(N(RavenNPCs))) + EndSwitch + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupZiplines)) + Exec(N(EVS_SetupBasketElevator)) + Exec(N(EVS_SetupTrees)) + Exec(N(EVS_SetupBushes)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o294, SURFACE_TYPE_LAVA) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + Exec(N(EVS_TexPan_LavaFalls)) + Exec(N(EVS_TexPan_LavaSpread)) + Exec(N(EVS_TexPan_LavaFlow)) + Exec(N(EVS_TexPan_LavaGather)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitn, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(D_8024202C_B861AC)) + IfEq(GB_StoryProgress, STORY_CH5_BEGAN_PEACH_MISSION) + Wait(65) + EndIf + ExecWait(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_jan/jan_22/jan_22_3_npc.c b/src/world/area_jan/jan_22/jan_22_3_npc.c index 49a7d866240..df1acf7b24b 100644 --- a/src/world/area_jan/jan_22/jan_22_3_npc.c +++ b/src/world/area_jan/jan_22/jan_22_3_npc.c @@ -33,565 +33,565 @@ API_CALLABLE(N(UpgradeStarPowerCh5)) { } EvtScript N(EVS_TetherCamToBasketPlayer) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_UseBasketElevator) = { - EVT_CALL(GetPartnerInUse, LVar9) - EVT_IF_EQ(LVar9, PARTNER_KOOPER) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar9, PARTNER_BOMBETTE) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar9, PARTNER_LAKILESTER) - EVT_RETURN - EVT_END_IF - EVT_CALL(IsPlayerOnValidFloor, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(IsPlayerWithin, 200, 0, 25, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_WAIT(7) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_ADD(LVar5, -5) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.5)) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar3, LVar4, LVar5, 10) - EVT_CALL(EnableNpcShadow, NPC_PARTNER, FALSE) - EVT_END_IF - EVT_EXEC_GET_TID(N(EVS_TetherCamToBasketPlayer), LVar7) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(PlaySoundAtModel, MODEL_o123, SOUND_JAN_BASKET_ELEVATOR, 0) - EVT_CALL(MakeLerp, 0, 170, 60, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(LVar6, LVar4) - EVT_ADD(LVar6, LVar0) - EVT_CALL(SetPlayerPos, LVar3, LVar6, LVar5) - EVT_CALL(GetPartnerInUse, LVar8) - EVT_IF_EQ(LVar8, PARTNER_NONE) - EVT_ADD(LVar6, 5) - EVT_ADD(LVar5, -5) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar3, LVar6, LVar5) - EVT_ADD(LVar6, -5) - EVT_ADD(LVar5, 5) - EVT_END_IF - EVT_SETF(LVar2, EVT_FLOAT(200.0)) - EVT_SUBF(LVar2, LVar0) - EVT_DIVF(LVar2, EVT_FLOAT(200.0)) - EVT_CALL(ScaleModel, MODEL_o147, 1, LVar2, 1) - EVT_CALL(TranslateModel, MODEL_o146, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o124, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_KILL_THREAD(LVar7) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_WAIT(5) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySoundAtModel, MODEL_o123, SOUND_JAN_BASKET_ELEVATOR, 0) - EVT_CALL(MakeLerp, 170, 0, 60, EASING_CUBIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, EVT_FLOAT(200.0)) - EVT_SUBF(LVar2, LVar0) - EVT_DIVF(LVar2, EVT_FLOAT(200.0)) - EVT_CALL(ScaleModel, MODEL_o147, 1, LVar2, 1) - EVT_CALL(TranslateModel, MODEL_o146, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o124, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(PlayerJump, 270, 205, 15, 20) - EVT_CALL(HidePlayerShadow, FALSE) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, 285, 15, 0) - EVT_END_THREAD - EVT_CALL(PartnerIsFlying, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_WAIT(10) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_PARTNER, 260, 205, 15, 15) - EVT_END_IF - EVT_CALL(EnableNpcShadow, NPC_PARTNER, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_WAIT(5) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(GetPartnerInUse, LVar9) + IfEq(LVar9, PARTNER_KOOPER) + Return + EndIf + IfEq(LVar9, PARTNER_BOMBETTE) + Return + EndIf + IfEq(LVar9, PARTNER_LAKILESTER) + Return + EndIf + Call(IsPlayerOnValidFloor, LVar0) + IfEq(LVar0, FALSE) + Return + EndIf + Call(IsPlayerWithin, 200, 0, 25, LVar0) + IfEq(LVar0, 0) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(HidePlayerShadow, TRUE) + Wait(7) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Call(GetPartnerInUse, LVar0) + IfEq(LVar0, 0) + Add(LVar5, -5) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.5)) + Call(NpcJump0, NPC_PARTNER, LVar3, LVar4, LVar5, 10) + Call(EnableNpcShadow, NPC_PARTNER, FALSE) + EndIf + ExecGetTID(N(EVS_TetherCamToBasketPlayer), LVar7) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(PlaySoundAtModel, MODEL_o123, SOUND_JAN_BASKET_ELEVATOR, 0) + Call(MakeLerp, 0, 170, 60, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Set(LVar6, LVar4) + Add(LVar6, LVar0) + Call(SetPlayerPos, LVar3, LVar6, LVar5) + Call(GetPartnerInUse, LVar8) + IfEq(LVar8, PARTNER_NONE) + Add(LVar6, 5) + Add(LVar5, -5) + Call(SetNpcPos, NPC_PARTNER, LVar3, LVar6, LVar5) + Add(LVar6, -5) + Add(LVar5, 5) + EndIf + SetF(LVar2, Float(200.0)) + SubF(LVar2, LVar0) + DivF(LVar2, Float(200.0)) + Call(ScaleModel, MODEL_o147, 1, LVar2, 1) + Call(TranslateModel, MODEL_o146, 0, LVar0, 0) + Call(TranslateModel, MODEL_o124, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + KillThread(LVar7) + Call(DisablePlayerPhysics, FALSE) + Wait(5) + Thread + Wait(15) + Call(PlaySoundAtModel, MODEL_o123, SOUND_JAN_BASKET_ELEVATOR, 0) + Call(MakeLerp, 170, 0, 60, EASING_CUBIC_OUT) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, Float(200.0)) + SubF(LVar2, LVar0) + DivF(LVar2, Float(200.0)) + Call(ScaleModel, MODEL_o147, 1, LVar2, 1) + Call(TranslateModel, MODEL_o146, 0, LVar0, 0) + Call(TranslateModel, MODEL_o124, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(SetPlayerJumpscale, Float(1.0)) + Call(PlayerJump, 270, 205, 15, 20) + Call(HidePlayerShadow, FALSE) + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, 285, 15, 0) + EndThread + Call(PartnerIsFlying, LVar0) + IfEq(LVar0, TRUE) + Wait(10) + Call(SetNpcJumpscale, NPC_PARTNER, Float(1.0)) + Call(NpcJump0, NPC_PARTNER, 260, 205, 15, 15) + EndIf + Call(EnableNpcShadow, NPC_PARTNER, TRUE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(EnablePartnerAI) + Wait(5) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SetupBasketElevator) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseBasketElevator)), TRIGGER_FLOOR_TOUCH, COLLIDER_o124, 1, 0) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_ZIP_LINE_READY) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o124, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ScaleModel, MODEL_o147, 1, EVT_FLOAT(0.15625), 1) - EVT_CALL(TranslateModel, MODEL_o146, 0, 178, 0) - EVT_CALL(TranslateModel, MODEL_o124, 0, 178, 0) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o124, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ScaleModel, MODEL_o147, 1, 1, 1) - EVT_CALL(TranslateModel, MODEL_o146, 0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o124, 0, 0, 0) - EVT_END_IF - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_UseBasketElevator)), TRIGGER_FLOOR_TOUCH, COLLIDER_o124, 1, 0) + IfLt(GB_StoryProgress, STORY_CH5_ZIP_LINE_READY) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o124, COLLIDER_FLAGS_UPPER_MASK) + Call(ScaleModel, MODEL_o147, 1, Float(0.15625), 1) + Call(TranslateModel, MODEL_o146, 0, 178, 0) + Call(TranslateModel, MODEL_o124, 0, 178, 0) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o124, COLLIDER_FLAGS_UPPER_MASK) + Call(ScaleModel, MODEL_o147, 1, 1, 1) + Call(TranslateModel, MODEL_o146, 0, 0, 0) + Call(TranslateModel, MODEL_o124, 0, 0, 0) + EndIf + Return + End }; EvtScript N(EVS_GatherRavensNearRaphael) = { - EVT_CALL(SetNpcPos, NPC_Raven_01, 177, 0, -10) - EVT_CALL(SetNpcPos, NPC_Raven_02, 127, 0, 5) - EVT_CALL(SetNpcPos, NPC_Raven_03, 152, 0, 0) - EVT_CALL(SetNpcPos, NPC_Raven_04, 102, 0, 0) - EVT_CALL(SetNpcPos, NPC_Raven_05, 77, 0, -10) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Raven_01, 177, 0, -10) + Call(SetNpcPos, NPC_Raven_02, 127, 0, 5) + Call(SetNpcPos, NPC_Raven_03, 152, 0, 0) + Call(SetNpcPos, NPC_Raven_04, 102, 0, 0) + Call(SetNpcPos, NPC_Raven_05, 77, 0, -10) + Return + End }; EvtScript N(EVS_Ravens_LeapIntoTree) = { - EVT_CHILD_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_Raven_02, SOUND_RAVEN_LEAP_A, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcFlagBits, NPC_Raven_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Flail) - EVT_CALL(NpcJump0, NPC_Raven_02, 271, 325, -17, 30 * DT) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_WAIT(3 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Raven_05, SOUND_RAVEN_LEAP_B, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcFlagBits, NPC_Raven_05, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Flail) - EVT_CALL(NpcJump0, NPC_Raven_05, 400, 215, -23, 30 * DT) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_WAIT(6 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Raven_01, SOUND_RAVEN_LEAP_A, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcFlagBits, NPC_Raven_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Flail) - EVT_CALL(NpcJump0, NPC_Raven_01, 208, 335, -17, 30 * DT) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_WAIT(9 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Raven_03, SOUND_RAVEN_LEAP_B, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcFlagBits, NPC_Raven_03, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Flail) - EVT_CALL(NpcJump0, NPC_Raven_03, 327, 200, -8, 30 * DT) - EVT_END_CHILD_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Raven_04, SOUND_RAVEN_LEAP_A, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcFlagBits, NPC_Raven_04, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Flail) - EVT_CALL(NpcJump0, NPC_Raven_04, 222, 284, -13, 15 * DT) - EVT_RETURN - EVT_END + ChildThread + Call(PlaySoundAtNpc, NPC_Raven_02, SOUND_RAVEN_LEAP_A, SOUND_SPACE_DEFAULT) + Call(SetNpcFlagBits, NPC_Raven_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Flail) + Call(NpcJump0, NPC_Raven_02, 271, 325, -17, 30 * DT) + EndChildThread + ChildThread + Wait(3 * DT) + Call(PlaySoundAtNpc, NPC_Raven_05, SOUND_RAVEN_LEAP_B, SOUND_SPACE_DEFAULT) + Call(SetNpcFlagBits, NPC_Raven_05, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Flail) + Call(NpcJump0, NPC_Raven_05, 400, 215, -23, 30 * DT) + EndChildThread + ChildThread + Wait(6 * DT) + Call(PlaySoundAtNpc, NPC_Raven_01, SOUND_RAVEN_LEAP_A, SOUND_SPACE_DEFAULT) + Call(SetNpcFlagBits, NPC_Raven_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Flail) + Call(NpcJump0, NPC_Raven_01, 208, 335, -17, 30 * DT) + EndChildThread + ChildThread + Wait(9 * DT) + Call(PlaySoundAtNpc, NPC_Raven_03, SOUND_RAVEN_LEAP_B, SOUND_SPACE_DEFAULT) + Call(SetNpcFlagBits, NPC_Raven_03, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Flail) + Call(NpcJump0, NPC_Raven_03, 327, 200, -8, 30 * DT) + EndChildThread + Wait(30 * DT) + Call(PlaySoundAtNpc, NPC_Raven_04, SOUND_RAVEN_LEAP_A, SOUND_SPACE_DEFAULT) + Call(SetNpcFlagBits, NPC_Raven_04, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Flail) + Call(NpcJump0, NPC_Raven_04, 222, 284, -13, 15 * DT) + Return + End }; EvtScript N(EVS_NpcInteract_RaphaelRaven) = { - EVT_CALL(GetNpcPos, NPC_RaphaelRaven, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-8.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.5 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(N(DisableCameraLeadingPlayer)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcFlagBits, NPC_RaphaelRaven, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RaphaelRaven_Talk, ANIM_RaphaelRaven_Idle, 0, MSG_CH5_00C7) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RaphaelRaven_Talk, ANIM_RaphaelRaven_Idle, 0, MSG_CH5_00C8) - EVT_CALL(SetNpcVar, NPC_Raven_01, 0, RAVEN_SCENE_LEAP_INTO_ACTION) - EVT_CALL(BindNpcInteract, NPC_SELF, 0) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_RaphaelRaven, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-8.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.5 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(N(DisableCameraLeadingPlayer)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(SetNpcFlagBits, NPC_RaphaelRaven, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(NpcFacePlayer, NPC_SELF, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_RaphaelRaven_Talk, ANIM_RaphaelRaven_Idle, 0, MSG_CH5_00C7) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_RaphaelRaven_Talk, ANIM_RaphaelRaven_Idle, 0, MSG_CH5_00C8) + Call(SetNpcVar, NPC_Raven_01, 0, RAVEN_SCENE_LEAP_INTO_ACTION) + Call(BindNpcInteract, NPC_SELF, 0) + Return + End }; EvtScript N(EVS_NpcIdle_RaphaelRaven) = { - EVT_LABEL(0) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_RAPHAEL_WAITING_FOR_MARIO) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_RaphaelRaven))) - EVT_RETURN - EVT_END + Label(0) + IfLt(GB_StoryProgress, STORY_CH5_RAPHAEL_WAITING_FOR_MARIO) + Wait(1) + Goto(0) + EndIf + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_RaphaelRaven))) + Return + End }; EvtScript N(EVS_NpcInit_RaphaelRaven) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_CH5_RAPHAEL_MOVED_ROOT) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_RaphaelRaven))) - EVT_CASE_EQ(STORY_CH5_RAPHAEL_WAITING_FOR_MARIO) - EVT_CALL(SetNpcPos, NPC_SELF, 125, 0, -40) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_RaphaelRaven))) - EVT_CASE_DEFAULT - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseEq(STORY_CH5_RAPHAEL_MOVED_ROOT) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_RaphaelRaven))) + CaseEq(STORY_CH5_RAPHAEL_WAITING_FOR_MARIO) + Call(SetNpcPos, NPC_SELF, 125, 0, -40) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_RaphaelRaven))) + CaseDefault + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Raven) = { - EVT_IF_EQ(GF_JAN22_Met_Raven, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Raven_01, ANIM_Raven_Talk, ANIM_Raven_Idle, 0, MSG_CH5_00D2) - EVT_SET(GF_JAN22_Met_Raven, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Raven_01, ANIM_Raven_Talk, ANIM_Raven_Idle, 0, MSG_CH5_00D3) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_JAN22_Met_Raven, FALSE) + Call(SpeakToPlayer, NPC_Raven_01, ANIM_Raven_Talk, ANIM_Raven_Idle, 0, MSG_CH5_00D2) + Set(GF_JAN22_Met_Raven, TRUE) + Else + Call(SpeakToPlayer, NPC_Raven_01, ANIM_Raven_Talk, ANIM_Raven_Idle, 0, MSG_CH5_00D3) + EndIf + Return + End }; EvtScript N(EVS_Raven_HopAndWalkAway) = { - EVT_WAIT(45) - EVT_CALL(NpcJump0, LVar0, 30, 0, -15, 10) - EVT_CALL(SetNpcAnimation, LVar0, ANIM_Raven_Walk) - EVT_CALL(SetNpcSpeed, LVar0, EVT_FLOAT(3.0 / DT)) - EVT_CALL(NpcMoveTo, LVar0, -120, 0, 0) - EVT_CALL(SetNpcPos, LVar0, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END + Wait(45) + Call(NpcJump0, LVar0, 30, 0, -15, 10) + Call(SetNpcAnimation, LVar0, ANIM_Raven_Walk) + Call(SetNpcSpeed, LVar0, Float(3.0 / DT)) + Call(NpcMoveTo, LVar0, -120, 0, 0) + Call(SetNpcPos, LVar0, NPC_DISPOSE_LOCATION) + Return + End }; EvtScript N(EVS_BuildingEffects) = { - EVT_CALL(PlaySoundAt, SOUND_LOOP_JAN_CONSTRUCTION, SOUND_SPACE_DEFAULT, 270, 130, 0) - EVT_LOOP(0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 3, EVT_FLOAT(1.0)) - EVT_WAIT(30 * DT) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 8, EVT_FLOAT(1.0)) - EVT_CALL(RandInt, 4, LVar0) - EVT_ADD(LVar0, 1) - EVT_PLAY_EFFECT(EFFECT_DAMAGE_STARS, FX_DAMAGE_STARS_3, 290, 155, 0, 240, 0, 0, LVar0) - EVT_WAIT(10 * DT) - EVT_PLAY_EFFECT(EFFECT_DAMAGE_STARS, FX_DAMAGE_STARS_3, 275, 150, 0, 240, 0, 0, 3) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 2, EVT_FLOAT(1.0)) - EVT_WAIT(4 * DT) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 2, EVT_FLOAT(1.0)) - EVT_WAIT(4 * DT) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(PlaySoundAt, SOUND_LOOP_JAN_CONSTRUCTION, SOUND_SPACE_DEFAULT, 270, 130, 0) + Loop(0) + Call(ShakeCam, CAM_DEFAULT, 0, 3, Float(1.0)) + Wait(30 * DT) + Call(ShakeCam, CAM_DEFAULT, 0, 8, Float(1.0)) + Call(RandInt, 4, LVar0) + Add(LVar0, 1) + PlayEffect(EFFECT_DAMAGE_STARS, FX_DAMAGE_STARS_3, 290, 155, 0, 240, 0, 0, LVar0) + Wait(10 * DT) + PlayEffect(EFFECT_DAMAGE_STARS, FX_DAMAGE_STARS_3, 275, 150, 0, 240, 0, 0, 3) + Call(ShakeCam, CAM_DEFAULT, 0, 2, Float(1.0)) + Wait(4 * DT) + Call(ShakeCam, CAM_DEFAULT, 0, 2, Float(1.0)) + Wait(4 * DT) + EndLoop + Return + End }; EvtScript N(EVS_ManageRavens) = { - EVT_LABEL(0) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_RAPHAEL_WAITING_FOR_MARIO) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o304, COLLIDER_FLAGS_UPPER_MASK) - EVT_LABEL(1) - EVT_CALL(NpcFacePlayer, NPC_Raven_01, 0) - EVT_CALL(NpcFacePlayer, NPC_Raven_02, 0) - EVT_CALL(NpcFacePlayer, NPC_Raven_03, 0) - EVT_CALL(NpcFacePlayer, NPC_Raven_04, 0) - EVT_CALL(NpcFacePlayer, NPC_Raven_05, 0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, RAVEN_SCENE_AWAITING_COMMAND) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o304, COLLIDER_FLAGS_UPPER_MASK) - EVT_LABEL(2) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(RAVEN_SCENE_LEAP_INTO_ACTION) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterpNpcYaw, NPC_Raven_01, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_Raven_02, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_Raven_03, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_Raven_04, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_Raven_05, 90, 0) - EVT_WAIT(10 * DT) - EVT_EXEC_GET_TID(N(EVS_Ravens_LeapIntoTree), LVar9) - EVT_WAIT(40 * DT) - EVT_KILL_THREAD(LVar9) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcPos, NPC_Raven_01, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_Raven_02, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_Raven_03, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_Raven_04, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_Raven_05, NPC_DISPOSE_LOCATION) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 300, 250, 150) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 300, 250, 150) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + Label(0) + IfLt(GB_StoryProgress, STORY_CH5_RAPHAEL_WAITING_FOR_MARIO) + Wait(1) + Goto(0) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o304, COLLIDER_FLAGS_UPPER_MASK) + Label(1) + Call(NpcFacePlayer, NPC_Raven_01, 0) + Call(NpcFacePlayer, NPC_Raven_02, 0) + Call(NpcFacePlayer, NPC_Raven_03, 0) + Call(NpcFacePlayer, NPC_Raven_04, 0) + Call(NpcFacePlayer, NPC_Raven_05, 0) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, RAVEN_SCENE_AWAITING_COMMAND) + Wait(1) + Goto(1) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o304, COLLIDER_FLAGS_UPPER_MASK) + Label(2) + Call(GetSelfVar, 0, LVar0) + Switch(LVar0) + CaseEq(RAVEN_SCENE_LEAP_INTO_ACTION) + Call(DisablePlayerInput, TRUE) + Call(InterpNpcYaw, NPC_Raven_01, 90, 0) + Call(InterpNpcYaw, NPC_Raven_02, 90, 0) + Call(InterpNpcYaw, NPC_Raven_03, 90, 0) + Call(InterpNpcYaw, NPC_Raven_04, 90, 0) + Call(InterpNpcYaw, NPC_Raven_05, 90, 0) + Wait(10 * DT) + ExecGetTID(N(EVS_Ravens_LeapIntoTree), LVar9) + Wait(40 * DT) + KillThread(LVar9) + Wait(10 * DT) + Call(SetNpcPos, NPC_Raven_01, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_Raven_02, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_Raven_03, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_Raven_04, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_Raven_05, NPC_DISPOSE_LOCATION) + Call(UseSettingsFrom, CAM_DEFAULT, 300, 250, 150) + Call(SetPanTarget, CAM_DEFAULT, 300, 250, 150) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) // repeat the action with a time delay across the sudden camera cut - EVT_EXEC(N(EVS_GatherRavensNearRaphael)) - EVT_WAIT(10 * DT) - EVT_EXEC_WAIT(N(EVS_Ravens_LeapIntoTree)) - EVT_CALL(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Walk) - EVT_CALL(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Walk) - EVT_CALL(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Walk) - EVT_CALL(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Walk) - EVT_CALL(PlaySoundAtNpc, NPC_Raven_04, SOUND_SMACK_TREE, SOUND_SPACE_DEFAULT) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 3, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Raven_01, EVT_FLOAT(3.0)) - EVT_CALL(GetNpcPos, NPC_Raven_01, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Raven_01, LVar0, LVar1, LVar2, 5 * DT) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Raven_02, EVT_FLOAT(3.0)) - EVT_CALL(GetNpcPos, NPC_Raven_02, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Raven_02, LVar0, LVar1, LVar2, 5 * DT) - EVT_CALL(InterpNpcYaw, NPC_Raven_02, 270, 0) - EVT_END_THREAD - EVT_WAIT(3 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Raven_04, SOUND_RAVEN_FALL_A, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcRotation, NPC_Raven_04, 0, 0, 180) - EVT_CALL(SetNpcFlagBits, NPC_Raven_04, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(InterpNpcYaw, NPC_Raven_03, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_Raven_05, 270, 0) - EVT_CALL(SetNpcYaw, NPC_RaphaelRaven, 90) - EVT_CALL(GetNpcPos, NPC_RaphaelRaven, LVar0, LVar1, LVar2) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_ADD(LVar2, 80) - EVT_CALL(SetPlayerPos, 145, 0, LVar2) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, 115, 0, LVar2) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 90) - EVT_WAIT(80 * DT) - EVT_CALL(SetNpcRotation, NPC_Raven_04, 0, 0, 0) - EVT_CALL(SetSelfVar, 0, RAVEN_SCENE_CONSTRUCTION_WORK) - EVT_CASE_EQ(RAVEN_SCENE_CONSTRUCTION_WORK) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 165, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 165, 0, 0) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-8.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcFlagBits, NPC_Raven_04, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(NpcMoveTo, NPC_Raven_04, 260, -20, 0) - EVT_CALL(SetNpcRotation, NPC_Raven_04, 0, 0, 90) - EVT_CALL(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Walk) - EVT_CALL(NpcJump0, NPC_Raven_04, 300, 300, -14, 20 * DT) - EVT_CALL(SetNpcRotation, NPC_Raven_04, 0, 0, 0) - EVT_EXEC_GET_TID(N(EVS_BuildingEffects), LVarA) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToPlayer, NPC_RaphaelRaven, ANIM_RaphaelRaven_Talk, ANIM_RaphaelRaven_Idle, 0, MSG_CH5_00CA) - EVT_WAIT(50 * DT) - EVT_CALL(SetNpcVar, NPC_Kolorado_02, 0, 10) - EVT_WAIT(140 * DT) - EVT_LABEL(11) - EVT_CALL(GetNpcVar, NPC_Kolorado_02, 0, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(11) - EVT_END_IF - EVT_WAIT(40 * DT) - EVT_CALL(StopSound, SOUND_LOOP_JAN_CONSTRUCTION) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetSelfVar, 0, RAVEN_SCENE_FINISH_WORK) - EVT_CASE_EQ(RAVEN_SCENE_FINISH_WORK) - EVT_WAIT(20 * DT) - EVT_CALL(SetGroupVisibility, MODEL_g39, MODEL_GROUP_VISIBLE) - EVT_CALL(SetGroupVisibility, MODEL_g52, MODEL_GROUP_VISIBLE) - EVT_CALL(SetGroupVisibility, MODEL_g58, MODEL_GROUP_VISIBLE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_g29, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_g39, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_g86, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Idle) - EVT_CALL(SetNpcPos, NPC_Raven_01, 255, 205, -25) - EVT_CALL(SetNpcPos, NPC_Raven_02, 200, 185, 0) - EVT_CALL(SetNpcPos, NPC_Raven_03, 338, 212, -20) - EVT_CALL(SetNpcPos, NPC_Raven_04, 267, 314, -12) - EVT_CALL(PlaySoundAtNpc, NPC_Raven_05, SOUND_RAVEN_LEAP_A, SOUND_SPACE_DEFAULT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 60) - EVT_CALL(NpcJump0, NPC_Raven_05, LVar0, 0, 40, 20 * DT) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Raven_05, ANIM_Raven_Talk, ANIM_Raven_Idle, 0, MSG_CH5_00CC) - EVT_WAIT(15 * DT) - EVT_CALL(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Idle) - EVT_CALL(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Idle) - EVT_CALL(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Idle) - EVT_CALL(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Idle) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 300, 250, 150) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 300, 250, 150) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(15 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Raven_05, SOUND_RAVEN_LEAP_A, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcPos, NPC_Raven_05, 350, 0, 100) - EVT_CALL(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Flail) - EVT_CALL(NpcJump0, NPC_Raven_05, 400, 215, -23, 20 * DT) - EVT_CALL(SpeakToPlayer, NPC_Raven_05, ANIM_Raven_Talk, ANIM_Raven_Idle, 0, MSG_CH5_00CD) - EVT_THREAD - EVT_CALL(PlaySoundAtModel, MODEL_o123, SOUND_JAN_BASKET_ELEVATOR, 0) - EVT_CALL(MakeLerp, 170, 0, 60, EASING_CUBIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(LVar3, LVar0) - EVT_ADD(LVar3, 9) - EVT_CALL(SetNpcPos, NPC_Raven_02, 200, LVar3, 0) - EVT_SETF(LVar2, EVT_FLOAT(200.0)) - EVT_SUBF(LVar2, LVar0) - EVT_DIVF(LVar2, EVT_FLOAT(200.0)) - EVT_CALL(ScaleModel, MODEL_o147, 1, LVar2, 1) - EVT_CALL(TranslateModel, MODEL_o146, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o124, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetSelfVar, 0, RAVEN_SCENE_LOWERED_BASKET) - EVT_END_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 165, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 165, 0, 0) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-8.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_RaphaelRaven, ANIM_RaphaelRaven_Talk, ANIM_RaphaelRaven_Idle, 0, MSG_CH5_00CE) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, RAVEN_SCENE_LOWERED_BASKET) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtNpc, NPC_Raven_05, SOUND_RAVEN_LEAP_A, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Raven_05, 150, 0, 20, 15 * DT) - EVT_CALL(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Walk) - EVT_THREAD - EVT_CALL(NpcMoveTo, NPC_Raven_05, 65, 25, 30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Idle) - EVT_CALL(InterpNpcYaw, NPC_Raven_05, 90, 0) - EVT_END_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_Raven_04, SOUND_RAVEN_LEAP_B, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Raven_04, 150, 0, 20, 15 * DT) - EVT_CALL(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Walk) - EVT_THREAD - EVT_CALL(NpcMoveTo, NPC_Raven_04, 80, -10, 25 * DT) - EVT_CALL(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Idle) - EVT_CALL(InterpNpcYaw, NPC_Raven_04, 90, 0) - EVT_END_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_Raven_03, SOUND_RAVEN_LEAP_A, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Raven_03, 150, 0, 20, 15 * DT) - EVT_CALL(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Walk) - EVT_THREAD - EVT_CALL(NpcMoveTo, NPC_Raven_03, 95, 25, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Idle) - EVT_CALL(InterpNpcYaw, NPC_Raven_03, 90, 0) - EVT_END_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_Raven_02, SOUND_RAVEN_LEAP_B, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Raven_02, 150, 0, 20, 15 * DT) - EVT_CALL(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Walk) - EVT_CALL(NpcMoveTo, NPC_Raven_02, 110, -10, 15 * DT) - EVT_CALL(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Idle) - EVT_CALL(InterpNpcYaw, NPC_Raven_02, 90, 0) - EVT_CALL(SetNpcVar, NPC_Kolorado_02, 0, 20) - EVT_CALL(SetSelfVar, 0, RAVEN_SCENE_HEADNG_OUT) - EVT_CASE_EQ(RAVEN_SCENE_HEADNG_OUT) - EVT_CALL(GetNpcVar, NPC_Kolorado_02, 0, LVar0) - EVT_IF_EQ(LVar0, -1) - EVT_CALL(SpeakToPlayer, NPC_RaphaelRaven, ANIM_RaphaelRaven_Talk, ANIM_RaphaelRaven_Idle, 0, MSG_CH5_00D0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(10.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + Exec(N(EVS_GatherRavensNearRaphael)) + Wait(10 * DT) + ExecWait(N(EVS_Ravens_LeapIntoTree)) + Call(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Walk) + Call(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Walk) + Call(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Walk) + Call(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Walk) + Call(PlaySoundAtNpc, NPC_Raven_04, SOUND_SMACK_TREE, SOUND_SPACE_DEFAULT) + Call(ShakeCam, CAM_DEFAULT, 0, 3, Float(1.0)) + Thread + Call(SetNpcJumpscale, NPC_Raven_01, Float(3.0)) + Call(GetNpcPos, NPC_Raven_01, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Raven_01, LVar0, LVar1, LVar2, 5 * DT) + EndThread + Thread + Call(SetNpcJumpscale, NPC_Raven_02, Float(3.0)) + Call(GetNpcPos, NPC_Raven_02, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Raven_02, LVar0, LVar1, LVar2, 5 * DT) + Call(InterpNpcYaw, NPC_Raven_02, 270, 0) + EndThread + Wait(3 * DT) + Call(PlaySoundAtNpc, NPC_Raven_04, SOUND_RAVEN_FALL_A, SOUND_SPACE_DEFAULT) + Call(SetNpcRotation, NPC_Raven_04, 0, 0, 180) + Call(SetNpcFlagBits, NPC_Raven_04, NPC_FLAG_GRAVITY, TRUE) + Call(InterpNpcYaw, NPC_Raven_03, 270, 0) + Call(InterpNpcYaw, NPC_Raven_05, 270, 0) + Call(SetNpcYaw, NPC_RaphaelRaven, 90) + Call(GetNpcPos, NPC_RaphaelRaven, LVar0, LVar1, LVar2) + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Add(LVar2, 80) + Call(SetPlayerPos, 145, 0, LVar2) + Call(InterpPlayerYaw, 90, 0) + Call(SetNpcPos, NPC_PARTNER, 115, 0, LVar2) + Call(SetNpcYaw, NPC_PARTNER, 90) + Wait(80 * DT) + Call(SetNpcRotation, NPC_Raven_04, 0, 0, 0) + Call(SetSelfVar, 0, RAVEN_SCENE_CONSTRUCTION_WORK) + CaseEq(RAVEN_SCENE_CONSTRUCTION_WORK) + Call(UseSettingsFrom, CAM_DEFAULT, 165, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 165, 0, 0) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-8.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(20 * DT) + Call(SetNpcFlagBits, NPC_Raven_04, NPC_FLAG_GRAVITY, FALSE) + Call(NpcMoveTo, NPC_Raven_04, 260, -20, 0) + Call(SetNpcRotation, NPC_Raven_04, 0, 0, 90) + Call(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Walk) + Call(NpcJump0, NPC_Raven_04, 300, 300, -14, 20 * DT) + Call(SetNpcRotation, NPC_Raven_04, 0, 0, 0) + ExecGetTID(N(EVS_BuildingEffects), LVarA) + Wait(30 * DT) + Call(SpeakToPlayer, NPC_RaphaelRaven, ANIM_RaphaelRaven_Talk, ANIM_RaphaelRaven_Idle, 0, MSG_CH5_00CA) + Wait(50 * DT) + Call(SetNpcVar, NPC_Kolorado_02, 0, 10) + Wait(140 * DT) + Label(11) + Call(GetNpcVar, NPC_Kolorado_02, 0, LVar0) + IfNe(LVar0, 0) + Wait(1) + Goto(11) + EndIf + Wait(40 * DT) + Call(StopSound, SOUND_LOOP_JAN_CONSTRUCTION) + KillThread(LVarA) + Call(SetSelfVar, 0, RAVEN_SCENE_FINISH_WORK) + CaseEq(RAVEN_SCENE_FINISH_WORK) + Wait(20 * DT) + Call(SetGroupVisibility, MODEL_g39, MODEL_GROUP_VISIBLE) + Call(SetGroupVisibility, MODEL_g52, MODEL_GROUP_VISIBLE) + Call(SetGroupVisibility, MODEL_g58, MODEL_GROUP_VISIBLE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_g29, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_g39, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_g86, COLLIDER_FLAGS_UPPER_MASK) + Call(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Idle) + Call(SetNpcPos, NPC_Raven_01, 255, 205, -25) + Call(SetNpcPos, NPC_Raven_02, 200, 185, 0) + Call(SetNpcPos, NPC_Raven_03, 338, 212, -20) + Call(SetNpcPos, NPC_Raven_04, 267, 314, -12) + Call(PlaySoundAtNpc, NPC_Raven_05, SOUND_RAVEN_LEAP_A, SOUND_SPACE_DEFAULT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 60) + Call(NpcJump0, NPC_Raven_05, LVar0, 0, 40, 20 * DT) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Raven_05, ANIM_Raven_Talk, ANIM_Raven_Idle, 0, MSG_CH5_00CC) + Wait(15 * DT) + Call(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Idle) + Call(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Idle) + Call(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Idle) + Call(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Idle) + Call(UseSettingsFrom, CAM_DEFAULT, 300, 250, 150) + Call(SetPanTarget, CAM_DEFAULT, 300, 250, 150) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(15 * DT) + Call(PlaySoundAtNpc, NPC_Raven_05, SOUND_RAVEN_LEAP_A, SOUND_SPACE_DEFAULT) + Call(SetNpcPos, NPC_Raven_05, 350, 0, 100) + Call(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Flail) + Call(NpcJump0, NPC_Raven_05, 400, 215, -23, 20 * DT) + Call(SpeakToPlayer, NPC_Raven_05, ANIM_Raven_Talk, ANIM_Raven_Idle, 0, MSG_CH5_00CD) + Thread + Call(PlaySoundAtModel, MODEL_o123, SOUND_JAN_BASKET_ELEVATOR, 0) + Call(MakeLerp, 170, 0, 60, EASING_CUBIC_OUT) + Loop(0) + Call(UpdateLerp) + Set(LVar3, LVar0) + Add(LVar3, 9) + Call(SetNpcPos, NPC_Raven_02, 200, LVar3, 0) + SetF(LVar2, Float(200.0)) + SubF(LVar2, LVar0) + DivF(LVar2, Float(200.0)) + Call(ScaleModel, MODEL_o147, 1, LVar2, 1) + Call(TranslateModel, MODEL_o146, 0, LVar0, 0) + Call(TranslateModel, MODEL_o124, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetSelfVar, 0, RAVEN_SCENE_LOWERED_BASKET) + EndThread + Wait(20 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, 165, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 165, 0, 0) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-8.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_RaphaelRaven, ANIM_RaphaelRaven_Talk, ANIM_RaphaelRaven_Idle, 0, MSG_CH5_00CE) + Loop(0) + Wait(1) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, RAVEN_SCENE_LOWERED_BASKET) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtNpc, NPC_Raven_05, SOUND_RAVEN_LEAP_A, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Raven_05, 150, 0, 20, 15 * DT) + Call(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Walk) + Thread + Call(NpcMoveTo, NPC_Raven_05, 65, 25, 30 * DT) + Call(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Idle) + Call(InterpNpcYaw, NPC_Raven_05, 90, 0) + EndThread + Call(PlaySoundAtNpc, NPC_Raven_04, SOUND_RAVEN_LEAP_B, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Raven_04, 150, 0, 20, 15 * DT) + Call(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Walk) + Thread + Call(NpcMoveTo, NPC_Raven_04, 80, -10, 25 * DT) + Call(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Idle) + Call(InterpNpcYaw, NPC_Raven_04, 90, 0) + EndThread + Call(PlaySoundAtNpc, NPC_Raven_03, SOUND_RAVEN_LEAP_A, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Raven_03, 150, 0, 20, 15 * DT) + Call(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Walk) + Thread + Call(NpcMoveTo, NPC_Raven_03, 95, 25, 20 * DT) + Call(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Idle) + Call(InterpNpcYaw, NPC_Raven_03, 90, 0) + EndThread + Call(PlaySoundAtNpc, NPC_Raven_02, SOUND_RAVEN_LEAP_B, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Raven_02, 150, 0, 20, 15 * DT) + Call(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Walk) + Call(NpcMoveTo, NPC_Raven_02, 110, -10, 15 * DT) + Call(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Idle) + Call(InterpNpcYaw, NPC_Raven_02, 90, 0) + Call(SetNpcVar, NPC_Kolorado_02, 0, 20) + Call(SetSelfVar, 0, RAVEN_SCENE_HEADNG_OUT) + CaseEq(RAVEN_SCENE_HEADNG_OUT) + Call(GetNpcVar, NPC_Kolorado_02, 0, LVar0) + IfEq(LVar0, -1) + Call(SpeakToPlayer, NPC_RaphaelRaven, ANIM_RaphaelRaven_Talk, ANIM_RaphaelRaven_Idle, 0, MSG_CH5_00D0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-7.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(10.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) EVT_GIVE_KEY_REWARD(ITEM_ULTRA_STONE) - EVT_WAIT(20 * DT) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 400) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(20.0), EVT_FLOAT(-11.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.5 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_RaphaelRaven, ANIM_RaphaelRaven_Talk, ANIM_RaphaelRaven_Idle, 0, MSG_CH5_00D1) - EVT_SET(LVar0, NPC_Raven_02) - EVT_EXEC(N(EVS_Raven_HopAndWalkAway)) - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_SET(LVar0, NPC_Raven_03) - EVT_EXEC(N(EVS_Raven_HopAndWalkAway)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(20 * DT) - EVT_SET(LVar0, NPC_Raven_04) - EVT_EXEC(N(EVS_Raven_HopAndWalkAway)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(30 * DT) - EVT_SET(LVar0, NPC_Raven_05) - EVT_EXEC(N(EVS_Raven_HopAndWalkAway)) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_RaphaelRaven, ANIM_RaphaelRaven_Walk) - EVT_CALL(SetNpcSpeed, NPC_RaphaelRaven, EVT_FLOAT(3.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_RaphaelRaven, -120, 0, 0) - EVT_CALL(SetNpcPos, NPC_RaphaelRaven, NPC_DISPOSE_LOCATION) - EVT_WAIT(40 * DT) - EVT_CALL(BindNpcInteract, NPC_Raven_01, EVT_PTR(N(EVS_NpcInteract_Raven))) - EVT_CALL(SetNpcFlagBits, NPC_Raven_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(N(EnableCameraLeadingPlayer)) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(1.5 / DT)) - EVT_SET(GB_StoryProgress, STORY_CH5_ZIP_LINE_READY) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(2) - EVT_RETURN - EVT_END + Wait(20 * DT) + Call(SetCamDistance, CAM_DEFAULT, 400) + Call(SetCamPitch, CAM_DEFAULT, Float(20.0), Float(-11.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.5 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_RaphaelRaven, ANIM_RaphaelRaven_Talk, ANIM_RaphaelRaven_Idle, 0, MSG_CH5_00D1) + Set(LVar0, NPC_Raven_02) + Exec(N(EVS_Raven_HopAndWalkAway)) + Thread + Wait(10 * DT) + Set(LVar0, NPC_Raven_03) + Exec(N(EVS_Raven_HopAndWalkAway)) + EndThread + Thread + Wait(20 * DT) + Set(LVar0, NPC_Raven_04) + Exec(N(EVS_Raven_HopAndWalkAway)) + EndThread + Thread + Wait(30 * DT) + Set(LVar0, NPC_Raven_05) + Exec(N(EVS_Raven_HopAndWalkAway)) + EndThread + Call(SetNpcAnimation, NPC_RaphaelRaven, ANIM_RaphaelRaven_Walk) + Call(SetNpcSpeed, NPC_RaphaelRaven, Float(3.0 / DT)) + Call(NpcMoveTo, NPC_RaphaelRaven, -120, 0, 0) + Call(SetNpcPos, NPC_RaphaelRaven, NPC_DISPOSE_LOCATION) + Wait(40 * DT) + Call(BindNpcInteract, NPC_Raven_01, Ref(N(EVS_NpcInteract_Raven))) + Call(SetNpcFlagBits, NPC_Raven_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(N(EnableCameraLeadingPlayer)) + Call(ResetCam, CAM_DEFAULT, Float(1.5 / DT)) + Set(GB_StoryProgress, STORY_CH5_ZIP_LINE_READY) + Call(DisablePlayerInput, FALSE) + Return + EndIf + EndSwitch + Wait(1) + Goto(2) + Return + End }; EvtScript N(EVS_NpcInit_Raven) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_CH5_RAPHAEL_MOVED_ROOT) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_ManageRavens))) - EVT_CASE_EQ(STORY_CH5_RAPHAEL_WAITING_FOR_MARIO) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_ManageRavens))) - EVT_EXEC(N(EVS_GatherRavensNearRaphael)) - EVT_CASE_RANGE(STORY_CH5_ZIP_LINE_READY, STORY_CH5_OPENED_ESCAPE_ROUTE) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Raven))) - EVT_CALL(SetNpcPos, NPC_Raven_01, 260, 205, -25) - EVT_CALL(SetNpcFlagBits, NPC_Raven_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_GOTO(30) - EVT_CASE_DEFAULT - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o346, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(RemoveNpc, NPC_Raven_01) - EVT_LABEL(30) - EVT_CALL(RemoveNpc, NPC_Raven_02) - EVT_CALL(RemoveNpc, NPC_Raven_03) - EVT_CALL(RemoveNpc, NPC_Raven_04) - EVT_CALL(RemoveNpc, NPC_Raven_05) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseEq(STORY_CH5_RAPHAEL_MOVED_ROOT) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_ManageRavens))) + CaseEq(STORY_CH5_RAPHAEL_WAITING_FOR_MARIO) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_ManageRavens))) + Exec(N(EVS_GatherRavensNearRaphael)) + CaseRange(STORY_CH5_ZIP_LINE_READY, STORY_CH5_OPENED_ESCAPE_ROUTE) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Raven))) + Call(SetNpcPos, NPC_Raven_01, 260, 205, -25) + Call(SetNpcFlagBits, NPC_Raven_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Goto(30) + CaseDefault + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o346, COLLIDER_FLAGS_UPPER_MASK) + Call(RemoveNpc, NPC_Raven_01) + Label(30) + Call(RemoveNpc, NPC_Raven_02) + Call(RemoveNpc, NPC_Raven_03) + Call(RemoveNpc, NPC_Raven_04) + Call(RemoveNpc, NPC_Raven_05) + EndSwitch + Return + End }; Vec3f N(RaphaelWalkPath)[] = { @@ -601,619 +601,619 @@ Vec3f N(RaphaelWalkPath)[] = { }; EvtScript N(EVS_Scene_RaphaelComingThrough) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcPos, NPC_RaphaelRaven, -200, 0, -170) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(SetPlayerPos, -190, 0, -200) - EVT_CALL(SetNpcPos, NPC_PARTNER, -190, 0, -210) - EVT_EXEC_WAIT(N(EVS_MoveBushes)) - EVT_CALL(SetNpcAnimation, NPC_RaphaelRaven, ANIM_RaphaelRaven_Walk) - EVT_CALL(SetNpcSpeed, NPC_RaphaelRaven, EVT_FLOAT(4.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_RaphaelRaven, -180, -30, 0) - EVT_THREAD - EVT_CALL(NpcMoveTo, NPC_RaphaelRaven, 125, -40, 0) - EVT_CALL(SetNpcAnimation, NPC_RaphaelRaven, ANIM_RaphaelRaven_Idle) - EVT_CALL(SetNpcFlagBits, NPC_RaphaelRaven, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(InterpNpcYaw, NPC_RaphaelRaven, 270, 0) - EVT_END_THREAD - EVT_WAIT(15 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Run) - EVT_CALL(LoadPath, 45 * DT, EVT_PTR(N(RaphaelWalkPath)), ARRAY_COUNT(N(RaphaelWalkPath)), EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetPlayerPos, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_THREAD - EVT_CALL(SetNpcPos, NPC_Raven_01, -200, 0, -190) - EVT_CALL(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Walk) - EVT_CALL(SetNpcSpeed, NPC_Raven_01, EVT_FLOAT(6.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Raven_01, -150, -10, 0) - EVT_CALL(NpcMoveTo, NPC_Raven_01, 177, -10, 0) - EVT_CALL(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(15 * DT) - EVT_CALL(SetNpcPos, NPC_Raven_02, -200, 0, -230) - EVT_CALL(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Walk) - EVT_CALL(SetNpcSpeed, NPC_Raven_02, EVT_FLOAT(6.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Raven_02, -150, -10, 0) - EVT_CALL(NpcMoveTo, NPC_Raven_02, 152, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcPos, NPC_Raven_03, -200, 0, -230) - EVT_CALL(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Walk) - EVT_CALL(SetNpcSpeed, NPC_Raven_03, EVT_FLOAT(6.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Raven_03, -150, -10, 0) - EVT_CALL(NpcMoveTo, NPC_Raven_03, 127, 5, 0) - EVT_CALL(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(45 * DT) - EVT_CALL(SetNpcPos, NPC_Raven_04, -200, 0, -230) - EVT_CALL(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Walk) - EVT_CALL(SetNpcSpeed, NPC_Raven_04, EVT_FLOAT(6.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Raven_04, -150, -10, 0) - EVT_CALL(NpcMoveTo, NPC_Raven_04, 102, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Idle) - EVT_END_THREAD - EVT_WAIT(60 * DT) - EVT_CALL(SetNpcPos, NPC_Raven_05, -200, 0, -230) - EVT_CALL(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Walk) - EVT_CALL(SetNpcSpeed, NPC_Raven_05, EVT_FLOAT(6.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Raven_05, -150, -10, 0) - EVT_CALL(NpcMoveTo, NPC_Raven_05, 77, -10, 0) - EVT_CALL(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Idle) - EVT_SET(GB_StoryProgress, STORY_CH5_RAPHAEL_WAITING_FOR_MARIO) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(SetNpcPos, NPC_RaphaelRaven, -200, 0, -170) + Call(InterpPlayerYaw, 90, 0) + Call(SetPlayerPos, -190, 0, -200) + Call(SetNpcPos, NPC_PARTNER, -190, 0, -210) + ExecWait(N(EVS_MoveBushes)) + Call(SetNpcAnimation, NPC_RaphaelRaven, ANIM_RaphaelRaven_Walk) + Call(SetNpcSpeed, NPC_RaphaelRaven, Float(4.0 / DT)) + Call(NpcMoveTo, NPC_RaphaelRaven, -180, -30, 0) + Thread + Call(NpcMoveTo, NPC_RaphaelRaven, 125, -40, 0) + Call(SetNpcAnimation, NPC_RaphaelRaven, ANIM_RaphaelRaven_Idle) + Call(SetNpcFlagBits, NPC_RaphaelRaven, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(InterpNpcYaw, NPC_RaphaelRaven, 270, 0) + EndThread + Wait(15 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Run) + Call(LoadPath, 45 * DT, Ref(N(RaphaelWalkPath)), ARRAY_COUNT(N(RaphaelWalkPath)), EASING_LINEAR) + Label(0) + Call(GetNextPathPos) + Call(SetPlayerPos, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(0) + EndIf + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Thread + Call(SetNpcPos, NPC_Raven_01, -200, 0, -190) + Call(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Walk) + Call(SetNpcSpeed, NPC_Raven_01, Float(6.0 / DT)) + Call(NpcMoveTo, NPC_Raven_01, -150, -10, 0) + Call(NpcMoveTo, NPC_Raven_01, 177, -10, 0) + Call(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Idle) + EndThread + Thread + Wait(15 * DT) + Call(SetNpcPos, NPC_Raven_02, -200, 0, -230) + Call(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Walk) + Call(SetNpcSpeed, NPC_Raven_02, Float(6.0 / DT)) + Call(NpcMoveTo, NPC_Raven_02, -150, -10, 0) + Call(NpcMoveTo, NPC_Raven_02, 152, 0, 0) + Call(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Idle) + EndThread + Thread + Wait(30 * DT) + Call(SetNpcPos, NPC_Raven_03, -200, 0, -230) + Call(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Walk) + Call(SetNpcSpeed, NPC_Raven_03, Float(6.0 / DT)) + Call(NpcMoveTo, NPC_Raven_03, -150, -10, 0) + Call(NpcMoveTo, NPC_Raven_03, 127, 5, 0) + Call(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Idle) + EndThread + Thread + Wait(45 * DT) + Call(SetNpcPos, NPC_Raven_04, -200, 0, -230) + Call(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Walk) + Call(SetNpcSpeed, NPC_Raven_04, Float(6.0 / DT)) + Call(NpcMoveTo, NPC_Raven_04, -150, -10, 0) + Call(NpcMoveTo, NPC_Raven_04, 102, 0, 0) + Call(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Idle) + EndThread + Wait(60 * DT) + Call(SetNpcPos, NPC_Raven_05, -200, 0, -230) + Call(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Walk) + Call(SetNpcSpeed, NPC_Raven_05, Float(6.0 / DT)) + Call(NpcMoveTo, NPC_Raven_05, -150, -10, 0) + Call(NpcMoveTo, NPC_Raven_05, 77, -10, 0) + Call(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Idle) + Set(GB_StoryProgress, STORY_CH5_RAPHAEL_WAITING_FOR_MARIO) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(D_8024511C_B8929C) = { - EVT_CHILD_THREAD - EVT_LOOP(0) - EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 150) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Run) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(4.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, 60, 0) - EVT_CALL(SetSelfVar, 0, 3) - EVT_RETURN - EVT_END + ChildThread + Loop(0) + Call(PlayerFaceNpc, NPC_SELF, FALSE) + Wait(1) + EndLoop + EndChildThread + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 150) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Run) + Call(SetNpcSpeed, NPC_SELF, Float(4.0)) + Call(NpcMoveTo, NPC_SELF, LVar0, 60, 0) + Call(SetSelfVar, 0, 3) + Return + End }; EvtScript N(EVS_NpcIdle_Kolorado_HeldCaptive) = { - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, -440) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH5_00BC, 320, 60) - EVT_CALL(PlaySoundAtPlayer, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, 0, EMOTE_EXCLAMATION, 0, 25, EMOTER_PLAYER, 0, 0, 0, 0) - EVT_CALL(PlaySoundAtNpc, NPC_PARTNER, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_PARTNER, EMOTE_EXCLAMATION, 0, 25, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(25 * DT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_LABEL(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, 150) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(InterruptUsePartner) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(func_802D2C14, 1) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(RemoveNpc, NPC_SpearGuy) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH5_00C0, 0, 60) - EVT_CALL(InterpPlayerYaw, 270, 4) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(5.0 / DT)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar0) - EVT_ADD(LVar3, -50) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar3, LVar2, 0) - EVT_ADD(LVar0, LVar3) - EVT_DIV(LVar0, 2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(N(DisableCameraLeadingPlayer)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_00C1) - EVT_CALL(SetSelfVar, 0, 2) - EVT_CALL(func_802D2C14, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_CASE_EQ(1) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(func_802D2C14, 1) - EVT_WAIT(10 * DT) - EVT_IF_EQ(GF_JAN01_SavedKolorado, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Idle, 0, MSG_CH5_00BE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Idle, 0, MSG_CH5_00BF) - EVT_END_IF - EVT_CALL(SetSelfVar, 0, 2) - EVT_CALL(func_802D2C14, 0) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CASE_EQ(2) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 70) - EVT_SET(LVar0, 70) - EVT_ELSE - EVT_SET(LVar0, 300) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Run) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(4.5 / DT)) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, 60, 0) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_SET(GB_StoryProgress, STORY_CH5_KOLORADO_ESCAPED_SPEAR_GUYS) - EVT_END_THREAD - EVT_EXEC_GET_TID(N(D_8024511C_B8929C), LVar9) - EVT_WAIT(35) - EVT_CALL(N(EnableCameraLeadingPlayer)) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5.0)) - EVT_KILL_THREAD(LVar9) - EVT_CALL(SetSelfVar, 0, 3) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CASE_EQ(3) - EVT_END_SWITCH - EVT_IF_LT(GB_StoryProgress, STORY_CH5_KOLORADO_ESCAPED_SPEAR_GUYS) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Loop(0) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar0, -440) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_CH5_00BC, 320, 60) + Call(PlaySoundAtPlayer, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, 0, EMOTE_EXCLAMATION, 0, 25, EMOTER_PLAYER, 0, 0, 0, 0) + Call(PlaySoundAtNpc, NPC_PARTNER, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_PARTNER, EMOTE_EXCLAMATION, 0, 25, EMOTER_NPC, 0, 0, 0, 0) + Wait(25 * DT) + Call(DisablePlayerInput, FALSE) + Label(0) + Call(GetSelfVar, 0, LVar0) + Switch(LVar0) + CaseEq(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar0, 150) + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, PARTNER_NONE) + Call(InterruptUsePartner) + EndIf + Call(DisablePlayerInput, TRUE) + Call(func_802D2C14, 1) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(RemoveNpc, NPC_SpearGuy) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(ShowMessageAtScreenPos, MSG_CH5_00C0, 0, 60) + Call(InterpPlayerYaw, 270, 4) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) + Call(SetNpcSpeed, NPC_SELF, Float(5.0 / DT)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar3, LVar0) + Add(LVar3, -50) + Call(NpcMoveTo, NPC_SELF, LVar3, LVar2, 0) + Add(LVar0, LVar3) + Div(LVar0, 2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-7.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(N(DisableCameraLeadingPlayer)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_00C1) + Call(SetSelfVar, 0, 2) + Call(func_802D2C14, 0) + Call(DisablePlayerInput, FALSE) + EndIf + CaseEq(1) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(func_802D2C14, 1) + Wait(10 * DT) + IfEq(GF_JAN01_SavedKolorado, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Idle, 0, MSG_CH5_00BE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Idle, 0, MSG_CH5_00BF) + EndIf + Call(SetSelfVar, 0, 2) + Call(func_802D2C14, 0) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + SetGroup(EVT_GROUP_0B) + Call(DisablePlayerInput, FALSE) + CaseEq(2) + Call(DisablePlayerInput, TRUE) + Thread + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + IfLt(LVar0, 70) + Set(LVar0, 70) + Else + Set(LVar0, 300) + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Run) + Call(SetNpcSpeed, NPC_SELF, Float(4.5 / DT)) + Call(NpcMoveTo, NPC_SELF, LVar0, 60, 0) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Set(GB_StoryProgress, STORY_CH5_KOLORADO_ESCAPED_SPEAR_GUYS) + EndThread + ExecGetTID(N(D_8024511C_B8929C), LVar9) + Wait(35) + Call(N(EnableCameraLeadingPlayer)) + Call(ResetCam, CAM_DEFAULT, Float(5.0)) + KillThread(LVar9) + Call(SetSelfVar, 0, 3) + Call(DisablePlayerInput, FALSE) + CaseEq(3) + EndSwitch + IfLt(GB_StoryProgress, STORY_CH5_KOLORADO_ESCAPED_SPEAR_GUYS) + Wait(1) + Goto(0) + EndIf + Return + End }; EvtScript N(EVS_NpcIdle_Kolorado_Before) = { - EVT_LABEL(0) - EVT_IF_NE(GB_StoryProgress, STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_LABEL(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, 85) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH5_00C5, 0, 60) - EVT_CALL(PlaySoundAtPlayer, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, 0, EMOTE_EXCLAMATION, 0, 20, EMOTER_PLAYER, 0, 0, 0, 0) - EVT_CALL(PlaySoundAtNpc, NPC_PARTNER, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_PARTNER, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(20 * DT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_LABEL(2) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, -250) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_00C6) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Run) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, -470, 0, 0) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Label(0) + IfNe(GB_StoryProgress, STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + Wait(1) + Goto(0) + EndIf + Label(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar0, 85) + Wait(1) + Goto(1) + EndIf + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_CH5_00C5, 0, 60) + Call(PlaySoundAtPlayer, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, 0, EMOTE_EXCLAMATION, 0, 20, EMOTER_PLAYER, 0, 0, 0, 0) + Call(PlaySoundAtNpc, NPC_PARTNER, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_PARTNER, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) + Wait(20 * DT) + Call(DisablePlayerInput, FALSE) + Label(2) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar0, -250) + Wait(1) + Goto(2) + EndIf + Call(DisablePlayerInput, TRUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_00C6) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Run) + Call(SetNpcSpeed, NPC_SELF, Float(5.0)) + Call(NpcMoveTo, NPC_SELF, -470, 0, 0) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcIdle_Kolorado_After) = { - EVT_LABEL(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(10) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, -100, 0, 60) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 60) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(3.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, 60, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) - EVT_CALL(SpeakToPlayer, NPC_Kolorado_02, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_00CB) - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CASE_EQ(20) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_00CF) - EVT_THREAD - EVT_LABEL(20) - EVT_CALL(PlayerFaceNpc, NPC_Kolorado_02, FALSE) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 20) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(3.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_SELF, 190, 60, 0) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.5)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 200, 0, 0, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) - EVT_CALL(SetSelfVar, 0, 21) - EVT_CALL(PlaySoundAtModel, MODEL_o123, SOUND_JAN_BASKET_ELEVATOR, 0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_CALL(MakeLerp, 0, 170, 60, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(LVar6, LVar4) - EVT_ADD(LVar6, LVar0) - EVT_CALL(SetNpcPos, NPC_SELF, LVar3, LVar6, LVar5) - EVT_SETF(LVar2, EVT_FLOAT(200.0)) - EVT_SUBF(LVar2, LVar0) - EVT_DIVF(LVar2, EVT_FLOAT(200.0)) - EVT_CALL(ScaleModel, MODEL_o147, 1, LVar2, 1) - EVT_CALL(TranslateModel, MODEL_o146, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o124, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_WAIT(40 * DT) - EVT_CALL(PlaySoundAtModel, MODEL_o123, SOUND_JAN_BASKET_ELEVATOR, 0) - EVT_CALL(MakeLerp, 170, 0, 60, EASING_CUBIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, EVT_FLOAT(200.0)) - EVT_SUBF(LVar2, LVar0) - EVT_DIVF(LVar2, EVT_FLOAT(200.0)) - EVT_CALL(ScaleModel, MODEL_o147, 1, LVar2, 1) - EVT_CALL(TranslateModel, MODEL_o146, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o124, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetSelfVar, 0, -1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_SWITCH - EVT_IF_NE(LVar0, -1) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Label(0) + Call(GetSelfVar, 0, LVar0) + Switch(LVar0) + CaseEq(10) + Call(DisablePlayerInput, TRUE) + Call(SetNpcPos, NPC_SELF, -100, 0, 60) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar0, 60) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) + Call(SetNpcSpeed, NPC_SELF, Float(3.0 / DT)) + Call(NpcMoveTo, NPC_SELF, LVar0, 60, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) + Call(SpeakToPlayer, NPC_Kolorado_02, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_00CB) + Call(SetSelfVar, 0, 0) + Call(DisablePlayerInput, FALSE) + CaseEq(20) + Call(DisablePlayerInput, TRUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_00CF) + Thread + Label(20) + Call(PlayerFaceNpc, NPC_Kolorado_02, FALSE) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 20) + Wait(1) + Goto(20) + EndIf + EndThread + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) + Call(SetNpcSpeed, NPC_SELF, Float(3.0 / DT)) + Call(NpcMoveTo, NPC_SELF, 190, 60, 0) + Call(SetNpcJumpscale, NPC_SELF, Float(0.5)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 200, 0, 0, 20 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) + Call(SetSelfVar, 0, 21) + Call(PlaySoundAtModel, MODEL_o123, SOUND_JAN_BASKET_ELEVATOR, 0) + Call(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + Call(MakeLerp, 0, 170, 60, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Set(LVar6, LVar4) + Add(LVar6, LVar0) + Call(SetNpcPos, NPC_SELF, LVar3, LVar6, LVar5) + SetF(LVar2, Float(200.0)) + SubF(LVar2, LVar0) + DivF(LVar2, Float(200.0)) + Call(ScaleModel, MODEL_o147, 1, LVar2, 1) + Call(TranslateModel, MODEL_o146, 0, LVar0, 0) + Call(TranslateModel, MODEL_o124, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Wait(40 * DT) + Call(PlaySoundAtModel, MODEL_o123, SOUND_JAN_BASKET_ELEVATOR, 0) + Call(MakeLerp, 170, 0, 60, EASING_CUBIC_OUT) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, Float(200.0)) + SubF(LVar2, LVar0) + DivF(LVar2, Float(200.0)) + Call(ScaleModel, MODEL_o147, 1, LVar2, 1) + Call(TranslateModel, MODEL_o146, 0, LVar0, 0) + Call(TranslateModel, MODEL_o124, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetSelfVar, 0, -1) + Call(DisablePlayerInput, FALSE) + EndSwitch + IfNe(LVar0, -1) + Wait(1) + Goto(0) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Kolorado_Before) = { - EVT_CALL(GetAngleToPlayer, NPC_SELF, LVar0) - EVT_IF_LT(LVar0, 180) - EVT_SET(LVar1, 27) - EVT_ELSE - EVT_SET(LVar1, -27) - EVT_END_IF - EVT_CALL(GetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) - EVT_CALL(GetPlayerPos, LVarA, LVarB, LVarC) - EVT_SUB(LVarA, LVar2) - EVT_IF_LT(LVarA, 0) - EVT_MUL(LVarA, -1) - EVT_END_IF - EVT_IF_LT(LVarA, 20) - EVT_ADD(LVar2, LVar1) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, LVar2, LVar4, 0) - EVT_CALL(PlayerFaceNpc, NPC_Kolorado_02, 3) - EVT_END_IF - EVT_WAIT(15 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_00C2) - EVT_CALL(InterpPlayerYaw, 90, 3) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 3) - EVT_CALL(SetMusicTrack, 0, SONG_MT_LAVALAVA, 1, 8) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 200, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(16.0), EVT_FLOAT(-11.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(40 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 5, MSG_CH5_00C3) - EVT_WAIT(10 * DT) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(90.0), 0, 300, 15, EVT_FLOAT(-6.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_00C4) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5.0 / DT)) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Run) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(5.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_SELF, 500, 0, 0) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, -300, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 4) - EVT_SET(GB_StoryProgress, STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Call(GetAngleToPlayer, NPC_SELF, LVar0) + IfLt(LVar0, 180) + Set(LVar1, 27) + Else + Set(LVar1, -27) + EndIf + Call(GetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) + Call(GetPlayerPos, LVarA, LVarB, LVarC) + Sub(LVarA, LVar2) + IfLt(LVarA, 0) + Mul(LVarA, -1) + EndIf + IfLt(LVarA, 20) + Add(LVar2, LVar1) + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, LVar2, LVar4, 0) + Call(PlayerFaceNpc, NPC_Kolorado_02, 3) + EndIf + Wait(15 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_00C2) + Call(InterpPlayerYaw, 90, 3) + Call(InterpNpcYaw, NPC_SELF, 90, 3) + Call(SetMusicTrack, 0, SONG_MT_LAVALAVA, 1, 8) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 200, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamPitch, CAM_DEFAULT, Float(16.0), Float(-11.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(40 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 5, MSG_CH5_00C3) + Wait(10 * DT) + Call(AdjustCam, CAM_DEFAULT, Float(90.0), 0, 300, 15, Float(-6.0)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_00C4) + Call(ResetCam, CAM_DEFAULT, Float(5.0 / DT)) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Run) + Call(SetNpcSpeed, NPC_SELF, Float(5.0 / DT)) + Call(NpcMoveTo, NPC_SELF, 500, 0, 0) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcPos, NPC_SELF, -300, 0, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) + Call(InterpNpcYaw, NPC_SELF, 90, 4) + Set(GB_StoryProgress, STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + ExecWait(N(EVS_SetupMusic)) + Return + End }; EvtScript N(EVS_NpcHit_Kolorado_HeldCaptive) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(LVar1, 1) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_SET(LVar1, 1) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_PARTNER) - EVT_SET(LVar1, 1) - EVT_CASE_DEFAULT - EVT_SET(LVar1, 0) - EVT_END_SWITCH - EVT_IF_NE(LVar1, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(5 * DT) - EVT_SET(AF_JAN_0A, TRUE) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_SpearGuy, ANIM_SpearGuy_Anim0D) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Yell, 0, MSG_CH5_00BD) - EVT_SET(AF_JAN_0A, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SpearGuy, ANIM_SpearGuy_Anim10) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(LVar1, 1) + CaseEq(ENCOUNTER_TRIGGER_JUMP) + Set(LVar1, 1) + CaseEq(ENCOUNTER_TRIGGER_PARTNER) + Set(LVar1, 1) + CaseDefault + Set(LVar1, 0) + EndSwitch + IfNe(LVar1, 0) + Call(DisablePlayerInput, TRUE) + Wait(5 * DT) + Set(AF_JAN_0A, TRUE) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_SpearGuy, ANIM_SpearGuy_Anim0D) + Call(NpcFacePlayer, NPC_SELF, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Yell, 0, MSG_CH5_00BD) + Set(AF_JAN_0A, FALSE) + Call(SetNpcAnimation, NPC_SpearGuy, ANIM_SpearGuy_Anim10) + Call(DisablePlayerInput, FALSE) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Kolorado_HeldCaptive) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_KOLORADO_ESCAPED_SPEAR_GUYS) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Fallen) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Kolorado_HeldCaptive))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_Kolorado_HeldCaptive))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + IfLt(GB_StoryProgress, STORY_CH5_KOLORADO_ESCAPED_SPEAR_GUYS) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Fallen) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Kolorado_HeldCaptive))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_Kolorado_HeldCaptive))) + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Kolorado_WaitingToExplore) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_CALL(SetNpcPos, NPC_SELF, 750, 0, 30) - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Kolorado_Before))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Kolorado_Before))) - EVT_CASE_RANGE(STORY_CH5_RAPHAEL_MOVED_ROOT, STORY_CH5_RAPHAEL_WAITING_FOR_MARIO) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Kolorado_After))) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CASE_DEFAULT - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + Call(SetNpcPos, NPC_SELF, 750, 0, 30) + Call(SetSelfVar, 0, 0) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Kolorado_Before))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Kolorado_Before))) + CaseRange(STORY_CH5_RAPHAEL_MOVED_ROOT, STORY_CH5_RAPHAEL_WAITING_FOR_MARIO) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Kolorado_After))) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + CaseDefault + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndSwitch + Return + End }; EvtScript N(EVS_SyncZiplineDummyNPC1) = { - EVT_LOOP(0) - EVT_CALL(GetModelCenter, MODEL_o112) - EVT_CALL(SetNpcPos, NPC_ZiplineDummy1, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetModelCenter, MODEL_o112) + Call(SetNpcPos, NPC_ZiplineDummy1, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_SyncZiplineDummyNPC2) = { - EVT_LOOP(0) - EVT_CALL(GetModelCenter, MODEL_o131) - EVT_CALL(SetNpcPos, NPC_ZiplineDummy2, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetModelCenter, MODEL_o131) + Call(SetNpcPos, NPC_ZiplineDummy2, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcInit_ZiplineDummy) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(0.3), 1, EVT_FLOAT(0.3)) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) + Call(SetNpcScale, NPC_SELF, Float(0.3), 1, Float(0.3)) + Return + End }; EvtScript N(EVS_NpcIdle_SpearGuy) = { - EVT_CHILD_THREAD - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar1, LVar2) - EVT_SET(LVar4, LVar3) - EVT_ADD(LVar3, -200) - EVT_ADD(LVar4, 200) - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar0) - EVT_CASE_RANGE(LVar3, LVar4) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH, 0) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_PARTNER, 0) - EVT_CASE_DEFAULT - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH, 1) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_PARTNER, 1) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_SET(AF_JAN_0A, FALSE) - EVT_SET(LVar9, 0) - EVT_SET(LVar8, 2) - EVT_LOOP(0) - EVT_IF_EQ(LVar9, 0) - EVT_THREAD - EVT_WAIT(40) - EVT_CALL(ShowSweat, NPC_Kolorado_01, 1, -45, EMOTER_NPC, 0, 0, 0, 0, 20) - EVT_END_THREAD - EVT_CALL(ShowSweat, NPC_Kolorado_01, 1, 45, EMOTER_NPC, 0, 0, 0, 0, 20) - EVT_SET(LVar9, 3) - EVT_ELSE - EVT_SUB(LVar9, 1) - EVT_END_IF - EVT_CALL(InterpNpcYaw, NPC_Kolorado_01, 270, 2) - EVT_WAIT(2) - EVT_LABEL(1) - EVT_IF_EQ(AF_JAN_0A, FALSE) - EVT_CALL(InterpNpcYaw, NPC_Kolorado_01, 90, 2) - EVT_IF_EQ(LVar8, 0) - EVT_CALL(PlaySoundAtNpc, NPC_Kolorado_01, SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_DEFAULT) - EVT_SET(LVar8, 2) - EVT_END_IF - EVT_SUB(LVar8, 1) - EVT_ELSE - EVT_SET(LVar8, 2) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + ChildThread + Call(GetNpcPos, NPC_SELF, LVar3, LVar1, LVar2) + Set(LVar4, LVar3) + Add(LVar3, -200) + Add(LVar4, 200) + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Switch(LVar0) + CaseRange(LVar3, LVar4) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH, 0) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_PARTNER, 0) + CaseDefault + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH, 1) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_PARTNER, 1) + EndSwitch + Wait(1) + EndLoop + EndChildThread + Set(AF_JAN_0A, FALSE) + Set(LVar9, 0) + Set(LVar8, 2) + Loop(0) + IfEq(LVar9, 0) + Thread + Wait(40) + Call(ShowSweat, NPC_Kolorado_01, 1, -45, EMOTER_NPC, 0, 0, 0, 0, 20) + EndThread + Call(ShowSweat, NPC_Kolorado_01, 1, 45, EMOTER_NPC, 0, 0, 0, 0, 20) + Set(LVar9, 3) + Else + Sub(LVar9, 1) + EndIf + Call(InterpNpcYaw, NPC_Kolorado_01, 270, 2) + Wait(2) + Label(1) + IfEq(AF_JAN_0A, FALSE) + Call(InterpNpcYaw, NPC_Kolorado_01, 90, 2) + IfEq(LVar8, 0) + Call(PlaySoundAtNpc, NPC_Kolorado_01, SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_DEFAULT) + Set(LVar8, 2) + EndIf + Sub(LVar8, 1) + Else + Set(LVar8, 2) + Wait(1) + Goto(1) + EndIf + EndLoop + Return + End }; EvtScript N(EVS_NpcDefeat_SpearGuy) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcYaw, NPC_Kolorado_01, 90) - EVT_CALL(SetNpcAnimation, NPC_Kolorado_01, ANIM_Kolorado_Idle) - EVT_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(GetNpcPos, NPC_Kolorado_01, LVar3, LVar1, LVar2) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar4, LVar0) - EVT_IF_LT(LVar3, LVar0) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_ADD(LVar4, -30) - EVT_ELSE - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_ADD(LVar4, 30) - EVT_END_IF - EVT_ADD(LVar0, LVar4) - EVT_DIV(LVar0, 2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(N(DisableCameraLeadingPlayer)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetNpcFlagBits, NPC_Kolorado_01, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Kolorado_01, ANIM_Kolorado_Run) - EVT_CALL(SetNpcSpeed, NPC_Kolorado_01, EVT_FLOAT(2.5 / DT)) - EVT_CALL(NpcMoveTo, NPC_Kolorado_01, LVar4, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_Kolorado_01, ANIM_Kolorado_Idle) - EVT_CALL(NpcFacePlayer, NPC_Kolorado_01, 0) - EVT_CALL(SetNpcVar, NPC_Kolorado_01, 0, 1) - EVT_END_THREAD - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(DisablePlayerInput, TRUE) + Call(SetNpcYaw, NPC_Kolorado_01, 90) + Call(SetNpcAnimation, NPC_Kolorado_01, ANIM_Kolorado_Idle) + Thread + Wait(30 * DT) + Call(GetNpcPos, NPC_Kolorado_01, LVar3, LVar1, LVar2) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar4, LVar0) + IfLt(LVar3, LVar0) + Call(InterpPlayerYaw, 270, 0) + Add(LVar4, -30) + Else + Call(InterpPlayerYaw, 90, 0) + Add(LVar4, 30) + EndIf + Add(LVar0, LVar4) + Div(LVar0, 2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-7.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(N(DisableCameraLeadingPlayer)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetNpcFlagBits, NPC_Kolorado_01, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_Kolorado_01, ANIM_Kolorado_Run) + Call(SetNpcSpeed, NPC_Kolorado_01, Float(2.5 / DT)) + Call(NpcMoveTo, NPC_Kolorado_01, LVar4, LVar2, 0) + Call(SetNpcAnimation, NPC_Kolorado_01, ANIM_Kolorado_Idle) + Call(NpcFacePlayer, NPC_Kolorado_01, 0) + Call(SetNpcVar, NPC_Kolorado_01, 0, 1) + EndThread + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_SpearGuy) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH5_KOLORADO_ESCAPED_SPEAR_GUYS) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_SpearGuy_Anim10) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_SpearGuy))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_SpearGuy))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH5_KOLORADO_ESCAPED_SPEAR_GUYS) + Call(SetNpcAnimation, NPC_SELF, ANIM_SpearGuy_Anim10) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_SpearGuy))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_SpearGuy))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_Misstar_Bobbing) = { - EVT_LOOP(0) - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Loop(10) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 1) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Loop(10) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 1) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_Misstar_CarryingParty) = { - EVT_SET(AF_JAN22_MisstarReleasedParty, FALSE) - EVT_SET(AF_JAN22_MisstarReleasedKolorado, FALSE) - EVT_LABEL(0) - EVT_CALL(GetNpcPos, NPC_Misstar, LVar4, LVar2, LVar3) - EVT_ADD(LVar4, 10) - EVT_SUB(LVar3, 5) - EVT_CALL(SetNpcPos, NPC_Kolorado_02, LVar4, LVar2, LVar3) - EVT_IF_EQ(AF_JAN22_MisstarReleasedParty, FALSE) - EVT_SUB(LVar4, 20) - EVT_ADD(LVar3, 10) - EVT_CALL(SetPlayerPos, LVar4, LVar2, LVar3) - EVT_ADD(LVar2, 20) - EVT_ADD(LVar3, -5) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar4, LVar2, LVar3) - EVT_END_IF - EVT_IF_EQ(AF_JAN22_MisstarReleasedKolorado, FALSE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Set(AF_JAN22_MisstarReleasedParty, FALSE) + Set(AF_JAN22_MisstarReleasedKolorado, FALSE) + Label(0) + Call(GetNpcPos, NPC_Misstar, LVar4, LVar2, LVar3) + Add(LVar4, 10) + Sub(LVar3, 5) + Call(SetNpcPos, NPC_Kolorado_02, LVar4, LVar2, LVar3) + IfEq(AF_JAN22_MisstarReleasedParty, FALSE) + Sub(LVar4, 20) + Add(LVar3, 10) + Call(SetPlayerPos, LVar4, LVar2, LVar3) + Add(LVar2, 20) + Add(LVar3, -5) + Call(SetNpcPos, NPC_PARTNER, LVar4, LVar2, LVar3) + EndIf + IfEq(AF_JAN22_MisstarReleasedKolorado, FALSE) + Wait(1) + Goto(0) + EndIf + Return + End }; EvtScript N(EVS_PartnerFaceMisstar) = { - EVT_LABEL(0) - EVT_CALL(PlayerFaceNpc, NPC_Misstar, TRUE) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Misstar, 1) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(PlayerFaceNpc, NPC_Misstar, TRUE) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Misstar, 1) + Wait(1) + Goto(0) + Return + End }; Vec3f N(MisstarDescentPath)[] = { @@ -1224,201 +1224,201 @@ Vec3f N(MisstarDescentPath)[] = { }; EvtScript N(EVS_Scene_Misstar) = { - EVT_CALL(WaitForPlayerInputEnabled) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_EXEC(N(EVS_Misstar_CarryingParty)) - EVT_WAIT(30 * DT) - EVT_CALL(LoadPath, 45 * DT, EVT_PTR(N(MisstarDescentPath)), ARRAY_COUNT(N(MisstarDescentPath)), EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.4)) - EVT_SET(AF_JAN22_MisstarReleasedParty, TRUE) - EVT_CALL(NpcJump0, NPC_SELF, 625, 20, 0, 25 * DT) - EVT_THREAD - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(1.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_PARTNER, 700, 0, 0) - EVT_END_THREAD - EVT_SET(AF_JAN22_MisstarReleasedKolorado, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Kolorado_02, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(NpcJump0, NPC_SELF, 675, 40, 0, 20 * DT) - EVT_EXEC_GET_TID(N(EVS_Misstar_Bobbing), LVar9) - EVT_WAIT(20 * DT) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, 0, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 325) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(16.0), EVT_FLOAT(-11.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.5 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SpeakToPlayer, NPC_Kolorado_02, ANIM_Kolorado_TalkSad, ANIM_Kolorado_IdleSad, 0, MSG_CH5_00D4) - EVT_CALL(NpcFaceNpc, NPC_SELF, NPC_Kolorado_02, 1) - EVT_WAIT(10 * DT) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldMisstar_TalkAngry, ANIM_WorldMisstar_IdleAngry, 517, MSG_CH5_00D5) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldMisstar_Idle) - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar3, LVar2) - EVT_IF_EQ(LVar3, LVar1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EndSpeech, NPC_SELF, ANIM_WorldMisstar_Talk, ANIM_WorldMisstar_Idle, 517) - EVT_WAIT(10 * DT) - EVT_CALL(InterpNpcYaw, NPC_Kolorado_02, 270, 1) - EVT_WAIT(15 * DT) - EVT_CALL(SpeakToPlayer, NPC_Kolorado_02, ANIM_Kolorado_TalkSad, ANIM_Kolorado_IdleSad, 5, MSG_CH5_00D6) - EVT_WAIT(10 * DT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, 0, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.5 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(InterpNpcYaw, NPC_Kolorado_02, 90, 10) - EVT_EXEC_GET_TID(N(EVS_PartnerFaceMisstar), LVar8) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.5)) - EVT_CALL(NpcJump0, NPC_SELF, 760, 35, 0, 20 * DT) - EVT_KILL_THREAD(LVar8) - EVT_WAIT(5 * DT) - EVT_CALL(NpcFacePlayer, NPC_SELF, 4) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldMisstar_Talk, ANIM_WorldMisstar_Idle, 512, MSG_CH5_00D7) - EVT_CALL(MakeLerp, 0, 360, 10 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_KILL_THREAD(LVar9) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldMisstar_Leap) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_UsePower) - EVT_CALL(PlaySoundAtPlayer, SOUND_RECEIVE_STAR_POWER, SOUND_SPACE_DEFAULT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar1) - EVT_ADD(LVar1, 50) - EVT_ADD(LVar2, 10) - EVT_ADD(LVar3, 30) - EVT_LOOP(5) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 20) - EVT_WAIT(6 * DT) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 1, LVar0, LVar3, LVar2, 20) - EVT_WAIT(6 * DT) - EVT_END_LOOP - EVT_WAIT(20 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_GET_STAR_POWER_WAVE, SOUND_SPACE_DEFAULT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 30) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldMisstar_Idle) - EVT_EXEC_GET_TID(N(EVS_Misstar_Bobbing), LVar9) - EVT_CALL(N(UpgradeStarPowerCh5)) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0195, 160, 40) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldMisstar_Talk, ANIM_WorldMisstar_Idle, 512, MSG_CH5_00D8) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) - EVT_THREAD - EVT_LOOP(25) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 20) - EVT_WAIT(4 * DT) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 5 * 360) - EVT_CALL(MakeLerp, LVar2, LVar3, 100 * DT, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) - EVT_SET(LVar5, LVar3) - EVT_ADD(LVar5, 180) - EVT_CALL(MakeLerp, LVar3, LVar5, 100 * DT, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, NPC_SELF, LVar2, LVar0, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(15 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_STAR_SPIRIT_DEPART_1, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_WAIT(90 * DT) + Call(WaitForPlayerInputEnabled) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Exec(N(EVS_Misstar_CarryingParty)) + Wait(30 * DT) + Call(LoadPath, 45 * DT, Ref(N(MisstarDescentPath)), ARRAY_COUNT(N(MisstarDescentPath)), EASING_LINEAR) + Label(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(0) + EndIf + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE) + Call(DisablePlayerPhysics, FALSE) + Call(SetNpcJumpscale, NPC_SELF, Float(0.4)) + Set(AF_JAN22_MisstarReleasedParty, TRUE) + Call(NpcJump0, NPC_SELF, 625, 20, 0, 25 * DT) + Thread + Call(SetNpcSpeed, NPC_PARTNER, Float(1.0 / DT)) + Call(NpcMoveTo, NPC_PARTNER, 700, 0, 0) + EndThread + Set(AF_JAN22_MisstarReleasedKolorado, TRUE) + Call(SetNpcFlagBits, NPC_Kolorado_02, NPC_FLAG_GRAVITY, TRUE) + Call(NpcJump0, NPC_SELF, 675, 40, 0, 20 * DT) + ExecGetTID(N(EVS_Misstar_Bobbing), LVar9) + Wait(20 * DT) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, 0, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 325) + Call(SetCamPitch, CAM_DEFAULT, Float(16.0), Float(-11.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.5 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SpeakToPlayer, NPC_Kolorado_02, ANIM_Kolorado_TalkSad, ANIM_Kolorado_IdleSad, 0, MSG_CH5_00D4) + Call(NpcFaceNpc, NPC_SELF, NPC_Kolorado_02, 1) + Wait(10 * DT) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldMisstar_TalkAngry, ANIM_WorldMisstar_IdleAngry, 517, MSG_CH5_00D5) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldMisstar_Idle) + Loop(0) + Call(GetNpcPos, NPC_SELF, LVar0, LVar3, LVar2) + IfEq(LVar3, LVar1) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(EndSpeech, NPC_SELF, ANIM_WorldMisstar_Talk, ANIM_WorldMisstar_Idle, 517) + Wait(10 * DT) + Call(InterpNpcYaw, NPC_Kolorado_02, 270, 1) + Wait(15 * DT) + Call(SpeakToPlayer, NPC_Kolorado_02, ANIM_Kolorado_TalkSad, ANIM_Kolorado_IdleSad, 5, MSG_CH5_00D6) + Wait(10 * DT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(SetPanTarget, CAM_DEFAULT, LVar0, 0, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.5 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(InterpNpcYaw, NPC_Kolorado_02, 90, 10) + ExecGetTID(N(EVS_PartnerFaceMisstar), LVar8) + Call(SetNpcJumpscale, NPC_SELF, Float(0.5)) + Call(NpcJump0, NPC_SELF, 760, 35, 0, 20 * DT) + KillThread(LVar8) + Wait(5 * DT) + Call(NpcFacePlayer, NPC_SELF, 4) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldMisstar_Talk, ANIM_WorldMisstar_Idle, 512, MSG_CH5_00D7) + Call(MakeLerp, 0, 360, 10 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_SELF, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + KillThread(LVar9) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldMisstar_Leap) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_UsePower) + Call(PlaySoundAtPlayer, SOUND_RECEIVE_STAR_POWER, SOUND_SPACE_DEFAULT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar3, LVar1) + Add(LVar1, 50) + Add(LVar2, 10) + Add(LVar3, 30) + Loop(5) + PlayEffect(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 20) + Wait(6 * DT) + PlayEffect(EFFECT_SPARKLES, 1, LVar0, LVar3, LVar2, 20) + Wait(6 * DT) + EndLoop + Wait(20 * DT) + Call(PlaySoundAtPlayer, SOUND_GET_STAR_POWER_WAVE, SOUND_SPACE_DEFAULT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 20) + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 30) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldMisstar_Idle) + ExecGetTID(N(EVS_Misstar_Bobbing), LVar9) + Call(N(UpgradeStarPowerCh5)) + Call(ShowMessageAtScreenPos, MSG_Menus_0195, 160, 40) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldMisstar_Talk, ANIM_WorldMisstar_Idle, 512, MSG_CH5_00D8) + Wait(10 * DT) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) + Thread + Loop(25) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 20) + Wait(4 * DT) + EndLoop + EndThread + Thread + Set(LVar2, 0) + Set(LVar3, 5 * 360) + Call(MakeLerp, LVar2, LVar3, 100 * DT, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_SELF, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(GetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) + Set(LVar5, LVar3) + Add(LVar5, 180) + Call(MakeLerp, LVar3, LVar5, 100 * DT, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetNpcPos, NPC_SELF, LVar2, LVar0, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndThread + Thread + Wait(15 * DT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_STAR_SPIRIT_DEPART_1, SOUND_SPACE_DEFAULT) + EndThread + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Wait(90 * DT) #if VERSION_PAL - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(3 / DT)) + Call(ResetCam, CAM_DEFAULT, Float(3 / DT)) #else - EVT_CALL(ResetCam, CAM_DEFAULT, 3) + Call(ResetCam, CAM_DEFAULT, 3) #endif - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_KILL_THREAD(LVar9) - EVT_SET(GB_StoryProgress, STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Kolorado_02, ANIM_Kolorado_TalkSad, ANIM_Kolorado_IdleSad, 0, MSG_CH5_00D9) - EVT_WAIT(5 * DT) - EVT_CALL(InterpNpcYaw, NPC_Kolorado_02, 270, 4) - EVT_CALL(SetNpcAnimation, NPC_Kolorado_02, ANIM_Kolorado_WalkSad) - EVT_CALL(SetNpcSpeed, NPC_Kolorado_02, EVT_FLOAT(1.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Kolorado_02, 530, 0, 0) - EVT_CALL(SetNpcFlagBits, NPC_Kolorado_02, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcPos, NPC_Kolorado_02, NPC_DISPOSE_LOCATION) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + KillThread(LVar9) + Set(GB_StoryProgress, STORY_CH5_STAR_SPRIT_DEPARTED) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Kolorado_02, ANIM_Kolorado_TalkSad, ANIM_Kolorado_IdleSad, 0, MSG_CH5_00D9) + Wait(5 * DT) + Call(InterpNpcYaw, NPC_Kolorado_02, 270, 4) + Call(SetNpcAnimation, NPC_Kolorado_02, ANIM_Kolorado_WalkSad) + Call(SetNpcSpeed, NPC_Kolorado_02, Float(1.0 / DT)) + Call(NpcMoveTo, NPC_Kolorado_02, 530, 0, 0) + Call(SetNpcFlagBits, NPC_Kolorado_02, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcPos, NPC_Kolorado_02, NPC_DISPOSE_LOCATION) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Misstar) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH5_BEGAN_PEACH_MISSION) - EVT_CALL(SetPlayerPos, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_PARTNER, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_Kolorado_02, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_CALL(SetNpcAnimation, NPC_Kolorado_02, ANIM_Kolorado_IdleSad) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 700, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 700, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 500) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_Scene_Misstar))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH5_BEGAN_PEACH_MISSION) + Call(SetPlayerPos, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_PARTNER, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_Kolorado_02, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(InterpPlayerYaw, 270, 0) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Call(SetNpcAnimation, NPC_Kolorado_02, ANIM_Kolorado_IdleSad) + Call(UseSettingsFrom, CAM_DEFAULT, 700, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 700, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, 500) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_Scene_Misstar))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_Kolorado)[] = { diff --git a/src/world/area_jan/jan_22/jan_22_4_entity.c b/src/world/area_jan/jan_22/jan_22_4_entity.c index 19d7ac46efa..86818e4ad6a 100644 --- a/src/world/area_jan/jan_22/jan_22_4_entity.c +++ b/src/world/area_jan/jan_22/jan_22_4_entity.c @@ -2,16 +2,16 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_THREAD - EVT_LABEL(0) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_ZIP_LINE_READY) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), 1075, 150, -50, 0, MAKE_ENTITY_END) - EVT_END_THREAD - EVT_CALL(MakeItemEntity, ITEM_JAMMIN_JELLY, 340, 0, -75, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_JAN22_Item_JamminJelly) - EVT_CALL(MakeEntity, EVT_PTR(Entity_PinkFlower), -107, 0, -97, -15, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Thread + Label(0) + IfLt(GB_StoryProgress, STORY_CH5_ZIP_LINE_READY) + Wait(1) + Goto(0) + EndIf + Call(MakeEntity, Ref(Entity_HeartBlock), 1075, 150, -50, 0, MAKE_ENTITY_END) + EndThread + Call(MakeItemEntity, ITEM_JAMMIN_JELLY, 340, 0, -75, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_JAN22_Item_JamminJelly) + Call(MakeEntity, Ref(Entity_PinkFlower), -107, 0, -97, -15, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_jan/jan_22/jan_22_5_zipline.c b/src/world/area_jan/jan_22/jan_22_5_zipline.c index aa82e61656b..564105d6a8c 100644 --- a/src/world/area_jan/jan_22/jan_22_5_zipline.c +++ b/src/world/area_jan/jan_22/jan_22_5_zipline.c @@ -79,152 +79,152 @@ Vec3f N(Zipline_Endpoints2)[] = { }; EvtScript N(EVS_Zipline_TetherCameraToPlayer) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_RideZipline) = { - EVT_CALL(GetPartnerInUse, LVar9) - EVT_IF_EQ(LVar9, PARTNER_KOOPER) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar9, PARTNER_BOMBETTE) - EVT_RETURN - EVT_END_IF - EVT_USE_ARRAY(LVar0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o339, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o276, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_JUMP) - EVT_WAIT(1) - EVT_EXEC_GET_TID(N(EVS_Zipline_TetherCameraToPlayer), LVar9) - EVT_THREAD - EVT_WAIT(7) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_SET(LVar0, ArrayVar(4)) - EVT_SUB(LVar0, 10) - EVT_SET(LVar1, ArrayVar(5)) - EVT_ADD(LVar1, -5) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.5)) - EVT_CALL(NpcJump0, NPC_PARTNER, ArrayVar(3), LVar0, LVar1, 8) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_END_THREAD - EVT_CALL(SetPlayerJumpscale, 0) - EVT_CALL(PlayerJump, ArrayVar(3), ArrayVar(4), ArrayVar(5), 7) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_HoldOnto) - EVT_WAIT(10) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_CALL(PlaySound, SOUND_LOOP_ZIPLINE_RIDE) - EVT_CHILD_THREAD - EVT_SET(MF_RidingZipline1, TRUE) - EVT_SET(LVar0, ArrayVar(6)) - EVT_SET(AB_JAN22_ZiplineNpc1, ArrayVar(6)) - EVT_LOOP(0) - EVT_CALL(GetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(N(Zipline_AdjustMoveDownSound), MF_RidingZipline1, LVar1, LVar2, LVar3) - EVT_IF_NE(AB_JAN22_ZiplineNpc1, LVar0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(MakeLerp, 0, 1000, 70, EASING_QUADRATIC_IN) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(Zipline_UpdatePlayerPos), 0) - EVT_CALL(TranslateModel, ArrayVar(1), LVar5, LVar6, LVar7) - EVT_CALL(TranslateModel, ArrayVar(2), LVar5, LVar6, LVar7) - EVT_WAIT(1) - EVT_CALL(N(Zipline_CheckInputForJumpOff), ArrayVar(7), ArrayVar(8)) - EVT_IF_EQ(LVar8, BUTTON_A) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(PlaySound, SOUND_ZIPLINE_FINISH) - EVT_LABEL(10) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_SCRIPTED_FALL, TRUE) - EVT_SET(MF_RidingZipline1, FALSE) - EVT_CALL(StopSound, SOUND_LOOP_ZIPLINE_RIDE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o339, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o339, COLLIDER_FLAG_IGNORE_SHELL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o276, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_KILL_THREAD(LVar9) - EVT_WAIT(20) - EVT_CALL(PlaySound, SOUND_LOOP_ZIPLINE_RETURN) - EVT_CHILD_THREAD - EVT_SET(MF_RidingZipline2, TRUE) - EVT_SET(LVar0, ArrayVar(6)) - EVT_SET(AB_JAN22_ZiplineNpc2, ArrayVar(6)) - EVT_LOOP(0) - EVT_CALL(GetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(N(Zipline_AdjustMoveUpSound), MF_RidingZipline2, LVar1, LVar2, LVar3) - EVT_IF_NE(AB_JAN22_ZiplineNpc2, LVar0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_SET(LVar2, LVar0) - EVT_DIV(LVar2, 10) - EVT_CALL(MakeLerp, LVar0, 0, LVar2, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(N(Zipline_UpdatePlayerPos), 1) - EVT_CALL(TranslateModel, ArrayVar(1), LVar5, LVar6, LVar7) - EVT_CALL(TranslateModel, ArrayVar(2), LVar5, LVar6, LVar7) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_SET(MF_RidingZipline2, FALSE) - EVT_CALL(StopSound, SOUND_LOOP_ZIPLINE_RETURN) - EVT_RETURN - EVT_END + Call(GetPartnerInUse, LVar9) + IfEq(LVar9, PARTNER_KOOPER) + Return + EndIf + IfEq(LVar9, PARTNER_BOMBETTE) + Return + EndIf + UseArray(LVar0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o339, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o276, COLLIDER_FLAGS_UPPER_MASK) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_JUMP) + Wait(1) + ExecGetTID(N(EVS_Zipline_TetherCameraToPlayer), LVar9) + Thread + Wait(7) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Set(LVar0, ArrayVar(4)) + Sub(LVar0, 10) + Set(LVar1, ArrayVar(5)) + Add(LVar1, -5) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.5)) + Call(NpcJump0, NPC_PARTNER, ArrayVar(3), LVar0, LVar1, 8) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + EndThread + Call(SetPlayerJumpscale, 0) + Call(PlayerJump, ArrayVar(3), ArrayVar(4), ArrayVar(5), 7) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Wait(1) + Call(SetPlayerAnimation, ANIM_MarioW2_HoldOnto) + Wait(10) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Call(PlaySound, SOUND_LOOP_ZIPLINE_RIDE) + ChildThread + Set(MF_RidingZipline1, TRUE) + Set(LVar0, ArrayVar(6)) + Set(AB_JAN22_ZiplineNpc1, ArrayVar(6)) + Loop(0) + Call(GetNpcPos, LVar0, LVar1, LVar2, LVar3) + Call(N(Zipline_AdjustMoveDownSound), MF_RidingZipline1, LVar1, LVar2, LVar3) + IfNe(AB_JAN22_ZiplineNpc1, LVar0) + BreakLoop + EndIf + Wait(1) + EndLoop + EndChildThread + Call(MakeLerp, 0, 1000, 70, EASING_QUADRATIC_IN) + Label(0) + Call(UpdateLerp) + Call(N(Zipline_UpdatePlayerPos), 0) + Call(TranslateModel, ArrayVar(1), LVar5, LVar6, LVar7) + Call(TranslateModel, ArrayVar(2), LVar5, LVar6, LVar7) + Wait(1) + Call(N(Zipline_CheckInputForJumpOff), ArrayVar(7), ArrayVar(8)) + IfEq(LVar8, BUTTON_A) + Goto(10) + EndIf + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(PlaySound, SOUND_ZIPLINE_FINISH) + Label(10) + Call(SetPlayerFlagBits, PS_FLAG_SCRIPTED_FALL, TRUE) + Set(MF_RidingZipline1, FALSE) + Call(StopSound, SOUND_LOOP_ZIPLINE_RIDE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o339, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o339, COLLIDER_FLAG_IGNORE_SHELL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o276, COLLIDER_FLAGS_UPPER_MASK) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(EnablePartnerAI) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + KillThread(LVar9) + Wait(20) + Call(PlaySound, SOUND_LOOP_ZIPLINE_RETURN) + ChildThread + Set(MF_RidingZipline2, TRUE) + Set(LVar0, ArrayVar(6)) + Set(AB_JAN22_ZiplineNpc2, ArrayVar(6)) + Loop(0) + Call(GetNpcPos, LVar0, LVar1, LVar2, LVar3) + Call(N(Zipline_AdjustMoveUpSound), MF_RidingZipline2, LVar1, LVar2, LVar3) + IfNe(AB_JAN22_ZiplineNpc2, LVar0) + BreakLoop + EndIf + Wait(1) + EndLoop + EndChildThread + Set(LVar2, LVar0) + Div(LVar2, 10) + Call(MakeLerp, LVar0, 0, LVar2, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(N(Zipline_UpdatePlayerPos), 1) + Call(TranslateModel, ArrayVar(1), LVar5, LVar6, LVar7) + Call(TranslateModel, ArrayVar(2), LVar5, LVar6, LVar7) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Set(MF_RidingZipline2, FALSE) + Call(StopSound, SOUND_LOOP_ZIPLINE_RETURN) + Return + End }; EvtScript N(EVS_SetupZiplines) = { - EVT_MALLOC_ARRAY(9, LVar0) - EVT_USE_ARRAY(LVar0) - EVT_SET(ArrayVar(0), EVT_PTR(N(Zipline_Endpoints1))) - EVT_SET(ArrayVar(1), MODEL_o112) - EVT_SET(ArrayVar(2), MODEL_o113) - EVT_SET(ArrayVar(3), 507) - EVT_SET(ArrayVar(4), 285) - EVT_SET(ArrayVar(5), -26) - EVT_SET(ArrayVar(6), NPC_ZiplineDummy1) - EVT_SET(ArrayVar(7), 795) - EVT_SET(ArrayVar(8), 940) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_RideZipline)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o170, 1, 0) - EVT_EXEC(N(EVS_SyncZiplineDummyNPC1)) - EVT_MALLOC_ARRAY(9, LVar0) - EVT_USE_ARRAY(LVar0) - EVT_SET(ArrayVar(0), EVT_PTR(N(Zipline_Endpoints2))) - EVT_SET(ArrayVar(1), MODEL_o131) - EVT_SET(ArrayVar(2), MODEL_o132) - EVT_SET(ArrayVar(3), 974) - EVT_SET(ArrayVar(4), 135) - EVT_SET(ArrayVar(5), 74) - EVT_SET(ArrayVar(6), NPC_ZiplineDummy2) - EVT_SET(ArrayVar(7), 800) - EVT_SET(ArrayVar(8), 930) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_RideZipline)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o119, 1, 0) - EVT_EXEC(N(EVS_SyncZiplineDummyNPC2)) - EVT_RETURN - EVT_END + MallocArray(9, LVar0) + UseArray(LVar0) + Set(ArrayVar(0), Ref(N(Zipline_Endpoints1))) + Set(ArrayVar(1), MODEL_o112) + Set(ArrayVar(2), MODEL_o113) + Set(ArrayVar(3), 507) + Set(ArrayVar(4), 285) + Set(ArrayVar(5), -26) + Set(ArrayVar(6), NPC_ZiplineDummy1) + Set(ArrayVar(7), 795) + Set(ArrayVar(8), 940) + BindTrigger(Ref(N(EVS_RideZipline)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o170, 1, 0) + Exec(N(EVS_SyncZiplineDummyNPC1)) + MallocArray(9, LVar0) + UseArray(LVar0) + Set(ArrayVar(0), Ref(N(Zipline_Endpoints2))) + Set(ArrayVar(1), MODEL_o131) + Set(ArrayVar(2), MODEL_o132) + Set(ArrayVar(3), 974) + Set(ArrayVar(4), 135) + Set(ArrayVar(5), 74) + Set(ArrayVar(6), NPC_ZiplineDummy2) + Set(ArrayVar(7), 800) + Set(ArrayVar(8), 930) + BindTrigger(Ref(N(EVS_RideZipline)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o119, 1, 0) + Exec(N(EVS_SyncZiplineDummyNPC2)) + Return + End }; diff --git a/src/world/area_jan/jan_22/jan_22_6_bushes.c b/src/world/area_jan/jan_22/jan_22_6_bushes.c index ac33860e7f6..adc4e738f14 100644 --- a/src/world/area_jan/jan_22/jan_22_6_bushes.c +++ b/src/world/area_jan/jan_22/jan_22_6_bushes.c @@ -8,62 +8,62 @@ #include "../common/MoveBush.inc.c" EvtScript N(EVS_MoveBushes_Separate) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_o149, SOUND_SEPARATE_BUSHES, 0) - EVT_SET(LVar0, MV_BushOffsetL) - EVT_SET(LVar1, MV_BushOffsetR) - EVT_SET(LVar6, 0) - EVT_SET(LVar7, 0) - EVT_LOOP(60) - EVT_SETF(LVar2, MV_BushOffsetL) - EVT_SETF(LVar3, MV_BushOffsetR) - EVT_SUBF(LVar2, LVar0) - EVT_SUBF(LVar3, LVar1) - EVT_SETF(LVar4, LVar2) - EVT_SETF(LVar5, LVar3) - EVT_MULF(LVar4, EVT_FLOAT(0.09375)) - EVT_MULF(LVar5, EVT_FLOAT(0.09375)) - EVT_MULF(LVar6, EVT_FLOAT(0.8)) - EVT_MULF(LVar7, EVT_FLOAT(0.8)) - EVT_ADDF(LVar6, LVar4) - EVT_ADDF(LVar7, LVar5) - EVT_ADDF(LVar0, LVar6) - EVT_ADDF(LVar1, LVar7) - EVT_CALL(TranslateModel, MODEL_o143, MV_BushOffsetL, 0, 0) - EVT_CALL(TranslateModel, MODEL_o144, MV_BushOffsetR, 0, 0) - EVT_CALL(N(MoveBush_AnimateShearing), 29, LVar6) - EVT_CALL(N(MoveBush_AnimateShearing), 31, LVar7) - EVT_WAIT(1) - EVT_END_LOOP + Call(PlaySoundAtCollider, COLLIDER_o149, SOUND_SEPARATE_BUSHES, 0) + Set(LVar0, MV_BushOffsetL) + Set(LVar1, MV_BushOffsetR) + Set(LVar6, 0) + Set(LVar7, 0) + Loop(60) + SetF(LVar2, MV_BushOffsetL) + SetF(LVar3, MV_BushOffsetR) + SubF(LVar2, LVar0) + SubF(LVar3, LVar1) + SetF(LVar4, LVar2) + SetF(LVar5, LVar3) + MulF(LVar4, Float(0.09375)) + MulF(LVar5, Float(0.09375)) + MulF(LVar6, Float(0.8)) + MulF(LVar7, Float(0.8)) + AddF(LVar6, LVar4) + AddF(LVar7, LVar5) + AddF(LVar0, LVar6) + AddF(LVar1, LVar7) + Call(TranslateModel, MODEL_o143, MV_BushOffsetL, 0, 0) + Call(TranslateModel, MODEL_o144, MV_BushOffsetR, 0, 0) + Call(N(MoveBush_AnimateShearing), 29, LVar6) + Call(N(MoveBush_AnimateShearing), 31, LVar7) + Wait(1) + EndLoop // script is equivalent to MoveBushTemplates.h, except for this additional line: - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o149, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o149, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_SeparateBushesImmediately) = { - EVT_CALL(TranslateModel, MODEL_o143, -45, 0, 0) - EVT_CALL(TranslateModel, MODEL_o144, 45, 0, 0) - EVT_CALL(N(MoveBush_AnimateShearing), 29, 0) - EVT_CALL(N(MoveBush_AnimateShearing), 31, 0) - EVT_RETURN - EVT_END + Call(TranslateModel, MODEL_o143, -45, 0, 0) + Call(TranslateModel, MODEL_o144, 45, 0, 0) + Call(N(MoveBush_AnimateShearing), 29, 0) + Call(N(MoveBush_AnimateShearing), 31, 0) + Return + End }; EvtScript N(EVS_MoveBushes) = { - EVT_EXEC(N(EVS_MoveBushes_Separate)) - EVT_CALL(MakeLerp, 0, 45, 30, EASING_CUBIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(MV_BushOffsetR, LVar0) - EVT_SETF(MV_BushOffsetL, MV_BushOffsetR) - EVT_MULF(MV_BushOffsetL, -1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Exec(N(EVS_MoveBushes_Separate)) + Call(MakeLerp, 0, 45, 30, EASING_CUBIC_OUT) + Loop(0) + Call(UpdateLerp) + SetF(MV_BushOffsetR, LVar0) + SetF(MV_BushOffsetL, MV_BushOffsetR) + MulF(MV_BushOffsetL, -1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; FoliageModelList N(Bush1_BushModels) = FOLIAGE_MODEL_LIST(MODEL_o337); @@ -151,18 +151,18 @@ SearchBushConfig N(SearchBush_Bush6) = { }; EvtScript N(EVS_SetupBushes) = { - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o314, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o315, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o316, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush4))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o326, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush5))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o327, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush6))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o328, 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(SearchBush_Bush1))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o314, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush2))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o315, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush3))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o316, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush4))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o326, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush5))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o327, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush6))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o328, 1, 0) + Return + End }; diff --git a/src/world/area_jan/jan_22/jan_22_7_trees.c b/src/world/area_jan/jan_22/jan_22_7_trees.c index 970d594bfc7..169ceaebdf2 100644 --- a/src/world/area_jan/jan_22/jan_22_7_trees.c +++ b/src/world/area_jan/jan_22/jan_22_7_trees.c @@ -47,12 +47,12 @@ BombTrigger N(BombPos_Tree2) = { }; EvtScript N(EVS_SetupTrees) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o286, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o287, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o286, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o287, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Return + End }; diff --git a/src/world/area_jan/jan_23/jan_23_1_music.c b/src/world/area_jan/jan_23/jan_23_1_music.c index 7ac62582acd..f2fc5dee56a 100644 --- a/src/world/area_jan/jan_23/jan_23_1_music.c +++ b/src/world/area_jan/jan_23/jan_23_1_music.c @@ -1,7 +1,7 @@ #include "jan_23.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(PlayAmbientSounds, AMBIENT_JUNGLE) - EVT_RETURN - EVT_END + Call(PlayAmbientSounds, AMBIENT_JUNGLE) + Return + End }; diff --git a/src/world/area_jan/jan_23/jan_23_2_main.c b/src/world/area_jan/jan_23/jan_23_2_main.c index b3aec212659..446146d30b2 100644 --- a/src/world/area_jan/jan_23/jan_23_2_main.c +++ b/src/world/area_jan/jan_23/jan_23_2_main.c @@ -3,106 +3,106 @@ EvtScript N(EVS_ExitWalk_jan_19_1) = EVT_EXIT_WALK(60, jan_23_ENTRY_0, "jan_19", jan_19_ENTRY_1); EvtScript N(EVS_ExitFall_jan_16_4) = { - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar1, 110) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SETF(MV_Unk_05, 0) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, 8) - EVT_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(3.0)) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar2, LVar3, LVar4, 15) - EVT_ELSE - EVT_WAIT(10) - EVT_END_IF - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar2, LVar3, LVar4) - EVT_CALL(MakeLerp, LVar3, -500, 15, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_ADD(LVar4, 2) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar2, LVar0, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetPlayerActionState, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ACTION_STATE_SPIN_JUMP) - EVT_GOTO(11) - EVT_CASE_EQ(ACTION_STATE_TORNADO_JUMP) - EVT_LABEL(11) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, 250, 100) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, -100, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_SET(MV_Unk_05, -1) - EVT_CASE_DEFAULT - EVT_WAIT(10) - EVT_END_SWITCH - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_CALL(MakeLerp, LVar3, -500, 15, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_ADD(LVar4, 2) - EVT_CALL(SetPlayerPos, LVar2, LVar0, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_END_THREAD - EVT_END_IF - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar1, -100) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_IF_EQ(MV_Unk_05, 0) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, 250, 100) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(GotoMap, EVT_PTR("jan_16"), jan_16_ENTRY_4) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Loop(0) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar1, 110) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, TRUE) + SetF(MV_Unk_05, 0) + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, 8) + Thread + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + IfEq(LVar0, 0) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Call(SetNpcJumpscale, NPC_PARTNER, Float(3.0)) + Call(NpcJump0, NPC_PARTNER, LVar2, LVar3, LVar4, 15) + Else + Wait(10) + EndIf + Call(GetNpcPos, NPC_PARTNER, LVar2, LVar3, LVar4) + Call(MakeLerp, LVar3, -500, 15, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Add(LVar4, 2) + Call(SetNpcPos, NPC_PARTNER, LVar2, LVar0, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(GetPlayerActionState, LVar0) + Switch(LVar0) + CaseEq(ACTION_STATE_SPIN_JUMP) + Goto(11) + CaseEq(ACTION_STATE_TORNADO_JUMP) + Label(11) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, 250, 100) + Call(SetPanTarget, CAM_DEFAULT, LVar0, -100, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Set(MV_Unk_05, -1) + CaseDefault + Wait(10) + EndSwitch + Call(DisablePlayerPhysics, TRUE) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Call(MakeLerp, LVar3, -500, 15, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Add(LVar4, 2) + Call(SetPlayerPos, LVar2, LVar0, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetPlayerActionState, ACTION_STATE_LAND) + EndThread + EndIf + Loop(0) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar1, -100) + BreakLoop + EndIf + EndLoop + IfEq(MV_Unk_05, 0) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, 250, 100) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndIf + Wait(30) + Call(GotoMap, Ref("jan_16"), jan_16_ENTRY_4) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_jan_19_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_EXEC(N(EVS_ExitFall_jan_16_4)) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_jan_19_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + Exec(N(EVS_ExitFall_jan_16_4)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_JADE_JUNGLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_JADE_JUNGLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + ExecWait(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_jan/jan_23/jan_23_3_npc.c b/src/world/area_jan/jan_23/jan_23_3_npc.c index 4ee69fe4034..90a6f8afd5c 100644 --- a/src/world/area_jan/jan_23/jan_23_3_npc.c +++ b/src/world/area_jan/jan_23/jan_23_3_npc.c @@ -5,588 +5,588 @@ #include "world/common/npc/Raven.inc.c" EvtScript N(EVS_Ravens_Converse) = { - EVT_LOOP(4) - EVT_CALL(SetNpcAnimation, NPC_RaphaelRaven, ANIM_RaphaelRaven_TalkNoFeet) - EVT_CALL(InterpNpcYaw, NPC_Raven_01, 90, 1) - EVT_CALL(InterpNpcYaw, NPC_Raven_02, 270, 1) - EVT_CALL(InterpNpcYaw, NPC_Raven_03, 0, 4) - EVT_CALL(InterpNpcYaw, NPC_Raven_04, 90, 1) - EVT_CALL(InterpNpcYaw, NPC_Raven_05, 270, 1) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_RaphaelRaven, ANIM_RaphaelRaven_IdleNoFeet) - EVT_CALL(InterpNpcYaw, NPC_Raven_01, 270, 2) - EVT_CALL(InterpNpcYaw, NPC_Raven_02, 90, 1) - EVT_CALL(InterpNpcYaw, NPC_Raven_03, 0, 1) - EVT_CALL(InterpNpcYaw, NPC_Raven_04, 270, 4) - EVT_CALL(InterpNpcYaw, NPC_Raven_05, 90, 1) - EVT_WAIT(20) - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Idle) - EVT_CALL(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Idle) - EVT_CALL(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Idle) - EVT_CALL(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Idle) - EVT_CALL(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Idle) - EVT_CALL(InterpNpcYaw, NPC_Raven_01, 0, 1) - EVT_CALL(InterpNpcYaw, NPC_Raven_02, 0, 1) - EVT_CALL(InterpNpcYaw, NPC_Raven_03, 0, 1) - EVT_CALL(InterpNpcYaw, NPC_Raven_04, 0, 1) - EVT_CALL(InterpNpcYaw, NPC_Raven_05, 0, 1) - EVT_RETURN - EVT_END + Loop(4) + Call(SetNpcAnimation, NPC_RaphaelRaven, ANIM_RaphaelRaven_TalkNoFeet) + Call(InterpNpcYaw, NPC_Raven_01, 90, 1) + Call(InterpNpcYaw, NPC_Raven_02, 270, 1) + Call(InterpNpcYaw, NPC_Raven_03, 0, 4) + Call(InterpNpcYaw, NPC_Raven_04, 90, 1) + Call(InterpNpcYaw, NPC_Raven_05, 270, 1) + Wait(20) + Call(SetNpcAnimation, NPC_RaphaelRaven, ANIM_RaphaelRaven_IdleNoFeet) + Call(InterpNpcYaw, NPC_Raven_01, 270, 2) + Call(InterpNpcYaw, NPC_Raven_02, 90, 1) + Call(InterpNpcYaw, NPC_Raven_03, 0, 1) + Call(InterpNpcYaw, NPC_Raven_04, 270, 4) + Call(InterpNpcYaw, NPC_Raven_05, 90, 1) + Wait(20) + EndLoop + Call(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Idle) + Call(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Idle) + Call(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Idle) + Call(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Idle) + Call(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Idle) + Call(InterpNpcYaw, NPC_Raven_01, 0, 1) + Call(InterpNpcYaw, NPC_Raven_02, 0, 1) + Call(InterpNpcYaw, NPC_Raven_03, 0, 1) + Call(InterpNpcYaw, NPC_Raven_04, 0, 1) + Call(InterpNpcYaw, NPC_Raven_05, 0, 1) + Return + End }; EvtScript N(EVS_Raven1_Descend) = { - EVT_CALL(SetNpcRotationPivot, NPC_Raven_01, 50) - EVT_LOOP(2) - EVT_SET(LVar3, -30) - EVT_LOOP(20) - EVT_CALL(SetNpcRotation, NPC_Raven_01, 0, 0, LVar3) - EVT_ADD(LVar3, 3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(20) - EVT_CALL(SetNpcRotation, NPC_Raven_01, 0, 0, LVar3) - EVT_ADD(LVar3, -3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_LOOP - EVT_LOOP(10) - EVT_CALL(SetNpcRotation, NPC_Raven_01, 0, 0, LVar3) - EVT_ADD(LVar3, 3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcRotationPivot, NPC_Raven_01, 0) - EVT_RETURN - EVT_END + Call(SetNpcRotationPivot, NPC_Raven_01, 50) + Loop(2) + Set(LVar3, -30) + Loop(20) + Call(SetNpcRotation, NPC_Raven_01, 0, 0, LVar3) + Add(LVar3, 3) + Wait(1) + EndLoop + Loop(20) + Call(SetNpcRotation, NPC_Raven_01, 0, 0, LVar3) + Add(LVar3, -3) + Wait(1) + EndLoop + EndLoop + Loop(10) + Call(SetNpcRotation, NPC_Raven_01, 0, 0, LVar3) + Add(LVar3, 3) + Wait(1) + EndLoop + Call(SetNpcRotationPivot, NPC_Raven_01, 0) + Return + End }; EvtScript N(EVS_Raven2_Descend) = { - EVT_CALL(SetNpcRotationPivot, NPC_Raven_02, 60) - EVT_LOOP(2) - EVT_SET(LVar3, -30) - EVT_LOOP(20) - EVT_CALL(SetNpcRotation, NPC_Raven_02, 0, 0, LVar3) - EVT_ADD(LVar3, 3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(20) - EVT_CALL(SetNpcRotation, NPC_Raven_02, 0, 0, LVar3) - EVT_ADD(LVar3, -3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_LOOP - EVT_LOOP(10) - EVT_CALL(SetNpcRotation, NPC_Raven_02, 0, 0, LVar3) - EVT_ADD(LVar3, 3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcRotationPivot, NPC_Raven_02, 0) - EVT_RETURN - EVT_END + Call(SetNpcRotationPivot, NPC_Raven_02, 60) + Loop(2) + Set(LVar3, -30) + Loop(20) + Call(SetNpcRotation, NPC_Raven_02, 0, 0, LVar3) + Add(LVar3, 3) + Wait(1) + EndLoop + Loop(20) + Call(SetNpcRotation, NPC_Raven_02, 0, 0, LVar3) + Add(LVar3, -3) + Wait(1) + EndLoop + EndLoop + Loop(10) + Call(SetNpcRotation, NPC_Raven_02, 0, 0, LVar3) + Add(LVar3, 3) + Wait(1) + EndLoop + Call(SetNpcRotationPivot, NPC_Raven_02, 0) + Return + End }; EvtScript N(EVS_Raven3_Descend) = { - EVT_CALL(SetNpcRotationPivot, NPC_Raven_03, 50) - EVT_LOOP(2) - EVT_SET(LVar3, -30) - EVT_LOOP(20) - EVT_CALL(SetNpcRotation, NPC_Raven_03, 0, 0, LVar3) - EVT_ADD(LVar3, 3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(20) - EVT_CALL(SetNpcRotation, NPC_Raven_03, 0, 0, LVar3) - EVT_ADD(LVar3, -3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_LOOP - EVT_LOOP(10) - EVT_CALL(SetNpcRotation, NPC_Raven_03, 0, 0, LVar3) - EVT_ADD(LVar3, 3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcRotationPivot, NPC_Raven_03, 0) - EVT_RETURN - EVT_END + Call(SetNpcRotationPivot, NPC_Raven_03, 50) + Loop(2) + Set(LVar3, -30) + Loop(20) + Call(SetNpcRotation, NPC_Raven_03, 0, 0, LVar3) + Add(LVar3, 3) + Wait(1) + EndLoop + Loop(20) + Call(SetNpcRotation, NPC_Raven_03, 0, 0, LVar3) + Add(LVar3, -3) + Wait(1) + EndLoop + EndLoop + Loop(10) + Call(SetNpcRotation, NPC_Raven_03, 0, 0, LVar3) + Add(LVar3, 3) + Wait(1) + EndLoop + Call(SetNpcRotationPivot, NPC_Raven_03, 0) + Return + End }; EvtScript N(EVS_Raven4_Descend) = { - EVT_CALL(SetNpcRotationPivot, NPC_Raven_04, 60) - EVT_LOOP(2) - EVT_SET(LVar3, -30) - EVT_LOOP(20) - EVT_CALL(SetNpcRotation, NPC_Raven_04, 0, 0, LVar3) - EVT_ADD(LVar3, 3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(20) - EVT_CALL(SetNpcRotation, NPC_Raven_04, 0, 0, LVar3) - EVT_ADD(LVar3, -3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_LOOP - EVT_LOOP(10) - EVT_CALL(SetNpcRotation, NPC_Raven_04, 0, 0, LVar3) - EVT_ADD(LVar3, 3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcRotationPivot, NPC_Raven_04, 0) - EVT_RETURN - EVT_END + Call(SetNpcRotationPivot, NPC_Raven_04, 60) + Loop(2) + Set(LVar3, -30) + Loop(20) + Call(SetNpcRotation, NPC_Raven_04, 0, 0, LVar3) + Add(LVar3, 3) + Wait(1) + EndLoop + Loop(20) + Call(SetNpcRotation, NPC_Raven_04, 0, 0, LVar3) + Add(LVar3, -3) + Wait(1) + EndLoop + EndLoop + Loop(10) + Call(SetNpcRotation, NPC_Raven_04, 0, 0, LVar3) + Add(LVar3, 3) + Wait(1) + EndLoop + Call(SetNpcRotationPivot, NPC_Raven_04, 0) + Return + End }; EvtScript N(EVS_Raven5_Descend) = { - EVT_CALL(SetNpcRotationPivot, NPC_Raven_05, 50) - EVT_LOOP(2) - EVT_SET(LVar3, -30) - EVT_LOOP(20) - EVT_CALL(SetNpcRotation, NPC_Raven_05, 0, 0, LVar3) - EVT_ADD(LVar3, 3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(20) - EVT_CALL(SetNpcRotation, NPC_Raven_05, 0, 0, LVar3) - EVT_ADD(LVar3, -3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_LOOP - EVT_LOOP(10) - EVT_CALL(SetNpcRotation, NPC_Raven_05, 0, 0, LVar3) - EVT_ADD(LVar3, 3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcRotationPivot, NPC_Raven_05, 0) - EVT_RETURN - EVT_END + Call(SetNpcRotationPivot, NPC_Raven_05, 50) + Loop(2) + Set(LVar3, -30) + Loop(20) + Call(SetNpcRotation, NPC_Raven_05, 0, 0, LVar3) + Add(LVar3, 3) + Wait(1) + EndLoop + Loop(20) + Call(SetNpcRotation, NPC_Raven_05, 0, 0, LVar3) + Add(LVar3, -3) + Wait(1) + EndLoop + EndLoop + Loop(10) + Call(SetNpcRotation, NPC_Raven_05, 0, 0, LVar3) + Add(LVar3, 3) + Wait(1) + EndLoop + Call(SetNpcRotationPivot, NPC_Raven_05, 0) + Return + End }; EvtScript N(EVS_Raven1_MoveToMeetingPos) = { - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Walk) - EVT_CALL(SetNpcSpeed, NPC_Raven_01, EVT_FLOAT(3.0)) - EVT_CALL(NpcMoveTo, NPC_Raven_01, 540, 85, 0) - EVT_CALL(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Idle) - EVT_CALL(InterpNpcYaw, NPC_Raven_01, 0, 1) - EVT_RETURN - EVT_END + Wait(10) + Call(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Walk) + Call(SetNpcSpeed, NPC_Raven_01, Float(3.0)) + Call(NpcMoveTo, NPC_Raven_01, 540, 85, 0) + Call(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Idle) + Call(InterpNpcYaw, NPC_Raven_01, 0, 1) + Return + End }; EvtScript N(EVS_Raven2_MoveToMeetingPos) = { - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Walk) - EVT_CALL(SetNpcSpeed, NPC_Raven_02, EVT_FLOAT(3.0)) - EVT_CALL(NpcMoveTo, NPC_Raven_02, 560, 132, 0) - EVT_CALL(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Idle) - EVT_CALL(InterpNpcYaw, NPC_Raven_02, 0, 1) - EVT_RETURN - EVT_END + Wait(10) + Call(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Walk) + Call(SetNpcSpeed, NPC_Raven_02, Float(3.0)) + Call(NpcMoveTo, NPC_Raven_02, 560, 132, 0) + Call(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Idle) + Call(InterpNpcYaw, NPC_Raven_02, 0, 1) + Return + End }; EvtScript N(EVS_Raven3_MoveToMeetingPos) = { - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Walk) - EVT_CALL(SetNpcSpeed, NPC_Raven_03, EVT_FLOAT(3.0)) - EVT_CALL(NpcMoveTo, NPC_Raven_03, 590, 105, 0) - EVT_CALL(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Idle) - EVT_CALL(InterpNpcYaw, NPC_Raven_03, 0, 1) - EVT_RETURN - EVT_END + Wait(10) + Call(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Walk) + Call(SetNpcSpeed, NPC_Raven_03, Float(3.0)) + Call(NpcMoveTo, NPC_Raven_03, 590, 105, 0) + Call(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Idle) + Call(InterpNpcYaw, NPC_Raven_03, 0, 1) + Return + End }; EvtScript N(EVS_Raven4_MoveToMeetingPos) = { - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Walk) - EVT_CALL(SetNpcSpeed, NPC_Raven_04, EVT_FLOAT(3.0)) - EVT_CALL(NpcMoveTo, NPC_Raven_04, 615, 122, 0) - EVT_CALL(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Idle) - EVT_CALL(InterpNpcYaw, NPC_Raven_04, 0, 1) - EVT_RETURN - EVT_END + Wait(10) + Call(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Walk) + Call(SetNpcSpeed, NPC_Raven_04, Float(3.0)) + Call(NpcMoveTo, NPC_Raven_04, 615, 122, 0) + Call(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Idle) + Call(InterpNpcYaw, NPC_Raven_04, 0, 1) + Return + End }; EvtScript N(EVS_Raven5_Sweat) = { - EVT_LABEL(0) - EVT_CALL(ShowSweat, NPC_Raven_05, 1, -45, EMOTER_NPC, 0, 0, 0, 0, 20) - EVT_WAIT(8) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(ShowSweat, NPC_Raven_05, 1, -45, EMOTER_NPC, 0, 0, 0, 0, 20) + Wait(8) + Goto(0) + Return + End }; EvtScript N(EVS_Raven5_MoveToMeetingPos) = { - EVT_WAIT(10) - EVT_EXEC_GET_TID(N(EVS_Raven5_Sweat), LVar9) - EVT_CALL(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Walk) - EVT_CALL(SetNpcSpeed, NPC_Raven_05, EVT_FLOAT(4.0)) - EVT_CALL(NpcMoveTo, NPC_Raven_05, 645, 78, 0) - EVT_CALL(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Idle) - EVT_CALL(InterpNpcYaw, NPC_Raven_05, 0, 1) - EVT_WAIT(15) - EVT_KILL_THREAD(LVar9) - EVT_RETURN - EVT_END + Wait(10) + ExecGetTID(N(EVS_Raven5_Sweat), LVar9) + Call(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Walk) + Call(SetNpcSpeed, NPC_Raven_05, Float(4.0)) + Call(NpcMoveTo, NPC_Raven_05, 645, 78, 0) + Call(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Idle) + Call(InterpNpcYaw, NPC_Raven_05, 0, 1) + Wait(15) + KillThread(LVar9) + Return + End }; EvtScript N(EVS_NpcInteract_RaphaelRaven_Before) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 460) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(16.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RaphaelRaven_TalkNoFeet, ANIM_RaphaelRaven_IdleNoFeet, 0, MSG_CH5_00DA) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(5 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(35 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RaphaelRaven_TalkNoFeet, ANIM_RaphaelRaven_IdleNoFeet, 5, MSG_CH5_00DB) - EVT_WAIT(20 * DT) - EVT_THREAD - EVT_SET(MF_Unk_00, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RaphaelRaven_TalkNoFeetAngry, ANIM_RaphaelRaven_TalkNoFeetAngry, 5, MSG_CH5_00DC) - EVT_SET(MF_Unk_00, TRUE) - EVT_END_THREAD - EVT_CALL(SetMotionBlurParams, 0, 0, 0, 320, 240, 128, 10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_RaphaelRaven_TalkNoFeetAngry) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(12.0)) - EVT_LOOP(5) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_BIG_DRUM_A, SOUND_SPACE_DEFAULT) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 310) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_BIG_DRUM_B, SOUND_SPACE_DEFAULT) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 460) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_LOOP - EVT_CALL(SetMotionBlurParams, 0, 0, 0, 320, 240, 0, 10) - EVT_LABEL(2) - EVT_IF_EQ(MF_Unk_00, FALSE) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_RaphaelRaven_IdleNoFeet) - EVT_WAIT(15 * DT) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_ADD(LVar1, 0) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 580) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 1) - EVT_CALL(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Flail) - EVT_CALL(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Flail) - EVT_CALL(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Flail) - EVT_CALL(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Flail) - EVT_CALL(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Flail) - EVT_CALL(SetNpcPos, NPC_Raven_01, 800, 450, -20) - EVT_CALL(SetNpcPos, NPC_Raven_02, 820, 452, 0) - EVT_CALL(SetNpcPos, NPC_Raven_03, 840, 452, 27) - EVT_CALL(SetNpcPos, NPC_Raven_04, 830, 452, 56) - EVT_CALL(SetNpcPos, NPC_Raven_05, 795, 455, 20) - EVT_CALL(EnableNpcShadow, NPC_Raven_01, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Raven_02, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Raven_03, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Raven_04, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Raven_05, FALSE) - EVT_THREAD - EVT_EXEC(N(EVS_Raven1_Descend)) - EVT_CALL(SetNpcJumpscale, NPC_Raven_01, 0) - EVT_CALL(GetNpcPos, NPC_Raven_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -120) - EVT_ADD(LVar1, -250) - EVT_ADD(LVar2, 63) - EVT_CALL(PlaySoundAtNpc, NPC_Raven_01, SOUND_RAVEN_FALL_A, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Raven_01, LVar0, LVar1, LVar2, 100) - EVT_CALL(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Idle) - EVT_CALL(EnableNpcShadow, NPC_Raven_01, TRUE) - EVT_EXEC_WAIT(N(EVS_Raven1_MoveToMeetingPos)) - EVT_END_THREAD - EVT_WAIT(20) - EVT_THREAD - EVT_EXEC(N(EVS_Raven2_Descend)) - EVT_CALL(SetNpcJumpscale, NPC_Raven_02, 0) - EVT_CALL(GetNpcPos, NPC_Raven_02, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -120) - EVT_ADD(LVar1, -250) - EVT_ADD(LVar2, 63) - EVT_CALL(PlaySoundAtNpc, NPC_Raven_02, SOUND_RAVEN_FALL_B, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Raven_02, LVar0, LVar1, LVar2, 100) - EVT_CALL(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Idle) - EVT_CALL(EnableNpcShadow, NPC_Raven_02, TRUE) - EVT_EXEC_WAIT(N(EVS_Raven2_MoveToMeetingPos)) - EVT_END_THREAD - EVT_WAIT(20) - EVT_THREAD - EVT_CALL(InterpPlayerYaw, 90, 1) - EVT_WAIT(20) - EVT_SET(LVar3, 625) - EVT_SET(LVar5, 220) - EVT_CALL(PlayerMoveTo, LVar3, LVar5, 30) - EVT_CALL(InterpPlayerYaw, 10, 4) - EVT_END_THREAD - EVT_THREAD - EVT_EXEC(N(EVS_Raven3_Descend)) - EVT_CALL(SetNpcJumpscale, NPC_Raven_03, 0) - EVT_CALL(GetNpcPos, NPC_Raven_03, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -100) - EVT_ADD(LVar1, -250) - EVT_ADD(LVar2, 50) - EVT_CALL(PlaySoundAtNpc, NPC_Raven_03, SOUND_RAVEN_FALL_C, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Raven_03, LVar0, LVar1, LVar2, 90) - EVT_CALL(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Idle) - EVT_CALL(EnableNpcShadow, NPC_Raven_03, TRUE) - EVT_EXEC_WAIT(N(EVS_Raven3_MoveToMeetingPos)) - EVT_END_THREAD - EVT_WAIT(40) - EVT_THREAD - EVT_EXEC(N(EVS_Raven4_Descend)) - EVT_CALL(SetNpcJumpscale, NPC_Raven_04, 0) - EVT_CALL(GetNpcPos, NPC_Raven_04, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -100) - EVT_ADD(LVar1, -250) - EVT_ADD(LVar2, 60) - EVT_CALL(PlaySoundAtNpc, NPC_Raven_04, SOUND_RAVEN_FALL_A, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Raven_04, LVar0, LVar1, LVar2, 100) - EVT_CALL(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Idle) - EVT_CALL(EnableNpcShadow, NPC_Raven_04, TRUE) - EVT_EXEC_WAIT(N(EVS_Raven4_MoveToMeetingPos)) - EVT_END_THREAD - EVT_WAIT(20) - EVT_EXEC(N(EVS_Raven5_Descend)) - EVT_CALL(SetNpcJumpscale, NPC_Raven_05, 0) - EVT_CALL(PlaySoundAtNpc, NPC_Raven_05, SOUND_RAVEN_FALL_B, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Raven_05, 737, 200, 65, 100) - EVT_CALL(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Idle) - EVT_CALL(EnableNpcShadow, NPC_Raven_05, TRUE) - EVT_EXEC_WAIT(N(EVS_Raven5_MoveToMeetingPos)) - EVT_WAIT(20) - EVT_CALL(InterpPlayerYaw, 350, 4) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RaphaelRaven_TalkNoFeet, ANIM_RaphaelRaven_IdleNoFeet, 5, MSG_CH5_00DD) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RaphaelRaven_TalkNoFeet, ANIM_RaphaelRaven_IdleNoFeet, 5, MSG_CH5_00DE) - EVT_EXEC_WAIT(N(EVS_Ravens_Converse)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RaphaelRaven_TalkNoFeet, ANIM_RaphaelRaven_IdleNoFeet, 5, MSG_CH5_00DF) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 535, 200, 215) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.5 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(20 * DT) - EVT_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0)) - EVT_WAIT(15 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_RAVEN_FALL_A, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_RaphaelRaven_Walk) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -70) - EVT_ADD(LVar1, -7) - EVT_ADD(LVar2, 175) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_RaphaelRaven_Idle) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.5)) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_RaphaelRaven_Walk) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -100) - EVT_ADD(LVar1, -300) - EVT_ADD(LVar2, 175) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 30 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_RaphaelRaven_Idle) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) - EVT_END_THREAD - EVT_WAIT(40 * DT) - EVT_THREAD - EVT_WAIT(35 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Raven_01, SOUND_RAVEN_FALL_B, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Raven_01, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Walk) - EVT_CALL(GetNpcPos, NPC_Raven_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -40) - EVT_ADD(LVar2, 154) - EVT_CALL(NpcMoveTo, NPC_Raven_01, LVar0, LVar2, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Idle) - EVT_CALL(SetNpcJumpscale, NPC_Raven_01, EVT_FLOAT(1.5)) - EVT_CALL(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Walk) - EVT_CALL(GetNpcPos, NPC_Raven_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -20) - EVT_ADD(LVar1, -300) - EVT_ADD(LVar2, 154) - EVT_CALL(NpcJump0, NPC_Raven_01, LVar0, LVar1, LVar2, 30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Idle) - EVT_CALL(SetNpcPos, NPC_Raven_01, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_Raven_01, NPC_FLAG_GRAVITY, FALSE) - EVT_END_THREAD - EVT_WAIT(20 * DT) - EVT_THREAD - EVT_WAIT(35 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Raven_02, SOUND_RAVEN_FALL_C, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Raven_02, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Walk) - EVT_CALL(GetNpcPos, NPC_Raven_02, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -55) - EVT_ADD(LVar2, 110) - EVT_CALL(NpcMoveTo, NPC_Raven_02, LVar0, LVar2, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Idle) - EVT_CALL(SetNpcJumpscale, NPC_Raven_02, EVT_FLOAT(1.5)) - EVT_CALL(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Walk) - EVT_CALL(GetNpcPos, NPC_Raven_02, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -40) - EVT_ADD(LVar1, -300) - EVT_ADD(LVar2, 110) - EVT_CALL(NpcJump0, NPC_Raven_02, LVar0, LVar1, LVar2, 30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Idle) - EVT_CALL(SetNpcPos, NPC_Raven_02, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_Raven_02, NPC_FLAG_GRAVITY, FALSE) - EVT_END_THREAD - EVT_WAIT(20 * DT) - EVT_THREAD - EVT_WAIT(35 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Raven_03, SOUND_RAVEN_FALL_A, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Raven_03, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Walk) - EVT_CALL(GetNpcPos, NPC_Raven_03, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -75) - EVT_ADD(LVar2, 134) - EVT_CALL(NpcMoveTo, NPC_Raven_03, LVar0, LVar2, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Idle) - EVT_CALL(SetNpcJumpscale, NPC_Raven_03, EVT_FLOAT(1.5)) - EVT_CALL(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Walk) - EVT_CALL(GetNpcPos, NPC_Raven_03, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -70) - EVT_ADD(LVar1, -300) - EVT_ADD(LVar2, 134) - EVT_CALL(NpcJump0, NPC_Raven_03, LVar0, LVar1, LVar2, 30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Idle) - EVT_CALL(SetNpcPos, NPC_Raven_03, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_Raven_03, NPC_FLAG_GRAVITY, FALSE) - EVT_END_THREAD - EVT_WAIT(20 * DT) - EVT_THREAD - EVT_WAIT(35 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Raven_04, SOUND_RAVEN_FALL_B, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Raven_04, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Walk) - EVT_CALL(GetNpcPos, NPC_Raven_04, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -110) - EVT_ADD(LVar2, 115) - EVT_CALL(NpcMoveTo, NPC_Raven_04, LVar0, LVar2, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Idle) - EVT_CALL(SetNpcJumpscale, NPC_Raven_04, EVT_FLOAT(1.5)) - EVT_CALL(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Walk) - EVT_CALL(GetNpcPos, NPC_Raven_04, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -110) - EVT_ADD(LVar1, -300) - EVT_ADD(LVar2, 115) - EVT_CALL(NpcJump0, NPC_Raven_04, LVar0, LVar1, LVar2, 30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Idle) - EVT_CALL(SetNpcPos, NPC_Raven_04, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_Raven_04, NPC_FLAG_GRAVITY, FALSE) - EVT_END_THREAD - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_WAIT(45 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Raven_05, SOUND_RAVEN_FALL_C, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Raven_05, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Walk) - EVT_CALL(GetNpcPos, NPC_Raven_05, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -100) - EVT_ADD(LVar2, 161) - EVT_CALL(NpcMoveTo, NPC_Raven_05, LVar0, LVar2, 30 * DT) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Idle) - EVT_CALL(SetNpcJumpscale, NPC_Raven_05, EVT_FLOAT(1.5)) - EVT_CALL(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Walk) - EVT_CALL(GetNpcPos, NPC_Raven_05, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -70) - EVT_ADD(LVar1, -500) - EVT_ADD(LVar2, 161) - EVT_CALL(NpcJump0, NPC_Raven_05, LVar0, LVar1, LVar2, 35 * DT) - EVT_CALL(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Idle) - EVT_CALL(SetNpcPos, NPC_Raven_05, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_Raven_05, NPC_FLAG_GRAVITY, FALSE) - EVT_END_THREAD - EVT_CALL(SetPanTarget, CAM_DEFAULT, 550, -150, 400) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 580) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(16.0), EVT_FLOAT(-4.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.8 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(15 * DT) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(2.0 * DT)) - EVT_SET(GB_StoryProgress, STORY_CH5_RAPHAEL_LEFT_NEST) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 460) + Call(SetCamPitch, CAM_DEFAULT, Float(16.0), Float(-9.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_RaphaelRaven_TalkNoFeet, ANIM_RaphaelRaven_IdleNoFeet, 0, MSG_CH5_00DA) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(5 * DT) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(35 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_RaphaelRaven_TalkNoFeet, ANIM_RaphaelRaven_IdleNoFeet, 5, MSG_CH5_00DB) + Wait(20 * DT) + Thread + Set(MF_Unk_00, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_RaphaelRaven_TalkNoFeetAngry, ANIM_RaphaelRaven_TalkNoFeetAngry, 5, MSG_CH5_00DC) + Set(MF_Unk_00, TRUE) + EndThread + Call(SetMotionBlurParams, 0, 0, 0, 320, 240, 128, 10) + Call(SetNpcAnimation, NPC_SELF, ANIM_RaphaelRaven_TalkNoFeetAngry) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(12.0)) + Loop(5) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_BIG_DRUM_A, SOUND_SPACE_DEFAULT) + Call(SetCamDistance, CAM_DEFAULT, 310) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_BIG_DRUM_B, SOUND_SPACE_DEFAULT) + Call(SetCamDistance, CAM_DEFAULT, 460) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndLoop + Call(SetMotionBlurParams, 0, 0, 0, 320, 240, 0, 10) + Label(2) + IfEq(MF_Unk_00, FALSE) + Wait(1) + Goto(2) + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_RaphaelRaven_IdleNoFeet) + Wait(15 * DT) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Add(LVar1, 0) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 580) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(InterpNpcYaw, NPC_SELF, 90, 1) + Call(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Flail) + Call(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Flail) + Call(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Flail) + Call(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Flail) + Call(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Flail) + Call(SetNpcPos, NPC_Raven_01, 800, 450, -20) + Call(SetNpcPos, NPC_Raven_02, 820, 452, 0) + Call(SetNpcPos, NPC_Raven_03, 840, 452, 27) + Call(SetNpcPos, NPC_Raven_04, 830, 452, 56) + Call(SetNpcPos, NPC_Raven_05, 795, 455, 20) + Call(EnableNpcShadow, NPC_Raven_01, FALSE) + Call(EnableNpcShadow, NPC_Raven_02, FALSE) + Call(EnableNpcShadow, NPC_Raven_03, FALSE) + Call(EnableNpcShadow, NPC_Raven_04, FALSE) + Call(EnableNpcShadow, NPC_Raven_05, FALSE) + Thread + Exec(N(EVS_Raven1_Descend)) + Call(SetNpcJumpscale, NPC_Raven_01, 0) + Call(GetNpcPos, NPC_Raven_01, LVar0, LVar1, LVar2) + Add(LVar0, -120) + Add(LVar1, -250) + Add(LVar2, 63) + Call(PlaySoundAtNpc, NPC_Raven_01, SOUND_RAVEN_FALL_A, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Raven_01, LVar0, LVar1, LVar2, 100) + Call(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Idle) + Call(EnableNpcShadow, NPC_Raven_01, TRUE) + ExecWait(N(EVS_Raven1_MoveToMeetingPos)) + EndThread + Wait(20) + Thread + Exec(N(EVS_Raven2_Descend)) + Call(SetNpcJumpscale, NPC_Raven_02, 0) + Call(GetNpcPos, NPC_Raven_02, LVar0, LVar1, LVar2) + Add(LVar0, -120) + Add(LVar1, -250) + Add(LVar2, 63) + Call(PlaySoundAtNpc, NPC_Raven_02, SOUND_RAVEN_FALL_B, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Raven_02, LVar0, LVar1, LVar2, 100) + Call(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Idle) + Call(EnableNpcShadow, NPC_Raven_02, TRUE) + ExecWait(N(EVS_Raven2_MoveToMeetingPos)) + EndThread + Wait(20) + Thread + Call(InterpPlayerYaw, 90, 1) + Wait(20) + Set(LVar3, 625) + Set(LVar5, 220) + Call(PlayerMoveTo, LVar3, LVar5, 30) + Call(InterpPlayerYaw, 10, 4) + EndThread + Thread + Exec(N(EVS_Raven3_Descend)) + Call(SetNpcJumpscale, NPC_Raven_03, 0) + Call(GetNpcPos, NPC_Raven_03, LVar0, LVar1, LVar2) + Add(LVar0, -100) + Add(LVar1, -250) + Add(LVar2, 50) + Call(PlaySoundAtNpc, NPC_Raven_03, SOUND_RAVEN_FALL_C, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Raven_03, LVar0, LVar1, LVar2, 90) + Call(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Idle) + Call(EnableNpcShadow, NPC_Raven_03, TRUE) + ExecWait(N(EVS_Raven3_MoveToMeetingPos)) + EndThread + Wait(40) + Thread + Exec(N(EVS_Raven4_Descend)) + Call(SetNpcJumpscale, NPC_Raven_04, 0) + Call(GetNpcPos, NPC_Raven_04, LVar0, LVar1, LVar2) + Add(LVar0, -100) + Add(LVar1, -250) + Add(LVar2, 60) + Call(PlaySoundAtNpc, NPC_Raven_04, SOUND_RAVEN_FALL_A, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Raven_04, LVar0, LVar1, LVar2, 100) + Call(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Idle) + Call(EnableNpcShadow, NPC_Raven_04, TRUE) + ExecWait(N(EVS_Raven4_MoveToMeetingPos)) + EndThread + Wait(20) + Exec(N(EVS_Raven5_Descend)) + Call(SetNpcJumpscale, NPC_Raven_05, 0) + Call(PlaySoundAtNpc, NPC_Raven_05, SOUND_RAVEN_FALL_B, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Raven_05, 737, 200, 65, 100) + Call(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Idle) + Call(EnableNpcShadow, NPC_Raven_05, TRUE) + ExecWait(N(EVS_Raven5_MoveToMeetingPos)) + Wait(20) + Call(InterpPlayerYaw, 350, 4) + Call(SpeakToPlayer, NPC_SELF, ANIM_RaphaelRaven_TalkNoFeet, ANIM_RaphaelRaven_IdleNoFeet, 5, MSG_CH5_00DD) + Call(SpeakToPlayer, NPC_SELF, ANIM_RaphaelRaven_TalkNoFeet, ANIM_RaphaelRaven_IdleNoFeet, 5, MSG_CH5_00DE) + ExecWait(N(EVS_Ravens_Converse)) + Call(SpeakToPlayer, NPC_SELF, ANIM_RaphaelRaven_TalkNoFeet, ANIM_RaphaelRaven_IdleNoFeet, 5, MSG_CH5_00DF) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, 535, 200, 215) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.5 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(20 * DT) + Thread + Wait(20 * DT) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.0)) + Wait(15 * DT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_RAVEN_FALL_A, SOUND_SPACE_DEFAULT) + EndThread + Thread + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Call(SetNpcAnimation, NPC_SELF, ANIM_RaphaelRaven_Walk) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar0, -70) + Add(LVar1, -7) + Add(LVar2, 175) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 20 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_RaphaelRaven_Idle) + Call(SetNpcJumpscale, NPC_SELF, Float(1.5)) + Call(SetNpcAnimation, NPC_SELF, ANIM_RaphaelRaven_Walk) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar0, -100) + Add(LVar1, -300) + Add(LVar2, 175) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 30 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_RaphaelRaven_Idle) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) + EndThread + Wait(40 * DT) + Thread + Wait(35 * DT) + Call(PlaySoundAtNpc, NPC_Raven_01, SOUND_RAVEN_FALL_B, SOUND_SPACE_DEFAULT) + EndThread + Thread + Call(SetNpcFlagBits, NPC_Raven_01, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Walk) + Call(GetNpcPos, NPC_Raven_01, LVar0, LVar1, LVar2) + Add(LVar0, -40) + Add(LVar2, 154) + Call(NpcMoveTo, NPC_Raven_01, LVar0, LVar2, 20 * DT) + Call(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Idle) + Call(SetNpcJumpscale, NPC_Raven_01, Float(1.5)) + Call(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Walk) + Call(GetNpcPos, NPC_Raven_01, LVar0, LVar1, LVar2) + Add(LVar0, -20) + Add(LVar1, -300) + Add(LVar2, 154) + Call(NpcJump0, NPC_Raven_01, LVar0, LVar1, LVar2, 30 * DT) + Call(SetNpcAnimation, NPC_Raven_01, ANIM_Raven_Idle) + Call(SetNpcPos, NPC_Raven_01, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_Raven_01, NPC_FLAG_GRAVITY, FALSE) + EndThread + Wait(20 * DT) + Thread + Wait(35 * DT) + Call(PlaySoundAtNpc, NPC_Raven_02, SOUND_RAVEN_FALL_C, SOUND_SPACE_DEFAULT) + EndThread + Thread + Call(SetNpcFlagBits, NPC_Raven_02, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Walk) + Call(GetNpcPos, NPC_Raven_02, LVar0, LVar1, LVar2) + Add(LVar0, -55) + Add(LVar2, 110) + Call(NpcMoveTo, NPC_Raven_02, LVar0, LVar2, 20 * DT) + Call(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Idle) + Call(SetNpcJumpscale, NPC_Raven_02, Float(1.5)) + Call(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Walk) + Call(GetNpcPos, NPC_Raven_02, LVar0, LVar1, LVar2) + Add(LVar0, -40) + Add(LVar1, -300) + Add(LVar2, 110) + Call(NpcJump0, NPC_Raven_02, LVar0, LVar1, LVar2, 30 * DT) + Call(SetNpcAnimation, NPC_Raven_02, ANIM_Raven_Idle) + Call(SetNpcPos, NPC_Raven_02, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_Raven_02, NPC_FLAG_GRAVITY, FALSE) + EndThread + Wait(20 * DT) + Thread + Wait(35 * DT) + Call(PlaySoundAtNpc, NPC_Raven_03, SOUND_RAVEN_FALL_A, SOUND_SPACE_DEFAULT) + EndThread + Thread + Call(SetNpcFlagBits, NPC_Raven_03, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Walk) + Call(GetNpcPos, NPC_Raven_03, LVar0, LVar1, LVar2) + Add(LVar0, -75) + Add(LVar2, 134) + Call(NpcMoveTo, NPC_Raven_03, LVar0, LVar2, 20 * DT) + Call(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Idle) + Call(SetNpcJumpscale, NPC_Raven_03, Float(1.5)) + Call(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Walk) + Call(GetNpcPos, NPC_Raven_03, LVar0, LVar1, LVar2) + Add(LVar0, -70) + Add(LVar1, -300) + Add(LVar2, 134) + Call(NpcJump0, NPC_Raven_03, LVar0, LVar1, LVar2, 30 * DT) + Call(SetNpcAnimation, NPC_Raven_03, ANIM_Raven_Idle) + Call(SetNpcPos, NPC_Raven_03, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_Raven_03, NPC_FLAG_GRAVITY, FALSE) + EndThread + Wait(20 * DT) + Thread + Wait(35 * DT) + Call(PlaySoundAtNpc, NPC_Raven_04, SOUND_RAVEN_FALL_B, SOUND_SPACE_DEFAULT) + EndThread + Thread + Call(SetNpcFlagBits, NPC_Raven_04, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Walk) + Call(GetNpcPos, NPC_Raven_04, LVar0, LVar1, LVar2) + Add(LVar0, -110) + Add(LVar2, 115) + Call(NpcMoveTo, NPC_Raven_04, LVar0, LVar2, 20 * DT) + Call(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Idle) + Call(SetNpcJumpscale, NPC_Raven_04, Float(1.5)) + Call(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Walk) + Call(GetNpcPos, NPC_Raven_04, LVar0, LVar1, LVar2) + Add(LVar0, -110) + Add(LVar1, -300) + Add(LVar2, 115) + Call(NpcJump0, NPC_Raven_04, LVar0, LVar1, LVar2, 30 * DT) + Call(SetNpcAnimation, NPC_Raven_04, ANIM_Raven_Idle) + Call(SetNpcPos, NPC_Raven_04, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_Raven_04, NPC_FLAG_GRAVITY, FALSE) + EndThread + Wait(10 * DT) + Thread + Wait(45 * DT) + Call(PlaySoundAtNpc, NPC_Raven_05, SOUND_RAVEN_FALL_C, SOUND_SPACE_DEFAULT) + EndThread + Call(SetNpcFlagBits, NPC_Raven_05, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Walk) + Call(GetNpcPos, NPC_Raven_05, LVar0, LVar1, LVar2) + Add(LVar0, -100) + Add(LVar2, 161) + Call(NpcMoveTo, NPC_Raven_05, LVar0, LVar2, 30 * DT) + Thread + Call(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Idle) + Call(SetNpcJumpscale, NPC_Raven_05, Float(1.5)) + Call(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Walk) + Call(GetNpcPos, NPC_Raven_05, LVar0, LVar1, LVar2) + Add(LVar0, -70) + Add(LVar1, -500) + Add(LVar2, 161) + Call(NpcJump0, NPC_Raven_05, LVar0, LVar1, LVar2, 35 * DT) + Call(SetNpcAnimation, NPC_Raven_05, ANIM_Raven_Idle) + Call(SetNpcPos, NPC_Raven_05, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_Raven_05, NPC_FLAG_GRAVITY, FALSE) + EndThread + Call(SetPanTarget, CAM_DEFAULT, 550, -150, 400) + Call(SetCamDistance, CAM_DEFAULT, 580) + Call(SetCamPitch, CAM_DEFAULT, Float(16.0), Float(-4.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.8 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(15 * DT) + Call(ResetCam, CAM_DEFAULT, Float(2.0 * DT)) + Set(GB_StoryProgress, STORY_CH5_RAPHAEL_LEFT_NEST) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_RaphaelRaven_After) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RaphaelRaven_TalkNoFeet, ANIM_RaphaelRaven_IdleNoFeet, 0, MSG_CH5_00E0) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_RaphaelRaven_TalkNoFeet, ANIM_RaphaelRaven_IdleNoFeet, 0, MSG_CH5_00E0) + Return + End }; EvtScript N(EVS_NpcInit_RaphaelRaven) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_RaphaelRaven_IdleNoFeet) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_RAPHAEL_LEFT_NEST) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_RaphaelRaven_Before))) - EVT_CASE_GE(STORY_CH5_ZIP_LINE_READY) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_RaphaelRaven_After))) - EVT_CASE_DEFAULT - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_RaphaelRaven_IdleNoFeet) + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_RAPHAEL_LEFT_NEST) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_RaphaelRaven_Before))) + CaseGe(STORY_CH5_ZIP_LINE_READY) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_RaphaelRaven_After))) + CaseDefault + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Raven_01) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInit_Raven_02) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInit_Raven_03) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInit_Raven_04) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInit_Raven_05) = { - EVT_RETURN - EVT_END + Return + End }; NpcData N(NpcData_Ravens)[] = { diff --git a/src/world/area_kgr/kgr_01/kgr_01_1_main.c b/src/world/area_kgr/kgr_01/kgr_01_1_main.c index c599b1ce965..0ef39722b5b 100644 --- a/src/world/area_kgr/kgr_01/kgr_01_1_main.c +++ b/src/world/area_kgr/kgr_01/kgr_01_1_main.c @@ -22,24 +22,24 @@ EvtScript N(EVS_ExitWalk_kgr_02_0) = EVT_EXIT_WALK(60, kgr_01_ENTRY_1, "kgr_02", EvtScript N(EVS_ExitWalk_mac_05_3) = EVT_EXIT_WALK(60, kgr_01_ENTRY_0, "mac_05", mac_05_ENTRY_3); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(N(EVS_ExitWalk_kgr_02_0), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(N(EVS_ExitWalk_mac_05_3), TRIGGER_WALL_PUSH, COLLIDER_o50, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(N(EVS_ExitWalk_kgr_02_0), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(N(EVS_ExitWalk_mac_05_3), TRIGGER_WALL_PUSH, COLLIDER_o50, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(HidePlayerShadow, TRUE) - EVT_CALL(EnableNpcShadow, NPC_PARTNER, FALSE) - EVT_EXEC(N(EVS_StartTongueWiggle)) - EVT_CALL(GetEntryID, LVar0) - EVT_SET(LVar0, N(EVS_BindExitTriggers)) - EVT_EXEC(EnterWalk) - EVT_EXEC(N(EVS_CreateDarkness)) - EVT_EXEC(N(EVS_MonitorFriendlyFire)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TOAD_TOWN) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(HidePlayerShadow, TRUE) + Call(EnableNpcShadow, NPC_PARTNER, FALSE) + Exec(N(EVS_StartTongueWiggle)) + Call(GetEntryID, LVar0) + Set(LVar0, N(EVS_BindExitTriggers)) + Exec(EnterWalk) + Exec(N(EVS_CreateDarkness)) + Exec(N(EVS_MonitorFriendlyFire)) + Return + End }; diff --git a/src/world/area_kgr/kgr_01/kgr_01_2_wiggle.c b/src/world/area_kgr/kgr_01/kgr_01_2_wiggle.c index 6c412e1a4a3..89869df9958 100644 --- a/src/world/area_kgr/kgr_01/kgr_01_2_wiggle.c +++ b/src/world/area_kgr/kgr_01/kgr_01_2_wiggle.c @@ -85,31 +85,31 @@ API_CALLABLE(N(GetEffectiveTongueOffset)) { percent = 100.0f; } amplitude = (amplitude * percent) / 100.0f; - script->varTable[0] = EVT_FLOAT_TO_FIXED(amplitude); + script->varTable[0] = Float_TO_FIXED(amplitude); return ApiStatus_DONE2; } EvtScript N(EVS_WiggleTongue) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(N(GetEffectiveTongueOffset)) - EVT_CALL(TranslateModel, TONGUE_COPY_MODEL_ID, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_sita) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(N(GetEffectiveTongueOffset)) + Call(TranslateModel, TONGUE_COPY_MODEL_ID, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_sita) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_StartTongueWiggle) = { - EVT_CALL(CloneModel, MODEL_sita, TONGUE_COPY_MODEL_ID) - EVT_CALL(ParentColliderToModel, COLLIDER_sita, TONGUE_COPY_MODEL_ID) - EVT_CALL(EnableModel, TONGUE_COPY_MODEL_ID, FALSE) - EVT_EXEC(N(EVS_WiggleTongue)) - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_1, MODEL_sita, TRUE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(make_tongue_gfx)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_sita, CUSTOM_GFX_1, -1) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_RETURN - EVT_END + Call(CloneModel, MODEL_sita, TONGUE_COPY_MODEL_ID) + Call(ParentColliderToModel, COLLIDER_sita, TONGUE_COPY_MODEL_ID) + Call(EnableModel, TONGUE_COPY_MODEL_ID, FALSE) + Exec(N(EVS_WiggleTongue)) + Call(MakeLocalVertexCopy, VTX_COPY_1, MODEL_sita, TRUE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_1, Ref(N(make_tongue_gfx)), NULL) + Call(SetModelCustomGfx, MODEL_sita, CUSTOM_GFX_1, -1) + Call(HidePlayerShadow, TRUE) + Return + End }; diff --git a/src/world/area_kgr/kgr_01/kgr_01_3_extra.c b/src/world/area_kgr/kgr_01/kgr_01_3_extra.c index ffc6959d0a7..b1e5007d7ff 100644 --- a/src/world/area_kgr/kgr_01/kgr_01_3_extra.c +++ b/src/world/area_kgr/kgr_01/kgr_01_3_extra.c @@ -9,25 +9,25 @@ API_CALLABLE(N(HasBombetteExploded)) { // watch for things that can hurt the whale and tell the player to knock it off EvtScript N(EVS_MonitorFriendlyFire) = { - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_CALL(GetPlayerActionState, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ACTION_STATE_HAMMER) - EVT_WAIT(10) - EVT_SET(LVar1, TRUE) - EVT_CASE_EQ(ACTION_STATE_SPIN_POUND) - EVT_SET(LVar1, TRUE) - EVT_END_SWITCH - EVT_CALL(N(HasBombetteExploded)) - EVT_IF_NE(LVar1, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_MAC_Port_0099, SCREEN_WIDTH / 2, SCREEN_HEIGHT / 6) - EVT_SET(LVar1, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVar1, 0) + Loop(0) + Call(GetPlayerActionState, LVar0) + Switch(LVar0) + CaseEq(ACTION_STATE_HAMMER) + Wait(10) + Set(LVar1, TRUE) + CaseEq(ACTION_STATE_SPIN_POUND) + Set(LVar1, TRUE) + EndSwitch + Call(N(HasBombetteExploded)) + IfNe(LVar1, 0) + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_MAC_Port_0099, SCREEN_WIDTH / 2, SCREEN_HEIGHT / 6) + Set(LVar1, 0) + Call(DisablePlayerInput, FALSE) + EndIf + Wait(1) + EndLoop + Return + End }; diff --git a/src/world/area_kgr/kgr_02/kgr_02_1_main.c b/src/world/area_kgr/kgr_02/kgr_02_1_main.c index c5a6942aac8..4b53ef33a2f 100644 --- a/src/world/area_kgr/kgr_02/kgr_02_1_main.c +++ b/src/world/area_kgr/kgr_02/kgr_02_1_main.c @@ -22,21 +22,21 @@ MapSettings N(settings) = { EvtScript N(EVS_ExitWalk_kgr_01_1) = EVT_EXIT_WALK(60, kgr_02_ENTRY_0, "kgr_01", kgr_01_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(N(EVS_ExitWalk_kgr_01_1), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(N(EVS_ExitWalk_kgr_01_1), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_SET(LVar0, N(EVS_BindExitTriggers)) - EVT_EXEC(EnterWalk) - EVT_EXEC(N(EVS_Dummy)) - EVT_EXEC(N(EVS_CreateDarkness)) - EVT_EXEC(N(EVS_MonitorFriendlyFire)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TOAD_TOWN) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Set(LVar0, N(EVS_BindExitTriggers)) + Exec(EnterWalk) + Exec(N(EVS_Dummy)) + Exec(N(EVS_CreateDarkness)) + Exec(N(EVS_MonitorFriendlyFire)) + Return + End }; diff --git a/src/world/area_kgr/kgr_02/kgr_02_3_npc.c b/src/world/area_kgr/kgr_02/kgr_02_3_npc.c index 32f7d26482c..4c2b3b68395 100644 --- a/src/world/area_kgr/kgr_02/kgr_02_3_npc.c +++ b/src/world/area_kgr/kgr_02/kgr_02_3_npc.c @@ -20,260 +20,260 @@ API_CALLABLE(N(AwaitPartnerNotWatt)) { s32 N(D_80240970_8AADC0) = 0; EvtScript N(EVS_Dummy) = { - EVT_WAIT(1) - EVT_RETURN - EVT_END + Wait(1) + Return + End }; EvtScript N(EVS_Flotsam_Bobbing) = { - EVT_LOOP(0) - EVT_CALL(MakeLerp, 0, -10, 25, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, LVar2, 0, LVar0, 0) - EVT_CALL(TranslateModel, LVar3, 0, LVar0, 0) - EVT_CALL(TranslateModel, LVar4, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, -10, 0, 30, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, LVar2, 0, LVar0, 0) - EVT_CALL(TranslateModel, LVar3, 0, LVar0, 0) - EVT_CALL(TranslateModel, LVar4, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(MakeLerp, 0, -10, 25, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, LVar2, 0, LVar0, 0) + Call(TranslateModel, LVar3, 0, LVar0, 0) + Call(TranslateModel, LVar4, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, -10, 0, 30, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, LVar2, 0, LVar0, 0) + Call(TranslateModel, LVar3, 0, LVar0, 0) + Call(TranslateModel, LVar4, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_SetupFlotsam) = { - EVT_SET(LVar2, MODEL_hako1) - EVT_SET(LVar3, MODEL_bin2) - EVT_SET(LVar4, MODEL_hako4) - EVT_EXEC_GET_TID(N(EVS_Flotsam_Bobbing), LVarA) - EVT_WAIT(5) - EVT_SET(LVar2, MODEL_bin1) - EVT_SET(LVar3, MODEL_hako6) - EVT_SET(LVar4, MODEL_hako5) - EVT_EXEC_GET_TID(N(EVS_Flotsam_Bobbing), LVarB) - EVT_WAIT(5) - EVT_SET(LVar2, MODEL_hako2) - EVT_SET(LVar3, MODEL_hako3) - EVT_SET(LVar4, MODEL_bin4) - EVT_EXEC_GET_TID(N(EVS_Flotsam_Bobbing), LVarC) - EVT_WAIT(5) - EVT_SET(LVar2, MODEL_fune_s) - EVT_SET(LVar3, MODEL_fune_u) - EVT_SET(LVar4, MODEL_bin3) - EVT_EXEC_GET_TID(N(EVS_Flotsam_Bobbing), LVarD) - EVT_CALL(SetNpcVar, NPC_Fuzzipede, 2, 0) - EVT_LOOP(0) - EVT_CALL(GetNpcVar, NPC_Fuzzipede, 2, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_KILL_THREAD(LVarA) - EVT_KILL_THREAD(LVarB) - EVT_KILL_THREAD(LVarC) - EVT_KILL_THREAD(LVarD) - EVT_RETURN - EVT_END + Set(LVar2, MODEL_hako1) + Set(LVar3, MODEL_bin2) + Set(LVar4, MODEL_hako4) + ExecGetTID(N(EVS_Flotsam_Bobbing), LVarA) + Wait(5) + Set(LVar2, MODEL_bin1) + Set(LVar3, MODEL_hako6) + Set(LVar4, MODEL_hako5) + ExecGetTID(N(EVS_Flotsam_Bobbing), LVarB) + Wait(5) + Set(LVar2, MODEL_hako2) + Set(LVar3, MODEL_hako3) + Set(LVar4, MODEL_bin4) + ExecGetTID(N(EVS_Flotsam_Bobbing), LVarC) + Wait(5) + Set(LVar2, MODEL_fune_s) + Set(LVar3, MODEL_fune_u) + Set(LVar4, MODEL_bin3) + ExecGetTID(N(EVS_Flotsam_Bobbing), LVarD) + Call(SetNpcVar, NPC_Fuzzipede, 2, 0) + Loop(0) + Call(GetNpcVar, NPC_Fuzzipede, 2, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + KillThread(LVarA) + KillThread(LVarB) + KillThread(LVarC) + KillThread(LVarD) + Return + End }; EvtScript N(EVS_Fuzzipede_ReactToLight) = { - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_CALL(WaitForPlayerInputEnabled) - EVT_LOOP(0) - EVT_IF_EQ(LVarA, 0) - EVT_CALL(N(AwaitPartnerWatt)) - EVT_IF_EQ(LVarB, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 0) - EVT_ADD(LVar0, 80) - EVT_ELSE - EVT_ADD(LVar0, -80) - EVT_END_IF - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, 0, 20) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Fuzzipede_Anim24, ANIM_Fuzzipede_Anim04, 0, MSG_MAC_Port_009B) - EVT_CALL(SetSelfVar, 0, 1) - EVT_SET(LVarB, 1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP, 0) - EVT_SET(LVarA, 1) - EVT_ELSE - EVT_CALL(N(AwaitPartnerNotWatt)) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP, 1) - EVT_SET(LVarA, 0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVarA, 0) + Set(LVarB, 0) + Call(WaitForPlayerInputEnabled) + Loop(0) + IfEq(LVarA, 0) + Call(N(AwaitPartnerWatt)) + IfEq(LVarB, 0) + Call(DisablePlayerInput, TRUE) + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, 0) + Add(LVar0, 80) + Else + Add(LVar0, -80) + EndIf + Call(NpcJump0, NPC_SELF, LVar0, 0, 0, 20) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 10) + Call(SpeakToPlayer, NPC_SELF, ANIM_Fuzzipede_Anim24, ANIM_Fuzzipede_Anim04, 0, MSG_MAC_Port_009B) + Call(SetSelfVar, 0, 1) + Set(LVarB, 1) + Call(DisablePlayerInput, FALSE) + EndIf + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP, 0) + Set(LVarA, 1) + Else + Call(N(AwaitPartnerNotWatt)) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP, 1) + Set(LVarA, 0) + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_Fuzzipede_JumpAround) = { - EVT_LOOP(0) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZIPEDE_MOTION, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, -100, 80, -80, 20) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZIPEDE_MOTION, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 100, 80, -80, 20) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZIPEDE_MOTION, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 30, 40, -80, 20) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZIPEDE_MOTION, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 135, 15, -100, 20) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZIPEDE_MOTION, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 30, 0, 0, 20) - EVT_WAIT(10) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZIPEDE_MOTION, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, -100, 80, -80, 20) + Wait(10) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZIPEDE_MOTION, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 100, 80, -80, 20) + Wait(10) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZIPEDE_MOTION, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 30, 40, -80, 20) + Wait(10) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZIPEDE_MOTION, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 135, 15, -100, 20) + Wait(10) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZIPEDE_MOTION, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 30, 0, 0, 20) + Wait(10) + EndLoop + Return + End }; EvtScript N(EVS_NpcAI_Fuzzipede) = { - EVT_EXEC(N(EVS_SetupFlotsam)) - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_EXEC_GET_TID(N(EVS_Fuzzipede_JumpAround), LVarA) - EVT_CALL(SetSelfVar, 3, LVarA) - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 1, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000, 0) - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_RETURN - EVT_END + Exec(N(EVS_SetupFlotsam)) + Loop(0) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + ExecGetTID(N(EVS_Fuzzipede_JumpAround), LVarA) + Call(SetSelfVar, 3, LVarA) + Loop(0) + Call(GetSelfVar, 1, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000, 0) + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Return + End }; EvtScript N(EVS_NpcHit_Fuzzipede) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetSelfVar, 3, LVar0) - EVT_KILL_THREAD(LVar0) - EVT_CALL(SetSelfVar, 1, 1) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(GetSelfVar, 3, LVar0) + KillThread(LVar0) + Call(SetSelfVar, 1, 1) + Return + End }; EvtScript N(EVS_NpcDefeat_Fuzzipede) = { - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(SetPlayerPos, -40, 0, 0) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, TRUE) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, 30, 0, 0) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -5, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -5, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Fuzzipede_Anim24, ANIM_Fuzzipede_Anim04, 0, MSG_MAC_Port_009D) - EVT_WAIT(10) - EVT_CALL(ShowMessageAtScreenPos, MSG_MAC_Port_009E, -300, 100) - EVT_WAIT(10) - EVT_CALL(FadeOutMusic, 0, 1000) - EVT_CALL(SetSelfVar, 2, 1) - EVT_THREAD - EVT_CALL(PlaySound, SOUND_WHALE_FILL) - EVT_SET(LVar0, 0) - EVT_LOOP(150) - EVT_ADD(LVar0, 1) - EVT_CALL(TranslateGroup, MODEL_mizu, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_hako1, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_hako2, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_hako3, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_hako6, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_bin1, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_bin2, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_bin3, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_bin4, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(75) - EVT_ADD(LVar0, 1) - EVT_CALL(TranslateGroup, MODEL_fune, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_hako4, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_hako5, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_CALL(EnableNpcShadow, NPC_PARTNER, FALSE) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Flail) - EVT_CALL(GetPlayerPos, LVar1, LVar0, LVar3) - EVT_LOOP(150) - EVT_ADD(LVar0, 1) - EVT_CALL(SetPlayerPos, LVar1, LVar0, LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(GetNpcPos, NPC_Fuzzipede, LVar1, LVar0, LVar3) - EVT_LOOP(150) - EVT_ADD(LVar0, 1) - EVT_CALL(SetNpcPos, NPC_SELF, LVar1, LVar0, LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CHILD_THREAD - EVT_LOOP(0) - EVT_CALL(InterpNpcYaw, NPC_Fuzzipede, 90, 7) - EVT_WAIT(10) - EVT_CALL(InterpNpcYaw, NPC_Fuzzipede, 270, 7) - EVT_WAIT(10) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_WAIT(120) - EVT_CALL(GotoMap, EVT_PTR("mac_05"), mac_05_ENTRY_2) - EVT_WAIT(100) - EVT_CALL(InterruptUsePartner) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(SetPlayerPos, -40, 0, 0) + Call(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, TRUE) + Call(InterpPlayerYaw, 90, 0) + Call(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, FALSE) + Call(SetNpcPos, NPC_SELF, 30, 0, 0) + Call(SetNpcYaw, NPC_SELF, 270) + Call(UseSettingsFrom, CAM_DEFAULT, -5, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, -5, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Fuzzipede_Anim24, ANIM_Fuzzipede_Anim04, 0, MSG_MAC_Port_009D) + Wait(10) + Call(ShowMessageAtScreenPos, MSG_MAC_Port_009E, -300, 100) + Wait(10) + Call(FadeOutMusic, 0, 1000) + Call(SetSelfVar, 2, 1) + Thread + Call(PlaySound, SOUND_WHALE_FILL) + Set(LVar0, 0) + Loop(150) + Add(LVar0, 1) + Call(TranslateGroup, MODEL_mizu, 0, LVar0, 0) + Call(TranslateModel, MODEL_hako1, 0, LVar0, 0) + Call(TranslateModel, MODEL_hako2, 0, LVar0, 0) + Call(TranslateModel, MODEL_hako3, 0, LVar0, 0) + Call(TranslateModel, MODEL_hako6, 0, LVar0, 0) + Call(TranslateModel, MODEL_bin1, 0, LVar0, 0) + Call(TranslateModel, MODEL_bin2, 0, LVar0, 0) + Call(TranslateModel, MODEL_bin3, 0, LVar0, 0) + Call(TranslateModel, MODEL_bin4, 0, LVar0, 0) + Wait(1) + EndLoop + EndThread + Thread + Set(LVar0, 0) + Loop(75) + Add(LVar0, 1) + Call(TranslateGroup, MODEL_fune, 0, LVar0, 0) + Call(TranslateModel, MODEL_hako4, 0, LVar0, 0) + Call(TranslateModel, MODEL_hako5, 0, LVar0, 0) + Wait(1) + EndLoop + EndThread + Thread + Wait(20) + Call(HidePlayerShadow, TRUE) + Call(EnableNpcShadow, NPC_PARTNER, FALSE) + Call(SetPlayerAnimation, ANIM_MarioW2_Flail) + Call(GetPlayerPos, LVar1, LVar0, LVar3) + Loop(150) + Add(LVar0, 1) + Call(SetPlayerPos, LVar1, LVar0, LVar3) + Wait(1) + EndLoop + EndThread + Thread + Wait(20) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(GetNpcPos, NPC_Fuzzipede, LVar1, LVar0, LVar3) + Loop(150) + Add(LVar0, 1) + Call(SetNpcPos, NPC_SELF, LVar1, LVar0, LVar3) + Wait(1) + EndLoop + EndThread + ChildThread + Loop(0) + Call(InterpNpcYaw, NPC_Fuzzipede, 90, 7) + Wait(10) + Call(InterpNpcYaw, NPC_Fuzzipede, 270, 7) + Wait(10) + EndLoop + EndChildThread + Wait(120) + Call(GotoMap, Ref("mac_05"), mac_05_ENTRY_2) + Wait(100) + Call(InterruptUsePartner) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcAuxAI_Fuzzipede) = { - EVT_CALL(SetNpcPos, NPC_SELF, 100, 80, -80) - EVT_EXEC(N(EVS_Fuzzipede_ReactToLight)) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, 100, 80, -80) + Exec(N(EVS_Fuzzipede_ReactToLight)) + Return + End }; NpcSettings N(NpcSettings_Fuzzipede) = { diff --git a/src/world/area_kgr/kgr_02/kgr_02_4_extra.c b/src/world/area_kgr/kgr_02/kgr_02_4_extra.c index 9481d7116e4..d6f3c9d4b68 100644 --- a/src/world/area_kgr/kgr_02/kgr_02_4_extra.c +++ b/src/world/area_kgr/kgr_02/kgr_02_4_extra.c @@ -8,25 +8,25 @@ API_CALLABLE(N(HasBombetteExploded)) { } EvtScript N(EVS_MonitorFriendlyFire) = { - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_CALL(GetPlayerActionState, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ACTION_STATE_HAMMER) - EVT_WAIT(10) - EVT_SET(LVar1, TRUE) - EVT_CASE_EQ(ACTION_STATE_SPIN_POUND) - EVT_SET(LVar1, TRUE) - EVT_END_SWITCH - EVT_CALL(N(HasBombetteExploded)) - EVT_IF_NE(LVar1, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_MAC_Port_009A, 160, 40) - EVT_SET(LVar1, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVar1, 0) + Loop(0) + Call(GetPlayerActionState, LVar0) + Switch(LVar0) + CaseEq(ACTION_STATE_HAMMER) + Wait(10) + Set(LVar1, TRUE) + CaseEq(ACTION_STATE_SPIN_POUND) + Set(LVar1, TRUE) + EndSwitch + Call(N(HasBombetteExploded)) + IfNe(LVar1, 0) + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_MAC_Port_009A, 160, 40) + Set(LVar1, 0) + Call(DisablePlayerInput, FALSE) + EndIf + Wait(1) + EndLoop + Return + End }; diff --git a/src/world/area_kkj/kkj_00/kkj_00_1_music.c b/src/world/area_kkj/kkj_00/kkj_00_1_music.c index 33288c3afac..319953444d6 100644 --- a/src/world/area_kkj/kkj_00/kkj_00_1_music.c +++ b/src/world/area_kkj/kkj_00/kkj_00_1_music.c @@ -1,19 +1,19 @@ #include "kkj_00.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_EQ(GB_StoryProgress, STORY_INTRO) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kkj_00_ENTRY_3) - EVT_CALL(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 7) - EVT_WAIT(3) - EVT_END_IF - EVT_CALL(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 8) - EVT_ELSE - EVT_THREAD - EVT_WAIT(90) - EVT_CALL(FadeOutMusic, 0, 3000) - EVT_END_THREAD - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_INTRO) + Call(GetEntryID, LVar0) + IfEq(LVar0, kkj_00_ENTRY_3) + Call(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 7) + Wait(3) + EndIf + Call(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 8) + Else + Thread + Wait(90) + Call(FadeOutMusic, 0, 3000) + EndThread + EndIf + Return + End }; diff --git a/src/world/area_kkj/kkj_00/kkj_00_2_main.c b/src/world/area_kkj/kkj_00/kkj_00_2_main.c index bb79ab91c69..e72d52f8567 100644 --- a/src/world/area_kkj/kkj_00/kkj_00_2_main.c +++ b/src/world/area_kkj/kkj_00/kkj_00_2_main.c @@ -1,103 +1,103 @@ #include "kkj_00.h" EvtScript N(D_80241140_ABC3D0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE) - EVT_SET(LVar0, kkj_00_ENTRY_1) - EVT_SET(LVar1, COLLIDER_ttn) - EVT_SET(LVar2, MODEL_door3) - EVT_SET(LVar3, MODEL_door4) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kkj_01"), kkj_01_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_LARGE) + Set(LVar0, kkj_00_ENTRY_1) + Set(LVar1, COLLIDER_ttn) + Set(LVar2, MODEL_door3) + Set(LVar3, MODEL_door4) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("kkj_01"), kkj_01_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(D_802411F4_ABC484) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, kkj_00_ENTRY_3) - EVT_SET(LVar1, COLLIDER_ttne) - EVT_SET(LVar2, MODEL_door8) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kkj_19"), kkj_19_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, kkj_00_ENTRY_3) + Set(LVar1, COLLIDER_ttne) + Set(LVar2, MODEL_door8) + Set(LVar3, DOOR_SWING_OUT) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("kkj_19"), kkj_19_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ShowMessage_CantOpen) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_DoesntOpen, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_Inspect_DoesntOpen, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(D_802412F0_ABC580) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(EnableNpcAI, NPC_Luigi, FALSE) - EVT_CALL(EnableNpcAI, NPC_Toad_01, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Luigi, ANIM_Luigi_Idle) - EVT_CALL(SetNpcAnimation, NPC_Toad_01, ANIM_Toad_Red_Idle) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Luigi, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 16, MSG_Intro_0026) - EVT_CALL(EnableNpcAI, NPC_Luigi, TRUE) - EVT_CALL(EnableNpcAI, NPC_Toad_01, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(EnableNpcAI, NPC_Luigi, FALSE) + Call(EnableNpcAI, NPC_Toad_01, FALSE) + Call(SetNpcAnimation, NPC_Luigi, ANIM_Luigi_Idle) + Call(SetNpcAnimation, NPC_Toad_01, ANIM_Toad_Red_Idle) + Wait(10) + Call(SpeakToPlayer, NPC_Luigi, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 16, MSG_Intro_0026) + Call(EnableNpcAI, NPC_Luigi, TRUE) + Call(EnableNpcAI, NPC_Toad_01, TRUE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(D_802413C4_ABC654) = { - EVT_BIND_TRIGGER(EVT_PTR(N(D_802412F0_ABC580)), TRIGGER_WALL_PRESS_A, COLLIDER_tts, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShowMessage_CantOpen)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShowMessage_CantOpen)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(D_80241140_ABC3D0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttn, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(D_802411F4_ABC484)), TRIGGER_WALL_PRESS_A, COLLIDER_ttne, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(D_802412F0_ABC580)), TRIGGER_WALL_PRESS_A, COLLIDER_tts, 1, 0) + BindTrigger(Ref(N(EVS_ShowMessage_CantOpen)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + BindTrigger(Ref(N(EVS_ShowMessage_CantOpen)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + BindTrigger(Ref(N(D_80241140_ABC3D0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttn, 1, 0) + BindTrigger(Ref(N(D_802411F4_ABC484)), TRIGGER_WALL_PRESS_A, COLLIDER_ttne, 1, 0) + Return + End }; EvtScript N(D_80241460_ABC6F0) = { - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kkj_00_ENTRY_0) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE) - EVT_SET(LVar2, MODEL_door2) - EVT_SET(LVar3, MODEL_door1) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(kkj_00_ENTRY_1) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE) - EVT_SET(LVar2, MODEL_door3) - EVT_SET(LVar3, MODEL_door4) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(kkj_00_ENTRY_2) - EVT_SET(LVar2, MODEL_door5) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_CASE_EQ(kkj_00_ENTRY_3) - EVT_SET(LVar2, MODEL_door8) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_CASE_EQ(kkj_00_ENTRY_4) - EVT_SET(LVar2, MODEL_door7) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_CASE_EQ(kkj_00_ENTRY_5) - EVT_EXEC(N(EVS_Scene_Intro)) - EVT_CASE_EQ(kkj_00_ENTRY_6) - EVT_EXEC(N(EVS_Scene_Ending)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kkj_00_ENTRY_0) + Call(UseDoorSounds, DOOR_SOUNDS_LARGE) + Set(LVar2, MODEL_door2) + Set(LVar3, MODEL_door1) + ExecWait(EnterDoubleDoor) + CaseEq(kkj_00_ENTRY_1) + Call(UseDoorSounds, DOOR_SOUNDS_LARGE) + Set(LVar2, MODEL_door3) + Set(LVar3, MODEL_door4) + ExecWait(EnterDoubleDoor) + CaseEq(kkj_00_ENTRY_2) + Set(LVar2, MODEL_door5) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSingleDoor) + CaseEq(kkj_00_ENTRY_3) + Set(LVar2, MODEL_door8) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSingleDoor) + CaseEq(kkj_00_ENTRY_4) + Set(LVar2, MODEL_door7) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSingleDoor) + CaseEq(kkj_00_ENTRY_5) + Exec(N(EVS_Scene_Intro)) + CaseEq(kkj_00_ENTRY_6) + Exec(N(EVS_Scene_Ending)) + EndSwitch + Return + End }; SlideParams N(SlideData1) = { @@ -131,39 +131,39 @@ API_CALLABLE(N(func_80240040_ABB2D0)) { } EvtScript N(D_8024164C_ABC8DC) = { - EVT_CALL(N(func_80240040_ABB2D0), 0) - EVT_RETURN - EVT_END + Call(N(func_80240040_ABB2D0), 0) + Return + End }; EvtScript N(EVS_8024166C) = { - EVT_CALL(N(func_80240040_ABB2D0), 1) - EVT_RETURN - EVT_END + Call(N(func_80240040_ABB2D0), 1) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PEACH_CASTLE_GROUNDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_IF_EQ(GB_StoryProgress, STORY_INTRO) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(IntroNPCs))) - EVT_ELSE - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(EndingNPCs))) - EVT_END_IF - EVT_CALL(EnableGroup, MODEL_g2, FALSE) - EVT_CALL(EnableGroup, MODEL_g51, FALSE) - EVT_IF_EQ(GB_StoryProgress, STORY_INTRO) - EVT_CALL(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 8) - EVT_ELSE - EVT_THREAD - EVT_WAIT(90) - EVT_CALL(FadeOutMusic, 0, 3000) - EVT_END_THREAD - EVT_END_IF - EVT_EXEC(N(D_802413C4_ABC654)) - EVT_EXEC(N(D_80241460_ABC6F0)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_PEACH_CASTLE_GROUNDS) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + IfEq(GB_StoryProgress, STORY_INTRO) + Call(MakeNpcs, FALSE, Ref(N(IntroNPCs))) + Else + Call(MakeNpcs, FALSE, Ref(N(EndingNPCs))) + EndIf + Call(EnableGroup, MODEL_g2, FALSE) + Call(EnableGroup, MODEL_g51, FALSE) + IfEq(GB_StoryProgress, STORY_INTRO) + Call(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 8) + Else + Thread + Wait(90) + Call(FadeOutMusic, 0, 3000) + EndThread + EndIf + Exec(N(D_802413C4_ABC654)) + Exec(N(D_80241460_ABC6F0)) + Wait(1) + Return + End }; diff --git a/src/world/area_kkj/kkj_00/kkj_00_3_npc_intro.c b/src/world/area_kkj/kkj_00/kkj_00_3_npc_intro.c index 9119ce77276..7778169d28c 100644 --- a/src/world/area_kkj/kkj_00/kkj_00_3_npc_intro.c +++ b/src/world/area_kkj/kkj_00/kkj_00_3_npc_intro.c @@ -8,262 +8,262 @@ #include "world/common/npc/Penguin.inc.c" EvtScript N(EVS_NpcIdle_RussT) = { - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 1, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetNpcAnimation, NPC_RussT_01, ANIM_RussT_Talk) - EVT_CALL(SetSelfVar, 1, 1) - EVT_ELSE - EVT_CALL(SetNpcAnimation, NPC_ShiverToad_01, ANIM_ShiverToad_Green_Talk) - EVT_CALL(SetSelfVar, 1, 0) - EVT_END_IF - EVT_CALL(RandInt, 60, LVar0) - EVT_ADD(LVar0, 30) - EVT_WAIT(LVar0) - EVT_CALL(SetNpcAnimation, NPC_RussT_01, ANIM_RussT_Idle) - EVT_CALL(SetNpcAnimation, NPC_ShiverToad_01, ANIM_ShiverToad_Green_Idle) - EVT_WAIT(10) - EVT_END_LOOP - EVT_END + Loop(0) + Call(GetSelfVar, 1, LVar0) + IfEq(LVar0, 0) + Call(SetNpcAnimation, NPC_RussT_01, ANIM_RussT_Talk) + Call(SetSelfVar, 1, 1) + Else + Call(SetNpcAnimation, NPC_ShiverToad_01, ANIM_ShiverToad_Green_Talk) + Call(SetSelfVar, 1, 0) + EndIf + Call(RandInt, 60, LVar0) + Add(LVar0, 30) + Wait(LVar0) + Call(SetNpcAnimation, NPC_RussT_01, ANIM_RussT_Idle) + Call(SetNpcAnimation, NPC_ShiverToad_01, ANIM_ShiverToad_Green_Idle) + Wait(10) + EndLoop + End }; EvtScript N(EVS_NpcIdle_Toadette_01) = { - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 1, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetNpcAnimation, NPC_Toadette_01, ANIM_Toadette_Pink_Talk) - EVT_CALL(SetSelfVar, 1, 1) - EVT_ELSE - EVT_CALL(SetNpcAnimation, NPC_Toadette_02, ANIM_Toadette_Green_Talk) - EVT_CALL(SetSelfVar, 1, 0) - EVT_END_IF - EVT_CALL(RandInt, 60, LVar0) - EVT_ADD(LVar0, 30) - EVT_WAIT(LVar0) - EVT_CALL(SetNpcAnimation, NPC_Toadette_01, ANIM_Toadette_Pink_Idle) - EVT_CALL(SetNpcAnimation, NPC_Toadette_02, ANIM_Toadette_Green_Idle) - EVT_WAIT(10) - EVT_END_LOOP - EVT_END + Loop(0) + Call(GetSelfVar, 1, LVar0) + IfEq(LVar0, 0) + Call(SetNpcAnimation, NPC_Toadette_01, ANIM_Toadette_Pink_Talk) + Call(SetSelfVar, 1, 1) + Else + Call(SetNpcAnimation, NPC_Toadette_02, ANIM_Toadette_Green_Talk) + Call(SetSelfVar, 1, 0) + EndIf + Call(RandInt, 60, LVar0) + Add(LVar0, 30) + Wait(LVar0) + Call(SetNpcAnimation, NPC_Toadette_01, ANIM_Toadette_Pink_Idle) + Call(SetNpcAnimation, NPC_Toadette_02, ANIM_Toadette_Green_Idle) + Wait(10) + EndLoop + End }; EvtScript N(EVS_NpcIdle_Toad_01) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kkj_00_ENTRY_5) - EVT_CALL(WaitForPlayerInputEnabled) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(AwaitPlayerLeave, LVar0, LVar2, 100) - EVT_WAIT(50) - EVT_CALL(SetNpcSpeed, NPC_Toad_01, EVT_FLOAT(2.0)) - EVT_CALL(SetNpcAnimation, NPC_Toad_01, ANIM_Toad_Red_Walk) - EVT_CALL(NpcMoveTo, NPC_Toad_01, 60, 320, 0) - EVT_CALL(SetNpcAnimation, NPC_Toad_01, ANIM_Toad_Red_Idle) - EVT_END_IF - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 1, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetNpcAnimation, NPC_Toad_01, ANIM_Toad_Red_Talk) - EVT_CALL(SetSelfVar, 1, 1) - EVT_ELSE - EVT_CALL(SetNpcAnimation, NPC_Luigi, ANIM_Luigi_Talk) - EVT_CALL(SetSelfVar, 1, 0) - EVT_END_IF - EVT_CALL(RandInt, 60, LVar0) - EVT_ADD(LVar0, 30) - EVT_WAIT(LVar0) - EVT_CALL(SetNpcAnimation, NPC_Luigi, ANIM_Luigi_Idle) - EVT_CALL(SetNpcAnimation, NPC_Toad_01, ANIM_Toad_Red_Idle) - EVT_WAIT(10) - EVT_END_LOOP - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, kkj_00_ENTRY_5) + Call(WaitForPlayerInputEnabled) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(AwaitPlayerLeave, LVar0, LVar2, 100) + Wait(50) + Call(SetNpcSpeed, NPC_Toad_01, Float(2.0)) + Call(SetNpcAnimation, NPC_Toad_01, ANIM_Toad_Red_Walk) + Call(NpcMoveTo, NPC_Toad_01, 60, 320, 0) + Call(SetNpcAnimation, NPC_Toad_01, ANIM_Toad_Red_Idle) + EndIf + Loop(0) + Call(GetSelfVar, 1, LVar0) + IfEq(LVar0, 0) + Call(SetNpcAnimation, NPC_Toad_01, ANIM_Toad_Red_Talk) + Call(SetSelfVar, 1, 1) + Else + Call(SetNpcAnimation, NPC_Luigi, ANIM_Luigi_Talk) + Call(SetSelfVar, 1, 0) + EndIf + Call(RandInt, 60, LVar0) + Add(LVar0, 30) + Wait(LVar0) + Call(SetNpcAnimation, NPC_Luigi, ANIM_Luigi_Idle) + Call(SetNpcAnimation, NPC_Toad_01, ANIM_Toad_Red_Idle) + Wait(10) + EndLoop + End }; EvtScript N(EVS_NpcIdle_Toad_03) = { - EVT_LOOP(0) - EVT_WAIT(150) - EVT_LOOP(2) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 7) - EVT_WAIT(20) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 7) - EVT_WAIT(20) - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Wait(150) + Loop(2) + Call(InterpNpcYaw, NPC_SELF, 90, 7) + Wait(20) + Call(InterpNpcYaw, NPC_SELF, 270, 7) + Wait(20) + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_NpcInteract_Luigi) = { - EVT_CALL(EnableNpcAI, NPC_Toad_01, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Luigi, ANIM_Luigi_Idle) - EVT_CALL(SetNpcAnimation, NPC_Toad_01, ANIM_Toad_Red_Idle) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 16, MSG_Intro_0025) - EVT_CALL(EnableNpcAI, NPC_Toad_01, TRUE) - EVT_RETURN - EVT_END + Call(EnableNpcAI, NPC_Toad_01, FALSE) + Call(SetNpcAnimation, NPC_Luigi, ANIM_Luigi_Idle) + Call(SetNpcAnimation, NPC_Toad_01, ANIM_Toad_Red_Idle) + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 16, MSG_Intro_0025) + Call(EnableNpcAI, NPC_Toad_01, TRUE) + Return + End }; EvtScript N(EVS_NpcInteract_Toad_01) = { - EVT_CALL(SetNpcAnimation, NPC_Toad_01, ANIM_Toad_Red_Idle) - EVT_CALL(SetNpcAnimation, NPC_Luigi, ANIM_Luigi_Idle) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 16, MSG_Intro_0029) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_Toad_01, ANIM_Toad_Red_Idle) + Call(SetNpcAnimation, NPC_Luigi, ANIM_Luigi_Idle) + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 16, MSG_Intro_0029) + Return + End }; EvtScript N(EVS_NpcInteract_Toad_02) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 16, MSG_Intro_002A) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 16, MSG_Intro_002A) + Return + End }; EvtScript N(EVS_NpcInteract_Toad_03) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_Intro_002B) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_Intro_002B) + Return + End }; EvtScript N(EVS_NpcInteract_Toadette_01) = { - EVT_CALL(SetNpcAnimation, NPC_Toadette_01, ANIM_Toadette_Pink_Idle) - EVT_CALL(SetNpcAnimation, NPC_Toadette_02, ANIM_Toadette_Green_Idle) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 16, MSG_Intro_002C) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_Toadette_01, ANIM_Toadette_Pink_Idle) + Call(SetNpcAnimation, NPC_Toadette_02, ANIM_Toadette_Green_Idle) + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 16, MSG_Intro_002C) + Return + End }; EvtScript N(EVS_NpcInteract_Toadette_02) = { - EVT_CALL(EnableNpcAI, NPC_Toadette_01, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Toadette_02, ANIM_Toadette_Green_Idle) - EVT_CALL(SetNpcAnimation, NPC_Toadette_01, ANIM_Toadette_Pink_Idle) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toadette_Green_Talk, ANIM_Toadette_Green_Idle, 16, MSG_Intro_002D) - EVT_CALL(EnableNpcAI, NPC_Toadette_01, TRUE) - EVT_RETURN - EVT_END + Call(EnableNpcAI, NPC_Toadette_01, FALSE) + Call(SetNpcAnimation, NPC_Toadette_02, ANIM_Toadette_Green_Idle) + Call(SetNpcAnimation, NPC_Toadette_01, ANIM_Toadette_Pink_Idle) + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toadette_Green_Talk, ANIM_Toadette_Green_Idle, 16, MSG_Intro_002D) + Call(EnableNpcAI, NPC_Toadette_01, TRUE) + Return + End }; EvtScript N(EVS_NpcInteract_RussT) = { - EVT_CALL(SetNpcAnimation, NPC_ShiverToad_01, ANIM_ShiverToad_Green_Idle) - EVT_CALL(SetNpcAnimation, NPC_RussT_01, ANIM_RussT_Idle) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 16, MSG_Intro_0027) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_ShiverToad_01, ANIM_ShiverToad_Green_Idle) + Call(SetNpcAnimation, NPC_RussT_01, ANIM_RussT_Idle) + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 16, MSG_Intro_0027) + Return + End }; EvtScript N(EVS_NpcInteract_ShiverToad) = { - EVT_CALL(EnableNpcAI, NPC_RussT_01, FALSE) - EVT_CALL(SetNpcAnimation, NPC_RussT_01, ANIM_RussT_Idle) - EVT_CALL(SetNpcAnimation, NPC_ShiverToad_01, ANIM_ShiverToad_Green_Idle) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ShiverToad_Green_Talk, ANIM_ShiverToad_Green_Idle, 16, MSG_Intro_0028) - EVT_CALL(EnableNpcAI, NPC_RussT_01, TRUE) - EVT_RETURN - EVT_END + Call(EnableNpcAI, NPC_RussT_01, FALSE) + Call(SetNpcAnimation, NPC_RussT_01, ANIM_RussT_Idle) + Call(SetNpcAnimation, NPC_ShiverToad_01, ANIM_ShiverToad_Green_Idle) + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_ShiverToad_Green_Talk, ANIM_ShiverToad_Green_Idle, 16, MSG_Intro_0028) + Call(EnableNpcAI, NPC_RussT_01, TRUE) + Return + End }; EvtScript N(EVS_NpcInteract_Penguin_01) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_Intro_0030) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_Intro_0030) + Return + End }; EvtScript N(EVS_NpcInteract_ToadGuard_01) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Red_Talk, ANIM_ToadGuard_Red_Idle, 16, MSG_Intro_002E) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Red_Talk, ANIM_ToadGuard_Red_Idle, 16, MSG_Intro_002E) + Return + End }; EvtScript N(EVS_NpcInteract_ToadGuard_02) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Blue_Talk, ANIM_ToadGuard_Blue_Idle, 16, MSG_Intro_002F) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Blue_Talk, ANIM_ToadGuard_Blue_Idle, 16, MSG_Intro_002F) + Return + End }; EvtScript N(EVS_NpcInit_Luigi) = { - EVT_CALL(SetNpcCollisionSize, NPC_SELF, 46, 26) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kkj_00_ENTRY_5) - EVT_CALL(SetNpcPos, NPC_SELF, 0, 0, 580) - EVT_CALL(SetNpcYaw, NPC_SELF, 0) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, 20, 0, 320) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_END_IF - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Luigi))) - EVT_RETURN - EVT_END + Call(SetNpcCollisionSize, NPC_SELF, 46, 26) + Call(GetEntryID, LVar0) + IfEq(LVar0, kkj_00_ENTRY_5) + Call(SetNpcPos, NPC_SELF, 0, 0, 580) + Call(SetNpcYaw, NPC_SELF, 0) + Else + Call(SetNpcPos, NPC_SELF, 20, 0, 320) + Call(SetNpcYaw, NPC_SELF, 90) + EndIf + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Luigi))) + Return + End }; EvtScript N(EVS_NpcInit_Toad_01) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, kkj_00_ENTRY_5) - EVT_CALL(SetNpcPos, NPC_SELF, 60, 0, 320) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_END_IF - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Toad_01))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_01))) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfNe(LVar0, kkj_00_ENTRY_5) + Call(SetNpcPos, NPC_SELF, 60, 0, 320) + Call(SetNpcYaw, NPC_SELF, 270) + EndIf + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Toad_01))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_01))) + Return + End }; EvtScript N(EVS_NpcInit_Toad_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_02))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_02))) + Return + End }; EvtScript N(EVS_NpcInit_Toad_03) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Toad_03))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_03))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Toad_03))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_03))) + Return + End }; EvtScript N(EVS_NpcInit_Toadette_01) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Toadette_01))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toadette_01))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Toadette_01))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toadette_01))) + Return + End }; EvtScript N(EVS_NpcInit_Toadette_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toadette_02))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toadette_02))) + Return + End }; EvtScript N(EVS_NpcInit_RussT) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_RussT))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_RussT))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_RussT))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_RussT))) + Return + End }; EvtScript N(EVS_NpcInit_ShiverToad) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ShiverToad))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ShiverToad))) + Return + End }; EvtScript N(EVS_NpcInit_Penguin_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Penguin_01))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Penguin_01))) + Return + End }; EvtScript N(EVS_NpcInit_ToadGuard_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ToadGuard_01))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ToadGuard_01))) + Return + End }; EvtScript N(EVS_NpcInit_ToadGuard_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ToadGuard_02))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ToadGuard_02))) + Return + End }; NpcData N(NpcData_Characters)[] = { diff --git a/src/world/area_kkj/kkj_00/kkj_00_4_scene_intro.c b/src/world/area_kkj/kkj_00/kkj_00_4_scene_intro.c index 4866c53618b..22bc96be74e 100644 --- a/src/world/area_kkj/kkj_00/kkj_00_4_scene_intro.c +++ b/src/world/area_kkj/kkj_00/kkj_00_4_scene_intro.c @@ -1,48 +1,48 @@ #include "kkj_00.h" EvtScript N(EVS_OpenAndCloseFrontDoor_Intro) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_tts, SOUND_LARGE_DOOR_OPEN, 0) - EVT_CALL(MakeLerp, 0, 80, 14, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_door2, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_door1, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(30 * DT) - EVT_CALL(MakeLerp, 80, 0, 8, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_door2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_door1, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_tts, SOUND_LARGE_DOOR_CLOSE, 0) - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_tts, SOUND_LARGE_DOOR_OPEN, 0) + Call(MakeLerp, 0, 80, 14, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_door2, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_door1, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(30 * DT) + Call(MakeLerp, 80, 0, 8, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_door2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_door1, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_tts, SOUND_LARGE_DOOR_CLOSE, 0) + Return + End }; EvtScript N(EVS_Scene_Intro) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC(N(EVS_OpenAndCloseFrontDoor_Intro)) - EVT_THREAD - EVT_CALL(SetNpcSpeed, NPC_Luigi, EVT_FLOAT(4.0)) - EVT_CALL(SetNpcAnimation, NPC_Luigi, ANIM_Luigi_RunBack) - EVT_CALL(NpcMoveTo, NPC_Luigi, 20, 320, 0) - EVT_CALL(SetNpcAnimation, NPC_Luigi, ANIM_Luigi_Idle) - EVT_END_THREAD - EVT_CALL(func_802D1270, 80, 300, EVT_FLOAT(4.0 / DT)) - EVT_CALL(InterpPlayerYaw, 270, 5) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToPlayer, NPC_Luigi, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_Intro_0024) - EVT_WAIT(20 * DT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Exec(N(EVS_OpenAndCloseFrontDoor_Intro)) + Thread + Call(SetNpcSpeed, NPC_Luigi, Float(4.0)) + Call(SetNpcAnimation, NPC_Luigi, ANIM_Luigi_RunBack) + Call(NpcMoveTo, NPC_Luigi, 20, 320, 0) + Call(SetNpcAnimation, NPC_Luigi, ANIM_Luigi_Idle) + EndThread + Call(func_802D1270, 80, 300, Float(4.0 / DT)) + Call(InterpPlayerYaw, 270, 5) + Wait(30 * DT) + Call(SpeakToPlayer, NPC_Luigi, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_Intro_0024) + Wait(20 * DT) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_kkj/kkj_00/kkj_00_5_npc_ending.c b/src/world/area_kkj/kkj_00/kkj_00_5_npc_ending.c index 7a6312b2b18..eb1f95efe6e 100644 --- a/src/world/area_kkj/kkj_00/kkj_00_5_npc_ending.c +++ b/src/world/area_kkj/kkj_00/kkj_00_5_npc_ending.c @@ -6,45 +6,45 @@ #include "world/common/npc/Dummy.inc.c" EvtScript N(EVS_NpcInit_RussT) = { - EVT_CALL(SetNpcPos, NPC_SELF, -300, 0, 295) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, -300, 0, 295) + Call(SetNpcYaw, NPC_SELF, 90) + Return + End }; EvtScript N(EVS_NpcInit_ShiverToad_02) = { - EVT_CALL(SetNpcPos, NPC_SELF, -175, 0, -75) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, -175, 0, -75) + Call(SetNpcYaw, NPC_SELF, 90) + Return + End }; EvtScript N(EVS_NpcInit_Unused) = { - EVT_CALL(SetNpcPos, NPC_SELF, -440, 0, 220) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, -440, 0, 220) + Call(SetNpcYaw, NPC_SELF, 90) + Return + End }; EvtScript N(EVS_NpcInit_Toadette_03) = { - EVT_CALL(SetNpcPos, NPC_SELF, 295, 0, -15) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, 295, 0, -15) + Call(SetNpcYaw, NPC_SELF, 270) + Return + End }; EvtScript N(EVS_NpcInit_Toadette_04) = { - EVT_CALL(SetNpcPos, NPC_SELF, 325, 0, -10) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, 325, 0, -10) + Call(SetNpcYaw, NPC_SELF, 270) + Return + End }; EvtScript N(EVS_NpcInit_ToadGuard_03) = { - EVT_CALL(SetNpcPos, NPC_SELF, 50, 100, -365) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, 50, 100, -365) + Call(SetNpcYaw, NPC_SELF, 270) + Return + End }; AnimID N(ExtraAnims_Peach)[] = { diff --git a/src/world/area_kkj/kkj_00/kkj_00_6_scene_ending.c b/src/world/area_kkj/kkj_00/kkj_00_6_scene_ending.c index c2c782edaa3..2ab6e731e91 100644 --- a/src/world/area_kkj/kkj_00/kkj_00_6_scene_ending.c +++ b/src/world/area_kkj/kkj_00/kkj_00_6_scene_ending.c @@ -22,201 +22,201 @@ API_CALLABLE(N(FadeScreenToWhite)) { } EvtScript N(EVS_OpenAndCloseFrontDoor_Ending) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_tts, SOUND_LARGE_DOOR_OPEN, 0) - EVT_CALL(MakeLerp, 0, 80, 14, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_door2, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_door1, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(30) - EVT_CALL(MakeLerp, 80, 0, 8, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_door2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_door1, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_tts, SOUND_LARGE_DOOR_CLOSE, 0) - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_tts, SOUND_LARGE_DOOR_OPEN, 0) + Call(MakeLerp, 0, 80, 14, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_door2, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_door1, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(30) + Call(MakeLerp, 80, 0, 8, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_door2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_door1, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_tts, SOUND_LARGE_DOOR_CLOSE, 0) + Return + End }; EvtScript N(EVS_OpenAndClosePeachDoor) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_ttn, SOUND_LARGE_DOOR_OPEN, 0) - EVT_CALL(MakeLerp, 0, 80, 14, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_door3, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_door4, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(30) - EVT_CALL(MakeLerp, 80, 0, 8, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_door4, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_door3, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_ttn, SOUND_LARGE_DOOR_CLOSE, 0) - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_ttn, SOUND_LARGE_DOOR_OPEN, 0) + Call(MakeLerp, 0, 80, 14, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_door3, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_door4, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(30) + Call(MakeLerp, 80, 0, 8, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_door4, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_door3, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_ttn, SOUND_LARGE_DOOR_CLOSE, 0) + Return + End }; EvtScript N(EVS_Scene_Ending) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 50, 0, 250) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 50, 0, 250) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(10) - EVT_EXEC(N(EVS_OpenAndCloseFrontDoor_Ending)) - EVT_CALL(func_802D1270, 0, 300, EVT_FLOAT(4.0)) - EVT_CALL(SetNpcAnimation, NPC_Toad_01, ANIM_ToadMinister_Walk) - EVT_CALL(NpcMoveTo, NPC_Toad_01, 74, 243, 10) - EVT_CALL(SetNpcAnimation, NPC_Toad_01, ANIM_ToadMinister_Idle) - EVT_CALL(SpeakToPlayer, NPC_Toad_01, ANIM_ToadMinister_Talk, ANIM_ToadMinister_Idle, 0, MSG_Outro_0064) - EVT_WAIT(10) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 100, -290) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 100, -290) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 400) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 10, -7) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_ToadGuard_03, ANIM_ToadGuard_Red_Talk, ANIM_ToadGuard_Red_Idle, 5, MSG_Outro_0065) - EVT_CALL(InterpPlayerYaw, 0, 0) - EVT_WAIT(10) - EVT_CALL(SetMusicTrack, 0, SONG_PEACH_APPEARS, 0, 8) - EVT_EXEC(N(EVS_OpenAndClosePeachDoor)) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Walk) - EVT_CALL(SetNpcSpeed, NPC_Peach, EVT_FLOAT(2.0)) - EVT_CALL(NpcMoveTo, NPC_Peach, 0, -200, 0) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Idle) - EVT_END_THREAD - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_Peach, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, -350) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 100, -200) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 100, -200) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 550) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 10, -7) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.6)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 100, -200) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 100, -200) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 3, -11) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(20) - EVT_CALL(SetMusicTrack, 0, SONG_PEACH_APPEARS, 1, 8) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach2_RaiseArms) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_Peach, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Outro_0066) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 50, 0, 250) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 50, 0, 250) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 500) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 3, -10) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(SpeakToPlayer, NPC_Peach, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Outro_0067) - EVT_WAIT(10) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 100, -200) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 100, -200) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 25, EVT_FLOAT(-9.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Peach, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Outro_0068) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach2_LowerArms) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Idle) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 300) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 300) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(252.7)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 5, EVT_FLOAT(-9.5)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 500, 100) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(20) - EVT_CALL(ShowMessageAtWorldPos, MSG_Outro_0069, 0, 100, -200) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 250, 0, 100) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 250, 0, 100) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 400) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 15, -1) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -100, 100) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(ShowMessageAtWorldPos, MSG_Outro_006A, 0, 100, -200) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -250, 0, 50) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -250, 0, 50) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 15, -7) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(ShowMessageAtWorldPos, MSG_Outro_006B, 0, 100, -200) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -150, 0, 360) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -150, 0, 360) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 25, -13) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 820, -100) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(ShowMessageAtWorldPos, MSG_Outro_006C, 0, 100, -200) - EVT_WAIT(10) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 100, -200) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 100, -200) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 5, -10) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -500, -1400) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach2_RaiseArms) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_Peach, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_Outro_006D) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach2_LowerArms) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach3_Pray) - EVT_WAIT(60) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_Peach, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_Outro_006E) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach2_SpreadArms) - EVT_CALL(EnableGroup, MODEL_chandelier, FALSE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 120) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 120) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 1300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 30, -7) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -120, 75) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(120) - EVT_CALL(N(FadeScreenToWhite)) - EVT_WAIT(60) - EVT_CALL(FadeOutMusic, 0, 2000) - EVT_CALL(GotoMapSpecial, EVT_PTR("end_00"), end_00_ENTRY_0, TRANSITION_OUTRO_END_SCENE) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, 50, 0, 250) + Call(SetPanTarget, CAM_DEFAULT, 50, 0, 250) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(10) + Exec(N(EVS_OpenAndCloseFrontDoor_Ending)) + Call(func_802D1270, 0, 300, Float(4.0)) + Call(SetNpcAnimation, NPC_Toad_01, ANIM_ToadMinister_Walk) + Call(NpcMoveTo, NPC_Toad_01, 74, 243, 10) + Call(SetNpcAnimation, NPC_Toad_01, ANIM_ToadMinister_Idle) + Call(SpeakToPlayer, NPC_Toad_01, ANIM_ToadMinister_Talk, ANIM_ToadMinister_Idle, 0, MSG_Outro_0064) + Wait(10) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 100, -290) + Call(SetPanTarget, CAM_DEFAULT, 0, 100, -290) + Call(SetCamDistance, CAM_DEFAULT, 400) + Call(SetCamPitch, CAM_DEFAULT, 10, -7) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(20) + Call(SpeakToPlayer, NPC_ToadGuard_03, ANIM_ToadGuard_Red_Talk, ANIM_ToadGuard_Red_Idle, 5, MSG_Outro_0065) + Call(InterpPlayerYaw, 0, 0) + Wait(10) + Call(SetMusicTrack, 0, SONG_PEACH_APPEARS, 0, 8) + Exec(N(EVS_OpenAndClosePeachDoor)) + Thread + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Walk) + Call(SetNpcSpeed, NPC_Peach, Float(2.0)) + Call(NpcMoveTo, NPC_Peach, 0, -200, 0) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Idle) + EndThread + Loop(0) + Call(GetNpcPos, NPC_Peach, LVar0, LVar1, LVar2) + IfGt(LVar0, -350) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(UseSettingsFrom, CAM_DEFAULT, 0, 100, -200) + Call(SetPanTarget, CAM_DEFAULT, 0, 100, -200) + Call(SetCamDistance, CAM_DEFAULT, 550) + Call(SetCamPitch, CAM_DEFAULT, 10, -7) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.6)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 100, -200) + Call(SetPanTarget, CAM_DEFAULT, 0, 100, -200) + Call(SetCamDistance, CAM_DEFAULT, 250) + Call(SetCamPitch, CAM_DEFAULT, 3, -11) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(20) + Call(SetMusicTrack, 0, SONG_PEACH_APPEARS, 1, 8) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach2_RaiseArms) + Wait(10) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_Peach, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Outro_0066) + Call(UseSettingsFrom, CAM_DEFAULT, 50, 0, 250) + Call(SetPanTarget, CAM_DEFAULT, 50, 0, 250) + Call(SetCamDistance, CAM_DEFAULT, 500) + Call(SetCamPitch, CAM_DEFAULT, 3, -10) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(SpeakToPlayer, NPC_Peach, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Outro_0067) + Wait(10) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 100, -200) + Call(SetPanTarget, CAM_DEFAULT, 0, 100, -200) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, 25, Float(-9.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(InterpPlayerYaw, 90, 0) + Wait(10) + Call(SpeakToPlayer, NPC_Peach, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Outro_0068) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach2_LowerArms) + Wait(10) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Idle) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 300) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 300) + Call(SetCamDistance, CAM_DEFAULT, Float(252.7)) + Call(SetCamPitch, CAM_DEFAULT, 5, Float(-9.5)) + Call(SetCamPosA, CAM_DEFAULT, 500, 100) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(20) + Call(ShowMessageAtWorldPos, MSG_Outro_0069, 0, 100, -200) + Call(UseSettingsFrom, CAM_DEFAULT, 250, 0, 100) + Call(SetPanTarget, CAM_DEFAULT, 250, 0, 100) + Call(SetCamDistance, CAM_DEFAULT, 400) + Call(SetCamPitch, CAM_DEFAULT, 15, -1) + Call(SetCamPosA, CAM_DEFAULT, -100, 100) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(ShowMessageAtWorldPos, MSG_Outro_006A, 0, 100, -200) + Call(UseSettingsFrom, CAM_DEFAULT, -250, 0, 50) + Call(SetPanTarget, CAM_DEFAULT, -250, 0, 50) + Call(SetCamDistance, CAM_DEFAULT, 450) + Call(SetCamPitch, CAM_DEFAULT, 15, -7) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(ShowMessageAtWorldPos, MSG_Outro_006B, 0, 100, -200) + Call(UseSettingsFrom, CAM_DEFAULT, -150, 0, 360) + Call(SetPanTarget, CAM_DEFAULT, -150, 0, 360) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, 25, -13) + Call(SetCamPosA, CAM_DEFAULT, 820, -100) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(ShowMessageAtWorldPos, MSG_Outro_006C, 0, 100, -200) + Wait(10) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 100, -200) + Call(SetPanTarget, CAM_DEFAULT, 0, 100, -200) + Call(SetCamDistance, CAM_DEFAULT, 250) + Call(SetCamPitch, CAM_DEFAULT, 5, -10) + Call(SetCamPosA, CAM_DEFAULT, -500, -1400) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach2_RaiseArms) + Wait(10) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_Peach, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_Outro_006D) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach2_LowerArms) + Wait(30) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach3_Pray) + Wait(60) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_Peach, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_Outro_006E) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach2_SpreadArms) + Call(EnableGroup, MODEL_chandelier, FALSE) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 120) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 120) + Call(SetCamDistance, CAM_DEFAULT, 1300) + Call(SetCamPitch, CAM_DEFAULT, 30, -7) + Call(SetCamPosA, CAM_DEFAULT, -120, 75) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(120) + Call(N(FadeScreenToWhite)) + Wait(60) + Call(FadeOutMusic, 0, 2000) + Call(GotoMapSpecial, Ref("end_00"), end_00_ENTRY_0, TRANSITION_OUTRO_END_SCENE) + Wait(100) + Return + End }; diff --git a/src/world/area_kkj/kkj_01/kkj_01_1_music.c b/src/world/area_kkj/kkj_01/kkj_01_1_music.c index f4892bb5d8b..ba1f790b5e7 100644 --- a/src/world/area_kkj/kkj_01/kkj_01_1_music.c +++ b/src/world/area_kkj/kkj_01/kkj_01_1_music.c @@ -1,12 +1,12 @@ #include "kkj_01.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kkj_01_ENTRY_1) - EVT_CALL(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 7) - EVT_WAIT(3) - EVT_END_IF - EVT_CALL(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 8) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, kkj_01_ENTRY_1) + Call(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 7) + Wait(3) + EndIf + Call(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 8) + Return + End }; diff --git a/src/world/area_kkj/kkj_01/kkj_01_2_main.c b/src/world/area_kkj/kkj_01/kkj_01_2_main.c index 0842b38d5eb..42c8c656db5 100644 --- a/src/world/area_kkj/kkj_01/kkj_01_2_main.c +++ b/src/world/area_kkj/kkj_01/kkj_01_2_main.c @@ -1,133 +1,133 @@ #include "kkj_01.h" EvtScript N(EVS_ExitDoors_kkj_00_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE) - EVT_SET(LVar0, kkj_01_ENTRY_0) - EVT_SET(LVar1, COLLIDER_tts) - EVT_SET(LVar2, MODEL_door2) - EVT_SET(LVar3, MODEL_door1) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kkj_00"), kkj_00_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_LARGE) + Set(LVar0, kkj_01_ENTRY_0) + Set(LVar1, COLLIDER_tts) + Set(LVar2, MODEL_door2) + Set(LVar3, MODEL_door1) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("kkj_00"), kkj_00_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_kkj_02_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE) - EVT_SET(LVar0, kkj_01_ENTRY_1) - EVT_SET(LVar1, COLLIDER_ttn) - EVT_SET(LVar2, MODEL_door3) - EVT_SET(LVar3, MODEL_door4) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kkj_02"), kkj_02_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_LARGE) + Set(LVar0, kkj_01_ENTRY_1) + Set(LVar1, COLLIDER_ttn) + Set(LVar2, MODEL_door3) + Set(LVar3, MODEL_door4) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("kkj_02"), kkj_02_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_kkj_14_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, kkj_01_ENTRY_4) - EVT_SET(LVar1, COLLIDER_ttn2) - EVT_SET(LVar2, MODEL_door7) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kkj_14"), kkj_14_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, kkj_01_ENTRY_4) + Set(LVar1, COLLIDER_ttn2) + Set(LVar2, MODEL_door7) + Set(LVar3, DOOR_SWING_OUT) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("kkj_14"), kkj_14_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ShowMessage_CantOpen) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_DoesntOpen, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_Inspect_DoesntOpen, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_IF_EQ(AF_KKJ_01, TRUE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_14_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttn2, 1, 0) - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShowMessage_CantOpen)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShowMessage_CantOpen)), TRIGGER_WALL_PRESS_A, COLLIDER_ttsw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShowMessage_CantOpen)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShowMessage_CantOpen)), TRIGGER_WALL_PRESS_A, COLLIDER_ttse, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_00_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tts, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_02_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttn, 1, 0) - EVT_RETURN - EVT_END + IfEq(AF_KKJ_01, TRUE) + BindTrigger(Ref(N(EVS_ExitDoors_kkj_14_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttn2, 1, 0) + EndIf + BindTrigger(Ref(N(EVS_ShowMessage_CantOpen)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + BindTrigger(Ref(N(EVS_ShowMessage_CantOpen)), TRIGGER_WALL_PRESS_A, COLLIDER_ttsw, 1, 0) + BindTrigger(Ref(N(EVS_ShowMessage_CantOpen)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + BindTrigger(Ref(N(EVS_ShowMessage_CantOpen)), TRIGGER_WALL_PRESS_A, COLLIDER_ttse, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_kkj_00_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tts, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_kkj_02_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttn, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kkj_01_ENTRY_0) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE) - EVT_SET(LVar2, MODEL_door2) - EVT_SET(LVar3, MODEL_door1) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(kkj_01_ENTRY_1) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE) - EVT_SET(LVar2, MODEL_door3) - EVT_SET(LVar3, MODEL_door4) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(kkj_01_ENTRY_2) - EVT_SET(LVar2, MODEL_door5) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_CASE_EQ(kkj_01_ENTRY_3) - EVT_SET(LVar2, MODEL_door6) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_CASE_EQ(kkj_01_ENTRY_4) - EVT_SET(LVar2, MODEL_door7) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_CASE_EQ(kkj_01_ENTRY_5) - EVT_SET(LVar2, MODEL_door8) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_CASE_EQ(kkj_01_ENTRY_6) - EVT_SET(LVar2, MODEL_door9) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kkj_01_ENTRY_0) + Call(UseDoorSounds, DOOR_SOUNDS_LARGE) + Set(LVar2, MODEL_door2) + Set(LVar3, MODEL_door1) + ExecWait(EnterDoubleDoor) + CaseEq(kkj_01_ENTRY_1) + Call(UseDoorSounds, DOOR_SOUNDS_LARGE) + Set(LVar2, MODEL_door3) + Set(LVar3, MODEL_door4) + ExecWait(EnterDoubleDoor) + CaseEq(kkj_01_ENTRY_2) + Set(LVar2, MODEL_door5) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSingleDoor) + CaseEq(kkj_01_ENTRY_3) + Set(LVar2, MODEL_door6) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSingleDoor) + CaseEq(kkj_01_ENTRY_4) + Set(LVar2, MODEL_door7) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSingleDoor) + CaseEq(kkj_01_ENTRY_5) + Set(LVar2, MODEL_door8) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + CaseEq(kkj_01_ENTRY_6) + Set(LVar2, MODEL_door9) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PEACH_CASTLE_GROUNDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_IF_NE(GB_StoryProgress, STORY_INTRO) - EVT_CALL(EnableModel, MODEL_g74, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g77, COLLIDER_FLAGS_UPPER_MASK) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_o321, FALSE) - EVT_CALL(EnableModel, MODEL_o337, FALSE) - EVT_CALL(EnableModel, MODEL_o330, FALSE) - EVT_END_IF - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_PEACH_CASTLE_GROUNDS) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + IfNe(GB_StoryProgress, STORY_INTRO) + Call(EnableModel, MODEL_g74, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g77, COLLIDER_FLAGS_UPPER_MASK) + Else + Call(EnableModel, MODEL_o321, FALSE) + Call(EnableModel, MODEL_o337, FALSE) + Call(EnableModel, MODEL_o330, FALSE) + EndIf + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_BindExitTriggers)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; MAP_RODATA_PAD(1, exits); diff --git a/src/world/area_kkj/kkj_01/kkj_01_3_npc.c b/src/world/area_kkj/kkj_01/kkj_01_3_npc.c index 7e7cdd3fb08..27f3e6790bc 100644 --- a/src/world/area_kkj/kkj_01/kkj_01_3_npc.c +++ b/src/world/area_kkj/kkj_01/kkj_01_3_npc.c @@ -9,280 +9,280 @@ #include "world/common/npc/Koopa.inc.c" EvtScript N(EVS_NpcIdle_Dryite) = { - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 1, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetNpcAnimation, NPC_Dryite, ANIM_Dryite_Yellow_Talk) - EVT_CALL(SetSelfVar, 1, 1) - EVT_ELSE - EVT_CALL(SetNpcAnimation, NPC_Mouser, ANIM_Mouser_Blue_Talk) - EVT_CALL(SetSelfVar, 1, 0) - EVT_END_IF - EVT_CALL(RandInt, 60, LVar0) - EVT_ADD(LVar0, 30) - EVT_WAIT(LVar0) - EVT_CALL(SetNpcAnimation, NPC_Dryite, ANIM_Dryite_Yellow_Idle) - EVT_CALL(SetNpcAnimation, NPC_Mouser, ANIM_Mouser_Blue_Idle) - EVT_WAIT(10) - EVT_END_LOOP - EVT_END + Loop(0) + Call(GetSelfVar, 1, LVar0) + IfEq(LVar0, 0) + Call(SetNpcAnimation, NPC_Dryite, ANIM_Dryite_Yellow_Talk) + Call(SetSelfVar, 1, 1) + Else + Call(SetNpcAnimation, NPC_Mouser, ANIM_Mouser_Blue_Talk) + Call(SetSelfVar, 1, 0) + EndIf + Call(RandInt, 60, LVar0) + Add(LVar0, 30) + Wait(LVar0) + Call(SetNpcAnimation, NPC_Dryite, ANIM_Dryite_Yellow_Idle) + Call(SetNpcAnimation, NPC_Mouser, ANIM_Mouser_Blue_Idle) + Wait(10) + EndLoop + End }; EvtScript N(EVS_NpcIdle_MayorPenguin) = { - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 1, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Talk) - EVT_CALL(SetSelfVar, 1, 1) - EVT_ELSE - EVT_CALL(SetNpcAnimation, NPC_Koopa, ANIM_Koopa_Talk) - EVT_CALL(SetSelfVar, 1, 0) - EVT_END_IF - EVT_CALL(RandInt, 60, LVar0) - EVT_ADD(LVar0, 30) - EVT_WAIT(LVar0) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Idle) - EVT_CALL(SetNpcAnimation, NPC_Koopa, ANIM_Koopa_Idle) - EVT_WAIT(10) - EVT_END_LOOP - EVT_END + Loop(0) + Call(GetSelfVar, 1, LVar0) + IfEq(LVar0, 0) + Call(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Talk) + Call(SetSelfVar, 1, 1) + Else + Call(SetNpcAnimation, NPC_Koopa, ANIM_Koopa_Talk) + Call(SetSelfVar, 1, 0) + EndIf + Call(RandInt, 60, LVar0) + Add(LVar0, 30) + Wait(LVar0) + Call(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Idle) + Call(SetNpcAnimation, NPC_Koopa, ANIM_Koopa_Idle) + Wait(10) + EndLoop + End }; EvtScript N(EVS_NpcIdle_ToadMinister) = { - EVT_WAIT(30) - EVT_LOOP(0) - EVT_WAIT(150) - EVT_LOOP(2) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 7) - EVT_WAIT(20) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 7) - EVT_WAIT(20) - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Wait(30) + Loop(0) + Wait(150) + Loop(2) + Call(InterpNpcYaw, NPC_SELF, 90, 7) + Wait(20) + Call(InterpNpcYaw, NPC_SELF, 270, 7) + Wait(20) + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_Toad_01) = { - EVT_LOOP(0) - EVT_WAIT(150) - EVT_LOOP(2) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 7) - EVT_WAIT(15) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 7) - EVT_WAIT(15) - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Wait(150) + Loop(2) + Call(InterpNpcYaw, NPC_SELF, 90, 7) + Wait(15) + Call(InterpNpcYaw, NPC_SELF, 270, 7) + Wait(15) + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_ToadGuard_02) = { - EVT_IF_EQ(AF_KKJ_02, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, kkj_01_ENTRY_4) - EVT_RETURN - EVT_END_IF - EVT_CALL(WaitForPlayerInputEnabled) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Yellow_Talk, ANIM_ToadGuard_Yellow_Idle, 16, MSG_Intro_0042) - EVT_SET(AF_KKJ_02, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + IfEq(AF_KKJ_02, TRUE) + Return + EndIf + Call(GetEntryID, LVar0) + IfNe(LVar0, kkj_01_ENTRY_4) + Return + EndIf + Call(WaitForPlayerInputEnabled) + Call(DisablePlayerInput, TRUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Yellow_Talk, ANIM_ToadGuard_Yellow_Idle, 16, MSG_Intro_0042) + Set(AF_KKJ_02, TRUE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_ToadMinister) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ToadMinister_Talk, ANIM_ToadMinister_Idle, 0, MSG_Intro_0033) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_ToadMinister_Talk, ANIM_ToadMinister_Idle, 0, MSG_Intro_0033) + Return + End }; EvtScript N(EVS_NpcInteract_Toad_01) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 16, MSG_Intro_0038) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 16, MSG_Intro_0038) + Return + End }; EvtScript N(EVS_NpcInteract_Toad_02) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Green_Talk, ANIM_Toad_Green_Idle, 16, MSG_Intro_0039) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Green_Talk, ANIM_Toad_Green_Idle, 16, MSG_Intro_0039) + Return + End }; EvtScript N(EVS_NpcInteract_Toad_03) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 16, MSG_Intro_003A) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 16, MSG_Intro_003A) + Return + End }; EvtScript N(EVS_NpcInteract_Toadette) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toadette_Orange_Talk, ANIM_Toadette_Orange_Idle, 16, MSG_Intro_003B) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Toadette_Orange_Talk, ANIM_Toadette_Orange_Idle, 16, MSG_Intro_003B) + Return + End }; EvtScript N(EVS_NpcInteract_ToadGuard_01) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Red_Talk, ANIM_ToadGuard_Red_Idle, 16, MSG_Intro_003C) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Red_Talk, ANIM_ToadGuard_Red_Idle, 16, MSG_Intro_003C) + Return + End }; EvtScript N(EVS_NpcInteract_ToadGuard_02) = { - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Yellow_Talk, ANIM_ToadGuard_Yellow_Idle, 16, MSG_Intro_003D) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Yellow_Talk, ANIM_ToadGuard_Yellow_Idle, 16, MSG_Intro_003E) - EVT_CASE_OR_EQ(2) - EVT_CASE_OR_EQ(3) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Yellow_Talk, ANIM_ToadGuard_Yellow_Idle, 16, MSG_Intro_003F) - EVT_END_CASE_GROUP - EVT_CASE_EQ(4) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Yellow_Talk, ANIM_ToadGuard_Yellow_Idle, 16, MSG_Intro_0040) - EVT_WAIT(10) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcAnimation, NPC_ToadGuard_02, ANIM_ToadGuard_Yellow_Walk) - EVT_IF_GT(LVar0, 0) - EVT_SET(LVar3, -50) - EVT_ELSE - EVT_SET(LVar3, 50) - EVT_END_IF - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(2.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar3, -245, 0) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcAnimation, NPC_ToadGuard_02, ANIM_ToadGuard_Yellow_Idle) - EVT_CALL(InterpNpcYaw, NPC_SELF, 180, 5) - EVT_SET(AF_KKJ_01, TRUE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_14_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttn2, 1, 0) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Yellow_Talk, ANIM_ToadGuard_Yellow_Idle, 16, MSG_Intro_0041) - EVT_END_SWITCH - EVT_ADD(LVar0, 1) - EVT_CALL(SetSelfVar, 0, LVar0) - EVT_RETURN - EVT_END + Call(GetSelfVar, 0, LVar0) + Switch(LVar0) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Yellow_Talk, ANIM_ToadGuard_Yellow_Idle, 16, MSG_Intro_003D) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Yellow_Talk, ANIM_ToadGuard_Yellow_Idle, 16, MSG_Intro_003E) + CaseOrEq(2) + CaseOrEq(3) + Call(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Yellow_Talk, ANIM_ToadGuard_Yellow_Idle, 16, MSG_Intro_003F) + EndCaseGroup + CaseEq(4) + Call(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Yellow_Talk, ANIM_ToadGuard_Yellow_Idle, 16, MSG_Intro_0040) + Wait(10) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcAnimation, NPC_ToadGuard_02, ANIM_ToadGuard_Yellow_Walk) + IfGt(LVar0, 0) + Set(LVar3, -50) + Else + Set(LVar3, 50) + EndIf + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcSpeed, NPC_SELF, Float(2.0)) + Call(NpcMoveTo, NPC_SELF, LVar3, -245, 0) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcAnimation, NPC_ToadGuard_02, ANIM_ToadGuard_Yellow_Idle) + Call(InterpNpcYaw, NPC_SELF, 180, 5) + Set(AF_KKJ_01, TRUE) + BindTrigger(Ref(N(EVS_ExitDoors_kkj_14_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttn2, 1, 0) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Yellow_Talk, ANIM_ToadGuard_Yellow_Idle, 16, MSG_Intro_0041) + EndSwitch + Add(LVar0, 1) + Call(SetSelfVar, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInteract_Dryite) = { - EVT_CALL(SetNpcAnimation, NPC_Mouser, ANIM_Mouser_Blue_Idle) - EVT_CALL(SetNpcAnimation, NPC_Dryite, ANIM_Dryite_Yellow_Idle) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Yellow_Talk, ANIM_Dryite_Yellow_Idle, 16, MSG_Intro_0034) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_Mouser, ANIM_Mouser_Blue_Idle) + Call(SetNpcAnimation, NPC_Dryite, ANIM_Dryite_Yellow_Idle) + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Yellow_Talk, ANIM_Dryite_Yellow_Idle, 16, MSG_Intro_0034) + Return + End }; EvtScript N(EVS_NpcInteract_Mouser) = { - EVT_CALL(EnableNpcAI, NPC_Dryite, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Mouser, ANIM_Mouser_Blue_Idle) - EVT_CALL(SetNpcAnimation, NPC_Dryite, ANIM_Dryite_Yellow_Idle) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 16, MSG_Intro_0035) - EVT_CALL(EnableNpcAI, NPC_Dryite, TRUE) - EVT_RETURN - EVT_END + Call(EnableNpcAI, NPC_Dryite, FALSE) + Call(SetNpcAnimation, NPC_Mouser, ANIM_Mouser_Blue_Idle) + Call(SetNpcAnimation, NPC_Dryite, ANIM_Dryite_Yellow_Idle) + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Blue_Talk, ANIM_Mouser_Blue_Idle, 16, MSG_Intro_0035) + Call(EnableNpcAI, NPC_Dryite, TRUE) + Return + End }; EvtScript N(EVS_NpcInteract_MayorPenguin) = { - EVT_CALL(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Idle) - EVT_CALL(SetNpcAnimation, NPC_Koopa, ANIM_Koopa_Idle) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 16, MSG_Intro_0036) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Idle) + Call(SetNpcAnimation, NPC_Koopa, ANIM_Koopa_Idle) + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 16, MSG_Intro_0036) + Return + End }; EvtScript N(EVS_NpcInteract_Koopa) = { - EVT_CALL(EnableNpcAI, NPC_MayorPenguin, FALSE) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Idle) - EVT_CALL(SetNpcAnimation, NPC_Koopa, ANIM_Koopa_Idle) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 16, MSG_Intro_0037) - EVT_CALL(EnableNpcAI, NPC_MayorPenguin, TRUE) - EVT_RETURN - EVT_END + Call(EnableNpcAI, NPC_MayorPenguin, FALSE) + Call(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Idle) + Call(SetNpcAnimation, NPC_Koopa, ANIM_Koopa_Idle) + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 16, MSG_Intro_0037) + Call(EnableNpcAI, NPC_MayorPenguin, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_ToadMinister) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_ToadMinister))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ToadMinister))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_ToadMinister))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ToadMinister))) + Return + End }; EvtScript N(EVS_NpcInit_Toad_01) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Toad_01))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_01))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Toad_01))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_01))) + Return + End }; EvtScript N(EVS_NpcInit_Toad_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_02))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_02))) + Return + End }; EvtScript N(EVS_NpcInit_Toad_03) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_03))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_03))) + Return + End }; EvtScript N(EVS_NpcInit_Toadette) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toadette))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toadette))) + Return + End }; EvtScript N(EVS_NpcInit_ToadGuard_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ToadGuard_01))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ToadGuard_01))) + Return + End }; EvtScript N(EVS_NpcInit_ToadGuard_02) = { - EVT_IF_EQ(AF_KKJ_01, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, -50, 0, -245) - EVT_CALL(SetSelfVar, 0, 5) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, 0, 0, -260) - EVT_END_IF - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_ToadGuard_02))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ToadGuard_02))) - EVT_RETURN - EVT_END + IfEq(AF_KKJ_01, TRUE) + Call(SetNpcPos, NPC_SELF, -50, 0, -245) + Call(SetSelfVar, 0, 5) + Else + Call(SetNpcPos, NPC_SELF, 0, 0, -260) + EndIf + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_ToadGuard_02))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ToadGuard_02))) + Return + End }; EvtScript N(EVS_NpcInit_Dryite) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Dryite))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Dryite))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Dryite))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Dryite))) + Return + End }; EvtScript N(EVS_NpcInit_Mouser) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Mouser))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Mouser))) + Return + End }; EvtScript N(EVS_NpcInit_MayorPenguin) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MayorPenguin))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_MayorPenguin))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_MayorPenguin))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_MayorPenguin))) + Return + End }; EvtScript N(EVS_NpcInit_Koopa) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Koopa))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Koopa))) + Return + End }; NpcData N(NpcData_ToadMinister)[] = { diff --git a/src/world/area_kkj/kkj_02/kkj_02_1_music.c b/src/world/area_kkj/kkj_02/kkj_02_1_music.c index ab17c963d58..201a3408bf2 100644 --- a/src/world/area_kkj/kkj_02/kkj_02_1_music.c +++ b/src/world/area_kkj/kkj_02/kkj_02_1_music.c @@ -1,15 +1,15 @@ #include "kkj_02.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kkj_02_ENTRY_0) - EVT_CALL(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 7) - EVT_CASE_EQ(kkj_02_ENTRY_1) - EVT_CALL(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 5) - EVT_END_SWITCH - EVT_WAIT(3) - EVT_CALL(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 6) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kkj_02_ENTRY_0) + Call(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 7) + CaseEq(kkj_02_ENTRY_1) + Call(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 5) + EndSwitch + Wait(3) + Call(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 6) + Return + End }; diff --git a/src/world/area_kkj/kkj_02/kkj_02_2_main.c b/src/world/area_kkj/kkj_02/kkj_02_2_main.c index 81bba932241..dd0a112dc85 100644 --- a/src/world/area_kkj/kkj_02/kkj_02_2_main.c +++ b/src/world/area_kkj/kkj_02/kkj_02_2_main.c @@ -6,38 +6,38 @@ EvtScript N(EVS_ExitDoors_kkj_03_0) = EVT_EXIT_DOUBLE_DOOR(kkj_02_ENTRY_1, "kkj_ COLLIDER_deilit2, MODEL_door4, MODEL_door3); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_01_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilit1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_03_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilit2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_kkj_01_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilit1, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_kkj_03_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilit2, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kkj_02_ENTRY_0) - EVT_SET(LVar2, MODEL_door1) - EVT_SET(LVar3, MODEL_door2) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(kkj_02_ENTRY_1) - EVT_SET(LVar2, MODEL_door4) - EVT_SET(LVar3, MODEL_door3) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kkj_02_ENTRY_0) + Set(LVar2, MODEL_door1) + Set(LVar3, MODEL_door2) + ExecWait(EnterDoubleDoor) + CaseEq(kkj_02_ENTRY_1) + Set(LVar2, MODEL_door4) + Set(LVar3, MODEL_door3) + ExecWait(EnterDoubleDoor) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PEACH_CASTLE_GROUNDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_PEACH_CASTLE_GROUNDS) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Exec(N(EVS_SetupMusic)) + Call(UseDoorSounds, DOOR_SOUNDS_LARGE) + Exec(N(EVS_BindExitTriggers)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_kkj/kkj_02/kkj_02_3_npc.c b/src/world/area_kkj/kkj_02/kkj_02_3_npc.c index 220c97ee31f..64f1835f823 100644 --- a/src/world/area_kkj/kkj_02/kkj_02_3_npc.c +++ b/src/world/area_kkj/kkj_02/kkj_02_3_npc.c @@ -4,27 +4,27 @@ #include "world/common/npc/Toad_Stationary.inc.c" EvtScript N(EVS_NpcInteract_Toad) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_Intro_0049) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_Intro_0049) + Return + End }; EvtScript N(EVS_NpcInteract_ToadGuard) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Red_Talk, ANIM_ToadGuard_Red_Idle, 0, MSG_Intro_004A) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Red_Talk, ANIM_ToadGuard_Red_Idle, 0, MSG_Intro_004A) + Return + End }; EvtScript N(EVS_NpcInit_Toad) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad))) + Return + End }; EvtScript N(EVS_NpcInit_ToadGuard) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ToadGuard))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ToadGuard))) + Return + End }; NpcData N(NpcData_Toads)[] = { diff --git a/src/world/area_kkj/kkj_03/kkj_03_1_music.c b/src/world/area_kkj/kkj_03/kkj_03_1_music.c index 99055e6563c..c9510d7f712 100644 --- a/src/world/area_kkj/kkj_03/kkj_03_1_music.c +++ b/src/world/area_kkj/kkj_03/kkj_03_1_music.c @@ -1,16 +1,16 @@ #include "kkj_03.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kkj_03_ENTRY_0) - EVT_CALL(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 5) - EVT_WAIT(3) - EVT_CALL(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 4) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_BOWSER_ATTACKS, 0, 8) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kkj_03_ENTRY_0) + Call(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 5) + Wait(3) + Call(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 4) + CaseDefault + Call(SetMusicTrack, 0, SONG_BOWSER_ATTACKS, 0, 8) + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/world/area_kkj/kkj_03/kkj_03_2_main.c b/src/world/area_kkj/kkj_03/kkj_03_2_main.c index 64b9e0d89cf..e9a5cd26a76 100644 --- a/src/world/area_kkj/kkj_03/kkj_03_2_main.c +++ b/src/world/area_kkj/kkj_03/kkj_03_2_main.c @@ -25,47 +25,47 @@ EvtScript N(EVS_ExitDoors_kkj_02_1) = EVT_EXIT_DOUBLE_DOOR(kkj_03_ENTRY_0, "kkj_ COLLIDER_deilit1, MODEL_door1, MODEL_door2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_02_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilit1, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_kkj_02_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilit1, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kkj_03_ENTRY_0) - EVT_SET(LVar2, MODEL_door1) - EVT_SET(LVar3, MODEL_door2) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_Scene_MeetingPeach)) - EVT_CASE_EQ(kkj_03_ENTRY_1) - EVT_EXEC(N(EVS_Scene_Ascending)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kkj_03_ENTRY_0) + Set(LVar2, MODEL_door1) + Set(LVar3, MODEL_door2) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_Scene_MeetingPeach)) + CaseEq(kkj_03_ENTRY_1) + Exec(N(EVS_Scene_Ascending)) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PEACH_CASTLE_GROUNDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(EnableGroup, MODEL_g156, FALSE) - EVT_CALL(SetTexPanner, MODEL_o715, TEX_PANNER_0) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_PEACH_CASTLE_GROUNDS) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(EnableGroup, MODEL_g156, FALSE) + Call(SetTexPanner, MODEL_o715, TEX_PANNER_0) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_0) TEX_PAN_PARAMS_STEP( 0, 0, 40, 900) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetModelCustomGfx, MODEL_o715, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetCustomGfx, CUSTOM_GFX_0, EVT_PTR(N(setup_gfx_candle_lights)), NULL) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetModelCustomGfx, MODEL_o715, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetCustomGfx, CUSTOM_GFX_0, Ref(N(setup_gfx_candle_lights)), NULL) + Exec(N(EVS_SetupMusic)) + Call(UseDoorSounds, DOOR_SOUNDS_LARGE) + Exec(N(EVS_BindExitTriggers)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_kkj/kkj_03/kkj_03_4_scenes.c b/src/world/area_kkj/kkj_03/kkj_03_4_scenes.c index 3c90338bc7d..efb94f329e1 100644 --- a/src/world/area_kkj/kkj_03/kkj_03_4_scenes.c +++ b/src/world/area_kkj/kkj_03/kkj_03_4_scenes.c @@ -2,146 +2,146 @@ #include "sprite/player.h" EvtScript N(EVS_Scene_MeetingPeach) = { - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GE(LVar0, 525) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(FadeOutMusic, 0, 666) - EVT_WAIT(20 * DT) - EVT_CALL(SetMusicTrack, 0, SONG_PRISONER_PEACH_THEME, 0, 8) - EVT_CALL(PlayerFaceNpc, NPC_Peach, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Walk) - EVT_CALL(SetNpcSpeed, NPC_Peach, EVT_FLOAT(2.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Peach, 625, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach2_RaiseArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_Peach, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_Intro_004B) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach2_LowerArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Idle) - EVT_THREAD - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(5.0 / DT), 600, 0, -12, EVT_FLOAT(325.0), EVT_FLOAT(17.0), EVT_FLOAT(-9.0)) - EVT_END_THREAD - EVT_CALL(PlayerMoveTo, 575, 0, 20 * DT) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach2_RaiseArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_Peach, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_Intro_004C) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Peach, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_Intro_004D) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach2_LowerArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(FadeOutMusic, 0, 1000) - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(PlayerMoveTo, 590, 0, 10 * DT) - EVT_WAIT(5 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, 0, EMOTE_EXCLAMATION, -45, 20, EMOTER_PLAYER, 0, 0, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(InterpNpcYaw, NPC_Peach, 90, 7 * DT) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Walk) - EVT_CALL(NpcMoveTo, NPC_Peach, 640, 0, 10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Idle) - EVT_CALL(PlaySoundAtNpc, NPC_Peach, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_Peach, EMOTE_EXCLAMATION, -45, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach2_LookAround) - EVT_WAIT(60 * DT) - EVT_CALL(InterpNpcYaw, NPC_Peach, 270, 7 * DT) - EVT_END_THREAD - EVT_WAIT(17 * DT) - EVT_THREAD - EVT_CALL(PlaySound, SOUND_LOOP_KKJ_RUMBLING) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 200 * DT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_WAIT(60 * DT) - EVT_CALL(GotoMap, EVT_PTR("osr_04"), osr_04_ENTRY_0) - EVT_WAIT(100 * DT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Loop(0) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGe(LVar0, 525) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, TRUE) + Call(FadeOutMusic, 0, 666) + Wait(20 * DT) + Call(SetMusicTrack, 0, SONG_PRISONER_PEACH_THEME, 0, 8) + Call(PlayerFaceNpc, NPC_Peach, FALSE) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Walk) + Call(SetNpcSpeed, NPC_Peach, Float(2.0 / DT)) + Call(NpcMoveTo, NPC_Peach, 625, 0, 0) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Idle) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach2_RaiseArms) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_Peach, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_Intro_004B) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach2_LowerArms) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Idle) + Thread + Call(SetCamProperties, CAM_DEFAULT, Float(5.0 / DT), 600, 0, -12, Float(325.0), Float(17.0), Float(-9.0)) + EndThread + Call(PlayerMoveTo, 575, 0, 20 * DT) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach2_RaiseArms) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_Peach, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_Intro_004C) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Peach, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_Intro_004D) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach2_LowerArms) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Idle) + Wait(10 * DT) + Call(FadeOutMusic, 0, 1000) + Thread + Wait(10 * DT) + Call(PlayerMoveTo, 590, 0, 10 * DT) + Wait(5 * DT) + Call(PlaySoundAtPlayer, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, 0, EMOTE_EXCLAMATION, -45, 20, EMOTER_PLAYER, 0, 0, 0, 0) + EndThread + Thread + Call(InterpNpcYaw, NPC_Peach, 90, 7 * DT) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Walk) + Call(NpcMoveTo, NPC_Peach, 640, 0, 10 * DT) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Idle) + Call(PlaySoundAtNpc, NPC_Peach, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_Peach, EMOTE_EXCLAMATION, -45, 20, EMOTER_NPC, 0, 0, 0, 0) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach2_LookAround) + Wait(60 * DT) + Call(InterpNpcYaw, NPC_Peach, 270, 7 * DT) + EndThread + Wait(17 * DT) + Thread + Call(PlaySound, SOUND_LOOP_KKJ_RUMBLING) + Call(ShakeCam, CAM_DEFAULT, 0, 200 * DT, Float(1.0)) + EndThread + Wait(60 * DT) + Call(GotoMap, Ref("osr_04"), osr_04_ENTRY_0) + Wait(100 * DT) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_TexPan_Clouds) = { - EVT_CALL(EnableTexPanning, MODEL_o718, TRUE) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, -200) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(EnableTexPanning, MODEL_o718, TRUE) + Set(LVar0, 0) + Loop(0) + Add(LVar0, -200) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar0, 0) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_MoveClouds) = { - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_CALL(TranslateGroup, MODEL_g159, 0, LVar0, 0) - EVT_ADD(LVar0, -2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVar0, 0) + Loop(0) + Call(TranslateGroup, MODEL_g159, 0, LVar0, 0) + Add(LVar0, -2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_Scene_Ascending) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcPos, NPC_Peach, 680, 0, -15) - EVT_CALL(EnableGroup, MODEL_g156, TRUE) - EVT_EXEC(N(EVS_TexPan_Clouds)) - EVT_EXEC(N(EVS_MoveClouds)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 600, 0, -15) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 600, 0, -15) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_CALL(SetPlayerJumpscale, 0) - EVT_LOOP(0) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(PlayerJump1, 550, 0, 0, 20 * DT) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(PlayerJump1, 630, 0, 0, 20 * DT) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Run) - EVT_WAIT(15 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_CarryAboveRun) - EVT_WAIT(15 * DT) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach1_RunLiftDress) - EVT_LOOP(0) - EVT_CALL(NpcMoveTo, NPC_Peach, 600, 0, 20 * DT) - EVT_CALL(NpcMoveTo, NPC_Peach, 680, 0, 20 * DT) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(PlaySound, SOUND_LOOP_KKJ_RUMBLING) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 200, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_WAIT(100 * DT) - EVT_CALL(GotoMap, EVT_PTR("osr_03"), osr_03_ENTRY_1) - EVT_WAIT(100 * DT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(SetNpcPos, NPC_Peach, 680, 0, -15) + Call(EnableGroup, MODEL_g156, TRUE) + Exec(N(EVS_TexPan_Clouds)) + Exec(N(EVS_MoveClouds)) + Call(UseSettingsFrom, CAM_DEFAULT, 600, 0, -15) + Call(SetPanTarget, CAM_DEFAULT, 600, 0, -15) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Call(SetPlayerJumpscale, 0) + Loop(0) + Call(InterpPlayerYaw, 270, 0) + Call(PlayerJump1, 550, 0, 0, 20 * DT) + Call(InterpPlayerYaw, 90, 0) + Call(PlayerJump1, 630, 0, 0, 20 * DT) + EndLoop + EndThread + Thread + Loop(0) + Call(SetPlayerAnimation, ANIM_Mario1_Run) + Wait(15 * DT) + Call(SetPlayerAnimation, ANIM_MarioW1_CarryAboveRun) + Wait(15 * DT) + EndLoop + EndThread + Thread + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach1_RunLiftDress) + Loop(0) + Call(NpcMoveTo, NPC_Peach, 600, 0, 20 * DT) + Call(NpcMoveTo, NPC_Peach, 680, 0, 20 * DT) + EndLoop + EndThread + Thread + Call(PlaySound, SOUND_LOOP_KKJ_RUMBLING) + Call(ShakeCam, CAM_DEFAULT, 0, 200, Float(1.0)) + EndThread + Wait(100 * DT) + Call(GotoMap, Ref("osr_03"), osr_03_ENTRY_1) + Wait(100 * DT) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_kkj/kkj_10/kkj_10_1_main.c b/src/world/area_kkj/kkj_10/kkj_10_1_main.c index 06e6ef3271c..f3ecfb9162f 100644 --- a/src/world/area_kkj/kkj_10/kkj_10_1_main.c +++ b/src/world/area_kkj/kkj_10/kkj_10_1_main.c @@ -13,176 +13,176 @@ API_CALLABLE(N(DisableAllLightSources)) { #include "../common/SetAvailableDisguise.inc.c" EvtScript N(EVS_ExitDoors_osr_02_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE) - EVT_SET(LVar0, kkj_10_ENTRY_0) - EVT_SET(LVar1, COLLIDER_tts) - EVT_SET(LVar2, MODEL_door2) - EVT_SET(LVar3, MODEL_door1) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("osr_02"), osr_02_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_LARGE) + Set(LVar0, kkj_10_ENTRY_0) + Set(LVar1, COLLIDER_tts) + Set(LVar2, MODEL_door2) + Set(LVar3, MODEL_door1) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("osr_02"), osr_02_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_kkj_11_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE) - EVT_SET(LVar0, kkj_10_ENTRY_1) - EVT_SET(LVar1, COLLIDER_ttn) - EVT_SET(LVar2, MODEL_door3) - EVT_SET(LVar3, MODEL_door4) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kkj_11"), kkj_11_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_LARGE) + Set(LVar0, kkj_10_ENTRY_1) + Set(LVar1, COLLIDER_ttn) + Set(LVar2, MODEL_door3) + Set(LVar3, MODEL_door4) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("kkj_11"), kkj_11_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_kkj_21_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, kkj_10_ENTRY_2) - EVT_SET(LVar1, COLLIDER_ttw) - EVT_SET(LVar2, MODEL_door5) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kkj_21"), kkj_21_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, kkj_10_ENTRY_2) + Set(LVar1, COLLIDER_ttw) + Set(LVar2, MODEL_door5) + Set(LVar3, DOOR_SWING_OUT) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("kkj_21"), kkj_21_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_kkj_19_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, kkj_10_ENTRY_3) - EVT_SET(LVar1, COLLIDER_ttne) - EVT_SET(LVar2, MODEL_door8) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kkj_19"), kkj_19_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, kkj_10_ENTRY_3) + Set(LVar1, COLLIDER_ttne) + Set(LVar2, MODEL_door8) + Set(LVar3, DOOR_SWING_OUT) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("kkj_19"), kkj_19_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_kkj_20_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, kkj_10_ENTRY_4) - EVT_SET(LVar1, COLLIDER_tte) - EVT_SET(LVar2, MODEL_door7) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kkj_20"), kkj_20_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, kkj_10_ENTRY_4) + Set(LVar1, COLLIDER_tte) + Set(LVar2, MODEL_door7) + Set(LVar3, DOOR_SWING_OUT) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("kkj_20"), kkj_20_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_kkj_29_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, kkj_10_ENTRY_2) - EVT_SET(LVar1, COLLIDER_ttw) - EVT_SET(LVar2, MODEL_door5) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kkj_29"), kkj_29_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, kkj_10_ENTRY_2) + Set(LVar1, COLLIDER_ttw) + Set(LVar2, MODEL_door5) + Set(LVar3, DOOR_SWING_OUT) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("kkj_29"), kkj_29_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_IF_GT(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_osr_02_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tts, 1, 0) - EVT_END_IF - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_CH5_BEGAN_PEACH_MISSION) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_29_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_CASE_DEFAULT - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_21_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_END_SWITCH - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_11_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttn, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_19_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttne, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_20_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_RETURN - EVT_END + IfGt(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) + BindTrigger(Ref(N(EVS_ExitDoors_osr_02_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tts, 1, 0) + EndIf + Switch(GB_StoryProgress) + CaseEq(STORY_CH5_BEGAN_PEACH_MISSION) + BindTrigger(Ref(N(EVS_ExitDoors_kkj_29_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + CaseDefault + BindTrigger(Ref(N(EVS_ExitDoors_kkj_21_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + EndSwitch + BindTrigger(Ref(N(EVS_ExitDoors_kkj_11_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttn, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_kkj_19_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttne, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_kkj_20_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kkj_10_ENTRY_0) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE) - EVT_SET(LVar2, MODEL_door2) - EVT_SET(LVar3, MODEL_door1) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(kkj_10_ENTRY_1) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE) - EVT_SET(LVar2, MODEL_door3) - EVT_SET(LVar3, MODEL_door4) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(kkj_10_ENTRY_2) - EVT_SET(LVar2, MODEL_door5) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_CASE_EQ(kkj_10_ENTRY_3) - EVT_SET(LVar2, MODEL_door8) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_CASE_EQ(kkj_10_ENTRY_4) - EVT_SET(LVar2, MODEL_door7) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kkj_10_ENTRY_0) + Call(UseDoorSounds, DOOR_SOUNDS_LARGE) + Set(LVar2, MODEL_door2) + Set(LVar3, MODEL_door1) + ExecWait(EnterDoubleDoor) + CaseEq(kkj_10_ENTRY_1) + Call(UseDoorSounds, DOOR_SOUNDS_LARGE) + Set(LVar2, MODEL_door3) + Set(LVar3, MODEL_door4) + ExecWait(EnterDoubleDoor) + CaseEq(kkj_10_ENTRY_2) + Set(LVar2, MODEL_door5) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSingleDoor) + CaseEq(kkj_10_ENTRY_3) + Set(LVar2, MODEL_door8) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSingleDoor) + CaseEq(kkj_10_ENTRY_4) + Set(LVar2, MODEL_door7) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSingleDoor) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PEACHS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_KKJ_10) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_OR_EQ(STORY_CH4_BEGAN_PEACH_MISSION) - EVT_CASE_OR_EQ(STORY_CH5_BEGAN_PEACH_MISSION) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(EarlyNPCs))) - EVT_END_CASE_GROUP - EVT_CASE_EQ(STORY_CH6_BEGAN_PEACH_MISSION) - EVT_CALL(N(SetAvailableDisguise), PEACH_DISGUISE_KOOPATROL) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(LaterNPCs))) - EVT_CASE_DEFAULT - EVT_CALL(EnableModel, MODEL_o273, FALSE) - EVT_CALL(EnableModel, MODEL_o274, FALSE) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_IF_GE(GB_StoryProgress, STORY_CH8_REACHED_BOWSERS_CASTLE) - EVT_CALL(N(DisableAllLightSources)) - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH8_REACHED_PEACHS_CASTLE) - EVT_CALL(SetMusicTrack, 0, SONG_PEACH_SNEAKING, 0, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_BOWSER_ATTACKS, 1, 8) - EVT_END_IF - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_PEACHS_CASTLE) + Call(SetSpriteShading, SHADING_KKJ_10) + SetUP_CAMERA_NO_LEAD() + Switch(GB_StoryProgress) + CaseOrEq(STORY_CH4_BEGAN_PEACH_MISSION) + CaseOrEq(STORY_CH5_BEGAN_PEACH_MISSION) + Call(MakeNpcs, FALSE, Ref(N(EarlyNPCs))) + EndCaseGroup + CaseEq(STORY_CH6_BEGAN_PEACH_MISSION) + Call(N(SetAvailableDisguise), PEACH_DISGUISE_KOOPATROL) + Call(MakeNpcs, FALSE, Ref(N(LaterNPCs))) + CaseDefault + Call(EnableModel, MODEL_o273, FALSE) + Call(EnableModel, MODEL_o274, FALSE) + EndSwitch + ExecWait(N(EVS_MakeEntities)) + IfGe(GB_StoryProgress, STORY_CH8_REACHED_BOWSERS_CASTLE) + Call(N(DisableAllLightSources)) + EndIf + IfLt(GB_StoryProgress, STORY_CH8_REACHED_PEACHS_CASTLE) + Call(SetMusicTrack, 0, SONG_PEACH_SNEAKING, 0, 8) + Else + Call(SetMusicTrack, 0, SONG_BOWSER_ATTACKS, 1, 8) + EndIf + Exec(N(EVS_BindExitTriggers)) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_kkj/kkj_10/kkj_10_2_entity.c b/src/world/area_kkj/kkj_10/kkj_10_2_entity.c index 2d0fe7f9fd0..c7f4c4c399e 100644 --- a/src/world/area_kkj/kkj_10/kkj_10_2_entity.c +++ b/src/world/area_kkj/kkj_10/kkj_10_2_entity.c @@ -9,39 +9,39 @@ s32 N(PeachKeyList)[] = { }; EvtScript N(EVS_UnlockPrompt_FrontDoor) = { - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, 0, 10, 490) - EVT_SET(LVar0, MV_PadlockEntityIdx) - EVT_CALL(N(RemovePadlock)) - EVT_WAIT(5) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_SET(GF_KKJ10_UnlockedDoor, TRUE) - EVT_CALL(CloseChoicePopup) - EVT_UNBIND - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_osr_02_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tts, 1, 0) - EVT_RETURN - EVT_END + Call(ShowKeyChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) + Call(CloseChoicePopup) + Return + EndIf + IfEq(LVar0, -1) + Call(CloseChoicePopup) + Return + EndIf + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, 0, 10, 490) + Set(LVar0, MV_PadlockEntityIdx) + Call(N(RemovePadlock)) + Wait(5) + Call(RemoveKeyItemAt, LVar1) + Set(GF_KKJ10_UnlockedDoor, TRUE) + Call(CloseChoicePopup) + Unbind + BindTrigger(Ref(N(EVS_ExitDoors_osr_02_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tts, 1, 0) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_LE(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) - EVT_IF_EQ(GF_KKJ10_UnlockedDoor, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), 0, 10, 490, 180, MAKE_ENTITY_END) - EVT_SET(MV_PadlockEntityIdx, LVar0) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_UnlockPrompt_FrontDoor)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(PeachKeyList)), 0, 1) - EVT_ELSE - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_osr_02_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tts, 1, 0) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfLe(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) + IfEq(GF_KKJ10_UnlockedDoor, FALSE) + Call(MakeEntity, Ref(Entity_Padlock), 0, 10, 490, 180, MAKE_ENTITY_END) + Set(MV_PadlockEntityIdx, LVar0) + BindPadlock(Ref(N(EVS_UnlockPrompt_FrontDoor)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), Ref(N(PeachKeyList)), 0, 1) + Else + BindTrigger(Ref(N(EVS_ExitDoors_osr_02_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tts, 1, 0) + EndIf + EndIf + Return + End }; diff --git a/src/world/area_kkj/kkj_10/kkj_10_3_npcs_early.c b/src/world/area_kkj/kkj_10/kkj_10_3_npcs_early.c index 890c466da6e..c4abb4f302a 100644 --- a/src/world/area_kkj/kkj_10/kkj_10_3_npcs_early.c +++ b/src/world/area_kkj/kkj_10/kkj_10_3_npcs_early.c @@ -8,115 +8,115 @@ #include "../common/ApproachPlayer100Units.inc.c" EvtScript N(EVS_CapturePeach) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(NpcFacePlayer, NPC_SELF, 5) - EVT_WAIT(20) - EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Gasp) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim02) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0174) - EVT_CALL(N(ApproachPlayer100Units), -1, LVar3, LVar0, LVar2) - EVT_IF_NE(LVar3, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim07) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim02) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0175) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_ForwardSad) - EVT_WAIT(20) - EVT_CALL(GotoMapSpecial, EVT_PTR("kkj_14"), kkj_14_ENTRY_B, TRANSITION_PEACH_CAPTURED) - EVT_WAIT(100) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) + Call(NpcFacePlayer, NPC_SELF, 5) + Wait(20) + Call(PlayerFaceNpc, NPC_SELF, FALSE) + Call(SetPlayerAnimation, ANIM_Peach2_Gasp) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim02) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0174) + Call(N(ApproachPlayer100Units), -1, LVar3, LVar0, LVar2) + IfNe(LVar3, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim07) + Call(SetNpcSpeed, NPC_SELF, Float(5.0)) + Call(NpcMoveTo, NPC_SELF, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim02) + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0175) + Call(SetPlayerAnimation, ANIM_Peach2_ForwardSad) + Wait(20) + Call(GotoMapSpecial, Ref("kkj_14"), kkj_14_ENTRY_B, TRANSITION_PEACH_CAPTURED) + Wait(100) + Call(DisablePlayerInput, FALSE) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + End }; EvtScript N(EVS_NpcIdle_Koopatrol_01) = { - EVT_THREAD - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_CALL(N(UpdateSearchlight), LVar0, 100, 90, 0, 40, 130, 0) - EVT_IF_NE(LVar0, 0) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_CapturePeach))) - EVT_SET(LVar1, 1) - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(2.0)) - EVT_LOOP(0) - EVT_CALL(NpcMoveTo, NPC_SELF, -240, 240, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, -240, 240, 0, 240) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, 0, 240, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, 0, 240, -240, 240) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, -240, 240, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, -240, 240, -240, 0) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, -240, 0, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, -240, 0, -240, 240) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_END_LOOP - EVT_RETURN - EVT_END + Thread + Set(LVar1, 0) + Loop(0) + Call(N(UpdateSearchlight), LVar0, 100, 90, 0, 40, 130, 0) + IfNe(LVar0, 0) + IfEq(LVar1, 0) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_CapturePeach))) + Set(LVar1, 1) + EndIf + EndIf + Wait(1) + EndLoop + EndThread + Call(SetNpcSpeed, NPC_SELF, Float(2.0)) + Loop(0) + Call(NpcMoveTo, NPC_SELF, -240, 240, 0) + Call(N(GetAngleBetweenPoints), LVar0, -240, 240, 0, 240) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + Call(NpcMoveTo, NPC_SELF, 0, 240, 0) + Call(N(GetAngleBetweenPoints), LVar0, 0, 240, -240, 240) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + Call(NpcMoveTo, NPC_SELF, -240, 240, 0) + Call(N(GetAngleBetweenPoints), LVar0, -240, 240, -240, 0) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + Call(NpcMoveTo, NPC_SELF, -240, 0, 0) + Call(N(GetAngleBetweenPoints), LVar0, -240, 0, -240, 240) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_Koopatrol_02) = { - EVT_THREAD - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_CALL(N(UpdateSearchlight), LVar0, 100, 90, 0, 40, 131, 1) - EVT_IF_NE(LVar0, 0) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_CapturePeach))) - EVT_SET(LVar1, 1) - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(2.0)) - EVT_LOOP(0) - EVT_CALL(NpcMoveTo, NPC_SELF, 240, 240, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, 240, 240, 240, 0) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, 240, 0, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, 240, 0, 240, 240) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, 240, 240, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, 240, 240, 0, 240) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, 0, 240, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, 0, 240, 240, 240) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_END_LOOP - EVT_RETURN - EVT_END + Thread + Set(LVar1, 0) + Loop(0) + Call(N(UpdateSearchlight), LVar0, 100, 90, 0, 40, 131, 1) + IfNe(LVar0, 0) + IfEq(LVar1, 0) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_CapturePeach))) + Set(LVar1, 1) + EndIf + EndIf + Wait(1) + EndLoop + EndThread + Call(SetNpcSpeed, NPC_SELF, Float(2.0)) + Loop(0) + Call(NpcMoveTo, NPC_SELF, 240, 240, 0) + Call(N(GetAngleBetweenPoints), LVar0, 240, 240, 240, 0) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + Call(NpcMoveTo, NPC_SELF, 240, 0, 0) + Call(N(GetAngleBetweenPoints), LVar0, 240, 0, 240, 240) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + Call(NpcMoveTo, NPC_SELF, 240, 240, 0) + Call(N(GetAngleBetweenPoints), LVar0, 240, 240, 0, 240) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + Call(NpcMoveTo, NPC_SELF, 0, 240, 0) + Call(N(GetAngleBetweenPoints), LVar0, 0, 240, 240, 240) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + EndLoop + Return + End }; EvtScript N(EVS_NpcInit_Koopatrol_01) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim05) - EVT_CALL(SetNpcPos, NPC_SELF, -240, 0, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Koopatrol_01))) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim05) + Call(SetNpcPos, NPC_SELF, -240, 0, 0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Koopatrol_01))) + Return + End }; EvtScript N(EVS_NpcInit_Koopatrol_02) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim05) - EVT_CALL(SetNpcPos, NPC_SELF, 0, 0, 240) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Koopatrol_02))) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim05) + Call(SetNpcPos, NPC_SELF, 0, 0, 240) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Koopatrol_02))) + Return + End }; AnimID N(ExtraAnims_Koopatrol)[] = { diff --git a/src/world/area_kkj/kkj_10/kkj_10_4_npcs_later.c b/src/world/area_kkj/kkj_10/kkj_10_4_npcs_later.c index 89bafcc484d..2ae0ff1ab84 100644 --- a/src/world/area_kkj/kkj_10/kkj_10_4_npcs_later.c +++ b/src/world/area_kkj/kkj_10/kkj_10_4_npcs_later.c @@ -26,166 +26,166 @@ AnimID N(ExtraAnims_Koopatrol)[] = { #include "../common/ApproachPlayer100Units.inc.c" EvtScript N(EVS_CapturePeach) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(N(PreventNextPeachDisguise)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(NpcFacePlayer, NPC_SELF, 5) - EVT_WAIT(20) - EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Gasp) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim02) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0174) - EVT_CALL(N(ApproachPlayer100Units), -1, LVar3, LVar0, LVar2) - EVT_IF_NE(LVar3, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim07) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim02) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0175) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_ForwardSad) - EVT_WAIT(20) - EVT_CALL(GotoMapSpecial, EVT_PTR("kkj_14"), kkj_14_ENTRY_B, TRANSITION_PEACH_CAPTURED) - EVT_WAIT(100) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(N(PreventNextPeachDisguise)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) + Call(NpcFacePlayer, NPC_SELF, 5) + Wait(20) + Call(PlayerFaceNpc, NPC_SELF, FALSE) + Call(SetPlayerAnimation, ANIM_Peach2_Gasp) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim02) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0174) + Call(N(ApproachPlayer100Units), -1, LVar3, LVar0, LVar2) + IfNe(LVar3, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim07) + Call(SetNpcSpeed, NPC_SELF, Float(5.0)) + Call(NpcMoveTo, NPC_SELF, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim02) + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0175) + Call(SetPlayerAnimation, ANIM_Peach2_ForwardSad) + Wait(20) + Call(GotoMapSpecial, Ref("kkj_14"), kkj_14_ENTRY_B, TRANSITION_PEACH_CAPTURED) + Wait(100) + Call(DisablePlayerInput, FALSE) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + End }; EvtScript N(EVS_NpcIdle_Koopatrol_01) = { - EVT_THREAD - EVT_SET(LVar2, 0) - EVT_LOOP(0) - EVT_CALL(N(UpdateSearchlight), LVar0, 100, 90, 0, 40, 130, 0) - EVT_IF_EQ(LVar2, 0) - EVT_CALL(N(GetPeachDisguise), LVar1) - EVT_IF_EQ(LVar1, PEACH_DISGUISE_NONE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 1) - EVT_IF_NE(LVar0, 0) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_CapturePeach))) - EVT_SET(LVar2, 1) - EVT_END_IF - EVT_ELSE - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 0) - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(2.0)) - EVT_LOOP(0) - EVT_CALL(NpcMoveTo, NPC_SELF, -240, 240, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, -240, 240, 0, 240) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, 0, 240, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, 0, 240, -240, 240) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, -240, 240, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, -240, 240, -240, -50) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, -240, -50, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, -240, -50, -240, 240) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_END_LOOP - EVT_RETURN - EVT_END + Thread + Set(LVar2, 0) + Loop(0) + Call(N(UpdateSearchlight), LVar0, 100, 90, 0, 40, 130, 0) + IfEq(LVar2, 0) + Call(N(GetPeachDisguise), LVar1) + IfEq(LVar1, PEACH_DISGUISE_NONE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 1) + IfNe(LVar0, 0) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_CapturePeach))) + Set(LVar2, 1) + EndIf + Else + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 0) + EndIf + EndIf + Wait(1) + EndLoop + EndThread + Call(SetNpcSpeed, NPC_SELF, Float(2.0)) + Loop(0) + Call(NpcMoveTo, NPC_SELF, -240, 240, 0) + Call(N(GetAngleBetweenPoints), LVar0, -240, 240, 0, 240) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + Call(NpcMoveTo, NPC_SELF, 0, 240, 0) + Call(N(GetAngleBetweenPoints), LVar0, 0, 240, -240, 240) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + Call(NpcMoveTo, NPC_SELF, -240, 240, 0) + Call(N(GetAngleBetweenPoints), LVar0, -240, 240, -240, -50) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + Call(NpcMoveTo, NPC_SELF, -240, -50, 0) + Call(N(GetAngleBetweenPoints), LVar0, -240, -50, -240, 240) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_Koopatrol_02) = { - EVT_THREAD - EVT_SET(LVar2, 0) - EVT_LOOP(0) - EVT_CALL(N(UpdateSearchlight), LVar0, 100, 90, 0, 40, 131, 1) - EVT_IF_EQ(LVar2, 0) - EVT_CALL(N(GetPeachDisguise), LVar1) - EVT_IF_EQ(LVar1, PEACH_DISGUISE_NONE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_CapturePeach))) - EVT_SET(LVar2, 1) - EVT_END_IF - EVT_ELSE - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 0) - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(2.0)) - EVT_LOOP(0) - EVT_CALL(NpcMoveTo, NPC_SELF, 240, 240, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, 240, 240, 240, -50) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, 240, -50, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, 240, -50, 240, 240) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, 240, 240, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, 240, 240, 0, 240) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, 0, 240, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, 0, 240, 240, 240) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_END_LOOP - EVT_RETURN - EVT_END + Thread + Set(LVar2, 0) + Loop(0) + Call(N(UpdateSearchlight), LVar0, 100, 90, 0, 40, 131, 1) + IfEq(LVar2, 0) + Call(N(GetPeachDisguise), LVar1) + IfEq(LVar1, PEACH_DISGUISE_NONE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 0) + IfNe(LVar0, 0) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_CapturePeach))) + Set(LVar2, 1) + EndIf + Else + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 0) + EndIf + EndIf + Wait(1) + EndLoop + EndThread + Call(SetNpcSpeed, NPC_SELF, Float(2.0)) + Loop(0) + Call(NpcMoveTo, NPC_SELF, 240, 240, 0) + Call(N(GetAngleBetweenPoints), LVar0, 240, 240, 240, -50) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + Call(NpcMoveTo, NPC_SELF, 240, -50, 0) + Call(N(GetAngleBetweenPoints), LVar0, 240, -50, 240, 240) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + Call(NpcMoveTo, NPC_SELF, 240, 240, 0) + Call(N(GetAngleBetweenPoints), LVar0, 240, 240, 0, 240) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + Call(NpcMoveTo, NPC_SELF, 0, 240, 0) + Call(N(GetAngleBetweenPoints), LVar0, 0, 240, 240, 240) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + EndLoop + Return + End }; EvtScript N(EVS_NpcInteract_Koopatrol_01) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 5, MSG_Peach_013C) - EVT_CALL(SetSelfVar, 0, 1) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 5, MSG_Peach_013D) - EVT_CALL(SetSelfVar, 0, 0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 5, MSG_Peach_013C) + Call(SetSelfVar, 0, 1) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 5, MSG_Peach_013D) + Call(SetSelfVar, 0, 0) + EndIf + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_Koopatrol_02) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(GetPeachDisguise), LVar0) - EVT_IF_EQ(LVar0, PEACH_DISGUISE_CLUBBA) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 5, MSG_Peach_0140) - EVT_ELSE - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 5, MSG_Peach_013E) - EVT_CALL(SetSelfVar, 0, 1) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 5, MSG_Peach_013F) - EVT_CALL(SetSelfVar, 0, 0) - EVT_END_IF - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(N(GetPeachDisguise), LVar0) + IfEq(LVar0, PEACH_DISGUISE_CLUBBA) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 5, MSG_Peach_0140) + Else + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 5, MSG_Peach_013E) + Call(SetSelfVar, 0, 1) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 5, MSG_Peach_013F) + Call(SetSelfVar, 0, 0) + EndIf + EndIf + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Koopatrol_01) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim05) - EVT_CALL(SetNpcPos, NPC_SELF, -240, 0, -50) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Koopatrol_01))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Koopatrol_01))) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim05) + Call(SetNpcPos, NPC_SELF, -240, 0, -50) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Koopatrol_01))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Koopatrol_01))) + Return + End }; EvtScript N(EVS_NpcInit_Koopatrol_02) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim05) - EVT_CALL(SetNpcPos, NPC_SELF, 0, 0, 240) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Koopatrol_02))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Koopatrol_02))) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim05) + Call(SetNpcPos, NPC_SELF, 0, 0, 240) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Koopatrol_02))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Koopatrol_02))) + Return + End }; NpcData N(NpcData_Koopatrol)[] = { diff --git a/src/world/area_kkj/kkj_11/kkj_11_1_main.c b/src/world/area_kkj/kkj_11/kkj_11_1_main.c index 50d232915e2..ca90239d5a5 100644 --- a/src/world/area_kkj/kkj_11/kkj_11_1_main.c +++ b/src/world/area_kkj/kkj_11/kkj_11_1_main.c @@ -13,211 +13,211 @@ API_CALLABLE(N(DisableAllLightSources)) { #include "../common/SetAvailableDisguise.inc.c" EvtScript N(EVS_ExitDoors_kkj_10_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE) - EVT_SET(LVar0, kkj_11_ENTRY_0) - EVT_SET(LVar1, COLLIDER_tts) - EVT_SET(LVar2, MODEL_door2) - EVT_SET(LVar3, MODEL_door1) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kkj_10"), kkj_10_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_LARGE) + Set(LVar0, kkj_11_ENTRY_0) + Set(LVar1, COLLIDER_tts) + Set(LVar2, MODEL_door2) + Set(LVar3, MODEL_door1) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("kkj_10"), kkj_10_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_kkj_12_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE) - EVT_SET(LVar0, kkj_11_ENTRY_1) - EVT_SET(LVar1, COLLIDER_ttn) - EVT_SET(LVar2, MODEL_door3) - EVT_SET(LVar3, MODEL_door4) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kkj_12"), kkj_12_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_LARGE) + Set(LVar0, kkj_11_ENTRY_1) + Set(LVar1, COLLIDER_ttn) + Set(LVar2, MODEL_door3) + Set(LVar3, MODEL_door4) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("kkj_12"), kkj_12_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoor_kkj_14_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, kkj_11_ENTRY_4) - EVT_SET(LVar1, COLLIDER_ttn2) - EVT_SET(LVar2, MODEL_door7) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kkj_14"), kkj_14_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, kkj_11_ENTRY_4) + Set(LVar1, COLLIDER_ttn2) + Set(LVar2, MODEL_door7) + Set(LVar3, DOOR_SWING_OUT) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("kkj_14"), kkj_14_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoor_kkj_16_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, kkj_11_ENTRY_2) - EVT_SET(LVar1, COLLIDER_ttsw) - EVT_SET(LVar2, MODEL_door5) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kkj_16"), kkj_16_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, kkj_11_ENTRY_2) + Set(LVar1, COLLIDER_ttsw) + Set(LVar2, MODEL_door5) + Set(LVar3, DOOR_SWING_OUT) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("kkj_16"), kkj_16_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoor_kkj_15_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, kkj_11_ENTRY_3) - EVT_SET(LVar1, COLLIDER_ttw) - EVT_SET(LVar2, MODEL_door6) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kkj_15"), kkj_15_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, kkj_11_ENTRY_3) + Set(LVar1, COLLIDER_ttw) + Set(LVar2, MODEL_door6) + Set(LVar3, DOOR_SWING_OUT) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("kkj_15"), kkj_15_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoor_kkj_17_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, kkj_11_ENTRY_5) - EVT_SET(LVar1, COLLIDER_tte) - EVT_SET(LVar2, MODEL_door8) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kkj_17"), kkj_17_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, kkj_11_ENTRY_5) + Set(LVar1, COLLIDER_tte) + Set(LVar2, MODEL_door8) + Set(LVar3, DOOR_SWING_IN) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("kkj_17"), kkj_17_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoor_kkj_18_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, kkj_11_ENTRY_6) - EVT_SET(LVar1, COLLIDER_ttse) - EVT_SET(LVar2, MODEL_door9) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kkj_18"), kkj_18_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, kkj_11_ENTRY_6) + Set(LVar1, COLLIDER_ttse) + Set(LVar2, MODEL_door9) + Set(LVar3, DOOR_SWING_IN) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("kkj_18"), kkj_18_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_IF_GT(GB_StoryProgress, STORY_CH4_BEGAN_PEACH_MISSION) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_10_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tts, 1, 0) - EVT_END_IF - EVT_IF_GT(GB_StoryProgress, STORY_CH7_BEGAN_PEACH_MISSION) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_12_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttn, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_kkj_14_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttn2, 1, 0) - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_kkj_17_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_kkj_16_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttsw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_kkj_15_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_kkj_18_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttse, 1, 0) - EVT_RETURN - EVT_END + IfGt(GB_StoryProgress, STORY_CH4_BEGAN_PEACH_MISSION) + BindTrigger(Ref(N(EVS_ExitDoors_kkj_10_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tts, 1, 0) + EndIf + IfGt(GB_StoryProgress, STORY_CH7_BEGAN_PEACH_MISSION) + BindTrigger(Ref(N(EVS_ExitDoors_kkj_12_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttn, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoor_kkj_14_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttn2, 1, 0) + EndIf + BindTrigger(Ref(N(EVS_ExitDoor_kkj_17_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoor_kkj_16_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttsw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoor_kkj_15_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoor_kkj_18_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttse, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kkj_11_ENTRY_0) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE) - EVT_SET(LVar2, MODEL_door2) - EVT_SET(LVar3, MODEL_door1) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(kkj_11_ENTRY_1) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE) - EVT_SET(LVar2, MODEL_door3) - EVT_SET(LVar3, MODEL_door4) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(kkj_11_ENTRY_2) - EVT_SET(LVar2, MODEL_door5) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_CASE_EQ(kkj_11_ENTRY_3) - EVT_SET(LVar2, MODEL_door6) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_CASE_EQ(kkj_11_ENTRY_4) - EVT_SET(LVar2, MODEL_door7) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_CASE_EQ(kkj_11_ENTRY_5) - EVT_SET(LVar2, MODEL_door8) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_CASE_EQ(kkj_11_ENTRY_6) - EVT_SET(LVar2, MODEL_door9) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_CASE_EQ(kkj_11_ENTRY_7) - EVT_EXEC_WAIT(N(EVS_FirstTimeEnterHall)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kkj_11_ENTRY_0) + Call(UseDoorSounds, DOOR_SOUNDS_LARGE) + Set(LVar2, MODEL_door2) + Set(LVar3, MODEL_door1) + ExecWait(EnterDoubleDoor) + CaseEq(kkj_11_ENTRY_1) + Call(UseDoorSounds, DOOR_SOUNDS_LARGE) + Set(LVar2, MODEL_door3) + Set(LVar3, MODEL_door4) + ExecWait(EnterDoubleDoor) + CaseEq(kkj_11_ENTRY_2) + Set(LVar2, MODEL_door5) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSingleDoor) + CaseEq(kkj_11_ENTRY_3) + Set(LVar2, MODEL_door6) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSingleDoor) + CaseEq(kkj_11_ENTRY_4) + Set(LVar2, MODEL_door7) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSingleDoor) + CaseEq(kkj_11_ENTRY_5) + Set(LVar2, MODEL_door8) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + CaseEq(kkj_11_ENTRY_6) + Set(LVar2, MODEL_door9) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + CaseEq(kkj_11_ENTRY_7) + ExecWait(N(EVS_FirstTimeEnterHall)) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PEACHS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_KKJ_11) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_OR_EQ(STORY_CH1_BEGAN_PEACH_MISSION) - EVT_CASE_OR_EQ(STORY_CH2_BEGAN_PEACH_MISSION) - EVT_CASE_OR_EQ(STORY_CH3_BEGAN_PEACH_MISSION) - EVT_CASE_OR_EQ(STORY_CH4_BEGAN_PEACH_MISSION) - EVT_CASE_OR_EQ(STORY_CH5_BEGAN_PEACH_MISSION) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(EarlyNPCs))) - EVT_END_CASE_GROUP - EVT_CASE_EQ(STORY_CH6_BEGAN_PEACH_MISSION) - EVT_CALL(N(SetAvailableDisguise), PEACH_DISGUISE_KOOPATROL) - EVT_CALL(EnableModel, MODEL_o364, FALSE) - EVT_CALL(EnableModel, MODEL_o365, FALSE) - EVT_CALL(EnableModel, MODEL_o366, FALSE) - EVT_CALL(N(DisableAllLightSources)) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(LaterNPCs))) - EVT_CASE_DEFAULT - EVT_CALL(EnableModel, MODEL_o364, FALSE) - EVT_CALL(EnableModel, MODEL_o365, FALSE) - EVT_CALL(EnableModel, MODEL_o366, FALSE) - EVT_CALL(N(DisableAllLightSources)) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(GetDemoState, LVar0) - EVT_IF_NE(LVar0, DEMO_STATE_NONE) - EVT_EXEC_WAIT(N(EVS_PlayDemoScene)) - EVT_RETURN - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH8_REACHED_PEACHS_CASTLE) - EVT_CALL(SetMusicTrack, 0, SONG_PEACH_SNEAKING, 0, 8) - EVT_END_IF - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_PEACHS_CASTLE) + Call(SetSpriteShading, SHADING_KKJ_11) + SetUP_CAMERA_NO_LEAD() + Switch(GB_StoryProgress) + CaseOrEq(STORY_CH1_BEGAN_PEACH_MISSION) + CaseOrEq(STORY_CH2_BEGAN_PEACH_MISSION) + CaseOrEq(STORY_CH3_BEGAN_PEACH_MISSION) + CaseOrEq(STORY_CH4_BEGAN_PEACH_MISSION) + CaseOrEq(STORY_CH5_BEGAN_PEACH_MISSION) + Call(MakeNpcs, FALSE, Ref(N(EarlyNPCs))) + EndCaseGroup + CaseEq(STORY_CH6_BEGAN_PEACH_MISSION) + Call(N(SetAvailableDisguise), PEACH_DISGUISE_KOOPATROL) + Call(EnableModel, MODEL_o364, FALSE) + Call(EnableModel, MODEL_o365, FALSE) + Call(EnableModel, MODEL_o366, FALSE) + Call(N(DisableAllLightSources)) + Call(MakeNpcs, FALSE, Ref(N(LaterNPCs))) + CaseDefault + Call(EnableModel, MODEL_o364, FALSE) + Call(EnableModel, MODEL_o365, FALSE) + Call(EnableModel, MODEL_o366, FALSE) + Call(N(DisableAllLightSources)) + EndSwitch + ExecWait(N(EVS_MakeEntities)) + Call(GetDemoState, LVar0) + IfNe(LVar0, DEMO_STATE_NONE) + ExecWait(N(EVS_PlayDemoScene)) + Return + EndIf + IfLt(GB_StoryProgress, STORY_CH8_REACHED_PEACHS_CASTLE) + Call(SetMusicTrack, 0, SONG_PEACH_SNEAKING, 0, 8) + EndIf + Exec(N(EVS_BindExitTriggers)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_kkj/kkj_11/kkj_11_2_entity.c b/src/world/area_kkj/kkj_11/kkj_11_2_entity.c index feecb6de093..8acd131415b 100644 --- a/src/world/area_kkj/kkj_11/kkj_11_2_entity.c +++ b/src/world/area_kkj/kkj_11/kkj_11_2_entity.c @@ -9,39 +9,39 @@ s32 N(PeachKeyList)[] = { #include "world/common/todo/RemovePadlock.inc.c" EvtScript N(EVS_ItemPrompt_Lock) = { - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, 0, 10, 490) - EVT_SET(LVar0, MV_PadlockEntityIdx) - EVT_CALL(N(RemovePadlock)) - EVT_WAIT(5) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_SET(GF_KKJ11_UnlockedKitchen, TRUE) - EVT_CALL(CloseChoicePopup) - EVT_UNBIND - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_10_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tts, 1, 0) - EVT_RETURN - EVT_END + Call(ShowKeyChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) + Call(CloseChoicePopup) + Return + EndIf + IfEq(LVar0, -1) + Call(CloseChoicePopup) + Return + EndIf + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, 0, 10, 490) + Set(LVar0, MV_PadlockEntityIdx) + Call(N(RemovePadlock)) + Wait(5) + Call(RemoveKeyItemAt, LVar1) + Set(GF_KKJ11_UnlockedKitchen, TRUE) + Call(CloseChoicePopup) + Unbind + BindTrigger(Ref(N(EVS_ExitDoors_kkj_10_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tts, 1, 0) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_LE(GB_StoryProgress, STORY_CH4_BEGAN_PEACH_MISSION) - EVT_IF_EQ(GF_KKJ11_UnlockedKitchen, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), 0, 10, 490, 180, MAKE_ENTITY_END) - EVT_SET(MV_PadlockEntityIdx, LVar0) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_ItemPrompt_Lock)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(PeachKeyList)), 0, 1) - EVT_ELSE - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_10_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tts, 1, 0) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfLe(GB_StoryProgress, STORY_CH4_BEGAN_PEACH_MISSION) + IfEq(GF_KKJ11_UnlockedKitchen, FALSE) + Call(MakeEntity, Ref(Entity_Padlock), 0, 10, 490, 180, MAKE_ENTITY_END) + Set(MV_PadlockEntityIdx, LVar0) + BindPadlock(Ref(N(EVS_ItemPrompt_Lock)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), Ref(N(PeachKeyList)), 0, 1) + Else + BindTrigger(Ref(N(EVS_ExitDoors_kkj_10_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tts, 1, 0) + EndIf + EndIf + Return + End }; diff --git a/src/world/area_kkj/kkj_11/kkj_11_3_scene.c b/src/world/area_kkj/kkj_11/kkj_11_3_scene.c index 6d32ba0c902..ede3f18e3fd 100644 --- a/src/world/area_kkj/kkj_11/kkj_11_3_scene.c +++ b/src/world/area_kkj/kkj_11/kkj_11_3_scene.c @@ -1,62 +1,62 @@ #include "kkj_11.h" EvtScript N(EVS_OpenAndCloseDoor) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_OPEN, 0) - EVT_CALL(MakeLerp, 0, -120, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_door6, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(40) - EVT_CALL(MakeLerp, -120, 0, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_door6, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_CLOSE, 0) - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_OPEN, 0) + Call(MakeLerp, 0, -120, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_door6, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(40) + Call(MakeLerp, -120, 0, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_door6, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_CLOSE, 0) + Return + End }; EvtScript N(EVS_FirstTimeEnterHall) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, 10, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 444) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 444) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_WAIT(30) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -430, 0, 50) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -430, 0, 50) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(30) - EVT_SET(AF_KKJ_06, TRUE) - EVT_EXEC(N(EVS_OpenAndCloseDoor)) - EVT_WAIT(10) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(NpcMoveTo, NPC_PARTNER, -455, 50, 30) - EVT_END_THREAD - EVT_CALL(PlayerMoveTo, -430, 50, 30) - EVT_CALL(SetPlayerPos, -430, 0, 50) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_WAIT(5) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_PARTNER, LVar0, 10, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 444) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 444) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(1) + Wait(30) + Call(UseSettingsFrom, CAM_DEFAULT, -430, 0, 50) + Call(SetPanTarget, CAM_DEFAULT, -430, 0, 50) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(30) + Set(AF_KKJ_06, TRUE) + Exec(N(EVS_OpenAndCloseDoor)) + Wait(10) + Thread + Wait(5) + Call(NpcMoveTo, NPC_PARTNER, -455, 50, 30) + EndThread + Call(PlayerMoveTo, -430, 50, 30) + Call(SetPlayerPos, -430, 0, 50) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Wait(5) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_kkj/kkj_11/kkj_11_4_demo.c b/src/world/area_kkj/kkj_11/kkj_11_4_demo.c index a036a2f4aff..2df42bb424c 100644 --- a/src/world/area_kkj/kkj_11/kkj_11_4_demo.c +++ b/src/world/area_kkj/kkj_11/kkj_11_4_demo.c @@ -1,222 +1,222 @@ #include "kkj_11.h" EvtScript N(EVS_ProvideDemoInputs) = { - EVT_CALL(DemoJoystickXY, -75, -44) - EVT_WAIT(41) - EVT_CALL(DemoJoystickXY, -74, -44) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -74, -42) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -74, -40) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -74, -39) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -75, -37) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -75, -35) - EVT_WAIT(2) - EVT_CALL(DemoJoystickXY, -75, -33) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -75, -32) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -76, -31) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -76, -30) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -76, -29) - EVT_WAIT(4) - EVT_CALL(DemoJoystickXY, -76, -28) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -78, -23) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -79, -15) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -81, -7) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -82, -2) - EVT_WAIT(5) - EVT_CALL(DemoJoystickXY, -82, 0) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -81, 2) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -80, 5) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -80, 7) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -79, 9) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -79, 12) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -78, 18) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -77, 21) - EVT_WAIT(12) - EVT_CALL(DemoJoystickXY, -76, 22) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -75, 27) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -74, 30) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -74, 31) - EVT_WAIT(2) - EVT_CALL(DemoJoystickXY, -73, 31) - EVT_WAIT(2) - EVT_CALL(DemoJoystickXY, -73, 33) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -73, 34) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -72, 36) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -71, 38) - EVT_WAIT(10) - EVT_CALL(DemoJoystickXY, -70, 38) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -32, 23) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -1, 0) - EVT_WAIT(5) - EVT_CALL(DemoJoystickXY, -1, -3) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 0, -27) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -1, -64) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -12, -81) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -14, -82) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -24, -81) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -32, -80) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -35, -79) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -43, -77) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -52, -75) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -60, -73) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -66, -72) - EVT_WAIT(5) - EVT_CALL(DemoJoystickXY, -67, -71) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -68, -63) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -71, -53) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -75, -32) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -79, -16) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -82, -2) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -82, 0) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -81, 1) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -81, 2) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -81, 3) - EVT_WAIT(2) - EVT_CALL(DemoJoystickXY, -80, 5) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -80, 7) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -79, 11) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -77, 20) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -73, 33) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -70, 48) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -65, 66) - EVT_WAIT(5) - EVT_CALL(DemoJoystickXY, -65, 67) - EVT_WAIT(28) - EVT_CALL(DemoJoystickXY, -65, 66) - EVT_WAIT(4) - EVT_CALL(DemoJoystickXY, -65, 65) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -60, 59) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -48, 49) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -29, 31) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -13, 15) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -1, 0) - EVT_WAIT(5) - EVT_CALL(DemoJoystickXY, 0, 0) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 2, 0) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 10, 1) - EVT_WAIT(2) - EVT_CALL(DemoJoystickXY, -1, 0) - EVT_WAIT(15) - EVT_CALL(DemoJoystickXY, -2, 9) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -19, 33) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -40, 67) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -44, 71) - EVT_WAIT(5) - EVT_CALL(DemoJoystickXY, -44, 72) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -44, 73) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -43, 73) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -43, 74) - EVT_WAIT(8) - EVT_CALL(DemoJoystickXY, -42, 74) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -41, 74) - EVT_WAIT(3) - EVT_CALL(DemoJoystickXY, -39, 75) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -36, 75) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -31, 76) - EVT_WAIT(51) - EVT_CALL(DemoJoystickXY, -29, 76) - EVT_IF_EQ(GF_DemoSceneDone, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_DemoSceneDone, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("kkj_11"), kkj_11_ENTRY_2, TRANSITION_END_DEMO_SCENE_BLACK) - EVT_WAIT(110) - EVT_RETURN - EVT_END + Call(DemoJoystickXY, -75, -44) + Wait(41) + Call(DemoJoystickXY, -74, -44) + Wait(1) + Call(DemoJoystickXY, -74, -42) + Wait(1) + Call(DemoJoystickXY, -74, -40) + Wait(1) + Call(DemoJoystickXY, -74, -39) + Wait(1) + Call(DemoJoystickXY, -75, -37) + Wait(1) + Call(DemoJoystickXY, -75, -35) + Wait(2) + Call(DemoJoystickXY, -75, -33) + Wait(1) + Call(DemoJoystickXY, -75, -32) + Wait(1) + Call(DemoJoystickXY, -76, -31) + Wait(1) + Call(DemoJoystickXY, -76, -30) + Wait(1) + Call(DemoJoystickXY, -76, -29) + Wait(4) + Call(DemoJoystickXY, -76, -28) + Wait(1) + Call(DemoJoystickXY, -78, -23) + Wait(1) + Call(DemoJoystickXY, -79, -15) + Wait(1) + Call(DemoJoystickXY, -81, -7) + Wait(1) + Call(DemoJoystickXY, -82, -2) + Wait(5) + Call(DemoJoystickXY, -82, 0) + Wait(1) + Call(DemoJoystickXY, -81, 2) + Wait(1) + Call(DemoJoystickXY, -80, 5) + Wait(1) + Call(DemoJoystickXY, -80, 7) + Wait(1) + Call(DemoJoystickXY, -79, 9) + Wait(1) + Call(DemoJoystickXY, -79, 12) + Wait(1) + Call(DemoJoystickXY, -78, 18) + Wait(1) + Call(DemoJoystickXY, -77, 21) + Wait(12) + Call(DemoJoystickXY, -76, 22) + Wait(1) + Call(DemoJoystickXY, -75, 27) + Wait(1) + Call(DemoJoystickXY, -74, 30) + Wait(1) + Call(DemoJoystickXY, -74, 31) + Wait(2) + Call(DemoJoystickXY, -73, 31) + Wait(2) + Call(DemoJoystickXY, -73, 33) + Wait(1) + Call(DemoJoystickXY, -73, 34) + Wait(1) + Call(DemoJoystickXY, -72, 36) + Wait(1) + Call(DemoJoystickXY, -71, 38) + Wait(10) + Call(DemoJoystickXY, -70, 38) + Wait(1) + Call(DemoJoystickXY, -32, 23) + Wait(1) + Call(DemoJoystickXY, -1, 0) + Wait(5) + Call(DemoJoystickXY, -1, -3) + Wait(1) + Call(DemoJoystickXY, 0, -27) + Wait(1) + Call(DemoJoystickXY, -1, -64) + Wait(1) + Call(DemoJoystickXY, -12, -81) + Wait(1) + Call(DemoJoystickXY, -14, -82) + Wait(1) + Call(DemoJoystickXY, -24, -81) + Wait(1) + Call(DemoJoystickXY, -32, -80) + Wait(1) + Call(DemoJoystickXY, -35, -79) + Wait(1) + Call(DemoJoystickXY, -43, -77) + Wait(1) + Call(DemoJoystickXY, -52, -75) + Wait(1) + Call(DemoJoystickXY, -60, -73) + Wait(1) + Call(DemoJoystickXY, -66, -72) + Wait(5) + Call(DemoJoystickXY, -67, -71) + Wait(1) + Call(DemoJoystickXY, -68, -63) + Wait(1) + Call(DemoJoystickXY, -71, -53) + Wait(1) + Call(DemoJoystickXY, -75, -32) + Wait(1) + Call(DemoJoystickXY, -79, -16) + Wait(1) + Call(DemoJoystickXY, -82, -2) + Wait(1) + Call(DemoJoystickXY, -82, 0) + Wait(1) + Call(DemoJoystickXY, -81, 1) + Wait(1) + Call(DemoJoystickXY, -81, 2) + Wait(1) + Call(DemoJoystickXY, -81, 3) + Wait(2) + Call(DemoJoystickXY, -80, 5) + Wait(1) + Call(DemoJoystickXY, -80, 7) + Wait(1) + Call(DemoJoystickXY, -79, 11) + Wait(1) + Call(DemoJoystickXY, -77, 20) + Wait(1) + Call(DemoJoystickXY, -73, 33) + Wait(1) + Call(DemoJoystickXY, -70, 48) + Wait(1) + Call(DemoJoystickXY, -65, 66) + Wait(5) + Call(DemoJoystickXY, -65, 67) + Wait(28) + Call(DemoJoystickXY, -65, 66) + Wait(4) + Call(DemoJoystickXY, -65, 65) + Wait(1) + Call(DemoJoystickXY, -60, 59) + Wait(1) + Call(DemoJoystickXY, -48, 49) + Wait(1) + Call(DemoJoystickXY, -29, 31) + Wait(1) + Call(DemoJoystickXY, -13, 15) + Wait(1) + Call(DemoJoystickXY, -1, 0) + Wait(5) + Call(DemoJoystickXY, 0, 0) + Wait(1) + Call(DemoJoystickXY, 2, 0) + Wait(1) + Call(DemoJoystickXY, 10, 1) + Wait(2) + Call(DemoJoystickXY, -1, 0) + Wait(15) + Call(DemoJoystickXY, -2, 9) + Wait(1) + Call(DemoJoystickXY, -19, 33) + Wait(1) + Call(DemoJoystickXY, -40, 67) + Wait(1) + Call(DemoJoystickXY, -44, 71) + Wait(5) + Call(DemoJoystickXY, -44, 72) + Wait(1) + Call(DemoJoystickXY, -44, 73) + Wait(1) + Call(DemoJoystickXY, -43, 73) + Wait(1) + Call(DemoJoystickXY, -43, 74) + Wait(8) + Call(DemoJoystickXY, -42, 74) + Wait(1) + Call(DemoJoystickXY, -41, 74) + Wait(3) + Call(DemoJoystickXY, -39, 75) + Wait(1) + Call(DemoJoystickXY, -36, 75) + Wait(1) + Call(DemoJoystickXY, -31, 76) + Wait(51) + Call(DemoJoystickXY, -29, 76) + IfEq(GF_DemoSceneDone, TRUE) + Return + EndIf + Set(GF_DemoSceneDone, TRUE) + Call(GotoMapSpecial, Ref("kkj_11"), kkj_11_ENTRY_2, TRANSITION_END_DEMO_SCENE_BLACK) + Wait(110) + Return + End }; EvtScript N(EVS_MonitorDemoState) = { - EVT_WAIT(10) - EVT_LOOP(0) - EVT_CALL(GetDemoState, LVar0) - EVT_IF_EQ(LVar0, DEMO_STATE_CHANGE_MAP) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(GF_DemoSceneDone, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_DemoSceneDone, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("kkj_11"), kkj_11_ENTRY_2, TRANSITION_END_DEMO_SCENE_WHITE) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Wait(10) + Loop(0) + Call(GetDemoState, LVar0) + IfEq(LVar0, DEMO_STATE_CHANGE_MAP) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(GF_DemoSceneDone, TRUE) + Return + EndIf + Set(GF_DemoSceneDone, TRUE) + Call(GotoMapSpecial, Ref("kkj_11"), kkj_11_ENTRY_2, TRANSITION_END_DEMO_SCENE_WHITE) + Wait(100) + Return + End }; EvtScript N(EVS_PlayDemoScene) = { - EVT_SET(GF_DemoSceneDone, FALSE) - EVT_EXEC(N(EVS_MonitorDemoState)) - EVT_EXEC(N(EVS_ProvideDemoInputs)) - EVT_RETURN - EVT_END + Set(GF_DemoSceneDone, FALSE) + Exec(N(EVS_MonitorDemoState)) + Exec(N(EVS_ProvideDemoInputs)) + Return + End }; diff --git a/src/world/area_kkj/kkj_11/kkj_11_5_npcs_early.c b/src/world/area_kkj/kkj_11/kkj_11_5_npcs_early.c index 6f2998dfa3f..a5cefb4d410 100644 --- a/src/world/area_kkj/kkj_11/kkj_11_5_npcs_early.c +++ b/src/world/area_kkj/kkj_11/kkj_11_5_npcs_early.c @@ -9,221 +9,221 @@ #include "world/common/enemy/Koopatrol_Stationary.inc.c" EvtScript N(EVS_NpcAI_Koopatrol_01) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(NpcFacePlayer, NPC_SELF, 5) - EVT_WAIT(20) - EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Gasp) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim02) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0174) - EVT_CALL(N(ApproachPlayer100Units), -1, LVar3, LVar0, LVar2) - EVT_IF_NE(LVar3, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim07) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim02) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0175) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_ForwardSad) - EVT_WAIT(20) - EVT_CALL(GotoMapSpecial, EVT_PTR("kkj_14"), kkj_14_ENTRY_B, TRANSITION_PEACH_CAPTURED) - EVT_WAIT(100) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) + Call(NpcFacePlayer, NPC_SELF, 5) + Wait(20) + Call(PlayerFaceNpc, NPC_SELF, FALSE) + Call(SetPlayerAnimation, ANIM_Peach2_Gasp) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim02) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0174) + Call(N(ApproachPlayer100Units), -1, LVar3, LVar0, LVar2) + IfNe(LVar3, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim07) + Call(SetNpcSpeed, NPC_SELF, Float(5.0)) + Call(NpcMoveTo, NPC_SELF, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim02) + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0175) + Call(SetPlayerAnimation, ANIM_Peach2_ForwardSad) + Wait(20) + Call(GotoMapSpecial, Ref("kkj_14"), kkj_14_ENTRY_B, TRANSITION_PEACH_CAPTURED) + Wait(100) + Call(DisablePlayerInput, FALSE) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + End }; EvtScript N(EVS_NpcIdle_Koopatrol_01) = { - EVT_THREAD - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_CALL(N(UpdateSearchlight), LVar0, 100, 90, 0, 40, 127, 0) - EVT_IF_NE(LVar0, 0) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Koopatrol_01))) - EVT_SET(LVar1, 1) - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(2.0)) - EVT_LOOP(0) - EVT_CALL(NpcMoveTo, NPC_SELF, -130, -130, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, -130, -130, -180, -30) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, -180, -30, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, -180, -30, 180, -30) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, 180, -30, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, 180, -30, 130, -130) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, 130, -130, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, 130, -130, -130, -130) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_END_LOOP - EVT_RETURN - EVT_END + Thread + Set(LVar1, 0) + Loop(0) + Call(N(UpdateSearchlight), LVar0, 100, 90, 0, 40, 127, 0) + IfNe(LVar0, 0) + IfEq(LVar1, 0) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_Koopatrol_01))) + Set(LVar1, 1) + EndIf + EndIf + Wait(1) + EndLoop + EndThread + Call(SetNpcSpeed, NPC_SELF, Float(2.0)) + Loop(0) + Call(NpcMoveTo, NPC_SELF, -130, -130, 0) + Call(N(GetAngleBetweenPoints), LVar0, -130, -130, -180, -30) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + Call(NpcMoveTo, NPC_SELF, -180, -30, 0) + Call(N(GetAngleBetweenPoints), LVar0, -180, -30, 180, -30) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + Call(NpcMoveTo, NPC_SELF, 180, -30, 0) + Call(N(GetAngleBetweenPoints), LVar0, 180, -30, 130, -130) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + Call(NpcMoveTo, NPC_SELF, 130, -130, 0) + Call(N(GetAngleBetweenPoints), LVar0, 130, -130, -130, -130) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_Koopatrol_02) = { - EVT_THREAD - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_CALL(N(UpdateSearchlight), LVar0, 100, 90, 0, 40, 128, 1) - EVT_IF_NE(LVar0, 0) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Koopatrol_01))) - EVT_SET(LVar1, 1) - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(2.0)) - EVT_LOOP(0) - EVT_CALL(NpcMoveTo, NPC_SELF, -130, 180, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, -130, 180, -130, 230) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, -130, 230, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, -130, 230, -40, 230) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, -40, 230, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, -40, 230, -40, 80) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, -40, 80, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, -40, 80, -250, 80) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, -250, 80, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, -250, 80, -250, 180) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, -250, 180, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, -250, 180, -130, 180) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_END_LOOP - EVT_RETURN - EVT_END + Thread + Set(LVar1, 0) + Loop(0) + Call(N(UpdateSearchlight), LVar0, 100, 90, 0, 40, 128, 1) + IfNe(LVar0, 0) + IfEq(LVar1, 0) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_Koopatrol_01))) + Set(LVar1, 1) + EndIf + EndIf + Wait(1) + EndLoop + EndThread + Call(SetNpcSpeed, NPC_SELF, Float(2.0)) + Loop(0) + Call(NpcMoveTo, NPC_SELF, -130, 180, 0) + Call(N(GetAngleBetweenPoints), LVar0, -130, 180, -130, 230) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + Call(NpcMoveTo, NPC_SELF, -130, 230, 0) + Call(N(GetAngleBetweenPoints), LVar0, -130, 230, -40, 230) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + Call(NpcMoveTo, NPC_SELF, -40, 230, 0) + Call(N(GetAngleBetweenPoints), LVar0, -40, 230, -40, 80) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + Call(NpcMoveTo, NPC_SELF, -40, 80, 0) + Call(N(GetAngleBetweenPoints), LVar0, -40, 80, -250, 80) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + Call(NpcMoveTo, NPC_SELF, -250, 80, 0) + Call(N(GetAngleBetweenPoints), LVar0, -250, 80, -250, 180) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + Call(NpcMoveTo, NPC_SELF, -250, 180, 0) + Call(N(GetAngleBetweenPoints), LVar0, -250, 180, -130, 180) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_Koopatrol_03) = { - EVT_THREAD - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_CALL(N(UpdateSearchlight), LVar0, 100, 90, 0, 40, 129, 2) - EVT_IF_NE(LVar0, 0) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Koopatrol_01))) - EVT_SET(LVar1, 1) - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(2.0)) - EVT_LOOP(0) - EVT_CALL(NpcMoveTo, NPC_SELF, 130, 180, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, 130, 180, 250, 180) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, 250, 180, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, 250, 180, 250, 80) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, 250, 80, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, 250, 80, 40, 80) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, 40, 80, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, 40, 80, 40, 230) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, 40, 230, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, 40, 230, 130, 230) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, 130, 230, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, 130, 230, 130, 180) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_END_LOOP - EVT_RETURN - EVT_END + Thread + Set(LVar1, 0) + Loop(0) + Call(N(UpdateSearchlight), LVar0, 100, 90, 0, 40, 129, 2) + IfNe(LVar0, 0) + IfEq(LVar1, 0) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_Koopatrol_01))) + Set(LVar1, 1) + EndIf + EndIf + Wait(1) + EndLoop + EndThread + Call(SetNpcSpeed, NPC_SELF, Float(2.0)) + Loop(0) + Call(NpcMoveTo, NPC_SELF, 130, 180, 0) + Call(N(GetAngleBetweenPoints), LVar0, 130, 180, 250, 180) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + Call(NpcMoveTo, NPC_SELF, 250, 180, 0) + Call(N(GetAngleBetweenPoints), LVar0, 250, 180, 250, 80) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + Call(NpcMoveTo, NPC_SELF, 250, 80, 0) + Call(N(GetAngleBetweenPoints), LVar0, 250, 80, 40, 80) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + Call(NpcMoveTo, NPC_SELF, 40, 80, 0) + Call(N(GetAngleBetweenPoints), LVar0, 40, 80, 40, 230) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + Call(NpcMoveTo, NPC_SELF, 40, 230, 0) + Call(N(GetAngleBetweenPoints), LVar0, 40, 230, 130, 230) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + Call(NpcMoveTo, NPC_SELF, 130, 230, 0) + Call(N(GetAngleBetweenPoints), LVar0, 130, 230, 130, 180) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_Koopatrol_04) = { - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(AwaitPlayerApproach, LVar0, LVar2, 50) - EVT_CALL(GetPlayerPos, LVar0, LVar3, LVar2) - EVT_IF_EQ(LVar1, LVar3) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(NpcFacePlayer, NPC_SELF, 5) - EVT_WAIT(20) - EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Gasp) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_Peach_0174) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_Peach_0175) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_ForwardSad) - EVT_WAIT(20) - EVT_CALL(GotoMapSpecial, EVT_PTR("kkj_14"), kkj_14_ENTRY_B, TRANSITION_PEACH_CAPTURED) - EVT_WAIT(100) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END + Loop(0) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(AwaitPlayerApproach, LVar0, LVar2, 50) + Call(GetPlayerPos, LVar0, LVar3, LVar2) + IfEq(LVar1, LVar3) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(DisablePlayerInput, TRUE) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) + Call(NpcFacePlayer, NPC_SELF, 5) + Wait(20) + Call(PlayerFaceNpc, NPC_SELF, FALSE) + Call(SetPlayerAnimation, ANIM_Peach2_Gasp) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_Peach_0174) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_Peach_0175) + Call(SetPlayerAnimation, ANIM_Peach2_ForwardSad) + Wait(20) + Call(GotoMapSpecial, Ref("kkj_14"), kkj_14_ENTRY_B, TRANSITION_PEACH_CAPTURED) + Wait(100) + Call(DisablePlayerInput, FALSE) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + End }; EvtScript N(EVS_NpcInit_Koopatrol_01) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim05) - EVT_CALL(SetNpcPos, NPC_SELF, 130, 0, -130) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Koopatrol_01))) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim05) + Call(SetNpcPos, NPC_SELF, 130, 0, -130) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Koopatrol_01))) + Return + End }; EvtScript N(EVS_NpcInit_Koopatrol_02) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim05) - EVT_CALL(SetNpcPos, NPC_SELF, -250, 0, 180) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Koopatrol_02))) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim05) + Call(SetNpcPos, NPC_SELF, -250, 0, 180) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Koopatrol_02))) + Return + End }; EvtScript N(EVS_NpcInit_Koopatrol_03) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim05) - EVT_CALL(SetNpcPos, NPC_SELF, 130, 0, 230) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Koopatrol_03))) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim05) + Call(SetNpcPos, NPC_SELF, 130, 0, 230) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Koopatrol_03))) + Return + End }; EvtScript N(EVS_NpcInit_Koopatrol_04) = { - EVT_CALL(SetNpcPos, NPC_SELF, 0, 100, -350) - EVT_CALL(SetNpcYaw, NPC_SELF, 220) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Koopatrol_04))) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, 0, 100, -350) + Call(SetNpcYaw, NPC_SELF, 220) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Koopatrol_04))) + Return + End }; EvtScript N(EVS_NpcInit_Koopatrol_05) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kkj_11_ENTRY_4) - EVT_CALL(SetNpcPos, NPC_SELF, -40, 0, -220) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, 0, 0, -240) - EVT_CALL(SetNpcYaw, NPC_SELF, 220) - EVT_END_IF - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Koopatrol_04))) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, kkj_11_ENTRY_4) + Call(SetNpcPos, NPC_SELF, -40, 0, -220) + Call(SetNpcYaw, NPC_SELF, 90) + Else + Call(SetNpcPos, NPC_SELF, 0, 0, -240) + Call(SetNpcYaw, NPC_SELF, 220) + EndIf + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Koopatrol_04))) + Return + End }; AnimID N(ExtraAnims_Koopatrol)[] = { diff --git a/src/world/area_kkj/kkj_11/kkj_11_6_npcs_later.c b/src/world/area_kkj/kkj_11/kkj_11_6_npcs_later.c index 91eae9d64d9..feaf6f87447 100644 --- a/src/world/area_kkj/kkj_11/kkj_11_6_npcs_later.c +++ b/src/world/area_kkj/kkj_11/kkj_11_6_npcs_later.c @@ -25,293 +25,293 @@ AnimID N(ExtraAnims_Koopatrol)[] = { }; EvtScript N(EVS_CapturePeach) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(PreventNextPeachDisguise)) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(NpcFacePlayer, NPC_SELF, 5) - EVT_WAIT(20) - EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Gasp) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_Peach_0174) - EVT_CALL(N(ApproachPlayer100Units), -1, LVar3, LVar0, LVar2) - EVT_IF_NE(LVar3, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim07) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_Peach_0175) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_ForwardSad) - EVT_WAIT(20) - EVT_CALL(GotoMapSpecial, EVT_PTR("kkj_14"), kkj_14_ENTRY_B, TRANSITION_PEACH_CAPTURED) - EVT_WAIT(100) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(N(PreventNextPeachDisguise)) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) + Call(NpcFacePlayer, NPC_SELF, 5) + Wait(20) + Call(PlayerFaceNpc, NPC_SELF, FALSE) + Call(SetPlayerAnimation, ANIM_Peach2_Gasp) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_Peach_0174) + Call(N(ApproachPlayer100Units), -1, LVar3, LVar0, LVar2) + IfNe(LVar3, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim07) + Call(SetNpcSpeed, NPC_SELF, Float(5.0)) + Call(NpcMoveTo, NPC_SELF, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_Peach_0175) + Call(SetPlayerAnimation, ANIM_Peach2_ForwardSad) + Wait(20) + Call(GotoMapSpecial, Ref("kkj_14"), kkj_14_ENTRY_B, TRANSITION_PEACH_CAPTURED) + Wait(100) + Call(DisablePlayerInput, FALSE) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + End }; EvtScript N(EVS_CheckForPeach_Koopatrol_01) = { - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_IF_EQ(LVar1, LVar4) - EVT_CALL(N(GetPeachDisguise), LVar3) - EVT_IF_EQ(LVar3, PEACH_DISGUISE_NONE) - EVT_CALL(IsPlayerWithin, LVar0, LVar2, 80, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_CapturePeach))) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(GetPlayerPos, LVar3, LVar4, LVar5) + IfEq(LVar1, LVar4) + Call(N(GetPeachDisguise), LVar3) + IfEq(LVar3, PEACH_DISGUISE_NONE) + Call(IsPlayerWithin, LVar0, LVar2, 80, LVar0) + IfEq(LVar0, 1) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_CapturePeach))) + Return + EndIf + EndIf + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_CheckForPeach_Koopatrol_02) = { - EVT_LOOP(0) - EVT_CALL(N(GetPeachDisguise), LVar0) - EVT_IF_EQ(LVar0, PEACH_DISGUISE_NONE) - EVT_CALL(IsPlayerWithin, -275, -38, 30, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_03, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_CapturePeach))) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(N(GetPeachDisguise), LVar0) + IfEq(LVar0, PEACH_DISGUISE_NONE) + Call(IsPlayerWithin, -275, -38, 30, LVar0) + IfEq(LVar0, 1) + Call(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim01) + Call(SetNpcAnimation, NPC_Koopatrol_03, ANIM_WorldKoopatrol_Anim01) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_CapturePeach))) + Return + EndIf + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_Koopatrol_01) = { - EVT_EXEC(N(EVS_CheckForPeach_Koopatrol_01)) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kkj_11_ENTRY_1) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 1) - EVT_CALL(WaitForPlayerInputEnabled) - EVT_THREAD - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(2.0)) - EVT_CALL(PlayerMoveTo, 70, -325, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim04) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(2.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, 0, -350, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(InterpNpcYaw, NPC_SELF, 220, 5) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 0) - EVT_END_IF - EVT_LOOP(0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Exec(N(EVS_CheckForPeach_Koopatrol_01)) + Call(GetEntryID, LVar0) + IfEq(LVar0, kkj_11_ENTRY_1) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 1) + Call(WaitForPlayerInputEnabled) + Thread + Call(DisablePlayerInput, TRUE) + Call(SetPlayerSpeed, Float(2.0)) + Call(PlayerMoveTo, 70, -325, 0) + Call(DisablePlayerInput, FALSE) + EndThread + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim04) + Call(SetNpcSpeed, NPC_SELF, Float(2.0)) + Call(NpcMoveTo, NPC_SELF, 0, -350, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) + Call(InterpNpcYaw, NPC_SELF, 220, 5) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 0) + EndIf + Loop(0) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_Koopatrol_04) = { - EVT_EXEC(N(EVS_CheckForPeach_Koopatrol_01)) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kkj_11_ENTRY_4) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 1) - EVT_CALL(WaitForPlayerInputEnabled) - EVT_THREAD - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(2.0)) - EVT_CALL(PlayerMoveTo, 70, -200, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim04) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(2.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, 0, -240, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(InterpNpcYaw, NPC_SELF, 220, 5) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 0) - EVT_END_IF - EVT_LOOP(0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Exec(N(EVS_CheckForPeach_Koopatrol_01)) + Call(GetEntryID, LVar0) + IfEq(LVar0, kkj_11_ENTRY_4) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 1) + Call(WaitForPlayerInputEnabled) + Thread + Call(DisablePlayerInput, TRUE) + Call(SetPlayerSpeed, Float(2.0)) + Call(PlayerMoveTo, 70, -200, 0) + Call(DisablePlayerInput, FALSE) + EndThread + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim04) + Call(SetNpcSpeed, NPC_SELF, Float(2.0)) + Call(NpcMoveTo, NPC_SELF, 0, -240, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) + Call(InterpNpcYaw, NPC_SELF, 220, 5) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 0) + EndIf + Loop(0) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_Koopatrol_02) = { - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 1, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim08) - EVT_CALL(SetSelfVar, 1, 1) - EVT_ELSE - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_03, ANIM_WorldKoopatrol_Anim08) - EVT_CALL(SetSelfVar, 1, 0) - EVT_END_IF - EVT_CALL(RandInt, 60, LVar0) - EVT_ADD(LVar0, 30) - EVT_WAIT(LVar0) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_03, ANIM_WorldKoopatrol_Anim01) - EVT_WAIT(10) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetSelfVar, 1, LVar0) + IfEq(LVar0, 0) + Call(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim08) + Call(SetSelfVar, 1, 1) + Else + Call(SetNpcAnimation, NPC_Koopatrol_03, ANIM_WorldKoopatrol_Anim08) + Call(SetSelfVar, 1, 0) + EndIf + Call(RandInt, 60, LVar0) + Add(LVar0, 30) + Wait(LVar0) + Call(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim01) + Call(SetNpcAnimation, NPC_Koopatrol_03, ANIM_WorldKoopatrol_Anim01) + Wait(10) + EndLoop + Return + End }; EvtScript N(EVS_NpcInteract_Koopatrol_01) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 16, MSG_Peach_0135) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim04) - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_IF_GT(LVar0, 0) - EVT_ADD(LVar3, -50) - EVT_ELSE - EVT_ADD(LVar3, 50) - EVT_END_IF - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(2.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar3, LVar5, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(InterpNpcYaw, NPC_SELF, 220, 5) - EVT_CALL(SetSelfVar, 0, 1) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_12_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttn, 1, 0) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 16, MSG_Peach_0135) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 1) + Return + EndIf + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim04) + Call(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + IfGt(LVar0, 0) + Add(LVar3, -50) + Else + Add(LVar3, 50) + EndIf + Call(SetNpcSpeed, NPC_SELF, Float(2.0)) + Call(NpcMoveTo, NPC_SELF, LVar3, LVar5, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) + Call(InterpNpcYaw, NPC_SELF, 220, 5) + Call(SetSelfVar, 0, 1) + BindTrigger(Ref(N(EVS_ExitDoors_kkj_12_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttn, 1, 0) + Return + End }; EvtScript N(EVS_NpcInteract_Koopatrol_04) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 16, MSG_Peach_0135) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim04) - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_IF_GT(LVar0, 0) - EVT_ADD(LVar3, -50) - EVT_ELSE - EVT_ADD(LVar3, 50) - EVT_END_IF - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(2.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar3, LVar5, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(InterpNpcYaw, NPC_SELF, 220, 5) - EVT_CALL(SetSelfVar, 0, 1) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_kkj_14_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttn2, 1, 0) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 16, MSG_Peach_0135) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 1) + Return + EndIf + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim04) + Call(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + IfGt(LVar0, 0) + Add(LVar3, -50) + Else + Add(LVar3, 50) + EndIf + Call(SetNpcSpeed, NPC_SELF, Float(2.0)) + Call(NpcMoveTo, NPC_SELF, LVar3, LVar5, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) + Call(InterpNpcYaw, NPC_SELF, 220, 5) + Call(SetSelfVar, 0, 1) + BindTrigger(Ref(N(EVS_ExitDoor_kkj_14_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttn2, 1, 0) + Return + End }; EvtScript N(EVS_NpcInteract_Koopatrol_02) = { - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_03, ANIM_WorldKoopatrol_Anim01) - EVT_WAIT(10) - EVT_CALL(N(GetPeachDisguise), LVar0) - EVT_IF_EQ(LVar0, PEACH_DISGUISE_NONE) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_WAIT(5) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_CapturePeach))) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 16, MSG_Peach_0131) - EVT_CALL(SetSelfVar, 0, 1) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 16, MSG_Peach_0132) - EVT_CALL(SetSelfVar, 0, 0) - EVT_END_IF - EVT_WAIT(10) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim01) + Call(SetNpcAnimation, NPC_Koopatrol_03, ANIM_WorldKoopatrol_Anim01) + Wait(10) + Call(N(GetPeachDisguise), LVar0) + IfEq(LVar0, PEACH_DISGUISE_NONE) + Call(NpcFacePlayer, NPC_SELF, 0) + Wait(5) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_CapturePeach))) + Return + EndIf + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 16, MSG_Peach_0131) + Call(SetSelfVar, 0, 1) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 16, MSG_Peach_0132) + Call(SetSelfVar, 0, 0) + EndIf + Wait(10) + Return + End }; EvtScript N(EVS_NpcInteract_Koopatrol_03) = { - EVT_CALL(EnableNpcAI, NPC_Koopatrol_02, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_03, ANIM_WorldKoopatrol_Anim01) - EVT_WAIT(10) - EVT_CALL(N(GetPeachDisguise), LVar0) - EVT_IF_EQ(LVar0, PEACH_DISGUISE_NONE) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_WAIT(5) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_CapturePeach))) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 16, MSG_Peach_0133) - EVT_CALL(SetSelfVar, 0, 1) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 16, MSG_Peach_0134) - EVT_CALL(SetSelfVar, 0, 0) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(EnableNpcAI, NPC_Koopatrol_02, TRUE) - EVT_RETURN - EVT_END + Call(EnableNpcAI, NPC_Koopatrol_02, FALSE) + Call(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim01) + Call(SetNpcAnimation, NPC_Koopatrol_03, ANIM_WorldKoopatrol_Anim01) + Wait(10) + Call(N(GetPeachDisguise), LVar0) + IfEq(LVar0, PEACH_DISGUISE_NONE) + Call(NpcFacePlayer, NPC_SELF, 0) + Wait(5) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_CapturePeach))) + Return + EndIf + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 16, MSG_Peach_0133) + Call(SetSelfVar, 0, 1) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 16, MSG_Peach_0134) + Call(SetSelfVar, 0, 0) + EndIf + Wait(10) + Call(EnableNpcAI, NPC_Koopatrol_02, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_Koopatrol_01) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kkj_11_ENTRY_1) - EVT_CALL(SetNpcPos, NPC_SELF, -70, 100, -350) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, 0, 100, -350) - EVT_CALL(SetNpcYaw, NPC_SELF, 200) - EVT_END_IF - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Koopatrol_01))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Koopatrol_01))) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, kkj_11_ENTRY_1) + Call(SetNpcPos, NPC_SELF, -70, 100, -350) + Call(SetNpcYaw, NPC_SELF, 90) + Else + Call(SetNpcPos, NPC_SELF, 0, 100, -350) + Call(SetNpcYaw, NPC_SELF, 200) + EndIf + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Koopatrol_01))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Koopatrol_01))) + Return + End }; EvtScript N(EVS_NpcInit_Koopatrol_02) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(SetNpcPos, NPC_SELF, -295, 0, -30) - EVT_CALL(NpcFaceNpc, NPC_SELF, NPC_Koopatrol_03, 0) - EVT_EXEC(N(EVS_CheckForPeach_Koopatrol_02)) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Koopatrol_02))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Koopatrol_02))) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) + Call(SetNpcPos, NPC_SELF, -295, 0, -30) + Call(NpcFaceNpc, NPC_SELF, NPC_Koopatrol_03, 0) + Exec(N(EVS_CheckForPeach_Koopatrol_02)) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Koopatrol_02))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Koopatrol_02))) + Return + End }; EvtScript N(EVS_NpcInit_Koopatrol_03) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(SetNpcPos, NPC_SELF, -255, 0, -55) - EVT_CALL(NpcFaceNpc, NPC_SELF, NPC_Koopatrol_02, 0) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Koopatrol_03))) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) + Call(SetNpcPos, NPC_SELF, -255, 0, -55) + Call(NpcFaceNpc, NPC_SELF, NPC_Koopatrol_02, 0) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Koopatrol_03))) + Return + End }; EvtScript N(EVS_NpcInit_Koopatrol_04) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kkj_11_ENTRY_4) - EVT_CALL(SetNpcPos, NPC_SELF, -40, 0, -220) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, 0, 0, -240) - EVT_CALL(SetNpcYaw, NPC_SELF, 220) - EVT_END_IF - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Koopatrol_04))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Koopatrol_04))) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, kkj_11_ENTRY_4) + Call(SetNpcPos, NPC_SELF, -40, 0, -220) + Call(SetNpcYaw, NPC_SELF, 90) + Else + Call(SetNpcPos, NPC_SELF, 0, 0, -240) + Call(SetNpcYaw, NPC_SELF, 220) + EndIf + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Koopatrol_04))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Koopatrol_04))) + Return + End }; NpcData N(NpcData_Minions_Later)[] = { diff --git a/src/world/area_kkj/kkj_12/kkj_12_1_main.c b/src/world/area_kkj/kkj_12/kkj_12_1_main.c index df459fd7614..ffabbee799e 100644 --- a/src/world/area_kkj/kkj_12/kkj_12_1_main.c +++ b/src/world/area_kkj/kkj_12/kkj_12_1_main.c @@ -18,51 +18,51 @@ EvtScript N(EVS_ExitDoors_kkj_13_0) = EVT_EXIT_DOUBLE_DOOR(kkj_12_ENTRY_1, "kkj_ COLLIDER_deilit2, MODEL_door4, MODEL_door3); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_11_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilit1, 1, 0) - EVT_IF_EQ(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) - EVT_IF_EQ(GF_KKJ12_TrickedGuard, FALSE) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_13_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilit2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_kkj_11_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilit1, 1, 0) + IfEq(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) + IfEq(GF_KKJ12_TrickedGuard, FALSE) + Return + EndIf + EndIf + BindTrigger(Ref(N(EVS_ExitDoors_kkj_13_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilit2, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kkj_12_ENTRY_0) - EVT_SET(LVar2, MODEL_door1) - EVT_SET(LVar3, MODEL_door2) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(kkj_12_ENTRY_1) - EVT_SET(LVar2, MODEL_door4) - EVT_SET(LVar3, MODEL_door3) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kkj_12_ENTRY_0) + Set(LVar2, MODEL_door1) + Set(LVar3, MODEL_door2) + ExecWait(EnterDoubleDoor) + CaseEq(kkj_12_ENTRY_1) + Set(LVar2, MODEL_door4) + Set(LVar3, MODEL_door3) + ExecWait(EnterDoubleDoor) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PEACHS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_KKJ_12) - EVT_SETUP_CAMERA_DEFAULT() - EVT_IF_EQ(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) - EVT_CALL(N(SetAvailableDisguise), PEACH_DISGUISE_KOOPATROL) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_o694, FALSE) - EVT_CALL(EnableModel, MODEL_o695, FALSE) - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH8_REACHED_BOWSERS_CASTLE) - EVT_CALL(N(DisableSpotlightSources)) - EVT_END_IF - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_PEACHS_CASTLE) + Call(SetSpriteShading, SHADING_KKJ_12) + SetUP_CAMERA_DEFAULT() + IfEq(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) + Call(N(SetAvailableDisguise), PEACH_DISGUISE_KOOPATROL) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Else + Call(EnableModel, MODEL_o694, FALSE) + Call(EnableModel, MODEL_o695, FALSE) + EndIf + IfGe(GB_StoryProgress, STORY_CH8_REACHED_BOWSERS_CASTLE) + Call(N(DisableSpotlightSources)) + EndIf + Call(UseDoorSounds, DOOR_SOUNDS_LARGE) + Exec(N(EVS_BindExitTriggers)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_kkj/kkj_12/kkj_12_2_npc.c b/src/world/area_kkj/kkj_12/kkj_12_2_npc.c index e59073437cb..cc1fe18f190 100644 --- a/src/world/area_kkj/kkj_12/kkj_12_2_npc.c +++ b/src/world/area_kkj/kkj_12/kkj_12_2_npc.c @@ -46,183 +46,183 @@ AnimID N(ExtraAnims_Clubba)[] = { }; EvtScript N(EVS_NpcInteract_Koopatrol_01) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(GetPeachDisguise), LVar0) - EVT_IF_EQ(LVar0, PEACH_DISGUISE_CLUBBA) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0143) - EVT_ELSE - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0141) - EVT_CALL(SetSelfVar, 0, 1) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0142) - EVT_CALL(SetSelfVar, 0, 0) - EVT_END_IF - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(N(GetPeachDisguise), LVar0) + IfEq(LVar0, PEACH_DISGUISE_CLUBBA) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0143) + Else + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0141) + Call(SetSelfVar, 0, 1) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0142) + Call(SetSelfVar, 0, 0) + EndIf + EndIf + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_Koopatrol_02) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(GetPeachDisguise), LVar0) - EVT_IF_EQ(LVar0, PEACH_DISGUISE_CLUBBA) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(5.0 / DT), 0, EVT_FLOAT(350.0), EVT_FLOAT(15.0), EVT_FLOAT(-7.0)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0147) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(PlayerFaceNpc, NPC_Koopatrol_02, FALSE) - EVT_WAIT(1) - EVT_IF_EQ(GF_KKJ12_TrickedGuard, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim05) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(2.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_SELF, 1050, 0, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0148) - EVT_CALL(NpcMoveTo, NPC_SELF, 900, 0, 0) - EVT_CALL(SetNpcPos, NPC_SELF, 0, -500, 0) - EVT_SET(GF_KKJ12_TrickedGuard, TRUE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_13_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilit2, 1, 0) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GF_KKJ11_TrickedGuard, FALSE) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(5.0 / DT), 0, EVT_FLOAT(350.0), EVT_FLOAT(15.0), EVT_FLOAT(-7.0)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0144) - EVT_WAIT(10 * DT) - EVT_SET(LVar0, ITEM_PEACH_KEY1) - EVT_CALL(ShowGotItem, LVar0, TRUE, 0) - EVT_CALL(AddKeyItem, LVar0) - EVT_SET(GF_KKJ11_TrickedGuard, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0145) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5.0 / DT)) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 16, MSG_Peach_0146) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(N(GetPeachDisguise), LVar0) + IfEq(LVar0, PEACH_DISGUISE_CLUBBA) + Call(AdjustCam, CAM_DEFAULT, Float(5.0 / DT), 0, Float(350.0), Float(15.0), Float(-7.0)) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0147) + Thread + Loop(0) + Call(PlayerFaceNpc, NPC_Koopatrol_02, FALSE) + Wait(1) + IfEq(GF_KKJ12_TrickedGuard, TRUE) + BreakLoop + EndIf + EndLoop + EndThread + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim05) + Call(SetNpcSpeed, NPC_SELF, Float(2.0 / DT)) + Call(NpcMoveTo, NPC_SELF, 1050, 0, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0148) + Call(NpcMoveTo, NPC_SELF, 900, 0, 0) + Call(SetNpcPos, NPC_SELF, 0, -500, 0) + Set(GF_KKJ12_TrickedGuard, TRUE) + BindTrigger(Ref(N(EVS_ExitDoors_kkj_13_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilit2, 1, 0) + Call(ResetCam, CAM_DEFAULT, Float(4.0 / DT)) + Call(DisablePlayerInput, FALSE) + Return + EndIf + IfEq(GF_KKJ11_TrickedGuard, FALSE) + Call(AdjustCam, CAM_DEFAULT, Float(5.0 / DT), 0, Float(350.0), Float(15.0), Float(-7.0)) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0144) + Wait(10 * DT) + Set(LVar0, ITEM_PEACH_KEY1) + Call(ShowGotItem, LVar0, TRUE, 0) + Call(AddKeyItem, LVar0) + Set(GF_KKJ11_TrickedGuard, TRUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0145) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Call(ResetCam, CAM_DEFAULT, Float(5.0 / DT)) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 16, MSG_Peach_0146) + EndIf + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_CapturePeach) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(PreventNextPeachDisguise)) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(NpcFacePlayer, NPC_SELF, 5) - EVT_WAIT(20) - EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Gasp) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim02) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0174) - EVT_CALL(N(ApproachPlayer100Units), NPC_SELF, LVar3, LVar0, LVar2) - EVT_IF_NE(LVar3, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim07) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim02) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0175) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_ForwardSad) - EVT_WAIT(20) - EVT_CALL(GotoMapSpecial, EVT_PTR("kkj_14"), kkj_14_ENTRY_B, TRANSITION_PEACH_CAPTURED) - EVT_WAIT(100) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(N(PreventNextPeachDisguise)) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) + Call(NpcFacePlayer, NPC_SELF, 5) + Wait(20) + Call(PlayerFaceNpc, NPC_SELF, FALSE) + Call(SetPlayerAnimation, ANIM_Peach2_Gasp) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim02) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0174) + Call(N(ApproachPlayer100Units), NPC_SELF, LVar3, LVar0, LVar2) + IfNe(LVar3, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim07) + Call(SetNpcSpeed, NPC_SELF, Float(5.0)) + Call(NpcMoveTo, NPC_SELF, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim02) + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim09, ANIM_WorldKoopatrol_Anim02, 0, MSG_Peach_0175) + Call(SetPlayerAnimation, ANIM_Peach2_ForwardSad) + Wait(20) + Call(GotoMapSpecial, Ref("kkj_14"), kkj_14_ENTRY_B, TRANSITION_PEACH_CAPTURED) + Wait(100) + Call(DisablePlayerInput, FALSE) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + End }; EvtScript N(EVS_NpcIdle_Koopatrol_01) = { - EVT_THREAD - EVT_SET(LVar2, 0) - EVT_LOOP(0) - EVT_CALL(N(UpdateSearchlight), LVar0, 100, 90, 0, 40, MODEL_o694, 0) - EVT_IF_EQ(LVar2, 0) - EVT_CALL(N(GetPeachDisguise), LVar1) - EVT_IF_EQ(LVar1, PEACH_DISGUISE_NONE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 1) - EVT_IF_NE(LVar0, 0) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_CapturePeach))) - EVT_SET(LVar2, 1) - EVT_END_IF - EVT_ELSE - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 0) - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(2.0)) - EVT_LOOP(0) - EVT_CALL(NpcMoveTo, NPC_SELF, 900, 0, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, 900, 0, 800, 0) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, 800, 0, 0) - EVT_CALL(N(GetAngleBetweenPoints), LVar0, 800, 0, 900, 0) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 15) - EVT_END_LOOP - EVT_RETURN - EVT_END + Thread + Set(LVar2, 0) + Loop(0) + Call(N(UpdateSearchlight), LVar0, 100, 90, 0, 40, MODEL_o694, 0) + IfEq(LVar2, 0) + Call(N(GetPeachDisguise), LVar1) + IfEq(LVar1, PEACH_DISGUISE_NONE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 1) + IfNe(LVar0, 0) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_CapturePeach))) + Set(LVar2, 1) + EndIf + Else + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 0) + EndIf + EndIf + Wait(1) + EndLoop + EndThread + Call(SetNpcSpeed, NPC_SELF, Float(2.0)) + Loop(0) + Call(NpcMoveTo, NPC_SELF, 900, 0, 0) + Call(N(GetAngleBetweenPoints), LVar0, 900, 0, 800, 0) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + Call(NpcMoveTo, NPC_SELF, 800, 0, 0) + Call(N(GetAngleBetweenPoints), LVar0, 800, 0, 900, 0) + Call(InterpNpcYaw, NPC_SELF, LVar0, 15) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_Koopatrol_02) = { - EVT_THREAD - EVT_SET(LVar2, 0) - EVT_LOOP(0) - EVT_CALL(N(UpdateSearchlight), LVar0, 100, 90, 0, 40, MODEL_o695, 1) - EVT_IF_EQ(LVar2, 0) - EVT_CALL(N(GetPeachDisguise), LVar1) - EVT_IF_EQ(LVar1, PEACH_DISGUISE_NONE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 1) - EVT_IF_NE(LVar0, 0) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_CapturePeach))) - EVT_SET(LVar2, 1) - EVT_END_IF - EVT_ELSE - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 0) - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + Set(LVar2, 0) + Loop(0) + Call(N(UpdateSearchlight), LVar0, 100, 90, 0, 40, MODEL_o695, 1) + IfEq(LVar2, 0) + Call(N(GetPeachDisguise), LVar1) + IfEq(LVar1, PEACH_DISGUISE_NONE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 1) + IfNe(LVar0, 0) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_CapturePeach))) + Set(LVar2, 1) + EndIf + Else + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 0) + EndIf + EndIf + Wait(1) + EndLoop + EndThread + Return + End }; EvtScript N(EVS_NpcInit_Koopatrol_01) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim05) - EVT_CALL(SetNpcPos, NPC_SELF, 800, 110, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Koopatrol_01))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Koopatrol_01))) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim05) + Call(SetNpcPos, NPC_SELF, 800, 110, 0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Koopatrol_01))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Koopatrol_01))) + Return + End }; EvtScript N(EVS_NpcInit_Koopatrol_02) = { - EVT_IF_NE(GF_KKJ12_TrickedGuard, FALSE) - EVT_CALL(EnableModel, MODEL_o695, FALSE) - EVT_CALL(N(DisableLightSource1)) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim02) - EVT_CALL(SetNpcPos, NPC_SELF, 1170, 110, 0) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Koopatrol_02))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Koopatrol_02))) - EVT_RETURN - EVT_END + IfNe(GF_KKJ12_TrickedGuard, FALSE) + Call(EnableModel, MODEL_o695, FALSE) + Call(N(DisableLightSource1)) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim02) + Call(SetNpcPos, NPC_SELF, 1170, 110, 0) + Call(SetNpcYaw, NPC_SELF, 270) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Koopatrol_02))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Koopatrol_02))) + Return + End }; NpcData N(NpcData_Koopatrol_01)[] = { diff --git a/src/world/area_kkj/kkj_13/kkj_13_1_music.c b/src/world/area_kkj/kkj_13/kkj_13_1_music.c index 879c53fb52e..6d228b3f8a2 100644 --- a/src/world/area_kkj/kkj_13/kkj_13_1_music.c +++ b/src/world/area_kkj/kkj_13/kkj_13_1_music.c @@ -1,20 +1,20 @@ #include "kkj_13.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_INTRO) - EVT_CASE_GE(STORY_CH8_REACHED_PEACHS_CASTLE) - EVT_IF_EQ(GF_KKJ13_BowserTaunts, FALSE) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrack, 0, SONG_BOWSER_THEME, 0, 8) - EVT_END_THREAD - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_BOWSER_THEME, 0, 8) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseEq(STORY_INTRO) + CaseGe(STORY_CH8_REACHED_PEACHS_CASTLE) + IfEq(GF_KKJ13_BowserTaunts, FALSE) + Thread + Wait(30) + Call(SetMusicTrack, 0, SONG_BOWSER_THEME, 0, 8) + EndThread + Else + Call(SetMusicTrack, 0, SONG_BOWSER_THEME, 0, 8) + EndIf + CaseDefault + EndSwitch + Call(UseDoorSounds, DOOR_SOUNDS_LARGE) + Return + End }; diff --git a/src/world/area_kkj/kkj_13/kkj_13_2_main.c b/src/world/area_kkj/kkj_13/kkj_13_2_main.c index 76c0650a70f..d8ff46427da 100644 --- a/src/world/area_kkj/kkj_13/kkj_13_2_main.c +++ b/src/world/area_kkj/kkj_13/kkj_13_2_main.c @@ -27,68 +27,68 @@ EvtScript N(EVS_ExitDoors_kkj_22_0) = EVT_EXIT_DOUBLE_DOOR(kkj_13_ENTRY_1, "kkj_ COLLIDER_deilit2, MODEL_door4, MODEL_door3); EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kkj_13_ENTRY_0) - EVT_SET(LVar2, MODEL_door1) - EVT_SET(LVar3, MODEL_door2) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_Scene_MarioConfrontsBowser)) - EVT_CASE_EQ(kkj_13_ENTRY_1) - EVT_SET(LVar2, MODEL_door4) - EVT_SET(LVar3, MODEL_door3) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(kkj_13_ENTRY_2) - EVT_EXEC(N(EVS_Scene_BowserAttacks)) - EVT_CASE_EQ(kkj_13_ENTRY_3) - EVT_EXEC(N(EVS_Scene_PeachCaptured)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kkj_13_ENTRY_0) + Set(LVar2, MODEL_door1) + Set(LVar3, MODEL_door2) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_Scene_MarioConfrontsBowser)) + CaseEq(kkj_13_ENTRY_1) + Set(LVar2, MODEL_door4) + Set(LVar3, MODEL_door3) + ExecWait(EnterDoubleDoor) + CaseEq(kkj_13_ENTRY_2) + Exec(N(EVS_Scene_BowserAttacks)) + CaseEq(kkj_13_ENTRY_3) + Exec(N(EVS_Scene_PeachCaptured)) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PEACHS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_KKJ_13) - EVT_SETUP_CAMERA_DEFAULT() - EVT_IF_EQ(GB_StoryProgress, STORY_INTRO) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(IntroNPCs))) - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH8_OPENED_PATH_TO_STAR_WAY) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(ChapterNPCs))) - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kkj_13_ENTRY_2) - EVT_CALL(EnableGroup, MODEL_g152, FALSE) - EVT_CALL(EnableGroup, MODEL_g154, FALSE) - EVT_CALL(EnableGroup, MODEL_g153, FALSE) - EVT_ELSE - EVT_CALL(EnableGroup, MODEL_g133, FALSE) - EVT_CALL(EnableGroup, MODEL_g147, FALSE) - EVT_CALL(EnableGroup, MODEL_g153, FALSE) - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH8_OPENED_PATH_TO_STAR_WAY) - EVT_IF_EQ(GF_KKJ13_BowserTaunts, FALSE) - EVT_CALL(EnableGroup, MODEL_g153, TRUE) - EVT_CALL(TranslateGroup, MODEL_g153, 780, 90, 0) - EVT_CALL(RotateGroup, MODEL_g153, -60, 0, 1, 0) - EVT_END_IF - EVT_END_IF - EVT_CALL(SetTexPanner, MODEL_o685, 0) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_PEACHS_CASTLE) + Call(SetSpriteShading, SHADING_KKJ_13) + SetUP_CAMERA_DEFAULT() + IfEq(GB_StoryProgress, STORY_INTRO) + Call(MakeNpcs, FALSE, Ref(N(IntroNPCs))) + EndIf + IfGe(GB_StoryProgress, STORY_CH8_OPENED_PATH_TO_STAR_WAY) + Call(MakeNpcs, FALSE, Ref(N(ChapterNPCs))) + EndIf + Call(GetEntryID, LVar0) + IfEq(LVar0, kkj_13_ENTRY_2) + Call(EnableGroup, MODEL_g152, FALSE) + Call(EnableGroup, MODEL_g154, FALSE) + Call(EnableGroup, MODEL_g153, FALSE) + Else + Call(EnableGroup, MODEL_g133, FALSE) + Call(EnableGroup, MODEL_g147, FALSE) + Call(EnableGroup, MODEL_g153, FALSE) + EndIf + IfGe(GB_StoryProgress, STORY_CH8_OPENED_PATH_TO_STAR_WAY) + IfEq(GF_KKJ13_BowserTaunts, FALSE) + Call(EnableGroup, MODEL_g153, TRUE) + Call(TranslateGroup, MODEL_g153, 780, 90, 0) + Call(RotateGroup, MODEL_g153, -60, 0, 1, 0) + EndIf + EndIf + Call(SetTexPanner, MODEL_o685, 0) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_0) TEX_PAN_PARAMS_STEP( 0, 0, 40, 900) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetModelCustomGfx, MODEL_o685, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetCustomGfx, CUSTOM_GFX_0, EVT_PTR(N(setup_gfx_candle_lights)), NULL) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_12_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilit1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_22_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilit2, 1, 0) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetModelCustomGfx, MODEL_o685, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetCustomGfx, CUSTOM_GFX_0, Ref(N(setup_gfx_candle_lights)), NULL) + Exec(N(EVS_SetupMusic)) + BindTrigger(Ref(N(EVS_ExitDoors_kkj_12_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilit1, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_kkj_22_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilit2, 1, 0) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_kkj/kkj_13/kkj_13_3_npcs_finale.c b/src/world/area_kkj/kkj_13/kkj_13_3_npcs_finale.c index eb3dc63aaee..0da8b71604e 100644 --- a/src/world/area_kkj/kkj_13/kkj_13_3_npcs_finale.c +++ b/src/world/area_kkj/kkj_13/kkj_13_3_npcs_finale.c @@ -19,155 +19,155 @@ API_CALLABLE(N(UpdatePropellerSoundPos)) { } EvtScript N(EVS_UpdatePropellerSounds) = { - EVT_CALL(PlaySoundAtNpc, NPC_Bowser_Prop, SOUND_LOOP_BOWSER_PROPELLER, SOUND_SPACE_DEFAULT) - EVT_LOOP(0) - EVT_CALL(N(UpdatePropellerSoundPos)) - EVT_IF_LT(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_IF_EQ(GF_KKJ13_BowserTaunts, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(StopSound, SOUND_LOOP_BOWSER_PROPELLER) - EVT_RETURN - EVT_END + Call(PlaySoundAtNpc, NPC_Bowser_Prop, SOUND_LOOP_BOWSER_PROPELLER, SOUND_SPACE_DEFAULT) + Loop(0) + Call(N(UpdatePropellerSoundPos)) + IfLt(LVar0, 0) + BreakLoop + EndIf + IfEq(GF_KKJ13_BowserTaunts, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(StopSound, SOUND_LOOP_BOWSER_PROPELLER) + Return + End }; EvtScript N(EVS_MoveToBattlePositions) = { - EVT_THREAD - EVT_CALL(SetNpcPos, NPC_Bowser_Prop, NPC_DISPOSE_LOCATION) - EVT_CALL(PlayerMoveTo, 525, 0, 50) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_BeforeJump) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 600, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 600, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(SetNpcJumpscale, NPC_Bowser_Body, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump0, NPC_Bowser_Body, 675, 0, 0, 10) - EVT_CALL(PlaySoundAtNpc, NPC_Bowser_Body, SOUND_LARGE_NPC_IMPACT, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Jump) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Land) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_PostJump) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(2.0)) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Idle) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + Call(SetNpcPos, NPC_Bowser_Prop, NPC_DISPOSE_LOCATION) + Call(PlayerMoveTo, 525, 0, 50) + Call(SetPlayerAnimation, ANIM_Mario1_BeforeJump) + EndThread + Thread + Call(UseSettingsFrom, CAM_DEFAULT, 600, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 600, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Thread + Wait(20) + Call(SetNpcJumpscale, NPC_Bowser_Body, Float(0.0)) + Call(NpcJump0, NPC_Bowser_Body, 675, 0, 0, 10) + Call(PlaySoundAtNpc, NPC_Bowser_Body, SOUND_LARGE_NPC_IMPACT, SOUND_SPACE_DEFAULT) + EndThread + Thread + Wait(20) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Jump) + Wait(5) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Land) + Wait(5) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_PostJump) + Call(ShakeCam, CAM_DEFAULT, 0, 20, Float(2.0)) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Idle) + EndThread + Return + End }; EvtScript N(EVS_Scene_MarioConfrontsBowser) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH8_OPENED_PATH_TO_STAR_WAY) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GF_KKJ13_BowserTaunts, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcPos, NPC_Bowser_Body, 725, 210, -25) - EVT_CALL(SetNpcPos, NPC_Bowser_Prop, 725, 210, -25) - EVT_EXEC(N(EVS_UpdatePropellerSounds)) - EVT_CALL(SpeakToPlayer, NPC_CaptivePeach, ANIM_Peach2_TiedHangStruggle, ANIM_Peach2_TiedHangIdle, 0, MSG_CH8_006F) - EVT_CALL(EnableNpcShadow, NPC_Bowser_Body, FALSE) - EVT_CALL(SetCamType, CAM_DEFAULT, 1, FALSE) - EVT_SET(LVar0, 725) - EVT_SET(LVar1, 50) - EVT_SET(LVar2, -25) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(11.0), EVT_FLOAT(-2.5)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 600) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(85.0), EVT_FLOAT(-3.5)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(210.0), EVT_FLOAT(240.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(60) - EVT_CALL(EnableNpcShadow, NPC_Bowser_Body, TRUE) - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Bowser_Body, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump0, NPC_Bowser_Body, 725, 50, -25, 20) - EVT_END_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Bowser_Prop, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump0, NPC_Bowser_Prop, 725, 50, -25, 20) - EVT_WAIT(10) - EVT_CALL(GetNpcPos, NPC_Bowser_Body, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(20.0), EVT_FLOAT(-12.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(72.5), EVT_FLOAT(-25.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(210.0), EVT_FLOAT(240.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarTalk, ANIM_WorldBowser_ClownCarIdle, 0, MSG_CH8_0070) - EVT_WAIT(5) - EVT_CALL(GetNpcPos, NPC_CaptivePeach, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 325) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(72.0), EVT_FLOAT(0.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(170.0), EVT_FLOAT(240.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_CaptivePeach, ANIM_Peach2_TiedHangStruggle, ANIM_Peach2_TiedHangIdle, 0, MSG_CH8_0071) - EVT_WAIT(20) - EVT_CALL(SetPlayerPos, 400, 0, -15) - EVT_CALL(PartnerIsFlying, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_CALL(SetNpcPos, NPC_PARTNER, 370, 20, -15) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_PARTNER, 370, 0, -15) - EVT_END_IF - EVT_CALL(ClearPartnerMoveHistory, NPC_PARTNER) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_EXEC_WAIT(N(EVS_MoveToBattlePositions)) - EVT_WAIT(50) - EVT_CALL(SpeakToPlayer, NPC_Bowser_Body, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_CH8_0072) - EVT_WAIT(10) - EVT_CALL(SetNpcVar, NPC_Bowser_Body, 0, 1) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(PlayerMoveTo, 580, 0, 25) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Walk) - EVT_CALL(NpcMoveTo, NPC_Bowser_Body, 630, 0, 25) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Idle) - EVT_END_THREAD - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH8_OPENED_PATH_TO_STAR_WAY) + Return + EndIf + IfEq(GF_KKJ13_BowserTaunts, TRUE) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(SetNpcPos, NPC_Bowser_Body, 725, 210, -25) + Call(SetNpcPos, NPC_Bowser_Prop, 725, 210, -25) + Exec(N(EVS_UpdatePropellerSounds)) + Call(SpeakToPlayer, NPC_CaptivePeach, ANIM_Peach2_TiedHangStruggle, ANIM_Peach2_TiedHangIdle, 0, MSG_CH8_006F) + Call(EnableNpcShadow, NPC_Bowser_Body, FALSE) + Call(SetCamType, CAM_DEFAULT, 1, FALSE) + Set(LVar0, 725) + Set(LVar1, 50) + Set(LVar2, -25) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(11.0), Float(-2.5)) + Call(SetCamDistance, CAM_DEFAULT, 600) + Call(SetCamPosA, CAM_DEFAULT, Float(85.0), Float(-3.5)) + Call(SetCamPosB, CAM_DEFAULT, Float(210.0), Float(240.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(60) + Call(EnableNpcShadow, NPC_Bowser_Body, TRUE) + Thread + Call(SetNpcJumpscale, NPC_Bowser_Body, Float(0.0)) + Call(NpcJump0, NPC_Bowser_Body, 725, 50, -25, 20) + EndThread + Call(SetNpcJumpscale, NPC_Bowser_Prop, Float(0.0)) + Call(NpcJump0, NPC_Bowser_Prop, 725, 50, -25, 20) + Wait(10) + Call(GetNpcPos, NPC_Bowser_Body, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(20.0), Float(-12.0)) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(SetCamPosA, CAM_DEFAULT, Float(72.5), Float(-25.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(210.0), Float(240.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10) + Call(SpeakToPlayer, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarTalk, ANIM_WorldBowser_ClownCarIdle, 0, MSG_CH8_0070) + Wait(5) + Call(GetNpcPos, NPC_CaptivePeach, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-7.0)) + Call(SetCamDistance, CAM_DEFAULT, 325) + Call(SetCamPosA, CAM_DEFAULT, Float(72.0), Float(0.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(170.0), Float(240.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(20) + Call(SpeakToPlayer, NPC_CaptivePeach, ANIM_Peach2_TiedHangStruggle, ANIM_Peach2_TiedHangIdle, 0, MSG_CH8_0071) + Wait(20) + Call(SetPlayerPos, 400, 0, -15) + Call(PartnerIsFlying, LVar0) + IfEq(LVar0, FALSE) + Call(SetNpcPos, NPC_PARTNER, 370, 20, -15) + Else + Call(SetNpcPos, NPC_PARTNER, 370, 0, -15) + EndIf + Call(ClearPartnerMoveHistory, NPC_PARTNER) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + ExecWait(N(EVS_MoveToBattlePositions)) + Wait(50) + Call(SpeakToPlayer, NPC_Bowser_Body, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_CH8_0072) + Wait(10) + Call(SetNpcVar, NPC_Bowser_Body, 0, 1) + Wait(10) + Thread + Call(PlayerMoveTo, 580, 0, 25) + EndThread + Thread + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Walk) + Call(NpcMoveTo, NPC_Bowser_Body, 630, 0, 25) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Idle) + EndThread + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcIdle_BowserAwaitBattle) = { - EVT_LABEL(0) - EVT_CALL(SetSelfVar, 0, 0) - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(StartBossBattle, SONG_BOWSER_THEME) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(SetSelfVar, 0, 0) + Loop(0) + Call(GetSelfVar, 0, LVar0) + IfNe(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(StartBossBattle, SONG_BOWSER_THEME) + Goto(0) + Return + End }; Vec3f N(ToWindowPath)[] = { @@ -193,137 +193,137 @@ Vec3f N(UpAndAwayPath)[] = { }; EvtScript N(EVS_FlyBowserAndPeach) = { - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Bowser_Body, LVar1, LVar2, LVar3) - EVT_CALL(SetNpcPos, NPC_Bowser_Prop, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, 28) - EVT_ADD(LVar2, 40) - EVT_ADD(LVar3, -3) - EVT_CALL(SetNpcPos, NPC_CaptivePeach, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Bowser_Body, LVar1, LVar2, LVar3) + Call(SetNpcPos, NPC_Bowser_Prop, LVar1, LVar2, LVar3) + Add(LVar1, 28) + Add(LVar2, 40) + Add(LVar3, -3) + Call(SetNpcPos, NPC_CaptivePeach, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_BowserFliesAway) = { - EVT_CALL(SetNpcPos, NPC_Bowser_Body, 800, 0, 0) - EVT_CALL(SetNpcYaw, NPC_Bowser_Body, 270) - EVT_CALL(SetNpcPos, NPC_Bowser_Prop, 800, 0, 0) - EVT_CALL(SetNpcYaw, NPC_Bowser_Prop, 270) - EVT_CALL(SetNpcPos, NPC_CaptivePeach, 828, 90, -3) - EVT_EXEC(N(EVS_UpdatePropellerSounds)) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(InterpPlayerYaw, 0, 1) - EVT_END_THREAD - EVT_CALL(LoadPath, 25, EVT_PTR(N(ToWindowPath)), ARRAY_COUNT(N(ToWindowPath)), EASING_LINEAR) - EVT_EXEC_WAIT(N(EVS_FlyBowserAndPeach)) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarLaugh) - EVT_WAIT(40) - EVT_CALL(LoadPath, 25, EVT_PTR(N(ThroughWindowPath)), ARRAY_COUNT(N(ThroughWindowPath)), EASING_LINEAR) - EVT_EXEC_WAIT(N(EVS_FlyBowserAndPeach)) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarIdle) - EVT_WAIT(15) - EVT_CALL(LoadPath, 25, EVT_PTR(N(UpAndAwayPath)), ARRAY_COUNT(N(UpAndAwayPath)), EASING_LINEAR) - EVT_EXEC(N(EVS_FlyBowserAndPeach)) - EVT_WAIT(10) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Bowser_Body, 800, 0, 0) + Call(SetNpcYaw, NPC_Bowser_Body, 270) + Call(SetNpcPos, NPC_Bowser_Prop, 800, 0, 0) + Call(SetNpcYaw, NPC_Bowser_Prop, 270) + Call(SetNpcPos, NPC_CaptivePeach, 828, 90, -3) + Exec(N(EVS_UpdatePropellerSounds)) + Thread + Wait(15) + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + Wait(20) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(InterpPlayerYaw, 0, 1) + EndThread + Call(LoadPath, 25, Ref(N(ToWindowPath)), ARRAY_COUNT(N(ToWindowPath)), EASING_LINEAR) + ExecWait(N(EVS_FlyBowserAndPeach)) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarLaugh) + Wait(40) + Call(LoadPath, 25, Ref(N(ThroughWindowPath)), ARRAY_COUNT(N(ThroughWindowPath)), EASING_LINEAR) + ExecWait(N(EVS_FlyBowserAndPeach)) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarIdle) + Wait(15) + Call(LoadPath, 25, Ref(N(UpAndAwayPath)), ARRAY_COUNT(N(UpAndAwayPath)), EASING_LINEAR) + Exec(N(EVS_FlyBowserAndPeach)) + Wait(10) + Return + End }; EvtScript N(EVS_Scene_BowserDefeated) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 1) - EVT_CALL(EnableGroup, MODEL_g153, FALSE) - EVT_CALL(SetPlayerPos, 525, 0, 0) - EVT_CALL(PartnerIsFlying, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_SET(LVar1, 10) - EVT_ELSE - EVT_SET(LVar1, 0) - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_PARTNER, 490, LVar1, 0) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 90) - EVT_CALL(SetNpcPos, NPC_Bowser_Body, 675, 0, 0) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(90.0), 75, 450, EVT_FLOAT(17.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Tantrum) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Idle) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Bowser_Body, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_CH8_0078) - EVT_WAIT(20) - EVT_CALL(InterpNpcYaw, NPC_Bowser_Body, 90, 1) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Walk) - EVT_CALL(NpcMoveTo, NPC_Bowser_Body, 800, 0, 20) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarIdle) - EVT_CALL(SetNpcAnimation, NPC_CaptivePeach, ANIM_Peach2_TiedIdle) - EVT_CALL(SpeakToPlayer, NPC_CaptivePeach, ANIM_Peach2_TiedHangStruggle, ANIM_Peach2_TiedHangIdle, 0, MSG_CH8_0079) - EVT_CALL(EnablePartnerAI) - EVT_CALL(PlayerMoveTo, 580, 0, 10) - EVT_EXEC_WAIT(N(EVS_BowserFliesAway)) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Bowser_Body, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_CH8_007A) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_SET(GF_KKJ13_BowserTaunts, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 1) + Call(EnableGroup, MODEL_g153, FALSE) + Call(SetPlayerPos, 525, 0, 0) + Call(PartnerIsFlying, LVar0) + IfEq(LVar0, FALSE) + Set(LVar1, 10) + Else + Set(LVar1, 0) + EndIf + Call(SetNpcPos, NPC_PARTNER, 490, LVar1, 0) + Call(SetNpcYaw, NPC_PARTNER, 90) + Call(SetNpcPos, NPC_Bowser_Body, 675, 0, 0) + Call(AdjustCam, CAM_DEFAULT, Float(90.0), 75, 450, Float(17.0), Float(-7.0)) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Tantrum) + Wait(30) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Idle) + Wait(10) + Call(SpeakToPlayer, NPC_Bowser_Body, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_CH8_0078) + Wait(20) + Call(InterpNpcYaw, NPC_Bowser_Body, 90, 1) + Wait(10) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Walk) + Call(NpcMoveTo, NPC_Bowser_Body, 800, 0, 20) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarIdle) + Call(SetNpcAnimation, NPC_CaptivePeach, ANIM_Peach2_TiedIdle) + Call(SpeakToPlayer, NPC_CaptivePeach, ANIM_Peach2_TiedHangStruggle, ANIM_Peach2_TiedHangIdle, 0, MSG_CH8_0079) + Call(EnablePartnerAI) + Call(PlayerMoveTo, 580, 0, 10) + ExecWait(N(EVS_BowserFliesAway)) + Wait(10) + Call(SpeakToPlayer, NPC_Bowser_Body, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_CH8_007A) + Call(ResetCam, CAM_DEFAULT, Float(1.0)) + Set(GF_KKJ13_BowserTaunts, TRUE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcDefeat_Bowser_Body) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAG_2, TRUE) - EVT_EXEC(N(EVS_Scene_BowserDefeated)) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAG_2, TRUE) + Exec(N(EVS_Scene_BowserDefeated)) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Bowser_Body) = { - EVT_CALL(SetNpcPos, NPC_Bowser_Body, NPC_DISPOSE_LOCATION) - EVT_IF_EQ(GF_KKJ13_BowserTaunts, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_BowserAwaitBattle))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Bowser_Body))) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarIdle) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Bowser_Body, NPC_DISPOSE_LOCATION) + IfEq(GF_KKJ13_BowserTaunts, TRUE) + Return + EndIf + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_BowserAwaitBattle))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Bowser_Body))) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarIdle) + Return + End }; EvtScript N(EVS_NpcInit_Bowser_Prop) = { - EVT_CALL(EnableNpcShadow, NPC_Bowser_Prop, FALSE) - EVT_CALL(SetNpcPos, NPC_Bowser_Prop, NPC_DISPOSE_LOCATION) - EVT_IF_EQ(GF_KKJ13_BowserTaunts, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_Bowser_Prop, ANIM_WorldBowser_ClownCarPropeller) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_Bowser_Prop, FALSE) + Call(SetNpcPos, NPC_Bowser_Prop, NPC_DISPOSE_LOCATION) + IfEq(GF_KKJ13_BowserTaunts, TRUE) + Return + EndIf + Call(SetNpcAnimation, NPC_Bowser_Prop, ANIM_WorldBowser_ClownCarPropeller) + Return + End }; EvtScript N(EVS_NpcInit_CaptivePeach) = { - EVT_CALL(SetNpcPos, NPC_CaptivePeach, NPC_DISPOSE_LOCATION) - EVT_IF_EQ(GF_KKJ13_BowserTaunts, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_CaptivePeach, 775, 90, 0) - EVT_CALL(SetNpcAnimation, NPC_CaptivePeach, ANIM_Peach2_TiedHangStruggle) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_CaptivePeach, NPC_DISPOSE_LOCATION) + IfEq(GF_KKJ13_BowserTaunts, TRUE) + Return + EndIf + Call(SetNpcPos, NPC_CaptivePeach, 775, 90, 0) + Call(SetNpcAnimation, NPC_CaptivePeach, ANIM_Peach2_TiedHangStruggle) + Return + End }; AnimID N(ExtraAnims_Bowser)[] = { diff --git a/src/world/area_kkj/kkj_13/kkj_13_4_npcs_intro.c b/src/world/area_kkj/kkj_13/kkj_13_4_npcs_intro.c index 2f7899aea29..e051907f7b7 100644 --- a/src/world/area_kkj/kkj_13/kkj_13_4_npcs_intro.c +++ b/src/world/area_kkj/kkj_13/kkj_13_4_npcs_intro.c @@ -10,31 +10,31 @@ #include "world/common/npc/Peach.inc.c" EvtScript N(EVS_NpcIdle_BowserAwaitBattle) = { - EVT_CALL(SetSelfVar, 0, 1) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(ModifyGlobalOverrideFlags, 1, GLOBAL_OVERRIDES_DONT_RESUME_SONG_AFTER_BATTLE) - EVT_CALL(StartBossBattle, SONG_BOWSER_THEME) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 1) + Loop(0) + Wait(1) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(ModifyGlobalOverrideFlags, 1, GLOBAL_OVERRIDES_DONT_RESUME_SONG_AFTER_BATTLE) + Call(StartBossBattle, SONG_BOWSER_THEME) + Return + End }; EvtScript N(EVS_NpcDefeat_Bowser_Body) = { - EVT_CALL(SetSelfVar, 0, 1) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 1) + Return + End }; EvtScript N(EVS_NpcInit_Bowser_Body) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_BowserAwaitBattle))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Bowser_Body))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_BowserAwaitBattle))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Bowser_Body))) + Return + End }; AnimID N(ExtraAnims_Bowser)[] = { diff --git a/src/world/area_kkj/kkj_13/kkj_13_5_intro_scenes.c b/src/world/area_kkj/kkj_13/kkj_13_5_intro_scenes.c index 2e5082a272c..97158678f41 100644 --- a/src/world/area_kkj/kkj_13/kkj_13_5_intro_scenes.c +++ b/src/world/area_kkj/kkj_13/kkj_13_5_intro_scenes.c @@ -16,17 +16,17 @@ API_CALLABLE(N(UpdatePropellerSoundPos_Intro)) { } EvtScript N(EVS_UpdatePropellerSounds_Intro) = { - EVT_CALL(PlaySoundAtNpc, NPC_Bowser_Prop, SOUND_LOOP_BOWSER_PROPELLER, SOUND_SPACE_DEFAULT) - EVT_LOOP(0) - EVT_CALL(N(UpdatePropellerSoundPos_Intro)) - EVT_IF_LT(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(StopSound, SOUND_LOOP_BOWSER_PROPELLER) - EVT_RETURN - EVT_END + Call(PlaySoundAtNpc, NPC_Bowser_Prop, SOUND_LOOP_BOWSER_PROPELLER, SOUND_SPACE_DEFAULT) + Loop(0) + Call(N(UpdatePropellerSoundPos_Intro)) + IfLt(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(StopSound, SOUND_LOOP_BOWSER_PROPELLER) + Return + End }; API_CALLABLE(N(ScreenWhiteFlashOn)) { @@ -156,356 +156,356 @@ Vec3f N(PlayerThrownPath)[] = { }; EvtScript N(EVS_FocusCam_Everyone) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 720, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 720, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, LVar0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, 720, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 720, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, LVar0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_FocusCam_OnPeach) = { - EVT_CALL(GetNpcPos, NPC_Peach, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_Peach, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_FocusCam_OnBowser) = { - EVT_CALL(GetNpcPos, NPC_Bowser_Body, LVar1, LVar2, LVar3) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar1, LVar2, LVar3) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar1, LVar2, LVar3) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, LVar0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_Bowser_Body, LVar1, LVar2, LVar3) + Call(UseSettingsFrom, CAM_DEFAULT, LVar1, LVar2, LVar3) + Call(SetPanTarget, CAM_DEFAULT, LVar1, LVar2, LVar3) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-11.0)) + Call(SetCamSpeed, CAM_DEFAULT, LVar0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_Scene_BowserAttacks) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSER_ATTACKS, 0, 8) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcPos, NPC_Peach, 680, 0, -15) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 600, 0, -15) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 600, 0, -15) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_CALL(PlaySound, SOUND_LOOP_KKJ_RUMBLING) + Call(SetMusicTrack, 0, SONG_BOWSER_ATTACKS, 0, 8) + Call(DisablePlayerInput, TRUE) + Call(SetNpcPos, NPC_Peach, 680, 0, -15) + Call(UseSettingsFrom, CAM_DEFAULT, 600, 0, -15) + Call(SetPanTarget, CAM_DEFAULT, 600, 0, -15) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-10.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Call(PlaySound, SOUND_LOOP_KKJ_RUMBLING) #if VERSION_PAL - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 60 * DT, EVT_FLOAT(0.5)) + Call(ShakeCam, CAM_DEFAULT, 0, 60 * DT, Float(0.5)) #else - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30, EVT_FLOAT(0.5)) + Call(ShakeCam, CAM_DEFAULT, 0, 30, Float(1.0)) + Call(ShakeCam, CAM_DEFAULT, 0, 30, Float(0.5)) #endif - EVT_CALL(PlaySound, SOUND_LRAW_KKJ_RUMBLING | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_CALL(StopTrackingSoundPos, SOUND_LRAW_KKJ_RUMBLING) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetPlayerJumpscale, 0) - EVT_LOOP(2) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(PlayerJump1, 550, 0, 0, 20 * DT) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(PlayerJump1, 630, 0, 0, 20 * DT) - EVT_END_LOOP - EVT_CALL(PlayerMoveTo, 550, 0, 30 * DT) - EVT_CALL(PlayerMoveTo, 575, 0, 30 * DT) - EVT_CALL(InterpPlayerYaw, 90, 7 * DT) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(2) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_CarryAboveRun) - EVT_WAIT(15 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Run) - EVT_WAIT(15 * DT) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach1_RunLiftDress) - EVT_LOOP(2) - EVT_CALL(NpcMoveTo, NPC_Peach, 600, -2, 20 * DT) - EVT_CALL(NpcMoveTo, NPC_Peach, 680, -2, 20 * DT) - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Walk) - EVT_CALL(NpcMoveTo, NPC_Peach, 600, -2, 30 * DT) - EVT_CALL(NpcMoveTo, NPC_Peach, 625, -2, 30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Idle) - EVT_CALL(InterpNpcYaw, NPC_Peach, 270, 7 * DT) - EVT_END_THREAD - EVT_WAIT(160 * DT) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach2_RaiseArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_Peach, ANIM_Peach2_Talk,ANIM_Peach2_TalkIdle, 0, MSG_Intro_004E) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach2_LowerArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Peach, SPRITE_ID_BACK_FACING | ANIM_Peach1_Idle) - EVT_WAIT(20 * DT) - EVT_CALL(GetNpcPos, NPC_Peach, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Peach, LVar0, LVar1, LVar2, 10) - EVT_WAIT(10 * DT) - EVT_CALL(InterpPlayerYaw, 0, 7 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 600, 0, -15) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 600, 0, -15) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0 * DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Peach, SPRITE_ID_BACK_FACING | ANIM_Peach1_Idle, SPRITE_ID_BACK_FACING | ANIM_Peach1_Idle, 5, MSG_Intro_004F) - EVT_WAIT(30 * DT) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarIdle) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Prop, ANIM_WorldBowser_ClownCarPropeller) - EVT_CALL(SetNpcYaw, NPC_Bowser_Body, 90) - EVT_CALL(SetNpcYaw, NPC_Bowser_Prop, 90) - EVT_EXEC(N(EVS_UpdatePropellerSounds_Intro)) - EVT_CALL(LoadPath, 50 * DT, EVT_PTR(N(FlyThroughWindowPath)), ARRAY_COUNT(N(FlyThroughWindowPath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Bowser_Body, LVar1, LVar2, LVar3) - EVT_CALL(SetNpcPos, NPC_Bowser_Prop, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Idle) - EVT_CALL(SetNpcPos, NPC_Bowser_Body, 820, 20, 0) - EVT_CALL(SetNpcYaw, NPC_Bowser_Body, 270) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0B) - EVT_CALL(SetNpcYaw, NPC_Kammy, 90) - EVT_WAIT(10 * DT) - EVT_CALL(LoadPath, 50 * DT, EVT_PTR(N(FlyThroughWindowPath)), ARRAY_COUNT(N(FlyThroughWindowPath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Kammy, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) - EVT_CALL(SetNpcPos, NPC_Kammy, 920, 0, 0) - EVT_CALL(SetNpcYaw, NPC_Kammy, 270) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(N(ScreenWhiteFlashOn)) - EVT_CALL(EnableGroup, MODEL_g133, FALSE) - EVT_CALL(EnableGroup, MODEL_g147, FALSE) - EVT_CALL(EnableGroup, MODEL_g152, TRUE) - EVT_CALL(EnableGroup, MODEL_g154, TRUE) - EVT_CALL(PlaySoundAt, SOUND_GLASS_SHATTER, SOUND_SPACE_DEFAULT, 600, 60, -150) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, 600, 60, -150, 120) - EVT_CALL(N(ShatterWindow)) - EVT_WAIT(1) - EVT_CALL(N(ScreenWhiteFlashOff)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10 * DT, EVT_FLOAT(2.0)) - EVT_END_THREAD - EVT_LOOP(70 * DT) - EVT_WAIT(1) - EVT_CALL(PlayerFaceNpc, NPC_Bowser_Body, FALSE) - EVT_CALL(NpcFaceNpc, NPC_Peach, NPC_Bowser_Body, 0) - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Idle) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcPos, NPC_Bowser_Prop, NPC_DISPOSE_LOCATION) - EVT_CALL(SetMusicTrack, 0, SONG_BOWSER_THEME, 0, 8) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetNpcJumpscale, NPC_Bowser_Body, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump0, NPC_Bowser_Body, 810, 0, 0, 5) - EVT_CALL(PlaySoundAtNpc, NPC_Bowser_Body, SOUND_LARGE_NPC_IMPACT, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_PostJump) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20 * DT, EVT_FLOAT(2.0)) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Idle) - EVT_END_THREAD - EVT_CALL(SetPanTarget, CAM_DEFAULT, 740, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(30 * DT) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim02) - EVT_CALL(NpcMoveTo, NPC_Kammy, 880, 0, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) - EVT_END_THREAD - EVT_CALL(SpeakToNpc, NPC_Bowser_Body, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_Peach, MSG_Intro_0050) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 625, 0, -15) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SpeakToNpc, NPC_Peach, ANIM_Peach2_Shout, ANIM_Peach2_EndShout, 0, NPC_Bowser_Body, MSG_Intro_0051) - EVT_SET(LVar0, EVT_FLOAT(1.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnBowser)) - EVT_CALL(SpeakToNpc, NPC_Bowser_Body, ANIM_WorldBowser_TalkEyesClosed, ANIM_WorldBowser_Idle, 0, NPC_Peach, MSG_Intro_0052) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Walk) - EVT_CALL(NpcMoveTo, NPC_Bowser_Body, 770, 0, 30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim02) - EVT_CALL(NpcMoveTo, NPC_Kammy, 840, 0, 30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) - EVT_END_THREAD - EVT_WAIT(5 * DT) - EVT_SET(LVar0, EVT_FLOAT(90.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_Everyone)) - EVT_WAIT(5 * DT) - EVT_CALL(PlayerMoveTo, 660, 0, 15 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_BeforeJump) - EVT_WAIT(15 * DT) - EVT_CALL(SpeakToPlayer, NPC_Bowser_Body, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_Intro_0053) - EVT_CALL(SpeakToPlayer, NPC_Peach, ANIM_Peach2_ArmsCrossedTalk, ANIM_Peach2_ArmsCrossedIdle, 5, MSG_Intro_0054) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_RearUpLaugh) - EVT_CALL(SpeakToPlayer, NPC_Bowser_Body, ANIM_WorldBowser_RearUpLaugh, ANIM_WorldBowser_RearUpLaugh, 0, MSG_Intro_0055) - EVT_SET(LVar0, EVT_FLOAT(90.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnBowser)) - EVT_CALL(SpeakToPlayer, NPC_Bowser_Body, ANIM_WorldBowser_RearUpTalk, ANIM_WorldBowser_RearUpTalk, 0, MSG_Intro_0056) - EVT_SET(LVar0, EVT_FLOAT(5.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_Everyone)) - EVT_CALL(SetNpcVar, NPC_Bowser_Body, 0, 0) - EVT_WAIT(5) - EVT_CALL(PlayerMoveTo, 695, 0, 10) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.75)) - EVT_CALL(PlayerJump, 720, 80, 0, 20 * DT) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcVar, NPC_Bowser_Body, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(SetPlayerPos, 660, 0, 15) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_FallDown) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach2_GaspStill) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_RearUpLaugh) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnPeach)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Peach, ANIM_Peach2_GaspStill, ANIM_Peach2_GaspStill, 5, MSG_Intro_005D) - EVT_WAIT(10 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 790, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 790, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Bowser_Body, ANIM_WorldBowser_RearUpLaugh, ANIM_WorldBowser_RearUpLaugh, 5, MSG_Intro_005E) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 5, MSG_Intro_005F) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Idle) - EVT_CALL(InterpNpcYaw, NPC_Bowser_Body, 90, 5) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Brandish) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_BrandishIdle) - EVT_CALL(SpeakToNpc, NPC_Bowser_Body, ANIM_WorldBowser_BrandishTalk, ANIM_WorldBowser_BrandishIdle, 0, NPC_Kammy, MSG_Intro_0060) - EVT_WAIT(10 * DT) - EVT_SET(LVar0, EVT_FLOAT(90.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_Everyone)) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Idle) - EVT_CALL(InterpNpcYaw, NPC_Bowser_Body, 270, 10) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_Bowser_Body, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 5, MSG_Intro_0061) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Brandish) - EVT_WAIT(10 * DT) - EVT_CALL(FadeOutMusic, 0, 500) - EVT_CALL(PlaySoundAtNpc, NPC_Bowser_Body, SOUND_BOWSER_STAR_ROD_USE, SOUND_SPACE_DEFAULT) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 0, 780, 95, 27, 1, 30) - EVT_WAIT(40 * DT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10 * DT, EVT_FLOAT(4.0)) - EVT_END_THREAD - EVT_CALL(PlaySoundAtPlayer, SOUND_BOWSER_LIGHTNING, SOUND_SPACE_DEFAULT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 5) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING, 4, LVar0, LVar1, LVar2, 0, 0) - EVT_THREAD - EVT_CALL(PlaySoundAtPlayer, SOUND_TOSS_PLAYER, SOUND_SPACE_DEFAULT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Hurt) - EVT_CALL(LoadPath, 30 * DT, EVT_PTR(N(PlayerThrownPath)), ARRAY_COUNT(N(PlayerThrownPath)), EASING_LINEAR) - EVT_SET(LVar4, 0) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetPlayerPos, LVar1, LVar2, LVar3) - EVT_ADD(LVar4, 45) - EVT_CALL(InterpPlayerYaw, LVar4, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(GotoMap, EVT_PTR("osr_03"), osr_03_ENTRY_2) - EVT_WAIT(100 * DT) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(PlaySound, SOUND_LRAW_KKJ_RUMBLING | SOUND_ID_TRIGGER_CHANGE_SOUND) + Call(StopTrackingSoundPos, SOUND_LRAW_KKJ_RUMBLING) + EndThread + Thread + Call(SetPlayerJumpscale, 0) + Loop(2) + Call(InterpPlayerYaw, 270, 0) + Call(PlayerJump1, 550, 0, 0, 20 * DT) + Call(InterpPlayerYaw, 90, 0) + Call(PlayerJump1, 630, 0, 0, 20 * DT) + EndLoop + Call(PlayerMoveTo, 550, 0, 30 * DT) + Call(PlayerMoveTo, 575, 0, 30 * DT) + Call(InterpPlayerYaw, 90, 7 * DT) + EndThread + Thread + Loop(2) + Call(SetPlayerAnimation, ANIM_MarioW1_CarryAboveRun) + Wait(15 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Run) + Wait(15 * DT) + EndLoop + EndThread + Thread + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach1_RunLiftDress) + Loop(2) + Call(NpcMoveTo, NPC_Peach, 600, -2, 20 * DT) + Call(NpcMoveTo, NPC_Peach, 680, -2, 20 * DT) + EndLoop + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Walk) + Call(NpcMoveTo, NPC_Peach, 600, -2, 30 * DT) + Call(NpcMoveTo, NPC_Peach, 625, -2, 30 * DT) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Idle) + Call(InterpNpcYaw, NPC_Peach, 270, 7 * DT) + EndThread + Wait(160 * DT) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach2_RaiseArms) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_Peach, ANIM_Peach2_Talk,ANIM_Peach2_TalkIdle, 0, MSG_Intro_004E) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach2_LowerArms) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Idle) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Peach, SPRITE_ID_BACK_FACING | ANIM_Peach1_Idle) + Wait(20 * DT) + Call(GetNpcPos, NPC_Peach, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Peach, LVar0, LVar1, LVar2, 10) + Wait(10 * DT) + Call(InterpPlayerYaw, 0, 7 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, 600, 0, -15) + Call(SetPanTarget, CAM_DEFAULT, 600, 0, -15) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0 * DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Peach, SPRITE_ID_BACK_FACING | ANIM_Peach1_Idle, SPRITE_ID_BACK_FACING | ANIM_Peach1_Idle, 5, MSG_Intro_004F) + Wait(30 * DT) + Thread + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarIdle) + Call(SetNpcAnimation, NPC_Bowser_Prop, ANIM_WorldBowser_ClownCarPropeller) + Call(SetNpcYaw, NPC_Bowser_Body, 90) + Call(SetNpcYaw, NPC_Bowser_Prop, 90) + Exec(N(EVS_UpdatePropellerSounds_Intro)) + Call(LoadPath, 50 * DT, Ref(N(FlyThroughWindowPath)), ARRAY_COUNT(N(FlyThroughWindowPath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Bowser_Body, LVar1, LVar2, LVar3) + Call(SetNpcPos, NPC_Bowser_Prop, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Idle) + Call(SetNpcPos, NPC_Bowser_Body, 820, 20, 0) + Call(SetNpcYaw, NPC_Bowser_Body, 270) + EndThread + Thread + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0B) + Call(SetNpcYaw, NPC_Kammy, 90) + Wait(10 * DT) + Call(LoadPath, 50 * DT, Ref(N(FlyThroughWindowPath)), ARRAY_COUNT(N(FlyThroughWindowPath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Kammy, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) + Call(SetNpcPos, NPC_Kammy, 920, 0, 0) + Call(SetNpcYaw, NPC_Kammy, 270) + EndThread + Thread + Wait(20 * DT) + Call(N(ScreenWhiteFlashOn)) + Call(EnableGroup, MODEL_g133, FALSE) + Call(EnableGroup, MODEL_g147, FALSE) + Call(EnableGroup, MODEL_g152, TRUE) + Call(EnableGroup, MODEL_g154, TRUE) + Call(PlaySoundAt, SOUND_GLASS_SHATTER, SOUND_SPACE_DEFAULT, 600, 60, -150) + PlayEffect(EFFECT_SPARKLES, 0, 600, 60, -150, 120) + Call(N(ShatterWindow)) + Wait(1) + Call(N(ScreenWhiteFlashOff)) + EndThread + Thread + Wait(20 * DT) + Call(ShakeCam, CAM_DEFAULT, 0, 10 * DT, Float(2.0)) + EndThread + Loop(70 * DT) + Wait(1) + Call(PlayerFaceNpc, NPC_Bowser_Body, FALSE) + Call(NpcFaceNpc, NPC_Peach, NPC_Bowser_Body, 0) + EndLoop + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Idle) + Wait(30 * DT) + Call(SetNpcPos, NPC_Bowser_Prop, NPC_DISPOSE_LOCATION) + Call(SetMusicTrack, 0, SONG_BOWSER_THEME, 0, 8) + Thread + Wait(5) + Call(SetNpcJumpscale, NPC_Bowser_Body, Float(0.0)) + Call(NpcJump0, NPC_Bowser_Body, 810, 0, 0, 5) + Call(PlaySoundAtNpc, NPC_Bowser_Body, SOUND_LARGE_NPC_IMPACT, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_PostJump) + Call(ShakeCam, CAM_DEFAULT, 0, 20 * DT, Float(2.0)) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Idle) + EndThread + Call(SetPanTarget, CAM_DEFAULT, 740, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(30 * DT) + Thread + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim02) + Call(NpcMoveTo, NPC_Kammy, 880, 0, 20 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) + EndThread + Call(SpeakToNpc, NPC_Bowser_Body, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_Peach, MSG_Intro_0050) + Call(SetPanTarget, CAM_DEFAULT, 625, 0, -15) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-11.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SpeakToNpc, NPC_Peach, ANIM_Peach2_Shout, ANIM_Peach2_EndShout, 0, NPC_Bowser_Body, MSG_Intro_0051) + Set(LVar0, Float(1.0)) + ExecWait(N(EVS_FocusCam_OnBowser)) + Call(SpeakToNpc, NPC_Bowser_Body, ANIM_WorldBowser_TalkEyesClosed, ANIM_WorldBowser_Idle, 0, NPC_Peach, MSG_Intro_0052) + Thread + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Walk) + Call(NpcMoveTo, NPC_Bowser_Body, 770, 0, 30 * DT) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Idle) + EndThread + Thread + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim02) + Call(NpcMoveTo, NPC_Kammy, 840, 0, 30 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) + EndThread + Wait(5 * DT) + Set(LVar0, Float(90.0)) + ExecWait(N(EVS_FocusCam_Everyone)) + Wait(5 * DT) + Call(PlayerMoveTo, 660, 0, 15 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_BeforeJump) + Wait(15 * DT) + Call(SpeakToPlayer, NPC_Bowser_Body, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_Intro_0053) + Call(SpeakToPlayer, NPC_Peach, ANIM_Peach2_ArmsCrossedTalk, ANIM_Peach2_ArmsCrossedIdle, 5, MSG_Intro_0054) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_RearUpLaugh) + Call(SpeakToPlayer, NPC_Bowser_Body, ANIM_WorldBowser_RearUpLaugh, ANIM_WorldBowser_RearUpLaugh, 0, MSG_Intro_0055) + Set(LVar0, Float(90.0)) + ExecWait(N(EVS_FocusCam_OnBowser)) + Call(SpeakToPlayer, NPC_Bowser_Body, ANIM_WorldBowser_RearUpTalk, ANIM_WorldBowser_RearUpTalk, 0, MSG_Intro_0056) + Set(LVar0, Float(5.0)) + ExecWait(N(EVS_FocusCam_Everyone)) + Call(SetNpcVar, NPC_Bowser_Body, 0, 0) + Wait(5) + Call(PlayerMoveTo, 695, 0, 10) + Call(SetPlayerJumpscale, Float(0.75)) + Call(PlayerJump, 720, 80, 0, 20 * DT) + Call(DisablePlayerPhysics, TRUE) + Loop(0) + Wait(1) + Call(GetNpcVar, NPC_Bowser_Body, 0, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + EndLoop + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(SetPlayerPos, 660, 0, 15) + Wait(1) + Call(SetPlayerAnimation, ANIM_Mario1_FallDown) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach2_GaspStill) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_RearUpLaugh) + ExecWait(N(EVS_FocusCam_OnPeach)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Peach, ANIM_Peach2_GaspStill, ANIM_Peach2_GaspStill, 5, MSG_Intro_005D) + Wait(10 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, 790, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 790, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-11.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Bowser_Body, ANIM_WorldBowser_RearUpLaugh, ANIM_WorldBowser_RearUpLaugh, 5, MSG_Intro_005E) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 5, MSG_Intro_005F) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Idle) + Call(InterpNpcYaw, NPC_Bowser_Body, 90, 5) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Brandish) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_BrandishIdle) + Call(SpeakToNpc, NPC_Bowser_Body, ANIM_WorldBowser_BrandishTalk, ANIM_WorldBowser_BrandishIdle, 0, NPC_Kammy, MSG_Intro_0060) + Wait(10 * DT) + Set(LVar0, Float(90.0)) + ExecWait(N(EVS_FocusCam_Everyone)) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Idle) + Call(InterpNpcYaw, NPC_Bowser_Body, 270, 10) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_Bowser_Body, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 5, MSG_Intro_0061) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_Brandish) + Wait(10 * DT) + Call(FadeOutMusic, 0, 500) + Call(PlaySoundAtNpc, NPC_Bowser_Body, SOUND_BOWSER_STAR_ROD_USE, SOUND_SPACE_DEFAULT) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 0, 780, 95, 27, 1, 30) + Wait(40 * DT) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 10 * DT, Float(4.0)) + EndThread + Call(PlaySoundAtPlayer, SOUND_BOWSER_LIGHTNING, SOUND_SPACE_DEFAULT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar2, 5) + PlayEffect(EFFECT_LIGHTNING, 4, LVar0, LVar1, LVar2, 0, 0) + Thread + Call(PlaySoundAtPlayer, SOUND_TOSS_PLAYER, SOUND_SPACE_DEFAULT) + Call(SetPlayerAnimation, ANIM_Mario1_Hurt) + Call(LoadPath, 30 * DT, Ref(N(PlayerThrownPath)), ARRAY_COUNT(N(PlayerThrownPath)), EASING_LINEAR) + Set(LVar4, 0) + Loop(0) + Call(GetNextPathPos) + Call(SetPlayerPos, LVar1, LVar2, LVar3) + Add(LVar4, 45) + Call(InterpPlayerYaw, LVar4, 0) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + EndThread + Wait(30 * DT) + Call(GotoMap, Ref("osr_03"), osr_03_ENTRY_2) + Wait(100 * DT) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Scene_PeachCaptured) = { - EVT_CALL(FadeOutMusic, 0, 500) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Peach, SPRITE_ID_BACK_FACING | ANIM_Peach1_Idle) - EVT_CALL(SetNpcYaw, NPC_Peach, 315) - EVT_CALL(SetNpcPos, NPC_Peach, 613, 0, -90) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_RearUpLaugh) - EVT_CALL(SetNpcPos, NPC_Bowser_Body, 750, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) - EVT_CALL(SetNpcPos, NPC_Kammy, 820, 0, 0) - EVT_SET(LVar0, EVT_FLOAT(90.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_Everyone)) - EVT_CALL(SetNpcSpeed, NPC_Peach, EVT_FLOAT(3.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Peach, 570, -130, 0) - EVT_CALL(SpeakToPlayer, NPC_Peach, SPRITE_ID_BACK_FACING | ANIM_Peach1_Idle, SPRITE_ID_BACK_FACING | ANIM_Peach1_Idle, 5, MSG_Intro_0062) - EVT_WAIT(10 * DT) - EVT_CALL(InterpNpcYaw, NPC_Kammy, 90, 0) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim04) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_CaptivePeach, ANIM_WorldKoopatrol_Anim06) - EVT_CALL(SetNpcPos, NPC_CaptivePeach, 900, 0, 30) - EVT_CALL(SetNpcSpeed, NPC_CaptivePeach, EVT_FLOAT(4.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_CaptivePeach, 660, 30, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim06) - EVT_CALL(SetNpcPos, NPC_Koopatrol_02, 940, 0, 30) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_02, EVT_FLOAT(4.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_02, 700, 30, 0) - EVT_END_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(InterpNpcYaw, NPC_Kammy, 270, 0) - EVT_CALL(GotoMap, EVT_PTR("hos_10"), hos_10_ENTRY_5) - EVT_WAIT(100 * DT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(FadeOutMusic, 0, 500) + Call(DisablePlayerInput, TRUE) + Call(SetNpcAnimation, NPC_Peach, SPRITE_ID_BACK_FACING | ANIM_Peach1_Idle) + Call(SetNpcYaw, NPC_Peach, 315) + Call(SetNpcPos, NPC_Peach, 613, 0, -90) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_RearUpLaugh) + Call(SetNpcPos, NPC_Bowser_Body, 750, 0, 0) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) + Call(SetNpcPos, NPC_Kammy, 820, 0, 0) + Set(LVar0, Float(90.0)) + ExecWait(N(EVS_FocusCam_Everyone)) + Call(SetNpcSpeed, NPC_Peach, Float(3.0 / DT)) + Call(NpcMoveTo, NPC_Peach, 570, -130, 0) + Call(SpeakToPlayer, NPC_Peach, SPRITE_ID_BACK_FACING | ANIM_Peach1_Idle, SPRITE_ID_BACK_FACING | ANIM_Peach1_Idle, 5, MSG_Intro_0062) + Wait(10 * DT) + Call(InterpNpcYaw, NPC_Kammy, 90, 0) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim04) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) + Thread + Call(SetNpcAnimation, NPC_CaptivePeach, ANIM_WorldKoopatrol_Anim06) + Call(SetNpcPos, NPC_CaptivePeach, 900, 0, 30) + Call(SetNpcSpeed, NPC_CaptivePeach, Float(4.0 / DT)) + Call(NpcMoveTo, NPC_CaptivePeach, 660, 30, 0) + EndThread + Thread + Call(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim06) + Call(SetNpcPos, NPC_Koopatrol_02, 940, 0, 30) + Call(SetNpcSpeed, NPC_Koopatrol_02, Float(4.0 / DT)) + Call(NpcMoveTo, NPC_Koopatrol_02, 700, 30, 0) + EndThread + Wait(30 * DT) + Call(InterpNpcYaw, NPC_Kammy, 270, 0) + Call(GotoMap, Ref("hos_10"), hos_10_ENTRY_5) + Wait(100 * DT) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_kkj/kkj_14/kkj_14_10_chapter2.c b/src/world/area_kkj/kkj_14/kkj_14_10_chapter2.c index 54d70faf7f2..5cdae201b79 100644 --- a/src/world/area_kkj/kkj_14/kkj_14_10_chapter2.c +++ b/src/world/area_kkj/kkj_14/kkj_14_10_chapter2.c @@ -11,229 +11,229 @@ Vec3f N(TwinkEmergePath)[] = { }; EvtScript N(EVS_OpenAndCloseDoor_Ch2) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_OPEN, 0) - EVT_CALL(MakeLerp, 0, 120, 14, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o4, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(40) - EVT_CALL(MakeLerp, 120, 0, 8, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o4, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_CLOSE, 0) - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_OPEN, 0) + Call(MakeLerp, 0, 120, 14, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o4, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(40) + Call(MakeLerp, 120, 0, 8, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o4, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_CLOSE, 0) + Return + End }; EvtScript N(EVS_OpenDoor_Ch2) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_OPEN, 0) - EVT_CALL(MakeLerp, 0, 120, 14, EASING_COS_FAST_OVERSHOOT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o4, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_OPEN, 0) + Call(MakeLerp, 0, 120, 14, EASING_COS_FAST_OVERSHOOT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o4, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_CloseDoor_Ch2) = { - EVT_CALL(MakeLerp, 120, 0, 8, EASING_COS_FAST_OVERSHOOT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o4, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_CLOSE, 0) - EVT_RETURN - EVT_END + Call(MakeLerp, 120, 0, 8, EASING_COS_FAST_OVERSHOOT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o4, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_CLOSE, 0) + Return + End }; EvtScript N(EVS_FocusCam_Door_Ch2) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -330, 0, -30) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -330, 0, -30) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(325.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-310.0), EVT_FLOAT(32.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, -330, 0, -30) + Call(SetPanTarget, CAM_DEFAULT, -330, 0, -30) + Call(SetCamDistance, CAM_DEFAULT, Float(325.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-11.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(-310.0), Float(32.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Return + End }; EvtScript N(EVS_Scene_Chapter2) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetMusicTrack, 0, SONG_BOWSER_THEME, 0, 8) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, 110, 0, -190) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 270) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_EXEC_WAIT(N(EVS_FocusCam_Door_Ch2)) - EVT_EXEC(N(EVS_OpenAndCloseDoor_Ch2)) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcPos, NPC_Bowser, -470, 0, -30) - EVT_CALL(SetNpcVar, NPC_Bowser, 0, 1) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Walk) - EVT_CALL(SetNpcSpeed, NPC_Bowser, EVT_FLOAT(3.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Bowser, -30, 30, 0) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) - EVT_CALL(SetNpcVar, NPC_Bowser, 0, 0) - EVT_END_THREAD - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_Bowser, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcVar, NPC_Bowser, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SpeakToPlayer, NPC_Bowser, ANIM_WorldBowser_TalkEyesClosed, ANIM_WorldBowser_TalkEyesClosed, 0, MSG_Peach_005C) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) - EVT_WAIT(1) - EVT_CALL(EndSpeech, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_ArmsCrossedIdle) - EVT_CALL(InterpPlayerYaw, 90, 3) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_ArmsCrossedTalk, ANIM_Peach2_ArmsCrossedIdle, 5, MSG_Peach_005D) - EVT_CALL(SpeakToPlayer, NPC_Bowser, ANIM_WorldBowser_TalkEyesClosed, ANIM_WorldBowser_TalkEyesClosed, 5, MSG_Peach_005E) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) - EVT_CALL(EndSpeech, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 5) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_Bowser, 270, 0) - EVT_EXEC_WAIT(N(EVS_FocusCam_Door_Ch2)) - EVT_WAIT(5 * DT) - EVT_EXEC(N(EVS_OpenDoor_Ch2)) - EVT_CALL(SetMusicTrack, 0, SONG_KAMMY_KOOPA_THEME, 0, 8) - EVT_CALL(SetNpcPos, NPC_Kammy, -470, 0, -30) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim03) - EVT_CALL(SetNpcSpeed, NPC_Kammy, EVT_FLOAT(5.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Kammy, -340, -30, 0) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) - EVT_WAIT(10) - EVT_CALL(SpeakToNpc, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, NPC_Bowser, MSG_Peach_005F) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -30, 0, -30) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -287, 32) - EVT_WAIT(5 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim03) - EVT_CALL(SetNpcSpeed, NPC_Kammy, EVT_FLOAT(5.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Kammy, -110, 30, 0) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) - EVT_CALL(SpeakToNpc, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, NPC_Bowser, MSG_Peach_0060) - EVT_CALL(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_Kammy, MSG_Peach_0061) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim02) - EVT_CALL(NpcMoveTo, NPC_Kammy, -90, 40, 10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToNpc, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, NPC_Bowser, MSG_Peach_0062) - EVT_CALL(GetNpcPos, NPC_Bowser, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Shock) - EVT_CALL(NpcJump0, NPC_Bowser, LVar0, LVar1, LVar2, 10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_Kammy, MSG_Peach_0063) - EVT_CALL(SpeakToNpc, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, NPC_Bowser, MSG_Peach_0064) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_ArmsCrossed) - EVT_WAIT(50 * DT) - EVT_CALL(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_Kammy, MSG_Peach_0065) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Walk) - EVT_CALL(SetNpcSpeed, NPC_Bowser, EVT_FLOAT(3.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Bowser, -470, -30, 0) - EVT_END_THREAD - EVT_CALL(SetNpcVar, NPC_Kammy, 0, 1) - EVT_THREAD - EVT_WAIT(40 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim02) - EVT_CALL(SetNpcSpeed, NPC_Kammy, EVT_FLOAT(3.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Kammy, -470, -30, 0) - EVT_CALL(SetNpcVar, NPC_Kammy, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 350, 400, 100 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetCamDistance, CAM_DEFAULT, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_Bowser, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcVar, NPC_Kammy, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_CloseDoor_Ch2)) - EVT_WAIT(30 * DT) - EVT_CALL(SetMusicTrack, 0, SONG_PRISONER_PEACH_THEME, 0, 8) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 20, 0, 30) - EVT_WAIT(3 * DT) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, -58) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_END_THREAD - EVT_CALL(LoadPath, 80 * DT, EVT_PTR(N(TwinkEmergePath)), ARRAY_COUNT(N(TwinkEmergePath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_RaiseArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_0066) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LowerArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0067) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 5, MSG_Peach_0068) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0069) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 5, MSG_Peach_006A) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(SetMusicTrack, 0, SONG_BOWSER_THEME, 0, 8) + Call(DisablePartnerAI, 0) + Call(SetNpcPos, NPC_PARTNER, 110, 0, -190) + Call(SetNpcYaw, NPC_PARTNER, 270) + Call(InterpPlayerYaw, 270, 0) + ExecWait(N(EVS_FocusCam_Door_Ch2)) + Exec(N(EVS_OpenAndCloseDoor_Ch2)) + Wait(10 * DT) + Call(SetNpcPos, NPC_Bowser, -470, 0, -30) + Call(SetNpcVar, NPC_Bowser, 0, 1) + Thread + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Walk) + Call(SetNpcSpeed, NPC_Bowser, Float(3.0 / DT)) + Call(NpcMoveTo, NPC_Bowser, -30, 30, 0) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) + Call(SetNpcVar, NPC_Bowser, 0, 0) + EndThread + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Loop(0) + Call(GetNpcPos, NPC_Bowser, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(GetNpcVar, NPC_Bowser, 0, LVar0) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(SpeakToPlayer, NPC_Bowser, ANIM_WorldBowser_TalkEyesClosed, ANIM_WorldBowser_TalkEyesClosed, 0, MSG_Peach_005C) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) + Wait(1) + Call(EndSpeech, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0) + Call(SetPlayerAnimation, ANIM_Peach2_ArmsCrossedIdle) + Call(InterpPlayerYaw, 90, 3) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_ArmsCrossedTalk, ANIM_Peach2_ArmsCrossedIdle, 5, MSG_Peach_005D) + Call(SpeakToPlayer, NPC_Bowser, ANIM_WorldBowser_TalkEyesClosed, ANIM_WorldBowser_TalkEyesClosed, 5, MSG_Peach_005E) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) + Call(EndSpeech, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 5) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Call(InterpPlayerYaw, 270, 0) + Call(InterpNpcYaw, NPC_Bowser, 270, 0) + ExecWait(N(EVS_FocusCam_Door_Ch2)) + Wait(5 * DT) + Exec(N(EVS_OpenDoor_Ch2)) + Call(SetMusicTrack, 0, SONG_KAMMY_KOOPA_THEME, 0, 8) + Call(SetNpcPos, NPC_Kammy, -470, 0, -30) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim03) + Call(SetNpcSpeed, NPC_Kammy, Float(5.0 / DT)) + Call(NpcMoveTo, NPC_Kammy, -340, -30, 0) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) + Wait(10) + Call(SpeakToNpc, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, NPC_Bowser, MSG_Peach_005F) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(SetPanTarget, CAM_DEFAULT, -30, 0, -30) + Call(SetCamPosA, CAM_DEFAULT, -287, 32) + Wait(5 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim03) + Call(SetNpcSpeed, NPC_Kammy, Float(5.0 / DT)) + Call(NpcMoveTo, NPC_Kammy, -110, 30, 0) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) + Call(SpeakToNpc, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, NPC_Bowser, MSG_Peach_0060) + Call(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_Kammy, MSG_Peach_0061) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim02) + Call(NpcMoveTo, NPC_Kammy, -90, 40, 10 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) + Wait(10 * DT) + Call(SpeakToNpc, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, NPC_Bowser, MSG_Peach_0062) + Call(GetNpcPos, NPC_Bowser, LVar0, LVar1, LVar2) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Shock) + Call(NpcJump0, NPC_Bowser, LVar0, LVar1, LVar2, 10 * DT) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) + Wait(10 * DT) + Call(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_Kammy, MSG_Peach_0063) + Call(SpeakToNpc, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, NPC_Bowser, MSG_Peach_0064) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_ArmsCrossed) + Wait(50 * DT) + Call(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_Kammy, MSG_Peach_0065) + Thread + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Walk) + Call(SetNpcSpeed, NPC_Bowser, Float(3.0 / DT)) + Call(NpcMoveTo, NPC_Bowser, -470, -30, 0) + EndThread + Call(SetNpcVar, NPC_Kammy, 0, 1) + Thread + Wait(40 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim02) + Call(SetNpcSpeed, NPC_Kammy, Float(3.0 / DT)) + Call(NpcMoveTo, NPC_Kammy, -470, -30, 0) + Call(SetNpcVar, NPC_Kammy, 0, 0) + EndThread + Thread + Call(MakeLerp, 350, 400, 100 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetCamDistance, CAM_DEFAULT, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Loop(0) + Call(GetNpcPos, NPC_Bowser, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(GetNpcVar, NPC_Kammy, 0, LVar0) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_CloseDoor_Ch2)) + Wait(30 * DT) + Call(SetMusicTrack, 0, SONG_PRISONER_PEACH_THEME, 0, 8) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetPanTarget, CAM_DEFAULT, 20, 0, 30) + Wait(3 * DT) + Thread + Loop(0) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + IfLt(LVar0, -58) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + EndThread + Call(LoadPath, 80 * DT, Ref(N(TwinkEmergePath)), ARRAY_COUNT(N(TwinkEmergePath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_RaiseArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_0066) + Call(SetPlayerAnimation, ANIM_Peach2_LowerArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0067) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 5, MSG_Peach_0068) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0069) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 5, MSG_Peach_006A) + Exec(N(EVS_SetupMusic)) + Call(ResetCam, CAM_DEFAULT, Float(4.0 / DT)) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_kkj/kkj_14/kkj_14_11_chapter3.c b/src/world/area_kkj/kkj_14/kkj_14_11_chapter3.c index e6fd2ae16ad..b1742afbad3 100644 --- a/src/world/area_kkj/kkj_14/kkj_14_11_chapter3.c +++ b/src/world/area_kkj/kkj_14/kkj_14_11_chapter3.c @@ -20,52 +20,52 @@ Vec3f N(TwinkPacingPath3)[] = { }; EvtScript N(EVS_Scene_Chapter3) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, -40, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(90.0), -20, 250, EVT_FLOAT(17.0), EVT_FLOAT(-11.0)) - EVT_CALL(LoadPath, 24 * DT, EVT_PTR(N(TwinkPacingPath1)), ARRAY_COUNT(N(TwinkPacingPath1)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(NpcFacePlayer, NPC_PARTNER, 5) - EVT_WAIT(20 * DT) - EVT_CALL(LoadPath, 30 * DT, EVT_PTR(N(TwinkPacingPath2)), ARRAY_COUNT(N(TwinkPacingPath2)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(NpcFacePlayer, NPC_PARTNER, 5) - EVT_WAIT(20 * DT) - EVT_CALL(LoadPath, 10 * DT, EVT_PTR(N(TwinkPacingPath3)), ARRAY_COUNT(N(TwinkPacingPath3)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(NpcFacePlayer, NPC_PARTNER, 5) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_007E) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 5, MSG_Peach_007F) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0080) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 5, MSG_Peach_0081) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(InterpPlayerYaw, 270, 0) + Call(DisablePartnerAI, 0) + Call(SetNpcPos, NPC_PARTNER, -40, 90, 0) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + Call(AdjustCam, CAM_DEFAULT, Float(90.0), -20, 250, Float(17.0), Float(-11.0)) + Call(LoadPath, 24 * DT, Ref(N(TwinkPacingPath1)), ARRAY_COUNT(N(TwinkPacingPath1)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(NpcFacePlayer, NPC_PARTNER, 5) + Wait(20 * DT) + Call(LoadPath, 30 * DT, Ref(N(TwinkPacingPath2)), ARRAY_COUNT(N(TwinkPacingPath2)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(NpcFacePlayer, NPC_PARTNER, 5) + Wait(20 * DT) + Call(LoadPath, 10 * DT, Ref(N(TwinkPacingPath3)), ARRAY_COUNT(N(TwinkPacingPath3)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(NpcFacePlayer, NPC_PARTNER, 5) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_007E) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 5, MSG_Peach_007F) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0080) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 5, MSG_Peach_0081) + Call(ResetCam, CAM_DEFAULT, Float(2.0 / DT)) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_kkj/kkj_14/kkj_14_12_chapter4.c b/src/world/area_kkj/kkj_14/kkj_14_12_chapter4.c index cfd7e2bacf0..a42a015696c 100644 --- a/src/world/area_kkj/kkj_14/kkj_14_12_chapter4.c +++ b/src/world/area_kkj/kkj_14/kkj_14_12_chapter4.c @@ -2,22 +2,22 @@ #include "sprite/player.h" EvtScript N(EVS_Scene_Chapter4) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, -60, 30, 0) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 90) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(90.0), -20, 250, EVT_FLOAT(17.0), EVT_FLOAT(-11.0)) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 5, MSG_Peach_0097) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0098) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 5, MSG_Peach_0099) - EVT_THREAD - EVT_CALL(NpcFlyTo, NPC_PARTNER, -30, 55, 30, 30, -5, EASING_LINEAR) - EVT_CALL(EnablePartnerAI) - EVT_END_THREAD - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(2.0 * DT)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(InterpPlayerYaw, 270, 0) + Call(DisablePartnerAI, 0) + Call(SetNpcPos, NPC_PARTNER, -60, 30, 0) + Call(SetNpcYaw, NPC_PARTNER, 90) + Call(AdjustCam, CAM_DEFAULT, Float(90.0), -20, 250, Float(17.0), Float(-11.0)) + Wait(30 * DT) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 5, MSG_Peach_0097) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0098) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 5, MSG_Peach_0099) + Thread + Call(NpcFlyTo, NPC_PARTNER, -30, 55, 30, 30, -5, EASING_LINEAR) + Call(EnablePartnerAI) + EndThread + Call(ResetCam, CAM_DEFAULT, Float(2.0 * DT)) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_kkj/kkj_14/kkj_14_13_chapter5.c b/src/world/area_kkj/kkj_14/kkj_14_13_chapter5.c index d7758036988..ba0aa02d478 100644 --- a/src/world/area_kkj/kkj_14/kkj_14_13_chapter5.c +++ b/src/world/area_kkj/kkj_14/kkj_14_13_chapter5.c @@ -2,47 +2,47 @@ #include "sprite/player.h" EvtScript N(EVS_Scene_Chapter5) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, -170, 40, -5) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -140, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -140, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(275.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.6 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_LOOP(2) - EVT_CALL(PlayerMoveTo, -110, 0, 25 * DT) - EVT_WAIT(5 * DT) - EVT_CALL(PlayerMoveTo, -130, 0, 25 * DT) - EVT_WAIT(5 * DT) - EVT_END_LOOP - EVT_CALL(PlayerMoveTo, -110, 0, 25 * DT) - EVT_CALL(InterpPlayerYaw, 270, 5) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 5, MSG_Peach_00EB) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00EC) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_RaiseArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_00ED) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LowerArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00EE) - EVT_THREAD - EVT_CALL(NpcFlyTo, NPC_PARTNER, -140, 55, 0, 30 * DT, -5, EASING_LINEAR) - EVT_CALL(EnablePartnerAI) - EVT_END_THREAD - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(InterpPlayerYaw, 270, 0) + Call(DisablePartnerAI, 0) + Call(SetNpcPos, NPC_PARTNER, -170, 40, -5) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + Call(UseSettingsFrom, CAM_DEFAULT, -140, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, -140, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Call(SetCamDistance, CAM_DEFAULT, Float(275.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-11.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.6 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndThread + Loop(2) + Call(PlayerMoveTo, -110, 0, 25 * DT) + Wait(5 * DT) + Call(PlayerMoveTo, -130, 0, 25 * DT) + Wait(5 * DT) + EndLoop + Call(PlayerMoveTo, -110, 0, 25 * DT) + Call(InterpPlayerYaw, 270, 5) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 5, MSG_Peach_00EB) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00EC) + Call(SetPlayerAnimation, ANIM_Peach2_RaiseArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_00ED) + Call(SetPlayerAnimation, ANIM_Peach2_LowerArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00EE) + Thread + Call(NpcFlyTo, NPC_PARTNER, -140, 55, 0, 30 * DT, -5, EASING_LINEAR) + Call(EnablePartnerAI) + EndThread + Call(ResetCam, CAM_DEFAULT, Float(2.0 / DT)) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_kkj/kkj_14/kkj_14_14_chapter6.c b/src/world/area_kkj/kkj_14/kkj_14_14_chapter6.c index 824d1f322cf..d5852c91c3e 100644 --- a/src/world/area_kkj/kkj_14/kkj_14_14_chapter6.c +++ b/src/world/area_kkj/kkj_14/kkj_14_14_chapter6.c @@ -2,34 +2,34 @@ #include "sprite/player.h" EvtScript N(EVS_Scene_Chapter6) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, -140, 25, 0) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 90) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -100, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -100, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_RaiseArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_012F) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LowerArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0130) - EVT_THREAD - EVT_CALL(NpcFlyTo, NPC_PARTNER, -90, 55, 0, 30 * DT, -5, EASING_LINEAR) - EVT_CALL(EnablePartnerAI) - EVT_END_THREAD - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(InterpPlayerYaw, 270, 0) + Call(DisablePartnerAI, 0) + Call(SetNpcPos, NPC_PARTNER, -140, 25, 0) + Call(SetNpcYaw, NPC_PARTNER, 90) + Call(UseSettingsFrom, CAM_DEFAULT, -100, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, -100, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(250.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_RaiseArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_012F) + Call(SetPlayerAnimation, ANIM_Peach2_LowerArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0130) + Thread + Call(NpcFlyTo, NPC_PARTNER, -90, 55, 0, 30 * DT, -5, EASING_LINEAR) + Call(EnablePartnerAI) + EndThread + Call(ResetCam, CAM_DEFAULT, Float(2.0 / DT)) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_kkj/kkj_14/kkj_14_15_chapter7.c b/src/world/area_kkj/kkj_14/kkj_14_15_chapter7.c index 74cb671b590..c2186cdfe10 100644 --- a/src/world/area_kkj/kkj_14/kkj_14_15_chapter7.c +++ b/src/world/area_kkj/kkj_14/kkj_14_15_chapter7.c @@ -17,423 +17,423 @@ Vec3f N(TwinkAttackPath)[] = { }; EvtScript N(EVS_ApproachPeach) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 26) - EVT_SUB(LVar2, 2) - EVT_CALL(SetNpcAnimation, NPC_Ch7_Koopatrol_01, ANIM_WorldKoopatrol_Anim06) - EVT_CALL(SetNpcSpeed, NPC_Ch7_Koopatrol_01, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_Ch7_Koopatrol_01, LVar0, 70, 0) - EVT_CALL(NpcFacePlayer, NPC_Ch7_Koopatrol_01, 5) - EVT_CALL(NpcMoveTo, NPC_Ch7_Koopatrol_01, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_Ch7_Koopatrol_01, ANIM_WorldKoopatrol_Anim01) - EVT_END_THREAD - EVT_CALL(SetNpcVar, NPC_Ch7_Koopatrol_02, 0, 1) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 26) - EVT_ADD(LVar2, 2) - EVT_CALL(SetNpcAnimation, NPC_Ch7_Koopatrol_02, ANIM_WorldKoopatrol_Anim06) - EVT_CALL(SetNpcSpeed, NPC_Ch7_Koopatrol_02, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_Ch7_Koopatrol_02, LVar0, 70, 0) - EVT_CALL(NpcFacePlayer, NPC_Ch7_Koopatrol_02, 5) - EVT_CALL(NpcMoveTo, NPC_Ch7_Koopatrol_02, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_Ch7_Koopatrol_02, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(SetNpcVar, NPC_Ch7_Koopatrol_02, 0, 0) - EVT_END_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcVar, NPC_Ch7_Koopatrol_02, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(10) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar0, 26) + Sub(LVar2, 2) + Call(SetNpcAnimation, NPC_Ch7_Koopatrol_01, ANIM_WorldKoopatrol_Anim06) + Call(SetNpcSpeed, NPC_Ch7_Koopatrol_01, Float(5.0)) + Call(NpcMoveTo, NPC_Ch7_Koopatrol_01, LVar0, 70, 0) + Call(NpcFacePlayer, NPC_Ch7_Koopatrol_01, 5) + Call(NpcMoveTo, NPC_Ch7_Koopatrol_01, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_Ch7_Koopatrol_01, ANIM_WorldKoopatrol_Anim01) + EndThread + Call(SetNpcVar, NPC_Ch7_Koopatrol_02, 0, 1) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 26) + Add(LVar2, 2) + Call(SetNpcAnimation, NPC_Ch7_Koopatrol_02, ANIM_WorldKoopatrol_Anim06) + Call(SetNpcSpeed, NPC_Ch7_Koopatrol_02, Float(5.0)) + Call(NpcMoveTo, NPC_Ch7_Koopatrol_02, LVar0, 70, 0) + Call(NpcFacePlayer, NPC_Ch7_Koopatrol_02, 5) + Call(NpcMoveTo, NPC_Ch7_Koopatrol_02, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_Ch7_Koopatrol_02, ANIM_WorldKoopatrol_Anim01) + Call(SetNpcVar, NPC_Ch7_Koopatrol_02, 0, 0) + EndThread + Loop(0) + Wait(1) + Call(GetNpcVar, NPC_Ch7_Koopatrol_02, 0, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Wait(10) + Return + End }; EvtScript N(EVS_TiePeachUp) = { - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Ch7_Koopatrol_01, ANIM_WorldKoopatrol_Anim18) - EVT_CALL(GetNpcPos, NPC_Ch7_Koopatrol_01, LVar0, LVar1, LVar2) - EVT_LOOP(5) - EVT_LOOP(5) - EVT_ADD(LVar0, 2) - EVT_CALL(SetNpcPos, NPC_Ch7_Koopatrol_01, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(5) - EVT_SUB(LVar0, 2) - EVT_CALL(SetNpcPos, NPC_Ch7_Koopatrol_01, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_Ch7_Koopatrol_01, ANIM_WorldKoopatrol_Anim01) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Ch7_Koopatrol_02, ANIM_WorldKoopatrol_Anim18) - EVT_CALL(GetNpcPos, NPC_Ch7_Koopatrol_02, LVar0, LVar1, LVar2) - EVT_LOOP(5) - EVT_LOOP(5) - EVT_SUB(LVar0, 2) - EVT_CALL(SetNpcPos, NPC_Ch7_Koopatrol_02, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(5) - EVT_ADD(LVar0, 2) - EVT_CALL(SetNpcPos, NPC_Ch7_Koopatrol_02, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_Ch7_Koopatrol_02, ANIM_WorldKoopatrol_Anim01) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 16) - EVT_LOOP(50) - EVT_CALL(RandInt, 32, LVar3) - EVT_CALL(RandInt, 50, LVar4) - EVT_ADD(LVar3, LVar0) - EVT_ADD(LVar4, LVar1) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 1, LVar3, LVar4, LVar2, 1, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Gasp) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_GaspStill) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(ShowMessageAtWorldPos, MSG_Peach_016D, LVar0, LVar1, LVar2) - EVT_END_THREAD - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 45) - EVT_LOOP(20) - EVT_CALL(InterpPlayerYaw, LVar0, 0) - EVT_ADD(LVar0, LVar1) - EVT_ADD(LVar1, 2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TiedIdle) - EVT_LOOP(20) - EVT_CALL(InterpPlayerYaw, LVar0, 0) - EVT_ADD(LVar0, LVar1) - EVT_SUB(LVar1, 2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_RETURN - EVT_END + Thread + Call(SetNpcAnimation, NPC_Ch7_Koopatrol_01, ANIM_WorldKoopatrol_Anim18) + Call(GetNpcPos, NPC_Ch7_Koopatrol_01, LVar0, LVar1, LVar2) + Loop(5) + Loop(5) + Add(LVar0, 2) + Call(SetNpcPos, NPC_Ch7_Koopatrol_01, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Loop(5) + Sub(LVar0, 2) + Call(SetNpcPos, NPC_Ch7_Koopatrol_01, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndLoop + Call(SetNpcAnimation, NPC_Ch7_Koopatrol_01, ANIM_WorldKoopatrol_Anim01) + EndThread + Thread + Call(SetNpcAnimation, NPC_Ch7_Koopatrol_02, ANIM_WorldKoopatrol_Anim18) + Call(GetNpcPos, NPC_Ch7_Koopatrol_02, LVar0, LVar1, LVar2) + Loop(5) + Loop(5) + Sub(LVar0, 2) + Call(SetNpcPos, NPC_Ch7_Koopatrol_02, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Loop(5) + Add(LVar0, 2) + Call(SetNpcPos, NPC_Ch7_Koopatrol_02, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndLoop + Call(SetNpcAnimation, NPC_Ch7_Koopatrol_02, ANIM_WorldKoopatrol_Anim01) + EndThread + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar0, 16) + Loop(50) + Call(RandInt, 32, LVar3) + Call(RandInt, 50, LVar4) + Add(LVar3, LVar0) + Add(LVar4, LVar1) + PlayEffect(EFFECT_WALKING_DUST, 1, LVar3, LVar4, LVar2, 1, 1) + Wait(1) + EndLoop + EndThread + Call(SetPlayerAnimation, ANIM_Peach2_Gasp) + Wait(10) + Thread + Call(SetPlayerAnimation, ANIM_Peach2_GaspStill) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(ShowMessageAtWorldPos, MSG_Peach_016D, LVar0, LVar1, LVar2) + EndThread + Set(LVar0, 0) + Set(LVar1, 45) + Loop(20) + Call(InterpPlayerYaw, LVar0, 0) + Add(LVar0, LVar1) + Add(LVar1, 2) + Wait(1) + EndLoop + Call(SetPlayerAnimation, ANIM_Peach2_TiedIdle) + Loop(20) + Call(InterpPlayerYaw, LVar0, 0) + Add(LVar0, LVar1) + Sub(LVar1, 2) + Wait(1) + EndLoop + Call(InterpPlayerYaw, 270, 0) + Return + End }; EvtScript N(EVS_PickUpPeach) = { - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Ch7_Koopatrol_01, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcAnimation, NPC_Ch7_Koopatrol_01, ANIM_WorldKoopatrol_Anim12) - EVT_ADD(LVar0, 10) - EVT_CALL(NpcMoveTo, NPC_Ch7_Koopatrol_01, LVar0, LVar2, 10) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Ch7_Koopatrol_02, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcAnimation, NPC_Ch7_Koopatrol_02, ANIM_WorldKoopatrol_Anim12) - EVT_SUB(LVar0, 10) - EVT_CALL(NpcMoveTo, NPC_Ch7_Koopatrol_02, LVar0, LVar2, 10) - EVT_END_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_LOOP(4) - EVT_ADD(LVar1, 2) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Peach3_TiedSideways) - EVT_LOOP(5) - EVT_ADD(LVar1, 4) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Thread + Call(GetNpcPos, NPC_Ch7_Koopatrol_01, LVar0, LVar1, LVar2) + Call(SetNpcAnimation, NPC_Ch7_Koopatrol_01, ANIM_WorldKoopatrol_Anim12) + Add(LVar0, 10) + Call(NpcMoveTo, NPC_Ch7_Koopatrol_01, LVar0, LVar2, 10) + EndThread + Thread + Call(GetNpcPos, NPC_Ch7_Koopatrol_02, LVar0, LVar1, LVar2) + Call(SetNpcAnimation, NPC_Ch7_Koopatrol_02, ANIM_WorldKoopatrol_Anim12) + Sub(LVar0, 10) + Call(NpcMoveTo, NPC_Ch7_Koopatrol_02, LVar0, LVar2, 10) + EndThread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Loop(4) + Add(LVar1, 2) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(SetPlayerAnimation, ANIM_Peach3_TiedSideways) + Loop(5) + Add(LVar1, 4) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_CarryPeachAway) = { - EVT_CALL(InterpNpcYaw, NPC_Ch7_Koopatrol_01, 270, 3) - EVT_WAIT(10) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_Ch7_Koopatrol_02, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 22) - EVT_ADD(LVar1, 30) - EVT_ADD(LVar2, 2) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Ch7_Koopatrol_01, ANIM_WorldKoopatrol_Anim14) - EVT_CALL(SetNpcSpeed, NPC_Ch7_Koopatrol_01, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_Ch7_Koopatrol_01, 364, 68, 0) - EVT_CALL(NpcMoveTo, NPC_Ch7_Koopatrol_01, 84, 68, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Ch7_Koopatrol_02, ANIM_WorldKoopatrol_Anim14) - EVT_CALL(SetNpcSpeed, NPC_Ch7_Koopatrol_02, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_Ch7_Koopatrol_02, 396, 72, 0) - EVT_CALL(NpcMoveTo, NPC_Ch7_Koopatrol_02, 116, 72, 0) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(InterpNpcYaw, NPC_Ch7_Koopatrol_01, 270, 3) + Wait(10) + Thread + Loop(0) + Call(GetNpcPos, NPC_Ch7_Koopatrol_02, LVar0, LVar1, LVar2) + Sub(LVar0, 22) + Add(LVar1, 30) + Add(LVar2, 2) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + Thread + Call(SetNpcAnimation, NPC_Ch7_Koopatrol_01, ANIM_WorldKoopatrol_Anim14) + Call(SetNpcSpeed, NPC_Ch7_Koopatrol_01, Float(5.0)) + Call(NpcMoveTo, NPC_Ch7_Koopatrol_01, 364, 68, 0) + Call(NpcMoveTo, NPC_Ch7_Koopatrol_01, 84, 68, 0) + EndThread + Thread + Call(SetNpcAnimation, NPC_Ch7_Koopatrol_02, ANIM_WorldKoopatrol_Anim14) + Call(SetNpcSpeed, NPC_Ch7_Koopatrol_02, Float(5.0)) + Call(NpcMoveTo, NPC_Ch7_Koopatrol_02, 396, 72, 0) + Call(NpcMoveTo, NPC_Ch7_Koopatrol_02, 116, 72, 0) + EndThread + Return + End }; EvtScript N(EVS_OpenAndCloseDoor_Ch7) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_OPEN, 0) - EVT_CALL(MakeLerp, 0, 120, 14, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o4, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(40) - EVT_CALL(MakeLerp, 120, 0, 8, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o4, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_CLOSE, 0) - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_OPEN, 0) + Call(MakeLerp, 0, 120, 14, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o4, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(40) + Call(MakeLerp, 120, 0, 8, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o4, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_CLOSE, 0) + Return + End }; EvtScript N(EVS_OpenDoor_Ch7) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_OPEN, 0) - EVT_CALL(MakeLerp, 0, 120, 14, EASING_COS_FAST_OVERSHOOT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o4, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_OPEN, 0) + Call(MakeLerp, 0, 120, 14, EASING_COS_FAST_OVERSHOOT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o4, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_FocusCam_Door_Ch7) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -340, 0, -30) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -340, 0, -30) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(275.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-13.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-310.0), EVT_FLOAT(32.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, -340, 0, -30) + Call(SetPanTarget, CAM_DEFAULT, -340, 0, -30) + Call(SetCamDistance, CAM_DEFAULT, Float(275.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-13.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(-310.0), Float(32.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_FocusCam_Bed) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 380, 30, 10) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 380, 30, 10) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, 380, 30, 10) + Call(SetPanTarget, CAM_DEFAULT, 380, 30, 10) + Call(SetCamDistance, CAM_DEFAULT, Float(350.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_Scene_Chapter7) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetMusicTrack, 0, SONG_BOWSER_THEME, 0, 8) - EVT_CALL(SetNpcPos, NPC_PARTNER, 440, 65, 0) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 270) - EVT_CALL(RotateModel, MODEL_o83, 80, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o85, 80, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o84, 80, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o86, 80, 0, 1, 0) - EVT_EXEC_WAIT(N(EVS_FocusCam_Door_Ch7)) - EVT_WAIT(30 * DT) - EVT_EXEC(N(EVS_OpenAndCloseDoor_Ch7)) - EVT_CALL(SetNpcAnimation, NPC_Ch7_Bowser, ANIM_WorldBowser_Walk) - EVT_CALL(SetNpcPos, NPC_Ch7_Bowser, -470, 0, -30) - EVT_CALL(SetNpcSpeed, NPC_Ch7_Bowser, EVT_FLOAT(3.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Ch7_Bowser, -290, -30, 0) - EVT_CALL(SetNpcAnimation, NPC_Ch7_Bowser, ANIM_WorldBowser_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Ch7_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_Peach_0161) - EVT_WAIT(10 * DT) - EVT_EXEC_WAIT(N(EVS_FocusCam_Bed)) - EVT_CALL(LoadPath, 30 / DT, EVT_PTR(N(TwinkHidePath)), ARRAY_COUNT(N(TwinkHidePath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Sad) - EVT_CALL(SetNpcPos, NPC_Ch7_Bowser, 100, 0, 20) - EVT_CALL(SetNpcFlagBits, NPC_Ch7_Bowser, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Ch7_Bowser, ANIM_WorldBowser_Walk) - EVT_CALL(NpcMoveTo, NPC_Ch7_Bowser, 300, 20, 0) - EVT_CALL(SetNpcAnimation, NPC_Ch7_Bowser, ANIM_WorldBowser_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(325.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Ch7_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_Peach_0162) - EVT_CALL(InterpPlayerYaw, 90, 5) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_ArmsCrossedIdle) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_ArmsCrossedTalk, ANIM_Peach2_ArmsCrossedIdle, 5, MSG_Peach_0163) - EVT_CALL(SpeakToPlayer, NPC_Ch7_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 5, MSG_Peach_0164) - EVT_CALL(InterpPlayerYaw, 270, 5) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_ArmsCrossedTalk, ANIM_Peach2_ArmsCrossedIdle, 5, MSG_Peach_0165) - EVT_CALL(SpeakToPlayer, NPC_Ch7_Bowser, ANIM_WorldBowser_TalkEyesClosed, ANIM_WorldBowser_TalkEyesClosed, 5, MSG_Peach_0166) - EVT_CALL(SetNpcAnimation, NPC_Ch7_Bowser, ANIM_WorldBowser_Idle) - EVT_CALL(EndSpeech, NPC_Ch7_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 5) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_ArmsCrossedTalk, ANIM_Peach2_ArmsCrossedIdle, 5, MSG_Peach_0167) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_EXEC_WAIT(N(EVS_FocusCam_Door_Ch7)) - EVT_EXEC(N(EVS_OpenDoor_Ch7)) - EVT_CALL(SetNpcAnimation, NPC_Ch7_Kammy, ANIM_WorldKammy_Anim03) - EVT_CALL(SetNpcPos, NPC_Ch7_Kammy, -470, 0, -30) - EVT_CALL(SetNpcSpeed, NPC_Ch7_Bowser, EVT_FLOAT(5.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Ch7_Kammy, -340, -30, 0) - EVT_CALL(SetNpcAnimation, NPC_Ch7_Kammy, ANIM_WorldKammy_Anim01) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToNpc, NPC_Ch7_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, NPC_Ch7_Bowser, MSG_Peach_0168) - EVT_CALL(SetNpcAnimation, NPC_Ch7_Bowser, ANIM_WorldBowser_Idle) - EVT_CALL(SetNpcYaw, NPC_Ch7_Bowser, 270) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 270) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 250, 30, 10) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 250, 30, 10) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(325.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-11.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcPos, NPC_Ch7_Kammy, 50, 0, -10) - EVT_CALL(SetNpcAnimation, NPC_Ch7_Kammy, ANIM_WorldKammy_Anim03) - EVT_CALL(NpcMoveTo, NPC_Ch7_Kammy, 180, -10, 0) - EVT_CALL(SetNpcAnimation, NPC_Ch7_Kammy, ANIM_WorldKammy_Anim01) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToNpc, NPC_Ch7_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_Ch7_Kammy, MSG_Peach_0169) - EVT_CALL(SpeakToNpc, NPC_Ch7_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, NPC_Ch7_Bowser, MSG_Peach_016A) - EVT_CALL(SetNpcAnimation, NPC_Ch7_Bowser, ANIM_WorldBowser_Shock) - EVT_CALL(GetNpcPos, NPC_Ch7_Bowser, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Ch7_Bowser, LVar0, LVar1, LVar2, 10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Ch7_Bowser, ANIM_WorldBowser_Idle) - EVT_CALL(SpeakToNpc, NPC_Ch7_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_Ch7_Kammy, MSG_Peach_016B) - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(InterpNpcYaw, NPC_Ch7_Bowser, 270, 10) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Ch7_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_Peach_016C) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcPos, NPC_Ch7_Koopatrol_01, 48, 0, 70) - EVT_CALL(SetNpcPos, NPC_Ch7_Koopatrol_02, 100, 0, 70) - EVT_CALL(SetNpcFlagBits, NPC_Ch7_Koopatrol_01, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Ch7_Koopatrol_02, NPC_FLAG_GRAVITY, TRUE) - EVT_WAIT(10 * DT) - EVT_EXEC_WAIT(N(EVS_ApproachPeach)) - EVT_EXEC_WAIT(N(EVS_TiePeachUp)) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Angry) - EVT_CALL(LoadPath, 15, EVT_PTR(N(TwinkAttackPath)), ARRAY_COUNT(N(TwinkAttackPath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_TalkAngry, ANIM_Twink_Sad, 5, MSG_Peach_016E) - EVT_CALL(SetNpcVar, NPC_Ch7_Bowser, 0, 0) - EVT_THREAD - EVT_CALL(NpcFlyTo, NPC_PARTNER, 410, 80, 10, 7, 0, EASING_LINEAR) - EVT_LOOP(2) - EVT_CALL(NpcFlyTo, NPC_PARTNER, 400, 70, 10, 5, 0, EASING_LINEAR) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 0, 400, 70, 10, 0) - EVT_CALL(NpcFlyTo, NPC_PARTNER, 410, 80, 10, 5, 0, EASING_LINEAR) - EVT_END_LOOP - EVT_CALL(NpcFlyTo, NPC_PARTNER, 360, 80, 10, 7, 0, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(NpcFlyTo, NPC_PARTNER, 360, 70, 10, 5, 0, EASING_LINEAR) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 0, 360, 70, 10, 0) - EVT_CALL(NpcFlyTo, NPC_PARTNER, 350, 80, 10, 5, 0, EASING_LINEAR) - EVT_CALL(GetNpcVar, NPC_Ch7_Bowser, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcVar, NPC_Ch7_Bowser, 0, 2) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Ch7_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 5, MSG_Peach_016F) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_Ch7_Bowser, ANIM_WorldBowser_AngryTalk, ANIM_WorldBowser_Idle, 5, MSG_Peach_0170) - EVT_CALL(SetNpcVar, NPC_Ch7_Bowser, 0, 1) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcVar, NPC_Ch7_Bowser, 0, LVar0) - EVT_IF_EQ(LVar0, 2) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_Ch7_Bowser, ANIM_WorldBowser_Walk) - EVT_CALL(NpcMoveTo, NPC_Ch7_Bowser, 310, 20, 5) - EVT_CALL(SetNpcAnimation, NPC_Ch7_Bowser, ANIM_WorldBowser_Swipe) - EVT_WAIT(3) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(PlaySoundAt, SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_DEFAULT, 350, 80, 10) - EVT_PLAY_EFFECT(EFFECT_FIREWORK, 0, 350, 80, 10, 1, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(7.5 / DT)) - EVT_CALL(NpcFlyTo, NPC_PARTNER, 500, 130, 10, 0, 0, EASING_LINEAR) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_TiedIdle, ANIM_Peach2_TiedIdle, 5, MSG_Peach_0171) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Ch7_Bowser, ANIM_WorldBowser_Idle) - EVT_CALL(SpeakToPlayer, NPC_Ch7_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 5, MSG_Peach_0172) - EVT_WAIT(10 * DT) - EVT_CHILD_THREAD - EVT_LOOP(0) - EVT_CALL(NpcFacePlayer, NPC_Ch7_Bowser, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_EXEC_WAIT(N(EVS_PickUpPeach)) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach3_TiedSideways, ANIM_Peach3_TiedSideways, 5, MSG_Peach_0173) - EVT_EXEC_WAIT(N(EVS_CarryPeachAway)) - EVT_WAIT(30 * DT) - EVT_EXEC_WAIT(N(EVS_EndPeachChapter7)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Call(SetMusicTrack, 0, SONG_BOWSER_THEME, 0, 8) + Call(SetNpcPos, NPC_PARTNER, 440, 65, 0) + Call(SetNpcYaw, NPC_PARTNER, 270) + Call(RotateModel, MODEL_o83, 80, 0, -1, 0) + Call(RotateModel, MODEL_o85, 80, 0, 1, 0) + Call(RotateModel, MODEL_o84, 80, 0, -1, 0) + Call(RotateModel, MODEL_o86, 80, 0, 1, 0) + ExecWait(N(EVS_FocusCam_Door_Ch7)) + Wait(30 * DT) + Exec(N(EVS_OpenAndCloseDoor_Ch7)) + Call(SetNpcAnimation, NPC_Ch7_Bowser, ANIM_WorldBowser_Walk) + Call(SetNpcPos, NPC_Ch7_Bowser, -470, 0, -30) + Call(SetNpcSpeed, NPC_Ch7_Bowser, Float(3.0 / DT)) + Call(NpcMoveTo, NPC_Ch7_Bowser, -290, -30, 0) + Call(SetNpcAnimation, NPC_Ch7_Bowser, ANIM_WorldBowser_Idle) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Ch7_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_Peach_0161) + Wait(10 * DT) + ExecWait(N(EVS_FocusCam_Bed)) + Call(LoadPath, 30 / DT, Ref(N(TwinkHidePath)), ARRAY_COUNT(N(TwinkHidePath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Sad) + Call(SetNpcPos, NPC_Ch7_Bowser, 100, 0, 20) + Call(SetNpcFlagBits, NPC_Ch7_Bowser, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcAnimation, NPC_Ch7_Bowser, ANIM_WorldBowser_Walk) + Call(NpcMoveTo, NPC_Ch7_Bowser, 300, 20, 0) + Call(SetNpcAnimation, NPC_Ch7_Bowser, ANIM_WorldBowser_Idle) + Wait(10 * DT) + Call(SetCamDistance, CAM_DEFAULT, Float(325.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-11.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Ch7_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_Peach_0162) + Call(InterpPlayerYaw, 90, 5) + Call(SetPlayerAnimation, ANIM_Peach2_ArmsCrossedIdle) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_ArmsCrossedTalk, ANIM_Peach2_ArmsCrossedIdle, 5, MSG_Peach_0163) + Call(SpeakToPlayer, NPC_Ch7_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 5, MSG_Peach_0164) + Call(InterpPlayerYaw, 270, 5) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_ArmsCrossedTalk, ANIM_Peach2_ArmsCrossedIdle, 5, MSG_Peach_0165) + Call(SpeakToPlayer, NPC_Ch7_Bowser, ANIM_WorldBowser_TalkEyesClosed, ANIM_WorldBowser_TalkEyesClosed, 5, MSG_Peach_0166) + Call(SetNpcAnimation, NPC_Ch7_Bowser, ANIM_WorldBowser_Idle) + Call(EndSpeech, NPC_Ch7_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 5) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_ArmsCrossedTalk, ANIM_Peach2_ArmsCrossedIdle, 5, MSG_Peach_0167) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + ExecWait(N(EVS_FocusCam_Door_Ch7)) + Exec(N(EVS_OpenDoor_Ch7)) + Call(SetNpcAnimation, NPC_Ch7_Kammy, ANIM_WorldKammy_Anim03) + Call(SetNpcPos, NPC_Ch7_Kammy, -470, 0, -30) + Call(SetNpcSpeed, NPC_Ch7_Bowser, Float(5.0 / DT)) + Call(NpcMoveTo, NPC_Ch7_Kammy, -340, -30, 0) + Call(SetNpcAnimation, NPC_Ch7_Kammy, ANIM_WorldKammy_Anim01) + Wait(10 * DT) + Call(SpeakToNpc, NPC_Ch7_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, NPC_Ch7_Bowser, MSG_Peach_0168) + Call(SetNpcAnimation, NPC_Ch7_Bowser, ANIM_WorldBowser_Idle) + Call(SetNpcYaw, NPC_Ch7_Bowser, 270) + Call(SetNpcYaw, NPC_PARTNER, 270) + Call(UseSettingsFrom, CAM_DEFAULT, 250, 30, 10) + Call(SetPanTarget, CAM_DEFAULT, 250, 30, 10) + Call(SetCamDistance, CAM_DEFAULT, Float(325.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-11.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(10 * DT) + Call(SetNpcPos, NPC_Ch7_Kammy, 50, 0, -10) + Call(SetNpcAnimation, NPC_Ch7_Kammy, ANIM_WorldKammy_Anim03) + Call(NpcMoveTo, NPC_Ch7_Kammy, 180, -10, 0) + Call(SetNpcAnimation, NPC_Ch7_Kammy, ANIM_WorldKammy_Anim01) + Wait(10 * DT) + Call(SpeakToNpc, NPC_Ch7_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_Ch7_Kammy, MSG_Peach_0169) + Call(SpeakToNpc, NPC_Ch7_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, NPC_Ch7_Bowser, MSG_Peach_016A) + Call(SetNpcAnimation, NPC_Ch7_Bowser, ANIM_WorldBowser_Shock) + Call(GetNpcPos, NPC_Ch7_Bowser, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Ch7_Bowser, LVar0, LVar1, LVar2, 10 * DT) + Call(SetNpcAnimation, NPC_Ch7_Bowser, ANIM_WorldBowser_Idle) + Call(SpeakToNpc, NPC_Ch7_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_Ch7_Kammy, MSG_Peach_016B) + Wait(10 * DT) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndThread + Call(InterpNpcYaw, NPC_Ch7_Bowser, 270, 10) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Ch7_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_Peach_016C) + Wait(10 * DT) + Call(SetNpcPos, NPC_Ch7_Koopatrol_01, 48, 0, 70) + Call(SetNpcPos, NPC_Ch7_Koopatrol_02, 100, 0, 70) + Call(SetNpcFlagBits, NPC_Ch7_Koopatrol_01, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcFlagBits, NPC_Ch7_Koopatrol_02, NPC_FLAG_GRAVITY, TRUE) + Wait(10 * DT) + ExecWait(N(EVS_ApproachPeach)) + ExecWait(N(EVS_TiePeachUp)) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Angry) + Call(LoadPath, 15, Ref(N(TwinkAttackPath)), ARRAY_COUNT(N(TwinkAttackPath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_TalkAngry, ANIM_Twink_Sad, 5, MSG_Peach_016E) + Call(SetNpcVar, NPC_Ch7_Bowser, 0, 0) + Thread + Call(NpcFlyTo, NPC_PARTNER, 410, 80, 10, 7, 0, EASING_LINEAR) + Loop(2) + Call(NpcFlyTo, NPC_PARTNER, 400, 70, 10, 5, 0, EASING_LINEAR) + PlayEffect(EFFECT_LANDING_DUST, 0, 400, 70, 10, 0) + Call(NpcFlyTo, NPC_PARTNER, 410, 80, 10, 5, 0, EASING_LINEAR) + EndLoop + Call(NpcFlyTo, NPC_PARTNER, 360, 80, 10, 7, 0, EASING_LINEAR) + Loop(0) + Call(NpcFlyTo, NPC_PARTNER, 360, 70, 10, 5, 0, EASING_LINEAR) + PlayEffect(EFFECT_LANDING_DUST, 0, 360, 70, 10, 0) + Call(NpcFlyTo, NPC_PARTNER, 350, 80, 10, 5, 0, EASING_LINEAR) + Call(GetNpcVar, NPC_Ch7_Bowser, 0, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + EndLoop + Call(SetNpcVar, NPC_Ch7_Bowser, 0, 2) + EndThread + Call(SpeakToPlayer, NPC_Ch7_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 5, MSG_Peach_016F) + Wait(20) + Call(SpeakToPlayer, NPC_Ch7_Bowser, ANIM_WorldBowser_AngryTalk, ANIM_WorldBowser_Idle, 5, MSG_Peach_0170) + Call(SetNpcVar, NPC_Ch7_Bowser, 0, 1) + Loop(0) + Wait(1) + Call(GetNpcVar, NPC_Ch7_Bowser, 0, LVar0) + IfEq(LVar0, 2) + BreakLoop + EndIf + EndLoop + Call(SetNpcAnimation, NPC_Ch7_Bowser, ANIM_WorldBowser_Walk) + Call(NpcMoveTo, NPC_Ch7_Bowser, 310, 20, 5) + Call(SetNpcAnimation, NPC_Ch7_Bowser, ANIM_WorldBowser_Swipe) + Wait(3) + Call(InterpPlayerYaw, 90, 0) + Call(PlaySoundAt, SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_DEFAULT, 350, 80, 10) + PlayEffect(EFFECT_FIREWORK, 0, 350, 80, 10, 1, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(SetNpcSpeed, NPC_PARTNER, Float(7.5 / DT)) + Call(NpcFlyTo, NPC_PARTNER, 500, 130, 10, 0, 0, EASING_LINEAR) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_TiedIdle, ANIM_Peach2_TiedIdle, 5, MSG_Peach_0171) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Ch7_Bowser, ANIM_WorldBowser_Idle) + Call(SpeakToPlayer, NPC_Ch7_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 5, MSG_Peach_0172) + Wait(10 * DT) + ChildThread + Loop(0) + Call(NpcFacePlayer, NPC_Ch7_Bowser, 0) + Wait(1) + EndLoop + EndChildThread + ExecWait(N(EVS_PickUpPeach)) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach3_TiedSideways, ANIM_Peach3_TiedSideways, 5, MSG_Peach_0173) + ExecWait(N(EVS_CarryPeachAway)) + Wait(30 * DT) + ExecWait(N(EVS_EndPeachChapter7)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(EnablePartnerAI) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_kkj/kkj_14/kkj_14_1_music.c b/src/world/area_kkj/kkj_14/kkj_14_1_music.c index bb028eab3c5..71aa841e2ed 100644 --- a/src/world/area_kkj/kkj_14/kkj_14_1_music.c +++ b/src/world/area_kkj/kkj_14/kkj_14_1_music.c @@ -1,19 +1,19 @@ #include "kkj_14.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_OR_EQ(STORY_CH0_BEGAN_PEACH_MISSION) - EVT_CASE_OR_EQ(STORY_CH1_BEGAN_PEACH_MISSION) - EVT_CASE_OR_EQ(STORY_CH3_BEGAN_PEACH_MISSION) - EVT_CALL(SetMusicTrack, 0, SONG_PRISONER_PEACH_THEME, 0, 8) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(STORY_CH2_BEGAN_PEACH_MISSION) - EVT_CASE_OR_EQ(STORY_CH4_BEGAN_PEACH_MISSION) - EVT_CASE_OR_EQ(STORY_CH5_BEGAN_PEACH_MISSION) - EVT_CASE_OR_EQ(STORY_CH6_BEGAN_PEACH_MISSION) - EVT_CALL(SetMusicTrack, 0, SONG_PEACH_MISSION, 0, 8) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseOrEq(STORY_CH0_BEGAN_PEACH_MISSION) + CaseOrEq(STORY_CH1_BEGAN_PEACH_MISSION) + CaseOrEq(STORY_CH3_BEGAN_PEACH_MISSION) + Call(SetMusicTrack, 0, SONG_PRISONER_PEACH_THEME, 0, 8) + EndCaseGroup + CaseOrEq(STORY_CH2_BEGAN_PEACH_MISSION) + CaseOrEq(STORY_CH4_BEGAN_PEACH_MISSION) + CaseOrEq(STORY_CH5_BEGAN_PEACH_MISSION) + CaseOrEq(STORY_CH6_BEGAN_PEACH_MISSION) + Call(SetMusicTrack, 0, SONG_PEACH_MISSION, 0, 8) + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/world/area_kkj/kkj_14/kkj_14_2_main.c b/src/world/area_kkj/kkj_14/kkj_14_2_main.c index c6069484fa2..2130cd20c69 100644 --- a/src/world/area_kkj/kkj_14/kkj_14_2_main.c +++ b/src/world/area_kkj/kkj_14/kkj_14_2_main.c @@ -28,204 +28,204 @@ Gfx N(setup_gfx_candle_lights)[] = { }; EvtScript N(EVS_EndPeachChapter7) = { - EVT_SET(LVar0, GB_KKJ_LastPartner) - EVT_CALL(N(RestoreFromPeachState)) - EVT_CALL(PlaySound, SOUND_SLIDE_WHISTLE_OUT) - EVT_CALL(GotoMapSpecial, EVT_PTR("pra_01"), pra_01_ENTRY_4, TRANSITION_END_PEACH_INTERLUDE) - EVT_WAIT(100) + Set(LVar0, GB_KKJ_LastPartner) + Call(N(RestoreFromPeachState)) + Call(PlaySound, SOUND_SLIDE_WHISTLE_OUT) + Call(GotoMapSpecial, Ref("pra_01"), pra_01_ENTRY_4, TRANSITION_END_PEACH_INTERLUDE) + Wait(100) }; EvtScript N(EVS_ExitDoor_GrandHall) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(AF_KKJ_13, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, kkj_14_ENTRY_0) - EVT_SET(LVar1, COLLIDER_ttw) - EVT_SET(LVar2, MODEL_o4) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_IF_EQ(GB_StoryProgress, STORY_INTRO) - EVT_CALL(GotoMap, EVT_PTR("kkj_01"), kkj_01_ENTRY_4) - EVT_ELSE - EVT_CALL(GotoMap, EVT_PTR("kkj_11"), kkj_11_ENTRY_4) - EVT_END_IF - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(AF_KKJ_13, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, kkj_14_ENTRY_0) + Set(LVar1, COLLIDER_ttw) + Set(LVar2, MODEL_o4) + Set(LVar3, DOOR_SWING_IN) + Exec(ExitSingleDoor) + Wait(17) + IfEq(GB_StoryProgress, STORY_INTRO) + Call(GotoMap, Ref("kkj_01"), kkj_01_ENTRY_4) + Else + Call(GotoMap, Ref("kkj_11"), kkj_11_ENTRY_4) + EndIf + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_Balcony) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(AF_KKJ_13, FALSE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_DOOR) - EVT_SET(LVar0, kkj_14_ENTRY_1) - EVT_SET(LVar1, COLLIDER_tte) - EVT_SET(LVar2, MODEL_o83) - EVT_SET(LVar3, MODEL_o85) - EVT_SET(LVar4, MODEL_o84) - EVT_SET(LVar5, MODEL_o86) - EVT_EXEC(ExitSplitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kkj_26"), kkj_26_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(AF_KKJ_13, FALSE) + Call(UseDoorSounds, DOOR_SOUNDS_DOOR) + Set(LVar0, kkj_14_ENTRY_1) + Set(LVar1, COLLIDER_tte) + Set(LVar2, MODEL_o83) + Set(LVar3, MODEL_o85) + Set(LVar4, MODEL_o84) + Set(LVar5, MODEL_o86) + Exec(ExitSplitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("kkj_26"), kkj_26_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_SecretPassage) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_SET(AF_KKJ_13, FALSE) - EVT_CALL(UseExitHeading, 60, kkj_14_ENTRY_2) - EVT_EXEC(ExitWalk) - EVT_IF_EQ(GF_KKJ14_SkipSecretPassage, FALSE) - EVT_CALL(GotoMap, EVT_PTR("kkj_27"), kkj_27_ENTRY_0) - EVT_ELSE - EVT_CALL(GotoMap, EVT_PTR("kkj_15"), kkj_15_ENTRY_1) - EVT_END_IF - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Set(AF_KKJ_13, FALSE) + Call(UseExitHeading, 60, kkj_14_ENTRY_2) + Exec(ExitWalk) + IfEq(GF_KKJ14_SkipSecretPassage, FALSE) + Call(GotoMap, Ref("kkj_27"), kkj_27_ENTRY_0) + Else + Call(GotoMap, Ref("kkj_15"), kkj_15_ENTRY_1) + EndIf + Wait(100) + Return + End }; EvtScript N(EVS_ShowMessage_CantOpen) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_DoesntOpen, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_Inspect_DoesntOpen, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_IF_EQ(GB_StoryProgress, STORY_INTRO) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShowMessage_CantOpen)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_ELSE - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_Balcony)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_SecretPassage)), TRIGGER_FLOOR_ABOVE, COLLIDER_o119, 1, 0) - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_GrandHall)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_INTRO) + BindTrigger(Ref(N(EVS_ShowMessage_CantOpen)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + Else + BindTrigger(Ref(N(EVS_ExitDoors_Balcony)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_SecretPassage)), TRIGGER_FLOOR_ABOVE, COLLIDER_o119, 1, 0) + EndIf + BindTrigger(Ref(N(EVS_ExitDoor_GrandHall)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kkj_14_ENTRY_0) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar2, MODEL_o4) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kkj_14_ENTRY_1) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_DOOR) - EVT_SET(LVar2, MODEL_o83) - EVT_SET(LVar3, MODEL_o85) - EVT_SET(LVar4, MODEL_o84) - EVT_SET(LVar5, MODEL_o86) - EVT_EXEC_WAIT(EnterSplitDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kkj_14_ENTRY_2) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(kkj_14_ENTRY_3) - EVT_EXEC(N(EVS_Scene_Chapter0)) - EVT_CASE_EQ(kkj_14_ENTRY_4) - EVT_EXEC(N(EVS_Scene_Chapter1)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kkj_14_ENTRY_5) - EVT_EXEC(N(EVS_Scene_Chapter2)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kkj_14_ENTRY_6) - EVT_EXEC(N(EVS_Scene_Chapter3)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kkj_14_ENTRY_7) - EVT_EXEC(N(EVS_Scene_Chapter4)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kkj_14_ENTRY_8) - EVT_EXEC(N(EVS_Scene_Chapter5)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kkj_14_ENTRY_9) - EVT_EXEC(N(EVS_Scene_Chapter6)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kkj_14_ENTRY_A) - EVT_EXEC(N(EVS_Scene_Chapter7)) - EVT_CASE_EQ(kkj_14_ENTRY_B) - EVT_EXEC(N(EVS_Scene_TossedBackInRoom)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kkj_14_ENTRY_0) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar2, MODEL_o4) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kkj_14_ENTRY_1) + Call(UseDoorSounds, DOOR_SOUNDS_DOOR) + Set(LVar2, MODEL_o83) + Set(LVar3, MODEL_o85) + Set(LVar4, MODEL_o84) + Set(LVar5, MODEL_o86) + ExecWait(EnterSplitDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kkj_14_ENTRY_2) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseEq(kkj_14_ENTRY_3) + Exec(N(EVS_Scene_Chapter0)) + CaseEq(kkj_14_ENTRY_4) + Exec(N(EVS_Scene_Chapter1)) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kkj_14_ENTRY_5) + Exec(N(EVS_Scene_Chapter2)) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kkj_14_ENTRY_6) + Exec(N(EVS_Scene_Chapter3)) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kkj_14_ENTRY_7) + Exec(N(EVS_Scene_Chapter4)) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kkj_14_ENTRY_8) + Exec(N(EVS_Scene_Chapter5)) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kkj_14_ENTRY_9) + Exec(N(EVS_Scene_Chapter6)) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kkj_14_ENTRY_A) + Exec(N(EVS_Scene_Chapter7)) + CaseEq(kkj_14_ENTRY_B) + Exec(N(EVS_Scene_TossedBackInRoom)) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PEACHS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(GetEntryID, LVar0) - EVT_IF_GE(LVar0, kkj_14_ENTRY_3) - EVT_IF_NE(LVar0, kkj_14_ENTRY_B) - EVT_SET(GF_KKJ14_RevealedButton, FALSE) - EVT_SET(GF_KKJ14_OpenedPassage, FALSE) - EVT_END_IF - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kkj_14_ENTRY_3) - EVT_SET(GB_StoryProgress, STORY_CH0_BEGAN_PEACH_MISSION) - EVT_SET(GB_KKJ_CaughtCount, 0) - EVT_SET(GF_KKJ14_SkipSecretPassage, FALSE) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(Chapter0NPCs))) - EVT_CASE_EQ(kkj_14_ENTRY_4) - EVT_SET(GB_StoryProgress, STORY_CH1_BEGAN_PEACH_MISSION) - EVT_SET(GB_KKJ_CaughtCount, 0) - EVT_SET(GF_KKJ14_SkipSecretPassage, FALSE) - EVT_CASE_EQ(kkj_14_ENTRY_5) - EVT_SET(GB_StoryProgress, STORY_CH2_BEGAN_PEACH_MISSION) - EVT_SET(GB_KKJ_CaughtCount, 0) - EVT_SET(GF_KKJ14_SkipSecretPassage, FALSE) - EVT_SET(AF_KKJ_06, FALSE) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(Chapter2NPCs))) - EVT_CASE_EQ(kkj_14_ENTRY_6) - EVT_SET(GB_StoryProgress, STORY_CH3_BEGAN_PEACH_MISSION) - EVT_SET(GB_KKJ_CaughtCount, 0) - EVT_SET(GF_KKJ14_SkipSecretPassage, FALSE) - EVT_CASE_EQ(kkj_14_ENTRY_7) - EVT_SET(GB_StoryProgress, STORY_CH4_BEGAN_PEACH_MISSION) - EVT_SET(GB_KKJ_CaughtCount, 0) - EVT_SET(GF_KKJ14_SkipSecretPassage, TRUE) - EVT_CASE_EQ(kkj_14_ENTRY_8) - EVT_SET(GB_StoryProgress, STORY_CH5_BEGAN_PEACH_MISSION) - EVT_SET(GB_KKJ_CaughtCount, 0) - EVT_SET(GF_KKJ14_SkipSecretPassage, TRUE) - EVT_CASE_EQ(kkj_14_ENTRY_9) - EVT_CALL(N(EnableParasol)) - EVT_SET(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) - EVT_SET(GB_KKJ_CaughtCount, 0) - EVT_SET(GF_KKJ14_SkipSecretPassage, TRUE) - EVT_CASE_EQ(kkj_14_ENTRY_A) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(Chapter7NPCs))) - EVT_CASE_EQ(kkj_14_ENTRY_B) - EVT_ADD(GB_KKJ_CaughtCount, 1) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(TossBackNPCs))) - EVT_END_SWITCH - EVT_END_IF - EVT_EXEC(N(EVS_SetupInteractables)) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, kkj_14_ENTRY_5) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_END_IF - EVT_EXEC(N(EVS_EnterMap)) - EVT_CALL(SetTexPanner, MODEL_o154, TEX_PANNER_0) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_PEACHS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(GetEntryID, LVar0) + IfGe(LVar0, kkj_14_ENTRY_3) + IfNe(LVar0, kkj_14_ENTRY_B) + Set(GF_KKJ14_RevealedButton, FALSE) + Set(GF_KKJ14_OpenedPassage, FALSE) + EndIf + Switch(LVar0) + CaseEq(kkj_14_ENTRY_3) + Set(GB_StoryProgress, STORY_CH0_BEGAN_PEACH_MISSION) + Set(GB_KKJ_CaughtCount, 0) + Set(GF_KKJ14_SkipSecretPassage, FALSE) + Call(MakeNpcs, FALSE, Ref(N(Chapter0NPCs))) + CaseEq(kkj_14_ENTRY_4) + Set(GB_StoryProgress, STORY_CH1_BEGAN_PEACH_MISSION) + Set(GB_KKJ_CaughtCount, 0) + Set(GF_KKJ14_SkipSecretPassage, FALSE) + CaseEq(kkj_14_ENTRY_5) + Set(GB_StoryProgress, STORY_CH2_BEGAN_PEACH_MISSION) + Set(GB_KKJ_CaughtCount, 0) + Set(GF_KKJ14_SkipSecretPassage, FALSE) + Set(AF_KKJ_06, FALSE) + Call(MakeNpcs, FALSE, Ref(N(Chapter2NPCs))) + CaseEq(kkj_14_ENTRY_6) + Set(GB_StoryProgress, STORY_CH3_BEGAN_PEACH_MISSION) + Set(GB_KKJ_CaughtCount, 0) + Set(GF_KKJ14_SkipSecretPassage, FALSE) + CaseEq(kkj_14_ENTRY_7) + Set(GB_StoryProgress, STORY_CH4_BEGAN_PEACH_MISSION) + Set(GB_KKJ_CaughtCount, 0) + Set(GF_KKJ14_SkipSecretPassage, TRUE) + CaseEq(kkj_14_ENTRY_8) + Set(GB_StoryProgress, STORY_CH5_BEGAN_PEACH_MISSION) + Set(GB_KKJ_CaughtCount, 0) + Set(GF_KKJ14_SkipSecretPassage, TRUE) + CaseEq(kkj_14_ENTRY_9) + Call(N(EnableParasol)) + Set(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) + Set(GB_KKJ_CaughtCount, 0) + Set(GF_KKJ14_SkipSecretPassage, TRUE) + CaseEq(kkj_14_ENTRY_A) + Call(MakeNpcs, FALSE, Ref(N(Chapter7NPCs))) + CaseEq(kkj_14_ENTRY_B) + Add(GB_KKJ_CaughtCount, 1) + Call(MakeNpcs, FALSE, Ref(N(TossBackNPCs))) + EndSwitch + EndIf + Exec(N(EVS_SetupInteractables)) + Call(GetEntryID, LVar0) + IfNe(LVar0, kkj_14_ENTRY_5) + Exec(N(EVS_SetupMusic)) + EndIf + Exec(N(EVS_EnterMap)) + Call(SetTexPanner, MODEL_o154, TEX_PANNER_0) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_0) TEX_PAN_PARAMS_STEP( 0, 0, 40, 900) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetModelCustomGfx, MODEL_o154, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetCustomGfx, CUSTOM_GFX_0, EVT_PTR(N(setup_gfx_candle_lights)), NULL) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetModelCustomGfx, MODEL_o154, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetCustomGfx, CUSTOM_GFX_0, Ref(N(setup_gfx_candle_lights)), NULL) + Return + End }; diff --git a/src/world/area_kkj/kkj_14/kkj_14_3_interactables.c b/src/world/area_kkj/kkj_14/kkj_14_3_interactables.c index 5163cd63081..413efa0486b 100644 --- a/src/world/area_kkj/kkj_14/kkj_14_3_interactables.c +++ b/src/world/area_kkj/kkj_14/kkj_14_3_interactables.c @@ -5,199 +5,199 @@ #include "world/common/todo/GetPeachDisguise.inc.c" EvtScript N(EVS_Inspect_Fireplace) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_CH1_BEGAN_PEACH_MISSION) - EVT_IF_EQ(GF_KKJ14_RevealedButton, FALSE) - EVT_IF_EQ(AF_KKJ_14, FALSE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_RaiseArms) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_0039) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_003A) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_003B) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LowerArms) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_SET(AF_KKJ_14, TRUE) - EVT_CALL(EnablePartnerAI) - EVT_ELSE - EVT_CALL(ShowMessageAtScreenPos, MSG_Peach_017B, 160, 40) - EVT_END_IF - EVT_ELSE - EVT_CALL(ShowMessageAtScreenPos, MSG_Peach_017B, 160, 40) - EVT_END_IF - EVT_CASE_RANGE(STORY_CH2_BEGAN_PEACH_MISSION, STORY_CH7_BEGAN_PEACH_MISSION) - EVT_CALL(ShowMessageAtScreenPos, MSG_Peach_017B, 160, 40) - EVT_CASE_DEFAULT - EVT_CALL(ShowMessageAtScreenPos, MSG_Intro_0043, 160, 40) - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Switch(GB_StoryProgress) + CaseEq(STORY_CH1_BEGAN_PEACH_MISSION) + IfEq(GF_KKJ14_RevealedButton, FALSE) + IfEq(AF_KKJ_14, FALSE) + Call(DisablePartnerAI, 0) + Call(SetPlayerAnimation, ANIM_Peach2_RaiseArms) + Wait(10) + Call(SetPlayerAnimation, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_0039) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_003A) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_003B) + Call(SetPlayerAnimation, ANIM_Peach2_LowerArms) + Wait(10) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Set(AF_KKJ_14, TRUE) + Call(EnablePartnerAI) + Else + Call(ShowMessageAtScreenPos, MSG_Peach_017B, 160, 40) + EndIf + Else + Call(ShowMessageAtScreenPos, MSG_Peach_017B, 160, 40) + EndIf + CaseRange(STORY_CH2_BEGAN_PEACH_MISSION, STORY_CH7_BEGAN_PEACH_MISSION) + Call(ShowMessageAtScreenPos, MSG_Peach_017B, 160, 40) + CaseDefault + Call(ShowMessageAtScreenPos, MSG_Intro_0043, 160, 40) + EndSwitch + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Inspect_Dresses) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_CH1_BEGAN_PEACH_MISSION) - EVT_IF_EQ(GF_KKJ14_RevealedButton, FALSE) - EVT_IF_EQ(AF_KKJ_15, FALSE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_003C) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_RaiseArms) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_003D) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LowerArms) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_SET(AF_KKJ_15, TRUE) - EVT_CALL(EnablePartnerAI) - EVT_ELSE - EVT_CALL(ShowMessageAtScreenPos, MSG_Peach_017C, 160, 40) - EVT_END_IF - EVT_ELSE - EVT_CALL(ShowMessageAtScreenPos, MSG_Peach_017C, 160, 40) - EVT_END_IF - EVT_CASE_RANGE(STORY_CH2_BEGAN_PEACH_MISSION, STORY_CH7_BEGAN_PEACH_MISSION) - EVT_CALL(ShowMessageAtScreenPos, MSG_Peach_017C, 160, 40) - EVT_CASE_DEFAULT - EVT_CALL(ShowMessageAtScreenPos, MSG_Intro_0044, 160, 40) - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Switch(GB_StoryProgress) + CaseEq(STORY_CH1_BEGAN_PEACH_MISSION) + IfEq(GF_KKJ14_RevealedButton, FALSE) + IfEq(AF_KKJ_15, FALSE) + Call(DisablePartnerAI, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_003C) + Call(SetPlayerAnimation, ANIM_Peach2_RaiseArms) + Wait(10) + Call(SetPlayerAnimation, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_003D) + Call(SetPlayerAnimation, ANIM_Peach2_LowerArms) + Wait(10) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Set(AF_KKJ_15, TRUE) + Call(EnablePartnerAI) + Else + Call(ShowMessageAtScreenPos, MSG_Peach_017C, 160, 40) + EndIf + Else + Call(ShowMessageAtScreenPos, MSG_Peach_017C, 160, 40) + EndIf + CaseRange(STORY_CH2_BEGAN_PEACH_MISSION, STORY_CH7_BEGAN_PEACH_MISSION) + Call(ShowMessageAtScreenPos, MSG_Peach_017C, 160, 40) + CaseDefault + Call(ShowMessageAtScreenPos, MSG_Intro_0044, 160, 40) + EndSwitch + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Inspect_Vanity) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH1_BEGAN_PEACH_MISSION, STORY_CH7_BEGAN_PEACH_MISSION) - EVT_CALL(N(GetPeachDisguise), LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(InterpPlayerYaw, 45, 10) - EVT_WAIT(10) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_ADD(LVar1, 35) - EVT_ADD(LVar2, -10) - EVT_LOOP(6) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, LVar0, LVar1, LVar2, 0) - EVT_WAIT(15) - EVT_END_LOOP - EVT_ELSE - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_0044) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0045) - EVT_CALL(EnablePartnerAI) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(ShowMessageAtScreenPos, MSG_Intro_0045, 160, 40) - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Switch(GB_StoryProgress) + CaseRange(STORY_CH1_BEGAN_PEACH_MISSION, STORY_CH7_BEGAN_PEACH_MISSION) + Call(N(GetPeachDisguise), LVar0) + IfEq(LVar0, 0) + Call(InterpPlayerYaw, 45, 10) + Wait(10) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Add(LVar1, 35) + Add(LVar2, -10) + Loop(6) + PlayEffect(EFFECT_LANDING_DUST, 1, LVar0, LVar1, LVar2, 0) + Wait(15) + EndLoop + Else + Call(DisablePartnerAI, 0) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_0044) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0045) + Call(EnablePartnerAI) + EndIf + CaseDefault + Call(ShowMessageAtScreenPos, MSG_Intro_0045, 160, 40) + EndSwitch + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Inspect_Photo) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_CH1_BEGAN_PEACH_MISSION) - EVT_IF_EQ(GF_KKJ14_RevealedButton, FALSE) - EVT_IF_EQ(AF_KKJ_17, FALSE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_003E) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_RaiseArms) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_003F) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LowerArms) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_SET(AF_KKJ_17, TRUE) - EVT_CALL(EnablePartnerAI) - EVT_ELSE - EVT_CALL(ShowMessageAtScreenPos, MSG_Peach_017D, 160, 40) - EVT_END_IF - EVT_ELSE - EVT_CALL(ShowMessageAtScreenPos, MSG_Peach_017D, 160, 40) - EVT_END_IF - EVT_CASE_RANGE(STORY_CH2_BEGAN_PEACH_MISSION, STORY_CH7_BEGAN_PEACH_MISSION) - EVT_CALL(ShowMessageAtScreenPos, MSG_Peach_017D, 160, 40) - EVT_CASE_DEFAULT - EVT_CALL(ShowMessageAtScreenPos, MSG_Intro_0046, 160, 40) - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Switch(GB_StoryProgress) + CaseEq(STORY_CH1_BEGAN_PEACH_MISSION) + IfEq(GF_KKJ14_RevealedButton, FALSE) + IfEq(AF_KKJ_17, FALSE) + Call(DisablePartnerAI, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_003E) + Call(SetPlayerAnimation, ANIM_Peach2_RaiseArms) + Wait(10) + Call(SetPlayerAnimation, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_003F) + Call(SetPlayerAnimation, ANIM_Peach2_LowerArms) + Wait(10) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Set(AF_KKJ_17, TRUE) + Call(EnablePartnerAI) + Else + Call(ShowMessageAtScreenPos, MSG_Peach_017D, 160, 40) + EndIf + Else + Call(ShowMessageAtScreenPos, MSG_Peach_017D, 160, 40) + EndIf + CaseRange(STORY_CH2_BEGAN_PEACH_MISSION, STORY_CH7_BEGAN_PEACH_MISSION) + Call(ShowMessageAtScreenPos, MSG_Peach_017D, 160, 40) + CaseDefault + Call(ShowMessageAtScreenPos, MSG_Intro_0046, 160, 40) + EndSwitch + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Inspect_Bed) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_CH1_BEGAN_PEACH_MISSION) - EVT_IF_EQ(GF_KKJ14_RevealedButton, FALSE) - EVT_IF_EQ(AF_KKJ_18, FALSE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_RaiseArms) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_0040) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0041) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LowerArms) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_SET(AF_KKJ_18, TRUE) - EVT_CALL(EnablePartnerAI) - EVT_ELSE - EVT_CALL(ShowMessageAtScreenPos, MSG_Peach_017E, 160, 40) - EVT_END_IF - EVT_ELSE - EVT_CALL(ShowMessageAtScreenPos, MSG_Peach_017E, 160, 40) - EVT_END_IF - EVT_CASE_RANGE(STORY_CH2_BEGAN_PEACH_MISSION, STORY_CH7_BEGAN_PEACH_MISSION) - EVT_CALL(ShowMessageAtScreenPos, MSG_Peach_017E, 160, 40) - EVT_CASE_DEFAULT - EVT_CALL(ShowMessageAtScreenPos, MSG_Intro_0047, 160, 40) - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Switch(GB_StoryProgress) + CaseEq(STORY_CH1_BEGAN_PEACH_MISSION) + IfEq(GF_KKJ14_RevealedButton, FALSE) + IfEq(AF_KKJ_18, FALSE) + Call(DisablePartnerAI, 0) + Call(SetPlayerAnimation, ANIM_Peach2_RaiseArms) + Wait(10) + Call(SetPlayerAnimation, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_0040) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0041) + Call(SetPlayerAnimation, ANIM_Peach2_LowerArms) + Wait(10) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Set(AF_KKJ_18, TRUE) + Call(EnablePartnerAI) + Else + Call(ShowMessageAtScreenPos, MSG_Peach_017E, 160, 40) + EndIf + Else + Call(ShowMessageAtScreenPos, MSG_Peach_017E, 160, 40) + EndIf + CaseRange(STORY_CH2_BEGAN_PEACH_MISSION, STORY_CH7_BEGAN_PEACH_MISSION) + Call(ShowMessageAtScreenPos, MSG_Peach_017E, 160, 40) + CaseDefault + Call(ShowMessageAtScreenPos, MSG_Intro_0047, 160, 40) + EndSwitch + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Inspect_Flowers) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_CH1_BEGAN_PEACH_MISSION) - EVT_IF_EQ(GF_KKJ14_RevealedButton, FALSE) - EVT_IF_EQ(AF_KKJ_19, FALSE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_RaiseArms) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_0042) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0043) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LowerArms) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_SET(AF_KKJ_19, TRUE) - EVT_CALL(EnablePartnerAI) - EVT_ELSE - EVT_CALL(ShowMessageAtScreenPos, MSG_Peach_017F, 160, 40) - EVT_END_IF - EVT_ELSE - EVT_CALL(ShowMessageAtScreenPos, MSG_Peach_017F, 160, 40) - EVT_END_IF - EVT_CASE_RANGE(STORY_CH2_BEGAN_PEACH_MISSION, STORY_CH7_BEGAN_PEACH_MISSION) - EVT_CALL(ShowMessageAtScreenPos, MSG_Peach_017F, 160, 40) - EVT_CASE_DEFAULT - EVT_CALL(ShowMessageAtScreenPos, MSG_Intro_0048, 160, 40) - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Switch(GB_StoryProgress) + CaseEq(STORY_CH1_BEGAN_PEACH_MISSION) + IfEq(GF_KKJ14_RevealedButton, FALSE) + IfEq(AF_KKJ_19, FALSE) + Call(DisablePartnerAI, 0) + Call(SetPlayerAnimation, ANIM_Peach2_RaiseArms) + Wait(10) + Call(SetPlayerAnimation, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_0042) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0043) + Call(SetPlayerAnimation, ANIM_Peach2_LowerArms) + Wait(10) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Set(AF_KKJ_19, TRUE) + Call(EnablePartnerAI) + Else + Call(ShowMessageAtScreenPos, MSG_Peach_017F, 160, 40) + EndIf + Else + Call(ShowMessageAtScreenPos, MSG_Peach_017F, 160, 40) + EndIf + CaseRange(STORY_CH2_BEGAN_PEACH_MISSION, STORY_CH7_BEGAN_PEACH_MISSION) + Call(ShowMessageAtScreenPos, MSG_Peach_017F, 160, 40) + CaseDefault + Call(ShowMessageAtScreenPos, MSG_Intro_0048, 160, 40) + EndSwitch + Call(DisablePlayerInput, FALSE) + Return + End }; s32 N(FireplaceAlpha) = 255; @@ -217,212 +217,212 @@ void N(setup_gfx_fireplace)(void) { } EvtScript N(EVS_TexPan_Fireplace) = { - EVT_CALL(EnableTexPanning, MODEL_o42, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o157, TRUE) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, -110) - EVT_ADD(LVar1, 50) - EVT_CALL(SetTexPanOffset, TEX_PANNER_5, TEX_PANNER_MAIN, LVar0, LVar1) - EVT_ADD(LVar2, 40) - EVT_ADD(LVar3, 130) - EVT_CALL(SetTexPanOffset, TEX_PANNER_A, TEX_PANNER_AUX, LVar2, LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(EnableTexPanning, MODEL_o42, TRUE) + Call(EnableTexPanning, MODEL_o157, TRUE) + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Set(LVar3, 0) + Loop(0) + Add(LVar0, -110) + Add(LVar1, 50) + Call(SetTexPanOffset, TEX_PANNER_5, TEX_PANNER_MAIN, LVar0, LVar1) + Add(LVar2, 40) + Add(LVar3, 130) + Call(SetTexPanOffset, TEX_PANNER_A, TEX_PANNER_AUX, LVar2, LVar3) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_RevealButton) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_o128, SOUND_KKJ_REVEAL_BUTTON, 0) - EVT_CALL(MakeLerp, 0, 180, 15, EASING_LINEAR) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g39, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_CALL(EnableModel, MODEL_o146, TRUE) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g39, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(EnableModel, MODEL_o141, FALSE) - EVT_CALL(EnableModel, MODEL_o143, FALSE) - EVT_SET(GF_KKJ14_RevealedButton, TRUE) - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_o128, SOUND_KKJ_REVEAL_BUTTON, 0) + Call(MakeLerp, 0, 180, 15, EASING_LINEAR) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g39, LVar0, 1, 0, 0) + Wait(1) + Call(EnableModel, MODEL_o146, TRUE) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g39, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(EnableModel, MODEL_o141, FALSE) + Call(EnableModel, MODEL_o143, FALSE) + Set(GF_KKJ14_RevealedButton, TRUE) + Return + End }; EvtScript N(EVS_OpenHiddenPassage) = { - EVT_CALL(EnableModel, MODEL_o35, FALSE) - EVT_CALL(EnableModel, MODEL_o42, FALSE) - EVT_CALL(EnableGroup, MODEL_g27, TRUE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH1_BEGAN_PEACH_MISSION) - EVT_SET(LVar0, 120 * DT) - EVT_ELSE - EVT_SET(LVar0, 60 * DT) - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, COLLIDER_o129, SOUND_KKJ_EXTINGUISH_FIRE, 0) - EVT_CALL(MakeLerp, 255, 0, LVar0, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetFireplaceAlpha), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(EnableModel, MODEL_o157, FALSE) - EVT_CALL(SetModelFlags, MODEL_o157, 16, FALSE) - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(PlaySoundAt, SOUND_KKJ_DROP_INTO_ASHES, SOUND_SPACE_DEFAULT, -125, 10, -120) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, -125, 10, -120, EVT_FLOAT(2.0), 30) - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, -180, 30 * DT, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o39, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(10 * DT) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o129, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o130, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GF_KKJ14_OpenedPassage, TRUE) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_o35, FALSE) + Call(EnableModel, MODEL_o42, FALSE) + Call(EnableGroup, MODEL_g27, TRUE) + IfEq(GB_StoryProgress, STORY_CH1_BEGAN_PEACH_MISSION) + Set(LVar0, 120 * DT) + Else + Set(LVar0, 60 * DT) + EndIf + Call(PlaySoundAtCollider, COLLIDER_o129, SOUND_KKJ_EXTINGUISH_FIRE, 0) + Call(MakeLerp, 255, 0, LVar0, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(N(SetFireplaceAlpha), LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(EnableModel, MODEL_o157, FALSE) + Call(SetModelFlags, MODEL_o157, 16, FALSE) + Wait(10 * DT) + Thread + Wait(20 * DT) + Call(PlaySoundAt, SOUND_KKJ_DROP_INTO_ASHES, SOUND_SPACE_DEFAULT, -125, 10, -120) + PlayEffect(EFFECT_SMOKE_BURST, 0, -125, 10, -120, Float(2.0), 30) + EndThread + Call(MakeLerp, 0, -180, 30 * DT, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o39, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(10 * DT) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o129, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o130, COLLIDER_FLAGS_UPPER_MASK) + Set(GF_KKJ14_OpenedPassage, TRUE) + Return + End }; EvtScript N(EVS_Inspect_HiddenButton) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_IF_EQ(GF_KKJ14_RevealedButton, FALSE) - EVT_EXEC_WAIT(N(EVS_RevealButton)) - EVT_ELSE - EVT_CALL(FacePlayerTowardPoint, -29, -148, 5) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Peach3_ReachForButtonHigh) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Peach3_PressButtonHigh) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o128, SOUND_KKJ_PRESS_BUTTON, 0) - EVT_END_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(PlayerJump1, LVar0, LVar1, LVar2, 10) - EVT_CALL(SetPlayerAnimation, ANIM_Peach3_AfterPressButtonHigh) - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_CALL(InterpPlayerYaw, 225, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_EXEC_WAIT(N(EVS_OpenHiddenPassage)) - EVT_UNBIND - EVT_END_IF - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + IfEq(GF_KKJ14_RevealedButton, FALSE) + ExecWait(N(EVS_RevealButton)) + Else + Call(FacePlayerTowardPoint, -29, -148, 5) + Wait(10) + Call(SetPlayerAnimation, ANIM_Peach3_ReachForButtonHigh) + Wait(10) + Call(SetPlayerAnimation, ANIM_Peach3_PressButtonHigh) + Thread + Wait(5) + Call(PlaySoundAtCollider, COLLIDER_o128, SOUND_KKJ_PRESS_BUTTON, 0) + EndThread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerJumpscale, Float(1.0)) + Call(PlayerJump1, LVar0, LVar1, LVar2, 10) + Call(SetPlayerAnimation, ANIM_Peach3_AfterPressButtonHigh) + Wait(20) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Call(InterpPlayerYaw, 225, 0) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + ExecWait(N(EVS_OpenHiddenPassage)) + Unbind + EndIf + Call(EnablePartnerAI) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Inspect_HiddenButton_FirstTime) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_IF_EQ(GF_KKJ14_RevealedButton, FALSE) - EVT_IF_EQ(AF_KKJ_04, FALSE) - EVT_CALL(NpcFacePlayer, NPC_PARTNER, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Shout, ANIM_Twink_Shout, 5, MSG_Peach_0046) - EVT_SET(AF_KKJ_04, TRUE) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_RevealButton)) - EVT_ELSE - EVT_CALL(FacePlayerTowardPoint, -29, -148, 5) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Peach3_ReachForButtonHigh) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Peach3_PressButtonHigh) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o128, SOUND_KKJ_PRESS_BUTTON, 0) - EVT_END_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(PlayerJump1, LVar0, LVar1, LVar2, 10) - EVT_CALL(SetPlayerAnimation, ANIM_Peach3_AfterPressButtonHigh) - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_CALL(InterpPlayerYaw, 225, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 225, 0) - EVT_IF_EQ(AF_KKJ_05, FALSE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -120, 25, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_OpenHiddenPassage)) - EVT_IF_EQ(AF_KKJ_05, FALSE) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Delighted) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_ShoutJoy, ANIM_Twink_ShoutJoy, 5, MSG_Peach_0047) - EVT_SET(AF_KKJ_05, TRUE) - EVT_END_IF - EVT_UNBIND - EVT_END_IF - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + IfEq(GF_KKJ14_RevealedButton, FALSE) + IfEq(AF_KKJ_04, FALSE) + Call(NpcFacePlayer, NPC_PARTNER, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Shout, ANIM_Twink_Shout, 5, MSG_Peach_0046) + Set(AF_KKJ_04, TRUE) + EndIf + ExecWait(N(EVS_RevealButton)) + Else + Call(FacePlayerTowardPoint, -29, -148, 5) + Wait(10) + Call(SetPlayerAnimation, ANIM_Peach3_ReachForButtonHigh) + Wait(10) + Call(SetPlayerAnimation, ANIM_Peach3_PressButtonHigh) + Thread + Wait(5) + Call(PlaySoundAtCollider, COLLIDER_o128, SOUND_KKJ_PRESS_BUTTON, 0) + EndThread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerJumpscale, Float(1.0)) + Call(PlayerJump1, LVar0, LVar1, LVar2, 10) + Call(SetPlayerAnimation, ANIM_Peach3_AfterPressButtonHigh) + Wait(20) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Call(InterpPlayerYaw, 225, 0) + Call(InterpNpcYaw, NPC_PARTNER, 225, 0) + IfEq(AF_KKJ_05, FALSE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, -120, 25, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndIf + ExecWait(N(EVS_OpenHiddenPassage)) + IfEq(AF_KKJ_05, FALSE) + Call(ResetCam, CAM_DEFAULT, Float(3.0 / DT)) + Call(SetPlayerAnimation, ANIM_Peach2_Delighted) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_ShoutJoy, ANIM_Twink_ShoutJoy, 5, MSG_Peach_0047) + Set(AF_KKJ_05, TRUE) + EndIf + Unbind + EndIf + Call(EnablePartnerAI) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SetupInteractables) = { - EVT_IF_EQ(GF_KKJ14_RevealedButton, FALSE) - EVT_CALL(EnableModel, MODEL_o146, FALSE) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_o141, FALSE) - EVT_CALL(EnableModel, MODEL_o143, FALSE) - EVT_CALL(RotateGroup, MODEL_g39, 180, 1, 0, 0) - EVT_END_IF - EVT_IF_EQ(GF_KKJ14_OpenedPassage, FALSE) - EVT_CALL(EnableGroup, MODEL_g27, FALSE) - EVT_EXEC(N(EVS_TexPan_Fireplace)) - EVT_CALL(SetModelCustomGfx, MODEL_o157, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(setup_gfx_fireplace)), NULL) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_WAKE_UP) - EVT_CASE_LT(STORY_CH2_BEGAN_PEACH_MISSION) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Inspect_HiddenButton_FirstTime)), TRIGGER_WALL_PRESS_A, COLLIDER_o128, 1, 0) - EVT_CASE_LT(STORY_CH8_REACHED_PEACHS_CASTLE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Inspect_HiddenButton)), TRIGGER_WALL_PRESS_A, COLLIDER_o128, 1, 0) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o129, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o130, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(RotateModel, MODEL_o39, -180, 1, 0, 0) - EVT_CALL(EnableGroup, MODEL_g45, FALSE) - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Inspect_Fireplace)), TRIGGER_WALL_PRESS_A, COLLIDER_o129, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Inspect_Dresses)), TRIGGER_WALL_PRESS_A, COLLIDER_o143, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Inspect_Vanity)), TRIGGER_WALL_PRESS_A, COLLIDER_o142, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Inspect_Photo)), TRIGGER_WALL_PRESS_A, COLLIDER_o141, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Inspect_Bed)), TRIGGER_WALL_PRESS_A, COLLIDER_o25, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Inspect_Flowers)), TRIGGER_WALL_PRESS_A, COLLIDER_o135, 1, 0) - EVT_RETURN - EVT_END + IfEq(GF_KKJ14_RevealedButton, FALSE) + Call(EnableModel, MODEL_o146, FALSE) + Else + Call(EnableModel, MODEL_o141, FALSE) + Call(EnableModel, MODEL_o143, FALSE) + Call(RotateGroup, MODEL_g39, 180, 1, 0, 0) + EndIf + IfEq(GF_KKJ14_OpenedPassage, FALSE) + Call(EnableGroup, MODEL_g27, FALSE) + Exec(N(EVS_TexPan_Fireplace)) + Call(SetModelCustomGfx, MODEL_o157, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) + Call(SetCustomGfxBuilders, CUSTOM_GFX_1, Ref(N(setup_gfx_fireplace)), NULL) + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_WAKE_UP) + CaseLt(STORY_CH2_BEGAN_PEACH_MISSION) + BindTrigger(Ref(N(EVS_Inspect_HiddenButton_FirstTime)), TRIGGER_WALL_PRESS_A, COLLIDER_o128, 1, 0) + CaseLt(STORY_CH8_REACHED_PEACHS_CASTLE) + BindTrigger(Ref(N(EVS_Inspect_HiddenButton)), TRIGGER_WALL_PRESS_A, COLLIDER_o128, 1, 0) + CaseDefault + EndSwitch + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o129, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o130, COLLIDER_FLAGS_UPPER_MASK) + Call(RotateModel, MODEL_o39, -180, 1, 0, 0) + Call(EnableGroup, MODEL_g45, FALSE) + EndIf + BindTrigger(Ref(N(EVS_Inspect_Fireplace)), TRIGGER_WALL_PRESS_A, COLLIDER_o129, 1, 0) + BindTrigger(Ref(N(EVS_Inspect_Dresses)), TRIGGER_WALL_PRESS_A, COLLIDER_o143, 1, 0) + BindTrigger(Ref(N(EVS_Inspect_Vanity)), TRIGGER_WALL_PRESS_A, COLLIDER_o142, 1, 0) + BindTrigger(Ref(N(EVS_Inspect_Photo)), TRIGGER_WALL_PRESS_A, COLLIDER_o141, 1, 0) + BindTrigger(Ref(N(EVS_Inspect_Bed)), TRIGGER_WALL_PRESS_A, COLLIDER_o25, 1, 0) + BindTrigger(Ref(N(EVS_Inspect_Flowers)), TRIGGER_WALL_PRESS_A, COLLIDER_o135, 1, 0) + Return + End }; diff --git a/src/world/area_kkj/kkj_14/kkj_14_4_npc_guards.c b/src/world/area_kkj/kkj_14/kkj_14_4_npc_guards.c index 2b921931890..0fa8f42ebac 100644 --- a/src/world/area_kkj/kkj_14/kkj_14_4_npc_guards.c +++ b/src/world/area_kkj/kkj_14/kkj_14_4_npc_guards.c @@ -24,172 +24,172 @@ Vec3f N(TwinkApproachPath)[] = { }; EvtScript N(EVS_Scene_TossedBackInRoom) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetMusicTrack, 0, SONG_PEACH_CAUGHT, 0, 8) - EVT_CALL(SetPlayerPos, -480, 30, -30) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Carried) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, -480, 30, -30) - EVT_CALL(SetNpcPos, NPC_Koopatrol_Guard_01, -492, 0, -30) - EVT_CALL(SetNpcPos, NPC_Koopatrol_Guard_02, -460, 0, -30) - EVT_CALL(SetNpcYaw, NPC_Koopatrol_Guard_01, 90) - EVT_CALL(SetNpcYaw, NPC_Koopatrol_Guard_02, 90) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -300, 0, -30) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -300, 0, -30) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(30 * DT) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ttw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o112, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_OPEN, 0) - EVT_CALL(MakeLerp, 0, 80, 14, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o4, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(LoadPath, 50 * DT, EVT_PTR(N(TwinkFollowPath)), ARRAY_COUNT(N(TwinkFollowPath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_END_THREAD - EVT_CALL(SetNpcVar, NPC_Koopatrol_Guard_01, 0, 1) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_Guard_01, ANIM_WorldKoopatrol_Anim14) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_Guard_01, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_Guard_01, -316, -32, 0) - EVT_CALL(SetNpcVar, NPC_Koopatrol_Guard_01, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_Guard_02, ANIM_WorldKoopatrol_Anim14) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_Guard_02, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_Guard_02, -284, -28, 0) - EVT_END_THREAD - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_Koopatrol_Guard_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_ADD(LVar2, 2) - EVT_CALL(SetPlayerPos, LVar0, 30, LVar2) - EVT_WAIT(1) - EVT_CALL(GetNpcVar, NPC_Koopatrol_Guard_01, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_Guard_01, ANIM_WorldKoopatrol_Anim12) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_Guard_02, ANIM_WorldKoopatrol_Anim12) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Thrown) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_Guard_01, ANIM_WorldKoopatrol_Anim15) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_Guard_02, ANIM_WorldKoopatrol_Anim15) - EVT_CALL(LoadPath, 15 * DT, EVT_PTR(N(PeachTossPath)), ARRAY_COUNT(N(PeachTossPath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetPlayerPos, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtPlayer, SOUND_TRIP, SOUND_SPACE_DEFAULT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Land) - EVT_THREAD - EVT_ADD(LVar1, 10) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, LVar1, LVar2, LVar3, 0) - EVT_WAIT(47) - EVT_ADD(LVar1, -5) - EVT_ADD(LVar2, 10) - EVT_ADD(LVar3, 5) - EVT_LOOP(4) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 1, LVar1, LVar2, LVar3, 0, 0) - EVT_WAIT(10 * DT) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_Guard_01, ANIM_WorldKoopatrol_Anim01) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_Guard_01, ANIM_WorldKoopatrol_Anim06) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_Guard_01, -462, -30, 0) - EVT_CALL(SetNpcPos, NPC_Koopatrol_Guard_01, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_Guard_02, ANIM_WorldKoopatrol_Anim01) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_Guard_02, ANIM_WorldKoopatrol_Anim06) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_Guard_02, -430, -30, 0) - EVT_CALL(SetNpcPos, NPC_Koopatrol_Guard_02, NPC_DISPOSE_LOCATION) - EVT_CALL(MakeLerp, 120, 0, 8, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o4, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o112, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_ttw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_CLOSE, 0) - EVT_END_THREAD - EVT_WAIT(60 * DT) - EVT_CALL(LoadPath, 50 * DT, EVT_PTR(N(TwinkApproachPath)), ARRAY_COUNT(N(TwinkApproachPath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_IF_EQ(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0159) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_ArmsCrossedTalk, ANIM_Peach2_ArmsCrossedIdle, 5, MSG_Peach_015A) - EVT_IF_LT(GB_KKJ_CaughtCount, 3) - EVT_IF_EQ(AF_KKJ_13, FALSE) - EVT_SET(LVar0, MSG_Peach_015B) - EVT_ELSE - EVT_SET(LVar0, MSG_Peach_015D) - EVT_END_IF - EVT_ELSE - EVT_SET(LVar0, MSG_Peach_015C) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, LVar0) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0176) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_ArmsCrossedTalk, ANIM_Peach2_ArmsCrossedIdle, 5, MSG_Peach_0177) - EVT_IF_LT(GB_KKJ_CaughtCount, 3) - EVT_IF_EQ(AF_KKJ_13, FALSE) - EVT_SET(LVar0, MSG_Peach_0178) - EVT_ELSE - EVT_SET(LVar0, MSG_Peach_017A) - EVT_END_IF - EVT_ELSE - EVT_SET(LVar0, MSG_Peach_0179) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, LVar0) - EVT_END_IF - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetMusicTrack, 0, SONG_PEACH_CAUGHT, 0, 8) + Call(SetPlayerPos, -480, 30, -30) + Call(SetPlayerAnimation, ANIM_Peach2_Carried) + Call(DisablePartnerAI, 0) + Call(SetNpcPos, NPC_PARTNER, -480, 30, -30) + Call(SetNpcPos, NPC_Koopatrol_Guard_01, -492, 0, -30) + Call(SetNpcPos, NPC_Koopatrol_Guard_02, -460, 0, -30) + Call(SetNpcYaw, NPC_Koopatrol_Guard_01, 90) + Call(SetNpcYaw, NPC_Koopatrol_Guard_02, 90) + Call(UseSettingsFrom, CAM_DEFAULT, -300, 0, -30) + Call(SetPanTarget, CAM_DEFAULT, -300, 0, -30) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(30 * DT) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ttw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o112, COLLIDER_FLAGS_UPPER_MASK) + Call(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_OPEN, 0) + Call(MakeLerp, 0, 80, 14, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o4, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Thread + Wait(10 * DT) + Call(LoadPath, 50 * DT, Ref(N(TwinkFollowPath)), ARRAY_COUNT(N(TwinkFollowPath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + EndThread + Call(SetNpcVar, NPC_Koopatrol_Guard_01, 0, 1) + Thread + Call(SetNpcAnimation, NPC_Koopatrol_Guard_01, ANIM_WorldKoopatrol_Anim14) + Call(SetNpcSpeed, NPC_Koopatrol_Guard_01, Float(5.0)) + Call(NpcMoveTo, NPC_Koopatrol_Guard_01, -316, -32, 0) + Call(SetNpcVar, NPC_Koopatrol_Guard_01, 0, 0) + EndThread + Thread + Call(SetNpcAnimation, NPC_Koopatrol_Guard_02, ANIM_WorldKoopatrol_Anim14) + Call(SetNpcSpeed, NPC_Koopatrol_Guard_02, Float(5.0)) + Call(NpcMoveTo, NPC_Koopatrol_Guard_02, -284, -28, 0) + EndThread + Loop(0) + Call(GetNpcPos, NPC_Koopatrol_Guard_01, LVar0, LVar1, LVar2) + Add(LVar0, 10) + Add(LVar2, 2) + Call(SetPlayerPos, LVar0, 30, LVar2) + Wait(1) + Call(GetNpcVar, NPC_Koopatrol_Guard_01, 0, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcAnimation, NPC_Koopatrol_Guard_01, ANIM_WorldKoopatrol_Anim12) + Call(SetNpcAnimation, NPC_Koopatrol_Guard_02, ANIM_WorldKoopatrol_Anim12) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_Thrown) + Call(SetNpcAnimation, NPC_Koopatrol_Guard_01, ANIM_WorldKoopatrol_Anim15) + Call(SetNpcAnimation, NPC_Koopatrol_Guard_02, ANIM_WorldKoopatrol_Anim15) + Call(LoadPath, 15 * DT, Ref(N(PeachTossPath)), ARRAY_COUNT(N(PeachTossPath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetPlayerPos, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtPlayer, SOUND_TRIP, SOUND_SPACE_DEFAULT) + Call(SetPlayerAnimation, ANIM_Peach2_Land) + Thread + Add(LVar1, 10) + PlayEffect(EFFECT_LANDING_DUST, 1, LVar1, LVar2, LVar3, 0) + Wait(47) + Add(LVar1, -5) + Add(LVar2, 10) + Add(LVar3, 5) + Loop(4) + PlayEffect(EFFECT_WALKING_DUST, 1, LVar1, LVar2, LVar3, 0, 0) + Wait(10 * DT) + EndLoop + EndThread + Thread + Call(SetNpcAnimation, NPC_Koopatrol_Guard_01, ANIM_WorldKoopatrol_Anim01) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_Koopatrol_Guard_01, ANIM_WorldKoopatrol_Anim06) + Call(NpcMoveTo, NPC_Koopatrol_Guard_01, -462, -30, 0) + Call(SetNpcPos, NPC_Koopatrol_Guard_01, NPC_DISPOSE_LOCATION) + EndThread + Thread + Call(SetNpcAnimation, NPC_Koopatrol_Guard_02, ANIM_WorldKoopatrol_Anim01) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_Koopatrol_Guard_02, ANIM_WorldKoopatrol_Anim06) + Call(NpcMoveTo, NPC_Koopatrol_Guard_02, -430, -30, 0) + Call(SetNpcPos, NPC_Koopatrol_Guard_02, NPC_DISPOSE_LOCATION) + Call(MakeLerp, 120, 0, 8, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o4, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o112, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_ttw, COLLIDER_FLAGS_UPPER_MASK) + Call(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_CLOSE, 0) + EndThread + Wait(60 * DT) + Call(LoadPath, 50 * DT, Ref(N(TwinkApproachPath)), ARRAY_COUNT(N(TwinkApproachPath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + IfEq(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0159) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_ArmsCrossedTalk, ANIM_Peach2_ArmsCrossedIdle, 5, MSG_Peach_015A) + IfLt(GB_KKJ_CaughtCount, 3) + IfEq(AF_KKJ_13, FALSE) + Set(LVar0, MSG_Peach_015B) + Else + Set(LVar0, MSG_Peach_015D) + EndIf + Else + Set(LVar0, MSG_Peach_015C) + EndIf + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, LVar0) + Else + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0176) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_ArmsCrossedTalk, ANIM_Peach2_ArmsCrossedIdle, 5, MSG_Peach_0177) + IfLt(GB_KKJ_CaughtCount, 3) + IfEq(AF_KKJ_13, FALSE) + Set(LVar0, MSG_Peach_0178) + Else + Set(LVar0, MSG_Peach_017A) + EndIf + Else + Set(LVar0, MSG_Peach_0179) + EndIf + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, LVar0) + EndIf + Exec(N(EVS_SetupMusic)) + Call(ResetCam, CAM_DEFAULT, Float(1.0 / DT)) + Call(EnablePartnerAI) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; #include "world/common/enemy/Koopatrol_Stationary.inc.c" diff --git a/src/world/area_kkj/kkj_14/kkj_14_8_chapter0.c b/src/world/area_kkj/kkj_14/kkj_14_8_chapter0.c index c9b821a3853..709f9de9ba1 100644 --- a/src/world/area_kkj/kkj_14/kkj_14_8_chapter0.c +++ b/src/world/area_kkj/kkj_14/kkj_14_8_chapter0.c @@ -28,467 +28,467 @@ Vec3f N(TwinkExitPath)[] = { }; EvtScript N(EVS_OpenDoor_Ch0) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_OPEN, 0) - EVT_CALL(MakeLerp, 0, 120, 14, EASING_COS_FAST_OVERSHOOT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o4, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_OPEN, 0) + Call(MakeLerp, 0, 120, 14, EASING_COS_FAST_OVERSHOOT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o4, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_CloseDoor_Ch0) = { - EVT_CALL(MakeLerp, 120, 0, 8, EASING_COS_FAST_OVERSHOOT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o4, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_CLOSE, 0) - EVT_RETURN - EVT_END + Call(MakeLerp, 120, 0, 8, EASING_COS_FAST_OVERSHOOT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o4, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_CLOSE, 0) + Return + End }; EvtScript N(EVS_TwinkTappingOnGlassDoor) = { - EVT_LOOP(0) - EVT_CALL(NpcFlyTo, NPC_PARTNER, 520, 70, -60, 30 * DT, -10, EASING_LINEAR) - EVT_CALL(NpcFlyTo, NPC_PARTNER, 520, 70, -61, 10 * DT, -5, EASING_LINEAR) - EVT_CALL(PlaySoundAtNpc, NPC_PARTNER, SOUND_KKJ_WINDOW_TAP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcFlyTo, NPC_PARTNER, 520, 70, -62, 10 * DT, -5, EASING_LINEAR) - EVT_CALL(PlaySoundAtNpc, NPC_PARTNER, SOUND_KKJ_WINDOW_TAP, SOUND_SPACE_DEFAULT) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(NpcFlyTo, NPC_PARTNER, 520, 70, -60, 30 * DT, -10, EASING_LINEAR) + Call(NpcFlyTo, NPC_PARTNER, 520, 70, -61, 10 * DT, -5, EASING_LINEAR) + Call(PlaySoundAtNpc, NPC_PARTNER, SOUND_KKJ_WINDOW_TAP, SOUND_SPACE_DEFAULT) + Call(NpcFlyTo, NPC_PARTNER, 520, 70, -62, 10 * DT, -5, EASING_LINEAR) + Call(PlaySoundAtNpc, NPC_PARTNER, SOUND_KKJ_WINDOW_TAP, SOUND_SPACE_DEFAULT) + EndLoop + Return + End }; EvtScript N(EVS_Scene_Chapter0) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(SetPeachDepressed)) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_SadStill) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, 520, 60, -35) - EVT_CALL(SetNpcPos, NPC_Bowser, -450, 0, -20) - EVT_CALL(SetNpcPos, NPC_Kammy, -510, 0, -20) - EVT_CALL(SetNpcYaw, NPC_Bowser, 90) - EVT_CALL(SetNpcYaw, NPC_Kammy, 90) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(90.0), 20, 250, EVT_FLOAT(17.0), EVT_FLOAT(-11.0)) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_SadTalk, ANIM_Peach2_SadStill, 5, MSG_Peach_0016) - EVT_WAIT(5 * DT) - EVT_CALL(InterpPlayerYaw, 90, 5) - EVT_CALL(PlayerMoveTo, 20, 30, 30 * DT) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_SadTalk, ANIM_Peach2_SadStill, 5, MSG_Peach_0017) - EVT_WAIT(5 * DT) - EVT_CALL(InterpPlayerYaw, 270, 5) - EVT_CALL(PlayerMoveTo, -20, 30, 30 * DT) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_SadTalk, ANIM_Peach2_SadStill, 5, MSG_Peach_0018) - EVT_WAIT(5 * DT) - EVT_CALL(InterpPlayerYaw, 90, 5) - EVT_CALL(PlayerMoveTo, 20, 30, 30 * DT) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_SadTalk, ANIM_Peach2_SadStill, 5, MSG_Peach_0019) - EVT_WAIT(30 * DT) - EVT_CALL(N(ClearPeachDepressed)) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_CALL(PlaySoundAtPlayer, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, 0, EMOTE_EXCLAMATION, -45, 30, EMOTER_PLAYER, 0, 0, 0, 0) - EVT_WAIT(10 * DT) - EVT_CALL(InterpPlayerYaw, 270, 3) - EVT_WAIT(15 * DT) - EVT_CALL(SetMusicTrack, 0, SONG_BOWSER_THEME, 0, 8) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -330, 0, 0) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -330, 32) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(3 * DT) - EVT_EXEC(N(EVS_OpenDoor_Ch0)) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcVar, NPC_Bowser, 0, 1) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Walk) - EVT_CALL(SetNpcSpeed, NPC_Bowser, EVT_FLOAT(3.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Bowser, -300, -20, 0) - EVT_CALL(NpcMoveTo, NPC_Bowser, -50, 30, 0) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) - EVT_CALL(SetNpcVar, NPC_Bowser, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim02) - EVT_CALL(SetNpcSpeed, NPC_Kammy, EVT_FLOAT(3.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Kammy, -110, 30, 0) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) - EVT_END_THREAD - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_THREAD - EVT_WAIT(40 * DT) - EVT_CALL(MakeLerp, 250, 300, 80 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetCamDistance, CAM_DEFAULT, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_Bowser, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(GetNpcVar, NPC_Bowser, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_Bowser, ANIM_WorldBowser_TalkEyesClosed, ANIM_WorldBowser_TalkEyesClosed, 0, MSG_Peach_001A) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) - EVT_WAIT(1) - EVT_CALL(EndSpeech, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0) - EVT_CALL(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, MSG_Peach_001B) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Brandish) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Bowser, ANIM_WorldBowser_BrandishTalk, ANIM_WorldBowser_BrandishIdle, 0, MSG_Peach_001C) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Startle) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) - EVT_CALL(EndSpeech, NPC_Bowser, ANIM_WorldBowser_BrandishTalk, ANIM_WorldBowser_BrandishIdle, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_CALL(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, MSG_Peach_001D) - EVT_CALL(SpeakToPlayer, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_Peach_001E) - EVT_CALL(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, MSG_Peach_001F) - EVT_WAIT(15 * DT) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Walk) - EVT_CALL(NpcMoveTo, NPC_Bowser, -450, 30, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(InterpNpcYaw, NPC_Kammy, 270, 5) - EVT_WAIT(60 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim02) - EVT_CALL(NpcMoveTo, NPC_Kammy, -510, 30, 0) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) - EVT_END_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.5 / DT)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(FadeOutMusic, 0, 2000 * DT) - EVT_WAIT(60 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_RaiseArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_0020) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LowerArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_WAIT(20 * DT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 150) - EVT_CALL(PlaySoundAt, SOUND_KKJ_WINDOW_TAP, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(10 * DT) - EVT_CALL(PlaySoundAt, SOUND_KKJ_WINDOW_TAP, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(10 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, 0, EMOTE_QUESTION, -45, 20, EMOTER_PLAYER, 0, 0, 0, 0) - EVT_WAIT(20 * DT) - EVT_CALL(InterpPlayerYaw, 135, 5) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_RaiseArms) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_0021) - EVT_SET(AF_KKJ_03, FALSE) - EVT_EXEC_GET_TID(N(EVS_TwinkTappingOnGlassDoor), LVarA) - EVT_THREAD - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 413, 0, -66) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 338, 44) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 413, -66) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PlayerMoveTo, 179, -4, 0) - EVT_CALL(PlayerMoveTo, 439, -16, 0) - EVT_SET(AF_KKJ_03, TRUE) - EVT_KILL_THREAD(LVarA) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_WAIT(15 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_OpenDoors) - EVT_CALL(PlaySoundAtCollider, COLLIDER_tte, SOUND_WINDOW_OPEN_A, 0) - EVT_CALL(MakeLerp, 0, 80, 14, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o83, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o85, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o84, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o86, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetMusicTrack, 0, SONG_TWINK_THEME, 0, 8) - EVT_THREAD - EVT_CALL(LoadPath, 100 * DT, EVT_PTR(N(TwinkEnterPath)), ARRAY_COUNT(N(TwinkEnterPath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(AF_KKJ_03, FALSE) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 310) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_END_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 430) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(InterpPlayerYaw, 220, 5) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_THREAD - EVT_WAIT(40 * DT) - EVT_CALL(func_802D1270, 420, 0, EVT_FLOAT(2.0 / DT)) - EVT_END_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_WAIT(30 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 370, 30, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 370, 30, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(370.0), EVT_FLOAT(32.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_EQ(AF_KKJ_03, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPanTarget, CAM_DEFAULT, 320, 30, 17) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(200.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-16.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0022) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 370, 30, 17) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 5, MSG_Peach_0023) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0024) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.4 / DT)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 350, 30, 17) - EVT_CALL(PlayerMoveTo, 380, 0, 30) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 5, MSG_Peach_0025) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0026) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 200) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 17, -14) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 380, 30, 17) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_RaiseArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_0027) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LowerArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_TalkSad) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 17, -16) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 320, 30, 17) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_TalkSad, ANIM_Twink_TalkSad, 0, MSG_Peach_0028) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 17, -10) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 350, 30, 17) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_RaiseArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_0029) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LowerArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_TalkSad, ANIM_Twink_TalkSad, 0, MSG_Peach_002A) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_RaiseArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_002B) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LowerArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Startle) - EVT_CALL(PlaySoundAtPlayer, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, 0, EMOTE_EXCLAMATION, -45, 30, EMOTER_PLAYER, 0, 0, 0, 0) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_RaiseArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_002C) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Idle) - EVT_CALL(EndSpeech, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LowerArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_GiveItem) - EVT_WAIT(12 * DT) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_SUB(LVar2, 10) - EVT_ADD(LVar3, 20) - EVT_ADD(LVar4, 2) - EVT_CALL(MakeItemEntity, ITEM_LUCKY_STAR, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVar9, LVar0) - EVT_WAIT(10 * DT) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0 / DT)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(200.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-12.5)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 365, 30, 17) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_CALL(NpcFlyTo, NPC_PARTNER, 350, 50, -2, 30 * DT, -5, EASING_LINEAR) - EVT_END_THREAD - EVT_WAIT(40 * DT) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Wink) - EVT_CALL(MakeLerp, 50, 70, 10 * DT, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_ADD(LVar2, -2) - EVT_CALL(UpdateLerp) - EVT_CALL(SetItemPos, LVar9, LVar2, LVar0, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_TalkWink) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_TalkWink, ANIM_Twink_TalkWink, 0, MSG_Peach_002D) - EVT_SET(LVar3, LVar0) - EVT_LOOP(10) - EVT_ADD(LVar3, -1) - EVT_CALL(SetItemPos, LVar9, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Tense) - EVT_CALL(RemoveItemEntity, LVar9) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Idle) - EVT_WAIT(20 * DT) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) - EVT_WAIT(10 * DT) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 400) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 17, -10) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 355, 30, 17) - EVT_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, 380) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(InterpPlayerYaw, 90, 5) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_RaiseArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_002E) - EVT_SET(AF_KKJ_03, TRUE) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 310) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_END_THREAD - EVT_CALL(LoadPath, 60 * DT, EVT_PTR(N(TwinkExitPath)), ARRAY_COUNT(N(TwinkExitPath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Idle) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_EQ(AF_KKJ_03, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 17, -13) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 405, 30, 17) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(400.0), EVT_FLOAT(32.0)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_002F) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) - EVT_CALL(NpcFlyTo, NPC_PARTNER, 420, 60, 0, 20 * DT, 0, EASING_LINEAR) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Idle) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_0030) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LowerArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 360, 10 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_PARTNER, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0031) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 5) - EVT_WAIT(10 * DT) - EVT_CALL(FadeOutMusic, 0, 2000 * DT) - EVT_CALL(NpcFlyTo, NPC_PARTNER, 600, 100, -80, 40, 0, EASING_LINEAR) - EVT_WAIT(30 * DT) - EVT_CALL(GotoMap, EVT_PTR("kkj_26"), kkj_26_ENTRY_2) - EVT_WAIT(100 * DT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(N(SetPeachDepressed)) + Call(SetPlayerAnimation, ANIM_Peach2_SadStill) + Call(InterpPlayerYaw, 270, 0) + Call(DisablePartnerAI, 0) + Call(SetNpcPos, NPC_PARTNER, 520, 60, -35) + Call(SetNpcPos, NPC_Bowser, -450, 0, -20) + Call(SetNpcPos, NPC_Kammy, -510, 0, -20) + Call(SetNpcYaw, NPC_Bowser, 90) + Call(SetNpcYaw, NPC_Kammy, 90) + Call(AdjustCam, CAM_DEFAULT, Float(90.0), 20, 250, Float(17.0), Float(-11.0)) + Wait(30 * DT) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_SadTalk, ANIM_Peach2_SadStill, 5, MSG_Peach_0016) + Wait(5 * DT) + Call(InterpPlayerYaw, 90, 5) + Call(PlayerMoveTo, 20, 30, 30 * DT) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_SadTalk, ANIM_Peach2_SadStill, 5, MSG_Peach_0017) + Wait(5 * DT) + Call(InterpPlayerYaw, 270, 5) + Call(PlayerMoveTo, -20, 30, 30 * DT) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_SadTalk, ANIM_Peach2_SadStill, 5, MSG_Peach_0018) + Wait(5 * DT) + Call(InterpPlayerYaw, 90, 5) + Call(PlayerMoveTo, 20, 30, 30 * DT) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_SadTalk, ANIM_Peach2_SadStill, 5, MSG_Peach_0019) + Wait(30 * DT) + Call(N(ClearPeachDepressed)) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Call(PlaySoundAtPlayer, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, 0, EMOTE_EXCLAMATION, -45, 30, EMOTER_PLAYER, 0, 0, 0, 0) + Wait(10 * DT) + Call(InterpPlayerYaw, 270, 3) + Wait(15 * DT) + Call(SetMusicTrack, 0, SONG_BOWSER_THEME, 0, 8) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(SetPanTarget, CAM_DEFAULT, -330, 0, 0) + Call(SetCamPosA, CAM_DEFAULT, -330, 32) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(3 * DT) + Exec(N(EVS_OpenDoor_Ch0)) + Wait(10 * DT) + Call(SetNpcVar, NPC_Bowser, 0, 1) + Thread + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Walk) + Call(SetNpcSpeed, NPC_Bowser, Float(3.0 / DT)) + Call(NpcMoveTo, NPC_Bowser, -300, -20, 0) + Call(NpcMoveTo, NPC_Bowser, -50, 30, 0) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) + Call(SetNpcVar, NPC_Bowser, 0, 0) + EndThread + Thread + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim02) + Call(SetNpcSpeed, NPC_Kammy, Float(3.0 / DT)) + Call(NpcMoveTo, NPC_Kammy, -110, 30, 0) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) + EndThread + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Thread + Wait(40 * DT) + Call(MakeLerp, 250, 300, 80 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetCamDistance, CAM_DEFAULT, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Loop(0) + Call(GetNpcPos, NPC_Bowser, LVar0, LVar1, LVar2) + Add(LVar0, 10) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Call(GetNpcVar, NPC_Bowser, 0, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Wait(20 * DT) + Call(SpeakToPlayer, NPC_Bowser, ANIM_WorldBowser_TalkEyesClosed, ANIM_WorldBowser_TalkEyesClosed, 0, MSG_Peach_001A) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) + Wait(1) + Call(EndSpeech, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0) + Call(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, MSG_Peach_001B) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Brandish) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Bowser, ANIM_WorldBowser_BrandishTalk, ANIM_WorldBowser_BrandishIdle, 0, MSG_Peach_001C) + Call(SetPlayerAnimation, ANIM_Peach2_Startle) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) + Call(EndSpeech, NPC_Bowser, ANIM_WorldBowser_BrandishTalk, ANIM_WorldBowser_BrandishIdle, 0) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Call(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, MSG_Peach_001D) + Call(SpeakToPlayer, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_Peach_001E) + Call(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, MSG_Peach_001F) + Wait(15 * DT) + Thread + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Walk) + Call(NpcMoveTo, NPC_Bowser, -450, 30, 0) + EndThread + Thread + Call(InterpNpcYaw, NPC_Kammy, 270, 5) + Wait(60 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim02) + Call(NpcMoveTo, NPC_Kammy, -510, 30, 0) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) + EndThread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.5 / DT)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(FadeOutMusic, 0, 2000 * DT) + Wait(60 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_RaiseArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_0020) + Call(SetPlayerAnimation, ANIM_Peach2_LowerArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Wait(20 * DT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 150) + Call(PlaySoundAt, SOUND_KKJ_WINDOW_TAP, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Wait(10 * DT) + Call(PlaySoundAt, SOUND_KKJ_WINDOW_TAP, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Wait(10 * DT) + Call(PlaySoundAtPlayer, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) + Call(ShowEmote, 0, EMOTE_QUESTION, -45, 20, EMOTER_PLAYER, 0, 0, 0, 0) + Wait(20 * DT) + Call(InterpPlayerYaw, 135, 5) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_RaiseArms) + Wait(10) + Call(SetPlayerAnimation, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_0021) + Set(AF_KKJ_03, FALSE) + ExecGetTID(N(EVS_TwinkTappingOnGlassDoor), LVarA) + Thread + Call(UseSettingsFrom, CAM_DEFAULT, 413, 0, -66) + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamPosA, CAM_DEFAULT, 338, 44) + Call(SetCamPosB, CAM_DEFAULT, 413, -66) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndThread + Wait(10 * DT) + Call(SetPlayerSpeed, Float(3.0 / DT)) + Call(PlayerMoveTo, 179, -4, 0) + Call(PlayerMoveTo, 439, -16, 0) + Set(AF_KKJ_03, TRUE) + KillThread(LVarA) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + Wait(15 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_OpenDoors) + Call(PlaySoundAtCollider, COLLIDER_tte, SOUND_WINDOW_OPEN_A, 0) + Call(MakeLerp, 0, 80, 14, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o83, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o85, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_o84, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o86, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetMusicTrack, 0, SONG_TWINK_THEME, 0, 8) + Thread + Call(LoadPath, 100 * DT, Ref(N(TwinkEnterPath)), ARRAY_COUNT(N(TwinkEnterPath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Set(AF_KKJ_03, FALSE) + EndThread + Thread + Loop(0) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + IfLt(LVar0, 310) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + EndThread + Loop(0) + Wait(1) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + IfLt(LVar0, 430) + BreakLoop + EndIf + EndLoop + Call(InterpPlayerYaw, 220, 5) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Thread + Wait(40 * DT) + Call(func_802D1270, 420, 0, Float(2.0 / DT)) + EndThread + Wait(10 * DT) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Wait(30 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, 370, 30, 0) + Call(SetPanTarget, CAM_DEFAULT, 370, 30, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(370.0), Float(32.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Loop(0) + Wait(1) + IfEq(AF_KKJ_03, FALSE) + BreakLoop + EndIf + EndLoop + Call(SetPanTarget, CAM_DEFAULT, 320, 30, 17) + Call(SetCamDistance, CAM_DEFAULT, Float(200.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-16.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0022) + Call(SetPanTarget, CAM_DEFAULT, 370, 30, 17) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-10.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 5, MSG_Peach_0023) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0024) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.4 / DT)) + Call(SetPanTarget, CAM_DEFAULT, 350, 30, 17) + Call(PlayerMoveTo, 380, 0, 30) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 5, MSG_Peach_0025) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0026) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(SetCamDistance, CAM_DEFAULT, 200) + Call(SetCamPitch, CAM_DEFAULT, 17, -14) + Call(SetPanTarget, CAM_DEFAULT, 380, 30, 17) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetPlayerAnimation, ANIM_Peach2_RaiseArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_0027) + Call(SetPlayerAnimation, ANIM_Peach2_LowerArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_TalkSad) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Call(SetCamPitch, CAM_DEFAULT, 17, -16) + Call(SetPanTarget, CAM_DEFAULT, 320, 30, 17) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_TalkSad, ANIM_Twink_TalkSad, 0, MSG_Peach_0028) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, 17, -10) + Call(SetPanTarget, CAM_DEFAULT, 350, 30, 17) + Call(SetPlayerAnimation, ANIM_Peach2_RaiseArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_0029) + Call(SetPlayerAnimation, ANIM_Peach2_LowerArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_TalkSad, ANIM_Twink_TalkSad, 0, MSG_Peach_002A) + Call(SetPlayerAnimation, ANIM_Peach2_RaiseArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_002B) + Call(SetPlayerAnimation, ANIM_Peach2_LowerArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_Startle) + Call(PlaySoundAtPlayer, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, 0, EMOTE_EXCLAMATION, -45, 30, EMOTER_PLAYER, 0, 0, 0, 0) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Call(SetPlayerAnimation, ANIM_Peach2_RaiseArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_002C) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Idle) + Call(EndSpeech, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5) + Call(SetPlayerAnimation, ANIM_Peach2_LowerArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_GiveItem) + Wait(12 * DT) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Sub(LVar2, 10) + Add(LVar3, 20) + Add(LVar4, 2) + Call(MakeItemEntity, ITEM_LUCKY_STAR, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVar9, LVar0) + Wait(10 * DT) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0 / DT)) + Call(SetCamDistance, CAM_DEFAULT, Float(200.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-12.5)) + Call(SetPanTarget, CAM_DEFAULT, 365, 30, 17) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Call(NpcFlyTo, NPC_PARTNER, 350, 50, -2, 30 * DT, -5, EASING_LINEAR) + EndThread + Wait(40 * DT) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Wink) + Call(MakeLerp, 50, 70, 10 * DT, EASING_QUADRATIC_OUT) + Loop(0) + Add(LVar2, -2) + Call(UpdateLerp) + Call(SetItemPos, LVar9, LVar2, LVar0, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(10) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_TalkWink) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_TalkWink, ANIM_Twink_TalkWink, 0, MSG_Peach_002D) + Set(LVar3, LVar0) + Loop(10) + Add(LVar3, -1) + Call(SetItemPos, LVar9, LVar2, LVar3, LVar4) + Wait(1) + EndLoop + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Tense) + Call(RemoveItemEntity, LVar9) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Idle) + Wait(20 * DT) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) + Wait(10 * DT) + Call(SetCamDistance, CAM_DEFAULT, 400) + Call(SetCamPitch, CAM_DEFAULT, 17, -10) + Call(SetPanTarget, CAM_DEFAULT, 355, 30, 17) + Thread + Loop(0) + Wait(1) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + IfGt(LVar0, 380) + BreakLoop + EndIf + EndLoop + Call(InterpPlayerYaw, 90, 5) + Call(SetPlayerAnimation, ANIM_Peach2_RaiseArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_002E) + Set(AF_KKJ_03, TRUE) + EndThread + Thread + Loop(0) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + IfLt(LVar0, 310) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + EndThread + Call(LoadPath, 60 * DT, Ref(N(TwinkExitPath)), ARRAY_COUNT(N(TwinkExitPath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Idle) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + Loop(0) + Wait(1) + IfEq(AF_KKJ_03, TRUE) + BreakLoop + EndIf + EndLoop + Call(SetCamDistance, CAM_DEFAULT, 250) + Call(SetCamPitch, CAM_DEFAULT, 17, -13) + Call(SetPanTarget, CAM_DEFAULT, 405, 30, 17) + Call(SetCamPosB, CAM_DEFAULT, Float(400.0), Float(32.0)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_002F) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) + Call(NpcFlyTo, NPC_PARTNER, 420, 60, 0, 20 * DT, 0, EASING_LINEAR) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Idle) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_0030) + Call(SetPlayerAnimation, ANIM_Peach2_LowerArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Thread + Call(MakeLerp, 0, 360, 10 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_PARTNER, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0031) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(InterpNpcYaw, NPC_PARTNER, 90, 5) + Wait(10 * DT) + Call(FadeOutMusic, 0, 2000 * DT) + Call(NpcFlyTo, NPC_PARTNER, 600, 100, -80, 40, 0, EASING_LINEAR) + Wait(30 * DT) + Call(GotoMap, Ref("kkj_26"), kkj_26_ENTRY_2) + Wait(100 * DT) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_kkj/kkj_14/kkj_14_9_chapter1.c b/src/world/area_kkj/kkj_14/kkj_14_9_chapter1.c index 0af07517e08..a83405f2251 100644 --- a/src/world/area_kkj/kkj_14/kkj_14_9_chapter1.c +++ b/src/world/area_kkj/kkj_14/kkj_14_9_chapter1.c @@ -2,48 +2,48 @@ #include "sprite/player.h" EvtScript N(EVS_Scene_Chapter1) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_THREAD - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(0.5 / DT), 20, 300, EVT_FLOAT(17.0), EVT_FLOAT(-11.0)) - EVT_END_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, -200, 93, -17) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_THREAD - EVT_WAIT(120 * DT) - EVT_CALL(NpcFlyTo, NPC_PARTNER, -100, 40, 0, 60 * DT, 40, EASING_LINEAR) - EVT_WAIT(5 * DT) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 5) - EVT_END_THREAD - EVT_LOOP(3) - EVT_CALL(PlayerMoveTo, -110, 0, 30 * DT) - EVT_CALL(PlayerMoveTo, -140, 0, 30 * DT) - EVT_END_LOOP - EVT_WAIT(5 * DT) - EVT_CALL(InterpPlayerYaw, 90, 5) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 5, MSG_Peach_0033) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0034) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 5, MSG_Peach_0035) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0036) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Startle) - EVT_CALL(PlaySoundAtPlayer, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, 0, EMOTE_EXCLAMATION, 0, 30, EMOTER_PLAYER, 0, 0, 0, 0) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_RaiseArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_0037) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LowerArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0038) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Thread + Call(AdjustCam, CAM_DEFAULT, Float(0.5 / DT), 20, 300, Float(17.0), Float(-11.0)) + EndThread + Call(DisablePartnerAI, 0) + Call(SetNpcPos, NPC_PARTNER, -200, 93, -17) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + Thread + Wait(120 * DT) + Call(NpcFlyTo, NPC_PARTNER, -100, 40, 0, 60 * DT, 40, EASING_LINEAR) + Wait(5 * DT) + Call(InterpNpcYaw, NPC_PARTNER, 270, 5) + EndThread + Loop(3) + Call(PlayerMoveTo, -110, 0, 30 * DT) + Call(PlayerMoveTo, -140, 0, 30 * DT) + EndLoop + Wait(5 * DT) + Call(InterpPlayerYaw, 90, 5) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 5, MSG_Peach_0033) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0034) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 5, MSG_Peach_0035) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0036) + Call(SetPlayerAnimation, ANIM_Peach2_Startle) + Call(PlaySoundAtPlayer, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, 0, EMOTE_EXCLAMATION, 0, 30, EMOTER_PLAYER, 0, 0, 0, 0) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Call(SetPlayerAnimation, ANIM_Peach2_RaiseArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_0037) + Call(SetPlayerAnimation, ANIM_Peach2_LowerArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0038) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(EnablePartnerAI) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_kkj/kkj_15/kkj_15_1_music.c b/src/world/area_kkj/kkj_15/kkj_15_1_music.c index 72b8e777ac8..50a96b9aef2 100644 --- a/src/world/area_kkj/kkj_15/kkj_15_1_music.c +++ b/src/world/area_kkj/kkj_15/kkj_15_1_music.c @@ -1,20 +1,20 @@ #include "kkj_15.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_OR_EQ(STORY_CH0_BEGAN_PEACH_MISSION) - EVT_CASE_OR_EQ(STORY_CH1_BEGAN_PEACH_MISSION) - EVT_CASE_OR_EQ(STORY_CH3_BEGAN_PEACH_MISSION) - EVT_CASE_OR_EQ(STORY_CH7_BEGAN_PEACH_MISSION) - EVT_CALL(SetMusicTrack, 0, SONG_PRISONER_PEACH_THEME, 0, 8) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(STORY_CH2_BEGAN_PEACH_MISSION) - EVT_CASE_OR_EQ(STORY_CH4_BEGAN_PEACH_MISSION) - EVT_CASE_OR_EQ(STORY_CH5_BEGAN_PEACH_MISSION) - EVT_CASE_OR_EQ(STORY_CH6_BEGAN_PEACH_MISSION) - EVT_CALL(SetMusicTrack, 0, SONG_PEACH_MISSION, 0, 8) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseOrEq(STORY_CH0_BEGAN_PEACH_MISSION) + CaseOrEq(STORY_CH1_BEGAN_PEACH_MISSION) + CaseOrEq(STORY_CH3_BEGAN_PEACH_MISSION) + CaseOrEq(STORY_CH7_BEGAN_PEACH_MISSION) + Call(SetMusicTrack, 0, SONG_PRISONER_PEACH_THEME, 0, 8) + EndCaseGroup + CaseOrEq(STORY_CH2_BEGAN_PEACH_MISSION) + CaseOrEq(STORY_CH4_BEGAN_PEACH_MISSION) + CaseOrEq(STORY_CH5_BEGAN_PEACH_MISSION) + CaseOrEq(STORY_CH6_BEGAN_PEACH_MISSION) + Call(SetMusicTrack, 0, SONG_PEACH_MISSION, 0, 8) + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/world/area_kkj/kkj_15/kkj_15_2_main.c b/src/world/area_kkj/kkj_15/kkj_15_2_main.c index f2ec41ca676..c14a253d615 100644 --- a/src/world/area_kkj/kkj_15/kkj_15_2_main.c +++ b/src/world/area_kkj/kkj_15/kkj_15_2_main.c @@ -23,134 +23,134 @@ Gfx N(setup_gfx_candle_lights)[] = { }; EvtScript N(EVS_EndPeachChapter0) = { - EVT_SET(LVar0, GB_KKJ_LastPartner) - EVT_CALL(N(RestoreFromPeachState)) - EVT_CALL(PlaySound, SOUND_SLIDE_WHISTLE_OUT) - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_10"), kmr_10_ENTRY_0, TRANSITION_END_PEACH_INTERLUDE) - EVT_WAIT(100) + Set(LVar0, GB_KKJ_LastPartner) + Call(N(RestoreFromPeachState)) + Call(PlaySound, SOUND_SLIDE_WHISTLE_OUT) + Call(GotoMapSpecial, Ref("kmr_10"), kmr_10_ENTRY_0, TRANSITION_END_PEACH_INTERLUDE) + Wait(100) }; //@bug script not properly terminated EvtScript N(EVS_EndPeachChapter1) = { - EVT_SET(LVar0, GB_KKJ_LastPartner) - EVT_CALL(N(RestoreFromPeachState)) - EVT_CALL(PlaySound, SOUND_SLIDE_WHISTLE_OUT) - EVT_CALL(GotoMapSpecial, EVT_PTR("trd_00"), trd_00_ENTRY_5, TRANSITION_END_PEACH_INTERLUDE) - EVT_WAIT(100) + Set(LVar0, GB_KKJ_LastPartner) + Call(N(RestoreFromPeachState)) + Call(PlaySound, SOUND_SLIDE_WHISTLE_OUT) + Call(GotoMapSpecial, Ref("trd_00"), trd_00_ENTRY_5, TRANSITION_END_PEACH_INTERLUDE) + Wait(100) }; //@bug script not properly terminated EvtScript N(EVS_EndPeachChapter3) = { - EVT_SET(LVar0, GB_KKJ_LastPartner) - EVT_CALL(N(RestoreFromPeachState)) - EVT_CALL(PlaySound, SOUND_SLIDE_WHISTLE_OUT) - EVT_CALL(GotoMapSpecial, EVT_PTR("arn_07"), arn_07_ENTRY_3, TRANSITION_END_PEACH_INTERLUDE) - EVT_WAIT(100) + Set(LVar0, GB_KKJ_LastPartner) + Call(N(RestoreFromPeachState)) + Call(PlaySound, SOUND_SLIDE_WHISTLE_OUT) + Call(GotoMapSpecial, Ref("arn_07"), arn_07_ENTRY_3, TRANSITION_END_PEACH_INTERLUDE) + Wait(100) }; //@bug script not properly terminated EvtScript N(EVS_ExitDoor_kkj_11_3) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, kkj_15_ENTRY_0) - EVT_SET(LVar1, COLLIDER_tte) - EVT_SET(LVar2, MODEL_o2) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kkj_11"), kkj_11_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, kkj_15_ENTRY_0) + Set(LVar1, COLLIDER_tte) + Set(LVar2, MODEL_o2) + Set(LVar3, DOOR_SWING_IN) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("kkj_11"), kkj_11_ENTRY_3) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_kkj_11_3)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoor_kkj_11_3)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kkj_15_ENTRY_0) - EVT_SET(LVar2, MODEL_o2) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kkj_15_ENTRY_1) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_CH1_BEGAN_PEACH_MISSION) - EVT_EXEC(N(EVS_EnterRotatingWall)) - EVT_EXEC(N(EVS_SetupChapter1)) - EVT_CASE_EQ(STORY_CH2_BEGAN_PEACH_MISSION) - EVT_EXEC(N(EVS_EnterRotatingWall)) - EVT_EXEC(N(EVS_SetupChapter2)) - EVT_CASE_EQ(STORY_CH3_BEGAN_PEACH_MISSION) - EVT_EXEC(N(EVS_Scene_Chapter3)) - EVT_CASE_DEFAULT - EVT_EXEC(N(EVS_EnterRotatingWall)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_CASE_EQ(kkj_15_ENTRY_2) - EVT_EXEC(N(EVS_Scene_Chapter0_BowserAndKammy)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kkj_15_ENTRY_0) + Set(LVar2, MODEL_o2) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kkj_15_ENTRY_1) + Switch(GB_StoryProgress) + CaseEq(STORY_CH1_BEGAN_PEACH_MISSION) + Exec(N(EVS_EnterRotatingWall)) + Exec(N(EVS_SetupChapter1)) + CaseEq(STORY_CH2_BEGAN_PEACH_MISSION) + Exec(N(EVS_EnterRotatingWall)) + Exec(N(EVS_SetupChapter2)) + CaseEq(STORY_CH3_BEGAN_PEACH_MISSION) + Exec(N(EVS_Scene_Chapter3)) + CaseDefault + Exec(N(EVS_EnterRotatingWall)) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + CaseEq(kkj_15_ENTRY_2) + Exec(N(EVS_Scene_Chapter0_BowserAndKammy)) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PEACHS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kkj_15_ENTRY_2) - EVT_SET(GB_StoryProgress, STORY_CH0_KAMMY_RETURNED_TO_BOWSER) - EVT_END_SWITCH - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_CH0_KAMMY_RETURNED_TO_BOWSER) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(Chapter0NPCs))) - EVT_CASE_EQ(STORY_CH1_BEGAN_PEACH_MISSION) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(Chapter1NPCs))) - EVT_CASE_EQ(STORY_CH3_BEGAN_PEACH_MISSION) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(Chapter3NPCs))) - EVT_END_SWITCH - EVT_IF_NE(GB_StoryProgress, STORY_CH1_BEGAN_PEACH_MISSION) - EVT_CALL(EnableModel, MODEL_o76, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o76, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g25, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetTexPanner, MODEL_o151, TEX_PANNER_0) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_PEACHS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kkj_15_ENTRY_2) + Set(GB_StoryProgress, STORY_CH0_KAMMY_RETURNED_TO_BOWSER) + EndSwitch + Switch(GB_StoryProgress) + CaseEq(STORY_CH0_KAMMY_RETURNED_TO_BOWSER) + Call(MakeNpcs, FALSE, Ref(N(Chapter0NPCs))) + CaseEq(STORY_CH1_BEGAN_PEACH_MISSION) + Call(MakeNpcs, FALSE, Ref(N(Chapter1NPCs))) + CaseEq(STORY_CH3_BEGAN_PEACH_MISSION) + Call(MakeNpcs, FALSE, Ref(N(Chapter3NPCs))) + EndSwitch + IfNe(GB_StoryProgress, STORY_CH1_BEGAN_PEACH_MISSION) + Call(EnableModel, MODEL_o76, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o76, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g25, COLLIDER_FLAGS_UPPER_MASK) + Call(SetTexPanner, MODEL_o151, TEX_PANNER_0) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_0) TEX_PAN_PARAMS_STEP( 0, 0, 40, 900) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetModelCustomGfx, MODEL_o151, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetCustomGfx, CUSTOM_GFX_0, EVT_PTR(N(setup_gfx_candle_lights)), NULL) - EVT_CALL(SetTexPanner, MODEL_o152, TEX_PANNER_0) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetModelCustomGfx, MODEL_o151, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetCustomGfx, CUSTOM_GFX_0, Ref(N(setup_gfx_candle_lights)), NULL) + Call(SetTexPanner, MODEL_o152, TEX_PANNER_0) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_0) TEX_PAN_PARAMS_STEP( 0, 0, 40, 900) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetModelCustomGfx, MODEL_o152, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetCustomGfx, CUSTOM_GFX_0, EVT_PTR(N(setup_gfx_candle_lights)), NULL) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kkj_15_ENTRY_1) - EVT_IF_EQ(GB_StoryProgress, STORY_CH3_BEGAN_PEACH_MISSION) - EVT_CALL(StopSound, SOUND_KKJ_ROTATING_WALL) - EVT_ELSE - EVT_CALL(PlaySoundAt, SOUND_KKJ_ROTATING_WALL, SOUND_SPACE_DEFAULT, 50, 5, -200) - EVT_END_IF - EVT_WAIT(10) - EVT_END_IF - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetModelCustomGfx, MODEL_o152, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetCustomGfx, CUSTOM_GFX_0, Ref(N(setup_gfx_candle_lights)), NULL) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Exec(N(EVS_SetupMusic)) + Call(GetEntryID, LVar0) + IfEq(LVar0, kkj_15_ENTRY_1) + IfEq(GB_StoryProgress, STORY_CH3_BEGAN_PEACH_MISSION) + Call(StopSound, SOUND_KKJ_ROTATING_WALL) + Else + Call(PlaySoundAt, SOUND_KKJ_ROTATING_WALL, SOUND_SPACE_DEFAULT, 50, 5, -200) + EndIf + Wait(10) + EndIf + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_kkj/kkj_15/kkj_15_3_rotating_wall.c b/src/world/area_kkj/kkj_15/kkj_15_3_rotating_wall.c index 4606e5dcd09..dfe436e4c27 100644 --- a/src/world/area_kkj/kkj_15/kkj_15_3_rotating_wall.c +++ b/src/world/area_kkj/kkj_15/kkj_15_3_rotating_wall.c @@ -23,114 +23,114 @@ API_CALLABLE(N(UpdateRotatingPartyPositions)) { } EvtScript N(EVS_AnimateRotatingWall_AlmostCaught) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g22, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o96, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(GetPlayerPos, LVar7, LVar0, LVar8) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar9, LVar0, LVarA) - EVT_THREAD - EVT_WAIT(180 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LookAround) - EVT_END_THREAD - EVT_CALL(PlaySoundAt, SOUND_KKJ_ROTATING_WALL, SOUND_SPACE_DEFAULT, 50, 5, -200) - EVT_CALL(MakeLerp, 0, -1800, 360 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, LVar0) - EVT_DIVF(LVar2, 10) - EVT_CALL(RotateGroup, MODEL_g28, LVar2, 0, 1, 0) - EVT_CALL(N(UpdateRotatingPartyPositions)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(StopSound, SOUND_KKJ_ROTATING_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_g25, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o1, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g22, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o96, COLLIDER_FLAGS_UPPER_MASK) + Call(GetPlayerPos, LVar7, LVar0, LVar8) + Call(GetNpcPos, NPC_PARTNER, LVar9, LVar0, LVarA) + Thread + Wait(180 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_LookAround) + EndThread + Call(PlaySoundAt, SOUND_KKJ_ROTATING_WALL, SOUND_SPACE_DEFAULT, 50, 5, -200) + Call(MakeLerp, 0, -1800, 360 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, LVar0) + DivF(LVar2, 10) + Call(RotateGroup, MODEL_g28, LVar2, 0, 1, 0) + Call(N(UpdateRotatingPartyPositions)) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(StopSound, SOUND_KKJ_ROTATING_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_g25, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o1, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_AnimateRotatingWall_Default) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g22, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o96, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(GetPlayerPos, LVar7, LVar0, LVar8) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar9, LVar0, LVarA) - EVT_CALL(MakeLerp, -1350, -1800, 90 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, LVar0) - EVT_DIVF(LVar2, 10) - EVT_CALL(RotateGroup, MODEL_g28, LVar2, 0, 1, 0) - EVT_CALL(N(UpdateRotatingPartyPositions)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(StopSound, SOUND_KKJ_ROTATING_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_g25, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o1, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g22, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o96, COLLIDER_FLAGS_UPPER_MASK) + Call(GetPlayerPos, LVar7, LVar0, LVar8) + Call(GetNpcPos, NPC_PARTNER, LVar9, LVar0, LVarA) + Call(MakeLerp, -1350, -1800, 90 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, LVar0) + DivF(LVar2, 10) + Call(RotateGroup, MODEL_g28, LVar2, 0, 1, 0) + Call(N(UpdateRotatingPartyPositions)) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(StopSound, SOUND_KKJ_ROTATING_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_g25, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o1, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_RotatingWall_Default) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 50, 10, -35) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 400) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 50, 10, -35) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_EXEC_WAIT(N(EVS_AnimateRotatingWall_Default)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, 50, 10, -35) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamDistance, CAM_DEFAULT, 400) + Call(SetPanTarget, CAM_DEFAULT, 50, 10, -35) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + ExecWait(N(EVS_AnimateRotatingWall_Default)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Return + End }; // used during chapter 1, adds an extra camera move and a remark by twink EvtScript N(EVS_RotatingWall_FirstTime) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 50, 10, -35) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 50, 35, -35) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 200) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_CALL(SetPanTarget, CAM_DEFAULT, 50, 10, -35) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 400) + Call(UseSettingsFrom, CAM_DEFAULT, 50, 10, -35) + Call(SetPanTarget, CAM_DEFAULT, 50, 35, -35) + Call(SetCamDistance, CAM_DEFAULT, 200) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Call(SetPanTarget, CAM_DEFAULT, 50, 10, -35) + Call(SetCamDistance, CAM_DEFAULT, 400) #if VERSION_PAL - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.961)) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.961)) #else - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.8 / DT)) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.8 / DT)) #endif - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_EXEC_WAIT(N(EVS_AnimateRotatingWall_Default)) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0049) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_RETURN - EVT_END + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndThread + ExecWait(N(EVS_AnimateRotatingWall_Default)) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0049) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Return + End }; EvtScript N(EVS_EnterRotatingWall) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetPlayerPos, 50, 10, -250) - EVT_CALL(SetNpcPos, NPC_PARTNER, 10, 30, -250) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_CH1_BEGAN_PEACH_MISSION) - EVT_EXEC_WAIT(N(EVS_RotatingWall_FirstTime)) - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(N(EVS_RotatingWall_Default)) - EVT_END_SWITCH - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Call(SetPlayerPos, 50, 10, -250) + Call(SetNpcPos, NPC_PARTNER, 10, 30, -250) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(InterpPlayerYaw, 270, 0) + Switch(GB_StoryProgress) + CaseEq(STORY_CH1_BEGAN_PEACH_MISSION) + ExecWait(N(EVS_RotatingWall_FirstTime)) + CaseDefault + ExecWait(N(EVS_RotatingWall_Default)) + EndSwitch + Call(EnablePartnerAI) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_kkj/kkj_15/kkj_15_4_chapter0.c b/src/world/area_kkj/kkj_15/kkj_15_4_chapter0.c index 125fec80fc4..df0ddcd3b50 100644 --- a/src/world/area_kkj/kkj_15/kkj_15_4_chapter0.c +++ b/src/world/area_kkj/kkj_15/kkj_15_4_chapter0.c @@ -15,399 +15,399 @@ API_CALLABLE(N(SetLightSourcePos)) { } EvtScript N(EVS_PlaySounds_KoopaBrosShowOff) = { - EVT_LOOP(0) - EVT_CALL(PlaySoundAt, SOUND_LARGE_LENS_FLARE, SOUND_SPACE_DEFAULT, 100, 0, -40) - EVT_WAIT(30) - EVT_CALL(PlaySoundAt, SOUND_KOOPA_BROS_TOWER_SPIN_3, SOUND_SPACE_DEFAULT, 100, 0, -40) - EVT_WAIT(60) - EVT_CALL(PlaySoundAt, SOUND_KOOPA_LAUNCH_SHELL, SOUND_SPACE_DEFAULT, 100, 0, -40) - EVT_WAIT(30) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(PlaySoundAt, SOUND_LARGE_LENS_FLARE, SOUND_SPACE_DEFAULT, 100, 0, -40) + Wait(30) + Call(PlaySoundAt, SOUND_KOOPA_BROS_TOWER_SPIN_3, SOUND_SPACE_DEFAULT, 100, 0, -40) + Wait(60) + Call(PlaySoundAt, SOUND_KOOPA_LAUNCH_SHELL, SOUND_SPACE_DEFAULT, 100, 0, -40) + Wait(30) + EndLoop + Return + End }; EvtScript N(EVS_FocusCam_WholeRoom) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 30, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 30, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, 30, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 30, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-11.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_FocusCam_BowserWide) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -50, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -50, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-13.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, -50, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, -50, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-13.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_FocusCam_KoopaBros) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 115, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 115, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(240.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, 115, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 115, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(240.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-11.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Return + End }; EvtScript N(EVS_OpenDoor_Ch0) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_tte, SOUND_BASIC_DOOR_OPEN, 0) - EVT_CALL(MakeLerp, 0, 120, 14, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o2, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_tte, SOUND_BASIC_DOOR_OPEN, 0) + Call(MakeLerp, 0, 120, 14, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o2, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_CloseDoor_Ch0) = { - EVT_CALL(MakeLerp, 120, 0, 8, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o2, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_tte, SOUND_BASIC_DOOR_CLOSE, 0) - EVT_RETURN - EVT_END + Call(MakeLerp, 120, 0, 8, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o2, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_tte, SOUND_BASIC_DOOR_CLOSE, 0) + Return + End }; EvtScript N(EVS_Scene_Chapter0_BowserAndKammy) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetMusicTrack, 0, SONG_BOWSER_THEME, 0, 8) - EVT_CALL(SetNpcPos, NPC_Bowser, -70, 0, -55) - EVT_CALL(InterpNpcYaw, NPC_Bowser, 90, 0) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 237, 0, -74) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 237, 0, -74) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(30 * DT) - EVT_EXEC(N(EVS_OpenDoor_Ch0)) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcPos, NPC_Kammy, 270, 0, -78) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim02) - EVT_CALL(SetNpcSpeed, NPC_Kammy, EVT_FLOAT(3.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Kammy, 180, -55, 0) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) - EVT_EXEC_WAIT(N(EVS_CloseDoor_Ch0)) - EVT_CALL(SpeakToNpc, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, NPC_Bowser, MSG_Peach_CH1_KoopaBros_0000) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim02) - EVT_CALL(SetNpcSpeed, NPC_Kammy, EVT_FLOAT(3.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Kammy, 0, -55, 0) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) - EVT_END_THREAD - EVT_WAIT(20 * DT) - EVT_EXEC_WAIT(N(EVS_FocusCam_BowserWide)) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_Kammy, MSG_Peach_CH1_KoopaBros_0001) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -20, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(225.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-13.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0 / DT)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToNpc, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, NPC_Bowser, MSG_Peach_CH1_KoopaBros_0002) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -50, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-17.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Brandish) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_BrandishTalk, ANIM_WorldBowser_BrandishIdle, 0, NPC_Kammy, MSG_Peach_CH1_KoopaBros_0003) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) - EVT_WAIT(15 * DT) - EVT_CALL(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_Kammy, MSG_Peach_CH1_KoopaBros_0004) - EVT_EXEC_WAIT(N(EVS_FocusCam_BowserWide)) - EVT_CALL(SpeakToNpc, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, NPC_Bowser, MSG_Peach_CH1_KoopaBros_0005) - EVT_CALL(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_Kammy, MSG_Peach_CH1_KoopaBros_0006) - EVT_CALL(FadeOutMusic, 0, 2000) - EVT_CALL(ShowMessageAtScreenPos, MSG_Peach_CH1_KoopaBros_0007, 300, 20) - EVT_WAIT(5 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Bowser, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_Bowser, EMOTE_EXCLAMATION, -45, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(PlaySoundAtNpc, NPC_Kammy, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_Kammy, EMOTE_EXCLAMATION, -45, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(20 * DT) - EVT_THREAD - EVT_LOOP(2) - EVT_CALL(InterpNpcYaw, NPC_Kammy, 90, 7 * DT) - EVT_WAIT(5 * DT) - EVT_CALL(InterpNpcYaw, NPC_Kammy, 270, 7 * DT) - EVT_WAIT(5 * DT) - EVT_END_LOOP - EVT_CALL(InterpNpcYaw, NPC_Kammy, 90, 7 * DT) - EVT_END_THREAD - EVT_WAIT(5 * DT) - EVT_THREAD - EVT_LOOP(2) - EVT_CALL(InterpNpcYaw, NPC_Bowser, 270, 7 * DT) - EVT_WAIT(5 * DT) - EVT_CALL(InterpNpcYaw, NPC_Bowser, 90, 7 * DT) - EVT_WAIT(5 * DT) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(50 * DT) - EVT_EXEC_WAIT(N(EVS_FocusCam_WholeRoom)) - EVT_WAIT(20 * DT) - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_BROS_THEME, 0, 8) - EVT_CALL(ShowMessageAtScreenPos, MSG_Peach_CH1_KoopaBros_0008, 300, 20) - EVT_WAIT(20 * DT) - EVT_THREAD - EVT_CALL(SetNpcPos, NPC_KoopaBros_02, 300, 180, -60) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Red_Land) - EVT_CALL(EnableNpcBlur, NPC_KoopaBros_02, TRUE) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBros_02, EVT_FLOAT(0.5)) - EVT_CALL(SetNpcFlagBits, NPC_KoopaBros_02, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_KoopaBros_02, NPC_FLAG_FLYING, FALSE) - EVT_CALL(NpcMoveTo, NPC_KoopaBros_02, 100, -40, 18) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaBros_02, SOUND_KOOPA_BROS_LAND, SOUND_PARAM_MUTE) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, 100, 0, -40, 0) - EVT_CALL(EnableNpcBlur, NPC_KoopaBros_02, FALSE) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Red_IdleCrouch) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetNpcPos, NPC_KoopaBros_01, 328, 180, -15) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Black_Land) - EVT_CALL(EnableNpcBlur, NPC_KoopaBros_01, TRUE) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBros_01, EVT_FLOAT(0.5)) - EVT_CALL(SetNpcFlagBits, NPC_KoopaBros_01, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_KoopaBros_01, NPC_FLAG_FLYING, FALSE) - EVT_CALL(NpcMoveTo, NPC_KoopaBros_01, 128, -15, 18) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaBros_01, SOUND_KOOPA_BROS_LAND, SOUND_PARAM_MUTE) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, 128, 0, -15, 0) - EVT_CALL(EnableNpcBlur, NPC_KoopaBros_01, FALSE) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Black_IdleCrouch) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetNpcPos, NPC_KoopaBros_03, 340, 180, -90) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_03, ANIM_KoopaBros_Yellow_Land) - EVT_CALL(EnableNpcBlur, NPC_KoopaBros_03, TRUE) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBros_03, EVT_FLOAT(0.5)) - EVT_CALL(SetNpcFlagBits, NPC_KoopaBros_03, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_KoopaBros_03, NPC_FLAG_FLYING, FALSE) - EVT_CALL(NpcMoveTo, NPC_KoopaBros_03, 140, -90, 18) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaBros_03, SOUND_KOOPA_BROS_LAND, SOUND_PARAM_MUTE) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, 140, 0, -90, 0) - EVT_CALL(EnableNpcBlur, NPC_KoopaBros_03, FALSE) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_03, ANIM_KoopaBros_Yellow_IdleCrouch) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(SetNpcPos, NPC_KoopaBros_04, 368, 180, -45) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_04, ANIM_KoopaBros_Green_Land) - EVT_CALL(EnableNpcBlur, NPC_KoopaBros_04, TRUE) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBros_04, EVT_FLOAT(0.5)) - EVT_CALL(SetNpcFlagBits, NPC_KoopaBros_04, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_KoopaBros_04, NPC_FLAG_FLYING, FALSE) - EVT_CALL(NpcMoveTo, NPC_KoopaBros_04, 168, -45, 18) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaBros_04, SOUND_KOOPA_BROS_LAND, SOUND_PARAM_MUTE) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, 168, 0, -45, 0) - EVT_CALL(EnableNpcBlur, NPC_KoopaBros_04, FALSE) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_04, ANIM_KoopaBros_Green_IdleCrouch) - EVT_END_THREAD - EVT_WAIT(50) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 128, 0, -15) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 128, 0, -15) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(240.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(15) - EVT_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_KoopaBros_02, SOUND_SMALL_LENS_FLARE, SOUND_SPACE_DEFAULT) - EVT_CALL(GetNpcPos, NPC_KoopaBros_02, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_ADD(LVar1, 30) - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 40) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Red_ThumbsUp) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaBros_01, SOUND_SMALL_LENS_FLARE, SOUND_SPACE_DEFAULT) - EVT_CALL(GetNpcPos, NPC_KoopaBros_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_ADD(LVar1, 30) - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 40) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Black_ThumbsUp) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaBros_03, SOUND_SMALL_LENS_FLARE, SOUND_SPACE_DEFAULT) - EVT_CALL(GetNpcPos, NPC_KoopaBros_03, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_ADD(LVar1, 30) - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 40) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_03, ANIM_KoopaBros_Yellow_ThumbsUp) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaBros_04, SOUND_SMALL_LENS_FLARE, SOUND_SPACE_DEFAULT) - EVT_CALL(GetNpcPos, NPC_KoopaBros_04, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_ADD(LVar1, 30) - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 40) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_04, ANIM_KoopaBros_Green_ThumbsUp) - EVT_END_THREAD - EVT_WAIT(45) - EVT_CALL(SpeakToNpc, NPC_KoopaBros_02, ANIM_KoopaBros_Red_ThumbsUp, ANIM_KoopaBros_Red_ThumbsUp, 0, NPC_Bowser, MSG_Peach_CH1_KoopaBros_0009) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_FocusCam_BowserWide)) - EVT_WAIT(15 * DT) - EVT_CALL(InterpNpcYaw, NPC_Kammy, 270, 0) - EVT_CALL(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_Kammy, MSG_Peach_CH1_KoopaBros_000A) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Red_Idle) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Black_Idle) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_03, ANIM_KoopaBros_Yellow_Idle) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_04, ANIM_KoopaBros_Green_Idle) - EVT_EXEC_WAIT(N(EVS_FocusCam_KoopaBros)) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Red_Walk) - EVT_CALL(NpcMoveTo, NPC_KoopaBros_02, 80, -40, 10) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Red_Idle) - EVT_CALL(SpeakToNpc, NPC_KoopaBros_02, ANIM_KoopaBros_Red_Talk, ANIM_KoopaBros_Red_Idle, 0, NPC_Bowser, MSG_Peach_CH1_KoopaBros_000B) - EVT_EXEC_WAIT(N(EVS_FocusCam_WholeRoom)) - EVT_CALL(SetNpcPos, NPC_KoopaBros_02, 80, 0, -40) - EVT_CALL(InterpNpcYaw, NPC_Kammy, 90, 5) - EVT_CALL(SpeakToNpc, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, NPC_KoopaBros_01, MSG_Peach_CH1_KoopaBros_000C) - EVT_CALL(SpeakToNpc, NPC_KoopaBros_02, ANIM_KoopaBros_Red_Talk, ANIM_KoopaBros_Red_Idle, 0, NPC_Bowser, MSG_Peach_CH1_KoopaBros_000D) - EVT_CALL(InterpNpcYaw, NPC_KoopaBros_02, 90, 5) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_KoopaBros_02, ANIM_KoopaBros_Red_Talk, ANIM_KoopaBros_Red_Idle, 5, MSG_Peach_CH1_KoopaBros_000E) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -50, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -50, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(200.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-18.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.2 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(40 * DT) - EVT_EXEC_GET_TID(N(EVS_PlaySounds_KoopaBrosShowOff), LVarB) - EVT_CALL(N(SetLightSourcePos), 100, 0, -40) - EVT_CALL(EnableSpriteShading, TRUE) - EVT_PLAY_EFFECT(EFFECT_LIGHT_RAYS, 3, 100, 0, -40, 1, LVarA) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_KoopaBros_01, MSG_Peach_CH1_KoopaBros_000F) - EVT_WAIT(20 * DT) - EVT_KILL_THREAD(LVarB) - EVT_CALL(DismissEffect, LVarA) - EVT_CALL(EnableSpriteShading, FALSE) - EVT_WAIT(30 * DT) - EVT_EXEC_WAIT(N(EVS_FocusCam_KoopaBros)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToNpc, NPC_KoopaBros_02, ANIM_KoopaBros_Red_Talk, ANIM_KoopaBros_Red_Idle, 0, NPC_Bowser, MSG_Peach_CH1_KoopaBros_0010) - EVT_EXEC_WAIT(N(EVS_FocusCam_WholeRoom)) - EVT_CALL(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_KoopaBros_01, MSG_Peach_CH1_KoopaBros_0011) - EVT_CALL(SpeakToNpc, NPC_KoopaBros_02, ANIM_KoopaBros_Red_Talk, ANIM_KoopaBros_Red_Idle, 0, NPC_Bowser, MSG_Peach_CH1_KoopaBros_0012) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -50, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-17.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_KoopaBros_01, MSG_Peach_CH1_KoopaBros_0013) - EVT_EXEC_WAIT(N(EVS_FocusCam_KoopaBros)) - EVT_WAIT(10 * DT) - EVT_CALL(FadeOutMusic, 0, 500) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaBros_03, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_KoopaBros_03, EMOTE_EXCLAMATION, -45, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaBros_02, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_KoopaBros_02, EMOTE_EXCLAMATION, -45, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaBros_04, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_KoopaBros_04, EMOTE_EXCLAMATION, -45, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaBros_01, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_KoopaBros_01, EMOTE_EXCLAMATION, -45, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToNpc, NPC_KoopaBros_02, ANIM_KoopaBros_Red_Talk, ANIM_KoopaBros_Red_Idle, 0, NPC_Bowser, MSG_Peach_CH1_KoopaBros_0014) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 30, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 400) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0 / DT)) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Red_HurtStill) - EVT_CALL(NpcJump0, NPC_KoopaBros_02, 80, 0, -40, 10 * DT) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Red_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Black_HurtStill) - EVT_CALL(NpcJump0, NPC_KoopaBros_01, 128, 0, -15, 10 * DT) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Black_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_03, ANIM_KoopaBros_Yellow_HurtStill) - EVT_CALL(NpcJump0, NPC_KoopaBros_03, 140, 0, -90, 10 * DT) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_03, ANIM_KoopaBros_Yellow_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_04, ANIM_KoopaBros_Green_HurtStill) - EVT_CALL(NpcJump0, NPC_KoopaBros_04, 168, 0, -45, 10 * DT) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_04, ANIM_KoopaBros_Green_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_KoopaBros_02, MSG_Peach_CH1_KoopaBros_0015) - EVT_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_KoopaBros_02, SOUND_RUN_AWAY_BUILDUP, SOUND_SPACE_DEFAULT) - EVT_CALL(InterpNpcYaw, NPC_KoopaBros_02, 90, 0) - EVT_CALL(EnableNpcBlur, NPC_KoopaBros_02, TRUE) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Red_Run) - EVT_WAIT(30 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaBros_02, SOUND_RUN_AWAY, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcMoveTo, NPC_KoopaBros_02, 200, -60, 10 * DT) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(InterpNpcYaw, NPC_KoopaBros_01, 90, 0) - EVT_CALL(EnableNpcBlur, NPC_KoopaBros_01, TRUE) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Black_Run) - EVT_WAIT(30 * DT) - EVT_CALL(EnableNpcBlur, NPC_KoopaBros_01, TRUE) - EVT_CALL(NpcMoveTo, NPC_KoopaBros_01, 200, -60, 10 * DT) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(InterpNpcYaw, NPC_KoopaBros_03, 90, 0) - EVT_CALL(EnableNpcBlur, NPC_KoopaBros_03, TRUE) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_03, ANIM_KoopaBros_Yellow_Run) - EVT_WAIT(30 * DT) - EVT_CALL(EnableNpcBlur, NPC_KoopaBros_03, TRUE) - EVT_CALL(NpcMoveTo, NPC_KoopaBros_03, 200, -60, 10 * DT) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(InterpNpcYaw, NPC_KoopaBros_04, 90, 0) - EVT_CALL(EnableNpcBlur, NPC_KoopaBros_04, TRUE) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_04, ANIM_KoopaBros_Green_Run) - EVT_WAIT(30 * DT) - EVT_CALL(EnableNpcBlur, NPC_KoopaBros_04, TRUE) - EVT_CALL(NpcMoveTo, NPC_KoopaBros_04, 200, -60, 10 * DT) - EVT_END_THREAD - EVT_WAIT(30 * DT) - EVT_EXEC_WAIT(N(EVS_EndPeachChapter0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetMusicTrack, 0, SONG_BOWSER_THEME, 0, 8) + Call(SetNpcPos, NPC_Bowser, -70, 0, -55) + Call(InterpNpcYaw, NPC_Bowser, 90, 0) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) + Call(UseSettingsFrom, CAM_DEFAULT, 237, 0, -74) + Call(SetPanTarget, CAM_DEFAULT, 237, 0, -74) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(30 * DT) + Exec(N(EVS_OpenDoor_Ch0)) + Wait(10 * DT) + Call(SetNpcPos, NPC_Kammy, 270, 0, -78) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim02) + Call(SetNpcSpeed, NPC_Kammy, Float(3.0 / DT)) + Call(NpcMoveTo, NPC_Kammy, 180, -55, 0) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) + ExecWait(N(EVS_CloseDoor_Ch0)) + Call(SpeakToNpc, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, NPC_Bowser, MSG_Peach_CH1_KoopaBros_0000) + Thread + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim02) + Call(SetNpcSpeed, NPC_Kammy, Float(3.0 / DT)) + Call(NpcMoveTo, NPC_Kammy, 0, -55, 0) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) + EndThread + Wait(20 * DT) + ExecWait(N(EVS_FocusCam_BowserWide)) + Wait(20 * DT) + Call(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_Kammy, MSG_Peach_CH1_KoopaBros_0001) + Call(SetPanTarget, CAM_DEFAULT, -20, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(225.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-13.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0 / DT)) + Wait(10 * DT) + Call(SpeakToNpc, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, NPC_Bowser, MSG_Peach_CH1_KoopaBros_0002) + Call(SetPanTarget, CAM_DEFAULT, -50, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(250.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-17.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Brandish) + Wait(10 * DT) + Call(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_BrandishTalk, ANIM_WorldBowser_BrandishIdle, 0, NPC_Kammy, MSG_Peach_CH1_KoopaBros_0003) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) + Wait(15 * DT) + Call(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_Kammy, MSG_Peach_CH1_KoopaBros_0004) + ExecWait(N(EVS_FocusCam_BowserWide)) + Call(SpeakToNpc, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, NPC_Bowser, MSG_Peach_CH1_KoopaBros_0005) + Call(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_Kammy, MSG_Peach_CH1_KoopaBros_0006) + Call(FadeOutMusic, 0, 2000) + Call(ShowMessageAtScreenPos, MSG_Peach_CH1_KoopaBros_0007, 300, 20) + Wait(5 * DT) + Call(PlaySoundAtNpc, NPC_Bowser, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_Bowser, EMOTE_EXCLAMATION, -45, 20, EMOTER_NPC, 0, 0, 0, 0) + Call(PlaySoundAtNpc, NPC_Kammy, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_Kammy, EMOTE_EXCLAMATION, -45, 20, EMOTER_NPC, 0, 0, 0, 0) + Wait(20 * DT) + Thread + Loop(2) + Call(InterpNpcYaw, NPC_Kammy, 90, 7 * DT) + Wait(5 * DT) + Call(InterpNpcYaw, NPC_Kammy, 270, 7 * DT) + Wait(5 * DT) + EndLoop + Call(InterpNpcYaw, NPC_Kammy, 90, 7 * DT) + EndThread + Wait(5 * DT) + Thread + Loop(2) + Call(InterpNpcYaw, NPC_Bowser, 270, 7 * DT) + Wait(5 * DT) + Call(InterpNpcYaw, NPC_Bowser, 90, 7 * DT) + Wait(5 * DT) + EndLoop + EndThread + Wait(50 * DT) + ExecWait(N(EVS_FocusCam_WholeRoom)) + Wait(20 * DT) + Call(SetMusicTrack, 0, SONG_KOOPA_BROS_THEME, 0, 8) + Call(ShowMessageAtScreenPos, MSG_Peach_CH1_KoopaBros_0008, 300, 20) + Wait(20 * DT) + Thread + Call(SetNpcPos, NPC_KoopaBros_02, 300, 180, -60) + Call(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Red_Land) + Call(EnableNpcBlur, NPC_KoopaBros_02, TRUE) + Call(SetNpcJumpscale, NPC_KoopaBros_02, Float(0.5)) + Call(SetNpcFlagBits, NPC_KoopaBros_02, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcFlagBits, NPC_KoopaBros_02, NPC_FLAG_FLYING, FALSE) + Call(NpcMoveTo, NPC_KoopaBros_02, 100, -40, 18) + Call(PlaySoundAtNpc, NPC_KoopaBros_02, SOUND_KOOPA_BROS_LAND, SOUND_PARAM_MUTE) + PlayEffect(EFFECT_LANDING_DUST, 1, 100, 0, -40, 0) + Call(EnableNpcBlur, NPC_KoopaBros_02, FALSE) + Call(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Red_IdleCrouch) + EndThread + Thread + Wait(5) + Call(SetNpcPos, NPC_KoopaBros_01, 328, 180, -15) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Black_Land) + Call(EnableNpcBlur, NPC_KoopaBros_01, TRUE) + Call(SetNpcJumpscale, NPC_KoopaBros_01, Float(0.5)) + Call(SetNpcFlagBits, NPC_KoopaBros_01, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcFlagBits, NPC_KoopaBros_01, NPC_FLAG_FLYING, FALSE) + Call(NpcMoveTo, NPC_KoopaBros_01, 128, -15, 18) + Call(PlaySoundAtNpc, NPC_KoopaBros_01, SOUND_KOOPA_BROS_LAND, SOUND_PARAM_MUTE) + PlayEffect(EFFECT_LANDING_DUST, 1, 128, 0, -15, 0) + Call(EnableNpcBlur, NPC_KoopaBros_01, FALSE) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Black_IdleCrouch) + EndThread + Thread + Wait(10) + Call(SetNpcPos, NPC_KoopaBros_03, 340, 180, -90) + Call(SetNpcAnimation, NPC_KoopaBros_03, ANIM_KoopaBros_Yellow_Land) + Call(EnableNpcBlur, NPC_KoopaBros_03, TRUE) + Call(SetNpcJumpscale, NPC_KoopaBros_03, Float(0.5)) + Call(SetNpcFlagBits, NPC_KoopaBros_03, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcFlagBits, NPC_KoopaBros_03, NPC_FLAG_FLYING, FALSE) + Call(NpcMoveTo, NPC_KoopaBros_03, 140, -90, 18) + Call(PlaySoundAtNpc, NPC_KoopaBros_03, SOUND_KOOPA_BROS_LAND, SOUND_PARAM_MUTE) + PlayEffect(EFFECT_LANDING_DUST, 1, 140, 0, -90, 0) + Call(EnableNpcBlur, NPC_KoopaBros_03, FALSE) + Call(SetNpcAnimation, NPC_KoopaBros_03, ANIM_KoopaBros_Yellow_IdleCrouch) + EndThread + Thread + Wait(15) + Call(SetNpcPos, NPC_KoopaBros_04, 368, 180, -45) + Call(SetNpcAnimation, NPC_KoopaBros_04, ANIM_KoopaBros_Green_Land) + Call(EnableNpcBlur, NPC_KoopaBros_04, TRUE) + Call(SetNpcJumpscale, NPC_KoopaBros_04, Float(0.5)) + Call(SetNpcFlagBits, NPC_KoopaBros_04, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcFlagBits, NPC_KoopaBros_04, NPC_FLAG_FLYING, FALSE) + Call(NpcMoveTo, NPC_KoopaBros_04, 168, -45, 18) + Call(PlaySoundAtNpc, NPC_KoopaBros_04, SOUND_KOOPA_BROS_LAND, SOUND_PARAM_MUTE) + PlayEffect(EFFECT_LANDING_DUST, 1, 168, 0, -45, 0) + Call(EnableNpcBlur, NPC_KoopaBros_04, FALSE) + Call(SetNpcAnimation, NPC_KoopaBros_04, ANIM_KoopaBros_Green_IdleCrouch) + EndThread + Wait(50) + Call(UseSettingsFrom, CAM_DEFAULT, 128, 0, -15) + Call(SetPanTarget, CAM_DEFAULT, 128, 0, -15) + Call(SetCamDistance, CAM_DEFAULT, Float(240.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-11.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(15) + Thread + Call(PlaySoundAtNpc, NPC_KoopaBros_02, SOUND_SMALL_LENS_FLARE, SOUND_SPACE_DEFAULT) + Call(GetNpcPos, NPC_KoopaBros_02, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Add(LVar1, 30) + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 40) + Call(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Red_ThumbsUp) + EndThread + Thread + Wait(5) + Call(PlaySoundAtNpc, NPC_KoopaBros_01, SOUND_SMALL_LENS_FLARE, SOUND_SPACE_DEFAULT) + Call(GetNpcPos, NPC_KoopaBros_01, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Add(LVar1, 30) + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 40) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Black_ThumbsUp) + EndThread + Thread + Wait(10) + Call(PlaySoundAtNpc, NPC_KoopaBros_03, SOUND_SMALL_LENS_FLARE, SOUND_SPACE_DEFAULT) + Call(GetNpcPos, NPC_KoopaBros_03, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Add(LVar1, 30) + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 40) + Call(SetNpcAnimation, NPC_KoopaBros_03, ANIM_KoopaBros_Yellow_ThumbsUp) + EndThread + Thread + Wait(15) + Call(PlaySoundAtNpc, NPC_KoopaBros_04, SOUND_SMALL_LENS_FLARE, SOUND_SPACE_DEFAULT) + Call(GetNpcPos, NPC_KoopaBros_04, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Add(LVar1, 30) + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 40) + Call(SetNpcAnimation, NPC_KoopaBros_04, ANIM_KoopaBros_Green_ThumbsUp) + EndThread + Wait(45) + Call(SpeakToNpc, NPC_KoopaBros_02, ANIM_KoopaBros_Red_ThumbsUp, ANIM_KoopaBros_Red_ThumbsUp, 0, NPC_Bowser, MSG_Peach_CH1_KoopaBros_0009) + Wait(10) + ExecWait(N(EVS_FocusCam_BowserWide)) + Wait(15 * DT) + Call(InterpNpcYaw, NPC_Kammy, 270, 0) + Call(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_Kammy, MSG_Peach_CH1_KoopaBros_000A) + Call(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Red_Idle) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Black_Idle) + Call(SetNpcAnimation, NPC_KoopaBros_03, ANIM_KoopaBros_Yellow_Idle) + Call(SetNpcAnimation, NPC_KoopaBros_04, ANIM_KoopaBros_Green_Idle) + ExecWait(N(EVS_FocusCam_KoopaBros)) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Red_Walk) + Call(NpcMoveTo, NPC_KoopaBros_02, 80, -40, 10) + Call(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Red_Idle) + Call(SpeakToNpc, NPC_KoopaBros_02, ANIM_KoopaBros_Red_Talk, ANIM_KoopaBros_Red_Idle, 0, NPC_Bowser, MSG_Peach_CH1_KoopaBros_000B) + ExecWait(N(EVS_FocusCam_WholeRoom)) + Call(SetNpcPos, NPC_KoopaBros_02, 80, 0, -40) + Call(InterpNpcYaw, NPC_Kammy, 90, 5) + Call(SpeakToNpc, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, NPC_KoopaBros_01, MSG_Peach_CH1_KoopaBros_000C) + Call(SpeakToNpc, NPC_KoopaBros_02, ANIM_KoopaBros_Red_Talk, ANIM_KoopaBros_Red_Idle, 0, NPC_Bowser, MSG_Peach_CH1_KoopaBros_000D) + Call(InterpNpcYaw, NPC_KoopaBros_02, 90, 5) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_KoopaBros_02, ANIM_KoopaBros_Red_Talk, ANIM_KoopaBros_Red_Idle, 5, MSG_Peach_CH1_KoopaBros_000E) + Call(UseSettingsFrom, CAM_DEFAULT, -50, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, -50, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(200.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-18.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.2 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(40 * DT) + ExecGetTID(N(EVS_PlaySounds_KoopaBrosShowOff), LVarB) + Call(N(SetLightSourcePos), 100, 0, -40) + Call(EnableSpriteShading, TRUE) + PlayEffect(EFFECT_LIGHT_RAYS, 3, 100, 0, -40, 1, LVarA) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_KoopaBros_01, MSG_Peach_CH1_KoopaBros_000F) + Wait(20 * DT) + KillThread(LVarB) + Call(DismissEffect, LVarA) + Call(EnableSpriteShading, FALSE) + Wait(30 * DT) + ExecWait(N(EVS_FocusCam_KoopaBros)) + Wait(10 * DT) + Call(SpeakToNpc, NPC_KoopaBros_02, ANIM_KoopaBros_Red_Talk, ANIM_KoopaBros_Red_Idle, 0, NPC_Bowser, MSG_Peach_CH1_KoopaBros_0010) + ExecWait(N(EVS_FocusCam_WholeRoom)) + Call(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_KoopaBros_01, MSG_Peach_CH1_KoopaBros_0011) + Call(SpeakToNpc, NPC_KoopaBros_02, ANIM_KoopaBros_Red_Talk, ANIM_KoopaBros_Red_Idle, 0, NPC_Bowser, MSG_Peach_CH1_KoopaBros_0012) + Call(SetPanTarget, CAM_DEFAULT, -50, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(250.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-17.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Wait(10 * DT) + Call(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_KoopaBros_01, MSG_Peach_CH1_KoopaBros_0013) + ExecWait(N(EVS_FocusCam_KoopaBros)) + Wait(10 * DT) + Call(FadeOutMusic, 0, 500) + Call(PlaySoundAtNpc, NPC_KoopaBros_03, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_KoopaBros_03, EMOTE_EXCLAMATION, -45, 20, EMOTER_NPC, 0, 0, 0, 0) + Call(PlaySoundAtNpc, NPC_KoopaBros_02, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_KoopaBros_02, EMOTE_EXCLAMATION, -45, 20, EMOTER_NPC, 0, 0, 0, 0) + Call(PlaySoundAtNpc, NPC_KoopaBros_04, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_KoopaBros_04, EMOTE_EXCLAMATION, -45, 20, EMOTER_NPC, 0, 0, 0, 0) + Call(PlaySoundAtNpc, NPC_KoopaBros_01, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_KoopaBros_01, EMOTE_EXCLAMATION, -45, 20, EMOTER_NPC, 0, 0, 0, 0) + Wait(30 * DT) + Call(SpeakToNpc, NPC_KoopaBros_02, ANIM_KoopaBros_Red_Talk, ANIM_KoopaBros_Red_Idle, 0, NPC_Bowser, MSG_Peach_CH1_KoopaBros_0014) + Call(SetPanTarget, CAM_DEFAULT, 30, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, 400) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-11.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0 / DT)) + Thread + Call(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Red_HurtStill) + Call(NpcJump0, NPC_KoopaBros_02, 80, 0, -40, 10 * DT) + Call(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Red_Idle) + EndThread + Thread + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Black_HurtStill) + Call(NpcJump0, NPC_KoopaBros_01, 128, 0, -15, 10 * DT) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Black_Idle) + EndThread + Thread + Call(SetNpcAnimation, NPC_KoopaBros_03, ANIM_KoopaBros_Yellow_HurtStill) + Call(NpcJump0, NPC_KoopaBros_03, 140, 0, -90, 10 * DT) + Call(SetNpcAnimation, NPC_KoopaBros_03, ANIM_KoopaBros_Yellow_Idle) + EndThread + Thread + Call(SetNpcAnimation, NPC_KoopaBros_04, ANIM_KoopaBros_Green_HurtStill) + Call(NpcJump0, NPC_KoopaBros_04, 168, 0, -45, 10 * DT) + Call(SetNpcAnimation, NPC_KoopaBros_04, ANIM_KoopaBros_Green_Idle) + EndThread + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 30, Float(1.0)) + EndThread + Call(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_KoopaBros_02, MSG_Peach_CH1_KoopaBros_0015) + Thread + Call(PlaySoundAtNpc, NPC_KoopaBros_02, SOUND_RUN_AWAY_BUILDUP, SOUND_SPACE_DEFAULT) + Call(InterpNpcYaw, NPC_KoopaBros_02, 90, 0) + Call(EnableNpcBlur, NPC_KoopaBros_02, TRUE) + Call(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Red_Run) + Wait(30 * DT) + Call(PlaySoundAtNpc, NPC_KoopaBros_02, SOUND_RUN_AWAY, SOUND_SPACE_DEFAULT) + Call(NpcMoveTo, NPC_KoopaBros_02, 200, -60, 10 * DT) + EndThread + Thread + Call(InterpNpcYaw, NPC_KoopaBros_01, 90, 0) + Call(EnableNpcBlur, NPC_KoopaBros_01, TRUE) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Black_Run) + Wait(30 * DT) + Call(EnableNpcBlur, NPC_KoopaBros_01, TRUE) + Call(NpcMoveTo, NPC_KoopaBros_01, 200, -60, 10 * DT) + EndThread + Thread + Call(InterpNpcYaw, NPC_KoopaBros_03, 90, 0) + Call(EnableNpcBlur, NPC_KoopaBros_03, TRUE) + Call(SetNpcAnimation, NPC_KoopaBros_03, ANIM_KoopaBros_Yellow_Run) + Wait(30 * DT) + Call(EnableNpcBlur, NPC_KoopaBros_03, TRUE) + Call(NpcMoveTo, NPC_KoopaBros_03, 200, -60, 10 * DT) + EndThread + Thread + Call(InterpNpcYaw, NPC_KoopaBros_04, 90, 0) + Call(EnableNpcBlur, NPC_KoopaBros_04, TRUE) + Call(SetNpcAnimation, NPC_KoopaBros_04, ANIM_KoopaBros_Green_Run) + Wait(30 * DT) + Call(EnableNpcBlur, NPC_KoopaBros_04, TRUE) + Call(NpcMoveTo, NPC_KoopaBros_04, 200, -60, 10 * DT) + EndThread + Wait(30 * DT) + ExecWait(N(EVS_EndPeachChapter0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_kkj/kkj_15/kkj_15_5_chapter1.c b/src/world/area_kkj/kkj_15/kkj_15_5_chapter1.c index 620c02481ce..3375dbde50c 100644 --- a/src/world/area_kkj/kkj_15/kkj_15_5_chapter1.c +++ b/src/world/area_kkj/kkj_15/kkj_15_5_chapter1.c @@ -22,324 +22,324 @@ Vec3f N(TwinkFollowCh1Path2)[] = { }; EvtScript N(EVS_ApproachPeach_Ch1) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcVar, NPC_Koopatrol_01, 0, 1) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 26) - EVT_SUB(LVar2, 2) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim06) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_01, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(NpcFacePlayer, NPC_Koopatrol_01, 5) - EVT_CALL(SetNpcVar, NPC_Koopatrol_01, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 26) - EVT_ADD(LVar2, 2) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim06) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_02, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_02, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(NpcFacePlayer, NPC_Koopatrol_02, 5) - EVT_END_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcVar, NPC_Koopatrol_01, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(10 * DT) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetNpcVar, NPC_Koopatrol_01, 0, 1) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar0, 26) + Sub(LVar2, 2) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim06) + Call(SetNpcSpeed, NPC_Koopatrol_01, Float(5.0)) + Call(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim01) + Call(NpcFacePlayer, NPC_Koopatrol_01, 5) + Call(SetNpcVar, NPC_Koopatrol_01, 0, 0) + EndThread + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 26) + Add(LVar2, 2) + Call(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim06) + Call(SetNpcSpeed, NPC_Koopatrol_02, Float(5.0)) + Call(NpcMoveTo, NPC_Koopatrol_02, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim01) + Call(NpcFacePlayer, NPC_Koopatrol_02, 5) + EndThread + Loop(0) + Wait(1) + Call(GetNpcVar, NPC_Koopatrol_01, 0, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Wait(10 * DT) + Return + End }; EvtScript N(EVS_PickUpPeach_Ch1) = { - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Koopatrol_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 5) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim12) - EVT_ADD(LVar0, 5) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 5) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Koopatrol_02, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_02, LVar0, LVar2, 5) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim12) - EVT_SUB(LVar0, 5) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_02, LVar0, LVar2, 5) - EVT_END_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Gasp) - EVT_WAIT(1) - EVT_LOOP(4) - EVT_ADD(LVar1, 2) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Carried) - EVT_SUB(LVar0, 10) - EVT_LOOP(5) - EVT_ADD(LVar1, 4) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Thread + Call(GetNpcPos, NPC_Koopatrol_01, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 5) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim12) + Add(LVar0, 5) + Call(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 5) + EndThread + Thread + Call(GetNpcPos, NPC_Koopatrol_02, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(NpcMoveTo, NPC_Koopatrol_02, LVar0, LVar2, 5) + Call(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim12) + Sub(LVar0, 5) + Call(NpcMoveTo, NPC_Koopatrol_02, LVar0, LVar2, 5) + EndThread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerAnimation, ANIM_Peach2_Gasp) + Wait(1) + Loop(4) + Add(LVar1, 2) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(SetPlayerAnimation, ANIM_Peach2_Carried) + Sub(LVar0, 10) + Loop(5) + Add(LVar1, 4) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_CarryPeachAway_Ch1) = { - EVT_CALL(InterpNpcYaw, NPC_Koopatrol_02, 90, 3) - EVT_WAIT(10) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_Koopatrol_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_ADD(LVar2, 2) - EVT_CALL(SetPlayerPos, LVar0, 30, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcVar, NPC_Koopatrol_01, 0, 1) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim14) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_01, EVT_FLOAT(7.5)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, 249, -72, 0) - EVT_CALL(SetNpcVar, NPC_Koopatrol_01, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim14) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_02, EVT_FLOAT(7.5)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_02, 281, -68, 0) - EVT_END_THREAD - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, 0, LVar2) - EVT_CALL(GetNpcVar, NPC_Koopatrol_01, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(InterpNpcYaw, NPC_Koopatrol_02, 90, 3) + Wait(10) + Thread + Loop(0) + Call(GetNpcPos, NPC_Koopatrol_01, LVar0, LVar1, LVar2) + Add(LVar0, 10) + Add(LVar2, 2) + Call(SetPlayerPos, LVar0, 30, LVar2) + Wait(1) + EndLoop + EndThread + Call(SetNpcVar, NPC_Koopatrol_01, 0, 1) + Thread + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim14) + Call(SetNpcSpeed, NPC_Koopatrol_01, Float(7.5)) + Call(NpcMoveTo, NPC_Koopatrol_01, 249, -72, 0) + Call(SetNpcVar, NPC_Koopatrol_01, 0, 0) + EndThread + Thread + Call(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim14) + Call(SetNpcSpeed, NPC_Koopatrol_02, Float(7.5)) + Call(NpcMoveTo, NPC_Koopatrol_02, 281, -68, 0) + EndThread + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, 0, LVar2) + Call(GetNpcVar, NPC_Koopatrol_01, 0, LVar0) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_Inspect_Door) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_004A) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_004A) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Inspect_BowsersDiary) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_THREAD - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 50, 0, 37) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -237, 0, 37) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -180, -20) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, TRUE) - EVT_CALL(SetPlayerPos, -164, 0, -53) - EVT_CALL(InterpPlayerYaw, 225, 0) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, FALSE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(NpcJump0, NPC_PARTNER, -225, 50, -80, 20 * DT) - EVT_CALL(NpcFacePlayer, NPC_PARTNER, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 5, MSG_Peach_004B) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Curious) - EVT_CALL(ShowChoice, MSG_Choice_0022) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_CALL(ContinueSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 5, MSG_Peach_004C) - EVT_CALL(NpcFlyTo, NPC_PARTNER, -210, 40, -70, 20 * DT, 0, EASING_LINEAR) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_004D) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Curious) - EVT_CALL(ShowChoice, MSG_Choice_0023) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_CALL(ContinueSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_004E) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Gasp) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Cringe) - EVT_CALL(NpcJump0, NPC_PARTNER, -210, 40, -70, 10 * DT) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Idle) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Shout, ANIM_Twink_Shout, 0, MSG_Peach_004F) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_CALL(ShowChoice, MSG_Choice_0024) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(ContinueSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0050) - EVT_CALL(ShowChoice, MSG_Choice_0025) - EVT_END_IF - EVT_CALL(ContinueSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0051) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Gasp) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Cringe) - EVT_CALL(NpcJump0, NPC_PARTNER, -210, 40, -70, 10 * DT) - EVT_CALL(NpcJump0, NPC_PARTNER, -210, 40, -70, 10 * DT) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Shout, ANIM_Twink_Shout, 0, MSG_Peach_0052) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Shout, ANIM_Peach2_EndShout, 5, MSG_Peach_0053) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Shout, ANIM_Twink_Shout, 0, MSG_Peach_0054) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) - EVT_CALL(NpcFlyTo, NPC_PARTNER, -180, 40, -100, 10 * DT, 0, EASING_LINEAR) - EVT_WAIT(10 * DT) - EVT_CALL(SetMusicTrack, 0, SONG_BOWSER_THEME, 0, 8) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 237, 0, 37) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-12.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 170, -20) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_WAIT(30 * DT) - EVT_THREAD - EVT_CALL(PlaySoundAtCollider, COLLIDER_tte, SOUND_BASIC_DOOR_OPEN, 0) - EVT_CALL(MakeLerp, 0, 120, 20, EASING_COS_FAST_OVERSHOOT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o2, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcPos, NPC_Bowser, 280, 0, -70) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Walk) - EVT_CALL(SetNpcSpeed, NPC_Bowser, EVT_FLOAT(3.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Bowser, 170, -40, 0) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) - EVT_CALL(SpeakToPlayer, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 5, MSG_Peach_0055) - EVT_THREAD - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LookAround) - EVT_WAIT(10 * DT) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -110, 0, -40) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Cringe) - EVT_CALL(NpcJump0, NPC_PARTNER, -168, 38, -112, 10) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_SadStill) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Walk) - EVT_CALL(NpcMoveTo, NPC_Bowser, -70, -40, 80 * DT) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Shock) - EVT_CALL(NpcJump0, NPC_Bowser, -70, 0, -40, 10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Bowser, ANIM_WorldBowser_AngryTalk, ANIM_WorldBowser_Idle, 0, MSG_Peach_0056) - EVT_CALL(NpcJump0, NPC_Bowser, -70, 0, -40, 10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Bowser, ANIM_WorldBowser_AngryTalk, ANIM_WorldBowser_Idle, 0, MSG_Peach_0057) - EVT_WAIT(10 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 240, 0, 37) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 240, 0, 37) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 134, -20) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(5 * DT) - EVT_CALL(SetNpcPos, NPC_Bowser, -100, 0, -70) - EVT_CALL(SetNpcYaw, NPC_Bowser, 90) - EVT_CALL(SetNpcPos, NPC_Koopatrol_01, 280, 0, -70) - EVT_CALL(SetNpcPos, NPC_Koopatrol_02, 310, 0, -70) - EVT_CALL(SetPlayerPos, -136, 0, -20) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(NpcFaceNpc, NPC_Bowser, NPC_Koopatrol_02, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcVar, NPC_Koopatrol_01, 0, 1) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim06) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_01, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, -50, -30, 0) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(SetNpcVar, NPC_Koopatrol_01, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim06) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_02, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_02, -20, -30, 0) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim01) - EVT_END_THREAD - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_Koopatrol_01, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 40) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(GetNpcVar, NPC_Koopatrol_01, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SpeakToNpc, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 5, NPC_Bowser, MSG_Peach_0058) - EVT_CALL(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 5, NPC_Koopatrol_01, MSG_Peach_0059) - EVT_CALL(SpeakToNpc, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 5, NPC_Bowser, MSG_Peach_005A) - EVT_EXEC_WAIT(N(EVS_ApproachPeach_Ch1)) - EVT_EXEC_WAIT(N(EVS_PickUpPeach_Ch1)) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Carried, ANIM_Peach2_Carried, 5, MSG_Peach_005B) - EVT_EXEC_WAIT(N(EVS_CarryPeachAway_Ch1)) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcPos, NPC_PARTNER, -70, 120, -70) - EVT_CALL(LoadPath, 80 * DT, EVT_PTR(N(TwinkFollowCh1Path1)), ARRAY_COUNT(N(TwinkFollowCh1Path1)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_TalkSad) - EVT_LOOP(2) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 7) - EVT_WAIT(5) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 7) - EVT_WAIT(5) - EVT_END_LOOP - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 7) - EVT_WAIT(15 * DT) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 7 * DT) - EVT_CALL(LoadPath, 15 * DT, EVT_PTR(N(TwinkFollowCh1Path2)), ARRAY_COUNT(N(TwinkFollowCh1Path2)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(30 * DT) - EVT_CALL(FadeOutMusic, 0, 1000 * DT) - EVT_EXEC_WAIT(N(EVS_EndPeachChapter1)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Thread + Call(UseSettingsFrom, CAM_DEFAULT, 50, 0, 37) + Call(SetPanTarget, CAM_DEFAULT, -237, 0, 37) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPosA, CAM_DEFAULT, -180, -20) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Call(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, TRUE) + Call(SetPlayerPos, -164, 0, -53) + Call(InterpPlayerYaw, 225, 0) + Call(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, FALSE) + Call(DisablePartnerAI, 0) + Call(NpcJump0, NPC_PARTNER, -225, 50, -80, 20 * DT) + Call(NpcFacePlayer, NPC_PARTNER, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 5, MSG_Peach_004B) + Call(SetPlayerAnimation, ANIM_Peach2_Curious) + Call(ShowChoice, MSG_Choice_0022) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Call(ContinueSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 5, MSG_Peach_004C) + Call(NpcFlyTo, NPC_PARTNER, -210, 40, -70, 20 * DT, 0, EASING_LINEAR) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_004D) + Call(SetPlayerAnimation, ANIM_Peach2_Curious) + Call(ShowChoice, MSG_Choice_0023) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Call(ContinueSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_004E) + Call(SetPlayerAnimation, ANIM_Peach2_Gasp) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Cringe) + Call(NpcJump0, NPC_PARTNER, -210, 40, -70, 10 * DT) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Idle) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Shout, ANIM_Twink_Shout, 0, MSG_Peach_004F) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Call(ShowChoice, MSG_Choice_0024) + IfEq(LVar0, 1) + Call(ContinueSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0050) + Call(ShowChoice, MSG_Choice_0025) + EndIf + Call(ContinueSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0051) + Call(SetPlayerAnimation, ANIM_Peach2_Gasp) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Cringe) + Call(NpcJump0, NPC_PARTNER, -210, 40, -70, 10 * DT) + Call(NpcJump0, NPC_PARTNER, -210, 40, -70, 10 * DT) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Shout, ANIM_Twink_Shout, 0, MSG_Peach_0052) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Shout, ANIM_Peach2_EndShout, 5, MSG_Peach_0053) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Shout, ANIM_Twink_Shout, 0, MSG_Peach_0054) + Call(InterpPlayerYaw, 90, 0) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) + Call(NpcFlyTo, NPC_PARTNER, -180, 40, -100, 10 * DT, 0, EASING_LINEAR) + Wait(10 * DT) + Call(SetMusicTrack, 0, SONG_BOWSER_THEME, 0, 8) + Call(SetPanTarget, CAM_DEFAULT, 237, 0, 37) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-12.0)) + Call(SetCamPosB, CAM_DEFAULT, 170, -20) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Wait(30 * DT) + Thread + Call(PlaySoundAtCollider, COLLIDER_tte, SOUND_BASIC_DOOR_OPEN, 0) + Call(MakeLerp, 0, 120, 20, EASING_COS_FAST_OVERSHOOT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o2, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Wait(10 * DT) + Call(SetNpcPos, NPC_Bowser, 280, 0, -70) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Walk) + Call(SetNpcSpeed, NPC_Bowser, Float(3.0 / DT)) + Call(NpcMoveTo, NPC_Bowser, 170, -40, 0) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) + Call(SpeakToPlayer, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 5, MSG_Peach_0055) + Thread + Call(SetPlayerAnimation, ANIM_Peach2_LookAround) + Wait(10 * DT) + Call(SetPanTarget, CAM_DEFAULT, -110, 0, -40) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Cringe) + Call(NpcJump0, NPC_PARTNER, -168, 38, -112, 10) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_SadStill) + EndThread + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Walk) + Call(NpcMoveTo, NPC_Bowser, -70, -40, 80 * DT) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Shock) + Call(NpcJump0, NPC_Bowser, -70, 0, -40, 10 * DT) + Call(SpeakToPlayer, NPC_Bowser, ANIM_WorldBowser_AngryTalk, ANIM_WorldBowser_Idle, 0, MSG_Peach_0056) + Call(NpcJump0, NPC_Bowser, -70, 0, -40, 10 * DT) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Bowser, ANIM_WorldBowser_AngryTalk, ANIM_WorldBowser_Idle, 0, MSG_Peach_0057) + Wait(10 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, 240, 0, 37) + Call(SetPanTarget, CAM_DEFAULT, 240, 0, 37) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(SetCamPosB, CAM_DEFAULT, 134, -20) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(5 * DT) + Call(SetNpcPos, NPC_Bowser, -100, 0, -70) + Call(SetNpcYaw, NPC_Bowser, 90) + Call(SetNpcPos, NPC_Koopatrol_01, 280, 0, -70) + Call(SetNpcPos, NPC_Koopatrol_02, 310, 0, -70) + Call(SetPlayerPos, -136, 0, -20) + Thread + Loop(0) + Call(NpcFaceNpc, NPC_Bowser, NPC_Koopatrol_02, 0) + Wait(1) + EndLoop + EndThread + Call(SetNpcVar, NPC_Koopatrol_01, 0, 1) + Thread + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim06) + Call(SetNpcSpeed, NPC_Koopatrol_01, Float(5.0)) + Call(NpcMoveTo, NPC_Koopatrol_01, -50, -30, 0) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim01) + Call(SetNpcVar, NPC_Koopatrol_01, 0, 0) + EndThread + Thread + Call(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim06) + Call(SetNpcSpeed, NPC_Koopatrol_02, Float(5.0)) + Call(NpcMoveTo, NPC_Koopatrol_02, -20, -30, 0) + Call(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim01) + EndThread + Loop(0) + Call(GetNpcPos, NPC_Koopatrol_01, LVar0, LVar1, LVar2) + Sub(LVar0, 40) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Call(GetNpcVar, NPC_Koopatrol_01, 0, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(SpeakToNpc, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 5, NPC_Bowser, MSG_Peach_0058) + Call(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 5, NPC_Koopatrol_01, MSG_Peach_0059) + Call(SpeakToNpc, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 5, NPC_Bowser, MSG_Peach_005A) + ExecWait(N(EVS_ApproachPeach_Ch1)) + ExecWait(N(EVS_PickUpPeach_Ch1)) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Carried, ANIM_Peach2_Carried, 5, MSG_Peach_005B) + ExecWait(N(EVS_CarryPeachAway_Ch1)) + Wait(10 * DT) + Call(SetNpcPos, NPC_PARTNER, -70, 120, -70) + Call(LoadPath, 80 * DT, Ref(N(TwinkFollowCh1Path1)), ARRAY_COUNT(N(TwinkFollowCh1Path1)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_TalkSad) + Loop(2) + Call(InterpNpcYaw, NPC_PARTNER, 270, 7) + Wait(5) + Call(InterpNpcYaw, NPC_PARTNER, 90, 7) + Wait(5) + EndLoop + Call(InterpNpcYaw, NPC_PARTNER, 270, 7) + Wait(15 * DT) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) + Call(InterpNpcYaw, NPC_PARTNER, 90, 7 * DT) + Call(LoadPath, 15 * DT, Ref(N(TwinkFollowCh1Path2)), ARRAY_COUNT(N(TwinkFollowCh1Path2)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Wait(30 * DT) + Call(FadeOutMusic, 0, 1000 * DT) + ExecWait(N(EVS_EndPeachChapter1)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(EnablePartnerAI) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SetupChapter1) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Inspect_BowsersDiary)), TRIGGER_WALL_PRESS_A, COLLIDER_o100, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Inspect_Door)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_Inspect_BowsersDiary)), TRIGGER_WALL_PRESS_A, COLLIDER_o100, 1, 0) + BindTrigger(Ref(N(EVS_Inspect_Door)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + Return + End }; diff --git a/src/world/area_kkj/kkj_15/kkj_15_6_chapter2.c b/src/world/area_kkj/kkj_15/kkj_15_6_chapter2.c index e2f2201f155..31d8bbb3ede 100644 --- a/src/world/area_kkj/kkj_15/kkj_15_6_chapter2.c +++ b/src/world/area_kkj/kkj_15/kkj_15_6_chapter2.c @@ -1,31 +1,31 @@ #include "kkj_15.h" EvtScript N(EVS_ExtiDoor_Chapter2) = { - EVT_IF_EQ(AF_KKJ_06, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 1) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_006B) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_SET(LVar0, kkj_15_ENTRY_0) - EVT_SET(LVar1, COLLIDER_tte) - EVT_SET(LVar2, MODEL_o2) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_IF_EQ(AF_KKJ_06, FALSE) - EVT_CALL(GotoMap, EVT_PTR("kkj_11"), kkj_11_ENTRY_7) - EVT_ELSE - EVT_CALL(GotoMap, EVT_PTR("kkj_11"), kkj_11_ENTRY_3) - EVT_END_IF - EVT_WAIT(100) - EVT_RETURN - EVT_END + IfEq(AF_KKJ_06, FALSE) + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 1) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_006B) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + EndIf + Set(LVar0, kkj_15_ENTRY_0) + Set(LVar1, COLLIDER_tte) + Set(LVar2, MODEL_o2) + Set(LVar3, DOOR_SWING_IN) + Exec(ExitSingleDoor) + Wait(17) + IfEq(AF_KKJ_06, FALSE) + Call(GotoMap, Ref("kkj_11"), kkj_11_ENTRY_7) + Else + Call(GotoMap, Ref("kkj_11"), kkj_11_ENTRY_3) + EndIf + Wait(100) + Return + End }; EvtScript N(EVS_SetupChapter2) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExtiDoor_Chapter2)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExtiDoor_Chapter2)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + Return + End }; diff --git a/src/world/area_kkj/kkj_15/kkj_15_7_chapter3.c b/src/world/area_kkj/kkj_15/kkj_15_7_chapter3.c index 820f72e6838..73f03703047 100644 --- a/src/world/area_kkj/kkj_15/kkj_15_7_chapter3.c +++ b/src/world/area_kkj/kkj_15/kkj_15_7_chapter3.c @@ -34,313 +34,313 @@ Vec3f N(TwinkFollowCh3Path2)[] = { }; EvtScript N(EVS_ApproachPeach_Ch3) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcVar, NPC_Koopatrol_03, 0, 1) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 26) - EVT_SUB(LVar2, 2) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_03, ANIM_WorldKoopatrol_Anim06) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_03, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_03, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_03, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(NpcFacePlayer, NPC_Koopatrol_03, 5) - EVT_CALL(SetNpcVar, NPC_Koopatrol_03, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 26) - EVT_ADD(LVar2, 2) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_04, ANIM_WorldKoopatrol_Anim06) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_04, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_04, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_04, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(NpcFacePlayer, NPC_Koopatrol_04, 5) - EVT_END_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcVar, NPC_Koopatrol_03, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(10) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetNpcVar, NPC_Koopatrol_03, 0, 1) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar0, 26) + Sub(LVar2, 2) + Call(SetNpcAnimation, NPC_Koopatrol_03, ANIM_WorldKoopatrol_Anim06) + Call(SetNpcSpeed, NPC_Koopatrol_03, Float(5.0)) + Call(NpcMoveTo, NPC_Koopatrol_03, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_Koopatrol_03, ANIM_WorldKoopatrol_Anim01) + Call(NpcFacePlayer, NPC_Koopatrol_03, 5) + Call(SetNpcVar, NPC_Koopatrol_03, 0, 0) + EndThread + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 26) + Add(LVar2, 2) + Call(SetNpcAnimation, NPC_Koopatrol_04, ANIM_WorldKoopatrol_Anim06) + Call(SetNpcSpeed, NPC_Koopatrol_04, Float(5.0)) + Call(NpcMoveTo, NPC_Koopatrol_04, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_Koopatrol_04, ANIM_WorldKoopatrol_Anim01) + Call(NpcFacePlayer, NPC_Koopatrol_04, 5) + EndThread + Loop(0) + Wait(1) + Call(GetNpcVar, NPC_Koopatrol_03, 0, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Wait(10) + Return + End }; EvtScript N(EVS_PickUpPeach_Ch3) = { - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Koopatrol_03, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_03, LVar0, LVar2, 5) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_03, ANIM_WorldKoopatrol_Anim12) - EVT_ADD(LVar0, 5) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_03, LVar0, LVar2, 5) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Koopatrol_04, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_04, LVar0, LVar2, 5) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_04, ANIM_WorldKoopatrol_Anim12) - EVT_SUB(LVar0, 5) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_04, LVar0, LVar2, 5) - EVT_END_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Gasp) - EVT_WAIT(1) - EVT_LOOP(4) - EVT_ADD(LVar1, 2) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Carried) - EVT_SUB(LVar0, 10) - EVT_LOOP(5) - EVT_ADD(LVar1, 4) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Thread + Call(GetNpcPos, NPC_Koopatrol_03, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(NpcMoveTo, NPC_Koopatrol_03, LVar0, LVar2, 5) + Call(SetNpcAnimation, NPC_Koopatrol_03, ANIM_WorldKoopatrol_Anim12) + Add(LVar0, 5) + Call(NpcMoveTo, NPC_Koopatrol_03, LVar0, LVar2, 5) + EndThread + Thread + Call(GetNpcPos, NPC_Koopatrol_04, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(NpcMoveTo, NPC_Koopatrol_04, LVar0, LVar2, 5) + Call(SetNpcAnimation, NPC_Koopatrol_04, ANIM_WorldKoopatrol_Anim12) + Sub(LVar0, 5) + Call(NpcMoveTo, NPC_Koopatrol_04, LVar0, LVar2, 5) + EndThread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerAnimation, ANIM_Peach2_Gasp) + Wait(1) + Loop(4) + Add(LVar1, 2) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(SetPlayerAnimation, ANIM_Peach2_Carried) + Sub(LVar0, 10) + Loop(5) + Add(LVar1, 4) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_CarryPeachAway_Ch3) = { - EVT_CALL(InterpNpcYaw, NPC_Koopatrol_04, 90, 3) - EVT_WAIT(10) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_Koopatrol_03, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_ADD(LVar2, 2) - EVT_CALL(SetPlayerPos, LVar0, 30, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcVar, NPC_Koopatrol_03, 0, 1) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_03, ANIM_WorldKoopatrol_Anim14) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_03, EVT_FLOAT(7.5)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_03, 249, -72, 0) - EVT_CALL(SetNpcVar, NPC_Koopatrol_03, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_04, ANIM_WorldKoopatrol_Anim14) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_04, EVT_FLOAT(7.5)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_04, 281, -68, 0) - EVT_END_THREAD - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, 0, LVar2) - EVT_CALL(GetNpcVar, NPC_Koopatrol_03, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(InterpNpcYaw, NPC_Koopatrol_04, 90, 3) + Wait(10) + Thread + Loop(0) + Call(GetNpcPos, NPC_Koopatrol_03, LVar0, LVar1, LVar2) + Add(LVar0, 10) + Add(LVar2, 2) + Call(SetPlayerPos, LVar0, 30, LVar2) + Wait(1) + EndLoop + EndThread + Call(SetNpcVar, NPC_Koopatrol_03, 0, 1) + Thread + Call(SetNpcAnimation, NPC_Koopatrol_03, ANIM_WorldKoopatrol_Anim14) + Call(SetNpcSpeed, NPC_Koopatrol_03, Float(7.5)) + Call(NpcMoveTo, NPC_Koopatrol_03, 249, -72, 0) + Call(SetNpcVar, NPC_Koopatrol_03, 0, 0) + EndThread + Thread + Call(SetNpcAnimation, NPC_Koopatrol_04, ANIM_WorldKoopatrol_Anim14) + Call(SetNpcSpeed, NPC_Koopatrol_04, Float(7.5)) + Call(NpcMoveTo, NPC_Koopatrol_04, 281, -68, 0) + EndThread + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, 0, LVar2) + Call(GetNpcVar, NPC_Koopatrol_03, 0, LVar0) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_Scene_Chapter3) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetMusicTrack, 0, SONG_BOWSER_THEME, 0, 8) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(SetPlayerPos, 50, 10, -250) - EVT_CALL(SetNpcPos, NPC_PARTNER, 10, 50, -250) - EVT_CALL(SetNpcPos, NPC_Bowser, -50, 0, -20) - EVT_CALL(SetNpcPos, NPC_Kammy, -130, 0, -20) - EVT_CALL(SetNpcYaw, NPC_Bowser, 270) - EVT_CALL(SetNpcYaw, NPC_Kammy, 90) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -50, 0, -20) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -50, 0, -20) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_AngryTalk, ANIM_WorldBowser_Idle, 0, NPC_Kammy, MSG_Peach_0082) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0 / DT)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 400) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -50, 0, -20) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToNpc, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, NPC_Bowser, MSG_Peach_0083) - EVT_THREAD - EVT_EXEC_WAIT(N(EVS_AnimateRotatingWall_AlmostCaught)) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Gasp) - EVT_CALL(PlaySoundAtPlayer, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, 0, EMOTE_EXCLAMATION, 0, 30, EMOTER_PLAYER, 0, 0, 0, 0) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LookAround) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(360 * DT) - EVT_CALL(SetNpcPos, NPC_PARTNER, 100, 50, -160) - EVT_CALL(LoadPath, 30 * DT, EVT_PTR(N(TwinkHideCh3Path)), ARRAY_COUNT(N(TwinkHideCh3Path)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(EnableNpcShadow, NPC_PARTNER, FALSE) - EVT_END_THREAD - EVT_CALL(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_AngryTalk, ANIM_WorldBowser_Idle, 0, NPC_Kammy, MSG_Peach_0084) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Tantrum) - EVT_WAIT(60 * DT) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_ArmsCrossed) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) - EVT_CALL(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_Kammy, MSG_Peach_0085) - EVT_CALL(SpeakToNpc, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, NPC_Bowser, MSG_Peach_0086) - EVT_CALL(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_Kammy, MSG_Peach_0087) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_ArmsCrossed) - EVT_WAIT(30 * DT) - EVT_CALL(InterpNpcYaw, NPC_Bowser, 90, 7 * DT) - EVT_WAIT(30 * DT) - EVT_CALL(InterpNpcYaw, NPC_Bowser, 270, 7 * DT) - EVT_WAIT(30 * DT) - EVT_CALL(InterpNpcYaw, NPC_Bowser, 90, 7 * DT) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) - EVT_CALL(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_Bowser, MSG_Peach_0088) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Delighted) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtNpc, NPC_Bowser, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_Bowser, EMOTE_EXCLAMATION, -45, 30, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(PlaySoundAtNpc, NPC_Kammy, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_Kammy, EMOTE_EXCLAMATION, -45, 30, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcVar, NPC_Bowser, 0, 1) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Shock) - EVT_CALL(NpcJump0, NPC_Bowser, -50, 0, -20, 10) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim05) - EVT_CALL(NpcJump0, NPC_Kammy, -130, 0, -20, 10) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Gasp) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LookAround) - EVT_WAIT(60 * DT) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(N(SetPeachDepressed)) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_SadStill) - EVT_CALL(func_802D1270, 30, -10, EVT_FLOAT(2.0 / DT)) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(N(ClearPeachDepressed)) - EVT_CALL(SetNpcVar, NPC_Bowser, 0, 0) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Bowser, ANIM_WorldBowser_Shock, ANIM_WorldBowser_Shock, 0, MSG_Peach_0089) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) - EVT_CALL(ContinueSpeech, NPC_Bowser, ANIM_WorldBowser_AngryTalk, ANIM_WorldBowser_Idle, 0, MSG_Peach_008A) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcVar, NPC_Bowser, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_ArmsCrossed) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) - EVT_CALL(SpeakToPlayer, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_Peach_008B) - EVT_CALL(ShowChoice, MSG_Choice_0026) - EVT_SET(GB_OMO_PeachChoice1, LVar0) - EVT_IF_NE(LVar0, 2) - EVT_SET(AF_KKJ_08, TRUE) - EVT_END_IF - EVT_CALL(ContinueSpeech, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_Peach_008C) - EVT_CALL(ShowChoice, MSG_Choice_0027) - EVT_SET(GB_OMO_PeachChoice2, LVar0) - EVT_IF_NE(LVar0, 2) - EVT_SET(AF_KKJ_08, TRUE) - EVT_END_IF - EVT_CALL(ContinueSpeech, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_Peach_008D) - EVT_CALL(ShowChoice, MSG_Choice_0028) - EVT_SET(GB_OMO_PeachChoice3, LVar0) - EVT_IF_NE(LVar0, 2) - EVT_SET(AF_KKJ_08, TRUE) - EVT_END_IF - EVT_CALL(ContinueSpeech, NPC_Bowser, ANIM_WorldBowser_TalkEyesClosed, ANIM_WorldBowser_Idle, 0, MSG_Peach_008E) - EVT_CALL(InterpNpcYaw, NPC_Bowser, 270, 7) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 5, MSG_Peach_008F) - EVT_IF_EQ(AF_KKJ_08, FALSE) - EVT_CALL(SpeakToNpc, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, NPC_Bowser, MSG_Peach_0090) - EVT_ELSE - EVT_CALL(SpeakToNpc, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, NPC_Bowser, MSG_Peach_0091) - EVT_END_IF - EVT_CALL(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_TalkEyesClosed, ANIM_WorldBowser_Idle, 0, NPC_Kammy, MSG_Peach_0092) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) - EVT_CALL(InterpNpcYaw, NPC_Bowser, 90, 7 * DT) - EVT_WAIT(10 * DT) - EVT_CALL(ContinueSpeech, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 5, MSG_Peach_0093) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) - EVT_CALL(InterpNpcYaw, NPC_Bowser, 90, 7 * DT) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 5, MSG_Peach_0094) - EVT_CALL(RotateModel, MODEL_o2, 120, 0, 1, 0) - EVT_CALL(SetNpcPos, NPC_Koopatrol_03, 249, 0, -70) - EVT_CALL(SetNpcPos, NPC_Koopatrol_04, 281, 0, -70) - EVT_CALL(SpeakToNpc, NPC_Koopatrol_03, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, NPC_Bowser, MSG_Peach_0095) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_EXEC_WAIT(N(EVS_ApproachPeach_Ch3)) - EVT_EXEC_WAIT(N(EVS_PickUpPeach_Ch3)) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Carried, ANIM_Peach2_Carried, 5, MSG_Peach_0096) - EVT_EXEC_WAIT(N(EVS_CarryPeachAway_Ch3)) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Cringe) - EVT_CALL(EnableNpcShadow, NPC_PARTNER, TRUE) - EVT_CALL(LoadPath, 80 * DT, EVT_PTR(N(TwinkFollowCh3Path1)), ARRAY_COUNT(N(TwinkFollowCh3Path1)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_TalkSad) - EVT_LOOP(2) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 7 * DT) - EVT_WAIT(5 * DT) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 7 * DT) - EVT_WAIT(5 * DT) - EVT_END_LOOP - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 7) - EVT_WAIT(15 * DT) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 7 * DT) - EVT_CALL(LoadPath, 15 * DT, EVT_PTR(N(TwinkFollowCh3Path2)), ARRAY_COUNT(N(TwinkFollowCh3Path2)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(30 * DT) - EVT_CALL(FadeOutMusic, 0, 1000 * DT) - EVT_EXEC_WAIT(N(EVS_EndPeachChapter3)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Call(SetMusicTrack, 0, SONG_BOWSER_THEME, 0, 8) + Call(InterpPlayerYaw, 270, 0) + Call(SetPlayerPos, 50, 10, -250) + Call(SetNpcPos, NPC_PARTNER, 10, 50, -250) + Call(SetNpcPos, NPC_Bowser, -50, 0, -20) + Call(SetNpcPos, NPC_Kammy, -130, 0, -20) + Call(SetNpcYaw, NPC_Bowser, 270) + Call(SetNpcYaw, NPC_Kammy, 90) + Call(UseSettingsFrom, CAM_DEFAULT, -50, 0, -20) + Call(SetPanTarget, CAM_DEFAULT, -50, 0, -20) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(30 * DT) + Call(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_AngryTalk, ANIM_WorldBowser_Idle, 0, NPC_Kammy, MSG_Peach_0082) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0 / DT)) + Call(SetCamDistance, CAM_DEFAULT, 400) + Call(SetPanTarget, CAM_DEFAULT, -50, 0, -20) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToNpc, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, NPC_Bowser, MSG_Peach_0083) + Thread + ExecWait(N(EVS_AnimateRotatingWall_AlmostCaught)) + Call(SetPlayerAnimation, ANIM_Peach2_Gasp) + Call(PlaySoundAtPlayer, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, 0, EMOTE_EXCLAMATION, 0, 30, EMOTER_PLAYER, 0, 0, 0, 0) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_LookAround) + EndThread + Thread + Wait(360 * DT) + Call(SetNpcPos, NPC_PARTNER, 100, 50, -160) + Call(LoadPath, 30 * DT, Ref(N(TwinkHideCh3Path)), ARRAY_COUNT(N(TwinkHideCh3Path)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(EnableNpcShadow, NPC_PARTNER, FALSE) + EndThread + Call(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_AngryTalk, ANIM_WorldBowser_Idle, 0, NPC_Kammy, MSG_Peach_0084) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Tantrum) + Wait(60 * DT) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_ArmsCrossed) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) + Call(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_Kammy, MSG_Peach_0085) + Call(SpeakToNpc, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, NPC_Bowser, MSG_Peach_0086) + Call(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_Kammy, MSG_Peach_0087) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_ArmsCrossed) + Wait(30 * DT) + Call(InterpNpcYaw, NPC_Bowser, 90, 7 * DT) + Wait(30 * DT) + Call(InterpNpcYaw, NPC_Bowser, 270, 7 * DT) + Wait(30 * DT) + Call(InterpNpcYaw, NPC_Bowser, 90, 7 * DT) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) + Call(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_Bowser, MSG_Peach_0088) + Call(SetPlayerAnimation, ANIM_Peach2_Delighted) + Wait(1) + Call(PlaySoundAtNpc, NPC_Bowser, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_Bowser, EMOTE_EXCLAMATION, -45, 30, EMOTER_NPC, 0, 0, 0, 0) + Call(PlaySoundAtNpc, NPC_Kammy, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_Kammy, EMOTE_EXCLAMATION, -45, 30, EMOTER_NPC, 0, 0, 0, 0) + Wait(30 * DT) + Call(SetNpcVar, NPC_Bowser, 0, 1) + Thread + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Shock) + Call(NpcJump0, NPC_Bowser, -50, 0, -20, 10) + EndThread + Thread + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim05) + Call(NpcJump0, NPC_Kammy, -130, 0, -20, 10) + EndThread + Thread + Call(SetPlayerAnimation, ANIM_Peach2_Gasp) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_LookAround) + Wait(60 * DT) + Call(DisablePlayerPhysics, FALSE) + Call(N(SetPeachDepressed)) + Call(SetPlayerAnimation, ANIM_Peach2_SadStill) + Call(func_802D1270, 30, -10, Float(2.0 / DT)) + Call(DisablePlayerPhysics, TRUE) + Call(N(ClearPeachDepressed)) + Call(SetNpcVar, NPC_Bowser, 0, 0) + EndThread + Call(SpeakToPlayer, NPC_Bowser, ANIM_WorldBowser_Shock, ANIM_WorldBowser_Shock, 0, MSG_Peach_0089) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) + Call(ContinueSpeech, NPC_Bowser, ANIM_WorldBowser_AngryTalk, ANIM_WorldBowser_Idle, 0, MSG_Peach_008A) + Loop(0) + Wait(1) + Call(GetNpcVar, NPC_Bowser, 0, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_ArmsCrossed) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) + Call(SpeakToPlayer, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_Peach_008B) + Call(ShowChoice, MSG_Choice_0026) + Set(GB_OMO_PeachChoice1, LVar0) + IfNe(LVar0, 2) + Set(AF_KKJ_08, TRUE) + EndIf + Call(ContinueSpeech, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_Peach_008C) + Call(ShowChoice, MSG_Choice_0027) + Set(GB_OMO_PeachChoice2, LVar0) + IfNe(LVar0, 2) + Set(AF_KKJ_08, TRUE) + EndIf + Call(ContinueSpeech, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_Peach_008D) + Call(ShowChoice, MSG_Choice_0028) + Set(GB_OMO_PeachChoice3, LVar0) + IfNe(LVar0, 2) + Set(AF_KKJ_08, TRUE) + EndIf + Call(ContinueSpeech, NPC_Bowser, ANIM_WorldBowser_TalkEyesClosed, ANIM_WorldBowser_Idle, 0, MSG_Peach_008E) + Call(InterpNpcYaw, NPC_Bowser, 270, 7) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 5, MSG_Peach_008F) + IfEq(AF_KKJ_08, FALSE) + Call(SpeakToNpc, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, NPC_Bowser, MSG_Peach_0090) + Else + Call(SpeakToNpc, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, NPC_Bowser, MSG_Peach_0091) + EndIf + Call(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_TalkEyesClosed, ANIM_WorldBowser_Idle, 0, NPC_Kammy, MSG_Peach_0092) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) + Call(InterpNpcYaw, NPC_Bowser, 90, 7 * DT) + Wait(10 * DT) + Call(ContinueSpeech, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 5, MSG_Peach_0093) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) + Call(InterpNpcYaw, NPC_Bowser, 90, 7 * DT) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 5, MSG_Peach_0094) + Call(RotateModel, MODEL_o2, 120, 0, 1, 0) + Call(SetNpcPos, NPC_Koopatrol_03, 249, 0, -70) + Call(SetNpcPos, NPC_Koopatrol_04, 281, 0, -70) + Call(SpeakToNpc, NPC_Koopatrol_03, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, NPC_Bowser, MSG_Peach_0095) + Call(InterpPlayerYaw, 90, 0) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + ExecWait(N(EVS_ApproachPeach_Ch3)) + ExecWait(N(EVS_PickUpPeach_Ch3)) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Carried, ANIM_Peach2_Carried, 5, MSG_Peach_0096) + ExecWait(N(EVS_CarryPeachAway_Ch3)) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Cringe) + Call(EnableNpcShadow, NPC_PARTNER, TRUE) + Call(LoadPath, 80 * DT, Ref(N(TwinkFollowCh3Path1)), ARRAY_COUNT(N(TwinkFollowCh3Path1)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_TalkSad) + Loop(2) + Call(InterpNpcYaw, NPC_PARTNER, 270, 7 * DT) + Wait(5 * DT) + Call(InterpNpcYaw, NPC_PARTNER, 90, 7 * DT) + Wait(5 * DT) + EndLoop + Call(InterpNpcYaw, NPC_PARTNER, 270, 7) + Wait(15 * DT) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) + Call(InterpNpcYaw, NPC_PARTNER, 90, 7 * DT) + Call(LoadPath, 15 * DT, Ref(N(TwinkFollowCh3Path2)), ARRAY_COUNT(N(TwinkFollowCh3Path2)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Wait(30 * DT) + Call(FadeOutMusic, 0, 1000 * DT) + ExecWait(N(EVS_EndPeachChapter3)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(EnablePartnerAI) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_kkj/kkj_16/kkj_16_1_main.c b/src/world/area_kkj/kkj_16/kkj_16_1_main.c index 32e489924d8..f1d67eaabe7 100644 --- a/src/world/area_kkj/kkj_16/kkj_16_1_main.c +++ b/src/world/area_kkj/kkj_16/kkj_16_1_main.c @@ -4,65 +4,65 @@ #include "../common/SetAvailableDisguise.inc.c" EvtScript N(EVS_EndPeachChapter2) = { - EVT_SET(LVar0, GB_KKJ_LastPartner) - EVT_CALL(N(RestoreFromPeachState)) - EVT_CALL(PlaySound, SOUND_SLIDE_WHISTLE_OUT) - EVT_CALL(GotoMapSpecial, EVT_PTR("sbk_02"), sbk_02_ENTRY_5, TRANSITION_END_PEACH_INTERLUDE) - EVT_WAIT(100) + Set(LVar0, GB_KKJ_LastPartner) + Call(N(RestoreFromPeachState)) + Call(PlaySound, SOUND_SLIDE_WHISTLE_OUT) + Call(GotoMapSpecial, Ref("sbk_02"), sbk_02_ENTRY_5, TRANSITION_END_PEACH_INTERLUDE) + Wait(100) }; //@bug script not properly terminated EvtScript N(EVS_ExitDoor_kkj_11_2) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, kkj_16_ENTRY_0) - EVT_SET(LVar1, COLLIDER_tte) - EVT_SET(LVar2, MODEL_o43) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kkj_11"), kkj_11_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, kkj_16_ENTRY_0) + Set(LVar1, COLLIDER_tte) + Set(LVar2, MODEL_o43) + Set(LVar3, DOOR_SWING_IN) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("kkj_11"), kkj_11_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kkj_16_ENTRY_0) - EVT_SET(LVar2, MODEL_o43) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_END_SWITCH - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_BEGAN_PEACH_MISSION) - EVT_EXEC(N(EVS_ManageSneakingScenes)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kkj_16_ENTRY_0) + Set(LVar2, MODEL_o43) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + EndSwitch + IfEq(GB_StoryProgress, STORY_CH2_BEGAN_PEACH_MISSION) + Exec(N(EVS_ManageSneakingScenes)) + EndIf + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PEACHS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_OR_EQ(STORY_CH2_BEGAN_PEACH_MISSION) - EVT_CASE_OR_EQ(STORY_CH4_BEGAN_PEACH_MISSION) - EVT_CASE_OR_EQ(STORY_CH5_BEGAN_PEACH_MISSION) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(EarlyNPCs))) - EVT_END_CASE_GROUP - EVT_CASE_EQ(STORY_CH6_BEGAN_PEACH_MISSION) - EVT_CALL(N(SetAvailableDisguise), PEACH_DISGUISE_HAMMER_BROS) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(LaterNPCs))) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_IF_LT(GB_StoryProgress, STORY_CH8_REACHED_PEACHS_CASTLE) - EVT_CALL(SetMusicTrack, 0, SONG_PEACH_SNEAKING, 0, 8) - EVT_END_IF - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_kkj_11_2)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_PEACHS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Switch(GB_StoryProgress) + CaseOrEq(STORY_CH2_BEGAN_PEACH_MISSION) + CaseOrEq(STORY_CH4_BEGAN_PEACH_MISSION) + CaseOrEq(STORY_CH5_BEGAN_PEACH_MISSION) + Call(MakeNpcs, FALSE, Ref(N(EarlyNPCs))) + EndCaseGroup + CaseEq(STORY_CH6_BEGAN_PEACH_MISSION) + Call(N(SetAvailableDisguise), PEACH_DISGUISE_HAMMER_BROS) + Call(MakeNpcs, FALSE, Ref(N(LaterNPCs))) + EndSwitch + ExecWait(N(EVS_MakeEntities)) + IfLt(GB_StoryProgress, STORY_CH8_REACHED_PEACHS_CASTLE) + Call(SetMusicTrack, 0, SONG_PEACH_SNEAKING, 0, 8) + EndIf + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + BindTrigger(Ref(N(EVS_ExitDoor_kkj_11_2)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_kkj/kkj_16/kkj_16_2_npcs_early.c b/src/world/area_kkj/kkj_16/kkj_16_2_npcs_early.c index 1560c56773b..b8f9a75bd74 100644 --- a/src/world/area_kkj/kkj_16/kkj_16_2_npcs_early.c +++ b/src/world/area_kkj/kkj_16/kkj_16_2_npcs_early.c @@ -10,162 +10,162 @@ #include "../common/ApproachPlayer50Units.inc.c" EvtScript N(EVS_CapturePeach) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_WAIT(20) - EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Gasp) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_Peach_0174) - EVT_CALL(N(ApproachPlayer50Units), -1, LVar3, LVar0, LVar2) - EVT_IF_NE(LVar3, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim06) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_Peach_0175) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_ForwardSad) - EVT_WAIT(20) - EVT_CALL(GotoMapSpecial, EVT_PTR("kkj_14"), kkj_14_ENTRY_B, TRANSITION_PEACH_CAPTURED) - EVT_WAIT(100) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) + Call(NpcFacePlayer, NPC_SELF, 0) + Wait(20) + Call(PlayerFaceNpc, NPC_SELF, FALSE) + Call(SetPlayerAnimation, ANIM_Peach2_Gasp) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_Peach_0174) + Call(N(ApproachPlayer50Units), -1, LVar3, LVar0, LVar2) + IfNe(LVar3, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim06) + Call(SetNpcSpeed, NPC_SELF, Float(5.0)) + Call(NpcMoveTo, NPC_SELF, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_Peach_0175) + Call(SetPlayerAnimation, ANIM_Peach2_ForwardSad) + Wait(20) + Call(GotoMapSpecial, Ref("kkj_14"), kkj_14_ENTRY_B, TRANSITION_PEACH_CAPTURED) + Wait(100) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcIdle_Koopatrol_02) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim04) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(N(UnkPhysicsFunc), LVar0, 85, 60, 38) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_CapturePeach))) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(1.7)) - EVT_LOOP(0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) - EVT_WAIT(20) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 15) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim04) - EVT_CALL(NpcMoveTo, NPC_SELF, 280, 50, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) - EVT_WAIT(20) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 15) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim04) - EVT_CALL(NpcMoveTo, NPC_SELF, 80, 50, 0) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim04) + Thread + Loop(0) + Call(N(UnkPhysicsFunc), LVar0, 85, 60, 38) + IfEq(LVar0, 1) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_CapturePeach))) + Return + EndIf + Wait(1) + EndLoop + EndThread + Call(SetNpcSpeed, NPC_SELF, Float(1.7)) + Loop(0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) + Wait(20) + Call(InterpNpcYaw, NPC_SELF, 90, 15) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim04) + Call(NpcMoveTo, NPC_SELF, 280, 50, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) + Wait(20) + Call(InterpNpcYaw, NPC_SELF, 270, 15) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim04) + Call(NpcMoveTo, NPC_SELF, 80, 50, 0) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_Koopatrol_03) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim04) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(N(UnkPhysicsFunc), LVar0, 85, 60, 38) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_CapturePeach))) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(2.0)) - EVT_LOOP(0) - EVT_CALL(NpcMoveTo, NPC_SELF, -248, -80, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, -84, -80, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, -84, -15, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, -88, -15, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, -88, 50, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, -252, 50, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, -252, -15, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, -248, -15, 0) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim04) + Thread + Loop(0) + Call(N(UnkPhysicsFunc), LVar0, 85, 60, 38) + IfEq(LVar0, 1) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_CapturePeach))) + Return + EndIf + Wait(1) + EndLoop + EndThread + Call(SetNpcSpeed, NPC_SELF, Float(2.0)) + Loop(0) + Call(NpcMoveTo, NPC_SELF, -248, -80, 0) + Call(NpcMoveTo, NPC_SELF, -84, -80, 0) + Call(NpcMoveTo, NPC_SELF, -84, -15, 0) + Call(NpcMoveTo, NPC_SELF, -88, -15, 0) + Call(NpcMoveTo, NPC_SELF, -88, 50, 0) + Call(NpcMoveTo, NPC_SELF, -252, 50, 0) + Call(NpcMoveTo, NPC_SELF, -252, -15, 0) + Call(NpcMoveTo, NPC_SELF, -248, -15, 0) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_Koopatrol_04) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim04) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(N(UnkPhysicsFunc), LVar0, 85, 60, 38) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_CapturePeach))) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(1.7)) - EVT_LOOP(0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) - EVT_WAIT(30) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 15) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim04) - EVT_CALL(NpcMoveTo, NPC_SELF, -600, 50, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) - EVT_WAIT(30) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 15) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim04) - EVT_CALL(NpcMoveTo, NPC_SELF, -420, 50, 0) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim04) + Thread + Loop(0) + Call(N(UnkPhysicsFunc), LVar0, 85, 60, 38) + IfEq(LVar0, 1) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_CapturePeach))) + Return + EndIf + Wait(1) + EndLoop + EndThread + Call(SetNpcSpeed, NPC_SELF, Float(1.7)) + Loop(0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) + Wait(30) + Call(InterpNpcYaw, NPC_SELF, 270, 15) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim04) + Call(NpcMoveTo, NPC_SELF, -600, 50, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) + Wait(30) + Call(InterpNpcYaw, NPC_SELF, 90, 15) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim04) + Call(NpcMoveTo, NPC_SELF, -420, 50, 0) + EndLoop + Return + End }; EvtScript N(EVS_NpcInit_HammerBros) = { - EVT_IF_NE(GB_StoryProgress, STORY_CH2_BEGAN_PEACH_MISSION) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_SELF, -700, 0, 50) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 1) - EVT_RETURN - EVT_END + IfNe(GB_StoryProgress, STORY_CH2_BEGAN_PEACH_MISSION) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + Call(SetNpcPos, NPC_SELF, -700, 0, 50) + Call(InterpNpcYaw, NPC_SELF, 270, 1) + Return + End }; EvtScript N(EVS_NpcInit_Koopatrol_01) = { - EVT_IF_NE(GB_StoryProgress, STORY_CH2_BEGAN_PEACH_MISSION) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_SELF, -740, 0, 50) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 1) - EVT_RETURN - EVT_END + IfNe(GB_StoryProgress, STORY_CH2_BEGAN_PEACH_MISSION) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + Call(SetNpcPos, NPC_SELF, -740, 0, 50) + Call(InterpNpcYaw, NPC_SELF, 90, 1) + Return + End }; EvtScript N(EVS_NpcInit_Koopatrol_02) = { - EVT_CALL(SetNpcPos, NPC_SELF, 180, 0, 50) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Koopatrol_02))) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, 180, 0, 50) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Koopatrol_02))) + Return + End }; EvtScript N(EVS_NpcInit_Koopatrol_03) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, -250, 0, -15) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Koopatrol_03))) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcPos, NPC_SELF, -250, 0, -15) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Koopatrol_03))) + Return + End }; EvtScript N(EVS_NpcInit_Koopatrol_04) = { - EVT_CALL(SetNpcPos, NPC_SELF, -510, 0, 50) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Koopatrol_04))) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, -510, 0, 50) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Koopatrol_04))) + Return + End }; AnimID N(ExtraAnims_HammerBros)[] = { diff --git a/src/world/area_kkj/kkj_16/kkj_16_3_npcs_later.c b/src/world/area_kkj/kkj_16/kkj_16_3_npcs_later.c index 6a47c8302b5..3673a8ddf90 100644 --- a/src/world/area_kkj/kkj_16/kkj_16_3_npcs_later.c +++ b/src/world/area_kkj/kkj_16/kkj_16_3_npcs_later.c @@ -25,165 +25,165 @@ AnimID N(ExtraAnims_HammerBros)[] = { #include "../common/ApproachPlayer50Units.inc.c" EvtScript N(EVS_NpcInteract_HammerBros_01) = { - EVT_IF_EQ(GF_KKJ16_Gift_ShootingStar, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 16, MSG_Peach_013A) - EVT_CALL(ShowGotItem, ITEM_SHOOTING_STAR, TRUE, ITEM_PICKUP_FLAG_NO_ANIMS) - EVT_SET(GF_KKJ16_Gift_ShootingStar, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 16, MSG_Peach_013B) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_KKJ16_Gift_ShootingStar, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 16, MSG_Peach_013A) + Call(ShowGotItem, ITEM_SHOOTING_STAR, TRUE, ITEM_PICKUP_FLAG_NO_ANIMS) + Set(GF_KKJ16_Gift_ShootingStar, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 16, MSG_Peach_013B) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_HammerBros_02) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 0, MSG_Peach_0136) - EVT_CALL(SetSelfVar, 0, 1) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 0, MSG_Peach_0137) - EVT_CALL(SetSelfVar, 0, 0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 0, MSG_Peach_0136) + Call(SetSelfVar, 0, 1) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 0, MSG_Peach_0137) + Call(SetSelfVar, 0, 0) + EndIf + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_HammerBros_03) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 0, MSG_Peach_0138) - EVT_CALL(SetSelfVar, 0, 1) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 0, MSG_Peach_0139) - EVT_CALL(SetSelfVar, 0, 0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 0, MSG_Peach_0138) + Call(SetSelfVar, 0, 1) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 0, MSG_Peach_0139) + Call(SetSelfVar, 0, 0) + EndIf + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_CapturePeach) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(PreventNextPeachDisguise)) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_WAIT(20) - EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Gasp) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HammerBros_Anim02) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 0, MSG_Peach_0174) - EVT_CALL(N(ApproachPlayer50Units), -1, LVar3, LVar0, LVar2) - EVT_IF_NE(LVar3, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HammerBros_Anim07) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HammerBros_Anim02) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 0, MSG_Peach_0175) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_ForwardSad) - EVT_WAIT(20) - EVT_CALL(GotoMapSpecial, EVT_PTR("kkj_14"), kkj_14_ENTRY_B, TRANSITION_PEACH_CAPTURED) - EVT_WAIT(100) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(N(PreventNextPeachDisguise)) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) + Call(NpcFacePlayer, NPC_SELF, 0) + Wait(20) + Call(PlayerFaceNpc, NPC_SELF, FALSE) + Call(SetPlayerAnimation, ANIM_Peach2_Gasp) + Call(SetNpcAnimation, NPC_SELF, ANIM_HammerBros_Anim02) + Call(SpeakToPlayer, NPC_SELF, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 0, MSG_Peach_0174) + Call(N(ApproachPlayer50Units), -1, LVar3, LVar0, LVar2) + IfNe(LVar3, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_HammerBros_Anim07) + Call(SetNpcSpeed, NPC_SELF, Float(5.0)) + Call(NpcMoveTo, NPC_SELF, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_HammerBros_Anim02) + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 0, MSG_Peach_0175) + Call(SetPlayerAnimation, ANIM_Peach2_ForwardSad) + Wait(20) + Call(GotoMapSpecial, Ref("kkj_14"), kkj_14_ENTRY_B, TRANSITION_PEACH_CAPTURED) + Wait(100) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_WatchForPlayer) = { - EVT_LOOP(0) - EVT_CALL(N(GetPeachDisguise), LVar1) - EVT_IF_EQ(LVar1, PEACH_DISGUISE_NONE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 1) - EVT_CALL(N(UnkPhysicsFunc), LVar0, 85, 60, 38) - EVT_IF_NE(LVar0, 0) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_CapturePeach))) - EVT_RETURN - EVT_END_IF - EVT_ELSE - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(N(GetPeachDisguise), LVar1) + IfEq(LVar1, PEACH_DISGUISE_NONE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 1) + Call(N(UnkPhysicsFunc), LVar0, 85, 60, 38) + IfNe(LVar0, 0) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_CapturePeach))) + Return + EndIf + Else + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 0) + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_HammerBros_01) = { - EVT_EXEC(N(EVS_WatchForPlayer)) - EVT_RETURN - EVT_END + Exec(N(EVS_WatchForPlayer)) + Return + End }; EvtScript N(EVS_NpcIdle_HammerBros_02) = { - EVT_EXEC(N(EVS_WatchForPlayer)) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HammerBros_Anim04) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(1.7)) - EVT_LOOP(0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HammerBros_Anim02) - EVT_WAIT(20) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 15) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HammerBros_Anim04) - EVT_CALL(NpcMoveTo, NPC_SELF, 280, 50, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HammerBros_Anim02) - EVT_WAIT(20) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 15) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HammerBros_Anim04) - EVT_CALL(NpcMoveTo, NPC_SELF, 80, 50, 0) - EVT_END_LOOP - EVT_RETURN - EVT_END + Exec(N(EVS_WatchForPlayer)) + Call(SetNpcAnimation, NPC_SELF, ANIM_HammerBros_Anim04) + Call(SetNpcSpeed, NPC_SELF, Float(1.7)) + Loop(0) + Call(SetNpcAnimation, NPC_SELF, ANIM_HammerBros_Anim02) + Wait(20) + Call(InterpNpcYaw, NPC_SELF, 90, 15) + Call(SetNpcAnimation, NPC_SELF, ANIM_HammerBros_Anim04) + Call(NpcMoveTo, NPC_SELF, 280, 50, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_HammerBros_Anim02) + Wait(20) + Call(InterpNpcYaw, NPC_SELF, 270, 15) + Call(SetNpcAnimation, NPC_SELF, ANIM_HammerBros_Anim04) + Call(NpcMoveTo, NPC_SELF, 80, 50, 0) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_HammerBros_03) = { - EVT_EXEC(N(EVS_WatchForPlayer)) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HammerBros_Anim04) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(1.7)) - EVT_LOOP(0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HammerBros_Anim02) - EVT_WAIT(30) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 15) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HammerBros_Anim04) - EVT_CALL(NpcMoveTo, NPC_SELF, -600, 50, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HammerBros_Anim02) - EVT_WAIT(30) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 15) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HammerBros_Anim04) - EVT_CALL(NpcMoveTo, NPC_SELF, -420, 50, 0) - EVT_END_LOOP - EVT_RETURN - EVT_END + Exec(N(EVS_WatchForPlayer)) + Call(SetNpcAnimation, NPC_SELF, ANIM_HammerBros_Anim04) + Call(SetNpcSpeed, NPC_SELF, Float(1.7)) + Loop(0) + Call(SetNpcAnimation, NPC_SELF, ANIM_HammerBros_Anim02) + Wait(30) + Call(InterpNpcYaw, NPC_SELF, 270, 15) + Call(SetNpcAnimation, NPC_SELF, ANIM_HammerBros_Anim04) + Call(NpcMoveTo, NPC_SELF, -600, 50, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_HammerBros_Anim02) + Wait(30) + Call(InterpNpcYaw, NPC_SELF, 90, 15) + Call(SetNpcAnimation, NPC_SELF, ANIM_HammerBros_Anim04) + Call(NpcMoveTo, NPC_SELF, -420, 50, 0) + EndLoop + Return + End }; EvtScript N(EVS_NpcInit_HammerBros_01) = { - EVT_CALL(SetNpcPos, NPC_SELF, -700, 0, 50) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_HammerBros_01))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_HammerBros_01))) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, -700, 0, 50) + Call(SetNpcYaw, NPC_SELF, 90) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_HammerBros_01))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_HammerBros_01))) + Return + End }; EvtScript N(EVS_NpcInit_HammerBros_02) = { - EVT_CALL(SetNpcPos, NPC_SELF, 180, 0, 50) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_HammerBros_02))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_HammerBros_02))) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, 180, 0, 50) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_HammerBros_02))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_HammerBros_02))) + Return + End }; EvtScript N(EVS_NpcInit_HammerBros_03) = { - EVT_CALL(SetNpcPos, NPC_SELF, -510, 0, 50) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_HammerBros_03))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_HammerBros_03))) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, -510, 0, 50) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_HammerBros_03))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_HammerBros_03))) + Return + End }; NpcData N(NpcData_Minions)[] = { diff --git a/src/world/area_kkj/kkj_16/kkj_16_4_stealth.c b/src/world/area_kkj/kkj_16/kkj_16_4_stealth.c index de3279ad2c7..8d72ee358d5 100644 --- a/src/world/area_kkj/kkj_16/kkj_16_4_stealth.c +++ b/src/world/area_kkj/kkj_16/kkj_16_4_stealth.c @@ -20,258 +20,258 @@ Vec3f N(TwinkFollowPath2)[] = { }; EvtScript N(EVS_ApproachPeach) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 10) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcVar, NPC_HammerBros, 0, 1) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 26) - EVT_SUB(LVar2, 2) - EVT_CALL(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim07) - EVT_CALL(SetNpcSpeed, NPC_HammerBros, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_HammerBros, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim02) - EVT_CALL(NpcFacePlayer, NPC_HammerBros, 5) - EVT_CALL(SetNpcVar, NPC_HammerBros, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 26) - EVT_ADD(LVar2, 2) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim06) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_01, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(NpcFacePlayer, NPC_Koopatrol_01, 5) - EVT_END_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcVar, NPC_HammerBros, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(10) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar0, 10) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetNpcVar, NPC_HammerBros, 0, 1) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar0, 26) + Sub(LVar2, 2) + Call(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim07) + Call(SetNpcSpeed, NPC_HammerBros, Float(5.0)) + Call(NpcMoveTo, NPC_HammerBros, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim02) + Call(NpcFacePlayer, NPC_HammerBros, 5) + Call(SetNpcVar, NPC_HammerBros, 0, 0) + EndThread + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 26) + Add(LVar2, 2) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim06) + Call(SetNpcSpeed, NPC_Koopatrol_01, Float(5.0)) + Call(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim01) + Call(NpcFacePlayer, NPC_Koopatrol_01, 5) + EndThread + Loop(0) + Wait(1) + Call(GetNpcVar, NPC_HammerBros, 0, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Wait(10) + Return + End }; EvtScript N(EVS_PickUpPeach) = { - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_HammerBros, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(NpcMoveTo, NPC_HammerBros, LVar0, LVar2, 5) - EVT_CALL(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim13) - EVT_ADD(LVar0, 5) - EVT_CALL(NpcMoveTo, NPC_HammerBros, LVar0, LVar2, 5) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Koopatrol_01, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 5) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim12) - EVT_SUB(LVar0, 5) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 5) - EVT_END_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Gasp) - EVT_WAIT(1) - EVT_LOOP(4) - EVT_ADD(LVar1, 2) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Carried) - EVT_ADD(LVar0, 10) - EVT_LOOP(5) - EVT_ADD(LVar1, 4) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Thread + Call(GetNpcPos, NPC_HammerBros, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(NpcMoveTo, NPC_HammerBros, LVar0, LVar2, 5) + Call(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim13) + Add(LVar0, 5) + Call(NpcMoveTo, NPC_HammerBros, LVar0, LVar2, 5) + EndThread + Thread + Call(GetNpcPos, NPC_Koopatrol_01, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 5) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim12) + Sub(LVar0, 5) + Call(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 5) + EndThread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerAnimation, ANIM_Peach2_Gasp) + Wait(1) + Loop(4) + Add(LVar1, 2) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(SetPlayerAnimation, ANIM_Peach2_Carried) + Add(LVar0, 10) + Loop(5) + Add(LVar1, 4) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_CarryPeachAway) = { - EVT_CALL(InterpNpcYaw, NPC_Koopatrol_01, 90, 3) - EVT_WAIT(10) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_HammerBros, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 32) - EVT_ADD(LVar2, 2) - EVT_CALL(SetPlayerPos, LVar0, 30, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcVar, NPC_HammerBros, 0, 1) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim08) - EVT_CALL(SetNpcSpeed, NPC_HammerBros, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_HammerBros, -606, -57, 0) - EVT_CALL(SetNpcPos, NPC_HammerBros, 354, 0, 0) - EVT_CALL(SetNpcVar, NPC_HammerBros, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim14) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_01, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, -574, -53, 0) - EVT_CALL(SetNpcPos, NPC_Koopatrol_01, 386, 0, 0) - EVT_END_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcVar, NPC_HammerBros, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(InterpNpcYaw, NPC_Koopatrol_01, 90, 3) + Wait(10) + Thread + Loop(0) + Call(GetNpcPos, NPC_HammerBros, LVar0, LVar1, LVar2) + Add(LVar0, 32) + Add(LVar2, 2) + Call(SetPlayerPos, LVar0, 30, LVar2) + Wait(1) + EndLoop + EndThread + Call(SetNpcVar, NPC_HammerBros, 0, 1) + Thread + Call(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim08) + Call(SetNpcSpeed, NPC_HammerBros, Float(5.0)) + Call(NpcMoveTo, NPC_HammerBros, -606, -57, 0) + Call(SetNpcPos, NPC_HammerBros, 354, 0, 0) + Call(SetNpcVar, NPC_HammerBros, 0, 0) + EndThread + Thread + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim14) + Call(SetNpcSpeed, NPC_Koopatrol_01, Float(5.0)) + Call(NpcMoveTo, NPC_Koopatrol_01, -574, -53, 0) + Call(SetNpcPos, NPC_Koopatrol_01, 386, 0, 0) + EndThread + Loop(0) + Wait(1) + Call(GetNpcVar, NPC_HammerBros, 0, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_ManageSneakingScenes) = { - EVT_IF_EQ(AF_KKJ_07, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 1) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_006C) - EVT_SET(AF_KKJ_07, TRUE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LE(LVar0, -770) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_THREAD - EVT_CALL(SetMusicTrack, 0, SONG_PEACH_SNEAKING, 0, 8) - EVT_WAIT(3) - EVT_CALL(SetMusicTrack, 0, SONG_PEACH_SNEAKING, 0, 7) - EVT_WAIT(3) - EVT_CALL(SetMusicTrack, 0, SONG_PEACH_SNEAKING, 0, 6) - EVT_WAIT(3) - EVT_CALL(SetMusicTrack, 0, SONG_PEACH_SNEAKING, 0, 5) - EVT_WAIT(3) - EVT_CALL(SetMusicTrack, 0, SONG_PEACH_SNEAKING, 0, 4) - EVT_END_THREAD - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Startle) - EVT_CALL(PlaySoundAtPlayer, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, 0, EMOTE_EXCLAMATION, 0, 30, EMOTER_PLAYER, 0, 0, 0, 0) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_THREAD - EVT_CALL(NpcFlyTo, NPC_PARTNER, -776, 50, -65, 10 * DT, 0, EASING_LINEAR) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(PlayerMoveTo, -778, -55, 10 * DT) - EVT_CALL(InterpPlayerYaw, 185, 0) - EVT_END_THREAD - EVT_CALL(SpeakToNpc, NPC_HammerBros, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 0, NPC_Koopatrol_01, MSG_Peach_006E) - EVT_CALL(SpeakToNpc, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, NPC_HammerBros, MSG_Peach_006F) - EVT_CALL(SpeakToNpc, NPC_HammerBros, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 0, NPC_Koopatrol_01, MSG_Peach_0070) - EVT_CALL(SpeakToNpc, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, NPC_HammerBros, MSG_Peach_0071) - EVT_CALL(SpeakToNpc, NPC_HammerBros, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 0, NPC_Koopatrol_01, MSG_Peach_0072) - EVT_CALL(SpeakToNpc, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, NPC_HammerBros, MSG_Peach_0073) - EVT_CALL(SpeakToNpc, NPC_HammerBros, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 0, NPC_Koopatrol_01, MSG_Peach_0074) - EVT_CALL(SpeakToNpc, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, NPC_HammerBros, MSG_Peach_0075) - EVT_CALL(SpeakToNpc, NPC_HammerBros, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 0, NPC_Koopatrol_01, MSG_Peach_0076) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-10.5)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -775, -50) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_BattleBow_Talk, ANIM_Peach1_Idle, 5, MSG_Peach_0077) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 5, MSG_Peach_0078) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SpeakToNpc, NPC_HammerBros, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 0, NPC_Koopatrol_01, MSG_Peach_0079) - EVT_CALL(SpeakToNpc, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, NPC_HammerBros, MSG_Peach_007A) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim07) - EVT_CALL(NpcMoveTo, NPC_HammerBros, -820, 50, 30 * DT) - EVT_CALL(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim02) - EVT_CALL(NpcFacePlayer, NPC_HammerBros, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim06) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, -840, 10, 30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(NpcFacePlayer, NPC_Koopatrol_01, 0) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Cringe) - EVT_CALL(LoadPath, 20 * DT, EVT_PTR(N(TwinkHide1)), ARRAY_COUNT(N(TwinkHide1)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(NpcFacePlayer, NPC_PARTNER, 0) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Gasp) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(PlayerJump1, LVar0, LVar1, LVar2, 10 * DT) - EVT_END_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 0, MSG_Peach_007B) - EVT_CALL(SpeakToPlayer, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_Peach_007C) - EVT_EXEC_WAIT(N(EVS_ApproachPeach)) - EVT_EXEC_WAIT(N(EVS_PickUpPeach)) - EVT_EXEC_WAIT(N(EVS_CarryPeachAway)) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Carried, ANIM_Peach2_Carried, 5, MSG_Peach_007D) - EVT_WAIT(10 * DT) - EVT_CALL(LoadPath, 40 * DT, EVT_PTR(N(TwinkFollowPath1)), ARRAY_COUNT(N(TwinkFollowPath1)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_TalkSad) - EVT_LOOP(2) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 7 * DT) - EVT_WAIT(5 * DT) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 7 * DT) - EVT_WAIT(5 * DT) - EVT_END_LOOP - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Idle) - EVT_THREAD - EVT_CALL(LoadPath, 30 * DT, EVT_PTR(N(TwinkFollowPath2)), ARRAY_COUNT(N(TwinkFollowPath2)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(15 * DT) - EVT_CALL(FadeOutMusic, 0, 1000 * DT) - EVT_EXEC_WAIT(N(EVS_EndPeachChapter2)) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + IfEq(AF_KKJ_07, FALSE) + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 1) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_006C) + Set(AF_KKJ_07, TRUE) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + EndIf + Loop(0) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLe(LVar0, -770) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Thread + Call(SetMusicTrack, 0, SONG_PEACH_SNEAKING, 0, 8) + Wait(3) + Call(SetMusicTrack, 0, SONG_PEACH_SNEAKING, 0, 7) + Wait(3) + Call(SetMusicTrack, 0, SONG_PEACH_SNEAKING, 0, 6) + Wait(3) + Call(SetMusicTrack, 0, SONG_PEACH_SNEAKING, 0, 5) + Wait(3) + Call(SetMusicTrack, 0, SONG_PEACH_SNEAKING, 0, 4) + EndThread + Call(SetPlayerAnimation, ANIM_Peach2_Startle) + Call(PlaySoundAtPlayer, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, 0, EMOTE_EXCLAMATION, 0, 30, EMOTER_PLAYER, 0, 0, 0, 0) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Thread + Call(NpcFlyTo, NPC_PARTNER, -776, 50, -65, 10 * DT, 0, EASING_LINEAR) + EndThread + Thread + Call(PlayerMoveTo, -778, -55, 10 * DT) + Call(InterpPlayerYaw, 185, 0) + EndThread + Call(SpeakToNpc, NPC_HammerBros, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 0, NPC_Koopatrol_01, MSG_Peach_006E) + Call(SpeakToNpc, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, NPC_HammerBros, MSG_Peach_006F) + Call(SpeakToNpc, NPC_HammerBros, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 0, NPC_Koopatrol_01, MSG_Peach_0070) + Call(SpeakToNpc, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, NPC_HammerBros, MSG_Peach_0071) + Call(SpeakToNpc, NPC_HammerBros, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 0, NPC_Koopatrol_01, MSG_Peach_0072) + Call(SpeakToNpc, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, NPC_HammerBros, MSG_Peach_0073) + Call(SpeakToNpc, NPC_HammerBros, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 0, NPC_Koopatrol_01, MSG_Peach_0074) + Call(SpeakToNpc, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, NPC_HammerBros, MSG_Peach_0075) + Call(SpeakToNpc, NPC_HammerBros, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 0, NPC_Koopatrol_01, MSG_Peach_0076) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-10.5)) + Call(SetCamPosA, CAM_DEFAULT, -775, -50) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_BattleBow_Talk, ANIM_Peach1_Idle, 5, MSG_Peach_0077) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 5, MSG_Peach_0078) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Call(SpeakToNpc, NPC_HammerBros, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 0, NPC_Koopatrol_01, MSG_Peach_0079) + Call(SpeakToNpc, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, NPC_HammerBros, MSG_Peach_007A) + Thread + Call(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim07) + Call(NpcMoveTo, NPC_HammerBros, -820, 50, 30 * DT) + Call(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim02) + Call(NpcFacePlayer, NPC_HammerBros, 0) + EndThread + Thread + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim06) + Call(NpcMoveTo, NPC_Koopatrol_01, -840, 10, 30 * DT) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim01) + Call(NpcFacePlayer, NPC_Koopatrol_01, 0) + EndThread + Thread + Wait(10 * DT) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Cringe) + Call(LoadPath, 20 * DT, Ref(N(TwinkHide1)), ARRAY_COUNT(N(TwinkHide1)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(NpcFacePlayer, NPC_PARTNER, 0) + EndThread + Thread + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_Gasp) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerJumpscale, Float(1.0)) + Call(PlayerJump1, LVar0, LVar1, LVar2, 10 * DT) + EndThread + Wait(30 * DT) + Call(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 0, MSG_Peach_007B) + Call(SpeakToPlayer, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_Peach_007C) + ExecWait(N(EVS_ApproachPeach)) + ExecWait(N(EVS_PickUpPeach)) + ExecWait(N(EVS_CarryPeachAway)) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Carried, ANIM_Peach2_Carried, 5, MSG_Peach_007D) + Wait(10 * DT) + Call(LoadPath, 40 * DT, Ref(N(TwinkFollowPath1)), ARRAY_COUNT(N(TwinkFollowPath1)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_TalkSad) + Loop(2) + Call(InterpNpcYaw, NPC_PARTNER, 270, 7 * DT) + Wait(5 * DT) + Call(InterpNpcYaw, NPC_PARTNER, 90, 7 * DT) + Wait(5 * DT) + EndLoop + Wait(10 * DT) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Idle) + Thread + Call(LoadPath, 30 * DT, Ref(N(TwinkFollowPath2)), ARRAY_COUNT(N(TwinkFollowPath2)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + EndThread + Wait(15 * DT) + Call(FadeOutMusic, 0, 1000 * DT) + ExecWait(N(EVS_EndPeachChapter2)) + Call(EnablePartnerAI) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_kkj/kkj_16/kkj_16_5_entity.c b/src/world/area_kkj/kkj_16/kkj_16_5_entity.c index 5ee20896fab..abae8a4a9db 100644 --- a/src/world/area_kkj/kkj_16/kkj_16_5_entity.c +++ b/src/world/area_kkj/kkj_16/kkj_16_5_entity.c @@ -3,26 +3,26 @@ // immediately remove the item from Peach's inventory, keeping only the flag EvtScript N(EVS_AutoRemovePowerRush) = { - EVT_LOOP(0) - EVT_IF_EQ(GF_KKJ16_Item_PowerRush, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(10) - EVT_CALL(RemoveBadge, ITEM_POWER_RUSH) - EVT_RETURN - EVT_END + Loop(0) + IfEq(GF_KKJ16_Item_PowerRush, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + Wait(10) + Call(RemoveBadge, ITEM_POWER_RUSH) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_LIFE_SHROOM, -840, 110, 10, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KKJ16_Item_LifeShroom) - EVT_CALL(MakeItemEntity, ITEM_POWER_RUSH, -550, 0, -120, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KKJ16_Item_PowerRush) - EVT_IF_LT(GB_StoryProgress, STORY_CH8_REACHED_PEACHS_CASTLE) - EVT_IF_EQ(GF_KKJ16_Item_PowerRush, FALSE) - EVT_EXEC(N(EVS_AutoRemovePowerRush)) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_LIFE_SHROOM, -840, 110, 10, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KKJ16_Item_LifeShroom) + Call(MakeItemEntity, ITEM_POWER_RUSH, -550, 0, -120, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KKJ16_Item_PowerRush) + IfLt(GB_StoryProgress, STORY_CH8_REACHED_PEACHS_CASTLE) + IfEq(GF_KKJ16_Item_PowerRush, FALSE) + Exec(N(EVS_AutoRemovePowerRush)) + EndIf + EndIf + Return + End }; diff --git a/src/world/area_kkj/kkj_17/kkj_17_1_main.c b/src/world/area_kkj/kkj_17/kkj_17_1_main.c index eed569e735b..d8806d94b65 100644 --- a/src/world/area_kkj/kkj_17/kkj_17_1_main.c +++ b/src/world/area_kkj/kkj_17/kkj_17_1_main.c @@ -1,42 +1,42 @@ #include "kkj_17.h" EvtScript N(EVS_ExitDoors_kkj_11_5) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, kkj_17_ENTRY_0) - EVT_SET(LVar1, COLLIDER_ttw) - EVT_SET(LVar2, MODEL_o2) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kkj_11"), kkj_11_ENTRY_5) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, kkj_17_ENTRY_0) + Set(LVar1, COLLIDER_ttw) + Set(LVar2, MODEL_o2) + Set(LVar3, DOOR_SWING_OUT) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("kkj_11"), kkj_11_ENTRY_5) + Wait(100) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kkj_17_ENTRY_0) - EVT_SET(LVar2, MODEL_o2) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kkj_17_ENTRY_0) + Set(LVar2, MODEL_o2) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSingleDoor) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PEACHS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_KKJ_17) - EVT_SETUP_CAMERA_DEFAULT() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMagicChest)) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_11_5)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_PEACHS_CASTLE) + Call(SetSpriteShading, SHADING_KKJ_17) + SetUP_CAMERA_DEFAULT() + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMagicChest)) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + BindTrigger(Ref(N(EVS_ExitDoors_kkj_11_5)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_kkj/kkj_17/kkj_17_2_entity.c b/src/world/area_kkj/kkj_17/kkj_17_2_entity.c index ff862ade23f..e8f3cfc5fb1 100644 --- a/src/world/area_kkj/kkj_17/kkj_17_2_entity.c +++ b/src/world/area_kkj/kkj_17/kkj_17_2_entity.c @@ -2,25 +2,25 @@ // immediately remove the item from Peach's inventory, keeping only the flag EvtScript N(EVS_AutoRemoveDeepFocus) = { - EVT_LOOP(0) - EVT_IF_EQ(GF_KKJ17_Item_DeepFocus, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(10) - EVT_CALL(RemoveBadge, ITEM_DEEP_FOCUS1) - EVT_RETURN - EVT_END + Loop(0) + IfEq(GF_KKJ17_Item_DeepFocus, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + Wait(10) + Call(RemoveBadge, ITEM_DEEP_FOCUS1) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_DEEP_FOCUS1, 100, 0, -30, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KKJ17_Item_DeepFocus) - EVT_IF_LT(GB_StoryProgress, STORY_CH8_REACHED_PEACHS_CASTLE) - EVT_IF_EQ(GF_KKJ17_Item_DeepFocus, FALSE) - EVT_EXEC(N(EVS_AutoRemoveDeepFocus)) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_DEEP_FOCUS1, 100, 0, -30, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KKJ17_Item_DeepFocus) + IfLt(GB_StoryProgress, STORY_CH8_REACHED_PEACHS_CASTLE) + IfEq(GF_KKJ17_Item_DeepFocus, FALSE) + Exec(N(EVS_AutoRemoveDeepFocus)) + EndIf + EndIf + Return + End }; diff --git a/src/world/area_kkj/kkj_17/kkj_17_3_chest.c b/src/world/area_kkj/kkj_17/kkj_17_3_chest.c index 1d501c22466..9cb7bd01b34 100644 --- a/src/world/area_kkj/kkj_17/kkj_17_3_chest.c +++ b/src/world/area_kkj/kkj_17/kkj_17_3_chest.c @@ -18,14 +18,14 @@ extern IconHudScriptPair gItemHudScripts[]; s32** N(varStash) = NULL; EvtScript N(EVS_Chest_ShowGotItem) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_FULL) - EVT_WAIT(40) - EVT_CALL(ShowGotItem, LVar0, FALSE, 0) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_FULL) + Wait(40) + Call(ShowGotItem, LVar0, FALSE, 0) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + Return + End }; s32 N(ChestItems)[] = { @@ -148,137 +148,137 @@ API_CALLABLE(N(SetItemRetrieved)) { #include "world/common/todo/GetItemEmptyCount.inc.c" EvtScript N(EVS_OpenChest) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_o89, SOUND_OPEN_MAGIC_CHEST, 0) - EVT_CALL(MakeLerp, 0, 80, 20, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g21, LVar0, -1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_o89, SOUND_OPEN_MAGIC_CHEST, 0) + Call(MakeLerp, 0, 80, 20, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g21, LVar0, -1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_CloseChest) = { - EVT_CALL(MakeLerp, 80, 0, 20, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g21, LVar0, -1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_o89, SOUND_CLOSE_MAGIC_CHEST, 0) - EVT_RETURN - EVT_END + Call(MakeLerp, 80, 0, 20, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g21, LVar0, -1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_o89, SOUND_CLOSE_MAGIC_CHEST, 0) + Return + End }; EvtScript N(EVS_FindMagicChest) = { - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_018E) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_RaiseArms) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToNpc, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, NPC_PARTNER, MSG_Peach_018F) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0190) - EVT_CALL(SpeakToNpc, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, NPC_PARTNER, MSG_Peach_0191) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0192) - EVT_CALL(SpeakToNpc, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, NPC_PARTNER, MSG_Peach_0193) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LowerArms) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_018E) + Call(SetPlayerAnimation, ANIM_Peach2_RaiseArms) + Wait(10) + Call(SetPlayerAnimation, ANIM_Peach2_TalkIdle) + Call(SpeakToNpc, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, NPC_PARTNER, MSG_Peach_018F) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0190) + Call(SpeakToNpc, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, NPC_PARTNER, MSG_Peach_0191) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0192) + Call(SpeakToNpc, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, NPC_PARTNER, MSG_Peach_0193) + Call(SetPlayerAnimation, ANIM_Peach2_LowerArms) + Wait(10) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Return + End }; EvtScript N(EVS_UseMagicChest_Peach) = { - EVT_SET(LVar0, 0) - EVT_CALL(N(ChestItemPrompt)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(-1) - EVT_CASE_EQ(0) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0194) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_RaiseArms) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToNpc, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, NPC_PARTNER, MSG_Peach_0195) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0196) - EVT_CALL(SpeakToNpc, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, NPC_PARTNER, MSG_Peach_0197) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LowerArms) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_CASE_DEFAULT - EVT_WAIT(10) - EVT_SET(LVar9, LVar0) - EVT_EXEC_WAIT(N(EVS_OpenChest)) - EVT_CALL(N(GetItemName), LVar9) - EVT_CALL(SetMessageText, LVar9, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Peach_0198, 160, 40) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_CloseChest)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Set(LVar0, 0) + Call(N(ChestItemPrompt)) + Switch(LVar0) + CaseEq(-1) + CaseEq(0) + Wait(10) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0194) + Call(SetPlayerAnimation, ANIM_Peach2_RaiseArms) + Wait(10) + Call(SetPlayerAnimation, ANIM_Peach2_TalkIdle) + Call(SpeakToNpc, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, NPC_PARTNER, MSG_Peach_0195) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0196) + Call(SpeakToNpc, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, NPC_PARTNER, MSG_Peach_0197) + Call(SetPlayerAnimation, ANIM_Peach2_LowerArms) + Wait(10) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + CaseDefault + Wait(10) + Set(LVar9, LVar0) + ExecWait(N(EVS_OpenChest)) + Call(N(GetItemName), LVar9) + Call(SetMessageText, LVar9, 0) + Call(ShowMessageAtScreenPos, MSG_Peach_0198, 160, 40) + Wait(10) + ExecWait(N(EVS_CloseChest)) + EndSwitch + Return + End }; EvtScript N(EVS_UseMagicChest_Mario) = { - EVT_EXEC_WAIT(N(EVS_OpenChest)) - EVT_SET(LVar0, 1) - EVT_CALL(N(ChestItemPrompt)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(-1) - EVT_CASE_EQ(0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D4, 160, 40) - EVT_CASE_OR_EQ(269) - EVT_CASE_OR_EQ(297) - EVT_CASE_OR_EQ(273) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_FULL) - EVT_CALL(ShowGotItem, LVar0, FALSE, 0) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_CALL(AddBadge, LVar0, LVar1) - EVT_CALL(N(SetItemRetrieved)) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(N(GetItemEmptyCount)) - EVT_IF_LE(LVar1, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D5, 160, 40) - EVT_ELSE - EVT_CALL(ShowGotItem, LVar0, FALSE, ITEM_PICKUP_FLAG_NO_ANIMS) - EVT_CALL(AddItem, LVar0, LVar1) - EVT_CALL(N(SetItemRetrieved)) - EVT_END_IF - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_CloseChest)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_OpenChest)) + Set(LVar0, 1) + Call(N(ChestItemPrompt)) + Switch(LVar0) + CaseEq(-1) + CaseEq(0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D4, 160, 40) + CaseOrEq(269) + CaseOrEq(297) + CaseOrEq(273) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_FULL) + Call(ShowGotItem, LVar0, FALSE, 0) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Call(AddBadge, LVar0, LVar1) + Call(N(SetItemRetrieved)) + EndCaseGroup + CaseDefault + Call(N(GetItemEmptyCount)) + IfLe(LVar1, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D5, 160, 40) + Else + Call(ShowGotItem, LVar0, FALSE, ITEM_PICKUP_FLAG_NO_ANIMS) + Call(AddItem, LVar0, LVar1) + Call(N(SetItemRetrieved)) + EndIf + EndSwitch + ExecWait(N(EVS_CloseChest)) + Return + End }; EvtScript N(EVS_Interact_MagicChest) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 1) - EVT_IF_LT(GB_StoryProgress, STORY_CH8_REACHED_PEACHS_CASTLE) - EVT_IF_EQ(GF_KKJ17_FoundMagicChest, FALSE) - EVT_EXEC_WAIT(N(EVS_FindMagicChest)) - EVT_SET(GF_KKJ17_FoundMagicChest, TRUE) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_UseMagicChest_Peach)) - EVT_END_IF - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_UseMagicChest_Mario)) - EVT_END_IF - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 1) + IfLt(GB_StoryProgress, STORY_CH8_REACHED_PEACHS_CASTLE) + IfEq(GF_KKJ17_FoundMagicChest, FALSE) + ExecWait(N(EVS_FindMagicChest)) + Set(GF_KKJ17_FoundMagicChest, TRUE) + Else + ExecWait(N(EVS_UseMagicChest_Peach)) + EndIf + Else + ExecWait(N(EVS_UseMagicChest_Mario)) + EndIf + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SetupMagicChest) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Interact_MagicChest)), TRIGGER_WALL_PRESS_A, COLLIDER_o89, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_Interact_MagicChest)), TRIGGER_WALL_PRESS_A, COLLIDER_o89, 1, 0) + Return + End }; diff --git a/src/world/area_kkj/kkj_18/kkj_18_1_music.c b/src/world/area_kkj/kkj_18/kkj_18_1_music.c index f66aa09f751..d17c56f4380 100644 --- a/src/world/area_kkj/kkj_18/kkj_18_1_music.c +++ b/src/world/area_kkj/kkj_18/kkj_18_1_music.c @@ -1,9 +1,9 @@ #include "kkj_18.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH4_BEGAN_PEACH_MISSION) - EVT_CALL(SetMusicTrack, 0, SONG_PEACH_MISSION, 0, 8) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH4_BEGAN_PEACH_MISSION) + Call(SetMusicTrack, 0, SONG_PEACH_MISSION, 0, 8) + EndIf + Return + End }; diff --git a/src/world/area_kkj/kkj_18/kkj_18_2_main.c b/src/world/area_kkj/kkj_18/kkj_18_2_main.c index b08932e8cf3..ba62b9e1de0 100644 --- a/src/world/area_kkj/kkj_18/kkj_18_2_main.c +++ b/src/world/area_kkj/kkj_18/kkj_18_2_main.c @@ -23,110 +23,110 @@ Gfx N(setup_gfx_candle_lights)[] = { }; EvtScript N(EVS_EndPeachChapter4) = { - EVT_SET(LVar0, GB_KKJ_LastPartner) - EVT_CALL(N(RestoreFromPeachState)) - EVT_CALL(PlaySound, SOUND_SLIDE_WHISTLE_OUT) - EVT_CALL(GotoMapSpecial, EVT_PTR("mac_04"), mac_04_ENTRY_5, TRANSITION_END_PEACH_INTERLUDE) - EVT_WAIT(100) + Set(LVar0, GB_KKJ_LastPartner) + Call(N(RestoreFromPeachState)) + Call(PlaySound, SOUND_SLIDE_WHISTLE_OUT) + Call(GotoMapSpecial, Ref("mac_04"), mac_04_ENTRY_5, TRANSITION_END_PEACH_INTERLUDE) + Wait(100) }; EvtScript N(EVS_UpdateClockPendulum) = { - EVT_LOOP(0) - EVT_CALL(MakeLerp, -8, 8, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g13, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 8, -8, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g13, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(MakeLerp, -8, 8, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g13, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 8, -8, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g13, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_ExitDoor_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, kkj_18_ENTRY_0) - EVT_SET(LVar1, COLLIDER_ttw) - EVT_SET(LVar2, MODEL_o9) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_IF_EQ(AB_KKJ_CompletedBakeStep, CAKE_TYPE_NONE) - EVT_CALL(GotoMap, EVT_PTR("kkj_11"), kkj_11_ENTRY_6) - EVT_ELSE - EVT_CALL(GotoMap, EVT_PTR("kkj_19"), kkj_19_ENTRY_0) - EVT_END_IF - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, kkj_18_ENTRY_0) + Set(LVar1, COLLIDER_ttw) + Set(LVar2, MODEL_o9) + Set(LVar3, DOOR_SWING_OUT) + Exec(ExitSingleDoor) + Wait(17) + IfEq(AB_KKJ_CompletedBakeStep, CAKE_TYPE_NONE) + Call(GotoMap, Ref("kkj_11"), kkj_11_ENTRY_6) + Else + Call(GotoMap, Ref("kkj_19"), kkj_19_ENTRY_0) + EndIf + Wait(100) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_NE(AF_KKJ_FinishedBakingCake, FALSE) - EVT_CALL(SetPlayerPos, -227, 0, -35) - EVT_CALL(SetNpcPos, NPC_PARTNER, -227, 0, -35) - EVT_WAIT(30) - EVT_CALL(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_OPEN, 0) - EVT_CALL(MakeLerp, 0, 80, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o9, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPlayerPos, -187, 0, -35) - EVT_CALL(SetNpcPos, NPC_PARTNER, -187, 0, -35) - EVT_END_IF - EVT_SET(LVar0, 0) - EVT_SET(LVar2, MODEL_o9) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + IfNe(AF_KKJ_FinishedBakingCake, FALSE) + Call(SetPlayerPos, -227, 0, -35) + Call(SetNpcPos, NPC_PARTNER, -227, 0, -35) + Wait(30) + Call(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_OPEN, 0) + Call(MakeLerp, 0, 80, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o9, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetPlayerPos, -187, 0, -35) + Call(SetNpcPos, NPC_PARTNER, -187, 0, -35) + EndIf + Set(LVar0, 0) + Set(LVar2, MODEL_o9) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSingleDoor) + Call(DisablePlayerInput, FALSE) + BindTrigger(Ref(N(EVS_ExitDoor_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PEACHS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_IF_EQ(GB_StoryProgress, STORY_CH4_BEGAN_PEACH_MISSION) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_END_IF - EVT_EXEC(N(EVS_UpdateClockPendulum)) - EVT_CALL(SetTexPanner, MODEL_o56, TEX_PANNER_0) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_PEACHS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + IfEq(GB_StoryProgress, STORY_CH4_BEGAN_PEACH_MISSION) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + EndIf + Exec(N(EVS_UpdateClockPendulum)) + Call(SetTexPanner, MODEL_o56, TEX_PANNER_0) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_0) TEX_PAN_PARAMS_STEP( 0, 0, 40, 900) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetModelCustomGfx, MODEL_o56, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetCustomGfx, CUSTOM_GFX_0, EVT_PTR(N(setup_gfx_candle_lights)), NULL) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetModelCustomGfx, MODEL_o56, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetCustomGfx, CUSTOM_GFX_0, Ref(N(setup_gfx_candle_lights)), NULL) + Exec(N(EVS_SetupMusic)) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; MAP_RODATA_PAD(1, exits); diff --git a/src/world/area_kkj/kkj_18/kkj_18_3_npc.c b/src/world/area_kkj/kkj_18/kkj_18_3_npc.c index 06ff26c2e4e..c791ef25888 100644 --- a/src/world/area_kkj/kkj_18/kkj_18_3_npc.c +++ b/src/world/area_kkj/kkj_18/kkj_18_3_npc.c @@ -7,47 +7,47 @@ #include "world/common/enemy/Koopatrol_Stationary.inc.c" EvtScript N(EVS_NpcIdle_GourmetGuy) = { - EVT_CALL(WaitForPlayerInputEnabled) - EVT_EXEC(N(EVS_ManageGourmetGuyScenes)) - EVT_RETURN - EVT_END + Call(WaitForPlayerInputEnabled) + Exec(N(EVS_ManageGourmetGuyScenes)) + Return + End }; EvtScript N(EVS_NpcInteract_GourmetGuy_Excited) = { - EVT_CALL(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 0, MSG_Peach_00A1) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 0, MSG_Peach_00A1) + Return + End }; EvtScript N(EVS_NpcInteract_GourmetGuy_Scold) = { - EVT_CALL(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 0, MSG_Peach_00A6) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 0, MSG_Peach_00A6) + Return + End }; EvtScript N(EVS_NpcInit_GourmetGuy) = { - EVT_CALL(EnableGroup, MODEL_g12, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g15, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetNpcPos, NPC_SELF, 120, 0, -20) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_IF_EQ(AF_KKJ_FinishedBakingCake, FALSE) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_GourmetGuy_Excited))) - EVT_ELSE - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_GourmetGuy_Scold))) - EVT_END_IF - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_GourmetGuy))) - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy_Knife, ANIM_GourmetGuy_Knife) - EVT_CALL(SetNpcFlagBits, NPC_GourmetGuy_Knife, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(EnableNpcShadow, NPC_GourmetGuy_Knife, FALSE) - EVT_CALL(SetNpcPos, NPC_GourmetGuy_Knife, 60, 40, -15) - EVT_CALL(SetNpcYaw, NPC_GourmetGuy_Knife, 270) - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy_Fork, ANIM_GourmetGuy_Fork) - EVT_CALL(SetNpcFlagBits, NPC_GourmetGuy_Fork, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(EnableNpcShadow, NPC_GourmetGuy_Fork, FALSE) - EVT_CALL(SetNpcPos, NPC_GourmetGuy_Fork, 125, 40, -15) - EVT_CALL(SetNpcYaw, NPC_GourmetGuy_Fork, 270) - EVT_RETURN - EVT_END + Call(EnableGroup, MODEL_g12, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g15, COLLIDER_FLAGS_UPPER_MASK) + Call(SetNpcPos, NPC_SELF, 120, 0, -20) + Call(SetNpcYaw, NPC_SELF, 270) + IfEq(AF_KKJ_FinishedBakingCake, FALSE) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_GourmetGuy_Excited))) + Else + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_GourmetGuy_Scold))) + EndIf + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_GourmetGuy))) + Call(SetNpcAnimation, NPC_GourmetGuy_Knife, ANIM_GourmetGuy_Knife) + Call(SetNpcFlagBits, NPC_GourmetGuy_Knife, NPC_FLAG_INVISIBLE, TRUE) + Call(EnableNpcShadow, NPC_GourmetGuy_Knife, FALSE) + Call(SetNpcPos, NPC_GourmetGuy_Knife, 60, 40, -15) + Call(SetNpcYaw, NPC_GourmetGuy_Knife, 270) + Call(SetNpcAnimation, NPC_GourmetGuy_Fork, ANIM_GourmetGuy_Fork) + Call(SetNpcFlagBits, NPC_GourmetGuy_Fork, NPC_FLAG_INVISIBLE, TRUE) + Call(EnableNpcShadow, NPC_GourmetGuy_Fork, FALSE) + Call(SetNpcPos, NPC_GourmetGuy_Fork, 125, 40, -15) + Call(SetNpcYaw, NPC_GourmetGuy_Fork, 270) + Return + End }; AnimID N(ExtraAnims_GourmetGuy)[] = { diff --git a/src/world/area_kkj/kkj_18/kkj_18_4_gourmet.c b/src/world/area_kkj/kkj_18/kkj_18_4_gourmet.c index c38c863e43c..e31b951724d 100644 --- a/src/world/area_kkj/kkj_18/kkj_18_4_gourmet.c +++ b/src/world/area_kkj/kkj_18/kkj_18_4_gourmet.c @@ -42,621 +42,621 @@ Vec3f N(TwinkDepartPath)[] = { }; EvtScript N(EVS_ApproachPeach) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 16) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcVar, NPC_Koopatrol_01, 0, 1) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 26) - EVT_ADD(LVar2, 2) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim06) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_01, EVT_FLOAT(5.0)) - EVT_WAIT(10) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, -130, -30, 0) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, -130, 30, 0) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(NpcFacePlayer, NPC_Koopatrol_01, 5) - EVT_CALL(SetNpcVar, NPC_Koopatrol_01, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 26) - EVT_SUB(LVar2, 2) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim06) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_02, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_02, -130, -30, 0) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_02, -130, 30, 0) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_02, -100, 30, 0) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_02, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(NpcFacePlayer, NPC_Koopatrol_02, 5) - EVT_END_THREAD - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcVar, NPC_Koopatrol_01, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(10) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 16) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(SetNpcVar, NPC_Koopatrol_01, 0, 1) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar0, 26) + Add(LVar2, 2) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim06) + Call(SetNpcSpeed, NPC_Koopatrol_01, Float(5.0)) + Wait(10) + Call(NpcMoveTo, NPC_Koopatrol_01, -130, -30, 0) + Call(NpcMoveTo, NPC_Koopatrol_01, -130, 30, 0) + Call(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim01) + Call(NpcFacePlayer, NPC_Koopatrol_01, 5) + Call(SetNpcVar, NPC_Koopatrol_01, 0, 0) + EndThread + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 26) + Sub(LVar2, 2) + Call(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim06) + Call(SetNpcSpeed, NPC_Koopatrol_02, Float(5.0)) + Call(NpcMoveTo, NPC_Koopatrol_02, -130, -30, 0) + Call(NpcMoveTo, NPC_Koopatrol_02, -130, 30, 0) + Call(NpcMoveTo, NPC_Koopatrol_02, -100, 30, 0) + Call(NpcMoveTo, NPC_Koopatrol_02, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim01) + Call(NpcFacePlayer, NPC_Koopatrol_02, 5) + EndThread + Call(InterpPlayerYaw, 270, 0) + Loop(0) + Wait(1) + Call(GetNpcVar, NPC_Koopatrol_01, 0, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Wait(10) + Return + End }; EvtScript N(EVS_PickUpPeach) = { - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Koopatrol_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 5) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim12) - EVT_ADD(LVar0, 5) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 5) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Koopatrol_02, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_02, LVar0, LVar2, 5) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim12) - EVT_SUB(LVar0, 5) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_02, LVar0, LVar2, 5) - EVT_END_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Gasp) - EVT_WAIT(1) - EVT_LOOP(4) - EVT_ADD(LVar1, 2) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Carried) - EVT_ADD(LVar0, 10) - EVT_LOOP(5) - EVT_ADD(LVar1, 4) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Thread + Call(GetNpcPos, NPC_Koopatrol_01, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 5) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim12) + Add(LVar0, 5) + Call(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 5) + EndThread + Thread + Call(GetNpcPos, NPC_Koopatrol_02, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(NpcMoveTo, NPC_Koopatrol_02, LVar0, LVar2, 5) + Call(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim12) + Sub(LVar0, 5) + Call(NpcMoveTo, NPC_Koopatrol_02, LVar0, LVar2, 5) + EndThread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerAnimation, ANIM_Peach2_Gasp) + Wait(1) + Loop(4) + Add(LVar1, 2) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(SetPlayerAnimation, ANIM_Peach2_Carried) + Add(LVar0, 10) + Loop(5) + Add(LVar1, 4) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_CarryPeachAway) = { - EVT_CALL(InterpNpcYaw, NPC_Koopatrol_01, 270, 3) - EVT_WAIT(10) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_Koopatrol_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 22) - EVT_SUB(LVar2, 2) - EVT_CALL(SetPlayerPos, LVar0, 30, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcVar, NPC_Koopatrol_01, 0, 1) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim14) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_01, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, -136, 32, 0) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, -136, -28, 0) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, -266, -28, 0) - EVT_CALL(SetNpcVar, NPC_Koopatrol_01, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim14) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_02, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_02, -104, 28, 0) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_02, -104, -32, 0) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_02, -234, -32, 0) - EVT_END_THREAD - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, 0, LVar2) - EVT_CALL(GetNpcVar, NPC_Koopatrol_01, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(InterpNpcYaw, NPC_Koopatrol_01, 270, 3) + Wait(10) + Thread + Loop(0) + Call(GetNpcPos, NPC_Koopatrol_01, LVar0, LVar1, LVar2) + Add(LVar0, 22) + Sub(LVar2, 2) + Call(SetPlayerPos, LVar0, 30, LVar2) + Wait(1) + EndLoop + EndThread + Call(SetNpcVar, NPC_Koopatrol_01, 0, 1) + Thread + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim14) + Call(SetNpcSpeed, NPC_Koopatrol_01, Float(5.0)) + Call(NpcMoveTo, NPC_Koopatrol_01, -136, 32, 0) + Call(NpcMoveTo, NPC_Koopatrol_01, -136, -28, 0) + Call(NpcMoveTo, NPC_Koopatrol_01, -266, -28, 0) + Call(SetNpcVar, NPC_Koopatrol_01, 0, 0) + EndThread + Thread + Call(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim14) + Call(SetNpcSpeed, NPC_Koopatrol_02, Float(5.0)) + Call(NpcMoveTo, NPC_Koopatrol_02, -104, 28, 0) + Call(NpcMoveTo, NPC_Koopatrol_02, -104, -32, 0) + Call(NpcMoveTo, NPC_Koopatrol_02, -234, -32, 0) + EndThread + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, 0, LVar2) + Call(GetNpcVar, NPC_Koopatrol_01, 0, LVar0) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_OpenAndCloseWindow) = { - EVT_CALL(PlaySoundAt, SOUND_WINDOW_OPEN_A, SOUND_SPACE_DEFAULT, 190, 78, -20) - EVT_CALL(MakeLerp, 0, 80, 14, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g15, LVar0, 0, -1, 0) - EVT_CALL(RotateGroup, MODEL_g16, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_CALL(MakeLerp, 80, 0, 14, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g15, LVar0, 0, -1, 0) - EVT_CALL(RotateGroup, MODEL_g16, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAt, SOUND_WINDOW_CLOSE_A, SOUND_SPACE_DEFAULT, 190, 78, -20) - EVT_RETURN - EVT_END + Call(PlaySoundAt, SOUND_WINDOW_OPEN_A, SOUND_SPACE_DEFAULT, 190, 78, -20) + Call(MakeLerp, 0, 80, 14, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g15, LVar0, 0, -1, 0) + Call(RotateGroup, MODEL_g16, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(20) + Call(MakeLerp, 80, 0, 14, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g15, LVar0, 0, -1, 0) + Call(RotateGroup, MODEL_g16, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAt, SOUND_WINDOW_CLOSE_A, SOUND_SPACE_DEFAULT, 190, 78, -20) + Return + End }; EvtScript N(EVS_DropFork) = { - EVT_CALL(SetNpcFlagBits, NPC_GourmetGuy_Fork, NPC_FLAG_INVISIBLE, FALSE) - EVT_CALL(GetNpcPos, NPC_GourmetGuy_Fork, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_GourmetGuy_Fork, EVT_FLOAT(0.05)) - EVT_CALL(NpcJump0, NPC_GourmetGuy_Fork, LVar0, -8, LVar2, 8 * DT) - EVT_CALL(SetNpcRotationPivot, NPC_GourmetGuy_Fork, 15) - EVT_SET(LVar3, 0) - EVT_LOOP(5) - EVT_ADD(LVar3, 50) - EVT_CALL(SetNpcRotation, NPC_GourmetGuy_Fork, 0, 0, LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_ADD(LVar2, 20) - EVT_CALL(SetNpcJumpscale, NPC_GourmetGuy_Fork, EVT_FLOAT(0.2)) - EVT_CALL(NpcJump0, NPC_GourmetGuy_Fork, LVar0, -20, LVar2, 8) - EVT_WAIT(10 * DT) - EVT_CALL(RemoveNpc, NPC_GourmetGuy_Fork) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_GourmetGuy_Fork, NPC_FLAG_INVISIBLE, FALSE) + Call(GetNpcPos, NPC_GourmetGuy_Fork, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_GourmetGuy_Fork, Float(0.05)) + Call(NpcJump0, NPC_GourmetGuy_Fork, LVar0, -8, LVar2, 8 * DT) + Call(SetNpcRotationPivot, NPC_GourmetGuy_Fork, 15) + Set(LVar3, 0) + Loop(5) + Add(LVar3, 50) + Call(SetNpcRotation, NPC_GourmetGuy_Fork, 0, 0, LVar3) + Wait(1) + EndLoop + Add(LVar2, 20) + Call(SetNpcJumpscale, NPC_GourmetGuy_Fork, Float(0.2)) + Call(NpcJump0, NPC_GourmetGuy_Fork, LVar0, -20, LVar2, 8) + Wait(10 * DT) + Call(RemoveNpc, NPC_GourmetGuy_Fork) + Return + End }; EvtScript N(EVS_DropKnife) = { - EVT_CALL(SetNpcFlagBits, NPC_GourmetGuy_Knife, NPC_FLAG_INVISIBLE, FALSE) - EVT_CALL(GetNpcPos, NPC_GourmetGuy_Knife, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcRotation, NPC_GourmetGuy_Knife, 0, 0, -25) - EVT_CALL(SetNpcJumpscale, NPC_GourmetGuy_Knife, EVT_FLOAT(0.05)) - EVT_CALL(NpcJump0, NPC_GourmetGuy_Knife, LVar0, -8, LVar2, 8 * DT) - EVT_CALL(SetNpcRotationPivot, NPC_GourmetGuy_Knife, 15) - EVT_SET(LVar3, 0) - EVT_LOOP(5) - EVT_SUB(LVar3, 50) - EVT_CALL(SetNpcRotation, NPC_GourmetGuy_Knife, 0, 0, LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_ADD(LVar2, 20) - EVT_CALL(SetNpcJumpscale, NPC_GourmetGuy_Knife, EVT_FLOAT(0.2)) - EVT_CALL(NpcJump0, NPC_GourmetGuy_Knife, LVar0, -20, LVar2, -100) - EVT_WAIT(10 * DT) - EVT_CALL(RemoveNpc, NPC_GourmetGuy_Knife) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_GourmetGuy_Knife, NPC_FLAG_INVISIBLE, FALSE) + Call(GetNpcPos, NPC_GourmetGuy_Knife, LVar0, LVar1, LVar2) + Call(SetNpcRotation, NPC_GourmetGuy_Knife, 0, 0, -25) + Call(SetNpcJumpscale, NPC_GourmetGuy_Knife, Float(0.05)) + Call(NpcJump0, NPC_GourmetGuy_Knife, LVar0, -8, LVar2, 8 * DT) + Call(SetNpcRotationPivot, NPC_GourmetGuy_Knife, 15) + Set(LVar3, 0) + Loop(5) + Sub(LVar3, 50) + Call(SetNpcRotation, NPC_GourmetGuy_Knife, 0, 0, LVar3) + Wait(1) + EndLoop + Add(LVar2, 20) + Call(SetNpcJumpscale, NPC_GourmetGuy_Knife, Float(0.2)) + Call(NpcJump0, NPC_GourmetGuy_Knife, LVar0, -20, LVar2, -100) + Wait(10 * DT) + Call(RemoveNpc, NPC_GourmetGuy_Knife) + Return + End }; EvtScript N(EVS_GourmetGuy_LovesCake) = { - EVT_THREAD - EVT_CALL(ShowMessageAtScreenPos, MSG_Peach_00AB, 160, 40) - EVT_END_THREAD - EVT_EXEC(N(EVS_DropFork)) - EVT_EXEC(N(EVS_DropKnife)) - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Surprise) - EVT_WAIT(1) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 90, 65, 10) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 90, 65, 10) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 170) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 12, EVT_FLOAT(-2.5)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(110.0), EVT_FLOAT(45.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(20.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlaySoundAtNpc, NPC_GourmetGuy, SOUND_GOURMET_GUY_SHOCK_1, SOUND_SPACE_DEFAULT) - EVT_WAIT(33 * DT) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(65.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(7.5), EVT_FLOAT(-1.3)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlaySoundAtNpc, NPC_GourmetGuy, SOUND_GOURMET_GUY_SHOCK_2, SOUND_SPACE_DEFAULT) - EVT_WAIT(33 * DT) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(3.5), 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlaySoundAtNpc, NPC_GourmetGuy, SOUND_GOURMET_GUY_SHOCK_3, SOUND_SPACE_DEFAULT) - EVT_WAIT(18 * DT) - EVT_CALL(SetMusicTrack, 0, SONG_GOURMET_GUY_FREAKOUT, 0, 8) - EVT_WAIT(30 * DT) - EVT_CALL(SetMotionBlurParams, 0, 0, 0, 320, 240, 128, 10) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(12.0)) - EVT_LOOP(7) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 65) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_LOOP - EVT_CALL(N(SpinCameraAround)) - EVT_CALL(N(SpinCameraAround)) - EVT_CALL(N(SpinCameraAround)) - EVT_CALL(SetMotionBlurParams, 0, 0, 0, 320, 240, 0, 10) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 120, 0, 10) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 120, 0, 10) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_RETURN - EVT_END + Thread + Call(ShowMessageAtScreenPos, MSG_Peach_00AB, 160, 40) + EndThread + Exec(N(EVS_DropFork)) + Exec(N(EVS_DropKnife)) + Call(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Surprise) + Wait(1) + Call(UseSettingsFrom, CAM_DEFAULT, 90, 65, 10) + Call(SetPanTarget, CAM_DEFAULT, 90, 65, 10) + Call(SetCamDistance, CAM_DEFAULT, 170) + Call(SetCamPitch, CAM_DEFAULT, 12, Float(-2.5)) + Call(SetCamPosB, CAM_DEFAULT, Float(110.0), Float(45.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(20.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlaySoundAtNpc, NPC_GourmetGuy, SOUND_GOURMET_GUY_SHOCK_1, SOUND_SPACE_DEFAULT) + Wait(33 * DT) + Call(SetCamDistance, CAM_DEFAULT, Float(65.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(7.5), Float(-1.3)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlaySoundAtNpc, NPC_GourmetGuy, SOUND_GOURMET_GUY_SHOCK_2, SOUND_SPACE_DEFAULT) + Wait(33 * DT) + Call(SetCamDistance, CAM_DEFAULT, Float(1.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(3.5), 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlaySoundAtNpc, NPC_GourmetGuy, SOUND_GOURMET_GUY_SHOCK_3, SOUND_SPACE_DEFAULT) + Wait(18 * DT) + Call(SetMusicTrack, 0, SONG_GOURMET_GUY_FREAKOUT, 0, 8) + Wait(30 * DT) + Call(SetMotionBlurParams, 0, 0, 0, 320, 240, 128, 10) + Call(SetCamSpeed, CAM_DEFAULT, Float(12.0)) + Loop(7) + Call(SetCamDistance, CAM_DEFAULT, 65) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetCamDistance, CAM_DEFAULT, 1) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndLoop + Call(N(SpinCameraAround)) + Call(N(SpinCameraAround)) + Call(N(SpinCameraAround)) + Call(SetMotionBlurParams, 0, 0, 0, 320, 240, 0, 10) + Call(UseSettingsFrom, CAM_DEFAULT, 120, 0, 10) + Call(SetPanTarget, CAM_DEFAULT, 120, 0, 10) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Return + End }; EvtScript N(EVS_GourmetGuy_RunAround) = { - EVT_CALL(PlaySoundAtNpc, NPC_GourmetGuy, SOUND_GOURMET_GUY_RUN, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Leap) - EVT_CALL(SetNpcJumpscale, NPC_GourmetGuy, EVT_FLOAT(0.001953125)) - EVT_CALL(GetNpcPos, NPC_GourmetGuy, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_GourmetGuy, LVar0, 200, LVar2, 15 * DT) - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Panic) - EVT_CALL(SetNpcFlagBits, NPC_GourmetGuy, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcSpeed, NPC_GourmetGuy, EVT_FLOAT(20.0 / DT)) - EVT_CALL(PlaySoundAtNpc, NPC_GourmetGuy, SOUND_GOURMET_GUY_RUN, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcRotation, NPC_GourmetGuy, 0, 0, -45) - EVT_CALL(SetNpcYaw, NPC_GourmetGuy, 90) - EVT_CALL(MakeLerp, 0, 100, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, EVT_FLOAT(3.3)) - EVT_SETF(LVar3, EVT_FLOAT(-2.3)) - EVT_MULF(LVar2, LVar0) - EVT_MULF(LVar3, LVar0) - EVT_ADDF(LVar2, EVT_FLOAT(-100.0)) - EVT_ADDF(LVar3, EVT_FLOAT(150.0)) - EVT_SETF(LVar4, EVT_FLOAT(100.0)) - EVT_CALL(SetNpcPos, NPC_GourmetGuy, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcRotation, NPC_GourmetGuy, 0, 0, 0) - EVT_CALL(PlaySoundAtNpc, NPC_GourmetGuy, SOUND_GOURMET_GUY_RUN, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcFlagBits, NPC_GourmetGuy, NPC_FLAG_UPSIDE_DOWN, TRUE) - EVT_CALL(SetNpcYaw, NPC_GourmetGuy, 270) - EVT_CALL(SetNpcPos, NPC_GourmetGuy, 250, 160, 50) - EVT_CALL(NpcMoveTo, NPC_GourmetGuy, -100, 50, 0) - EVT_CALL(SetNpcFlagBits, NPC_GourmetGuy, NPC_FLAG_UPSIDE_DOWN, FALSE) - EVT_WAIT(20 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_GourmetGuy, SOUND_GOURMET_GUY_RUN, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcYaw, NPC_GourmetGuy, 90) - EVT_CALL(SetNpcPos, NPC_GourmetGuy, -100, 0, 70) - EVT_CALL(NpcMoveTo, NPC_GourmetGuy, 140, 70, 0) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcVar, NPC_GourmetGuy, 0, 0) - EVT_RETURN - EVT_END + Call(PlaySoundAtNpc, NPC_GourmetGuy, SOUND_GOURMET_GUY_RUN, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Leap) + Call(SetNpcJumpscale, NPC_GourmetGuy, Float(0.001953125)) + Call(GetNpcPos, NPC_GourmetGuy, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_GourmetGuy, LVar0, 200, LVar2, 15 * DT) + Call(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Panic) + Call(SetNpcFlagBits, NPC_GourmetGuy, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcSpeed, NPC_GourmetGuy, Float(20.0 / DT)) + Call(PlaySoundAtNpc, NPC_GourmetGuy, SOUND_GOURMET_GUY_RUN, SOUND_SPACE_DEFAULT) + Call(SetNpcRotation, NPC_GourmetGuy, 0, 0, -45) + Call(SetNpcYaw, NPC_GourmetGuy, 90) + Call(MakeLerp, 0, 100, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, Float(3.3)) + SetF(LVar3, Float(-2.3)) + MulF(LVar2, LVar0) + MulF(LVar3, LVar0) + AddF(LVar2, Float(-100.0)) + AddF(LVar3, Float(150.0)) + SetF(LVar4, Float(100.0)) + Call(SetNpcPos, NPC_GourmetGuy, LVar2, LVar3, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(20 * DT) + Call(SetNpcRotation, NPC_GourmetGuy, 0, 0, 0) + Call(PlaySoundAtNpc, NPC_GourmetGuy, SOUND_GOURMET_GUY_RUN, SOUND_SPACE_DEFAULT) + Call(SetNpcFlagBits, NPC_GourmetGuy, NPC_FLAG_UPSIDE_DOWN, TRUE) + Call(SetNpcYaw, NPC_GourmetGuy, 270) + Call(SetNpcPos, NPC_GourmetGuy, 250, 160, 50) + Call(NpcMoveTo, NPC_GourmetGuy, -100, 50, 0) + Call(SetNpcFlagBits, NPC_GourmetGuy, NPC_FLAG_UPSIDE_DOWN, FALSE) + Wait(20 * DT) + Call(PlaySoundAtNpc, NPC_GourmetGuy, SOUND_GOURMET_GUY_RUN, SOUND_SPACE_DEFAULT) + Call(SetNpcYaw, NPC_GourmetGuy, 90) + Call(SetNpcPos, NPC_GourmetGuy, -100, 0, 70) + Call(NpcMoveTo, NPC_GourmetGuy, 140, 70, 0) + Wait(20 * DT) + Call(SetNpcVar, NPC_GourmetGuy, 0, 0) + Return + End }; EvtScript N(EVS_RejectCake) = { - EVT_CALL(PlaySoundAtNpc, NPC_GourmetGuy, SOUND_SPIT_OUT, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_SpitOut) - EVT_CALL(MakeItemEntity, MV_CakeItemIdx, 105, 30, 20, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_CALL(MakeLerp, 0, 100, 4, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, EVT_FLOAT(0.2)) - EVT_SETF(LVar3, EVT_FLOAT(-0.3)) - EVT_SETF(LVar4, EVT_FLOAT(0.5)) - EVT_MULF(LVar2, LVar0) - EVT_MULF(LVar3, LVar0) - EVT_MULF(LVar4, LVar0) - EVT_ADDF(LVar2, EVT_FLOAT(105.0)) - EVT_ADDF(LVar3, EVT_FLOAT(30.0)) - EVT_ADDF(LVar4, EVT_FLOAT(20.0)) - EVT_CALL(SetItemPos, LVarA, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 0, 100, 4, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, EVT_FLOAT(0.2)) - EVT_SETF(LVar3, EVT_FLOAT(0.3)) - EVT_SETF(LVar4, EVT_FLOAT(0.5)) - EVT_MULF(LVar2, LVar0) - EVT_MULF(LVar3, LVar0) - EVT_MULF(LVar4, LVar0) - EVT_ADDF(LVar2, EVT_FLOAT(125.0)) - EVT_ADDF(LVar3, EVT_FLOAT(0.0)) - EVT_ADDF(LVar4, EVT_FLOAT(70.0)) - EVT_CALL(SetItemPos, LVarA, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(RemoveItemEntity, LVarA) - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Idle) - EVT_CALL(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 5, MSG_Peach_00A5) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 120, 0, 10) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 120, 0, 10) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_SWITCH(AB_KKJ_CompletedBakeStep) - EVT_CASE_EQ(CAKE_TYPE_BAKED) - EVT_CALL(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 5, MSG_Peach_00AA) - EVT_CASE_EQ(CAKE_TYPE_READY_TO_BAKE) - EVT_CALL(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 5, MSG_Peach_00A9) - EVT_CASE_EQ(CAKE_TYPE_READY_TO_MIX) - EVT_CALL(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 5, MSG_Peach_00A8) - EVT_CASE_OR_EQ(CAKE_TYPE_BEGUN) - EVT_CASE_OR_EQ(CAKE_TYPE_MIXED) - EVT_CALL(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 5, MSG_Peach_00A7) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Walk) - EVT_CALL(SetNpcJumpscale, NPC_GourmetGuy, 0) - EVT_CALL(NpcJump1, NPC_GourmetGuy, 120, 0, -20, 15 * DT) - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Idle) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_RETURN - EVT_END + Call(PlaySoundAtNpc, NPC_GourmetGuy, SOUND_SPIT_OUT, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_SpitOut) + Call(MakeItemEntity, MV_CakeItemIdx, 105, 30, 20, ITEM_SPAWN_MODE_DECORATION, 0) + Call(MakeLerp, 0, 100, 4, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, Float(0.2)) + SetF(LVar3, Float(-0.3)) + SetF(LVar4, Float(0.5)) + MulF(LVar2, LVar0) + MulF(LVar3, LVar0) + MulF(LVar4, LVar0) + AddF(LVar2, Float(105.0)) + AddF(LVar3, Float(30.0)) + AddF(LVar4, Float(20.0)) + Call(SetItemPos, LVarA, LVar2, LVar3, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 0, 100, 4, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, Float(0.2)) + SetF(LVar3, Float(0.3)) + SetF(LVar4, Float(0.5)) + MulF(LVar2, LVar0) + MulF(LVar3, LVar0) + MulF(LVar4, LVar0) + AddF(LVar2, Float(125.0)) + AddF(LVar3, Float(0.0)) + AddF(LVar4, Float(70.0)) + Call(SetItemPos, LVarA, LVar2, LVar3, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(RemoveItemEntity, LVarA) + Call(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Idle) + Call(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 5, MSG_Peach_00A5) + Call(UseSettingsFrom, CAM_DEFAULT, 120, 0, 10) + Call(SetPanTarget, CAM_DEFAULT, 120, 0, 10) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Switch(AB_KKJ_CompletedBakeStep) + CaseEq(CAKE_TYPE_BAKED) + Call(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 5, MSG_Peach_00AA) + CaseEq(CAKE_TYPE_READY_TO_BAKE) + Call(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 5, MSG_Peach_00A9) + CaseEq(CAKE_TYPE_READY_TO_MIX) + Call(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 5, MSG_Peach_00A8) + CaseOrEq(CAKE_TYPE_BEGUN) + CaseOrEq(CAKE_TYPE_MIXED) + Call(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 5, MSG_Peach_00A7) + EndCaseGroup + EndSwitch + Call(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Walk) + Call(SetNpcJumpscale, NPC_GourmetGuy, 0) + Call(NpcJump1, NPC_GourmetGuy, 120, 0, -20, 15 * DT) + Call(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Idle) + Call(ResetCam, CAM_DEFAULT, Float(1.0 / DT)) + Return + End }; EvtScript N(EVS_SweatyPeach) = { - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Gasp) - EVT_WAIT(10) - EVT_CALL(InterpPlayerYaw, 90, 5) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 35) - EVT_LOOP(0) - EVT_CALL(ShowSweat, 0, 1, -45, EMOTER_POS, LVar0, LVar1, LVar2, 13, 20) - EVT_WAIT(20) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetPlayerAnimation, ANIM_Peach2_Gasp) + Wait(10) + Call(InterpPlayerYaw, 90, 5) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 35) + Loop(0) + Call(ShowSweat, 0, 1, -45, EMOTER_POS, LVar0, LVar1, LVar2, 13, 20) + Wait(20) + EndLoop + Return + End }; EvtScript N(EVS_Scene_GiveKitchenKey) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 0, MSG_Peach_009A) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PlayerMoveTo, -125, 40, 0) - EVT_CALL(PlayerMoveTo, 50, 40, 0) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 5, MSG_Peach_009B) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4.0 / DT), 35, 300, EVT_FLOAT(17.0), EVT_FLOAT(-11.0)) - EVT_CALL(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 5, MSG_Peach_009C) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_RaiseArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_009D) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LowerArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_CALL(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 5, MSG_Peach_009E) - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Walk) - EVT_CALL(NpcMoveTo, NPC_GourmetGuy, 100, -20, 10 * DT) - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Idle) - EVT_CALL(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 5, MSG_Peach_009F) - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Inspect) - EVT_WAIT(30 * DT) - EVT_SET(LVar0, ITEM_PEACH_KEY1) - EVT_CALL(ShowGotItem, LVar0, TRUE, 0) - EVT_CALL(AddKeyItem, LVar0) - EVT_SET(GF_KKJ18_GourmetGuy_GaveKey, TRUE) - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Walk) - EVT_CALL(SetNpcJumpscale, NPC_GourmetGuy, 0) - EVT_CALL(NpcJump1, NPC_GourmetGuy, 120, 0, -20, 10) - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Idle) - EVT_CALL(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 5, MSG_Peach_00A0) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 0, MSG_Peach_009A) + Wait(10 * DT) + Call(SetPlayerSpeed, Float(4.0 / DT)) + Call(PlayerMoveTo, -125, 40, 0) + Call(PlayerMoveTo, 50, 40, 0) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 5, MSG_Peach_009B) + Call(AdjustCam, CAM_DEFAULT, Float(4.0 / DT), 35, 300, Float(17.0), Float(-11.0)) + Call(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 5, MSG_Peach_009C) + Call(SetPlayerAnimation, ANIM_Peach2_RaiseArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_009D) + Call(SetPlayerAnimation, ANIM_Peach2_LowerArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Call(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 5, MSG_Peach_009E) + Call(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Walk) + Call(NpcMoveTo, NPC_GourmetGuy, 100, -20, 10 * DT) + Call(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Idle) + Call(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 5, MSG_Peach_009F) + Call(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Inspect) + Wait(30 * DT) + Set(LVar0, ITEM_PEACH_KEY1) + Call(ShowGotItem, LVar0, TRUE, 0) + Call(AddKeyItem, LVar0) + Set(GF_KKJ18_GourmetGuy_GaveKey, TRUE) + Call(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Walk) + Call(SetNpcJumpscale, NPC_GourmetGuy, 0) + Call(NpcJump1, NPC_GourmetGuy, 120, 0, -20, 10) + Call(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Idle) + Call(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 5, MSG_Peach_00A0) + Call(ResetCam, CAM_DEFAULT, Float(4.0 / DT)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Scene_JudgeCake) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_EQ(AB_KKJ19_AddedBerries, FALSE) - EVT_SET(MV_CakeItemIdx, ITEM_CAKE_WITH_ICING) - EVT_SET(LVar0, ANIM_Peach3_PresentBerryCake) - EVT_SET(LVar1, ANIM_Peach1_HoldIcingCake) - EVT_ELSE - EVT_IF_EQ(AB_KKJ19_AddedIcing, FALSE) - EVT_SET(MV_CakeItemIdx, ITEM_CAKE_WITH_BERRIES) - EVT_SET(LVar0, ANIM_Peach3_PresentIcingCake) - EVT_SET(LVar1, ANIM_Peach1_HoldBerryCake) - EVT_ELSE - EVT_SET(MV_CakeItemIdx, ITEM_CAKE_DONE) - EVT_SET(LVar0, ANIM_Peach3_PresentCompleteCake) - EVT_SET(LVar1, ANIM_Peach1_HoldCompleteCake) - EVT_END_IF - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_PLAYER, LVar0, LVar1, 5, MSG_Peach_00A2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 120, 0, 10) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 120, 0, 10) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 5, MSG_Peach_00A3) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(2.0 / DT)) - EVT_CALL(PlayerMoveTo, -125, 40, 0) - EVT_CALL(PlayerMoveTo, 15, 40, 0) - EVT_WAIT(10 * DT) - EVT_CALL(MakeItemEntity, MV_CakeItemIdx, 25, 25, -20, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_CALL(SetNpcVar, NPC_GourmetGuy, 7, LVar0) - EVT_SET(AF_KKJ_FinishedBakingCake, FALSE) - EVT_CALL(N(SetHeldBakingItem), PEACH_BAKING_NONE) - EVT_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(NpcFlyTo, NPC_PARTNER, -23, 30, 36, 5 * DT, 0, EASING_LINEAR) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 5) - EVT_END_THREAD - EVT_CALL(PlayerMoveTo, 17, 36, 5 * DT) - EVT_CALL(InterpPlayerYaw, 90, 5) - EVT_CALL(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 5, MSG_Peach_00A4) - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Walk) - EVT_CALL(NpcMoveTo, NPC_GourmetGuy, 90, -20, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Idle) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 90, 0, 10) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 90, 0, 10) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 17, -14) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(110.0), EVT_FLOAT(45.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcVar, NPC_GourmetGuy, 7, LVarA) - EVT_CALL(RemoveItemEntity, LVarA) - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Eat) - EVT_LOOP(6) - EVT_WAIT(10 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_GourmetGuy, SOUND_EAT_OR_DRINK, SOUND_SPACE_DEFAULT) - EVT_END_LOOP - EVT_IF_NE(AB_KKJ_CompletedBakeStep, CAKE_TYPE_DONE) - EVT_EXEC_WAIT(N(EVS_RejectCake)) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetEnemyFlagBits, NPC_GourmetGuy, ENEMY_FLAG_CANT_INTERACT, 1) - EVT_EXEC_WAIT(N(EVS_GourmetGuy_LovesCake)) - EVT_CALL(SetNpcVar, NPC_GourmetGuy, 0, 1) - EVT_EXEC(N(EVS_GourmetGuy_RunAround)) - EVT_LOOP(0) - EVT_CALL(PlayerFaceNpc, NPC_GourmetGuy, FALSE) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_GourmetGuy, 0) - EVT_WAIT(1) - EVT_CALL(GetNpcVar, NPC_GourmetGuy, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Idle) - EVT_CALL(InterpNpcYaw, NPC_GourmetGuy, 270, 5) - EVT_CALL(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 0, MSG_Peach_00AC) - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Walk) - EVT_CALL(SetNpcSpeed, NPC_GourmetGuy, EVT_FLOAT(2.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_GourmetGuy, 80, 70, 0) - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Idle) - EVT_CALL(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 0, MSG_Peach_00AD) - EVT_THREAD - EVT_LOOP(100) - EVT_CALL(PlayerFaceNpc, NPC_GourmetGuy, FALSE) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_GourmetGuy, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Walk) - EVT_CALL(NpcMoveTo, NPC_GourmetGuy, -250, 70, 0) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(2.0 / DT), -20, 300, EVT_FLOAT(17.0), EVT_FLOAT(-10.0)) - EVT_CALL(InterpPlayerYaw, 270, 5) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_RaiseArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_00AE) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00AF) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_00B0) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LowerArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00B1) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 120, 0, 10) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 150, 0, 10) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 400) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.2 / DT)) - EVT_CALL(LoadPath, 60 * DT, EVT_PTR(N(TwinkDepartPath)), ARRAY_COUNT(N(TwinkDepartPath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 16, MSG_Peach_00B2) - EVT_EXEC(N(EVS_OpenAndCloseWindow)) - EVT_WAIT(14 * DT) - EVT_CALL(NpcFlyTo, NPC_PARTNER, 250, 70, -25, 30 * DT, 0, EASING_LINEAR) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcPos, NPC_Koopatrol_01, -250, 0, -30) - EVT_CALL(SetNpcPos, NPC_Koopatrol_02, -250, 0, -30) - EVT_CALL(SetNpcPos, NPC_Kammy, -250, 0, -30) - EVT_CALL(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, MSG_Peach_00B3) - EVT_CALL(SetMusicTrack, 0, SONG_KAMMY_KOOPA_THEME, 0, 8) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -180, 0, -30) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -180, 0, -30) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-110.0), EVT_FLOAT(45.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_OPEN, 0) - EVT_CALL(MakeLerp, 0, -120, 14, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o9, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_THREAD - EVT_WAIT(60 * DT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -30) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 400) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim02) - EVT_CALL(SetNpcSpeed, NPC_Kammy, EVT_FLOAT(2.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Kammy, -130, -30, 0) - EVT_CALL(NpcMoveTo, NPC_Kammy, -120, 80, 0) - EVT_CALL(NpcMoveTo, NPC_Kammy, -70, 80, 0) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) - EVT_EXEC_GET_TID(N(EVS_SweatyPeach), LVarA) - EVT_CALL(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, MSG_Peach_00B4) - EVT_CALL(EndSpeech, NPC_Kammy, ANIM_WorldKammy_Anim05, ANIM_WorldKammy_Anim05, 5) - EVT_CALL(SpeakToNpc, NPC_Kammy, ANIM_WorldKammy_Anim05, ANIM_WorldKammy_Anim01, 0, NPC_Koopatrol_01, MSG_Peach_00B5) - EVT_KILL_THREAD(LVarA) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_EXEC_WAIT(N(EVS_ApproachPeach)) - EVT_EXEC_WAIT(N(EVS_PickUpPeach)) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Carried, ANIM_Peach2_Carried, 5, MSG_Peach_00B6) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(InterpNpcYaw, NPC_Kammy, 270, 5) - EVT_END_THREAD - EVT_EXEC_WAIT(N(EVS_CarryPeachAway)) - EVT_CALL(FadeOutMusic, 0, 1000 * DT) - EVT_EXEC_WAIT(N(EVS_EndPeachChapter4)) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + IfEq(AB_KKJ19_AddedBerries, FALSE) + Set(MV_CakeItemIdx, ITEM_CAKE_WITH_ICING) + Set(LVar0, ANIM_Peach3_PresentBerryCake) + Set(LVar1, ANIM_Peach1_HoldIcingCake) + Else + IfEq(AB_KKJ19_AddedIcing, FALSE) + Set(MV_CakeItemIdx, ITEM_CAKE_WITH_BERRIES) + Set(LVar0, ANIM_Peach3_PresentIcingCake) + Set(LVar1, ANIM_Peach1_HoldBerryCake) + Else + Set(MV_CakeItemIdx, ITEM_CAKE_DONE) + Set(LVar0, ANIM_Peach3_PresentCompleteCake) + Set(LVar1, ANIM_Peach1_HoldCompleteCake) + EndIf + EndIf + Call(SpeakToPlayer, NPC_PLAYER, LVar0, LVar1, 5, MSG_Peach_00A2) + Call(UseSettingsFrom, CAM_DEFAULT, 120, 0, 10) + Call(SetPanTarget, CAM_DEFAULT, 120, 0, 10) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 5, MSG_Peach_00A3) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Call(SetPlayerSpeed, Float(2.0 / DT)) + Call(PlayerMoveTo, -125, 40, 0) + Call(PlayerMoveTo, 15, 40, 0) + Wait(10 * DT) + Call(MakeItemEntity, MV_CakeItemIdx, 25, 25, -20, ITEM_SPAWN_MODE_DECORATION, 0) + Call(SetNpcVar, NPC_GourmetGuy, 7, LVar0) + Set(AF_KKJ_FinishedBakingCake, FALSE) + Call(N(SetHeldBakingItem), PEACH_BAKING_NONE) + Thread + Call(DisablePartnerAI, 0) + Call(NpcFlyTo, NPC_PARTNER, -23, 30, 36, 5 * DT, 0, EASING_LINEAR) + Call(InterpNpcYaw, NPC_PARTNER, 90, 5) + EndThread + Call(PlayerMoveTo, 17, 36, 5 * DT) + Call(InterpPlayerYaw, 90, 5) + Call(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 5, MSG_Peach_00A4) + Call(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Walk) + Call(NpcMoveTo, NPC_GourmetGuy, 90, -20, 20 * DT) + Call(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Idle) + Call(UseSettingsFrom, CAM_DEFAULT, 90, 0, 10) + Call(SetPanTarget, CAM_DEFAULT, 90, 0, 10) + Call(SetCamDistance, CAM_DEFAULT, 250) + Call(SetCamPitch, CAM_DEFAULT, 17, -14) + Call(SetCamPosB, CAM_DEFAULT, Float(110.0), Float(45.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(GetNpcVar, NPC_GourmetGuy, 7, LVarA) + Call(RemoveItemEntity, LVarA) + Call(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Eat) + Loop(6) + Wait(10 * DT) + Call(PlaySoundAtNpc, NPC_GourmetGuy, SOUND_EAT_OR_DRINK, SOUND_SPACE_DEFAULT) + EndLoop + IfNe(AB_KKJ_CompletedBakeStep, CAKE_TYPE_DONE) + ExecWait(N(EVS_RejectCake)) + Call(EnablePartnerAI) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + EndIf + Call(SetEnemyFlagBits, NPC_GourmetGuy, ENEMY_FLAG_CANT_INTERACT, 1) + ExecWait(N(EVS_GourmetGuy_LovesCake)) + Call(SetNpcVar, NPC_GourmetGuy, 0, 1) + Exec(N(EVS_GourmetGuy_RunAround)) + Loop(0) + Call(PlayerFaceNpc, NPC_GourmetGuy, FALSE) + Call(NpcFaceNpc, NPC_PARTNER, NPC_GourmetGuy, 0) + Wait(1) + Call(GetNpcVar, NPC_GourmetGuy, 0, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_SetupMusic)) + Call(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Idle) + Call(InterpNpcYaw, NPC_GourmetGuy, 270, 5) + Call(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 0, MSG_Peach_00AC) + Call(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Walk) + Call(SetNpcSpeed, NPC_GourmetGuy, Float(2.0 / DT)) + Call(NpcMoveTo, NPC_GourmetGuy, 80, 70, 0) + Call(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Idle) + Call(SpeakToPlayer, NPC_GourmetGuy, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 0, MSG_Peach_00AD) + Thread + Loop(100) + Call(PlayerFaceNpc, NPC_GourmetGuy, FALSE) + Call(NpcFaceNpc, NPC_PARTNER, NPC_GourmetGuy, 0) + Wait(1) + EndLoop + EndThread + Call(SetNpcAnimation, NPC_GourmetGuy, ANIM_GourmetGuy_Walk) + Call(NpcMoveTo, NPC_GourmetGuy, -250, 70, 0) + Call(AdjustCam, CAM_DEFAULT, Float(2.0 / DT), -20, 300, Float(17.0), Float(-10.0)) + Call(InterpPlayerYaw, 270, 5) + Call(SetPlayerAnimation, ANIM_Peach2_RaiseArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_00AE) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00AF) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_00B0) + Call(SetPlayerAnimation, ANIM_Peach2_LowerArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00B1) + Call(UseSettingsFrom, CAM_DEFAULT, 120, 0, 10) + Call(SetPanTarget, CAM_DEFAULT, 150, 0, 10) + Call(SetCamDistance, CAM_DEFAULT, 400) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.2 / DT)) + Call(LoadPath, 60 * DT, Ref(N(TwinkDepartPath)), ARRAY_COUNT(N(TwinkDepartPath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 16, MSG_Peach_00B2) + Exec(N(EVS_OpenAndCloseWindow)) + Wait(14 * DT) + Call(NpcFlyTo, NPC_PARTNER, 250, 70, -25, 30 * DT, 0, EASING_LINEAR) + Wait(30 * DT) + Call(SetNpcPos, NPC_Koopatrol_01, -250, 0, -30) + Call(SetNpcPos, NPC_Koopatrol_02, -250, 0, -30) + Call(SetNpcPos, NPC_Kammy, -250, 0, -30) + Call(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, MSG_Peach_00B3) + Call(SetMusicTrack, 0, SONG_KAMMY_KOOPA_THEME, 0, 8) + Call(UseSettingsFrom, CAM_DEFAULT, -180, 0, -30) + Call(SetPanTarget, CAM_DEFAULT, -180, 0, -30) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(-110.0), Float(45.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_OPEN, 0) + Call(MakeLerp, 0, -120, 14, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o9, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Thread + Wait(60 * DT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, -30) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 400) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + EndThread + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim02) + Call(SetNpcSpeed, NPC_Kammy, Float(2.0 / DT)) + Call(NpcMoveTo, NPC_Kammy, -130, -30, 0) + Call(NpcMoveTo, NPC_Kammy, -120, 80, 0) + Call(NpcMoveTo, NPC_Kammy, -70, 80, 0) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) + ExecGetTID(N(EVS_SweatyPeach), LVarA) + Call(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 0, MSG_Peach_00B4) + Call(EndSpeech, NPC_Kammy, ANIM_WorldKammy_Anim05, ANIM_WorldKammy_Anim05, 5) + Call(SpeakToNpc, NPC_Kammy, ANIM_WorldKammy_Anim05, ANIM_WorldKammy_Anim01, 0, NPC_Koopatrol_01, MSG_Peach_00B5) + KillThread(LVarA) + Call(DisablePlayerPhysics, TRUE) + ExecWait(N(EVS_ApproachPeach)) + ExecWait(N(EVS_PickUpPeach)) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Carried, ANIM_Peach2_Carried, 5, MSG_Peach_00B6) + Thread + Wait(30) + Call(InterpNpcYaw, NPC_Kammy, 270, 5) + EndThread + ExecWait(N(EVS_CarryPeachAway)) + Call(FadeOutMusic, 0, 1000 * DT) + ExecWait(N(EVS_EndPeachChapter4)) + Call(EnablePartnerAI) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_ManageGourmetGuyScenes) = { - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_IF_EQ(GF_KKJ18_GourmetGuy_GaveKey, FALSE) - EVT_EXEC_WAIT(N(EVS_Scene_GiveKitchenKey)) - EVT_END_IF - EVT_IF_EQ(AF_KKJ_FinishedBakingCake, TRUE) - EVT_EXEC_WAIT(N(EVS_Scene_JudgeCake)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + IfEq(GF_KKJ18_GourmetGuy_GaveKey, FALSE) + ExecWait(N(EVS_Scene_GiveKitchenKey)) + EndIf + IfEq(AF_KKJ_FinishedBakingCake, TRUE) + ExecWait(N(EVS_Scene_JudgeCake)) + EndIf + Return + End }; diff --git a/src/world/area_kkj/kkj_19/kkj_19_1_music.c b/src/world/area_kkj/kkj_19/kkj_19_1_music.c index b33e42a23d1..ac4c0aea451 100644 --- a/src/world/area_kkj/kkj_19/kkj_19_1_music.c +++ b/src/world/area_kkj/kkj_19/kkj_19_1_music.c @@ -1,16 +1,16 @@ #include "kkj_19.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_EQ(GB_StoryProgress, STORY_INTRO) - EVT_CALL(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 7) - EVT_WAIT(3) - EVT_CALL(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 6) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GB_StoryProgress, STORY_CH4_BEGAN_PEACH_MISSION) - EVT_CALL(SetMusicTrack, 0, SONG_PEACH_MISSION, 0, 8) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_INTRO) + Call(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 7) + Wait(3) + Call(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 6) + Return + EndIf + IfEq(GB_StoryProgress, STORY_CH4_BEGAN_PEACH_MISSION) + Call(SetMusicTrack, 0, SONG_PEACH_MISSION, 0, 8) + Return + EndIf + Return + End }; diff --git a/src/world/area_kkj/kkj_19/kkj_19_2_main.c b/src/world/area_kkj/kkj_19/kkj_19_2_main.c index 127745a0114..87930b8062b 100644 --- a/src/world/area_kkj/kkj_19/kkj_19_2_main.c +++ b/src/world/area_kkj/kkj_19/kkj_19_2_main.c @@ -86,9 +86,9 @@ void N(draw_content_ingredient_desc)( } EvtScript N(EVS_TouchFloor_IngredientStation) = { - EVT_CALL(N(TryOpenIngredientWindows), LVar0) - EVT_RETURN - EVT_END + Call(N(TryOpenIngredientWindows), LVar0) + Return + End }; WindowStyleCustom N(IngredientNameWS) = { @@ -156,61 +156,61 @@ API_CALLABLE(N(CreateIngredientInfoWindows)) { } EvtScript N(EVS_ExitDoor_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, kkj_19_ENTRY_0) - EVT_SET(LVar1, COLLIDER_ttse) - EVT_SET(LVar2, MODEL_o95) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_IF_EQ(GB_StoryProgress, STORY_INTRO) - EVT_CALL(GotoMap, EVT_PTR("kkj_00"), kkj_00_ENTRY_3) - EVT_ELSE - EVT_CALL(GotoMap, EVT_PTR("kkj_10"), kkj_10_ENTRY_3) - EVT_END_IF - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, kkj_19_ENTRY_0) + Set(LVar1, COLLIDER_ttse) + Set(LVar2, MODEL_o95) + Set(LVar3, DOOR_SWING_IN) + Exec(ExitSingleDoor) + Wait(17) + IfEq(GB_StoryProgress, STORY_INTRO) + Call(GotoMap, Ref("kkj_00"), kkj_00_ENTRY_3) + Else + Call(GotoMap, Ref("kkj_10"), kkj_10_ENTRY_3) + EndIf + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttse, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoor_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttse, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH4_BEGAN_PEACH_MISSION) - EVT_EXEC(N(EVS_ManageBaking)) - EVT_ELSE - EVT_SET(LVar0, kkj_19_ENTRY_0) - EVT_SET(LVar2, MODEL_o95) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH4_BEGAN_PEACH_MISSION) + Exec(N(EVS_ManageBaking)) + Else + Set(LVar0, kkj_19_ENTRY_0) + Set(LVar2, MODEL_o95) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + Exec(N(EVS_BindExitTriggers)) + EndIf + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PEACHS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_INTRO) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(IntroNPCs))) - EVT_CASE_EQ(STORY_CH4_BEGAN_PEACH_MISSION) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(PeachNPCs))) - EVT_END_SWITCH - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_IF_EQ(GB_StoryProgress, STORY_CH4_BEGAN_PEACH_MISSION) - EVT_CALL(N(CreateIngredientInfoWindows)) - EVT_END_IF - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_PEACHS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Switch(GB_StoryProgress) + CaseEq(STORY_INTRO) + Call(MakeNpcs, FALSE, Ref(N(IntroNPCs))) + CaseEq(STORY_CH4_BEGAN_PEACH_MISSION) + Call(MakeNpcs, FALSE, Ref(N(PeachNPCs))) + EndSwitch + Exec(N(EVS_SetupMusic)) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Exec(N(EVS_EnterMap)) + Wait(1) + IfEq(GB_StoryProgress, STORY_CH4_BEGAN_PEACH_MISSION) + Call(N(CreateIngredientInfoWindows)) + EndIf + Return + End }; diff --git a/src/world/area_kkj/kkj_19/kkj_19_3_npcs_intro.c b/src/world/area_kkj/kkj_19/kkj_19_3_npcs_intro.c index 3594042870a..606d354b493 100644 --- a/src/world/area_kkj/kkj_19/kkj_19_3_npcs_intro.c +++ b/src/world/area_kkj/kkj_19/kkj_19_3_npcs_intro.c @@ -3,28 +3,28 @@ #include "world/common/npc/Toad_Stationary.inc.c" EvtScript N(EVS_NpcInteract_TayceT) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_Intro_0031) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_Intro_0031) + Return + End }; EvtScript N(EVS_NpcInteract_Toad) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_Intro_0032) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_Intro_0032) + Return + End }; EvtScript N(EVS_NpcInit_TayceT) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TayceT_Idle) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_TayceT))) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_TayceT_Idle) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_TayceT))) + Return + End }; EvtScript N(EVS_NpcInit_Toad) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad))) + Return + End }; NpcData N(NpcData_TayceT)[] = { diff --git a/src/world/area_kkj/kkj_19/kkj_19_4_npcs_peach.c b/src/world/area_kkj/kkj_19/kkj_19_4_npcs_peach.c index cd0f810db7c..94b55b907a3 100644 --- a/src/world/area_kkj/kkj_19/kkj_19_4_npcs_peach.c +++ b/src/world/area_kkj/kkj_19/kkj_19_4_npcs_peach.c @@ -4,35 +4,35 @@ #include "world/common/npc/Twink.h" EvtScript N(EVS_NpcInteract_Twink) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Return + End }; EvtScript N(EVS_NpcIdle_Twink) = { - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetSelfVar, 1, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(NpcFacePlayer, NPC_PARTNER, 0) - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Wait(1) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(GetSelfVar, 1, LVar0) + IfEq(LVar0, 1) + Call(NpcFacePlayer, NPC_PARTNER, 0) + EndIf + EndLoop + Return + End }; EvtScript N(EVS_NpcInit_Twink) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcCollisionSize, NPC_SELF, 20, 20) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Twink))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Twink))) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(SetNpcCollisionSize, NPC_SELF, 20, 20) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Twink))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Twink))) + Return + End }; // normally, you cant interact with your partner, so a dummy npc is created to allow it diff --git a/src/world/area_kkj/kkj_19/kkj_19_5_baking.c b/src/world/area_kkj/kkj_19/kkj_19_5_baking.c index 59548eda80d..4888d649cab 100644 --- a/src/world/area_kkj/kkj_19/kkj_19_5_baking.c +++ b/src/world/area_kkj/kkj_19/kkj_19_5_baking.c @@ -301,380 +301,380 @@ API_CALLABLE(N(FadeScreenFromBlack)) { } EvtScript N(EVS_SetCookwareOnTable) = { - EVT_SWITCH(AB_KKJ_CompletedBakeStep) - EVT_CASE_EQ(CAKE_TYPE_NONE) - EVT_CALL(MakeItemEntity, ITEM_CAKE_BOWL, 287, 16, -40, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(AB_KKJ19_CookwareItemIdx, LVar0) - EVT_CALL(MakeItemEntity, ITEM_CAKE_PAN, 230, 16, 0, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(AB_KKJ19_CakeItemIdx, LVar0) - EVT_CASE_EQ(CAKE_TYPE_BEGUN) - EVT_CALL(MakeItemEntity, ITEM_CAKE_BOWL, 287, 16, -40, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(AB_KKJ19_CookwareItemIdx, LVar0) - EVT_CALL(MakeItemEntity, ITEM_CAKE_PAN, 230, 16, 0, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(AB_KKJ19_CakeItemIdx, LVar0) - EVT_CASE_EQ(CAKE_TYPE_READY_TO_MIX) - EVT_CALL(MakeItemEntity, ITEM_CAKE_MIXED, 287, 16, -40, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(AB_KKJ19_CookwareItemIdx, LVar0) - EVT_CALL(MakeItemEntity, ITEM_CAKE_PAN, 230, 16, 0, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(AB_KKJ19_CakeItemIdx, LVar0) - EVT_CASE_EQ(CAKE_TYPE_MIXED) - EVT_CALL(MakeItemEntity, ITEM_CAKE_MIXED, 287, 16, -40, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(AB_KKJ19_CookwareItemIdx, LVar0) - EVT_CALL(MakeItemEntity, ITEM_CAKE_PAN, 230, 16, 0, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(AB_KKJ19_CakeItemIdx, LVar0) - EVT_CASE_EQ(CAKE_TYPE_READY_TO_BAKE) - EVT_CALL(MakeItemEntity, ITEM_CAKE_MIXED, 287, 16, -40, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(AB_KKJ19_CookwareItemIdx, LVar0) - EVT_CALL(MakeItemEntity, ITEM_CAKE_PAN, 230, 16, 0, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(AB_KKJ19_CakeItemIdx, LVar0) - EVT_CASE_EQ(CAKE_TYPE_BAKED) - EVT_CALL(MakeItemEntity, ITEM_CAKE_BARE, 287, 20, -30, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(AB_KKJ19_CakeItemIdx, LVar0) - EVT_CALL(MakeItemEntity, ITEM_CAKE_BOWL, 230, 16, 0, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(AB_KKJ19_CookwareItemIdx, LVar0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(AB_KKJ_CompletedBakeStep) + CaseEq(CAKE_TYPE_NONE) + Call(MakeItemEntity, ITEM_CAKE_BOWL, 287, 16, -40, ITEM_SPAWN_MODE_DECORATION, 0) + Set(AB_KKJ19_CookwareItemIdx, LVar0) + Call(MakeItemEntity, ITEM_CAKE_PAN, 230, 16, 0, ITEM_SPAWN_MODE_DECORATION, 0) + Set(AB_KKJ19_CakeItemIdx, LVar0) + CaseEq(CAKE_TYPE_BEGUN) + Call(MakeItemEntity, ITEM_CAKE_BOWL, 287, 16, -40, ITEM_SPAWN_MODE_DECORATION, 0) + Set(AB_KKJ19_CookwareItemIdx, LVar0) + Call(MakeItemEntity, ITEM_CAKE_PAN, 230, 16, 0, ITEM_SPAWN_MODE_DECORATION, 0) + Set(AB_KKJ19_CakeItemIdx, LVar0) + CaseEq(CAKE_TYPE_READY_TO_MIX) + Call(MakeItemEntity, ITEM_CAKE_MIXED, 287, 16, -40, ITEM_SPAWN_MODE_DECORATION, 0) + Set(AB_KKJ19_CookwareItemIdx, LVar0) + Call(MakeItemEntity, ITEM_CAKE_PAN, 230, 16, 0, ITEM_SPAWN_MODE_DECORATION, 0) + Set(AB_KKJ19_CakeItemIdx, LVar0) + CaseEq(CAKE_TYPE_MIXED) + Call(MakeItemEntity, ITEM_CAKE_MIXED, 287, 16, -40, ITEM_SPAWN_MODE_DECORATION, 0) + Set(AB_KKJ19_CookwareItemIdx, LVar0) + Call(MakeItemEntity, ITEM_CAKE_PAN, 230, 16, 0, ITEM_SPAWN_MODE_DECORATION, 0) + Set(AB_KKJ19_CakeItemIdx, LVar0) + CaseEq(CAKE_TYPE_READY_TO_BAKE) + Call(MakeItemEntity, ITEM_CAKE_MIXED, 287, 16, -40, ITEM_SPAWN_MODE_DECORATION, 0) + Set(AB_KKJ19_CookwareItemIdx, LVar0) + Call(MakeItemEntity, ITEM_CAKE_PAN, 230, 16, 0, ITEM_SPAWN_MODE_DECORATION, 0) + Set(AB_KKJ19_CakeItemIdx, LVar0) + CaseEq(CAKE_TYPE_BAKED) + Call(MakeItemEntity, ITEM_CAKE_BARE, 287, 20, -30, ITEM_SPAWN_MODE_DECORATION, 0) + Set(AB_KKJ19_CakeItemIdx, LVar0) + Call(MakeItemEntity, ITEM_CAKE_BOWL, 230, 16, 0, ITEM_SPAWN_MODE_DECORATION, 0) + Set(AB_KKJ19_CookwareItemIdx, LVar0) + EndSwitch + Return + End }; EvtScript N(EVS_UpdatePeachMixingAnimations) = { - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Mixing1) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_SWITCH(AB_KKJ19_BakeStepProgress) - EVT_CASE_EQ(MIXING_ANIM_IDLE) + Call(SetPlayerAnimation, ANIM_Peach2_Mixing1) + Set(LVar0, 0) + Loop(0) + Switch(AB_KKJ19_BakeStepProgress) + CaseEq(MIXING_ANIM_IDLE) // increment the animation on next MIXING_ANIM_NEXT - EVT_SET(LVar1, 0) - EVT_CASE_EQ(MIXING_ANIM_NEXT) - EVT_IF_EQ(LVar1, 0) + Set(LVar1, 0) + CaseEq(MIXING_ANIM_NEXT) + IfEq(LVar1, 0) // increment the animation - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Mixing1) - EVT_SET(LVar0, 1) - EVT_CASE_EQ(1) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Mixing2) - EVT_SET(LVar0, 2) - EVT_CASE_EQ(2) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Mixing3) - EVT_SET(LVar0, 3) - EVT_CASE_EQ(3) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Mixing4) - EVT_SET(LVar0, 0) - EVT_END_SWITCH - EVT_SET(LVar1, 1) - EVT_ELSE + Switch(LVar0) + CaseEq(0) + Call(SetPlayerAnimation, ANIM_Peach2_Mixing1) + Set(LVar0, 1) + CaseEq(1) + Call(SetPlayerAnimation, ANIM_Peach2_Mixing2) + Set(LVar0, 2) + CaseEq(2) + Call(SetPlayerAnimation, ANIM_Peach2_Mixing3) + Set(LVar0, 3) + CaseEq(3) + Call(SetPlayerAnimation, ANIM_Peach2_Mixing4) + Set(LVar0, 0) + EndSwitch + Set(LVar1, 1) + Else // wait until next MIXING_ANIM_NEXT to increment the animation - EVT_SET(LVar1, 0) - EVT_END_IF - EVT_END_SWITCH - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVar1, 0) + EndIf + EndSwitch + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_ReturnHeldIngredient) = { - EVT_IF_NE(AB_KKJ19_HeldIngredient, PEACH_BAKING_NONE) - EVT_CALL(FindKeyItem, AB_KKJ19_HeldIngredient, LVar0) - EVT_CALL(RemoveKeyItemAt, LVar0) - EVT_SET(AB_KKJ19_HeldIngredient, PEACH_BAKING_NONE) - EVT_CALL(N(SetHeldBakingItem), PEACH_BAKING_NONE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_END_IF - EVT_RETURN - EVT_END + IfNe(AB_KKJ19_HeldIngredient, PEACH_BAKING_NONE) + Call(FindKeyItem, AB_KKJ19_HeldIngredient, LVar0) + Call(RemoveKeyItemAt, LVar0) + Set(AB_KKJ19_HeldIngredient, PEACH_BAKING_NONE) + Call(N(SetHeldBakingItem), PEACH_BAKING_NONE) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + EndIf + Return + End }; EvtScript N(EVS_TakeIngredient) = { - EVT_IF_EQ(AB_KKJ19_CurrentBakeStep, BAKE_STEP_DONE) - EVT_RETURN - EVT_END_IF + IfEq(AB_KKJ19_CurrentBakeStep, BAKE_STEP_DONE) + Return + EndIf // get itemID of current station - EVT_CALL(N(GetFloorCollider), LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(COLLIDER_o101) - EVT_SET(LVar0, ITEM_BAKING_SUGAR) - EVT_CASE_EQ(COLLIDER_o102) - EVT_SET(LVar0, ITEM_BAKING_SALT) - EVT_CASE_EQ(COLLIDER_o103) - EVT_SET(LVar0, ITEM_BAKING_EGG) - EVT_CASE_EQ(COLLIDER_o105) - EVT_SET(LVar0, ITEM_BAKING_STRAWBERRY) - EVT_CASE_EQ(COLLIDER_o106) - EVT_SET(LVar0, ITEM_BAKING_CREAM) - EVT_CASE_EQ(COLLIDER_o107) - EVT_SET(LVar0, ITEM_BAKING_BUTTER) - EVT_CASE_EQ(COLLIDER_o108) - EVT_SET(LVar0, ITEM_BAKING_CLEANSER) - EVT_CASE_EQ(COLLIDER_o114) - EVT_SET(LVar0, ITEM_BAKING_WATER) - EVT_CASE_EQ(COLLIDER_o109) - EVT_SET(LVar0, ITEM_BAKING_FLOUR) - EVT_CASE_EQ(COLLIDER_o110) - EVT_SET(LVar0, ITEM_BAKING_MILK) - EVT_CASE_DEFAULT - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(AF_KKJ19_CanTakeIngredients, FALSE) - EVT_WAIT(5) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar0) - EVT_IF_EQ(AB_KKJ19_HeldIngredient, PEACH_BAKING_NONE) + Call(N(GetFloorCollider), LVar0) + Switch(LVar0) + CaseEq(COLLIDER_o101) + Set(LVar0, ITEM_BAKING_SUGAR) + CaseEq(COLLIDER_o102) + Set(LVar0, ITEM_BAKING_SALT) + CaseEq(COLLIDER_o103) + Set(LVar0, ITEM_BAKING_EGG) + CaseEq(COLLIDER_o105) + Set(LVar0, ITEM_BAKING_STRAWBERRY) + CaseEq(COLLIDER_o106) + Set(LVar0, ITEM_BAKING_CREAM) + CaseEq(COLLIDER_o107) + Set(LVar0, ITEM_BAKING_BUTTER) + CaseEq(COLLIDER_o108) + Set(LVar0, ITEM_BAKING_CLEANSER) + CaseEq(COLLIDER_o114) + Set(LVar0, ITEM_BAKING_WATER) + CaseEq(COLLIDER_o109) + Set(LVar0, ITEM_BAKING_FLOUR) + CaseEq(COLLIDER_o110) + Set(LVar0, ITEM_BAKING_MILK) + CaseDefault + Return + EndSwitch + Call(DisablePlayerInput, TRUE) + Set(AF_KKJ19_CanTakeIngredients, FALSE) + Wait(5) + Set(LVarA, LVar0) + Set(LVarB, LVar0) + IfEq(AB_KKJ19_HeldIngredient, PEACH_BAKING_NONE) // picking up an ingredient while not holding any - EVT_CALL(N(GetItemNameRaw), LVarA) - EVT_CALL(SetMessageText, LVarA, 0) - EVT_CALL(N(GetFloorCollider), LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(COLLIDER_o101) - EVT_SET(LVar0, PEACH_BAKING_SUGAR) - EVT_CASE_EQ(COLLIDER_o102) - EVT_SET(LVar0, PEACH_BAKING_SALT) - EVT_CASE_EQ(COLLIDER_o103) - EVT_SET(LVar0, PEACH_BAKING_EGG) - EVT_CASE_EQ(COLLIDER_o105) - EVT_SET(LVar0, PEACH_BAKING_STRAWBERRY) - EVT_CASE_EQ(COLLIDER_o106) - EVT_SET(LVar0, PEACH_BAKING_CREAM) - EVT_CASE_EQ(COLLIDER_o107) - EVT_SET(LVar0, PEACH_BAKING_BUTTER) - EVT_CASE_EQ(COLLIDER_o108) - EVT_SET(LVar0, PEACH_BAKING_CLEANSER) - EVT_CASE_EQ(COLLIDER_o114) - EVT_SET(LVar0, PEACH_BAKING_WATER) - EVT_CASE_EQ(COLLIDER_o109) - EVT_SET(LVar0, PEACH_BAKING_FLOUR) - EVT_CASE_EQ(COLLIDER_o110) - EVT_SET(LVar0, PEACH_BAKING_MILK) - EVT_END_SWITCH - EVT_CALL(N(SetHeldBakingItem), LVar0) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_SET(AB_KKJ19_HeldIngredient, LVarB) - EVT_CALL(AddKeyItem, LVarB) - EVT_CALL(ShowMessageAtScreenPos, MSG_Peach_00E7, 160, 40) - EVT_ELSE + Call(N(GetItemNameRaw), LVarA) + Call(SetMessageText, LVarA, 0) + Call(N(GetFloorCollider), LVar0) + Switch(LVar0) + CaseEq(COLLIDER_o101) + Set(LVar0, PEACH_BAKING_SUGAR) + CaseEq(COLLIDER_o102) + Set(LVar0, PEACH_BAKING_SALT) + CaseEq(COLLIDER_o103) + Set(LVar0, PEACH_BAKING_EGG) + CaseEq(COLLIDER_o105) + Set(LVar0, PEACH_BAKING_STRAWBERRY) + CaseEq(COLLIDER_o106) + Set(LVar0, PEACH_BAKING_CREAM) + CaseEq(COLLIDER_o107) + Set(LVar0, PEACH_BAKING_BUTTER) + CaseEq(COLLIDER_o108) + Set(LVar0, PEACH_BAKING_CLEANSER) + CaseEq(COLLIDER_o114) + Set(LVar0, PEACH_BAKING_WATER) + CaseEq(COLLIDER_o109) + Set(LVar0, PEACH_BAKING_FLOUR) + CaseEq(COLLIDER_o110) + Set(LVar0, PEACH_BAKING_MILK) + EndSwitch + Call(N(SetHeldBakingItem), LVar0) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Set(AB_KKJ19_HeldIngredient, LVarB) + Call(AddKeyItem, LVarB) + Call(ShowMessageAtScreenPos, MSG_Peach_00E7, 160, 40) + Else // exchanging held ingredient for current station - EVT_CALL(FindKeyItem, LVar0, LVar1) - EVT_IF_EQ(LVar1, -1) - EVT_SET(LVar9, AB_KKJ19_HeldIngredient) - EVT_CALL(N(GetItemNameRaw), LVar9) - EVT_CALL(N(GetItemNameRaw), LVarA) - EVT_CALL(SetMessageText, LVar9, 0) - EVT_CALL(SetMessageText, LVarA, 1) - EVT_CALL(ShowMessageAtScreenPos, MSG_Peach_00E9, 160, 40) - EVT_CALL(ShowChoice, MSG_Choice_002B) - EVT_IF_EQ(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_ReturnHeldIngredient)) - EVT_CALL(N(GetFloorCollider), LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(COLLIDER_o101) - EVT_SET(LVar0, PEACH_BAKING_SUGAR) - EVT_CASE_EQ(COLLIDER_o102) - EVT_SET(LVar0, PEACH_BAKING_SALT) - EVT_CASE_EQ(COLLIDER_o103) - EVT_SET(LVar0, PEACH_BAKING_EGG) - EVT_CASE_EQ(COLLIDER_o105) - EVT_SET(LVar0, PEACH_BAKING_STRAWBERRY) - EVT_CASE_EQ(COLLIDER_o106) - EVT_SET(LVar0, PEACH_BAKING_CREAM) - EVT_CASE_EQ(COLLIDER_o107) - EVT_SET(LVar0, PEACH_BAKING_BUTTER) - EVT_CASE_EQ(COLLIDER_o108) - EVT_SET(LVar0, PEACH_BAKING_CLEANSER) - EVT_CASE_EQ(COLLIDER_o114) - EVT_SET(LVar0, PEACH_BAKING_WATER) - EVT_CASE_EQ(COLLIDER_o109) - EVT_SET(LVar0, PEACH_BAKING_FLOUR) - EVT_CASE_EQ(COLLIDER_o110) - EVT_SET(LVar0, PEACH_BAKING_MILK) - EVT_END_SWITCH - EVT_CALL(N(SetHeldBakingItem), LVar0) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_SET(AB_KKJ19_HeldIngredient, LVarB) - EVT_CALL(AddKeyItem, LVarB) - EVT_CALL(SwitchMessage, MSG_Peach_00EA) - EVT_ELSE - EVT_CALL(CloseMessage) - EVT_END_IF - EVT_ELSE + Call(FindKeyItem, LVar0, LVar1) + IfEq(LVar1, -1) + Set(LVar9, AB_KKJ19_HeldIngredient) + Call(N(GetItemNameRaw), LVar9) + Call(N(GetItemNameRaw), LVarA) + Call(SetMessageText, LVar9, 0) + Call(SetMessageText, LVarA, 1) + Call(ShowMessageAtScreenPos, MSG_Peach_00E9, 160, 40) + Call(ShowChoice, MSG_Choice_002B) + IfEq(LVar0, 0) + ExecWait(N(EVS_ReturnHeldIngredient)) + Call(N(GetFloorCollider), LVar0) + Switch(LVar0) + CaseEq(COLLIDER_o101) + Set(LVar0, PEACH_BAKING_SUGAR) + CaseEq(COLLIDER_o102) + Set(LVar0, PEACH_BAKING_SALT) + CaseEq(COLLIDER_o103) + Set(LVar0, PEACH_BAKING_EGG) + CaseEq(COLLIDER_o105) + Set(LVar0, PEACH_BAKING_STRAWBERRY) + CaseEq(COLLIDER_o106) + Set(LVar0, PEACH_BAKING_CREAM) + CaseEq(COLLIDER_o107) + Set(LVar0, PEACH_BAKING_BUTTER) + CaseEq(COLLIDER_o108) + Set(LVar0, PEACH_BAKING_CLEANSER) + CaseEq(COLLIDER_o114) + Set(LVar0, PEACH_BAKING_WATER) + CaseEq(COLLIDER_o109) + Set(LVar0, PEACH_BAKING_FLOUR) + CaseEq(COLLIDER_o110) + Set(LVar0, PEACH_BAKING_MILK) + EndSwitch + Call(N(SetHeldBakingItem), LVar0) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Set(AB_KKJ19_HeldIngredient, LVarB) + Call(AddKeyItem, LVarB) + Call(SwitchMessage, MSG_Peach_00EA) + Else + Call(CloseMessage) + EndIf + Else // placing ingredient back at its station - EVT_CALL(N(GetItemNameRaw), LVarA) - EVT_CALL(SetMessageText, LVarA, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Peach_00E6, 160, 40) - EVT_CALL(ShowChoice, MSG_Choice_002B) - EVT_IF_EQ(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_ReturnHeldIngredient)) - EVT_CALL(SwitchMessage, MSG_Peach_00E8) - EVT_ELSE - EVT_CALL(CloseMessage) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_SET(AF_KKJ19_CanTakeIngredients, TRUE) - EVT_WAIT(5) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(N(GetItemNameRaw), LVarA) + Call(SetMessageText, LVarA, 0) + Call(ShowMessageAtScreenPos, MSG_Peach_00E6, 160, 40) + Call(ShowChoice, MSG_Choice_002B) + IfEq(LVar0, 0) + ExecWait(N(EVS_ReturnHeldIngredient)) + Call(SwitchMessage, MSG_Peach_00E8) + Else + Call(CloseMessage) + EndIf + EndIf + EndIf + Set(AF_KKJ19_CanTakeIngredients, TRUE) + Wait(5) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_ItemPrompt_AddIngredient) = { - EVT_IF_EQ(AB_KKJ19_CurrentBakeStep, BAKE_STEP_DONE) - EVT_RETURN - EVT_END_IF - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(ShowKeyChoicePopup) - EVT_SET(LVar2, LVar0) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(0) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_CASE_EQ(-1) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_SET(AB_KKJ19_HeldIngredient, PEACH_BAKING_NONE) - EVT_CALL(N(SetHeldBakingItem), PEACH_BAKING_NONE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_SWITCH(AB_KKJ19_CurrentBakeStep) - EVT_CASE_EQ(BAKE_STEP_ADD_SUGAR_AND_EGGS) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ITEM_BAKING_SUGAR) - EVT_SET(AF_KKJ19_AddedSugar, TRUE) - EVT_CASE_EQ(ITEM_BAKING_EGG) - EVT_SET(AF_KKJ19_AddedEgg, TRUE) - EVT_CASE_DEFAULT - EVT_SET(AF_KKJ19_AddedNothingWrong, FALSE) - EVT_END_SWITCH - EVT_IF_EQ(AB_KKJ19_BakeStepProgress, 0) - EVT_CALL(RemoveItemEntity, AB_KKJ19_CookwareItemIdx) - EVT_CALL(MakeItemEntity, ITEM_CAKE_MIXED, 287, 16, -40, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(AB_KKJ19_CookwareItemIdx, LVar0) - EVT_END_IF - EVT_IF_GT(AB_KKJ19_BakeStepProgress, 1) - EVT_SET(AF_KKJ19_AddedNothingWrong, FALSE) - EVT_END_IF - EVT_CASE_EQ(BAKE_STEP_ADD_FLOUR_AND_BUTTER) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ITEM_BAKING_FLOUR) - EVT_SET(AF_KKJ19_AddedFlour, TRUE) - EVT_CASE_EQ(ITEM_BAKING_BUTTER) - EVT_SET(AF_KKJ19_AddedButter, TRUE) - EVT_CASE_DEFAULT - EVT_SET(AF_KKJ19_AddedNothingWrong, FALSE) - EVT_END_SWITCH - EVT_IF_GT(AB_KKJ19_BakeStepProgress, 1) - EVT_SET(AF_KKJ19_AddedNothingWrong, FALSE) - EVT_END_IF - EVT_CASE_EQ(BAKE_STEP_DECORATING) - EVT_SWITCH(AB_KKJ19_BakeStepProgress) - EVT_CASE_EQ(0) - EVT_IF_NE(LVar0, ITEM_BAKING_CREAM) - EVT_SET(AF_KKJ19_FailedBakingTask, TRUE) - EVT_END_IF - EVT_CASE_EQ(1) - EVT_IF_NE(LVar0, ITEM_BAKING_STRAWBERRY) - EVT_SET(AF_KKJ19_FailedBakingTask, TRUE) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_SET(AF_KKJ19_FailedBakingTask, TRUE) - EVT_END_SWITCH - EVT_CALL(RemoveItemEntity, AB_KKJ19_CakeItemIdx) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ITEM_BAKING_STRAWBERRY) - EVT_IF_EQ(AB_KKJ19_AddedIcing, FALSE) - EVT_CALL(MakeItemEntity, ITEM_CAKE_WITH_BERRIES, 287, 20, -30, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(AB_KKJ19_CakeItemIdx, LVar0) - EVT_ELSE - EVT_CALL(MakeItemEntity, ITEM_CAKE_DONE, 287, 20, -30, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(AB_KKJ19_CakeItemIdx, LVar0) - EVT_END_IF - EVT_SET(AB_KKJ19_AddedBerries, TRUE) - EVT_CASE_DEFAULT - EVT_CALL(MakeItemEntity, ITEM_CAKE_WITH_ICING, 287, 20, -30, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(AB_KKJ19_CakeItemIdx, LVar0) - EVT_SET(AB_KKJ19_AddedIcing, TRUE) - EVT_SET(AB_KKJ19_AddedBerries, FALSE) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_ADD(AB_KKJ19_BakeStepProgress, 1) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END + IfEq(AB_KKJ19_CurrentBakeStep, BAKE_STEP_DONE) + Return + EndIf + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(ShowKeyChoicePopup) + Set(LVar2, LVar0) + Switch(LVar2) + CaseEq(0) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + CaseEq(-1) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + EndSwitch + Call(RemoveKeyItemAt, LVar1) + Set(AB_KKJ19_HeldIngredient, PEACH_BAKING_NONE) + Call(N(SetHeldBakingItem), PEACH_BAKING_NONE) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Switch(AB_KKJ19_CurrentBakeStep) + CaseEq(BAKE_STEP_ADD_SUGAR_AND_EGGS) + Switch(LVar0) + CaseEq(ITEM_BAKING_SUGAR) + Set(AF_KKJ19_AddedSugar, TRUE) + CaseEq(ITEM_BAKING_EGG) + Set(AF_KKJ19_AddedEgg, TRUE) + CaseDefault + Set(AF_KKJ19_AddedNothingWrong, FALSE) + EndSwitch + IfEq(AB_KKJ19_BakeStepProgress, 0) + Call(RemoveItemEntity, AB_KKJ19_CookwareItemIdx) + Call(MakeItemEntity, ITEM_CAKE_MIXED, 287, 16, -40, ITEM_SPAWN_MODE_DECORATION, 0) + Set(AB_KKJ19_CookwareItemIdx, LVar0) + EndIf + IfGt(AB_KKJ19_BakeStepProgress, 1) + Set(AF_KKJ19_AddedNothingWrong, FALSE) + EndIf + CaseEq(BAKE_STEP_ADD_FLOUR_AND_BUTTER) + Switch(LVar0) + CaseEq(ITEM_BAKING_FLOUR) + Set(AF_KKJ19_AddedFlour, TRUE) + CaseEq(ITEM_BAKING_BUTTER) + Set(AF_KKJ19_AddedButter, TRUE) + CaseDefault + Set(AF_KKJ19_AddedNothingWrong, FALSE) + EndSwitch + IfGt(AB_KKJ19_BakeStepProgress, 1) + Set(AF_KKJ19_AddedNothingWrong, FALSE) + EndIf + CaseEq(BAKE_STEP_DECORATING) + Switch(AB_KKJ19_BakeStepProgress) + CaseEq(0) + IfNe(LVar0, ITEM_BAKING_CREAM) + Set(AF_KKJ19_FailedBakingTask, TRUE) + EndIf + CaseEq(1) + IfNe(LVar0, ITEM_BAKING_STRAWBERRY) + Set(AF_KKJ19_FailedBakingTask, TRUE) + EndIf + CaseDefault + Set(AF_KKJ19_FailedBakingTask, TRUE) + EndSwitch + Call(RemoveItemEntity, AB_KKJ19_CakeItemIdx) + Switch(LVar0) + CaseEq(ITEM_BAKING_STRAWBERRY) + IfEq(AB_KKJ19_AddedIcing, FALSE) + Call(MakeItemEntity, ITEM_CAKE_WITH_BERRIES, 287, 20, -30, ITEM_SPAWN_MODE_DECORATION, 0) + Set(AB_KKJ19_CakeItemIdx, LVar0) + Else + Call(MakeItemEntity, ITEM_CAKE_DONE, 287, 20, -30, ITEM_SPAWN_MODE_DECORATION, 0) + Set(AB_KKJ19_CakeItemIdx, LVar0) + EndIf + Set(AB_KKJ19_AddedBerries, TRUE) + CaseDefault + Call(MakeItemEntity, ITEM_CAKE_WITH_ICING, 287, 20, -30, ITEM_SPAWN_MODE_DECORATION, 0) + Set(AB_KKJ19_CakeItemIdx, LVar0) + Set(AB_KKJ19_AddedIcing, TRUE) + Set(AB_KKJ19_AddedBerries, FALSE) + EndSwitch + EndSwitch + Add(AB_KKJ19_BakeStepProgress, 1) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + End }; EvtScript N(EVS_BindInteractTriggers) = { - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_ItemPrompt_AddIngredient)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o118, EVT_PTR(N(BakingIngredientsList)), 0, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_TakeIngredient)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o101, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_TakeIngredient)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o102, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_TakeIngredient)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o103, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_TakeIngredient)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o105, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_TakeIngredient)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o106, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_TakeIngredient)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o107, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_TakeIngredient)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o108, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_TakeIngredient)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o114, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_TakeIngredient)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o109, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_TakeIngredient)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o110, 1, 0) - EVT_RETURN - EVT_END + BindPadlock(Ref(N(EVS_ItemPrompt_AddIngredient)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o118, Ref(N(BakingIngredientsList)), 0, 0) + BindTrigger(Ref(N(EVS_TakeIngredient)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o101, 1, 0) + BindTrigger(Ref(N(EVS_TakeIngredient)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o102, 1, 0) + BindTrigger(Ref(N(EVS_TakeIngredient)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o103, 1, 0) + BindTrigger(Ref(N(EVS_TakeIngredient)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o105, 1, 0) + BindTrigger(Ref(N(EVS_TakeIngredient)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o106, 1, 0) + BindTrigger(Ref(N(EVS_TakeIngredient)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o107, 1, 0) + BindTrigger(Ref(N(EVS_TakeIngredient)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o108, 1, 0) + BindTrigger(Ref(N(EVS_TakeIngredient)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o114, 1, 0) + BindTrigger(Ref(N(EVS_TakeIngredient)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o109, 1, 0) + BindTrigger(Ref(N(EVS_TakeIngredient)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o110, 1, 0) + Return + End }; EvtScript N(EVS_OpenOverDoor) = { - EVT_CALL(MakeLerp, 0, 90, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g33, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(MakeLerp, 0, 90, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g33, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_CloseOverDoor) = { - EVT_CALL(MakeLerp, 90, 0, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g33, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(MakeLerp, 90, 0, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g33, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_PickupFinalCake) = { - EVT_IF_EQ(AB_KKJ19_AddedBerries, FALSE) - EVT_SET(LVar0, PEACH_BAKING_CAKE_WITH_ICING) - EVT_ELSE - EVT_IF_EQ(AB_KKJ19_AddedIcing, FALSE) - EVT_SET(LVar0, PEACH_BAKING_CAKE_WITH_BERRIES) - EVT_ELSE - EVT_SET(LVar0, PEACH_BAKING_COMPLETE_CAKE) - EVT_END_IF - EVT_END_IF - EVT_CALL(RemoveItemEntity, AB_KKJ19_CakeItemIdx) - EVT_CALL(N(SetHeldBakingItem), LVar0) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_SET(AF_KKJ_FinishedBakingCake, TRUE) - EVT_UNBIND - EVT_RETURN - EVT_END + IfEq(AB_KKJ19_AddedBerries, FALSE) + Set(LVar0, PEACH_BAKING_CAKE_WITH_ICING) + Else + IfEq(AB_KKJ19_AddedIcing, FALSE) + Set(LVar0, PEACH_BAKING_CAKE_WITH_BERRIES) + Else + Set(LVar0, PEACH_BAKING_COMPLETE_CAKE) + EndIf + EndIf + Call(RemoveItemEntity, AB_KKJ19_CakeItemIdx) + Call(N(SetHeldBakingItem), LVar0) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Set(AF_KKJ_FinishedBakingCake, TRUE) + Unbind + Return + End }; EvtScript N(EVS_BindCakePickup) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_PickupFinalCake)), TRIGGER_WALL_PRESS_A, COLLIDER_o189, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_PickupFinalCake)), TRIGGER_WALL_PRESS_A, COLLIDER_o189, 1, 0) + Return + End }; Vec3f N(FetchBookPath)[] = { @@ -686,105 +686,105 @@ Vec3f N(FetchBookPath)[] = { }; EvtScript N(EVS_FocusCam_Twink) = { - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 200) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-4.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 200) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-4.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_FocusCam_PeachAndTwink) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar3, LVar4, LVar5) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_PARTNER, LVar3, LVar4, LVar5) // get average position of peach and twink - EVT_ADD(LVar0, LVar3) - EVT_DIV(LVar0, 2) - EVT_ADD(LVar1, LVar4) - EVT_DIV(LVar1, 2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 275) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Add(LVar0, LVar3) + Div(LVar0, 2) + Add(LVar1, LVar4) + Div(LVar1, 2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 275) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_FocusCam_Oven) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 130, 0, -100) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 130, 0, -100) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-13.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, 130, 0, -100) + Call(SetPanTarget, CAM_DEFAULT, 130, 0, -100) + Call(SetCamDistance, CAM_DEFAULT, 250) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-13.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_FocusCam_Table) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 330, 0, -80) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 330, 0, -80) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, 330, 0, -80) + Call(SetPanTarget, CAM_DEFAULT, 330, 0, -80) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_Twink_FlyToPlayer) = { - EVT_CALL(SetEnemyFlagBits, NPC_Twink, ENEMY_FLAG_CANT_INTERACT, 1) - EVT_CALL(SetNpcVar, NPC_Twink, 1, 0) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar3, LVar1, LVar2) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, LVar3) - EVT_ADD(LVar0, 40) - EVT_ELSE - EVT_SUB(LVar0, 40) - EVT_END_IF - EVT_ADD(LVar1, 30) - EVT_CALL(NpcFlyTo, NPC_PARTNER, LVar0, LVar1, LVar2, 15 * DT, -5, EASING_LINEAR) - EVT_CALL(NpcFacePlayer, NPC_PARTNER, 5) - EVT_RETURN - EVT_END + Call(SetEnemyFlagBits, NPC_Twink, ENEMY_FLAG_CANT_INTERACT, 1) + Call(SetNpcVar, NPC_Twink, 1, 0) + Call(GetNpcPos, NPC_PARTNER, LVar3, LVar1, LVar2) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, LVar3) + Add(LVar0, 40) + Else + Sub(LVar0, 40) + EndIf + Add(LVar1, 30) + Call(NpcFlyTo, NPC_PARTNER, LVar0, LVar1, LVar2, 15 * DT, -5, EASING_LINEAR) + Call(NpcFacePlayer, NPC_PARTNER, 5) + Return + End }; EvtScript N(EVS_Twink_FlyToHighPos) = { - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(2.0 / DT)) - EVT_CALL(NpcFlyTo, NPC_PARTNER, 390, 50, -70, 0, -5, EASING_LINEAR) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 5) - EVT_RETURN - EVT_END + Call(SetNpcSpeed, NPC_PARTNER, Float(2.0 / DT)) + Call(NpcFlyTo, NPC_PARTNER, 390, 50, -70, 0, -5, EASING_LINEAR) + Call(InterpNpcYaw, NPC_PARTNER, 270, 5) + Return + End }; EvtScript N(EVS_ExitDoorWithCake) = { - EVT_IF_EQ(AF_KKJ_FinishedBakingCake, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_EQ(AB_KKJ19_CurrentBakeStep, CAKE_TYPE_DONE) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00C1) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00BE) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ELSE - EVT_SET(LVar0, kkj_19_ENTRY_0) - EVT_SET(LVar1, COLLIDER_ttse) - EVT_SET(LVar2, MODEL_o95) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kkj_18"), kkj_18_ENTRY_0) - EVT_WAIT(100) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(AF_KKJ_FinishedBakingCake, FALSE) + Call(DisablePlayerInput, TRUE) + IfEq(AB_KKJ19_CurrentBakeStep, CAKE_TYPE_DONE) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00C1) + Else + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00BE) + EndIf + Call(DisablePlayerInput, FALSE) + Else + Set(LVar0, kkj_19_ENTRY_0) + Set(LVar1, COLLIDER_ttse) + Set(LVar2, MODEL_o95) + Set(LVar3, DOOR_SWING_IN) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("kkj_18"), kkj_18_ENTRY_0) + Wait(100) + EndIf + Return + End }; enum { @@ -813,659 +813,659 @@ enum { }; EvtScript N(EVS_EnterKitchen_FirstTime) = { - EVT_SET(LVar0, kkj_19_ENTRY_0) - EVT_SET(LVar2, MODEL_o95) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_THREAD - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(2.0)) - EVT_CALL(NpcFlyTo, NPC_PARTNER, 440, 25, -30, 0, -5, EASING_LINEAR) - EVT_CALL(NpcFacePlayer, NPC_PARTNER, 5) - EVT_END_THREAD - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(2.0 / DT)) - EVT_CALL(PlayerMoveTo, 400, -30, 0) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LookAround) - EVT_WAIT(60 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_CALL(InterpPlayerYaw, 90, 5) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4.0 / DT), 0, EVT_FLOAT(300.0), EVT_FLOAT(17.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_RaiseArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_00B9) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LowerArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 630, 85, -140) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 200) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 112, -200) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 610, -60) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 5) - EVT_WAIT(10 * DT) - EVT_CALL(LoadPath, 60 * DT, EVT_PTR(N(FetchBookPath)), ARRAY_COUNT(N(FetchBookPath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 5) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00BA) - EVT_CALL(EnableModel, MODEL_o128, FALSE) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_TakeBook) - EVT_WAIT(30 * DT) - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(90.0), 0, 300, EVT_FLOAT(17.0), EVT_FLOAT(-7.0)) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Idle) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(3.0 / DT)) - EVT_CALL(NpcFlyTo, NPC_PARTNER, 440, 25, -30, 0, -5, EASING_LINEAR) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_OpenBook) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_IdleBook) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_RaiseArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_00BB) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LowerArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_ReadBook, ANIM_Twink_IdleBook, 0, MSG_Peach_00BC) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_RaiseArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_00BD) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LowerArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_SET(AB_KKJ_CompletedBakeStep, CAKE_TYPE_BEGUN) - EVT_RETURN - EVT_END + Set(LVar0, kkj_19_ENTRY_0) + Set(LVar2, MODEL_o95) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + Thread + Call(SetNpcSpeed, NPC_PARTNER, Float(2.0)) + Call(NpcFlyTo, NPC_PARTNER, 440, 25, -30, 0, -5, EASING_LINEAR) + Call(NpcFacePlayer, NPC_PARTNER, 5) + EndThread + Call(SetPlayerSpeed, Float(2.0 / DT)) + Call(PlayerMoveTo, 400, -30, 0) + Wait(1) + Call(SetPlayerAnimation, ANIM_Peach2_LookAround) + Wait(60 * DT) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Call(InterpPlayerYaw, 90, 5) + Call(AdjustCam, CAM_DEFAULT, Float(4.0 / DT), 0, Float(300.0), Float(17.0), Float(-7.0)) + Call(SetPlayerAnimation, ANIM_Peach2_RaiseArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_00B9) + Call(SetPlayerAnimation, ANIM_Peach2_LowerArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Thread + Wait(30 * DT) + Call(SetPanTarget, CAM_DEFAULT, 630, 85, -140) + Call(SetCamDistance, CAM_DEFAULT, 200) + Call(SetCamPosA, CAM_DEFAULT, 112, -200) + Call(SetCamPosB, CAM_DEFAULT, 610, -60) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndThread + Call(InterpNpcYaw, NPC_PARTNER, 90, 5) + Wait(10 * DT) + Call(LoadPath, 60 * DT, Ref(N(FetchBookPath)), ARRAY_COUNT(N(FetchBookPath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(InterpNpcYaw, NPC_PARTNER, 270, 5) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00BA) + Call(EnableModel, MODEL_o128, FALSE) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_TakeBook) + Wait(30 * DT) + Thread + Wait(10 * DT) + Call(AdjustCam, CAM_DEFAULT, Float(90.0), 0, 300, Float(17.0), Float(-7.0)) + EndThread + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Idle) + Call(SetNpcSpeed, NPC_PARTNER, Float(3.0 / DT)) + Call(NpcFlyTo, NPC_PARTNER, 440, 25, -30, 0, -5, EASING_LINEAR) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_OpenBook) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_IdleBook) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_RaiseArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_00BB) + Call(SetPlayerAnimation, ANIM_Peach2_LowerArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_ReadBook, ANIM_Twink_IdleBook, 0, MSG_Peach_00BC) + Call(SetPlayerAnimation, ANIM_Peach2_RaiseArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_00BD) + Call(SetPlayerAnimation, ANIM_Peach2_LowerArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Set(AB_KKJ_CompletedBakeStep, CAKE_TYPE_BEGUN) + Return + End }; EvtScript N(EVS_EnterKitchen_TryAgain) = { - EVT_CALL(EnableModel, MODEL_o128, FALSE) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_ArmsCrossedIdle) - EVT_CALL(SetPlayerPos, 400, 0, -30) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, 440, 25, -30) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 270) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(90.0), 0, 300, EVT_FLOAT(17.0), EVT_FLOAT(-7.0)) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00C2) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_ArmsCrossedTalk, ANIM_Peach2_ArmsCrossedIdle, 5, MSG_Peach_00C3) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_CALL(ContinueSpeech, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 0, MSG_Peach_00C4) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_OpenBook) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_IdleBook) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_o128, FALSE) + Call(SetPlayerAnimation, ANIM_Peach2_ArmsCrossedIdle) + Call(SetPlayerPos, 400, 0, -30) + Call(InterpPlayerYaw, 90, 0) + Call(SetNpcPos, NPC_PARTNER, 440, 25, -30) + Call(SetNpcYaw, NPC_PARTNER, 270) + Call(AdjustCam, CAM_DEFAULT, Float(90.0), 0, 300, Float(17.0), Float(-7.0)) + Wait(30 * DT) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00C2) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_ArmsCrossedTalk, ANIM_Peach2_ArmsCrossedIdle, 5, MSG_Peach_00C3) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Call(ContinueSpeech, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 0, MSG_Peach_00C4) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_OpenBook) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_IdleBook) + Return + End }; EvtScript N(EVS_ManageBaking) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(EnableModel, MODEL_o46, FALSE) - EVT_CALL(EnableModel, MODEL_o50, FALSE) - EVT_EXEC_WAIT(N(EVS_SetCookwareOnTable)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoorWithCake)), TRIGGER_WALL_PRESS_A, COLLIDER_ttse, 1, 0) - EVT_EXEC(N(EVS_BindInteractTriggers)) - EVT_IF_EQ(AB_KKJ_CompletedBakeStep, CAKE_TYPE_NONE) - EVT_EXEC_WAIT(N(EVS_EnterKitchen_FirstTime)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_EnterKitchen_TryAgain)) - EVT_END_IF + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(EnableModel, MODEL_o46, FALSE) + Call(EnableModel, MODEL_o50, FALSE) + ExecWait(N(EVS_SetCookwareOnTable)) + BindTrigger(Ref(N(EVS_ExitDoorWithCake)), TRIGGER_WALL_PRESS_A, COLLIDER_ttse, 1, 0) + Exec(N(EVS_BindInteractTriggers)) + IfEq(AB_KKJ_CompletedBakeStep, CAKE_TYPE_NONE) + ExecWait(N(EVS_EnterKitchen_FirstTime)) + Else + ExecWait(N(EVS_EnterKitchen_TryAgain)) + EndIf // start of cooking process - EVT_LABEL(LBL_TRY_RESUME) - EVT_SET(AF_KKJ_FinishedBakingCake, FALSE) - EVT_SET(AF_KKJ19_FailedBakingTask, FALSE) - EVT_SET(AB_KKJ19_HeldIngredient, PEACH_BAKING_NONE) - EVT_CALL(SetEnemyFlagBits, NPC_Twink, ENEMY_FLAG_CANT_INTERACT, 1) - EVT_CALL(SetNpcVar, NPC_Twink, 1, 0) - EVT_IF_EQ(AB_KKJ_CompletedBakeStep, CAKE_TYPE_READY_TO_MIX) + Label(LBL_TRY_RESUME) + Set(AF_KKJ_FinishedBakingCake, FALSE) + Set(AF_KKJ19_FailedBakingTask, FALSE) + Set(AB_KKJ19_HeldIngredient, PEACH_BAKING_NONE) + Call(SetEnemyFlagBits, NPC_Twink, ENEMY_FLAG_CANT_INTERACT, 1) + Call(SetNpcVar, NPC_Twink, 1, 0) + IfEq(AB_KKJ_CompletedBakeStep, CAKE_TYPE_READY_TO_MIX) // resume mixing - EVT_EXEC_WAIT(N(EVS_FocusCam_Twink)) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_ReadBook, ANIM_Twink_IdleBook, 0, MSG_Peach_00C5) - EVT_EXEC_WAIT(N(EVS_FocusCam_Table)) - EVT_CALL(InterpPlayerYaw, 270, 5) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_ReadBook, ANIM_Twink_IdleBook, 5, MSG_Peach_00C6) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_CloseBook) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) - EVT_WAIT(20 * DT) - EVT_EXEC(N(EVS_Twink_FlyToHighPos)) - EVT_GOTO(LBL_MIX_RESUME) - EVT_END_IF - EVT_IF_EQ(AB_KKJ_CompletedBakeStep, CAKE_TYPE_MIXED) + ExecWait(N(EVS_FocusCam_Twink)) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_ReadBook, ANIM_Twink_IdleBook, 0, MSG_Peach_00C5) + ExecWait(N(EVS_FocusCam_Table)) + Call(InterpPlayerYaw, 270, 5) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_ReadBook, ANIM_Twink_IdleBook, 5, MSG_Peach_00C6) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_CloseBook) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) + Wait(20 * DT) + Exec(N(EVS_Twink_FlyToHighPos)) + Goto(LBL_MIX_RESUME) + EndIf + IfEq(AB_KKJ_CompletedBakeStep, CAKE_TYPE_MIXED) // resume adding flour & butter - EVT_EXEC_WAIT(N(EVS_FocusCam_Twink)) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_ReadBook, ANIM_Twink_IdleBook, 0, MSG_Peach_00C7) - EVT_EXEC_WAIT(N(EVS_FocusCam_Table)) - EVT_CALL(InterpPlayerYaw, 270, 5) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_ReadBook, ANIM_Twink_IdleBook, 5, MSG_Peach_00C8) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_CloseBook) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) - EVT_WAIT(20 * DT) - EVT_GOTO(LBL_ADD_FLOUR_BUTTER_RESUME) - EVT_END_IF - EVT_IF_EQ(AB_KKJ_CompletedBakeStep, CAKE_TYPE_READY_TO_BAKE) + ExecWait(N(EVS_FocusCam_Twink)) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_ReadBook, ANIM_Twink_IdleBook, 0, MSG_Peach_00C7) + ExecWait(N(EVS_FocusCam_Table)) + Call(InterpPlayerYaw, 270, 5) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_ReadBook, ANIM_Twink_IdleBook, 5, MSG_Peach_00C8) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_CloseBook) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) + Wait(20 * DT) + Goto(LBL_ADD_FLOUR_BUTTER_RESUME) + EndIf + IfEq(AB_KKJ_CompletedBakeStep, CAKE_TYPE_READY_TO_BAKE) // resume baking - EVT_EXEC_WAIT(N(EVS_FocusCam_Twink)) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_ReadBook, ANIM_Twink_IdleBook, 0, MSG_Peach_00C9) - EVT_EXEC_WAIT(N(EVS_FocusCam_Table)) - EVT_CALL(InterpPlayerYaw, 270, 5) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_ReadBook, ANIM_Twink_IdleBook, 5, MSG_Peach_00CA) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_CloseBook) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) - EVT_WAIT(20 * DT) - EVT_EXEC(N(EVS_Twink_FlyToHighPos)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(func_802D1270, LVar0, -74, EVT_FLOAT(2.0 / DT)) - EVT_CALL(func_802D1270, 287, -74, EVT_FLOAT(2.0 / DT)) - EVT_GOTO(LBL_BAKE_RESUME) - EVT_END_IF - EVT_IF_EQ(AB_KKJ_CompletedBakeStep, CAKE_TYPE_BAKED) + ExecWait(N(EVS_FocusCam_Twink)) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_ReadBook, ANIM_Twink_IdleBook, 0, MSG_Peach_00C9) + ExecWait(N(EVS_FocusCam_Table)) + Call(InterpPlayerYaw, 270, 5) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_ReadBook, ANIM_Twink_IdleBook, 5, MSG_Peach_00CA) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_CloseBook) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) + Wait(20 * DT) + Exec(N(EVS_Twink_FlyToHighPos)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(func_802D1270, LVar0, -74, Float(2.0 / DT)) + Call(func_802D1270, 287, -74, Float(2.0 / DT)) + Goto(LBL_BAKE_RESUME) + EndIf + IfEq(AB_KKJ_CompletedBakeStep, CAKE_TYPE_BAKED) // resume decorating - EVT_EXEC_WAIT(N(EVS_FocusCam_Twink)) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_ReadBook, ANIM_Twink_IdleBook, 0, MSG_Peach_00CB) - EVT_EXEC_WAIT(N(EVS_FocusCam_Table)) - EVT_CALL(InterpPlayerYaw, 270, 5) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_ReadBook, ANIM_Twink_IdleBook, 5, MSG_Peach_00CC) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_CloseBook) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) - EVT_WAIT(20) - EVT_THREAD - EVT_EXEC_WAIT(N(EVS_Twink_FlyToHighPos)) - EVT_CALL(SetEnemyFlagBits, NPC_Twink, ENEMY_FLAG_CANT_INTERACT, 0) - EVT_CALL(SetNpcVar, NPC_Twink, 1, 1) - EVT_END_THREAD - EVT_SET(LVarA, 1) - EVT_GOTO(LBL_DECORATE_RESUME) - EVT_END_IF + ExecWait(N(EVS_FocusCam_Twink)) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_ReadBook, ANIM_Twink_IdleBook, 0, MSG_Peach_00CB) + ExecWait(N(EVS_FocusCam_Table)) + Call(InterpPlayerYaw, 270, 5) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_ReadBook, ANIM_Twink_IdleBook, 5, MSG_Peach_00CC) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_CloseBook) + Wait(10) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) + Wait(20) + Thread + ExecWait(N(EVS_Twink_FlyToHighPos)) + Call(SetEnemyFlagBits, NPC_Twink, ENEMY_FLAG_CANT_INTERACT, 0) + Call(SetNpcVar, NPC_Twink, 1, 1) + EndThread + Set(LVarA, 1) + Goto(LBL_DECORATE_RESUME) + EndIf // step 1: add sugar & eggs - EVT_LABEL(LBL_ADD_SUGAR_EGGS) - EVT_SET(AB_KKJ19_CurrentBakeStep, BAKE_STEP_ADD_SUGAR_AND_EGGS) - EVT_SET(AB_KKJ19_BakeStepProgress, 0) - EVT_SET(AF_KKJ19_CanTakeIngredients, TRUE) - EVT_SET(AF_KKJ19_AddedSugar, FALSE) - EVT_SET(AF_KKJ19_AddedEgg, FALSE) - EVT_SET(AF_KKJ19_AddedNothingWrong, TRUE) - EVT_EXEC_WAIT(N(EVS_FocusCam_Twink)) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_ReadBook, ANIM_Twink_IdleBook, 0, MSG_Peach_00D1) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_CloseBook) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) - EVT_SET(LVarA, 1) - EVT_THREAD - EVT_EXEC_WAIT(N(EVS_Twink_FlyToHighPos)) - EVT_CALL(SetEnemyFlagBits, NPC_Twink, ENEMY_FLAG_CANT_INTERACT, 0) - EVT_CALL(SetNpcVar, NPC_Twink, 1, 1) - EVT_END_THREAD + Label(LBL_ADD_SUGAR_EGGS) + Set(AB_KKJ19_CurrentBakeStep, BAKE_STEP_ADD_SUGAR_AND_EGGS) + Set(AB_KKJ19_BakeStepProgress, 0) + Set(AF_KKJ19_CanTakeIngredients, TRUE) + Set(AF_KKJ19_AddedSugar, FALSE) + Set(AF_KKJ19_AddedEgg, FALSE) + Set(AF_KKJ19_AddedNothingWrong, TRUE) + ExecWait(N(EVS_FocusCam_Twink)) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_ReadBook, ANIM_Twink_IdleBook, 0, MSG_Peach_00D1) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_CloseBook) + Wait(10) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) + Set(LVarA, 1) + Thread + ExecWait(N(EVS_Twink_FlyToHighPos)) + Call(SetEnemyFlagBits, NPC_Twink, ENEMY_FLAG_CANT_INTERACT, 0) + Call(SetNpcVar, NPC_Twink, 1, 1) + EndThread // wait for peach to tell twink shes done - EVT_LABEL(LBL_ADD_SUGAR_EGGS_WAITING) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_IF_EQ(LVarA, 0) - EVT_CALL(SetEnemyFlagBits, NPC_Twink, ENEMY_FLAG_CANT_INTERACT, 0) - EVT_CALL(SetNpcVar, NPC_Twink, 1, 1) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetNpcVar, NPC_Twink, 0, 1) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcVar, NPC_Twink, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC_WAIT(N(EVS_Twink_FlyToPlayer)) - EVT_EXEC_WAIT(N(EVS_FocusCam_PeachAndTwink)) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00D2) - EVT_CALL(ShowChoice, MSG_Choice_0029) - EVT_IF_EQ(LVar0, 0) - EVT_IF_EQ(AB_KKJ19_BakeStepProgress, 0) - EVT_CALL(ContinueSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00BF) - EVT_CALL(NpcFlyTo, NPC_PARTNER, 390, 50, -70, 15, -5, EASING_LINEAR) - EVT_SET(LVarA, 0) - EVT_GOTO(LBL_ADD_SUGAR_EGGS_WAITING) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVar0, 1) - EVT_CALL(ContinueSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00D3) - EVT_CALL(NpcFlyTo, NPC_PARTNER, 390, 50, -70, 15, -5, EASING_LINEAR) - EVT_SET(LVarA, 0) - EVT_GOTO(LBL_ADD_SUGAR_EGGS_WAITING) - EVT_END_IF - EVT_IF_EQ(LVar0, 2) - EVT_GOTO(LBL_START_OVER) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_ReturnHeldIngredient)) - EVT_SET(LVar0, 0) - EVT_ADD(LVar0, AF_KKJ19_AddedSugar) - EVT_ADD(LVar0, AF_KKJ19_AddedEgg) - EVT_ADD(LVar0, AF_KKJ19_AddedNothingWrong) - EVT_IF_NE(LVar0, 3) - EVT_SET(AF_KKJ19_FailedBakingTask, TRUE) - EVT_END_IF - EVT_IF_EQ(AF_KKJ19_FailedBakingTask, FALSE) - EVT_SET(AB_KKJ_CompletedBakeStep, CAKE_TYPE_READY_TO_MIX) - EVT_END_IF + Label(LBL_ADD_SUGAR_EGGS_WAITING) + Call(ResetCam, CAM_DEFAULT, Float(4.0 / DT)) + IfEq(LVarA, 0) + Call(SetEnemyFlagBits, NPC_Twink, ENEMY_FLAG_CANT_INTERACT, 0) + Call(SetNpcVar, NPC_Twink, 1, 1) + EndIf + Call(DisablePlayerInput, FALSE) + Call(SetNpcVar, NPC_Twink, 0, 1) + Loop(0) + Wait(1) + Call(GetNpcVar, NPC_Twink, 0, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, TRUE) + ExecWait(N(EVS_Twink_FlyToPlayer)) + ExecWait(N(EVS_FocusCam_PeachAndTwink)) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00D2) + Call(ShowChoice, MSG_Choice_0029) + IfEq(LVar0, 0) + IfEq(AB_KKJ19_BakeStepProgress, 0) + Call(ContinueSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00BF) + Call(NpcFlyTo, NPC_PARTNER, 390, 50, -70, 15, -5, EASING_LINEAR) + Set(LVarA, 0) + Goto(LBL_ADD_SUGAR_EGGS_WAITING) + EndIf + EndIf + IfEq(LVar0, 1) + Call(ContinueSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00D3) + Call(NpcFlyTo, NPC_PARTNER, 390, 50, -70, 15, -5, EASING_LINEAR) + Set(LVarA, 0) + Goto(LBL_ADD_SUGAR_EGGS_WAITING) + EndIf + IfEq(LVar0, 2) + Goto(LBL_START_OVER) + EndIf + ExecWait(N(EVS_ReturnHeldIngredient)) + Set(LVar0, 0) + Add(LVar0, AF_KKJ19_AddedSugar) + Add(LVar0, AF_KKJ19_AddedEgg) + Add(LVar0, AF_KKJ19_AddedNothingWrong) + IfNe(LVar0, 3) + Set(AF_KKJ19_FailedBakingTask, TRUE) + EndIf + IfEq(AF_KKJ19_FailedBakingTask, FALSE) + Set(AB_KKJ_CompletedBakeStep, CAKE_TYPE_READY_TO_MIX) + EndIf // step 2: mix the ingredients - EVT_LABEL(LBL_MIX_FIRST) - EVT_EXEC_WAIT(N(EVS_FocusCam_Twink)) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_OpenBook) - EVT_WAIT(10) - EVT_CALL(ContinueSpeech, NPC_PARTNER, ANIM_Twink_ReadBook, ANIM_Twink_IdleBook, 0, MSG_Peach_00D4) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_CloseBook) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_EXEC(N(EVS_Twink_FlyToHighPos)) + Label(LBL_MIX_FIRST) + ExecWait(N(EVS_FocusCam_Twink)) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_OpenBook) + Wait(10) + Call(ContinueSpeech, NPC_PARTNER, ANIM_Twink_ReadBook, ANIM_Twink_IdleBook, 0, MSG_Peach_00D4) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_CloseBook) + Wait(10) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) + Call(ResetCam, CAM_DEFAULT, Float(2.0)) + Exec(N(EVS_Twink_FlyToHighPos)) // resume failed step from here - EVT_LABEL(LBL_MIX_RESUME) - EVT_SET(AB_KKJ19_CurrentBakeStep, BAKE_STEP_MIXING) - EVT_SET(AB_KKJ19_BakeStepProgress, 0) - EVT_SET(AF_KKJ19_CanTakeIngredients, FALSE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(2.0 / DT)) - EVT_CALL(PlayerMoveTo, LVar0, -74, 0) - EVT_CALL(PlayerMoveTo, 287, -74, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_ForwardIdle) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 5, MSG_Peach_00D5) - EVT_CALL(RemoveItemEntity, AB_KKJ19_CookwareItemIdx) - EVT_EXEC_GET_TID(N(EVS_UpdatePeachMixingAnimations), LVarA) - EVT_WAIT(10 * DT) - EVT_CALL(SetMusicTrack, 0, SONG_STIRRING_CAKE, 0, 8) - EVT_CALL(PlaySound, SOUND_GENERAL_WHISTLE) - EVT_THREAD - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(0.2 / DT), 0, 250, EVT_FLOAT(17.0), EVT_FLOAT(-7.0)) - EVT_END_THREAD - EVT_CALL(N(RunMixingMinigame), MIXING_TIME_IN_FRAMES) - EVT_CALL(PlaySound, SOUND_GENERAL_WHISTLE) - EVT_CALL(FadeOutMusic, 0, 500) - EVT_KILL_THREAD(LVarA) - EVT_IF_LT(LVar0, MIXING_REQUIRED_INPUTS) - EVT_SET(AF_KKJ19_FailedBakingTask, TRUE) - EVT_END_IF - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5.0 / DT)) - EVT_END_THREAD - EVT_CALL(NpcFlyTo, NPC_PARTNER, 337, 35, -74, 30 * DT, -5, EASING_LINEAR) - EVT_WAIT(10 * DT) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC_WAIT(N(EVS_FocusCam_PeachAndTwink)) - EVT_THREAD - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_ForwardIdle) - EVT_CALL(MakeItemEntity, ITEM_CAKE_MIXED, 287, 16, -40, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(AB_KKJ19_CookwareItemIdx, LVar0) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 5, MSG_Peach_00D6) - EVT_CALL(ShowChoice, MSG_Choice_002B) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(EndSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 5) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 5, MSG_Peach_00D7) - EVT_CALL(ShowChoice, MSG_Choice_002A) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(EndSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 5) - EVT_ELSE - EVT_GOTO(LBL_START_OVER) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(AF_KKJ19_FailedBakingTask, FALSE) - EVT_SET(AB_KKJ_CompletedBakeStep, CAKE_TYPE_MIXED) - EVT_END_IF + Label(LBL_MIX_RESUME) + Set(AB_KKJ19_CurrentBakeStep, BAKE_STEP_MIXING) + Set(AB_KKJ19_BakeStepProgress, 0) + Set(AF_KKJ19_CanTakeIngredients, FALSE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerSpeed, Float(2.0 / DT)) + Call(PlayerMoveTo, LVar0, -74, 0) + Call(PlayerMoveTo, 287, -74, 0) + Call(SetPlayerAnimation, ANIM_Peach2_ForwardIdle) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 5, MSG_Peach_00D5) + Call(RemoveItemEntity, AB_KKJ19_CookwareItemIdx) + ExecGetTID(N(EVS_UpdatePeachMixingAnimations), LVarA) + Wait(10 * DT) + Call(SetMusicTrack, 0, SONG_STIRRING_CAKE, 0, 8) + Call(PlaySound, SOUND_GENERAL_WHISTLE) + Thread + Call(AdjustCam, CAM_DEFAULT, Float(0.2 / DT), 0, 250, Float(17.0), Float(-7.0)) + EndThread + Call(N(RunMixingMinigame), MIXING_TIME_IN_FRAMES) + Call(PlaySound, SOUND_GENERAL_WHISTLE) + Call(FadeOutMusic, 0, 500) + KillThread(LVarA) + IfLt(LVar0, MIXING_REQUIRED_INPUTS) + Set(AF_KKJ19_FailedBakingTask, TRUE) + EndIf + Wait(10 * DT) + Thread + Call(ResetCam, CAM_DEFAULT, Float(5.0 / DT)) + EndThread + Call(NpcFlyTo, NPC_PARTNER, 337, 35, -74, 30 * DT, -5, EASING_LINEAR) + Wait(10 * DT) + Exec(N(EVS_SetupMusic)) + ExecWait(N(EVS_FocusCam_PeachAndTwink)) + Thread + Call(SetPlayerAnimation, ANIM_Peach2_ForwardIdle) + Call(MakeItemEntity, ITEM_CAKE_MIXED, 287, 16, -40, ITEM_SPAWN_MODE_DECORATION, 0) + Set(AB_KKJ19_CookwareItemIdx, LVar0) + EndThread + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 5, MSG_Peach_00D6) + Call(ShowChoice, MSG_Choice_002B) + IfEq(LVar0, 0) + Call(EndSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 5) + Else + Call(ContinueSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 5, MSG_Peach_00D7) + Call(ShowChoice, MSG_Choice_002A) + IfEq(LVar0, 0) + Call(EndSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 5) + Else + Goto(LBL_START_OVER) + EndIf + EndIf + IfEq(AF_KKJ19_FailedBakingTask, FALSE) + Set(AB_KKJ_CompletedBakeStep, CAKE_TYPE_MIXED) + EndIf // step 3: add flour and butter - EVT_LABEL(LBL_ADD_FLOUR_BUTTER_FIRST) - EVT_EXEC_WAIT(N(EVS_FocusCam_Twink)) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_OpenBook) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_ReadBook, ANIM_Twink_IdleBook, 5, MSG_Peach_00D8) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_CloseBook) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) + Label(LBL_ADD_FLOUR_BUTTER_FIRST) + ExecWait(N(EVS_FocusCam_Twink)) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_OpenBook) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_ReadBook, ANIM_Twink_IdleBook, 5, MSG_Peach_00D8) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_CloseBook) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) // resume failed step from here - EVT_LABEL(LBL_ADD_FLOUR_BUTTER_RESUME) - EVT_SET(AB_KKJ19_CurrentBakeStep, BAKE_STEP_ADD_FLOUR_AND_BUTTER) - EVT_SET(AB_KKJ19_BakeStepProgress, 0) - EVT_SET(AF_KKJ19_CanTakeIngredients, TRUE) - EVT_SET(AF_KKJ19_AddedFlour, FALSE) - EVT_SET(AF_KKJ19_AddedButter, FALSE) - EVT_SET(AF_KKJ19_AddedNothingWrong, TRUE) - EVT_SET(LVarA, 1) - EVT_THREAD - EVT_EXEC_WAIT(N(EVS_Twink_FlyToHighPos)) - EVT_CALL(SetEnemyFlagBits, NPC_Twink, ENEMY_FLAG_CANT_INTERACT, 0) - EVT_CALL(SetNpcVar, NPC_Twink, 1, 1) - EVT_END_THREAD + Label(LBL_ADD_FLOUR_BUTTER_RESUME) + Set(AB_KKJ19_CurrentBakeStep, BAKE_STEP_ADD_FLOUR_AND_BUTTER) + Set(AB_KKJ19_BakeStepProgress, 0) + Set(AF_KKJ19_CanTakeIngredients, TRUE) + Set(AF_KKJ19_AddedFlour, FALSE) + Set(AF_KKJ19_AddedButter, FALSE) + Set(AF_KKJ19_AddedNothingWrong, TRUE) + Set(LVarA, 1) + Thread + ExecWait(N(EVS_Twink_FlyToHighPos)) + Call(SetEnemyFlagBits, NPC_Twink, ENEMY_FLAG_CANT_INTERACT, 0) + Call(SetNpcVar, NPC_Twink, 1, 1) + EndThread // wait for peach to tell twink shes done - EVT_LABEL(LBL_ADD_FLOUR_BUTTER_WAITING) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_IF_EQ(LVarA, 0) - EVT_CALL(SetEnemyFlagBits, NPC_Twink, ENEMY_FLAG_CANT_INTERACT, 0) - EVT_CALL(SetNpcVar, NPC_Twink, 1, 1) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetNpcVar, NPC_Twink, 0, 1) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcVar, NPC_Twink, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC_WAIT(N(EVS_Twink_FlyToPlayer)) - EVT_EXEC_WAIT(N(EVS_FocusCam_PeachAndTwink)) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00D9) - EVT_CALL(ShowChoice, MSG_Choice_0029) - EVT_IF_EQ(LVar0, 0) - EVT_IF_EQ(AB_KKJ19_BakeStepProgress, 0) - EVT_CALL(ContinueSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00BF) - EVT_CALL(NpcFlyTo, NPC_PARTNER, 390, 50, -70, 15, -5, EASING_LINEAR) - EVT_SET(LVarA, 0) - EVT_GOTO(LBL_ADD_FLOUR_BUTTER_WAITING) - EVT_ELSE - EVT_CALL(EndSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 5) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVar0, 1) - EVT_CALL(ContinueSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00DA) - EVT_CALL(NpcFlyTo, NPC_PARTNER, 390, 50, -70, 15, -5, EASING_LINEAR) - EVT_SET(LVarA, 0) - EVT_GOTO(LBL_ADD_FLOUR_BUTTER_WAITING) - EVT_END_IF - EVT_IF_EQ(LVar0, 2) - EVT_GOTO(LBL_START_OVER) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_ReturnHeldIngredient)) - EVT_SET(LVar0, 0) - EVT_ADD(LVar0, AF_KKJ19_AddedFlour) - EVT_ADD(LVar0, AF_KKJ19_AddedButter) - EVT_ADD(LVar0, AF_KKJ19_AddedNothingWrong) - EVT_IF_NE(LVar0, 3) - EVT_SET(AF_KKJ19_FailedBakingTask, TRUE) - EVT_END_IF - EVT_IF_EQ(AF_KKJ19_FailedBakingTask, FALSE) - EVT_SET(AB_KKJ_CompletedBakeStep, CAKE_TYPE_READY_TO_BAKE) - EVT_END_IF + Label(LBL_ADD_FLOUR_BUTTER_WAITING) + Call(ResetCam, CAM_DEFAULT, Float(4.0 / DT)) + IfEq(LVarA, 0) + Call(SetEnemyFlagBits, NPC_Twink, ENEMY_FLAG_CANT_INTERACT, 0) + Call(SetNpcVar, NPC_Twink, 1, 1) + EndIf + Call(DisablePlayerInput, FALSE) + Call(SetNpcVar, NPC_Twink, 0, 1) + Loop(0) + Wait(1) + Call(GetNpcVar, NPC_Twink, 0, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, TRUE) + ExecWait(N(EVS_Twink_FlyToPlayer)) + ExecWait(N(EVS_FocusCam_PeachAndTwink)) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00D9) + Call(ShowChoice, MSG_Choice_0029) + IfEq(LVar0, 0) + IfEq(AB_KKJ19_BakeStepProgress, 0) + Call(ContinueSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00BF) + Call(NpcFlyTo, NPC_PARTNER, 390, 50, -70, 15, -5, EASING_LINEAR) + Set(LVarA, 0) + Goto(LBL_ADD_FLOUR_BUTTER_WAITING) + Else + Call(EndSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 5) + EndIf + EndIf + IfEq(LVar0, 1) + Call(ContinueSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00DA) + Call(NpcFlyTo, NPC_PARTNER, 390, 50, -70, 15, -5, EASING_LINEAR) + Set(LVarA, 0) + Goto(LBL_ADD_FLOUR_BUTTER_WAITING) + EndIf + IfEq(LVar0, 2) + Goto(LBL_START_OVER) + EndIf + ExecWait(N(EVS_ReturnHeldIngredient)) + Set(LVar0, 0) + Add(LVar0, AF_KKJ19_AddedFlour) + Add(LVar0, AF_KKJ19_AddedButter) + Add(LVar0, AF_KKJ19_AddedNothingWrong) + IfNe(LVar0, 3) + Set(AF_KKJ19_FailedBakingTask, TRUE) + EndIf + IfEq(AF_KKJ19_FailedBakingTask, FALSE) + Set(AB_KKJ_CompletedBakeStep, CAKE_TYPE_READY_TO_BAKE) + EndIf // step 4: baking - EVT_LABEL(LBL_BAKE_FIRST) - EVT_EXEC_WAIT(N(EVS_FocusCam_Twink)) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 5, MSG_Peach_00DB) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_EXEC(N(EVS_Twink_FlyToHighPos)) + Label(LBL_BAKE_FIRST) + ExecWait(N(EVS_FocusCam_Twink)) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 5, MSG_Peach_00DB) + Call(ResetCam, CAM_DEFAULT, Float(2.0 / DT)) + Exec(N(EVS_Twink_FlyToHighPos)) // resume failed step from here - EVT_LABEL(LBL_BAKE_RESUME) - EVT_SET(AB_KKJ19_CurrentBakeStep, BAKE_STEP_BAKING) - EVT_SET(AF_KKJ19_CanTakeIngredients, FALSE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(2.0 / DT)) - EVT_CALL(PlayerMoveTo, LVar0, -74, 0) - EVT_CALL(PlayerMoveTo, 287, -74, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_ForwardIdle) - EVT_WAIT(10 * DT) - EVT_CALL(RemoveItemEntity, AB_KKJ19_CookwareItemIdx) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_MixingFull) - EVT_WAIT(40 * DT) - EVT_CALL(N(SetHeldBakingItem), PEACH_BAKING_CAKE_MIXED) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(2.0 / DT)) - EVT_CALL(NpcFlyTo, NPC_PARTNER, 337, 35, -74, 0, -5, EASING_LINEAR) - EVT_END_THREAD - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(2.0 / DT)) - EVT_CALL(PlayerMoveTo, 190, -70, 0) - EVT_CALL(InterpPlayerYaw, 90, 1) - EVT_CALL(PlayerMoveTo, 190, 35, 0) - EVT_CALL(PlayerMoveTo, 240, 35, 0) - EVT_CALL(InterpPlayerYaw, 350, 5) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach3_PourBatter) - EVT_WAIT(20 * DT) - EVT_CALL(RemoveItemEntity, AB_KKJ19_CakeItemIdx) - EVT_CALL(MakeItemEntity, ITEM_CAKE_BATTER, 230, 16, 0, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(AB_KKJ19_CakeItemIdx, LVar0) - EVT_WAIT(10 * DT) - EVT_CALL(N(SetHeldBakingItem), PEACH_BAKING_NONE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(MakeItemEntity, ITEM_CAKE_BOWL, 250, 16, 0, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(AB_KKJ19_CookwareItemIdx, LVar0) - EVT_WAIT(40 * DT) - EVT_EXEC_WAIT(N(EVS_FocusCam_Twink)) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_OpenBook) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_ReadBook, ANIM_Twink_IdleBook, 0, MSG_Peach_00DC) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_CloseBook) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(InterpPlayerYaw, 315, 0) - EVT_WAIT(10) - EVT_CALL(RemoveItemEntity, AB_KKJ19_CakeItemIdx) - EVT_CALL(N(SetHeldBakingItem), PEACH_BAKING_CAKE_BATTER) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_WAIT(10) - EVT_EXEC(N(EVS_FocusCam_Oven)) - EVT_THREAD - EVT_CALL(NpcFlyTo, NPC_PARTNER, 190, 60, -100, 50 * DT, -5, EASING_LINEAR) - EVT_END_THREAD - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(2.0 / DT)) - EVT_CALL(PlayerMoveTo, 190, 30, 0) - EVT_CALL(PlayerMoveTo, 190, -100, 0) - EVT_CALL(PlayerMoveTo, 125, -100, 0) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00DD) - EVT_CALL(InterpPlayerYaw, 315, 5) - EVT_WAIT(10 * DT) - EVT_CALL(N(AwaitPlayerPressATimer)) - EVT_EXEC_WAIT(N(EVS_OpenOverDoor)) - EVT_CALL(N(SetHeldBakingItem), PEACH_BAKING_NONE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(MakeItemEntity, ITEM_CAKE_BATTER, 100, 5, -135, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(AB_KKJ19_CakeItemIdx, LVar0) - EVT_SET(LVar0, -135) - EVT_LOOP(30) - EVT_SUB(LVar0, 1) - EVT_CALL(SetItemPos, AB_KKJ19_CakeItemIdx, 100, 5, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_EXEC_WAIT(N(EVS_CloseOverDoor)) - EVT_WAIT(10 * DT) - EVT_CALL(PlaySoundAt, SOUND_START_OVEN_TIMER, SOUND_SPACE_DEFAULT, 100, 22, -178) - EVT_WAIT(20 * DT) - EVT_CALL(FadeOutMusic, 0, 500) - EVT_CALL(PlaySoundAt, SOUND_OVEN_TIMER_TICKING, SOUND_SPACE_DEFAULT, 100, 22, -178) - EVT_CALL(N(AwaitPlayerPressATimer)) - EVT_CALL(StopSound, SOUND_OVEN_TIMER_TICKING) - EVT_CALL(PlaySoundAt, SOUND_DING, SOUND_SPACE_DEFAULT, 100, 22, -178) - EVT_WAIT(10 * DT) + Label(LBL_BAKE_RESUME) + Set(AB_KKJ19_CurrentBakeStep, BAKE_STEP_BAKING) + Set(AF_KKJ19_CanTakeIngredients, FALSE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerSpeed, Float(2.0 / DT)) + Call(PlayerMoveTo, LVar0, -74, 0) + Call(PlayerMoveTo, 287, -74, 0) + Call(SetPlayerAnimation, ANIM_Peach2_ForwardIdle) + Wait(10 * DT) + Call(RemoveItemEntity, AB_KKJ19_CookwareItemIdx) + Call(SetPlayerAnimation, ANIM_Peach2_MixingFull) + Wait(40 * DT) + Call(N(SetHeldBakingItem), PEACH_BAKING_CAKE_MIXED) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Wait(10 * DT) + Thread + Call(SetNpcSpeed, NPC_PARTNER, Float(2.0 / DT)) + Call(NpcFlyTo, NPC_PARTNER, 337, 35, -74, 0, -5, EASING_LINEAR) + EndThread + Call(SetPlayerSpeed, Float(2.0 / DT)) + Call(PlayerMoveTo, 190, -70, 0) + Call(InterpPlayerYaw, 90, 1) + Call(PlayerMoveTo, 190, 35, 0) + Call(PlayerMoveTo, 240, 35, 0) + Call(InterpPlayerYaw, 350, 5) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach3_PourBatter) + Wait(20 * DT) + Call(RemoveItemEntity, AB_KKJ19_CakeItemIdx) + Call(MakeItemEntity, ITEM_CAKE_BATTER, 230, 16, 0, ITEM_SPAWN_MODE_DECORATION, 0) + Set(AB_KKJ19_CakeItemIdx, LVar0) + Wait(10 * DT) + Call(N(SetHeldBakingItem), PEACH_BAKING_NONE) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(MakeItemEntity, ITEM_CAKE_BOWL, 250, 16, 0, ITEM_SPAWN_MODE_DECORATION, 0) + Set(AB_KKJ19_CookwareItemIdx, LVar0) + Wait(40 * DT) + ExecWait(N(EVS_FocusCam_Twink)) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_OpenBook) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_ReadBook, ANIM_Twink_IdleBook, 0, MSG_Peach_00DC) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_CloseBook) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) + Call(ResetCam, CAM_DEFAULT, Float(2.0 / DT)) + Call(InterpPlayerYaw, 315, 0) + Wait(10) + Call(RemoveItemEntity, AB_KKJ19_CakeItemIdx) + Call(N(SetHeldBakingItem), PEACH_BAKING_CAKE_BATTER) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Wait(10) + Exec(N(EVS_FocusCam_Oven)) + Thread + Call(NpcFlyTo, NPC_PARTNER, 190, 60, -100, 50 * DT, -5, EASING_LINEAR) + EndThread + Call(SetPlayerSpeed, Float(2.0 / DT)) + Call(PlayerMoveTo, 190, 30, 0) + Call(PlayerMoveTo, 190, -100, 0) + Call(PlayerMoveTo, 125, -100, 0) + Wait(30 * DT) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00DD) + Call(InterpPlayerYaw, 315, 5) + Wait(10 * DT) + Call(N(AwaitPlayerPressATimer)) + ExecWait(N(EVS_OpenOverDoor)) + Call(N(SetHeldBakingItem), PEACH_BAKING_NONE) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(MakeItemEntity, ITEM_CAKE_BATTER, 100, 5, -135, ITEM_SPAWN_MODE_DECORATION, 0) + Set(AB_KKJ19_CakeItemIdx, LVar0) + Set(LVar0, -135) + Loop(30) + Sub(LVar0, 1) + Call(SetItemPos, AB_KKJ19_CakeItemIdx, 100, 5, LVar0) + Wait(1) + EndLoop + ExecWait(N(EVS_CloseOverDoor)) + Wait(10 * DT) + Call(PlaySoundAt, SOUND_START_OVEN_TIMER, SOUND_SPACE_DEFAULT, 100, 22, -178) + Wait(20 * DT) + Call(FadeOutMusic, 0, 500) + Call(PlaySoundAt, SOUND_OVEN_TIMER_TICKING, SOUND_SPACE_DEFAULT, 100, 22, -178) + Call(N(AwaitPlayerPressATimer)) + Call(StopSound, SOUND_OVEN_TIMER_TICKING) + Call(PlaySoundAt, SOUND_DING, SOUND_SPACE_DEFAULT, 100, 22, -178) + Wait(10 * DT) // check baking time - EVT_IF_LT(LVar0, BAKING_TIME_MIN_FRAMES) - EVT_SET(AF_KKJ19_FailedBakingTask, TRUE) - EVT_END_IF - EVT_IF_GT(LVar0, BAKING_TIME_MAX_FRAMES) - EVT_SET(AF_KKJ19_FailedBakingTask, TRUE) - EVT_END_IF - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC_WAIT(N(EVS_OpenOverDoor)) - EVT_SET(LVar0, -165) - EVT_LOOP(30) - EVT_WAIT(1) - EVT_ADD(LVar0, 1) - EVT_CALL(SetItemPos, AB_KKJ19_CakeItemIdx, 100, 5, LVar0) - EVT_END_LOOP - EVT_CALL(RemoveItemEntity, AB_KKJ19_CakeItemIdx) - EVT_CALL(N(SetHeldBakingItem), PEACH_BAKING_CAKE_BATTER) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_EXEC_WAIT(N(EVS_CloseOverDoor)) - EVT_WAIT(10 * DT) - EVT_CALL(InterpPlayerYaw, 90, 5) - EVT_EXEC_WAIT(N(EVS_FocusCam_PeachAndTwink)) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00DE) - EVT_CALL(ShowChoice, MSG_Choice_002B) - EVT_IF_NE(LVar0, 0) - EVT_CALL(ContinueSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00DF) - EVT_CALL(ShowChoice, MSG_Choice_002A) - EVT_IF_NE(LVar0, 0) - EVT_GOTO(LBL_START_OVER) - EVT_END_IF - EVT_END_IF - EVT_CALL(ContinueSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00E0) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 287, 0, -74) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 287, 0, -74) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_EXEC(N(EVS_Twink_FlyToHighPos)) - EVT_CALL(PlayerMoveTo, 287, -74, 100) - EVT_CALL(N(SetHeldBakingItem), PEACH_BAKING_NONE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(MakeItemEntity, ITEM_CAKE_BATTER, 287, 16, -40, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_WAIT(30 * DT) - EVT_CALL(RemoveItemEntity, LVar0) - EVT_CALL(MakeItemEntity, ITEM_CAKE_BARE, 287, 20, -30, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(AB_KKJ19_CakeItemIdx, LVar0) - EVT_WAIT(10 * DT) - EVT_IF_EQ(AF_KKJ19_FailedBakingTask, FALSE) - EVT_SET(AB_KKJ_CompletedBakeStep, CAKE_TYPE_BAKED) - EVT_END_IF + IfLt(LVar0, BAKING_TIME_MIN_FRAMES) + Set(AF_KKJ19_FailedBakingTask, TRUE) + EndIf + IfGt(LVar0, BAKING_TIME_MAX_FRAMES) + Set(AF_KKJ19_FailedBakingTask, TRUE) + EndIf + Exec(N(EVS_SetupMusic)) + ExecWait(N(EVS_OpenOverDoor)) + Set(LVar0, -165) + Loop(30) + Wait(1) + Add(LVar0, 1) + Call(SetItemPos, AB_KKJ19_CakeItemIdx, 100, 5, LVar0) + EndLoop + Call(RemoveItemEntity, AB_KKJ19_CakeItemIdx) + Call(N(SetHeldBakingItem), PEACH_BAKING_CAKE_BATTER) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + ExecWait(N(EVS_CloseOverDoor)) + Wait(10 * DT) + Call(InterpPlayerYaw, 90, 5) + ExecWait(N(EVS_FocusCam_PeachAndTwink)) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00DE) + Call(ShowChoice, MSG_Choice_002B) + IfNe(LVar0, 0) + Call(ContinueSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00DF) + Call(ShowChoice, MSG_Choice_002A) + IfNe(LVar0, 0) + Goto(LBL_START_OVER) + EndIf + EndIf + Call(ContinueSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00E0) + Call(UseSettingsFrom, CAM_DEFAULT, 287, 0, -74) + Call(SetPanTarget, CAM_DEFAULT, 287, 0, -74) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Exec(N(EVS_Twink_FlyToHighPos)) + Call(PlayerMoveTo, 287, -74, 100) + Call(N(SetHeldBakingItem), PEACH_BAKING_NONE) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(MakeItemEntity, ITEM_CAKE_BATTER, 287, 16, -40, ITEM_SPAWN_MODE_DECORATION, 0) + Wait(30 * DT) + Call(RemoveItemEntity, LVar0) + Call(MakeItemEntity, ITEM_CAKE_BARE, 287, 20, -30, ITEM_SPAWN_MODE_DECORATION, 0) + Set(AB_KKJ19_CakeItemIdx, LVar0) + Wait(10 * DT) + IfEq(AF_KKJ19_FailedBakingTask, FALSE) + Set(AB_KKJ_CompletedBakeStep, CAKE_TYPE_BAKED) + EndIf // step 5: decorating - EVT_LABEL(LBL_DECORATE_FIRST) - EVT_EXEC_WAIT(N(EVS_FocusCam_Twink)) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_OpenBook) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_ReadBook, ANIM_Twink_IdleBook, 0, MSG_Peach_00E1) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_CloseBook) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) - EVT_SET(LVarA, 0) + Label(LBL_DECORATE_FIRST) + ExecWait(N(EVS_FocusCam_Twink)) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_OpenBook) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_ReadBook, ANIM_Twink_IdleBook, 0, MSG_Peach_00E1) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_CloseBook) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) + Set(LVarA, 0) // resume failed step from here - EVT_LABEL(LBL_DECORATE_RESUME) - EVT_SET(AB_KKJ19_CurrentBakeStep, BAKE_STEP_DECORATING) - EVT_SET(AB_KKJ19_BakeStepProgress, 0) - EVT_SET(AF_KKJ19_CanTakeIngredients, TRUE) - EVT_SET(AB_KKJ19_AddedIcing, FALSE) - EVT_SET(AB_KKJ19_AddedBerries, FALSE) + Label(LBL_DECORATE_RESUME) + Set(AB_KKJ19_CurrentBakeStep, BAKE_STEP_DECORATING) + Set(AB_KKJ19_BakeStepProgress, 0) + Set(AF_KKJ19_CanTakeIngredients, TRUE) + Set(AB_KKJ19_AddedIcing, FALSE) + Set(AB_KKJ19_AddedBerries, FALSE) // wait for peach to tell twink shes done - EVT_LABEL(LBL_DECORATE_WAITING) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_IF_EQ(LVarA, 0) - EVT_CALL(SetEnemyFlagBits, NPC_Twink, ENEMY_FLAG_CANT_INTERACT, 0) - EVT_CALL(SetNpcVar, NPC_Twink, 1, 1) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetNpcVar, NPC_Twink, 0, 1) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcVar, NPC_Twink, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC_WAIT(N(EVS_Twink_FlyToPlayer)) - EVT_EXEC_WAIT(N(EVS_FocusCam_PeachAndTwink)) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00E2) - EVT_CALL(ShowChoice, MSG_Choice_0029) - EVT_IF_EQ(LVar0, 0) + Label(LBL_DECORATE_WAITING) + Call(ResetCam, CAM_DEFAULT, Float(4.0 / DT)) + IfEq(LVarA, 0) + Call(SetEnemyFlagBits, NPC_Twink, ENEMY_FLAG_CANT_INTERACT, 0) + Call(SetNpcVar, NPC_Twink, 1, 1) + EndIf + Call(DisablePlayerInput, FALSE) + Call(SetNpcVar, NPC_Twink, 0, 1) + Loop(0) + Wait(1) + Call(GetNpcVar, NPC_Twink, 0, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, TRUE) + ExecWait(N(EVS_Twink_FlyToPlayer)) + ExecWait(N(EVS_FocusCam_PeachAndTwink)) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00E2) + Call(ShowChoice, MSG_Choice_0029) + IfEq(LVar0, 0) // chose 'done' - EVT_IF_EQ(AB_KKJ19_BakeStepProgress, 0) - EVT_CALL(ContinueSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00C0) - EVT_CALL(NpcFlyTo, NPC_PARTNER, 390, 50, -70, 15, -5, EASING_LINEAR) - EVT_SET(LVarA, 0) - EVT_GOTO(LBL_DECORATE_WAITING) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVar0, 1) + IfEq(AB_KKJ19_BakeStepProgress, 0) + Call(ContinueSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00C0) + Call(NpcFlyTo, NPC_PARTNER, 390, 50, -70, 15, -5, EASING_LINEAR) + Set(LVarA, 0) + Goto(LBL_DECORATE_WAITING) + EndIf + EndIf + IfEq(LVar0, 1) // chose 'not done' - EVT_CALL(ContinueSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00E3) - EVT_CALL(NpcFlyTo, NPC_PARTNER, 390, 50, -70, 15, -5, EASING_LINEAR) - EVT_SET(LVarA, 0) - EVT_GOTO(LBL_DECORATE_WAITING) - EVT_END_IF - EVT_IF_EQ(LVar0, 2) + Call(ContinueSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00E3) + Call(NpcFlyTo, NPC_PARTNER, 390, 50, -70, 15, -5, EASING_LINEAR) + Set(LVarA, 0) + Goto(LBL_DECORATE_WAITING) + EndIf + IfEq(LVar0, 2) // chose 'start over' - EVT_GOTO(LBL_START_OVER) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_ReturnHeldIngredient)) - EVT_IF_EQ(AB_KKJ19_AddedBerries, FALSE) - EVT_SET(AF_KKJ19_FailedBakingTask, TRUE) - EVT_END_IF - EVT_IF_EQ(AF_KKJ19_FailedBakingTask, FALSE) - EVT_SET(AB_KKJ_CompletedBakeStep, CAKE_TYPE_DONE) - EVT_END_IF - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Delighted) - EVT_CALL(ContinueSpeech, NPC_PARTNER, ANIM_Twink_ShoutJoy, ANIM_Twink_ShoutJoy, 0, MSG_Peach_00E4) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) + Goto(LBL_START_OVER) + EndIf + ExecWait(N(EVS_ReturnHeldIngredient)) + IfEq(AB_KKJ19_AddedBerries, FALSE) + Set(AF_KKJ19_FailedBakingTask, TRUE) + EndIf + IfEq(AF_KKJ19_FailedBakingTask, FALSE) + Set(AB_KKJ_CompletedBakeStep, CAKE_TYPE_DONE) + EndIf + Call(SetPlayerAnimation, ANIM_Peach2_Delighted) + Call(ContinueSpeech, NPC_PARTNER, ANIM_Twink_ShoutJoy, ANIM_Twink_ShoutJoy, 0, MSG_Peach_00E4) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) // cake ready for gourmet guy (but not necessarily succcesful) - EVT_LABEL(LBL_FINISHED) - EVT_SET(AB_KKJ19_CurrentBakeStep, BAKE_STEP_DONE) - EVT_SET(AF_KKJ19_CanTakeIngredients, FALSE) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5.0 / DT)) - EVT_EXEC(N(EVS_BindCakePickup)) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN + Label(LBL_FINISHED) + Set(AB_KKJ19_CurrentBakeStep, BAKE_STEP_DONE) + Set(AF_KKJ19_CanTakeIngredients, FALSE) + Call(ResetCam, CAM_DEFAULT, Float(5.0 / DT)) + Exec(N(EVS_BindCakePickup)) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Return // starting over - EVT_LABEL(LBL_START_OVER) - EVT_CALL(ContinueSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 5, MSG_Peach_00CD) - EVT_CALL(N(FadeScreenToBlack)) - EVT_EXEC_WAIT(N(EVS_ReturnHeldIngredient)) - EVT_CALL(N(SetHeldBakingItem), PEACH_BAKING_NONE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(RemoveItemEntity, AB_KKJ19_CookwareItemIdx) - EVT_IF_NE(AB_KKJ19_CurrentBakeStep, BAKE_STEP_BAKING) - EVT_CALL(RemoveItemEntity, AB_KKJ19_CakeItemIdx) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_SetCookwareOnTable)) - EVT_CALL(SetNpcPos, NPC_PARTNER, 440, 25, -30) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 270) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_CALL(SetPlayerPos, 400, 0, -30) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(90.0), 0, 350, EVT_FLOAT(17.0), EVT_FLOAT(-7.0)) - EVT_WAIT(10 * DT) - EVT_CALL(N(FadeScreenFromBlack)) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00CE) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_ArmsCrossedTalk, ANIM_Peach2_ArmsCrossedIdle, 5, MSG_Peach_00CF) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_CALL(ContinueSpeech, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 0, MSG_Peach_00D0) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_OpenBook) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_IdleBook) - EVT_GOTO(LBL_TRY_RESUME) - EVT_END + Label(LBL_START_OVER) + Call(ContinueSpeech, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 5, MSG_Peach_00CD) + Call(N(FadeScreenToBlack)) + ExecWait(N(EVS_ReturnHeldIngredient)) + Call(N(SetHeldBakingItem), PEACH_BAKING_NONE) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(RemoveItemEntity, AB_KKJ19_CookwareItemIdx) + IfNe(AB_KKJ19_CurrentBakeStep, BAKE_STEP_BAKING) + Call(RemoveItemEntity, AB_KKJ19_CakeItemIdx) + EndIf + ExecWait(N(EVS_SetCookwareOnTable)) + Call(SetNpcPos, NPC_PARTNER, 440, 25, -30) + Call(SetNpcYaw, NPC_PARTNER, 270) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Call(SetPlayerPos, 400, 0, -30) + Call(InterpPlayerYaw, 90, 0) + Call(AdjustCam, CAM_DEFAULT, Float(90.0), 0, 350, Float(17.0), Float(-7.0)) + Wait(10 * DT) + Call(N(FadeScreenFromBlack)) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_00CE) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_ArmsCrossedTalk, ANIM_Peach2_ArmsCrossedIdle, 5, MSG_Peach_00CF) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Call(ContinueSpeech, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 0, MSG_Peach_00D0) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_OpenBook) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_IdleBook) + Goto(LBL_TRY_RESUME) + End }; diff --git a/src/world/area_kkj/kkj_20/kkj_20_1_music.c b/src/world/area_kkj/kkj_20/kkj_20_1_music.c index cbe6c351c6b..a7f38521ea3 100644 --- a/src/world/area_kkj/kkj_20/kkj_20_1_music.c +++ b/src/world/area_kkj/kkj_20/kkj_20_1_music.c @@ -1,13 +1,13 @@ #include "kkj_20.h" EvtScript N(EVS_PlayBowserSong) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSER_ATTACKS, 1, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSER_ATTACKS, 1, 8) + Return + End }; EvtScript N(EVS_PlayRestingSong) = { - EVT_CALL(SetMusicTrack, 0, SONG_TAKING_REST, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TAKING_REST, 0, 8) + Return + End }; diff --git a/src/world/area_kkj/kkj_20/kkj_20_2_main.c b/src/world/area_kkj/kkj_20/kkj_20_2_main.c index 7ae664c1968..ecec77b7631 100644 --- a/src/world/area_kkj/kkj_20/kkj_20_2_main.c +++ b/src/world/area_kkj/kkj_20/kkj_20_2_main.c @@ -1,38 +1,38 @@ #include "kkj_20.h" EvtScript N(EVS_ExitDoor_kkj_10_4) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, kkj_20_ENTRY_0) - EVT_SET(LVar1, COLLIDER_ttw) - EVT_SET(LVar2, MODEL_o9) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kkj_10"), kkj_10_ENTRY_4) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, kkj_20_ENTRY_0) + Set(LVar1, COLLIDER_ttw) + Set(LVar2, MODEL_o9) + Set(LVar3, DOOR_SWING_IN) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("kkj_10"), kkj_10_ENTRY_4) + Wait(100) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_SET(LVar0, kkj_20_ENTRY_0) - EVT_SET(LVar2, MODEL_o9) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_RETURN - EVT_END + Set(LVar0, kkj_20_ENTRY_0) + Set(LVar2, MODEL_o9) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PEACHS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_KKJ_20) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_kkj_10_4)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_PEACHS_CASTLE) + Call(SetSpriteShading, SHADING_KKJ_20) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + BindTrigger(Ref(N(EVS_ExitDoor_kkj_10_4)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_kkj/kkj_20/kkj_20_3_entity.c b/src/world/area_kkj/kkj_20/kkj_20_3_entity.c index 94aa8c99b26..9ec79e07a77 100644 --- a/src/world/area_kkj/kkj_20/kkj_20_3_entity.c +++ b/src/world/area_kkj/kkj_20/kkj_20_3_entity.c @@ -4,24 +4,24 @@ #include "world/common/entity/Chest.inc.c" EvtScript N(EVS_OpenChest_LastStand) = { - EVT_SET(LVarA, ITEM_LAST_STAND) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, LVarA) - EVT_EXEC_WAIT(N(EVS_Chest_ShowGotItem)) - EVT_IF_GE(GB_StoryProgress, STORY_CH8_REACHED_PEACHS_CASTLE) - EVT_CALL(AddBadge, LVarA, LVar0) - EVT_END_IF - EVT_SET(GF_KKJ20_Chest_LastStand, TRUE) - EVT_WAIT(15) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Set(LVarA, ITEM_LAST_STAND) + Call(DisablePlayerInput, TRUE) + Set(LVar0, LVarA) + ExecWait(N(EVS_Chest_ShowGotItem)) + IfGe(GB_StoryProgress, STORY_CH8_REACHED_PEACHS_CASTLE) + Call(AddBadge, LVarA, LVar0) + EndIf + Set(GF_KKJ20_Chest_LastStand, TRUE) + Wait(15) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 95, 0, 0, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_KKJ20_Chest_LastStand) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenChest_LastStand))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Chest), 95, 0, 0, 0, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_KKJ20_Chest_LastStand) + Call(AssignScript, Ref(N(EVS_OpenChest_LastStand))) + Return + End }; diff --git a/src/world/area_kkj/kkj_20/kkj_20_4_npc.c b/src/world/area_kkj/kkj_20/kkj_20_4_npc.c index 6bca1f8a014..8cf91ae8291 100644 --- a/src/world/area_kkj/kkj_20/kkj_20_4_npc.c +++ b/src/world/area_kkj/kkj_20/kkj_20_4_npc.c @@ -10,332 +10,332 @@ #include "world/common/todo/GetPeachDisguise.inc.c" EvtScript N(EVS_OpenDresserDoors) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_o80, SOUND_WOODEN_DOOR_OPEN, 0) - EVT_CALL(MakeLerp, 0, 80, 14, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g16, LVar0, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_g15, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_o80, SOUND_WOODEN_DOOR_OPEN, 0) + Call(MakeLerp, 0, 80, 14, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g16, LVar0, 0, 1, 0) + Call(RotateGroup, MODEL_g15, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_CloseDresserDoors) = { - EVT_CALL(MakeLerp, 80, 0, 14, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g16, LVar0, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_g15, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_o80, SOUND_WOODEN_DOOR_CLOSE, 0) - EVT_RETURN - EVT_END + Call(MakeLerp, 80, 0, 14, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g16, LVar0, 0, 1, 0) + Call(RotateGroup, MODEL_g15, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_o80, SOUND_WOODEN_DOOR_CLOSE, 0) + Return + End }; EvtScript N(EVS_ShakeDresser) = { - EVT_LOOP(0) - EVT_CALL(TranslateGroup, MODEL_g9, 1, 0, 0) - EVT_WAIT(1) - EVT_CALL(TranslateGroup, MODEL_g9, -1, 0, 0) - EVT_WAIT(1) - EVT_CALL(TranslateGroup, MODEL_g9, 0, 0, 0) - EVT_WAIT(30) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(TranslateGroup, MODEL_g9, 1, 0, 0) + Wait(1) + Call(TranslateGroup, MODEL_g9, -1, 0, 0) + Wait(1) + Call(TranslateGroup, MODEL_g9, 0, 0, 0) + Wait(30) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_Inspect_Dresser_Peach) = { - EVT_CALL(N(GetPeachDisguise), LVar0) - EVT_IF_NE(LVar0, PEACH_DISGUISE_NONE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_Peach_0185) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_IF_NE(GF_KKJ20_PeachMet_ToadInHiding, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_Peach_0185) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetNpcVar, NPC_Toad, 0, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(4.0), -10, 0, 80, EVT_FLOAT(300.0), EVT_FLOAT(17.0), EVT_FLOAT(-10.0)) - EVT_THREAD - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(2.0)) - EVT_CALL(PlayerMoveTo, -50, 0, 0) - EVT_CALL(InterpPlayerYaw, 90, 5) - EVT_CALL(func_802CF56C, 2) - EVT_END_THREAD - EVT_WAIT(10) - EVT_EXEC(N(EVS_OpenDresserDoors)) - EVT_WAIT(30) - EVT_CALL(SetNpcJumpscale, NPC_Toad, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_Toad, -10, 0, -40, 15) - EVT_CALL(SetNpcAnimation, NPC_Toad, ANIM_Toad_Red_Walk) - EVT_CALL(NpcMoveTo, NPC_Toad, 30, 0, 20) - EVT_CALL(SetNpcAnimation, NPC_Toad, ANIM_Toad_Red_Idle) - EVT_CALL(InterpNpcYaw, NPC_Toad, 270, 5) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_Peach_0182) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_RaiseArms) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_0183) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LowerArms) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_CALL(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_Peach_0184) - EVT_CALL(SetNpcAnimation, NPC_Toad, ANIM_Toad_Red_Walk) - EVT_CALL(SetNpcSpeed, NPC_Toad, EVT_FLOAT(3.0)) - EVT_CALL(NpcMoveTo, NPC_Toad, -10, -60, 0) - EVT_CALL(SetNpcAnimation, NPC_Toad, ANIM_Toad_Red_Idle) - EVT_WAIT(10) - EVT_CALL(NpcJump0, NPC_Toad, -10, 30, -132, 10) - EVT_EXEC(N(EVS_CloseDresserDoors)) - EVT_WAIT(30) - EVT_SET(GF_KKJ20_PeachMet_ToadInHiding, TRUE) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(N(GetPeachDisguise), LVar0) + IfNe(LVar0, PEACH_DISGUISE_NONE) + Call(DisablePlayerInput, TRUE) + Call(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_Peach_0185) + Call(DisablePlayerInput, FALSE) + Return + EndIf + IfNe(GF_KKJ20_PeachMet_ToadInHiding, FALSE) + Call(DisablePlayerInput, TRUE) + Call(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_Peach_0185) + Call(DisablePlayerInput, FALSE) + Return + EndIf + Call(SetNpcVar, NPC_Toad, 0, 0) + Call(DisablePlayerInput, TRUE) + Call(SetCamProperties, CAM_DEFAULT, Float(4.0), -10, 0, 80, Float(300.0), Float(17.0), Float(-10.0)) + Thread + Call(SetPlayerSpeed, Float(2.0)) + Call(PlayerMoveTo, -50, 0, 0) + Call(InterpPlayerYaw, 90, 5) + Call(func_802CF56C, 2) + EndThread + Wait(10) + Exec(N(EVS_OpenDresserDoors)) + Wait(30) + Call(SetNpcJumpscale, NPC_Toad, Float(1.0)) + Call(NpcJump0, NPC_Toad, -10, 0, -40, 15) + Call(SetNpcAnimation, NPC_Toad, ANIM_Toad_Red_Walk) + Call(NpcMoveTo, NPC_Toad, 30, 0, 20) + Call(SetNpcAnimation, NPC_Toad, ANIM_Toad_Red_Idle) + Call(InterpNpcYaw, NPC_Toad, 270, 5) + Wait(10) + Call(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_Peach_0182) + Call(SetPlayerAnimation, ANIM_Peach2_RaiseArms) + Wait(10) + Call(SetPlayerAnimation, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_0183) + Call(SetPlayerAnimation, ANIM_Peach2_LowerArms) + Wait(10) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Call(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_Peach_0184) + Call(SetNpcAnimation, NPC_Toad, ANIM_Toad_Red_Walk) + Call(SetNpcSpeed, NPC_Toad, Float(3.0)) + Call(NpcMoveTo, NPC_Toad, -10, -60, 0) + Call(SetNpcAnimation, NPC_Toad, ANIM_Toad_Red_Idle) + Wait(10) + Call(NpcJump0, NPC_Toad, -10, 30, -132, 10) + Exec(N(EVS_CloseDresserDoors)) + Wait(30) + Set(GF_KKJ20_PeachMet_ToadInHiding, TRUE) + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_ToadHouse_SetDialogue) = { - EVT_IF_EQ(GF_KKJ20_Met_ToadInHiding, FALSE) - EVT_SET(LVar0, MSG_Peach_0187) - EVT_SET(LVar8, MSG_Peach_0188) - EVT_SET(GF_KKJ20_Met_ToadInHiding, TRUE) - EVT_ELSE - EVT_SET(LVar0, MSG_Peach_0189) - EVT_SET(LVar8, MSG_Peach_018A) - EVT_END_IF - EVT_SET(LVar1, MSG_Peach_018B) - EVT_SET(LVar2, MSG_Peach_018C) - EVT_SET(LVar3, MSG_Peach_018D) - EVT_RETURN - EVT_END + IfEq(GF_KKJ20_Met_ToadInHiding, FALSE) + Set(LVar0, MSG_Peach_0187) + Set(LVar8, MSG_Peach_0188) + Set(GF_KKJ20_Met_ToadInHiding, TRUE) + Else + Set(LVar0, MSG_Peach_0189) + Set(LVar8, MSG_Peach_018A) + EndIf + Set(LVar1, MSG_Peach_018B) + Set(LVar2, MSG_Peach_018C) + Set(LVar3, MSG_Peach_018D) + Return + End }; EvtScript N(EVS_ToadHouse_GetInBed) = { - EVT_EXEC(N(EVS_PlayRestingSong)) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, 50, -40, 0) - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(N(ToadHouse_CamSetFOV), 0, 40) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(200.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(70.0), EVT_FLOAT(-30.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-260.0), EVT_FLOAT(270.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(30.0), EVT_FLOAT(-85.0)) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, EVT_FLOAT(-50.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_CALL(PlayerMoveTo, 95, -87, 0) - EVT_CALL(InterpPlayerYaw, 229, 1) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetPlayerImgFXFlags, IMGFX_FLAG_800) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_GET_IN_BED, 1, 1, 0) - EVT_THREAD - EVT_WAIT(60) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) - EVT_END_THREAD - EVT_WAIT(20) - EVT_THREAD - EVT_WAIT(65) - EVT_CALL(N(ToadHouse_CamSetFOV), 0, 25) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_PlayRestingSong)) + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, 50, -40, 0) + Thread + Wait(20) + Call(N(ToadHouse_CamSetFOV), 0, 40) + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamDistance, CAM_DEFAULT, Float(200.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(70.0), Float(-30.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(-260.0), Float(270.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(30.0), Float(-85.0)) + Call(SetCamPosC, CAM_DEFAULT, 0, Float(-50.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Call(PlayerMoveTo, 95, -87, 0) + Call(InterpPlayerYaw, 229, 1) + Call(HidePlayerShadow, TRUE) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetPlayerImgFXFlags, IMGFX_FLAG_800) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_GET_IN_BED, 1, 1, 0) + Thread + Wait(60) + Call(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) + EndThread + Wait(20) + Thread + Wait(65) + Call(N(ToadHouse_CamSetFOV), 0, 25) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + EndThread + Return + End }; EvtScript N(EVS_ToadHouse_ReturnFromRest) = { - EVT_CALL(HidePlayerShadow, FALSE) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetPlayerPos, 85, 0, -85) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, 60, -50, 0) - EVT_EXEC(N(EVS_PlayBowserSong)) - EVT_RETURN - EVT_END + Call(HidePlayerShadow, FALSE) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetPlayerPos, 85, 0, -85) + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, 60, -50, 0) + Exec(N(EVS_PlayBowserSong)) + Return + End }; EvtScript N(EVS_MeetToadHouseKeeper) = { - EVT_CALL(N(ToadHouse_InitScreenOverlay), 0, 0, 0) - EVT_EXEC_WAIT(N(EVS_ToadHouse_SetDialogue)) - EVT_SET(LVar9, LVar1) - EVT_SET(LVarA, LVar2) - EVT_SET(LVarB, LVar3) - EVT_CALL(N(ToadHouse_DoesPlayerNeedSleep)) - EVT_IF_EQ(LVar1, 0) - EVT_SET(LVar8, LVar0) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVar8) - EVT_CALL(ShowChoice, MSG_Choice_0006) - EVT_WAIT(10) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(ContinueSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVar9) - EVT_RETURN - EVT_END_IF - EVT_CALL(ContinueSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVarA) - EVT_CALL(SetPlayerJumpscale, 1) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Toad, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(N(ToadHouse_DisableStatusBar)) - EVT_IF_NE(LVar4, 0) - EVT_EXEC(N(EVS_ToadHouse_Unk2)) - EVT_END_IF - EVT_CALL(N(ToadHouse_PutPartnerAway), LVarA) - EVT_WAIT(20) - EVT_EXEC_GET_TID(N(EVS_ToadHouse_GetInBed), LVar9) - EVT_CALL(N(ToadHouse_AwaitScriptComplete), LVar9) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 255, 60, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(ToadHouse_UpdateScreenOverlay), 3, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(FullyRestoreHPandFP) - EVT_CALL(FullyRestoreSP) - EVT_IF_NE(LVar4, 0) - EVT_EXEC(N(EVS_ToadHouse_Unk1)) - EVT_END_IF - EVT_CALL(N(ToadHouse_GetPartnerBackOut), LVarA) - EVT_WAIT(30) - EVT_CALL(MakeLerp, 255, 0, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(ToadHouse_UpdateScreenOverlay), 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(90) - EVT_EXEC_GET_TID(N(EVS_ToadHouse_ReturnFromRest), LVar9) - EVT_CALL(N(ToadHouse_AwaitScriptComplete), LVar9) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Toad, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVarB) - EVT_CALL(N(ToadHouse_ShowWorldStatusBar)) - EVT_RETURN - EVT_END + Call(N(ToadHouse_InitScreenOverlay), 0, 0, 0) + ExecWait(N(EVS_ToadHouse_SetDialogue)) + Set(LVar9, LVar1) + Set(LVarA, LVar2) + Set(LVarB, LVar3) + Call(N(ToadHouse_DoesPlayerNeedSleep)) + IfEq(LVar1, 0) + Set(LVar8, LVar0) + EndIf + Call(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVar8) + Call(ShowChoice, MSG_Choice_0006) + Wait(10) + IfEq(LVar0, 1) + Call(ContinueSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVar9) + Return + EndIf + Call(ContinueSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVarA) + Call(SetPlayerJumpscale, 1) + Call(DisablePlayerPhysics, TRUE) + Call(SetNpcFlagBits, NPC_Toad, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(N(ToadHouse_DisableStatusBar)) + IfNe(LVar4, 0) + Exec(N(EVS_ToadHouse_Unk2)) + EndIf + Call(N(ToadHouse_PutPartnerAway), LVarA) + Wait(20) + ExecGetTID(N(EVS_ToadHouse_GetInBed), LVar9) + Call(N(ToadHouse_AwaitScriptComplete), LVar9) + Thread + Call(MakeLerp, 0, 255, 60, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(N(ToadHouse_UpdateScreenOverlay), 3, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(FullyRestoreHPandFP) + Call(FullyRestoreSP) + IfNe(LVar4, 0) + Exec(N(EVS_ToadHouse_Unk1)) + EndIf + Call(N(ToadHouse_GetPartnerBackOut), LVarA) + Wait(30) + Call(MakeLerp, 255, 0, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(N(ToadHouse_UpdateScreenOverlay), 0, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Wait(90) + ExecGetTID(N(EVS_ToadHouse_ReturnFromRest), LVar9) + Call(N(ToadHouse_AwaitScriptComplete), LVar9) + Call(DisablePlayerPhysics, FALSE) + Call(SetNpcFlagBits, NPC_Toad, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVarB) + Call(N(ToadHouse_ShowWorldStatusBar)) + Return + End }; EvtScript N(EVS_Inspect_Dresser_Mario) = { - EVT_CALL(SetNpcVar, NPC_Toad, 0, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC(N(EVS_OpenDresserDoors)) - EVT_WAIT(30) - EVT_CALL(SetNpcJumpscale, NPC_Toad, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_Toad, -10, 0, -40, 15) - EVT_CALL(PlayerFaceNpc, NPC_Toad, FALSE) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Toad, 0) - EVT_EXEC(N(EVS_CloseDresserDoors)) - EVT_CALL(SetNpcAnimation, NPC_Toad, ANIM_Toad_Red_Walk) - EVT_CALL(NpcMoveTo, NPC_Toad, 30, 0, 20) - EVT_CALL(SetNpcAnimation, NPC_Toad, ANIM_Toad_Red_Idle) - EVT_CALL(InterpNpcYaw, NPC_Toad, 270, 5) - EVT_WAIT(10) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -10, 0, 80) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -10, 0, 80) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(func_802D1270, -50, 0, EVT_FLOAT(2.5)) - EVT_CALL(InterpPlayerYaw, 90, 5) - EVT_CALL(func_802CF56C, 2) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_Peach_0186) - EVT_CALL(GetNpcPos, NPC_Toad, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Toad, LVar0, LVar1, LVar2, 10) - EVT_EXEC_WAIT(N(EVS_MeetToadHouseKeeper)) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(SetNpcVar, NPC_Toad, 0, 0) + Call(DisablePlayerInput, TRUE) + Exec(N(EVS_OpenDresserDoors)) + Wait(30) + Call(SetNpcJumpscale, NPC_Toad, Float(1.0)) + Call(NpcJump0, NPC_Toad, -10, 0, -40, 15) + Call(PlayerFaceNpc, NPC_Toad, FALSE) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Toad, 0) + Exec(N(EVS_CloseDresserDoors)) + Call(SetNpcAnimation, NPC_Toad, ANIM_Toad_Red_Walk) + Call(NpcMoveTo, NPC_Toad, 30, 0, 20) + Call(SetNpcAnimation, NPC_Toad, ANIM_Toad_Red_Idle) + Call(InterpNpcYaw, NPC_Toad, 270, 5) + Wait(10) + Call(UseSettingsFrom, CAM_DEFAULT, -10, 0, 80) + Call(SetPanTarget, CAM_DEFAULT, -10, 0, 80) + Call(SetCamDistance, CAM_DEFAULT, 250) + Call(SetCamPitch, CAM_DEFAULT, Float(18.0), Float(-11.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(func_802D1270, -50, 0, Float(2.5)) + Call(InterpPlayerYaw, 90, 5) + Call(func_802CF56C, 2) + Wait(10) + Call(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_Peach_0186) + Call(GetNpcPos, NPC_Toad, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Toad, LVar0, LVar1, LVar2, 10) + ExecWait(N(EVS_MeetToadHouseKeeper)) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Call(DisablePlayerInput, FALSE) + Unbind + Return + End }; EvtScript N(EVS_NpcIdle_Toad) = { - EVT_CALL(WaitForPlayerInputEnabled) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 1) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.5)) - EVT_CALL(NpcJump0, NPC_PARTNER, -86, 40, -25, 15) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 5, MSG_Peach_0181) - EVT_CALL(NpcFlyTo, NPC_PARTNER, -165, 55, -25, 20, -5, EASING_LINEAR) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(WaitForPlayerInputEnabled) + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 1) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.5)) + Call(NpcJump0, NPC_PARTNER, -86, 40, -25, 15) + Wait(10) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 5, MSG_Peach_0181) + Call(NpcFlyTo, NPC_PARTNER, -165, 55, -25, 20, -5, EASING_LINEAR) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_Toad) = { - EVT_EXEC_WAIT(N(EVS_NpcInteract_ToadHouseKeeper)) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_NpcInteract_ToadHouseKeeper)) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Return + End }; EvtScript N(EVS_NpcInit_Toad) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_OR_EQ(STORY_CH4_BEGAN_PEACH_MISSION) - EVT_CASE_OR_EQ(STORY_CH5_BEGAN_PEACH_MISSION) - EVT_CASE_OR_EQ(STORY_CH6_BEGAN_PEACH_MISSION) - EVT_CALL(SetNpcPos, NPC_SELF, -10, 30, -132) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_IF_EQ(GF_KKJ20_PeachMet_ToadInHiding, FALSE) - EVT_CALL(SetSelfVar, 0, 1) - EVT_EXEC(N(EVS_ShakeDresser)) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Toad))) - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Inspect_Dresser_Peach)), TRIGGER_WALL_PRESS_A, COLLIDER_o80, 1, 0) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_IF_EQ(GF_KKJ20_Met_ToadInHiding, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, -10, 30, -132) - EVT_CALL(SetSelfVar, 0, 1) - EVT_EXEC(N(EVS_ShakeDresser)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Inspect_Dresser_Mario)), TRIGGER_WALL_PRESS_A, COLLIDER_o80, 1, 0) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, 30, 0, 0) - EVT_END_IF - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad))) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseOrEq(STORY_CH4_BEGAN_PEACH_MISSION) + CaseOrEq(STORY_CH5_BEGAN_PEACH_MISSION) + CaseOrEq(STORY_CH6_BEGAN_PEACH_MISSION) + Call(SetNpcPos, NPC_SELF, -10, 30, -132) + Call(SetNpcYaw, NPC_SELF, 270) + IfEq(GF_KKJ20_PeachMet_ToadInHiding, FALSE) + Call(SetSelfVar, 0, 1) + Exec(N(EVS_ShakeDresser)) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Toad))) + EndIf + BindTrigger(Ref(N(EVS_Inspect_Dresser_Peach)), TRIGGER_WALL_PRESS_A, COLLIDER_o80, 1, 0) + EndCaseGroup + CaseDefault + IfEq(GF_KKJ20_Met_ToadInHiding, FALSE) + Call(SetNpcPos, NPC_SELF, -10, 30, -132) + Call(SetSelfVar, 0, 1) + Exec(N(EVS_ShakeDresser)) + BindTrigger(Ref(N(EVS_Inspect_Dresser_Mario)), TRIGGER_WALL_PRESS_A, COLLIDER_o80, 1, 0) + Else + Call(SetNpcPos, NPC_SELF, 30, 0, 0) + EndIf + Call(SetNpcYaw, NPC_SELF, 270) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad))) + EndSwitch + Return + End }; NpcData N(NpcData_Toad) = { diff --git a/src/world/area_kkj/kkj_21/kkj_21_1_main.c b/src/world/area_kkj/kkj_21/kkj_21_1_main.c index 75463c8fcbe..9ad73dc6db7 100644 --- a/src/world/area_kkj/kkj_21/kkj_21_1_main.c +++ b/src/world/area_kkj/kkj_21/kkj_21_1_main.c @@ -1,40 +1,40 @@ #include "kkj_21.h" EvtScript N(EVS_ExitDoor_kkj_10_2) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, kkj_21_ENTRY_0) - EVT_SET(LVar1, COLLIDER_tte) - EVT_SET(LVar2, MODEL_o57) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kkj_10"), kkj_10_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, kkj_21_ENTRY_0) + Set(LVar1, COLLIDER_tte) + Set(LVar2, MODEL_o57) + Set(LVar3, DOOR_SWING_IN) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("kkj_10"), kkj_10_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kkj_21_ENTRY_0) - EVT_SET(LVar2, MODEL_o57) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kkj_21_ENTRY_0) + Set(LVar2, MODEL_o57) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PEACHS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_kkj_10_2)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_PEACHS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + BindTrigger(Ref(N(EVS_ExitDoor_kkj_10_2)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_kkj/kkj_22/kkj_22_1_music.c b/src/world/area_kkj/kkj_22/kkj_22_1_music.c index 29562853d6e..3924af94ee5 100644 --- a/src/world/area_kkj/kkj_22/kkj_22_1_music.c +++ b/src/world/area_kkj/kkj_22/kkj_22_1_music.c @@ -1,9 +1,9 @@ #include "kkj_22.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH8_REACHED_PEACHS_CASTLE) - EVT_CALL(SetMusicTrack, 0, SONG_BOWSER_THEME, 0, 8) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH8_REACHED_PEACHS_CASTLE) + Call(SetMusicTrack, 0, SONG_BOWSER_THEME, 0, 8) + EndIf + Return + End }; diff --git a/src/world/area_kkj/kkj_22/kkj_22_2_main.c b/src/world/area_kkj/kkj_22/kkj_22_2_main.c index 0704b2f6263..3a476e4f153 100644 --- a/src/world/area_kkj/kkj_22/kkj_22_2_main.c +++ b/src/world/area_kkj/kkj_22/kkj_22_2_main.c @@ -4,30 +4,30 @@ EvtScript N(EVS_ExitDoor_kkj_13_1) = EVT_EXIT_DOUBLE_DOOR(kkj_22_ENTRY_0, "kkj_1 EvtScript N(EVS_ExitDoor_kkj_23_0) = EVT_EXIT_DOUBLE_DOOR(kkj_22_ENTRY_1, "kkj_23", kkj_23_ENTRY_0, COLLIDER_ttnw, MODEL_o94, MODEL_o95); EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kkj_22_ENTRY_0) - EVT_SET(LVar2, MODEL_o51) - EVT_SET(LVar3, MODEL_o52) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(kkj_22_ENTRY_1) - EVT_SET(LVar2, MODEL_o94) - EVT_SET(LVar3, MODEL_o95) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kkj_22_ENTRY_0) + Set(LVar2, MODEL_o51) + Set(LVar3, MODEL_o52) + ExecWait(EnterDoubleDoor) + CaseEq(kkj_22_ENTRY_1) + Set(LVar2, MODEL_o94) + Set(LVar3, MODEL_o95) + ExecWait(EnterDoubleDoor) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PEACHS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_KKJ_22) - EVT_SETUP_CAMERA_DEFAULT() - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_kkj_13_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_kkj_23_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttnw, 1, 0) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_PEACHS_CASTLE) + Call(SetSpriteShading, SHADING_KKJ_22) + SetUP_CAMERA_DEFAULT() + Exec(N(EVS_SetupMusic)) + Call(UseDoorSounds, DOOR_SOUNDS_LARGE) + BindTrigger(Ref(N(EVS_ExitDoor_kkj_13_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoor_kkj_23_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttnw, 1, 0) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_kkj/kkj_23/kkj_23_1_music.c b/src/world/area_kkj/kkj_23/kkj_23_1_music.c index 54a01c37fde..1189a8b55dc 100644 --- a/src/world/area_kkj/kkj_23/kkj_23_1_music.c +++ b/src/world/area_kkj/kkj_23/kkj_23_1_music.c @@ -1,9 +1,9 @@ #include "kkj_23.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH8_REACHED_PEACHS_CASTLE) - EVT_CALL(SetMusicTrack, 0, SONG_BOWSER_THEME, 0, 8) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH8_REACHED_PEACHS_CASTLE) + Call(SetMusicTrack, 0, SONG_BOWSER_THEME, 0, 8) + EndIf + Return + End }; diff --git a/src/world/area_kkj/kkj_23/kkj_23_2_main.c b/src/world/area_kkj/kkj_23/kkj_23_2_main.c index 40e187341f6..6bd6d71df92 100644 --- a/src/world/area_kkj/kkj_23/kkj_23_2_main.c +++ b/src/world/area_kkj/kkj_23/kkj_23_2_main.c @@ -4,26 +4,26 @@ #include "../common/SetAvailableDisguise.inc.c" EvtScript N(EVS_EndPeachChapter6) = { - EVT_SET(LVar0, GB_KKJ_LastPartner) - EVT_CALL(N(RestoreFromPeachState)) - EVT_CALL(PlaySound, SOUND_SLIDE_WHISTLE_OUT) - EVT_CALL(GotoMapSpecial, EVT_PTR("flo_00"), flo_00_ENTRY_A, TRANSITION_END_PEACH_INTERLUDE) - EVT_WAIT(100) + Set(LVar0, GB_KKJ_LastPartner) + Call(N(RestoreFromPeachState)) + Call(PlaySound, SOUND_SLIDE_WHISTLE_OUT) + Call(GotoMapSpecial, Ref("flo_00"), flo_00_ENTRY_A, TRANSITION_END_PEACH_INTERLUDE) + Wait(100) }; //@bug script not properly terminated EvtScript N(EVS_ExitDoors_kkj_22_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, kkj_23_ENTRY_0) - EVT_SET(LVar1, COLLIDER_tte) - EVT_SET(LVar2, MODEL_o5) - EVT_SET(LVar3, MODEL_o4) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kkj_22"), kkj_22_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, kkj_23_ENTRY_0) + Set(LVar1, COLLIDER_tte) + Set(LVar2, MODEL_o5) + Set(LVar3, MODEL_o4) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("kkj_22"), kkj_22_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_kkj_24_0) = EVT_EXIT_DOUBLE_DOOR(kkj_23_ENTRY_1, "kkj_24", kkj_24_ENTRY_0, COLLIDER_ttw, MODEL_o9, MODEL_o10); @@ -31,41 +31,41 @@ EvtScript N(EVS_ExitDoors_kkj_24_0) = EVT_EXIT_DOUBLE_DOOR(kkj_23_ENTRY_1, "kkj_ MAP_RODATA_PAD(1, exits); EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kkj_23_ENTRY_0) - EVT_SET(LVar2, MODEL_o5) - EVT_SET(LVar3, MODEL_o4) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_IF_EQ(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) - EVT_EXEC(N(EVS_Scene_KammyUnmasksPeach)) - EVT_ELSE - EVT_EXEC(N(EVS_BowserTauntMario)) - EVT_END_IF - EVT_CASE_EQ(kkj_23_ENTRY_1) - EVT_SET(LVar2, MODEL_o9) - EVT_SET(LVar3, MODEL_o10) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kkj_23_ENTRY_0) + Set(LVar2, MODEL_o5) + Set(LVar3, MODEL_o4) + ExecWait(EnterDoubleDoor) + IfEq(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) + Exec(N(EVS_Scene_KammyUnmasksPeach)) + Else + Exec(N(EVS_BowserTauntMario)) + EndIf + CaseEq(kkj_23_ENTRY_1) + Set(LVar2, MODEL_o9) + Set(LVar3, MODEL_o10) + ExecWait(EnterDoubleDoor) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PEACHS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_KKJ_23) - EVT_SETUP_CAMERA_DEFAULT() - EVT_IF_EQ(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) - EVT_CALL(N(SetAvailableDisguise), PEACH_DISGUISE_KOOPATROL) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(PeachNPCs))) - EVT_ELSE - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(FinaleNPCs))) - EVT_END_IF - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_24_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_22_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_PEACHS_CASTLE) + Call(SetSpriteShading, SHADING_KKJ_23) + SetUP_CAMERA_DEFAULT() + IfEq(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) + Call(N(SetAvailableDisguise), PEACH_DISGUISE_KOOPATROL) + Call(MakeNpcs, FALSE, Ref(N(PeachNPCs))) + Else + Call(MakeNpcs, FALSE, Ref(N(FinaleNPCs))) + EndIf + Exec(N(EVS_SetupMusic)) + Call(UseDoorSounds, DOOR_SOUNDS_LARGE) + BindTrigger(Ref(N(EVS_ExitDoors_kkj_24_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_kkj_22_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_kkj/kkj_23/kkj_23_3_npcs_finale.c b/src/world/area_kkj/kkj_23/kkj_23_3_npcs_finale.c index 9b026ded740..7347e1378e9 100644 --- a/src/world/area_kkj/kkj_23/kkj_23_3_npcs_finale.c +++ b/src/world/area_kkj/kkj_23/kkj_23_3_npcs_finale.c @@ -25,51 +25,51 @@ API_CALLABLE(N(UpdatePropellerSoundPos)) { } EvtScript N(EVS_UpdatePropellerSounds) = { - EVT_CALL(PlaySoundAtNpc, NPC_Bowser_Prop, SOUND_LOOP_BOWSER_PROPELLER, SOUND_SPACE_DEFAULT) - EVT_LOOP(0) - EVT_CALL(N(UpdatePropellerSoundPos)) - EVT_IF_LT(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(StopSound, SOUND_LOOP_BOWSER_PROPELLER) - EVT_RETURN - EVT_END + Call(PlaySoundAtNpc, NPC_Bowser_Prop, SOUND_LOOP_BOWSER_PROPELLER, SOUND_SPACE_DEFAULT) + Loop(0) + Call(N(UpdatePropellerSoundPos)) + IfLt(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(StopSound, SOUND_LOOP_BOWSER_PROPELLER) + Return + End }; EvtScript N(EVS_BowserTauntMario) = { - EVT_IF_EQ(GF_KKJ13_BowserTaunts, TRUE) - EVT_IF_EQ(GF_KKJ23_BowserFledToTower, TRUE) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarIdle) - EVT_CALL(AwaitPlayerApproach, 100, -60, 300) - EVT_SET(GF_KKJ23_BowserFledToTower, TRUE) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarLaugh) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarIdle) - EVT_END_THREAD - EVT_CALL(AwaitPlayerApproach, 0, -60, 250) - EVT_CALL(LoadPath, 30, EVT_PTR(N(FlyAwayPath)), ARRAY_COUNT(N(FlyAwayPath)), EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Bowser_Body, LVar1, LVar2, LVar3) - EVT_CALL(SetNpcPos, NPC_Bowser_Prop, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, 28) - EVT_ADD(LVar2, 40) - EVT_ADD(LVar3, -3) - EVT_CALL(SetNpcPos, NPC_Peach, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_Bowser_Body, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_Bowser_Prop, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END + IfEq(GF_KKJ13_BowserTaunts, TRUE) + IfEq(GF_KKJ23_BowserFledToTower, TRUE) + Return + EndIf + EndIf + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarIdle) + Call(AwaitPlayerApproach, 100, -60, 300) + Set(GF_KKJ23_BowserFledToTower, TRUE) + Thread + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarLaugh) + Wait(30) + Call(SetNpcAnimation, NPC_Bowser_Body, ANIM_WorldBowser_ClownCarIdle) + EndThread + Call(AwaitPlayerApproach, 0, -60, 250) + Call(LoadPath, 30, Ref(N(FlyAwayPath)), ARRAY_COUNT(N(FlyAwayPath)), EASING_LINEAR) + Label(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Bowser_Body, LVar1, LVar2, LVar3) + Call(SetNpcPos, NPC_Bowser_Prop, LVar1, LVar2, LVar3) + Add(LVar1, 28) + Add(LVar2, 40) + Add(LVar3, -3) + Call(SetNpcPos, NPC_Peach, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(0) + EndIf + Call(SetNpcPos, NPC_Bowser_Body, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_Bowser_Prop, NPC_DISPOSE_LOCATION) + Return + End }; s32 N(HoverYOffsets)[] = { @@ -78,94 +78,94 @@ s32 N(HoverYOffsets)[] = { }; EvtScript N(EVS_NpcIdle_Bowser_Body) = { - EVT_LABEL(0) - EVT_USE_BUF(EVT_PTR(N(HoverYOffsets))) - EVT_LOOP(10) - EVT_BUF_READ1(LVar1) - EVT_CALL(GetNpcPos, NPC_Bowser_Body, LVar2, LVar3, LVar4) - EVT_ADD(LVar3, LVar1) - EVT_CALL(SetNpcPos, NPC_Bowser_Body, LVar2, LVar3, LVar4) - EVT_WAIT(3) - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + UseBuf(Ref(N(HoverYOffsets))) + Loop(10) + BufRead1(LVar1) + Call(GetNpcPos, NPC_Bowser_Body, LVar2, LVar3, LVar4) + Add(LVar3, LVar1) + Call(SetNpcPos, NPC_Bowser_Body, LVar2, LVar3, LVar4) + Wait(3) + EndLoop + Goto(0) + Return + End }; EvtScript N(EVS_NpcIdle_Bowser_Propeller) = { - EVT_LABEL(0) - EVT_USE_BUF(EVT_PTR(N(HoverYOffsets))) - EVT_LOOP(10) - EVT_BUF_READ1(LVar1) - EVT_CALL(GetNpcPos, NPC_Bowser_Prop, LVar2, LVar3, LVar4) - EVT_ADD(LVar3, LVar1) - EVT_CALL(SetNpcPos, NPC_Bowser_Prop, LVar2, LVar3, LVar4) - EVT_WAIT(3) - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + UseBuf(Ref(N(HoverYOffsets))) + Loop(10) + BufRead1(LVar1) + Call(GetNpcPos, NPC_Bowser_Prop, LVar2, LVar3, LVar4) + Add(LVar3, LVar1) + Call(SetNpcPos, NPC_Bowser_Prop, LVar2, LVar3, LVar4) + Wait(3) + EndLoop + Goto(0) + Return + End }; EvtScript N(EVS_NpcIdle_Peach) = { - EVT_LABEL(0) - EVT_USE_BUF(EVT_PTR(N(HoverYOffsets))) - EVT_LOOP(10) - EVT_BUF_READ1(LVar1) - EVT_CALL(GetNpcPos, NPC_Peach, LVar2, LVar3, LVar4) - EVT_ADD(LVar3, LVar1) - EVT_CALL(SetNpcPos, NPC_Peach, LVar2, LVar3, LVar4) - EVT_WAIT(3) - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + UseBuf(Ref(N(HoverYOffsets))) + Loop(10) + BufRead1(LVar1) + Call(GetNpcPos, NPC_Peach, LVar2, LVar3, LVar4) + Add(LVar3, LVar1) + Call(SetNpcPos, NPC_Peach, LVar2, LVar3, LVar4) + Wait(3) + EndLoop + Goto(0) + Return + End }; EvtScript N(EVS_NpcInit_Bowser_Body) = { - EVT_CALL(SetNpcPos, NPC_Bowser_Body, NPC_DISPOSE_LOCATION) - EVT_IF_EQ(GF_KKJ13_BowserTaunts, TRUE) - EVT_IF_EQ(GF_KKJ23_BowserFledToTower, TRUE) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Bowser_Body))) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_CALL(SetNpcPos, NPC_SELF, 250, 10, -250) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldBowser_ClownCarIdle) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Bowser_Body, NPC_DISPOSE_LOCATION) + IfEq(GF_KKJ13_BowserTaunts, TRUE) + IfEq(GF_KKJ23_BowserFledToTower, TRUE) + Return + EndIf + EndIf + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Bowser_Body))) + Call(SetNpcYaw, NPC_SELF, 90) + Call(SetNpcPos, NPC_SELF, 250, 10, -250) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldBowser_ClownCarIdle) + Return + End }; EvtScript N(EVS_NpcInit_Bowser_Propeller) = { - EVT_CALL(SetNpcPos, NPC_Bowser_Prop, NPC_DISPOSE_LOCATION) - EVT_IF_EQ(GF_KKJ13_BowserTaunts, TRUE) - EVT_IF_EQ(GF_KKJ23_BowserFledToTower, TRUE) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Bowser_Propeller))) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_CALL(SetNpcPos, NPC_SELF, 250, 10, -250) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldBowser_ClownCarPropeller) - EVT_EXEC(N(EVS_UpdatePropellerSounds)) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Bowser_Prop, NPC_DISPOSE_LOCATION) + IfEq(GF_KKJ13_BowserTaunts, TRUE) + IfEq(GF_KKJ23_BowserFledToTower, TRUE) + Return + EndIf + EndIf + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Bowser_Propeller))) + Call(SetNpcYaw, NPC_SELF, 90) + Call(SetNpcPos, NPC_SELF, 250, 10, -250) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldBowser_ClownCarPropeller) + Exec(N(EVS_UpdatePropellerSounds)) + Return + End }; EvtScript N(EVS_NpcInit_Peach) = { - EVT_CALL(SetNpcPos, NPC_Peach, NPC_DISPOSE_LOCATION) - EVT_IF_EQ(GF_KKJ13_BowserTaunts, TRUE) - EVT_IF_EQ(GF_KKJ23_BowserFledToTower, TRUE) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Peach))) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_CALL(SetNpcPos, NPC_Peach, 278, 50, -253) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach2_TiedIdle) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Peach, NPC_DISPOSE_LOCATION) + IfEq(GF_KKJ13_BowserTaunts, TRUE) + IfEq(GF_KKJ23_BowserFledToTower, TRUE) + Return + EndIf + EndIf + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Peach))) + Call(SetNpcYaw, NPC_SELF, 90) + Call(SetNpcPos, NPC_Peach, 278, 50, -253) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach2_TiedIdle) + Return + End }; NpcData N(NpcData_Bowser_Body) = { diff --git a/src/world/area_kkj/kkj_23/kkj_23_4_npcs_peach.c b/src/world/area_kkj/kkj_23/kkj_23_4_npcs_peach.c index e2a53163fd0..98607444d47 100644 --- a/src/world/area_kkj/kkj_23/kkj_23_4_npcs_peach.c +++ b/src/world/area_kkj/kkj_23/kkj_23_4_npcs_peach.c @@ -27,99 +27,99 @@ AnimID N(ExtraAnims_Koopatrol)[] = { }; EvtScript N(EVS_NpcInteract_Koopatrol_01) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_Peach_014D) - EVT_CALL(SetSelfVar, 0, 1) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_Peach_014E) - EVT_CALL(SetSelfVar, 0, 0) - EVT_END_IF - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_Peach_014D) + Call(SetSelfVar, 0, 1) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_Peach_014E) + Call(SetSelfVar, 0, 0) + EndIf + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_CapturePeach) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(PreventNextPeachDisguise)) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_WAIT(20) - EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Gasp) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_Peach_0174) - EVT_CALL(N(ApproachPlayer50Units), -1, LVar3, LVar0, LVar2) - EVT_IF_NE(LVar3, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim06) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_Peach_0175) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_ForwardSad) - EVT_WAIT(20) - EVT_CALL(GotoMapSpecial, EVT_PTR("kkj_14"), kkj_14_ENTRY_B, TRANSITION_PEACH_CAPTURED) - EVT_WAIT(100) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(N(PreventNextPeachDisguise)) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) + Call(NpcFacePlayer, NPC_SELF, 0) + Wait(20) + Call(PlayerFaceNpc, NPC_SELF, FALSE) + Call(SetPlayerAnimation, ANIM_Peach2_Gasp) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_Peach_0174) + Call(N(ApproachPlayer50Units), -1, LVar3, LVar0, LVar2) + IfNe(LVar3, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim06) + Call(SetNpcSpeed, NPC_SELF, Float(5.0)) + Call(NpcMoveTo, NPC_SELF, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_Peach_0175) + Call(SetPlayerAnimation, ANIM_Peach2_ForwardSad) + Wait(20) + Call(GotoMapSpecial, Ref("kkj_14"), kkj_14_ENTRY_B, TRANSITION_PEACH_CAPTURED) + Wait(100) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Koopatrol_WatchForPeach) = { - EVT_LOOP(0) - EVT_CALL(N(GetPeachDisguise), LVar1) - EVT_IF_EQ(LVar1, PEACH_DISGUISE_NONE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 1) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_CapturePeach))) - EVT_RETURN - EVT_ELSE - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(N(GetPeachDisguise), LVar1) + IfEq(LVar1, PEACH_DISGUISE_NONE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 1) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_CapturePeach))) + Return + Else + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 0) + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_Koopatrol_01) = { - EVT_EXEC_GET_TID(N(EVS_Koopatrol_WatchForPeach), LVarA) - EVT_CALL(SetSelfVar, 1, 1) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetSelfVar, 1, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 1) - EVT_RETURN - EVT_END + ExecGetTID(N(EVS_Koopatrol_WatchForPeach), LVarA) + Call(SetSelfVar, 1, 1) + Loop(0) + Wait(1) + Call(GetSelfVar, 1, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + KillThread(LVarA) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 1) + Return + End }; EvtScript N(EVS_NpcInit_Koopatrol_01) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(SetNpcPos, NPC_SELF, 140, 0, -80) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Koopatrol_01))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Koopatrol_01))) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) + Call(SetNpcPos, NPC_SELF, 140, 0, -80) + Call(SetNpcYaw, NPC_SELF, 90) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Koopatrol_01))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Koopatrol_01))) + Return + End }; EvtScript N(EVS_NpcInit_Koopatrol_02) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(SetNpcPos, NPC_SELF, 40, 0, -80) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim01) + Call(SetNpcPos, NPC_SELF, 40, 0, -80) + Call(SetNpcYaw, NPC_SELF, 90) + Return + End }; AnimID N(ExtraAnims_Kammy)[] = { diff --git a/src/world/area_kkj/kkj_23/kkj_23_5_scene.c b/src/world/area_kkj/kkj_23/kkj_23_5_scene.c index 389cc98342c..4b422c73f70 100644 --- a/src/world/area_kkj/kkj_23/kkj_23_5_scene.c +++ b/src/world/area_kkj/kkj_23/kkj_23_5_scene.c @@ -24,325 +24,325 @@ API_CALLABLE(N(ForceDisguiseLoss)) { } EvtScript N(EVS_ApproachPeach) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 26) - EVT_ADD(LVar2, 2) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim06) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_01, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(NpcFacePlayer, NPC_Koopatrol_01, 5) - EVT_END_THREAD - EVT_CALL(SetNpcVar, NPC_Koopatrol_02, 0, 1) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 26) - EVT_SUB(LVar2, 2) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim06) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_02, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_02, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(NpcFacePlayer, NPC_Koopatrol_02, 5) - EVT_CALL(SetNpcVar, NPC_Koopatrol_02, 0, 0) - EVT_END_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcVar, NPC_Koopatrol_02, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(10) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 26) + Add(LVar2, 2) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim06) + Call(SetNpcSpeed, NPC_Koopatrol_01, Float(5.0)) + Call(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim01) + Call(NpcFacePlayer, NPC_Koopatrol_01, 5) + EndThread + Call(SetNpcVar, NPC_Koopatrol_02, 0, 1) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar0, 26) + Sub(LVar2, 2) + Call(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim06) + Call(SetNpcSpeed, NPC_Koopatrol_02, Float(5.0)) + Call(NpcMoveTo, NPC_Koopatrol_02, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim01) + Call(NpcFacePlayer, NPC_Koopatrol_02, 5) + Call(SetNpcVar, NPC_Koopatrol_02, 0, 0) + EndThread + Loop(0) + Wait(1) + Call(GetNpcVar, NPC_Koopatrol_02, 0, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Wait(10) + Return + End }; EvtScript N(EVS_PickUpPeach) = { - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Koopatrol_01, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 5) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim12) - EVT_SUB(LVar0, 5) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 5) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Koopatrol_02, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_02, LVar0, LVar2, 5) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim12) - EVT_ADD(LVar0, 5) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_02, LVar0, LVar2, 5) - EVT_END_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Gasp) - EVT_WAIT(1) - EVT_LOOP(4) - EVT_ADD(LVar1, 2) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Carried) - EVT_SUB(LVar0, 15) - EVT_LOOP(5) - EVT_ADD(LVar1, 4) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Thread + Call(GetNpcPos, NPC_Koopatrol_01, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 5) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim12) + Sub(LVar0, 5) + Call(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 5) + EndThread + Thread + Call(GetNpcPos, NPC_Koopatrol_02, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(NpcMoveTo, NPC_Koopatrol_02, LVar0, LVar2, 5) + Call(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim12) + Add(LVar0, 5) + Call(NpcMoveTo, NPC_Koopatrol_02, LVar0, LVar2, 5) + EndThread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerAnimation, ANIM_Peach2_Gasp) + Wait(1) + Loop(4) + Add(LVar1, 2) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(SetPlayerAnimation, ANIM_Peach2_Carried) + Sub(LVar0, 15) + Loop(5) + Add(LVar1, 4) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_CarryPeachAway) = { - EVT_CALL(InterpNpcYaw, NPC_Koopatrol_01, 90, 3) - EVT_WAIT(10) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_Koopatrol_02, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_ADD(LVar2, 2) - EVT_CALL(SetPlayerPos, LVar0, 30, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim14) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_02, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_02, 684, -52, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim14) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_01, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, 716, -48, 0) - EVT_END_THREAD - EVT_CALL(GetNpcPos, NPC_Kammy, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.5)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(InterpNpcYaw, NPC_Koopatrol_01, 90, 3) + Wait(10) + Thread + Loop(0) + Call(GetNpcPos, NPC_Koopatrol_02, LVar0, LVar1, LVar2) + Add(LVar0, 10) + Add(LVar2, 2) + Call(SetPlayerPos, LVar0, 30, LVar2) + Wait(1) + EndLoop + EndThread + Thread + Call(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim14) + Call(SetNpcSpeed, NPC_Koopatrol_02, Float(5.0)) + Call(NpcMoveTo, NPC_Koopatrol_02, 684, -52, 0) + EndThread + Thread + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim14) + Call(SetNpcSpeed, NPC_Koopatrol_01, Float(5.0)) + Call(NpcMoveTo, NPC_Koopatrol_01, 716, -48, 0) + EndThread + Call(GetNpcPos, NPC_Kammy, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.5)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_OpenAndCloseTowerDoors) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_ttw, SOUND_LARGE_DOOR_OPEN, 0) - EVT_CALL(MakeLerp, 0, 80, 14, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o9, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o10, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_CALL(MakeLerp, 80, 0, 14, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o9, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o10, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_ttw, SOUND_LARGE_DOOR_CLOSE, 0) - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_ttw, SOUND_LARGE_DOOR_OPEN, 0) + Call(MakeLerp, 0, 80, 14, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o9, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_o10, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(20) + Call(MakeLerp, 80, 0, 14, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o9, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_o10, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_ttw, SOUND_LARGE_DOOR_CLOSE, 0) + Return + End }; EvtScript N(EVS_RemoveDisguise) = { - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 45) - EVT_LOOP(10) - EVT_CALL(InterpPlayerYaw, LVar0, 0) - EVT_ADD(LVar0, LVar1) - EVT_ADD(LVar1, 4) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAtPlayer, SOUND_DARK_TOAD_DISPEL, SOUND_SPACE_DEFAULT) - EVT_CALL(N(ForceDisguiseLoss)) - EVT_LOOP(10) - EVT_CALL(InterpPlayerYaw, LVar0, 0) - EVT_ADD(LVar0, LVar1) - EVT_SUB(LVar1, 4) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_RETURN - EVT_END + Set(LVar0, 0) + Set(LVar1, 45) + Loop(10) + Call(InterpPlayerYaw, LVar0, 0) + Add(LVar0, LVar1) + Add(LVar1, 4) + Wait(1) + EndLoop + Call(PlaySoundAtPlayer, SOUND_DARK_TOAD_DISPEL, SOUND_SPACE_DEFAULT) + Call(N(ForceDisguiseLoss)) + Loop(10) + Call(InterpPlayerYaw, LVar0, 0) + Add(LVar0, LVar1) + Sub(LVar1, 4) + Wait(1) + EndLoop + Call(InterpPlayerYaw, 90, 0) + Return + End }; EvtScript N(EVS_Scene_KammyUnmasksPeach) = { - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LE(LVar0, 140) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetMusicTrack, 0, SONG_KAMMY_KOOPA_THEME, 0, 8) - EVT_CALL(SetNpcVar, NPC_Koopatrol_01, 1, 0) - EVT_CALL(SetNpcFlagBits, NPC_Koopatrol_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcPos, NPC_Kammy, -50, 0, -50) - EVT_EXEC(N(EVS_OpenAndCloseTowerDoors)) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim02) - EVT_CALL(SetNpcSpeed, NPC_Kammy, EVT_FLOAT(2.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Kammy, 30, -50, 0) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) - EVT_THREAD - EVT_CALL(InterpNpcYaw, NPC_Koopatrol_01, 270, 5) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcPos, NPC_Kammy, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, 140) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(InterpNpcYaw, NPC_Koopatrol_01, 90, 5) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(func_802D1270, 190, LVar2, EVT_FLOAT(4.0 / DT)) - EVT_CALL(func_802D1270, 195, -80, EVT_FLOAT(4.0 / DT)) - EVT_CALL(func_802D1270, 190, -80, EVT_FLOAT(4.0 / DT)) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcPos, NPC_Kammy, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, 190) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(InterpPlayerYaw, 90, 5) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, -10, -130, 20 * DT) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(4.0 / DT)) - EVT_CALL(NpcFlyTo, NPC_PARTNER, 210, -10, -130, 0, 0, EASING_LINEAR) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 5) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcPos, NPC_Kammy, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, 210) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 5) - EVT_END_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, -50) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, -50) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 5, MSG_Peach_014F) - EVT_CALL(SpeakToNpc, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, NPC_Kammy, MSG_Peach_0150) - EVT_CALL(SetNpcVar, NPC_Kammy, 0, 1) - EVT_THREAD - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_Kammy, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(GetNpcVar, NPC_Kammy, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim02) - EVT_CALL(NpcMoveTo, NPC_Kammy, 270, -50, 0) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) - EVT_CALL(SetNpcVar, NPC_Kammy, 0, 0) - EVT_WAIT(10 * DT) - EVT_CALL(InterpNpcYaw, NPC_Kammy, 270, 5) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 230, 0, -50) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 5, MSG_Peach_0151) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(PlayerJump1, LVar0, LVar1, LVar2, 10 * DT) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 5, MSG_Peach_0152) - EVT_CALL(InterpNpcYaw, NPC_Kammy, 90, 5) - EVT_WAIT(10 * DT) - EVT_CALL(NpcMoveTo, NPC_Kammy, 280, -50, 0) - EVT_CALL(PlaySoundAtNpc, NPC_Kammy, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_Kammy, EMOTE_EXCLAMATION, -45, 15, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(20 * DT) - EVT_CALL(InterpNpcYaw, NPC_Kammy, 270, 5) - EVT_CALL(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 5, MSG_Peach_0153) - EVT_WAIT(10 * DT) - EVT_CALL(InterpNpcYaw, NPC_Koopatrol_01, 90, 5) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim05) - EVT_CALL(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim05, ANIM_WorldKammy_Anim05, 5, MSG_Peach_0154) - EVT_CALL(PlaySoundAtNpc, NPC_Kammy, SOUND_KAMMY_SUMMON_MAGIC, SOUND_SPACE_DEFAULT) - EVT_CALL(GetNpcPos, NPC_Kammy, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -20) - EVT_ADD(LVar1, 40) - EVT_ADD(LVar2, 27) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, 1, 50) - EVT_WAIT(60 * DT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 5) - EVT_CALL(GetNpcPos, NPC_Kammy, LVar3, LVar4, LVar5) - EVT_ADD(LVar4, 180) - EVT_CALL(PlaySoundAtPlayer, SOUND_BOWSER_LIGHTNING, SOUND_SPACE_DEFAULT) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 5, 20) - EVT_CALL(N(SetLightningBoltColor), LVarF, 255, 0, 255) - EVT_ADD(LVar1, 15) - EVT_PLAY_EFFECT(EFFECT_SHIMMER_BURST, 1, LVar0, LVar1, LVar2, 1, 30) - EVT_CALL(NpcFacePlayer, NPC_PARTNER, 0) - EVT_EXEC_WAIT(N(EVS_RemoveDisguise)) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_GaspStill, ANIM_Peach2_GaspStill, 5, MSG_Peach_0155) - EVT_CALL(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim05, ANIM_WorldKammy_Anim05, 5, MSG_Peach_0156) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LookAround) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim02) - EVT_CALL(NpcMoveTo, NPC_Kammy, 260, -50, 0) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) - EVT_CALL(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 5, MSG_Peach_0157) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(NpcFacePlayer, NPC_Kammy, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, 240) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_END_THREAD - EVT_EXEC_WAIT(N(EVS_ApproachPeach)) - EVT_EXEC_WAIT(N(EVS_PickUpPeach)) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Carried, ANIM_Peach2_Carried, 5, MSG_Peach_0158) - EVT_EXEC_WAIT(N(EVS_CarryPeachAway)) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(6.0)) - EVT_CALL(NpcFlyTo, NPC_PARTNER, 460, -10, -130, 0, 0, EASING_LINEAR) - EVT_WAIT(60 * DT) - EVT_CALL(FadeOutMusic, 0, 1000 * DT) - EVT_EXEC_WAIT(N(EVS_EndPeachChapter6)) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Loop(0) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLe(LVar0, 140) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Call(SetMusicTrack, 0, SONG_KAMMY_KOOPA_THEME, 0, 8) + Call(SetNpcVar, NPC_Koopatrol_01, 1, 0) + Call(SetNpcFlagBits, NPC_Koopatrol_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcPos, NPC_Kammy, -50, 0, -50) + Exec(N(EVS_OpenAndCloseTowerDoors)) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim02) + Call(SetNpcSpeed, NPC_Kammy, Float(2.0 / DT)) + Call(NpcMoveTo, NPC_Kammy, 30, -50, 0) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) + Thread + Call(InterpNpcYaw, NPC_Koopatrol_01, 270, 5) + Loop(0) + Wait(1) + Call(GetNpcPos, NPC_Kammy, LVar0, LVar1, LVar2) + IfGt(LVar0, 140) + BreakLoop + EndIf + EndLoop + Call(InterpNpcYaw, NPC_Koopatrol_01, 90, 5) + EndThread + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(func_802D1270, 190, LVar2, Float(4.0 / DT)) + Call(func_802D1270, 195, -80, Float(4.0 / DT)) + Call(func_802D1270, 190, -80, Float(4.0 / DT)) + Loop(0) + Wait(1) + Call(GetNpcPos, NPC_Kammy, LVar0, LVar1, LVar2) + IfGt(LVar0, 190) + BreakLoop + EndIf + EndLoop + Call(InterpPlayerYaw, 90, 5) + EndThread + Thread + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_PARTNER, LVar0, -10, -130, 20 * DT) + Call(SetNpcSpeed, NPC_PARTNER, Float(4.0 / DT)) + Call(NpcFlyTo, NPC_PARTNER, 210, -10, -130, 0, 0, EASING_LINEAR) + Call(InterpNpcYaw, NPC_PARTNER, 270, 5) + Loop(0) + Wait(1) + Call(GetNpcPos, NPC_Kammy, LVar0, LVar1, LVar2) + IfGt(LVar0, 210) + BreakLoop + EndIf + EndLoop + Call(InterpNpcYaw, NPC_PARTNER, 90, 5) + EndThread + Wait(30 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, -50) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, -50) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-9.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 5, MSG_Peach_014F) + Call(SpeakToNpc, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, NPC_Kammy, MSG_Peach_0150) + Call(SetNpcVar, NPC_Kammy, 0, 1) + Thread + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Loop(0) + Call(GetNpcPos, NPC_Kammy, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Call(GetNpcVar, NPC_Kammy, 0, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim02) + Call(NpcMoveTo, NPC_Kammy, 270, -50, 0) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) + Call(SetNpcVar, NPC_Kammy, 0, 0) + Wait(10 * DT) + Call(InterpNpcYaw, NPC_Kammy, 270, 5) + Call(SetPanTarget, CAM_DEFAULT, 230, 0, -50) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 5, MSG_Peach_0151) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerJumpscale, Float(1.0)) + Call(PlayerJump1, LVar0, LVar1, LVar2, 10 * DT) + Wait(30 * DT) + Call(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 5, MSG_Peach_0152) + Call(InterpNpcYaw, NPC_Kammy, 90, 5) + Wait(10 * DT) + Call(NpcMoveTo, NPC_Kammy, 280, -50, 0) + Call(PlaySoundAtNpc, NPC_Kammy, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_Kammy, EMOTE_EXCLAMATION, -45, 15, EMOTER_NPC, 0, 0, 0, 0) + Wait(20 * DT) + Call(InterpNpcYaw, NPC_Kammy, 270, 5) + Call(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 5, MSG_Peach_0153) + Wait(10 * DT) + Call(InterpNpcYaw, NPC_Koopatrol_01, 90, 5) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim05) + Call(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim05, ANIM_WorldKammy_Anim05, 5, MSG_Peach_0154) + Call(PlaySoundAtNpc, NPC_Kammy, SOUND_KAMMY_SUMMON_MAGIC, SOUND_SPACE_DEFAULT) + Call(GetNpcPos, NPC_Kammy, LVar0, LVar1, LVar2) + Add(LVar0, -20) + Add(LVar1, 40) + Add(LVar2, 27) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, 1, 50) + Wait(60 * DT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar2, 5) + Call(GetNpcPos, NPC_Kammy, LVar3, LVar4, LVar5) + Add(LVar4, 180) + Call(PlaySoundAtPlayer, SOUND_BOWSER_LIGHTNING, SOUND_SPACE_DEFAULT) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 5, 20) + Call(N(SetLightningBoltColor), LVarF, 255, 0, 255) + Add(LVar1, 15) + PlayEffect(EFFECT_SHIMMER_BURST, 1, LVar0, LVar1, LVar2, 1, 30) + Call(NpcFacePlayer, NPC_PARTNER, 0) + ExecWait(N(EVS_RemoveDisguise)) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_GaspStill, ANIM_Peach2_GaspStill, 5, MSG_Peach_0155) + Call(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim05, ANIM_WorldKammy_Anim05, 5, MSG_Peach_0156) + Call(SetPlayerAnimation, ANIM_Peach2_LookAround) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim02) + Call(NpcMoveTo, NPC_Kammy, 260, -50, 0) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim01) + Call(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim04, ANIM_WorldKammy_Anim01, 5, MSG_Peach_0157) + Thread + Loop(0) + Call(NpcFacePlayer, NPC_Kammy, 0) + Wait(1) + EndLoop + EndThread + Thread + Loop(0) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar0, 240) + BreakLoop + EndIf + EndLoop + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + EndThread + ExecWait(N(EVS_ApproachPeach)) + ExecWait(N(EVS_PickUpPeach)) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Carried, ANIM_Peach2_Carried, 5, MSG_Peach_0158) + ExecWait(N(EVS_CarryPeachAway)) + Wait(20 * DT) + Call(SetNpcSpeed, NPC_PARTNER, Float(6.0)) + Call(NpcFlyTo, NPC_PARTNER, 460, -10, -130, 0, 0, EASING_LINEAR) + Wait(60 * DT) + Call(FadeOutMusic, 0, 1000 * DT) + ExecWait(N(EVS_EndPeachChapter6)) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_kkj/kkj_24/kkj_24_1_music.c b/src/world/area_kkj/kkj_24/kkj_24_1_music.c index e9b0770fada..7d7e0109591 100644 --- a/src/world/area_kkj/kkj_24/kkj_24_1_music.c +++ b/src/world/area_kkj/kkj_24/kkj_24_1_music.c @@ -1,9 +1,9 @@ #include "kkj_24.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH8_REACHED_PEACHS_CASTLE) - EVT_CALL(SetMusicTrack, 0, SONG_BOWSER_THEME, 0, 8) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH8_REACHED_PEACHS_CASTLE) + Call(SetMusicTrack, 0, SONG_BOWSER_THEME, 0, 8) + EndIf + Return + End }; diff --git a/src/world/area_kkj/kkj_24/kkj_24_2_main.c b/src/world/area_kkj/kkj_24/kkj_24_2_main.c index 65c1e0b49d9..470d6c939e0 100644 --- a/src/world/area_kkj/kkj_24/kkj_24_2_main.c +++ b/src/world/area_kkj/kkj_24/kkj_24_2_main.c @@ -9,45 +9,45 @@ EvtScript N(EVS_ExitDoors_kkj_23_1) = EVT_EXIT_DOUBLE_DOOR(kkj_24_ENTRY_0, "kkj_ EvtScript N(EVS_ExitDoors_kkj_25_0) = EVT_EXIT_DOUBLE_DOOR(kkj_24_ENTRY_1, "kkj_25", kkj_25_ENTRY_0, COLLIDER_tte2, MODEL_o78, MODEL_o77); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_23_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_25_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_kkj_23_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_kkj_25_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte2, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kkj_24_ENTRY_0) - EVT_SET(LVar2, MODEL_o58) - EVT_SET(LVar3, MODEL_o57) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(kkj_24_ENTRY_1) - EVT_SET(LVar2, MODEL_o78) - EVT_SET(LVar3, MODEL_o77) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_END_SWITCH - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kkj_24_ENTRY_0) + Set(LVar2, MODEL_o58) + Set(LVar3, MODEL_o57) + ExecWait(EnterDoubleDoor) + CaseEq(kkj_24_ENTRY_1) + Set(LVar2, MODEL_o78) + Set(LVar3, MODEL_o77) + ExecWait(EnterDoubleDoor) + EndSwitch + Exec(N(EVS_BindExitTriggers)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PEACHS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_KKJ_24) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(N(func_80240000_B06570)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_PEACHS_CASTLE) + Call(SetSpriteShading, SHADING_KKJ_24) + SetUP_CAMERA_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Call(N(func_80240000_B06570)) + Exec(N(EVS_SetupMusic)) + Call(UseDoorSounds, DOOR_SOUNDS_LARGE) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_kkj/kkj_24/kkj_24_3_entity.c b/src/world/area_kkj/kkj_24/kkj_24_3_entity.c index dfed7810039..4d0478d11c7 100644 --- a/src/world/area_kkj/kkj_24/kkj_24_3_entity.c +++ b/src/world/area_kkj/kkj_24/kkj_24_3_entity.c @@ -2,7 +2,7 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), -25, 60, -50, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_SavePoint), -25, 60, -50, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_kkj/kkj_25/kkj_25_1_main.c b/src/world/area_kkj/kkj_25/kkj_25_1_main.c index 799c104c39d..0259d4ef3a5 100644 --- a/src/world/area_kkj/kkj_25/kkj_25_1_main.c +++ b/src/world/area_kkj/kkj_25/kkj_25_1_main.c @@ -3,133 +3,133 @@ EvtScript N(EVS_ExitDoors_kkj_24_1) = EVT_EXIT_DOUBLE_DOOR(kkj_25_ENTRY_0, "kkj_24", kkj_24_ENTRY_1, COLLIDER_ttw, MODEL_o84, MODEL_o85); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_24_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_kkj_24_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kkj_25_ENTRY_0) - EVT_IF_EQ(GF_KKJ25_Visited, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetPlayerPos, -645, 0, 0) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, -660, 0, 0) - EVT_WAIT(1) - EVT_CALL(EnablePartnerAI) - EVT_END_IF - EVT_WAIT(150) - EVT_CALL(PlaySoundAtCollider, COLLIDER_ttw, SOUND_LARGE_DOOR_OPEN, 0) - EVT_CALL(MakeLerp, 0, 80, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o84, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o85, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPlayerPos, -605, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_o15, FALSE) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_SET(GF_KKJ25_Visited, TRUE) - EVT_ELSE - EVT_CALL(SetZoneEnabled, ZONE_o15, FALSE) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_END_IF - EVT_SET(LVar0, 0) - EVT_SET(LVar2, MODEL_o84) - EVT_SET(LVar3, MODEL_o85) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_EXEC(N(EVS_Scene_BowserTrapsMario)) - EVT_CASE_EQ(kkj_25_ENTRY_1) - EVT_EXEC(N(EVS_Scene_KammyDefeated)) - EVT_CASE_EQ(kkj_25_ENTRY_2) - EVT_EXEC(N(EVS_Scene_BowserDefeated)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kkj_25_ENTRY_0) + IfEq(GF_KKJ25_Visited, FALSE) + Call(DisablePlayerInput, TRUE) + Call(SetPlayerPos, -645, 0, 0) + Call(GetPartnerInUse, LVar0) + IfEq(LVar0, 0) + Call(DisablePartnerAI, 0) + Call(SetNpcPos, NPC_PARTNER, -660, 0, 0) + Wait(1) + Call(EnablePartnerAI) + EndIf + Wait(150) + Call(PlaySoundAtCollider, COLLIDER_ttw, SOUND_LARGE_DOOR_OPEN, 0) + Call(MakeLerp, 0, 80, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o84, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_o85, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetPlayerPos, -605, 0, 0) + Call(DisablePlayerInput, FALSE) + Call(SetZoneEnabled, ZONE_o15, FALSE) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Set(GF_KKJ25_Visited, TRUE) + Else + Call(SetZoneEnabled, ZONE_o15, FALSE) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + EndIf + Set(LVar0, 0) + Set(LVar2, MODEL_o84) + Set(LVar3, MODEL_o85) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + Exec(N(EVS_Scene_BowserTrapsMario)) + CaseEq(kkj_25_ENTRY_1) + Exec(N(EVS_Scene_KammyDefeated)) + CaseEq(kkj_25_ENTRY_2) + Exec(N(EVS_Scene_BowserDefeated)) + EndSwitch + Return + End }; EvtScript N(EVS_Rotate_Propellers) = { - EVT_THREAD - EVT_SET(LVar2, 0) - EVT_LOOP(0) - EVT_ADD(LVar2, 10) - EVT_CALL(RotateGroup, MODEL_g3, LVar2, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_g12, LVar2, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_g14, LVar2, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_g16, LVar2, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_g18, LVar2, 0, 1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_SET(LVar2, 90) - EVT_LOOP(0) - EVT_ADD(LVar2, 10) - EVT_CALL(RotateGroup, MODEL_g11, LVar2, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_g13, LVar2, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_g15, LVar2, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_g17, LVar2, 0, 1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Thread + Set(LVar2, 0) + Loop(0) + Add(LVar2, 10) + Call(RotateGroup, MODEL_g3, LVar2, 0, 1, 0) + Call(RotateGroup, MODEL_g12, LVar2, 0, 1, 0) + Call(RotateGroup, MODEL_g14, LVar2, 0, 1, 0) + Call(RotateGroup, MODEL_g16, LVar2, 0, 1, 0) + Call(RotateGroup, MODEL_g18, LVar2, 0, 1, 0) + Wait(1) + EndLoop + EndThread + Set(LVar2, 90) + Loop(0) + Add(LVar2, 10) + Call(RotateGroup, MODEL_g11, LVar2, 0, 1, 0) + Call(RotateGroup, MODEL_g13, LVar2, 0, 1, 0) + Call(RotateGroup, MODEL_g15, LVar2, 0, 1, 0) + Call(RotateGroup, MODEL_g17, LVar2, 0, 1, 0) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_Main) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(1) - EVT_SET(GF_KKJ25_Defeated_Kammy, TRUE) - EVT_CASE_EQ(2) - EVT_SET(GF_KKJ25_Defeated_Kammy, TRUE) - EVT_SET(GF_KKJ25_Defeated_Bowser, TRUE) - EVT_END_SWITCH - EVT_SET(GB_WorldLocation, LOCATION_PEACHS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_KKJ_25) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.75)) - EVT_IF_EQ(GF_KKJ25_Defeated_Bowser, FALSE) - EVT_IF_EQ(GF_KKJ25_Defeated_Kammy, FALSE) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(InitialNpcs))) - EVT_ELSE - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(MidpointNpcs))) - EVT_CALL(EnableGroup, MODEL_g30, FALSE) - EVT_END_IF - EVT_ELSE - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(FinaleNpcs))) - EVT_CALL(EnableGroup, MODEL_g30, FALSE) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE) - EVT_EXEC(N(EVS_EnterMap)) - EVT_CALL(ParentColliderToModel, COLLIDER_o128, MODEL_o1) - EVT_EXEC(N(EVS_Rotate_Propellers)) - EVT_CALL(GetEntryID, LVar0) - EVT_THREAD - EVT_SET(MV_ArenaState, ARENA_STATE_IDLE) - EVT_IF_EQ(LVar0, kkj_25_ENTRY_0) - EVT_CALL(EnableModel, MODEL_o122, FALSE) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_EQ(MV_ArenaState, ARENA_STATE_ACTIVATING) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_ELSE - EVT_CALL(ScaleModel, MODEL_o122, 250, 1, 250) - EVT_END_IF - EVT_EXEC(N(EVS_ManageArenaEffects)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(1) + Set(GF_KKJ25_Defeated_Kammy, TRUE) + CaseEq(2) + Set(GF_KKJ25_Defeated_Kammy, TRUE) + Set(GF_KKJ25_Defeated_Bowser, TRUE) + EndSwitch + Set(GB_WorldLocation, LOCATION_PEACHS_CASTLE) + Call(SetSpriteShading, SHADING_KKJ_25) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + Call(SetCamSpeed, CAM_DEFAULT, Float(0.75)) + IfEq(GF_KKJ25_Defeated_Bowser, FALSE) + IfEq(GF_KKJ25_Defeated_Kammy, FALSE) + Call(MakeNpcs, FALSE, Ref(N(InitialNpcs))) + Else + Call(MakeNpcs, FALSE, Ref(N(MidpointNpcs))) + Call(EnableGroup, MODEL_g30, FALSE) + EndIf + Else + Call(MakeNpcs, FALSE, Ref(N(FinaleNpcs))) + Call(EnableGroup, MODEL_g30, FALSE) + EndIf + ExecWait(N(EVS_MakeEntities)) + Call(UseDoorSounds, DOOR_SOUNDS_LARGE) + Exec(N(EVS_EnterMap)) + Call(ParentColliderToModel, COLLIDER_o128, MODEL_o1) + Exec(N(EVS_Rotate_Propellers)) + Call(GetEntryID, LVar0) + Thread + Set(MV_ArenaState, ARENA_STATE_IDLE) + IfEq(LVar0, kkj_25_ENTRY_0) + Call(EnableModel, MODEL_o122, FALSE) + Loop(0) + Wait(1) + IfEq(MV_ArenaState, ARENA_STATE_ACTIVATING) + BreakLoop + EndIf + EndLoop + Else + Call(ScaleModel, MODEL_o122, 250, 1, 250) + EndIf + Exec(N(EVS_ManageArenaEffects)) + EndThread + Return + End }; diff --git a/src/world/area_kkj/kkj_25/kkj_25_2_npc_initial.c b/src/world/area_kkj/kkj_25/kkj_25_2_npc_initial.c index e1d5d32a1de..a60a7e1159a 100644 --- a/src/world/area_kkj/kkj_25/kkj_25_2_npc_initial.c +++ b/src/world/area_kkj/kkj_25/kkj_25_2_npc_initial.c @@ -11,70 +11,70 @@ #include "world/common/npc/Twink.h" EvtScript N(EVS_NpcIdle_Bowser) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Bowser_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -75) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 1000) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_CALL(ModifyGlobalOverrideFlags, 1, GLOBAL_OVERRIDES_DONT_RESUME_SONG_AFTER_BATTLE) - EVT_CALL(StopSound, SOUND_LRAW_KPA_ARENA_TURN_ON) - EVT_CALL(StartBossBattle, SONG_BOWSER_BATTLE) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Loop(0) + Call(GetSelfVar, 0, LVar0) + IfNe(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Thread + Call(GetNpcPos, NPC_Bowser_01, LVar0, LVar1, LVar2) + Add(LVar0, -75) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 1000) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-7.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Call(ModifyGlobalOverrideFlags, 1, GLOBAL_OVERRIDES_DONT_RESUME_SONG_AFTER_BATTLE) + Call(StopSound, SOUND_LRAW_KPA_ARENA_TURN_ON) + Call(StartBossBattle, SONG_BOWSER_BATTLE) + Return + End }; EvtScript N(EVS_NpcDefeat_Bowser) = { #define NAME_SUFFIX - EVT_CALL(PlaySound, SOUND_LRAW_KPA_ARENA_ACTIVE) - EVT_EXEC(N(EVS_Scene_PeachBreaksFree)) - EVT_RETURN - EVT_END + Call(PlaySound, SOUND_LRAW_KPA_ARENA_ACTIVE) + Exec(N(EVS_Scene_PeachBreaksFree)) + Return + End #define NAME_SUFFIX _Npc1 }; EvtScript N(EVS_NpcInit_Bowser) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Bowser))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Bowser))) - EVT_CALL(SetNpcPos, NPC_Bowser_01, 350, 0, 0) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Bowser))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Bowser))) + Call(SetNpcPos, NPC_Bowser_01, 350, 0, 0) + Return + End }; EvtScript N(EVS_NpcIdle_Kammy_Broom) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPlayerImgFXFlags, IMGFX_FLAG_2000) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_TINT, 0, 0, 0, 0) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_WAIT(1) - EVT_CALL(GetNpcPos, NPC_Peach_01, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(ModifyGlobalOverrideFlags, 1, GLOBAL_OVERRIDES_DONT_RESUME_SONG_AFTER_BATTLE) - EVT_CALL(StopSound, SOUND_LRAW_KPA_ARENA_ACTIVE) - EVT_CALL(StartBossBattle, SONG_BOWSER_BATTLE) - EVT_CALL(EnablePartnerAI) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Loop(0) + Call(GetSelfVar, 0, LVar0) + IfNe(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetPlayerImgFXFlags, IMGFX_FLAG_2000) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_TINT, 0, 0, 0, 0) + Call(HidePlayerShadow, TRUE) + Call(DisablePartnerAI, 0) + Wait(1) + Call(GetNpcPos, NPC_Peach_01, LVar0, LVar1, LVar2) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Call(ModifyGlobalOverrideFlags, 1, GLOBAL_OVERRIDES_DONT_RESUME_SONG_AFTER_BATTLE) + Call(StopSound, SOUND_LRAW_KPA_ARENA_ACTIVE) + Call(StartBossBattle, SONG_BOWSER_BATTLE) + Call(EnablePartnerAI) + Return + End }; API_CALLABLE(N(func_80240020_B06A20)) { @@ -85,64 +85,64 @@ API_CALLABLE(N(func_80240020_B06A20)) { } EvtScript N(EVS_NpcDefeat_Kammy_Broom) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_CALL(N(func_80240020_B06A20)) - EVT_SET(GF_KKJ25_Defeated_Kammy, TRUE) + Call(GetBattleOutcome, LVar0) + Call(N(func_80240020_B06A20)) + Set(GF_KKJ25_Defeated_Kammy, TRUE) // reload the map in the 'midpoint' configuration - EVT_CALL(GotoMap, EVT_PTR("kkj_25"), kkj_25_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("kkj_25"), kkj_25_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_NpcAux_Kammy_Broom) = { - EVT_SET(LVar3, 1) - EVT_LOOP(0) - EVT_LOOP(5) - EVT_CALL(GetNpcPos, NPC_Kammy_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, LVar3) - EVT_CALL(SetNpcPos, NPC_Kammy_01, LVar0, LVar1, LVar2) - EVT_WAIT(2) - EVT_END_LOOP - EVT_MUL(LVar3, -1) - EVT_WAIT(3) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVar3, 1) + Loop(0) + Loop(5) + Call(GetNpcPos, NPC_Kammy_01, LVar0, LVar1, LVar2) + Add(LVar1, LVar3) + Call(SetNpcPos, NPC_Kammy_01, LVar0, LVar1, LVar2) + Wait(2) + EndLoop + Mul(LVar3, -1) + Wait(3) + EndLoop + Return + End }; EvtScript N(EVS_NpcInit_Kammy_Broom) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Kammy_Broom))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Kammy_Broom))) - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_Kammy_Broom))) - EVT_CALL(SetNpcPos, NPC_Kammy_01, 460, 10, 0) - EVT_CALL(SetNpcYaw, NPC_Kammy_01, 270) - EVT_CALL(SetNpcAnimation, NPC_Kammy_01, ANIM_BattleKammy_Anim04) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Kammy_Broom))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Kammy_Broom))) + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_Kammy_Broom))) + Call(SetNpcPos, NPC_Kammy_01, 460, 10, 0) + Call(SetNpcYaw, NPC_Kammy_01, 270) + Call(SetNpcAnimation, NPC_Kammy_01, ANIM_BattleKammy_Anim04) + Return + End }; EvtScript N(EVS_NpcInit_Kammy) = { - EVT_CALL(SetNpcPos, NPC_Kammy_02, 300, -100, 0) - EVT_CALL(SetNpcAnimation, NPC_Kammy_02, ANIM_BattleKammy_Anim02) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Kammy_02, 300, -100, 0) + Call(SetNpcAnimation, NPC_Kammy_02, ANIM_BattleKammy_Anim02) + Return + End }; EvtScript N(EVS_NpcInit_BattleKooper_01) = { - EVT_CALL(SetNpcPos, NPC_Peach_01, 400, 0, -30) - EVT_CALL(SetNpcYaw, NPC_Peach_01, 270) - EVT_CALL(SetNpcAnimation, NPC_Peach_01, ANIM_Peach2_TiedIdle) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Peach_01, 400, 0, -30) + Call(SetNpcYaw, NPC_Peach_01, 270) + Call(SetNpcAnimation, NPC_Peach_01, ANIM_Peach2_TiedIdle) + Return + End }; EvtScript N(EVS_NpcInit_Twink) = { - EVT_CALL(SetNpcAnimation, NPC_Twink_01, ANIM_Twink_Idle) - EVT_CALL(EnableNpcShadow, NPC_Twink_01, FALSE) - EVT_CALL(SetNpcPos, NPC_Twink_01, 300, -100, 0) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_Twink_01, ANIM_Twink_Idle) + Call(EnableNpcShadow, NPC_Twink_01, FALSE) + Call(SetNpcPos, NPC_Twink_01, 300, -100, 0) + Return + End }; AnimID N(ExtraAnims_Bowser)[] = { diff --git a/src/world/area_kkj/kkj_25/kkj_25_3_npc_midpoint.c b/src/world/area_kkj/kkj_25/kkj_25_3_npc_midpoint.c index 81e8306a853..309660592df 100644 --- a/src/world/area_kkj/kkj_25/kkj_25_3_npc_midpoint.c +++ b/src/world/area_kkj/kkj_25/kkj_25_3_npc_midpoint.c @@ -12,42 +12,42 @@ #include "world/common/npc/Twink.h" EvtScript N(EVS_NpcIdle_Bowser) = { - EVT_LABEL(0) - EVT_CALL(SetSelfVar, 0, 0) - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Bowser_02, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -75) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 1000) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_CALL(StartBossBattle, SONG_FINAL_BOWSER_BATTLE) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(SetSelfVar, 0, 0) + Loop(0) + Call(GetSelfVar, 0, LVar0) + IfNe(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Thread + Call(GetNpcPos, NPC_Bowser_02, LVar0, LVar1, LVar2) + Add(LVar0, -75) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-7.0)) + Call(SetCamDistance, CAM_DEFAULT, 1000) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Call(StartBossBattle, SONG_FINAL_BOWSER_BATTLE) + Goto(0) + Return + End }; #include "world/common/todo/UnkFunc1.inc.c" EvtScript N(EVS_NpcDefeat_Bowser) = { - EVT_CALL(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAG_2, TRUE) - EVT_CALL(N(UnkFunc1)) - EVT_SET(GF_KKJ25_Defeated_Bowser, TRUE) + Call(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAG_2, TRUE) + Call(N(UnkFunc1)) + Set(GF_KKJ25_Defeated_Bowser, TRUE) // reload the map in the 'final' configuration - EVT_CALL(GotoMap, EVT_PTR("kkj_25"), kkj_25_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("kkj_25"), kkj_25_ENTRY_2) + Wait(100) + Return + End }; s32 N(FlyingKammyHoverOffsets)[] = { @@ -55,114 +55,114 @@ s32 N(FlyingKammyHoverOffsets)[] = { }; EvtScript N(EVS_NpcAux_Kammy_Broom) = { - EVT_LABEL(0) - EVT_USE_BUF(EVT_PTR(N(FlyingKammyHoverOffsets))) - EVT_LOOP(10) - EVT_BUF_READ1(LVar1) - EVT_CALL(GetNpcPos, NPC_Kammy_03, LVar2, LVar3, LVar4) - EVT_ADD(LVar3, LVar1) - EVT_CALL(SetNpcPos, NPC_Kammy_03, LVar2, LVar3, LVar4) - EVT_WAIT(3) - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + UseBuf(Ref(N(FlyingKammyHoverOffsets))) + Loop(10) + BufRead1(LVar1) + Call(GetNpcPos, NPC_Kammy_03, LVar2, LVar3, LVar4) + Add(LVar3, LVar1) + Call(SetNpcPos, NPC_Kammy_03, LVar2, LVar3, LVar4) + Wait(3) + EndLoop + Goto(0) + Return + End }; EvtScript N(EVS_NpcInit_Peach) = { - EVT_CALL(SetNpcPos, NPC_Peach_01, 475, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_Peach_01, ANIM_Peach1_Idle) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Peach_01, 475, 0, 0) + Call(SetNpcAnimation, NPC_Peach_01, ANIM_Peach1_Idle) + Return + End }; EvtScript N(EVS_NpcInit_Bowser) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Bowser))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Bowser))) - EVT_CALL(SetNpcScale, NPC_Bowser_02, EVT_FLOAT(1.5), EVT_FLOAT(1.5), EVT_FLOAT(1.5)) - EVT_CALL(SetNpcPos, NPC_Bowser_02, 200, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_Bowser_02, ANIM_WorldBowser_Idle) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Bowser))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Bowser))) + Call(SetNpcScale, NPC_Bowser_02, Float(1.5), Float(1.5), Float(1.5)) + Call(SetNpcPos, NPC_Bowser_02, 200, 0, 0) + Call(SetNpcAnimation, NPC_Bowser_02, ANIM_WorldBowser_Idle) + Return + End }; EvtScript N(EVS_NpcInit_Kammy_Broom) = { - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_Kammy_Broom))) - EVT_CALL(SetNpcPos, NPC_Kammy_03, 540, 10, -50) - EVT_CALL(SetNpcAnimation, NPC_Kammy_03, ANIM_BattleKammy_Anim0C) - EVT_RETURN - EVT_END + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_Kammy_Broom))) + Call(SetNpcPos, NPC_Kammy_03, 540, 10, -50) + Call(SetNpcAnimation, NPC_Kammy_03, ANIM_BattleKammy_Anim0C) + Return + End }; EvtScript N(EVS_NpcInit_Kammy) = { - EVT_CALL(SetNpcPos, NPC_Kammy_04, 550, 0, -40) - EVT_CALL(SetNpcAnimation, NPC_Kammy_04, ANIM_BattleKammy_Anim03) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Kammy_04, 550, 0, -40) + Call(SetNpcAnimation, NPC_Kammy_04, ANIM_BattleKammy_Anim03) + Return + End }; EvtScript N(EVS_NpcInit_Twink) = { - EVT_CALL(InterpNpcYaw, NPC_Peach_01, 270, 0) - EVT_CALL(SetNpcPos, NPC_Twink_01, 510, 30, 0) - EVT_CALL(InterpNpcYaw, NPC_Twink_01, 270, 0) - EVT_RETURN - EVT_END + Call(InterpNpcYaw, NPC_Peach_01, 270, 0) + Call(SetNpcPos, NPC_Twink_01, 510, 30, 0) + Call(InterpNpcYaw, NPC_Twink_01, 270, 0) + Return + End }; EvtScript N(EVS_NpcInit_Eldstar) = { - EVT_CALL(SetNpcImgFXParams, NPC_Eldstar, IMGFX_SET_ALPHA, 0, 0, 0, 0) - EVT_CALL(EnableNpcShadow, NPC_Eldstar, FALSE) - EVT_CALL(SetNpcPos, NPC_Eldstar, 100, 45, 0) - EVT_RETURN - EVT_END + Call(SetNpcImgFXParams, NPC_Eldstar, IMGFX_SET_ALPHA, 0, 0, 0, 0) + Call(EnableNpcShadow, NPC_Eldstar, FALSE) + Call(SetNpcPos, NPC_Eldstar, 100, 45, 0) + Return + End }; EvtScript N(EVS_NpcInit_Mamar) = { - EVT_CALL(SetNpcImgFXParams, NPC_Mamar, IMGFX_SET_ALPHA, 0, 0, 0, 0) - EVT_CALL(EnableNpcShadow, NPC_Mamar, FALSE) - EVT_CALL(SetNpcPos, NPC_Mamar, 46, 45, -27) - EVT_RETURN - EVT_END + Call(SetNpcImgFXParams, NPC_Mamar, IMGFX_SET_ALPHA, 0, 0, 0, 0) + Call(EnableNpcShadow, NPC_Mamar, FALSE) + Call(SetNpcPos, NPC_Mamar, 46, 45, -27) + Return + End }; EvtScript N(EVS_NpcInit_Skolar) = { - EVT_CALL(SetNpcImgFXParams, NPC_Skolar, IMGFX_SET_ALPHA, 0, 0, 0, 0) - EVT_CALL(EnableNpcShadow, NPC_Skolar, FALSE) - EVT_CALL(SetNpcPos, NPC_Skolar, 33, 45, -95) - EVT_RETURN - EVT_END + Call(SetNpcImgFXParams, NPC_Skolar, IMGFX_SET_ALPHA, 0, 0, 0, 0) + Call(EnableNpcShadow, NPC_Skolar, FALSE) + Call(SetNpcPos, NPC_Skolar, 33, 45, -95) + Return + End }; EvtScript N(EVS_NpcInit_Muskular) = { - EVT_CALL(SetNpcImgFXParams, NPC_Muskular, IMGFX_SET_ALPHA, 0, 0, 0, 0) - EVT_CALL(EnableNpcShadow, NPC_Muskular, FALSE) - EVT_CALL(SetNpcPos, NPC_Muskular, 71, 45, -132) - EVT_RETURN - EVT_END + Call(SetNpcImgFXParams, NPC_Muskular, IMGFX_SET_ALPHA, 0, 0, 0, 0) + Call(EnableNpcShadow, NPC_Muskular, FALSE) + Call(SetNpcPos, NPC_Muskular, 71, 45, -132) + Return + End }; EvtScript N(EVS_NpcInit_Misstar) = { - EVT_CALL(SetNpcImgFXParams, NPC_Misstar, IMGFX_SET_ALPHA, 0, 0, 0, 0) - EVT_CALL(EnableNpcShadow, NPC_Misstar, FALSE) - EVT_CALL(SetNpcPos, NPC_Misstar, 131, 45, -132) - EVT_RETURN - EVT_END + Call(SetNpcImgFXParams, NPC_Misstar, IMGFX_SET_ALPHA, 0, 0, 0, 0) + Call(EnableNpcShadow, NPC_Misstar, FALSE) + Call(SetNpcPos, NPC_Misstar, 131, 45, -132) + Return + End }; EvtScript N(EVS_NpcInit_Klevar) = { - EVT_CALL(SetNpcImgFXParams, NPC_Klevar, IMGFX_SET_ALPHA, 0, 0, 0, 0) - EVT_CALL(EnableNpcShadow, NPC_Klevar, FALSE) - EVT_CALL(SetNpcPos, NPC_Klevar, 169, 45, -95) - EVT_RETURN - EVT_END + Call(SetNpcImgFXParams, NPC_Klevar, IMGFX_SET_ALPHA, 0, 0, 0, 0) + Call(EnableNpcShadow, NPC_Klevar, FALSE) + Call(SetNpcPos, NPC_Klevar, 169, 45, -95) + Return + End }; EvtScript N(EVS_NpcInit_Kalmar) = { - EVT_CALL(SetNpcImgFXParams, NPC_Kalmar, IMGFX_SET_ALPHA, 0, 0, 0, 0) - EVT_CALL(EnableNpcShadow, NPC_Kalmar, FALSE) - EVT_CALL(SetNpcPos, NPC_Kalmar, 156, 45, -27) - EVT_RETURN - EVT_END + Call(SetNpcImgFXParams, NPC_Kalmar, IMGFX_SET_ALPHA, 0, 0, 0, 0) + Call(EnableNpcShadow, NPC_Kalmar, FALSE) + Call(SetNpcPos, NPC_Kalmar, 156, 45, -27) + Return + End }; AnimID N(ExtraAnims_Bowser)[] = { diff --git a/src/world/area_kkj/kkj_25/kkj_25_4_npc_final.c b/src/world/area_kkj/kkj_25/kkj_25_4_npc_final.c index a5a13186f66..68e56064448 100644 --- a/src/world/area_kkj/kkj_25/kkj_25_4_npc_final.c +++ b/src/world/area_kkj/kkj_25/kkj_25_4_npc_final.c @@ -16,54 +16,54 @@ s32 N(FlyingKammyHoverOffsets)[] = { }; EvtScript N(EVS_NpcAux_Kammy_Broom) = { - EVT_LABEL(0) - EVT_USE_BUF(EVT_PTR(N(FlyingKammyHoverOffsets))) - EVT_LOOP(10) - EVT_BUF_READ1(LVar1) - EVT_CALL(GetNpcPos, NPC_Kammy_05, LVar2, LVar3, LVar4) - EVT_ADD(LVar3, LVar1) - EVT_CALL(SetNpcPos, NPC_Kammy_05, LVar2, LVar3, LVar4) - EVT_WAIT(3) - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + UseBuf(Ref(N(FlyingKammyHoverOffsets))) + Loop(10) + BufRead1(LVar1) + Call(GetNpcPos, NPC_Kammy_05, LVar2, LVar3, LVar4) + Add(LVar3, LVar1) + Call(SetNpcPos, NPC_Kammy_05, LVar2, LVar3, LVar4) + Wait(3) + EndLoop + Goto(0) + Return + End }; EvtScript N(EVS_NpcInit_StarRod) = { - EVT_CALL(SetNpcPos, NPC_StarRod, 270, 0, 0) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_StarRod, 270, 0, 0) + Return + End }; EvtScript N(EVS_NpcInit_Bowser_03) = { - EVT_CALL(SetNpcAnimation, NPC_Bowser_03, ANIM_WorldBowser_DefeatedIdle) - EVT_CALL(SetNpcPos, NPC_Bowser_03, 300, 0, 50) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_Bowser_03, ANIM_WorldBowser_DefeatedIdle) + Call(SetNpcPos, NPC_Bowser_03, 300, 0, 50) + Return + End }; EvtScript N(EVS_NpcInit_Peach) = { - EVT_CALL(SetNpcCollisionSize, NPC_Peach_02, 48, 24) - EVT_CALL(SetNpcPos, NPC_Peach_02, 400, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_Peach_02, ANIM_Peach1_Idle) - EVT_RETURN - EVT_END + Call(SetNpcCollisionSize, NPC_Peach_02, 48, 24) + Call(SetNpcPos, NPC_Peach_02, 400, 0, 0) + Call(SetNpcAnimation, NPC_Peach_02, ANIM_Peach1_Idle) + Return + End }; EvtScript N(EVS_NpcInit_Kammy_Broom) = { - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_Kammy_Broom))) - EVT_CALL(SetNpcPos, NPC_Kammy_05, 525, 10, 0) - EVT_CALL(SetNpcAnimation, NPC_Kammy_05, ANIM_BattleKammy_Anim04) - EVT_CALL(InterpNpcYaw, NPC_Kammy_05, 270, 0) - EVT_RETURN - EVT_END + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_Kammy_Broom))) + Call(SetNpcPos, NPC_Kammy_05, 525, 10, 0) + Call(SetNpcAnimation, NPC_Kammy_05, ANIM_BattleKammy_Anim04) + Call(InterpNpcYaw, NPC_Kammy_05, 270, 0) + Return + End }; EvtScript N(EVS_NpcInit_Twink_02) = { - EVT_CALL(SetNpcPos, NPC_Twink_02, 430, 30, 0) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Twink_02, 430, 30, 0) + Return + End }; AnimID N(ExtraAnims_Bowser)[] = { diff --git a/src/world/area_kkj/kkj_25/kkj_25_5_arena.c b/src/world/area_kkj/kkj_25/kkj_25_5_arena.c index 0503919b01e..8a1057c8925 100644 --- a/src/world/area_kkj/kkj_25/kkj_25_5_arena.c +++ b/src/world/area_kkj/kkj_25/kkj_25_5_arena.c @@ -31,69 +31,69 @@ API_CALLABLE(N(SpawnLensFlare)) { #define NAME_SUFFIX EvtScript N(EVS_ArenaEyesFlash) = { - EVT_CALL(PlaySoundAt, SOUND_KKJ_ARENA_LENS_FLARE, SOUND_SPACE_DEFAULT, 300, -70, 280) - EVT_CALL(N(SpawnLensFlare), 225, -70, 280, 240) - EVT_CALL(N(SpawnLensFlare), 380, -70, 280, 240) - EVT_RETURN - EVT_END + Call(PlaySoundAt, SOUND_KKJ_ARENA_LENS_FLARE, SOUND_SPACE_DEFAULT, 300, -70, 280) + Call(N(SpawnLensFlare), 225, -70, 280, 240) + Call(N(SpawnLensFlare), 380, -70, 280, 240) + Return + End }; EvtScript N(EVS_BowserActivatesSwitch) = { - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(N(GetEntityPosition), MV_SwitchEntityIdx, LVar7, LVar8, LVar9) - EVT_CALL(MakeLerp, 0, -13, 5, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetEntityPositionF), MV_SwitchEntityIdx, LVar7, LVar0, LVar9) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(N(SetEntityPositionF), MV_SwitchEntityIdx, LVar7, -20, LVar9) - EVT_CALL(SetNpcFlagBits, NPC_Bowser_01, NPC_FLAG_DIRTY_SHADOW, TRUE) - EVT_END_THREAD - EVT_THREAD - EVT_SET(MV_Unk_0A, 0) - EVT_CALL(SetNpcAnimation, NPC_Bowser_01, ANIM_WorldBowser_Jump) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Bowser_01, ANIM_WorldBowser_Land) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Bowser_01, ANIM_WorldBowser_RearUpLaugh) - EVT_CALL(PlaySound, SOUND_LRAW_RUMBLE) - EVT_LOOP(0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 1, EVT_FLOAT(2.0)) - EVT_WAIT(1) - EVT_IF_EQ(MV_Unk_0A, 11) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySound, SOUND_LRAW_RUMBLE | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_END_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Bowser_01, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_Bowser_01, 300, 0, 0, 20) - EVT_CALL(PlaySoundAtNpc, NPC_Bowser_01, SOUND_FLOOR_SWITCH_ACTIVATE, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAtNpc, NPC_Bowser_01, SOUND_LARGE_NPC_IMPACT, SOUND_SPACE_DEFAULT) - EVT_SET(AF_KKJ_1A, TRUE) - EVT_RETURN - EVT_END + Thread + Wait(20) + Call(N(GetEntityPosition), MV_SwitchEntityIdx, LVar7, LVar8, LVar9) + Call(MakeLerp, 0, -13, 5, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(N(SetEntityPositionF), MV_SwitchEntityIdx, LVar7, LVar0, LVar9) + IfEq(LVar1, 1) + Goto(0) + EndIf + Wait(30) + Call(N(SetEntityPositionF), MV_SwitchEntityIdx, LVar7, -20, LVar9) + Call(SetNpcFlagBits, NPC_Bowser_01, NPC_FLAG_DIRTY_SHADOW, TRUE) + EndThread + Thread + Set(MV_Unk_0A, 0) + Call(SetNpcAnimation, NPC_Bowser_01, ANIM_WorldBowser_Jump) + Wait(10) + Call(SetNpcAnimation, NPC_Bowser_01, ANIM_WorldBowser_Land) + Wait(10) + Call(SetNpcAnimation, NPC_Bowser_01, ANIM_WorldBowser_RearUpLaugh) + Call(PlaySound, SOUND_LRAW_RUMBLE) + Loop(0) + Call(ShakeCam, CAM_DEFAULT, 0, 1, Float(2.0)) + Wait(1) + IfEq(MV_Unk_0A, 11) + BreakLoop + EndIf + EndLoop + Call(PlaySound, SOUND_LRAW_RUMBLE | SOUND_ID_TRIGGER_CHANGE_SOUND) + EndThread + Call(SetNpcJumpscale, NPC_Bowser_01, Float(1.0)) + Call(NpcJump0, NPC_Bowser_01, 300, 0, 0, 20) + Call(PlaySoundAtNpc, NPC_Bowser_01, SOUND_FLOOR_SWITCH_ACTIVATE, SOUND_SPACE_DEFAULT) + Call(PlaySoundAtNpc, NPC_Bowser_01, SOUND_LARGE_NPC_IMPACT, SOUND_SPACE_DEFAULT) + Set(AF_KKJ_1A, TRUE) + Return + End }; EvtScript N(EVS_802459E4) = { - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PARTNER_GOOMBARIO) - EVT_CASE_EQ(PARTNER_KOOPER) - EVT_CASE_EQ(PARTNER_BOMBETTE) - EVT_CASE_EQ(PARTNER_SUSHIE) - EVT_CASE_DEFAULT - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 19) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetCurrentPartnerID, LVar0) + Switch(LVar0) + CaseEq(PARTNER_GOOMBARIO) + CaseEq(PARTNER_KOOPER) + CaseEq(PARTNER_BOMBETTE) + CaseEq(PARTNER_SUSHIE) + CaseDefault + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Set(LVar1, 19) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + EndSwitch + Return + End }; s32 N(BridgeModels)[] = { @@ -116,163 +116,163 @@ s32 N(BridgeModels)[] = { }; EvtScript N(EVS_Scene_BowserTrapsMario) = { - EVT_LABEL(0) - EVT_CALL(N(GetFloorCollider), LVar0) - EVT_IF_NE(LVar0, COLLIDER_o128) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF + Label(0) + Call(N(GetFloorCollider), LVar0) + IfNe(LVar0, COLLIDER_o128) + Wait(1) + Goto(0) + EndIf #if VERSION_PAL - EVT_CALL(DisablePlayerInput, TRUE) + Call(DisablePlayerInput, TRUE) #endif - EVT_THREAD - EVT_WAIT(1) + Thread + Wait(1) #if !VERSION_PAL - EVT_CALL(DisablePlayerInput, TRUE) + Call(DisablePlayerInput, TRUE) #endif - EVT_CALL(PlayerFaceNpc, NPC_Bowser_01, FALSE) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_CALL(GetCurrentPartnerID, LVar1) - EVT_IF_EQ(LVar1, PARTNER_BOMBETTE) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_GOTO(1) - EVT_END_IF - EVT_END_IF - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(GetCurrentPartnerID, LVar1) - EVT_IF_NE(LVar1, PARTNER_LAKILESTER) - EVT_CALL(WaitForPlayerTouchingFloor) - EVT_END_IF - EVT_CALL(InterruptUsePartner) - EVT_WAIT(5) - EVT_END_IF - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 20) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_IF_LT(LVar5, 0) - EVT_ADD(LVar5, 25) - EVT_ELSE - EVT_ADD(LVar5, -25) - EVT_END_IF - EVT_ADD(LVar3, -10) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.8)) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar3, LVar1, LVar5, 12) - EVT_CALL(EnablePartnerAI) - EVT_END_IF - EVT_LABEL(1) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Bowser_01, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_CH8_007C) - EVT_WAIT(20) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 350, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 350, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Bowser_01, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_CH8_007D) - EVT_EXEC_WAIT(N(EVS_BowserActivatesSwitch)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -150, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -150, 0, 100) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(26.0), EVT_FLOAT(-18.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -480, -480) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, 480) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(PlayerFaceNpc, NPC_Bowser_01, FALSE) + Call(GetPartnerInUse, LVar0) + Call(GetCurrentPartnerID, LVar1) + IfEq(LVar1, PARTNER_BOMBETTE) + IfNe(LVar0, PARTNER_NONE) + Goto(1) + EndIf + EndIf + IfNe(LVar0, PARTNER_NONE) + Call(GetCurrentPartnerID, LVar1) + IfNe(LVar1, PARTNER_LAKILESTER) + Call(WaitForPlayerTouchingFloor) + EndIf + Call(InterruptUsePartner) + Wait(5) + EndIf + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + IfLt(LVar0, 20) + Call(GetPlayerPos, LVar3, LVar4, LVar5) + IfLt(LVar5, 0) + Add(LVar5, 25) + Else + Add(LVar5, -25) + EndIf + Add(LVar3, -10) + Call(DisablePartnerAI, 0) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.8)) + Call(NpcJump0, NPC_PARTNER, LVar3, LVar1, LVar5, 12) + Call(EnablePartnerAI) + EndIf + Label(1) + EndThread + Call(SpeakToPlayer, NPC_Bowser_01, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_CH8_007C) + Wait(20) + Call(UseSettingsFrom, CAM_DEFAULT, 350, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 350, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, 450) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-7.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10) + Call(SpeakToPlayer, NPC_Bowser_01, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_CH8_007D) + ExecWait(N(EVS_BowserActivatesSwitch)) + Call(UseSettingsFrom, CAM_DEFAULT, -150, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, -150, 0, 100) + Call(SetCamDistance, CAM_DEFAULT, 250) + Call(SetCamPitch, CAM_DEFAULT, Float(26.0), Float(-18.0)) + Call(SetCamPosA, CAM_DEFAULT, -480, -480) + Call(SetCamPosB, CAM_DEFAULT, 0, 480) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_WaveBridgeModels) = { - EVT_USE_BUF(EVT_PTR(N(BridgeModels))) - EVT_SETF(LVar1, EVT_FLOAT(1.0)) - EVT_SET(LVar2, 1) - EVT_LOOP(ARRAY_COUNT(N(BridgeModels))) - EVT_BUF_READ1(LVar3) - EVT_SETF(LVar0, 0) - EVT_THREAD - EVT_LOOP(5) - EVT_SUBF(LVar0, LVar1) - EVT_CALL(TranslateGroup, LVar3, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(5) - EVT_ADDF(LVar0, LVar1) - EVT_CALL(TranslateGroup, LVar3, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(5) - EVT_ADDF(LVar0, LVar1) - EVT_CALL(TranslateGroup, LVar3, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(5) - EVT_SUBF(LVar0, LVar1) - EVT_CALL(TranslateGroup, LVar3, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_IF_LT(LVar2, 8) - EVT_ADDF(LVar1, EVT_FLOAT(0.5)) - EVT_ELSE - EVT_SUBF(LVar1, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_ADD(LVar2, 1) - EVT_WAIT(3) - EVT_END_LOOP - EVT_RETURN - EVT_END + UseBuf(Ref(N(BridgeModels))) + SetF(LVar1, Float(1.0)) + Set(LVar2, 1) + Loop(ARRAY_COUNT(N(BridgeModels))) + BufRead1(LVar3) + SetF(LVar0, 0) + Thread + Loop(5) + SubF(LVar0, LVar1) + Call(TranslateGroup, LVar3, 0, LVar0, 0) + Wait(1) + EndLoop + Loop(5) + AddF(LVar0, LVar1) + Call(TranslateGroup, LVar3, 0, LVar0, 0) + Wait(1) + EndLoop + Loop(5) + AddF(LVar0, LVar1) + Call(TranslateGroup, LVar3, 0, LVar0, 0) + Wait(1) + EndLoop + Loop(5) + SubF(LVar0, LVar1) + Call(TranslateGroup, LVar3, 0, LVar0, 0) + Wait(1) + EndLoop + EndThread + IfLt(LVar2, 8) + AddF(LVar1, Float(0.5)) + Else + SubF(LVar1, Float(0.5)) + EndIf + Add(LVar2, 1) + Wait(3) + EndLoop + Return + End }; EvtScript N(EVS_AnimateBridgeCollapsing) = { - EVT_LOOP(4) - EVT_EXEC(N(EVS_WaveBridgeModels)) - EVT_WAIT(25) - EVT_END_LOOP - EVT_THREAD - EVT_WAIT(15) - EVT_SET(MV_Unk_0A, 11) - EVT_END_THREAD - EVT_USE_BUF(EVT_PTR(N(BridgeModels))) - EVT_SET(LVar2, 35) - EVT_SET(LVar5, -15) - EVT_LOOP(ARRAY_COUNT(N(BridgeModels))) - EVT_CALL(PlaySoundAt, SOUND_SEQ_FINALE_BRIDGE_COLLAPSE, SOUND_SPACE_DEFAULT, LVar5, 0, 0) - EVT_ADD(LVar5, -30) - EVT_BUF_READ1(LVar3) - EVT_THREAD - EVT_CALL(MakeLerp, 0, -25, 5, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, LVar3, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(LVar4, 0) - EVT_CALL(MakeLerp, -25, -1000, LVar2, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, LVar3, 0, LVar0, 0) - EVT_ADD(LVar4, -20) - EVT_CALL(RotateGroup, LVar3, LVar4, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(EnableGroup, LVar3, FALSE) - EVT_END_THREAD - EVT_ADD(LVar2, 2) - EVT_WAIT(5) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(4) + Exec(N(EVS_WaveBridgeModels)) + Wait(25) + EndLoop + Thread + Wait(15) + Set(MV_Unk_0A, 11) + EndThread + UseBuf(Ref(N(BridgeModels))) + Set(LVar2, 35) + Set(LVar5, -15) + Loop(ARRAY_COUNT(N(BridgeModels))) + Call(PlaySoundAt, SOUND_SEQ_FINALE_BRIDGE_COLLAPSE, SOUND_SPACE_DEFAULT, LVar5, 0, 0) + Add(LVar5, -30) + BufRead1(LVar3) + Thread + Call(MakeLerp, 0, -25, 5, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, LVar3, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Set(LVar4, 0) + Call(MakeLerp, -25, -1000, LVar2, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, LVar3, 0, LVar0, 0) + Add(LVar4, -20) + Call(RotateGroup, LVar3, LVar4, 0, 0, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(EnableGroup, LVar3, FALSE) + EndThread + Add(LVar2, 2) + Wait(5) + EndLoop + Return + End }; Vec3i N(PowerUpBoltOrigins1)[] = { @@ -290,177 +290,177 @@ Vec3i N(PowerUpBoltOrigins2)[] = { }; EvtScript N(EVS_Scene_ActivateMachine) = { - EVT_SET(AF_KKJ_1A, FALSE) - EVT_WAIT(10) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -150, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -150, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 1000) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(12.0), EVT_FLOAT(-5.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -480, -480) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, 480) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_THREAD - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_WAIT(30) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Shocked) - EVT_END_THREAD - EVT_SET(MV_Unk_0A, 10) - EVT_EXEC_WAIT(N(EVS_AnimateBridgeCollapsing)) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetPlayerPos, 100, 0, 0) - EVT_CALL(PartnerIsFlying, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_CALL(SetNpcPos, NPC_PARTNER, 60, 10, 0) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_PARTNER, 60, 0, 0) - EVT_END_IF - EVT_CALL(SetNpcYaw, NPC_PARTNER, 90) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(SetNpcPos, NPC_PARTNER, 70, 0, 0) - EVT_CALL(GetNpcPos, NPC_Bowser_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 330) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Bowser_01, ANIM_WorldBowser_RearUpLaugh, ANIM_WorldBowser_RearUpLaugh, 0, MSG_CH8_007E) - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Peach_01, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_Peach_01, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Peach_01, LVar0, LVar1, LVar2, 12) - EVT_WAIT(8) - EVT_CALL(GetNpcPos, NPC_Peach_01, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Peach_01, LVar0, LVar1, LVar2, 7) - EVT_WAIT(10) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Peach_01, ANIM_Peach3_TiedShout, ANIM_Peach2_TiedIdle, 0, MSG_CH8_007F) - EVT_WAIT(15) - EVT_CALL(SpeakToPlayer, NPC_Kammy_01, ANIM_BattleKammy_Anim06, ANIM_BattleKammy_Anim04, 512, MSG_CH8_0080) - EVT_WAIT(15) - EVT_CALL(GetNpcPos, NPC_Kammy_01, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-8.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcAnimation, NPC_Bowser_01, ANIM_WorldBowser_Idle) - EVT_WAIT(10) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(InterpNpcYaw, NPC_Peach_01, 90, 0) - EVT_WAIT(30) - EVT_CALL(InterpNpcYaw, NPC_Peach_01, 270, 0) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_Kammy_01, ANIM_BattleKammy_Anim07) - EVT_CALL(SpeakToPlayer, NPC_Kammy_01, ANIM_BattleKammy_Anim07, ANIM_BattleKammy_Anim07, 512, MSG_CH8_0081) - EVT_CALL(FadeOutMusic, 0, 1500) - EVT_CALL(SetNpcAnimation, NPC_Kammy_01, ANIM_BattleKammy_Anim08) - EVT_CALL(GetNpcPos, NPC_Kammy_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -30) - EVT_CALL(PlaySoundAt, SOUND_KAMMY_SUMMON_MAGIC, SOUND_SPACE_DEFAULT, LVar0, 22, 0) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, 22, 0, 1, 80) - EVT_THREAD - EVT_WAIT(80) - EVT_CALL(SetNpcAnimation, NPC_Kammy_01, ANIM_BattleKammy_Anim04) - EVT_END_THREAD - EVT_WAIT(40) - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(4.0), 300, 0, 0, 1100, EVT_FLOAT(7.0), EVT_FLOAT(0.0)) - EVT_WAIT(20) - EVT_CALL(SetMusicTrack, 0, SONG_BOWSER_BATTLE, 0, 8) - EVT_EXEC(N(EVS_ArenaEyesFlash)) - EVT_WAIT(30) - EVT_SET(MV_ArenaState, ARENA_STATE_ACTIVATING) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_NE(MV_ArenaState, ARENA_STATE_ACTIVATING) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(GetNpcPos, NPC_Bowser_01, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 400) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcAnimation, NPC_Bowser_01, ANIM_WorldBowser_Shock) - EVT_CALL(GetNpcPos, NPC_Bowser_01, LVar3, LVar4, LVar5) - EVT_THREAD - EVT_USE_BUF(EVT_PTR(N(PowerUpBoltOrigins1))) - EVT_LOOP(ARRAY_COUNT(N(PowerUpBoltOrigins1))) - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 1, 8) - EVT_WAIT(8) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_USE_BUF(EVT_PTR(N(PowerUpBoltOrigins2))) - EVT_LOOP(ARRAY_COUNT(N(PowerUpBoltOrigins2))) - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 1, 8) - EVT_WAIT(12) - EVT_END_LOOP - EVT_CALL(SetNpcDecoration, NPC_Bowser_01, 0, NPC_DECORATION_BOWSER_AURA) - EVT_END_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySoundAtNpc, NPC_Bowser_01, SOUND_KPA_BOWSER_POWER_UP, SOUND_SPACE_DEFAULT) - EVT_SETF(LVar0, EVT_FLOAT(1.0)) - EVT_LOOP(50) - EVT_ADDF(LVar0, EVT_FLOAT(0.01)) - EVT_CALL(SetNpcScale, NPC_Bowser_01, LVar0, LVar0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_Bowser_01, ANIM_WorldBowser_RearUpLaugh) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_Bowser_01, ANIM_WorldBowser_Idle) - EVT_CALL(SpeakToPlayer, NPC_Bowser_01, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_CH8_0082) - EVT_WAIT(40) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_BeforeJump) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 500) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_WAIT(8) - EVT_LOOP(4) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 4, EVT_FLOAT(2.0)) - EVT_WAIT(3) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 2, EVT_FLOAT(1.0)) - EVT_WAIT(3) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_Bowser_01, ANIM_WorldBowser_Walk) - EVT_CALL(NpcMoveTo, NPC_Bowser_01, 200, 0, 45) - EVT_CALL(SetNpcAnimation, NPC_Bowser_01, ANIM_WorldBowser_Idle) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Bowser_01, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_CH8_0083) - EVT_WAIT(10) - EVT_CALL(SetNpcVar, NPC_Bowser_01, 0, 1) - EVT_RETURN - EVT_END + Set(AF_KKJ_1A, FALSE) + Wait(10) + Call(UseSettingsFrom, CAM_DEFAULT, -150, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, -150, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, 1000) + Call(SetCamPitch, CAM_DEFAULT, Float(12.0), Float(-5.0)) + Call(SetCamPosA, CAM_DEFAULT, -480, -480) + Call(SetCamPosB, CAM_DEFAULT, 0, 480) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Thread + Call(InterpPlayerYaw, 270, 0) + Wait(30) + Call(SetPlayerAnimation, ANIM_MarioW2_Shocked) + EndThread + Set(MV_Unk_0A, 10) + ExecWait(N(EVS_AnimateBridgeCollapsing)) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetPlayerPos, 100, 0, 0) + Call(PartnerIsFlying, LVar0) + IfEq(LVar0, FALSE) + Call(SetNpcPos, NPC_PARTNER, 60, 10, 0) + Else + Call(SetNpcPos, NPC_PARTNER, 60, 0, 0) + EndIf + Call(SetNpcYaw, NPC_PARTNER, 90) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(SetNpcPos, NPC_PARTNER, 70, 0, 0) + Call(GetNpcPos, NPC_Bowser_01, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 330) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-11.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(10) + Call(SpeakToPlayer, NPC_Bowser_01, ANIM_WorldBowser_RearUpLaugh, ANIM_WorldBowser_RearUpLaugh, 0, MSG_CH8_007E) + Thread + Call(SetNpcJumpscale, NPC_Peach_01, Float(1.0)) + Call(GetNpcPos, NPC_Peach_01, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Peach_01, LVar0, LVar1, LVar2, 12) + Wait(8) + Call(GetNpcPos, NPC_Peach_01, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Peach_01, LVar0, LVar1, LVar2, 7) + Wait(10) + EndThread + Call(SpeakToPlayer, NPC_Peach_01, ANIM_Peach3_TiedShout, ANIM_Peach2_TiedIdle, 0, MSG_CH8_007F) + Wait(15) + Call(SpeakToPlayer, NPC_Kammy_01, ANIM_BattleKammy_Anim06, ANIM_BattleKammy_Anim04, 512, MSG_CH8_0080) + Wait(15) + Call(GetNpcPos, NPC_Kammy_01, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 250) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-8.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetNpcAnimation, NPC_Bowser_01, ANIM_WorldBowser_Idle) + Wait(10) + Thread + Wait(10) + Call(InterpNpcYaw, NPC_Peach_01, 90, 0) + Wait(30) + Call(InterpNpcYaw, NPC_Peach_01, 270, 0) + EndThread + Call(SetNpcAnimation, NPC_Kammy_01, ANIM_BattleKammy_Anim07) + Call(SpeakToPlayer, NPC_Kammy_01, ANIM_BattleKammy_Anim07, ANIM_BattleKammy_Anim07, 512, MSG_CH8_0081) + Call(FadeOutMusic, 0, 1500) + Call(SetNpcAnimation, NPC_Kammy_01, ANIM_BattleKammy_Anim08) + Call(GetNpcPos, NPC_Kammy_01, LVar0, LVar1, LVar2) + Add(LVar0, -30) + Call(PlaySoundAt, SOUND_KAMMY_SUMMON_MAGIC, SOUND_SPACE_DEFAULT, LVar0, 22, 0) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, 22, 0, 1, 80) + Thread + Wait(80) + Call(SetNpcAnimation, NPC_Kammy_01, ANIM_BattleKammy_Anim04) + EndThread + Wait(40) + Call(SetCamProperties, CAM_DEFAULT, Float(4.0), 300, 0, 0, 1100, Float(7.0), Float(0.0)) + Wait(20) + Call(SetMusicTrack, 0, SONG_BOWSER_BATTLE, 0, 8) + Exec(N(EVS_ArenaEyesFlash)) + Wait(30) + Set(MV_ArenaState, ARENA_STATE_ACTIVATING) + Loop(0) + Wait(1) + IfNe(MV_ArenaState, ARENA_STATE_ACTIVATING) + BreakLoop + EndIf + EndLoop + Call(GetNpcPos, NPC_Bowser_01, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 400) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-10.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetNpcAnimation, NPC_Bowser_01, ANIM_WorldBowser_Shock) + Call(GetNpcPos, NPC_Bowser_01, LVar3, LVar4, LVar5) + Thread + UseBuf(Ref(N(PowerUpBoltOrigins1))) + Loop(ARRAY_COUNT(N(PowerUpBoltOrigins1))) + BufRead3(LVar0, LVar1, LVar2) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 1, 8) + Wait(8) + EndLoop + EndThread + Thread + UseBuf(Ref(N(PowerUpBoltOrigins2))) + Loop(ARRAY_COUNT(N(PowerUpBoltOrigins2))) + BufRead3(LVar0, LVar1, LVar2) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 1, 8) + Wait(12) + EndLoop + Call(SetNpcDecoration, NPC_Bowser_01, 0, NPC_DECORATION_BOWSER_AURA) + EndThread + Wait(15) + Call(PlaySoundAtNpc, NPC_Bowser_01, SOUND_KPA_BOWSER_POWER_UP, SOUND_SPACE_DEFAULT) + SetF(LVar0, Float(1.0)) + Loop(50) + AddF(LVar0, Float(0.01)) + Call(SetNpcScale, NPC_Bowser_01, LVar0, LVar0, LVar0) + Wait(1) + EndLoop + Call(SetNpcAnimation, NPC_Bowser_01, ANIM_WorldBowser_RearUpLaugh) + Wait(20) + Call(SetNpcAnimation, NPC_Bowser_01, ANIM_WorldBowser_Idle) + Call(SpeakToPlayer, NPC_Bowser_01, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_CH8_0082) + Wait(40) + Call(SetPlayerAnimation, ANIM_Mario1_BeforeJump) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 500) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-11.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Wait(8) + Loop(4) + Call(ShakeCam, CAM_DEFAULT, 0, 4, Float(2.0)) + Wait(3) + Call(ShakeCam, CAM_DEFAULT, 0, 2, Float(1.0)) + Wait(3) + EndLoop + EndThread + Call(SetNpcAnimation, NPC_Bowser_01, ANIM_WorldBowser_Walk) + Call(NpcMoveTo, NPC_Bowser_01, 200, 0, 45) + Call(SetNpcAnimation, NPC_Bowser_01, ANIM_WorldBowser_Idle) + Wait(10) + Call(SpeakToPlayer, NPC_Bowser_01, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_CH8_0083) + Wait(10) + Call(SetNpcVar, NPC_Bowser_01, 0, 1) + Return + End }; Vec3i N(CirculatingBoltPositions)[] = { - { EVT_FLOAT(625.825), EVT_FLOAT(-9.194), EVT_FLOAT(-91.893) }, { EVT_FLOAT(609.671), EVT_FLOAT(-9.194), EVT_FLOAT(136.274) }, - { EVT_FLOAT(609.671), EVT_FLOAT(-9.194), EVT_FLOAT(136.274) }, { EVT_FLOAT(450.634), EVT_FLOAT(-9.194), EVT_FLOAT(300.677) }, - { EVT_FLOAT(450.634), EVT_FLOAT(-9.194), EVT_FLOAT(300.677) }, { EVT_FLOAT(223.128), EVT_FLOAT(-9.194), EVT_FLOAT(324.39) }, - { EVT_FLOAT(223.128), EVT_FLOAT(-9.194), EVT_FLOAT(324.39) }, { EVT_FLOAT(33.606), EVT_FLOAT(-9.194), EVT_FLOAT(196.317) }, - { EVT_FLOAT(33.606), EVT_FLOAT(-9.194), EVT_FLOAT(196.317) }, { EVT_FLOAT(-29.252), EVT_FLOAT(-9.194), EVT_FLOAT(-23.615) }, - { EVT_FLOAT(-29.252), EVT_FLOAT(-9.194), EVT_FLOAT(-23.615) }, { EVT_FLOAT(63.964), EVT_FLOAT(-9.194), EVT_FLOAT(-232.497) }, - { EVT_FLOAT(63.964), EVT_FLOAT(-9.194), EVT_FLOAT(-232.497) }, { EVT_FLOAT(269.64), EVT_FLOAT(-9.194), EVT_FLOAT(-332.591) }, - { EVT_FLOAT(269.64), EVT_FLOAT(-9.194), EVT_FLOAT(-332.591) }, { EVT_FLOAT(491.536), EVT_FLOAT(-9.194), EVT_FLOAT(-277.063) }, - { EVT_FLOAT(491.536), EVT_FLOAT(-9.194), EVT_FLOAT(-277.063) }, { EVT_FLOAT(625.825), EVT_FLOAT(-9.194), EVT_FLOAT(-91.893) }, + { Float(625.825), Float(-9.194), Float(-91.893) }, { Float(609.671), Float(-9.194), Float(136.274) }, + { Float(609.671), Float(-9.194), Float(136.274) }, { Float(450.634), Float(-9.194), Float(300.677) }, + { Float(450.634), Float(-9.194), Float(300.677) }, { Float(223.128), Float(-9.194), Float(324.39) }, + { Float(223.128), Float(-9.194), Float(324.39) }, { Float(33.606), Float(-9.194), Float(196.317) }, + { Float(33.606), Float(-9.194), Float(196.317) }, { Float(-29.252), Float(-9.194), Float(-23.615) }, + { Float(-29.252), Float(-9.194), Float(-23.615) }, { Float(63.964), Float(-9.194), Float(-232.497) }, + { Float(63.964), Float(-9.194), Float(-232.497) }, { Float(269.64), Float(-9.194), Float(-332.591) }, + { Float(269.64), Float(-9.194), Float(-332.591) }, { Float(491.536), Float(-9.194), Float(-277.063) }, + { Float(491.536), Float(-9.194), Float(-277.063) }, { Float(625.825), Float(-9.194), Float(-91.893) }, }; Vec3i N(RandomBoltPositions)[] = { @@ -475,143 +475,143 @@ Vec3i N(RandomBoltPositions)[] = { }; EvtScript N(EVS_ManageArenaEffects) = { - EVT_CHILD_THREAD - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 0) - EVT_IF_EQ(GF_KKJ25_Defeated_Kammy, FALSE) - EVT_THREAD - EVT_WAIT(50) - EVT_CALL(PlaySound, SOUND_LRAW_KPA_ARENA_TURN_ON) - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, 50, 120, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIV(LVar0, 10) - EVT_SUB(LVar2, LVar0) - EVT_CALL(RotateGroup, MODEL_g31, LVar2, 0, 1, 0) - EVT_ADD(LVar3, LVar0) - EVT_CALL(RotateGroup, MODEL_g7, LVar3, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_ELSE - EVT_IF_EQ(GF_KKJ25_Defeated_Bowser, FALSE) - EVT_CALL(PlaySound, SOUND_LRAW_KPA_ARENA_ACTIVE) - EVT_END_IF - EVT_SET(LVar0, 5) - EVT_END_IF - EVT_LOOP(0) - EVT_ADDF(LVar2, LVar0) - EVT_IF_GT(LVar2, 360) - EVT_SUBF(LVar2, 360) - EVT_END_IF - EVT_CALL(RotateGroup, MODEL_g31, LVar2, 0, 1, 0) - EVT_SUBF(LVar3, LVar0) - EVT_IF_LT(LVar3, -360) - EVT_ADDF(LVar3, 360) - EVT_END_IF - EVT_CALL(RotateGroup, MODEL_g7, LVar3, 0, 1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_WAIT(45) - EVT_CHILD_THREAD - EVT_LOOP(0) - EVT_USE_BUF(EVT_PTR(N(CirculatingBoltPositions))) - EVT_LOOP(ARRAY_COUNT(N(CirculatingBoltPositions)) / 2) - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_BUF_READ3(LVar3, LVar4, LVar5) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 1, 5) - EVT_CALL(N(SetLightningBoltPurple)) - EVT_WAIT(5) - EVT_END_LOOP - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_LOOP(0) - EVT_USE_BUF(EVT_PTR(N(RandomBoltPositions))) - EVT_CALL(RandInt, 7, LVar6) - EVT_ADD(LVar6, 1) - EVT_LOOP(LVar6) - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_BUF_READ3(LVar3, LVar4, LVar5) - EVT_END_LOOP - EVT_IF_NE(MV_ArenaState, ARENA_STATE_OVERLOADING) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 1, 10) - EVT_CALL(N(SetLightningBoltPurple)) - EVT_WAIT(30) - EVT_ELSE - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 1, 5) - EVT_CALL(N(SetLightningBoltPurple)) - EVT_WAIT(15) - EVT_END_IF - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 20) - EVT_IF_GE(LVar0, 360) - EVT_SUB(LVar0, 360) - EVT_END_IF - EVT_CALL(RotateGroup, MODEL_g51, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_IF_EQ(GF_KKJ25_Defeated_Kammy, FALSE) - EVT_CALL(EnableModel, MODEL_o122, TRUE) - EVT_CALL(MakeLerp, 0, 250, 100, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(ScaleModel, MODEL_o122, LVar0, 1, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_LOOP(0) - EVT_IF_NE(MV_ArenaState, ARENA_STATE_OVERLOADING) - EVT_SET(LVar2, 250) - EVT_ELSE - EVT_SET(LVar2, 90) - EVT_END_IF - EVT_CALL(MakeLerp, LVar2, 90, 45, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(ScaleModel, MODEL_o122, LVar0, 1, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LOOP(15) - EVT_CALL(ScaleModel, MODEL_o122, LVar0, 1, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(MakeLerp, 90, LVar2, 30, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(ScaleModel, MODEL_o122, LVar0, 1, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_WAIT(180) - EVT_SET(MV_ArenaState, ARENA_STATE_FULL_POWER) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_EQ(MV_ArenaState, ARENA_STATE_BROKEN) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(StopSound, SOUND_LRAW_KPA_ARENA_ACTIVE) - EVT_RETURN - EVT_END + ChildThread + Set(LVar2, 0) + Set(LVar3, 0) + IfEq(GF_KKJ25_Defeated_Kammy, FALSE) + Thread + Wait(50) + Call(PlaySound, SOUND_LRAW_KPA_ARENA_TURN_ON) + EndThread + Call(MakeLerp, 0, 50, 120, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Div(LVar0, 10) + Sub(LVar2, LVar0) + Call(RotateGroup, MODEL_g31, LVar2, 0, 1, 0) + Add(LVar3, LVar0) + Call(RotateGroup, MODEL_g7, LVar3, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Else + IfEq(GF_KKJ25_Defeated_Bowser, FALSE) + Call(PlaySound, SOUND_LRAW_KPA_ARENA_ACTIVE) + EndIf + Set(LVar0, 5) + EndIf + Loop(0) + AddF(LVar2, LVar0) + IfGt(LVar2, 360) + SubF(LVar2, 360) + EndIf + Call(RotateGroup, MODEL_g31, LVar2, 0, 1, 0) + SubF(LVar3, LVar0) + IfLt(LVar3, -360) + AddF(LVar3, 360) + EndIf + Call(RotateGroup, MODEL_g7, LVar3, 0, 1, 0) + Wait(1) + EndLoop + EndChildThread + Wait(45) + ChildThread + Loop(0) + UseBuf(Ref(N(CirculatingBoltPositions))) + Loop(ARRAY_COUNT(N(CirculatingBoltPositions)) / 2) + BufRead3(LVar0, LVar1, LVar2) + BufRead3(LVar3, LVar4, LVar5) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 1, 5) + Call(N(SetLightningBoltPurple)) + Wait(5) + EndLoop + EndLoop + EndChildThread + ChildThread + Loop(0) + UseBuf(Ref(N(RandomBoltPositions))) + Call(RandInt, 7, LVar6) + Add(LVar6, 1) + Loop(LVar6) + BufRead3(LVar0, LVar1, LVar2) + BufRead3(LVar3, LVar4, LVar5) + EndLoop + IfNe(MV_ArenaState, ARENA_STATE_OVERLOADING) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 1, 10) + Call(N(SetLightningBoltPurple)) + Wait(30) + Else + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 1, 5) + Call(N(SetLightningBoltPurple)) + Wait(15) + EndIf + EndLoop + EndChildThread + ChildThread + Set(LVar0, 0) + Loop(0) + Add(LVar0, 20) + IfGe(LVar0, 360) + Sub(LVar0, 360) + EndIf + Call(RotateGroup, MODEL_g51, LVar0, 0, 1, 0) + Wait(1) + EndLoop + EndChildThread + ChildThread + IfEq(GF_KKJ25_Defeated_Kammy, FALSE) + Call(EnableModel, MODEL_o122, TRUE) + Call(MakeLerp, 0, 250, 100, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(ScaleModel, MODEL_o122, LVar0, 1, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndIf + Loop(0) + IfNe(MV_ArenaState, ARENA_STATE_OVERLOADING) + Set(LVar2, 250) + Else + Set(LVar2, 90) + EndIf + Call(MakeLerp, LVar2, 90, 45, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(ScaleModel, MODEL_o122, LVar0, 1, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Loop(15) + Call(ScaleModel, MODEL_o122, LVar0, 1, LVar0) + Wait(1) + EndLoop + Call(MakeLerp, 90, LVar2, 30, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(ScaleModel, MODEL_o122, LVar0, 1, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + EndChildThread + Wait(180) + Set(MV_ArenaState, ARENA_STATE_FULL_POWER) + Loop(0) + Wait(1) + IfEq(MV_ArenaState, ARENA_STATE_BROKEN) + BreakLoop + EndIf + EndLoop + Call(StopSound, SOUND_LRAW_KPA_ARENA_ACTIVE) + Return + End }; diff --git a/src/world/area_kkj/kkj_25/kkj_25_6_peach_free.c b/src/world/area_kkj/kkj_25/kkj_25_6_peach_free.c index 3598cd0ab96..e5492999c89 100644 --- a/src/world/area_kkj/kkj_25/kkj_25_6_peach_free.c +++ b/src/world/area_kkj/kkj_25/kkj_25_6_peach_free.c @@ -42,197 +42,197 @@ Vec3f N(TwinkArrivePath)[] = { }; EvtScript N(EVS_SpawnBowserStarEnergyWaves) = { - EVT_CALL(GetNpcPos, LVar8, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, EVT_FLOAT(54.0)) - EVT_PLAY_EFFECT(EFFECT_ENERGY_IN_OUT, 4, LVar0, LVar1, LVar2, EVT_FLOAT(1.5), -1) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcPos, LVar8, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, EVT_FLOAT(54.0)) - EVT_CALL(N(SetEnergyWaveOrigin), LVarF, LVar0, LVar1, LVar2) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(GetNpcPos, LVar8, LVar0, LVar1, LVar2) + Add(LVar1, Float(54.0)) + PlayEffect(EFFECT_ENERGY_IN_OUT, 4, LVar0, LVar1, LVar2, Float(1.5), -1) + Loop(0) + Wait(1) + Call(GetNpcPos, LVar8, LVar0, LVar1, LVar2) + Add(LVar1, Float(54.0)) + Call(N(SetEnergyWaveOrigin), LVarF, LVar0, LVar1, LVar2) + EndLoop + Return + End }; EvtScript N(EVS_Scene_PeachBreaksFree) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_BeforeJump) - EVT_CALL(SetPlayerPos, 100, 0, 0) - EVT_CALL(PartnerIsFlying, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_CALL(SetNpcPos, NPC_PARTNER, 60, 10, 0) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_PARTNER, 60, 0, 0) - EVT_END_IF - EVT_CALL(SetNpcYaw, NPC_PARTNER, 90) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(SetNpcPos, NPC_Bowser_01, 200, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_Bowser_01, ANIM_WorldBowser_Idle) - EVT_CALL(SetNpcPos, NPC_Peach_01, 475, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_Peach_01, ANIM_Peach2_TiedIdle) - EVT_CALL(SetNpcPos, NPC_Kammy_01, 550, 10, -50) - EVT_CALL(SetNpcAnimation, NPC_Kammy_01, ANIM_BattleKammy_Anim04) - EVT_CALL(SetNpcDecoration, NPC_Bowser_01, 0, NPC_DECORATION_BOWSER_AURA) - EVT_CALL(SetNpcDecoration, NPC_Bowser_01, 1, NPC_DECORATION_CHARGED) - EVT_SET(LVar8, NPC_Bowser_01) - EVT_EXEC(N(EVS_SpawnBowserStarEnergyWaves)) - EVT_CALL(SetCamType, CAM_DEFAULT, 0, FALSE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 400) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 30) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, 20) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(30) - EVT_CALL(GetNpcPos, NPC_Peach_01, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(15) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-9.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Peach_01, ANIM_Peach3_TiedShout, ANIM_Peach2_TiedIdle, 0, MSG_CH8_008E) - EVT_WAIT(10) - EVT_CALL(GetNpcPos, NPC_Peach_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(NpcMoveTo, NPC_Kammy_01, 520, -50, 15) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(InterpNpcYaw, NPC_Peach_01, 90, 0) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_Kammy_01, ANIM_BattleKammy_Anim0B) - EVT_CALL(SpeakToPlayer, NPC_Kammy_01, ANIM_BattleKammy_Anim07, ANIM_BattleKammy_Anim0B, 0, MSG_CH8_008F) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Twink_01, ANIM_Twink_Sad) - EVT_CALL(SetNpcPos, NPC_Twink_01, 850, 400, 0) - EVT_CALL(SetNpcJumpscale, NPC_Twink_01, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump0, NPC_Twink_01, 530, 45, -50, 30) - EVT_CALL(PlaySoundAtNpc, NPC_Kammy_01, SOUND_HIT_NORMAL, SOUND_SPACE_DEFAULT) - EVT_PLAY_EFFECT(EFFECT_DAMAGE_STARS, FX_DAMAGE_STARS_3, 530, 45, -50, -1, -1, 0, 3) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Kammy_01, ANIM_BattleKammy_Anim0C) - EVT_CALL(SetNpcPos, NPC_Kammy_02, 530, 15, -50) - EVT_CALL(SetNpcJumpscale, NPC_Kammy_01, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump1, NPC_Kammy_01, 540, 10, -50, 30) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Kammy_02, EVT_FLOAT(0.4)) - EVT_CALL(NpcJump0, NPC_Kammy_02, 545, 0, -30, 25) - EVT_CALL(GetNpcPos, NPC_Kammy_02, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 30) - EVT_SET(LVar3, 20) - EVT_SET(LVar4, 3) - EVT_CALL(N(SpawnStarsOrbitingKammy1)) - EVT_SET(MV_OrbitingEffectAIdx, LVar0) - EVT_CALL(PlaySound, SOUND_KNOCKOUT_CHIRPING) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, NPC_Kammy_02, ANIM_BattleKammy_Anim03) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Twink_01, EVT_FLOAT(0.5)) - EVT_CALL(NpcJump0, NPC_Twink_01, 445, 60, 0, 30) - EVT_CALL(InterpNpcYaw, NPC_Twink_01, 90, 0) - EVT_END_THREAD - EVT_WAIT(50) - EVT_CALL(LoadPath, 30, EVT_PTR(N(TwinkArrivePath)), ARRAY_COUNT(N(TwinkArrivePath)), EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Twink_01, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_Twink_01, ANIM_Twink_Idle) - EVT_CALL(InterpNpcYaw, NPC_Twink_01, 270, 0) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Twink_01, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_CH8_0090) - EVT_WAIT(10) - EVT_CALL(SetNpcJumpscale, NPC_Twink_01, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump0, NPC_Twink_01, 490, 18, 0, 20) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Twink_01, ANIM_Twink_Back) - EVT_CALL(GetNpcPos, NPC_Peach_01, LVar3, LVar4, LVar5) - EVT_ADD(LVar4, 20) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Twink_01, LVar0, LVar1, LVar2) - EVT_LOOP(2) - EVT_LOOP(6) - EVT_ADD(LVar1, -1) - EVT_CALL(SetNpcPos, NPC_Twink_01, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, LVar3, LVar4, LVar5, 0) - EVT_WAIT(3) - EVT_LOOP(6) - EVT_ADD(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_Twink_01, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, LVar3, LVar4, LVar5, 0) - EVT_WAIT(3) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Peach_01, ANIM_Peach3_TiedTalk, ANIM_Peach3_TiedLaugh, 5, MSG_CH8_0091) - EVT_CALL(SetNpcAnimation, NPC_Peach_01, ANIM_Peach3_TiedLaugh) - EVT_SET(LVar2, 12) - EVT_LOOP(4) - EVT_CALL(MakeLerp, 90, 450, LVar2, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_ADD(LVar0, 90) - EVT_IF_GT(LVar0, 359) - EVT_SUB(LVar0, 360) - EVT_END_IF - EVT_CALL(InterpNpcYaw, NPC_Peach_01, LVar0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, LVar3, LVar4, LVar5, 0) - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_Peach_01, ANIM_Peach1_Idle) - EVT_CALL(SetNpcAnimation, NPC_Twink_01, ANIM_Twink_Idle) - EVT_WAIT(20) - EVT_SET(LVar0, MV_OrbitingEffectAIdx) - EVT_CALL(N(DismissStarsOrbitingKammy1)) - EVT_CALL(SetNpcAnimation, NPC_Kammy_02, ANIM_BattleKammy_Anim00) - EVT_WAIT(5) - EVT_CALL(InterpNpcYaw, NPC_Twink_01, 90, 0) - EVT_CALL(NpcFaceNpc, NPC_Kammy_02, NPC_Kammy_01, 0) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Twink_01, ANIM_Twink_Sad) - EVT_CALL(SetNpcAnimation, NPC_Kammy_02, ANIM_BattleKammy_Anim02) - EVT_CALL(SetNpcJumpscale, NPC_Kammy_02, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_Kammy_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_SUB(LVar2, 5) - EVT_CALL(NpcJump0, NPC_Kammy_02, LVar0, LVar1, LVar2, 20) - EVT_CALL(SetNpcPos, NPC_Kammy_02, 300, -100, 0) - EVT_CALL(SetNpcAnimation, NPC_Kammy_01, ANIM_BattleKammy_Anim04) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Kammy_01, ANIM_BattleKammy_Anim06, ANIM_BattleKammy_Anim04, 0, MSG_CH8_0092) - EVT_WAIT(10) - EVT_CALL(SetNpcVar, NPC_Kammy_01, 0, 1) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(SetPlayerAnimation, ANIM_Mario1_BeforeJump) + Call(SetPlayerPos, 100, 0, 0) + Call(PartnerIsFlying, LVar0) + IfEq(LVar0, FALSE) + Call(SetNpcPos, NPC_PARTNER, 60, 10, 0) + Else + Call(SetNpcPos, NPC_PARTNER, 60, 0, 0) + EndIf + Call(SetNpcYaw, NPC_PARTNER, 90) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(SetNpcPos, NPC_Bowser_01, 200, 0, 0) + Call(SetNpcAnimation, NPC_Bowser_01, ANIM_WorldBowser_Idle) + Call(SetNpcPos, NPC_Peach_01, 475, 0, 0) + Call(SetNpcAnimation, NPC_Peach_01, ANIM_Peach2_TiedIdle) + Call(SetNpcPos, NPC_Kammy_01, 550, 10, -50) + Call(SetNpcAnimation, NPC_Kammy_01, ANIM_BattleKammy_Anim04) + Call(SetNpcDecoration, NPC_Bowser_01, 0, NPC_DECORATION_BOWSER_AURA) + Call(SetNpcDecoration, NPC_Bowser_01, 1, NPC_DECORATION_CHARGED) + Set(LVar8, NPC_Bowser_01) + Exec(N(EVS_SpawnBowserStarEnergyWaves)) + Call(SetCamType, CAM_DEFAULT, 0, FALSE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 400) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-10.0)) + Call(SetCamPosA, CAM_DEFAULT, 0, 30) + Call(SetCamPosB, CAM_DEFAULT, 0, 20) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(30) + Call(GetNpcPos, NPC_Peach_01, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(15) + Call(SetCamDistance, CAM_DEFAULT, 250) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-9.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10) + Call(SpeakToPlayer, NPC_Peach_01, ANIM_Peach3_TiedShout, ANIM_Peach2_TiedIdle, 0, MSG_CH8_008E) + Wait(10) + Call(GetNpcPos, NPC_Peach_01, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-9.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(NpcMoveTo, NPC_Kammy_01, 520, -50, 15) + Thread + Wait(10) + Call(InterpNpcYaw, NPC_Peach_01, 90, 0) + EndThread + Call(SetNpcAnimation, NPC_Kammy_01, ANIM_BattleKammy_Anim0B) + Call(SpeakToPlayer, NPC_Kammy_01, ANIM_BattleKammy_Anim07, ANIM_BattleKammy_Anim0B, 0, MSG_CH8_008F) + Wait(10) + Call(SetNpcAnimation, NPC_Twink_01, ANIM_Twink_Sad) + Call(SetNpcPos, NPC_Twink_01, 850, 400, 0) + Call(SetNpcJumpscale, NPC_Twink_01, Float(0.0)) + Call(NpcJump0, NPC_Twink_01, 530, 45, -50, 30) + Call(PlaySoundAtNpc, NPC_Kammy_01, SOUND_HIT_NORMAL, SOUND_SPACE_DEFAULT) + PlayEffect(EFFECT_DAMAGE_STARS, FX_DAMAGE_STARS_3, 530, 45, -50, -1, -1, 0, 3) + Thread + Call(SetNpcAnimation, NPC_Kammy_01, ANIM_BattleKammy_Anim0C) + Call(SetNpcPos, NPC_Kammy_02, 530, 15, -50) + Call(SetNpcJumpscale, NPC_Kammy_01, Float(0.0)) + Call(NpcJump1, NPC_Kammy_01, 540, 10, -50, 30) + EndThread + Thread + Call(SetNpcJumpscale, NPC_Kammy_02, Float(0.4)) + Call(NpcJump0, NPC_Kammy_02, 545, 0, -30, 25) + Call(GetNpcPos, NPC_Kammy_02, LVar0, LVar1, LVar2) + Add(LVar1, 30) + Set(LVar3, 20) + Set(LVar4, 3) + Call(N(SpawnStarsOrbitingKammy1)) + Set(MV_OrbitingEffectAIdx, LVar0) + Call(PlaySound, SOUND_KNOCKOUT_CHIRPING) + Wait(5) + Call(SetNpcAnimation, NPC_Kammy_02, ANIM_BattleKammy_Anim03) + EndThread + Thread + Call(SetNpcJumpscale, NPC_Twink_01, Float(0.5)) + Call(NpcJump0, NPC_Twink_01, 445, 60, 0, 30) + Call(InterpNpcYaw, NPC_Twink_01, 90, 0) + EndThread + Wait(50) + Call(LoadPath, 30, Ref(N(TwinkArrivePath)), ARRAY_COUNT(N(TwinkArrivePath)), EASING_QUADRATIC_IN) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Twink_01, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcAnimation, NPC_Twink_01, ANIM_Twink_Idle) + Call(InterpNpcYaw, NPC_Twink_01, 270, 0) + Wait(10) + Call(SpeakToPlayer, NPC_Twink_01, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_CH8_0090) + Wait(10) + Call(SetNpcJumpscale, NPC_Twink_01, Float(0.0)) + Call(NpcJump0, NPC_Twink_01, 490, 18, 0, 20) + Wait(10) + Call(SetNpcAnimation, NPC_Twink_01, ANIM_Twink_Back) + Call(GetNpcPos, NPC_Peach_01, LVar3, LVar4, LVar5) + Add(LVar4, 20) + Thread + Call(GetNpcPos, NPC_Twink_01, LVar0, LVar1, LVar2) + Loop(2) + Loop(6) + Add(LVar1, -1) + Call(SetNpcPos, NPC_Twink_01, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + PlayEffect(EFFECT_LANDING_DUST, 1, LVar3, LVar4, LVar5, 0) + Wait(3) + Loop(6) + Add(LVar1, 1) + Call(SetNpcPos, NPC_Twink_01, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + PlayEffect(EFFECT_LANDING_DUST, 1, LVar3, LVar4, LVar5, 0) + Wait(3) + EndLoop + EndThread + Call(SpeakToPlayer, NPC_Peach_01, ANIM_Peach3_TiedTalk, ANIM_Peach3_TiedLaugh, 5, MSG_CH8_0091) + Call(SetNpcAnimation, NPC_Peach_01, ANIM_Peach3_TiedLaugh) + Set(LVar2, 12) + Loop(4) + Call(MakeLerp, 90, 450, LVar2, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Add(LVar0, 90) + IfGt(LVar0, 359) + Sub(LVar0, 360) + EndIf + Call(InterpNpcYaw, NPC_Peach_01, LVar0, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Sub(LVar2, 2) + PlayEffect(EFFECT_LANDING_DUST, 1, LVar3, LVar4, LVar5, 0) + EndLoop + Call(SetNpcAnimation, NPC_Peach_01, ANIM_Peach1_Idle) + Call(SetNpcAnimation, NPC_Twink_01, ANIM_Twink_Idle) + Wait(20) + Set(LVar0, MV_OrbitingEffectAIdx) + Call(N(DismissStarsOrbitingKammy1)) + Call(SetNpcAnimation, NPC_Kammy_02, ANIM_BattleKammy_Anim00) + Wait(5) + Call(InterpNpcYaw, NPC_Twink_01, 90, 0) + Call(NpcFaceNpc, NPC_Kammy_02, NPC_Kammy_01, 0) + Wait(10) + Call(SetNpcAnimation, NPC_Twink_01, ANIM_Twink_Sad) + Call(SetNpcAnimation, NPC_Kammy_02, ANIM_BattleKammy_Anim02) + Call(SetNpcJumpscale, NPC_Kammy_02, Float(1.0)) + Call(GetNpcPos, NPC_Kammy_01, LVar0, LVar1, LVar2) + Add(LVar1, 10) + Sub(LVar2, 5) + Call(NpcJump0, NPC_Kammy_02, LVar0, LVar1, LVar2, 20) + Call(SetNpcPos, NPC_Kammy_02, 300, -100, 0) + Call(SetNpcAnimation, NPC_Kammy_01, ANIM_BattleKammy_Anim04) + Wait(10) + Call(SpeakToPlayer, NPC_Kammy_01, ANIM_BattleKammy_Anim06, ANIM_BattleKammy_Anim04, 0, MSG_CH8_0092) + Wait(10) + Call(SetNpcVar, NPC_Kammy_01, 0, 1) + Return + End }; diff --git a/src/world/area_kkj/kkj_25/kkj_25_7_kammy_defeated.c b/src/world/area_kkj/kkj_25/kkj_25_7_kammy_defeated.c index e1ec77ffd50..0128cade533 100644 --- a/src/world/area_kkj/kkj_25/kkj_25_7_kammy_defeated.c +++ b/src/world/area_kkj/kkj_25/kkj_25_7_kammy_defeated.c @@ -35,374 +35,374 @@ Vec3f N(TwinkStrikeBowserPath)[] = { }; EvtScript N(AddStarSpiritHovering) = { - EVT_LOOP(0) - EVT_LOOP(5) - EVT_CALL(GetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_ADD(LVar2, 1) - EVT_CALL(SetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_WAIT(2) - EVT_END_LOOP - EVT_LOOP(5) - EVT_CALL(GetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_ADD(LVar2, -1) - EVT_CALL(SetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_WAIT(2) - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Loop(5) + Call(GetNpcPos, LVar0, LVar1, LVar2, LVar3) + Add(LVar2, 1) + Call(SetNpcPos, LVar0, LVar1, LVar2, LVar3) + Wait(2) + EndLoop + Loop(5) + Call(GetNpcPos, LVar0, LVar1, LVar2, LVar3) + Add(LVar2, -1) + Call(SetNpcPos, LVar0, LVar1, LVar2, LVar3) + Wait(2) + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_Scene_KammyDefeated) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_BeforeJump) - EVT_CALL(SetPlayerPos, 100, 0, 0) - EVT_CALL(PartnerIsFlying, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_CALL(SetNpcPos, NPC_PARTNER, 60, 10, 0) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_PARTNER, 60, 0, 0) - EVT_END_IF - EVT_CALL(SetNpcYaw, NPC_PARTNER, 90) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(GetNpcPos, NPC_Peach_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-8.5)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(GetNpcPos, NPC_Kammy_04, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 30) - EVT_SET(LVar3, 20) - EVT_SET(LVar4, 3) - EVT_CALL(N(SpawnStarsOrbitingKammy2)) - EVT_SET(MV_OrbitingEffectBIdx, LVar0) - EVT_WAIT(20) - EVT_CALL(InterpNpcYaw, NPC_Peach_01, 90, 0) - EVT_WAIT(20) - EVT_CALL(InterpNpcYaw, NPC_Peach_01, 270, 0) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Peach_01, ANIM_Peach2_RaiseArms) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Peach_01, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_Peach_01, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_CH8_009C) - EVT_WAIT(10) - EVT_CALL(InterpNpcYaw, NPC_Peach_01, 90, 0) - EVT_CALL(SpeakToPlayer, NPC_Twink_01, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_CH8_009D) - EVT_WAIT(10) - EVT_CALL(StopSound, SOUND_LRAW_KPA_ARENA_ACTIVE) - EVT_CALL(SetMusicTrack, 0, SONG_PEACH_WISHES, 0, 8) - EVT_CALL(InterpNpcYaw, NPC_Peach_01, 270, 0) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Peach_01, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_CH8_009E) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Twink_01, ANIM_Twink_Talk, ANIM_Twink_Idle, 5, MSG_CH8_009F) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Peach_01, ANIM_Peach2_LowerArms) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Peach_01, ANIM_Peach3_Pray) - EVT_WAIT(10) - EVT_CALL(LoadPath, 20, EVT_PTR(N(TwinkStrikeBowserPath)), ARRAY_COUNT(N(TwinkStrikeBowserPath)), EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Twink_01, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_CALL(GetNpcPos, NPC_Peach_01, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 245) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.6)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_Peach_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_CALL(PlaySoundAt, SOUND_WISH_ASCENDING, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_STARS_SHIMMER, 5, LVar0, LVar1, LVar2, 40, 120, 45, 150) - EVT_WAIT(150) - EVT_CALL(SetNpcAnimation, NPC_Bowser_02, ANIM_WorldBowser_RearUpLaugh) - EVT_CALL(SetNpcDecoration, NPC_Bowser_02, 0, NPC_DECORATION_BOWSER_AURA) - EVT_CALL(SetNpcDecoration, NPC_Bowser_02, 1, NPC_DECORATION_CHARGED) - EVT_SET(LVar8, NPC_Bowser_02) - EVT_EXEC(N(EVS_SpawnBowserStarEnergyWaves)) - EVT_WAIT(5) - EVT_CALL(GetNpcPos, NPC_Bowser_02, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -50) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 400) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(16.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_SET(LVar0, MV_OrbitingEffectBIdx) - EVT_CALL(N(DismissStarsOrbitingKammy2)) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_Bowser_02, ANIM_WorldBowser_RearUpLaugh, ANIM_WorldBowser_RearUpLaugh, 0, MSG_CH8_00A0) - EVT_WAIT(10) - EVT_CALL(SetNpcPos, NPC_Twink_01, 500, 200, 0) - EVT_CALL(SetNpcJumpscale, NPC_Twink_01, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump0, NPC_Twink_01, 205, 90, 0, 20) - EVT_CALL(PlaySoundAtNpc, NPC_Twink_01, SOUND_HIT_NORMAL, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_Bowser_02, ANIM_WorldBowser_Shock) - EVT_PLAY_EFFECT(EFFECT_DAMAGE_STARS, FX_DAMAGE_STARS_3, 205, 90, 0, -1, -1, 0, 3) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 8, EVT_FLOAT(1.5)) - EVT_END_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Twink_01, EVT_FLOAT(0.3)) - EVT_CALL(NpcJump0, NPC_Twink_01, 195, 200, 0, 20) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Bowser_02, ANIM_WorldBowser_Idle) - EVT_CALL(InterpNpcYaw, NPC_Bowser_02, 90, 0) - EVT_WAIT(15) - EVT_CALL(InterpNpcYaw, NPC_Bowser_02, 270, 0) - EVT_WAIT(15) - EVT_CALL(InterpNpcYaw, NPC_Bowser_02, 90, 0) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_Bowser_02, ANIM_WorldBowser_Walk) - EVT_CALL(GetNpcPos, NPC_Bowser_02, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_CALL(NpcMoveTo, NPC_Bowser_02, LVar0, LVar2, 50) - EVT_CALL(SetNpcAnimation, NPC_Bowser_02, ANIM_WorldBowser_Idle) - EVT_END_THREAD - EVT_WAIT(15) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(2.0), 0, 300, EVT_FLOAT(17.0), EVT_FLOAT(-13.0)) - EVT_PLAY_EFFECT(EFFECT_STARS_SHIMMER, 5, 100, 45, -66, 40, 50, 45, 80) - EVT_CALL(PlaySound, SOUND_WISH_ASCENDING) - EVT_WAIT(30) - EVT_SET(LVar0, NPC_Eldstar) - EVT_EXEC(N(AddStarSpiritHovering)) - EVT_SET(LVar0, NPC_Mamar) - EVT_EXEC(N(AddStarSpiritHovering)) - EVT_SET(LVar0, NPC_Skolar) - EVT_EXEC(N(AddStarSpiritHovering)) - EVT_SET(LVar0, NPC_Muskular) - EVT_EXEC(N(AddStarSpiritHovering)) - EVT_SET(LVar0, NPC_Misstar) - EVT_EXEC(N(AddStarSpiritHovering)) - EVT_SET(LVar0, NPC_Klevar) - EVT_EXEC(N(AddStarSpiritHovering)) - EVT_SET(LVar0, NPC_Kalmar) - EVT_EXEC(N(AddStarSpiritHovering)) - EVT_CALL(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_CALL(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_APPEAR, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 10) - EVT_SETF(LVar0, 0) - EVT_LOOP(20) - EVT_ADDF(LVar0, EVT_FLOAT(12.0)) - EVT_CALL(SetNpcImgFXParams, NPC_Eldstar, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(10) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_WAIT(15) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 512, MSG_CH8_00A1) - EVT_WAIT(10) - EVT_CALL(PlaySoundAt, SOUND_MULTIPLE_STAR_SPIRITS_APPEAR, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Mamar, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 10) - EVT_CALL(GetNpcPos, NPC_Skolar, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 10) - EVT_CALL(GetNpcPos, NPC_Muskular, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 10) - EVT_CALL(GetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 10) - EVT_CALL(GetNpcPos, NPC_Klevar, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 10) - EVT_CALL(GetNpcPos, NPC_Kalmar, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 15) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 10) - EVT_SETF(LVar0, 0) - EVT_LOOP(20) - EVT_ADDF(LVar0, EVT_FLOAT(12.0)) - EVT_CALL(SetNpcImgFXParams, NPC_Mamar, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Skolar, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Muskular, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Misstar, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Klevar, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Kalmar, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcImgFXParams, NPC_Eldstar, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Mamar, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Skolar, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Muskular, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Misstar, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Klevar, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Kalmar, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetNpcJumpscale, NPC_Twink_01, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump0, NPC_Twink_01, 140, 65, 30, 20) - EVT_CALL(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 15) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-8.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.8)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Twink_01, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_CH8_00A2) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 512, MSG_CH8_00A3) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 512, MSG_CH8_00A4) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_WAIT(15) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_WAIT(5) - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Eldstar, NPC_FLAG_TOUCHES_GROUND, FALSE) - EVT_CALL(SetNpcJumpscale, NPC_Eldstar, EVT_FLOAT(3.2)) - EVT_CALL(GetNpcPos, NPC_Eldstar, LVar6, LVar7, LVar8) - EVT_CALL(NpcJump0, NPC_Eldstar, LVar6, LVar7, LVar8, 5) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 10) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(SetNpcFlagBits, NPC_Mamar, NPC_FLAG_TOUCHES_GROUND, FALSE) - EVT_CALL(SetNpcJumpscale, NPC_Mamar, EVT_FLOAT(3.2)) - EVT_CALL(GetNpcPos, NPC_Mamar, LVar6, LVar7, LVar8) - EVT_CALL(NpcJump0, NPC_Mamar, LVar6, LVar7, LVar8, 5) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(21) - EVT_CALL(SetNpcFlagBits, NPC_Skolar, NPC_FLAG_TOUCHES_GROUND, FALSE) - EVT_CALL(SetNpcJumpscale, NPC_Skolar, EVT_FLOAT(3.2)) - EVT_CALL(GetNpcPos, NPC_Skolar, LVar6, LVar7, LVar8) - EVT_CALL(NpcJump0, NPC_Skolar, LVar6, LVar7, LVar8, 5) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(22) - EVT_CALL(SetNpcFlagBits, NPC_Muskular, NPC_FLAG_TOUCHES_GROUND, FALSE) - EVT_CALL(SetNpcJumpscale, NPC_Muskular, EVT_FLOAT(3.2)) - EVT_CALL(GetNpcPos, NPC_Muskular, LVar6, LVar7, LVar8) - EVT_CALL(NpcJump0, NPC_Muskular, LVar6, LVar7, LVar8, 5) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(SetNpcFlagBits, NPC_Misstar, NPC_FLAG_TOUCHES_GROUND, FALSE) - EVT_CALL(SetNpcJumpscale, NPC_Misstar, EVT_FLOAT(3.2)) - EVT_CALL(GetNpcPos, NPC_Misstar, LVar6, LVar7, LVar8) - EVT_CALL(NpcJump0, NPC_Misstar, LVar6, LVar7, LVar8, 5) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(21) - EVT_CALL(SetNpcFlagBits, NPC_Klevar, NPC_FLAG_TOUCHES_GROUND, FALSE) - EVT_CALL(SetNpcJumpscale, NPC_Klevar, EVT_FLOAT(3.2)) - EVT_CALL(GetNpcPos, NPC_Klevar, LVar6, LVar7, LVar8) - EVT_CALL(NpcJump0, NPC_Klevar, LVar6, LVar7, LVar8, 5) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(22) - EVT_CALL(SetNpcFlagBits, NPC_Kalmar, NPC_FLAG_TOUCHES_GROUND, FALSE) - EVT_CALL(SetNpcJumpscale, NPC_Kalmar, EVT_FLOAT(3.2)) - EVT_CALL(GetNpcPos, NPC_Kalmar, LVar6, LVar7, LVar8) - EVT_CALL(NpcJump0, NPC_Kalmar, LVar6, LVar7, LVar8, 5) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(23) - EVT_CALL(SetNpcFlagBits, NPC_Twink_01, NPC_FLAG_TOUCHES_GROUND, FALSE) - EVT_CALL(SetNpcJumpscale, NPC_Twink_01, EVT_FLOAT(3.2)) - EVT_CALL(GetNpcPos, NPC_Twink_01, LVar6, LVar7, LVar8) - EVT_CALL(NpcJump0, NPC_Twink_01, LVar6, LVar7, LVar8, 5) - EVT_END_THREAD - EVT_THREAD - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 2, 100, 28, 10, EVT_FLOAT(2.8), 100) - EVT_CALL(PlaySound, SOUND_RELEASE_ENERGY) - EVT_WAIT(115) - EVT_ADD(LVar1, 20) - EVT_CALL(PlaySoundAt, SOUND_GET_STAR_POWER_WAVE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, EVT_FLOAT(0.3), 30) - EVT_END_THREAD - EVT_WAIT(40) - EVT_CALL(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, 110, 20, 3) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, 110, 20, 3, 10) - EVT_WAIT(6) - EVT_CALL(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, 100, 20, 3) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, 100, 20, 3, 15) - EVT_WAIT(6) - EVT_CALL(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, 90, 20, 3) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, 90, 20, 3, 20) - EVT_WAIT(6) - EVT_CALL(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, 110, 20, 3) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, 110, 20, 3, 25) - EVT_WAIT(6) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_UsePower) - EVT_LOOP(3) - EVT_CALL(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, 100, 20, 3) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, 100, 20, 3, 30) - EVT_WAIT(6) - EVT_CALL(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, 90, 20, 3) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, 90, 20, 3, 30) - EVT_WAIT(6) - EVT_CALL(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, 110, 20, 3) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, 110, 20, 3, 30) - EVT_WAIT(6) - EVT_END_LOOP - EVT_CALL(N(UpgradeStarBeam)) - EVT_WAIT(30) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0199, 160, 40) - EVT_WAIT(30) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_BeforeJump) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 45) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_CALL(SpeakToPlayer, NPC_Bowser_02, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_CH8_00A5) - EVT_END_THREAD - EVT_WAIT(5) - EVT_CALL(InterpNpcYaw, NPC_Bowser_02, 270, 0) - EVT_WAIT(25) - EVT_CALL(FadeOutMusic, 0, 500) - EVT_WAIT(20) - EVT_THREAD - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.5)) - EVT_CALL(PlayerJump, 100, 0, 0, 20) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.5)) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 20) - EVT_END_THREAD - EVT_CALL(SetNpcVar, NPC_Bowser_02, 0, 1) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(SetPlayerAnimation, ANIM_Mario1_BeforeJump) + Call(SetPlayerPos, 100, 0, 0) + Call(PartnerIsFlying, LVar0) + IfEq(LVar0, FALSE) + Call(SetNpcPos, NPC_PARTNER, 60, 10, 0) + Else + Call(SetNpcPos, NPC_PARTNER, 60, 0, 0) + EndIf + Call(SetNpcYaw, NPC_PARTNER, 90) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(GetNpcPos, NPC_Peach_01, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-8.5)) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(GetNpcPos, NPC_Kammy_04, LVar0, LVar1, LVar2) + Add(LVar1, 30) + Set(LVar3, 20) + Set(LVar4, 3) + Call(N(SpawnStarsOrbitingKammy2)) + Set(MV_OrbitingEffectBIdx, LVar0) + Wait(20) + Call(InterpNpcYaw, NPC_Peach_01, 90, 0) + Wait(20) + Call(InterpNpcYaw, NPC_Peach_01, 270, 0) + Wait(10) + Call(SetNpcAnimation, NPC_Peach_01, ANIM_Peach2_RaiseArms) + Wait(10) + Call(SetNpcAnimation, NPC_Peach_01, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_Peach_01, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_CH8_009C) + Wait(10) + Call(InterpNpcYaw, NPC_Peach_01, 90, 0) + Call(SpeakToPlayer, NPC_Twink_01, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_CH8_009D) + Wait(10) + Call(StopSound, SOUND_LRAW_KPA_ARENA_ACTIVE) + Call(SetMusicTrack, 0, SONG_PEACH_WISHES, 0, 8) + Call(InterpNpcYaw, NPC_Peach_01, 270, 0) + Wait(10) + Call(SpeakToPlayer, NPC_Peach_01, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_CH8_009E) + Wait(10) + Call(SpeakToPlayer, NPC_Twink_01, ANIM_Twink_Talk, ANIM_Twink_Idle, 5, MSG_CH8_009F) + Wait(10) + Call(SetNpcAnimation, NPC_Peach_01, ANIM_Peach2_LowerArms) + Wait(10) + Call(SetNpcAnimation, NPC_Peach_01, ANIM_Peach3_Pray) + Wait(10) + Call(LoadPath, 20, Ref(N(TwinkStrikeBowserPath)), ARRAY_COUNT(N(TwinkStrikeBowserPath)), EASING_QUADRATIC_IN) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Twink_01, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Wait(20) + Call(GetNpcPos, NPC_Peach_01, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 245) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-11.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.6)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(GetNpcPos, NPC_Peach_01, LVar0, LVar1, LVar2) + Add(LVar1, 10) + Call(PlaySoundAt, SOUND_WISH_ASCENDING, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_STARS_SHIMMER, 5, LVar0, LVar1, LVar2, 40, 120, 45, 150) + Wait(150) + Call(SetNpcAnimation, NPC_Bowser_02, ANIM_WorldBowser_RearUpLaugh) + Call(SetNpcDecoration, NPC_Bowser_02, 0, NPC_DECORATION_BOWSER_AURA) + Call(SetNpcDecoration, NPC_Bowser_02, 1, NPC_DECORATION_CHARGED) + Set(LVar8, NPC_Bowser_02) + Exec(N(EVS_SpawnBowserStarEnergyWaves)) + Wait(5) + Call(GetNpcPos, NPC_Bowser_02, LVar0, LVar1, LVar2) + Add(LVar0, -50) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 400) + Call(SetCamPitch, CAM_DEFAULT, Float(16.0), Float(-10.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Set(LVar0, MV_OrbitingEffectBIdx) + Call(N(DismissStarsOrbitingKammy2)) + Wait(20) + Call(SpeakToPlayer, NPC_Bowser_02, ANIM_WorldBowser_RearUpLaugh, ANIM_WorldBowser_RearUpLaugh, 0, MSG_CH8_00A0) + Wait(10) + Call(SetNpcPos, NPC_Twink_01, 500, 200, 0) + Call(SetNpcJumpscale, NPC_Twink_01, Float(0.0)) + Call(NpcJump0, NPC_Twink_01, 205, 90, 0, 20) + Call(PlaySoundAtNpc, NPC_Twink_01, SOUND_HIT_NORMAL, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_Bowser_02, ANIM_WorldBowser_Shock) + PlayEffect(EFFECT_DAMAGE_STARS, FX_DAMAGE_STARS_3, 205, 90, 0, -1, -1, 0, 3) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 8, Float(1.5)) + EndThread + Call(SetNpcJumpscale, NPC_Twink_01, Float(0.3)) + Call(NpcJump0, NPC_Twink_01, 195, 200, 0, 20) + Wait(10) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Thread + Call(SetNpcAnimation, NPC_Bowser_02, ANIM_WorldBowser_Idle) + Call(InterpNpcYaw, NPC_Bowser_02, 90, 0) + Wait(15) + Call(InterpNpcYaw, NPC_Bowser_02, 270, 0) + Wait(15) + Call(InterpNpcYaw, NPC_Bowser_02, 90, 0) + Wait(20) + Call(SetNpcAnimation, NPC_Bowser_02, ANIM_WorldBowser_Walk) + Call(GetNpcPos, NPC_Bowser_02, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Call(NpcMoveTo, NPC_Bowser_02, LVar0, LVar2, 50) + Call(SetNpcAnimation, NPC_Bowser_02, ANIM_WorldBowser_Idle) + EndThread + Wait(15) + Call(AdjustCam, CAM_DEFAULT, Float(2.0), 0, 300, Float(17.0), Float(-13.0)) + PlayEffect(EFFECT_STARS_SHIMMER, 5, 100, 45, -66, 40, 50, 45, 80) + Call(PlaySound, SOUND_WISH_ASCENDING) + Wait(30) + Set(LVar0, NPC_Eldstar) + Exec(N(AddStarSpiritHovering)) + Set(LVar0, NPC_Mamar) + Exec(N(AddStarSpiritHovering)) + Set(LVar0, NPC_Skolar) + Exec(N(AddStarSpiritHovering)) + Set(LVar0, NPC_Muskular) + Exec(N(AddStarSpiritHovering)) + Set(LVar0, NPC_Misstar) + Exec(N(AddStarSpiritHovering)) + Set(LVar0, NPC_Klevar) + Exec(N(AddStarSpiritHovering)) + Set(LVar0, NPC_Kalmar) + Exec(N(AddStarSpiritHovering)) + Call(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) + Add(LVar1, 15) + Call(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_APPEAR, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 10) + SetF(LVar0, 0) + Loop(20) + AddF(LVar0, Float(12.0)) + Call(SetNpcImgFXParams, NPC_Eldstar, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + EndLoop + Wait(10) + Thread + Wait(15) + Call(InterpPlayerYaw, 270, 0) + Wait(15) + Call(InterpPlayerYaw, 90, 0) + Wait(10) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + EndThread + Call(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 512, MSG_CH8_00A1) + Wait(10) + Call(PlaySoundAt, SOUND_MULTIPLE_STAR_SPIRITS_APPEAR, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Mamar, LVar0, LVar1, LVar2) + Add(LVar1, 15) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 10) + Call(GetNpcPos, NPC_Skolar, LVar0, LVar1, LVar2) + Add(LVar1, 15) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 10) + Call(GetNpcPos, NPC_Muskular, LVar0, LVar1, LVar2) + Add(LVar1, 15) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 10) + Call(GetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) + Add(LVar1, 15) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 10) + Call(GetNpcPos, NPC_Klevar, LVar0, LVar1, LVar2) + Add(LVar1, 15) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 10) + Call(GetNpcPos, NPC_Kalmar, LVar0, LVar1, LVar2) + Add(LVar1, 15) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 10) + SetF(LVar0, 0) + Loop(20) + AddF(LVar0, Float(12.0)) + Call(SetNpcImgFXParams, NPC_Mamar, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Skolar, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Muskular, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Misstar, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Klevar, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Kalmar, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + EndLoop + Call(SetNpcImgFXParams, NPC_Eldstar, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Mamar, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Skolar, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Muskular, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Misstar, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Klevar, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Kalmar, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetNpcJumpscale, NPC_Twink_01, Float(0.0)) + Call(NpcJump0, NPC_Twink_01, 140, 65, 30, 20) + Call(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) + Add(LVar0, 15) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 250) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-8.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.8)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(10) + Call(SpeakToPlayer, NPC_Twink_01, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_CH8_00A2) + Wait(10) + Call(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 512, MSG_CH8_00A3) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-10.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10) + Call(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 512, MSG_CH8_00A4) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + Wait(15) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Wait(5) + Thread + Call(SetNpcFlagBits, NPC_Eldstar, NPC_FLAG_TOUCHES_GROUND, FALSE) + Call(SetNpcJumpscale, NPC_Eldstar, Float(3.2)) + Call(GetNpcPos, NPC_Eldstar, LVar6, LVar7, LVar8) + Call(NpcJump0, NPC_Eldstar, LVar6, LVar7, LVar8, 5) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 10) + EndThread + Thread + Wait(20) + Call(SetNpcFlagBits, NPC_Mamar, NPC_FLAG_TOUCHES_GROUND, FALSE) + Call(SetNpcJumpscale, NPC_Mamar, Float(3.2)) + Call(GetNpcPos, NPC_Mamar, LVar6, LVar7, LVar8) + Call(NpcJump0, NPC_Mamar, LVar6, LVar7, LVar8, 5) + EndThread + Thread + Wait(21) + Call(SetNpcFlagBits, NPC_Skolar, NPC_FLAG_TOUCHES_GROUND, FALSE) + Call(SetNpcJumpscale, NPC_Skolar, Float(3.2)) + Call(GetNpcPos, NPC_Skolar, LVar6, LVar7, LVar8) + Call(NpcJump0, NPC_Skolar, LVar6, LVar7, LVar8, 5) + EndThread + Thread + Wait(22) + Call(SetNpcFlagBits, NPC_Muskular, NPC_FLAG_TOUCHES_GROUND, FALSE) + Call(SetNpcJumpscale, NPC_Muskular, Float(3.2)) + Call(GetNpcPos, NPC_Muskular, LVar6, LVar7, LVar8) + Call(NpcJump0, NPC_Muskular, LVar6, LVar7, LVar8, 5) + EndThread + Thread + Wait(20) + Call(SetNpcFlagBits, NPC_Misstar, NPC_FLAG_TOUCHES_GROUND, FALSE) + Call(SetNpcJumpscale, NPC_Misstar, Float(3.2)) + Call(GetNpcPos, NPC_Misstar, LVar6, LVar7, LVar8) + Call(NpcJump0, NPC_Misstar, LVar6, LVar7, LVar8, 5) + EndThread + Thread + Wait(21) + Call(SetNpcFlagBits, NPC_Klevar, NPC_FLAG_TOUCHES_GROUND, FALSE) + Call(SetNpcJumpscale, NPC_Klevar, Float(3.2)) + Call(GetNpcPos, NPC_Klevar, LVar6, LVar7, LVar8) + Call(NpcJump0, NPC_Klevar, LVar6, LVar7, LVar8, 5) + EndThread + Thread + Wait(22) + Call(SetNpcFlagBits, NPC_Kalmar, NPC_FLAG_TOUCHES_GROUND, FALSE) + Call(SetNpcJumpscale, NPC_Kalmar, Float(3.2)) + Call(GetNpcPos, NPC_Kalmar, LVar6, LVar7, LVar8) + Call(NpcJump0, NPC_Kalmar, LVar6, LVar7, LVar8, 5) + EndThread + Thread + Wait(23) + Call(SetNpcFlagBits, NPC_Twink_01, NPC_FLAG_TOUCHES_GROUND, FALSE) + Call(SetNpcJumpscale, NPC_Twink_01, Float(3.2)) + Call(GetNpcPos, NPC_Twink_01, LVar6, LVar7, LVar8) + Call(NpcJump0, NPC_Twink_01, LVar6, LVar7, LVar8, 5) + EndThread + Thread + PlayEffect(EFFECT_RADIAL_SHIMMER, 2, 100, 28, 10, Float(2.8), 100) + Call(PlaySound, SOUND_RELEASE_ENERGY) + Wait(115) + Add(LVar1, 20) + Call(PlaySoundAt, SOUND_GET_STAR_POWER_WAVE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, Float(0.3), 30) + EndThread + Wait(40) + Call(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, 110, 20, 3) + PlayEffect(EFFECT_SPARKLES, 0, 110, 20, 3, 10) + Wait(6) + Call(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, 100, 20, 3) + PlayEffect(EFFECT_SPARKLES, 0, 100, 20, 3, 15) + Wait(6) + Call(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, 90, 20, 3) + PlayEffect(EFFECT_SPARKLES, 0, 90, 20, 3, 20) + Wait(6) + Call(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, 110, 20, 3) + PlayEffect(EFFECT_SPARKLES, 0, 110, 20, 3, 25) + Wait(6) + Call(SetPlayerAnimation, ANIM_Mario1_UsePower) + Loop(3) + Call(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, 100, 20, 3) + PlayEffect(EFFECT_SPARKLES, 0, 100, 20, 3, 30) + Wait(6) + Call(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, 90, 20, 3) + PlayEffect(EFFECT_SPARKLES, 0, 90, 20, 3, 30) + Wait(6) + Call(PlaySoundAt, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT, 110, 20, 3) + PlayEffect(EFFECT_SPARKLES, 0, 110, 20, 3, 30) + Wait(6) + EndLoop + Call(N(UpgradeStarBeam)) + Wait(30) + Call(ShowMessageAtScreenPos, MSG_Menus_0199, 160, 40) + Wait(30) + Call(SetPlayerAnimation, ANIM_Mario1_BeforeJump) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 45) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 450) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-10.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Call(SpeakToPlayer, NPC_Bowser_02, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, MSG_CH8_00A5) + EndThread + Wait(5) + Call(InterpNpcYaw, NPC_Bowser_02, 270, 0) + Wait(25) + Call(FadeOutMusic, 0, 500) + Wait(20) + Thread + Call(SetPlayerJumpscale, Float(0.5)) + Call(PlayerJump, 100, 0, 0, 20) + EndThread + Thread + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.5)) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 20) + EndThread + Call(SetNpcVar, NPC_Bowser_02, 0, 1) + Return + End }; diff --git a/src/world/area_kkj/kkj_25/kkj_25_8_bowser_defeated.c b/src/world/area_kkj/kkj_25/kkj_25_8_bowser_defeated.c index be5a3a65fb0..c9da3a254fd 100644 --- a/src/world/area_kkj/kkj_25/kkj_25_8_bowser_defeated.c +++ b/src/world/area_kkj/kkj_25/kkj_25_8_bowser_defeated.c @@ -114,69 +114,69 @@ API_CALLABLE(N(DismissStarsOrbitingBowser)) { } s32 N(ArenaExplosions)[][6] = { - { 0, 0, 0, 30, EVT_FLOAT(3.0), EVT_FLOAT(1.0) }, - { 450, -50, 330, 40, EVT_FLOAT(4.0), EVT_FLOAT(2.0) }, - { 280, -100, 350, 50, EVT_FLOAT(5.0), EVT_FLOAT(2.0) }, - { 80, -200, -60, 30, EVT_FLOAT(3.0), EVT_FLOAT(1.0) }, - { 500, -200, 20, 30, EVT_FLOAT(3.0), EVT_FLOAT(1.0) }, - { 350, -120, 350, 50, EVT_FLOAT(5.0), EVT_FLOAT(2.0) }, + { 0, 0, 0, 30, Float(3.0), Float(1.0) }, + { 450, -50, 330, 40, Float(4.0), Float(2.0) }, + { 280, -100, 350, 50, Float(5.0), Float(2.0) }, + { 80, -200, -60, 30, Float(3.0), Float(1.0) }, + { 500, -200, 20, 30, Float(3.0), Float(1.0) }, + { 350, -120, 350, 50, Float(5.0), Float(2.0) }, }; EvtScript N(EVS_ManageShaking) = { - EVT_LOOP(0) - EVT_IF_GT(MV_DestructState, DESTRUCT_STATE_NONE) - EVT_SET(MV_PrevDestructState, MV_DestructState) - EVT_END_IF - EVT_SWITCH(MV_DestructState) - EVT_CASE_EQ(DESTRUCT_STATE_NONE) - EVT_CASE_EQ(DESTRUCT_STATE_1) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(2.0)) - EVT_SET(MV_DestructState, DESTRUCT_STATE_TREMBLE) - EVT_CASE_EQ(DESTRUCT_STATE_2) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 50, EVT_FLOAT(2.0)) - EVT_SET(MV_DestructState, DESTRUCT_STATE_TREMBLE) - EVT_CASE_EQ(DESTRUCT_STATE_3) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(2.0)) - EVT_SET(MV_DestructState, DESTRUCT_STATE_TREMBLE) - EVT_CASE_EQ(DESTRUCT_STATE_4) - EVT_USE_BUF(EVT_PTR(N(ArenaExplosions))) - EVT_LOOP(1 + ARRAY_COUNT(N(ArenaExplosions))) //@bug extra iteration reads garbage - EVT_BUF_READ4(LVar0, LVar1, LVar2, LVar3) - EVT_FBUF_READ2(LVar4, LVar5) - EVT_CALL(PlaySoundAt, SOUND_SEQ_FINALE_EXPLOSION, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 0, LVar0, LVar1, LVar2, LVar4, LVar3) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, LVar5) - EVT_END_LOOP - EVT_SET(MV_DestructState, DESTRUCT_STATE_TREMBLE) - EVT_CASE_EQ(DESTRUCT_STATE_5) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(1.0)) - EVT_SET(MV_DestructState, DESTRUCT_STATE_TREMBLE) - EVT_CASE_EQ(DESTRUCT_STATE_6) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(1.0)) - EVT_SET(MV_DestructState, DESTRUCT_STATE_TREMBLE) - EVT_CASE_EQ(DESTRUCT_STATE_7) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30, EVT_FLOAT(3.0)) - EVT_SET(MV_DestructState, DESTRUCT_STATE_TREMBLE) - EVT_CASE_EQ(DESTRUCT_STATE_10) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 100, EVT_FLOAT(2.0)) - EVT_CASE_EQ(DESTRUCT_STATE_TREMBLE) - EVT_THREAD - EVT_SET(LVar0, MV_PrevDestructState) - EVT_LOOP(0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30, EVT_FLOAT(0.7)) - EVT_WAIT(1) + Loop(0) + IfGt(MV_DestructState, DESTRUCT_STATE_NONE) + Set(MV_PrevDestructState, MV_DestructState) + EndIf + Switch(MV_DestructState) + CaseEq(DESTRUCT_STATE_NONE) + CaseEq(DESTRUCT_STATE_1) + Call(ShakeCam, CAM_DEFAULT, 0, 20, Float(2.0)) + Set(MV_DestructState, DESTRUCT_STATE_TREMBLE) + CaseEq(DESTRUCT_STATE_2) + Call(ShakeCam, CAM_DEFAULT, 0, 50, Float(2.0)) + Set(MV_DestructState, DESTRUCT_STATE_TREMBLE) + CaseEq(DESTRUCT_STATE_3) + Call(ShakeCam, CAM_DEFAULT, 0, 20, Float(2.0)) + Set(MV_DestructState, DESTRUCT_STATE_TREMBLE) + CaseEq(DESTRUCT_STATE_4) + UseBuf(Ref(N(ArenaExplosions))) + Loop(1 + ARRAY_COUNT(N(ArenaExplosions))) //@bug extra iteration reads garbage + BufRead4(LVar0, LVar1, LVar2, LVar3) + FBufRead2(LVar4, LVar5) + Call(PlaySoundAt, SOUND_SEQ_FINALE_EXPLOSION, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_RING_BLAST, 0, LVar0, LVar1, LVar2, LVar4, LVar3) + Call(ShakeCam, CAM_DEFAULT, 0, 20, LVar5) + EndLoop + Set(MV_DestructState, DESTRUCT_STATE_TREMBLE) + CaseEq(DESTRUCT_STATE_5) + Call(ShakeCam, CAM_DEFAULT, 0, 20, Float(1.0)) + Set(MV_DestructState, DESTRUCT_STATE_TREMBLE) + CaseEq(DESTRUCT_STATE_6) + Call(ShakeCam, CAM_DEFAULT, 0, 20, Float(1.0)) + Set(MV_DestructState, DESTRUCT_STATE_TREMBLE) + CaseEq(DESTRUCT_STATE_7) + Call(ShakeCam, CAM_DEFAULT, 0, 30, Float(3.0)) + Set(MV_DestructState, DESTRUCT_STATE_TREMBLE) + CaseEq(DESTRUCT_STATE_10) + Call(ShakeCam, CAM_DEFAULT, 0, 100, Float(2.0)) + CaseEq(DESTRUCT_STATE_TREMBLE) + Thread + Set(LVar0, MV_PrevDestructState) + Loop(0) + Call(ShakeCam, CAM_DEFAULT, 0, 30, Float(0.7)) + Wait(1) // wait for the state to change - EVT_IF_NE(LVar0, MV_PrevDestructState) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_SET(MV_DestructState, DESTRUCT_STATE_NONE) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + IfNe(LVar0, MV_PrevDestructState) + BreakLoop + EndIf + EndLoop + EndThread + Set(MV_DestructState, DESTRUCT_STATE_NONE) + EndSwitch + Wait(1) + EndLoop + Return + End }; // x, y, z, delay @@ -195,321 +195,321 @@ s32 N(ChainExplosionLocations)[][4] = { }; EvtScript N(EVS_BowserAndKammyBlownAway) = { - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Bowser_03, EVT_FLOAT(0.1)) - EVT_CALL(NpcJump0, NPC_Bowser_03, 700, -50, 1000, 100) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 0, -1800, 100, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Bowser_03, 0, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Kammy_05, EVT_FLOAT(0.1)) - EVT_CALL(NpcJump0, NPC_Kammy_05, 600, -250, 1000, 100) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 0, -2160, 100, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Kammy_05, 0, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_SET(MV_DestructState, DESTRUCT_STATE_10) - EVT_THREAD - EVT_CALL(MakeLerp, -150, -430, 100, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(LVar2, LVar0) - EVT_ADD(LVar2, 150) - EVT_DIV(LVar2, 2) - EVT_CALL(TranslateGroup, MODEL_g2, LVar0, LVar2, 0) - EVT_CALL(TranslateGroup, MODEL_g31, LVar0, LVar2, 0) - EVT_CALL(TranslateGroup, MODEL_g7, LVar0, LVar2, 0) - EVT_CALL(TranslateGroup, MODEL_g54, LVar0, LVar2, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_USE_BUF(EVT_PTR(N(ChainExplosionLocations))) - EVT_LOOP(ARRAY_COUNT(N(ChainExplosionLocations))) - EVT_BUF_READ4(LVar0, LVar1, LVar2, LVar3) - EVT_CALL(PlaySoundAt, SOUND_SEQ_FINALE_EXPLOSION, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 0, LVar0, LVar1, LVar2, EVT_FLOAT(2.0), 30) - EVT_WAIT(LVar3) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(120) - EVT_RETURN - EVT_END + Thread + Call(SetNpcJumpscale, NPC_Bowser_03, Float(0.1)) + Call(NpcJump0, NPC_Bowser_03, 700, -50, 1000, 100) + EndThread + Thread + Call(MakeLerp, 0, -1800, 100, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Bowser_03, 0, 0, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(SetNpcJumpscale, NPC_Kammy_05, Float(0.1)) + Call(NpcJump0, NPC_Kammy_05, 600, -250, 1000, 100) + EndThread + Thread + Call(MakeLerp, 0, -2160, 100, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Kammy_05, 0, 0, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Set(MV_DestructState, DESTRUCT_STATE_10) + Thread + Call(MakeLerp, -150, -430, 100, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Set(LVar2, LVar0) + Add(LVar2, 150) + Div(LVar2, 2) + Call(TranslateGroup, MODEL_g2, LVar0, LVar2, 0) + Call(TranslateGroup, MODEL_g31, LVar0, LVar2, 0) + Call(TranslateGroup, MODEL_g7, LVar0, LVar2, 0) + Call(TranslateGroup, MODEL_g54, LVar0, LVar2, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + UseBuf(Ref(N(ChainExplosionLocations))) + Loop(ARRAY_COUNT(N(ChainExplosionLocations))) + BufRead4(LVar0, LVar1, LVar2, LVar3) + Call(PlaySoundAt, SOUND_SEQ_FINALE_EXPLOSION, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_RING_BLAST, 0, LVar0, LVar1, LVar2, Float(2.0), 30) + Wait(LVar3) + EndLoop + EndThread + Wait(120) + Return + End }; EvtScript N(EVS_Scene_BowserDefeated) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_EXEC(N(EVS_ManageShaking)) - EVT_CALL(SetPlayerPos, 150, 0, 0) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(PartnerIsFlying, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_CALL(SetNpcPos, NPC_PARTNER, 110, 10, 0) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_PARTNER, 110, 0, 0) - EVT_END_IF - EVT_CALL(SetNpcYaw, NPC_PARTNER, 90) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(GetNpcPos, NPC_Bowser_03, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -40) - EVT_ADD(LVar1, 60) - EVT_SET(LVar3, 20) - EVT_SET(LVar4, 3) - EVT_CALL(N(SpawnStarsOrbitingBowser)) - EVT_SET(MV_OrbitingEffectAIdx, LVar0) - EVT_CALL(SetCamType, CAM_DEFAULT, 0, FALSE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 300, 0, 50) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 300, 0, 50) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 375) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 30) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, 20) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(30) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_SET(LVar0, MV_OrbitingEffectAIdx) - EVT_CALL(N(DismissStarsOrbitingBowser)) - EVT_END_THREAD - EVT_CALL(FadeOutMusic, 0, 150) - EVT_CALL(ClearAmbientSounds, 150) - EVT_WAIT(10) - EVT_CALL(SetMusicTrack, 0, SONG_RECOVERED_STAR_ROD, 0, 8) - EVT_CALL(NpcJump0, NPC_StarRod, 230, 18, 0, 25 * DT) - EVT_CALL(NpcJump0, NPC_StarRod, 190, 18, 0, 20 * DT) - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_Lift) - EVT_END_THREAD - EVT_CALL(NpcJump0, NPC_StarRod, 150, 60, 0, 15 * DT) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 14, 150, 60, 0, 1, 330) - EVT_WAIT(310 * DT) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH8_00AA, 160, 40) - EVT_CALL(PlaySound, SOUND_LRAW_KPA_ARENA_ACTIVE) - EVT_CALL(RemoveNpc, NPC_StarRod) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_ThumbsUp) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PARTNER_GOOMBARIO) - EVT_SET(LVar1, ANIM_WorldGoombario_Celebrate) - EVT_CASE_EQ(PARTNER_KOOPER) - EVT_SET(LVar1, ANIM_WorldKooper_Celebrate) - EVT_CASE_EQ(PARTNER_BOMBETTE) - EVT_SET(LVar1, ANIM_WorldBombette_Celebrate) - EVT_CASE_EQ(PARTNER_PARAKARRY) - EVT_SET(LVar1, ANIM_WorldParakarry_Celebrate) - EVT_CASE_EQ(PARTNER_BOW) - EVT_SET(LVar1, ANIM_WorldBow_CelebrateSlow) - EVT_CASE_EQ(PARTNER_WATT) - EVT_SET(LVar1, ANIM_WorldWatt_Celebrate) - EVT_CASE_EQ(PARTNER_SUSHIE) - EVT_SET(LVar1, ANIM_WorldSushie_Celebrate) - EVT_CASE_EQ(PARTNER_LAKILESTER) - EVT_SET(LVar1, ANIM_WorldLakilester_Celebrate) - EVT_END_SWITCH - EVT_CALL(SetNpcAnimation, NPC_PARTNER, LVar1) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(PARTNER_SUSHIE) - EVT_CASE_OR_EQ(PARTNER_BOW) - EVT_WAIT(30) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_LOOP(3) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar1, LVar2, LVar3, 10) - EVT_END_LOOP - EVT_END_SWITCH - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_Peach_02, ANIM_Peach2_RaiseArms, ANIM_Peach1_Idle, 0, MSG_CH8_00AB) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Peach_02, ANIM_Peach1_Walk) - EVT_CALL(NpcMoveTo, NPC_Peach_02, 200, 0, 85) - EVT_CALL(SetNpcAnimation, NPC_Peach_02, ANIM_Peach1_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 25) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 275) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-9.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.2)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_CALL(NpcMoveTo, NPC_Twink_02, 230, 30, 85) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Peach_02, ANIM_Peach2_RaiseArms, ANIM_Peach1_Idle, 0, MSG_CH8_00AC) - EVT_WAIT(20) - EVT_CALL(PlaySound, SOUND_LOOP_RUMBLE) - EVT_SET(MV_DestructState, DESTRUCT_STATE_1) - EVT_CALL(PlaySoundAtPlayer, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, 0, EMOTE_EXCLAMATION, 0, 20, EMOTER_PLAYER, 0, 0, 0, 0) - EVT_CALL(PlaySoundAtNpc, NPC_Peach_02, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_Peach_02, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(20) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_Peach_02, 90, 0) - EVT_WAIT(15) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_Peach_02, 270, 0) - EVT_WAIT(10) - EVT_CALL(GetNpcPos, NPC_Bowser_03, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(3.0), EVT_FLOAT(-1.5)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 750) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(40) - EVT_CALL(PlaySoundAt, SOUND_KPA_ARENA_EXPLODING, SOUND_SPACE_DEFAULT, 220, -43, 350) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 0, 220, -43, 350, EVT_FLOAT(8.0), 40) - EVT_SET(MV_DestructState, DESTRUCT_STATE_2) - EVT_WAIT(50) - EVT_SET(MV_ArenaState, ARENA_STATE_OVERLOADING) - EVT_CALL(GetNpcPos, NPC_Bowser_03, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-10.5)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetNpcAnimation, NPC_Peach_02, ANIM_Peach2_GaspStill) - EVT_CALL(SetNpcAnimation, NPC_Twink_02, ANIM_Twink_Cringe) - EVT_CALL(SetNpcAnimation, NPC_Bowser_03, ANIM_WorldBowser_Shock) - EVT_CALL(SetNpcJumpscale, NPC_Bowser_03, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_Bowser_03, 300, 0, 40, 20) - EVT_CALL(SetNpcAnimation, NPC_Bowser_03, ANIM_WorldBowser_Idle) - EVT_CALL(SetNpcRotation, NPC_Bowser_03, 0, 0, 0) - EVT_WAIT(10) - EVT_CALL(InterpNpcYaw, NPC_Bowser_03, 90, 0) - EVT_WAIT(10) - EVT_CALL(InterpNpcYaw, NPC_Bowser_03, 270, 0) - EVT_WAIT(10) - EVT_CALL(InterpNpcYaw, NPC_Bowser_03, 90, 0) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_Bowser_03, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 512, MSG_CH8_00AD) - EVT_CALL(PlaySoundAt, SOUND_KPA_ARENA_EXPLODING, SOUND_SPACE_DEFAULT, 370, -10, 180) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 0, 370, -10, 180, EVT_FLOAT(6.0), 40) - EVT_SET(MV_DestructState, DESTRUCT_STATE_3) - EVT_WAIT(20) - EVT_CALL(InterpNpcYaw, NPC_Peach_02, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_Twink_02, 90, 0) - EVT_WAIT(30) - EVT_CALL(GetNpcPos, NPC_Bowser_03, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(6.0), EVT_FLOAT(5.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 1100) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Bowser_03, ANIM_WorldBowser_Walk) - EVT_CALL(NpcMoveTo, NPC_Bowser_03, 450, 0, 140) - EVT_CALL(SetNpcAnimation, NPC_Bowser_03, ANIM_WorldBowser_Idle) - EVT_END_THREAD - EVT_SET(MV_DestructState, DESTRUCT_STATE_4) - EVT_WAIT(155) - EVT_CALL(GetNpcPos, NPC_Bowser_03, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-10.5)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToNpc, NPC_Bowser_03, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 512, NPC_Kammy_05, MSG_CH8_00AE) - EVT_WAIT(5) - EVT_CALL(PlaySoundAt, SOUND_KPA_ARENA_EXPLODING, SOUND_SPACE_DEFAULT, 350, 50, -100) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 0, 350, 50, -100, EVT_FLOAT(4.0), 20) - EVT_SET(MV_DestructState, DESTRUCT_STATE_5) - EVT_WAIT(25) - EVT_CALL(SpeakToNpc, NPC_Kammy_05, ANIM_BattleKammy_Anim06, ANIM_BattleKammy_Anim04, 512, NPC_Bowser_03, MSG_CH8_00AF) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Bowser_03, ANIM_WorldBowser_Shock) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_Bowser_03, ANIM_WorldBowser_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(PlaySoundAt, SOUND_KPA_ARENA_EXPLODING, SOUND_SPACE_DEFAULT, 570, 0, 100) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 0, 570, 0, 100, EVT_FLOAT(4.0), 20) - EVT_SET(MV_DestructState, DESTRUCT_STATE_6) - EVT_END_THREAD - EVT_WAIT(30) - EVT_CALL(SpeakToNpc, NPC_Bowser_03, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 512, NPC_Kammy_05, MSG_CH8_00B0) - EVT_SET(MV_ArenaState, ARENA_STATE_BROKEN) - EVT_WAIT(20) - EVT_CALL(StopSound, SOUND_LRAW_RUMBLE) - EVT_CALL(PlaySoundAt, SOUND_KPA_EXPLOSION_CLUSTER, SOUND_SPACE_DEFAULT, 500, 0, 100) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 0, 500, 0, 100, EVT_FLOAT(8.0), 90) - EVT_SET(MV_DestructState, DESTRUCT_STATE_7) - EVT_CALL(SetNpcAnimation, NPC_Bowser_03, ANIM_WorldBowser_Shock) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH8_00B1, 160, 40) - EVT_CALL(N(FadeScreenToRedAndWhite)) - EVT_CALL(TranslateGroup, MODEL_Root, -200, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o128) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -200) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Peach_02, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -200) - EVT_CALL(SetNpcPos, NPC_Peach_02, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Twink_02, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -200) - EVT_CALL(SetNpcPos, NPC_Twink_02, LVar0, LVar1, LVar2) - EVT_SET(LVar0, 500) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(0.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 1100) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetNpcAnimation, NPC_Bowser_03, ANIM_WorldBowser_Idle) - EVT_CALL(InterpNpcYaw, NPC_Kammy_05, 90, 0) - EVT_WAIT(5) - EVT_CALL(SetNpcRotationPivot, NPC_Bowser_03, 34) - EVT_CALL(SetNpcRotationPivot, NPC_Kammy_05, 12) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(N(FadeScreenFromWhite)) - EVT_END_THREAD - EVT_EXEC_WAIT(N(EVS_BowserAndKammyBlownAway)) - EVT_CALL(GotoMap, EVT_PTR("osr_03"), osr_03_ENTRY_5) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Exec(N(EVS_ManageShaking)) + Call(SetPlayerPos, 150, 0, 0) + Call(InterpPlayerYaw, 90, 0) + Call(PartnerIsFlying, LVar0) + IfEq(LVar0, FALSE) + Call(SetNpcPos, NPC_PARTNER, 110, 10, 0) + Else + Call(SetNpcPos, NPC_PARTNER, 110, 0, 0) + EndIf + Call(SetNpcYaw, NPC_PARTNER, 90) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(GetNpcPos, NPC_Bowser_03, LVar0, LVar1, LVar2) + Add(LVar0, -40) + Add(LVar1, 60) + Set(LVar3, 20) + Set(LVar4, 3) + Call(N(SpawnStarsOrbitingBowser)) + Set(MV_OrbitingEffectAIdx, LVar0) + Call(SetCamType, CAM_DEFAULT, 0, FALSE) + Call(UseSettingsFrom, CAM_DEFAULT, 300, 0, 50) + Call(SetPanTarget, CAM_DEFAULT, 300, 0, 50) + Call(SetCamDistance, CAM_DEFAULT, 375) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-9.0)) + Call(SetCamPosA, CAM_DEFAULT, 0, 30) + Call(SetCamPosB, CAM_DEFAULT, 0, 20) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(30) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Set(LVar0, MV_OrbitingEffectAIdx) + Call(N(DismissStarsOrbitingBowser)) + EndThread + Call(FadeOutMusic, 0, 150) + Call(ClearAmbientSounds, 150) + Wait(10) + Call(SetMusicTrack, 0, SONG_RECOVERED_STAR_ROD, 0, 8) + Call(NpcJump0, NPC_StarRod, 230, 18, 0, 25 * DT) + Call(NpcJump0, NPC_StarRod, 190, 18, 0, 20 * DT) + Thread + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_MarioW1_Lift) + EndThread + Call(NpcJump0, NPC_StarRod, 150, 60, 0, 15 * DT) + PlayEffect(EFFECT_RADIAL_SHIMMER, 14, 150, 60, 0, 1, 330) + Wait(310 * DT) + Call(ShowMessageAtScreenPos, MSG_CH8_00AA, 160, 40) + Call(PlaySound, SOUND_LRAW_KPA_ARENA_ACTIVE) + Call(RemoveNpc, NPC_StarRod) + Call(SetPlayerAnimation, ANIM_Mario1_ThumbsUp) + Call(GetCurrentPartnerID, LVar0) + Switch(LVar0) + CaseEq(PARTNER_GOOMBARIO) + Set(LVar1, ANIM_WorldGoombario_Celebrate) + CaseEq(PARTNER_KOOPER) + Set(LVar1, ANIM_WorldKooper_Celebrate) + CaseEq(PARTNER_BOMBETTE) + Set(LVar1, ANIM_WorldBombette_Celebrate) + CaseEq(PARTNER_PARAKARRY) + Set(LVar1, ANIM_WorldParakarry_Celebrate) + CaseEq(PARTNER_BOW) + Set(LVar1, ANIM_WorldBow_CelebrateSlow) + CaseEq(PARTNER_WATT) + Set(LVar1, ANIM_WorldWatt_Celebrate) + CaseEq(PARTNER_SUSHIE) + Set(LVar1, ANIM_WorldSushie_Celebrate) + CaseEq(PARTNER_LAKILESTER) + Set(LVar1, ANIM_WorldLakilester_Celebrate) + EndSwitch + Call(SetNpcAnimation, NPC_PARTNER, LVar1) + Switch(LVar0) + CaseOrEq(PARTNER_SUSHIE) + CaseOrEq(PARTNER_BOW) + Wait(30) + EndCaseGroup + CaseDefault + Loop(3) + Call(GetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) + Call(NpcJump0, NPC_PARTNER, LVar1, LVar2, LVar3, 10) + EndLoop + EndSwitch + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Wait(20) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(20) + Call(SpeakToPlayer, NPC_Peach_02, ANIM_Peach2_RaiseArms, ANIM_Peach1_Idle, 0, MSG_CH8_00AB) + Thread + Call(SetNpcAnimation, NPC_Peach_02, ANIM_Peach1_Walk) + Call(NpcMoveTo, NPC_Peach_02, 200, 0, 85) + Call(SetNpcAnimation, NPC_Peach_02, ANIM_Peach1_Idle) + EndThread + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 25) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 275) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-9.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.2)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Call(NpcMoveTo, NPC_Twink_02, 230, 30, 85) + Wait(10) + Call(SpeakToPlayer, NPC_Peach_02, ANIM_Peach2_RaiseArms, ANIM_Peach1_Idle, 0, MSG_CH8_00AC) + Wait(20) + Call(PlaySound, SOUND_LOOP_RUMBLE) + Set(MV_DestructState, DESTRUCT_STATE_1) + Call(PlaySoundAtPlayer, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, 0, EMOTE_EXCLAMATION, 0, 20, EMOTER_PLAYER, 0, 0, 0, 0) + Call(PlaySoundAtNpc, NPC_Peach_02, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_Peach_02, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) + Wait(20) + Call(InterpPlayerYaw, 270, 0) + Call(InterpNpcYaw, NPC_Peach_02, 90, 0) + Wait(15) + Call(InterpPlayerYaw, 90, 0) + Call(InterpNpcYaw, NPC_Peach_02, 270, 0) + Wait(10) + Call(GetNpcPos, NPC_Bowser_03, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(3.0), Float(-1.5)) + Call(SetCamDistance, CAM_DEFAULT, 750) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(40) + Call(PlaySoundAt, SOUND_KPA_ARENA_EXPLODING, SOUND_SPACE_DEFAULT, 220, -43, 350) + PlayEffect(EFFECT_RING_BLAST, 0, 220, -43, 350, Float(8.0), 40) + Set(MV_DestructState, DESTRUCT_STATE_2) + Wait(50) + Set(MV_ArenaState, ARENA_STATE_OVERLOADING) + Call(GetNpcPos, NPC_Bowser_03, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-10.5)) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetNpcAnimation, NPC_Peach_02, ANIM_Peach2_GaspStill) + Call(SetNpcAnimation, NPC_Twink_02, ANIM_Twink_Cringe) + Call(SetNpcAnimation, NPC_Bowser_03, ANIM_WorldBowser_Shock) + Call(SetNpcJumpscale, NPC_Bowser_03, Float(1.0)) + Call(NpcJump0, NPC_Bowser_03, 300, 0, 40, 20) + Call(SetNpcAnimation, NPC_Bowser_03, ANIM_WorldBowser_Idle) + Call(SetNpcRotation, NPC_Bowser_03, 0, 0, 0) + Wait(10) + Call(InterpNpcYaw, NPC_Bowser_03, 90, 0) + Wait(10) + Call(InterpNpcYaw, NPC_Bowser_03, 270, 0) + Wait(10) + Call(InterpNpcYaw, NPC_Bowser_03, 90, 0) + Wait(20) + Call(SpeakToPlayer, NPC_Bowser_03, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 512, MSG_CH8_00AD) + Call(PlaySoundAt, SOUND_KPA_ARENA_EXPLODING, SOUND_SPACE_DEFAULT, 370, -10, 180) + PlayEffect(EFFECT_RING_BLAST, 0, 370, -10, 180, Float(6.0), 40) + Set(MV_DestructState, DESTRUCT_STATE_3) + Wait(20) + Call(InterpNpcYaw, NPC_Peach_02, 90, 0) + Call(InterpNpcYaw, NPC_Twink_02, 90, 0) + Wait(30) + Call(GetNpcPos, NPC_Bowser_03, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(6.0), Float(5.0)) + Call(SetCamDistance, CAM_DEFAULT, 1100) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Wait(10) + Call(SetNpcAnimation, NPC_Bowser_03, ANIM_WorldBowser_Walk) + Call(NpcMoveTo, NPC_Bowser_03, 450, 0, 140) + Call(SetNpcAnimation, NPC_Bowser_03, ANIM_WorldBowser_Idle) + EndThread + Set(MV_DestructState, DESTRUCT_STATE_4) + Wait(155) + Call(GetNpcPos, NPC_Bowser_03, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-10.5)) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToNpc, NPC_Bowser_03, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 512, NPC_Kammy_05, MSG_CH8_00AE) + Wait(5) + Call(PlaySoundAt, SOUND_KPA_ARENA_EXPLODING, SOUND_SPACE_DEFAULT, 350, 50, -100) + PlayEffect(EFFECT_RING_BLAST, 0, 350, 50, -100, Float(4.0), 20) + Set(MV_DestructState, DESTRUCT_STATE_5) + Wait(25) + Call(SpeakToNpc, NPC_Kammy_05, ANIM_BattleKammy_Anim06, ANIM_BattleKammy_Anim04, 512, NPC_Bowser_03, MSG_CH8_00AF) + Wait(10) + Thread + Call(SetNpcAnimation, NPC_Bowser_03, ANIM_WorldBowser_Shock) + Wait(20) + Call(SetNpcAnimation, NPC_Bowser_03, ANIM_WorldBowser_Idle) + EndThread + Thread + Call(PlaySoundAt, SOUND_KPA_ARENA_EXPLODING, SOUND_SPACE_DEFAULT, 570, 0, 100) + PlayEffect(EFFECT_RING_BLAST, 0, 570, 0, 100, Float(4.0), 20) + Set(MV_DestructState, DESTRUCT_STATE_6) + EndThread + Wait(30) + Call(SpeakToNpc, NPC_Bowser_03, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 512, NPC_Kammy_05, MSG_CH8_00B0) + Set(MV_ArenaState, ARENA_STATE_BROKEN) + Wait(20) + Call(StopSound, SOUND_LRAW_RUMBLE) + Call(PlaySoundAt, SOUND_KPA_EXPLOSION_CLUSTER, SOUND_SPACE_DEFAULT, 500, 0, 100) + PlayEffect(EFFECT_RING_BLAST, 0, 500, 0, 100, Float(8.0), 90) + Set(MV_DestructState, DESTRUCT_STATE_7) + Call(SetNpcAnimation, NPC_Bowser_03, ANIM_WorldBowser_Shock) + Call(ShowMessageAtScreenPos, MSG_CH8_00B1, 160, 40) + Call(N(FadeScreenToRedAndWhite)) + Call(TranslateGroup, MODEL_Root, -200, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o128) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, -200) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Peach_02, LVar0, LVar1, LVar2) + Add(LVar0, -200) + Call(SetNpcPos, NPC_Peach_02, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Twink_02, LVar0, LVar1, LVar2) + Add(LVar0, -200) + Call(SetNpcPos, NPC_Twink_02, LVar0, LVar1, LVar2) + Set(LVar0, 500) + Set(LVar1, 0) + Set(LVar2, 0) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(0.0), Float(-7.0)) + Call(SetCamDistance, CAM_DEFAULT, 1100) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetNpcAnimation, NPC_Bowser_03, ANIM_WorldBowser_Idle) + Call(InterpNpcYaw, NPC_Kammy_05, 90, 0) + Wait(5) + Call(SetNpcRotationPivot, NPC_Bowser_03, 34) + Call(SetNpcRotationPivot, NPC_Kammy_05, 12) + Wait(10) + Thread + Call(N(FadeScreenFromWhite)) + EndThread + ExecWait(N(EVS_BowserAndKammyBlownAway)) + Call(GotoMap, Ref("osr_03"), osr_03_ENTRY_5) + Wait(100) + Return + End }; diff --git a/src/world/area_kkj/kkj_25/kkj_25_9_entity.c b/src/world/area_kkj/kkj_25/kkj_25_9_entity.c index f73eec645f6..27b67f3c417 100644 --- a/src/world/area_kkj/kkj_25/kkj_25_9_entity.c +++ b/src/world/area_kkj/kkj_25/kkj_25_9_entity.c @@ -2,12 +2,12 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_KKJ25_Defeated_Kammy, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_GreenStompSwitch), 300, 0, 0, 0, MAKE_ENTITY_END) - EVT_SET(MV_SwitchEntityIdx, LVar0) - EVT_CALL(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_KKJ_1A)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Scene_ActivateMachine)), TRIGGER_AREA_FLAG_SET, AF_KKJ_1A, 1, 0) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_KKJ25_Defeated_Kammy, FALSE) + Call(MakeEntity, Ref(Entity_GreenStompSwitch), 300, 0, 0, 0, MAKE_ENTITY_END) + Set(MV_SwitchEntityIdx, LVar0) + Call(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_KKJ_1A)) + BindTrigger(Ref(N(EVS_Scene_ActivateMachine)), TRIGGER_AREA_FLAG_SET, AF_KKJ_1A, 1, 0) + EndIf + Return + End }; diff --git a/src/world/area_kkj/kkj_26/kkj_26_1_main.c b/src/world/area_kkj/kkj_26/kkj_26_1_main.c index 5e2e3e0fde6..3446065c788 100644 --- a/src/world/area_kkj/kkj_26/kkj_26_1_main.c +++ b/src/world/area_kkj/kkj_26/kkj_26_1_main.c @@ -3,71 +3,71 @@ #include "../common/RestoreFromPeachState.inc.c" EvtScript N(EVS_GotoMap_hos_00_1) = { - EVT_SET(LVar0, GB_KKJ_LastPartner) - EVT_CALL(N(RestoreFromPeachState)) - EVT_CALL(PlaySound, SOUND_SLIDE_WHISTLE_OUT) - EVT_CALL(GotoMapSpecial, EVT_PTR("hos_00"), hos_00_ENTRY_1, TRANSITION_END_PEACH_INTERLUDE) - EVT_WAIT(100) + Set(LVar0, GB_KKJ_LastPartner) + Call(N(RestoreFromPeachState)) + Call(PlaySound, SOUND_SLIDE_WHISTLE_OUT) + Call(GotoMapSpecial, Ref("hos_00"), hos_00_ENTRY_1, TRANSITION_END_PEACH_INTERLUDE) + Wait(100) }; EvtScript N(EVS_ExitDoors_kkj_14_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, kkj_26_ENTRY_0) - EVT_SET(LVar1, COLLIDER_ttw) - EVT_SET(LVar2, MODEL_o85) - EVT_SET(LVar3, MODEL_o83) - EVT_SET(LVar4, MODEL_o86) - EVT_SET(LVar5, MODEL_o84) - EVT_EXEC(ExitSplitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kkj_14"), kkj_14_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, kkj_26_ENTRY_0) + Set(LVar1, COLLIDER_ttw) + Set(LVar2, MODEL_o85) + Set(LVar3, MODEL_o83) + Set(LVar4, MODEL_o86) + Set(LVar5, MODEL_o84) + Exec(ExitSplitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("kkj_14"), kkj_14_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_14_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_kkj_14_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kkj_26_ENTRY_0) - EVT_SET(LVar2, MODEL_o85) - EVT_SET(LVar3, MODEL_o83) - EVT_SET(LVar4, MODEL_o86) - EVT_SET(LVar5, MODEL_o84) - EVT_EXEC_WAIT(EnterSplitDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kkj_26_ENTRY_1) - EVT_EXEC(N(EVS_Scene_AfterAllSpiritsRescued)) - EVT_CASE_EQ(kkj_26_ENTRY_2) - EVT_EXEC(N(EVS_Scene_WhereIsMario)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kkj_26_ENTRY_0) + Set(LVar2, MODEL_o85) + Set(LVar3, MODEL_o83) + Set(LVar4, MODEL_o86) + Set(LVar5, MODEL_o84) + ExecWait(EnterSplitDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kkj_26_ENTRY_1) + Exec(N(EVS_Scene_AfterAllSpiritsRescued)) + CaseEq(kkj_26_ENTRY_2) + Exec(N(EVS_Scene_WhereIsMario)) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PEACHS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_KKJ_26) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kkj_26_ENTRY_1) - EVT_SET(GB_StoryProgress, STORY_CH7_BEGAN_PEACH_MISSION) - EVT_END_IF - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_DOOR) - EVT_CALL(GetDemoState, LVar0) - EVT_IF_NE(LVar0, DEMO_STATE_NONE) - EVT_EXEC_WAIT(N(EVS_PlayDemoScene)) - EVT_RETURN - EVT_END_IF - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_PEACHS_CASTLE) + Call(SetSpriteShading, SHADING_KKJ_26) + SetUP_CAMERA_DEFAULT() + Call(GetEntryID, LVar0) + IfEq(LVar0, kkj_26_ENTRY_1) + Set(GB_StoryProgress, STORY_CH7_BEGAN_PEACH_MISSION) + EndIf + Call(UseDoorSounds, DOOR_SOUNDS_DOOR) + Call(GetDemoState, LVar0) + IfNe(LVar0, DEMO_STATE_NONE) + ExecWait(N(EVS_PlayDemoScene)) + Return + EndIf + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_kkj/kkj_26/kkj_26_2_scenes.c b/src/world/area_kkj/kkj_26/kkj_26_2_scenes.c index b658d9bd230..b531ecb4c9e 100644 --- a/src/world/area_kkj/kkj_26/kkj_26_2_scenes.c +++ b/src/world/area_kkj/kkj_26/kkj_26_2_scenes.c @@ -2,77 +2,77 @@ #include "sprite/player.h" EvtScript N(EVS_Scene_WhereIsMario) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetMusicTrack, 0, SONG_PRISONER_PEACH_THEME, 1, 8) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, 0, -500, 0) - EVT_CALL(RotateModel, MODEL_o85, 80, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o83, 80, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o86, 80, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o84, 80, 0, 1, 0) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 550, 30, -20) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(200.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.5), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(570.0), 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(50) - EVT_CALL(func_802D1270, 550, -20, EVT_FLOAT(2.0)) - EVT_WAIT(30) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_RaiseArms) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_0032) - EVT_CALL(FadeOutMusic, 0, 4000) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC_WAIT(N(EVS_GotoMap_hos_00_1)) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetMusicTrack, 0, SONG_PRISONER_PEACH_THEME, 1, 8) + Call(DisablePartnerAI, 0) + Call(SetNpcPos, NPC_PARTNER, 0, -500, 0) + Call(RotateModel, MODEL_o85, 80, 0, -1, 0) + Call(RotateModel, MODEL_o83, 80, 0, 1, 0) + Call(RotateModel, MODEL_o86, 80, 0, -1, 0) + Call(RotateModel, MODEL_o84, 80, 0, 1, 0) + Call(UseSettingsFrom, CAM_DEFAULT, 550, 30, -20) + Call(SetCamDistance, CAM_DEFAULT, Float(200.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.5), Float(-10.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(570.0), 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(50) + Call(func_802D1270, 550, -20, Float(2.0)) + Wait(30) + Call(SetPlayerAnimation, ANIM_Peach2_RaiseArms) + Wait(10) + Call(SetPlayerAnimation, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_0032) + Call(FadeOutMusic, 0, 4000) + Call(ResetCam, CAM_DEFAULT, Float(1.0)) + ExecWait(N(EVS_GotoMap_hos_00_1)) + Call(EnablePartnerAI) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Scene_AfterAllSpiritsRescued) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetMusicTrack, 0, SONG_PRISONER_PEACH_THEME, 1, 8) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, 500, 50, 0) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 90) - EVT_WAIT(30 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 500, 30, -20) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_RaiseArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_015E) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LowerArms) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 5, MSG_Peach_015F) - EVT_CALL(PlayerFaceNpc, NPC_PARTNER, 5) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 5, MSG_Peach_0160) - EVT_WAIT(10 * DT) - EVT_CALL(EnablePartnerAI) - EVT_CALL(func_802D1270, 480, -20, EVT_FLOAT(2.0 / DT)) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_OpenDoors) - EVT_SET(LVar0, kkj_26_ENTRY_0) - EVT_SET(LVar1, COLLIDER_ttw) - EVT_SET(LVar2, MODEL_o85) - EVT_SET(LVar3, MODEL_o83) - EVT_SET(LVar4, MODEL_o86) - EVT_SET(LVar5, MODEL_o84) - EVT_EXEC(ExitSplitDoubleDoor) - EVT_WAIT(17 * DT) - EVT_CALL(GotoMap, EVT_PTR("kkj_14"), kkj_14_ENTRY_A) - EVT_WAIT(100) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(SetMusicTrack, 0, SONG_PRISONER_PEACH_THEME, 1, 8) + Call(InterpPlayerYaw, 90, 0) + Call(SetNpcPos, NPC_PARTNER, 500, 50, 0) + Call(SetNpcYaw, NPC_PARTNER, 90) + Wait(30 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, 500, 30, -20) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-7.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetPlayerAnimation, ANIM_Peach2_RaiseArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Peach_015E) + Call(SetPlayerAnimation, ANIM_Peach2_LowerArms) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 5, MSG_Peach_015F) + Call(PlayerFaceNpc, NPC_PARTNER, 5) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach3_InformalTalk, ANIM_Peach1_Idle, 5, MSG_Peach_0160) + Wait(10 * DT) + Call(EnablePartnerAI) + Call(func_802D1270, 480, -20, Float(2.0 / DT)) + Call(SetPlayerAnimation, ANIM_Peach2_OpenDoors) + Set(LVar0, kkj_26_ENTRY_0) + Set(LVar1, COLLIDER_ttw) + Set(LVar2, MODEL_o85) + Set(LVar3, MODEL_o83) + Set(LVar4, MODEL_o86) + Set(LVar5, MODEL_o84) + Exec(ExitSplitDoubleDoor) + Wait(17 * DT) + Call(GotoMap, Ref("kkj_14"), kkj_14_ENTRY_A) + Wait(100) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_kkj/kkj_26/kkj_26_3_demo.c b/src/world/area_kkj/kkj_26/kkj_26_3_demo.c index a72f953c59c..d42f833f4ca 100644 --- a/src/world/area_kkj/kkj_26/kkj_26_3_demo.c +++ b/src/world/area_kkj/kkj_26/kkj_26_3_demo.c @@ -2,60 +2,60 @@ #include "sprite/player.h" EvtScript N(EVS_ProvideDemoInputs) = { - EVT_CALL(EnableWorldStatusBar, FALSE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 550, 30, -20) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(200.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.5), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(570.0), 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(60) - EVT_CALL(DemoJoystickXY, 10, 0) - EVT_WAIT(40) - EVT_CALL(DemoJoystickXY, 0, 0) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_RaiseArms) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_TalkIdle) - EVT_WAIT(20) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_IF_EQ(GF_DemoSceneDone, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_DemoSceneDone, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("kkj_26"), kkj_26_ENTRY_2, TRANSITION_SLOW_FADE_TO_WHITE) - EVT_WAIT(110) - EVT_RETURN - EVT_END + Call(EnableWorldStatusBar, FALSE) + Call(UseSettingsFrom, CAM_DEFAULT, 550, 30, -20) + Call(SetCamDistance, CAM_DEFAULT, Float(200.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.5), Float(-10.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(570.0), 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(60) + Call(DemoJoystickXY, 10, 0) + Wait(40) + Call(DemoJoystickXY, 0, 0) + Wait(10) + Call(SetPlayerAnimation, ANIM_Peach2_RaiseArms) + Wait(10) + Call(SetPlayerAnimation, ANIM_Peach2_TalkIdle) + Wait(20) + Call(ResetCam, CAM_DEFAULT, Float(1.0)) + IfEq(GF_DemoSceneDone, TRUE) + Return + EndIf + Set(GF_DemoSceneDone, TRUE) + Call(GotoMapSpecial, Ref("kkj_26"), kkj_26_ENTRY_2, TRANSITION_SLOW_FADE_TO_WHITE) + Wait(110) + Return + End }; EvtScript N(EVS_MonitorDemoState) = { - EVT_WAIT(10) - EVT_LOOP(0) - EVT_CALL(GetDemoState, LVar0) - EVT_IF_EQ(LVar0, DEMO_STATE_CHANGE_MAP) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(GF_DemoSceneDone, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_DemoSceneDone, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("kkj_26"), kkj_26_ENTRY_2, TRANSITION_SLOW_FADE_TO_WHITE) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Wait(10) + Loop(0) + Call(GetDemoState, LVar0) + IfEq(LVar0, DEMO_STATE_CHANGE_MAP) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(GF_DemoSceneDone, TRUE) + Return + EndIf + Set(GF_DemoSceneDone, TRUE) + Call(GotoMapSpecial, Ref("kkj_26"), kkj_26_ENTRY_2, TRANSITION_SLOW_FADE_TO_WHITE) + Wait(100) + Return + End }; EvtScript N(EVS_PlayDemoScene) = { - EVT_CALL(RotateModel, MODEL_o85, 80, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o83, 80, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o86, 80, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o84, 80, 0, 1, 0) - EVT_SET(GF_DemoSceneDone, FALSE) - EVT_EXEC(N(EVS_MonitorDemoState)) - EVT_EXEC(N(EVS_ProvideDemoInputs)) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o85, 80, 0, -1, 0) + Call(RotateModel, MODEL_o83, 80, 0, 1, 0) + Call(RotateModel, MODEL_o86, 80, 0, -1, 0) + Call(RotateModel, MODEL_o84, 80, 0, 1, 0) + Set(GF_DemoSceneDone, FALSE) + Exec(N(EVS_MonitorDemoState)) + Exec(N(EVS_ProvideDemoInputs)) + Return + End }; diff --git a/src/world/area_kkj/kkj_27/kkj_27_1_music.c b/src/world/area_kkj/kkj_27/kkj_27_1_music.c index 5b779c486b7..3b6ea14c15b 100644 --- a/src/world/area_kkj/kkj_27/kkj_27_1_music.c +++ b/src/world/area_kkj/kkj_27/kkj_27_1_music.c @@ -1,20 +1,20 @@ #include "kkj_27.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_OR_EQ(STORY_CH0_BEGAN_PEACH_MISSION) - EVT_CASE_OR_EQ(STORY_CH1_BEGAN_PEACH_MISSION) - EVT_CASE_OR_EQ(STORY_CH3_BEGAN_PEACH_MISSION) - EVT_CASE_OR_EQ(STORY_CH7_BEGAN_PEACH_MISSION) - EVT_CALL(SetMusicTrack, 0, SONG_PRISONER_PEACH_THEME, 0, 6) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(STORY_CH2_BEGAN_PEACH_MISSION) - EVT_CASE_OR_EQ(STORY_CH4_BEGAN_PEACH_MISSION) - EVT_CASE_OR_EQ(STORY_CH5_BEGAN_PEACH_MISSION) - EVT_CASE_OR_EQ(STORY_CH6_BEGAN_PEACH_MISSION) - EVT_CALL(SetMusicTrack, 0, SONG_PEACH_MISSION, 0, 6) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseOrEq(STORY_CH0_BEGAN_PEACH_MISSION) + CaseOrEq(STORY_CH1_BEGAN_PEACH_MISSION) + CaseOrEq(STORY_CH3_BEGAN_PEACH_MISSION) + CaseOrEq(STORY_CH7_BEGAN_PEACH_MISSION) + Call(SetMusicTrack, 0, SONG_PRISONER_PEACH_THEME, 0, 6) + EndCaseGroup + CaseOrEq(STORY_CH2_BEGAN_PEACH_MISSION) + CaseOrEq(STORY_CH4_BEGAN_PEACH_MISSION) + CaseOrEq(STORY_CH5_BEGAN_PEACH_MISSION) + CaseOrEq(STORY_CH6_BEGAN_PEACH_MISSION) + Call(SetMusicTrack, 0, SONG_PEACH_MISSION, 0, 6) + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/world/area_kkj/kkj_27/kkj_27_2_main.c b/src/world/area_kkj/kkj_27/kkj_27_2_main.c index 6f464d0699a..166944f05c0 100644 --- a/src/world/area_kkj/kkj_27/kkj_27_2_main.c +++ b/src/world/area_kkj/kkj_27/kkj_27_2_main.c @@ -24,50 +24,50 @@ Gfx N(setup_gfx_candle_lights)[] = { EvtScript N(EVS_ExitWalk_kkj_14_2) = EVT_EXIT_WALK(60, kkj_27_ENTRY_0, "kkj_14", kkj_14_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kkj_14_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kkj_14_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(D_80240778_B144E8) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kkj_27_ENTRY_0) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kkj_27_ENTRY_0) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PEACHS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_KKJ_27) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_EXEC(N(EVS_SetupRotatingWall)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(D_80240778_B144E8)) - EVT_CALL(SetTexPanner, MODEL_o207, 0) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_PEACHS_CASTLE) + Call(SetSpriteShading, SHADING_KKJ_27) + SetUP_CAMERA_NO_LEAD() + Exec(N(EVS_SetupRotatingWall)) + Exec(N(EVS_SetupMusic)) + Exec(N(D_80240778_B144E8)) + Call(SetTexPanner, MODEL_o207, 0) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_0) TEX_PAN_PARAMS_STEP( 0, 0, 40, 900) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetModelCustomGfx, MODEL_o207, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetCustomGfx, CUSTOM_GFX_0, EVT_PTR(N(setup_gfx_candle_lights)), NULL) - EVT_CALL(SetTexPanner, MODEL_o209, 0) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetModelCustomGfx, MODEL_o207, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetCustomGfx, CUSTOM_GFX_0, Ref(N(setup_gfx_candle_lights)), NULL) + Call(SetTexPanner, MODEL_o209, 0) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_0) TEX_PAN_PARAMS_STEP( 0, 0, 40, 900) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetModelCustomGfx, MODEL_o209, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetCustomGfx, CUSTOM_GFX_0, EVT_PTR(N(setup_gfx_candle_lights)), NULL) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetModelCustomGfx, MODEL_o209, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetCustomGfx, CUSTOM_GFX_0, Ref(N(setup_gfx_candle_lights)), NULL) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Return + End }; diff --git a/src/world/area_kkj/kkj_27/kkj_27_3_rotating_wall.c b/src/world/area_kkj/kkj_27/kkj_27_3_rotating_wall.c index 39c01ee3256..b44779ea89f 100644 --- a/src/world/area_kkj/kkj_27/kkj_27_3_rotating_wall.c +++ b/src/world/area_kkj/kkj_27/kkj_27_3_rotating_wall.c @@ -32,111 +32,111 @@ void N(setup_gfx_spill_light)(void) { } EvtScript N(EVS_Scene_RotatingWall) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g29, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o124, COLLIDER_FLAGS_UPPER_MASK) - EVT_THREAD - EVT_CALL(PlaySoundAt, SOUND_KKJ_ROTATING_WALL, SOUND_SPACE_DEFAULT, -250, 5, 0) - EVT_CALL(GetPlayerPos, LVar9, LVar0, LVarA) - EVT_CALL(MakeLerp, 0, -450, 120 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, LVar0) - EVT_DIVF(LVar2, 10) - EVT_CALL(RotateGroup, MODEL_g29, LVar2, 0, 1, 0) - EVT_CALL(N(UpdateRotatingPlayerPosition)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(EnableModel, MODEL_o182, TRUE) - EVT_CALL(EnableModel, MODEL_o184, TRUE) - EVT_CALL(EnableModel, MODEL_o186, TRUE) - EVT_CALL(MakeLerp, 8, 255, 40 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetSpillLightAmount), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(80 * DT) - EVT_SET(GF_KKJ14_SkipSecretPassage, TRUE) - EVT_CALL(GotoMap, EVT_PTR("kkj_15"), kkj_15_ENTRY_1) - EVT_WAIT(100 * DT) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g29, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o124, COLLIDER_FLAGS_UPPER_MASK) + Thread + Call(PlaySoundAt, SOUND_KKJ_ROTATING_WALL, SOUND_SPACE_DEFAULT, -250, 5, 0) + Call(GetPlayerPos, LVar9, LVar0, LVarA) + Call(MakeLerp, 0, -450, 120 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, LVar0) + DivF(LVar2, 10) + Call(RotateGroup, MODEL_g29, LVar2, 0, 1, 0) + Call(N(UpdateRotatingPlayerPosition)) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(EnableModel, MODEL_o182, TRUE) + Call(EnableModel, MODEL_o184, TRUE) + Call(EnableModel, MODEL_o186, TRUE) + Call(MakeLerp, 8, 255, 40 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(N(SetSpillLightAmount), LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Wait(80 * DT) + Set(GF_KKJ14_SkipSecretPassage, TRUE) + Call(GotoMap, Ref("kkj_15"), kkj_15_ENTRY_1) + Wait(100 * DT) + Return + End }; EvtScript N(EVS_UseRotatingWall) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(PlayerMoveTo, -205, -10, 15 * DT) - EVT_CALL(InterpPlayerYaw, 270, 5) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach3_ReachForButton) - EVT_WAIT(10 * DT) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o193, SOUND_KKJ_PRESS_BUTTON, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Peach3_PressButton) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach3_AfterPressButton) - EVT_WAIT(10 * DT) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(1.0)) - EVT_EXEC_WAIT(N(EVS_Scene_RotatingWall)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(PlayerMoveTo, -205, -10, 15 * DT) + Call(InterpPlayerYaw, 270, 5) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach3_ReachForButton) + Wait(10 * DT) + Call(PlaySoundAtCollider, COLLIDER_o193, SOUND_KKJ_PRESS_BUTTON, 0) + Call(SetPlayerAnimation, ANIM_Peach3_PressButton) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach3_AfterPressButton) + Wait(10 * DT) + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(1.0)) + ExecWait(N(EVS_Scene_RotatingWall)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_UseRotatingWall_FirstTime) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(FacePlayerTowardPoint, -222, 0, 5) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach3_ReachForButton) - EVT_WAIT(10 * DT) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o193, SOUND_KKJ_PRESS_BUTTON, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Peach3_PressButton) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach3_AfterPressButton) - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Cringe) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10) - EVT_CALL(EnablePartnerAI) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LookAround) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Gasp, ANIM_Peach2_GaspStill, 5, MSG_Peach_0048) - EVT_END_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0)) - EVT_EXEC_WAIT(N(EVS_Scene_RotatingWall)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(FacePlayerTowardPoint, -222, 0, 5) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach3_ReachForButton) + Wait(10 * DT) + Call(PlaySoundAtCollider, COLLIDER_o193, SOUND_KKJ_PRESS_BUTTON, 0) + Call(SetPlayerAnimation, ANIM_Peach3_PressButton) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach3_AfterPressButton) + Wait(10 * DT) + Thread + Call(DisablePartnerAI, 0) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Cringe) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10) + Call(EnablePartnerAI) + EndThread + Thread + Call(InterpPlayerYaw, 270, 0) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_LookAround) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Gasp, ANIM_Peach2_GaspStill, 5, MSG_Peach_0048) + EndThread + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.0)) + ExecWait(N(EVS_Scene_RotatingWall)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SetupRotatingWall) = { - EVT_CALL(EnableModel, MODEL_o182, FALSE) - EVT_CALL(EnableModel, MODEL_o184, FALSE) - EVT_CALL(EnableModel, MODEL_o186, FALSE) - EVT_CALL(SetModelCustomGfx, MODEL_o182, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_o184, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_o186, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(setup_gfx_spill_light)), NULL) - EVT_IF_EQ(GB_StoryProgress, STORY_CH1_BEGAN_PEACH_MISSION) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseRotatingWall_FirstTime)), TRIGGER_WALL_PRESS_A, COLLIDER_o193, 1, 0) - EVT_ELSE - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseRotatingWall)), TRIGGER_WALL_PRESS_A, COLLIDER_o193, 1, 0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_o182, FALSE) + Call(EnableModel, MODEL_o184, FALSE) + Call(EnableModel, MODEL_o186, FALSE) + Call(SetModelCustomGfx, MODEL_o182, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_o184, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_o186, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) + Call(SetCustomGfxBuilders, CUSTOM_GFX_1, Ref(N(setup_gfx_spill_light)), NULL) + IfEq(GB_StoryProgress, STORY_CH1_BEGAN_PEACH_MISSION) + BindTrigger(Ref(N(EVS_UseRotatingWall_FirstTime)), TRIGGER_WALL_PRESS_A, COLLIDER_o193, 1, 0) + Else + BindTrigger(Ref(N(EVS_UseRotatingWall)), TRIGGER_WALL_PRESS_A, COLLIDER_o193, 1, 0) + EndIf + Return + End }; diff --git a/src/world/area_kkj/kkj_28/kkj_28_1_main.c b/src/world/area_kkj/kkj_28/kkj_28_1_main.c index 55d3dbe7210..fdbb28492c1 100644 --- a/src/world/area_kkj/kkj_28/kkj_28_1_main.c +++ b/src/world/area_kkj/kkj_28/kkj_28_1_main.c @@ -1,36 +1,36 @@ #include "kkj_28.h" EvtScript N(EVS_ExitDoor_kkj_10_2) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, kkj_28_ENTRY_0) - EVT_SET(LVar1, COLLIDER_tte) - EVT_SET(LVar2, MODEL_o162) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kkj_10"), kkj_10_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, kkj_28_ENTRY_0) + Set(LVar1, COLLIDER_tte) + Set(LVar2, MODEL_o162) + Set(LVar3, DOOR_SWING_IN) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("kkj_10"), kkj_10_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_SET(LVar2, MODEL_o162) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_RETURN - EVT_END + Set(LVar2, MODEL_o162) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PEACHS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(EnableGroup, MODEL_g40, FALSE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_kkj_10_2)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_PEACHS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(EnableGroup, MODEL_g40, FALSE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + BindTrigger(Ref(N(EVS_ExitDoor_kkj_10_2)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_kkj/kkj_29/kkj_29_1_main.c b/src/world/area_kkj/kkj_29/kkj_29_1_main.c index 6cda09212e6..47dacb9c59f 100644 --- a/src/world/area_kkj/kkj_29/kkj_29_1_main.c +++ b/src/world/area_kkj/kkj_29/kkj_29_1_main.c @@ -3,55 +3,55 @@ #include "../common/RestoreFromPeachState.inc.c" EvtScript N(EVS_EndPeachChapter5) = { - EVT_SET(LVar0, GB_KKJ_LastPartner) - EVT_CALL(N(RestoreFromPeachState)) - EVT_CALL(PlaySound, SOUND_SLIDE_WHISTLE_OUT) - EVT_CALL(GotoMapSpecial, EVT_PTR("jan_22"), jan_22_ENTRY_3, TRANSITION_END_PEACH_INTERLUDE) - EVT_WAIT(100) + Set(LVar0, GB_KKJ_LastPartner) + Call(N(RestoreFromPeachState)) + Call(PlaySound, SOUND_SLIDE_WHISTLE_OUT) + Call(GotoMapSpecial, Ref("jan_22"), jan_22_ENTRY_3, TRANSITION_END_PEACH_INTERLUDE) + Wait(100) }; //@bug script not properly terminated EvtScript N(EVS_ExitDoor_kkj_10_2) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, kkj_29_ENTRY_0) - EVT_SET(LVar1, COLLIDER_tte) - EVT_SET(LVar2, MODEL_o57) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kkj_10"), kkj_10_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, kkj_29_ENTRY_0) + Set(LVar1, COLLIDER_tte) + Set(LVar2, MODEL_o57) + Set(LVar3, DOOR_SWING_IN) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("kkj_10"), kkj_10_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH5_BEGAN_PEACH_MISSION) - EVT_EXEC(N(EVS_ManageQuizGame)) - EVT_ELSE - EVT_SET(LVar0, kkj_29_ENTRY_0) - EVT_SET(LVar2, MODEL_o57) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH5_BEGAN_PEACH_MISSION) + Exec(N(EVS_ManageQuizGame)) + Else + Set(LVar0, kkj_29_ENTRY_0) + Set(LVar2, MODEL_o57) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + EndIf + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PEACHS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_IF_EQ(GB_StoryProgress, STORY_CH5_BEGAN_PEACH_MISSION) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_END_IF - EVT_EXEC(N(EVS_ManageStageEffects)) - EVT_IF_LT(GB_StoryProgress, STORY_CH8_REACHED_PEACHS_CASTLE) - EVT_CALL(FadeOutMusic, 0, 500) - EVT_END_IF - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_kkj_10_2)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_PEACHS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + IfEq(GB_StoryProgress, STORY_CH5_BEGAN_PEACH_MISSION) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + EndIf + Exec(N(EVS_ManageStageEffects)) + IfLt(GB_StoryProgress, STORY_CH8_REACHED_PEACHS_CASTLE) + Call(FadeOutMusic, 0, 500) + EndIf + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + BindTrigger(Ref(N(EVS_ExitDoor_kkj_10_2)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_kkj/kkj_29/kkj_29_2_npc.c b/src/world/area_kkj/kkj_29/kkj_29_2_npc.c index e7ffb6a4d6f..4f891300dea 100644 --- a/src/world/area_kkj/kkj_29/kkj_29_2_npc.c +++ b/src/world/area_kkj/kkj_29/kkj_29_2_npc.c @@ -5,24 +5,24 @@ #include "world/common/enemy/HammerBros.inc.c" EvtScript N(EVS_NpcInit_HammerBros) = { - EVT_CALL(SetNpcPos, NPC_SELF, 0, 0, -25) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, 0, 0, -25) + Call(SetNpcYaw, NPC_SELF, 90) + Return + End }; EvtScript N(EVS_NpcInit_Koopatrol_01) = { - EVT_CALL(SetNpcPos, NPC_SELF, 175, 0, -25) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, 175, 0, -25) + Call(SetNpcYaw, NPC_SELF, 270) + Return + End }; EvtScript N(EVS_NpcInit_Koopatrol_02) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim03) - EVT_CALL(SetNpcPos, NPC_SELF, -140, 30, -140) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKoopatrol_Anim03) + Call(SetNpcPos, NPC_SELF, -140, 30, -140) + Return + End }; AnimID N(ExtraAnims_Bowser)[] = { diff --git a/src/world/area_kkj/kkj_29/kkj_29_3_quiz.c b/src/world/area_kkj/kkj_29/kkj_29_3_quiz.c index 3c57cb73267..c6eb73bc7b7 100644 --- a/src/world/area_kkj/kkj_29/kkj_29_3_quiz.c +++ b/src/world/area_kkj/kkj_29/kkj_29_3_quiz.c @@ -29,109 +29,109 @@ API_CALLABLE(N(AwaitPlayerBuzzIn)) { } EvtScript N(EVS_GiveItemToKoopatrol) = { - EVT_CALL(SetNpcAnimation, LVar1, ANIM_WorldKoopatrol_Anim1B) - EVT_SET(LVarA, LVar0) - EVT_CALL(GetNpcPos, LVar1, LVar5, LVar6, LVar7) - EVT_ADD(LVar6, 40) - EVT_CALL(MakeItemEntity, LVarA, LVar5, LVar6, LVar7, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVarB, LVar0) - EVT_CALL(PlaySound, SOUND_JINGLE_GOT_KEY) - EVT_CALL(ShowMessageAtScreenPos, LVar2, 160, 40) - EVT_CALL(RemoveItemEntity, LVarB) - EVT_CALL(SetNpcAnimation, LVar1, ANIM_WorldKoopatrol_Anim03) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, LVar1, ANIM_WorldKoopatrol_Anim1B) + Set(LVarA, LVar0) + Call(GetNpcPos, LVar1, LVar5, LVar6, LVar7) + Add(LVar6, 40) + Call(MakeItemEntity, LVarA, LVar5, LVar6, LVar7, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVarB, LVar0) + Call(PlaySound, SOUND_JINGLE_GOT_KEY) + Call(ShowMessageAtScreenPos, LVar2, 160, 40) + Call(RemoveItemEntity, LVarB) + Call(SetNpcAnimation, LVar1, ANIM_WorldKoopatrol_Anim03) + Return + End }; EvtScript N(EVS_SetCam_Contestants) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -265, 0, -140) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -265, 0, -140) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, -265, 0, -140) + Call(SetPanTarget, CAM_DEFAULT, -265, 0, -140) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Return + End }; EvtScript N(EVS_UpdateScores) = { - EVT_SWITCH(AB_KKJ29_AnsweringContestant) - EVT_CASE_EQ(CONTESTANT_LEFT) - EVT_IF_EQ(AB_KKJ29_AnswerScore, ANSWER_RIGHT) - EVT_ADD(AB_KKJ29_LeftKoopatrolScore, 1) - EVT_ELSE - EVT_IF_GT(AB_KKJ29_LeftKoopatrolScore, 0) - EVT_SUB(AB_KKJ29_LeftKoopatrolScore, 1) - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(CONTESTANT_PEACH) - EVT_IF_EQ(AB_KKJ29_AnswerScore, ANSWER_RIGHT) - EVT_ADD(AB_KKJ29_PeachScore, 1) - EVT_ELSE - EVT_IF_GT(AB_KKJ29_PeachScore, 0) - EVT_SUB(AB_KKJ29_PeachScore, 1) - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(CONTESTANT_RIGHT) - EVT_IF_EQ(AB_KKJ29_AnswerScore, ANSWER_RIGHT) - EVT_ADD(AB_KKJ29_RightKoopatrolScore, 1) - EVT_ELSE - EVT_IF_GT(AB_KKJ29_RightKoopatrolScore, 0) - EVT_SUB(AB_KKJ29_RightKoopatrolScore, 1) - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(AB_KKJ29_AnsweringContestant) + CaseEq(CONTESTANT_LEFT) + IfEq(AB_KKJ29_AnswerScore, ANSWER_RIGHT) + Add(AB_KKJ29_LeftKoopatrolScore, 1) + Else + IfGt(AB_KKJ29_LeftKoopatrolScore, 0) + Sub(AB_KKJ29_LeftKoopatrolScore, 1) + EndIf + EndIf + CaseEq(CONTESTANT_PEACH) + IfEq(AB_KKJ29_AnswerScore, ANSWER_RIGHT) + Add(AB_KKJ29_PeachScore, 1) + Else + IfGt(AB_KKJ29_PeachScore, 0) + Sub(AB_KKJ29_PeachScore, 1) + EndIf + EndIf + CaseEq(CONTESTANT_RIGHT) + IfEq(AB_KKJ29_AnswerScore, ANSWER_RIGHT) + Add(AB_KKJ29_RightKoopatrolScore, 1) + Else + IfGt(AB_KKJ29_RightKoopatrolScore, 0) + Sub(AB_KKJ29_RightKoopatrolScore, 1) + EndIf + EndIf + EndSwitch + Return + End }; EvtScript N(EVS_WaitForBuzzIn) = { - EVT_CALL(PlaySound, SOUND_LRAW_QUIZ_TICKING) - EVT_CALL(N(AwaitPlayerBuzzIn)) - EVT_IF_EQ(LVar0, 0) // time's up + Call(PlaySound, SOUND_LRAW_QUIZ_TICKING) + Call(N(AwaitPlayerBuzzIn)) + IfEq(LVar0, 0) // time's up // player took too long, decide who will answer based on score - EVT_IF_LE(AB_KKJ29_LeftKoopatrolScore, AB_KKJ29_PeachScore) - EVT_SET(AB_KKJ29_AnsweringContestant, CONTESTANT_LEFT) - EVT_ELSE - EVT_SET(LVar0, AB_KKJ29_LeftKoopatrolScore) - EVT_SUB(LVar0, 1) - EVT_IF_LT(AB_KKJ29_RightKoopatrolScore, LVar0) - EVT_SET(AB_KKJ29_AnsweringContestant, CONTESTANT_RIGHT) - EVT_ELSE - EVT_SET(AB_KKJ29_AnsweringContestant, CONTESTANT_LEFT) - EVT_END_IF - EVT_END_IF - EVT_ELSE + IfLe(AB_KKJ29_LeftKoopatrolScore, AB_KKJ29_PeachScore) + Set(AB_KKJ29_AnsweringContestant, CONTESTANT_LEFT) + Else + Set(LVar0, AB_KKJ29_LeftKoopatrolScore) + Sub(LVar0, 1) + IfLt(AB_KKJ29_RightKoopatrolScore, LVar0) + Set(AB_KKJ29_AnsweringContestant, CONTESTANT_RIGHT) + Else + Set(AB_KKJ29_AnsweringContestant, CONTESTANT_LEFT) + EndIf + EndIf + Else // player will answer - EVT_SET(AB_KKJ29_AnsweringContestant, CONTESTANT_PEACH) - EVT_END_IF - EVT_CALL(StopSound, SOUND_LRAW_QUIZ_TICKING) - EVT_SET(AB_KKJ29_AnswerScore, ANSWER_PENDING) - EVT_SWITCH(AB_KKJ29_AnsweringContestant) - EVT_CASE_EQ(CONTESTANT_LEFT) - EVT_CALL(PlaySoundAtNpc, NPC_Koopatrol_01, SOUND_QUIZ_BUZZER, SOUND_SPACE_DEFAULT) - EVT_CALL(EndSpeech, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5) - EVT_CALL(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5, MSG_Peach_00FA) - EVT_CALL(GetNpcPos, NPC_Koopatrol_01, LVar0, LVar1, LVar2) - EVT_CASE_EQ(CONTESTANT_PEACH) - EVT_CALL(PlaySoundAtPlayer, SOUND_QUIZ_BUZZER, SOUND_SPACE_DEFAULT) - EVT_CALL(EndSpeech, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5) - EVT_CALL(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5, MSG_Peach_00F9) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CASE_EQ(CONTESTANT_RIGHT) - EVT_CALL(PlaySoundAtNpc, NPC_Koopatrol_02, SOUND_QUIZ_BUZZER, SOUND_SPACE_DEFAULT) - EVT_CALL(EndSpeech, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5) - EVT_CALL(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5, MSG_Peach_00FB) - EVT_CALL(GetNpcPos, NPC_Koopatrol_02, LVar0, LVar1, LVar2) - EVT_END_SWITCH - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-12.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Set(AB_KKJ29_AnsweringContestant, CONTESTANT_PEACH) + EndIf + Call(StopSound, SOUND_LRAW_QUIZ_TICKING) + Set(AB_KKJ29_AnswerScore, ANSWER_PENDING) + Switch(AB_KKJ29_AnsweringContestant) + CaseEq(CONTESTANT_LEFT) + Call(PlaySoundAtNpc, NPC_Koopatrol_01, SOUND_QUIZ_BUZZER, SOUND_SPACE_DEFAULT) + Call(EndSpeech, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5) + Call(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5, MSG_Peach_00FA) + Call(GetNpcPos, NPC_Koopatrol_01, LVar0, LVar1, LVar2) + CaseEq(CONTESTANT_PEACH) + Call(PlaySoundAtPlayer, SOUND_QUIZ_BUZZER, SOUND_SPACE_DEFAULT) + Call(EndSpeech, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5) + Call(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5, MSG_Peach_00F9) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + CaseEq(CONTESTANT_RIGHT) + Call(PlaySoundAtNpc, NPC_Koopatrol_02, SOUND_QUIZ_BUZZER, SOUND_SPACE_DEFAULT) + Call(EndSpeech, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5) + Call(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5, MSG_Peach_00FB) + Call(GetNpcPos, NPC_Koopatrol_02, LVar0, LVar1, LVar2) + EndSwitch + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(250.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-12.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; // LVar1 question @@ -141,461 +141,461 @@ EvtScript N(EVS_WaitForBuzzIn) = { // LVar5 rival choice selection // LVar6 host response to wrong answer EvtScript N(Script_DoRound) = { - EVT_CALL(PlaySound, SOUND_QUIZ_NEXT_QUESTION) - EVT_CALL(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5, LVar1) - EVT_SET(LVar0, LVar2) + Call(PlaySound, SOUND_QUIZ_NEXT_QUESTION) + Call(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5, LVar1) + Set(LVar0, LVar2) // wait for input - EVT_EXEC_WAIT(N(EVS_WaitForBuzzIn)) + ExecWait(N(EVS_WaitForBuzzIn)) // get an answer - EVT_SWITCH(AB_KKJ29_AnsweringContestant) - EVT_CASE_EQ(CONTESTANT_LEFT) - EVT_CALL(SpeakToPlayer, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim03, ANIM_WorldKoopatrol_Anim03, 5, LVar3) - EVT_SET(LVar0, LVar5) - EVT_CASE_EQ(CONTESTANT_PEACH) - EVT_CALL(ShowChoice, LVar4) - EVT_CASE_EQ(CONTESTANT_RIGHT) - EVT_CALL(SpeakToPlayer, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim03, ANIM_WorldKoopatrol_Anim03, 5, LVar3) - EVT_SET(LVar0, LVar5) - EVT_END_SWITCH + Switch(AB_KKJ29_AnsweringContestant) + CaseEq(CONTESTANT_LEFT) + Call(SpeakToPlayer, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim03, ANIM_WorldKoopatrol_Anim03, 5, LVar3) + Set(LVar0, LVar5) + CaseEq(CONTESTANT_PEACH) + Call(ShowChoice, LVar4) + CaseEq(CONTESTANT_RIGHT) + Call(SpeakToPlayer, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim03, ANIM_WorldKoopatrol_Anim03, 5, LVar3) + Set(LVar0, LVar5) + EndSwitch // handle the choice - EVT_IF_EQ(LVar0, LVar5) - EVT_CALL(PlaySound, SOUND_APPROVE) - EVT_CALL(PlaySound, SOUND_AUDIENCE_CHEER) - EVT_SET(AB_KKJ29_AnswerScore, ANSWER_RIGHT) - EVT_EXEC_WAIT(N(EVS_UpdateScores)) - EVT_CALL(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5, MSG_Peach_0110) - EVT_ELSE - EVT_CALL(PlaySound, SOUND_MENU_ERROR) - EVT_CALL(PlaySound, SOUND_AUDIENCE_BOO) - EVT_SET(AB_KKJ29_AnswerScore, ANSWER_WRONG) - EVT_EXEC_WAIT(N(EVS_UpdateScores)) - EVT_CALL(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5, LVar6) - EVT_END_IF - EVT_WAIT(30 * DT) - EVT_SET(AB_KKJ29_AnswerScore, ANSWER_NONE) - EVT_WAIT(10 * DT) - EVT_EXEC_WAIT(N(EVS_SetCam_Contestants)) - EVT_RETURN - EVT_END + IfEq(LVar0, LVar5) + Call(PlaySound, SOUND_APPROVE) + Call(PlaySound, SOUND_AUDIENCE_CHEER) + Set(AB_KKJ29_AnswerScore, ANSWER_RIGHT) + ExecWait(N(EVS_UpdateScores)) + Call(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5, MSG_Peach_0110) + Else + Call(PlaySound, SOUND_MENU_ERROR) + Call(PlaySound, SOUND_AUDIENCE_BOO) + Set(AB_KKJ29_AnswerScore, ANSWER_WRONG) + ExecWait(N(EVS_UpdateScores)) + Call(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5, LVar6) + EndIf + Wait(30 * DT) + Set(AB_KKJ29_AnswerScore, ANSWER_NONE) + Wait(10 * DT) + ExecWait(N(EVS_SetCam_Contestants)) + Return + End }; EvtScript N(EVS_TexPan_Podiums) = { - EVT_CALL(SetTexPanner, MODEL_o19, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_o62, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_o88, TEX_PANNER_1) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 0x8000) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) - EVT_WAIT(3) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetTexPanner, MODEL_o19, TEX_PANNER_1) + Call(SetTexPanner, MODEL_o62, TEX_PANNER_1) + Call(SetTexPanner, MODEL_o88, TEX_PANNER_1) + Set(LVar0, 0) + Loop(0) + Add(LVar0, 0x8000) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) + Wait(3) + EndLoop + Return + End }; EvtScript N(EVS_TexPan_VerticalStrips) = { - EVT_CALL(SetTexPanner, MODEL_o22, TEX_PANNER_2) - EVT_CALL(EnableTexPanning, MODEL_o22, FALSE) - EVT_CALL(SetTexPanner, MODEL_o63, TEX_PANNER_2) - EVT_CALL(EnableTexPanning, MODEL_o63, FALSE) - EVT_CALL(SetTexPanner, MODEL_o89, TEX_PANNER_2) - EVT_CALL(EnableTexPanning, MODEL_o89, FALSE) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 0x8000) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar0, 0) - EVT_WAIT(3) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetTexPanner, MODEL_o22, TEX_PANNER_2) + Call(EnableTexPanning, MODEL_o22, FALSE) + Call(SetTexPanner, MODEL_o63, TEX_PANNER_2) + Call(EnableTexPanning, MODEL_o63, FALSE) + Call(SetTexPanner, MODEL_o89, TEX_PANNER_2) + Call(EnableTexPanning, MODEL_o89, FALSE) + Set(LVar0, 0) + Loop(0) + Add(LVar0, 0x8000) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar0, 0) + Wait(3) + EndLoop + Return + End }; EvtScript N(EVS_TexPan_Screens) = { - EVT_CALL(SetTexPanner, MODEL_o27, TEX_PANNER_3) - EVT_CALL(EnableTexPanning, MODEL_o27, FALSE) - EVT_CALL(SetTexPanner, MODEL_o64, TEX_PANNER_3) - EVT_CALL(EnableTexPanning, MODEL_o64, FALSE) - EVT_CALL(SetTexPanner, MODEL_o90, TEX_PANNER_3) - EVT_CALL(EnableTexPanning, MODEL_o90, FALSE) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 0x4000) - EVT_CALL(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, LVar0, 0) - EVT_WAIT(4) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetTexPanner, MODEL_o27, TEX_PANNER_3) + Call(EnableTexPanning, MODEL_o27, FALSE) + Call(SetTexPanner, MODEL_o64, TEX_PANNER_3) + Call(EnableTexPanning, MODEL_o64, FALSE) + Call(SetTexPanner, MODEL_o90, TEX_PANNER_3) + Call(EnableTexPanning, MODEL_o90, FALSE) + Set(LVar0, 0) + Loop(0) + Add(LVar0, 0x4000) + Call(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, LVar0, 0) + Wait(4) + EndLoop + Return + End }; EvtScript N(EVS_TexPan_Stars) = { - EVT_CALL(SetTexPanner, MODEL_o25, TEX_PANNER_4) - EVT_CALL(EnableTexPanning, MODEL_o25, FALSE) - EVT_CALL(SetTexPanner, MODEL_o65, TEX_PANNER_4) - EVT_CALL(EnableTexPanning, MODEL_o65, FALSE) - EVT_CALL(SetTexPanner, MODEL_o91, TEX_PANNER_4) - EVT_CALL(EnableTexPanning, MODEL_o91, FALSE) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 0x4000) - EVT_CALL(SetTexPanOffset, TEX_PANNER_4, TEX_PANNER_MAIN, LVar0, 0) - EVT_WAIT(2) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetTexPanner, MODEL_o25, TEX_PANNER_4) + Call(EnableTexPanning, MODEL_o25, FALSE) + Call(SetTexPanner, MODEL_o65, TEX_PANNER_4) + Call(EnableTexPanning, MODEL_o65, FALSE) + Call(SetTexPanner, MODEL_o91, TEX_PANNER_4) + Call(EnableTexPanning, MODEL_o91, FALSE) + Set(LVar0, 0) + Loop(0) + Add(LVar0, 0x4000) + Call(SetTexPanOffset, TEX_PANNER_4, TEX_PANNER_MAIN, LVar0, 0) + Wait(2) + EndLoop + Return + End }; EvtScript N(EVS_TexPan_FloorTrim) = { - EVT_CALL(SetTexPanner, MODEL_o32, TEX_PANNER_5) - EVT_CALL(EnableTexPanning, MODEL_o32, FALSE) - EVT_CALL(SetTexPanner, MODEL_o69, TEX_PANNER_5) - EVT_CALL(EnableTexPanning, MODEL_o69, FALSE) - EVT_CALL(SetTexPanner, MODEL_o95, TEX_PANNER_5) - EVT_CALL(EnableTexPanning, MODEL_o95, FALSE) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 0x8000) - EVT_CALL(SetTexPanOffset, TEX_PANNER_5, TEX_PANNER_MAIN, LVar0, 0) - EVT_WAIT(4) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetTexPanner, MODEL_o32, TEX_PANNER_5) + Call(EnableTexPanning, MODEL_o32, FALSE) + Call(SetTexPanner, MODEL_o69, TEX_PANNER_5) + Call(EnableTexPanning, MODEL_o69, FALSE) + Call(SetTexPanner, MODEL_o95, TEX_PANNER_5) + Call(EnableTexPanning, MODEL_o95, FALSE) + Set(LVar0, 0) + Loop(0) + Add(LVar0, 0x8000) + Call(SetTexPanOffset, TEX_PANNER_5, TEX_PANNER_MAIN, LVar0, 0) + Wait(4) + EndLoop + Return + End }; EvtScript N(EVS_TexPan_StarTrim) = { - EVT_CALL(SetTexPanner, MODEL_o31, TEX_PANNER_6) - EVT_CALL(EnableTexPanning, MODEL_o31, FALSE) - EVT_CALL(SetTexPanner, MODEL_o67, TEX_PANNER_6) - EVT_CALL(EnableTexPanning, MODEL_o67, FALSE) - EVT_CALL(SetTexPanner, MODEL_o93, TEX_PANNER_6) - EVT_CALL(EnableTexPanning, MODEL_o93, FALSE) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, -0x4800) - EVT_CALL(SetTexPanOffset, TEX_PANNER_6, TEX_PANNER_MAIN, LVar0, 0) - EVT_WAIT(3) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetTexPanner, MODEL_o31, TEX_PANNER_6) + Call(EnableTexPanning, MODEL_o31, FALSE) + Call(SetTexPanner, MODEL_o67, TEX_PANNER_6) + Call(EnableTexPanning, MODEL_o67, FALSE) + Call(SetTexPanner, MODEL_o93, TEX_PANNER_6) + Call(EnableTexPanning, MODEL_o93, FALSE) + Set(LVar0, 0) + Loop(0) + Add(LVar0, -0x4800) + Call(SetTexPanOffset, TEX_PANNER_6, TEX_PANNER_MAIN, LVar0, 0) + Wait(3) + EndLoop + Return + End }; EvtScript N(EVS_SetNoAnswerEffects) = { - EVT_SWITCH(AB_KKJ29_AnsweringContestant) - EVT_CASE_EQ(CONTESTANT_LEFT) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim03) - EVT_CALL(EnableTexPanning, MODEL_o25, FALSE) - EVT_CALL(EnableTexPanning, MODEL_o32, FALSE) - EVT_CALL(EnableModel, MODEL_o32, FALSE) - EVT_CALL(EnableModel, MODEL_o28, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o31, FALSE) - EVT_CALL(EnableModel, MODEL_o31, FALSE) - EVT_CALL(EnableModel, MODEL_o24, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o22, FALSE) - EVT_CALL(EnableTexPanning, MODEL_o27, FALSE) - EVT_CALL(EnableModel, MODEL_o36, FALSE) - EVT_CALL(EnableModel, MODEL_o37, FALSE) - EVT_CALL(EnableModel, MODEL_o20, TRUE) - EVT_SET(LVar2, MODEL_g8) - EVT_CASE_EQ(CONTESTANT_PEACH) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Idle) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_ForwardIdle) - EVT_CALL(EnableTexPanning, MODEL_o65, FALSE) - EVT_CALL(EnableTexPanning, MODEL_o69, FALSE) - EVT_CALL(EnableModel, MODEL_o69, FALSE) - EVT_CALL(EnableModel, MODEL_o68, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o67, FALSE) - EVT_CALL(EnableModel, MODEL_o67, FALSE) - EVT_CALL(EnableModel, MODEL_o66, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o63, FALSE) - EVT_CALL(EnableTexPanning, MODEL_o64, FALSE) - EVT_CALL(EnableModel, MODEL_o117, FALSE) - EVT_CALL(EnableModel, MODEL_o116, FALSE) - EVT_CALL(EnableModel, MODEL_o118, TRUE) - EVT_SET(LVar2, MODEL_g18) - EVT_CASE_EQ(CONTESTANT_RIGHT) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim03) - EVT_CALL(EnableTexPanning, MODEL_o91, FALSE) - EVT_CALL(EnableTexPanning, MODEL_o95, FALSE) - EVT_CALL(EnableModel, MODEL_o95, FALSE) - EVT_CALL(EnableModel, MODEL_o94, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o93, FALSE) - EVT_CALL(EnableModel, MODEL_o93, FALSE) - EVT_CALL(EnableModel, MODEL_o92, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o89, FALSE) - EVT_CALL(EnableTexPanning, MODEL_o90, FALSE) - EVT_CALL(EnableModel, MODEL_o120, FALSE) - EVT_CALL(EnableModel, MODEL_o121, FALSE) - EVT_CALL(EnableModel, MODEL_o119, TRUE) - EVT_SET(LVar2, MODEL_g25) - EVT_END_SWITCH - EVT_CALL(MakeLerp, 90, 0, 4, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, LVar2, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Switch(AB_KKJ29_AnsweringContestant) + CaseEq(CONTESTANT_LEFT) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim03) + Call(EnableTexPanning, MODEL_o25, FALSE) + Call(EnableTexPanning, MODEL_o32, FALSE) + Call(EnableModel, MODEL_o32, FALSE) + Call(EnableModel, MODEL_o28, TRUE) + Call(EnableTexPanning, MODEL_o31, FALSE) + Call(EnableModel, MODEL_o31, FALSE) + Call(EnableModel, MODEL_o24, TRUE) + Call(EnableTexPanning, MODEL_o22, FALSE) + Call(EnableTexPanning, MODEL_o27, FALSE) + Call(EnableModel, MODEL_o36, FALSE) + Call(EnableModel, MODEL_o37, FALSE) + Call(EnableModel, MODEL_o20, TRUE) + Set(LVar2, MODEL_g8) + CaseEq(CONTESTANT_PEACH) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Idle) + Call(SetPlayerAnimation, ANIM_Peach2_ForwardIdle) + Call(EnableTexPanning, MODEL_o65, FALSE) + Call(EnableTexPanning, MODEL_o69, FALSE) + Call(EnableModel, MODEL_o69, FALSE) + Call(EnableModel, MODEL_o68, TRUE) + Call(EnableTexPanning, MODEL_o67, FALSE) + Call(EnableModel, MODEL_o67, FALSE) + Call(EnableModel, MODEL_o66, TRUE) + Call(EnableTexPanning, MODEL_o63, FALSE) + Call(EnableTexPanning, MODEL_o64, FALSE) + Call(EnableModel, MODEL_o117, FALSE) + Call(EnableModel, MODEL_o116, FALSE) + Call(EnableModel, MODEL_o118, TRUE) + Set(LVar2, MODEL_g18) + CaseEq(CONTESTANT_RIGHT) + Call(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim03) + Call(EnableTexPanning, MODEL_o91, FALSE) + Call(EnableTexPanning, MODEL_o95, FALSE) + Call(EnableModel, MODEL_o95, FALSE) + Call(EnableModel, MODEL_o94, TRUE) + Call(EnableTexPanning, MODEL_o93, FALSE) + Call(EnableModel, MODEL_o93, FALSE) + Call(EnableModel, MODEL_o92, TRUE) + Call(EnableTexPanning, MODEL_o89, FALSE) + Call(EnableTexPanning, MODEL_o90, FALSE) + Call(EnableModel, MODEL_o120, FALSE) + Call(EnableModel, MODEL_o121, FALSE) + Call(EnableModel, MODEL_o119, TRUE) + Set(LVar2, MODEL_g25) + EndSwitch + Call(MakeLerp, 90, 0, 4, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, LVar2, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_SetPendingAnswerEffects) = { - EVT_SWITCH(AB_KKJ29_AnsweringContestant) - EVT_CASE_EQ(CONTESTANT_LEFT) - EVT_SET(LVar0, MODEL_o22) - EVT_SET(LVar1, MODEL_o27) - EVT_SET(LVar2, MODEL_g8) - EVT_CASE_EQ(CONTESTANT_PEACH) - EVT_SET(LVar0, MODEL_o63) - EVT_SET(LVar1, MODEL_o64) - EVT_SET(LVar2, MODEL_g18) - EVT_CASE_EQ(CONTESTANT_RIGHT) - EVT_SET(LVar0, MODEL_o89) - EVT_SET(LVar1, MODEL_o90) - EVT_SET(LVar2, MODEL_g25) - EVT_END_SWITCH - EVT_CALL(EnableTexPanning, LVar0, TRUE) - EVT_CALL(EnableTexPanning, LVar1, TRUE) - EVT_CALL(MakeLerp, 0, 90, 4, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, LVar2, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Switch(AB_KKJ29_AnsweringContestant) + CaseEq(CONTESTANT_LEFT) + Set(LVar0, MODEL_o22) + Set(LVar1, MODEL_o27) + Set(LVar2, MODEL_g8) + CaseEq(CONTESTANT_PEACH) + Set(LVar0, MODEL_o63) + Set(LVar1, MODEL_o64) + Set(LVar2, MODEL_g18) + CaseEq(CONTESTANT_RIGHT) + Set(LVar0, MODEL_o89) + Set(LVar1, MODEL_o90) + Set(LVar2, MODEL_g25) + EndSwitch + Call(EnableTexPanning, LVar0, TRUE) + Call(EnableTexPanning, LVar1, TRUE) + Call(MakeLerp, 0, 90, 4, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, LVar2, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_SetRightAnswerEffects) = { - EVT_SWITCH(AB_KKJ29_AnsweringContestant) - EVT_CASE_EQ(CONTESTANT_LEFT) - EVT_CALL(EnableTexPanning, MODEL_o25, TRUE) - EVT_CALL(EnableModel, MODEL_o28, FALSE) - EVT_CALL(EnableModel, MODEL_o32, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o32, TRUE) - EVT_CALL(EnableModel, MODEL_o24, FALSE) - EVT_CALL(EnableModel, MODEL_o31, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o31, TRUE) - EVT_CALL(EnableModel, MODEL_o20, FALSE) - EVT_CALL(EnableModel, MODEL_o36, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim19) - EVT_CASE_EQ(CONTESTANT_PEACH) - EVT_CALL(EnableTexPanning, MODEL_o65, TRUE) - EVT_CALL(EnableModel, MODEL_o68, FALSE) - EVT_CALL(EnableModel, MODEL_o69, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o69, TRUE) - EVT_CALL(EnableModel, MODEL_o66, FALSE) - EVT_CALL(EnableModel, MODEL_o67, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o67, TRUE) - EVT_CALL(EnableModel, MODEL_o118, FALSE) - EVT_CALL(EnableModel, MODEL_o117, TRUE) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_ShoutJoy) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_LOOP(3) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_ForwardHappy) - EVT_CASE_EQ(CONTESTANT_RIGHT) - EVT_CALL(EnableTexPanning, MODEL_o91, TRUE) - EVT_CALL(EnableModel, MODEL_o94, FALSE) - EVT_CALL(EnableModel, MODEL_o95, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o95, TRUE) - EVT_CALL(EnableModel, MODEL_o92, FALSE) - EVT_CALL(EnableModel, MODEL_o93, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o93, TRUE) - EVT_CALL(EnableModel, MODEL_o119, FALSE) - EVT_CALL(EnableModel, MODEL_o120, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim19) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(AB_KKJ29_AnsweringContestant) + CaseEq(CONTESTANT_LEFT) + Call(EnableTexPanning, MODEL_o25, TRUE) + Call(EnableModel, MODEL_o28, FALSE) + Call(EnableModel, MODEL_o32, TRUE) + Call(EnableTexPanning, MODEL_o32, TRUE) + Call(EnableModel, MODEL_o24, FALSE) + Call(EnableModel, MODEL_o31, TRUE) + Call(EnableTexPanning, MODEL_o31, TRUE) + Call(EnableModel, MODEL_o20, FALSE) + Call(EnableModel, MODEL_o36, TRUE) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim19) + CaseEq(CONTESTANT_PEACH) + Call(EnableTexPanning, MODEL_o65, TRUE) + Call(EnableModel, MODEL_o68, FALSE) + Call(EnableModel, MODEL_o69, TRUE) + Call(EnableTexPanning, MODEL_o69, TRUE) + Call(EnableModel, MODEL_o66, FALSE) + Call(EnableModel, MODEL_o67, TRUE) + Call(EnableTexPanning, MODEL_o67, TRUE) + Call(EnableModel, MODEL_o118, FALSE) + Call(EnableModel, MODEL_o117, TRUE) + Thread + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_ShoutJoy) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Loop(3) + Call(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10) + EndLoop + EndThread + Call(SetPlayerAnimation, ANIM_Peach2_ForwardHappy) + CaseEq(CONTESTANT_RIGHT) + Call(EnableTexPanning, MODEL_o91, TRUE) + Call(EnableModel, MODEL_o94, FALSE) + Call(EnableModel, MODEL_o95, TRUE) + Call(EnableTexPanning, MODEL_o95, TRUE) + Call(EnableModel, MODEL_o92, FALSE) + Call(EnableModel, MODEL_o93, TRUE) + Call(EnableTexPanning, MODEL_o93, TRUE) + Call(EnableModel, MODEL_o119, FALSE) + Call(EnableModel, MODEL_o120, TRUE) + Call(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim19) + EndSwitch + Return + End }; EvtScript N(EVS_SetWrongAnswerEffects) = { - EVT_SWITCH(AB_KKJ29_AnsweringContestant) - EVT_CASE_EQ(CONTESTANT_LEFT) - EVT_CALL(EnableTexPanning, MODEL_o22, FALSE) - EVT_CALL(EnableTexPanning, MODEL_o27, FALSE) - EVT_CALL(EnableModel, MODEL_o20, FALSE) - EVT_CALL(EnableModel, MODEL_o37, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim1A) - EVT_CASE_EQ(CONTESTANT_PEACH) - EVT_CALL(EnableTexPanning, MODEL_o63, FALSE) - EVT_CALL(EnableTexPanning, MODEL_o64, FALSE) - EVT_CALL(EnableModel, MODEL_o118, FALSE) - EVT_CALL(EnableModel, MODEL_o116, TRUE) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_ForwardSad) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_TalkSad) - EVT_CASE_EQ(CONTESTANT_RIGHT) - EVT_CALL(EnableTexPanning, MODEL_o89, FALSE) - EVT_CALL(EnableTexPanning, MODEL_o90, FALSE) - EVT_CALL(EnableModel, MODEL_o119, FALSE) - EVT_CALL(EnableModel, MODEL_o121, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim1A) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(AB_KKJ29_AnsweringContestant) + CaseEq(CONTESTANT_LEFT) + Call(EnableTexPanning, MODEL_o22, FALSE) + Call(EnableTexPanning, MODEL_o27, FALSE) + Call(EnableModel, MODEL_o20, FALSE) + Call(EnableModel, MODEL_o37, TRUE) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim1A) + CaseEq(CONTESTANT_PEACH) + Call(EnableTexPanning, MODEL_o63, FALSE) + Call(EnableTexPanning, MODEL_o64, FALSE) + Call(EnableModel, MODEL_o118, FALSE) + Call(EnableModel, MODEL_o116, TRUE) + Call(SetPlayerAnimation, ANIM_Peach2_ForwardSad) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_TalkSad) + CaseEq(CONTESTANT_RIGHT) + Call(EnableTexPanning, MODEL_o89, FALSE) + Call(EnableTexPanning, MODEL_o90, FALSE) + Call(EnableModel, MODEL_o119, FALSE) + Call(EnableModel, MODEL_o121, TRUE) + Call(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim1A) + EndSwitch + Return + End }; EvtScript N(EVS_InitScoreBar) = { - EVT_SET(LVar0, MODEL_o38) - EVT_LOOP(10) - EVT_CALL(SetModelTexVariant, LVar0, 2) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_SET(LVar0, MODEL_o76) - EVT_LOOP(10) - EVT_CALL(SetModelTexVariant, LVar0, 2) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_SET(LVar0, MODEL_o102) - EVT_LOOP(10) - EVT_CALL(SetModelTexVariant, LVar0, 2) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVar0, MODEL_o38) + Loop(10) + Call(SetModelTexVariant, LVar0, 2) + Add(LVar0, 1) + EndLoop + Set(LVar0, MODEL_o76) + Loop(10) + Call(SetModelTexVariant, LVar0, 2) + Add(LVar0, 1) + EndLoop + Set(LVar0, MODEL_o102) + Loop(10) + Call(SetModelTexVariant, LVar0, 2) + Add(LVar0, 1) + EndLoop + Return + End }; EvtScript N(EVS_UpdateScoreBar) = { - EVT_SWITCH(AB_KKJ29_AnsweringContestant) - EVT_CASE_EQ(CONTESTANT_LEFT) - EVT_SET(LVar0, MODEL_o38) - EVT_SET(LVar1, AB_KKJ29_LeftKoopatrolScore) - EVT_CASE_EQ(CONTESTANT_PEACH) - EVT_SET(LVar0, MODEL_o76) - EVT_SET(LVar1, AB_KKJ29_PeachScore) - EVT_CASE_EQ(CONTESTANT_RIGHT) - EVT_SET(LVar0, MODEL_o102) - EVT_SET(LVar1, AB_KKJ29_RightKoopatrolScore) - EVT_END_SWITCH - EVT_SET(LVar2, 10) - EVT_SUB(LVar2, LVar1) - EVT_IF_NE(LVar1, 0) - EVT_LOOP(LVar1) - EVT_CALL(SetModelTexVariant, LVar0, 0) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_END_IF - EVT_IF_NE(LVar2, 0) - EVT_LOOP(LVar2) - EVT_CALL(SetModelTexVariant, LVar0, 2) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_END_IF - EVT_RETURN - EVT_END + Switch(AB_KKJ29_AnsweringContestant) + CaseEq(CONTESTANT_LEFT) + Set(LVar0, MODEL_o38) + Set(LVar1, AB_KKJ29_LeftKoopatrolScore) + CaseEq(CONTESTANT_PEACH) + Set(LVar0, MODEL_o76) + Set(LVar1, AB_KKJ29_PeachScore) + CaseEq(CONTESTANT_RIGHT) + Set(LVar0, MODEL_o102) + Set(LVar1, AB_KKJ29_RightKoopatrolScore) + EndSwitch + Set(LVar2, 10) + Sub(LVar2, LVar1) + IfNe(LVar1, 0) + Loop(LVar1) + Call(SetModelTexVariant, LVar0, 0) + Add(LVar0, 1) + EndLoop + EndIf + IfNe(LVar2, 0) + Loop(LVar2) + Call(SetModelTexVariant, LVar0, 2) + Add(LVar0, 1) + EndLoop + EndIf + Return + End }; EvtScript N(EVS_DoScoreBarCycling) = { - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 1) - EVT_SET(LVar2, 2) - EVT_SET(LVar3, 1) - EVT_SET(LVar4, 0) - EVT_LOOP(0) - EVT_SWITCH(AB_KKJ29_AnsweringContestant) - EVT_CASE_EQ(CONTESTANT_LEFT) - EVT_CALL(SetModelTexVariant, MODEL_o47, LVar4) - EVT_CALL(SetModelTexVariant, MODEL_o46, LVar3) - EVT_CALL(SetModelTexVariant, MODEL_o45, LVar2) - EVT_CALL(SetModelTexVariant, MODEL_o44, LVar1) - EVT_CALL(SetModelTexVariant, MODEL_o43, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_o42, LVar4) - EVT_CALL(SetModelTexVariant, MODEL_o41, LVar3) - EVT_CALL(SetModelTexVariant, MODEL_o40, LVar2) - EVT_CALL(SetModelTexVariant, MODEL_o39, LVar1) - EVT_CALL(SetModelTexVariant, MODEL_o38, LVar0) - EVT_CASE_EQ(CONTESTANT_PEACH) - EVT_CALL(SetModelTexVariant, MODEL_o85, LVar4) - EVT_CALL(SetModelTexVariant, MODEL_o84, LVar3) - EVT_CALL(SetModelTexVariant, MODEL_o83, LVar2) - EVT_CALL(SetModelTexVariant, MODEL_o82, LVar1) - EVT_CALL(SetModelTexVariant, MODEL_o81, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_o80, LVar4) - EVT_CALL(SetModelTexVariant, MODEL_o79, LVar3) - EVT_CALL(SetModelTexVariant, MODEL_o78, LVar2) - EVT_CALL(SetModelTexVariant, MODEL_o77, LVar1) - EVT_CALL(SetModelTexVariant, MODEL_o76, LVar0) - EVT_CASE_EQ(CONTESTANT_RIGHT) - EVT_CALL(SetModelTexVariant, MODEL_o111, LVar4) - EVT_CALL(SetModelTexVariant, MODEL_o110, LVar3) - EVT_CALL(SetModelTexVariant, MODEL_o109, LVar2) - EVT_CALL(SetModelTexVariant, MODEL_o108, LVar1) - EVT_CALL(SetModelTexVariant, MODEL_o107, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_o106, LVar4) - EVT_CALL(SetModelTexVariant, MODEL_o105, LVar3) - EVT_CALL(SetModelTexVariant, MODEL_o104, LVar2) - EVT_CALL(SetModelTexVariant, MODEL_o103, LVar1) - EVT_CALL(SetModelTexVariant, MODEL_o102, LVar0) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_IF_EQ(AB_KKJ29_AnswerScore, ANSWER_NONE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_IF_EQ(AB_KKJ29_AnswerScore, ANSWER_WRONG) - EVT_BREAK_LOOP - EVT_END_IF - EVT_SET(LVar5, LVar4) - EVT_SET(LVar4, LVar3) - EVT_SET(LVar3, LVar2) - EVT_SET(LVar2, LVar1) - EVT_SET(LVar1, LVar0) - EVT_SET(LVar0, LVar5) - EVT_END_LOOP - EVT_EXEC(N(EVS_UpdateScoreBar)) - EVT_RETURN - EVT_END + Set(LVar0, 0) + Set(LVar1, 1) + Set(LVar2, 2) + Set(LVar3, 1) + Set(LVar4, 0) + Loop(0) + Switch(AB_KKJ29_AnsweringContestant) + CaseEq(CONTESTANT_LEFT) + Call(SetModelTexVariant, MODEL_o47, LVar4) + Call(SetModelTexVariant, MODEL_o46, LVar3) + Call(SetModelTexVariant, MODEL_o45, LVar2) + Call(SetModelTexVariant, MODEL_o44, LVar1) + Call(SetModelTexVariant, MODEL_o43, LVar0) + Call(SetModelTexVariant, MODEL_o42, LVar4) + Call(SetModelTexVariant, MODEL_o41, LVar3) + Call(SetModelTexVariant, MODEL_o40, LVar2) + Call(SetModelTexVariant, MODEL_o39, LVar1) + Call(SetModelTexVariant, MODEL_o38, LVar0) + CaseEq(CONTESTANT_PEACH) + Call(SetModelTexVariant, MODEL_o85, LVar4) + Call(SetModelTexVariant, MODEL_o84, LVar3) + Call(SetModelTexVariant, MODEL_o83, LVar2) + Call(SetModelTexVariant, MODEL_o82, LVar1) + Call(SetModelTexVariant, MODEL_o81, LVar0) + Call(SetModelTexVariant, MODEL_o80, LVar4) + Call(SetModelTexVariant, MODEL_o79, LVar3) + Call(SetModelTexVariant, MODEL_o78, LVar2) + Call(SetModelTexVariant, MODEL_o77, LVar1) + Call(SetModelTexVariant, MODEL_o76, LVar0) + CaseEq(CONTESTANT_RIGHT) + Call(SetModelTexVariant, MODEL_o111, LVar4) + Call(SetModelTexVariant, MODEL_o110, LVar3) + Call(SetModelTexVariant, MODEL_o109, LVar2) + Call(SetModelTexVariant, MODEL_o108, LVar1) + Call(SetModelTexVariant, MODEL_o107, LVar0) + Call(SetModelTexVariant, MODEL_o106, LVar4) + Call(SetModelTexVariant, MODEL_o105, LVar3) + Call(SetModelTexVariant, MODEL_o104, LVar2) + Call(SetModelTexVariant, MODEL_o103, LVar1) + Call(SetModelTexVariant, MODEL_o102, LVar0) + EndSwitch + Wait(1) + IfEq(AB_KKJ29_AnswerScore, ANSWER_NONE) + BreakLoop + EndIf + IfEq(AB_KKJ29_AnswerScore, ANSWER_WRONG) + BreakLoop + EndIf + Set(LVar5, LVar4) + Set(LVar4, LVar3) + Set(LVar3, LVar2) + Set(LVar2, LVar1) + Set(LVar1, LVar0) + Set(LVar0, LVar5) + EndLoop + Exec(N(EVS_UpdateScoreBar)) + Return + End }; EvtScript N(EVS_ManageStageEffects) = { - EVT_EXEC(N(EVS_TexPan_Podiums)) - EVT_EXEC(N(EVS_TexPan_VerticalStrips)) - EVT_EXEC(N(EVS_TexPan_Screens)) - EVT_EXEC(N(EVS_TexPan_Stars)) - EVT_EXEC(N(EVS_TexPan_FloorTrim)) - EVT_EXEC(N(EVS_TexPan_StarTrim)) - EVT_CALL(EnableModel, MODEL_o31, FALSE) - EVT_CALL(EnableModel, MODEL_o32, FALSE) - EVT_CALL(EnableModel, MODEL_o36, FALSE) - EVT_CALL(EnableModel, MODEL_o37, FALSE) - EVT_CALL(EnableModel, MODEL_o67, FALSE) - EVT_CALL(EnableModel, MODEL_o69, FALSE) - EVT_CALL(EnableModel, MODEL_o116, FALSE) - EVT_CALL(EnableModel, MODEL_o117, FALSE) - EVT_CALL(EnableModel, MODEL_o93, FALSE) - EVT_CALL(EnableModel, MODEL_o95, FALSE) - EVT_CALL(EnableModel, MODEL_o120, FALSE) - EVT_CALL(EnableModel, MODEL_o121, FALSE) - EVT_EXEC(N(EVS_InitScoreBar)) - EVT_LABEL(0) - EVT_SET(LVar0, AB_KKJ29_AnswerScore) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_NE(LVar0, AB_KKJ29_AnswerScore) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SWITCH(AB_KKJ29_AnswerScore) - EVT_CASE_EQ(ANSWER_NONE) - EVT_EXEC_WAIT(N(EVS_SetNoAnswerEffects)) - EVT_CASE_EQ(ANSWER_PENDING) - EVT_EXEC(N(EVS_DoScoreBarCycling)) - EVT_EXEC_WAIT(N(EVS_SetPendingAnswerEffects)) - EVT_CASE_EQ(ANSWER_RIGHT) - EVT_EXEC_WAIT(N(EVS_SetRightAnswerEffects)) - EVT_CASE_EQ(ANSWER_WRONG) - EVT_EXEC_WAIT(N(EVS_SetWrongAnswerEffects)) - EVT_END_SWITCH - EVT_GOTO(0) - EVT_RETURN - EVT_END + Exec(N(EVS_TexPan_Podiums)) + Exec(N(EVS_TexPan_VerticalStrips)) + Exec(N(EVS_TexPan_Screens)) + Exec(N(EVS_TexPan_Stars)) + Exec(N(EVS_TexPan_FloorTrim)) + Exec(N(EVS_TexPan_StarTrim)) + Call(EnableModel, MODEL_o31, FALSE) + Call(EnableModel, MODEL_o32, FALSE) + Call(EnableModel, MODEL_o36, FALSE) + Call(EnableModel, MODEL_o37, FALSE) + Call(EnableModel, MODEL_o67, FALSE) + Call(EnableModel, MODEL_o69, FALSE) + Call(EnableModel, MODEL_o116, FALSE) + Call(EnableModel, MODEL_o117, FALSE) + Call(EnableModel, MODEL_o93, FALSE) + Call(EnableModel, MODEL_o95, FALSE) + Call(EnableModel, MODEL_o120, FALSE) + Call(EnableModel, MODEL_o121, FALSE) + Exec(N(EVS_InitScoreBar)) + Label(0) + Set(LVar0, AB_KKJ29_AnswerScore) + Loop(0) + Wait(1) + IfNe(LVar0, AB_KKJ29_AnswerScore) + BreakLoop + EndIf + EndLoop + Switch(AB_KKJ29_AnswerScore) + CaseEq(ANSWER_NONE) + ExecWait(N(EVS_SetNoAnswerEffects)) + CaseEq(ANSWER_PENDING) + Exec(N(EVS_DoScoreBarCycling)) + ExecWait(N(EVS_SetPendingAnswerEffects)) + CaseEq(ANSWER_RIGHT) + ExecWait(N(EVS_SetRightAnswerEffects)) + CaseEq(ANSWER_WRONG) + ExecWait(N(EVS_SetWrongAnswerEffects)) + EndSwitch + Goto(0) + Return + End }; enum { @@ -606,100 +606,100 @@ enum { }; EvtScript N(EVS_DeclareWinner) = { - EVT_SET(LVar0, OUTCOME_LEFT_WON) - EVT_SET(LVar1, AB_KKJ29_LeftKoopatrolScore) - EVT_SWITCH(AB_KKJ29_PeachScore) - EVT_CASE_GT(LVar1) + Set(LVar0, OUTCOME_LEFT_WON) + Set(LVar1, AB_KKJ29_LeftKoopatrolScore) + Switch(AB_KKJ29_PeachScore) + CaseGt(LVar1) // peach beat left koopatrol - EVT_SET(LVar0, OUTCOME_PEACH_WON) - EVT_SET(LVar1, AB_KKJ29_PeachScore) - EVT_CASE_EQ(LVar1) + Set(LVar0, OUTCOME_PEACH_WON) + Set(LVar1, AB_KKJ29_PeachScore) + CaseEq(LVar1) // peach tied - EVT_SET(LVar0, OUTCOME_TIE) - EVT_END_SWITCH - EVT_SWITCH(AB_KKJ29_RightKoopatrolScore) - EVT_CASE_GT(LVar1) + Set(LVar0, OUTCOME_TIE) + EndSwitch + Switch(AB_KKJ29_RightKoopatrolScore) + CaseGt(LVar1) // peach lost to right koopatrol - EVT_SET(LVar0, OUTCOME_RIGHT_WON) - EVT_CASE_EQ(LVar1) + Set(LVar0, OUTCOME_RIGHT_WON) + CaseEq(LVar1) // all tied - EVT_SET(LVar0, OUTCOME_TIE) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_LEFT_WON) - EVT_SET(LVar1, -280) - EVT_SET(LVar2, -320) - EVT_CASE_EQ(OUTCOME_PEACH_WON) - EVT_SET(LVar1, -270) - EVT_SET(LVar2, -230) - EVT_CASE_EQ(OUTCOME_RIGHT_WON) - EVT_SET(LVar1, -180) - EVT_SET(LVar2, -140) - EVT_CASE_EQ(OUTCOME_TIE) - EVT_SET(LVar1, -270) - EVT_SET(LVar2, -230) - EVT_END_SWITCH - EVT_CALL(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim06) - EVT_CALL(SetNpcFlagBits, NPC_HammerBros, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcSpeed, NPC_HammerBros, EVT_FLOAT(3.0)) - EVT_CALL(NpcMoveTo, NPC_HammerBros, -400, 0, 0) - EVT_CALL(NpcMoveTo, NPC_HammerBros, LVar1, 0, 0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(NpcFaceNpc, NPC_HammerBros, LVar0, 7) - EVT_END_IF - EVT_IF_NE(LVar0, 3) - EVT_CALL(NpcMoveTo, NPC_HammerBros, LVar1, -60, 0) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim03) - EVT_CALL(SetNpcFlagBits, NPC_HammerBros, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar2, 30, -140) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar2, 30, -140) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_LEFT_WON) - EVT_CALL(SpeakToNpc, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 0, NPC_Koopatrol_01, MSG_Peach_011B) - EVT_CALL(PlaySound, SOUND_AUDIENCE_CHEER) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim19) - EVT_CALL(ContinueSpeech, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5, MSG_Peach_011C) - EVT_WAIT(10) - EVT_SET(LVar0, ITEM_JAMMIN_JELLY) - EVT_SET(LVar1, NPC_Koopatrol_01) - EVT_SET(LVar2, MSG_Peach_011D) - EVT_EXEC_WAIT(N(EVS_GiveItemToKoopatrol)) - EVT_WAIT(10) - EVT_CASE_EQ(OUTCOME_PEACH_WON) - EVT_CALL(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 0, MSG_Peach_0121) - EVT_CALL(PlaySound, SOUND_AUDIENCE_CHEER) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Delighted) - EVT_WAIT(1) - EVT_CALL(ContinueSpeech, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 0, MSG_Peach_0122) - EVT_WAIT(10) - EVT_CALL(ShowGotItem, ITEM_JAMMIN_JELLY, TRUE, ITEM_PICKUP_FLAG_NO_ANIMS) - EVT_SET(GF_KKJ29_PeachWonJamminJelly, TRUE) - EVT_WAIT(10) - EVT_CASE_EQ(OUTCOME_RIGHT_WON) - EVT_CALL(SpeakToNpc, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 0, NPC_Koopatrol_02, MSG_Peach_011E) - EVT_CALL(PlaySound, SOUND_AUDIENCE_CHEER) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim19) - EVT_CALL(ContinueSpeech, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5, MSG_Peach_011F) - EVT_WAIT(10) - EVT_SET(LVar0, ITEM_JAMMIN_JELLY) - EVT_SET(LVar1, NPC_Koopatrol_02) - EVT_SET(LVar2, MSG_Peach_0120) - EVT_EXEC_WAIT(N(EVS_GiveItemToKoopatrol)) - EVT_WAIT(10) - EVT_CASE_EQ(OUTCOME_TIE) - EVT_IF_EQ(AB_KKJ29_PeachScore, 0) - EVT_CALL(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5, MSG_Peach_0124) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5, MSG_Peach_0123) - EVT_END_IF - EVT_CALL(PlaySound, SOUND_AUDIENCE_BOO) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Set(LVar0, OUTCOME_TIE) + EndSwitch + Switch(LVar0) + CaseEq(OUTCOME_LEFT_WON) + Set(LVar1, -280) + Set(LVar2, -320) + CaseEq(OUTCOME_PEACH_WON) + Set(LVar1, -270) + Set(LVar2, -230) + CaseEq(OUTCOME_RIGHT_WON) + Set(LVar1, -180) + Set(LVar2, -140) + CaseEq(OUTCOME_TIE) + Set(LVar1, -270) + Set(LVar2, -230) + EndSwitch + Call(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim06) + Call(SetNpcFlagBits, NPC_HammerBros, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcSpeed, NPC_HammerBros, Float(3.0)) + Call(NpcMoveTo, NPC_HammerBros, -400, 0, 0) + Call(NpcMoveTo, NPC_HammerBros, LVar1, 0, 0) + IfEq(LVar0, 1) + Call(NpcFaceNpc, NPC_HammerBros, LVar0, 7) + EndIf + IfNe(LVar0, 3) + Call(NpcMoveTo, NPC_HammerBros, LVar1, -60, 0) + EndIf + Call(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim03) + Call(SetNpcFlagBits, NPC_HammerBros, NPC_FLAG_GRAVITY, FALSE) + Call(UseSettingsFrom, CAM_DEFAULT, LVar2, 30, -140) + Call(SetPanTarget, CAM_DEFAULT, LVar2, 30, -140) + Call(SetCamDistance, CAM_DEFAULT, Float(250.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Switch(LVar0) + CaseEq(OUTCOME_LEFT_WON) + Call(SpeakToNpc, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 0, NPC_Koopatrol_01, MSG_Peach_011B) + Call(PlaySound, SOUND_AUDIENCE_CHEER) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim19) + Call(ContinueSpeech, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5, MSG_Peach_011C) + Wait(10) + Set(LVar0, ITEM_JAMMIN_JELLY) + Set(LVar1, NPC_Koopatrol_01) + Set(LVar2, MSG_Peach_011D) + ExecWait(N(EVS_GiveItemToKoopatrol)) + Wait(10) + CaseEq(OUTCOME_PEACH_WON) + Call(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 0, MSG_Peach_0121) + Call(PlaySound, SOUND_AUDIENCE_CHEER) + Call(SetPlayerAnimation, ANIM_Peach2_Delighted) + Wait(1) + Call(ContinueSpeech, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 0, MSG_Peach_0122) + Wait(10) + Call(ShowGotItem, ITEM_JAMMIN_JELLY, TRUE, ITEM_PICKUP_FLAG_NO_ANIMS) + Set(GF_KKJ29_PeachWonJamminJelly, TRUE) + Wait(10) + CaseEq(OUTCOME_RIGHT_WON) + Call(SpeakToNpc, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 0, NPC_Koopatrol_02, MSG_Peach_011E) + Call(PlaySound, SOUND_AUDIENCE_CHEER) + Call(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim19) + Call(ContinueSpeech, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5, MSG_Peach_011F) + Wait(10) + Set(LVar0, ITEM_JAMMIN_JELLY) + Set(LVar1, NPC_Koopatrol_02) + Set(LVar2, MSG_Peach_0120) + ExecWait(N(EVS_GiveItemToKoopatrol)) + Wait(10) + CaseEq(OUTCOME_TIE) + IfEq(AB_KKJ29_PeachScore, 0) + Call(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5, MSG_Peach_0124) + Else + Call(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5, MSG_Peach_0123) + EndIf + Call(PlaySound, SOUND_AUDIENCE_BOO) + EndSwitch + Return + End }; Vec3f N(TwinkHidePath)[] = { @@ -733,570 +733,570 @@ Vec3f N(TwinkFlyAwayPath)[] = { }; EvtScript N(EVS_TwinkFollowPath) = { - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_ApproachPeach) = { - EVT_CALL(SetNpcVar, NPC_HammerBros, 0, 1) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 26) - EVT_SUB(LVar2, 2) - EVT_CALL(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim09) - EVT_CALL(SetNpcSpeed, NPC_HammerBros, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_HammerBros, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim03) - EVT_CALL(NpcFacePlayer, NPC_HammerBros, 5) - EVT_CALL(SetNpcVar, NPC_HammerBros, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 26) - EVT_ADD(LVar2, 2) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim06) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_01, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(NpcFacePlayer, NPC_Koopatrol_01, 5) - EVT_END_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcVar, NPC_HammerBros, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(10) - EVT_RETURN - EVT_END + Call(SetNpcVar, NPC_HammerBros, 0, 1) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar0, 26) + Sub(LVar2, 2) + Call(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim09) + Call(SetNpcSpeed, NPC_HammerBros, Float(5.0)) + Call(NpcMoveTo, NPC_HammerBros, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim03) + Call(NpcFacePlayer, NPC_HammerBros, 5) + Call(SetNpcVar, NPC_HammerBros, 0, 0) + EndThread + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 26) + Add(LVar2, 2) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim06) + Call(SetNpcSpeed, NPC_Koopatrol_01, Float(5.0)) + Call(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim01) + Call(NpcFacePlayer, NPC_Koopatrol_01, 5) + EndThread + Loop(0) + Wait(1) + Call(GetNpcVar, NPC_HammerBros, 0, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Wait(10) + Return + End }; EvtScript N(EVS_PickUpPeach) = { - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_HammerBros, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_CALL(NpcMoveTo, NPC_HammerBros, LVar0, LVar2, 5) - EVT_CALL(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim13) - EVT_ADD(LVar0, 5) - EVT_CALL(NpcMoveTo, NPC_HammerBros, LVar0, LVar2, 5) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Koopatrol_01, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 5) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim12) - EVT_SUB(LVar0, 5) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 5) - EVT_END_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Gasp) - EVT_WAIT(1) - EVT_LOOP(4) - EVT_ADD(LVar1, 2) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Carried) - EVT_ADD(LVar0, 10) - EVT_LOOP(5) - EVT_ADD(LVar1, 4) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Thread + Call(GetNpcPos, NPC_HammerBros, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Call(NpcMoveTo, NPC_HammerBros, LVar0, LVar2, 5) + Call(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim13) + Add(LVar0, 5) + Call(NpcMoveTo, NPC_HammerBros, LVar0, LVar2, 5) + EndThread + Thread + Call(GetNpcPos, NPC_Koopatrol_01, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Call(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 5) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim12) + Sub(LVar0, 5) + Call(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 5) + EndThread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerAnimation, ANIM_Peach2_Gasp) + Wait(1) + Loop(4) + Add(LVar1, 2) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(SetPlayerAnimation, ANIM_Peach2_Carried) + Add(LVar0, 10) + Loop(5) + Add(LVar1, 4) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_CarryPeachAway) = { - EVT_CALL(InterpNpcYaw, NPC_Koopatrol_01, 90, 3) - EVT_WAIT(10) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_HammerBros, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 32) - EVT_ADD(LVar2, 2) - EVT_CALL(SetPlayerPos, LVar0, 30, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcVar, NPC_HammerBros, 0, 1) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim08) - EVT_CALL(SetNpcSpeed, NPC_HammerBros, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_HammerBros, 404, -26, 0) - EVT_CALL(SetNpcVar, NPC_HammerBros, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim14) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_01, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, 436, -22, 0) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(InterpNpcYaw, NPC_Koopatrol_01, 90, 3) + Wait(10) + Thread + Loop(0) + Call(GetNpcPos, NPC_HammerBros, LVar0, LVar1, LVar2) + Add(LVar0, 32) + Add(LVar2, 2) + Call(SetPlayerPos, LVar0, 30, LVar2) + Wait(1) + EndLoop + EndThread + Call(SetNpcVar, NPC_HammerBros, 0, 1) + Thread + Call(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim08) + Call(SetNpcSpeed, NPC_HammerBros, Float(5.0)) + Call(NpcMoveTo, NPC_HammerBros, 404, -26, 0) + Call(SetNpcVar, NPC_HammerBros, 0, 0) + EndThread + Thread + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim14) + Call(SetNpcSpeed, NPC_Koopatrol_01, Float(5.0)) + Call(NpcMoveTo, NPC_Koopatrol_01, 436, -22, 0) + EndThread + Return + End }; EvtScript N(EVS_OpenDoor) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_tte, SOUND_BASIC_DOOR_OPEN, 0) - EVT_CALL(MakeLerp, 0, 120, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o57, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_tte, SOUND_BASIC_DOOR_OPEN, 0) + Call(MakeLerp, 0, 120, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o57, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_CloseDoor) = { - EVT_CALL(MakeLerp, 120, 0, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o57, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_tte, SOUND_BASIC_DOOR_CLOSE, 0) - EVT_RETURN - EVT_END + Call(MakeLerp, 120, 0, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o57, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_tte, SOUND_BASIC_DOOR_CLOSE, 0) + Return + End }; EvtScript N(EVS_TwinkHide) = { - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Cringe) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10) - EVT_CALL(LoadPath, 20 * DT, EVT_PTR(N(TwinkHidePath)), ARRAY_COUNT(N(TwinkHidePath)), EASING_LINEAR) - EVT_EXEC_WAIT(N(EVS_TwinkFollowPath)) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Sad) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Cringe) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10) + Call(LoadPath, 20 * DT, Ref(N(TwinkHidePath)), ARRAY_COUNT(N(TwinkHidePath)), EASING_LINEAR) + ExecWait(N(EVS_TwinkFollowPath)) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Sad) + Return + End }; EvtScript N(EVS_PeachSweat) = { - EVT_LOOP(0) - EVT_CALL(ShowSweat, 0, 1, -45, EMOTER_PLAYER, 0, 0, 0, 0, 20) - EVT_WAIT(20 * DT) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(ShowSweat, 0, 1, -45, EMOTER_PLAYER, 0, 0, 0, 0, 20) + Wait(20 * DT) + EndLoop + Return + End }; EvtScript N(EVS_TwinkSweat) = { - EVT_LOOP(0) - EVT_CALL(ShowSweat, NPC_PARTNER, 1, -45, EMOTER_NPC, 0, 0, 0, 0, 20) - EVT_WAIT(20 * DT) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(ShowSweat, NPC_PARTNER, 1, -45, EMOTER_NPC, 0, 0, 0, 0, 20) + Wait(20 * DT) + EndLoop + Return + End }; EvtScript N(EVS_ManageQuizGame) = { - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(RotateModel, MODEL_o57, 120, 0, 1, 0) - EVT_CALL(func_802D1270, 250, -30, EVT_FLOAT(2.0 / DT)) - EVT_EXEC_WAIT(N(EVS_CloseDoor)) - EVT_CALL(DisablePartnerAI, 0) - EVT_EXEC(N(EVS_TwinkHide)) - EVT_THREAD - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_Gasp) - EVT_WAIT(60 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach1_Idle) - EVT_END_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Koopatrol_01, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_Koopatrol_01, EMOTE_QUESTION, -45, 15, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(20 * DT) - EVT_CALL(InterpNpcYaw, NPC_Koopatrol_01, 90, 5) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim17) - EVT_CALL(NpcJump0, NPC_Koopatrol_01, 175, 0, -25, 10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(SpeakToPlayer, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_Peach_00EF) - EVT_CALL(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim09) - EVT_CALL(SetNpcSpeed, NPC_HammerBros, EVT_FLOAT(5.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_HammerBros, 130, -25, 0) - EVT_CALL(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim03) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 190, 0, -25) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 190, 0, -25) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(275.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToNpc, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 0, NPC_Koopatrol_01, MSG_Peach_00F0) - EVT_CALL(InterpNpcYaw, NPC_Koopatrol_01, 270, 0) - EVT_CALL(SpeakToNpc, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, NPC_HammerBros, MSG_Peach_00F1) - EVT_CALL(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim06) - EVT_CALL(SetNpcSpeed, NPC_HammerBros, EVT_FLOAT(2.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_HammerBros, 130, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim03) - EVT_CALL(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 0, MSG_Peach_00F2) - EVT_CALL(InterpNpcYaw, NPC_Koopatrol_01, 90, 5) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 40) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim04) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_01, EVT_FLOAT(2.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 0) - EVT_CALL(SpeakToPlayer, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_Peach_00F3) - EVT_THREAD - EVT_CALL(func_802D1270, 0, -25, EVT_FLOAT(2.0 / DT)) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_ForwardIdle) - EVT_CALL(SetPlayerPos, -230, 23, -140) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, 0, -25, 0) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim03) - EVT_CALL(SetNpcPos, NPC_Koopatrol_01, -320, 30, -140) - EVT_CALL(SetNpcYaw, NPC_Koopatrol_01, 90) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim06) - EVT_CALL(NpcMoveTo, NPC_HammerBros, 0, -25, 0) - EVT_CALL(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim03) - EVT_CALL(SetNpcPos, NPC_HammerBros, -230, 0, 0) - EVT_CALL(SetNpcYaw, NPC_HammerBros, 90) - EVT_END_THREAD - EVT_WAIT(60 * DT) - EVT_CALL(LoadPath, 50 * DT, EVT_PTR(N(TwinkFollowPath1)), ARRAY_COUNT(N(TwinkFollowPath1)), EASING_LINEAR) - EVT_EXEC_WAIT(N(EVS_TwinkFollowPath)) - EVT_EXEC_GET_TID(N(EVS_TwinkSweat), LVarA) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Shout, ANIM_Twink_Shout, 5, MSG_Peach_00F4) - EVT_KILL_THREAD(LVarA) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -230, 0, -140) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -230, 0, -140) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(RotateModel, MODEL_o57, 120, 0, 1, 0) + Call(func_802D1270, 250, -30, Float(2.0 / DT)) + ExecWait(N(EVS_CloseDoor)) + Call(DisablePartnerAI, 0) + Exec(N(EVS_TwinkHide)) + Thread + Call(SetPlayerAnimation, ANIM_Peach2_Gasp) + Wait(60 * DT) + Call(SetPlayerAnimation, ANIM_Peach1_Idle) + EndThread + Wait(20 * DT) + Call(PlaySoundAtNpc, NPC_Koopatrol_01, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_Koopatrol_01, EMOTE_QUESTION, -45, 15, EMOTER_NPC, 0, 0, 0, 0) + Wait(20 * DT) + Call(InterpNpcYaw, NPC_Koopatrol_01, 90, 5) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim17) + Call(NpcJump0, NPC_Koopatrol_01, 175, 0, -25, 10 * DT) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim01) + Call(SpeakToPlayer, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_Peach_00EF) + Call(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim09) + Call(SetNpcSpeed, NPC_HammerBros, Float(5.0 / DT)) + Call(NpcMoveTo, NPC_HammerBros, 130, -25, 0) + Call(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim03) + Call(UseSettingsFrom, CAM_DEFAULT, 190, 0, -25) + Call(SetPanTarget, CAM_DEFAULT, 190, 0, -25) + Call(SetCamDistance, CAM_DEFAULT, Float(275.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-11.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToNpc, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 0, NPC_Koopatrol_01, MSG_Peach_00F0) + Call(InterpNpcYaw, NPC_Koopatrol_01, 270, 0) + Call(SpeakToNpc, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, NPC_HammerBros, MSG_Peach_00F1) + Call(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim06) + Call(SetNpcSpeed, NPC_HammerBros, Float(2.0 / DT)) + Call(NpcMoveTo, NPC_HammerBros, 130, 0, 0) + Call(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim03) + Call(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 0, MSG_Peach_00F2) + Call(InterpNpcYaw, NPC_Koopatrol_01, 90, 5) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar0, 40) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim04) + Call(SetNpcSpeed, NPC_Koopatrol_01, Float(2.0 / DT)) + Call(NpcMoveTo, NPC_Koopatrol_01, LVar0, LVar2, 0) + Call(SpeakToPlayer, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_Peach_00F3) + Thread + Call(func_802D1270, 0, -25, Float(2.0 / DT)) + Call(SetPlayerAnimation, ANIM_Peach2_ForwardIdle) + Call(SetPlayerPos, -230, 23, -140) + EndThread + Thread + Call(NpcMoveTo, NPC_Koopatrol_01, 0, -25, 0) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim03) + Call(SetNpcPos, NPC_Koopatrol_01, -320, 30, -140) + Call(SetNpcYaw, NPC_Koopatrol_01, 90) + EndThread + Thread + Call(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim06) + Call(NpcMoveTo, NPC_HammerBros, 0, -25, 0) + Call(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim03) + Call(SetNpcPos, NPC_HammerBros, -230, 0, 0) + Call(SetNpcYaw, NPC_HammerBros, 90) + EndThread + Wait(60 * DT) + Call(LoadPath, 50 * DT, Ref(N(TwinkFollowPath1)), ARRAY_COUNT(N(TwinkFollowPath1)), EASING_LINEAR) + ExecWait(N(EVS_TwinkFollowPath)) + ExecGetTID(N(EVS_TwinkSweat), LVarA) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Shout, ANIM_Twink_Shout, 5, MSG_Peach_00F4) + KillThread(LVarA) + Call(UseSettingsFrom, CAM_DEFAULT, -230, 0, -140) + Call(SetPanTarget, CAM_DEFAULT, -230, 0, -140) #if VERSION_PAL - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.961)) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.961)) #else - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.8)) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.8)) #endif - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Angry) - EVT_CALL(LoadPath, 100 * DT, EVT_PTR(N(TwinkFollowPath2)), ARRAY_COUNT(N(TwinkFollowPath2)), EASING_LINEAR) - EVT_EXEC_WAIT(N(EVS_TwinkFollowPath)) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Idle) - EVT_WAIT(30 * DT) - EVT_CALL(SetMusicTrack, 0, SONG_PEACH_QUIZ_INTRO, 0, 8) - EVT_CALL(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5, MSG_Peach_00F5) - EVT_CALL(PlaySound, SOUND_AUDIENCE_CHEER) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5, MSG_Peach_00F6) - EVT_CALL(PlaySound, SOUND_AUDIENCE_CHEER) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_LookAround) - EVT_CALL(PlaySoundAtPlayer, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, 0, EMOTE_QUESTION, 45, 13, EMOTER_PLAYER, 0, 0, 0, 0) - EVT_WAIT(13 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, 0, EMOTE_QUESTION, -45, 13, EMOTER_PLAYER, 0, 0, 0, 0) - EVT_WAIT(13 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, 0, EMOTE_QUESTION, 45, 13, EMOTER_PLAYER, 0, 0, 0, 0) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Peach2_ForwardIdle) - EVT_CALL(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim06) - EVT_CALL(SetNpcFlagBits, NPC_HammerBros, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(NpcMoveTo, NPC_HammerBros, -395, 0, 0) - EVT_CALL(InterpNpcYaw, NPC_HammerBros, 90, 7 * DT) - EVT_CALL(NpcMoveTo, NPC_HammerBros, -395, -30, 0) - EVT_CALL(SetNpcFlagBits, NPC_HammerBros, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim03) - EVT_WAIT(10 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -395, 10, -40) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -395, 10, -40) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(275.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-370.0), EVT_FLOAT(40.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetMusicTrack, 0, SONG_PEACH_QUIZ_INTRO, 1, 8) - EVT_CALL(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5, MSG_Peach_00F8) - EVT_EXEC_WAIT(N(EVS_SetCam_Contestants)) - EVT_SET(AB_KKJ29_LeftKoopatrolScore, 0) - EVT_SET(AB_KKJ29_PeachScore, 0) - EVT_SET(AB_KKJ29_RightKoopatrolScore, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Angry) + Call(LoadPath, 100 * DT, Ref(N(TwinkFollowPath2)), ARRAY_COUNT(N(TwinkFollowPath2)), EASING_LINEAR) + ExecWait(N(EVS_TwinkFollowPath)) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Idle) + Wait(30 * DT) + Call(SetMusicTrack, 0, SONG_PEACH_QUIZ_INTRO, 0, 8) + Call(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5, MSG_Peach_00F5) + Call(PlaySound, SOUND_AUDIENCE_CHEER) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5, MSG_Peach_00F6) + Call(PlaySound, SOUND_AUDIENCE_CHEER) + Call(SetPlayerAnimation, ANIM_Peach2_LookAround) + Call(PlaySoundAtPlayer, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) + Call(ShowEmote, 0, EMOTE_QUESTION, 45, 13, EMOTER_PLAYER, 0, 0, 0, 0) + Wait(13 * DT) + Call(PlaySoundAtPlayer, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) + Call(ShowEmote, 0, EMOTE_QUESTION, -45, 13, EMOTER_PLAYER, 0, 0, 0, 0) + Wait(13 * DT) + Call(PlaySoundAtPlayer, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) + Call(ShowEmote, 0, EMOTE_QUESTION, 45, 13, EMOTER_PLAYER, 0, 0, 0, 0) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Peach2_ForwardIdle) + Call(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim06) + Call(SetNpcFlagBits, NPC_HammerBros, NPC_FLAG_GRAVITY, TRUE) + Call(NpcMoveTo, NPC_HammerBros, -395, 0, 0) + Call(InterpNpcYaw, NPC_HammerBros, 90, 7 * DT) + Call(NpcMoveTo, NPC_HammerBros, -395, -30, 0) + Call(SetNpcFlagBits, NPC_HammerBros, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim03) + Wait(10 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, -395, 10, -40) + Call(SetPanTarget, CAM_DEFAULT, -395, 10, -40) + Call(SetCamDistance, CAM_DEFAULT, Float(275.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-11.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(-370.0), Float(40.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetMusicTrack, 0, SONG_PEACH_QUIZ_INTRO, 1, 8) + Call(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5, MSG_Peach_00F8) + ExecWait(N(EVS_SetCam_Contestants)) + Set(AB_KKJ29_LeftKoopatrolScore, 0) + Set(AB_KKJ29_PeachScore, 0) + Set(AB_KKJ29_RightKoopatrolScore, 0) // round 1 - EVT_SET(LVar1, MSG_Peach_00FC) - EVT_SET(LVar2, 40 * DT) - EVT_SET(LVar3, MSG_Peach_00FD) - EVT_SET(LVar4, MSG_Choice_002C) - EVT_SET(LVar5, 1) - EVT_SET(LVar6, MSG_Peach_0111) - EVT_EXEC_WAIT(N(Script_DoRound)) + Set(LVar1, MSG_Peach_00FC) + Set(LVar2, 40 * DT) + Set(LVar3, MSG_Peach_00FD) + Set(LVar4, MSG_Choice_002C) + Set(LVar5, 1) + Set(LVar6, MSG_Peach_0111) + ExecWait(N(Script_DoRound)) // round 2 - EVT_SET(LVar1, MSG_Peach_00FE) - EVT_SET(LVar2, 10 * DT) - EVT_SET(LVar3, MSG_Peach_00FF) - EVT_SET(LVar4, MSG_Choice_002D) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, MSG_Peach_0112) - EVT_EXEC_WAIT(N(Script_DoRound)) + Set(LVar1, MSG_Peach_00FE) + Set(LVar2, 10 * DT) + Set(LVar3, MSG_Peach_00FF) + Set(LVar4, MSG_Choice_002D) + Set(LVar5, 0) + Set(LVar6, MSG_Peach_0112) + ExecWait(N(Script_DoRound)) // round 3 - EVT_SET(LVar1, MSG_Peach_0100) - EVT_SET(LVar2, 60 * DT) - EVT_SET(LVar3, MSG_Peach_0101) - EVT_SET(LVar4, MSG_Choice_002E) - EVT_SET(LVar5, 2) - EVT_SET(LVar6, MSG_Peach_0113) - EVT_EXEC_WAIT(N(Script_DoRound)) + Set(LVar1, MSG_Peach_0100) + Set(LVar2, 60 * DT) + Set(LVar3, MSG_Peach_0101) + Set(LVar4, MSG_Choice_002E) + Set(LVar5, 2) + Set(LVar6, MSG_Peach_0113) + ExecWait(N(Script_DoRound)) // round 4 - EVT_SET(LVar1, MSG_Peach_0102) - EVT_SET(LVar2, 10 * DT) - EVT_SET(LVar3, MSG_Peach_0103) - EVT_SET(LVar4, MSG_Choice_002F) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, MSG_Peach_0114) - EVT_EXEC_WAIT(N(Script_DoRound)) + Set(LVar1, MSG_Peach_0102) + Set(LVar2, 10 * DT) + Set(LVar3, MSG_Peach_0103) + Set(LVar4, MSG_Choice_002F) + Set(LVar5, 0) + Set(LVar6, MSG_Peach_0114) + ExecWait(N(Script_DoRound)) // round 5 - EVT_SET(LVar1, MSG_Peach_0104) - EVT_SET(LVar2, 30 * DT) - EVT_SET(LVar3, MSG_Peach_0105) - EVT_SET(LVar4, MSG_Choice_0030) - EVT_SET(LVar5, 2) - EVT_SET(LVar6, MSG_Peach_0115) - EVT_EXEC_WAIT(N(Script_DoRound)) + Set(LVar1, MSG_Peach_0104) + Set(LVar2, 30 * DT) + Set(LVar3, MSG_Peach_0105) + Set(LVar4, MSG_Choice_0030) + Set(LVar5, 2) + Set(LVar6, MSG_Peach_0115) + ExecWait(N(Script_DoRound)) // round 6 - EVT_SET(LVar1, MSG_Peach_0106) - EVT_SET(LVar2, 20) - EVT_SET(LVar3, MSG_Peach_0107) - EVT_SET(LVar4, MSG_Choice_0031) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, MSG_Peach_0116) - EVT_EXEC_WAIT(N(Script_DoRound)) + Set(LVar1, MSG_Peach_0106) + Set(LVar2, 20) + Set(LVar3, MSG_Peach_0107) + Set(LVar4, MSG_Choice_0031) + Set(LVar5, 0) + Set(LVar6, MSG_Peach_0116) + ExecWait(N(Script_DoRound)) // round 7 - EVT_SET(LVar1, MSG_Peach_0108) - EVT_SET(LVar2, 30 * DT) - EVT_SET(LVar3, MSG_Peach_0109) - EVT_SET(LVar4, MSG_Choice_0032) - EVT_SET(LVar5, 1) - EVT_SET(LVar6, MSG_Peach_0117) - EVT_EXEC_WAIT(N(Script_DoRound)) + Set(LVar1, MSG_Peach_0108) + Set(LVar2, 30 * DT) + Set(LVar3, MSG_Peach_0109) + Set(LVar4, MSG_Choice_0032) + Set(LVar5, 1) + Set(LVar6, MSG_Peach_0117) + ExecWait(N(Script_DoRound)) // round 8 - EVT_SET(LVar1, MSG_Peach_010A) - EVT_SET(LVar2, 60 * DT) - EVT_SET(LVar3, MSG_Peach_010B) - EVT_SET(LVar4, MSG_Choice_0033) - EVT_SET(LVar5, 1) - EVT_SET(LVar6, MSG_Peach_0118) - EVT_EXEC_WAIT(N(Script_DoRound)) + Set(LVar1, MSG_Peach_010A) + Set(LVar2, 60 * DT) + Set(LVar3, MSG_Peach_010B) + Set(LVar4, MSG_Choice_0033) + Set(LVar5, 1) + Set(LVar6, MSG_Peach_0118) + ExecWait(N(Script_DoRound)) // round 9 - EVT_SET(LVar1, MSG_Peach_010C) - EVT_SET(LVar2, 60 * DT) - EVT_SET(LVar3, MSG_Peach_010D) - EVT_SET(LVar4, MSG_Choice_0034) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, MSG_Peach_0119) - EVT_EXEC_WAIT(N(Script_DoRound)) + Set(LVar1, MSG_Peach_010C) + Set(LVar2, 60 * DT) + Set(LVar3, MSG_Peach_010D) + Set(LVar4, MSG_Choice_0034) + Set(LVar5, 0) + Set(LVar6, MSG_Peach_0119) + ExecWait(N(Script_DoRound)) // round 10 - EVT_SET(LVar1, MSG_Peach_010E) - EVT_SET(LVar2, 30 * DT) - EVT_SET(LVar3, MSG_Peach_010F) - EVT_SET(LVar4, MSG_Choice_0035) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, MSG_Peach_011A) - EVT_EXEC_WAIT(N(Script_DoRound)) - EVT_CALL(SetMusicTrack, 0, SONG_PEACH_MISSION, 0, 8) - EVT_EXEC_WAIT(N(EVS_DeclareWinner)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -230, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-13.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.5 / DT)) - EVT_CALL(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim06) - EVT_CALL(NpcMoveTo, NPC_HammerBros, -230, 0, 0) - EVT_CALL(InterpNpcYaw, NPC_HammerBros, 90, 0) - EVT_CALL(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim03) - EVT_CALL(SetMusicTrack, 0, SONG_PEACH_QUIZ_INTRO, 2, 8) - EVT_CALL(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 0, MSG_Peach_0125) - EVT_CALL(SetNpcVar, NPC_HammerBros, 0, 1) - EVT_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(PlayerMoveTo, -185, -140, 20) - EVT_CALL(PlayerMoveTo, -185, 0, 70) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetNpcVar, NPC_HammerBros, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(NpcFlyTo, NPC_PARTNER, -160, 50, 0, 90, 0, EASING_LINEAR) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(15 * DT) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim04) - EVT_CALL(SetNpcFlagBits, NPC_Koopatrol_01, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_02, EVT_FLOAT(2.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, -400, -140, 0) - EVT_CALL(SetNpcFlagBits, NPC_Koopatrol_01, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim01) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim04) - EVT_CALL(SetNpcFlagBits, NPC_Koopatrol_02, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_02, EVT_FLOAT(2.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_02, 0, -140, 0) - EVT_CALL(SetNpcFlagBits, NPC_Koopatrol_02, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcPos, NPC_Koopatrol_02, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcVar, NPC_HammerBros, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPanTarget, CAM_DEFAULT, -190, 0, 70) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_CALL(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 0, MSG_Peach_0126) - EVT_CALL(ShowGotItem, ITEM_SNEAKY_PARASOL, TRUE, 0) - EVT_CALL(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 0, MSG_Peach_0127) - EVT_WAIT(10 * DT) - EVT_CALL(SetMusicTrack, 0, SONG_BOWSER_THEME, 0, 8) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 330, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 330, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-13.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(250.0), EVT_FLOAT(40.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcPos, NPC_HammerBros, -350, 0, 0) - EVT_CALL(SetNpcPos, NPC_Koopatrol_01, -325, 0, -30) - EVT_CALL(SetNpcYaw, NPC_Koopatrol_01, 90) - EVT_EXEC(N(EVS_OpenDoor)) - EVT_CALL(SetNpcPos, NPC_Bowser, 410, 0, -25) - EVT_CALL(SetNpcSpeed, NPC_Bowser, EVT_FLOAT(2.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Walk) - EVT_CALL(NpcMoveTo, NPC_Bowser, 250, -25, 0) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) - EVT_CALL(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_HammerBros, MSG_Peach_0128) - EVT_CALL(ContinueSpeech, NPC_Bowser, ANIM_WorldBowser_TalkEyesClosed, ANIM_WorldBowser_Idle, 0, MSG_Peach_0129) - EVT_CALL(SetNpcVar, NPC_Bowser, 1, 1) - EVT_THREAD - EVT_CALL(SetPlayerPos, -185, 0, -100) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcPos, NPC_Bowser, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, -20) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_EXEC_GET_TID(N(EVS_PeachSweat), LVarA) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcVar, NPC_Bowser, 1, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_KILL_THREAD(LVarA) - EVT_WAIT(10 * DT) - EVT_CALL(InterpPlayerYaw, 90, 7) - EVT_CALL(func_802D1270, -180, -24, EVT_FLOAT(2.0 / DT)) - EVT_CALL(func_802D1270, -120, -24, EVT_FLOAT(2.0 / DT)) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcPos, NPC_PARTNER, -175, 60, -100) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 90) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcPos, NPC_Bowser, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, -10) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_EXEC_GET_TID(N(EVS_TwinkSweat), LVarA) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcVar, NPC_Bowser, 1, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_KILL_THREAD(LVarA) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 5) - EVT_CALL(LoadPath, 50 * DT, EVT_PTR(N(TwinkFlyAwayPath)), ARRAY_COUNT(N(TwinkFlyAwayPath)), EASING_LINEAR) - EVT_EXEC_WAIT(N(EVS_TwinkFollowPath)) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -300, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_END_THREAD - EVT_CALL(SetNpcSpeed, NPC_Bowser, EVT_FLOAT(3.75 / DT)) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Walk) - EVT_CALL(NpcMoveTo, NPC_Bowser, -260, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) - EVT_CALL(SetNpcVar, NPC_Bowser, 0, 0) - EVT_CALL(SetNpcVar, NPC_Bowser, 1, 0) - EVT_WAIT(10 * DT) - EVT_LOOP(2) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Talk) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) - EVT_WAIT(3 * DT) - EVT_CALL(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim0B) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim03) - EVT_WAIT(3 * DT) - EVT_END_LOOP - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_HammerBros, MSG_Peach_012A) - EVT_CALL(InterpNpcYaw, NPC_Bowser, 90, 5) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -190, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(PlayerJump1, LVar0, LVar1, LVar2, 10 * DT) - EVT_CALL(InterpPlayerYaw, 270, 5) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Shock) - EVT_CALL(GetNpcPos, NPC_Bowser, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Bowser, LVar0, LVar1, LVar2, 10 * DT) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Bowser, ANIM_WorldBowser_Shock, ANIM_WorldBowser_Shock, 5, MSG_Peach_012B) - EVT_CALL(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) - EVT_CALL(EndSpeech, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 5) - EVT_CALL(SpeakToPlayer, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 5, MSG_Peach_012C) - EVT_EXEC_WAIT(N(EVS_ApproachPeach)) - EVT_CALL(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5, MSG_Peach_012D) - EVT_EXEC_WAIT(N(EVS_PickUpPeach)) - EVT_CALL(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Carried, ANIM_Peach2_Carried, 5, MSG_Peach_012E) - EVT_EXEC_WAIT(N(EVS_CarryPeachAway)) - EVT_WAIT(30 * DT) - EVT_CALL(FadeOutMusic, 0, 1000 * DT) - EVT_EXEC_WAIT(N(EVS_EndPeachChapter5)) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Set(LVar1, MSG_Peach_010E) + Set(LVar2, 30 * DT) + Set(LVar3, MSG_Peach_010F) + Set(LVar4, MSG_Choice_0035) + Set(LVar5, 0) + Set(LVar6, MSG_Peach_011A) + ExecWait(N(Script_DoRound)) + Call(SetMusicTrack, 0, SONG_PEACH_MISSION, 0, 8) + ExecWait(N(EVS_DeclareWinner)) + Call(SetPanTarget, CAM_DEFAULT, -230, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-13.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.5 / DT)) + Call(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim06) + Call(NpcMoveTo, NPC_HammerBros, -230, 0, 0) + Call(InterpNpcYaw, NPC_HammerBros, 90, 0) + Call(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim03) + Call(SetMusicTrack, 0, SONG_PEACH_QUIZ_INTRO, 2, 8) + Call(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 0, MSG_Peach_0125) + Call(SetNpcVar, NPC_HammerBros, 0, 1) + Thread + Wait(20 * DT) + Call(DisablePlayerPhysics, FALSE) + Call(PlayerMoveTo, -185, -140, 20) + Call(PlayerMoveTo, -185, 0, 70) + Call(DisablePlayerPhysics, TRUE) + Call(SetNpcVar, NPC_HammerBros, 0, 0) + EndThread + Thread + Wait(20 * DT) + Call(NpcFlyTo, NPC_PARTNER, -160, 50, 0, 90, 0, EASING_LINEAR) + EndThread + Thread + Wait(15 * DT) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim04) + Call(SetNpcFlagBits, NPC_Koopatrol_01, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcSpeed, NPC_Koopatrol_02, Float(2.0 / DT)) + Call(NpcMoveTo, NPC_Koopatrol_01, -400, -140, 0) + Call(SetNpcFlagBits, NPC_Koopatrol_01, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim01) + EndThread + Thread + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim04) + Call(SetNpcFlagBits, NPC_Koopatrol_02, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcSpeed, NPC_Koopatrol_02, Float(2.0 / DT)) + Call(NpcMoveTo, NPC_Koopatrol_02, 0, -140, 0) + Call(SetNpcFlagBits, NPC_Koopatrol_02, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcPos, NPC_Koopatrol_02, NPC_DISPOSE_LOCATION) + EndThread + Loop(0) + Wait(1) + Call(GetNpcVar, NPC_HammerBros, 0, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(SetPanTarget, CAM_DEFAULT, -190, 0, 70) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(InterpPlayerYaw, 270, 0) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + Call(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 0, MSG_Peach_0126) + Call(ShowGotItem, ITEM_SNEAKY_PARASOL, TRUE, 0) + Call(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 0, MSG_Peach_0127) + Wait(10 * DT) + Call(SetMusicTrack, 0, SONG_BOWSER_THEME, 0, 8) + Call(UseSettingsFrom, CAM_DEFAULT, 330, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 330, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(350.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-13.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(250.0), Float(40.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Wait(20 * DT) + Call(SetNpcPos, NPC_HammerBros, -350, 0, 0) + Call(SetNpcPos, NPC_Koopatrol_01, -325, 0, -30) + Call(SetNpcYaw, NPC_Koopatrol_01, 90) + Exec(N(EVS_OpenDoor)) + Call(SetNpcPos, NPC_Bowser, 410, 0, -25) + Call(SetNpcSpeed, NPC_Bowser, Float(2.0 / DT)) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Walk) + Call(NpcMoveTo, NPC_Bowser, 250, -25, 0) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) + Call(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_HammerBros, MSG_Peach_0128) + Call(ContinueSpeech, NPC_Bowser, ANIM_WorldBowser_TalkEyesClosed, ANIM_WorldBowser_Idle, 0, MSG_Peach_0129) + Call(SetNpcVar, NPC_Bowser, 1, 1) + Thread + Call(SetPlayerPos, -185, 0, -100) + Call(InterpPlayerYaw, 90, 0) + Loop(0) + Wait(1) + Call(GetNpcPos, NPC_Bowser, LVar0, LVar1, LVar2) + IfLt(LVar0, -20) + BreakLoop + EndIf + EndLoop + Call(InterpPlayerYaw, 270, 0) + ExecGetTID(N(EVS_PeachSweat), LVarA) + Loop(0) + Wait(1) + Call(GetNpcVar, NPC_Bowser, 1, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + KillThread(LVarA) + Wait(10 * DT) + Call(InterpPlayerYaw, 90, 7) + Call(func_802D1270, -180, -24, Float(2.0 / DT)) + Call(func_802D1270, -120, -24, Float(2.0 / DT)) + EndThread + Thread + Call(SetNpcPos, NPC_PARTNER, -175, 60, -100) + Call(SetNpcYaw, NPC_PARTNER, 90) + Loop(0) + Wait(1) + Call(GetNpcPos, NPC_Bowser, LVar0, LVar1, LVar2) + IfLt(LVar0, -10) + BreakLoop + EndIf + EndLoop + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + ExecGetTID(N(EVS_TwinkSweat), LVarA) + Loop(0) + Wait(1) + Call(GetNpcVar, NPC_Bowser, 1, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + KillThread(LVarA) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Fly) + Call(InterpNpcYaw, NPC_PARTNER, 90, 5) + Call(LoadPath, 50 * DT, Ref(N(TwinkFlyAwayPath)), ARRAY_COUNT(N(TwinkFlyAwayPath)), EASING_LINEAR) + ExecWait(N(EVS_TwinkFollowPath)) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Twink_Idle) + EndThread + Thread + Wait(10 * DT) + Call(SetPanTarget, CAM_DEFAULT, -300, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + EndThread + Call(SetNpcSpeed, NPC_Bowser, Float(3.75 / DT)) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Walk) + Call(NpcMoveTo, NPC_Bowser, -260, 0, 0) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) + Call(SetNpcVar, NPC_Bowser, 0, 0) + Call(SetNpcVar, NPC_Bowser, 1, 0) + Wait(10 * DT) + Loop(2) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Talk) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) + Wait(3 * DT) + Call(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim0B) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_HammerBros, ANIM_HammerBros_Anim03) + Wait(3 * DT) + EndLoop + Wait(10 * DT) + Call(SpeakToNpc, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 0, NPC_HammerBros, MSG_Peach_012A) + Call(InterpNpcYaw, NPC_Bowser, 90, 5) + Call(SetPanTarget, CAM_DEFAULT, -190, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Thread + Wait(10 * DT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerJumpscale, Float(1.0)) + Call(PlayerJump1, LVar0, LVar1, LVar2, 10 * DT) + Call(InterpPlayerYaw, 270, 5) + EndThread + Thread + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Shock) + Call(GetNpcPos, NPC_Bowser, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Bowser, LVar0, LVar1, LVar2, 10 * DT) + EndThread + Call(SpeakToPlayer, NPC_Bowser, ANIM_WorldBowser_Shock, ANIM_WorldBowser_Shock, 5, MSG_Peach_012B) + Call(SetNpcAnimation, NPC_Bowser, ANIM_WorldBowser_Idle) + Call(EndSpeech, NPC_Bowser, ANIM_WorldBowser_Talk, ANIM_WorldBowser_Idle, 5) + Call(SpeakToPlayer, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 5, MSG_Peach_012C) + ExecWait(N(EVS_ApproachPeach)) + Call(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0B, ANIM_HammerBros_Anim03, 5, MSG_Peach_012D) + ExecWait(N(EVS_PickUpPeach)) + Call(SpeakToPlayer, NPC_PLAYER, ANIM_Peach2_Carried, ANIM_Peach2_Carried, 5, MSG_Peach_012E) + ExecWait(N(EVS_CarryPeachAway)) + Wait(30 * DT) + Call(FadeOutMusic, 0, 1000 * DT) + ExecWait(N(EVS_EndPeachChapter5)) + Call(EnablePartnerAI) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_kmr/kmr_00/kmr_00_1_music.c b/src/world/area_kmr/kmr_00/kmr_00_1_music.c index fade165a1ac..a7fd40c9c04 100644 --- a/src/world/area_kmr/kmr_00/kmr_00_1_music.c +++ b/src/world/area_kmr/kmr_00/kmr_00_1_music.c @@ -1,10 +1,10 @@ #include "kmr_00.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH0_WAKE_UP) - EVT_CALL(SetMusicTrack, 0, SONG_GOOMBA_VILLAGE, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_BIRDS) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH0_WAKE_UP) + Call(SetMusicTrack, 0, SONG_GOOMBA_VILLAGE, 0, 8) + Call(PlayAmbientSounds, AMBIENT_BIRDS) + EndIf + Return + End }; diff --git a/src/world/area_kmr/kmr_00/kmr_00_2_main.c b/src/world/area_kmr/kmr_00/kmr_00_2_main.c index 6e0211c9486..ae22d45319b 100644 --- a/src/world/area_kmr/kmr_00/kmr_00_2_main.c +++ b/src/world/area_kmr/kmr_00/kmr_00_2_main.c @@ -3,34 +3,34 @@ EvtScript N(EVS_ExitWalk_kmr_02_1) = EVT_EXIT_WALK(60, kmr_00_ENTRY_0, "kmr_02", kmr_02_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kmr_02_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kmr_02_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_GOOMBA_VILLAGE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_SET(GF_MAP_GoombaVillage, TRUE) - EVT_IF_LT(GB_StoryProgress, STORY_CH0_MET_INNKEEPER) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(ClearDefeatedEnemies) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_Scene_MarioRevived)) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_INTRO) - EVT_CALL(EnableModel, MODEL_ji_3, FALSE) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_GE(STORY_CH0_WAKE_UP) - EVT_CALL(EnableModel, MODEL_ji_1, FALSE) - EVT_CALL(EnableModel, MODEL_ji_2, FALSE) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_GOOMBA_VILLAGE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Set(GF_MAP_GoombaVillage, TRUE) + IfLt(GB_StoryProgress, STORY_CH0_MET_INNKEEPER) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(ClearDefeatedEnemies) + EndIf + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_Scene_MarioRevived)) + Switch(GB_StoryProgress) + CaseEq(STORY_INTRO) + Call(EnableModel, MODEL_ji_3, FALSE) + Exec(N(EVS_BindExitTriggers)) + CaseGe(STORY_CH0_WAKE_UP) + Call(EnableModel, MODEL_ji_1, FALSE) + Call(EnableModel, MODEL_ji_2, FALSE) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Wait(1) + Return + End }; diff --git a/src/world/area_kmr/kmr_00/kmr_00_3_revival.c b/src/world/area_kmr/kmr_00/kmr_00_3_revival.c index ea1d1d3c50f..ce1d9776efb 100644 --- a/src/world/area_kmr/kmr_00/kmr_00_3_revival.c +++ b/src/world/area_kmr/kmr_00/kmr_00_3_revival.c @@ -244,421 +244,421 @@ API_CALLABLE(N(func_PAL_80240D08)) { #endif EvtScript N(EVS_Scene_MarioRevived) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH0_WAKE_UP) - EVT_CALL(EnableModel, MODEL_reef_1, FALSE) - EVT_CALL(EnableModel, MODEL_reef_2, FALSE) - EVT_CALL(EnableModel, MODEL_reef_3, FALSE) - EVT_CALL(EnableModel, MODEL_reef_4, FALSE) - EVT_CALL(EnableModel, MODEL_moku1, FALSE) - EVT_CALL(EnableModel, MODEL_moku2, FALSE) - EVT_CALL(EnableModel, MODEL_ha1, FALSE) - EVT_CALL(EnableModel, MODEL_ha2, FALSE) - EVT_CALL(EnableModel, MODEL_ha2_1, FALSE) - EVT_CALL(EnableModel, MODEL_ha2_2, FALSE) - EVT_CALL(EnableModel, MODEL_ha2_3, FALSE) - EVT_RETURN - EVT_END_IF - EVT_SETF(MV_Unk_01, EVT_FLOAT(0.0)) - EVT_CALL(N(func_80240388_8AC318)) - EVT_CALL(N(func_80240000_8ABF90), 255, 255, 255, 60, 60, 60, 0) - EVT_CALL(FadeOutMusic, 0, 500) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, TRUE) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(PlayAmbientSounds, AMBIENT_BIRDS) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(6.0), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, -540) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 15, 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(func_802D4D14, 180) - EVT_CALL(SetPlayerPos, 0, 2, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Fallen) - EVT_WAIT(60 * DT) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.7 / DT)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, -350) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_WAIT(2) - EVT_SETF(LVar0, 0) - EVT_SETF(LVar1, 0) - EVT_LOOP(90 * DT) - EVT_CALL(TranslateModel, MODEL_reef_3, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_reef_4, LVar1, 0, 0) - EVT_ADDF(LVar0, EVT_FLOAT(-0.66 / DT)) + IfGe(GB_StoryProgress, STORY_CH0_WAKE_UP) + Call(EnableModel, MODEL_reef_1, FALSE) + Call(EnableModel, MODEL_reef_2, FALSE) + Call(EnableModel, MODEL_reef_3, FALSE) + Call(EnableModel, MODEL_reef_4, FALSE) + Call(EnableModel, MODEL_moku1, FALSE) + Call(EnableModel, MODEL_moku2, FALSE) + Call(EnableModel, MODEL_ha1, FALSE) + Call(EnableModel, MODEL_ha2, FALSE) + Call(EnableModel, MODEL_ha2_1, FALSE) + Call(EnableModel, MODEL_ha2_2, FALSE) + Call(EnableModel, MODEL_ha2_3, FALSE) + Return + EndIf + SetF(MV_Unk_01, Float(0.0)) + Call(N(func_80240388_8AC318)) + Call(N(func_80240000_8ABF90), 255, 255, 255, 60, 60, 60, 0) + Call(FadeOutMusic, 0, 500) + Call(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, TRUE) + Call(InterpPlayerYaw, 90, 0) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(PlayAmbientSounds, AMBIENT_BIRDS) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetCamPitch, CAM_DEFAULT, Float(6.0), Float(-7.5)) + Call(SetCamDistance, CAM_DEFAULT, -540) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetPanTarget, CAM_DEFAULT, 0, 15, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(func_802D4D14, 180) + Call(SetPlayerPos, 0, 2, 0) + Call(SetPlayerAnimation, ANIM_Mario1_Fallen) + Wait(60 * DT) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.7 / DT)) + Call(SetCamDistance, CAM_DEFAULT, -350) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Wait(2) + SetF(LVar0, 0) + SetF(LVar1, 0) + Loop(90 * DT) + Call(TranslateModel, MODEL_reef_3, LVar0, 0, 0) + Call(TranslateModel, MODEL_reef_4, LVar1, 0, 0) + AddF(LVar0, Float(-0.66 / DT)) #if VERSION_PAL - EVT_ADDF(LVar1, EVT_FLOAT(0.79296875)) // 0.66 / DT rounds slightly off + AddF(LVar1, Float(0.79296875)) // 0.66 / DT rounds slightly off #else - EVT_ADDF(LVar1, EVT_FLOAT(0.66 / DT)) + AddF(LVar1, Float(0.66 / DT)) #endif - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(20 * DT) - EVT_SETF(LVar0, 0) - EVT_SETF(LVar1, 0) - EVT_LOOP(120 * DT) - EVT_CALL(TranslateModel, MODEL_reef_1, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_reef_2, LVar1, 0, 0) - EVT_CALL(TranslateModel, MODEL_moku2, LVar1, 0, 0) - EVT_CALL(TranslateModel, MODEL_ha2_1, LVar1, 0, 0) - EVT_CALL(TranslateModel, MODEL_ha2_2, LVar1, 0, 0) - EVT_CALL(TranslateModel, MODEL_ha2_3, LVar1, 0, 0) - EVT_ADDF(LVar0, EVT_FLOAT(-0.75 / DT)) - EVT_ADDF(LVar1, EVT_FLOAT(0.75 / DT)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_SETF(LVar0, 0) - EVT_SETF(LVar1, 0) - EVT_LOOP(120 * DT) - EVT_CALL(TranslateModel, MODEL_moku1, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_ha1, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_ha2, LVar0, 0, 0) - EVT_CALL(RotateModel, MODEL_moku1, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_ha1, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_ha2, LVar1, 0, 1, 0) - EVT_ADDF(LVar0, EVT_FLOAT(-0.2 / DT)) - EVT_ADDF(LVar1, EVT_FLOAT(-0.4 / DT)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(140 * DT) - EVT_CALL(N(func_80240584_8AC514)) - EVT_WAIT(30 * DT) - EVT_CALL(SetMusicTrack, 0, SONG_STAR_SPIRIT_THEME, 0, 8) - EVT_THREAD - EVT_CALL(N(func_80240000_8ABF90), 50, 50, 50, 0, 0, 0, 50 * DT) - EVT_END_THREAD - EVT_WAIT(90 * DT) - EVT_CALL(func_802D4D88) + Wait(1) + EndLoop + EndThread + Thread + Wait(20 * DT) + SetF(LVar0, 0) + SetF(LVar1, 0) + Loop(120 * DT) + Call(TranslateModel, MODEL_reef_1, LVar0, 0, 0) + Call(TranslateModel, MODEL_reef_2, LVar1, 0, 0) + Call(TranslateModel, MODEL_moku2, LVar1, 0, 0) + Call(TranslateModel, MODEL_ha2_1, LVar1, 0, 0) + Call(TranslateModel, MODEL_ha2_2, LVar1, 0, 0) + Call(TranslateModel, MODEL_ha2_3, LVar1, 0, 0) + AddF(LVar0, Float(-0.75 / DT)) + AddF(LVar1, Float(0.75 / DT)) + Wait(1) + EndLoop + EndThread + Thread + Wait(10 * DT) + SetF(LVar0, 0) + SetF(LVar1, 0) + Loop(120 * DT) + Call(TranslateModel, MODEL_moku1, LVar0, 0, 0) + Call(TranslateModel, MODEL_ha1, LVar0, 0, 0) + Call(TranslateModel, MODEL_ha2, LVar0, 0, 0) + Call(RotateModel, MODEL_moku1, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_ha1, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_ha2, LVar1, 0, 1, 0) + AddF(LVar0, Float(-0.2 / DT)) + AddF(LVar1, Float(-0.4 / DT)) + Wait(1) + EndLoop + EndThread + Wait(140 * DT) + Call(N(func_80240584_8AC514)) + Wait(30 * DT) + Call(SetMusicTrack, 0, SONG_STAR_SPIRIT_THEME, 0, 8) + Thread + Call(N(func_80240000_8ABF90), 50, 50, 50, 0, 0, 0, 50 * DT) + EndThread + Wait(90 * DT) + Call(func_802D4D88) #if VERSION_PAL - EVT_SET(MV_Unk_02, 0) + Set(MV_Unk_02, 0) #endif - EVT_THREAD - EVT_CALL(N(func_802405F0_8AC580), 1, 0, 180) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(func_802405F0_8AC580), 2, 1, 30) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(func_802405F0_8AC580), 3, 2, 90) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(func_802405F0_8AC580), 4, 3, 150) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(func_802405F0_8AC580), 5, 4, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(func_802405F0_8AC580), 6, 5, 60) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(func_802405F0_8AC580), 7, 6, 120) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(330 * DT) - EVT_CALL(MakeLerp, 6000, 12000, 120 * DT, EASING_LINEAR) - EVT_LABEL(25) - EVT_CALL(UpdateLerp) - EVT_CALL(N(func_802404E8_8AC478)) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(25) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(550 * DT) + Thread + Call(N(func_802405F0_8AC580), 1, 0, 180) + EndThread + Thread + Call(N(func_802405F0_8AC580), 2, 1, 30) + EndThread + Thread + Call(N(func_802405F0_8AC580), 3, 2, 90) + EndThread + Thread + Call(N(func_802405F0_8AC580), 4, 3, 150) + EndThread + Thread + Call(N(func_802405F0_8AC580), 5, 4, 0) + EndThread + Thread + Call(N(func_802405F0_8AC580), 6, 5, 60) + EndThread + Thread + Call(N(func_802405F0_8AC580), 7, 6, 120) + EndThread + Thread + Wait(330 * DT) + Call(MakeLerp, 6000, 12000, 120 * DT, EASING_LINEAR) + Label(25) + Call(UpdateLerp) + Call(N(func_802404E8_8AC478)) + Wait(1) + IfNe(LVar1, 0) + Goto(25) + EndIf + EndThread + Wait(550 * DT) #if VERSION_PAL - EVT_WAIT(15 * DT) - EVT_CALL(N(func_PAL_80240D08)) + Wait(15 * DT) + Call(N(func_PAL_80240D08)) #endif - EVT_CALL(GetNpcPos, NPC_Kalmar, LVar6, LVar7, LVar8) - EVT_CALL(GetNpcPos, NPC_Mamar, LVar9, LVarA, LVarB) + Call(GetNpcPos, NPC_Kalmar, LVar6, LVar7, LVar8) + Call(GetNpcPos, NPC_Mamar, LVar9, LVarA, LVarB) #if !VERSION_PAL - EVT_WAIT(15) + Wait(15) #endif - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, -200) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_LeanLeft) - EVT_CALL(NpcFlyTo, NPC_Kalmar, 20, 10, -5, 25 * DT, -10, EASING_QUADRATIC_OUT) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_LeanLeftAlt) - EVT_WAIT(35 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_LeanRight) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(3) - EVT_CALL(N(func_80240530_8AC4C0), NPC_Kalmar) - EVT_WAIT(6 * DT) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_CALL(N(func_80240530_8AC4C0), NPC_Mamar) - EVT_CALL(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_LeanLeft) - EVT_CALL(NpcFlyTo, NPC_Mamar, -20, 10, -5, 25 * DT, -10, EASING_QUADRATIC_OUT) - EVT_WAIT(5 * DT) - EVT_CALL(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_LeanLeftAlt) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_LeanRight) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(3) - EVT_CALL(N(func_80240530_8AC4C0), NPC_Mamar) - EVT_WAIT(6 * DT) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(35 * DT) - EVT_CALL(SpeakToPlayer, NPC_Mamar, ANIM_WorldMamar_TalkHappy, ANIM_WorldMamar_Idle, 5, MSG_CH0_0000) - EVT_WAIT(15 * DT) - EVT_CALL(SpeakToPlayer, NPC_Kalmar, ANIM_WorldMamar_TalkHappy, ANIM_WorldMamar_Idle, 5, MSG_CH0_0001) - EVT_WAIT(3) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_LeanLeftAlt) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_LeanRight) - EVT_WAIT(10 * DT) - EVT_CALL(NpcFlyTo, NPC_Kalmar, LVar6, LVar7, LVar8, 15 * DT, -10, EASING_CUBIC_OUT) - EVT_CALL(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(40 * DT) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, -350) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_LOOP(3) - EVT_CALL(N(func_80240530_8AC4C0), NPC_Kalmar) - EVT_WAIT(4) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_LeanLeftAlt) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_LeanRight) - EVT_WAIT(10 * DT) - EVT_CALL(NpcFlyTo, NPC_Mamar, LVar9, LVarA, LVarB, 15 * DT, -10, EASING_CUBIC_OUT) - EVT_CALL(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(40 * DT) - EVT_LOOP(3) - EVT_CALL(N(func_80240530_8AC4C0), NPC_Mamar) - EVT_WAIT(4) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(90 * DT) - EVT_CALL(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Wave, 5, MSG_CH0_0002) - EVT_WAIT(15 * DT) - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Eldstar, NPC_FLAG_TOUCHES_GROUND, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Eldstar, ANIM_WorldEldstar_Leap) - EVT_CALL(SetNpcJumpscale, NPC_Eldstar, EVT_FLOAT(3.2)) - EVT_CALL(GetNpcPos, NPC_Eldstar, LVar6, LVar7, LVar8) - EVT_CALL(NpcJump0, NPC_Eldstar, LVar6, LVar7, LVar8, 5 * DT) - EVT_CALL(SetNpcAnimation, NPC_Eldstar, ANIM_WorldEldstar_Idle) - EVT_CALL(PlaySoundAtPlayer, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT) - EVT_CALL(N(func_802403B8_8AC348), 0, 0, 0, 3, 10) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_Leap) - EVT_CALL(SetNpcFlagBits, NPC_Mamar, NPC_FLAG_TOUCHES_GROUND, FALSE) - EVT_CALL(SetNpcJumpscale, NPC_Mamar, EVT_FLOAT(3.2)) - EVT_CALL(GetNpcPos, NPC_Mamar, LVar6, LVar7, LVar8) - EVT_CALL(NpcJump0, NPC_Mamar, LVar6, LVar7, LVar8, 5 * DT) - EVT_CALL(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(21) - EVT_CALL(SetNpcAnimation, NPC_Skolar, ANIM_WorldSkolar_Leap) - EVT_CALL(SetNpcFlagBits, NPC_Skolar, NPC_FLAG_TOUCHES_GROUND, FALSE) - EVT_CALL(SetNpcJumpscale, NPC_Skolar, EVT_FLOAT(3.2)) - EVT_CALL(GetNpcPos, NPC_Skolar, LVar6, LVar7, LVar8) - EVT_CALL(NpcJump0, NPC_Skolar, LVar6, LVar7, LVar8, 5 * DT) - EVT_CALL(SetNpcAnimation, NPC_Skolar, ANIM_WorldSkolar_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(22) - EVT_CALL(SetNpcAnimation, NPC_Muskular, ANIM_WorldMuskular_Leap) - EVT_CALL(SetNpcFlagBits, NPC_Muskular, NPC_FLAG_TOUCHES_GROUND, FALSE) - EVT_CALL(SetNpcJumpscale, NPC_Muskular, EVT_FLOAT(3.2)) - EVT_CALL(GetNpcPos, NPC_Muskular, LVar6, LVar7, LVar8) - EVT_CALL(NpcJump0, NPC_Muskular, LVar6, LVar7, LVar8, 5 * DT) - EVT_CALL(SetNpcAnimation, NPC_Muskular, ANIM_WorldMuskular_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_Misstar, ANIM_WorldMisstar_Leap) - EVT_CALL(SetNpcFlagBits, NPC_Misstar, NPC_FLAG_TOUCHES_GROUND, FALSE) - EVT_CALL(SetNpcJumpscale, NPC_Misstar, EVT_FLOAT(3.2)) - EVT_CALL(GetNpcPos, NPC_Misstar, LVar6, LVar7, LVar8) - EVT_CALL(NpcJump0, NPC_Misstar, LVar6, LVar7, LVar8, 5 * DT) - EVT_CALL(SetNpcAnimation, NPC_Misstar, ANIM_WorldMisstar_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(21) - EVT_CALL(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Leap) - EVT_CALL(SetNpcFlagBits, NPC_Klevar, NPC_FLAG_TOUCHES_GROUND, FALSE) - EVT_CALL(SetNpcJumpscale, NPC_Klevar, EVT_FLOAT(3.2)) - EVT_CALL(GetNpcPos, NPC_Klevar, LVar6, LVar7, LVar8) - EVT_CALL(NpcJump0, NPC_Klevar, LVar6, LVar7, LVar8, 5 * DT) - EVT_CALL(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(22) - EVT_CALL(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_Leap) - EVT_CALL(SetNpcFlagBits, NPC_Kalmar, NPC_FLAG_TOUCHES_GROUND, FALSE) - EVT_CALL(SetNpcJumpscale, NPC_Kalmar, EVT_FLOAT(3.2)) - EVT_CALL(GetNpcPos, NPC_Kalmar, LVar6, LVar7, LVar8) - EVT_CALL(NpcJump0, NPC_Kalmar, LVar6, LVar7, LVar8, 5 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_Idle) - EVT_END_THREAD - EVT_WAIT(30 * DT) - EVT_THREAD - EVT_WAIT(45 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_GET_STAR_POWER_WAVE, SOUND_SPACE_DEFAULT) - EVT_CALL(N(func_802404A0_8AC430)) - EVT_END_THREAD - EVT_CALL(PlaySoundAtPlayer, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT) - EVT_CALL(N(func_802403B8_8AC348), 0, 10, 10, 3, 10) - EVT_WAIT(6 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT) - EVT_CALL(N(func_802403B8_8AC348), 0, 0, 10, 3, 15) - EVT_WAIT(6 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT) - EVT_CALL(N(func_802403B8_8AC348), 0, -10, 10, 3, 20) - EVT_WAIT(6 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT) - EVT_CALL(N(func_802403B8_8AC348), 0, 10, 10, 3, 25) - EVT_WAIT(6 * DT) - EVT_LOOP(3) - EVT_CALL(PlaySoundAtPlayer, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT) - EVT_CALL(N(func_802403B8_8AC348), 0, 0, 10, 3, 30) - EVT_WAIT(6 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT) - EVT_CALL(N(func_802403B8_8AC348), 0, -10, 10, 3, 30) - EVT_WAIT(6 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT) - EVT_CALL(N(func_802403B8_8AC348), 0, 10, 10, 3, 30) - EVT_WAIT(6 * DT) - EVT_END_LOOP - EVT_WAIT(40 * DT) - EVT_CALL(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Wave, 5, MSG_CH0_0003) - EVT_THREAD - EVT_WAIT(15 * DT) - EVT_CALL(N(func_80240BD8_8ACB68), NPC_Misstar) - EVT_WAIT(2) - EVT_CALL(N(func_80240BD8_8ACB68), NPC_Mamar) - EVT_WAIT(2) - EVT_CALL(N(func_80240BD8_8ACB68), NPC_Klevar) - EVT_WAIT(2) - EVT_CALL(N(func_80240BD8_8ACB68), NPC_Skolar) - EVT_WAIT(2) - EVT_CALL(N(func_80240BD8_8ACB68), NPC_Kalmar) - EVT_WAIT(2) - EVT_CALL(N(func_80240BD8_8ACB68), NPC_Muskular) - EVT_WAIT(2) - EVT_CALL(N(func_80240BD8_8ACB68), NPC_Eldstar) - EVT_END_THREAD - EVT_CALL(FadeOutMusic, 0, 5000 * DT) - EVT_THREAD - EVT_WAIT(90 * DT) - EVT_CALL(N(func_802405A8_8AC538)) - EVT_END_THREAD - EVT_WAIT(60 * DT) - EVT_CALL(N(func_80240000_8ABF90), 255, 255, 255, 0, 0, 0, 50 * DT) - EVT_CALL(SetNpcSpeed, NPC_Goombaria, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetNpcFlagBits, NPC_Goombaria, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Goombaria, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Goombaria, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Walk) - EVT_CALL(SetNpcPos, NPC_Goombaria, 300, 0, 0) - EVT_CALL(NpcMoveTo, NPC_Goombaria, 110, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Stand) - EVT_CALL(InterpNpcYaw, NPC_Goombaria, 90, 1) - EVT_WAIT(10 * DT) - EVT_CALL(InterpNpcYaw, NPC_Goombaria, 270, 1) - EVT_WAIT(15 * DT) - EVT_CALL(InterpNpcYaw, NPC_Goombaria, 90, 1) - EVT_WAIT(18 * DT) - EVT_CALL(InterpNpcYaw, NPC_Goombaria, 270, 1) - EVT_WAIT(10 * DT) - EVT_WAIT(6 * DT) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 200) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 15, -12) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(GetNpcPos, NPC_Goombaria, LVar3, LVar4, LVar5) - EVT_ADD(LVar3, -20) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_WAIT(25 * DT) - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_LeanOver) - EVT_CALL(PlaySoundAtNpc, NPC_Goombaria, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_Goombaria, EMOTE_QUESTION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(25 * DT) - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Stand) - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Stand, 5, MSG_CH0_0004) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 1) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetNpcSpeed, NPC_Goombaria, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Run) - EVT_CALL(NpcMoveTo, NPC_Goombaria, 30, -10, 0) - EVT_WAIT(2) - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Inspect) - EVT_WAIT(15 * DT) - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Inspect, ANIM_Goombaria_Inspect, 5, MSG_CH0_0005) - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Talk) - EVT_CALL(NpcJump0, NPC_Goombaria, 30, 0, -10, 4) - EVT_WAIT(5 * DT) - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_LeanOver) - EVT_CALL(NpcJump0, NPC_Goombaria, 30, 0, -10, 4) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Stand, 5, MSG_CH0_0006) - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Run) - EVT_CALL(SetNpcSpeed, NPC_Goombaria, EVT_FLOAT(6.0)) - EVT_CALL(NpcMoveTo, NPC_Goombaria, -30, -5, 0) - EVT_CALL(NpcFacePlayer, NPC_Goombaria, 5) - EVT_CALL(SetNpcJumpscale, NPC_Goombaria, EVT_FLOAT(4.0)) - EVT_CALL(NpcJump0, NPC_Goombaria, -29, 0, 5, 4) - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Run) - EVT_CALL(SetNpcSpeed, NPC_Goombaria, EVT_FLOAT(6.0)) - EVT_CALL(NpcMoveTo, NPC_Goombaria, 34, 5, 0) - EVT_CALL(NpcFacePlayer, NPC_Goombaria, 5) - EVT_CALL(SetNpcJumpscale, NPC_Goombaria, EVT_FLOAT(4.0)) - EVT_CALL(NpcJump0, NPC_Goombaria, 33, 0, 5, 4) - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Run) - EVT_CALL(SetNpcSpeed, NPC_Goombaria, EVT_FLOAT(6.0)) - EVT_CALL(NpcMoveTo, NPC_Goombaria, -30, 5, 0) - EVT_CALL(NpcFacePlayer, NPC_Goombaria, 5) - EVT_CALL(SetNpcJumpscale, NPC_Goombaria, EVT_FLOAT(4.0)) - EVT_CALL(NpcJump0, NPC_Goombaria, -29, 0, 5, 4) - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Run) - EVT_CALL(SetNpcSpeed, NPC_Goombaria, EVT_FLOAT(6.0)) - EVT_CALL(NpcMoveTo, NPC_Goombaria, 34, 5, 0) - EVT_CALL(NpcFacePlayer, NPC_Goombaria, 5) - EVT_CALL(SetNpcJumpscale, NPC_Goombaria, EVT_FLOAT(4.0)) - EVT_CALL(NpcJump0, NPC_Goombaria, 33, 0, 5, 4) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Stand, 5, MSG_CH0_0007) - EVT_WAIT(20 * DT) - EVT_THREAD - EVT_CALL(SetNpcSpeed, NPC_Goombaria, EVT_FLOAT(4.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Goombaria, 450, 0, 0) - EVT_END_THREAD - EVT_WAIT(15 * DT) - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Stand, 5, MSG_CH0_0008) - EVT_WAIT(30 * DT) - EVT_SET(GB_StoryProgress, STORY_CH0_WAKE_UP) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(N(func_802405CC_8AC55C)) - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_02"), kmr_02_ENTRY_5, TRANSITION_MARIO_BLACK) - EVT_RETURN - EVT_END + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(SetCamDistance, CAM_DEFAULT, -200) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Call(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_LeanLeft) + Call(NpcFlyTo, NPC_Kalmar, 20, 10, -5, 25 * DT, -10, EASING_QUADRATIC_OUT) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_LeanLeftAlt) + Wait(35 * DT) + Call(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_LeanRight) + EndThread + Thread + Loop(3) + Call(N(func_80240530_8AC4C0), NPC_Kalmar) + Wait(6 * DT) + EndLoop + EndThread + Wait(10 * DT) + Thread + Call(N(func_80240530_8AC4C0), NPC_Mamar) + Call(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_LeanLeft) + Call(NpcFlyTo, NPC_Mamar, -20, 10, -5, 25 * DT, -10, EASING_QUADRATIC_OUT) + Wait(5 * DT) + Call(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_LeanLeftAlt) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_LeanRight) + EndThread + Thread + Loop(3) + Call(N(func_80240530_8AC4C0), NPC_Mamar) + Wait(6 * DT) + EndLoop + EndThread + Wait(35 * DT) + Call(SpeakToPlayer, NPC_Mamar, ANIM_WorldMamar_TalkHappy, ANIM_WorldMamar_Idle, 5, MSG_CH0_0000) + Wait(15 * DT) + Call(SpeakToPlayer, NPC_Kalmar, ANIM_WorldMamar_TalkHappy, ANIM_WorldMamar_Idle, 5, MSG_CH0_0001) + Wait(3) + Thread + Call(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_LeanLeftAlt) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_LeanRight) + Wait(10 * DT) + Call(NpcFlyTo, NPC_Kalmar, LVar6, LVar7, LVar8, 15 * DT, -10, EASING_CUBIC_OUT) + Call(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_Idle) + EndThread + Thread + Wait(40 * DT) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(SetCamDistance, CAM_DEFAULT, -350) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Loop(3) + Call(N(func_80240530_8AC4C0), NPC_Kalmar) + Wait(4) + EndLoop + EndThread + Thread + Call(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_LeanLeftAlt) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_LeanRight) + Wait(10 * DT) + Call(NpcFlyTo, NPC_Mamar, LVar9, LVarA, LVarB, 15 * DT, -10, EASING_CUBIC_OUT) + Call(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_Idle) + EndThread + Thread + Wait(40 * DT) + Loop(3) + Call(N(func_80240530_8AC4C0), NPC_Mamar) + Wait(4) + EndLoop + EndThread + Wait(90 * DT) + Call(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Wave, 5, MSG_CH0_0002) + Wait(15 * DT) + Thread + Call(SetNpcFlagBits, NPC_Eldstar, NPC_FLAG_TOUCHES_GROUND, FALSE) + Call(SetNpcAnimation, NPC_Eldstar, ANIM_WorldEldstar_Leap) + Call(SetNpcJumpscale, NPC_Eldstar, Float(3.2)) + Call(GetNpcPos, NPC_Eldstar, LVar6, LVar7, LVar8) + Call(NpcJump0, NPC_Eldstar, LVar6, LVar7, LVar8, 5 * DT) + Call(SetNpcAnimation, NPC_Eldstar, ANIM_WorldEldstar_Idle) + Call(PlaySoundAtPlayer, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT) + Call(N(func_802403B8_8AC348), 0, 0, 0, 3, 10) + EndThread + Thread + Wait(20) + Call(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_Leap) + Call(SetNpcFlagBits, NPC_Mamar, NPC_FLAG_TOUCHES_GROUND, FALSE) + Call(SetNpcJumpscale, NPC_Mamar, Float(3.2)) + Call(GetNpcPos, NPC_Mamar, LVar6, LVar7, LVar8) + Call(NpcJump0, NPC_Mamar, LVar6, LVar7, LVar8, 5 * DT) + Call(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_Idle) + EndThread + Thread + Wait(21) + Call(SetNpcAnimation, NPC_Skolar, ANIM_WorldSkolar_Leap) + Call(SetNpcFlagBits, NPC_Skolar, NPC_FLAG_TOUCHES_GROUND, FALSE) + Call(SetNpcJumpscale, NPC_Skolar, Float(3.2)) + Call(GetNpcPos, NPC_Skolar, LVar6, LVar7, LVar8) + Call(NpcJump0, NPC_Skolar, LVar6, LVar7, LVar8, 5 * DT) + Call(SetNpcAnimation, NPC_Skolar, ANIM_WorldSkolar_Idle) + EndThread + Thread + Wait(22) + Call(SetNpcAnimation, NPC_Muskular, ANIM_WorldMuskular_Leap) + Call(SetNpcFlagBits, NPC_Muskular, NPC_FLAG_TOUCHES_GROUND, FALSE) + Call(SetNpcJumpscale, NPC_Muskular, Float(3.2)) + Call(GetNpcPos, NPC_Muskular, LVar6, LVar7, LVar8) + Call(NpcJump0, NPC_Muskular, LVar6, LVar7, LVar8, 5 * DT) + Call(SetNpcAnimation, NPC_Muskular, ANIM_WorldMuskular_Idle) + EndThread + Thread + Wait(20) + Call(SetNpcAnimation, NPC_Misstar, ANIM_WorldMisstar_Leap) + Call(SetNpcFlagBits, NPC_Misstar, NPC_FLAG_TOUCHES_GROUND, FALSE) + Call(SetNpcJumpscale, NPC_Misstar, Float(3.2)) + Call(GetNpcPos, NPC_Misstar, LVar6, LVar7, LVar8) + Call(NpcJump0, NPC_Misstar, LVar6, LVar7, LVar8, 5 * DT) + Call(SetNpcAnimation, NPC_Misstar, ANIM_WorldMisstar_Idle) + EndThread + Thread + Wait(21) + Call(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Leap) + Call(SetNpcFlagBits, NPC_Klevar, NPC_FLAG_TOUCHES_GROUND, FALSE) + Call(SetNpcJumpscale, NPC_Klevar, Float(3.2)) + Call(GetNpcPos, NPC_Klevar, LVar6, LVar7, LVar8) + Call(NpcJump0, NPC_Klevar, LVar6, LVar7, LVar8, 5 * DT) + Call(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Idle) + EndThread + Thread + Wait(22) + Call(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_Leap) + Call(SetNpcFlagBits, NPC_Kalmar, NPC_FLAG_TOUCHES_GROUND, FALSE) + Call(SetNpcJumpscale, NPC_Kalmar, Float(3.2)) + Call(GetNpcPos, NPC_Kalmar, LVar6, LVar7, LVar8) + Call(NpcJump0, NPC_Kalmar, LVar6, LVar7, LVar8, 5 * DT) + Call(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_Idle) + EndThread + Wait(30 * DT) + Thread + Wait(45 * DT) + Call(PlaySoundAtPlayer, SOUND_GET_STAR_POWER_WAVE, SOUND_SPACE_DEFAULT) + Call(N(func_802404A0_8AC430)) + EndThread + Call(PlaySoundAtPlayer, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT) + Call(N(func_802403B8_8AC348), 0, 10, 10, 3, 10) + Wait(6 * DT) + Call(PlaySoundAtPlayer, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT) + Call(N(func_802403B8_8AC348), 0, 0, 10, 3, 15) + Wait(6 * DT) + Call(PlaySoundAtPlayer, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT) + Call(N(func_802403B8_8AC348), 0, -10, 10, 3, 20) + Wait(6 * DT) + Call(PlaySoundAtPlayer, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT) + Call(N(func_802403B8_8AC348), 0, 10, 10, 3, 25) + Wait(6 * DT) + Loop(3) + Call(PlaySoundAtPlayer, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT) + Call(N(func_802403B8_8AC348), 0, 0, 10, 3, 30) + Wait(6 * DT) + Call(PlaySoundAtPlayer, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT) + Call(N(func_802403B8_8AC348), 0, -10, 10, 3, 30) + Wait(6 * DT) + Call(PlaySoundAtPlayer, SOUND_SEQ_STAR_SPIRIT_CAST, SOUND_SPACE_DEFAULT) + Call(N(func_802403B8_8AC348), 0, 10, 10, 3, 30) + Wait(6 * DT) + EndLoop + Wait(40 * DT) + Call(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Wave, 5, MSG_CH0_0003) + Thread + Wait(15 * DT) + Call(N(func_80240BD8_8ACB68), NPC_Misstar) + Wait(2) + Call(N(func_80240BD8_8ACB68), NPC_Mamar) + Wait(2) + Call(N(func_80240BD8_8ACB68), NPC_Klevar) + Wait(2) + Call(N(func_80240BD8_8ACB68), NPC_Skolar) + Wait(2) + Call(N(func_80240BD8_8ACB68), NPC_Kalmar) + Wait(2) + Call(N(func_80240BD8_8ACB68), NPC_Muskular) + Wait(2) + Call(N(func_80240BD8_8ACB68), NPC_Eldstar) + EndThread + Call(FadeOutMusic, 0, 5000 * DT) + Thread + Wait(90 * DT) + Call(N(func_802405A8_8AC538)) + EndThread + Wait(60 * DT) + Call(N(func_80240000_8ABF90), 255, 255, 255, 0, 0, 0, 50 * DT) + Call(SetNpcSpeed, NPC_Goombaria, Float(3.0 / DT)) + Call(SetNpcFlagBits, NPC_Goombaria, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcFlagBits, NPC_Goombaria, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(EnableNpcShadow, NPC_Goombaria, TRUE) + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Walk) + Call(SetNpcPos, NPC_Goombaria, 300, 0, 0) + Call(NpcMoveTo, NPC_Goombaria, 110, 0, 0) + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Stand) + Call(InterpNpcYaw, NPC_Goombaria, 90, 1) + Wait(10 * DT) + Call(InterpNpcYaw, NPC_Goombaria, 270, 1) + Wait(15 * DT) + Call(InterpNpcYaw, NPC_Goombaria, 90, 1) + Wait(18 * DT) + Call(InterpNpcYaw, NPC_Goombaria, 270, 1) + Wait(10 * DT) + Wait(6 * DT) + Call(SetCamDistance, CAM_DEFAULT, 200) + Call(SetCamPitch, CAM_DEFAULT, 15, -12) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(GetNpcPos, NPC_Goombaria, LVar3, LVar4, LVar5) + Add(LVar3, -20) + Call(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) + Wait(25 * DT) + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_LeanOver) + Call(PlaySoundAtNpc, NPC_Goombaria, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_Goombaria, EMOTE_QUESTION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) + Wait(25 * DT) + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Stand) + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Stand, 5, MSG_CH0_0004) + Call(SetCamSpeed, CAM_DEFAULT, 1) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetNpcSpeed, NPC_Goombaria, Float(3.0 / DT)) + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Run) + Call(NpcMoveTo, NPC_Goombaria, 30, -10, 0) + Wait(2) + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Inspect) + Wait(15 * DT) + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Inspect, ANIM_Goombaria_Inspect, 5, MSG_CH0_0005) + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Talk) + Call(NpcJump0, NPC_Goombaria, 30, 0, -10, 4) + Wait(5 * DT) + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_LeanOver) + Call(NpcJump0, NPC_Goombaria, 30, 0, -10, 4) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Stand, 5, MSG_CH0_0006) + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Run) + Call(SetNpcSpeed, NPC_Goombaria, Float(6.0)) + Call(NpcMoveTo, NPC_Goombaria, -30, -5, 0) + Call(NpcFacePlayer, NPC_Goombaria, 5) + Call(SetNpcJumpscale, NPC_Goombaria, Float(4.0)) + Call(NpcJump0, NPC_Goombaria, -29, 0, 5, 4) + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Run) + Call(SetNpcSpeed, NPC_Goombaria, Float(6.0)) + Call(NpcMoveTo, NPC_Goombaria, 34, 5, 0) + Call(NpcFacePlayer, NPC_Goombaria, 5) + Call(SetNpcJumpscale, NPC_Goombaria, Float(4.0)) + Call(NpcJump0, NPC_Goombaria, 33, 0, 5, 4) + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Run) + Call(SetNpcSpeed, NPC_Goombaria, Float(6.0)) + Call(NpcMoveTo, NPC_Goombaria, -30, 5, 0) + Call(NpcFacePlayer, NPC_Goombaria, 5) + Call(SetNpcJumpscale, NPC_Goombaria, Float(4.0)) + Call(NpcJump0, NPC_Goombaria, -29, 0, 5, 4) + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Run) + Call(SetNpcSpeed, NPC_Goombaria, Float(6.0)) + Call(NpcMoveTo, NPC_Goombaria, 34, 5, 0) + Call(NpcFacePlayer, NPC_Goombaria, 5) + Call(SetNpcJumpscale, NPC_Goombaria, Float(4.0)) + Call(NpcJump0, NPC_Goombaria, 33, 0, 5, 4) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Stand, 5, MSG_CH0_0007) + Wait(20 * DT) + Thread + Call(SetNpcSpeed, NPC_Goombaria, Float(4.0 / DT)) + Call(NpcMoveTo, NPC_Goombaria, 450, 0, 0) + EndThread + Wait(15 * DT) + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Stand, 5, MSG_CH0_0008) + Wait(30 * DT) + Set(GB_StoryProgress, STORY_CH0_WAKE_UP) + Call(DisablePlayerPhysics, FALSE) + Call(N(func_802405CC_8AC55C)) + Call(GotoMapSpecial, Ref("kmr_02"), kmr_02_ENTRY_5, TRANSITION_MARIO_BLACK) + Return + End }; diff --git a/src/world/area_kmr/kmr_00/kmr_00_4_npc.c b/src/world/area_kmr/kmr_00/kmr_00_4_npc.c index 93f94345eff..542b561babd 100644 --- a/src/world/area_kmr/kmr_00/kmr_00_4_npc.c +++ b/src/world/area_kmr/kmr_00/kmr_00_4_npc.c @@ -34,76 +34,76 @@ API_CALLABLE(N(UpdateStarSpiritBobbing)) { } EvtScript N(EVS_NpcAux_StarSpirit) = { - EVT_THREAD - EVT_CALL(N(UpdateStarSpiritBobbing)) - EVT_END_THREAD - EVT_CALL(RandInt, 100, LVar0) - EVT_ADD(LVar0, 1) - EVT_WAIT(LVar0) - EVT_MALLOC_ARRAY(1, LVarA) - EVT_USE_ARRAY(LVarA) - EVT_THREAD - EVT_USE_ARRAY(LVarA) - EVT_LABEL(0) - EVT_CALL(RandInt, 90, LVar0) - EVT_ADD(LVar0, 30) - EVT_SETF(ArrayVar(0), EVT_FLOAT(10.0)) - EVT_WAIT(LVar0) - EVT_CALL(RandInt, 100, LVar1) - EVT_IF_LT(LVar1, 80) - EVT_SET(LVar1, 1) - EVT_ELSE - EVT_SET(LVar1, 2) - EVT_END_IF - EVT_LOOP(LVar1) - EVT_SETF(ArrayVar(0), EVT_FLOAT(40.0)) - EVT_WAIT(1) - EVT_SETF(ArrayVar(0), EVT_FLOAT(50.0)) - EVT_WAIT(1) - EVT_SETF(ArrayVar(0), EVT_FLOAT(80.0)) - EVT_WAIT(1) - EVT_SETF(ArrayVar(0), EVT_FLOAT(70.0)) - EVT_WAIT(1) - EVT_SETF(ArrayVar(0), EVT_FLOAT(60.0)) - EVT_WAIT(1) - EVT_SETF(ArrayVar(0), EVT_FLOAT(50.0)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(0) - EVT_END_THREAD - EVT_SETF(LVar0, EVT_FLOAT(100.0)) - EVT_LABEL(1) - EVT_LOOP(50) - EVT_ADDF(LVar0, EVT_FLOAT(0.8)) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, ArrayVar(0), MV_Unk_01, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(50) - EVT_ADDF(LVar0, EVT_FLOAT(-0.8)) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, ArrayVar(0), MV_Unk_01, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(1) - EVT_RETURN - EVT_END + Thread + Call(N(UpdateStarSpiritBobbing)) + EndThread + Call(RandInt, 100, LVar0) + Add(LVar0, 1) + Wait(LVar0) + MallocArray(1, LVarA) + UseArray(LVarA) + Thread + UseArray(LVarA) + Label(0) + Call(RandInt, 90, LVar0) + Add(LVar0, 30) + SetF(ArrayVar(0), Float(10.0)) + Wait(LVar0) + Call(RandInt, 100, LVar1) + IfLt(LVar1, 80) + Set(LVar1, 1) + Else + Set(LVar1, 2) + EndIf + Loop(LVar1) + SetF(ArrayVar(0), Float(40.0)) + Wait(1) + SetF(ArrayVar(0), Float(50.0)) + Wait(1) + SetF(ArrayVar(0), Float(80.0)) + Wait(1) + SetF(ArrayVar(0), Float(70.0)) + Wait(1) + SetF(ArrayVar(0), Float(60.0)) + Wait(1) + SetF(ArrayVar(0), Float(50.0)) + Wait(1) + EndLoop + Goto(0) + EndThread + SetF(LVar0, Float(100.0)) + Label(1) + Loop(50) + AddF(LVar0, Float(0.8)) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, ArrayVar(0), MV_Unk_01, LVar0) + Wait(1) + EndLoop + Loop(50) + AddF(LVar0, Float(-0.8)) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, ArrayVar(0), MV_Unk_01, LVar0) + Wait(1) + EndLoop + Goto(1) + Return + End }; EvtScript N(EVS_NpcInit_StarSpirit) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_StarSpirit))) - EVT_IF_GE(GB_StoryProgress, STORY_CH0_WAKE_UP) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_StarSpirit))) + IfGe(GB_StoryProgress, STORY_CH0_WAKE_UP) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Goombaria) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH0_WAKE_UP) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH0_WAKE_UP) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_Goombaria) = { diff --git a/src/world/area_kmr/kmr_00/kmr_00_5_entity.c b/src/world/area_kmr/kmr_00/kmr_00_5_entity.c index 46e67db29b9..ee441d78af9 100644 --- a/src/world/area_kmr/kmr_00/kmr_00_5_entity.c +++ b/src/world/area_kmr/kmr_00/kmr_00_5_entity.c @@ -2,8 +2,8 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 0, 0, 0, 0, MODEL_ji_3, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_KMR00_HiddenPanel) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HiddenPanel), 0, 0, 0, 0, MODEL_ji_3, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_KMR00_HiddenPanel) + Return + End }; diff --git a/src/world/area_kmr/kmr_02/kmr_02_1_music.c b/src/world/area_kmr/kmr_02/kmr_02_1_music.c index a7f4c3668e2..03cace005e8 100644 --- a/src/world/area_kmr/kmr_02/kmr_02_1_music.c +++ b/src/world/area_kmr/kmr_02/kmr_02_1_music.c @@ -1,43 +1,43 @@ #include "kmr_02.h" EvtScript N(EVS_FadeOutMusic) = { - EVT_CALL(FadeInMusic, 0, SONG_GOOMBA_VILLAGE, 0, 3000, 0, 127) - EVT_CALL(ClearAmbientSounds, 250) - EVT_RETURN - EVT_END + Call(FadeInMusic, 0, SONG_GOOMBA_VILLAGE, 0, 3000, 0, 127) + Call(ClearAmbientSounds, 250) + Return + End }; EvtScript N(EVS_SetupMusic) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH0_MET_INNKEEPER) - EVT_CALL(SetMusicTrack, 0, SONG_GOOMBA_VILLAGE, 0, 8) - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(kmr_02_ENTRY_1) - EVT_CASE_OR_EQ(kmr_02_ENTRY_5) - EVT_CALL(ClearAmbientSounds, 250) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH0_MET_INNKEEPER) + Call(SetMusicTrack, 0, SONG_GOOMBA_VILLAGE, 0, 8) + EndIf + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseOrEq(kmr_02_ENTRY_1) + CaseOrEq(kmr_02_ENTRY_5) + Call(ClearAmbientSounds, 250) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_PushNewPartnerSong) = { - EVT_CALL(PushSong, SONG_NEW_PARTNER, 0) - EVT_RETURN - EVT_END + Call(PushSong, SONG_NEW_PARTNER, 0) + Return + End }; EvtScript N(EVS_PopSong) = { - EVT_CALL(FadeOutMusic, 0, 500) - EVT_WAIT(15) - EVT_CALL(PopSong) - EVT_RETURN - EVT_END + Call(FadeOutMusic, 0, 500) + Wait(15) + Call(PopSong) + Return + End }; EvtScript N(EVS_PlayRestingSong) = { - EVT_CALL(SetMusicTrack, 0, SONG_TAKING_REST, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TAKING_REST, 0, 8) + Return + End }; diff --git a/src/world/area_kmr/kmr_02/kmr_02_2_main.c b/src/world/area_kmr/kmr_02/kmr_02_2_main.c index 094f91478be..90839dda55d 100644 --- a/src/world/area_kmr/kmr_02/kmr_02_2_main.c +++ b/src/world/area_kmr/kmr_02/kmr_02_2_main.c @@ -14,108 +14,108 @@ EvtScript N(EVS_ExitWalk_kmr_09_0) = EVT_EXIT_WALK(60, kmr_02_ENTRY_0, "kmr_09", MAP_RODATA_PAD(1, exits); EvtScript N(EVS_SetupGoombaRoadGate) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH0_TWINK_GAVE_LUCKY_STAR) - EVT_CALL(RotateGroup, MODEL_g197, 120, 0, -1, 0) - EVT_CALL(RotateGroup, MODEL_g196, 120, 0, 1, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o757, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH0_TWINK_GAVE_LUCKY_STAR) + Call(RotateGroup, MODEL_g197, 120, 0, -1, 0) + Call(RotateGroup, MODEL_g196, 120, 0, 1, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt2, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o757, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kmr_05_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kmr_00_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kmr_09_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kmr_05_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kmr_00_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kmr_09_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_EXEC(N(EVS_SetupGoombaRoadGate)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, kmr_02_ENTRY_0) - EVT_EXEC(N(EVS_SetupGoombaRoadGate)) - EVT_END_IF - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kmr_02_ENTRY_2) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_IF_EQ(GF_KMR02_ReturnedWithGoompa, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(20 * DT) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 4, MSG_CH0_001C) - EVT_CALL(EnablePartnerAI) - EVT_SET(GF_KMR02_ReturnedWithGoompa, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_CASE_EQ(kmr_02_ENTRY_3) - EVT_IF_EQ(GF_KMR02_WarpPipe, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerPos, LVar0, NPC_DISPOSE_POS_Y, LVar2) - EVT_WAIT(30) - EVT_CALL(PlaySound, SOUND_GROW) - EVT_SET(GF_KMR02_WarpPipe, TRUE) - EVT_WAIT(30) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_SET(LVarA, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC_WAIT(N(EVS_Pipe_EnterVertical)) - EVT_CASE_EQ(kmr_02_ENTRY_5) - EVT_EXEC(N(EVS_SetWallsDown_ToadHouse)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kmr_02_ENTRY_A) + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Exec(N(EVS_SetupGoombaRoadGate)) + Return + EndIf + Call(GetEntryID, LVar0) + IfNe(LVar0, kmr_02_ENTRY_0) + Exec(N(EVS_SetupGoombaRoadGate)) + EndIf + Switch(LVar0) + CaseEq(kmr_02_ENTRY_2) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + IfEq(GF_KMR02_ReturnedWithGoompa, FALSE) + Call(DisablePlayerInput, TRUE) + Wait(20 * DT) + Call(DisablePartnerAI, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 4, MSG_CH0_001C) + Call(EnablePartnerAI) + Set(GF_KMR02_ReturnedWithGoompa, TRUE) + Call(DisablePlayerInput, FALSE) + EndIf + CaseEq(kmr_02_ENTRY_3) + IfEq(GF_KMR02_WarpPipe, FALSE) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(SetPlayerPos, LVar0, NPC_DISPOSE_POS_Y, LVar2) + Wait(30) + Call(PlaySound, SOUND_GROW) + Set(GF_KMR02_WarpPipe, TRUE) + Wait(30) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + EndIf + Set(LVarA, Ref(N(EVS_BindExitTriggers))) + ExecWait(N(EVS_Pipe_EnterVertical)) + CaseEq(kmr_02_ENTRY_5) + Exec(N(EVS_SetWallsDown_ToadHouse)) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kmr_02_ENTRY_A) // beta entrance for 'post' pipe - EVT_EXEC(EnterPostPipe) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_DEFAULT - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Exec(EnterPostPipe) + Exec(N(EVS_BindExitTriggers)) + CaseDefault + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; EvtScript N(EVS_ShowMessage_ItsLocked) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_OpenGoombaRoadGate) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_tt2, SOUND_GOOMBA_GATE_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 120, 20, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g197, LVar0, 0, -1, 0) - EVT_CALL(RotateGroup, MODEL_g196, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o757, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(PlaySoundAtCollider, COLLIDER_tt2, SOUND_GOOMBA_GATE_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 120, 20, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g197, LVar0, 0, -1, 0) + Call(RotateGroup, MODEL_g196, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt2, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o757, COLLIDER_FLAGS_UPPER_MASK) + Call(DisablePlayerInput, FALSE) + Return + End }; API_CALLABLE(N(SetMapChangeFadeSlowest)) { @@ -124,67 +124,67 @@ API_CALLABLE(N(SetMapChangeFadeSlowest)) { } EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_GOOMBA_VILLAGE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(GetLoadType, LVar0) - EVT_IF_EQ(LVar0, LOAD_FROM_FILE_SELECT) - EVT_GOTO(10) - EVT_END_IF + Set(GB_WorldLocation, LOCATION_GOOMBA_VILLAGE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(GetLoadType, LVar0) + IfEq(LVar0, LOAD_FROM_FILE_SELECT) + Goto(10) + EndIf // check for cutscene entry - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, kmr_02_ENTRY_4) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(EpilogueNPCs))) - EVT_EXEC(N(EVS_FadeOutMusic)) - EVT_RETURN - EVT_LABEL(10) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_UNUSED_FFFFFF8C) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NpcGroup1))) - EVT_CASE_LT(STORY_UNUSED_FFFFFF8C) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(PrologueNPCs))) - EVT_CASE_DEFAULT - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_END_SWITCH - EVT_LABEL(20) - EVT_CALL(ClearDefeatedEnemies) - EVT_EXEC_WAIT(N(EVS_SetupRooms)) - EVT_EXEC_WAIT(N(EVS_SetupToadHouse)) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC_WAIT(N(EVS_SetupFoliage)) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_FELL_OFF_CLIFF) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShowMessage_ItsLocked)), TRIGGER_WALL_PRESS_A, COLLIDER_mm1, 1, 0) - EVT_CASE_LT(STORY_CH0_TWINK_GAVE_LUCKY_STAR) - EVT_CASE_DEFAULT - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OpenGoombaRoadGate)), TRIGGER_WALL_PRESS_A, COLLIDER_tt2, 1, 0) - EVT_END_SWITCH - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_GATE_CRUSHED) - EVT_CALL(EnableGroup, MODEL_2, FALSE) - EVT_CALL(EnableGroup, MODEL_4, FALSE) - EVT_CASE_LT(STORY_CH0_TWINK_GAVE_LUCKY_STAR) - EVT_CALL(EnableGroup, MODEL_1, FALSE) - EVT_CALL(EnableGroup, MODEL_4, FALSE) - EVT_CASE_DEFAULT - EVT_CALL(EnableGroup, MODEL_1, FALSE) - EVT_CALL(EnableGroup, MODEL_2, FALSE) - EVT_END_SWITCH - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o757, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_IF_NE(GB_StoryProgress, STORY_CH0_WAKE_UP) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kmr_02_ENTRY_5) - EVT_WAIT(30) - EVT_CALL(N(SetMapChangeFadeSlowest)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfNe(LVar0, kmr_02_ENTRY_4) + Goto(10) + EndIf + Call(MakeNpcs, FALSE, Ref(N(EpilogueNPCs))) + Exec(N(EVS_FadeOutMusic)) + Return + Label(10) + Switch(GB_StoryProgress) + CaseEq(STORY_UNUSED_FFFFFF8C) + Call(MakeNpcs, FALSE, Ref(N(NpcGroup1))) + CaseLt(STORY_UNUSED_FFFFFF8C) + Call(MakeNpcs, FALSE, Ref(N(PrologueNPCs))) + CaseDefault + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + EndSwitch + Label(20) + Call(ClearDefeatedEnemies) + ExecWait(N(EVS_SetupRooms)) + ExecWait(N(EVS_SetupToadHouse)) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + ExecWait(N(EVS_SetupFoliage)) + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_FELL_OFF_CLIFF) + BindTrigger(Ref(N(EVS_ShowMessage_ItsLocked)), TRIGGER_WALL_PRESS_A, COLLIDER_mm1, 1, 0) + CaseLt(STORY_CH0_TWINK_GAVE_LUCKY_STAR) + CaseDefault + BindTrigger(Ref(N(EVS_OpenGoombaRoadGate)), TRIGGER_WALL_PRESS_A, COLLIDER_tt2, 1, 0) + EndSwitch + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_GATE_CRUSHED) + Call(EnableGroup, MODEL_2, FALSE) + Call(EnableGroup, MODEL_4, FALSE) + CaseLt(STORY_CH0_TWINK_GAVE_LUCKY_STAR) + Call(EnableGroup, MODEL_1, FALSE) + Call(EnableGroup, MODEL_4, FALSE) + CaseDefault + Call(EnableGroup, MODEL_1, FALSE) + Call(EnableGroup, MODEL_2, FALSE) + EndSwitch + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o757, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_EnterMap)) + Wait(1) + IfNe(GB_StoryProgress, STORY_CH0_WAKE_UP) + Return + EndIf + Call(GetEntryID, LVar0) + IfEq(LVar0, kmr_02_ENTRY_5) + Wait(30) + Call(N(SetMapChangeFadeSlowest)) + EndIf + Return + End }; diff --git a/src/world/area_kmr/kmr_02/kmr_02_3_npc.c b/src/world/area_kmr/kmr_02/kmr_02_3_npc.c index b61bb69f6ae..c0bc0645354 100644 --- a/src/world/area_kmr/kmr_02/kmr_02_3_npc.c +++ b/src/world/area_kmr/kmr_02/kmr_02_3_npc.c @@ -53,14 +53,14 @@ s32 N(LetterList_GoompapaTrade)[] = { }; EvtScript N(EVS_LetterTrade_Goompapa) = { - EVT_CALL(N(LetterDelivery_Init), + Call(N(LetterDelivery_Init), NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, ITEM_LETTER_CHAIN_GOOMPAPA_1, ITEM_LETTER_CHAIN_MUSS_T, MSG_CH0_006F, MSG_CH0_0070, MSG_CH0_0071, MSG_CH0_0072, - EVT_PTR(N(LetterList_GoompapaTrade))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) - EVT_RETURN - EVT_END + Ref(N(LetterList_GoompapaTrade))) + ExecWait(N(EVS_DoLetterDelivery)) + Return + End }; s32 N(LetterList_Goompapa)[] = { @@ -69,22 +69,22 @@ s32 N(LetterList_Goompapa)[] = { }; EvtScript N(EVS_LetterPrompt_Goompapa) = { - EVT_CALL(N(LetterDelivery_Init), + Call(N(LetterDelivery_Init), NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, ITEM_LETTER_CHAIN_GOOMPAPA_2, ITEM_NONE, MSG_CH0_0073, MSG_CH0_0074, MSG_CH0_0075, MSG_CH0_0076, - EVT_PTR(N(LetterList_Goompapa))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) - EVT_RETURN - EVT_END + Ref(N(LetterList_Goompapa))) + ExecWait(N(EVS_DoLetterDelivery)) + Return + End }; EvtScript N(EVS_LetterReward_Goompapa) = { - EVT_IF_EQ(LVarC, DELIVERY_ACCEPTED) + IfEq(LVarC, DELIVERY_ACCEPTED) EVT_GIVE_BADGE_REWARD(ITEM_LUCKY_DAY) - EVT_END_IF - EVT_RETURN - EVT_END + EndIf + Return + End }; s32 N(LetterList_Goompa)[] = { @@ -93,238 +93,238 @@ s32 N(LetterList_Goompa)[] = { }; EvtScript N(EVS_LetterPrompt_Goompa) = { - EVT_CALL(N(LetterDelivery_Init), + Call(N(LetterDelivery_Init), NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, ITEM_LETTER_TO_GOOMPA, ITEM_NONE, MSG_CH0_0045, MSG_CH0_0046, MSG_CH0_0047, MSG_CH0_0048, - EVT_PTR(N(LetterList_Goompa))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) - EVT_RETURN - EVT_END + Ref(N(LetterList_Goompa))) + ExecWait(N(EVS_DoLetterDelivery)) + Return + End }; EvtScript N(EVS_LetterReward_Goompa) = { - EVT_IF_EQ(LVarC, DELIVERY_ACCEPTED) + IfEq(LVarC, DELIVERY_ACCEPTED) EVT_GIVE_STAR_PIECE() - EVT_END_IF - EVT_RETURN - EVT_END + EndIf + Return + End }; EvtScript N(EVS_NpcAI_GoombaFamily_NoAI) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcIdle_Goombario) = { - EVT_CALL(func_800445D4, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(100) - EVT_EXEC_WAIT(N(EVS_NpcAI_GoombaFamily_Wander)) - EVT_CASE_OR_EQ(101) - EVT_CASE_OR_EQ(102) - EVT_CASE_OR_EQ(3) - EVT_CASE_OR_EQ(103) - EVT_EXEC_WAIT(N(EVS_NpcAI_GoombaFamily_Wander)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(func_800445D4, LVar0) + Switch(LVar0) + CaseEq(100) + ExecWait(N(EVS_NpcAI_GoombaFamily_Wander)) + CaseOrEq(101) + CaseOrEq(102) + CaseOrEq(3) + CaseOrEq(103) + ExecWait(N(EVS_NpcAI_GoombaFamily_Wander)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Goombario) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_GATE_CRUSHED) - EVT_IF_EQ(GF_KMR02_Met_Goombario, FALSE) - EVT_SET(GF_KMR02_Met_Goombario, TRUE) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(5.0 * DT), 0, EVT_FLOAT(-275.0), EVT_FLOAT(15.2), EVT_FLOAT(-7.5)) - EVT_CALL(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 5, MSG_CH0_004D) - EVT_THREAD - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0 * DT)) - EVT_END_THREAD - EVT_ELSE - EVT_IF_EQ(GF_KMR02_Goombario_SwapDialogue, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 5, MSG_CH0_004E) - EVT_SET(GF_KMR02_Goombario_SwapDialogue, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 5, MSG_CH0_004F) - EVT_SET(GF_KMR02_Goombario_SwapDialogue, FALSE) - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(STORY_CH0_GATE_CRUSHED) - EVT_CALL(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH0_0051) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_GATE_CRUSHED) + IfEq(GF_KMR02_Met_Goombario, FALSE) + Set(GF_KMR02_Met_Goombario, TRUE) + Call(AdjustCam, CAM_DEFAULT, Float(5.0 * DT), 0, Float(-275.0), Float(15.2), Float(-7.5)) + Call(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 5, MSG_CH0_004D) + Thread + Call(ResetCam, CAM_DEFAULT, Float(4.0 * DT)) + EndThread + Else + IfEq(GF_KMR02_Goombario_SwapDialogue, FALSE) + Call(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 5, MSG_CH0_004E) + Set(GF_KMR02_Goombario_SwapDialogue, TRUE) + Else + Call(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 5, MSG_CH0_004F) + Set(GF_KMR02_Goombario_SwapDialogue, FALSE) + EndIf + EndIf + CaseEq(STORY_CH0_GATE_CRUSHED) + Call(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH0_0051) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Goombario) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Goombario))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Goombario))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_GATE_CRUSHED) - EVT_CASE_LT(STORY_CH0_FELL_OFF_CLIFF) - EVT_CALL(N(SetWanderTerritory_Npc), NPC_Goombario, 2) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_SwitchedWander_Npc))) - EVT_CASE_LT(STORY_CH0_GOOMBARIO_JOINED_PARTY) - EVT_CALL(SetNpcPos, NPC_SELF, 66, 0, -126) - EVT_CASE_GE(STORY_CH0_GOOMBARIO_JOINED_PARTY) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Goombario))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Goombario))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_GATE_CRUSHED) + CaseLt(STORY_CH0_FELL_OFF_CLIFF) + Call(N(SetWanderTerritory_Npc), NPC_Goombario, 2) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_SwitchedWander_Npc))) + CaseLt(STORY_CH0_GOOMBARIO_JOINED_PARTY) + Call(SetNpcPos, NPC_SELF, 66, 0, -126) + CaseGe(STORY_CH0_GOOMBARIO_JOINED_PARTY) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; EvtScript N(EVS_NpcIdle_Goombaria_NoAI) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HandOverDolly) = { - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_CALL(N(AddPlayerHandsOffset), LVar3, LVar4, LVar5) - EVT_CALL(MakeItemEntity, ITEM_DOLLY, LVar3, LVar4, LVar5, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_TakeItem) - EVT_WAIT(30) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(RemoveItemEntity, LVar0) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Call(N(AddPlayerHandsOffset), LVar3, LVar4, LVar5) + Call(MakeItemEntity, ITEM_DOLLY, LVar3, LVar4, LVar5, ITEM_SPAWN_MODE_DECORATION, 0) + Call(SetPlayerAnimation, ANIM_MarioW1_TakeItem) + Wait(30) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(RemoveItemEntity, LVar0) + Return + End }; EvtScript N(EVS_Goombaria_Kiss) = { - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_LeanOver) - EVT_CALL(GetNpcPos, NPC_Goombaria, LVar0, LVar1, LVar2) - EVT_WAIT(5) - EVT_ADD(LVar1, 10) - EVT_CALL(GetAngleToNPC, NPC_Goombaria, LVarA) - EVT_IF_GE(LVarA, 180) - EVT_ADD(LVar0, 20) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_RECOVER, 2, LVar0, LVar1, LVar2, 0) - EVT_CALL(PlaySoundAtNpc, NPC_Goombaria, SOUND_HEART_BOUNCE, SOUND_SPACE_DEFAULT) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_LeanOver) + Call(GetNpcPos, NPC_Goombaria, LVar0, LVar1, LVar2) + Wait(5) + Add(LVar1, 10) + Call(GetAngleToNPC, NPC_Goombaria, LVarA) + IfGe(LVarA, 180) + Add(LVar0, 20) + EndIf + PlayEffect(EFFECT_RECOVER, 2, LVar0, LVar1, LVar2, 0) + Call(PlaySoundAtNpc, NPC_Goombaria, SOUND_HEART_BOUNCE, SOUND_SPACE_DEFAULT) + Return + End }; EvtScript N(EVS_Goombaria_RequestDolly) = { - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_0096) - EVT_WAIT(10) - EVT_IF_EQ(GF_KMR02_KeptDolly, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_0097) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_0098) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(ShowChoice, MSG_Choice_0011) - EVT_WAIT(10) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(FindKeyItem, ITEM_DOLLY, LVar0) - EVT_CALL(RemoveKeyItemAt, LVar0) - EVT_EXEC_WAIT(N(EVS_HandOverDolly)) - EVT_CALL(ContinueSpeech, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_009A) - EVT_WAIT(10) + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_0096) + Wait(10) + IfEq(GF_KMR02_KeptDolly, FALSE) + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_0097) + Else + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_0098) + EndIf + Wait(10) + Call(ShowChoice, MSG_Choice_0011) + Wait(10) + IfEq(LVar0, 0) + Call(FindKeyItem, ITEM_DOLLY, LVar0) + Call(RemoveKeyItemAt, LVar0) + ExecWait(N(EVS_HandOverDolly)) + Call(ContinueSpeech, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_009A) + Wait(10) EVT_GIVE_STAR_PIECE() - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_009B) - EVT_WAIT(10) - EVT_EXEC(N(EVS_Goombaria_Kiss)) - EVT_CALL(GetNpcPos, NPC_Goombaria, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_Goombaria, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_Goombaria, LVar0, LVar1, LVar2, 10) - EVT_WAIT(10) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_SHIVER, 1, 1, 0) - EVT_WAIT(35) - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Idle) - EVT_CALL(NpcFacePlayer, NPC_Goombaria, 3) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_WAIT(20) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_0099) - EVT_SET(GF_KMR02_KeptDolly, TRUE) - EVT_WAIT(10) - EVT_END_IF - EVT_RETURN - EVT_END + Wait(10) + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_009B) + Wait(10) + Exec(N(EVS_Goombaria_Kiss)) + Call(GetNpcPos, NPC_Goombaria, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_Goombaria, Float(1.0)) + Call(NpcJump0, NPC_Goombaria, LVar0, LVar1, LVar2, 10) + Wait(10) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_SHIVER, 1, 1, 0) + Wait(35) + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Idle) + Call(NpcFacePlayer, NPC_Goombaria, 3) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) + Wait(20) + Else + Call(ContinueSpeech, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_0099) + Set(GF_KMR02_KeptDolly, TRUE) + Wait(10) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Goombaria) = { - EVT_CALL(HasKeyItem, ITEM_DOLLY, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_Goombaria_RequestDolly)) - EVT_RETURN - EVT_END_IF - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_MET_GOOMPA) - EVT_SWITCH(AB_KMR_2) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_0088) - EVT_SET(AB_KMR_2, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_0089) - EVT_SET(AB_KMR_2, 2) - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_008A) - EVT_SET(AB_KMR_2, 1) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH0_GATE_CRUSHED) - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_008B) - EVT_CASE_LT(STORY_CH0_FELL_OFF_CLIFF) - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_008C) - EVT_CASE_LT(STORY_CH0_DEFEATED_GOOMBA_KING) - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_008D) - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_008E) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_NE(LVar0, PARTNER_GOOMBARIO) - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_008F) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_008F) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToNpc, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, NPC_Goombaria, MSG_CH0_0090) - EVT_CALL(SpeakToNpc, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, NPC_PARTNER, MSG_CH0_0091) - EVT_CALL(EnablePartnerAI) - EVT_END_IF - EVT_CASE_GE(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_NE(LVar0, PARTNER_GOOMBARIO) - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_0092) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_0093) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToNpc, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, NPC_Goombaria, MSG_CH0_0094) - EVT_CALL(SpeakToNpc, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, NPC_PARTNER, MSG_CH0_0095) - EVT_CALL(EnablePartnerAI) - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(HasKeyItem, ITEM_DOLLY, LVar0) + IfNe(LVar0, 0) + ExecWait(N(EVS_Goombaria_RequestDolly)) + Return + EndIf + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_MET_GOOMPA) + Switch(AB_KMR_2) + CaseEq(0) + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_0088) + Set(AB_KMR_2, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_0089) + Set(AB_KMR_2, 2) + CaseEq(2) + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_008A) + Set(AB_KMR_2, 1) + EndSwitch + CaseLt(STORY_CH0_GATE_CRUSHED) + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_008B) + CaseLt(STORY_CH0_FELL_OFF_CLIFF) + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_008C) + CaseLt(STORY_CH0_DEFEATED_GOOMBA_KING) + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_008D) + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_008E) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(GetCurrentPartnerID, LVar0) + IfNe(LVar0, PARTNER_GOOMBARIO) + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_008F) + Else + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_008F) + Call(DisablePartnerAI, 0) + Call(SpeakToNpc, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, NPC_Goombaria, MSG_CH0_0090) + Call(SpeakToNpc, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, NPC_PARTNER, MSG_CH0_0091) + Call(EnablePartnerAI) + EndIf + CaseGe(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(GetCurrentPartnerID, LVar0) + IfNe(LVar0, PARTNER_GOOMBARIO) + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_0092) + Else + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_0093) + Call(DisablePartnerAI, 0) + Call(SpeakToNpc, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, NPC_Goombaria, MSG_CH0_0094) + Call(SpeakToNpc, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, NPC_PARTNER, MSG_CH0_0095) + Call(EnablePartnerAI) + EndIf + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Goombaria) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Goombaria))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_MET_GOOMPA) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Goombaria_NoAI))) - EVT_CALL(SetNpcPos, NPC_SELF, 5, 0, -154) - EVT_CASE_LT(STORY_CH0_GATE_CRUSHED) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Goombaria_NoAI))) - EVT_CALL(SetNpcPos, NPC_SELF, 215, 0, 215) - EVT_CASE_LT(STORY_CH0_FELL_OFF_CLIFF) - EVT_CALL(N(SetWanderTerritory_Npc), NPC_Goombaria, 3) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_SwitchedWander_Npc))) - EVT_CASE_LT(STORY_CH0_GOOMBARIO_JOINED_PARTY) - EVT_CALL(SetNpcPos, NPC_SELF, 94, 0, -109) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_CASE_GE(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Goombaria))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_MET_GOOMPA) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Goombaria_NoAI))) + Call(SetNpcPos, NPC_SELF, 5, 0, -154) + CaseLt(STORY_CH0_GATE_CRUSHED) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Goombaria_NoAI))) + Call(SetNpcPos, NPC_SELF, 215, 0, 215) + CaseLt(STORY_CH0_FELL_OFF_CLIFF) + Call(N(SetWanderTerritory_Npc), NPC_Goombaria, 3) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_SwitchedWander_Npc))) + CaseLt(STORY_CH0_GOOMBARIO_JOINED_PARTY) + Call(SetNpcPos, NPC_SELF, 94, 0, -109) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(RemoveNpc, NPC_SELF) + Return + CaseGe(STORY_CH7_STAR_SPRIT_DEPARTED) + CaseDefault + EndSwitch + Return + End }; API_CALLABLE(N(IsPlayerHPFull)) { @@ -372,440 +372,440 @@ API_CALLABLE(N(CloseStatusBar)) { } EvtScript N(EVS_PromptForBadgeTutorial) = { - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_002D) - EVT_CALL(ShowChoice, MSG_Choice_0013) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(ContinueSpeech, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_002E) - EVT_CALL(ShowChoice, MSG_Choice_0013) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(ContinueSpeech, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_002F) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(ContinueSpeech, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_0030) - EVT_WAIT(10) - EVT_CALL(N(WaitForStartInput)) - EVT_CALL(EndSpeech, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0) - EVT_WAIT(10) - EVT_SET(GF_Tutorial_Badges, TRUE) - EVT_CALL(N(OpenPauseMenu)) - EVT_CALL(N(CloseStatusBar)) - EVT_SET(GF_Tutorial_Badges, FALSE) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_002D) + Call(ShowChoice, MSG_Choice_0013) + IfEq(LVar0, 1) + Call(ContinueSpeech, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_002E) + Call(ShowChoice, MSG_Choice_0013) + IfEq(LVar0, 1) + Call(ContinueSpeech, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_002F) + Return + EndIf + EndIf + Call(ContinueSpeech, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_0030) + Wait(10) + Call(N(WaitForStartInput)) + Call(EndSpeech, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0) + Wait(10) + Set(GF_Tutorial_Badges, TRUE) + Call(N(OpenPauseMenu)) + Call(N(CloseStatusBar)) + Set(GF_Tutorial_Badges, FALSE) + Return + End }; EvtScript N(EVS_ReturnToVillage) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(func_80242014_8B2084)) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_001D) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(3.0)) - EVT_CALL(NpcMoveTo, NPC_PARTNER, -295, -30, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_WearyWalk) - EVT_CALL(PlaySoundAtNpc, NPC_PARTNER, SOUND_USE_KEY, SOUND_SPACE_DEFAULT) - EVT_WAIT(15 * DT) - EVT_CALL(PlaySoundAtCollider, COLLIDER_mm1, SOUND_GOOMBA_GATE_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 120, 20, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_m_d1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m_d2, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mm1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_mm2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnablePartnerAI) - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_SadIdle) - EVT_CALL(EnableNpcAI, NPC_Goombario, FALSE) - EVT_CALL(EnableNpcAI, NPC_Goombaria, FALSE) - EVT_CALL(EnableNpcAI, NPC_Gooma, FALSE) - EVT_CALL(EnableNpcAI, NPC_Goomama, FALSE) - EVT_CALL(SetNpcPos, NPC_Goombario, -95, 0, -86) - EVT_CALL(SetNpcPos, NPC_Goombaria, -92, 0, -46) - EVT_CALL(SetNpcFlagBits, NPC_Goombario, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Goombaria, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -189, 0, -40) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -189, 0, -40) - EVT_CALL(SetCamDistance, CAM_DEFAULT, -350) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.3 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_CALL(SetNpcSpeed, NPC_Goombario, EVT_FLOAT(4.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_Goombario, ANIM_WorldGoombario_Run) - EVT_CALL(NpcMoveTo, NPC_Goombario, -109, -61, 0) - EVT_CALL(SetNpcAnimation, NPC_Goombario, ANIM_WorldGoombario_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcSpeed, NPC_Goombaria, EVT_FLOAT(4.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_SadRun) - EVT_CALL(NpcMoveTo, NPC_Goombaria, -142, -95, 0) - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_SadIdle) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PlayerMoveTo, -238, -33, 0) - EVT_END_THREAD - EVT_CALL(N(func_80242014_8B2084)) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_WearyWalk) - EVT_CALL(NpcMoveTo, NPC_PARTNER, -168, -15, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_WearyIdle) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToNpc, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, NPC_PARTNER, MSG_CH0_001E) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToNpc, NPC_Goombaria, ANIM_Goombaria_SadTalk, ANIM_Goombaria_SadIdle, 0, NPC_PARTNER, MSG_CH0_001F) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToNpc, NPC_PARTNER, ANIM_Goompa_WearyTalk, ANIM_Goompa_WearyIdle, 0, NPC_Goombario, MSG_CH0_0020) - EVT_WAIT(10 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -79, 0, -10) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -22, 0, 12) - EVT_CALL(SetCamDistance, CAM_DEFAULT, -350) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.4 / DT)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-6.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PlayerMoveTo, -79, -10, 0) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Goombario, ANIM_WorldGoombario_Run) - EVT_CALL(NpcMoveTo, NPC_Goombario, -45, 40, 0) - EVT_CALL(SetNpcAnimation, NPC_Goombario, ANIM_WorldGoombario_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_SadRun) - EVT_CALL(NpcMoveTo, NPC_Goombaria, -23, -21, 0) - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_SadIdle) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_WearyWalk) - EVT_CALL(NpcMoveTo, NPC_PARTNER, 30, 35, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_WearyIdle) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_WearyTalk, ANIM_Goompa_WearyIdle, 0, MSG_CH0_0021) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(4.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_WearyWalk) - EVT_CALL(NpcMoveTo, NPC_PARTNER, 41, -147, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_WearyIdle) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilit5, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 3) - EVT_CALL(RotateModel, MODEL_syoumen_enter, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_WearyWalk) - EVT_CALL(NpcMoveTo, NPC_PARTNER, 127, -157, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle) - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Idle) - EVT_LOOP(10) - EVT_ADD(LVar0, -3) - EVT_CALL(RotateModel, MODEL_syoumen_enter, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilit5, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcFacePlayer, NPC_Goombaria, 3) - EVT_CALL(NpcFacePlayer, NPC_Goombario, 3) - EVT_CALL(PlayerFaceNpc, NPC_Goombario, 3) - EVT_IF_EQ(GF_KMR04_Tree3_Dolly, TRUE) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(-350.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(PlayerFaceNpc, NPC_Goombario, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH0_0022) - EVT_WAIT(10 * DT) - EVT_CALL(ShowChoice, MSG_Choice_0011) - EVT_WAIT(10 * DT) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(CloseMessage) - EVT_CALL(FindKeyItem, ITEM_DOLLY, LVar0) - EVT_CALL(RemoveKeyItemAt, LVar0) - EVT_CALL(PlayerFaceNpc, NPC_Goombaria, TRUE) - EVT_CALL(PlayerMoveTo, -50, -24, 0) - EVT_CALL(InterpPlayerYaw, 94, 0) - EVT_WAIT(10 * DT) - EVT_EXEC_WAIT(N(EVS_HandOverDolly)) - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_SadTalk, ANIM_Goombaria_SadIdle, 0, MSG_CH0_0024) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Inspect) - EVT_CALL(InterpNpcYaw, NPC_Goombaria, 90, 1) - EVT_WAIT(10 * DT) - EVT_CALL(InterpNpcYaw, NPC_Goombaria, 270, 1) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Idle) - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_0025) - EVT_WAIT(10 * DT) + Call(DisablePlayerInput, TRUE) + Call(N(func_80242014_8B2084)) + Call(DisablePartnerAI, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_001D) + Call(SetNpcSpeed, NPC_PARTNER, Float(3.0)) + Call(NpcMoveTo, NPC_PARTNER, -295, -30, 0) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_WearyWalk) + Call(PlaySoundAtNpc, NPC_PARTNER, SOUND_USE_KEY, SOUND_SPACE_DEFAULT) + Wait(15 * DT) + Call(PlaySoundAtCollider, COLLIDER_mm1, SOUND_GOOMBA_GATE_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 120, 20, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_m_d1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m_d2, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mm1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_mm2, COLLIDER_FLAGS_UPPER_MASK) + Call(EnablePartnerAI) + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_SadIdle) + Call(EnableNpcAI, NPC_Goombario, FALSE) + Call(EnableNpcAI, NPC_Goombaria, FALSE) + Call(EnableNpcAI, NPC_Gooma, FALSE) + Call(EnableNpcAI, NPC_Goomama, FALSE) + Call(SetNpcPos, NPC_Goombario, -95, 0, -86) + Call(SetNpcPos, NPC_Goombaria, -92, 0, -46) + Call(SetNpcFlagBits, NPC_Goombario, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Goombaria, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, -189, 0, -40) + Call(SetPanTarget, CAM_DEFAULT, -189, 0, -40) + Call(SetCamDistance, CAM_DEFAULT, -350) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.3 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Call(SetNpcSpeed, NPC_Goombario, Float(4.0 / DT)) + Call(SetNpcAnimation, NPC_Goombario, ANIM_WorldGoombario_Run) + Call(NpcMoveTo, NPC_Goombario, -109, -61, 0) + Call(SetNpcAnimation, NPC_Goombario, ANIM_WorldGoombario_Idle) + EndThread + Thread + Call(SetNpcSpeed, NPC_Goombaria, Float(4.0 / DT)) + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_SadRun) + Call(NpcMoveTo, NPC_Goombaria, -142, -95, 0) + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_SadIdle) + EndThread + Thread + Call(SetPlayerSpeed, Float(3.0 / DT)) + Call(PlayerMoveTo, -238, -33, 0) + EndThread + Call(N(func_80242014_8B2084)) + Call(DisablePartnerAI, 0) + Call(SetNpcSpeed, NPC_PARTNER, Float(3.0 / DT)) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_WearyWalk) + Call(NpcMoveTo, NPC_PARTNER, -168, -15, 0) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_WearyIdle) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToNpc, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, NPC_PARTNER, MSG_CH0_001E) + Wait(10 * DT) + Call(SpeakToNpc, NPC_Goombaria, ANIM_Goombaria_SadTalk, ANIM_Goombaria_SadIdle, 0, NPC_PARTNER, MSG_CH0_001F) + Wait(10 * DT) + Call(SpeakToNpc, NPC_PARTNER, ANIM_Goompa_WearyTalk, ANIM_Goompa_WearyIdle, 0, NPC_Goombario, MSG_CH0_0020) + Wait(10 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, -79, 0, -10) + Call(SetPanTarget, CAM_DEFAULT, -22, 0, 12) + Call(SetCamDistance, CAM_DEFAULT, -350) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.4 / DT)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-6.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Wait(30 * DT) + Call(SetPlayerSpeed, Float(3.0 / DT)) + Call(PlayerMoveTo, -79, -10, 0) + EndThread + Thread + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Goombario, ANIM_WorldGoombario_Run) + Call(NpcMoveTo, NPC_Goombario, -45, 40, 0) + Call(SetNpcAnimation, NPC_Goombario, ANIM_WorldGoombario_Idle) + EndThread + Thread + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_SadRun) + Call(NpcMoveTo, NPC_Goombaria, -23, -21, 0) + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_SadIdle) + EndThread + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_WearyWalk) + Call(NpcMoveTo, NPC_PARTNER, 30, 35, 0) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_WearyIdle) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_WearyTalk, ANIM_Goompa_WearyIdle, 0, MSG_CH0_0021) + Wait(10 * DT) + Call(SetNpcSpeed, NPC_PARTNER, Float(4.0 / DT)) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_WearyWalk) + Call(NpcMoveTo, NPC_PARTNER, 41, -147, 0) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_WearyIdle) + Call(PlaySoundAtCollider, COLLIDER_deilit5, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 3) + Call(RotateModel, MODEL_syoumen_enter, LVar0, 0, 1, 0) + Wait(1) + EndLoop + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_WearyWalk) + Call(NpcMoveTo, NPC_PARTNER, 127, -157, 0) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle) + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Idle) + Loop(10) + Add(LVar0, -3) + Call(RotateModel, MODEL_syoumen_enter, LVar0, 0, 1, 0) + Wait(1) + EndLoop + Call(PlaySoundAtCollider, COLLIDER_deilit5, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Call(NpcFacePlayer, NPC_Goombaria, 3) + Call(NpcFacePlayer, NPC_Goombario, 3) + Call(PlayerFaceNpc, NPC_Goombario, 3) + IfEq(GF_KMR04_Tree3_Dolly, TRUE) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(-350.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-6.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndThread + Wait(30 * DT) + Call(PlayerFaceNpc, NPC_Goombario, TRUE) + Call(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH0_0022) + Wait(10 * DT) + Call(ShowChoice, MSG_Choice_0011) + Wait(10 * DT) + Switch(LVar0) + CaseEq(0) + Call(CloseMessage) + Call(FindKeyItem, ITEM_DOLLY, LVar0) + Call(RemoveKeyItemAt, LVar0) + Call(PlayerFaceNpc, NPC_Goombaria, TRUE) + Call(PlayerMoveTo, -50, -24, 0) + Call(InterpPlayerYaw, 94, 0) + Wait(10 * DT) + ExecWait(N(EVS_HandOverDolly)) + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_SadTalk, ANIM_Goombaria_SadIdle, 0, MSG_CH0_0024) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Inspect) + Call(InterpNpcYaw, NPC_Goombaria, 90, 1) + Wait(10 * DT) + Call(InterpNpcYaw, NPC_Goombaria, 270, 1) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Idle) + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_0025) + Wait(10 * DT) EVT_GIVE_STAR_PIECE() - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_0026) - EVT_WAIT(10 * DT) - EVT_EXEC(N(EVS_Goombaria_Kiss)) - EVT_CALL(SetNpcJumpscale, NPC_Goombaria, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_Goombaria, -30, 0, -19, 10) - EVT_WAIT(10 * DT) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_SHIVER, 1, 1, 0) - EVT_WAIT(35 * DT) - EVT_CALL(SetNpcSpeed, NPC_Goombaria, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Walk) - EVT_CALL(NpcMoveTo, NPC_Goombaria, -23, -21, 0) - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Idle) - EVT_CALL(NpcFacePlayer, NPC_Goombaria, 3) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(PlayerMoveTo, -85, -10, 0) - EVT_CALL(PlayerFaceNpc, NPC_Goombaria, TRUE) - EVT_WAIT(20 * DT) - EVT_CASE_EQ(1) - EVT_CALL(ContinueSpeech, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH0_0023) - EVT_SET(GF_KMR02_KeptDolly, TRUE) - EVT_WAIT(10) - EVT_END_SWITCH - EVT_THREAD - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(3.0 / DT), 30, EVT_FLOAT(-275.0), EVT_FLOAT(15.0), EVT_FLOAT(-6.0)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_WAIT(60 * DT) - EVT_ELSE - EVT_THREAD - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(3.0 / DT), 30, EVT_FLOAT(-275.0), EVT_FLOAT(15.0), EVT_FLOAT(-6.0)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_WAIT(60 * DT) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH0_0027) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_0028) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH0_0029) - EVT_WAIT(10 * DT) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilit5, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 3) - EVT_CALL(RotateModel, MODEL_syoumen_enter, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_THREAD - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(2.0 / DT), 40, EVT_FLOAT(-350.0), EVT_FLOAT(15.0), EVT_FLOAT(-7.0)) - EVT_END_THREAD - EVT_CALL(SetNpcPos, NPC_PARTNER, 127, 0, -157) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Run) - EVT_CALL(NpcMoveTo, NPC_PARTNER, 32, -151, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(GetAngleBetweenNPCs, NPC_Goombaria, NPC_PARTNER, LVar0) - EVT_CALL(InterpNpcYaw, NPC_Goombaria, LVar0, 0) - EVT_CALL(GetAngleBetweenNPCs, NPC_Goombario, NPC_PARTNER, LVar0) - EVT_CALL(InterpNpcYaw, NPC_Goombario, LVar0, 0) - EVT_CALL(PlayerFaceNpc, NPC_PARTNER, 3) - EVT_SET(LVar0, 30) - EVT_LOOP(10) - EVT_ADD(LVar0, -3) - EVT_CALL(RotateModel, MODEL_syoumen_enter, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilit5, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_002A) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToNpc, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, NPC_PARTNER, MSG_CH0_002B) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Run) - EVT_CALL(NpcMoveTo, NPC_PARTNER, 3, 9, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(PlayerFaceNpc, NPC_PARTNER, 3) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_002C) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Walk) - EVT_CALL(NpcMoveTo, NPC_PARTNER, -60, -14, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_WAIT(10 * DT) + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_0026) + Wait(10 * DT) + Exec(N(EVS_Goombaria_Kiss)) + Call(SetNpcJumpscale, NPC_Goombaria, Float(1.0)) + Call(NpcJump0, NPC_Goombaria, -30, 0, -19, 10) + Wait(10 * DT) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_SHIVER, 1, 1, 0) + Wait(35 * DT) + Call(SetNpcSpeed, NPC_Goombaria, Float(3.0 / DT)) + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Walk) + Call(NpcMoveTo, NPC_Goombaria, -23, -21, 0) + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Idle) + Call(NpcFacePlayer, NPC_Goombaria, 3) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) + Call(PlayerMoveTo, -85, -10, 0) + Call(PlayerFaceNpc, NPC_Goombaria, TRUE) + Wait(20 * DT) + CaseEq(1) + Call(ContinueSpeech, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH0_0023) + Set(GF_KMR02_KeptDolly, TRUE) + Wait(10) + EndSwitch + Thread + Call(AdjustCam, CAM_DEFAULT, Float(3.0 / DT), 30, Float(-275.0), Float(15.0), Float(-6.0)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndThread + Wait(60 * DT) + Else + Thread + Call(AdjustCam, CAM_DEFAULT, Float(3.0 / DT), 30, Float(-275.0), Float(15.0), Float(-6.0)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndThread + Wait(60 * DT) + EndIf + Call(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH0_0027) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_0028) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH0_0029) + Wait(10 * DT) + Call(PlaySoundAtCollider, COLLIDER_deilit5, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 3) + Call(RotateModel, MODEL_syoumen_enter, LVar0, 0, 1, 0) + Wait(1) + EndLoop + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Thread + Call(AdjustCam, CAM_DEFAULT, Float(2.0 / DT), 40, Float(-350.0), Float(15.0), Float(-7.0)) + EndThread + Call(SetNpcPos, NPC_PARTNER, 127, 0, -157) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Run) + Call(NpcMoveTo, NPC_PARTNER, 32, -151, 0) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(GetAngleBetweenNPCs, NPC_Goombaria, NPC_PARTNER, LVar0) + Call(InterpNpcYaw, NPC_Goombaria, LVar0, 0) + Call(GetAngleBetweenNPCs, NPC_Goombario, NPC_PARTNER, LVar0) + Call(InterpNpcYaw, NPC_Goombario, LVar0, 0) + Call(PlayerFaceNpc, NPC_PARTNER, 3) + Set(LVar0, 30) + Loop(10) + Add(LVar0, -3) + Call(RotateModel, MODEL_syoumen_enter, LVar0, 0, 1, 0) + Wait(1) + EndLoop + Call(PlaySoundAtCollider, COLLIDER_deilit5, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_002A) + Wait(10 * DT) + Call(SpeakToNpc, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, NPC_PARTNER, MSG_CH0_002B) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Run) + Call(NpcMoveTo, NPC_PARTNER, 3, 9, 0) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(PlayerFaceNpc, NPC_PARTNER, 3) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_002C) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Walk) + Call(NpcMoveTo, NPC_PARTNER, -60, -14, 0) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Wait(10 * DT) EVT_GIVE_BADGE_REWARD(ITEM_POWER_JUMP) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Walk) - EVT_CALL(NpcMoveTo, NPC_PARTNER, 3, 9, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_WAIT(10 * DT) - EVT_EXEC_WAIT(N(EVS_PromptForBadgeTutorial)) - EVT_CALL(EnableNpcAI, NPC_Goombario, FALSE) - EVT_CALL(EnableNpcAI, NPC_Goombaria, FALSE) - EVT_CALL(EnableNpcAI, NPC_Gooma, FALSE) - EVT_CALL(EnableNpcAI, NPC_Goomama, FALSE) - EVT_CALL(N(LoadHeartBlockMsgImg)) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_0031) - EVT_WAIT(10 * DT) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(3.0 / DT), 30, EVT_FLOAT(-275.0), EVT_FLOAT(15.0), EVT_FLOAT(-6.0)) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_0032) - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_CALL(NpcFacePlayer, NPC_Goombaria, 3) - EVT_END_THREAD - EVT_CALL(NpcFacePlayer, NPC_Goombario, 3) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH0_0033) - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_CALL(GetAngleBetweenNPCs, NPC_Goombaria, NPC_PARTNER, LVar0) - EVT_CALL(InterpNpcYaw, NPC_Goombaria, LVar0, 3) - EVT_END_THREAD - EVT_CALL(GetAngleBetweenNPCs, NPC_Goombario, NPC_PARTNER, LVar0) - EVT_CALL(InterpNpcYaw, NPC_Goombario, LVar0, 3) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_0034) - EVT_WAIT(10 * DT) - EVT_CALL(NpcFacePlayer, NPC_Goombario, 3) - EVT_CALL(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH0_0035) - EVT_WAIT(10 * DT) - EVT_CALL(NpcFacePlayer, NPC_Goombaria, 3) - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_0036) - EVT_WAIT(10 * DT) - EVT_CALL(GetAngleBetweenNPCs, NPC_Goombario, NPC_PARTNER, LVar0) - EVT_CALL(InterpNpcYaw, NPC_Goombario, LVar0, 3) - EVT_CALL(SpeakToNpc, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, NPC_Goombario, MSG_CH0_0037) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcJumpscale, NPC_Goombario, EVT_FLOAT(1.2)) - EVT_CALL(GetNpcPos, NPC_Goombario, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Goombario, LVar0, LVar1, LVar2, 7 * DT) - EVT_CALL(SpeakToNpc, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, NPC_PARTNER, MSG_CH0_0038) - EVT_CALL(N(LoadPartyImage)) - EVT_EXEC(N(EVS_PushNewPartnerSong)) - EVT_WAIT(10 * DT) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0189, 160, 40) - EVT_EXEC(N(EVS_PopSong)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToNpc, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, NPC_Goombario, MSG_CH0_0039) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_003A) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Run) - EVT_CALL(NpcMoveTo, NPC_PARTNER, 41, -143, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilit5, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 3) - EVT_CALL(RotateModel, MODEL_syoumen_enter, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_Gooma, ANIM_Gooma_Run) - EVT_CALL(NpcMoveTo, NPC_Gooma, 127, -157, 0) - EVT_CALL(SetNpcAnimation, NPC_Gooma, ANIM_Gooma_Idle) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Run) - EVT_CALL(NpcMoveTo, NPC_PARTNER, 80, -154, 0) - EVT_CALL(NpcMoveTo, NPC_PARTNER, 111, -200, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle) - EVT_LOOP(10) - EVT_ADD(LVar0, -3) - EVT_CALL(RotateModel, MODEL_syoumen_enter, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilit5, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_CALL(N(RemoveGoompaPartner)) - EVT_CALL(N(IsPlayerHPFull)) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH0_003B) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH0_003C) - EVT_END_IF - EVT_CALL(N(ChangeNpcToPartner), NPC_Goombario, PARTNER_GOOMBARIO) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcPos, NPC_Goombario, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_Goombario, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcPos, NPC_Gooma, 115, 0, -309) - EVT_CALL(SetNpcFlagBits, NPC_Gooma, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Goompa, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Goompa, NPC_FLAG_FLYING, FALSE) - EVT_CALL(SetNpcPos, NPC_Goompa, 184, 0, -149) - EVT_CALL(EnableNpcShadow, NPC_Goompa, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, 200, 0, 100) - EVT_CALL(RestartNpcAI, NPC_Goombaria) - EVT_CALL(EnableNpcAI, NPC_Gooma, TRUE) - EVT_CALL(EnableNpcAI, NPC_Goomama, TRUE) - EVT_THREAD - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_END_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Goombaria, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_SET(GB_StoryProgress, STORY_CH0_GOOMBARIO_JOINED_PARTY) - EVT_UNBIND - EVT_CALL(SetNpcFlagBits, NPC_Goomama, NPC_FLAG_INACTIVE, FALSE) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Walk) + Call(NpcMoveTo, NPC_PARTNER, 3, 9, 0) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Wait(10 * DT) + ExecWait(N(EVS_PromptForBadgeTutorial)) + Call(EnableNpcAI, NPC_Goombario, FALSE) + Call(EnableNpcAI, NPC_Goombaria, FALSE) + Call(EnableNpcAI, NPC_Gooma, FALSE) + Call(EnableNpcAI, NPC_Goomama, FALSE) + Call(N(LoadHeartBlockMsgImg)) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_0031) + Wait(10 * DT) + Call(AdjustCam, CAM_DEFAULT, Float(3.0 / DT), 30, Float(-275.0), Float(15.0), Float(-6.0)) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_0032) + Wait(10 * DT) + Thread + Call(NpcFacePlayer, NPC_Goombaria, 3) + EndThread + Call(NpcFacePlayer, NPC_Goombario, 3) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH0_0033) + Wait(10 * DT) + Thread + Call(GetAngleBetweenNPCs, NPC_Goombaria, NPC_PARTNER, LVar0) + Call(InterpNpcYaw, NPC_Goombaria, LVar0, 3) + EndThread + Call(GetAngleBetweenNPCs, NPC_Goombario, NPC_PARTNER, LVar0) + Call(InterpNpcYaw, NPC_Goombario, LVar0, 3) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_0034) + Wait(10 * DT) + Call(NpcFacePlayer, NPC_Goombario, 3) + Call(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH0_0035) + Wait(10 * DT) + Call(NpcFacePlayer, NPC_Goombaria, 3) + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_0036) + Wait(10 * DT) + Call(GetAngleBetweenNPCs, NPC_Goombario, NPC_PARTNER, LVar0) + Call(InterpNpcYaw, NPC_Goombario, LVar0, 3) + Call(SpeakToNpc, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, NPC_Goombario, MSG_CH0_0037) + Wait(10 * DT) + Call(SetNpcJumpscale, NPC_Goombario, Float(1.2)) + Call(GetNpcPos, NPC_Goombario, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Goombario, LVar0, LVar1, LVar2, 7 * DT) + Call(SpeakToNpc, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, NPC_PARTNER, MSG_CH0_0038) + Call(N(LoadPartyImage)) + Exec(N(EVS_PushNewPartnerSong)) + Wait(10 * DT) + Call(ShowMessageAtScreenPos, MSG_Menus_0189, 160, 40) + Exec(N(EVS_PopSong)) + Wait(10 * DT) + Call(SpeakToNpc, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, NPC_Goombario, MSG_CH0_0039) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_003A) + Wait(10 * DT) + Call(SetNpcSpeed, NPC_PARTNER, Float(3.0 / DT)) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Run) + Call(NpcMoveTo, NPC_PARTNER, 41, -143, 0) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle) + Call(PlaySoundAtCollider, COLLIDER_deilit5, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 3) + Call(RotateModel, MODEL_syoumen_enter, LVar0, 0, 1, 0) + Wait(1) + EndLoop + Call(SetNpcAnimation, NPC_Gooma, ANIM_Gooma_Run) + Call(NpcMoveTo, NPC_Gooma, 127, -157, 0) + Call(SetNpcAnimation, NPC_Gooma, ANIM_Gooma_Idle) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Run) + Call(NpcMoveTo, NPC_PARTNER, 80, -154, 0) + Call(NpcMoveTo, NPC_PARTNER, 111, -200, 0) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle) + Loop(10) + Add(LVar0, -3) + Call(RotateModel, MODEL_syoumen_enter, LVar0, 0, 1, 0) + Wait(1) + EndLoop + Call(PlaySoundAtCollider, COLLIDER_deilit5, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Call(N(RemoveGoompaPartner)) + Call(N(IsPlayerHPFull)) + IfEq(LVar0, 1) + Call(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH0_003B) + Else + Call(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH0_003C) + EndIf + Call(N(ChangeNpcToPartner), NPC_Goombario, PARTNER_GOOMBARIO) + Wait(10 * DT) + Call(SetNpcPos, NPC_Goombario, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_Goombario, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcPos, NPC_Gooma, 115, 0, -309) + Call(SetNpcFlagBits, NPC_Gooma, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(SetNpcFlagBits, NPC_Goompa, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcFlagBits, NPC_Goompa, NPC_FLAG_FLYING, FALSE) + Call(SetNpcPos, NPC_Goompa, 184, 0, -149) + Call(EnableNpcShadow, NPC_Goompa, TRUE) + Call(SetNpcPos, NPC_SELF, 200, 0, 100) + Call(RestartNpcAI, NPC_Goombaria) + Call(EnableNpcAI, NPC_Gooma, TRUE) + Call(EnableNpcAI, NPC_Goomama, TRUE) + Thread + Call(ResetCam, CAM_DEFAULT, Float(4.0 / DT)) + EndThread + Call(SetNpcFlagBits, NPC_Goombaria, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Set(GB_StoryProgress, STORY_CH0_GOOMBARIO_JOINED_PARTY) + Unbind + Call(SetNpcFlagBits, NPC_Goomama, NPC_FLAG_INACTIVE, FALSE) + Return + End }; EvtScript N(EVS_NpcIdle_Goompa) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_KootFavorCheck_Goompa) = { - EVT_IF_EQ(GB_KootFavor_Current, KOOT_FAVOR_CH2_2) - EVT_IF_EQ(GF_KMR02_Gift_TheTape, FALSE) - EVT_SET(GF_KMR02_Gift_TheTape, TRUE) - EVT_EXEC_WAIT(N(EVS_MarioSalute)) - EVT_CALL(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_0049) - EVT_CALL(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_004A) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.2)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 297, LVar1, -84) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_CALL(GetNpcPos, NPC_Goompa, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcFlagBits, NPC_Goompa, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Goompa, ANIM_Goompa_Walk) - EVT_CALL(SetNpcSpeed, NPC_Goompa, EVT_FLOAT(2.0)) - EVT_CALL(NpcMoveTo, NPC_Goompa, 260, -94, 0) - EVT_CALL(NpcMoveTo, NPC_Goompa, 344, -113, 0) - EVT_CALL(NpcMoveTo, NPC_Goompa, 381, -93, 0) - EVT_CALL(SetNpcAnimation, NPC_Goompa, ANIM_Goompa_Idle) - EVT_WAIT(30) - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_Goompa, ANIM_Goompa_Walk) - EVT_CALL(NpcMoveTo, NPC_Goompa, 344, -113, 0) - EVT_CALL(NpcMoveTo, NPC_Goompa, 260, -94, 0) - EVT_CALL(NpcMoveTo, NPC_Goompa, LVar0, LVar2, 0) - EVT_CALL(SetNpcPos, NPC_Goompa, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcFlagBits, NPC_Goompa, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_004B) + IfEq(GB_KootFavor_Current, KOOT_FAVOR_CH2_2) + IfEq(GF_KMR02_Gift_TheTape, FALSE) + Set(GF_KMR02_Gift_TheTape, TRUE) + ExecWait(N(EVS_MarioSalute)) + Call(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_0049) + Call(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_004A) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.2)) + Call(SetPanTarget, CAM_DEFAULT, 297, LVar1, -84) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Call(GetNpcPos, NPC_Goompa, LVar0, LVar1, LVar2) + Call(SetNpcFlagBits, NPC_Goompa, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_Goompa, ANIM_Goompa_Walk) + Call(SetNpcSpeed, NPC_Goompa, Float(2.0)) + Call(NpcMoveTo, NPC_Goompa, 260, -94, 0) + Call(NpcMoveTo, NPC_Goompa, 344, -113, 0) + Call(NpcMoveTo, NPC_Goompa, 381, -93, 0) + Call(SetNpcAnimation, NPC_Goompa, ANIM_Goompa_Idle) + Wait(30) + Thread + Wait(20) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + EndThread + Call(SetNpcAnimation, NPC_Goompa, ANIM_Goompa_Walk) + Call(NpcMoveTo, NPC_Goompa, 344, -113, 0) + Call(NpcMoveTo, NPC_Goompa, 260, -94, 0) + Call(NpcMoveTo, NPC_Goompa, LVar0, LVar2, 0) + Call(SetNpcPos, NPC_Goompa, LVar0, LVar1, LVar2) + Call(SetNpcFlagBits, NPC_Goompa, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_004B) EVT_GIVE_KEY_REWARD(ITEM_KOOT_THE_TAPE) - EVT_CALL(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_004C) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_004C) + EndIf + EndIf + Return + End }; API_CALLABLE(N(AddGoompaRenderYaw)) { @@ -817,481 +817,481 @@ API_CALLABLE(N(AddGoompaRenderYaw)) { } EvtScript N(EVS_Goompa_TurnAround) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) - EVT_LOOP(5) - EVT_CALL(N(AddGoompaRenderYaw), EVT_FLOAT(-18.0)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Goompa_Idle) - EVT_CALL(N(AddGoompaRenderYaw), EVT_FLOAT(-180.0)) - EVT_LOOP(5) - EVT_CALL(N(AddGoompaRenderYaw), EVT_FLOAT(-18.0)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) + Loop(5) + Call(N(AddGoompaRenderYaw), Float(-18.0)) + Wait(1) + EndLoop + Call(SetNpcAnimation, NPC_SELF, ANIM_Goompa_Idle) + Call(N(AddGoompaRenderYaw), Float(-180.0)) + Loop(5) + Call(N(AddGoompaRenderYaw), Float(-18.0)) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_Goompa_TurnBack) = { - EVT_LOOP(5) - EVT_CALL(N(AddGoompaRenderYaw), EVT_FLOAT(18.0)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Goompa_Rummage) - EVT_CALL(N(AddGoompaRenderYaw), EVT_FLOAT(180.0)) - EVT_LOOP(5) - EVT_CALL(N(AddGoompaRenderYaw), EVT_FLOAT(18.0)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, FALSE) - EVT_RETURN - EVT_END + Loop(5) + Call(N(AddGoompaRenderYaw), Float(18.0)) + Wait(1) + EndLoop + Call(SetNpcAnimation, NPC_SELF, ANIM_Goompa_Rummage) + Call(N(AddGoompaRenderYaw), Float(180.0)) + Loop(5) + Call(N(AddGoompaRenderYaw), Float(18.0)) + Wait(1) + EndLoop + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_Goompa) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_GATE_CRUSHED) - EVT_IF_EQ(GF_KMR02_Met_Goompa, FALSE) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(5.0 * DT), 0, EVT_FLOAT(-275.0), EVT_FLOAT(20.0), EVT_FLOAT(-8.5)) - EVT_EXEC_WAIT(N(EVS_Goompa_TurnAround)) - EVT_CALL(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_0019) - EVT_EXEC_WAIT(N(EVS_Goompa_TurnBack)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 499, 0, -378) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 499, 70, -378) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 370) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 * DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_SET(GF_KMR02_Met_Goompa, TRUE) - EVT_SET(GB_StoryProgress, STORY_CH0_MET_GOOMPA) - EVT_CALL(SetNpcPos, NPC_Goombaria, 215, 0, 215) - EVT_CALL(BindNpcAI, NPC_Goombaria, EVT_PTR(N(EVS_NpcAI_GoombaFamily_NoAI))) - EVT_IF_EQ(GF_KMR02_Met_Goompapa, TRUE) - EVT_CALL(SetNpcPos, NPC_Goompapa, 265, 0, 245) - EVT_CALL(BindNpcAI, NPC_Goompapa, EVT_PTR(N(EVS_NpcAI_GoombaFamily_NoAI))) - EVT_CALL(SetNpcAnimation, NPC_Goompapa, ANIM_Goompapa_Idle) - EVT_END_IF - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_Goompa_TurnAround)) - EVT_IF_EQ(GF_KMR02_Goompa_SwapDialogue, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_001A) - EVT_SET(GF_KMR02_Goompa_SwapDialogue, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_001B) - EVT_SET(GF_KMR02_Goompa_SwapDialogue, FALSE) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_Goompa_TurnBack)) - EVT_END_IF - EVT_CASE_LT(STORY_CH0_DEFEATED_GOOMBA_KING) - EVT_CALL(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_003D) - EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS) - EVT_CALL(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_003E) - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_003F) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_NE(LVar0, PARTNER_GOOMBARIO) - EVT_CALL(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_0040) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_0041) - EVT_END_IF - EVT_CASE_GE(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_NE(LVar0, PARTNER_GOOMBARIO) - EVT_CALL(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_0042) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_0043) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToNpc, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, NPC_Goompa, MSG_CH0_0044) - EVT_CALL(EnablePartnerAI) - EVT_END_IF - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_LetterPrompt_Goompa)) - EVT_EXEC_WAIT(N(EVS_LetterReward_Goompa)) - EVT_IF_NE(LVarC, DELIVERY_NOT_POSSIBLE) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_KootFavorCheck_Goompa)) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_GATE_CRUSHED) + IfEq(GF_KMR02_Met_Goompa, FALSE) + Call(AdjustCam, CAM_DEFAULT, Float(5.0 * DT), 0, Float(-275.0), Float(20.0), Float(-8.5)) + ExecWait(N(EVS_Goompa_TurnAround)) + Call(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_0019) + ExecWait(N(EVS_Goompa_TurnBack)) + Call(UseSettingsFrom, CAM_DEFAULT, 499, 0, -378) + Call(SetPanTarget, CAM_DEFAULT, 499, 70, -378) + Call(SetCamDistance, CAM_DEFAULT, 370) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 * DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Set(GF_KMR02_Met_Goompa, TRUE) + Set(GB_StoryProgress, STORY_CH0_MET_GOOMPA) + Call(SetNpcPos, NPC_Goombaria, 215, 0, 215) + Call(BindNpcAI, NPC_Goombaria, Ref(N(EVS_NpcAI_GoombaFamily_NoAI))) + IfEq(GF_KMR02_Met_Goompapa, TRUE) + Call(SetNpcPos, NPC_Goompapa, 265, 0, 245) + Call(BindNpcAI, NPC_Goompapa, Ref(N(EVS_NpcAI_GoombaFamily_NoAI))) + Call(SetNpcAnimation, NPC_Goompapa, ANIM_Goompapa_Idle) + EndIf + Else + ExecWait(N(EVS_Goompa_TurnAround)) + IfEq(GF_KMR02_Goompa_SwapDialogue, FALSE) + Call(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_001A) + Set(GF_KMR02_Goompa_SwapDialogue, TRUE) + Else + Call(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_001B) + Set(GF_KMR02_Goompa_SwapDialogue, FALSE) + EndIf + ExecWait(N(EVS_Goompa_TurnBack)) + EndIf + CaseLt(STORY_CH0_DEFEATED_GOOMBA_KING) + Call(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_003D) + CaseLt(STORY_CH0_MET_STAR_SPIRITS) + Call(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_003E) + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_003F) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(GetCurrentPartnerID, LVar0) + IfNe(LVar0, PARTNER_GOOMBARIO) + Call(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_0040) + Else + Call(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_0041) + EndIf + CaseGe(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(GetCurrentPartnerID, LVar0) + IfNe(LVar0, PARTNER_GOOMBARIO) + Call(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_0042) + Else + Call(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_0043) + Call(DisablePartnerAI, 0) + Call(SpeakToNpc, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, NPC_Goompa, MSG_CH0_0044) + Call(EnablePartnerAI) + EndIf + EndSwitch + ExecWait(N(EVS_LetterPrompt_Goompa)) + ExecWait(N(EVS_LetterReward_Goompa)) + IfNe(LVarC, DELIVERY_NOT_POSSIBLE) + Return + EndIf + ExecWait(N(EVS_KootFavorCheck_Goompa)) + Return + End }; EvtScript N(EVS_NpcInit_Goompa) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Goompa))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Goompa))) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mm2, COLLIDER_FLAGS_UPPER_MASK) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_GATE_CRUSHED) - EVT_CALL(SetNpcPos, NPC_SELF, 535, 25, -369) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Goompa_Rummage) - EVT_CALL(InterpNpcYaw, NPC_SELF, 200, 0) - EVT_CASE_LT(STORY_CH0_FELL_OFF_CLIFF) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CASE_LT(STORY_CH0_GOOMBARIO_JOINED_PARTY) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ReturnToVillage)), TRIGGER_WALL_PRESS_A, COLLIDER_mm1, 1, 0) - EVT_CASE_GE(STORY_CH0_GOOMBARIO_JOINED_PARTY) - EVT_CALL(SetNpcPos, NPC_Goompa, 172, 0, -183) - EVT_CALL(SetNpcFlagBits, NPC_Goompa, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(RotateModel, MODEL_m_d1, 120, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m_d2, 120, 0, 1, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mm1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_mm2, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Goompa))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Goompa))) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mm2, COLLIDER_FLAGS_UPPER_MASK) + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_GATE_CRUSHED) + Call(SetNpcPos, NPC_SELF, 535, 25, -369) + Call(SetNpcAnimation, NPC_SELF, ANIM_Goompa_Rummage) + Call(InterpNpcYaw, NPC_SELF, 200, 0) + CaseLt(STORY_CH0_FELL_OFF_CLIFF) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING, TRUE) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(EnableNpcShadow, NPC_SELF, FALSE) + CaseLt(STORY_CH0_GOOMBARIO_JOINED_PARTY) + BindTrigger(Ref(N(EVS_ReturnToVillage)), TRIGGER_WALL_PRESS_A, COLLIDER_mm1, 1, 0) + CaseGe(STORY_CH0_GOOMBARIO_JOINED_PARTY) + Call(SetNpcPos, NPC_Goompa, 172, 0, -183) + Call(SetNpcFlagBits, NPC_Goompa, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(RotateModel, MODEL_m_d1, 120, 0, -1, 0) + Call(RotateModel, MODEL_m_d2, 120, 0, 1, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mm1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_mm2, COLLIDER_FLAGS_UPPER_MASK) + EndSwitch + Return + End }; EvtScript N(D_8024BEF8_8BBF68) = { - EVT_CALL(SetNpcAnimation, NPC_Goompapa, ANIM_Goompapa_Walk) - EVT_CALL(NpcMoveTo, NPC_Goompapa, 272, 281, 20 * DT) - EVT_CALL(GetNpcYaw, NPC_Goompapa, LVar3) - EVT_SET(LVar4, LVar3) - EVT_ADD(LVar4, 180) - EVT_CALL(InterpNpcYaw, NPC_Goompapa, LVar4, 0) - EVT_WAIT(7) - EVT_CALL(InterpNpcYaw, NPC_Goompapa, LVar3, 0) - EVT_WAIT(7) - EVT_CALL(NpcMoveTo, NPC_Goompapa, 266, 228, 20 * DT) - EVT_CALL(GetNpcYaw, NPC_Goompapa, LVar3) - EVT_SET(LVar4, LVar3) - EVT_ADD(LVar4, 180) - EVT_CALL(InterpNpcYaw, NPC_Goompapa, LVar4, 0) - EVT_WAIT(7) - EVT_CALL(InterpNpcYaw, NPC_Goompapa, LVar3, 0) - EVT_WAIT(7) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_Goompapa, ANIM_Goompapa_Walk) + Call(NpcMoveTo, NPC_Goompapa, 272, 281, 20 * DT) + Call(GetNpcYaw, NPC_Goompapa, LVar3) + Set(LVar4, LVar3) + Add(LVar4, 180) + Call(InterpNpcYaw, NPC_Goompapa, LVar4, 0) + Wait(7) + Call(InterpNpcYaw, NPC_Goompapa, LVar3, 0) + Wait(7) + Call(NpcMoveTo, NPC_Goompapa, 266, 228, 20 * DT) + Call(GetNpcYaw, NPC_Goompapa, LVar3) + Set(LVar4, LVar3) + Add(LVar4, 180) + Call(InterpNpcYaw, NPC_Goompapa, LVar4, 0) + Wait(7) + Call(InterpNpcYaw, NPC_Goompapa, LVar3, 0) + Wait(7) + Return + End }; EvtScript N(EVS_NpcIdle_Goompapa) = { - EVT_LABEL(0) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_MET_GOOMPA) - EVT_EXEC_WAIT(N(D_8024BEF8_8BBF68)) - EVT_CASE_LT(STORY_CH0_GATE_CRUSHED) - EVT_IF_EQ(GF_KMR02_Met_Goompapa, FALSE) - EVT_EXEC_WAIT(N(D_8024BEF8_8BBF68)) - EVT_END_IF - EVT_CASE_LT(STORY_CH0_SMASHED_GATE_BLOCK) - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(N(EVS_NpcAI_GoombaFamily_Wander)) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_MET_GOOMPA) + ExecWait(N(D_8024BEF8_8BBF68)) + CaseLt(STORY_CH0_GATE_CRUSHED) + IfEq(GF_KMR02_Met_Goompapa, FALSE) + ExecWait(N(D_8024BEF8_8BBF68)) + EndIf + CaseLt(STORY_CH0_SMASHED_GATE_BLOCK) + CaseDefault + ExecWait(N(EVS_NpcAI_GoombaFamily_Wander)) + EndSwitch + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_NpcInteract_Goompapa) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_MET_GOOMPA) - EVT_IF_EQ(GF_KMR02_Met_Goompapa, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_0052) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_0053) - EVT_SET(GF_KMR02_Met_Goompapa, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_0054) - EVT_END_IF - EVT_CASE_EQ(STORY_CH0_MET_GOOMPA) - EVT_IF_EQ(GF_KMR02_Met_Goompapa, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Goompapa, ANIM_Goompapa_Idle) - EVT_CALL(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_0056) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(30) - EVT_CALL(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_0057) - EVT_CALL(BindNpcAI, NPC_Goompapa, EVT_PTR(N(EVS_NpcAI_GoombaFamily_NoAI))) - EVT_SET(GF_KMR02_Met_Goompapa, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_0055) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_0058) - EVT_THREAD - EVT_CALL(FadeOutMusic, 0, 500) - EVT_WAIT(45) - EVT_CALL(FadeInMusic, 0, SONG_KAMMY_KOOPA_THEME, 0, 500, 0, 127) - EVT_END_THREAD - EVT_EXEC_WAIT(N(EVS_Scene_KammyStrikes)) - EVT_CASE_LT(STORY_CH0_FELL_OFF_CLIFF) - EVT_CALL(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_0063) - EVT_CASE_LT(STORY_CH0_DEFEATED_GOOMBA_KING) - EVT_IF_EQ(GF_KMR02_Goompapa_SaidFarewell, FALSE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToNpc, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, NPC_Goompapa, MSG_CH0_0064) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_WorldGoombario_Idle) - EVT_WAIT(10) - EVT_CALL(EnablePartnerAI) - EVT_CALL(SpeakToNpc, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, NPC_PARTNER, MSG_CH0_0065) - EVT_SET(GF_KMR02_Goompapa_SaidFarewell, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_0068) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_WorldGoombario_Idle) - EVT_END_IF - EVT_CASE_LT(STORY_CH1_KOOPER_JOINED_PARTY) - EVT_CALL(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_0069) - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_006A) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_NE(LVar0, PARTNER_GOOMBARIO) - EVT_CALL(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_006B) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_006C) - EVT_END_IF - EVT_CASE_GE(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_NE(LVar0, PARTNER_GOOMBARIO) - EVT_CALL(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_006D) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_006E) - EVT_END_IF - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_LetterTrade_Goompapa)) - EVT_IF_NE(LVarC, 0) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_LetterPrompt_Goompapa)) - EVT_EXEC_WAIT(N(EVS_LetterReward_Goompapa)) - EVT_IF_NE(LVarC, 0) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_MET_GOOMPA) + IfEq(GF_KMR02_Met_Goompapa, FALSE) + Call(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_0052) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(10) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(10) + Call(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_0053) + Set(GF_KMR02_Met_Goompapa, TRUE) + Else + Call(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_0054) + EndIf + CaseEq(STORY_CH0_MET_GOOMPA) + IfEq(GF_KMR02_Met_Goompapa, FALSE) + Call(SetNpcAnimation, NPC_Goompapa, ANIM_Goompapa_Idle) + Call(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_0056) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(10) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(30) + Call(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_0057) + Call(BindNpcAI, NPC_Goompapa, Ref(N(EVS_NpcAI_GoombaFamily_NoAI))) + Set(GF_KMR02_Met_Goompapa, TRUE) + Else + Call(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_0055) + EndIf + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_0058) + Thread + Call(FadeOutMusic, 0, 500) + Wait(45) + Call(FadeInMusic, 0, SONG_KAMMY_KOOPA_THEME, 0, 500, 0, 127) + EndThread + ExecWait(N(EVS_Scene_KammyStrikes)) + CaseLt(STORY_CH0_FELL_OFF_CLIFF) + Call(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_0063) + CaseLt(STORY_CH0_DEFEATED_GOOMBA_KING) + IfEq(GF_KMR02_Goompapa_SaidFarewell, FALSE) + Call(DisablePartnerAI, 0) + Call(SpeakToNpc, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, NPC_Goompapa, MSG_CH0_0064) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_WorldGoombario_Idle) + Wait(10) + Call(EnablePartnerAI) + Call(SpeakToNpc, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, NPC_PARTNER, MSG_CH0_0065) + Set(GF_KMR02_Goompapa_SaidFarewell, TRUE) + Else + Call(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_0068) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_WorldGoombario_Idle) + EndIf + CaseLt(STORY_CH1_KOOPER_JOINED_PARTY) + Call(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_0069) + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_006A) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(GetCurrentPartnerID, LVar0) + IfNe(LVar0, PARTNER_GOOMBARIO) + Call(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_006B) + Else + Call(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_006C) + EndIf + CaseGe(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(GetCurrentPartnerID, LVar0) + IfNe(LVar0, PARTNER_GOOMBARIO) + Call(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_006D) + Else + Call(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_006E) + EndIf + EndSwitch + ExecWait(N(EVS_LetterTrade_Goompapa)) + IfNe(LVarC, 0) + Return + EndIf + ExecWait(N(EVS_LetterPrompt_Goompapa)) + ExecWait(N(EVS_LetterReward_Goompapa)) + IfNe(LVarC, 0) + Return + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Goompapa) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Goompapa))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Goompapa))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_MET_GOOMPA) - EVT_CASE_EQ(STORY_CH0_MET_GOOMPA) - EVT_IF_EQ(GF_KMR02_Met_Goompapa, TRUE) - EVT_CALL(SetNpcPos, NPC_Goompapa, 265, 0, 245) - EVT_CALL(BindNpcAI, NPC_Goompapa, EVT_PTR(N(EVS_NpcAI_GoombaFamily_NoAI))) - EVT_CALL(SetNpcAnimation, NPC_Goompapa, ANIM_Goompapa_Idle) - EVT_END_IF - EVT_CASE_LT(STORY_CH0_FELL_OFF_CLIFF) - EVT_CALL(N(SetWanderTerritory_Npc), NPC_Goompapa, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_SwitchedWander_Npc))) - EVT_CASE_LT(STORY_CH0_SMASHED_GATE_BLOCK) - EVT_CALL(SetNpcPos, NPC_SELF, 258, 0, 258) - EVT_CALL(InterpNpcYaw, NPC_SELF, 106, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Goompapa))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Goompapa))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_MET_GOOMPA) + CaseEq(STORY_CH0_MET_GOOMPA) + IfEq(GF_KMR02_Met_Goompapa, TRUE) + Call(SetNpcPos, NPC_Goompapa, 265, 0, 245) + Call(BindNpcAI, NPC_Goompapa, Ref(N(EVS_NpcAI_GoombaFamily_NoAI))) + Call(SetNpcAnimation, NPC_Goompapa, ANIM_Goompapa_Idle) + EndIf + CaseLt(STORY_CH0_FELL_OFF_CLIFF) + Call(N(SetWanderTerritory_Npc), NPC_Goompapa, 0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_SwitchedWander_Npc))) + CaseLt(STORY_CH0_SMASHED_GATE_BLOCK) + Call(SetNpcPos, NPC_SELF, 258, 0, 258) + Call(InterpNpcYaw, NPC_SELF, 106, 0) + EndSwitch + Return + End }; EvtScript N(EVS_NpcIdle_Goomama) = { - EVT_CALL(func_800445D4, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(100) - EVT_EXEC_WAIT(N(EVS_NpcAI_GoombaFamily_Wander)) - EVT_CASE_OR_EQ(101) - EVT_CASE_OR_EQ(102) - EVT_CASE_OR_EQ(3) - EVT_CASE_OR_EQ(103) - EVT_EXEC_WAIT(N(EVS_NpcAI_GoombaFamily_Wander)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(func_800445D4, LVar0) + Switch(LVar0) + CaseEq(100) + ExecWait(N(EVS_NpcAI_GoombaFamily_Wander)) + CaseOrEq(101) + CaseOrEq(102) + CaseOrEq(3) + CaseOrEq(103) + ExecWait(N(EVS_NpcAI_GoombaFamily_Wander)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Goomama) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_GATE_CRUSHED) - EVT_IF_EQ(GF_KMR02_Met_Goomama, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Goomama, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_CH0_0077) - EVT_SET(GF_KMR02_Met_Goomama, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Goomama, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_CH0_0078) - EVT_END_IF - EVT_CASE_LT(STORY_CH0_LEFT_THE_PLAYGROUND) - EVT_CALL(SpeakToPlayer, NPC_Goomama, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_CH0_0079) - EVT_CASE_LT(STORY_CH0_DEFEATED_GOOMBA_KING) - EVT_IF_EQ(GF_KMR02_Goomama_SaidFarewell, FALSE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 5, MSG_CH0_007A) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Goomama, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_CH0_007B) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 5, MSG_CH0_007C) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Goomama, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_CH0_007D) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 5, MSG_CH0_007E) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Goomama, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_CH0_007F) - EVT_WAIT(10) - EVT_SET(GF_KMR02_Goomama_SaidFarewell, TRUE) - EVT_CALL(EnablePartnerAI) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Goomama, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_CH0_0080) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_Goomama, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_CH0_0081) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_EQ(LVar0, PARTNER_GOOMBARIO) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToNpc, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, NPC_Goomama, MSG_CH0_0082) - EVT_CALL(EnablePartnerAI) - EVT_END_IF - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_NE(LVar0, PARTNER_GOOMBARIO) - EVT_CALL(SpeakToPlayer, NPC_Goomama, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_CH0_0083) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Goomama, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_CH0_0084) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToNpc, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, NPC_Goomama, MSG_CH0_0085) - EVT_CALL(EnablePartnerAI) - EVT_END_IF - EVT_CASE_GE(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_NE(LVar0, PARTNER_GOOMBARIO) - EVT_CALL(SpeakToPlayer, NPC_Goomama, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_CH0_0086) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Goomama, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_CH0_0087) - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_GATE_CRUSHED) + IfEq(GF_KMR02_Met_Goomama, FALSE) + Call(SpeakToPlayer, NPC_Goomama, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_CH0_0077) + Set(GF_KMR02_Met_Goomama, TRUE) + Else + Call(SpeakToPlayer, NPC_Goomama, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_CH0_0078) + EndIf + CaseLt(STORY_CH0_LEFT_THE_PLAYGROUND) + Call(SpeakToPlayer, NPC_Goomama, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_CH0_0079) + CaseLt(STORY_CH0_DEFEATED_GOOMBA_KING) + IfEq(GF_KMR02_Goomama_SaidFarewell, FALSE) + Call(DisablePartnerAI, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 5, MSG_CH0_007A) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle) + Wait(10) + Call(SpeakToPlayer, NPC_Goomama, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_CH0_007B) + Wait(10) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 5, MSG_CH0_007C) + Wait(10) + Call(SpeakToPlayer, NPC_Goomama, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_CH0_007D) + Wait(10) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 5, MSG_CH0_007E) + Wait(10) + Call(SpeakToPlayer, NPC_Goomama, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_CH0_007F) + Wait(10) + Set(GF_KMR02_Goomama_SaidFarewell, TRUE) + Call(EnablePartnerAI) + Else + Call(SpeakToPlayer, NPC_Goomama, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_CH0_0080) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_Goomama, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_CH0_0081) + Call(GetCurrentPartnerID, LVar0) + IfEq(LVar0, PARTNER_GOOMBARIO) + Call(DisablePartnerAI, 0) + Call(SpeakToNpc, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, NPC_Goomama, MSG_CH0_0082) + Call(EnablePartnerAI) + EndIf + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(GetCurrentPartnerID, LVar0) + IfNe(LVar0, PARTNER_GOOMBARIO) + Call(SpeakToPlayer, NPC_Goomama, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_CH0_0083) + Else + Call(SpeakToPlayer, NPC_Goomama, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_CH0_0084) + Call(DisablePartnerAI, 0) + Call(SpeakToNpc, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, NPC_Goomama, MSG_CH0_0085) + Call(EnablePartnerAI) + EndIf + CaseGe(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(GetCurrentPartnerID, LVar0) + IfNe(LVar0, PARTNER_GOOMBARIO) + Call(SpeakToPlayer, NPC_Goomama, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_CH0_0086) + Else + Call(SpeakToPlayer, NPC_Goomama, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_CH0_0087) + EndIf + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Goomama) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_MET_INNKEEPER) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Goomama))) - EVT_CASE_LT(STORY_CH0_GATE_CRUSHED) - EVT_CASE_LT(STORY_CH0_FELL_OFF_CLIFF) - EVT_CALL(N(SetWanderTerritory_Npc), NPC_Goomama, 1) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_SwitchedWander_Npc))) - EVT_CASE_LT(STORY_CH0_LEFT_THE_PLAYGROUND) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Goomama))) - EVT_CASE_LT(STORY_CH0_GOOMBARIO_JOINED_PARTY) - EVT_CALL(SetNpcPos, NPC_SELF, 200, 0, 100) - EVT_WAIT(1) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INACTIVE, TRUE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Goomama))) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Goomama))) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Goomama))) - EVT_END_SWITCH - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Goomama))) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_MET_INNKEEPER) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Goomama))) + CaseLt(STORY_CH0_GATE_CRUSHED) + CaseLt(STORY_CH0_FELL_OFF_CLIFF) + Call(N(SetWanderTerritory_Npc), NPC_Goomama, 1) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_SwitchedWander_Npc))) + CaseLt(STORY_CH0_LEFT_THE_PLAYGROUND) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Goomama))) + CaseLt(STORY_CH0_GOOMBARIO_JOINED_PARTY) + Call(SetNpcPos, NPC_SELF, 200, 0, 100) + Wait(1) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INACTIVE, TRUE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Goomama))) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Goomama))) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(RemoveNpc, NPC_SELF) + Return + CaseDefault + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Goomama))) + EndSwitch + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Goomama))) + Return + End }; EvtScript N(EVS_NpcIdle_Gooma) = { - EVT_CALL(func_800445D4, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(100) - EVT_LABEL(0) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_CH0_GOOMBARIO_JOINED_PARTY) - EVT_EXEC_WAIT(N(EVS_NpcAI_GoombaFamily_Wander)) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(0) - EVT_CASE_OR_EQ(101) - EVT_CASE_OR_EQ(102) - EVT_CASE_OR_EQ(3) - EVT_CASE_OR_EQ(103) - EVT_EXEC_WAIT(N(EVS_NpcAI_GoombaFamily_Wander)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(func_800445D4, LVar0) + Switch(LVar0) + CaseEq(100) + Label(0) + Switch(GB_StoryProgress) + CaseEq(STORY_CH0_GOOMBARIO_JOINED_PARTY) + ExecWait(N(EVS_NpcAI_GoombaFamily_Wander)) + EndSwitch + Wait(1) + Goto(0) + CaseOrEq(101) + CaseOrEq(102) + CaseOrEq(3) + CaseOrEq(103) + ExecWait(N(EVS_NpcAI_GoombaFamily_Wander)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Gooma) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_GATE_CRUSHED) - EVT_IF_EQ(GF_KMR02_Met_Gooma, FALSE) - EVT_SET(GF_KMR02_Met_Gooma, TRUE) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(5.0 * DT), 0, EVT_FLOAT(-275.5), EVT_FLOAT(15.5), EVT_FLOAT(-10.0)) - EVT_CALL(SpeakToPlayer, NPC_Gooma, ANIM_Gooma_Talk, ANIM_Gooma_Idle, 5, MSG_CH0_009C) - EVT_THREAD - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0 * DT)) - EVT_END_THREAD - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Gooma, ANIM_Gooma_Talk, ANIM_Gooma_Idle, 5, MSG_CH0_009D) - EVT_END_IF - EVT_CASE_LT(STORY_CH0_FELL_OFF_CLIFF) - EVT_CALL(SpeakToPlayer, NPC_Gooma, ANIM_Gooma_Talk, ANIM_Gooma_Idle, 0, MSG_CH0_009E) - EVT_CASE_LT(STORY_CH0_DEFEATED_GOOMBA_KING) - EVT_IF_EQ(GF_KMR02_Gooma_HealthAdvice, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Gooma, ANIM_Gooma_Talk, ANIM_Gooma_Idle, 0, MSG_CH0_009F) - EVT_SET(GF_KMR02_Gooma_HealthAdvice, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Gooma, ANIM_Gooma_Talk, ANIM_Gooma_Idle, 0, MSG_CH0_00A0) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_Gooma, ANIM_Gooma_Talk, ANIM_Gooma_Idle, 0, MSG_CH0_00A1) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_NE(LVar0, PARTNER_GOOMBARIO) - EVT_CALL(SpeakToPlayer, NPC_Gooma, ANIM_Gooma_Talk, ANIM_Gooma_Idle, 0, MSG_CH0_00A2) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Gooma, ANIM_Gooma_Talk, ANIM_Gooma_Idle, 0, MSG_CH0_00A3) - EVT_END_IF - EVT_CASE_GE(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_NE(LVar0, PARTNER_GOOMBARIO) - EVT_CALL(SpeakToPlayer, NPC_Gooma, ANIM_Gooma_Talk, ANIM_Gooma_Idle, 0, MSG_CH0_00A4) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Gooma, ANIM_Gooma_Talk, ANIM_Gooma_Idle, 0, MSG_CH0_00A5) - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_GATE_CRUSHED) + IfEq(GF_KMR02_Met_Gooma, FALSE) + Set(GF_KMR02_Met_Gooma, TRUE) + Call(AdjustCam, CAM_DEFAULT, Float(5.0 * DT), 0, Float(-275.5), Float(15.5), Float(-10.0)) + Call(SpeakToPlayer, NPC_Gooma, ANIM_Gooma_Talk, ANIM_Gooma_Idle, 5, MSG_CH0_009C) + Thread + Call(ResetCam, CAM_DEFAULT, Float(4.0 * DT)) + EndThread + Else + Call(SpeakToPlayer, NPC_Gooma, ANIM_Gooma_Talk, ANIM_Gooma_Idle, 5, MSG_CH0_009D) + EndIf + CaseLt(STORY_CH0_FELL_OFF_CLIFF) + Call(SpeakToPlayer, NPC_Gooma, ANIM_Gooma_Talk, ANIM_Gooma_Idle, 0, MSG_CH0_009E) + CaseLt(STORY_CH0_DEFEATED_GOOMBA_KING) + IfEq(GF_KMR02_Gooma_HealthAdvice, FALSE) + Call(SpeakToPlayer, NPC_Gooma, ANIM_Gooma_Talk, ANIM_Gooma_Idle, 0, MSG_CH0_009F) + Set(GF_KMR02_Gooma_HealthAdvice, TRUE) + Else + Call(SpeakToPlayer, NPC_Gooma, ANIM_Gooma_Talk, ANIM_Gooma_Idle, 0, MSG_CH0_00A0) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_Gooma, ANIM_Gooma_Talk, ANIM_Gooma_Idle, 0, MSG_CH0_00A1) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(GetCurrentPartnerID, LVar0) + IfNe(LVar0, PARTNER_GOOMBARIO) + Call(SpeakToPlayer, NPC_Gooma, ANIM_Gooma_Talk, ANIM_Gooma_Idle, 0, MSG_CH0_00A2) + Else + Call(SpeakToPlayer, NPC_Gooma, ANIM_Gooma_Talk, ANIM_Gooma_Idle, 0, MSG_CH0_00A3) + EndIf + CaseGe(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(GetCurrentPartnerID, LVar0) + IfNe(LVar0, PARTNER_GOOMBARIO) + Call(SpeakToPlayer, NPC_Gooma, ANIM_Gooma_Talk, ANIM_Gooma_Idle, 0, MSG_CH0_00A4) + Else + Call(SpeakToPlayer, NPC_Gooma, ANIM_Gooma_Talk, ANIM_Gooma_Idle, 0, MSG_CH0_00A5) + EndIf + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Gooma) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Gooma))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Gooma))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Gooma))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Gooma))) + Return + End }; #define KAMMY_NPC NPC_Kammy #include "world/common/util/GetKammyBroomEmitterPos.inc.c" EvtScript N(EVS_NpcAux_Kammy) = { - EVT_CALL(GetNpcPos, NPC_Kammy, LVar6, LVar7, LVar8) - EVT_LABEL(0) - EVT_CALL(N(GetKammyBroomEmitterPos)) - EVT_CALL(GetNpcPos, NPC_Kammy, LVar9, LVarA, LVarB) - EVT_SET(LVar3, LVar9) - EVT_SET(LVar4, LVarA) - EVT_SET(LVar5, LVarB) - EVT_SUBF(LVar3, LVar6) - EVT_SUBF(LVar4, LVar7) - EVT_SUBF(LVar5, LVar8) - EVT_SETF(LVar6, LVar9) - EVT_SETF(LVar7, LVarA) - EVT_SETF(LVar8, LVarB) - EVT_IF_NE(LVar3, 0) - EVT_IF_NE(LVar5, 0) - EVT_PLAY_EFFECT(EFFECT_PURPLE_RING, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_END_IF - EVT_WAIT(3) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_Kammy, LVar6, LVar7, LVar8) + Label(0) + Call(N(GetKammyBroomEmitterPos)) + Call(GetNpcPos, NPC_Kammy, LVar9, LVarA, LVarB) + Set(LVar3, LVar9) + Set(LVar4, LVarA) + Set(LVar5, LVarB) + SubF(LVar3, LVar6) + SubF(LVar4, LVar7) + SubF(LVar5, LVar8) + SetF(LVar6, LVar9) + SetF(LVar7, LVarA) + SetF(LVar8, LVarB) + IfNe(LVar3, 0) + IfNe(LVar5, 0) + PlayEffect(EFFECT_PURPLE_RING, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.0)) + EndIf + EndIf + Wait(3) + Goto(0) + Return + End }; s32 N(KammyHoverOffsets)[] = { @@ -1300,31 +1300,31 @@ s32 N(KammyHoverOffsets)[] = { }; EvtScript N(EVS_NpcIdle_Kammy) = { - EVT_LABEL(0) - EVT_USE_BUF(EVT_PTR(N(KammyHoverOffsets))) - EVT_LOOP(ARRAY_COUNT(N(KammyHoverOffsets))) - EVT_BUF_READ1(LVar1) - EVT_CALL(GetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) - EVT_ADD(LVar3, LVar1) - EVT_CALL(SetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) - EVT_WAIT(3) - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + UseBuf(Ref(N(KammyHoverOffsets))) + Loop(ARRAY_COUNT(N(KammyHoverOffsets))) + BufRead1(LVar1) + Call(GetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) + Add(LVar3, LVar1) + Call(SetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) + Wait(3) + EndLoop + Goto(0) + Return + End }; EvtScript N(EVS_NpcInit_Kammy) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Kammy))) - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_Kammy))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Kammy))) + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_Kammy))) + Return + End }; EvtScript N(EVS_NpcInteract_Toad) = { - EVT_CALL(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH0_0012) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH0_0012) + Return + End }; #include "world/common/todo/SyncStatusBar.inc.c" @@ -1421,237 +1421,237 @@ API_CALLABLE(N(func_80242F28_8B2F98)) { } EvtScript N(EVS_Scene_EldstarsPlea) = { - EVT_CALL(FadeOutMusic, 0, 500) - EVT_CALL(SetNpcFlagBits, NPC_Goombario, NPC_FLAG_HIDING, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Goombaria, NPC_FLAG_HIDING, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Goompapa, NPC_FLAG_HIDING, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Goomama, NPC_FLAG_HIDING, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Goompa, NPC_FLAG_HIDING, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Gooma, NPC_FLAG_HIDING, TRUE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(-375.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(20.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(N(func_80242BA8_8B2C18)) - EVT_CALL(N(func_8024295C_8B29CC), 0, 0, 0, 255, 0) - EVT_CALL(N(func_80242F08_8B2F78)) - EVT_CALL(N(func_80242BC0_8B2C30), 30, 30, 30, 0, 0, 0, 0) - EVT_CALL(SetGroupVisibility, MODEL_Root, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_kinopi, MODEL_GROUP_VISIBLE) - EVT_CALL(EnableModel, MODEL_o561, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(FullyRestoreHPandFP) - EVT_CALL(N(SyncStatusBar)) - EVT_CALL(InterpPlayerYaw, 143, 0) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_LayingDown) - EVT_CALL(GetPlayerPos, -220, 33, -342) - EVT_WAIT(90 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Eldstar_02, SOUND_STAR_SPIRIT_APPEAR_A, SOUND_SPACE_DEFAULT) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, -198, 115, -272, 10) - EVT_CALL(SetNpcPos, NPC_Eldstar_02, -198, 140, -272) - EVT_SET(MV_Unk_01, 120) - EVT_SETF(MV_Unk_00, 0) - EVT_CALL(BindNpcAI, NPC_Eldstar_02, EVT_PTR(N(EVS_NpcAI_Eldstar_02))) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 120, 80 * DT, EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcImgFXParams, NPC_Eldstar_02, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 0, 2880, 80 * DT, EASING_QUADRATIC_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Eldstar_02, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 140, 60, 80 * DT, EASING_QUADRATIC_OUT) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, NPC_Eldstar_02, -198, LVar0, -272) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(100 * DT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(-250.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(30.0), EVT_FLOAT(-22.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(-160.0), EVT_FLOAT(-310.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Eldstar_02, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 0, MSG_CH0_0009) - EVT_CALL(MakeLerp, 120, 60, 20 * DT, EASING_LINEAR) - EVT_LABEL(5) - EVT_CALL(UpdateLerp) - EVT_SET(MV_Unk_01, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(5) - EVT_END_IF - EVT_SETF(MV_Unk_00, 50) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(-375.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(20.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(-190.0), EVT_FLOAT(-310.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_CALL(MakeLerp, 60, 0, 40 * DT, EASING_LINEAR) - EVT_LABEL(6) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcImgFXParams, NPC_Eldstar_02, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(6) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(BindNpcAI, NPC_Eldstar_02, EVT_PTR(N(EVS_NpcAI_Eldstar_02_NoAI))) - EVT_CALL(GetNpcPos, NPC_Eldstar_02, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_WAIT(15 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Eldstar_02, SOUND_STAR_SPIRIT_APPEAR_A, SOUND_SPACE_DEFAULT) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 10) - EVT_CALL(SetNpcPos, NPC_Eldstar_02, NPC_DISPOSE_LOCATION) - EVT_WAIT(60 * DT) - EVT_EXEC(N(EVS_FadeOutMusic)) - EVT_THREAD - EVT_CALL(N(func_80242F08_8B2F78)) - EVT_CALL(N(func_80242BC0_8B2C30), 255, 255, 255, 0, 0, 0, 50 * DT) - EVT_END_THREAD - EVT_WAIT(110 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SitIdle) - EVT_WAIT(30 * DT) - EVT_CALL(SetGroupVisibility, MODEL_Root, MODEL_GROUP_VISIBLE) - EVT_CALL(N(func_80242F28_8B2F98)) - EVT_CALL(EnableModel, MODEL_o561, FALSE) - EVT_CALL(EnableGroup, MODEL_2, FALSE) - EVT_CALL(EnableGroup, MODEL_4, FALSE) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(PlayerJump, -180, 19, -335, 10) - EVT_CALL(InterpPlayerYaw, 143, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_WAIT(20 * DT) - EVT_CALL(InterpPlayerYaw, 143, 3) - EVT_WAIT(10 * DT) - EVT_CALL(InterpPlayerYaw, 323, 3) - EVT_WAIT(10 * DT) - EVT_CALL(InterpPlayerYaw, 143, 3) - EVT_WAIT(10 * DT) - EVT_CALL(InterpPlayerYaw, 323, 3) - EVT_WAIT(10 * DT) - EVT_CALL(InterpPlayerYaw, 143, 3) - EVT_WAIT(10 * DT) - EVT_CALL(InterpPlayerYaw, 323, 3) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_CALL(SetNpcPos, NPC_Toad, -197, 39, -188) - EVT_CALL(SetNpcAnimation, NPC_Toad, ANIM_Toad_Red_Walk) - EVT_CALL(SetNpcFlagBits, NPC_Toad, NPC_FLAG_GRAVITY, TRUE) - EVT_THREAD - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilit7, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 90, 10 * DT, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o275, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_WAIT(10 * DT) - EVT_CALL(MakeLerp, 90, 0, 10 * DT, EASING_LINEAR) - EVT_LABEL(11) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o275, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(11) - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilit7, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_CALL(NpcMoveTo, NPC_Toad, -192, -230, 20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH0_000A) - EVT_WAIT(5 * DT) - EVT_CALL(NpcMoveTo, NPC_Toad, -160, -310, 33 * DT) - EVT_CALL(SetNpcAnimation, NPC_Toad, ANIM_Toad_Red_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH0_000B) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH0_000C) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_JoltAwake) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH0_000D) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Thinking) - EVT_WAIT(20 * DT) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4.0), 0, EVT_FLOAT(-300.0), EVT_FLOAT(20.0), EVT_FLOAT(-10.0)) - EVT_WAIT(15 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, 0, EMOTE_EXCLAMATION, 0, 30, EMOTER_PLAYER, 0, 0, 0, 0) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Surprise) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(40 * DT) - EVT_CALL(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH0_000E) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH0_000F) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Question) - EVT_WAIT(20 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, 0, EMOTE_QUESTION, 0, 60, EMOTER_PLAYER, 0, 0, 0, 0) - EVT_WAIT(55 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH0_0010) - EVT_WAIT(15 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Thinking) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH0_0011) - EVT_WAIT(5 * DT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(-375.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(20.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Jump) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(2.0)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(PlayerJump, LVar0, LVar1, LVar2, 10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(BindNpcInteract, NPC_Toad, EVT_PTR(N(EVS_NpcInteract_Toad))) - EVT_SET(GB_StoryProgress, STORY_CH0_MET_INNKEEPER) - EVT_WAIT(1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(FadeOutMusic, 0, 500) + Call(SetNpcFlagBits, NPC_Goombario, NPC_FLAG_HIDING, TRUE) + Call(SetNpcFlagBits, NPC_Goombaria, NPC_FLAG_HIDING, TRUE) + Call(SetNpcFlagBits, NPC_Goompapa, NPC_FLAG_HIDING, TRUE) + Call(SetNpcFlagBits, NPC_Goomama, NPC_FLAG_HIDING, TRUE) + Call(SetNpcFlagBits, NPC_Goompa, NPC_FLAG_HIDING, TRUE) + Call(SetNpcFlagBits, NPC_Gooma, NPC_FLAG_HIDING, TRUE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(-375.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(20.0), Float(-9.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(N(func_80242BA8_8B2C18)) + Call(N(func_8024295C_8B29CC), 0, 0, 0, 255, 0) + Call(N(func_80242F08_8B2F78)) + Call(N(func_80242BC0_8B2C30), 30, 30, 30, 0, 0, 0, 0) + Call(SetGroupVisibility, MODEL_Root, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_kinopi, MODEL_GROUP_VISIBLE) + Call(EnableModel, MODEL_o561, FALSE) + Call(DisablePlayerInput, TRUE) + Call(FullyRestoreHPandFP) + Call(N(SyncStatusBar)) + Call(InterpPlayerYaw, 143, 0) + Call(SetPlayerAnimation, ANIM_MarioW2_LayingDown) + Call(GetPlayerPos, -220, 33, -342) + Wait(90 * DT) + Call(PlaySoundAtNpc, NPC_Eldstar_02, SOUND_STAR_SPIRIT_APPEAR_A, SOUND_SPACE_DEFAULT) + PlayEffect(EFFECT_SPARKLES, 0, -198, 115, -272, 10) + Call(SetNpcPos, NPC_Eldstar_02, -198, 140, -272) + Set(MV_Unk_01, 120) + SetF(MV_Unk_00, 0) + Call(BindNpcAI, NPC_Eldstar_02, Ref(N(EVS_NpcAI_Eldstar_02))) + Thread + Call(MakeLerp, 0, 120, 80 * DT, EASING_LINEAR) + Label(0) + Call(UpdateLerp) + Call(SetNpcImgFXParams, NPC_Eldstar_02, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + EndThread + Thread + Call(MakeLerp, 0, 2880, 80 * DT, EASING_QUADRATIC_OUT) + Label(1) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Eldstar_02, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + EndThread + Thread + Call(MakeLerp, 140, 60, 80 * DT, EASING_QUADRATIC_OUT) + Label(2) + Call(UpdateLerp) + Call(SetNpcPos, NPC_Eldstar_02, -198, LVar0, -272) + Wait(1) + IfEq(LVar1, 1) + Goto(2) + EndIf + EndThread + Wait(100 * DT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(-250.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(30.0), Float(-22.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(-160.0), Float(-310.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Eldstar_02, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 0, MSG_CH0_0009) + Call(MakeLerp, 120, 60, 20 * DT, EASING_LINEAR) + Label(5) + Call(UpdateLerp) + Set(MV_Unk_01, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(5) + EndIf + SetF(MV_Unk_00, 50) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(-375.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(20.0), Float(-9.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(-190.0), Float(-310.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Thread + Call(MakeLerp, 60, 0, 40 * DT, EASING_LINEAR) + Label(6) + Call(UpdateLerp) + Call(SetNpcImgFXParams, NPC_Eldstar_02, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(6) + EndIf + EndThread + Call(BindNpcAI, NPC_Eldstar_02, Ref(N(EVS_NpcAI_Eldstar_02_NoAI))) + Call(GetNpcPos, NPC_Eldstar_02, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Wait(15 * DT) + Call(PlaySoundAtNpc, NPC_Eldstar_02, SOUND_STAR_SPIRIT_APPEAR_A, SOUND_SPACE_DEFAULT) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 10) + Call(SetNpcPos, NPC_Eldstar_02, NPC_DISPOSE_LOCATION) + Wait(60 * DT) + Exec(N(EVS_FadeOutMusic)) + Thread + Call(N(func_80242F08_8B2F78)) + Call(N(func_80242BC0_8B2C30), 255, 255, 255, 0, 0, 0, 50 * DT) + EndThread + Wait(110 * DT) + Call(SetPlayerAnimation, ANIM_MarioW2_SitIdle) + Wait(30 * DT) + Call(SetGroupVisibility, MODEL_Root, MODEL_GROUP_VISIBLE) + Call(N(func_80242F28_8B2F98)) + Call(EnableModel, MODEL_o561, FALSE) + Call(EnableGroup, MODEL_2, FALSE) + Call(EnableGroup, MODEL_4, FALSE) + Call(SetPlayerJumpscale, Float(1.0)) + Call(PlayerJump, -180, 19, -335, 10) + Call(InterpPlayerYaw, 143, 0) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Wait(20 * DT) + Call(InterpPlayerYaw, 143, 3) + Wait(10 * DT) + Call(InterpPlayerYaw, 323, 3) + Wait(10 * DT) + Call(InterpPlayerYaw, 143, 3) + Wait(10 * DT) + Call(InterpPlayerYaw, 323, 3) + Wait(10 * DT) + Call(InterpPlayerYaw, 143, 3) + Wait(10 * DT) + Call(InterpPlayerYaw, 323, 3) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Call(SetNpcPos, NPC_Toad, -197, 39, -188) + Call(SetNpcAnimation, NPC_Toad, ANIM_Toad_Red_Walk) + Call(SetNpcFlagBits, NPC_Toad, NPC_FLAG_GRAVITY, TRUE) + Thread + Call(PlaySoundAtCollider, COLLIDER_deilit7, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 90, 10 * DT, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(RotateModel, MODEL_o275, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Wait(10 * DT) + Call(MakeLerp, 90, 0, 10 * DT, EASING_LINEAR) + Label(11) + Call(UpdateLerp) + Call(RotateModel, MODEL_o275, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(11) + EndIf + Call(PlaySoundAtCollider, COLLIDER_deilit7, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + EndThread + Call(NpcMoveTo, NPC_Toad, -192, -230, 20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH0_000A) + Wait(5 * DT) + Call(NpcMoveTo, NPC_Toad, -160, -310, 33 * DT) + Call(SetNpcAnimation, NPC_Toad, ANIM_Toad_Red_Idle) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH0_000B) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH0_000C) + Call(SetPlayerAnimation, ANIM_MarioW2_JoltAwake) + Wait(30 * DT) + Call(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH0_000D) + Call(SetPlayerAnimation, ANIM_Mario1_Thinking) + Wait(20 * DT) + Call(AdjustCam, CAM_DEFAULT, Float(4.0), 0, Float(-300.0), Float(20.0), Float(-10.0)) + Wait(15 * DT) + Call(PlaySoundAtPlayer, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, 0, EMOTE_EXCLAMATION, 0, 30, EMOTER_PLAYER, 0, 0, 0, 0) + Call(SetPlayerAnimation, ANIM_MarioW2_Surprise) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(40 * DT) + Call(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH0_000E) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH0_000F) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Question) + Wait(20 * DT) + Call(PlaySoundAtPlayer, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) + Call(ShowEmote, 0, EMOTE_QUESTION, 0, 60, EMOTER_PLAYER, 0, 0, 0, 0) + Wait(55 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH0_0010) + Wait(15 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Thinking) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH0_0011) + Wait(5 * DT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(-375.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(20.0), Float(-9.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetPlayerAnimation, ANIM_Mario1_Jump) + Call(SetPlayerJumpscale, Float(2.0)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(PlayerJump, LVar0, LVar1, LVar2, 10 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(BindNpcInteract, NPC_Toad, Ref(N(EVS_NpcInteract_Toad))) + Set(GB_StoryProgress, STORY_CH0_MET_INNKEEPER) + Wait(1) + Call(DisablePlayerInput, FALSE) + Return + End }; s16 N(D_8024E538_8BE5A8)[] = { @@ -1678,67 +1678,67 @@ API_CALLABLE(N(func_80242F7C_8B2FEC)) { } EvtScript N(EVS_NpcAI_Eldstar_02_NoAI) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcAI_Eldstar_02) = { - EVT_THREAD - EVT_CALL(N(func_80242F7C_8B2FEC)) - EVT_END_THREAD - EVT_CALL(RandInt, 100, LVar0) - EVT_ADD(LVar0, 1) - EVT_WAIT(LVar0) - EVT_MALLOC_ARRAY(1, LVarA) - EVT_USE_ARRAY(LVarA) - EVT_THREAD - EVT_USE_ARRAY(LVarA) - EVT_LABEL(0) - EVT_CALL(RandInt, 30, LVar0) - EVT_ADD(LVar0, 30) - EVT_SETF(ArrayVar(0), EVT_FLOAT(10.0)) - EVT_WAIT(LVar0) - EVT_CALL(RandInt, 100, LVar1) - EVT_IF_LT(LVar1, 80) - EVT_SET(LVar1, 1) - EVT_ELSE - EVT_SET(LVar1, 2) - EVT_END_IF - EVT_LOOP(LVar1) - EVT_SETF(ArrayVar(0), EVT_FLOAT(90.0)) - EVT_ADDF(ArrayVar(0), MV_Unk_00) - EVT_WAIT(1) - EVT_SETF(ArrayVar(0), EVT_FLOAT(100.0)) - EVT_ADDF(ArrayVar(0), MV_Unk_00) - EVT_WAIT(1) - EVT_SETF(ArrayVar(0), EVT_FLOAT(130.0)) - EVT_ADDF(ArrayVar(0), MV_Unk_00) - EVT_WAIT(1) - EVT_SETF(ArrayVar(0), EVT_FLOAT(120.0)) - EVT_ADDF(ArrayVar(0), MV_Unk_00) - EVT_WAIT(1) - EVT_SETF(ArrayVar(0), EVT_FLOAT(110.0)) - EVT_ADDF(ArrayVar(0), MV_Unk_00) - EVT_WAIT(1) - EVT_SETF(ArrayVar(0), EVT_FLOAT(100.0)) - EVT_ADDF(ArrayVar(0), MV_Unk_00) - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(0) - EVT_END_THREAD - EVT_SETF(LVar0, EVT_FLOAT(100.0)) - EVT_LABEL(1) - EVT_LOOP(50) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, ArrayVar(0), 0, MV_Unk_01) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(50) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, ArrayVar(0), 0, MV_Unk_01) - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(1) - EVT_RETURN - EVT_END + Thread + Call(N(func_80242F7C_8B2FEC)) + EndThread + Call(RandInt, 100, LVar0) + Add(LVar0, 1) + Wait(LVar0) + MallocArray(1, LVarA) + UseArray(LVarA) + Thread + UseArray(LVarA) + Label(0) + Call(RandInt, 30, LVar0) + Add(LVar0, 30) + SetF(ArrayVar(0), Float(10.0)) + Wait(LVar0) + Call(RandInt, 100, LVar1) + IfLt(LVar1, 80) + Set(LVar1, 1) + Else + Set(LVar1, 2) + EndIf + Loop(LVar1) + SetF(ArrayVar(0), Float(90.0)) + AddF(ArrayVar(0), MV_Unk_00) + Wait(1) + SetF(ArrayVar(0), Float(100.0)) + AddF(ArrayVar(0), MV_Unk_00) + Wait(1) + SetF(ArrayVar(0), Float(130.0)) + AddF(ArrayVar(0), MV_Unk_00) + Wait(1) + SetF(ArrayVar(0), Float(120.0)) + AddF(ArrayVar(0), MV_Unk_00) + Wait(1) + SetF(ArrayVar(0), Float(110.0)) + AddF(ArrayVar(0), MV_Unk_00) + Wait(1) + SetF(ArrayVar(0), Float(100.0)) + AddF(ArrayVar(0), MV_Unk_00) + Wait(1) + EndLoop + Goto(0) + EndThread + SetF(LVar0, Float(100.0)) + Label(1) + Loop(50) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, ArrayVar(0), 0, MV_Unk_01) + Wait(1) + EndLoop + Loop(50) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_HOLOGRAM, IMGFX_HOLOGRAM_NOISE, ArrayVar(0), 0, MV_Unk_01) + Wait(1) + EndLoop + Goto(1) + Return + End }; NpcData N(NpcData_GoombaFamily)[] = { @@ -1883,9 +1883,9 @@ NpcData N(NpcData_Goomama) = { }; EvtScript N(EVS_NpcInit_Toad) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ToadHouse))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ToadHouse))) + Return + End }; NpcData N(NpcData_Toad) = { @@ -1960,29 +1960,29 @@ NpcData N(NpcData_ChuckQuizmo) = { }; EvtScript N(EVS_NpcInit_Eldstar_01) = { - EVT_IF_NE(GB_StoryProgress, STORY_CH0_WAKE_UP) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kmr_02_ENTRY_5) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_Scene_EldstarsPlea))) - EVT_CALL(SetNpcFlagBits, NPC_Toad, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcPos, NPC_Toad, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + IfNe(GB_StoryProgress, STORY_CH0_WAKE_UP) + Return + EndIf + Call(GetEntryID, LVar0) + IfEq(LVar0, kmr_02_ENTRY_5) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_Scene_EldstarsPlea))) + Call(SetNpcFlagBits, NPC_Toad, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcPos, NPC_Toad, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Eldstar_02) = { - EVT_IF_NE(GB_StoryProgress, STORY_CH0_WAKE_UP) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kmr_02_ENTRY_5) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Eldstar_02_NoAI))) - EVT_END_IF - EVT_RETURN - EVT_END + IfNe(GB_StoryProgress, STORY_CH0_WAKE_UP) + Return + EndIf + Call(GetEntryID, LVar0) + IfEq(LVar0, kmr_02_ENTRY_5) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcAI_Eldstar_02_NoAI))) + EndIf + Return + End }; AnimID N(ExtraAnims_Eldstar)[] = { @@ -2018,58 +2018,58 @@ NpcData N(NpcData_Eldstar_Prologue)[] = { }; EvtScript N(EVS_Goombario_JumpAround) = { - EVT_CALL(SetNpcAnimation, NPC_Goombario, ANIM_WorldGoombario_Jump) - EVT_CALL(SetNpcJumpscale, NPC_Goombario, EVT_FLOAT(2.0)) - EVT_CALL(GetNpcPos, NPC_Goombario, LVarA, LVarB, LVarC) - EVT_CALL(NpcJump0, NPC_Goombario, LVarA, LVarB, LVarC, 5) - EVT_CALL(SetNpcSpeed, NPC_Goombario, EVT_FLOAT(3.0)) - EVT_CALL(SetNpcAnimation, NPC_Goombario, ANIM_WorldGoombario_Run) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_Goombario, ANIM_WorldGoombario_Jump) + Call(SetNpcJumpscale, NPC_Goombario, Float(2.0)) + Call(GetNpcPos, NPC_Goombario, LVarA, LVarB, LVarC) + Call(NpcJump0, NPC_Goombario, LVarA, LVarB, LVarC, 5) + Call(SetNpcSpeed, NPC_Goombario, Float(3.0)) + Call(SetNpcAnimation, NPC_Goombario, ANIM_WorldGoombario_Run) + Return + End }; EvtScript N(EVS_Goombaria_JumpAround) = { - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Jump) - EVT_CALL(SetNpcJumpscale, NPC_Goombaria, EVT_FLOAT(2.0)) - EVT_CALL(GetNpcPos, NPC_Goombaria, LVarA, LVarB, LVarC) - EVT_CALL(NpcJump0, NPC_Goombaria, LVarA, LVarB, LVarC, 5) - EVT_CALL(SetNpcSpeed, NPC_Goombaria, EVT_FLOAT(3.0)) - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Run) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Jump) + Call(SetNpcJumpscale, NPC_Goombaria, Float(2.0)) + Call(GetNpcPos, NPC_Goombaria, LVarA, LVarB, LVarC) + Call(NpcJump0, NPC_Goombaria, LVarA, LVarB, LVarC, 5) + Call(SetNpcSpeed, NPC_Goombaria, Float(3.0)) + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Run) + Return + End }; EvtScript N(EVS_Goombario_RunAround) = { - EVT_CALL(SetNpcAnimation, NPC_Goombario, ANIM_WorldGoombario_Run) - EVT_CALL(SetNpcSpeed, NPC_Goombario, EVT_FLOAT(3.0)) - EVT_CALL(NpcMoveTo, NPC_Goombario, 11, 63, 0) - EVT_CALL(NpcMoveTo, NPC_Goombario, -42, 17, 0) - EVT_EXEC_WAIT(N(EVS_Goombario_JumpAround)) - EVT_CALL(SetNpcSpeed, NPC_Goombario, EVT_FLOAT(3.0)) - EVT_CALL(NpcMoveTo, NPC_Goombario, 11, -71, 0) - EVT_CALL(NpcMoveTo, NPC_Goombario, 117, -54, 0) - EVT_CALL(NpcMoveTo, NPC_Goombario, 151, 56, 0) - EVT_EXEC_WAIT(N(EVS_Goombario_JumpAround)) - EVT_CALL(NpcMoveTo, NPC_Goombario, 70, 51, 0) - EVT_CALL(NpcMoveTo, NPC_Goombario, 11, 63, 0) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_Goombario, ANIM_WorldGoombario_Run) + Call(SetNpcSpeed, NPC_Goombario, Float(3.0)) + Call(NpcMoveTo, NPC_Goombario, 11, 63, 0) + Call(NpcMoveTo, NPC_Goombario, -42, 17, 0) + ExecWait(N(EVS_Goombario_JumpAround)) + Call(SetNpcSpeed, NPC_Goombario, Float(3.0)) + Call(NpcMoveTo, NPC_Goombario, 11, -71, 0) + Call(NpcMoveTo, NPC_Goombario, 117, -54, 0) + Call(NpcMoveTo, NPC_Goombario, 151, 56, 0) + ExecWait(N(EVS_Goombario_JumpAround)) + Call(NpcMoveTo, NPC_Goombario, 70, 51, 0) + Call(NpcMoveTo, NPC_Goombario, 11, 63, 0) + Return + End }; EvtScript N(EVS_Goombaria_RunAround) = { - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Run) - EVT_CALL(SetNpcSpeed, NPC_Goombaria, EVT_FLOAT(3.0)) - EVT_CALL(NpcMoveTo, NPC_Goombaria, 84, 69, 0) - EVT_EXEC_WAIT(N(EVS_Goombaria_JumpAround)) - EVT_CALL(NpcMoveTo, NPC_Goombaria, 10, 48, 0) - EVT_CALL(NpcMoveTo, NPC_Goombaria, -48, -58, 0) - EVT_CALL(NpcMoveTo, NPC_Goombaria, 42, -102, 0) - EVT_EXEC_WAIT(N(EVS_Goombaria_JumpAround)) - EVT_CALL(NpcMoveTo, NPC_Goombaria, 133, -20, 0) - EVT_CALL(NpcMoveTo, NPC_Goombaria, 136, 33, 0) - EVT_CALL(NpcMoveTo, NPC_Goombaria, 84, 69, 0) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Run) + Call(SetNpcSpeed, NPC_Goombaria, Float(3.0)) + Call(NpcMoveTo, NPC_Goombaria, 84, 69, 0) + ExecWait(N(EVS_Goombaria_JumpAround)) + Call(NpcMoveTo, NPC_Goombaria, 10, 48, 0) + Call(NpcMoveTo, NPC_Goombaria, -48, -58, 0) + Call(NpcMoveTo, NPC_Goombaria, 42, -102, 0) + ExecWait(N(EVS_Goombaria_JumpAround)) + Call(NpcMoveTo, NPC_Goombaria, 133, -20, 0) + Call(NpcMoveTo, NPC_Goombaria, 136, 33, 0) + Call(NpcMoveTo, NPC_Goombaria, 84, 69, 0) + Return + End }; API_CALLABLE(N(SetInvitationLetterScale)) { @@ -2078,134 +2078,134 @@ API_CALLABLE(N(SetInvitationLetterScale)) { } EvtScript N(EVS_NpcIdle_Eldstar_Epilogue) = { - EVT_EXEC(N(EVS_Goombaria_RunAround)) - EVT_EXEC_WAIT(N(EVS_Goombario_RunAround)) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Idle) - EVT_CALL(SetNpcAnimation, NPC_Goombario, ANIM_WorldGoombario_Idle) - EVT_CALL(SetNpcSpeed, NPC_Parakarry, EVT_FLOAT(3.0)) - EVT_CALL(SetNpcPos, NPC_Parakarry, 210, 115, 70) - EVT_CALL(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 5, MSG_Outro_000F) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_Goombaria, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_Goombaria, EMOTE_EXCLAMATION, 0, 30, EMOTER_NPC, 0, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_Goombario, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_Goombario, EMOTE_EXCLAMATION, 0, 30, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(10) - EVT_CALL(InterpNpcYaw, NPC_Goombario, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_Goombaria, 90, 0) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Walk) - EVT_CALL(NpcFlyTo, NPC_Parakarry, 46, 15, 66, 50, 0, EASING_LINEAR) - EVT_CALL(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Idle) - EVT_CALL(InterpNpcYaw, NPC_Goombaria, 270, 0) - EVT_THREAD - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 46, 0, 10) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 46, 0, 10) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(-300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-6.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_WAIT(30) - EVT_CALL(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 5, MSG_Outro_0010) - EVT_CALL(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 5, MSG_Outro_0011) - EVT_THREAD - EVT_CALL(DropResizableItemEntity, ITEM_LETTER_TO_KOLORADO, NPC_DISPOSE_LOCATION, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_CALL(N(SetInvitationLetterScale)) - EVT_LOOP(20) - EVT_CALL(GetNpcPos, NPC_Parakarry, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, -12) - EVT_ADD(LVar2, 4) - EVT_ADD(LVar3, 5) - EVT_CALL(SetItemPos, LVar0, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(35) - EVT_CALL(RemoveItemEntity, LVar0) - EVT_END_THREAD - EVT_CALL(NpcMoveTo, NPC_Parakarry, 30, 66, 20) - EVT_WAIT(35) - EVT_CALL(NpcMoveTo, NPC_Parakarry, 46, 66, 20) - EVT_CALL(SetNpcYaw, NPC_Parakarry, 270) - EVT_CALL(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 5, MSG_Outro_0012) - EVT_CALL(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 5, MSG_Outro_0013) - EVT_CALL(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Walk) - EVT_CALL(SetNpcSpeed, NPC_Parakarry, EVT_FLOAT(3.0)) - EVT_CALL(NpcFlyTo, NPC_Parakarry, 210, 115, 70, 50, 0, EASING_LINEAR) - EVT_CALL(SetNpcPos, NPC_Parakarry, NPC_DISPOSE_LOCATION) - EVT_CALL(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 5, MSG_Outro_0014) - EVT_THREAD - EVT_CALL(MakeLerp, 460, 310, 25, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar0, LVar0) - EVT_DIVF(LVar0, 10) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, 0, 10) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, 0, 10) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(-300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-6.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Goombario, ANIM_WorldGoombario_Read) - EVT_END_THREAD - EVT_CALL(SetNpcSpeed, NPC_Goombaria, EVT_FLOAT(1.0)) - EVT_CALL(NpcMoveTo, NPC_Goombaria, 46, 66, 0) - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 5, MSG_Outro_0015) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Read, ANIM_WorldGoombario_Read, 5, MSG_Outro_0016) - EVT_WAIT(20) - EVT_CALL(FadeOutMusic, 0, 1000) - EVT_CALL(GotoMap, EVT_PTR("nok_02"), nok_02_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Exec(N(EVS_Goombaria_RunAround)) + ExecWait(N(EVS_Goombario_RunAround)) + Wait(5) + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Idle) + Call(SetNpcAnimation, NPC_Goombario, ANIM_WorldGoombario_Idle) + Call(SetNpcSpeed, NPC_Parakarry, Float(3.0)) + Call(SetNpcPos, NPC_Parakarry, 210, 115, 70) + Call(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 5, MSG_Outro_000F) + Wait(10) + Thread + Call(PlaySoundAtNpc, NPC_Goombaria, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_Goombaria, EMOTE_EXCLAMATION, 0, 30, EMOTER_NPC, 0, 0, 0, 0) + EndThread + Call(PlaySoundAtNpc, NPC_Goombario, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_Goombario, EMOTE_EXCLAMATION, 0, 30, EMOTER_NPC, 0, 0, 0, 0) + Wait(10) + Call(InterpNpcYaw, NPC_Goombario, 90, 0) + Call(InterpNpcYaw, NPC_Goombaria, 90, 0) + Wait(20) + Call(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Walk) + Call(NpcFlyTo, NPC_Parakarry, 46, 15, 66, 50, 0, EASING_LINEAR) + Call(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Idle) + Call(InterpNpcYaw, NPC_Goombaria, 270, 0) + Thread + Call(UseSettingsFrom, CAM_DEFAULT, 46, 0, 10) + Call(SetPanTarget, CAM_DEFAULT, 46, 0, 10) + Call(SetCamDistance, CAM_DEFAULT, Float(-300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-6.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Wait(30) + Call(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 5, MSG_Outro_0010) + Call(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 5, MSG_Outro_0011) + Thread + Call(DropResizableItemEntity, ITEM_LETTER_TO_KOLORADO, NPC_DISPOSE_LOCATION, ITEM_SPAWN_MODE_DECORATION, 0) + Call(N(SetInvitationLetterScale)) + Loop(20) + Call(GetNpcPos, NPC_Parakarry, LVar1, LVar2, LVar3) + Add(LVar1, -12) + Add(LVar2, 4) + Add(LVar3, 5) + Call(SetItemPos, LVar0, LVar1, LVar2, LVar3) + Wait(1) + EndLoop + Wait(35) + Call(RemoveItemEntity, LVar0) + EndThread + Call(NpcMoveTo, NPC_Parakarry, 30, 66, 20) + Wait(35) + Call(NpcMoveTo, NPC_Parakarry, 46, 66, 20) + Call(SetNpcYaw, NPC_Parakarry, 270) + Call(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 5, MSG_Outro_0012) + Call(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 5, MSG_Outro_0013) + Call(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Walk) + Call(SetNpcSpeed, NPC_Parakarry, Float(3.0)) + Call(NpcFlyTo, NPC_Parakarry, 210, 115, 70, 50, 0, EASING_LINEAR) + Call(SetNpcPos, NPC_Parakarry, NPC_DISPOSE_LOCATION) + Call(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 5, MSG_Outro_0014) + Thread + Call(MakeLerp, 460, 310, 25, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + SetF(LVar0, LVar0) + DivF(LVar0, 10) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, 0, 10) + Call(SetPanTarget, CAM_DEFAULT, LVar0, 0, 10) + Call(SetCamDistance, CAM_DEFAULT, Float(-300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-6.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + EndThread + Thread + Wait(10) + Call(SetNpcAnimation, NPC_Goombario, ANIM_WorldGoombario_Read) + EndThread + Call(SetNpcSpeed, NPC_Goombaria, Float(1.0)) + Call(NpcMoveTo, NPC_Goombaria, 46, 66, 0) + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 5, MSG_Outro_0015) + Wait(10) + Call(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Read, ANIM_WorldGoombario_Read, 5, MSG_Outro_0016) + Wait(20) + Call(FadeOutMusic, 0, 1000) + Call(GotoMap, Ref("nok_02"), nok_02_ENTRY_3) + Wait(100) + Return + End }; EvtScript N(EVS_NpcInit_Eldstar_Epilogue) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 60, 0, 10) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 60, 0, 10) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetNpcPos, NPC_Goombario, 11, 0, 63) - EVT_CALL(SetNpcPos, NPC_Goombaria, 84, 0, 69) - EVT_CALL(SetNpcPos, NPC_Parakarry, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_Goombario, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Goombaria, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Parakarry, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Goombario, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Goombaria, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Parakarry, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerPos, NPC_DISPOSE_LOCATION) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Eldstar_Epilogue))) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, 60, 0, 10) + Call(SetPanTarget, CAM_DEFAULT, 60, 0, 10) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetNpcPos, NPC_Goombario, 11, 0, 63) + Call(SetNpcPos, NPC_Goombaria, 84, 0, 69) + Call(SetNpcPos, NPC_Parakarry, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_Goombario, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Goombaria, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Parakarry, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Goombario, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_Goombaria, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_Parakarry, NPC_FLAG_GRAVITY, FALSE) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerPos, NPC_DISPOSE_LOCATION) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Eldstar_Epilogue))) + Return + End }; EvtScript N(EVS_NpcInit_Goombario_Epilogue) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInit_Goombaria_Epilogue) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInit_Parakarry_Epilogue) = { - EVT_RETURN - EVT_END + Return + End }; NpcData N(NpcData_Epilogue)[] = { diff --git a/src/world/area_kmr/kmr_02/kmr_02_4_rooms_1.c b/src/world/area_kmr/kmr_02/kmr_02_4_rooms_1.c index b9003e49da7..4f72835768f 100644 --- a/src/world/area_kmr/kmr_02/kmr_02_4_rooms_1.c +++ b/src/world/area_kmr/kmr_02/kmr_02_4_rooms_1.c @@ -6,195 +6,195 @@ #define NAME_SUFFIX EvtScript N(EVS_SetDoorRot_House) = { - EVT_CALL(RotateModel, MODEL_syoumen_enter, LVar0, 0, 1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_syoumen_enter, LVar0, 0, 1, 0) + Return + End }; EvtScript N(EVS_DropDoor_House) = { - EVT_CALL(RotateModel, MODEL_syoumen_enter, LVar0, EVT_FLOAT(54.56), 0, EVT_FLOAT(31.5)) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_syoumen_enter, LVar0, Float(54.56), 0, Float(31.5)) + Return + End }; EvtScript N(EVS_SetWallRot_House) = { - EVT_CALL(RotateModel, MODEL_door_ki, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o122, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o123, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o121, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o137, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o140, LVar0, -1, 0, 0) - EVT_IF_EQ(LVar0, 90) - EVT_CALL(EnableModel, MODEL_door_ki, FALSE) - EVT_CALL(EnableModel, MODEL_o122, FALSE) - EVT_CALL(EnableModel, MODEL_o123, FALSE) - EVT_CALL(EnableModel, MODEL_o121, FALSE) - EVT_CALL(EnableModel, MODEL_o137, FALSE) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_door_ki, TRUE) - EVT_CALL(EnableModel, MODEL_o122, TRUE) - EVT_CALL(EnableModel, MODEL_o123, TRUE) - EVT_CALL(EnableModel, MODEL_o121, TRUE) - EVT_CALL(EnableModel, MODEL_o137, TRUE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_door_ki, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o122, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o123, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o121, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o137, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o140, LVar0, -1, 0, 0) + IfEq(LVar0, 90) + Call(EnableModel, MODEL_door_ki, FALSE) + Call(EnableModel, MODEL_o122, FALSE) + Call(EnableModel, MODEL_o123, FALSE) + Call(EnableModel, MODEL_o121, FALSE) + Call(EnableModel, MODEL_o137, FALSE) + Else + Call(EnableModel, MODEL_door_ki, TRUE) + Call(EnableModel, MODEL_o122, TRUE) + Call(EnableModel, MODEL_o123, TRUE) + Call(EnableModel, MODEL_o121, TRUE) + Call(EnableModel, MODEL_o137, TRUE) + EndIf + Return + End }; EvtScript N(EVS_NpcAI_Goombario_NoAI) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcAI_Goombario) = { - EVT_EXEC_WAIT(N(EVS_NpcAI_GoombaFamily_Wander_Rooms1)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_NpcAI_GoombaFamily_Wander_Rooms1)) + Return + End }; EvtScript N(EVS_RoomListener_House) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_CALL(SetGroupVisibility, MODEL_of, MODEL_GROUP_VISIBLE) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_DONE) + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Call(SetGroupVisibility, MODEL_of, MODEL_GROUP_VISIBLE) + CaseEq(ROOM_UPDATE_ENTER_DONE) // do nothing - EVT_CASE_EQ(ROOM_UPDATE_EXIT_BEGIN) - EVT_IF_EQ(GB_StoryProgress, STORY_CH0_MET_GOOMPA) - EVT_IF_EQ(GF_KMR02_Met_Goompapa, TRUE) - EVT_IF_EQ(GF_KMR02_Goombario_RelayedMessage, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(BindNpcAI, NPC_Goombario, EVT_PTR(N(EVS_NpcAI_Goombario_NoAI))) - EVT_CALL(SetNpcPos, NPC_Goombario, -54, 0, -55) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_CALL(SetGroupVisibility, MODEL_of, MODEL_GROUP_HIDDEN) - EVT_IF_EQ(GB_StoryProgress, STORY_CH0_MET_GOOMPA) - EVT_IF_EQ(GF_KMR02_Met_Goompapa, TRUE) - EVT_IF_EQ(GF_KMR02_Goombario_RelayedMessage, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Goombario, ANIM_WorldGoombario_Walk) - EVT_CALL(NpcMoveTo, NPC_Goombario, 8, -94, 20) - EVT_CALL(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH0_0050) - EVT_CALL(BindNpcAI, NPC_Goombario, EVT_PTR(N(EVS_NpcAI_Goombario))) - EVT_SET(GF_KMR02_Goombario_RelayedMessage, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + CaseEq(ROOM_UPDATE_EXIT_BEGIN) + IfEq(GB_StoryProgress, STORY_CH0_MET_GOOMPA) + IfEq(GF_KMR02_Met_Goompapa, TRUE) + IfEq(GF_KMR02_Goombario_RelayedMessage, FALSE) + Call(DisablePlayerInput, TRUE) + Call(BindNpcAI, NPC_Goombario, Ref(N(EVS_NpcAI_Goombario_NoAI))) + Call(SetNpcPos, NPC_Goombario, -54, 0, -55) + EndIf + EndIf + EndIf + CaseEq(ROOM_UPDATE_EXIT_END) + Call(SetGroupVisibility, MODEL_of, MODEL_GROUP_HIDDEN) + IfEq(GB_StoryProgress, STORY_CH0_MET_GOOMPA) + IfEq(GF_KMR02_Met_Goompapa, TRUE) + IfEq(GF_KMR02_Goombario_RelayedMessage, FALSE) + Call(SetNpcAnimation, NPC_Goombario, ANIM_WorldGoombario_Walk) + Call(NpcMoveTo, NPC_Goombario, 8, -94, 20) + Call(SpeakToPlayer, NPC_Goombario, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH0_0050) + Call(BindNpcAI, NPC_Goombario, Ref(N(EVS_NpcAI_Goombario))) + Set(GF_KMR02_Goombario_RelayedMessage, TRUE) + Call(DisablePlayerInput, FALSE) + EndIf + EndIf + EndIf + EndSwitch + Return + End }; EvtScript N(EVS_SetDoorRot_Verdana) = { - EVT_CALL(RotateModel, MODEL_ura_exit, LVar0, 0, -1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_ura_exit, LVar0, 0, -1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_Verdana) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_RoomListener_Verdana) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_DONE) - EVT_WAIT(30 * DT) - EVT_CALL(SetGroupVisibility, MODEL_monohoshi, MODEL_GROUP_HIDDEN) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_BEGIN) - EVT_IF_GT(GB_StoryProgress, STORY_CH0_GATE_CRUSHED) - EVT_IF_LT(GB_StoryProgress, STORY_CH0_TWINK_GAVE_LUCKY_STAR) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_DangerSealed, 160, 40) - EVT_SET(LVar0, -1) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(SetGroupVisibility, MODEL_monohoshi, MODEL_GROUP_VISIBLE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 499, 0, -378) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 499, 70, -378) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 370) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_GATE_CRUSHED) - EVT_CASE_LT(STORY_CH0_FELL_OFF_CLIFF) - EVT_CALL(SetGroupVisibility, MODEL_monohoshi, MODEL_GROUP_HIDDEN) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CASE_LT(STORY_CH0_TWINK_GAVE_LUCKY_STAR) - EVT_CALL(SetGroupVisibility, MODEL_monohoshi, MODEL_GROUP_HIDDEN) - EVT_CASE_GE(STORY_CH0_TWINK_GAVE_LUCKY_STAR) - EVT_CALL(EnableModel, MODEL_o437, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o625, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_SWITCH - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_IF_GE(GB_StoryProgress, STORY_CH0_GATE_CRUSHED) - EVT_IF_LT(GB_StoryProgress, STORY_CH0_TWINK_GAVE_LUCKY_STAR) - EVT_WAIT(12) - EVT_IF_EQ(GB_StoryProgress, STORY_CH0_GATE_CRUSHED) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Thinking) - EVT_LOOP(3) - EVT_CALL(SetGroupVisibility, MODEL_monohoshi, MODEL_GROUP_VISIBLE) - EVT_WAIT(10 * DT) - EVT_CALL(SetGroupVisibility, MODEL_monohoshi, MODEL_GROUP_HIDDEN) - EVT_WAIT(10 * DT) - EVT_END_LOOP - EVT_CALL(FadeOutMusic, 0, 0) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Surprise) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(InterpPlayerYaw, 233, 1) - EVT_WAIT(10 * DT) - EVT_CALL(InterpPlayerYaw, 53, 1) - EVT_WAIT(15 * DT) - EVT_CALL(InterpPlayerYaw, 233, 1) - EVT_WAIT(3 * DT) - EVT_CALL(InterpPlayerYaw, 53, 1) - EVT_WAIT(3 * DT) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Flail) - EVT_WAIT(30 * DT) - EVT_SET(GB_StoryProgress, STORY_CH0_FELL_OFF_CLIFF) - EVT_END_IF - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_PanicStill) - EVT_WAIT(5 * DT) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 150) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtPlayer, SOUND_PLAYER_LONG_FALL, SOUND_SPACE_DEFAULT) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Panic) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_LOOP(0) - EVT_SUB(LVar1, 16 / DT) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_IF_GT(GB_StoryProgress, STORY_CH0_GATE_CRUSHED) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_LOOP(0) - EVT_SUB(LVar1, 16 / DT) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_END_IF - EVT_WAIT(20 * DT) - EVT_CALL(GotoMap, EVT_PTR("kmr_03"), kmr_03_ENTRY_2) - EVT_WAIT(100 * DT) - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + CaseEq(ROOM_UPDATE_ENTER_DONE) + Wait(30 * DT) + Call(SetGroupVisibility, MODEL_monohoshi, MODEL_GROUP_HIDDEN) + CaseEq(ROOM_UPDATE_EXIT_BEGIN) + IfGt(GB_StoryProgress, STORY_CH0_GATE_CRUSHED) + IfLt(GB_StoryProgress, STORY_CH0_TWINK_GAVE_LUCKY_STAR) + Call(ShowMessageAtScreenPos, MSG_Menus_Inspect_DangerSealed, 160, 40) + Set(LVar0, -1) + Return + EndIf + EndIf + Call(SetGroupVisibility, MODEL_monohoshi, MODEL_GROUP_VISIBLE) + Call(UseSettingsFrom, CAM_DEFAULT, 499, 0, -378) + Call(SetPanTarget, CAM_DEFAULT, 499, 70, -378) + Call(SetCamDistance, CAM_DEFAULT, 370) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_GATE_CRUSHED) + CaseLt(STORY_CH0_FELL_OFF_CLIFF) + Call(SetGroupVisibility, MODEL_monohoshi, MODEL_GROUP_HIDDEN) + Call(DisablePlayerInput, TRUE) + CaseLt(STORY_CH0_TWINK_GAVE_LUCKY_STAR) + Call(SetGroupVisibility, MODEL_monohoshi, MODEL_GROUP_HIDDEN) + CaseGe(STORY_CH0_TWINK_GAVE_LUCKY_STAR) + Call(EnableModel, MODEL_o437, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o625, COLLIDER_FLAGS_UPPER_MASK) + EndSwitch + CaseEq(ROOM_UPDATE_EXIT_END) + IfGe(GB_StoryProgress, STORY_CH0_GATE_CRUSHED) + IfLt(GB_StoryProgress, STORY_CH0_TWINK_GAVE_LUCKY_STAR) + Wait(12) + IfEq(GB_StoryProgress, STORY_CH0_GATE_CRUSHED) + Call(SetPlayerAnimation, ANIM_Mario1_Thinking) + Loop(3) + Call(SetGroupVisibility, MODEL_monohoshi, MODEL_GROUP_VISIBLE) + Wait(10 * DT) + Call(SetGroupVisibility, MODEL_monohoshi, MODEL_GROUP_HIDDEN) + Wait(10 * DT) + EndLoop + Call(FadeOutMusic, 0, 0) + Call(SetPlayerAnimation, ANIM_MarioW2_Surprise) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(InterpPlayerYaw, 233, 1) + Wait(10 * DT) + Call(InterpPlayerYaw, 53, 1) + Wait(15 * DT) + Call(InterpPlayerYaw, 233, 1) + Wait(3 * DT) + Call(InterpPlayerYaw, 53, 1) + Wait(3 * DT) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_MarioW2_Flail) + Wait(30 * DT) + Set(GB_StoryProgress, STORY_CH0_FELL_OFF_CLIFF) + EndIf + Call(SetPlayerAnimation, ANIM_MarioW2_PanicStill) + Wait(5 * DT) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + Sub(LVar1, 150) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PlaySoundAtPlayer, SOUND_PLAYER_LONG_FALL, SOUND_SPACE_DEFAULT) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Call(SetPlayerAnimation, ANIM_MarioW2_Panic) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Thread + Loop(0) + Sub(LVar1, 16 / DT) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + IfGt(GB_StoryProgress, STORY_CH0_GATE_CRUSHED) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Thread + Loop(0) + Sub(LVar1, 16 / DT) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + EndIf + Wait(20 * DT) + Call(GotoMap, Ref("kmr_03"), kmr_03_ENTRY_2) + Wait(100 * DT) + EndIf + EndIf + EndSwitch + Return + End }; MAP_RODATA_PAD(1,unk); @@ -207,32 +207,32 @@ s32 N(InsideNPCs_House)[] = { EvtScript N(EVS_SetupRooms) = { // goomba family home, main room - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_LARGE_DOOR_RIGHT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_House)), - EVT_PTR(N(EVS_SetWallRot_House)), - EVT_PTR(N(EVS_DropDoor_House)), - EVT_PTR(N(EVS_RoomListener_House)), + Ref(N(EVS_SetDoorRot_House)), + Ref(N(EVS_SetWallRot_House)), + Ref(N(EVS_DropDoor_House)), + Ref(N(EVS_RoomListener_House)), COLLIDER_deilit5, COLLIDER_deilit6, MODEL_kuribou_house, - EVT_PTR(N(InsideNPCs_House))) + Ref(N(InsideNPCs_House))) // verdana - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_LARGE_DOOR_LEFT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_Verdana)), - EVT_PTR(N(EVS_SetWallRot_Verdana)), + Ref(N(EVS_SetDoorRot_Verdana)), + Ref(N(EVS_SetWallRot_Verdana)), NULL, - EVT_PTR(N(EVS_RoomListener_Verdana)), + Ref(N(EVS_RoomListener_Verdana)), COLLIDER_deilit4, COLLIDER_deilit4_1, MODEL_kuribou_house, - EVT_PTR(N(InsideNPCs_House))) - EVT_SET(LVar0, ROOM_UPDATE_EXIT_END) - EVT_EXEC(N(EVS_RoomListener_House)) - EVT_CALL(SetGroupVisibility, MODEL_monohoshi, MODEL_GROUP_HIDDEN) - EVT_RETURN - EVT_END + Ref(N(InsideNPCs_House))) + Set(LVar0, ROOM_UPDATE_EXIT_END) + Exec(N(EVS_RoomListener_House)) + Call(SetGroupVisibility, MODEL_monohoshi, MODEL_GROUP_HIDDEN) + Return + End }; #include "world/common/complete/ToadHouseBlanketAnim.inc.c" @@ -240,71 +240,71 @@ EvtScript N(EVS_SetupRooms) = { #include "world/common/atomic/ToadHouse.data.inc.c" EvtScript N(EVS_ToadHouse_SetDialogue) = { - EVT_IF_EQ(GF_KMR02_ToadHouse_Intro, FALSE) - EVT_SET(LVar0, MSG_CH0_0013) - EVT_SET(LVar8, MSG_CH0_0013) - EVT_SET(GF_KMR02_ToadHouse_Intro, TRUE) - EVT_ELSE - EVT_SET(LVar0, MSG_CH0_0014) - EVT_SET(LVar8, MSG_CH0_0015) - EVT_END_IF - EVT_SET(LVar1, MSG_CH0_0016) - EVT_SET(LVar2, MSG_CH0_0017) - EVT_SET(LVar3, MSG_CH0_0018) - EVT_RETURN - EVT_END + IfEq(GF_KMR02_ToadHouse_Intro, FALSE) + Set(LVar0, MSG_CH0_0013) + Set(LVar8, MSG_CH0_0013) + Set(GF_KMR02_ToadHouse_Intro, TRUE) + Else + Set(LVar0, MSG_CH0_0014) + Set(LVar8, MSG_CH0_0015) + EndIf + Set(LVar1, MSG_CH0_0016) + Set(LVar2, MSG_CH0_0017) + Set(LVar3, MSG_CH0_0018) + Return + End }; EvtScript N(EVS_ToadHouse_GetInBed) = { - EVT_EXEC(N(EVS_PlayRestingSong)) - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(N(ToadHouse_CamSetFOV), 0, 40) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 34, -8) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 220) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-46.0), EVT_FLOAT(-311.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(-262.4), EVT_FLOAT(-324.6)) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 1, 10) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, -212, -376, 0) - EVT_CALL(InterpPlayerYaw, 191, 1) - EVT_CALL(SetPlayerPos, -212, 21, -376) - EVT_WAIT(5) - EVT_CALL(InterpPlayerYaw, 114, 1) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetPlayerImgFXFlags, IMGFX_FLAG_800) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_GET_IN_BED, 1, 1, 0) - EVT_WAIT(61) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) - EVT_THREAD - EVT_WAIT(70) - EVT_CALL(N(ToadHouse_CamSetFOV), 0, 25) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_PlayRestingSong)) + Thread + Wait(20) + Call(N(ToadHouse_CamSetFOV), 0, 40) + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamPitch, CAM_DEFAULT, 34, -8) + Call(SetCamDistance, CAM_DEFAULT, 220) + Call(SetCamPosA, CAM_DEFAULT, Float(-46.0), Float(-311.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(-262.4), Float(-324.6)) + Call(SetCamPosC, CAM_DEFAULT, 1, 10) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, -212, -376, 0) + Call(InterpPlayerYaw, 191, 1) + Call(SetPlayerPos, -212, 21, -376) + Wait(5) + Call(InterpPlayerYaw, 114, 1) + Call(HidePlayerShadow, TRUE) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetPlayerImgFXFlags, IMGFX_FLAG_800) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_GET_IN_BED, 1, 1, 0) + Wait(61) + Call(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) + Thread + Wait(70) + Call(N(ToadHouse_CamSetFOV), 0, 25) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + EndThread + Return + End }; EvtScript N(EVS_ToadHouse_ReturnFromRest) = { - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(HidePlayerShadow, FALSE) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetPlayerPos, -183, 19, -341) - EVT_CALL(PlayerMoveTo, -132, -325, 20) - EVT_RETURN - EVT_END + Exec(N(EVS_SetupMusic)) + Call(HidePlayerShadow, FALSE) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetPlayerPos, -183, 19, -341) + Call(PlayerMoveTo, -132, -325, 20) + Return + End }; EvtScript N(EVS_NpcInteract_ToadHouse) = { - EVT_EXEC_WAIT(N(EVS_NpcInteract_ToadHouseKeeper)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_NpcInteract_ToadHouseKeeper)) + Return + End }; diff --git a/src/world/area_kmr/kmr_02/kmr_02_5_entity.c b/src/world/area_kmr/kmr_02/kmr_02_5_entity.c index 56fd40ecaea..bc75a86b582 100644 --- a/src/world/area_kmr/kmr_02/kmr_02_5_entity.c +++ b/src/world/area_kmr/kmr_02/kmr_02_5_entity.c @@ -22,10 +22,10 @@ API_CALLABLE(N(PlayerHasBadgeEquipped)) { #include "world/common/todo/GetEntityPosition.inc.c" EvtScript N(EVS_GotoMap_tik_01_2) = { - EVT_CALL(GotoMap, EVT_PTR("tik_01"), tik_01_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("tik_01"), tik_01_ENTRY_2) + Wait(100) + Return + End }; API_CALLABLE(N(AnimateBlockScale)) { @@ -49,99 +49,99 @@ API_CALLABLE(N(AnimateBlockScale)) { } EvtScript N(EVS_OnSmash_GateBlock) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_0066) - EVT_WAIT(10 * DT) - EVT_CALL(N(PlayerHasBadgeEquipped)) - EVT_IF_EQ(LVar0, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_0067) - EVT_WAIT(10 * DT) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt2, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GB_StoryProgress, STORY_CH0_SMASHED_GATE_BLOCK) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_0066) + Wait(10 * DT) + Call(N(PlayerHasBadgeEquipped)) + IfEq(LVar0, FALSE) + Call(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_0067) + Wait(10 * DT) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt2, COLLIDER_FLAGS_UPPER_MASK) + Set(GB_StoryProgress, STORY_CH0_SMASHED_GATE_BLOCK) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SummonGateBlock) = { - EVT_CALL(PlaySoundAt, SOUND_KAMMY_SUMMON_MAGIC, SOUND_SPACE_DEFAULT, 373, 88, 255) - EVT_CALL(GetNpcPos, NPC_Kammy, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 0, 373, 88, 255, 1, 100) - EVT_WAIT(20 * DT) - EVT_CALL(PlaySoundAt, SOUND_KAMMY_SUMMON_BLOCK, SOUND_SPACE_DEFAULT, 326, 150, 261) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 1, 326, 150, 261, 1, 60) - EVT_WAIT(20 * DT) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 1, 326, 150, 261, 1, 60) - EVT_WAIT(10 * DT) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 1, 326, 150, 261, 1, 60) - EVT_WAIT(5 * DT) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 1, 326, 150, 261, 1, 60) - EVT_WAIT(3 * DT) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 1, 326, 150, 261, 1, 60) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer1Block), 326, 120, 261, 148, MAKE_ENTITY_END) - EVT_SET(LVarA, LVar0) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnSmash_GateBlock))) - EVT_CALL(N(AnimateBlockScale)) - EVT_SET(LVar9, LVarA) - EVT_CALL(N(GetEntityPosition), LVar9, LVar2, LVar3, LVar4) - EVT_CALL(MakeLerp, LVar3, 300, 20 * DT, EASING_QUADRATIC_IN) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetEntityPositionF), LVar9, LVar2, LVar0, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_KAMMY_RAISE_OBJECT, SOUND_SPACE_DEFAULT, LVar2, LVar0, LVar4) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0F) - EVT_THREAD - EVT_WAIT(15) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, LVar2, 0, LVar4, 0) - EVT_END_THREAD - EVT_CALL(PlaySoundAt, SOUND_KAMMY_LOWER_OBJECT, SOUND_SPACE_DEFAULT, LVar2, LVar0, LVar4) - EVT_CALL(MakeLerp, 300, 0, 20 * DT, EASING_CUBIC_IN) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetEntityPositionF), LVar9, LVar2, LVar0, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(EnableGroup, MODEL_2, TRUE) - EVT_CALL(EnableGroup, MODEL_1, FALSE) - EVT_CALL(PlaySoundAt, SOUND_HEAVY_OBJECT_DROP, SOUND_SPACE_DEFAULT, LVar2, LVar0, LVar4) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 15 * DT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(PlaySoundAt, SOUND_KAMMY_SUMMON_MAGIC, SOUND_SPACE_DEFAULT, 373, 88, 255) + Call(GetNpcPos, NPC_Kammy, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 0, 373, 88, 255, 1, 100) + Wait(20 * DT) + Call(PlaySoundAt, SOUND_KAMMY_SUMMON_BLOCK, SOUND_SPACE_DEFAULT, 326, 150, 261) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 1, 326, 150, 261, 1, 60) + Wait(20 * DT) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 1, 326, 150, 261, 1, 60) + Wait(10 * DT) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 1, 326, 150, 261, 1, 60) + Wait(5 * DT) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 1, 326, 150, 261, 1, 60) + Wait(3 * DT) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 1, 326, 150, 261, 1, 60) + Call(MakeEntity, Ref(Entity_Hammer1Block), 326, 120, 261, 148, MAKE_ENTITY_END) + Set(LVarA, LVar0) + Call(AssignScript, Ref(N(EVS_OnSmash_GateBlock))) + Call(N(AnimateBlockScale)) + Set(LVar9, LVarA) + Call(N(GetEntityPosition), LVar9, LVar2, LVar3, LVar4) + Call(MakeLerp, LVar3, 300, 20 * DT, EASING_QUADRATIC_IN) + Label(10) + Call(UpdateLerp) + Call(N(SetEntityPositionF), LVar9, LVar2, LVar0, LVar4) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(PlaySoundAt, SOUND_KAMMY_RAISE_OBJECT, SOUND_SPACE_DEFAULT, LVar2, LVar0, LVar4) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0F) + Thread + Wait(15) + PlayEffect(EFFECT_LANDING_DUST, 4, LVar2, 0, LVar4, 0) + EndThread + Call(PlaySoundAt, SOUND_KAMMY_LOWER_OBJECT, SOUND_SPACE_DEFAULT, LVar2, LVar0, LVar4) + Call(MakeLerp, 300, 0, 20 * DT, EASING_CUBIC_IN) + Label(20) + Call(UpdateLerp) + Call(N(SetEntityPositionF), LVar9, LVar2, LVar0, LVar4) + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Call(EnableGroup, MODEL_2, TRUE) + Call(EnableGroup, MODEL_1, FALSE) + Call(PlaySoundAt, SOUND_HEAVY_OBJECT_DROP, SOUND_SPACE_DEFAULT, LVar2, LVar0, LVar4) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 15 * DT, Float(1.0)) + EndThread + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_GATE_CRUSHED) - EVT_CASE_LT(STORY_CH0_SMASHED_GATE_BLOCK) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer1Block_WideX), 326, 0, 261, 270, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnSmash_GateBlock))) - EVT_CASE_LT(STORY_CH0_TWINK_GAVE_LUCKY_STAR) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt2, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_SWITCH - EVT_IF_EQ(GF_KMR02_WarpPipe, FALSE) - EVT_IF_EQ(GF_TIK01_WarpPipes, TRUE) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, kmr_02_ENTRY_3) - EVT_SET(GF_KMR02_WarpPipe, TRUE) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueWarpPipe), 0, 0, 355, 0, kmr_02_ENTRY_3, EVT_PTR(N(EVS_GotoMap_tik_01_2)), EVT_INDEX_OF_GAME_FLAG(GF_KMR02_WarpPipe), MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 250, 60, 75, -15, MAKE_ENTITY_END) - EVT_IF_GE(GB_StoryProgress, STORY_CH0_TWINK_GAVE_LUCKY_STAR) - EVT_CALL(MakeItemEntity, ITEM_SHOOTING_STAR, 510, 0, -340, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KMR02_Item_ShootingStar) - EVT_END_IF - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_GATE_CRUSHED) + CaseLt(STORY_CH0_SMASHED_GATE_BLOCK) + Call(MakeEntity, Ref(Entity_Hammer1Block_WideX), 326, 0, 261, 270, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnSmash_GateBlock))) + CaseLt(STORY_CH0_TWINK_GAVE_LUCKY_STAR) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt2, COLLIDER_FLAGS_UPPER_MASK) + EndSwitch + IfEq(GF_KMR02_WarpPipe, FALSE) + IfEq(GF_TIK01_WarpPipes, TRUE) + Call(GetEntryID, LVar0) + IfNe(LVar0, kmr_02_ENTRY_3) + Set(GF_KMR02_WarpPipe, TRUE) + EndIf + EndIf + EndIf + Call(MakeEntity, Ref(Entity_BlueWarpPipe), 0, 0, 355, 0, kmr_02_ENTRY_3, Ref(N(EVS_GotoMap_tik_01_2)), EVT_INDEX_OF_GAME_FLAG(GF_KMR02_WarpPipe), MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_SavePoint), 250, 60, 75, -15, MAKE_ENTITY_END) + IfGe(GB_StoryProgress, STORY_CH0_TWINK_GAVE_LUCKY_STAR) + Call(MakeItemEntity, ITEM_SHOOTING_STAR, 510, 0, -340, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KMR02_Item_ShootingStar) + EndIf + Return + End }; diff --git a/src/world/area_kmr/kmr_02/kmr_02_6_rooms_2.c b/src/world/area_kmr/kmr_02/kmr_02_6_rooms_2.c index cae2a023c55..1c1d049dc95 100644 --- a/src/world/area_kmr/kmr_02/kmr_02_6_rooms_2.c +++ b/src/world/area_kmr/kmr_02/kmr_02_6_rooms_2.c @@ -1,79 +1,79 @@ #include "kmr_02.h" EvtScript N(EVS_SetDoorRot_ToadHouse) = { - EVT_CALL(RotateModel, MODEL_o275, LVar0, 0, 1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o275, LVar0, 0, 1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_ToadHouse) = { - EVT_SET(LVar1, LVar0) - EVT_ADD(LVar1, LVar0) - EVT_CALL(RotateModel, MODEL_k_k_1, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_k_k_2, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_k_k_3, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o272, LVar1, 0, 1, 0) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + Add(LVar1, LVar0) + Call(RotateModel, MODEL_k_k_1, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_k_k_2, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_k_k_3, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o272, LVar1, 0, 1, 0) + Return + End }; EvtScript N(EVS_RoomListener_ToadHouse) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_CALL(SetGroupVisibility, MODEL_kino_in, MODEL_GROUP_VISIBLE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o767, COLLIDER_FLAGS_UPPER_MASK) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_DONE) + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Call(SetGroupVisibility, MODEL_kino_in, MODEL_GROUP_VISIBLE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o767, COLLIDER_FLAGS_UPPER_MASK) + CaseEq(ROOM_UPDATE_ENTER_DONE) // do nothing - EVT_CASE_EQ(ROOM_UPDATE_EXIT_BEGIN) - EVT_THREAD - EVT_WAIT(5) - EVT_END_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_CALL(SetGroupVisibility, MODEL_kino_in, MODEL_GROUP_HIDDEN) - EVT_CALL(EnableModel, MODEL_o422, TRUE) - EVT_CALL(EnableModel, MODEL_o424, TRUE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + CaseEq(ROOM_UPDATE_EXIT_BEGIN) + Thread + Wait(5) + EndThread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + CaseEq(ROOM_UPDATE_EXIT_END) + Call(SetGroupVisibility, MODEL_kino_in, MODEL_GROUP_HIDDEN) + Call(EnableModel, MODEL_o422, TRUE) + Call(EnableModel, MODEL_o424, TRUE) + EndSwitch + Return + End }; EvtScript N(EVS_SetWallsDown_ToadHouse) = { - EVT_CALL(SetGroupVisibility, MODEL_kino_in, MODEL_GROUP_VISIBLE) - EVT_CALL(RotateModel, MODEL_k_k_1, 180, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_k_k_2, 180, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_k_k_3, 180, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o272, 180, 0, 1, 0) - EVT_CALL(EnableModel, MODEL_o561, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o767, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Call(SetGroupVisibility, MODEL_kino_in, MODEL_GROUP_VISIBLE) + Call(RotateModel, MODEL_k_k_1, 180, 0, 1, 0) + Call(RotateModel, MODEL_k_k_2, 180, 0, 1, 0) + Call(RotateModel, MODEL_k_k_3, 180, 0, 1, 0) + Call(RotateModel, MODEL_o272, 180, 0, 1, 0) + Call(EnableModel, MODEL_o561, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o767, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_ToadSignSwinging) = { - EVT_LABEL(9) - EVT_CALL(MakeLerp, 10, -10, 30, EASING_COS_IN_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_kanban, LVar0, EVT_FLOAT(35.498), 0, EVT_FLOAT(-9.511)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(MakeLerp, -10, 10, 30, EASING_COS_IN_OUT) - EVT_LABEL(11) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_kanban, LVar0, EVT_FLOAT(35.498), 0, EVT_FLOAT(-9.511)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(11) - EVT_END_IF - EVT_GOTO(9) - EVT_RETURN - EVT_END + Label(9) + Call(MakeLerp, 10, -10, 30, EASING_COS_IN_OUT) + Label(10) + Call(UpdateLerp) + Call(RotateModel, MODEL_kanban, LVar0, Float(35.498), 0, Float(-9.511)) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(MakeLerp, -10, 10, 30, EASING_COS_IN_OUT) + Label(11) + Call(UpdateLerp) + Call(RotateModel, MODEL_kanban, LVar0, Float(35.498), 0, Float(-9.511)) + Wait(1) + IfEq(LVar1, 1) + Goto(11) + EndIf + Goto(9) + Return + End }; s32 N(InsideNPCs_ToadHouse)[] = { @@ -82,23 +82,23 @@ s32 N(InsideNPCs_ToadHouse)[] = { }; EvtScript N(EVS_SetupToadHouse) = { - EVT_CALL(RotateModel, MODEL_o320, 180, 0, 1, 0) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, kmr_02_ENTRY_5) - EVT_CALL(SetGroupVisibility, MODEL_kino_in, MODEL_GROUP_HIDDEN) - EVT_END_IF + Call(RotateModel, MODEL_o320, 180, 0, 1, 0) + Call(GetEntryID, LVar0) + IfNe(LVar0, kmr_02_ENTRY_5) + Call(SetGroupVisibility, MODEL_kino_in, MODEL_GROUP_HIDDEN) + EndIf // toad house - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_RIGHT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_ToadHouse)), - EVT_PTR(N(EVS_SetWallRot_ToadHouse)), + Ref(N(EVS_SetDoorRot_ToadHouse)), + Ref(N(EVS_SetWallRot_ToadHouse)), NULL, - EVT_PTR(N(EVS_RoomListener_ToadHouse)), + Ref(N(EVS_RoomListener_ToadHouse)), COLLIDER_deilit7, COLLIDER_deilit8, MODEL_kinopi, - EVT_PTR(N(InsideNPCs_ToadHouse))) - EVT_EXEC(N(EVS_ToadSignSwinging)) - EVT_RETURN - EVT_END + Ref(N(InsideNPCs_ToadHouse))) + Exec(N(EVS_ToadSignSwinging)) + Return + End }; diff --git a/src/world/area_kmr/kmr_02/kmr_02_7_kammy.c b/src/world/area_kmr/kmr_02/kmr_02_7_kammy.c index 0ec60129a4b..9f6388fc6b6 100644 --- a/src/world/area_kmr/kmr_02/kmr_02_7_kammy.c +++ b/src/world/area_kmr/kmr_02/kmr_02_7_kammy.c @@ -44,309 +44,309 @@ Vec3f N(FlightPath_KammyDepart)[] = { }; EvtScript N(EVS_PlayKammyFlightSounds) = { - EVT_LOOP(0) - EVT_CALL(PlaySoundAtNpc, NPC_Kammy, SOUND_FLIGHT, SOUND_SPACE_DEFAULT) - EVT_WAIT(4 * DT) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(PlaySoundAtNpc, NPC_Kammy, SOUND_FLIGHT, SOUND_SPACE_DEFAULT) + Wait(4 * DT) + EndLoop + Return + End }; EvtScript N(EVS_MakeNpcsFaceKammy) = { - EVT_CALL(GetNpcPos, NPC_Kammy, LVar0, LVar1, LVar2) - EVT_LABEL(0) - EVT_CALL(GetNpcPos, NPC_Kammy, LVar3, LVar4, LVar5) - EVT_CALL(N(UnkFunc42)) - EVT_CALL(InterpNpcYaw, NPC_Kammy, LVarA, 0) - EVT_SET(LVar0, LVar3) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_CALL(GetAngleBetweenNPCs, NPC_Goombaria, NPC_Kammy, LVarA) - EVT_CALL(InterpNpcYaw, NPC_Goombaria, LVarA, 0) - EVT_CALL(GetAngleBetweenNPCs, NPC_Goompapa, NPC_Kammy, LVarB) - EVT_CALL(InterpNpcYaw, NPC_Goompapa, LVarB, 0) - EVT_CALL(GetAngleBetweenNPCs, NPC_Goombario, NPC_Kammy, LVarB) - EVT_CALL(InterpNpcYaw, NPC_Goombario, LVarB, 0) - EVT_CALL(GetAngleBetweenNPCs, NPC_Goomama, NPC_Kammy, LVarB) - EVT_CALL(InterpNpcYaw, NPC_Goomama, LVarB, 0) - EVT_CALL(PlayerFaceNpc, NPC_Kammy, FALSE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_Kammy, LVar0, LVar1, LVar2) + Label(0) + Call(GetNpcPos, NPC_Kammy, LVar3, LVar4, LVar5) + Call(N(UnkFunc42)) + Call(InterpNpcYaw, NPC_Kammy, LVarA, 0) + Set(LVar0, LVar3) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Call(GetAngleBetweenNPCs, NPC_Goombaria, NPC_Kammy, LVarA) + Call(InterpNpcYaw, NPC_Goombaria, LVarA, 0) + Call(GetAngleBetweenNPCs, NPC_Goompapa, NPC_Kammy, LVarB) + Call(InterpNpcYaw, NPC_Goompapa, LVarB, 0) + Call(GetAngleBetweenNPCs, NPC_Goombario, NPC_Kammy, LVarB) + Call(InterpNpcYaw, NPC_Goombario, LVarB, 0) + Call(GetAngleBetweenNPCs, NPC_Goomama, NPC_Kammy, LVarB) + Call(InterpNpcYaw, NPC_Goomama, LVarB, 0) + Call(PlayerFaceNpc, NPC_Kammy, FALSE) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_Scene_KammyStrikes) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Goombaria, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Goompapa, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(EnableNpcAI, NPC_Goombario, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Goombario, ANIM_WorldGoombario_Idle) - EVT_CALL(EnableNpcAI, NPC_Goomama, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Goomama, ANIM_Goomama_Idle) - EVT_CALL(EnableNpcAI, NPC_Kammy, TRUE) - EVT_CALL(SetNpcAux, NPC_Kammy, EVT_PTR(N(EVS_NpcAux_Kammy))) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH0_0059, 160, 40) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim15) - EVT_THREAD - EVT_EXEC_GET_TID(N(EVS_PlayKammyFlightSounds), MV_Unk_04) - EVT_EXEC_GET_TID(N(EVS_MakeNpcsFaceKammy), MV_Unk_05) - EVT_CALL(LoadPath, 40 * DT, EVT_PTR(N(FlightPath_KammyAppear)), ARRAY_COUNT(N(FlightPath_KammyAppear)), EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Kammy, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Shocked) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 3, 0) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 166, 756) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 159, 0) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, EVT_FLOAT(109.7)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 1220) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_CALL(LoadPath, 120 * DT, EVT_PTR(N(FlightPath_ToGate1)), ARRAY_COUNT(N(FlightPath_ToGate1)), EASING_LINEAR) - EVT_LABEL(20) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Kammy, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_WAIT(10 * DT) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 8, -10) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 41, 729) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 300, 245) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 440) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(PlayerFaceNpc, NPC_Kammy, FALSE) - EVT_CALL(GetAngleBetweenNPCs, NPC_Goompapa, NPC_Kammy, LVar0) - EVT_CALL(InterpNpcYaw, NPC_Goompapa, LVar0, 0) - EVT_CALL(GetAngleBetweenNPCs, NPC_Goombaria, NPC_Kammy, LVar0) - EVT_CALL(InterpNpcYaw, NPC_Goombaria, LVar0, 0) - EVT_CALL(SetPlayerPos, 220, 0, 213) - EVT_CALL(SetNpcPos, NPC_Goompapa, 255, 0, 232) - EVT_CALL(SetNpcPos, NPC_Goombaria, 190, 0, 212) - EVT_CALL(LoadPath, 10 * DT, EVT_PTR(N(FlightPath_ToGate2)), ARRAY_COUNT(N(FlightPath_ToGate2)), EASING_LINEAR) - EVT_LABEL(30) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Kammy, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(30) - EVT_END_IF - EVT_KILL_THREAD(MV_Unk_04) - EVT_KILL_THREAD(MV_Unk_05) - EVT_CALL(PlaySoundAtNpc, NPC_Kammy, SOUND_SKID, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim10) - EVT_WAIT(1) - EVT_CALL(SetNpcRotation, NPC_Kammy, 0, 0, -5) - EVT_WAIT(1) - EVT_CALL(SetNpcRotation, NPC_Kammy, 0, 0, -10) - EVT_WAIT(1) - EVT_CALL(SetNpcRotation, NPC_Kammy, 0, 0, -15) - EVT_WAIT(1) - EVT_CALL(SetNpcRotation, NPC_Kammy, 0, 0, -10) - EVT_WAIT(1) - EVT_CALL(SetNpcRotation, NPC_Kammy, 0, 0, -15) - EVT_WAIT(1) - EVT_CALL(SetNpcRotation, NPC_Kammy, 0, 0, -10) - EVT_WAIT(1) - EVT_CALL(SetNpcRotation, NPC_Kammy, 0, 0, -15) - EVT_WAIT(1) - EVT_CALL(SetNpcRotation, NPC_Kammy, 0, 0, -10) - EVT_WAIT(1) - EVT_CALL(SetNpcRotation, NPC_Kammy, 0, 0, -15) - EVT_WAIT(3) - EVT_CALL(SetNpcRotation, NPC_Kammy, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(LoadPath, 10, EVT_PTR(N(FlightPath_ToGate3)), ARRAY_COUNT(N(FlightPath_ToGate3)), EASING_LINEAR) - EVT_LABEL(40) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Kammy, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(40) - EVT_END_IF - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim13) - EVT_CALL(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim16, ANIM_WorldKammy_Anim13, 512, MSG_CH0_005A) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 7, -10) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 41, 729) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 220, 213) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 275) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_LookUpTalk, ANIM_Goombaria_LookUp, 5, MSG_CH0_005B) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(6.0), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-1731.4), EVT_FLOAT(974.9)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(399.0), EVT_FLOAT(277.1)) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, EVT_FLOAT(60.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(275.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim16, ANIM_WorldKammy_Anim13, 512, MSG_CH0_005C) - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_LookUp) - EVT_CALL(SetNpcAnimation, NPC_Goompapa, ANIM_Goompapa_LookUp) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(600.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(398.9), EVT_FLOAT(242.7)) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, EVT_FLOAT(10.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0E) - EVT_WAIT(10 * DT) - EVT_CALL(GetNpcPos, NPC_Kammy, LVar0, LVar1, LVar2) - EVT_WAIT(10 * DT) - EVT_EXEC_WAIT(N(EVS_SummonGateBlock)) - EVT_THREAD - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_PanicHoverStill) - EVT_CALL(SetPlayerImgFXFlags, IMGFX_FLAG_REVERSE_ANIM) - EVT_CALL(UpdatePlayerImgFX, ANIM_MarioW2_PanicHoverStill, IMGFX_SET_ANIM, IMGFX_ANIM_SHOCK, 1, 1, 0) - EVT_WAIT(13 * DT) - EVT_CALL(UpdatePlayerImgFX, ANIM_MarioW2_PanicHoverStill, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_PanicHover) - EVT_CALL(SetPlayerImgFXFlags, IMGFX_FLAG_REVERSE_ANIM) - EVT_CALL(UpdatePlayerImgFX, ANIM_MarioW2_PanicHover, IMGFX_SET_ANIM, IMGFX_ANIM_SHOCK, 1, 1, 0) - EVT_WAIT(13 * DT) - EVT_CALL(UpdatePlayerImgFX, ANIM_MarioW2_PanicHover, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.8)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(PlayerJump1, LVar0, LVar1, LVar2, 25 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Shock) - EVT_CALL(SetNpcImgFXFlags, NPC_Goombaria, IMGFX_FLAG_REVERSE_ANIM) - EVT_CALL(SetNpcImgFXParams, NPC_Goombaria, IMGFX_SET_ANIM, IMGFX_ANIM_SHOCK, 1, 1, 0) - EVT_CALL(SetNpcJumpscale, NPC_Goombaria, EVT_FLOAT(1.5)) - EVT_CALL(GetNpcPos, NPC_Goombaria, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Goombaria, LVar0, LVar1, LVar2, 25 * DT) - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_LookUp) - EVT_CALL(SetNpcImgFXParams, NPC_Goombaria, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(SetNpcImgFXFlags, NPC_Goompapa, IMGFX_FLAG_REVERSE_ANIM) - EVT_CALL(SetNpcImgFXParams, NPC_Goompapa, IMGFX_SET_ANIM, IMGFX_ANIM_SHOCK, 1, 1, 0) - EVT_CALL(SetNpcAnimation, NPC_Goompapa, ANIM_Goompapa_Shock) - EVT_CALL(SetNpcJumpscale, NPC_Goompapa, EVT_FLOAT(1.2)) - EVT_CALL(GetNpcPos, NPC_Goompapa, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Goompapa, LVar0, LVar1, LVar2, 25 * DT) - EVT_CALL(SetNpcAnimation, NPC_Goompapa, ANIM_Goompapa_LookUp) - EVT_CALL(SetNpcImgFXParams, NPC_Goompapa, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim13) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(6.0), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-1731.4), EVT_FLOAT(974.9)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(399.0), EVT_FLOAT(277.1)) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, EVT_FLOAT(60.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(275.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(5 * DT) - EVT_CALL(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim16, ANIM_WorldKammy_Anim13, 512, MSG_CH0_005D) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 3, 0) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 166, 756) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 159, 0) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, EVT_FLOAT(109.7)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 1220) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_LOOP(150 * DT) - EVT_CALL(PlayerFaceNpc, NPC_Kammy, FALSE) - EVT_CALL(GetAngleBetweenNPCs, NPC_Goombaria, NPC_Kammy, LVar0) - EVT_CALL(InterpNpcYaw, NPC_Goombaria, LVar0, 0) - EVT_CALL(GetAngleBetweenNPCs, NPC_Goompapa, NPC_Kammy, LVar0) - EVT_CALL(InterpNpcYaw, NPC_Goompapa, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim15) - EVT_EXEC_GET_TID(N(EVS_MakeNpcsFaceKammy), MV_Unk_05) - EVT_WAIT(40 * DT) - EVT_CALL(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim16, ANIM_WorldKammy_Anim13, 0x200, MSG_CH0_005E) - EVT_CALL(FadeOutMusic, 0, 3000 * DT) - EVT_EXEC_GET_TID(N(EVS_PlayKammyFlightSounds), MV_Unk_04) - EVT_CALL(LoadPath, 90 * DT, EVT_PTR(N(FlightPath_KammyDepart)), ARRAY_COUNT(N(FlightPath_KammyDepart)), EASING_QUADRATIC_IN) - EVT_LABEL(70) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Kammy, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(70) - EVT_END_IF - EVT_KILL_THREAD(MV_Unk_04) - EVT_KILL_THREAD(MV_Unk_05) - EVT_WAIT(20 * DT) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(SetNpcAnimation, NPC_Goompapa, ANIM_Goompapa_Angry) - EVT_CALL(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Idle) - EVT_CALL(SetNpcPos, NPC_Goombaria, 166, 0, 188) - EVT_CALL(SetPlayerPos, 231, 0, 196) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(GetAngleToPlayer, NPC_Goombaria, LVar0) - EVT_CALL(InterpNpcYaw, NPC_Goombaria, LVar0, 0) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(90.0), 0, EVT_FLOAT(-300.0), EVT_FLOAT(12.0), EVT_FLOAT(-8.5)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_AngryTalk, ANIM_Goompapa_Angry, 0, MSG_CH0_005F) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(15 * DT) - EVT_CALL(SetNpcAnimation, NPC_Goompapa, ANIM_Goompapa_Idle) - EVT_WAIT(15 * DT) - EVT_CALL(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_0060) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_0061) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_0062) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcSpeed, NPC_Goombario, EVT_FLOAT(2.0)) - EVT_CALL(EnableNpcAI, NPC_Goombario, TRUE) - EVT_CALL(EnableNpcAI, NPC_Goomama, TRUE) - EVT_CALL(GetNpcPos, NPC_Goombaria, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Goombaria, LVar0, LVar1, LVar2) - EVT_CALL(EnableNpcShadow, NPC_Goombaria, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Goombaria, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Goombaria, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Goompa, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Goompa, NPC_FLAG_FLYING, TRUE) - EVT_CALL(SetNpcPos, NPC_Goompa, NPC_DISPOSE_LOCATION) - EVT_CALL(EnableNpcShadow, NPC_Goompa, FALSE) - EVT_SET(GB_StoryProgress, STORY_CH0_GATE_CRUSHED) - EVT_THREAD - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_END_THREAD - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Goompapa, ANIM_Goompapa_Idle) - EVT_CALL(N(SetWanderTerritory_6), NPC_Goomama, 1) - EVT_CALL(BindNpcAI, NPC_Goomama, EVT_PTR(N(EVS_NpcIdle_SwitchedWander_6))) - EVT_CALL(N(SetWanderTerritory_6), NPC_Goombario, 2) - EVT_CALL(BindNpcAI, NPC_Goombario, EVT_PTR(N(EVS_NpcIdle_SwitchedWander_6))) - EVT_CALL(N(SetWanderTerritory_6), NPC_Goombaria, 3) - EVT_CALL(BindNpcAI, NPC_Goombaria, EVT_PTR(N(EVS_NpcIdle_SwitchedWander_6))) - EVT_CALL(SetNpcFlagBits, NPC_Goombaria, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Goompapa, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(SetNpcFlagBits, NPC_Goombaria, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Goompapa, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(EnableNpcAI, NPC_Goombario, FALSE) + Call(SetNpcAnimation, NPC_Goombario, ANIM_WorldGoombario_Idle) + Call(EnableNpcAI, NPC_Goomama, FALSE) + Call(SetNpcAnimation, NPC_Goomama, ANIM_Goomama_Idle) + Call(EnableNpcAI, NPC_Kammy, TRUE) + Call(SetNpcAux, NPC_Kammy, Ref(N(EVS_NpcAux_Kammy))) + Call(ShowMessageAtScreenPos, MSG_CH0_0059, 160, 40) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim15) + Thread + ExecGetTID(N(EVS_PlayKammyFlightSounds), MV_Unk_04) + ExecGetTID(N(EVS_MakeNpcsFaceKammy), MV_Unk_05) + Call(LoadPath, 40 * DT, Ref(N(FlightPath_KammyAppear)), ARRAY_COUNT(N(FlightPath_KammyAppear)), EASING_LINEAR) + Label(10) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Kammy, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(10) + EndIf + EndThread + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_MarioW2_Shocked) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamPitch, CAM_DEFAULT, 3, 0) + Call(SetCamPosA, CAM_DEFAULT, 166, 756) + Call(SetCamPosB, CAM_DEFAULT, 159, 0) + Call(SetCamPosC, CAM_DEFAULT, 0, Float(109.7)) + Call(SetCamDistance, CAM_DEFAULT, 1220) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Call(LoadPath, 120 * DT, Ref(N(FlightPath_ToGate1)), ARRAY_COUNT(N(FlightPath_ToGate1)), EASING_LINEAR) + Label(20) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Kammy, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(20) + EndIf + Wait(10 * DT) + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamPitch, CAM_DEFAULT, 8, -10) + Call(SetCamPosA, CAM_DEFAULT, 41, 729) + Call(SetCamPosB, CAM_DEFAULT, 300, 245) + Call(SetCamPosC, CAM_DEFAULT, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, 440) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(PlayerFaceNpc, NPC_Kammy, FALSE) + Call(GetAngleBetweenNPCs, NPC_Goompapa, NPC_Kammy, LVar0) + Call(InterpNpcYaw, NPC_Goompapa, LVar0, 0) + Call(GetAngleBetweenNPCs, NPC_Goombaria, NPC_Kammy, LVar0) + Call(InterpNpcYaw, NPC_Goombaria, LVar0, 0) + Call(SetPlayerPos, 220, 0, 213) + Call(SetNpcPos, NPC_Goompapa, 255, 0, 232) + Call(SetNpcPos, NPC_Goombaria, 190, 0, 212) + Call(LoadPath, 10 * DT, Ref(N(FlightPath_ToGate2)), ARRAY_COUNT(N(FlightPath_ToGate2)), EASING_LINEAR) + Label(30) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Kammy, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(30) + EndIf + KillThread(MV_Unk_04) + KillThread(MV_Unk_05) + Call(PlaySoundAtNpc, NPC_Kammy, SOUND_SKID, SOUND_SPACE_DEFAULT) + Thread + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim10) + Wait(1) + Call(SetNpcRotation, NPC_Kammy, 0, 0, -5) + Wait(1) + Call(SetNpcRotation, NPC_Kammy, 0, 0, -10) + Wait(1) + Call(SetNpcRotation, NPC_Kammy, 0, 0, -15) + Wait(1) + Call(SetNpcRotation, NPC_Kammy, 0, 0, -10) + Wait(1) + Call(SetNpcRotation, NPC_Kammy, 0, 0, -15) + Wait(1) + Call(SetNpcRotation, NPC_Kammy, 0, 0, -10) + Wait(1) + Call(SetNpcRotation, NPC_Kammy, 0, 0, -15) + Wait(1) + Call(SetNpcRotation, NPC_Kammy, 0, 0, -10) + Wait(1) + Call(SetNpcRotation, NPC_Kammy, 0, 0, -15) + Wait(3) + Call(SetNpcRotation, NPC_Kammy, 0, 0, 0) + EndThread + Call(LoadPath, 10, Ref(N(FlightPath_ToGate3)), ARRAY_COUNT(N(FlightPath_ToGate3)), EASING_LINEAR) + Label(40) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Kammy, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(40) + EndIf + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim13) + Call(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim16, ANIM_WorldKammy_Anim13, 512, MSG_CH0_005A) + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamPitch, CAM_DEFAULT, 7, -10) + Call(SetCamPosA, CAM_DEFAULT, 41, 729) + Call(SetCamPosB, CAM_DEFAULT, 220, 213) + Call(SetCamPosC, CAM_DEFAULT, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, 275) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_LookUpTalk, ANIM_Goombaria_LookUp, 5, MSG_CH0_005B) + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamPitch, CAM_DEFAULT, Float(6.0), Float(-6.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(-1731.4), Float(974.9)) + Call(SetCamPosB, CAM_DEFAULT, Float(399.0), Float(277.1)) + Call(SetCamPosC, CAM_DEFAULT, 0, Float(60.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(275.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim16, ANIM_WorldKammy_Anim13, 512, MSG_CH0_005C) + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_LookUp) + Call(SetNpcAnimation, NPC_Goompapa, ANIM_Goompapa_LookUp) + Call(SetCamDistance, CAM_DEFAULT, Float(600.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(398.9), Float(242.7)) + Call(SetCamPosC, CAM_DEFAULT, 0, Float(10.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0E) + Wait(10 * DT) + Call(GetNpcPos, NPC_Kammy, LVar0, LVar1, LVar2) + Wait(10 * DT) + ExecWait(N(EVS_SummonGateBlock)) + Thread + Call(SetPlayerAnimation, ANIM_MarioW2_PanicHoverStill) + Call(SetPlayerImgFXFlags, IMGFX_FLAG_REVERSE_ANIM) + Call(UpdatePlayerImgFX, ANIM_MarioW2_PanicHoverStill, IMGFX_SET_ANIM, IMGFX_ANIM_SHOCK, 1, 1, 0) + Wait(13 * DT) + Call(UpdatePlayerImgFX, ANIM_MarioW2_PanicHoverStill, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetPlayerAnimation, ANIM_MarioW2_PanicHover) + Call(SetPlayerImgFXFlags, IMGFX_FLAG_REVERSE_ANIM) + Call(UpdatePlayerImgFX, ANIM_MarioW2_PanicHover, IMGFX_SET_ANIM, IMGFX_ANIM_SHOCK, 1, 1, 0) + Wait(13 * DT) + Call(UpdatePlayerImgFX, ANIM_MarioW2_PanicHover, IMGFX_CLEAR, 0, 0, 0, 0) + EndThread + Thread + Call(SetPlayerJumpscale, Float(0.8)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(PlayerJump1, LVar0, LVar1, LVar2, 25 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + EndThread + Thread + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Shock) + Call(SetNpcImgFXFlags, NPC_Goombaria, IMGFX_FLAG_REVERSE_ANIM) + Call(SetNpcImgFXParams, NPC_Goombaria, IMGFX_SET_ANIM, IMGFX_ANIM_SHOCK, 1, 1, 0) + Call(SetNpcJumpscale, NPC_Goombaria, Float(1.5)) + Call(GetNpcPos, NPC_Goombaria, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Goombaria, LVar0, LVar1, LVar2, 25 * DT) + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_LookUp) + Call(SetNpcImgFXParams, NPC_Goombaria, IMGFX_CLEAR, 0, 0, 0, 0) + EndThread + Call(SetNpcImgFXFlags, NPC_Goompapa, IMGFX_FLAG_REVERSE_ANIM) + Call(SetNpcImgFXParams, NPC_Goompapa, IMGFX_SET_ANIM, IMGFX_ANIM_SHOCK, 1, 1, 0) + Call(SetNpcAnimation, NPC_Goompapa, ANIM_Goompapa_Shock) + Call(SetNpcJumpscale, NPC_Goompapa, Float(1.2)) + Call(GetNpcPos, NPC_Goompapa, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Goompapa, LVar0, LVar1, LVar2, 25 * DT) + Call(SetNpcAnimation, NPC_Goompapa, ANIM_Goompapa_LookUp) + Call(SetNpcImgFXParams, NPC_Goompapa, IMGFX_CLEAR, 0, 0, 0, 0) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim13) + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamPitch, CAM_DEFAULT, Float(6.0), Float(-6.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(-1731.4), Float(974.9)) + Call(SetCamPosB, CAM_DEFAULT, Float(399.0), Float(277.1)) + Call(SetCamPosC, CAM_DEFAULT, 0, Float(60.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(275.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(5 * DT) + Call(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim16, ANIM_WorldKammy_Anim13, 512, MSG_CH0_005D) + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamPitch, CAM_DEFAULT, 3, 0) + Call(SetCamPosA, CAM_DEFAULT, 166, 756) + Call(SetCamPosB, CAM_DEFAULT, 159, 0) + Call(SetCamPosC, CAM_DEFAULT, 0, Float(109.7)) + Call(SetCamDistance, CAM_DEFAULT, 1220) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Loop(150 * DT) + Call(PlayerFaceNpc, NPC_Kammy, FALSE) + Call(GetAngleBetweenNPCs, NPC_Goombaria, NPC_Kammy, LVar0) + Call(InterpNpcYaw, NPC_Goombaria, LVar0, 0) + Call(GetAngleBetweenNPCs, NPC_Goompapa, NPC_Kammy, LVar0) + Call(InterpNpcYaw, NPC_Goompapa, LVar0, 0) + Wait(1) + EndLoop + EndThread + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim15) + ExecGetTID(N(EVS_MakeNpcsFaceKammy), MV_Unk_05) + Wait(40 * DT) + Call(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim16, ANIM_WorldKammy_Anim13, 0x200, MSG_CH0_005E) + Call(FadeOutMusic, 0, 3000 * DT) + ExecGetTID(N(EVS_PlayKammyFlightSounds), MV_Unk_04) + Call(LoadPath, 90 * DT, Ref(N(FlightPath_KammyDepart)), ARRAY_COUNT(N(FlightPath_KammyDepart)), EASING_QUADRATIC_IN) + Label(70) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Kammy, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(70) + EndIf + KillThread(MV_Unk_04) + KillThread(MV_Unk_05) + Wait(20 * DT) + Exec(N(EVS_SetupMusic)) + Call(SetNpcAnimation, NPC_Goompapa, ANIM_Goompapa_Angry) + Call(SetNpcAnimation, NPC_Goombaria, ANIM_Goombaria_Idle) + Call(SetNpcPos, NPC_Goombaria, 166, 0, 188) + Call(SetPlayerPos, 231, 0, 196) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(GetAngleToPlayer, NPC_Goombaria, LVar0) + Call(InterpNpcYaw, NPC_Goombaria, LVar0, 0) + Call(AdjustCam, CAM_DEFAULT, Float(90.0), 0, Float(-300.0), Float(12.0), Float(-8.5)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_AngryTalk, ANIM_Goompapa_Angry, 0, MSG_CH0_005F) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(15 * DT) + Call(SetNpcAnimation, NPC_Goompapa, ANIM_Goompapa_Idle) + Wait(15 * DT) + Call(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_0060) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_CH0_0061) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Goompapa, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_CH0_0062) + Wait(10 * DT) + Call(SetNpcSpeed, NPC_Goombario, Float(2.0)) + Call(EnableNpcAI, NPC_Goombario, TRUE) + Call(EnableNpcAI, NPC_Goomama, TRUE) + Call(GetNpcPos, NPC_Goombaria, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Goombaria, LVar0, LVar1, LVar2) + Call(EnableNpcShadow, NPC_Goombaria, TRUE) + Call(SetNpcFlagBits, NPC_Goombaria, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcFlagBits, NPC_Goombaria, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(SetNpcFlagBits, NPC_Goompa, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_Goompa, NPC_FLAG_FLYING, TRUE) + Call(SetNpcPos, NPC_Goompa, NPC_DISPOSE_LOCATION) + Call(EnableNpcShadow, NPC_Goompa, FALSE) + Set(GB_StoryProgress, STORY_CH0_GATE_CRUSHED) + Thread + Call(ResetCam, CAM_DEFAULT, Float(3.0 / DT)) + EndThread + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Call(SetNpcAnimation, NPC_Goompapa, ANIM_Goompapa_Idle) + Call(N(SetWanderTerritory_6), NPC_Goomama, 1) + Call(BindNpcAI, NPC_Goomama, Ref(N(EVS_NpcIdle_SwitchedWander_6))) + Call(N(SetWanderTerritory_6), NPC_Goombario, 2) + Call(BindNpcAI, NPC_Goombario, Ref(N(EVS_NpcIdle_SwitchedWander_6))) + Call(N(SetWanderTerritory_6), NPC_Goombaria, 3) + Call(BindNpcAI, NPC_Goombaria, Ref(N(EVS_NpcIdle_SwitchedWander_6))) + Call(SetNpcFlagBits, NPC_Goombaria, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcFlagBits, NPC_Goompapa, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Return + End }; diff --git a/src/world/area_kmr/kmr_02/kmr_02_8_foliage.c b/src/world/area_kmr/kmr_02/kmr_02_8_foliage.c index 13c309dc3dc..cf97d334d79 100644 --- a/src/world/area_kmr/kmr_02/kmr_02_8_foliage.c +++ b/src/world/area_kmr/kmr_02/kmr_02_8_foliage.c @@ -95,16 +95,16 @@ BombTrigger N(BombPos_Tree1) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o356, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o357, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o414, 1, 0) - EVT_SET(GF_KMR02_Tree1_Goomnut, FALSE) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o570, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(SearchBush_Bush1))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o356, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush2))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o357, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush3))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o414, 1, 0) + Set(GF_KMR02_Tree1_Goomnut, FALSE) + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o570, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Return + End }; diff --git a/src/world/area_kmr/kmr_02/wander_territories.inc.c b/src/world/area_kmr/kmr_02/wander_territories.inc.c index 9ae91f61c76..d181c936615 100644 --- a/src/world/area_kmr/kmr_02/wander_territories.inc.c +++ b/src/world/area_kmr/kmr_02/wander_territories.inc.c @@ -74,7 +74,7 @@ MobileAISettings N(AISettings_SwitchedWander) = { }; EvtScript N(EVS_NpcIdle_SwitchedWander) = { - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_SwitchedWander))) - EVT_RETURN - EVT_END + Call(BasicAI_Main, Ref(N(AISettings_SwitchedWander))) + Return + End }; diff --git a/src/world/area_kmr/kmr_03/kmr_03_1_music.c b/src/world/area_kmr/kmr_03/kmr_03_1_music.c index 605b4401407..66a2c6a7c0c 100644 --- a/src/world/area_kmr/kmr_03/kmr_03_1_music.c +++ b/src/world/area_kmr/kmr_03/kmr_03_1_music.c @@ -1,7 +1,7 @@ #include "kmr_03.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) + Return + End }; diff --git a/src/world/area_kmr/kmr_03/kmr_03_2_main.c b/src/world/area_kmr/kmr_03/kmr_03_2_main.c index 973b3232b5d..1ab670f8345 100644 --- a/src/world/area_kmr/kmr_03/kmr_03_2_main.c +++ b/src/world/area_kmr/kmr_03/kmr_03_2_main.c @@ -4,31 +4,31 @@ EvtScript N(EVS_ExitWalk_kmr_04_0) = EVT_EXIT_WALK(60, kmr_03_ENTRY_0, "kmr_04", EvtScript N(EVS_ExitWalk_kmr_05_0) = EVT_EXIT_WALK(60, kmr_03_ENTRY_1, "kmr_05", kmr_05_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kmr_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kmr_05_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kmr_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kmr_05_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_GOOMBA_VILLAGE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_SET(AF_KMR_08, FALSE) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(ClearDefeatedEnemies) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupFoliage)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, kmr_03_ENTRY_2) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_ELSE - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_EXEC(N(EVS_Scene_FallingDown)) - EVT_END_IF - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_GOOMBA_VILLAGE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Set(AF_KMR_08, FALSE) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(ClearDefeatedEnemies) + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupFoliage)) + Exec(N(EVS_SetupMusic)) + Call(GetEntryID, LVar0) + IfNe(LVar0, kmr_03_ENTRY_2) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Else + Exec(N(EVS_BindExitTriggers)) + Exec(N(EVS_Scene_FallingDown)) + EndIf + Wait(1) + Return + End }; diff --git a/src/world/area_kmr/kmr_03/kmr_03_3_npc.c b/src/world/area_kmr/kmr_03/kmr_03_3_npc.c index 9572bbb3a28..52192d303ec 100644 --- a/src/world/area_kmr/kmr_03/kmr_03_3_npc.c +++ b/src/world/area_kmr/kmr_03/kmr_03_3_npc.c @@ -22,146 +22,146 @@ NpcSettings N(NpcSettings_Goompa) = { }; EvtScript N(EVS_NpcAux_Goompa) = { - EVT_LABEL(1) - EVT_IF_EQ(AF_KMR_08, TRUE) - EVT_LABEL(100) - EVT_CALL(AwaitPlayerLeave, 294, 123, 170) - EVT_CALL(EnableNpcAI, NPC_Goompa, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcSpeed, NPC_Goompa, EVT_FLOAT(4.0)) - EVT_CALL(SetNpcAnimation, NPC_Goompa, ANIM_Goompa_Run) - EVT_CALL(N(func_802401B0_8C8140)) - EVT_CALL(GetAngleToPlayer, NPC_Goompa, LVar2) - EVT_LOOP(LVar1) - EVT_CALL(GetNpcPos, NPC_Goompa, LVar7, LVar8, LVar9) - EVT_CALL(AddVectorPolar, LVar7, LVar9, EVT_FLOAT(4.0), LVar2) - EVT_CALL(SetNpcPos, NPC_Goompa, LVar7, LVar8, LVar9) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlayerFaceNpc, NPC_Goompa, 3) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, 243, 243, 0) - EVT_CALL(SetNpcVar, NPC_Goompa, 0, 1) - EVT_CALL(EnableNpcAI, NPC_Goompa, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_GOTO(100) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(1) - EVT_RETURN - EVT_END + Label(1) + IfEq(AF_KMR_08, TRUE) + Label(100) + Call(AwaitPlayerLeave, 294, 123, 170) + Call(EnableNpcAI, NPC_Goompa, FALSE) + Call(DisablePlayerInput, TRUE) + Call(SetNpcSpeed, NPC_Goompa, Float(4.0)) + Call(SetNpcAnimation, NPC_Goompa, ANIM_Goompa_Run) + Call(N(func_802401B0_8C8140)) + Call(GetAngleToPlayer, NPC_Goompa, LVar2) + Loop(LVar1) + Call(GetNpcPos, NPC_Goompa, LVar7, LVar8, LVar9) + Call(AddVectorPolar, LVar7, LVar9, Float(4.0), LVar2) + Call(SetNpcPos, NPC_Goompa, LVar7, LVar8, LVar9) + Wait(1) + EndLoop + Call(PlayerFaceNpc, NPC_Goompa, 3) + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, 243, 243, 0) + Call(SetNpcVar, NPC_Goompa, 0, 1) + Call(EnableNpcAI, NPC_Goompa, TRUE) + Call(DisablePlayerInput, FALSE) + Goto(100) + EndIf + Wait(1) + Goto(1) + Return + End }; EvtScript N(EVS_NpcAI_Goompa) = { - EVT_LABEL(1) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_CH0_FELL_OFF_CLIFF) - EVT_LABEL(89) - EVT_CALL(N(CheckPositionRelativeToPlane), -118, 86, -70, -15) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(89) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcAux, NPC_Goompa, 0) - EVT_CALL(PlaySoundAtNpc, NPC_Goompa, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_Goompa, EMOTE_EXCLAMATION, 45, 15, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(15 * DT) - EVT_CALL(NpcFacePlayer, NPC_SELF, 5) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_00A6) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -220, 20, -72) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -20, 0, 68) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-8.5)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 275) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.5 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(2.0)) - EVT_CALL(PlayerMoveTo, -38, 68, 0) - EVT_END_THREAD - EVT_CALL(GetNpcPos, NPC_Goompa, LVar7, LVar8, LVar9) - EVT_CALL(SetNpcSpeed, NPC_Goompa, EVT_FLOAT(4.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_Goompa, ANIM_Goompa_Run) - EVT_CALL(NpcMoveTo, NPC_Goompa, 0, 70, 0) - EVT_CALL(SetNpcAnimation, NPC_Goompa, ANIM_Goompa_Idle) - EVT_CALL(InterpNpcYaw, NPC_Goompa, 276, 20 * DT) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_00A7) - EVT_WAIT(5 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_00A8) - EVT_CALL(N(ChangeNpcToPartner), 0, 5) - EVT_SET(GB_StoryProgress, STORY_CH0_GOOMPA_JOINED_PARTY) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -220, 20, -72) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_WAIT(1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Label(1) + Switch(GB_StoryProgress) + CaseEq(STORY_CH0_FELL_OFF_CLIFF) + Label(89) + Call(N(CheckPositionRelativeToPlane), -118, 86, -70, -15) + Wait(1) + IfEq(LVar0, 0) + Goto(89) + EndIf + Call(DisablePlayerInput, TRUE) + Call(SetNpcAux, NPC_Goompa, 0) + Call(PlaySoundAtNpc, NPC_Goompa, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_Goompa, EMOTE_EXCLAMATION, 45, 15, EMOTER_NPC, 0, 0, 0, 0) + Wait(15 * DT) + Call(NpcFacePlayer, NPC_SELF, 5) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_00A6) + Call(UseSettingsFrom, CAM_DEFAULT, -220, 20, -72) + Call(SetPanTarget, CAM_DEFAULT, -20, 0, 68) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-8.5)) + Call(SetCamDistance, CAM_DEFAULT, 275) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.5 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Wait(20 * DT) + Call(SetPlayerSpeed, Float(2.0)) + Call(PlayerMoveTo, -38, 68, 0) + EndThread + Call(GetNpcPos, NPC_Goompa, LVar7, LVar8, LVar9) + Call(SetNpcSpeed, NPC_Goompa, Float(4.0 / DT)) + Call(SetNpcAnimation, NPC_Goompa, ANIM_Goompa_Run) + Call(NpcMoveTo, NPC_Goompa, 0, 70, 0) + Call(SetNpcAnimation, NPC_Goompa, ANIM_Goompa_Idle) + Call(InterpNpcYaw, NPC_Goompa, 276, 20 * DT) + Wait(30 * DT) + Call(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_00A7) + Wait(5 * DT) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(30 * DT) + Call(SpeakToPlayer, NPC_Goompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_00A8) + Call(N(ChangeNpcToPartner), 0, 5) + Set(GB_StoryProgress, STORY_CH0_GOOMPA_JOINED_PARTY) + Call(UseSettingsFrom, CAM_DEFAULT, -220, 20, -72) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Wait(1) + EndSwitch + Return + End }; EvtScript N(EVS_NpcHit_Goompa) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Goompa_Injured) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Goompa_Idle) - EVT_ADD(MV_Unk_00, 1) - EVT_IF_LT(MV_Unk_00, 3) - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_CALL(SetNpcVar, NPC_Goompa, 0, 1) - EVT_IF_EQ(AF_KMR_06, TRUE) - EVT_ELSE - EVT_SET(AF_KMR_06, TRUE) - EVT_SET(AF_KMR_07, FALSE) - EVT_END_IF - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_CALL(SetNpcVar, NPC_Goompa, 0, 1) - EVT_IF_EQ(AF_KMR_07, TRUE) - EVT_ELSE - EVT_SET(AF_KMR_06, FALSE) - EVT_SET(AF_KMR_07, TRUE) - EVT_END_IF - EVT_END_SWITCH - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Goompa_Run) - EVT_ELSE - EVT_WAIT(10) - EVT_CALL(GetNpcPos, NPC_Goompa, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcPos, NPC_Goompa, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_Goompa, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(SetNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_Goompa))) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Goompa))) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_Goompa_Injured) + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_Goompa_Idle) + Add(MV_Unk_00, 1) + IfLt(MV_Unk_00, 3) + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_JUMP) + Call(SetNpcVar, NPC_Goompa, 0, 1) + IfEq(AF_KMR_06, TRUE) + Else + Set(AF_KMR_06, TRUE) + Set(AF_KMR_07, FALSE) + EndIf + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Call(SetNpcVar, NPC_Goompa, 0, 1) + IfEq(AF_KMR_07, TRUE) + Else + Set(AF_KMR_06, FALSE) + Set(AF_KMR_07, TRUE) + EndIf + EndSwitch + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_Goompa_Run) + Else + Wait(10) + Call(GetNpcPos, NPC_Goompa, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcPos, NPC_Goompa, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_Goompa, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(EnablePartnerAI) + Call(SetNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_Goompa))) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_Goompa))) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Goompa) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Goompa))) - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_Goompa))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_Goompa))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_GE(STORY_CH0_GOOMPA_JOINED_PARTY) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcAI_Goompa))) + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_Goompa))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_Goompa))) + Switch(GB_StoryProgress) + CaseGe(STORY_CH0_GOOMPA_JOINED_PARTY) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING, TRUE) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndSwitch + Return + End }; NpcData N(NpcData_GoombaFamily) = { diff --git a/src/world/area_kmr/kmr_03/kmr_03_4_entity.c b/src/world/area_kmr/kmr_03/kmr_03_4_entity.c index 539cf1e5dcb..709983c426c 100644 --- a/src/world/area_kmr/kmr_03/kmr_03_4_entity.c +++ b/src/world/area_kmr/kmr_03/kmr_03_4_entity.c @@ -2,16 +2,16 @@ #include "entity.h" EvtScript N(EVS_OnSmashBlock1) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GB_StoryProgress, STORY_CH0_LEFT_THE_PLAYGROUND) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) + Set(GB_StoryProgress, STORY_CH0_LEFT_THE_PLAYGROUND) + Return + End }; EvtScript N(EVS_OnSmashBlock2) = { - EVT_SET(GF_KMR03_Hammer1Block, TRUE) - EVT_RETURN - EVT_END + Set(GF_KMR03_Hammer1Block, TRUE) + Return + End }; #include "world/common/EnableCameraFollowPlayerY.inc.c" @@ -31,41 +31,41 @@ API_CALLABLE(func_80240358_8C82E8) { } EvtScript N(EVS_TetherCameraToPlayer) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH0_LEFT_THE_PLAYGROUND) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer1Block), 45, 0, 70, 15, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnSmashBlock1))) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_IF_EQ(GF_KMR03_Hammer1Block, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer2Block), 230, 0, 310, 15, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnSmashBlock2))) - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 230, 60, 310, 15, ITEM_REPEL_GEL, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KMR03_HiddenItem_RepelGel) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 230, 50, -160, 15, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 165, 0, 380, 20, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -170, 0, 370, 43, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KMR03_ItemBlock_Coin) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SimpleSpring), 345, 75, -250, 0, 100, MAKE_ENTITY_END) - EVT_CALL(MakeItemEntity, ITEM_COIN, 345, 205, -250, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KMR03_Item_CoinA) - EVT_CALL(MakeItemEntity, ITEM_COIN, 345, 230, -250, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KMR03_Item_CoinB) - EVT_CALL(MakeItemEntity, ITEM_COIN, 345, 255, -250, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KMR03_Item_CoinC) - EVT_CALL(MakeItemEntity, ITEM_COIN, 345, 280, -250, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KMR03_Item_CoinD) - EVT_CALL(MakeItemEntity, ITEM_FIRE_FLOWER, 229, 250, -156, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KMR02_Item_FireFlower) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 300, 0, 150, 0, MODEL_jimen_1, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_KMR03_HiddenPanel) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), 130, 60, 0, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH0_LEFT_THE_PLAYGROUND) + Call(MakeEntity, Ref(Entity_Hammer1Block), 45, 0, 70, 15, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnSmashBlock1))) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) + EndIf + IfEq(GF_KMR03_Hammer1Block, FALSE) + Call(MakeEntity, Ref(Entity_Hammer2Block), 230, 0, 310, 15, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnSmashBlock2))) + EndIf + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 230, 60, 310, 15, ITEM_REPEL_GEL, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KMR03_HiddenItem_RepelGel) + Call(MakeEntity, Ref(Entity_BrickBlock), 230, 50, -160, 15, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), 165, 0, 380, 20, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_YellowBlock), -170, 0, 370, 43, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KMR03_ItemBlock_Coin) + Call(MakeEntity, Ref(Entity_SimpleSpring), 345, 75, -250, 0, 100, MAKE_ENTITY_END) + Call(MakeItemEntity, ITEM_COIN, 345, 205, -250, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KMR03_Item_CoinA) + Call(MakeItemEntity, ITEM_COIN, 345, 230, -250, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KMR03_Item_CoinB) + Call(MakeItemEntity, ITEM_COIN, 345, 255, -250, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KMR03_Item_CoinC) + Call(MakeItemEntity, ITEM_COIN, 345, 280, -250, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KMR03_Item_CoinD) + Call(MakeItemEntity, ITEM_FIRE_FLOWER, 229, 250, -156, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KMR02_Item_FireFlower) + Call(MakeEntity, Ref(Entity_HiddenPanel), 300, 0, 150, 0, MODEL_jimen_1, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_KMR03_HiddenPanel) + Call(MakeEntity, Ref(Entity_HeartBlock), 130, 60, 0, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_kmr/kmr_03/kmr_03_5_foliage.c b/src/world/area_kmr/kmr_03/kmr_03_5_foliage.c index 7239b7dc4fb..c9b464000cc 100644 --- a/src/world/area_kmr/kmr_03/kmr_03_5_foliage.c +++ b/src/world/area_kmr/kmr_03/kmr_03_5_foliage.c @@ -28,22 +28,22 @@ FoliageVectorList N(Tree1_Effects) = { }; EvtScript N(EVS_OnShakeTree1) = { - EVT_IF_EQ(GF_KMR03_Tree1_Mushroom, TRUE) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(AF_JAN01_TreeDrop_StarPiece, TRUE) - EVT_RETURN - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, -30) - EVT_CALL(MakeItemEntity, ITEM_MUSHROOM, -23, 100, 35, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_KMR03_Tree1_Mushroom) - EVT_ELSE - EVT_CALL(MakeItemEntity, ITEM_MUSHROOM, -85, 100, 16, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_KMR03_Tree1_Mushroom) - EVT_END_IF - EVT_SET(AF_JAN01_TreeDrop_StarPiece, TRUE) - EVT_RETURN - EVT_END + IfEq(GF_KMR03_Tree1_Mushroom, TRUE) + Return + EndIf + IfEq(AF_JAN01_TreeDrop_StarPiece, TRUE) + Return + EndIf + Wait(10) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, -30) + Call(MakeItemEntity, ITEM_MUSHROOM, -23, 100, 35, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_KMR03_Tree1_Mushroom) + Else + Call(MakeItemEntity, ITEM_MUSHROOM, -85, 100, 16, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_KMR03_Tree1_Mushroom) + EndIf + Set(AF_JAN01_TreeDrop_StarPiece, TRUE) + Return + End }; ShakeTreeConfig N(ShakeTree_Tree1) = { @@ -59,11 +59,11 @@ BombTrigger N(BombPos_Tree1) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_km, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_ki, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(SearchBush_Bush1))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_km, 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_ki, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Return + End }; diff --git a/src/world/area_kmr/kmr_03/kmr_03_6_fall_down.c b/src/world/area_kmr/kmr_03/kmr_03_6_fall_down.c index 85aba9c2af3..9f71d1fd159 100644 --- a/src/world/area_kmr/kmr_03/kmr_03_6_fall_down.c +++ b/src/world/area_kmr/kmr_03/kmr_03_6_fall_down.c @@ -2,92 +2,92 @@ #include "sprite/player.h" EvtScript N(EVS_Scene_FallingDown) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -270, 20, -80) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -270, 20, -80) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(700.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_IF_GE(GB_StoryProgress, STORY_CH0_FOUND_HAMMER) - EVT_CALL(SetPlayerPos, NPC_DISPOSE_LOCATION) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetPlayerPos, -224, 20, -80) - EVT_CALL(SetNpcPos, NPC_PARTNER, -224, 20, -80) - EVT_WAIT(20 * DT) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerPos, LVar0, NPC_DISPOSE_POS_Y, LVar2) - EVT_WAIT(30 * DT) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 220) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_WAIT(18 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_PAPER_GLIDE_1, SOUND_SPACE_DEFAULT) - EVT_WAIT(30 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_PAPER_GLIDE_2, SOUND_SPACE_DEFAULT) - EVT_WAIT(28 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_PAPER_GLIDE_1, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_CALL(HidePlayerShadow, TRUE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetPlayerPos, -224, 120, -80) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, -270, 20, -80) + Call(SetPanTarget, CAM_DEFAULT, -270, 20, -80) + Call(SetCamDistance, CAM_DEFAULT, Float(700.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + IfGe(GB_StoryProgress, STORY_CH0_FOUND_HAMMER) + Call(SetPlayerPos, NPC_DISPOSE_LOCATION) + Call(DisablePlayerInput, TRUE) + Call(SetPlayerPos, -224, 20, -80) + Call(SetNpcPos, NPC_PARTNER, -224, 20, -80) + Wait(20 * DT) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerPos, LVar0, NPC_DISPOSE_POS_Y, LVar2) + Wait(30 * DT) + Call(SetCamDistance, CAM_DEFAULT, 220) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Wait(18 * DT) + Call(PlaySoundAtPlayer, SOUND_PAPER_GLIDE_1, SOUND_SPACE_DEFAULT) + Wait(30 * DT) + Call(PlaySoundAtPlayer, SOUND_PAPER_GLIDE_2, SOUND_SPACE_DEFAULT) + Wait(28 * DT) + Call(PlaySoundAtPlayer, SOUND_PAPER_GLIDE_1, SOUND_SPACE_DEFAULT) + EndThread + Call(HidePlayerShadow, TRUE) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetPlayerPos, -224, 120, -80) + Call(InterpPlayerYaw, 90, 0) + Label(0) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) #if VERSION_PAL - EVT_ADDF(LVar1, EVT_FLOAT(-2 * DT)) + AddF(LVar1, Float(-2 * DT)) #else - EVT_ADD(LVar1, -2) + Add(LVar1, -2) #endif - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar1, 86) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetPlayerPos, -310, 20, -80) - EVT_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -310, 20, -80) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.2 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_CALL(SetPlayerImgFXFlags, IMGFX_FLAG_2000 | IMGFX_FLAG_800) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_FLUTTER_DOWN, 1, 1, 0) - EVT_WAIT(100 * DT) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(HidePlayerShadow, FALSE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_BeforeJump) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Jump) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(PlayerJump, LVar0, LVar1, LVar2, 10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_THREAD - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 * DT)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_END_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(SetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar1, 86) + Goto(0) + EndIf + Call(SetPlayerPos, -310, 20, -80) + Thread + Wait(20 * DT) + Call(SetPanTarget, CAM_DEFAULT, -310, 20, -80) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.2 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Call(SetPlayerImgFXFlags, IMGFX_FLAG_2000 | IMGFX_FLAG_800) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_FLUTTER_DOWN, 1, 1, 0) + Wait(100 * DT) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) + Call(HidePlayerShadow, FALSE) + Call(SetPlayerAnimation, ANIM_Mario1_BeforeJump) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Jump) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerJumpscale, Float(1.0)) + Call(PlayerJump, LVar0, LVar1, LVar2, 10 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Thread + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 * DT)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + EndThread + Wait(30 * DT) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_kmr/kmr_04/kmr_04_1_music.c b/src/world/area_kmr/kmr_04/kmr_04_1_music.c index 1ca2efa48df..d957ffe5964 100644 --- a/src/world/area_kmr/kmr_04/kmr_04_1_music.c +++ b/src/world/area_kmr/kmr_04/kmr_04_1_music.c @@ -1,21 +1,21 @@ #include "kmr_04.h" EvtScript N(EVS_SetNormalMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) + Return + End }; EvtScript N(EVS_SetJrTroopaMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_JR_TROOPA_THEME, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_JR_TROOPA_THEME, 0, 8) + Return + End }; EvtScript N(EVS_PlayUpgradeSong) = { - EVT_CALL(PushSong, SONG_ITEM_UPGRADE, 0) - EVT_WAIT(130) - EVT_CALL(PopSong) - EVT_RETURN - EVT_END + Call(PushSong, SONG_ITEM_UPGRADE, 0) + Wait(130) + Call(PopSong) + Return + End }; diff --git a/src/world/area_kmr/kmr_04/kmr_04_2_main.c b/src/world/area_kmr/kmr_04/kmr_04_2_main.c index c63949f7964..ab2a82dbc98 100644 --- a/src/world/area_kmr/kmr_04/kmr_04_2_main.c +++ b/src/world/area_kmr/kmr_04/kmr_04_2_main.c @@ -3,43 +3,43 @@ EvtScript N(EVS_ExitWalk_kmr_03_0) = EVT_EXIT_WALK(60, kmr_04_ENTRY_0, "kmr_03", kmr_03_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kmr_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kmr_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, kmr_04_ENTRY_A) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_ELSE - EVT_EXEC(EnterPostPipe) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, 1) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(GetEntryID, LVar0) + IfNe(LVar0, kmr_04_ENTRY_A) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Else + Exec(EnterPostPipe) + Exec(N(EVS_BindExitTriggers)) + EndIf + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_GOOMBA_VILLAGE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_SET(AF_KMR_09, FALSE) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(ClearDefeatedEnemies) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupFoliage)) - EVT_EXEC(N(EVS_SetNormalMusic)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit1, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_GOOMBA_VILLAGE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Set(AF_KMR_09, FALSE) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(ClearDefeatedEnemies) + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupFoliage)) + Exec(N(EVS_SetNormalMusic)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit1, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_kmr/kmr_04/kmr_04_3_npc.c b/src/world/area_kmr/kmr_04/kmr_04_3_npc.c index 0b0d02e81f6..25bed3bad42 100644 --- a/src/world/area_kmr/kmr_04/kmr_04_3_npc.c +++ b/src/world/area_kmr/kmr_04/kmr_04_3_npc.c @@ -8,17 +8,17 @@ NpcSettings N(NpcSettings_JrTroopa) = { }; EvtScript N(EVS_NpcAuxAI_Goompa) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Return + End }; EvtScript N(EVS_NpcAux_Goompa) = { - EVT_RETURN - EVT_END + Return + End }; #include "world/common/todo/CheckPartnerFlags1000.inc.c" @@ -30,215 +30,215 @@ API_CALLABLE(N(GetPlayerHP)) { } EvtScript N(EVS_NpcAI_Goompa) = { - EVT_LABEL(1) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_CH0_GOOMPA_JOINED_PARTY) - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_IF_LE(LVar0, 370) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(func_802CF56C, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(2.0 / DT)) - EVT_CALL(NpcMoveTo, LVar0, LVar1, LVar2, 0) - EVT_WAIT(5 * DT) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_00A9) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle) - EVT_CALL(EnablePartnerAI) - EVT_WAIT(10 * DT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_SET(GB_StoryProgress, STORY_CH0_LOOKING_FOR_HAMMER) - EVT_CASE_EQ(STORY_CH0_FOUND_HAMMER) - EVT_IF_EQ(AB_KMR_0, 0) - EVT_LABEL(10) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 360) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_GT(LVar0, 400) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_LT(LVar2, -36) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_GT(LVar2, 85) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(CheckPartnerFlags1000)) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Walk) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(3.0)) - EVT_CALL(NpcMoveTo, NPC_PARTNER, 420, 6, 0) - EVT_THREAD - EVT_WAIT(3 * DT) - EVT_CALL(PlayerFaceNpc, NPC_PARTNER, 3) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_00AC) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle) - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PlayerMoveTo, 395, 0, 0) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_END_THREAD - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_FLYING, TRUE) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(6.0)) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Run) - EVT_CALL(NpcMoveTo, NPC_PARTNER, 582, 6, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_FLYING, FALSE) - EVT_CALL(PlaySoundAtNpc, NPC_PARTNER, SOUND_GOOMPA_ATTACKED, SOUND_SPACE_DEFAULT) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_00AD) - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_CALL(SetNpcRotationPivot, NPC_PARTNER, 10) - EVT_LOOP(60 * DT) - EVT_ADD(LVar0, 53) - EVT_CALL(SetNpcRotation, NPC_PARTNER, 0, 0, LVar0) - EVT_CALL(PlayerFaceNpc, NPC_PARTNER, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcRotationPivot, NPC_PARTNER, 0) - EVT_CALL(SetNpcRotation, NPC_PARTNER, 0, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 15 * DT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_PLAY_EFFECT(EFFECT_DAMAGE_STARS, FX_DAMAGE_STARS_1, 495, 15, 9, 460, 15, 9, 6) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Injured) - EVT_CALL(NpcMoveTo, NPC_PARTNER, 250, 6, 60 * DT) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Injured) - EVT_CALL(SetNpcRotation, NPC_PARTNER, 0, 0, 0) - EVT_THREAD - EVT_LOOP(20 * DT) - EVT_CALL(SetNpcPos, NPC_PARTNER, 250, 0, 6) - EVT_WAIT(3) - EVT_CALL(SetNpcPos, NPC_PARTNER, 250, 0, 0) - EVT_WAIT(3) - EVT_END_LOOP - EVT_END_THREAD - EVT_SET(AB_KMR_0, 1) - EVT_END_IF - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(1) - EVT_RETURN - EVT_END + Label(1) + Switch(GB_StoryProgress) + CaseEq(STORY_CH0_GOOMPA_JOINED_PARTY) + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + IfLe(LVar0, 370) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, TRUE) + Call(func_802CF56C, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(SetNpcSpeed, NPC_PARTNER, Float(2.0 / DT)) + Call(NpcMoveTo, LVar0, LVar1, LVar2, 0) + Wait(5 * DT) + Call(DisablePartnerAI, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_00A9) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle) + Call(EnablePartnerAI) + Wait(10 * DT) + Call(DisablePlayerInput, FALSE) + Set(GB_StoryProgress, STORY_CH0_LOOKING_FOR_HAMMER) + CaseEq(STORY_CH0_FOUND_HAMMER) + IfEq(AB_KMR_0, 0) + Label(10) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, 360) + Goto(10) + EndIf + IfGt(LVar0, 400) + Goto(10) + EndIf + IfLt(LVar2, -36) + Goto(10) + EndIf + IfGt(LVar2, 85) + Goto(10) + EndIf + Call(DisablePlayerInput, TRUE) + Call(N(CheckPartnerFlags1000)) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Walk) + Call(SetNpcSpeed, NPC_PARTNER, Float(3.0)) + Call(NpcMoveTo, NPC_PARTNER, 420, 6, 0) + Thread + Wait(3 * DT) + Call(PlayerFaceNpc, NPC_PARTNER, 3) + EndThread + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_00AC) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle) + Wait(10 * DT) + Thread + Call(SetPlayerSpeed, Float(3.0 / DT)) + Call(PlayerMoveTo, 395, 0, 0) + Call(InterpPlayerYaw, 90, 0) + EndThread + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_FLYING, TRUE) + Call(SetNpcSpeed, NPC_PARTNER, Float(6.0)) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Run) + Call(NpcMoveTo, NPC_PARTNER, 582, 6, 0) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_FLYING, FALSE) + Call(PlaySoundAtNpc, NPC_PARTNER, SOUND_GOOMPA_ATTACKED, SOUND_SPACE_DEFAULT) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_00AD) + Wait(10 * DT) + Thread + Set(LVar0, 0) + Call(SetNpcRotationPivot, NPC_PARTNER, 10) + Loop(60 * DT) + Add(LVar0, 53) + Call(SetNpcRotation, NPC_PARTNER, 0, 0, LVar0) + Call(PlayerFaceNpc, NPC_PARTNER, FALSE) + Wait(1) + EndLoop + Call(SetNpcRotationPivot, NPC_PARTNER, 0) + Call(SetNpcRotation, NPC_PARTNER, 0, 0, 0) + EndThread + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 15 * DT, Float(1.0)) + EndThread + PlayEffect(EFFECT_DAMAGE_STARS, FX_DAMAGE_STARS_1, 495, 15, 9, 460, 15, 9, 6) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Injured) + Call(NpcMoveTo, NPC_PARTNER, 250, 6, 60 * DT) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Injured) + Call(SetNpcRotation, NPC_PARTNER, 0, 0, 0) + Thread + Loop(20 * DT) + Call(SetNpcPos, NPC_PARTNER, 250, 0, 6) + Wait(3) + Call(SetNpcPos, NPC_PARTNER, 250, 0, 0) + Wait(3) + EndLoop + EndThread + Set(AB_KMR_0, 1) + EndIf + EndSwitch + Wait(1) + Goto(1) + Return + End }; EvtScript N(EVS_NpcInteract_Goompa) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcDefeat_Goompa) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcIdle_JrTroopa) = { - EVT_CALL(func_800445D4, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(100) - EVT_LABEL(0) - EVT_SWITCH(AB_KMR_0) - EVT_CASE_EQ(1) - EVT_EXEC(N(EVS_SetJrTroopaMusic)) - EVT_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 430, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(275.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.5), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(SetNpcPos, NPC_JrTroopa, 630, 0, 0) - EVT_CALL(EnableNpcShadow, NPC_SELF, TRUE) - EVT_WAIT(1) - EVT_CALL(PlayerFaceNpc, NPC_JrTroopa, 3) - EVT_CALL(SetNpcSpeed, NPC_JrTroopa, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_JrTroopa_Run) - EVT_CALL(NpcMoveTo, NPC_JrTroopa, 465, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_JrTroopa_PointIdle) - EVT_CALL(PlayerFaceNpc, NPC_JrTroopa, 3) - EVT_CALL(SpeakToPlayer, NPC_JrTroopa, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointIdle, 0, MSG_CH0_00AE) - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 430, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_END_THREAD - EVT_CALL(StartBossBattle, SONG_JR_TROOPA_BATTLE) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(0) - EVT_CASE_OR_EQ(101) - EVT_CASE_OR_EQ(102) - EVT_CASE_OR_EQ(3) - EVT_CASE_OR_EQ(103) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(func_800445D4, LVar0) + Switch(LVar0) + CaseEq(100) + Label(0) + Switch(AB_KMR_0) + CaseEq(1) + Exec(N(EVS_SetJrTroopaMusic)) + Thread + Wait(20 * DT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, 430, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(275.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.5), Float(-7.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndThread + Call(SetNpcPos, NPC_JrTroopa, 630, 0, 0) + Call(EnableNpcShadow, NPC_SELF, TRUE) + Wait(1) + Call(PlayerFaceNpc, NPC_JrTroopa, 3) + Call(SetNpcSpeed, NPC_JrTroopa, Float(3.0 / DT)) + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_JrTroopa_Run) + Call(NpcMoveTo, NPC_JrTroopa, 465, 0, 0) + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_JrTroopa_PointIdle) + Call(PlayerFaceNpc, NPC_JrTroopa, 3) + Call(SpeakToPlayer, NPC_JrTroopa, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointIdle, 0, MSG_CH0_00AE) + Wait(10 * DT) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, 430, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + EndThread + Call(StartBossBattle, SONG_JR_TROOPA_BATTLE) + EndSwitch + Wait(1) + Goto(0) + CaseOrEq(101) + CaseOrEq(102) + CaseOrEq(3) + CaseOrEq(103) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_NpcDefeat_JrTroopa) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 400, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(275.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Hurt) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Hurt, ANIM_JrTroopa_Hurt, 0, MSG_CH0_00B5) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(6.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Run) - EVT_CALL(NpcMoveTo, NPC_SELF, 564, 10, 0) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_WAIT(60 * DT) - EVT_CALL(SetNpcPos, NPC_SELF, 564, 0, 10) - EVT_CALL(NpcMoveTo, NPC_SELF, 435, 10, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointIdle, 0, MSG_CH0_00B6) - EVT_CALL(NpcMoveTo, NPC_SELF, 564, 10, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Idle) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_THREAD + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, 400, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(275.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-7.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlayerFaceNpc, NPC_SELF, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Hurt) + Call(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Hurt, ANIM_JrTroopa_Hurt, 0, MSG_CH0_00B5) + Call(SetNpcSpeed, NPC_SELF, Float(6.0 / DT)) + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Run) + Call(NpcMoveTo, NPC_SELF, 564, 10, 0) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Wait(60 * DT) + Call(SetNpcPos, NPC_SELF, 564, 0, 10) + Call(NpcMoveTo, NPC_SELF, 435, 10, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointIdle, 0, MSG_CH0_00B6) + Call(NpcMoveTo, NPC_SELF, 564, 10, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Idle) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Thread #if VERSION_PAL - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4 * DT)) + Call(ResetCam, CAM_DEFAULT, Float(4 * DT)) #else - EVT_CALL(ResetCam, CAM_DEFAULT, 4) + Call(ResetCam, CAM_DEFAULT, 4) #endif - EVT_END_THREAD - EVT_EXEC(N(EVS_SetNormalMusic)) - EVT_SET(AB_KMR_0, 0) - EVT_SET(GB_StoryProgress, STORY_CH0_DEFEATED_JR_TROOPA) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + EndThread + Exec(N(EVS_SetNormalMusic)) + Set(AB_KMR_0, 0) + Set(GB_StoryProgress, STORY_CH0_DEFEATED_JR_TROOPA) + Call(DisablePlayerInput, FALSE) + EndSwitch + Return + End }; NpcSettings N(NpcSettings_Goompa) = { @@ -254,12 +254,12 @@ NpcSettings N(NpcSettings_Goompa) = { }; EvtScript N(EVS_NpcInit_JrTroopa) = { - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_JrTroopa))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_JrTroopa))) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_JrTroopa))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_JrTroopa))) + Return + End }; NpcData N(NpcData_JrTroopa) = { diff --git a/src/world/area_kmr/kmr_04/kmr_04_4_entity.c b/src/world/area_kmr/kmr_04/kmr_04_4_entity.c index 36479af7a43..7c3b6766125 100644 --- a/src/world/area_kmr/kmr_04/kmr_04_4_entity.c +++ b/src/world/area_kmr/kmr_04/kmr_04_4_entity.c @@ -2,23 +2,23 @@ #include "entity.h" EvtScript N(EVS_OnSmashBlock) = { - EVT_SET(GF_KMR04_Hammer1Block, TRUE) - EVT_RETURN - EVT_END + Set(GF_KMR04_Hammer1Block, TRUE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_KMR04_Hammer1Block, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer1Block), -80, 0, 400, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnSmashBlock))) - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), -230, 60, -140, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), -440, 60, 20, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 60, 0, 370, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 85, 0, 395, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), 100, 0, -70, 0, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KMR04_MultiCoinBrick) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 0, 60, 0, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + IfEq(GF_KMR04_Hammer1Block, FALSE) + Call(MakeEntity, Ref(Entity_Hammer1Block), -80, 0, 400, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnSmashBlock))) + EndIf + Call(MakeEntity, Ref(Entity_BrickBlock), -230, 60, -140, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), -440, 60, 20, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), 60, 0, 370, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), 85, 0, 395, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_MulticoinBlock), 100, 0, -70, 0, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KMR04_MultiCoinBrick) + Call(MakeEntity, Ref(Entity_SavePoint), 0, 60, 0, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_kmr/kmr_04/kmr_04_5_foliage.c b/src/world/area_kmr/kmr_04/kmr_04_5_foliage.c index c42f0cc7372..0292630322a 100644 --- a/src/world/area_kmr/kmr_04/kmr_04_5_foliage.c +++ b/src/world/area_kmr/kmr_04/kmr_04_5_foliage.c @@ -40,101 +40,101 @@ API_CALLABLE(N(func_80240444_8CAD44)) { } EvtScript N(EVS_GotHammer) = { - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_Lift) - EVT_CALL(GetPlayerPos, LVar5, LVar6, LVar7) - EVT_ADD(LVar6, 40) - EVT_CALL(MakeItemEntity, ITEM_HAMMER, LVar5, LVar6, LVar7, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVarC, LVar0) - EVT_ADD(LVar6, 16) - EVT_PLAY_EFFECT(EFFECT_GOT_ITEM_OUTLINE, 0, LVar5, LVar6, LVar7, EVT_FLOAT(1.0), LVar8) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 9, LVar5, LVar6, LVar7, EVT_FLOAT(1.0), 100) - EVT_EXEC(N(EVS_PlayUpgradeSong)) - EVT_THREAD - EVT_WAIT(4 * DT) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_ADD(LVar4, 50) - EVT_ADD(LVar5, 2) - EVT_ADD(LVar3, 8) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 3, LVar3, LVar4, LVar5, 20) - EVT_ADD(LVar3, -16) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 3, LVar3, LVar4, LVar5, 20) - EVT_END_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_EQ(MF_Unk_12, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DismissItemOutline, LVar8) - EVT_CALL(RemoveItemEntity, LVarC) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_RETURN - EVT_END + Call(SetPlayerAnimation, ANIM_MarioW1_Lift) + Call(GetPlayerPos, LVar5, LVar6, LVar7) + Add(LVar6, 40) + Call(MakeItemEntity, ITEM_HAMMER, LVar5, LVar6, LVar7, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVarC, LVar0) + Add(LVar6, 16) + PlayEffect(EFFECT_GOT_ITEM_OUTLINE, 0, LVar5, LVar6, LVar7, Float(1.0), LVar8) + PlayEffect(EFFECT_RADIAL_SHIMMER, 9, LVar5, LVar6, LVar7, Float(1.0), 100) + Exec(N(EVS_PlayUpgradeSong)) + Thread + Wait(4 * DT) + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Add(LVar4, 50) + Add(LVar5, 2) + Add(LVar3, 8) + PlayEffect(EFFECT_SPARKLES, 3, LVar3, LVar4, LVar5, 20) + Add(LVar3, -16) + PlayEffect(EFFECT_SPARKLES, 3, LVar3, LVar4, LVar5, 20) + EndThread + Loop(0) + Wait(1) + IfEq(MF_Unk_12, TRUE) + BreakLoop + EndIf + EndLoop + Call(DismissItemOutline, LVar8) + Call(RemoveItemEntity, LVarC) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Return + End }; EvtScript N(EVS_OnSearch_HammerBush) = { - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(8.0), 0, EVT_FLOAT(300.0), EVT_FLOAT(19.0), EVT_FLOAT(-9.0)) - EVT_SET(MF_Unk_12, FALSE) - EVT_EXEC(N(EVS_GotHammer)) - EVT_CALL(N(GiveWoodenHammer)) - EVT_WAIT(30 * DT) - EVT_CALL(N(SetMessageImage_HammerBlock)) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_FoundHammer, 160, 40) - EVT_SET(MF_Unk_12, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_00AA) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle) - EVT_SET(GB_StoryProgress, STORY_CH0_FOUND_HAMMER) - EVT_CALL(ClearPartnerMoveHistory, NPC_PARTNER) - EVT_CALL(EnablePartnerAI) - EVT_THREAD + Call(AdjustCam, CAM_DEFAULT, Float(8.0), 0, Float(300.0), Float(19.0), Float(-9.0)) + Set(MF_Unk_12, FALSE) + Exec(N(EVS_GotHammer)) + Call(N(GiveWoodenHammer)) + Wait(30 * DT) + Call(N(SetMessageImage_HammerBlock)) + Call(ShowMessageAtScreenPos, MSG_Menus_Inspect_FoundHammer, 160, 40) + Set(MF_Unk_12, TRUE) + Call(DisablePartnerAI, 0) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_00AA) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle) + Set(GB_StoryProgress, STORY_CH0_FOUND_HAMMER) + Call(ClearPartnerMoveHistory, NPC_PARTNER) + Call(EnablePartnerAI) + Thread #if VERSION_PAL - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(3 * DT)) + Call(ResetCam, CAM_DEFAULT, Float(3 * DT)) #else - EVT_CALL(ResetCam, CAM_DEFAULT, 3) + Call(ResetCam, CAM_DEFAULT, 3) #endif - EVT_END_THREAD - EVT_RETURN - EVT_END + EndThread + Return + End }; EvtScript N(EVS_OnSearchBush7) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH0_FOUND_HAMMER) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC_WAIT(N(EVS_OnSearch_HammerBush)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH0_FOUND_HAMMER) + Return + EndIf + Call(DisablePlayerInput, TRUE) + ExecWait(N(EVS_OnSearch_HammerBush)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_OnSearchBush8) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH0_FOUND_HAMMER) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(MakeLerp, 0, 85, 20 * DT, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o213, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_OnSearch_HammerBush)) - EVT_CALL(MakeLerp, 85, 0, 20 * DT, EASING_COS_IN_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o213, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH0_FOUND_HAMMER) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(MakeLerp, 0, 85, 20 * DT, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o213, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + ExecWait(N(EVS_OnSearch_HammerBush)) + Call(MakeLerp, 85, 0, 20 * DT, EASING_COS_IN_OUT) + Label(10) + Call(UpdateLerp) + Call(RotateModel, MODEL_o213, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(DisablePlayerInput, FALSE) + Return + End }; FoliageModelList N(Bush1_BushModels) = FOLIAGE_MODEL_LIST(MODEL_o181); @@ -404,34 +404,34 @@ BombTrigger N(BombPos_Tree2) = { }; EvtScript N(EVS_OnShakeTree3) = { - EVT_IF_EQ(GF_KMR04_Tree3_Dolly, TRUE) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(AF_KMR_09, TRUE) - EVT_RETURN - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(MakeItemEntity, ITEM_DOLLY, 250, 132, -100, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_KMR04_Tree3_Dolly) - EVT_SET(AF_KMR_09, TRUE) - EVT_THREAD - EVT_LABEL(10) - EVT_IF_EQ(GF_KMR04_Tree3_Dolly, FALSE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_EQ(LVar0, PARTNER_GOOMPA) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(5) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_00AB) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_END_THREAD - EVT_RETURN - EVT_END + IfEq(GF_KMR04_Tree3_Dolly, TRUE) + Return + EndIf + IfEq(AF_KMR_09, TRUE) + Return + EndIf + Wait(15) + Call(MakeItemEntity, ITEM_DOLLY, 250, 132, -100, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_KMR04_Tree3_Dolly) + Set(AF_KMR_09, TRUE) + Thread + Label(10) + IfEq(GF_KMR04_Tree3_Dolly, FALSE) + Wait(1) + Goto(10) + EndIf + Call(GetCurrentPartnerID, LVar0) + IfEq(LVar0, PARTNER_GOOMPA) + Call(DisablePlayerInput, TRUE) + Wait(5) + Call(DisablePartnerAI, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_00AB) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_Goompa_Idle) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + EndIf + EndThread + Return + End }; FoliageModelList N(Tree3_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o192); @@ -458,38 +458,38 @@ BombTrigger N(BombPos_Tree3) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o402, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o415, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o409, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush4))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o412, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush5))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o399, 1, 0) - EVT_IF_GE(GB_StoryProgress, STORY_CH0_FOUND_HAMMER) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush6))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o410, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush6))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o410_1, 1, 0) - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush7))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o410, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush8))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o410_1, 1, 0) - EVT_END_IF - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush9))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o413, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o407, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o271, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o341, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree3)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(SearchBush_Bush1))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o402, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush2))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o415, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush3))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o409, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush4))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o412, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush5))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o399, 1, 0) + IfGe(GB_StoryProgress, STORY_CH0_FOUND_HAMMER) + Set(LVar0, Ref(N(SearchBush_Bush6))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o410, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush6))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o410_1, 1, 0) + Else + Set(LVar0, Ref(N(SearchBush_Bush7))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o410, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush8))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o410_1, 1, 0) + EndIf + Set(LVar0, Ref(N(SearchBush_Bush9))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o413, 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o407, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o271, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree3))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o341, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree3)), 1, 0) + Return + End }; diff --git a/src/world/area_kmr/kmr_05/kmr_05_1_music.c b/src/world/area_kmr/kmr_05/kmr_05_1_music.c index 33ae3b3d98e..68086320070 100644 --- a/src/world/area_kmr/kmr_05/kmr_05_1_music.c +++ b/src/world/area_kmr/kmr_05/kmr_05_1_music.c @@ -1,7 +1,7 @@ #include "kmr_05.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) + Return + End }; diff --git a/src/world/area_kmr/kmr_05/kmr_05_2_main.c b/src/world/area_kmr/kmr_05/kmr_05_2_main.c index 686545bf92c..e82c84a9c26 100644 --- a/src/world/area_kmr/kmr_05/kmr_05_2_main.c +++ b/src/world/area_kmr/kmr_05/kmr_05_2_main.c @@ -4,36 +4,36 @@ EvtScript N(EVS_ExitWalk_kmr_03_1) = EVT_EXIT_WALK(60, kmr_05_ENTRY_0, "kmr_03", EvtScript N(EVS_ExitWalk_kmr_02_2) = EVT_EXIT_WALK(60, kmr_05_ENTRY_1, "kmr_02", kmr_02_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kmr_03_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kmr_02_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kmr_03_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kmr_02_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_GOOMBA_VILLAGE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_IF_EQ(GF_KMR02_ReturnedWithGoompa, FALSE) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NpcsBefore))) - EVT_ELSE - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NpcsAfter))) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC_WAIT(N(EVS_SetupFoliage)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit2, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kmr_05_ENTRY_0) - EVT_IF_EQ(GF_KMR05_EnemyWarning, FALSE) - EVT_EXEC(N(EVS_GoompaRemark)) - EVT_SET(GF_KMR05_EnemyWarning, TRUE) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_GOOMBA_VILLAGE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + IfEq(GF_KMR02_ReturnedWithGoompa, FALSE) + Call(MakeNpcs, FALSE, Ref(N(NpcsBefore))) + Else + Call(MakeNpcs, FALSE, Ref(N(NpcsAfter))) + EndIf + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + ExecWait(N(EVS_SetupFoliage)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit2, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Call(GetEntryID, LVar0) + IfEq(LVar0, kmr_05_ENTRY_0) + IfEq(GF_KMR05_EnemyWarning, FALSE) + Exec(N(EVS_GoompaRemark)) + Set(GF_KMR05_EnemyWarning, TRUE) + EndIf + EndIf + Return + End }; diff --git a/src/world/area_kmr/kmr_05/kmr_05_3_npc.c b/src/world/area_kmr/kmr_05/kmr_05_3_npc.c index 22839825862..83da6dab1e6 100644 --- a/src/world/area_kmr/kmr_05/kmr_05_3_npc.c +++ b/src/world/area_kmr/kmr_05/kmr_05_3_npc.c @@ -5,68 +5,68 @@ #include "world/common/enemy/SpikedGoomba_Wander.inc.c" EvtScript N(EVS_GoompaRemark) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PlayerMoveTo, -60, -19, 0) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_00B7) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Wait(10 * DT) + Call(SetPlayerSpeed, Float(3.0 / DT)) + Call(PlayerMoveTo, -60, -19, 0) + Call(DisablePartnerAI, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH0_00B7) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcAux_SpikedGoomba) = { - EVT_LABEL(0) - EVT_CALL(TranslateModel, MODEL_usokinoko, -1, 0, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_usokinoko, 1, 0, 0) - EVT_WAIT(20) - EVT_CALL(TranslateModel, MODEL_usokinoko, 1, 0, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_usokinoko, -1, 0, 0) - EVT_WAIT(8) - EVT_CALL(TranslateModel, MODEL_usokinoko, -1, 0, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_usokinoko, 1, 0, 0) - EVT_WAIT(30) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(TranslateModel, MODEL_usokinoko, -1, 0, 0) + Wait(1) + Call(TranslateModel, MODEL_usokinoko, 1, 0, 0) + Wait(20) + Call(TranslateModel, MODEL_usokinoko, 1, 0, 0) + Wait(1) + Call(TranslateModel, MODEL_usokinoko, -1, 0, 0) + Wait(8) + Call(TranslateModel, MODEL_usokinoko, -1, 0, 0) + Wait(1) + Call(TranslateModel, MODEL_usokinoko, 1, 0, 0) + Wait(30) + Goto(0) + Return + End }; EvtScript N(EVS_NpcIdle_SpikedGoomba) = { - EVT_CALL(func_800445D4, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(100) - EVT_LABEL(10) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_IF_LT(LVar1, 100) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_LT(LVar0, 560) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_GT(LVar0, 700) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(SetNpcAux, NPC_SELF, 0) - EVT_CALL(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, -30, 12, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(5.0)) - EVT_CALL(NpcJump0, NPC_SELF, 685, 100, -35, 0) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_BEGIN_WITH_CHASING, 1) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_SpikedGoomba_Wander))) - EVT_CASE_OR_EQ(102) - EVT_CASE_OR_EQ(3) - EVT_CASE_OR_EQ(103) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_SpikedGoomba_Wander))) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(func_800445D4, LVar0) + Switch(LVar0) + CaseEq(100) + Label(10) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + IfLt(LVar1, 100) + Goto(10) + EndIf + IfLt(LVar0, 560) + Goto(10) + EndIf + IfGt(LVar0, 700) + Goto(10) + EndIf + Call(SetNpcAux, NPC_SELF, 0) + Call(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, -30, 12, EMOTER_NPC, 0, 0, 0, 0) + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Call(SetNpcSpeed, NPC_SELF, Float(5.0)) + Call(NpcJump0, NPC_SELF, 685, 100, -35, 0) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_BEGIN_WITH_CHASING, 1) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_SpikedGoomba_Wander))) + CaseOrEq(102) + CaseOrEq(3) + CaseOrEq(103) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_SpikedGoomba_Wander))) + EndCaseGroup + EndSwitch + Return + End }; NpcData N(NpcData_Goomba_01) = { @@ -116,10 +116,10 @@ NpcData N(NpcData_Goomba_02) = { }; EvtScript N(EVS_NpcInit_SpikedGoomba) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_SpikedGoomba))) - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_SpikedGoomba))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_SpikedGoomba))) + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_SpikedGoomba))) + Return + End }; NpcData N(NpcData_SpikedGoomba) = { diff --git a/src/world/area_kmr/kmr_05/kmr_05_4_entity.c b/src/world/area_kmr/kmr_05/kmr_05_4_entity.c index 4cac84abf7f..9a190610bcd 100644 --- a/src/world/area_kmr/kmr_05/kmr_05_4_entity.c +++ b/src/world/area_kmr/kmr_05/kmr_05_4_entity.c @@ -1,7 +1,7 @@ #include "kmr_05.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 133, 140, -155, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KMR05_Item_StarPiece) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_STAR_PIECE, 133, 140, -155, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KMR05_Item_StarPiece) + Return + End }; diff --git a/src/world/area_kmr/kmr_05/kmr_05_5_foliage.c b/src/world/area_kmr/kmr_05/kmr_05_5_foliage.c index ba289f7d96a..ae00a8c455e 100644 --- a/src/world/area_kmr/kmr_05/kmr_05_5_foliage.c +++ b/src/world/area_kmr/kmr_05/kmr_05_5_foliage.c @@ -13,13 +13,13 @@ API_CALLABLE(N(func_8024173C_8CF7AC)) { } EvtScript N(EVS_80243234) = { - EVT_WAIT(15) - EVT_CALL(N(func_8024173C_8CF7AC)) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetNpcVar, NPC_06, 4, 1) - EVT_END_IF - EVT_RETURN - EVT_END + Wait(15) + Call(N(func_8024173C_8CF7AC)) + IfEq(LVar0, 1) + Call(SetNpcVar, NPC_06, 4, 1) + EndIf + Return + End }; FoliageModelList N(Tree1_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_ha2_1, MODEL_ha2_2, MODEL_ha2_3); @@ -34,22 +34,22 @@ FoliageVectorList N(Tree1_Effects) = { }; EvtScript N(EVS_OnShakeTree1) = { - EVT_IF_EQ(GF_KMR05_Tree1_Coin, TRUE) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(AF_JAN01_TreeDrop_StarPiece, TRUE) - EVT_RETURN - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 490) - EVT_CALL(MakeItemEntity, ITEM_COIN, 540, 290, -180, ITEM_SPAWN_MODE_FALL, GF_KMR05_Tree1_Coin) - EVT_ELSE - EVT_CALL(MakeItemEntity, ITEM_COIN, 436, 300, -180, ITEM_SPAWN_MODE_FALL, GF_KMR05_Tree1_Coin) - EVT_END_IF - EVT_SET(AF_JAN01_TreeDrop_StarPiece, TRUE) - EVT_RETURN - EVT_END + IfEq(GF_KMR05_Tree1_Coin, TRUE) + Return + EndIf + IfEq(AF_JAN01_TreeDrop_StarPiece, TRUE) + Return + EndIf + Wait(10) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, 490) + Call(MakeItemEntity, ITEM_COIN, 540, 290, -180, ITEM_SPAWN_MODE_FALL, GF_KMR05_Tree1_Coin) + Else + Call(MakeItemEntity, ITEM_COIN, 436, 300, -180, ITEM_SPAWN_MODE_FALL, GF_KMR05_Tree1_Coin) + EndIf + Set(AF_JAN01_TreeDrop_StarPiece, TRUE) + Return + End }; ShakeTreeConfig N(ShakeTree_Tree1) = { @@ -65,9 +65,9 @@ BombTrigger N(BombPos_Tree1) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o1238, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o1238, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Return + End }; diff --git a/src/world/area_kmr/kmr_06/kmr_06_1_music.c b/src/world/area_kmr/kmr_06/kmr_06_1_music.c index f4ad8eb77c4..6afeacc894f 100644 --- a/src/world/area_kmr/kmr_06/kmr_06_1_music.c +++ b/src/world/area_kmr/kmr_06/kmr_06_1_music.c @@ -1,7 +1,7 @@ #include "kmr_06.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) + Return + End }; diff --git a/src/world/area_kmr/kmr_06/kmr_06_2_main.c b/src/world/area_kmr/kmr_06/kmr_06_2_main.c index 3ab26cd138f..a9445893bca 100644 --- a/src/world/area_kmr/kmr_06/kmr_06_2_main.c +++ b/src/world/area_kmr/kmr_06/kmr_06_2_main.c @@ -4,25 +4,25 @@ EvtScript N(EVS_ExitWalk_kmr_09_1) = EVT_EXIT_WALK(60, kmr_06_ENTRY_0, "kmr_09", EvtScript N(EVS_ExitWalk_kmr_07_0) = EVT_EXIT_WALK(60, kmr_06_ENTRY_1, "kmr_07", kmr_07_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kmr_09_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kmr_07_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kmr_09_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kmr_07_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_GOOMBA_ROAD) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit2, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_EXEC_WAIT(N(EVS_SetupStickerSign)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_GOOMBA_ROAD) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit2, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + ExecWait(N(EVS_SetupStickerSign)) + Return + End }; diff --git a/src/world/area_kmr/kmr_06/kmr_06_4_entity.c b/src/world/area_kmr/kmr_06/kmr_06_4_entity.c index b22cc60d4a4..1035da1f03e 100644 --- a/src/world/area_kmr/kmr_06/kmr_06_4_entity.c +++ b/src/world/area_kmr/kmr_06/kmr_06_4_entity.c @@ -2,9 +2,9 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), 800, 60, 0, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_RedBlock), 220, 60, 10, 0, ITEM_CLOSE_CALL, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KMR06_BadgeBlock_CloseCall) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HeartBlock), 800, 60, 0, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_RedBlock), 220, 60, 10, 0, ITEM_CLOSE_CALL, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KMR06_BadgeBlock_CloseCall) + Return + End }; diff --git a/src/world/area_kmr/kmr_06/kmr_06_5_sticker_sign.c b/src/world/area_kmr/kmr_06/kmr_06_5_sticker_sign.c index 0528709781f..da53b68626f 100644 --- a/src/world/area_kmr/kmr_06/kmr_06_5_sticker_sign.c +++ b/src/world/area_kmr/kmr_06/kmr_06_5_sticker_sign.c @@ -218,44 +218,44 @@ API_CALLABLE(N(DeleteSticker)) { } EvtScript N(EVS_OnInspect_StickerSign) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SUSPEND_GROUP(EVT_GROUP_01) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Sign_EatMushroomsTip, 160, 40) - EVT_IF_EQ(GF_KMR06_Item_Mushroom, FALSE) - EVT_IF_EQ(AF_JAN01_TreeDrop_StarPiece, FALSE) - EVT_SET(AF_JAN01_TreeDrop_StarPiece, TRUE) - EVT_THREAD - EVT_WAIT(2) - EVT_SETF(LVar0, EVT_FLOAT(0.0)) - EVT_LOOP(18) - EVT_ADDF(LVar0, EVT_FLOAT(10.0)) - EVT_CALL(N(SetStickerRotation), 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(N(SetStickerRotation), 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(SetStickerGravity), EVT_FLOAT(0.6)) - EVT_CALL(N(JumpStickerTo), 362, 0, 40, 23) - EVT_CALL(N(DeleteSticker)) - EVT_CALL(MakeItemEntity, ITEM_MUSHROOM, 362, 0, 40, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KMR06_Item_Mushroom) - EVT_END_THREAD - EVT_WAIT(10) - EVT_END_IF - EVT_END_IF - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + SuspendGroup(EVT_GROUP_01) + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_Sign_EatMushroomsTip, 160, 40) + IfEq(GF_KMR06_Item_Mushroom, FALSE) + IfEq(AF_JAN01_TreeDrop_StarPiece, FALSE) + Set(AF_JAN01_TreeDrop_StarPiece, TRUE) + Thread + Wait(2) + SetF(LVar0, Float(0.0)) + Loop(18) + AddF(LVar0, Float(10.0)) + Call(N(SetStickerRotation), 0, LVar0) + Wait(1) + EndLoop + Call(N(SetStickerRotation), 0, 0) + EndThread + Thread + Call(N(SetStickerGravity), Float(0.6)) + Call(N(JumpStickerTo), 362, 0, 40, 23) + Call(N(DeleteSticker)) + Call(MakeItemEntity, ITEM_MUSHROOM, 362, 0, 40, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KMR06_Item_Mushroom) + EndThread + Wait(10) + EndIf + EndIf + ResumeGroup(EVT_GROUP_01) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SetupStickerSign) = { - EVT_IF_EQ(GF_KMR06_Item_Mushroom, FALSE) - EVT_CALL(N(CreateSticker), ITEM_MUSHROOM) - EVT_CALL(N(SetStickerPos), 362, 40, -17) - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnInspect_StickerSign)), TRIGGER_WALL_PRESS_A, COLLIDER_o852, 1, 0) - EVT_RETURN - EVT_END + IfEq(GF_KMR06_Item_Mushroom, FALSE) + Call(N(CreateSticker), ITEM_MUSHROOM) + Call(N(SetStickerPos), 362, 40, -17) + EndIf + BindTrigger(Ref(N(EVS_OnInspect_StickerSign)), TRIGGER_WALL_PRESS_A, COLLIDER_o852, 1, 0) + Return + End }; diff --git a/src/world/area_kmr/kmr_07/kmr_07_1_music.c b/src/world/area_kmr/kmr_07/kmr_07_1_music.c index 4babcdbee3b..515ae79a0f4 100644 --- a/src/world/area_kmr/kmr_07/kmr_07_1_music.c +++ b/src/world/area_kmr/kmr_07/kmr_07_1_music.c @@ -1,7 +1,7 @@ #include "kmr_07.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) + Return + End }; diff --git a/src/world/area_kmr/kmr_07/kmr_07_2_main.c b/src/world/area_kmr/kmr_07/kmr_07_2_main.c index 345f5fab426..3467b82df42 100644 --- a/src/world/area_kmr/kmr_07/kmr_07_2_main.c +++ b/src/world/area_kmr/kmr_07/kmr_07_2_main.c @@ -4,42 +4,42 @@ EvtScript N(EVS_ExitWalk_kmr_06_1) = EVT_EXIT_WALK(60, kmr_07_ENTRY_0, "kmr_06", EvtScript N(EVS_ExitWalk_kmr_12_0) = EVT_EXIT_WALK(60, kmr_07_ENTRY_1, "kmr_12", kmr_12_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kmr_06_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kmr_12_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kmr_06_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kmr_12_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, kmr_07_ENTRY_A) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_ELSE - EVT_EXEC(EnterPostPipe) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(GetEntryID, LVar0) + IfNe(LVar0, kmr_07_ENTRY_A) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Else + Exec(EnterPostPipe) + Exec(N(EVS_BindExitTriggers)) + EndIf + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_GOOMBA_ROAD) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit2, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_GOOMBA_ROAD) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit2, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_kmr/kmr_07/kmr_07_3_npc.c b/src/world/area_kmr/kmr_07/kmr_07_3_npc.c index 1c205152a12..5cec3017234 100644 --- a/src/world/area_kmr/kmr_07/kmr_07_3_npc.c +++ b/src/world/area_kmr/kmr_07/kmr_07_3_npc.c @@ -18,193 +18,193 @@ API_CALLABLE(N(PlaySpringReboundAnimation)) { } EvtScript N(EVS_PlayWalkingSounds) = { - EVT_LOOP(0) - EVT_CALL(PlaySoundAtNpc, LVar0, SOUND_GOOMBA_BROS_STEP, SOUND_SPACE_DEFAULT) - EVT_WAIT(4) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(PlaySoundAtNpc, LVar0, SOUND_GOOMBA_BROS_STEP, SOUND_SPACE_DEFAULT) + Wait(4) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_GoombaBros_Red) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_IF_LT(LVar0, 210) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetMusicTrack, 0, SONG_MINIBOSS_BATTLE, 0, 8) - EVT_SET_GROUP(EVT_GROUP_EF) - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(1) - EVT_END_THREAD - EVT_CALL(ShowMessageAtScreenPos, MSG_CH0_00BB, 320, 60) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_LookAround) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 360, 80, 35) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(30 * DT) - EVT_THREAD - EVT_CALL(SetNpcSpeed, NPC_GoombaBros_Red, EVT_FLOAT(6.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_GoombaBros_Red, ANIM_GoombaBros_Red_Walk) - EVT_SET(LVar0, 0) - EVT_EXEC_GET_TID(N(EVS_PlayWalkingSounds), LVarA) - EVT_CALL(NpcMoveTo, NPC_GoombaBros_Red, 405, 42, 0) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetNpcAnimation, NPC_GoombaBros_Red, ANIM_GoombaBros_Red_Idle) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_GoombaBros_Blue, ANIM_GoombaBros_Blue_Walk) - EVT_CALL(SetNpcSpeed, NPC_GoombaBros_Blue, EVT_FLOAT(6.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_GoombaBros_Blue, ANIM_GoombaBros_Blue_Walk) - EVT_SET(LVar0, 1) - EVT_EXEC_GET_TID(N(EVS_PlayWalkingSounds), LVarA) - EVT_CALL(NpcMoveTo, NPC_GoombaBros_Blue, 376, 11, 0) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetNpcAnimation, NPC_GoombaBros_Blue, ANIM_GoombaBros_Blue_Idle) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_CALL(SpeakToPlayer, NPC_GoombaBros_Red, ANIM_GoombaBros_Red_Talk, ANIM_GoombaBros_Red_Idle, 0, MSG_CH0_00BC) - EVT_WAIT(10 * DT) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 270, 80, 45) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-3.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_GoombaBros_Red, ANIM_GoombaBros_Red_Talk, ANIM_GoombaBros_Red_Idle, 0, MSG_CH0_00BD) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_GoombaBros_Blue, ANIM_GoombaBros_Blue_Talk, ANIM_GoombaBros_Blue_Idle, 0, MSG_CH0_00BE) - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetNpcJumpscale, NPC_GoombaBros_Blue, EVT_FLOAT(0.8)) - EVT_CALL(SetNpcAnimation, NPC_GoombaBros_Blue, ANIM_GoombaBros_Blue_Walk) - EVT_CALL(PlaySoundAtNpc, NPC_GoombaBros_Blue, SOUND_ACTOR_HURT, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_GoombaBros_Blue, 267, 0, 28, 30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_GoombaBros_Red, EVT_FLOAT(0.8)) - EVT_CALL(SetNpcAnimation, NPC_GoombaBros_Red, ANIM_GoombaBros_Red_Walk) - EVT_CALL(PlaySoundAtNpc, NPC_GoombaBros_Red, SOUND_ACTOR_HURT, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_GoombaBros_Red, 276, 0, 55, 30 * DT) - EVT_END_THREAD - EVT_WAIT(15 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(5 * DT) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + IfLt(LVar0, 210) + Goto(0) + EndIf + Call(SetMusicTrack, 0, SONG_MINIBOSS_BATTLE, 0, 8) + SetGroup(EVT_GROUP_EF) + Thread + Wait(3) + Call(DisablePlayerInput, TRUE) + Wait(1) + EndThread + Call(ShowMessageAtScreenPos, MSG_CH0_00BB, 320, 60) + Call(SetPlayerAnimation, ANIM_MarioW2_LookAround) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, 360, 80, 35) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-7.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(30 * DT) + Thread + Call(SetNpcSpeed, NPC_GoombaBros_Red, Float(6.0 / DT)) + Call(SetNpcAnimation, NPC_GoombaBros_Red, ANIM_GoombaBros_Red_Walk) + Set(LVar0, 0) + ExecGetTID(N(EVS_PlayWalkingSounds), LVarA) + Call(NpcMoveTo, NPC_GoombaBros_Red, 405, 42, 0) + KillThread(LVarA) + Call(SetNpcAnimation, NPC_GoombaBros_Red, ANIM_GoombaBros_Red_Idle) + EndThread + Call(SetNpcAnimation, NPC_GoombaBros_Blue, ANIM_GoombaBros_Blue_Walk) + Call(SetNpcSpeed, NPC_GoombaBros_Blue, Float(6.0 / DT)) + Call(SetNpcAnimation, NPC_GoombaBros_Blue, ANIM_GoombaBros_Blue_Walk) + Set(LVar0, 1) + ExecGetTID(N(EVS_PlayWalkingSounds), LVarA) + Call(NpcMoveTo, NPC_GoombaBros_Blue, 376, 11, 0) + KillThread(LVarA) + Call(SetNpcAnimation, NPC_GoombaBros_Blue, ANIM_GoombaBros_Blue_Idle) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Call(SpeakToPlayer, NPC_GoombaBros_Red, ANIM_GoombaBros_Red_Talk, ANIM_GoombaBros_Red_Idle, 0, MSG_CH0_00BC) + Wait(10 * DT) + Call(SetPanTarget, CAM_DEFAULT, 270, 80, 45) + Call(SetCamDistance, CAM_DEFAULT, 450) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-3.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_GoombaBros_Red, ANIM_GoombaBros_Red_Talk, ANIM_GoombaBros_Red_Idle, 0, MSG_CH0_00BD) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_GoombaBros_Blue, ANIM_GoombaBros_Blue_Talk, ANIM_GoombaBros_Blue_Idle, 0, MSG_CH0_00BE) + Wait(10 * DT) + Thread + Wait(5) + Call(SetNpcJumpscale, NPC_GoombaBros_Blue, Float(0.8)) + Call(SetNpcAnimation, NPC_GoombaBros_Blue, ANIM_GoombaBros_Blue_Walk) + Call(PlaySoundAtNpc, NPC_GoombaBros_Blue, SOUND_ACTOR_HURT, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_GoombaBros_Blue, 267, 0, 28, 30 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + EndThread + Thread + Call(SetNpcJumpscale, NPC_GoombaBros_Red, Float(0.8)) + Call(SetNpcAnimation, NPC_GoombaBros_Red, ANIM_GoombaBros_Red_Walk) + Call(PlaySoundAtNpc, NPC_GoombaBros_Red, SOUND_ACTOR_HURT, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_GoombaBros_Red, 276, 0, 55, 30 * DT) + EndThread + Wait(15 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(5 * DT) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Return + End }; EvtScript N(EVS_NpcDefeat_GoombaBros_Red) = { - EVT_THREAD - EVT_WAIT(5 * DT) - EVT_CALL(SetMusicTrack, 0, SONG_GOOMBA_BROS_RETREAT, 0, 8) - EVT_END_THREAD - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(SetNpcAnimation, NPC_GoombaBros_Red, ANIM_GoombaBros_Red_CryIdle) - EVT_CALL(SetNpcAnimation, NPC_GoombaBros_Blue, ANIM_GoombaBros_Blue_CryIdle) - EVT_CALL(SpeakToPlayer, NPC_GoombaBros_Red, ANIM_GoombaBros_Red_CryTalk, ANIM_GoombaBros_Red_CryIdle, 0, MSG_CH0_00C2) - EVT_WAIT(10) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_GoombaBros_Blue, EVT_FLOAT(1.8)) - EVT_CALL(SetNpcAnimation, NPC_GoombaBros_Blue, ANIM_GoombaBros_Blue_CryWalk) - EVT_CALL(PlaySoundAtNpc, NPC_GoombaBros_Blue, SOUND_ACTOR_HURT, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_GoombaBros_Blue, 307, 25, 49, 20 * DT) - EVT_CALL(N(PlaySpringReboundAnimation)) - EVT_CALL(PlaySoundAtNpc, NPC_GoombaBros_Blue, SOUND_SPRING, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_GoombaBros_Blue, 401, 80, 25, 30 * DT) - EVT_WAIT(5 * DT) - EVT_CALL(SetNpcSpeed, NPC_GoombaBros_Blue, EVT_FLOAT(6.0 / DT)) - EVT_SET(LVar0, 1) - EVT_EXEC_GET_TID(N(EVS_PlayWalkingSounds), LVarA) - EVT_CALL(NpcMoveTo, NPC_GoombaBros_Blue, 616, -47, 0) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetNpcFlagBits, NPC_GoombaBros_Blue, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcPos, NPC_GoombaBros_Blue, NPC_DISPOSE_LOCATION) - EVT_WAIT(1) - EVT_END_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcJumpscale, NPC_GoombaBros_Red, EVT_FLOAT(1.8)) - EVT_CALL(SetNpcAnimation, NPC_GoombaBros_Red, ANIM_GoombaBros_Red_CryWalk) - EVT_CALL(PlaySoundAtNpc, NPC_GoombaBros_Red, SOUND_ACTOR_HURT, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_GoombaBros_Red, 307, 25, 49, 20 * DT) - EVT_CALL(N(PlaySpringReboundAnimation)) - EVT_CALL(PlaySoundAtNpc, NPC_GoombaBros_Red, SOUND_SPRING, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_GoombaBros_Red, 401, 80, 25, 30 * DT) - EVT_WAIT(5 * DT) - EVT_CALL(SetNpcSpeed, NPC_GoombaBros_Red, EVT_FLOAT(6.0 / DT)) - EVT_SET(LVar0, 0) - EVT_EXEC_GET_TID(N(EVS_PlayWalkingSounds), LVarA) - EVT_CALL(NpcMoveTo, NPC_GoombaBros_Red, 616, -47, 0) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetNpcFlagBits, NPC_GoombaBros_Red, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcPos, NPC_GoombaBros_Red, NPC_DISPOSE_LOCATION) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(MV_GoombaBrosDefeated, TRUE) - EVT_SET(GB_StoryProgress, STORY_CH0_DEFEATED_GOOMBA_BROS) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Thread + Wait(5 * DT) + Call(SetMusicTrack, 0, SONG_GOOMBA_BROS_RETREAT, 0, 8) + EndThread + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(SetNpcAnimation, NPC_GoombaBros_Red, ANIM_GoombaBros_Red_CryIdle) + Call(SetNpcAnimation, NPC_GoombaBros_Blue, ANIM_GoombaBros_Blue_CryIdle) + Call(SpeakToPlayer, NPC_GoombaBros_Red, ANIM_GoombaBros_Red_CryTalk, ANIM_GoombaBros_Red_CryIdle, 0, MSG_CH0_00C2) + Wait(10) + Call(DisablePlayerInput, TRUE) + Wait(10) + Thread + Call(SetNpcJumpscale, NPC_GoombaBros_Blue, Float(1.8)) + Call(SetNpcAnimation, NPC_GoombaBros_Blue, ANIM_GoombaBros_Blue_CryWalk) + Call(PlaySoundAtNpc, NPC_GoombaBros_Blue, SOUND_ACTOR_HURT, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_GoombaBros_Blue, 307, 25, 49, 20 * DT) + Call(N(PlaySpringReboundAnimation)) + Call(PlaySoundAtNpc, NPC_GoombaBros_Blue, SOUND_SPRING, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_GoombaBros_Blue, 401, 80, 25, 30 * DT) + Wait(5 * DT) + Call(SetNpcSpeed, NPC_GoombaBros_Blue, Float(6.0 / DT)) + Set(LVar0, 1) + ExecGetTID(N(EVS_PlayWalkingSounds), LVarA) + Call(NpcMoveTo, NPC_GoombaBros_Blue, 616, -47, 0) + KillThread(LVarA) + Call(SetNpcFlagBits, NPC_GoombaBros_Blue, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcPos, NPC_GoombaBros_Blue, NPC_DISPOSE_LOCATION) + Wait(1) + EndThread + Wait(30 * DT) + Call(SetNpcJumpscale, NPC_GoombaBros_Red, Float(1.8)) + Call(SetNpcAnimation, NPC_GoombaBros_Red, ANIM_GoombaBros_Red_CryWalk) + Call(PlaySoundAtNpc, NPC_GoombaBros_Red, SOUND_ACTOR_HURT, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_GoombaBros_Red, 307, 25, 49, 20 * DT) + Call(N(PlaySpringReboundAnimation)) + Call(PlaySoundAtNpc, NPC_GoombaBros_Red, SOUND_SPRING, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_GoombaBros_Red, 401, 80, 25, 30 * DT) + Wait(5 * DT) + Call(SetNpcSpeed, NPC_GoombaBros_Red, Float(6.0 / DT)) + Set(LVar0, 0) + ExecGetTID(N(EVS_PlayWalkingSounds), LVarA) + Call(NpcMoveTo, NPC_GoombaBros_Red, 616, -47, 0) + KillThread(LVarA) + Call(SetNpcFlagBits, NPC_GoombaBros_Red, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcPos, NPC_GoombaBros_Red, NPC_DISPOSE_LOCATION) + Wait(1) + Exec(N(EVS_SetupMusic)) + Set(MV_GoombaBrosDefeated, TRUE) + Set(GB_StoryProgress, STORY_CH0_DEFEATED_GOOMBA_BROS) + Call(DisablePlayerInput, FALSE) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_GoombaBros_Red) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_GoombaBros_Red))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_GoombaBros_Red))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_SET(MV_GoombaBrosDefeated, FALSE) - EVT_IF_GE(GB_StoryProgress, STORY_CH0_DEFEATED_GOOMBA_BROS) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_GoombaBros_Red))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_GoombaBros_Red))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Set(MV_GoombaBrosDefeated, FALSE) + IfGe(GB_StoryProgress, STORY_CH0_DEFEATED_GOOMBA_BROS) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcIdle_GoombaBros_Blue) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcDefeat_GoombaBros_Blue) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_LABEL(0) - EVT_IF_EQ(MV_GoombaBrosDefeated, FALSE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Label(0) + IfEq(MV_GoombaBrosDefeated, FALSE) + Wait(1) + Goto(0) + EndIf + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_GoombaBros_Blue) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_GoombaBros_Blue))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_GoombaBros_Blue))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_IF_GE(GB_StoryProgress, STORY_CH0_DEFEATED_GOOMBA_BROS) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_GoombaBros_Blue))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_GoombaBros_Blue))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + IfGe(GB_StoryProgress, STORY_CH0_DEFEATED_GOOMBA_BROS) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + Return + End }; NpcData N(NpcData_GoombaBros_Red)[] = { diff --git a/src/world/area_kmr/kmr_07/kmr_07_4_entity.c b/src/world/area_kmr/kmr_07/kmr_07_4_entity.c index 9e166fee6e6..703f0410f7f 100644 --- a/src/world/area_kmr/kmr_07/kmr_07_4_entity.c +++ b/src/world/area_kmr/kmr_07/kmr_07_4_entity.c @@ -2,9 +2,9 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_SimpleSpring), 310, 0, 45, 0, 65, MAKE_ENTITY_END) - EVT_SET(MV_SpringEntityIndex, LVar0) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 510, 60, 110, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_SimpleSpring), 310, 0, 45, 0, 65, MAKE_ENTITY_END) + Set(MV_SpringEntityIndex, LVar0) + Call(MakeEntity, Ref(Entity_SavePoint), 510, 60, 110, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_kmr/kmr_09/kmr_09_1_music.c b/src/world/area_kmr/kmr_09/kmr_09_1_music.c index 30cd941b12f..43922851fa3 100644 --- a/src/world/area_kmr/kmr_09/kmr_09_1_music.c +++ b/src/world/area_kmr/kmr_09/kmr_09_1_music.c @@ -1,7 +1,7 @@ #include "kmr_09.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) + Return + End }; diff --git a/src/world/area_kmr/kmr_09/kmr_09_2_main.c b/src/world/area_kmr/kmr_09/kmr_09_2_main.c index fa18cb6fc41..e0e9b71608d 100644 --- a/src/world/area_kmr/kmr_09/kmr_09_2_main.c +++ b/src/world/area_kmr/kmr_09/kmr_09_2_main.c @@ -5,26 +5,26 @@ EvtScript N(EVS_ExitWalk_kmr_02_0) = EVT_EXIT_WALK(60, kmr_09_ENTRY_0, "kmr_02", EvtScript N(EVS_ExitWalk_kmr_06_0) = EVT_EXIT_WALK(60, kmr_09_ENTRY_1, "kmr_06", kmr_06_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kmr_02_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kmr_06_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kmr_02_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kmr_06_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_GOOMBA_ROAD) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_SET(GF_MAP_GoombaRoad, TRUE) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit2, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnReadBillboard)), TRIGGER_WALL_PRESS_A, COLLIDER_kan, 1, 0) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_GOOMBA_ROAD) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Set(GF_MAP_GoombaRoad, TRUE) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit2, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + BindTrigger(Ref(N(EVS_OnReadBillboard)), TRIGGER_WALL_PRESS_A, COLLIDER_kan, 1, 0) + Return + End }; diff --git a/src/world/area_kmr/kmr_09/kmr_09_3_npc.c b/src/world/area_kmr/kmr_09/kmr_09_3_npc.c index 98eebdd9fce..88e8bb4a00e 100644 --- a/src/world/area_kmr/kmr_09/kmr_09_3_npc.c +++ b/src/world/area_kmr/kmr_09/kmr_09_3_npc.c @@ -54,77 +54,77 @@ API_CALLABLE(N(GetAmbushEnemy)) { } EvtScript N(EVS_OnReadBillboard) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SUSPEND_GROUP(EVT_GROUP_01) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Sign_BewareOfGoombas, 160, 40) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_SET(LFlag0, FALSE) - EVT_CALL(N(GetAmbushEnemy)) - EVT_IF_NE(LVar0, NULL) - EVT_CALL(GetNpcVar, NPC_Goomba_Ambush, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetNpcVar, NPC_Goomba_Ambush, 0, 1) - EVT_SET(LFlag0, TRUE) - EVT_WAIT(10) - EVT_END_IF - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_UNBIND - EVT_END_IF - EVT_END - EVT_RETURN //@bug wrong order for END/RETURN + SetGroup(EVT_GROUP_00) + SuspendGroup(EVT_GROUP_01) + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_Sign_BewareOfGoombas, 160, 40) + ResumeGroup(EVT_GROUP_01) + Set(LFlag0, FALSE) + Call(N(GetAmbushEnemy)) + IfNe(LVar0, NULL) + Call(GetNpcVar, NPC_Goomba_Ambush, 0, LVar0) + IfEq(LVar0, 0) + Call(SetNpcVar, NPC_Goomba_Ambush, 0, 1) + Set(LFlag0, TRUE) + Wait(10) + EndIf + EndIf + Call(DisablePlayerInput, FALSE) + IfEq(LFlag0, TRUE) + Unbind + EndIf + End + Return //@bug wrong order for END/RETURN }; EvtScript N(EVS_NpcIdle_Goomba_Ambush) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Goomba_Still) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_DISABLE_AI, 1) - EVT_LABEL(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FLIP_PAGE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcImgFXFlags, NPC_SELF, IMGFX_FLAG_2000) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_ANIM, IMGFX_ANIM_UNFURL, 1, 1, 0) - EVT_WAIT(15) - EVT_CALL(SetNpcImgFXFlags, NPC_SELF, IMGFX_FLAG_2000) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_RESET, 0, 0, 0, 0) - EVT_THREAD - EVT_WAIT(2) - EVT_SETF(LVar0, EVT_FLOAT(0.0)) - EVT_LOOP(20) - EVT_ADDF(LVar0, EVT_FLOAT(18.0)) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(EnableNpcShadow, NPC_SELF, TRUE) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.6)) - EVT_CALL(NpcJump0, NPC_SELF, -35, 0, 25, 23) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_NO_SHADOW_RAYCAST, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_DISABLE_AI, 0) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_BEGIN_WITH_CHASING, 1) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnReadBillboard)), TRIGGER_WALL_PRESS_A, COLLIDER_kan, 1, 0) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Goomba_Wander))) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_Goomba_Still) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_DISABLE_AI, 1) + Label(0) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Wait(1) + Goto(0) + EndIf + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FLIP_PAGE, SOUND_SPACE_DEFAULT) + Call(SetNpcImgFXFlags, NPC_SELF, IMGFX_FLAG_2000) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_ANIM, IMGFX_ANIM_UNFURL, 1, 1, 0) + Wait(15) + Call(SetNpcImgFXFlags, NPC_SELF, IMGFX_FLAG_2000) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_RESET, 0, 0, 0, 0) + Thread + Wait(2) + SetF(LVar0, Float(0.0)) + Loop(20) + AddF(LVar0, Float(18.0)) + Call(SetNpcRotation, NPC_SELF, 0, LVar0, 0) + Wait(1) + EndLoop + Call(SetNpcRotation, NPC_SELF, 0, 0, 0) + EndThread + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(EnableNpcShadow, NPC_SELF, TRUE) + Call(SetNpcJumpscale, NPC_SELF, Float(0.6)) + Call(NpcJump0, NPC_SELF, -35, 0, 25, 23) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_CLEAR, 0, 0, 0, 0) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_NO_SHADOW_RAYCAST, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_DISABLE_AI, 0) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_BEGIN_WITH_CHASING, 1) + BindTrigger(Ref(N(EVS_OnReadBillboard)), TRIGGER_WALL_PRESS_A, COLLIDER_kan, 1, 0) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_Goomba_Wander))) + Return + End }; EvtScript N(EVS_NpcInit_Goomba_Ambush) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Goomba_Ambush))) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Goomba_Ambush))) + Return + End }; NpcData N(NpcData_Goomba_Ambush) = { diff --git a/src/world/area_kmr/kmr_09/kmr_09_4_entity.c b/src/world/area_kmr/kmr_09/kmr_09_4_entity.c index 639805ce513..6787c70e555 100644 --- a/src/world/area_kmr/kmr_09/kmr_09_4_entity.c +++ b/src/world/area_kmr/kmr_09/kmr_09_4_entity.c @@ -2,11 +2,11 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 400, 60, -15, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KMR09_ItemBlock_CoinA) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 450, 60, -15, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 500, 60, -15, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KMR09_ItemBlock_CoinB) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_YellowBlock), 400, 60, -15, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KMR09_ItemBlock_CoinA) + Call(MakeEntity, Ref(Entity_BrickBlock), 450, 60, -15, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_YellowBlock), 500, 60, -15, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KMR09_ItemBlock_CoinB) + Return + End }; diff --git a/src/world/area_kmr/kmr_10/kmr_10_1_music.c b/src/world/area_kmr/kmr_10/kmr_10_1_music.c index 1a6028a76c7..a808bf08972 100644 --- a/src/world/area_kmr/kmr_10/kmr_10_1_music.c +++ b/src/world/area_kmr/kmr_10/kmr_10_1_music.c @@ -1,7 +1,7 @@ #include "kmr_10.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) + Return + End }; diff --git a/src/world/area_kmr/kmr_10/kmr_10_2_main.c b/src/world/area_kmr/kmr_10/kmr_10_2_main.c index 56b4fadd4b4..360844dfcfe 100644 --- a/src/world/area_kmr/kmr_10/kmr_10_2_main.c +++ b/src/world/area_kmr/kmr_10/kmr_10_2_main.c @@ -5,38 +5,38 @@ EvtScript N(EVS_ExitWalk_mac_00_0) = EVT_EXIT_WALK(60, kmr_10_ENTRY_1, "mac_00", EvtScript N(EVS_ExitWalk_mac_00_2) = EVT_EXIT_WALK(60, kmr_10_ENTRY_2, "mac_00", mac_00_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kmr_11_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_mac_00_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_mac_00_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kmr_11_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_mac_00_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_mac_00_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) + Return + End }; EvtScript N(D_80240828_8D8CF8) = { - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_GOOMBA_ROAD) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(ClearDefeatedEnemies) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC_WAIT(N(EVS_SetupFoliage)) - EVT_IF_EQ(GB_StoryProgress, STORY_CH0_KAMMY_RETURNED_TO_BOWSER) - EVT_IF_EQ(AF_KMR_0D, FALSE) - EVT_WAIT(50) - EVT_SET(AF_KMR_0D, TRUE) - EVT_END_IF - EVT_END_IF - EVT_EXEC(N(D_80240828_8D8CF8)) - EVT_WAIT(1) - EVT_SET(GF_MAC01_RowfBadgesChosen, FALSE) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_GOOMBA_ROAD) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(ClearDefeatedEnemies) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + ExecWait(N(EVS_SetupFoliage)) + IfEq(GB_StoryProgress, STORY_CH0_KAMMY_RETURNED_TO_BOWSER) + IfEq(AF_KMR_0D, FALSE) + Wait(50) + Set(AF_KMR_0D, TRUE) + EndIf + EndIf + Exec(N(D_80240828_8D8CF8)) + Wait(1) + Set(GF_MAC01_RowfBadgesChosen, FALSE) + Return + End }; diff --git a/src/world/area_kmr/kmr_10/kmr_10_3_npc.c b/src/world/area_kmr/kmr_10/kmr_10_3_npc.c index 48bee6bea14..354bf332af7 100644 --- a/src/world/area_kmr/kmr_10/kmr_10_3_npc.c +++ b/src/world/area_kmr/kmr_10/kmr_10_3_npc.c @@ -3,9 +3,9 @@ #include "world/common/npc/Toad_Stationary.inc.c" EvtScript N(EVS_NpcInit_Toad) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Return + End }; NpcData N(NpcData_Toad) = { diff --git a/src/world/area_kmr/kmr_10/kmr_10_4_entity.c b/src/world/area_kmr/kmr_10/kmr_10_4_entity.c index 8e0fdbc7294..d3926a2b2d4 100644 --- a/src/world/area_kmr/kmr_10/kmr_10_4_entity.c +++ b/src/world/area_kmr/kmr_10/kmr_10_4_entity.c @@ -20,74 +20,74 @@ API_CALLABLE(N(SetSpringPosition)) { } EvtScript N(EVS_OnShakeTree1) = { - EVT_WAIT(15) - EVT_IF_EQ(GF_KMR10_KnockedSpringOutOfTree, FALSE) - EVT_SET(GF_KMR10_KnockedSpringOutOfTree, TRUE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcPos, NPC_Dummy, 370, 115, -20) - EVT_THREAD - EVT_LOOP(17) - EVT_CALL(GetNpcPos, NPC_Dummy, LVar0, LVar1, LVar2) - EVT_CALL(N(SetSpringPosition), MV_SpringEntityIndex, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_Dummy, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Dummy, EVT_FLOAT(0.8)) - EVT_CALL(NpcJump0, NPC_Dummy, 370, 10, 20, 15) - EVT_CALL(PlaySoundAt, SOUND_OBJECT_LAND, SOUND_SPACE_DEFAULT, 370, 10, 20) - EVT_CALL(PlaySoundAt, SOUND_SPRING, SOUND_SPACE_DEFAULT, 370, 10, 20) - EVT_CALL(N(PlaySpringReboundAnimation), MV_SpringEntityIndex) - EVT_IF_EQ(GF_KMR10_UnreadFlagForSpring, FALSE) - EVT_ADD(GF_KMR10_UnreadFlagForSpring, 1) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END + Wait(15) + IfEq(GF_KMR10_KnockedSpringOutOfTree, FALSE) + Set(GF_KMR10_KnockedSpringOutOfTree, TRUE) + Call(DisablePlayerInput, TRUE) + Call(SetNpcPos, NPC_Dummy, 370, 115, -20) + Thread + Loop(17) + Call(GetNpcPos, NPC_Dummy, LVar0, LVar1, LVar2) + Call(N(SetSpringPosition), MV_SpringEntityIndex, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(SetNpcPos, NPC_Dummy, NPC_DISPOSE_LOCATION) + EndThread + Call(SetNpcJumpscale, NPC_Dummy, Float(0.8)) + Call(NpcJump0, NPC_Dummy, 370, 10, 20, 15) + Call(PlaySoundAt, SOUND_OBJECT_LAND, SOUND_SPACE_DEFAULT, 370, 10, 20) + Call(PlaySoundAt, SOUND_SPRING, SOUND_SPACE_DEFAULT, 370, 10, 20) + Call(N(PlaySpringReboundAnimation), MV_SpringEntityIndex) + IfEq(GF_KMR10_UnreadFlagForSpring, FALSE) + Add(GF_KMR10_UnreadFlagForSpring, 1) + EndIf + Call(DisablePlayerInput, FALSE) + EndIf + Return + End }; EvtScript N(EVS_Spring_TetherCameraToPlayer) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_UseSpring) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAUNCH) - EVT_EXEC_GET_TID(N(EVS_Spring_TetherCameraToPlayer), LVarA) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.2)) - EVT_CALL(PlayerJump, 456, 142, 99, 30) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAUNCH) + ExecGetTID(N(EVS_Spring_TetherCameraToPlayer), LVarA) + Call(SetPlayerJumpscale, Float(1.2)) + Call(PlayerJump, 456, 142, 99, 30) + KillThread(LVarA) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_OpenChest_HammerThrow) = EVT_OPEN_CHEST_BADGE(ITEM_HAMMER_THROW, GF_KMR10_Chest_HammerThrow); EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -190, 75, 220, 0, ITEM_SLEEPY_SHEEP, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KMR10_ItemBlock_SleepySheep) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 633, 142, 119, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_KMR10_Chest_HammerThrow) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenChest_HammerThrow))) - EVT_IF_EQ(GF_KMR10_KnockedSpringOutOfTree, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_ScriptSpring), 370, 115, -20, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_UseSpring))) - EVT_SET(MV_SpringEntityIndex, LVar0) - EVT_ELSE - EVT_CALL(MakeEntity, EVT_PTR(Entity_ScriptSpring), 370, 10, 20, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_UseSpring))) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_YellowBlock), -190, 75, 220, 0, ITEM_SLEEPY_SHEEP, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KMR10_ItemBlock_SleepySheep) + Call(MakeEntity, Ref(Entity_Chest), 633, 142, 119, 0, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_KMR10_Chest_HammerThrow) + Call(AssignScript, Ref(N(EVS_OpenChest_HammerThrow))) + IfEq(GF_KMR10_KnockedSpringOutOfTree, FALSE) + Call(MakeEntity, Ref(Entity_ScriptSpring), 370, 115, -20, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_UseSpring))) + Set(MV_SpringEntityIndex, LVar0) + Else + Call(MakeEntity, Ref(Entity_ScriptSpring), 370, 10, 20, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_UseSpring))) + EndIf + Return + End }; diff --git a/src/world/area_kmr/kmr_10/kmr_10_5_foliage.c b/src/world/area_kmr/kmr_10/kmr_10_5_foliage.c index 052541b282e..abf300e4252 100644 --- a/src/world/area_kmr/kmr_10/kmr_10_5_foliage.c +++ b/src/world/area_kmr/kmr_10/kmr_10_5_foliage.c @@ -40,11 +40,11 @@ BombTrigger N(BombPos_Tree1) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_k1, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_ki_a, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(SearchBush_Bush1))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_k1, 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_ki_a, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Return + End }; diff --git a/src/world/area_kmr/kmr_11/kmr_11_1_music.c b/src/world/area_kmr/kmr_11/kmr_11_1_music.c index bc6303b62ca..b2c13677515 100644 --- a/src/world/area_kmr/kmr_11/kmr_11_1_music.c +++ b/src/world/area_kmr/kmr_11/kmr_11_1_music.c @@ -1,7 +1,7 @@ #include "kmr_11.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) + Return + End }; diff --git a/src/world/area_kmr/kmr_11/kmr_11_2_main.c b/src/world/area_kmr/kmr_11/kmr_11_2_main.c index 7d5a1535a27..7bcddcfbbbf 100644 --- a/src/world/area_kmr/kmr_11/kmr_11_2_main.c +++ b/src/world/area_kmr/kmr_11/kmr_11_2_main.c @@ -17,64 +17,64 @@ API_CALLABLE(N(UseSlowerFadeOnMapChange)) { } EvtScript N(EVS_PlayFortressAnimation) = { - EVT_CALL(LoadAnimatedModel, MDL_ANIMATOR_1, EVT_PTR(N(AnimSkeleton_Fortress))) - EVT_CALL(PlayModelAnimation, MDL_ANIMATOR_1, EVT_PTR(N(AnimScript_Fortress))) - EVT_CALL(SetAnimatedModelRootPosition, MDL_ANIMATOR_1, 0, 0, 0) - EVT_CALL(SetAnimatedModelRenderMode, MDL_ANIMATOR_1, RENDER_MODE_SURFACE_OPA) - EVT_RETURN - EVT_END + Call(LoadAnimatedModel, MDL_ANIMATOR_1, Ref(N(AnimSkeleton_Fortress))) + Call(PlayModelAnimation, MDL_ANIMATOR_1, Ref(N(AnimScript_Fortress))) + Call(SetAnimatedModelRootPosition, MDL_ANIMATOR_1, 0, 0, 0) + Call(SetAnimatedModelRenderMode, MDL_ANIMATOR_1, RENDER_MODE_SURFACE_OPA) + Return + End }; EvtScript N(EVS_PlayBridgeAnimation) = { - EVT_CALL(LoadAnimatedModel, MDL_ANIMATOR_0, EVT_PTR(N(AnimSkeleton_Bridge))) - EVT_CALL(PlayModelAnimation, MDL_ANIMATOR_0, EVT_PTR(N(AnimScript_Bridge))) - EVT_CALL(SetAnimatedModelRootPosition, MDL_ANIMATOR_0, 0, 0, 0) - EVT_CALL(SetAnimatedModelRenderMode, MDL_ANIMATOR_0, RENDER_MODE_SURFACE_OPA) - EVT_RETURN - EVT_END + Call(LoadAnimatedModel, MDL_ANIMATOR_0, Ref(N(AnimSkeleton_Bridge))) + Call(PlayModelAnimation, MDL_ANIMATOR_0, Ref(N(AnimScript_Bridge))) + Call(SetAnimatedModelRootPosition, MDL_ANIMATOR_0, 0, 0, 0) + Call(SetAnimatedModelRenderMode, MDL_ANIMATOR_0, RENDER_MODE_SURFACE_OPA) + Return + End }; //@bug exit to 'Save and Continue?' map is not properly terminated! EvtScript N(EVS_BadExit_kmr_24_0) = { - EVT_CALL(FadeOutMusic, 0, 1500) - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_24"), kmr_24_ENTRY_0, TRANSITION_MARIO_BLACK) - EVT_WAIT(100) + Call(FadeOutMusic, 0, 1500) + Call(GotoMapSpecial, Ref("kmr_24"), kmr_24_ENTRY_0, TRANSITION_MARIO_BLACK) + Wait(100) }; EvtScript N(EVS_ExitWalk_kmr_12_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(UseExitHeading, 60, kmr_11_ENTRY_0) - EVT_EXEC(ExitWalk) - EVT_CALL(GotoMap, EVT_PTR("kmr_12"), kmr_12_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(UseExitHeading, 60, kmr_11_ENTRY_0) + Exec(ExitWalk) + Call(GotoMap, Ref("kmr_12"), kmr_12_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_kmr_10_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(UseExitHeading, 60, kmr_11_ENTRY_1) - EVT_EXEC(ExitWalk) - EVT_IF_GE(GB_StoryProgress, STORY_CH0_KAMMY_RETURNED_TO_BOWSER) - EVT_CALL(GotoMap, EVT_PTR("kmr_10"), kmr_10_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_ELSE - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_Scene_KammyWatching)) - EVT_END_IF - EVT_UNBIND - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(UseExitHeading, 60, kmr_11_ENTRY_1) + Exec(ExitWalk) + IfGe(GB_StoryProgress, STORY_CH0_KAMMY_RETURNED_TO_BOWSER) + Call(GotoMap, Ref("kmr_10"), kmr_10_ENTRY_0) + Wait(100) + Return + Else + Wait(10) + ExecWait(N(EVS_Scene_KammyWatching)) + EndIf + Unbind + Return + End }; MAP_RODATA_PAD(1,exits); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kmr_12_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kmr_10_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kmr_12_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kmr_10_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) + Return + End }; FoliageModelList N(SwitchBush_Models) = FOLIAGE_MODEL_LIST(MODEL_kusa4); @@ -93,58 +93,58 @@ SearchBushConfig N(SearchBush_SwitchBush) = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_GOOMBA_ROAD) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(N(UseSlowerFadeOnMapChange)) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(ClearDefeatedEnemies) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_IF_LT(GB_StoryProgress, STORY_CH0_KAMMY_RETURNED_TO_BOWSER) - EVT_CALL(N(SetupFog)) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_SetupFoliage)) - EVT_CALL(InitAnimatedModels) - EVT_CALL(EnableModel, MODEL_eye_mask, FALSE) - EVT_IF_LT(GB_StoryProgress, STORY_CH0_HIT_GATEHOUSE_SWITCH) - EVT_CALL(EnableModel, MODEL_bb, FALSE) - EVT_ELSE - EVT_CALL(SetGroupVisibility, MODEL_ue, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_sotokabe, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_tobira, MODEL_GROUP_HIDDEN) - EVT_CALL(EnableModel, MODEL_b1, FALSE) - EVT_CALL(EnableModel, MODEL_b2, FALSE) - EVT_CALL(EnableModel, MODEL_b3, FALSE) - EVT_CALL(EnableModel, MODEL_b4, FALSE) - EVT_CALL(EnableModel, MODEL_b5, FALSE) - EVT_CALL(EnableModel, MODEL_b6, FALSE) - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH0_DEFEATED_GOOMBA_KING) - EVT_IF_EQ(GF_KMR11_GoombaBrosFledToCastle, FALSE) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CALL(SetMusicTrack, 0, SONG_GOOMBA_BROS_RETREAT, 1, 8) - EVT_EXEC_WAIT(N(EVS_Scene_MeetGoombaKing)) - EVT_SET(GF_KMR11_GoombaBrosFledToCastle, TRUE) - EVT_ELSE - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_END_IF - EVT_ELSE - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_END_IF - EVT_SET(LVar0, EVT_PTR(N(SearchBush_SwitchBush))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Scripted)), TRIGGER_WALL_PRESS_A, COLLIDER_kusa4, 1, 0) - EVT_CALL(SetGroupVisibility, MODEL_event_cam, MODEL_GROUP_HIDDEN) - EVT_CALL(TranslateGroup, MODEL_g172, NPC_DISPOSE_LOCATION) - EVT_CALL(TranslateGroup, MODEL_g173, NPC_DISPOSE_LOCATION) - EVT_IF_GE(GB_StoryProgress, STORY_CH0_HIT_GATEHOUSE_SWITCH) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_GOOMBA_ROAD) + Call(SetSpriteShading, SHADING_NONE) + Call(N(UseSlowerFadeOnMapChange)) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(ClearDefeatedEnemies) + ExecWait(N(EVS_MakeEntities)) + IfLt(GB_StoryProgress, STORY_CH0_KAMMY_RETURNED_TO_BOWSER) + Call(N(SetupFog)) + EndIf + ExecWait(N(EVS_SetupFoliage)) + Call(InitAnimatedModels) + Call(EnableModel, MODEL_eye_mask, FALSE) + IfLt(GB_StoryProgress, STORY_CH0_HIT_GATEHOUSE_SWITCH) + Call(EnableModel, MODEL_bb, FALSE) + Else + Call(SetGroupVisibility, MODEL_ue, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_sotokabe, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_tobira, MODEL_GROUP_HIDDEN) + Call(EnableModel, MODEL_b1, FALSE) + Call(EnableModel, MODEL_b2, FALSE) + Call(EnableModel, MODEL_b3, FALSE) + Call(EnableModel, MODEL_b4, FALSE) + Call(EnableModel, MODEL_b5, FALSE) + Call(EnableModel, MODEL_b6, FALSE) + EndIf + IfLt(GB_StoryProgress, STORY_CH0_DEFEATED_GOOMBA_KING) + IfEq(GF_KMR11_GoombaBrosFledToCastle, FALSE) + Exec(N(EVS_BindExitTriggers)) + Call(SetMusicTrack, 0, SONG_GOOMBA_BROS_RETREAT, 1, 8) + ExecWait(N(EVS_Scene_MeetGoombaKing)) + Set(GF_KMR11_GoombaBrosFledToCastle, TRUE) + Else + Exec(N(EVS_SetupMusic)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + EndIf + Else + Exec(N(EVS_SetupMusic)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + EndIf + Set(LVar0, Ref(N(SearchBush_SwitchBush))) + BindTrigger(Ref(N(EVS_SearchBush_Scripted)), TRIGGER_WALL_PRESS_A, COLLIDER_kusa4, 1, 0) + Call(SetGroupVisibility, MODEL_event_cam, MODEL_GROUP_HIDDEN) + Call(TranslateGroup, MODEL_g172, NPC_DISPOSE_LOCATION) + Call(TranslateGroup, MODEL_g173, NPC_DISPOSE_LOCATION) + IfGe(GB_StoryProgress, STORY_CH0_HIT_GATEHOUSE_SWITCH) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Return + End }; diff --git a/src/world/area_kmr/kmr_11/kmr_11_3_scenes.c b/src/world/area_kmr/kmr_11/kmr_11_3_scenes.c index 1911d93ee58..191495ecfe7 100644 --- a/src/world/area_kmr/kmr_11/kmr_11_3_scenes.c +++ b/src/world/area_kmr/kmr_11/kmr_11_3_scenes.c @@ -21,446 +21,446 @@ API_CALLABLE(N(SetCameraVFov)) { } EvtScript N(EVS_GoombaKingBlastoff) = { - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(MakeLerp, 100, 10, 150, EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_MULF(LVar0, EVT_FLOAT(0.01)) - EVT_CALL(SetNpcScale, NPC_GoombaKing, LVar0, LVar0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(SetNpcJumpscale, NPC_GoombaKing, EVT_FLOAT(0.3)) - EVT_CALL(NpcJump0, NPC_GoombaKing, -1600, 1000, -1600, 150) - EVT_CALL(PlaySoundAt, SOUND_LARGE_LENS_FLARE, SOUND_SPACE_DEFAULT, -1600, 1000, -1600) - EVT_CALL(N(MakeLensFlare), -1600, 1000, -1600, 40) - EVT_CALL(SetNpcPos, NPC_GoombaKing, NPC_DISPOSE_LOCATION) - EVT_CALL(RemoveNpc, NPC_GoombaKing) - EVT_RETURN - EVT_END + Wait(10) + Thread + Call(MakeLerp, 100, 10, 150, EASING_LINEAR) + Label(0) + Call(UpdateLerp) + MulF(LVar0, Float(0.01)) + Call(SetNpcScale, NPC_GoombaKing, LVar0, LVar0, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + EndThread + Call(SetNpcJumpscale, NPC_GoombaKing, Float(0.3)) + Call(NpcJump0, NPC_GoombaKing, -1600, 1000, -1600, 150) + Call(PlaySoundAt, SOUND_LARGE_LENS_FLARE, SOUND_SPACE_DEFAULT, -1600, 1000, -1600) + Call(N(MakeLensFlare), -1600, 1000, -1600, 40) + Call(SetNpcPos, NPC_GoombaKing, NPC_DISPOSE_LOCATION) + Call(RemoveNpc, NPC_GoombaKing) + Return + End }; EvtScript N(EVS_FocusCam_FortressExterior) = { - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamPitch, CAM_DEFAULT, -7, 0) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -1208, 881) - EVT_CALL(SetCamPosB, CAM_DEFAULT, -524, -89) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 110) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 500) - EVT_RETURN - EVT_END + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamPitch, CAM_DEFAULT, -7, 0) + Call(SetCamPosA, CAM_DEFAULT, -1208, 881) + Call(SetCamPosB, CAM_DEFAULT, -524, -89) + Call(SetCamPosC, CAM_DEFAULT, 0, 110) + Call(SetCamDistance, CAM_DEFAULT, 500) + Return + End }; EvtScript N(EVS_FocusCam_BesidePlayer) = { - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamPitch, CAM_DEFAULT, -15, 25) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -1208, 881) - EVT_CALL(SetCamPosB, CAM_DEFAULT, -579, -89) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 110) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 200) - EVT_RETURN - EVT_END + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamPitch, CAM_DEFAULT, -15, 25) + Call(SetCamPosA, CAM_DEFAULT, -1208, 881) + Call(SetCamPosB, CAM_DEFAULT, -579, -89) + Call(SetCamPosC, CAM_DEFAULT, 0, 110) + Call(SetCamDistance, CAM_DEFAULT, 200) + Return + End }; EvtScript N(EVS_FocusCam_Battlement) = { - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamPitch, CAM_DEFAULT, -7, 2) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -1681, 511) - EVT_CALL(SetCamPosB, CAM_DEFAULT, -430, -92) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 200) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) - EVT_RETURN - EVT_END + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamPitch, CAM_DEFAULT, -7, 2) + Call(SetCamPosA, CAM_DEFAULT, -1681, 511) + Call(SetCamPosB, CAM_DEFAULT, -430, -92) + Call(SetCamPosC, CAM_DEFAULT, 0, 200) + Call(SetCamDistance, CAM_DEFAULT, 250) + Return + End }; EvtScript N(EVS_RandomQuaking) = { - EVT_CALL(PlaySound, SOUND_KMR_TOWER_COLLAPSE_RUMBLE_LOOP) - EVT_LABEL(0) - EVT_CALL(RandInt, 10, LVar0) - EVT_ADD(LVar0, 5) - EVT_MULF(LVar0, EVT_FLOAT(0.1)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, LVar0) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(PlaySound, SOUND_KMR_TOWER_COLLAPSE_RUMBLE_LOOP) + Label(0) + Call(RandInt, 10, LVar0) + Add(LVar0, 5) + MulF(LVar0, Float(0.1)) + Call(ShakeCam, CAM_DEFAULT, 0, 20, LVar0) + Goto(0) + Return + End }; EvtScript N(EVS_FortressCollapse_MakeDust1) = { - EVT_PLAY_EFFECT(EFFECT_DUST, 0, -273, 345, -44, 70) - EVT_RETURN - EVT_END + PlayEffect(EFFECT_DUST, 0, -273, 345, -44, 70) + Return + End }; EvtScript N(EVS_FortressCollapse_MakeDust2) = { - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, -253, 8, 118, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, -253, 18, 138, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, -253, 18, 98, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, -253, 28, 118, 0) - EVT_RETURN - EVT_END + PlayEffect(EFFECT_LANDING_DUST, 4, -253, 8, 118, 0) + PlayEffect(EFFECT_LANDING_DUST, 4, -253, 18, 138, 0) + PlayEffect(EFFECT_LANDING_DUST, 4, -253, 18, 98, 0) + PlayEffect(EFFECT_LANDING_DUST, 4, -253, 28, 118, 0) + Return + End }; EvtScript N(EVS_FortressCollapse_MakeDust3) = { - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, -346, 147, -21, 0) - EVT_RETURN - EVT_END + PlayEffect(EFFECT_LANDING_DUST, 1, -346, 147, -21, 0) + Return + End }; EvtScript N(EVS_FortressCollapse_MakeDust4) = { - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, -336, 147, -21, 0) - EVT_RETURN - EVT_END + PlayEffect(EFFECT_LANDING_DUST, 1, -336, 147, -21, 0) + Return + End }; EvtScript N(EVS_FortressCollapse_MakeDust5) = { - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, -249, 147, -64, 0) - EVT_RETURN - EVT_END + PlayEffect(EFFECT_LANDING_DUST, 1, -249, 147, -64, 0) + Return + End }; EvtScript N(EVS_FortressCollapse_MakeDust6) = { - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, -239, 147, -64, 0) - EVT_RETURN - EVT_END + PlayEffect(EFFECT_LANDING_DUST, 1, -239, 147, -64, 0) + Return + End }; EvtScript N(EVS_FortressCollapse_MakeDust7) = { - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, -158, -10, -175, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, -158, 0, -155, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, -158, 0, -195, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, -158, 10, -175, 0) - EVT_RETURN - EVT_END + PlayEffect(EFFECT_LANDING_DUST, 4, -158, -10, -175, 0) + PlayEffect(EFFECT_LANDING_DUST, 4, -158, 0, -155, 0) + PlayEffect(EFFECT_LANDING_DUST, 4, -158, 0, -195, 0) + PlayEffect(EFFECT_LANDING_DUST, 4, -158, 10, -175, 0) + Return + End }; EvtScript N(EVS_FortressCollapse_MakeDust8) = { - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, 263, -10, -264, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, 263, 0, -244, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, 263, 0, -284, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, 263, 10, -264, 0) - EVT_RETURN - EVT_END + PlayEffect(EFFECT_LANDING_DUST, 4, 263, -10, -264, 0) + PlayEffect(EFFECT_LANDING_DUST, 4, 263, 0, -244, 0) + PlayEffect(EFFECT_LANDING_DUST, 4, 263, 0, -284, 0) + PlayEffect(EFFECT_LANDING_DUST, 4, 263, 10, -264, 0) + Return + End }; EvtScript N(EVS_FortressCollapse_PlayFX) = { - EVT_CALL(PlaySound, SOUND_KMR_TOWER_RUMBLE) - EVT_EXEC(N(EVS_FortressCollapse_MakeDust1)) - EVT_WAIT(97) - EVT_CALL(PlaySound, SOUND_DISTANT_THUD) - EVT_EXEC(N(EVS_FortressCollapse_MakeDust2)) - EVT_WAIT(95) - EVT_CALL(PlaySound, SOUND_KMR_TOWER_COLLAPSE_THUD) - EVT_EXEC(N(EVS_FortressCollapse_MakeDust3)) - EVT_EXEC(N(EVS_FortressCollapse_MakeDust4)) - EVT_WAIT(34) - EVT_CALL(PlaySound, SOUND_KMR_TOWER_COLLAPSE_THUD) - EVT_EXEC(N(EVS_FortressCollapse_MakeDust5)) - EVT_EXEC(N(EVS_FortressCollapse_MakeDust6)) - EVT_WAIT(40) - EVT_CALL(PlaySound, SOUND_KMR_TOWER_COLLAPSE_UNFOLD) - EVT_WAIT(160) - EVT_CALL(PlaySound, SOUND_BOING) - EVT_WAIT(40) - EVT_CALL(PlaySound, SOUND_DISTANT_THUD) - EVT_EXEC(N(EVS_FortressCollapse_MakeDust7)) - EVT_EXEC(N(EVS_FortressCollapse_MakeDust8)) - EVT_RETURN - EVT_END + Call(PlaySound, SOUND_KMR_TOWER_RUMBLE) + Exec(N(EVS_FortressCollapse_MakeDust1)) + Wait(97) + Call(PlaySound, SOUND_DISTANT_THUD) + Exec(N(EVS_FortressCollapse_MakeDust2)) + Wait(95) + Call(PlaySound, SOUND_KMR_TOWER_COLLAPSE_THUD) + Exec(N(EVS_FortressCollapse_MakeDust3)) + Exec(N(EVS_FortressCollapse_MakeDust4)) + Wait(34) + Call(PlaySound, SOUND_KMR_TOWER_COLLAPSE_THUD) + Exec(N(EVS_FortressCollapse_MakeDust5)) + Exec(N(EVS_FortressCollapse_MakeDust6)) + Wait(40) + Call(PlaySound, SOUND_KMR_TOWER_COLLAPSE_UNFOLD) + Wait(160) + Call(PlaySound, SOUND_BOING) + Wait(40) + Call(PlaySound, SOUND_DISTANT_THUD) + Exec(N(EVS_FortressCollapse_MakeDust7)) + Exec(N(EVS_FortressCollapse_MakeDust8)) + Return + End }; EvtScript N(EVS_FortressCollapse_PlayerReactions) = { - EVT_CALL(DisablePartnerAI, 0) - EVT_WAIT(37) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_FlailArms) - EVT_WAIT(60) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.8)) - EVT_CALL(PlayerJump1, LVar0, LVar1, LVar2, 10) - EVT_WAIT(30) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Run) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(6.0)) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(6.0)) - EVT_THREAD - EVT_CALL(NpcMoveTo, NPC_PARTNER, -573, 162, 0) - EVT_END_THREAD - EVT_CALL(PlayerMoveTo, -547, 147, 0) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(EnablePartnerAI) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePartnerAI, 0) + Wait(37) + Call(SetPlayerAnimation, ANIM_MarioW2_FlailArms) + Wait(60) + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerJumpscale, Float(1.8)) + Call(PlayerJump1, LVar0, LVar1, LVar2, 10) + Wait(30) + Call(SetPlayerAnimation, ANIM_Mario1_Run) + Call(SetPlayerSpeed, Float(6.0)) + Call(SetNpcSpeed, NPC_PARTNER, Float(6.0)) + Thread + Call(NpcMoveTo, NPC_PARTNER, -573, 162, 0) + EndThread + Call(PlayerMoveTo, -547, 147, 0) + Call(InterpPlayerYaw, 90, 0) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(EnablePartnerAI) + Wait(100) + Return + End }; EvtScript N(EVS_Scene_SelfDestruct) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(15) - EVT_CALL(SetCamType, CAM_DEFAULT, 1, FALSE) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 0, EVT_FLOAT(-12.5)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -389, -12) - EVT_CALL(SetCamPosB, CAM_DEFAULT, -469, 156) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -389, 120, -12) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 * DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcPos, NPC_GoombaKing, -380, 0, -42) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcJumpscale, NPC_GoombaKing, EVT_FLOAT(0.8)) - EVT_CALL(NpcFacePlayer, NPC_GoombaKing, 0) - EVT_CALL(PlaySoundAtNpc, NPC_GoombaKing, SOUND_LARGE_ACTOR_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump1, NPC_GoombaKing, -380, 120, -42, 25 * DT) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerPos, -497, 0, 130) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, -534, 0, 127) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_CALL(SpeakToPlayer, NPC_GoombaKing, ANIM_GoombaKing_Idle, ANIM_GoombaKing_Idle, 0, MSG_CH0_00D8) - EVT_SET(GB_StoryProgress, STORY_CH0_HIT_GATEHOUSE_SWITCH) - EVT_CALL(EnableModel, MODEL_eye_mask, TRUE) - EVT_WAIT(1) - EVT_EXEC_GET_TID(N(EVS_RandomQuaking), LVarA) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.7)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, -100, 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(60 * DT) - EVT_CALL(SpeakToPlayer, NPC_GoombaKing, ANIM_GoombaKing_Idle, ANIM_GoombaKing_Idle, 0, MSG_CH0_00D9) - EVT_LOOP(100) - EVT_CALL(GetNpcPos, NPC_GoombaKing, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_GoombaKing, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_GoombaKing, -303, 286, -120) - EVT_CALL(FadeOutMusic, 0, 1000) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_VacantStare) - EVT_WAIT(30) - EVT_KILL_THREAD(LVarA) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 100, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 15, EVT_FLOAT(4.0)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 83, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(1.5)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 15, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(1.5)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 170, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(3.0)) - EVT_WAIT(50) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(4.0)) - EVT_WAIT(20) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(0.5)) - EVT_WAIT(20) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(0.2)) - EVT_CALL(PlaySound, SOUND_KMR_TOWER_COLLAPSE_RUMBLE_LOOP | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_END_THREAD - EVT_EXEC(N(EVS_PlayFortressAnimation)) - EVT_EXEC(N(EVS_FortressCollapse_PlayFX)) - EVT_EXEC(N(EVS_FortressCollapse_PlayerReactions)) - EVT_WAIT(380) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, -150, 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(20) - EVT_EXEC(N(EVS_GoombaKingBlastoff)) - EVT_EXEC(N(EVS_PlayBridgeAnimation)) - EVT_WAIT(150) - EVT_WAIT(50) - EVT_CALL(EnableModel, MODEL_o416, FALSE) - EVT_CALL(EnableModel, MODEL_o415, FALSE) - EVT_CALL(EnableModel, MODEL_eye_mask, FALSE) - EVT_CALL(DeleteAnimatedModel, 1) - EVT_CALL(DeleteAnimatedModel, 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.8)) - EVT_LOOP(2) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10) - EVT_WAIT(3) - EVT_END_LOOP - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH0_00DA) - EVT_CALL(EnablePartnerAI) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GB_StoryProgress, STORY_CH0_OPENED_BRIDGE_TO_TOAD_TOWN) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Wait(15) + Call(SetCamType, CAM_DEFAULT, 1, FALSE) + Call(SetCamPitch, CAM_DEFAULT, 0, Float(-12.5)) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPosA, CAM_DEFAULT, -389, -12) + Call(SetCamPosB, CAM_DEFAULT, -469, 156) + Call(SetPanTarget, CAM_DEFAULT, -389, 120, -12) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 * DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetNpcPos, NPC_GoombaKing, -380, 0, -42) + Wait(20 * DT) + Call(SetNpcJumpscale, NPC_GoombaKing, Float(0.8)) + Call(NpcFacePlayer, NPC_GoombaKing, 0) + Call(PlaySoundAtNpc, NPC_GoombaKing, SOUND_LARGE_ACTOR_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump1, NPC_GoombaKing, -380, 120, -42, 25 * DT) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.0)) + Wait(10 * DT) + Call(SetPlayerPos, -497, 0, 130) + Call(InterpPlayerYaw, 270, 0) + Call(SetNpcPos, NPC_PARTNER, -534, 0, 127) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + Call(SpeakToPlayer, NPC_GoombaKing, ANIM_GoombaKing_Idle, ANIM_GoombaKing_Idle, 0, MSG_CH0_00D8) + Set(GB_StoryProgress, STORY_CH0_HIT_GATEHOUSE_SWITCH) + Call(EnableModel, MODEL_eye_mask, TRUE) + Wait(1) + ExecGetTID(N(EVS_RandomQuaking), LVarA) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.7)) + Call(UseSettingsFrom, CAM_DEFAULT, 0, -100, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(60 * DT) + Call(SpeakToPlayer, NPC_GoombaKing, ANIM_GoombaKing_Idle, ANIM_GoombaKing_Idle, 0, MSG_CH0_00D9) + Loop(100) + Call(GetNpcPos, NPC_GoombaKing, LVar0, LVar1, LVar2) + Sub(LVar1, 1) + Call(SetNpcPos, NPC_GoombaKing, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(SetNpcPos, NPC_GoombaKing, -303, 286, -120) + Call(FadeOutMusic, 0, 1000) + Call(SetPlayerAnimation, ANIM_Mario1_VacantStare) + Wait(30) + KillThread(LVarA) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 100, Float(0.5)) + Call(ShakeCam, CAM_DEFAULT, 0, 15, Float(4.0)) + Call(ShakeCam, CAM_DEFAULT, 0, 83, Float(0.5)) + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(1.5)) + Call(ShakeCam, CAM_DEFAULT, 0, 15, Float(0.5)) + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(1.5)) + Call(ShakeCam, CAM_DEFAULT, 0, 170, Float(0.5)) + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(3.0)) + Wait(50) + Call(ShakeCam, CAM_DEFAULT, 0, 20, Float(4.0)) + Wait(20) + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(0.5)) + Wait(20) + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(0.2)) + Call(PlaySound, SOUND_KMR_TOWER_COLLAPSE_RUMBLE_LOOP | SOUND_ID_TRIGGER_CHANGE_SOUND) + EndThread + Exec(N(EVS_PlayFortressAnimation)) + Exec(N(EVS_FortressCollapse_PlayFX)) + Exec(N(EVS_FortressCollapse_PlayerReactions)) + Wait(380) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(UseSettingsFrom, CAM_DEFAULT, 0, -150, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(20) + Exec(N(EVS_GoombaKingBlastoff)) + Exec(N(EVS_PlayBridgeAnimation)) + Wait(150) + Wait(50) + Call(EnableModel, MODEL_o416, FALSE) + Call(EnableModel, MODEL_o415, FALSE) + Call(EnableModel, MODEL_eye_mask, FALSE) + Call(DeleteAnimatedModel, 1) + Call(DeleteAnimatedModel, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Exec(N(EVS_SetupMusic)) + Call(DisablePartnerAI, 0) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.8)) + Loop(2) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10) + Wait(3) + EndLoop + Call(DisablePartnerAI, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH0_00DA) + Call(EnablePartnerAI) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt, COLLIDER_FLAGS_UPPER_MASK) + Set(GB_StoryProgress, STORY_CH0_OPENED_BRIDGE_TO_TOAD_TOWN) + Call(DisablePlayerInput, FALSE) + Call(EnablePartnerAI) + Unbind + Return + End }; EvtScript N(EVS_BouncePlayerAndPartner) = { - EVT_THREAD - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(2.0)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(PlayerJump1, LVar0, LVar1, LVar2, LVar3) - EVT_END_THREAD - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(2.0)) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump1, NPC_PARTNER, LVar0, LVar1, LVar2, LVar3) - EVT_RETURN - EVT_END + Thread + Call(SetPlayerJumpscale, Float(2.0)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(PlayerJump1, LVar0, LVar1, LVar2, LVar3) + EndThread + Call(SetNpcJumpscale, NPC_PARTNER, Float(2.0)) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(NpcJump1, NPC_PARTNER, LVar0, LVar1, LVar2, LVar3) + Return + End }; EvtScript N(EVS_Scene_MeetGoombaKing_Impl) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC_WAIT(N(EVS_FocusCam_FortressExterior)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.3 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, EVT_FLOAT(0.5), 1) - EVT_WAIT(170 * DT) - EVT_CALL(SetNpcPos, NPC_BlueGoombaBro, -830, 0, -70) - EVT_CALL(SetNpcPos, NPC_RedGoombaBro, -800, 0, -20) - EVT_CALL(SetNpcAnimation, NPC_BlueGoombaBro, ANIM_GoombaBros_Blue_CryRun) - EVT_CALL(SetNpcAnimation, NPC_RedGoombaBro, ANIM_GoombaBros_Red_CryRun) - EVT_CALL(SetNpcSpeed, NPC_BlueGoombaBro, EVT_FLOAT(4.0 / DT)) - EVT_CALL(SetNpcSpeed, NPC_RedGoombaBro, EVT_FLOAT(4.0 / DT)) - EVT_WAIT(50 * DT) - EVT_THREAD - EVT_CALL(NpcMoveTo, NPC_BlueGoombaBro, -521, -100, 0) - EVT_END_THREAD - EVT_CALL(NpcMoveTo, NPC_RedGoombaBro, -504, -74, 0) - EVT_CALL(SpeakToPlayer, NPC_RedGoombaBro, ANIM_GoombaBros_Red_CryWalk, ANIM_GoombaBros_Red_CryIdle, 5, MSG_CH0_00C3) - EVT_CALL(SpeakToPlayer, NPC_BlueGoombaBro, ANIM_GoombaBros_Blue_CryWalk, ANIM_GoombaBros_Blue_CryIdle, 5, MSG_CH0_00C4) - EVT_CALL(PlaySoundAtCollider, COLLIDER_tt, SOUND_METAL_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 90, 30, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o416, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o415, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_THREAD - EVT_CALL(NpcMoveTo, NPC_BlueGoombaBro, -353, -93, 0) - EVT_END_THREAD - EVT_CALL(NpcMoveTo, NPC_RedGoombaBro, -364, -77, 0) - EVT_CALL(MakeLerp, 90, 0, 30, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o416, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o415, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, COLLIDER_tt, SOUND_METAL_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAt, SOUND_HEAVY_NPC_STEP_A, SOUND_SPACE_DEFAULT, -330, 0, -130) - EVT_CALL(PlaySoundAt, SOUND_HEAVY_NPC_STEP_B, SOUND_SPACE_DEFAULT, -330, 0, -130) - EVT_PLAY_EFFECT(EFFECT_DROP_LEAVES, 0, -725, 117, -137, 100) - EVT_PLAY_EFFECT(EFFECT_DROP_LEAVES, 0, -617, 108, -137, 100) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.5)) - EVT_CALL(SetPlayerPos, -920, 0, -35) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PlayerMoveTo, -575, -60, 0) - EVT_WAIT(30 * DT) - EVT_CALL(DisablePartnerAI, 0) - EVT_WAIT(10 * DT) - EVT_CALL(PlayerFaceNpc, NPC_PARTNER, FALSE) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH0_00C5) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_WAIT(40 * DT) - EVT_CALL(PlaySoundAt, SOUND_HEAVY_NPC_STEP_A, SOUND_SPACE_DEFAULT, -330, 0, -130) - EVT_CALL(PlaySoundAt, SOUND_HEAVY_NPC_STEP_B, SOUND_SPACE_DEFAULT, -330, 0, -130) - EVT_PLAY_EFFECT(EFFECT_DROP_LEAVES, 0, -725, 117, -137, 100) - EVT_PLAY_EFFECT(EFFECT_DROP_LEAVES, 0, -617, 108, -137, 100) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.2)) - EVT_SET(LVar3, 2) - EVT_EXEC(N(EVS_BouncePlayerAndPartner)) - EVT_WAIT(60 * DT) - EVT_CALL(PlaySoundAt, SOUND_HEAVY_NPC_STEP_A, SOUND_SPACE_DEFAULT, -330, 0, -130) - EVT_CALL(PlaySoundAt, SOUND_HEAVY_NPC_STEP_B, SOUND_SPACE_DEFAULT, -330, 0, -130) - EVT_PLAY_EFFECT(EFFECT_DROP_LEAVES, 0, -725, 117, -137, 100) - EVT_PLAY_EFFECT(EFFECT_DROP_LEAVES, 0, -617, 108, -137, 100) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.6)) - EVT_SET(LVar3, 4) - EVT_EXEC(N(EVS_BouncePlayerAndPartner)) - EVT_WAIT(60 * DT) - EVT_CALL(PlaySoundAt, SOUND_HEAVY_NPC_STEP_A, SOUND_SPACE_DEFAULT, -330, 0, -130) - EVT_CALL(PlaySoundAt, SOUND_HEAVY_NPC_STEP_B, SOUND_SPACE_DEFAULT, -330, 0, -130) - EVT_PLAY_EFFECT(EFFECT_DROP_LEAVES, 0, -725, 117, -137, 100) - EVT_PLAY_EFFECT(EFFECT_DROP_LEAVES, 0, -617, 108, -137, 100) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0)) - EVT_SET(LVar3, 6) - EVT_EXEC(N(EVS_BouncePlayerAndPartner)) - EVT_WAIT(60 * DT) - EVT_CALL(PlaySoundAt, SOUND_HEAVY_NPC_STEP_A, SOUND_SPACE_DEFAULT, -330, 0, -130) - EVT_CALL(PlaySoundAt, SOUND_HEAVY_NPC_STEP_B, SOUND_SPACE_DEFAULT, -330, 0, -130) - EVT_PLAY_EFFECT(EFFECT_DROP_LEAVES, 0, -725, 117, -137, 100) - EVT_PLAY_EFFECT(EFFECT_DROP_LEAVES, 0, -617, 108, -137, 100) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.5)) - EVT_SET(LVar3, 8) - EVT_EXEC(N(EVS_BouncePlayerAndPartner)) - EVT_WAIT(28 * DT) - EVT_CALL(SetMusicTrack, 0, SONG_GOOMBA_KING_THEME, 0, 8) - EVT_WAIT(32 * DT) - EVT_CALL(SetNpcAnimation, NPC_BlueGoombaBro, ANIM_GoombaBros_Blue_Idle) - EVT_CALL(SetNpcAnimation, NPC_RedGoombaBro, ANIM_GoombaBros_Red_Idle) - EVT_CALL(SetNpcJumpscale, NPC_BlueGoombaBro, EVT_FLOAT(0.8)) - EVT_CALL(SetNpcJumpscale, NPC_RedGoombaBro, EVT_FLOAT(0.8)) - EVT_THREAD - EVT_CALL(SetNpcPos, NPC_BlueGoombaBro, -400, 0, -162) - EVT_CALL(PlaySoundAtNpc, NPC_BlueGoombaBro, SOUND_ACTOR_HURT, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_BlueGoombaBro, -432, 130, -146, 30 * DT) - EVT_END_THREAD - EVT_CALL(SetNpcPos, NPC_RedGoombaBro, -400, 0, -41) - EVT_CALL(PlaySoundAtNpc, NPC_RedGoombaBro, SOUND_ACTOR_HURT, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_RedGoombaBro, -412, 130, -35, 30 * DT) - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_GoombaKing, EVT_FLOAT(0.8)) - EVT_CALL(SetNpcPos, NPC_GoombaKing, -405, 0, -91) - EVT_CALL(PlaySoundAtNpc, NPC_GoombaKing, SOUND_LARGE_ACTOR_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_GoombaKing, -419, 119, -91, 30 * DT) - EVT_CALL(PlaySoundAt, SOUND_HEAVY_NPC_STEP_A, SOUND_SPACE_DEFAULT, -330, 0, -130) - EVT_CALL(PlaySoundAt, SOUND_HEAVY_NPC_STEP_B, SOUND_SPACE_DEFAULT, -330, 0, -130) - EVT_PLAY_EFFECT(EFFECT_DROP_LEAVES, 0, -725, 117, -137, 100) - EVT_PLAY_EFFECT(EFFECT_DROP_LEAVES, 0, -617, 108, -137, 100) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_EXEC_WAIT(N(EVS_FocusCam_Battlement)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(55 * DT) - EVT_CALL(SpeakToPlayer, NPC_GoombaKing, ANIM_GoombaKing_Idle, ANIM_GoombaKing_Idle, 0, MSG_CH0_00C6) - EVT_CALL(SpeakToPlayer, NPC_RedGoombaBro, ANIM_GoombaBros_Red_Walk, ANIM_GoombaBros_Red_Idle, 0, MSG_CH0_00C7) - EVT_CALL(SpeakToPlayer, NPC_BlueGoombaBro, ANIM_GoombaBros_Blue_Walk, ANIM_GoombaBros_Blue_Idle, 0, MSG_CH0_00C8) - EVT_EXEC_WAIT(N(EVS_FocusCam_BesidePlayer)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(DisablePartnerAI, 0) - EVT_WAIT(5 * DT) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH0_00C9) - EVT_CALL(DisablePartnerAI, 0) - EVT_EXEC_WAIT(N(EVS_FocusCam_Battlement)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(5 * DT) - EVT_CALL(SpeakToPlayer, NPC_GoombaKing, ANIM_GoombaKing_Idle, ANIM_GoombaKing_Idle, 0, MSG_CH0_00CA) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcVar, NPC_GoombaKing, 0, 1) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + ExecWait(N(EVS_FocusCam_FortressExterior)) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.3 / DT)) + Call(PanToTarget, CAM_DEFAULT, Float(0.5), 1) + Wait(170 * DT) + Call(SetNpcPos, NPC_BlueGoombaBro, -830, 0, -70) + Call(SetNpcPos, NPC_RedGoombaBro, -800, 0, -20) + Call(SetNpcAnimation, NPC_BlueGoombaBro, ANIM_GoombaBros_Blue_CryRun) + Call(SetNpcAnimation, NPC_RedGoombaBro, ANIM_GoombaBros_Red_CryRun) + Call(SetNpcSpeed, NPC_BlueGoombaBro, Float(4.0 / DT)) + Call(SetNpcSpeed, NPC_RedGoombaBro, Float(4.0 / DT)) + Wait(50 * DT) + Thread + Call(NpcMoveTo, NPC_BlueGoombaBro, -521, -100, 0) + EndThread + Call(NpcMoveTo, NPC_RedGoombaBro, -504, -74, 0) + Call(SpeakToPlayer, NPC_RedGoombaBro, ANIM_GoombaBros_Red_CryWalk, ANIM_GoombaBros_Red_CryIdle, 5, MSG_CH0_00C3) + Call(SpeakToPlayer, NPC_BlueGoombaBro, ANIM_GoombaBros_Blue_CryWalk, ANIM_GoombaBros_Blue_CryIdle, 5, MSG_CH0_00C4) + Call(PlaySoundAtCollider, COLLIDER_tt, SOUND_METAL_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 90, 30, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o416, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_o415, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Thread + Call(NpcMoveTo, NPC_BlueGoombaBro, -353, -93, 0) + EndThread + Call(NpcMoveTo, NPC_RedGoombaBro, -364, -77, 0) + Call(MakeLerp, 90, 0, 30, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_o416, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_o415, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(PlaySoundAtCollider, COLLIDER_tt, SOUND_METAL_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Call(PlaySoundAt, SOUND_HEAVY_NPC_STEP_A, SOUND_SPACE_DEFAULT, -330, 0, -130) + Call(PlaySoundAt, SOUND_HEAVY_NPC_STEP_B, SOUND_SPACE_DEFAULT, -330, 0, -130) + PlayEffect(EFFECT_DROP_LEAVES, 0, -725, 117, -137, 100) + PlayEffect(EFFECT_DROP_LEAVES, 0, -617, 108, -137, 100) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(0.5)) + Call(SetPlayerPos, -920, 0, -35) + Call(SetPlayerSpeed, Float(3.0 / DT)) + Call(PlayerMoveTo, -575, -60, 0) + Wait(30 * DT) + Call(DisablePartnerAI, 0) + Wait(10 * DT) + Call(PlayerFaceNpc, NPC_PARTNER, FALSE) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH0_00C5) + Call(InterpPlayerYaw, 90, 0) + Wait(40 * DT) + Call(PlaySoundAt, SOUND_HEAVY_NPC_STEP_A, SOUND_SPACE_DEFAULT, -330, 0, -130) + Call(PlaySoundAt, SOUND_HEAVY_NPC_STEP_B, SOUND_SPACE_DEFAULT, -330, 0, -130) + PlayEffect(EFFECT_DROP_LEAVES, 0, -725, 117, -137, 100) + PlayEffect(EFFECT_DROP_LEAVES, 0, -617, 108, -137, 100) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(0.2)) + Set(LVar3, 2) + Exec(N(EVS_BouncePlayerAndPartner)) + Wait(60 * DT) + Call(PlaySoundAt, SOUND_HEAVY_NPC_STEP_A, SOUND_SPACE_DEFAULT, -330, 0, -130) + Call(PlaySoundAt, SOUND_HEAVY_NPC_STEP_B, SOUND_SPACE_DEFAULT, -330, 0, -130) + PlayEffect(EFFECT_DROP_LEAVES, 0, -725, 117, -137, 100) + PlayEffect(EFFECT_DROP_LEAVES, 0, -617, 108, -137, 100) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(0.6)) + Set(LVar3, 4) + Exec(N(EVS_BouncePlayerAndPartner)) + Wait(60 * DT) + Call(PlaySoundAt, SOUND_HEAVY_NPC_STEP_A, SOUND_SPACE_DEFAULT, -330, 0, -130) + Call(PlaySoundAt, SOUND_HEAVY_NPC_STEP_B, SOUND_SPACE_DEFAULT, -330, 0, -130) + PlayEffect(EFFECT_DROP_LEAVES, 0, -725, 117, -137, 100) + PlayEffect(EFFECT_DROP_LEAVES, 0, -617, 108, -137, 100) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.0)) + Set(LVar3, 6) + Exec(N(EVS_BouncePlayerAndPartner)) + Wait(60 * DT) + Call(PlaySoundAt, SOUND_HEAVY_NPC_STEP_A, SOUND_SPACE_DEFAULT, -330, 0, -130) + Call(PlaySoundAt, SOUND_HEAVY_NPC_STEP_B, SOUND_SPACE_DEFAULT, -330, 0, -130) + PlayEffect(EFFECT_DROP_LEAVES, 0, -725, 117, -137, 100) + PlayEffect(EFFECT_DROP_LEAVES, 0, -617, 108, -137, 100) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.5)) + Set(LVar3, 8) + Exec(N(EVS_BouncePlayerAndPartner)) + Wait(28 * DT) + Call(SetMusicTrack, 0, SONG_GOOMBA_KING_THEME, 0, 8) + Wait(32 * DT) + Call(SetNpcAnimation, NPC_BlueGoombaBro, ANIM_GoombaBros_Blue_Idle) + Call(SetNpcAnimation, NPC_RedGoombaBro, ANIM_GoombaBros_Red_Idle) + Call(SetNpcJumpscale, NPC_BlueGoombaBro, Float(0.8)) + Call(SetNpcJumpscale, NPC_RedGoombaBro, Float(0.8)) + Thread + Call(SetNpcPos, NPC_BlueGoombaBro, -400, 0, -162) + Call(PlaySoundAtNpc, NPC_BlueGoombaBro, SOUND_ACTOR_HURT, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_BlueGoombaBro, -432, 130, -146, 30 * DT) + EndThread + Call(SetNpcPos, NPC_RedGoombaBro, -400, 0, -41) + Call(PlaySoundAtNpc, NPC_RedGoombaBro, SOUND_ACTOR_HURT, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_RedGoombaBro, -412, 130, -35, 30 * DT) + Wait(10 * DT) + Thread + Call(SetNpcJumpscale, NPC_GoombaKing, Float(0.8)) + Call(SetNpcPos, NPC_GoombaKing, -405, 0, -91) + Call(PlaySoundAtNpc, NPC_GoombaKing, SOUND_LARGE_ACTOR_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_GoombaKing, -419, 119, -91, 30 * DT) + Call(PlaySoundAt, SOUND_HEAVY_NPC_STEP_A, SOUND_SPACE_DEFAULT, -330, 0, -130) + Call(PlaySoundAt, SOUND_HEAVY_NPC_STEP_B, SOUND_SPACE_DEFAULT, -330, 0, -130) + PlayEffect(EFFECT_DROP_LEAVES, 0, -725, 117, -137, 100) + PlayEffect(EFFECT_DROP_LEAVES, 0, -617, 108, -137, 100) + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(1.0)) + EndThread + ExecWait(N(EVS_FocusCam_Battlement)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(55 * DT) + Call(SpeakToPlayer, NPC_GoombaKing, ANIM_GoombaKing_Idle, ANIM_GoombaKing_Idle, 0, MSG_CH0_00C6) + Call(SpeakToPlayer, NPC_RedGoombaBro, ANIM_GoombaBros_Red_Walk, ANIM_GoombaBros_Red_Idle, 0, MSG_CH0_00C7) + Call(SpeakToPlayer, NPC_BlueGoombaBro, ANIM_GoombaBros_Blue_Walk, ANIM_GoombaBros_Blue_Idle, 0, MSG_CH0_00C8) + ExecWait(N(EVS_FocusCam_BesidePlayer)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(DisablePartnerAI, 0) + Wait(5 * DT) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH0_00C9) + Call(DisablePartnerAI, 0) + ExecWait(N(EVS_FocusCam_Battlement)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(5 * DT) + Call(SpeakToPlayer, NPC_GoombaKing, ANIM_GoombaKing_Idle, ANIM_GoombaKing_Idle, 0, MSG_CH0_00CA) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Wait(30 * DT) + Call(SetNpcVar, NPC_GoombaKing, 0, 1) + Return + End }; EvtScript N(EVS_Scene_MeetGoombaKing) = { - EVT_CALL(N(SetCameraVFov), 32) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_EXEC(N(EVS_Scene_MeetGoombaKing_Impl)) - EVT_RETURN - EVT_END + Call(N(SetCameraVFov), 32) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Exec(N(EVS_Scene_MeetGoombaKing_Impl)) + Return + End }; diff --git a/src/world/area_kmr/kmr_11/kmr_11_4_npc.c b/src/world/area_kmr/kmr_11/kmr_11_4_npc.c index 4a56c8bdf76..62d2789116e 100644 --- a/src/world/area_kmr/kmr_11/kmr_11_4_npc.c +++ b/src/world/area_kmr/kmr_11/kmr_11_4_npc.c @@ -3,212 +3,212 @@ #include "world/common/enemy/GoombaBros_Guard.inc.c" EvtScript N(EVS_NpcIdle_GoombaBros_01) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcIdle_GoombaBros_02) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcIdle_GoombaKing) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_DEFEATED_GOOMBA_KING) - EVT_IF_EQ(GF_KMR11_GoombaBrosFledToCastle, TRUE) - EVT_CALL(GetNpcPos, NPC_GoombaKing, LVar0, LVar1, LVar2) - EVT_CALL(AwaitPlayerApproach, LVar0, LVar2, 300) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PlayerMoveTo, -564, -64, 0) - EVT_ELSE - EVT_LABEL(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_CASE_GE(STORY_CH0_DEFEATED_GOOMBA_KING) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(SetNpcJumpscale, NPC_RedGoombaBro, EVT_FLOAT(0.8)) - EVT_CALL(SetNpcJumpscale, NPC_BlueGoombaBro, EVT_FLOAT(0.8)) - EVT_CALL(SetNpcJumpscale, NPC_GoombaKing, EVT_FLOAT(0.8)) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_RedGoombaBro, LVar0, LVar1, LVar2) - EVT_CALL(GetAngleToPlayer, NPC_RedGoombaBro, LVar3) - EVT_CALL(AddVectorPolar, LVar0, LVar2, EVT_FLOAT(100.0), LVar3) - EVT_CALL(PlaySoundAtNpc, NPC_RedGoombaBro, SOUND_ACTOR_HURT, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_RedGoombaBro, LVar0, 0, LVar2, 30 * DT) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_BlueGoombaBro, LVar0, LVar1, LVar2) - EVT_CALL(GetAngleToPlayer, NPC_BlueGoombaBro, LVar3) - EVT_CALL(AddVectorPolar, LVar0, LVar2, EVT_FLOAT(100.0), LVar3) - EVT_CALL(PlaySoundAtNpc, NPC_BlueGoombaBro, SOUND_ACTOR_HURT, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_BlueGoombaBro, LVar0, 0, LVar2, 30 * DT) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_GoombaKing, LVar0, LVar1, LVar2) - EVT_CALL(GetAngleToPlayer, NPC_GoombaKing, LVar3) - EVT_CALL(AddVectorPolar, LVar0, LVar2, EVT_FLOAT(100.0), LVar3) - EVT_CALL(PlaySoundAtNpc, NPC_GoombaKing, SOUND_LARGE_ACTOR_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_GoombaKing, LVar0, 0, LVar2, 30 * DT) - EVT_END_THREAD - EVT_WAIT(15 * DT) - EVT_CALL(StartBossBattle, SONG_GOOMBA_KING_BATTLE) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_DEFEATED_GOOMBA_KING) + IfEq(GF_KMR11_GoombaBrosFledToCastle, TRUE) + Call(GetNpcPos, NPC_GoombaKing, LVar0, LVar1, LVar2) + Call(AwaitPlayerApproach, LVar0, LVar2, 300) + Call(DisablePlayerInput, TRUE) + Call(SetPlayerSpeed, Float(3.0 / DT)) + Call(PlayerMoveTo, -564, -64, 0) + Else + Label(0) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Wait(1) + Goto(0) + EndIf + EndIf + CaseGe(STORY_CH0_DEFEATED_GOOMBA_KING) + Return + EndSwitch + Call(SetNpcJumpscale, NPC_RedGoombaBro, Float(0.8)) + Call(SetNpcJumpscale, NPC_BlueGoombaBro, Float(0.8)) + Call(SetNpcJumpscale, NPC_GoombaKing, Float(0.8)) + Thread + Call(GetNpcPos, NPC_RedGoombaBro, LVar0, LVar1, LVar2) + Call(GetAngleToPlayer, NPC_RedGoombaBro, LVar3) + Call(AddVectorPolar, LVar0, LVar2, Float(100.0), LVar3) + Call(PlaySoundAtNpc, NPC_RedGoombaBro, SOUND_ACTOR_HURT, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_RedGoombaBro, LVar0, 0, LVar2, 30 * DT) + EndThread + Thread + Call(GetNpcPos, NPC_BlueGoombaBro, LVar0, LVar1, LVar2) + Call(GetAngleToPlayer, NPC_BlueGoombaBro, LVar3) + Call(AddVectorPolar, LVar0, LVar2, Float(100.0), LVar3) + Call(PlaySoundAtNpc, NPC_BlueGoombaBro, SOUND_ACTOR_HURT, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_BlueGoombaBro, LVar0, 0, LVar2, 30 * DT) + EndThread + Thread + Call(GetNpcPos, NPC_GoombaKing, LVar0, LVar1, LVar2) + Call(GetAngleToPlayer, NPC_GoombaKing, LVar3) + Call(AddVectorPolar, LVar0, LVar2, Float(100.0), LVar3) + Call(PlaySoundAtNpc, NPC_GoombaKing, SOUND_LARGE_ACTOR_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_GoombaKing, LVar0, 0, LVar2, 30 * DT) + EndThread + Wait(15 * DT) + Call(StartBossBattle, SONG_GOOMBA_KING_BATTLE) + Return + End }; EvtScript N(EVS_Scene_BossDefeated) = { - EVT_CALL(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAG_2, TRUE) - EVT_CALL(N(SetupFog)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-8.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(N(SetCameraVFov), 25) - EVT_CALL(SpeakToPlayer, NPC_GoombaKing, ANIM_GoombaKing_Walk, ANIM_GoombaKing_Idle, 0, MSG_CH0_00D1) - EVT_CALL(SetNpcSpeed, NPC_BlueGoombaBro, EVT_FLOAT(6.0 / DT)) - EVT_CALL(SetNpcSpeed, NPC_RedGoombaBro, EVT_FLOAT(6.0 / DT)) - EVT_CALL(SetNpcSpeed, NPC_GoombaKing, EVT_FLOAT(6.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_BlueGoombaBro, ANIM_GoombaBros_Blue_Run) - EVT_CALL(SetNpcAnimation, NPC_RedGoombaBro, ANIM_GoombaBros_Red_Run) - EVT_CALL(SetNpcAnimation, NPC_GoombaKing, ANIM_GoombaKing_Run) - EVT_THREAD - EVT_CALL(NpcMoveTo, NPC_GoombaKing, -358, -107, 0) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(NpcMoveTo, NPC_BlueGoombaBro, -396, -121, 0) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(NpcMoveTo, NPC_RedGoombaBro, -396, -89, 0) - EVT_END_THREAD - EVT_WAIT(2) - EVT_CALL(PlaySoundAtCollider, COLLIDER_tt, SOUND_METAL_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 90, 20, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o416, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o415, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(5 * DT) - EVT_CALL(MakeLerp, 90, 0, 20, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o416, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o415, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, COLLIDER_tt, SOUND_METAL_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(2.0)) - EVT_SET(GB_StoryProgress, STORY_CH0_DEFEATED_GOOMBA_KING) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4.0 / DT), 0, EVT_FLOAT(250.0), EVT_FLOAT(15.0), EVT_FLOAT(-7.5)) - EVT_WAIT(10 * DT) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH0_00D2) - EVT_CALL(EnablePartnerAI) - EVT_WAIT(10 * DT) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_THREAD - EVT_WAIT(40) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_THREAD - EVT_CALL(SetNpcPos, NPC_BlueGoombaBro, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_RedGoombaBro, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END + Call(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAG_2, TRUE) + Call(N(SetupFog)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-8.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(N(SetCameraVFov), 25) + Call(SpeakToPlayer, NPC_GoombaKing, ANIM_GoombaKing_Walk, ANIM_GoombaKing_Idle, 0, MSG_CH0_00D1) + Call(SetNpcSpeed, NPC_BlueGoombaBro, Float(6.0 / DT)) + Call(SetNpcSpeed, NPC_RedGoombaBro, Float(6.0 / DT)) + Call(SetNpcSpeed, NPC_GoombaKing, Float(6.0 / DT)) + Call(SetNpcAnimation, NPC_BlueGoombaBro, ANIM_GoombaBros_Blue_Run) + Call(SetNpcAnimation, NPC_RedGoombaBro, ANIM_GoombaBros_Red_Run) + Call(SetNpcAnimation, NPC_GoombaKing, ANIM_GoombaKing_Run) + Thread + Call(NpcMoveTo, NPC_GoombaKing, -358, -107, 0) + EndThread + Thread + Wait(20) + Call(NpcMoveTo, NPC_BlueGoombaBro, -396, -121, 0) + EndThread + Thread + Wait(20) + Call(NpcMoveTo, NPC_RedGoombaBro, -396, -89, 0) + EndThread + Wait(2) + Call(PlaySoundAtCollider, COLLIDER_tt, SOUND_METAL_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 90, 20, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o416, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_o415, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Wait(5 * DT) + Call(MakeLerp, 90, 0, 20, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_o416, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_o415, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(PlaySoundAtCollider, COLLIDER_tt, SOUND_METAL_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(2.0)) + Set(GB_StoryProgress, STORY_CH0_DEFEATED_GOOMBA_KING) + Exec(N(EVS_SetupMusic)) + Call(AdjustCam, CAM_DEFAULT, Float(4.0 / DT), 0, Float(250.0), Float(15.0), Float(-7.5)) + Wait(10 * DT) + Call(DisablePartnerAI, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH0_00D2) + Call(EnablePartnerAI) + Wait(10 * DT) + Call(DisablePlayerInput, TRUE) + Thread + Wait(40) + Call(ResetCam, CAM_DEFAULT, Float(4.0 / DT)) + Call(DisablePlayerInput, FALSE) + EndThread + Call(SetNpcPos, NPC_BlueGoombaBro, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_RedGoombaBro, NPC_DISPOSE_LOCATION) + Return + End }; EvtScript N(EVS_NpcDefeat_GoombaKing) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_EXEC_WAIT(N(EVS_Scene_BossDefeated)) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(6.0)) - EVT_CALL(PlayerMoveTo, -954, -50, 0) - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + ExecWait(N(EVS_Scene_BossDefeated)) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + Call(SetPlayerSpeed, Float(6.0)) + Call(PlayerMoveTo, -954, -50, 0) + EndSwitch + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcDefeat_GoombaBros_01) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcDefeat_GoombaBros_02) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcAuxAI_Kammy) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH0_KAMMY_RETURNED_TO_BOWSER) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH0_KAMMY_RETURNED_TO_BOWSER) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; #define KAMMY_NPC NPC_Kammy #include "world/common/util/GetKammyBroomEmitterPos.inc.c" EvtScript N(EVS_NpcAux_Kammy) = { - EVT_LABEL(1) + Label(1) // wait to be activated - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetNpcPos, NPC_Kammy, LVar6, LVar7, LVar8) - EVT_LABEL(0) - EVT_CALL(N(GetKammyBroomEmitterPos)) - EVT_CALL(GetNpcPos, NPC_Kammy, LVar9, LVarA, LVarB) + Call(GetSelfVar, 0, LVar0) + Wait(1) + IfEq(LVar0, 0) + Goto(1) + EndIf + Call(GetNpcPos, NPC_Kammy, LVar6, LVar7, LVar8) + Label(0) + Call(N(GetKammyBroomEmitterPos)) + Call(GetNpcPos, NPC_Kammy, LVar9, LVarA, LVarB) EVT_VEC3I_VSET(LVar3, LVar9) EVT_VEC3I_VSUB(LVar3, LVar6) EVT_VEC3I_VSET(LVar6, LVar9) - EVT_IF_EQ(LVar3, 0) - EVT_IF_EQ(LVar5, 0) - EVT_ELSE - EVT_PLAY_EFFECT(EFFECT_PURPLE_RING, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_ELSE - EVT_PLAY_EFFECT(EFFECT_PURPLE_RING, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_WAIT(3) - EVT_GOTO(0) - EVT_RETURN - EVT_END + IfEq(LVar3, 0) + IfEq(LVar5, 0) + Else + PlayEffect(EFFECT_PURPLE_RING, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.0)) + EndIf + Else + PlayEffect(EFFECT_PURPLE_RING, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.0)) + EndIf + Wait(3) + Goto(0) + Return + End }; s32 N(KammyFloatingOffsets)[] = { @@ -217,68 +217,68 @@ s32 N(KammyFloatingOffsets)[] = { }; EvtScript N(EVS_NpcAI_Kammy) = { - EVT_LABEL(0) - EVT_USE_BUF(EVT_PTR(N(KammyFloatingOffsets))) - EVT_LOOP(ARRAY_COUNT(N(KammyFloatingOffsets))) - EVT_BUF_READ1(LVar1) - EVT_CALL(GetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) - EVT_ADD(LVar3, LVar1) - EVT_CALL(SetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) - EVT_WAIT(3) - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + UseBuf(Ref(N(KammyFloatingOffsets))) + Loop(ARRAY_COUNT(N(KammyFloatingOffsets))) + BufRead1(LVar1) + Call(GetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) + Add(LVar3, LVar1) + Call(SetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) + Wait(3) + EndLoop + Goto(0) + Return + End }; EvtScript N(EVS_NpcInit_GoombaBros_01) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_GoombaBros_01))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_GoombaBros_01))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_DEFEATED_GOOMBA_KING) - EVT_IF_EQ(GF_KMR11_GoombaBrosFledToCastle, TRUE) - EVT_CALL(SetNpcPos, NPC_BlueGoombaBro, -432, 130, -146) - EVT_END_IF - EVT_CASE_GE(STORY_CH0_DEFEATED_GOOMBA_KING) - EVT_CALL(SetNpcPos, NPC_BlueGoombaBro, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_BlueGoombaBro, NPC_FLAG_GRAVITY, FALSE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_GoombaBros_01))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_GoombaBros_01))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_DEFEATED_GOOMBA_KING) + IfEq(GF_KMR11_GoombaBrosFledToCastle, TRUE) + Call(SetNpcPos, NPC_BlueGoombaBro, -432, 130, -146) + EndIf + CaseGe(STORY_CH0_DEFEATED_GOOMBA_KING) + Call(SetNpcPos, NPC_BlueGoombaBro, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_BlueGoombaBro, NPC_FLAG_GRAVITY, FALSE) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_GoombaBros_02) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_GoombaBros_02))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_GoombaBros_02))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_DEFEATED_GOOMBA_KING) - EVT_IF_EQ(GF_KMR11_GoombaBrosFledToCastle, TRUE) - EVT_CALL(SetNpcPos, NPC_RedGoombaBro, -412, 130, -35) - EVT_END_IF - EVT_CASE_GE(STORY_CH0_DEFEATED_GOOMBA_KING) - EVT_CALL(SetNpcPos, NPC_RedGoombaBro, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_RedGoombaBro, NPC_FLAG_GRAVITY, FALSE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_GoombaBros_02))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_GoombaBros_02))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_DEFEATED_GOOMBA_KING) + IfEq(GF_KMR11_GoombaBrosFledToCastle, TRUE) + Call(SetNpcPos, NPC_RedGoombaBro, -412, 130, -35) + EndIf + CaseGe(STORY_CH0_DEFEATED_GOOMBA_KING) + Call(SetNpcPos, NPC_RedGoombaBro, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_RedGoombaBro, NPC_FLAG_GRAVITY, FALSE) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_GoombaKing) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_GoombaKing))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_GoombaKing))) - EVT_CALL(SetNpcCollisionSize, NPC_SELF, 70, 50) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_DEFEATED_GOOMBA_KING) - EVT_IF_EQ(GF_KMR11_GoombaBrosFledToCastle, TRUE) - EVT_CALL(SetNpcPos, NPC_GoombaKing, -419, 119, -91) - EVT_END_IF - EVT_CASE_LT(STORY_CH0_HIT_GATEHOUSE_SWITCH) - EVT_CALL(SetNpcPos, NPC_GoombaKing, -358, 0, -107) - EVT_CASE_GE(STORY_CH0_HIT_GATEHOUSE_SWITCH) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_GoombaKing))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_GoombaKing))) + Call(SetNpcCollisionSize, NPC_SELF, 70, 50) + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_DEFEATED_GOOMBA_KING) + IfEq(GF_KMR11_GoombaBrosFledToCastle, TRUE) + Call(SetNpcPos, NPC_GoombaKing, -419, 119, -91) + EndIf + CaseLt(STORY_CH0_HIT_GATEHOUSE_SWITCH) + Call(SetNpcPos, NPC_GoombaKing, -358, 0, -107) + CaseGe(STORY_CH0_HIT_GATEHOUSE_SWITCH) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; NpcSettings N(NpcSettings_Kammy) = { diff --git a/src/world/area_kmr/kmr_11/kmr_11_5_entity.c b/src/world/area_kmr/kmr_11/kmr_11_5_entity.c index 9f0b73babc9..4c570d19474 100644 --- a/src/world/area_kmr/kmr_11/kmr_11_5_entity.c +++ b/src/world/area_kmr/kmr_11/kmr_11_5_entity.c @@ -13,90 +13,90 @@ API_CALLABLE(N(SetBlueSwitchPosition)) { } EvtScript N(EVS_Scene_OverhearEnemies) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetNpcPos, NPC_GoombaKing, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_RedGoombaBro, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_BlueGoombaBro, LVar0, LVar1, LVar2) - EVT_CALL(SpeakToPlayer, NPC_GoombaKing, ANIM_GoombaKing_Idle, ANIM_GoombaKing_Idle, 0, MSG_CH0_00D3) - EVT_CALL(SpeakToPlayer, NPC_RedGoombaBro, ANIM_GoombaBros_Red_Talk, ANIM_GoombaBros_Red_Idle, 0, MSG_CH0_00D4) - EVT_CALL(SpeakToPlayer, NPC_GoombaKing, ANIM_GoombaKing_Idle, ANIM_GoombaKing_Idle, 0, MSG_CH0_00D5) - EVT_CALL(SpeakToPlayer, NPC_BlueGoombaBro, ANIM_GoombaBros_Blue_Talk, ANIM_GoombaBros_Blue_Idle, 0, MSG_CH0_00D6) - EVT_CALL(SpeakToPlayer, NPC_RedGoombaBro, ANIM_GoombaBros_Red_Talk, ANIM_GoombaBros_Red_Idle, 0, MSG_CH0_00D7) - EVT_CALL(SetNpcPos, NPC_RedGoombaBro, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_BlueGoombaBro, NPC_DISPOSE_LOCATION) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(GetNpcPos, NPC_GoombaKing, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_RedGoombaBro, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_BlueGoombaBro, LVar0, LVar1, LVar2) + Call(SpeakToPlayer, NPC_GoombaKing, ANIM_GoombaKing_Idle, ANIM_GoombaKing_Idle, 0, MSG_CH0_00D3) + Call(SpeakToPlayer, NPC_RedGoombaBro, ANIM_GoombaBros_Red_Talk, ANIM_GoombaBros_Red_Idle, 0, MSG_CH0_00D4) + Call(SpeakToPlayer, NPC_GoombaKing, ANIM_GoombaKing_Idle, ANIM_GoombaKing_Idle, 0, MSG_CH0_00D5) + Call(SpeakToPlayer, NPC_BlueGoombaBro, ANIM_GoombaBros_Blue_Talk, ANIM_GoombaBros_Blue_Idle, 0, MSG_CH0_00D6) + Call(SpeakToPlayer, NPC_RedGoombaBro, ANIM_GoombaBros_Red_Talk, ANIM_GoombaBros_Red_Idle, 0, MSG_CH0_00D7) + Call(SetNpcPos, NPC_RedGoombaBro, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_BlueGoombaBro, NPC_DISPOSE_LOCATION) + Call(DisablePlayerInput, FALSE) + Return + End }; // NPC_BlueGoombaBro is reused here to do the blue switch jumping EvtScript N(EVS_TetherSwitchToBlueGoomba) = { - EVT_LABEL(10) - EVT_CALL(GetNpcPos, NPC_BlueGoombaBro, LVar0, LVar1, LVar2) - EVT_SET(LVarA, MV_SwitchEntityID) - EVT_CALL(N(SetBlueSwitchPosition)) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Label(10) + Call(GetNpcPos, NPC_BlueGoombaBro, LVar0, LVar1, LVar2) + Set(LVarA, MV_SwitchEntityID) + Call(N(SetBlueSwitchPosition)) + Wait(1) + Goto(10) + Return + End }; EvtScript N(EVS_Interact_SwitchBush) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH0_FOUND_GATEHOUSE_SWITCH) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcPos, NPC_BlueGoombaBro, -377, -8, 81) - EVT_CALL(SetNpcFlagBits, NPC_BlueGoombaBro, NPC_FLAG_HAS_NO_SPRITE, TRUE) - EVT_EXEC_GET_TID(N(EVS_TetherSwitchToBlueGoomba), LVarB) - EVT_CALL(SetNpcJumpscale, NPC_BlueGoombaBro, EVT_FLOAT(2.0)) - EVT_CALL(NpcJump0, NPC_BlueGoombaBro, -445, 0, 92, 15 * DT) - EVT_CALL(PlaySoundAt, SOUND_OBJECT_LAND, SOUND_SPACE_DEFAULT, -469, 1, 92) - EVT_CALL(SetNpcJumpscale, NPC_BlueGoombaBro, EVT_FLOAT(2.0)) - EVT_CALL(NpcJump0, NPC_BlueGoombaBro, -469, 0, 92, 7 * DT) - EVT_KILL_THREAD(LVarB) - EVT_CALL(SetNpcPos, NPC_BlueGoombaBro, NPC_DISPOSE_LOCATION) - EVT_SET(GB_StoryProgress, STORY_CH0_FOUND_GATEHOUSE_SWITCH) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH0_FOUND_GATEHOUSE_SWITCH) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(SetNpcPos, NPC_BlueGoombaBro, -377, -8, 81) + Call(SetNpcFlagBits, NPC_BlueGoombaBro, NPC_FLAG_HAS_NO_SPRITE, TRUE) + ExecGetTID(N(EVS_TetherSwitchToBlueGoomba), LVarB) + Call(SetNpcJumpscale, NPC_BlueGoombaBro, Float(2.0)) + Call(NpcJump0, NPC_BlueGoombaBro, -445, 0, 92, 15 * DT) + Call(PlaySoundAt, SOUND_OBJECT_LAND, SOUND_SPACE_DEFAULT, -469, 1, 92) + Call(SetNpcJumpscale, NPC_BlueGoombaBro, Float(2.0)) + Call(NpcJump0, NPC_BlueGoombaBro, -469, 0, 92, 7 * DT) + KillThread(LVarB) + Call(SetNpcPos, NPC_BlueGoombaBro, NPC_DISPOSE_LOCATION) + Set(GB_StoryProgress, STORY_CH0_FOUND_GATEHOUSE_SWITCH) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_OnBreak_SpecialBrick) = { - EVT_CALL(PlaySound, SOUND_CHIME_SOLVED_PUZZLE) - EVT_CALL(PlaySoundAt, SOUND_SPAWN_BLOCK, SOUND_SPACE_DEFAULT, 665, 35, 70) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, 665, 48, 70, 10) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 665, 35, 70, 45, ITEM_SUPER_SHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KMR11_ItemBlock_SuperShroom) - EVT_RETURN - EVT_END + Call(PlaySound, SOUND_CHIME_SOLVED_PUZZLE) + Call(PlaySoundAt, SOUND_SPAWN_BLOCK, SOUND_SPACE_DEFAULT, 665, 35, 70) + PlayEffect(EFFECT_SPARKLES, 0, 665, 48, 70, 10) + Call(MakeEntity, Ref(Entity_YellowBlock), 665, 35, 70, 45, ITEM_SUPER_SHROOM, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KMR11_ItemBlock_SuperShroom) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_LE(GB_StoryProgress, STORY_CH0_FOUND_GATEHOUSE_SWITCH) - EVT_IF_EQ(GB_StoryProgress, STORY_CH0_FOUND_GATEHOUSE_SWITCH) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueSwitch), -469, 0, 153, 0, MAKE_ENTITY_END) - EVT_CALL(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_KMR_04)) - EVT_SET(MV_SwitchEntityID, LVar0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Scene_SelfDestruct)), TRIGGER_AREA_FLAG_SET, AF_KMR_04, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Scene_OverhearEnemies)), TRIGGER_WALL_PRESS_A, COLLIDER_tt, 1, 0) - EVT_ELSE - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueSwitch), NPC_DISPOSE_LOCATION, 0, MAKE_ENTITY_END) - EVT_CALL(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_KMR_04)) - EVT_SET(MV_SwitchEntityID, LVar0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Scene_SelfDestruct)), TRIGGER_AREA_FLAG_SET, AF_KMR_04, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Scene_OverhearEnemies)), TRIGGER_WALL_PRESS_A, COLLIDER_tt, 1, 0) - EVT_END_IF - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 625, -25, 110, 45, MAKE_ENTITY_END) - EVT_IF_EQ(GF_KMR11_ItemBlock_SuperShroom, FALSE) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBreak_SpecialBrick))) - EVT_ELSE - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 665, 35, 70, 45, ITEM_SUPER_SHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KMR11_ItemBlock_SuperShroom) - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 550, 0, -550, 0, MODEL_point, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_KMR11_HiddenPanel) - EVT_RETURN - EVT_END + IfLe(GB_StoryProgress, STORY_CH0_FOUND_GATEHOUSE_SWITCH) + IfEq(GB_StoryProgress, STORY_CH0_FOUND_GATEHOUSE_SWITCH) + Call(MakeEntity, Ref(Entity_BlueSwitch), -469, 0, 153, 0, MAKE_ENTITY_END) + Call(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_KMR_04)) + Set(MV_SwitchEntityID, LVar0) + BindTrigger(Ref(N(EVS_Scene_SelfDestruct)), TRIGGER_AREA_FLAG_SET, AF_KMR_04, 1, 0) + BindTrigger(Ref(N(EVS_Scene_OverhearEnemies)), TRIGGER_WALL_PRESS_A, COLLIDER_tt, 1, 0) + Else + Call(MakeEntity, Ref(Entity_BlueSwitch), NPC_DISPOSE_LOCATION, 0, MAKE_ENTITY_END) + Call(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_KMR_04)) + Set(MV_SwitchEntityID, LVar0) + BindTrigger(Ref(N(EVS_Scene_SelfDestruct)), TRIGGER_AREA_FLAG_SET, AF_KMR_04, 1, 0) + BindTrigger(Ref(N(EVS_Scene_OverhearEnemies)), TRIGGER_WALL_PRESS_A, COLLIDER_tt, 1, 0) + EndIf + EndIf + Call(MakeEntity, Ref(Entity_BrickBlock), 625, -25, 110, 45, MAKE_ENTITY_END) + IfEq(GF_KMR11_ItemBlock_SuperShroom, FALSE) + Call(AssignScript, Ref(N(EVS_OnBreak_SpecialBrick))) + Else + Call(MakeEntity, Ref(Entity_YellowBlock), 665, 35, 70, 45, ITEM_SUPER_SHROOM, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KMR11_ItemBlock_SuperShroom) + EndIf + Call(MakeEntity, Ref(Entity_HiddenPanel), 550, 0, -550, 0, MODEL_point, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_KMR11_HiddenPanel) + Return + End }; diff --git a/src/world/area_kmr/kmr_11/kmr_11_6_kammy.c b/src/world/area_kmr/kmr_11/kmr_11_6_kammy.c index 5e1a56afdb9..0851de833b3 100644 --- a/src/world/area_kmr/kmr_11/kmr_11_6_kammy.c +++ b/src/world/area_kmr/kmr_11/kmr_11_6_kammy.c @@ -8,52 +8,52 @@ Vec3f N(FlightPath_Away)[] = { }; EvtScript N(EVS_Scene_KammyWatching) = { - EVT_CALL(SetMusicTrack, 0, SONG_KAMMY_KOOPA_THEME, 0, 8) - EVT_CALL(SetNpcVar, NPC_Kammy, 0, 1) - EVT_CALL(SetNpcPos, NPC_Kammy, 100, 182, -353) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 100, 0, -220) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 100, 0, -220) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 1176) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 59, -159) - EVT_CALL(SetCamPosB, CAM_DEFAULT, -24, -256) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 8, -5) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(60 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 100, 0, -220) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 100, 190, -353) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(30 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 100, 0, -220) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 100, 190, -353) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 1000) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.65 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(30 * DT) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Kammy, LVar7, LVar8, LVar9) - EVT_CALL(LoadPath, 80 * DT, EVT_PTR(N(FlightPath_Away)), ARRAY_COUNT(N(FlightPath_Away)), EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_ADD(LVar1, LVar7) - EVT_ADD(LVar2, LVar8) - EVT_ADD(LVar3, LVar9) - EVT_CALL(SetNpcPos, NPC_Kammy, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(24 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Kammy, SOUND_FLIGHT, SOUND_SPACE_DEFAULT) - EVT_WAIT(4) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(110 * DT) - EVT_EXEC_WAIT(N(EVS_BadExit_kmr_24_0)) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_KAMMY_KOOPA_THEME, 0, 8) + Call(SetNpcVar, NPC_Kammy, 0, 1) + Call(SetNpcPos, NPC_Kammy, 100, 182, -353) + Call(UseSettingsFrom, CAM_DEFAULT, 100, 0, -220) + Call(SetPanTarget, CAM_DEFAULT, 100, 0, -220) + Call(SetCamDistance, CAM_DEFAULT, 1176) + Call(SetCamPosA, CAM_DEFAULT, 59, -159) + Call(SetCamPosB, CAM_DEFAULT, -24, -256) + Call(SetCamPitch, CAM_DEFAULT, 8, -5) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(60 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, 100, 0, -220) + Call(SetPanTarget, CAM_DEFAULT, 100, 190, -353) + Call(SetCamDistance, CAM_DEFAULT, 250) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(30 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, 100, 0, -220) + Call(SetPanTarget, CAM_DEFAULT, 100, 190, -353) + Call(SetCamDistance, CAM_DEFAULT, 1000) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.65 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(30 * DT) + Thread + Call(GetNpcPos, NPC_Kammy, LVar7, LVar8, LVar9) + Call(LoadPath, 80 * DT, Ref(N(FlightPath_Away)), ARRAY_COUNT(N(FlightPath_Away)), EASING_LINEAR) + Label(0) + Call(GetNextPathPos) + Add(LVar1, LVar7) + Add(LVar2, LVar8) + Add(LVar3, LVar9) + Call(SetNpcPos, NPC_Kammy, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(0) + EndIf + EndThread + Thread + Loop(24 * DT) + Call(PlaySoundAtNpc, NPC_Kammy, SOUND_FLIGHT, SOUND_SPACE_DEFAULT) + Wait(4) + EndLoop + EndThread + Wait(110 * DT) + ExecWait(N(EVS_BadExit_kmr_24_0)) + Return + End }; diff --git a/src/world/area_kmr/kmr_11/kmr_11_7_foliage.c b/src/world/area_kmr/kmr_11/kmr_11_7_foliage.c index 2252a7c6f25..cdb32dea4fd 100644 --- a/src/world/area_kmr/kmr_11/kmr_11_7_foliage.c +++ b/src/world/area_kmr/kmr_11/kmr_11_7_foliage.c @@ -116,18 +116,18 @@ BombTrigger N(BombPos_Tree2) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_kusa1, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_kusa2, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush4))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o419, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_tree1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_tree2, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(SearchBush_Bush2))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_kusa1, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush3))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_kusa2, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush4))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o419, 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_tree1, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_tree2, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Return + End }; diff --git a/src/world/area_kmr/kmr_12/kmr_12_1_music.c b/src/world/area_kmr/kmr_12/kmr_12_1_music.c index c0467b83f05..dd529ab6aaa 100644 --- a/src/world/area_kmr/kmr_12/kmr_12_1_music.c +++ b/src/world/area_kmr/kmr_12/kmr_12_1_music.c @@ -1,7 +1,7 @@ #include "kmr_12.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) + Return + End }; diff --git a/src/world/area_kmr/kmr_12/kmr_12_2_main.c b/src/world/area_kmr/kmr_12/kmr_12_2_main.c index cae39d96892..c30df6803d2 100644 --- a/src/world/area_kmr/kmr_12/kmr_12_2_main.c +++ b/src/world/area_kmr/kmr_12/kmr_12_2_main.c @@ -4,23 +4,23 @@ EvtScript N(EVS_ExitWalk_kmr_07_1) = EVT_EXIT_WALK(60, kmr_12_ENTRY_0, "kmr_07", EvtScript N(EVS_ExitWalk_kmr_11_0) = EVT_EXIT_WALK(60, kmr_12_ENTRY_1, "kmr_11", kmr_11_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kmr_07_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kmr_11_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kmr_07_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kmr_11_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_GOOMBA_ROAD) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnReadBillboard)), TRIGGER_WALL_PRESS_A, COLLIDER_o78, 1, 0) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_GOOMBA_ROAD) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + BindTrigger(Ref(N(EVS_OnReadBillboard)), TRIGGER_WALL_PRESS_A, COLLIDER_o78, 1, 0) + Return + End }; diff --git a/src/world/area_kmr/kmr_12/kmr_12_3_npc.c b/src/world/area_kmr/kmr_12/kmr_12_3_npc.c index feb7e33801c..6dbd593f335 100644 --- a/src/world/area_kmr/kmr_12/kmr_12_3_npc.c +++ b/src/world/area_kmr/kmr_12/kmr_12_3_npc.c @@ -9,82 +9,82 @@ API_CALLABLE(N(GetAmbushEnemy)) { } EvtScript N(EVS_OnReadBillboard) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SUSPEND_GROUP(EVT_GROUP_01) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Sign_EatMushroomsTrap, 160, 40) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_SET(LFlag0, FALSE) - EVT_CALL(N(GetAmbushEnemy)) - EVT_IF_NE(LVar0, NULL) - EVT_CALL(GetNpcVar, NPC_Goomba_Ambush, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetNpcVar, NPC_Goomba_Ambush, 0, 1) - EVT_SET(LFlag0, TRUE) - EVT_WAIT(10) - EVT_END_IF - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_IF_EQ(LFlag0, TRUE) - EVT_UNBIND - EVT_END_IF - EVT_END - EVT_RETURN //@bug wrong order for END/RETURN + SetGroup(EVT_GROUP_00) + SuspendGroup(EVT_GROUP_01) + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_Sign_EatMushroomsTrap, 160, 40) + ResumeGroup(EVT_GROUP_01) + Set(LFlag0, FALSE) + Call(N(GetAmbushEnemy)) + IfNe(LVar0, NULL) + Call(GetNpcVar, NPC_Goomba_Ambush, 0, LVar0) + IfEq(LVar0, 0) + Call(SetNpcVar, NPC_Goomba_Ambush, 0, 1) + Set(LFlag0, TRUE) + Wait(10) + EndIf + EndIf + Call(DisablePlayerInput, FALSE) + IfEq(LFlag0, TRUE) + Unbind + EndIf + End + Return //@bug wrong order for END/RETURN }; EvtScript N(EVS_NpcIdle_Goomba) = { - EVT_WAIT(1) - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Goomba_FakeMushroom) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_DISABLE_AI, 1) - EVT_LABEL(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_CAMERA_FOR_YAW | NPC_FLAG_200000, TRUE) - EVT_WAIT(3) - EVT_SETF(LVar0, EVT_FLOAT(0.0)) - EVT_LOOP(9) - EVT_ADDF(LVar0, EVT_FLOAT(10.0)) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Goomba_Still) - EVT_LOOP(9) - EVT_ADDF(LVar0, EVT_FLOAT(10.0)) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Goomba_Dizzy) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Goomba_Idle) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FLIP_PAGE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcImgFXFlags, NPC_SELF, IMGFX_FLAG_2000) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_ANIM, IMGFX_ANIM_UNFURL, 1, 1, 0) - EVT_WAIT(12) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(EnableNpcShadow, NPC_SELF, TRUE) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.6)) - EVT_CALL(NpcJump0, NPC_SELF, -35, 0, 30, 23) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_CAMERA_FOR_YAW | NPC_FLAG_200000, FALSE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_DISABLE_AI, 0) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_BEGIN_WITH_CHASING, 1) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnReadBillboard)), TRIGGER_WALL_PRESS_A, COLLIDER_o78, 1, 0) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Goomba_Wander))) - EVT_RETURN - EVT_END + Wait(1) + Call(SetSelfVar, 0, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Goomba_FakeMushroom) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_DISABLE_AI, 1) + Label(0) + Call(GetSelfVar, 0, LVar0) + Wait(1) + IfEq(LVar0, 0) + Goto(0) + EndIf + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_CAMERA_FOR_YAW | NPC_FLAG_200000, TRUE) + Wait(3) + SetF(LVar0, Float(0.0)) + Loop(9) + AddF(LVar0, Float(10.0)) + Call(SetNpcRotation, NPC_SELF, 0, LVar0, 0) + Wait(1) + EndLoop + Call(SetNpcAnimation, NPC_SELF, ANIM_Goomba_Still) + Loop(9) + AddF(LVar0, Float(10.0)) + Call(SetNpcRotation, NPC_SELF, 0, LVar0, 0) + Wait(1) + EndLoop + Call(SetNpcAnimation, NPC_SELF, ANIM_Goomba_Dizzy) + Wait(20) + Call(SetNpcAnimation, NPC_SELF, ANIM_Goomba_Idle) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FLIP_PAGE, SOUND_SPACE_DEFAULT) + Call(SetNpcImgFXFlags, NPC_SELF, IMGFX_FLAG_2000) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_ANIM, IMGFX_ANIM_UNFURL, 1, 1, 0) + Wait(12) + Wait(5) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(EnableNpcShadow, NPC_SELF, TRUE) + Call(SetNpcJumpscale, NPC_SELF, Float(0.6)) + Call(NpcJump0, NPC_SELF, -35, 0, 30, 23) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_CLEAR, 0, 0, 0, 0) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_CAMERA_FOR_YAW | NPC_FLAG_200000, FALSE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_DISABLE_AI, 0) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_BEGIN_WITH_CHASING, 1) + BindTrigger(Ref(N(EVS_OnReadBillboard)), TRIGGER_WALL_PRESS_A, COLLIDER_o78, 1, 0) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_Goomba_Wander))) + Return + End }; EvtScript N(EVS_NpcInit_Goomba) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Goomba))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Goomba))) + Return + End }; NpcData N(NpcData_Goomba) = { diff --git a/src/world/area_kmr/kmr_12/kmr_12_4_entity.c b/src/world/area_kmr/kmr_12/kmr_12_4_entity.c index 4514cf7d51b..ae2ba1c8daa 100644 --- a/src/world/area_kmr/kmr_12/kmr_12_4_entity.c +++ b/src/world/area_kmr/kmr_12/kmr_12_4_entity.c @@ -2,23 +2,23 @@ #include "entity.h" EvtScript N(EVS_ReadSign) = { - EVT_CALL(IsStartingConversation, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Sign_GoombaKingsFortress, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END + Call(IsStartingConversation, LVar0) + IfEq(LVar0, TRUE) + Return + EndIf + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_Sign_GoombaKingsFortress, 160, 40) + Call(DisablePlayerInput, FALSE) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Signpost), 436, 0, -42, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_ReadSign))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Signpost), 436, 0, -42, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_ReadSign))) + Return + End }; diff --git a/src/world/area_kmr/kmr_20/kmr_20_10_npc.c b/src/world/area_kmr/kmr_20/kmr_20_10_npc.c index b09cd5aa0fd..60c4fb890d9 100644 --- a/src/world/area_kmr/kmr_20/kmr_20_10_npc.c +++ b/src/world/area_kmr/kmr_20/kmr_20_10_npc.c @@ -24,582 +24,582 @@ API_CALLABLE(N(PlaySpringLaunchAnimation)) { #include "world/common/atomic/MarioSalute.inc.c" EvtScript N(EVS_KootFavorCheck_Luigi) = { - EVT_IF_NE(GB_KootFavor_Current, KOOT_FAVOR_CH3_1) - EVT_RETURN - EVT_END_IF - EVT_IF_NE(GF_KMR20_Gift_LuigisAutograph, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Idle) - EVT_EXEC_WAIT(N(EVS_MarioSalute)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH0_0103) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_WAIT(40) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH0_0104) - EVT_CALL(GetNpcYaw, NPC_SELF, LVar0) - EVT_SET(LVar1, LVar0) - EVT_ADD(LVar1, 180) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar1, 5) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Luigi_IdleBack) - EVT_WAIT(40) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Idle) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 5) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH0_0105) - EVT_WAIT(10) - EVT_SET(LVar0, ITEM_KOOT_LUIGI_AUTOGRAPH) - EVT_SET(LVar1, 1) - EVT_EXEC_WAIT(N(GiveItemReward)) - EVT_CALL(AddKeyItem, LVar0) - EVT_SET(GF_KMR20_Gift_LuigisAutograph, TRUE) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) - EVT_IF_LT(GB_StoryProgress, STORY_CH4_DEFEATED_GENERAL_GUY) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Run) - EVT_WAIT(1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfNe(GB_KootFavor_Current, KOOT_FAVOR_CH3_1) + Return + EndIf + IfNe(GF_KMR20_Gift_LuigisAutograph, FALSE) + Return + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Idle) + ExecWait(N(EVS_MarioSalute)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH0_0103) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + Wait(40) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH0_0104) + Call(GetNpcYaw, NPC_SELF, LVar0) + Set(LVar1, LVar0) + Add(LVar1, 180) + Call(InterpNpcYaw, NPC_SELF, LVar1, 5) + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_Luigi_IdleBack) + Wait(40) + Call(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Idle) + Call(InterpNpcYaw, NPC_SELF, LVar0, 5) + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH0_0105) + Wait(10) + Set(LVar0, ITEM_KOOT_LUIGI_AUTOGRAPH) + Set(LVar1, 1) + ExecWait(N(GiveItemReward)) + Call(AddKeyItem, LVar0) + Set(GF_KMR20_Gift_LuigisAutograph, TRUE) + IfGe(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) + IfLt(GB_StoryProgress, STORY_CH4_DEFEATED_GENERAL_GUY) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Run) + Wait(1) + EndIf + EndIf + EndIf + Return + End }; EvtScript N(EVS_Scene_LuigiWaitingAround) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_IdleSit) - EVT_CALL(SetNpcPos, NPC_Luigi_1, 379, 20, -60) - EVT_CALL(InterpNpcYaw, NPC_Luigi_1, 39, 0) - EVT_CALL(SetNpcCollisionSize, NPC_Luigi_1, 43, 24) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 495, 30, -115) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 495, 0, -115) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(620.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Luigi_1, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 25) - EVT_ADD(LVar2, 2) - EVT_LOOP(3) - EVT_PLAY_EFFECT(EFFECT_MUSIC_NOTE, 2, LVar0, LVar1, LVar2) - EVT_WAIT(13) - EVT_PLAY_EFFECT(EFFECT_MUSIC_NOTE, 2, LVar0, LVar1, LVar2) - EVT_WAIT(22) - EVT_END_LOOP - EVT_PLAY_EFFECT(EFFECT_MUSIC_NOTE, 2, LVar0, LVar1, LVar2) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(3) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_IdleSit) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_TalkSit) - EVT_WAIT(25) - EVT_END_LOOP - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_IdleSit) - EVT_END_THREAD - EVT_WAIT(70) - EVT_CALL(GetNpcPos, NPC_Luigi_1, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(80) - EVT_CALL(SpeakToPlayer, NPC_Luigi_1, ANIM_Luigi_TalkSit, ANIM_Luigi_IdleSit, 5, MSG_CH0_00DB) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtNpc, NPC_Luigi_1, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_Luigi_1, EMOTE_QUESTION, -30, 40, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(25) - EVT_THREAD - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 495, 30, -115) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 495, 0, -115) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(620.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_WAIT(20) - EVT_SET(MF_ReadyForPlayerEntry, TRUE) - EVT_WAIT(15) - EVT_CALL(SetNpcFlagBits, NPC_Luigi_1, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Luigi_1, NPC_FLAG_FLYING, FALSE) - EVT_CALL(PlaySoundAtNpc, NPC_Luigi_1, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_Luigi_1, EMOTE_EXCLAMATION, -30, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Jump) - EVT_CALL(GetNpcPos, NPC_Luigi_1, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Luigi_1, LVar0, LVar1, LVar2, 10) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Idle) - EVT_WAIT(15) - EVT_CALL(SpeakToPlayer, NPC_Luigi_1, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH0_00DC) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Run) - EVT_CALL(NpcMoveTo, NPC_Luigi_1, 531, -128, 50) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_Luigi_1, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 1, LVar0, LVar1, LVar2, 0, 0) - EVT_WAIT(6) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(PlayerMoveTo, 556, -158, 30) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_WAIT(15) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) - EVT_CALL(NpcMoveTo, NPC_PARTNER, 554, -195, 28) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_END_THREAD - EVT_WAIT(3) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 495, 30, -115) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 495, 0, -115) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(620.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(15) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 564, 0, -176) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 556, 0, -158) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(270.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(40) - EVT_CALL(SpeakToPlayer, NPC_Luigi_1, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 5, MSG_CH0_00DD) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Idle) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_StillBack) - EVT_WAIT(30) - EVT_CALL(PlaySoundAtNpc, NPC_Luigi_1, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_Luigi_1, EMOTE_QUESTION, -30, 30, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Idle) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Run) - EVT_CALL(NpcMoveTo, NPC_Luigi_1, 524, -152, 10) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Idle) - EVT_WAIT(15) - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 39, 0) - EVT_WAIT(45) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 219, 0) - EVT_END_THREAD - EVT_CALL(ShowEmote, NPC_Luigi_1, EMOTE_ELLIPSIS, 20, 85, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(15) - EVT_CALL(PlaySoundAtNpc, NPC_PARTNER, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_PARTNER, EMOTE_QUESTION, -20, 70, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(110) - EVT_CALL(SpeakToPlayer, NPC_Luigi_1, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 5, MSG_CH0_00DE) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PARTNER_GOOMBARIO) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_TALK, PARTNER_ANIM_IDLE, 5, MSG_CH0_00DF) - EVT_CASE_EQ(PARTNER_KOOPER) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_TALK, PARTNER_ANIM_IDLE, 5, MSG_CH0_00E0) - EVT_CASE_EQ(PARTNER_BOMBETTE) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_TALK, PARTNER_ANIM_IDLE, 5, MSG_CH0_00E1) - EVT_CASE_EQ(PARTNER_PARAKARRY) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_TALK, PARTNER_ANIM_IDLE, 5, MSG_CH0_00E2) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_STILL, PARTNER_ANIM_HURT, 5, MSG_CH0_00DB) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_Luigi_1, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 5, MSG_CH0_00E3) - EVT_CALL(SetNpcFlagBits, NPC_Luigi_1, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Luigi_1, NPC_FLAG_FLYING, TRUE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_WAIT(15) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_IdleSit) + Call(SetNpcPos, NPC_Luigi_1, 379, 20, -60) + Call(InterpNpcYaw, NPC_Luigi_1, 39, 0) + Call(SetNpcCollisionSize, NPC_Luigi_1, 43, 24) + Call(UseSettingsFrom, CAM_DEFAULT, 495, 30, -115) + Call(SetPanTarget, CAM_DEFAULT, 495, 0, -115) + Call(SetCamDistance, CAM_DEFAULT, Float(620.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Call(GetNpcPos, NPC_Luigi_1, LVar0, LVar1, LVar2) + Add(LVar1, 25) + Add(LVar2, 2) + Loop(3) + PlayEffect(EFFECT_MUSIC_NOTE, 2, LVar0, LVar1, LVar2) + Wait(13) + PlayEffect(EFFECT_MUSIC_NOTE, 2, LVar0, LVar1, LVar2) + Wait(22) + EndLoop + PlayEffect(EFFECT_MUSIC_NOTE, 2, LVar0, LVar1, LVar2) + EndThread + Thread + Loop(3) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_IdleSit) + Wait(10) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_TalkSit) + Wait(25) + EndLoop + Wait(10) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_IdleSit) + EndThread + Wait(70) + Call(GetNpcPos, NPC_Luigi_1, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(250.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(80) + Call(SpeakToPlayer, NPC_Luigi_1, ANIM_Luigi_TalkSit, ANIM_Luigi_IdleSit, 5, MSG_CH0_00DB) + Wait(20) + Call(PlaySoundAtNpc, NPC_Luigi_1, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_Luigi_1, EMOTE_QUESTION, -30, 40, EMOTER_NPC, 0, 0, 0, 0) + Wait(25) + Thread + Call(UseSettingsFrom, CAM_DEFAULT, 495, 30, -115) + Call(SetPanTarget, CAM_DEFAULT, 495, 0, -115) + Call(SetCamDistance, CAM_DEFAULT, Float(620.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Wait(20) + Set(MF_ReadyForPlayerEntry, TRUE) + Wait(15) + Call(SetNpcFlagBits, NPC_Luigi_1, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcFlagBits, NPC_Luigi_1, NPC_FLAG_FLYING, FALSE) + Call(PlaySoundAtNpc, NPC_Luigi_1, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_Luigi_1, EMOTE_EXCLAMATION, -30, 20, EMOTER_NPC, 0, 0, 0, 0) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Jump) + Call(GetNpcPos, NPC_Luigi_1, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Luigi_1, LVar0, LVar1, LVar2, 10) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Idle) + Wait(15) + Call(SpeakToPlayer, NPC_Luigi_1, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH0_00DC) + Thread + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Run) + Call(NpcMoveTo, NPC_Luigi_1, 531, -128, 50) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Idle) + EndThread + Thread + Loop(10) + Call(GetNpcPos, NPC_Luigi_1, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_WALKING_DUST, 1, LVar0, LVar1, LVar2, 0, 0) + Wait(6) + EndLoop + EndThread + Thread + Wait(10) + Call(DisablePlayerPhysics, FALSE) + Call(PlayerMoveTo, 556, -158, 30) + EndThread + Thread + Call(DisablePartnerAI, 0) + Wait(15) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) + Call(NpcMoveTo, NPC_PARTNER, 554, -195, 28) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + EndThread + Wait(3) + Call(UseSettingsFrom, CAM_DEFAULT, 495, 30, -115) + Call(SetPanTarget, CAM_DEFAULT, 495, 0, -115) + Call(SetCamDistance, CAM_DEFAULT, Float(620.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(15) + Call(UseSettingsFrom, CAM_DEFAULT, 564, 0, -176) + Call(SetPanTarget, CAM_DEFAULT, 556, 0, -158) + Call(SetCamDistance, CAM_DEFAULT, Float(270.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(40) + Call(SpeakToPlayer, NPC_Luigi_1, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 5, MSG_CH0_00DD) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Idle) + Wait(10) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_StillBack) + Wait(30) + Call(PlaySoundAtNpc, NPC_Luigi_1, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_Luigi_1, EMOTE_QUESTION, -30, 30, EMOTER_NPC, 0, 0, 0, 0) + Wait(30) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Idle) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Run) + Call(NpcMoveTo, NPC_Luigi_1, 524, -152, 10) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Idle) + Wait(15) + Thread + Wait(20) + Call(InterpNpcYaw, NPC_PARTNER, 39, 0) + Wait(45) + Call(InterpNpcYaw, NPC_PARTNER, 219, 0) + EndThread + Call(ShowEmote, NPC_Luigi_1, EMOTE_ELLIPSIS, 20, 85, EMOTER_NPC, 0, 0, 0, 0) + Wait(15) + Call(PlaySoundAtNpc, NPC_PARTNER, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_PARTNER, EMOTE_QUESTION, -20, 70, EMOTER_NPC, 0, 0, 0, 0) + Wait(110) + Call(SpeakToPlayer, NPC_Luigi_1, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 5, MSG_CH0_00DE) + Call(GetCurrentPartnerID, LVar0) + Switch(LVar0) + CaseEq(PARTNER_GOOMBARIO) + Call(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_TALK, PARTNER_ANIM_IDLE, 5, MSG_CH0_00DF) + CaseEq(PARTNER_KOOPER) + Call(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_TALK, PARTNER_ANIM_IDLE, 5, MSG_CH0_00E0) + CaseEq(PARTNER_BOMBETTE) + Call(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_TALK, PARTNER_ANIM_IDLE, 5, MSG_CH0_00E1) + CaseEq(PARTNER_PARAKARRY) + Call(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_TALK, PARTNER_ANIM_IDLE, 5, MSG_CH0_00E2) + CaseDefault + Call(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_STILL, PARTNER_ANIM_HURT, 5, MSG_CH0_00DB) + EndSwitch + Call(SpeakToPlayer, NPC_Luigi_1, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 5, MSG_CH0_00E3) + Call(SetNpcFlagBits, NPC_Luigi_1, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_Luigi_1, NPC_FLAG_FLYING, TRUE) + Call(EnablePartnerAI) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Wait(15) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcAux_Luigi_WhistleAtopObstacle) = { - EVT_LABEL(20) - EVT_CALL(GetNpcVar, NPC_SELF, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(21) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Luigi_IdleSit) - EVT_CALL(GetNpcPos, NPC_SELF, LVarA, LVarB, LVarC) - EVT_ADD(LVarB, 25) - EVT_ADD(LVarC, 2) - EVT_PLAY_EFFECT(EFFECT_MUSIC_NOTE, 2, LVarA, LVarB, LVarC) - EVT_WAIT(13) - EVT_CALL(GetNpcVar, NPC_SELF, 0, LVar0) - EVT_CALL(GetNpcPos, NPC_SELF, LVarA, LVarB, LVarC) - EVT_ADD(LVarB, 25) - EVT_ADD(LVarC, 2) - EVT_PLAY_EFFECT(EFFECT_MUSIC_NOTE, 2, LVarA, LVarB, LVarC) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(21) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Luigi_TalkSit) - EVT_WAIT(22) - EVT_GOTO(20) - EVT_LABEL(21) - EVT_RETURN - EVT_END + Label(20) + Call(GetNpcVar, NPC_SELF, 0, LVar0) + IfEq(LVar0, 1) + Goto(21) + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_Luigi_IdleSit) + Call(GetNpcPos, NPC_SELF, LVarA, LVarB, LVarC) + Add(LVarB, 25) + Add(LVarC, 2) + PlayEffect(EFFECT_MUSIC_NOTE, 2, LVarA, LVarB, LVarC) + Wait(13) + Call(GetNpcVar, NPC_SELF, 0, LVar0) + Call(GetNpcPos, NPC_SELF, LVarA, LVarB, LVarC) + Add(LVarB, 25) + Add(LVarC, 2) + PlayEffect(EFFECT_MUSIC_NOTE, 2, LVarA, LVarB, LVarC) + IfEq(LVar0, 1) + Goto(21) + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_Luigi_TalkSit) + Wait(22) + Goto(20) + Label(21) + Return + End }; EvtScript N(EVS_NpcIdle_Luigi_InBasement) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Idle) - EVT_LABEL(10) - EVT_WAIT(1) - EVT_IF_EQ(MF_Unk_0C, FALSE) - EVT_GOTO(10) - EVT_END_IF - EVT_LABEL(20) - EVT_IF_EQ(MF_Unk_0C, FALSE) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GetNpcVar, NPC_SELF, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(21) - EVT_END_IF - EVT_CALL(GetNpcPos, NPC_SELF, LVarA, LVarB, LVarC) - EVT_ADD(LVarA, 6) - EVT_ADD(LVarB, 58) - EVT_ADD(LVarC, 2) - EVT_PLAY_EFFECT(EFFECT_MUSIC_NOTE, 0, LVarA, LVarB, LVarC) - EVT_WAIT(20) - EVT_CALL(GetNpcPos, NPC_SELF, LVarA, LVarB, LVarC) - EVT_SUB(LVarA, 4) - EVT_ADD(LVarB, 55) - EVT_SUB(LVarC, 1) - EVT_PLAY_EFFECT(EFFECT_MUSIC_NOTE, 0, LVarA, LVarB, LVarC) - EVT_IF_EQ(MF_Unk_0C, FALSE) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GetNpcVar, NPC_SELF, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(21) - EVT_END_IF - EVT_WAIT(28) - EVT_GOTO(20) - EVT_LABEL(21) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Idle) + Label(10) + Wait(1) + IfEq(MF_Unk_0C, FALSE) + Goto(10) + EndIf + Label(20) + IfEq(MF_Unk_0C, FALSE) + Goto(10) + EndIf + Call(GetNpcVar, NPC_SELF, 0, LVar0) + IfEq(LVar0, 1) + Goto(21) + EndIf + Call(GetNpcPos, NPC_SELF, LVarA, LVarB, LVarC) + Add(LVarA, 6) + Add(LVarB, 58) + Add(LVarC, 2) + PlayEffect(EFFECT_MUSIC_NOTE, 0, LVarA, LVarB, LVarC) + Wait(20) + Call(GetNpcPos, NPC_SELF, LVarA, LVarB, LVarC) + Sub(LVarA, 4) + Add(LVarB, 55) + Sub(LVarC, 1) + PlayEffect(EFFECT_MUSIC_NOTE, 0, LVarA, LVarB, LVarC) + IfEq(MF_Unk_0C, FALSE) + Goto(10) + EndIf + Call(GetNpcVar, NPC_SELF, 0, LVar0) + IfEq(LVar0, 1) + Goto(21) + EndIf + Wait(28) + Goto(20) + Label(21) + Return + End }; EvtScript N(EVS_NpcIdle_Luigi_InBedroom) = { - EVT_LABEL(10) - EVT_SET(LVar0, MF_Unk_0C) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetNpcFlagBits, NPC_Luigi_0, NPC_FLAG_INVISIBLE, FALSE) - EVT_ELSE - EVT_CALL(SetNpcFlagBits, NPC_Luigi_0, NPC_FLAG_INVISIBLE, TRUE) - EVT_END_IF - EVT_WAIT(3) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Label(10) + Set(LVar0, MF_Unk_0C) + IfEq(LVar0, 1) + Call(SetNpcFlagBits, NPC_Luigi_0, NPC_FLAG_INVISIBLE, FALSE) + Else + Call(SetNpcFlagBits, NPC_Luigi_0, NPC_FLAG_INVISIBLE, TRUE) + EndIf + Wait(3) + Goto(10) + Return + End }; EvtScript N(EVS_Scene_CaughtLuigiInBasement) = { - EVT_SET(GF_KMR20_CaughtLuigiInBasement, TRUE) - EVT_SET(AF_KMR_0C, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Luigi_0, ANIM_Luigi_Idle) - EVT_CALL(SetNpcVar, NPC_Luigi_0, 0, 1) - EVT_WAIT(1) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(2) - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(GetNpcPos, NPC_SELF, LVarA, LVarB, LVarC) - EVT_ADD(LVarB, 45) - EVT_ADD(LVarC, 1) - EVT_PLAY_EFFECT(EFFECT_MUSIC_NOTE, 0, LVarA, LVarB, LVarC) - EVT_WAIT(25) - EVT_PLAY_EFFECT(EFFECT_MUSIC_NOTE, 0, LVarA, LVarB, LVarC) - EVT_WAIT(25) - EVT_PLAY_EFFECT(EFFECT_MUSIC_NOTE, 0, LVarA, LVarB, LVarC) - EVT_WAIT(25) - EVT_PLAY_EFFECT(EFFECT_MUSIC_NOTE, 0, LVarA, LVarB, LVarC) - EVT_WAIT(25) - EVT_PLAY_EFFECT(EFFECT_MUSIC_NOTE, 0, LVarA, LVarB, LVarC) - EVT_WAIT(25) - EVT_PLAY_EFFECT(EFFECT_MUSIC_NOTE, 0, LVarA, LVarB, LVarC) - EVT_WAIT(25) - EVT_PLAY_EFFECT(EFFECT_MUSIC_NOTE, 0, LVarA, LVarB, LVarC) - EVT_WAIT(25) - EVT_PLAY_EFFECT(EFFECT_MUSIC_NOTE, 0, LVarA, LVarB, LVarC) - EVT_WAIT(25) - EVT_PLAY_EFFECT(EFFECT_MUSIC_NOTE, 0, LVarA, LVarB, LVarC) - EVT_END_THREAD - EVT_WAIT(20) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Luigi_0, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_WAIT(25) - EVT_CALL(SpeakToPlayer, NPC_Luigi_0, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 5, MSG_CH0_00E9) - EVT_WAIT(15) - EVT_CALL(InterpNpcYaw, NPC_Luigi_0, 270, 0) - EVT_WAIT(25) - EVT_CALL(InterpNpcYaw, NPC_Luigi_0, 90, 0) - EVT_WAIT(6) - EVT_CALL(InterpNpcYaw, NPC_Luigi_0, 270, 0) - EVT_WAIT(5) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Luigi_0, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Luigi_0, LVar0, LVar1, LVar2, 9) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Luigi_0, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 5, MSG_CH0_00EA) - EVT_CALL(InterpNpcYaw, NPC_Luigi_0, 90, 0) - EVT_WAIT(5) - EVT_CALL(EnableModel, MODEL_o200, FALSE) - EVT_CALL(InterpNpcYaw, NPC_Luigi_0, 270, 0) - EVT_WAIT(5) - EVT_CALL(SpeakToPlayer, NPC_Luigi_0, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 5, MSG_CH0_00EB) - EVT_WAIT(3) - EVT_CALL(SetNpcFlagBits, NPC_Luigi_0, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Luigi_0, ANIM_Luigi_Run) - EVT_CALL(NpcMoveTo, NPC_Luigi_0, -130, -17, 15) - EVT_CALL(NpcJump0, NPC_Luigi_0, -145, -54, -45, 10) - EVT_CALL(PlaySoundAtNpc, NPC_Luigi_0, SOUND_SPRING, SOUND_SPACE_DEFAULT) - EVT_CALL(N(PlaySpringLaunchAnimation)) - EVT_THREAD - EVT_WAIT(3) - EVT_EXEC(N(EVS_SecretPanel_Flip)) - EVT_END_THREAD - EVT_CALL(NpcJump0, NPC_Luigi_0, -145, 30, -45, 20) - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Luigi_0, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(NpcMoveTo, NPC_Luigi_0, 20, -80, 15) - EVT_CALL(SetNpcAnimation, NPC_Luigi_0, ANIM_Luigi_Idle) - EVT_CALL(SetNpcPos, NPC_Luigi_0, 48, 30, -5) - EVT_CALL(InterpNpcYaw, NPC_Luigi_0, 270, 0) - EVT_END_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Set(GF_KMR20_CaughtLuigiInBasement, TRUE) + Set(AF_KMR_0C, TRUE) + Call(SetNpcAnimation, NPC_Luigi_0, ANIM_Luigi_Idle) + Call(SetNpcVar, NPC_Luigi_0, 0, 1) + Wait(1) + Call(DisablePlayerInput, TRUE) + Wait(2) + Thread + Wait(20) + Call(GetNpcPos, NPC_SELF, LVarA, LVarB, LVarC) + Add(LVarB, 45) + Add(LVarC, 1) + PlayEffect(EFFECT_MUSIC_NOTE, 0, LVarA, LVarB, LVarC) + Wait(25) + PlayEffect(EFFECT_MUSIC_NOTE, 0, LVarA, LVarB, LVarC) + Wait(25) + PlayEffect(EFFECT_MUSIC_NOTE, 0, LVarA, LVarB, LVarC) + Wait(25) + PlayEffect(EFFECT_MUSIC_NOTE, 0, LVarA, LVarB, LVarC) + Wait(25) + PlayEffect(EFFECT_MUSIC_NOTE, 0, LVarA, LVarB, LVarC) + Wait(25) + PlayEffect(EFFECT_MUSIC_NOTE, 0, LVarA, LVarB, LVarC) + Wait(25) + PlayEffect(EFFECT_MUSIC_NOTE, 0, LVarA, LVarB, LVarC) + Wait(25) + PlayEffect(EFFECT_MUSIC_NOTE, 0, LVarA, LVarB, LVarC) + Wait(25) + PlayEffect(EFFECT_MUSIC_NOTE, 0, LVarA, LVarB, LVarC) + EndThread + Wait(20) + Thread + Call(GetNpcPos, NPC_Luigi_0, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Wait(25) + Call(SpeakToPlayer, NPC_Luigi_0, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 5, MSG_CH0_00E9) + Wait(15) + Call(InterpNpcYaw, NPC_Luigi_0, 270, 0) + Wait(25) + Call(InterpNpcYaw, NPC_Luigi_0, 90, 0) + Wait(6) + Call(InterpNpcYaw, NPC_Luigi_0, 270, 0) + Wait(5) + Thread + Call(GetNpcPos, NPC_Luigi_0, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Luigi_0, LVar0, LVar1, LVar2, 9) + EndThread + Call(SpeakToPlayer, NPC_Luigi_0, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 5, MSG_CH0_00EA) + Call(InterpNpcYaw, NPC_Luigi_0, 90, 0) + Wait(5) + Call(EnableModel, MODEL_o200, FALSE) + Call(InterpNpcYaw, NPC_Luigi_0, 270, 0) + Wait(5) + Call(SpeakToPlayer, NPC_Luigi_0, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 5, MSG_CH0_00EB) + Wait(3) + Call(SetNpcFlagBits, NPC_Luigi_0, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_Luigi_0, ANIM_Luigi_Run) + Call(NpcMoveTo, NPC_Luigi_0, -130, -17, 15) + Call(NpcJump0, NPC_Luigi_0, -145, -54, -45, 10) + Call(PlaySoundAtNpc, NPC_Luigi_0, SOUND_SPRING, SOUND_SPACE_DEFAULT) + Call(N(PlaySpringLaunchAnimation)) + Thread + Wait(3) + Exec(N(EVS_SecretPanel_Flip)) + EndThread + Call(NpcJump0, NPC_Luigi_0, -145, 30, -45, 20) + Thread + Call(SetNpcFlagBits, NPC_Luigi_0, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(NpcMoveTo, NPC_Luigi_0, 20, -80, 15) + Call(SetNpcAnimation, NPC_Luigi_0, ANIM_Luigi_Idle) + Call(SetNpcPos, NPC_Luigi_0, 48, 30, -5) + Call(InterpNpcYaw, NPC_Luigi_0, 270, 0) + EndThread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcIdle_Luigi_ReadingMail) = { - EVT_LABEL(10) - EVT_IF_EQ(MF_Unk_0C, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(GF_KMR20_CaughtLuigiReadingLetter, TRUE) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, -30, 15, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(15) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Idle) - EVT_WAIT(10) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Run) - EVT_CALL(NpcMoveTo, NPC_SELF, 37, -72, 16) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(NpcMoveTo, NPC_SELF, 42, -6, 10) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Idle) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_RETURN - EVT_END + Label(10) + IfEq(MF_Unk_0C, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) + Wait(1) + Goto(10) + EndIf + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar0, 0) + Wait(1) + Goto(10) + EndIf + Call(DisablePlayerInput, TRUE) + Set(GF_KMR20_CaughtLuigiReadingLetter, TRUE) + Wait(20) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, -30, 15, EMOTER_NPC, 0, 0, 0, 0) + Wait(15) + Call(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Idle) + Wait(10) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Run) + Call(NpcMoveTo, NPC_SELF, 37, -72, 16) + Call(InterpPlayerYaw, 90, 0) + Call(DisablePlayerInput, FALSE) + Call(NpcMoveTo, NPC_SELF, 42, -6, 10) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Idle) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Return + End }; EvtScript N(EVS_NpcIdle_Luigi) = { - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(3.0)) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Run) - EVT_CALL(SetSelfVar, 0, 0) - EVT_LABEL(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Run) - EVT_CALL(NpcMoveTo, NPC_SELF, 635, -108, 0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_GOTO(100) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Run) - EVT_CALL(NpcMoveTo, NPC_SELF, 528, 20, 0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_GOTO(100) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Run) - EVT_CALL(NpcMoveTo, NPC_SELF, 635, -108, 0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_GOTO(100) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Run) - EVT_CALL(NpcMoveTo, NPC_SELF, 528, 20, 0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_GOTO(100) - EVT_END_IF - EVT_GOTO(10) - EVT_LABEL(100) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Idle) - EVT_CALL(InterpNpcYaw, NPC_SELF, 39, 0) - EVT_RETURN - EVT_END + Call(SetNpcSpeed, NPC_SELF, Float(3.0)) + Call(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Run) + Call(SetSelfVar, 0, 0) + Label(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Run) + Call(NpcMoveTo, NPC_SELF, 635, -108, 0) + Call(GetSelfVar, 0, LVar0) + IfNe(LVar0, 0) + Goto(100) + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Run) + Call(NpcMoveTo, NPC_SELF, 528, 20, 0) + Call(GetSelfVar, 0, LVar0) + IfNe(LVar0, 0) + Goto(100) + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Run) + Call(NpcMoveTo, NPC_SELF, 635, -108, 0) + Call(GetSelfVar, 0, LVar0) + IfNe(LVar0, 0) + Goto(100) + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Run) + Call(NpcMoveTo, NPC_SELF, 528, 20, 0) + Call(GetSelfVar, 0, LVar0) + IfNe(LVar0, 0) + Goto(100) + EndIf + Goto(10) + Label(100) + Call(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Idle) + Call(InterpNpcYaw, NPC_SELF, 39, 0) + Return + End }; EvtScript N(EVS_NpcInteract_Luigi) = { - EVT_IF_EQ(MF_LuigiWaiting, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH0_00E5) - EVT_ELSE - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH0_00E6) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH0_00E7) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH0_00E8) - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH0_00ED) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_KMR20_ChasedOffShyGuy, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH0_00EE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH0_00EF) - EVT_END_IF - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH0_00F0) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH0_00F1) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH0_00F2) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 16, MSG_CH0_00F3) - EVT_END_SWITCH - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_KootFavorCheck_Luigi)) - EVT_IF_NE(MF_LuigiWaiting, TRUE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_END_CASE_GROUP - EVT_CASE_LT(STORY_EPILOGUE) - EVT_CALL(InterpNpcYaw, NPC_SELF, 39, 5) - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MF_LuigiWaiting, TRUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH0_00E5) + Else + Switch(GB_StoryProgress) + CaseLt(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) + Call(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH0_00E6) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH0_00E7) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH0_00E8) + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH0_00ED) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + IfEq(GF_KMR20_ChasedOffShyGuy, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH0_00EE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH0_00EF) + EndIf + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH0_00F0) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH0_00F1) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH0_00F2) + CaseLt(STORY_EPILOGUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 16, MSG_CH0_00F3) + EndSwitch + EndIf + ExecWait(N(EVS_KootFavorCheck_Luigi)) + IfNe(MF_LuigiWaiting, TRUE) + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + EndCaseGroup + CaseLt(STORY_EPILOGUE) + Call(InterpNpcYaw, NPC_SELF, 39, 5) + EndSwitch + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Luigi_0) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Idle) - EVT_CALL(SetNpcCollisionSize, NPC_SELF, 45, 24) - EVT_IF_EQ(MF_LuigiWaiting, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END_IF - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Luigi))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_CALL(SetNpcPos, NPC_SELF, -145, 30, -50) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Luigi_InBedroom))) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_IF_EQ(GF_KMR20_CaughtLuigiInBasement, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, -83, -80, -54) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Luigi_InBasement))) - EVT_SET(MF_LuigiInBasement, TRUE) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_Luigi_0, 48, 30, -5) - EVT_CALL(InterpNpcYaw, NPC_Luigi_0, 90, 0) - EVT_END_IF - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_KMR20_CaughtLuigiReadingLetter, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Luigi_ReadLetter) - EVT_CALL(SetNpcPos, NPC_SELF, -102, 30, -85) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Luigi_ReadingMail))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, 42, 30, -6) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_END_IF - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Idle) + Call(SetNpcCollisionSize, NPC_SELF, 45, 24) + IfEq(MF_LuigiWaiting, TRUE) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Return + EndIf + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Luigi))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Call(SetNpcPos, NPC_SELF, -145, 30, -50) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Luigi_InBedroom))) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + IfEq(GF_KMR20_CaughtLuigiInBasement, FALSE) + Call(SetNpcPos, NPC_SELF, -83, -80, -54) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Luigi_InBasement))) + Set(MF_LuigiInBasement, TRUE) + Else + Call(SetNpcPos, NPC_Luigi_0, 48, 30, -5) + Call(InterpNpcYaw, NPC_Luigi_0, 90, 0) + EndIf + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + IfEq(GF_KMR20_CaughtLuigiReadingLetter, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Luigi_ReadLetter) + Call(SetNpcPos, NPC_SELF, -102, 30, -85) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Luigi_ReadingMail))) + Else + Call(SetNpcPos, NPC_SELF, 42, 30, -6) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + EndIf + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + CaseLt(STORY_EPILOGUE) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Luigi_1) = { - EVT_CALL(SetNpcVar, NPC_SELF, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Idle) - EVT_CALL(SetNpcCollisionSize, NPC_SELF, 45, 24) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Luigi))) - EVT_IF_EQ(MF_LuigiWaiting, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) - EVT_CALL(SetNpcPos, NPC_SELF, 500, 0, -200) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_CALL(SetNpcPos, NPC_SELF, 300, 50, 150) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Luigi_IdleSit) - EVT_CALL(SetNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_Luigi_WhistleAtopObstacle))) - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_CALL(SetNpcPos, NPC_SELF, 560, 0, -75) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Luigi))) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_CALL(SetNpcPos, NPC_SELF, 300, 50, 150) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Luigi_IdleSit) - EVT_CALL(SetNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_Luigi_WhistleAtopObstacle))) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(SetNpcPos, NPC_SELF, 300, 115, 150) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Luigi_IdleSit) - EVT_CALL(SetNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_Luigi_WhistleAtopObstacle))) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_CALL(SetNpcPos, NPC_SELF, 306, 30, -145) - EVT_CALL(InterpNpcYaw, NPC_SELF, 39, 0) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_400000, 1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetNpcVar, NPC_SELF, 0, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Idle) + Call(SetNpcCollisionSize, NPC_SELF, 45, 24) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Luigi))) + IfEq(MF_LuigiWaiting, TRUE) + Return + EndIf + Switch(GB_StoryProgress) + CaseLt(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) + Call(SetNpcPos, NPC_SELF, 500, 0, -200) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + Call(SetNpcPos, NPC_SELF, 300, 50, 150) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Luigi_IdleSit) + Call(SetNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_Luigi_WhistleAtopObstacle))) + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Call(SetNpcPos, NPC_SELF, 560, 0, -75) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Luigi))) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Call(SetNpcPos, NPC_SELF, 300, 50, 150) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Luigi_IdleSit) + Call(SetNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_Luigi_WhistleAtopObstacle))) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(SetNpcPos, NPC_SELF, 300, 115, 150) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Luigi_IdleSit) + Call(SetNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_Luigi_WhistleAtopObstacle))) + CaseLt(STORY_EPILOGUE) + Call(SetNpcPos, NPC_SELF, 306, 30, -145) + Call(InterpNpcYaw, NPC_SELF, 39, 0) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_400000, 1) + EndSwitch + Return + End }; NpcData N(NpcData_Luigi_0) = { @@ -627,98 +627,98 @@ NpcData N(NpcData_Luigi_1) = { }; EvtScript N(EVS_NpcIdle_ShyGuy) = { - EVT_CALL(SetNpcPos, NPC_SELF, 500, 0, -195) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03) - EVT_LOOP(0) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 482, 0, -286, 15) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 726, 0, -153, 15) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 603, 0, 0, 15) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 557, 0, 130, 15) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 357, 0, 87, 15) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 344, 30, -8, 15) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 276, 138, 22, 15) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 360, 61, -117, 15) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 427, 55, -182, 15) - EVT_WAIT(5) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, 500, 0, -195) + Call(InterpNpcYaw, NPC_SELF, 270, 1) + Call(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03) + Loop(0) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 482, 0, -286, 15) + Wait(5) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 726, 0, -153, 15) + Wait(5) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 603, 0, 0, 15) + Wait(5) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 557, 0, 130, 15) + Wait(5) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 357, 0, 87, 15) + Wait(5) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 344, 30, -8, 15) + Wait(5) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 276, 138, 22, 15) + Wait(5) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 360, 61, -117, 15) + Wait(5) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 427, 55, -182, 15) + Wait(5) + EndLoop + Return + End }; EvtScript N(EVS_NpcAI_ShyGuy) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim0C) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SHY_GUY_RUN_AWAY, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 495, 0, -108, 15) - EVT_WAIT(3) - EVT_CALL(NpcMoveTo, NPC_SELF, 550, -170, 15) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 594, 30, -220, 15) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_ENTER_PIPE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcImgFXFlags, NPC_SELF, IMGFX_FLAG_800) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_ANIM, IMGFX_ANIM_VERTICAL_PIPE_CURL, 1, 1, 0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 10) - EVT_LOOP(30) - EVT_SUB(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim0C) + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SHY_GUY_RUN_AWAY, SOUND_SPACE_DEFAULT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 495, 0, -108, 15) + Wait(3) + Call(NpcMoveTo, NPC_SELF, 550, -170, 15) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 594, 30, -220, 15) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_ENTER_PIPE, SOUND_SPACE_DEFAULT) + Call(SetNpcImgFXFlags, NPC_SELF, IMGFX_FLAG_800) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_ANIM, IMGFX_ANIM_VERTICAL_PIPE_CURL, 1, 1, 0) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 10) + Loop(30) + Sub(LVar1, 1) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcHit_ShyGuy) = { - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SHY_GUY_OUCH, SOUND_SPACE_DEFAULT) - EVT_SET(GF_KMR20_ChasedOffShyGuy, TRUE) - EVT_CALL(SetNpcVar, NPC_Luigi_1, 0, 1) - EVT_WAIT(2) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_CANT_INTERACT | ENEMY_FLAG_IGNORE_PARTNER, 1) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_ShyGuy))) - EVT_RETURN - EVT_END + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SHY_GUY_OUCH, SOUND_SPACE_DEFAULT) + Set(GF_KMR20_ChasedOffShyGuy, TRUE) + Call(SetNpcVar, NPC_Luigi_1, 0, 1) + Wait(2) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_CANT_INTERACT | ENEMY_FLAG_IGNORE_PARTNER, 1) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_ShyGuy))) + Return + End }; EvtScript N(EVS_NpcInit_ShyGuy) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH4_DEFEATED_GENERAL_GUY) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END_IF - EVT_IF_NE(GF_KMR20_ChasedOffShyGuy, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END_IF - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_ShyGuy))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_ShyGuy))) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Return + EndIf + IfGe(GB_StoryProgress, STORY_CH4_DEFEATED_GENERAL_GUY) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Return + EndIf + IfNe(GF_KMR20_ChasedOffShyGuy, FALSE) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Return + EndIf + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_ShyGuy))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_ShyGuy))) + Return + End }; NpcData N(NpcData_ShyGuy) = { diff --git a/src/world/area_kmr/kmr_20/kmr_20_11_npc_intro.c b/src/world/area_kmr/kmr_20/kmr_20_11_npc_intro.c index 3b362911d54..7d1355f51f1 100644 --- a/src/world/area_kmr/kmr_20/kmr_20_11_npc_intro.c +++ b/src/world/area_kmr/kmr_20/kmr_20_11_npc_intro.c @@ -31,149 +31,149 @@ API_CALLABLE(N(SetAmbienceVolumeHalf_Intro)) { } EvtScript N(EVS_Luigi_PlayWalkSounds_Intro) = { - EVT_CALL(GetNpcAnimation, NPC_Scene_Luigi, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(ANIM_Luigi_Walk) - EVT_CASE_OR_EQ(ANIM_Luigi_WalkLetter) - EVT_CASE_OR_EQ(ANIM_Luigi_WalkBack) - EVT_SET(LVar1, 10) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(ANIM_Luigi_Run) - EVT_CASE_OR_EQ(ANIM_Luigi_RunLetter) - EVT_CASE_OR_EQ(ANIM_Luigi_RunBack) - EVT_SET(LVar1, 5) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CHILD_THREAD - EVT_LOOP(0) - EVT_CALL(PlaySoundAtNpc, NPC_Scene_Luigi, SOUND_SEQ_LUIGI_STEP, SOUND_SPACE_DEFAULT) - EVT_WAIT(LVar1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(GetNpcAnimation, NPC_Scene_Luigi, LVar0) + Switch(LVar0) + CaseOrEq(ANIM_Luigi_Walk) + CaseOrEq(ANIM_Luigi_WalkLetter) + CaseOrEq(ANIM_Luigi_WalkBack) + Set(LVar1, 10) + EndCaseGroup + CaseOrEq(ANIM_Luigi_Run) + CaseOrEq(ANIM_Luigi_RunLetter) + CaseOrEq(ANIM_Luigi_RunBack) + Set(LVar1, 5) + EndCaseGroup + EndSwitch + ChildThread + Loop(0) + Call(PlaySoundAtNpc, NPC_Scene_Luigi, SOUND_SEQ_LUIGI_STEP, SOUND_SPACE_DEFAULT) + Wait(LVar1) + EndLoop + EndChildThread + Loop(0) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_Player_EnterPipe_Intro) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_SET(LVar0, kmr_20_ENTRY_4) - EVT_CALL(N(Pipe_GetEntryPos_Intro)) - EVT_CALL(PlayerMoveTo, LVar1, LVar3, 3) - EVT_SET(LVar0, kmr_20_ENTRY_4) - EVT_CALL(N(Pipe_GetEntryPos_Intro)) - EVT_CALL(SetPlayerPos, LVar1, LVar2, LVar3) - EVT_WAIT(2) - EVT_CALL(PlaySoundAtPlayer, SOUND_ENTER_PIPE, SOUND_SPACE_DEFAULT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_WAIT(4) - EVT_LOOP(40) - EVT_SUB(LVar1, 1) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetPlayerImgFXFlags, IMGFX_FLAG_800) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_VERTICAL_PIPE_CURL, 1, 1, 0) - EVT_WAIT(25) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(HidePlayerShadow, TRUE) + Set(LVar0, kmr_20_ENTRY_4) + Call(N(Pipe_GetEntryPos_Intro)) + Call(PlayerMoveTo, LVar1, LVar3, 3) + Set(LVar0, kmr_20_ENTRY_4) + Call(N(Pipe_GetEntryPos_Intro)) + Call(SetPlayerPos, LVar1, LVar2, LVar3) + Wait(2) + Call(PlaySoundAtPlayer, SOUND_ENTER_PIPE, SOUND_SPACE_DEFAULT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Thread + Wait(4) + Loop(40) + Sub(LVar1, 1) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + Call(SetPlayerImgFXFlags, IMGFX_FLAG_800) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_VERTICAL_PIPE_CURL, 1, 1, 0) + Wait(25) + Return + End }; EvtScript N(EVS_Luigi_EnterPipe_Intro) = { - EVT_CALL(SetNpcFlagBits, NPC_Scene_Luigi, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Scene_Luigi, NPC_FLAG_FLYING, TRUE) - EVT_CALL(EnableNpcShadow, NPC_Scene_Luigi, FALSE) - EVT_SET(LVar0, kmr_20_ENTRY_4) - EVT_CALL(N(Pipe_GetEntryPos_Intro)) - EVT_CALL(NpcMoveTo, NPC_Scene_Luigi, LVar1, LVar3, 3) - EVT_SET(LVar0, kmr_20_ENTRY_4) - EVT_CALL(N(Pipe_GetEntryPos_Intro)) - EVT_CALL(SetNpcPos, NPC_Scene_Luigi, LVar1, LVar2, LVar3) - EVT_WAIT(2) - EVT_CALL(PlaySoundAtNpc, NPC_Scene_Luigi, SOUND_ENTER_PIPE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_Still) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Scene_Luigi, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 7) - EVT_CALL(SetNpcPos, NPC_Scene_Luigi, LVar0, LVar1, LVar2) - EVT_LOOP(40) - EVT_SUB(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_Scene_Luigi, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcImgFXFlags, NPC_Scene_Luigi, IMGFX_FLAG_800) - EVT_CALL(SetNpcImgFXParams, NPC_Scene_Luigi, IMGFX_SET_ANIM, IMGFX_ANIM_VERTICAL_PIPE_CURL, 1, 1, 0) - EVT_WAIT(25) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_Scene_Luigi, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_Scene_Luigi, NPC_FLAG_FLYING, TRUE) + Call(EnableNpcShadow, NPC_Scene_Luigi, FALSE) + Set(LVar0, kmr_20_ENTRY_4) + Call(N(Pipe_GetEntryPos_Intro)) + Call(NpcMoveTo, NPC_Scene_Luigi, LVar1, LVar3, 3) + Set(LVar0, kmr_20_ENTRY_4) + Call(N(Pipe_GetEntryPos_Intro)) + Call(SetNpcPos, NPC_Scene_Luigi, LVar1, LVar2, LVar3) + Wait(2) + Call(PlaySoundAtNpc, NPC_Scene_Luigi, SOUND_ENTER_PIPE, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_Still) + Thread + Call(GetNpcPos, NPC_Scene_Luigi, LVar0, LVar1, LVar2) + Add(LVar1, 7) + Call(SetNpcPos, NPC_Scene_Luigi, LVar0, LVar1, LVar2) + Loop(40) + Sub(LVar1, 1) + Call(SetNpcPos, NPC_Scene_Luigi, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + Call(SetNpcImgFXFlags, NPC_Scene_Luigi, IMGFX_FLAG_800) + Call(SetNpcImgFXParams, NPC_Scene_Luigi, IMGFX_SET_ANIM, IMGFX_ANIM_VERTICAL_PIPE_CURL, 1, 1, 0) + Wait(25) + Return + End }; EvtScript N(EVS_FocusCam_Unused) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 250, 30, -80) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(N(func_80241CF0_8EDB10), EVT_FLOAT(1.8)) - EVT_CALL(InterpCamTargetPos, 0, 1, 250, 30, -80, 10) - EVT_CALL(N(func_80241CF0_8EDB10), 1) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, 250, 30, -80) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(N(func_80241CF0_8EDB10), Float(1.8)) + Call(InterpCamTargetPos, 0, 1, 250, 30, -80, 10) + Call(N(func_80241CF0_8EDB10), 1) + Return + End }; EvtScript N(EVS_TetherCamToLuigi) = { - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetNpcVar, NPC_Scene_Luigi, 0, 1) - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_Scene_Luigi, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(GetNpcVar, NPC_Scene_Luigi, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetNpcVar, NPC_Scene_Luigi, 0, 1) + Loop(0) + Call(GetNpcPos, NPC_Scene_Luigi, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Call(GetNpcVar, NPC_Scene_Luigi, 0, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_OpenAndCloseDoor_Intro_Impl) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_o246, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 80, 14, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g14, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(30) - EVT_CALL(MakeLerp, 80, 0, 8, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g14, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_o246, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_o246, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 80, 14, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g14, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(30) + Call(MakeLerp, 80, 0, 8, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g14, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_o246, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Return + End }; EvtScript N(EVS_OpenAndCloseDoor_Intro) = { - EVT_CALL(EnableGroup, MODEL_g72, TRUE) - EVT_EXEC_WAIT(N(EVS_OpenAndCloseDoor_Intro_Impl)) - EVT_CALL(EnableGroup, MODEL_g72, FALSE) - EVT_RETURN - EVT_END + Call(EnableGroup, MODEL_g72, TRUE) + ExecWait(N(EVS_OpenAndCloseDoor_Intro_Impl)) + Call(EnableGroup, MODEL_g72, FALSE) + Return + End }; s32 N(D_8024FD28_8FBB48)[] = { @@ -194,252 +194,252 @@ s32* N(UnknownLists)[] = { }; EvtScript N(EVS_Scene_BeginGame) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_THREAD - EVT_WAIT(5 * DT) - EVT_CALL(SetMusicTrack, 0, SONG_MAIL_CALL, 0, 8) - EVT_END_THREAD - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(SetPlayerPos, -50, 30, -80) - EVT_CALL(SetNpcPos, NPC_Scene_Luigi, 220, 30, -80) - EVT_CALL(SetNpcPos, NPC_Scene_Parakarry, 720, 220, -150) - EVT_CALL(SetNpcYaw, NPC_Scene_Parakarry, 270) - EVT_CALL(EnableGroup, MODEL_g94, FALSE) - EVT_CALL(EnableGroup, MODEL_g100, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 550, 0, 20) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 550, 0, 20) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 550) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-14.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.7)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(MakeLerp, 0, 70, 60 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g108, LVar0, 0, 0) - EVT_SETF(LVar2, 0) - EVT_SUBF(LVar2, LVar0) - EVT_CALL(TranslateGroup, MODEL_g106, LVar2, 0, 0) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(MakeLerp, 0, 50, 40 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g109, LVar0, 0, 0) - EVT_SETF(LVar2, 0) - EVT_SUBF(LVar2, LVar0) - EVT_CALL(TranslateGroup, MODEL_g107, LVar2, 0, 0) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(50 * DT) - EVT_CALL(MakeLerp, 0, 50, 40 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g105, LVar0, 0, 0) - EVT_CALL(TranslateGroup, MODEL_g102, LVar0, 0, 0) - EVT_SETF(LVar2, 0) - EVT_SUBF(LVar2, LVar0) - EVT_CALL(TranslateGroup, MODEL_g103, LVar2, 0, 0) - EVT_CALL(TranslateGroup, MODEL_g104, LVar2, 0, 0) - EVT_CALL(TranslateGroup, MODEL_g101, LVar2, 0, 0) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(120 * DT) - EVT_CALL(NpcFlyTo, NPC_Scene_Parakarry, 430, 20, -165, 60 * DT, -10, EASING_LINEAR) - EVT_CALL(InterpNpcYaw, NPC_Scene_Parakarry, 45, 10) - EVT_WAIT(20 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Scene_Parakarry, SOUNC_CHECK_MAILBOX, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_CALL(TranslateModel, MODEL_o222, 2, 0, 0) - EVT_CALL(TranslateModel, MODEL_o223, 2, 0, 0) - EVT_CALL(TranslateModel, MODEL_o224, 2, 0, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o222, -3, 0, 0) - EVT_CALL(TranslateModel, MODEL_o223, -3, 0, 0) - EVT_CALL(TranslateModel, MODEL_o224, -3, 0, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o222, 2, 0, 0) - EVT_CALL(TranslateModel, MODEL_o223, 2, 0, 0) - EVT_CALL(TranslateModel, MODEL_o224, 2, 0, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o222, -3, 0, 0) - EVT_CALL(TranslateModel, MODEL_o223, -3, 0, 0) - EVT_CALL(TranslateModel, MODEL_o224, -3, 0, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o222, 0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o223, 0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o224, 0, 0, 0) - EVT_END_THREAD - EVT_WAIT(35 * DT) - EVT_CALL(InterpNpcYaw, NPC_Scene_Parakarry, 220, 5) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Scene_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 5, MSG_Intro_001E) - EVT_WAIT(10 * DT) - EVT_CALL(NpcFlyTo, NPC_Scene_Parakarry, 360, 260, 60, 60 * DT, -10, EASING_LINEAR) - EVT_WAIT(30 * DT) - EVT_EXEC(N(EVS_OpenAndCloseDoor_Intro)) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_Run) - EVT_EXEC_GET_TID(N(EVS_Luigi_PlayWalkSounds_Intro), LVarA) - EVT_CALL(SetNpcSpeed, NPC_Scene_Luigi, EVT_FLOAT(4.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Scene_Luigi, 450, -80, 0) - EVT_CALL(NpcMoveTo, NPC_Scene_Luigi, 430, -165, 0) - EVT_CALL(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_Idle) - EVT_KILL_THREAD(LVarA) - EVT_WAIT(20 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Scene_Luigi, SOUNC_CHECK_MAILBOX, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_CALL(TranslateModel, MODEL_o222, 1, 0, 0) - EVT_CALL(TranslateModel, MODEL_o223, 1, 0, 0) - EVT_CALL(TranslateModel, MODEL_o224, 1, 0, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o222, -2, 0, 0) - EVT_CALL(TranslateModel, MODEL_o223, -2, 0, 0) - EVT_CALL(TranslateModel, MODEL_o224, -2, 0, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o222, 1, 0, 0) - EVT_CALL(TranslateModel, MODEL_o223, 1, 0, 0) - EVT_CALL(TranslateModel, MODEL_o224, 1, 0, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o222, -2, 0, 0) - EVT_CALL(TranslateModel, MODEL_o223, -2, 0, 0) - EVT_CALL(TranslateModel, MODEL_o224, -2, 0, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o222, 0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o223, 0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o224, 0, 0, 0) - EVT_END_THREAD - EVT_WAIT(2) - EVT_CALL(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_IdleLetter) - EVT_WAIT(40 * DT) - EVT_CALL(InterpNpcYaw, NPC_Scene_Luigi, 270, 5) - EVT_CALL(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_RunLetter) - EVT_EXEC_GET_TID(N(EVS_Luigi_PlayWalkSounds_Intro), LVarA) - EVT_CALL(NpcMoveTo, NPC_Scene_Luigi, 450, -80, 0) - EVT_CALL(NpcMoveTo, NPC_Scene_Luigi, 290, -70, 0) - EVT_KILL_THREAD(LVarA) - EVT_CALL(EnableGroup, MODEL_g20, TRUE) - EVT_CALL(EnableGroup, MODEL_g21, TRUE) - EVT_CALL(EnableGroup, MODEL_g49, TRUE) - EVT_CALL(EnableModel, MODEL_g56, TRUE) - EVT_CALL(N(func_80241C9C_8EDABC)) - EVT_CALL(RotateGroup, MODEL_g60, 90, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_g34, 90, -1, 0, 0) - EVT_CALL(EnableGroup, MODEL_g60, FALSE) - EVT_CALL(EnableGroup, MODEL_g34, FALSE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 250, 30, -80) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 250, 30, -80) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(N(SetAmbienceVolumeHalf_Intro)) - EVT_EXEC(N(EVS_OpenAndCloseDoor_Intro_Impl)) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_WalkLetter) - EVT_EXEC_GET_TID(N(EVS_Luigi_PlayWalkSounds_Intro), LVarA) - EVT_CALL(SetNpcSpeed, NPC_Scene_Luigi, EVT_FLOAT(2.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Scene_Luigi, 240, -80, 0) - EVT_CALL(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_IdleLetter) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SpeakToPlayer, NPC_Scene_Luigi, ANIM_Luigi_TalkLetter, ANIM_Luigi_IdleLetter, 0, MSG_Intro_001F) - EVT_WAIT(10 * DT) - EVT_EXEC(N(EVS_TetherCamToLuigi)) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_WalkLetter) - EVT_EXEC_GET_TID(N(EVS_Luigi_PlayWalkSounds_Intro), LVarA) - EVT_CALL(NpcMoveTo, NPC_Scene_Luigi, 230, -130, 0) - EVT_CALL(NpcMoveTo, NPC_Scene_Luigi, 110, -110, 0) - EVT_CALL(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_IdleLetter) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetNpcVar, NPC_Scene_Luigi, 0, 0) - EVT_END_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(func_802D1270, 70, -80, EVT_FLOAT(2.0 / DT)) - EVT_CALL(func_802D1270, 70, -110, EVT_FLOAT(2.0 / DT)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Scene_Luigi, ANIM_Luigi_TalkLetter, ANIM_Luigi_IdleLetter, 0, MSG_Intro_0020) - EVT_CALL(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_OpenLetter) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_IdleRead) - EVT_CALL(SpeakToPlayer, NPC_Scene_Luigi, ANIM_Luigi_TalkRead, ANIM_Luigi_IdleRead, 0, MSG_Intro_0021) - EVT_CALL(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_ReadLetter) - EVT_WAIT(10 * DT) - EVT_CALL(SetMusicTrack, 0, SONG_PRISONER_PEACH_THEME, 0, 8) - EVT_WAIT(5 * DT) - EVT_CALL(ClearAmbientSounds, 250) - EVT_CALL(GotoMapSpecial, EVT_PTR("osr_00"), osr_00_ENTRY_3, TRANSITION_SLOW_FADE_TO_WHITE) - EVT_WAIT(15 * DT) - EVT_CALL(ClearAmbientSounds, 250) - EVT_WAIT(100 * DT) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Thread + Wait(5 * DT) + Call(SetMusicTrack, 0, SONG_MAIL_CALL, 0, 8) + EndThread + Call(InterpPlayerYaw, 90, 0) + Call(SetPlayerPos, -50, 30, -80) + Call(SetNpcPos, NPC_Scene_Luigi, 220, 30, -80) + Call(SetNpcPos, NPC_Scene_Parakarry, 720, 220, -150) + Call(SetNpcYaw, NPC_Scene_Parakarry, 270) + Call(EnableGroup, MODEL_g94, FALSE) + Call(EnableGroup, MODEL_g100, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, 550, 0, 20) + Call(SetPanTarget, CAM_DEFAULT, 550, 0, 20) + Call(SetCamDistance, CAM_DEFAULT, 550) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-14.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(SetCamDistance, CAM_DEFAULT, 450) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.7)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Wait(10 * DT) + Call(MakeLerp, 0, 70, 60 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g108, LVar0, 0, 0) + SetF(LVar2, 0) + SubF(LVar2, LVar0) + Call(TranslateGroup, MODEL_g106, LVar2, 0, 0) + IfEq(LVar1, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + EndThread + Thread + Wait(30 * DT) + Call(MakeLerp, 0, 50, 40 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g109, LVar0, 0, 0) + SetF(LVar2, 0) + SubF(LVar2, LVar0) + Call(TranslateGroup, MODEL_g107, LVar2, 0, 0) + IfEq(LVar1, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + EndThread + Thread + Wait(50 * DT) + Call(MakeLerp, 0, 50, 40 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g105, LVar0, 0, 0) + Call(TranslateGroup, MODEL_g102, LVar0, 0, 0) + SetF(LVar2, 0) + SubF(LVar2, LVar0) + Call(TranslateGroup, MODEL_g103, LVar2, 0, 0) + Call(TranslateGroup, MODEL_g104, LVar2, 0, 0) + Call(TranslateGroup, MODEL_g101, LVar2, 0, 0) + IfEq(LVar1, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + EndThread + Wait(120 * DT) + Call(NpcFlyTo, NPC_Scene_Parakarry, 430, 20, -165, 60 * DT, -10, EASING_LINEAR) + Call(InterpNpcYaw, NPC_Scene_Parakarry, 45, 10) + Wait(20 * DT) + Call(PlaySoundAtNpc, NPC_Scene_Parakarry, SOUNC_CHECK_MAILBOX, SOUND_SPACE_DEFAULT) + Thread + Call(TranslateModel, MODEL_o222, 2, 0, 0) + Call(TranslateModel, MODEL_o223, 2, 0, 0) + Call(TranslateModel, MODEL_o224, 2, 0, 0) + Wait(1) + Call(TranslateModel, MODEL_o222, -3, 0, 0) + Call(TranslateModel, MODEL_o223, -3, 0, 0) + Call(TranslateModel, MODEL_o224, -3, 0, 0) + Wait(1) + Call(TranslateModel, MODEL_o222, 2, 0, 0) + Call(TranslateModel, MODEL_o223, 2, 0, 0) + Call(TranslateModel, MODEL_o224, 2, 0, 0) + Wait(1) + Call(TranslateModel, MODEL_o222, -3, 0, 0) + Call(TranslateModel, MODEL_o223, -3, 0, 0) + Call(TranslateModel, MODEL_o224, -3, 0, 0) + Wait(1) + Call(TranslateModel, MODEL_o222, 0, 0, 0) + Call(TranslateModel, MODEL_o223, 0, 0, 0) + Call(TranslateModel, MODEL_o224, 0, 0, 0) + EndThread + Wait(35 * DT) + Call(InterpNpcYaw, NPC_Scene_Parakarry, 220, 5) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Scene_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 5, MSG_Intro_001E) + Wait(10 * DT) + Call(NpcFlyTo, NPC_Scene_Parakarry, 360, 260, 60, 60 * DT, -10, EASING_LINEAR) + Wait(30 * DT) + Exec(N(EVS_OpenAndCloseDoor_Intro)) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_Run) + ExecGetTID(N(EVS_Luigi_PlayWalkSounds_Intro), LVarA) + Call(SetNpcSpeed, NPC_Scene_Luigi, Float(4.0 / DT)) + Call(NpcMoveTo, NPC_Scene_Luigi, 450, -80, 0) + Call(NpcMoveTo, NPC_Scene_Luigi, 430, -165, 0) + Call(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_Idle) + KillThread(LVarA) + Wait(20 * DT) + Call(PlaySoundAtNpc, NPC_Scene_Luigi, SOUNC_CHECK_MAILBOX, SOUND_SPACE_DEFAULT) + Thread + Call(TranslateModel, MODEL_o222, 1, 0, 0) + Call(TranslateModel, MODEL_o223, 1, 0, 0) + Call(TranslateModel, MODEL_o224, 1, 0, 0) + Wait(1) + Call(TranslateModel, MODEL_o222, -2, 0, 0) + Call(TranslateModel, MODEL_o223, -2, 0, 0) + Call(TranslateModel, MODEL_o224, -2, 0, 0) + Wait(1) + Call(TranslateModel, MODEL_o222, 1, 0, 0) + Call(TranslateModel, MODEL_o223, 1, 0, 0) + Call(TranslateModel, MODEL_o224, 1, 0, 0) + Wait(1) + Call(TranslateModel, MODEL_o222, -2, 0, 0) + Call(TranslateModel, MODEL_o223, -2, 0, 0) + Call(TranslateModel, MODEL_o224, -2, 0, 0) + Wait(1) + Call(TranslateModel, MODEL_o222, 0, 0, 0) + Call(TranslateModel, MODEL_o223, 0, 0, 0) + Call(TranslateModel, MODEL_o224, 0, 0, 0) + EndThread + Wait(2) + Call(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_IdleLetter) + Wait(40 * DT) + Call(InterpNpcYaw, NPC_Scene_Luigi, 270, 5) + Call(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_RunLetter) + ExecGetTID(N(EVS_Luigi_PlayWalkSounds_Intro), LVarA) + Call(NpcMoveTo, NPC_Scene_Luigi, 450, -80, 0) + Call(NpcMoveTo, NPC_Scene_Luigi, 290, -70, 0) + KillThread(LVarA) + Call(EnableGroup, MODEL_g20, TRUE) + Call(EnableGroup, MODEL_g21, TRUE) + Call(EnableGroup, MODEL_g49, TRUE) + Call(EnableModel, MODEL_g56, TRUE) + Call(N(func_80241C9C_8EDABC)) + Call(RotateGroup, MODEL_g60, 90, 1, 0, 0) + Call(RotateGroup, MODEL_g34, 90, -1, 0, 0) + Call(EnableGroup, MODEL_g60, FALSE) + Call(EnableGroup, MODEL_g34, FALSE) + Call(UseSettingsFrom, CAM_DEFAULT, 250, 30, -80) + Call(SetPanTarget, CAM_DEFAULT, 250, 30, -80) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(N(SetAmbienceVolumeHalf_Intro)) + Exec(N(EVS_OpenAndCloseDoor_Intro_Impl)) + Wait(10) + Call(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_WalkLetter) + ExecGetTID(N(EVS_Luigi_PlayWalkSounds_Intro), LVarA) + Call(SetNpcSpeed, NPC_Scene_Luigi, Float(2.0 / DT)) + Call(NpcMoveTo, NPC_Scene_Luigi, 240, -80, 0) + Call(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_IdleLetter) + KillThread(LVarA) + Call(SpeakToPlayer, NPC_Scene_Luigi, ANIM_Luigi_TalkLetter, ANIM_Luigi_IdleLetter, 0, MSG_Intro_001F) + Wait(10 * DT) + Exec(N(EVS_TetherCamToLuigi)) + Thread + Call(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_WalkLetter) + ExecGetTID(N(EVS_Luigi_PlayWalkSounds_Intro), LVarA) + Call(NpcMoveTo, NPC_Scene_Luigi, 230, -130, 0) + Call(NpcMoveTo, NPC_Scene_Luigi, 110, -110, 0) + Call(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_IdleLetter) + KillThread(LVarA) + Call(SetNpcVar, NPC_Scene_Luigi, 0, 0) + EndThread + Wait(20 * DT) + Call(func_802D1270, 70, -80, Float(2.0 / DT)) + Call(func_802D1270, 70, -110, Float(2.0 / DT)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Scene_Luigi, ANIM_Luigi_TalkLetter, ANIM_Luigi_IdleLetter, 0, MSG_Intro_0020) + Call(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_OpenLetter) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_IdleRead) + Call(SpeakToPlayer, NPC_Scene_Luigi, ANIM_Luigi_TalkRead, ANIM_Luigi_IdleRead, 0, MSG_Intro_0021) + Call(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_ReadLetter) + Wait(10 * DT) + Call(SetMusicTrack, 0, SONG_PRISONER_PEACH_THEME, 0, 8) + Wait(5 * DT) + Call(ClearAmbientSounds, 250) + Call(GotoMapSpecial, Ref("osr_00"), osr_00_ENTRY_3, TRANSITION_SLOW_FADE_TO_WHITE) + Wait(15 * DT) + Call(ClearAmbientSounds, 250) + Wait(100 * DT) + Return + End }; EvtScript N(EVS_Scene_SettingOff) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcPos, NPC_Scene_Luigi, 220, 30, -70) - EVT_CALL(SetNpcYaw, NPC_Scene_Luigi, 90) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 320, 30, -70) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 320, 30, -70) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(60 * DT) - EVT_CALL(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 8) - EVT_EXEC(N(EVS_OpenAndCloseDoor_Intro)) - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcSpeed, NPC_Scene_Luigi, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_Run) - EVT_EXEC_GET_TID(N(EVS_Luigi_PlayWalkSounds_Intro), LVarA) - EVT_CALL(NpcMoveTo, NPC_Scene_Luigi, 320, -70, 0) - EVT_CALL(NpcMoveTo, NPC_Scene_Luigi, 460, -70, 0) - EVT_CALL(NpcMoveTo, NPC_Scene_Luigi, 570, -170, 0) - EVT_CALL(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_Idle) - EVT_KILL_THREAD(LVarA) - EVT_END_THREAD - EVT_CALL(func_802D1270, 320, -70, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(func_802D1270, 460, -70, EVT_FLOAT(3.0 / DT)) - EVT_CALL(func_802D1270, 570, -170, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(PlayerJump, 594, 30, -216, 15 * DT) - EVT_EXEC_WAIT(N(EVS_Player_EnterPipe_Intro)) - EVT_CALL(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_JumpStance) - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_Jump) - EVT_CALL(PlaySoundAtNpc, NPC_Scene_Luigi, SOUND_QUICK_PLAYER_JUMP, SOUND_SPACE_DEFAULT) - EVT_WAIT(7 * DT) - EVT_WAIT(7 * DT) - EVT_CALL(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_Idle) - EVT_CALL(PlaySoundAtNpc, NPC_Scene_Luigi, SOUND_LAND_SOFTLY, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Scene_Luigi, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_Scene_Luigi, 594, 30, -216, 15 * DT) - EVT_EXEC_WAIT(N(EVS_Luigi_EnterPipe_Intro)) - EVT_EXEC(N(EVS_FadeOutAmbientSounds)) - EVT_CALL(GotoMap, EVT_PTR("mac_00"), mac_00_ENTRY_5) - EVT_WAIT(100) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(SetNpcPos, NPC_Scene_Luigi, 220, 30, -70) + Call(SetNpcYaw, NPC_Scene_Luigi, 90) + Call(UseSettingsFrom, CAM_DEFAULT, 320, 30, -70) + Call(SetPanTarget, CAM_DEFAULT, 320, 30, -70) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(60 * DT) + Call(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 8) + Exec(N(EVS_OpenAndCloseDoor_Intro)) + Thread + Wait(10 * DT) + Call(SetNpcSpeed, NPC_Scene_Luigi, Float(3.0 / DT)) + Call(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_Run) + ExecGetTID(N(EVS_Luigi_PlayWalkSounds_Intro), LVarA) + Call(NpcMoveTo, NPC_Scene_Luigi, 320, -70, 0) + Call(NpcMoveTo, NPC_Scene_Luigi, 460, -70, 0) + Call(NpcMoveTo, NPC_Scene_Luigi, 570, -170, 0) + Call(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_Idle) + KillThread(LVarA) + EndThread + Call(func_802D1270, 320, -70, Float(3.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(func_802D1270, 460, -70, Float(3.0 / DT)) + Call(func_802D1270, 570, -170, Float(3.0 / DT)) + Call(SetPlayerJumpscale, Float(1.0)) + Call(PlayerJump, 594, 30, -216, 15 * DT) + ExecWait(N(EVS_Player_EnterPipe_Intro)) + Call(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_JumpStance) + Wait(10 * DT) + Thread + Call(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_Jump) + Call(PlaySoundAtNpc, NPC_Scene_Luigi, SOUND_QUICK_PLAYER_JUMP, SOUND_SPACE_DEFAULT) + Wait(7 * DT) + Wait(7 * DT) + Call(SetNpcAnimation, NPC_Scene_Luigi, ANIM_Luigi_Idle) + Call(PlaySoundAtNpc, NPC_Scene_Luigi, SOUND_LAND_SOFTLY, SOUND_SPACE_DEFAULT) + EndThread + Call(SetNpcJumpscale, NPC_Scene_Luigi, Float(1.0)) + Call(NpcJump0, NPC_Scene_Luigi, 594, 30, -216, 15 * DT) + ExecWait(N(EVS_Luigi_EnterPipe_Intro)) + Exec(N(EVS_FadeOutAmbientSounds)) + Call(GotoMap, Ref("mac_00"), mac_00_ENTRY_5) + Wait(100) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_kmr/kmr_20/kmr_20_12_npc_epilogue.c b/src/world/area_kmr/kmr_20/kmr_20_12_npc_epilogue.c index 364352e0306..9d3950d91ea 100644 --- a/src/world/area_kmr/kmr_20/kmr_20_12_npc_epilogue.c +++ b/src/world/area_kmr/kmr_20/kmr_20_12_npc_epilogue.c @@ -63,270 +63,270 @@ API_CALLABLE(N(SetAmbienceVolumeFull_Epilogue)) { } EvtScript N(EVS_Luigi_PlayWalkSounds_Epilogue) = { - EVT_CALL(GetNpcAnimation, NPC_Luigi_1, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(ANIM_Luigi_Walk) - EVT_CASE_OR_EQ(ANIM_Luigi_WalkLetter) - EVT_CASE_OR_EQ(ANIM_Luigi_WalkBack) - EVT_SET(LVar1, 10) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(ANIM_Luigi_Run) - EVT_CASE_OR_EQ(ANIM_Luigi_RunLetter) - EVT_CASE_OR_EQ(ANIM_Luigi_RunBack) - EVT_SET(LVar1, 5) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CHILD_THREAD - EVT_LOOP(0) - EVT_CALL(PlaySoundAtNpc, NPC_Luigi_1, SOUND_SEQ_LUIGI_STEP, SOUND_SPACE_DEFAULT) - EVT_WAIT(LVar1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(GetNpcAnimation, NPC_Luigi_1, LVar0) + Switch(LVar0) + CaseOrEq(ANIM_Luigi_Walk) + CaseOrEq(ANIM_Luigi_WalkLetter) + CaseOrEq(ANIM_Luigi_WalkBack) + Set(LVar1, 10) + EndCaseGroup + CaseOrEq(ANIM_Luigi_Run) + CaseOrEq(ANIM_Luigi_RunLetter) + CaseOrEq(ANIM_Luigi_RunBack) + Set(LVar1, 5) + EndCaseGroup + EndSwitch + ChildThread + Loop(0) + Call(PlaySoundAtNpc, NPC_Luigi_1, SOUND_SEQ_LUIGI_STEP, SOUND_SPACE_DEFAULT) + Wait(LVar1) + EndLoop + EndChildThread + Loop(0) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_OpenFrontDoor) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_o246, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 90, 10, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g14, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_o246, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 90, 10, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g14, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_CloseFrontDoor) = { - EVT_CALL(MakeLerp, 90, 0, 10, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g14, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_o246, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_RETURN - EVT_END + Call(MakeLerp, 90, 0, 10, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g14, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_o246, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Return + End }; EvtScript N(EVS_OpenAndCloseDoor_Epilogue) = { - EVT_CALL(EnableGroup, MODEL_g72, TRUE) - EVT_EXEC_WAIT(N(EVS_OpenFrontDoor)) - EVT_WAIT(30) - EVT_EXEC_WAIT(N(EVS_CloseFrontDoor)) - EVT_CALL(EnableGroup, MODEL_g72, TRUE) - EVT_RETURN - EVT_END + Call(EnableGroup, MODEL_g72, TRUE) + ExecWait(N(EVS_OpenFrontDoor)) + Wait(30) + ExecWait(N(EVS_CloseFrontDoor)) + Call(EnableGroup, MODEL_g72, TRUE) + Return + End }; EvtScript N(EVS_Player_EnterPipe_Epilogue) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_SET(LVar0, 4) - EVT_CALL(N(Pipe_GetEntryPos_Epilogue)) - EVT_CALL(PlayerMoveTo, LVar1, LVar3, 3) - EVT_SET(LVar0, 4) - EVT_CALL(N(Pipe_GetEntryPos_Epilogue)) - EVT_CALL(SetPlayerPos, LVar1, LVar2, LVar3) - EVT_WAIT(2) - EVT_CALL(PlaySoundAtPlayer, SOUND_ENTER_PIPE, SOUND_SPACE_DEFAULT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_WAIT(4) - EVT_LOOP(40) - EVT_SUB(LVar1, 1) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetPlayerImgFXFlags, IMGFX_FLAG_800) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_VERTICAL_PIPE_CURL, 1, 1, 0) - EVT_WAIT(25) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(HidePlayerShadow, TRUE) + Set(LVar0, 4) + Call(N(Pipe_GetEntryPos_Epilogue)) + Call(PlayerMoveTo, LVar1, LVar3, 3) + Set(LVar0, 4) + Call(N(Pipe_GetEntryPos_Epilogue)) + Call(SetPlayerPos, LVar1, LVar2, LVar3) + Wait(2) + Call(PlaySoundAtPlayer, SOUND_ENTER_PIPE, SOUND_SPACE_DEFAULT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Thread + Wait(4) + Loop(40) + Sub(LVar1, 1) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + Call(SetPlayerImgFXFlags, IMGFX_FLAG_800) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_VERTICAL_PIPE_CURL, 1, 1, 0) + Wait(25) + Return + End }; EvtScript N(EVS_Luigi_EnterPipe_Epilogue) = { - EVT_CALL(SetNpcFlagBits, NPC_Luigi_1, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Luigi_1, NPC_FLAG_FLYING, TRUE) - EVT_CALL(EnableNpcShadow, NPC_Luigi_1, FALSE) - EVT_SET(LVar0, 4) - EVT_CALL(N(Pipe_GetEntryPos_Epilogue)) - EVT_CALL(NpcMoveTo, NPC_Luigi_1, LVar1, LVar3, 3) - EVT_SET(LVar0, 4) - EVT_CALL(N(Pipe_GetEntryPos_Epilogue)) - EVT_CALL(SetNpcPos, NPC_Luigi_1, LVar1, LVar2, LVar3) - EVT_WAIT(2) - EVT_CALL(PlaySoundAtNpc, NPC_Luigi_1, SOUND_ENTER_PIPE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Still) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Luigi_1, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 7) - EVT_CALL(SetNpcPos, NPC_Luigi_1, LVar0, LVar1, LVar2) - EVT_LOOP(40) - EVT_SUB(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_Luigi_1, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcImgFXFlags, NPC_Luigi_1, IMGFX_FLAG_800) - EVT_CALL(SetNpcImgFXParams, NPC_Luigi_1, IMGFX_SET_ANIM, IMGFX_ANIM_VERTICAL_PIPE_CURL, 1, 1, 0) - EVT_WAIT(25) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_Luigi_1, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_Luigi_1, NPC_FLAG_FLYING, TRUE) + Call(EnableNpcShadow, NPC_Luigi_1, FALSE) + Set(LVar0, 4) + Call(N(Pipe_GetEntryPos_Epilogue)) + Call(NpcMoveTo, NPC_Luigi_1, LVar1, LVar3, 3) + Set(LVar0, 4) + Call(N(Pipe_GetEntryPos_Epilogue)) + Call(SetNpcPos, NPC_Luigi_1, LVar1, LVar2, LVar3) + Wait(2) + Call(PlaySoundAtNpc, NPC_Luigi_1, SOUND_ENTER_PIPE, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Still) + Thread + Call(GetNpcPos, NPC_Luigi_1, LVar0, LVar1, LVar2) + Add(LVar1, 7) + Call(SetNpcPos, NPC_Luigi_1, LVar0, LVar1, LVar2) + Loop(40) + Sub(LVar1, 1) + Call(SetNpcPos, NPC_Luigi_1, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + Call(SetNpcImgFXFlags, NPC_Luigi_1, IMGFX_FLAG_800) + Call(SetNpcImgFXParams, NPC_Luigi_1, IMGFX_SET_ANIM, IMGFX_ANIM_VERTICAL_PIPE_CURL, 1, 1, 0) + Wait(25) + Return + End }; EvtScript N(EVS_Scene_BeginEpilogue) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(SetAmbienceVolumeHalf_Epilogue)) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SitIdle) - EVT_CALL(SetPlayerPos, 95, 44, -40) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 150, 44, -40) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 150, 44, -40) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(30) - EVT_CALL(SpeakToPlayer, NPC_Luigi_1, ANIM_Luigi_TalkSit, ANIM_Luigi_IdleSit, 0, MSG_Outro_000D) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SitNodYes) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_Luigi_1, ANIM_Luigi_TalkSit, ANIM_Luigi_IdleSit, 0, MSG_Outro_000E) - EVT_WAIT(30) - EVT_CALL(GotoMap, EVT_PTR("kmr_02"), kmr_02_ENTRY_4) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(N(SetAmbienceVolumeHalf_Epilogue)) + Call(SetPlayerAnimation, ANIM_MarioW2_SitIdle) + Call(SetPlayerPos, 95, 44, -40) + Call(UseSettingsFrom, CAM_DEFAULT, 150, 44, -40) + Call(SetPanTarget, CAM_DEFAULT, 150, 44, -40) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-6.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(30) + Call(SpeakToPlayer, NPC_Luigi_1, ANIM_Luigi_TalkSit, ANIM_Luigi_IdleSit, 0, MSG_Outro_000D) + Call(SetPlayerAnimation, ANIM_MarioW2_SitNodYes) + Wait(20) + Call(SpeakToPlayer, NPC_Luigi_1, ANIM_Luigi_TalkSit, ANIM_Luigi_IdleSit, 0, MSG_Outro_000E) + Wait(30) + Call(GotoMap, Ref("kmr_02"), kmr_02_ENTRY_4) + Wait(100) + Return + End }; EvtScript N(EVS_Scene_EpilogueGetLetter) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(SetAmbienceVolumeHalf_Epilogue)) - EVT_CALL(SetPlayerPos, 95, 44, -40) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SitIdle) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 150, 44, -40) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 150, 44, -40) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(35) - EVT_CALL(PlaySoundAt, SOUNC_CHECK_MAILBOX, SOUND_SPACE_DEFAULT, 430, 0, -185) - EVT_WAIT(25) - EVT_CALL(PlaySoundAtPlayer, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, 0, EMOTE_QUESTION, 0, 20, EMOTER_PLAYER, 0, 0, 0, 0) - EVT_CALL(PlaySoundAtNpc, NPC_Luigi_1, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_Luigi_1, EMOTE_QUESTION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(30) - EVT_CALL(SpeakToPlayer, NPC_Luigi_1, ANIM_Luigi_TalkSit, ANIM_Luigi_IdleSit, 0, MSG_Outro_0021) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Luigi_1, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_Luigi_1, 180, 30, -20, 10) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Jump) - EVT_CALL(PlaySoundAtNpc, NPC_Luigi_1, SOUND_QUICK_PLAYER_JUMP, SOUND_SPACE_DEFAULT) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Fall) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Land) - EVT_CALL(PlaySoundAtNpc, NPC_Luigi_1, SOUND_LAND_SOFTLY, SOUND_SPACE_DEFAULT) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Walk) - EVT_EXEC_GET_TID(N(EVS_Luigi_PlayWalkSounds_Epilogue), LVarA) - EVT_CALL(NpcMoveTo, NPC_Luigi_1, 240, -20, 30) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_WalkBack) - EVT_CALL(NpcMoveTo, NPC_Luigi_1, 240, -80, 30) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Idle) - EVT_KILL_THREAD(LVarA) - EVT_WAIT(10) - EVT_EXEC(N(EVS_OpenFrontDoor)) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Walk) - EVT_EXEC_GET_TID(N(EVS_Luigi_PlayWalkSounds_Epilogue), LVarA) - EVT_CALL(NpcMoveTo, NPC_Luigi_1, 300, -80, 30) - EVT_EXEC_WAIT(N(EVS_CloseFrontDoor)) - EVT_KILL_THREAD(LVarA) - EVT_WAIT(90) - EVT_CALL(SetNpcYaw, NPC_Luigi_1, 270) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_WalkLetter) - EVT_EXEC_GET_TID(N(EVS_Luigi_PlayWalkSounds_Epilogue), LVarA) - EVT_EXEC(N(EVS_OpenFrontDoor)) - EVT_CALL(NpcMoveTo, NPC_Luigi_1, 240, -80, 30) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_IdleLetter) - EVT_KILL_THREAD(LVarA) - EVT_EXEC_WAIT(N(EVS_CloseFrontDoor)) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Luigi_1, ANIM_Luigi_TalkLetter, ANIM_Luigi_IdleLetter, 0, MSG_Outro_0022) - EVT_WAIT(30) - EVT_CALL(N(func_80242084_8EDEA4)) - EVT_CALL(EnableGroup, MODEL_g20, FALSE) - EVT_CALL(EnableGroup, MODEL_g21, FALSE) - EVT_CALL(EnableGroup, MODEL_g49, FALSE) - EVT_CALL(EnableModel, MODEL_g56, FALSE) - EVT_CALL(N(func_80242030_8EDE50)) - EVT_CALL(RotateGroup, MODEL_g60, 0, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_g34, 0, -1, 0, 0) - EVT_CALL(EnableGroup, MODEL_g60, TRUE) - EVT_CALL(EnableGroup, MODEL_g34, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 340, 30, -70) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 340, 30, -70) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetPlayerPos, 240, 30, -75) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Idle) - EVT_CALL(SetNpcPos, NPC_Luigi_1, 200, 30, -75) - EVT_WAIT(30) - EVT_CALL(N(func_802420EC_8EDF0C)) - EVT_CALL(N(SetAmbienceVolumeFull_Epilogue)) - EVT_WAIT(30) - EVT_CALL(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 0, 8) - EVT_EXEC(N(EVS_OpenAndCloseDoor_Epilogue)) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetNpcSpeed, NPC_Luigi_1, EVT_FLOAT(3.0)) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Run) - EVT_EXEC_GET_TID(N(EVS_Luigi_PlayWalkSounds_Epilogue), LVarA) - EVT_CALL(NpcMoveTo, NPC_Luigi_1, 320, -70, 0) - EVT_CALL(NpcMoveTo, NPC_Luigi_1, 460, -70, 0) - EVT_CALL(NpcMoveTo, NPC_Luigi_1, 570, -170, 0) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Idle) - EVT_KILL_THREAD(LVarA) - EVT_END_THREAD - EVT_CALL(func_802D1270, 320, -70, EVT_FLOAT(3.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(func_802D1270, 460, -70, EVT_FLOAT(3.0)) - EVT_CALL(func_802D1270, 570, -170, EVT_FLOAT(3.0)) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(PlayerJump, 594, 30, -216, 15) - EVT_EXEC_WAIT(N(EVS_Player_EnterPipe_Epilogue)) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_JumpStance) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Jump) - EVT_CALL(PlaySoundAtNpc, NPC_Luigi_1, SOUND_QUICK_PLAYER_JUMP, SOUND_SPACE_DEFAULT) - EVT_WAIT(7) - EVT_WAIT(7) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Idle) - EVT_CALL(PlaySoundAtNpc, NPC_Luigi_1, SOUND_LAND_SOFTLY, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Luigi_1, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_Luigi_1, 594, 30, -216, 15) - EVT_EXEC_WAIT(N(EVS_Luigi_EnterPipe_Epilogue)) - EVT_EXEC(N(EVS_FadeOutAmbientSounds)) - EVT_CALL(GotoMap, EVT_PTR("mac_00"), mac_00_ENTRY_7) - EVT_WAIT(100) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(N(SetAmbienceVolumeHalf_Epilogue)) + Call(SetPlayerPos, 95, 44, -40) + Call(SetPlayerAnimation, ANIM_MarioW2_SitIdle) + Call(UseSettingsFrom, CAM_DEFAULT, 150, 44, -40) + Call(SetPanTarget, CAM_DEFAULT, 150, 44, -40) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-6.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(35) + Call(PlaySoundAt, SOUNC_CHECK_MAILBOX, SOUND_SPACE_DEFAULT, 430, 0, -185) + Wait(25) + Call(PlaySoundAtPlayer, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) + Call(ShowEmote, 0, EMOTE_QUESTION, 0, 20, EMOTER_PLAYER, 0, 0, 0, 0) + Call(PlaySoundAtNpc, NPC_Luigi_1, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_Luigi_1, EMOTE_QUESTION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) + Wait(30) + Call(SpeakToPlayer, NPC_Luigi_1, ANIM_Luigi_TalkSit, ANIM_Luigi_IdleSit, 0, MSG_Outro_0021) + Wait(10) + Thread + Call(SetNpcJumpscale, NPC_Luigi_1, Float(1.0)) + Call(NpcJump0, NPC_Luigi_1, 180, 30, -20, 10) + EndThread + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Jump) + Call(PlaySoundAtNpc, NPC_Luigi_1, SOUND_QUICK_PLAYER_JUMP, SOUND_SPACE_DEFAULT) + Wait(5) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Fall) + Wait(5) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Land) + Call(PlaySoundAtNpc, NPC_Luigi_1, SOUND_LAND_SOFTLY, SOUND_SPACE_DEFAULT) + Wait(10) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Walk) + ExecGetTID(N(EVS_Luigi_PlayWalkSounds_Epilogue), LVarA) + Call(NpcMoveTo, NPC_Luigi_1, 240, -20, 30) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_WalkBack) + Call(NpcMoveTo, NPC_Luigi_1, 240, -80, 30) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Idle) + KillThread(LVarA) + Wait(10) + Exec(N(EVS_OpenFrontDoor)) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Walk) + ExecGetTID(N(EVS_Luigi_PlayWalkSounds_Epilogue), LVarA) + Call(NpcMoveTo, NPC_Luigi_1, 300, -80, 30) + ExecWait(N(EVS_CloseFrontDoor)) + KillThread(LVarA) + Wait(90) + Call(SetNpcYaw, NPC_Luigi_1, 270) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_WalkLetter) + ExecGetTID(N(EVS_Luigi_PlayWalkSounds_Epilogue), LVarA) + Exec(N(EVS_OpenFrontDoor)) + Call(NpcMoveTo, NPC_Luigi_1, 240, -80, 30) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_IdleLetter) + KillThread(LVarA) + ExecWait(N(EVS_CloseFrontDoor)) + Wait(10) + Call(SpeakToPlayer, NPC_Luigi_1, ANIM_Luigi_TalkLetter, ANIM_Luigi_IdleLetter, 0, MSG_Outro_0022) + Wait(30) + Call(N(func_80242084_8EDEA4)) + Call(EnableGroup, MODEL_g20, FALSE) + Call(EnableGroup, MODEL_g21, FALSE) + Call(EnableGroup, MODEL_g49, FALSE) + Call(EnableModel, MODEL_g56, FALSE) + Call(N(func_80242030_8EDE50)) + Call(RotateGroup, MODEL_g60, 0, 1, 0, 0) + Call(RotateGroup, MODEL_g34, 0, -1, 0, 0) + Call(EnableGroup, MODEL_g60, TRUE) + Call(EnableGroup, MODEL_g34, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, 340, 30, -70) + Call(SetPanTarget, CAM_DEFAULT, 340, 30, -70) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetPlayerPos, 240, 30, -75) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Idle) + Call(SetNpcPos, NPC_Luigi_1, 200, 30, -75) + Wait(30) + Call(N(func_802420EC_8EDF0C)) + Call(N(SetAmbienceVolumeFull_Epilogue)) + Wait(30) + Call(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 0, 8) + Exec(N(EVS_OpenAndCloseDoor_Epilogue)) + Thread + Wait(10) + Call(SetNpcSpeed, NPC_Luigi_1, Float(3.0)) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Run) + ExecGetTID(N(EVS_Luigi_PlayWalkSounds_Epilogue), LVarA) + Call(NpcMoveTo, NPC_Luigi_1, 320, -70, 0) + Call(NpcMoveTo, NPC_Luigi_1, 460, -70, 0) + Call(NpcMoveTo, NPC_Luigi_1, 570, -170, 0) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Idle) + KillThread(LVarA) + EndThread + Call(func_802D1270, 320, -70, Float(3.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(func_802D1270, 460, -70, Float(3.0)) + Call(func_802D1270, 570, -170, Float(3.0)) + Call(SetPlayerJumpscale, Float(1.0)) + Call(PlayerJump, 594, 30, -216, 15) + ExecWait(N(EVS_Player_EnterPipe_Epilogue)) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_JumpStance) + Wait(10) + Thread + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Jump) + Call(PlaySoundAtNpc, NPC_Luigi_1, SOUND_QUICK_PLAYER_JUMP, SOUND_SPACE_DEFAULT) + Wait(7) + Wait(7) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Idle) + Call(PlaySoundAtNpc, NPC_Luigi_1, SOUND_LAND_SOFTLY, SOUND_SPACE_DEFAULT) + EndThread + Call(SetNpcJumpscale, NPC_Luigi_1, Float(1.0)) + Call(NpcJump0, NPC_Luigi_1, 594, 30, -216, 15) + ExecWait(N(EVS_Luigi_EnterPipe_Epilogue)) + Exec(N(EVS_FadeOutAmbientSounds)) + Call(GotoMap, Ref("mac_00"), mac_00_ENTRY_7) + Wait(100) + Call(DisablePlayerInput, FALSE) + Return + End }; MAP_RODATA_PAD(1,unk); diff --git a/src/world/area_kmr/kmr_20/kmr_20_13_records.c b/src/world/area_kmr/kmr_20/kmr_20_13_records.c index f4a3c16c087..38b349044fb 100644 --- a/src/world/area_kmr/kmr_20/kmr_20_13_records.c +++ b/src/world/area_kmr/kmr_20/kmr_20_13_records.c @@ -241,23 +241,23 @@ API_CALLABLE(N(ShowGameRecords)) { } EvtScript N(EVS_Inspect_Records) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(GetPlayerPos, LVarA, LVarB, LVarC) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVarA, 30, LVarC) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVarA, 30, LVarC) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(320.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.2)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(N(ShowGameRecords)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.2)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(GetPlayerPos, LVarA, LVarB, LVarC) + Call(UseSettingsFrom, CAM_DEFAULT, LVarA, 30, LVarC) + Call(SetPanTarget, CAM_DEFAULT, LVarA, 30, LVarC) + Call(SetCamDistance, CAM_DEFAULT, Float(320.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.2)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(N(ShowGameRecords)) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.2)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Call(DisablePlayerPhysics, FALSE) + Return + End }; diff --git a/src/world/area_kmr/kmr_20/kmr_20_1_music.c b/src/world/area_kmr/kmr_20/kmr_20_1_music.c index be3a0acb511..7c3e0036d23 100644 --- a/src/world/area_kmr/kmr_20/kmr_20_1_music.c +++ b/src/world/area_kmr/kmr_20/kmr_20_1_music.c @@ -6,38 +6,38 @@ API_CALLABLE(N(FadeOutAmbientSounds)){ } EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_INTRO) - EVT_CALL(FadeOutMusic, 0, 500) - EVT_END_CASE_GROUP - EVT_CASE_GE(STORY_EPILOGUE) - EVT_CALL(FadeOutMusic, 0, 500) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_MARIO_BROS_HOUSE, 0, 8) - EVT_END_SWITCH - EVT_THREAD - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kmr_20_ENTRY_0) - EVT_WAIT(300) - EVT_CALL(PlayAmbientSounds, AMBIENT_BIRDS) - EVT_CASE_DEFAULT - EVT_CALL(PlayAmbientSounds, AMBIENT_BIRDS) - EVT_END_SWITCH - EVT_END_THREAD - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseEq(STORY_INTRO) + Call(FadeOutMusic, 0, 500) + EndCaseGroup + CaseGe(STORY_EPILOGUE) + Call(FadeOutMusic, 0, 500) + EndCaseGroup + CaseDefault + Call(SetMusicTrack, 0, SONG_MARIO_BROS_HOUSE, 0, 8) + EndSwitch + Thread + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kmr_20_ENTRY_0) + Wait(300) + Call(PlayAmbientSounds, AMBIENT_BIRDS) + CaseDefault + Call(PlayAmbientSounds, AMBIENT_BIRDS) + EndSwitch + EndThread + Return + End }; EvtScript N(EVS_PlayRestingSong) = { - EVT_CALL(SetMusicTrack, 0, SONG_TAKING_REST, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TAKING_REST, 0, 8) + Return + End }; EvtScript N(EVS_FadeOutAmbientSounds) = { - EVT_CALL(N(FadeOutAmbientSounds)) - EVT_RETURN - EVT_END + Call(N(FadeOutAmbientSounds)) + Return + End }; diff --git a/src/world/area_kmr/kmr_20/kmr_20_2_main.c b/src/world/area_kmr/kmr_20/kmr_20_2_main.c index 19bb3653889..9c1afec5e5d 100644 --- a/src/world/area_kmr/kmr_20/kmr_20_2_main.c +++ b/src/world/area_kmr/kmr_20/kmr_20_2_main.c @@ -8,98 +8,98 @@ API_CALLABLE(N(func_80240310_8EC130)){ } EvtScript N(EVS_GotoMap_mac_00_4) = { - EVT_EXEC(N(EVS_FadeOutAmbientSounds)) - EVT_CALL(GotoMap, EVT_PTR("mac_00"), mac_00_ENTRY_4) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Exec(N(EVS_FadeOutAmbientSounds)) + Call(GotoMap, Ref("mac_00"), mac_00_ENTRY_4) + Wait(100) + Return + End }; EvtScript N(EVS_ExitPipe_mac_00_4) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_SET(LVarA, kmr_20_ENTRY_4) - EVT_SET(LVarB, COLLIDER_o244) - EVT_SET(LVarC, EVT_PTR(N(EVS_GotoMap_mac_00_4))) - EVT_EXEC_WAIT(N(EVS_Pipe_ExitVertical)) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Set(LVarA, kmr_20_ENTRY_4) + Set(LVarB, COLLIDER_o244) + Set(LVarC, Ref(N(EVS_GotoMap_mac_00_4))) + ExecWait(N(EVS_Pipe_ExitVertical)) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitPipe_mac_00_4)), TRIGGER_FLOOR_TOUCH, COLLIDER_o244, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitPipe_mac_00_4)), TRIGGER_FLOOR_TOUCH, COLLIDER_o244, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MARIOS_HOUSE) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kmr_20_ENTRY_2) - EVT_SET(GB_StoryProgress, STORY_EPILOGUE) - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kmr_20_ENTRY_4) - EVT_SET(MF_LuigiWaiting, FALSE) - EVT_IF_EQ(GF_KMR20_ReunitedWithLuigi, FALSE) - EVT_SET(GF_KMR20_ReunitedWithLuigi, TRUE) - EVT_IF_LT(GB_StoryProgress, STORY_CH3_INVITED_TO_BOOS_MANSION) - EVT_SET(MF_LuigiWaiting, TRUE) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_SET(MF_Unk_0C, FALSE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_LT(LVar0, kmr_20_ENTRY_4) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(SceneNPCs))) - EVT_ELSE - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(EnableGroup, MODEL_g100, FALSE) - EVT_EXEC(N(EVS_SetupTrees)) - EVT_EXEC(N(EVS_SetupBushes)) - EVT_EXEC(N(EVS_SetupRooms)) - EVT_EXEC(N(EVS_Setup_Interactables)) - EVT_IF_LT(GB_StoryProgress, STORY_EPILOGUE) - EVT_EXEC(N(EVS_SetupBed)) - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kmr_20_ENTRY_0) - EVT_CALL(N(func_80240310_8EC130)) - EVT_EXEC(N(EVS_Scene_BeginGame)) - EVT_WAIT(5) - EVT_CASE_EQ(kmr_20_ENTRY_1) - EVT_EXEC(N(EVS_Scene_SettingOff)) - EVT_CASE_EQ(kmr_20_ENTRY_2) - EVT_WAIT(60) - EVT_EXEC(N(EVS_Scene_BeginEpilogue)) - EVT_CASE_EQ(kmr_20_ENTRY_3) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_EXEC(N(EVS_Scene_EpilogueGetLetter)) - EVT_CASE_EQ(kmr_20_ENTRY_4) - EVT_SET(GF_MAP_MariosHouse, TRUE) - EVT_IF_EQ(MF_LuigiWaiting, TRUE) - EVT_EXEC(N(EVS_Scene_LuigiWaitingAround)) - EVT_THREAD - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerPos, NPC_DISPOSE_LOCATION) - EVT_LABEL(0) - EVT_IF_EQ(MF_ReadyForPlayerEntry, FALSE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_SET(LVarA, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(N(EVS_Pipe_EnterVertical)) - EVT_END_THREAD - EVT_ELSE - EVT_SET(LVarA, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(N(EVS_Pipe_EnterVertical)) - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MARIOS_HOUSE) + Call(GetEntryID, LVar0) + IfEq(LVar0, kmr_20_ENTRY_2) + Set(GB_StoryProgress, STORY_EPILOGUE) + EndIf + Call(GetEntryID, LVar0) + IfEq(LVar0, kmr_20_ENTRY_4) + Set(MF_LuigiWaiting, FALSE) + IfEq(GF_KMR20_ReunitedWithLuigi, FALSE) + Set(GF_KMR20_ReunitedWithLuigi, TRUE) + IfLt(GB_StoryProgress, STORY_CH3_INVITED_TO_BOOS_MANSION) + Set(MF_LuigiWaiting, TRUE) + EndIf + EndIf + EndIf + Set(MF_Unk_0C, FALSE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Exec(N(EVS_SetupMusic)) + Call(GetEntryID, LVar0) + IfLt(LVar0, kmr_20_ENTRY_4) + Call(MakeNpcs, FALSE, Ref(N(SceneNPCs))) + Else + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + EndIf + ExecWait(N(EVS_MakeEntities)) + Call(EnableGroup, MODEL_g100, FALSE) + Exec(N(EVS_SetupTrees)) + Exec(N(EVS_SetupBushes)) + Exec(N(EVS_SetupRooms)) + Exec(N(EVS_Setup_Interactables)) + IfLt(GB_StoryProgress, STORY_EPILOGUE) + Exec(N(EVS_SetupBed)) + EndIf + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kmr_20_ENTRY_0) + Call(N(func_80240310_8EC130)) + Exec(N(EVS_Scene_BeginGame)) + Wait(5) + CaseEq(kmr_20_ENTRY_1) + Exec(N(EVS_Scene_SettingOff)) + CaseEq(kmr_20_ENTRY_2) + Wait(60) + Exec(N(EVS_Scene_BeginEpilogue)) + CaseEq(kmr_20_ENTRY_3) + Exec(N(EVS_BindExitTriggers)) + Exec(N(EVS_Scene_EpilogueGetLetter)) + CaseEq(kmr_20_ENTRY_4) + Set(GF_MAP_MariosHouse, TRUE) + IfEq(MF_LuigiWaiting, TRUE) + Exec(N(EVS_Scene_LuigiWaitingAround)) + Thread + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerPos, NPC_DISPOSE_LOCATION) + Label(0) + IfEq(MF_ReadyForPlayerEntry, FALSE) + Wait(1) + Goto(0) + EndIf + Set(LVarA, Ref(N(EVS_BindExitTriggers))) + Exec(N(EVS_Pipe_EnterVertical)) + EndThread + Else + Set(LVarA, Ref(N(EVS_BindExitTriggers))) + Exec(N(EVS_Pipe_EnterVertical)) + EndIf + EndSwitch + Return + End }; diff --git a/src/world/area_kmr/kmr_20/kmr_20_3_rooms.c b/src/world/area_kmr/kmr_20/kmr_20_3_rooms.c index cf59e0ecae9..d5b275c69e3 100644 --- a/src/world/area_kmr/kmr_20/kmr_20_3_rooms.c +++ b/src/world/area_kmr/kmr_20/kmr_20_3_rooms.c @@ -11,56 +11,56 @@ API_CALLABLE(N(SetAmbienceVolumeFull_Rooms)){ } EvtScript N(EVS_SetDoorRot_House) = { - EVT_CALL(RotateGroup, MODEL_g14, LVar0, 0, 1, 0) - EVT_RETURN - EVT_END + Call(RotateGroup, MODEL_g14, LVar0, 0, 1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_House) = { - EVT_CALL(RotateGroup, MODEL_g60, LVar0, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_g34, LVar0, -1, 0, 0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(90) - EVT_SET(MF_Unk_0C, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Luigi_0, NPC_FLAG_INVISIBLE, FALSE) - EVT_CALL(EnableGroup, MODEL_g60, FALSE) - EVT_CALL(EnableGroup, MODEL_g34, FALSE) - EVT_CASE_EQ(0) - EVT_IF_EQ(MF_Unk_0C, TRUE) - EVT_CALL(EnableGroup, MODEL_g72, TRUE) - EVT_SET(MF_Unk_0C, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Luigi_0, NPC_FLAG_INVISIBLE, TRUE) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(EnableGroup, MODEL_g60, TRUE) - EVT_CALL(EnableGroup, MODEL_g34, TRUE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(RotateGroup, MODEL_g60, LVar0, 1, 0, 0) + Call(RotateGroup, MODEL_g34, LVar0, -1, 0, 0) + Switch(LVar0) + CaseEq(90) + Set(MF_Unk_0C, TRUE) + Call(SetNpcFlagBits, NPC_Luigi_0, NPC_FLAG_INVISIBLE, FALSE) + Call(EnableGroup, MODEL_g60, FALSE) + Call(EnableGroup, MODEL_g34, FALSE) + CaseEq(0) + IfEq(MF_Unk_0C, TRUE) + Call(EnableGroup, MODEL_g72, TRUE) + Set(MF_Unk_0C, FALSE) + Call(SetNpcFlagBits, NPC_Luigi_0, NPC_FLAG_INVISIBLE, TRUE) + EndIf + CaseDefault + Call(EnableGroup, MODEL_g60, TRUE) + Call(EnableGroup, MODEL_g34, TRUE) + EndSwitch + Return + End }; EvtScript N(EVS_RoomListener_House) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_CALL(N(SetAmbienceVolumeHalf_Rooms)) - EVT_CALL(EnableGroup, MODEL_g20, TRUE) - EVT_CALL(EnableGroup, MODEL_g21, TRUE) - EVT_CALL(EnableGroup, MODEL_g49, TRUE) - EVT_CALL(EnableModel, MODEL_g56, TRUE) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_DONE) + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Call(N(SetAmbienceVolumeHalf_Rooms)) + Call(EnableGroup, MODEL_g20, TRUE) + Call(EnableGroup, MODEL_g21, TRUE) + Call(EnableGroup, MODEL_g49, TRUE) + Call(EnableModel, MODEL_g56, TRUE) + CaseEq(ROOM_UPDATE_ENTER_DONE) // do nothing - EVT_CASE_EQ(ROOM_UPDATE_EXIT_BEGIN) + CaseEq(ROOM_UPDATE_EXIT_BEGIN) // do nothing - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_CALL(N(SetAmbienceVolumeFull_Rooms)) - EVT_CALL(EnableGroup, MODEL_g20, FALSE) - EVT_CALL(EnableGroup, MODEL_g21, FALSE) - EVT_CALL(EnableGroup, MODEL_g49, FALSE) - EVT_CALL(EnableModel, MODEL_g56, FALSE) - EVT_CALL(EnableGroup, MODEL_g72, FALSE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + CaseEq(ROOM_UPDATE_EXIT_END) + Call(N(SetAmbienceVolumeFull_Rooms)) + Call(EnableGroup, MODEL_g20, FALSE) + Call(EnableGroup, MODEL_g21, FALSE) + Call(EnableGroup, MODEL_g49, FALSE) + Call(EnableModel, MODEL_g56, FALSE) + Call(EnableGroup, MODEL_g72, FALSE) + EndSwitch + Return + End }; s32 N(InteriorNPCs_House)[] = { @@ -69,36 +69,36 @@ s32 N(InteriorNPCs_House)[] = { }; EvtScript N(EVS_SetupRooms) = { - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_RIGHT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_House)), - EVT_PTR(N(EVS_SetWallRot_House)), + Ref(N(EVS_SetDoorRot_House)), + Ref(N(EVS_SetWallRot_House)), NULL, - EVT_PTR(N(EVS_RoomListener_House)), + Ref(N(EVS_RoomListener_House)), COLLIDER_o246, COLLIDER_o245, MODEL_g62, - EVT_PTR(N(InteriorNPCs_House))) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(kmr_20_ENTRY_2) - EVT_CASE_OR_EQ(kmr_20_ENTRY_3) - EVT_CALL(EnableGroup, MODEL_g20, TRUE) - EVT_CALL(EnableGroup, MODEL_g21, TRUE) - EVT_CALL(EnableGroup, MODEL_g49, TRUE) - EVT_CALL(EnableModel, MODEL_g56, TRUE) - EVT_CALL(EnableGroup, MODEL_g72, FALSE) - EVT_CALL(N(func_80241C9C_8EDABC)) - EVT_CALL(RotateGroup, MODEL_g60, 90, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_g34, 90, -1, 0, 0) - EVT_CALL(EnableGroup, MODEL_g60, FALSE) - EVT_CALL(EnableGroup, MODEL_g34, FALSE) - EVT_CALL(N(SetAmbienceVolumeHalf_Rooms)) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SET(LVar0, ROOM_UPDATE_EXIT_END) - EVT_EXEC(N(EVS_RoomListener_House)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Ref(N(InteriorNPCs_House))) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseOrEq(kmr_20_ENTRY_2) + CaseOrEq(kmr_20_ENTRY_3) + Call(EnableGroup, MODEL_g20, TRUE) + Call(EnableGroup, MODEL_g21, TRUE) + Call(EnableGroup, MODEL_g49, TRUE) + Call(EnableModel, MODEL_g56, TRUE) + Call(EnableGroup, MODEL_g72, FALSE) + Call(N(func_80241C9C_8EDABC)) + Call(RotateGroup, MODEL_g60, 90, 1, 0, 0) + Call(RotateGroup, MODEL_g34, 90, -1, 0, 0) + Call(EnableGroup, MODEL_g60, FALSE) + Call(EnableGroup, MODEL_g34, FALSE) + Call(N(SetAmbienceVolumeHalf_Rooms)) + EndCaseGroup + CaseDefault + Set(LVar0, ROOM_UPDATE_EXIT_END) + Exec(N(EVS_RoomListener_House)) + EndSwitch + Return + End }; diff --git a/src/world/area_kmr/kmr_20/kmr_20_4_documents.c b/src/world/area_kmr/kmr_20/kmr_20_4_documents.c index a20809220ea..4299604e424 100644 --- a/src/world/area_kmr/kmr_20/kmr_20_4_documents.c +++ b/src/world/area_kmr/kmr_20/kmr_20_4_documents.c @@ -267,35 +267,35 @@ API_CALLABLE(N(CleanupLetters)){ } EvtScript N(EVS_Inspect_Letters) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_LT(GB_StoryProgress, STORY_CH0_TWINK_GAVE_LUCKY_STAR) - EVT_SET(GF_KMR20_CheckedDeskForMail, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH0_0102, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_ELSE - EVT_IF_EQ(GF_KMR20_CheckedDeskForMail, FALSE) - EVT_SET(GF_KMR20_CheckedDeskForMail, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH0_0101, 160, 40) - EVT_WAIT(5) - EVT_END_IF - EVT_END_IF - EVT_CALL(N(InitLetters)) - EVT_LABEL(0) - EVT_CALL(N(ReadLetters)) - EVT_IF_EQ(LVar0, -1) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(ShowMessageAtScreenPos, LVar0, 160, 40) - EVT_CALL(N(CleanupLetters)) - EVT_GOTO(0) - EVT_LABEL(10) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + IfLt(GB_StoryProgress, STORY_CH0_TWINK_GAVE_LUCKY_STAR) + Set(GF_KMR20_CheckedDeskForMail, TRUE) + Call(ShowMessageAtScreenPos, MSG_CH0_0102, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + Else + IfEq(GF_KMR20_CheckedDeskForMail, FALSE) + Set(GF_KMR20_CheckedDeskForMail, TRUE) + Call(ShowMessageAtScreenPos, MSG_CH0_0101, 160, 40) + Wait(5) + EndIf + EndIf + Call(N(InitLetters)) + Label(0) + Call(N(ReadLetters)) + IfEq(LVar0, -1) + Goto(10) + EndIf + IfEq(LVar0, 0) + Goto(10) + EndIf + Call(ShowMessageAtScreenPos, LVar0, 160, 40) + Call(N(CleanupLetters)) + Goto(0) + Label(10) + Call(DisablePlayerInput, FALSE) + Return + End }; s32 N(DiaryStoryRequirements)[] = { @@ -413,125 +413,125 @@ API_CALLABLE(N(MuteAmbienceVolume_Documents)){ } EvtScript N(EVS_Inspect_LuigisDiary) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_IF_EQ(AF_KMR_0C, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH0_00EC, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(GF_KMR20_FoundLuigisDiary, FALSE) - EVT_SET(GF_KMR20_FoundLuigisDiary, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH0_0100, 160, 40) - EVT_WAIT(5) - EVT_END_IF - EVT_CALL(N(InitDiary)) - EVT_LABEL(0) - EVT_CALL(N(ReadDiary)) - EVT_IF_EQ(LVar0, -1) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(ShowMessageAtScreenPos, LVar0, 160, 40) - EVT_GOTO(0) - EVT_LABEL(10) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + IfLt(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED) + IfEq(AF_KMR_0C, TRUE) + Call(ShowMessageAtScreenPos, MSG_CH0_00EC, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + EndIf + EndIf + IfEq(GF_KMR20_FoundLuigisDiary, FALSE) + Set(GF_KMR20_FoundLuigisDiary, TRUE) + Call(ShowMessageAtScreenPos, MSG_CH0_0100, 160, 40) + Wait(5) + EndIf + Call(N(InitDiary)) + Label(0) + Call(N(ReadDiary)) + IfEq(LVar0, -1) + Goto(10) + EndIf + IfEq(LVar0, 0) + Goto(10) + EndIf + Call(ShowMessageAtScreenPos, LVar0, 160, 40) + Goto(0) + Label(10) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Shake_Mailbox) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_o305, SOUNC_CHECK_MAILBOX, SOUND_SPACE_DEFAULT) - EVT_CALL(TranslateModel, MODEL_o222, 2, 0, 0) - EVT_CALL(TranslateModel, MODEL_o223, 3, 0, 0) - EVT_CALL(TranslateModel, MODEL_o224, 1, 0, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o222, -3, 0, 0) - EVT_CALL(TranslateModel, MODEL_o223, -3, 0, 0) - EVT_CALL(TranslateModel, MODEL_o224, -2, 0, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o222, 2, 0, 0) - EVT_CALL(TranslateModel, MODEL_o223, 3, 0, 0) - EVT_CALL(TranslateModel, MODEL_o224, 1, 0, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o222, -2, 0, 0) - EVT_CALL(TranslateModel, MODEL_o223, -3, 0, 0) - EVT_CALL(TranslateModel, MODEL_o224, -1, 0, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o222, 0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o223, 0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o224, 0, 0, 0) - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_o305, SOUNC_CHECK_MAILBOX, SOUND_SPACE_DEFAULT) + Call(TranslateModel, MODEL_o222, 2, 0, 0) + Call(TranslateModel, MODEL_o223, 3, 0, 0) + Call(TranslateModel, MODEL_o224, 1, 0, 0) + Wait(1) + Call(TranslateModel, MODEL_o222, -3, 0, 0) + Call(TranslateModel, MODEL_o223, -3, 0, 0) + Call(TranslateModel, MODEL_o224, -2, 0, 0) + Wait(1) + Call(TranslateModel, MODEL_o222, 2, 0, 0) + Call(TranslateModel, MODEL_o223, 3, 0, 0) + Call(TranslateModel, MODEL_o224, 1, 0, 0) + Wait(1) + Call(TranslateModel, MODEL_o222, -2, 0, 0) + Call(TranslateModel, MODEL_o223, -3, 0, 0) + Call(TranslateModel, MODEL_o224, -1, 0, 0) + Wait(1) + Call(TranslateModel, MODEL_o222, 0, 0, 0) + Call(TranslateModel, MODEL_o223, 0, 0, 0) + Call(TranslateModel, MODEL_o224, 0, 0, 0) + Return + End }; EvtScript N(EVS_SecretPanel_Flip) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o252, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o252, SOUND_FLIP_PANEL, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 2160, 60, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g61, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_o252, SOUND_CLOSE_PANEL, SOUND_SPACE_DEFAULT) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o252, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o252, COLLIDER_FLAGS_UPPER_MASK) + Call(PlaySoundAtCollider, COLLIDER_o252, SOUND_FLIP_PANEL, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 2160, 60, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g61, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_o252, SOUND_CLOSE_PANEL, SOUND_SPACE_DEFAULT) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o252, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_Setup_SecretPanel) = { - EVT_CALL(GetPlayerActionState, LVar0) - EVT_IF_NE(LVar0, ACTION_STATE_SPIN_POUND) - EVT_IF_NE(LVar0, ACTION_STATE_TORNADO_POUND) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(MuteAmbienceVolume_Documents)) - EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_IF_EQ(AF_KMR_0C, TRUE) - EVT_CALL(EnableModel, MODEL_o200, FALSE) - EVT_END_IF - EVT_END_IF - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerActionState, LVar0) - EVT_IF_EQ(LVar0, ACTION_STATE_IDLE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_SecretPanel_Flip)) - EVT_WAIT(1) - EVT_CALL(SetPlayerPos, -150, 30, -35) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerActionState, LVar0) - EVT_IF_EQ(LVar0, ACTION_STATE_IDLE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, FALSE) - EVT_IF_EQ(MF_LuigiInBasement, TRUE) - EVT_SET(MF_LuigiInBasement, FALSE) - EVT_EXEC(N(EVS_Scene_CaughtLuigiInBasement)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetPlayerActionState, LVar0) + IfNe(LVar0, ACTION_STATE_SPIN_POUND) + IfNe(LVar0, ACTION_STATE_TORNADO_POUND) + Return + EndIf + EndIf + Call(DisablePlayerInput, TRUE) + Call(N(MuteAmbienceVolume_Documents)) + IfLt(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED) + IfEq(AF_KMR_0C, TRUE) + Call(EnableModel, MODEL_o200, FALSE) + EndIf + EndIf + Loop(0) + Wait(1) + Call(GetPlayerActionState, LVar0) + IfEq(LVar0, ACTION_STATE_IDLE) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_SecretPanel_Flip)) + Wait(1) + Call(SetPlayerPos, -150, 30, -35) + Loop(0) + Wait(1) + Call(GetPlayerActionState, LVar0) + IfEq(LVar0, ACTION_STATE_IDLE) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, FALSE) + IfEq(MF_LuigiInBasement, TRUE) + Set(MF_LuigiInBasement, FALSE) + Exec(N(EVS_Scene_CaughtLuigiInBasement)) + EndIf + Return + End }; EvtScript N(EVS_Setup_Interactables) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Inspect_Letters)), TRIGGER_WALL_PRESS_A, COLLIDER_o251, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Inspect_LuigisDiary)), TRIGGER_WALL_PRESS_A, COLLIDER_o240, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Shake_Mailbox)), TRIGGER_WALL_PRESS_A, COLLIDER_o305, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Setup_SecretPanel)), TRIGGER_FLOOR_TOUCH, COLLIDER_o252, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Inspect_Records)), TRIGGER_WALL_PRESS_A, COLLIDER_o355, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_Inspect_Letters)), TRIGGER_WALL_PRESS_A, COLLIDER_o251, 1, 0) + BindTrigger(Ref(N(EVS_Inspect_LuigisDiary)), TRIGGER_WALL_PRESS_A, COLLIDER_o240, 1, 0) + BindTrigger(Ref(N(EVS_Shake_Mailbox)), TRIGGER_WALL_PRESS_A, COLLIDER_o305, 1, 0) + BindTrigger(Ref(N(EVS_Setup_SecretPanel)), TRIGGER_FLOOR_TOUCH, COLLIDER_o252, 1, 0) + BindTrigger(Ref(N(EVS_Inspect_Records)), TRIGGER_WALL_PRESS_A, COLLIDER_o355, 1, 0) + Return + End }; diff --git a/src/world/area_kmr/kmr_20/kmr_20_5_entity.c b/src/world/area_kmr/kmr_20/kmr_20_5_entity.c index ec56a77656c..0a695ebbca3 100644 --- a/src/world/area_kmr/kmr_20/kmr_20_5_entity.c +++ b/src/world/area_kmr/kmr_20/kmr_20_5_entity.c @@ -9,138 +9,138 @@ API_CALLABLE(N(SetAmbienceVolumeHalf_Entity)){ #include "world/common/EnableCameraFollowPlayerY.inc.c" EvtScript N(EVS_SecretPanel_FlipBack) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o252, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o252, SOUND_FLIP_PANEL, SOUND_SPACE_DEFAULT) - EVT_CALL(N(SetAmbienceVolumeHalf_Entity)) - EVT_CALL(MakeLerp, 0, -2160, 60, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g61, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_o252, SOUND_CLOSE_PANEL, SOUND_SPACE_DEFAULT) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o252, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o252, COLLIDER_FLAGS_UPPER_MASK) + Call(PlaySoundAtCollider, COLLIDER_o252, SOUND_FLIP_PANEL, SOUND_SPACE_DEFAULT) + Call(N(SetAmbienceVolumeHalf_Entity)) + Call(MakeLerp, 0, -2160, 60, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g61, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_o252, SOUND_CLOSE_PANEL, SOUND_SPACE_DEFAULT) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o252, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_TetherCamToPlayer) = { - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_UseSpring_Basement) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_JUMP) - EVT_WAIT(1) - EVT_EXEC_GET_TID(N(EVS_TetherCamToPlayer), LVarA) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7)) - EVT_IF_EQ(AF_KMR_0B, FALSE) - EVT_CALL(PlayerJump, -110, -80, -35, 20) - EVT_SET(AF_KMR_0B, TRUE) - EVT_ELSE - EVT_CALL(N(EnableCameraFollowPlayerY)) - EVT_EXEC(N(EVS_SecretPanel_FlipBack)) - EVT_CALL(PlayerJump, -150, 30, -90, 30) - EVT_CALL(InterpPlayerYaw, 180, 0) - EVT_SET(AF_KMR_0B, FALSE) - EVT_END_IF - EVT_WAIT(30) - EVT_KILL_THREAD(LVarA) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_JUMP) + Wait(1) + ExecGetTID(N(EVS_TetherCamToPlayer), LVarA) + Call(SetPlayerJumpscale, Float(0.7)) + IfEq(AF_KMR_0B, FALSE) + Call(PlayerJump, -110, -80, -35, 20) + Set(AF_KMR_0B, TRUE) + Else + Call(N(EnableCameraFollowPlayerY)) + Exec(N(EVS_SecretPanel_FlipBack)) + Call(PlayerJump, -150, 30, -90, 30) + Call(InterpPlayerYaw, 180, 0) + Set(AF_KMR_0B, FALSE) + EndIf + Wait(30) + KillThread(LVarA) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Return + End }; EvtScript N(EVS_Luigi_JumpFromBlock) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetEnemyFlagBits, NPC_Luigi_1, ENEMY_FLAG_IGNORE_WORLD_COLLISION, 0) - EVT_CALL(SetNpcFlagBits, NPC_Luigi_1, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcVar, NPC_Luigi_1, 0, 1) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Jump) - EVT_CALL(SetNpcJumpscale, NPC_Luigi_1, 1) - EVT_CALL(GetNpcPos, NPC_Luigi_1, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Luigi_1, LVar0, 0, LVar2, 25) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Idle) - EVT_CALL(SetNpcVar, NPC_Luigi_1, 0, 2) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(SetEnemyFlagBits, NPC_Luigi_1, ENEMY_FLAG_IGNORE_WORLD_COLLISION, 0) + Call(SetNpcFlagBits, NPC_Luigi_1, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcVar, NPC_Luigi_1, 0, 1) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Jump) + Call(SetNpcJumpscale, NPC_Luigi_1, 1) + Call(GetNpcPos, NPC_Luigi_1, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Luigi_1, LVar0, 0, LVar2, 25) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Idle) + Call(SetNpcVar, NPC_Luigi_1, 0, 2) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Luigi_JumpFromHighBlock) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetEnemyFlagBits, NPC_Luigi_1, ENEMY_FLAG_IGNORE_WORLD_COLLISION, 0) - EVT_CALL(SetNpcFlagBits, NPC_Luigi_1, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcVar, NPC_Luigi_1, 0, 1) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Jump) - EVT_CALL(SetNpcJumpscale, NPC_Luigi_1, 1) - EVT_CALL(GetNpcPos, NPC_Luigi_1, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_CALL(NpcJump0, NPC_Luigi_1, LVar0, 0, LVar2, 25) - EVT_CALL(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Idle) - EVT_CALL(SetNpcVar, NPC_Luigi_1, 0, 2) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(SetEnemyFlagBits, NPC_Luigi_1, ENEMY_FLAG_IGNORE_WORLD_COLLISION, 0) + Call(SetNpcFlagBits, NPC_Luigi_1, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcVar, NPC_Luigi_1, 0, 1) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Jump) + Call(SetNpcJumpscale, NPC_Luigi_1, 1) + Call(GetNpcPos, NPC_Luigi_1, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Call(NpcJump0, NPC_Luigi_1, LVar0, 0, LVar2, 25) + Call(SetNpcAnimation, NPC_Luigi_1, ANIM_Luigi_Idle) + Call(SetNpcVar, NPC_Luigi_1, 0, 2) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_BlastRock) = { - EVT_CALL(SetNpcAux, NPC_Luigi_1, 0) - EVT_EXEC(N(EVS_Luigi_JumpFromBlock)) - EVT_RETURN - EVT_END + Call(SetNpcAux, NPC_Luigi_1, 0) + Exec(N(EVS_Luigi_JumpFromBlock)) + Return + End }; EvtScript N(EVS_SmashBlock) = { - EVT_CALL(SetNpcAux, NPC_Luigi_1, 0) - EVT_THREAD - EVT_EXEC_WAIT(N(EVS_Luigi_JumpFromBlock)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetNpcAux, NPC_Luigi_1, 0) + Thread + ExecWait(N(EVS_Luigi_JumpFromBlock)) + EndThread + Return + End }; EvtScript N(EVS_BreakBlock_Brick) = { - EVT_CALL(SetNpcAux, NPC_Luigi_1, 0) - EVT_THREAD - EVT_EXEC_WAIT(N(EVS_Luigi_JumpFromHighBlock)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetNpcAux, NPC_Luigi_1, 0) + Thread + ExecWait(N(EVS_Luigi_JumpFromHighBlock)) + EndThread + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_ScriptSpring), -150, -80, -50, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_UseSpring_Basement))) - EVT_CALL(SetEntityCullMode, 1) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BombableRock), 300, 0, 150, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_BlastRock))) - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer3Block), 300, 0, 150, 55, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_SmashBlock))) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 300, 90, 150, 55, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_BreakBlock_Brick))) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_ScriptSpring), -150, -80, -50, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_UseSpring_Basement))) + Call(SetEntityCullMode, 1) + Switch(GB_StoryProgress) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + Call(MakeEntity, Ref(Entity_BombableRock), 300, 0, 150, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_BlastRock))) + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Call(MakeEntity, Ref(Entity_Hammer3Block), 300, 0, 150, 55, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_SmashBlock))) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(MakeEntity, Ref(Entity_BrickBlock), 300, 90, 150, 55, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_BreakBlock_Brick))) + CaseLt(STORY_EPILOGUE) + EndSwitch + Return + End }; diff --git a/src/world/area_kmr/kmr_20/kmr_20_6_trees.c b/src/world/area_kmr/kmr_20/kmr_20_6_trees.c index 55dcce53ace..4af0bbf2ffd 100644 --- a/src/world/area_kmr/kmr_20/kmr_20_6_trees.c +++ b/src/world/area_kmr/kmr_20/kmr_20_6_trees.c @@ -27,9 +27,9 @@ BombTrigger N(BombPos_Tree1) = { }; EvtScript N(EVS_SetupTrees) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o341, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_WALL_HAMMER, COLLIDER_o341, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree_Trees)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Return + End }; diff --git a/src/world/area_kmr/kmr_20/kmr_20_7_bushes.c b/src/world/area_kmr/kmr_20/kmr_20_7_bushes.c index 45c07ea8461..f4840f14b51 100644 --- a/src/world/area_kmr/kmr_20/kmr_20_7_bushes.c +++ b/src/world/area_kmr/kmr_20/kmr_20_7_bushes.c @@ -75,16 +75,16 @@ SearchBushConfig N(SearchBush_Bush5) = { }; EvtScript N(EVS_SetupBushes) = { - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o337, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o350, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o348, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush4))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o347, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush5))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o349, 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(SearchBush_Bush1))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o337, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush2))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o350, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush3))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o348, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush4))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o347, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush5))) + BindTrigger(Ref(N(EVS_SearchBush_Bushes)), TRIGGER_WALL_PRESS_A, COLLIDER_o349, 1, 0) + Return + End }; diff --git a/src/world/area_kmr/kmr_20/kmr_20_8_bed.c b/src/world/area_kmr/kmr_20/kmr_20_8_bed.c index ddf722e8443..8a3acb38ac7 100644 --- a/src/world/area_kmr/kmr_20/kmr_20_8_bed.c +++ b/src/world/area_kmr/kmr_20/kmr_20_8_bed.c @@ -18,175 +18,175 @@ API_CALLABLE(N(SetAmbienceVolumeHalf_Bed)) { #include "world/common/todo/WaitForPlayerToLand.inc.c" EvtScript N(EVS_ToadHouse_SetDialogue) = { - EVT_SET(LVar0, MSG_CH0_0106) - EVT_SET(LVar8, MSG_CH0_0107) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 0) - EVT_RETURN - EVT_END + Set(LVar0, MSG_CH0_0106) + Set(LVar8, MSG_CH0_0107) + Set(LVar1, 0) + Set(LVar2, 0) + Set(LVar3, 0) + Return + End }; EvtScript N(EVS_ToadHouse_GetInBed) = { - EVT_EXEC(N(EVS_PlayRestingSong)) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, -28, -100, 0) - EVT_CALL(InterpPlayerYaw, 300, 0) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(N(ToadHouse_CamSetFOV), 0, 40) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 35, -10) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 135) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -170, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, -109, -76) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 120) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(EnableGroup, MODEL_o170, FALSE) - EVT_CALL(EnableGroup, MODEL_o172, FALSE) - EVT_CALL(EnableGroup, MODEL_o175, FALSE) - EVT_CALL(EnableGroup, MODEL_o177, FALSE) - EVT_CALL(EnableGroup, MODEL_o178, FALSE) - EVT_CALL(EnableGroup, MODEL_o183, FALSE) - EVT_CALL(EnableGroup, MODEL_o188, FALSE) - EVT_CALL(EnableGroup, MODEL_o189, FALSE) - EVT_CALL(EnableGroup, MODEL_o186, FALSE) - EVT_CALL(EnableGroup, MODEL_o190, FALSE) - EVT_CALL(EnableGroup, MODEL_o191, FALSE) - EVT_END_THREAD - EVT_CALL(GetPlayerPos, LVar4, LVar5, LVar6) - EVT_CALL(MakeLerp, 30, 85, 6, EASING_LINEAR) - EVT_LOOP(6) - EVT_WAIT(1) - EVT_CALL(UpdateLerp) - EVT_CALL(SetPlayerPos, LVar4, LVar0, LVar6) - EVT_END_LOOP - EVT_CALL(HidePlayerShadow, TRUE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetPlayerImgFXFlags, IMGFX_FLAG_800) - EVT_CALL(UpdatePlayerImgFX, 0x00010002, IMGFX_SET_ANIM, IMGFX_ANIM_GET_IN_BED, 1, 1, 0) - EVT_THREAD - EVT_WAIT(60) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) - EVT_END_THREAD - EVT_CALL(N(MuteAmbienceVolume_Bed)) - EVT_WAIT(75) - EVT_THREAD - EVT_WAIT(65) - EVT_CALL(N(ToadHouse_CamSetFOV), 0, 25) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(EnableGroup, MODEL_o170, TRUE) - EVT_CALL(EnableGroup, MODEL_o172, TRUE) - EVT_CALL(EnableGroup, MODEL_o175, TRUE) - EVT_CALL(EnableGroup, MODEL_o177, TRUE) - EVT_CALL(EnableGroup, MODEL_o178, TRUE) - EVT_CALL(EnableGroup, MODEL_o183, TRUE) - EVT_CALL(EnableGroup, MODEL_o188, TRUE) - EVT_CALL(EnableGroup, MODEL_o189, TRUE) - EVT_CALL(EnableGroup, MODEL_o186, TRUE) - EVT_CALL(EnableGroup, MODEL_o190, TRUE) - EVT_CALL(EnableGroup, MODEL_o191, TRUE) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_PlayRestingSong)) + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, -28, -100, 0) + Call(InterpPlayerYaw, 300, 0) + Call(DisablePlayerPhysics, TRUE) + Thread + Wait(6) + Call(N(ToadHouse_CamSetFOV), 0, 40) + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamPitch, CAM_DEFAULT, 35, -10) + Call(SetCamDistance, CAM_DEFAULT, 135) + Call(SetCamPosA, CAM_DEFAULT, -170, 0) + Call(SetCamPosB, CAM_DEFAULT, -109, -76) + Call(SetCamPosC, CAM_DEFAULT, 0, 120) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(EnableGroup, MODEL_o170, FALSE) + Call(EnableGroup, MODEL_o172, FALSE) + Call(EnableGroup, MODEL_o175, FALSE) + Call(EnableGroup, MODEL_o177, FALSE) + Call(EnableGroup, MODEL_o178, FALSE) + Call(EnableGroup, MODEL_o183, FALSE) + Call(EnableGroup, MODEL_o188, FALSE) + Call(EnableGroup, MODEL_o189, FALSE) + Call(EnableGroup, MODEL_o186, FALSE) + Call(EnableGroup, MODEL_o190, FALSE) + Call(EnableGroup, MODEL_o191, FALSE) + EndThread + Call(GetPlayerPos, LVar4, LVar5, LVar6) + Call(MakeLerp, 30, 85, 6, EASING_LINEAR) + Loop(6) + Wait(1) + Call(UpdateLerp) + Call(SetPlayerPos, LVar4, LVar0, LVar6) + EndLoop + Call(HidePlayerShadow, TRUE) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetPlayerImgFXFlags, IMGFX_FLAG_800) + Call(UpdatePlayerImgFX, 0x00010002, IMGFX_SET_ANIM, IMGFX_ANIM_GET_IN_BED, 1, 1, 0) + Thread + Wait(60) + Call(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) + EndThread + Call(N(MuteAmbienceVolume_Bed)) + Wait(75) + Thread + Wait(65) + Call(N(ToadHouse_CamSetFOV), 0, 25) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(EnableGroup, MODEL_o170, TRUE) + Call(EnableGroup, MODEL_o172, TRUE) + Call(EnableGroup, MODEL_o175, TRUE) + Call(EnableGroup, MODEL_o177, TRUE) + Call(EnableGroup, MODEL_o178, TRUE) + Call(EnableGroup, MODEL_o183, TRUE) + Call(EnableGroup, MODEL_o188, TRUE) + Call(EnableGroup, MODEL_o189, TRUE) + Call(EnableGroup, MODEL_o186, TRUE) + Call(EnableGroup, MODEL_o190, TRUE) + Call(EnableGroup, MODEL_o191, TRUE) + EndThread + Return + End }; EvtScript N(EVS_ToadHouse_ReturnFromRest) = { - EVT_CALL(N(SetAmbienceVolumeHalf_Bed)) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(HidePlayerShadow, FALSE) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetPlayerPos, -45, 30, -70) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, -75, 30, -70) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_WAIT(5) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_RETURN - EVT_END + Call(N(SetAmbienceVolumeHalf_Bed)) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(HidePlayerShadow, FALSE) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetPlayerPos, -45, 30, -70) + Call(InterpPlayerYaw, 90, 0) + Call(SetNpcPos, NPC_PARTNER, -75, 30, -70) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + Wait(5) + Exec(N(EVS_SetupMusic)) + Call(DisablePlayerPhysics, FALSE) + Return + End }; EvtScript N(EVS_UseBed) = { - EVT_CALL(N(WaitForPlayerToLand)) - EVT_IF_EQ(LVar0, 1) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(ToadHouse_InitScreenOverlay), 0, 0, 0) - EVT_EXEC_WAIT(N(EVS_ToadHouse_SetDialogue)) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar9, LVar1) - EVT_SET(LVarA, LVar2) - EVT_SET(LVarB, LVar3) - EVT_CALL(N(ToadHouse_DoesPlayerNeedSleep)) - EVT_IF_EQ(LVar1, 0) - EVT_SET(LVar8, LVar0) - EVT_END_IF - EVT_CALL(ShowMessageAtScreenPos, LVar8, 160, 40) - EVT_CALL(ShowChoice, MSG_Choice_0007) - EVT_WAIT(10) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(CloseMessage) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(CloseMessage) - EVT_CALL(SetPlayerJumpscale, 1) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(N(ToadHouse_DisableStatusBar)) - EVT_IF_NE(LVar4, 0) - EVT_EXEC(N(EVS_ToadHouse_Unk2)) - EVT_END_IF - EVT_CALL(N(ToadHouse_PutPartnerAway), LVarA) - EVT_WAIT(20) - EVT_EXEC_GET_TID(N(EVS_ToadHouse_GetInBed), LVar9) - EVT_CALL(N(ToadHouse_AwaitScriptComplete), LVar9) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 255, 60, EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(ToadHouse_UpdateScreenOverlay), 3, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(FullyRestoreHPandFP) - EVT_CALL(FullyRestoreSP) - EVT_IF_NE(LVar4, 0) - EVT_EXEC(N(EVS_ToadHouse_Unk1)) - EVT_END_IF - EVT_CALL(N(ToadHouse_GetPartnerBackOut), LVarA) - EVT_WAIT(30) - EVT_CALL(MakeLerp, 255, 0, 30, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(N(ToadHouse_UpdateScreenOverlay), 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(90) - EVT_EXEC_GET_TID(N(EVS_ToadHouse_ReturnFromRest), LVar9) - EVT_CALL(N(ToadHouse_AwaitScriptComplete), LVar9) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(N(ToadHouse_ShowWorldStatusBar)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(N(WaitForPlayerToLand)) + IfEq(LVar0, 1) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(N(ToadHouse_InitScreenOverlay), 0, 0, 0) + ExecWait(N(EVS_ToadHouse_SetDialogue)) + IfEq(LVar0, 0) + Call(DisablePlayerInput, FALSE) + Return + EndIf + Set(LVar9, LVar1) + Set(LVarA, LVar2) + Set(LVarB, LVar3) + Call(N(ToadHouse_DoesPlayerNeedSleep)) + IfEq(LVar1, 0) + Set(LVar8, LVar0) + EndIf + Call(ShowMessageAtScreenPos, LVar8, 160, 40) + Call(ShowChoice, MSG_Choice_0007) + Wait(10) + IfEq(LVar0, 1) + Call(CloseMessage) + Call(DisablePlayerInput, FALSE) + Return + EndIf + Call(CloseMessage) + Call(SetPlayerJumpscale, 1) + Call(DisablePlayerPhysics, TRUE) + Call(N(ToadHouse_DisableStatusBar)) + IfNe(LVar4, 0) + Exec(N(EVS_ToadHouse_Unk2)) + EndIf + Call(N(ToadHouse_PutPartnerAway), LVarA) + Wait(20) + ExecGetTID(N(EVS_ToadHouse_GetInBed), LVar9) + Call(N(ToadHouse_AwaitScriptComplete), LVar9) + Thread + Call(MakeLerp, 0, 255, 60, EASING_LINEAR) + Label(0) + Call(UpdateLerp) + Call(N(ToadHouse_UpdateScreenOverlay), 3, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(FullyRestoreHPandFP) + Call(FullyRestoreSP) + IfNe(LVar4, 0) + Exec(N(EVS_ToadHouse_Unk1)) + EndIf + Call(N(ToadHouse_GetPartnerBackOut), LVarA) + Wait(30) + Call(MakeLerp, 255, 0, 30, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(N(ToadHouse_UpdateScreenOverlay), 0, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + EndThread + Wait(90) + ExecGetTID(N(EVS_ToadHouse_ReturnFromRest), LVar9) + Call(N(ToadHouse_AwaitScriptComplete), LVar9) + Call(DisablePlayerPhysics, FALSE) + Call(N(ToadHouse_ShowWorldStatusBar)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SetupBed) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseBed)), TRIGGER_WALL_PRESS_A, COLLIDER_o352, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_UseBed)), TRIGGER_WALL_PRESS_A, COLLIDER_o352, 1, 0) + Return + End }; diff --git a/src/world/area_kmr/kmr_20/kmr_20_9_npc_scenes.c b/src/world/area_kmr/kmr_20/kmr_20_9_npc_scenes.c index e1e312933dd..dd59b0ceaea 100644 --- a/src/world/area_kmr/kmr_20/kmr_20_9_npc_scenes.c +++ b/src/world/area_kmr/kmr_20/kmr_20_9_npc_scenes.c @@ -7,18 +7,18 @@ NpcSettings N(NpcSettings_Scenes) = { }; EvtScript N(EVS_NpcInit_Luigi_Scenes) = { - EVT_CALL(SetNpcCollisionSize, NPC_SELF, 46, 26) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(kmr_20_ENTRY_2) - EVT_CASE_OR_EQ(kmr_20_ENTRY_3) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Luigi_IdleSit) - EVT_CALL(SetNpcPos, NPC_SELF, 196, 44, -37) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetNpcCollisionSize, NPC_SELF, 46, 26) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseOrEq(kmr_20_ENTRY_2) + CaseOrEq(kmr_20_ENTRY_3) + Call(SetNpcAnimation, NPC_SELF, ANIM_Luigi_IdleSit) + Call(SetNpcPos, NPC_SELF, 196, 44, -37) + Call(SetNpcYaw, NPC_SELF, 270) + EndCaseGroup + EndSwitch + Return + End }; NpcData N(NpcData_Scenes)[] = { diff --git a/src/world/area_kmr/kmr_21/kmr_21_1_main.c b/src/world/area_kmr/kmr_21/kmr_21_1_main.c index 2e8f9303f14..db4824facf8 100644 --- a/src/world/area_kmr/kmr_21/kmr_21_1_main.c +++ b/src/world/area_kmr/kmr_21/kmr_21_1_main.c @@ -90,74 +90,74 @@ API_CALLABLE(N(SetTitlePosY)) { } EvtScript N(EVS_Scene_ShowTitle) = { - EVT_CALL(N(LoadTitleImage)) - EVT_WAIT(15 * DT) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 255, 100 * DT, EASING_CUBIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetTitlePrimAlpha)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(MakeLerp, 106, 56, 100 * DT, EASING_CUBIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetTitlePosY)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(30 * DT) - EVT_CALL(MakeLerp, 255, 0, 50 * DT, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetTitlePrimAlpha)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(15 * DT) - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_22"), kmr_22_ENTRY_0, TRANSITION_BEGIN_OR_END_CHAPTER) - EVT_WAIT(100 * DT) - EVT_RETURN - EVT_END + Call(N(LoadTitleImage)) + Wait(15 * DT) + Thread + Call(MakeLerp, 0, 255, 100 * DT, EASING_CUBIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(N(SetTitlePrimAlpha)) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(MakeLerp, 106, 56, 100 * DT, EASING_CUBIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(N(SetTitlePosY)) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(30 * DT) + Call(MakeLerp, 255, 0, 50 * DT, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(N(SetTitlePrimAlpha)) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(15 * DT) + Call(GotoMapSpecial, Ref("kmr_22"), kmr_22_ENTRY_0, TRANSITION_BEGIN_OR_END_CHAPTER) + Wait(100 * DT) + Return + End }; EvtScript N(EVS_Main) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerPos, -1000, 0, 0) //@bug? improper dispose location for player - EVT_WAIT(1) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcPos, NPC_PARTNER, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 208, 208, 208) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 440) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 100) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 65) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_WAIT(1) - EVT_EXEC(N(EVS_Scene_ShowTitle)) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerPos, -1000, 0, 0) //@bug? improper dispose location for player + Wait(1) + Call(GetCurrentPartnerID, LVar0) + IfNe(LVar0, PARTNER_NONE) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcPos, NPC_PARTNER, NPC_DISPOSE_LOCATION) + EndIf + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 208, 208, 208) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamPitch, CAM_DEFAULT, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, 440) + Call(SetCamPosA, CAM_DEFAULT, 0, 100) + Call(SetCamPosB, CAM_DEFAULT, 0, 0) + Call(SetCamPosC, CAM_DEFAULT, 0, 65) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Wait(1) + Exec(N(EVS_Scene_ShowTitle)) + Return + End }; diff --git a/src/world/area_kmr/kmr_22/kmr_22_1_main.c b/src/world/area_kmr/kmr_22/kmr_22_1_main.c index 90159af3d91..f28bf6483cb 100644 --- a/src/world/area_kmr/kmr_22/kmr_22_1_main.c +++ b/src/world/area_kmr/kmr_22/kmr_22_1_main.c @@ -103,99 +103,99 @@ API_CALLABLE(N(WaitForContinueInput)) { } EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_THREAD - EVT_CALL(N(ManageEffects)) - EVT_END_THREAD - EVT_WAIT(50) - EVT_CALL(N(WaitForContinueInput)) - EVT_CALL(FadeOutMusic, 0, 2000) - EVT_WAIT(30) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kmr_22_ENTRY_0) - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_00"), kmr_00_ENTRY_0, TRANSITION_BEGIN_OR_END_CHAPTER) - EVT_CASE_EQ(kmr_22_ENTRY_1) - EVT_CALL(GotoMapSpecial, EVT_PTR("nok_11"), nok_11_ENTRY_0, TRANSITION_BEGIN_OR_END_CHAPTER) - EVT_CASE_EQ(kmr_22_ENTRY_2) - EVT_CALL(GotoMapSpecial, EVT_PTR("iwa_10"), iwa_10_ENTRY_0, TRANSITION_BEGIN_OR_END_CHAPTER) - EVT_CASE_EQ(kmr_22_ENTRY_3) - EVT_CALL(GotoMapSpecial, EVT_PTR("mim_01"), mim_01_ENTRY_1, TRANSITION_BEGIN_OR_END_CHAPTER) - EVT_CASE_EQ(kmr_22_ENTRY_4) - EVT_CALL(GotoMapSpecial, EVT_PTR("omo_03"), omo_03_ENTRY_4, TRANSITION_BEGIN_OR_END_CHAPTER) - EVT_CASE_EQ(kmr_22_ENTRY_5) - EVT_CALL(GotoMapSpecial, EVT_PTR("jan_00"), jan_00_ENTRY_0, TRANSITION_BEGIN_OR_END_CHAPTER) - EVT_CASE_EQ(kmr_22_ENTRY_6) - EVT_CALL(GotoMapSpecial, EVT_PTR("flo_00"), flo_00_ENTRY_0, TRANSITION_BEGIN_OR_END_CHAPTER) - EVT_CASE_EQ(kmr_22_ENTRY_7) - EVT_CALL(GotoMapSpecial, EVT_PTR("sam_02"), sam_02_ENTRY_2, TRANSITION_BEGIN_OR_END_CHAPTER) - EVT_CASE_EQ(kmr_22_ENTRY_8) - EVT_CALL(GotoMapSpecial, EVT_PTR("kpa_63"), kpa_63_ENTRY_1, TRANSITION_BEGIN_OR_END_CHAPTER) - EVT_END_SWITCH - EVT_CALL(N(DismissCurtains)) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Thread + Call(N(ManageEffects)) + EndThread + Wait(50) + Call(N(WaitForContinueInput)) + Call(FadeOutMusic, 0, 2000) + Wait(30) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kmr_22_ENTRY_0) + Call(GotoMapSpecial, Ref("kmr_00"), kmr_00_ENTRY_0, TRANSITION_BEGIN_OR_END_CHAPTER) + CaseEq(kmr_22_ENTRY_1) + Call(GotoMapSpecial, Ref("nok_11"), nok_11_ENTRY_0, TRANSITION_BEGIN_OR_END_CHAPTER) + CaseEq(kmr_22_ENTRY_2) + Call(GotoMapSpecial, Ref("iwa_10"), iwa_10_ENTRY_0, TRANSITION_BEGIN_OR_END_CHAPTER) + CaseEq(kmr_22_ENTRY_3) + Call(GotoMapSpecial, Ref("mim_01"), mim_01_ENTRY_1, TRANSITION_BEGIN_OR_END_CHAPTER) + CaseEq(kmr_22_ENTRY_4) + Call(GotoMapSpecial, Ref("omo_03"), omo_03_ENTRY_4, TRANSITION_BEGIN_OR_END_CHAPTER) + CaseEq(kmr_22_ENTRY_5) + Call(GotoMapSpecial, Ref("jan_00"), jan_00_ENTRY_0, TRANSITION_BEGIN_OR_END_CHAPTER) + CaseEq(kmr_22_ENTRY_6) + Call(GotoMapSpecial, Ref("flo_00"), flo_00_ENTRY_0, TRANSITION_BEGIN_OR_END_CHAPTER) + CaseEq(kmr_22_ENTRY_7) + Call(GotoMapSpecial, Ref("sam_02"), sam_02_ENTRY_2, TRANSITION_BEGIN_OR_END_CHAPTER) + CaseEq(kmr_22_ENTRY_8) + Call(GotoMapSpecial, Ref("kpa_63"), kpa_63_ENTRY_1, TRANSITION_BEGIN_OR_END_CHAPTER) + EndSwitch + Call(N(DismissCurtains)) + Wait(100) + Return + End }; EvtScript N(EVS_Main) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kmr_22_ENTRY_0) - EVT_CALL(SetPlayerPos, -200, 0, 0) - EVT_ELSE - EVT_CALL(SetPlayerPos, -95, 0, 0) - EVT_END_IF - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, TRUE) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_BeforeJump) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcPos, NPC_PARTNER, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 208, 208, 208) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 440) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 100) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 65) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kmr_22_ENTRY_1) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NpcGroup_Chapter1))) - EVT_CASE_EQ(kmr_22_ENTRY_2) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NpcGroup_Chapter2))) - EVT_CASE_EQ(kmr_22_ENTRY_3) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NpcGroup_Chapter3))) - EVT_CASE_EQ(kmr_22_ENTRY_4) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NpcGroup_Chapter4))) - EVT_CASE_EQ(kmr_22_ENTRY_5) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NpcGroup_Chapter5))) - EVT_CASE_EQ(kmr_22_ENTRY_6) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NpcGroup_Chapter6))) - EVT_CASE_EQ(kmr_22_ENTRY_7) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NpcGroup_Chapter7))) - EVT_CASE_EQ(kmr_22_ENTRY_8) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NpcGroup_Chapter8))) - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_WAIT(1) - EVT_EXEC(N(EVS_EnterMap)) - EVT_CALL(SetMusicTrack, 0, SONG_CHAPTER_START, 0, 8) - EVT_CALL(ClearAmbientSounds, 250) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(GetEntryID, LVar0) + IfEq(LVar0, kmr_22_ENTRY_0) + Call(SetPlayerPos, -200, 0, 0) + Else + Call(SetPlayerPos, -95, 0, 0) + EndIf + Call(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, TRUE) + Call(InterpPlayerYaw, 90, 0) + Wait(1) + Call(SetPlayerAnimation, ANIM_Mario1_BeforeJump) + Call(GetCurrentPartnerID, LVar0) + IfNe(LVar0, PARTNER_NONE) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcPos, NPC_PARTNER, NPC_DISPOSE_LOCATION) + EndIf + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 208, 208, 208) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamPitch, CAM_DEFAULT, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, 440) + Call(SetCamPosA, CAM_DEFAULT, 0, 100) + Call(SetCamPosB, CAM_DEFAULT, 0, 0) + Call(SetCamPosC, CAM_DEFAULT, 0, 65) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kmr_22_ENTRY_1) + Call(MakeNpcs, FALSE, Ref(N(NpcGroup_Chapter1))) + CaseEq(kmr_22_ENTRY_2) + Call(MakeNpcs, FALSE, Ref(N(NpcGroup_Chapter2))) + CaseEq(kmr_22_ENTRY_3) + Call(MakeNpcs, FALSE, Ref(N(NpcGroup_Chapter3))) + CaseEq(kmr_22_ENTRY_4) + Call(MakeNpcs, FALSE, Ref(N(NpcGroup_Chapter4))) + CaseEq(kmr_22_ENTRY_5) + Call(MakeNpcs, FALSE, Ref(N(NpcGroup_Chapter5))) + CaseEq(kmr_22_ENTRY_6) + Call(MakeNpcs, FALSE, Ref(N(NpcGroup_Chapter6))) + CaseEq(kmr_22_ENTRY_7) + Call(MakeNpcs, FALSE, Ref(N(NpcGroup_Chapter7))) + CaseEq(kmr_22_ENTRY_8) + Call(MakeNpcs, FALSE, Ref(N(NpcGroup_Chapter8))) + EndSwitch + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Wait(1) + Exec(N(EVS_EnterMap)) + Call(SetMusicTrack, 0, SONG_CHAPTER_START, 0, 8) + Call(ClearAmbientSounds, 250) + Return + End }; diff --git a/src/world/area_kmr/kmr_22/npc/chapter_1.inc.c b/src/world/area_kmr/kmr_22/npc/chapter_1.inc.c index 7144a2c39ba..f1bffe8b138 100644 --- a/src/world/area_kmr/kmr_22/npc/chapter_1.inc.c +++ b/src/world/area_kmr/kmr_22/npc/chapter_1.inc.c @@ -1,13 +1,13 @@ EvtScript N(EVS_NpcInit_Eldstar) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldEldstar_Still) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_TINT, 0, 0, 0, 128) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldEldstar_Still) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_TINT, 0, 0, 0, 128) + Return + End }; EvtScript N(EVS_NpcInit_KoopaBros) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Black_PointForward) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_FILL_COLOR, 80, 80, 80, 0) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Black_PointForward) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_FILL_COLOR, 80, 80, 80, 0) + Return + End }; diff --git a/src/world/area_kmr/kmr_22/npc/chapter_2.inc.c b/src/world/area_kmr/kmr_22/npc/chapter_2.inc.c index 9b5c3c609a6..8f16d88ad15 100644 --- a/src/world/area_kmr/kmr_22/npc/chapter_2.inc.c +++ b/src/world/area_kmr/kmr_22/npc/chapter_2.inc.c @@ -1,33 +1,33 @@ EvtScript N(EVS_NpcInit_Mamar) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldMamar_Still) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_TINT, 0, 0, 0, 128) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldMamar_Still) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_TINT, 0, 0, 0, 128) + Return + End }; EvtScript N(EVS_NpcInit_Tutankoopa) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Tutankoopa_Levitate) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_FILL_COLOR, 80, 80, 80, 0) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_Tutankoopa_Levitate) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_FILL_COLOR, 80, 80, 80, 0) + Return + End }; EvtScript N(EVS_NpcInit_ChainChomp) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ChainChomp_QuickBite) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_FILL_COLOR, 80, 80, 80, 0) - EVT_CALL(SetNpcPos, NPC_SELF, 5, -25, -180) - EVT_CALL(SetNpcAnimation, NPC_ChainChomp_02, ANIM_ChainChomp_Chain) - EVT_CALL(SetNpcImgFXParams, NPC_ChainChomp_02, IMGFX_FILL_COLOR, 80, 80, 80, 0) - EVT_CALL(SetNpcPos, NPC_ChainChomp_02, 35, -14, -180) - EVT_CALL(SetNpcAnimation, NPC_ChainChomp_03, ANIM_ChainChomp_Chain) - EVT_CALL(SetNpcImgFXParams, NPC_ChainChomp_03, IMGFX_FILL_COLOR, 80, 80, 80, 0) - EVT_CALL(SetNpcPos, NPC_ChainChomp_03, 52, -18, -180) - EVT_CALL(SetNpcAnimation, NPC_ChainChomp_04, ANIM_ChainChomp_Chain) - EVT_CALL(SetNpcImgFXParams, NPC_ChainChomp_04, IMGFX_FILL_COLOR, 80, 80, 80, 0) - EVT_CALL(SetNpcPos, NPC_ChainChomp_04, 69, -19, -180) - EVT_CALL(SetNpcAnimation, NPC_ChainChomp_05, ANIM_ChainChomp_Chain) - EVT_CALL(SetNpcImgFXParams, NPC_ChainChomp_05, IMGFX_FILL_COLOR, 80, 80, 80, 0) - EVT_CALL(SetNpcPos, NPC_ChainChomp_05, 86, -19, -180) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_ChainChomp_QuickBite) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_FILL_COLOR, 80, 80, 80, 0) + Call(SetNpcPos, NPC_SELF, 5, -25, -180) + Call(SetNpcAnimation, NPC_ChainChomp_02, ANIM_ChainChomp_Chain) + Call(SetNpcImgFXParams, NPC_ChainChomp_02, IMGFX_FILL_COLOR, 80, 80, 80, 0) + Call(SetNpcPos, NPC_ChainChomp_02, 35, -14, -180) + Call(SetNpcAnimation, NPC_ChainChomp_03, ANIM_ChainChomp_Chain) + Call(SetNpcImgFXParams, NPC_ChainChomp_03, IMGFX_FILL_COLOR, 80, 80, 80, 0) + Call(SetNpcPos, NPC_ChainChomp_03, 52, -18, -180) + Call(SetNpcAnimation, NPC_ChainChomp_04, ANIM_ChainChomp_Chain) + Call(SetNpcImgFXParams, NPC_ChainChomp_04, IMGFX_FILL_COLOR, 80, 80, 80, 0) + Call(SetNpcPos, NPC_ChainChomp_04, 69, -19, -180) + Call(SetNpcAnimation, NPC_ChainChomp_05, ANIM_ChainChomp_Chain) + Call(SetNpcImgFXParams, NPC_ChainChomp_05, IMGFX_FILL_COLOR, 80, 80, 80, 0) + Call(SetNpcPos, NPC_ChainChomp_05, 86, -19, -180) + Return + End }; diff --git a/src/world/area_kmr/kmr_22/npc/chapter_3.inc.c b/src/world/area_kmr/kmr_22/npc/chapter_3.inc.c index 4850a385992..e0c765a4c5d 100644 --- a/src/world/area_kmr/kmr_22/npc/chapter_3.inc.c +++ b/src/world/area_kmr/kmr_22/npc/chapter_3.inc.c @@ -1,13 +1,13 @@ EvtScript N(EVS_NpcInit_Skolar) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldSkolar_Still) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_TINT, 0, 0, 0, 128) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldSkolar_Still) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_TINT, 0, 0, 0, 128) + Return + End }; EvtScript N(EVS_NpcInit_Tubba) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim10) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_FILL_COLOR, 80, 80, 80, 0) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim10) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_FILL_COLOR, 80, 80, 80, 0) + Return + End }; diff --git a/src/world/area_kmr/kmr_22/npc/chapter_4.inc.c b/src/world/area_kmr/kmr_22/npc/chapter_4.inc.c index 0cb58d7266d..58335c58bb6 100644 --- a/src/world/area_kmr/kmr_22/npc/chapter_4.inc.c +++ b/src/world/area_kmr/kmr_22/npc/chapter_4.inc.c @@ -1,20 +1,20 @@ EvtScript N(EVS_NpcInit_Muskular) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldMuskular_Still) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_TINT, 0, 0, 0, 128) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldMuskular_Still) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_TINT, 0, 0, 0, 128) + Return + End }; EvtScript N(EVS_NpcInit_GeneralGuy) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GeneralGuy_Anim03) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_FILL_COLOR, 80, 80, 80, 0) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_GeneralGuy_Anim03) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_FILL_COLOR, 80, 80, 80, 0) + Return + End }; EvtScript N(EVS_NpcInit_ShyGuy) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim02) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_FILL_COLOR, 80, 80, 80, 0) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim02) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_FILL_COLOR, 80, 80, 80, 0) + Return + End }; diff --git a/src/world/area_kmr/kmr_22/npc/chapter_5.inc.c b/src/world/area_kmr/kmr_22/npc/chapter_5.inc.c index 9e64eaed0aa..dae170a33ee 100644 --- a/src/world/area_kmr/kmr_22/npc/chapter_5.inc.c +++ b/src/world/area_kmr/kmr_22/npc/chapter_5.inc.c @@ -1,6 +1,6 @@ EvtScript N(EVS_NpcInit_Misstar) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldMisstar_Still) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_TINT, 0, 0, 0, 128) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldMisstar_Still) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_TINT, 0, 0, 0, 128) + Return + End }; diff --git a/src/world/area_kmr/kmr_22/npc/chapter_6.inc.c b/src/world/area_kmr/kmr_22/npc/chapter_6.inc.c index 645a70eda47..e2d5866a790 100644 --- a/src/world/area_kmr/kmr_22/npc/chapter_6.inc.c +++ b/src/world/area_kmr/kmr_22/npc/chapter_6.inc.c @@ -1,41 +1,41 @@ EvtScript N(EVS_NpcInit_Klevar) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKlevar_Still) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_TINT, 0, 0, 0, 128) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKlevar_Still) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_TINT, 0, 0, 0, 128) + Return + End }; EvtScript N(EVS_NpcInit_HuffNPuff_Body) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HuffNPuff_Anim1A) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_FILL_COLOR, 80, 80, 80, 0) - EVT_CALL(SetNpcPos, NPC_SELF, 40, 45, 1) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_HuffNPuff_Anim1A) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_FILL_COLOR, 80, 80, 80, 0) + Call(SetNpcPos, NPC_SELF, 40, 45, 1) + Return + End }; EvtScript N(EVS_NpcInit_HuffNPuff_Face) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HuffNPuff_Anim1B) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_FILL_COLOR, 80, 80, 80, 0) - EVT_CALL(SetNpcPos, NPC_SELF, 40, 45, 1) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_HuffNPuff_Anim1B) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_FILL_COLOR, 80, 80, 80, 0) + Call(SetNpcPos, NPC_SELF, 40, 45, 1) + Return + End }; EvtScript N(EVS_NpcInit_HuffNPuff_Arms) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HuffNPuff_Anim1C) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_FILL_COLOR, 80, 80, 80, 0) - EVT_CALL(SetNpcPos, NPC_SELF, 40, 45, 1) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_HuffNPuff_Anim1C) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_FILL_COLOR, 80, 80, 80, 0) + Call(SetNpcPos, NPC_SELF, 40, 45, 1) + Return + End }; EvtScript N(EVS_NpcInit_RuffPuff_01) = { - EVT_CALL(SetNpcAnimation, NPC_RuffPuff_01, ANIM_RuffPuff_Idle) - EVT_CALL(SetNpcImgFXParams, NPC_RuffPuff_01, IMGFX_FILL_COLOR, 80, 80, 80, 0) - EVT_CALL(SetNpcPos, NPC_RuffPuff_01, 120, -1, -51) - EVT_CALL(SetNpcAnimation, NPC_RuffPuff_02, ANIM_RuffPuff_Idle) - EVT_CALL(SetNpcImgFXParams, NPC_RuffPuff_02, IMGFX_FILL_COLOR, 80, 80, 80, 0) - EVT_CALL(SetNpcPos, NPC_RuffPuff_02, -40, 59, 1) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_RuffPuff_01, ANIM_RuffPuff_Idle) + Call(SetNpcImgFXParams, NPC_RuffPuff_01, IMGFX_FILL_COLOR, 80, 80, 80, 0) + Call(SetNpcPos, NPC_RuffPuff_01, 120, -1, -51) + Call(SetNpcAnimation, NPC_RuffPuff_02, ANIM_RuffPuff_Idle) + Call(SetNpcImgFXParams, NPC_RuffPuff_02, IMGFX_FILL_COLOR, 80, 80, 80, 0) + Call(SetNpcPos, NPC_RuffPuff_02, -40, 59, 1) + Return + End }; diff --git a/src/world/area_kmr/kmr_22/npc/chapter_7.inc.c b/src/world/area_kmr/kmr_22/npc/chapter_7.inc.c index 187354119e5..77b9623f3c5 100644 --- a/src/world/area_kmr/kmr_22/npc/chapter_7.inc.c +++ b/src/world/area_kmr/kmr_22/npc/chapter_7.inc.c @@ -1,34 +1,34 @@ EvtScript N(EVS_NpcInit_Kalmar) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKalmar_Still) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_TINT, 0, 0, 0, 128) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKalmar_Still) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_TINT, 0, 0, 0, 128) + Return + End }; EvtScript N(EVS_NpcInit_CrystalKing) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_CrystalKing_Anim09) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_FILL_COLOR, 80, 80, 80, 0) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_CrystalKing_Anim09) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_FILL_COLOR, 80, 80, 80, 0) + Return + End }; EvtScript N(EVS_NpcInit_IceCube) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_CrystalKing_Anim0A) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_FILL_COLOR, 80, 80, 80, 0) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_CrystalKing_Anim0A) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_FILL_COLOR, 80, 80, 80, 0) + Return + End }; EvtScript N(EVS_NpcInit_IceSphere) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_CrystalKing_Anim0B) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_FILL_COLOR, 80, 80, 80, 0) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_CrystalKing_Anim0B) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_FILL_COLOR, 80, 80, 80, 0) + Return + End }; EvtScript N(EVS_NpcInit_IceSpike) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_CrystalKing_Anim0C) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_FILL_COLOR, 80, 80, 80, 0) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_CrystalKing_Anim0C) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_FILL_COLOR, 80, 80, 80, 0) + Return + End }; diff --git a/src/world/area_kmr/kmr_22/npc/chapter_8.inc.c b/src/world/area_kmr/kmr_22/npc/chapter_8.inc.c index dd6fc511d14..98eed9cd247 100644 --- a/src/world/area_kmr/kmr_22/npc/chapter_8.inc.c +++ b/src/world/area_kmr/kmr_22/npc/chapter_8.inc.c @@ -1,6 +1,6 @@ EvtScript N(EVS_NpcInit_Bowser) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldBowser_Talk) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_FILL_COLOR, 80, 80, 80, 0) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldBowser_Talk) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_FILL_COLOR, 80, 80, 80, 0) + Return + End }; diff --git a/src/world/area_kmr/kmr_22/npc/lava_piranha.inc.c b/src/world/area_kmr/kmr_22/npc/lava_piranha.inc.c index 2285184575d..9a9ee16abd3 100644 --- a/src/world/area_kmr/kmr_22/npc/lava_piranha.inc.c +++ b/src/world/area_kmr/kmr_22/npc/lava_piranha.inc.c @@ -12,215 +12,215 @@ INCLUDE_PAL("world/area_kmr/kmr_22/lava_piranha_vine.pal", D_80241D00); #include "world/common/lava_piranha/LoadAnimationFromTable.inc.c" EvtScript N(EVS_NpcAux_LavaPiranhaHead) = { - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_USE_ARRAY(LVar0) - EVT_LABEL(0) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_LavaPiranhaHead, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcRotation, NPC_LavaPiranhaHead, LVar0, 0, LVar2) - EVT_CALL(N(MarkVineInterpolationDirty)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 0, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 90) - EVT_CALL(N(SetVineBoneRot), VINE_0, 0, LVar0, 0, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 0, 1, 1, 1) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 1, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 1, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 1, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 9, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 2, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 9, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 2, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 3, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 3, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 8, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 4, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 8, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 4, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 5, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 5, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 7, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 6, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 7, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 6, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 7, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 7, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 7, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 8, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 8, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 8, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_LavaBud_01, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcRotation, NPC_LavaBud_01, LVar0, 0, LVar2) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_1, 0, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 90) - EVT_CALL(N(SetVineBoneRot), VINE_1, 0, LVar0, 0, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_1, 0, 1, 1, 1) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 4, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 2) - EVT_CALL(N(SetVineBonePos), VINE_1, 1, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_1, 1, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_1, 1, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 7, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_1, 2, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 7, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_1, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_1, 2, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_1, 3, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_1, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_1, 3, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_1, 4, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_1, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_1, 4, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_1, 5, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_1, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_1, 5, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_1, 6, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_1, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_1, 6, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_LavaBud_02, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcRotation, NPC_LavaBud_02, LVar0, 0, LVar2) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_2, 0, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 90) - EVT_CALL(N(SetVineBoneRot), VINE_2, 0, LVar0, 0, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_2, 0, 1, 1, 1) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 4, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 2) - EVT_CALL(N(SetVineBonePos), VINE_2, 1, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_2, 1, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_2, 1, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 7, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_2, 2, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 7, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_2, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_2, 2, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_2, 3, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_2, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_2, 3, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_2, 4, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_2, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_2, 4, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_2, 5, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_2, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_2, 5, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_2, 6, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_2, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_2, 6, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_3, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_3, 0, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_3, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_3, 0, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_3, 0, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_3, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_3, 1, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_3, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_3, 1, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_3, 1, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_3, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_3, 2, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_3, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_3, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_3, 2, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_3, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_3, 3, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_3, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_3, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_3, 3, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_3, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_3, 4, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_3, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_3, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_3, 4, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(GetSelfVar, 0, LVar0) + UseArray(LVar0) + Label(0) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_LavaPiranhaHead, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) + Call(SetNpcRotation, NPC_LavaPiranhaHead, LVar0, 0, LVar2) + Call(N(MarkVineInterpolationDirty)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 0, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) + Add(LVar2, 90) + Call(N(SetVineBoneRot), VINE_0, 0, LVar0, 0, LVar2) + Call(N(SetVineBoneScale), VINE_0, 0, 1, 1, 1) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 1, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 1, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 1, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 9, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 2, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 9, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 2, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 3, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 3, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 8, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 4, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 8, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 4, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 5, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 5, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 7, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 6, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 7, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 6, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 7, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 7, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 7, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 8, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 8, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 8, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_LavaBud_01, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) + Call(SetNpcRotation, NPC_LavaBud_01, LVar0, 0, LVar2) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_1, 0, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) + Add(LVar2, 90) + Call(N(SetVineBoneRot), VINE_1, 0, LVar0, 0, LVar2) + Call(N(SetVineBoneScale), VINE_1, 0, 1, 1, 1) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 4, LVar0, LVar1, LVar2) + Sub(LVar2, 2) + Call(N(SetVineBonePos), VINE_1, 1, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_1, 1, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_1, 1, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 7, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_1, 2, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 7, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_1, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_1, 2, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_1, 3, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_1, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_1, 3, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_1, 4, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_1, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_1, 4, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_1, 5, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_1, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_1, 5, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_1, 6, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_1, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_1, 6, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_LavaBud_02, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) + Call(SetNpcRotation, NPC_LavaBud_02, LVar0, 0, LVar2) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_2, 0, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) + Add(LVar2, 90) + Call(N(SetVineBoneRot), VINE_2, 0, LVar0, 0, LVar2) + Call(N(SetVineBoneScale), VINE_2, 0, 1, 1, 1) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 4, LVar0, LVar1, LVar2) + Sub(LVar2, 2) + Call(N(SetVineBonePos), VINE_2, 1, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_2, 1, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_2, 1, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 7, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_2, 2, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 7, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_2, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_2, 2, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_2, 3, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_2, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_2, 3, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_2, 4, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_2, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_2, 4, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_2, 5, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_2, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_2, 5, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_2, 6, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_2, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_2, 6, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_3, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_3, 0, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_3, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_3, 0, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_3, 0, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_3, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_3, 1, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_3, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_3, 1, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_3, 1, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_3, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_3, 2, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_3, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_3, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_3, 2, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_3, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_3, 3, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_3, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_3, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_3, 3, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_3, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_3, 4, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_3, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_3, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_3, 4, Float(0.714), Float(0.714), Float(1.0)) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_NpcInit_LavaPiranhaHead) = { - EVT_CALL(SetNpcImgFXParams, NPC_LavaPiranhaHead, IMGFX_FILL_COLOR, 80, 80, 80, 0) - EVT_CALL(SetNpcImgFXParams, NPC_LavaBud_01, IMGFX_FILL_COLOR, 80, 80, 80, 0) - EVT_CALL(SetNpcImgFXParams, NPC_LavaBud_02, IMGFX_FILL_COLOR, 80, 80, 80, 0) - EVT_CALL(SetNpcAnimation, NPC_LavaPiranhaHead, ANIM_LavaPiranha_Anim03) - EVT_CALL(SetNpcAnimation, NPC_LavaBud_01, ANIM_LavaBud_Anim03) - EVT_CALL(SetNpcAnimation, NPC_LavaBud_02, ANIM_LavaBud_Anim03) - EVT_CALL(EnableNpcShadow, NPC_LavaPiranhaHead, FALSE) - EVT_CALL(EnableNpcShadow, NPC_LavaBud_01, FALSE) - EVT_CALL(EnableNpcShadow, NPC_LavaBud_02, FALSE) - EVT_MALLOC_ARRAY(64, LVar0) - EVT_CALL(SetSelfVar, 0, LVar0) - EVT_USE_ARRAY(LVar0) - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_LavaPiranhaHead))) - EVT_CALL(LoadAnimatedModel, VINE_0, EVT_PTR(N(AnimModel_MainHeadVine))) - EVT_CALL(N(LoadAnimationFromTable), VINE_0, 0) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_CALL(SetAnimatedModelRootPosition, VINE_0, -40, 0, 0) - EVT_CALL(SetAnimatorFlags, VINE_0, MODEL_ANIMATOR_FLAG_HIDDEN, 1) - EVT_CALL(LoadAnimatedModel, VINE_1, EVT_PTR(N(AnimModel_SideHeadVine))) - EVT_CALL(N(LoadAnimationFromTable), VINE_1, 31) - EVT_CALL(PlayModelAnimation, VINE_1, VINE_1_BASE) - EVT_CALL(SetAnimatedModelRootPosition, VINE_1, -40, 0, 0) - EVT_CALL(SetAnimatorFlags, VINE_1, MODEL_ANIMATOR_FLAG_HIDDEN, 1) - EVT_CALL(LoadAnimatedModel, VINE_2, EVT_PTR(N(AnimModel_SideHeadVine))) - EVT_CALL(N(LoadAnimationFromTable), VINE_2, 31) - EVT_CALL(PlayModelAnimation, VINE_2, VINE_2_BASE) - EVT_CALL(SetAnimatedModelRootPosition, VINE_2, 10, 0, 20) - EVT_CALL(SetAnimatorFlags, VINE_2, MODEL_ANIMATOR_FLAG_HIDDEN, 1) - EVT_CALL(LoadAnimatedModel, VINE_3, EVT_PTR(N(AnimModel_ExtraVine))) - EVT_CALL(N(LoadAnimationFromTable), VINE_3, 34) - EVT_CALL(PlayModelAnimation, VINE_3, VINE_3_BASE) - EVT_CALL(SetAnimatedModelRootPosition, VINE_3, -40, 0, 0) - EVT_CALL(SetAnimatorFlags, VINE_3, MODEL_ANIMATOR_FLAG_HIDDEN, 1) - EVT_CALL(N(CreateVineRenderer)) - EVT_RETURN - EVT_END + Call(SetNpcImgFXParams, NPC_LavaPiranhaHead, IMGFX_FILL_COLOR, 80, 80, 80, 0) + Call(SetNpcImgFXParams, NPC_LavaBud_01, IMGFX_FILL_COLOR, 80, 80, 80, 0) + Call(SetNpcImgFXParams, NPC_LavaBud_02, IMGFX_FILL_COLOR, 80, 80, 80, 0) + Call(SetNpcAnimation, NPC_LavaPiranhaHead, ANIM_LavaPiranha_Anim03) + Call(SetNpcAnimation, NPC_LavaBud_01, ANIM_LavaBud_Anim03) + Call(SetNpcAnimation, NPC_LavaBud_02, ANIM_LavaBud_Anim03) + Call(EnableNpcShadow, NPC_LavaPiranhaHead, FALSE) + Call(EnableNpcShadow, NPC_LavaBud_01, FALSE) + Call(EnableNpcShadow, NPC_LavaBud_02, FALSE) + MallocArray(64, LVar0) + Call(SetSelfVar, 0, LVar0) + UseArray(LVar0) + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_LavaPiranhaHead))) + Call(LoadAnimatedModel, VINE_0, Ref(N(AnimModel_MainHeadVine))) + Call(N(LoadAnimationFromTable), VINE_0, 0) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Call(SetAnimatedModelRootPosition, VINE_0, -40, 0, 0) + Call(SetAnimatorFlags, VINE_0, MODEL_ANIMATOR_FLAG_HIDDEN, 1) + Call(LoadAnimatedModel, VINE_1, Ref(N(AnimModel_SideHeadVine))) + Call(N(LoadAnimationFromTable), VINE_1, 31) + Call(PlayModelAnimation, VINE_1, VINE_1_BASE) + Call(SetAnimatedModelRootPosition, VINE_1, -40, 0, 0) + Call(SetAnimatorFlags, VINE_1, MODEL_ANIMATOR_FLAG_HIDDEN, 1) + Call(LoadAnimatedModel, VINE_2, Ref(N(AnimModel_SideHeadVine))) + Call(N(LoadAnimationFromTable), VINE_2, 31) + Call(PlayModelAnimation, VINE_2, VINE_2_BASE) + Call(SetAnimatedModelRootPosition, VINE_2, 10, 0, 20) + Call(SetAnimatorFlags, VINE_2, MODEL_ANIMATOR_FLAG_HIDDEN, 1) + Call(LoadAnimatedModel, VINE_3, Ref(N(AnimModel_ExtraVine))) + Call(N(LoadAnimationFromTable), VINE_3, 34) + Call(PlayModelAnimation, VINE_3, VINE_3_BASE) + Call(SetAnimatedModelRootPosition, VINE_3, -40, 0, 0) + Call(SetAnimatorFlags, VINE_3, MODEL_ANIMATOR_FLAG_HIDDEN, 1) + Call(N(CreateVineRenderer)) + Return + End }; EvtScript N(EVS_NpcInit_LavaBud_01) = { - EVT_RETURN - EVT_END + Return + End }; AnimID N(D_80243848_902EB8)[] = { diff --git a/src/world/area_kmr/kmr_23/kmr_23_1_main.c b/src/world/area_kmr/kmr_23/kmr_23_1_main.c index 83c37afeeb4..444fb13bac5 100644 --- a/src/world/area_kmr/kmr_23/kmr_23_1_main.c +++ b/src/world/area_kmr/kmr_23/kmr_23_1_main.c @@ -8,79 +8,79 @@ API_CALLABLE(N(func_80240010_907A40)) { } EvtScript N(D_80241190_908BC0) = { - EVT_SET(AF_JAN01_TreeDrop_StarPiece, FALSE) - EVT_LOOP(0) - EVT_IF_NE(AF_JAN01_TreeDrop_StarPiece, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, kmr_23_ENTRY_4) - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_24"), kmr_24_ENTRY_0, TRANSITION_BEGIN_OR_END_CHAPTER) - EVT_ELSE - EVT_CALL(GotoMapSpecial, EVT_PTR("kzn_19"), kzn_19_ENTRY_3, TRANSITION_END_CHAPTER_INTERRUPTED) - EVT_END_IF - EVT_CALL(FadeOutMusic, 0, 2000) - EVT_CALL(N(func_80240010_907A40)) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Set(AF_JAN01_TreeDrop_StarPiece, FALSE) + Loop(0) + IfNe(AF_JAN01_TreeDrop_StarPiece, FALSE) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(GetEntryID, LVar0) + IfNe(LVar0, kmr_23_ENTRY_4) + Call(GotoMapSpecial, Ref("kmr_24"), kmr_24_ENTRY_0, TRANSITION_BEGIN_OR_END_CHAPTER) + Else + Call(GotoMapSpecial, Ref("kzn_19"), kzn_19_ENTRY_3, TRANSITION_END_CHAPTER_INTERRUPTED) + EndIf + Call(FadeOutMusic, 0, 2000) + Call(N(func_80240010_907A40)) + Wait(100) + Return + End }; EvtScript N(EVS_Main) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerPos, -2, 0, 0) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, TRUE) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_GetItem) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(DisablePartnerAI, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcPos, NPC_PARTNER, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 440) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 100) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 65) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kmr_23_ENTRY_0) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NpcGroup_Eldstar))) - EVT_CASE_EQ(kmr_23_ENTRY_1) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NpcGroup_Mamar))) - EVT_CASE_EQ(kmr_23_ENTRY_2) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NpcGroup_Skolar))) - EVT_CASE_EQ(kmr_23_ENTRY_3) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NpcGroup_Muskular))) - EVT_CASE_EQ(kmr_23_ENTRY_4) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NpcGroup_Misstar))) - EVT_CASE_EQ(kmr_23_ENTRY_5) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NpcGroup_Klevar))) - EVT_CASE_EQ(kmr_23_ENTRY_6) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NpcGroup_Kalmar))) - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_WAIT(1) - EVT_EXEC(N(D_80241190_908BC0)) - EVT_THREAD - EVT_CALL(FadeOutMusic, 0, 150) - EVT_CALL(ClearAmbientSounds, 150) - EVT_WAIT(10) - EVT_CALL(SetMusicTrack, 0, SONG_CHAPTER_END, 0, 8) - EVT_END_THREAD - EVT_WAIT(20) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerPos, -2, 0, 0) + Call(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, TRUE) + Call(InterpPlayerYaw, 90, 0) + Wait(1) + Call(SetPlayerAnimation, ANIM_Mario1_GetItem) + Call(GetCurrentPartnerID, LVar0) + IfNe(LVar0, PARTNER_NONE) + Call(DisablePartnerAI, FALSE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcPos, NPC_PARTNER, NPC_DISPOSE_LOCATION) + EndIf + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamPitch, CAM_DEFAULT, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, 440) + Call(SetCamPosA, CAM_DEFAULT, 0, 100) + Call(SetCamPosB, CAM_DEFAULT, 0, 0) + Call(SetCamPosC, CAM_DEFAULT, 0, 65) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kmr_23_ENTRY_0) + Call(MakeNpcs, FALSE, Ref(N(NpcGroup_Eldstar))) + CaseEq(kmr_23_ENTRY_1) + Call(MakeNpcs, FALSE, Ref(N(NpcGroup_Mamar))) + CaseEq(kmr_23_ENTRY_2) + Call(MakeNpcs, FALSE, Ref(N(NpcGroup_Skolar))) + CaseEq(kmr_23_ENTRY_3) + Call(MakeNpcs, FALSE, Ref(N(NpcGroup_Muskular))) + CaseEq(kmr_23_ENTRY_4) + Call(MakeNpcs, FALSE, Ref(N(NpcGroup_Misstar))) + CaseEq(kmr_23_ENTRY_5) + Call(MakeNpcs, FALSE, Ref(N(NpcGroup_Klevar))) + CaseEq(kmr_23_ENTRY_6) + Call(MakeNpcs, FALSE, Ref(N(NpcGroup_Kalmar))) + EndSwitch + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Wait(1) + Exec(N(D_80241190_908BC0)) + Thread + Call(FadeOutMusic, 0, 150) + Call(ClearAmbientSounds, 150) + Wait(10) + Call(SetMusicTrack, 0, SONG_CHAPTER_END, 0, 8) + EndThread + Wait(20) + Return + End }; diff --git a/src/world/area_kmr/kmr_23/kmr_23_2_npc.c b/src/world/area_kmr/kmr_23/kmr_23_2_npc.c index ece7df82c81..17835b24612 100644 --- a/src/world/area_kmr/kmr_23/kmr_23_2_npc.c +++ b/src/world/area_kmr/kmr_23/kmr_23_2_npc.c @@ -461,79 +461,79 @@ void func_80240DA4_9087D4(void) { } EvtScript N(EVS_Scene_EndOfChapter) = { - EVT_THREAD - EVT_SET(MF_Unk_0B, FALSE) - EVT_CALL(GetEntryID, LVar0) - EVT_CALL(GetNpcPos, NPC_StarSpirit, LVar1, LVar2, LVar3) - EVT_CALL(N(CreateEndChapterData), LVar0, LVar1, LVar2, LVar3) - EVT_END_THREAD - EVT_WAIT(1) - EVT_THREAD - EVT_CALL(N(AddCardAngularVelocity), 10 / DT) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(AccelerateCardSpin), 20, 150 * DT) - EVT_END_THREAD - EVT_CALL(N(MakeCardFloatUpward), 5, 0, 60, 150 * DT) - EVT_WAIT(30) - EVT_CALL(N(ShowRadialShimmer), 1, 120 * DT) - EVT_CALL(N(FadeInSpiritNpc), 60 * DT) - EVT_WAIT(30 * DT) - EVT_CALL(N(FlashScreenWhite)) - EVT_CALL(N(SpinDownStarSpirit), 1800, 100 * DT) - EVT_CALL(N(EndOfChapterBounceIn), 36, 0, 55, 60) - EVT_THREAD - EVT_CALL(N(AddCardAngularVelocity), 0) - EVT_END_THREAD - EVT_WAIT(60 * DT) - EVT_SET(MF_Unk_0B, TRUE) - EVT_WAIT(1) - EVT_CALL(SetNpcAnimation, NPC_StarSpirit, ENEMY_ANIM_8) - EVT_CALL(N(ShowMessagesInFrontOfCurtains)) - EVT_WAIT(16) - EVT_CALL(GetEntryID, LVar0) - EVT_SET(LVar1, MSG_Menus_01A5) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kmr_23_ENTRY_0) - EVT_SET(LVar1, MSG_Menus_01A5) - EVT_CASE_EQ(kmr_23_ENTRY_1) - EVT_SET(LVar1, MSG_Menus_01A6) - EVT_CASE_EQ(kmr_23_ENTRY_2) - EVT_SET(LVar1, MSG_Menus_01A7) - EVT_CASE_EQ(kmr_23_ENTRY_3) - EVT_SET(LVar1, MSG_Menus_01A8) - EVT_CASE_EQ(kmr_23_ENTRY_4) - EVT_SET(LVar1, MSG_Menus_01A9) - EVT_CASE_EQ(kmr_23_ENTRY_5) - EVT_SET(LVar1, MSG_Menus_01AA) - EVT_CASE_EQ(kmr_23_ENTRY_6) - EVT_SET(LVar1, MSG_Menus_01AB) - EVT_END_SWITCH - EVT_CALL(ShowMessageAtScreenPos, LVar1, 160, 40) - EVT_CALL(N(ShowMessagesBehindCurtains)) - EVT_WAIT(15 * DT) - EVT_SET(AF_JAN01_TreeDrop_StarPiece, TRUE) - EVT_RETURN - EVT_END + Thread + Set(MF_Unk_0B, FALSE) + Call(GetEntryID, LVar0) + Call(GetNpcPos, NPC_StarSpirit, LVar1, LVar2, LVar3) + Call(N(CreateEndChapterData), LVar0, LVar1, LVar2, LVar3) + EndThread + Wait(1) + Thread + Call(N(AddCardAngularVelocity), 10 / DT) + EndThread + Thread + Call(N(AccelerateCardSpin), 20, 150 * DT) + EndThread + Call(N(MakeCardFloatUpward), 5, 0, 60, 150 * DT) + Wait(30) + Call(N(ShowRadialShimmer), 1, 120 * DT) + Call(N(FadeInSpiritNpc), 60 * DT) + Wait(30 * DT) + Call(N(FlashScreenWhite)) + Call(N(SpinDownStarSpirit), 1800, 100 * DT) + Call(N(EndOfChapterBounceIn), 36, 0, 55, 60) + Thread + Call(N(AddCardAngularVelocity), 0) + EndThread + Wait(60 * DT) + Set(MF_Unk_0B, TRUE) + Wait(1) + Call(SetNpcAnimation, NPC_StarSpirit, ENEMY_ANIM_8) + Call(N(ShowMessagesInFrontOfCurtains)) + Wait(16) + Call(GetEntryID, LVar0) + Set(LVar1, MSG_Menus_01A5) + Switch(LVar0) + CaseEq(kmr_23_ENTRY_0) + Set(LVar1, MSG_Menus_01A5) + CaseEq(kmr_23_ENTRY_1) + Set(LVar1, MSG_Menus_01A6) + CaseEq(kmr_23_ENTRY_2) + Set(LVar1, MSG_Menus_01A7) + CaseEq(kmr_23_ENTRY_3) + Set(LVar1, MSG_Menus_01A8) + CaseEq(kmr_23_ENTRY_4) + Set(LVar1, MSG_Menus_01A9) + CaseEq(kmr_23_ENTRY_5) + Set(LVar1, MSG_Menus_01AA) + CaseEq(kmr_23_ENTRY_6) + Set(LVar1, MSG_Menus_01AB) + EndSwitch + Call(ShowMessageAtScreenPos, LVar1, 160, 40) + Call(N(ShowMessagesBehindCurtains)) + Wait(15 * DT) + Set(AF_JAN01_TreeDrop_StarPiece, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_Eldstar_01) = { - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(0.85), EVT_FLOAT(0.85), EVT_FLOAT(0.85)) - EVT_CALL(SetNpcPos, NPC_SELF, 0, 0, 20) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_EXEC(N(EVS_Scene_EndOfChapter)) - EVT_RETURN - EVT_END + Call(SetNpcScale, NPC_SELF, Float(0.85), Float(0.85), Float(0.85)) + Call(SetNpcPos, NPC_SELF, 0, 0, 20) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Exec(N(EVS_Scene_EndOfChapter)) + Return + End }; EvtScript N(EVS_NpcInit_Eldstar_02) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ENEMY_ANIM_8) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_TINT, 0, 0, 0, 0) - EVT_CALL(SetNpcPos, NPC_SELF, 0, 94, 0) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ENEMY_ANIM_8) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_TINT, 0, 0, 0, 0) + Call(SetNpcPos, NPC_SELF, 0, 94, 0) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Return + End }; NpcData N(NpcData_Eldstar)[] = { diff --git a/src/world/area_kmr/kmr_24/kmr_24_1_main.c b/src/world/area_kmr/kmr_24/kmr_24_1_main.c index 961ced708a7..0b2c4366954 100644 --- a/src/world/area_kmr/kmr_24/kmr_24_1_main.c +++ b/src/world/area_kmr/kmr_24/kmr_24_1_main.c @@ -43,54 +43,54 @@ API_CALLABLE(N(SaveAndContinue)) { } EvtScript N(EVS_SaveAndContinue_Prompt) = { - EVT_WAIT(10) - EVT_CALL(ShowMessageAtScreenPos, MSG_Choice_004D, 160, 40) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(N(SaveAndContinue)) - EVT_WAIT(10) - EVT_CASE_EQ(1) - EVT_CALL(N(SaveAndContinue)) - EVT_WAIT(10) - EVT_CALL(N(ExitGame)) - EVT_WAIT(100) - EVT_CASE_EQ(2) - EVT_END_SWITCH - EVT_CALL(GotoMapSpecial, EVT_PTR("osr_03"), osr_03_ENTRY_4, TRANSITION_AFTER_SAVE_PROMPT) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Wait(10) + Call(ShowMessageAtScreenPos, MSG_Choice_004D, 160, 40) + Switch(LVar0) + CaseEq(0) + Call(N(SaveAndContinue)) + Wait(10) + CaseEq(1) + Call(N(SaveAndContinue)) + Wait(10) + Call(N(ExitGame)) + Wait(100) + CaseEq(2) + EndSwitch + Call(GotoMapSpecial, Ref("osr_03"), osr_03_ENTRY_4, TRANSITION_AFTER_SAVE_PROMPT) + Wait(100) + Return + End }; EvtScript N(EVS_Main) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerPos, -1000, 0, 0) //@bug? improper dispose location for player - EVT_WAIT(1) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcPos, NPC_PARTNER, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 208, 208, 208) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 440) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 100) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 65) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SaveAndContinue_Prompt)) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerPos, -1000, 0, 0) //@bug? improper dispose location for player + Wait(1) + Call(GetCurrentPartnerID, LVar0) + IfNe(LVar0, PARTNER_NONE) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcPos, NPC_PARTNER, NPC_DISPOSE_LOCATION) + EndIf + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 208, 208, 208) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamPitch, CAM_DEFAULT, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, 440) + Call(SetCamPosA, CAM_DEFAULT, 0, 100) + Call(SetCamPosB, CAM_DEFAULT, 0, 0) + Call(SetCamPosC, CAM_DEFAULT, 0, 65) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Wait(1) + Exec(N(EVS_SaveAndContinue_Prompt)) + Return + End }; diff --git a/src/world/area_kmr/kmr_30/kmr_30_1_main.c b/src/world/area_kmr/kmr_30/kmr_30_1_main.c index cf9815cb8ae..b42cdffb9bf 100644 --- a/src/world/area_kmr/kmr_30/kmr_30_1_main.c +++ b/src/world/area_kmr/kmr_30/kmr_30_1_main.c @@ -3,17 +3,17 @@ #include "world/common/atomic/TexturePan.inc.c" EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MARIOS_HOUSE) - EVT_CALL(SetSpriteShading, SHADING_KMR_30) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(EnableWorldStatusBar, FALSE) - EVT_THREAD - EVT_CALL(FadeOutMusic, 0, 0x00001388) - EVT_WAIT(390) - EVT_CALL(SetMusicTrack, 0, SONG_THE_END, 0, 8) - EVT_END_THREAD - EVT_EXEC(N(EVS_Scene_TheEnd)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MARIOS_HOUSE) + Call(SetSpriteShading, SHADING_KMR_30) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(EnableWorldStatusBar, FALSE) + Thread + Call(FadeOutMusic, 0, 0x00001388) + Wait(390) + Call(SetMusicTrack, 0, SONG_THE_END, 0, 8) + EndThread + Exec(N(EVS_Scene_TheEnd)) + Return + End }; diff --git a/src/world/area_kmr/kmr_30/kmr_30_3_the_end.c b/src/world/area_kmr/kmr_30/kmr_30_3_the_end.c index 7fded07ffe1..2594a96bf10 100644 --- a/src/world/area_kmr/kmr_30/kmr_30_3_the_end.c +++ b/src/world/area_kmr/kmr_30/kmr_30_3_the_end.c @@ -50,44 +50,44 @@ API_CALLABLE(N(ChooseFireworkColors)) { } EvtScript N(EVS_RandomFireworks) = { - EVT_SET(LVarA, LVar0) - EVT_CALL(RandInt, 400, LVar0) - EVT_SET(LVar1, -47) - EVT_ADD(LVar1, LVar0) - EVT_CALL(RandInt, 250, LVar0) - EVT_SET(LVar2, 220) - EVT_ADD(LVar2, LVar0) - EVT_CALL(RandInt, 200, LVar0) - EVT_SET(LVar3, -450) - EVT_ADD(LVar3, LVar0) - EVT_CALL(RandInt, 2, LVar0) - EVT_SET(LVar4, -1) - EVT_ADD(LVar4, LVar0) - EVT_CALL(RandInt, 4, LVar0) - EVT_SET(LVar5, 2) - EVT_ADD(LVar5, LVar0) - EVT_CALL(RandInt, 2, LVar0) - EVT_SET(LVar6, -1) - EVT_ADD(LVar6, LVar0) - EVT_CALL(RandInt, 5, LVar0) - EVT_SETF(LVar7, EVT_FLOAT(1.0)) - EVT_MULF(LVar0, EVT_FLOAT(0.1)) - EVT_ADDF(LVar7, LVar0) - EVT_PLAY_EFFECT(EFFECT_FIREWORK_ROCKET, LVarA, LVar1, LVar2, LVar3, LVar4, LVar5, LVar6, LVar7, 70) - EVT_CALL(N(ChooseFireworkColors), LVarF) - EVT_IF_NE(LVarA, 2) - EVT_CALL(RandInt, 100, LVar8) - EVT_IF_LT(LVar8, 50) - EVT_IF_EQ(LVarA, 0) - EVT_PLAY_EFFECT(EFFECT_FIREWORK_ROCKET, 1, LVar1, LVar2, LVar3, LVar4, LVar5, LVar6, LVar7, 70) - EVT_ELSE - EVT_PLAY_EFFECT(EFFECT_FIREWORK_ROCKET, 0, LVar1, LVar2, LVar3, LVar4, LVar5, LVar6, LVar7, 70) - EVT_END_IF - EVT_CALL(N(ChooseFireworkColors), LVarF) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Call(RandInt, 400, LVar0) + Set(LVar1, -47) + Add(LVar1, LVar0) + Call(RandInt, 250, LVar0) + Set(LVar2, 220) + Add(LVar2, LVar0) + Call(RandInt, 200, LVar0) + Set(LVar3, -450) + Add(LVar3, LVar0) + Call(RandInt, 2, LVar0) + Set(LVar4, -1) + Add(LVar4, LVar0) + Call(RandInt, 4, LVar0) + Set(LVar5, 2) + Add(LVar5, LVar0) + Call(RandInt, 2, LVar0) + Set(LVar6, -1) + Add(LVar6, LVar0) + Call(RandInt, 5, LVar0) + SetF(LVar7, Float(1.0)) + MulF(LVar0, Float(0.1)) + AddF(LVar7, LVar0) + PlayEffect(EFFECT_FIREWORK_ROCKET, LVarA, LVar1, LVar2, LVar3, LVar4, LVar5, LVar6, LVar7, 70) + Call(N(ChooseFireworkColors), LVarF) + IfNe(LVarA, 2) + Call(RandInt, 100, LVar8) + IfLt(LVar8, 50) + IfEq(LVarA, 0) + PlayEffect(EFFECT_FIREWORK_ROCKET, 1, LVar1, LVar2, LVar3, LVar4, LVar5, LVar6, LVar7, 70) + Else + PlayEffect(EFFECT_FIREWORK_ROCKET, 0, LVar1, LVar2, LVar3, LVar4, LVar5, LVar6, LVar7, 70) + EndIf + Call(N(ChooseFireworkColors), LVarF) + EndIf + EndIf + Return + End }; s32 TheEndModelAlpha = 0; @@ -103,135 +103,135 @@ void N(gfx_build_the_end)(void) { } EvtScript N(EVS_Scene_TheEnd) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(SetPlayerPos, 520, 0, -180) - EVT_CALL(SetNpcAnimation, NPC_ParadePeach, ANIM_ParadePeach_ShadeIdle) - EVT_CALL(SetNpcYaw, NPC_ParadePeach, 270) - EVT_CALL(SetNpcPos, NPC_ParadePeach, 560, 0, -180) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcPos, NPC_PARTNER, 0, -500, 0) - EVT_CALL(EnableGroup, MODEL_the_end, FALSE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(8.0), EVT_FLOAT(-11.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_CALL(SetNpcSpeed, NPC_ParadePeach, EVT_FLOAT(2.0)) - EVT_CALL(SetNpcFlagBits, NPC_ParadePeach, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_ParadePeach, NPC_FLAG_FLYING, FALSE) - EVT_CALL(SetNpcAnimation, NPC_ParadePeach, ANIM_ParadePeach_ShadeWalk) - EVT_CALL(NpcMoveTo, NPC_ParadePeach, 450, -60, 0) - EVT_CALL(SetNpcAnimation, NPC_ParadePeach, ANIM_ParadePeach_ShadeWalkBack) - EVT_CALL(NpcMoveTo, NPC_ParadePeach, 350, -90, 0) - EVT_CALL(NpcMoveTo, NPC_ParadePeach, 330, -130, 0) - EVT_CALL(SetNpcAnimation, NPC_ParadePeach, ANIM_ParadePeach_ShadeBack) - EVT_END_THREAD - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(2.0)) - EVT_CALL(PlayerMoveTo, 450, -60, 0) - EVT_CALL(PlayerMoveTo, 320, -80, 0) - EVT_CALL(PlayerMoveTo, 300, -120, 0) - EVT_WAIT(30) - EVT_PLAY_EFFECT(EFFECT_FIREWORK_ROCKET, 0, 153, 370, -350, -1, 4, -1, EVT_FLOAT(1.6), 70) - EVT_CALL(N(ChooseFireworkColors), LVarF) - EVT_WAIT(30) - EVT_PLAY_EFFECT(EFFECT_FIREWORK_ROCKET, 1, 333, 420, -270, -1, 4, -1, EVT_FLOAT(1.6), 70) - EVT_CALL(N(ChooseFireworkColors), LVarF) - EVT_WAIT(30) - EVT_PLAY_EFFECT(EFFECT_FIREWORK_ROCKET, 0, -27, 320, -430, -1, 4, -1, EVT_FLOAT(1.6), 70) - EVT_CALL(N(ChooseFireworkColors), LVarF) - EVT_WAIT(80) - EVT_PLAY_EFFECT(EFFECT_FIREWORK_ROCKET, 2, 153, 370, -350, -1, 4, -1, EVT_FLOAT(1.6), 70) - EVT_CALL(N(ChooseFireworkColors), LVarF) - EVT_WAIT(30) - EVT_THREAD - EVT_WAIT(150) - EVT_LOOP(0) - EVT_CALL(RandInt, 60, LVar1) - EVT_ADD(LVar1, 5) - EVT_CALL(RandInt, 5, LVar2) - EVT_ADD(LVar2, 1) - EVT_LOOP(LVar2) - EVT_SET(LVar0, 0) - EVT_EXEC(N(EVS_RandomFireworks)) - EVT_WAIT(LVar1) - EVT_END_LOOP - EVT_CALL(RandInt, 60, LVar0) - EVT_ADD(LVar0, 60) - EVT_WAIT(LVar0) - EVT_SET(LVar0, 2) - EVT_EXEC(N(EVS_RandomFireworks)) - EVT_CALL(RandInt, 60, LVar0) - EVT_ADD(LVar0, 60) - EVT_WAIT(LVar0) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(240) - EVT_LOOP(0) - EVT_CALL(RandInt, 60, LVar1) - EVT_ADD(LVar1, 5) - EVT_CALL(RandInt, 5, LVar2) - EVT_ADD(LVar2, 1) - EVT_LOOP(LVar2) - EVT_SET(LVar0, 1) - EVT_EXEC(N(EVS_RandomFireworks)) - EVT_WAIT(LVar1) - EVT_END_LOOP - EVT_CALL(RandInt, 60, LVar0) - EVT_ADD(LVar0, 60) - EVT_WAIT(LVar0) - EVT_SET(LVar0, 2) - EVT_EXEC(N(EVS_RandomFireworks)) - EVT_CALL(RandInt, 60, LVar0) - EVT_ADD(LVar0, 60) - EVT_WAIT(LVar0) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(30) - EVT_CALL(EnableGroup, MODEL_the_end, TRUE) - EVT_CALL(SetModelCustomGfx, MODEL_t, CUSTOM_GFX_1, -1) - EVT_CALL(SetModelCustomGfx, MODEL_h, CUSTOM_GFX_1, -1) - EVT_CALL(SetModelCustomGfx, MODEL_e, CUSTOM_GFX_1, -1) - EVT_CALL(SetModelCustomGfx, MODEL_d, CUSTOM_GFX_1, -1) - EVT_CALL(SetModelCustomGfx, MODEL_n, CUSTOM_GFX_1, -1) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(gfx_build_the_end)), NULL) - EVT_CALL(MakeLerp, 0, 255, 90, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(UpdateTheEndAlpha), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(600) - EVT_THREAD - EVT_PLAY_EFFECT(EFFECT_FIREWORK_ROCKET, 0, 310, 280, -250, -1, 6, -1, EVT_FLOAT(1.6), 70) - EVT_CALL(N(ChooseFireworkColors), LVarF) - EVT_END_THREAD - EVT_WAIT(20) - EVT_CALL(MakeLerp, 0, 100, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, EVT_FLOAT(3.6)) - EVT_SETF(LVar3, EVT_FLOAT(-6.0)) - EVT_SETF(LVar4, EVT_FLOAT(0.6)) - EVT_SETF(LVar5, EVT_FLOAT(-0.0048828125)) - EVT_MULF(LVar2, LVar0) - EVT_MULF(LVar3, LVar0) - EVT_MULF(LVar4, LVar0) - EVT_MULF(LVar5, LVar0) - EVT_ADDF(LVar5, EVT_FLOAT(1.0)) - EVT_CALL(ScaleGroup, MODEL_the_end, LVar5, LVar5, LVar5) - EVT_CALL(TranslateGroup, MODEL_the_end, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(InterpPlayerYaw, 270, 0) + Call(SetPlayerPos, 520, 0, -180) + Call(SetNpcAnimation, NPC_ParadePeach, ANIM_ParadePeach_ShadeIdle) + Call(SetNpcYaw, NPC_ParadePeach, 270) + Call(SetNpcPos, NPC_ParadePeach, 560, 0, -180) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcPos, NPC_PARTNER, 0, -500, 0) + Call(EnableGroup, MODEL_the_end, FALSE) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetCamPitch, CAM_DEFAULT, Float(8.0), Float(-11.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Call(SetNpcSpeed, NPC_ParadePeach, Float(2.0)) + Call(SetNpcFlagBits, NPC_ParadePeach, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcFlagBits, NPC_ParadePeach, NPC_FLAG_FLYING, FALSE) + Call(SetNpcAnimation, NPC_ParadePeach, ANIM_ParadePeach_ShadeWalk) + Call(NpcMoveTo, NPC_ParadePeach, 450, -60, 0) + Call(SetNpcAnimation, NPC_ParadePeach, ANIM_ParadePeach_ShadeWalkBack) + Call(NpcMoveTo, NPC_ParadePeach, 350, -90, 0) + Call(NpcMoveTo, NPC_ParadePeach, 330, -130, 0) + Call(SetNpcAnimation, NPC_ParadePeach, ANIM_ParadePeach_ShadeBack) + EndThread + Call(SetPlayerSpeed, Float(2.0)) + Call(PlayerMoveTo, 450, -60, 0) + Call(PlayerMoveTo, 320, -80, 0) + Call(PlayerMoveTo, 300, -120, 0) + Wait(30) + PlayEffect(EFFECT_FIREWORK_ROCKET, 0, 153, 370, -350, -1, 4, -1, Float(1.6), 70) + Call(N(ChooseFireworkColors), LVarF) + Wait(30) + PlayEffect(EFFECT_FIREWORK_ROCKET, 1, 333, 420, -270, -1, 4, -1, Float(1.6), 70) + Call(N(ChooseFireworkColors), LVarF) + Wait(30) + PlayEffect(EFFECT_FIREWORK_ROCKET, 0, -27, 320, -430, -1, 4, -1, Float(1.6), 70) + Call(N(ChooseFireworkColors), LVarF) + Wait(80) + PlayEffect(EFFECT_FIREWORK_ROCKET, 2, 153, 370, -350, -1, 4, -1, Float(1.6), 70) + Call(N(ChooseFireworkColors), LVarF) + Wait(30) + Thread + Wait(150) + Loop(0) + Call(RandInt, 60, LVar1) + Add(LVar1, 5) + Call(RandInt, 5, LVar2) + Add(LVar2, 1) + Loop(LVar2) + Set(LVar0, 0) + Exec(N(EVS_RandomFireworks)) + Wait(LVar1) + EndLoop + Call(RandInt, 60, LVar0) + Add(LVar0, 60) + Wait(LVar0) + Set(LVar0, 2) + Exec(N(EVS_RandomFireworks)) + Call(RandInt, 60, LVar0) + Add(LVar0, 60) + Wait(LVar0) + EndLoop + EndThread + Thread + Wait(240) + Loop(0) + Call(RandInt, 60, LVar1) + Add(LVar1, 5) + Call(RandInt, 5, LVar2) + Add(LVar2, 1) + Loop(LVar2) + Set(LVar0, 1) + Exec(N(EVS_RandomFireworks)) + Wait(LVar1) + EndLoop + Call(RandInt, 60, LVar0) + Add(LVar0, 60) + Wait(LVar0) + Set(LVar0, 2) + Exec(N(EVS_RandomFireworks)) + Call(RandInt, 60, LVar0) + Add(LVar0, 60) + Wait(LVar0) + EndLoop + EndThread + Wait(30) + Call(EnableGroup, MODEL_the_end, TRUE) + Call(SetModelCustomGfx, MODEL_t, CUSTOM_GFX_1, -1) + Call(SetModelCustomGfx, MODEL_h, CUSTOM_GFX_1, -1) + Call(SetModelCustomGfx, MODEL_e, CUSTOM_GFX_1, -1) + Call(SetModelCustomGfx, MODEL_d, CUSTOM_GFX_1, -1) + Call(SetModelCustomGfx, MODEL_n, CUSTOM_GFX_1, -1) + Call(SetCustomGfxBuilders, CUSTOM_GFX_1, Ref(N(gfx_build_the_end)), NULL) + Call(MakeLerp, 0, 255, 90, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(N(UpdateTheEndAlpha), LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(600) + Thread + PlayEffect(EFFECT_FIREWORK_ROCKET, 0, 310, 280, -250, -1, 6, -1, Float(1.6), 70) + Call(N(ChooseFireworkColors), LVarF) + EndThread + Wait(20) + Call(MakeLerp, 0, 100, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, Float(3.6)) + SetF(LVar3, Float(-6.0)) + SetF(LVar4, Float(0.6)) + SetF(LVar5, Float(-0.0048828125)) + MulF(LVar2, LVar0) + MulF(LVar3, LVar0) + MulF(LVar4, LVar0) + MulF(LVar5, LVar0) + AddF(LVar5, Float(1.0)) + Call(ScaleGroup, MODEL_the_end, LVar5, LVar5, LVar5) + Call(TranslateGroup, MODEL_the_end, LVar2, LVar3, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; diff --git a/src/world/area_kpa/kpa_01/kpa_01_1_music.c b/src/world/area_kpa/kpa_01/kpa_01_1_music.c index b5d31a7cf13..f265c514774 100644 --- a/src/world/area_kpa/kpa_01/kpa_01_1_music.c +++ b/src/world/area_kpa/kpa_01/kpa_01_1_music.c @@ -1,9 +1,9 @@ #include "kpa_01.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE_CAVES, 0, 8) - EVT_CALL(ClearAmbientSounds, 250) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE_CAVES, 0, 8) + Call(ClearAmbientSounds, 250) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Return + End }; diff --git a/src/world/area_kpa/kpa_01/kpa_01_2_main.c b/src/world/area_kpa/kpa_01/kpa_01_2_main.c index 46ea783692f..d4215a38d94 100644 --- a/src/world/area_kpa/kpa_01/kpa_01_2_main.c +++ b/src/world/area_kpa/kpa_01/kpa_01_2_main.c @@ -3,57 +3,57 @@ #include "world/common/atomic/CreateDarkness.inc.c" EvtScript N(EVS_ExitDoor_kpa_14_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, kpa_01_ENTRY_0) - EVT_SET(LVar1, COLLIDER_tte) - EVT_SET(LVar2, MODEL_o205) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kpa_14"), kpa_14_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, kpa_01_ENTRY_0) + Set(LVar1, COLLIDER_tte) + Set(LVar2, MODEL_o205) + Set(LVar3, DOOR_SWING_IN) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("kpa_14"), kpa_14_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_kpa_03_0) = EVT_EXIT_WALK(60, kpa_01_ENTRY_1, "kpa_03", kpa_03_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_kpa_14_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoor_kpa_14_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kpa_01_ENTRY_0) - EVT_SET(LVar0, kpa_01_ENTRY_0) - EVT_SET(LVar1, MODEL_exit2) - EVT_SET(LVar2, MODEL_o205) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(EnterSingleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kpa_01_ENTRY_1) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kpa_01_ENTRY_0) + Set(LVar0, kpa_01_ENTRY_0) + Set(LVar1, MODEL_exit2) + Set(LVar2, MODEL_o205) + Set(LVar3, DOOR_SWING_IN) + Exec(EnterSingleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kpa_01_ENTRY_1) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_CreateDarkness)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_CreateDarkness)) + Exec(N(EVS_EnterMap)) + Wait(1) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_kpa/kpa_01/kpa_01_4_entity.c b/src/world/area_kpa/kpa_01/kpa_01_4_entity.c index 8663241a3f6..ff532083121 100644 --- a/src/world/area_kpa/kpa_01/kpa_01_4_entity.c +++ b/src/world/area_kpa/kpa_01/kpa_01_4_entity.c @@ -2,8 +2,8 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 220, 208, -125, 0, ITEM_POW_BLOCK, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KPA01_ItemBlock_POWBlock) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_YellowBlock), 220, 208, -125, 0, ITEM_POW_BLOCK, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KPA01_ItemBlock_POWBlock) + Return + End }; diff --git a/src/world/area_kpa/kpa_03/kpa_03_1_music.c b/src/world/area_kpa/kpa_03/kpa_03_1_music.c index 7c9777daecf..07123ff1d9f 100644 --- a/src/world/area_kpa/kpa_03/kpa_03_1_music.c +++ b/src/world/area_kpa/kpa_03/kpa_03_1_music.c @@ -1,8 +1,8 @@ #include "kpa_03.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE_CAVES, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE_CAVES, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Return + End }; diff --git a/src/world/area_kpa/kpa_03/kpa_03_2_main.c b/src/world/area_kpa/kpa_03/kpa_03_2_main.c index b9b11e16ed6..39c5872b55e 100644 --- a/src/world/area_kpa/kpa_03/kpa_03_2_main.c +++ b/src/world/area_kpa/kpa_03/kpa_03_2_main.c @@ -6,29 +6,29 @@ EvtScript N(EVS_ExitWalk_kpa_01_1) = EVT_EXIT_WALK(60, kpa_03_ENTRY_0, "kpa_01", EvtScript N(EVS_ExitWalk_kpa_04_0) = EVT_EXIT_WALK(60, kpa_03_ENTRY_1, "kpa_04", kpa_04_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_01_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_01_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_CreateDarkness)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_CreateDarkness)) + Exec(N(EVS_EnterMap)) + Wait(1) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_kpa/kpa_03/kpa_03_4_entity.c b/src/world/area_kpa/kpa_03/kpa_03_4_entity.c index d81ac64281b..a13d6d16348 100644 --- a/src/world/area_kpa/kpa_03/kpa_03_4_entity.c +++ b/src/world/area_kpa/kpa_03/kpa_03_4_entity.c @@ -14,50 +14,50 @@ API_CALLABLE(N(MonitorPlayerAltitude)) { } EvtScript N(EVS_TetherCamToPlayer) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GE(LVar1, LVar3) - EVT_SET(LVar1, LVar3) - EVT_END_IF - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGe(LVar1, LVar3) + Set(LVar1, LVar3) + EndIf + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_UseSpring) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAUNCH) - EVT_IF_EQ(MV_PlayerHeightLevel, 0) - EVT_SET(LVar3, -275) - EVT_EXEC_GET_TID(N(EVS_TetherCamToPlayer), LVarA) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7)) - EVT_CALL(PlayerJump, -507, -288, -159, 20) - EVT_ELSE - EVT_SET(LVar3, 0) - EVT_EXEC_GET_TID(N(EVS_TetherCamToPlayer), LVarA) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.1)) - EVT_CALL(PlayerJump, -500, 0, -150, 40) - EVT_END_IF - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_WAIT(4) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAUNCH) + IfEq(MV_PlayerHeightLevel, 0) + Set(LVar3, -275) + ExecGetTID(N(EVS_TetherCamToPlayer), LVarA) + Call(SetPlayerJumpscale, Float(0.7)) + Call(PlayerJump, -507, -288, -159, 20) + Else + Set(LVar3, 0) + ExecGetTID(N(EVS_TetherCamToPlayer), LVarA) + Call(SetPlayerJumpscale, Float(1.1)) + Call(PlayerJump, -500, 0, -150, 40) + EndIf + KillThread(LVarA) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Wait(4) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_THREAD - EVT_CALL(N(MonitorPlayerAltitude)) - EVT_END_THREAD - EVT_CALL(MakeEntity, EVT_PTR(Entity_ScriptSpring), -400, -300, -150, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_UseSpring))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 620, -65, -200, 0, ITEM_SHOOTING_STAR, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KPA03_ItemBlock_ShootingStar) - EVT_RETURN - EVT_END + Thread + Call(N(MonitorPlayerAltitude)) + EndThread + Call(MakeEntity, Ref(Entity_ScriptSpring), -400, -300, -150, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_UseSpring))) + Call(MakeEntity, Ref(Entity_YellowBlock), 620, -65, -200, 0, ITEM_SHOOTING_STAR, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KPA03_ItemBlock_ShootingStar) + Return + End }; diff --git a/src/world/area_kpa/kpa_04/kpa_04_1_music.c b/src/world/area_kpa/kpa_04/kpa_04_1_music.c index e2c545e4ddd..a5e2eb304ea 100644 --- a/src/world/area_kpa/kpa_04/kpa_04_1_music.c +++ b/src/world/area_kpa/kpa_04/kpa_04_1_music.c @@ -1,12 +1,12 @@ #include "kpa_04.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_1) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_1) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_04/kpa_04_2_main.c b/src/world/area_kpa/kpa_04/kpa_04_2_main.c index 4383447a763..c2ff93c0a52 100644 --- a/src/world/area_kpa/kpa_04/kpa_04_2_main.c +++ b/src/world/area_kpa/kpa_04/kpa_04_2_main.c @@ -4,27 +4,27 @@ EvtScript N(EVS_ExitWalk_kpa_03_1) = EVT_EXIT_WALK(60, kpa_04_ENTRY_0, "kpa_03", EvtScript N(EVS_ExitWalk_kpa_81_3) = EVT_EXIT_WALK(60, kpa_04_ENTRY_1, "kpa_81", kpa_81_ENTRY_3); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_03_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_81_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_03_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_81_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_EXEC(N(EVS_SetupStatues)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Exec(N(EVS_SetupStatues)) + Exec(N(EVS_EnterMap)) + Wait(1) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_kpa/kpa_04/kpa_04_3_statues.c b/src/world/area_kpa/kpa_04/kpa_04_3_statues.c index 6cd8051e25b..735aa318398 100644 --- a/src/world/area_kpa/kpa_04/kpa_04_3_statues.c +++ b/src/world/area_kpa/kpa_04/kpa_04_3_statues.c @@ -4,127 +4,127 @@ #include "world/common/todo/UnkFunc12.inc.c" EvtScript N(EVS_PushStatue_Impl) = { - EVT_LOOP(20) - EVT_CALL(GetPartnerInUse, LVarA) - EVT_IF_NE(LVarA, 0) - EVT_SET(LVar9, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(UnkFunc11), 25) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LVar9, 0) - EVT_RETURN - EVT_ELSE - EVT_CALL(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetPartnerInUse, LVarA) - EVT_IF_NE(LVarA, 0) - EVT_SET(LVar9, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o160, SOUND_LOOP_MOVE_STATUE, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 100, EVT_FLOAT(0.6)) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(EnableGroup, MODEL_g22, TRUE) - EVT_CALL(MakeLerp, 6, 100, 100, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVarA, LVar0) - EVT_MULF(LVarA, EVT_FLOAT(0.01)) - EVT_CALL(ScaleGroup, MODEL_g22, LVarA, 1, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar1, LVar0) - EVT_ADD(LVar1, LVarB) - EVT_CALL(MakeLerp, LVar0, LVar1, 100, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) - EVT_CALL(UpdateLerp) - EVT_CALL(N(UnkFunc12)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, LVarB, 100, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g20, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o160) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(StopSound, SOUND_LOOP_MOVE_STATUE) - EVT_RETURN - EVT_END + Loop(20) + Call(GetPartnerInUse, LVarA) + IfNe(LVarA, 0) + Set(LVar9, 0) + Return + EndIf + Call(N(UnkFunc11), 25) + IfEq(LVar0, 0) + Set(LVar9, 0) + Return + Else + Call(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) + EndIf + Wait(1) + EndLoop + Call(GetPartnerInUse, LVarA) + IfNe(LVarA, 0) + Set(LVar9, 0) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(PlaySoundAtCollider, COLLIDER_o160, SOUND_LOOP_MOVE_STATUE, SOUND_SPACE_DEFAULT) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 100, Float(0.6)) + EndThread + Thread + Call(EnableGroup, MODEL_g22, TRUE) + Call(MakeLerp, 6, 100, 100, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + SetF(LVarA, LVar0) + MulF(LVarA, Float(0.01)) + Call(ScaleGroup, MODEL_g22, LVarA, 1, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(InterpPlayerYaw, 270, 0) + Call(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar1, LVar0) + Add(LVar1, LVarB) + Call(MakeLerp, LVar0, LVar1, 100, EASING_LINEAR) + Loop(0) + Call(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) + Call(UpdateLerp) + Call(N(UnkFunc12)) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(DisablePlayerInput, FALSE) + EndThread + Call(MakeLerp, 0, LVarB, 100, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g20, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o160) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(StopSound, SOUND_LOOP_MOVE_STATUE) + Return + End }; EvtScript N(EVS_PushStatue_FromRight) = { - EVT_IF_NE(GB_KPA04_StatuePosition, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LE(LVar0, 30) - EVT_RETURN - EVT_END_IF - EVT_IF_LE(LVar2, 130) - EVT_RETURN - EVT_END_IF - EVT_IF_GE(LVar2, 170) - EVT_RETURN - EVT_END_IF - EVT_IF_GE(LVar0, 0) - EVT_SET(LVar9, 1) - EVT_SET(LVarB, -50) - EVT_EXEC_WAIT(N(EVS_PushStatue_Impl)) - EVT_ELSE - EVT_SET(LVar9, 2) - EVT_SET(LVarB, 50) - EVT_EXEC_WAIT(N(EVS_PushStatue_Impl)) - EVT_END_IF - EVT_SET(GB_KPA04_StatuePosition, LVar9) - EVT_IF_NE(GB_KPA04_StatuePosition, 0) - EVT_CALL(EnableModel, MODEL_o187, TRUE) - EVT_CALL(EnableModel, MODEL_o180, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitts, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_RETURN - EVT_END + IfNe(GB_KPA04_StatuePosition, 0) + Return + EndIf + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLe(LVar0, 30) + Return + EndIf + IfLe(LVar2, 130) + Return + EndIf + IfGe(LVar2, 170) + Return + EndIf + IfGe(LVar0, 0) + Set(LVar9, 1) + Set(LVarB, -50) + ExecWait(N(EVS_PushStatue_Impl)) + Else + Set(LVar9, 2) + Set(LVarB, 50) + ExecWait(N(EVS_PushStatue_Impl)) + EndIf + Set(GB_KPA04_StatuePosition, LVar9) + IfNe(GB_KPA04_StatuePosition, 0) + Call(EnableModel, MODEL_o187, TRUE) + Call(EnableModel, MODEL_o180, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitts, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Return + End }; EvtScript N(EVS_SetupStatues) = { - EVT_CALL(ParentColliderToModel, COLLIDER_o160, MODEL_o103) - EVT_SWITCH(GB_KPA04_StatuePosition) - EVT_CASE_EQ(0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_PushStatue_FromRight)), TRIGGER_WALL_PUSH, COLLIDER_o160, 1, 0) - EVT_CALL(EnableGroup, MODEL_g22, FALSE) - EVT_CASE_EQ(1) - EVT_CALL(TranslateGroup, MODEL_g20, -50, 0, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitts, COLLIDER_FLAGS_UPPER_MASK) - EVT_CASE_EQ(2) - EVT_CALL(TranslateGroup, MODEL_g20, 50, 0, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitts, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_SWITCH - EVT_CALL(UpdateColliderTransform, COLLIDER_o160) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deiliwtt, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Call(ParentColliderToModel, COLLIDER_o160, MODEL_o103) + Switch(GB_KPA04_StatuePosition) + CaseEq(0) + BindTrigger(Ref(N(EVS_PushStatue_FromRight)), TRIGGER_WALL_PUSH, COLLIDER_o160, 1, 0) + Call(EnableGroup, MODEL_g22, FALSE) + CaseEq(1) + Call(TranslateGroup, MODEL_g20, -50, 0, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitts, COLLIDER_FLAGS_UPPER_MASK) + CaseEq(2) + Call(TranslateGroup, MODEL_g20, 50, 0, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitts, COLLIDER_FLAGS_UPPER_MASK) + EndSwitch + Call(UpdateColliderTransform, COLLIDER_o160) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deiliwtt, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; diff --git a/src/world/area_kpa/kpa_08/kpa_08_1_music.c b/src/world/area_kpa/kpa_08/kpa_08_1_music.c index 4cdd0662217..cede1080089 100644 --- a/src/world/area_kpa/kpa_08/kpa_08_1_music.c +++ b/src/world/area_kpa/kpa_08/kpa_08_1_music.c @@ -1,12 +1,12 @@ #include "kpa_08.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_08/kpa_08_2_main.c b/src/world/area_kpa/kpa_08/kpa_08_2_main.c index ae2ad3ff300..cef7470bc4e 100644 --- a/src/world/area_kpa/kpa_08/kpa_08_2_main.c +++ b/src/world/area_kpa/kpa_08/kpa_08_2_main.c @@ -4,38 +4,38 @@ EvtScript N(EVS_ExitDoors_kpa_52_2) = EVT_EXIT_DOUBLE_DOOR(kpa_08_ENTRY_0, "kpa_ EvtScript N(EVS_ExitWalk_kpa_100_0) = EVT_EXIT_WALK(40, kpa_08_ENTRY_1, "kpa_100", kpa_100_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_52_2)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_100_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_kpa_52_2)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_100_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kpa_08_ENTRY_0) - EVT_SET(LVar0, kpa_08_ENTRY_0) - EVT_SET(LVar2, MODEL_o160) - EVT_SET(LVar3, MODEL_o159) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kpa_08_ENTRY_1) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kpa_08_ENTRY_0) + Set(LVar0, kpa_08_ENTRY_0) + Set(LVar2, MODEL_o160) + Set(LVar3, MODEL_o159) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kpa_08_ENTRY_1) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_EnterMap)) + Wait(1) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_kpa/kpa_08/kpa_08_3_entity.c b/src/world/area_kpa/kpa_08/kpa_08_3_entity.c index 66d9fdf316f..304271112d5 100644 --- a/src/world/area_kpa/kpa_08/kpa_08_3_entity.c +++ b/src/world/area_kpa/kpa_08/kpa_08_3_entity.c @@ -16,85 +16,85 @@ API_CALLABLE(N(ElevatePlayer)) { } EvtScript N(EVS_ActivateSwitch) = { - EVT_IF_NE(AF_KPA08_PlatformRaised, FALSE) - EVT_RETURN - EVT_END_IF - EVT_SET(AF_KPA08_PlatformRaised, TRUE) - EVT_CALL(N(EnableCameraFollowPlayerY)) - EVT_THREAD - EVT_SET_GROUP(EVT_GROUP_EF) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o19, SOUND_KPA_RAISE_STONE_PLATFORM, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, -50, 0, 15, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(ElevatePlayer), 15, 100) - EVT_CALL(TranslateGroup, MODEL_move, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o19) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(80) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o19, SOUND_KPA_LOWER_STONE_PLATFORM, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, -50, 20, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(ElevatePlayer), 15, 100) - EVT_CALL(TranslateGroup, MODEL_move, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o19) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_SET_GROUP(EVT_GROUP_EF) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o90, SOUND_KPA_RAISE_STONE_PLATFORM, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, -99, 0, 15, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(ElevatePlayer), 17, 100) - EVT_CALL(TranslateGroup, MODEL_move2, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o90) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, FALSE) - EVT_WAIT(80) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o90, SOUND_KPA_LOWER_STONE_PLATFORM, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, -99, 15, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(ElevatePlayer), 17, 100) - EVT_CALL(TranslateGroup, MODEL_move2, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o90) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(TranslateGroup, MODEL_move2, 0, -99, -1) - EVT_SET(AF_KPA08_PlatformRaised, FALSE) - EVT_END_THREAD - EVT_RETURN - EVT_END + IfNe(AF_KPA08_PlatformRaised, FALSE) + Return + EndIf + Set(AF_KPA08_PlatformRaised, TRUE) + Call(N(EnableCameraFollowPlayerY)) + Thread + SetGroup(EVT_GROUP_EF) + Call(PlaySoundAtCollider, COLLIDER_o19, SOUND_KPA_RAISE_STONE_PLATFORM, SOUND_SPACE_DEFAULT) + Call(MakeLerp, -50, 0, 15, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(N(ElevatePlayer), 15, 100) + Call(TranslateGroup, MODEL_move, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o19) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(80) + Call(PlaySoundAtCollider, COLLIDER_o19, SOUND_KPA_LOWER_STONE_PLATFORM, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, -50, 20, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(N(ElevatePlayer), 15, 100) + Call(TranslateGroup, MODEL_move, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o19) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + SetGroup(EVT_GROUP_EF) + Call(DisablePlayerInput, TRUE) + Call(PlaySoundAtCollider, COLLIDER_o90, SOUND_KPA_RAISE_STONE_PLATFORM, SOUND_SPACE_DEFAULT) + Call(MakeLerp, -99, 0, 15, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(N(ElevatePlayer), 17, 100) + Call(TranslateGroup, MODEL_move2, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o90) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, FALSE) + Wait(80) + Call(PlaySoundAtCollider, COLLIDER_o90, SOUND_KPA_LOWER_STONE_PLATFORM, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, -99, 15, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(N(ElevatePlayer), 17, 100) + Call(TranslateGroup, MODEL_move2, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o90) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(TranslateGroup, MODEL_move2, 0, -99, -1) + Set(AF_KPA08_PlatformRaised, FALSE) + EndThread + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_SET(AF_KPA08_PlatformRaised, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_RedSwitch), 10, 0, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_ActivateSwitch))) - EVT_CALL(ParentColliderToModel, COLLIDER_o19, MODEL_m_yuka) - EVT_CALL(TranslateGroup, MODEL_move, 0, -50, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o19) - EVT_CALL(ParentColliderToModel, COLLIDER_o90, MODEL_m2_yuka) - EVT_CALL(TranslateGroup, MODEL_move2, 0, -99, -1) - EVT_CALL(UpdateColliderTransform, COLLIDER_o90) - EVT_RETURN - EVT_END + Set(AF_KPA08_PlatformRaised, FALSE) + Call(MakeEntity, Ref(Entity_RedSwitch), 10, 0, 0, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_ActivateSwitch))) + Call(ParentColliderToModel, COLLIDER_o19, MODEL_m_yuka) + Call(TranslateGroup, MODEL_move, 0, -50, 0) + Call(UpdateColliderTransform, COLLIDER_o19) + Call(ParentColliderToModel, COLLIDER_o90, MODEL_m2_yuka) + Call(TranslateGroup, MODEL_move2, 0, -99, -1) + Call(UpdateColliderTransform, COLLIDER_o90) + Return + End }; diff --git a/src/world/area_kpa/kpa_09/kpa_09_1_music.c b/src/world/area_kpa/kpa_09/kpa_09_1_music.c index e4dbe0291b2..50798e542ae 100644 --- a/src/world/area_kpa/kpa_09/kpa_09_1_music.c +++ b/src/world/area_kpa/kpa_09/kpa_09_1_music.c @@ -1,12 +1,12 @@ #include "kpa_09.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_09/kpa_09_2_main.c b/src/world/area_kpa/kpa_09/kpa_09_2_main.c index 3b79f3bc9a3..1fc93861d4d 100644 --- a/src/world/area_kpa/kpa_09/kpa_09_2_main.c +++ b/src/world/area_kpa/kpa_09/kpa_09_2_main.c @@ -4,42 +4,42 @@ EvtScript N(EVS_ExitWalk_kpa_101_0) = EVT_EXIT_WALK(60, kpa_09_ENTRY_0, "kpa_101 EvtScript N(EVS_ExitDoors_kpa_33_3) = EVT_EXIT_DOUBLE_DOOR(kpa_09_ENTRY_1, "kpa_33", kpa_33_ENTRY_3, COLLIDER_tte, MODEL_o159, MODEL_o160); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_101_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_33_3)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_101_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_kpa_33_3)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kpa_09_ENTRY_0) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_CASE_EQ(kpa_09_ENTRY_1) - EVT_SET(LVar0, 1) - EVT_SET(LVar2, MODEL_o159) - EVT_SET(LVar3, MODEL_o160) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kpa_09_ENTRY_0) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + CaseEq(kpa_09_ENTRY_1) + Set(LVar0, 1) + Set(LVar2, MODEL_o159) + Set(LVar3, MODEL_o160) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_o180, FALSE) - EVT_CALL(EnableModel, MODEL_o181, FALSE) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_o180, FALSE) + Call(EnableModel, MODEL_o181, FALSE) + Exec(N(EVS_EnterMap)) + Wait(1) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_kpa/kpa_09/kpa_09_3_entity.c b/src/world/area_kpa/kpa_09/kpa_09_3_entity.c index d2bc6cea99a..4b51f2abbca 100644 --- a/src/world/area_kpa/kpa_09/kpa_09_3_entity.c +++ b/src/world/area_kpa/kpa_09/kpa_09_3_entity.c @@ -16,85 +16,85 @@ API_CALLABLE(N(ElevatePlayer)) { } EvtScript N(EVS_ActivateSwitch) = { - EVT_IF_NE(AF_KPA09_PlatformRaised, FALSE) - EVT_RETURN - EVT_END_IF - EVT_SET(AF_KPA09_PlatformRaised, TRUE) - EVT_CALL(N(EnableCameraFollowPlayerY)) - EVT_THREAD - EVT_SET_GROUP(EVT_GROUP_EF) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o19, SOUND_KPA_RAISE_STONE_PLATFORM, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, -50, 0, 15, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(ElevatePlayer), 16, 100) - EVT_CALL(TranslateGroup, MODEL_move, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o19) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(80) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o19, SOUND_KPA_LOWER_STONE_PLATFORM, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, -50, 15, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(ElevatePlayer), 16, 100) - EVT_CALL(TranslateGroup, MODEL_move, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o19) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_SET_GROUP(EVT_GROUP_EF) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o106, SOUND_KPA_RAISE_STONE_PLATFORM, SOUND_SPACE_DEFAULT) - EVT_CALL(EnableGroup, MODEL_move2, TRUE) - EVT_CALL(MakeLerp, -50, 0, 15, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(ElevatePlayer), 18, 100) - EVT_CALL(TranslateGroup, MODEL_move2, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o106) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, FALSE) - EVT_WAIT(80) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o106, SOUND_KPA_LOWER_STONE_PLATFORM, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, -50, 15, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(ElevatePlayer), 18, 100) - EVT_CALL(TranslateGroup, MODEL_move2, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o106) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(AF_KPA09_PlatformRaised, FALSE) - EVT_END_THREAD - EVT_RETURN - EVT_END + IfNe(AF_KPA09_PlatformRaised, FALSE) + Return + EndIf + Set(AF_KPA09_PlatformRaised, TRUE) + Call(N(EnableCameraFollowPlayerY)) + Thread + SetGroup(EVT_GROUP_EF) + Call(PlaySoundAtCollider, COLLIDER_o19, SOUND_KPA_RAISE_STONE_PLATFORM, SOUND_SPACE_DEFAULT) + Call(MakeLerp, -50, 0, 15, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(N(ElevatePlayer), 16, 100) + Call(TranslateGroup, MODEL_move, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o19) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(80) + Call(PlaySoundAtCollider, COLLIDER_o19, SOUND_KPA_LOWER_STONE_PLATFORM, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, -50, 15, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(N(ElevatePlayer), 16, 100) + Call(TranslateGroup, MODEL_move, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o19) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + SetGroup(EVT_GROUP_EF) + Call(DisablePlayerInput, TRUE) + Call(PlaySoundAtCollider, COLLIDER_o106, SOUND_KPA_RAISE_STONE_PLATFORM, SOUND_SPACE_DEFAULT) + Call(EnableGroup, MODEL_move2, TRUE) + Call(MakeLerp, -50, 0, 15, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(N(ElevatePlayer), 18, 100) + Call(TranslateGroup, MODEL_move2, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o106) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, FALSE) + Wait(80) + Call(PlaySoundAtCollider, COLLIDER_o106, SOUND_KPA_LOWER_STONE_PLATFORM, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, -50, 15, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(N(ElevatePlayer), 18, 100) + Call(TranslateGroup, MODEL_move2, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o106) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Set(AF_KPA09_PlatformRaised, FALSE) + EndThread + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_SET(AF_KPA09_PlatformRaised, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_RedSwitch), -325, 0, -8, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_ActivateSwitch))) - EVT_CALL(ParentColliderToModel, COLLIDER_o19, MODEL_m_yuka) - EVT_CALL(TranslateGroup, MODEL_move, 0, -50, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o19) - EVT_CALL(ParentColliderToModel, COLLIDER_o106, MODEL_m_yuka2) - EVT_CALL(TranslateGroup, MODEL_move2, 0, -50, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o106) - EVT_RETURN - EVT_END + Set(AF_KPA09_PlatformRaised, FALSE) + Call(MakeEntity, Ref(Entity_RedSwitch), -325, 0, -8, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_ActivateSwitch))) + Call(ParentColliderToModel, COLLIDER_o19, MODEL_m_yuka) + Call(TranslateGroup, MODEL_move, 0, -50, 0) + Call(UpdateColliderTransform, COLLIDER_o19) + Call(ParentColliderToModel, COLLIDER_o106, MODEL_m_yuka2) + Call(TranslateGroup, MODEL_move2, 0, -50, 0) + Call(UpdateColliderTransform, COLLIDER_o106) + Return + End }; diff --git a/src/world/area_kpa/kpa_10/kpa_10_1_music.c b/src/world/area_kpa/kpa_10/kpa_10_1_music.c index 20b12164538..1ae5a890c51 100644 --- a/src/world/area_kpa/kpa_10/kpa_10_1_music.c +++ b/src/world/area_kpa/kpa_10/kpa_10_1_music.c @@ -1,12 +1,12 @@ #include "kpa_10.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_1) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_1) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_10/kpa_10_2_main.c b/src/world/area_kpa/kpa_10/kpa_10_2_main.c index 531376e7dfb..b8a79ad1c0a 100644 --- a/src/world/area_kpa/kpa_10/kpa_10_2_main.c +++ b/src/world/area_kpa/kpa_10/kpa_10_2_main.c @@ -9,39 +9,39 @@ EvtScript N(EVS_ExitWalk_kpa_62_2) = EVT_EXIT_WALK(60, kpa_10_ENTRY_3, "kpa_62", EvtScript N(EVS_ExitWalk_kpa_12_2) = EVT_EXIT_WALK(60, kpa_10_ENTRY_4, "kpa_12", kpa_12_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_62_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_12_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_17_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_62_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_12_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_62_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_12_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_17_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_62_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_12_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar0) - EVT_IF_EQ(LVar0, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Call(GetLoadType, LVar0) + IfEq(LVar0, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_EnterMap)) + Wait(1) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_kpa/kpa_10/kpa_10_4_entity.c b/src/world/area_kpa/kpa_10/kpa_10_4_entity.c index 75c014ed781..f7a9bdef601 100644 --- a/src/world/area_kpa/kpa_10/kpa_10_4_entity.c +++ b/src/world/area_kpa/kpa_10/kpa_10_4_entity.c @@ -2,9 +2,9 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 1400, 90, -875, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 1400, 90, -375, 0, ITEM_LIFE_SHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KPA10_ItemBlock_LifeShroom) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_SavePoint), 1400, 90, -875, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_YellowBlock), 1400, 90, -375, 0, ITEM_LIFE_SHROOM, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KPA10_ItemBlock_LifeShroom) + Return + End }; diff --git a/src/world/area_kpa/kpa_100/kpa_100_1_music.c b/src/world/area_kpa/kpa_100/kpa_100_1_music.c index dca60c59a2e..a618dd8b7cc 100644 --- a/src/world/area_kpa/kpa_100/kpa_100_1_music.c +++ b/src/world/area_kpa/kpa_100/kpa_100_1_music.c @@ -1,12 +1,12 @@ #include "kpa_100.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_100/kpa_100_2_main.c b/src/world/area_kpa/kpa_100/kpa_100_2_main.c index 27f9349d4f9..97cda942fea 100644 --- a/src/world/area_kpa/kpa_100/kpa_100_2_main.c +++ b/src/world/area_kpa/kpa_100/kpa_100_2_main.c @@ -10,20 +10,20 @@ s32 N(map_init)(void) { EvtScript N(EVS_ExitWalk_kpa_08_1) = EVT_EXIT_WALK(60, kpa_100_ENTRY_0, "kpa_08", kpa_08_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_08_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_08_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_kpa/kpa_100/kpa_100_3_entity.c b/src/world/area_kpa/kpa_100/kpa_100_3_entity.c index 87a5c132238..1e3b8970505 100644 --- a/src/world/area_kpa/kpa_100/kpa_100_3_entity.c +++ b/src/world/area_kpa/kpa_100/kpa_100_3_entity.c @@ -1,7 +1,7 @@ #include "kpa_100.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_BOWSER_CASTLE_KEY, -100, 0, 100, ITEM_SPAWN_MODE_KEY, GF_KPA100_Item_CastleKey2) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_BOWSER_CASTLE_KEY, -100, 0, 100, ITEM_SPAWN_MODE_KEY, GF_KPA100_Item_CastleKey2) + Return + End }; diff --git a/src/world/area_kpa/kpa_101/kpa_101_1_music.c b/src/world/area_kpa/kpa_101/kpa_101_1_music.c index 5034733cf04..096f377ffc5 100644 --- a/src/world/area_kpa/kpa_101/kpa_101_1_music.c +++ b/src/world/area_kpa/kpa_101/kpa_101_1_music.c @@ -1,12 +1,12 @@ #include "kpa_101.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_101/kpa_101_2_main.c b/src/world/area_kpa/kpa_101/kpa_101_2_main.c index 7e8787babce..edcf0dc42e0 100644 --- a/src/world/area_kpa/kpa_101/kpa_101_2_main.c +++ b/src/world/area_kpa/kpa_101/kpa_101_2_main.c @@ -9,21 +9,21 @@ s32 N(map_init)(void) { EvtScript N(EVS_ExitWalk_kpa_09_0) = EVT_EXIT_WALK(60, kpa_101_ENTRY_0, "kpa_09", kpa_09_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_09_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_09_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deiliwtt, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deiliwtt, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_kpa/kpa_101/kpa_101_3_entity.c b/src/world/area_kpa/kpa_101/kpa_101_3_entity.c index b50266c761d..73275f6ae4d 100644 --- a/src/world/area_kpa/kpa_101/kpa_101_3_entity.c +++ b/src/world/area_kpa/kpa_101/kpa_101_3_entity.c @@ -1,7 +1,7 @@ #include "kpa_101.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_ULTRA_SHROOM, -100, 20, 100, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KPA101_Item_UltraShroom) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_ULTRA_SHROOM, -100, 20, 100, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KPA101_Item_UltraShroom) + Return + End }; diff --git a/src/world/area_kpa/kpa_102/kpa_102_1_music.c b/src/world/area_kpa/kpa_102/kpa_102_1_music.c index 94360605a7b..17eac88847f 100644 --- a/src/world/area_kpa/kpa_102/kpa_102_1_music.c +++ b/src/world/area_kpa/kpa_102/kpa_102_1_music.c @@ -1,12 +1,12 @@ #include "kpa_102.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_102/kpa_102_2_main.c b/src/world/area_kpa/kpa_102/kpa_102_2_main.c index a869b60ae4c..cf4c34d182a 100644 --- a/src/world/area_kpa/kpa_102/kpa_102_2_main.c +++ b/src/world/area_kpa/kpa_102/kpa_102_2_main.c @@ -6,88 +6,88 @@ EvtScript N(EVS_ExitWalk_kpa_41_2) = EVT_EXIT_WALK(40, kpa_102_ENTRY_0, "kpa_41" EvtScript N(EVS_ExitDoors_kpa_53_0) = EVT_EXIT_DOUBLE_DOOR(kpa_102_ENTRY_1, "kpa_53", kpa_53_ENTRY_0, COLLIDER_tte, MODEL_o631, MODEL_o632); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_41_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_53_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_41_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_kpa_53_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kpa_102_ENTRY_0) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_CASE_EQ(kpa_102_ENTRY_1) - EVT_SET(LVar0, kpa_102_ENTRY_1) - EVT_SET(LVar2, MODEL_o631) - EVT_SET(LVar3, MODEL_o632) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kpa_102_ENTRY_0) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + CaseEq(kpa_102_ENTRY_1) + Set(LVar0, kpa_102_ENTRY_1) + Set(LVar2, MODEL_o631) + Set(LVar3, MODEL_o632) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_EnterMap)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(EnableTexPanning, MODEL_o655, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o657, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o663, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o661, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Exec(N(EVS_EnterMap)) + Exec(N(EVS_SetupMusic)) + Call(EnableTexPanning, MODEL_o655, TRUE) + Call(EnableTexPanning, MODEL_o657, TRUE) + Call(EnableTexPanning, MODEL_o663, TRUE) + Call(EnableTexPanning, MODEL_o661, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 20, 20, -20, -20) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( 20, 20, -20, -20) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_3) TEX_PAN_PARAMS_STEP( 20, 20, -20, -20) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_4) TEX_PAN_PARAMS_STEP( 20, 20, -20, -20) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(ScaleModel, MODEL_o655, EVT_FLOAT(1.0), 1, EVT_FLOAT(1.0)) - EVT_CALL(ScaleModel, MODEL_o657, EVT_FLOAT(1.0), 1, EVT_FLOAT(1.0)) - EVT_CALL(ScaleModel, MODEL_o663, EVT_FLOAT(1.0), 1, EVT_FLOAT(1.0)) - EVT_CALL(ScaleModel, MODEL_o661, EVT_FLOAT(1.0), 1, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(ScaleModel, MODEL_o655, EVT_FLOAT(0.98), 1, EVT_FLOAT(0.98)) - EVT_CALL(ScaleModel, MODEL_o657, EVT_FLOAT(0.98), 1, EVT_FLOAT(0.98)) - EVT_CALL(ScaleModel, MODEL_o663, EVT_FLOAT(0.98), 1, EVT_FLOAT(0.98)) - EVT_CALL(ScaleModel, MODEL_o661, EVT_FLOAT(0.98), 1, EVT_FLOAT(0.98)) - EVT_WAIT(10) - EVT_CALL(ScaleModel, MODEL_o655, EVT_FLOAT(0.961), 1, EVT_FLOAT(0.961)) - EVT_CALL(ScaleModel, MODEL_o657, EVT_FLOAT(0.961), 1, EVT_FLOAT(0.961)) - EVT_CALL(ScaleModel, MODEL_o663, EVT_FLOAT(0.961), 1, EVT_FLOAT(0.961)) - EVT_CALL(ScaleModel, MODEL_o661, EVT_FLOAT(0.961), 1, EVT_FLOAT(0.961)) - EVT_WAIT(10) - EVT_END_LOOP - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread + Loop(0) + Call(ScaleModel, MODEL_o655, Float(1.0), 1, Float(1.0)) + Call(ScaleModel, MODEL_o657, Float(1.0), 1, Float(1.0)) + Call(ScaleModel, MODEL_o663, Float(1.0), 1, Float(1.0)) + Call(ScaleModel, MODEL_o661, Float(1.0), 1, Float(1.0)) + Wait(10) + Call(ScaleModel, MODEL_o655, Float(0.98), 1, Float(0.98)) + Call(ScaleModel, MODEL_o657, Float(0.98), 1, Float(0.98)) + Call(ScaleModel, MODEL_o663, Float(0.98), 1, Float(0.98)) + Call(ScaleModel, MODEL_o661, Float(0.98), 1, Float(0.98)) + Wait(10) + Call(ScaleModel, MODEL_o655, Float(0.961), 1, Float(0.961)) + Call(ScaleModel, MODEL_o657, Float(0.961), 1, Float(0.961)) + Call(ScaleModel, MODEL_o663, Float(0.961), 1, Float(0.961)) + Call(ScaleModel, MODEL_o661, Float(0.961), 1, Float(0.961)) + Wait(10) + EndLoop + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_11/kpa_11_1_music.c b/src/world/area_kpa/kpa_11/kpa_11_1_music.c index e6d6cdf44b1..0f3b75b7df4 100644 --- a/src/world/area_kpa/kpa_11/kpa_11_1_music.c +++ b/src/world/area_kpa/kpa_11/kpa_11_1_music.c @@ -1,13 +1,13 @@ #include "kpa_11.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_1) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_1) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(PlayAmbientSounds, AMBIENT_LAVA_1) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_1) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_11/kpa_11_2_main.c b/src/world/area_kpa/kpa_11/kpa_11_2_main.c index 6668dd73c87..ff8de4e1b5c 100644 --- a/src/world/area_kpa/kpa_11/kpa_11_2_main.c +++ b/src/world/area_kpa/kpa_11/kpa_11_2_main.c @@ -11,55 +11,55 @@ EvtScript N(EVS_ExitWalk_kpa_12_2) = EVT_EXIT_WALK(60, kpa_11_ENTRY_4, "kpa_12", MAP_RODATA_PAD(1, strings); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_62_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_12_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_17_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_62_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_12_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_62_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_12_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_17_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_62_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_12_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) + Return + End }; EvtScript N(D_80240F04_A537C4) = { - EVT_CALL(GetLoadType, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Call(GetLoadType, LVar0) + IfEq(LVar0, 1) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; EvtScript N(D_80240F84_A53844) = { - EVT_THREAD + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_0) TEX_PAN_PARAMS_STEP( -400, 0, -800, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 1, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_o1871, 0) - EVT_CALL(SetTexPanner, MODEL_o1815, 0) - EVT_CALL(SetTexPanner, MODEL_o1816, 0) - EVT_CALL(SetTexPanner, MODEL_o1817, 0) - EVT_CALL(SetTexPanner, MODEL_o1818, 0) - EVT_CALL(SetTexPanner, MODEL_o1819, 0) - EVT_CALL(SetTexPanner, MODEL_o1820, 0) - EVT_CALL(SetTexPanner, MODEL_o1821, 0) - EVT_CALL(SetTexPanner, MODEL_o1822, 0) - EVT_CALL(SetTexPanner, MODEL_o1823, 0) - EVT_CALL(SetTexPanner, MODEL_o1824, 0) - EVT_CALL(SetTexPanner, MODEL_o1825, 0) - EVT_CALL(SetTexPanner, MODEL_o1826, 0) - EVT_CALL(SetTexPanner, MODEL_o1827, 0) - EVT_CALL(SetTexPanner, MODEL_o1828, 0) - EVT_CALL(SetTexPanner, MODEL_o1829, 0) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetTexPanner, MODEL_o1871, 0) + Call(SetTexPanner, MODEL_o1815, 0) + Call(SetTexPanner, MODEL_o1816, 0) + Call(SetTexPanner, MODEL_o1817, 0) + Call(SetTexPanner, MODEL_o1818, 0) + Call(SetTexPanner, MODEL_o1819, 0) + Call(SetTexPanner, MODEL_o1820, 0) + Call(SetTexPanner, MODEL_o1821, 0) + Call(SetTexPanner, MODEL_o1822, 0) + Call(SetTexPanner, MODEL_o1823, 0) + Call(SetTexPanner, MODEL_o1824, 0) + Call(SetTexPanner, MODEL_o1825, 0) + Call(SetTexPanner, MODEL_o1826, 0) + Call(SetTexPanner, MODEL_o1827, 0) + Call(SetTexPanner, MODEL_o1828, 0) + Call(SetTexPanner, MODEL_o1829, 0) + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -68,42 +68,42 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(D_80240F84_A53844)) - EVT_IF_EQ(GF_KPA17_BombedWall, TRUE) - EVT_CALL(EnableGroup, MODEL_g301, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_EXEC(N(D_80240F04_A537C4)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_THREAD - EVT_WAIT(2) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1266, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1265, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1264, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1263, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1262, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1261, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1260, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1253, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1254, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1255, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1256, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1257, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1258, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1259, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilise, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilisw, SURFACE_TYPE_LAVA) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_END_THREAD - EVT_END_IF - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(D_80240F84_A53844)) + IfEq(GF_KPA17_BombedWall, TRUE) + Call(EnableGroup, MODEL_g301, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Exec(N(D_80240F04_A537C4)) + Exec(N(EVS_SetupMusic)) + IfEq(GF_KPA16_ShutOffLava, FALSE) + Thread + Wait(2) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1266, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1265, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1264, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1263, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1262, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1261, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1260, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1253, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1254, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1255, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1256, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1257, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1258, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1259, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilise, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilisw, SURFACE_TYPE_LAVA) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + EndThread + EndIf + Return + End }; diff --git a/src/world/area_kpa/kpa_11/kpa_11_3_entity.c b/src/world/area_kpa/kpa_11/kpa_11_3_entity.c index 035464cab48..97dd921f3f7 100644 --- a/src/world/area_kpa/kpa_11/kpa_11_3_entity.c +++ b/src/world/area_kpa/kpa_11/kpa_11_3_entity.c @@ -2,12 +2,12 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 1400, 90, -875, 0, MAKE_ENTITY_END) - EVT_IF_EQ(GF_KPA11_Defeated_Guard, TRUE) - EVT_CALL(MakeItemEntity, ITEM_BOWSER_CASTLE_KEY, 550, 30, -145, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KPA11_Item_CastleKey2) - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 1400, 90, -375, 0, ITEM_LIFE_SHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KPA10_ItemBlock_LifeShroom) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_SavePoint), 1400, 90, -875, 0, MAKE_ENTITY_END) + IfEq(GF_KPA11_Defeated_Guard, TRUE) + Call(MakeItemEntity, ITEM_BOWSER_CASTLE_KEY, 550, 30, -145, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KPA11_Item_CastleKey2) + EndIf + Call(MakeEntity, Ref(Entity_YellowBlock), 1400, 90, -375, 0, ITEM_LIFE_SHROOM, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KPA10_ItemBlock_LifeShroom) + Return + End }; diff --git a/src/world/area_kpa/kpa_11/kpa_11_4_npc.c b/src/world/area_kpa/kpa_11/kpa_11_4_npc.c index c81765295ef..83d0bd1ca81 100644 --- a/src/world/area_kpa/kpa_11/kpa_11_4_npc.c +++ b/src/world/area_kpa/kpa_11/kpa_11_4_npc.c @@ -4,33 +4,33 @@ #include "world/common/npc/Toad_Stationary.inc.c" EvtScript N(EVS_NpcDefeat_Koopatrol) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_SET(GF_KPA11_Defeated_Guard, TRUE) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(MakeItemEntity, ITEM_BOWSER_CASTLE_KEY, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_TOSS_NEVER_VANISH, GF_KPA11_Item_CastleKey2) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_SET(GF_KPA11_Defeated_Guard, TRUE) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(MakeItemEntity, ITEM_BOWSER_CASTLE_KEY, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_TOSS_NEVER_VANISH, GF_KPA11_Item_CastleKey2) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Set(GF_KPA11_Defeated_Guard, TRUE) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(MakeItemEntity, ITEM_BOWSER_CASTLE_KEY, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_TOSS_NEVER_VANISH, GF_KPA11_Item_CastleKey2) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_FLED) + CaseEq(OUTCOME_ENEMY_FLED) + Set(GF_KPA11_Defeated_Guard, TRUE) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(MakeItemEntity, ITEM_BOWSER_CASTLE_KEY, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_TOSS_NEVER_VANISH, GF_KPA11_Item_CastleKey2) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Koopatrol) = { - EVT_IF_EQ(GF_KPA11_Defeated_Guard, FALSE) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Koopatrol))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_KPA11_Defeated_Guard, FALSE) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Koopatrol))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_Koopatrol) = { @@ -57,8 +57,8 @@ NpcData N(NpcData_Koopatrol) = { }; EvtScript N(EVS_NpcInit_Prisoner) = { - EVT_RETURN - EVT_END + Return + End }; NpcData N(NpcData_Prisoners)[] = { diff --git a/src/world/area_kpa/kpa_111/kpa_111_1_music.c b/src/world/area_kpa/kpa_111/kpa_111_1_music.c index 0776a728f19..363bed22c19 100644 --- a/src/world/area_kpa/kpa_111/kpa_111_1_music.c +++ b/src/world/area_kpa/kpa_111/kpa_111_1_music.c @@ -1,12 +1,12 @@ #include "kpa_111.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_111/kpa_111_2_main.c b/src/world/area_kpa/kpa_111/kpa_111_2_main.c index d79158a253b..2173c4fb7f9 100644 --- a/src/world/area_kpa/kpa_111/kpa_111_2_main.c +++ b/src/world/area_kpa/kpa_111/kpa_111_2_main.c @@ -4,39 +4,39 @@ EvtScript N(EVS_ExitDoors_kpa_130_1) = EVT_EXIT_DOUBLE_DOOR(kpa_111_ENTRY_0, "kp EvtScript N(EVS_ExitDoors_kpa_112_0) = EVT_EXIT_WALK(40, kpa_111_ENTRY_1, "kpa_112", kpa_112_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_130_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deiliwtt, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_112_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_kpa_130_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deiliwtt, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_kpa_112_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kpa_111_ENTRY_0) - EVT_SET(LVar0, kpa_111_ENTRY_0) - EVT_SET(LVar2, MODEL_o119) - EVT_SET(LVar3, MODEL_o118) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kpa_111_ENTRY_1) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kpa_111_ENTRY_0) + Set(LVar0, kpa_111_ENTRY_0) + Set(LVar2, MODEL_o119) + Set(LVar3, MODEL_o118) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kpa_111_ENTRY_1) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Wait(1) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupStatues)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupStatues)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_kpa/kpa_111/kpa_111_3_statues.c b/src/world/area_kpa/kpa_111/kpa_111_3_statues.c index daed33eb684..2fadaf52823 100644 --- a/src/world/area_kpa/kpa_111/kpa_111_3_statues.c +++ b/src/world/area_kpa/kpa_111/kpa_111_3_statues.c @@ -4,130 +4,130 @@ #include "world/common/todo/UnkFunc12.inc.c" EvtScript N(EVS_PushRightStatue_Impl) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_LOOP(20) - EVT_CALL(GetPartnerInUse, LVarA) - EVT_IF_NE(LVarA, 0) - EVT_SET(LVar8, -1) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(UnkFunc11), LVar9) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LVar8, -1) - EVT_RETURN - EVT_ELSE - EVT_CALL(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetPartnerInUse, LVarA) - EVT_IF_NE(LVarA, 0) - EVT_SET(LVar8, -1) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 100, EVT_FLOAT(0.6)) - EVT_END_THREAD - EVT_THREAD - EVT_IF_GE(LVar6, LVar7) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_ELSE - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_END_IF - EVT_CALL(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar1, LVar0) - EVT_SET(LVar2, LVar7) - EVT_SUB(LVar2, LVar6) - EVT_ADD(LVar1, LVar2) - EVT_CALL(MakeLerp, LVar0, LVar1, 100, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) - EVT_CALL(UpdateLerp) - EVT_CALL(N(UnkFunc12)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_THREAD - EVT_CALL(MakeLerp, LVar6, LVar7, 100, EASING_LINEAR) - EVT_CALL(PlaySoundAtCollider, LVar9, SOUND_LOOP_MOVE_STATUE, SOUND_SPACE_DEFAULT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g21, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_kpa_c) - EVT_CALL(UpdateColliderTransform, COLLIDER_kpa_l) - EVT_CALL(UpdateColliderTransform, COLLIDER_kpa_r) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(StopSound, SOUND_LOOP_MOVE_STATUE) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Loop(20) + Call(GetPartnerInUse, LVarA) + IfNe(LVarA, 0) + Set(LVar8, -1) + Return + EndIf + Call(N(UnkFunc11), LVar9) + IfEq(LVar0, 0) + Set(LVar8, -1) + Return + Else + Call(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) + EndIf + Wait(1) + EndLoop + Call(GetPartnerInUse, LVarA) + IfNe(LVarA, 0) + Set(LVar8, -1) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 100, Float(0.6)) + EndThread + Thread + IfGe(LVar6, LVar7) + Call(InterpPlayerYaw, 270, 0) + Else + Call(InterpPlayerYaw, 90, 0) + EndIf + Call(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar1, LVar0) + Set(LVar2, LVar7) + Sub(LVar2, LVar6) + Add(LVar1, LVar2) + Call(MakeLerp, LVar0, LVar1, 100, EASING_LINEAR) + Loop(0) + Call(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) + Call(UpdateLerp) + Call(N(UnkFunc12)) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(DisablePlayerInput, FALSE) + EndThread + Call(MakeLerp, LVar6, LVar7, 100, EASING_LINEAR) + Call(PlaySoundAtCollider, LVar9, SOUND_LOOP_MOVE_STATUE, SOUND_SPACE_DEFAULT) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g21, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_kpa_c) + Call(UpdateColliderTransform, COLLIDER_kpa_l) + Call(UpdateColliderTransform, COLLIDER_kpa_r) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(StopSound, SOUND_LOOP_MOVE_STATUE) + Return + End }; EvtScript N(EVS_PushRightStatue_FromLeft) = { - EVT_IF_EQ(GB_KPA111_StatuePosition, 2) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GB_KPA111_StatuePosition, 0) - EVT_SET(LVar6, 0) - EVT_SET(LVar7, 50) - EVT_SET(LVar8, 2) - EVT_ELSE - EVT_SET(LVar6, -50) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 0) - EVT_END_IF - EVT_SET(LVar9, COLLIDER_kpa_l) - EVT_EXEC_WAIT(N(EVS_PushRightStatue_Impl)) - EVT_IF_NE(LVar8, -1) - EVT_SET(GB_KPA111_StatuePosition, LVar8) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_KPA111_StatuePosition, 2) + Return + EndIf + IfEq(GB_KPA111_StatuePosition, 0) + Set(LVar6, 0) + Set(LVar7, 50) + Set(LVar8, 2) + Else + Set(LVar6, -50) + Set(LVar7, 0) + Set(LVar8, 0) + EndIf + Set(LVar9, COLLIDER_kpa_l) + ExecWait(N(EVS_PushRightStatue_Impl)) + IfNe(LVar8, -1) + Set(GB_KPA111_StatuePosition, LVar8) + EndIf + Return + End }; EvtScript N(EVS_PushRightStatue_FromRight) = { - EVT_IF_EQ(GB_KPA111_StatuePosition, 1) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GB_KPA111_StatuePosition, 0) - EVT_SET(LVar6, 0) - EVT_SET(LVar7, -50) - EVT_SET(LVar8, 1) - EVT_ELSE - EVT_SET(LVar6, 50) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 0) - EVT_END_IF - EVT_SET(LVar9, COLLIDER_kpa_r) - EVT_EXEC_WAIT(N(EVS_PushRightStatue_Impl)) - EVT_IF_NE(LVar8, -1) - EVT_SET(GB_KPA111_StatuePosition, LVar8) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_KPA111_StatuePosition, 1) + Return + EndIf + IfEq(GB_KPA111_StatuePosition, 0) + Set(LVar6, 0) + Set(LVar7, -50) + Set(LVar8, 1) + Else + Set(LVar6, 50) + Set(LVar7, 0) + Set(LVar8, 0) + EndIf + Set(LVar9, COLLIDER_kpa_r) + ExecWait(N(EVS_PushRightStatue_Impl)) + IfNe(LVar8, -1) + Set(GB_KPA111_StatuePosition, LVar8) + EndIf + Return + End }; EvtScript N(EVS_SetupStatues) = { - EVT_SWITCH(GB_KPA111_StatuePosition) - EVT_CASE_EQ(1) - EVT_CALL(TranslateGroup, MODEL_g21, -50, 0, 0) - EVT_CASE_EQ(2) - EVT_CALL(TranslateGroup, MODEL_g21, 50, 0, 0) - EVT_END_SWITCH - EVT_CALL(ParentColliderToModel, COLLIDER_kpa_c, MODEL_o105) - EVT_CALL(ParentColliderToModel, COLLIDER_kpa_l, MODEL_o105) - EVT_CALL(ParentColliderToModel, COLLIDER_kpa_r, MODEL_o105) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_PushRightStatue_FromLeft)), TRIGGER_WALL_PUSH, COLLIDER_kpa_l, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_PushRightStatue_FromRight)), TRIGGER_WALL_PUSH, COLLIDER_kpa_r, 1, 0) - EVT_RETURN - EVT_END + Switch(GB_KPA111_StatuePosition) + CaseEq(1) + Call(TranslateGroup, MODEL_g21, -50, 0, 0) + CaseEq(2) + Call(TranslateGroup, MODEL_g21, 50, 0, 0) + EndSwitch + Call(ParentColliderToModel, COLLIDER_kpa_c, MODEL_o105) + Call(ParentColliderToModel, COLLIDER_kpa_l, MODEL_o105) + Call(ParentColliderToModel, COLLIDER_kpa_r, MODEL_o105) + BindTrigger(Ref(N(EVS_PushRightStatue_FromLeft)), TRIGGER_WALL_PUSH, COLLIDER_kpa_l, 1, 0) + BindTrigger(Ref(N(EVS_PushRightStatue_FromRight)), TRIGGER_WALL_PUSH, COLLIDER_kpa_r, 1, 0) + Return + End }; diff --git a/src/world/area_kpa/kpa_111/kpa_111_5_entity.c b/src/world/area_kpa/kpa_111/kpa_111_5_entity.c index 91cf292b6e9..ce8a5ea6ab5 100644 --- a/src/world/area_kpa/kpa_111/kpa_111_5_entity.c +++ b/src/world/area_kpa/kpa_111/kpa_111_5_entity.c @@ -2,10 +2,10 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 205, 60, 110, 0, ITEM_SUPER_SHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KPA111_ItemBlock_SuperShroom) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 5, 60, 110, 0, ITEM_MAPLE_SYRUP, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KPA111_HiddenItem_MapleSyrup) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_YellowBlock), 205, 60, 110, 0, ITEM_SUPER_SHROOM, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KPA111_ItemBlock_SuperShroom) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 5, 60, 110, 0, ITEM_MAPLE_SYRUP, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KPA111_HiddenItem_MapleSyrup) + Return + End }; diff --git a/src/world/area_kpa/kpa_112/kpa_112_1_music.c b/src/world/area_kpa/kpa_112/kpa_112_1_music.c index 5621c8e03ca..dba495cde6b 100644 --- a/src/world/area_kpa/kpa_112/kpa_112_1_music.c +++ b/src/world/area_kpa/kpa_112/kpa_112_1_music.c @@ -1,12 +1,12 @@ #include "kpa_112.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_112/kpa_112_2_main.c b/src/world/area_kpa/kpa_112/kpa_112_2_main.c index 9ac7054e0df..251a5efc358 100644 --- a/src/world/area_kpa/kpa_112/kpa_112_2_main.c +++ b/src/world/area_kpa/kpa_112/kpa_112_2_main.c @@ -5,20 +5,20 @@ EvtScript N(EVS_ExitWalk_kpa_111_1) = EVT_EXIT_WALK(40, kpa_112_ENTRY_0, "kpa_11 EvtScript N(EVS_ExitWalk_kpa_113_0) = EVT_EXIT_WALK(40, kpa_112_ENTRY_1, "kpa_113", kpa_113_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_111_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_113_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_111_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_113_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Exec(N(EVS_SetupMusic)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; diff --git a/src/world/area_kpa/kpa_113/kpa_113_1_music.c b/src/world/area_kpa/kpa_113/kpa_113_1_music.c index c1731943e4f..68b4502607a 100644 --- a/src/world/area_kpa/kpa_113/kpa_113_1_music.c +++ b/src/world/area_kpa/kpa_113/kpa_113_1_music.c @@ -1,12 +1,12 @@ #include "kpa_113.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_113/kpa_113_2_main.c b/src/world/area_kpa/kpa_113/kpa_113_2_main.c index b5e76706f15..fea1b070c10 100644 --- a/src/world/area_kpa/kpa_113/kpa_113_2_main.c +++ b/src/world/area_kpa/kpa_113/kpa_113_2_main.c @@ -4,43 +4,43 @@ EvtScript N(EVS_ExitWalk_kpa_112_1) = EVT_EXIT_WALK(40, kpa_113_ENTRY_0, "kpa_11 EvtScript N(EVS_ExitWalk_kpa_114_0) = EVT_EXIT_WALK(40, kpa_113_ENTRY_2, "kpa_114", kpa_114_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_112_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_114_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_112_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_114_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar0) - EVT_IF_EQ(LVar0, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kpa_113_ENTRY_1) - EVT_SET(LVar2, MODEL_o136) - EVT_SET(LVar3, MODEL_o137) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetLoadType, LVar0) + IfEq(LVar0, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(GetEntryID, LVar0) + IfEq(LVar0, kpa_113_ENTRY_1) + Set(LVar2, MODEL_o136) + Set(LVar3, MODEL_o137) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + Else + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndIf + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupStatues)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupStatues)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_kpa/kpa_113/kpa_113_3_entity.c b/src/world/area_kpa/kpa_113/kpa_113_3_entity.c index 2b558efdd18..d61dc47eb43 100644 --- a/src/world/area_kpa/kpa_113/kpa_113_3_entity.c +++ b/src/world/area_kpa/kpa_113/kpa_113_3_entity.c @@ -13,39 +13,39 @@ EvtScript N(EVS_ExitDoors_kpa_82_0) = EVT_EXIT_DOUBLE_DOOR(kpa_113_ENTRY_1, "kpa MAP_RODATA_PAD(1, exits); EvtScript N(EVS_UnlockPrompt_LockedDoor) = { - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_CALL(PlaySound, SOUND_USE_KEY) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_SET(GF_KPA113_UnlockedDoor, TRUE) - EVT_SET(LVar0, MV_PadlockEntityID) - EVT_CALL(N(RemovePadlock)) - EVT_SET(LVar1, 0) - EVT_WAIT(5) - EVT_CALL(CloseChoicePopup) - EVT_UNBIND - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_82_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deiliett, 1, 0) - EVT_RETURN - EVT_END + Call(ShowKeyChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) + Call(CloseChoicePopup) + Return + EndIf + IfEq(LVar0, -1) + Call(CloseChoicePopup) + Return + EndIf + Call(PlaySound, SOUND_USE_KEY) + Call(RemoveKeyItemAt, LVar1) + Set(GF_KPA113_UnlockedDoor, TRUE) + Set(LVar0, MV_PadlockEntityID) + Call(N(RemovePadlock)) + Set(LVar1, 0) + Wait(5) + Call(CloseChoicePopup) + Unbind + BindTrigger(Ref(N(EVS_ExitDoors_kpa_82_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deiliett, 1, 0) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_KPA113_UnlockedDoor, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), 418, 10, 100, 280, MAKE_ENTITY_END) - EVT_SET(MV_PadlockEntityID, LVar0) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_UnlockPrompt_LockedDoor)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(KeyList_BowsersCastle)), 0, 1) - EVT_ELSE - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_82_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deiliett, 1, 0) - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 375, 60, 50, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + IfEq(GF_KPA113_UnlockedDoor, FALSE) + Call(MakeEntity, Ref(Entity_Padlock), 418, 10, 100, 280, MAKE_ENTITY_END) + Set(MV_PadlockEntityID, LVar0) + BindPadlock(Ref(N(EVS_UnlockPrompt_LockedDoor)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), Ref(N(KeyList_BowsersCastle)), 0, 1) + Else + BindTrigger(Ref(N(EVS_ExitDoors_kpa_82_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deiliett, 1, 0) + EndIf + Call(MakeEntity, Ref(Entity_SavePoint), 375, 60, 50, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_kpa/kpa_113/kpa_113_4_statues.c b/src/world/area_kpa/kpa_113/kpa_113_4_statues.c index 9deb73680c3..b0fa1adca5c 100644 --- a/src/world/area_kpa/kpa_113/kpa_113_4_statues.c +++ b/src/world/area_kpa/kpa_113/kpa_113_4_statues.c @@ -4,131 +4,131 @@ #include "world/common/todo/UnkFunc12.inc.c" EvtScript N(EVS_PushLeftStatue_Impl) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_LOOP(20) - EVT_CALL(GetPartnerInUse, LVarA) - EVT_IF_NE(LVarA, 0) - EVT_SET(LVar8, -1) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(UnkFunc11), LVar9) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LVar8, -1) - EVT_RETURN - EVT_ELSE - EVT_CALL(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetPartnerInUse, LVarA) - EVT_IF_NE(LVarA, 0) - EVT_SET(LVar8, -1) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 100, EVT_FLOAT(0.6)) - EVT_END_THREAD - EVT_THREAD - EVT_IF_GE(LVar6, LVar7) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_ELSE - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_END_IF - EVT_CALL(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar1, LVar0) - EVT_SET(LVar2, LVar7) - EVT_SUB(LVar2, LVar6) - EVT_ADD(LVar1, LVar2) - EVT_CALL(MakeLerp, LVar0, LVar1, 100, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) - EVT_CALL(UpdateLerp) - EVT_CALL(N(UnkFunc12)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_THREAD - EVT_CALL(MakeLerp, LVar6, LVar7, 100, EASING_LINEAR) - EVT_CALL(PlaySoundAtCollider, LVar9, SOUND_LOOP_MOVE_STATUE, SOUND_SPACE_DEFAULT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g19, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_kpa_c) - EVT_CALL(UpdateColliderTransform, COLLIDER_kpa_l) - EVT_CALL(UpdateColliderTransform, COLLIDER_kpa_r) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(StopSound, SOUND_LOOP_MOVE_STATUE) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Loop(20) + Call(GetPartnerInUse, LVarA) + IfNe(LVarA, 0) + Set(LVar8, -1) + Return + EndIf + Call(N(UnkFunc11), LVar9) + IfEq(LVar0, 0) + Set(LVar8, -1) + Return + Else + Call(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) + EndIf + Wait(1) + EndLoop + Call(GetPartnerInUse, LVarA) + IfNe(LVarA, 0) + Set(LVar8, -1) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 100, Float(0.6)) + EndThread + Thread + IfGe(LVar6, LVar7) + Call(InterpPlayerYaw, 270, 0) + Else + Call(InterpPlayerYaw, 90, 0) + EndIf + Call(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar1, LVar0) + Set(LVar2, LVar7) + Sub(LVar2, LVar6) + Add(LVar1, LVar2) + Call(MakeLerp, LVar0, LVar1, 100, EASING_LINEAR) + Loop(0) + Call(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) + Call(UpdateLerp) + Call(N(UnkFunc12)) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(DisablePlayerInput, FALSE) + EndThread + Call(MakeLerp, LVar6, LVar7, 100, EASING_LINEAR) + Call(PlaySoundAtCollider, LVar9, SOUND_LOOP_MOVE_STATUE, SOUND_SPACE_DEFAULT) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g19, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_kpa_c) + Call(UpdateColliderTransform, COLLIDER_kpa_l) + Call(UpdateColliderTransform, COLLIDER_kpa_r) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(StopSound, SOUND_LOOP_MOVE_STATUE) + Return + End }; EvtScript N(EVS_PushLeftStatue_FromLeft) = { - EVT_IF_EQ(GB_KPA113_StatuePosition, 2) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GB_KPA113_StatuePosition, 0) - EVT_SET(LVar6, 0) - EVT_SET(LVar7, 50) - EVT_SET(LVar8, 2) - EVT_ELSE - EVT_SET(LVar6, -50) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 0) - EVT_END_IF - EVT_SET(LVar9, COLLIDER_kpa_l) - EVT_EXEC_WAIT(N(EVS_PushLeftStatue_Impl)) - EVT_IF_NE(LVar8, -1) - EVT_SET(GB_KPA113_StatuePosition, LVar8) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_KPA113_StatuePosition, 2) + Return + EndIf + IfEq(GB_KPA113_StatuePosition, 0) + Set(LVar6, 0) + Set(LVar7, 50) + Set(LVar8, 2) + Else + Set(LVar6, -50) + Set(LVar7, 0) + Set(LVar8, 0) + EndIf + Set(LVar9, COLLIDER_kpa_l) + ExecWait(N(EVS_PushLeftStatue_Impl)) + IfNe(LVar8, -1) + Set(GB_KPA113_StatuePosition, LVar8) + EndIf + Return + End }; EvtScript N(EVS_PushLeftStatue_FromRight) = { - EVT_IF_EQ(GB_KPA113_StatuePosition, 1) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GB_KPA113_StatuePosition, 0) - EVT_SET(LVar6, 0) - EVT_SET(LVar7, -50) - EVT_SET(LVar8, 1) - EVT_ELSE - EVT_SET(LVar6, 50) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 0) - EVT_END_IF - EVT_SET(LVar9, COLLIDER_kpa_r) - EVT_EXEC_WAIT(N(EVS_PushLeftStatue_Impl)) - EVT_IF_NE(LVar8, -1) - EVT_SET(GB_KPA113_StatuePosition, LVar8) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_KPA113_StatuePosition, 1) + Return + EndIf + IfEq(GB_KPA113_StatuePosition, 0) + Set(LVar6, 0) + Set(LVar7, -50) + Set(LVar8, 1) + Else + Set(LVar6, 50) + Set(LVar7, 0) + Set(LVar8, 0) + EndIf + Set(LVar9, COLLIDER_kpa_r) + ExecWait(N(EVS_PushLeftStatue_Impl)) + IfNe(LVar8, -1) + Set(GB_KPA113_StatuePosition, LVar8) + EndIf + Return + End }; EvtScript N(EVS_SetupStatues) = { - EVT_SWITCH(GB_KPA113_StatuePosition) - EVT_CASE_EQ(1) - EVT_CALL(TranslateGroup, MODEL_g19, -50, 0, 0) - EVT_CASE_EQ(2) - EVT_CALL(TranslateGroup, MODEL_g19, 50, 0, 0) - EVT_END_SWITCH - EVT_CALL(ParentColliderToModel, COLLIDER_kpa_c, MODEL_o101) - EVT_CALL(ParentColliderToModel, COLLIDER_kpa_l, MODEL_o101) - EVT_CALL(ParentColliderToModel, COLLIDER_kpa_r, MODEL_o101) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_PushLeftStatue_FromLeft)), TRIGGER_WALL_PUSH, COLLIDER_kpa_l, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_PushLeftStatue_FromRight)), TRIGGER_WALL_PUSH, COLLIDER_kpa_r, 1, 0) - EVT_RETURN - EVT_END + Switch(GB_KPA113_StatuePosition) + CaseEq(1) + Call(TranslateGroup, MODEL_g19, -50, 0, 0) + CaseEq(2) + Call(TranslateGroup, MODEL_g19, 50, 0, 0) + EndSwitch + Call(ParentColliderToModel, COLLIDER_kpa_c, MODEL_o101) + Call(ParentColliderToModel, COLLIDER_kpa_l, MODEL_o101) + Call(ParentColliderToModel, COLLIDER_kpa_r, MODEL_o101) + BindTrigger(Ref(N(EVS_PushLeftStatue_FromLeft)), TRIGGER_WALL_PUSH, COLLIDER_kpa_l, 1, 0) + BindTrigger(Ref(N(EVS_PushLeftStatue_FromRight)), TRIGGER_WALL_PUSH, COLLIDER_kpa_r, 1, 0) + Return + End }; diff --git a/src/world/area_kpa/kpa_114/kpa_114_1_music.c b/src/world/area_kpa/kpa_114/kpa_114_1_music.c index 951f8356776..fbf5bb35299 100644 --- a/src/world/area_kpa/kpa_114/kpa_114_1_music.c +++ b/src/world/area_kpa/kpa_114/kpa_114_1_music.c @@ -1,12 +1,12 @@ #include "kpa_114.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_114/kpa_114_2_main.c b/src/world/area_kpa/kpa_114/kpa_114_2_main.c index a01650546c3..baf2bb889b1 100644 --- a/src/world/area_kpa/kpa_114/kpa_114_2_main.c +++ b/src/world/area_kpa/kpa_114/kpa_114_2_main.c @@ -11,34 +11,34 @@ EvtScript N(EVS_ExitWalk_kpa_113_2) = EVT_EXIT_WALK(60, kpa_114_ENTRY_0, "kpa_11 EvtScript N(EVS_ExitWalk_kpa_115_0) = EVT_EXIT_WALK(40, kpa_114_ENTRY_1, "kpa_115", kpa_115_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_113_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_115_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_113_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_115_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar0) - EVT_IF_EQ(LVar0, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalkShort) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Call(GetLoadType, LVar0) + IfEq(LVar0, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalkShort) + Wait(1) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_kpa/kpa_114/kpa_114_3_entity.c b/src/world/area_kpa/kpa_114/kpa_114_3_entity.c index 6c78ca89e69..09fca1fa95e 100644 --- a/src/world/area_kpa/kpa_114/kpa_114_3_entity.c +++ b/src/world/area_kpa/kpa_114/kpa_114_3_entity.c @@ -2,7 +2,7 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), -250, 60, 100, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HeartBlock), -250, 60, 100, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_kpa/kpa_115/kpa_115_1_music.c b/src/world/area_kpa/kpa_115/kpa_115_1_music.c index 219244a6088..0c88d6251ab 100644 --- a/src/world/area_kpa/kpa_115/kpa_115_1_music.c +++ b/src/world/area_kpa/kpa_115/kpa_115_1_music.c @@ -1,12 +1,12 @@ #include "kpa_115.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_115/kpa_115_2_main.c b/src/world/area_kpa/kpa_115/kpa_115_2_main.c index 94b6cb972b2..6d8ef4817df 100644 --- a/src/world/area_kpa/kpa_115/kpa_115_2_main.c +++ b/src/world/area_kpa/kpa_115/kpa_115_2_main.c @@ -5,25 +5,25 @@ EvtScript N(EVS_ExitWalk_kpa_116_0) = EVT_EXIT_WALK(60, kpa_115_ENTRY_1, "kpa_11 EvtScript N(EVS_ExitWalk_kpa_118_0) = EVT_EXIT_WALK(60, kpa_115_ENTRY_2, "kpa_118", kpa_118_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_114_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_118_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_116_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_114_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_118_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_116_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_SetupStatues)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Exec(N(EVS_SetupStatues)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Exec(N(EVS_SetupMusic)) + Return + End }; MAP_RODATA_PAD(1, exits); diff --git a/src/world/area_kpa/kpa_115/kpa_115_3_statues.c b/src/world/area_kpa/kpa_115/kpa_115_3_statues.c index f00685076d4..e01fe8da7e5 100644 --- a/src/world/area_kpa/kpa_115/kpa_115_3_statues.c +++ b/src/world/area_kpa/kpa_115/kpa_115_3_statues.c @@ -4,138 +4,138 @@ #include "world/common/todo/UnkFunc12.inc.c" EvtScript N(EVS_PushMiddleStatue_Impl) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_LOOP(20) - EVT_CALL(GetPartnerInUse, LVarA) - EVT_IF_NE(LVarA, 0) - EVT_SET(LVar8, -1) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(UnkFunc11), LVar9) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LVar8, -1) - EVT_RETURN - EVT_ELSE - EVT_CALL(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetPartnerInUse, LVarA) - EVT_IF_NE(LVarA, 0) - EVT_SET(LVar8, -1) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 100, EVT_FLOAT(0.6)) - EVT_END_THREAD - EVT_THREAD - EVT_IF_GE(LVar6, LVar7) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_ELSE - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_END_IF - EVT_CALL(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar1, LVar0) - EVT_SET(LVar2, LVar7) - EVT_SUB(LVar2, LVar6) - EVT_ADD(LVar1, LVar2) - EVT_CALL(MakeLerp, LVar0, LVar1, 100, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) - EVT_CALL(UpdateLerp) - EVT_CALL(N(UnkFunc12)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_THREAD - EVT_CALL(MakeLerp, LVar6, LVar7, 100, EASING_LINEAR) - EVT_CALL(PlaySoundAtCollider, LVar9, SOUND_LOOP_MOVE_STATUE, SOUND_SPACE_DEFAULT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g20, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o145) - EVT_CALL(UpdateColliderTransform, COLLIDER_o143) - EVT_CALL(UpdateColliderTransform, COLLIDER_o144) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(StopSound, SOUND_LOOP_MOVE_STATUE) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Loop(20) + Call(GetPartnerInUse, LVarA) + IfNe(LVarA, 0) + Set(LVar8, -1) + Return + EndIf + Call(N(UnkFunc11), LVar9) + IfEq(LVar0, 0) + Set(LVar8, -1) + Return + Else + Call(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) + EndIf + Wait(1) + EndLoop + Call(GetPartnerInUse, LVarA) + IfNe(LVarA, 0) + Set(LVar8, -1) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 100, Float(0.6)) + EndThread + Thread + IfGe(LVar6, LVar7) + Call(InterpPlayerYaw, 270, 0) + Else + Call(InterpPlayerYaw, 90, 0) + EndIf + Call(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar1, LVar0) + Set(LVar2, LVar7) + Sub(LVar2, LVar6) + Add(LVar1, LVar2) + Call(MakeLerp, LVar0, LVar1, 100, EASING_LINEAR) + Loop(0) + Call(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) + Call(UpdateLerp) + Call(N(UnkFunc12)) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(DisablePlayerInput, FALSE) + EndThread + Call(MakeLerp, LVar6, LVar7, 100, EASING_LINEAR) + Call(PlaySoundAtCollider, LVar9, SOUND_LOOP_MOVE_STATUE, SOUND_SPACE_DEFAULT) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g20, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o145) + Call(UpdateColliderTransform, COLLIDER_o143) + Call(UpdateColliderTransform, COLLIDER_o144) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(StopSound, SOUND_LOOP_MOVE_STATUE) + Return + End }; EvtScript N(EVS_PushMiddleStatue_Impl_FromLeft) = { - EVT_IF_EQ(GB_KPA115_StatuePosition, 1) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GB_KPA115_StatuePosition, 0) - EVT_SET(LVar6, 0) - EVT_SET(LVar7, 50) - EVT_SET(LVar8, 1) - EVT_ELSE - EVT_SET(LVar6, 50) - EVT_SET(LVar7, 100) - EVT_SET(LVar8, 1) - EVT_END_IF - EVT_SET(LVar9, COLLIDER_o143) - EVT_EXEC_WAIT(N(EVS_PushMiddleStatue_Impl)) - EVT_IF_NE(LVar8, -1) - EVT_SET(GB_KPA115_StatuePosition, LVar8) - EVT_END_IF - EVT_IF_EQ(GB_KPA115_StatuePosition, 1) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o157, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_KPA115_StatuePosition, 1) + Return + EndIf + IfEq(GB_KPA115_StatuePosition, 0) + Set(LVar6, 0) + Set(LVar7, 50) + Set(LVar8, 1) + Else + Set(LVar6, 50) + Set(LVar7, 100) + Set(LVar8, 1) + EndIf + Set(LVar9, COLLIDER_o143) + ExecWait(N(EVS_PushMiddleStatue_Impl)) + IfNe(LVar8, -1) + Set(GB_KPA115_StatuePosition, LVar8) + EndIf + IfEq(GB_KPA115_StatuePosition, 1) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o157, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Return + End }; EvtScript N(EVS_PushMiddleStatue_Impl_FromRight) = { - EVT_IF_EQ(GB_KPA115_StatuePosition, 0) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GB_KPA115_StatuePosition, 1) - EVT_SET(LVar6, 50) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 0) - EVT_ELSE - EVT_SET(LVar6, 100) - EVT_SET(LVar7, 50) - EVT_SET(LVar8, 0) - EVT_END_IF - EVT_SET(LVar9, COLLIDER_o144) - EVT_EXEC_WAIT(N(EVS_PushMiddleStatue_Impl)) - EVT_IF_NE(LVar8, -1) - EVT_SET(GB_KPA115_StatuePosition, LVar8) - EVT_END_IF - EVT_IF_EQ(GB_KPA115_StatuePosition, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o157, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_KPA115_StatuePosition, 0) + Return + EndIf + IfEq(GB_KPA115_StatuePosition, 1) + Set(LVar6, 50) + Set(LVar7, 0) + Set(LVar8, 0) + Else + Set(LVar6, 100) + Set(LVar7, 50) + Set(LVar8, 0) + EndIf + Set(LVar9, COLLIDER_o144) + ExecWait(N(EVS_PushMiddleStatue_Impl)) + IfNe(LVar8, -1) + Set(GB_KPA115_StatuePosition, LVar8) + EndIf + IfEq(GB_KPA115_StatuePosition, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o157, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Return + End }; EvtScript N(EVS_SetupStatues) = { - EVT_SWITCH(GB_KPA115_StatuePosition) - EVT_CASE_EQ(0) - EVT_CASE_EQ(1) - EVT_CALL(TranslateGroup, MODEL_g20, 50, 0, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o157, COLLIDER_FLAGS_UPPER_MASK) - EVT_CASE_EQ(2) - EVT_CALL(TranslateGroup, MODEL_g20, 100, 0, 0) - EVT_END_SWITCH - EVT_CALL(ParentColliderToModel, COLLIDER_o145, MODEL_o103) - EVT_CALL(ParentColliderToModel, COLLIDER_o143, MODEL_o103) - EVT_CALL(ParentColliderToModel, COLLIDER_o144, MODEL_o103) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_PushMiddleStatue_Impl_FromLeft)), TRIGGER_WALL_PUSH, COLLIDER_o143, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_PushMiddleStatue_Impl_FromRight)), TRIGGER_WALL_PUSH, COLLIDER_o144, 1, 0) - EVT_RETURN - EVT_END + Switch(GB_KPA115_StatuePosition) + CaseEq(0) + CaseEq(1) + Call(TranslateGroup, MODEL_g20, 50, 0, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o157, COLLIDER_FLAGS_UPPER_MASK) + CaseEq(2) + Call(TranslateGroup, MODEL_g20, 100, 0, 0) + EndSwitch + Call(ParentColliderToModel, COLLIDER_o145, MODEL_o103) + Call(ParentColliderToModel, COLLIDER_o143, MODEL_o103) + Call(ParentColliderToModel, COLLIDER_o144, MODEL_o103) + BindTrigger(Ref(N(EVS_PushMiddleStatue_Impl_FromLeft)), TRIGGER_WALL_PUSH, COLLIDER_o143, 1, 0) + BindTrigger(Ref(N(EVS_PushMiddleStatue_Impl_FromRight)), TRIGGER_WALL_PUSH, COLLIDER_o144, 1, 0) + Return + End }; diff --git a/src/world/area_kpa/kpa_116/kpa_116_1_music.c b/src/world/area_kpa/kpa_116/kpa_116_1_music.c index 6e49991e80b..d076661f52f 100644 --- a/src/world/area_kpa/kpa_116/kpa_116_1_music.c +++ b/src/world/area_kpa/kpa_116/kpa_116_1_music.c @@ -1,12 +1,12 @@ #include "kpa_116.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_116/kpa_116_2_main.c b/src/world/area_kpa/kpa_116/kpa_116_2_main.c index f2139a684d4..953e79d7b33 100644 --- a/src/world/area_kpa/kpa_116/kpa_116_2_main.c +++ b/src/world/area_kpa/kpa_116/kpa_116_2_main.c @@ -4,20 +4,20 @@ EvtScript N(EVS_ExitWalk_kpa_115_1) = EVT_EXIT_WALK(60, kpa_116_ENTRY_0, "kpa_11 EvtScript N(EVS_ExitWalk_kpa_117_0) = EVT_EXIT_WALK(60, kpa_116_ENTRY_1, "kpa_117", kpa_117_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_115_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_117_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_115_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_117_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_kpa/kpa_117/kpa_117_1_music.c b/src/world/area_kpa/kpa_117/kpa_117_1_music.c index f295e872063..f5f5980583d 100644 --- a/src/world/area_kpa/kpa_117/kpa_117_1_music.c +++ b/src/world/area_kpa/kpa_117/kpa_117_1_music.c @@ -1,12 +1,12 @@ #include "kpa_117.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_117/kpa_117_2_main.c b/src/world/area_kpa/kpa_117/kpa_117_2_main.c index 7192cf0996b..c3d0884385b 100644 --- a/src/world/area_kpa/kpa_117/kpa_117_2_main.c +++ b/src/world/area_kpa/kpa_117/kpa_117_2_main.c @@ -1,27 +1,27 @@ #include "kpa_117.h" EvtScript N(EVS_Empty) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_ExitWalk_kpa_116_1) = EVT_EXIT_WALK(60, kpa_117_ENTRY_0, "kpa_116", kpa_116_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_116_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_116_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_Empty)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + ExecWait(N(EVS_Empty)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_kpa/kpa_118/kpa_118_1_music.c b/src/world/area_kpa/kpa_118/kpa_118_1_music.c index a04f5f32c21..3ba06291240 100644 --- a/src/world/area_kpa/kpa_118/kpa_118_1_music.c +++ b/src/world/area_kpa/kpa_118/kpa_118_1_music.c @@ -1,12 +1,12 @@ #include "kpa_118.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_118/kpa_118_2_main.c b/src/world/area_kpa/kpa_118/kpa_118_2_main.c index 34435385ef7..0a88aedc00d 100644 --- a/src/world/area_kpa/kpa_118/kpa_118_2_main.c +++ b/src/world/area_kpa/kpa_118/kpa_118_2_main.c @@ -4,20 +4,20 @@ EvtScript N(EVS_ExitWalk_kpa_115_2) = EVT_EXIT_WALK(60, kpa_118_ENTRY_0, "kpa_11 EvtScript N(EVS_ExitWalk_kpa_119_0) = EVT_EXIT_WALK(60, kpa_118_ENTRY_1, "kpa_119", kpa_119_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_115_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_119_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_115_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_119_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_kpa/kpa_119/kpa_119_1_music.c b/src/world/area_kpa/kpa_119/kpa_119_1_music.c index f326a98373e..6746dab2c47 100644 --- a/src/world/area_kpa/kpa_119/kpa_119_1_music.c +++ b/src/world/area_kpa/kpa_119/kpa_119_1_music.c @@ -1,12 +1,12 @@ #include "kpa_119.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_119/kpa_119_2_entity.c b/src/world/area_kpa/kpa_119/kpa_119_2_entity.c index db93df9ade3..c49317bbd0f 100644 --- a/src/world/area_kpa/kpa_119/kpa_119_2_entity.c +++ b/src/world/area_kpa/kpa_119/kpa_119_2_entity.c @@ -1,7 +1,7 @@ #include "kpa_119.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_BOWSER_CASTLE_KEY, -100, 20, 100, ITEM_SPAWN_MODE_KEY, GF_KPA119_Item_CastleKey2) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_BOWSER_CASTLE_KEY, -100, 20, 100, ITEM_SPAWN_MODE_KEY, GF_KPA119_Item_CastleKey2) + Return + End }; diff --git a/src/world/area_kpa/kpa_119/kpa_119_3_main.c b/src/world/area_kpa/kpa_119/kpa_119_3_main.c index 25ef93023fc..b9703f4f032 100644 --- a/src/world/area_kpa/kpa_119/kpa_119_3_main.c +++ b/src/world/area_kpa/kpa_119/kpa_119_3_main.c @@ -4,21 +4,21 @@ EvtScript N(EVS_ExitWalk_kpa_118_1) = EVT_EXIT_WALK(60, kpa_119_ENTRY_0, "kpa_118", kpa_118_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_118_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_118_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deiliwtt, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deiliwtt, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_kpa/kpa_12/kpa_12_1_music.c b/src/world/area_kpa/kpa_12/kpa_12_1_music.c index bf218ed22f9..3e1f7cbe36c 100644 --- a/src/world/area_kpa/kpa_12/kpa_12_1_music.c +++ b/src/world/area_kpa/kpa_12/kpa_12_1_music.c @@ -1,15 +1,15 @@ #include "kpa_12.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_1) - EVT_END_IF - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_1) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + IfEq(GF_KPA16_ShutOffLava, FALSE) + Call(PlayAmbientSounds, AMBIENT_LAVA_1) + EndIf + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_1) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_12/kpa_12_2_main.c b/src/world/area_kpa/kpa_12/kpa_12_2_main.c index fc9af6be2d4..0891220497e 100644 --- a/src/world/area_kpa/kpa_12/kpa_12_2_main.c +++ b/src/world/area_kpa/kpa_12/kpa_12_2_main.c @@ -3,61 +3,61 @@ #include "world/common/atomic/TexturePan.inc.c" EvtScript N(EVS_ExitWalk_kpa_1X_Upper) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(UseExitHeading, 60, kpa_12_ENTRY_0) - EVT_EXEC(ExitWalk) - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_CALL(GotoMap, EVT_PTR("kpa_11"), kpa_11_ENTRY_1) - EVT_ELSE - EVT_CALL(GotoMap, EVT_PTR("kpa_10"), kpa_10_ENTRY_1) - EVT_END_IF - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(UseExitHeading, 60, kpa_12_ENTRY_0) + Exec(ExitWalk) + IfEq(GF_KPA16_ShutOffLava, FALSE) + Call(GotoMap, Ref("kpa_11"), kpa_11_ENTRY_1) + Else + Call(GotoMap, Ref("kpa_10"), kpa_10_ENTRY_1) + EndIf + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_kpa_1X_Lower) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(UseExitHeading, 60, kpa_12_ENTRY_2) - EVT_EXEC(ExitWalk) - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_CALL(GotoMap, EVT_PTR("kpa_11"), kpa_11_ENTRY_4) - EVT_ELSE - EVT_CALL(GotoMap, EVT_PTR("kpa_10"), kpa_10_ENTRY_4) - EVT_END_IF - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(UseExitHeading, 60, kpa_12_ENTRY_2) + Exec(ExitWalk) + IfEq(GF_KPA16_ShutOffLava, FALSE) + Call(GotoMap, Ref("kpa_11"), kpa_11_ENTRY_4) + Else + Call(GotoMap, Ref("kpa_10"), kpa_10_ENTRY_4) + EndIf + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_kpa_13_0) = EVT_EXIT_WALK(60, kpa_12_ENTRY_1, "kpa_13", kpa_13_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_1X_Upper)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_1X_Lower)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_13_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_1X_Upper)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_1X_Lower)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_13_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_TexPan_Lava) = { - EVT_THREAD + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_0) TEX_PAN_PARAMS_STEP( -400, 0, -800, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 1, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_o319, 0) - EVT_CALL(SetTexPanner, MODEL_o555, 0) - EVT_CALL(SetTexPanner, MODEL_o516, 0) - EVT_CALL(SetTexPanner, MODEL_o526, 0) - EVT_CALL(SetTexPanner, MODEL_o557, 0) - EVT_CALL(SetTexPanner, MODEL_o558, 0) - EVT_CALL(SetTexPanner, MODEL_o513, 0) - EVT_CALL(SetTexPanner, MODEL_o561, 0) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetTexPanner, MODEL_o319, 0) + Call(SetTexPanner, MODEL_o555, 0) + Call(SetTexPanner, MODEL_o516, 0) + Call(SetTexPanner, MODEL_o526, 0) + Call(SetTexPanner, MODEL_o557, 0) + Call(SetTexPanner, MODEL_o558, 0) + Call(SetTexPanner, MODEL_o513, 0) + Call(SetTexPanner, MODEL_o561, 0) + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -71,44 +71,44 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_CALL(EnableGroup, MODEL_after, FALSE) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_ELSE - EVT_CALL(EnableGroup, MODEL_before, FALSE) - EVT_END_IF - EVT_EXEC(N(EVS_SetupMusic)) - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_EXEC(N(EVS_SetupPlatforms)) - EVT_END_IF - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_THREAD - EVT_WAIT(2) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o356, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o358, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o359, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o360, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o361, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o362, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o363, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o364, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o365, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o370, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o371, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o419, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o420, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilisw, SURFACE_TYPE_LAVA) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_END_THREAD - EVT_END_IF - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + IfEq(GF_KPA16_ShutOffLava, FALSE) + Call(EnableGroup, MODEL_after, FALSE) + Exec(N(EVS_TexPan_Lava)) + Else + Call(EnableGroup, MODEL_before, FALSE) + EndIf + Exec(N(EVS_SetupMusic)) + IfEq(GF_KPA16_ShutOffLava, FALSE) + Exec(N(EVS_SetupPlatforms)) + EndIf + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + IfEq(GF_KPA16_ShutOffLava, FALSE) + Thread + Wait(2) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o356, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o358, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o359, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o360, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o361, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o362, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o363, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o364, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o365, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o370, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o371, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o419, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o420, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilisw, SURFACE_TYPE_LAVA) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + EndThread + EndIf + Wait(1) + Return + End }; diff --git a/src/world/area_kpa/kpa_12/kpa_12_3_platforms.c b/src/world/area_kpa/kpa_12/kpa_12_3_platforms.c index 0bba5ca39ea..31adbe1d9db 100644 --- a/src/world/area_kpa/kpa_12/kpa_12_3_platforms.c +++ b/src/world/area_kpa/kpa_12/kpa_12_3_platforms.c @@ -38,192 +38,192 @@ API_CALLABLE(N(IsPartnerLakilester)) { } EvtScript N(EVS_SinkingPlatform_Update) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_SETF(LVar0, EVT_FLOAT(0.0)) - EVT_LABEL(0) - EVT_CALL(TranslateGroup, LVar1, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, LVar3) - EVT_SUBF(LVar0, EVT_FLOAT(0.5)) - EVT_IF_LT(LVar0, -40) - EVT_SET(LVar0, -40) - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(N(GetFloorBelow), LVarB) - EVT_CALL(GetPlayerActionState, LVarC) - EVT_IF_EQ(LVar3, LVarB) - EVT_IF_NE(LVarC, ACTION_STATE_JUMP) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_LABEL(1) - EVT_ADDF(LVar0, EVT_FLOAT(1.0)) - EVT_CALL(TranslateGroup, LVar1, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, LVar3) - EVT_WAIT(1) - EVT_CALL(N(GetFloorBelow), LVarB) - EVT_CALL(GetPlayerActionState, LVarC) - EVT_IF_EQ(LVar3, LVarB) - EVT_IF_NE(LVarC, ACTION_STATE_JUMP) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_IF_LT(LVar0, 0) - EVT_GOTO(1) - EVT_END_IF - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0B) + SetF(LVar0, Float(0.0)) + Label(0) + Call(TranslateGroup, LVar1, 0, LVar0, 0) + Call(UpdateColliderTransform, LVar3) + SubF(LVar0, Float(0.5)) + IfLt(LVar0, -40) + Set(LVar0, -40) + EndIf + Wait(1) + Call(N(GetFloorBelow), LVarB) + Call(GetPlayerActionState, LVarC) + IfEq(LVar3, LVarB) + IfNe(LVarC, ACTION_STATE_JUMP) + Goto(0) + EndIf + EndIf + Label(1) + AddF(LVar0, Float(1.0)) + Call(TranslateGroup, LVar1, 0, LVar0, 0) + Call(UpdateColliderTransform, LVar3) + Wait(1) + Call(N(GetFloorBelow), LVarB) + Call(GetPlayerActionState, LVarC) + IfEq(LVar3, LVarB) + IfNe(LVarC, ACTION_STATE_JUMP) + Goto(0) + EndIf + EndIf + IfLt(LVar0, 0) + Goto(1) + EndIf + Return + End }; EvtScript N(EVS_Touch_SinkingPlatform1) = { - EVT_SET(LVar1, MODEL_dai01) - EVT_SET(LVar3, COLLIDER_o405) - EVT_EXEC_WAIT(N(EVS_SinkingPlatform_Update)) - EVT_RETURN - EVT_END + Set(LVar1, MODEL_dai01) + Set(LVar3, COLLIDER_o405) + ExecWait(N(EVS_SinkingPlatform_Update)) + Return + End }; EvtScript N(EVS_Touch_SinkingPlatform2) = { - EVT_SET(LVar1, MODEL_dai02) - EVT_SET(LVar3, COLLIDER_o407) - EVT_EXEC_WAIT(N(EVS_SinkingPlatform_Update)) - EVT_RETURN - EVT_END + Set(LVar1, MODEL_dai02) + Set(LVar3, COLLIDER_o407) + ExecWait(N(EVS_SinkingPlatform_Update)) + Return + End }; EvtScript N(EVS_Touch_SinkingPlatform3) = { - EVT_SET(LVar1, MODEL_dai03) - EVT_SET(LVar3, COLLIDER_o409) - EVT_EXEC_WAIT(N(EVS_SinkingPlatform_Update)) - EVT_RETURN - EVT_END + Set(LVar1, MODEL_dai03) + Set(LVar3, COLLIDER_o409) + ExecWait(N(EVS_SinkingPlatform_Update)) + Return + End }; EvtScript N(EVS_Touch_SinkingPlatform4) = { - EVT_SET(LVar1, MODEL_dai04) - EVT_SET(LVar3, COLLIDER_o411) - EVT_EXEC_WAIT(N(EVS_SinkingPlatform_Update)) - EVT_RETURN - EVT_END + Set(LVar1, MODEL_dai04) + Set(LVar3, COLLIDER_o411) + ExecWait(N(EVS_SinkingPlatform_Update)) + Return + End }; EvtScript N(EVS_SinkingPlatform_Idle) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, -3, 20, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, LVar2, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(MakeLerp, -3, 0, 20, EASING_LINEAR) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, LVar2, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(2) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0B) + Label(0) + Call(MakeLerp, 0, -3, 20, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(TranslateGroup, LVar2, 0, LVar0, 0) + Wait(1) + IfNe(LVar1, 0) + Goto(1) + EndIf + Call(MakeLerp, -3, 0, 20, EASING_LINEAR) + Label(2) + Call(UpdateLerp) + Call(TranslateGroup, LVar2, 0, LVar0, 0) + Wait(1) + IfNe(LVar1, 0) + Goto(2) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_SetupSinkingPlatforms) = { - EVT_THREAD - EVT_SET(LVar2, MODEL_dai01) - EVT_EXEC_WAIT(N(EVS_SinkingPlatform_Idle)) - EVT_END_THREAD - EVT_WAIT(10) - EVT_THREAD - EVT_SET(LVar2, MODEL_dai02) - EVT_EXEC_WAIT(N(EVS_SinkingPlatform_Idle)) - EVT_END_THREAD - EVT_WAIT(10) - EVT_THREAD - EVT_SET(LVar2, MODEL_dai03) - EVT_EXEC_WAIT(N(EVS_SinkingPlatform_Idle)) - EVT_END_THREAD - EVT_WAIT(10) - EVT_SET(LVar2, MODEL_dai04) - EVT_EXEC_WAIT(N(EVS_SinkingPlatform_Idle)) - EVT_RETURN - EVT_END + Thread + Set(LVar2, MODEL_dai01) + ExecWait(N(EVS_SinkingPlatform_Idle)) + EndThread + Wait(10) + Thread + Set(LVar2, MODEL_dai02) + ExecWait(N(EVS_SinkingPlatform_Idle)) + EndThread + Wait(10) + Thread + Set(LVar2, MODEL_dai03) + ExecWait(N(EVS_SinkingPlatform_Idle)) + EndThread + Wait(10) + Set(LVar2, MODEL_dai04) + ExecWait(N(EVS_SinkingPlatform_Idle)) + Return + End }; EvtScript N(EVS_SetupMovingPlatform) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_CALL(ParentColliderToModel, COLLIDER_o414, MODEL_o522) - EVT_SET(LVar0, 0) - EVT_SET(LVar3, 0) - EVT_LOOP(0) - EVT_SET(LVar1, 125) - EVT_SUB(LVar1, LVar0) - EVT_CALL(MakeLerp, LVar0, 125, LVar1, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_dai05, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o414) - EVT_SET(LVar4, LVar0) - EVT_SUB(LVar4, LVar3) - EVT_SET(LVar3, LVar0) - EVT_CALL(N(AddPlatformPushVelocity), LVar4, COLLIDER_o414) - EVT_IF_GT(LVar0, 95) - EVT_CALL(N(IsPartnerLakilester)) - EVT_IF_EQ(LVar9, 1) - EVT_CALL(N(GetFloorBelow), LVar2) - EVT_IF_EQ(LVar2, 81) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_CALL(MakeLerp, LVar0, 0, LVar0, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_dai05, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o414) - EVT_SET(LVar4, LVar0) - EVT_SUB(LVar4, LVar3) - EVT_SET(LVar3, LVar0) - EVT_CALL(N(AddPlatformPushVelocity), LVar4, COLLIDER_o414) - EVT_IF_LT(LVar0, 30) - EVT_CALL(N(IsPartnerLakilester)) - EVT_IF_EQ(LVar9, 1) - EVT_CALL(N(GetFloorBelow), LVar2) - EVT_IF_EQ(LVar2, 80) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_END_LOOP - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0B) + Call(ParentColliderToModel, COLLIDER_o414, MODEL_o522) + Set(LVar0, 0) + Set(LVar3, 0) + Loop(0) + Set(LVar1, 125) + Sub(LVar1, LVar0) + Call(MakeLerp, LVar0, 125, LVar1, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_dai05, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o414) + Set(LVar4, LVar0) + Sub(LVar4, LVar3) + Set(LVar3, LVar0) + Call(N(AddPlatformPushVelocity), LVar4, COLLIDER_o414) + IfGt(LVar0, 95) + Call(N(IsPartnerLakilester)) + IfEq(LVar9, 1) + Call(N(GetFloorBelow), LVar2) + IfEq(LVar2, 81) + BreakLoop + EndIf + EndIf + EndIf + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(20) + Call(MakeLerp, LVar0, 0, LVar0, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_dai05, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o414) + Set(LVar4, LVar0) + Sub(LVar4, LVar3) + Set(LVar3, LVar0) + Call(N(AddPlatformPushVelocity), LVar4, COLLIDER_o414) + IfLt(LVar0, 30) + Call(N(IsPartnerLakilester)) + IfEq(LVar9, 1) + Call(N(GetFloorBelow), LVar2) + IfEq(LVar2, 80) + BreakLoop + EndIf + EndIf + EndIf + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(20) + EndLoop + Return + End }; EvtScript N(EVS_SetupPlatforms) = { - EVT_CALL(ParentColliderToModel, COLLIDER_o405, MODEL_o447) - EVT_CALL(ParentColliderToModel, COLLIDER_o407, MODEL_o449) - EVT_CALL(ParentColliderToModel, COLLIDER_o409, MODEL_o451) - EVT_CALL(ParentColliderToModel, COLLIDER_o411, MODEL_o453) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Touch_SinkingPlatform1)), TRIGGER_FLOOR_TOUCH, COLLIDER_o405, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Touch_SinkingPlatform2)), TRIGGER_FLOOR_TOUCH, COLLIDER_o407, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Touch_SinkingPlatform3)), TRIGGER_FLOOR_TOUCH, COLLIDER_o409, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Touch_SinkingPlatform4)), TRIGGER_FLOOR_TOUCH, COLLIDER_o411, 1, 0) - EVT_EXEC(N(EVS_SetupSinkingPlatforms)) - EVT_EXEC(N(EVS_SetupMovingPlatform)) - EVT_RETURN - EVT_END + Call(ParentColliderToModel, COLLIDER_o405, MODEL_o447) + Call(ParentColliderToModel, COLLIDER_o407, MODEL_o449) + Call(ParentColliderToModel, COLLIDER_o409, MODEL_o451) + Call(ParentColliderToModel, COLLIDER_o411, MODEL_o453) + BindTrigger(Ref(N(EVS_Touch_SinkingPlatform1)), TRIGGER_FLOOR_TOUCH, COLLIDER_o405, 1, 0) + BindTrigger(Ref(N(EVS_Touch_SinkingPlatform2)), TRIGGER_FLOOR_TOUCH, COLLIDER_o407, 1, 0) + BindTrigger(Ref(N(EVS_Touch_SinkingPlatform3)), TRIGGER_FLOOR_TOUCH, COLLIDER_o409, 1, 0) + BindTrigger(Ref(N(EVS_Touch_SinkingPlatform4)), TRIGGER_FLOOR_TOUCH, COLLIDER_o411, 1, 0) + Exec(N(EVS_SetupSinkingPlatforms)) + Exec(N(EVS_SetupMovingPlatform)) + Return + End }; diff --git a/src/world/area_kpa/kpa_121/kpa_121_1_music.c b/src/world/area_kpa/kpa_121/kpa_121_1_music.c index 5a7ef7a3d60..9a00d3eff0b 100644 --- a/src/world/area_kpa/kpa_121/kpa_121_1_music.c +++ b/src/world/area_kpa/kpa_121/kpa_121_1_music.c @@ -1,12 +1,12 @@ #include "kpa_121.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_121/kpa_121_2_main.c b/src/world/area_kpa/kpa_121/kpa_121_2_main.c index ef4e90d791f..d578c62e6fc 100644 --- a/src/world/area_kpa/kpa_121/kpa_121_2_main.c +++ b/src/world/area_kpa/kpa_121/kpa_121_2_main.c @@ -3,57 +3,57 @@ EvtScript N(EVS_ExitDoors_kpa_83_1) = EVT_EXIT_DOUBLE_DOOR(kpa_121_ENTRY_0, "kpa_83", kpa_83_ENTRY_1, COLLIDER_deilitw, MODEL_o348, MODEL_o356); EvtScript N(EVS_ExitDoor_osr_02_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_LT(GB_StoryProgress, STORY_CH8_REACHED_PEACHS_CASTLE) - EVT_SET(GB_StoryProgress, STORY_CH8_REACHED_PEACHS_CASTLE) - EVT_END_IF - EVT_SET(LVar0, kpa_121_ENTRY_1) - EVT_SET(LVar1, COLLIDER_deilitte) - EVT_SET(LVar2, MODEL_o340) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("osr_02"), osr_02_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + IfLt(GB_StoryProgress, STORY_CH8_REACHED_PEACHS_CASTLE) + Set(GB_StoryProgress, STORY_CH8_REACHED_PEACHS_CASTLE) + EndIf + Set(LVar0, kpa_121_ENTRY_1) + Set(LVar1, COLLIDER_deilitte) + Set(LVar2, MODEL_o340) + Set(LVar3, DOOR_SWING_OUT) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("osr_02"), osr_02_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_83_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_osr_02_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitte, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_kpa_83_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoor_osr_02_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitte, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kpa_121_ENTRY_0) - EVT_SET(LVar0, 0) - EVT_SET(LVar2, MODEL_o356) - EVT_SET(LVar3, MODEL_o348) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kpa_121_ENTRY_1) - EVT_SET(LVar0, 1) - EVT_SET(LVar2, MODEL_o340) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kpa_121_ENTRY_0) + Set(LVar0, 0) + Set(LVar2, MODEL_o356) + Set(LVar3, MODEL_o348) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kpa_121_ENTRY_1) + Set(LVar0, 1) + Set(LVar2, MODEL_o340) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSingleDoor) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_kpa/kpa_13/kpa_13_1_music.c b/src/world/area_kpa/kpa_13/kpa_13_1_music.c index 8d0f8bf2c20..cb15e77ad52 100644 --- a/src/world/area_kpa/kpa_13/kpa_13_1_music.c +++ b/src/world/area_kpa/kpa_13/kpa_13_1_music.c @@ -1,15 +1,15 @@ #include "kpa_13.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_1) - EVT_END_IF - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_1) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + IfEq(GF_KPA16_ShutOffLava, FALSE) + Call(PlayAmbientSounds, AMBIENT_LAVA_1) + EndIf + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_1) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_13/kpa_13_2_main.c b/src/world/area_kpa/kpa_13/kpa_13_2_main.c index 3fbfed5398a..a422005b6eb 100644 --- a/src/world/area_kpa/kpa_13/kpa_13_2_main.c +++ b/src/world/area_kpa/kpa_13/kpa_13_2_main.c @@ -7,27 +7,27 @@ EvtScript N(EVS_ExitWalk_kpa_15_0) = EVT_EXIT_WALK(60, kpa_13_ENTRY_2, "kpa_15", EvtScript N(EVS_ExitWalk_kpa_14_0) = EVT_EXIT_WALK(60, kpa_13_ENTRY_1, "kpa_14", kpa_14_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_12_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_15_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_14_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_12_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_15_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_14_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_TexPan_Lava) = { - EVT_THREAD + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_0) TEX_PAN_PARAMS_STEP( -400, 0, -800, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 1, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_o926, 0) - EVT_CALL(SetTexPanner, MODEL_o927, 0) - EVT_CALL(SetTexPanner, MODEL_o928, 0) - EVT_CALL(SetTexPanner, MODEL_o925, 0) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetTexPanner, MODEL_o926, 0) + Call(SetTexPanner, MODEL_o927, 0) + Call(SetTexPanner, MODEL_o928, 0) + Call(SetTexPanner, MODEL_o925, 0) + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -47,47 +47,47 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_CALL(EnableGroup, MODEL_after, FALSE) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_ELSE - EVT_CALL(EnableGroup, MODEL_before, FALSE) - EVT_END_IF - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_EXEC(N(EVS_SetupPlatforms)) - EVT_END_IF - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_THREAD - EVT_WAIT(2) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1039, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o805, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1028, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1029, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1030, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1031, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1032, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1033, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1034, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1035, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1036, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1037, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1038, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1074, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1075, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilin, SURFACE_TYPE_LAVA) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_END_THREAD - EVT_END_IF - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + ExecWait(N(EVS_MakeEntities)) + IfEq(GF_KPA16_ShutOffLava, FALSE) + Call(EnableGroup, MODEL_after, FALSE) + Exec(N(EVS_TexPan_Lava)) + Else + Call(EnableGroup, MODEL_before, FALSE) + EndIf + Exec(N(EVS_SetupMusic)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + IfEq(GF_KPA16_ShutOffLava, FALSE) + Exec(N(EVS_SetupPlatforms)) + EndIf + IfEq(GF_KPA16_ShutOffLava, FALSE) + Thread + Wait(2) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1039, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o805, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1028, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1029, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1030, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1031, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1032, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1033, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1034, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1035, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1036, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1037, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1038, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1074, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1075, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilin, SURFACE_TYPE_LAVA) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + EndThread + EndIf + Return + End }; diff --git a/src/world/area_kpa/kpa_13/kpa_13_3_entity.c b/src/world/area_kpa/kpa_13/kpa_13_3_entity.c index 9aca6ce66b4..3d2f0668de1 100644 --- a/src/world/area_kpa/kpa_13/kpa_13_3_entity.c +++ b/src/world/area_kpa/kpa_13/kpa_13_3_entity.c @@ -2,16 +2,16 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_SET(AF_KPA13_HitSwitchA, FALSE) - EVT_SET(AF_KPA13_HitSwitchB, FALSE) - EVT_IF_EQ(GF_KPA13_BlueSwitchA, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueSwitch), 285, 10, -55, 0, MAKE_ENTITY_END) - EVT_CALL(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_KPA13_HitSwitchA)) - EVT_END_IF - EVT_IF_EQ(GF_KPA13_BlueSwitchB, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueSwitch), 935, 10, -55, 0, MAKE_ENTITY_END) - EVT_CALL(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_KPA13_HitSwitchB)) - EVT_END_IF - EVT_RETURN - EVT_END + Set(AF_KPA13_HitSwitchA, FALSE) + Set(AF_KPA13_HitSwitchB, FALSE) + IfEq(GF_KPA13_BlueSwitchA, FALSE) + Call(MakeEntity, Ref(Entity_BlueSwitch), 285, 10, -55, 0, MAKE_ENTITY_END) + Call(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_KPA13_HitSwitchA)) + EndIf + IfEq(GF_KPA13_BlueSwitchB, FALSE) + Call(MakeEntity, Ref(Entity_BlueSwitch), 935, 10, -55, 0, MAKE_ENTITY_END) + Call(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_KPA13_HitSwitchB)) + EndIf + Return + End }; diff --git a/src/world/area_kpa/kpa_13/kpa_13_4_platforms.c b/src/world/area_kpa/kpa_13/kpa_13_4_platforms.c index faee2857284..6fc5ac1e39e 100644 --- a/src/world/area_kpa/kpa_13/kpa_13_4_platforms.c +++ b/src/world/area_kpa/kpa_13/kpa_13_4_platforms.c @@ -38,147 +38,147 @@ API_CALLABLE(N(IsPartnerLakilester)) { } EvtScript N(EVS_SetupPlatforms) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_THREAD - EVT_CALL(ParentColliderToModel, COLLIDER_o1070, MODEL_o1083) - EVT_CALL(TranslateGroup, MODEL_dai05, 125, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o1070) - EVT_IF_EQ(GF_KPA13_BlueSwitchA, FALSE) - EVT_LABEL(11) - EVT_IF_EQ(AF_KPA13_HitSwitchA, FALSE) - EVT_WAIT(1) - EVT_GOTO(11) - EVT_END_IF - EVT_WAIT(20) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30, EVT_FLOAT(0.5)) - EVT_SET(GF_KPA13_BlueSwitchA, TRUE) - EVT_END_IF - EVT_SET(LVar0, 125) - EVT_SET(LVar3, -100) - EVT_LOOP(0) - EVT_SET(LVar1, LVar0) - EVT_SUB(LVar1, -100) - EVT_CALL(MakeLerp, LVar0, -100, LVar1, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_dai05, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o1070) - EVT_SET(LVar4, LVar0) - EVT_SUB(LVar4, LVar3) - EVT_SET(LVar3, LVar0) - EVT_CALL(N(AddPlatformPushVelocity), LVar4, COLLIDER_o1070) - EVT_IF_LT(LVar0, -70) - EVT_CALL(N(IsPartnerLakilester)) - EVT_IF_EQ(LVar9, 1) - EVT_CALL(N(GetFloorBelow), LVar2) - EVT_IF_EQ(LVar2, 90) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_SET(LVar1, 125) - EVT_SUB(LVar1, LVar0) - EVT_CALL(MakeLerp, LVar0, 125, LVar1, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_dai05, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o1070) - EVT_SET(LVar4, LVar0) - EVT_SUB(LVar4, LVar3) - EVT_SET(LVar3, LVar0) - EVT_CALL(N(AddPlatformPushVelocity), LVar4, COLLIDER_o1070) - EVT_IF_GT(LVar0, 95) - EVT_CALL(N(IsPartnerLakilester)) - EVT_IF_EQ(LVar9, 1) - EVT_CALL(N(GetFloorBelow), LVar2) - EVT_IF_EQ(LVar2, 91) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(ParentColliderToModel, COLLIDER_o1072, MODEL_o1087) - EVT_CALL(TranslateGroup, MODEL_dai06, 75, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o1072) - EVT_IF_EQ(GF_KPA13_BlueSwitchB, FALSE) - EVT_LABEL(12) - EVT_IF_EQ(AF_KPA13_HitSwitchB, FALSE) - EVT_WAIT(1) - EVT_GOTO(12) - EVT_END_IF - EVT_WAIT(20) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30, EVT_FLOAT(0.5)) - EVT_SET(GF_KPA13_BlueSwitchB, TRUE) - EVT_END_IF - EVT_SET(LVar0, 75) - EVT_SET(LVar3, -100) - EVT_LOOP(0) - EVT_SET(LVar1, LVar0) - EVT_SUB(LVar1, -100) - EVT_CALL(MakeLerp, LVar0, -100, LVar1, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_dai06, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o1072) - EVT_SET(LVar4, LVar0) - EVT_SUB(LVar4, LVar3) - EVT_SET(LVar3, LVar0) - EVT_CALL(N(AddPlatformPushVelocity), LVar4, COLLIDER_o1072) - EVT_IF_LT(LVar0, -70) - EVT_CALL(N(IsPartnerLakilester)) - EVT_IF_EQ(LVar9, 1) - EVT_CALL(N(GetFloorBelow), LVar2) - EVT_IF_EQ(LVar2, 90) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_SET(LVar1, 75) - EVT_SUB(LVar1, LVar0) - EVT_CALL(MakeLerp, LVar0, 75, LVar1, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_dai06, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o1072) - EVT_SET(LVar4, LVar0) - EVT_SUB(LVar4, LVar3) - EVT_SET(LVar3, LVar0) - EVT_CALL(N(AddPlatformPushVelocity), LVar4, COLLIDER_o1072) - EVT_IF_GT(LVar0, 45) - EVT_CALL(N(IsPartnerLakilester)) - EVT_IF_EQ(LVar9, 1) - EVT_CALL(N(GetFloorBelow), LVar2) - EVT_IF_EQ(LVar2, 91) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_END_LOOP - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0B) + Thread + Call(ParentColliderToModel, COLLIDER_o1070, MODEL_o1083) + Call(TranslateGroup, MODEL_dai05, 125, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o1070) + IfEq(GF_KPA13_BlueSwitchA, FALSE) + Label(11) + IfEq(AF_KPA13_HitSwitchA, FALSE) + Wait(1) + Goto(11) + EndIf + Wait(20) + Call(ShakeCam, CAM_DEFAULT, 0, 30, Float(0.5)) + Set(GF_KPA13_BlueSwitchA, TRUE) + EndIf + Set(LVar0, 125) + Set(LVar3, -100) + Loop(0) + Set(LVar1, LVar0) + Sub(LVar1, -100) + Call(MakeLerp, LVar0, -100, LVar1, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_dai05, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o1070) + Set(LVar4, LVar0) + Sub(LVar4, LVar3) + Set(LVar3, LVar0) + Call(N(AddPlatformPushVelocity), LVar4, COLLIDER_o1070) + IfLt(LVar0, -70) + Call(N(IsPartnerLakilester)) + IfEq(LVar9, 1) + Call(N(GetFloorBelow), LVar2) + IfEq(LVar2, 90) + BreakLoop + EndIf + EndIf + EndIf + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(20) + Set(LVar1, 125) + Sub(LVar1, LVar0) + Call(MakeLerp, LVar0, 125, LVar1, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_dai05, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o1070) + Set(LVar4, LVar0) + Sub(LVar4, LVar3) + Set(LVar3, LVar0) + Call(N(AddPlatformPushVelocity), LVar4, COLLIDER_o1070) + IfGt(LVar0, 95) + Call(N(IsPartnerLakilester)) + IfEq(LVar9, 1) + Call(N(GetFloorBelow), LVar2) + IfEq(LVar2, 91) + BreakLoop + EndIf + EndIf + EndIf + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(20) + EndLoop + EndThread + Call(ParentColliderToModel, COLLIDER_o1072, MODEL_o1087) + Call(TranslateGroup, MODEL_dai06, 75, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o1072) + IfEq(GF_KPA13_BlueSwitchB, FALSE) + Label(12) + IfEq(AF_KPA13_HitSwitchB, FALSE) + Wait(1) + Goto(12) + EndIf + Wait(20) + Call(ShakeCam, CAM_DEFAULT, 0, 30, Float(0.5)) + Set(GF_KPA13_BlueSwitchB, TRUE) + EndIf + Set(LVar0, 75) + Set(LVar3, -100) + Loop(0) + Set(LVar1, LVar0) + Sub(LVar1, -100) + Call(MakeLerp, LVar0, -100, LVar1, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_dai06, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o1072) + Set(LVar4, LVar0) + Sub(LVar4, LVar3) + Set(LVar3, LVar0) + Call(N(AddPlatformPushVelocity), LVar4, COLLIDER_o1072) + IfLt(LVar0, -70) + Call(N(IsPartnerLakilester)) + IfEq(LVar9, 1) + Call(N(GetFloorBelow), LVar2) + IfEq(LVar2, 90) + BreakLoop + EndIf + EndIf + EndIf + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(20) + Set(LVar1, 75) + Sub(LVar1, LVar0) + Call(MakeLerp, LVar0, 75, LVar1, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_dai06, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o1072) + Set(LVar4, LVar0) + Sub(LVar4, LVar3) + Set(LVar3, LVar0) + Call(N(AddPlatformPushVelocity), LVar4, COLLIDER_o1072) + IfGt(LVar0, 45) + Call(N(IsPartnerLakilester)) + IfEq(LVar9, 1) + Call(N(GetFloorBelow), LVar2) + IfEq(LVar2, 91) + BreakLoop + EndIf + EndIf + EndIf + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(20) + EndLoop + Return + End }; diff --git a/src/world/area_kpa/kpa_130/kpa_130_1_music.c b/src/world/area_kpa/kpa_130/kpa_130_1_music.c index c1d6c52317e..a27a2c00cfe 100644 --- a/src/world/area_kpa/kpa_130/kpa_130_1_music.c +++ b/src/world/area_kpa/kpa_130/kpa_130_1_music.c @@ -2,12 +2,12 @@ #include "kpa_130.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_130/kpa_130_2_main.c b/src/world/area_kpa/kpa_130/kpa_130_2_main.c index 1d18a32317e..8a3f7ae3356 100644 --- a/src/world/area_kpa/kpa_130/kpa_130_2_main.c +++ b/src/world/area_kpa/kpa_130/kpa_130_2_main.c @@ -4,41 +4,41 @@ EvtScript N(EVS_ExitDoors_kpa_134_1) = EVT_EXIT_DOUBLE_DOOR(kpa_130_ENTRY_0, "kp EvtScript N(EVS_ExitDoors_kpa_111_0) = EVT_EXIT_DOUBLE_DOOR(kpa_130_ENTRY_1, "kpa_111", kpa_111_ENTRY_0, COLLIDER_tte, MODEL_o455, MODEL_o454); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_134_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_111_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_kpa_134_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_kpa_111_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kpa_130_ENTRY_0) - EVT_SET(LVar0, kpa_130_ENTRY_0) - EVT_SET(LVar2, MODEL_o11) - EVT_SET(LVar3, MODEL_o9) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kpa_130_ENTRY_1) - EVT_SET(LVar0, 1) - EVT_SET(LVar2, MODEL_o455) - EVT_SET(LVar3, MODEL_o454) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kpa_130_ENTRY_0) + Set(LVar0, kpa_130_ENTRY_0) + Set(LVar2, MODEL_o11) + Set(LVar3, MODEL_o9) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kpa_130_ENTRY_1) + Set(LVar0, 1) + Set(LVar2, MODEL_o455) + Set(LVar3, MODEL_o454) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_ttw, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_ttw, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_EnterMap)) + Wait(1) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_kpa/kpa_130/kpa_130_3_npc.c b/src/world/area_kpa/kpa_130/kpa_130_3_npc.c index 8d0de4d7449..fdf6a55b047 100644 --- a/src/world/area_kpa/kpa_130/kpa_130_3_npc.c +++ b/src/world/area_kpa/kpa_130/kpa_130_3_npc.c @@ -9,9 +9,9 @@ GuardAISettings N(AISettings_BillBlaster) = { }; EvtScript N(EVS_NpcAI_BillBlaster) = { - EVT_CALL(N(BillBlasterAI_Main), EVT_PTR(N(AISettings_BillBlaster))) - EVT_RETURN - EVT_END + Call(N(BillBlasterAI_Main), Ref(N(AISettings_BillBlaster))) + Return + End }; MobileAISettings N(AISettings_BulletBill) = { @@ -20,12 +20,12 @@ MobileAISettings N(AISettings_BulletBill) = { }; EvtScript N(EVS_NpcAI_BulletBill) = { - EVT_CALL(SelfEnemyOverrideSyncPos, 1) - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(N(BulletBillAI_Main), EVT_PTR(N(AISettings_BulletBill))) - EVT_RETURN - EVT_END + Call(SelfEnemyOverrideSyncPos, 1) + Call(SetSelfVar, 0, 0) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(N(BulletBillAI_Main), Ref(N(AISettings_BulletBill))) + Return + End }; GuardAISettings N(AISettings_BombshellBlaster) = { @@ -33,9 +33,9 @@ GuardAISettings N(AISettings_BombshellBlaster) = { }; EvtScript N(EVS_NpcAI_BombshellBlaster) = { - EVT_CALL(N(BillBlasterAI_Main), EVT_PTR(N(AISettings_BombshellBlaster))) - EVT_RETURN - EVT_END + Call(N(BillBlasterAI_Main), Ref(N(AISettings_BombshellBlaster))) + Return + End }; MobileAISettings N(AISettings_BombshellBill) = { @@ -44,62 +44,62 @@ MobileAISettings N(AISettings_BombshellBill) = { }; EvtScript N(EVS_NpcAI_BombshellBill) = { - EVT_CALL(SelfEnemyOverrideSyncPos, 1) - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(N(BulletBillAI_Main), EVT_PTR(N(AISettings_BombshellBill))) - EVT_RETURN - EVT_END + Call(SelfEnemyOverrideSyncPos, 1) + Call(SetSelfVar, 0, 0) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(N(BulletBillAI_Main), Ref(N(AISettings_BombshellBill))) + Return + End }; EvtScript N(EVS_NpcDefeat_BombshellBlaster) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(OnPlayerFled, 0) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_FLED) + Call(OnPlayerFled, 0) + CaseEq(OUTCOME_ENEMY_FLED) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; EvtScript N(EVS_NpcDefeat_BulletBill) = { - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, 0) - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(DoNpcDefeat) - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_BulletBill))) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(OnPlayerFled, 0) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetNpcRotation, NPC_SELF, 0, 0, 0) + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(DoNpcDefeat) + Call(SetSelfVar, 0, 0) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_BulletBill))) + CaseEq(OUTCOME_PLAYER_FLED) + Call(OnPlayerFled, 0) + CaseEq(OUTCOME_ENEMY_FLED) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndSwitch + Return + End }; EvtScript N(EVS_NpcDefeat_BombshellBill) = { - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, 0) - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(SetSelfVar, 0, 100) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(OnPlayerFled, 0) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetNpcRotation, NPC_SELF, 0, 0, 0) + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(SetSelfVar, 0, 100) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_FLED) + Call(OnPlayerFled, 0) + CaseEq(OUTCOME_ENEMY_FLED) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; NpcSettings N(NpcSettings_BillBlaster) = { @@ -139,15 +139,15 @@ NpcSettings N(NpcSettings_BombshellBill) = { }; EvtScript N(EVS_NpcInit_BombshellBlaster) = { - EVT_CALL(SetSelfVar, 1, -995) - EVT_RETURN - EVT_END + Call(SetSelfVar, 1, -995) + Return + End }; EvtScript N(EVS_NpcInit_BombshellBlaster_03) = { - EVT_CALL(SetSelfVar, 1, 30) - EVT_RETURN - EVT_END + Call(SetSelfVar, 1, 30) + Return + End }; NpcData N(NpcData_BombshellBlaster_01)[] = { diff --git a/src/world/area_kpa/kpa_133/kpa_133_1_music.c b/src/world/area_kpa/kpa_133/kpa_133_1_music.c index 7e1ca1d51f2..99406fda2e0 100644 --- a/src/world/area_kpa/kpa_133/kpa_133_1_music.c +++ b/src/world/area_kpa/kpa_133/kpa_133_1_music.c @@ -1,12 +1,12 @@ #include "kpa_133.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_133/kpa_133_2_main.c b/src/world/area_kpa/kpa_133/kpa_133_2_main.c index 8cc3adb3e87..6d67a364a9b 100644 --- a/src/world/area_kpa/kpa_133/kpa_133_2_main.c +++ b/src/world/area_kpa/kpa_133/kpa_133_2_main.c @@ -9,35 +9,35 @@ EvtScript N(EVS_ExitWalk_kpa_134_2) = EVT_EXIT_WALK(40, kpa_133_ENTRY_2, "kpa_13 EvtScript N(EVS_ExitWalk_kpa_134_3) = EVT_EXIT_WALK(40, kpa_133_ENTRY_3, "kpa_134", kpa_134_ENTRY_3); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_51_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_134_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_134_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie2, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_134_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliae, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_kpa_51_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_134_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_134_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie2, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_134_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliae, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kpa_133_ENTRY_0) - EVT_SET(LVar0, kpa_133_ENTRY_0) - EVT_SET(LVar2, MODEL_o486) - EVT_SET(LVar3, MODEL_o485) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kpa_133_ENTRY_1) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(kpa_133_ENTRY_2) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(kpa_133_ENTRY_3) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kpa_133_ENTRY_0) + Set(LVar0, kpa_133_ENTRY_0) + Set(LVar2, MODEL_o486) + Set(LVar3, MODEL_o485) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kpa_133_ENTRY_1) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseEq(kpa_133_ENTRY_2) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseEq(kpa_133_ENTRY_3) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; BombTrigger N(BombPos_Wall) = { @@ -46,62 +46,62 @@ BombTrigger N(BombPos_Wall) = { }; EvtScript N(EVS_BlastWall) = { - EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 0, 56, 56, 1, 10, 30) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SUSPEND_GROUP(EVT_GROUP_01) - EVT_CALL(EnableModel, MODEL_o235, TRUE) - EVT_LOOP(10) - EVT_CALL(EnableModel, MODEL_o477, TRUE) - EVT_CALL(EnableModel, MODEL_o476, TRUE) - EVT_WAIT(1) - EVT_CALL(EnableModel, MODEL_o477, FALSE) - EVT_CALL(EnableModel, MODEL_o476, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ttae, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GF_KPA133_Item_BombedWall, TRUE) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_UNBIND - EVT_RETURN - EVT_END + PlayEffect(EFFECT_BOMBETTE_BREAKING, 0, 56, 56, 1, 10, 30) + SetGroup(EVT_GROUP_00) + SuspendGroup(EVT_GROUP_01) + Call(EnableModel, MODEL_o235, TRUE) + Loop(10) + Call(EnableModel, MODEL_o477, TRUE) + Call(EnableModel, MODEL_o476, TRUE) + Wait(1) + Call(EnableModel, MODEL_o477, FALSE) + Call(EnableModel, MODEL_o476, FALSE) + Wait(1) + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ttae, COLLIDER_FLAGS_UPPER_MASK) + Set(GF_KPA133_Item_BombedWall, TRUE) + ResumeGroup(EVT_GROUP_01) + Unbind + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_IF_EQ(GF_KPA133_Item_BombedWall, FALSE) - EVT_CALL(EnableModel, MODEL_o235, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BlastWall)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Wall)), 1, 0) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_o477, FALSE) - EVT_CALL(EnableModel, MODEL_o476, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ttae, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_EXEC(N(EVS_SetWaterLevel)) - EVT_BIND_TRIGGER(EVT_PTR(N(D_80241A90_AA8F10)), TRIGGER_AREA_FLAG_SET, AF_KPA133_HitWaterSwitch, 1, 0) - EVT_CALL(EnableTexPanning, MODEL_move, TRUE) - EVT_CALL(EnableTexPanning, MODEL_s_sui, TRUE) - EVT_CALL(EnableTexPanning, MODEL_sui, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + IfEq(GF_KPA133_Item_BombedWall, FALSE) + Call(EnableModel, MODEL_o235, FALSE) + BindTrigger(Ref(N(EVS_BlastWall)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Wall)), 1, 0) + Else + Call(EnableModel, MODEL_o477, FALSE) + Call(EnableModel, MODEL_o476, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ttae, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Exec(N(EVS_SetWaterLevel)) + BindTrigger(Ref(N(D_80241A90_AA8F10)), TRIGGER_AREA_FLAG_SET, AF_KPA133_HitWaterSwitch, 1, 0) + Call(EnableTexPanning, MODEL_move, TRUE) + Call(EnableTexPanning, MODEL_s_sui, TRUE) + Call(EnableTexPanning, MODEL_sui, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( -100, 100, 70, -70) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_4) TEX_PAN_PARAMS_STEP( 200, -100, 20, -20) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_kpa/kpa_133/kpa_133_3_entity.c b/src/world/area_kpa/kpa_133/kpa_133_3_entity.c index 14bfad4e5da..b990fbcf8ee 100644 --- a/src/world/area_kpa/kpa_133/kpa_133_3_entity.c +++ b/src/world/area_kpa/kpa_133/kpa_133_3_entity.c @@ -27,112 +27,112 @@ API_CALLABLE(N(SetSpringPosition)) { } EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_KPA133_BlueSwitch, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueSwitch), 60, 115, 10, 0, MAKE_ENTITY_END) - EVT_CALL(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_KPA133_HitWaterSwitch)) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_TriggerSwitch))) - EVT_END_IF - EVT_IF_EQ(GF_KPA133_BlueSwitch, TRUE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SimpleSpring), 150, 115, 0, 90, 60, MAKE_ENTITY_END) - EVT_ELSE - EVT_CALL(MakeEntity, EVT_PTR(Entity_SimpleSpring), 150, 150, -105, 90, 60, MAKE_ENTITY_END) - EVT_SET(MV_SpringEntityID, LVar0) - EVT_CALL(N(SetSpringRotation), -90, 0, 0) - EVT_EXEC(N(EVS_SetupHiddenSpring)) - EVT_END_IF - EVT_CALL(MakeItemEntity, ITEM_BOWSER_CASTLE_KEY, -350, 215, -50, ITEM_SPAWN_MODE_KEY, GF_KPA133_Item_CastleKey2) - EVT_RETURN - EVT_END + IfEq(GF_KPA133_BlueSwitch, FALSE) + Call(MakeEntity, Ref(Entity_BlueSwitch), 60, 115, 10, 0, MAKE_ENTITY_END) + Call(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_KPA133_HitWaterSwitch)) + Call(AssignScript, Ref(N(EVS_TriggerSwitch))) + EndIf + IfEq(GF_KPA133_BlueSwitch, TRUE) + Call(MakeEntity, Ref(Entity_SimpleSpring), 150, 115, 0, 90, 60, MAKE_ENTITY_END) + Else + Call(MakeEntity, Ref(Entity_SimpleSpring), 150, 150, -105, 90, 60, MAKE_ENTITY_END) + Set(MV_SpringEntityID, LVar0) + Call(N(SetSpringRotation), -90, 0, 0) + Exec(N(EVS_SetupHiddenSpring)) + EndIf + Call(MakeItemEntity, ITEM_BOWSER_CASTLE_KEY, -350, 215, -50, ITEM_SPAWN_MODE_KEY, GF_KPA133_Item_CastleKey2) + Return + End }; EvtScript N(EVS_SetupHiddenSpring) = { - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_EQ(MV_RevealHiddenSpring, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(GF_KPA133_BlueSwitch, TRUE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GE(LVar0, 115) - EVT_IF_LE(LVar0, 180) - EVT_SET(LVar3, LVar0) - EVT_IF_LT(LVar0, 150) - EVT_ADD(LVar3, -40) - EVT_SET(LVar4, 90) - EVT_ELSE - EVT_ADD(LVar3, 40) - EVT_SET(LVar4, 270) - EVT_END_IF - EVT_THREAD - EVT_WAIT(2) - EVT_CALL(InterpPlayerYaw, LVar4, 0) - EVT_WAIT(2) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(2.0)) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_CALL(PlayerJump1, LVar3, LVar1, LVar2, 10) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(5) - EVT_END_THREAD - EVT_END_IF - EVT_END_IF - EVT_THREAD - EVT_CALL(MakeLerp, 0, 80, 15, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_kakusitobira, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, 135, 115, -70, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, 180, 115, -70, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, 135, 115, -55, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, 180, 115, -55, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, 135, 115, -40, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, 180, 115, -40, 0) - EVT_WAIT(20) - EVT_CALL(EnableModel, MODEL_kakusitobira, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_123, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(18) - EVT_CALL(PlaySoundAtNpc, NPC_Dummy, SOUND_KPA_DROP_WALL, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, -90, 0, 15, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetSpringRotation), LVar0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(23) - EVT_CALL(GetNpcPos, NPC_Dummy, LVar0, LVar1, LVar2) - EVT_CALL(N(SetSpringPosition), LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_Dummy, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_WAIT(3) - EVT_CALL(SetNpcPos, NPC_Dummy, 150, 150, -105) - EVT_CALL(SetNpcJumpscale, NPC_Dummy, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_Dummy, 150, 115, 0, 17) - EVT_CALL(GetNpcPos, NPC_Dummy, LVar0, LVar1, LVar2) - EVT_WAIT(20) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Loop(0) + Wait(1) + IfEq(MV_RevealHiddenSpring, TRUE) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, TRUE) + Set(GF_KPA133_BlueSwitch, TRUE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGe(LVar0, 115) + IfLe(LVar0, 180) + Set(LVar3, LVar0) + IfLt(LVar0, 150) + Add(LVar3, -40) + Set(LVar4, 90) + Else + Add(LVar3, 40) + Set(LVar4, 270) + EndIf + Thread + Wait(2) + Call(InterpPlayerYaw, LVar4, 0) + Wait(2) + Call(SetPlayerJumpscale, Float(2.0)) + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + Call(PlayerJump1, LVar3, LVar1, LVar2, 10) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(5) + EndThread + EndIf + EndIf + Thread + Call(MakeLerp, 0, 80, 15, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_kakusitobira, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + PlayEffect(EFFECT_LANDING_DUST, 1, 135, 115, -70, 0) + PlayEffect(EFFECT_LANDING_DUST, 1, 180, 115, -70, 0) + PlayEffect(EFFECT_LANDING_DUST, 1, 135, 115, -55, 0) + PlayEffect(EFFECT_LANDING_DUST, 1, 180, 115, -55, 0) + PlayEffect(EFFECT_LANDING_DUST, 1, 135, 115, -40, 0) + PlayEffect(EFFECT_LANDING_DUST, 1, 180, 115, -40, 0) + Wait(20) + Call(EnableModel, MODEL_kakusitobira, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_123, COLLIDER_FLAGS_UPPER_MASK) + EndThread + Thread + Wait(18) + Call(PlaySoundAtNpc, NPC_Dummy, SOUND_KPA_DROP_WALL, SOUND_SPACE_DEFAULT) + EndThread + Thread + Call(MakeLerp, -90, 0, 15, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(N(SetSpringRotation), LVar0, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Loop(23) + Call(GetNpcPos, NPC_Dummy, LVar0, LVar1, LVar2) + Call(N(SetSpringPosition), LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(SetNpcPos, NPC_Dummy, NPC_DISPOSE_LOCATION) + EndThread + Wait(3) + Call(SetNpcPos, NPC_Dummy, 150, 150, -105) + Call(SetNpcJumpscale, NPC_Dummy, Float(1.0)) + Call(NpcJump0, NPC_Dummy, 150, 115, 0, 17) + Call(GetNpcPos, NPC_Dummy, LVar0, LVar1, LVar2) + Wait(20) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_TriggerSwitch) = { - EVT_SET(MV_RevealHiddenSpring, TRUE) - EVT_RETURN - EVT_END + Set(MV_RevealHiddenSpring, TRUE) + Return + End }; diff --git a/src/world/area_kpa/kpa_133/kpa_133_4_npc.c b/src/world/area_kpa/kpa_133/kpa_133_4_npc.c index aaaddd385bf..2cc47f779ab 100644 --- a/src/world/area_kpa/kpa_133/kpa_133_4_npc.c +++ b/src/world/area_kpa/kpa_133/kpa_133_4_npc.c @@ -3,9 +3,9 @@ #include "world/common/npc/Toad_Stationary.inc.c" EvtScript N(EVS_NpcInit_Toad) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE) + Return + End }; NpcData N(NpcData_Dummy) = { diff --git a/src/world/area_kpa/kpa_133/kpa_133_5_water.c b/src/world/area_kpa/kpa_133/kpa_133_5_water.c index 259394f9052..bd0057c72b6 100644 --- a/src/world/area_kpa/kpa_133/kpa_133_5_water.c +++ b/src/world/area_kpa/kpa_133/kpa_133_5_water.c @@ -1,36 +1,36 @@ #include "kpa_133.h" EvtScript N(EVS_SetWaterLevel) = { - EVT_CALL(SetRenderMode, MODEL_s_sui, RENDER_MODE_SURFACE_XLU_LAYER2) - EVT_CALL(SetRenderMode, MODEL_sui, RENDER_MODE_SURFACE_XLU_LAYER2) - EVT_SWITCH(GB_KPA_WaterLevel) - EVT_CASE_EQ(0) - EVT_CALL(SetGroupVisibility, MODEL_suimen, MODEL_GROUP_HIDDEN) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o358, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o405, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o414, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o418, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o451, COLLIDER_FLAGS_UPPER_MASK) - EVT_CASE_EQ(1) - EVT_CALL(TranslateGroup, MODEL_suimen, 0, 120, 0) - EVT_CALL(EnableModel, MODEL_s_sui, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o405, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o418, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o414, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o414, COLLIDER_FLAG_DOCK_WALL) - EVT_CASE_EQ(2) - EVT_CALL(TranslateGroup, MODEL_suimen, 0, 220, 0) - EVT_CALL(EnableModel, MODEL_sui, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o358, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o414, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kabe_2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o418, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o440, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o418, COLLIDER_FLAG_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o440, COLLIDER_FLAG_DOCK_WALL) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetRenderMode, MODEL_s_sui, RENDER_MODE_SURFACE_XLU_LAYER2) + Call(SetRenderMode, MODEL_sui, RENDER_MODE_SURFACE_XLU_LAYER2) + Switch(GB_KPA_WaterLevel) + CaseEq(0) + Call(SetGroupVisibility, MODEL_suimen, MODEL_GROUP_HIDDEN) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o358, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o405, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o414, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o418, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o451, COLLIDER_FLAGS_UPPER_MASK) + CaseEq(1) + Call(TranslateGroup, MODEL_suimen, 0, 120, 0) + Call(EnableModel, MODEL_s_sui, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o405, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o418, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o414, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o414, COLLIDER_FLAG_DOCK_WALL) + CaseEq(2) + Call(TranslateGroup, MODEL_suimen, 0, 220, 0) + Call(EnableModel, MODEL_sui, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o358, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o414, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kabe_2, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o418, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o440, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o418, COLLIDER_FLAG_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o440, COLLIDER_FLAG_DOCK_WALL) + EndSwitch + Return + End }; diff --git a/src/world/area_kpa/kpa_133/kpa_133_6.c b/src/world/area_kpa/kpa_133/kpa_133_6.c index f3a81a1fcf4..5a703bd75f8 100644 --- a/src/world/area_kpa/kpa_133/kpa_133_6.c +++ b/src/world/area_kpa/kpa_133/kpa_133_6.c @@ -1,14 +1,14 @@ #include "kpa_133.h" EvtScript N(D_80241A90_AA8F10) = { - EVT_CALL(MakeLerp, 0, 90, 45, EASING_COS_FAST_OVERSHOOT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_UNBIND - EVT_RETURN - EVT_END + Call(MakeLerp, 0, 90, 45, EASING_COS_FAST_OVERSHOOT) + Label(10) + Call(UpdateLerp) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Unbind + Return + End }; diff --git a/src/world/area_kpa/kpa_134/kpa_134_1_music.c b/src/world/area_kpa/kpa_134/kpa_134_1_music.c index a0e29d0743c..8e7db8701b1 100644 --- a/src/world/area_kpa/kpa_134/kpa_134_1_music.c +++ b/src/world/area_kpa/kpa_134/kpa_134_1_music.c @@ -1,12 +1,12 @@ #include "kpa_134.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_134/kpa_134_2_main.c b/src/world/area_kpa/kpa_134/kpa_134_2_main.c index c0a2f0c31da..5ddfc6f0df4 100644 --- a/src/world/area_kpa/kpa_134/kpa_134_2_main.c +++ b/src/world/area_kpa/kpa_134/kpa_134_2_main.c @@ -9,92 +9,92 @@ EvtScript N(EVS_ExitWalk_kpa_133_2) = EVT_EXIT_WALK(40, kpa_134_ENTRY_2, "kpa_13 EvtScript N(EVS_ExitWalk_kpa_133_3) = EVT_EXIT_WALK(40, kpa_134_ENTRY_3, "kpa_133", kpa_133_ENTRY_3); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_133_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_exitw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_133_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilite, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_133_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_g98, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_133_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_exitw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_133_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilite, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_133_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_g98, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kpa_134_ENTRY_0) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(kpa_134_ENTRY_1) - EVT_SET(LVar0, 1) - EVT_SET(LVar2, MODEL_o408) - EVT_SET(LVar3, MODEL_o409) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kpa_134_ENTRY_2) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(kpa_134_ENTRY_3) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kpa_134_ENTRY_0) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseEq(kpa_134_ENTRY_1) + Set(LVar0, 1) + Set(LVar2, MODEL_o408) + Set(LVar3, MODEL_o409) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kpa_134_ENTRY_2) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseEq(kpa_134_ENTRY_3) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupChains)) - EVT_IF_EQ(GF_KPA134_BlueSwitch, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_FlipWallPanels)), TRIGGER_AREA_FLAG_SET, AF_KPA134_HitWaterSwitch, 1, 0) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o383, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o384, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_sikake, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_o384, FALSE) - EVT_CALL(EnableModel, MODEL_o383, FALSE) - EVT_CALL(EnableModel, MODEL_o378, FALSE) - EVT_CALL(EnableModel, MODEL_o379, FALSE) - EVT_CALL(EnableModel, MODEL_o380, FALSE) - EVT_CALL(EnableModel, MODEL_o381, FALSE) - EVT_CALL(EnableModel, MODEL_o382, FALSE) - EVT_CALL(EnableModel, MODEL_o377, FALSE) - EVT_CALL(EnableModel, MODEL_o376, FALSE) - EVT_CALL(EnableModel, MODEL_o375, FALSE) - EVT_CALL(EnableModel, MODEL_o374, FALSE) - EVT_CALL(EnableModel, MODEL_o373, FALSE) - EVT_CALL(EnableModel, MODEL_o372, FALSE) - EVT_CALL(EnableModel, MODEL_o371, FALSE) - EVT_END_IF - EVT_IF_EQ(GF_KPA133_Item_BombedWall, TRUE) - EVT_CALL(EnableModel, MODEL_o503, FALSE) - EVT_CALL(EnableModel, MODEL_o502, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o358, COLLIDER_FLAGS_UPPER_MASK) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_o400, FALSE) - EVT_END_IF - EVT_CALL(EnableTexPanning, MODEL_move, TRUE) - EVT_CALL(EnableTexPanning, MODEL_s_sui, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o385, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupChains)) + IfEq(GF_KPA134_BlueSwitch, FALSE) + BindTrigger(Ref(N(EVS_FlipWallPanels)), TRIGGER_AREA_FLAG_SET, AF_KPA134_HitWaterSwitch, 1, 0) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o383, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o384, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_sikake, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_o384, FALSE) + Call(EnableModel, MODEL_o383, FALSE) + Call(EnableModel, MODEL_o378, FALSE) + Call(EnableModel, MODEL_o379, FALSE) + Call(EnableModel, MODEL_o380, FALSE) + Call(EnableModel, MODEL_o381, FALSE) + Call(EnableModel, MODEL_o382, FALSE) + Call(EnableModel, MODEL_o377, FALSE) + Call(EnableModel, MODEL_o376, FALSE) + Call(EnableModel, MODEL_o375, FALSE) + Call(EnableModel, MODEL_o374, FALSE) + Call(EnableModel, MODEL_o373, FALSE) + Call(EnableModel, MODEL_o372, FALSE) + Call(EnableModel, MODEL_o371, FALSE) + EndIf + IfEq(GF_KPA133_Item_BombedWall, TRUE) + Call(EnableModel, MODEL_o503, FALSE) + Call(EnableModel, MODEL_o502, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o358, COLLIDER_FLAGS_UPPER_MASK) + Else + Call(EnableModel, MODEL_o400, FALSE) + EndIf + Call(EnableTexPanning, MODEL_move, TRUE) + Call(EnableTexPanning, MODEL_s_sui, TRUE) + Call(EnableTexPanning, MODEL_o385, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( -100, 100, 70, -70) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_4) TEX_PAN_PARAMS_STEP( 200, -100, 20, -20) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_kpa/kpa_134/kpa_134_3_chains.c b/src/world/area_kpa/kpa_134/kpa_134_3_chains.c index da7204d74cb..190ff0ff1d1 100644 --- a/src/world/area_kpa/kpa_134/kpa_134_3_chains.c +++ b/src/world/area_kpa/kpa_134/kpa_134_3_chains.c @@ -9,36 +9,36 @@ extern EvtScript N(EVS_SetupLowerChain); extern EvtScript N(EVS_SetupUpperChain); EvtScript N(EVS_SetupChains) = { - EVT_CALL(SetRenderMode, MODEL_s_sui, RENDER_MODE_SURFACE_XLU_LAYER2) - EVT_CALL(SetRenderMode, MODEL_o385, RENDER_MODE_SURFACE_XLU_LAYER2) - EVT_CALL(EnableModel, MODEL_o388, FALSE) - EVT_CALL(EnableModel, MODEL_o389, FALSE) - EVT_CALL(TranslateModel, MODEL_o387, 0, 30, 0) - EVT_CALL(TranslateModel, MODEL_o505, 0, 0, 0) - EVT_SWITCH(GB_KPA_WaterLevel) - EVT_CASE_EQ(0) - EVT_CALL(SetGroupVisibility, MODEL_suimen, MODEL_GROUP_HIDDEN) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_hidari, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deiliaw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_migi, COLLIDER_FLAGS_UPPER_MASK) - EVT_CASE_EQ(1) - EVT_CALL(EnableModel, MODEL_s_sui, FALSE) - EVT_CALL(TranslateGroup, MODEL_sui1, 0, 120, 0) - EVT_CALL(TranslateModel, MODEL_o385, 0, 120, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deiliaw, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deiliaw, COLLIDER_FLAG_DOCK_WALL) - EVT_CASE_EQ(2) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_hidari, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_o385, FALSE) - EVT_CALL(TranslateGroup, MODEL_sui1, 0, 220, 0) - EVT_CALL(TranslateModel, MODEL_s_sui, 0, 220, 0) - EVT_END_SWITCH - EVT_EXEC(N(EVS_SetupLowerChain)) - EVT_EXEC(N(EVS_SetupUpperChain)) - EVT_RETURN - EVT_END + Call(SetRenderMode, MODEL_s_sui, RENDER_MODE_SURFACE_XLU_LAYER2) + Call(SetRenderMode, MODEL_o385, RENDER_MODE_SURFACE_XLU_LAYER2) + Call(EnableModel, MODEL_o388, FALSE) + Call(EnableModel, MODEL_o389, FALSE) + Call(TranslateModel, MODEL_o387, 0, 30, 0) + Call(TranslateModel, MODEL_o505, 0, 0, 0) + Switch(GB_KPA_WaterLevel) + CaseEq(0) + Call(SetGroupVisibility, MODEL_suimen, MODEL_GROUP_HIDDEN) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_hidari, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deiliaw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_migi, COLLIDER_FLAGS_UPPER_MASK) + CaseEq(1) + Call(EnableModel, MODEL_s_sui, FALSE) + Call(TranslateGroup, MODEL_sui1, 0, 120, 0) + Call(TranslateModel, MODEL_o385, 0, 120, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deiliaw, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deiliaw, COLLIDER_FLAG_DOCK_WALL) + CaseEq(2) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_hidari, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_o385, FALSE) + Call(TranslateGroup, MODEL_sui1, 0, 220, 0) + Call(TranslateModel, MODEL_s_sui, 0, 220, 0) + EndSwitch + Exec(N(EVS_SetupLowerChain)) + Exec(N(EVS_SetupUpperChain)) + Return + End }; s32 N(ChainAnimOffsets)[] = { @@ -80,219 +80,219 @@ API_CALLABLE(N(DetectLowerChainGrab)) { } EvtScript N(EVS_SetupLowerChain) = { - EVT_CALL(N(CreateLowerChainShadow)) - EVT_LABEL(10) - EVT_CALL(N(DetectLowerChainGrab)) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(PlaySoundAtPlayer, SOUND_KPA_PULL_CHAIN, SOUND_SPACE_DEFAULT) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_HoldOnto) - EVT_THREAD - EVT_SET(LVar0, 150) - EVT_SET(LVar1, 30) - EVT_USE_BUF(EVT_PTR(N(ChainAnimOffsets))) - EVT_LOOP(ARRAY_COUNT(N(ChainAnimOffsets))) - EVT_BUF_READ1(LVar2) - EVT_ADD(LVar0, LVar2) - EVT_ADD(LVar1, LVar2) - EVT_CALL(SetPlayerPos, 50, LVar0, -34) - EVT_CALL(TranslateModel, MODEL_o387, 0, LVar1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_IF_EQ(GB_KPA_WaterLevel, 0) - EVT_EXEC_WAIT(N(EVS_RaiseWaterLevel1)) - EVT_SET(GB_KPA_WaterLevel, 1) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_LowerWaterLevel0)) - EVT_SET(GB_KPA_WaterLevel, 0) - EVT_END_IF - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 115) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_GOTO(10) - EVT_RETURN - EVT_END + Call(N(CreateLowerChainShadow)) + Label(10) + Call(N(DetectLowerChainGrab)) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePlayerInput, TRUE) + Call(PlaySoundAtPlayer, SOUND_KPA_PULL_CHAIN, SOUND_SPACE_DEFAULT) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Wait(1) + Call(SetPlayerAnimation, ANIM_MarioW2_HoldOnto) + Thread + Set(LVar0, 150) + Set(LVar1, 30) + UseBuf(Ref(N(ChainAnimOffsets))) + Loop(ARRAY_COUNT(N(ChainAnimOffsets))) + BufRead1(LVar2) + Add(LVar0, LVar2) + Add(LVar1, LVar2) + Call(SetPlayerPos, 50, LVar0, -34) + Call(TranslateModel, MODEL_o387, 0, LVar1, 0) + Wait(1) + EndLoop + EndThread + IfEq(GB_KPA_WaterLevel, 0) + ExecWait(N(EVS_RaiseWaterLevel1)) + Set(GB_KPA_WaterLevel, 1) + Else + ExecWait(N(EVS_LowerWaterLevel0)) + Set(GB_KPA_WaterLevel, 0) + EndIf + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + IfEq(LVar1, 115) + BreakLoop + EndIf + EndLoop + Goto(10) + Return + End }; EvtScript N(EVS_LowerWaterLevel0) = { - EVT_WAIT(20) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 120, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(func_802CA988, CAM_DEFAULT, LVar4, LVar5, LVar6, LVar7) - EVT_CALL(MakeLerp, LVar6, 600, 20, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(func_802CABE8, CAM_DEFAULT, LVar4, LVar5, LVar0, LVar7) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_SET(LVar2, LVar0) - EVT_WAIT(5) - EVT_CALL(MakeLerp, LVar7, -20, 20, EASING_LINEAR) - EVT_LABEL(15) - EVT_CALL(UpdateLerp) - EVT_CALL(func_802CABE8, CAM_DEFAULT, LVar4, LVar5, LVar2, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(15) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(SetGroupVisibility, MODEL_sui1, MODEL_GROUP_VISIBLE) - EVT_CALL(EnableModel, MODEL_o385, TRUE) - EVT_CALL(PlaySound, SOUND_LOOP_KPA_DRAIN_WATER) - EVT_CALL(MakeLerp, 120, 20, 120, EASING_LINEAR) - EVT_LABEL(30) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_sui1, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o385, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(30) - EVT_END_IF - EVT_CALL(PlaySound, SOUND_LRAW_KPA_DRAIN_WATER | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_CALL(StopTrackingSoundPos, SOUND_LRAW_KPA_DRAIN_WATER) - EVT_CALL(SetGroupVisibility, MODEL_sui1, MODEL_GROUP_HIDDEN) - EVT_CALL(EnableModel, MODEL_s_sui, FALSE) - EVT_CALL(EnableModel, MODEL_o385, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_hidari, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_migi, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deiliaw, COLLIDER_FLAGS_UPPER_MASK) - EVT_WAIT(10) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_THREAD - EVT_SET(LVar0, 17) - EVT_LOOP(13) - EVT_ADD(LVar0, 1) - EVT_CALL(TranslateModel, MODEL_o387, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_RETURN - EVT_END + Wait(20) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 120, Float(1.0)) + EndThread + Thread + Call(func_802CA988, CAM_DEFAULT, LVar4, LVar5, LVar6, LVar7) + Call(MakeLerp, LVar6, 600, 20, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(func_802CABE8, CAM_DEFAULT, LVar4, LVar5, LVar0, LVar7) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Set(LVar2, LVar0) + Wait(5) + Call(MakeLerp, LVar7, -20, 20, EASING_LINEAR) + Label(15) + Call(UpdateLerp) + Call(func_802CABE8, CAM_DEFAULT, LVar4, LVar5, LVar2, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(15) + EndIf + EndThread + Call(SetGroupVisibility, MODEL_sui1, MODEL_GROUP_VISIBLE) + Call(EnableModel, MODEL_o385, TRUE) + Call(PlaySound, SOUND_LOOP_KPA_DRAIN_WATER) + Call(MakeLerp, 120, 20, 120, EASING_LINEAR) + Label(30) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_sui1, 0, LVar0, 0) + Call(TranslateModel, MODEL_o385, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(30) + EndIf + Call(PlaySound, SOUND_LRAW_KPA_DRAIN_WATER | SOUND_ID_TRIGGER_CHANGE_SOUND) + Call(StopTrackingSoundPos, SOUND_LRAW_KPA_DRAIN_WATER) + Call(SetGroupVisibility, MODEL_sui1, MODEL_GROUP_HIDDEN) + Call(EnableModel, MODEL_s_sui, FALSE) + Call(EnableModel, MODEL_o385, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_hidari, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_migi, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deiliaw, COLLIDER_FLAGS_UPPER_MASK) + Wait(10) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Thread + Set(LVar0, 17) + Loop(13) + Add(LVar0, 1) + Call(TranslateModel, MODEL_o387, 0, LVar0, 0) + Wait(1) + EndLoop + EndThread + Return + End }; EvtScript N(EVS_RaiseWaterLevel1) = { - EVT_WAIT(20) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 220, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(60) - EVT_CALL(func_802CA988, CAM_DEFAULT, LVar4, LVar5, LVar6, LVar7) - EVT_CALL(MakeLerp, LVar6, 600, 20, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(func_802CABE8, CAM_DEFAULT, LVar4, LVar5, LVar0, LVar7) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_SET(LVar2, LVar0) - EVT_WAIT(5) - EVT_CALL(MakeLerp, LVar7, -20, 20, EASING_LINEAR) - EVT_LABEL(15) - EVT_CALL(UpdateLerp) - EVT_CALL(func_802CABE8, CAM_DEFAULT, LVar4, LVar5, LVar2, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(15) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(PlaySoundAt, SOUND_LOOP_KPA_FILL_WATER, SOUND_SPACE_DEFAULT, 118, 115, -11) - EVT_WAIT(20) - EVT_THREAD - EVT_CALL(SetTexPanner, MODEL_o388, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_o389, TEX_PANNER_3) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LOOP(1000) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar0, LVar1) - EVT_CALL(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, 0, LVar2) - EVT_ADD(LVar0, 1000) - EVT_ADD(LVar1, 4000) - EVT_ADD(LVar2, -1500) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(EnableModel, MODEL_o388, TRUE) - EVT_CALL(MakeLerp, 400, 0, 20, EASING_LINEAR) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o388, -100, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(SetGroupVisibility, MODEL_sui1, MODEL_GROUP_VISIBLE) - EVT_CALL(EnableModel, MODEL_o385, TRUE) - EVT_CALL(EnableModel, MODEL_o389, TRUE) - EVT_CALL(MakeLerp, 20, 120, 180, EASING_LINEAR) - EVT_LABEL(30) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_sui1, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o385, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o389, -100, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o388, -100, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(30) - EVT_END_IF - EVT_CALL(MakeLerp, 100, 1, 20, EASING_LINEAR) - EVT_LABEL(40) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, LVar0) - EVT_DIVF(LVar2, 100) - EVT_CALL(TranslateModel, MODEL_o389, -100, 120, 0) - EVT_CALL(TranslateModel, MODEL_o388, -100, 120, 0) - EVT_CALL(ScaleModel, MODEL_o389, LVar2, EVT_FLOAT(1.0), LVar2) - EVT_CALL(ScaleModel, MODEL_o388, LVar2, EVT_FLOAT(1.0), LVar2) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(40) - EVT_END_IF - EVT_CALL(PlaySound, SOUND_LRAW_KPA_FILL_WATER | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_CALL(StopTrackingSoundPos, SOUND_LRAW_KPA_FILL_WATER) - EVT_CALL(EnableModel, MODEL_o389, FALSE) - EVT_CALL(EnableModel, MODEL_o388, FALSE) - EVT_END_THREAD - EVT_WAIT(230) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_hidari, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_migi, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deiliaw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deiliaw, COLLIDER_FLAG_IGNORE_SHELL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deiliaw, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deiliaw, COLLIDER_FLAG_DOCK_WALL) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_THREAD - EVT_SET(LVar0, 17) - EVT_LOOP(13) - EVT_ADD(LVar0, 1) - EVT_CALL(TranslateModel, MODEL_o387, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_RETURN - EVT_END + Wait(20) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 220, Float(1.0)) + EndThread + Thread + Wait(60) + Call(func_802CA988, CAM_DEFAULT, LVar4, LVar5, LVar6, LVar7) + Call(MakeLerp, LVar6, 600, 20, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(func_802CABE8, CAM_DEFAULT, LVar4, LVar5, LVar0, LVar7) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Set(LVar2, LVar0) + Wait(5) + Call(MakeLerp, LVar7, -20, 20, EASING_LINEAR) + Label(15) + Call(UpdateLerp) + Call(func_802CABE8, CAM_DEFAULT, LVar4, LVar5, LVar2, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(15) + EndIf + EndThread + Call(PlaySoundAt, SOUND_LOOP_KPA_FILL_WATER, SOUND_SPACE_DEFAULT, 118, 115, -11) + Wait(20) + Thread + Call(SetTexPanner, MODEL_o388, TEX_PANNER_2) + Call(SetTexPanner, MODEL_o389, TEX_PANNER_3) + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Loop(1000) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar0, LVar1) + Call(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, 0, LVar2) + Add(LVar0, 1000) + Add(LVar1, 4000) + Add(LVar2, -1500) + Wait(1) + EndLoop + EndThread + Thread + Call(EnableModel, MODEL_o388, TRUE) + Call(MakeLerp, 400, 0, 20, EASING_LINEAR) + Label(20) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o388, -100, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Call(SetGroupVisibility, MODEL_sui1, MODEL_GROUP_VISIBLE) + Call(EnableModel, MODEL_o385, TRUE) + Call(EnableModel, MODEL_o389, TRUE) + Call(MakeLerp, 20, 120, 180, EASING_LINEAR) + Label(30) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_sui1, 0, LVar0, 0) + Call(TranslateModel, MODEL_o385, 0, LVar0, 0) + Call(TranslateModel, MODEL_o389, -100, LVar0, 0) + Call(TranslateModel, MODEL_o388, -100, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(30) + EndIf + Call(MakeLerp, 100, 1, 20, EASING_LINEAR) + Label(40) + Call(UpdateLerp) + SetF(LVar2, LVar0) + DivF(LVar2, 100) + Call(TranslateModel, MODEL_o389, -100, 120, 0) + Call(TranslateModel, MODEL_o388, -100, 120, 0) + Call(ScaleModel, MODEL_o389, LVar2, Float(1.0), LVar2) + Call(ScaleModel, MODEL_o388, LVar2, Float(1.0), LVar2) + Wait(1) + IfEq(LVar1, 1) + Goto(40) + EndIf + Call(PlaySound, SOUND_LRAW_KPA_FILL_WATER | SOUND_ID_TRIGGER_CHANGE_SOUND) + Call(StopTrackingSoundPos, SOUND_LRAW_KPA_FILL_WATER) + Call(EnableModel, MODEL_o389, FALSE) + Call(EnableModel, MODEL_o388, FALSE) + EndThread + Wait(230) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_hidari, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_migi, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deiliaw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deiliaw, COLLIDER_FLAG_IGNORE_SHELL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deiliaw, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deiliaw, COLLIDER_FLAG_DOCK_WALL) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Thread + Set(LVar0, 17) + Loop(13) + Add(LVar0, 1) + Call(TranslateModel, MODEL_o387, 0, LVar0, 0) + Wait(1) + EndLoop + EndThread + Return + End }; API_CALLABLE(N(CreateUpperChainShadow)) { @@ -327,207 +327,207 @@ API_CALLABLE(N(DetectUpperChainGrab)) { } EvtScript N(EVS_SetupUpperChain) = { - EVT_CALL(N(CreateUpperChainShadow)) - EVT_LABEL(10) - EVT_CALL(N(DetectUpperChainGrab)) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(PlaySoundAtPlayer, SOUND_KPA_PULL_CHAIN, SOUND_SPACE_DEFAULT) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_HoldOnto) - EVT_THREAD - EVT_SET(LVar0, 275) - EVT_SET(LVar1, 0) - EVT_USE_BUF(EVT_PTR(N(ChainAnimOffsets))) - EVT_LOOP(20) - EVT_BUF_READ1(LVar2) - EVT_ADD(LVar0, LVar2) - EVT_ADD(LVar1, LVar2) - EVT_CALL(SetPlayerPos, 680, LVar0, -35) - EVT_CALL(TranslateModel, MODEL_o505, 0, LVar1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_IF_EQ(GB_KPA_WaterLevel, 1) - EVT_EXEC_WAIT(N(EVS_RaiseWaterLevel2)) - EVT_SET(GB_KPA_WaterLevel, 2) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_LowerWaterLevel1)) - EVT_SET(GB_KPA_WaterLevel, 1) - EVT_END_IF - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 240) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_GOTO(10) - EVT_RETURN - EVT_END + Call(N(CreateUpperChainShadow)) + Label(10) + Call(N(DetectUpperChainGrab)) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePlayerInput, TRUE) + Call(PlaySoundAtPlayer, SOUND_KPA_PULL_CHAIN, SOUND_SPACE_DEFAULT) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Wait(1) + Call(SetPlayerAnimation, ANIM_MarioW2_HoldOnto) + Thread + Set(LVar0, 275) + Set(LVar1, 0) + UseBuf(Ref(N(ChainAnimOffsets))) + Loop(20) + BufRead1(LVar2) + Add(LVar0, LVar2) + Add(LVar1, LVar2) + Call(SetPlayerPos, 680, LVar0, -35) + Call(TranslateModel, MODEL_o505, 0, LVar1, 0) + Wait(1) + EndLoop + EndThread + IfEq(GB_KPA_WaterLevel, 1) + ExecWait(N(EVS_RaiseWaterLevel2)) + Set(GB_KPA_WaterLevel, 2) + Else + ExecWait(N(EVS_LowerWaterLevel1)) + Set(GB_KPA_WaterLevel, 1) + EndIf + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + IfEq(LVar1, 240) + BreakLoop + EndIf + EndLoop + Goto(10) + Return + End }; EvtScript N(EVS_LowerWaterLevel1) = { - EVT_WAIT(20) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 120, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(EnableModel, MODEL_s_sui, FALSE) - EVT_CALL(EnableModel, MODEL_o385, TRUE) - EVT_THREAD - EVT_CALL(func_802CA988, CAM_DEFAULT, LVar4, LVar5, LVar6, LVar7) - EVT_CALL(MakeLerp, LVar6, 600, 20, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(func_802CABE8, CAM_DEFAULT, LVar4, LVar5, LVar0, LVar7) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_SET(LVar2, LVar0) - EVT_WAIT(5) - EVT_CALL(MakeLerp, LVar7, -20, 20, EASING_LINEAR) - EVT_LABEL(15) - EVT_CALL(UpdateLerp) - EVT_CALL(func_802CABE8, CAM_DEFAULT, LVar4, LVar5, LVar2, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(15) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(SetGroupVisibility, MODEL_sui1, MODEL_GROUP_VISIBLE) - EVT_CALL(PlaySound, SOUND_LOOP_KPA_DRAIN_WATER) - EVT_CALL(MakeLerp, 220, 120, 120, EASING_LINEAR) - EVT_LABEL(30) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_sui1, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o385, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(30) - EVT_END_IF - EVT_CALL(PlaySound, SOUND_LRAW_KPA_DRAIN_WATER | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_CALL(StopTrackingSoundPos, SOUND_LRAW_KPA_DRAIN_WATER) - EVT_WAIT(10) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_THREAD - EVT_SET(LVar0, -13) - EVT_LOOP(13) - EVT_ADD(LVar0, 1) - EVT_CALL(TranslateModel, MODEL_o505, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_RETURN - EVT_END + Wait(20) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 120, Float(1.0)) + EndThread + Call(EnableModel, MODEL_s_sui, FALSE) + Call(EnableModel, MODEL_o385, TRUE) + Thread + Call(func_802CA988, CAM_DEFAULT, LVar4, LVar5, LVar6, LVar7) + Call(MakeLerp, LVar6, 600, 20, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(func_802CABE8, CAM_DEFAULT, LVar4, LVar5, LVar0, LVar7) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Set(LVar2, LVar0) + Wait(5) + Call(MakeLerp, LVar7, -20, 20, EASING_LINEAR) + Label(15) + Call(UpdateLerp) + Call(func_802CABE8, CAM_DEFAULT, LVar4, LVar5, LVar2, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(15) + EndIf + EndThread + Call(SetGroupVisibility, MODEL_sui1, MODEL_GROUP_VISIBLE) + Call(PlaySound, SOUND_LOOP_KPA_DRAIN_WATER) + Call(MakeLerp, 220, 120, 120, EASING_LINEAR) + Label(30) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_sui1, 0, LVar0, 0) + Call(TranslateModel, MODEL_o385, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(30) + EndIf + Call(PlaySound, SOUND_LRAW_KPA_DRAIN_WATER | SOUND_ID_TRIGGER_CHANGE_SOUND) + Call(StopTrackingSoundPos, SOUND_LRAW_KPA_DRAIN_WATER) + Wait(10) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Thread + Set(LVar0, -13) + Loop(13) + Add(LVar0, 1) + Call(TranslateModel, MODEL_o505, 0, LVar0, 0) + Wait(1) + EndLoop + EndThread + Return + End }; EvtScript N(EVS_RaiseWaterLevel2) = { - EVT_WAIT(20) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 220, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(EnableModel, MODEL_s_sui, TRUE) - EVT_CALL(EnableModel, MODEL_o385, FALSE) - EVT_THREAD - EVT_WAIT(60) - EVT_CALL(func_802CA988, CAM_DEFAULT, LVar4, LVar5, LVar6, LVar7) - EVT_CALL(MakeLerp, LVar6, 600, 20, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(func_802CABE8, CAM_DEFAULT, LVar4, LVar5, LVar0, LVar7) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_SET(LVar2, LVar0) - EVT_WAIT(5) - EVT_CALL(MakeLerp, LVar7, -20, 20, EASING_LINEAR) - EVT_LABEL(15) - EVT_CALL(UpdateLerp) - EVT_CALL(func_802CABE8, CAM_DEFAULT, LVar4, LVar5, LVar2, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(15) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(PlaySoundAt, SOUND_LOOP_KPA_FILL_WATER, SOUND_SPACE_DEFAULT, 500, 240, -25) - EVT_WAIT(20) - EVT_THREAD - EVT_CALL(SetTexPanner, MODEL_o388, 2) - EVT_CALL(SetTexPanner, MODEL_o389, 3) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LOOP(1000) - EVT_CALL(SetTexPanOffset, 2, 0, LVar0, LVar1) - EVT_CALL(SetTexPanOffset, 3, 0, 0, LVar2) - EVT_ADD(LVar0, 1000) - EVT_ADD(LVar1, 4000) - EVT_ADD(LVar2, -1500) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(EnableModel, MODEL_o388, TRUE) - EVT_CALL(MakeLerp, 400, 0, 20, EASING_LINEAR) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o388, 300, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(SetGroupVisibility, MODEL_sui1, MODEL_GROUP_VISIBLE) - EVT_CALL(EnableModel, MODEL_o389, TRUE) - EVT_CALL(MakeLerp, 120, 220, 180, EASING_LINEAR) - EVT_LABEL(30) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_sui1, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_s_sui, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o388, 300, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o389, 300, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(30) - EVT_END_IF - EVT_CALL(MakeLerp, 100, 1, 20, EASING_LINEAR) - EVT_LABEL(40) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, LVar0) - EVT_DIVF(LVar2, 100) - EVT_CALL(TranslateModel, MODEL_o389, 300, 220, 0) - EVT_CALL(TranslateModel, MODEL_o388, 300, 220, 0) - EVT_CALL(ScaleModel, MODEL_o389, LVar2, EVT_FLOAT(1.0), LVar2) - EVT_CALL(ScaleModel, MODEL_o388, LVar2, EVT_FLOAT(1.0), LVar2) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(40) - EVT_END_IF - EVT_CALL(PlaySound, SOUND_LRAW_KPA_FILL_WATER | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_CALL(StopTrackingSoundPos, SOUND_LRAW_KPA_FILL_WATER) - EVT_CALL(EnableModel, MODEL_o389, FALSE) - EVT_CALL(EnableModel, MODEL_o388, FALSE) - EVT_END_THREAD - EVT_WAIT(230) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_THREAD - EVT_SET(LVar0, -13) - EVT_LOOP(13) - EVT_ADD(LVar0, 1) - EVT_CALL(TranslateModel, MODEL_o505, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_RETURN - EVT_END + Wait(20) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 220, Float(1.0)) + EndThread + Call(EnableModel, MODEL_s_sui, TRUE) + Call(EnableModel, MODEL_o385, FALSE) + Thread + Wait(60) + Call(func_802CA988, CAM_DEFAULT, LVar4, LVar5, LVar6, LVar7) + Call(MakeLerp, LVar6, 600, 20, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(func_802CABE8, CAM_DEFAULT, LVar4, LVar5, LVar0, LVar7) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Set(LVar2, LVar0) + Wait(5) + Call(MakeLerp, LVar7, -20, 20, EASING_LINEAR) + Label(15) + Call(UpdateLerp) + Call(func_802CABE8, CAM_DEFAULT, LVar4, LVar5, LVar2, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(15) + EndIf + EndThread + Call(PlaySoundAt, SOUND_LOOP_KPA_FILL_WATER, SOUND_SPACE_DEFAULT, 500, 240, -25) + Wait(20) + Thread + Call(SetTexPanner, MODEL_o388, 2) + Call(SetTexPanner, MODEL_o389, 3) + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Loop(1000) + Call(SetTexPanOffset, 2, 0, LVar0, LVar1) + Call(SetTexPanOffset, 3, 0, 0, LVar2) + Add(LVar0, 1000) + Add(LVar1, 4000) + Add(LVar2, -1500) + Wait(1) + EndLoop + EndThread + Thread + Call(EnableModel, MODEL_o388, TRUE) + Call(MakeLerp, 400, 0, 20, EASING_LINEAR) + Label(20) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o388, 300, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Call(SetGroupVisibility, MODEL_sui1, MODEL_GROUP_VISIBLE) + Call(EnableModel, MODEL_o389, TRUE) + Call(MakeLerp, 120, 220, 180, EASING_LINEAR) + Label(30) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_sui1, 0, LVar0, 0) + Call(TranslateModel, MODEL_s_sui, 0, LVar0, 0) + Call(TranslateModel, MODEL_o388, 300, LVar0, 0) + Call(TranslateModel, MODEL_o389, 300, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(30) + EndIf + Call(MakeLerp, 100, 1, 20, EASING_LINEAR) + Label(40) + Call(UpdateLerp) + SetF(LVar2, LVar0) + DivF(LVar2, 100) + Call(TranslateModel, MODEL_o389, 300, 220, 0) + Call(TranslateModel, MODEL_o388, 300, 220, 0) + Call(ScaleModel, MODEL_o389, LVar2, Float(1.0), LVar2) + Call(ScaleModel, MODEL_o388, LVar2, Float(1.0), LVar2) + Wait(1) + IfEq(LVar1, 1) + Goto(40) + EndIf + Call(PlaySound, SOUND_LRAW_KPA_FILL_WATER | SOUND_ID_TRIGGER_CHANGE_SOUND) + Call(StopTrackingSoundPos, SOUND_LRAW_KPA_FILL_WATER) + Call(EnableModel, MODEL_o389, FALSE) + Call(EnableModel, MODEL_o388, FALSE) + EndThread + Wait(230) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Thread + Set(LVar0, -13) + Loop(13) + Add(LVar0, 1) + Call(TranslateModel, MODEL_o505, 0, LVar0, 0) + Wait(1) + EndLoop + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_134/kpa_134_4_npc.c b/src/world/area_kpa/kpa_134/kpa_134_4_npc.c index 7f75b1fe5c5..bfc6fd84318 100644 --- a/src/world/area_kpa/kpa_134/kpa_134_4_npc.c +++ b/src/world/area_kpa/kpa_134/kpa_134_4_npc.c @@ -3,9 +3,9 @@ #include "world/common/npc/Toad_Stationary.inc.c" EvtScript N(EVS_NpcInit_Toad) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE) + Return + End }; NpcData N(NpcData_Dummy) = { diff --git a/src/world/area_kpa/kpa_134/kpa_134_5_panels.c b/src/world/area_kpa/kpa_134/kpa_134_5_panels.c index 245abc936fb..a9b71c1dabc 100644 --- a/src/world/area_kpa/kpa_134/kpa_134_5_panels.c +++ b/src/world/area_kpa/kpa_134/kpa_134_5_panels.c @@ -19,69 +19,69 @@ s32 N(WallPanels)[] = { }; EvtScript N(EVS_FocusCam_Wall) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar6, LVar7, LVar8) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.5)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(450.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.5), EVT_FLOAT(-8.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar6, LVar7, LVar8) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, LVar6, LVar7, LVar8) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.5)) + Call(SetCamDistance, CAM_DEFAULT, Float(450.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.5), Float(-8.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar6, LVar7, LVar8) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Return + End }; EvtScript N(EVS_FlipWallPanel) = { - EVT_CALL(MakeLerp, 0, 450, 15, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, LVar5, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(EnableModel, LVar5, FALSE) - EVT_RETURN - EVT_END + Call(MakeLerp, 0, 450, 15, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, LVar5, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(EnableModel, LVar5, FALSE) + Return + End }; EvtScript N(EVS_FlipWallPanels) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerActionState, LVar0) - EVT_IF_EQ(LVar0, ACTION_STATE_IDLE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o383, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o384, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_sikake, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_USE_BUF(EVT_PTR(N(WallPanels))) - EVT_CALL(GetPlayerPos, LVar6, LVar7, LVar8) - EVT_SET(LVar6, 615) - EVT_EXEC(N(EVS_FocusCam_Wall)) - EVT_LOOP(0) - EVT_BUF_READ4(LVar5, LVar6, LVar7, LVar8) - EVT_IF_EQ(LVar5, -1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_KPA_FLIP_BRIDGE_PANEL, SOUND_SPACE_DEFAULT, LVar6, LVar7, LVar8) - EVT_EXEC(N(EVS_FlipWallPanel)) - EVT_WAIT(10) - EVT_END_LOOP - EVT_WAIT(50) - EVT_CALL(StopSound, SOUND_KPA_FLIP_BRIDGE_PANEL) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_SET(GF_KPA134_BlueSwitch, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Loop(0) + Wait(1) + Call(GetPlayerActionState, LVar0) + IfEq(LVar0, ACTION_STATE_IDLE) + BreakLoop + EndIf + EndLoop + Wait(20) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o383, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o384, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_sikake, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + UseBuf(Ref(N(WallPanels))) + Call(GetPlayerPos, LVar6, LVar7, LVar8) + Set(LVar6, 615) + Exec(N(EVS_FocusCam_Wall)) + Loop(0) + BufRead4(LVar5, LVar6, LVar7, LVar8) + IfEq(LVar5, -1) + BreakLoop + EndIf + Call(PlaySoundAt, SOUND_KPA_FLIP_BRIDGE_PANEL, SOUND_SPACE_DEFAULT, LVar6, LVar7, LVar8) + Exec(N(EVS_FlipWallPanel)) + Wait(10) + EndLoop + Wait(50) + Call(StopSound, SOUND_KPA_FLIP_BRIDGE_PANEL) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Set(GF_KPA134_BlueSwitch, TRUE) + Call(DisablePlayerInput, FALSE) + Unbind + Return + End }; diff --git a/src/world/area_kpa/kpa_134/kpa_134_6_entity.c b/src/world/area_kpa/kpa_134/kpa_134_6_entity.c index ac3101a5f01..0ca44fd7b62 100644 --- a/src/world/area_kpa/kpa_134/kpa_134_6_entity.c +++ b/src/world/area_kpa/kpa_134/kpa_134_6_entity.c @@ -15,34 +15,34 @@ API_CALLABLE(N(UnusedSetEntityPosition)) { #include "world/common/todo/GetEntityPosition.inc.c" EvtScript N(EVS_BreakBlock_Brick) = { - EVT_IF_EQ(GF_KPA134_BlueSwitch, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar5, -224) - EVT_CALL(MakeLerp, 355, 370, 4, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetEntityPosition), MV_SwitchEntityID, LVar5, LVar0, 0) - EVT_WAIT(1) - EVT_SUB(LVar5, 2) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, LVar0, 240, 16, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetEntityPosition), MV_SwitchEntityID, LVar5, LVar0, 0) - EVT_WAIT(1) - EVT_SUB(LVar5, 2) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + IfEq(GF_KPA134_BlueSwitch, TRUE) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Set(LVar5, -224) + Call(MakeLerp, 355, 370, 4, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(N(SetEntityPosition), MV_SwitchEntityID, LVar5, LVar0, 0) + Wait(1) + Sub(LVar5, 2) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, LVar0, 240, 16, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(N(SetEntityPosition), MV_SwitchEntityID, LVar5, LVar0, 0) + Wait(1) + Sub(LVar5, 2) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, FALSE) + Return + End }; s32 N(KeyList_BowsersCastle)[] = { @@ -51,49 +51,49 @@ s32 N(KeyList_BowsersCastle)[] = { }; EvtScript N(EVS_UnlockPrompt_Door) = { - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_SET(GF_KPA134_UnlockedDoor, TRUE) - EVT_CALL(N(GetEntityPosition), MV_PadlockEntityID, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_SET(LVar0, MV_PadlockEntityID) - EVT_CALL(N(RemovePadlock)) - EVT_SET(LVar1, 0) - EVT_WAIT(5) - EVT_CALL(CloseChoicePopup) - EVT_UNBIND - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_130_0)), TRIGGER_WALL_PRESS_A, COLLIDER_nno, 1, 0) - EVT_RETURN - EVT_END + Call(ShowKeyChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) + Call(CloseChoicePopup) + Return + EndIf + IfEq(LVar0, -1) + Call(CloseChoicePopup) + Return + EndIf + Call(RemoveKeyItemAt, LVar1) + Set(GF_KPA134_UnlockedDoor, TRUE) + Call(N(GetEntityPosition), MV_PadlockEntityID, LVar0, LVar1, LVar2) + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Set(LVar0, MV_PadlockEntityID) + Call(N(RemovePadlock)) + Set(LVar1, 0) + Wait(5) + Call(CloseChoicePopup) + Unbind + BindTrigger(Ref(N(EVS_ExitDoors_kpa_130_0)), TRIGGER_WALL_PRESS_A, COLLIDER_nno, 1, 0) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_KPA134_UnlockedDoor, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), 743, 10, 115, 270, MAKE_ENTITY_END) - EVT_SET(MV_PadlockEntityID, LVar0) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_UnlockPrompt_Door)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(KeyList_BowsersCastle)), 0, 1) - EVT_ELSE - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_130_0)), TRIGGER_WALL_PRESS_A, COLLIDER_nno, 1, 0) - EVT_END_IF - EVT_IF_EQ(GF_KPA134_BlueSwitch, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueSwitch), -224, 355, -25, 0, MAKE_ENTITY_END) - EVT_CALL(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_KPA134_HitWaterSwitch)) - EVT_SET(MV_SwitchEntityID, LVar0) - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), -224, 330, -25, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_BreakBlock_Brick))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SimpleSpring), 475, 0, -20, 90, 60, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 195, 300, -75, 0, ITEM_MAPLE_SYRUP, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KPA134_HiddenItem_MapleSyrup) - EVT_RETURN - EVT_END + IfEq(GF_KPA134_UnlockedDoor, FALSE) + Call(MakeEntity, Ref(Entity_Padlock), 743, 10, 115, 270, MAKE_ENTITY_END) + Set(MV_PadlockEntityID, LVar0) + BindPadlock(Ref(N(EVS_UnlockPrompt_Door)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), Ref(N(KeyList_BowsersCastle)), 0, 1) + Else + BindTrigger(Ref(N(EVS_ExitDoors_kpa_130_0)), TRIGGER_WALL_PRESS_A, COLLIDER_nno, 1, 0) + EndIf + IfEq(GF_KPA134_BlueSwitch, FALSE) + Call(MakeEntity, Ref(Entity_BlueSwitch), -224, 355, -25, 0, MAKE_ENTITY_END) + Call(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_KPA134_HitWaterSwitch)) + Set(MV_SwitchEntityID, LVar0) + EndIf + Call(MakeEntity, Ref(Entity_BrickBlock), -224, 330, -25, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_BreakBlock_Brick))) + Call(MakeEntity, Ref(Entity_SimpleSpring), 475, 0, -20, 90, 60, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 195, 300, -75, 0, ITEM_MAPLE_SYRUP, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KPA134_HiddenItem_MapleSyrup) + Return + End }; diff --git a/src/world/area_kpa/kpa_14/kpa_14_1_music.c b/src/world/area_kpa/kpa_14/kpa_14_1_music.c index 523a6adb325..c02a5519958 100644 --- a/src/world/area_kpa/kpa_14/kpa_14_1_music.c +++ b/src/world/area_kpa/kpa_14/kpa_14_1_music.c @@ -1,17 +1,17 @@ #include "kpa_14.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_1) - EVT_ELSE - EVT_CALL(ClearAmbientSounds, 250) - EVT_END_IF - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_1) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + IfEq(GF_KPA16_ShutOffLava, FALSE) + Call(PlayAmbientSounds, AMBIENT_LAVA_1) + Else + Call(ClearAmbientSounds, 250) + EndIf + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_1) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_14/kpa_14_2_main.c b/src/world/area_kpa/kpa_14/kpa_14_2_main.c index 33faeaed2e0..7d6b6f357c6 100644 --- a/src/world/area_kpa/kpa_14/kpa_14_2_main.c +++ b/src/world/area_kpa/kpa_14/kpa_14_2_main.c @@ -16,79 +16,79 @@ API_CALLABLE(N(GetActingPartner)) { EvtScript N(EVS_ExitWalk_kpa_13_1) = EVT_EXIT_WALK(60, kpa_14_ENTRY_0, "kpa_13", kpa_13_ENTRY_1); EvtScript N(EVS_ExitDoor_kpa_01_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, kpa_14_ENTRY_1) - EVT_SET(LVar1, COLLIDER_deilitte) - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_SET(LVar2, MODEL_o1035) - EVT_ELSE - EVT_SET(LVar2, MODEL_o1036) - EVT_END_IF - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kpa_01"), kpa_01_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, kpa_14_ENTRY_1) + Set(LVar1, COLLIDER_deilitte) + IfEq(GF_KPA16_ShutOffLava, FALSE) + Set(LVar2, MODEL_o1035) + Else + Set(LVar2, MODEL_o1036) + EndIf + Set(LVar3, DOOR_SWING_OUT) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("kpa_01"), kpa_01_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_kpa_16_0) = EVT_EXIT_WALK(60, kpa_14_ENTRY_2, "kpa_16", kpa_16_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_13_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_16_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_13_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_16_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kpa_14_ENTRY_0) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_CASE_EQ(kpa_14_ENTRY_1) - EVT_SET(LVar0, kpa_14_ENTRY_1) - EVT_SET(LVar1, COLLIDER_deilitte) - EVT_SET(LVar2, MODEL_o1035) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC(EnterSingleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kpa_14_ENTRY_2) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kpa_14_ENTRY_0) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + CaseEq(kpa_14_ENTRY_1) + Set(LVar0, kpa_14_ENTRY_1) + Set(LVar1, COLLIDER_deilitte) + Set(LVar2, MODEL_o1035) + Set(LVar3, DOOR_SWING_OUT) + Exec(EnterSingleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kpa_14_ENTRY_2) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + EndSwitch + Return + End }; EvtScript N(EVS_TexPan_Lava) = { - EVT_THREAD + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_0) TEX_PAN_PARAMS_STEP(-1000, 0,-2000, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 1, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( -400, 0, -800, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 1, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_o631, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_o625, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_o776, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_o777, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_o778, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_o779, TEX_PANNER_1) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetTexPanner, MODEL_o631, TEX_PANNER_1) + Call(SetTexPanner, MODEL_o625, TEX_PANNER_1) + Call(SetTexPanner, MODEL_o776, TEX_PANNER_1) + Call(SetTexPanner, MODEL_o777, TEX_PANNER_1) + Call(SetTexPanner, MODEL_o778, TEX_PANNER_1) + Call(SetTexPanner, MODEL_o779, TEX_PANNER_1) + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -104,160 +104,160 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(EVS_Touch_LeftOfLavaFall) = { - EVT_SET(MV_LastFloorBeforeLavaFall, COLLIDER_o195) - EVT_RETURN - EVT_END + Set(MV_LastFloorBeforeLavaFall, COLLIDER_o195) + Return + End }; EvtScript N(EVS_Touch_RightOfLavaFall) = { - EVT_SET(MV_LastFloorBeforeLavaFall, COLLIDER_o198) - EVT_RETURN - EVT_END + Set(MV_LastFloorBeforeLavaFall, COLLIDER_o198) + Return + End }; EvtScript N(EVS_MakeSmokeEffects) = { - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, 1, 10) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, 1, 10) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_SetupLavaFall) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_LOOP(0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o854, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(N(GetActingPartner)) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(8) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o854, COLLIDER_FLAGS_UPPER_MASK) - EVT_CASE_EQ(9) - EVT_CASE_DEFAULT - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar1, 120) - EVT_SWITCH(LVar0) - EVT_CASE_RANGE(1200, 1245) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_SET(MV_TakingLavaFallDamage, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_EXEC_GET_TID(N(EVS_MakeSmokeEffects), LVar9) - EVT_IF_EQ(MV_LastFloorBeforeLavaFall, COLLIDER_o195) - EVT_SET(LVar5, 1045) - EVT_ELSE - EVT_SET(LVar5, 1400) - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(InterruptUsePartner) - EVT_CALL(SetPlayerActionState, ACTION_STATE_HIT_LAVA) - EVT_WAIT(10) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar5, 30, -135) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar5, 30, -135) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(MakeLerp, LVar0, LVar5, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetPlayerPos, LVar0, 250, -135) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 250, 30, 20, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetPlayerPos, LVar5, LVar0, -135) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Thrown) - EVT_CALL(MakeLerp, 30, 60, 5, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetPlayerPos, LVar5, LVar0, -135) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_KILL_THREAD(LVar9) - EVT_CALL(MakeLerp, 60, 30, 5, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetPlayerPos, LVar5, LVar0, -135) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(5) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_WAIT(1) - EVT_SET(MV_TakingLavaFallDamage, FALSE) - EVT_END_SWITCH - EVT_END_IF - EVT_END_SWITCH - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0B) + Loop(0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o854, COLLIDER_FLAGS_UPPER_MASK) + Call(N(GetActingPartner)) + Switch(LVar9) + CaseEq(8) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o854, COLLIDER_FLAGS_UPPER_MASK) + CaseEq(9) + CaseDefault + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar1, 120) + Switch(LVar0) + CaseRange(1200, 1245) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Set(MV_TakingLavaFallDamage, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + ExecGetTID(N(EVS_MakeSmokeEffects), LVar9) + IfEq(MV_LastFloorBeforeLavaFall, COLLIDER_o195) + Set(LVar5, 1045) + Else + Set(LVar5, 1400) + EndIf + Wait(1) + Call(InterruptUsePartner) + Call(SetPlayerActionState, ACTION_STATE_HIT_LAVA) + Wait(10) + Call(UseSettingsFrom, CAM_DEFAULT, LVar5, 30, -135) + Call(SetPanTarget, CAM_DEFAULT, LVar5, 30, -135) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(MakeLerp, LVar0, LVar5, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetPlayerPos, LVar0, 250, -135) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 250, 30, 20, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetPlayerPos, LVar5, LVar0, -135) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetPlayerAnimation, ANIM_MarioW2_Thrown) + Call(MakeLerp, 30, 60, 5, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetPlayerPos, LVar5, LVar0, -135) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + KillThread(LVar9) + Call(MakeLerp, 60, 30, 5, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetPlayerPos, LVar5, LVar0, -135) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(5) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(DisablePlayerPhysics, FALSE) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Wait(1) + Set(MV_TakingLavaFallDamage, FALSE) + EndSwitch + EndIf + EndSwitch + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_CALL(EnableGroup, MODEL_after, FALSE) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_ELSE - EVT_CALL(EnableGroup, MODEL_before, FALSE) - EVT_END_IF - EVT_EXEC(N(EVS_EnterMap)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_EXEC(N(EVS_SetupPlatforms)) - EVT_END_IF - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_THREAD - EVT_WAIT(2) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o625, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o776, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o818, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o819, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o820, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o821, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o822, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o823, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o824, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o825, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o826, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o827, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o828, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o829, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o830, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o857, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o858, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilin, SURFACE_TYPE_LAVA) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Touch_LeftOfLavaFall)), TRIGGER_FLOOR_TOUCH, COLLIDER_o195, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Touch_RightOfLavaFall)), TRIGGER_FLOOR_TOUCH, COLLIDER_o198, 1, 0) - EVT_EXEC(N(EVS_SetupLavaFall)) - EVT_END_THREAD - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o854, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + ExecWait(N(EVS_MakeEntities)) + IfEq(GF_KPA16_ShutOffLava, FALSE) + Call(EnableGroup, MODEL_after, FALSE) + Exec(N(EVS_TexPan_Lava)) + Else + Call(EnableGroup, MODEL_before, FALSE) + EndIf + Exec(N(EVS_EnterMap)) + Exec(N(EVS_SetupMusic)) + IfEq(GF_KPA16_ShutOffLava, FALSE) + Exec(N(EVS_SetupPlatforms)) + EndIf + IfEq(GF_KPA16_ShutOffLava, FALSE) + Thread + Wait(2) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o625, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o776, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o818, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o819, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o820, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o821, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o822, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o823, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o824, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o825, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o826, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o827, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o828, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o829, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o830, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o857, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o858, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilin, SURFACE_TYPE_LAVA) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + BindTrigger(Ref(N(EVS_Touch_LeftOfLavaFall)), TRIGGER_FLOOR_TOUCH, COLLIDER_o195, 1, 0) + BindTrigger(Ref(N(EVS_Touch_RightOfLavaFall)), TRIGGER_FLOOR_TOUCH, COLLIDER_o198, 1, 0) + Exec(N(EVS_SetupLavaFall)) + EndThread + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o854, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Return + End }; diff --git a/src/world/area_kpa/kpa_14/kpa_14_3_entity.c b/src/world/area_kpa/kpa_14/kpa_14_3_entity.c index a2165b3b605..f986c8a540b 100644 --- a/src/world/area_kpa/kpa_14/kpa_14_3_entity.c +++ b/src/world/area_kpa/kpa_14/kpa_14_3_entity.c @@ -11,14 +11,14 @@ s32** N(varStash) = NULL; EvtScript N(EVS_Chest_ShowGotItem) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_FULL) - EVT_WAIT(40) - EVT_CALL(ShowGotItem, LVar0, FALSE, 0) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_FULL) + Wait(40) + Call(ShowGotItem, LVar0, FALSE, 0) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + Return + End }; #include "world/common/todo/RemovePadlock.inc.c" @@ -30,41 +30,41 @@ s32 N(KeyList_BowsersCastle)[] = { }; EvtScript N(EVS_UnlockPrompt_Door) = { - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_SET(GF_KPA14_UnlockedDoor, TRUE) - EVT_CALL(N(GetEntityPosition), MV_PadlockEntityID, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_SET(LVar0, MV_PadlockEntityID) - EVT_CALL(N(RemovePadlock)) - EVT_SET(LVar1, 0) - EVT_WAIT(5) - EVT_CALL(CloseChoicePopup) - EVT_UNBIND - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_kpa_01_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitte, 1, 0) - EVT_RETURN - EVT_END + Call(ShowKeyChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) + Call(CloseChoicePopup) + Return + EndIf + IfEq(LVar0, -1) + Call(CloseChoicePopup) + Return + EndIf + Call(RemoveKeyItemAt, LVar1) + Set(GF_KPA14_UnlockedDoor, TRUE) + Call(N(GetEntityPosition), MV_PadlockEntityID, LVar0, LVar1, LVar2) + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Set(LVar0, MV_PadlockEntityID) + Call(N(RemovePadlock)) + Set(LVar1, 0) + Wait(5) + Call(CloseChoicePopup) + Unbind + BindTrigger(Ref(N(EVS_ExitDoor_kpa_01_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitte, 1, 0) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_KPA14_UnlockedDoor, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), 1995, 40, -162, 270, MAKE_ENTITY_END) - EVT_SET(MV_PadlockEntityID, LVar0) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_UnlockPrompt_Door)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(KeyList_BowsersCastle)), 0, 1) - EVT_ELSE - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_kpa_01_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitte, 1, 0) - EVT_END_IF - EVT_CALL(MakeItemEntity, ITEM_MYSTERY, 350, 30, -150, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KPA14_Item_Mystery) - EVT_CALL(MakeItemEntity, ITEM_THUNDER_RAGE, 800, 30, -150, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KPA14_Item_ThunderRage) - EVT_RETURN - EVT_END + IfEq(GF_KPA14_UnlockedDoor, FALSE) + Call(MakeEntity, Ref(Entity_Padlock), 1995, 40, -162, 270, MAKE_ENTITY_END) + Set(MV_PadlockEntityID, LVar0) + BindPadlock(Ref(N(EVS_UnlockPrompt_Door)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), Ref(N(KeyList_BowsersCastle)), 0, 1) + Else + BindTrigger(Ref(N(EVS_ExitDoor_kpa_01_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitte, 1, 0) + EndIf + Call(MakeItemEntity, ITEM_MYSTERY, 350, 30, -150, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KPA14_Item_Mystery) + Call(MakeItemEntity, ITEM_THUNDER_RAGE, 800, 30, -150, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KPA14_Item_ThunderRage) + Return + End }; diff --git a/src/world/area_kpa/kpa_14/kpa_14_4_platforms.c b/src/world/area_kpa/kpa_14/kpa_14_4_platforms.c index 57c4e85bc49..4171fe374c7 100644 --- a/src/world/area_kpa/kpa_14/kpa_14_4_platforms.c +++ b/src/world/area_kpa/kpa_14/kpa_14_4_platforms.c @@ -44,60 +44,60 @@ API_CALLABLE(N(IsPartnerLakilester)) { } EvtScript N(EVS_SetupPlatforms) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_CALL(ParentColliderToModel, COLLIDER_o852, MODEL_o860) - EVT_SET(LVar0, 0) - EVT_SET(LVar3, 0) - EVT_LOOP(0) - EVT_CALL(MakeLerp, LVar0, 175, 175, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_dai01, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o852) - EVT_SET(LVar4, LVar0) - EVT_SUB(LVar4, LVar3) - EVT_SET(LVar3, LVar0) - EVT_CALL(N(AddPlatformPushVelocity), LVar4, COLLIDER_o852, MV_TakingLavaFallDamage) - EVT_IF_GT(LVar0, 145) - EVT_CALL(N(IsPartnerLakilester)) - EVT_IF_EQ(LVar9, 1) - EVT_CALL(N(GetFloorBelow), LVar2) - EVT_IF_EQ(LVar2, COLLIDER_o858) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_CALL(MakeLerp, LVar0, 0, 175, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_dai01, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o852) - EVT_SET(LVar4, LVar0) - EVT_SUB(LVar4, LVar3) - EVT_SET(LVar3, LVar0) - EVT_CALL(N(AddPlatformPushVelocity), LVar4, COLLIDER_o852, MV_TakingLavaFallDamage) - EVT_IF_LT(LVar0, 30) - EVT_CALL(N(IsPartnerLakilester)) - EVT_IF_EQ(LVar9, 1) - EVT_CALL(N(GetFloorBelow), LVar2) - EVT_IF_EQ(LVar2, COLLIDER_o857) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_END_LOOP - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0B) + Call(ParentColliderToModel, COLLIDER_o852, MODEL_o860) + Set(LVar0, 0) + Set(LVar3, 0) + Loop(0) + Call(MakeLerp, LVar0, 175, 175, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_dai01, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o852) + Set(LVar4, LVar0) + Sub(LVar4, LVar3) + Set(LVar3, LVar0) + Call(N(AddPlatformPushVelocity), LVar4, COLLIDER_o852, MV_TakingLavaFallDamage) + IfGt(LVar0, 145) + Call(N(IsPartnerLakilester)) + IfEq(LVar9, 1) + Call(N(GetFloorBelow), LVar2) + IfEq(LVar2, COLLIDER_o858) + BreakLoop + EndIf + EndIf + EndIf + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(20) + Call(MakeLerp, LVar0, 0, 175, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_dai01, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o852) + Set(LVar4, LVar0) + Sub(LVar4, LVar3) + Set(LVar3, LVar0) + Call(N(AddPlatformPushVelocity), LVar4, COLLIDER_o852, MV_TakingLavaFallDamage) + IfLt(LVar0, 30) + Call(N(IsPartnerLakilester)) + IfEq(LVar9, 1) + Call(N(GetFloorBelow), LVar2) + IfEq(LVar2, COLLIDER_o857) + BreakLoop + EndIf + EndIf + EndIf + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(20) + EndLoop + Return + End }; diff --git a/src/world/area_kpa/kpa_15/kpa_15_1_music.c b/src/world/area_kpa/kpa_15/kpa_15_1_music.c index 5baf5407afe..41e60ea7d3b 100644 --- a/src/world/area_kpa/kpa_15/kpa_15_1_music.c +++ b/src/world/area_kpa/kpa_15/kpa_15_1_music.c @@ -1,15 +1,15 @@ #include "kpa_15.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_1) - EVT_END_IF - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_1) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + IfEq(GF_KPA16_ShutOffLava, FALSE) + Call(PlayAmbientSounds, AMBIENT_LAVA_1) + EndIf + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_1) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_15/kpa_15_2_main.c b/src/world/area_kpa/kpa_15/kpa_15_2_main.c index 45b0338d1b0..0926b4f3f0c 100644 --- a/src/world/area_kpa/kpa_15/kpa_15_2_main.c +++ b/src/world/area_kpa/kpa_15/kpa_15_2_main.c @@ -5,53 +5,53 @@ EvtScript N(D_8024074C_A59ADC) = EVT_EXIT_WALK(40, kpa_15_ENTRY_0, "kpa_13", kpa_13_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(D_8024074C_A59ADC)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(D_8024074C_A59ADC)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + Return + End }; EvtScript N(D_802407D4_A59B64) = { - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; EvtScript N(D_80240800_A59B90) = { - EVT_THREAD + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_0) TEX_PAN_PARAMS_STEP( -400, 0, -800, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 1, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_o811, 0) - EVT_CALL(SetTexPanner, MODEL_o813, 0) - EVT_CALL(SetTexPanner, MODEL_o814, 0) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetTexPanner, MODEL_o811, 0) + Call(SetTexPanner, MODEL_o813, 0) + Call(SetTexPanner, MODEL_o814, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_CALL(EnableGroup, MODEL_after, FALSE) - EVT_EXEC(N(D_80240800_A59B90)) - EVT_ELSE - EVT_CALL(EnableGroup, MODEL_before, FALSE) - EVT_END_IF - EVT_EXEC(N(D_802407D4_A59B64)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_THREAD - EVT_WAIT(2) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o781, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deiliw, SURFACE_TYPE_LAVA) - EVT_END_THREAD - EVT_END_IF - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + ExecWait(N(EVS_MakeEntities)) + IfEq(GF_KPA16_ShutOffLava, FALSE) + Call(EnableGroup, MODEL_after, FALSE) + Exec(N(D_80240800_A59B90)) + Else + Call(EnableGroup, MODEL_before, FALSE) + EndIf + Exec(N(D_802407D4_A59B64)) + Exec(N(EVS_SetupMusic)) + IfEq(GF_KPA16_ShutOffLava, FALSE) + Thread + Wait(2) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o781, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deiliw, SURFACE_TYPE_LAVA) + EndThread + EndIf + Return + End }; diff --git a/src/world/area_kpa/kpa_15/kpa_15_3_entity.c b/src/world/area_kpa/kpa_15/kpa_15_3_entity.c index ab0981a531c..330d8d8beda 100644 --- a/src/world/area_kpa/kpa_15/kpa_15_3_entity.c +++ b/src/world/area_kpa/kpa_15/kpa_15_3_entity.c @@ -6,10 +6,10 @@ EvtScript N(EVS_OpenChest_CastleKey) = EVT_OPEN_CHEST_KEY(ITEM_BOWSER_CASTLE_KEY, GF_KPA15_Chest_CastleKey2); EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 220, 30, -100, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_KPA15_Chest_CastleKey2) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenChest_CastleKey))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Chest), 220, 30, -100, 0, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_KPA15_Chest_CastleKey2) + Call(AssignScript, Ref(N(EVS_OpenChest_CastleKey))) + Return + End }; diff --git a/src/world/area_kpa/kpa_16/kpa_16_1_music.c b/src/world/area_kpa/kpa_16/kpa_16_1_music.c index 0829a848714..d6f1d9bf5d7 100644 --- a/src/world/area_kpa/kpa_16/kpa_16_1_music.c +++ b/src/world/area_kpa/kpa_16/kpa_16_1_music.c @@ -1,15 +1,15 @@ #include "kpa_16.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_7) - EVT_END_IF - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_1) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + IfEq(GF_KPA16_ShutOffLava, FALSE) + Call(PlayAmbientSounds, AMBIENT_LAVA_7) + EndIf + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_1) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_16/kpa_16_2_main.c b/src/world/area_kpa/kpa_16/kpa_16_2_main.c index 6d329aabea2..ceb066aeb75 100644 --- a/src/world/area_kpa/kpa_16/kpa_16_2_main.c +++ b/src/world/area_kpa/kpa_16/kpa_16_2_main.c @@ -5,97 +5,97 @@ EvtScript N(EVS_ExitWalk_kpa_14_2) = EVT_EXIT_WALK(40, kpa_16_ENTRY_0, "kpa_14", kpa_14_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_14_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_14_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; EvtScript N(EVS_TexPan_Steam) = { - EVT_THREAD + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( 0, 400, 0, 800) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_o1157, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_o1158, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_o1159, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_o1160, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_o1162, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_o1163, TEX_PANNER_2) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetTexPanner, MODEL_o1157, TEX_PANNER_2) + Call(SetTexPanner, MODEL_o1158, TEX_PANNER_2) + Call(SetTexPanner, MODEL_o1159, TEX_PANNER_2) + Call(SetTexPanner, MODEL_o1160, TEX_PANNER_2) + Call(SetTexPanner, MODEL_o1162, TEX_PANNER_2) + Call(SetTexPanner, MODEL_o1163, TEX_PANNER_2) + Return + End }; EvtScript N(EVS_TexPan_Lava) = { - EVT_THREAD + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_0) TEX_PAN_PARAMS_STEP(-1200, 0, -600, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 1, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 6144, 0, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( -800, 0, -400, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 1, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_3) TEX_PAN_PARAMS_STEP( 0, 3000, 0, 0) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_4) TEX_PAN_PARAMS_STEP( 0, 3200, 0, 0) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_5) TEX_PAN_PARAMS_STEP( 0, 2800, 0, 0) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_o1282, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o1283, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o1284, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_o1285, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_o1286, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_o776, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_o782, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_o780, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_o893, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_o895, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_o894, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_o892, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_o1331, TEX_PANNER_3) - EVT_CALL(SetTexPanner, MODEL_o1316, TEX_PANNER_4) - EVT_CALL(SetTexPanner, MODEL_o1321, TEX_PANNER_5) - EVT_CALL(SetTexPanner, MODEL_o1320, TEX_PANNER_5) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetTexPanner, MODEL_o1282, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o1283, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o1284, TEX_PANNER_1) + Call(SetTexPanner, MODEL_o1285, TEX_PANNER_1) + Call(SetTexPanner, MODEL_o1286, TEX_PANNER_1) + Call(SetTexPanner, MODEL_o776, TEX_PANNER_2) + Call(SetTexPanner, MODEL_o782, TEX_PANNER_2) + Call(SetTexPanner, MODEL_o780, TEX_PANNER_2) + Call(SetTexPanner, MODEL_o893, TEX_PANNER_2) + Call(SetTexPanner, MODEL_o895, TEX_PANNER_2) + Call(SetTexPanner, MODEL_o894, TEX_PANNER_2) + Call(SetTexPanner, MODEL_o892, TEX_PANNER_2) + Call(SetTexPanner, MODEL_o1331, TEX_PANNER_3) + Call(SetTexPanner, MODEL_o1316, TEX_PANNER_4) + Call(SetTexPanner, MODEL_o1321, TEX_PANNER_5) + Call(SetTexPanner, MODEL_o1320, TEX_PANNER_5) + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -106,42 +106,42 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_IF_EQ(GF_KPA16_Defeated_SwitchGuards, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o958, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_CALL(EnableGroup, MODEL_after, FALSE) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o954, COLLIDER_FLAGS_UPPER_MASK) - EVT_ELSE - EVT_CALL(EnableGroup, MODEL_before, FALSE) - EVT_EXEC(N(EVS_TexPan_Steam)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o782, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_EXEC(N(EVS_EnterMap)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_THREAD - EVT_WAIT(2) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o782, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o929, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o930, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o776, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o952, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o954, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deiliw, SURFACE_TYPE_LAVA) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_END_THREAD - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o952, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + IfEq(GF_KPA16_Defeated_SwitchGuards, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o958, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + IfEq(GF_KPA16_ShutOffLava, FALSE) + Call(EnableGroup, MODEL_after, FALSE) + Exec(N(EVS_TexPan_Lava)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o954, COLLIDER_FLAGS_UPPER_MASK) + Else + Call(EnableGroup, MODEL_before, FALSE) + Exec(N(EVS_TexPan_Steam)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o782, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Exec(N(EVS_EnterMap)) + Exec(N(EVS_SetupMusic)) + IfEq(GF_KPA16_ShutOffLava, FALSE) + Thread + Wait(2) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o782, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o929, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o930, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o776, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o952, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o954, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deiliw, SURFACE_TYPE_LAVA) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + EndThread + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o952, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Return + End }; diff --git a/src/world/area_kpa/kpa_16/kpa_16_3_entity.c b/src/world/area_kpa/kpa_16/kpa_16_3_entity.c index 7577a6a907c..814935defcc 100644 --- a/src/world/area_kpa/kpa_16/kpa_16_3_entity.c +++ b/src/world/area_kpa/kpa_16/kpa_16_3_entity.c @@ -2,10 +2,10 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueSwitch), 470, 230, -145, 0, MAKE_ENTITY_END) - EVT_CALL(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_KPA16_HitSwitch)) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_KPA16_ShutOffLava, FALSE) + Call(MakeEntity, Ref(Entity_BlueSwitch), 470, 230, -145, 0, MAKE_ENTITY_END) + Call(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_KPA16_HitSwitch)) + EndIf + Return + End }; diff --git a/src/world/area_kpa/kpa_16/kpa_16_4_npc.c b/src/world/area_kpa/kpa_16/kpa_16_4_npc.c index db7fa141af8..d695e46621d 100644 --- a/src/world/area_kpa/kpa_16/kpa_16_4_npc.c +++ b/src/world/area_kpa/kpa_16/kpa_16_4_npc.c @@ -25,265 +25,265 @@ NpcSettings N(NpcSettings_Dummy) = { }; EvtScript N(EVS_Scene_LavaShutoff) = { - EVT_LABEL(0) - EVT_IF_EQ(AF_KPA16_HitSwitch, FALSE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerActionState, LVar0) - EVT_IF_EQ(LVar0, ACTION_STATE_IDLE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 330, 230, -150) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 330, 170, -150) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_CALL(N(MuteAmbience)) - EVT_SETF(LVar2, 1) - EVT_CALL(MakeLerp, 0, -20, 100 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_ADDF(LVar2, EVT_FLOAT(-0.01)) - EVT_CALL(TranslateModel, MODEL_o1283, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o1282, 0, LVar0, 0) - EVT_CALL(ScaleModel, MODEL_o1282, LVar2, 1, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(50 * DT) - EVT_CALL(MakeLerp, 0, 255, 50 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetScreenBlackFadeAmount), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o782, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o929, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o930, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o776, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o952, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o954, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deiliw, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o952, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_TexPan_Steam)) - EVT_CALL(EnableGroup, MODEL_before, FALSE) - EVT_CALL(EnableGroup, MODEL_after, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o782, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o954, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GF_KPA16_ShutOffLava, TRUE) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(MakeLerp, 255, 0, 50 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetScreenBlackFadeAmount), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(60 * DT) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PARTNER_GOOMBARIO) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH8_001B) - EVT_CASE_EQ(PARTNER_KOOPER) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH8_001C) - EVT_CASE_EQ(PARTNER_BOMBETTE) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH8_001D) - EVT_CASE_EQ(PARTNER_PARAKARRY) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH8_001E) - EVT_CASE_EQ(PARTNER_BOW) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH8_001F) - EVT_CASE_EQ(PARTNER_WATT) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldWatt_Talk, ANIM_WorldWatt_Idle, 0, MSG_CH8_0020) - EVT_CASE_EQ(PARTNER_SUSHIE) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldSushie_Talk, ANIM_WorldSushie_Idle, 0, MSG_CH8_0021) - EVT_CASE_EQ(PARTNER_LAKILESTER) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH8_0022) - EVT_END_SWITCH - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Label(0) + IfEq(AF_KPA16_HitSwitch, FALSE) + Wait(1) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Loop(0) + Wait(1) + Call(GetPlayerActionState, LVar0) + IfEq(LVar0, ACTION_STATE_IDLE) + BreakLoop + EndIf + EndLoop + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(350.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Call(SetPanTarget, CAM_DEFAULT, 330, 230, -150) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(SetPanTarget, CAM_DEFAULT, 330, 170, -150) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Call(N(MuteAmbience)) + SetF(LVar2, 1) + Call(MakeLerp, 0, -20, 100 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + AddF(LVar2, Float(-0.01)) + Call(TranslateModel, MODEL_o1283, 0, LVar0, 0) + Call(TranslateModel, MODEL_o1282, 0, LVar0, 0) + Call(ScaleModel, MODEL_o1282, LVar2, 1, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Wait(50 * DT) + Call(MakeLerp, 0, 255, 50 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(N(SetScreenBlackFadeAmount), LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o782, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o929, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o930, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o776, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o952, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o954, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deiliw, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o952, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_TexPan_Steam)) + Call(EnableGroup, MODEL_before, FALSE) + Call(EnableGroup, MODEL_after, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o782, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o954, COLLIDER_FLAGS_UPPER_MASK) + Set(GF_KPA16_ShutOffLava, TRUE) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Call(MakeLerp, 255, 0, 50 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(N(SetScreenBlackFadeAmount), LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(60 * DT) + Call(DisablePartnerAI, 0) + Call(GetCurrentPartnerID, LVar0) + Switch(LVar0) + CaseEq(PARTNER_GOOMBARIO) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH8_001B) + CaseEq(PARTNER_KOOPER) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH8_001C) + CaseEq(PARTNER_BOMBETTE) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH8_001D) + CaseEq(PARTNER_PARAKARRY) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH8_001E) + CaseEq(PARTNER_BOW) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH8_001F) + CaseEq(PARTNER_WATT) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldWatt_Talk, ANIM_WorldWatt_Idle, 0, MSG_CH8_0020) + CaseEq(PARTNER_SUSHIE) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldSushie_Talk, ANIM_WorldSushie_Idle, 0, MSG_CH8_0021) + CaseEq(PARTNER_LAKILESTER) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH8_0022) + EndSwitch + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_ChargeAtPlayer) = { - EVT_CHILD_THREAD - EVT_WAIT(15 * DT) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_01, EVT_FLOAT(3.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_01, 650, -145, 0) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_03, EVT_FLOAT(3.5 / DT)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_03, 650, -165, 0) - EVT_END_CHILD_THREAD - EVT_WAIT(5 * DT) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_02, EVT_FLOAT(4.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_02, 650, -120, 0) - EVT_RETURN - EVT_END + ChildThread + Wait(15 * DT) + Call(SetNpcSpeed, NPC_Koopatrol_01, Float(3.0 / DT)) + Call(NpcMoveTo, NPC_Koopatrol_01, 650, -145, 0) + EndChildThread + ChildThread + Wait(10 * DT) + Call(SetNpcSpeed, NPC_Koopatrol_03, Float(3.5 / DT)) + Call(NpcMoveTo, NPC_Koopatrol_03, 650, -165, 0) + EndChildThread + Wait(5 * DT) + Call(SetNpcSpeed, NPC_Koopatrol_02, Float(4.0 / DT)) + Call(NpcMoveTo, NPC_Koopatrol_02, 650, -120, 0) + Return + End }; EvtScript N(EVS_NpcIdle_Guards) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(N(GetFloorCollider), LVar0) - EVT_IF_NE(LVar0, COLLIDER_o785) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar1, 230) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_GT(LVar0, 710) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(PlaySoundAtNpc, NPC_Koopatrol_01, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAtNpc, NPC_Koopatrol_02, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAtNpc, NPC_Koopatrol_03, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_Koopatrol_01, EMOTE_EXCLAMATION, 0, 15, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(ShowEmote, NPC_Koopatrol_02, EMOTE_EXCLAMATION, 0, 15, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(ShowEmote, NPC_Koopatrol_03, EMOTE_EXCLAMATION, 0, 15, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(15 * DT) - EVT_CALL(InterpNpcYaw, NPC_Koopatrol_01, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_Koopatrol_02, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_Koopatrol_03, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_Magikoopa, 90, 0) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim06) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim06) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_03, ANIM_WorldKoopatrol_Anim06) - EVT_WAIT(10 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 555, 230, -150) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 555, 230, -150) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(10.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PlayerMoveTo, 680, -145, 0) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_END_THREAD - EVT_CALL(SetSelfVar, 0, 0) - EVT_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim06) - EVT_CALL(SetNpcSpeed, NPC_Koopatrol_02, EVT_FLOAT(4.0 / DT)) - EVT_LABEL(10) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_02, 550, -165, 0) - EVT_WAIT(5 * DT) - EVT_CALL(NpcMoveTo, NPC_Koopatrol_02, 510, -165, 0) - EVT_WAIT(5 * DT) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(NpcMoveTo, NPC_Koopatrol_02, 535, -165, 0) - EVT_CALL(SetSelfVar, 0, 2) - EVT_END_THREAD - EVT_CALL(InterpNpcYaw, NPC_Koopatrol_01, 270, 0) - EVT_CALL(SpeakToPlayer, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim06, ANIM_WorldKoopatrol_Anim06, 1, MSG_CH8_0017) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetNpcJumpscale, NPC_Koopatrol_03, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_Koopatrol_03, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Koopatrol_03, LVar0, LVar1, LVar2, 20 * DT) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Koopatrol_03, ANIM_WorldKoopatrol_Anim06, ANIM_WorldKoopatrol_Anim06, 0, MSG_CH8_0018) - EVT_CALL(SetSelfVar, 0, 1) - EVT_LABEL(15) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_WAIT(1) - EVT_GOTO(15) - EVT_END_IF - EVT_CALL(InterpNpcYaw, NPC_Koopatrol_02, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_Koopatrol_03, 270, 0) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_03, ANIM_WorldKoopatrol_Anim01) - EVT_CALL(SpeakToPlayer, NPC_Magikoopa, ANIM_Magikoopa_Anim02, ANIM_Magikoopa_Anim01, 0, MSG_CH8_0019) - EVT_THREAD - EVT_WAIT(15 * DT) - EVT_CALL(InterpNpcYaw, NPC_Koopatrol_03, 90, 0) - EVT_WAIT(10 * DT) - EVT_CALL(InterpNpcYaw, NPC_Koopatrol_01, 90, 0) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_CH8_001A) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim06) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim06) - EVT_CALL(SetNpcAnimation, NPC_Koopatrol_03, ANIM_WorldKoopatrol_Anim06) - EVT_EXEC(N(EVS_ChargeAtPlayer)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_EQ(GF_KPA16_Defeated_SwitchGuards, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcPos, NPC_Koopatrol_01, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_Koopatrol_02, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_Koopatrol_03, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_Magikoopa, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Call(N(GetFloorCollider), LVar0) + IfNe(LVar0, COLLIDER_o785) + Goto(0) + EndIf + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar1, 230) + Goto(0) + EndIf + IfGt(LVar0, 710) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Call(PlaySoundAtNpc, NPC_Koopatrol_01, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(PlaySoundAtNpc, NPC_Koopatrol_02, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(PlaySoundAtNpc, NPC_Koopatrol_03, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_Koopatrol_01, EMOTE_EXCLAMATION, 0, 15, EMOTER_NPC, 0, 0, 0, 0) + Call(ShowEmote, NPC_Koopatrol_02, EMOTE_EXCLAMATION, 0, 15, EMOTER_NPC, 0, 0, 0, 0) + Call(ShowEmote, NPC_Koopatrol_03, EMOTE_EXCLAMATION, 0, 15, EMOTER_NPC, 0, 0, 0, 0) + Wait(15 * DT) + Call(InterpNpcYaw, NPC_Koopatrol_01, 90, 0) + Call(InterpNpcYaw, NPC_Koopatrol_02, 90, 0) + Call(InterpNpcYaw, NPC_Koopatrol_03, 90, 0) + Call(InterpNpcYaw, NPC_Magikoopa, 90, 0) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim06) + Call(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim06) + Call(SetNpcAnimation, NPC_Koopatrol_03, ANIM_WorldKoopatrol_Anim06) + Wait(10 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, 555, 230, -150) + Call(SetPanTarget, CAM_DEFAULT, 555, 230, -150) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(10.0), Float(-10.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Call(SetPlayerSpeed, Float(3.0 / DT)) + Call(PlayerMoveTo, 680, -145, 0) + Call(InterpPlayerYaw, 270, 0) + EndThread + Call(SetSelfVar, 0, 0) + Thread + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim06) + Call(SetNpcSpeed, NPC_Koopatrol_02, Float(4.0 / DT)) + Label(10) + Call(NpcMoveTo, NPC_Koopatrol_02, 550, -165, 0) + Wait(5 * DT) + Call(NpcMoveTo, NPC_Koopatrol_02, 510, -165, 0) + Wait(5 * DT) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Goto(10) + EndIf + Call(NpcMoveTo, NPC_Koopatrol_02, 535, -165, 0) + Call(SetSelfVar, 0, 2) + EndThread + Call(InterpNpcYaw, NPC_Koopatrol_01, 270, 0) + Call(SpeakToPlayer, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim06, ANIM_WorldKoopatrol_Anim06, 1, MSG_CH8_0017) + Thread + Wait(5) + Call(SetNpcJumpscale, NPC_Koopatrol_03, Float(1.0)) + Call(GetNpcPos, NPC_Koopatrol_03, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Koopatrol_03, LVar0, LVar1, LVar2, 20 * DT) + EndThread + Call(SpeakToPlayer, NPC_Koopatrol_03, ANIM_WorldKoopatrol_Anim06, ANIM_WorldKoopatrol_Anim06, 0, MSG_CH8_0018) + Call(SetSelfVar, 0, 1) + Label(15) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 1) + Wait(1) + Goto(15) + EndIf + Call(InterpNpcYaw, NPC_Koopatrol_02, 270, 0) + Call(InterpNpcYaw, NPC_Koopatrol_03, 270, 0) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim01) + Call(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim01) + Call(SetNpcAnimation, NPC_Koopatrol_03, ANIM_WorldKoopatrol_Anim01) + Call(SpeakToPlayer, NPC_Magikoopa, ANIM_Magikoopa_Anim02, ANIM_Magikoopa_Anim01, 0, MSG_CH8_0019) + Thread + Wait(15 * DT) + Call(InterpNpcYaw, NPC_Koopatrol_03, 90, 0) + Wait(10 * DT) + Call(InterpNpcYaw, NPC_Koopatrol_01, 90, 0) + EndThread + Call(SpeakToPlayer, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_CH8_001A) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Call(SetNpcAnimation, NPC_Koopatrol_01, ANIM_WorldKoopatrol_Anim06) + Call(SetNpcAnimation, NPC_Koopatrol_02, ANIM_WorldKoopatrol_Anim06) + Call(SetNpcAnimation, NPC_Koopatrol_03, ANIM_WorldKoopatrol_Anim06) + Exec(N(EVS_ChargeAtPlayer)) + Call(DisablePlayerInput, FALSE) + Thread + Loop(0) + Wait(1) + IfEq(GF_KPA16_Defeated_SwitchGuards, TRUE) + BreakLoop + EndIf + EndLoop + Wait(30 * DT) + Call(SetNpcPos, NPC_Koopatrol_01, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_Koopatrol_02, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_Koopatrol_03, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_Magikoopa, NPC_DISPOSE_LOCATION) + EndThread + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Return + End }; EvtScript N(EVS_NpcDefeat_Guards) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_SET(GF_KPA16_Defeated_SwitchGuards, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o958, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Set(GF_KPA16_Defeated_SwitchGuards, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o958, COLLIDER_FLAGS_UPPER_MASK) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Guards) = { - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_EXEC(N(EVS_Scene_LavaShutoff)) - EVT_END_IF - EVT_IF_EQ(GF_KPA16_Defeated_SwitchGuards, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Guards))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Guards))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_Magikoopa) - EVT_CALL(RemoveNpc, NPC_Koopatrol_02) - EVT_CALL(RemoveNpc, NPC_Koopatrol_03) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_KPA16_ShutOffLava, FALSE) + Exec(N(EVS_Scene_LavaShutoff)) + EndIf + IfEq(GF_KPA16_Defeated_SwitchGuards, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Guards))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Guards))) + Else + Call(RemoveNpc, NPC_Magikoopa) + Call(RemoveNpc, NPC_Koopatrol_02) + Call(RemoveNpc, NPC_Koopatrol_03) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_Guards)[] = { diff --git a/src/world/area_kpa/kpa_17/kpa_17_1_music.c b/src/world/area_kpa/kpa_17/kpa_17_1_music.c index 40a5488df88..269deea6d1b 100644 --- a/src/world/area_kpa/kpa_17/kpa_17_1_music.c +++ b/src/world/area_kpa/kpa_17/kpa_17_1_music.c @@ -1,13 +1,13 @@ #include "kpa_17.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(ClearAmbientSounds, 250) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_1) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(ClearAmbientSounds, 250) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_1) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_17/kpa_17_2_entity.c b/src/world/area_kpa/kpa_17/kpa_17_2_entity.c index 438061a7de2..cd7a28b329f 100644 --- a/src/world/area_kpa/kpa_17/kpa_17_2_entity.c +++ b/src/world/area_kpa/kpa_17/kpa_17_2_entity.c @@ -2,12 +2,12 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), 1000, 90, -575, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_WoodenCrate), 820, 60, -565, 0, -1, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_WoodenCrate), 820, 30, -565, 0, ITEM_TASTY_TONIC, MAKE_ENTITY_END) - EVT_CALL(AssignCrateFlag, GF_KPA17_Crate_TastyTonic) - EVT_CALL(MakeEntity, EVT_PTR(Entity_WoodenCrate), 855, 30, -565, 0, ITEM_LIFE_SHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignCrateFlag, GF_KPA17_Crate_LifeShroom) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HeartBlock), 1000, 90, -575, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_WoodenCrate), 820, 60, -565, 0, -1, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_WoodenCrate), 820, 30, -565, 0, ITEM_TASTY_TONIC, MAKE_ENTITY_END) + Call(AssignCrateFlag, GF_KPA17_Crate_TastyTonic) + Call(MakeEntity, Ref(Entity_WoodenCrate), 855, 30, -565, 0, ITEM_LIFE_SHROOM, MAKE_ENTITY_END) + Call(AssignCrateFlag, GF_KPA17_Crate_LifeShroom) + Return + End }; diff --git a/src/world/area_kpa/kpa_17/kpa_17_3_main.c b/src/world/area_kpa/kpa_17/kpa_17_3_main.c index 6c8c30df7c7..ef062b5b4db 100644 --- a/src/world/area_kpa/kpa_17/kpa_17_3_main.c +++ b/src/world/area_kpa/kpa_17/kpa_17_3_main.c @@ -1,36 +1,36 @@ #include "kpa_17.h" EvtScript N(EVS_ExitWalk_kpa_1X_2) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(UseExitHeading, 60, kpa_17_ENTRY_1) - EVT_EXEC(ExitWalk) - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_CALL(GotoMap, EVT_PTR("kpa_11"), kpa_11_ENTRY_2) - EVT_ELSE - EVT_CALL(GotoMap, EVT_PTR("kpa_10"), kpa_10_ENTRY_2) - EVT_END_IF - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(UseExitHeading, 60, kpa_17_ENTRY_1) + Exec(ExitWalk) + IfEq(GF_KPA16_ShutOffLava, FALSE) + Call(GotoMap, Ref("kpa_11"), kpa_11_ENTRY_2) + Else + Call(GotoMap, Ref("kpa_10"), kpa_10_ENTRY_2) + EndIf + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_1X_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_1X_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kpa_17_ENTRY_0) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_EXEC(N(EVS_Scene_FallIntoCell)) - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, kpa_17_ENTRY_0) + Exec(N(EVS_BindExitTriggers)) + Exec(N(EVS_Scene_FallIntoCell)) + Else + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndIf + Return + End }; BombTrigger N(BombPos_Wall) = { @@ -39,23 +39,23 @@ BombTrigger N(BombPos_Wall) = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_SET(AB_KPA17_Toad1_Dialogue, 0) - EVT_SET(AB_KPA17_Toad2_Dialogue, 0) - EVT_SET(AB_KPA17_Toad3_Dialogue, 0) - EVT_SET(AB_KPA17_Toad4_Dialogue, 0) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_IF_EQ(GF_KPA17_BombedWall, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BlastWall)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Wall)), 1, 0) - EVT_ELSE - EVT_CALL(SetGroupVisibility, MODEL_g296, MODEL_GROUP_HIDDEN) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitte, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Set(AB_KPA17_Toad1_Dialogue, 0) + Set(AB_KPA17_Toad2_Dialogue, 0) + Set(AB_KPA17_Toad3_Dialogue, 0) + Set(AB_KPA17_Toad4_Dialogue, 0) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + IfEq(GF_KPA17_BombedWall, FALSE) + BindTrigger(Ref(N(EVS_BlastWall)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Wall)), 1, 0) + Else + Call(SetGroupVisibility, MODEL_g296, MODEL_GROUP_HIDDEN) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitte, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_kpa/kpa_17/kpa_17_4_npc.c b/src/world/area_kpa/kpa_17/kpa_17_4_npc.c index b82a009c9de..8fbacd97e11 100644 --- a/src/world/area_kpa/kpa_17/kpa_17_4_npc.c +++ b/src/world/area_kpa/kpa_17/kpa_17_4_npc.c @@ -5,187 +5,187 @@ #include "world/common/npc/Toad_Stationary.inc.c" EvtScript N(EVS_Scene_FallIntoCell) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 1042, 30, -496) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 1042, 30, -496) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_WAIT(60) - EVT_CALL(PartnerIsFlying, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE) - EVT_ELSE - EVT_CALL(func_802CF56C, 1) - EVT_END_IF - EVT_CALL(PlaySoundAtPlayer, SOUND_PLAYER_LONG_FALL, SOUND_SPACE_DEFAULT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_PanicStill) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_LOOP(0) - EVT_SUB(LVar1, 16) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_IF_LE(LVar1, 30) - EVT_CALL(SetPlayerPos, LVar0, 30, LVar2) - EVT_CALL(PlaySoundAtPlayer, SOUND_PLAYER_COLLAPSE, SOUND_SPACE_DEFAULT) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_PanicStill) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(0.6)) - EVT_END_THREAD - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(PlayerJump1, 1030, 30, -496, 10) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(1) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_WAIT(1) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_WAIT(5) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_WAIT(1) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH8_0007, 1000, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(10) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(ClearPartnerMoveHistory, NPC_PARTNER) - EVT_CALL(func_802CF56C, 0) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, 1042, 30, -496) + Call(SetPanTarget, CAM_DEFAULT, 1042, 30, -496) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(InterpPlayerYaw, 270, 0) + Wait(60) + Call(PartnerIsFlying, LVar0) + IfEq(LVar0, TRUE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE) + Else + Call(func_802CF56C, 1) + EndIf + Call(PlaySoundAtPlayer, SOUND_PLAYER_LONG_FALL, SOUND_SPACE_DEFAULT) + Call(SetPlayerAnimation, ANIM_MarioW2_PanicStill) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Loop(0) + Sub(LVar1, 16) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + IfLe(LVar1, 30) + Call(SetPlayerPos, LVar0, 30, LVar2) + Call(PlaySoundAtPlayer, SOUND_PLAYER_COLLAPSE, SOUND_SPACE_DEFAULT) + BreakLoop + EndIf + EndLoop + Call(SetPlayerAnimation, ANIM_MarioW2_PanicStill) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 20, Float(0.6)) + EndThread + Call(SetPlayerJumpscale, Float(1.0)) + Call(PlayerJump1, 1030, 30, -496, 10) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(1) + Call(DisablePlayerPhysics, FALSE) + Wait(1) + Call(InterpPlayerYaw, 90, 0) + Wait(5) + Call(DisablePlayerPhysics, TRUE) + Wait(1) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Wait(1) + Call(ShowMessageAtScreenPos, MSG_CH8_0007, 1000, 0) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(10) + Call(DisablePlayerPhysics, FALSE) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Call(ClearPartnerMoveHistory, NPC_PARTNER) + Call(func_802CF56C, 0) + Return + End }; EvtScript N(EVS_BlastWall) = { - EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 0, 8, 8, 1, 10, 30) - EVT_CALL(EnableModel, MODEL_g296, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitte, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GF_KPA17_BombedWall, TRUE) - EVT_CALL(WaitForPlayerInputEnabled) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(80 * DT) - EVT_CALL(DisablePartnerAI, 0) - EVT_WAIT(5 * DT) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH8_0016) - EVT_CALL(EnablePartnerAI) - EVT_WAIT(10 * DT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END + PlayEffect(EFFECT_BOMBETTE_BREAKING, 0, 8, 8, 1, 10, 30) + Call(EnableModel, MODEL_g296, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitte, COLLIDER_FLAGS_UPPER_MASK) + Set(GF_KPA17_BombedWall, TRUE) + Call(WaitForPlayerInputEnabled) + Call(DisablePlayerInput, TRUE) + Wait(80 * DT) + Call(DisablePartnerAI, 0) + Wait(5 * DT) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH8_0016) + Call(EnablePartnerAI) + Wait(10 * DT) + Call(DisablePlayerInput, FALSE) + Unbind + Return + End }; EvtScript N(EVS_NpcInteract_Toad_01) = { - EVT_SWITCH(GF_KPA17_BombedWall) - EVT_CASE_EQ(0) - EVT_SWITCH(AB_KPA17_Toad1_Dialogue) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH8_0009) - EVT_SET(AB_KPA17_Toad1_Dialogue, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH8_000A) - EVT_SET(AB_KPA17_Toad1_Dialogue, 0) - EVT_END_SWITCH - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH8_000B) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GF_KPA17_BombedWall) + CaseEq(0) + Switch(AB_KPA17_Toad1_Dialogue) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH8_0009) + Set(AB_KPA17_Toad1_Dialogue, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH8_000A) + Set(AB_KPA17_Toad1_Dialogue, 0) + EndSwitch + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH8_000B) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Toad_02) = { - EVT_SWITCH(GF_KPA17_BombedWall) - EVT_CASE_EQ(0) - EVT_SWITCH(AB_KPA17_Toad2_Dialogue) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, MSG_CH8_000C) - EVT_SET(AB_KPA17_Toad2_Dialogue, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, MSG_CH8_000D) - EVT_SET(AB_KPA17_Toad2_Dialogue, 0) - EVT_END_SWITCH - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, MSG_CH8_000E) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GF_KPA17_BombedWall) + CaseEq(0) + Switch(AB_KPA17_Toad2_Dialogue) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, MSG_CH8_000C) + Set(AB_KPA17_Toad2_Dialogue, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, MSG_CH8_000D) + Set(AB_KPA17_Toad2_Dialogue, 0) + EndSwitch + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, MSG_CH8_000E) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_ToadGuard) = { - EVT_SWITCH(GF_KPA17_BombedWall) - EVT_CASE_EQ(0) - EVT_SWITCH(AB_KPA17_Toad3_Dialogue) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_CH8_000F) - EVT_SET(AB_KPA17_Toad3_Dialogue, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_CH8_0010) - EVT_SET(AB_KPA17_Toad3_Dialogue, 0) - EVT_END_SWITCH - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_CH8_0011) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GF_KPA17_BombedWall) + CaseEq(0) + Switch(AB_KPA17_Toad3_Dialogue) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_CH8_000F) + Set(AB_KPA17_Toad3_Dialogue, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_CH8_0010) + Set(AB_KPA17_Toad3_Dialogue, 0) + EndSwitch + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_CH8_0011) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_ToadMinister) = { - EVT_SWITCH(GF_KPA17_BombedWall) - EVT_CASE_EQ(0) - EVT_SWITCH(AB_KPA17_Toad4_Dialogue) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ToadMinister_Talk, ANIM_ToadMinister_Idle, 0, MSG_CH8_0012) - EVT_SET(AB_KPA17_Toad4_Dialogue, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ToadMinister_Talk, ANIM_ToadMinister_Idle, 0, MSG_CH8_0013) - EVT_SET(AB_KPA17_Toad4_Dialogue, 2) - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ToadMinister_Talk, ANIM_ToadMinister_Idle, 0, MSG_CH8_0014) - EVT_SET(AB_KPA17_Toad4_Dialogue, 1) - EVT_END_SWITCH - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ToadMinister_Talk, ANIM_ToadMinister_Idle, 0, MSG_CH8_0015) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GF_KPA17_BombedWall) + CaseEq(0) + Switch(AB_KPA17_Toad4_Dialogue) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_ToadMinister_Talk, ANIM_ToadMinister_Idle, 0, MSG_CH8_0012) + Set(AB_KPA17_Toad4_Dialogue, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_ToadMinister_Talk, ANIM_ToadMinister_Idle, 0, MSG_CH8_0013) + Set(AB_KPA17_Toad4_Dialogue, 2) + CaseEq(2) + Call(SpeakToPlayer, NPC_SELF, ANIM_ToadMinister_Talk, ANIM_ToadMinister_Idle, 0, MSG_CH8_0014) + Set(AB_KPA17_Toad4_Dialogue, 1) + EndSwitch + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_ToadMinister_Talk, ANIM_ToadMinister_Idle, 0, MSG_CH8_0015) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Toad_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_01))) - EVT_CALL(SetNpcPos, NPC_SELF, 813, 30, -394) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_01))) + Call(SetNpcPos, NPC_SELF, 813, 30, -394) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Return + End }; EvtScript N(EVS_NpcInit_Toad_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_02))) - EVT_CALL(SetNpcPos, NPC_SELF, 870, 30, -465) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_02))) + Call(SetNpcPos, NPC_SELF, 870, 30, -465) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Return + End }; EvtScript N(EVS_NpcInit_ToadGuard) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ToadGuard))) - EVT_CALL(SetNpcPos, NPC_SELF, 930, 30, -400) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ToadGuard))) + Call(SetNpcPos, NPC_SELF, 930, 30, -400) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Return + End }; EvtScript N(EVS_NpcInit_ToadMinister) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ToadMinister))) - EVT_CALL(SetNpcPos, NPC_SELF, 1100, 30, -450) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ToadMinister))) + Call(SetNpcPos, NPC_SELF, 1100, 30, -450) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Return + End }; NpcData N(NpcData_Prisoners)[] = { diff --git a/src/world/area_kpa/kpa_32/kpa_32_1_music.c b/src/world/area_kpa/kpa_32/kpa_32_1_music.c index 45bac620c8d..fbde64a2052 100644 --- a/src/world/area_kpa/kpa_32/kpa_32_1_music.c +++ b/src/world/area_kpa/kpa_32/kpa_32_1_music.c @@ -1,12 +1,12 @@ #include "kpa_32.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_32/kpa_32_2_entity.c b/src/world/area_kpa/kpa_32/kpa_32_2_entity.c index 1433c4164f1..38f54141d45 100644 --- a/src/world/area_kpa/kpa_32/kpa_32_2_entity.c +++ b/src/world/area_kpa/kpa_32/kpa_32_2_entity.c @@ -2,7 +2,7 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 0, 10, 0, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_SavePoint), 0, 10, 0, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_kpa/kpa_32/kpa_32_3_main.c b/src/world/area_kpa/kpa_32/kpa_32_3_main.c index afe65b6e964..761e3c96c5f 100644 --- a/src/world/area_kpa/kpa_32/kpa_32_3_main.c +++ b/src/world/area_kpa/kpa_32/kpa_32_3_main.c @@ -8,108 +8,108 @@ EvtScript N(EVS_ExitDoors_kpa_51_0) = EVT_EXIT_DOUBLE_DOOR(kpa_32_ENTRY_2, "kpa_ EvtScript N(EVS_ExitDoors_kpa_96_0) = EVT_EXIT_DOUBLE_DOOR(kpa_32_ENTRY_3, "kpa_96", kpa_96_ENTRY_0, COLLIDER_tt4, MODEL_o1248, MODEL_o1254); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_81_2)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_90_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_51_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_96_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tt4, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_kpa_81_2)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_90_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_kpa_51_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_kpa_96_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tt4, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar0) - EVT_IF_EQ(LVar0, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kpa_32_ENTRY_0) - EVT_SET(LVar0, kpa_32_ENTRY_0) - EVT_SET(LVar2, MODEL_o1256) - EVT_SET(LVar3, MODEL_b4_doa) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kpa_32_ENTRY_1) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(kpa_32_ENTRY_2) - EVT_SET(LVar0, 2) - EVT_SET(LVar2, MODEL_o1258) - EVT_SET(LVar3, MODEL_o1257) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kpa_32_ENTRY_3) - EVT_SET(LVar0, 3) - EVT_SET(LVar2, MODEL_o1248) - EVT_SET(LVar3, MODEL_o1254) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetLoadType, LVar0) + IfEq(LVar0, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kpa_32_ENTRY_0) + Set(LVar0, kpa_32_ENTRY_0) + Set(LVar2, MODEL_o1256) + Set(LVar3, MODEL_b4_doa) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kpa_32_ENTRY_1) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseEq(kpa_32_ENTRY_2) + Set(LVar0, 2) + Set(LVar2, MODEL_o1258) + Set(LVar3, MODEL_o1257) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kpa_32_ENTRY_3) + Set(LVar0, 3) + Set(LVar2, MODEL_o1248) + Set(LVar3, MODEL_o1254) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(EnableTexPanning, MODEL_o1287, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o1289, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o1293, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o1295, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_EnterMap)) + Wait(1) + Exec(N(EVS_SetupMusic)) + Call(EnableTexPanning, MODEL_o1287, TRUE) + Call(EnableTexPanning, MODEL_o1289, TRUE) + Call(EnableTexPanning, MODEL_o1293, TRUE) + Call(EnableTexPanning, MODEL_o1295, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 20, 20, -20, -20) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( 20, 20, -20, -20) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_3) TEX_PAN_PARAMS_STEP( 20, 20, -20, -20) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_4) TEX_PAN_PARAMS_STEP( 20, 20, -20, -20) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(ScaleModel, MODEL_o1287, EVT_FLOAT(1.02), 1, EVT_FLOAT(1.02)) - EVT_CALL(ScaleModel, MODEL_o1289, EVT_FLOAT(1.02), 1, EVT_FLOAT(1.02)) - EVT_CALL(ScaleModel, MODEL_o1293, EVT_FLOAT(1.02), 1, EVT_FLOAT(1.02)) - EVT_CALL(ScaleModel, MODEL_o1295, EVT_FLOAT(1.02), 1, EVT_FLOAT(1.02)) - EVT_WAIT(10) - EVT_CALL(ScaleModel, MODEL_o1287, EVT_FLOAT(1.0), 1, EVT_FLOAT(1.0)) - EVT_CALL(ScaleModel, MODEL_o1289, EVT_FLOAT(1.0), 1, EVT_FLOAT(1.0)) - EVT_CALL(ScaleModel, MODEL_o1293, EVT_FLOAT(1.0), 1, EVT_FLOAT(1.0)) - EVT_CALL(ScaleModel, MODEL_o1295, EVT_FLOAT(1.0), 1, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(ScaleModel, MODEL_o1287, EVT_FLOAT(0.98), 1, EVT_FLOAT(0.98)) - EVT_CALL(ScaleModel, MODEL_o1289, EVT_FLOAT(0.98), 1, EVT_FLOAT(0.98)) - EVT_CALL(ScaleModel, MODEL_o1293, EVT_FLOAT(0.98), 1, EVT_FLOAT(0.98)) - EVT_CALL(ScaleModel, MODEL_o1295, EVT_FLOAT(0.98), 1, EVT_FLOAT(0.98)) - EVT_WAIT(10) - EVT_END_LOOP - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread + Loop(0) + Call(ScaleModel, MODEL_o1287, Float(1.02), 1, Float(1.02)) + Call(ScaleModel, MODEL_o1289, Float(1.02), 1, Float(1.02)) + Call(ScaleModel, MODEL_o1293, Float(1.02), 1, Float(1.02)) + Call(ScaleModel, MODEL_o1295, Float(1.02), 1, Float(1.02)) + Wait(10) + Call(ScaleModel, MODEL_o1287, Float(1.0), 1, Float(1.0)) + Call(ScaleModel, MODEL_o1289, Float(1.0), 1, Float(1.0)) + Call(ScaleModel, MODEL_o1293, Float(1.0), 1, Float(1.0)) + Call(ScaleModel, MODEL_o1295, Float(1.0), 1, Float(1.0)) + Wait(10) + Call(ScaleModel, MODEL_o1287, Float(0.98), 1, Float(0.98)) + Call(ScaleModel, MODEL_o1289, Float(0.98), 1, Float(0.98)) + Call(ScaleModel, MODEL_o1293, Float(0.98), 1, Float(0.98)) + Call(ScaleModel, MODEL_o1295, Float(0.98), 1, Float(0.98)) + Wait(10) + EndLoop + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_33/kpa_33_1_music.c b/src/world/area_kpa/kpa_33/kpa_33_1_music.c index 39340b59511..735241a463c 100644 --- a/src/world/area_kpa/kpa_33/kpa_33_1_music.c +++ b/src/world/area_kpa/kpa_33/kpa_33_1_music.c @@ -2,12 +2,12 @@ #include "kpa_33.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_33/kpa_33_2_entity.c b/src/world/area_kpa/kpa_33/kpa_33_2_entity.c index 930a080476a..946eaba0799 100644 --- a/src/world/area_kpa/kpa_33/kpa_33_2_entity.c +++ b/src/world/area_kpa/kpa_33/kpa_33_2_entity.c @@ -2,7 +2,7 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 0, 10, 0, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_SavePoint), 0, 10, 0, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_kpa/kpa_33/kpa_33_3_main.c b/src/world/area_kpa/kpa_33/kpa_33_3_main.c index bbf4619f80f..bc39747684a 100644 --- a/src/world/area_kpa/kpa_33/kpa_33_3_main.c +++ b/src/world/area_kpa/kpa_33/kpa_33_3_main.c @@ -9,108 +9,108 @@ EvtScript N(EVS_ExitDoors_kpa_52_0) = EVT_EXIT_DOUBLE_DOOR(kpa_33_ENTRY_2, "kpa_ EvtScript N(EVS_ExitDoors_kpa_09_1) = EVT_EXIT_DOUBLE_DOOR(kpa_33_ENTRY_3, "kpa_09", kpa_09_ENTRY_1, COLLIDER_tt4, MODEL_o1258, MODEL_o1259); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_94_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_61_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tt3, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_52_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_09_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tt4, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_94_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_kpa_61_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tt3, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_kpa_52_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_kpa_09_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tt4, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar0) - EVT_IF_EQ(LVar0, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kpa_33_ENTRY_0) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(kpa_33_ENTRY_1) - EVT_SET(LVar0, kpa_33_ENTRY_1) - EVT_SET(LVar2, MODEL_o1250) - EVT_SET(LVar3, MODEL_b3_doa) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kpa_33_ENTRY_2) - EVT_SET(LVar0, kpa_33_ENTRY_2) - EVT_SET(LVar2, MODEL_o1252) - EVT_SET(LVar3, MODEL_o1253) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kpa_33_ENTRY_3) - EVT_SET(LVar0, kpa_33_ENTRY_3) - EVT_SET(LVar2, MODEL_o1258) - EVT_SET(LVar3, MODEL_o1259) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetLoadType, LVar0) + IfEq(LVar0, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kpa_33_ENTRY_0) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseEq(kpa_33_ENTRY_1) + Set(LVar0, kpa_33_ENTRY_1) + Set(LVar2, MODEL_o1250) + Set(LVar3, MODEL_b3_doa) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kpa_33_ENTRY_2) + Set(LVar0, kpa_33_ENTRY_2) + Set(LVar2, MODEL_o1252) + Set(LVar3, MODEL_o1253) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kpa_33_ENTRY_3) + Set(LVar0, kpa_33_ENTRY_3) + Set(LVar2, MODEL_o1258) + Set(LVar3, MODEL_o1259) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(EnableTexPanning, MODEL_o1286, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o1287, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o1289, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o1290, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_EnterMap)) + Wait(1) + Exec(N(EVS_SetupMusic)) + Call(EnableTexPanning, MODEL_o1286, TRUE) + Call(EnableTexPanning, MODEL_o1287, TRUE) + Call(EnableTexPanning, MODEL_o1289, TRUE) + Call(EnableTexPanning, MODEL_o1290, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 20, 20, -20, -20) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( 20, 20, -20, -20) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_3) TEX_PAN_PARAMS_STEP( 20, 20, -20, -20) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_4) TEX_PAN_PARAMS_STEP( 20, 20, -20, -20) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(ScaleModel, MODEL_o1286, EVT_FLOAT(1.02), 1, EVT_FLOAT(1.02)) - EVT_CALL(ScaleModel, MODEL_o1287, EVT_FLOAT(1.02), 1, EVT_FLOAT(1.02)) - EVT_CALL(ScaleModel, MODEL_o1289, EVT_FLOAT(1.02), 1, EVT_FLOAT(1.02)) - EVT_CALL(ScaleModel, MODEL_o1290, EVT_FLOAT(1.02), 1, EVT_FLOAT(1.02)) - EVT_WAIT(10) - EVT_CALL(ScaleModel, MODEL_o1286, EVT_FLOAT(1.0), 1, EVT_FLOAT(1.0)) - EVT_CALL(ScaleModel, MODEL_o1287, EVT_FLOAT(1.0), 1, EVT_FLOAT(1.0)) - EVT_CALL(ScaleModel, MODEL_o1289, EVT_FLOAT(1.0), 1, EVT_FLOAT(1.0)) - EVT_CALL(ScaleModel, MODEL_o1290, EVT_FLOAT(1.0), 1, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(ScaleModel, MODEL_o1286, EVT_FLOAT(0.98), 1, EVT_FLOAT(0.98)) - EVT_CALL(ScaleModel, MODEL_o1287, EVT_FLOAT(0.98), 1, EVT_FLOAT(0.98)) - EVT_CALL(ScaleModel, MODEL_o1289, EVT_FLOAT(0.98), 1, EVT_FLOAT(0.98)) - EVT_CALL(ScaleModel, MODEL_o1290, EVT_FLOAT(0.98), 1, EVT_FLOAT(0.98)) - EVT_WAIT(10) - EVT_END_LOOP - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread + Loop(0) + Call(ScaleModel, MODEL_o1286, Float(1.02), 1, Float(1.02)) + Call(ScaleModel, MODEL_o1287, Float(1.02), 1, Float(1.02)) + Call(ScaleModel, MODEL_o1289, Float(1.02), 1, Float(1.02)) + Call(ScaleModel, MODEL_o1290, Float(1.02), 1, Float(1.02)) + Wait(10) + Call(ScaleModel, MODEL_o1286, Float(1.0), 1, Float(1.0)) + Call(ScaleModel, MODEL_o1287, Float(1.0), 1, Float(1.0)) + Call(ScaleModel, MODEL_o1289, Float(1.0), 1, Float(1.0)) + Call(ScaleModel, MODEL_o1290, Float(1.0), 1, Float(1.0)) + Wait(10) + Call(ScaleModel, MODEL_o1286, Float(0.98), 1, Float(0.98)) + Call(ScaleModel, MODEL_o1287, Float(0.98), 1, Float(0.98)) + Call(ScaleModel, MODEL_o1289, Float(0.98), 1, Float(0.98)) + Call(ScaleModel, MODEL_o1290, Float(0.98), 1, Float(0.98)) + Wait(10) + EndLoop + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_40/kpa_40_1_music.c b/src/world/area_kpa/kpa_40/kpa_40_1_music.c index 2eef548432b..1e8becc9000 100644 --- a/src/world/area_kpa/kpa_40/kpa_40_1_music.c +++ b/src/world/area_kpa/kpa_40/kpa_40_1_music.c @@ -2,12 +2,12 @@ #include "kpa_40.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_40/kpa_40_2_main.c b/src/world/area_kpa/kpa_40/kpa_40_2_main.c index 454f469c30f..368f07af6de 100644 --- a/src/world/area_kpa/kpa_40/kpa_40_2_main.c +++ b/src/world/area_kpa/kpa_40/kpa_40_2_main.c @@ -5,50 +5,50 @@ EvtScript N(EVS_ExitDoors_kpa_52_1) = EVT_EXIT_DOUBLE_DOOR(kpa_40_ENTRY_0, "kpa_ EvtScript N(EVS_ExitWalk_kpa_40_3) = EVT_EXIT_WALK(60, kpa_40_ENTRY_1, "kpa_40", kpa_40_ENTRY_3); EvtScript N(EVS_ExitWalk_kpa_41_3) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(UseExitHeading, 60, kpa_40_ENTRY_2) - EVT_EXEC(ExitWalk) - EVT_SET(AB_KPA_MazeProgress, 1) - EVT_CALL(GotoMap, EVT_PTR("kpa_41"), kpa_41_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(UseExitHeading, 60, kpa_40_ENTRY_2) + Exec(ExitWalk) + Set(AB_KPA_MazeProgress, 1) + Call(GotoMap, Ref("kpa_41"), kpa_41_ENTRY_3) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_52_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_40_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie2, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_41_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_kpa_52_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_40_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie2, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_41_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kpa_40_ENTRY_0) - EVT_SET(LVar0, kpa_40_ENTRY_0) - EVT_SET(LVar2, MODEL_o526) - EVT_SET(LVar3, MODEL_o525) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_DEFAULT - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kpa_40_ENTRY_0) + Set(LVar0, kpa_40_ENTRY_0) + Set(LVar2, MODEL_o526) + Set(LVar3, MODEL_o525) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseDefault + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Exec(N(EVS_EnterMap)) + Wait(1) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_kpa/kpa_41/kpa_41_1_music.c b/src/world/area_kpa/kpa_41/kpa_41_1_music.c index 9caa5dec0e0..675fc345735 100644 --- a/src/world/area_kpa/kpa_41/kpa_41_1_music.c +++ b/src/world/area_kpa/kpa_41/kpa_41_1_music.c @@ -1,12 +1,12 @@ #include "kpa_41.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_41/kpa_41_2_main.c b/src/world/area_kpa/kpa_41/kpa_41_2_main.c index aea42672327..38edc206256 100644 --- a/src/world/area_kpa/kpa_41/kpa_41_2_main.c +++ b/src/world/area_kpa/kpa_41/kpa_41_2_main.c @@ -3,82 +3,82 @@ EvtScript N(EVS_ExitWalk_LowerLeft) = EVT_EXIT_WALK(60, kpa_41_ENTRY_0, "kpa_40", kpa_40_ENTRY_1); EvtScript N(EVS_ExitWalk_LowerRight) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(UseExitHeading, 60, kpa_41_ENTRY_1) - EVT_EXEC(ExitWalk) - EVT_SWITCH(AB_KPA_MazeProgress) - EVT_CASE_OR_EQ(1) - EVT_CASE_OR_EQ(2) - EVT_CASE_OR_EQ(4) - EVT_ADD(AB_KPA_MazeProgress, 1) - EVT_CALL(GotoMap, EVT_PTR("kpa_41"), kpa_41_ENTRY_0) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(0) - EVT_CASE_OR_EQ(3) - EVT_CASE_OR_EQ(5) - EVT_CALL(GotoMap, EVT_PTR("kpa_40"), kpa_40_ENTRY_3) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(UseExitHeading, 60, kpa_41_ENTRY_1) + Exec(ExitWalk) + Switch(AB_KPA_MazeProgress) + CaseOrEq(1) + CaseOrEq(2) + CaseOrEq(4) + Add(AB_KPA_MazeProgress, 1) + Call(GotoMap, Ref("kpa_41"), kpa_41_ENTRY_0) + EndCaseGroup + CaseOrEq(0) + CaseOrEq(3) + CaseOrEq(5) + Call(GotoMap, Ref("kpa_40"), kpa_40_ENTRY_3) + EndCaseGroup + EndSwitch + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_UpperLeft) = EVT_EXIT_WALK(60, kpa_41_ENTRY_3, "kpa_40", kpa_40_ENTRY_2); EvtScript N(EVS_ExitWalk_UpperRight) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(UseExitHeading, 60, kpa_41_ENTRY_2) - EVT_EXEC(ExitWalk) - EVT_SWITCH(AB_KPA_MazeProgress) - EVT_CASE_EQ(5) - EVT_SET(AB_KPA_MazeProgress, 0) - EVT_CALL(GotoMap, EVT_PTR("kpa_102"), kpa_102_ENTRY_0) - EVT_CASE_EQ(3) - EVT_ADD(AB_KPA_MazeProgress, 1) - EVT_CALL(GotoMap, EVT_PTR("kpa_41"), kpa_41_ENTRY_3) - EVT_CASE_OR_EQ(0) - EVT_CASE_OR_EQ(1) - EVT_CASE_OR_EQ(2) - EVT_CASE_OR_EQ(4) - EVT_CALL(GotoMap, EVT_PTR("kpa_40"), kpa_40_ENTRY_3) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(UseExitHeading, 60, kpa_41_ENTRY_2) + Exec(ExitWalk) + Switch(AB_KPA_MazeProgress) + CaseEq(5) + Set(AB_KPA_MazeProgress, 0) + Call(GotoMap, Ref("kpa_102"), kpa_102_ENTRY_0) + CaseEq(3) + Add(AB_KPA_MazeProgress, 1) + Call(GotoMap, Ref("kpa_41"), kpa_41_ENTRY_3) + CaseOrEq(0) + CaseOrEq(1) + CaseOrEq(2) + CaseOrEq(4) + Call(GotoMap, Ref("kpa_40"), kpa_40_ENTRY_3) + EndCaseGroup + EndSwitch + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_LowerLeft)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_LowerRight)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_UpperLeft)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_UpperRight)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili4, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_LowerLeft)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_LowerRight)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_UpperLeft)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_UpperRight)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili4, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kpa_41_ENTRY_2) - EVT_SET(AB_KPA_MazeProgress, 5) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kpa_41_ENTRY_2) + Set(AB_KPA_MazeProgress, 5) + CaseDefault + EndSwitch + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_EXEC(N(EVS_EnterMap)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Exec(N(EVS_EnterMap)) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_kpa/kpa_50/kpa_50_1_music.c b/src/world/area_kpa/kpa_50/kpa_50_1_music.c index df0193d7c14..916406eaa00 100644 --- a/src/world/area_kpa/kpa_50/kpa_50_1_music.c +++ b/src/world/area_kpa/kpa_50/kpa_50_1_music.c @@ -1,13 +1,13 @@ #include "kpa_50.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(ClearAmbientSounds, 250) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_1) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(ClearAmbientSounds, 250) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_1) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_50/kpa_50_2_main.c b/src/world/area_kpa/kpa_50/kpa_50_2_main.c index 4454aed39ba..99f3246e793 100644 --- a/src/world/area_kpa/kpa_50/kpa_50_2_main.c +++ b/src/world/area_kpa/kpa_50/kpa_50_2_main.c @@ -4,40 +4,40 @@ EvtScript N(EVS_ExitWalk_kpa_70_1) = EVT_EXIT_WALK(60, kpa_50_ENTRY_0, "kpa_70", EvtScript N(EVS_ExitDoors_kpa_81_0) = EVT_EXIT_DOUBLE_DOOR(kpa_50_ENTRY_1, "kpa_81", kpa_81_ENTRY_0, COLLIDER_tte, MODEL_o324, MODEL_o322); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_70_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_81_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_70_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_kpa_81_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kpa_50_ENTRY_0) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(kpa_50_ENTRY_1) - EVT_SET(LVar0, kpa_50_ENTRY_1) - EVT_SET(LVar2, MODEL_o324) - EVT_SET(LVar3, MODEL_o322) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kpa_50_ENTRY_0) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseEq(kpa_50_ENTRY_1) + Set(LVar0, kpa_50_ENTRY_1) + Set(LVar2, MODEL_o324) + Set(LVar3, MODEL_o322) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(SetGroupVisibility, MODEL_dw1, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_dw2, MODEL_GROUP_HIDDEN) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Call(SetGroupVisibility, MODEL_dw1, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_dw2, MODEL_GROUP_HIDDEN) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_EnterMap)) + Wait(1) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_kpa/kpa_51/kpa_51_1_music.c b/src/world/area_kpa/kpa_51/kpa_51_1_music.c index 9918007ef31..1cd9739bd1a 100644 --- a/src/world/area_kpa/kpa_51/kpa_51_1_music.c +++ b/src/world/area_kpa/kpa_51/kpa_51_1_music.c @@ -2,12 +2,12 @@ #include "kpa_51.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_51/kpa_51_2_main.c b/src/world/area_kpa/kpa_51/kpa_51_2_main.c index 051831e7474..8d770085b8c 100644 --- a/src/world/area_kpa/kpa_51/kpa_51_2_main.c +++ b/src/world/area_kpa/kpa_51/kpa_51_2_main.c @@ -11,42 +11,42 @@ EvtScript N(EVS_ExitDoors_kpa_32_2) = EVT_EXIT_DOUBLE_DOOR(kpa_51_ENTRY_0, "kpa_ EvtScript N(EVS_ExitDoors_kpa_133_0) = EVT_EXIT_DOUBLE_DOOR(kpa_51_ENTRY_1, "kpa_133", kpa_133_ENTRY_0, COLLIDER_tte, MODEL_o324, MODEL_o322); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_32_2)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_133_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_kpa_32_2)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_kpa_133_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kpa_51_ENTRY_0) - EVT_SET(LVar0, kpa_51_ENTRY_0) - EVT_SET(LVar2, MODEL_o321) - EVT_SET(LVar3, MODEL_o323) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kpa_51_ENTRY_1) - EVT_SET(LVar0, kpa_51_ENTRY_1) - EVT_SET(LVar2, MODEL_o324) - EVT_SET(LVar3, MODEL_o322) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kpa_51_ENTRY_0) + Set(LVar0, kpa_51_ENTRY_0) + Set(LVar2, MODEL_o321) + Set(LVar3, MODEL_o323) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kpa_51_ENTRY_1) + Set(LVar0, kpa_51_ENTRY_1) + Set(LVar2, MODEL_o324) + Set(LVar3, MODEL_o322) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_ttw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_ttw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_EnterMap)) + Wait(1) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_kpa/kpa_52/kpa_52_1_music.c b/src/world/area_kpa/kpa_52/kpa_52_1_music.c index 4c8c9f9869a..b672f30cdfa 100644 --- a/src/world/area_kpa/kpa_52/kpa_52_1_music.c +++ b/src/world/area_kpa/kpa_52/kpa_52_1_music.c @@ -1,12 +1,12 @@ #include "kpa_52.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_52/kpa_52_2_entity.c b/src/world/area_kpa/kpa_52/kpa_52_2_entity.c index 0af1220b2cd..8d74c3a3fd9 100644 --- a/src/world/area_kpa/kpa_52/kpa_52_2_entity.c +++ b/src/world/area_kpa/kpa_52/kpa_52_2_entity.c @@ -11,39 +11,39 @@ s32 N(KeyList_CastleDoor)[] = { }; EvtScript N(EVS_UnlockPrompt_Door) = { - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_SET(GF_KPA52_UnlockedDoor, TRUE) - EVT_CALL(N(GetEntityPosition), MV_PadlockEntityID, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_SET(LVar0, MV_PadlockEntityID) - EVT_CALL(N(RemovePadlock)) - EVT_SET(LVar1, 0) - EVT_WAIT(5) - EVT_CALL(CloseChoicePopup) - EVT_UNBIND - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_40_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte1, 1, 0) - EVT_RETURN - EVT_END + Call(ShowKeyChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) + Call(CloseChoicePopup) + Return + EndIf + IfEq(LVar0, -1) + Call(CloseChoicePopup) + Return + EndIf + Call(RemoveKeyItemAt, LVar1) + Set(GF_KPA52_UnlockedDoor, TRUE) + Call(N(GetEntityPosition), MV_PadlockEntityID, LVar0, LVar1, LVar2) + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Set(LVar0, MV_PadlockEntityID) + Call(N(RemovePadlock)) + Set(LVar1, 0) + Wait(5) + Call(CloseChoicePopup) + Unbind + BindTrigger(Ref(N(EVS_ExitDoors_kpa_40_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte1, 1, 0) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_KPA52_UnlockedDoor, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), 352, 10, -25, 270, MAKE_ENTITY_END) - EVT_SET(MV_PadlockEntityID, LVar0) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_UnlockPrompt_Door)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(KeyList_CastleDoor)), 0, 1) - EVT_ELSE - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_40_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte1, 1, 0) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_KPA52_UnlockedDoor, FALSE) + Call(MakeEntity, Ref(Entity_Padlock), 352, 10, -25, 270, MAKE_ENTITY_END) + Set(MV_PadlockEntityID, LVar0) + BindPadlock(Ref(N(EVS_UnlockPrompt_Door)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), Ref(N(KeyList_CastleDoor)), 0, 1) + Else + BindTrigger(Ref(N(EVS_ExitDoors_kpa_40_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte1, 1, 0) + EndIf + Return + End }; diff --git a/src/world/area_kpa/kpa_52/kpa_52_3_main.c b/src/world/area_kpa/kpa_52/kpa_52_3_main.c index fa30736523f..4e220594687 100644 --- a/src/world/area_kpa/kpa_52/kpa_52_3_main.c +++ b/src/world/area_kpa/kpa_52/kpa_52_3_main.c @@ -8,47 +8,47 @@ EvtScript N(EVS_ExitDoors_kpa_08_0) = EVT_EXIT_DOUBLE_DOOR(kpa_52_ENTRY_2, "kpa_ MAP_RODATA_PAD(1, strings); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_33_2)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_08_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_kpa_33_2)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_kpa_08_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte2, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kpa_52_ENTRY_0) - EVT_SET(LVar0, kpa_52_ENTRY_0) - EVT_SET(LVar2, MODEL_o407) - EVT_SET(LVar3, MODEL_o408) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kpa_52_ENTRY_1) - EVT_SET(LVar0, 1) - EVT_SET(LVar2, MODEL_o410) - EVT_SET(LVar3, MODEL_o409) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kpa_52_ENTRY_2) - EVT_SET(LVar0, 2) - EVT_SET(LVar2, MODEL_o412) - EVT_SET(LVar3, MODEL_o411) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kpa_52_ENTRY_0) + Set(LVar0, kpa_52_ENTRY_0) + Set(LVar2, MODEL_o407) + Set(LVar3, MODEL_o408) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kpa_52_ENTRY_1) + Set(LVar0, 1) + Set(LVar2, MODEL_o410) + Set(LVar3, MODEL_o409) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kpa_52_ENTRY_2) + Set(LVar0, 2) + Set(LVar2, MODEL_o412) + Set(LVar3, MODEL_o411) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_EnterMap)) + Wait(1) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_kpa/kpa_53/kpa_53_1_music.c b/src/world/area_kpa/kpa_53/kpa_53_1_music.c index 586cc3c92c0..8a3262b11bb 100644 --- a/src/world/area_kpa/kpa_53/kpa_53_1_music.c +++ b/src/world/area_kpa/kpa_53/kpa_53_1_music.c @@ -2,12 +2,12 @@ #include "kpa_53.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_53/kpa_53_2_main.c b/src/world/area_kpa/kpa_53/kpa_53_2_main.c index d5d765a1ce7..fbe95fdc011 100644 --- a/src/world/area_kpa/kpa_53/kpa_53_2_main.c +++ b/src/world/area_kpa/kpa_53/kpa_53_2_main.c @@ -12,45 +12,45 @@ EvtScript N(EVS_ExitDoors_kpa_102_1) = EVT_EXIT_DOUBLE_DOOR(kpa_53_ENTRY_0, "kpa EvtScript N(EVS_ExitDoors_kpa_83_0) = EVT_EXIT_DOUBLE_DOOR(kpa_53_ENTRY_1, "kpa_83", kpa_83_ENTRY_0, COLLIDER_tte, MODEL_o324, MODEL_o322); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_102_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_IF_EQ(GF_KPA53_Defeated_PeachImposter, TRUE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_83_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_END_IF - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_kpa_102_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + IfEq(GF_KPA53_Defeated_PeachImposter, TRUE) + BindTrigger(Ref(N(EVS_ExitDoors_kpa_83_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + EndIf + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kpa_53_ENTRY_0) - EVT_SET(LVar0, kpa_53_ENTRY_0) - EVT_SET(LVar2, MODEL_o321) - EVT_SET(LVar3, MODEL_o323) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kpa_53_ENTRY_1) - EVT_SET(LVar0, kpa_53_ENTRY_1) - EVT_SET(LVar2, MODEL_o324) - EVT_SET(LVar3, MODEL_o322) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kpa_53_ENTRY_0) + Set(LVar0, kpa_53_ENTRY_0) + Set(LVar2, MODEL_o321) + Set(LVar3, MODEL_o323) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kpa_53_ENTRY_1) + Set(LVar0, kpa_53_ENTRY_1) + Set(LVar2, MODEL_o324) + Set(LVar3, MODEL_o322) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_ttw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_ttw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_EnterMap)) + Wait(1) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_kpa/kpa_53/kpa_53_3_npc.c b/src/world/area_kpa/kpa_53/kpa_53_3_npc.c index 09fa1daa876..57594ed8349 100644 --- a/src/world/area_kpa/kpa_53/kpa_53_3_npc.c +++ b/src/world/area_kpa/kpa_53/kpa_53_3_npc.c @@ -36,308 +36,308 @@ NpcSettings N(NpcSettings_Duplighost) = { }; EvtScript N(EVS_NpcAI_Duplighost_Flee) = { - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -130) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_IF_GE(LVar1, LVar0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 45, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(20) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 5) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Duplighost_Anim04) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 150) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, -30, 20) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Duplighost_Anim02) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar0, -130) + Loop(0) + Wait(1) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + IfGe(LVar1, LVar0) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, TRUE) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 45, 20, EMOTER_NPC, 0, 0, 0, 0) + Wait(20) + Call(InterpNpcYaw, NPC_SELF, 90, 5) + Call(SetNpcAnimation, NPC_SELF, ANIM_Duplighost_Anim04) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 150) + Call(NpcMoveTo, NPC_SELF, LVar0, -30, 20) + Call(SetNpcAnimation, NPC_SELF, ANIM_Duplighost_Anim02) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcAI_Duplighost_Caught) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetNpcPos, NPC_Follower, LVar2, LVar3, LVar4) - EVT_THREAD - EVT_ADD(LVar4, 15) - EVT_LOOP(8) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar2, LVar3, LVar4, 1, 1, 1, 1) - EVT_WAIT(5) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_Follower, SOUND_GHOST_TRANSFORM, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 1440, 20, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Follower, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtNpc, NPC_Follower, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcPos, NPC_Guardian, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_Follower, NPC_DISPOSE_LOCATION) - EVT_CALL(EnableNpcShadow, NPC_Follower, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_CALL(MakeLerp, -1440, 0, 20, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Duplighost_Anim05, ANIM_Duplighost_Anim02, 0, MSG_CH8_002D) - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 700) - EVT_ADD(LVar0, 30) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Duplighost_Anim04) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, LVar2, 35) - EVT_END_IF - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(GetNpcPos, NPC_Follower, LVar2, LVar3, LVar4) + Thread + Add(LVar4, 15) + Loop(8) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar2, LVar3, LVar4, 1, 1, 1, 1) + Wait(5) + EndLoop + EndThread + Call(PlaySoundAtNpc, NPC_Follower, SOUND_GHOST_TRANSFORM, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 1440, 20, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Follower, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtNpc, NPC_Follower, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) + Call(SetNpcPos, NPC_Guardian, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_Follower, NPC_DISPOSE_LOCATION) + Call(EnableNpcShadow, NPC_Follower, FALSE) + Call(SetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) + Call(SetNpcYaw, NPC_SELF, 270) + Call(MakeLerp, -1440, 0, 20, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_SELF, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_Duplighost_Anim05, ANIM_Duplighost_Anim02, 0, MSG_CH8_002D) + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, 700) + Add(LVar0, 30) + Call(SetNpcAnimation, NPC_SELF, ANIM_Duplighost_Anim04) + Call(NpcMoveTo, NPC_SELF, LVar0, LVar2, 35) + EndIf + Return + End }; EvtScript N(EVS_NpcDefeat_Duplighost) = { - EVT_CALL(RemoveNpc, NPC_Follower) - EVT_CALL(RemoveNpc, NPC_Guardian) - EVT_SET(GF_KPA53_Defeated_PeachImposter, TRUE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_83_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(DoNpcDefeat) - EVT_RETURN - EVT_END + Call(RemoveNpc, NPC_Follower) + Call(RemoveNpc, NPC_Guardian) + Set(GF_KPA53_Defeated_PeachImposter, TRUE) + BindTrigger(Ref(N(EVS_ExitDoors_kpa_83_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + Call(DisablePlayerInput, FALSE) + Call(DoNpcDefeat) + Return + End }; EvtScript N(EVS_NpcInit_Duplighost) = { - EVT_IF_EQ(GF_KPA53_Defeated_PeachImposter, FALSE) - EVT_IF_EQ(GF_KPA53_Met_PeachImposter, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, -120, 0, -30) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Duplighost_Flee))) - EVT_END_IF - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Duplighost))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_KPA53_Defeated_PeachImposter, FALSE) + IfEq(GF_KPA53_Met_PeachImposter, TRUE) + Call(SetNpcPos, NPC_SELF, -120, 0, -30) + Call(SetNpcYaw, NPC_SELF, 270) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcAI_Duplighost_Flee))) + EndIf + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Duplighost))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Follower_FirstTime) = { - EVT_CALL(SetNpcAnimation, NPC_Follower, ANIM_Peach2_RaiseArms) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Follower, ANIM_Peach2_TalkIdle) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_CH8_0023) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(35) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_CH8_0024) - EVT_SET(GF_KPA53_Met_PeachImposter, TRUE) - EVT_CALL(SetSelfVar, 0, 1) - EVT_CALL(SetSelfVar, 1, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_CH8_0025) - EVT_CALL(SetSelfVar, 0, 2) - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_CH8_0026) - EVT_CALL(SetSelfVar, 0, 1) - EVT_END_SWITCH - EVT_CALL(SetNpcAnimation, NPC_Follower, ANIM_Peach2_LowerArms) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Follower, ANIM_Peach1_Idle) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_Follower, ANIM_Peach2_RaiseArms) + Wait(10) + Call(SetNpcAnimation, NPC_Follower, ANIM_Peach2_TalkIdle) + Call(GetSelfVar, 0, LVar0) + Switch(LVar0) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_CH8_0023) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(1) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(35) + Call(SpeakToPlayer, NPC_SELF, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_CH8_0024) + Set(GF_KPA53_Met_PeachImposter, TRUE) + Call(SetSelfVar, 0, 1) + Call(SetSelfVar, 1, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_CH8_0025) + Call(SetSelfVar, 0, 2) + CaseEq(2) + Call(SpeakToPlayer, NPC_SELF, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_CH8_0026) + Call(SetSelfVar, 0, 1) + EndSwitch + Call(SetNpcAnimation, NPC_Follower, ANIM_Peach2_LowerArms) + Wait(10) + Call(SetNpcAnimation, NPC_Follower, ANIM_Peach1_Idle) + Return + End }; EvtScript N(EVS_NpcInteract_Follower) = { - EVT_CALL(SetNpcAnimation, NPC_Follower, ANIM_Peach2_RaiseArms) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Follower, ANIM_Peach2_TalkIdle) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_CH8_0027) - EVT_CALL(SetSelfVar, 0, 1) - EVT_CALL(SetSelfVar, 1, 1) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_CH8_0028) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_Follower, ANIM_Peach2_LowerArms) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Follower, ANIM_Peach1_Idle) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_Follower, ANIM_Peach2_RaiseArms) + Wait(10) + Call(SetNpcAnimation, NPC_Follower, ANIM_Peach2_TalkIdle) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_CH8_0027) + Call(SetSelfVar, 0, 1) + Call(SetSelfVar, 1, 1) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_CH8_0028) + EndIf + Call(SetNpcAnimation, NPC_Follower, ANIM_Peach2_LowerArms) + Wait(10) + Call(SetNpcAnimation, NPC_Follower, ANIM_Peach1_Idle) + Return + End }; EvtScript N(EVS_NpcHit_Guardian_FirstTime) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_PARTNER) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcVar, NPC_Follower, 2, 1) - EVT_CALL(InterpNpcYaw, NPC_Follower, 270, 0) - EVT_CALL(SetNpcAnimation, NPC_Follower, ANIM_Peach2_RaiseArms) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Follower, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_Follower, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_CH8_0029) - EVT_CALL(SetNpcAnimation, NPC_Follower, ANIM_Peach2_LowerArms) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Follower, ANIM_Peach1_Idle) - EVT_CALL(SetNpcVar, NPC_Follower, 2, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseOrEq(ENCOUNTER_TRIGGER_HAMMER) + CaseOrEq(ENCOUNTER_TRIGGER_JUMP) + CaseOrEq(ENCOUNTER_TRIGGER_PARTNER) + Call(DisablePlayerInput, TRUE) + Call(SetNpcVar, NPC_Follower, 2, 1) + Call(InterpNpcYaw, NPC_Follower, 270, 0) + Call(SetNpcAnimation, NPC_Follower, ANIM_Peach2_RaiseArms) + Wait(10) + Call(SetNpcAnimation, NPC_Follower, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_Follower, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_CH8_0029) + Call(SetNpcAnimation, NPC_Follower, ANIM_Peach2_LowerArms) + Wait(10) + Call(SetNpcAnimation, NPC_Follower, ANIM_Peach1_Idle) + Call(SetNpcVar, NPC_Follower, 2, 0) + Call(DisablePlayerInput, FALSE) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_NpcHit_Guardian) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_PARTNER) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcVar, NPC_Follower, 2, 1) - EVT_CALL(InterpNpcYaw, NPC_Follower, 270, 0) - EVT_CALL(SetNpcAnimation, NPC_Follower, ANIM_Peach2_RaiseArms) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Follower, ANIM_Peach2_TalkIdle) - EVT_CALL(GetSelfVar, 0, LVar1) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_Follower, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_CH8_002A) - EVT_CALL(SetSelfVar, 0, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_Follower, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_CH8_002B) - EVT_CALL(SetSelfVar, 0, 2) - EVT_CASE_EQ(2) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 270) - EVT_CALL(SpeakToPlayer, NPC_Follower, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_CH8_002B) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Follower, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_CH8_002C) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 1) - EVT_CALL(BindNpcAI, NPC_Duplighost, EVT_PTR(N(EVS_NpcAI_Duplighost_Caught))) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(SetNpcAnimation, NPC_Follower, ANIM_Peach2_LowerArms) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Follower, ANIM_Peach1_Idle) - EVT_CALL(SetNpcVar, NPC_Follower, 2, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseOrEq(ENCOUNTER_TRIGGER_HAMMER) + CaseOrEq(ENCOUNTER_TRIGGER_JUMP) + CaseOrEq(ENCOUNTER_TRIGGER_PARTNER) + Call(DisablePlayerInput, TRUE) + Call(SetNpcVar, NPC_Follower, 2, 1) + Call(InterpNpcYaw, NPC_Follower, 270, 0) + Call(SetNpcAnimation, NPC_Follower, ANIM_Peach2_RaiseArms) + Wait(10) + Call(SetNpcAnimation, NPC_Follower, ANIM_Peach2_TalkIdle) + Call(GetSelfVar, 0, LVar1) + Switch(LVar1) + CaseEq(0) + Call(SpeakToPlayer, NPC_Follower, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_CH8_002A) + Call(SetSelfVar, 0, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_Follower, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_CH8_002B) + Call(SetSelfVar, 0, 2) + CaseEq(2) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, 270) + Call(SpeakToPlayer, NPC_Follower, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_CH8_002B) + Else + Call(SpeakToPlayer, NPC_Follower, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 0, MSG_CH8_002C) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 1) + Call(BindNpcAI, NPC_Duplighost, Ref(N(EVS_NpcAI_Duplighost_Caught))) + EndIf + EndSwitch + Call(SetNpcAnimation, NPC_Follower, ANIM_Peach2_LowerArms) + Wait(10) + Call(SetNpcAnimation, NPC_Follower, ANIM_Peach1_Idle) + Call(SetNpcVar, NPC_Follower, 2, 0) + Call(DisablePlayerInput, FALSE) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_NpcIdle_Follower) = { - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_CALL(GetSelfVar, 1, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(LVarF, 0) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_SWITCH(LVarF) - EVT_CASE_EQ(0) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LE(LVar0, 700) - EVT_SET(LVarF, 1) - EVT_END_IF - EVT_CASE_EQ(1) - EVT_CALL(GetSelfVar, 2, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_CALL(N(UpdateFollowerPosition), 0, LVar0) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) - EVT_CALL(InterpNpcYaw, NPC_Guardian, LVar0, 0) - EVT_CALL(SetNpcPos, NPC_Guardian, LVar1, LVar2, LVar3) - EVT_IF_LE(LVar1, 100) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Peach1_Idle) - EVT_CALL(SetNpcPos, NPC_SELF, 765, 0, -30) - EVT_CALL(SetNpcPos, NPC_Guardian, 765, 0, -30) - EVT_CALL(SetNpcPos, NPC_Duplighost, 150, 0, -30) - EVT_CALL(SetNpcYaw, NPC_Duplighost, 270) - EVT_CALL(BindNpcAI, NPC_Duplighost, EVT_PTR(N(EVS_NpcAI_Duplighost_Flee))) - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(BindNpcInteract, NPC_Follower, EVT_PTR(N(EVS_NpcInteract_Follower))) - EVT_CALL(SetNpcVar, NPC_Guardian, 0, 0) - EVT_CALL(BindNpcHit, NPC_Guardian, EVT_PTR(N(EVS_NpcHit_Guardian))) - EVT_SET(LVarF, 2) - EVT_END_IF - EVT_IF_GE(LVar1, 765) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Peach1_Idle) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_SET(LVarF, 0) - EVT_END_IF - EVT_CASE_EQ(2) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, 700) - EVT_SET(LVarF, 0) - EVT_END_IF - EVT_END_SWITCH - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Wait(1) + Call(NpcFacePlayer, NPC_SELF, 0) + Call(GetSelfVar, 1, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + EndLoop + Set(LVarF, 0) + Loop(0) + Wait(1) + Switch(LVarF) + CaseEq(0) + Call(NpcFacePlayer, NPC_SELF, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLe(LVar0, 700) + Set(LVarF, 1) + EndIf + CaseEq(1) + Call(GetSelfVar, 2, LVar0) + IfEq(LVar0, 1) + BreakSwitch + EndIf + Call(N(UpdateFollowerPosition), 0, LVar0) + Call(InterpNpcYaw, NPC_SELF, LVar0, 0) + Call(GetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) + Call(InterpNpcYaw, NPC_Guardian, LVar0, 0) + Call(SetNpcPos, NPC_Guardian, LVar1, LVar2, LVar3) + IfLe(LVar1, 100) + Call(SetNpcAnimation, NPC_SELF, ANIM_Peach1_Idle) + Call(SetNpcPos, NPC_SELF, 765, 0, -30) + Call(SetNpcPos, NPC_Guardian, 765, 0, -30) + Call(SetNpcPos, NPC_Duplighost, 150, 0, -30) + Call(SetNpcYaw, NPC_Duplighost, 270) + Call(BindNpcAI, NPC_Duplighost, Ref(N(EVS_NpcAI_Duplighost_Flee))) + Call(SetSelfVar, 0, 0) + Call(BindNpcInteract, NPC_Follower, Ref(N(EVS_NpcInteract_Follower))) + Call(SetNpcVar, NPC_Guardian, 0, 0) + Call(BindNpcHit, NPC_Guardian, Ref(N(EVS_NpcHit_Guardian))) + Set(LVarF, 2) + EndIf + IfGe(LVar1, 765) + Call(SetNpcAnimation, NPC_SELF, ANIM_Peach1_Idle) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Set(LVarF, 0) + EndIf + CaseEq(2) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar0, 700) + Set(LVarF, 0) + EndIf + EndSwitch + EndLoop + Return + End }; EvtScript N(EVS_NpcInit_Follower) = { - EVT_IF_EQ(GF_KPA53_Defeated_PeachImposter, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, 765, 0, -30) - EVT_IF_EQ(GF_KPA53_Met_PeachImposter, FALSE) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Follower_FirstTime))) - EVT_ELSE - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Follower))) - EVT_END_IF - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Follower))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_KPA53_Defeated_PeachImposter, FALSE) + Call(SetNpcPos, NPC_SELF, 765, 0, -30) + IfEq(GF_KPA53_Met_PeachImposter, FALSE) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Follower_FirstTime))) + Else + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Follower))) + EndIf + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Follower))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Guardian) = { - EVT_IF_EQ(GF_KPA53_Defeated_PeachImposter, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, 765, 0, -30) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_IF_EQ(GF_KPA53_Met_PeachImposter, FALSE) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_Guardian_FirstTime))) - EVT_ELSE - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_Guardian))) - EVT_END_IF - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_KPA53_Defeated_PeachImposter, FALSE) + Call(SetNpcPos, NPC_SELF, 765, 0, -30) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) + Call(EnableNpcShadow, NPC_SELF, FALSE) + IfEq(GF_KPA53_Met_PeachImposter, FALSE) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_Guardian_FirstTime))) + Else + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_Guardian))) + EndIf + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_Imposter)[] = { diff --git a/src/world/area_kpa/kpa_53/kpa_53_4_entity.c b/src/world/area_kpa/kpa_53/kpa_53_4_entity.c index 0e6990efe6b..059f5ebcfd6 100644 --- a/src/world/area_kpa/kpa_53/kpa_53_4_entity.c +++ b/src/world/area_kpa/kpa_53/kpa_53_4_entity.c @@ -3,7 +3,7 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), -415, 60, -75, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HeartBlock), -415, 60, -75, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_kpa/kpa_60/kpa_60_1_music.c b/src/world/area_kpa/kpa_60/kpa_60_1_music.c index 51e43d09681..7b1d9dde03a 100644 --- a/src/world/area_kpa/kpa_60/kpa_60_1_music.c +++ b/src/world/area_kpa/kpa_60/kpa_60_1_music.c @@ -1,14 +1,14 @@ #include "kpa_60.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_NE(GB_StoryProgress, STORY_CH8_STAR_SHIP_ACTIVATED) - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_OUTSIDE) - EVT_END_THREAD - EVT_END_IF - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_RETURN - EVT_END + IfNe(GB_StoryProgress, STORY_CH8_STAR_SHIP_ACTIVATED) + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_OUTSIDE) + EndThread + EndIf + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Return + End }; diff --git a/src/world/area_kpa/kpa_60/kpa_60_2_entity.c b/src/world/area_kpa/kpa_60/kpa_60_2_entity.c index 5e81d2f0e6f..70646f48348 100644 --- a/src/world/area_kpa/kpa_60/kpa_60_2_entity.c +++ b/src/world/area_kpa/kpa_60/kpa_60_2_entity.c @@ -10,41 +10,41 @@ s32 N(KeyList_FrontDoor)[] = { }; EvtScript N(EVS_UnlockPrompt_FrontDoor) = { - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_SET(GF_KPA62_UnlockedFrontDoor, TRUE) - EVT_CALL(N(GetEntityPosition), MV_PadLockEntityID, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_SET(LVar0, MV_PadLockEntityID) - EVT_CALL(N(RemovePadlock)) - EVT_SET(LVar1, 0) - EVT_WAIT(5) - EVT_CALL(CloseChoicePopup) - EVT_UNBIND - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_kpa_70_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittn, 1, 0) - EVT_RETURN - EVT_END + Call(ShowKeyChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) + Call(CloseChoicePopup) + Return + EndIf + IfEq(LVar0, -1) + Call(CloseChoicePopup) + Return + EndIf + Call(RemoveKeyItemAt, LVar1) + Set(GF_KPA62_UnlockedFrontDoor, TRUE) + Call(N(GetEntityPosition), MV_PadLockEntityID, LVar0, LVar1, LVar2) + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Set(LVar0, MV_PadLockEntityID) + Call(N(RemovePadlock)) + Set(LVar1, 0) + Wait(5) + Call(CloseChoicePopup) + Unbind + BindTrigger(Ref(N(EVS_ExitDoor_kpa_70_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittn, 1, 0) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_KPA62_UnlockedFrontDoor, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), -200, 10, -207, 0, MAKE_ENTITY_END) - EVT_SET(MV_PadLockEntityID, LVar0) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_UnlockPrompt_FrontDoor)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(KeyList_FrontDoor)), 0, 1) - EVT_ELSE - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_kpa_70_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittn, 1, 0) - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_RedBlock), -532, 145, -59, 0, ITEM_DEEP_FOCUS3, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KPA62_BadgeBlock_DeepFocus3) - EVT_RETURN - EVT_END + IfEq(GF_KPA62_UnlockedFrontDoor, FALSE) + Call(MakeEntity, Ref(Entity_Padlock), -200, 10, -207, 0, MAKE_ENTITY_END) + Set(MV_PadLockEntityID, LVar0) + BindPadlock(Ref(N(EVS_UnlockPrompt_FrontDoor)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), Ref(N(KeyList_FrontDoor)), 0, 1) + Else + BindTrigger(Ref(N(EVS_ExitDoor_kpa_70_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittn, 1, 0) + EndIf + Call(MakeEntity, Ref(Entity_RedBlock), -532, 145, -59, 0, ITEM_DEEP_FOCUS3, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KPA62_BadgeBlock_DeepFocus3) + Return + End }; diff --git a/src/world/area_kpa/kpa_60/kpa_60_3_main.c b/src/world/area_kpa/kpa_60/kpa_60_3_main.c index 993ef424117..f452844d126 100644 --- a/src/world/area_kpa/kpa_60/kpa_60_3_main.c +++ b/src/world/area_kpa/kpa_60/kpa_60_3_main.c @@ -3,193 +3,193 @@ #include "world/common/atomic/TexturePan.inc.c" EvtScript N(EVS_OpenAirshipDockDoor) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitts, SOUND_AIRSHIP_DOCK_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(EnableModel, MODEL_o1616, FALSE) - EVT_CALL(MakeLerp, 0, -10, 20, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o1650, LVar0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 0, 45, 25, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o1650, -10, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_deilitts, SOUND_AIRSHIP_DOCK_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(EnableModel, MODEL_o1616, FALSE) + Call(MakeLerp, 0, -10, 20, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o1650, LVar0, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 0, 45, 25, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o1650, -10, 0, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_CloseAirshipDockDoor) = { - EVT_CALL(MakeLerp, 45, 0, 25, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o1650, -10, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, -10, 0, 20, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o1650, LVar0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(EnableModel, MODEL_o1616, TRUE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitts, SOUND_AIRSHIP_DOCK_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_RETURN - EVT_END + Call(MakeLerp, 45, 0, 25, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o1650, -10, 0, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, -10, 0, 20, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o1650, LVar0, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(EnableModel, MODEL_o1616, TRUE) + Call(PlaySoundAtCollider, COLLIDER_deilitts, SOUND_AIRSHIP_DOCK_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Return + End }; EvtScript N(EVS_ExitDoor_kpa_70_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_SET(LVar0, kpa_60_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittn) - EVT_SET(LVar2, MODEL_o1647) - EVT_SET(LVar3, MODEL_o1646) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kpa_70"), kpa_70_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Set(LVar0, kpa_60_ENTRY_0) + Set(LVar1, COLLIDER_deilittn) + Set(LVar2, MODEL_o1647) + Set(LVar3, MODEL_o1646) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("kpa_70"), kpa_70_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_kpa_1X_Upper) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(UseExitHeading, 60, kpa_60_ENTRY_1) - EVT_EXEC(ExitWalk) - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_CALL(GotoMap, EVT_PTR("kpa_11"), kpa_11_ENTRY_0) - EVT_ELSE - EVT_CALL(GotoMap, EVT_PTR("kpa_10"), kpa_10_ENTRY_0) - EVT_END_IF - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(UseExitHeading, 60, kpa_60_ENTRY_1) + Exec(ExitWalk) + IfEq(GF_KPA16_ShutOffLava, FALSE) + Call(GotoMap, Ref("kpa_11"), kpa_11_ENTRY_0) + Else + Call(GotoMap, Ref("kpa_10"), kpa_10_ENTRY_0) + EndIf + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_kpa_1X_Lower) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(UseExitHeading, 60, kpa_60_ENTRY_2) - EVT_EXEC(ExitWalk) - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_CALL(GotoMap, EVT_PTR("kpa_11"), kpa_11_ENTRY_3) - EVT_ELSE - EVT_CALL(GotoMap, EVT_PTR("kpa_10"), kpa_10_ENTRY_3) - EVT_END_IF - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(UseExitHeading, 60, kpa_60_ENTRY_2) + Exec(ExitWalk) + IfEq(GF_KPA16_ShutOffLava, FALSE) + Call(GotoMap, Ref("kpa_11"), kpa_11_ENTRY_3) + Else + Call(GotoMap, Ref("kpa_10"), kpa_10_ENTRY_3) + EndIf + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoor_kpa_63_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC_WAIT(N(EVS_OpenAirshipDockDoor)) - EVT_WAIT(15) - EVT_CALL(UseExitHeading, 60, kpa_60_ENTRY_3) - EVT_EXEC(ExitWalk) - EVT_CALL(GotoMap, EVT_PTR("kpa_63"), kpa_63_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + ExecWait(N(EVS_OpenAirshipDockDoor)) + Wait(15) + Call(UseExitHeading, 60, kpa_60_ENTRY_3) + Exec(ExitWalk) + Call(GotoMap, Ref("kpa_63"), kpa_63_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_EnterFromAirshipDock) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetPlayerPos, -30, 21, 590) - EVT_CALL(SetNpcPos, NPC_PARTNER, -30, 21, 590) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(EnableModel, MODEL_o1616, FALSE) - EVT_CALL(TranslateModel, MODEL_o1650, -10, 0, 45) - EVT_THREAD - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, 75, 580, 0) - EVT_END_THREAD - EVT_WAIT(15) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(3.0)) - EVT_CALL(NpcMoveTo, NPC_PARTNER, 65, 600, 0) - EVT_EXEC_WAIT(N(EVS_CloseAirshipDockDoor)) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(SetPlayerPos, -30, 21, 590) + Call(SetNpcPos, NPC_PARTNER, -30, 21, 590) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(EnableModel, MODEL_o1616, FALSE) + Call(TranslateModel, MODEL_o1650, -10, 0, 45) + Thread + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, 75, 580, 0) + EndThread + Wait(15) + Call(SetNpcSpeed, NPC_PARTNER, Float(3.0)) + Call(NpcMoveTo, NPC_PARTNER, 65, 600, 0) + ExecWait(N(EVS_CloseAirshipDockDoor)) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_1X_Upper)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_1X_Lower)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_kpa_63_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitts, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_1X_Upper)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_1X_Lower)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoor_kpa_63_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitts, 1, 0) + Return + End }; // hide parts of the map not visibile from ground level. these include princess peach's castle, // the castle grounds, and the large clown head hemisphere EvtScript N(EVS_HideDistalGeometry) = { - EVT_CALL(EnableGroup, MODEL_g390, FALSE) - EVT_CALL(EnableGroup, MODEL_g391, FALSE) - EVT_CALL(EnableGroup, MODEL_g402, FALSE) - EVT_RETURN - EVT_END + Call(EnableGroup, MODEL_g390, FALSE) + Call(EnableGroup, MODEL_g391, FALSE) + Call(EnableGroup, MODEL_g402, FALSE) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kpa_60_ENTRY_0) - EVT_EXEC_WAIT(N(EVS_HideDistalGeometry)) - EVT_SET(LVar2, MODEL_o1647) - EVT_SET(LVar3, MODEL_o1646) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kpa_60_ENTRY_3) - EVT_EXEC_WAIT(N(EVS_HideDistalGeometry)) - EVT_THREAD - EVT_EXEC_WAIT(N(EVS_EnterFromAirshipDock)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_THREAD - EVT_CASE_EQ(kpa_60_ENTRY_4) - EVT_EXEC(N(EVS_Scene_Arrival)) - EVT_CASE_EQ(kpa_60_ENTRY_5) - EVT_EXEC(N(EVS_Scene_Departure)) - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(N(EVS_HideDistalGeometry)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kpa_60_ENTRY_0) + ExecWait(N(EVS_HideDistalGeometry)) + Set(LVar2, MODEL_o1647) + Set(LVar3, MODEL_o1646) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kpa_60_ENTRY_3) + ExecWait(N(EVS_HideDistalGeometry)) + Thread + ExecWait(N(EVS_EnterFromAirshipDock)) + Exec(N(EVS_BindExitTriggers)) + EndThread + CaseEq(kpa_60_ENTRY_4) + Exec(N(EVS_Scene_Arrival)) + CaseEq(kpa_60_ENTRY_5) + Exec(N(EVS_Scene_Departure)) + CaseDefault + ExecWait(N(EVS_HideDistalGeometry)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + EndSwitch + Return + End }; EvtScript N(EVS_TexPan_Lava) = { - EVT_THREAD + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_0) TEX_PAN_PARAMS_STEP( -400, 0, -800, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 1, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_o1508, TEX_PANNER_0) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetTexPanner, MODEL_o1508, TEX_PANNER_0) + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -199,28 +199,28 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_SET(GF_MAP_BowsersCastle, TRUE) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_CALL(EnableGroup, MODEL_after, FALSE) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_ELSE - EVT_CALL(EnableGroup, MODEL_before, FALSE) - EVT_END_IF - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1508, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilie, SURFACE_TYPE_LAVA) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_END_THREAD - EVT_END_IF - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Set(GF_MAP_BowsersCastle, TRUE) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_EnterMap)) + IfEq(GF_KPA16_ShutOffLava, FALSE) + Call(EnableGroup, MODEL_after, FALSE) + Exec(N(EVS_TexPan_Lava)) + Else + Call(EnableGroup, MODEL_before, FALSE) + EndIf + IfEq(GF_KPA16_ShutOffLava, FALSE) + Thread + Wait(3) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1508, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilie, SURFACE_TYPE_LAVA) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + EndThread + EndIf + Return + End }; diff --git a/src/world/area_kpa/kpa_60/kpa_60_4_scenes.c b/src/world/area_kpa/kpa_60/kpa_60_4_scenes.c index b320ecb0d82..520ea9c64ef 100644 --- a/src/world/area_kpa/kpa_60/kpa_60_4_scenes.c +++ b/src/world/area_kpa/kpa_60/kpa_60_4_scenes.c @@ -1,18 +1,18 @@ #include "kpa_60.h" EvtScript N(EVS_SetStarshipPosRot) = { - EVT_LOOP(0) - EVT_CALL(TranslateGroup, MODEL_g405, MV_Starship_PosX, MV_Starship_PosY, MV_Starship_PosZ) - EVT_CALL(RotateGroup, MODEL_g405, MV_Starship_Yaw, 0, 1, 0) - EVT_CALL(GetModelCenter, MODEL_o1638) - EVT_SUB(LVar0, 10) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(TranslateGroup, MODEL_g405, MV_Starship_PosX, MV_Starship_PosY, MV_Starship_PosZ) + Call(RotateGroup, MODEL_g405, MV_Starship_Yaw, 0, 1, 0) + Call(GetModelCenter, MODEL_o1638) + Sub(LVar0, 10) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; Vec3f N(FlightPath_Arrival)[] = { @@ -22,45 +22,45 @@ Vec3f N(FlightPath_Arrival)[] = { }; EvtScript N(EVS_Scene_Arrival) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_SET(MV_Starship_Yaw, 0) - EVT_SET(MV_Starship_PosX, 0) - EVT_SET(MV_Starship_PosY, 0) - EVT_SET(MV_Starship_PosZ, 0) - EVT_EXEC(N(EVS_SetStarshipPosRot)) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 30, 16, 4096) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, -70, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, -70, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(PlaySound, SOUND_STARSHIP_FLY_AWAY) - EVT_CALL(LoadPath, 45, EVT_PTR(N(FlightPath_Arrival)), ARRAY_COUNT(N(FlightPath_Arrival)), EASING_LINEAR) - EVT_LABEL(90) - EVT_CALL(GetNextPathPos) - EVT_SET(MV_Starship_PosX, LVar1) - EVT_SET(MV_Starship_PosY, LVar2) - EVT_SET(MV_Starship_PosZ, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(90) - EVT_END_IF - EVT_WAIT(20) - EVT_IF_EQ(GF_StartedChapter8, FALSE) - EVT_WAIT(15) - EVT_SET(GF_StartedChapter8, TRUE) - EVT_CALL(FadeOutMusic, 0, 1500) - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_22"), kmr_22_ENTRY_8, TRANSITION_BEGIN_OR_END_CHAPTER) - EVT_WAIT(100) - EVT_RETURN - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("kpa_63"), kpa_63_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Set(MV_Starship_Yaw, 0) + Set(MV_Starship_PosX, 0) + Set(MV_Starship_PosY, 0) + Set(MV_Starship_PosZ, 0) + Exec(N(EVS_SetStarshipPosRot)) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 30, 16, 4096) + Call(UseSettingsFrom, CAM_DEFAULT, 0, -70, 0) + Call(SetPanTarget, CAM_DEFAULT, 0, -70, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(PlaySound, SOUND_STARSHIP_FLY_AWAY) + Call(LoadPath, 45, Ref(N(FlightPath_Arrival)), ARRAY_COUNT(N(FlightPath_Arrival)), EASING_LINEAR) + Label(90) + Call(GetNextPathPos) + Set(MV_Starship_PosX, LVar1) + Set(MV_Starship_PosY, LVar2) + Set(MV_Starship_PosZ, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(90) + EndIf + Wait(20) + IfEq(GF_StartedChapter8, FALSE) + Wait(15) + Set(GF_StartedChapter8, TRUE) + Call(FadeOutMusic, 0, 1500) + Call(GotoMapSpecial, Ref("kmr_22"), kmr_22_ENTRY_8, TRANSITION_BEGIN_OR_END_CHAPTER) + Wait(100) + Return + EndIf + Call(GotoMap, Ref("kpa_63"), kpa_63_ENTRY_1) + Wait(100) + Return + End }; Vec3f N(FlightPath_Departure)[] = { @@ -71,38 +71,38 @@ Vec3f N(FlightPath_Departure)[] = { }; EvtScript N(EVS_Scene_Departure) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(InterpPlayerYaw, 180, 1) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 270) - EVT_SET(MV_Starship_Yaw, 180) - EVT_SET(MV_Starship_PosX, -120) - EVT_SET(MV_Starship_PosY, 160) - EVT_SET(MV_Starship_PosZ, -970) - EVT_EXEC(N(EVS_SetStarshipPosRot)) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 30, 16, 4096) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, -70, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, -70, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_CALL(PlaySound, SOUND_STARSHIP_FLY_TOWARD) - EVT_CALL(LoadPath, 45, EVT_PTR(N(FlightPath_Departure)), ARRAY_COUNT(N(FlightPath_Departure)), EASING_LINEAR) - EVT_LABEL(90) - EVT_CALL(GetNextPathPos) - EVT_SET(MV_Starship_PosX, LVar1) - EVT_SET(MV_Starship_PosY, LVar2) - EVT_SET(MV_Starship_PosZ, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(90) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(40) - EVT_CALL(GotoMap, EVT_PTR("hos_20"), hos_20_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(InterpPlayerYaw, 180, 1) + Call(SetNpcYaw, NPC_PARTNER, 270) + Set(MV_Starship_Yaw, 180) + Set(MV_Starship_PosX, -120) + Set(MV_Starship_PosY, 160) + Set(MV_Starship_PosZ, -970) + Exec(N(EVS_SetStarshipPosRot)) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 30, 16, 4096) + Call(UseSettingsFrom, CAM_DEFAULT, 0, -70, 0) + Call(SetPanTarget, CAM_DEFAULT, 0, -70, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Call(PlaySound, SOUND_STARSHIP_FLY_TOWARD) + Call(LoadPath, 45, Ref(N(FlightPath_Departure)), ARRAY_COUNT(N(FlightPath_Departure)), EASING_LINEAR) + Label(90) + Call(GetNextPathPos) + Set(MV_Starship_PosX, LVar1) + Set(MV_Starship_PosY, LVar2) + Set(MV_Starship_PosZ, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(90) + EndIf + EndThread + Wait(40) + Call(GotoMap, Ref("hos_20"), hos_20_ENTRY_2) + Wait(100) + Return + End }; diff --git a/src/world/area_kpa/kpa_61/kpa_61_1_music.c b/src/world/area_kpa/kpa_61/kpa_61_1_music.c index 50a230a6385..75aa5d493da 100644 --- a/src/world/area_kpa/kpa_61/kpa_61_1_music.c +++ b/src/world/area_kpa/kpa_61/kpa_61_1_music.c @@ -1,12 +1,12 @@ #include "kpa_61.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_OUTSIDE) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_OUTSIDE) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_61/kpa_61_2_main.c b/src/world/area_kpa/kpa_61/kpa_61_2_main.c index 08748826528..d518989c513 100644 --- a/src/world/area_kpa/kpa_61/kpa_61_2_main.c +++ b/src/world/area_kpa/kpa_61/kpa_61_2_main.c @@ -6,79 +6,79 @@ EvtScript N(EVS_ExitDoors_kpa_82_1) = EVT_EXIT_DOUBLE_DOOR(kpa_61_ENTRY_0, "kpa_ EvtScript N(EVS_ExitDoors_kpa_33_1) = EVT_EXIT_DOUBLE_DOOR(kpa_61_ENTRY_1, "kpa_33", kpa_33_ENTRY_1, COLLIDER_ttsw, MODEL_o37, MODEL_o38); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_82_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tts, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_33_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttsw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_kpa_82_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tts, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_kpa_33_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttsw, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kpa_61_ENTRY_0) - EVT_SET(LVar0, kpa_61_ENTRY_0) - EVT_SET(LVar2, MODEL_o34) - EVT_SET(LVar3, MODEL_o33) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kpa_61_ENTRY_1) - EVT_SET(LVar0, kpa_61_ENTRY_1) - EVT_SET(LVar2, MODEL_o37) - EVT_SET(LVar3, MODEL_o38) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kpa_61_ENTRY_0) + Set(LVar0, kpa_61_ENTRY_0) + Set(LVar2, MODEL_o34) + Set(LVar3, MODEL_o33) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kpa_61_ENTRY_1) + Set(LVar0, kpa_61_ENTRY_1) + Set(LVar2, MODEL_o37) + Set(LVar3, MODEL_o38) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + Return + End }; EvtScript N(EVS_TexPan_Clouds) = { - EVT_CALL(EnableTexPanning, MODEL_kumo1, TRUE) - EVT_CALL(EnableTexPanning, MODEL_kumo2, TRUE) - EVT_CALL(EnableTexPanning, MODEL_kumo3, TRUE) - EVT_CALL(EnableTexPanning, MODEL_kumo4, TRUE) - EVT_THREAD + Call(EnableTexPanning, MODEL_kumo1, TRUE) + Call(EnableTexPanning, MODEL_kumo2, TRUE) + Call(EnableTexPanning, MODEL_kumo3, TRUE) + Call(EnableTexPanning, MODEL_kumo4, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( -90, 0, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( -130, 0, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_3) TEX_PAN_PARAMS_STEP( -120, 0, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_4) TEX_PAN_PARAMS_STEP( -70, 0, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_EXEC(N(EVS_TexPan_Clouds)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_EnterMap)) + Wait(1) + Exec(N(EVS_TexPan_Clouds)) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_kpa/kpa_61/kpa_61_4_entity.c b/src/world/area_kpa/kpa_61/kpa_61_4_entity.c index e5d50a67ca4..f3d8dfa00d5 100644 --- a/src/world/area_kpa/kpa_61/kpa_61_4_entity.c +++ b/src/world/area_kpa/kpa_61/kpa_61_4_entity.c @@ -2,13 +2,13 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -225, -100, 175, 0, ITEM_SUPER_SHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KPA61_ItemBlock_SuperShroomA) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 60, -100, 60, 0, ITEM_MAPLE_SYRUP, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KPA61_ItemBlock_MapleSyrup) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 575, -100, 60, 0, ITEM_SUPER_SHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KPA61_ItemBlock_SuperShroomB) - EVT_CALL(MakeItemEntity, ITEM_JAMMIN_JELLY, 1070, -40, 320, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KPA61_Item_JamminJelly) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_YellowBlock), -225, -100, 175, 0, ITEM_SUPER_SHROOM, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KPA61_ItemBlock_SuperShroomA) + Call(MakeEntity, Ref(Entity_YellowBlock), 60, -100, 60, 0, ITEM_MAPLE_SYRUP, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KPA61_ItemBlock_MapleSyrup) + Call(MakeEntity, Ref(Entity_YellowBlock), 575, -100, 60, 0, ITEM_SUPER_SHROOM, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KPA61_ItemBlock_SuperShroomB) + Call(MakeItemEntity, ITEM_JAMMIN_JELLY, 1070, -40, 320, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KPA61_Item_JamminJelly) + Return + End }; diff --git a/src/world/area_kpa/kpa_62/kpa_62_1_music.c b/src/world/area_kpa/kpa_62/kpa_62_1_music.c index d158320dee6..dd0aa34ee8c 100644 --- a/src/world/area_kpa/kpa_62/kpa_62_1_music.c +++ b/src/world/area_kpa/kpa_62/kpa_62_1_music.c @@ -1,17 +1,17 @@ #include "kpa_62.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_6) - EVT_ELSE - EVT_CALL(ClearAmbientSounds, 250) - EVT_END_IF - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_OUTSIDE) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + IfEq(GF_KPA16_ShutOffLava, FALSE) + Call(PlayAmbientSounds, AMBIENT_LAVA_6) + Else + Call(ClearAmbientSounds, 250) + EndIf + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_OUTSIDE) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_62/kpa_62_2_entity.c b/src/world/area_kpa/kpa_62/kpa_62_2_entity.c index e384f96bead..84751c0c9b2 100644 --- a/src/world/area_kpa/kpa_62/kpa_62_2_entity.c +++ b/src/world/area_kpa/kpa_62/kpa_62_2_entity.c @@ -10,41 +10,41 @@ s32 N(KeyList_FrontDoor)[] = { }; EvtScript N(EVS_UnlockPrompt_FrontDoor) = { - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_SET(GF_KPA62_UnlockedFrontDoor, TRUE) - EVT_CALL(N(GetEntityPosition), MV_PadLockEntityID, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_SET(LVar0, MV_PadLockEntityID) - EVT_CALL(N(RemovePadlock)) - EVT_SET(LVar1, 0) - EVT_WAIT(5) - EVT_CALL(CloseChoicePopup) - EVT_UNBIND - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_70_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittn, 1, 0) - EVT_RETURN - EVT_END + Call(ShowKeyChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) + Call(CloseChoicePopup) + Return + EndIf + IfEq(LVar0, -1) + Call(CloseChoicePopup) + Return + EndIf + Call(RemoveKeyItemAt, LVar1) + Set(GF_KPA62_UnlockedFrontDoor, TRUE) + Call(N(GetEntityPosition), MV_PadLockEntityID, LVar0, LVar1, LVar2) + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Set(LVar0, MV_PadLockEntityID) + Call(N(RemovePadlock)) + Set(LVar1, 0) + Wait(5) + Call(CloseChoicePopup) + Unbind + BindTrigger(Ref(N(EVS_ExitDoors_kpa_70_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittn, 1, 0) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_KPA62_UnlockedFrontDoor, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), -200, 10, -207, 0, MAKE_ENTITY_END) - EVT_SET(MV_PadLockEntityID, LVar0) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_UnlockPrompt_FrontDoor)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(KeyList_FrontDoor)), 0, 1) - EVT_ELSE - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_70_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittn, 1, 0) - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_RedBlock), -532, 145, -59, 0, ITEM_DEEP_FOCUS3, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KPA62_BadgeBlock_DeepFocus3) - EVT_RETURN - EVT_END + IfEq(GF_KPA62_UnlockedFrontDoor, FALSE) + Call(MakeEntity, Ref(Entity_Padlock), -200, 10, -207, 0, MAKE_ENTITY_END) + Set(MV_PadLockEntityID, LVar0) + BindPadlock(Ref(N(EVS_UnlockPrompt_FrontDoor)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), Ref(N(KeyList_FrontDoor)), 0, 1) + Else + BindTrigger(Ref(N(EVS_ExitDoors_kpa_70_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittn, 1, 0) + EndIf + Call(MakeEntity, Ref(Entity_RedBlock), -532, 145, -59, 0, ITEM_DEEP_FOCUS3, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KPA62_BadgeBlock_DeepFocus3) + Return + End }; diff --git a/src/world/area_kpa/kpa_62/kpa_62_3_main.c b/src/world/area_kpa/kpa_62/kpa_62_3_main.c index 6ea2b268d72..6b32397ce7c 100644 --- a/src/world/area_kpa/kpa_62/kpa_62_3_main.c +++ b/src/world/area_kpa/kpa_62/kpa_62_3_main.c @@ -3,195 +3,195 @@ #include "world/common/atomic/TexturePan.inc.c" EvtScript N(EVS_OpenAirshipDockDoor) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitts, SOUND_AIRSHIP_DOCK_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(EnableModel, MODEL_o1616, FALSE) - EVT_CALL(MakeLerp, 0, -10, 20, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o1650, LVar0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 0, 45, 25, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o1650, -10, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_deilitts, SOUND_AIRSHIP_DOCK_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(EnableModel, MODEL_o1616, FALSE) + Call(MakeLerp, 0, -10, 20, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o1650, LVar0, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 0, 45, 25, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o1650, -10, 0, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_CloseAirshipDockDoor) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitts, SOUND_AIRSHIP_DOCK_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 45, 0, 25, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o1650, -10, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, -10, 0, 20, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o1650, LVar0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(EnableModel, MODEL_o1616, TRUE) - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_deilitts, SOUND_AIRSHIP_DOCK_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 45, 0, 25, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o1650, -10, 0, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, -10, 0, 20, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o1650, LVar0, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(EnableModel, MODEL_o1616, TRUE) + Return + End }; EvtScript N(EVS_ExitDoors_kpa_70_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_SET(LVar0, kpa_62_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittn) - EVT_SET(LVar2, MODEL_o1647) - EVT_SET(LVar3, MODEL_o1646) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kpa_70"), kpa_70_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Set(LVar0, kpa_62_ENTRY_0) + Set(LVar1, COLLIDER_deilittn) + Set(LVar2, MODEL_o1647) + Set(LVar3, MODEL_o1646) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("kpa_70"), kpa_70_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_kpa_1X_Upper) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(UseExitHeading, 60, kpa_62_ENTRY_1) - EVT_EXEC(ExitWalk) - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_CALL(GotoMap, EVT_PTR("kpa_11"), kpa_11_ENTRY_0) - EVT_ELSE - EVT_CALL(GotoMap, EVT_PTR("kpa_10"), kpa_10_ENTRY_0) - EVT_END_IF - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(UseExitHeading, 60, kpa_62_ENTRY_1) + Exec(ExitWalk) + IfEq(GF_KPA16_ShutOffLava, FALSE) + Call(GotoMap, Ref("kpa_11"), kpa_11_ENTRY_0) + Else + Call(GotoMap, Ref("kpa_10"), kpa_10_ENTRY_0) + EndIf + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_kpa_1X_Lower) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(UseExitHeading, 60, kpa_62_ENTRY_2) - EVT_EXEC(ExitWalk) - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_CALL(GotoMap, EVT_PTR("kpa_11"), kpa_11_ENTRY_3) - EVT_ELSE - EVT_CALL(GotoMap, EVT_PTR("kpa_10"), kpa_10_ENTRY_3) - EVT_END_IF - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(UseExitHeading, 60, kpa_62_ENTRY_2) + Exec(ExitWalk) + IfEq(GF_KPA16_ShutOffLava, FALSE) + Call(GotoMap, Ref("kpa_11"), kpa_11_ENTRY_3) + Else + Call(GotoMap, Ref("kpa_10"), kpa_10_ENTRY_3) + EndIf + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoor_kpa_63_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC_WAIT(N(EVS_OpenAirshipDockDoor)) - EVT_WAIT(15) - EVT_CALL(UseExitHeading, 60, kpa_62_ENTRY_3) - EVT_EXEC(ExitWalk) - EVT_CALL(GotoMap, EVT_PTR("kpa_63"), kpa_63_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + ExecWait(N(EVS_OpenAirshipDockDoor)) + Wait(15) + Call(UseExitHeading, 60, kpa_62_ENTRY_3) + Exec(ExitWalk) + Call(GotoMap, Ref("kpa_63"), kpa_63_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_EnterFromAirshipDock) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetPlayerPos, -30, 21, 590) - EVT_CALL(SetNpcPos, NPC_PARTNER, -30, 21, 590) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(EnableModel, MODEL_o1616, FALSE) - EVT_CALL(TranslateModel, MODEL_o1650, -10, 0, 45) - EVT_THREAD - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, 75, 580, 0) - EVT_END_THREAD - EVT_WAIT(15) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(3.0)) - EVT_CALL(NpcMoveTo, NPC_PARTNER, 65, 600, 0) - EVT_EXEC_WAIT(N(EVS_CloseAirshipDockDoor)) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(SetPlayerPos, -30, 21, 590) + Call(SetNpcPos, NPC_PARTNER, -30, 21, 590) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(EnableModel, MODEL_o1616, FALSE) + Call(TranslateModel, MODEL_o1650, -10, 0, 45) + Thread + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, 75, 580, 0) + EndThread + Wait(15) + Call(SetNpcSpeed, NPC_PARTNER, Float(3.0)) + Call(NpcMoveTo, NPC_PARTNER, 65, 600, 0) + ExecWait(N(EVS_CloseAirshipDockDoor)) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_1X_Upper)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_1X_Lower)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_kpa_63_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitts, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_1X_Upper)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_1X_Lower)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoor_kpa_63_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitts, 1, 0) + Return + End }; EvtScript N(EVS_DisableLavaCollision) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1710, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1508, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1705, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1710, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1508, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1705, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kpa_62_ENTRY_0) - EVT_EXEC_WAIT(N(EVS_DisableLavaCollision)) - EVT_SET(LVar2, MODEL_o1647) - EVT_SET(LVar3, MODEL_o1646) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kpa_62_ENTRY_1) - EVT_EXEC_WAIT(N(EVS_DisableLavaCollision)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_CASE_EQ(kpa_62_ENTRY_2) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_CASE_EQ(kpa_62_ENTRY_3) - EVT_EXEC_WAIT(N(EVS_DisableLavaCollision)) - EVT_THREAD - EVT_EXEC_WAIT(N(EVS_EnterFromAirshipDock)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_THREAD - EVT_CASE_DEFAULT - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kpa_62_ENTRY_0) + ExecWait(N(EVS_DisableLavaCollision)) + Set(LVar2, MODEL_o1647) + Set(LVar3, MODEL_o1646) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kpa_62_ENTRY_1) + ExecWait(N(EVS_DisableLavaCollision)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + CaseEq(kpa_62_ENTRY_2) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + CaseEq(kpa_62_ENTRY_3) + ExecWait(N(EVS_DisableLavaCollision)) + Thread + ExecWait(N(EVS_EnterFromAirshipDock)) + Exec(N(EVS_BindExitTriggers)) + EndThread + CaseDefault + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + EndSwitch + Return + End }; EvtScript N(EVS_TexPan_Lava) = { - EVT_THREAD + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_0) TEX_PAN_PARAMS_STEP( -400, 0, -800, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 1, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_o1508, TEX_PANNER_0) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetTexPanner, MODEL_o1508, TEX_PANNER_0) + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -202,33 +202,33 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_SET(GF_MAP_BowsersCastle, TRUE) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_CALL(EnableGroup, MODEL_after, FALSE) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_ELSE - EVT_CALL(EnableGroup, MODEL_before, FALSE) - EVT_END_IF - EVT_IF_EQ(GF_KPA16_ShutOffLava, FALSE) - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1508, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilie, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1705, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1706, SURFACE_TYPE_LAVA) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_END_THREAD - EVT_END_IF - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Set(GF_MAP_BowsersCastle, TRUE) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_EnterMap)) + Exec(N(EVS_SetupMusic)) + IfEq(GF_KPA16_ShutOffLava, FALSE) + Call(EnableGroup, MODEL_after, FALSE) + Exec(N(EVS_TexPan_Lava)) + Else + Call(EnableGroup, MODEL_before, FALSE) + EndIf + IfEq(GF_KPA16_ShutOffLava, FALSE) + Thread + Wait(3) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1508, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilie, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1705, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1706, SURFACE_TYPE_LAVA) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + EndThread + EndIf + Return + End }; diff --git a/src/world/area_kpa/kpa_63/kpa_63_1_music.c b/src/world/area_kpa/kpa_63/kpa_63_1_music.c index 77d1f7b4ba9..0445a6095bf 100644 --- a/src/world/area_kpa/kpa_63/kpa_63_1_music.c +++ b/src/world/area_kpa/kpa_63/kpa_63_1_music.c @@ -1,27 +1,27 @@ #include "kpa_63.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetLoadType, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_OUTSIDE) - EVT_END_THREAD - EVT_CALL(ClearAmbientSounds, 250) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kpa_63_ENTRY_0) - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_OUTSIDE) - EVT_END_THREAD - EVT_END_IF - EVT_CALL(ClearAmbientSounds, 250) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_RETURN - EVT_END + Call(GetLoadType, LVar0) + IfEq(LVar0, 1) + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_OUTSIDE) + EndThread + Call(ClearAmbientSounds, 250) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Return + EndIf + Call(GetEntryID, LVar0) + IfEq(LVar0, kpa_63_ENTRY_0) + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_OUTSIDE) + EndThread + EndIf + Call(ClearAmbientSounds, 250) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Return + End }; diff --git a/src/world/area_kpa/kpa_63/kpa_63_2_entity.c b/src/world/area_kpa/kpa_63/kpa_63_2_entity.c index 8ff5a0a3c5c..a44c6506dcb 100644 --- a/src/world/area_kpa/kpa_63/kpa_63_2_entity.c +++ b/src/world/area_kpa/kpa_63/kpa_63_2_entity.c @@ -2,7 +2,7 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 120, 60, 90, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_SavePoint), 120, 60, 90, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_kpa/kpa_63/kpa_63_3_main.c b/src/world/area_kpa/kpa_63/kpa_63_3_main.c index 7e342dd3be7..e868c89dc4d 100644 --- a/src/world/area_kpa/kpa_63/kpa_63_3_main.c +++ b/src/world/area_kpa/kpa_63/kpa_63_3_main.c @@ -1,89 +1,89 @@ #include "kpa_63.h" EvtScript N(EVS_OpenHangerDoor) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_tts, SOUND_AIRSHIP_DOCK_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 100, 0, 20, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar5, LVar0) - EVT_MULF(LVar5, EVT_FLOAT(0.01)) - EVT_CALL(ScaleGroup, MODEL_g75, LVar5, 1, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_tts, SOUND_AIRSHIP_DOCK_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 100, 0, 20, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + SetF(LVar5, LVar0) + MulF(LVar5, Float(0.01)) + Call(ScaleGroup, MODEL_g75, LVar5, 1, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_CloseHangerDoor) = { - EVT_CALL(MakeLerp, 0, 100, 20, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar5, LVar0) - EVT_MULF(LVar5, EVT_FLOAT(0.01)) - EVT_CALL(ScaleGroup, MODEL_g75, LVar5, 1, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_tts, SOUND_AIRSHIP_DOCK_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_RETURN - EVT_END + Call(MakeLerp, 0, 100, 20, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + SetF(LVar5, LVar0) + MulF(LVar5, Float(0.01)) + Call(ScaleGroup, MODEL_g75, LVar5, 1, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_tts, SOUND_AIRSHIP_DOCK_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Return + End }; EvtScript N(EVS_ExitDoor_kpa_62_3) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC(N(EVS_OpenHangerDoor)) - EVT_WAIT(15) - EVT_CALL(UseExitHeading, 60, kpa_63_ENTRY_0) - EVT_EXEC(ExitWalk) - EVT_CALL(GotoMap, EVT_PTR("kpa_62"), kpa_62_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Exec(N(EVS_OpenHangerDoor)) + Wait(15) + Call(UseExitHeading, 60, kpa_63_ENTRY_0) + Exec(ExitWalk) + Call(GotoMap, Ref("kpa_62"), kpa_62_ENTRY_3) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_kpa_62_3)), TRIGGER_WALL_PRESS_A, COLLIDER_tts, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoor_kpa_62_3)), TRIGGER_WALL_PRESS_A, COLLIDER_tts, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar0) - EVT_IF_EQ(LVar0, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kpa_63_ENTRY_1) - EVT_EXEC(N(EVS_Starship_Arrive)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_ELSE - EVT_EXEC(N(EVS_CloseHangerDoor)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetLoadType, LVar0) + IfEq(LVar0, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(GetEntryID, LVar0) + IfEq(LVar0, kpa_63_ENTRY_1) + Exec(N(EVS_Starship_Arrive)) + Exec(N(EVS_BindExitTriggers)) + Else + Exec(N(EVS_CloseHangerDoor)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + EndIf + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_SET(GF_MAP_BowsersCastle, TRUE) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Starship_Depart)), TRIGGER_FLOOR_TOUCH, COLLIDER_o400, 1, 0) - EVT_EXEC(N(EVS_SetupStarship)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Set(GF_MAP_BowsersCastle, TRUE) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_EnterMap)) + Exec(N(EVS_SetupMusic)) + BindTrigger(Ref(N(EVS_Starship_Depart)), TRIGGER_FLOOR_TOUCH, COLLIDER_o400, 1, 0) + Exec(N(EVS_SetupStarship)) + Return + End }; diff --git a/src/world/area_kpa/kpa_63/kpa_63_4_scenes.c b/src/world/area_kpa/kpa_63/kpa_63_4_scenes.c index de011b0471b..107b7f157ad 100644 --- a/src/world/area_kpa/kpa_63/kpa_63_4_scenes.c +++ b/src/world/area_kpa/kpa_63/kpa_63_4_scenes.c @@ -51,201 +51,201 @@ API_CALLABLE(N(SetPassengerPos)) { } EvtScript N(EVS_UpdatePassengers) = { - EVT_IF_EQ(MV_PlayerOnBoard, TRUE) - EVT_CALL(N(SetPassengerPos), 0, LVar3, MV_Starship_Yaw) - EVT_END_IF - EVT_IF_EQ(MV_PartnerOnBoard, TRUE) - EVT_CALL(N(SetPassengerPos), 1, LVar3, MV_Starship_Yaw) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MV_PlayerOnBoard, TRUE) + Call(N(SetPassengerPos), 0, LVar3, MV_Starship_Yaw) + EndIf + IfEq(MV_PartnerOnBoard, TRUE) + Call(N(SetPassengerPos), 1, LVar3, MV_Starship_Yaw) + EndIf + Return + End }; EvtScript N(EVS_Starship_Update) = { - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, 100, 30, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar3, LVar0) - EVT_MULF(LVar3, EVT_FLOAT(0.1)) - EVT_ADDF(LVar3, MV_Starship_PosY) - EVT_CALL(TranslateGroup, MODEL_g55, 0, LVar3, 0) - EVT_CALL(RotateGroup, MODEL_g55, MV_Starship_Yaw, 0, 1, 0) - EVT_EXEC(N(EVS_UpdatePassengers)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 100, 0, 30, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar3, LVar0) - EVT_MULF(LVar3, EVT_FLOAT(0.1)) - EVT_ADDF(LVar3, MV_Starship_PosY) - EVT_CALL(TranslateGroup, MODEL_g55, 0, LVar3, 0) - EVT_CALL(RotateGroup, MODEL_g55, MV_Starship_Yaw, 0, 1, 0) - EVT_EXEC(N(EVS_UpdatePassengers)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(MakeLerp, 0, 100, 30, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + SetF(LVar3, LVar0) + MulF(LVar3, Float(0.1)) + AddF(LVar3, MV_Starship_PosY) + Call(TranslateGroup, MODEL_g55, 0, LVar3, 0) + Call(RotateGroup, MODEL_g55, MV_Starship_Yaw, 0, 1, 0) + Exec(N(EVS_UpdatePassengers)) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 100, 0, 30, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + SetF(LVar3, LVar0) + MulF(LVar3, Float(0.1)) + AddF(LVar3, MV_Starship_PosY) + Call(TranslateGroup, MODEL_g55, 0, LVar3, 0) + Call(RotateGroup, MODEL_g55, MV_Starship_Yaw, 0, 1, 0) + Exec(N(EVS_UpdatePassengers)) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Goto(0) + Return + End }; EvtScript N(EVS_Starship_Depart) = { - EVT_CALL(GetPartnerInUse, LVar9) - EVT_IF_NE(LVar9, PARTNER_NONE) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_CALL(GetModelCenter, MODEL_o308) - EVT_ADD(LVar0, -5) - EVT_CALL(SetPlayerJumpscale, 0) - EVT_CALL(PlayerJump2, LVar0, LVar1, LVar2, 2) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_SET(MV_PlayerOnBoard, TRUE) - EVT_CALL(InterpPlayerYaw, 225, 0) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_ADD(LVar2, 10) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, 1) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 15) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_SET(MV_PartnerOnBoard, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(EnableNpcShadow, NPC_PARTNER, FALSE) - EVT_WAIT(10) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0188, 160, 40) - EVT_CALL(ShowChoice, MSG_Choice_000C) - EVT_CALL(CloseMessage) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(SetPlayerJumpscale, 2) - EVT_SET(MV_PlayerOnBoard, FALSE) - EVT_CALL(PlayerJump, -50, 0, 225, 13) - EVT_CALL(HidePlayerShadow, FALSE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_SET(MV_PartnerOnBoard, FALSE) - EVT_CALL(PartnerIsFlying, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_WAIT(10) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, 2) - EVT_CALL(NpcJump0, NPC_PARTNER, -65, 0, 225, 13) - EVT_END_IF - EVT_CALL(EnableNpcShadow, NPC_PARTNER, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetMusicTrack, 0, SONG_STARSHIP_THEME, 1, 8) - EVT_THREAD - EVT_CALL(PlaySoundAtPlayer, SOUND_STARSHIP_TAKEOFF_SHORT, SOUND_SPACE_DEFAULT) - EVT_SET(LVar2, MV_Starship_PosY) - EVT_CALL(MakeLerp, 0, -110, 60, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_ADD(LVar0, LVar2) - EVT_SET(MV_Starship_PosY, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(50) - EVT_CALL(GotoMap, EVT_PTR("kpa_60"), kpa_60_ENTRY_5) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GetPartnerInUse, LVar9) + IfNe(LVar9, PARTNER_NONE) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(HidePlayerShadow, TRUE) + Call(GetModelCenter, MODEL_o308) + Add(LVar0, -5) + Call(SetPlayerJumpscale, 0) + Call(PlayerJump2, LVar0, LVar1, LVar2, 2) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Set(MV_PlayerOnBoard, TRUE) + Call(InterpPlayerYaw, 225, 0) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Add(LVar2, 10) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcJumpscale, NPC_PARTNER, 1) + Call(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 15) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Set(MV_PartnerOnBoard, TRUE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(EnableNpcShadow, NPC_PARTNER, FALSE) + Wait(10) + Call(ShowMessageAtScreenPos, MSG_Menus_0188, 160, 40) + Call(ShowChoice, MSG_Choice_000C) + Call(CloseMessage) + IfEq(LVar0, 1) + Call(DisablePlayerPhysics, FALSE) + Call(SetPlayerJumpscale, 2) + Set(MV_PlayerOnBoard, FALSE) + Call(PlayerJump, -50, 0, 225, 13) + Call(HidePlayerShadow, FALSE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Set(MV_PartnerOnBoard, FALSE) + Call(PartnerIsFlying, LVar0) + IfEq(LVar0, TRUE) + Wait(10) + Call(SetNpcJumpscale, NPC_PARTNER, 2) + Call(NpcJump0, NPC_PARTNER, -65, 0, 225, 13) + EndIf + Call(EnableNpcShadow, NPC_PARTNER, TRUE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Return + EndIf + Call(SetMusicTrack, 0, SONG_STARSHIP_THEME, 1, 8) + Thread + Call(PlaySoundAtPlayer, SOUND_STARSHIP_TAKEOFF_SHORT, SOUND_SPACE_DEFAULT) + Set(LVar2, MV_Starship_PosY) + Call(MakeLerp, 0, -110, 60, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Add(LVar0, LVar2) + Set(MV_Starship_PosY, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Wait(50) + Call(GotoMap, Ref("kpa_60"), kpa_60_ENTRY_5) + Wait(100) + Return + End }; EvtScript N(EVS_Starship_Arrive) = { - EVT_SET(MV_Starship_PosY, -100) - EVT_SET(MV_Starship_Yaw, 180) - EVT_SET(MV_PlayerOnBoard, TRUE) - EVT_SET(MV_PartnerOnBoard, TRUE) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -120, 0, 230) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -120, 0, 230) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(HidePlayerShadow, FALSE) - EVT_CALL(EnableNpcShadow, NPC_PARTNER, TRUE) - EVT_EXEC_GET_TID(N(EVS_UpdatePassengers), LVar9) - EVT_CALL(PlaySoundAtPlayer, SOUND_STARSHIP_ARRIVE, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_CALL(MakeLerp, -100, 0, 60, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(MV_Starship_PosY, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(20) - EVT_THREAD - EVT_CALL(InterpPlayerYaw, 270, 40) - EVT_END_THREAD - EVT_CALL(MakeLerp, 180, 0, 60, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(MV_Starship_Yaw, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_KILL_THREAD(LVar9) - EVT_CALL(SetPlayerJumpscale, 2) - EVT_SET(MV_PlayerOnBoard, FALSE) - EVT_CALL(PlayerJump, -50, 0, 225, 13) - EVT_CALL(HidePlayerShadow, FALSE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_SET(MV_PartnerOnBoard, FALSE) - EVT_CALL(PartnerIsFlying, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_WAIT(10) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, 2) - EVT_CALL(NpcJump0, NPC_PARTNER, -65, 0, 225, 13) - EVT_END_IF - EVT_CALL(EnableNpcShadow, NPC_PARTNER, TRUE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_WAIT(10) - EVT_IF_LT(GB_StoryProgress, STORY_CH8_REACHED_BOWSERS_CASTLE) - EVT_SET(GB_StoryProgress, STORY_CH8_REACHED_BOWSERS_CASTLE) - EVT_END_IF - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_OUTSIDE) - EVT_END_THREAD - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Set(MV_Starship_PosY, -100) + Set(MV_Starship_Yaw, 180) + Set(MV_PlayerOnBoard, TRUE) + Set(MV_PartnerOnBoard, TRUE) + Call(InterpPlayerYaw, 90, 0) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(UseSettingsFrom, CAM_DEFAULT, -120, 0, 230) + Call(SetPanTarget, CAM_DEFAULT, -120, 0, 230) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(HidePlayerShadow, FALSE) + Call(EnableNpcShadow, NPC_PARTNER, TRUE) + ExecGetTID(N(EVS_UpdatePassengers), LVar9) + Call(PlaySoundAtPlayer, SOUND_STARSHIP_ARRIVE, SOUND_SPACE_DEFAULT) + Thread + Call(MakeLerp, -100, 0, 60, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Set(MV_Starship_PosY, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Wait(20) + Thread + Call(InterpPlayerYaw, 270, 40) + EndThread + Call(MakeLerp, 180, 0, 60, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Set(MV_Starship_Yaw, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + KillThread(LVar9) + Call(SetPlayerJumpscale, 2) + Set(MV_PlayerOnBoard, FALSE) + Call(PlayerJump, -50, 0, 225, 13) + Call(HidePlayerShadow, FALSE) + Call(DisablePlayerPhysics, FALSE) + Set(MV_PartnerOnBoard, FALSE) + Call(PartnerIsFlying, LVar0) + IfEq(LVar0, TRUE) + Wait(10) + Call(SetNpcJumpscale, NPC_PARTNER, 2) + Call(NpcJump0, NPC_PARTNER, -65, 0, 225, 13) + EndIf + Call(EnableNpcShadow, NPC_PARTNER, TRUE) + Call(EnablePartnerAI) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Wait(10) + IfLt(GB_StoryProgress, STORY_CH8_REACHED_BOWSERS_CASTLE) + Set(GB_StoryProgress, STORY_CH8_REACHED_BOWSERS_CASTLE) + EndIf + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_OUTSIDE) + EndThread + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SetupStarship) = { - EVT_EXEC(N(EVS_Starship_Update)) - EVT_CALL(ParentColliderToModel, COLLIDER_o400, MODEL_o308) - EVT_LOOP(0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o400) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Exec(N(EVS_Starship_Update)) + Call(ParentColliderToModel, COLLIDER_o400, MODEL_o308) + Loop(0) + Call(UpdateColliderTransform, COLLIDER_o400) + Wait(1) + EndLoop + Return + End }; diff --git a/src/world/area_kpa/kpa_70/kpa_70_1_music.c b/src/world/area_kpa/kpa_70/kpa_70_1_music.c index 0878b89915b..2e251a96549 100644 --- a/src/world/area_kpa/kpa_70/kpa_70_1_music.c +++ b/src/world/area_kpa/kpa_70/kpa_70_1_music.c @@ -1,13 +1,13 @@ #include "kpa_70.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_1) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_1) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(PlayAmbientSounds, AMBIENT_LAVA_1) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_1) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_70/kpa_70_2_main.c b/src/world/area_kpa/kpa_70/kpa_70_2_main.c index 7a9fee529e3..20815015f26 100644 --- a/src/world/area_kpa/kpa_70/kpa_70_2_main.c +++ b/src/world/area_kpa/kpa_70/kpa_70_2_main.c @@ -3,106 +3,106 @@ #include "world/common/atomic/TexturePan.inc.c" EvtScript N(EVS_SetupChainDrive) = { - EVT_CALL(LoadAnimatedModel, 0, EVT_PTR(N(ChainDriveSkeleton))) - EVT_CALL(PlayModelAnimation, 0, EVT_PTR(N(AS_ChainDriveAnim))) - EVT_CALL(SetAnimatedModelRootPosition, 0, 0, 0, 0) - EVT_CALL(SetAnimatedModelRenderMode, 0, RENDER_MODE_SURFACE_OPA) - EVT_RETURN - EVT_END + Call(LoadAnimatedModel, 0, Ref(N(ChainDriveSkeleton))) + Call(PlayModelAnimation, 0, Ref(N(AS_ChainDriveAnim))) + Call(SetAnimatedModelRootPosition, 0, 0, 0, 0) + Call(SetAnimatedModelRenderMode, 0, RENDER_MODE_SURFACE_OPA) + Return + End }; EvtScript N(EVS_ExitDoors_kpa_62_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(3) - EVT_SET(LVar0, kpa_70_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittw) - EVT_SET(LVar2, MODEL_o1431) - EVT_SET(LVar3, MODEL_o1432) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kpa_62"), kpa_62_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Wait(3) + Set(LVar0, kpa_70_ENTRY_0) + Set(LVar1, COLLIDER_deilittw) + Set(LVar2, MODEL_o1431) + Set(LVar3, MODEL_o1432) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("kpa_62"), kpa_62_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_kpa_50_0) = EVT_EXIT_WALK(60, kpa_70_ENTRY_1, "kpa_50", kpa_50_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_50_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_50_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_TexPan_Lava) = { - EVT_THREAD + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_0) TEX_PAN_PARAMS_STEP( -400, 0, -800, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 1, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 1000, 0, 2000, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 1, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_o1558, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o1825, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_m01, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_m02, TEX_PANNER_1) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetTexPanner, MODEL_o1558, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o1825, TEX_PANNER_0) + Call(SetTexPanner, MODEL_m01, TEX_PANNER_1) + Call(SetTexPanner, MODEL_m02, TEX_PANNER_1) + Return + End }; EvtScript N(EVS_Update_Gears) = { - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_CALL(RotateModel, MODEL_o1773, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o1774, LVar0, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o1777, LVar0, 0, 0, -1) - EVT_ADD(LVar0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVar0, 0) + Loop(0) + Call(RotateModel, MODEL_o1773, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o1774, LVar0, 0, 0, -1) + Call(RotateModel, MODEL_o1777, LVar0, 0, 0, -1) + Add(LVar0, 1) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(InitAnimatedModels) - EVT_EXEC(N(EVS_SetupChainDrive)) - EVT_THREAD - EVT_CALL(PlaySoundAt, SOUND_LOOP_KPA_CHAIN_DRIVE, SOUND_SPACE_DEFAULT, 800, 100, -200) - EVT_WAIT(28) - EVT_LOOP(0) - EVT_CALL(PlaySoundAt, SOUND_KPA_DUMP_LAVA, SOUND_SPACE_DEFAULT, 800, 100, -200) - EVT_WAIT(90) - EVT_END_LOOP - EVT_END_THREAD - EVT_EXEC(N(EVS_Update_Gears)) - EVT_EXEC(N(EVS_TexPan_Lava)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_62_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kpa_70_ENTRY_0) - EVT_THREAD - EVT_SET(LVar2, MODEL_o1431) - EVT_SET(LVar3, MODEL_o1432) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC_WAIT(N(EVS_BindExitTriggers)) - EVT_END_THREAD - EVT_CASE_EQ(kpa_70_ENTRY_1) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Call(InitAnimatedModels) + Exec(N(EVS_SetupChainDrive)) + Thread + Call(PlaySoundAt, SOUND_LOOP_KPA_CHAIN_DRIVE, SOUND_SPACE_DEFAULT, 800, 100, -200) + Wait(28) + Loop(0) + Call(PlaySoundAt, SOUND_KPA_DUMP_LAVA, SOUND_SPACE_DEFAULT, 800, 100, -200) + Wait(90) + EndLoop + EndThread + Exec(N(EVS_Update_Gears)) + Exec(N(EVS_TexPan_Lava)) + BindTrigger(Ref(N(EVS_ExitDoors_kpa_62_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kpa_70_ENTRY_0) + Thread + Set(LVar2, MODEL_o1431) + Set(LVar3, MODEL_o1432) + ExecWait(EnterDoubleDoor) + ExecWait(N(EVS_BindExitTriggers)) + EndThread + CaseEq(kpa_70_ENTRY_1) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_kpa/kpa_81/kpa_81_1_music.c b/src/world/area_kpa/kpa_81/kpa_81_1_music.c index 897347ea993..da5563284c2 100644 --- a/src/world/area_kpa/kpa_81/kpa_81_1_music.c +++ b/src/world/area_kpa/kpa_81/kpa_81_1_music.c @@ -1,12 +1,12 @@ #include "kpa_81.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_1) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_1) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_81/kpa_81_2_main.c b/src/world/area_kpa/kpa_81/kpa_81_2_main.c index 4d058d9eceb..0d84eaf9fad 100644 --- a/src/world/area_kpa/kpa_81/kpa_81_2_main.c +++ b/src/world/area_kpa/kpa_81/kpa_81_2_main.c @@ -29,18 +29,18 @@ s32 N(LeftDoorModels)[] = { EvtScript N(EVS_ExitDoors_kpa_50_1) = EVT_EXIT_DOUBLE_DOOR(kpa_81_ENTRY_0, "kpa_50", kpa_50_ENTRY_1, COLLIDER_deilittw, MODEL_o174, MODEL_o173); EvtScript N(EVS_ExitDoors_kpa_32_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, kpa_81_ENTRY_2) - EVT_SET(LVar1, COLLIDER_o166) - EVT_SET(LVar2, EVT_PTR(N(RightDoorModels))) - EVT_SET(LVar3, EVT_PTR(N(LeftDoorModels))) - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kpa_32"), kpa_32_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, kpa_81_ENTRY_2) + Set(LVar1, COLLIDER_o166) + Set(LVar2, Ref(N(RightDoorModels))) + Set(LVar3, Ref(N(LeftDoorModels))) + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("kpa_32"), kpa_32_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_kpa_04_1) = EVT_EXIT_WALK(60, kpa_81_ENTRY_3, "kpa_04", kpa_04_ENTRY_1); @@ -49,106 +49,106 @@ EvtScript N(EVS_ExitWalk_kpa_04_1) = EVT_EXIT_WALK(60, kpa_81_ENTRY_3, "kpa_04", const char N(KPA_17)[] = "kpa_17"; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_50_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_04_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_IF_NE(GB_KPA81_BowserDoorState, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_32_0)), TRIGGER_WALL_PRESS_A, COLLIDER_o166, 1, 0) - EVT_END_IF - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_kpa_50_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_04_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + IfNe(GB_KPA81_BowserDoorState, 0) + BindTrigger(Ref(N(EVS_ExitDoors_kpa_32_0)), TRIGGER_WALL_PRESS_A, COLLIDER_o166, 1, 0) + EndIf + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kpa_81_ENTRY_0) - EVT_SET(LVar0, kpa_81_ENTRY_0) - EVT_SET(LVar2, MODEL_o174) - EVT_SET(LVar3, MODEL_o173) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kpa_81_ENTRY_2) - EVT_SET(LVar0, kpa_81_ENTRY_2) - EVT_SET(LVar2, EVT_PTR(N(LeftDoorModels))) - EVT_SET(LVar3, EVT_PTR(N(RightDoorModels))) - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kpa_81_ENTRY_3) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kpa_81_ENTRY_0) + Set(LVar0, kpa_81_ENTRY_0) + Set(LVar2, MODEL_o174) + Set(LVar3, MODEL_o173) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kpa_81_ENTRY_2) + Set(LVar0, kpa_81_ENTRY_2) + Set(LVar2, Ref(N(LeftDoorModels))) + Set(LVar3, Ref(N(RightDoorModels))) + ExecWait(BaseEnterDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kpa_81_ENTRY_3) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; EvtScript N(EVS_UnusedMoveStatue) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(ParentColliderToModel, COLLIDER_o146, MODEL_o145) - EVT_CALL(MakeLerp, 0, -40, 40, EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o145, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o146, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o146) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_UNBIND - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, 0) + Return + EndIf + Call(ParentColliderToModel, COLLIDER_o146, MODEL_o145) + Call(MakeLerp, 0, -40, 40, EASING_LINEAR) + Label(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o145, LVar0, 0, 0) + Call(TranslateModel, MODEL_o146, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o146) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Unbind + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_IF_NE(GB_KPA81_BowserDoorState, 0) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kpa_81_ENTRY_0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UnusedMoveStatue)), TRIGGER_WALL_PRESS_A, COLLIDER_o146, 1, 0) - EVT_CASE_EQ(kpa_81_ENTRY_2) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UnusedMoveStatue)), TRIGGER_WALL_PRESS_A, COLLIDER_o146, 1, 0) - EVT_CASE_EQ(kpa_81_ENTRY_3) - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(ParentColliderToModel, COLLIDER_o146, MODEL_o145) - EVT_SWITCH(GB_KPA04_StatuePosition) - EVT_CASE_EQ(1) - EVT_CALL(TranslateModel, MODEL_o145, -50, 0, 0) - EVT_CALL(TranslateModel, MODEL_o146, -50, 0, 0) - EVT_CASE_EQ(2) - EVT_CALL(TranslateModel, MODEL_o145, 50, 0, 0) - EVT_CALL(TranslateModel, MODEL_o146, 50, 0, 0) - EVT_END_SWITCH - EVT_CALL(UpdateColliderTransform, COLLIDER_o146) - EVT_CALL(EnableModel, MODEL_o166, FALSE) - EVT_CALL(EnableModel, MODEL_m_, FALSE) - EVT_CALL(EnableModel, MODEL_m_kai, FALSE) - EVT_CALL(EnableModel, MODEL_m1, FALSE) - EVT_CALL(EnableModel, MODEL_m2, FALSE) - EVT_CALL(EnableModel, MODEL_m3, FALSE) - EVT_CALL(EnableModel, MODEL_m4, FALSE) - EVT_CALL(EnableModel, MODEL_m5, FALSE) - EVT_CALL(EnableModel, MODEL_m6, FALSE) - EVT_CALL(EnableModel, MODEL_m7, FALSE) - EVT_CALL(EnableModel, MODEL_b_, FALSE) - EVT_CALL(EnableModel, MODEL_b_kai, FALSE) - EVT_CALL(EnableModel, MODEL_b1, FALSE) - EVT_CALL(EnableModel, MODEL_b2, FALSE) - EVT_CALL(EnableModel, MODEL_b3, FALSE) - EVT_CALL(EnableModel, MODEL_b4, FALSE) - EVT_CALL(EnableModel, MODEL_b5, FALSE) - EVT_CALL(EnableModel, MODEL_b6, FALSE) - EVT_CALL(EnableModel, MODEL_b7, FALSE) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + IfNe(GB_KPA81_BowserDoorState, 0) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kpa_81_ENTRY_0) + BindTrigger(Ref(N(EVS_UnusedMoveStatue)), TRIGGER_WALL_PRESS_A, COLLIDER_o146, 1, 0) + CaseEq(kpa_81_ENTRY_2) + BindTrigger(Ref(N(EVS_UnusedMoveStatue)), TRIGGER_WALL_PRESS_A, COLLIDER_o146, 1, 0) + CaseEq(kpa_81_ENTRY_3) + EndSwitch + EndIf + Call(ParentColliderToModel, COLLIDER_o146, MODEL_o145) + Switch(GB_KPA04_StatuePosition) + CaseEq(1) + Call(TranslateModel, MODEL_o145, -50, 0, 0) + Call(TranslateModel, MODEL_o146, -50, 0, 0) + CaseEq(2) + Call(TranslateModel, MODEL_o145, 50, 0, 0) + Call(TranslateModel, MODEL_o146, 50, 0, 0) + EndSwitch + Call(UpdateColliderTransform, COLLIDER_o146) + Call(EnableModel, MODEL_o166, FALSE) + Call(EnableModel, MODEL_m_, FALSE) + Call(EnableModel, MODEL_m_kai, FALSE) + Call(EnableModel, MODEL_m1, FALSE) + Call(EnableModel, MODEL_m2, FALSE) + Call(EnableModel, MODEL_m3, FALSE) + Call(EnableModel, MODEL_m4, FALSE) + Call(EnableModel, MODEL_m5, FALSE) + Call(EnableModel, MODEL_m6, FALSE) + Call(EnableModel, MODEL_m7, FALSE) + Call(EnableModel, MODEL_b_, FALSE) + Call(EnableModel, MODEL_b_kai, FALSE) + Call(EnableModel, MODEL_b1, FALSE) + Call(EnableModel, MODEL_b2, FALSE) + Call(EnableModel, MODEL_b3, FALSE) + Call(EnableModel, MODEL_b4, FALSE) + Call(EnableModel, MODEL_b5, FALSE) + Call(EnableModel, MODEL_b6, FALSE) + Call(EnableModel, MODEL_b7, FALSE) + Exec(N(EVS_EnterMap)) + Wait(1) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_kpa/kpa_81/kpa_81_3_npc.c b/src/world/area_kpa/kpa_81/kpa_81_3_npc.c index 43127a6de91..3ad41e78af7 100644 --- a/src/world/area_kpa/kpa_81/kpa_81_3_npc.c +++ b/src/world/area_kpa/kpa_81/kpa_81_3_npc.c @@ -8,210 +8,210 @@ MAP_STATIC_PAD(1,choice); #include "world/common/complete/NormalItemChoice.inc.c" EvtScript N(EVS_EnsurePartnerNeutral) = { - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_IF_EQ(LVar0, PARTNER_BOMBETTE) - EVT_LOOP(0) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, PARTNER_NONE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_ELSE - EVT_CALL(InterruptUsePartner) - EVT_WAIT(20) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, PARTNER_NONE) + IfEq(LVar0, PARTNER_BOMBETTE) + Loop(0) + Call(GetPartnerInUse, LVar0) + Wait(1) + IfEq(LVar0, PARTNER_NONE) + BreakLoop + EndIf + EndLoop + Else + Call(InterruptUsePartner) + Wait(20) + EndIf + EndIf + Return + End }; EvtScript N(EVS_NpcIdle_Door) = { - EVT_IF_EQ(GB_KPA81_BowserDoorState, 2) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GB_KPA81_BowserDoorState, 1) - EVT_SET(GB_KPA81_BowserDoorState, 2) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(35) - EVT_CALL(SetCamType, CAM_DEFAULT, 6, FALSE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 109, 0, 202) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(500.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(133.0), EVT_FLOAT(100.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(216.0), EVT_FLOAT(230.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_CALL(SetMusicTrack, 0, SONG_FINAL_BOWSER_BATTLE, 1, 8) - EVT_WAIT(150 * DT) - EVT_CALL(FadeOutMusic, 0, 250) - EVT_WAIT(15 * DT) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH8_0008) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(2.0 / DT)) - EVT_CALL(PlayerMoveTo, -115, LVar2, 0) - EVT_CALL(SetCamType, CAM_DEFAULT, 6, FALSE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 109, 0, 202) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(500.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(133.0), EVT_FLOAT(100.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(216.0), EVT_FLOAT(230.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_CALL(SetMusicTrack, 0, SONG_FINAL_BOWSER_BATTLE, 1, 8) - EVT_WAIT(150 * DT) - EVT_CALL(FadeOutMusic, 0, 250) - EVT_WAIT(15 * DT) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH8_0000) - EVT_CALL(ShowChoice, MSG_Choice_0013) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH8_0003) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_LABEL(100) - EVT_WAIT(1) - EVT_CALL(IsPlayerWithin, 120, 150, 30, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(3) - EVT_END_IF - EVT_ADD(LVar1, 1) - EVT_IF_LE(LVar1, 300 * DT) - EVT_GOTO(100) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC_WAIT(N(EVS_EnsurePartnerNeutral)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH8_0004) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(AwaitPlayerApproach, 120, 150, 30) - EVT_GOTO(2) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH8_0002) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(AwaitPlayerApproach, 120, 150, 30) - EVT_END_IF - EVT_LABEL(2) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC_WAIT(N(EVS_EnsurePartnerNeutral)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH8_0001) - EVT_CALL(ShowChoice, MSG_Choice_0013) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(4) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH8_0002) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(AwaitPlayerLeave, 120, 150, 30) - EVT_CALL(AwaitPlayerApproach, 120, 150, 30) - EVT_GOTO(2) - EVT_END_IF - EVT_LABEL(3) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC_WAIT(N(EVS_EnsurePartnerNeutral)) - EVT_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 10) - EVT_CALL(EnablePartnerAI) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH8_0005) - EVT_GOTO(5) - EVT_LABEL(4) - EVT_EXEC_WAIT(N(EVS_EnsurePartnerNeutral)) - EVT_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 10) - EVT_CALL(EnablePartnerAI) - EVT_END_THREAD - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH8_0006) - EVT_LABEL(5) - EVT_CALL(SetCamType, CAM_DEFAULT, 6, FALSE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 163, -71, 108) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(20.0), EVT_FLOAT(-16.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(500.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(133.0), EVT_FLOAT(100.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(216.0), EVT_FLOAT(230.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(EnableModel, MODEL_o166, TRUE) - EVT_THREAD - EVT_WAIT(25) - EVT_CALL(EnableModel, MODEL_o165, FALSE) - EVT_END_THREAD - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitts, SOUND_OPEN_TRAPDOOR, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 90, 30, EASING_COS_SLOW_OVERSHOOT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o165, LVar0, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o167, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Flail) - EVT_WAIT(30 * DT) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_PanicStill) - EVT_WAIT(10 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_PLAYER_LONG_FALL, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_LOOP(65) - EVT_SUB(LVar1, 16) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_LOOP(65) - EVT_SUB(LVar1, 16) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(65) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_SET(GB_KPA81_BowserDoorState, 1) - EVT_CALL(GotoMap, EVT_PTR(N(KPA_17)), kpa_17_ENTRY_0) - EVT_RETURN - EVT_END + IfEq(GB_KPA81_BowserDoorState, 2) + Return + EndIf + IfEq(GB_KPA81_BowserDoorState, 1) + Set(GB_KPA81_BowserDoorState, 2) + Call(DisablePlayerInput, TRUE) + Wait(35) + Call(SetCamType, CAM_DEFAULT, 6, FALSE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, 109, 0, 202) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-10.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(500.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(133.0), Float(100.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(216.0), Float(230.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Call(SetMusicTrack, 0, SONG_FINAL_BOWSER_BATTLE, 1, 8) + Wait(150 * DT) + Call(FadeOutMusic, 0, 250) + Wait(15 * DT) + Exec(N(EVS_SetupMusic)) + EndThread + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH8_0008) + Exec(N(EVS_SetupMusic)) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Return + EndIf + Wait(10) + Call(DisablePlayerInput, TRUE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerSpeed, Float(2.0 / DT)) + Call(PlayerMoveTo, -115, LVar2, 0) + Call(SetCamType, CAM_DEFAULT, 6, FALSE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, 109, 0, 202) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-10.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(500.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(133.0), Float(100.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(216.0), Float(230.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Call(SetMusicTrack, 0, SONG_FINAL_BOWSER_BATTLE, 1, 8) + Wait(150 * DT) + Call(FadeOutMusic, 0, 250) + Wait(15 * DT) + Exec(N(EVS_SetupMusic)) + EndThread + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH8_0000) + Call(ShowChoice, MSG_Choice_0013) + IfEq(LVar0, 0) + Call(ContinueSpeech, NPC_SELF, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH8_0003) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Label(100) + Wait(1) + Call(IsPlayerWithin, 120, 150, 30, LVar0) + IfEq(LVar0, 1) + Goto(3) + EndIf + Add(LVar1, 1) + IfLe(LVar1, 300 * DT) + Goto(100) + EndIf + Call(DisablePlayerInput, TRUE) + ExecWait(N(EVS_EnsurePartnerNeutral)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH8_0004) + Call(DisablePlayerInput, FALSE) + Call(AwaitPlayerApproach, 120, 150, 30) + Goto(2) + Else + Call(ContinueSpeech, NPC_SELF, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH8_0002) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Call(AwaitPlayerApproach, 120, 150, 30) + EndIf + Label(2) + Call(DisablePlayerInput, TRUE) + ExecWait(N(EVS_EnsurePartnerNeutral)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH8_0001) + Call(ShowChoice, MSG_Choice_0013) + IfEq(LVar0, 0) + Goto(4) + Else + Call(ContinueSpeech, NPC_SELF, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH8_0002) + Call(DisablePlayerInput, FALSE) + Call(AwaitPlayerLeave, 120, 150, 30) + Call(AwaitPlayerApproach, 120, 150, 30) + Goto(2) + EndIf + Label(3) + Call(DisablePlayerInput, TRUE) + ExecWait(N(EVS_EnsurePartnerNeutral)) + Thread + Call(DisablePartnerAI, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 10) + Call(EnablePartnerAI) + EndThread + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH8_0005) + Goto(5) + Label(4) + ExecWait(N(EVS_EnsurePartnerNeutral)) + Thread + Call(DisablePartnerAI, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 10) + Call(EnablePartnerAI) + EndThread + Call(ContinueSpeech, NPC_SELF, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH8_0006) + Label(5) + Call(SetCamType, CAM_DEFAULT, 6, FALSE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, 163, -71, 108) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(SetCamPitch, CAM_DEFAULT, Float(20.0), Float(-16.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(500.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(133.0), Float(100.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(216.0), Float(230.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(EnableModel, MODEL_o166, TRUE) + Thread + Wait(25) + Call(EnableModel, MODEL_o165, FALSE) + EndThread + Call(PlaySoundAtCollider, COLLIDER_deilitts, SOUND_OPEN_TRAPDOOR, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 90, 30, EASING_COS_SLOW_OVERSHOOT) + Label(10) + Call(UpdateLerp) + Call(RotateModel, MODEL_o165, LVar0, 0, 0, -1) + Call(RotateModel, MODEL_o167, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(SetPlayerAnimation, ANIM_MarioW2_Flail) + Wait(30 * DT) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Call(SetPlayerAnimation, ANIM_MarioW2_PanicStill) + Wait(10 * DT) + Call(PlaySoundAtPlayer, SOUND_PLAYER_LONG_FALL, SOUND_SPACE_DEFAULT) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Loop(65) + Sub(LVar1, 16) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + Thread + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Loop(65) + Sub(LVar1, 16) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + Wait(65) + Call(DisablePlayerInput, FALSE) + Set(GB_KPA81_BowserDoorState, 1) + Call(GotoMap, Ref(N(KPA_17)), kpa_17_ENTRY_0) + Return + End }; EvtScript N(EVS_NpcInit_Door) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Door))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, 184, 20, 150) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Door))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcPos, NPC_SELF, 184, 20, 150) + Return + End }; NpcData N(NpcData_Door) = { diff --git a/src/world/area_kpa/kpa_82/kpa_82_1_music.c b/src/world/area_kpa/kpa_82/kpa_82_1_music.c index a967139efbd..6c195bc73bc 100644 --- a/src/world/area_kpa/kpa_82/kpa_82_1_music.c +++ b/src/world/area_kpa/kpa_82/kpa_82_1_music.c @@ -1,12 +1,12 @@ #include "kpa_82.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_82/kpa_82_2_main.c b/src/world/area_kpa/kpa_82/kpa_82_2_main.c index ff8699b2271..aed021c7611 100644 --- a/src/world/area_kpa/kpa_82/kpa_82_2_main.c +++ b/src/world/area_kpa/kpa_82/kpa_82_2_main.c @@ -29,87 +29,87 @@ s32 N(LeftDoorModels)[] = { EvtScript N(EVS_ExitDoors_kpa_113_1) = EVT_EXIT_DOUBLE_DOOR(kpa_82_ENTRY_0, "kpa_113", kpa_113_ENTRY_1, COLLIDER_deilittw, MODEL_o174, MODEL_o173); EvtScript N(EVS_ExitDoors_kpa_61_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, kpa_82_ENTRY_1) - EVT_SET(LVar1, COLLIDER_o166) - EVT_SET(LVar2, EVT_PTR(N(RightDoorModels))) - EVT_SET(LVar3, EVT_PTR(N(LeftDoorModels))) - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kpa_61"), kpa_61_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, kpa_82_ENTRY_1) + Set(LVar1, COLLIDER_o166) + Set(LVar2, Ref(N(RightDoorModels))) + Set(LVar3, Ref(N(LeftDoorModels))) + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("kpa_61"), kpa_61_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_Inspect_FaceDoor) = { - EVT_IF_EQ(GF_KPA82_PassedThroughDoor, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_KPA82_PassedThroughDoor, TRUE) - EVT_RETURN - EVT_END + IfEq(GF_KPA82_PassedThroughDoor, TRUE) + Return + EndIf + Set(GF_KPA82_PassedThroughDoor, TRUE) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_113_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0) - EVT_IF_EQ(GB_KPA82_BowserDoorState, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Inspect_FaceDoor)), TRIGGER_WALL_PRESS_A, COLLIDER_o166, 1, 0) - EVT_ELSE - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_61_0)), TRIGGER_WALL_PRESS_A, COLLIDER_o166, 1, 0) - EVT_END_IF - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_kpa_113_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0) + IfEq(GB_KPA82_BowserDoorState, 0) + BindTrigger(Ref(N(EVS_Inspect_FaceDoor)), TRIGGER_WALL_PRESS_A, COLLIDER_o166, 1, 0) + Else + BindTrigger(Ref(N(EVS_ExitDoors_kpa_61_0)), TRIGGER_WALL_PRESS_A, COLLIDER_o166, 1, 0) + EndIf + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kpa_82_ENTRY_0) - EVT_SET(LVar0, kpa_82_ENTRY_0) - EVT_SET(LVar2, MODEL_o174) - EVT_SET(LVar3, MODEL_o173) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kpa_82_ENTRY_1) - EVT_SET(LVar0, kpa_82_ENTRY_1) - EVT_SET(LVar2, EVT_PTR(N(LeftDoorModels))) - EVT_SET(LVar3, EVT_PTR(N(RightDoorModels))) - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kpa_82_ENTRY_0) + Set(LVar0, kpa_82_ENTRY_0) + Set(LVar2, MODEL_o174) + Set(LVar3, MODEL_o173) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kpa_82_ENTRY_1) + Set(LVar0, kpa_82_ENTRY_1) + Set(LVar2, Ref(N(LeftDoorModels))) + Set(LVar3, Ref(N(RightDoorModels))) + ExecWait(BaseEnterDoor) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(EnableModel, MODEL_o166, FALSE) - EVT_CALL(EnableModel, MODEL_m_, FALSE) - EVT_CALL(EnableModel, MODEL_m_kai, FALSE) - EVT_CALL(EnableModel, MODEL_m1, FALSE) - EVT_CALL(EnableModel, MODEL_m2, FALSE) - EVT_CALL(EnableModel, MODEL_m3, FALSE) - EVT_CALL(EnableModel, MODEL_m4, FALSE) - EVT_CALL(EnableModel, MODEL_m5, FALSE) - EVT_CALL(EnableModel, MODEL_m6, FALSE) - EVT_CALL(EnableModel, MODEL_m7, FALSE) - EVT_CALL(EnableModel, MODEL_b_, FALSE) - EVT_CALL(EnableModel, MODEL_b_kai, FALSE) - EVT_CALL(EnableModel, MODEL_b1, FALSE) - EVT_CALL(EnableModel, MODEL_b2, FALSE) - EVT_CALL(EnableModel, MODEL_b3, FALSE) - EVT_CALL(EnableModel, MODEL_b4, FALSE) - EVT_CALL(EnableModel, MODEL_b5, FALSE) - EVT_CALL(EnableModel, MODEL_b6, FALSE) - EVT_CALL(EnableModel, MODEL_b7, FALSE) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Call(EnableModel, MODEL_o166, FALSE) + Call(EnableModel, MODEL_m_, FALSE) + Call(EnableModel, MODEL_m_kai, FALSE) + Call(EnableModel, MODEL_m1, FALSE) + Call(EnableModel, MODEL_m2, FALSE) + Call(EnableModel, MODEL_m3, FALSE) + Call(EnableModel, MODEL_m4, FALSE) + Call(EnableModel, MODEL_m5, FALSE) + Call(EnableModel, MODEL_m6, FALSE) + Call(EnableModel, MODEL_m7, FALSE) + Call(EnableModel, MODEL_b_, FALSE) + Call(EnableModel, MODEL_b_kai, FALSE) + Call(EnableModel, MODEL_b1, FALSE) + Call(EnableModel, MODEL_b2, FALSE) + Call(EnableModel, MODEL_b3, FALSE) + Call(EnableModel, MODEL_b4, FALSE) + Call(EnableModel, MODEL_b5, FALSE) + Call(EnableModel, MODEL_b6, FALSE) + Call(EnableModel, MODEL_b7, FALSE) + Exec(N(EVS_EnterMap)) + Wait(1) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_kpa/kpa_82/kpa_82_3_npc.c b/src/world/area_kpa/kpa_82/kpa_82_3_npc.c index c52ecb90e92..66a69eaee69 100644 --- a/src/world/area_kpa/kpa_82/kpa_82_3_npc.c +++ b/src/world/area_kpa/kpa_82/kpa_82_3_npc.c @@ -26,9 +26,9 @@ MobileAISettings N(AISettings_Short) = { }; EvtScript N(EVS_NpcAI_Short) = { - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_Short))) - EVT_RETURN - EVT_END + Call(BasicAI_Main, Ref(N(AISettings_Short))) + Return + End }; NpcSettings N(NpcSettings_Short) = { @@ -51,9 +51,9 @@ MobileAISettings N(AISettings_Koopa) = { }; EvtScript N(EVS_NpcAI_KoopaTroopa) = { - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_Koopa))) - EVT_RETURN - EVT_END + Call(BasicAI_Main, Ref(N(AISettings_Koopa))) + Return + End }; NpcSettings N(NpcSettings_KoopaTroopa) = { @@ -76,9 +76,9 @@ MobileAISettings N(AISettings_ShyGuy) = { }; EvtScript N(EVS_NpcAI_ShyGuy) = { - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_ShyGuy))) - EVT_RETURN - EVT_END + Call(BasicAI_Main, Ref(N(AISettings_ShyGuy))) + Return + End }; NpcSettings N(NpcSettings_ShyGuy) = { @@ -93,400 +93,400 @@ MAP_STATIC_PAD(1,choice); #include "world/common/complete/NormalItemChoice.inc.c" EvtScript N(EVS_SetCam_MeetingDoor) = { - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(11.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(450.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(88.0), EVT_FLOAT(256.6)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(195.0), EVT_FLOAT(142.0)) - EVT_CALL(SetCamPosC, CAM_DEFAULT, EVT_FLOAT(0.0), EVT_FLOAT(0.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(SetCamPitch, CAM_DEFAULT, Float(11.0), Float(-10.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(450.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(88.0), Float(256.6)) + Call(SetCamPosB, CAM_DEFAULT, Float(195.0), Float(142.0)) + Call(SetCamPosC, CAM_DEFAULT, Float(0.0), Float(0.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_SetCam_AfterBattle) = { - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(5.0), EVT_FLOAT(-14.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(375.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(88.0), EVT_FLOAT(256.6)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(195.0), EVT_FLOAT(142.0)) - EVT_CALL(SetCamPosC, CAM_DEFAULT, EVT_FLOAT(0.0), EVT_FLOAT(0.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(SetCamPitch, CAM_DEFAULT, Float(5.0), Float(-14.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(375.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(88.0), Float(256.6)) + Call(SetCamPosB, CAM_DEFAULT, Float(195.0), Float(142.0)) + Call(SetCamPosC, CAM_DEFAULT, Float(0.0), Float(0.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_SetCam_AfterResult) = { - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(11.0), EVT_FLOAT(-14.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(450.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(88.0), EVT_FLOAT(256.6)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(195.0), EVT_FLOAT(142.0)) - EVT_CALL(SetCamPosC, CAM_DEFAULT, EVT_FLOAT(0.0), EVT_FLOAT(0.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(11.0), Float(-14.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(450.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(88.0), Float(256.6)) + Call(SetCamPosB, CAM_DEFAULT, Float(195.0), Float(142.0)) + Call(SetCamPosC, CAM_DEFAULT, Float(0.0), Float(0.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_SetCam_AskQuestion) = { - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(11.0), EVT_FLOAT(-10.5)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(88.0), EVT_FLOAT(256.6)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(195.0), EVT_FLOAT(142.0)) - EVT_CALL(SetCamPosC, CAM_DEFAULT, EVT_FLOAT(0.0), EVT_FLOAT(0.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(11.0), Float(-10.5)) + Call(SetCamPosA, CAM_DEFAULT, Float(88.0), Float(256.6)) + Call(SetCamPosB, CAM_DEFAULT, Float(195.0), Float(142.0)) + Call(SetCamPosC, CAM_DEFAULT, Float(0.0), Float(0.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_SetCam_ViewRoom) = { - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, LVar6) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(470.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(16.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-2.5), EVT_FLOAT(300.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(-2.5), EVT_FLOAT(200.0)) - EVT_CALL(SetCamPosC, CAM_DEFAULT, EVT_FLOAT(0.0), EVT_FLOAT(0.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamSpeed, CAM_DEFAULT, LVar6) + Call(SetCamDistance, CAM_DEFAULT, Float(470.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(16.0), Float(-9.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(-2.5), Float(300.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(-2.5), Float(200.0)) + Call(SetCamPosC, CAM_DEFAULT, Float(0.0), Float(0.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_SetCam_BeforeBattle) = { - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, LVar6) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(470.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(16.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(50.0), EVT_FLOAT(300.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(50.0), EVT_FLOAT(200.0)) - EVT_CALL(SetCamPosC, CAM_DEFAULT, EVT_FLOAT(0.0), EVT_FLOAT(0.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamSpeed, CAM_DEFAULT, LVar6) + Call(SetCamDistance, CAM_DEFAULT, Float(470.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(16.0), Float(-9.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(50.0), Float(300.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(50.0), Float(200.0)) + Call(SetCamPosC, CAM_DEFAULT, Float(0.0), Float(0.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_SetDoorRots) = { - EVT_CALL(MakeLerp, 0, 60, 30 * DT, EASING_LINEAR) - EVT_CALL(PlaySound, SOUND_KPA_QUIZ_DOORS_OPEN) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o100, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o101, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o145, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o146, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o102, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o103, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(StopSound, SOUND_NONE) - EVT_RETURN - EVT_END + Call(MakeLerp, 0, 60, 30 * DT, EASING_LINEAR) + Call(PlaySound, SOUND_KPA_QUIZ_DOORS_OPEN) + Label(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o100, 0, LVar0, 0) + Call(TranslateModel, MODEL_o101, 0, LVar0, 0) + Call(TranslateModel, MODEL_o145, 0, LVar0, 0) + Call(TranslateModel, MODEL_o146, 0, LVar0, 0) + Call(TranslateModel, MODEL_o102, 0, LVar0, 0) + Call(TranslateModel, MODEL_o103, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(StopSound, SOUND_NONE) + Return + End }; EvtScript N(EVS_CloseDoors) = { - EVT_CALL(MakeLerp, 60, 0, 30 * DT, EASING_LINEAR) - EVT_CALL(PlaySound, SOUND_KPA_QUIZ_DOORS_CLOSE) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o100, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o101, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o145, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o146, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o102, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o103, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(StopSound, SOUND_NONE) - EVT_RETURN - EVT_END + Call(MakeLerp, 60, 0, 30 * DT, EASING_LINEAR) + Call(PlaySound, SOUND_KPA_QUIZ_DOORS_CLOSE) + Label(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o100, 0, LVar0, 0) + Call(TranslateModel, MODEL_o101, 0, LVar0, 0) + Call(TranslateModel, MODEL_o145, 0, LVar0, 0) + Call(TranslateModel, MODEL_o146, 0, LVar0, 0) + Call(TranslateModel, MODEL_o102, 0, LVar0, 0) + Call(TranslateModel, MODEL_o103, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(StopSound, SOUND_NONE) + Return + End }; EvtScript N(EVS_ReleaseFrom_Door_0) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, LVar3) - EVT_CALL(SetNpcPos, NPC_SELF, -100, 0, 0) - EVT_CALL(RandInt, 40, LVar1) - EVT_ADD(LVar1, -120) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar1, 150, 30 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, LVar4) - EVT_CALL(BindNpcAI, NPC_SELF, LVar5) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, LVar3) + Call(SetNpcPos, NPC_SELF, -100, 0, 0) + Call(RandInt, 40, LVar1) + Add(LVar1, -120) + Call(NpcMoveTo, NPC_SELF, LVar1, 150, 30 * DT) + Call(SetNpcAnimation, NPC_SELF, LVar4) + Call(BindNpcAI, NPC_SELF, LVar5) + Return + End }; EvtScript N(EVS_ReleaseFrom_Door_1) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, LVar3) - EVT_CALL(SetNpcPos, NPC_SELF, 0, 0, 0) - EVT_CALL(RandInt, 40, LVar1) - EVT_ADD(LVar1, -20) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar1, 150, 30 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, LVar4) - EVT_CALL(BindNpcAI, NPC_SELF, LVar5) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, LVar3) + Call(SetNpcPos, NPC_SELF, 0, 0, 0) + Call(RandInt, 40, LVar1) + Add(LVar1, -20) + Call(NpcMoveTo, NPC_SELF, LVar1, 150, 30 * DT) + Call(SetNpcAnimation, NPC_SELF, LVar4) + Call(BindNpcAI, NPC_SELF, LVar5) + Return + End }; EvtScript N(EVS_ReleaseFrom_Door_2) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, LVar3) - EVT_CALL(SetNpcPos, NPC_SELF, 100, 0, 0) - EVT_CALL(RandInt, 40, LVar1) - EVT_ADD(LVar1, 80) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar1, 150, 30 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, LVar4) - EVT_CALL(BindNpcAI, NPC_SELF, LVar5) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, LVar3) + Call(SetNpcPos, NPC_SELF, 100, 0, 0) + Call(RandInt, 40, LVar1) + Add(LVar1, 80) + Call(NpcMoveTo, NPC_SELF, LVar1, 150, 30 * DT) + Call(SetNpcAnimation, NPC_SELF, LVar4) + Call(BindNpcAI, NPC_SELF, LVar5) + Return + End }; EvtScript N(EVS_WithdrawTo_Door_0) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, LVar3) - EVT_CALL(RandInt, 20 * DT, LVar1) - EVT_ADD(LVar1, 20 * DT) - EVT_CALL(NpcMoveTo, NPC_SELF, -100, 0, LVar1) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, LVar3) + Call(RandInt, 20 * DT, LVar1) + Add(LVar1, 20 * DT) + Call(NpcMoveTo, NPC_SELF, -100, 0, LVar1) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Return + End }; EvtScript N(EVS_WithdrawTo_Door_1) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, LVar3) - EVT_CALL(RandInt, 20 * DT, LVar1) - EVT_ADD(LVar1, 20 * DT) - EVT_CALL(NpcMoveTo, NPC_SELF, 0, 0, LVar1) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, LVar3) + Call(RandInt, 20 * DT, LVar1) + Add(LVar1, 20 * DT) + Call(NpcMoveTo, NPC_SELF, 0, 0, LVar1) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Return + End }; EvtScript N(EVS_WithdrawTo_Door_2) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, LVar3) - EVT_CALL(RandInt, 20 * DT, LVar1) - EVT_ADD(LVar1, 20 * DT) - EVT_CALL(NpcMoveTo, NPC_SELF, 100, 0, LVar1) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, LVar3) + Call(RandInt, 20 * DT, LVar1) + Add(LVar1, 20 * DT) + Call(NpcMoveTo, NPC_SELF, 100, 0, LVar1) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Return + End }; EvtScript N(EVS_ReleaseFrom_RandomDoor) = { - EVT_CALL(RandInt, 2, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_ReleaseFrom_Door_0)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_ReleaseFrom_Door_1)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_ReleaseFrom_Door_2)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(RandInt, 2, LVar0) + Switch(LVar0) + CaseEq(0) + ExecWait(N(EVS_ReleaseFrom_Door_0)) + CaseEq(1) + ExecWait(N(EVS_ReleaseFrom_Door_1)) + CaseEq(2) + ExecWait(N(EVS_ReleaseFrom_Door_2)) + EndSwitch + Return + End }; EvtScript N(EVS_WithdrawTo_RandomDoor) = { - EVT_CALL(RandInt, 2, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_WithdrawTo_Door_0)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_WithdrawTo_Door_1)) - EVT_CASE_EQ(2) - EVT_EXEC_WAIT(N(EVS_WithdrawTo_Door_2)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(RandInt, 2, LVar0) + Switch(LVar0) + CaseEq(0) + ExecWait(N(EVS_WithdrawTo_Door_0)) + CaseEq(1) + ExecWait(N(EVS_WithdrawTo_Door_1)) + CaseEq(2) + ExecWait(N(EVS_WithdrawTo_Door_2)) + EndSwitch + Return + End }; EvtScript N(EVS_NpcIdle_Goomba) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_Release_Goomba) = { - EVT_SET(LVar3, ANIM_Goomba_Run) - EVT_SET(LVar4, ANIM_Goomba_Idle) - EVT_SET(LVar5, EVT_PTR(N(EVS_NpcAI_Short))) - EVT_EXEC_WAIT(N(EVS_ReleaseFrom_RandomDoor)) - EVT_RETURN - EVT_END + Set(LVar3, ANIM_Goomba_Run) + Set(LVar4, ANIM_Goomba_Idle) + Set(LVar5, Ref(N(EVS_NpcAI_Short))) + ExecWait(N(EVS_ReleaseFrom_RandomDoor)) + Return + End }; EvtScript N(EVS_Withdraw_Goomba) = { - EVT_SET(LVar3, ANIM_Goomba_Run) - EVT_EXEC_WAIT(N(EVS_WithdrawTo_RandomDoor)) - EVT_RETURN - EVT_END + Set(LVar3, ANIM_Goomba_Run) + ExecWait(N(EVS_WithdrawTo_RandomDoor)) + Return + End }; EvtScript N(EVS_NpcIdle_ShyGuy) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_Release_RedShyGuy) = { - EVT_SET(LVar3, ANIM_ShyGuy_Red_Anim04) - EVT_SET(LVar4, ANIM_ShyGuy_Red_Anim01) - EVT_SET(LVar5, EVT_PTR(N(EVS_NpcAI_ShyGuy))) - EVT_EXEC_WAIT(N(EVS_ReleaseFrom_RandomDoor)) - EVT_RETURN - EVT_END + Set(LVar3, ANIM_ShyGuy_Red_Anim04) + Set(LVar4, ANIM_ShyGuy_Red_Anim01) + Set(LVar5, Ref(N(EVS_NpcAI_ShyGuy))) + ExecWait(N(EVS_ReleaseFrom_RandomDoor)) + Return + End }; EvtScript N(EVS_Withdraw_RedShyGuy) = { - EVT_SET(LVar3, ANIM_ShyGuy_Red_Anim04) - EVT_EXEC_WAIT(N(EVS_WithdrawTo_RandomDoor)) - EVT_RETURN - EVT_END + Set(LVar3, ANIM_ShyGuy_Red_Anim04) + ExecWait(N(EVS_WithdrawTo_RandomDoor)) + Return + End }; EvtScript N(EVS_Release_RedShyGuy_Door_1) = { - EVT_SET(LVar3, ANIM_ShyGuy_Red_Anim04) - EVT_SET(LVar4, ANIM_ShyGuy_Red_Anim01) - EVT_SET(LVar5, EVT_PTR(N(EVS_NpcAI_ShyGuy))) - EVT_EXEC_WAIT(N(EVS_ReleaseFrom_Door_1)) - EVT_RETURN - EVT_END + Set(LVar3, ANIM_ShyGuy_Red_Anim04) + Set(LVar4, ANIM_ShyGuy_Red_Anim01) + Set(LVar5, Ref(N(EVS_NpcAI_ShyGuy))) + ExecWait(N(EVS_ReleaseFrom_Door_1)) + Return + End }; EvtScript N(EVS_Withdraw_RedShyGuy_Door_1) = { - EVT_SET(LVar3, ANIM_ShyGuy_Red_Anim04) - EVT_EXEC_WAIT(N(EVS_WithdrawTo_Door_1)) - EVT_RETURN - EVT_END + Set(LVar3, ANIM_ShyGuy_Red_Anim04) + ExecWait(N(EVS_WithdrawTo_Door_1)) + Return + End }; EvtScript N(EVS_Release_BlueShyGuy) = { - EVT_SET(LVar3, ANIM_ShyGuy_Blue_Anim04) - EVT_SET(LVar4, ANIM_ShyGuy_Blue_Anim01) - EVT_SET(LVar5, EVT_PTR(N(EVS_NpcAI_ShyGuy))) - EVT_EXEC_WAIT(N(EVS_ReleaseFrom_RandomDoor)) - EVT_RETURN - EVT_END + Set(LVar3, ANIM_ShyGuy_Blue_Anim04) + Set(LVar4, ANIM_ShyGuy_Blue_Anim01) + Set(LVar5, Ref(N(EVS_NpcAI_ShyGuy))) + ExecWait(N(EVS_ReleaseFrom_RandomDoor)) + Return + End }; EvtScript N(EVS_Withdraw_BlueShyGuy) = { - EVT_SET(LVar3, ANIM_ShyGuy_Blue_Anim04) - EVT_EXEC_WAIT(N(EVS_WithdrawTo_RandomDoor)) - EVT_RETURN - EVT_END + Set(LVar3, ANIM_ShyGuy_Blue_Anim04) + ExecWait(N(EVS_WithdrawTo_RandomDoor)) + Return + End }; EvtScript N(EVS_Release_BlueShyGuy_Door_2) = { - EVT_SET(LVar3, ANIM_ShyGuy_Blue_Anim04) - EVT_SET(LVar4, ANIM_ShyGuy_Blue_Anim01) - EVT_SET(LVar5, EVT_PTR(N(EVS_NpcAI_ShyGuy))) - EVT_EXEC_WAIT(N(EVS_ReleaseFrom_Door_2)) - EVT_RETURN - EVT_END + Set(LVar3, ANIM_ShyGuy_Blue_Anim04) + Set(LVar4, ANIM_ShyGuy_Blue_Anim01) + Set(LVar5, Ref(N(EVS_NpcAI_ShyGuy))) + ExecWait(N(EVS_ReleaseFrom_Door_2)) + Return + End }; EvtScript N(EVS_Withdraw_BlueShyGuy_Door_2) = { - EVT_SET(LVar3, ANIM_ShyGuy_Blue_Anim04) - EVT_EXEC_WAIT(N(EVS_WithdrawTo_Door_2)) - EVT_RETURN - EVT_END + Set(LVar3, ANIM_ShyGuy_Blue_Anim04) + ExecWait(N(EVS_WithdrawTo_Door_2)) + Return + End }; EvtScript N(EVS_Release_GreenShyGuy) = { - EVT_SET(LVar3, ANIM_ShyGuy_Green_Anim04) - EVT_SET(LVar4, ANIM_ShyGuy_Green_Anim01) - EVT_SET(LVar5, EVT_PTR(N(EVS_NpcAI_ShyGuy))) - EVT_EXEC_WAIT(N(EVS_ReleaseFrom_RandomDoor)) - EVT_RETURN - EVT_END + Set(LVar3, ANIM_ShyGuy_Green_Anim04) + Set(LVar4, ANIM_ShyGuy_Green_Anim01) + Set(LVar5, Ref(N(EVS_NpcAI_ShyGuy))) + ExecWait(N(EVS_ReleaseFrom_RandomDoor)) + Return + End }; EvtScript N(EVS_Withdraw_GreenShyGuy) = { - EVT_SET(LVar3, ANIM_ShyGuy_Green_Anim04) - EVT_EXEC_WAIT(N(EVS_WithdrawTo_RandomDoor)) - EVT_RETURN - EVT_END + Set(LVar3, ANIM_ShyGuy_Green_Anim04) + ExecWait(N(EVS_WithdrawTo_RandomDoor)) + Return + End }; EvtScript N(EVS_NpcIdle_KoopaTroopa) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_Release_DarkTroopa) = { - EVT_SET(LVar3, ANIM_KoopaTroopa_Dark_Run) - EVT_SET(LVar4, ANIM_KoopaTroopa_Dark_Idle) - EVT_SET(LVar5, EVT_PTR(N(EVS_NpcAI_KoopaTroopa))) - EVT_EXEC_WAIT(N(EVS_ReleaseFrom_RandomDoor)) - EVT_RETURN - EVT_END + Set(LVar3, ANIM_KoopaTroopa_Dark_Run) + Set(LVar4, ANIM_KoopaTroopa_Dark_Idle) + Set(LVar5, Ref(N(EVS_NpcAI_KoopaTroopa))) + ExecWait(N(EVS_ReleaseFrom_RandomDoor)) + Return + End }; EvtScript N(EVS_Withdraw_DarkTroopa) = { - EVT_SET(LVar3, ANIM_KoopaTroopa_Dark_Run) - EVT_EXEC_WAIT(N(EVS_WithdrawTo_RandomDoor)) - EVT_RETURN - EVT_END + Set(LVar3, ANIM_KoopaTroopa_Dark_Run) + ExecWait(N(EVS_WithdrawTo_RandomDoor)) + Return + End }; EvtScript N(EVS_Release_KoopaTroopa) = { - EVT_SET(LVar3, ANIM_KoopaTroopa_Run) - EVT_SET(LVar4, ANIM_KoopaTroopa_Idle) - EVT_SET(LVar5, EVT_PTR(N(EVS_NpcAI_KoopaTroopa))) - EVT_EXEC_WAIT(N(EVS_ReleaseFrom_RandomDoor)) - EVT_RETURN - EVT_END + Set(LVar3, ANIM_KoopaTroopa_Run) + Set(LVar4, ANIM_KoopaTroopa_Idle) + Set(LVar5, Ref(N(EVS_NpcAI_KoopaTroopa))) + ExecWait(N(EVS_ReleaseFrom_RandomDoor)) + Return + End }; EvtScript N(EVS_Withdraw_KoopaTroopa) = { - EVT_SET(LVar3, ANIM_KoopaTroopa_Run) - EVT_EXEC_WAIT(N(EVS_WithdrawTo_RandomDoor)) - EVT_RETURN - EVT_END + Set(LVar3, ANIM_KoopaTroopa_Run) + ExecWait(N(EVS_WithdrawTo_RandomDoor)) + Return + End }; EvtScript N(EVS_NpcIdle_Bobomb) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_Release_Bobomb) = { - EVT_SET(LVar3, ANIM_WorldBobomb_Green_Run) - EVT_SET(LVar4, ANIM_WorldBobomb_Green_Idle) - EVT_SET(LVar5, EVT_PTR(N(EVS_NpcAI_Short))) - EVT_EXEC_WAIT(N(EVS_ReleaseFrom_RandomDoor)) - EVT_RETURN - EVT_END + Set(LVar3, ANIM_WorldBobomb_Green_Run) + Set(LVar4, ANIM_WorldBobomb_Green_Idle) + Set(LVar5, Ref(N(EVS_NpcAI_Short))) + ExecWait(N(EVS_ReleaseFrom_RandomDoor)) + Return + End }; EvtScript N(EVS_Withdraw_Bobomb) = { - EVT_SET(LVar3, ANIM_WorldBobomb_Green_Run) - EVT_EXEC_WAIT(N(EVS_WithdrawTo_RandomDoor)) - EVT_RETURN - EVT_END + Set(LVar3, ANIM_WorldBobomb_Green_Run) + ExecWait(N(EVS_WithdrawTo_RandomDoor)) + Return + End }; EvtScript N(EVS_Release_Bobomb_Door_0) = { - EVT_SET(LVar3, ANIM_WorldBobomb_Green_Run) - EVT_SET(LVar4, ANIM_WorldBobomb_Green_Idle) - EVT_SET(LVar5, EVT_PTR(N(EVS_NpcAI_Short))) - EVT_EXEC_WAIT(N(EVS_ReleaseFrom_Door_0)) - EVT_RETURN - EVT_END + Set(LVar3, ANIM_WorldBobomb_Green_Run) + Set(LVar4, ANIM_WorldBobomb_Green_Idle) + Set(LVar5, Ref(N(EVS_NpcAI_Short))) + ExecWait(N(EVS_ReleaseFrom_Door_0)) + Return + End }; EvtScript N(EVS_Withdraw_Bobomb_Door_0) = { - EVT_SET(LVar3, ANIM_WorldBobomb_Green_Run) - EVT_EXEC_WAIT(N(EVS_WithdrawTo_Door_0)) - EVT_RETURN - EVT_END + Set(LVar3, ANIM_WorldBobomb_Green_Run) + ExecWait(N(EVS_WithdrawTo_Door_0)) + Return + End }; // special 'script' used only to organize the quiz waves @@ -710,559 +710,559 @@ s32 N(QS_Withdraw_Wave_6)[] = { }; EvtScript N(EVS_Release_Wave) = { - EVT_SWITCH(AB_KPA82_QuizRound) - EVT_CASE_EQ(0) - EVT_USE_BUF(EVT_PTR(N(QS_Release_Wave_0))) - EVT_CASE_EQ(1) - EVT_USE_BUF(EVT_PTR(N(QS_Release_Wave_1))) - EVT_CASE_EQ(2) - EVT_USE_BUF(EVT_PTR(N(QS_Release_Wave_2))) - EVT_CASE_EQ(3) - EVT_USE_BUF(EVT_PTR(N(QS_Release_Wave_3))) - EVT_CASE_EQ(4) - EVT_USE_BUF(EVT_PTR(N(QS_Release_Wave_4))) - EVT_CASE_EQ(5) - EVT_USE_BUF(EVT_PTR(N(QS_Release_Wave_5))) - EVT_CASE_EQ(6) - EVT_USE_BUF(EVT_PTR(N(QS_Release_Wave_6))) - EVT_END_SWITCH - EVT_LOOP(0) - EVT_BUF_READ2(LVarA, LVarB) - EVT_IF_EQ(LVarA, -1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_IF_EQ(LVarA, -2) - EVT_WAIT(LVarB) - EVT_ELSE - EVT_CALL(BindNpcAI, LVarA, LVarB) - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Switch(AB_KPA82_QuizRound) + CaseEq(0) + UseBuf(Ref(N(QS_Release_Wave_0))) + CaseEq(1) + UseBuf(Ref(N(QS_Release_Wave_1))) + CaseEq(2) + UseBuf(Ref(N(QS_Release_Wave_2))) + CaseEq(3) + UseBuf(Ref(N(QS_Release_Wave_3))) + CaseEq(4) + UseBuf(Ref(N(QS_Release_Wave_4))) + CaseEq(5) + UseBuf(Ref(N(QS_Release_Wave_5))) + CaseEq(6) + UseBuf(Ref(N(QS_Release_Wave_6))) + EndSwitch + Loop(0) + BufRead2(LVarA, LVarB) + IfEq(LVarA, -1) + BreakLoop + EndIf + IfEq(LVarA, -2) + Wait(LVarB) + Else + Call(BindNpcAI, LVarA, LVarB) + EndIf + EndLoop + Return + End }; EvtScript N(EVS_Withdraw_Wave) = { - EVT_SWITCH(AB_KPA82_QuizRound) - EVT_CASE_EQ(0) - EVT_USE_BUF(EVT_PTR(N(QS_Withdraw_Wave_0))) - EVT_CASE_EQ(1) - EVT_USE_BUF(EVT_PTR(N(QS_Withdraw_Wave_1))) - EVT_CASE_EQ(2) - EVT_USE_BUF(EVT_PTR(N(QS_Withdraw_Wave_2))) - EVT_CASE_EQ(3) - EVT_USE_BUF(EVT_PTR(N(QS_Withdraw_Wave_3))) - EVT_CASE_EQ(4) - EVT_USE_BUF(EVT_PTR(N(QS_Withdraw_Wave_4))) - EVT_CASE_EQ(5) - EVT_USE_BUF(EVT_PTR(N(QS_Withdraw_Wave_5))) - EVT_CASE_EQ(6) - EVT_USE_BUF(EVT_PTR(N(QS_Withdraw_Wave_6))) - EVT_END_SWITCH - EVT_LOOP(0) - EVT_BUF_READ2(LVarA, LVarB) - EVT_IF_EQ(LVarA, -1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_IF_EQ(LVarA, -2) - EVT_WAIT(LVarB) - EVT_ELSE - EVT_CALL(BindNpcAI, LVarA, LVarB) - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Switch(AB_KPA82_QuizRound) + CaseEq(0) + UseBuf(Ref(N(QS_Withdraw_Wave_0))) + CaseEq(1) + UseBuf(Ref(N(QS_Withdraw_Wave_1))) + CaseEq(2) + UseBuf(Ref(N(QS_Withdraw_Wave_2))) + CaseEq(3) + UseBuf(Ref(N(QS_Withdraw_Wave_3))) + CaseEq(4) + UseBuf(Ref(N(QS_Withdraw_Wave_4))) + CaseEq(5) + UseBuf(Ref(N(QS_Withdraw_Wave_5))) + CaseEq(6) + UseBuf(Ref(N(QS_Withdraw_Wave_6))) + EndSwitch + Loop(0) + BufRead2(LVarA, LVarB) + IfEq(LVarA, -1) + BreakLoop + EndIf + IfEq(LVarA, -2) + Wait(LVarB) + Else + Call(BindNpcAI, LVarA, LVarB) + EndIf + EndLoop + Return + End }; EvtScript N(EVS_AskQuestion) = { - EVT_EXEC_WAIT(N(EVS_SetCam_AskQuestion)) - EVT_SWITCH(AB_KPA82_QuizRound) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_0035) - EVT_CALL(ShowChoice, MSG_Choice_0046) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LVar0, ANSWER_CORRECT) - EVT_ELSE - EVT_SET(LVar0, ANSWER_WRONG) - EVT_END_IF - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_0036) - EVT_CALL(ShowChoice, MSG_Choice_0047) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LVar0, ANSWER_CORRECT) - EVT_ELSE - EVT_SET(LVar0, ANSWER_WRONG) - EVT_END_IF - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_0037) - EVT_CALL(ShowChoice, MSG_Choice_0048) - EVT_IF_EQ(LVar0, 1) - EVT_SET(LVar0, ANSWER_CORRECT) - EVT_ELSE - EVT_SET(LVar0, ANSWER_WRONG) - EVT_END_IF - EVT_CASE_EQ(3) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_0038) - EVT_CALL(ShowChoice, MSG_Choice_0049) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LVar0, ANSWER_CORRECT) - EVT_ELSE - EVT_SET(LVar0, ANSWER_WRONG) - EVT_END_IF - EVT_CASE_EQ(4) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_0039) - EVT_CALL(ShowChoice, MSG_Choice_004A) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LVar0, ANSWER_CORRECT) - EVT_ELSE - EVT_SET(LVar0, ANSWER_WRONG) - EVT_END_IF - EVT_CASE_EQ(5) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_003A) - EVT_CALL(ShowChoice, MSG_Choice_004B) - EVT_IF_EQ(LVar0, 2) - EVT_SET(LVar0, ANSWER_CORRECT) - EVT_ELSE - EVT_SET(LVar0, ANSWER_WRONG) - EVT_END_IF - EVT_CASE_EQ(6) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_003B) - EVT_CALL(ShowChoice, MSG_Choice_004C) - EVT_IF_EQ(LVar0, 1) - EVT_SET(LVar0, ANSWER_CORRECT) - EVT_ELSE - EVT_SET(LVar0, ANSWER_WRONG) - EVT_END_IF - EVT_END_SWITCH - EVT_SET(MV_LastAnswerResult, LVar0) - EVT_CALL(CloseMessage) - EVT_RETURN - EVT_END + ExecWait(N(EVS_SetCam_AskQuestion)) + Switch(AB_KPA82_QuizRound) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_0035) + Call(ShowChoice, MSG_Choice_0046) + IfEq(LVar0, 0) + Set(LVar0, ANSWER_CORRECT) + Else + Set(LVar0, ANSWER_WRONG) + EndIf + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_0036) + Call(ShowChoice, MSG_Choice_0047) + IfEq(LVar0, 0) + Set(LVar0, ANSWER_CORRECT) + Else + Set(LVar0, ANSWER_WRONG) + EndIf + CaseEq(2) + Call(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_0037) + Call(ShowChoice, MSG_Choice_0048) + IfEq(LVar0, 1) + Set(LVar0, ANSWER_CORRECT) + Else + Set(LVar0, ANSWER_WRONG) + EndIf + CaseEq(3) + Call(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_0038) + Call(ShowChoice, MSG_Choice_0049) + IfEq(LVar0, 0) + Set(LVar0, ANSWER_CORRECT) + Else + Set(LVar0, ANSWER_WRONG) + EndIf + CaseEq(4) + Call(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_0039) + Call(ShowChoice, MSG_Choice_004A) + IfEq(LVar0, 0) + Set(LVar0, ANSWER_CORRECT) + Else + Set(LVar0, ANSWER_WRONG) + EndIf + CaseEq(5) + Call(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_003A) + Call(ShowChoice, MSG_Choice_004B) + IfEq(LVar0, 2) + Set(LVar0, ANSWER_CORRECT) + Else + Set(LVar0, ANSWER_WRONG) + EndIf + CaseEq(6) + Call(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_003B) + Call(ShowChoice, MSG_Choice_004C) + IfEq(LVar0, 1) + Set(LVar0, ANSWER_CORRECT) + Else + Set(LVar0, ANSWER_WRONG) + EndIf + EndSwitch + Set(MV_LastAnswerResult, LVar0) + Call(CloseMessage) + Return + End }; EvtScript N(EVS_ShowUnknownCard) = { - EVT_CALL(EnableModel, MODEL_m_, TRUE) - EVT_CALL(MakeLerp, 180, LVar0, 60 * DT, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_IF_GE(LVar0, 360) - EVT_CALL(RotateGroup, MODEL_g47, LVar0, 0, 1, 0) - EVT_CALL(EnableGroup, MODEL_g47, TRUE) - EVT_CALL(EnableModel, MODEL_m_, FALSE) - EVT_ELSE - EVT_CALL(RotateModel, MODEL_m_, LVar0, 0, 1, 0) - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_m_, TRUE) + Call(MakeLerp, 180, LVar0, 60 * DT, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + IfGe(LVar0, 360) + Call(RotateGroup, MODEL_g47, LVar0, 0, 1, 0) + Call(EnableGroup, MODEL_g47, TRUE) + Call(EnableModel, MODEL_m_, FALSE) + Else + Call(RotateModel, MODEL_m_, LVar0, 0, 1, 0) + EndIf + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_TetherResultCardToDummyPos) = { - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_Dummy, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 0) - EVT_SUB(LVar1, 130) - EVT_SUB(LVar2, 50) - EVT_CALL(TranslateModel, LVarA, LVar0, LVar1, LVar2) - EVT_IF_EQ(LVarA, 85) - EVT_CALL(RotateModel, MODEL_b_kai, 180, 0, 1, 0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetNpcPos, NPC_Dummy, LVar0, LVar1, LVar2) + Sub(LVar0, 0) + Sub(LVar1, 130) + Sub(LVar2, 50) + Call(TranslateModel, LVarA, LVar0, LVar1, LVar2) + IfEq(LVarA, 85) + Call(RotateModel, MODEL_b_kai, 180, 0, 1, 0) + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_ScaleResultCard) = { - EVT_CALL(EnableModel, LVarA, TRUE) - EVT_CALL(MakeLerp, 100, 50, 30 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar6, LVar0) - EVT_MULF(LVar6, EVT_FLOAT(0.01)) - EVT_CALL(ScaleModel, LVarA, LVar6, LVar6, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(EnableModel, LVarA, TRUE) + Call(MakeLerp, 100, 50, 30 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + SetF(LVar6, LVar0) + MulF(LVar6, Float(0.01)) + Call(ScaleModel, LVarA, LVar6, LVar6, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_MoveCardToScoreboard) = { - EVT_CALL(EnableModel, LVarA, TRUE) - EVT_CALL(SetNpcPos, NPC_Dummy, 0, 130, 50) - EVT_EXEC_GET_TID(N(EVS_TetherResultCardToDummyPos), LVarB) - EVT_EXEC(N(EVS_ScaleResultCard)) - EVT_WAIT(1) - EVT_SWITCH(AB_KPA82_QuizRound) - EVT_CASE_EQ(0) - EVT_SET(LVar0, 118) - EVT_SET(LVar1, 148) - EVT_SET(LVar2, 3) - EVT_CASE_EQ(1) - EVT_SET(LVar0, 78) - EVT_SET(LVar1, 148) - EVT_SET(LVar2, 3) - EVT_CASE_EQ(2) - EVT_SET(LVar0, 38) - EVT_SET(LVar1, 148) - EVT_SET(LVar2, 3) - EVT_CASE_EQ(3) - EVT_SET(LVar0, -1) - EVT_SET(LVar1, 148) - EVT_SET(LVar2, 3) - EVT_CASE_EQ(4) - EVT_SET(LVar0, -41) - EVT_SET(LVar1, 148) - EVT_SET(LVar2, 3) - EVT_CASE_EQ(5) - EVT_SET(LVar0, -81) - EVT_SET(LVar1, 148) - EVT_SET(LVar2, 3) - EVT_CASE_EQ(6) - EVT_SET(LVar0, -121) - EVT_SET(LVar1, 148) - EVT_SET(LVar2, 3) - EVT_END_SWITCH - EVT_CALL(SetNpcJumpscale, NPC_Dummy, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump1, NPC_Dummy, LVar0, LVar1, LVar2, 30 * DT) - EVT_CALL(SetNpcPos, NPC_Dummy, 184, 20, 150) - EVT_KILL_THREAD(LVarB) - EVT_RETURN - EVT_END + Call(EnableModel, LVarA, TRUE) + Call(SetNpcPos, NPC_Dummy, 0, 130, 50) + ExecGetTID(N(EVS_TetherResultCardToDummyPos), LVarB) + Exec(N(EVS_ScaleResultCard)) + Wait(1) + Switch(AB_KPA82_QuizRound) + CaseEq(0) + Set(LVar0, 118) + Set(LVar1, 148) + Set(LVar2, 3) + CaseEq(1) + Set(LVar0, 78) + Set(LVar1, 148) + Set(LVar2, 3) + CaseEq(2) + Set(LVar0, 38) + Set(LVar1, 148) + Set(LVar2, 3) + CaseEq(3) + Set(LVar0, -1) + Set(LVar1, 148) + Set(LVar2, 3) + CaseEq(4) + Set(LVar0, -41) + Set(LVar1, 148) + Set(LVar2, 3) + CaseEq(5) + Set(LVar0, -81) + Set(LVar1, 148) + Set(LVar2, 3) + CaseEq(6) + Set(LVar0, -121) + Set(LVar1, 148) + Set(LVar2, 3) + EndSwitch + Call(SetNpcJumpscale, NPC_Dummy, Float(0.0)) + Call(NpcJump1, NPC_Dummy, LVar0, LVar1, LVar2, 30 * DT) + Call(SetNpcPos, NPC_Dummy, 184, 20, 150) + KillThread(LVarB) + Return + End }; EvtScript N(EVS_GetCorrectScoreboardModel) = { - EVT_SWITCH(AB_KPA82_QuizRound) - EVT_CASE_EQ(0) - EVT_SET(LVar0, MODEL_m1) - EVT_CASE_EQ(1) - EVT_SET(LVar0, MODEL_m2) - EVT_CASE_EQ(2) - EVT_SET(LVar0, MODEL_m3) - EVT_CASE_EQ(3) - EVT_SET(LVar0, MODEL_m4) - EVT_CASE_EQ(4) - EVT_SET(LVar0, MODEL_m5) - EVT_CASE_EQ(5) - EVT_SET(LVar0, MODEL_m6) - EVT_CASE_EQ(6) - EVT_SET(LVar0, MODEL_m7) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(AB_KPA82_QuizRound) + CaseEq(0) + Set(LVar0, MODEL_m1) + CaseEq(1) + Set(LVar0, MODEL_m2) + CaseEq(2) + Set(LVar0, MODEL_m3) + CaseEq(3) + Set(LVar0, MODEL_m4) + CaseEq(4) + Set(LVar0, MODEL_m5) + CaseEq(5) + Set(LVar0, MODEL_m6) + CaseEq(6) + Set(LVar0, MODEL_m7) + EndSwitch + Return + End }; EvtScript N(EVS_GetWrongScoreboardModel) = { - EVT_SWITCH(AB_KPA82_QuizRound) - EVT_CASE_EQ(0) - EVT_SET(LVar0, MODEL_b1) - EVT_CASE_EQ(1) - EVT_SET(LVar0, MODEL_b2) - EVT_CASE_EQ(2) - EVT_SET(LVar0, MODEL_b3) - EVT_CASE_EQ(3) - EVT_SET(LVar0, MODEL_b4) - EVT_CASE_EQ(4) - EVT_SET(LVar0, MODEL_b5) - EVT_CASE_EQ(5) - EVT_SET(LVar0, MODEL_b6) - EVT_CASE_EQ(6) - EVT_SET(LVar0, MODEL_b7) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(AB_KPA82_QuizRound) + CaseEq(0) + Set(LVar0, MODEL_b1) + CaseEq(1) + Set(LVar0, MODEL_b2) + CaseEq(2) + Set(LVar0, MODEL_b3) + CaseEq(3) + Set(LVar0, MODEL_b4) + CaseEq(4) + Set(LVar0, MODEL_b5) + CaseEq(5) + Set(LVar0, MODEL_b6) + CaseEq(6) + Set(LVar0, MODEL_b7) + EndSwitch + Return + End }; EvtScript N(EVS_ShowResultCard) = { - EVT_SET(LVar6, EVT_FLOAT(2.0 / DT)) - EVT_EXEC_WAIT(N(EVS_SetCam_ViewRoom)) - EVT_WAIT(5) - EVT_IF_EQ(MV_LastAnswerResult, ANSWER_CORRECT) - EVT_SET(LVar0, 2160) - EVT_EXEC_WAIT(N(EVS_ShowUnknownCard)) - EVT_CALL(PlaySound, SOUND_APPROVE) - EVT_WAIT(10 * DT) - EVT_CALL(EnableGroup, MODEL_g47, FALSE) - EVT_SET(LVarA, MODEL_m_kai) - EVT_EXEC_WAIT(N(EVS_MoveCardToScoreboard)) - EVT_EXEC_WAIT(N(EVS_GetCorrectScoreboardModel)) - EVT_CALL(EnableModel, MODEL_m_kai, FALSE) - EVT_CALL(EnableModel, LVar0, TRUE) - EVT_WAIT(30 * DT) - EVT_ELSE - EVT_SET(LVar0, 2340) - EVT_EXEC_WAIT(N(EVS_ShowUnknownCard)) - EVT_CALL(PlaySound, SOUND_MENU_ERROR) - EVT_WAIT(10 * DT) - EVT_CALL(EnableGroup, MODEL_g47, FALSE) - EVT_SET(LVarA, MODEL_b_kai) - EVT_EXEC_WAIT(N(EVS_MoveCardToScoreboard)) - EVT_EXEC_WAIT(N(EVS_GetWrongScoreboardModel)) - EVT_CALL(EnableModel, MODEL_b_kai, FALSE) - EVT_CALL(EnableModel, LVar0, TRUE) - EVT_WAIT(30 * DT) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_SetCam_AfterResult)) - EVT_RETURN - EVT_END + Set(LVar6, Float(2.0 / DT)) + ExecWait(N(EVS_SetCam_ViewRoom)) + Wait(5) + IfEq(MV_LastAnswerResult, ANSWER_CORRECT) + Set(LVar0, 2160) + ExecWait(N(EVS_ShowUnknownCard)) + Call(PlaySound, SOUND_APPROVE) + Wait(10 * DT) + Call(EnableGroup, MODEL_g47, FALSE) + Set(LVarA, MODEL_m_kai) + ExecWait(N(EVS_MoveCardToScoreboard)) + ExecWait(N(EVS_GetCorrectScoreboardModel)) + Call(EnableModel, MODEL_m_kai, FALSE) + Call(EnableModel, LVar0, TRUE) + Wait(30 * DT) + Else + Set(LVar0, 2340) + ExecWait(N(EVS_ShowUnknownCard)) + Call(PlaySound, SOUND_MENU_ERROR) + Wait(10 * DT) + Call(EnableGroup, MODEL_g47, FALSE) + Set(LVarA, MODEL_b_kai) + ExecWait(N(EVS_MoveCardToScoreboard)) + ExecWait(N(EVS_GetWrongScoreboardModel)) + Call(EnableModel, MODEL_b_kai, FALSE) + Call(EnableModel, LVar0, TRUE) + Wait(30 * DT) + EndIf + ExecWait(N(EVS_SetCam_AfterResult)) + Return + End }; EvtScript N(EVS_NpcIdle_Door) = { - EVT_LABEL(1) - EVT_WAIT(1) - EVT_IF_EQ(GF_KPA82_PassedThroughDoor, FALSE) - EVT_GOTO(1) - EVT_END_IF - EVT_SET(GF_KPA82_PassedThroughDoor, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC_WAIT(N(EVS_SetCam_MeetingDoor)) - EVT_SET(MF_Sync_MusicChange, FALSE) - EVT_THREAD - EVT_CALL(SetMusicTrack, 0, SONG_FINAL_BOWSER_BATTLE, 1, 8) - EVT_WAIT(150 * DT) - EVT_IF_NE(MF_Sync_MusicChange, FALSE) - EVT_GOTO(5) - EVT_END_IF - EVT_CALL(FadeOutMusic, 0, 250) - EVT_WAIT(15 * DT) - EVT_IF_NE(MF_Sync_MusicChange, FALSE) - EVT_GOTO(5) - EVT_END_IF - EVT_EXEC(N(EVS_SetupMusic)) - EVT_LABEL(5) - EVT_END_THREAD - EVT_IF_EQ(GF_KPA82_SpokeToDoor, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_002E) - EVT_SET(GF_KPA82_SpokeToDoor, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_002F) - EVT_END_IF - EVT_CALL(ShowChoice, MSG_Choice_0013) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_0031) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_0030) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_SET(GF_KPA82_PassedThroughDoor, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(ShowChoice, MSG_Choice_0013) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_0032) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_0033) - EVT_END_IF - EVT_CALL(DisablePartnerAI, 0) - EVT_THREAD - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o166, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(2.0)) - EVT_CALL(PlayerMoveTo, 175, 236, 20) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o166, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(2.5)) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_CALL(NpcMoveTo, NPC_PARTNER, 205, 236, 20) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_SELF, 0) - EVT_END_THREAD - EVT_SET(AB_KPA82_QuizRound, 0) - EVT_SET(AB_KPA82_RightAnswers, 0) - EVT_SET(AB_KPA82_WrongAnswers, 0) - EVT_LABEL(10) - EVT_SET(LVar6, EVT_FLOAT(2.0 / DT)) - EVT_EXEC_WAIT(N(EVS_SetCam_ViewRoom)) - EVT_SET(MF_Sync_MusicChange, TRUE) - EVT_WAIT(2) - EVT_CALL(SetMusicTrack, 0, SONG_NORMAL_BATTLE, 0, 8) - EVT_EXEC_WAIT(N(EVS_SetDoorRots)) - EVT_EXEC_WAIT(N(EVS_Release_Wave)) - EVT_WAIT(200 * DT) - EVT_THREAD - EVT_CALL(ShowMessageAtScreenPos, MSG_CH8_0034, 300, 200) - EVT_SET(MV_Sync_TimesUp, TRUE) - EVT_END_THREAD - EVT_WAIT(60 * DT) - EVT_EXEC_WAIT(N(EVS_Withdraw_Wave)) - EVT_WAIT(35 * DT) - EVT_EXEC_WAIT(N(EVS_CloseDoors)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_WAIT(30 * DT) - EVT_LABEL(12) - EVT_WAIT(1) - EVT_IF_EQ(MV_Sync_TimesUp, FALSE) - EVT_GOTO(12) - EVT_END_IF - EVT_SET(MV_Sync_TimesUp, FALSE) - EVT_EXEC_WAIT(N(EVS_AskQuestion)) - EVT_EXEC_WAIT(N(EVS_ShowResultCard)) - EVT_IF_EQ(MV_LastAnswerResult, ANSWER_CORRECT) - EVT_ADD(AB_KPA82_RightAnswers, 1) - EVT_IF_EQ(AB_KPA82_RightAnswers, 5) - EVT_GOTO(30) - EVT_END_IF - EVT_IF_EQ(AB_KPA82_RightAnswers, 4) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_003D) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_003C) - EVT_END_IF - EVT_ELSE - EVT_ADD(AB_KPA82_WrongAnswers, 1) - EVT_IF_EQ(AB_KPA82_WrongAnswers, 3) - EVT_GOTO(20) - EVT_END_IF - EVT_IF_EQ(AB_KPA82_WrongAnswers, 1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_003E) - EVT_END_IF - EVT_IF_EQ(AB_KPA82_WrongAnswers, 2) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_0040) - EVT_END_IF - EVT_END_IF - EVT_ADD(AB_KPA82_QuizRound, 1) - EVT_GOTO(10) - EVT_LABEL(20) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_0041) - EVT_SET(LVar6, EVT_FLOAT(2.0 / DT)) - EVT_EXEC_WAIT(N(EVS_SetCam_ViewRoom)) - EVT_CALL(SetNpcPos, NPC_AntiGuy_01, -100, 0, 0) - EVT_CALL(SetNpcPos, NPC_AntiGuy_02, 0, 0, 0) - EVT_CALL(SetNpcPos, NPC_AntiGuy_03, 100, 0, 0) - EVT_CALL(InterpPlayerYaw, 315, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 315, 0) - EVT_EXEC_WAIT(N(EVS_SetDoorRots)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_0042) - EVT_CALL(PlayerFaceNpc, NPC_AntiGuy_02, 5) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_SET(LVar6, EVT_FLOAT(3.0 / DT)) - EVT_EXEC_WAIT(N(EVS_SetCam_BeforeBattle)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_AntiGuy_01, ANIM_ShyGuy_Black_Anim04) - EVT_CALL(NpcMoveTo, NPC_AntiGuy_01, LVar0, LVar2, 30 * DT) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_AntiGuy_02, ANIM_ShyGuy_Black_Anim04) - EVT_CALL(NpcMoveTo, NPC_AntiGuy_02, LVar0, LVar2, 30 * DT) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_AntiGuy_03, ANIM_ShyGuy_Black_Anim04) - EVT_CALL(NpcMoveTo, NPC_AntiGuy_03, LVar0, LVar2, 30 * DT) - EVT_END_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_EXEC_WAIT(N(EVS_SetCam_AfterBattle)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_0043) - EVT_GOTO(40) - EVT_LABEL(30) - EVT_THREAD - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o166, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PlayerMoveTo, 120, 145, 0) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o166, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(3.5 * DT)) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_CALL(NpcMoveTo, NPC_PARTNER, 80, 145, 0) - EVT_CALL(EnablePartnerAI) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_003F) - EVT_LABEL(40) - EVT_CALL(EnablePartnerAI) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_SET(GB_KPA82_BowserDoorState, 1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_61_0)), TRIGGER_WALL_PRESS_A, COLLIDER_o166, 1, 0) - EVT_RETURN - EVT_END + Label(1) + Wait(1) + IfEq(GF_KPA82_PassedThroughDoor, FALSE) + Goto(1) + EndIf + Set(GF_KPA82_PassedThroughDoor, FALSE) + Call(DisablePlayerInput, TRUE) + ExecWait(N(EVS_SetCam_MeetingDoor)) + Set(MF_Sync_MusicChange, FALSE) + Thread + Call(SetMusicTrack, 0, SONG_FINAL_BOWSER_BATTLE, 1, 8) + Wait(150 * DT) + IfNe(MF_Sync_MusicChange, FALSE) + Goto(5) + EndIf + Call(FadeOutMusic, 0, 250) + Wait(15 * DT) + IfNe(MF_Sync_MusicChange, FALSE) + Goto(5) + EndIf + Exec(N(EVS_SetupMusic)) + Label(5) + EndThread + IfEq(GF_KPA82_SpokeToDoor, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_002E) + Set(GF_KPA82_SpokeToDoor, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_002F) + EndIf + Call(ShowChoice, MSG_Choice_0013) + IfEq(LVar0, 0) + Call(ContinueSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_0031) + Else + Call(ContinueSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_0030) + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Set(GF_KPA82_PassedThroughDoor, FALSE) + Call(DisablePlayerInput, FALSE) + Goto(1) + EndIf + Call(ShowChoice, MSG_Choice_0013) + IfEq(LVar0, 0) + Call(ContinueSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_0032) + Else + Call(ContinueSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_0033) + EndIf + Call(DisablePartnerAI, 0) + Thread + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o166, COLLIDER_FLAGS_UPPER_MASK) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerSpeed, Float(2.0)) + Call(PlayerMoveTo, 175, 236, 20) + Call(InterpPlayerYaw, 270, 0) + Call(DisablePlayerPhysics, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o166, COLLIDER_FLAGS_UPPER_MASK) + EndThread + Thread + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) + Call(SetNpcSpeed, NPC_PARTNER, Float(2.5)) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + Call(NpcMoveTo, NPC_PARTNER, 205, 236, 20) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(NpcFaceNpc, NPC_PARTNER, NPC_SELF, 0) + EndThread + Set(AB_KPA82_QuizRound, 0) + Set(AB_KPA82_RightAnswers, 0) + Set(AB_KPA82_WrongAnswers, 0) + Label(10) + Set(LVar6, Float(2.0 / DT)) + ExecWait(N(EVS_SetCam_ViewRoom)) + Set(MF_Sync_MusicChange, TRUE) + Wait(2) + Call(SetMusicTrack, 0, SONG_NORMAL_BATTLE, 0, 8) + ExecWait(N(EVS_SetDoorRots)) + ExecWait(N(EVS_Release_Wave)) + Wait(200 * DT) + Thread + Call(ShowMessageAtScreenPos, MSG_CH8_0034, 300, 200) + Set(MV_Sync_TimesUp, TRUE) + EndThread + Wait(60 * DT) + ExecWait(N(EVS_Withdraw_Wave)) + Wait(35 * DT) + ExecWait(N(EVS_CloseDoors)) + Exec(N(EVS_SetupMusic)) + Wait(30 * DT) + Label(12) + Wait(1) + IfEq(MV_Sync_TimesUp, FALSE) + Goto(12) + EndIf + Set(MV_Sync_TimesUp, FALSE) + ExecWait(N(EVS_AskQuestion)) + ExecWait(N(EVS_ShowResultCard)) + IfEq(MV_LastAnswerResult, ANSWER_CORRECT) + Add(AB_KPA82_RightAnswers, 1) + IfEq(AB_KPA82_RightAnswers, 5) + Goto(30) + EndIf + IfEq(AB_KPA82_RightAnswers, 4) + Call(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_003D) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_003C) + EndIf + Else + Add(AB_KPA82_WrongAnswers, 1) + IfEq(AB_KPA82_WrongAnswers, 3) + Goto(20) + EndIf + IfEq(AB_KPA82_WrongAnswers, 1) + Call(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_003E) + EndIf + IfEq(AB_KPA82_WrongAnswers, 2) + Call(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_0040) + EndIf + EndIf + Add(AB_KPA82_QuizRound, 1) + Goto(10) + Label(20) + Call(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_0041) + Set(LVar6, Float(2.0 / DT)) + ExecWait(N(EVS_SetCam_ViewRoom)) + Call(SetNpcPos, NPC_AntiGuy_01, -100, 0, 0) + Call(SetNpcPos, NPC_AntiGuy_02, 0, 0, 0) + Call(SetNpcPos, NPC_AntiGuy_03, 100, 0, 0) + Call(InterpPlayerYaw, 315, 0) + Call(InterpNpcYaw, NPC_PARTNER, 315, 0) + ExecWait(N(EVS_SetDoorRots)) + Call(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_0042) + Call(PlayerFaceNpc, NPC_AntiGuy_02, 5) + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Set(LVar6, Float(3.0 / DT)) + ExecWait(N(EVS_SetCam_BeforeBattle)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Thread + Call(SetNpcAnimation, NPC_AntiGuy_01, ANIM_ShyGuy_Black_Anim04) + Call(NpcMoveTo, NPC_AntiGuy_01, LVar0, LVar2, 30 * DT) + EndThread + Thread + Call(SetNpcAnimation, NPC_AntiGuy_02, ANIM_ShyGuy_Black_Anim04) + Call(NpcMoveTo, NPC_AntiGuy_02, LVar0, LVar2, 30 * DT) + EndThread + Thread + Call(SetNpcAnimation, NPC_AntiGuy_03, ANIM_ShyGuy_Black_Anim04) + Call(NpcMoveTo, NPC_AntiGuy_03, LVar0, LVar2, 30 * DT) + EndThread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + ExecWait(N(EVS_SetCam_AfterBattle)) + Call(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_0043) + Goto(40) + Label(30) + Thread + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o166, COLLIDER_FLAGS_UPPER_MASK) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerSpeed, Float(3.0 / DT)) + Call(PlayerMoveTo, 120, 145, 0) + Call(InterpPlayerYaw, 90, 0) + Call(DisablePlayerPhysics, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o166, COLLIDER_FLAGS_UPPER_MASK) + EndThread + Thread + Call(DisablePartnerAI, 0) + Call(SetNpcSpeed, NPC_PARTNER, Float(3.5 * DT)) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + Call(NpcMoveTo, NPC_PARTNER, 80, 145, 0) + Call(EnablePartnerAI) + EndThread + Call(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim01, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH8_003F) + Label(40) + Call(EnablePartnerAI) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Set(GB_KPA82_BowserDoorState, 1) + Call(DisablePlayerInput, FALSE) + BindTrigger(Ref(N(EVS_ExitDoors_kpa_61_0)), TRIGGER_WALL_PRESS_A, COLLIDER_o166, 1, 0) + Return + End }; EvtScript N(EVS_NpcDefeat_Door) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(SetNpcPos, NPC_AntiGuy_01, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_AntiGuy_02, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_AntiGuy_03, NPC_DISPOSE_LOCATION) - EVT_CALL(SetPlayerPos, 120, 0, 145) - EVT_CALL(SetNpcPos, NPC_PARTNER, 80, 0, 145) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_CALL(TranslateModel, MODEL_o100, 0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o101, 0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o145, 0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o146, 0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o102, 0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o103, 0, 0, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(SetNpcPos, NPC_AntiGuy_01, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_AntiGuy_02, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_AntiGuy_03, NPC_DISPOSE_LOCATION) + Call(SetPlayerPos, 120, 0, 145) + Call(SetNpcPos, NPC_PARTNER, 80, 0, 145) + Call(InterpPlayerYaw, 90, 0) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + Call(TranslateModel, MODEL_o100, 0, 0, 0) + Call(TranslateModel, MODEL_o101, 0, 0, 0) + Call(TranslateModel, MODEL_o145, 0, 0, 0) + Call(TranslateModel, MODEL_o146, 0, 0, 0) + Call(TranslateModel, MODEL_o102, 0, 0, 0) + Call(TranslateModel, MODEL_o103, 0, 0, 0) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Door) = { - EVT_IF_EQ(GB_KPA82_BowserDoorState, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Door))) - EVT_END_IF - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Door))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, 184, 20, 150) - EVT_RETURN - EVT_END + IfEq(GB_KPA82_BowserDoorState, 0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Door))) + EndIf + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Door))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcPos, NPC_SELF, 184, 20, 150) + Return + End }; EvtScript N(EVS_NpcInit_Goomba) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Goomba))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Goomba))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_ShyGuy) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_ShyGuy))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_ShyGuy))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_KoopaTroopa) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_KoopaTroopa))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_KoopaTroopa))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Bobomb) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Bobomb))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Bobomb))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_AntiGuy) = { - EVT_RETURN - EVT_END + Return + End }; NpcData N(NpcData_AntiGuys)[] = { diff --git a/src/world/area_kpa/kpa_83/kpa_83_1_music.c b/src/world/area_kpa/kpa_83/kpa_83_1_music.c index 7e1d42fd0bf..b81e60b07c3 100644 --- a/src/world/area_kpa/kpa_83/kpa_83_1_music.c +++ b/src/world/area_kpa/kpa_83/kpa_83_1_music.c @@ -1,12 +1,12 @@ #include "kpa_83.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_83/kpa_83_2_main.c b/src/world/area_kpa/kpa_83/kpa_83_2_main.c index f78a1f2b8b9..a6e1f59f6a8 100644 --- a/src/world/area_kpa/kpa_83/kpa_83_2_main.c +++ b/src/world/area_kpa/kpa_83/kpa_83_2_main.c @@ -29,74 +29,74 @@ s32 N(LeftDoorModels)[] = { EvtScript N(EVS_ExitDoors_kpa_53_1) = EVT_EXIT_DOUBLE_DOOR(kpa_83_ENTRY_0, "kpa_53", kpa_53_ENTRY_1, COLLIDER_deilittw, MODEL_o174, MODEL_o173); EvtScript N(EVS_ExitDoors_kpa_121_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, kpa_83_ENTRY_1) - EVT_SET(LVar1, COLLIDER_o166) - EVT_SET(LVar2, EVT_PTR(N(RightDoorModels))) - EVT_SET(LVar3, EVT_PTR(N(LeftDoorModels))) - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kpa_121"), kpa_121_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, kpa_83_ENTRY_1) + Set(LVar1, COLLIDER_o166) + Set(LVar2, Ref(N(RightDoorModels))) + Set(LVar3, Ref(N(LeftDoorModels))) + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("kpa_121"), kpa_121_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_53_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_121_0)), TRIGGER_WALL_PRESS_A, COLLIDER_o166, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_kpa_53_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_kpa_121_0)), TRIGGER_WALL_PRESS_A, COLLIDER_o166, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kpa_83_ENTRY_0) - EVT_SET(LVar0, kpa_83_ENTRY_0) - EVT_SET(LVar2, MODEL_o174) - EVT_SET(LVar3, MODEL_o173) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(kpa_83_ENTRY_1) - EVT_SET(LVar0, kpa_83_ENTRY_1) - EVT_SET(LVar2, EVT_PTR(N(LeftDoorModels))) - EVT_SET(LVar3, EVT_PTR(N(RightDoorModels))) - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kpa_83_ENTRY_0) + Set(LVar0, kpa_83_ENTRY_0) + Set(LVar2, MODEL_o174) + Set(LVar3, MODEL_o173) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(kpa_83_ENTRY_1) + Set(LVar0, kpa_83_ENTRY_1) + Set(LVar2, Ref(N(LeftDoorModels))) + Set(LVar3, Ref(N(RightDoorModels))) + ExecWait(BaseEnterDoor) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(EnableModel, MODEL_o166, FALSE) - EVT_CALL(EnableModel, MODEL_m_, FALSE) - EVT_CALL(EnableModel, MODEL_m_kai, FALSE) - EVT_CALL(EnableModel, MODEL_m1, FALSE) - EVT_CALL(EnableModel, MODEL_m2, FALSE) - EVT_CALL(EnableModel, MODEL_m3, FALSE) - EVT_CALL(EnableModel, MODEL_m4, FALSE) - EVT_CALL(EnableModel, MODEL_m5, FALSE) - EVT_CALL(EnableModel, MODEL_m6, FALSE) - EVT_CALL(EnableModel, MODEL_m7, FALSE) - EVT_CALL(EnableModel, MODEL_b_, FALSE) - EVT_CALL(EnableModel, MODEL_b_kai, FALSE) - EVT_CALL(EnableModel, MODEL_b1, FALSE) - EVT_CALL(EnableModel, MODEL_b2, FALSE) - EVT_CALL(EnableModel, MODEL_b3, FALSE) - EVT_CALL(EnableModel, MODEL_b4, FALSE) - EVT_CALL(EnableModel, MODEL_b5, FALSE) - EVT_CALL(EnableModel, MODEL_b6, FALSE) - EVT_CALL(EnableModel, MODEL_b7, FALSE) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Call(EnableModel, MODEL_o166, FALSE) + Call(EnableModel, MODEL_m_, FALSE) + Call(EnableModel, MODEL_m_kai, FALSE) + Call(EnableModel, MODEL_m1, FALSE) + Call(EnableModel, MODEL_m2, FALSE) + Call(EnableModel, MODEL_m3, FALSE) + Call(EnableModel, MODEL_m4, FALSE) + Call(EnableModel, MODEL_m5, FALSE) + Call(EnableModel, MODEL_m6, FALSE) + Call(EnableModel, MODEL_m7, FALSE) + Call(EnableModel, MODEL_b_, FALSE) + Call(EnableModel, MODEL_b_kai, FALSE) + Call(EnableModel, MODEL_b1, FALSE) + Call(EnableModel, MODEL_b2, FALSE) + Call(EnableModel, MODEL_b3, FALSE) + Call(EnableModel, MODEL_b4, FALSE) + Call(EnableModel, MODEL_b5, FALSE) + Call(EnableModel, MODEL_b6, FALSE) + Call(EnableModel, MODEL_b7, FALSE) + Exec(N(EVS_EnterMap)) + Wait(1) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_kpa/kpa_83/kpa_83_3_npc.c b/src/world/area_kpa/kpa_83/kpa_83_3_npc.c index 3e597465cd9..1e5ad8c277c 100644 --- a/src/world/area_kpa/kpa_83/kpa_83_3_npc.c +++ b/src/world/area_kpa/kpa_83/kpa_83_3_npc.c @@ -25,478 +25,478 @@ API_CALLABLE(N(SetPlayerSpriteFacingAngle)) { } EvtScript N(EVS_FocusCam_LookAtDoor) = { - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, LVar6) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(500.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(88.0), EVT_FLOAT(256.6)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(195.0), EVT_FLOAT(142.0)) - EVT_CALL(SetCamPosC, CAM_DEFAULT, EVT_FLOAT(0.0), EVT_FLOAT(0.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamSpeed, CAM_DEFAULT, LVar6) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-10.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(500.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(88.0), Float(256.6)) + Call(SetCamPosB, CAM_DEFAULT, Float(195.0), Float(142.0)) + Call(SetCamPosC, CAM_DEFAULT, Float(0.0), Float(0.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_FocusCam_AfterBattle) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, LVar6) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(22.5), EVT_FLOAT(-13.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetCamSpeed, CAM_DEFAULT, LVar6) + Call(SetCamPitch, CAM_DEFAULT, Float(22.5), Float(-13.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_FocusCam_InFrontOfDoor) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, LVar6) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(22.5), EVT_FLOAT(-11.5)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetCamSpeed, CAM_DEFAULT, LVar6) + Call(SetCamPitch, CAM_DEFAULT, Float(22.5), Float(-11.5)) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_FocusCam_MidRoom) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, LVar6) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(22.5), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetCamSpeed, CAM_DEFAULT, LVar6) + Call(SetCamPitch, CAM_DEFAULT, Float(22.5), Float(-10.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(350.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_FocusCam_JrTroopa) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, LVar6) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(22.5), EVT_FLOAT(-13.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(175.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetCamSpeed, CAM_DEFAULT, LVar6) + Call(SetCamPitch, CAM_DEFAULT, Float(22.5), Float(-13.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(175.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_KoopaBros_Hop) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(NPC_KoopaBrosRed) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBrosRed, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_KoopaBrosRed, LVar1, LVar2, LVar3) - EVT_CALL(NpcJump0, NPC_KoopaBrosRed, LVar1, LVar2, LVar3, 10) - EVT_CASE_EQ(NPC_KoopaBrosBlk) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBrosBlk, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_KoopaBrosBlk, LVar1, LVar2, LVar3) - EVT_CALL(NpcJump0, NPC_KoopaBrosBlk, LVar1, LVar2, LVar3, 10) - EVT_CASE_EQ(NPC_KoopaBrosYlw) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBrosYlw, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_KoopaBrosYlw, LVar1, LVar2, LVar3) - EVT_CALL(NpcJump0, NPC_KoopaBrosYlw, LVar1, LVar2, LVar3, 10) - EVT_CASE_EQ(NPC_KoopaBrosGrn) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBrosGrn, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_KoopaBrosGrn, LVar1, LVar2, LVar3) - EVT_CALL(NpcJump0, NPC_KoopaBrosGrn, LVar1, LVar2, LVar3, 10) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(NPC_KoopaBrosRed) + Call(SetNpcJumpscale, NPC_KoopaBrosRed, Float(1.0)) + Call(GetNpcPos, NPC_KoopaBrosRed, LVar1, LVar2, LVar3) + Call(NpcJump0, NPC_KoopaBrosRed, LVar1, LVar2, LVar3, 10) + CaseEq(NPC_KoopaBrosBlk) + Call(SetNpcJumpscale, NPC_KoopaBrosBlk, Float(1.0)) + Call(GetNpcPos, NPC_KoopaBrosBlk, LVar1, LVar2, LVar3) + Call(NpcJump0, NPC_KoopaBrosBlk, LVar1, LVar2, LVar3, 10) + CaseEq(NPC_KoopaBrosYlw) + Call(SetNpcJumpscale, NPC_KoopaBrosYlw, Float(1.0)) + Call(GetNpcPos, NPC_KoopaBrosYlw, LVar1, LVar2, LVar3) + Call(NpcJump0, NPC_KoopaBrosYlw, LVar1, LVar2, LVar3, 10) + CaseEq(NPC_KoopaBrosGrn) + Call(SetNpcJumpscale, NPC_KoopaBrosGrn, Float(1.0)) + Call(GetNpcPos, NPC_KoopaBrosGrn, LVar1, LVar2, LVar3) + Call(NpcJump0, NPC_KoopaBrosGrn, LVar1, LVar2, LVar3, 10) + EndSwitch + Return + End }; EvtScript N(EVS_KoopaBros_SpinAround) = { - EVT_SET(LVarA, LVar0) - EVT_CALL(MakeLerp, 0, 11 * 180, 50, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, LVarA, 0, LVar0, 0) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Call(MakeLerp, 0, 11 * 180, 50, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, LVarA, 0, LVar0, 0) + IfEq(LVar1, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_KoopaBros_FlingAway) = { - EVT_THREAD - EVT_CALL(PlaySoundAtNpc, LVar0, SOUND_HIT_NORMAL, SOUND_SPACE_DEFAULT) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.6)) - EVT_END_THREAD - EVT_SWITCH(LVar0) - EVT_CASE_EQ(NPC_KoopaBrosRed) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosRed, ANIM_KoopaBros_Red_Shock) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBrosRed, EVT_FLOAT(0.7)) - EVT_CALL(NpcJump0, NPC_KoopaBrosRed, -50, 200, 170, 40) - EVT_CALL(SetNpcFlagBits, NPC_KoopaBrosRed, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcPos, NPC_KoopaBrosRed, NPC_DISPOSE_LOCATION) - EVT_CASE_EQ(NPC_KoopaBrosBlk) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosBlk, ANIM_KoopaBros_Black_Shock) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBrosBlk, EVT_FLOAT(0.7)) - EVT_CALL(NpcJump0, NPC_KoopaBrosBlk, 0, 200, 127, 40) - EVT_CALL(SetNpcFlagBits, NPC_KoopaBrosRed, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcPos, NPC_KoopaBrosBlk, NPC_DISPOSE_LOCATION) - EVT_CASE_EQ(NPC_KoopaBrosYlw) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosYlw, ANIM_KoopaBros_Yellow_Shock) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBrosYlw, EVT_FLOAT(0.7)) - EVT_CALL(NpcJump0, NPC_KoopaBrosYlw, 100, 200, 200, 40) - EVT_CALL(SetNpcFlagBits, NPC_KoopaBrosYlw, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcPos, NPC_KoopaBrosYlw, NPC_DISPOSE_LOCATION) - EVT_CASE_EQ(NPC_KoopaBrosGrn) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosGrn, ANIM_KoopaBros_Green_Shock) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBrosGrn, EVT_FLOAT(0.7)) - EVT_CALL(NpcJump0, NPC_KoopaBrosGrn, 150, 200, 150, 40) - EVT_CALL(SetNpcFlagBits, NPC_KoopaBrosGrn, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcPos, NPC_KoopaBrosGrn, NPC_DISPOSE_LOCATION) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Thread + Call(PlaySoundAtNpc, LVar0, SOUND_HIT_NORMAL, SOUND_SPACE_DEFAULT) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(0.6)) + EndThread + Switch(LVar0) + CaseEq(NPC_KoopaBrosRed) + Call(SetNpcAnimation, NPC_KoopaBrosRed, ANIM_KoopaBros_Red_Shock) + Call(SetNpcJumpscale, NPC_KoopaBrosRed, Float(0.7)) + Call(NpcJump0, NPC_KoopaBrosRed, -50, 200, 170, 40) + Call(SetNpcFlagBits, NPC_KoopaBrosRed, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcPos, NPC_KoopaBrosRed, NPC_DISPOSE_LOCATION) + CaseEq(NPC_KoopaBrosBlk) + Call(SetNpcAnimation, NPC_KoopaBrosBlk, ANIM_KoopaBros_Black_Shock) + Call(SetNpcJumpscale, NPC_KoopaBrosBlk, Float(0.7)) + Call(NpcJump0, NPC_KoopaBrosBlk, 0, 200, 127, 40) + Call(SetNpcFlagBits, NPC_KoopaBrosRed, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcPos, NPC_KoopaBrosBlk, NPC_DISPOSE_LOCATION) + CaseEq(NPC_KoopaBrosYlw) + Call(SetNpcAnimation, NPC_KoopaBrosYlw, ANIM_KoopaBros_Yellow_Shock) + Call(SetNpcJumpscale, NPC_KoopaBrosYlw, Float(0.7)) + Call(NpcJump0, NPC_KoopaBrosYlw, 100, 200, 200, 40) + Call(SetNpcFlagBits, NPC_KoopaBrosYlw, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcPos, NPC_KoopaBrosYlw, NPC_DISPOSE_LOCATION) + CaseEq(NPC_KoopaBrosGrn) + Call(SetNpcAnimation, NPC_KoopaBrosGrn, ANIM_KoopaBros_Green_Shock) + Call(SetNpcJumpscale, NPC_KoopaBrosGrn, Float(0.7)) + Call(NpcJump0, NPC_KoopaBrosGrn, 150, 200, 150, 40) + Call(SetNpcFlagBits, NPC_KoopaBrosGrn, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcPos, NPC_KoopaBrosGrn, NPC_DISPOSE_LOCATION) + EndSwitch + Return + End }; EvtScript N(EVS_NpcIdle_Door) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PlayerMoveTo, -150, LVar2, 0) - EVT_CALL(SetCamType, CAM_DEFAULT, 6, FALSE) - EVT_SET(LVar6, EVT_FLOAT(3.0 / DT)) - EVT_EXEC_WAIT(N(EVS_FocusCam_LookAtDoor)) - EVT_SET(MF_DoneIntroMessage, FALSE) - EVT_THREAD - EVT_CALL(SetMusicTrack, 0, SONG_FINAL_BOWSER_BATTLE, 1, 8) - EVT_WAIT(150) - EVT_IF_NE(MF_DoneIntroMessage, FALSE) - EVT_GOTO(5) - EVT_END_IF - EVT_CALL(FadeOutMusic, 0, 250) - EVT_WAIT(15) - EVT_IF_NE(MF_DoneIntroMessage, FALSE) - EVT_GOTO(5) - EVT_END_IF - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_WAIT(30) - EVT_IF_NE(MF_DoneIntroMessage, FALSE) - EVT_GOTO(5) - EVT_END_IF - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) - EVT_LABEL(5) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH8_0053) - EVT_SET(MF_DoneIntroMessage, TRUE) - EVT_WAIT(2) - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_BROS_THEME, 2, 8) - EVT_SET(LVar3, 65) - EVT_SET(LVar4, 0) - EVT_SET(LVar5, 150) - EVT_SET(LVar6, EVT_FLOAT(90.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_InFrontOfDoor)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o166, COLLIDER_FLAGS_UPPER_MASK) - EVT_THREAD - EVT_CALL(SetNpcPos, NPC_KoopaBrosRed, 220, 180, 160) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosRed, ANIM_KoopaBros_Red_Midair) - EVT_CALL(EnableNpcBlur, NPC_KoopaBrosRed, TRUE) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBrosRed, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcFlagBits, NPC_KoopaBrosRed, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_KoopaBrosRed, NPC_FLAG_FLYING, FALSE) - EVT_CALL(NpcMoveTo, NPC_KoopaBrosRed, 20, 160, 20) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaBrosRed, SOUND_KOOPA_BROS_LAND, SOUND_SPACE_DEFAULT) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, 20, 0, 160, 0) - EVT_CALL(EnableNpcBlur, NPC_KoopaBrosRed, FALSE) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosRed, ANIM_KoopaBros_Red_IdleCrouch) - EVT_CALL(SetNpcYaw, NPC_KoopaBrosRed, 270) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetNpcPos, NPC_KoopaBrosBlk, 248, 180, 185) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosBlk, ANIM_KoopaBros_Black_Midair) - EVT_CALL(EnableNpcBlur, NPC_KoopaBrosBlk, TRUE) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBrosBlk, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcFlagBits, NPC_KoopaBrosBlk, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_KoopaBrosBlk, NPC_FLAG_FLYING, FALSE) - EVT_CALL(NpcMoveTo, NPC_KoopaBrosBlk, 48, 185, 20) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaBrosBlk, SOUND_KOOPA_BROS_LAND, SOUND_SPACE_DEFAULT) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, 48, 0, 185, 0) - EVT_CALL(EnableNpcBlur, NPC_KoopaBrosBlk, FALSE) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosBlk, ANIM_KoopaBros_Black_IdleCrouch) - EVT_CALL(SetNpcYaw, NPC_KoopaBrosBlk, 270) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetNpcPos, NPC_KoopaBrosYlw, 260, 180, 110) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosYlw, ANIM_KoopaBros_Yellow_Midair) - EVT_CALL(EnableNpcBlur, NPC_KoopaBrosYlw, TRUE) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBrosYlw, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcFlagBits, NPC_KoopaBrosYlw, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_KoopaBrosYlw, NPC_FLAG_FLYING, FALSE) - EVT_CALL(NpcMoveTo, NPC_KoopaBrosYlw, 60, 110, 20) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaBrosYlw, SOUND_KOOPA_BROS_LAND, SOUND_SPACE_DEFAULT) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, 60, 0, 110, 0) - EVT_CALL(EnableNpcBlur, NPC_KoopaBrosYlw, FALSE) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosYlw, ANIM_KoopaBros_Yellow_IdleCrouch) - EVT_CALL(SetNpcYaw, NPC_KoopaBrosYlw, 270) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(SetNpcPos, NPC_KoopaBrosGrn, 288, 180, 155) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosGrn, ANIM_KoopaBros_Green_Midair) - EVT_CALL(EnableNpcBlur, NPC_KoopaBrosGrn, TRUE) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBrosGrn, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcFlagBits, NPC_KoopaBrosGrn, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_KoopaBrosGrn, NPC_FLAG_FLYING, FALSE) - EVT_CALL(NpcMoveTo, NPC_KoopaBrosGrn, 88, 155, 20) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaBrosGrn, SOUND_KOOPA_BROS_LAND, SOUND_SPACE_DEFAULT) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, 88, 0, 155, 0) - EVT_CALL(EnableNpcBlur, NPC_KoopaBrosGrn, FALSE) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosGrn, ANIM_KoopaBros_Green_IdleCrouch) - EVT_CALL(SetNpcYaw, NPC_KoopaBrosGrn, 270) - EVT_END_THREAD - EVT_WAIT(65) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o166, COLLIDER_FLAGS_UPPER_MASK) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_KoopaBrosRed, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_ADD(LVar1, 30) - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 40) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaBrosRed, SOUND_SMALL_LENS_FLARE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosRed, ANIM_KoopaBros_Red_ThumbsUp) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(GetNpcPos, NPC_KoopaBrosBlk, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_ADD(LVar1, 30) - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 40) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaBrosBlk, SOUND_SMALL_LENS_FLARE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosBlk, ANIM_KoopaBros_Black_ThumbsUp) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(GetNpcPos, NPC_KoopaBrosYlw, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_ADD(LVar1, 30) - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 40) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaBrosYlw, SOUND_SMALL_LENS_FLARE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosYlw, ANIM_KoopaBros_Yellow_ThumbsUp) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(GetNpcPos, NPC_KoopaBrosGrn, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_ADD(LVar1, 30) - EVT_PLAY_EFFECT(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 40) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaBrosGrn, SOUND_SMALL_LENS_FLARE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosGrn, ANIM_KoopaBros_Green_ThumbsUp) - EVT_END_THREAD - EVT_WAIT(45) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosRed, ANIM_KoopaBros_Red_ThumbsUp) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosBlk, ANIM_KoopaBros_Black_ThumbsUp) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosYlw, ANIM_KoopaBros_Yellow_ThumbsUp) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosGrn, ANIM_KoopaBros_Green_ThumbsUp) - EVT_THREAD - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PlayerMoveTo, -50, 150, 0) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_KoopaBrosRed, ANIM_KoopaBros_Red_ThumbsUp, ANIM_KoopaBros_Red_ThumbsUp, 0, MSG_CH8_0054) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 0) - EVT_SET(LVar5, 150) - EVT_SET(LVar6, EVT_FLOAT(3.0 / DT)) - EVT_EXEC_WAIT(N(EVS_FocusCam_MidRoom)) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosRed, ANIM_KoopaBros_Red_Idle) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosBlk, ANIM_KoopaBros_Black_Idle) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosYlw, ANIM_KoopaBros_Yellow_Idle) - EVT_CALL(SetNpcAnimation, NPC_KoopaBrosGrn, ANIM_KoopaBros_Green_Idle) - EVT_CALL(SpeakToPlayer, NPC_KoopaBrosRed, ANIM_KoopaBros_Red_Talk, ANIM_KoopaBros_Red_Idle, 0, MSG_CH8_0055) - EVT_CALL(ShowChoice, MSG_Choice_0013) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ContinueSpeech, NPC_KoopaBrosRed, ANIM_KoopaBros_Red_Talk, ANIM_KoopaBros_Red_Idle, 0, MSG_CH8_0056) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_KoopaBrosRed, ANIM_KoopaBros_Red_Talk, ANIM_KoopaBros_Red_Idle, 0, MSG_CH8_0057) - EVT_END_IF - EVT_SET(LVar6, EVT_FLOAT(3.0 / DT)) - EVT_EXEC_WAIT(N(EVS_FocusCam_LookAtDoor)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH8_0058) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 0) - EVT_SET(LVar5, 150) - EVT_SET(LVar6, EVT_FLOAT(90.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_MidRoom)) - EVT_CALL(SpeakToPlayer, NPC_KoopaBrosRed, ANIM_KoopaBros_Red_Talk, ANIM_KoopaBros_Red_Idle, 0, MSG_CH8_0059) - EVT_CALL(SetMusicTrack, 0, SONG_JR_TROOPA_THEME, 1, 8) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH8_005A, 0, 150) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_WAIT(10) - EVT_CALL(SetNpcPos, NPC_JrTroopa, -150, 0, 140) - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_JrTroopa_ChargeArmsUp) - EVT_CALL(SetNpcSpeed, NPC_JrTroopa, EVT_FLOAT(8.0)) - EVT_THREAD - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_JrTroopa, LVar3, LVar4, LVar5) - EVT_IF_LE(LVar0, LVar3) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_STATIC_COLLISION | PS_FLAG_ROTATION_LOCKED | PS_FLAG_FACE_FORWARD, TRUE) - EVT_CALL(MakeLerp, 0, 11 * 180, 50, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(InterpPlayerYaw, LVar0, 0) - EVT_CALL(N(SetPlayerSpriteFacingAngle)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_STATIC_COLLISION | PS_FLAG_ROTATION_LOCKED | PS_FLAG_FACE_FORWARD, FALSE) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_SET(LVar0, NPC_KoopaBrosRed) - EVT_EXEC_GET_TID(N(EVS_KoopaBros_Hop), MV_KoopaBrosRed_HopScript) - EVT_SET(LVar0, NPC_KoopaBrosBlk) - EVT_EXEC_GET_TID(N(EVS_KoopaBros_Hop), MV_KoopaBrosBlk_HopScript) - EVT_SET(LVar0, NPC_KoopaBrosYlw) - EVT_EXEC_GET_TID(N(EVS_KoopaBros_Hop), MV_KoopaBrosYlw_HopScript) - EVT_SET(LVar0, NPC_KoopaBrosGrn) - EVT_EXEC_GET_TID(N(EVS_KoopaBros_Hop), MV_KoopaBrosGrn_HopScript) - EVT_CALL(NpcMoveTo, NPC_JrTroopa, 22, 140, 0) - EVT_SET(LVar0, NPC_KoopaBrosRed) - EVT_EXEC(N(EVS_KoopaBros_SpinAround)) - EVT_CALL(NpcMoveTo, NPC_JrTroopa, 50, 140, 0) - EVT_SET(LVar0, NPC_KoopaBrosBlk) - EVT_EXEC(N(EVS_KoopaBros_SpinAround)) - EVT_CALL(NpcMoveTo, NPC_JrTroopa, 62, 140, 0) - EVT_SET(LVar0, NPC_KoopaBrosYlw) - EVT_EXEC(N(EVS_KoopaBros_SpinAround)) - EVT_CALL(NpcMoveTo, NPC_JrTroopa, 90, 140, 0) - EVT_SET(LVar0, NPC_KoopaBrosGrn) - EVT_EXEC(N(EVS_KoopaBros_SpinAround)) - EVT_CALL(NpcMoveTo, NPC_JrTroopa, 100, 140, 0) - EVT_CALL(NpcMoveTo, NPC_JrTroopa, 98, 140, 0) - EVT_KILL_THREAD(MV_KoopaBrosGrn_HopScript) - EVT_SET(LVar0, NPC_KoopaBrosGrn) - EVT_EXEC(N(EVS_KoopaBros_FlingAway)) - EVT_CALL(NpcMoveTo, NPC_JrTroopa, 25, 140, 0) - EVT_CALL(NpcMoveTo, NPC_JrTroopa, 70, 140, 0) - EVT_KILL_THREAD(MV_KoopaBrosYlw_HopScript) - EVT_SET(LVar0, NPC_KoopaBrosYlw) - EVT_EXEC(N(EVS_KoopaBros_FlingAway)) - EVT_CALL(NpcMoveTo, NPC_JrTroopa, 75, 140, 0) - EVT_CALL(NpcMoveTo, NPC_JrTroopa, 30, 140, 0) - EVT_KILL_THREAD(MV_KoopaBrosRed_HopScript) - EVT_SET(LVar0, NPC_KoopaBrosRed) - EVT_EXEC(N(EVS_KoopaBros_FlingAway)) - EVT_CALL(NpcMoveTo, NPC_JrTroopa, 25, 140, 0) - EVT_CALL(NpcMoveTo, NPC_JrTroopa, 58, 140, 0) - EVT_KILL_THREAD(MV_KoopaBrosBlk_HopScript) - EVT_SET(LVar0, NPC_KoopaBrosBlk) - EVT_EXEC(N(EVS_KoopaBros_FlingAway)) - EVT_CALL(NpcMoveTo, NPC_JrTroopa, 75, 140, 0) - EVT_CALL(InterpNpcYaw, NPC_JrTroopa, 270, 0) - EVT_WAIT(5) - EVT_CALL(GetNpcPos, NPC_JrTroopa, LVar0, LVar1, LVar2) - EVT_CALL(NpcMoveTo, NPC_JrTroopa, 100, 140, 0) - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_JrTroopa_Idle) - EVT_CALL(SetNpcYaw, NPC_JrTroopa, 270) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH8_005B, 160, 40) - EVT_WAIT(10) - EVT_SET(LVar3, 100) - EVT_SET(LVar4, 0) - EVT_SET(LVar5, 150) - EVT_SET(LVar6, EVT_FLOAT(3.0 / DT)) - EVT_EXEC_WAIT(N(EVS_FocusCam_JrTroopa)) - EVT_CALL(SpeakToPlayer, NPC_JrTroopa, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle, 0, MSG_CH8_005C) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 0) - EVT_SET(LVar5, 150) - EVT_SET(LVar6, EVT_FLOAT(3.0 / DT)) - EVT_EXEC_WAIT(N(EVS_FocusCam_AfterBattle)) - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_JrTroopa_ChargeArmsUp) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetNpcSpeed, NPC_JrTroopa, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_JrTroopa, -30, 140, 0) - EVT_END_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 60) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(StartBossBattle, SONG_JR_TROOPA_BATTLE) - EVT_CALL(SpeakToPlayer, NPC_JrTroopa, ANIM_JrTroopa_Dizzy, ANIM_JrTroopa_Dizzy, 0, MSG_CH8_0061) - EVT_SET(MV_Sync_AfterBattleCamMovement, 0) - EVT_THREAD - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 0) - EVT_SET(LVar5, 150) - EVT_SET(LVar6, EVT_FLOAT(3.0 / DT)) - EVT_EXEC_WAIT(N(EVS_FocusCam_AfterBattle)) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH8_0062, 160, 40) - EVT_SET(MV_Sync_AfterBattleCamMovement, 1) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_JrTroopa_ChargeArmsUp) - EVT_CALL(SetNpcSpeed, NPC_JrTroopa, EVT_FLOAT(8.0)) - EVT_CALL(NpcMoveTo, NPC_JrTroopa, -50, 140, 0) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(NpcMoveTo, NPC_JrTroopa, -200, 140, 0) - EVT_CALL(SetNpcPos, NPC_JrTroopa, NPC_DISPOSE_LOCATION) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_LOOP(0) - EVT_IF_EQ(MV_Sync_AfterBattleCamMovement, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(LVar6, EVT_FLOAT(3.0 / DT)) - EVT_EXEC_WAIT(N(EVS_FocusCam_LookAtDoor)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH8_0063) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_SET(GB_KPA83_BowserDoorState, 1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerSpeed, Float(3.0 / DT)) + Call(PlayerMoveTo, -150, LVar2, 0) + Call(SetCamType, CAM_DEFAULT, 6, FALSE) + Set(LVar6, Float(3.0 / DT)) + ExecWait(N(EVS_FocusCam_LookAtDoor)) + Set(MF_DoneIntroMessage, FALSE) + Thread + Call(SetMusicTrack, 0, SONG_FINAL_BOWSER_BATTLE, 1, 8) + Wait(150) + IfNe(MF_DoneIntroMessage, FALSE) + Goto(5) + EndIf + Call(FadeOutMusic, 0, 250) + Wait(15) + IfNe(MF_DoneIntroMessage, FALSE) + Goto(5) + EndIf + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Wait(30) + IfNe(MF_DoneIntroMessage, FALSE) + Goto(5) + EndIf + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) + Label(5) + EndThread + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH8_0053) + Set(MF_DoneIntroMessage, TRUE) + Wait(2) + Call(SetMusicTrack, 0, SONG_KOOPA_BROS_THEME, 2, 8) + Set(LVar3, 65) + Set(LVar4, 0) + Set(LVar5, 150) + Set(LVar6, Float(90.0)) + ExecWait(N(EVS_FocusCam_InFrontOfDoor)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o166, COLLIDER_FLAGS_UPPER_MASK) + Thread + Call(SetNpcPos, NPC_KoopaBrosRed, 220, 180, 160) + Call(SetNpcAnimation, NPC_KoopaBrosRed, ANIM_KoopaBros_Red_Midair) + Call(EnableNpcBlur, NPC_KoopaBrosRed, TRUE) + Call(SetNpcJumpscale, NPC_KoopaBrosRed, Float(1.0)) + Call(SetNpcFlagBits, NPC_KoopaBrosRed, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcFlagBits, NPC_KoopaBrosRed, NPC_FLAG_FLYING, FALSE) + Call(NpcMoveTo, NPC_KoopaBrosRed, 20, 160, 20) + Call(PlaySoundAtNpc, NPC_KoopaBrosRed, SOUND_KOOPA_BROS_LAND, SOUND_SPACE_DEFAULT) + PlayEffect(EFFECT_LANDING_DUST, 1, 20, 0, 160, 0) + Call(EnableNpcBlur, NPC_KoopaBrosRed, FALSE) + Call(SetNpcAnimation, NPC_KoopaBrosRed, ANIM_KoopaBros_Red_IdleCrouch) + Call(SetNpcYaw, NPC_KoopaBrosRed, 270) + EndThread + Thread + Wait(5) + Call(SetNpcPos, NPC_KoopaBrosBlk, 248, 180, 185) + Call(SetNpcAnimation, NPC_KoopaBrosBlk, ANIM_KoopaBros_Black_Midair) + Call(EnableNpcBlur, NPC_KoopaBrosBlk, TRUE) + Call(SetNpcJumpscale, NPC_KoopaBrosBlk, Float(1.0)) + Call(SetNpcFlagBits, NPC_KoopaBrosBlk, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcFlagBits, NPC_KoopaBrosBlk, NPC_FLAG_FLYING, FALSE) + Call(NpcMoveTo, NPC_KoopaBrosBlk, 48, 185, 20) + Call(PlaySoundAtNpc, NPC_KoopaBrosBlk, SOUND_KOOPA_BROS_LAND, SOUND_SPACE_DEFAULT) + PlayEffect(EFFECT_LANDING_DUST, 1, 48, 0, 185, 0) + Call(EnableNpcBlur, NPC_KoopaBrosBlk, FALSE) + Call(SetNpcAnimation, NPC_KoopaBrosBlk, ANIM_KoopaBros_Black_IdleCrouch) + Call(SetNpcYaw, NPC_KoopaBrosBlk, 270) + EndThread + Thread + Wait(10) + Call(SetNpcPos, NPC_KoopaBrosYlw, 260, 180, 110) + Call(SetNpcAnimation, NPC_KoopaBrosYlw, ANIM_KoopaBros_Yellow_Midair) + Call(EnableNpcBlur, NPC_KoopaBrosYlw, TRUE) + Call(SetNpcJumpscale, NPC_KoopaBrosYlw, Float(1.0)) + Call(SetNpcFlagBits, NPC_KoopaBrosYlw, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcFlagBits, NPC_KoopaBrosYlw, NPC_FLAG_FLYING, FALSE) + Call(NpcMoveTo, NPC_KoopaBrosYlw, 60, 110, 20) + Call(PlaySoundAtNpc, NPC_KoopaBrosYlw, SOUND_KOOPA_BROS_LAND, SOUND_SPACE_DEFAULT) + PlayEffect(EFFECT_LANDING_DUST, 1, 60, 0, 110, 0) + Call(EnableNpcBlur, NPC_KoopaBrosYlw, FALSE) + Call(SetNpcAnimation, NPC_KoopaBrosYlw, ANIM_KoopaBros_Yellow_IdleCrouch) + Call(SetNpcYaw, NPC_KoopaBrosYlw, 270) + EndThread + Thread + Wait(15) + Call(SetNpcPos, NPC_KoopaBrosGrn, 288, 180, 155) + Call(SetNpcAnimation, NPC_KoopaBrosGrn, ANIM_KoopaBros_Green_Midair) + Call(EnableNpcBlur, NPC_KoopaBrosGrn, TRUE) + Call(SetNpcJumpscale, NPC_KoopaBrosGrn, Float(1.0)) + Call(SetNpcFlagBits, NPC_KoopaBrosGrn, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcFlagBits, NPC_KoopaBrosGrn, NPC_FLAG_FLYING, FALSE) + Call(NpcMoveTo, NPC_KoopaBrosGrn, 88, 155, 20) + Call(PlaySoundAtNpc, NPC_KoopaBrosGrn, SOUND_KOOPA_BROS_LAND, SOUND_SPACE_DEFAULT) + PlayEffect(EFFECT_LANDING_DUST, 1, 88, 0, 155, 0) + Call(EnableNpcBlur, NPC_KoopaBrosGrn, FALSE) + Call(SetNpcAnimation, NPC_KoopaBrosGrn, ANIM_KoopaBros_Green_IdleCrouch) + Call(SetNpcYaw, NPC_KoopaBrosGrn, 270) + EndThread + Wait(65) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o166, COLLIDER_FLAGS_UPPER_MASK) + Thread + Call(GetNpcPos, NPC_KoopaBrosRed, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Add(LVar1, 30) + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 40) + Call(PlaySoundAtNpc, NPC_KoopaBrosRed, SOUND_SMALL_LENS_FLARE, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_KoopaBrosRed, ANIM_KoopaBros_Red_ThumbsUp) + EndThread + Thread + Wait(5) + Call(GetNpcPos, NPC_KoopaBrosBlk, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Add(LVar1, 30) + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 40) + Call(PlaySoundAtNpc, NPC_KoopaBrosBlk, SOUND_SMALL_LENS_FLARE, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_KoopaBrosBlk, ANIM_KoopaBros_Black_ThumbsUp) + EndThread + Thread + Wait(10) + Call(GetNpcPos, NPC_KoopaBrosYlw, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Add(LVar1, 30) + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 40) + Call(PlaySoundAtNpc, NPC_KoopaBrosYlw, SOUND_SMALL_LENS_FLARE, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_KoopaBrosYlw, ANIM_KoopaBros_Yellow_ThumbsUp) + EndThread + Thread + Wait(15) + Call(GetNpcPos, NPC_KoopaBrosGrn, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Add(LVar1, 30) + PlayEffect(EFFECT_LENS_FLARE, 0, LVar0, LVar1, LVar2, 40) + Call(PlaySoundAtNpc, NPC_KoopaBrosGrn, SOUND_SMALL_LENS_FLARE, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_KoopaBrosGrn, ANIM_KoopaBros_Green_ThumbsUp) + EndThread + Wait(45) + Call(SetNpcAnimation, NPC_KoopaBrosRed, ANIM_KoopaBros_Red_ThumbsUp) + Call(SetNpcAnimation, NPC_KoopaBrosBlk, ANIM_KoopaBros_Black_ThumbsUp) + Call(SetNpcAnimation, NPC_KoopaBrosYlw, ANIM_KoopaBros_Yellow_ThumbsUp) + Call(SetNpcAnimation, NPC_KoopaBrosGrn, ANIM_KoopaBros_Green_ThumbsUp) + Thread + Call(SetPlayerSpeed, Float(3.0 / DT)) + Call(PlayerMoveTo, -50, 150, 0) + EndThread + Call(SpeakToPlayer, NPC_KoopaBrosRed, ANIM_KoopaBros_Red_ThumbsUp, ANIM_KoopaBros_Red_ThumbsUp, 0, MSG_CH8_0054) + Set(LVar3, 0) + Set(LVar4, 0) + Set(LVar5, 150) + Set(LVar6, Float(3.0 / DT)) + ExecWait(N(EVS_FocusCam_MidRoom)) + Call(SetNpcAnimation, NPC_KoopaBrosRed, ANIM_KoopaBros_Red_Idle) + Call(SetNpcAnimation, NPC_KoopaBrosBlk, ANIM_KoopaBros_Black_Idle) + Call(SetNpcAnimation, NPC_KoopaBrosYlw, ANIM_KoopaBros_Yellow_Idle) + Call(SetNpcAnimation, NPC_KoopaBrosGrn, ANIM_KoopaBros_Green_Idle) + Call(SpeakToPlayer, NPC_KoopaBrosRed, ANIM_KoopaBros_Red_Talk, ANIM_KoopaBros_Red_Idle, 0, MSG_CH8_0055) + Call(ShowChoice, MSG_Choice_0013) + IfEq(LVar0, 0) + Call(ContinueSpeech, NPC_KoopaBrosRed, ANIM_KoopaBros_Red_Talk, ANIM_KoopaBros_Red_Idle, 0, MSG_CH8_0056) + Else + Call(ContinueSpeech, NPC_KoopaBrosRed, ANIM_KoopaBros_Red_Talk, ANIM_KoopaBros_Red_Idle, 0, MSG_CH8_0057) + EndIf + Set(LVar6, Float(3.0 / DT)) + ExecWait(N(EVS_FocusCam_LookAtDoor)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH8_0058) + Set(LVar3, 0) + Set(LVar4, 0) + Set(LVar5, 150) + Set(LVar6, Float(90.0)) + ExecWait(N(EVS_FocusCam_MidRoom)) + Call(SpeakToPlayer, NPC_KoopaBrosRed, ANIM_KoopaBros_Red_Talk, ANIM_KoopaBros_Red_Idle, 0, MSG_CH8_0059) + Call(SetMusicTrack, 0, SONG_JR_TROOPA_THEME, 1, 8) + Call(ShowMessageAtScreenPos, MSG_CH8_005A, 0, 150) + Call(InterpPlayerYaw, 270, 0) + Wait(10) + Call(SetNpcPos, NPC_JrTroopa, -150, 0, 140) + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_JrTroopa_ChargeArmsUp) + Call(SetNpcSpeed, NPC_JrTroopa, Float(8.0)) + Thread + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_JrTroopa, LVar3, LVar4, LVar5) + IfLe(LVar0, LVar3) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetPlayerFlagBits, PS_FLAG_NO_STATIC_COLLISION | PS_FLAG_ROTATION_LOCKED | PS_FLAG_FACE_FORWARD, TRUE) + Call(MakeLerp, 0, 11 * 180, 50, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(InterpPlayerYaw, LVar0, 0) + Call(N(SetPlayerSpriteFacingAngle)) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetPlayerFlagBits, PS_FLAG_NO_STATIC_COLLISION | PS_FLAG_ROTATION_LOCKED | PS_FLAG_FACE_FORWARD, FALSE) + Call(InterpPlayerYaw, 90, 0) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndThread + Set(LVar0, NPC_KoopaBrosRed) + ExecGetTID(N(EVS_KoopaBros_Hop), MV_KoopaBrosRed_HopScript) + Set(LVar0, NPC_KoopaBrosBlk) + ExecGetTID(N(EVS_KoopaBros_Hop), MV_KoopaBrosBlk_HopScript) + Set(LVar0, NPC_KoopaBrosYlw) + ExecGetTID(N(EVS_KoopaBros_Hop), MV_KoopaBrosYlw_HopScript) + Set(LVar0, NPC_KoopaBrosGrn) + ExecGetTID(N(EVS_KoopaBros_Hop), MV_KoopaBrosGrn_HopScript) + Call(NpcMoveTo, NPC_JrTroopa, 22, 140, 0) + Set(LVar0, NPC_KoopaBrosRed) + Exec(N(EVS_KoopaBros_SpinAround)) + Call(NpcMoveTo, NPC_JrTroopa, 50, 140, 0) + Set(LVar0, NPC_KoopaBrosBlk) + Exec(N(EVS_KoopaBros_SpinAround)) + Call(NpcMoveTo, NPC_JrTroopa, 62, 140, 0) + Set(LVar0, NPC_KoopaBrosYlw) + Exec(N(EVS_KoopaBros_SpinAround)) + Call(NpcMoveTo, NPC_JrTroopa, 90, 140, 0) + Set(LVar0, NPC_KoopaBrosGrn) + Exec(N(EVS_KoopaBros_SpinAround)) + Call(NpcMoveTo, NPC_JrTroopa, 100, 140, 0) + Call(NpcMoveTo, NPC_JrTroopa, 98, 140, 0) + KillThread(MV_KoopaBrosGrn_HopScript) + Set(LVar0, NPC_KoopaBrosGrn) + Exec(N(EVS_KoopaBros_FlingAway)) + Call(NpcMoveTo, NPC_JrTroopa, 25, 140, 0) + Call(NpcMoveTo, NPC_JrTroopa, 70, 140, 0) + KillThread(MV_KoopaBrosYlw_HopScript) + Set(LVar0, NPC_KoopaBrosYlw) + Exec(N(EVS_KoopaBros_FlingAway)) + Call(NpcMoveTo, NPC_JrTroopa, 75, 140, 0) + Call(NpcMoveTo, NPC_JrTroopa, 30, 140, 0) + KillThread(MV_KoopaBrosRed_HopScript) + Set(LVar0, NPC_KoopaBrosRed) + Exec(N(EVS_KoopaBros_FlingAway)) + Call(NpcMoveTo, NPC_JrTroopa, 25, 140, 0) + Call(NpcMoveTo, NPC_JrTroopa, 58, 140, 0) + KillThread(MV_KoopaBrosBlk_HopScript) + Set(LVar0, NPC_KoopaBrosBlk) + Exec(N(EVS_KoopaBros_FlingAway)) + Call(NpcMoveTo, NPC_JrTroopa, 75, 140, 0) + Call(InterpNpcYaw, NPC_JrTroopa, 270, 0) + Wait(5) + Call(GetNpcPos, NPC_JrTroopa, LVar0, LVar1, LVar2) + Call(NpcMoveTo, NPC_JrTroopa, 100, 140, 0) + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_JrTroopa_Idle) + Call(SetNpcYaw, NPC_JrTroopa, 270) + Call(ShowMessageAtScreenPos, MSG_CH8_005B, 160, 40) + Wait(10) + Set(LVar3, 100) + Set(LVar4, 0) + Set(LVar5, 150) + Set(LVar6, Float(3.0 / DT)) + ExecWait(N(EVS_FocusCam_JrTroopa)) + Call(SpeakToPlayer, NPC_JrTroopa, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle, 0, MSG_CH8_005C) + Set(LVar3, 0) + Set(LVar4, 0) + Set(LVar5, 150) + Set(LVar6, Float(3.0 / DT)) + ExecWait(N(EVS_FocusCam_AfterBattle)) + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_JrTroopa_ChargeArmsUp) + Thread + Wait(5) + Call(SetNpcSpeed, NPC_JrTroopa, Float(5.0)) + Call(NpcMoveTo, NPC_JrTroopa, -30, 140, 0) + EndThread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 60) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(StartBossBattle, SONG_JR_TROOPA_BATTLE) + Call(SpeakToPlayer, NPC_JrTroopa, ANIM_JrTroopa_Dizzy, ANIM_JrTroopa_Dizzy, 0, MSG_CH8_0061) + Set(MV_Sync_AfterBattleCamMovement, 0) + Thread + Set(LVar3, 0) + Set(LVar4, 0) + Set(LVar5, 150) + Set(LVar6, Float(3.0 / DT)) + ExecWait(N(EVS_FocusCam_AfterBattle)) + Call(ShowMessageAtScreenPos, MSG_CH8_0062, 160, 40) + Set(MV_Sync_AfterBattleCamMovement, 1) + EndThread + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_JrTroopa_ChargeArmsUp) + Call(SetNpcSpeed, NPC_JrTroopa, Float(8.0)) + Call(NpcMoveTo, NPC_JrTroopa, -50, 140, 0) + Call(InterpPlayerYaw, 270, 0) + Call(NpcMoveTo, NPC_JrTroopa, -200, 140, 0) + Call(SetNpcPos, NPC_JrTroopa, NPC_DISPOSE_LOCATION) + Exec(N(EVS_SetupMusic)) + Loop(0) + IfEq(MV_Sync_AfterBattleCamMovement, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + Set(LVar6, Float(3.0 / DT)) + ExecWait(N(EVS_FocusCam_LookAtDoor)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH8_0063) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Set(GB_KPA83_BowserDoorState, 1) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcDefeat_Door) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_SET(LVar3, 100) - EVT_SET(LVar4, 0) - EVT_SET(LVar5, 150) - EVT_SET(LVar6, EVT_FLOAT(90.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_JrTroopa)) - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_JrTroopa_Dizzy) - EVT_CALL(SetNpcPos, NPC_JrTroopa, 100, 0, 140) - EVT_CALL(SetNpcPos, NPC_SELF, 184, 20, 150) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Set(LVar3, 100) + Set(LVar4, 0) + Set(LVar5, 150) + Set(LVar6, Float(90.0)) + ExecWait(N(EVS_FocusCam_JrTroopa)) + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_JrTroopa_Dizzy) + Call(SetNpcPos, NPC_JrTroopa, 100, 0, 140) + Call(SetNpcPos, NPC_SELF, 184, 20, 150) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Door) = { - EVT_IF_EQ(GB_KPA83_BowserDoorState, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Door))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Door))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, 184, 20, 150) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_KPA83_BowserDoorState, 0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Door))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Door))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) + Call(SetNpcPos, NPC_SELF, 184, 20, 150) + Call(EnableNpcShadow, NPC_SELF, FALSE) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_KoopaBros) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInit_JrTroopa) = { - EVT_RETURN - EVT_END + Return + End }; AnimID N(ExtraAnims_KoopaBros)[] = { diff --git a/src/world/area_kpa/kpa_90/kpa_90_1_music.c b/src/world/area_kpa/kpa_90/kpa_90_1_music.c index 47f2d4ecd9a..2400be6ba3b 100644 --- a/src/world/area_kpa/kpa_90/kpa_90_1_music.c +++ b/src/world/area_kpa/kpa_90/kpa_90_1_music.c @@ -1,12 +1,12 @@ #include "kpa_90.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_90/kpa_90_2_main.c b/src/world/area_kpa/kpa_90/kpa_90_2_main.c index 5ae77676871..61d3f63c4ed 100644 --- a/src/world/area_kpa/kpa_90/kpa_90_2_main.c +++ b/src/world/area_kpa/kpa_90/kpa_90_2_main.c @@ -4,20 +4,20 @@ EvtScript N(EVS_ExitWalk_kpa_91_0) = EVT_EXIT_WALK(60, kpa_90_ENTRY_1, "kpa_91", EvtScript N(EVS_ExitWalk_kpa_32_1) = EVT_EXIT_WALK(60, kpa_90_ENTRY_0, "kpa_32", kpa_32_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_91_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_32_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_91_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_32_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_kpa/kpa_91/kpa_91_1_music.c b/src/world/area_kpa/kpa_91/kpa_91_1_music.c index 3bd786c9d08..7d79c9df6e3 100644 --- a/src/world/area_kpa/kpa_91/kpa_91_1_music.c +++ b/src/world/area_kpa/kpa_91/kpa_91_1_music.c @@ -1,12 +1,12 @@ #include "kpa_91.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_91/kpa_91_2_main.c b/src/world/area_kpa/kpa_91/kpa_91_2_main.c index 0f23e04cbdd..fccae84ed2a 100644 --- a/src/world/area_kpa/kpa_91/kpa_91_2_main.c +++ b/src/world/area_kpa/kpa_91/kpa_91_2_main.c @@ -5,47 +5,47 @@ EvtScript N(EVS_ExitWalk_kpa_90_1) = EVT_EXIT_WALK(60, kpa_91_ENTRY_0, "kpa_90", MAP_RODATA_PAD(1, exits); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_90_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_90_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + Return + End }; EvtScript N(EVS_OpenCellDoor) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(PlayerMoveTo, -30, 15, 20) - EVT_CALL(InterpPlayerYaw, 90, 2) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittn, SOUND_METAL_GATE_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 140, 60, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o199, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_g35, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o297, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(PlayerMoveTo, -30, 15, 20) + Call(InterpPlayerYaw, 90, 2) + Call(PlaySoundAtCollider, COLLIDER_deilittn, SOUND_METAL_GATE_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 140, 60, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o199, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_g35, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o297, COLLIDER_FLAGS_UPPER_MASK) + Call(DisablePlayerInput, FALSE) + Unbind + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_SET(AB_KPA91_Toad2_Dialogue, 0) - EVT_SET(AB_KPA91_Dryite_Dialogue, 0) - EVT_SET(AB_KPA91_Toad3_Dialogue, 0) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o297, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Set(AB_KPA91_Toad2_Dialogue, 0) + Set(AB_KPA91_Dryite_Dialogue, 0) + Set(AB_KPA91_Toad3_Dialogue, 0) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Exec(N(EVS_SetupMusic)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o297, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; diff --git a/src/world/area_kpa/kpa_91/kpa_91_3_npc.c b/src/world/area_kpa/kpa_91/kpa_91_3_npc.c index 09de478c12d..610eda52ba6 100644 --- a/src/world/area_kpa/kpa_91/kpa_91_3_npc.c +++ b/src/world/area_kpa/kpa_91/kpa_91_3_npc.c @@ -10,147 +10,147 @@ #include "world/common/atomic/ToadHouse.data.inc.c" EvtScript N(EVS_ToadHouse_SetDialogue) = { - EVT_SET(LVar0, MSG_CH8_0044) - EVT_SET(LVar8, MSG_CH8_0045) - EVT_SET(LVar1, MSG_CH8_0046) - EVT_SET(LVar2, MSG_CH8_0047) - EVT_SET(LVar3, MSG_CH8_0048) - EVT_RETURN - EVT_END + Set(LVar0, MSG_CH8_0044) + Set(LVar8, MSG_CH8_0045) + Set(LVar1, MSG_CH8_0046) + Set(LVar2, MSG_CH8_0047) + Set(LVar3, MSG_CH8_0048) + Return + End }; EvtScript N(EVS_ToadHouse_GetInBed) = { - EVT_CALL(SetMusicTrack, 0, SONG_TAKING_REST, 0, 8) - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(N(ToadHouse_CamSetFOV), 0, 40) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 34, -8) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 220) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-3.0), EVT_FLOAT(-240.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(-150.0), EVT_FLOAT(-56.0)) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 1, 10) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, -180, -100, 0) - EVT_CALL(InterpPlayerYaw, 191, 1) - EVT_CALL(SetPlayerPos, -160, 22, -123) - EVT_WAIT(5) - EVT_CALL(InterpPlayerYaw, 114, 1) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetPlayerImgFXFlags, IMGFX_FLAG_2000 | IMGFX_FLAG_800) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_GET_IN_BED, 1, 1, 0) - EVT_WAIT(61) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) - EVT_THREAD - EVT_WAIT(63) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TAKING_REST, 0, 8) + Thread + Wait(20) + Call(N(ToadHouse_CamSetFOV), 0, 40) + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamPitch, CAM_DEFAULT, 34, -8) + Call(SetCamDistance, CAM_DEFAULT, 220) + Call(SetCamPosA, CAM_DEFAULT, Float(-3.0), Float(-240.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(-150.0), Float(-56.0)) + Call(SetCamPosC, CAM_DEFAULT, 1, 10) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndThread + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, -180, -100, 0) + Call(InterpPlayerYaw, 191, 1) + Call(SetPlayerPos, -160, 22, -123) + Wait(5) + Call(InterpPlayerYaw, 114, 1) + Call(HidePlayerShadow, TRUE) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetPlayerImgFXFlags, IMGFX_FLAG_2000 | IMGFX_FLAG_800) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_GET_IN_BED, 1, 1, 0) + Wait(61) + Call(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) + Thread + Wait(63) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndThread + Return + End }; EvtScript N(EVS_ToadHouse_ReturnFromRest) = { - EVT_CALL(N(ToadHouse_CamSetFOV), 0, 25) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, MV_LastPlayerPosX, MV_LastPlayerPosY, MV_LastPlayerPosZ) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, MV_LastPlayerPosX, MV_LastPlayerPosY, MV_LastPlayerPosZ) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(HidePlayerShadow, FALSE) - EVT_CALL(SetPlayerPos, -139, 0, -90) - EVT_CALL(PlayerMoveTo, -102, -130, 20) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Call(N(ToadHouse_CamSetFOV), 0, 25) + Call(UseSettingsFrom, CAM_DEFAULT, MV_LastPlayerPosX, MV_LastPlayerPosY, MV_LastPlayerPosZ) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetPanTarget, CAM_DEFAULT, MV_LastPlayerPosX, MV_LastPlayerPosY, MV_LastPlayerPosZ) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) + Call(HidePlayerShadow, FALSE) + Call(SetPlayerPos, -139, 0, -90) + Call(PlayerMoveTo, -102, -130, 20) + Exec(N(EVS_SetupMusic)) + Return + End }; EvtScript N(EVS_NpcInteract_Toad_01) = { - EVT_CALL(GetPlayerPos, MV_LastPlayerPosX, MV_LastPlayerPosY, MV_LastPlayerPosZ) - EVT_EXEC_WAIT(N(EVS_NpcInteract_ToadHouseKeeper)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_RETURN - EVT_END + Call(GetPlayerPos, MV_LastPlayerPosX, MV_LastPlayerPosY, MV_LastPlayerPosZ) + ExecWait(N(EVS_NpcInteract_ToadHouseKeeper)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Return + End }; EvtScript N(EVS_NpcInteract_Toad_02) = { - EVT_SWITCH(AB_KPA91_Toad2_Dialogue) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_CH8_0049) - EVT_SET(AB_KPA91_Toad2_Dialogue, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_CH8_004A) - EVT_SET(AB_KPA91_Toad2_Dialogue, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(AB_KPA91_Toad2_Dialogue) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_CH8_0049) + Set(AB_KPA91_Toad2_Dialogue, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_CH8_004A) + Set(AB_KPA91_Toad2_Dialogue, 0) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_ToadGuard) = { - EVT_SWITCH(AB_KPA91_Toad3_Dialogue) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Blue_Talk, ANIM_ToadGuard_Blue_Idle, 0, MSG_CH8_004B) - EVT_SET(AB_KPA91_Toad3_Dialogue, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Blue_Talk, ANIM_ToadGuard_Blue_Idle, 0, MSG_CH8_004C) - EVT_SET(AB_KPA91_Toad3_Dialogue, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(AB_KPA91_Toad3_Dialogue) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Blue_Talk, ANIM_ToadGuard_Blue_Idle, 0, MSG_CH8_004B) + Set(AB_KPA91_Toad3_Dialogue, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Blue_Talk, ANIM_ToadGuard_Blue_Idle, 0, MSG_CH8_004C) + Set(AB_KPA91_Toad3_Dialogue, 0) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Dryite) = { - EVT_SWITCH(AB_KPA91_Dryite_Dialogue) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH8_004D) - EVT_SET(AB_KPA91_Dryite_Dialogue, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH8_004E) - EVT_SET(AB_KPA91_Dryite_Dialogue, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(AB_KPA91_Dryite_Dialogue) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH8_004D) + Set(AB_KPA91_Dryite_Dialogue, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_CH8_004E) + Set(AB_KPA91_Dryite_Dialogue, 0) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Toad_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_01))) - EVT_CALL(SetNpcPos, NPC_SELF, -70, 0, -140) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_01))) + Call(SetNpcPos, NPC_SELF, -70, 0, -140) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Return + End }; EvtScript N(EVS_NpcInit_Toad_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_02))) - EVT_CALL(SetNpcPos, NPC_SELF, 110, 0, -130) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Toad_Yellow_Idle) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_02))) + Call(SetNpcPos, NPC_SELF, 110, 0, -130) + Call(SetNpcAnimation, NPC_SELF, ANIM_Toad_Yellow_Idle) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Return + End }; EvtScript N(EVS_NpcInit_ToadGuard) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ToadGuard))) - EVT_CALL(SetNpcPos, NPC_SELF, 10, 0, -180) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ToadGuard_Blue_Idle) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ToadGuard))) + Call(SetNpcPos, NPC_SELF, 10, 0, -180) + Call(SetNpcAnimation, NPC_SELF, ANIM_ToadGuard_Blue_Idle) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Return + End }; EvtScript N(EVS_NpcInit_Dryite) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Dryite))) - EVT_CALL(SetNpcPos, NPC_SELF, 175, 0, -65) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Dryite))) + Call(SetNpcPos, NPC_SELF, 175, 0, -65) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Return + End }; NpcData N(NpcData_Prisoners)[] = { @@ -201,33 +201,33 @@ NpcData N(NpcData_Prisoners)[] = { }; EvtScript N(EVS_NpcDefeat_Koopatrol) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_SET(GF_KPA91_Defeated_Guard, TRUE) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(MakeItemEntity, ITEM_PRISON_KEY1, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_TOSS_NEVER_VANISH, GF_KPA91_Item_PrisonKey1) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_SET(GF_KPA91_Defeated_Guard, TRUE) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(MakeItemEntity, ITEM_PRISON_KEY1, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_TOSS_NEVER_VANISH, GF_KPA91_Item_PrisonKey1) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Set(GF_KPA91_Defeated_Guard, TRUE) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(MakeItemEntity, ITEM_PRISON_KEY1, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_TOSS_NEVER_VANISH, GF_KPA91_Item_PrisonKey1) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_FLED) + CaseEq(OUTCOME_ENEMY_FLED) + Set(GF_KPA91_Defeated_Guard, TRUE) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(MakeItemEntity, ITEM_PRISON_KEY1, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_TOSS_NEVER_VANISH, GF_KPA91_Item_PrisonKey1) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Koopatrol) = { - EVT_IF_EQ(GF_KPA91_Defeated_Guard, FALSE) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Koopatrol))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_KPA91_Defeated_Guard, FALSE) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Koopatrol))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_Koopatrol) = { diff --git a/src/world/area_kpa/kpa_91/kpa_91_4_entity.c b/src/world/area_kpa/kpa_91/kpa_91_4_entity.c index e48b1d996e9..2afe3e16726 100644 --- a/src/world/area_kpa/kpa_91/kpa_91_4_entity.c +++ b/src/world/area_kpa/kpa_91/kpa_91_4_entity.c @@ -10,42 +10,42 @@ s32 N(KeyList_PrisonCell)[] = { }; EvtScript N(EVS_UnlockPrompt_PrisonCell) = { - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_SET(GF_KPA91_UnlockedDoor, TRUE) - EVT_CALL(N(GetEntityPosition), MV_PadlockEntityID, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_SET(LVar0, MV_PadlockEntityID) - EVT_CALL(N(RemovePadlock)) - EVT_SET(LVar1, 0) - EVT_WAIT(5) - EVT_CALL(CloseChoicePopup) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OpenCellDoor)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittn, 1, 0) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(ShowKeyChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) + Call(CloseChoicePopup) + Return + EndIf + IfEq(LVar0, -1) + Call(CloseChoicePopup) + Return + EndIf + Call(RemoveKeyItemAt, LVar1) + Set(GF_KPA91_UnlockedDoor, TRUE) + Call(N(GetEntityPosition), MV_PadlockEntityID, LVar0, LVar1, LVar2) + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Set(LVar0, MV_PadlockEntityID) + Call(N(RemovePadlock)) + Set(LVar1, 0) + Wait(5) + Call(CloseChoicePopup) + BindTrigger(Ref(N(EVS_OpenCellDoor)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittn, 1, 0) + Unbind + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_KPA91_UnlockedDoor, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), -5, 10, 13, 0, MAKE_ENTITY_END) - EVT_SET(MV_PadlockEntityID, LVar0) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_UnlockPrompt_PrisonCell)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(KeyList_PrisonCell)), 0, 1) - EVT_ELSE - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OpenCellDoor)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittn, 1, 0) - EVT_END_IF - EVT_IF_EQ(GF_KPA91_Defeated_Guard, TRUE) - EVT_CALL(MakeItemEntity, ITEM_PRISON_KEY1, 60, 0, 55, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KPA91_Item_PrisonKey1) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_KPA91_UnlockedDoor, FALSE) + Call(MakeEntity, Ref(Entity_Padlock), -5, 10, 13, 0, MAKE_ENTITY_END) + Set(MV_PadlockEntityID, LVar0) + BindPadlock(Ref(N(EVS_UnlockPrompt_PrisonCell)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), Ref(N(KeyList_PrisonCell)), 0, 1) + Else + BindTrigger(Ref(N(EVS_OpenCellDoor)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittn, 1, 0) + EndIf + IfEq(GF_KPA91_Defeated_Guard, TRUE) + Call(MakeItemEntity, ITEM_PRISON_KEY1, 60, 0, 55, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KPA91_Item_PrisonKey1) + EndIf + Return + End }; diff --git a/src/world/area_kpa/kpa_94/kpa_94_1_music.c b/src/world/area_kpa/kpa_94/kpa_94_1_music.c index 372bab68e9e..41fb4a793db 100644 --- a/src/world/area_kpa/kpa_94/kpa_94_1_music.c +++ b/src/world/area_kpa/kpa_94/kpa_94_1_music.c @@ -1,12 +1,12 @@ #include "kpa_94.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_94/kpa_94_2_main.c b/src/world/area_kpa/kpa_94/kpa_94_2_main.c index 195c7074b4b..6574e07609a 100644 --- a/src/world/area_kpa/kpa_94/kpa_94_2_main.c +++ b/src/world/area_kpa/kpa_94/kpa_94_2_main.c @@ -4,22 +4,22 @@ EvtScript N(EVS_ExitWalk_kpa_95_0) = EVT_EXIT_WALK(60, kpa_94_ENTRY_0, "kpa_95", EvtScript N(EVS_ExitWalk_kpa_33_0) = EVT_EXIT_WALK(60, kpa_94_ENTRY_1, "kpa_33", kpa_33_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_95_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_33_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_95_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kpa_33_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitte, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_o340, FALSE) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitte, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_o340, FALSE) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_kpa/kpa_95/kpa_95_1_music.c b/src/world/area_kpa/kpa_95/kpa_95_1_music.c index 54a6ccf39b9..5bb05226ea6 100644 --- a/src/world/area_kpa/kpa_95/kpa_95_1_music.c +++ b/src/world/area_kpa/kpa_95/kpa_95_1_music.c @@ -1,12 +1,12 @@ #include "kpa_95.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_3) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_95/kpa_95_2_entity.c b/src/world/area_kpa/kpa_95/kpa_95_2_entity.c index ed29ec73cbd..20e16c9ba65 100644 --- a/src/world/area_kpa/kpa_95/kpa_95_2_entity.c +++ b/src/world/area_kpa/kpa_95/kpa_95_2_entity.c @@ -10,42 +10,42 @@ s32 N(KeyList_PrisonCell)[] = { }; EvtScript N(EVS_UnlockPrompt_PrisonCell) = { - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_SET(GF_KPA95_UnlockedDoor, TRUE) - EVT_CALL(N(GetEntityPosition), MV_PadlockEntityID, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_SET(LVar0, MV_PadlockEntityID) - EVT_CALL(N(RemovePadlock)) - EVT_SET(LVar1, 0) - EVT_WAIT(5) - EVT_CALL(CloseChoicePopup) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OpenCellDoor)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittn, 1, 0) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(ShowKeyChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) + Call(CloseChoicePopup) + Return + EndIf + IfEq(LVar0, -1) + Call(CloseChoicePopup) + Return + EndIf + Call(RemoveKeyItemAt, LVar1) + Set(GF_KPA95_UnlockedDoor, TRUE) + Call(N(GetEntityPosition), MV_PadlockEntityID, LVar0, LVar1, LVar2) + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Set(LVar0, MV_PadlockEntityID) + Call(N(RemovePadlock)) + Set(LVar1, 0) + Wait(5) + Call(CloseChoicePopup) + BindTrigger(Ref(N(EVS_OpenCellDoor)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittn, 1, 0) + Unbind + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_KPA95_UnlockedDoor, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), -5, 10, 13, 0, MAKE_ENTITY_END) - EVT_SET(MV_PadlockEntityID, LVar0) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_UnlockPrompt_PrisonCell)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(KeyList_PrisonCell)), 0, 1) - EVT_ELSE - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OpenCellDoor)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittn, 1, 0) - EVT_END_IF - EVT_IF_EQ(GF_KPA95_Defeated_Guard, TRUE) - EVT_CALL(MakeItemEntity, ITEM_PRISON_KEY1, -70, 0, 55, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KPA95_Item_PrisonKey1) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_KPA95_UnlockedDoor, FALSE) + Call(MakeEntity, Ref(Entity_Padlock), -5, 10, 13, 0, MAKE_ENTITY_END) + Set(MV_PadlockEntityID, LVar0) + BindPadlock(Ref(N(EVS_UnlockPrompt_PrisonCell)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), Ref(N(KeyList_PrisonCell)), 0, 1) + Else + BindTrigger(Ref(N(EVS_OpenCellDoor)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittn, 1, 0) + EndIf + IfEq(GF_KPA95_Defeated_Guard, TRUE) + Call(MakeItemEntity, ITEM_PRISON_KEY1, -70, 0, 55, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KPA95_Item_PrisonKey1) + EndIf + Return + End }; diff --git a/src/world/area_kpa/kpa_95/kpa_95_3_main.c b/src/world/area_kpa/kpa_95/kpa_95_3_main.c index 194506ed686..2f8e3562928 100644 --- a/src/world/area_kpa/kpa_95/kpa_95_3_main.c +++ b/src/world/area_kpa/kpa_95/kpa_95_3_main.c @@ -1,25 +1,25 @@ #include "kpa_95.h" EvtScript N(EVS_OpenCellDoor) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(PlayerMoveTo, -30, 15, 20) - EVT_CALL(InterpPlayerYaw, 90, 2) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittn, SOUND_METAL_GATE_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 140, 60, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o199, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_g35, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o297, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(PlayerMoveTo, -30, 15, 20) + Call(InterpPlayerYaw, 90, 2) + Call(PlaySoundAtCollider, COLLIDER_deilittn, SOUND_METAL_GATE_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 140, 60, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o199, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_g35, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o297, COLLIDER_FLAGS_UPPER_MASK) + Call(DisablePlayerInput, FALSE) + Unbind + Return + End }; EvtScript N(EVS_ExitWalk_kpa_94_0) = EVT_EXIT_WALK(60, kpa_95_ENTRY_0, "kpa_94", kpa_94_ENTRY_0); @@ -27,22 +27,22 @@ EvtScript N(EVS_ExitWalk_kpa_94_0) = EVT_EXIT_WALK(60, kpa_95_ENTRY_0, "kpa_94", MAP_RODATA_PAD(1, exits); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kpa_94_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kpa_94_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o297, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Exec(N(EVS_SetupMusic)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o297, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; diff --git a/src/world/area_kpa/kpa_95/kpa_95_4_npc.c b/src/world/area_kpa/kpa_95/kpa_95_4_npc.c index cba934813ae..e02bd668e93 100644 --- a/src/world/area_kpa/kpa_95/kpa_95_4_npc.c +++ b/src/world/area_kpa/kpa_95/kpa_95_4_npc.c @@ -11,147 +11,147 @@ #include "world/common/atomic/ToadHouse.data.inc.c" EvtScript N(EVS_ToadHouse_SetDialogue) = { - EVT_SET(LVar0, MSG_CH8_0064) - EVT_SET(LVar8, MSG_CH8_0065) - EVT_SET(LVar1, MSG_CH8_0066) - EVT_SET(LVar2, MSG_CH8_0067) - EVT_SET(LVar3, MSG_CH8_0068) - EVT_RETURN - EVT_END + Set(LVar0, MSG_CH8_0064) + Set(LVar8, MSG_CH8_0065) + Set(LVar1, MSG_CH8_0066) + Set(LVar2, MSG_CH8_0067) + Set(LVar3, MSG_CH8_0068) + Return + End }; EvtScript N(EVS_ToadHouse_GetInBed) = { - EVT_CALL(SetMusicTrack, 0, SONG_TAKING_REST, 0, 8) - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(N(ToadHouse_CamSetFOV), 0, 40) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 34, -8) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 220) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-3.0), EVT_FLOAT(-240.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(-150.0), EVT_FLOAT(-56.0)) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 1, 10) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, -180, -100, 0) - EVT_CALL(InterpPlayerYaw, 191, 1) - EVT_CALL(SetPlayerPos, -160, 22, -123) - EVT_WAIT(5) - EVT_CALL(InterpPlayerYaw, 114, 1) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetPlayerImgFXFlags, IMGFX_FLAG_2000 | IMGFX_FLAG_800) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_GET_IN_BED, 1, 1, 0) - EVT_WAIT(61) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) - EVT_THREAD - EVT_WAIT(63) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TAKING_REST, 0, 8) + Thread + Wait(20) + Call(N(ToadHouse_CamSetFOV), 0, 40) + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamPitch, CAM_DEFAULT, 34, -8) + Call(SetCamDistance, CAM_DEFAULT, 220) + Call(SetCamPosA, CAM_DEFAULT, Float(-3.0), Float(-240.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(-150.0), Float(-56.0)) + Call(SetCamPosC, CAM_DEFAULT, 1, 10) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndThread + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, -180, -100, 0) + Call(InterpPlayerYaw, 191, 1) + Call(SetPlayerPos, -160, 22, -123) + Wait(5) + Call(InterpPlayerYaw, 114, 1) + Call(HidePlayerShadow, TRUE) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetPlayerImgFXFlags, IMGFX_FLAG_2000 | IMGFX_FLAG_800) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_GET_IN_BED, 1, 1, 0) + Wait(61) + Call(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) + Thread + Wait(63) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndThread + Return + End }; EvtScript N(EVS_ToadHouse_ReturnFromRest) = { - EVT_CALL(N(ToadHouse_CamSetFOV), 0, 25) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, MV_LastPlayerPosX, MV_LastPlayerPosY, MV_LastPlayerPosZ) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, MV_LastPlayerPosX, MV_LastPlayerPosY, MV_LastPlayerPosZ) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(HidePlayerShadow, FALSE) - EVT_CALL(SetPlayerPos, -139, 0, -90) - EVT_CALL(PlayerMoveTo, -102, -130, 20) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Call(N(ToadHouse_CamSetFOV), 0, 25) + Call(UseSettingsFrom, CAM_DEFAULT, MV_LastPlayerPosX, MV_LastPlayerPosY, MV_LastPlayerPosZ) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetPanTarget, CAM_DEFAULT, MV_LastPlayerPosX, MV_LastPlayerPosY, MV_LastPlayerPosZ) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) + Call(HidePlayerShadow, FALSE) + Call(SetPlayerPos, -139, 0, -90) + Call(PlayerMoveTo, -102, -130, 20) + Exec(N(EVS_SetupMusic)) + Return + End }; EvtScript N(EVS_NpcInteract_Toad_01) = { - EVT_CALL(GetPlayerPos, MV_LastPlayerPosX, MV_LastPlayerPosY, MV_LastPlayerPosZ) - EVT_EXEC_WAIT(N(EVS_NpcInteract_ToadHouseKeeper)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_RETURN - EVT_END + Call(GetPlayerPos, MV_LastPlayerPosX, MV_LastPlayerPosY, MV_LastPlayerPosZ) + ExecWait(N(EVS_NpcInteract_ToadHouseKeeper)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Return + End }; EvtScript N(EVS_NpcInteract_Toad_02) = { - EVT_SWITCH(AB_KPA95_Toad2_Dialogue) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, MSG_CH8_0069) - EVT_SET(AB_KPA95_Toad2_Dialogue, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, MSG_CH8_006A) - EVT_SET(AB_KPA95_Toad2_Dialogue, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(AB_KPA95_Toad2_Dialogue) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, MSG_CH8_0069) + Set(AB_KPA95_Toad2_Dialogue, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, MSG_CH8_006A) + Set(AB_KPA95_Toad2_Dialogue, 0) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_ToadGuard) = { - EVT_SWITCH(AB_KPA95_Toad3_Dialogue) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Green_Talk, ANIM_ToadGuard_Green_Idle, 0, MSG_CH8_006B) - EVT_SET(AB_KPA95_Toad3_Dialogue, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Green_Talk, ANIM_ToadGuard_Green_Idle, 0, MSG_CH8_006C) - EVT_SET(AB_KPA95_Toad3_Dialogue, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(AB_KPA95_Toad3_Dialogue) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Green_Talk, ANIM_ToadGuard_Green_Idle, 0, MSG_CH8_006B) + Set(AB_KPA95_Toad3_Dialogue, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Green_Talk, ANIM_ToadGuard_Green_Idle, 0, MSG_CH8_006C) + Set(AB_KPA95_Toad3_Dialogue, 0) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Penguin) = { - EVT_SWITCH(AB_KPA95_Penguin_Dialogue) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH8_006D) - EVT_SET(AB_KPA95_Penguin_Dialogue, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH8_006E) - EVT_SET(AB_KPA95_Penguin_Dialogue, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(AB_KPA95_Penguin_Dialogue) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH8_006D) + Set(AB_KPA95_Penguin_Dialogue, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH8_006E) + Set(AB_KPA95_Penguin_Dialogue, 0) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Toad_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_01))) - EVT_CALL(SetNpcPos, NPC_SELF, -70, 0, -140) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_01))) + Call(SetNpcPos, NPC_SELF, -70, 0, -140) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Return + End }; EvtScript N(EVS_NpcInit_Toad_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_02))) - EVT_CALL(SetNpcPos, NPC_SELF, 100, 0, -90) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Toad_Blue_Idle) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_02))) + Call(SetNpcPos, NPC_SELF, 100, 0, -90) + Call(SetNpcAnimation, NPC_SELF, ANIM_Toad_Blue_Idle) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Return + End }; EvtScript N(EVS_NpcInit_ToadGuard) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ToadGuard))) - EVT_CALL(SetNpcPos, NPC_SELF, 30, 0, -170) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ToadGuard_Green_Idle) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ToadGuard))) + Call(SetNpcPos, NPC_SELF, 30, 0, -170) + Call(SetNpcAnimation, NPC_SELF, ANIM_ToadGuard_Green_Idle) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Return + End }; EvtScript N(EVS_NpcInit_Penguin) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Penguin))) - EVT_CALL(SetNpcPos, NPC_SELF, 170, 0, -180) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Penguin))) + Call(SetNpcPos, NPC_SELF, 170, 0, -180) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Return + End }; NpcData N(NpcData_Prisoners)[] = { @@ -202,33 +202,33 @@ NpcData N(NpcData_Prisoners)[] = { }; EvtScript N(EVS_NpcDefeat_Koopatrol) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_SET(GF_KPA95_Defeated_Guard, TRUE) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(MakeItemEntity, ITEM_PRISON_KEY1, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_TOSS_NEVER_VANISH, GF_KPA95_Item_PrisonKey1) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_SET(GF_KPA95_Defeated_Guard, TRUE) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(MakeItemEntity, ITEM_PRISON_KEY1, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_TOSS_NEVER_VANISH, GF_KPA95_Item_PrisonKey1) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Set(GF_KPA95_Defeated_Guard, TRUE) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(MakeItemEntity, ITEM_PRISON_KEY1, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_TOSS_NEVER_VANISH, GF_KPA95_Item_PrisonKey1) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_FLED) + CaseEq(OUTCOME_ENEMY_FLED) + Set(GF_KPA95_Defeated_Guard, TRUE) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(MakeItemEntity, ITEM_PRISON_KEY1, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_TOSS_NEVER_VANISH, GF_KPA95_Item_PrisonKey1) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Koopatrol) = { - EVT_IF_EQ(GF_KPA95_Defeated_Guard, FALSE) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Koopatrol))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_KPA95_Defeated_Guard, FALSE) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Koopatrol))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_Koopatrol) = { diff --git a/src/world/area_kpa/kpa_96/kpa_96_1_music.c b/src/world/area_kpa/kpa_96/kpa_96_1_music.c index 17606cdb1ee..f8a472ae690 100644 --- a/src/world/area_kpa/kpa_96/kpa_96_1_music.c +++ b/src/world/area_kpa/kpa_96/kpa_96_1_music.c @@ -1,12 +1,12 @@ #include "kpa_96.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Thread + Wait(30) + Call(SetMusicTrackVolumes, TRACK_VOLS_KPA_2) + EndThread + Return + End }; diff --git a/src/world/area_kpa/kpa_96/kpa_96_2_main.c b/src/world/area_kpa/kpa_96/kpa_96_2_main.c index fdb9f8d3dda..a8d2f3e697c 100644 --- a/src/world/area_kpa/kpa_96/kpa_96_2_main.c +++ b/src/world/area_kpa/kpa_96/kpa_96_2_main.c @@ -3,30 +3,30 @@ EvtScript N(EVS_ExitDoors_kpa_32_3) = EVT_EXIT_DOUBLE_DOOR(kpa_96_ENTRY_0, "kpa_32", kpa_32_ENTRY_3, COLLIDER_deilittw, MODEL_o881, MODEL_o882); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kpa_32_3)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_kpa_32_3)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_SET(LVar0, kpa_96_ENTRY_0) - EVT_SET(LVar2, MODEL_o881) - EVT_SET(LVar3, MODEL_o882) - EVT_EXEC(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END + Set(LVar0, kpa_96_ENTRY_0) + Set(LVar2, MODEL_o881) + Set(LVar3, MODEL_o882) + Exec(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_SetupShop)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOWSERS_CASTLE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Exec(N(EVS_SetupShop)) + Exec(N(EVS_EnterMap)) + Wait(1) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_kpa/kpa_96/kpa_96_3_npc.c b/src/world/area_kpa/kpa_96/kpa_96_3_npc.c index 40bddea89f5..94118dd2dac 100644 --- a/src/world/area_kpa/kpa_96/kpa_96_3_npc.c +++ b/src/world/area_kpa/kpa_96/kpa_96_3_npc.c @@ -49,14 +49,14 @@ ShopSellPriceData N(PriceList)[] = { }; EvtScript N(EVS_OnBuy) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(SHOP_BUY_RESULT_CANCEL) - EVT_CASE_EQ(SHOP_BUY_RESULT_4) - EVT_CASE_EQ(SHOP_BUY_RESULT_OK) - EVT_CASE_EQ(SHOP_BUY_RESULT_OK) //@bug duplicate case - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(SHOP_BUY_RESULT_CANCEL) + CaseEq(SHOP_BUY_RESULT_4) + CaseEq(SHOP_BUY_RESULT_OK) + CaseEq(SHOP_BUY_RESULT_OK) //@bug duplicate case + EndSwitch + Return + End }; ShopItemLocation N(ItemPositions)[] = { @@ -77,16 +77,16 @@ ShopOwner N(Owner) = { }; EvtScript N(EVS_SetupShop) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o860, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o861, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o862, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o863, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o864, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o865, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(MakeShop, EVT_PTR(N(ItemPositions)), EVT_PTR(N(Inventory)), EVT_PTR(N(PriceList)), 0) - EVT_CALL(MakeShopOwner, EVT_PTR(N(Owner))) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o860, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o861, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o862, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o863, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o864, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o865, COLLIDER_FLAGS_UPPER_MASK) + Call(MakeShop, Ref(N(ItemPositions)), Ref(N(Inventory)), Ref(N(PriceList)), 0) + Call(MakeShopOwner, Ref(N(Owner))) + Return + End }; NpcSettings N(NpcSettings_SpikedGoomba) = { @@ -106,38 +106,38 @@ API_CALLABLE(N(CheckPlayerHasCoins)) { } EvtScript N(EVS_NpcInteract_SpikedGoomba) = { - EVT_IF_EQ(MV_MetShopkeeper, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_SpikedGoomba_Walk, ANIM_SpikedGoomba_Idle, 0, MSG_CH8_004F) - EVT_CALL(ShowChoice, MSG_Choice_0013) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(N(CheckPlayerHasCoins)) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_SpikedGoomba_Walk, ANIM_SpikedGoomba_Idle, 0, MSG_CH8_0051) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o860, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o861, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o862, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o863, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o864, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o865, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o964, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(MV_MetShopkeeper, 1) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_SpikedGoomba_Walk, ANIM_SpikedGoomba_Idle, 0, MSG_CH8_0052) - EVT_END_IF - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_SpikedGoomba_Walk, ANIM_SpikedGoomba_Idle, 0, MSG_CH8_0050) - EVT_END_IF - EVT_ELSE - EVT_EXEC_WAIT(EVS_ShopOwnerDialog) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MV_MetShopkeeper, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_SpikedGoomba_Walk, ANIM_SpikedGoomba_Idle, 0, MSG_CH8_004F) + Call(ShowChoice, MSG_Choice_0013) + IfEq(LVar0, 0) + Call(N(CheckPlayerHasCoins)) + IfEq(LVar0, 0) + Call(ContinueSpeech, NPC_SELF, ANIM_SpikedGoomba_Walk, ANIM_SpikedGoomba_Idle, 0, MSG_CH8_0051) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o860, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o861, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o862, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o863, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o864, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o865, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o964, COLLIDER_FLAGS_UPPER_MASK) + Set(MV_MetShopkeeper, 1) + Else + Call(ContinueSpeech, NPC_SELF, ANIM_SpikedGoomba_Walk, ANIM_SpikedGoomba_Idle, 0, MSG_CH8_0052) + EndIf + Else + Call(ContinueSpeech, NPC_SELF, ANIM_SpikedGoomba_Walk, ANIM_SpikedGoomba_Idle, 0, MSG_CH8_0050) + EndIf + Else + ExecWait(EVS_ShopOwnerDialog) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_SpikedGoomba) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_SpikedGoomba))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_SpikedGoomba))) + Return + End }; NpcData N(NpcData_SpikedGoomba) = { diff --git a/src/world/area_kzn/common/SmokeTexPanners.inc.c b/src/world/area_kzn/common/SmokeTexPanners.inc.c index a9f255a1201..1725fb66b94 100644 --- a/src/world/area_kzn/common/SmokeTexPanners.inc.c +++ b/src/world/area_kzn/common/SmokeTexPanners.inc.c @@ -3,29 +3,29 @@ #include "world/common/atomic/TexturePan.inc.c" EvtScript N(EVS_StartTexPanner_SmokeLeft) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, LVar0, TEX_PANNER_3) - EVT_THREAD + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, LVar0, TEX_PANNER_3) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_3) TEX_PAN_PARAMS_STEP(-200, 0, 600, -400) TEX_PAN_PARAMS_FREQ( 1, 0, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; EvtScript N(EVS_StartTexPanner_SmokeRight) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, LVar0, TEX_PANNER_4) - EVT_THREAD + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, LVar0, TEX_PANNER_4) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_4) TEX_PAN_PARAMS_STEP(500, 0, 0, -400) TEX_PAN_PARAMS_FREQ( 1, 0, 0, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; diff --git a/src/world/area_kzn/common/SpinyTromp.inc.c b/src/world/area_kzn/common/SpinyTromp.inc.c index b1eb018e575..03a66cf1955 100644 --- a/src/world/area_kzn/common/SpinyTromp.inc.c +++ b/src/world/area_kzn/common/SpinyTromp.inc.c @@ -29,52 +29,52 @@ API_CALLABLE(N(SpinyTromp_GetActingPartner)) { #include "world/common/todo/UnkFunc51.inc.c" EvtScript N(D_80240D10_C7EE90) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_LABEL(10) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(InterruptUsePartner) - EVT_END_IF - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_EQ(LVar0, PARTNER_BOW) - EVT_GOTO(2) - EVT_ELSE - EVT_GOTO(10) - EVT_END_IF - EVT_END_IF - EVT_CALL(GetPlayerActionState, LVar0) - EVT_IF_NE(LVar0, ACTION_STATE_IDLE) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetPlayerTargetYaw, LVar0) - EVT_IF_LT(LVar0, 180) - EVT_CALL(InterpPlayerYaw, 90, 1) - EVT_WAIT(1) - EVT_CALL(N(UnkFunc48), 20) - EVT_ELSE - EVT_CALL(InterpPlayerYaw, 270, 1) - EVT_WAIT(1) - EVT_CALL(N(UnkFunc48), -20) - EVT_END_IF - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Fallen) - EVT_WAIT(1) - EVT_CALL(N(SpinyTrompHit)) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Fallen, IMGFX_SET_WAVY, EVT_FLOAT(3.0), EVT_FLOAT(3.0), 0, 0) - EVT_LABEL(1) - EVT_WAIT(1) - EVT_IF_EQ(AF_KZN_TrompRollingDone, FALSE) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(30) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Fallen, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_GetUp) - EVT_CALL(N(UnkFunc48), 0) - EVT_LABEL(2) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Label(10) + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, 0) + Call(InterruptUsePartner) + EndIf + Label(0) + Wait(1) + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, 0) + Call(GetCurrentPartnerID, LVar0) + IfEq(LVar0, PARTNER_BOW) + Goto(2) + Else + Goto(10) + EndIf + EndIf + Call(GetPlayerActionState, LVar0) + IfNe(LVar0, ACTION_STATE_IDLE) + Goto(0) + EndIf + Call(GetPlayerTargetYaw, LVar0) + IfLt(LVar0, 180) + Call(InterpPlayerYaw, 90, 1) + Wait(1) + Call(N(UnkFunc48), 20) + Else + Call(InterpPlayerYaw, 270, 1) + Wait(1) + Call(N(UnkFunc48), -20) + EndIf + Call(SetPlayerAnimation, ANIM_Mario1_Fallen) + Wait(1) + Call(N(SpinyTrompHit)) + Call(UpdatePlayerImgFX, ANIM_Mario1_Fallen, IMGFX_SET_WAVY, Float(3.0), Float(3.0), 0, 0) + Label(1) + Wait(1) + IfEq(AF_KZN_TrompRollingDone, FALSE) + Goto(1) + EndIf + Wait(30) + Call(UpdatePlayerImgFX, ANIM_Mario1_Fallen, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetPlayerAnimation, ANIM_Mario1_GetUp) + Call(N(UnkFunc48), 0) + Label(2) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_kzn/kzn_01/kzn_01_1_main.c b/src/world/area_kzn/kzn_01/kzn_01_1_main.c index ef1f538b77c..d98dcfbb639 100644 --- a/src/world/area_kzn/kzn_01/kzn_01_1_main.c +++ b/src/world/area_kzn/kzn_01/kzn_01_1_main.c @@ -6,28 +6,28 @@ EvtScript N(EVS_ExitWalk_jan_22_2) = EVT_EXIT_WALK(60, kzn_01_ENTRY_0, "jan_22", EvtScript N(EVS_ExitWalk_kzn_02_0) = EVT_EXIT_WALK(60, kzn_01_ENTRY_1, "kzn_02", kzn_02_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(N(EVS_ExitWalk_jan_22_2), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(N(EVS_ExitWalk_kzn_02_0), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(N(EVS_ExitWalk_jan_22_2), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(N(EVS_ExitWalk_kzn_02_0), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_LAVALAVA) - EVT_CALL(SetSpriteShading, SHADING_KZN_01) - EVT_SETUP_CAMERA_DEFAULT() - EVT_SET(GF_MAP_MtLavalava, TRUE) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_ENTERED_MT_LAVA_LAVA) - EVT_SET(GB_StoryProgress, STORY_CH5_ENTERED_MT_LAVA_LAVA) - EVT_END_IF - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_SET(LVar0, N(EVS_BindExitTriggers)) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_CALL(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) - EVT_CALL(ClearAmbientSounds, 250) - EVT_SET(LVar0, MODEL_kem1) - EVT_EXEC(N(EVS_StartTexPanner_SmokeLeft)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_LAVALAVA) + Call(SetSpriteShading, SHADING_KZN_01) + SetUP_CAMERA_DEFAULT() + Set(GF_MAP_MtLavalava, TRUE) + IfLt(GB_StoryProgress, STORY_CH5_ENTERED_MT_LAVA_LAVA) + Set(GB_StoryProgress, STORY_CH5_ENTERED_MT_LAVA_LAVA) + EndIf + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Set(LVar0, N(EVS_BindExitTriggers)) + Exec(EnterWalk) + Wait(1) + Call(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) + Call(ClearAmbientSounds, 250) + Set(LVar0, MODEL_kem1) + Exec(N(EVS_StartTexPanner_SmokeLeft)) + Return + End }; diff --git a/src/world/area_kzn/kzn_01/kzn_01_2_npc.c b/src/world/area_kzn/kzn_01/kzn_01_2_npc.c index 8236b024a48..a9a9ca8d0d5 100644 --- a/src/world/area_kzn/kzn_01/kzn_01_2_npc.c +++ b/src/world/area_kzn/kzn_01/kzn_01_2_npc.c @@ -3,46 +3,46 @@ #include "world/common/enemy/PutridPiranhaSentinel.inc.c" EvtScript N(EVS_NpcIdle_PutridPiranha) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 225) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 270, -200, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 400) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.5 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcPos, NPC_SELF, 320, -220, 0) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_LargePiranha_Putrid_Anim17) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_LargePiranha_Putrid_Anim01) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_LargePiranha_Putrid_Anim04, ANIM_LargePiranha_Putrid_Anim01, 0, MSG_CH5_00ED) - EVT_WAIT(10 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_BURROW_DIG, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_LargePiranha_Putrid_Anim18) - EVT_WAIT(25 * DT) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_SET(GF_KZN01_IntruderAlert, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, 225) + Wait(1) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, 270, -200, 0) + Call(SetCamDistance, CAM_DEFAULT, 400) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.5 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(SetNpcPos, NPC_SELF, 320, -220, 0) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_SELF, ANIM_LargePiranha_Putrid_Anim17) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_LargePiranha_Putrid_Anim01) + Call(SpeakToPlayer, NPC_SELF, ANIM_LargePiranha_Putrid_Anim04, ANIM_LargePiranha_Putrid_Anim01, 0, MSG_CH5_00ED) + Wait(10 * DT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_BURROW_DIG, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_SELF, ANIM_LargePiranha_Putrid_Anim18) + Wait(25 * DT) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(ResetCam, CAM_DEFAULT, Float(3.0 / DT)) + Set(GF_KZN01_IntruderAlert, TRUE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_PutridPiranha) = { - EVT_IF_EQ(GF_KZN01_IntruderAlert, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_PutridPiranha))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_KZN01_IntruderAlert, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_PutridPiranha))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcPutridPiranha) = { diff --git a/src/world/area_kzn/kzn_02/kzn_02_1_main.c b/src/world/area_kzn/kzn_02/kzn_02_1_main.c index b7460cb0c8a..cbc7230c35e 100644 --- a/src/world/area_kzn/kzn_02/kzn_02_1_main.c +++ b/src/world/area_kzn/kzn_02/kzn_02_1_main.c @@ -3,85 +3,85 @@ #include "world/common/atomic/TexturePan.inc.c" EvtScript N(EVS_UpdateTexPanner3) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, LVar0, TEX_PANNER_3) - EVT_THREAD + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, LVar0, TEX_PANNER_3) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_3) TEX_PAN_PARAMS_STEP( -200, 0, 600, -400) TEX_PAN_PARAMS_FREQ( 1, 0, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; EvtScript N(EVS_UpdateTexPanner4) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, LVar0, TEX_PANNER_4) - EVT_THREAD + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, LVar0, TEX_PANNER_4) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_4) TEX_PAN_PARAMS_STEP( 500, 0, 0, -400) TEX_PAN_PARAMS_FREQ( 1, 0, 0, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; EvtScript N(EVS_ExitWalk_kzn_01_1) = EVT_EXIT_WALK(60, kzn_02_ENTRY_0, "kzn_01", kzn_01_ENTRY_1); EvtScript N(EVS_ExitWalk_kzn_03_0) = EVT_EXIT_WALK(60, kzn_02_ENTRY_1, "kzn_03", kzn_03_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(N(EVS_ExitWalk_kzn_01_1), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(N(EVS_ExitWalk_kzn_03_0), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(N(EVS_ExitWalk_kzn_01_1), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(N(EVS_ExitWalk_kzn_03_0), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, kzn_02_ENTRY_2) - EVT_SET(LVar0, N(EVS_BindExitTriggers)) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_ELSE - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfNe(LVar0, kzn_02_ENTRY_2) + Set(LVar0, N(EVS_BindExitTriggers)) + Exec(EnterWalk) + Wait(1) + Else + EndIf + Return + End }; EvtScript N(EVS_StartTexPanners_Lava) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(EnableTexPanning, MODEL_yougan1_1, TRUE) - EVT_CALL(EnableTexPanning, MODEL_yougan1_2, TRUE) - EVT_CALL(EnableTexPanning, MODEL_toro, TRUE) - EVT_CALL(EnableTexPanning, MODEL_poko, TRUE) - EVT_THREAD + SetGroup(EVT_GROUP_00) + Call(EnableTexPanning, MODEL_yougan1_1, TRUE) + Call(EnableTexPanning, MODEL_yougan1_2, TRUE) + Call(EnableTexPanning, MODEL_toro, TRUE) + Call(EnableTexPanning, MODEL_poko, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( 200, 0, 400, -100) TEX_PAN_PARAMS_FREQ( 1, 0, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_5) TEX_PAN_PARAMS_STEP( 300, -500, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, LVar0, 0) - EVT_ADD(LVar0, 0x8000) - EVT_WAIT(6) - EVT_END_LOOP - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread + Set(LVar0, 0) + Loop(0) + Call(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, LVar0, 0) + Add(LVar0, 0x8000) + Wait(6) + EndLoop + EndThread + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -97,37 +97,37 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_LAVALAVA) - EVT_CALL(SetSpriteShading, SHADING_KZN_02) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o112, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o217, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o218, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o219, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o220, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o221, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o222, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_pp1, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_pp2, SURFACE_TYPE_LAVA) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_EXEC(N(EVS_StartTexPanners_Lava)) - EVT_SET(LVar0, MODEL_kem1) - EVT_EXEC(N(EVS_UpdateTexPanner3)) - EVT_SET(LVar0, MODEL_kem2) - EVT_EXEC(N(EVS_UpdateTexPanner4)) - EVT_EXEC_WAIT(N(EVS_InitializePlatforms)) - EVT_CALL(GetDemoState, LVar0) - EVT_IF_NE(LVar0, DEMO_STATE_NONE) - EVT_EXEC_WAIT(N(EVS_PlayDemoScene)) - EVT_RETURN - EVT_END_IF - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_CALL(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_LAVALAVA) + Call(SetSpriteShading, SHADING_KZN_02) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o112, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o217, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o218, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o219, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o220, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o221, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o222, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_pp1, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_pp2, SURFACE_TYPE_LAVA) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + Exec(N(EVS_StartTexPanners_Lava)) + Set(LVar0, MODEL_kem1) + Exec(N(EVS_UpdateTexPanner3)) + Set(LVar0, MODEL_kem2) + Exec(N(EVS_UpdateTexPanner4)) + ExecWait(N(EVS_InitializePlatforms)) + Call(GetDemoState, LVar0) + IfNe(LVar0, DEMO_STATE_NONE) + ExecWait(N(EVS_PlayDemoScene)) + Return + EndIf + Exec(N(EVS_EnterMap)) + Wait(1) + Call(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) + Call(PlayAmbientSounds, AMBIENT_LAVA_1) + Return + End }; diff --git a/src/world/area_kzn/kzn_02/kzn_02_2_platforms.c b/src/world/area_kzn/kzn_02/kzn_02_2_platforms.c index 464ec5c142c..c4d4b2a1b0f 100644 --- a/src/world/area_kzn/kzn_02/kzn_02_2_platforms.c +++ b/src/world/area_kzn/kzn_02/kzn_02_2_platforms.c @@ -55,434 +55,434 @@ API_CALLABLE(N(AddPushVelocity)) { } EvtScript N(EVS_KoloradoSinkingPlatform) = { - EVT_SETF(LVar0, EVT_FLOAT(0.0)) - EVT_LABEL(0) - EVT_CALL(TranslateModel, MODEL_o29, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o30, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o31, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o146) - EVT_CALL(UpdateColliderTransform, COLLIDER_o147) - EVT_CALL(UpdateColliderTransform, COLLIDER_o148) - EVT_WAIT(1) - EVT_SUBF(LVar0, EVT_FLOAT(0.7)) - EVT_IF_GE(LVar0, -22) - EVT_GOTO(0) - EVT_END_IF - EVT_LABEL(1) - EVT_ADDF(LVar0, EVT_FLOAT(1.1)) - EVT_CALL(TranslateModel, MODEL_o29, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o30, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o31, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o146) - EVT_CALL(UpdateColliderTransform, COLLIDER_o147) - EVT_CALL(UpdateColliderTransform, COLLIDER_o148) - EVT_WAIT(1) - EVT_IF_LT(LVar0, 0) - EVT_GOTO(1) - EVT_END_IF - EVT_RETURN - EVT_END + SetF(LVar0, Float(0.0)) + Label(0) + Call(TranslateModel, MODEL_o29, 0, LVar0, 0) + Call(TranslateModel, MODEL_o30, 0, LVar0, 0) + Call(TranslateModel, MODEL_o31, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o146) + Call(UpdateColliderTransform, COLLIDER_o147) + Call(UpdateColliderTransform, COLLIDER_o148) + Wait(1) + SubF(LVar0, Float(0.7)) + IfGe(LVar0, -22) + Goto(0) + EndIf + Label(1) + AddF(LVar0, Float(1.1)) + Call(TranslateModel, MODEL_o29, 0, LVar0, 0) + Call(TranslateModel, MODEL_o30, 0, LVar0, 0) + Call(TranslateModel, MODEL_o31, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o146) + Call(UpdateColliderTransform, COLLIDER_o147) + Call(UpdateColliderTransform, COLLIDER_o148) + Wait(1) + IfLt(LVar0, 0) + Goto(1) + EndIf + Return + End }; EvtScript N(EVS_UpdateSinkingPlatform) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_CALL(N(GetCurrentFloor), LVarA) - EVT_SETF(LVar0, EVT_FLOAT(0.0)) - EVT_LABEL(0) - EVT_CALL(TranslateModel, LVar1, 0, LVar0, 0) - EVT_CALL(TranslateModel, LVar2, 0, LVar0, 0) - EVT_CALL(TranslateModel, LVar3, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, LVar4) - EVT_CALL(UpdateColliderTransform, LVar5) - EVT_CALL(UpdateColliderTransform, LVar6) - EVT_SUBF(LVar0, EVT_FLOAT(0.6)) - EVT_IF_LT(LVar0, -30) - EVT_SET(LVar0, -30) - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(N(GetCurrentFloor), LVarB) - EVT_CALL(GetPlayerActionState, LVarC) - EVT_IF_EQ(LVarB, LVar4) - EVT_IF_NE(LVarC, ACTION_STATE_JUMP) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVarB, LVar5) - EVT_IF_NE(LVarC, ACTION_STATE_JUMP) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_LABEL(1) - EVT_IF_LE(LVar0, -20) - EVT_CALL(IsPlayerWithin, LVar7, LVar8, LVar9, LVarD) - EVT_IF_EQ(LVarD, 0) - EVT_ADDF(LVar0, EVT_FLOAT(1.1)) - EVT_END_IF - EVT_ELSE - EVT_ADDF(LVar0, EVT_FLOAT(1.1)) - EVT_END_IF - EVT_CALL(TranslateModel, LVar1, 0, LVar0, 0) - EVT_CALL(TranslateModel, LVar2, 0, LVar0, 0) - EVT_CALL(TranslateModel, LVar3, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, LVar4) - EVT_CALL(UpdateColliderTransform, LVar5) - EVT_CALL(UpdateColliderTransform, LVar6) - EVT_WAIT(1) - EVT_CALL(N(GetCurrentFloor), LVarB) - EVT_CALL(GetPlayerActionState, LVarC) - EVT_CALL(N(GetActingPartner), LVarD) - EVT_IF_EQ(LVarD, PARTNER_LAKILESTER) - EVT_CALL(IsPlayerWithin, LVar7, LVar8, LVar9, LVarD) - EVT_IF_EQ(LVarD, 1) - EVT_GOTO(0) - EVT_ELSE - EVT_GOTO(15) - EVT_END_IF - EVT_ELSE - EVT_LABEL(15) - EVT_IF_EQ(LVarB, LVar4) - EVT_IF_NE(LVarC, ACTION_STATE_JUMP) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVarB, LVar5) - EVT_IF_NE(LVarC, ACTION_STATE_JUMP) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_IF_LT(LVar0, 0) - EVT_GOTO(1) - EVT_END_IF - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0B) + Call(N(GetCurrentFloor), LVarA) + SetF(LVar0, Float(0.0)) + Label(0) + Call(TranslateModel, LVar1, 0, LVar0, 0) + Call(TranslateModel, LVar2, 0, LVar0, 0) + Call(TranslateModel, LVar3, 0, LVar0, 0) + Call(UpdateColliderTransform, LVar4) + Call(UpdateColliderTransform, LVar5) + Call(UpdateColliderTransform, LVar6) + SubF(LVar0, Float(0.6)) + IfLt(LVar0, -30) + Set(LVar0, -30) + EndIf + Wait(1) + Call(N(GetCurrentFloor), LVarB) + Call(GetPlayerActionState, LVarC) + IfEq(LVarB, LVar4) + IfNe(LVarC, ACTION_STATE_JUMP) + Goto(0) + EndIf + EndIf + IfEq(LVarB, LVar5) + IfNe(LVarC, ACTION_STATE_JUMP) + Goto(0) + EndIf + EndIf + Label(1) + IfLe(LVar0, -20) + Call(IsPlayerWithin, LVar7, LVar8, LVar9, LVarD) + IfEq(LVarD, 0) + AddF(LVar0, Float(1.1)) + EndIf + Else + AddF(LVar0, Float(1.1)) + EndIf + Call(TranslateModel, LVar1, 0, LVar0, 0) + Call(TranslateModel, LVar2, 0, LVar0, 0) + Call(TranslateModel, LVar3, 0, LVar0, 0) + Call(UpdateColliderTransform, LVar4) + Call(UpdateColliderTransform, LVar5) + Call(UpdateColliderTransform, LVar6) + Wait(1) + Call(N(GetCurrentFloor), LVarB) + Call(GetPlayerActionState, LVarC) + Call(N(GetActingPartner), LVarD) + IfEq(LVarD, PARTNER_LAKILESTER) + Call(IsPlayerWithin, LVar7, LVar8, LVar9, LVarD) + IfEq(LVarD, 1) + Goto(0) + Else + Goto(15) + EndIf + Else + Label(15) + IfEq(LVarB, LVar4) + IfNe(LVarC, ACTION_STATE_JUMP) + Goto(0) + EndIf + EndIf + IfEq(LVarB, LVar5) + IfNe(LVarC, ACTION_STATE_JUMP) + Goto(0) + EndIf + EndIf + EndIf + IfLt(LVar0, 0) + Goto(1) + EndIf + Return + End }; EvtScript N(EVS_OnTouchSinkingPlatform1) = { - EVT_USE_ARRAY(LVar0) - EVT_IF_EQ(ArrayVar(1), 0) - EVT_SET(ArrayVar(1), 1) - EVT_SET(LVar1, MODEL_o29) - EVT_SET(LVar2, MODEL_o30) - EVT_SET(LVar3, MODEL_o31) - EVT_SET(LVar4, COLLIDER_o146) - EVT_SET(LVar5, COLLIDER_o147) - EVT_SET(LVar6, COLLIDER_o148) - EVT_CALL(N(GetModelLateralPos), MODEL_o30) - EVT_SET(LVar9, 50) - EVT_EXEC_WAIT(N(EVS_UpdateSinkingPlatform)) - EVT_SET(ArrayVar(1), 0) - EVT_END_IF - EVT_RETURN - EVT_END + UseArray(LVar0) + IfEq(ArrayVar(1), 0) + Set(ArrayVar(1), 1) + Set(LVar1, MODEL_o29) + Set(LVar2, MODEL_o30) + Set(LVar3, MODEL_o31) + Set(LVar4, COLLIDER_o146) + Set(LVar5, COLLIDER_o147) + Set(LVar6, COLLIDER_o148) + Call(N(GetModelLateralPos), MODEL_o30) + Set(LVar9, 50) + ExecWait(N(EVS_UpdateSinkingPlatform)) + Set(ArrayVar(1), 0) + EndIf + Return + End }; EvtScript N(EVS_OnTouchSinkingPlatform2) = { - EVT_USE_ARRAY(LVar0) - EVT_IF_EQ(ArrayVar(2), 0) - EVT_SET(ArrayVar(2), 1) - EVT_SET(LVar1, MODEL_o26) - EVT_SET(LVar2, MODEL_o27) - EVT_SET(LVar3, MODEL_o28) - EVT_SET(LVar4, COLLIDER_o143) - EVT_SET(LVar5, COLLIDER_o144) - EVT_SET(LVar6, COLLIDER_o145) - EVT_CALL(N(GetModelLateralPos), MODEL_o27) - EVT_SET(LVar9, 60) - EVT_EXEC_WAIT(N(EVS_UpdateSinkingPlatform)) - EVT_SET(ArrayVar(2), 0) - EVT_END_IF - EVT_RETURN - EVT_END + UseArray(LVar0) + IfEq(ArrayVar(2), 0) + Set(ArrayVar(2), 1) + Set(LVar1, MODEL_o26) + Set(LVar2, MODEL_o27) + Set(LVar3, MODEL_o28) + Set(LVar4, COLLIDER_o143) + Set(LVar5, COLLIDER_o144) + Set(LVar6, COLLIDER_o145) + Call(N(GetModelLateralPos), MODEL_o27) + Set(LVar9, 60) + ExecWait(N(EVS_UpdateSinkingPlatform)) + Set(ArrayVar(2), 0) + EndIf + Return + End }; EvtScript N(EVS_OnTouchSinkingPlatform3) = { - EVT_USE_ARRAY(LVar0) - EVT_IF_EQ(ArrayVar(3), 0) - EVT_SET(ArrayVar(3), 1) - EVT_SET(LVar1, MODEL_o21) - EVT_SET(LVar2, MODEL_o22) - EVT_SET(LVar3, MODEL_o18) - EVT_SET(LVar4, COLLIDER_o140) - EVT_SET(LVar5, COLLIDER_o141) - EVT_SET(LVar6, COLLIDER_o142) - EVT_CALL(N(GetModelLateralPos), MODEL_o22) - EVT_SET(LVar9, 50) - EVT_EXEC_WAIT(N(EVS_UpdateSinkingPlatform)) - EVT_SET(ArrayVar(3), 0) - EVT_END_IF - EVT_RETURN - EVT_END + UseArray(LVar0) + IfEq(ArrayVar(3), 0) + Set(ArrayVar(3), 1) + Set(LVar1, MODEL_o21) + Set(LVar2, MODEL_o22) + Set(LVar3, MODEL_o18) + Set(LVar4, COLLIDER_o140) + Set(LVar5, COLLIDER_o141) + Set(LVar6, COLLIDER_o142) + Call(N(GetModelLateralPos), MODEL_o22) + Set(LVar9, 50) + ExecWait(N(EVS_UpdateSinkingPlatform)) + Set(ArrayVar(3), 0) + EndIf + Return + End }; EvtScript N(EVS_OnTouchSinkingPlatform4) = { - EVT_USE_ARRAY(LVar0) - EVT_IF_EQ(ArrayVar(4), 0) - EVT_SET(ArrayVar(4), 1) - EVT_SET(LVar1, MODEL_o70) - EVT_SET(LVar2, MODEL_o71) - EVT_SET(LVar3, MODEL_o72) - EVT_SET(LVar4, COLLIDER_o131) - EVT_SET(LVar5, COLLIDER_o132) - EVT_SET(LVar6, COLLIDER_o133) - EVT_CALL(N(GetModelLateralPos), MODEL_o71) - EVT_SET(LVar9, 50) - EVT_EXEC_WAIT(N(EVS_UpdateSinkingPlatform)) - EVT_SET(ArrayVar(4), 0) - EVT_END_IF - EVT_RETURN - EVT_END + UseArray(LVar0) + IfEq(ArrayVar(4), 0) + Set(ArrayVar(4), 1) + Set(LVar1, MODEL_o70) + Set(LVar2, MODEL_o71) + Set(LVar3, MODEL_o72) + Set(LVar4, COLLIDER_o131) + Set(LVar5, COLLIDER_o132) + Set(LVar6, COLLIDER_o133) + Call(N(GetModelLateralPos), MODEL_o71) + Set(LVar9, 50) + ExecWait(N(EVS_UpdateSinkingPlatform)) + Set(ArrayVar(4), 0) + EndIf + Return + End }; EvtScript N(EVS_OnTouchSinkingPlatform5) = { - EVT_USE_ARRAY(LVar0) - EVT_IF_EQ(ArrayVar(5), 0) - EVT_SET(ArrayVar(5), 1) - EVT_SET(LVar1, MODEL_o67) - EVT_SET(LVar2, MODEL_o68) - EVT_SET(LVar3, MODEL_o69) - EVT_SET(LVar4, COLLIDER_o134) - EVT_SET(LVar5, COLLIDER_o135) - EVT_SET(LVar6, COLLIDER_o136) - EVT_CALL(N(GetModelLateralPos), MODEL_o68) - EVT_SET(LVar9, 60) - EVT_EXEC_WAIT(N(EVS_UpdateSinkingPlatform)) - EVT_SET(ArrayVar(5), 0) - EVT_END_IF - EVT_RETURN - EVT_END + UseArray(LVar0) + IfEq(ArrayVar(5), 0) + Set(ArrayVar(5), 1) + Set(LVar1, MODEL_o67) + Set(LVar2, MODEL_o68) + Set(LVar3, MODEL_o69) + Set(LVar4, COLLIDER_o134) + Set(LVar5, COLLIDER_o135) + Set(LVar6, COLLIDER_o136) + Call(N(GetModelLateralPos), MODEL_o68) + Set(LVar9, 60) + ExecWait(N(EVS_UpdateSinkingPlatform)) + Set(ArrayVar(5), 0) + EndIf + Return + End }; EvtScript N(EVS_OnTouchSinkingPlatform6) = { - EVT_USE_ARRAY(LVar0) - EVT_IF_EQ(ArrayVar(6), 0) - EVT_SET(ArrayVar(6), 1) - EVT_SET(LVar1, MODEL_o64) - EVT_SET(LVar2, MODEL_o65) - EVT_SET(LVar3, MODEL_o66) - EVT_SET(LVar4, COLLIDER_o137) - EVT_SET(LVar5, COLLIDER_o138) - EVT_SET(LVar6, COLLIDER_o139) - EVT_CALL(N(GetModelLateralPos), MODEL_o65) - EVT_SET(LVar9, 50) - EVT_EXEC_WAIT(N(EVS_UpdateSinkingPlatform)) - EVT_SET(ArrayVar(6), 0) - EVT_END_IF - EVT_RETURN - EVT_END + UseArray(LVar0) + IfEq(ArrayVar(6), 0) + Set(ArrayVar(6), 1) + Set(LVar1, MODEL_o64) + Set(LVar2, MODEL_o65) + Set(LVar3, MODEL_o66) + Set(LVar4, COLLIDER_o137) + Set(LVar5, COLLIDER_o138) + Set(LVar6, COLLIDER_o139) + Call(N(GetModelLateralPos), MODEL_o65) + Set(LVar9, 50) + ExecWait(N(EVS_UpdateSinkingPlatform)) + Set(ArrayVar(6), 0) + EndIf + Return + End }; EvtScript N(EVS_UpdatePlatformBobbing) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, -3, 30, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, LVar2, 0, LVar0, 0) - EVT_CALL(TranslateModel, LVar3, 0, LVar0, 0) - EVT_CALL(TranslateModel, LVar4, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(MakeLerp, -3, 0, 30, EASING_LINEAR) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, LVar2, 0, LVar0, 0) - EVT_CALL(TranslateModel, LVar3, 0, LVar0, 0) - EVT_CALL(TranslateModel, LVar4, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(2) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0B) + Label(0) + Call(MakeLerp, 0, -3, 30, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(TranslateModel, LVar2, 0, LVar0, 0) + Call(TranslateModel, LVar3, 0, LVar0, 0) + Call(TranslateModel, LVar4, 0, LVar0, 0) + Wait(1) + IfNe(LVar1, 0) + Goto(1) + EndIf + Call(MakeLerp, -3, 0, 30, EASING_LINEAR) + Label(2) + Call(UpdateLerp) + Call(TranslateModel, LVar2, 0, LVar0, 0) + Call(TranslateModel, LVar3, 0, LVar0, 0) + Call(TranslateModel, LVar4, 0, LVar0, 0) + Wait(1) + IfNe(LVar1, 0) + Goto(2) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_StartBobbingPlatform1) = { - EVT_WAIT(5) - EVT_SET(LVar2, MODEL_o29) - EVT_SET(LVar3, MODEL_o30) - EVT_SET(LVar4, MODEL_o31) - EVT_EXEC_WAIT(N(EVS_UpdatePlatformBobbing)) - EVT_RETURN - EVT_END + Wait(5) + Set(LVar2, MODEL_o29) + Set(LVar3, MODEL_o30) + Set(LVar4, MODEL_o31) + ExecWait(N(EVS_UpdatePlatformBobbing)) + Return + End }; EvtScript N(EVS_StartBobbingPlatform2) = { - EVT_WAIT(10) - EVT_SET(LVar2, MODEL_o26) - EVT_SET(LVar3, MODEL_o27) - EVT_SET(LVar4, MODEL_o28) - EVT_EXEC_WAIT(N(EVS_UpdatePlatformBobbing)) - EVT_RETURN - EVT_END + Wait(10) + Set(LVar2, MODEL_o26) + Set(LVar3, MODEL_o27) + Set(LVar4, MODEL_o28) + ExecWait(N(EVS_UpdatePlatformBobbing)) + Return + End }; EvtScript N(EVS_StartBobbingPlatform3) = { - EVT_WAIT(5) - EVT_SET(LVar2, MODEL_o21) - EVT_SET(LVar3, MODEL_o22) - EVT_SET(LVar4, MODEL_o18) - EVT_EXEC_WAIT(N(EVS_UpdatePlatformBobbing)) - EVT_RETURN - EVT_END + Wait(5) + Set(LVar2, MODEL_o21) + Set(LVar3, MODEL_o22) + Set(LVar4, MODEL_o18) + ExecWait(N(EVS_UpdatePlatformBobbing)) + Return + End }; EvtScript N(EVS_StartBobbingPlatform4) = { - EVT_WAIT(10) - EVT_SET(LVar2, MODEL_o70) - EVT_SET(LVar3, MODEL_o71) - EVT_SET(LVar4, MODEL_o72) - EVT_EXEC_WAIT(N(EVS_UpdatePlatformBobbing)) - EVT_RETURN - EVT_END + Wait(10) + Set(LVar2, MODEL_o70) + Set(LVar3, MODEL_o71) + Set(LVar4, MODEL_o72) + ExecWait(N(EVS_UpdatePlatformBobbing)) + Return + End }; EvtScript N(EVS_StartBobbingPlatform5) = { - EVT_WAIT(5) - EVT_SET(LVar2, MODEL_o67) - EVT_SET(LVar3, MODEL_o68) - EVT_SET(LVar4, MODEL_o69) - EVT_EXEC_WAIT(N(EVS_UpdatePlatformBobbing)) - EVT_RETURN - EVT_END + Wait(5) + Set(LVar2, MODEL_o67) + Set(LVar3, MODEL_o68) + Set(LVar4, MODEL_o69) + ExecWait(N(EVS_UpdatePlatformBobbing)) + Return + End }; EvtScript N(EVS_StartBobbingPlatform6) = { - EVT_WAIT(10) - EVT_SET(LVar2, MODEL_o64) - EVT_SET(LVar3, MODEL_o65) - EVT_SET(LVar4, MODEL_o66) - EVT_EXEC_WAIT(N(EVS_UpdatePlatformBobbing)) - EVT_RETURN - EVT_END + Wait(10) + Set(LVar2, MODEL_o64) + Set(LVar3, MODEL_o65) + Set(LVar4, MODEL_o66) + ExecWait(N(EVS_UpdatePlatformBobbing)) + Return + End }; EvtScript N(EVS_UpdateMovingPlatform) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_CALL(ParentColliderToModel, COLLIDER_o128, MODEL_o123) - EVT_CALL(ParentColliderToModel, COLLIDER_o129, MODEL_o124) - EVT_CALL(ParentColliderToModel, COLLIDER_o130, MODEL_o125) - EVT_SET(LVar0, -105) - EVT_SET(LVar3, 0) - EVT_LOOP(0) - EVT_CALL(MakeLerp, LVar0, 110, 215, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g22, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o128) - EVT_CALL(UpdateColliderTransform, COLLIDER_o129) - EVT_CALL(UpdateColliderTransform, COLLIDER_o130) - EVT_SET(LVar4, LVar0) - EVT_SUB(LVar4, LVar3) - EVT_SET(LVar3, LVar0) - EVT_CALL(N(AddPushVelocity), LVar4, COLLIDER_o128, COLLIDER_o129) - EVT_IF_GT(LVar0, 95) - EVT_CALL(N(GetActingPartner), LVar9) - EVT_IF_EQ(LVar9, PARTNER_LAKILESTER) - EVT_CALL(N(GetCurrentFloor), LVar2) - EVT_IF_EQ(LVar2, COLLIDER_pp2) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_CALL(MakeLerp, LVar0, -105, 215, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g22, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o128) - EVT_CALL(UpdateColliderTransform, COLLIDER_o129) - EVT_CALL(UpdateColliderTransform, COLLIDER_o130) - EVT_SET(LVar4, LVar0) - EVT_SUB(LVar4, LVar3) - EVT_SET(LVar3, LVar0) - EVT_CALL(N(AddPushVelocity), LVar4, COLLIDER_o128, COLLIDER_o129) - EVT_IF_LT(LVar0, -90) - EVT_CALL(N(GetActingPartner), LVar9) - EVT_IF_EQ(LVar9, PARTNER_LAKILESTER) - EVT_CALL(N(GetCurrentFloor), LVar2) - EVT_IF_EQ(LVar2, COLLIDER_pp1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_END_LOOP - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0B) + Call(ParentColliderToModel, COLLIDER_o128, MODEL_o123) + Call(ParentColliderToModel, COLLIDER_o129, MODEL_o124) + Call(ParentColliderToModel, COLLIDER_o130, MODEL_o125) + Set(LVar0, -105) + Set(LVar3, 0) + Loop(0) + Call(MakeLerp, LVar0, 110, 215, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g22, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o128) + Call(UpdateColliderTransform, COLLIDER_o129) + Call(UpdateColliderTransform, COLLIDER_o130) + Set(LVar4, LVar0) + Sub(LVar4, LVar3) + Set(LVar3, LVar0) + Call(N(AddPushVelocity), LVar4, COLLIDER_o128, COLLIDER_o129) + IfGt(LVar0, 95) + Call(N(GetActingPartner), LVar9) + IfEq(LVar9, PARTNER_LAKILESTER) + Call(N(GetCurrentFloor), LVar2) + IfEq(LVar2, COLLIDER_pp2) + BreakLoop + EndIf + EndIf + EndIf + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(20) + Call(MakeLerp, LVar0, -105, 215, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g22, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o128) + Call(UpdateColliderTransform, COLLIDER_o129) + Call(UpdateColliderTransform, COLLIDER_o130) + Set(LVar4, LVar0) + Sub(LVar4, LVar3) + Set(LVar3, LVar0) + Call(N(AddPushVelocity), LVar4, COLLIDER_o128, COLLIDER_o129) + IfLt(LVar0, -90) + Call(N(GetActingPartner), LVar9) + IfEq(LVar9, PARTNER_LAKILESTER) + Call(N(GetCurrentFloor), LVar2) + IfEq(LVar2, COLLIDER_pp1) + BreakLoop + EndIf + EndIf + EndIf + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(20) + EndLoop + Return + End }; EvtScript N(EVS_InitializePlatforms) = { - EVT_MALLOC_ARRAY(6, LVarA) - EVT_SET(ArrayVar(0), 0) - EVT_SET(ArrayVar(1), 0) - EVT_SET(ArrayVar(2), 0) - EVT_SET(ArrayVar(3), 0) - EVT_SET(ArrayVar(4), 0) - EVT_SET(ArrayVar(5), 0) - EVT_SET(ArrayVar(6), 0) - EVT_CALL(ParentColliderToModel, COLLIDER_o146, MODEL_o29) - EVT_CALL(ParentColliderToModel, COLLIDER_o147, MODEL_o30) - EVT_CALL(ParentColliderToModel, COLLIDER_o148, MODEL_o31) - EVT_SET(LVar0, LVarA) - EVT_BIND_TRIGGER(N(EVS_OnTouchSinkingPlatform1), TRIGGER_FLOOR_TOUCH, COLLIDER_o146, 1, 0) - EVT_SET(LVar0, LVarA) - EVT_BIND_TRIGGER(N(EVS_OnTouchSinkingPlatform1), TRIGGER_FLOOR_TOUCH, COLLIDER_o147, 1, 0) - EVT_CALL(ParentColliderToModel, COLLIDER_o143, MODEL_o26) - EVT_CALL(ParentColliderToModel, COLLIDER_o144, MODEL_o27) - EVT_CALL(ParentColliderToModel, COLLIDER_o145, MODEL_o28) - EVT_SET(LVar0, LVarA) - EVT_BIND_TRIGGER(N(EVS_OnTouchSinkingPlatform2), TRIGGER_FLOOR_TOUCH, COLLIDER_o143, 1, 0) - EVT_SET(LVar0, LVarA) - EVT_BIND_TRIGGER(N(EVS_OnTouchSinkingPlatform2), TRIGGER_FLOOR_TOUCH, COLLIDER_o144, 1, 0) - EVT_CALL(ParentColliderToModel, COLLIDER_o140, MODEL_o21) - EVT_CALL(ParentColliderToModel, COLLIDER_o141, MODEL_o22) - EVT_CALL(ParentColliderToModel, COLLIDER_o142, MODEL_o18) - EVT_SET(LVar0, LVarA) - EVT_BIND_TRIGGER(N(EVS_OnTouchSinkingPlatform3), TRIGGER_FLOOR_TOUCH, COLLIDER_o140, 1, 0) - EVT_SET(LVar0, LVarA) - EVT_BIND_TRIGGER(N(EVS_OnTouchSinkingPlatform3), TRIGGER_FLOOR_TOUCH, COLLIDER_o141, 1, 0) - EVT_CALL(ParentColliderToModel, COLLIDER_o131, MODEL_o70) - EVT_CALL(ParentColliderToModel, COLLIDER_o132, MODEL_o71) - EVT_CALL(ParentColliderToModel, COLLIDER_o133, MODEL_o72) - EVT_SET(LVar0, LVarA) - EVT_BIND_TRIGGER(N(EVS_OnTouchSinkingPlatform4), TRIGGER_FLOOR_TOUCH, COLLIDER_o131, 1, 0) - EVT_SET(LVar0, LVarA) - EVT_BIND_TRIGGER(N(EVS_OnTouchSinkingPlatform4), TRIGGER_FLOOR_TOUCH, COLLIDER_o132, 1, 0) - EVT_CALL(ParentColliderToModel, COLLIDER_o134, MODEL_o67) - EVT_CALL(ParentColliderToModel, COLLIDER_o135, MODEL_o68) - EVT_CALL(ParentColliderToModel, COLLIDER_o136, MODEL_o69) - EVT_SET(LVar0, LVarA) - EVT_BIND_TRIGGER(N(EVS_OnTouchSinkingPlatform5), TRIGGER_FLOOR_TOUCH, COLLIDER_o134, 1, 0) - EVT_SET(LVar0, LVarA) - EVT_BIND_TRIGGER(N(EVS_OnTouchSinkingPlatform5), TRIGGER_FLOOR_TOUCH, COLLIDER_o135, 1, 0) - EVT_CALL(ParentColliderToModel, COLLIDER_o137, MODEL_o64) - EVT_CALL(ParentColliderToModel, COLLIDER_o138, MODEL_o65) - EVT_CALL(ParentColliderToModel, COLLIDER_o139, MODEL_o66) - EVT_SET(LVar0, LVarA) - EVT_BIND_TRIGGER(N(EVS_OnTouchSinkingPlatform6), TRIGGER_FLOOR_TOUCH, COLLIDER_o137, 1, 0) - EVT_SET(LVar0, LVarA) - EVT_BIND_TRIGGER(N(EVS_OnTouchSinkingPlatform6), TRIGGER_FLOOR_TOUCH, COLLIDER_o138, 1, 0) - EVT_EXEC(N(EVS_StartBobbingPlatform1)) - EVT_EXEC(N(EVS_StartBobbingPlatform2)) - EVT_EXEC(N(EVS_StartBobbingPlatform3)) - EVT_EXEC(N(EVS_StartBobbingPlatform4)) - EVT_EXEC(N(EVS_StartBobbingPlatform5)) - EVT_EXEC(N(EVS_StartBobbingPlatform6)) - EVT_EXEC(N(EVS_UpdateMovingPlatform)) - EVT_RETURN - EVT_END + MallocArray(6, LVarA) + Set(ArrayVar(0), 0) + Set(ArrayVar(1), 0) + Set(ArrayVar(2), 0) + Set(ArrayVar(3), 0) + Set(ArrayVar(4), 0) + Set(ArrayVar(5), 0) + Set(ArrayVar(6), 0) + Call(ParentColliderToModel, COLLIDER_o146, MODEL_o29) + Call(ParentColliderToModel, COLLIDER_o147, MODEL_o30) + Call(ParentColliderToModel, COLLIDER_o148, MODEL_o31) + Set(LVar0, LVarA) + BindTrigger(N(EVS_OnTouchSinkingPlatform1), TRIGGER_FLOOR_TOUCH, COLLIDER_o146, 1, 0) + Set(LVar0, LVarA) + BindTrigger(N(EVS_OnTouchSinkingPlatform1), TRIGGER_FLOOR_TOUCH, COLLIDER_o147, 1, 0) + Call(ParentColliderToModel, COLLIDER_o143, MODEL_o26) + Call(ParentColliderToModel, COLLIDER_o144, MODEL_o27) + Call(ParentColliderToModel, COLLIDER_o145, MODEL_o28) + Set(LVar0, LVarA) + BindTrigger(N(EVS_OnTouchSinkingPlatform2), TRIGGER_FLOOR_TOUCH, COLLIDER_o143, 1, 0) + Set(LVar0, LVarA) + BindTrigger(N(EVS_OnTouchSinkingPlatform2), TRIGGER_FLOOR_TOUCH, COLLIDER_o144, 1, 0) + Call(ParentColliderToModel, COLLIDER_o140, MODEL_o21) + Call(ParentColliderToModel, COLLIDER_o141, MODEL_o22) + Call(ParentColliderToModel, COLLIDER_o142, MODEL_o18) + Set(LVar0, LVarA) + BindTrigger(N(EVS_OnTouchSinkingPlatform3), TRIGGER_FLOOR_TOUCH, COLLIDER_o140, 1, 0) + Set(LVar0, LVarA) + BindTrigger(N(EVS_OnTouchSinkingPlatform3), TRIGGER_FLOOR_TOUCH, COLLIDER_o141, 1, 0) + Call(ParentColliderToModel, COLLIDER_o131, MODEL_o70) + Call(ParentColliderToModel, COLLIDER_o132, MODEL_o71) + Call(ParentColliderToModel, COLLIDER_o133, MODEL_o72) + Set(LVar0, LVarA) + BindTrigger(N(EVS_OnTouchSinkingPlatform4), TRIGGER_FLOOR_TOUCH, COLLIDER_o131, 1, 0) + Set(LVar0, LVarA) + BindTrigger(N(EVS_OnTouchSinkingPlatform4), TRIGGER_FLOOR_TOUCH, COLLIDER_o132, 1, 0) + Call(ParentColliderToModel, COLLIDER_o134, MODEL_o67) + Call(ParentColliderToModel, COLLIDER_o135, MODEL_o68) + Call(ParentColliderToModel, COLLIDER_o136, MODEL_o69) + Set(LVar0, LVarA) + BindTrigger(N(EVS_OnTouchSinkingPlatform5), TRIGGER_FLOOR_TOUCH, COLLIDER_o134, 1, 0) + Set(LVar0, LVarA) + BindTrigger(N(EVS_OnTouchSinkingPlatform5), TRIGGER_FLOOR_TOUCH, COLLIDER_o135, 1, 0) + Call(ParentColliderToModel, COLLIDER_o137, MODEL_o64) + Call(ParentColliderToModel, COLLIDER_o138, MODEL_o65) + Call(ParentColliderToModel, COLLIDER_o139, MODEL_o66) + Set(LVar0, LVarA) + BindTrigger(N(EVS_OnTouchSinkingPlatform6), TRIGGER_FLOOR_TOUCH, COLLIDER_o137, 1, 0) + Set(LVar0, LVarA) + BindTrigger(N(EVS_OnTouchSinkingPlatform6), TRIGGER_FLOOR_TOUCH, COLLIDER_o138, 1, 0) + Exec(N(EVS_StartBobbingPlatform1)) + Exec(N(EVS_StartBobbingPlatform2)) + Exec(N(EVS_StartBobbingPlatform3)) + Exec(N(EVS_StartBobbingPlatform4)) + Exec(N(EVS_StartBobbingPlatform5)) + Exec(N(EVS_StartBobbingPlatform6)) + Exec(N(EVS_UpdateMovingPlatform)) + Return + End }; diff --git a/src/world/area_kzn/kzn_02/kzn_02_3_npc.c b/src/world/area_kzn/kzn_02/kzn_02_3_npc.c index 0bec27df23c..24c20f8189a 100644 --- a/src/world/area_kzn/kzn_02/kzn_02_3_npc.c +++ b/src/world/area_kzn/kzn_02/kzn_02_3_npc.c @@ -20,147 +20,147 @@ EVT_LETTER_PROMPT(Kolorado, NPC_Kolorado, EVT_LETTER_REWARD(Kolorado); EvtScript N(EVS_NpcIdle_Kolorado) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, -825) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(30) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(5.0), 100, 350, EVT_FLOAT(15.0), EVT_FLOAT(-7.0)) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_00EE) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_LOOP(30) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_SUB(LVar0, 1) - EVT_END_LOOP - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(3.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, -740, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -650, 20, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Thrown) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, -655, 20, 0, 20) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Yell) - EVT_CALL(NpcJump0, NPC_SELF, -645, 20, 0, 5) - EVT_CALL(NpcJump0, NPC_SELF, -635, 20, 0, 5) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) - EVT_WAIT(15) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 1) - EVT_WAIT(5) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 1) - EVT_WAIT(10) - EVT_EXEC(N(EVS_KoloradoSinkingPlatform)) - EVT_SET(LVar0, 2) - EVT_LOOP(3) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) - EVT_CALL(ShowSweat, NPC_Kolorado, 1, 45, EMOTER_NPC, 0, 0, 0, 0, 20) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 1) - EVT_CALL(NpcMoveTo, NPC_SELF, -655, 0, LVar0) - EVT_CALL(ShowSweat, NPC_Kolorado, 1, -45, EMOTER_NPC, 0, 0, 0, 0, 20) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 1) - EVT_CALL(NpcMoveTo, NPC_SELF, -635, 0, LVar0) - EVT_MUL(LVar0, 2) - EVT_END_LOOP - EVT_CALL(ShowSweat, NPC_Kolorado, 0, 45, EMOTER_NPC, 0, 0, 0, 0, 20) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 2) - EVT_CALL(ShowSweat, NPC_Kolorado, 0, -45, EMOTER_NPC, 0, 0, 0, 0, 20) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 2) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Hurt) - EVT_CALL(ShowSweat, NPC_Kolorado, 0, -45, EMOTER_NPC, 0, 0, 0, 0, 20) - EVT_CALL(SetSelfVar, 0, 1) - EVT_THREAD - EVT_LABEL(15) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, 1, 10) - EVT_CALL(GetSelfVar, 0, LVar3) - EVT_IF_EQ(LVar3, 1) - EVT_WAIT(1) - EVT_GOTO(15) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_TOUCH_LAVA, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, -700, 150, 0, 35) - EVT_THREAD - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5.0)) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) - EVT_CALL(NpcJump0, NPC_SELF, -775, 20, -40, 40) - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Fallen) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 2) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, -760, 50, -40, 10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) - EVT_WAIT(4) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) - EVT_WAIT(8) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Fallen) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 2) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, -760, 40, -40, 10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) - EVT_WAIT(4) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) - EVT_WAIT(8) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Fallen) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 4) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 5, MSG_CH5_00EF) - EVT_WAIT(5) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 4) - EVT_SET(GB_StoryProgress, STORY_CH5_KOLORADO_FELL_IN_LAVA) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Loop(0) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar0, -825) + BreakLoop + EndIf + EndLoop + Wait(30) + Call(AdjustCam, CAM_DEFAULT, Float(5.0), 100, 350, Float(15.0), Float(-7.0)) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_00EE) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Loop(30) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + Sub(LVar0, 1) + EndLoop + Call(SetNpcSpeed, NPC_SELF, Float(3.0)) + Call(NpcMoveTo, NPC_SELF, -740, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, -650, 20, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Thrown) + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, -655, 20, 0, 20) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Yell) + Call(NpcJump0, NPC_SELF, -645, 20, 0, 5) + Call(NpcJump0, NPC_SELF, -635, 20, 0, 5) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) + Wait(15) + Call(InterpNpcYaw, NPC_SELF, 270, 1) + Wait(5) + Call(InterpNpcYaw, NPC_SELF, 90, 1) + Wait(10) + Exec(N(EVS_KoloradoSinkingPlatform)) + Set(LVar0, 2) + Loop(3) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) + Call(ShowSweat, NPC_Kolorado, 1, 45, EMOTER_NPC, 0, 0, 0, 0, 20) + Call(InterpNpcYaw, NPC_SELF, 270, 1) + Call(NpcMoveTo, NPC_SELF, -655, 0, LVar0) + Call(ShowSweat, NPC_Kolorado, 1, -45, EMOTER_NPC, 0, 0, 0, 0, 20) + Call(InterpNpcYaw, NPC_SELF, 90, 1) + Call(NpcMoveTo, NPC_SELF, -635, 0, LVar0) + Mul(LVar0, 2) + EndLoop + Call(ShowSweat, NPC_Kolorado, 0, 45, EMOTER_NPC, 0, 0, 0, 0, 20) + Call(InterpNpcYaw, NPC_SELF, 270, 2) + Call(ShowSweat, NPC_Kolorado, 0, -45, EMOTER_NPC, 0, 0, 0, 0, 20) + Call(InterpNpcYaw, NPC_SELF, 90, 2) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Hurt) + Call(ShowSweat, NPC_Kolorado, 0, -45, EMOTER_NPC, 0, 0, 0, 0, 20) + Call(SetSelfVar, 0, 1) + Thread + Label(15) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, 1, 10) + Call(GetSelfVar, 0, LVar3) + IfEq(LVar3, 1) + Wait(1) + Goto(15) + EndIf + EndThread + Call(PlaySoundAtNpc, NPC_SELF, SOUND_TOUCH_LAVA, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, -700, 150, 0, 35) + Thread + Call(ResetCam, CAM_DEFAULT, Float(5.0)) + EndThread + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) + Call(NpcJump0, NPC_SELF, -775, 20, -40, 40) + Call(SetSelfVar, 0, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Fallen) + Call(InterpNpcYaw, NPC_SELF, 270, 2) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, -760, 50, -40, 10) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) + Wait(4) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) + Wait(8) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Fallen) + Call(InterpNpcYaw, NPC_SELF, 90, 2) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, -760, 40, -40, 10) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) + Wait(4) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) + Wait(8) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Fallen) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) + Wait(5) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) + Call(InterpNpcYaw, NPC_SELF, 90, 4) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 5, MSG_CH5_00EF) + Wait(5) + Call(InterpNpcYaw, NPC_SELF, 270, 4) + Set(GB_StoryProgress, STORY_CH5_KOLORADO_FELL_IN_LAVA) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_Kolorado) = { - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_00F0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 7) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) - EVT_CALL(CloseMessage) + Thread + Wait(20) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndThread + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_00F0) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 7) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) + Call(CloseMessage) EVT_LETTER_CHECK(Kolorado) - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInit_Kolorado) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_KOLORADO_FELL_IN_LAVA) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Kolorado))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Kolorado))) - EVT_CASE_LT(STORY_CH5_LAVA_STREAM_BLOCKED) - EVT_IF_EQ(GF_KZN06_Visited, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, -760, 20, -40) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Kolorado))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_KOLORADO_FELL_IN_LAVA) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Kolorado))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Kolorado))) + CaseLt(STORY_CH5_LAVA_STREAM_BLOCKED) + IfEq(GF_KZN06_Visited, FALSE) + Call(SetNpcPos, NPC_SELF, -760, 20, -40) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Kolorado))) + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + CaseDefault + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndSwitch + Return + End }; NpcData N(NpcData_Kolorado) = { diff --git a/src/world/area_kzn/kzn_02/kzn_02_4_demo.c b/src/world/area_kzn/kzn_02/kzn_02_4_demo.c index 32334a375ce..7c2ff36ed0e 100644 --- a/src/world/area_kzn/kzn_02/kzn_02_4_demo.c +++ b/src/world/area_kzn/kzn_02/kzn_02_4_demo.c @@ -2,51 +2,51 @@ #include "world/partners.h" EvtScript N(EVS_ProvideDemoInputs) = { - EVT_CALL(DemoJoystickXY, 87, 0) - EVT_WAIT(17) - EVT_CALL(DemoSetButtons, BUTTON_A) - EVT_WAIT(5) - EVT_CALL(DemoSetButtons, 0) - EVT_WAIT(20) - EVT_CALL(DemoSetButtons, BUTTON_A) - EVT_WAIT(7) - EVT_CALL(DemoSetButtons, 0) - EVT_WAIT(26) - EVT_CALL(DemoSetButtons, BUTTON_A) - EVT_WAIT(6) - EVT_CALL(DemoSetButtons, 0) - EVT_WAIT(20) - EVT_CALL(DemoSetButtons, BUTTON_A) - EVT_WAIT(5) - EVT_CALL(DemoSetButtons, 0) - EVT_WAIT(20) - EVT_IF_EQ(GF_DemoSceneDone, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_DemoSceneDone, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("kzn_02"), kzn_02_ENTRY_2, TRANSITION_END_DEMO_SCENE_BLACK) - EVT_WAIT(110) - EVT_RETURN - EVT_END + Call(DemoJoystickXY, 87, 0) + Wait(17) + Call(DemoSetButtons, BUTTON_A) + Wait(5) + Call(DemoSetButtons, 0) + Wait(20) + Call(DemoSetButtons, BUTTON_A) + Wait(7) + Call(DemoSetButtons, 0) + Wait(26) + Call(DemoSetButtons, BUTTON_A) + Wait(6) + Call(DemoSetButtons, 0) + Wait(20) + Call(DemoSetButtons, BUTTON_A) + Wait(5) + Call(DemoSetButtons, 0) + Wait(20) + IfEq(GF_DemoSceneDone, TRUE) + Return + EndIf + Set(GF_DemoSceneDone, TRUE) + Call(GotoMapSpecial, Ref("kzn_02"), kzn_02_ENTRY_2, TRANSITION_END_DEMO_SCENE_BLACK) + Wait(110) + Return + End }; EvtScript N(EVS_MonitorDemoState) = { - EVT_WAIT(10) - EVT_LOOP(0) - EVT_CALL(GetDemoState, LVar0) - EVT_IF_EQ(LVar0, DEMO_STATE_CHANGE_MAP) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(GF_DemoSceneDone, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_DemoSceneDone, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("kzn_02"), kzn_02_ENTRY_2, TRANSITION_END_DEMO_SCENE_WHITE) - EVT_WAIT(10) - EVT_RETURN - EVT_END + Wait(10) + Loop(0) + Call(GetDemoState, LVar0) + IfEq(LVar0, DEMO_STATE_CHANGE_MAP) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(GF_DemoSceneDone, TRUE) + Return + EndIf + Set(GF_DemoSceneDone, TRUE) + Call(GotoMapSpecial, Ref("kzn_02"), kzn_02_ENTRY_2, TRANSITION_END_DEMO_SCENE_WHITE) + Wait(10) + Return + End }; s32 N(DemoInitState) = 0; @@ -77,10 +77,10 @@ API_CALLABLE(N(SetupDemoScene)) { } EvtScript N(EVS_PlayDemoScene) = { - EVT_CALL(N(SetupDemoScene)) - EVT_SET(GF_DemoSceneDone, FALSE) - EVT_EXEC(N(EVS_MonitorDemoState)) - EVT_EXEC(N(EVS_ProvideDemoInputs)) - EVT_RETURN - EVT_END + Call(N(SetupDemoScene)) + Set(GF_DemoSceneDone, FALSE) + Exec(N(EVS_MonitorDemoState)) + Exec(N(EVS_ProvideDemoInputs)) + Return + End }; diff --git a/src/world/area_kzn/kzn_03/kzn_03_1_main.c b/src/world/area_kzn/kzn_03/kzn_03_1_main.c index af1de18afd3..ee0af7b1ee5 100644 --- a/src/world/area_kzn/kzn_03/kzn_03_1_main.c +++ b/src/world/area_kzn/kzn_03/kzn_03_1_main.c @@ -10,71 +10,71 @@ EvtScript N(EVS_ExitWalk_kzn_05_1) = EVT_EXIT_WALK(60, kzn_03_ENTRY_3, "kzn_05", EvtScript N(EVS_ExitWalk_kzn_09_2) = EVT_EXIT_WALK(60, kzn_03_ENTRY_4, "kzn_09", kzn_09_ENTRY_2); EvtScript N(EVS_BindTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kzn_02_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kzn_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kzn_09_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kzn_05_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili4, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kzn_09_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili5, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kzn_02_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kzn_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kzn_09_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kzn_05_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili4, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kzn_09_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili5, 1, 0) + Return + End }; EvtScript N(EVS_StartTexPanners_Lava) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(EnableTexPanning, MODEL_o112, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o151, TRUE) - EVT_CALL(EnableTexPanning, MODEL_toro, TRUE) - EVT_CALL(EnableTexPanning, MODEL_poko, TRUE) - EVT_THREAD + SetGroup(EVT_GROUP_00) + Call(EnableTexPanning, MODEL_o112, TRUE) + Call(EnableTexPanning, MODEL_o151, TRUE) + Call(EnableTexPanning, MODEL_toro, TRUE) + Call(EnableTexPanning, MODEL_poko, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 400, 0, 800, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 1, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_5) TEX_PAN_PARAMS_STEP( 300, -500, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread // animate lava bubbles (real ones, not the enemies) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, LVar0, 0) - EVT_ADD(LVar0, 0x8000) - EVT_WAIT(6) - EVT_END_LOOP - EVT_END_THREAD - EVT_RETURN - EVT_END + Set(LVar0, 0) + Loop(0) + Call(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, LVar0, 0) + Add(LVar0, 0x8000) + Wait(6) + EndLoop + EndThread + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_LAVALAVA) - EVT_CALL(SetSpriteShading, SHADING_KZN_03) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindTriggers)) - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(EVS_BindTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_1) - EVT_EXEC(N(EVS_StartTexPanners_Lava)) - EVT_SET(LVar0, MODEL_kem1) - EVT_EXEC(N(EVS_StartTexPanner_SmokeLeft)) - EVT_SET(LVar0, MODEL_kem2) - EVT_EXEC(N(EVS_StartTexPanner_SmokeRight)) - EVT_EXEC_WAIT(N(EVS_SetupZiplines)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_LAVALAVA) + Call(SetSpriteShading, SHADING_KZN_03) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindTriggers)) + Else + Set(LVar0, Ref(N(EVS_BindTriggers))) + Exec(EnterWalk) + EndIf + Wait(1) + Call(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) + Call(PlayAmbientSounds, AMBIENT_LAVA_1) + Exec(N(EVS_StartTexPanners_Lava)) + Set(LVar0, MODEL_kem1) + Exec(N(EVS_StartTexPanner_SmokeLeft)) + Set(LVar0, MODEL_kem2) + Exec(N(EVS_StartTexPanner_SmokeRight)) + ExecWait(N(EVS_SetupZiplines)) + Return + End }; diff --git a/src/world/area_kzn/kzn_03/kzn_03_2_npc.c b/src/world/area_kzn/kzn_03/kzn_03_2_npc.c index ec8911e1101..bc15ba6acec 100644 --- a/src/world/area_kzn/kzn_03/kzn_03_2_npc.c +++ b/src/world/area_kzn/kzn_03/kzn_03_2_npc.c @@ -19,142 +19,142 @@ EVT_LETTER_PROMPT(Kolorado, NPC_Kolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle EVT_LETTER_REWARD(Kolorado); EvtScript N(EVS_NpcIdle_Kolorado) = { - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(2.0)) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) - EVT_CALL(GetNpcPos, NPC_SELF, LVar4, LVar5, LVar6) - EVT_SET(LVar3, LVar4) - EVT_ADD(LVar3, -45) - EVT_SET(LVar7, 90) - EVT_LOOP(0) - EVT_SET(LVar2, LVar3) - EVT_SET(LVar3, LVar4) - EVT_SET(LVar4, LVar2) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar7, 5) - EVT_CALL(MakeLerp, LVar2, LVar3, 45, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcYaw, NPC_SELF, LVar7) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar5, LVar6) - EVT_WAIT(1) - EVT_IF_GE(GB_StoryProgress, STORY_CH5_SMASHED_ULTRA_BLOCK) - EVT_BREAK_LOOP - EVT_END_IF - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_IF_GE(GB_StoryProgress, STORY_CH5_SMASHED_ULTRA_BLOCK) - EVT_BREAK_LOOP - EVT_END_IF - EVT_ADD(LVar7, 180) - EVT_IF_GE(LVar7, 360) - EVT_ADD(LVar7, -360) - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_WAIT(10) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetSelfVar, 0, 1) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.5)) - EVT_LABEL(5) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar3, LVar4, LVar5, 9) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_WAIT(6) - EVT_GOTO(5) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Panic, 512, MSG_CH5_00F3) - EVT_CALL(SetSelfVar, 0, 0) - EVT_WAIT(18) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(SetNpcSpeed, NPC_SELF, Float(2.0)) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) + Call(GetNpcPos, NPC_SELF, LVar4, LVar5, LVar6) + Set(LVar3, LVar4) + Add(LVar3, -45) + Set(LVar7, 90) + Loop(0) + Set(LVar2, LVar3) + Set(LVar3, LVar4) + Set(LVar4, LVar2) + Call(InterpNpcYaw, NPC_SELF, LVar7, 5) + Call(MakeLerp, LVar2, LVar3, 45, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcYaw, NPC_SELF, LVar7) + Call(SetNpcPos, NPC_SELF, LVar0, LVar5, LVar6) + Wait(1) + IfGe(GB_StoryProgress, STORY_CH5_SMASHED_ULTRA_BLOCK) + BreakLoop + EndIf + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + IfGe(GB_StoryProgress, STORY_CH5_SMASHED_ULTRA_BLOCK) + BreakLoop + EndIf + Add(LVar7, 180) + IfGe(LVar7, 360) + Add(LVar7, -360) + EndIf + EndLoop + Call(DisablePlayerInput, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) + Call(NpcFacePlayer, NPC_SELF, 0) + Wait(10) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetSelfVar, 0, 1) + Thread + Call(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + Call(SetNpcJumpscale, NPC_SELF, Float(2.5)) + Label(5) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar3, LVar4, LVar5, 9) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 1) + Wait(6) + Goto(5) + EndIf + EndThread + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Panic, 512, MSG_CH5_00F3) + Call(SetSelfVar, 0, 0) + Wait(18) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_Kolorado) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_SMASHED_ULTRA_BLOCK) - EVT_IF_EQ(GF_KZN03_SpokeWithKolorado, FALSE) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(3.3), 0, 350, EVT_FLOAT(15.0), EVT_FLOAT(-7.0)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_00F1) - EVT_SET(GF_KZN03_SpokeWithKolorado, TRUE) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5.0)) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_00F2) - EVT_END_IF - EVT_ELSE - EVT_CALL(SetSelfVar, 0, 1) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.5)) - EVT_LABEL(5) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar3, LVar4, LVar5, 9) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_WAIT(6) - EVT_GOTO(5) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Panic, 512, MSG_CH5_00F3) - EVT_CALL(SetSelfVar, 0, 0) - EVT_WAIT(18) - EVT_END_IF - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + IfLt(GB_StoryProgress, STORY_CH5_SMASHED_ULTRA_BLOCK) + IfEq(GF_KZN03_SpokeWithKolorado, FALSE) + Call(AdjustCam, CAM_DEFAULT, Float(3.3), 0, 350, Float(15.0), Float(-7.0)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_00F1) + Set(GF_KZN03_SpokeWithKolorado, TRUE) + Call(ResetCam, CAM_DEFAULT, Float(5.0)) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_00F2) + EndIf + Else + Call(SetSelfVar, 0, 1) + Thread + Call(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + Call(SetNpcJumpscale, NPC_SELF, Float(2.5)) + Label(5) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar3, LVar4, LVar5, 9) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 1) + Wait(6) + Goto(5) + EndIf + EndThread + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Panic, 512, MSG_CH5_00F3) + Call(SetSelfVar, 0, 0) + Wait(18) + EndIf + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) EVT_LETTER_CHECK(Kolorado) - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInit_Kolorado) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_SMASHED_ULTRA_BLOCK) - EVT_IF_EQ(GF_KZN06_Visited, TRUE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Kolorado))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Kolorado))) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(STORY_CH5_SMASHED_ULTRA_BLOCK) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Kolorado))) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_SMASHED_ULTRA_BLOCK) + IfEq(GF_KZN06_Visited, TRUE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Kolorado))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Kolorado))) + Return + EndIf + CaseEq(STORY_CH5_SMASHED_ULTRA_BLOCK) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Kolorado))) + Return + EndSwitch + Call(RemoveNpc, NPC_SELF) + Return + End }; EvtScript N(EVS_SyncZiplineDummyNPC1) = { - EVT_LOOP(0) - EVT_CALL(GetModelCenter, MODEL_kassya_koma) - EVT_CALL(SetNpcPos, NPC_ZiplineDummy1, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetModelCenter, MODEL_kassya_koma) + Call(SetNpcPos, NPC_ZiplineDummy1, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_SyncZiplineDummyNPC2) = { - EVT_LOOP(0) - EVT_CALL(GetModelCenter, MODEL_kssya2_koma) - EVT_CALL(SetNpcPos, NPC_ZiplineDummy2, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetModelCenter, MODEL_kssya2_koma) + Call(SetNpcPos, NPC_ZiplineDummy2, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcInit_ZiplineDummy) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(0.3), 1, EVT_FLOAT(0.3)) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) + Call(SetNpcScale, NPC_SELF, Float(0.3), 1, Float(0.3)) + Return + End }; NpcData N(NpcData_PassiveNPCs)[] = { diff --git a/src/world/area_kzn/kzn_03/kzn_03_3_entity.c b/src/world/area_kzn/kzn_03/kzn_03_3_entity.c index 674dfeebd91..289bc7059c7 100644 --- a/src/world/area_kzn/kzn_03/kzn_03_3_entity.c +++ b/src/world/area_kzn/kzn_03/kzn_03_3_entity.c @@ -21,123 +21,123 @@ API_CALLABLE(N(IsPlayerOnFirstCliff)) { } EvtScript N(EVS_TetherCameraToPlayer) = { - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_UseSpringA) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_WAIT(1) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAUNCH) - EVT_WAIT(1) - EVT_CALL(N(EnableCameraFollowPlayerY)) - EVT_EXEC_GET_TID(N(EVS_TetherCameraToPlayer), LVarA) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7)) - EVT_CALL(PlayerJump, 335, 290, 360, 40) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_FLYING, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_FALLING) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_KILL_THREAD(LVarA) - EVT_CALL(N(DisableCameraFollowPlayerY)) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Wait(1) + Call(SetPlayerActionState, ACTION_STATE_LAUNCH) + Wait(1) + Call(N(EnableCameraFollowPlayerY)) + ExecGetTID(N(EVS_TetherCameraToPlayer), LVarA) + Call(SetPlayerJumpscale, Float(0.7)) + Call(PlayerJump, 335, 290, 360, 40) + Call(SetPlayerFlagBits, PS_FLAG_FLYING, TRUE) + Call(SetPlayerActionState, ACTION_STATE_FALLING) + Call(DisablePlayerPhysics, FALSE) + KillThread(LVarA) + Call(N(DisableCameraFollowPlayerY)) + Return + End }; EvtScript N(EVS_UseSpringB) = { - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_WAIT(1) - EVT_CALL(SetPlayerActionState, ACTION_STATE_JUMP) - EVT_WAIT(1) - EVT_CALL(N(EnableCameraFollowPlayerY)) - EVT_EXEC_GET_TID(N(EVS_TetherCameraToPlayer), LVarA) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7)) - EVT_CALL(PlayerJump, 350, 470, 210, 40) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_KILL_THREAD(LVarA) - EVT_CALL(N(DisableCameraFollowPlayerY)) - EVT_RETURN - EVT_END + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Wait(1) + Call(SetPlayerActionState, ACTION_STATE_JUMP) + Wait(1) + Call(N(EnableCameraFollowPlayerY)) + ExecGetTID(N(EVS_TetherCameraToPlayer), LVarA) + Call(SetPlayerJumpscale, Float(0.7)) + Call(PlayerJump, 350, 470, 210, 40) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + KillThread(LVarA) + Call(N(DisableCameraFollowPlayerY)) + Return + End }; EvtScript N(EVS_UseSpringC) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_WAIT(1) - EVT_CALL(SetPlayerActionState, ACTION_STATE_JUMP) - EVT_WAIT(1) - EVT_CALL(N(EnableCameraFollowPlayerY)) - EVT_EXEC_GET_TID(N(EVS_TetherCameraToPlayer), LVarA) - EVT_IF_EQ(MV_PlayerCliffState, 0) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.4)) - EVT_CALL(PlayerJump, -470, 670, 71, 18) - EVT_ELSE - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7)) - EVT_CALL(PlayerJump, -384, 870, -22, 40) - EVT_END_IF - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_KILL_THREAD(LVarA) - EVT_CALL(N(DisableCameraFollowPlayerY)) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Wait(1) + Call(SetPlayerActionState, ACTION_STATE_JUMP) + Wait(1) + Call(N(EnableCameraFollowPlayerY)) + ExecGetTID(N(EVS_TetherCameraToPlayer), LVarA) + IfEq(MV_PlayerCliffState, 0) + Call(SetPlayerJumpscale, Float(1.4)) + Call(PlayerJump, -470, 670, 71, 18) + Else + Call(SetPlayerJumpscale, Float(0.7)) + Call(PlayerJump, -384, 870, -22, 40) + EndIf + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + KillThread(LVarA) + Call(N(DisableCameraFollowPlayerY)) + Return + End }; EvtScript N(EVS_OnBreakBlock) = { - EVT_SET(GB_StoryProgress, STORY_CH5_SMASHED_ULTRA_BLOCK) - EVT_RETURN - EVT_END + Set(GB_StoryProgress, STORY_CH5_SMASHED_ULTRA_BLOCK) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 365, 530, 135, 0, MAKE_ENTITY_END) - EVT_CALL(MakeItemEntity, ITEM_FIRE_SHIELD, 75, 290, 235, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KZN03_Item_FireShield) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 215, 745, -105, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 85, 770, -105, 0, MAKE_ENTITY_END) - EVT_CALL(MakeItemEntity, ITEM_POW_BLOCK, 85, 795, -105, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_KZN03_Item_POWBlock) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 35, 730, -105, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KZN03_ItemBlock_CoinA) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -15, 730, -105, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KZN03_ItemBlock_CoinB) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -65, 730, -105, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KZN03_ItemBlock_CoinC) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -115, 730, -105, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KZN03_ItemBlock_CoinD) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_SMASHED_ULTRA_BLOCK) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer3Block), 490, 470, 210, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBreakBlock))) - EVT_THREAD - EVT_LOOP(0) - EVT_IF_GE(GB_StoryProgress, STORY_CH5_SMASHED_ULTRA_BLOCK) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_on_off, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_THREAD - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_on_off, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_ScriptSpring), 160, 30, 350, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_UseSpringA))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_ScriptSpring), 335, 265, 360, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_UseSpringB))) - EVT_THREAD - EVT_CALL(N(IsPlayerOnFirstCliff)) - EVT_END_THREAD - EVT_CALL(MakeEntity, EVT_PTR(Entity_ScriptSpring), -410, 645, 120, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_UseSpringC))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_SavePoint), 365, 530, 135, 0, MAKE_ENTITY_END) + Call(MakeItemEntity, ITEM_FIRE_SHIELD, 75, 290, 235, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_KZN03_Item_FireShield) + Call(MakeEntity, Ref(Entity_BrickBlock), 215, 745, -105, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), 85, 770, -105, 0, MAKE_ENTITY_END) + Call(MakeItemEntity, ITEM_POW_BLOCK, 85, 795, -105, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_KZN03_Item_POWBlock) + Call(MakeEntity, Ref(Entity_YellowBlock), 35, 730, -105, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KZN03_ItemBlock_CoinA) + Call(MakeEntity, Ref(Entity_YellowBlock), -15, 730, -105, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KZN03_ItemBlock_CoinB) + Call(MakeEntity, Ref(Entity_YellowBlock), -65, 730, -105, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KZN03_ItemBlock_CoinC) + Call(MakeEntity, Ref(Entity_YellowBlock), -115, 730, -105, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KZN03_ItemBlock_CoinD) + IfLt(GB_StoryProgress, STORY_CH5_SMASHED_ULTRA_BLOCK) + Call(MakeEntity, Ref(Entity_Hammer3Block), 490, 470, 210, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnBreakBlock))) + Thread + Loop(0) + IfGe(GB_StoryProgress, STORY_CH5_SMASHED_ULTRA_BLOCK) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_on_off, COLLIDER_FLAGS_UPPER_MASK) + EndThread + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_on_off, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Call(MakeEntity, Ref(Entity_ScriptSpring), 160, 30, 350, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_UseSpringA))) + Call(MakeEntity, Ref(Entity_ScriptSpring), 335, 265, 360, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_UseSpringB))) + Thread + Call(N(IsPlayerOnFirstCliff)) + EndThread + Call(MakeEntity, Ref(Entity_ScriptSpring), -410, 645, 120, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_UseSpringC))) + Return + End }; diff --git a/src/world/area_kzn/kzn_03/kzn_03_4_ziplines.c b/src/world/area_kzn/kzn_03/kzn_03_4_ziplines.c index c319336ad1a..ac778f249a4 100644 --- a/src/world/area_kzn/kzn_03/kzn_03_4_ziplines.c +++ b/src/world/area_kzn/kzn_03/kzn_03_4_ziplines.c @@ -66,143 +66,143 @@ Vec3f N(Zipline_Endpoints2)[] = { }; EvtScript N(EVS_Zipline_TetherCameraToPlayer) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_RideZipline) = { - EVT_CALL(GetPartnerInUse, LVar9) - EVT_IF_EQ(LVar9, PARTNER_KOOPER) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar9, PARTNER_BOMBETTE) - EVT_RETURN - EVT_END_IF - EVT_USE_ARRAY(LVar0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_JUMP) - EVT_WAIT(1) - EVT_EXEC_GET_TID(N(EVS_Zipline_TetherCameraToPlayer), LVar9) - EVT_THREAD - EVT_WAIT(7) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_SET(LVar0, ArrayVar(4)) - EVT_SUB(LVar0, 10) - EVT_SET(LVar1, ArrayVar(5)) - EVT_ADD(LVar1, -5) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.5)) - EVT_CALL(NpcJump0, NPC_PARTNER, ArrayVar(3), LVar0, LVar1, 8) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_END_THREAD - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.2)) - EVT_CALL(PlayerJump, ArrayVar(3), ArrayVar(4), ArrayVar(5), 5) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_HoldOnto) - EVT_WAIT(10) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_CALL(PlaySound, SOUND_LOOP_ZIPLINE_RIDE) - EVT_CHILD_THREAD - EVT_SET(MF_RidingZipline1, TRUE) - EVT_SET(LVar0, ArrayVar(6)) - EVT_SET(AB_KZN_LastZiplineNpc1, ArrayVar(6)) - EVT_LOOP(0) - EVT_CALL(GetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(N(Zipline_AdjustMoveDownSound), MF_RidingZipline1, LVar1, LVar2, LVar3) - EVT_IF_NE(AB_KZN_LastZiplineNpc1, LVar0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(MakeLerp, 0, 1000, 70, EASING_QUADRATIC_IN) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(Zipline_UpdatePlayerPos), 0) - EVT_CALL(TranslateModel, ArrayVar(1), LVar5, LVar6, LVar7) - EVT_CALL(TranslateModel, ArrayVar(2), LVar5, LVar6, LVar7) - EVT_WAIT(1) - EVT_CALL(N(Zipline_CheckInputForJumpOff)) - EVT_IF_EQ(LVar8, BUTTON_A) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(PlaySound, SOUND_ZIPLINE_FINISH) - EVT_LABEL(10) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_SCRIPTED_FALL, TRUE) - EVT_SET(MF_RidingZipline1, FALSE) - EVT_CALL(StopSound, SOUND_LOOP_ZIPLINE_RIDE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_KILL_THREAD(LVar9) - EVT_WAIT(20) - EVT_CALL(PlaySound, SOUND_LOOP_ZIPLINE_RETURN) - EVT_CHILD_THREAD - EVT_SET(MF_RidingZipline2, TRUE) - EVT_SET(LVar0, ArrayVar(6)) - EVT_SET(AB_KZN_LastZiplineNpc2, ArrayVar(6)) - EVT_LOOP(0) - EVT_CALL(GetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(N(Zipline_AdjustMoveUpSound), MF_RidingZipline2, LVar1, LVar2, LVar3) - EVT_IF_NE(AB_KZN_LastZiplineNpc2, LVar0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_SET(LVar2, LVar0) - EVT_DIV(LVar2, 10) - EVT_CALL(MakeLerp, LVar0, 0, LVar2, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(N(Zipline_UpdatePlayerPos), 1) - EVT_CALL(TranslateModel, ArrayVar(1), LVar5, LVar6, LVar7) - EVT_CALL(TranslateModel, ArrayVar(2), LVar5, LVar6, LVar7) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_SET(MF_RidingZipline2, FALSE) - EVT_CALL(StopSound, SOUND_LOOP_ZIPLINE_RETURN) - EVT_RETURN - EVT_END + Call(GetPartnerInUse, LVar9) + IfEq(LVar9, PARTNER_KOOPER) + Return + EndIf + IfEq(LVar9, PARTNER_BOMBETTE) + Return + EndIf + UseArray(LVar0) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_JUMP) + Wait(1) + ExecGetTID(N(EVS_Zipline_TetherCameraToPlayer), LVar9) + Thread + Wait(7) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Set(LVar0, ArrayVar(4)) + Sub(LVar0, 10) + Set(LVar1, ArrayVar(5)) + Add(LVar1, -5) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.5)) + Call(NpcJump0, NPC_PARTNER, ArrayVar(3), LVar0, LVar1, 8) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + EndThread + Call(SetPlayerJumpscale, Float(0.2)) + Call(PlayerJump, ArrayVar(3), ArrayVar(4), ArrayVar(5), 5) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Wait(1) + Call(SetPlayerAnimation, ANIM_MarioW2_HoldOnto) + Wait(10) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Call(PlaySound, SOUND_LOOP_ZIPLINE_RIDE) + ChildThread + Set(MF_RidingZipline1, TRUE) + Set(LVar0, ArrayVar(6)) + Set(AB_KZN_LastZiplineNpc1, ArrayVar(6)) + Loop(0) + Call(GetNpcPos, LVar0, LVar1, LVar2, LVar3) + Call(N(Zipline_AdjustMoveDownSound), MF_RidingZipline1, LVar1, LVar2, LVar3) + IfNe(AB_KZN_LastZiplineNpc1, LVar0) + BreakLoop + EndIf + Wait(1) + EndLoop + EndChildThread + Call(MakeLerp, 0, 1000, 70, EASING_QUADRATIC_IN) + Label(0) + Call(UpdateLerp) + Call(N(Zipline_UpdatePlayerPos), 0) + Call(TranslateModel, ArrayVar(1), LVar5, LVar6, LVar7) + Call(TranslateModel, ArrayVar(2), LVar5, LVar6, LVar7) + Wait(1) + Call(N(Zipline_CheckInputForJumpOff)) + IfEq(LVar8, BUTTON_A) + Goto(10) + EndIf + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(PlaySound, SOUND_ZIPLINE_FINISH) + Label(10) + Call(SetPlayerFlagBits, PS_FLAG_SCRIPTED_FALL, TRUE) + Set(MF_RidingZipline1, FALSE) + Call(StopSound, SOUND_LOOP_ZIPLINE_RIDE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(EnablePartnerAI) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + KillThread(LVar9) + Wait(20) + Call(PlaySound, SOUND_LOOP_ZIPLINE_RETURN) + ChildThread + Set(MF_RidingZipline2, TRUE) + Set(LVar0, ArrayVar(6)) + Set(AB_KZN_LastZiplineNpc2, ArrayVar(6)) + Loop(0) + Call(GetNpcPos, LVar0, LVar1, LVar2, LVar3) + Call(N(Zipline_AdjustMoveUpSound), MF_RidingZipline2, LVar1, LVar2, LVar3) + IfNe(AB_KZN_LastZiplineNpc2, LVar0) + BreakLoop + EndIf + Wait(1) + EndLoop + EndChildThread + Set(LVar2, LVar0) + Div(LVar2, 10) + Call(MakeLerp, LVar0, 0, LVar2, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(N(Zipline_UpdatePlayerPos), 1) + Call(TranslateModel, ArrayVar(1), LVar5, LVar6, LVar7) + Call(TranslateModel, ArrayVar(2), LVar5, LVar6, LVar7) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Set(MF_RidingZipline2, FALSE) + Call(StopSound, SOUND_LOOP_ZIPLINE_RETURN) + Return + End }; EvtScript N(EVS_SetupZiplines) = { - EVT_MALLOC_ARRAY(7, LVar0) - EVT_USE_ARRAY(LVar0) - EVT_SET(ArrayVar(0), EVT_PTR(N(Zipline_Endpoints1))) - EVT_SET(ArrayVar(1), MODEL_kassya_koma) - EVT_SET(ArrayVar(2), MODEL_kassya_himo) - EVT_SET(ArrayVar(3), -327) - EVT_SET(ArrayVar(4), 895) - EVT_SET(ArrayVar(5), -46) - EVT_SET(ArrayVar(6), NPC_ZiplineDummy1) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_RideZipline)), TRIGGER_FLOOR_PRESS_A, COLLIDER_ropeway1, 1, 0) - EVT_EXEC(N(EVS_SyncZiplineDummyNPC1)) - EVT_MALLOC_ARRAY(7, LVar0) - EVT_USE_ARRAY(LVar0) - EVT_SET(ArrayVar(0), EVT_PTR(N(Zipline_Endpoints2))) - EVT_SET(ArrayVar(1), MODEL_kssya2_koma) - EVT_SET(ArrayVar(2), MODEL_kassya2_himo) - EVT_SET(ArrayVar(3), 298) - EVT_SET(ArrayVar(4), 495) - EVT_SET(ArrayVar(5), 265) - EVT_SET(ArrayVar(6), NPC_ZiplineDummy2) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_RideZipline)), TRIGGER_FLOOR_PRESS_A, COLLIDER_ropeway2, 1, 0) - EVT_EXEC(N(EVS_SyncZiplineDummyNPC2)) - EVT_RETURN - EVT_END + MallocArray(7, LVar0) + UseArray(LVar0) + Set(ArrayVar(0), Ref(N(Zipline_Endpoints1))) + Set(ArrayVar(1), MODEL_kassya_koma) + Set(ArrayVar(2), MODEL_kassya_himo) + Set(ArrayVar(3), -327) + Set(ArrayVar(4), 895) + Set(ArrayVar(5), -46) + Set(ArrayVar(6), NPC_ZiplineDummy1) + BindTrigger(Ref(N(EVS_RideZipline)), TRIGGER_FLOOR_PRESS_A, COLLIDER_ropeway1, 1, 0) + Exec(N(EVS_SyncZiplineDummyNPC1)) + MallocArray(7, LVar0) + UseArray(LVar0) + Set(ArrayVar(0), Ref(N(Zipline_Endpoints2))) + Set(ArrayVar(1), MODEL_kssya2_koma) + Set(ArrayVar(2), MODEL_kassya2_himo) + Set(ArrayVar(3), 298) + Set(ArrayVar(4), 495) + Set(ArrayVar(5), 265) + Set(ArrayVar(6), NPC_ZiplineDummy2) + BindTrigger(Ref(N(EVS_RideZipline)), TRIGGER_FLOOR_PRESS_A, COLLIDER_ropeway2, 1, 0) + Exec(N(EVS_SyncZiplineDummyNPC2)) + Return + End }; diff --git a/src/world/area_kzn/kzn_04/kzn_04_1_main.c b/src/world/area_kzn/kzn_04/kzn_04_1_main.c index 0c6fee92173..8c3ad38450d 100644 --- a/src/world/area_kzn/kzn_04/kzn_04_1_main.c +++ b/src/world/area_kzn/kzn_04/kzn_04_1_main.c @@ -5,27 +5,27 @@ EvtScript N(EVS_ExitWalk_kzn_03_1) = EVT_EXIT_WALK(60, kzn_04_ENTRY_0, "kzn_03", kzn_03_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kzn_03_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kzn_03_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_LAVALAVA) - EVT_CALL(SetSpriteShading, SHADING_KZN_04) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_CALL(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_1) - EVT_SET(LVar0, MODEL_kem1) - EVT_EXEC(N(EVS_StartTexPanner_SmokeLeft)) - EVT_SET(LVar0, MODEL_kem2) - EVT_EXEC(N(EVS_StartTexPanner_SmokeRight)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_LAVALAVA) + Call(SetSpriteShading, SHADING_KZN_04) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Call(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) + Call(PlayAmbientSounds, AMBIENT_LAVA_1) + Set(LVar0, MODEL_kem1) + Exec(N(EVS_StartTexPanner_SmokeLeft)) + Set(LVar0, MODEL_kem2) + Exec(N(EVS_StartTexPanner_SmokeRight)) + Return + End }; diff --git a/src/world/area_kzn/kzn_04/kzn_04_2_entity.c b/src/world/area_kzn/kzn_04/kzn_04_2_entity.c index 4292f7b9138..aba617ff914 100644 --- a/src/world/area_kzn/kzn_04/kzn_04_2_entity.c +++ b/src/world/area_kzn/kzn_04/kzn_04_2_entity.c @@ -7,6 +7,6 @@ EvtScript N(EVS_MakeEntities) = { EVT_MAKE_SUPER_BLOCK(530, 560, 25, 0) - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/area_kzn/kzn_04/kzn_04_3_npc.c b/src/world/area_kzn/kzn_04/kzn_04_3_npc.c index 12827bdfa12..4fae902da54 100644 --- a/src/world/area_kzn/kzn_04/kzn_04_3_npc.c +++ b/src/world/area_kzn/kzn_04/kzn_04_3_npc.c @@ -11,62 +11,62 @@ s32 N(FireBar_Sounds)[] = { }; EvtScript N(EVS_FireBar_Defeated) = { - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_LOOP(15) - EVT_LOOP(LVar1) - EVT_CALL(SetNpcFlagBits, LVar0, NPC_FLAG_INVISIBLE, TRUE) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_WAIT(1) - EVT_SET(LVar0, LVarA) - EVT_SET(LVar1, LVarB) - EVT_LOOP(LVar1) - EVT_CALL(SetNpcFlagBits, LVar0, NPC_FLAG_INVISIBLE, FALSE) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_WAIT(1) - EVT_SET(LVar0, LVarA) - EVT_SET(LVar1, LVarB) - EVT_END_LOOP - EVT_CALL(GetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(PlaySoundAt, SOUND_SEQ_FIRE_BAR_DEAD, SOUND_SPACE_DEFAULT, LVar1, LVar2, LVar3) - EVT_LOOP(10) - EVT_CALL(GetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(RandInt, 50, LVar4) - EVT_SUB(LVar4, 25) - EVT_CALL(RandInt, 30, LVar5) - EVT_ADD(LVar1, LVar4) - EVT_ADD(LVar2, LVar5) - EVT_PLAY_EFFECT(EFFECT_00, LVar1, LVar2, LVar3, 1, 20, 3, 2) - EVT_END_LOOP - EVT_IF_EQ(LVarA, NPC_FireBar_1A) - EVT_IF_EQ(AF_KZN04_FireBar1_Coins, FALSE) - EVT_SET(AF_KZN04_FireBar1_Coins, TRUE) - EVT_LOOP(10) - EVT_CALL(MakeItemEntity, ITEM_COIN, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) - EVT_END_LOOP - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVarA, NPC_FireBar_2A) - EVT_IF_EQ(AF_KZN04_FireBar2_Coins, FALSE) - EVT_SET(AF_KZN04_FireBar2_Coins, TRUE) - EVT_LOOP(10) - EVT_CALL(MakeItemEntity, ITEM_COIN, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) - EVT_END_LOOP - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVarA, NPC_FireBar_3A) - EVT_IF_EQ(AF_KZN04_FireBar3_Coins, FALSE) - EVT_SET(AF_KZN04_FireBar3_Coins, TRUE) - EVT_LOOP(10) - EVT_CALL(MakeItemEntity, ITEM_COIN, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) - EVT_END_LOOP - EVT_END_IF - EVT_END_IF - EVT_CALL(RemoveEncounter, LVarA) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Set(LVarB, LVar1) + Loop(15) + Loop(LVar1) + Call(SetNpcFlagBits, LVar0, NPC_FLAG_INVISIBLE, TRUE) + Add(LVar0, 1) + EndLoop + Wait(1) + Set(LVar0, LVarA) + Set(LVar1, LVarB) + Loop(LVar1) + Call(SetNpcFlagBits, LVar0, NPC_FLAG_INVISIBLE, FALSE) + Add(LVar0, 1) + EndLoop + Wait(1) + Set(LVar0, LVarA) + Set(LVar1, LVarB) + EndLoop + Call(GetNpcPos, LVar0, LVar1, LVar2, LVar3) + Call(PlaySoundAt, SOUND_SEQ_FIRE_BAR_DEAD, SOUND_SPACE_DEFAULT, LVar1, LVar2, LVar3) + Loop(10) + Call(GetNpcPos, LVar0, LVar1, LVar2, LVar3) + Call(RandInt, 50, LVar4) + Sub(LVar4, 25) + Call(RandInt, 30, LVar5) + Add(LVar1, LVar4) + Add(LVar2, LVar5) + PlayEffect(EFFECT_00, LVar1, LVar2, LVar3, 1, 20, 3, 2) + EndLoop + IfEq(LVarA, NPC_FireBar_1A) + IfEq(AF_KZN04_FireBar1_Coins, FALSE) + Set(AF_KZN04_FireBar1_Coins, TRUE) + Loop(10) + Call(MakeItemEntity, ITEM_COIN, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) + EndLoop + EndIf + EndIf + IfEq(LVarA, NPC_FireBar_2A) + IfEq(AF_KZN04_FireBar2_Coins, FALSE) + Set(AF_KZN04_FireBar2_Coins, TRUE) + Loop(10) + Call(MakeItemEntity, ITEM_COIN, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) + EndLoop + EndIf + EndIf + IfEq(LVarA, NPC_FireBar_3A) + IfEq(AF_KZN04_FireBar3_Coins, FALSE) + Set(AF_KZN04_FireBar3_Coins, TRUE) + Loop(10) + Call(MakeItemEntity, ITEM_COIN, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) + EndLoop + EndIf + EndIf + Call(RemoveEncounter, LVarA) + Return + End }; FireBarAISettings N(AISettings_FireBar_01) = { @@ -94,21 +94,21 @@ FireBarAISettings N(AISettings_FireBar_03) = { }; EvtScript N(EVS_NpcAI_FireBar_01) = { - EVT_CALL(N(FireBarAI_Main), EVT_PTR(N(AISettings_FireBar_01))) - EVT_RETURN - EVT_END + Call(N(FireBarAI_Main), Ref(N(AISettings_FireBar_01))) + Return + End }; EvtScript N(EVS_NpcAI_FireBar_02) = { - EVT_CALL(N(FireBarAI_Main), EVT_PTR(N(AISettings_FireBar_02))) - EVT_RETURN - EVT_END + Call(N(FireBarAI_Main), Ref(N(AISettings_FireBar_02))) + Return + End }; EvtScript N(EVS_NpcAI_FireBar_03) = { - EVT_CALL(N(FireBarAI_Main), EVT_PTR(N(AISettings_FireBar_03))) - EVT_RETURN - EVT_END + Call(N(FireBarAI_Main), Ref(N(AISettings_FireBar_03))) + Return + End }; NpcSettings N(NpcSettings_FireBar_01) = { diff --git a/src/world/area_kzn/kzn_05/kzn_05_1_main.c b/src/world/area_kzn/kzn_05/kzn_05_1_main.c index b044ef834d5..d2be35c22f9 100644 --- a/src/world/area_kzn/kzn_05/kzn_05_1_main.c +++ b/src/world/area_kzn/kzn_05/kzn_05_1_main.c @@ -6,23 +6,23 @@ EvtScript N(EVS_ExitWalk_kzn_06_0) = EVT_EXIT_WALK(60, kzn_05_ENTRY_0, "kzn_06", EvtScript N(EVS_ExitWalk_kzn_03_1) = EVT_EXIT_WALK(60, kzn_05_ENTRY_1, "kzn_03", kzn_03_ENTRY_3); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(N(EVS_ExitWalk_kzn_06_0), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(N(EVS_ExitWalk_kzn_03_1), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(N(EVS_ExitWalk_kzn_06_0), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(N(EVS_ExitWalk_kzn_03_1), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_LAVALAVA) - EVT_CALL(SetSpriteShading, SHADING_KZN_05) - EVT_SETUP_CAMERA_DEFAULT() - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_CALL(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_1) - EVT_SET(LVar0, MODEL_kem1) - EVT_EXEC(N(EVS_StartTexPanner_SmokeLeft)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_LAVALAVA) + Call(SetSpriteShading, SHADING_KZN_05) + SetUP_CAMERA_DEFAULT() + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Call(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) + Call(PlayAmbientSounds, AMBIENT_LAVA_1) + Set(LVar0, MODEL_kem1) + Exec(N(EVS_StartTexPanner_SmokeLeft)) + Return + End }; diff --git a/src/world/area_kzn/kzn_06/kzn_06_1_main.c b/src/world/area_kzn/kzn_06/kzn_06_1_main.c index 50d44e5e7d4..4fa91e8f708 100644 --- a/src/world/area_kzn/kzn_06/kzn_06_1_main.c +++ b/src/world/area_kzn/kzn_06/kzn_06_1_main.c @@ -7,37 +7,37 @@ EvtScript N(EVS_ExitWalk_kzn_08) = EVT_EXIT_WALK(60, kzn_06_ENTRY_2, "kzn_08", k EvtScript N(EVS_ExitWalk_kzn_07) = EVT_EXIT_WALK(60, kzn_06_ENTRY_1, "kzn_07", kzn_07_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(N(EVS_ExitWalk_kzn_05), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(N(EVS_ExitWalk_kzn_08), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_BIND_TRIGGER(N(EVS_ExitWalk_kzn_07), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(N(EVS_ExitWalk_kzn_05), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(N(EVS_ExitWalk_kzn_08), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + BindTrigger(N(EVS_ExitWalk_kzn_07), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) + Return + End }; MAP_RODATA_PAD(1, unk); // can be fixed with subalign 16 for this map EvtScript N(EVS_StartTexPanners) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, MODEL_yo1, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o349, TEX_PANNER_0) - EVT_THREAD + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, MODEL_yo1, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o349, TEX_PANNER_0) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_0) TEX_PAN_PARAMS_STEP( 0, -400, 0, 0) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_yougan, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_spot, TEX_PANNER_1) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetTexPanner, MODEL_yougan, TEX_PANNER_1) + Call(SetTexPanner, MODEL_spot, TEX_PANNER_1) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 400, 0, 800, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 1, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -50,28 +50,28 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_LAVALAVA) - EVT_CALL(SetSpriteShading, SHADING_KZN_06) - EVT_SETUP_CAMERA_DEFAULT() - EVT_SET(GF_KZN06_Visited, TRUE) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_LAVA_STREAM_BLOCKED) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_2) - EVT_ELSE - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_1) - EVT_END_IF - EVT_SET(LVar0, N(EVS_BindExitTriggers)) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_yougan, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_yougan1, SURFACE_TYPE_LAVA) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_EXEC(N(EVS_StartTexPanners)) - EVT_EXEC(N(EVS_SetupLavaPuzzle)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_LAVALAVA) + Call(SetSpriteShading, SHADING_KZN_06) + SetUP_CAMERA_DEFAULT() + Set(GF_KZN06_Visited, TRUE) + ExecWait(N(EVS_MakeEntities)) + Call(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) + IfLt(GB_StoryProgress, STORY_CH5_LAVA_STREAM_BLOCKED) + Call(PlayAmbientSounds, AMBIENT_LAVA_2) + Else + Call(PlayAmbientSounds, AMBIENT_LAVA_1) + EndIf + Set(LVar0, N(EVS_BindExitTriggers)) + Exec(EnterWalk) + Wait(1) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_yougan, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_yougan1, SURFACE_TYPE_LAVA) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + Exec(N(EVS_StartTexPanners)) + Exec(N(EVS_SetupLavaPuzzle)) + Return + End }; diff --git a/src/world/area_kzn/kzn_06/kzn_06_2_entity.c b/src/world/area_kzn/kzn_06/kzn_06_2_entity.c index 330d299a69f..6743d5a12f8 100644 --- a/src/world/area_kzn/kzn_06/kzn_06_2_entity.c +++ b/src/world/area_kzn/kzn_06/kzn_06_2_entity.c @@ -5,30 +5,30 @@ #include "world/common/atomic/PushBlockGravity.inc.c" EvtScript N(EVS_OnBreakBlock) = { - EVT_SET(GF_KZN06_Hammer3Block, TRUE) - EVT_RETURN - EVT_END + Set(GF_KZN06_Hammer3Block, TRUE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 325, 205, -30, 0, ITEM_LIFE_SHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KZN06_HiddenItem_LifeShroom) - EVT_IF_EQ(GF_KZN06_Hammer3Block, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer3Block_WideZ), 385, 5, 180, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBreakBlock))) - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH5_LAVA_STREAM_BLOCKED) - EVT_CALL(CreatePushBlockGrid, 0, 12, 1, -330, 145, -90, 0) - EVT_CALL(SetPushBlockFallEffect, 0, EVT_PTR(N(push_block_handle_fall))) - EVT_CALL(SetPushBlock, 0, 4, 0, PUSH_GRID_BLOCK) - EVT_CALL(SetPushBlock, 0, 6, 0, PUSH_GRID_BLOCK) - EVT_CALL(SetPushBlock, 0, 8, 0, PUSH_GRID_BLOCK) - EVT_ELSE - EVT_CALL(CreatePushBlockGrid, 0, 12, 1, -330, 120, -90, 0) - EVT_CALL(SetPushBlock, 0, 9, 0, PUSH_GRID_BLOCK) - EVT_CALL(SetPushBlock, 0, 10, 0, PUSH_GRID_BLOCK) - EVT_CALL(SetPushBlock, 0, 11, 0, PUSH_GRID_BLOCK) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 325, 205, -30, 0, ITEM_LIFE_SHROOM, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KZN06_HiddenItem_LifeShroom) + IfEq(GF_KZN06_Hammer3Block, FALSE) + Call(MakeEntity, Ref(Entity_Hammer3Block_WideZ), 385, 5, 180, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnBreakBlock))) + EndIf + IfLt(GB_StoryProgress, STORY_CH5_LAVA_STREAM_BLOCKED) + Call(CreatePushBlockGrid, 0, 12, 1, -330, 145, -90, 0) + Call(SetPushBlockFallEffect, 0, Ref(N(push_block_handle_fall))) + Call(SetPushBlock, 0, 4, 0, PUSH_GRID_BLOCK) + Call(SetPushBlock, 0, 6, 0, PUSH_GRID_BLOCK) + Call(SetPushBlock, 0, 8, 0, PUSH_GRID_BLOCK) + Else + Call(CreatePushBlockGrid, 0, 12, 1, -330, 120, -90, 0) + Call(SetPushBlock, 0, 9, 0, PUSH_GRID_BLOCK) + Call(SetPushBlock, 0, 10, 0, PUSH_GRID_BLOCK) + Call(SetPushBlock, 0, 11, 0, PUSH_GRID_BLOCK) + EndIf + Return + End }; diff --git a/src/world/area_kzn/kzn_06/kzn_06_3_extra.c b/src/world/area_kzn/kzn_06/kzn_06_3_extra.c index 6872bd30d17..360030eec60 100644 --- a/src/world/area_kzn/kzn_06/kzn_06_3_extra.c +++ b/src/world/area_kzn/kzn_06/kzn_06_3_extra.c @@ -73,118 +73,118 @@ ModelIDList N(InvalidLavaModels) = { }; EvtScript N(EVS_8024137C) = { - EVT_LABEL(0) - EVT_CALL(N(AdjustFog), EVT_PTR(N(InvalidLavaModels)), 0, 0, 255, 60, 1) - EVT_WAIT(30) - EVT_CALL(N(AdjustFog), EVT_PTR(N(InvalidLavaModels)), 0, 0, 255, 60, 0) - EVT_WAIT(30) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(N(AdjustFog), Ref(N(InvalidLavaModels)), 0, 0, 255, 60, 1) + Wait(30) + Call(N(AdjustFog), Ref(N(InvalidLavaModels)), 0, 0, 255, 60, 0) + Wait(30) + Goto(0) + Return + End }; EvtScript N(EVS_LowerMainLavaLevel) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(3) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(N(func_80240A44_C6D364)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -20) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(600.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(5.0), EVT_FLOAT(8.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(15) - EVT_THREAD - EVT_LOOP(40) - EVT_ADDF(MV_GlowIntensity, EVT_FLOAT(-0.015625)) - EVT_WAIT(3) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, -25, 100, EASING_QUADRATIC_OUT) - EVT_SETF(LVar2, EVT_FLOAT(0.0)) - EVT_SETF(LVar3, EVT_FLOAT(0.0)) - EVT_SET(LVar4, 0) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_yougan, 0, LVar0, LVar3) - EVT_CALL(TranslateModel, MODEL_spot, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o349, 0, LVar0, LVar2) - EVT_IF_GT(LVar4, 20) - EVT_IF_GT(LVar2, -75) - EVT_SUBF(LVar2, EVT_FLOAT(0.5)) - EVT_SUBF(LVar3, EVT_FLOAT(0.55)) - EVT_END_IF - EVT_END_IF - EVT_ADD(LVar4, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(45) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_yougan1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, 1, COLLIDER_yougan, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableGroup, MODEL_i_on, FALSE) - EVT_CALL(EnableGroup, MODEL_i_off, TRUE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Wait(3) + Call(DisablePlayerPhysics, TRUE) + Call(N(func_80240A44_C6D364)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, -20) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(600.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(5.0), Float(8.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(15) + Thread + Loop(40) + AddF(MV_GlowIntensity, Float(-0.015625)) + Wait(3) + EndLoop + EndThread + Call(MakeLerp, 0, -25, 100, EASING_QUADRATIC_OUT) + SetF(LVar2, Float(0.0)) + SetF(LVar3, Float(0.0)) + Set(LVar4, 0) + Label(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_yougan, 0, LVar0, LVar3) + Call(TranslateModel, MODEL_spot, 0, LVar0, 0) + Call(TranslateModel, MODEL_o349, 0, LVar0, LVar2) + IfGt(LVar4, 20) + IfGt(LVar2, -75) + SubF(LVar2, Float(0.5)) + SubF(LVar3, Float(0.55)) + EndIf + EndIf + Add(LVar4, 1) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Wait(45) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_yougan1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, 1, COLLIDER_yougan, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableGroup, MODEL_i_on, FALSE) + Call(EnableGroup, MODEL_i_off, TRUE) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_MonitorPushBlockPuzzle) = { // wait for grid pos (11,0) to be occupied - EVT_LABEL(10) - EVT_CALL(GetPushBlock, 0, 11, 0, LVar2) - EVT_IF_EQ(LVar2, PUSH_GRID_EMPTY) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF + Label(10) + Call(GetPushBlock, 0, 11, 0, LVar2) + IfEq(LVar2, PUSH_GRID_EMPTY) + Wait(1) + Goto(10) + EndIf // begin the scene - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(40) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(20) - EVT_SUBF(LVar0, EVT_FLOAT(0.7)) - EVT_SUBF(LVar1, EVT_FLOAT(0.1)) - EVT_CALL(TranslateGroup, MODEL_you, 0, LVar0, LVar1) - EVT_WAIT(2) - EVT_END_LOOP - EVT_END_THREAD - EVT_EXEC_WAIT(N(EVS_LowerMainLavaLevel)) - EVT_SET(GB_StoryProgress, STORY_CH5_LAVA_STREAM_BLOCKED) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Wait(40) + Thread + Set(LVar0, 0) + Set(LVar1, 0) + Loop(20) + SubF(LVar0, Float(0.7)) + SubF(LVar1, Float(0.1)) + Call(TranslateGroup, MODEL_you, 0, LVar0, LVar1) + Wait(2) + EndLoop + EndThread + ExecWait(N(EVS_LowerMainLavaLevel)) + Set(GB_StoryProgress, STORY_CH5_LAVA_STREAM_BLOCKED) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SetupLavaPuzzle) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH5_LAVA_STREAM_BLOCKED) - EVT_CALL(EnableGroup, MODEL_i_off, FALSE) - EVT_EXEC(N(EVS_MonitorPushBlockPuzzle)) - EVT_SETF(MV_GlowIntensity, EVT_FLOAT(1.0)) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_yougan1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableGroup, MODEL_i_on, FALSE) - EVT_CALL(TranslateGroup, MODEL_you, 0, -14, -2) - EVT_CALL(TranslateModel, MODEL_yougan, 0, -25, -50) - EVT_CALL(TranslateModel, MODEL_spot, 0, -25, 0) - EVT_CALL(TranslateModel, MODEL_o349, 0, -25, -40) - EVT_SETF(MV_GlowIntensity, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_THREAD - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(N(ApplyLavaGlowLighting), LAVA_GLOW_MODE_1, NULL) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(ClearLavaGlowLighting), EVT_PTR(N(LavaModels))) - EVT_END_THREAD - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH5_LAVA_STREAM_BLOCKED) + Call(EnableGroup, MODEL_i_off, FALSE) + Exec(N(EVS_MonitorPushBlockPuzzle)) + SetF(MV_GlowIntensity, Float(1.0)) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_yougan1, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableGroup, MODEL_i_on, FALSE) + Call(TranslateGroup, MODEL_you, 0, -14, -2) + Call(TranslateModel, MODEL_yougan, 0, -25, -50) + Call(TranslateModel, MODEL_spot, 0, -25, 0) + Call(TranslateModel, MODEL_o349, 0, -25, -40) + SetF(MV_GlowIntensity, Float(0.5)) + EndIf + Thread + SetGroup(EVT_GROUP_00) + Call(N(ApplyLavaGlowLighting), LAVA_GLOW_MODE_1, NULL) + EndThread + Thread + Call(N(ClearLavaGlowLighting), Ref(N(LavaModels))) + EndThread + Return + End }; diff --git a/src/world/area_kzn/kzn_07/kzn_07_1_music.c b/src/world/area_kzn/kzn_07/kzn_07_1_music.c index 766e77131ed..5ee191ec383 100644 --- a/src/world/area_kzn/kzn_07/kzn_07_1_music.c +++ b/src/world/area_kzn/kzn_07/kzn_07_1_music.c @@ -1,16 +1,16 @@ #include "kzn_07.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_1) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) + Call(PlayAmbientSounds, AMBIENT_LAVA_1) + Return + End }; EvtScript N(EVS_PlayUpgradeFanfare) = { - EVT_CALL(PushSong, SONG_ITEM_UPGRADE, 1) - EVT_WAIT(130) - EVT_CALL(PopSong) - EVT_RETURN - EVT_END + Call(PushSong, SONG_ITEM_UPGRADE, 1) + Wait(130) + Call(PopSong) + Return + End }; diff --git a/src/world/area_kzn/kzn_07/kzn_07_2_main.c b/src/world/area_kzn/kzn_07/kzn_07_2_main.c index 108e795664a..b6b0855acfd 100644 --- a/src/world/area_kzn/kzn_07/kzn_07_2_main.c +++ b/src/world/area_kzn/kzn_07/kzn_07_2_main.c @@ -13,35 +13,35 @@ ModelIDList N(LavaModelIDs) = { EvtScript N(EVS_ExitWalk_kzn_06) = EVT_EXIT_WALK(60, kzn_07_ENTRY_0, "kzn_06", kzn_06_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(N(EVS_ExitWalk_kzn_06), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(N(EVS_ExitWalk_kzn_06), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + Return + End }; EvtScript N(EVS_SetupTexPanners) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, MODEL_yougan, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_yougan1, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_spot, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_yougan2, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_sara, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_chioro, TEX_PANNER_1) - EVT_THREAD + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, MODEL_yougan, TEX_PANNER_0) + Call(SetTexPanner, MODEL_yougan1, TEX_PANNER_1) + Call(SetTexPanner, MODEL_spot, TEX_PANNER_1) + Call(SetTexPanner, MODEL_yougan2, TEX_PANNER_1) + Call(SetTexPanner, MODEL_sara, TEX_PANNER_1) + Call(SetTexPanner, MODEL_chioro, TEX_PANNER_1) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_0) TEX_PAN_PARAMS_STEP( -400, 0, -800, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 1, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 0, -400, 0, -800) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -51,27 +51,27 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_LAVALAVA) - EVT_CALL(SetSpriteShading, SHADING_KZN_07) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_doro, SURFACE_TYPE_LAVA) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_EXEC(N(EVS_SetupTexPanners)) - EVT_SET(LVar0, N(EVS_BindExitTriggers)) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_THREAD - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(N(ApplyLavaGlowLighting), LAVA_GLOW_MODE_0, NULL) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(ClearLavaGlowLighting), EVT_PTR(N(LavaModelIDs))) - EVT_END_THREAD - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_LAVALAVA) + Call(SetSpriteShading, SHADING_KZN_07) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_doro, SURFACE_TYPE_LAVA) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + Exec(N(EVS_SetupTexPanners)) + Set(LVar0, N(EVS_BindExitTriggers)) + Exec(EnterWalk) + Wait(1) + Thread + SetGroup(EVT_GROUP_00) + Call(N(ApplyLavaGlowLighting), LAVA_GLOW_MODE_0, NULL) + EndThread + Thread + Call(N(ClearLavaGlowLighting), Ref(N(LavaModelIDs))) + EndThread + Return + End }; diff --git a/src/world/area_kzn/kzn_07/kzn_07_3_entity.c b/src/world/area_kzn/kzn_07/kzn_07_3_entity.c index 639f817a222..fdeae6e80df 100644 --- a/src/world/area_kzn/kzn_07/kzn_07_3_entity.c +++ b/src/world/area_kzn/kzn_07/kzn_07_3_entity.c @@ -10,40 +10,40 @@ API_CALLABLE(func_802407F4_C6EB24) { } EvtScript N(EVS_MonitorChestStatus) = { - EVT_IF_EQ(GF_KZN07_GiantChest, FALSE) - EVT_LABEL(10) - EVT_IF_EQ(GF_KZN07_GiantChest, FALSE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_WAIT(60) - EVT_EXEC(N(EVS_PlayUpgradeFanfare)) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0186, 160, 40) - EVT_CALL(func_802407F4_C6EB24) - EVT_SET(GB_StoryProgress, STORY_CH5_GOT_ULTRA_HAMMER) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_KZN07_GiantChest, FALSE) + Label(10) + IfEq(GF_KZN07_GiantChest, FALSE) + Wait(1) + Goto(10) + EndIf + Wait(60) + Exec(N(EVS_PlayUpgradeFanfare)) + Call(ShowMessageAtScreenPos, MSG_Menus_0186, 160, 40) + Call(func_802407F4_C6EB24) + Set(GB_StoryProgress, STORY_CH5_GOT_ULTRA_HAMMER) + EndIf + Return + End }; EvtScript N(EVS_OnBreakBlock) = { - EVT_SET(GF_KZN07_Hammer3Block, TRUE) - EVT_RETURN - EVT_END + Set(GF_KZN07_Hammer3Block, TRUE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_GiantChest), 0, 45, -290, 0, ITEM_ULTRA_HAMMER, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_KZN07_GiantChest) - EVT_EXEC(N(EVS_MonitorChestStatus)) - EVT_IF_EQ(GF_KZN07_Hammer3Block, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer3Block_WideZ), 175, 35, -185, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBreakBlock))) - EVT_END_IF - EVT_CALL(CreatePushBlockGrid, 0, 15, 5, -62, 0, 35, 0) - EVT_CALL(SetPushBlockFallEffect, 0, EVT_PTR(N(push_block_handle_fall))) - EVT_CALL(SetPushBlock, 0, 8, 1, PUSH_GRID_BLOCK) - EVT_CALL(SetPushBlock, 0, 11, 4, PUSH_GRID_BLOCK) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_GiantChest), 0, 45, -290, 0, ITEM_ULTRA_HAMMER, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_KZN07_GiantChest) + Exec(N(EVS_MonitorChestStatus)) + IfEq(GF_KZN07_Hammer3Block, FALSE) + Call(MakeEntity, Ref(Entity_Hammer3Block_WideZ), 175, 35, -185, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnBreakBlock))) + EndIf + Call(CreatePushBlockGrid, 0, 15, 5, -62, 0, 35, 0) + Call(SetPushBlockFallEffect, 0, Ref(N(push_block_handle_fall))) + Call(SetPushBlock, 0, 8, 1, PUSH_GRID_BLOCK) + Call(SetPushBlock, 0, 11, 4, PUSH_GRID_BLOCK) + Return + End }; diff --git a/src/world/area_kzn/kzn_08/kzn_08_1_main.c b/src/world/area_kzn/kzn_08/kzn_08_1_main.c index 6afd7cc8a9f..a9f843022ad 100644 --- a/src/world/area_kzn/kzn_08/kzn_08_1_main.c +++ b/src/world/area_kzn/kzn_08/kzn_08_1_main.c @@ -23,31 +23,31 @@ API_CALLABLE(func_80240718_C71B98) { } EvtScript N(EVS_StartTexPanner_SmokeLeft) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, LVar0, TEX_PANNER_3) - EVT_THREAD + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, LVar0, TEX_PANNER_3) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_3) TEX_PAN_PARAMS_STEP( -200, 0, 600, -400) TEX_PAN_PARAMS_FREQ( 1, 0, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; EvtScript N(EVS_StartTexPanner_SmokeRight) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, LVar0, TEX_PANNER_4) - EVT_THREAD + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, LVar0, TEX_PANNER_4) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_4) TEX_PAN_PARAMS_STEP( 500, 0, 0, -400) TEX_PAN_PARAMS_FREQ( 1, 0, 0, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; ModelIDList N(LavaModelIDs) = { @@ -58,38 +58,38 @@ ModelIDList N(LavaModelIDs) = { EvtScript N(EVS_ExitWalk_kzn_06) = EVT_EXIT_WALK_FIXED(60, kzn_08_ENTRY_0, "kzn_06", kzn_06_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(N(EVS_ExitWalk_kzn_06), TRIGGER_FLOOR_TOUCH, COLLIDER_deili1, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(N(EVS_ExitWalk_kzn_06), TRIGGER_FLOOR_TOUCH, COLLIDER_deili1, 1, 0) + Return + End }; EvtScript N(EVS_StartTexPanner0) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, MODEL_yougan1, TEX_PANNER_0) - EVT_THREAD + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, MODEL_yougan1, TEX_PANNER_0) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_0) TEX_PAN_PARAMS_STEP( 0, -800, 0, 0) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; EvtScript N(EVS_StartTexPanner1) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, MODEL_yougan, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_o640, TEX_PANNER_1) - EVT_THREAD + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, MODEL_yougan, TEX_PANNER_1) + Call(SetTexPanner, MODEL_o640, TEX_PANNER_1) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 800, 0, 1600, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 1, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -103,73 +103,73 @@ LavaReset N(SafeFloorColliders)[] = { // unused EvtScript N(EVS_AnimateLavaScale) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(MakeLerp, 1, 100, 200, EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, EVT_FLOAT(10.0)) - EVT_CALL(ScaleModel, MODEL_yougan1, LVar0, EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_MULF(LVar0, EVT_FLOAT(-5.0)) - EVT_ADDF(LVar0, EVT_FLOAT(100.0)) - EVT_SET(MV_GlowIntensity, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(MakeLerp, 0, 35, 100, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_yougan, 0, LVar0, 0) - EVT_MULF(LVar0, EVT_FLOAT(-1.25)) - EVT_ADDF(LVar0, EVT_FLOAT(50.0)) - EVT_SET(MV_GlowIntensity, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_yougan_atari, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_yougan_atari, SURFACE_TYPE_LAVA) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(MakeLerp, 1, 100, 200, EASING_LINEAR) + Label(0) + Call(UpdateLerp) + DivF(LVar0, Float(10.0)) + Call(ScaleModel, MODEL_yougan1, LVar0, Float(1.0), Float(1.0)) + MulF(LVar0, Float(-5.0)) + AddF(LVar0, Float(100.0)) + Set(MV_GlowIntensity, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(MakeLerp, 0, 35, 100, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(TranslateModel, MODEL_yougan, 0, LVar0, 0) + MulF(LVar0, Float(-1.25)) + AddF(LVar0, Float(50.0)) + Set(MV_GlowIntensity, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_yougan_atari, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_yougan_atari, SURFACE_TYPE_LAVA) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + Call(DisablePlayerInput, FALSE) + Unbind + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_LAVALAVA) - EVT_CALL(SetSpriteShading, SHADING_KZN_08) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_1) - EVT_SET(LVar0, N(EVS_BindExitTriggers)) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_EXEC(N(EVS_802455A0)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_yougan_atari, SURFACE_TYPE_LAVA) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_CALL(ScaleModel, MODEL_yougan1, EVT_FLOAT(10.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(TranslateModel, MODEL_yougan, 0, 40, 0) - EVT_SET(MV_GlowIntensity, 0) - EVT_THREAD - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(N(ApplyLavaGlowLighting), LAVA_GLOW_MODE_2, NULL) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(ClearLavaGlowLighting), EVT_PTR(N(LavaModelIDs))) - EVT_END_THREAD - EVT_EXEC(N(EVS_StartTexPanner0)) - EVT_EXEC(N(EVS_StartTexPanner1)) - EVT_SET(LVar0, MODEL_kem1) - EVT_EXEC(N(EVS_StartTexPanner_SmokeLeft)) - EVT_SET(LVar0, MODEL_kem2) - EVT_EXEC(N(EVS_StartTexPanner_SmokeRight)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_LAVALAVA) + Call(SetSpriteShading, SHADING_KZN_08) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) + Call(PlayAmbientSounds, AMBIENT_LAVA_1) + Set(LVar0, N(EVS_BindExitTriggers)) + Exec(EnterWalk) + Wait(1) + Exec(N(EVS_802455A0)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_yougan_atari, SURFACE_TYPE_LAVA) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + Call(ScaleModel, MODEL_yougan1, Float(10.0), Float(1.0), Float(1.0)) + Call(TranslateModel, MODEL_yougan, 0, 40, 0) + Set(MV_GlowIntensity, 0) + Thread + SetGroup(EVT_GROUP_00) + Call(N(ApplyLavaGlowLighting), LAVA_GLOW_MODE_2, NULL) + EndThread + Thread + Call(N(ClearLavaGlowLighting), Ref(N(LavaModelIDs))) + EndThread + Exec(N(EVS_StartTexPanner0)) + Exec(N(EVS_StartTexPanner1)) + Set(LVar0, MODEL_kem1) + Exec(N(EVS_StartTexPanner_SmokeLeft)) + Set(LVar0, MODEL_kem2) + Exec(N(EVS_StartTexPanner_SmokeRight)) + Return + End }; diff --git a/src/world/area_kzn/kzn_08/kzn_08_2_entity.c b/src/world/area_kzn/kzn_08/kzn_08_2_entity.c index 6bf2c219b32..d75ad66861c 100644 --- a/src/world/area_kzn/kzn_08/kzn_08_2_entity.c +++ b/src/world/area_kzn/kzn_08/kzn_08_2_entity.c @@ -6,9 +6,9 @@ EvtScript N(EVS_OpenChest_DizzyStomp) = EVT_OPEN_CHEST_BADGE(ITEM_DIZZY_STOMP, GF_KZN08_Chest_DizzyStomp); EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 120, 100, -55, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_KZN08_Chest_DizzyStomp) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenChest_DizzyStomp))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Chest), 120, 100, -55, 0, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_KZN08_Chest_DizzyStomp) + Call(AssignScript, Ref(N(EVS_OpenChest_DizzyStomp))) + Return + End }; diff --git a/src/world/area_kzn/kzn_08/kzn_08_4_extra.c b/src/world/area_kzn/kzn_08/kzn_08_4_extra.c index 2415fc414c7..c52093399fb 100644 --- a/src/world/area_kzn/kzn_08/kzn_08_4_extra.c +++ b/src/world/area_kzn/kzn_08/kzn_08_4_extra.c @@ -63,9 +63,9 @@ API_CALLABLE(N(func_80243EE0_C75360)) { } EvtScript N(EVS_802455A0) = { - EVT_THREAD - EVT_CALL(N(func_80243EE0_C75360)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + Call(N(func_80243EE0_C75360)) + EndThread + Return + End }; diff --git a/src/world/area_kzn/kzn_09/kzn_09_1_main.c b/src/world/area_kzn/kzn_09/kzn_09_1_main.c index adcf9d1bcda..10afb8b4336 100644 --- a/src/world/area_kzn/kzn_09/kzn_09_1_main.c +++ b/src/world/area_kzn/kzn_09/kzn_09_1_main.c @@ -5,25 +5,25 @@ EvtScript N(EVS_ExitWalk_kzn_10_0) = EVT_EXIT_WALK(60, kzn_09_ENTRY_1, "kzn_10", EvtScript N(EVS_ExitWalk_kzn_03_4) = EVT_EXIT_WALK(60, kzn_09_ENTRY_2, "kzn_03", kzn_03_ENTRY_4); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(N(EVS_ExitWalk_kzn_03_2), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(N(EVS_ExitWalk_kzn_10_0), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_BIND_TRIGGER(N(EVS_ExitWalk_kzn_03_4), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(N(EVS_ExitWalk_kzn_03_2), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(N(EVS_ExitWalk_kzn_10_0), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + BindTrigger(N(EVS_ExitWalk_kzn_03_4), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_LAVALAVA) - EVT_CALL(SetSpriteShading, SHADING_KZN_09) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_1) - EVT_SET(LVar0, N(EVS_BindExitTriggers)) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_EXEC_WAIT(N(EVS_SetupZipline)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_LAVALAVA) + Call(SetSpriteShading, SHADING_KZN_09) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) + Call(PlayAmbientSounds, AMBIENT_LAVA_1) + Set(LVar0, N(EVS_BindExitTriggers)) + Exec(EnterWalk) + Wait(1) + ExecWait(N(EVS_SetupZipline)) + Return + End }; diff --git a/src/world/area_kzn/kzn_09/kzn_09_2_entity.c b/src/world/area_kzn/kzn_09/kzn_09_2_entity.c index 88cbafc404a..05601de1e04 100644 --- a/src/world/area_kzn/kzn_09/kzn_09_2_entity.c +++ b/src/world/area_kzn/kzn_09/kzn_09_2_entity.c @@ -7,8 +7,8 @@ EvtScript N(EVS_MakeEntities) = { EVT_MAKE_SUPER_BLOCK(130, 480, -75, 0) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 350, 350, 55, 0, MODEL_o149, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_KZN09_HiddenPanel) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HiddenPanel), 350, 350, 55, 0, MODEL_o149, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_KZN09_HiddenPanel) + Return + End }; diff --git a/src/world/area_kzn/kzn_09/kzn_09_3_zipline.c b/src/world/area_kzn/kzn_09/kzn_09_3_zipline.c index d6ecc31f537..4b22f5fd5f5 100644 --- a/src/world/area_kzn/kzn_09/kzn_09_3_zipline.c +++ b/src/world/area_kzn/kzn_09/kzn_09_3_zipline.c @@ -60,132 +60,132 @@ Vec3f N(Zipline_Endpoints)[] = { }; EvtScript N(EVS_Zipline_TetherCameraToPlayer) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_RideZipline) = { - EVT_CALL(GetPartnerInUse, LVar9) - EVT_IF_EQ(LVar9, PARTNER_KOOPER) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar9, PARTNER_BOMBETTE) - EVT_RETURN - EVT_END_IF - EVT_USE_ARRAY(LVar0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_JUMP) - EVT_WAIT(1) - EVT_EXEC_GET_TID(N(EVS_Zipline_TetherCameraToPlayer), LVar9) - EVT_THREAD - EVT_WAIT(7) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_SET(LVar0, ArrayVar(4)) - EVT_SUB(LVar0, 10) - EVT_SET(LVar1, ArrayVar(5)) - EVT_ADD(LVar1, -5) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.5)) - EVT_CALL(NpcJump0, NPC_PARTNER, ArrayVar(3), LVar0, LVar1, 8) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_END_THREAD - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.2)) - EVT_CALL(PlayerJump, ArrayVar(3), ArrayVar(4), ArrayVar(5), 5) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_HoldOnto) - EVT_WAIT(10) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_CALL(PlaySound, SOUND_LOOP_ZIPLINE_RIDE) - EVT_CHILD_THREAD - EVT_SET(MF_Zipline_GoingDown, TRUE) - EVT_SET(LVar0, ArrayVar(6)) - EVT_SET(AB_KZN_LastZiplineNpc1, ArrayVar(6)) - EVT_LOOP(0) - EVT_CALL(GetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(N(Zipline_AdjustMoveDownSound), MF_Zipline_GoingDown, LVar1, LVar2, LVar3) - EVT_IF_NE(AB_KZN_LastZiplineNpc1, LVar0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(MakeLerp, 0, 1000, 70, EASING_QUADRATIC_IN) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(Zipline_UpdatePlayerPos), 0) - EVT_CALL(TranslateModel, ArrayVar(1), LVar5, LVar6, LVar7) - EVT_CALL(TranslateModel, ArrayVar(2), LVar5, LVar6, LVar7) - EVT_WAIT(1) - EVT_CALL(N(Zipline_CheckInputForJumpOff)) - EVT_IF_EQ(LVar8, BUTTON_A) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(PlaySound, SOUND_ZIPLINE_FINISH) - EVT_LABEL(10) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_SCRIPTED_FALL, TRUE) - EVT_SET(MF_Zipline_GoingDown, FALSE) - EVT_CALL(StopSound, SOUND_LOOP_ZIPLINE_RIDE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_KILL_THREAD(LVar9) - EVT_WAIT(20) - EVT_CALL(PlaySound, SOUND_LOOP_ZIPLINE_RETURN) - EVT_CHILD_THREAD - EVT_SET(MF_Zipline_GoingUp, TRUE) - EVT_SET(LVar0, ArrayVar(6)) - EVT_SET(AB_KZN_LastZiplineNpc2, ArrayVar(6)) - EVT_LOOP(0) - EVT_CALL(GetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(N(Zipline_AdjustMoveUpSound), MF_Zipline_GoingUp, LVar1, LVar2, LVar3) - EVT_IF_NE(AB_KZN_LastZiplineNpc2, LVar0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_SET(LVar2, LVar0) - EVT_DIV(LVar2, 10) - EVT_CALL(MakeLerp, LVar0, 0, LVar2, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(N(Zipline_UpdatePlayerPos), 1) - EVT_CALL(TranslateModel, ArrayVar(1), LVar5, LVar6, LVar7) - EVT_CALL(TranslateModel, ArrayVar(2), LVar5, LVar6, LVar7) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_SET(MF_Zipline_GoingUp, FALSE) - EVT_CALL(StopSound, SOUND_LOOP_ZIPLINE_RETURN) - EVT_RETURN - EVT_END + Call(GetPartnerInUse, LVar9) + IfEq(LVar9, PARTNER_KOOPER) + Return + EndIf + IfEq(LVar9, PARTNER_BOMBETTE) + Return + EndIf + UseArray(LVar0) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_JUMP) + Wait(1) + ExecGetTID(N(EVS_Zipline_TetherCameraToPlayer), LVar9) + Thread + Wait(7) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Set(LVar0, ArrayVar(4)) + Sub(LVar0, 10) + Set(LVar1, ArrayVar(5)) + Add(LVar1, -5) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.5)) + Call(NpcJump0, NPC_PARTNER, ArrayVar(3), LVar0, LVar1, 8) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + EndThread + Call(SetPlayerJumpscale, Float(0.2)) + Call(PlayerJump, ArrayVar(3), ArrayVar(4), ArrayVar(5), 5) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Wait(1) + Call(SetPlayerAnimation, ANIM_MarioW2_HoldOnto) + Wait(10) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Call(PlaySound, SOUND_LOOP_ZIPLINE_RIDE) + ChildThread + Set(MF_Zipline_GoingDown, TRUE) + Set(LVar0, ArrayVar(6)) + Set(AB_KZN_LastZiplineNpc1, ArrayVar(6)) + Loop(0) + Call(GetNpcPos, LVar0, LVar1, LVar2, LVar3) + Call(N(Zipline_AdjustMoveDownSound), MF_Zipline_GoingDown, LVar1, LVar2, LVar3) + IfNe(AB_KZN_LastZiplineNpc1, LVar0) + BreakLoop + EndIf + Wait(1) + EndLoop + EndChildThread + Call(MakeLerp, 0, 1000, 70, EASING_QUADRATIC_IN) + Label(0) + Call(UpdateLerp) + Call(N(Zipline_UpdatePlayerPos), 0) + Call(TranslateModel, ArrayVar(1), LVar5, LVar6, LVar7) + Call(TranslateModel, ArrayVar(2), LVar5, LVar6, LVar7) + Wait(1) + Call(N(Zipline_CheckInputForJumpOff)) + IfEq(LVar8, BUTTON_A) + Goto(10) + EndIf + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(PlaySound, SOUND_ZIPLINE_FINISH) + Label(10) + Call(SetPlayerFlagBits, PS_FLAG_SCRIPTED_FALL, TRUE) + Set(MF_Zipline_GoingDown, FALSE) + Call(StopSound, SOUND_LOOP_ZIPLINE_RIDE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(EnablePartnerAI) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + KillThread(LVar9) + Wait(20) + Call(PlaySound, SOUND_LOOP_ZIPLINE_RETURN) + ChildThread + Set(MF_Zipline_GoingUp, TRUE) + Set(LVar0, ArrayVar(6)) + Set(AB_KZN_LastZiplineNpc2, ArrayVar(6)) + Loop(0) + Call(GetNpcPos, LVar0, LVar1, LVar2, LVar3) + Call(N(Zipline_AdjustMoveUpSound), MF_Zipline_GoingUp, LVar1, LVar2, LVar3) + IfNe(AB_KZN_LastZiplineNpc2, LVar0) + BreakLoop + EndIf + Wait(1) + EndLoop + EndChildThread + Set(LVar2, LVar0) + Div(LVar2, 10) + Call(MakeLerp, LVar0, 0, LVar2, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(N(Zipline_UpdatePlayerPos), 1) + Call(TranslateModel, ArrayVar(1), LVar5, LVar6, LVar7) + Call(TranslateModel, ArrayVar(2), LVar5, LVar6, LVar7) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Set(MF_Zipline_GoingUp, FALSE) + Call(StopSound, SOUND_LOOP_ZIPLINE_RETURN) + Return + End }; EvtScript N(EVS_SetupZipline) = { - EVT_MALLOC_ARRAY(7, LVar0) - EVT_USE_ARRAY(LVar0) - EVT_SET(ArrayVar(0), EVT_PTR(N(Zipline_Endpoints))) - EVT_SET(ArrayVar(1), MODEL_kassya_koma) - EVT_SET(ArrayVar(2), MODEL_kassya_himo) - EVT_SET(ArrayVar(3), -332) - EVT_SET(ArrayVar(4), 895) - EVT_SET(ArrayVar(5), -45) - EVT_SET(ArrayVar(6), NPC_ZiplineDummy) - EVT_BIND_TRIGGER(N(EVS_RideZipline), TRIGGER_FLOOR_PRESS_A, COLLIDER_ropeway, 1, 0) - EVT_EXEC(N(EVS_SyncZiplineDummyNPC)) - EVT_RETURN - EVT_END + MallocArray(7, LVar0) + UseArray(LVar0) + Set(ArrayVar(0), Ref(N(Zipline_Endpoints))) + Set(ArrayVar(1), MODEL_kassya_koma) + Set(ArrayVar(2), MODEL_kassya_himo) + Set(ArrayVar(3), -332) + Set(ArrayVar(4), 895) + Set(ArrayVar(5), -45) + Set(ArrayVar(6), NPC_ZiplineDummy) + BindTrigger(N(EVS_RideZipline), TRIGGER_FLOOR_PRESS_A, COLLIDER_ropeway, 1, 0) + Exec(N(EVS_SyncZiplineDummyNPC)) + Return + End }; diff --git a/src/world/area_kzn/kzn_09/kzn_09_4_npc.c b/src/world/area_kzn/kzn_09/kzn_09_4_npc.c index 0a9ee046654..d15edac47f4 100644 --- a/src/world/area_kzn/kzn_09/kzn_09_4_npc.c +++ b/src/world/area_kzn/kzn_09/kzn_09_4_npc.c @@ -26,204 +26,204 @@ EVT_LETTER_PROMPT(Kolorado, NPC_Kolorado, ANIM_Kolorado_Fallen, ANIM_Kolorado_Fa EVT_LETTER_REWARD(Kolorado); EvtScript N(EVS_Scene_KoloradoFallsDown) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar6, LVar7, LVar8) - EVT_IF_LT(LVar7, 800) - EVT_RETURN - EVT_END_IF - EVT_CALL(AwaitPlayerLeave, -455, -60, 85) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(InterruptUsePartner) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Kolorado, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(3.0), 0, 400, EVT_FLOAT(15.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetSelfVar, 1, 1) - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_SELF, 0) - EVT_CALL(GetSelfVar, 1, LVar0) - EVT_IF_NE(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_WAIT(30 * DT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(2.0)) - EVT_ADD(LVar0, 20) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 0) - EVT_CALL(NpcFacePlayer, NPC_PARTNER, 0) - EVT_CALL(EnablePartnerAI) - EVT_END_THREAD - EVT_CALL(SetNpcPos, NPC_SELF, -500, 870, -15) - EVT_WAIT(1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(4.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_SELF, -425, -15, 0) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 3) - EVT_WAIT(5) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 3) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(25 * DT) - EVT_CALL(SetSelfVar, 0, 2) - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.5)) - EVT_LABEL(1) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, -410, 870, -15, 10 * DT) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 1) - EVT_WAIT(15) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(SetSelfVar, 0, 0) - EVT_END_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Yell, 0, MSG_CH5_00F4) - EVT_CALL(SetSelfVar, 0, 1) - EVT_LABEL(2) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -310, 870, -15) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -310, 870, -15) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(4.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_SELF, -390, -15, 0) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.5)) - EVT_SET(LVar3, -350) - EVT_SET(LVar4, 870) - EVT_SET(LVar5, -15) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar3, LVar4, LVar5, 10 * DT) - EVT_ADD(LVar3, 90) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Thrown) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar3, LVar4, LVar5, 10 * DT) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_CALL(SetSelfVar, 0, 1) - EVT_THREAD - EVT_LABEL(3) - EVT_CALL(ShowSweat, NPC_SELF, 1, -45, EMOTER_NPC, 0, 0, 0, 0, 20) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_WAIT(25) - EVT_GOTO(3) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Run) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) - EVT_LOOP(10) - EVT_CALL(SetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_SUB(LVar4, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(20) - EVT_CALL(SetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_SUBF(LVar3, EVT_FLOAT(0.6)) - EVT_ADDF(LVar4, EVT_FLOAT(1.5)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(10) - EVT_CALL(SetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_SUBF(LVar3, EVT_FLOAT(1.0)) - EVT_SUB(LVar4, 2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Fallen) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(3.0)) - EVT_CALL(NpcJump0, NPC_SELF, LVar3, 700, LVar5, 5) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_PLAYER_LONG_FALL, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetSelfVar, 1, 0) - EVT_WAIT(5 * DT) - EVT_CALL(SetSelfVar, 0, 1) - EVT_THREAD - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_VacantStare) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Run) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PlayerMoveTo, -360, 0, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_SpinFall) - EVT_LABEL(5) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_WAIT(1) - EVT_GOTO(5) - EVT_END_IF - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_CALL(ShowMessageAtScreenPos, MSG_CH5_00F5, 160, 40) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_TRIP, SOUND_SPACE_DEFAULT) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(7.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_SET(GB_StoryProgress, STORY_CH5_KOLORADO_FELL_IN_PIT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar6, LVar7, LVar8) + IfLt(LVar7, 800) + Return + EndIf + Call(AwaitPlayerLeave, -455, -60, 85) + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, PARTNER_NONE) + Call(InterruptUsePartner) + EndIf + Call(DisablePlayerInput, TRUE) + Call(SetNpcFlagBits, NPC_Kolorado, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(AdjustCam, CAM_DEFAULT, Float(3.0), 0, 400, Float(15.0), Float(-7.0)) + Call(SetSelfVar, 1, 1) + Thread + Wait(10 * DT) + Loop(0) + Wait(1) + Call(PlayerFaceNpc, NPC_SELF, FALSE) + Call(NpcFaceNpc, NPC_PARTNER, NPC_SELF, 0) + Call(GetSelfVar, 1, LVar0) + IfNe(LVar0, 1) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(DisablePartnerAI, 0) + Wait(30 * DT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcSpeed, NPC_PARTNER, Float(2.0)) + Add(LVar0, 20) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 0) + Call(NpcFacePlayer, NPC_PARTNER, 0) + Call(EnablePartnerAI) + EndThread + Call(SetNpcPos, NPC_SELF, -500, 870, -15) + Wait(1) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) + Call(SetNpcSpeed, NPC_SELF, Float(4.0 / DT)) + Call(NpcMoveTo, NPC_SELF, -425, -15, 0) + Call(InterpNpcYaw, NPC_SELF, 270, 3) + Wait(5) + Call(InterpNpcYaw, NPC_SELF, 90, 3) + Wait(5) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) + Wait(25 * DT) + Call(SetSelfVar, 0, 2) + Thread + Call(SetNpcJumpscale, NPC_SELF, Float(2.5)) + Label(1) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, -410, 870, -15, 10 * DT) + Call(GetSelfVar, 0, LVar0) + IfNe(LVar0, 1) + Wait(15) + Goto(1) + EndIf + Call(SetSelfVar, 0, 0) + EndThread + Wait(10 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Yell, 0, MSG_CH5_00F4) + Call(SetSelfVar, 0, 1) + Label(2) + Call(GetSelfVar, 0, LVar0) + IfNe(LVar0, 0) + Wait(1) + Goto(2) + EndIf + Call(UseSettingsFrom, CAM_DEFAULT, -310, 870, -15) + Call(SetPanTarget, CAM_DEFAULT, -310, 870, -15) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetNpcSpeed, NPC_SELF, Float(4.0 / DT)) + Call(NpcMoveTo, NPC_SELF, -390, -15, 0) + Call(SetNpcJumpscale, NPC_SELF, Float(1.5)) + Set(LVar3, -350) + Set(LVar4, 870) + Set(LVar5, -15) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar3, LVar4, LVar5, 10 * DT) + Add(LVar3, 90) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Thrown) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar3, LVar4, LVar5, 10 * DT) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Call(SetSelfVar, 0, 1) + Thread + Label(3) + Call(ShowSweat, NPC_SELF, 1, -45, EMOTER_NPC, 0, 0, 0, 0, 20) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 1) + Wait(25) + Goto(3) + EndIf + EndThread + Wait(10 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Run) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) + Loop(10) + Call(SetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + Sub(LVar4, 1) + Wait(1) + EndLoop + Loop(20) + Call(SetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + SubF(LVar3, Float(0.6)) + AddF(LVar4, Float(1.5)) + Wait(1) + EndLoop + Loop(10) + Call(SetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + SubF(LVar3, Float(1.0)) + Sub(LVar4, 2) + Wait(1) + EndLoop + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Fallen) + Call(SetNpcJumpscale, NPC_SELF, Float(3.0)) + Call(NpcJump0, NPC_SELF, LVar3, 700, LVar5, 5) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_PLAYER_LONG_FALL, SOUND_SPACE_DEFAULT) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetSelfVar, 0, 0) + Call(SetSelfVar, 1, 0) + Wait(5 * DT) + Call(SetSelfVar, 0, 1) + Thread + Call(SetPlayerAnimation, ANIM_Mario1_VacantStare) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Run) + Call(SetPlayerSpeed, Float(4.0 / DT)) + Call(PlayerMoveTo, -360, 0, 0) + Call(SetPlayerAnimation, ANIM_Mario1_SpinFall) + Label(5) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 1) + Wait(1) + Goto(5) + EndIf + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndThread + Call(ShowMessageAtScreenPos, MSG_CH5_00F5, 160, 40) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_TRIP, SOUND_SPACE_DEFAULT) + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(7.0)) + Wait(10 * DT) + Call(SetSelfVar, 0, 0) + Call(ResetCam, CAM_DEFAULT, Float(2.0 / DT)) + Set(GB_StoryProgress, STORY_CH5_KOLORADO_FELL_IN_PIT) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Kolorado_Interact) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Fallen, ANIM_Kolorado_Fallen, 0, MSG_CH5_00F6) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Fallen, ANIM_Kolorado_Fallen, 0, MSG_CH5_00F6) EVT_LETTER_CHECK(Kolorado) - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_Kolorado_Init) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_KOLORADO_FELL_IN_PIT) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_Scene_KoloradoFallsDown))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_Kolorado_Interact))) - EVT_RETURN - EVT_CASE_LT(STORY_CH5_KOLORADO_AT_DEAD_END) - EVT_CALL(SetNpcPos, NPC_SELF, -270, 375, -15) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Fallen) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_Kolorado_Interact))) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_KOLORADO_FELL_IN_PIT) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_Scene_KoloradoFallsDown))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_Kolorado_Interact))) + Return + CaseLt(STORY_CH5_KOLORADO_AT_DEAD_END) + Call(SetNpcPos, NPC_SELF, -270, 375, -15) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Fallen) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_Kolorado_Interact))) + Return + EndSwitch + Call(RemoveNpc, NPC_SELF) + Return + End }; EvtScript N(EVS_SyncZiplineDummyNPC) = { - EVT_LOOP(0) - EVT_CALL(GetModelCenter, MODEL_kassya_koma) - EVT_CALL(SetNpcPos, NPC_ZiplineDummy, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetModelCenter, MODEL_kassya_koma) + Call(SetNpcPos, NPC_ZiplineDummy, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_Dummy_Init) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(0.3), 1, EVT_FLOAT(0.3)) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) + Call(SetNpcScale, NPC_SELF, Float(0.3), 1, Float(0.3)) + Return + End }; NpcData N(NpcData_PassiveNPCs)[] = { diff --git a/src/world/area_kzn/kzn_10/kzn_10_1_main.c b/src/world/area_kzn/kzn_10/kzn_10_1_main.c index 40f9553dc49..c16381a2886 100644 --- a/src/world/area_kzn/kzn_10/kzn_10_1_main.c +++ b/src/world/area_kzn/kzn_10/kzn_10_1_main.c @@ -6,10 +6,10 @@ EvtScript N(EVS_ExitWalk_kzn_09_1) = EVT_EXIT_WALK(60, kzn_10_ENTRY_0, "kzn_09", EvtScript N(EVS_ExitWalk_kzn_11_0) = EVT_EXIT_WALK(60, kzn_10_ENTRY_1, "kzn_11", kzn_11_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(N(EVS_ExitWalk_kzn_09_1), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(N(EVS_ExitWalk_kzn_11_0), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(N(EVS_ExitWalk_kzn_09_1), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(N(EVS_ExitWalk_kzn_11_0), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + Return + End }; API_CALLABLE(N(func_8024030C_C7E48C)) { @@ -21,32 +21,32 @@ API_CALLABLE(N(func_8024030C_C7E48C)) { } EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_LAVALAVA) - EVT_CALL(SetSpriteShading, SHADING_KZN_10) - EVT_SETUP_CAMERA_DEFAULT() - EVT_THREAD - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kzn_10_ENTRY_0) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -445, -13, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -445, -13, 0) - EVT_ELSE - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 425, -246, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 425, -246, 0) - EVT_END_IF - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(2) - EVT_CALL(N(func_8024030C_C7E48C)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_END_THREAD - EVT_SET(LVar0, N(EVS_BindExitTriggers)) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_CALL(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_1) - EVT_EXEC(N(EVS_SetupSpinyTromp)) - EVT_SET(LVar0, MODEL_kem1) - EVT_EXEC(N(EVS_StartTexPanner_SmokeLeft)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_LAVALAVA) + Call(SetSpriteShading, SHADING_KZN_10) + SetUP_CAMERA_DEFAULT() + Thread + Call(GetEntryID, LVar0) + IfEq(LVar0, kzn_10_ENTRY_0) + Call(UseSettingsFrom, CAM_DEFAULT, -445, -13, 0) + Call(SetPanTarget, CAM_DEFAULT, -445, -13, 0) + Else + Call(UseSettingsFrom, CAM_DEFAULT, 425, -246, 0) + Call(SetPanTarget, CAM_DEFAULT, 425, -246, 0) + EndIf + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(2) + Call(N(func_8024030C_C7E48C)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + EndThread + Set(LVar0, N(EVS_BindExitTriggers)) + Exec(EnterWalk) + Wait(1) + Call(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) + Call(PlayAmbientSounds, AMBIENT_LAVA_1) + Exec(N(EVS_SetupSpinyTromp)) + Set(LVar0, MODEL_kem1) + Exec(N(EVS_StartTexPanner_SmokeLeft)) + Return + End }; diff --git a/src/world/area_kzn/kzn_10/kzn_10_2_tromp.c b/src/world/area_kzn/kzn_10/kzn_10_2_tromp.c index a2589d7f1be..73bd764f4e9 100644 --- a/src/world/area_kzn/kzn_10/kzn_10_2_tromp.c +++ b/src/world/area_kzn/kzn_10/kzn_10_2_tromp.c @@ -8,250 +8,250 @@ #include "../common/SpinyTromp.inc.c" EvtScript N(EVS_SpinyTromp_ManageCamera) = { - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(10.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_LOOP(0) - EVT_IF_EQ(AF_KZN_TrompHitPlayer, FALSE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, MV_TrompPosX) - EVT_DIV(LVar0, 2) - EVT_ELSE - EVT_SET(LVar0, MV_TrompPosX) - EVT_END_IF - EVT_SET(LVar3, LVar0) - EVT_SWITCH(LVar3) - EVT_CASE_LT(-350) - EVT_SET(LVar6, 500) - EVT_CASE_LT(-200) - EVT_SET(LVar6, LVar3) - EVT_ADD(LVar6, 850) - EVT_CASE_LT(150) - EVT_SET(LVar6, 650) - EVT_CASE_LT(300) - EVT_SET(LVar0, LVar3) - EVT_SET(LVar6, 800) - EVT_SUB(LVar6, LVar0) - EVT_CASE_DEFAULT - EVT_SET(LVar6, 500) - EVT_END_SWITCH - EVT_CALL(SetCamDistance, CAM_DEFAULT, LVar6) - EVT_SET(LVar0, LVar3) - EVT_SET(LVar2, 0) - EVT_CALL(N(UnkFunc46)) - EVT_SUB(LVar2, 55) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar2, 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Call(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetCamSpeed, CAM_DEFAULT, Float(10.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Loop(0) + IfEq(AF_KZN_TrompHitPlayer, FALSE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, MV_TrompPosX) + Div(LVar0, 2) + Else + Set(LVar0, MV_TrompPosX) + EndIf + Set(LVar3, LVar0) + Switch(LVar3) + CaseLt(-350) + Set(LVar6, 500) + CaseLt(-200) + Set(LVar6, LVar3) + Add(LVar6, 850) + CaseLt(150) + Set(LVar6, 650) + CaseLt(300) + Set(LVar0, LVar3) + Set(LVar6, 800) + Sub(LVar6, LVar0) + CaseDefault + Set(LVar6, 500) + EndSwitch + Call(SetCamDistance, CAM_DEFAULT, LVar6) + Set(LVar0, LVar3) + Set(LVar2, 0) + Call(N(UnkFunc46)) + Sub(LVar2, 55) + Call(SetPanTarget, CAM_DEFAULT, LVar3, LVar2, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + EndLoop + Return + End }; EvtScript N(D_80241224_C7F3A4) = { - EVT_SET_GROUP(EVT_GROUP_0A) - EVT_LOOP(5) - EVT_PLAY_EFFECT(EFFECT_DUST, 1, -430, 100, 0, 30) - EVT_WAIT(2) - EVT_END_LOOP - EVT_LABEL(0) - EVT_CALL(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 100) - EVT_PLAY_EFFECT(EFFECT_DUST, 1, LVar0, LVar1, LVar2, 40) - EVT_WAIT(20) - EVT_SUB(LVar0, 100) - EVT_ADD(LVar1, 50) - EVT_PLAY_EFFECT(EFFECT_DUST, 1, LVar0, LVar1, LVar2, 40) - EVT_WAIT(20) - EVT_IF_EQ(AF_KZN_Tromp1_ShakingDone, FALSE) - EVT_GOTO(0) - EVT_END_IF - EVT_LOOP(8) - EVT_PLAY_EFFECT(EFFECT_DUST, 1, 400, -80, 0, 40) - EVT_WAIT(5) - EVT_END_LOOP - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0A) + Loop(5) + PlayEffect(EFFECT_DUST, 1, -430, 100, 0, 30) + Wait(2) + EndLoop + Label(0) + Call(GetCamPosition, CAM_DEFAULT, LVar0, LVar1, LVar2) + Add(LVar1, 100) + PlayEffect(EFFECT_DUST, 1, LVar0, LVar1, LVar2, 40) + Wait(20) + Sub(LVar0, 100) + Add(LVar1, 50) + PlayEffect(EFFECT_DUST, 1, LVar0, LVar1, LVar2, 40) + Wait(20) + IfEq(AF_KZN_Tromp1_ShakingDone, FALSE) + Goto(0) + EndIf + Loop(8) + PlayEffect(EFFECT_DUST, 1, 400, -80, 0, 40) + Wait(5) + EndLoop + Return + End }; EvtScript N(EVS_SpinyTromp_ShakeCam) = { - EVT_LOOP(0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30, EVT_FLOAT(1.0)) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(ShakeCam, CAM_DEFAULT, 0, 30, Float(1.0)) + EndLoop + Return + End }; EvtScript N(EVS_SetupSpinyTromp) = { - EVT_SET_GROUP(EVT_GROUP_EF) - EVT_CALL(SetGroupVisibility, MODEL_goron, MODEL_GROUP_HIDDEN) - EVT_CALL(EnableModel, MODEL_me, FALSE) - EVT_CALL(TranslateGroup, MODEL_goron, 0, 0, 0) - EVT_CALL(RotateGroup, MODEL_goron, 0, 0, 0, 1) - EVT_SET(AF_KZN_Tromp1_ShakingDone, FALSE) - EVT_SET(AF_KZN_TrompHitPlayer, FALSE) - EVT_SET(AF_KZN_TrompRollingDone, FALSE) - EVT_CALL(GetEntryID, LVar3) - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar3, kzn_10_ENTRY_0) - EVT_IF_GE(LVar0, -400) - EVT_BREAK_LOOP - EVT_END_IF - EVT_ELSE - EVT_IF_LE(LVar0, -400) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(InterruptUsePartner) - EVT_CALL(SetGroupVisibility, MODEL_goron, MODEL_GROUP_VISIBLE) - EVT_CALL(EnableModel, MODEL_me, TRUE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, UNK_FUNC_50_LVar1) - EVT_SET(LVar2, 0) - EVT_CALL(N(UnkFunc46)) - EVT_CALL(MakeLerp, 200, LVar2, 20, EASING_QUADRATIC_IN) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_SET(MV_TrompPosX, UNK_FUNC_50_LVar1) - EVT_CALL(TranslateGroup, MODEL_goron, UNK_FUNC_50_LVar1, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_me, UNK_FUNC_50_LVar1, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_SUB(LVar2, 55) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, UNK_FUNC_50_LVar1, LVar2, 0) - EVT_EXEC(N(D_80241224_C7F3A4)) - EVT_THREAD - EVT_CALL(GetPartnerInUse, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PARTNER_PARAKARRY) - EVT_CASE_EQ(PARTNER_BOW) - EVT_CASE_DEFAULT - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(2.5)) - EVT_CALL(PlayerJump1, LVar1, LVar2, LVar3, 8) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_IF_NE(LVar0, PARTNER_LAKILESTER) - EVT_WAIT(3) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_IF - EVT_END_SWITCH - EVT_END_THREAD - EVT_CALL(PlaySoundAt, SOUND_TROMP_DROP, SOUND_SPACE_DEFAULT, -465, 0, 0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(2.5)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.2)) - EVT_WAIT(15) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_EXEC_GET_TID(N(EVS_SpinyTromp_ManageCamera), LVarA) - EVT_EXEC_GET_TID(N(EVS_SpinyTromp_ShakeCam), MV_ScreenShakeTID) - EVT_CALL(PlaySoundAt, SOUND_LOOP_TROMP_ROLL, SOUND_SPACE_DEFAULT, -465, 0, 0) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 0) - EVT_CALL(MakeLerp, UNK_FUNC_50_LVar1, 418, 180, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(UnkFunc46)) - EVT_CALL(N(UnkFunc51), LVar0, LVar1, LVar2) - EVT_SET(MV_TrompPosX, LVar0) - EVT_CALL(TranslateGroup, MODEL_goron, LVar0, LVar2, 0) - EVT_CALL(TranslateModel, MODEL_me, LVar0, LVar2, 0) - EVT_SET(LVar8, LVar0) - EVT_SET(LVar9, LVar2) - EVT_CALL(RotateGroup, MODEL_goron, LVar3, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_me, LVar3, 0, 0, 1) - EVT_CALL(N(UnkFunc49)) - EVT_CALL(TranslateModel, MODEL_me, LVar5, LVar6, 0) - EVT_CALL(N(UnkFunc50)) - EVT_WAIT(1) - EVT_CALL(N(SpinyTromp_CheckDist)) - EVT_IF_LT(LVar4, 80) - EVT_IF_EQ(AF_KZN_TrompHitPlayer, FALSE) - EVT_CALL(N(SpinyTromp_GetActingPartner)) - EVT_IF_NE(LVar0, PARTNER_BOW) - EVT_EXEC(N(D_80240D10_C7EE90)) - EVT_IF_EQ(AF_KZN_TrompHitPlayer, FALSE) - EVT_KILL_THREAD(LVarA) - EVT_SET(AF_KZN_TrompHitPlayer, TRUE) - EVT_END_IF - EVT_THREAD - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_WAIT(45) - EVT_SET(AF_KZN_TrompRollingDone, TRUE) - EVT_END_THREAD - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(AF_KZN_Tromp1_ShakingDone, TRUE) - EVT_KILL_THREAD(MV_ScreenShakeTID) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 35, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(0.5)) - EVT_END_THREAD - EVT_CALL(StopSound, SOUND_LOOP_TROMP_ROLL) - EVT_CALL(PlaySoundAt, SOUND_TROMP_CRASH, SOUND_SPACE_DEFAULT, 415, -240, 0) - EVT_CALL(EnableModel, MODEL_me, FALSE) - EVT_THREAD - EVT_SET(LVar0, 418) - EVT_SET(LVar2, 0) - EVT_CALL(N(UnkFunc46)) - EVT_PLAY_EFFECT(EFFECT_00, LVar0, LVar2, 0, 1, 20, 3, 8) - EVT_END_THREAD - EVT_SET(LVar0, LVar8) - EVT_SET(LVar1, LVar9) - EVT_SET(LVar2, LVar8) - EVT_SET(LVar3, LVar9) - EVT_SET(LVar4, LVar8) - EVT_SET(LVar5, LVar9) - EVT_SET(LVar6, LVar8) - EVT_SET(LVar7, LVar9) - EVT_LOOP(90) - EVT_CALL(TranslateModel, MODEL_o70, LVar6, LVar1, 0) - EVT_CALL(TranslateModel, MODEL_o72, LVar6, LVar3, 0) - EVT_CALL(TranslateModel, MODEL_o73, LVar4, LVar5, 0) - EVT_CALL(TranslateModel, MODEL_o74, LVar4, LVar7, 0) - EVT_CALL(TranslateModel, MODEL_2_1, LVar2, LVar3, 0) - EVT_CALL(TranslateModel, MODEL_2_2, LVar2, LVar1, 0) - EVT_CALL(TranslateModel, MODEL_2_3, LVar0, LVar7, 0) - EVT_CALL(TranslateModel, MODEL_2_4, LVar0, LVar5, 0) - EVT_CALL(TranslateModel, MODEL_3_1, LVar0, LVar5, 0) - EVT_CALL(TranslateModel, MODEL_3_2, LVar0, LVar7, 0) - EVT_CALL(TranslateModel, MODEL_3_3, LVar2, LVar1, 0) - EVT_CALL(TranslateModel, MODEL_3_4, LVar2, LVar3, 0) - EVT_CALL(TranslateModel, MODEL_4_1, LVar4, LVar7, 0) - EVT_CALL(TranslateModel, MODEL_4_2, LVar4, LVar5, 0) - EVT_CALL(TranslateModel, MODEL_4_3, LVar6, LVar3, 0) - EVT_CALL(TranslateModel, MODEL_4_4, LVar6, LVar1, 0) - EVT_ADD(LVar0, 2) - EVT_ADD(LVar1, -7) - EVT_ADD(LVar2, -5) - EVT_ADD(LVar3, 7) - EVT_ADD(LVar4, 9) - EVT_ADD(LVar5, -3) - EVT_ADD(LVar6, -6) - EVT_ADD(LVar7, 7) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetGroupVisibility, MODEL_goron, MODEL_GROUP_HIDDEN) - EVT_CALL(EnableModel, MODEL_me, FALSE) - EVT_WAIT(10) - EVT_IF_EQ(AF_KZN_TrompHitPlayer, FALSE) - EVT_KILL_THREAD(LVarA) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_SET(AF_KZN_TrompRollingDone, TRUE) - EVT_END_IF - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_EF) + Call(SetGroupVisibility, MODEL_goron, MODEL_GROUP_HIDDEN) + Call(EnableModel, MODEL_me, FALSE) + Call(TranslateGroup, MODEL_goron, 0, 0, 0) + Call(RotateGroup, MODEL_goron, 0, 0, 0, 1) + Set(AF_KZN_Tromp1_ShakingDone, FALSE) + Set(AF_KZN_TrompHitPlayer, FALSE) + Set(AF_KZN_TrompRollingDone, FALSE) + Call(GetEntryID, LVar3) + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfEq(LVar3, kzn_10_ENTRY_0) + IfGe(LVar0, -400) + BreakLoop + EndIf + Else + IfLe(LVar0, -400) + BreakLoop + EndIf + EndIf + Wait(1) + EndLoop + Call(InterruptUsePartner) + Call(SetGroupVisibility, MODEL_goron, MODEL_GROUP_VISIBLE) + Call(EnableModel, MODEL_me, TRUE) + Call(DisablePlayerInput, TRUE) + Set(LVar0, UNK_FUNC_50_LVar1) + Set(LVar2, 0) + Call(N(UnkFunc46)) + Call(MakeLerp, 200, LVar2, 20, EASING_QUADRATIC_IN) + Label(10) + Call(UpdateLerp) + Set(MV_TrompPosX, UNK_FUNC_50_LVar1) + Call(TranslateGroup, MODEL_goron, UNK_FUNC_50_LVar1, LVar0, 0) + Call(TranslateModel, MODEL_me, UNK_FUNC_50_LVar1, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Sub(LVar2, 55) + PlayEffect(EFFECT_LANDING_DUST, 4, UNK_FUNC_50_LVar1, LVar2, 0) + Exec(N(D_80241224_C7F3A4)) + Thread + Call(GetPartnerInUse, LVar0) + Switch(LVar0) + CaseEq(PARTNER_PARAKARRY) + CaseEq(PARTNER_BOW) + CaseDefault + Call(GetPlayerPos, LVar1, LVar2, LVar3) + Call(SetPlayerJumpscale, Float(2.5)) + Call(PlayerJump1, LVar1, LVar2, LVar3, 8) + Call(InterpPlayerYaw, 270, 0) + IfNe(LVar0, PARTNER_LAKILESTER) + Wait(3) + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + Wait(10) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndIf + EndSwitch + EndThread + Call(PlaySoundAt, SOUND_TROMP_DROP, SOUND_SPACE_DEFAULT, -465, 0, 0) + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(2.5)) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.2)) + Wait(15) + Call(DisablePlayerInput, FALSE) + ExecGetTID(N(EVS_SpinyTromp_ManageCamera), LVarA) + ExecGetTID(N(EVS_SpinyTromp_ShakeCam), MV_ScreenShakeTID) + Call(PlaySoundAt, SOUND_LOOP_TROMP_ROLL, SOUND_SPACE_DEFAULT, -465, 0, 0) + Set(LVar2, 0) + Set(LVar3, 0) + Call(MakeLerp, UNK_FUNC_50_LVar1, 418, 180, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(N(UnkFunc46)) + Call(N(UnkFunc51), LVar0, LVar1, LVar2) + Set(MV_TrompPosX, LVar0) + Call(TranslateGroup, MODEL_goron, LVar0, LVar2, 0) + Call(TranslateModel, MODEL_me, LVar0, LVar2, 0) + Set(LVar8, LVar0) + Set(LVar9, LVar2) + Call(RotateGroup, MODEL_goron, LVar3, 0, 0, 1) + Call(RotateModel, MODEL_me, LVar3, 0, 0, 1) + Call(N(UnkFunc49)) + Call(TranslateModel, MODEL_me, LVar5, LVar6, 0) + Call(N(UnkFunc50)) + Wait(1) + Call(N(SpinyTromp_CheckDist)) + IfLt(LVar4, 80) + IfEq(AF_KZN_TrompHitPlayer, FALSE) + Call(N(SpinyTromp_GetActingPartner)) + IfNe(LVar0, PARTNER_BOW) + Exec(N(D_80240D10_C7EE90)) + IfEq(AF_KZN_TrompHitPlayer, FALSE) + KillThread(LVarA) + Set(AF_KZN_TrompHitPlayer, TRUE) + EndIf + Thread + Call(ResetCam, CAM_DEFAULT, Float(2.0)) + Wait(45) + Set(AF_KZN_TrompRollingDone, TRUE) + EndThread + EndIf + EndIf + EndIf + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Set(AF_KZN_Tromp1_ShakingDone, TRUE) + KillThread(MV_ScreenShakeTID) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 35, Float(2.0)) + Call(ShakeCam, CAM_DEFAULT, 0, 20, Float(1.0)) + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(0.5)) + EndThread + Call(StopSound, SOUND_LOOP_TROMP_ROLL) + Call(PlaySoundAt, SOUND_TROMP_CRASH, SOUND_SPACE_DEFAULT, 415, -240, 0) + Call(EnableModel, MODEL_me, FALSE) + Thread + Set(LVar0, 418) + Set(LVar2, 0) + Call(N(UnkFunc46)) + PlayEffect(EFFECT_00, LVar0, LVar2, 0, 1, 20, 3, 8) + EndThread + Set(LVar0, LVar8) + Set(LVar1, LVar9) + Set(LVar2, LVar8) + Set(LVar3, LVar9) + Set(LVar4, LVar8) + Set(LVar5, LVar9) + Set(LVar6, LVar8) + Set(LVar7, LVar9) + Loop(90) + Call(TranslateModel, MODEL_o70, LVar6, LVar1, 0) + Call(TranslateModel, MODEL_o72, LVar6, LVar3, 0) + Call(TranslateModel, MODEL_o73, LVar4, LVar5, 0) + Call(TranslateModel, MODEL_o74, LVar4, LVar7, 0) + Call(TranslateModel, MODEL_2_1, LVar2, LVar3, 0) + Call(TranslateModel, MODEL_2_2, LVar2, LVar1, 0) + Call(TranslateModel, MODEL_2_3, LVar0, LVar7, 0) + Call(TranslateModel, MODEL_2_4, LVar0, LVar5, 0) + Call(TranslateModel, MODEL_3_1, LVar0, LVar5, 0) + Call(TranslateModel, MODEL_3_2, LVar0, LVar7, 0) + Call(TranslateModel, MODEL_3_3, LVar2, LVar1, 0) + Call(TranslateModel, MODEL_3_4, LVar2, LVar3, 0) + Call(TranslateModel, MODEL_4_1, LVar4, LVar7, 0) + Call(TranslateModel, MODEL_4_2, LVar4, LVar5, 0) + Call(TranslateModel, MODEL_4_3, LVar6, LVar3, 0) + Call(TranslateModel, MODEL_4_4, LVar6, LVar1, 0) + Add(LVar0, 2) + Add(LVar1, -7) + Add(LVar2, -5) + Add(LVar3, 7) + Add(LVar4, 9) + Add(LVar5, -3) + Add(LVar6, -6) + Add(LVar7, 7) + Wait(1) + EndLoop + Call(SetGroupVisibility, MODEL_goron, MODEL_GROUP_HIDDEN) + Call(EnableModel, MODEL_me, FALSE) + Wait(10) + IfEq(AF_KZN_TrompHitPlayer, FALSE) + KillThread(LVarA) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Set(AF_KZN_TrompRollingDone, TRUE) + EndIf + Return + End }; diff --git a/src/world/area_kzn/kzn_11/kzn_11_1_main.c b/src/world/area_kzn/kzn_11/kzn_11_1_main.c index ca281853324..8e09b7f341f 100644 --- a/src/world/area_kzn/kzn_11/kzn_11_1_main.c +++ b/src/world/area_kzn/kzn_11/kzn_11_1_main.c @@ -6,42 +6,42 @@ EvtScript N(EVS_ExitWalk_kzn_10_1) = EVT_EXIT_WALK(60, kzn_11_ENTRY_0, "kzn_10", EvtScript N(EVS_ExitWalk_kzn_17_0) = EVT_EXIT_WALK(60, kzn_11_ENTRY_1, "kzn_17", kzn_17_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kzn_10_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kzn_17_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kzn_10_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kzn_17_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + Return + End }; EvtScript N(EVS_StartTexPanners_Lava) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, MODEL_yougan1_1, TEX_PANNER_2) - EVT_CALL(EnableTexPanning, MODEL_toro, TRUE) - EVT_CALL(EnableTexPanning, MODEL_poko, TRUE) - EVT_THREAD + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, MODEL_yougan1_1, TEX_PANNER_2) + Call(EnableTexPanning, MODEL_toro, TRUE) + Call(EnableTexPanning, MODEL_poko, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( 200, 0, 400, -100) TEX_PAN_PARAMS_FREQ( 1, 0, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_5) TEX_PAN_PARAMS_STEP( 300, -500, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread // animate lava bubbles (real ones, not the enemies) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, LVar0, 0) - EVT_ADD(LVar0, 0x8000) - EVT_WAIT(6) - EVT_END_LOOP - EVT_END_THREAD - EVT_RETURN - EVT_END + Set(LVar0, 0) + Loop(0) + Call(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, LVar0, 0) + Add(LVar0, 0x8000) + Wait(6) + EndLoop + EndThread + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -53,35 +53,35 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_LAVALAVA) - EVT_CALL(SetSpriteShading, SHADING_KZN_11) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_1) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o175, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o176, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o177, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o178, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o156, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o179, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o180, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o181, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_pp1, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_pp2, SURFACE_TYPE_LAVA) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_EXEC(N(EVS_StartTexPanners_Lava)) - EVT_SET(LVar0, MODEL_kem1) - EVT_EXEC(N(EVS_StartTexPanner_SmokeLeft)) - EVT_SET(LVar0, MODEL_kem2) - EVT_EXEC(N(EVS_StartTexPanner_SmokeRight)) - EVT_EXEC(N(EVS_UpdateLeftPlatform)) - EVT_EXEC(N(EVS_UpdateRightPlatform)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_LAVALAVA) + Call(SetSpriteShading, SHADING_KZN_11) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Call(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) + Call(PlayAmbientSounds, AMBIENT_LAVA_1) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o175, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o176, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o177, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o178, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o156, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o179, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o180, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o181, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_pp1, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_pp2, SURFACE_TYPE_LAVA) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + Exec(N(EVS_StartTexPanners_Lava)) + Set(LVar0, MODEL_kem1) + Exec(N(EVS_StartTexPanner_SmokeLeft)) + Set(LVar0, MODEL_kem2) + Exec(N(EVS_StartTexPanner_SmokeRight)) + Exec(N(EVS_UpdateLeftPlatform)) + Exec(N(EVS_UpdateRightPlatform)) + Return + End }; diff --git a/src/world/area_kzn/kzn_11/kzn_11_2_platforms.c b/src/world/area_kzn/kzn_11/kzn_11_2_platforms.c index 3f0a7ca6509..85733123bf3 100644 --- a/src/world/area_kzn/kzn_11/kzn_11_2_platforms.c +++ b/src/world/area_kzn/kzn_11/kzn_11_2_platforms.c @@ -40,131 +40,131 @@ API_CALLABLE(N(IsPartnerLakilester)) { } EvtScript N(EVS_UpdateLeftPlatform) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_CALL(ParentColliderToModel, COLLIDER_o67, MODEL_o67) - EVT_CALL(ParentColliderToModel, COLLIDER_o68, MODEL_o68) - EVT_CALL(ParentColliderToModel, COLLIDER_o69, MODEL_o69) - EVT_SET(LVar0, 60) - EVT_SET(LVar3, 0) - EVT_LOOP(0) - EVT_CALL(MakeLerp, LVar0, -60, 120, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g7, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o67) - EVT_CALL(UpdateColliderTransform, COLLIDER_o68) - EVT_CALL(UpdateColliderTransform, COLLIDER_o69) - EVT_SET(LVar4, LVar0) - EVT_SUB(LVar4, LVar3) - EVT_SET(LVar3, LVar0) - EVT_CALL(N(AddPushVelocity), LVar4, 26, 25) - EVT_IF_LT(LVar0, -45) - EVT_CALL(N(IsPartnerLakilester)) - EVT_IF_EQ(LVar9, 1) - EVT_CALL(N(GetCurrentFloor), LVar2) - EVT_IF_EQ(LVar2, COLLIDER_pp1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_CALL(MakeLerp, LVar0, 60, 120, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g7, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o67) - EVT_CALL(UpdateColliderTransform, COLLIDER_o68) - EVT_CALL(UpdateColliderTransform, COLLIDER_o69) - EVT_SET(LVar4, LVar0) - EVT_SUB(LVar4, LVar3) - EVT_SET(LVar3, LVar0) - EVT_CALL(N(AddPushVelocity), LVar4, 26, 25) - EVT_IF_GT(LVar0, 45) - EVT_CALL(N(IsPartnerLakilester)) - EVT_IF_EQ(LVar9, 1) - EVT_CALL(N(GetCurrentFloor), LVar2) - EVT_IF_EQ(LVar2, COLLIDER_pp2) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_END_LOOP - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0B) + Call(ParentColliderToModel, COLLIDER_o67, MODEL_o67) + Call(ParentColliderToModel, COLLIDER_o68, MODEL_o68) + Call(ParentColliderToModel, COLLIDER_o69, MODEL_o69) + Set(LVar0, 60) + Set(LVar3, 0) + Loop(0) + Call(MakeLerp, LVar0, -60, 120, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g7, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o67) + Call(UpdateColliderTransform, COLLIDER_o68) + Call(UpdateColliderTransform, COLLIDER_o69) + Set(LVar4, LVar0) + Sub(LVar4, LVar3) + Set(LVar3, LVar0) + Call(N(AddPushVelocity), LVar4, 26, 25) + IfLt(LVar0, -45) + Call(N(IsPartnerLakilester)) + IfEq(LVar9, 1) + Call(N(GetCurrentFloor), LVar2) + IfEq(LVar2, COLLIDER_pp1) + BreakLoop + EndIf + EndIf + EndIf + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(20) + Call(MakeLerp, LVar0, 60, 120, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g7, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o67) + Call(UpdateColliderTransform, COLLIDER_o68) + Call(UpdateColliderTransform, COLLIDER_o69) + Set(LVar4, LVar0) + Sub(LVar4, LVar3) + Set(LVar3, LVar0) + Call(N(AddPushVelocity), LVar4, 26, 25) + IfGt(LVar0, 45) + Call(N(IsPartnerLakilester)) + IfEq(LVar9, 1) + Call(N(GetCurrentFloor), LVar2) + IfEq(LVar2, COLLIDER_pp2) + BreakLoop + EndIf + EndIf + EndIf + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(20) + EndLoop + Return + End }; EvtScript N(EVS_UpdateRightPlatform) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_CALL(ParentColliderToModel, COLLIDER_o26, MODEL_o26) - EVT_CALL(ParentColliderToModel, COLLIDER_o27, MODEL_o27) - EVT_CALL(ParentColliderToModel, COLLIDER_o28, MODEL_o28) - EVT_SET(LVar0, 135) - EVT_SET(LVar3, 0) - EVT_LOOP(0) - EVT_CALL(MakeLerp, LVar0, -60, 195, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g14, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o26) - EVT_CALL(UpdateColliderTransform, COLLIDER_o27) - EVT_CALL(UpdateColliderTransform, COLLIDER_o28) - EVT_SET(LVar4, LVar0) - EVT_SUB(LVar4, LVar3) - EVT_SET(LVar3, LVar0) - EVT_CALL(N(AddPushVelocity), LVar4, 30, 29) - EVT_IF_LT(LVar0, -45) - EVT_CALL(N(IsPartnerLakilester)) - EVT_IF_EQ(LVar9, 1) - EVT_CALL(N(GetCurrentFloor), LVar2) - EVT_IF_EQ(LVar2, COLLIDER_pp1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_CALL(MakeLerp, LVar0, 135, 195, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g14, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o26) - EVT_CALL(UpdateColliderTransform, COLLIDER_o27) - EVT_CALL(UpdateColliderTransform, COLLIDER_o28) - EVT_SET(LVar4, LVar0) - EVT_SUB(LVar4, LVar3) - EVT_SET(LVar3, LVar0) - EVT_CALL(N(AddPushVelocity), LVar4, 30, 29) - EVT_IF_GT(LVar0, 120) - EVT_CALL(N(IsPartnerLakilester)) - EVT_IF_EQ(LVar9, 1) - EVT_CALL(N(GetCurrentFloor), LVar2) - EVT_IF_EQ(LVar2, COLLIDER_pp2) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_END_LOOP - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0B) + Call(ParentColliderToModel, COLLIDER_o26, MODEL_o26) + Call(ParentColliderToModel, COLLIDER_o27, MODEL_o27) + Call(ParentColliderToModel, COLLIDER_o28, MODEL_o28) + Set(LVar0, 135) + Set(LVar3, 0) + Loop(0) + Call(MakeLerp, LVar0, -60, 195, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g14, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o26) + Call(UpdateColliderTransform, COLLIDER_o27) + Call(UpdateColliderTransform, COLLIDER_o28) + Set(LVar4, LVar0) + Sub(LVar4, LVar3) + Set(LVar3, LVar0) + Call(N(AddPushVelocity), LVar4, 30, 29) + IfLt(LVar0, -45) + Call(N(IsPartnerLakilester)) + IfEq(LVar9, 1) + Call(N(GetCurrentFloor), LVar2) + IfEq(LVar2, COLLIDER_pp1) + BreakLoop + EndIf + EndIf + EndIf + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(20) + Call(MakeLerp, LVar0, 135, 195, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g14, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o26) + Call(UpdateColliderTransform, COLLIDER_o27) + Call(UpdateColliderTransform, COLLIDER_o28) + Set(LVar4, LVar0) + Sub(LVar4, LVar3) + Set(LVar3, LVar0) + Call(N(AddPushVelocity), LVar4, 30, 29) + IfGt(LVar0, 120) + Call(N(IsPartnerLakilester)) + IfEq(LVar9, 1) + Call(N(GetCurrentFloor), LVar2) + IfEq(LVar2, COLLIDER_pp2) + BreakLoop + EndIf + EndIf + EndIf + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(20) + EndLoop + Return + End }; diff --git a/src/world/area_kzn/kzn_11/kzn_11_3_npc.c b/src/world/area_kzn/kzn_11/kzn_11_3_npc.c index 135686d5b4e..5284d808a20 100644 --- a/src/world/area_kzn/kzn_11/kzn_11_3_npc.c +++ b/src/world/area_kzn/kzn_11/kzn_11_3_npc.c @@ -12,62 +12,62 @@ s32 N(FireBar_Sounds)[] = { }; EvtScript N(EVS_FireBar_Defeated) = { - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_LOOP(15) - EVT_LOOP(LVar1) - EVT_CALL(SetNpcFlagBits, LVar0, NPC_FLAG_INVISIBLE, TRUE) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_WAIT(1) - EVT_SET(LVar0, LVarA) - EVT_SET(LVar1, LVarB) - EVT_LOOP(LVar1) - EVT_CALL(SetNpcFlagBits, LVar0, NPC_FLAG_INVISIBLE, FALSE) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_WAIT(1) - EVT_SET(LVar0, LVarA) - EVT_SET(LVar1, LVarB) - EVT_END_LOOP - EVT_CALL(GetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(PlaySoundAt, SOUND_SEQ_FIRE_BAR_DEAD, SOUND_SPACE_DEFAULT, LVar1, LVar2, LVar3) - EVT_LOOP(10) - EVT_CALL(GetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(RandInt, 50, LVar4) - EVT_SUB(LVar4, 25) - EVT_CALL(RandInt, 30, LVar5) - EVT_ADD(LVar1, LVar4) - EVT_ADD(LVar2, LVar5) - EVT_PLAY_EFFECT(EFFECT_00, LVar1, LVar2, LVar3, 1, 20, 3, 2) - EVT_END_LOOP - EVT_IF_EQ(LVarA, NPC_FireBar_1A) - EVT_IF_EQ(AF_KZN11_FireBar1_Coins, FALSE) - EVT_SET(AF_KZN11_FireBar1_Coins, TRUE) - EVT_LOOP(10) - EVT_CALL(MakeItemEntity, ITEM_COIN, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) - EVT_END_LOOP - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVarA, NPC_FireBar_2A) - EVT_IF_EQ(AF_KZN11_FireBar2_Coins, FALSE) - EVT_SET(AF_KZN11_FireBar2_Coins, TRUE) - EVT_LOOP(10) - EVT_CALL(MakeItemEntity, ITEM_COIN, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) - EVT_END_LOOP - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVarA, NPC_FireBar_3A) - EVT_IF_EQ(AF_KZN11_FireBar3_Coins, FALSE) - EVT_SET(AF_KZN11_FireBar3_Coins, TRUE) - EVT_LOOP(10) - EVT_CALL(MakeItemEntity, ITEM_COIN, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) - EVT_END_LOOP - EVT_END_IF - EVT_END_IF - EVT_CALL(RemoveEncounter, LVarA) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Set(LVarB, LVar1) + Loop(15) + Loop(LVar1) + Call(SetNpcFlagBits, LVar0, NPC_FLAG_INVISIBLE, TRUE) + Add(LVar0, 1) + EndLoop + Wait(1) + Set(LVar0, LVarA) + Set(LVar1, LVarB) + Loop(LVar1) + Call(SetNpcFlagBits, LVar0, NPC_FLAG_INVISIBLE, FALSE) + Add(LVar0, 1) + EndLoop + Wait(1) + Set(LVar0, LVarA) + Set(LVar1, LVarB) + EndLoop + Call(GetNpcPos, LVar0, LVar1, LVar2, LVar3) + Call(PlaySoundAt, SOUND_SEQ_FIRE_BAR_DEAD, SOUND_SPACE_DEFAULT, LVar1, LVar2, LVar3) + Loop(10) + Call(GetNpcPos, LVar0, LVar1, LVar2, LVar3) + Call(RandInt, 50, LVar4) + Sub(LVar4, 25) + Call(RandInt, 30, LVar5) + Add(LVar1, LVar4) + Add(LVar2, LVar5) + PlayEffect(EFFECT_00, LVar1, LVar2, LVar3, 1, 20, 3, 2) + EndLoop + IfEq(LVarA, NPC_FireBar_1A) + IfEq(AF_KZN11_FireBar1_Coins, FALSE) + Set(AF_KZN11_FireBar1_Coins, TRUE) + Loop(10) + Call(MakeItemEntity, ITEM_COIN, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) + EndLoop + EndIf + EndIf + IfEq(LVarA, NPC_FireBar_2A) + IfEq(AF_KZN11_FireBar2_Coins, FALSE) + Set(AF_KZN11_FireBar2_Coins, TRUE) + Loop(10) + Call(MakeItemEntity, ITEM_COIN, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) + EndLoop + EndIf + EndIf + IfEq(LVarA, NPC_FireBar_3A) + IfEq(AF_KZN11_FireBar3_Coins, FALSE) + Set(AF_KZN11_FireBar3_Coins, TRUE) + Loop(10) + Call(MakeItemEntity, ITEM_COIN, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) + EndLoop + EndIf + EndIf + Call(RemoveEncounter, LVarA) + Return + End }; FireBarAISettings N(AISettings_FireBar_01) = { @@ -95,21 +95,21 @@ FireBarAISettings N(AISettings_FireBar_03) = { }; EvtScript N(EVS_NpcAI_FireBar_01) = { - EVT_CALL(N(FireBarAI_Main), EVT_PTR(N(AISettings_FireBar_01))) - EVT_RETURN - EVT_END + Call(N(FireBarAI_Main), Ref(N(AISettings_FireBar_01))) + Return + End }; EvtScript N(EVS_NpcAI_FireBar_02) = { - EVT_CALL(N(FireBarAI_Main), EVT_PTR(N(AISettings_FireBar_02))) - EVT_RETURN - EVT_END + Call(N(FireBarAI_Main), Ref(N(AISettings_FireBar_02))) + Return + End }; EvtScript N(EVS_NpcAI_FireBar_03) = { - EVT_CALL(N(FireBarAI_Main), EVT_PTR(N(AISettings_FireBar_03))) - EVT_RETURN - EVT_END + Call(N(FireBarAI_Main), Ref(N(AISettings_FireBar_03))) + Return + End }; NpcSettings N(NpcSettings_FireBar_01) = { diff --git a/src/world/area_kzn/kzn_17/kzn_17_1_main.c b/src/world/area_kzn/kzn_17/kzn_17_1_main.c index 9768a1cda0c..2586df33446 100644 --- a/src/world/area_kzn/kzn_17/kzn_17_1_main.c +++ b/src/world/area_kzn/kzn_17/kzn_17_1_main.c @@ -6,30 +6,30 @@ EvtScript N(EVS_ExitWalk_kzn_11_1) = EVT_EXIT_WALK(60, kzn_17_ENTRY_0, "kzn_11", EvtScript N(EVS_ExitWalk_kzn_18_0) = EVT_EXIT_WALK(60, kzn_17_ENTRY_1, "kzn_18", kzn_18_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kzn_11_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kzn_18_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kzn_11_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kzn_18_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_LAVALAVA) - EVT_CALL(SetSpriteShading, SHADING_KZN_17) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_CALL(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_1) - EVT_EXEC(N(EVS_SetupSpinyTromp)) - EVT_SET(LVar0, MODEL_kem1) - EVT_EXEC(N(EVS_StartTexPanner_SmokeLeft)) - EVT_SET(LVar0, MODEL_kem2) - EVT_EXEC(N(EVS_StartTexPanner_SmokeRight)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_LAVALAVA) + Call(SetSpriteShading, SHADING_KZN_17) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Call(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) + Call(PlayAmbientSounds, AMBIENT_LAVA_1) + Exec(N(EVS_SetupSpinyTromp)) + Set(LVar0, MODEL_kem1) + Exec(N(EVS_StartTexPanner_SmokeLeft)) + Set(LVar0, MODEL_kem2) + Exec(N(EVS_StartTexPanner_SmokeRight)) + Return + End }; diff --git a/src/world/area_kzn/kzn_17/kzn_17_2_entity.c b/src/world/area_kzn/kzn_17/kzn_17_2_entity.c index 180a9592d8f..740c9180c07 100644 --- a/src/world/area_kzn/kzn_17/kzn_17_2_entity.c +++ b/src/world/area_kzn/kzn_17/kzn_17_2_entity.c @@ -9,78 +9,78 @@ s32 N(Unused_80243610_3610)[] = { }; EvtScript N(EVS_OnBreakBlockA) = { - EVT_SET(GF_KZN17_Hammer3BlockA, TRUE) - EVT_RETURN - EVT_END + Set(GF_KZN17_Hammer3BlockA, TRUE) + Return + End }; EvtScript N(EVS_OnBreakBlockB) = { - EVT_SET(GF_KZN17_Hammer3BlockB, TRUE) - EVT_RETURN - EVT_END + Set(GF_KZN17_Hammer3BlockB, TRUE) + Return + End }; EvtScript N(EVS_OnBreakBlockC) = { - EVT_SET(GF_KZN17_Hammer3BlockC, TRUE) - EVT_RETURN - EVT_END + Set(GF_KZN17_Hammer3BlockC, TRUE) + Return + End }; EvtScript N(EVS_OnBreakBlockD) = { - EVT_SET(GF_KZN17_Hammer3BlockD, TRUE) - EVT_RETURN - EVT_END + Set(GF_KZN17_Hammer3BlockD, TRUE) + Return + End }; EvtScript N(EVS_OnBreakBlockE) = { - EVT_SET(GF_KZN17_Hammer3BlockE, TRUE) - EVT_RETURN - EVT_END + Set(GF_KZN17_Hammer3BlockE, TRUE) + Return + End }; EvtScript N(EVS_OnBreakBlockF) = { - EVT_SET(GF_KZN17_Hammer3BlockF, TRUE) - EVT_RETURN - EVT_END + Set(GF_KZN17_Hammer3BlockF, TRUE) + Return + End }; EvtScript N(EVS_OnBreakBlockG) = { - EVT_SET(GF_KZN17_Hammer3BlockG, TRUE) - EVT_RETURN - EVT_END + Set(GF_KZN17_Hammer3BlockG, TRUE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_KZN17_Hammer3BlockA, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer3Block), -195, 50, 27, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBreakBlockA))) - EVT_END_IF - EVT_IF_EQ(GF_KZN17_Hammer3BlockB, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer3Block), -245, 60, 27, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBreakBlockB))) - EVT_END_IF - EVT_IF_EQ(GF_KZN17_Hammer3BlockC, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer3Block), -295, 70, 27, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBreakBlockC))) - EVT_END_IF - EVT_IF_EQ(GF_KZN17_Hammer3BlockD, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer3Block), -345, 80, 27, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBreakBlockD))) - EVT_END_IF - EVT_IF_EQ(GF_KZN17_Hammer3BlockE, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer3Block), -395, 90, 27, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBreakBlockE))) - EVT_END_IF - EVT_IF_EQ(GF_KZN17_Hammer3BlockF, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer3Block), -445, 100, 27, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBreakBlockF))) - EVT_END_IF - EVT_IF_EQ(GF_KZN17_Hammer3BlockG, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer3Block), -495, 110, 27, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBreakBlockG))) - EVT_END_IF - EVT_CALL(CreatePushBlockGrid, 0, 29, 2, -119, -3, 5, 0) - EVT_CALL(SetPushBlock, 0, 28, 1, PUSH_GRID_BLOCK) - EVT_RETURN - EVT_END + IfEq(GF_KZN17_Hammer3BlockA, FALSE) + Call(MakeEntity, Ref(Entity_Hammer3Block), -195, 50, 27, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnBreakBlockA))) + EndIf + IfEq(GF_KZN17_Hammer3BlockB, FALSE) + Call(MakeEntity, Ref(Entity_Hammer3Block), -245, 60, 27, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnBreakBlockB))) + EndIf + IfEq(GF_KZN17_Hammer3BlockC, FALSE) + Call(MakeEntity, Ref(Entity_Hammer3Block), -295, 70, 27, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnBreakBlockC))) + EndIf + IfEq(GF_KZN17_Hammer3BlockD, FALSE) + Call(MakeEntity, Ref(Entity_Hammer3Block), -345, 80, 27, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnBreakBlockD))) + EndIf + IfEq(GF_KZN17_Hammer3BlockE, FALSE) + Call(MakeEntity, Ref(Entity_Hammer3Block), -395, 90, 27, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnBreakBlockE))) + EndIf + IfEq(GF_KZN17_Hammer3BlockF, FALSE) + Call(MakeEntity, Ref(Entity_Hammer3Block), -445, 100, 27, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnBreakBlockF))) + EndIf + IfEq(GF_KZN17_Hammer3BlockG, FALSE) + Call(MakeEntity, Ref(Entity_Hammer3Block), -495, 110, 27, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnBreakBlockG))) + EndIf + Call(CreatePushBlockGrid, 0, 29, 2, -119, -3, 5, 0) + Call(SetPushBlock, 0, 28, 1, PUSH_GRID_BLOCK) + Return + End }; diff --git a/src/world/area_kzn/kzn_17/kzn_17_3_npc.c b/src/world/area_kzn/kzn_17/kzn_17_3_npc.c index 87b19e94499..9956f864645 100644 --- a/src/world/area_kzn/kzn_17/kzn_17_3_npc.c +++ b/src/world/area_kzn/kzn_17/kzn_17_3_npc.c @@ -33,104 +33,104 @@ Vec3f N(KoloradoThrownPath)[] = { }; EvtScript N(EVS_Kolorado_TrompPanic) = { - EVT_CALL(SetNpcPos, NPC_Kolorado, 447, 0, 39) - EVT_CALL(SetNpcYaw, NPC_Kolorado, 270) - EVT_CALL(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Panic) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Kolorado, 447, 0, 39) + Call(SetNpcYaw, NPC_Kolorado, 270) + Call(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Panic) + Return + End }; EvtScript N(EVS_Kolorado_TrompImpact) = { - EVT_CALL(SetEnemyFlagBits, NPC_Kolorado, ENEMY_FLAG_400000, 1) - EVT_CALL(SetNpcRotationPivot, NPC_Kolorado, 13) - EVT_CALL(SetNpcRotation, NPC_Kolorado, 0, 0, 250) - EVT_CALL(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_HurtStill) - EVT_CALL(SetNpcImgFXParams, NPC_Kolorado, IMGFX_SET_WAVY, EVT_FLOAT(3.0), EVT_FLOAT(3.0), 0, 0) - EVT_CALL(PlaySoundAtNpc, NPC_Kolorado, SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_CALL(SetNpcCollisionSize, NPC_Kolorado, 20, 24) - EVT_CALL(LoadPath, 30, EVT_PTR(N(KoloradoThrownPath)), ARRAY_COUNT(N(KoloradoThrownPath)), EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Kolorado, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Kolorado, ANIM_Kolorado_HurtStill, ANIM_Kolorado_HurtStill, 5, MSG_CH5_00F9) - EVT_RETURN - EVT_END + Call(SetEnemyFlagBits, NPC_Kolorado, ENEMY_FLAG_400000, 1) + Call(SetNpcRotationPivot, NPC_Kolorado, 13) + Call(SetNpcRotation, NPC_Kolorado, 0, 0, 250) + Call(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_HurtStill) + Call(SetNpcImgFXParams, NPC_Kolorado, IMGFX_SET_WAVY, Float(3.0), Float(3.0), 0, 0) + Call(PlaySoundAtNpc, NPC_Kolorado, SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_DEFAULT) + Thread + Call(SetNpcCollisionSize, NPC_Kolorado, 20, 24) + Call(LoadPath, 30, Ref(N(KoloradoThrownPath)), ARRAY_COUNT(N(KoloradoThrownPath)), EASING_LINEAR) + Label(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Kolorado, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(0) + EndIf + EndThread + Call(SpeakToPlayer, NPC_Kolorado, ANIM_Kolorado_HurtStill, ANIM_Kolorado_HurtStill, 5, MSG_CH5_00F9) + Return + End }; EvtScript N(EVS_Kolorado_HurtInit) = { - EVT_CALL(SetNpcPos, NPC_Kolorado, 447, 0, 70) - EVT_CALL(SetNpcYaw, NPC_Kolorado, 270) - EVT_CALL(SetEnemyFlagBits, NPC_Kolorado, ENEMY_FLAG_400000, 1) - EVT_CALL(SetNpcRotationPivot, NPC_Kolorado, 13) - EVT_CALL(SetNpcRotation, NPC_Kolorado, 0, 0, 250) - EVT_CALL(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_HurtStill) - EVT_CALL(SetNpcImgFXParams, NPC_Kolorado, IMGFX_SET_WAVY, EVT_FLOAT(3.0), EVT_FLOAT(3.0), 0, 0) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Kolorado, 447, 0, 70) + Call(SetNpcYaw, NPC_Kolorado, 270) + Call(SetEnemyFlagBits, NPC_Kolorado, ENEMY_FLAG_400000, 1) + Call(SetNpcRotationPivot, NPC_Kolorado, 13) + Call(SetNpcRotation, NPC_Kolorado, 0, 0, 250) + Call(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_HurtStill) + Call(SetNpcImgFXParams, NPC_Kolorado, IMGFX_SET_WAVY, Float(3.0), Float(3.0), 0, 0) + Return + End }; EvtScript N(EVS_NpcIdle_Kolorado) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 605) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH5_00F7, 160, 40) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, 290, 0, 30) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(5.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) - EVT_CALL(NpcMoveTo, NPC_SELF, 640, 80, 0) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Yell) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Yell, 0, MSG_CH5_00F8) - EVT_SET(GB_StoryProgress, STORY_CH5_KOLORADO_AT_DEAD_END) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, 605) + Wait(1) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_CH5_00F7, 160, 40) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcPos, NPC_SELF, 290, 0, 30) + Call(SetNpcSpeed, NPC_SELF, Float(5.0 / DT)) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) + Call(NpcMoveTo, NPC_SELF, 640, 80, 0) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Yell) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Yell, 0, MSG_CH5_00F8) + Set(GB_StoryProgress, STORY_CH5_KOLORADO_AT_DEAD_END) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_Kolorado) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH5_HIDDEN_PASSAGE_OPEN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Yell, 0, MSG_CH5_00FC) - EVT_EXEC_WAIT(N(EVS_LetterPrompt_Kolorado1)) - EVT_EXEC_WAIT(N(EVS_LetterReward_Kolorado)) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_HurtStill, 5, MSG_CH5_00FA) - EVT_EXEC_WAIT(N(EVS_LetterPrompt_Kolorado2)) - EVT_EXEC_WAIT(N(EVS_LetterReward_Kolorado)) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH5_HIDDEN_PASSAGE_OPEN) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Yell, 0, MSG_CH5_00FC) + ExecWait(N(EVS_LetterPrompt_Kolorado1)) + ExecWait(N(EVS_LetterReward_Kolorado)) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_HurtStill, 5, MSG_CH5_00FA) + ExecWait(N(EVS_LetterPrompt_Kolorado2)) + ExecWait(N(EVS_LetterReward_Kolorado)) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Kolorado) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Kolorado))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_KOLORADO_AT_DEAD_END) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Kolorado))) - EVT_RETURN - EVT_CASE_LT(STORY_CH5_HIDDEN_PASSAGE_OPEN) - EVT_CALL(SetNpcPos, NPC_SELF, 640, 0, 80) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Yell) - EVT_RETURN - EVT_CASE_EQ(STORY_CH5_HIDDEN_PASSAGE_OPEN) - EVT_CALL(SetNpcCollisionSize, NPC_Kolorado, 20, 24) - EVT_EXEC(N(EVS_Kolorado_HurtInit)) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Kolorado))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_KOLORADO_AT_DEAD_END) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Kolorado))) + Return + CaseLt(STORY_CH5_HIDDEN_PASSAGE_OPEN) + Call(SetNpcPos, NPC_SELF, 640, 0, 80) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Yell) + Return + CaseEq(STORY_CH5_HIDDEN_PASSAGE_OPEN) + Call(SetNpcCollisionSize, NPC_Kolorado, 20, 24) + Exec(N(EVS_Kolorado_HurtInit)) + Return + CaseDefault + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; NpcData N(NpcData_Kolorado) = { diff --git a/src/world/area_kzn/kzn_17/kzn_17_4_tromp.c b/src/world/area_kzn/kzn_17/kzn_17_4_tromp.c index de599d94def..593d1d28979 100644 --- a/src/world/area_kzn/kzn_17/kzn_17_4_tromp.c +++ b/src/world/area_kzn/kzn_17/kzn_17_4_tromp.c @@ -7,149 +7,149 @@ #include "../common/SpinyTromp.inc.c" EvtScript N(EVS_SpinyTromp_ManageCamera) = { - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 500) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(10.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_LOOP(0) - EVT_IF_EQ(AF_KZN_Tromp2_ShakingDone, FALSE) - EVT_IF_LT(MV_TrompPosX, 550) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(MV_TrompPosX, LVar0) - EVT_ADD(LVar0, MV_TrompPosX) - EVT_DIV(LVar0, 2) - EVT_ELSE - EVT_SET(LVar0, MV_TrompPosX) - EVT_END_IF - EVT_ADD(LVar1, 55) - EVT_SET(LVar2, LVar1) - EVT_CALL(N(UnkFunc46)) - EVT_SUB(LVar2, 55) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar2, 30) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Call(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetCamDistance, CAM_DEFAULT, 500) + Call(SetCamSpeed, CAM_DEFAULT, Float(10.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Loop(0) + IfEq(AF_KZN_Tromp2_ShakingDone, FALSE) + IfLt(MV_TrompPosX, 550) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(MV_TrompPosX, LVar0) + Add(LVar0, MV_TrompPosX) + Div(LVar0, 2) + Else + Set(LVar0, MV_TrompPosX) + EndIf + Add(LVar1, 55) + Set(LVar2, LVar1) + Call(N(UnkFunc46)) + Sub(LVar2, 55) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar2, 30) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndIf + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_SpinyTromp_ShakeCam) = { - EVT_LOOP(0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30, EVT_FLOAT(1.0)) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(ShakeCam, CAM_DEFAULT, 0, 30, Float(1.0)) + EndLoop + Return + End }; EvtScript N(EVS_SetupSpinyTromp) = { - EVT_SET_GROUP(EVT_GROUP_EF) - EVT_IF_GE(GB_StoryProgress, STORY_CH5_HIDDEN_PASSAGE_OPEN) - EVT_CALL(SetGroupVisibility, MODEL_goron, MODEL_GROUP_HIDDEN) - EVT_CALL(EnableModel, MODEL_me, FALSE) - EVT_CALL(EnableModel, MODEL_mae, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_gogo, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END_IF - EVT_CALL(EnableModel, MODEL_ato, FALSE) - EVT_SET(AF_KZN_Tromp2_HitKolorado, FALSE) - EVT_SET(AF_KZN_Tromp2_ShakingDone, FALSE) - EVT_SET(AF_KZN_TrompHitPlayer, FALSE) - EVT_SET(AF_KZN_TrompRollingDone, FALSE) - EVT_SET(AF_KZN_Tromp2_StopPlayer, FALSE) - EVT_SET(LVar0, -583) - EVT_SET(LVar2, 165) - EVT_CALL(TranslateGroup, MODEL_goron, LVar0, LVar2, 30) - EVT_CALL(TranslateModel, MODEL_me, LVar0, LVar2, 30) - EVT_LABEL(0) - EVT_WAIT(1) - EVT_IF_EQ(GF_KZN17_Hammer3BlockG, FALSE) - EVT_GOTO(0) - EVT_END_IF - EVT_EXEC_GET_TID(N(EVS_SpinyTromp_ManageCamera), LVarA) - EVT_EXEC(N(EVS_Kolorado_TrompPanic)) - EVT_EXEC_GET_TID(N(EVS_SpinyTromp_ShakeCam), MV_ScreenShakeTID) - EVT_CALL(PlaySound, SOUND_LOOP_TROMP_ROLL) - EVT_SET(LVar3, 0) - EVT_CALL(MakeLerp, -583, 750, 270, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(UnkFunc46)) - EVT_CALL(N(UnkFunc51), LVar0, LVar1, LVar2) - EVT_SET(MV_TrompPosX, LVar0) - EVT_ADD(MV_TrompPosX, 20) - EVT_CALL(TranslateGroup, MODEL_goron, LVar0, LVar2, 30) - EVT_CALL(TranslateModel, MODEL_me, LVar0, LVar2, 30) - EVT_CALL(RotateGroup, MODEL_goron, LVar3, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_me, LVar3, 0, 0, 1) - EVT_CALL(N(UnkFunc49)) - EVT_CALL(TranslateModel, MODEL_me, LVar5, LVar6, 30) - EVT_CALL(N(UnkFunc50)) - EVT_IF_EQ(AF_KZN_Tromp2_StopPlayer, FALSE) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar3, LVar1, LVar2) - EVT_SUB(LVar3, 20) - EVT_IF_LT(LVar3, LVar0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(AF_KZN_Tromp2_StopPlayer, TRUE) - EVT_LABEL(12) - EVT_WAIT(1) - EVT_IF_NE(AF_KZN_Tromp2_StopPlayer, FALSE) - EVT_GOTO(12) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_END_THREAD - EVT_END_IF - EVT_IF_EQ(AF_KZN_Tromp2_HitKolorado, FALSE) - EVT_IF_GT(LVar0, 430) - EVT_EXEC(N(EVS_Kolorado_TrompImpact)) - EVT_SET(AF_KZN_Tromp2_HitKolorado, TRUE) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(AF_KZN_Tromp2_ShakingDone, FALSE) - EVT_IF_GT(LVar0, 630) - EVT_KILL_THREAD(MV_ScreenShakeTID) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_gogo, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlaySoundAtCollider, COLLIDER_gogo, SOUND_TROMP_CRASH, SOUND_SPACE_DEFAULT) - EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 2, 32, 32, 1, 10, 45) - EVT_CALL(EnableModel, MODEL_mae, FALSE) - EVT_CALL(EnableModel, MODEL_ato, TRUE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(1.7)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.5)) - EVT_END_THREAD - EVT_SET(AF_KZN_Tromp2_ShakingDone, TRUE) - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(N(SpinyTromp_CheckDist)) - EVT_IF_LT(LVar4, 80) - EVT_IF_EQ(AF_KZN_TrompHitPlayer, FALSE) - EVT_CALL(N(SpinyTromp_GetActingPartner)) - EVT_IF_NE(LVar0, PARTNER_BOW) - EVT_SET(AF_KZN_TrompHitPlayer, TRUE) - EVT_EXEC(N(D_80240D10_C7EE90)) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(GB_StoryProgress, STORY_CH5_HIDDEN_PASSAGE_OPEN) - EVT_WAIT(50) - EVT_CALL(StopSound, SOUND_LOOP_TROMP_ROLL) - EVT_CALL(SetGroupVisibility, MODEL_goron, MODEL_GROUP_HIDDEN) - EVT_CALL(EnableModel, MODEL_me, FALSE) - EVT_KILL_THREAD(LVarA) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_SET(AF_KZN_Tromp2_StopPlayer, FALSE) - EVT_SET(AF_KZN_TrompRollingDone, TRUE) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_EF) + IfGe(GB_StoryProgress, STORY_CH5_HIDDEN_PASSAGE_OPEN) + Call(SetGroupVisibility, MODEL_goron, MODEL_GROUP_HIDDEN) + Call(EnableModel, MODEL_me, FALSE) + Call(EnableModel, MODEL_mae, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_gogo, COLLIDER_FLAGS_UPPER_MASK) + Return + EndIf + Call(EnableModel, MODEL_ato, FALSE) + Set(AF_KZN_Tromp2_HitKolorado, FALSE) + Set(AF_KZN_Tromp2_ShakingDone, FALSE) + Set(AF_KZN_TrompHitPlayer, FALSE) + Set(AF_KZN_TrompRollingDone, FALSE) + Set(AF_KZN_Tromp2_StopPlayer, FALSE) + Set(LVar0, -583) + Set(LVar2, 165) + Call(TranslateGroup, MODEL_goron, LVar0, LVar2, 30) + Call(TranslateModel, MODEL_me, LVar0, LVar2, 30) + Label(0) + Wait(1) + IfEq(GF_KZN17_Hammer3BlockG, FALSE) + Goto(0) + EndIf + ExecGetTID(N(EVS_SpinyTromp_ManageCamera), LVarA) + Exec(N(EVS_Kolorado_TrompPanic)) + ExecGetTID(N(EVS_SpinyTromp_ShakeCam), MV_ScreenShakeTID) + Call(PlaySound, SOUND_LOOP_TROMP_ROLL) + Set(LVar3, 0) + Call(MakeLerp, -583, 750, 270, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(N(UnkFunc46)) + Call(N(UnkFunc51), LVar0, LVar1, LVar2) + Set(MV_TrompPosX, LVar0) + Add(MV_TrompPosX, 20) + Call(TranslateGroup, MODEL_goron, LVar0, LVar2, 30) + Call(TranslateModel, MODEL_me, LVar0, LVar2, 30) + Call(RotateGroup, MODEL_goron, LVar3, 0, 0, 1) + Call(RotateModel, MODEL_me, LVar3, 0, 0, 1) + Call(N(UnkFunc49)) + Call(TranslateModel, MODEL_me, LVar5, LVar6, 30) + Call(N(UnkFunc50)) + IfEq(AF_KZN_Tromp2_StopPlayer, FALSE) + Thread + Call(GetPlayerPos, LVar3, LVar1, LVar2) + Sub(LVar3, 20) + IfLt(LVar3, LVar0) + Call(DisablePlayerInput, TRUE) + Set(AF_KZN_Tromp2_StopPlayer, TRUE) + Label(12) + Wait(1) + IfNe(AF_KZN_Tromp2_StopPlayer, FALSE) + Goto(12) + EndIf + Call(DisablePlayerInput, FALSE) + EndIf + EndThread + EndIf + IfEq(AF_KZN_Tromp2_HitKolorado, FALSE) + IfGt(LVar0, 430) + Exec(N(EVS_Kolorado_TrompImpact)) + Set(AF_KZN_Tromp2_HitKolorado, TRUE) + EndIf + EndIf + IfEq(AF_KZN_Tromp2_ShakingDone, FALSE) + IfGt(LVar0, 630) + KillThread(MV_ScreenShakeTID) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_gogo, COLLIDER_FLAGS_UPPER_MASK) + Call(PlaySoundAtCollider, COLLIDER_gogo, SOUND_TROMP_CRASH, SOUND_SPACE_DEFAULT) + PlayEffect(EFFECT_BOMBETTE_BREAKING, 2, 32, 32, 1, 10, 45) + Call(EnableModel, MODEL_mae, FALSE) + Call(EnableModel, MODEL_ato, TRUE) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 20, Float(3.0)) + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(1.7)) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(0.5)) + EndThread + Set(AF_KZN_Tromp2_ShakingDone, TRUE) + EndIf + EndIf + Wait(1) + Call(N(SpinyTromp_CheckDist)) + IfLt(LVar4, 80) + IfEq(AF_KZN_TrompHitPlayer, FALSE) + Call(N(SpinyTromp_GetActingPartner)) + IfNe(LVar0, PARTNER_BOW) + Set(AF_KZN_TrompHitPlayer, TRUE) + Exec(N(D_80240D10_C7EE90)) + EndIf + EndIf + EndIf + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Set(GB_StoryProgress, STORY_CH5_HIDDEN_PASSAGE_OPEN) + Wait(50) + Call(StopSound, SOUND_LOOP_TROMP_ROLL) + Call(SetGroupVisibility, MODEL_goron, MODEL_GROUP_HIDDEN) + Call(EnableModel, MODEL_me, FALSE) + KillThread(LVarA) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Set(AF_KZN_Tromp2_StopPlayer, FALSE) + Set(AF_KZN_TrompRollingDone, TRUE) + Return + End }; diff --git a/src/world/area_kzn/kzn_18/kzn_18_1_main.c b/src/world/area_kzn/kzn_18/kzn_18_1_main.c index 620461cb116..cf1e55e6036 100644 --- a/src/world/area_kzn/kzn_18/kzn_18_1_main.c +++ b/src/world/area_kzn/kzn_18/kzn_18_1_main.c @@ -10,44 +10,44 @@ EvtScript N(EVS_ExitWalk_kzn_19_0) = EVT_EXIT_WALK(60, kzn_18_ENTRY_1, "kzn_19", EvtScript N(EVS_ExitWalk_kzn_19_1) = EVT_EXIT_WALK(60, kzn_18_ENTRY_2, "kzn_19", kzn_19_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(N(EVS_ExitWalk_kzn_17_1), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) - EVT_BIND_TRIGGER(N(EVS_ExitWalk_kzn_19_0), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_BIND_TRIGGER(N(EVS_ExitWalk_kzn_19_1), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(N(EVS_ExitWalk_kzn_17_1), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) + BindTrigger(N(EVS_ExitWalk_kzn_19_0), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + BindTrigger(N(EVS_ExitWalk_kzn_19_1), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + Return + End }; EvtScript N(EVS_StartTexPanners_Lava) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(EnableTexPanning, MODEL_yougan1_1, TRUE) - EVT_CALL(EnableTexPanning, MODEL_off1, TRUE) - EVT_CALL(EnableTexPanning, MODEL_toro, TRUE) - EVT_CALL(EnableTexPanning, MODEL_poko, TRUE) - EVT_THREAD + SetGroup(EVT_GROUP_00) + Call(EnableTexPanning, MODEL_yougan1_1, TRUE) + Call(EnableTexPanning, MODEL_off1, TRUE) + Call(EnableTexPanning, MODEL_toro, TRUE) + Call(EnableTexPanning, MODEL_poko, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( 200, 0, 400, -100) TEX_PAN_PARAMS_FREQ( 1, 0, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_5) TEX_PAN_PARAMS_STEP( 300, -500, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread // animate lava bubbles (real ones, not the enemies) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, LVar0, 0) - EVT_ADD(LVar0, 0x8000) - EVT_WAIT(6) - EVT_END_LOOP - EVT_END_THREAD - EVT_RETURN - EVT_END + Set(LVar0, 0) + Loop(0) + Call(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, LVar0, 0) + Add(LVar0, 0x8000) + Wait(6) + EndLoop + EndThread + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -56,46 +56,46 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar0, N(EVS_BindExitTriggers)) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Set(LVar0, N(EVS_BindExitTriggers)) + Exec(EnterWalk) + Wait(1) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_LAVALAVA) - EVT_CALL(SetSpriteShading, SHADING_KZN_18) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_CALL(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_1) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) - EVT_CALL(EnableModel, MODEL_off1, FALSE) - EVT_CALL(EnableModel, MODEL_o506, FALSE) - EVT_CALL(EnableModel, MODEL_o509, FALSE) - EVT_CALL(EnableModel, MODEL_o511, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_off1, COLLIDER_FLAGS_UPPER_MASK) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_off2, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_off1, SURFACE_TYPE_LAVA) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_EXEC(N(EVS_StartTexPanners_Lava)) - EVT_SET(LVar0, MODEL_kem1) - EVT_EXEC(N(EVS_StartTexPanner_SmokeLeft)) - EVT_SET(LVar0, MODEL_kem2) - EVT_EXEC(N(EVS_StartTexPanner_SmokeRight)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_LAVALAVA) + Call(SetSpriteShading, SHADING_KZN_18) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_EnterMap)) + Call(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) + Call(PlayAmbientSounds, AMBIENT_LAVA_1) + IfLt(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) + Call(EnableModel, MODEL_off1, FALSE) + Call(EnableModel, MODEL_o506, FALSE) + Call(EnableModel, MODEL_o509, FALSE) + Call(EnableModel, MODEL_o511, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_off1, COLLIDER_FLAGS_UPPER_MASK) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_off2, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_off1, SURFACE_TYPE_LAVA) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + Exec(N(EVS_StartTexPanners_Lava)) + Set(LVar0, MODEL_kem1) + Exec(N(EVS_StartTexPanner_SmokeLeft)) + Set(LVar0, MODEL_kem2) + Exec(N(EVS_StartTexPanner_SmokeRight)) + Return + End }; diff --git a/src/world/area_kzn/kzn_18/kzn_18_2_npc.c b/src/world/area_kzn/kzn_18/kzn_18_2_npc.c index 300b8a9dea3..8acb1785ae7 100644 --- a/src/world/area_kzn/kzn_18/kzn_18_2_npc.c +++ b/src/world/area_kzn/kzn_18/kzn_18_2_npc.c @@ -8,139 +8,139 @@ #include "world/common/todo/GetFloorCollider.inc.c" EvtScript N(EVS_NpcIdle_Kolorado) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH5_KOLORADO_RAN_AHEAD) - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, -125) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_SET(GB_StoryProgress, STORY_CH5_KOLORADO_RAN_AHEAD) - EVT_CALL(SetNpcPos, NPC_SELF, -280, 250, -360) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar2, -340) - EVT_SET(LVar2, -320) - EVT_ELSE - EVT_SET(LVar2, -360) - EVT_END_IF - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(10.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_SELF, 185, LVar2, 0) - EVT_CALL(NpcFacePlayer, NPC_SELF, 4) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, 185, 250, -340) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_END_IF - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(N(GetFloorCollider), LVar0) - EVT_IF_EQ(LVar0, COLLIDER_o442) - EVT_BREAK_LOOP - EVT_END_IF - EVT_IF_EQ(LVar0, COLLIDER_o405) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Yell, 0, MSG_CH5_00FD) - EVT_WAIT(15 * DT) - EVT_SET(MV_KoloradoJumpDone, FALSE) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.0)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 10 * DT) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_SET(MV_KoloradoJumpDone, TRUE) - EVT_END_THREAD - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_00FE) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_EQ(MV_KoloradoJumpDone, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 420, 250, -350) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Run) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(5.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_SELF, 530, -360, 0) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_WAIT(15 * DT) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_SET(GB_StoryProgress, STORY_CH5_KOLORADO_IN_TREASURE_ROOM) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH5_KOLORADO_RAN_AHEAD) + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, -125) + Wait(1) + Goto(0) + EndIf + Set(GB_StoryProgress, STORY_CH5_KOLORADO_RAN_AHEAD) + Call(SetNpcPos, NPC_SELF, -280, 250, -360) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar2, -340) + Set(LVar2, -320) + Else + Set(LVar2, -360) + EndIf + Call(SetNpcSpeed, NPC_SELF, Float(10.0 / DT)) + Call(NpcMoveTo, NPC_SELF, 185, LVar2, 0) + Call(NpcFacePlayer, NPC_SELF, 4) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) + Else + Call(SetNpcPos, NPC_SELF, 185, 250, -340) + Call(SetNpcYaw, NPC_SELF, 270) + EndIf + Loop(0) + Wait(1) + Call(N(GetFloorCollider), LVar0) + IfEq(LVar0, COLLIDER_o442) + BreakLoop + EndIf + IfEq(LVar0, COLLIDER_o405) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, TRUE) + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Call(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-7.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Yell, 0, MSG_CH5_00FD) + Wait(15 * DT) + Set(MV_KoloradoJumpDone, FALSE) + Thread + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_SELF, Float(2.0)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 10 * DT) + Call(SetNpcYaw, NPC_SELF, 90) + Set(MV_KoloradoJumpDone, TRUE) + EndThread + Call(ContinueSpeech, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_00FE) + Loop(0) + Wait(1) + IfEq(MV_KoloradoJumpDone, TRUE) + BreakLoop + EndIf + EndLoop + Call(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetPanTarget, CAM_DEFAULT, 420, 250, -350) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Run) + Call(SetNpcSpeed, NPC_SELF, Float(5.0 / DT)) + Call(NpcMoveTo, NPC_SELF, 530, -360, 0) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Wait(15 * DT) + Call(ResetCam, CAM_DEFAULT, Float(3.0 / DT)) + Set(GB_StoryProgress, STORY_CH5_KOLORADO_IN_TREASURE_ROOM) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Kolorado) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH5_KOLORADO_IN_TREASURE_ROOM) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Kolorado))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH5_KOLORADO_IN_TREASURE_ROOM) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Kolorado))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcIdle_Piranha) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar1, 100) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_LT(LVar0, 100) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(DisableCameraLeadingPlayer)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 285, 25, 35) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 400) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.5 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcPos, NPC_SELF, 285, 25, 35) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_LargePiranha_Putrid_Anim17) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_LargePiranha_Putrid_Anim01) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_LargePiranha_Putrid_Anim04, ANIM_LargePiranha_Putrid_Anim01, 0, MSG_CH5_00FF) - EVT_WAIT(10 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_BURROW_DIG, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_LargePiranha_Putrid_Anim18) - EVT_WAIT(25 * DT) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(N(EnableCameraLeadingPlayer)) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_SET(GF_KZN18_IntruderAlert, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar1, 100) + Goto(0) + EndIf + IfLt(LVar0, 100) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Call(N(DisableCameraLeadingPlayer)) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, 285, 25, 35) + Call(SetCamDistance, CAM_DEFAULT, 400) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.5 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(SetNpcPos, NPC_SELF, 285, 25, 35) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_SELF, ANIM_LargePiranha_Putrid_Anim17) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_LargePiranha_Putrid_Anim01) + Call(SpeakToPlayer, NPC_SELF, ANIM_LargePiranha_Putrid_Anim04, ANIM_LargePiranha_Putrid_Anim01, 0, MSG_CH5_00FF) + Wait(10 * DT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_BURROW_DIG, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_SELF, ANIM_LargePiranha_Putrid_Anim18) + Wait(25 * DT) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(N(EnableCameraLeadingPlayer)) + Call(ResetCam, CAM_DEFAULT, Float(3.0 / DT)) + Set(GF_KZN18_IntruderAlert, TRUE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Piranha) = { - EVT_IF_EQ(GF_KZN18_IntruderAlert, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Piranha))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_KZN18_IntruderAlert, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Piranha))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_Kolorado) = { diff --git a/src/world/area_kzn/kzn_18/kzn_18_3_entity.c b/src/world/area_kzn/kzn_18/kzn_18_3_entity.c index 5051a0e0563..a610b71a2a2 100644 --- a/src/world/area_kzn/kzn_18/kzn_18_3_entity.c +++ b/src/world/area_kzn/kzn_18/kzn_18_3_entity.c @@ -2,10 +2,10 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 250, 250, -225, 0, MODEL_o380, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_KZN18_HiddenPanel) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), -420, 85, -80, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), 350, 310, -250, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HiddenPanel), 250, 250, -225, 0, MODEL_o380, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_KZN18_HiddenPanel) + Call(MakeEntity, Ref(Entity_SavePoint), -420, 85, -80, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HeartBlock), 350, 310, -250, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_kzn/kzn_19/kzn_19_1_music.c b/src/world/area_kzn/kzn_19/kzn_19_1_music.c index 3ac45c73494..4b10dcc2263 100644 --- a/src/world/area_kzn/kzn_19/kzn_19_1_music.c +++ b/src/world/area_kzn/kzn_19/kzn_19_1_music.c @@ -1,20 +1,20 @@ #include "kzn_19.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_CH5_DEFEATED_LAVA_PIRANHA) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kzn_19_ENTRY_1) - EVT_CALL(FadeOutMusic, 0, 500) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_1) - EVT_RETURN - EVT_END_IF - EVT_END_IF //@bug extra endif - EVT_CASE_GE(STORY_CH5_MT_LAVA_LAVA_ERUPTING) - EVT_CALL(PlaySound, SOUND_LOOP_RUMBLE) - EVT_END_SWITCH - EVT_CALL(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_1) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseEq(STORY_CH5_DEFEATED_LAVA_PIRANHA) + Call(GetEntryID, LVar0) + IfEq(LVar0, kzn_19_ENTRY_1) + Call(FadeOutMusic, 0, 500) + Call(PlayAmbientSounds, AMBIENT_LAVA_1) + Return + EndIf + EndIf //@bug extra endif + CaseGe(STORY_CH5_MT_LAVA_LAVA_ERUPTING) + Call(PlaySound, SOUND_LOOP_RUMBLE) + EndSwitch + Call(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) + Call(PlayAmbientSounds, AMBIENT_LAVA_1) + Return + End }; diff --git a/src/world/area_kzn/kzn_19/kzn_19_2_main.c b/src/world/area_kzn/kzn_19/kzn_19_2_main.c index f4b7d24fa1f..6513901d106 100644 --- a/src/world/area_kzn/kzn_19/kzn_19_2_main.c +++ b/src/world/area_kzn/kzn_19/kzn_19_2_main.c @@ -8,82 +8,82 @@ EvtScript N(EVS_TrySpawningStarCard) = { // determine if card should be spawned - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_CH5_KOLORADO_IN_TREASURE_ROOM) - EVT_SET(LVar0, FALSE) - EVT_IF_EQ(MV_BossDefeated, FALSE) - EVT_RETURN - EVT_END_IF - EVT_SET(GB_StoryProgress, STORY_CH5_DEFEATED_LAVA_PIRANHA) - EVT_CASE_EQ(STORY_CH5_DEFEATED_LAVA_PIRANHA) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kzn_19_ENTRY_3) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar0, TRUE) - EVT_CASE_DEFAULT - EVT_RETURN - EVT_END_SWITCH - EVT_IF_EQ(LVar0, FALSE) + Switch(GB_StoryProgress) + CaseEq(STORY_CH5_KOLORADO_IN_TREASURE_ROOM) + Set(LVar0, FALSE) + IfEq(MV_BossDefeated, FALSE) + Return + EndIf + Set(GB_StoryProgress, STORY_CH5_DEFEATED_LAVA_PIRANHA) + CaseEq(STORY_CH5_DEFEATED_LAVA_PIRANHA) + Call(GetEntryID, LVar0) + IfEq(LVar0, kzn_19_ENTRY_3) + Return + EndIf + Set(LVar0, TRUE) + CaseDefault + Return + EndSwitch + IfEq(LVar0, FALSE) // card appearing scene - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 185, 110, -30) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.44)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 185, 55, -30) + Call(DisablePlayerInput, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, 185, 110, -30) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.44)) + Call(SetPanTarget, CAM_DEFAULT, 185, 55, -30) EVT_SPIRIT_ADJUST_CAM(10000) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(N(StarSpiritEffectFunc2), 4, 180, 304, 15, -54, 185, 110, -30, 55, 25) - EVT_THREAD - EVT_CALL(N(StarSpiritEffectFunc3)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(PlaySound, SOUND_LOOP_STAR_ORB_RISING) - EVT_CALL(N(StarSpiritEffectFunc1)) - EVT_CALL(StopSound, SOUND_LOOP_STAR_ORB_RISING) - EVT_CALL(PlaySoundAt, SOUND_STAR_ORB_BURST, SOUND_SPACE_DEFAULT, 185, 110, -30) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(45) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(180) - EVT_WAIT(115) - EVT_CALL(PlaySoundAt, SOUND_STAR_CARD_APPEARS, SOUND_SPACE_DEFAULT, 185, 110, -30) - EVT_END_THREAD - EVT_CALL(N(StarSpiritEffectFunc4), 1) - EVT_THREAD - EVT_WAIT(80) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_ADD(LVar1, 100) - EVT_CALL(SetCamDistance, CAM_DEFAULT, LVar1) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 185, 25, -30) - EVT_CALL(N(StarSpiritEffectFunc4), 2) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar2, LVar3, LVar4) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar2, LVar3, LVar4) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ELSE + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(N(StarSpiritEffectFunc2), 4, 180, 304, 15, -54, 185, 110, -30, 55, 25) + Thread + Call(N(StarSpiritEffectFunc3)) + EndThread + Thread + Wait(1) + Call(PlaySound, SOUND_LOOP_STAR_ORB_RISING) + Call(N(StarSpiritEffectFunc1)) + Call(StopSound, SOUND_LOOP_STAR_ORB_RISING) + Call(PlaySoundAt, SOUND_STAR_ORB_BURST, SOUND_SPACE_DEFAULT, 185, 110, -30) + EndThread + Thread + Wait(45) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + EndThread + Thread + Wait(180) + Wait(115) + Call(PlaySoundAt, SOUND_STAR_CARD_APPEARS, SOUND_SPACE_DEFAULT, 185, 110, -30) + EndThread + Call(N(StarSpiritEffectFunc4), 1) + Thread + Wait(80) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndThread + Add(LVar1, 100) + Call(SetCamDistance, CAM_DEFAULT, LVar1) + Call(SetPanTarget, CAM_DEFAULT, 185, 25, -30) + Call(N(StarSpiritEffectFunc4), 2) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Call(UseSettingsFrom, CAM_DEFAULT, LVar2, LVar3, LVar4) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar2, LVar3, LVar4) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Else // just make the card spawn - EVT_CALL(N(StarSpiritEffectFunc5), 4, 185, 55, -30, 25) - EVT_THREAD - EVT_CALL(N(StarSpiritEffectFunc6)) - EVT_END_THREAD - EVT_WAIT(1) - EVT_END_IF + Call(N(StarSpiritEffectFunc5), 4, 185, 55, -30, 25) + Thread + Call(N(StarSpiritEffectFunc6)) + EndThread + Wait(1) + EndIf // wait for pickup - EVT_CALL(N(StarSpiritEffectFunc4), 3) - EVT_CALL(PlaySoundAtPlayer, SOUND_RESCUE_STAR_SPIRIT, SOUND_SPACE_DEFAULT) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_23"), kmr_23_ENTRY_4, TRANSITION_GET_STAR_CARD) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(N(StarSpiritEffectFunc4), 3) + Call(PlaySoundAtPlayer, SOUND_RESCUE_STAR_SPIRIT, SOUND_SPACE_DEFAULT) + Call(DisablePlayerInput, TRUE) + Call(GotoMapSpecial, Ref("kmr_23"), kmr_23_ENTRY_4, TRANSITION_GET_STAR_CARD) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_kzn_18_1) = EVT_EXIT_WALK(60, kzn_19_ENTRY_0, "kzn_18", kzn_18_ENTRY_1); @@ -91,131 +91,131 @@ EvtScript N(EVS_ExitWalk_kzn_18_2) = EVT_EXIT_WALK(60, kzn_19_ENTRY_1, "kzn_18", EvtScript N(EVS_ExitWalk_kzn_20_0) = EVT_EXIT_WALK(60, kzn_19_ENTRY_2, "kzn_20", kzn_20_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kzn_18_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kzn_18_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kzn_20_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kzn_18_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kzn_18_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kzn_20_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + Return + End }; EvtScript N(EVS_StartTexPanners_Lava) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, MODEL_yougan1_1, TEX_PANNER_2) - EVT_CALL(EnableTexPanning, MODEL_toro, TRUE) - EVT_CALL(EnableTexPanning, MODEL_poko, TRUE) - EVT_CALL(SetTexPanner, MODEL_poko1, TEX_PANNER_E) - EVT_THREAD + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, MODEL_yougan1_1, TEX_PANNER_2) + Call(EnableTexPanning, MODEL_toro, TRUE) + Call(EnableTexPanning, MODEL_poko, TRUE) + Call(SetTexPanner, MODEL_poko1, TEX_PANNER_E) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( 200, 0, 400, -100) TEX_PAN_PARAMS_FREQ( 1, 0, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_5) TEX_PAN_PARAMS_STEP( 300, -500, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, LVar0, 0) - EVT_ADD(LVar0, 0x8000) - EVT_WAIT(6) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_E, TEX_PANNER_MAIN, LVar0, 0) - EVT_ADD(LVar0, 0x8000) - EVT_WAIT(4) - EVT_END_LOOP - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread + Set(LVar0, 0) + Loop(0) + Call(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, LVar0, 0) + Add(LVar0, 0x8000) + Wait(6) + EndLoop + EndThread + Thread + Set(LVar0, 0) + Loop(0) + Call(SetTexPanOffset, TEX_PANNER_E, TEX_PANNER_MAIN, LVar0, 0) + Add(LVar0, 0x8000) + Wait(4) + EndLoop + EndThread + Return + End }; EvtScript N(EVS_UpdateLavaWaves) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_LOOP(0) - EVT_CALL(MakeLerp, 0, 180, 40, EASING_COS_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SUBF(LVar0, EVT_FLOAT(0.9)) - EVT_CALL(ScaleModel, MODEL_yougan1_1, 1, LVar0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 180, 0, 40, EASING_SIN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SUBF(LVar0, EVT_FLOAT(0.9)) - EVT_CALL(ScaleModel, MODEL_yougan1_1, 1, LVar0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Loop(0) + Call(MakeLerp, 0, 180, 40, EASING_COS_IN) + Loop(0) + Call(UpdateLerp) + DivF(LVar0, Float(100.0)) + SubF(LVar0, Float(0.9)) + Call(ScaleModel, MODEL_yougan1_1, 1, LVar0, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 180, 0, 40, EASING_SIN_OUT) + Loop(0) + Call(UpdateLerp) + DivF(LVar0, Float(100.0)) + SubF(LVar0, Float(0.9)) + Call(ScaleModel, MODEL_yougan1_1, 1, LVar0, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_LAVALAVA) - EVT_CALL(SetSpriteShading, SHADING_KZN_19) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kzn_19_ENTRY_3) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(EscapeNPCs))) - EVT_ELSE - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(BossNPCs))) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kzn_19_ENTRY_3) - EVT_THREAD - EVT_EXEC_WAIT(N(EVS_Misstar_Escape)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_THREAD - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_END_IF - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_DEFEATED_LAVA_PIRANHA) - EVT_CALL(EnableGroup, MODEL_ato, FALSE) - EVT_CALL(EnableGroup, MODEL_naka, FALSE) - EVT_CALL(EnableGroup, MODEL_g93, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ato, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_hoshi_ato, COLLIDER_FLAGS_UPPER_MASK) - EVT_CASE_EQ(STORY_CH5_DEFEATED_LAVA_PIRANHA) - EVT_CALL(EnableGroup, MODEL_mae, FALSE) - EVT_CALL(EnableGroup, MODEL_g93, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mae, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_hoshi_ato, COLLIDER_FLAGS_UPPER_MASK) - EVT_CASE_GT(STORY_CH5_DEFEATED_LAVA_PIRANHA) - EVT_CALL(EnableGroup, MODEL_mae, FALSE) - EVT_CALL(EnableGroup, MODEL_naka, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mae, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_SWITCH - EVT_EXEC(N(EVS_StartTexPanners_Lava)) - EVT_SET(LVar0, MODEL_kem1) - EVT_EXEC(N(EVS_StartTexPanner_SmokeLeft)) - EVT_SET(LVar0, MODEL_kem2) - EVT_EXEC(N(EVS_StartTexPanner_SmokeRight)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_UpdateLavaWaves)) - EVT_EXEC(N(EVS_UpdateEruption)) - EVT_EXEC(N(EVS_TrySpawningStarCard)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_LAVALAVA) + Call(SetSpriteShading, SHADING_KZN_19) + SetUP_CAMERA_DEFAULT() + Call(GetEntryID, LVar0) + IfEq(LVar0, kzn_19_ENTRY_3) + Call(MakeNpcs, TRUE, Ref(N(EscapeNPCs))) + Else + Call(MakeNpcs, TRUE, Ref(N(BossNPCs))) + EndIf + ExecWait(N(EVS_MakeEntities)) + Call(GetEntryID, LVar0) + IfEq(LVar0, kzn_19_ENTRY_3) + Thread + ExecWait(N(EVS_Misstar_Escape)) + Exec(N(EVS_BindExitTriggers)) + EndThread + Else + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + EndIf + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_DEFEATED_LAVA_PIRANHA) + Call(EnableGroup, MODEL_ato, FALSE) + Call(EnableGroup, MODEL_naka, FALSE) + Call(EnableGroup, MODEL_g93, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ato, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_hoshi_ato, COLLIDER_FLAGS_UPPER_MASK) + CaseEq(STORY_CH5_DEFEATED_LAVA_PIRANHA) + Call(EnableGroup, MODEL_mae, FALSE) + Call(EnableGroup, MODEL_g93, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mae, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_hoshi_ato, COLLIDER_FLAGS_UPPER_MASK) + CaseGt(STORY_CH5_DEFEATED_LAVA_PIRANHA) + Call(EnableGroup, MODEL_mae, FALSE) + Call(EnableGroup, MODEL_naka, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mae, COLLIDER_FLAGS_UPPER_MASK) + EndSwitch + Exec(N(EVS_StartTexPanners_Lava)) + Set(LVar0, MODEL_kem1) + Exec(N(EVS_StartTexPanner_SmokeLeft)) + Set(LVar0, MODEL_kem2) + Exec(N(EVS_StartTexPanner_SmokeRight)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_UpdateLavaWaves)) + Exec(N(EVS_UpdateEruption)) + Exec(N(EVS_TrySpawningStarCard)) + Return + End }; diff --git a/src/world/area_kzn/kzn_19/kzn_19_4_npc.c b/src/world/area_kzn/kzn_19/kzn_19_4_npc.c index f70f2ebd6a5..252e875faef 100644 --- a/src/world/area_kzn/kzn_19/kzn_19_4_npc.c +++ b/src/world/area_kzn/kzn_19/kzn_19_4_npc.c @@ -29,91 +29,91 @@ EVT_LETTER_PROMPT(Kolorado, NPC_Kolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle EVT_LETTER_REWARD(Kolorado); EvtScript N(EVS_NpcIdle_Kolorado) = { - EVT_IF_EQ(GF_KZN19_KoloradoDeadEnd, FALSE) - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 300) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(NpcFacePlayer, NPC_SELF, 4) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0100) - EVT_SET(GF_KZN19_KoloradoDeadEnd, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetSelfVar, 0, 0) - EVT_LABEL(5) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_WAIT(30 * DT) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_WAIT(30 * DT) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(5) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_KZN19_KoloradoDeadEnd, FALSE) + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, 300) + Wait(1) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Call(NpcFacePlayer, NPC_SELF, 4) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0100) + Set(GF_KZN19_KoloradoDeadEnd, TRUE) + Call(DisablePlayerInput, FALSE) + Call(SetSelfVar, 0, 0) + Label(5) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Wait(30 * DT) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Wait(30 * DT) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Goto(5) + EndIf + EndIf + Return + End }; EvtScript N(EVS_Kolorado_Escape) = { - EVT_LABEL(0) - EVT_IF_EQ(MV_BossDefeated, FALSE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(60 * DT) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, 70, 25, 60) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(4.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_SELF, 170, 0, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, 280, 70, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Panic, ANIM_Kolorado_Yell, 0, MSG_CH5_0107) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 450, 25, -20) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 450, 25, -20) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.5 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(NpcMoveTo, NPC_SELF, 535, -60, 0) - EVT_WAIT(20 * DT) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 304, 25, -35) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcAux, NPC_LavaPiranhaHead, 0) - EVT_WAIT(10 * DT) - EVT_CALL(FadeOutMusic, 0, 1500) - EVT_EXEC(N(EVS_TrySpawningStarCard)) - EVT_WAIT(30) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Label(0) + IfEq(MV_BossDefeated, FALSE) + Wait(1) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Wait(60 * DT) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcPos, NPC_SELF, 70, 25, 60) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) + Call(SetNpcSpeed, NPC_SELF, Float(4.0 / DT)) + Call(NpcMoveTo, NPC_SELF, 170, 0, 0) + Call(NpcMoveTo, NPC_SELF, 280, 70, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Panic, ANIM_Kolorado_Yell, 0, MSG_CH5_0107) + Call(UseSettingsFrom, CAM_DEFAULT, 450, 25, -20) + Call(SetPanTarget, CAM_DEFAULT, 450, 25, -20) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.5 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(NpcMoveTo, NPC_SELF, 535, -60, 0) + Wait(20 * DT) + Call(SetPanTarget, CAM_DEFAULT, 304, 25, -35) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetNpcAux, NPC_LavaPiranhaHead, 0) + Wait(10 * DT) + Call(FadeOutMusic, 0, 1500) + Exec(N(EVS_TrySpawningStarCard)) + Wait(30) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_Kolorado) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_TalkSad, ANIM_Kolorado_IdleSad, 0, MSG_CH5_0101) - EVT_CALL(SetSelfVar, 0, 1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_TalkSad, ANIM_Kolorado_IdleSad, 0, MSG_CH5_0101) + Call(SetSelfVar, 0, 1) EVT_LETTER_CHECK(Kolorado) - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInit_Kolorado) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH5_DEFEATED_LAVA_PIRANHA) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kzn_19_ENTRY_0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Kolorado))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Kolorado))) - EVT_CASE_EQ(kzn_19_ENTRY_1) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_Kolorado_Escape))) - EVT_END_SWITCH - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH5_DEFEATED_LAVA_PIRANHA) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kzn_19_ENTRY_0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Kolorado))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Kolorado))) + CaseEq(kzn_19_ENTRY_1) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_Kolorado_Escape))) + EndSwitch + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; Vec3f N(FlightPath)[] = { @@ -125,494 +125,494 @@ Vec3f N(FlightPath)[] = { }; EvtScript N(EVS_Misstar_Escape) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetPlayerPos, 185, 25, -35) - EVT_CALL(SetNpcPos, NPC_PARTNER, 155, 25, -35) - EVT_CALL(SetNpcPos, NPC_Misstar, 250, 40, -35) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 217, 25, -35) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 217, 25, -35) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 380) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(12.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(30) - EVT_SET(AF_KZN_BossRoomFloorBroken, TRUE) - EVT_CALL(PlaySound, SOUND_LOOP_RUMBLE) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_NE(AF_KZN_BossRoomFloorBroken, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_CALL(GetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Misstar, ANIM_WorldMisstar_Talk, ANIM_WorldMisstar_Idle, 0, MSG_CH5_0109) - EVT_WAIT(10) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 370, 25, 70) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.8)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(InterpNpcYaw, NPC_Misstar, 90, 0) - EVT_CALL(LoadPath, 45, EVT_PTR(N(FlightPath)), ARRAY_COUNT(N(FlightPath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Misstar, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_Misstar, NPC_DISPOSE_LOCATION) - EVT_WAIT(15) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_SET(GB_StoryProgress, STORY_CH5_MT_LAVA_LAVA_ERUPTING) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(SetPlayerPos, 185, 25, -35) + Call(SetNpcPos, NPC_PARTNER, 155, 25, -35) + Call(SetNpcPos, NPC_Misstar, 250, 40, -35) + Call(UseSettingsFrom, CAM_DEFAULT, 217, 25, -35) + Call(SetPanTarget, CAM_DEFAULT, 217, 25, -35) + Call(SetCamDistance, CAM_DEFAULT, 380) + Call(SetCamPitch, CAM_DEFAULT, Float(12.0), Float(-7.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(30) + Set(AF_KZN_BossRoomFloorBroken, TRUE) + Call(PlaySound, SOUND_LOOP_RUMBLE) + Loop(0) + Wait(1) + IfNe(AF_KZN_BossRoomFloorBroken, TRUE) + BreakLoop + EndIf + EndLoop + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(InterpPlayerYaw, 90, 0) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + Call(GetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(10) + Call(SpeakToPlayer, NPC_Misstar, ANIM_WorldMisstar_Talk, ANIM_WorldMisstar_Idle, 0, MSG_CH5_0109) + Wait(10) + Call(SetPanTarget, CAM_DEFAULT, 370, 25, 70) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.8)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(InterpNpcYaw, NPC_Misstar, 90, 0) + Call(LoadPath, 45, Ref(N(FlightPath)), ARRAY_COUNT(N(FlightPath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Misstar, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcPos, NPC_Misstar, NPC_DISPOSE_LOCATION) + Wait(15) + Call(ResetCam, CAM_DEFAULT, Float(3.0)) + Set(GB_StoryProgress, STORY_CH5_MT_LAVA_LAVA_ERUPTING) + Call(DisablePlayerInput, FALSE) + Return + End }; #include "world/common/lava_piranha/LoadAnimationFromTable.inc.c" EvtScript N(EVS_PlayVinesAnim_Emerge) = { - EVT_THREAD - EVT_CALL(N(LoadAnimationFromTable), VINE_0, 15) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_CALL(SetAnimatedModelRootPosition, VINE_0, 220, 20, -40) - EVT_CALL(N(LoadAnimationFromTable), VINE_3, 36) - EVT_CALL(PlayModelAnimation, VINE_3, VINE_3_BASE) - EVT_CALL(SetAnimatedModelRootPosition, VINE_3, 220, 20, -40) - EVT_WAIT(59) - EVT_CALL(N(LoadAnimationFromTable), VINE_0, 0) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_CALL(N(LoadAnimationFromTable), VINE_3, 34) - EVT_CALL(PlayModelAnimation, VINE_3, VINE_3_BASE) - EVT_END_THREAD - EVT_WAIT(5) - EVT_THREAD - EVT_CALL(N(LoadAnimationFromTable), VINE_1, 32) - EVT_CALL(PlayModelAnimation, VINE_1, VINE_1_BASE) - EVT_CALL(SetAnimatedModelRootPosition, VINE_1, 220, 20, -40) - EVT_WAIT(59) - EVT_CALL(N(LoadAnimationFromTable), VINE_1, 31) - EVT_CALL(PlayModelAnimation, VINE_1, VINE_1_BASE) - EVT_END_THREAD - EVT_WAIT(7) - EVT_CALL(N(LoadAnimationFromTable), VINE_2, 32) - EVT_CALL(PlayModelAnimation, VINE_2, VINE_2_BASE) - EVT_CALL(SetAnimatedModelRootPosition, VINE_2, 270, 34, -20) - EVT_WAIT(62) - EVT_CALL(N(LoadAnimationFromTable), VINE_2, 31) - EVT_CALL(PlayModelAnimation, VINE_2, VINE_2_BASE) - EVT_RETURN - EVT_END + Thread + Call(N(LoadAnimationFromTable), VINE_0, 15) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Call(SetAnimatedModelRootPosition, VINE_0, 220, 20, -40) + Call(N(LoadAnimationFromTable), VINE_3, 36) + Call(PlayModelAnimation, VINE_3, VINE_3_BASE) + Call(SetAnimatedModelRootPosition, VINE_3, 220, 20, -40) + Wait(59) + Call(N(LoadAnimationFromTable), VINE_0, 0) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Call(N(LoadAnimationFromTable), VINE_3, 34) + Call(PlayModelAnimation, VINE_3, VINE_3_BASE) + EndThread + Wait(5) + Thread + Call(N(LoadAnimationFromTable), VINE_1, 32) + Call(PlayModelAnimation, VINE_1, VINE_1_BASE) + Call(SetAnimatedModelRootPosition, VINE_1, 220, 20, -40) + Wait(59) + Call(N(LoadAnimationFromTable), VINE_1, 31) + Call(PlayModelAnimation, VINE_1, VINE_1_BASE) + EndThread + Wait(7) + Call(N(LoadAnimationFromTable), VINE_2, 32) + Call(PlayModelAnimation, VINE_2, VINE_2_BASE) + Call(SetAnimatedModelRootPosition, VINE_2, 270, 34, -20) + Wait(62) + Call(N(LoadAnimationFromTable), VINE_2, 31) + Call(PlayModelAnimation, VINE_2, VINE_2_BASE) + Return + End }; EvtScript N(EVS_PlayVinesAnim_Idle) = { - EVT_CALL(N(LoadAnimationFromTable), VINE_0, 0) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_CALL(N(LoadAnimationFromTable), VINE_1, 31) - EVT_CALL(PlayModelAnimation, VINE_1, VINE_1_BASE) - EVT_CALL(N(LoadAnimationFromTable), VINE_3, 34) - EVT_CALL(PlayModelAnimation, VINE_3, VINE_3_BASE) - EVT_WAIT(10) - EVT_CALL(N(LoadAnimationFromTable), VINE_2, 31) - EVT_CALL(PlayModelAnimation, VINE_2, VINE_2_BASE) - EVT_RETURN - EVT_END + Call(N(LoadAnimationFromTable), VINE_0, 0) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Call(N(LoadAnimationFromTable), VINE_1, 31) + Call(PlayModelAnimation, VINE_1, VINE_1_BASE) + Call(N(LoadAnimationFromTable), VINE_3, 34) + Call(PlayModelAnimation, VINE_3, VINE_3_BASE) + Wait(10) + Call(N(LoadAnimationFromTable), VINE_2, 31) + Call(PlayModelAnimation, VINE_2, VINE_2_BASE) + Return + End }; EvtScript N(EVS_PlayVinesAnim_Talk) = { - EVT_CALL(N(LoadAnimationFromTable), VINE_0, 17) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_RETURN - EVT_END + Call(N(LoadAnimationFromTable), VINE_0, 17) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Return + End }; EvtScript N(EVS_PlayVinesAnim_Defeat) = { - EVT_CALL(N(LoadAnimationFromTable), VINE_0, 16) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_CALL(N(LoadAnimationFromTable), VINE_1, 33) - EVT_CALL(PlayModelAnimation, VINE_1, VINE_1_BASE) - EVT_CALL(N(LoadAnimationFromTable), VINE_2, 33) - EVT_CALL(PlayModelAnimation, VINE_2, VINE_2_BASE) - EVT_CALL(N(LoadAnimationFromTable), VINE_3, 35) - EVT_CALL(PlayModelAnimation, VINE_3, VINE_3_BASE) - EVT_RETURN - EVT_END + Call(N(LoadAnimationFromTable), VINE_0, 16) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Call(N(LoadAnimationFromTable), VINE_1, 33) + Call(PlayModelAnimation, VINE_1, VINE_1_BASE) + Call(N(LoadAnimationFromTable), VINE_2, 33) + Call(PlayModelAnimation, VINE_2, VINE_2_BASE) + Call(N(LoadAnimationFromTable), VINE_3, 35) + Call(PlayModelAnimation, VINE_3, VINE_3_BASE) + Return + End }; EvtScript N(EVS_NpcIdle_LavaPiranha) = { - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_IF_GT(LVar0, 150) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetMusicTrack, 0, SONG_LAVA_PIRANHA_THEME, 0, 8) - EVT_CALL(LoadAnimatedModel, VINE_0, EVT_PTR(N(AnimModel_MainHeadVine))) - EVT_CALL(N(LoadAnimationFromTable), VINE_0, 0) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_CALL(SetAnimatedModelRootPosition, VINE_0, 220, -100, -40) - EVT_CALL(SetAnimatorFlags, VINE_0, MODEL_ANIMATOR_FLAG_HIDDEN, 1) - EVT_CALL(LoadAnimatedModel, VINE_1, EVT_PTR(N(AnimModel_SideHeadVine))) - EVT_CALL(N(LoadAnimationFromTable), VINE_1, 31) - EVT_CALL(PlayModelAnimation, VINE_1, VINE_1_BASE) - EVT_CALL(SetAnimatedModelRootPosition, VINE_1, 220, -100, -40) - EVT_CALL(SetAnimatorFlags, VINE_1, MODEL_ANIMATOR_FLAG_HIDDEN, 1) - EVT_CALL(LoadAnimatedModel, VINE_2, EVT_PTR(N(AnimModel_SideHeadVine))) - EVT_CALL(N(LoadAnimationFromTable), VINE_2, 31) - EVT_CALL(PlayModelAnimation, VINE_2, VINE_2_BASE) - EVT_CALL(SetAnimatedModelRootPosition, VINE_2, 270, -100, -20) - EVT_CALL(SetAnimatorFlags, VINE_2, MODEL_ANIMATOR_FLAG_HIDDEN, 1) - EVT_CALL(LoadAnimatedModel, VINE_3, EVT_PTR(N(AnimModel_ExtraVine))) - EVT_CALL(N(LoadAnimationFromTable), VINE_3, 34) - EVT_CALL(PlayModelAnimation, VINE_3, VINE_3_BASE) - EVT_CALL(SetAnimatedModelRootPosition, VINE_3, 220, -100, -40) - EVT_CALL(SetAnimatorFlags, VINE_3, MODEL_ANIMATOR_FLAG_HIDDEN, 1) - EVT_CALL(N(CreateVineRenderer)) - EVT_CALL(SetSelfVar, 1, 1) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_THREAD - EVT_WAIT(15 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 300, 25, -20) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 300, 25, -20) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-9.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, 40, 80, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_poko, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_THREAD - EVT_CALL(InterruptUsePartner) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PlayerMoveTo, 200, -30, 0) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_END_THREAD - EVT_CALL(PlaySoundAt, SOUND_LAVA_PIRANHA_EMERGE, SOUND_SPACE_DEFAULT, 330, 25, -50) - EVT_EXEC(N(EVS_PlayVinesAnim_Emerge)) - EVT_WAIT(59) - EVT_THREAD - EVT_CALL(MakeLerp, 40, 0, 80, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_poko, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(40 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 235, 25, -20) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 235, 25, -20) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(420.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(10.0), EVT_FLOAT(-10.7)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC(N(EVS_PlayVinesAnim_Talk)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_LavaPiranha_Anim0E, ANIM_LavaPiranha_Anim03, 768, -30, 30, MSG_CH5_0102) - EVT_EXEC(N(EVS_PlayVinesAnim_Idle)) - EVT_WAIT(10 * DT) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_LavaPiranha_Anim0E, ANIM_LavaPiranha_Anim03, 256, -30, 30) - EVT_EXEC(N(EVS_PlayVinesAnim_Talk)) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_LavaPiranha_Anim0E, ANIM_LavaPiranha_Anim03, 768, -30, 30, MSG_CH5_0103) - EVT_EXEC(N(EVS_PlayVinesAnim_Idle)) - EVT_WAIT(10 * DT) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_LavaPiranha_Anim0E, ANIM_LavaPiranha_Anim03, 768, -30, 30) - EVT_EXEC(N(EVS_PlayVinesAnim_Talk)) - EVT_WAIT(10 * DT) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_LavaPiranha_Anim0E, ANIM_LavaPiranha_Anim03, 768, -30, 30) - EVT_EXEC(N(EVS_PlayVinesAnim_Idle)) - EVT_WAIT(10 * DT) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_LavaPiranha_Anim0E, ANIM_LavaPiranha_Anim03, 768, -30, 30) - EVT_CHILD_THREAD - EVT_SET(LVar0, 20) - EVT_LOOP(3) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, LVar0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_SUB(LVar0, 2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(440.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, LVar0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_SUB(LVar0, 2) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(StartBossBattle, SONG_LAVA_PIRANHA_BATTLE) - EVT_RETURN - EVT_END + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + IfGt(LVar0, 150) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, TRUE) + Call(SetMusicTrack, 0, SONG_LAVA_PIRANHA_THEME, 0, 8) + Call(LoadAnimatedModel, VINE_0, Ref(N(AnimModel_MainHeadVine))) + Call(N(LoadAnimationFromTable), VINE_0, 0) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Call(SetAnimatedModelRootPosition, VINE_0, 220, -100, -40) + Call(SetAnimatorFlags, VINE_0, MODEL_ANIMATOR_FLAG_HIDDEN, 1) + Call(LoadAnimatedModel, VINE_1, Ref(N(AnimModel_SideHeadVine))) + Call(N(LoadAnimationFromTable), VINE_1, 31) + Call(PlayModelAnimation, VINE_1, VINE_1_BASE) + Call(SetAnimatedModelRootPosition, VINE_1, 220, -100, -40) + Call(SetAnimatorFlags, VINE_1, MODEL_ANIMATOR_FLAG_HIDDEN, 1) + Call(LoadAnimatedModel, VINE_2, Ref(N(AnimModel_SideHeadVine))) + Call(N(LoadAnimationFromTable), VINE_2, 31) + Call(PlayModelAnimation, VINE_2, VINE_2_BASE) + Call(SetAnimatedModelRootPosition, VINE_2, 270, -100, -20) + Call(SetAnimatorFlags, VINE_2, MODEL_ANIMATOR_FLAG_HIDDEN, 1) + Call(LoadAnimatedModel, VINE_3, Ref(N(AnimModel_ExtraVine))) + Call(N(LoadAnimationFromTable), VINE_3, 34) + Call(PlayModelAnimation, VINE_3, VINE_3_BASE) + Call(SetAnimatedModelRootPosition, VINE_3, 220, -100, -40) + Call(SetAnimatorFlags, VINE_3, MODEL_ANIMATOR_FLAG_HIDDEN, 1) + Call(N(CreateVineRenderer)) + Call(SetSelfVar, 1, 1) + Call(InterpPlayerYaw, 90, 0) + Thread + Wait(15 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, 300, 25, -20) + Call(SetPanTarget, CAM_DEFAULT, 300, 25, -20) + Call(SetCamDistance, CAM_DEFAULT, Float(350.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-9.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Call(MakeLerp, 0, 40, 80, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_poko, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Thread + Call(InterruptUsePartner) + Call(SetPlayerSpeed, Float(3.0 / DT)) + Call(PlayerMoveTo, 200, -30, 0) + Call(InterpPlayerYaw, 90, 0) + EndThread + Call(PlaySoundAt, SOUND_LAVA_PIRANHA_EMERGE, SOUND_SPACE_DEFAULT, 330, 25, -50) + Exec(N(EVS_PlayVinesAnim_Emerge)) + Wait(59) + Thread + Call(MakeLerp, 40, 0, 80, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_poko, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Wait(40 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, 235, 25, -20) + Call(SetPanTarget, CAM_DEFAULT, 235, 25, -20) + Call(SetCamDistance, CAM_DEFAULT, Float(420.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(10.0), Float(-10.7)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Exec(N(EVS_PlayVinesAnim_Talk)) + Call(SpeakToPlayer, NPC_SELF, ANIM_LavaPiranha_Anim0E, ANIM_LavaPiranha_Anim03, 768, -30, 30, MSG_CH5_0102) + Exec(N(EVS_PlayVinesAnim_Idle)) + Wait(10 * DT) + Call(EndSpeech, NPC_SELF, ANIM_LavaPiranha_Anim0E, ANIM_LavaPiranha_Anim03, 256, -30, 30) + Exec(N(EVS_PlayVinesAnim_Talk)) + Wait(30 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_LavaPiranha_Anim0E, ANIM_LavaPiranha_Anim03, 768, -30, 30, MSG_CH5_0103) + Exec(N(EVS_PlayVinesAnim_Idle)) + Wait(10 * DT) + Call(EndSpeech, NPC_SELF, ANIM_LavaPiranha_Anim0E, ANIM_LavaPiranha_Anim03, 768, -30, 30) + Exec(N(EVS_PlayVinesAnim_Talk)) + Wait(10 * DT) + Call(EndSpeech, NPC_SELF, ANIM_LavaPiranha_Anim0E, ANIM_LavaPiranha_Anim03, 768, -30, 30) + Exec(N(EVS_PlayVinesAnim_Idle)) + Wait(10 * DT) + Call(EndSpeech, NPC_SELF, ANIM_LavaPiranha_Anim0E, ANIM_LavaPiranha_Anim03, 768, -30, 30) + ChildThread + Set(LVar0, 20) + Loop(3) + Call(SetCamDistance, CAM_DEFAULT, Float(250.0)) + Call(SetCamSpeed, CAM_DEFAULT, LVar0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Sub(LVar0, 2) + Call(SetCamDistance, CAM_DEFAULT, Float(440.0)) + Call(SetCamSpeed, CAM_DEFAULT, LVar0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Sub(LVar0, 2) + EndLoop + EndChildThread + Call(DisablePlayerInput, FALSE) + Call(StartBossBattle, SONG_LAVA_PIRANHA_BATTLE) + Return + End }; EvtScript N(EVS_NpcAux_LavaPiranha) = { - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_USE_ARRAY(LVar0) - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 1, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_LABEL(0) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_LavaPiranhaHead, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcRotation, NPC_LavaPiranhaHead, LVar0, 0, LVar2) - EVT_CALL(N(MarkVineInterpolationDirty)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 0, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 90) - EVT_CALL(N(SetVineBoneRot), VINE_0, 0, LVar0, 0, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 0, 1, 1, 1) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 1, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 1, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 1, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 9, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 2, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 9, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 2, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 3, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 3, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 8, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 4, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 8, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 4, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 5, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 5, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 7, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 6, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 7, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 6, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 7, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 7, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 7, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 8, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 8, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 8, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_LavaBud_01, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcRotation, NPC_LavaBud_01, LVar0, 0, LVar2) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_1, 0, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 90) - EVT_CALL(N(SetVineBoneRot), VINE_1, 0, LVar0, 0, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_1, 0, 1, 1, 1) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 4, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 2) - EVT_CALL(N(SetVineBonePos), VINE_1, 1, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_1, 1, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_1, 1, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 7, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_1, 2, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 7, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_1, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_1, 2, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_1, 3, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_1, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_1, 3, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_1, 4, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_1, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_1, 4, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_1, 5, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_1, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_1, 5, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_1, 6, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_1, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_1, 6, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_LavaBud_02, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcRotation, NPC_LavaBud_02, LVar0, 0, LVar2) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_2, 0, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 90) - EVT_CALL(N(SetVineBoneRot), VINE_2, 0, LVar0, 0, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_2, 0, 1, 1, 1) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 4, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 2) - EVT_CALL(N(SetVineBonePos), VINE_2, 1, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_2, 1, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_2, 1, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 7, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_2, 2, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 7, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_2, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_2, 2, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_2, 3, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_2, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_2, 3, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_2, 4, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_2, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_2, 4, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_2, 5, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_2, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_2, 5, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_2, 6, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_2, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_2, 6, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_3, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_3, 0, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_3, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_3, 0, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_3, 0, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_3, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_3, 1, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_3, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_3, 1, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_3, 1, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_3, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_3, 2, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_3, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_3, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_3, 2, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_3, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_3, 3, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_3, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_3, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_3, 3, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_3, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_3, 4, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_3, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_3, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_3, 4, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(GetSelfVar, 0, LVar0) + UseArray(LVar0) + Loop(0) + Call(GetSelfVar, 1, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + Label(0) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_LavaPiranhaHead, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) + Call(SetNpcRotation, NPC_LavaPiranhaHead, LVar0, 0, LVar2) + Call(N(MarkVineInterpolationDirty)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 0, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) + Add(LVar2, 90) + Call(N(SetVineBoneRot), VINE_0, 0, LVar0, 0, LVar2) + Call(N(SetVineBoneScale), VINE_0, 0, 1, 1, 1) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 1, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 1, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 1, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 9, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 2, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 9, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 2, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 3, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 3, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 8, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 4, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 8, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 4, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 5, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 5, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 7, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 6, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 7, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 6, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 7, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 7, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 7, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 8, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 8, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 8, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_LavaBud_01, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) + Call(SetNpcRotation, NPC_LavaBud_01, LVar0, 0, LVar2) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_1, 0, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) + Add(LVar2, 90) + Call(N(SetVineBoneRot), VINE_1, 0, LVar0, 0, LVar2) + Call(N(SetVineBoneScale), VINE_1, 0, 1, 1, 1) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 4, LVar0, LVar1, LVar2) + Sub(LVar2, 2) + Call(N(SetVineBonePos), VINE_1, 1, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_1, 1, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_1, 1, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 7, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_1, 2, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 7, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_1, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_1, 2, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_1, 3, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_1, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_1, 3, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_1, 4, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_1, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_1, 4, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_1, 5, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_1, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_1, 5, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_1, 6, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_1, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_1, 6, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_LavaBud_02, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) + Call(SetNpcRotation, NPC_LavaBud_02, LVar0, 0, LVar2) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_2, 0, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) + Add(LVar2, 90) + Call(N(SetVineBoneRot), VINE_2, 0, LVar0, 0, LVar2) + Call(N(SetVineBoneScale), VINE_2, 0, 1, 1, 1) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 4, LVar0, LVar1, LVar2) + Sub(LVar2, 2) + Call(N(SetVineBonePos), VINE_2, 1, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_2, 1, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_2, 1, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 7, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_2, 2, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 7, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_2, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_2, 2, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_2, 3, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_2, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_2, 3, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_2, 4, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_2, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_2, 4, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_2, 5, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_2, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_2, 5, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_2, 6, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_2, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_2, 6, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_3, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_3, 0, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_3, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_3, 0, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_3, 0, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_3, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_3, 1, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_3, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_3, 1, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_3, 1, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_3, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_3, 2, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_3, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_3, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_3, 2, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_3, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_3, 3, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_3, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_3, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_3, 3, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_3, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_3, 4, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_3, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_3, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_3, 4, Float(0.714), Float(0.714), Float(1.0)) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_NpcDefeat_LavaPiranha) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAG_2, TRUE) - EVT_CALL(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) - EVT_CALL(SetPlayerPos, 125, 25, -35) - EVT_CALL(SetNpcPos, NPC_PARTNER, 100, 25, -35) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 125, 25, -35) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 205, 25, -35) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 470) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(16.0), EVT_FLOAT(-8.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(EnableGroup, MODEL_ato, TRUE) - EVT_CALL(EnableGroup, MODEL_naka, TRUE) - EVT_CALL(EnableGroup, MODEL_mae, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_ato, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mae, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlaySoundAt, SOUND_LAVA_PIRANHA_DEFEAT, SOUND_SPACE_DEFAULT, 330, 25, -50) - EVT_EXEC(N(EVS_PlayVinesAnim_Defeat)) - EVT_WAIT(1) - EVT_CALL(SetNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_LavaPiranha))) - EVT_SET(MV_BossDefeated, TRUE) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAG_2, TRUE) + Call(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) + Call(SetPlayerPos, 125, 25, -35) + Call(SetNpcPos, NPC_PARTNER, 100, 25, -35) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(UseSettingsFrom, CAM_DEFAULT, 125, 25, -35) + Call(SetPanTarget, CAM_DEFAULT, 205, 25, -35) + Call(SetCamDistance, CAM_DEFAULT, 470) + Call(SetCamPitch, CAM_DEFAULT, Float(16.0), Float(-8.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(EnableGroup, MODEL_ato, TRUE) + Call(EnableGroup, MODEL_naka, TRUE) + Call(EnableGroup, MODEL_mae, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_ato, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mae, COLLIDER_FLAGS_UPPER_MASK) + Call(PlaySoundAt, SOUND_LAVA_PIRANHA_DEFEAT, SOUND_SPACE_DEFAULT, 330, 25, -50) + Exec(N(EVS_PlayVinesAnim_Defeat)) + Wait(1) + Call(SetNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_LavaPiranha))) + Set(MV_BossDefeated, TRUE) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_LavaPiranha) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kzn_19_ENTRY_1) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_DEFEATED_LAVA_PIRANHA) - EVT_CALL(SetNpcAnimation, NPC_LavaPiranhaHead, ANIM_LavaPiranha_Anim03) - EVT_CALL(SetNpcAnimation, NPC_LavaBud_01, ANIM_LavaBud_Anim03) - EVT_CALL(SetNpcAnimation, NPC_LavaBud_02, ANIM_LavaBud_Anim03) - EVT_MALLOC_ARRAY(64, LVar0) - EVT_CALL(SetSelfVar, 0, LVar0) - EVT_USE_ARRAY(LVar0) - EVT_CALL(SetSelfVar, 1, 0) - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_LavaPiranha))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_LavaPiranha))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_LavaPiranha))) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_05, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, kzn_19_ENTRY_1) + IfLt(GB_StoryProgress, STORY_CH5_DEFEATED_LAVA_PIRANHA) + Call(SetNpcAnimation, NPC_LavaPiranhaHead, ANIM_LavaPiranha_Anim03) + Call(SetNpcAnimation, NPC_LavaBud_01, ANIM_LavaBud_Anim03) + Call(SetNpcAnimation, NPC_LavaBud_02, ANIM_LavaBud_Anim03) + MallocArray(64, LVar0) + Call(SetSelfVar, 0, LVar0) + UseArray(LVar0) + Call(SetSelfVar, 1, 0) + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_LavaPiranha))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_LavaPiranha))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_LavaPiranha))) + Return + EndIf + EndIf + Call(SetNpcPos, NPC_05, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Return + End }; EvtScript N(EVS_NpcDefeat_LavaBud) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_LavaBud) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH5_DEFEATED_LAVA_PIRANHA) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_LavaBud))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH5_DEFEATED_LAVA_PIRANHA) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_LavaBud))) + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; NpcData N(NpcData_Kolorado) = { diff --git a/src/world/area_kzn/kzn_19/kzn_19_5_eruption.c b/src/world/area_kzn/kzn_19/kzn_19_5_eruption.c index 1041f2fbfb9..645ef13a296 100644 --- a/src/world/area_kzn/kzn_19/kzn_19_5_eruption.c +++ b/src/world/area_kzn/kzn_19/kzn_19_5_eruption.c @@ -2,91 +2,91 @@ #include "sprite/player.h" EvtScript N(EVS_CrackFloor) = { - EVT_CALL(EnableGroup, MODEL_naka, FALSE) - EVT_CALL(EnableGroup, MODEL_g93, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_hoshi_ato, COLLIDER_FLAGS_UPPER_MASK) - EVT_SETF(LVar0, 0) - EVT_THREAD - EVT_LOOP(60) - EVT_ADDF(LVar0, EVT_FLOAT(0.334)) - EVT_CALL(RotateModel, MODEL_o2, LVar0, 0, 0, -1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(60) - EVT_ADDF(LVar0, EVT_FLOAT(0.5)) - EVT_CALL(RotateModel, MODEL_o3, LVar0, 0, 0, -1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(60) - EVT_ADDF(LVar0, EVT_FLOAT(0.25)) - EVT_CALL(RotateModel, MODEL_o4, LVar0, 0, 0, -1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_LOOP(120) - EVT_SUBF(LVar0, EVT_FLOAT(0.25)) - EVT_CALL(TranslateModel, MODEL_o6, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(AF_KZN_BossRoomFloorBroken, FALSE) - EVT_RETURN - EVT_END + Call(EnableGroup, MODEL_naka, FALSE) + Call(EnableGroup, MODEL_g93, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_hoshi_ato, COLLIDER_FLAGS_UPPER_MASK) + SetF(LVar0, 0) + Thread + Loop(60) + AddF(LVar0, Float(0.334)) + Call(RotateModel, MODEL_o2, LVar0, 0, 0, -1) + Wait(1) + EndLoop + EndThread + Thread + Loop(60) + AddF(LVar0, Float(0.5)) + Call(RotateModel, MODEL_o3, LVar0, 0, 0, -1) + Wait(1) + EndLoop + EndThread + Thread + Loop(60) + AddF(LVar0, Float(0.25)) + Call(RotateModel, MODEL_o4, LVar0, 0, 0, -1) + Wait(1) + EndLoop + EndThread + Loop(120) + SubF(LVar0, Float(0.25)) + Call(TranslateModel, MODEL_o6, 0, LVar0, 0) + Wait(1) + EndLoop + Set(AF_KZN_BossRoomFloorBroken, FALSE) + Return + End }; EvtScript N(EVS_SetFloorCracked) = { - EVT_CALL(RotateModel, MODEL_o2, 20, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o3, 30, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o4, 15, 0, 0, -1) - EVT_CALL(TranslateModel, MODEL_o6, 0, -30, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o2, 20, 0, 0, -1) + Call(RotateModel, MODEL_o3, 30, 0, 0, -1) + Call(RotateModel, MODEL_o4, 15, 0, 0, -1) + Call(TranslateModel, MODEL_o6, 0, -30, 0) + Return + End }; EvtScript N(EVS_UpdateEruption) = { - EVT_SET(AF_KZN_BossRoomFloorBroken, FALSE) - EVT_IF_GE(GB_StoryProgress, STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_RETURN - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH5_MT_LAVA_LAVA_ERUPTING) + Set(AF_KZN_BossRoomFloorBroken, FALSE) + IfGe(GB_StoryProgress, STORY_CH5_STAR_SPRIT_DEPARTED) + Return + EndIf + IfLt(GB_StoryProgress, STORY_CH5_MT_LAVA_LAVA_ERUPTING) // wait for card pickup - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_NE(AF_KZN_BossRoomFloorBroken, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP + Loop(0) + Wait(1) + IfNe(AF_KZN_BossRoomFloorBroken, FALSE) + BreakLoop + EndIf + EndLoop // begin eruption effects - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(2.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 170, 25, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 25, EVT_FLOAT(2.0)) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_EXEC(N(EVS_CrackFloor)) - EVT_CALL(MakeLerp, 200, 50, 75, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 1, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_ELSE + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(2.0)) + Call(SetPanTarget, CAM_DEFAULT, 170, 25, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(ShakeCam, CAM_DEFAULT, 0, 25, Float(2.0)) + Call(InterpPlayerYaw, 270, 0) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + Exec(N(EVS_CrackFloor)) + Call(MakeLerp, 200, 50, 75, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + DivF(LVar0, Float(100.0)) + Call(ShakeCam, CAM_DEFAULT, 0, 1, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Else // GB_StoryProgress == STORY_CH5_MT_LAVA_LAVA_ERUPTING - EVT_EXEC(N(EVS_SetFloorCracked)) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_hoshi, COLLIDER_FLAGS_UPPER_MASK) - EVT_LOOP(0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.5)) - EVT_END_LOOP - EVT_RETURN - EVT_END + Exec(N(EVS_SetFloorCracked)) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_hoshi, COLLIDER_FLAGS_UPPER_MASK) + Loop(0) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(0.5)) + EndLoop + Return + End }; diff --git a/src/world/area_kzn/kzn_19/kzn_19_6_entity.c b/src/world/area_kzn/kzn_19/kzn_19_6_entity.c index cba4279f9b8..4a63c167eef 100644 --- a/src/world/area_kzn/kzn_19/kzn_19_6_entity.c +++ b/src/world/area_kzn/kzn_19/kzn_19_6_entity.c @@ -2,10 +2,10 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -170, 310, -340, 0, ITEM_SUPER_SHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KZN19_ItemBlock_SuperShroom) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -70, 310, -340, 0, ITEM_MAPLE_SYRUP, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KZN19_ItemBlock_MapleSyrup) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_YellowBlock), -170, 310, -340, 0, ITEM_SUPER_SHROOM, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KZN19_ItemBlock_SuperShroom) + Call(MakeEntity, Ref(Entity_YellowBlock), -70, 310, -340, 0, ITEM_MAPLE_SYRUP, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KZN19_ItemBlock_MapleSyrup) + Return + End }; diff --git a/src/world/area_kzn/kzn_20/kzn_20_1_music.c b/src/world/area_kzn/kzn_20/kzn_20_1_music.c index 3ab10abfac2..ab6df8c382f 100644 --- a/src/world/area_kzn/kzn_20/kzn_20_1_music.c +++ b/src/world/area_kzn/kzn_20/kzn_20_1_music.c @@ -1,16 +1,16 @@ #include "kzn_20.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH5_MT_LAVA_LAVA_ERUPTING) - EVT_CALL(PlaySound, SOUND_LOOP_RUMBLE) - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) - EVT_CALL(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_3) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_VOLCANO_ESCAPE, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_1) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH5_MT_LAVA_LAVA_ERUPTING) + Call(PlaySound, SOUND_LOOP_RUMBLE) + EndIf + IfLt(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) + Call(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) + Call(PlayAmbientSounds, AMBIENT_LAVA_3) + Else + Call(SetMusicTrack, 0, SONG_VOLCANO_ESCAPE, 0, 8) + Call(PlayAmbientSounds, AMBIENT_LAVA_1) + EndIf + Return + End }; diff --git a/src/world/area_kzn/kzn_20/kzn_20_2_main.c b/src/world/area_kzn/kzn_20/kzn_20_2_main.c index 00150c5d61c..aa269bfdca3 100644 --- a/src/world/area_kzn/kzn_20/kzn_20_2_main.c +++ b/src/world/area_kzn/kzn_20/kzn_20_2_main.c @@ -7,24 +7,24 @@ EvtScript N(EVS_ExitWalk_kzn_19_2) = EVT_EXIT_WALK(60, kzn_20_ENTRY_0, "kzn_19", EvtScript N(EVS_ExitWalk_kzn_22_0) = EVT_EXIT_WALK(60, kzn_20_ENTRY_1, "kzn_22", kzn_22_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(N(EVS_ExitWalk_kzn_19_2), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(N(EVS_ExitWalk_kzn_22_0), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(N(EVS_ExitWalk_kzn_19_2), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(N(EVS_ExitWalk_kzn_22_0), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + Return + End }; EvtScript N(EVS_UpdateTexPan_Lava) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(EnableTexPanning, MODEL_yu, TRUE) - EVT_THREAD + SetGroup(EVT_GROUP_00) + Call(EnableTexPanning, MODEL_yu, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( -700, 700, 200, -300) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -34,117 +34,117 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(EVS_DetermineLavaLevel) = { - EVT_LOOP(0) - EVT_IF_GE(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) - EVT_LABEL(1) - EVT_IF_LT(MV_LavaPosOffset, 110) - EVT_SUBF(MV_WaveScaleOffset, EVT_FLOAT(0.01)) - EVT_ADDF(MV_PosScaleCoeff, EVT_FLOAT(0.01)) - EVT_LOOP(5) - EVT_ADDF(MV_LavaPosOffset, EVT_FLOAT(0.75)) - EVT_WAIT(9) - EVT_END_LOOP - EVT_ELSE - EVT_BREAK_LOOP - EVT_END_IF - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + IfGe(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) + Label(1) + IfLt(MV_LavaPosOffset, 110) + SubF(MV_WaveScaleOffset, Float(0.01)) + AddF(MV_PosScaleCoeff, Float(0.01)) + Loop(5) + AddF(MV_LavaPosOffset, Float(0.75)) + Wait(9) + EndLoop + Else + BreakLoop + EndIf + Goto(1) + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_InterruptPartnersInLava) = { - EVT_LOOP(0) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetModelCenter, MODEL_yu) - EVT_CALL(GetPlayerPos, LVar0, LVar3, LVar2) - EVT_IF_LT(LVar3, LVar1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(GetCurrentPartnerID, LVar1) - EVT_IF_NE(LVar1, PARTNER_LAKILESTER) - EVT_CALL(InterruptUsePartner) - EVT_CALL(SetPlayerActionState, ACTION_STATE_HIT_LAVA) - EVT_WAIT(30) - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Loop(0) + Wait(1) + Call(GetModelCenter, MODEL_yu) + Call(GetPlayerPos, LVar0, LVar3, LVar2) + IfLt(LVar3, LVar1) + BreakLoop + EndIf + EndLoop + Call(GetCurrentPartnerID, LVar1) + IfNe(LVar1, PARTNER_LAKILESTER) + Call(InterruptUsePartner) + Call(SetPlayerActionState, ACTION_STATE_HIT_LAVA) + Wait(30) + EndIf + EndLoop + Return + End }; EvtScript N(EVS_UpdateLavaWaves) = { - EVT_SET_GROUP(EVT_GROUP_EF) - EVT_CALL(EnableModel, MODEL_yu, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_yu, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ParentColliderToModel, COLLIDER_yu, MODEL_yu) - EVT_LABEL(0) - EVT_IF_EQ(AF_KZN_RumblingIntensified, FALSE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(EnableModel, MODEL_yu, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_yu, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_yu, SURFACE_TYPE_LAVA) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_IF_LT(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) - EVT_SETF(MV_LavaPosOffset, 35) - EVT_SETF(MV_WaveScaleOffset, EVT_FLOAT(1.2)) - EVT_SETF(MV_PosScaleCoeff, EVT_FLOAT(-1.2)) - EVT_ELSE - EVT_SETF(MV_LavaPosOffset, 110) - EVT_SETF(MV_WaveScaleOffset, EVT_FLOAT(1.0)) - EVT_SETF(MV_PosScaleCoeff, EVT_FLOAT(-1.0)) - EVT_END_IF - EVT_EXEC(N(EVS_DetermineLavaLevel)) - EVT_EXEC(N(EVS_InterruptPartnersInLava)) - EVT_LOOP(0) - EVT_CALL(MakeLerp, 0, 260, 30, EASING_COS_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SUBF(LVar0, MV_WaveScaleOffset) - EVT_SETF(LVar3, MV_LavaPosOffset) - EVT_SETF(LVar4, MV_LavaPosOffset) - EVT_DIVF(LVar3, MV_PosScaleCoeff) - EVT_MULF(LVar3, LVar0) - EVT_ADDF(LVar4, LVar3) // = PosOffset + Scale * (PosOffset / PosScaleCoeff) - EVT_CALL(TranslateModel, MODEL_yu, 0, LVar4, 0) - EVT_CALL(ScaleModel, MODEL_yu, 1, LVar0, 1) - EVT_CALL(TranslateModel, MODEL_yu, 0, MV_LavaPosOffset, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_yu) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 260, 0, 60, EASING_SIN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SUBF(LVar0, MV_WaveScaleOffset) - EVT_SETF(LVar3, MV_LavaPosOffset) - EVT_SETF(LVar4, MV_LavaPosOffset) - EVT_DIVF(LVar3, MV_PosScaleCoeff) - EVT_MULF(LVar3, LVar0) - EVT_ADDF(LVar4, LVar3) - EVT_CALL(TranslateModel, MODEL_yu, 0, LVar4, 0) - EVT_CALL(ScaleModel, MODEL_yu, 1, LVar0, 1) - EVT_CALL(TranslateModel, MODEL_yu, 0, MV_LavaPosOffset, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_yu) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_EF) + Call(EnableModel, MODEL_yu, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_yu, COLLIDER_FLAGS_UPPER_MASK) + Call(ParentColliderToModel, COLLIDER_yu, MODEL_yu) + Label(0) + IfEq(AF_KZN_RumblingIntensified, FALSE) + Wait(1) + Goto(0) + EndIf + Call(EnableModel, MODEL_yu, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_yu, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_yu, SURFACE_TYPE_LAVA) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + IfLt(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) + SetF(MV_LavaPosOffset, 35) + SetF(MV_WaveScaleOffset, Float(1.2)) + SetF(MV_PosScaleCoeff, Float(-1.2)) + Else + SetF(MV_LavaPosOffset, 110) + SetF(MV_WaveScaleOffset, Float(1.0)) + SetF(MV_PosScaleCoeff, Float(-1.0)) + EndIf + Exec(N(EVS_DetermineLavaLevel)) + Exec(N(EVS_InterruptPartnersInLava)) + Loop(0) + Call(MakeLerp, 0, 260, 30, EASING_COS_IN) + Loop(0) + Call(UpdateLerp) + DivF(LVar0, Float(100.0)) + SubF(LVar0, MV_WaveScaleOffset) + SetF(LVar3, MV_LavaPosOffset) + SetF(LVar4, MV_LavaPosOffset) + DivF(LVar3, MV_PosScaleCoeff) + MulF(LVar3, LVar0) + AddF(LVar4, LVar3) // = PosOffset + Scale * (PosOffset / PosScaleCoeff) + Call(TranslateModel, MODEL_yu, 0, LVar4, 0) + Call(ScaleModel, MODEL_yu, 1, LVar0, 1) + Call(TranslateModel, MODEL_yu, 0, MV_LavaPosOffset, 0) + Call(UpdateColliderTransform, COLLIDER_yu) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 260, 0, 60, EASING_SIN_OUT) + Loop(0) + Call(UpdateLerp) + DivF(LVar0, Float(100.0)) + SubF(LVar0, MV_WaveScaleOffset) + SetF(LVar3, MV_LavaPosOffset) + SetF(LVar4, MV_LavaPosOffset) + DivF(LVar3, MV_PosScaleCoeff) + MulF(LVar3, LVar0) + AddF(LVar4, LVar3) + Call(TranslateModel, MODEL_yu, 0, LVar4, 0) + Call(ScaleModel, MODEL_yu, 1, LVar0, 1) + Call(TranslateModel, MODEL_yu, 0, MV_LavaPosOffset, 0) + Call(UpdateColliderTransform, COLLIDER_yu) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + Return + End }; BombTrigger N(WeakWallBombTrigger) = { @@ -153,35 +153,35 @@ BombTrigger N(WeakWallBombTrigger) = { }; EvtScript N(EVS_OnBreakWall) = { - EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 0, 2, 2, 1, 10, 30) - EVT_CALL(EnableGroup, MODEL_bom_mae, FALSE) - EVT_CALL(EnableGroup, MODEL_bom_ato, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) - EVT_UNBIND - EVT_RETURN - EVT_END + PlayEffect(EFFECT_BOMBETTE_BREAKING, 0, 2, 2, 1, 10, 30) + Call(EnableGroup, MODEL_bom_mae, FALSE) + Call(EnableGroup, MODEL_bom_ato, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) + Set(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) + Unbind + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_LAVALAVA) - EVT_CALL(SetSpriteShading, SHADING_KZN_20) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_SET(LVar0, N(EVS_BindExitTriggers)) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_EXEC(N(EVS_ShakingWorld)) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) - EVT_CALL(EnableGroup, MODEL_bom_ato, FALSE) - EVT_BIND_TRIGGER(N(EVS_OnBreakWall), TRIGGER_POINT_BOMB, EVT_PTR(N(WeakWallBombTrigger)), 1, 0) - EVT_ELSE - EVT_CALL(EnableGroup, MODEL_bom_mae, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_UpdateLavaWaves)) - EVT_EXEC(N(EVS_UpdateTexPan_Lava)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_LAVALAVA) + Call(SetSpriteShading, SHADING_KZN_20) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Set(LVar0, N(EVS_BindExitTriggers)) + Exec(EnterWalk) + Wait(1) + Exec(N(EVS_ShakingWorld)) + IfLt(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) + Call(EnableGroup, MODEL_bom_ato, FALSE) + BindTrigger(N(EVS_OnBreakWall), TRIGGER_POINT_BOMB, Ref(N(WeakWallBombTrigger)), 1, 0) + Else + Call(EnableGroup, MODEL_bom_mae, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_UpdateLavaWaves)) + Exec(N(EVS_UpdateTexPan_Lava)) + Return + End }; diff --git a/src/world/area_kzn/kzn_20/kzn_20_3_npc.c b/src/world/area_kzn/kzn_20/kzn_20_3_npc.c index 44452e523b6..0b34250ade7 100644 --- a/src/world/area_kzn/kzn_20/kzn_20_3_npc.c +++ b/src/world/area_kzn/kzn_20/kzn_20_3_npc.c @@ -33,56 +33,56 @@ EVT_LETTER_PROMPT(Kolorado, NPC_Kolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle EVT_LETTER_REWARD(Kolorado); EvtScript N(EVS_SpawnFallingDust) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_LOOP(0) - EVT_CALL(RandInt, 100, LVar0) - EVT_SUB(LVar0, 100) - EVT_PLAY_EFFECT(EFFECT_DUST, 1, LVar0, 350, 0, 60) - EVT_CALL(RandInt, 100, LVar0) - EVT_WAIT(30) - EVT_PLAY_EFFECT(EFFECT_DUST, 1, LVar0, 350, 0, 60) - EVT_WAIT(30) - EVT_END_LOOP - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0B) + Loop(0) + Call(RandInt, 100, LVar0) + Sub(LVar0, 100) + PlayEffect(EFFECT_DUST, 1, LVar0, 350, 0, 60) + Call(RandInt, 100, LVar0) + Wait(30) + PlayEffect(EFFECT_DUST, 1, LVar0, 350, 0, 60) + Wait(30) + EndLoop + Return + End }; EvtScript N(EVS_ShakingWorld) = { - EVT_SET_GROUP(EVT_GROUP_0A) - EVT_IF_GE(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) - EVT_EXEC(N(EVS_SpawnFallingDust)) - EVT_ELSE - EVT_LOOP(0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 2, EVT_FLOAT(0.5)) - EVT_IF_NE(AF_KZN_RumblingIntensified, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_SpawnFallingDust)) - EVT_CALL(MakeLerp, 20, 250, 5, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 3, LVar0) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 250, 30, 60, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, LVar0) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_LOOP(0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.5)) - EVT_END_LOOP - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0A) + IfGe(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) + Exec(N(EVS_SpawnFallingDust)) + Else + Loop(0) + Call(ShakeCam, CAM_DEFAULT, 0, 2, Float(0.5)) + IfNe(AF_KZN_RumblingIntensified, FALSE) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_SpawnFallingDust)) + Call(MakeLerp, 20, 250, 5, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + DivF(LVar0, Float(100.0)) + Call(ShakeCam, CAM_DEFAULT, 0, 3, LVar0) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 250, 30, 60, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + DivF(LVar0, Float(100.0)) + Call(ShakeCam, CAM_DEFAULT, 0, 5, LVar0) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndIf + Loop(0) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(0.5)) + EndLoop + Return + End }; s32 N(Kolorado_Wander1)[] = { @@ -104,63 +104,63 @@ s32 N(Kolorado_Wander2)[] = { }; EvtScript N(EVS_Kolorado_CalmIdle) = { - EVT_SET_GROUP(EVT_GROUP_EF) - EVT_LABEL(0) - EVT_CALL(RandInt, 1, LVar1) - EVT_IF_EQ(LVar1, 0) - EVT_USE_BUF(N(Kolorado_Wander1)) - EVT_ELSE - EVT_USE_BUF(N(Kolorado_Wander2)) - EVT_END_IF - EVT_LABEL(10) - EVT_BUF_READ3(LVar1, LVar2, LVar3) - EVT_IF_EQ(LVar1, -1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetNpcSpeed, NPC_Kolorado, LVar1) - EVT_CALL(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Walk) - EVT_CALL(NpcMoveTo, NPC_Kolorado, LVar2, LVar3, 0) - EVT_BUF_READ1(LVar2) - EVT_CALL(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Idle) - EVT_WAIT(5) - EVT_CALL(RandInt, 2, LVar4) - EVT_ADD(LVar4, 1) - EVT_LOOP(LVar4) - EVT_CALL(GetNpcYaw, NPC_Kolorado, LVar5) - EVT_ADD(LVar5, 180) - EVT_IF_GT(LVar5, 360) - EVT_SUB(LVar5, 360) - EVT_END_IF - EVT_CALL(InterpNpcYaw, NPC_Kolorado, LVar5, 1) - EVT_WAIT(20) - EVT_END_LOOP - EVT_WAIT(LVar2) - EVT_GOTO(10) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_EF) + Label(0) + Call(RandInt, 1, LVar1) + IfEq(LVar1, 0) + UseBuf(N(Kolorado_Wander1)) + Else + UseBuf(N(Kolorado_Wander2)) + EndIf + Label(10) + BufRead3(LVar1, LVar2, LVar3) + IfEq(LVar1, -1) + Goto(0) + EndIf + Call(SetNpcSpeed, NPC_Kolorado, LVar1) + Call(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Walk) + Call(NpcMoveTo, NPC_Kolorado, LVar2, LVar3, 0) + BufRead1(LVar2) + Call(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Idle) + Wait(5) + Call(RandInt, 2, LVar4) + Add(LVar4, 1) + Loop(LVar4) + Call(GetNpcYaw, NPC_Kolorado, LVar5) + Add(LVar5, 180) + IfGt(LVar5, 360) + Sub(LVar5, 360) + EndIf + Call(InterpNpcYaw, NPC_Kolorado, LVar5, 1) + Wait(20) + EndLoop + Wait(LVar2) + Goto(10) + Return + End }; EvtScript N(EVS_KoloradoBurned_PlayerReaction) = { - EVT_CALL(GetPlayerPos, LVar0, LVar3, LVar2) - EVT_ADD(LVar3, 30) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcPos, NPC_Kolorado, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar1, LVar3) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcPos, NPC_Kolorado, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar1, LVar3) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar3, LVar2) + Add(LVar3, 30) + Loop(0) + Wait(1) + Call(GetNpcPos, NPC_Kolorado, LVar0, LVar1, LVar2) + IfGt(LVar1, LVar3) + BreakLoop + EndIf + EndLoop + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Loop(0) + Wait(1) + Call(GetNpcPos, NPC_Kolorado, LVar0, LVar1, LVar2) + IfLt(LVar1, LVar3) + BreakLoop + EndIf + EndLoop + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Return + End }; API_CALLABLE(N(func_80240A68_C96998)) { @@ -169,176 +169,176 @@ API_CALLABLE(N(func_80240A68_C96998)) { } EvtScript N(EVS_NpcIdle_Kolorado) = { - EVT_EXEC_GET_TID(N(EVS_Kolorado_CalmIdle), LVar9) + ExecGetTID(N(EVS_Kolorado_CalmIdle), LVar9) // wait for scene to begin - EVT_LABEL(0) - EVT_WAIT(1) - EVT_IF_NE(MV_SceneState, SCENE_STATE_BEGIN) - EVT_GOTO(0) - EVT_END_IF - EVT_KILL_THREAD(LVar9) - EVT_WAIT(10) + Label(0) + Wait(1) + IfNe(MV_SceneState, SCENE_STATE_BEGIN) + Goto(0) + EndIf + KillThread(LVar9) + Wait(10) // cutscene actions - EVT_LABEL(10) - EVT_SWITCH(MV_SceneState) - EVT_CASE_EQ(SCENE_STATE_BEGIN) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 1) - EVT_CALL(SetNpcPos, NPC_SELF, -30, 100, 40) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.0)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, -25, 125, -20, 10) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 20, 150, 5, 10) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(3.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, 40, 35, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_010A) - EVT_SET(MV_SceneState, SCENE_STATE_STARFISH_REMARK) - EVT_CASE_EQ(SCENE_STATE_KOLORADO_LOOKS_AROUND) - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_ADD(LVar3, -30) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 4) - EVT_WAIT(10) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 4) - EVT_WAIT(10) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 4) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(2.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, 20, 0, 0) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, -35, 125, -20, 12) - EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(1.0)) - EVT_LABEL(25) - EVT_CALL(NpcMoveTo, NPC_SELF, -15, -20, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, -40, -20, 0) - EVT_IF_EQ(AF_KZN20_SceneSync, FALSE) - EVT_WAIT(1) - EVT_GOTO(25) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 5, MSG_CH5_010B) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 15, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(15) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.5)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_CALL(NpcJump0, NPC_SELF, LVar3, LVar4, LVar5, 8) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) - EVT_THREAD - EVT_WAIT(8) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 5, MSG_CH5_010C) - EVT_SET(AF_KZN_RumblingIntensified, TRUE) - EVT_CALL(SetMusicTrack, 0, SONG_VOLCANO_ESCAPE, 0, 8) - EVT_WAIT(20) - EVT_THREAD - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_WAIT(60) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Yell) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Yell, 0, MSG_CH5_010D) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.0)) - EVT_SET(MV_SceneState, SCENE_STATE_KOLORADO_WENT_BACK) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, -30, 100, 40, 10) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, -15, 75, 80, 10) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 35, 50, 120, 10) - EVT_CASE_EQ(SCENE_STATE_KOLORADO_WARNED) - EVT_CALL(N(func_80240A68_C96998)) - EVT_EXEC(N(EVS_KoloradoBurned_PlayerReaction)) - EVT_THREAD - EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH5_010F, 160, 40) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, -10) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, 1, 10) - EVT_IF_EQ(MV_SceneState, SCENE_STATE_KOLORADO_BURNED) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Hurt) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.8)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_TOUCH_LAVA, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump1, NPC_SELF, LVar0, LVar1, LVar2, 60) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) - EVT_SET(MV_SceneState, SCENE_STATE_KOLORADO_BURNED) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 100, 25, 100) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 100, 25, 100) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(450.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Panic, ANIM_Kolorado_Panic, 0, MSG_CH5_0110) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_SET(MV_SceneState, SCENE_STATE_MISSTAR_SPEAKS) - EVT_CASE_EQ(SCENE_STATE_KOLORADO_RETURN) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) - EVT_CALL(SetNpcPos, NPC_SELF, -30, 100, 40) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.0)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, -25, 125, -20, 10) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 20, 150, 5, 8) - EVT_SET(MV_SceneState, SCENE_STATE_SEARCH_FOR_EXIT) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(3.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, 75, -30, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Label(10) + Switch(MV_SceneState) + CaseEq(SCENE_STATE_BEGIN) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) + Call(InterpNpcYaw, NPC_SELF, 90, 1) + Call(SetNpcPos, NPC_SELF, -30, 100, 40) + Call(SetNpcJumpscale, NPC_SELF, Float(2.0)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, -25, 125, -20, 10) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 20, 150, 5, 10) + Call(SetNpcSpeed, NPC_SELF, Float(3.0)) + Call(NpcMoveTo, NPC_SELF, 40, 35, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_010A) + Set(MV_SceneState, SCENE_STATE_STARFISH_REMARK) + CaseEq(SCENE_STATE_KOLORADO_LOOKS_AROUND) + Call(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + Call(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) + Add(LVar3, -30) + Call(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetCamDistance, CAM_DEFAULT, Float(250.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(InterpNpcYaw, NPC_SELF, 270, 4) + Wait(10) + Call(InterpNpcYaw, NPC_SELF, 90, 4) + Wait(10) + Call(InterpNpcYaw, NPC_SELF, 270, 4) + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) + Call(SetNpcSpeed, NPC_SELF, Float(2.0)) + Call(NpcMoveTo, NPC_SELF, 20, 0, 0) + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, -35, 125, -20, 12) + Call(PlayerFaceNpc, NPC_SELF, FALSE) + Call(SetNpcSpeed, NPC_SELF, Float(1.0)) + Label(25) + Call(NpcMoveTo, NPC_SELF, -15, -20, 0) + Call(NpcMoveTo, NPC_SELF, -40, -20, 0) + IfEq(AF_KZN20_SceneSync, FALSE) + Wait(1) + Goto(25) + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 5, MSG_CH5_010B) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 15, EMOTER_NPC, 0, 0, 0, 0) + Wait(15) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) + Call(SetNpcJumpscale, NPC_SELF, Float(1.5)) + Call(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + Call(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + Call(NpcJump0, NPC_SELF, LVar3, LVar4, LVar5, 8) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) + Thread + Wait(8) + Call(NpcFacePlayer, NPC_SELF, 0) + EndThread + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 5, MSG_CH5_010C) + Set(AF_KZN_RumblingIntensified, TRUE) + Call(SetMusicTrack, 0, SONG_VOLCANO_ESCAPE, 0, 8) + Wait(20) + Thread + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + Wait(60) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndThread + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Yell) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Yell, 0, MSG_CH5_010D) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) + Call(SetNpcJumpscale, NPC_SELF, Float(2.0)) + Set(MV_SceneState, SCENE_STATE_KOLORADO_WENT_BACK) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, -30, 100, 40, 10) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, -15, 75, 80, 10) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 35, 50, 120, 10) + CaseEq(SCENE_STATE_KOLORADO_WARNED) + Call(N(func_80240A68_C96998)) + Exec(N(EVS_KoloradoBurned_PlayerReaction)) + Thread + Call(PlayerFaceNpc, NPC_SELF, FALSE) + Call(ShowMessageAtScreenPos, MSG_CH5_010F, 160, 40) + EndThread + Thread + Loop(0) + Wait(1) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar2, -10) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, 1, 10) + IfEq(MV_SceneState, SCENE_STATE_KOLORADO_BURNED) + BreakLoop + EndIf + EndLoop + EndThread + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Hurt) + Call(SetNpcJumpscale, NPC_SELF, Float(0.8)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_TOUCH_LAVA, SOUND_SPACE_DEFAULT) + Call(NpcJump1, NPC_SELF, LVar0, LVar1, LVar2, 60) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) + Set(MV_SceneState, SCENE_STATE_KOLORADO_BURNED) + Call(UseSettingsFrom, CAM_DEFAULT, 100, 25, 100) + Call(SetPanTarget, CAM_DEFAULT, 100, 25, 100) + Call(SetCamDistance, CAM_DEFAULT, Float(450.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-7.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Panic, ANIM_Kolorado_Panic, 0, MSG_CH5_0110) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Set(MV_SceneState, SCENE_STATE_MISSTAR_SPEAKS) + CaseEq(SCENE_STATE_KOLORADO_RETURN) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) + Call(SetNpcPos, NPC_SELF, -30, 100, 40) + Call(SetNpcJumpscale, NPC_SELF, Float(2.0)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, -25, 125, -20, 10) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 20, 150, 5, 8) + Set(MV_SceneState, SCENE_STATE_SEARCH_FOR_EXIT) + Call(SetNpcSpeed, NPC_SELF, Float(3.0)) + Call(NpcMoveTo, NPC_SELF, 75, -30, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + EndSwitch + Wait(1) + Goto(10) + Return + End }; EvtScript N(EVS_NpcInteract_Kolorado) = { - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar1, 100) - EVT_CALL(EnableNpcAI, NPC_SELF, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0108) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + IfLt(LVar1, 100) + Call(EnableNpcAI, NPC_SELF, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0108) EVT_LETTER_CHECK(Kolorado) - EVT_CALL(EnableNpcAI, NPC_SELF, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Yell, 0, MSG_CH5_0113) + Call(EnableNpcAI, NPC_SELF, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Yell, 0, MSG_CH5_0113) EVT_LETTER_CHECK(Kolorado) - EVT_END_IF - EVT_RETURN - EVT_END + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Kolorado) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Kolorado))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Kolorado))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Kolorado))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Kolorado))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; Vec3f N(FlightPath1)[] = { @@ -369,161 +369,161 @@ API_CALLABLE(N(GetFloorCollider)) { } EvtScript N(EVS_Scene_Misstar) = { - EVT_IF_EQ(AF_KZN20_MisstarFlightDone, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, -120, 70, 45) - EVT_WAIT(30) - EVT_SET(AF_KZN20_MisstarFlightDone, TRUE) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_CALL(LoadPath, 60, EVT_PTR(N(FlightPath1)), ARRAY_COUNT(N(FlightPath1)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_NE(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_END_IF + IfEq(AF_KZN20_MisstarFlightDone, FALSE) + Call(SetNpcPos, NPC_SELF, -120, 70, 45) + Wait(30) + Set(AF_KZN20_MisstarFlightDone, TRUE) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Call(LoadPath, 60, Ref(N(FlightPath1)), ARRAY_COUNT(N(FlightPath1)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) + Wait(1) + IfNe(LVar0, 1) + BreakLoop + EndIf + EndLoop + Call(InterpNpcYaw, NPC_SELF, 270, 0) + EndIf // wait for player to reach the top of the stairs - EVT_LABEL(0) - EVT_CALL(N(GetFloorCollider), LVar0) - EVT_IF_NE(LVar0, COLLIDER_o870) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(10) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(2.0)) - EVT_CALL(PlayerMoveTo, 60, 0, 0) - EVT_END_THREAD - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_SET(AF_KZN_RumblingIntensified, FALSE) - EVT_SET(MV_SceneState, SCENE_STATE_BEGIN) - EVT_LABEL(10) - EVT_SWITCH(MV_SceneState) - EVT_CASE_EQ(SCENE_STATE_STARFISH_REMARK) - EVT_SET(AF_KZN20_SceneSync, FALSE) - EVT_THREAD - EVT_WAIT(30) - EVT_SET(MV_SceneState, SCENE_STATE_KOLORADO_LOOKS_AROUND) - EVT_END_THREAD - EVT_SET(AF_KZN20_SceneSync, TRUE) - EVT_CASE_EQ(SCENE_STATE_KOLORADO_WENT_BACK) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_SET(MV_SceneState, SCENE_STATE_KOLORADO_CAM_SYNC) - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldMisstar_TalkAngry, ANIM_WorldMisstar_IdleAngry, 5, MSG_CH5_010E) - EVT_LABEL(30) - EVT_IF_EQ(MV_SceneState, SCENE_STATE_KOLORADO_WENT_BACK) - EVT_WAIT(1) - EVT_GOTO(30) - EVT_END_IF - EVT_SET(MV_SceneState, SCENE_STATE_KOLORADO_WARNED) - EVT_CASE_EQ(SCENE_STATE_MISSTAR_SPEAKS) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldMisstar_TalkAngry, ANIM_WorldMisstar_IdleAngry, 0, MSG_CH5_0111) - EVT_SET(MV_SceneState, SCENE_STATE_KOLORADO_RETURN) - EVT_CASE_EQ(SCENE_STATE_SEARCH_FOR_EXIT) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_WAIT(15) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_WAIT(15) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_WAIT(15) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(3.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, 145, -10, 0) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 15, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(20) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, -30, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldMisstar_Back) - EVT_CALL(SetNpcJumpscale, NPC_SELF, 0) - EVT_CALL(NpcJump0, NPC_SELF, 170, 170, 50, 20) - EVT_WAIT(5) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, -60, 0) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_CALL(NpcJump0, NPC_SELF, 145, 170, -10, 15) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldMisstar_IdleAngry) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, 0) - EVT_CALL(NpcJump1, NPC_SELF, 145, 160, -10, 5) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldMisstar_TalkAngry, ANIM_WorldMisstar_IdleAngry, 0, MSG_CH5_0112) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_SET(MV_SceneState, SCENE_STATE_DONE) - EVT_END_SWITCH - EVT_IF_NE(MV_SceneState, SCENE_STATE_DONE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_LABEL(90) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) - EVT_WAIT(1) - EVT_GOTO(90) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(40) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Kolorado, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Panic) - EVT_CALL(SetNpcSpeed, NPC_Kolorado, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_Kolorado, 305, 0, 0) - EVT_CALL(RemoveNpc, NPC_Kolorado) - EVT_END_THREAD - EVT_WAIT(30) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.5)) - EVT_CALL(NpcJump0, NPC_SELF, 145, 195, -10, 5) - EVT_WAIT(5) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldMisstar_Panic, ANIM_WorldMisstar_IdleAngry, 0, MSG_CH5_0115) - EVT_WAIT(5) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_CALL(LoadPath, 30, EVT_PTR(N(FlightPath2)), ARRAY_COUNT(N(FlightPath2)), EASING_LINEAR) - EVT_LABEL(91) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(91) - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Label(0) + Call(N(GetFloorCollider), LVar0) + IfNe(LVar0, COLLIDER_o870) + Wait(1) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Wait(10) + Thread + Wait(10) + Call(SetPlayerSpeed, Float(2.0)) + Call(PlayerMoveTo, 60, 0, 0) + EndThread + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(350.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Set(AF_KZN_RumblingIntensified, FALSE) + Set(MV_SceneState, SCENE_STATE_BEGIN) + Label(10) + Switch(MV_SceneState) + CaseEq(SCENE_STATE_STARFISH_REMARK) + Set(AF_KZN20_SceneSync, FALSE) + Thread + Wait(30) + Set(MV_SceneState, SCENE_STATE_KOLORADO_LOOKS_AROUND) + EndThread + Set(AF_KZN20_SceneSync, TRUE) + CaseEq(SCENE_STATE_KOLORADO_WENT_BACK) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(350.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Set(MV_SceneState, SCENE_STATE_KOLORADO_CAM_SYNC) + EndThread + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldMisstar_TalkAngry, ANIM_WorldMisstar_IdleAngry, 5, MSG_CH5_010E) + Label(30) + IfEq(MV_SceneState, SCENE_STATE_KOLORADO_WENT_BACK) + Wait(1) + Goto(30) + EndIf + Set(MV_SceneState, SCENE_STATE_KOLORADO_WARNED) + CaseEq(SCENE_STATE_MISSTAR_SPEAKS) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldMisstar_TalkAngry, ANIM_WorldMisstar_IdleAngry, 0, MSG_CH5_0111) + Set(MV_SceneState, SCENE_STATE_KOLORADO_RETURN) + CaseEq(SCENE_STATE_SEARCH_FOR_EXIT) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Wait(15) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Wait(15) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Wait(15) + Call(SetNpcSpeed, NPC_SELF, Float(3.0)) + Call(NpcMoveTo, NPC_SELF, 145, -10, 0) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 15, EMOTER_NPC, 0, 0, 0, 0) + Wait(20) + Call(SetNpcRotation, NPC_SELF, 0, -30, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldMisstar_Back) + Call(SetNpcJumpscale, NPC_SELF, 0) + Call(NpcJump0, NPC_SELF, 170, 170, 50, 20) + Wait(5) + Call(SetNpcRotation, NPC_SELF, 0, -60, 0) + Call(SetNpcYaw, NPC_SELF, 270) + Call(NpcJump0, NPC_SELF, 145, 170, -10, 15) + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldMisstar_IdleAngry) + Call(SetNpcRotation, NPC_SELF, 0, 0, 0) + Call(NpcJump1, NPC_SELF, 145, 160, -10, 5) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldMisstar_TalkAngry, ANIM_WorldMisstar_IdleAngry, 0, MSG_CH5_0112) + Call(NpcFacePlayer, NPC_SELF, 0) + Set(MV_SceneState, SCENE_STATE_DONE) + EndSwitch + IfNe(MV_SceneState, SCENE_STATE_DONE) + Wait(1) + Goto(10) + EndIf + Call(DisablePlayerInput, FALSE) + Label(90) + IfLt(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) + Wait(1) + Goto(90) + EndIf + Call(DisablePlayerInput, TRUE) + Wait(40) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) + Thread + Call(SetNpcFlagBits, NPC_Kolorado, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Panic) + Call(SetNpcSpeed, NPC_Kolorado, Float(5.0)) + Call(NpcMoveTo, NPC_Kolorado, 305, 0, 0) + Call(RemoveNpc, NPC_Kolorado) + EndThread + Wait(30) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcJumpscale, NPC_SELF, Float(0.5)) + Call(NpcJump0, NPC_SELF, 145, 195, -10, 5) + Wait(5) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldMisstar_Panic, ANIM_WorldMisstar_IdleAngry, 0, MSG_CH5_0115) + Wait(5) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Call(LoadPath, 30, Ref(N(FlightPath2)), ARRAY_COUNT(N(FlightPath2)), EASING_LINEAR) + Label(91) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(91) + EndIf + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_Misstar) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldMisstar_TalkAngry, ANIM_WorldMisstar_IdleAngry, 0, MSG_CH5_0114) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldMisstar_TalkAngry, ANIM_WorldMisstar_IdleAngry, 0, MSG_CH5_0114) + Return + End }; EvtScript N(EVS_NpcInit_Misstar) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH5_MT_LAVA_LAVA_ERUPTING) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldMisstar_IdleAngry) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_Scene_Misstar))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Misstar))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH5_MT_LAVA_LAVA_ERUPTING) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldMisstar_IdleAngry) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_Scene_Misstar))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Misstar))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_Kolorado) = { diff --git a/src/world/area_kzn/kzn_22/kzn_22_1_music.c b/src/world/area_kzn/kzn_22/kzn_22_1_music.c index 4a82776367e..5b7d73a3a8e 100644 --- a/src/world/area_kzn/kzn_22/kzn_22_1_music.c +++ b/src/world/area_kzn/kzn_22/kzn_22_1_music.c @@ -1,11 +1,11 @@ #include "kzn_22.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH5_MT_LAVA_LAVA_ERUPTING) - EVT_CALL(PlaySound, SOUND_LOOP_RUMBLE) - EVT_END_IF - EVT_CALL(SetMusicTrack, 0, SONG_VOLCANO_ESCAPE, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_4) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH5_MT_LAVA_LAVA_ERUPTING) + Call(PlaySound, SOUND_LOOP_RUMBLE) + EndIf + Call(SetMusicTrack, 0, SONG_VOLCANO_ESCAPE, 0, 8) + Call(PlayAmbientSounds, AMBIENT_LAVA_4) + Return + End }; diff --git a/src/world/area_kzn/kzn_22/kzn_22_2_main.c b/src/world/area_kzn/kzn_22/kzn_22_2_main.c index f59f3d839a9..0eb2262ff39 100644 --- a/src/world/area_kzn/kzn_22/kzn_22_2_main.c +++ b/src/world/area_kzn/kzn_22/kzn_22_2_main.c @@ -5,63 +5,63 @@ EvtScript N(EVS_ExitWalk_kzn_20_1) = EVT_EXIT_WALK_FIXED(60, kzn_22_ENTRY_0, "kzn_20", kzn_20_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(N(EVS_ExitWalk_kzn_20_1), TRIGGER_FLOOR_TOUCH, COLLIDER_deili1, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(N(EVS_ExitWalk_kzn_20_1), TRIGGER_FLOOR_TOUCH, COLLIDER_deili1, 1, 0) + Return + End }; EvtScript N(EVS_UpdateTexPan_LavaRiver) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(EnableTexPanning, MODEL_yougan1_1, TRUE) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LABEL(10) - EVT_CALL(SetTexPanOffset, TEX_PANNER_6, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_6, TEX_PANNER_AUX, LVar1, LVar2) - EVT_ADD(LVar0, -1100) - EVT_ADD(LVar1, 300) - EVT_ADD(LVar2, -500) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(EnableTexPanning, MODEL_yougan1_1, TRUE) + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Label(10) + Call(SetTexPanOffset, TEX_PANNER_6, TEX_PANNER_MAIN, LVar0, 0) + Call(SetTexPanOffset, TEX_PANNER_6, TEX_PANNER_AUX, LVar1, LVar2) + Add(LVar0, -1100) + Add(LVar1, 300) + Add(LVar2, -500) + Wait(1) + Goto(10) + Return + End }; EvtScript N(EVS_UpdateTexPan_LavaFall) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(EnableTexPanning, MODEL_yougan2_2, TRUE) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LABEL(10) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, LVar1) - EVT_ADD(LVar0, 300) - EVT_ADD(LVar1, -500) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(EnableTexPanning, MODEL_yougan2_2, TRUE) + Set(LVar0, 0) + Set(LVar1, 0) + Label(10) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, LVar1) + Add(LVar0, 300) + Add(LVar1, -500) + Wait(1) + Goto(10) + Return + End }; EvtScript N(EVS_InterruptPartnersInLava) = { - EVT_LOOP(0) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetModelCenter, MODEL_yu) - EVT_CALL(GetPlayerPos, LVar0, LVar3, LVar2) - EVT_IF_LT(LVar3, LVar1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(GetCurrentPartnerID, LVar1) - EVT_IF_NE(LVar1, PARTNER_LAKILESTER) - EVT_CALL(InterruptUsePartner) - EVT_CALL(SetPlayerActionState, ACTION_STATE_HIT_LAVA) - EVT_WAIT(30) - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Loop(0) + Wait(1) + Call(GetModelCenter, MODEL_yu) + Call(GetPlayerPos, LVar0, LVar3, LVar2) + IfLt(LVar3, LVar1) + BreakLoop + EndIf + EndLoop + Call(GetCurrentPartnerID, LVar1) + IfNe(LVar1, PARTNER_LAKILESTER) + Call(InterruptUsePartner) + Call(SetPlayerActionState, ACTION_STATE_HIT_LAVA) + Wait(30) + EndIf + EndLoop + Return + End }; API_CALLABLE(N(GetFloorCollider1)) { @@ -73,61 +73,61 @@ API_CALLABLE(N(GetFloorCollider1)) { } EvtScript N(EVS_UpdateLavaLevel) = { - EVT_SET_GROUP(EVT_GROUP_EF) - EVT_CALL(SetTexPanner, MODEL_yu1, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_yu, TEX_PANNER_2) - EVT_CALL(EnableModel, MODEL_yu, FALSE) - EVT_CALL(ParentColliderToModel, COLLIDER_o591, MODEL_yu) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 0) - EVT_SETF(LVar4, EVT_FLOAT(0.0)) - EVT_SETF(LVar5, EVT_FLOAT(0.0)) - EVT_SET(LVarA, 0) - EVT_LABEL(10) + SetGroup(EVT_GROUP_EF) + Call(SetTexPanner, MODEL_yu1, TEX_PANNER_2) + Call(SetTexPanner, MODEL_yu, TEX_PANNER_2) + Call(EnableModel, MODEL_yu, FALSE) + Call(ParentColliderToModel, COLLIDER_o591, MODEL_yu) + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Set(LVar3, 0) + SetF(LVar4, Float(0.0)) + SetF(LVar5, Float(0.0)) + Set(LVarA, 0) + Label(10) // update lava texture panning - EVT_CALL(UpdateColliderTransform, COLLIDER_o591) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar0, LVar1) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_AUX, LVar2, LVar3) - EVT_SUB(LVar0, 700) - EVT_ADD(LVar1, 700) - EVT_ADD(LVar2, 200) - EVT_SUB(LVar3, 300) + Call(UpdateColliderTransform, COLLIDER_o591) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar0, LVar1) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_AUX, LVar2, LVar3) + Sub(LVar0, 700) + Add(LVar1, 700) + Add(LVar2, 200) + Sub(LVar3, 300) // update lava level - EVT_SWITCH(LVarA) - EVT_CASE_EQ(0) + Switch(LVarA) + CaseEq(0) // state 0: wait for player to stand on one of the steps - EVT_CALL(N(GetFloorCollider1), LVar0) - EVT_IF_EQ(LVar0, COLLIDER_o357) - EVT_EXEC(N(EVS_InterruptPartnersInLava)) - EVT_CALL(EnableModel, MODEL_yu, TRUE) - EVT_CALL(EnableModel, MODEL_yu1, FALSE) - EVT_SET(LVarA, 10) // set state to 10 - EVT_END_IF - EVT_CASE_EQ(10) + Call(N(GetFloorCollider1), LVar0) + IfEq(LVar0, COLLIDER_o357) + Exec(N(EVS_InterruptPartnersInLava)) + Call(EnableModel, MODEL_yu, TRUE) + Call(EnableModel, MODEL_yu1, FALSE) + Set(LVarA, 10) // set state to 10 + EndIf + CaseEq(10) // state 10: raise the lava level - EVT_IF_LT(LVar4, 140) - EVT_SET(LVar5, EVT_FLOAT(1.5)) - EVT_ELSE - EVT_IF_EQ(AF_KZN22_FlewAway, FALSE) - EVT_SET(LVar5, EVT_FLOAT(0.0)) - EVT_ELSE - EVT_IF_LT(LVar4, 285) - EVT_SET(LVar5, EVT_FLOAT(2.8)) - EVT_ELSE - EVT_SET(LVar5, EVT_FLOAT(0.0)) - EVT_SET(LVarA, -1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH - EVT_ADDF(LVar4, LVar5) - EVT_CALL(TranslateModel, MODEL_yu, 0, LVar4, 0) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + IfLt(LVar4, 140) + Set(LVar5, Float(1.5)) + Else + IfEq(AF_KZN22_FlewAway, FALSE) + Set(LVar5, Float(0.0)) + Else + IfLt(LVar4, 285) + Set(LVar5, Float(2.8)) + Else + Set(LVar5, Float(0.0)) + Set(LVarA, -1) + EndIf + EndIf + EndIf + EndSwitch + AddF(LVar4, LVar5) + Call(TranslateModel, MODEL_yu, 0, LVar4, 0) + Wait(1) + Goto(10) + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -137,26 +137,26 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_LAVALAVA) - EVT_CALL(SetSpriteShading, SHADING_KZN_22) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_SET(LVar0, N(EVS_BindExitTriggers)) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o591, SURFACE_TYPE_LAVA) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_EXEC(N(EVS_UpdateTexPan_LavaRiver)) - EVT_EXEC(N(EVS_UpdateTexPan_LavaFall)) - EVT_EXEC(N(EVS_UpdateLavaLevel)) - EVT_SET(LVar0, MODEL_kem1) - EVT_EXEC(N(EVS_StartTexPanner_SmokeLeft)) - EVT_SET(LVar0, MODEL_kem2) - EVT_EXEC(N(EVS_StartTexPanner_SmokeRight)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_LAVALAVA) + Call(SetSpriteShading, SHADING_KZN_22) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Set(LVar0, N(EVS_BindExitTriggers)) + Exec(EnterWalk) + Wait(1) + Exec(N(EVS_SetupMusic)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o591, SURFACE_TYPE_LAVA) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + Exec(N(EVS_UpdateTexPan_LavaRiver)) + Exec(N(EVS_UpdateTexPan_LavaFall)) + Exec(N(EVS_UpdateLavaLevel)) + Set(LVar0, MODEL_kem1) + Exec(N(EVS_StartTexPanner_SmokeLeft)) + Set(LVar0, MODEL_kem2) + Exec(N(EVS_StartTexPanner_SmokeRight)) + Return + End }; diff --git a/src/world/area_kzn/kzn_22/kzn_22_3_entity.c b/src/world/area_kzn/kzn_22/kzn_22_3_entity.c index ad4522bafcf..4b1dd82f65c 100644 --- a/src/world/area_kzn/kzn_22/kzn_22_3_entity.c +++ b/src/world/area_kzn/kzn_22/kzn_22_3_entity.c @@ -2,12 +2,12 @@ #include "entity.h" EvtScript N(EVS_OpenChest) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 480, 235, 175, 0, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Chest), 480, 235, 175, 0, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_kzn/kzn_22/kzn_22_4_npc.c b/src/world/area_kzn/kzn_22/kzn_22_4_npc.c index 6af8c485a98..700b4939daa 100644 --- a/src/world/area_kzn/kzn_22/kzn_22_4_npc.c +++ b/src/world/area_kzn/kzn_22/kzn_22_4_npc.c @@ -18,71 +18,71 @@ API_CALLABLE(N(func_8024036C_C9A56C)) { #include "world/common/npc/StarSpirit.inc.c" EvtScript N(EVS_ShakeScreen) = { - EVT_LOOP(0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.5)) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(0.5)) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_Kolorado) = { - EVT_EXEC(N(EVS_ShakeScreen)) - EVT_LABEL(0) + Exec(N(EVS_ShakeScreen)) + Label(0) // wait for player to reach top of stairs - EVT_CALL(N(GetFloorCollider2), LVar0) - EVT_IF_NE(LVar0, COLLIDER_o544) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF + Call(N(GetFloorCollider2), LVar0) + IfNe(LVar0, COLLIDER_o544) + Wait(1) + Goto(0) + EndIf // start scene (but wait for player to stop being hurt if they fell in the lava) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetPlayerAnimation, LVar0) - EVT_IF_EQ(LVar0, ANIM_MarioW2_Thrown) - EVT_WAIT(35) - EVT_END_IF - EVT_WAIT(10) -EVT_END_IF //@bug unmatched endif - EVT_CALL(PlayerFaceNpc, NPC_Kolorado, FALSE) - EVT_SET(AF_KZN23_SceneStarted, TRUE) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(DisablePlayerInput, TRUE) + Call(GetPlayerAnimation, LVar0) + IfEq(LVar0, ANIM_MarioW2_Thrown) + Wait(35) + EndIf + Wait(10) +EndIf //@bug unmatched endif + Call(PlayerFaceNpc, NPC_Kolorado, FALSE) + Set(AF_KZN23_SceneStarted, TRUE) + Thread + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) // repeatedly jump for the treasure chest - EVT_LABEL(1) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.0)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 15) - EVT_IF_EQ(AF_KZN23_GrabbedKolorado, FALSE) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-4.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(480.0), EVT_FLOAT(299.6)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, 250, 210, 0) - EVT_END_THREAD - EVT_WAIT(20) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH5_0116, 440, 240, 165) - EVT_WAIT(20) - EVT_SET(AF_KZN23_MessageClosed, TRUE) - EVT_RETURN - EVT_END + Label(1) + Call(SetNpcJumpscale, NPC_SELF, Float(2.0)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 15) + IfEq(AF_KZN23_GrabbedKolorado, FALSE) + Wait(1) + Goto(1) + EndIf + EndThread + Wait(10) + Call(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + Call(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetCamDistance, CAM_DEFAULT, Float(350.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-4.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(480.0), Float(299.6)) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, 250, 210, 0) + EndThread + Wait(20) + Call(ShowMessageAtWorldPos, MSG_CH5_0116, 440, 240, 165) + Wait(20) + Set(AF_KZN23_MessageClosed, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_Kolorado) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Kolorado))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Kolorado))) + Return + End }; Vec3f N(FlightPath1)[] = { @@ -119,148 +119,148 @@ Vec3f N(FlightPath3)[] = { }; EvtScript N(EVS_ControlCamera) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 400, 150, 200) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 400, 150, 200) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(390.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_LABEL(10) - EVT_WAIT(1) - EVT_IF_EQ(AF_KZN23_GrabbedKolorado, FALSE) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(SetPanTarget, CAM_DEFAULT, 300, 150, 170) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(450.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.3)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_LABEL(20) - EVT_WAIT(1) - EVT_IF_EQ(AF_KZN22_FlewAway, FALSE) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(SetPanTarget, CAM_DEFAULT, 368, 310, 170) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.8)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, 400, 150, 200) + Call(SetPanTarget, CAM_DEFAULT, 400, 150, 200) + Call(SetCamDistance, CAM_DEFAULT, Float(390.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-9.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Label(10) + Wait(1) + IfEq(AF_KZN23_GrabbedKolorado, FALSE) + Goto(10) + EndIf + Call(SetPanTarget, CAM_DEFAULT, 300, 150, 170) + Call(SetCamDistance, CAM_DEFAULT, Float(450.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-7.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.3)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Label(20) + Wait(1) + IfEq(AF_KZN22_FlewAway, FALSE) + Goto(20) + EndIf + Call(SetPanTarget, CAM_DEFAULT, 368, 310, 170) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.8)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_SetCharacterPositions) = { - EVT_CALL(SetNpcPos, NPC_Misstar, LVar4, LVar2, LVar3) - EVT_ADD(LVar4, 10) - EVT_SUB(LVar3, 5) - EVT_CALL(SetNpcPos, NPC_Kolorado, LVar4, LVar2, LVar3) - EVT_IF_EQ(AF_KZN23_GrabbedPlayer, TRUE) - EVT_SUB(LVar4, 20) - EVT_ADD(LVar3, 10) - EVT_CALL(SetPlayerPos, LVar4, LVar2, LVar3) - EVT_ADD(LVar2, 20) - EVT_ADD(LVar3, -5) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar4, LVar2, LVar3) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Misstar, LVar4, LVar2, LVar3) + Add(LVar4, 10) + Sub(LVar3, 5) + Call(SetNpcPos, NPC_Kolorado, LVar4, LVar2, LVar3) + IfEq(AF_KZN23_GrabbedPlayer, TRUE) + Sub(LVar4, 20) + Add(LVar3, 10) + Call(SetPlayerPos, LVar4, LVar2, LVar3) + Add(LVar2, 20) + Add(LVar3, -5) + Call(SetNpcPos, NPC_PARTNER, LVar4, LVar2, LVar3) + EndIf + Return + End }; EvtScript N(EVS_Scene_Misstar) = { - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_NE(AF_KZN23_MessageClosed, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Kolorado, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_EXEC(N(EVS_ControlCamera)) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(3.0)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 10) - EVT_WAIT(5) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_CALL(LoadPath, 35, EVT_PTR(N(FlightPath1)), ARRAY_COUNT(N(FlightPath1)), EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_SET(AF_KZN23_GrabbedKolorado, TRUE) - EVT_CALL(SetNpcRotationPivot, NPC_Kolorado, 10) - EVT_CALL(SetNpcRotation, NPC_Kolorado, 0, 0, 180) - EVT_CALL(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Panic) - EVT_THREAD - EVT_WAIT(32) - EVT_CALL(SetPlayerJumpscale, 0) - EVT_CALL(PlayerJump, 245, 171, 176, 8) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(32) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, 0) - EVT_CALL(NpcJump0, NPC_PARTNER, 245, 191, 171, 8) - EVT_END_THREAD - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_CALL(LoadPath, 40, EVT_PTR(N(FlightPath2)), ARRAY_COUNT(N(FlightPath2)), EASING_LINEAR) - EVT_LABEL(20) - EVT_CALL(GetNextPathPos) - EVT_SET(LVar4, LVar1) - EVT_EXEC_WAIT(N(EVS_SetCharacterPositions)) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_SET(AF_KZN23_GrabbedPlayer, TRUE) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Carried) - EVT_THREAD - EVT_WAIT(25) - EVT_SET(AF_KZN22_FlewAway, TRUE) - EVT_CALL(N(func_8024036C_C9A56C)) - EVT_END_THREAD - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_CALL(LoadPath, 70, EVT_PTR(N(FlightPath3)), ARRAY_COUNT(N(FlightPath3)), EASING_LINEAR) - EVT_LABEL(21) - EVT_CALL(GetNextPathPos) - EVT_SET(LVar4, LVar1) - EVT_EXEC_WAIT(N(EVS_SetCharacterPositions)) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(21) - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(MakeLerp, 300, 500, 20, EASING_CUBIC_IN) - EVT_CALL(GetNpcPos, NPC_SELF, LVar5, LVar2, LVar6) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(LVar4, LVar5) - EVT_SET(LVar2, LVar0) - EVT_SET(LVar3, LVar6) - EVT_EXEC_WAIT(N(EVS_SetCharacterPositions)) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(GotoMap, EVT_PTR("kzn_23"), kzn_23_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Loop(0) + Wait(1) + IfNe(AF_KZN23_MessageClosed, FALSE) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Kolorado, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Exec(N(EVS_ControlCamera)) + Call(SetNpcJumpscale, NPC_SELF, Float(3.0)) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 10) + Wait(5) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Call(LoadPath, 35, Ref(N(FlightPath1)), ARRAY_COUNT(N(FlightPath1)), EASING_LINEAR) + Label(10) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(10) + EndIf + Set(AF_KZN23_GrabbedKolorado, TRUE) + Call(SetNpcRotationPivot, NPC_Kolorado, 10) + Call(SetNpcRotation, NPC_Kolorado, 0, 0, 180) + Call(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Panic) + Thread + Wait(32) + Call(SetPlayerJumpscale, 0) + Call(PlayerJump, 245, 171, 176, 8) + EndThread + Thread + Wait(32) + Call(SetNpcJumpscale, NPC_PARTNER, 0) + Call(NpcJump0, NPC_PARTNER, 245, 191, 171, 8) + EndThread + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Call(LoadPath, 40, Ref(N(FlightPath2)), ARRAY_COUNT(N(FlightPath2)), EASING_LINEAR) + Label(20) + Call(GetNextPathPos) + Set(LVar4, LVar1) + ExecWait(N(EVS_SetCharacterPositions)) + IfEq(LVar0, 1) + Goto(20) + EndIf + Set(AF_KZN23_GrabbedPlayer, TRUE) + Wait(1) + Call(SetPlayerAnimation, ANIM_MarioW2_Carried) + Thread + Wait(25) + Set(AF_KZN22_FlewAway, TRUE) + Call(N(func_8024036C_C9A56C)) + EndThread + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Call(LoadPath, 70, Ref(N(FlightPath3)), ARRAY_COUNT(N(FlightPath3)), EASING_LINEAR) + Label(21) + Call(GetNextPathPos) + Set(LVar4, LVar1) + ExecWait(N(EVS_SetCharacterPositions)) + IfEq(LVar0, 1) + Goto(21) + EndIf + Wait(1) + Call(MakeLerp, 300, 500, 20, EASING_CUBIC_IN) + Call(GetNpcPos, NPC_SELF, LVar5, LVar2, LVar6) + Loop(0) + Call(UpdateLerp) + Set(LVar4, LVar5) + Set(LVar2, LVar0) + Set(LVar3, LVar6) + ExecWait(N(EVS_SetCharacterPositions)) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(GotoMap, Ref("kzn_23"), kzn_23_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_NpcInit_Misstar) = { - EVT_CALL(SetNpcPos, NPC_SELF, 300, 180, 80) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldMisstar_IdleAngry) - EVT_SET(AF_KZN23_SceneStarted, FALSE) - EVT_SET(AF_KZN23_MessageClosed, FALSE) - EVT_SET(AF_KZN23_GrabbedKolorado, FALSE) - EVT_SET(AF_KZN23_GrabbedPlayer, FALSE) - EVT_SET(AF_KZN22_FlewAway, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_Scene_Misstar))) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, 300, 180, 80) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldMisstar_IdleAngry) + Set(AF_KZN23_SceneStarted, FALSE) + Set(AF_KZN23_MessageClosed, FALSE) + Set(AF_KZN23_GrabbedKolorado, FALSE) + Set(AF_KZN23_GrabbedPlayer, FALSE) + Set(AF_KZN22_FlewAway, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_Scene_Misstar))) + Return + End }; NpcData N(NpcData_Kolorado) = { diff --git a/src/world/area_kzn/kzn_23/kzn_23_1_music.c b/src/world/area_kzn/kzn_23/kzn_23_1_music.c index 147f1ecdb12..4f604418233 100644 --- a/src/world/area_kzn/kzn_23/kzn_23_1_music.c +++ b/src/world/area_kzn/kzn_23/kzn_23_1_music.c @@ -1,8 +1,8 @@ #include "kzn_23.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_VOLCANO_ESCAPE, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_5) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_VOLCANO_ESCAPE, 0, 8) + Call(PlayAmbientSounds, AMBIENT_LAVA_5) + Return + End }; diff --git a/src/world/area_kzn/kzn_23/kzn_23_2_main.c b/src/world/area_kzn/kzn_23/kzn_23_2_main.c index 81e24d14fd6..f27d0b15e30 100644 --- a/src/world/area_kzn/kzn_23/kzn_23_2_main.c +++ b/src/world/area_kzn/kzn_23/kzn_23_2_main.c @@ -10,67 +10,67 @@ s32 N(LavaFluctuationOffsets)[] = { // overlay a sinusoidal offset to the lava level EvtScript N(EVS_ModulateLavaLevel) = { - EVT_LOOP(0) - EVT_USE_BUF(N(LavaFluctuationOffsets)) - EVT_LOOP(ARRAY_COUNT(N(LavaFluctuationOffsets))) - EVT_BUF_READ1(LVar1) - EVT_ADD(MV_LavaLevel, LVar1) - EVT_WAIT(3) - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + UseBuf(N(LavaFluctuationOffsets)) + Loop(ARRAY_COUNT(N(LavaFluctuationOffsets))) + BufRead1(LVar1) + Add(MV_LavaLevel, LVar1) + Wait(3) + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_RaiseLava) = { - EVT_EXEC(N(EVS_ModulateLavaLevel)) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, MODEL_yu, TEX_PANNER_0) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 0) - EVT_SET(MV_LavaLevel, -105) - EVT_SET(LVar5, 40) - EVT_CALL(TranslateModel, MODEL_yu, 0, MV_LavaLevel, 0) - EVT_WAIT(6) - EVT_LABEL(10) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, LVar0, LVar1) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_AUX, LVar2, LVar3) - EVT_SUB(LVar0, 700) - EVT_ADD(LVar1, 700) - EVT_ADD(LVar2, 200) - EVT_SUB(LVar3, 300) - EVT_IF_EQ(LVar5, 40) - EVT_IF_LT(MV_LavaLevel, 2700) - EVT_ADD(MV_LavaLevel, 20) - EVT_ELSE - EVT_SUB(LVar5, 1) - EVT_END_IF - EVT_ELSE - EVT_IF_NE(LVar5, 0) - EVT_SUB(LVar5, 1) - EVT_SUB(MV_LavaLevel, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(TranslateModel, MODEL_yu, 0, MV_LavaLevel, 0) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Exec(N(EVS_ModulateLavaLevel)) + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, MODEL_yu, TEX_PANNER_0) + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Set(LVar3, 0) + Set(MV_LavaLevel, -105) + Set(LVar5, 40) + Call(TranslateModel, MODEL_yu, 0, MV_LavaLevel, 0) + Wait(6) + Label(10) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, LVar0, LVar1) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_AUX, LVar2, LVar3) + Sub(LVar0, 700) + Add(LVar1, 700) + Add(LVar2, 200) + Sub(LVar3, 300) + IfEq(LVar5, 40) + IfLt(MV_LavaLevel, 2700) + Add(MV_LavaLevel, 20) + Else + Sub(LVar5, 1) + EndIf + Else + IfNe(LVar5, 0) + Sub(LVar5, 1) + Sub(MV_LavaLevel, 1) + EndIf + EndIf + Call(TranslateModel, MODEL_yu, 0, MV_LavaLevel, 0) + Wait(1) + Goto(10) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_LAVALAVA) - EVT_CALL(SetSpriteShading, SHADING_KZN_23) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_RaiseLava)) - EVT_SET(LVar0, MODEL_kem1) - EVT_EXEC(N(EVS_StartTexPanner_SmokeLeft)) - EVT_SET(LVar0, MODEL_kem2) - EVT_EXEC(N(EVS_StartTexPanner_SmokeRight)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_LAVALAVA) + Call(SetSpriteShading, SHADING_KZN_23) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_RaiseLava)) + Set(LVar0, MODEL_kem1) + Exec(N(EVS_StartTexPanner_SmokeLeft)) + Set(LVar0, MODEL_kem2) + Exec(N(EVS_StartTexPanner_SmokeRight)) + Return + End }; diff --git a/src/world/area_kzn/kzn_23/kzn_23_3_npc.c b/src/world/area_kzn/kzn_23/kzn_23_3_npc.c index 343d753d5b1..7691d0da993 100644 --- a/src/world/area_kzn/kzn_23/kzn_23_3_npc.c +++ b/src/world/area_kzn/kzn_23/kzn_23_3_npc.c @@ -73,35 +73,35 @@ API_CALLABLE(N(AnimateChestSize)) { #include "world/common/npc/StarSpirit.inc.c" EvtScript N(EVS_NpcIdle_Kolorado) = { - EVT_WAIT(30) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Panic, 5, MSG_CH5_0117) - EVT_RETURN - EVT_END + Wait(30) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Panic, 5, MSG_CH5_0117) + Return + End }; EvtScript N(EVS_NpcInit_Kolorado) = { - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 1) - EVT_WAIT(1) - EVT_CALL(SetNpcRotationPivot, NPC_SELF, 10) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, 180) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Kolorado))) - EVT_RETURN - EVT_END + Call(InterpNpcYaw, NPC_SELF, 90, 1) + Wait(1) + Call(SetNpcRotationPivot, NPC_SELF, 10) + Call(SetNpcRotation, NPC_SELF, 0, 0, 180) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Kolorado))) + Return + End }; EvtScript N(EVS_CameraFollowMisstar) = { - EVT_LABEL(0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(GetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 60) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar1, 2740) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Label(0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(GetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) + Add(LVar1, 60) + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfLt(LVar1, 2740) + Wait(1) + Goto(0) + EndIf + Return + End }; Vec3f N(PyroclastPathA)[] = { @@ -139,141 +139,141 @@ s32 N(SoundXPositions)[] = { }; EvtScript N(EVS_PlayPyroclastSounds) = { - EVT_ADD(LVar0, 1) - EVT_USE_BUF(N(SoundXPositions)) - EVT_LOOP(LVar0) - EVT_BUF_READ1(LVar1) - EVT_END_LOOP - EVT_IF_EQ(AF_KZN23_UseAlternateSound, FALSE) - EVT_CALL(PlaySoundAt, SOUND_FLYING_PYROCLAST_1, SOUND_SPACE_DEFAULT, LVar1, 2800, 0) - EVT_SET(AF_KZN23_UseAlternateSound, TRUE) - EVT_ELSE - EVT_CALL(PlaySoundAt, SOUND_FLYING_PYROCLAST_2, SOUND_SPACE_DEFAULT, LVar1, 2800, 0) - EVT_SET(AF_KZN23_UseAlternateSound, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END + Add(LVar0, 1) + UseBuf(N(SoundXPositions)) + Loop(LVar0) + BufRead1(LVar1) + EndLoop + IfEq(AF_KZN23_UseAlternateSound, FALSE) + Call(PlaySoundAt, SOUND_FLYING_PYROCLAST_1, SOUND_SPACE_DEFAULT, LVar1, 2800, 0) + Set(AF_KZN23_UseAlternateSound, TRUE) + Else + Call(PlaySoundAt, SOUND_FLYING_PYROCLAST_2, SOUND_SPACE_DEFAULT, LVar1, 2800, 0) + Set(AF_KZN23_UseAlternateSound, FALSE) + EndIf + Return + End }; EvtScript N(EVS_SpawnPyroclasts) = { - EVT_LOOP(0) - EVT_THREAD - EVT_CALL(RandInt, 3, LVar0) - EVT_EXEC(N(EVS_PlayPyroclastSounds)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_PLAY_EFFECT(EFFECT_65, 2, 50, 2650, -20, 1, 0) - EVT_SET(LVarE, LVarF) - EVT_CALL(LoadPath, 15, EVT_PTR(N(PyroclastPathA)), ARRAY_COUNT(N(PyroclastPathA)), EASING_QUADRATIC_OUT) - EVT_CASE_EQ(1) - EVT_PLAY_EFFECT(EFFECT_65, 2, -20, 2650, -20, 1, 0) - EVT_SET(LVarE, LVarF) - EVT_CALL(LoadPath, 10, EVT_PTR(N(PyroclastPathB)), ARRAY_COUNT(N(PyroclastPathB)), EASING_QUADRATIC_OUT) - EVT_CASE_EQ(2) - EVT_PLAY_EFFECT(EFFECT_65, 2, 10, 2650, -20, 1, 0) - EVT_SET(LVarE, LVarF) - EVT_CALL(LoadPath, 15, EVT_PTR(N(PyroclastPathC)), ARRAY_COUNT(N(PyroclastPathC)), EASING_QUADRATIC_OUT) - EVT_CASE_EQ(3) - EVT_PLAY_EFFECT(EFFECT_65, 2, -50, 2650, -20, 1, 0) - EVT_SET(LVarE, LVarF) - EVT_CALL(LoadPath, 20, EVT_PTR(N(PyroclastPathD)), ARRAY_COUNT(N(PyroclastPathD)), EASING_QUADRATIC_OUT) - EVT_END_SWITCH - EVT_CALL(RandInt, 1, LVar4) - EVT_IF_EQ(LVar4, 0) - EVT_SET(LVar4, -1) - EVT_END_IF - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_MUL(LVar1, LVar4) - EVT_CALL(N(SetPyroclastPos), LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DismissEffect, LVarE) - EVT_END_THREAD - EVT_WAIT(8) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Thread + Call(RandInt, 3, LVar0) + Exec(N(EVS_PlayPyroclastSounds)) + Switch(LVar0) + CaseEq(0) + PlayEffect(EFFECT_65, 2, 50, 2650, -20, 1, 0) + Set(LVarE, LVarF) + Call(LoadPath, 15, Ref(N(PyroclastPathA)), ARRAY_COUNT(N(PyroclastPathA)), EASING_QUADRATIC_OUT) + CaseEq(1) + PlayEffect(EFFECT_65, 2, -20, 2650, -20, 1, 0) + Set(LVarE, LVarF) + Call(LoadPath, 10, Ref(N(PyroclastPathB)), ARRAY_COUNT(N(PyroclastPathB)), EASING_QUADRATIC_OUT) + CaseEq(2) + PlayEffect(EFFECT_65, 2, 10, 2650, -20, 1, 0) + Set(LVarE, LVarF) + Call(LoadPath, 15, Ref(N(PyroclastPathC)), ARRAY_COUNT(N(PyroclastPathC)), EASING_QUADRATIC_OUT) + CaseEq(3) + PlayEffect(EFFECT_65, 2, -50, 2650, -20, 1, 0) + Set(LVarE, LVarF) + Call(LoadPath, 20, Ref(N(PyroclastPathD)), ARRAY_COUNT(N(PyroclastPathD)), EASING_QUADRATIC_OUT) + EndSwitch + Call(RandInt, 1, LVar4) + IfEq(LVar4, 0) + Set(LVar4, -1) + EndIf + Loop(0) + Call(GetNextPathPos) + Mul(LVar1, LVar4) + Call(N(SetPyroclastPos), LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(DismissEffect, LVarE) + EndThread + Wait(8) + EndLoop + Return + End }; EvtScript N(EVS_Scene_Misstar) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(N(AllowCameraInterpY)) - EVT_EXEC(N(EVS_CameraFollowMisstar)) - EVT_CALL(SetSelfVar, 0, 0) - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Carried) - EVT_END_THREAD + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(N(AllowCameraInterpY)) + Exec(N(EVS_CameraFollowMisstar)) + Call(SetSelfVar, 0, 0) + Thread + Wait(1) + Call(SetPlayerAnimation, ANIM_MarioW2_Carried) + EndThread // fly out of the volcano shaft - EVT_THREAD - EVT_CALL(MakeLerp, 0, 3090, 160, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SUB(LVar0, 100) - EVT_CALL(SetNpcPos, NPC_SELF, 0, LVar0, 0) - EVT_CALL(SetNpcPos, NPC_Kolorado, 10, LVar0, -5) - EVT_CALL(SetPlayerPos, -10, LVar0, 5) - EVT_ADD(LVar0, 20) - EVT_CALL(SetNpcPos, NPC_PARTNER, -10, LVar0, 0) - EVT_IF_GT(LVar0, 2840) - EVT_CALL(SetSelfVar, 0, 1) - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD + Thread + Call(MakeLerp, 0, 3090, 160, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Sub(LVar0, 100) + Call(SetNpcPos, NPC_SELF, 0, LVar0, 0) + Call(SetNpcPos, NPC_Kolorado, 10, LVar0, -5) + Call(SetPlayerPos, -10, LVar0, 5) + Add(LVar0, 20) + Call(SetNpcPos, NPC_PARTNER, -10, LVar0, 0) + IfGt(LVar0, 2840) + Call(SetSelfVar, 0, 1) + EndIf + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread // wait for escape - EVT_LABEL(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF + Label(0) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Wait(1) + Goto(0) + EndIf // make the pyroclasts + sounds - EVT_EXEC(N(EVS_SpawnPyroclasts)) - EVT_WAIT(35) + Exec(N(EVS_SpawnPyroclasts)) + Wait(35) // make the chest thrown from the volcano - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 0, 2650, 0, 148, MAKE_ENTITY_END) - EVT_SET(LVarA, LVar0) - EVT_THREAD - EVT_CALL(N(AnimateChestSize)) - EVT_END_THREAD - EVT_SET(LVar9, LVarA) - EVT_CALL(N(GetChestPosition), LVar9, LVar2, LVar3, LVar4) - EVT_CALL(MakeLerp, LVar3, 3000, 10, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetChestPosition), LVar9, LVar2, LVar0, LVar4) - EVT_ADD(LVar2, -1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP + Call(MakeEntity, Ref(Entity_Chest), 0, 2650, 0, 148, MAKE_ENTITY_END) + Set(LVarA, LVar0) + Thread + Call(N(AnimateChestSize)) + EndThread + Set(LVar9, LVarA) + Call(N(GetChestPosition), LVar9, LVar2, LVar3, LVar4) + Call(MakeLerp, LVar3, 3000, 10, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(N(SetChestPosition), LVar9, LVar2, LVar0, LVar4) + Add(LVar2, -1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop // end scene - EVT_WAIT(45) - EVT_CALL(GotoMap, EVT_PTR("jan_04"), jan_04_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Wait(45) + Call(GotoMap, Ref("jan_04"), jan_04_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_NpcInit_Misstar) = { - EVT_CALL(SetNpcPos, NPC_SELF, 0, -100, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldMisstar_IdleAngry) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_Scene_Misstar))) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, 0, -100, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldMisstar_IdleAngry) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_Scene_Misstar))) + Return + End }; NpcData N(NpcData_Kolorado) = { diff --git a/src/world/area_mac/mac_00/mac_00_10_shared_npc.c b/src/world/area_mac/mac_00/mac_00_10_shared_npc.c index 88c63893317..7b0936d5378 100644 --- a/src/world/area_mac/mac_00/mac_00_10_shared_npc.c +++ b/src/world/area_mac/mac_00/mac_00_10_shared_npc.c @@ -14,563 +14,563 @@ s32 N(LetterList_MissT)[] = { }; EvtScript N(EVS_LetterPrompt_MissT) = { - EVT_CALL(N(LetterDelivery_Init_Shared), + Call(N(LetterDelivery_Init_Shared), NPC_MissT, ANIM_Toadette_Orange_Talk, ANIM_Toadette_Orange_Idle, ITEM_LETTER_CHAIN_MISS_T, ITEM_LETTER_CHAIN_LITTLE_MOUSER, MSG_MAC_Gate_00FF, MSG_MAC_Gate_0100, MSG_MAC_Gate_0101, MSG_MAC_Gate_0102, - EVT_PTR(N(LetterList_MissT))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery_Shared)) - EVT_RETURN - EVT_END + Ref(N(LetterList_MissT))) + ExecWait(N(EVS_DoLetterDelivery_Shared)) + Return + End }; EvtScript N(EVS_Scene_ToadTownGreeting) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -225, 0, -300) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -225, 0, -300) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(800.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_WAIT(35 * DT) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.1 / DT)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -225, 0, -300) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(InterpNpcYaw, NPC_Toad_04, 230, 0) - EVT_CALL(SetNpcJumpscale, NPC_Toad_04, EVT_FLOAT(1.5)) - EVT_CALL(GetNpcPos, NPC_Toad_04, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Toad_04, LVar0, LVar1, LVar2, 5 * DT) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Toad_04, ANIM_Toad_Red_Run) - EVT_CALL(NpcMoveTo, NPC_Toad_04, -185, -295, 15 * DT) - EVT_CALL(SetNpcAnimation, NPC_Toad_04, ANIM_Toad_Red_Idle) - EVT_END_THREAD - EVT_WAIT(2) - EVT_CALL(PlayerMoveTo, -225, -300, 80) - EVT_CALL(SetPlayerPos, -225, 0, -300) - EVT_WAIT(50 * DT) - EVT_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Toad_04, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MAC_Gate_007E) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, -225, 0, -300) + Call(SetPanTarget, CAM_DEFAULT, -225, 0, -300) + Call(SetCamDistance, CAM_DEFAULT, Float(800.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Wait(35 * DT) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.1 / DT)) + Call(UseSettingsFrom, CAM_DEFAULT, -225, 0, -300) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(InterpNpcYaw, NPC_Toad_04, 230, 0) + Call(SetNpcJumpscale, NPC_Toad_04, Float(1.5)) + Call(GetNpcPos, NPC_Toad_04, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Toad_04, LVar0, LVar1, LVar2, 5 * DT) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Toad_04, ANIM_Toad_Red_Run) + Call(NpcMoveTo, NPC_Toad_04, -185, -295, 15 * DT) + Call(SetNpcAnimation, NPC_Toad_04, ANIM_Toad_Red_Idle) + EndThread + Wait(2) + Call(PlayerMoveTo, -225, -300, 80) + Call(SetPlayerPos, -225, 0, -300) + Wait(50 * DT) + Thread + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + EndThread + Call(SpeakToPlayer, NPC_Toad_04, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MAC_Gate_007E) + Call(DisablePlayerInput, FALSE) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Return + End }; EvtScript N(EVS_NpcInteract_Toad_04) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS) - EVT_SET(LVar0, MSG_MAC_Gate_007F) - EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) - EVT_SET(LVar0, MSG_MAC_Gate_0080) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_0081) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Gate_0082) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Gate_0083) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Gate_0084) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC00_DictionaryStolen, FALSE) - EVT_SET(LVar0, MSG_MAC_Gate_0085) - EVT_ELSE - EVT_IF_EQ(GF_MAC00_DictionaryReturned, FALSE) - EVT_SET(LVar0, MSG_MAC_Gate_0086) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Gate_0087) - EVT_END_IF - EVT_END_IF - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Gate_0088) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_0089) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Gate_008A) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Gate_008B) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Gate_008C) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_008D) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Gate_008E) - EVT_CASE_GE(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_Outro_002C) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_MET_STAR_SPIRITS) + Set(LVar0, MSG_MAC_Gate_007F) + CaseLt(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) + Set(LVar0, MSG_MAC_Gate_0080) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_0081) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Gate_0082) + Else + Set(LVar0, MSG_MAC_Gate_0083) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Gate_0084) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC00_DictionaryStolen, FALSE) + Set(LVar0, MSG_MAC_Gate_0085) + Else + IfEq(GF_MAC00_DictionaryReturned, FALSE) + Set(LVar0, MSG_MAC_Gate_0086) + Else + Set(LVar0, MSG_MAC_Gate_0087) + EndIf + EndIf + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Gate_0088) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_0089) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Gate_008A) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Gate_008B) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Gate_008C) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_008D) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Gate_008E) + CaseGe(STORY_EPILOGUE) + Set(LVar0, MSG_Outro_002C) + EndSwitch + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_Scene_CantLeaveTown) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(NpcFacePlayer, NPC_Toad_04, 0) - EVT_WAIT(5) - EVT_CALL(SpeakToPlayer, NPC_Toad_04, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_Outro_002D) - EVT_WAIT(10) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(4.0)) - EVT_CALL(PlayerMoveTo, -220, -250, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(NpcFacePlayer, NPC_Toad_04, 0) + Wait(5) + Call(SpeakToPlayer, NPC_Toad_04, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_Outro_002D) + Wait(10) + Call(SetPlayerSpeed, Float(4.0)) + Call(PlayerMoveTo, -220, -250, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_BlockExitToGoomaRoad) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Scene_CantLeaveTown)), TRIGGER_FLOOR_TOUCH, COLLIDER_o484, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_Scene_CantLeaveTown)), TRIGGER_FLOOR_TOUCH, COLLIDER_o484, 1, 0) + Return + End }; EvtScript N(EVS_NpcInteract_Toad_05) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS) - EVT_SET(LVar0, MSG_MAC_Gate_008F) - EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) - EVT_SET(LVar0, MSG_MAC_Gate_0090) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_0091) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Gate_0092) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Gate_0093) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Gate_0094) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC00_DictionaryStolen, FALSE) - EVT_SET(LVar0, MSG_MAC_Gate_0095) - EVT_ELSE - EVT_IF_EQ(GF_MAC00_DictionaryReturned, FALSE) - EVT_SET(LVar0, MSG_MAC_Gate_0096) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Gate_0097) - EVT_END_IF - EVT_END_IF - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Gate_0098) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_0099) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Gate_009A) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Gate_009B) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Gate_009C) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_009D) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Gate_009E) - EVT_CASE_GE(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_Outro_002E) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_MET_STAR_SPIRITS) + Set(LVar0, MSG_MAC_Gate_008F) + CaseLt(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) + Set(LVar0, MSG_MAC_Gate_0090) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_0091) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Gate_0092) + Else + Set(LVar0, MSG_MAC_Gate_0093) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Gate_0094) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC00_DictionaryStolen, FALSE) + Set(LVar0, MSG_MAC_Gate_0095) + Else + IfEq(GF_MAC00_DictionaryReturned, FALSE) + Set(LVar0, MSG_MAC_Gate_0096) + Else + Set(LVar0, MSG_MAC_Gate_0097) + EndIf + EndIf + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Gate_0098) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_0099) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Gate_009A) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Gate_009B) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Gate_009C) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_009D) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Gate_009E) + CaseGe(STORY_EPILOGUE) + Set(LVar0, MSG_Outro_002E) + EndSwitch + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInteract_Toad_06) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS) - EVT_SET(LVar0, MSG_MAC_Gate_009F) - EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) - EVT_SET(LVar0, MSG_MAC_Gate_00A0) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_00A1) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Gate_00A2) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Gate_00A3) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Gate_00A4) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC00_DictionaryStolen, FALSE) - EVT_SET(LVar0, MSG_MAC_Gate_00A5) - EVT_ELSE - EVT_IF_EQ(GF_MAC00_DictionaryReturned, FALSE) - EVT_SET(LVar0, MSG_MAC_Gate_00A6) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Gate_00A7) - EVT_END_IF - EVT_END_IF - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Gate_00A8) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_00A9) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Gate_00AA) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Gate_00AB) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Gate_00AC) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_00AD) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Gate_00AE) - EVT_CASE_GE(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_Outro_002F) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_MET_STAR_SPIRITS) + Set(LVar0, MSG_MAC_Gate_009F) + CaseLt(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) + Set(LVar0, MSG_MAC_Gate_00A0) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_00A1) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Gate_00A2) + Else + Set(LVar0, MSG_MAC_Gate_00A3) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Gate_00A4) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC00_DictionaryStolen, FALSE) + Set(LVar0, MSG_MAC_Gate_00A5) + Else + IfEq(GF_MAC00_DictionaryReturned, FALSE) + Set(LVar0, MSG_MAC_Gate_00A6) + Else + Set(LVar0, MSG_MAC_Gate_00A7) + EndIf + EndIf + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Gate_00A8) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_00A9) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Gate_00AA) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Gate_00AB) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Gate_00AC) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_00AD) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Gate_00AE) + CaseGe(STORY_EPILOGUE) + Set(LVar0, MSG_Outro_002F) + EndSwitch + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInteract_Lovers) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS) - EVT_SET(LVar0, MSG_MAC_Gate_00AF) - EVT_SET(LVar1, MSG_MAC_Gate_00B0) - EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) - EVT_SET(LVar0, MSG_MAC_Gate_00B1) - EVT_SET(LVar1, MSG_MAC_Gate_00B2) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_00B3) - EVT_SET(LVar1, MSG_MAC_Gate_00B4) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Gate_00B5) - EVT_SET(LVar1, MSG_MAC_Gate_00B6) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Gate_00B7) - EVT_SET(LVar1, MSG_MAC_Gate_00B8) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Gate_00B9) - EVT_SET(LVar1, MSG_MAC_Gate_00BA) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_ShyGuyBlockingTracks, FALSE) - EVT_SET(LVar0, MSG_MAC_Gate_00BB) - EVT_SET(LVar1, MSG_MAC_Gate_00BC) - EVT_ELSE - EVT_IF_EQ(GF_MAC03_ShyGuyChasedOff, FALSE) - EVT_SET(LVar0, MSG_MAC_Gate_00BD) - EVT_SET(LVar1, MSG_MAC_Gate_00BE) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Gate_00BF) - EVT_SET(LVar1, MSG_MAC_Gate_00C0) - EVT_END_IF - EVT_END_IF - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Gate_00C1) - EVT_SET(LVar1, MSG_MAC_Gate_00C2) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_00C3) - EVT_SET(LVar1, MSG_MAC_Gate_00C4) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Gate_00C5) - EVT_SET(LVar1, MSG_MAC_Gate_00C6) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Gate_00C7) - EVT_SET(LVar1, MSG_MAC_Gate_00C8) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Gate_00C9) - EVT_SET(LVar1, MSG_MAC_Gate_00CA) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_00CB) - EVT_SET(LVar1, MSG_MAC_Gate_00CC) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Gate_00CD) - EVT_SET(LVar1, MSG_MAC_Gate_00CE) - EVT_CASE_GE(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_Outro_0030) - EVT_SET(LVar1, MSG_Outro_0031) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_FickleLover, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 5, LVar0) - EVT_CALL(SpeakToPlayer, NPC_ShamelessLover, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 5, LVar1) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_MET_STAR_SPIRITS) + Set(LVar0, MSG_MAC_Gate_00AF) + Set(LVar1, MSG_MAC_Gate_00B0) + CaseLt(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) + Set(LVar0, MSG_MAC_Gate_00B1) + Set(LVar1, MSG_MAC_Gate_00B2) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_00B3) + Set(LVar1, MSG_MAC_Gate_00B4) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Gate_00B5) + Set(LVar1, MSG_MAC_Gate_00B6) + Else + Set(LVar0, MSG_MAC_Gate_00B7) + Set(LVar1, MSG_MAC_Gate_00B8) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Gate_00B9) + Set(LVar1, MSG_MAC_Gate_00BA) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_ShyGuyBlockingTracks, FALSE) + Set(LVar0, MSG_MAC_Gate_00BB) + Set(LVar1, MSG_MAC_Gate_00BC) + Else + IfEq(GF_MAC03_ShyGuyChasedOff, FALSE) + Set(LVar0, MSG_MAC_Gate_00BD) + Set(LVar1, MSG_MAC_Gate_00BE) + Else + Set(LVar0, MSG_MAC_Gate_00BF) + Set(LVar1, MSG_MAC_Gate_00C0) + EndIf + EndIf + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Gate_00C1) + Set(LVar1, MSG_MAC_Gate_00C2) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_00C3) + Set(LVar1, MSG_MAC_Gate_00C4) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Gate_00C5) + Set(LVar1, MSG_MAC_Gate_00C6) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Gate_00C7) + Set(LVar1, MSG_MAC_Gate_00C8) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Gate_00C9) + Set(LVar1, MSG_MAC_Gate_00CA) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_00CB) + Set(LVar1, MSG_MAC_Gate_00CC) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Gate_00CD) + Set(LVar1, MSG_MAC_Gate_00CE) + CaseGe(STORY_EPILOGUE) + Set(LVar0, MSG_Outro_0030) + Set(LVar1, MSG_Outro_0031) + EndSwitch + Call(SpeakToPlayer, NPC_FickleLover, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 5, LVar0) + Call(SpeakToPlayer, NPC_ShamelessLover, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 5, LVar1) + Return + End }; EvtScript N(EVS_NpcInteract_Toadette) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS) - EVT_SET(LVar0, MSG_MAC_Gate_00CF) - EVT_SET(LVar1, MSG_MAC_Gate_00D0) - EVT_SET(LVar2, MSG_MAC_Gate_00D1) - EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) - EVT_SET(LVar0, MSG_MAC_Gate_00D2) - EVT_SET(LVar1, MSG_MAC_Gate_00D3) - EVT_SET(LVar2, MSG_MAC_Gate_00D4) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_00D5) - EVT_SET(LVar1, MSG_MAC_Gate_00D6) - EVT_SET(LVar2, MSG_MAC_Gate_00D7) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Gate_00D8) - EVT_SET(LVar1, MSG_MAC_Gate_00D9) - EVT_SET(LVar2, MSG_MAC_Gate_00DA) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Gate_00DB) - EVT_SET(LVar1, MSG_MAC_Gate_00DC) - EVT_SET(LVar2, MSG_MAC_Gate_00DD) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Gate_00DE) - EVT_SET(LVar1, MSG_MAC_Gate_00DF) - EVT_SET(LVar2, MSG_MAC_Gate_00E0) - EVT_CASE_LT(STORY_CH4_RETURNED_STOREROOM_KEY) - EVT_IF_EQ(GF_MAC04_StoreroomKeyStolen, FALSE) - EVT_SET(LVar0, MSG_MAC_Gate_00E1) - EVT_SET(LVar1, MSG_MAC_Gate_00E2) - EVT_SET(LVar2, MSG_MAC_Gate_00E3) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Gate_00E4) - EVT_SET(LVar1, MSG_MAC_Gate_00E5) - EVT_SET(LVar2, MSG_MAC_Gate_00E6) - EVT_END_IF - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_00E7) - EVT_SET(LVar1, MSG_MAC_Gate_00E8) - EVT_SET(LVar2, MSG_MAC_Gate_00E9) - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Gate_00EA) - EVT_SET(LVar1, MSG_MAC_Gate_00EB) - EVT_SET(LVar2, MSG_MAC_Gate_00EC) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_00ED) - EVT_SET(LVar1, MSG_MAC_Gate_00EE) - EVT_SET(LVar2, MSG_MAC_Gate_00EF) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Gate_00F0) - EVT_SET(LVar1, MSG_MAC_Gate_00F1) - EVT_SET(LVar2, MSG_MAC_Gate_00F2) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Gate_00F3) - EVT_SET(LVar1, MSG_MAC_Gate_00F4) - EVT_SET(LVar2, MSG_MAC_Gate_00F5) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Gate_00F6) - EVT_SET(LVar1, MSG_MAC_Gate_00F7) - EVT_SET(LVar2, MSG_MAC_Gate_00F8) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_00F9) - EVT_SET(LVar1, MSG_MAC_Gate_00FA) - EVT_SET(LVar2, MSG_MAC_Gate_00FB) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Gate_00FC) - EVT_SET(LVar1, MSG_MAC_Gate_00FD) - EVT_SET(LVar2, MSG_MAC_Gate_00FE) - EVT_CASE_GE(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_Outro_0032) - EVT_SET(LVar1, MSG_Outro_0033) - EVT_SET(LVar2, MSG_Outro_0034) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_KrisT, ANIM_Toadette_Green_Talk, ANIM_Toadette_Green_Idle, 0, LVar0) - EVT_CALL(SpeakToPlayer, NPC_MissT, ANIM_Toadette_Orange_Talk, ANIM_Toadette_Orange_Idle, 0, LVar1) - EVT_CALL(SpeakToPlayer, NPC_FelissaT, ANIM_Toadette_Purple_Talk, ANIM_Toadette_Purple_Idle, 0, LVar2) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_MET_STAR_SPIRITS) + Set(LVar0, MSG_MAC_Gate_00CF) + Set(LVar1, MSG_MAC_Gate_00D0) + Set(LVar2, MSG_MAC_Gate_00D1) + CaseLt(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) + Set(LVar0, MSG_MAC_Gate_00D2) + Set(LVar1, MSG_MAC_Gate_00D3) + Set(LVar2, MSG_MAC_Gate_00D4) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_00D5) + Set(LVar1, MSG_MAC_Gate_00D6) + Set(LVar2, MSG_MAC_Gate_00D7) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Gate_00D8) + Set(LVar1, MSG_MAC_Gate_00D9) + Set(LVar2, MSG_MAC_Gate_00DA) + Else + Set(LVar0, MSG_MAC_Gate_00DB) + Set(LVar1, MSG_MAC_Gate_00DC) + Set(LVar2, MSG_MAC_Gate_00DD) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Gate_00DE) + Set(LVar1, MSG_MAC_Gate_00DF) + Set(LVar2, MSG_MAC_Gate_00E0) + CaseLt(STORY_CH4_RETURNED_STOREROOM_KEY) + IfEq(GF_MAC04_StoreroomKeyStolen, FALSE) + Set(LVar0, MSG_MAC_Gate_00E1) + Set(LVar1, MSG_MAC_Gate_00E2) + Set(LVar2, MSG_MAC_Gate_00E3) + Else + Set(LVar0, MSG_MAC_Gate_00E4) + Set(LVar1, MSG_MAC_Gate_00E5) + Set(LVar2, MSG_MAC_Gate_00E6) + EndIf + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_00E7) + Set(LVar1, MSG_MAC_Gate_00E8) + Set(LVar2, MSG_MAC_Gate_00E9) + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Gate_00EA) + Set(LVar1, MSG_MAC_Gate_00EB) + Set(LVar2, MSG_MAC_Gate_00EC) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_00ED) + Set(LVar1, MSG_MAC_Gate_00EE) + Set(LVar2, MSG_MAC_Gate_00EF) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Gate_00F0) + Set(LVar1, MSG_MAC_Gate_00F1) + Set(LVar2, MSG_MAC_Gate_00F2) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Gate_00F3) + Set(LVar1, MSG_MAC_Gate_00F4) + Set(LVar2, MSG_MAC_Gate_00F5) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Gate_00F6) + Set(LVar1, MSG_MAC_Gate_00F7) + Set(LVar2, MSG_MAC_Gate_00F8) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_00F9) + Set(LVar1, MSG_MAC_Gate_00FA) + Set(LVar2, MSG_MAC_Gate_00FB) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Gate_00FC) + Set(LVar1, MSG_MAC_Gate_00FD) + Set(LVar2, MSG_MAC_Gate_00FE) + CaseGe(STORY_EPILOGUE) + Set(LVar0, MSG_Outro_0032) + Set(LVar1, MSG_Outro_0033) + Set(LVar2, MSG_Outro_0034) + EndSwitch + Call(SpeakToPlayer, NPC_KrisT, ANIM_Toadette_Green_Talk, ANIM_Toadette_Green_Idle, 0, LVar0) + Call(SpeakToPlayer, NPC_MissT, ANIM_Toadette_Orange_Talk, ANIM_Toadette_Orange_Idle, 0, LVar1) + Call(SpeakToPlayer, NPC_FelissaT, ANIM_Toadette_Purple_Talk, ANIM_Toadette_Purple_Idle, 0, LVar2) + Return + End }; EvtScript N(EVS_NpcInteract_MissT) = { - EVT_EXEC_WAIT(N(EVS_NpcInteract_Toadette)) - EVT_EXEC_WAIT(N(EVS_LetterPrompt_MissT)) - EVT_IF_NE(LVarC, 0) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + ExecWait(N(EVS_NpcInteract_Toadette)) + ExecWait(N(EVS_LetterPrompt_MissT)) + IfNe(LVarC, 0) + Return + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Toad_08) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS) - EVT_SET(LVar0, MSG_MAC_Gate_0103) - EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) - EVT_SET(LVar0, MSG_MAC_Gate_0104) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_0105) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Gate_0106) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Gate_0107) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Gate_0108) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC00_DictionaryStolen, FALSE) - EVT_SET(LVar0, MSG_MAC_Gate_0109) - EVT_ELSE - EVT_IF_EQ(GF_MAC00_DictionaryReturned, FALSE) - EVT_SET(LVar0, MSG_MAC_Gate_010A) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Gate_010B) - EVT_END_IF - EVT_END_IF - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Gate_010C) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_010D) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Gate_010E) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Gate_010F) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Gate_0110) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_0111) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Gate_0112) - EVT_CASE_GE(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_Outro_0035) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_MET_STAR_SPIRITS) + Set(LVar0, MSG_MAC_Gate_0103) + CaseLt(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) + Set(LVar0, MSG_MAC_Gate_0104) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_0105) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Gate_0106) + Else + Set(LVar0, MSG_MAC_Gate_0107) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Gate_0108) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC00_DictionaryStolen, FALSE) + Set(LVar0, MSG_MAC_Gate_0109) + Else + IfEq(GF_MAC00_DictionaryReturned, FALSE) + Set(LVar0, MSG_MAC_Gate_010A) + Else + Set(LVar0, MSG_MAC_Gate_010B) + EndIf + EndIf + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Gate_010C) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_010D) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Gate_010E) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Gate_010F) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Gate_0110) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_0111) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Gate_0112) + CaseGe(STORY_EPILOGUE) + Set(LVar0, MSG_Outro_0035) + EndSwitch + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcAux_ShamelessLover) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Toadette_Pink_Still) - EVT_WAIT(3) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Toadette_Pink_Idle) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_Toadette_Pink_Still) + Wait(3) + Call(SetNpcAnimation, NPC_SELF, ANIM_Toadette_Pink_Idle) + Return + End }; EvtScript N(EVS_NpcAux_KrisT) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Toadette_Green_Still) - EVT_WAIT(2) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Toadette_Green_Idle) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_Toadette_Green_Still) + Wait(2) + Call(SetNpcAnimation, NPC_SELF, ANIM_Toadette_Green_Idle) + Return + End }; EvtScript N(EVS_NpcAux_MissT) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Toadette_Orange_Still) - EVT_WAIT(6) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Toadette_Orange_Idle) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_Toadette_Orange_Still) + Wait(6) + Call(SetNpcAnimation, NPC_SELF, ANIM_Toadette_Orange_Idle) + Return + End }; EvtScript N(EVS_NpcAux_FelissaT) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Toadette_Purple_Still) - EVT_WAIT(8) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Toadette_Purple_Idle) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_Toadette_Purple_Still) + Wait(8) + Call(SetNpcAnimation, NPC_SELF, ANIM_Toadette_Purple_Idle) + Return + End }; EvtScript N(EVS_NpcInteract_Toad_09) = { - EVT_CALL(FindKeyItem, ITEM_FIRST_DEGREE_CARD, LVar1) - EVT_CALL(FindKeyItem, ITEM_SECOND_DEGREE_CARD, LVar2) - EVT_CALL(FindKeyItem, ITEM_THIRD_DEGREE_CARD, LVar3) - EVT_CALL(FindKeyItem, ITEM_FOURTH_DEGREE_CARD, LVar4) - EVT_CALL(FindKeyItem, ITEM_DIPLOMA, LVar5) - EVT_IF_NE(LVar1, -1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_MAC_Gate_0114) - EVT_RETURN - EVT_END_IF - EVT_IF_NE(LVar2, -1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_MAC_Gate_0115) - EVT_RETURN - EVT_END_IF - EVT_IF_NE(LVar3, -1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_MAC_Gate_0116) - EVT_RETURN - EVT_END_IF - EVT_IF_NE(LVar4, -1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_MAC_Gate_0117) - EVT_RETURN - EVT_END_IF - EVT_IF_NE(LVar5, -1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_MAC_Gate_0118) - EVT_RETURN - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_MAC_Gate_0113) - EVT_RETURN - EVT_END + Call(FindKeyItem, ITEM_FIRST_DEGREE_CARD, LVar1) + Call(FindKeyItem, ITEM_SECOND_DEGREE_CARD, LVar2) + Call(FindKeyItem, ITEM_THIRD_DEGREE_CARD, LVar3) + Call(FindKeyItem, ITEM_FOURTH_DEGREE_CARD, LVar4) + Call(FindKeyItem, ITEM_DIPLOMA, LVar5) + IfNe(LVar1, -1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_MAC_Gate_0114) + Return + EndIf + IfNe(LVar2, -1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_MAC_Gate_0115) + Return + EndIf + IfNe(LVar3, -1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_MAC_Gate_0116) + Return + EndIf + IfNe(LVar4, -1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_MAC_Gate_0117) + Return + EndIf + IfNe(LVar5, -1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_MAC_Gate_0118) + Return + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_MAC_Gate_0113) + Return + End }; EvtScript N(EVS_NpcInit_Toad_04) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_04))) - EVT_IF_LT(GB_StoryProgress, STORY_EPILOGUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, mac_00_ENTRY_7) - EVT_EXEC(N(EVS_BlockExitToGoomaRoad)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_04))) + IfLt(GB_StoryProgress, STORY_EPILOGUE) + Return + EndIf + Call(GetEntryID, LVar0) + IfNe(LVar0, mac_00_ENTRY_7) + Exec(N(EVS_BlockExitToGoomaRoad)) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Toad_05) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_05))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_05))) + Return + End }; EvtScript N(EVS_NpcInit_Toad_06) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_06))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_06))) + Return + End }; EvtScript N(EVS_NpcInit_FickleLover) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lovers))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Lovers))) + Return + End }; EvtScript N(EVS_NpcInit_ShamelessLover) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lovers))) - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_ShamelessLover))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Lovers))) + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_ShamelessLover))) + Return + End }; EvtScript N(EVS_NpcInit_KrisT) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toadette))) - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_KrisT))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toadette))) + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_KrisT))) + Return + End }; EvtScript N(EVS_NpcInit_MissT) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_MissT))) - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_MissT))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_MissT))) + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_MissT))) + Return + End }; EvtScript N(EVS_NpcInit_FelissaT) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toadette))) - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_FelissaT))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toadette))) + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_FelissaT))) + Return + End }; EvtScript N(EVS_NpcInit_DojoSpectator) = { - EVT_IF_GE(GB_StoryProgress, STORY_EPILOGUE) - EVT_CALL(SetNpcPos, NPC_DojoSpectator, 350, 20, -100) - EVT_END_IF - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_08))) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_EPILOGUE) + Call(SetNpcPos, NPC_DojoSpectator, 350, 20, -100) + EndIf + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_08))) + Return + End }; EvtScript N(EVS_NpcInit_DojoFan) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_09))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_09))) + Return + End }; NpcData N(NpcData_SharedTownsfolk)[] = { diff --git a/src/world/area_mac/mac_00/mac_00_11_intro_npc.c b/src/world/area_mac/mac_00/mac_00_11_intro_npc.c index 813ee33d113..fe7d656060d 100644 --- a/src/world/area_mac/mac_00/mac_00_11_intro_npc.c +++ b/src/world/area_mac/mac_00/mac_00_11_intro_npc.c @@ -7,17 +7,17 @@ #define NAME_SUFFIX EvtScript N(EVS_NpcInit_Chan_Intro) = { - EVT_CALL(SetNpcPos, NPC_SELF, 570, 20, -150) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, 570, 20, -150) + Call(SetNpcYaw, NPC_SELF, 270) + Return + End }; EvtScript N(EVS_NpcInit_Lee_Intro) = { - EVT_CALL(SetNpcPos, NPC_SELF, 600, 20, -145) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, 600, 20, -145) + Call(SetNpcYaw, NPC_SELF, 270) + Return + End }; AnimID N(ExtraAnims_Chan_Intro)[] = { diff --git a/src/world/area_mac/mac_00/mac_00_12_intro.c b/src/world/area_mac/mac_00/mac_00_12_intro.c index d472447ae66..77b6f9b08d1 100644 --- a/src/world/area_mac/mac_00/mac_00_12_intro.c +++ b/src/world/area_mac/mac_00/mac_00_12_intro.c @@ -2,92 +2,92 @@ #include "sprite/player.h" EvtScript N(EVS_PlayerExitPipe_Intro) = { - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_CALL(SetPlayerPos, -100, -10, -370) - EVT_CALL(InterpPlayerYaw, 135, 0) - EVT_WAIT(2) - EVT_CALL(PlaySoundAtPlayer, SOUND_ENTER_PIPE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetPlayerImgFXFlags, IMGFX_FLAG_REVERSE_ANIM) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_VERTICAL_PIPE_CURL, 1, 1, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_LOOP(40) - EVT_ADD(LVar1, 1) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(HidePlayerShadow, FALSE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerPhysics, TRUE) + Call(HidePlayerShadow, TRUE) + Call(SetPlayerPos, -100, -10, -370) + Call(InterpPlayerYaw, 135, 0) + Wait(2) + Call(PlaySoundAtPlayer, SOUND_ENTER_PIPE, SOUND_SPACE_DEFAULT) + Call(SetPlayerImgFXFlags, IMGFX_FLAG_REVERSE_ANIM) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_VERTICAL_PIPE_CURL, 1, 1, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Loop(40) + Add(LVar1, 1) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) + Call(HidePlayerShadow, FALSE) + Call(DisablePlayerPhysics, FALSE) + Return + End }; EvtScript N(EVS_LuigiExitPipe_Intro) = { - EVT_CALL(EnableNpcShadow, NPC_Luigi_Intro, FALSE) - EVT_CALL(SetNpcPos, NPC_Luigi_Intro, -100, -35, -370) - EVT_CALL(SetNpcYaw, NPC_Luigi_Intro, 135) - EVT_WAIT(2) - EVT_CALL(PlaySoundAtNpc, NPC_Luigi_Intro, SOUND_ENTER_PIPE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcImgFXFlags, NPC_Luigi_Intro, IMGFX_FLAG_REVERSE_ANIM) - EVT_CALL(SetNpcImgFXParams, NPC_Luigi_Intro, IMGFX_SET_ANIM, IMGFX_ANIM_VERTICAL_PIPE_CURL, 1, 1, 0) - EVT_CALL(SetNpcPos, NPC_Luigi_Intro, -100, -10, -370) - EVT_CALL(GetNpcPos, NPC_Luigi_Intro, LVar0, LVar1, LVar2) - EVT_LOOP(45) - EVT_ADD(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_Luigi_Intro, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcImgFXParams, NPC_Luigi_Intro, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetNpcPos, NPC_Luigi_Intro, -100, 30, -370) - EVT_WAIT(3) - EVT_CALL(EnableNpcShadow, NPC_Luigi_Intro, TRUE) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_Luigi_Intro, FALSE) + Call(SetNpcPos, NPC_Luigi_Intro, -100, -35, -370) + Call(SetNpcYaw, NPC_Luigi_Intro, 135) + Wait(2) + Call(PlaySoundAtNpc, NPC_Luigi_Intro, SOUND_ENTER_PIPE, SOUND_SPACE_DEFAULT) + Call(SetNpcImgFXFlags, NPC_Luigi_Intro, IMGFX_FLAG_REVERSE_ANIM) + Call(SetNpcImgFXParams, NPC_Luigi_Intro, IMGFX_SET_ANIM, IMGFX_ANIM_VERTICAL_PIPE_CURL, 1, 1, 0) + Call(SetNpcPos, NPC_Luigi_Intro, -100, -10, -370) + Call(GetNpcPos, NPC_Luigi_Intro, LVar0, LVar1, LVar2) + Loop(45) + Add(LVar1, 1) + Call(SetNpcPos, NPC_Luigi_Intro, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(SetNpcImgFXParams, NPC_Luigi_Intro, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetNpcPos, NPC_Luigi_Intro, -100, 30, -370) + Wait(3) + Call(EnableNpcShadow, NPC_Luigi_Intro, TRUE) + Return + End }; EvtScript N(EVS_Scene_Intro) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -100, 30, -370) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -100, 30, -370) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_EXEC_WAIT(N(EVS_PlayerExitPipe_Intro)) - EVT_WAIT(10 * DT) - EVT_CALL(func_802D1270, -60, -320, EVT_FLOAT(4.0 / DT)) - EVT_WAIT(63 * DT) - EVT_CALL(func_802D1270, 80, -60, EVT_FLOAT(4.0 / DT)) - EVT_CALL(func_802D1270, 180, 0, EVT_FLOAT(4.0 / DT)) - EVT_CALL(func_802D1270, 650, 0, EVT_FLOAT(4.0 / DT)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(70 * DT) - EVT_EXEC_WAIT(N(EVS_LuigiExitPipe_Intro)) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcFlagBits, NPC_Luigi_Intro, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Luigi_Intro, ANIM_Luigi_Run) - EVT_CALL(SetNpcSpeed, NPC_Luigi_Intro, EVT_FLOAT(4.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Luigi_Intro, 80, -60, 0) - EVT_CALL(NpcMoveTo, NPC_Luigi_Intro, 180, 0, 0) - EVT_CALL(NpcMoveTo, NPC_Luigi_Intro, 650, 0, 0) - EVT_END_THREAD - EVT_WAIT(70 * DT) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -60, 0, -320) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(600.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 400, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 400, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(450.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.5 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(GotoMap, EVT_PTR("mac_01"), mac_01_ENTRY_4) - EVT_WAIT(100 * DT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, -100, 30, -370) + Call(SetPanTarget, CAM_DEFAULT, -100, 30, -370) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + ExecWait(N(EVS_PlayerExitPipe_Intro)) + Wait(10 * DT) + Call(func_802D1270, -60, -320, Float(4.0 / DT)) + Wait(63 * DT) + Call(func_802D1270, 80, -60, Float(4.0 / DT)) + Call(func_802D1270, 180, 0, Float(4.0 / DT)) + Call(func_802D1270, 650, 0, Float(4.0 / DT)) + EndThread + Thread + Wait(70 * DT) + ExecWait(N(EVS_LuigiExitPipe_Intro)) + Wait(10 * DT) + Call(SetNpcFlagBits, NPC_Luigi_Intro, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcAnimation, NPC_Luigi_Intro, ANIM_Luigi_Run) + Call(SetNpcSpeed, NPC_Luigi_Intro, Float(4.0 / DT)) + Call(NpcMoveTo, NPC_Luigi_Intro, 80, -60, 0) + Call(NpcMoveTo, NPC_Luigi_Intro, 180, 0, 0) + Call(NpcMoveTo, NPC_Luigi_Intro, 650, 0, 0) + EndThread + Wait(70 * DT) + Call(SetPanTarget, CAM_DEFAULT, -60, 0, -320) + Call(SetCamDistance, CAM_DEFAULT, Float(600.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(UseSettingsFrom, CAM_DEFAULT, 400, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 400, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(450.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.5 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(GotoMap, Ref("mac_01"), mac_01_ENTRY_4) + Wait(100 * DT) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_mac/mac_00/mac_00_13_epilogue_npc.c b/src/world/area_mac/mac_00/mac_00_13_epilogue_npc.c index 2775996bc1e..1fc3c12ce11 100644 --- a/src/world/area_mac/mac_00/mac_00_13_epilogue_npc.c +++ b/src/world/area_mac/mac_00/mac_00_13_epilogue_npc.c @@ -7,134 +7,134 @@ #define NAME_SUFFIX EvtScript N(EVS_NpcInteract_Goompapa_Epilogue) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_Outro_0024) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Goompapa_Talk, ANIM_Goompapa_Idle, 0, MSG_Outro_0024) + Return + End }; EvtScript N(EVS_NpcInit_Goompapa_Epilogue) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Goompapa_Epilogue))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Goompapa_Epilogue))) + Return + End }; EvtScript N(EVS_NpcInteract_Goomama_Epilogue) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_Outro_0025) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_Outro_0025) + Return + End }; EvtScript N(EVS_NpcInit_Goomama_Epilogue) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Goomama_Epilogue))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Goomama_Epilogue))) + Return + End }; EvtScript N(EVS_NpcInteract_Gooma_Epilogue) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Gooma_Talk, ANIM_Gooma_Idle, 0, MSG_Outro_0026) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Gooma_Talk, ANIM_Gooma_Idle, 0, MSG_Outro_0026) + Return + End }; EvtScript N(EVS_NpcInit_Gooma_Epilogue) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Gooma_Epilogue))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Gooma_Epilogue))) + Return + End }; EvtScript N(EVS_NpcInteract_ChuckQuizmo_Epilogue) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ChuckQuizmo_Talk, ANIM_ChuckQuizmo_Idle, 0, MSG_Outro_0027) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_ChuckQuizmo_Talk, ANIM_ChuckQuizmo_Idle, 0, MSG_Outro_0027) + Return + End }; EvtScript N(EVS_NpcInit_ChuckQuizmo_Epilogue) = { - EVT_CALL(SetNpcPos, NPC_ChuckQuizmo, 460, 20, -130) - EVT_CALL(SetNpcYaw, NPC_ChuckQuizmo, 90) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ChuckQuizmo_Epilogue))) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_ChuckQuizmo, 460, 20, -130) + Call(SetNpcYaw, NPC_ChuckQuizmo, 90) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ChuckQuizmo_Epilogue))) + Return + End }; EvtScript N(EVS_NpcInteract_VannaT_Epilogue) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_VannaT_Wave, ANIM_VannaT_Wave, 0, MSG_Outro_003B) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_VannaT_Wave, ANIM_VannaT_Wave, 0, MSG_Outro_003B) + Return + End }; EvtScript N(EVS_NpcInit_VannaT_Epilogue) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_VannaT_Happy) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_VannaT_Epilogue))) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_VannaT_Happy) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_VannaT_Epilogue))) + Return + End }; EvtScript N(EVS_NpcInteract_Chan_Epilogue) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Chan_Run, ANIM_Chan_Idle, 0, MSG_Outro_0029) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Chan_Run, ANIM_Chan_Idle, 0, MSG_Outro_0029) + Return + End }; EvtScript N(EVS_NpcInit_Chan_Epilogue) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Chan_Epilogue))) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt, COLLIDER_FLAGS_UPPER_MASK) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Chan_Epilogue))) + Return + End }; EvtScript N(EVS_NpcInteract_Lee_Epilogue) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lee_Talk, ANIM_Lee_Idle, 0, MSG_Outro_002A) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Lee_Talk, ANIM_Lee_Idle, 0, MSG_Outro_002A) + Return + End }; EvtScript N(EVS_NpcInit_Lee_Epilogue) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lee_Epilogue))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Lee_Epilogue))) + Return + End }; EvtScript N(EVS_NpcInteract_TheMaster_Epilogue) = { - EVT_CALL(SpeakToPlayer, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, MSG_Outro_0028) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, MSG_Outro_0028) + Return + End }; EvtScript N(EVS_NpcInit_TheMaster_Epilogue) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_TheMaster_Epilogue))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_TheMaster_Epilogue))) + Return + End }; EvtScript N(EVS_NpcInteract_Toad_01_Epilogue) = { - EVT_CALL(SpeakToPlayer, NPC_Toad_01, ANIM_HarryT_Talk, ANIM_HarryT_Idle, 0, MSG_Outro_002B) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_Toad_01, ANIM_HarryT_Talk, ANIM_HarryT_Idle, 0, MSG_Outro_002B) + Return + End }; EvtScript N(EVS_NpcInit_Toad_01_Epilogue) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono3, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono4, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono5, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono6, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_dummy, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_01_Epilogue))) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono2, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono3, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono4, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono5, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono6, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_dummy, COLLIDER_FLAGS_UPPER_MASK) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_01_Epilogue))) + Return + End }; EvtScript N(EVS_NpcInteract_HarryT_Epilogue) = { - EVT_CALL(SpeakToPlayer, NPC_HarryT, ANIM_HarryT_Talk, ANIM_HarryT_Idle, 0, MSG_Outro_003A) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_HarryT, ANIM_HarryT_Talk, ANIM_HarryT_Idle, 0, MSG_Outro_003A) + Return + End }; EvtScript N(EVS_NpcInit_HarryT_Epilogue) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_HarryT_Epilogue))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_HarryT_Epilogue))) + Return + End }; AnimID N(ExtraAnims_Luigi_Epilogue)[] = { diff --git a/src/world/area_mac/mac_00/mac_00_14_epilogue.c b/src/world/area_mac/mac_00/mac_00_14_epilogue.c index 7d9c57d0f4c..ddecf3b4b15 100644 --- a/src/world/area_mac/mac_00/mac_00_14_epilogue.c +++ b/src/world/area_mac/mac_00/mac_00_14_epilogue.c @@ -2,93 +2,93 @@ #include "sprite/player.h" EvtScript N(EVS_PlayerExitPipe_Epilogue) = { - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_CALL(SetPlayerPos, -100, -10, -370) - EVT_CALL(InterpPlayerYaw, 135, 0) - EVT_WAIT(2) - EVT_CALL(PlaySoundAtPlayer, SOUND_ENTER_PIPE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetPlayerImgFXFlags, IMGFX_FLAG_REVERSE_ANIM) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_VERTICAL_PIPE_CURL, 1, 1, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_LOOP(40) - EVT_ADD(LVar1, 1) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(HidePlayerShadow, FALSE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerPhysics, TRUE) + Call(HidePlayerShadow, TRUE) + Call(SetPlayerPos, -100, -10, -370) + Call(InterpPlayerYaw, 135, 0) + Wait(2) + Call(PlaySoundAtPlayer, SOUND_ENTER_PIPE, SOUND_SPACE_DEFAULT) + Call(SetPlayerImgFXFlags, IMGFX_FLAG_REVERSE_ANIM) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_VERTICAL_PIPE_CURL, 1, 1, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Loop(40) + Add(LVar1, 1) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) + Call(HidePlayerShadow, FALSE) + Call(DisablePlayerPhysics, FALSE) + Return + End }; EvtScript N(EVS_LuigiExitPipe_Epilogue) = { - EVT_CALL(EnableNpcShadow, NPC_Luigi_Epilogue, FALSE) - EVT_CALL(SetNpcPos, NPC_Luigi_Epilogue, -100, -35, -370) - EVT_CALL(SetNpcYaw, NPC_Luigi_Epilogue, 135) - EVT_WAIT(2) - EVT_CALL(PlaySoundAtNpc, NPC_Luigi_Epilogue, SOUND_ENTER_PIPE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcImgFXFlags, NPC_Luigi_Epilogue, IMGFX_FLAG_REVERSE_ANIM) - EVT_CALL(SetNpcImgFXParams, NPC_Luigi_Epilogue, IMGFX_SET_ANIM, IMGFX_ANIM_VERTICAL_PIPE_CURL, 1, 1, 0) - EVT_CALL(SetNpcPos, NPC_Luigi_Epilogue, -100, -10, -370) - EVT_CALL(GetNpcPos, NPC_Luigi_Epilogue, LVar0, LVar1, LVar2) - EVT_LOOP(45) - EVT_ADD(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_Luigi_Epilogue, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcImgFXParams, NPC_Luigi_Epilogue, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetNpcPos, NPC_Luigi_Epilogue, -100, 30, -370) - EVT_WAIT(3) - EVT_CALL(EnableNpcShadow, NPC_Luigi_Epilogue, TRUE) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_Luigi_Epilogue, FALSE) + Call(SetNpcPos, NPC_Luigi_Epilogue, -100, -35, -370) + Call(SetNpcYaw, NPC_Luigi_Epilogue, 135) + Wait(2) + Call(PlaySoundAtNpc, NPC_Luigi_Epilogue, SOUND_ENTER_PIPE, SOUND_SPACE_DEFAULT) + Call(SetNpcImgFXFlags, NPC_Luigi_Epilogue, IMGFX_FLAG_REVERSE_ANIM) + Call(SetNpcImgFXParams, NPC_Luigi_Epilogue, IMGFX_SET_ANIM, IMGFX_ANIM_VERTICAL_PIPE_CURL, 1, 1, 0) + Call(SetNpcPos, NPC_Luigi_Epilogue, -100, -10, -370) + Call(GetNpcPos, NPC_Luigi_Epilogue, LVar0, LVar1, LVar2) + Loop(45) + Add(LVar1, 1) + Call(SetNpcPos, NPC_Luigi_Epilogue, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(SetNpcImgFXParams, NPC_Luigi_Epilogue, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetNpcPos, NPC_Luigi_Epilogue, -100, 30, -370) + Wait(3) + Call(EnableNpcShadow, NPC_Luigi_Epilogue, TRUE) + Return + End }; EvtScript N(EVS_Scene_BeginEpilogue) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -100, 30, -370) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -100, 30, -370) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_EXEC_WAIT(N(EVS_PlayerExitPipe_Epilogue)) - EVT_WAIT(10) - EVT_CALL(func_802D1270, -60, -320, EVT_FLOAT(4.0)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(70) - EVT_EXEC_WAIT(N(EVS_LuigiExitPipe_Epilogue)) - EVT_WAIT(10) - EVT_CALL(SetNpcFlagBits, NPC_Luigi_Epilogue, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Luigi_Epilogue, ANIM_Luigi_Run) - EVT_CALL(SetNpcSpeed, NPC_Luigi_Epilogue, EVT_FLOAT(4.0)) - EVT_CALL(NpcMoveTo, NPC_Luigi_Epilogue, -100, -300, 0) - EVT_CALL(SetNpcAnimation, NPC_Luigi_Epilogue, ANIM_Luigi_Idle) - EVT_END_THREAD - EVT_WAIT(70) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -60, 0, -320) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -60, 0, -320) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(80) - EVT_CALL(SpeakToPlayer, NPC_Luigi_Epilogue, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_Outro_0023) - EVT_WAIT(10) - EVT_CHILD_THREAD - EVT_LOOP(0) - EVT_CALL(PlayerFaceNpc, NPC_Luigi_Epilogue, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(SetNpcAnimation, NPC_Luigi_Epilogue, ANIM_Luigi_Run) - EVT_CALL(NpcMoveTo, NPC_Luigi_Epilogue, 60, -100, 0) - EVT_CALL(SetNpcFlagBits, NPC_Luigi_Epilogue, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcPos, NPC_Luigi_Epilogue, NPC_DISPOSE_LOCATION) - EVT_EXEC(N(EVS_BlockExitToGoomaRoad)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, -100, 30, -370) + Call(SetPanTarget, CAM_DEFAULT, -100, 30, -370) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + ExecWait(N(EVS_PlayerExitPipe_Epilogue)) + Wait(10) + Call(func_802D1270, -60, -320, Float(4.0)) + EndThread + Thread + Wait(70) + ExecWait(N(EVS_LuigiExitPipe_Epilogue)) + Wait(10) + Call(SetNpcFlagBits, NPC_Luigi_Epilogue, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcAnimation, NPC_Luigi_Epilogue, ANIM_Luigi_Run) + Call(SetNpcSpeed, NPC_Luigi_Epilogue, Float(4.0)) + Call(NpcMoveTo, NPC_Luigi_Epilogue, -100, -300, 0) + Call(SetNpcAnimation, NPC_Luigi_Epilogue, ANIM_Luigi_Idle) + EndThread + Wait(70) + Call(UseSettingsFrom, CAM_DEFAULT, -60, 0, -320) + Call(SetPanTarget, CAM_DEFAULT, -60, 0, -320) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(80) + Call(SpeakToPlayer, NPC_Luigi_Epilogue, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_Outro_0023) + Wait(10) + ChildThread + Loop(0) + Call(PlayerFaceNpc, NPC_Luigi_Epilogue, FALSE) + Wait(1) + EndLoop + EndChildThread + Call(SetNpcAnimation, NPC_Luigi_Epilogue, ANIM_Luigi_Run) + Call(NpcMoveTo, NPC_Luigi_Epilogue, 60, -100, 0) + Call(SetNpcFlagBits, NPC_Luigi_Epilogue, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcPos, NPC_Luigi_Epilogue, NPC_DISPOSE_LOCATION) + Exec(N(EVS_BlockExitToGoomaRoad)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_mac/mac_00/mac_00_1_music.c b/src/world/area_mac/mac_00/mac_00_1_music.c index 87a9e9aea38..6f8e9580b70 100644 --- a/src/world/area_mac/mac_00/mac_00_1_music.c +++ b/src/world/area_mac/mac_00/mac_00_1_music.c @@ -1,25 +1,25 @@ #include "mac_00.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_INTRO) - EVT_CALL(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 8) - EVT_CASE_EQ(STORY_EPILOGUE) - EVT_CALL(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 0, 8) - EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_INVASION, 0, 8) - EVT_CASE_DEFAULT - EVT_EXEC(N(EVS_SetupMusicTriggers)) - EVT_END_SWITCH - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(mac_00_ENTRY_4) - EVT_CASE_OR_EQ(mac_00_ENTRY_5) - EVT_CASE_OR_EQ(mac_00_ENTRY_6) - EVT_CASE_OR_EQ(mac_00_ENTRY_7) - EVT_CALL(ClearAmbientSounds, 250) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseEq(STORY_INTRO) + Call(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 8) + CaseEq(STORY_EPILOGUE) + Call(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 0, 8) + CaseRange(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) + Call(SetMusicTrack, 0, SONG_SHY_GUY_INVASION, 0, 8) + CaseDefault + Exec(N(EVS_SetupMusicTriggers)) + EndSwitch + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseOrEq(mac_00_ENTRY_4) + CaseOrEq(mac_00_ENTRY_5) + CaseOrEq(mac_00_ENTRY_6) + CaseOrEq(mac_00_ENTRY_7) + Call(ClearAmbientSounds, 250) + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/world/area_mac/mac_00/mac_00_2_main.c b/src/world/area_mac/mac_00/mac_00_2_main.c index 6b1c94c57d1..38c64c881bd 100644 --- a/src/world/area_mac/mac_00/mac_00_2_main.c +++ b/src/world/area_mac/mac_00/mac_00_2_main.c @@ -20,111 +20,111 @@ EvtScript N(EVS_ExitWalk_kmr_10_1) = EVT_EXIT_WALK(60, mac_00_ENTRY_0, "kmr_10", EvtScript N(EVS_ExitWalk_mac_01_0) = EVT_EXIT_WALK(60, mac_00_ENTRY_1, "mac_01", mac_01_ENTRY_0); EvtScript N(EVS_GotoMap_tik_19_9) = { - EVT_CALL(GotoMap, EVT_PTR("tik_19"), tik_19_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("tik_19"), tik_19_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_GotoMap_kmr_20_4) = { - EVT_CALL(GotoMap, EVT_PTR("kmr_20"), kmr_20_ENTRY_4) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("kmr_20"), kmr_20_ENTRY_4) + Wait(100) + Return + End }; EvtScript N(EVS_ExitPipe_tik_19_9) = EVT_EXIT_PIPE_VERTICAL(mac_00_ENTRY_3, COLLIDER_deilit, N(EVS_GotoMap_tik_19_9)); EvtScript N(EVS_ExitPipe_kmr_20_4) = EVT_EXIT_PIPE_VERTICAL(mac_00_ENTRY_4, COLLIDER_deilim, N(EVS_GotoMap_kmr_20_4)); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_mac_01_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitPipe_kmr_20_4)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilim, 1, 0) - EVT_IF_GE(GB_StoryProgress, STORY_EPILOGUE) - EVT_RETURN - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kmr_10_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitPipe_tik_19_9)), TRIGGER_FLOOR_TOUCH, COLLIDER_deilit, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_mac_01_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitPipe_kmr_20_4)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilim, 1, 0) + IfGe(GB_StoryProgress, STORY_EPILOGUE) + Return + EndIf + BindTrigger(Ref(N(EVS_ExitWalk_kmr_10_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0) + BindTrigger(Ref(N(EVS_ExitPipe_tik_19_9)), TRIGGER_FLOOR_TOUCH, COLLIDER_deilit, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(mac_00_ENTRY_3) - EVT_CASE_OR_EQ(mac_00_ENTRY_4) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseOrEq(mac_00_ENTRY_3) + CaseOrEq(mac_00_ENTRY_4) EVT_ENTER_PIPE_VERTICAL(N(EVS_BindExitTriggers)) - EVT_END_CASE_GROUP - EVT_CASE_EQ(mac_00_ENTRY_5) - EVT_EXEC(N(EVS_Scene_Intro)) - EVT_CASE_EQ(mac_00_ENTRY_7) - EVT_EXEC_WAIT(N(EVS_Scene_BeginEpilogue)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_DEFAULT - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + EndCaseGroup + CaseEq(mac_00_ENTRY_5) + Exec(N(EVS_Scene_Intro)) + CaseEq(mac_00_ENTRY_7) + ExecWait(N(EVS_Scene_BeginEpilogue)) + Exec(N(EVS_BindExitTriggers)) + CaseDefault + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() + Set(GB_WorldLocation, LOCATION_TOAD_TOWN) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() #if VERSION_PAL - EVT_CALL(GetLanguage, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_mushroom_kingdom, LVar0) + Call(GetLanguage, LVar0) + Call(SetModelTexVariant, MODEL_mushroom_kingdom, LVar0) #endif - EVT_IF_GE(GB_StoryProgress, STORY_CH0_KAMMY_RETURNED_TO_BOWSER) - EVT_SET(GF_MAP_ToadTown, TRUE) - EVT_END_IF - EVT_CALL(SetRenderMode, MODEL_minka1_yuka, RENDER_MODE_SURFACE_XLU_ZB_ZUPD) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_dummy, COLLIDER_FLAGS_UPPER_MASK) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_INTRO) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(IntroNPCs))) - EVT_CASE_GE(STORY_EPILOGUE) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(EpilogueNPCs))) - EVT_CASE_DEFAULT - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupRooms)) - EVT_EXEC(N(EVS_SetupShop)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_water, SURFACE_TYPE_WATER) - EVT_EXEC(N(EVS_SetupWaterCustomGfx)) - EVT_CALL(EnableTexPanning, MODEL_water, TRUE) - EVT_THREAD + IfGe(GB_StoryProgress, STORY_CH0_KAMMY_RETURNED_TO_BOWSER) + Set(GF_MAP_ToadTown, TRUE) + EndIf + Call(SetRenderMode, MODEL_minka1_yuka, RENDER_MODE_SURFACE_XLU_ZB_ZUPD) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_dummy, COLLIDER_FLAGS_UPPER_MASK) + Switch(GB_StoryProgress) + CaseEq(STORY_INTRO) + Call(MakeNpcs, FALSE, Ref(N(IntroNPCs))) + CaseGe(STORY_EPILOGUE) + Call(MakeNpcs, FALSE, Ref(N(EpilogueNPCs))) + CaseDefault + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + EndSwitch + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupRooms)) + Exec(N(EVS_SetupShop)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_water, SURFACE_TYPE_WATER) + Exec(N(EVS_SetupWaterCustomGfx)) + Call(EnableTexPanning, MODEL_water, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 0, 0, 0, 120) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_op_1, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_op2, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_op3, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_op_1, COLLIDER_FLAG_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_op2, COLLIDER_FLAG_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_op3, COLLIDER_FLAG_DOCK_WALL) - EVT_CALL(N(DummyColliderFunction), COLLIDER_op_1) - EVT_CALL(N(DummyColliderFunction), COLLIDER_op2) - EVT_CALL(N(DummyColliderFunction), COLLIDER_op3) - EVT_CALL(GetDemoState, LVar0) - EVT_IF_NE(LVar0, DEMO_STATE_NONE) + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_op_1, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_op2, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_op3, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_op_1, COLLIDER_FLAG_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_op2, COLLIDER_FLAG_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_op3, COLLIDER_FLAG_DOCK_WALL) + Call(N(DummyColliderFunction), COLLIDER_op_1) + Call(N(DummyColliderFunction), COLLIDER_op2) + Call(N(DummyColliderFunction), COLLIDER_op3) + Call(GetDemoState, LVar0) + IfNe(LVar0, DEMO_STATE_NONE) EVT_ENTER_PIPE_VERTICAL(N(EVS_BindExitTriggers)) - EVT_EXEC_WAIT(N(EVS_SetupDemo)) - EVT_RETURN - EVT_END_IF - EVT_EXEC(N(EVS_SetupMusic)) - EVT_IF_EQ(GB_StoryProgress, STORY_CH0_KAMMY_RETURNED_TO_BOWSER) - EVT_SET(GB_StoryProgress, STORY_CH0_ARRIVED_AT_TOAD_TOWN) - EVT_EXEC(N(EVS_Scene_ToadTownGreeting)) - EVT_END_IF - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_CALL(N(DummyInitFunction)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_SetupDemo)) + Return + EndIf + Exec(N(EVS_SetupMusic)) + IfEq(GB_StoryProgress, STORY_CH0_KAMMY_RETURNED_TO_BOWSER) + Set(GB_StoryProgress, STORY_CH0_ARRIVED_AT_TOAD_TOWN) + Exec(N(EVS_Scene_ToadTownGreeting)) + EndIf + Exec(N(EVS_EnterMap)) + Wait(1) + Call(N(DummyInitFunction)) + Return + End }; diff --git a/src/world/area_mac/mac_00/mac_00_3_entity.c b/src/world/area_mac/mac_00/mac_00_3_entity.c index 8ce2b086401..d89e30699f1 100644 --- a/src/world/area_mac/mac_00/mac_00_3_entity.c +++ b/src/world/area_mac/mac_00/mac_00_3_entity.c @@ -2,18 +2,18 @@ #include "entity.h" EvtScript N(EVS_Inspect_StreetSign) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_016F, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_016F, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 545, 20, 205, 0, MODEL_o262, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_MAC00_HiddenPanel) - EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, -420, 20, 410, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_MAC00_Item_StarPiece) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Inspect_StreetSign)), TRIGGER_WALL_PRESS_A, COLLIDER_sign, 1, 0) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HiddenPanel), 545, 20, 205, 0, MODEL_o262, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_MAC00_HiddenPanel) + Call(MakeItemEntity, ITEM_STAR_PIECE, -420, 20, 410, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_MAC00_Item_StarPiece) + BindTrigger(Ref(N(EVS_Inspect_StreetSign)), TRIGGER_WALL_PRESS_A, COLLIDER_sign, 1, 0) + Return + End }; diff --git a/src/world/area_mac/mac_00/mac_00_4_rooms.c b/src/world/area_mac/mac_00/mac_00_4_rooms.c index 73ca113472b..0b91b12e026 100644 --- a/src/world/area_mac/mac_00/mac_00_4_rooms.c +++ b/src/world/area_mac/mac_00/mac_00_4_rooms.c @@ -1,164 +1,164 @@ #include "mac_00.h" EvtScript N(EVS_SetDoorRot_RussHouse) = { - EVT_CALL(RotateModel, MODEL_o210, LVar0, 0, 1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o210, LVar0, 0, 1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_RussHouse) = { - EVT_SET(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-2.0)) - EVT_CALL(RotateModel, MODEL_o201, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o467, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o466, LVar1, 0, 1, 0) - EVT_SET(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-1.11)) - EVT_CALL(RotateModel, MODEL_o194, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o463, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o469, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o335, LVar1, 0, 1, 0) - EVT_SET(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-0.328125)) - EVT_CALL(RotateModel, MODEL_o198, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o460, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o461, LVar1, 0, 1, 0) - EVT_SET(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(2.218)) - EVT_CALL(RotateModel, MODEL_o213, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o215, LVar1, 0, 1, 0) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + MulF(LVar1, Float(-2.0)) + Call(RotateModel, MODEL_o201, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o467, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o466, LVar1, 0, 1, 0) + Set(LVar1, LVar0) + MulF(LVar1, Float(-1.11)) + Call(RotateModel, MODEL_o194, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o463, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o469, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o335, LVar1, 0, 1, 0) + Set(LVar1, LVar0) + MulF(LVar1, Float(-0.328125)) + Call(RotateModel, MODEL_o198, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o460, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o461, LVar1, 0, 1, 0) + Set(LVar1, LVar0) + MulF(LVar1, Float(2.218)) + Call(RotateModel, MODEL_o213, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o215, LVar1, 0, 1, 0) + Return + End }; EvtScript N(EVS_DropDoor_RussHouse) = { - EVT_CALL(RotateModel, MODEL_o210, LVar0, 1, 0, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o210, LVar0, 1, 0, 0) + Return + End }; EvtScript N(EVS_RoomListener_RussHouse) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_CALL(SetGroupVisibility, MODEL_intel_inn, MODEL_GROUP_VISIBLE) - EVT_SET(MF_MusicMixTrigger1, TRUE) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_CALL(SetGroupVisibility, MODEL_intel_inn, MODEL_GROUP_HIDDEN) - EVT_SET(MF_MusicMixTrigger1, FALSE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Call(SetGroupVisibility, MODEL_intel_inn, MODEL_GROUP_VISIBLE) + Set(MF_MusicMixTrigger1, TRUE) + CaseEq(ROOM_UPDATE_EXIT_END) + Call(SetGroupVisibility, MODEL_intel_inn, MODEL_GROUP_HIDDEN) + Set(MF_MusicMixTrigger1, FALSE) + EndSwitch + Return + End }; EvtScript N(EVS_SetDoorRot_Shop) = { - EVT_CALL(RotateModel, MODEL_o121, LVar0, 0, -1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o121, LVar0, 0, -1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_Shop) = { - EVT_SET(LVar1, LVar0) - EVT_CALL(RotateModel, MODEL_o370, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o371, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o373, LVar1, 1, 0, 0) - EVT_SET(LVar1, LVar0) - EVT_CALL(RotateModel, MODEL_o396, LVar1, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o397, LVar1, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o155, LVar1, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o146, LVar1, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o398, LVar1, -1, 0, 0) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + Call(RotateModel, MODEL_o370, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_o371, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_o373, LVar1, 1, 0, 0) + Set(LVar1, LVar0) + Call(RotateModel, MODEL_o396, LVar1, -1, 0, 0) + Call(RotateModel, MODEL_o397, LVar1, -1, 0, 0) + Call(RotateModel, MODEL_o155, LVar1, -1, 0, 0) + Call(RotateModel, MODEL_o146, LVar1, -1, 0, 0) + Call(RotateModel, MODEL_o398, LVar1, -1, 0, 0) + Return + End }; EvtScript N(EVS_RoomListener_Shop) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_CALL(SetGroupVisibility, MODEL_shop_in, MODEL_GROUP_VISIBLE) - EVT_CALL(EnableModel, MODEL_o375, FALSE) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_BEGIN) + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Call(SetGroupVisibility, MODEL_shop_in, MODEL_GROUP_VISIBLE) + Call(EnableModel, MODEL_o375, FALSE) + CaseEq(ROOM_UPDATE_EXIT_BEGIN) // do nothing - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_CALL(SetGroupVisibility, MODEL_shop_in, MODEL_GROUP_HIDDEN) - EVT_CALL(EnableModel, MODEL_o375, TRUE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + CaseEq(ROOM_UPDATE_EXIT_END) + Call(SetGroupVisibility, MODEL_shop_in, MODEL_GROUP_HIDDEN) + Call(EnableModel, MODEL_o375, TRUE) + EndSwitch + Return + End }; EvtScript N(EVS_SetDoorRot_Dojo) = { - EVT_CALL(RotateModel, MODEL_o168, LVar0, 0, -1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o168, LVar0, 0, -1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_Dojo) = { - EVT_SET(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(2.0)) - EVT_CALL(RotateModel, MODEL_o159, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o169, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o164, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o162, LVar1, 0, 1, 0) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + MulF(LVar1, Float(2.0)) + Call(RotateModel, MODEL_o159, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o169, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o164, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o162, LVar1, 0, 1, 0) + Return + End }; EvtScript N(EVS_DropDoor_Dojo) = { - EVT_CALL(RotateModel, MODEL_o168, LVar0, 1, 0, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o168, LVar0, 1, 0, 0) + Return + End }; EvtScript N(EVS_RoomListener_Dojo) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_CALL(SetGroupVisibility, MODEL_minka_inn, MODEL_GROUP_VISIBLE) - EVT_SET(MF_MusicMixTrigger2, TRUE) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_CALL(SetGroupVisibility, MODEL_minka_inn, MODEL_GROUP_HIDDEN) - EVT_CALL(EnableMusicProximityMix, 0) - EVT_SET(MF_MusicMixTrigger2, FALSE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Call(SetGroupVisibility, MODEL_minka_inn, MODEL_GROUP_VISIBLE) + Set(MF_MusicMixTrigger2, TRUE) + CaseEq(ROOM_UPDATE_EXIT_END) + Call(SetGroupVisibility, MODEL_minka_inn, MODEL_GROUP_HIDDEN) + Call(EnableMusicProximityMix, 0) + Set(MF_MusicMixTrigger2, FALSE) + EndSwitch + Return + End }; EvtScript N(EVS_SetDoorRot_Waterfront) = { - EVT_CALL(RotateModel, MODEL_o228, LVar0, 0, -1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o228, LVar0, 0, -1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_Waterfront) = { - EVT_SET(LVar1, LVar0) - EVT_CALL(RotateModel, MODEL_o437, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o453, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o454, LVar1, 1, 0, 0) - EVT_SET(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-0.671875)) - EVT_CALL(RotateModel, MODEL_o242, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o239, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o243, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o245, LVar1, 1, 0, 0) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + Call(RotateModel, MODEL_o437, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_o453, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_o454, LVar1, 1, 0, 0) + Set(LVar1, LVar0) + MulF(LVar1, Float(-0.671875)) + Call(RotateModel, MODEL_o242, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_o239, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_o243, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_o245, LVar1, 1, 0, 0) + Return + End }; EvtScript N(EVS_RoomListener_Waterfront) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_BEGAN_PEACH_MISSION) - EVT_EXEC(N(EVS_WaterfrontHouse_DoorLocked)) - EVT_SET(LVar0, -1) - EVT_CASE_DEFAULT - EVT_CALL(SetGroupVisibility, MODEL_minka2_inn, MODEL_GROUP_VISIBLE) - EVT_END_SWITCH - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_CALL(SetGroupVisibility, MODEL_minka2_inn, MODEL_GROUP_HIDDEN) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Switch(GB_StoryProgress) + CaseRange(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_BEGAN_PEACH_MISSION) + Exec(N(EVS_WaterfrontHouse_DoorLocked)) + Set(LVar0, -1) + CaseDefault + Call(SetGroupVisibility, MODEL_minka2_inn, MODEL_GROUP_VISIBLE) + EndSwitch + CaseEq(ROOM_UPDATE_EXIT_END) + Call(SetGroupVisibility, MODEL_minka2_inn, MODEL_GROUP_HIDDEN) + EndSwitch + Return + End }; s32 N(InteriorNPCs_RussHouse)[] = { @@ -190,52 +190,52 @@ s32 N(InteriorNPCs_WaterfrontHouse)[] = { EvtScript N(EVS_SetupRooms) = { // RussT's house - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_RIGHT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_RussHouse)), - EVT_PTR(N(EVS_SetWallRot_RussHouse)), - EVT_PTR(N(EVS_DropDoor_RussHouse)), - EVT_PTR(N(EVS_RoomListener_RussHouse)), + Ref(N(EVS_SetDoorRot_RussHouse)), + Ref(N(EVS_SetWallRot_RussHouse)), + Ref(N(EVS_DropDoor_RussHouse)), + Ref(N(EVS_RoomListener_RussHouse)), COLLIDER_deilit3, COLLIDER_deilit3u, MODEL_intel_house, - EVT_PTR(N(InteriorNPCs_RussHouse))) + Ref(N(InteriorNPCs_RussHouse))) // harry's shop - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_1, ROOM_DOOR_LEFT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_Shop)), - EVT_PTR(N(EVS_SetWallRot_Shop)), + Ref(N(EVS_SetDoorRot_Shop)), + Ref(N(EVS_SetWallRot_Shop)), NULL, - EVT_PTR(N(EVS_RoomListener_Shop)), - COLLIDER_deilit5, COLLIDER_deilit5u, MODEL_omise, EVT_PTR(N(InteriorNPCs_Shop))) + Ref(N(EVS_RoomListener_Shop)), + COLLIDER_deilit5, COLLIDER_deilit5u, MODEL_omise, Ref(N(InteriorNPCs_Shop))) // the dojo - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_LEFT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_Dojo)), - EVT_PTR(N(EVS_SetWallRot_Dojo)), - EVT_PTR(N(EVS_DropDoor_Dojo)), - EVT_PTR(N(EVS_RoomListener_Dojo)), + Ref(N(EVS_SetDoorRot_Dojo)), + Ref(N(EVS_SetWallRot_Dojo)), + Ref(N(EVS_DropDoor_Dojo)), + Ref(N(EVS_RoomListener_Dojo)), COLLIDER_deilit6, COLLIDER_deilit6u, MODEL_minka_1, - EVT_PTR(N(InteriorNPCs_Dojo))) + Ref(N(InteriorNPCs_Dojo))) // the waterfront house - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_LEFT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_Waterfront)), - EVT_PTR(N(EVS_SetWallRot_Waterfront)), + Ref(N(EVS_SetDoorRot_Waterfront)), + Ref(N(EVS_SetWallRot_Waterfront)), NULL, - EVT_PTR(N(EVS_RoomListener_Waterfront)), + Ref(N(EVS_RoomListener_Waterfront)), COLLIDER_deilit4, COLLIDER_deilit4u, MODEL_minka2, - EVT_PTR(N(InteriorNPCs_WaterfrontHouse))) + Ref(N(InteriorNPCs_WaterfrontHouse))) // initial visibility - EVT_SET(LVar0, VIS_GROUP_3) - EVT_EXEC(N(EVS_RoomListener_RussHouse)) - EVT_EXEC(N(EVS_RoomListener_Waterfront)) - EVT_EXEC(N(EVS_RoomListener_Shop)) - EVT_EXEC(N(EVS_RoomListener_Dojo)) - EVT_RETURN - EVT_END + Set(LVar0, VIS_GROUP_3) + Exec(N(EVS_RoomListener_RussHouse)) + Exec(N(EVS_RoomListener_Waterfront)) + Exec(N(EVS_RoomListener_Shop)) + Exec(N(EVS_RoomListener_Dojo)) + Return + End }; diff --git a/src/world/area_mac/mac_00/mac_00_5_npc.c b/src/world/area_mac/mac_00/mac_00_5_npc.c index 53ec20da21a..3dca6960687 100644 --- a/src/world/area_mac/mac_00/mac_00_5_npc.c +++ b/src/world/area_mac/mac_00/mac_00_5_npc.c @@ -18,166 +18,166 @@ MAP_STATIC_PAD(1,item_choice); #include "npc/russ_and_thief.inc.c" EvtScript N(EVS_NpcAI_ShyGuy_03) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcAnimation, NPC_ShyGuy_02, ANIM_ShyGuy_Red_Anim0C) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_ShyGuy_02, ANIM_ShyGuy_Red_Anim03) - EVT_CALL(SetNpcJumpscale, NPC_ShyGuy_02, EVT_FLOAT(1.0)) - EVT_CALL(PlaySoundAtNpc, NPC_ShyGuy_02, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_ShyGuy_02, 400, 20, -300, 20) - EVT_CALL(NpcFacePlayer, NPC_ShyGuy_02, 0) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_ShyGuy_02, ANIM_ShyGuy_Red_Anim11, ANIM_ShyGuy_Red_Anim01, 0, MSG_MAC_Gate_0002) - EVT_CALL(ShowSweat, NPC_ShyGuy_02, 1, 45, EMOTER_NPC, 0, 0, 0, 0, 20) - EVT_WAIT(10) - EVT_CALL(ShowSweat, NPC_ShyGuy_02, 1, 45, EMOTER_NPC, 0, 0, 0, 0, 20) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(2.0)) - EVT_CALL(PlayerMoveTo, 410, -340, 0) - EVT_END_THREAD - EVT_SET(LVar0, 22) - EVT_CALL(PlaySoundAtNpc, LVar0, SOUND_SHY_GUY_RUN_AWAY, SOUND_SPACE_DEFAULT) - EVT_EXEC_GET_TID(N(EVS_ShyGuy_PlayRunningSounds), LVarA) - EVT_CALL(SetNpcSpeed, NPC_ShyGuy_02, EVT_FLOAT(8.0)) - EVT_CALL(NpcMoveTo, NPC_ShyGuy_02, 170, -140, 0) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetNpcPos, NPC_ShyGuy_02, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_Toad_02, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_Toad_01, 170, 20, -140) - EVT_CALL(SetNpcFlagBits, NPC_Toad_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcSpeed, NPC_Toad_01, EVT_FLOAT(8.0)) - EVT_CALL(SetNpcAnimation, NPC_Toad_01, ANIM_HarryT_Run) - EVT_CALL(NpcMoveTo, NPC_Toad_01, 430, -373, 0) - EVT_CALL(SetNpcPos, NPC_Toad_01, 430, 20, -373) - EVT_CALL(SetNpcAnimation, NPC_Toad_01, ANIM_HarryT_Idle) - EVT_CALL(SetNpcFlagBits, NPC_Toad_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(NpcFacePlayer, NPC_Toad_01, 0) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Toad_01, ANIM_HarryT_Talk, ANIM_HarryT_Idle, 0, MSG_MAC_Gate_0003) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_mono1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_mono2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_mono3, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_mono4, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_mono5, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_mono6, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_dummy, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(SetNpcAnimation, NPC_ShyGuy_02, ANIM_ShyGuy_Red_Anim0C) + Wait(10) + Call(SetNpcAnimation, NPC_ShyGuy_02, ANIM_ShyGuy_Red_Anim03) + Call(SetNpcJumpscale, NPC_ShyGuy_02, Float(1.0)) + Call(PlaySoundAtNpc, NPC_ShyGuy_02, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_ShyGuy_02, 400, 20, -300, 20) + Call(NpcFacePlayer, NPC_ShyGuy_02, 0) + Wait(10) + Call(SpeakToPlayer, NPC_ShyGuy_02, ANIM_ShyGuy_Red_Anim11, ANIM_ShyGuy_Red_Anim01, 0, MSG_MAC_Gate_0002) + Call(ShowSweat, NPC_ShyGuy_02, 1, 45, EMOTER_NPC, 0, 0, 0, 0, 20) + Wait(10) + Call(ShowSweat, NPC_ShyGuy_02, 1, 45, EMOTER_NPC, 0, 0, 0, 0, 20) + Wait(10) + Thread + Call(SetPlayerSpeed, Float(2.0)) + Call(PlayerMoveTo, 410, -340, 0) + EndThread + Set(LVar0, 22) + Call(PlaySoundAtNpc, LVar0, SOUND_SHY_GUY_RUN_AWAY, SOUND_SPACE_DEFAULT) + ExecGetTID(N(EVS_ShyGuy_PlayRunningSounds), LVarA) + Call(SetNpcSpeed, NPC_ShyGuy_02, Float(8.0)) + Call(NpcMoveTo, NPC_ShyGuy_02, 170, -140, 0) + KillThread(LVarA) + Call(SetNpcPos, NPC_ShyGuy_02, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_Toad_02, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_Toad_01, 170, 20, -140) + Call(SetNpcFlagBits, NPC_Toad_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcSpeed, NPC_Toad_01, Float(8.0)) + Call(SetNpcAnimation, NPC_Toad_01, ANIM_HarryT_Run) + Call(NpcMoveTo, NPC_Toad_01, 430, -373, 0) + Call(SetNpcPos, NPC_Toad_01, 430, 20, -373) + Call(SetNpcAnimation, NPC_Toad_01, ANIM_HarryT_Idle) + Call(SetNpcFlagBits, NPC_Toad_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(NpcFacePlayer, NPC_Toad_01, 0) + Wait(10) + Call(SpeakToPlayer, NPC_Toad_01, ANIM_HarryT_Talk, ANIM_HarryT_Idle, 0, MSG_MAC_Gate_0003) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_mono1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_mono2, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_mono3, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_mono4, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_mono5, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_mono6, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_dummy, COLLIDER_FLAGS_UPPER_MASK) + Call(DisablePlayerInput, FALSE) + Return + End }; #include "world/common/util/CheckPositionRelativeToPlane.inc.c" EvtScript N(EVS_NpcHit_ShyGuy_03) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(LVar1, 1) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_SET(LVar1, 1) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_PARTNER) - EVT_SET(LVar1, 1) - EVT_CASE_DEFAULT - EVT_SET(LVar1, 0) - EVT_END_SWITCH - EVT_IF_EQ(LVar1, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(CheckPositionRelativeToPlane), 266, -350, 366, -253) - EVT_IF_EQ(LVar0, PLANE_SIDE_POSITIVE) - EVT_RETURN - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SHY_GUY_OUCH, SOUND_SPACE_DEFAULT) - EVT_SET(GF_MAC00_ShyGuyChasedFromShop, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(SetEnemyFlagBits, NPC_ShyGuy_02, ENEMY_FLAG_CANT_INTERACT, 1) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_ShyGuy_03))) - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(LVar1, 1) + CaseEq(ENCOUNTER_TRIGGER_JUMP) + Set(LVar1, 1) + CaseEq(ENCOUNTER_TRIGGER_PARTNER) + Set(LVar1, 1) + CaseDefault + Set(LVar1, 0) + EndSwitch + IfEq(LVar1, 0) + Return + EndIf + Call(N(CheckPositionRelativeToPlane), 266, -350, 366, -253) + IfEq(LVar0, PLANE_SIDE_POSITIVE) + Return + EndIf + Call(PlaySoundAtNpc, NPC_SELF, SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_DEFAULT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SHY_GUY_OUCH, SOUND_SPACE_DEFAULT) + Set(GF_MAC00_ShyGuyChasedFromShop, TRUE) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(SetEnemyFlagBits, NPC_ShyGuy_02, ENEMY_FLAG_CANT_INTERACT, 1) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_ShyGuy_03))) + Return + End }; EvtScript N(EVS_NpcInteract_ShyGuy_02) = { - EVT_CALL(SpeakToPlayer, NPC_ShyGuy_02, ANIM_ShyGuy_Red_Anim11, ANIM_ShyGuy_Red_Anim01, 0, MSG_MAC_Gate_0001) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_ShyGuy_02, ANIM_ShyGuy_Red_Anim11, ANIM_ShyGuy_Red_Anim01, 0, MSG_MAC_Gate_0001) + Return + End }; EvtScript N(EVS_NpcInit_ShyGuy_02) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) - EVT_IF_EQ(GF_MAC00_ShyGuyChasedFromShop, FALSE) - EVT_SET(GF_MAC01_ShyGuyTookOverShop, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, 430, 20, -373) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ShyGuy_02))) - EVT_RETURN - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseRange(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) + IfEq(GF_MAC00_ShyGuyChasedFromShop, FALSE) + Set(GF_MAC01_ShyGuyTookOverShop, TRUE) + Call(SetNpcPos, NPC_SELF, 430, 20, -373) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ShyGuy_02))) + Return + EndIf + EndSwitch + Call(RemoveNpc, NPC_SELF) + Return + End }; EvtScript N(EVS_NpcInit_GardenShyGuy1) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) - EVT_IF_EQ(GF_MAC00_ShyGuyChasedFromShop, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono3, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono4, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono5, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono6, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_dummy, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, 430, 20, -373) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_ShyGuy_03))) - EVT_RETURN - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseRange(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) + IfEq(GF_MAC00_ShyGuyChasedFromShop, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono2, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono3, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono4, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono5, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mono6, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_dummy, COLLIDER_FLAGS_UPPER_MASK) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) + Call(SetNpcPos, NPC_SELF, 430, 20, -373) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_ShyGuy_03))) + Return + EndIf + EndSwitch + Call(RemoveNpc, NPC_SELF) + Return + End }; EvtScript N(EVS_NpcInteract_Toad_01) = { - EVT_EXEC_WAIT(EVS_ShopOwnerDialog) - EVT_RETURN - EVT_END + ExecWait(EVS_ShopOwnerDialog) + Return + End }; EvtScript N(EVS_NpcInteract_Toad_02) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MAC_Gate_0000) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MAC_Gate_0000) + Return + End }; EvtScript N(EVS_NpcInit_Toad_01) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) - EVT_IF_EQ(GF_MAC00_ShyGuyChasedFromShop, FALSE) - EVT_CALL(SetNpcPos, NPC_Toad_01, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_01))) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseRange(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) + IfEq(GF_MAC00_ShyGuyChasedFromShop, FALSE) + Call(SetNpcPos, NPC_Toad_01, NPC_DISPOSE_LOCATION) + EndIf + EndSwitch + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_01))) + Return + End }; EvtScript N(EVS_NpcInit_Toad_02) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) - EVT_IF_EQ(GF_MAC00_ShyGuyChasedFromShop, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, 105, 0, -40) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_02))) - EVT_RETURN - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseRange(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) + IfEq(GF_MAC00_ShyGuyChasedFromShop, FALSE) + Call(SetNpcPos, NPC_SELF, 105, 0, -40) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_02))) + Return + EndIf + EndSwitch + Call(RemoveNpc, NPC_SELF) + Return + End }; #include "npc/dojo_members.inc.c" diff --git a/src/world/area_mac/mac_00/mac_00_6_shop.c b/src/world/area_mac/mac_00/mac_00_6_shop.c index 681b3b9e800..a8422959270 100644 --- a/src/world/area_mac/mac_00/mac_00_6_shop.c +++ b/src/world/area_mac/mac_00/mac_00_6_shop.c @@ -48,14 +48,14 @@ ShopSellPriceData N(PriceList)[] = { }; EvtScript N(EVS_OnBuy) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(SHOP_BUY_RESULT_CANCEL) - EVT_CASE_EQ(SHOP_BUY_RESULT_4) - EVT_CASE_EQ(SHOP_BUY_RESULT_OK) - EVT_CASE_EQ(SHOP_BUY_RESULT_2) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(SHOP_BUY_RESULT_CANCEL) + CaseEq(SHOP_BUY_RESULT_4) + CaseEq(SHOP_BUY_RESULT_OK) + CaseEq(SHOP_BUY_RESULT_2) + EndSwitch + Return + End }; ShopItemLocation N(ItemPositions)[] = { @@ -76,8 +76,8 @@ ShopOwner N(Owner) = { }; EvtScript N(EVS_SetupShop) = { - EVT_CALL(MakeShop, EVT_PTR(N(ItemPositions)), EVT_PTR(N(Inventory)), EVT_PTR(N(PriceList)), ITEM_ENTITY_FLAG_TOSS_LOWER) - EVT_CALL(MakeShopOwner, EVT_PTR(N(Owner))) - EVT_RETURN - EVT_END + Call(MakeShop, Ref(N(ItemPositions)), Ref(N(Inventory)), Ref(N(PriceList)), ITEM_ENTITY_FLAG_TOSS_LOWER) + Call(MakeShopOwner, Ref(N(Owner))) + Return + End }; diff --git a/src/world/area_mac/mac_00/mac_00_7_music_mix.c b/src/world/area_mac/mac_00/mac_00_7_music_mix.c index f77d65cbebb..43589e1d601 100644 --- a/src/world/area_mac/mac_00/mac_00_7_music_mix.c +++ b/src/world/area_mac/mac_00/mac_00_7_music_mix.c @@ -19,16 +19,16 @@ MusicProximityTrigger N(MusicMixTrigger2) = { }; EvtScript N(EVS_SetupMusicTriggers) = { - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN, 0, 8) - EVT_CALL(EnableMusicProximityMix, 0) - EVT_THREAD - EVT_CALL(N(MonitorMusicProximityTrigger), EVT_PTR(N(MusicMixTrigger1))) - EVT_END_THREAD - EVT_IF_GE(GB_StoryProgress, STORY_CH0_RETURNED_TO_TOAD_TOWN) - EVT_THREAD - EVT_CALL(N(MonitorMusicProximityTrigger), EVT_PTR(N(MusicMixTrigger2))) - EVT_END_THREAD - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TOAD_TOWN, 0, 8) + Call(EnableMusicProximityMix, 0) + Thread + Call(N(MonitorMusicProximityTrigger), Ref(N(MusicMixTrigger1))) + EndThread + IfGe(GB_StoryProgress, STORY_CH0_RETURNED_TO_TOAD_TOWN) + Thread + Call(N(MonitorMusicProximityTrigger), Ref(N(MusicMixTrigger2))) + EndThread + EndIf + Return + End }; diff --git a/src/world/area_mac/mac_00/mac_00_8_demo.c b/src/world/area_mac/mac_00/mac_00_8_demo.c index 36164bbf5eb..83ba1d30800 100644 --- a/src/world/area_mac/mac_00/mac_00_8_demo.c +++ b/src/world/area_mac/mac_00/mac_00_8_demo.c @@ -1,117 +1,117 @@ #include "mac_00.h" EvtScript N(EVS_ProvideDemoInputs) = { - EVT_WAIT(50) - EVT_CALL(DemoJoystickXY, 22, -26) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 65, -61) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 66, -67) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 66, -70) - EVT_WAIT(30) - EVT_CALL(DemoJoystickXY, 66, -71) - EVT_WAIT(18) - EVT_CALL(DemoJoystickXY, 67, -62) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 74, -34) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 81, -6) - EVT_CALL(DemoSetButtons, BUTTON_A) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 82, -2) - EVT_WAIT(3) - EVT_CALL(DemoSetButtons, 0) - EVT_WAIT(7) - EVT_CALL(DemoJoystickXY, 81, -3) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 80, -10) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 78, -22) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 75, -35) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 72, -49) - EVT_CALL(DemoSetButtons, BUTTON_A) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 70, -56) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 70, -57) - EVT_WAIT(2) - EVT_CALL(DemoSetButtons, 0) - EVT_WAIT(9) - EVT_CALL(DemoJoystickXY, 70, -56) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 74, -26) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 79, 8) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 70, 46) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 66, 68) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 66, 67) - EVT_WAIT(2) - EVT_CALL(DemoJoystickXY, 65, 67) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 63, 66) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 45, 46) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 22, 23) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 1, -1) - EVT_WAIT(2) - EVT_CALL(DemoSetButtons, BUTTON_A) - EVT_WAIT(4) - EVT_CALL(DemoSetButtons, 0) - EVT_WAIT(61) - EVT_CALL(DemoJoystickXY, 3, -1) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 14, -1) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 74, -8) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 77, -9) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 78, -9) - EVT_WAIT(11) - EVT_CALL(DemoJoystickXY, 78, -8) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 79, -7) - EVT_IF_EQ(GF_DemoSceneDone, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_DemoSceneDone, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("mac_00"), mac_00_ENTRY_2, TRANSITION_END_DEMO_SCENE_BLACK) - EVT_WAIT(110) - EVT_RETURN - EVT_END + Wait(50) + Call(DemoJoystickXY, 22, -26) + Wait(1) + Call(DemoJoystickXY, 65, -61) + Wait(1) + Call(DemoJoystickXY, 66, -67) + Wait(1) + Call(DemoJoystickXY, 66, -70) + Wait(30) + Call(DemoJoystickXY, 66, -71) + Wait(18) + Call(DemoJoystickXY, 67, -62) + Wait(1) + Call(DemoJoystickXY, 74, -34) + Wait(1) + Call(DemoJoystickXY, 81, -6) + Call(DemoSetButtons, BUTTON_A) + Wait(1) + Call(DemoJoystickXY, 82, -2) + Wait(3) + Call(DemoSetButtons, 0) + Wait(7) + Call(DemoJoystickXY, 81, -3) + Wait(1) + Call(DemoJoystickXY, 80, -10) + Wait(1) + Call(DemoJoystickXY, 78, -22) + Wait(1) + Call(DemoJoystickXY, 75, -35) + Wait(1) + Call(DemoJoystickXY, 72, -49) + Call(DemoSetButtons, BUTTON_A) + Wait(1) + Call(DemoJoystickXY, 70, -56) + Wait(1) + Call(DemoJoystickXY, 70, -57) + Wait(2) + Call(DemoSetButtons, 0) + Wait(9) + Call(DemoJoystickXY, 70, -56) + Wait(1) + Call(DemoJoystickXY, 74, -26) + Wait(1) + Call(DemoJoystickXY, 79, 8) + Wait(1) + Call(DemoJoystickXY, 70, 46) + Wait(1) + Call(DemoJoystickXY, 66, 68) + Wait(1) + Call(DemoJoystickXY, 66, 67) + Wait(2) + Call(DemoJoystickXY, 65, 67) + Wait(1) + Call(DemoJoystickXY, 63, 66) + Wait(1) + Call(DemoJoystickXY, 45, 46) + Wait(1) + Call(DemoJoystickXY, 22, 23) + Wait(1) + Call(DemoJoystickXY, 1, -1) + Wait(2) + Call(DemoSetButtons, BUTTON_A) + Wait(4) + Call(DemoSetButtons, 0) + Wait(61) + Call(DemoJoystickXY, 3, -1) + Wait(1) + Call(DemoJoystickXY, 14, -1) + Wait(1) + Call(DemoJoystickXY, 74, -8) + Wait(1) + Call(DemoJoystickXY, 77, -9) + Wait(1) + Call(DemoJoystickXY, 78, -9) + Wait(11) + Call(DemoJoystickXY, 78, -8) + Wait(1) + Call(DemoJoystickXY, 79, -7) + IfEq(GF_DemoSceneDone, TRUE) + Return + EndIf + Set(GF_DemoSceneDone, TRUE) + Call(GotoMapSpecial, Ref("mac_00"), mac_00_ENTRY_2, TRANSITION_END_DEMO_SCENE_BLACK) + Wait(110) + Return + End }; EvtScript N(EVS_MonitorDemoState) = { - EVT_WAIT(10) - EVT_LOOP(0) - EVT_CALL(GetDemoState, LVar0) - EVT_IF_EQ(LVar0, DEMO_STATE_CHANGE_MAP) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(GF_DemoSceneDone, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_DemoSceneDone, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("mac_00"), mac_00_ENTRY_2, TRANSITION_END_DEMO_SCENE_WHITE) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Wait(10) + Loop(0) + Call(GetDemoState, LVar0) + IfEq(LVar0, DEMO_STATE_CHANGE_MAP) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(GF_DemoSceneDone, TRUE) + Return + EndIf + Set(GF_DemoSceneDone, TRUE) + Call(GotoMapSpecial, Ref("mac_00"), mac_00_ENTRY_2, TRANSITION_END_DEMO_SCENE_WHITE) + Wait(100) + Return + End }; EvtScript N(EVS_SetupDemo) = { - EVT_SET(GF_DemoSceneDone, FALSE) - EVT_EXEC(N(EVS_MonitorDemoState)) - EVT_EXEC(N(EVS_ProvideDemoInputs)) - EVT_RETURN - EVT_END + Set(GF_DemoSceneDone, FALSE) + Exec(N(EVS_MonitorDemoState)) + Exec(N(EVS_ProvideDemoInputs)) + Return + End }; diff --git a/src/world/area_mac/mac_00/mac_00_9_water_gfx.c b/src/world/area_mac/mac_00/mac_00_9_water_gfx.c index c195a1af1b0..a42402dcd34 100644 --- a/src/world/area_mac/mac_00/mac_00_9_water_gfx.c +++ b/src/world/area_mac/mac_00/mac_00_9_water_gfx.c @@ -26,9 +26,9 @@ void N(gfx_build_water)(void) { } EvtScript N(EVS_SetupWaterCustomGfx) = { - EVT_WAIT(1) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_0, EVT_PTR(N(gfx_build_water)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_water, CUSTOM_GFX_0, -1) - EVT_RETURN - EVT_END + Wait(1) + Call(SetCustomGfxBuilders, CUSTOM_GFX_0, Ref(N(gfx_build_water)), NULL) + Call(SetModelCustomGfx, MODEL_water, CUSTOM_GFX_0, -1) + Return + End }; diff --git a/src/world/area_mac/mac_00/npc/dojo_members.inc.c b/src/world/area_mac/mac_00/npc/dojo_members.inc.c index 199bd6e5df4..58b308224c8 100644 --- a/src/world/area_mac/mac_00/npc/dojo_members.inc.c +++ b/src/world/area_mac/mac_00/npc/dojo_members.inc.c @@ -26,137 +26,137 @@ API_CALLABLE(N(ResetBackgroundPostBattle)) { } EvtScript N(EVS_NpcInteract_Chan) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH0_TWINK_GAVE_LUCKY_STAR) - EVT_SET(LVar0, MSG_MAC_Gate_0015) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Gate_001B) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Chan_Run, ANIM_Chan_Idle, 0, LVar0) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH0_TWINK_GAVE_LUCKY_STAR) + Set(LVar0, MSG_MAC_Gate_0015) + Else + Set(LVar0, MSG_MAC_Gate_001B) + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_Chan_Run, ANIM_Chan_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcAI_Chan) = { - EVT_CALL(ContinueSpeech, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, MSG_MAC_Gate_001D) - EVT_CALL(SpeakToNpc, NPC_SELF, ANIM_Chan_Run, ANIM_Chan_Idle, 0, NPC_TheMaster, MSG_MAC_Gate_001E) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_TheMaster, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(func_802D2C14, 1) - EVT_CALL(PlayerMoveTo, 348, -364, 20) - EVT_CALL(InterpPlayerYaw, 20, 0) - EVT_WAIT(20) - EVT_CALL(func_802D2C14, 0) - EVT_CALL(SetNpcFlagBits, NPC_TheMaster, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Chan_Walk) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(NpcMoveTo, NPC_SELF, 380, -400, 30) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Chan_Idle) - EVT_CALL(InterpNpcYaw, NPC_SELF, 225, 0) - EVT_WAIT(20) - EVT_CALL(N(SetDojoBattle)) - EVT_CALL(StartBattle) - EVT_RETURN - EVT_END + Call(ContinueSpeech, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, MSG_MAC_Gate_001D) + Call(SpeakToNpc, NPC_SELF, ANIM_Chan_Run, ANIM_Chan_Idle, 0, NPC_TheMaster, MSG_MAC_Gate_001E) + Wait(10) + Thread + Call(SetNpcFlagBits, NPC_TheMaster, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(func_802D2C14, 1) + Call(PlayerMoveTo, 348, -364, 20) + Call(InterpPlayerYaw, 20, 0) + Wait(20) + Call(func_802D2C14, 0) + Call(SetNpcFlagBits, NPC_TheMaster, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + EndThread + Call(SetNpcAnimation, NPC_SELF, ANIM_Chan_Walk) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(NpcMoveTo, NPC_SELF, 380, -400, 30) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Chan_Idle) + Call(InterpNpcYaw, NPC_SELF, 225, 0) + Wait(20) + Call(N(SetDojoBattle)) + Call(StartBattle) + Return + End }; EvtScript N(EVS_NpcDefeat_Chan) = { - EVT_CALL(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAG_4, TRUE) - EVT_CALL(N(ResetBackgroundPostBattle)) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Chan_Walk) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(NpcMoveTo, NPC_SELF, 310, -390, 30) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Chan_Idle) - EVT_CALL(InterpNpcYaw, NPC_SELF, 45, 0) - EVT_END_THREAD - EVT_CALL(GetBattleOutcome, LVar0) - EVT_CALL(SetNpcVar, NPC_TheMaster, 1, LVar0) - EVT_CALL(SetNpcVar, NPC_TheMaster, 0, 1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_RETURN - EVT_END + Call(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAG_4, TRUE) + Call(N(ResetBackgroundPostBattle)) + Thread + Call(SetNpcAnimation, NPC_SELF, ANIM_Chan_Walk) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(NpcMoveTo, NPC_SELF, 310, -390, 30) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Chan_Idle) + Call(InterpNpcYaw, NPC_SELF, 45, 0) + EndThread + Call(GetBattleOutcome, LVar0) + Call(SetNpcVar, NPC_TheMaster, 1, LVar0) + Call(SetNpcVar, NPC_TheMaster, 0, 1) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Return + End }; EvtScript N(EVS_NpcInit_Chan) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH0_TWINK_GAVE_LUCKY_STAR) - EVT_CALL(SetNpcPos, NPC_SELF, 570, 20, -150) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Chan))) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH0_TWINK_GAVE_LUCKY_STAR) + Call(SetNpcPos, NPC_SELF, 570, 20, -150) + Call(SetNpcYaw, NPC_SELF, 270) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Chan))) + Return + End }; EvtScript N(EVS_NpcInteract_Lee) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH0_TWINK_GAVE_LUCKY_STAR) - EVT_SET(LVar0, MSG_MAC_Gate_0016) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Gate_001C) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lee_Talk, ANIM_Lee_Idle, 0, LVar0) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH0_TWINK_GAVE_LUCKY_STAR) + Set(LVar0, MSG_MAC_Gate_0016) + Else + Set(LVar0, MSG_MAC_Gate_001C) + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_Lee_Talk, ANIM_Lee_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcAI_Lee) = { - EVT_CALL(ContinueSpeech, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, MSG_MAC_Gate_0024) - EVT_CALL(SpeakToNpc, NPC_SELF, ANIM_Lee_Talk, ANIM_Lee_Idle, 0, NPC_TheMaster, MSG_MAC_Gate_0025) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_TheMaster, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(func_802D2C14, 1) - EVT_CALL(PlayerMoveTo, 348, -364, 20) - EVT_CALL(InterpPlayerYaw, 20, 0) - EVT_WAIT(20) - EVT_CALL(func_802D2C14, 0) - EVT_CALL(SetNpcFlagBits, NPC_TheMaster, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Lee_Walk) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(NpcMoveTo, NPC_SELF, 380, -400, 30) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Lee_Idle) - EVT_CALL(InterpNpcYaw, NPC_SELF, 225, 0) - EVT_WAIT(20) - EVT_CALL(N(SetDojoBattle)) - EVT_CALL(StartBattle) - EVT_RETURN - EVT_END + Call(ContinueSpeech, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, MSG_MAC_Gate_0024) + Call(SpeakToNpc, NPC_SELF, ANIM_Lee_Talk, ANIM_Lee_Idle, 0, NPC_TheMaster, MSG_MAC_Gate_0025) + Wait(10) + Thread + Call(SetNpcFlagBits, NPC_TheMaster, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(func_802D2C14, 1) + Call(PlayerMoveTo, 348, -364, 20) + Call(InterpPlayerYaw, 20, 0) + Wait(20) + Call(func_802D2C14, 0) + Call(SetNpcFlagBits, NPC_TheMaster, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + EndThread + Call(SetNpcAnimation, NPC_SELF, ANIM_Lee_Walk) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(NpcMoveTo, NPC_SELF, 380, -400, 30) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Lee_Idle) + Call(InterpNpcYaw, NPC_SELF, 225, 0) + Wait(20) + Call(N(SetDojoBattle)) + Call(StartBattle) + Return + End }; EvtScript N(EVS_NpcDefeat_Lee) = { - EVT_CALL(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAG_4, TRUE) - EVT_CALL(N(ResetBackgroundPostBattle)) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Lee_Walk) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(NpcMoveTo, NPC_SELF, 330, -410, 30) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Lee_Idle) - EVT_CALL(InterpNpcYaw, NPC_SELF, 45, 0) - EVT_END_THREAD - EVT_CALL(GetBattleOutcome, LVar0) - EVT_CALL(SetNpcVar, NPC_TheMaster, 1, LVar0) - EVT_CALL(SetNpcVar, NPC_TheMaster, 0, 1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_RETURN - EVT_END + Call(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAG_4, TRUE) + Call(N(ResetBackgroundPostBattle)) + Thread + Call(SetNpcAnimation, NPC_SELF, ANIM_Lee_Walk) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(NpcMoveTo, NPC_SELF, 330, -410, 30) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Lee_Idle) + Call(InterpNpcYaw, NPC_SELF, 45, 0) + EndThread + Call(GetBattleOutcome, LVar0) + Call(SetNpcVar, NPC_TheMaster, 1, LVar0) + Call(SetNpcVar, NPC_TheMaster, 0, 1) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Return + End }; EvtScript N(EVS_NpcInit_Lee) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH0_TWINK_GAVE_LUCKY_STAR) - EVT_CALL(SetNpcPos, NPC_SELF, 600, 20, -145) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_END_IF - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lee))) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH0_TWINK_GAVE_LUCKY_STAR) + Call(SetNpcPos, NPC_SELF, 600, 20, -145) + Call(SetNpcYaw, NPC_SELF, 270) + EndIf + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Lee))) + Return + End }; API_CALLABLE(N(SetPlayer1HP)) { @@ -173,165 +173,165 @@ enum { }; EvtScript N(EVS_NpcIdle_TheMaster) = { - EVT_LABEL(0) - EVT_CALL(SetSelfVar, VAR_FINISHED_BATTLE, FALSE) - EVT_CALL(SetSelfVar, VAR_STARTED_BATTLE, FALSE) + Label(0) + Call(SetSelfVar, VAR_FINISHED_BATTLE, FALSE) + Call(SetSelfVar, VAR_STARTED_BATTLE, FALSE) // wait for battle to start - EVT_LOOP(0) - EVT_CALL(GetSelfVar, VAR_STARTED_BATTLE, LVar0) - EVT_IF_TRUE(LVar0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) + Loop(0) + Call(GetSelfVar, VAR_STARTED_BATTLE, LVar0) + IfTrue(LVar0) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(DisablePlayerInput, TRUE) // wait for battle to end - EVT_LOOP(0) - EVT_CALL(GetSelfVar, VAR_FINISHED_BATTLE, LVar0) - EVT_IF_TRUE(LVar0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP + Loop(0) + Call(GetSelfVar, VAR_FINISHED_BATTLE, LVar0) + IfTrue(LVar0) + BreakLoop + EndIf + Wait(1) + EndLoop // handle battle outcomes - EVT_CALL(GetSelfVar, VAR_BATTLE_OUTCOME, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CALL(N(SetPlayer1HP)) - EVT_CALL(SpeakToPlayer, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, MSG_MAC_Gate_0042) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(SpeakToPlayer, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, MSG_MAC_Gate_0042) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_SWITCH(GB_MAC00_DojoRank) - EVT_CASE_EQ(0) - EVT_SET(LVar1, MSG_MAC_Gate_0023) - EVT_SET(LVar0, ITEM_FIRST_DEGREE_CARD) - EVT_SET(LVar2, ITEM_FIRST_DEGREE_CARD) - EVT_CASE_EQ(1) - EVT_SET(LVar1, MSG_MAC_Gate_002A) - EVT_SET(LVar0, ITEM_SECOND_DEGREE_CARD) - EVT_SET(LVar2, ITEM_FIRST_DEGREE_CARD) - EVT_CASE_EQ(2) - EVT_SET(LVar1, MSG_MAC_Gate_003E) - EVT_SET(LVar0, ITEM_THIRD_DEGREE_CARD) - EVT_SET(LVar2, ITEM_SECOND_DEGREE_CARD) - EVT_CASE_EQ(3) - EVT_SET(LVar1, MSG_MAC_Gate_003F) - EVT_SET(LVar0, ITEM_FOURTH_DEGREE_CARD) - EVT_SET(LVar2, ITEM_THIRD_DEGREE_CARD) - EVT_CASE_EQ(4) - EVT_SET(LVar1, MSG_MAC_Gate_0040) - EVT_SET(LVar0, ITEM_DIPLOMA) - EVT_SET(LVar2, ITEM_FOURTH_DEGREE_CARD) - EVT_END_SWITCH - EVT_ADD(GB_MAC00_DojoRank, 1) - EVT_CALL(SpeakToPlayer, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, LVar1) - EVT_CALL(FindKeyItem, LVar2, LVar1) - EVT_IF_NE(LVar1, -1) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_END_IF - EVT_SET(LVar1, 1) - EVT_EXEC_WAIT(N(GiveItemReward)) - EVT_CALL(AddKeyItem, LVar0) - EVT_IF_LT(GB_MAC00_DojoRank, 5) - EVT_CALL(SpeakToPlayer, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, MSG_MAC_Gate_0041) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, FALSE) + Call(GetSelfVar, VAR_BATTLE_OUTCOME, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_LOST) + Call(N(SetPlayer1HP)) + Call(SpeakToPlayer, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, MSG_MAC_Gate_0042) + CaseEq(OUTCOME_PLAYER_FLED) + Call(SpeakToPlayer, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, MSG_MAC_Gate_0042) + CaseEq(OUTCOME_PLAYER_WON) + Switch(GB_MAC00_DojoRank) + CaseEq(0) + Set(LVar1, MSG_MAC_Gate_0023) + Set(LVar0, ITEM_FIRST_DEGREE_CARD) + Set(LVar2, ITEM_FIRST_DEGREE_CARD) + CaseEq(1) + Set(LVar1, MSG_MAC_Gate_002A) + Set(LVar0, ITEM_SECOND_DEGREE_CARD) + Set(LVar2, ITEM_FIRST_DEGREE_CARD) + CaseEq(2) + Set(LVar1, MSG_MAC_Gate_003E) + Set(LVar0, ITEM_THIRD_DEGREE_CARD) + Set(LVar2, ITEM_SECOND_DEGREE_CARD) + CaseEq(3) + Set(LVar1, MSG_MAC_Gate_003F) + Set(LVar0, ITEM_FOURTH_DEGREE_CARD) + Set(LVar2, ITEM_THIRD_DEGREE_CARD) + CaseEq(4) + Set(LVar1, MSG_MAC_Gate_0040) + Set(LVar0, ITEM_DIPLOMA) + Set(LVar2, ITEM_FOURTH_DEGREE_CARD) + EndSwitch + Add(GB_MAC00_DojoRank, 1) + Call(SpeakToPlayer, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, LVar1) + Call(FindKeyItem, LVar2, LVar1) + IfNe(LVar1, -1) + Call(RemoveKeyItemAt, LVar1) + EndIf + Set(LVar1, 1) + ExecWait(N(GiveItemReward)) + Call(AddKeyItem, LVar0) + IfLt(GB_MAC00_DojoRank, 5) + Call(SpeakToPlayer, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, MSG_MAC_Gate_0041) + EndIf + EndSwitch + Call(DisablePlayerInput, FALSE) // restart cycle, waiting for the next battle - EVT_GOTO(0) - EVT_RETURN - EVT_END + Goto(0) + Return + End }; EvtScript N(EVS_NpcDefeat_Dojo) = { - EVT_CALL(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAG_4, TRUE) - EVT_CALL(N(ResetBackgroundPostBattle)) - EVT_CALL(GetBattleOutcome, LVar0) - EVT_CALL(SetSelfVar, VAR_BATTLE_OUTCOME, LVar0) - EVT_CALL(SetSelfVar, VAR_FINISHED_BATTLE, TRUE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_RETURN - EVT_END + Call(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAG_4, TRUE) + Call(N(ResetBackgroundPostBattle)) + Call(GetBattleOutcome, LVar0) + Call(SetSelfVar, VAR_BATTLE_OUTCOME, LVar0) + Call(SetSelfVar, VAR_FINISHED_BATTLE, TRUE) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Return + End }; EvtScript N(EVS_TheMaster_InteractImpl) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_EQ(GF_MAC00_Met_TheMaster, FALSE) - EVT_SET(GF_MAC00_Met_TheMaster, TRUE) - EVT_SET(LVar0, MSG_MAC_Gate_0017) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Gate_0018) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, LVar0) - EVT_CALL(ShowChoice, MSG_Choice_0016) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(ContinueSpeech, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, MSG_MAC_Gate_0019) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_IF_GT(GB_MAC00_DojoRank, 4) - EVT_CALL(ContinueSpeech, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, MSG_MAC_Gate_0043) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetSelfVar, VAR_STARTED_BATTLE, TRUE) - EVT_WAIT(1) - EVT_SWITCH(GB_MAC00_DojoRank) - EVT_CASE_EQ(0) - EVT_CALL(BindNpcDefeat, NPC_Chan, EVT_PTR(N(EVS_NpcDefeat_Chan))) - EVT_CALL(BindNpcAI, NPC_Chan, EVT_PTR(N(EVS_NpcAI_Chan))) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_CASE_EQ(1) - EVT_CALL(BindNpcDefeat, NPC_Lee, EVT_PTR(N(EVS_NpcDefeat_Lee))) - EVT_CALL(BindNpcAI, NPC_Lee, EVT_PTR(N(EVS_NpcAI_Lee))) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_CASE_EQ(2) - EVT_SET(LVar1, MSG_MAC_Gate_002B) - EVT_CASE_EQ(3) - EVT_SET(LVar1, MSG_MAC_Gate_002C) - EVT_CASE_EQ(4) - EVT_SET(LVar1, MSG_MAC_Gate_002D) - EVT_END_SWITCH - EVT_CALL(ContinueSpeech, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, LVar1) - EVT_WAIT(10) - EVT_CALL(SetNpcFlagBits, NPC_TheMaster, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_THREAD - EVT_CALL(func_802D2C14, 1) - EVT_CALL(PlayerMoveTo, 348, -364, 20) - EVT_CALL(InterpPlayerYaw, 20, 0) - EVT_WAIT(20) - EVT_CALL(func_802D2C14, 0) - EVT_END_THREAD - EVT_CALL(NpcMoveTo, NPC_SELF, 375, -400, 30) - EVT_CALL(InterpNpcYaw, NPC_TheMaster, 225, 0) - EVT_WAIT(30) - EVT_CALL(SetNpcFlagBits, NPC_TheMaster, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Dojo))) - EVT_WAIT(1) - EVT_CALL(N(SetDojoBattle)) - EVT_IF_LT(GB_MAC00_DojoRank, 2) - EVT_CALL(StartBattle) - EVT_ELSE - EVT_CALL(StartBattleWith, SONG_MASTER_BATTLE) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + IfEq(GF_MAC00_Met_TheMaster, FALSE) + Set(GF_MAC00_Met_TheMaster, TRUE) + Set(LVar0, MSG_MAC_Gate_0017) + Else + Set(LVar0, MSG_MAC_Gate_0018) + EndIf + Call(SpeakToPlayer, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, LVar0) + Call(ShowChoice, MSG_Choice_0016) + IfEq(LVar0, 1) + Call(ContinueSpeech, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, MSG_MAC_Gate_0019) + Call(DisablePlayerInput, FALSE) + Return + EndIf + IfGt(GB_MAC00_DojoRank, 4) + Call(ContinueSpeech, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, MSG_MAC_Gate_0043) + Call(DisablePlayerInput, FALSE) + Return + EndIf + Call(SetSelfVar, VAR_STARTED_BATTLE, TRUE) + Wait(1) + Switch(GB_MAC00_DojoRank) + CaseEq(0) + Call(BindNpcDefeat, NPC_Chan, Ref(N(EVS_NpcDefeat_Chan))) + Call(BindNpcAI, NPC_Chan, Ref(N(EVS_NpcAI_Chan))) + Call(DisablePlayerInput, FALSE) + Return + CaseEq(1) + Call(BindNpcDefeat, NPC_Lee, Ref(N(EVS_NpcDefeat_Lee))) + Call(BindNpcAI, NPC_Lee, Ref(N(EVS_NpcAI_Lee))) + Call(DisablePlayerInput, FALSE) + Return + CaseEq(2) + Set(LVar1, MSG_MAC_Gate_002B) + CaseEq(3) + Set(LVar1, MSG_MAC_Gate_002C) + CaseEq(4) + Set(LVar1, MSG_MAC_Gate_002D) + EndSwitch + Call(ContinueSpeech, NPC_TheMaster, ANIM_TheMaster_Talk, ANIM_TheMaster_Idle, 0, LVar1) + Wait(10) + Call(SetNpcFlagBits, NPC_TheMaster, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Thread + Call(func_802D2C14, 1) + Call(PlayerMoveTo, 348, -364, 20) + Call(InterpPlayerYaw, 20, 0) + Wait(20) + Call(func_802D2C14, 0) + EndThread + Call(NpcMoveTo, NPC_SELF, 375, -400, 30) + Call(InterpNpcYaw, NPC_TheMaster, 225, 0) + Wait(30) + Call(SetNpcFlagBits, NPC_TheMaster, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Dojo))) + Wait(1) + Call(N(SetDojoBattle)) + IfLt(GB_MAC00_DojoRank, 2) + Call(StartBattle) + Else + Call(StartBattleWith, SONG_MASTER_BATTLE) + EndIf + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_TheMaster) = { - EVT_EXEC(N(EVS_TheMaster_InteractImpl)) - EVT_WAIT(30) // purpose unknown -- perhaps somehow prevents double interaction? - EVT_RETURN - EVT_END + Exec(N(EVS_TheMaster_InteractImpl)) + Wait(30) // purpose unknown -- perhaps somehow prevents double interaction? + Return + End }; EvtScript N(EVS_NpcInit_TheMaster) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_TheMaster))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TheMaster))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_TheMaster))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_TheMaster))) + Return + End }; diff --git a/src/world/area_mac/mac_00/npc/russ_and_thief.inc.c b/src/world/area_mac/mac_00/npc/russ_and_thief.inc.c index e0626e3f1d2..4e754df5e7e 100644 --- a/src/world/area_mac/mac_00/npc/russ_and_thief.inc.c +++ b/src/world/area_mac/mac_00/npc/russ_and_thief.inc.c @@ -4,31 +4,31 @@ s32 N(LetterList_RussT)[] = { }; EvtScript N(EVS_LetterPrompt_RussT) = { - EVT_CALL(N(LetterDelivery_Init), + Call(N(LetterDelivery_Init), NPC_RussT, ANIM_RussT_Talk, ANIM_RussT_Idle, ITEM_LETTER_TO_RUSS_T, ITEM_NONE, MSG_MAC_Gate_0011, MSG_MAC_Gate_0012, MSG_MAC_Gate_0013, MSG_MAC_Gate_0014, - EVT_PTR(N(LetterList_RussT))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) - EVT_RETURN - EVT_END + Ref(N(LetterList_RussT))) + ExecWait(N(EVS_DoLetterDelivery)) + Return + End }; EvtScript N(EVS_LetterReward_RussT) = { - EVT_IF_EQ(LVarC, DELIVERY_ACCEPTED) + IfEq(LVarC, DELIVERY_ACCEPTED) EVT_GIVE_STAR_PIECE() - EVT_END_IF - EVT_RETURN - EVT_END + EndIf + Return + End }; EvtScript N(EVS_ShyGuy_PlayRunningSounds) = { - EVT_LOOP(0) - EVT_CALL(PlaySoundAtNpc, LVar0, SOUND_SEQ_SHY_GUY_STEP, SOUND_SPACE_DEFAULT) - EVT_WAIT(2) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(PlaySoundAtNpc, LVar0, SOUND_SEQ_SHY_GUY_STEP, SOUND_SPACE_DEFAULT) + Wait(2) + EndLoop + Return + End }; typedef struct RussTLoreEntry { @@ -160,117 +160,117 @@ API_CALLABLE(N(GetRussHintCount)) { } EvtScript N(EVS_ManageCarriedDictionary) = { - EVT_CALL(GetNpcPos, NPC_ShyGuyThief, LVar2, LVar3, LVar4) - EVT_ADD(LVar3, 20) - EVT_CALL(MakeItemEntity, ITEM_DICTIONARY, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVar9, LVar0) - EVT_WAIT(1) - EVT_LOOP(300) - EVT_CALL(GetNpcPos, NPC_ShyGuyThief, LVar2, LVar3, LVar4) - EVT_ADD(LVar3, 20) - EVT_CALL(SetItemPos, LVar9, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(RemoveItemEntity, LVar9) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_ShyGuyThief, LVar2, LVar3, LVar4) + Add(LVar3, 20) + Call(MakeItemEntity, ITEM_DICTIONARY, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVar9, LVar0) + Wait(1) + Loop(300) + Call(GetNpcPos, NPC_ShyGuyThief, LVar2, LVar3, LVar4) + Add(LVar3, 20) + Call(SetItemPos, LVar9, LVar2, LVar3, LVar4) + Wait(1) + EndLoop + Call(RemoveItemEntity, LVar9) + Return + End }; EvtScript N(EVS_ShyGuy_StealDictionary) = { - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, -60) - EVT_IF_LT(LVar0, 120) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_ShyGuyThief, -30, 20, -470) - EVT_CALL(SetNpcAnimation, NPC_ShyGuyThief, ANIM_ShyGuy_Red_Anim04) - EVT_WAIT(1) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_MAC_Gate_0009, 160, 40) - EVT_EXEC(N(EVS_ManageCarriedDictionary)) - EVT_THREAD - EVT_CALL(SetGroupVisibility, MODEL_intel_inn, MODEL_GROUP_VISIBLE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilit3, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 8) - EVT_CALL(RotateModel, MODEL_o210, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(10) - EVT_ADD(LVar0, -8) - EVT_CALL(RotateModel, MODEL_o210, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilit3, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetGroupVisibility, MODEL_intel_inn, MODEL_GROUP_HIDDEN) - EVT_END_THREAD - EVT_WAIT(5) - EVT_CALL(SetNpcSpeed, NPC_ShyGuyThief, 10) - EVT_SET(LVar0, 21) - EVT_EXEC_GET_TID(N(EVS_ShyGuy_PlayRunningSounds), LVarA) - EVT_CALL(NpcMoveTo, NPC_ShyGuyThief, -10, -410, 0) - EVT_KILL_THREAD(LVarA) - EVT_CALL(PlaySoundAtNpc, NPC_ShyGuyThief, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_ShyGuyThief, -10, 0, -340, 0) - EVT_SET(LVar0, 21) - EVT_CALL(PlaySoundAtNpc, LVar0, SOUND_SHY_GUY_RUN_AWAY, SOUND_SPACE_DEFAULT) - EVT_EXEC_GET_TID(N(EVS_ShyGuy_PlayRunningSounds), LVarA) - EVT_CALL(NpcMoveTo, NPC_ShyGuyThief, 45, -186, 0) - EVT_CALL(NpcMoveTo, NPC_ShyGuyThief, 139, -67, 0) - EVT_THREAD - EVT_CALL(NpcMoveTo, NPC_ShyGuyThief, 300, -20, 0) - EVT_CALL(NpcMoveTo, NPC_ShyGuyThief, 600, 0, 0) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetNpcPos, NPC_ShyGuyThief, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_SET(GF_MAC00_DictionaryStolen, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar0, -60) + IfLt(LVar0, 120) + BreakLoop + EndIf + EndIf + Wait(1) + EndLoop + Call(SetNpcPos, NPC_ShyGuyThief, -30, 20, -470) + Call(SetNpcAnimation, NPC_ShyGuyThief, ANIM_ShyGuy_Red_Anim04) + Wait(1) + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_MAC_Gate_0009, 160, 40) + Exec(N(EVS_ManageCarriedDictionary)) + Thread + Call(SetGroupVisibility, MODEL_intel_inn, MODEL_GROUP_VISIBLE) + Call(PlaySoundAtCollider, COLLIDER_deilit3, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 8) + Call(RotateModel, MODEL_o210, LVar0, 0, 1, 0) + Wait(1) + EndLoop + Loop(10) + Add(LVar0, -8) + Call(RotateModel, MODEL_o210, LVar0, 0, 1, 0) + Wait(1) + EndLoop + Call(PlaySoundAtCollider, COLLIDER_deilit3, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Call(SetGroupVisibility, MODEL_intel_inn, MODEL_GROUP_HIDDEN) + EndThread + Wait(5) + Call(SetNpcSpeed, NPC_ShyGuyThief, 10) + Set(LVar0, 21) + ExecGetTID(N(EVS_ShyGuy_PlayRunningSounds), LVarA) + Call(NpcMoveTo, NPC_ShyGuyThief, -10, -410, 0) + KillThread(LVarA) + Call(PlaySoundAtNpc, NPC_ShyGuyThief, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_ShyGuyThief, -10, 0, -340, 0) + Set(LVar0, 21) + Call(PlaySoundAtNpc, LVar0, SOUND_SHY_GUY_RUN_AWAY, SOUND_SPACE_DEFAULT) + ExecGetTID(N(EVS_ShyGuy_PlayRunningSounds), LVarA) + Call(NpcMoveTo, NPC_ShyGuyThief, 45, -186, 0) + Call(NpcMoveTo, NPC_ShyGuyThief, 139, -67, 0) + Thread + Call(NpcMoveTo, NPC_ShyGuyThief, 300, -20, 0) + Call(NpcMoveTo, NPC_ShyGuyThief, 600, 0, 0) + KillThread(LVarA) + Call(SetNpcPos, NPC_ShyGuyThief, NPC_DISPOSE_LOCATION) + EndThread + Set(GF_MAC00_DictionaryStolen, TRUE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_ShyGuyThief) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) - EVT_RETURN - EVT_END_IF - EVT_IF_GT(GB_StoryProgress, STORY_CH4_GOT_TAYCE_TS_CAKE) - EVT_RETURN - EVT_END_IF - EVT_IF_NE(GF_MAC00_DictionaryStolen, FALSE) - EVT_RETURN - EVT_END_IF - EVT_EXEC(N(EVS_ShyGuy_StealDictionary)) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) + Return + EndIf + IfGt(GB_StoryProgress, STORY_CH4_GOT_TAYCE_TS_CAKE) + Return + EndIf + IfNe(GF_MAC00_DictionaryStolen, FALSE) + Return + EndIf + Exec(N(EVS_ShyGuy_StealDictionary)) + Return + End }; EvtScript N(EVS_RussT_GetHint) = { - EVT_CALL(N(InitRussHintUnlocks)) - EVT_IF_EQ(GF_MAC00_Met_RussT, FALSE) - EVT_SET(GF_MAC00_Met_RussT, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_0004) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(GetRussHintCount)) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SpeakToPlayer, NPC_RussT, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_0008) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(GetRussHintMessage)) - EVT_IF_NE(LVar2, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_0005) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_0006) - EVT_END_IF - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, LVar1) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_0007) - EVT_RETURN - EVT_END + Call(N(InitRussHintUnlocks)) + IfEq(GF_MAC00_Met_RussT, FALSE) + Set(GF_MAC00_Met_RussT, TRUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_0004) + Return + EndIf + Call(N(GetRussHintCount)) + IfEq(LVar0, 0) + Call(SpeakToPlayer, NPC_RussT, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_0008) + Return + EndIf + Call(N(GetRussHintMessage)) + IfNe(LVar2, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_0005) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_0006) + EndIf + Call(ContinueSpeech, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, LVar1) + Call(ContinueSpeech, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_0007) + Return + End }; s32 N(ItemList_RussDocuments1)[] = { @@ -287,90 +287,90 @@ s32 N(ItemList_RussDocuments2)[] = { }; EvtScript N(EVS_ItemPrompt_Dictionary) = { - EVT_IF_EQ(AF_MAC_0D, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_000A) - EVT_SET(AF_MAC_0D, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_000B) - EVT_END_IF + IfEq(AF_MAC_0D, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_000A) + Set(AF_MAC_0D, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_000B) + EndIf EVT_CHOOSE_KEY_ITEM_FROM(N(ItemList_RussDocuments1)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ITEM_DICTIONARY) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_000D) - EVT_SET(GF_MAC00_DictionaryReturned, TRUE) - EVT_WAIT(10) + Switch(LVar0) + CaseEq(ITEM_DICTIONARY) + Call(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_000D) + Set(GF_MAC00_DictionaryReturned, TRUE) + Wait(10) EVT_GIVE_STAR_PIECE() - EVT_WAIT(10) - EVT_IF_EQ(GF_MAC00_TranslatedMysteryNote, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_0010) - EVT_END_IF - EVT_CASE_EQ(ITEM_MYSTERY_NOTE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_000F) - EVT_SET(GF_MAC00_TranslatedMysteryNote, TRUE) - EVT_CASE_EQ(-1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_000C) - EVT_CASE_EQ(0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Wait(10) + IfEq(GF_MAC00_TranslatedMysteryNote, TRUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_0010) + EndIf + CaseEq(ITEM_MYSTERY_NOTE) + Call(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_000F) + Set(GF_MAC00_TranslatedMysteryNote, TRUE) + CaseEq(-1) + Call(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_000C) + CaseEq(0) + EndSwitch + Return + End }; EvtScript N(EVS_ItemPrompt_Documents) = { - EVT_SET(LVarA, 0) + Set(LVarA, 0) EVT_CHOOSE_KEY_ITEM_FROM(N(ItemList_RussDocuments2)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_IF_LT(GB_StoryProgress, STORY_CH4_SOLVED_COLOR_PUZZLE) - EVT_IF_EQ(GF_MAC00_TranslatedMysteryNote, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_0010) - EVT_SET(LVarA, 1) - EVT_RETURN - EVT_END_IF - EVT_ELSE - EVT_END_IF - EVT_CASE_EQ(-1) - EVT_CASE_DEFAULT - EVT_IF_EQ(LVar0, ITEM_MYSTERY_NOTE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_000E) - EVT_SET(GF_MAC00_TranslatedMysteryNote, TRUE) - EVT_SET(LVarA, 1) - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(0) + IfLt(GB_StoryProgress, STORY_CH4_SOLVED_COLOR_PUZZLE) + IfEq(GF_MAC00_TranslatedMysteryNote, TRUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_0010) + Set(LVarA, 1) + Return + EndIf + Else + EndIf + CaseEq(-1) + CaseDefault + IfEq(LVar0, ITEM_MYSTERY_NOTE) + Call(SpeakToPlayer, NPC_SELF, ANIM_RussT_Talk, ANIM_RussT_Idle, 0, MSG_MAC_Gate_000E) + Set(GF_MAC00_TranslatedMysteryNote, TRUE) + Set(LVarA, 1) + EndIf + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_RussT) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC00_DictionaryReturned, FALSE) - EVT_EXEC_WAIT(N(EVS_ItemPrompt_Dictionary)) - EVT_EXEC_WAIT(N(EVS_LetterPrompt_RussT)) - EVT_EXEC_WAIT(N(EVS_LetterReward_RussT)) - EVT_IF_NE(LVarC, 0) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_ItemPrompt_Documents)) - EVT_IF_NE(LVarA, 0) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_RussT_GetHint)) - EVT_EXEC_WAIT(N(EVS_LetterPrompt_RussT)) - EVT_EXEC_WAIT(N(EVS_LetterReward_RussT)) - EVT_IF_NE(LVarC, 0) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC00_DictionaryReturned, FALSE) + ExecWait(N(EVS_ItemPrompt_Dictionary)) + ExecWait(N(EVS_LetterPrompt_RussT)) + ExecWait(N(EVS_LetterReward_RussT)) + IfNe(LVarC, 0) + Return + EndIf + Return + EndIf + ExecWait(N(EVS_ItemPrompt_Documents)) + IfNe(LVarA, 0) + Return + EndIf + EndIf + ExecWait(N(EVS_RussT_GetHint)) + ExecWait(N(EVS_LetterPrompt_RussT)) + ExecWait(N(EVS_LetterReward_RussT)) + IfNe(LVarC, 0) + Return + EndIf + Return + End }; EvtScript N(EVS_NpcInit_RussT) = { - EVT_CALL(N(ResetRussHintsGiven)) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_RussT))) - EVT_RETURN - EVT_END + Call(N(ResetRussHintsGiven)) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_RussT))) + Return + End }; NpcSettings N(NpcSettings_RussT) = { diff --git a/src/world/area_mac/mac_00/npc/trading_toad.inc.c b/src/world/area_mac/mac_00/npc/trading_toad.inc.c index 5b68aa4b64b..53d428ccdaa 100644 --- a/src/world/area_mac/mac_00/npc/trading_toad.inc.c +++ b/src/world/area_mac/mac_00/npc/trading_toad.inc.c @@ -9,54 +9,54 @@ API_CALLABLE(N(GetTradeEventItemCount)) { } EvtScript N(EVS_NpcInteract_TradingToad) = { - EVT_SET(LVar0, 5) - EVT_CALL(N(CheckTradeEventTime)) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Gate_0119) - EVT_WAIT(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 1, 1, 1, 1) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_SET(GF_TradingEvent1_Active, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(GetTradeEventItemCount)) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Gate_011A) - EVT_RETURN - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Gate_011B) + Set(LVar0, 5) + Call(N(CheckTradeEventTime)) + IfEq(LVar0, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Gate_0119) + Wait(10) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 1, 1, 1, 1) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Set(GF_TradingEvent1_Active, FALSE) + Return + EndIf + Call(N(GetTradeEventItemCount)) + IfEq(LVar0, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Gate_011A) + Return + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Gate_011B) EVT_CHOOSE_ANY_CONSUMABLE(24) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(-1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Gate_011F) - EVT_RETURN - EVT_CASE_EQ(ITEM_KOOPA_LEAF) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Gate_011C) + Switch(LVar0) + CaseEq(-1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Gate_011F) + Return + CaseEq(ITEM_KOOPA_LEAF) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Gate_011C) EVT_GIVE_CONSUMABLE_REWARD(ITEM_MAPLE_SYRUP) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Gate_011D) - EVT_WAIT(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 1, 1, 1, 1) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_SET(GF_TradingEvent1_Active, FALSE) - EVT_ADD(GB_TradingEvent_Count, 1) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Gate_011E) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Gate_011D) + Wait(10) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 1, 1, 1, 1) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Set(GF_TradingEvent1_Active, FALSE) + Add(GB_TradingEvent_Count, 1) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Gate_011E) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_TradingToad) = { - EVT_IF_NE(GF_TradingEvent1_Active, FALSE) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_TradingToad))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfNe(GF_TradingEvent1_Active, FALSE) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_TradingToad))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; diff --git a/src/world/area_mac/mac_00/npc/waterfront_family.inc.c b/src/world/area_mac/mac_00/npc/waterfront_family.inc.c index 88e91b4f5d0..55a15d0b330 100644 --- a/src/world/area_mac/mac_00/npc/waterfront_family.inc.c +++ b/src/world/area_mac/mac_00/npc/waterfront_family.inc.c @@ -1,226 +1,226 @@ EvtScript N(EVS_NpcInteract_WaterfrontDad) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS) - EVT_SET(LVar0, MSG_MAC_Gate_0044) - EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) - EVT_SET(LVar0, MSG_MAC_Gate_0045) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_0046) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Gate_0047) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Gate_0048) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Gate_0049) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC00_DictionaryStolen, FALSE) - EVT_SET(LVar0, MSG_MAC_Gate_004A) - EVT_ELSE - EVT_IF_EQ(GF_MAC00_DictionaryReturned, FALSE) - EVT_SET(LVar0, MSG_MAC_Gate_004B) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Gate_004C) - EVT_END_IF - EVT_END_IF - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Gate_004D) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_004E) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Gate_004F) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Gate_0050) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Gate_0051) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_0052) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Gate_0053) - EVT_CASE_GE(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_Outro_0036) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Green_Talk, ANIM_Toad_Green_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_MET_STAR_SPIRITS) + Set(LVar0, MSG_MAC_Gate_0044) + CaseLt(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) + Set(LVar0, MSG_MAC_Gate_0045) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_0046) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Gate_0047) + Else + Set(LVar0, MSG_MAC_Gate_0048) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Gate_0049) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC00_DictionaryStolen, FALSE) + Set(LVar0, MSG_MAC_Gate_004A) + Else + IfEq(GF_MAC00_DictionaryReturned, FALSE) + Set(LVar0, MSG_MAC_Gate_004B) + Else + Set(LVar0, MSG_MAC_Gate_004C) + EndIf + EndIf + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Gate_004D) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_004E) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Gate_004F) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Gate_0050) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Gate_0051) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_0052) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Gate_0053) + CaseGe(STORY_EPILOGUE) + Set(LVar0, MSG_Outro_0036) + EndSwitch + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Green_Talk, ANIM_Toad_Green_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInteract_WaterfrontMom) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS) - EVT_SET(LVar0, MSG_MAC_Gate_0054) - EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) - EVT_SET(LVar0, MSG_MAC_Gate_0055) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_0056) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Gate_0057) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Gate_0058) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Gate_0059) - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Gate_005A) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_005B) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Gate_005C) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Gate_005D) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Gate_005E) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_005F) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Gate_0060) - EVT_CASE_GE(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_Outro_0037) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toadette_Orange_Talk, ANIM_Toadette_Orange_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_MET_STAR_SPIRITS) + Set(LVar0, MSG_MAC_Gate_0054) + CaseLt(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) + Set(LVar0, MSG_MAC_Gate_0055) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_0056) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Gate_0057) + Else + Set(LVar0, MSG_MAC_Gate_0058) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Gate_0059) + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Gate_005A) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_005B) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Gate_005C) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Gate_005D) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Gate_005E) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_005F) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Gate_0060) + CaseGe(STORY_EPILOGUE) + Set(LVar0, MSG_Outro_0037) + EndSwitch + Call(SpeakToPlayer, NPC_SELF, ANIM_Toadette_Orange_Talk, ANIM_Toadette_Orange_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInteract_WaterfrontKid1) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS) - EVT_SET(LVar0, MSG_MAC_Gate_0061) - EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) - EVT_SET(LVar0, MSG_MAC_Gate_0062) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_0063) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Gate_0064) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Gate_0065) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Gate_0066) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC00_DictionaryStolen, FALSE) - EVT_SET(LVar0, MSG_MAC_Gate_0067) - EVT_ELSE - EVT_IF_EQ(GF_MAC00_DictionaryReturned, FALSE) - EVT_SET(LVar0, MSG_MAC_Gate_0068) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Gate_0069) - EVT_END_IF - EVT_END_IF - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Gate_006A) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_006B) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Gate_006C) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Gate_006D) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Gate_006E) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_006F) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Gate_0070) - EVT_CASE_GE(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_Outro_0038) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Green_Talk, ANIM_Toad_Green_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_MET_STAR_SPIRITS) + Set(LVar0, MSG_MAC_Gate_0061) + CaseLt(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) + Set(LVar0, MSG_MAC_Gate_0062) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_0063) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Gate_0064) + Else + Set(LVar0, MSG_MAC_Gate_0065) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Gate_0066) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC00_DictionaryStolen, FALSE) + Set(LVar0, MSG_MAC_Gate_0067) + Else + IfEq(GF_MAC00_DictionaryReturned, FALSE) + Set(LVar0, MSG_MAC_Gate_0068) + Else + Set(LVar0, MSG_MAC_Gate_0069) + EndIf + EndIf + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Gate_006A) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_006B) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Gate_006C) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Gate_006D) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Gate_006E) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_006F) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Gate_0070) + CaseGe(STORY_EPILOGUE) + Set(LVar0, MSG_Outro_0038) + EndSwitch + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Green_Talk, ANIM_Toad_Green_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInteract_WaterfrontKid2) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS) - EVT_SET(LVar0, MSG_MAC_Gate_0071) - EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) - EVT_SET(LVar0, MSG_MAC_Gate_0072) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_0073) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Gate_0074) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Gate_0075) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Gate_0076) - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Gate_0077) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_0078) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Gate_0079) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Gate_007A) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Gate_007B) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Gate_007C) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Gate_007D) - EVT_CASE_GE(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_Outro_0039) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Green_Talk, ANIM_Toad_Green_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_MET_STAR_SPIRITS) + Set(LVar0, MSG_MAC_Gate_0071) + CaseLt(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) + Set(LVar0, MSG_MAC_Gate_0072) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_0073) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Gate_0074) + Else + Set(LVar0, MSG_MAC_Gate_0075) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Gate_0076) + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Gate_0077) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_0078) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Gate_0079) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Gate_007A) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Gate_007B) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Gate_007C) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Gate_007D) + CaseGe(STORY_EPILOGUE) + Set(LVar0, MSG_Outro_0039) + EndSwitch + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Green_Talk, ANIM_Toad_Green_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_WaterfrontDad) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_WaterfrontDad))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_WaterfrontDad))) + Return + End }; EvtScript N(EVS_NpcInit_WaterfrontMom) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_WaterfrontMom))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_WaterfrontMom))) + Return + End }; EvtScript N(EVS_NpcInit_WaterfrontKid1) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_WaterfrontKid1))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_WaterfrontKid1))) + Return + End }; EvtScript N(EVS_NpcInit_WaterfrontKid2) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_WaterfrontKid2))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_WaterfrontKid2))) + Return + End }; EvtScript N(EVS_WaterfrontHouse_DoorLocked) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) - EVT_RETURN - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_RETURN - EVT_END_IF - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC00_DictionaryStolen, FALSE) - EVT_SET(LVar0, MSG_MAC_Gate_004A) - EVT_SET(LVar1, MSG_MAC_Gate_0067) - EVT_ELSE - EVT_IF_EQ(GF_MAC00_DictionaryReturned, FALSE) - EVT_SET(LVar0, MSG_MAC_Gate_004B) - EVT_SET(LVar1, MSG_MAC_Gate_0068) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Gate_004C) - EVT_SET(LVar1, MSG_MAC_Gate_0069) - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, LVar0, 160, 40) - EVT_WAIT(5) - EVT_CALL(ShowMessageAtScreenPos, LVar1, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) + Return + EndIf + IfGe(GB_StoryProgress, STORY_CH4_STAR_SPRIT_DEPARTED) + Return + EndIf + Switch(GB_StoryProgress) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC00_DictionaryStolen, FALSE) + Set(LVar0, MSG_MAC_Gate_004A) + Set(LVar1, MSG_MAC_Gate_0067) + Else + IfEq(GF_MAC00_DictionaryReturned, FALSE) + Set(LVar0, MSG_MAC_Gate_004B) + Set(LVar1, MSG_MAC_Gate_0068) + Else + Set(LVar0, MSG_MAC_Gate_004C) + Set(LVar1, MSG_MAC_Gate_0069) + EndIf + EndIf + EndSwitch + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, LVar0, 160, 40) + Wait(5) + Call(ShowMessageAtScreenPos, LVar1, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_mac/mac_01/mac_01_11_epilogue_npc.c b/src/world/area_mac/mac_01/mac_01_11_epilogue_npc.c index 9da42e313d9..b1adca8baff 100644 --- a/src/world/area_mac/mac_01/mac_01_11_epilogue_npc.c +++ b/src/world/area_mac/mac_01/mac_01_11_epilogue_npc.c @@ -11,153 +11,153 @@ #include "world/common/npc/Dryite_Stationary.inc.c" EvtScript N(EVS_NpcInteract_Kolorado) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_Outro_003C) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_Outro_003C) + Return + End }; EvtScript N(EVS_NpcInit_Kolorado) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Kolorado))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Kolorado))) + Return + End }; EvtScript N(EVS_NpcInteract_KoloradoWife) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_KoloradoWife_Talk, ANIM_KoloradoWife_Idle, 0, MSG_Outro_003D) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_KoloradoWife_Talk, ANIM_KoloradoWife_Idle, 0, MSG_Outro_003D) + Return + End }; EvtScript N(EVS_NpcInit_KoloradoWife) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_KoloradoWife))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_KoloradoWife))) + Return + End }; EvtScript N(EVS_NpcInteract_KoopaKoot) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_Outro_003E) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_Outro_003E) + Return + End }; EvtScript N(EVS_NpcInit_KoopaKoot) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_KoopaKoot))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_KoopaKoot))) + Return + End }; EvtScript N(EVS_NpcInteract_Bobomb) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, MSG_Outro_004E) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, MSG_Outro_004E) + Return + End }; EvtScript N(EVS_NpcInit_Bobomb) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bobomb))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bobomb))) + Return + End }; EvtScript N(EVS_NpcInteract_Koopa) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_Outro_004F) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_Outro_004F) + Return + End }; EvtScript N(EVS_NpcInit_Koopa) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Koopa))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Koopa))) + Return + End }; EvtScript N(EVS_NpcInteract_Rowf) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_Outro_0040) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_Outro_0040) + Return + End }; EvtScript N(EVS_NpcInit_Rowf) = { - EVT_CALL(SetNpcPos, NPC_SELF, -225, 0, 320) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Rowf))) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, -225, 0, 320) + Call(SetNpcYaw, NPC_SELF, 270) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Rowf))) + Return + End }; EvtScript N(EVS_NpcInteract_Rhuff) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_Outro_0041) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_Outro_0041) + Return + End }; EvtScript N(EVS_NpcInit_Rhuff) = { - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(0.75), EVT_FLOAT(0.75), EVT_FLOAT(0.75)) - EVT_CALL(SetNpcPos, NPC_SELF, -250, 0, 295) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Rhuff))) - EVT_RETURN - EVT_END + Call(SetNpcScale, NPC_SELF, Float(0.75), Float(0.75), Float(0.75)) + Call(SetNpcPos, NPC_SELF, -250, 0, 295) + Call(SetNpcYaw, NPC_SELF, 270) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Rhuff))) + Return + End }; EvtScript N(EVS_NpcInteract_Dryite_01) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_Outro_0050) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_Outro_0050) + Return + End }; EvtScript N(EVS_NpcInit_Dryite_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Dryite_01))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Dryite_01))) + Return + End }; EvtScript N(EVS_NpcInteract_Dryite_02) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_Outro_0051) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Dryite_Green_Talk, ANIM_Dryite_Green_Idle, 0, MSG_Outro_0051) + Return + End }; EvtScript N(EVS_NpcInit_Dryite_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Dryite_02))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Dryite_02))) + Return + End }; EvtScript N(EVS_NpcInteract_Chanterelle) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Chanterelle_Talk, ANIM_Chanterelle_Idle, 16, MSG_Outro_0052) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Chanterelle_Talk, ANIM_Chanterelle_Idle, 16, MSG_Outro_0052) + Return + End }; EvtScript N(EVS_NpcInit_Chanterelle) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Chanterelle_Sing) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Chanterelle))) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_Chanterelle_Sing) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Chanterelle))) + Return + End }; EvtScript N(EVS_NpcInteract_Poet) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 16, MSG_Outro_0053) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 16, MSG_Outro_0053) + Return + End }; EvtScript N(EVS_NpcInit_Poet) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Poet))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Poet))) + Return + End }; EvtScript N(EVS_NpcInteract_Composer) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 16, MSG_Outro_0054) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Musician_Composer_Talk, ANIM_Musician_Composer_Idle, 16, MSG_Outro_0054) + Return + End }; EvtScript N(EVS_NpcInit_Composer) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Composer))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Composer))) + Return + End }; AnimID N(ExtraAnims_Kolorado)[] = { diff --git a/src/world/area_mac/mac_01/mac_01_12_intro.c b/src/world/area_mac/mac_01/mac_01_12_intro.c index 644158cd556..cfa445a2531 100644 --- a/src/world/area_mac/mac_01/mac_01_12_intro.c +++ b/src/world/area_mac/mac_01/mac_01_12_intro.c @@ -14,50 +14,50 @@ API_CALLABLE(N(HideRowfBadges_IntroScene)) { } EvtScript N(EVS_Scene_IntroWalking) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(EnableModel, MODEL_ju_1, FALSE) - EVT_CALL(N(HideRowfBadges_IntroScene)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -560, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -560, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcPos, NPC_Luigi, -460, 0, 0) - EVT_CALL(SetNpcYaw, NPC_Luigi, 90) - EVT_THREAD - EVT_CALL(func_802D1270, -100, 0, EVT_FLOAT(4.0 / DT)) - EVT_CALL(func_802D1270, -25, -25, EVT_FLOAT(4.0 / DT)) - EVT_CALL(func_802D1270, 0, -100, EVT_FLOAT(4.0 / DT)) - EVT_CALL(func_802D1270, 0, -400, EVT_FLOAT(4.0 / DT)) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcSpeed, NPC_Luigi, EVT_FLOAT(4.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_Luigi, ANIM_Luigi_Run) - EVT_CALL(NpcMoveTo, NPC_Luigi, -100, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_Luigi, ANIM_Luigi_RunBack) - EVT_CALL(NpcMoveTo, NPC_Luigi, -25, -25, 0) - EVT_CALL(NpcMoveTo, NPC_Luigi, 0, -100, 0) - EVT_CALL(NpcMoveTo, NPC_Luigi, 0, -340, 0) - EVT_CALL(SetNpcAnimation, NPC_Luigi, ANIM_Luigi_IdleBack) - EVT_END_THREAD - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(MakeLerp, 300, 400, 100 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar2, LVar3, LVar4) - EVT_CALL(SetCamDistance, CAM_DEFAULT, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_WAIT(75 * DT) - EVT_CALL(GotoMap, EVT_PTR("osr_00"), osr_00_ENTRY_4) - EVT_WAIT(100 * DT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(EnableModel, MODEL_ju_1, FALSE) + Call(N(HideRowfBadges_IntroScene)) + Call(UseSettingsFrom, CAM_DEFAULT, -560, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, -560, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(250.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetNpcPos, NPC_Luigi, -460, 0, 0) + Call(SetNpcYaw, NPC_Luigi, 90) + Thread + Call(func_802D1270, -100, 0, Float(4.0 / DT)) + Call(func_802D1270, -25, -25, Float(4.0 / DT)) + Call(func_802D1270, 0, -100, Float(4.0 / DT)) + Call(func_802D1270, 0, -400, Float(4.0 / DT)) + EndThread + Thread + Call(SetNpcSpeed, NPC_Luigi, Float(4.0 / DT)) + Call(SetNpcAnimation, NPC_Luigi, ANIM_Luigi_Run) + Call(NpcMoveTo, NPC_Luigi, -100, 0, 0) + Call(SetNpcAnimation, NPC_Luigi, ANIM_Luigi_RunBack) + Call(NpcMoveTo, NPC_Luigi, -25, -25, 0) + Call(NpcMoveTo, NPC_Luigi, 0, -100, 0) + Call(NpcMoveTo, NPC_Luigi, 0, -340, 0) + Call(SetNpcAnimation, NPC_Luigi, ANIM_Luigi_IdleBack) + EndThread + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(MakeLerp, 300, 400, 100 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Call(SetPanTarget, CAM_DEFAULT, LVar2, LVar3, LVar4) + Call(SetCamDistance, CAM_DEFAULT, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Wait(75 * DT) + Call(GotoMap, Ref("osr_00"), osr_00_ENTRY_4) + Wait(100 * DT) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_mac/mac_01/mac_01_13_foliage.c b/src/world/area_mac/mac_01/mac_01_13_foliage.c index 435b2efeab3..cdc28af48ad 100644 --- a/src/world/area_mac/mac_01/mac_01_13_foliage.c +++ b/src/world/area_mac/mac_01/mac_01_13_foliage.c @@ -61,12 +61,12 @@ BombTrigger N(BombPos_Tree2) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o393, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o237, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o393, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o237, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Return + End }; diff --git a/src/world/area_mac/mac_01/mac_01_1_music.c b/src/world/area_mac/mac_01/mac_01_1_music.c index 7b39a067029..0c6048004de 100644 --- a/src/world/area_mac/mac_01/mac_01_1_music.c +++ b/src/world/area_mac/mac_01/mac_01_1_music.c @@ -1,48 +1,48 @@ #include "mac_01.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_INTRO) - EVT_CALL(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 8) - EVT_CASE_EQ(STORY_EPILOGUE) - EVT_CALL(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 0, 8) - EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_INVASION, 0, 8) - EVT_CASE_DEFAULT - EVT_EXEC(N(EVS_SetupMusicMix)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseEq(STORY_INTRO) + Call(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 8) + CaseEq(STORY_EPILOGUE) + Call(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 0, 8) + CaseRange(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) + Call(SetMusicTrack, 0, SONG_SHY_GUY_INVASION, 0, 8) + CaseDefault + Exec(N(EVS_SetupMusicMix)) + EndSwitch + Return + End }; EvtScript N(EVS_PlaySpellcastSong) = { - EVT_CALL(SetMusicTrack, 0, SONG_MERLEE_SPELL, 1, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_MERLEE_SPELL, 1, 8) + Return + End }; EvtScript N(EVS_ResetMusicAfterFortune) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_INVASION, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN, 0, 8) - EVT_WAIT(20) - EVT_CALL(EnableMusicProximityMix, 0) - EVT_CALL(AdjustMusicProximityMix, 0, 2, 2) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseRange(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) + Call(SetMusicTrack, 0, SONG_SHY_GUY_INVASION, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_TOAD_TOWN, 0, 8) + Wait(20) + Call(EnableMusicProximityMix, 0) + Call(AdjustMusicProximityMix, 0, 2, 2) + EndSwitch + Return + End }; EvtScript N(EVS_PlayFlowerGateSong) = { - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_GATE_APPEARS, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_FLOWER_GATE_APPEARS, 0, 8) + Return + End }; EvtScript N(EVS_PlayRestingSong) = { - EVT_CALL(SetMusicTrack, 0, SONG_TAKING_REST, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TAKING_REST, 0, 8) + Return + End }; diff --git a/src/world/area_mac/mac_01/mac_01_2_main.c b/src/world/area_mac/mac_01/mac_01_2_main.c index da9d949c01e..3d44c9fe740 100644 --- a/src/world/area_mac/mac_01/mac_01_2_main.c +++ b/src/world/area_mac/mac_01/mac_01_2_main.c @@ -3,20 +3,20 @@ EvtScript N(EVS_ExitWalk_mac_00_1) = EVT_EXIT_WALK(60, mac_01_ENTRY_0, "mac_00", mac_00_ENTRY_1); EvtScript N(EVS_ExitWalk_nok_11_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(UseExitHeading, 60, mac_01_ENTRY_1) - EVT_EXEC(ExitWalk) - EVT_IF_EQ(GF_StartedChapter1, FALSE) - EVT_SET(GF_StartedChapter1, TRUE) - EVT_CALL(FadeOutMusic, 0, 1500) - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_22"), kmr_22_ENTRY_1, TRANSITION_BEGIN_OR_END_CHAPTER) - EVT_WAIT(100) - EVT_RETURN - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("nok_11"), nok_11_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(UseExitHeading, 60, mac_01_ENTRY_1) + Exec(ExitWalk) + IfEq(GF_StartedChapter1, FALSE) + Set(GF_StartedChapter1, TRUE) + Call(FadeOutMusic, 0, 1500) + Call(GotoMapSpecial, Ref("kmr_22"), kmr_22_ENTRY_1, TRANSITION_BEGIN_OR_END_CHAPTER) + Wait(100) + Return + EndIf + Call(GotoMap, Ref("nok_11"), nok_11_ENTRY_0) + Wait(100) + Return + End }; s32 N(Models_CastleGateL)[] = { @@ -32,162 +32,162 @@ s32 N(Models_CastleGateR)[] = { }; EvtScript N(EVS_ExitDoors_osr_01_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE) - EVT_SET(LVar0, 2) - EVT_SET(LVar1, 5) - EVT_SET(LVar2, EVT_PTR(N(Models_CastleGateL))) - EVT_SET(LVar3, EVT_PTR(N(Models_CastleGateR))) - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH0_WAKE_UP, STORY_CH8_REACHED_PEACHS_CASTLE) - EVT_CALL(GotoMap, EVT_PTR("osr_01"), osr_01_ENTRY_0) - EVT_CASE_DEFAULT - EVT_CALL(GotoMap, EVT_PTR("osr_00"), osr_00_ENTRY_0) - EVT_END_SWITCH - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_LARGE) + Set(LVar0, 2) + Set(LVar1, 5) + Set(LVar2, Ref(N(Models_CastleGateL))) + Set(LVar3, Ref(N(Models_CastleGateR))) + Exec(BaseExitDoor) + Wait(17) + Switch(GB_StoryProgress) + CaseRange(STORY_CH0_WAKE_UP, STORY_CH8_REACHED_PEACHS_CASTLE) + Call(GotoMap, Ref("osr_01"), osr_01_ENTRY_0) + CaseDefault + Call(GotoMap, Ref("osr_00"), osr_00_ENTRY_0) + EndSwitch + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_mac_02_2) = EVT_EXIT_WALK(60, mac_01_ENTRY_3, "mac_02", mac_02_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_mac_00_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_osr_01_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitn, 1, 0) - EVT_IF_GE(GB_StoryProgress, STORY_EPILOGUE) - EVT_RETURN - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_nok_11_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_mac_02_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitFlowerGate)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitf, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_mac_00_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_osr_01_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitn, 1, 0) + IfGe(GB_StoryProgress, STORY_EPILOGUE) + Return + EndIf + BindTrigger(Ref(N(EVS_ExitWalk_nok_11_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_mac_02_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + BindTrigger(Ref(N(EVS_ExitFlowerGate)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitf, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(mac_01_ENTRY_2) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitn, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(RotateGroup, MODEL_east_gate, 80, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_west_gate, 80, 0, -1, 0) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC_WAIT(EnterWalk) - EVT_CALL(MakeLerp, 80, 0, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_east_gate, LVar0, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_west_gate, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitn, SOUND_LARGE_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilitn, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CASE_EQ(mac_01_ENTRY_4) - EVT_EXEC(N(EVS_Scene_IntroWalking)) - EVT_CASE_EQ(mac_01_ENTRY_5) - EVT_EXEC_WAIT(N(EVS_EnterFlowerGate)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_DEFAULT - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(mac_01_ENTRY_2) + Call(DisablePlayerInput, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitn, COLLIDER_FLAGS_UPPER_MASK) + Call(RotateGroup, MODEL_east_gate, 80, 0, 1, 0) + Call(RotateGroup, MODEL_west_gate, 80, 0, -1, 0) + Call(UseDoorSounds, DOOR_SOUNDS_LARGE) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + ExecWait(EnterWalk) + Call(MakeLerp, 80, 0, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_east_gate, LVar0, 0, 1, 0) + Call(RotateGroup, MODEL_west_gate, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_deilitn, SOUND_LARGE_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilitn, COLLIDER_FLAGS_UPPER_MASK) + Call(DisablePlayerInput, FALSE) + CaseEq(mac_01_ENTRY_4) + Exec(N(EVS_Scene_IntroWalking)) + CaseEq(mac_01_ENTRY_5) + ExecWait(N(EVS_EnterFlowerGate)) + Exec(N(EVS_BindExitTriggers)) + CaseDefault + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 90, 4096) // note: unusually large near clip dist: 90 vs 16 - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Set(GB_WorldLocation, LOCATION_TOAD_TOWN) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 90, 4096) // note: unusually large near clip dist: 90 vs 16 + Call(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) #if VERSION_PAL - EVT_CALL(GetLanguage, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_k11, LVar0) + Call(GetLanguage, LVar0) + Call(SetModelTexVariant, MODEL_k11, LVar0) #endif - EVT_SET(AF_MAC_0E, FALSE) - EVT_SET(AF_MAC_0F, FALSE) - EVT_SET(AF_MAC_10, FALSE) - EVT_SET(AF_MAC_11, FALSE) - EVT_SET(AF_MAC_12, FALSE) - EVT_SET(AF_MAC_13, FALSE) - EVT_SET(AF_MAC_14, FALSE) - EVT_SET(AF_MAC_15, FALSE) - EVT_IF_LT(GB_StoryProgress, STORY_EPILOGUE) - EVT_EXEC(N(EVS_SetupBadgeShop)) - EVT_ELSE - EVT_CALL(EnableGroup, MODEL_jutan1, FALSE) - EVT_END_IF - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_INTRO) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(IntroNPCs))) - EVT_CASE_GE(STORY_EPILOGUE) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(EpilogueNPCs))) - EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(Chapter0NPCs))) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(Chapter1NPCs))) - EVT_CASE_EQ(STORY_CH1_DEFEATED_JR_TROOPA) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(TwinkMeetingNPCs))) - EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(Chapter4NPCs))) - EVT_CASE_EQ(STORY_CH6_RETURNED_TO_TOAD_TOWN) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NinjiMeetingNPCs))) - EVT_CASE_DEFAULT - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_END_SWITCH - EVT_IF_GE(GB_StoryProgress, STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_EXEC(N(EVS_SetupFlowerModels)) - EVT_EXEC(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupRooms)) - EVT_EXEC(N(EVS_SetupBulletinBoard)) - EVT_EXEC(N(EVS_SetupCrystalBallGfx)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE) - EVT_CALL(UseRoomDoorSounds, DOOR_SOUNDS_BASIC) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_CALL(EnableTexPanning, MODEL_hikari, TRUE) - EVT_THREAD - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LABEL(0) - EVT_ADD(LVar0, -100) - EVT_ADD(LVar1, -200) - EVT_IF_LT(LVar0, 0) - EVT_ADD(LVar0, 0x10000) - EVT_END_IF - EVT_IF_LT(LVar1, 0) - EVT_ADD(LVar0, 0x10000) - EVT_END_IF - EVT_CALL(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_AUX, LVar1, LVar1) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_THREAD - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Merlon_GiveHint)), TRIGGER_WALL_PRESS_A, COLLIDER_o335, 1, 0) - EVT_EXEC(N(EVS_SetupQuickChangeTrigger)) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_RETURN - EVT_END + Set(AF_MAC_0E, FALSE) + Set(AF_MAC_0F, FALSE) + Set(AF_MAC_10, FALSE) + Set(AF_MAC_11, FALSE) + Set(AF_MAC_12, FALSE) + Set(AF_MAC_13, FALSE) + Set(AF_MAC_14, FALSE) + Set(AF_MAC_15, FALSE) + IfLt(GB_StoryProgress, STORY_EPILOGUE) + Exec(N(EVS_SetupBadgeShop)) + Else + Call(EnableGroup, MODEL_jutan1, FALSE) + EndIf + Switch(GB_StoryProgress) + CaseEq(STORY_INTRO) + Call(MakeNpcs, FALSE, Ref(N(IntroNPCs))) + CaseGe(STORY_EPILOGUE) + Call(MakeNpcs, FALSE, Ref(N(EpilogueNPCs))) + CaseLt(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) + Call(MakeNpcs, FALSE, Ref(N(Chapter0NPCs))) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Call(MakeNpcs, FALSE, Ref(N(Chapter1NPCs))) + CaseEq(STORY_CH1_DEFEATED_JR_TROOPA) + Call(MakeNpcs, FALSE, Ref(N(TwinkMeetingNPCs))) + CaseRange(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) + Call(MakeNpcs, FALSE, Ref(N(Chapter4NPCs))) + CaseEq(STORY_CH6_RETURNED_TO_TOAD_TOWN) + Call(MakeNpcs, FALSE, Ref(N(NinjiMeetingNPCs))) + CaseDefault + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + EndSwitch + IfGe(GB_StoryProgress, STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Exec(N(EVS_SetupFlowerModels)) + Exec(N(EVS_MakeEntities)) + Exec(N(EVS_SetupRooms)) + Exec(N(EVS_SetupBulletinBoard)) + Exec(N(EVS_SetupCrystalBallGfx)) + Exec(N(EVS_SetupMusic)) + Call(UseDoorSounds, DOOR_SOUNDS_LARGE) + Call(UseRoomDoorSounds, DOOR_SOUNDS_BASIC) + Exec(N(EVS_EnterMap)) + Wait(1) + Call(EnableTexPanning, MODEL_hikari, TRUE) + Thread + SetGroup(EVT_GROUP_00) + Set(LVar0, 0) + Set(LVar1, 0) + Label(0) + Add(LVar0, -100) + Add(LVar1, -200) + IfLt(LVar0, 0) + Add(LVar0, 0x10000) + EndIf + IfLt(LVar1, 0) + Add(LVar0, 0x10000) + EndIf + Call(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, LVar0, 0) + Call(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_AUX, LVar1, LVar1) + Wait(1) + Goto(0) + EndThread + BindTrigger(Ref(N(EVS_Merlon_GiveHint)), TRIGGER_WALL_PRESS_A, COLLIDER_o335, 1, 0) + Exec(N(EVS_SetupQuickChangeTrigger)) + Exec(N(EVS_SetupFoliage)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Return + End }; diff --git a/src/world/area_mac/mac_01/mac_01_3_entity.c b/src/world/area_mac/mac_01/mac_01_3_entity.c index 7e2cacfcd0f..76e5d18ee60 100644 --- a/src/world/area_mac/mac_01/mac_01_3_entity.c +++ b/src/world/area_mac/mac_01/mac_01_3_entity.c @@ -2,18 +2,18 @@ #include "entity.h" EvtScript N(EVS_Inspect_StreetSign) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0170, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_0170, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_LT(GB_StoryProgress, STORY_EPILOGUE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 280, 80, -130, 0, MAKE_ENTITY_END) - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Inspect_StreetSign)), TRIGGER_WALL_PRESS_A, COLLIDER_o406, 1, 0) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_EPILOGUE) + Call(MakeEntity, Ref(Entity_SavePoint), 280, 80, -130, 0, MAKE_ENTITY_END) + EndIf + BindTrigger(Ref(N(EVS_Inspect_StreetSign)), TRIGGER_WALL_PRESS_A, COLLIDER_o406, 1, 0) + Return + End }; diff --git a/src/world/area_mac/mac_01/mac_01_4_rooms.c b/src/world/area_mac/mac_01/mac_01_4_rooms.c index 853792f6fdf..a04387b6b74 100644 --- a/src/world/area_mac/mac_01/mac_01_4_rooms.c +++ b/src/world/area_mac/mac_01/mac_01_4_rooms.c @@ -1,14 +1,14 @@ #include "mac_01.h" EvtScript N(EVS_SetDoorRot_PostOffice) = { - EVT_SETF(LVar1, LVar0) - EVT_DIVF(LVar1, EVT_FLOAT(45.0)) - EVT_CALL(TranslateModel, MODEL_o189, LVar1, 0, 0) - EVT_SETF(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(0.95)) - EVT_CALL(RotateModel, MODEL_o189, LVar1, 0, -1, 0) - EVT_RETURN - EVT_END + SetF(LVar1, LVar0) + DivF(LVar1, Float(45.0)) + Call(TranslateModel, MODEL_o189, LVar1, 0, 0) + SetF(LVar1, LVar0) + MulF(LVar1, Float(0.95)) + Call(RotateModel, MODEL_o189, LVar1, 0, -1, 0) + Return + End }; s16 N(Models_PostOfficeWalls_Unused)[] = { @@ -30,54 +30,54 @@ s16 N(Models_PostOfficeWalls_Unused)[] = { }; EvtScript N(EVS_SetWallRot_PostOffice) = { - EVT_SET(LVar1, LVar0) - EVT_CALL(RotateModel, MODEL_k11, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_k12, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_k13, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_k14, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_k15, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_k16, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_k17, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_k18, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_k21, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_k22, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_k23, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_k24, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_y1, LVar1, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_y2, LVar1, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_y3, LVar1, -1, 0, 0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(90) - EVT_CALL(EnableGroup, MODEL_po_mtx, FALSE) - EVT_CASE_DEFAULT - EVT_CALL(EnableGroup, MODEL_po_mtx, TRUE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + Call(RotateModel, MODEL_k11, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_k12, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_k13, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_k14, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_k15, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_k16, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_k17, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_k18, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_k21, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_k22, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_k23, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_k24, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_y1, LVar1, -1, 0, 0) + Call(RotateModel, MODEL_y2, LVar1, -1, 0, 0) + Call(RotateModel, MODEL_y3, LVar1, -1, 0, 0) + Switch(LVar0) + CaseEq(90) + Call(EnableGroup, MODEL_po_mtx, FALSE) + CaseDefault + Call(EnableGroup, MODEL_po_mtx, TRUE) + EndSwitch + Return + End }; EvtScript N(EVS_DropDoor_PostOffice) = { - EVT_CALL(RotateModel, MODEL_o189, LVar0, 1, 0, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o189, LVar0, 1, 0, 0) + Return + End }; EvtScript N(EVS_RoomListener_PostOffice) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_CALL(SetGroupVisibility, MODEL_yubin_in, MODEL_GROUP_VISIBLE) - EVT_EXEC_WAIT(N(EVS_Scene_MailbagTheft)) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_CALL(SetGroupVisibility, MODEL_yubin_in, MODEL_GROUP_HIDDEN) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Call(SetGroupVisibility, MODEL_yubin_in, MODEL_GROUP_VISIBLE) + ExecWait(N(EVS_Scene_MailbagTheft)) + CaseEq(ROOM_UPDATE_EXIT_END) + Call(SetGroupVisibility, MODEL_yubin_in, MODEL_GROUP_HIDDEN) + EndSwitch + Return + End }; EvtScript N(EVS_SetDoorRot_ToadHouse) = { - EVT_CALL(RotateModel, MODEL_door_k, LVar0, 0, -1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_door_k, LVar0, 0, -1, 0) + Return + End }; s16 N(Models_ToadHouseWalls_Unused)[] = { @@ -91,104 +91,104 @@ s16 N(Models_ToadHouseWalls_Unused)[] = { }; EvtScript N(EVS_SetWallRot_ToadHouse) = { - EVT_SET(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(1.0)) - EVT_CALL(RotateModel, MODEL_kk11, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_kk12, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_kk13, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_kk14, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_kk21, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_kk22, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_kk23, LVar1, 1, 0, 0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(90) - EVT_CALL(EnableGroup, MODEL_kino_out, FALSE) - EVT_CASE_DEFAULT - EVT_CALL(EnableGroup, MODEL_kino_out, TRUE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + MulF(LVar1, Float(1.0)) + Call(RotateModel, MODEL_kk11, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_kk12, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_kk13, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_kk14, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_kk21, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_kk22, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_kk23, LVar1, 1, 0, 0) + Switch(LVar0) + CaseEq(90) + Call(EnableGroup, MODEL_kino_out, FALSE) + CaseDefault + Call(EnableGroup, MODEL_kino_out, TRUE) + EndSwitch + Return + End }; EvtScript N(EVS_RoomListener_ToadHouse) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_CALL(SetGroupVisibility, MODEL_kino_in, MODEL_GROUP_VISIBLE) - EVT_SET(MF_InsideToadHouse, TRUE) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_CALL(SetGroupVisibility, MODEL_kino_in, MODEL_GROUP_HIDDEN) - EVT_SET(MF_InsideToadHouse, FALSE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Call(SetGroupVisibility, MODEL_kino_in, MODEL_GROUP_VISIBLE) + Set(MF_InsideToadHouse, TRUE) + CaseEq(ROOM_UPDATE_EXIT_END) + Call(SetGroupVisibility, MODEL_kino_in, MODEL_GROUP_HIDDEN) + Set(MF_InsideToadHouse, FALSE) + EndSwitch + Return + End }; EvtScript N(EVS_SetDoorRot_MerlonHouse) = { - EVT_CALL(RotateModel, MODEL_door, LVar0, 0, -1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_door, LVar0, 0, -1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_MerlonHouse) = { - EVT_SET(LVar1, LVar0) - EVT_MUL(LVar1, 2) - EVT_CALL(RotateGroup, MODEL_off_kabe, LVar1, 0, 1, 0) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + Mul(LVar1, 2) + Call(RotateGroup, MODEL_off_kabe, LVar1, 0, 1, 0) + Return + End }; EvtScript N(EVS_RoomListener_MerlonHouse) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH1_SPOKE_WITH_MERLIN) - EVT_EXEC_WAIT(N(EVS_MerlonShooAway)) - EVT_SET(LVar0, -1) - EVT_RETURN - EVT_CASE_RANGE(STORY_CH6_RETURNED_TO_TOAD_TOWN, STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_EXEC(N(EVS_Scene_MerlonAndNinji)) - EVT_CASE_RANGE(STORY_CH3_GOT_SUPER_BOOTS, STORY_CH8_REACHED_PEACHS_CASTLE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH6_RETURNED_TO_TOAD_TOWN) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_IF_EQ(GF_MAC01_Merlon_HeardAboutDream, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Luigi, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_003C) - EVT_SET(LVar0, -1) - EVT_RETURN - EVT_END_IF - EVT_CASE_GE(STORY_EPILOGUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Outro_003F, 160, 40) - EVT_SET(LVar0, -1) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(SetGroupVisibility, MODEL_dr_in, MODEL_GROUP_VISIBLE) - EVT_SET(MF_MusicMixTrigger1, TRUE) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_DONE) + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Switch(GB_StoryProgress) + CaseLt(STORY_CH1_SPOKE_WITH_MERLIN) + ExecWait(N(EVS_MerlonShooAway)) + Set(LVar0, -1) + Return + CaseRange(STORY_CH6_RETURNED_TO_TOAD_TOWN, STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Exec(N(EVS_Scene_MerlonAndNinji)) + CaseRange(STORY_CH3_GOT_SUPER_BOOTS, STORY_CH8_REACHED_PEACHS_CASTLE) + IfEq(GB_StoryProgress, STORY_CH6_RETURNED_TO_TOAD_TOWN) + BreakSwitch + EndIf + IfEq(GF_MAC01_Merlon_HeardAboutDream, FALSE) + Call(SpeakToPlayer, NPC_Luigi, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_003C) + Set(LVar0, -1) + Return + EndIf + CaseGe(STORY_EPILOGUE) + Call(ShowMessageAtScreenPos, MSG_Outro_003F, 160, 40) + Set(LVar0, -1) + Return + EndSwitch + Call(SetGroupVisibility, MODEL_dr_in, MODEL_GROUP_VISIBLE) + Set(MF_MusicMixTrigger1, TRUE) + CaseEq(ROOM_UPDATE_ENTER_DONE) // do nothing - EVT_CASE_EQ(ROOM_UPDATE_EXIT_BEGIN) + CaseEq(ROOM_UPDATE_EXIT_BEGIN) // do nothing - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_CALL(SetGroupVisibility, MODEL_dr_in, MODEL_GROUP_HIDDEN) - EVT_SET(MF_MusicMixTrigger1, FALSE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + CaseEq(ROOM_UPDATE_EXIT_END) + Call(SetGroupVisibility, MODEL_dr_in, MODEL_GROUP_HIDDEN) + Set(MF_MusicMixTrigger1, FALSE) + EndSwitch + Return + End }; EvtScript N(EVS_SpinRoof) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SET(LVar0, 0) - EVT_LABEL(0) - EVT_ADDF(LVar0, EVT_FLOAT(3.0)) - EVT_IF_GT(LVar0, 360) - EVT_SUBF(LVar0, EVT_FLOAT(360.0)) - EVT_END_IF - EVT_CALL(RotateGroup, MODEL_yane, LVar0, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_off_yane, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Set(LVar0, 0) + Label(0) + AddF(LVar0, Float(3.0)) + IfGt(LVar0, 360) + SubF(LVar0, Float(360.0)) + EndIf + Call(RotateGroup, MODEL_yane, LVar0, 0, 1, 0) + Call(RotateGroup, MODEL_off_yane, LVar0, 0, 1, 0) + Wait(1) + Goto(0) + Return + End }; s32 N(InsideNPCs_PostOffice)[] = { @@ -212,44 +212,44 @@ s32 N(InsideNPCs_MerlonHouse)[] = { EvtScript N(EVS_SetupRooms) = { // post office - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_LEFT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_PostOffice)), - EVT_PTR(N(EVS_SetWallRot_PostOffice)), - EVT_PTR(N(EVS_DropDoor_PostOffice)), - EVT_PTR(N(EVS_RoomListener_PostOffice)), + Ref(N(EVS_SetDoorRot_PostOffice)), + Ref(N(EVS_SetWallRot_PostOffice)), + Ref(N(EVS_DropDoor_PostOffice)), + Ref(N(EVS_RoomListener_PostOffice)), COLLIDER_deilit1, COLLIDER_deilit1u, MODEL_post_office, - EVT_PTR(N(InsideNPCs_PostOffice))) + Ref(N(InsideNPCs_PostOffice))) // toad house - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_LEFT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_ToadHouse)), - EVT_PTR(N(EVS_SetWallRot_ToadHouse)), + Ref(N(EVS_SetDoorRot_ToadHouse)), + Ref(N(EVS_SetWallRot_ToadHouse)), NULL, - EVT_PTR(N(EVS_RoomListener_ToadHouse)), + Ref(N(EVS_RoomListener_ToadHouse)), COLLIDER_deilit2, COLLIDER_deilit2u, MODEL_kinopi, - EVT_PTR(N(InsideNPCs_ToadHouse))) + Ref(N(InsideNPCs_ToadHouse))) // merlon's house - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_LEFT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_MerlonHouse)), - EVT_PTR(N(EVS_SetWallRot_MerlonHouse)), + Ref(N(EVS_SetDoorRot_MerlonHouse)), + Ref(N(EVS_SetWallRot_MerlonHouse)), NULL, - EVT_PTR(N(EVS_RoomListener_MerlonHouse)), + Ref(N(EVS_RoomListener_MerlonHouse)), COLLIDER_deilitd, COLLIDER_deilitud, MODEL_de_aru, - EVT_PTR(N(InsideNPCs_MerlonHouse))) + Ref(N(InsideNPCs_MerlonHouse))) // initial visibility - EVT_EXEC(N(EVS_SpinRoof)) - EVT_SET(LVar0, ROOM_UPDATE_EXIT_END) - EVT_EXEC(N(EVS_RoomListener_PostOffice)) - EVT_EXEC(N(EVS_RoomListener_ToadHouse)) - EVT_EXEC(N(EVS_RoomListener_MerlonHouse)) - EVT_RETURN - EVT_END + Exec(N(EVS_SpinRoof)) + Set(LVar0, ROOM_UPDATE_EXIT_END) + Exec(N(EVS_RoomListener_PostOffice)) + Exec(N(EVS_RoomListener_ToadHouse)) + Exec(N(EVS_RoomListener_MerlonHouse)) + Return + End }; diff --git a/src/world/area_mac/mac_01/mac_01_5_shop.c b/src/world/area_mac/mac_01/mac_01_5_shop.c index f3d9254c9b7..0135f508687 100644 --- a/src/world/area_mac/mac_01/mac_01_5_shop.c +++ b/src/world/area_mac/mac_01/mac_01_5_shop.c @@ -123,26 +123,26 @@ ShopSellPriceData N(RowfDummyPriceList)[] = { }; EvtScript N(EVS_OnBuy) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(SHOP_BUY_RESULT_CANCEL) - EVT_CASE_EQ(SHOP_BUY_RESULT_4) - EVT_CASE_EQ(SHOP_BUY_RESULT_OK) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(0) // left badge shop slot - EVT_SET(GF_MAC01_RowfBadgeAvailableA, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b3, COLLIDER_FLAGS_UPPER_MASK) - EVT_CASE_EQ(1) // middle badge shop slot - EVT_SET(GF_MAC01_RowfBadgeAvailableB, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CASE_EQ(2) // right badge shop slot - EVT_SET(GF_MAC01_RowfBadgeAvailableC, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b1, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_SWITCH - EVT_CALL(N(SetRowfBadgeBought), LVar2) - EVT_CASE_EQ(SHOP_BUY_RESULT_2) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(SHOP_BUY_RESULT_CANCEL) + CaseEq(SHOP_BUY_RESULT_4) + CaseEq(SHOP_BUY_RESULT_OK) + Switch(LVar2) + CaseEq(0) // left badge shop slot + Set(GF_MAC01_RowfBadgeAvailableA, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b3, COLLIDER_FLAGS_UPPER_MASK) + CaseEq(1) // middle badge shop slot + Set(GF_MAC01_RowfBadgeAvailableB, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b2, COLLIDER_FLAGS_UPPER_MASK) + CaseEq(2) // right badge shop slot + Set(GF_MAC01_RowfBadgeAvailableC, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b1, COLLIDER_FLAGS_UPPER_MASK) + EndSwitch + Call(N(SetRowfBadgeBought), LVar2) + CaseEq(SHOP_BUY_RESULT_2) + EndSwitch + Return + End }; ShopItemData N(RowfBadgeInventory)[] = { @@ -179,73 +179,73 @@ ShopOwner N(ShopOwnerRowf) = { }; EvtScript N(EVS_SetupBadgeShop) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_GOTO(1) - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) - EVT_GOTO(2) - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_GOTO(3) - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH5_RETURNED_TO_TOAD_TOWN) - EVT_GOTO(4) - EVT_END_IF - EVT_SET(GF_MAC01_UnlockedRowfBadge_0F, TRUE) - EVT_SET(GF_MAC01_UnlockedRowfBadge_0E, TRUE) - EVT_SET(GF_MAC01_UnlockedRowfBadge_0D, TRUE) - EVT_LABEL(4) - EVT_SET(GF_MAC01_UnlockedRowfBadge_0C, TRUE) - EVT_SET(GF_MAC01_UnlockedRowfBadge_0B, TRUE) - EVT_SET(GF_MAC01_UnlockedRowfBadge_0A, TRUE) - EVT_LABEL(3) - EVT_SET(GF_MAC01_UnlockedRowfBadge_09, TRUE) - EVT_SET(GF_MAC01_UnlockedRowfBadge_08, TRUE) - EVT_SET(GF_MAC01_UnlockedRowfBadge_07, TRUE) - EVT_LABEL(2) - EVT_SET(GF_MAC01_UnlockedRowfBadge_06, TRUE) - EVT_SET(GF_MAC01_UnlockedRowfBadge_05, TRUE) - EVT_SET(GF_MAC01_UnlockedRowfBadge_04, TRUE) - EVT_LABEL(1) - EVT_SET(GF_MAC01_UnlockedRowfBadge_03, TRUE) - EVT_SET(GF_MAC01_UnlockedRowfBadge_02, TRUE) - EVT_SET(GF_MAC01_UnlockedRowfBadge_01, TRUE) - EVT_SET(GF_MAC01_UnlockedRowfBadge_00, TRUE) - EVT_CALL(N(CreateShopInventory)) - EVT_SET(MV_RowfShopBuyFlags, LVar1) - EVT_IF_EQ(LVar3, 0) - EVT_SET(GF_MAC01_RowfBadgeAvailableA, FALSE) - EVT_SET(GF_MAC01_RowfBadgeAvailableB, FALSE) - EVT_SET(GF_MAC01_RowfBadgeAvailableC, FALSE) - EVT_IF_LT(LVar0, 3) - EVT_SET(GF_MAC01_RowfBadgeAvailableC, TRUE) - EVT_END_IF - EVT_IF_LT(LVar0, 2) - EVT_SET(GF_MAC01_RowfBadgeAvailableB, TRUE) - EVT_END_IF - EVT_IF_LT(LVar0, 1) - EVT_SET(GF_MAC01_RowfBadgeAvailableA, TRUE) - EVT_END_IF - EVT_END_IF - EVT_CALL(MakeShop, EVT_PTR(N(RowfItemPositions)), LVar2, EVT_PTR(N(RowfDummyPriceList)), 0) - EVT_CALL(MakeShopOwner, EVT_PTR(N(ShopOwnerRowf))) - EVT_IF_EQ(LVar3, 1) - EVT_IF_GE(LVar0, 3) - EVT_IF_EQ(GF_MAC01_RowfBadgeAvailableC, TRUE) - EVT_CALL(N(SetRowfBadgeBought), 2) - EVT_END_IF - EVT_END_IF - EVT_IF_GE(LVar0, 2) - EVT_IF_EQ(GF_MAC01_RowfBadgeAvailableB, TRUE) - EVT_CALL(N(SetRowfBadgeBought), 1) - EVT_END_IF - EVT_END_IF - EVT_IF_GE(LVar0, 1) - EVT_IF_EQ(GF_MAC01_RowfBadgeAvailableA, TRUE) - EVT_CALL(N(SetRowfBadgeBought), 0) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH2_STAR_SPRIT_DEPARTED) + Goto(1) + EndIf + IfLt(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) + Goto(2) + EndIf + IfLt(GB_StoryProgress, STORY_CH4_STAR_SPRIT_DEPARTED) + Goto(3) + EndIf + IfLt(GB_StoryProgress, STORY_CH5_RETURNED_TO_TOAD_TOWN) + Goto(4) + EndIf + Set(GF_MAC01_UnlockedRowfBadge_0F, TRUE) + Set(GF_MAC01_UnlockedRowfBadge_0E, TRUE) + Set(GF_MAC01_UnlockedRowfBadge_0D, TRUE) + Label(4) + Set(GF_MAC01_UnlockedRowfBadge_0C, TRUE) + Set(GF_MAC01_UnlockedRowfBadge_0B, TRUE) + Set(GF_MAC01_UnlockedRowfBadge_0A, TRUE) + Label(3) + Set(GF_MAC01_UnlockedRowfBadge_09, TRUE) + Set(GF_MAC01_UnlockedRowfBadge_08, TRUE) + Set(GF_MAC01_UnlockedRowfBadge_07, TRUE) + Label(2) + Set(GF_MAC01_UnlockedRowfBadge_06, TRUE) + Set(GF_MAC01_UnlockedRowfBadge_05, TRUE) + Set(GF_MAC01_UnlockedRowfBadge_04, TRUE) + Label(1) + Set(GF_MAC01_UnlockedRowfBadge_03, TRUE) + Set(GF_MAC01_UnlockedRowfBadge_02, TRUE) + Set(GF_MAC01_UnlockedRowfBadge_01, TRUE) + Set(GF_MAC01_UnlockedRowfBadge_00, TRUE) + Call(N(CreateShopInventory)) + Set(MV_RowfShopBuyFlags, LVar1) + IfEq(LVar3, 0) + Set(GF_MAC01_RowfBadgeAvailableA, FALSE) + Set(GF_MAC01_RowfBadgeAvailableB, FALSE) + Set(GF_MAC01_RowfBadgeAvailableC, FALSE) + IfLt(LVar0, 3) + Set(GF_MAC01_RowfBadgeAvailableC, TRUE) + EndIf + IfLt(LVar0, 2) + Set(GF_MAC01_RowfBadgeAvailableB, TRUE) + EndIf + IfLt(LVar0, 1) + Set(GF_MAC01_RowfBadgeAvailableA, TRUE) + EndIf + EndIf + Call(MakeShop, Ref(N(RowfItemPositions)), LVar2, Ref(N(RowfDummyPriceList)), 0) + Call(MakeShopOwner, Ref(N(ShopOwnerRowf))) + IfEq(LVar3, 1) + IfGe(LVar0, 3) + IfEq(GF_MAC01_RowfBadgeAvailableC, TRUE) + Call(N(SetRowfBadgeBought), 2) + EndIf + EndIf + IfGe(LVar0, 2) + IfEq(GF_MAC01_RowfBadgeAvailableB, TRUE) + Call(N(SetRowfBadgeBought), 1) + EndIf + EndIf + IfGe(LVar0, 1) + IfEq(GF_MAC01_RowfBadgeAvailableA, TRUE) + Call(N(SetRowfBadgeBought), 0) + EndIf + EndIf + EndIf + Return + End }; diff --git a/src/world/area_mac/mac_01/mac_01_6_crystal_ball_gfx.c b/src/world/area_mac/mac_01/mac_01_6_crystal_ball_gfx.c index 1fa5a9cc28a..0d614928298 100644 --- a/src/world/area_mac/mac_01/mac_01_6_crystal_ball_gfx.c +++ b/src/world/area_mac/mac_01/mac_01_6_crystal_ball_gfx.c @@ -124,14 +124,14 @@ void N(gfx_build_inside_crystal_ball)(void) { } EvtScript N(EVS_SetupCrystalBallGfx) = { - EVT_WAIT(1) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_2, EVT_PTR(N(gfx_build_crystal_ball_pre)), EVT_PTR(N(gfx_build_crystal_ball_post))) - EVT_CALL(SetModelCustomGfx, MODEL_mirrorball, CUSTOM_GFX_2, -1) - EVT_CALL(EnableModel, MODEL_mirrorball, FALSE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_3, EVT_PTR(N(gfx_build_inside_crystal_ball)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_tama, CUSTOM_GFX_3, -1) - EVT_CALL(SetModelFlags, MODEL_tama, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_CALL(SetModelFlags, MODEL_ohosi, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_RETURN - EVT_END + Wait(1) + Call(SetCustomGfxBuilders, CUSTOM_GFX_2, Ref(N(gfx_build_crystal_ball_pre)), Ref(N(gfx_build_crystal_ball_post))) + Call(SetModelCustomGfx, MODEL_mirrorball, CUSTOM_GFX_2, -1) + Call(EnableModel, MODEL_mirrorball, FALSE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_3, Ref(N(gfx_build_inside_crystal_ball)), NULL) + Call(SetModelCustomGfx, MODEL_tama, CUSTOM_GFX_3, -1) + Call(SetModelFlags, MODEL_tama, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Call(SetModelFlags, MODEL_ohosi, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Return + End }; diff --git a/src/world/area_mac/mac_01/mac_01_7_bulletin.c b/src/world/area_mac/mac_01/mac_01_7_bulletin.c index ef6a0cc267a..702b8780ea1 100644 --- a/src/world/area_mac/mac_01/mac_01_7_bulletin.c +++ b/src/world/area_mac/mac_01/mac_01_7_bulletin.c @@ -1,26 +1,26 @@ #include "mac_01.h" EvtScript N(EVS_UpdateBulletinKootFavor) = { - EVT_IF_NE(GB_KootFavor_Current, KOOT_FAVOR_CH4_2) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar1, GF_MAC01_KootFavor_ReadNewsBulletin) - EVT_ADD(LVar1, GF_MAC01_KootFavor_ReadGossipBulletin) - EVT_IF_EQ(LVar1, 2) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, 0) - EVT_SET(GF_MAC01_KootFavor_ReadNewsBulletin, TRUE) - EVT_ELSE - EVT_SET(GF_MAC01_KootFavor_ReadGossipBulletin, TRUE) - EVT_END_IF - EVT_SET(LVar0, GF_MAC01_KootFavor_ReadNewsBulletin) - EVT_ADD(LVar0, GF_MAC01_KootFavor_ReadGossipBulletin) - EVT_IF_EQ(LVar0, 2) - EVT_SET(GF_MAC02_KootFavor_CurrentComplete, TRUE) - EVT_END_IF - EVT_RETURN - EVT_END + IfNe(GB_KootFavor_Current, KOOT_FAVOR_CH4_2) + Return + EndIf + Set(LVar1, GF_MAC01_KootFavor_ReadNewsBulletin) + Add(LVar1, GF_MAC01_KootFavor_ReadGossipBulletin) + IfEq(LVar1, 2) + Return + EndIf + IfEq(LVar0, 0) + Set(GF_MAC01_KootFavor_ReadNewsBulletin, TRUE) + Else + Set(GF_MAC01_KootFavor_ReadGossipBulletin, TRUE) + EndIf + Set(LVar0, GF_MAC01_KootFavor_ReadNewsBulletin) + Add(LVar0, GF_MAC01_KootFavor_ReadGossipBulletin) + IfEq(LVar0, 2) + Set(GF_MAC02_KootFavor_CurrentComplete, TRUE) + EndIf + Return + End }; typedef struct BulletinBoardEntry { @@ -84,32 +84,32 @@ API_CALLABLE(N(SelectBulletinMessages)) { EvtScript N(EVS_ReadBulletin_News) = { - EVT_CALL(N(SelectBulletinMessages)) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(GetBulletinMessages)) - EVT_CALL(ShowMessageAtScreenPos, LVar0, 160, 40) - EVT_SET(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_UpdateBulletinKootFavor)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(N(SelectBulletinMessages)) + Call(DisablePlayerInput, TRUE) + Call(N(GetBulletinMessages)) + Call(ShowMessageAtScreenPos, LVar0, 160, 40) + Set(LVar0, 0) + ExecWait(N(EVS_UpdateBulletinKootFavor)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_ReadBulletin_Gossip) = { - EVT_CALL(N(SelectBulletinMessages)) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(GetBulletinMessages)) - EVT_CALL(ShowMessageAtScreenPos, LVar1, 160, 40) - EVT_SET(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_UpdateBulletinKootFavor)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(N(SelectBulletinMessages)) + Call(DisablePlayerInput, TRUE) + Call(N(GetBulletinMessages)) + Call(ShowMessageAtScreenPos, LVar1, 160, 40) + Set(LVar0, 1) + ExecWait(N(EVS_UpdateBulletinKootFavor)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SetupBulletinBoard) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ReadBulletin_News)), TRIGGER_WALL_PRESS_A, COLLIDER_syoumen, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ReadBulletin_Gossip)), TRIGGER_WALL_PRESS_A, COLLIDER_yoko_ushiro, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ReadBulletin_News)), TRIGGER_WALL_PRESS_A, COLLIDER_syoumen, 1, 0) + BindTrigger(Ref(N(EVS_ReadBulletin_Gossip)), TRIGGER_WALL_PRESS_A, COLLIDER_yoko_ushiro, 1, 0) + Return + End }; diff --git a/src/world/area_mac/mac_01/mac_01_8_music_mix.c b/src/world/area_mac/mac_01/mac_01_8_music_mix.c index 10cc5fb5a68..b153189187e 100644 --- a/src/world/area_mac/mac_01/mac_01_8_music_mix.c +++ b/src/world/area_mac/mac_01/mac_01_8_music_mix.c @@ -28,20 +28,20 @@ MusicProximityTrigger N(MusicMixTrigger3) = { EvtScript N(EVS_SetupMusicMix) = { - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN, 0, 8) - EVT_CALL(EnableMusicProximityMix, 0) - EVT_IF_EQ(MF_SetupMusicMixes, FALSE) - EVT_SET(MF_SetupMusicMixes, TRUE) - EVT_THREAD - EVT_CALL(N(MonitorMusicProximityTrigger), EVT_PTR(N(MusicMixTrigger1))) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(MonitorMusicProximityTrigger), EVT_PTR(N(MusicMixTrigger2))) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(MonitorMusicProximityTrigger), EVT_PTR(N(MusicMixTrigger3))) - EVT_END_THREAD - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TOAD_TOWN, 0, 8) + Call(EnableMusicProximityMix, 0) + IfEq(MF_SetupMusicMixes, FALSE) + Set(MF_SetupMusicMixes, TRUE) + Thread + Call(N(MonitorMusicProximityTrigger), Ref(N(MusicMixTrigger1))) + EndThread + Thread + Call(N(MonitorMusicProximityTrigger), Ref(N(MusicMixTrigger2))) + EndThread + Thread + Call(N(MonitorMusicProximityTrigger), Ref(N(MusicMixTrigger3))) + EndThread + EndIf + Return + End }; diff --git a/src/world/area_mac/mac_01/mac_01_9_npc.c b/src/world/area_mac/mac_01/mac_01_9_npc.c index f9d2bab096e..1100c5b3170 100644 --- a/src/world/area_mac/mac_01/mac_01_9_npc.c +++ b/src/world/area_mac/mac_01/mac_01_9_npc.c @@ -50,23 +50,23 @@ s32 N(LetterList_Merlon)[] = { }; EvtScript N(EVS_LetterPrompt_Merlon) = { - EVT_CALL(N(LetterDelivery_Init), + Call(N(LetterDelivery_Init), NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, ITEM_LETTER_TO_MERLON, ITEM_NONE, MSG_MAC_Plaza_0043, MSG_MAC_Plaza_0044, MSG_MAC_Plaza_0045, MSG_MAC_Plaza_0046, - EVT_PTR(N(LetterList_Merlon))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) - EVT_RETURN - EVT_END + Ref(N(LetterList_Merlon))) + ExecWait(N(EVS_DoLetterDelivery)) + Return + End }; EvtScript N(EVS_LetterReward_Merlon) = { - EVT_IF_EQ(LVarC, DELIVERY_ACCEPTED) + IfEq(LVarC, DELIVERY_ACCEPTED) EVT_GIVE_STAR_PIECE() - EVT_CALL(InterpNpcYaw, NPC_Merlon, 135, 0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(InterpNpcYaw, NPC_Merlon, 135, 0) + EndIf + Return + End }; s32 N(LetterList_MinhT)[] = { @@ -75,22 +75,22 @@ s32 N(LetterList_MinhT)[] = { }; EvtScript N(EVS_LetterPrompt_MinhT) = { - EVT_CALL(N(LetterDelivery_Init), + Call(N(LetterDelivery_Init), NPC_MinhT, ANIM_MinhT_Talk, ANIM_MinhT_Idle, ITEM_LETTER_TO_MINH_T, ITEM_NONE, MSG_MAC_Plaza_0078, MSG_MAC_Plaza_0079, MSG_MAC_Plaza_007A, MSG_MAC_Plaza_007B, - EVT_PTR(N(LetterList_MinhT))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) - EVT_RETURN - EVT_END + Ref(N(LetterList_MinhT))) + ExecWait(N(EVS_DoLetterDelivery)) + Return + End }; EvtScript N(EVS_LetterReward_MinhT) = { - EVT_IF_EQ(LVarC, DELIVERY_ACCEPTED) + IfEq(LVarC, DELIVERY_ACCEPTED) EVT_GIVE_STAR_PIECE() - EVT_END_IF - EVT_RETURN - EVT_END + EndIf + Return + End }; s32 N(LetterList_Kolorado)[] = { @@ -99,22 +99,22 @@ s32 N(LetterList_Kolorado)[] = { }; EvtScript N(EVS_LetterPrompt_Kolorado) = { - EVT_CALL(N(LetterDelivery_Init), + Call(N(LetterDelivery_Init), NPC_Kolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, ITEM_LETTER_TO_KOLORADO, ITEM_NONE, MSG_MAC_Plaza_00E0, MSG_MAC_Plaza_00E1, MSG_MAC_Plaza_00E2, MSG_MAC_Plaza_00E3, - EVT_PTR(N(LetterList_Kolorado))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) - EVT_RETURN - EVT_END + Ref(N(LetterList_Kolorado))) + ExecWait(N(EVS_DoLetterDelivery)) + Return + End }; EvtScript N(EVS_LetterReward_Kolorado) = { - EVT_IF_EQ(LVarC, DELIVERY_ACCEPTED) + IfEq(LVarC, DELIVERY_ACCEPTED) EVT_GIVE_STAR_PIECE() - EVT_END_IF - EVT_RETURN - EVT_END + EndIf + Return + End }; s32 N(ItemList_Artifact)[] = { @@ -123,94 +123,94 @@ s32 N(ItemList_Artifact)[] = { }; EvtScript N(EVS_ArtifactReward_Kolorado) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Plaza_00E8) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Plaza_00E8) EVT_GIVE_STAR_PIECE() - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Plaza_00E9) - EVT_SET(GF_SBK_GaveArtifactToKolorado, TRUE) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Plaza_00E9) + Set(GF_SBK_GaveArtifactToKolorado, TRUE) + Return + End }; EvtScript N(EVS_ArtifactPrompt_Kolorado) = { - EVT_IF_EQ(GF_SBK_GaveArtifactToKolorado, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(FindKeyItem, ITEM_ARTIFACT, LVar0) - EVT_IF_EQ(LVar0, -1) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(AF_MAC_44, FALSE) - EVT_SET(AF_MAC_44, TRUE) - EVT_IF_EQ(GF_SBK_KeptArtifactFromKolorado, FALSE) - EVT_SET(GF_SBK_KeptArtifactFromKolorado, FALSE) - EVT_SET(LVar0, MSG_MAC_Plaza_00E4) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Plaza_00E5) - EVT_END_IF - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Plaza_00E5) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, LVar0) - EVT_SET(LVar0, EVT_PTR(N(ItemList_Artifact))) - EVT_SET(LVar1, 19) - EVT_EXEC_WAIT(N(EVS_ChooseKeyItem)) - EVT_SWITCH(LVar0) - EVT_CASE_GE(1) - EVT_EXEC_WAIT(N(EVS_ArtifactReward_Kolorado)) - EVT_BREAK_SWITCH - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Plaza_00E6) - EVT_SET(LVar0, EVT_PTR(N(ItemList_Artifact))) - EVT_SET(LVar1, 19) - EVT_EXEC_WAIT(N(EVS_ChooseKeyItem)) - EVT_SWITCH(LVar0) - EVT_CASE_GE(1) - EVT_EXEC_WAIT(N(EVS_ArtifactReward_Kolorado)) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Plaza_00E7) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_RETURN - EVT_END + IfEq(GF_SBK_GaveArtifactToKolorado, TRUE) + Return + EndIf + Call(FindKeyItem, ITEM_ARTIFACT, LVar0) + IfEq(LVar0, -1) + Return + EndIf + IfEq(AF_MAC_44, FALSE) + Set(AF_MAC_44, TRUE) + IfEq(GF_SBK_KeptArtifactFromKolorado, FALSE) + Set(GF_SBK_KeptArtifactFromKolorado, FALSE) + Set(LVar0, MSG_MAC_Plaza_00E4) + Else + Set(LVar0, MSG_MAC_Plaza_00E5) + EndIf + Else + Set(LVar0, MSG_MAC_Plaza_00E5) + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, LVar0) + Set(LVar0, Ref(N(ItemList_Artifact))) + Set(LVar1, 19) + ExecWait(N(EVS_ChooseKeyItem)) + Switch(LVar0) + CaseGe(1) + ExecWait(N(EVS_ArtifactReward_Kolorado)) + BreakSwitch + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Plaza_00E6) + Set(LVar0, Ref(N(ItemList_Artifact))) + Set(LVar1, 19) + ExecWait(N(EVS_ChooseKeyItem)) + Switch(LVar0) + CaseGe(1) + ExecWait(N(EVS_ArtifactReward_Kolorado)) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Plaza_00E7) + EndSwitch + EndSwitch + Return + End }; EvtScript N(D_8024E6F8_80EF78) = { - EVT_LOOP(0) - EVT_CALL(PlaySoundAtNpc, LVar0, SOUND_SEQ_SHY_GUY_STEP, SOUND_SPACE_DEFAULT) - EVT_WAIT(2) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(PlaySoundAtNpc, LVar0, SOUND_SEQ_SHY_GUY_STEP, SOUND_SPACE_DEFAULT) + Wait(2) + EndLoop + Return + End }; EvtScript N(D_8024E740_80EFC0) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitd, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, -80, 30, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_door, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_deilitd, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, -80, 30, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_door, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(D_8024E7F0_80F070) = { - EVT_CALL(MakeLerp, -80, 0, 30, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_door, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitd, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_RETURN - EVT_END + Call(MakeLerp, -80, 0, 30, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_door, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_deilitd, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Return + End }; #include "npc/read_fortune.inc.c" @@ -287,773 +287,773 @@ API_CALLABLE(N(func_802448A0_805120)) { } EvtScript N(EVS_QuickChange_CheckForPound) = { - EVT_CALL(GetPlayerActionState, LVar0) - EVT_IF_EQ(LVar0, ACTION_STATE_SPIN_POUND) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_EQ(LVar0, ACTION_STATE_TORNADO_POUND) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_LABEL(0) - EVT_CALL(GetPlayerActionState, LVar0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_IF_EQ(LVar0, ACTION_STATE_SPIN_POUND) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_EQ(LVar0, ACTION_STATE_TORNADO_POUND) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_ADD(GB_MAC01_Merlon_SpinJumpCount, 1) - EVT_IF_LT(GB_MAC01_Merlon_SpinJumpCount, 3) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(CheckPositionRelativeToPlane), -380, -245, -225, -408) - EVT_IF_EQ(LVar0, ACTION_STATE_IDLE) - EVT_SET(LVar2, -232) - EVT_SET(LVar4, -331) - EVT_ELSE - EVT_SET(LVar2, -297) - EVT_SET(LVar4, -393) - EVT_END_IF - EVT_CALL(MakeItemEntity, ITEM_QUICK_CHANGE, LVar2, 220, LVar4, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_MAC01_Item_QuickChange) - EVT_WAIT(35) - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Run) - EVT_CALL(GetNpcPos, NPC_Merlon, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Merlon, LVar0, LVar1, LVar2, 10) - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Idle) - EVT_CALL(GetNpcPos, NPC_Merlon, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamType, CAM_DEFAULT, 0, FALSE) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 15, -8) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlayerFaceNpc, NPC_Merlon, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 5, MSG_MAC_Plaza_0041) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0042) - EVT_SET(GF_MAC01_QuickChangeDropped, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(GetPlayerActionState, LVar0) + IfEq(LVar0, ACTION_STATE_SPIN_POUND) + Goto(0) + EndIf + IfEq(LVar0, ACTION_STATE_TORNADO_POUND) + Goto(0) + EndIf + Return + Label(0) + Call(GetPlayerActionState, LVar0) + Call(DisablePlayerInput, TRUE) + Wait(1) + Call(DisablePlayerInput, FALSE) + IfEq(LVar0, ACTION_STATE_SPIN_POUND) + Goto(0) + EndIf + IfEq(LVar0, ACTION_STATE_TORNADO_POUND) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Add(GB_MAC01_Merlon_SpinJumpCount, 1) + IfLt(GB_MAC01_Merlon_SpinJumpCount, 3) + Call(DisablePlayerInput, FALSE) + Return + EndIf + Call(N(CheckPositionRelativeToPlane), -380, -245, -225, -408) + IfEq(LVar0, ACTION_STATE_IDLE) + Set(LVar2, -232) + Set(LVar4, -331) + Else + Set(LVar2, -297) + Set(LVar4, -393) + EndIf + Call(MakeItemEntity, ITEM_QUICK_CHANGE, LVar2, 220, LVar4, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_MAC01_Item_QuickChange) + Wait(35) + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Run) + Call(GetNpcPos, NPC_Merlon, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Merlon, LVar0, LVar1, LVar2, 10) + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Idle) + Call(GetNpcPos, NPC_Merlon, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamType, CAM_DEFAULT, 0, FALSE) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 250) + Call(SetCamPitch, CAM_DEFAULT, 15, -8) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlayerFaceNpc, NPC_Merlon, FALSE) + Call(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 5, MSG_MAC_Plaza_0041) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0042) + Set(GF_MAC01_QuickChangeDropped, TRUE) + Call(DisablePlayerInput, FALSE) + Unbind + Return + End }; EvtScript N(EVS_SetupQuickChangeTrigger) = { - EVT_IF_EQ(GF_MAC01_QuickChangeDropped, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_QuickChange_CheckForPound)), TRIGGER_FLOOR_TOUCH, COLLIDER_dr_yuka, 1, 0) - EVT_ELSE - EVT_CALL(MakeItemEntity, ITEM_QUICK_CHANGE, -232, 20, -331, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_MAC01_Item_QuickChange) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_MAC01_QuickChangeDropped, FALSE) + BindTrigger(Ref(N(EVS_QuickChange_CheckForPound)), TRIGGER_FLOOR_TOUCH, COLLIDER_dr_yuka, 1, 0) + Else + Call(MakeItemEntity, ITEM_QUICK_CHANGE, -232, 20, -331, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_MAC01_Item_QuickChange) + EndIf + Return + End }; EvtScript N(EVS_MerlonShooAway) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS) - EVT_IF_EQ(GF_MAC01_Merlon_Shoo2, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_MAC_Plaza_001E, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GF_MAC01_Merlon_Shoo1, FALSE) - EVT_CALL(ShowMessageAtScreenPos, MSG_MAC_Plaza_001C, 160, 40) - EVT_SET(GF_MAC01_Merlon_Shoo1, TRUE) - EVT_ELSE - EVT_CALL(ShowMessageAtScreenPos, MSG_MAC_Plaza_001D, 160, 40) - EVT_SET(GF_MAC01_Merlon_Shoo2, TRUE) - EVT_END_IF - EVT_CASE_GE(STORY_CH0_MET_STAR_SPIRITS) - EVT_IF_EQ(GF_MAC01_Merlon_Shoo3, FALSE) - EVT_CALL(ShowMessageAtScreenPos, MSG_MAC_Plaza_001F, 160, 40) - EVT_SET(GF_MAC01_Merlon_Shoo3, TRUE) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_MerlonBargeOut)) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_MET_STAR_SPIRITS) + IfEq(GF_MAC01_Merlon_Shoo2, TRUE) + Call(ShowMessageAtScreenPos, MSG_MAC_Plaza_001E, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + EndIf + IfEq(GF_MAC01_Merlon_Shoo1, FALSE) + Call(ShowMessageAtScreenPos, MSG_MAC_Plaza_001C, 160, 40) + Set(GF_MAC01_Merlon_Shoo1, TRUE) + Else + Call(ShowMessageAtScreenPos, MSG_MAC_Plaza_001D, 160, 40) + Set(GF_MAC01_Merlon_Shoo2, TRUE) + EndIf + CaseGe(STORY_CH0_MET_STAR_SPIRITS) + IfEq(GF_MAC01_Merlon_Shoo3, FALSE) + Call(ShowMessageAtScreenPos, MSG_MAC_Plaza_001F, 160, 40) + Set(GF_MAC01_Merlon_Shoo3, TRUE) + Else + ExecWait(N(EVS_MerlonBargeOut)) + EndIf + EndSwitch + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_MerlonBargeOut) = { - EVT_CALL(ShowMessageAtScreenPos, MSG_MAC_Plaza_0020, 160, 40) - EVT_CALL(SetGroupVisibility, MODEL_dr_in, MODEL_GROUP_VISIBLE) - EVT_THREAD - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitd, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, -80, 15, EASING_COS_FAST_OVERSHOOT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_door, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(2.0)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, TRUE) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Hurt) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(PlayerJump1, -222, 20, -158, 8 * DT) - EVT_WAIT(5 * DT) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, FALSE) - EVT_CALL(N(KnockdownCreate), SPR_Mario1, 37) //TODO hardcoded player raster ID - EVT_CALL(N(KnockdownSetPos), -215, 20, -158) - EVT_WAIT(1) - EVT_CALL(SetPlayerPos, -215, 1000, -158) - EVT_CALL(MakeLerp, 0, 90, 10 * DT, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(KnockdownSetRot), LVar0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(N(KnockdownSetPos), -215, 21, -158) - EVT_CALL(PlaySoundAtPlayer, SOUND_TRIP, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_WAIT(50 * DT) - EVT_CALL(SetNpcPos, NPC_Merlon, -241, 20, -270) - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Walk) - EVT_CALL(NpcMoveTo, NPC_Merlon, -168, -198, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Idle) - EVT_CALL(GetAngleToPlayer, NPC_Merlon, LVar0) - EVT_CALL(InterpNpcYaw, NPC_Merlon, LVar0, 5) - EVT_CALL(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0021) - EVT_CALL(N(KnockdownSetPos), -215, 20, -158) - EVT_CALL(MakeLerp, 90, 0, 15 * DT, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(KnockdownSetRot), LVar0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPlayerPos, -222, 20, -158) - EVT_CALL(N(KnockdownDestroy)) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(SetPlayerActionState, ACTION_STATE_JUMP) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(PlayerJump, LVar0, LVar1, LVar2, 15 * DT) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0022) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Walk) - EVT_CALL(NpcMoveTo, NPC_Merlon, -275, -305, 30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Idle) - EVT_CALL(SetNpcPos, NPC_Merlon, -337, 20, -360) - EVT_CALL(SetNpcYaw, NPC_Merlon, 135) - EVT_END_THREAD - EVT_CALL(PlayerMoveTo, -168, -198, 20 * DT) - EVT_CALL(PlayerMoveTo, -275, -305, 30 * DT) - EVT_EXEC(N(D_8024E7F0_80F070)) - EVT_WAIT(5 * DT) - EVT_CALL(SetNpcPos, NPC_PARTNER, -240, 20, -284) - EVT_CALL(N(func_802447E0_805060)) - EVT_THREAD - EVT_SET(LVarF, 53) - EVT_SET(LVar0, 0) - EVT_CALL(N(func_802448A0_805120)) - EVT_END_THREAD - EVT_CALL(RotateGroup, MODEL_off_kabe, 180, 0, 1, 0) - EVT_SET(MF_MusicMixTrigger1, TRUE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -250, 20, -280) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(30 * DT) - EVT_CALL(N(func_80244848_8050C8)) - EVT_CALL(InterpNpcYaw, NPC_Merlon, 135, 5) - EVT_CALL(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0023) - EVT_CALL(N(func_802447E0_805060)) - EVT_WAIT(60 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) - EVT_THREAD - EVT_CALL(N(func_80244848_8050C8)) - EVT_END_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(ContinueSpeech, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0024) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_JoltAwake) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_NodYesTwice) - EVT_WAIT(50 * DT) - EVT_CALL(GetNpcPos, NPC_Merlon, LVar0, LVar1, LVar2) - EVT_CALL(SetCamType, CAM_DEFAULT, 0, FALSE) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 200) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 15, -10) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0025) - EVT_SET(GB_StoryProgress, STORY_CH1_SPOKE_WITH_MERLIN) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5.0 / DT)) - EVT_THREAD - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o336, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o335, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(AwaitPlayerLeave, -280, -300, 40) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o335, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o336, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(ShowMessageAtScreenPos, MSG_MAC_Plaza_0020, 160, 40) + Call(SetGroupVisibility, MODEL_dr_in, MODEL_GROUP_VISIBLE) + Thread + Call(PlaySoundAtCollider, COLLIDER_deilitd, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, -80, 15, EASING_COS_FAST_OVERSHOOT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_door, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(2.0)) + EndThread + Thread + Wait(1) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, TRUE) + Call(InterpPlayerYaw, 270, 0) + Wait(1) + Call(SetPlayerAnimation, ANIM_Mario1_Hurt) + Call(SetPlayerJumpscale, Float(1.0)) + Call(PlayerJump1, -222, 20, -158, 8 * DT) + Wait(5 * DT) + Call(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, FALSE) + Call(N(KnockdownCreate), SPR_Mario1, 37) //TODO hardcoded player raster ID + Call(N(KnockdownSetPos), -215, 20, -158) + Wait(1) + Call(SetPlayerPos, -215, 1000, -158) + Call(MakeLerp, 0, 90, 10 * DT, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(N(KnockdownSetRot), LVar0, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(N(KnockdownSetPos), -215, 21, -158) + Call(PlaySoundAtPlayer, SOUND_TRIP, SOUND_SPACE_DEFAULT) + EndThread + Wait(50 * DT) + Call(SetNpcPos, NPC_Merlon, -241, 20, -270) + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Walk) + Call(NpcMoveTo, NPC_Merlon, -168, -198, 20 * DT) + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Idle) + Call(GetAngleToPlayer, NPC_Merlon, LVar0) + Call(InterpNpcYaw, NPC_Merlon, LVar0, 5) + Call(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0021) + Call(N(KnockdownSetPos), -215, 20, -158) + Call(MakeLerp, 90, 0, 15 * DT, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(N(KnockdownSetRot), LVar0, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetPlayerPos, -222, 20, -158) + Call(N(KnockdownDestroy)) + Call(InterpPlayerYaw, 90, 0) + Call(SetPlayerActionState, ACTION_STATE_JUMP) + Call(SetPlayerJumpscale, Float(1.0)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(PlayerJump, LVar0, LVar1, LVar2, 15 * DT) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0022) + Thread + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Walk) + Call(NpcMoveTo, NPC_Merlon, -275, -305, 30 * DT) + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Idle) + Call(SetNpcPos, NPC_Merlon, -337, 20, -360) + Call(SetNpcYaw, NPC_Merlon, 135) + EndThread + Call(PlayerMoveTo, -168, -198, 20 * DT) + Call(PlayerMoveTo, -275, -305, 30 * DT) + Exec(N(D_8024E7F0_80F070)) + Wait(5 * DT) + Call(SetNpcPos, NPC_PARTNER, -240, 20, -284) + Call(N(func_802447E0_805060)) + Thread + Set(LVarF, 53) + Set(LVar0, 0) + Call(N(func_802448A0_805120)) + EndThread + Call(RotateGroup, MODEL_off_kabe, 180, 0, 1, 0) + Set(MF_MusicMixTrigger1, TRUE) + Call(DisablePlayerPhysics, FALSE) + Call(UseSettingsFrom, CAM_DEFAULT, -250, 20, -280) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(30 * DT) + Call(N(func_80244848_8050C8)) + Call(InterpNpcYaw, NPC_Merlon, 135, 5) + Call(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0023) + Call(N(func_802447E0_805060)) + Wait(60 * DT) + Call(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) + Thread + Call(N(func_80244848_8050C8)) + EndThread + Wait(10 * DT) + Call(ContinueSpeech, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0024) + Call(SetPlayerAnimation, ANIM_MarioW2_JoltAwake) + Wait(10) + Call(SetPlayerAnimation, ANIM_MarioW2_NodYesTwice) + Wait(50 * DT) + Call(GetNpcPos, NPC_Merlon, LVar0, LVar1, LVar2) + Call(SetCamType, CAM_DEFAULT, 0, FALSE) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 200) + Call(SetCamPitch, CAM_DEFAULT, 15, -10) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0025) + Set(GB_StoryProgress, STORY_CH1_SPOKE_WITH_MERLIN) + Call(ResetCam, CAM_DEFAULT, Float(5.0 / DT)) + Thread + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o336, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o335, COLLIDER_FLAGS_UPPER_MASK) + Call(AwaitPlayerLeave, -280, -300, 40) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o335, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o336, COLLIDER_FLAGS_UPPER_MASK) + EndThread + Return + End }; EvtScript N(D_80250D14_811594) = { - EVT_CALL(AwaitPlayerApproach, -130, -110, 150) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 1) - EVT_CALL(SetNpcFlagBits, NPC_Merlon, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(NpcMoveTo, NPC_Merlon, 0, 0, 0) - EVT_CALL(NpcMoveTo, NPC_Merlon, 410, 0, 0) - EVT_CALL(SetNpcPos, NPC_Merlon, 410, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Idle) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 0) - EVT_CALL(SetNpcFlagBits, NPC_Merlon, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_GRAVITY, FALSE) - EVT_RETURN - EVT_END + Call(AwaitPlayerApproach, -130, -110, 150) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 1) + Call(SetNpcFlagBits, NPC_Merlon, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_GRAVITY, TRUE) + Call(NpcMoveTo, NPC_Merlon, 0, 0, 0) + Call(NpcMoveTo, NPC_Merlon, 410, 0, 0) + Call(SetNpcPos, NPC_Merlon, 410, 0, 0) + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Idle) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_CANT_INTERACT, 0) + Call(SetNpcFlagBits, NPC_Merlon, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_GRAVITY, FALSE) + Return + End }; EvtScript N(EVS_Scene_KoopaBrosUnmasked) = { - EVT_CALL(SetNpcVar, NPC_Merlon, 0, 0) - EVT_CALL(func_802CF56C, 2) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Walk) - EVT_CALL(SetNpcSpeed, NPC_Merlon, EVT_FLOAT(4.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Merlon, 410, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Idle) - EVT_CALL(InterpNpcYaw, NPC_Merlon, 90, 0) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_DarkToad_01, ANIM_DarkToad_Red_Talk, ANIM_DarkToad_Red_Idle, 0, MSG_MAC_Plaza_0029) - EVT_CALL(SpeakToPlayer, NPC_DarkToad_02, ANIM_DarkToad_Black_Talk, ANIM_DarkToad_Black_Idle, 0, MSG_MAC_Plaza_002A) - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_Merlon, LVar0, LVar1, LVar2) - EVT_IF_GE(LVar0, 410) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(4.0), 410, 0, 0, 320, 15, -6) - EVT_THREAD - EVT_WAIT(5 * DT) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PlayerMoveTo, 460, 0, 0) - EVT_CALL(PlayerFaceNpc, NPC_Merlon, FALSE) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Idle) - EVT_CALL(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_002B) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 480, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_WAIT(5 * DT) - EVT_CALL(PlayerFaceNpc, NPC_DarkToad_01, FALSE) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_DarkToad_03, ANIM_DarkToad_Yellow_Dismiss, ANIM_DarkToad_Yellow_Idle, 0, MSG_MAC_Plaza_002C) - EVT_CALL(SpeakToPlayer, NPC_DarkToad_04, ANIM_DarkToad_Green_Dismiss, ANIM_DarkToad_Green_Idle, 0, MSG_MAC_Plaza_002D) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 410, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_WAIT(5 * DT) - EVT_CALL(PlayerFaceNpc, NPC_Merlon, FALSE) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_002E) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0 / DT)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlaySoundAtNpc, NPC_Merlon, SOUND_MERLON_GATHER, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Gather1) - EVT_CALL(GetNpcPos, NPC_Merlon, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 12, LVar0, LVar1, LVar2, 1, 50) - EVT_WAIT(60 * DT) - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_RaiseArms) - EVT_WAIT(5 * DT) - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 6, LVar0, LVar1, LVar2, 1, 20) - EVT_ADD(LVar1, 180) - EVT_CALL(PlayerFaceNpc, NPC_DarkToad_01, FALSE) - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(4.0 / DT), 480, 0, 0, 320, 15, -6) - EVT_CALL(PushSong, SONG_KOOPA_BROS_THEME, 0) - EVT_THREAD - EVT_SET(MF_KoopaBrosSceneLock, FALSE) - EVT_WAIT(5) - EVT_CALL(SpeakToPlayer, NPC_KoopaBros_01, ANIM_KoopaBros_Red_Hurt, ANIM_KoopaBros_Red_Hurt, 5, MSG_MAC_Plaza_002F) - EVT_SET(MF_KoopaBrosSceneLock, TRUE) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_DarkToad_01, SOUND_MERLON_STRIKE, SOUND_SPACE_DEFAULT) - EVT_CALL(GetNpcPos, NPC_DarkToad_01, LVar3, LVar4, LVar5) - EVT_ADD(LVar5, 5) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 2, 20) - EVT_PLAY_EFFECT(EFFECT_SHIMMER_BURST, 1, LVar3, LVar4, LVar5, 1, 30) - EVT_CALL(SetNpcAnimation, NPC_DarkToad_01, ANIM_DarkToad_Red_Hurt) - EVT_WAIT(5 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_DarkToad_01, SOUND_DARK_TOAD_DISPEL, SOUND_SPACE_DEFAULT) - EVT_CALL(GetNpcPos, NPC_DarkToad_01, LVar3, LVar4, LVar5) - EVT_CALL(SetNpcPos, NPC_DarkToad_01, LVar3, NPC_DISPOSE_POS_Y, LVar2) - EVT_CALL(SetNpcPos, NPC_KoopaBros_01, LVar3, LVar4, LVar5) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBros_01, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Red_Hurt) - EVT_CALL(NpcJump0, NPC_KoopaBros_01, LVar3, LVar4, LVar5, 10 * DT) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_DarkToad_01, SOUND_MERLON_STRIKE, SOUND_SPACE_DEFAULT) - EVT_CALL(GetNpcPos, NPC_DarkToad_02, LVar3, LVar4, LVar5) - EVT_ADD(LVar5, 5) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 2, 20) - EVT_PLAY_EFFECT(EFFECT_SHIMMER_BURST, 1, LVar3, LVar4, LVar5, 1, 30) - EVT_CALL(SetNpcAnimation, NPC_DarkToad_02, ANIM_DarkToad_Black_Hurt) - EVT_WAIT(5 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_DarkToad_02, SOUND_DARK_TOAD_DISPEL, SOUND_SPACE_DEFAULT) - EVT_CALL(GetNpcPos, NPC_DarkToad_02, LVar3, LVar4, LVar5) - EVT_CALL(SetNpcPos, NPC_DarkToad_02, LVar3, NPC_DISPOSE_POS_Y, LVar2) - EVT_CALL(SetNpcPos, NPC_KoopaBros_02, LVar3, LVar4, LVar5) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBros_02, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Black_Hurt) - EVT_CALL(NpcJump0, NPC_KoopaBros_02, LVar3, LVar4, LVar5, 10 * DT) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_DarkToad_01, SOUND_MERLON_STRIKE, SOUND_SPACE_DEFAULT) - EVT_CALL(GetNpcPos, NPC_DarkToad_03, LVar3, LVar4, LVar5) - EVT_ADD(LVar5, 5) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 2, 20) - EVT_PLAY_EFFECT(EFFECT_SHIMMER_BURST, 1, LVar3, LVar4, LVar5, 1, 30) - EVT_CALL(SetNpcAnimation, NPC_DarkToad_03, ANIM_DarkToad_Yellow_Hurt) - EVT_WAIT(5 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_DarkToad_03, SOUND_DARK_TOAD_DISPEL, SOUND_SPACE_DEFAULT) - EVT_CALL(GetNpcPos, NPC_DarkToad_03, LVar3, LVar4, LVar5) - EVT_CALL(SetNpcPos, NPC_DarkToad_03, LVar3, NPC_DISPOSE_POS_Y, LVar2) - EVT_CALL(SetNpcPos, NPC_KoopaBros_03, LVar3, LVar4, LVar5) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBros_03, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_03, ANIM_KoopaBros_Yellow_Hurt) - EVT_CALL(NpcJump0, NPC_KoopaBros_03, LVar3, LVar4, LVar5, 10 * DT) - EVT_END_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_DarkToad_01, SOUND_MERLON_STRIKE, SOUND_SPACE_DEFAULT) - EVT_CALL(GetNpcPos, NPC_DarkToad_04, LVar3, LVar4, LVar5) - EVT_ADD(LVar5, 5) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 2, 20) - EVT_PLAY_EFFECT(EFFECT_SHIMMER_BURST, 1, LVar3, LVar4, LVar5, 1, 30) - EVT_CALL(SetNpcAnimation, NPC_DarkToad_04, ANIM_DarkToad_Green_Hurt) - EVT_WAIT(5 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_DarkToad_04, SOUND_DARK_TOAD_DISPEL, SOUND_SPACE_DEFAULT) - EVT_CALL(GetNpcPos, NPC_DarkToad_04, LVar3, LVar4, LVar5) - EVT_CALL(SetNpcPos, NPC_DarkToad_04, LVar3, NPC_DISPOSE_POS_Y, LVar2) - EVT_CALL(SetNpcPos, NPC_KoopaBros_04, LVar3, LVar4, LVar5) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBros_04, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_04, ANIM_KoopaBros_Green_Hurt) - EVT_CALL(NpcJump0, NPC_KoopaBros_04, LVar3, LVar4, LVar5, 10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Idle) - EVT_LOOP(0) - EVT_IF_EQ(MF_KoopaBrosSceneLock, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Red_Idle) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Black_Idle) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_03, ANIM_KoopaBros_Yellow_Idle) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_04, ANIM_KoopaBros_Green_Idle) - EVT_CALL(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0030) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_KoopaBros_01, ANIM_KoopaBros_Red_Talk, ANIM_KoopaBros_Red_Idle, 0, MSG_MAC_Plaza_0031) - EVT_CALL(InterpNpcYaw, NPC_KoopaBros_01, 90, 0) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_KoopaBros_01, ANIM_KoopaBros_Red_Talk, ANIM_KoopaBros_Red_Idle, 5, MSG_MAC_Plaza_0032) - EVT_CALL(InterpNpcYaw, NPC_KoopaBros_01, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_KoopaBros_02, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_KoopaBros_03, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_KoopaBros_04, 90, 0) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Red_Run) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Black_Run) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_03, ANIM_KoopaBros_Yellow_Run) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_04, ANIM_KoopaBros_Green_Run) - EVT_WAIT(15 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaBros_03, SOUND_RUN_AWAY, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_CALL(SetNpcSpeed, NPC_KoopaBros_01, EVT_FLOAT(8.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_KoopaBros_01, 700, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcSpeed, NPC_KoopaBros_02, EVT_FLOAT(8.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_KoopaBros_02, 700, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcSpeed, NPC_KoopaBros_03, EVT_FLOAT(8.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_KoopaBros_03, 700, 0, 0) - EVT_END_THREAD - EVT_WAIT(1) - EVT_CALL(SetNpcSpeed, NPC_KoopaBros_04, EVT_FLOAT(8.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_KoopaBros_04, 700, 0, 0) - EVT_WAIT(10 * DT) - EVT_CALL(PopSong) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 410, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(PlayerFaceNpc, NPC_Merlon, FALSE) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0033) - EVT_CALL(SetNpcSpeed, NPC_Merlon, EVT_FLOAT(3.0 / DT)) - EVT_CALL(GetNpcPos, NPC_Merlon, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar0) - EVT_ADD(LVar3, -50) - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Walk) - EVT_CALL(NpcMoveTo, NPC_Merlon, LVar3, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Walk) - EVT_CALL(NpcMoveTo, NPC_Merlon, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Idle) - EVT_CALL(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0034) - EVT_THREAD - EVT_WAIT(10 * DT) + Call(SetNpcVar, NPC_Merlon, 0, 0) + Call(func_802CF56C, 2) + Thread + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Walk) + Call(SetNpcSpeed, NPC_Merlon, Float(4.0 / DT)) + Call(NpcMoveTo, NPC_Merlon, 410, 0, 0) + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Idle) + Call(InterpNpcYaw, NPC_Merlon, 90, 0) + EndThread + Call(SpeakToPlayer, NPC_DarkToad_01, ANIM_DarkToad_Red_Talk, ANIM_DarkToad_Red_Idle, 0, MSG_MAC_Plaza_0029) + Call(SpeakToPlayer, NPC_DarkToad_02, ANIM_DarkToad_Black_Talk, ANIM_DarkToad_Black_Idle, 0, MSG_MAC_Plaza_002A) + Loop(0) + Call(GetNpcPos, NPC_Merlon, LVar0, LVar1, LVar2) + IfGe(LVar0, 410) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetCamProperties, CAM_DEFAULT, Float(4.0), 410, 0, 0, 320, 15, -6) + Thread + Wait(5 * DT) + Call(SetPlayerSpeed, Float(3.0 / DT)) + Call(PlayerMoveTo, 460, 0, 0) + Call(PlayerFaceNpc, NPC_Merlon, FALSE) + EndThread + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Idle) + Call(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_002B) + Call(SetPanTarget, CAM_DEFAULT, 480, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Wait(5 * DT) + Call(PlayerFaceNpc, NPC_DarkToad_01, FALSE) + EndThread + Call(SpeakToPlayer, NPC_DarkToad_03, ANIM_DarkToad_Yellow_Dismiss, ANIM_DarkToad_Yellow_Idle, 0, MSG_MAC_Plaza_002C) + Call(SpeakToPlayer, NPC_DarkToad_04, ANIM_DarkToad_Green_Dismiss, ANIM_DarkToad_Green_Idle, 0, MSG_MAC_Plaza_002D) + Call(SetPanTarget, CAM_DEFAULT, 410, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Wait(5 * DT) + Call(PlayerFaceNpc, NPC_Merlon, FALSE) + EndThread + Call(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_002E) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0 / DT)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlaySoundAtNpc, NPC_Merlon, SOUND_MERLON_GATHER, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Gather1) + Call(GetNpcPos, NPC_Merlon, LVar0, LVar1, LVar2) + Add(LVar1, 10) + PlayEffect(EFFECT_RADIAL_SHIMMER, 12, LVar0, LVar1, LVar2, 1, 50) + Wait(60 * DT) + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_RaiseArms) + Wait(5 * DT) + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 6, LVar0, LVar1, LVar2, 1, 20) + Add(LVar1, 180) + Call(PlayerFaceNpc, NPC_DarkToad_01, FALSE) + Call(SetCamProperties, CAM_DEFAULT, Float(4.0 / DT), 480, 0, 0, 320, 15, -6) + Call(PushSong, SONG_KOOPA_BROS_THEME, 0) + Thread + Set(MF_KoopaBrosSceneLock, FALSE) + Wait(5) + Call(SpeakToPlayer, NPC_KoopaBros_01, ANIM_KoopaBros_Red_Hurt, ANIM_KoopaBros_Red_Hurt, 5, MSG_MAC_Plaza_002F) + Set(MF_KoopaBrosSceneLock, TRUE) + EndThread + Thread + Call(PlaySoundAtNpc, NPC_DarkToad_01, SOUND_MERLON_STRIKE, SOUND_SPACE_DEFAULT) + Call(GetNpcPos, NPC_DarkToad_01, LVar3, LVar4, LVar5) + Add(LVar5, 5) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 2, 20) + PlayEffect(EFFECT_SHIMMER_BURST, 1, LVar3, LVar4, LVar5, 1, 30) + Call(SetNpcAnimation, NPC_DarkToad_01, ANIM_DarkToad_Red_Hurt) + Wait(5 * DT) + Call(PlaySoundAtNpc, NPC_DarkToad_01, SOUND_DARK_TOAD_DISPEL, SOUND_SPACE_DEFAULT) + Call(GetNpcPos, NPC_DarkToad_01, LVar3, LVar4, LVar5) + Call(SetNpcPos, NPC_DarkToad_01, LVar3, NPC_DISPOSE_POS_Y, LVar2) + Call(SetNpcPos, NPC_KoopaBros_01, LVar3, LVar4, LVar5) + Call(SetNpcJumpscale, NPC_KoopaBros_01, Float(1.0)) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Red_Hurt) + Call(NpcJump0, NPC_KoopaBros_01, LVar3, LVar4, LVar5, 10 * DT) + EndThread + Thread + Wait(10 * DT) + Call(PlaySoundAtNpc, NPC_DarkToad_01, SOUND_MERLON_STRIKE, SOUND_SPACE_DEFAULT) + Call(GetNpcPos, NPC_DarkToad_02, LVar3, LVar4, LVar5) + Add(LVar5, 5) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 2, 20) + PlayEffect(EFFECT_SHIMMER_BURST, 1, LVar3, LVar4, LVar5, 1, 30) + Call(SetNpcAnimation, NPC_DarkToad_02, ANIM_DarkToad_Black_Hurt) + Wait(5 * DT) + Call(PlaySoundAtNpc, NPC_DarkToad_02, SOUND_DARK_TOAD_DISPEL, SOUND_SPACE_DEFAULT) + Call(GetNpcPos, NPC_DarkToad_02, LVar3, LVar4, LVar5) + Call(SetNpcPos, NPC_DarkToad_02, LVar3, NPC_DISPOSE_POS_Y, LVar2) + Call(SetNpcPos, NPC_KoopaBros_02, LVar3, LVar4, LVar5) + Call(SetNpcJumpscale, NPC_KoopaBros_02, Float(1.0)) + Call(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Black_Hurt) + Call(NpcJump0, NPC_KoopaBros_02, LVar3, LVar4, LVar5, 10 * DT) + EndThread + Thread + Wait(20 * DT) + Call(PlaySoundAtNpc, NPC_DarkToad_01, SOUND_MERLON_STRIKE, SOUND_SPACE_DEFAULT) + Call(GetNpcPos, NPC_DarkToad_03, LVar3, LVar4, LVar5) + Add(LVar5, 5) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 2, 20) + PlayEffect(EFFECT_SHIMMER_BURST, 1, LVar3, LVar4, LVar5, 1, 30) + Call(SetNpcAnimation, NPC_DarkToad_03, ANIM_DarkToad_Yellow_Hurt) + Wait(5 * DT) + Call(PlaySoundAtNpc, NPC_DarkToad_03, SOUND_DARK_TOAD_DISPEL, SOUND_SPACE_DEFAULT) + Call(GetNpcPos, NPC_DarkToad_03, LVar3, LVar4, LVar5) + Call(SetNpcPos, NPC_DarkToad_03, LVar3, NPC_DISPOSE_POS_Y, LVar2) + Call(SetNpcPos, NPC_KoopaBros_03, LVar3, LVar4, LVar5) + Call(SetNpcJumpscale, NPC_KoopaBros_03, Float(1.0)) + Call(SetNpcAnimation, NPC_KoopaBros_03, ANIM_KoopaBros_Yellow_Hurt) + Call(NpcJump0, NPC_KoopaBros_03, LVar3, LVar4, LVar5, 10 * DT) + EndThread + Wait(30 * DT) + Call(PlaySoundAtNpc, NPC_DarkToad_01, SOUND_MERLON_STRIKE, SOUND_SPACE_DEFAULT) + Call(GetNpcPos, NPC_DarkToad_04, LVar3, LVar4, LVar5) + Add(LVar5, 5) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, 2, 20) + PlayEffect(EFFECT_SHIMMER_BURST, 1, LVar3, LVar4, LVar5, 1, 30) + Call(SetNpcAnimation, NPC_DarkToad_04, ANIM_DarkToad_Green_Hurt) + Wait(5 * DT) + Call(PlaySoundAtNpc, NPC_DarkToad_04, SOUND_DARK_TOAD_DISPEL, SOUND_SPACE_DEFAULT) + Call(GetNpcPos, NPC_DarkToad_04, LVar3, LVar4, LVar5) + Call(SetNpcPos, NPC_DarkToad_04, LVar3, NPC_DISPOSE_POS_Y, LVar2) + Call(SetNpcPos, NPC_KoopaBros_04, LVar3, LVar4, LVar5) + Call(SetNpcJumpscale, NPC_KoopaBros_04, Float(1.0)) + Call(SetNpcAnimation, NPC_KoopaBros_04, ANIM_KoopaBros_Green_Hurt) + Call(NpcJump0, NPC_KoopaBros_04, LVar3, LVar4, LVar5, 10 * DT) + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Idle) + Loop(0) + IfEq(MF_KoopaBrosSceneLock, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Red_Idle) + Call(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Black_Idle) + Call(SetNpcAnimation, NPC_KoopaBros_03, ANIM_KoopaBros_Yellow_Idle) + Call(SetNpcAnimation, NPC_KoopaBros_04, ANIM_KoopaBros_Green_Idle) + Call(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0030) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_KoopaBros_01, ANIM_KoopaBros_Red_Talk, ANIM_KoopaBros_Red_Idle, 0, MSG_MAC_Plaza_0031) + Call(InterpNpcYaw, NPC_KoopaBros_01, 90, 0) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_KoopaBros_01, ANIM_KoopaBros_Red_Talk, ANIM_KoopaBros_Red_Idle, 5, MSG_MAC_Plaza_0032) + Call(InterpNpcYaw, NPC_KoopaBros_01, 90, 0) + Call(InterpNpcYaw, NPC_KoopaBros_02, 90, 0) + Call(InterpNpcYaw, NPC_KoopaBros_03, 90, 0) + Call(InterpNpcYaw, NPC_KoopaBros_04, 90, 0) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Red_Run) + Call(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Black_Run) + Call(SetNpcAnimation, NPC_KoopaBros_03, ANIM_KoopaBros_Yellow_Run) + Call(SetNpcAnimation, NPC_KoopaBros_04, ANIM_KoopaBros_Green_Run) + Wait(15 * DT) + Call(PlaySoundAtNpc, NPC_KoopaBros_03, SOUND_RUN_AWAY, SOUND_SPACE_DEFAULT) + Thread + Call(SetNpcSpeed, NPC_KoopaBros_01, Float(8.0 / DT)) + Call(NpcMoveTo, NPC_KoopaBros_01, 700, 0, 0) + EndThread + Thread + Call(SetNpcSpeed, NPC_KoopaBros_02, Float(8.0 / DT)) + Call(NpcMoveTo, NPC_KoopaBros_02, 700, 0, 0) + EndThread + Thread + Call(SetNpcSpeed, NPC_KoopaBros_03, Float(8.0 / DT)) + Call(NpcMoveTo, NPC_KoopaBros_03, 700, 0, 0) + EndThread + Wait(1) + Call(SetNpcSpeed, NPC_KoopaBros_04, Float(8.0 / DT)) + Call(NpcMoveTo, NPC_KoopaBros_04, 700, 0, 0) + Wait(10 * DT) + Call(PopSong) + Call(SetPanTarget, CAM_DEFAULT, 410, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Wait(3) + Call(PlayerFaceNpc, NPC_Merlon, FALSE) + EndThread + Call(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0033) + Call(SetNpcSpeed, NPC_Merlon, Float(3.0 / DT)) + Call(GetNpcPos, NPC_Merlon, LVar0, LVar1, LVar2) + Set(LVar3, LVar0) + Add(LVar3, -50) + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Walk) + Call(NpcMoveTo, NPC_Merlon, LVar3, LVar2, 0) + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Idle) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Walk) + Call(NpcMoveTo, NPC_Merlon, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Idle) + Call(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0034) + Thread + Wait(10 * DT) #if VERSION_PAL - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(1.6669921875)) + Call(ResetCam, CAM_DEFAULT, Float(1.6669921875)) #else - EVT_CALL(ResetCam, CAM_DEFAULT, 2) + Call(ResetCam, CAM_DEFAULT, 2) #endif - EVT_END_THREAD - EVT_CALL(GetNpcPos, NPC_Merlon, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -150) - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Walk) - EVT_CALL(NpcMoveTo, NPC_Merlon, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Idle) - EVT_CALL(InterpNpcYaw, NPC_Merlon, 133, 0) - EVT_CALL(SetNpcPos, NPC_Merlon, -337, 20, -360) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o335, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o336, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GB_StoryProgress, STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) - EVT_SET(AF_MAC_0E, FALSE) - EVT_SET(AF_MAC_0F, FALSE) - EVT_SET(AF_MAC_10, FALSE) - EVT_SET(AF_MAC_11, FALSE) - EVT_SET(AF_MAC_12, FALSE) - EVT_SET(AF_MAC_13, FALSE) - EVT_SET(AF_MAC_14, FALSE) - EVT_CALL(RemoveEncounter, NPC_KoopaBros_01) - EVT_RETURN - EVT_END + EndThread + Call(GetNpcPos, NPC_Merlon, LVar0, LVar1, LVar2) + Add(LVar0, -150) + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Walk) + Call(NpcMoveTo, NPC_Merlon, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Idle) + Call(InterpNpcYaw, NPC_Merlon, 133, 0) + Call(SetNpcPos, NPC_Merlon, -337, 20, -360) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o335, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o336, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt, COLLIDER_FLAGS_UPPER_MASK) + Set(GB_StoryProgress, STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) + Set(AF_MAC_0E, FALSE) + Set(AF_MAC_0F, FALSE) + Set(AF_MAC_10, FALSE) + Set(AF_MAC_11, FALSE) + Set(AF_MAC_12, FALSE) + Set(AF_MAC_13, FALSE) + Set(AF_MAC_14, FALSE) + Call(RemoveEncounter, NPC_KoopaBros_01) + Return + End }; EvtScript N(EVS_NpcInteract_Merlon) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH1_TOLD_MERLIN_ABOUT_DARK_TOADS) - EVT_IF_EQ(GF_MAC01_Merlon_HintFromDarkToads, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 16, MSG_MAC_Plaza_0026) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0027) - EVT_SET(GB_StoryProgress, STORY_CH1_TOLD_MERLIN_ABOUT_DARK_TOADS) - EVT_CHILD_THREAD - EVT_LOOP(0) - EVT_CALL(PlayerFaceNpc, NPC_Merlon, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Merlon, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Walk) - EVT_CALL(SetNpcSpeed, NPC_Merlon, EVT_FLOAT(4.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Merlon, -350, -280, 0) - EVT_CALL(NpcMoveTo, NPC_Merlon, -230, -270, 0) - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Idle) - EVT_CALL(SetNpcFlagBits, NPC_Merlon, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitud, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, -80, 15, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_door, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Walk) - EVT_CALL(NpcMoveTo, NPC_Merlon, -163, -217, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o336, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o335, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(MakeLerp, -80, 0, 15, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_door, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitud, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcPos, NPC_SELF, -150, 10, -160) - EVT_CALL(SetNpcYaw, NPC_Merlon, 90) - EVT_EXEC(N(D_80250D14_811594)) - EVT_END_IF - EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 16, MSG_MAC_Plaza_0028) - EVT_CASE_LT(STORY_CH1_KOOPER_JOINED_PARTY) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 16, MSG_MAC_Plaza_0035) - EVT_CASE_EQ(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_CALL(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 16, MSG_MAC_Plaza_004C) - EVT_CASE_GE(STORY_CH3_GOT_SUPER_BOOTS) - EVT_IF_EQ(GF_MAC01_Merlon_HeardAboutDream, FALSE) - EVT_SET(LVar0, MSG_MAC_Plaza_003E) - EVT_IF_GE(GB_StoryProgress, STORY_CH4_FRYING_PAN_STOLEN) - EVT_IF_LT(GB_StoryProgress, STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Plaza_003D) - EVT_END_IF - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, LVar0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Merlon, LVar3, LVar4, LVar5) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_ADDF(LVar0, LVar3) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_DIVF(LVar0, EVT_FLOAT(2.0)) - EVT_DIVF(LVar1, EVT_FLOAT(2.0)) - EVT_DIVF(LVar2, EVT_FLOAT(2.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_003F) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(PlayerFaceNpc, NPC_Merlon, FALSE) - EVT_IF_EQ(GF_MAC01_Merlon_HeardAboutDream, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Merlon, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Walk) - EVT_CALL(SetNpcSpeed, NPC_Merlon, EVT_FLOAT(3.0)) - EVT_CALL(NpcMoveTo, NPC_Merlon, -170, -225, 0) - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Idle) - EVT_CALL(SetGroupVisibility, MODEL_dr_in, MODEL_GROUP_VISIBLE) - EVT_EXEC_WAIT(N(D_8024E740_80EFC0)) - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Walk) - EVT_CALL(SetNpcSpeed, NPC_Merlon, EVT_FLOAT(3.0)) - EVT_CALL(NpcMoveTo, NPC_Merlon, -265, -300, 0) - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Idle) - EVT_EXEC_WAIT(N(D_8024E7F0_80F070)) - EVT_CALL(SetGroupVisibility, MODEL_dr_in, MODEL_GROUP_HIDDEN) - EVT_SET(GF_MAC01_Merlon_HeardAboutDream, TRUE) - EVT_CALL(InterpNpcYaw, NPC_Merlon, 133, 0) - EVT_CALL(SetNpcPos, NPC_Merlon, -337, 20, -360) - EVT_CALL(SetNpcFlagBits, NPC_Merlon, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o335, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o336, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_RETURN - EVT_ELSE - EVT_IF_EQ(GF_MAC01_QuickChangeDropped, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 16, MSG_MAC_Plaza_0040) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 16, MSG_MAC_Plaza_003B) - EVT_END_IF - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 16, MSG_MAC_Plaza_003B) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_LetterPrompt_Merlon)) - EVT_EXEC_WAIT(N(EVS_LetterReward_Merlon)) - EVT_IF_NE(LVarC, 0) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH1_TOLD_MERLIN_ABOUT_DARK_TOADS) + IfEq(GF_MAC01_Merlon_HintFromDarkToads, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 16, MSG_MAC_Plaza_0026) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0027) + Set(GB_StoryProgress, STORY_CH1_TOLD_MERLIN_ABOUT_DARK_TOADS) + ChildThread + Loop(0) + Call(PlayerFaceNpc, NPC_Merlon, FALSE) + Wait(1) + EndLoop + EndChildThread + Call(SetNpcFlagBits, NPC_Merlon, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Walk) + Call(SetNpcSpeed, NPC_Merlon, Float(4.0 / DT)) + Call(NpcMoveTo, NPC_Merlon, -350, -280, 0) + Call(NpcMoveTo, NPC_Merlon, -230, -270, 0) + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Idle) + Call(SetNpcFlagBits, NPC_Merlon, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(PlaySoundAtCollider, COLLIDER_deilitud, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, -80, 15, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_door, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Walk) + Call(NpcMoveTo, NPC_Merlon, -163, -217, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o336, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o335, COLLIDER_FLAGS_UPPER_MASK) + Call(MakeLerp, -80, 0, 15, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_door, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_deilitud, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Call(SetNpcPos, NPC_SELF, -150, 10, -160) + Call(SetNpcYaw, NPC_Merlon, 90) + Exec(N(D_80250D14_811594)) + EndIf + CaseLt(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) + Call(SpeakToPlayer, NPC_SELF, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 16, MSG_MAC_Plaza_0028) + CaseLt(STORY_CH1_KOOPER_JOINED_PARTY) + Call(SpeakToPlayer, NPC_SELF, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 16, MSG_MAC_Plaza_0035) + CaseEq(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Call(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 16, MSG_MAC_Plaza_004C) + CaseGe(STORY_CH3_GOT_SUPER_BOOTS) + IfEq(GF_MAC01_Merlon_HeardAboutDream, FALSE) + Set(LVar0, MSG_MAC_Plaza_003E) + IfGe(GB_StoryProgress, STORY_CH4_FRYING_PAN_STOLEN) + IfLt(GB_StoryProgress, STORY_CH4_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Plaza_003D) + EndIf + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, LVar0) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Merlon, LVar3, LVar4, LVar5) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + AddF(LVar0, LVar3) + AddF(LVar1, LVar4) + AddF(LVar2, LVar5) + DivF(LVar0, Float(2.0)) + DivF(LVar1, Float(2.0)) + DivF(LVar2, Float(2.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_003F) + Thread + Loop(0) + Call(PlayerFaceNpc, NPC_Merlon, FALSE) + IfEq(GF_MAC01_Merlon_HeardAboutDream, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + EndThread + Call(SetNpcFlagBits, NPC_Merlon, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Walk) + Call(SetNpcSpeed, NPC_Merlon, Float(3.0)) + Call(NpcMoveTo, NPC_Merlon, -170, -225, 0) + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Idle) + Call(SetGroupVisibility, MODEL_dr_in, MODEL_GROUP_VISIBLE) + ExecWait(N(D_8024E740_80EFC0)) + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Walk) + Call(SetNpcSpeed, NPC_Merlon, Float(3.0)) + Call(NpcMoveTo, NPC_Merlon, -265, -300, 0) + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Idle) + ExecWait(N(D_8024E7F0_80F070)) + Call(SetGroupVisibility, MODEL_dr_in, MODEL_GROUP_HIDDEN) + Set(GF_MAC01_Merlon_HeardAboutDream, TRUE) + Call(InterpNpcYaw, NPC_Merlon, 133, 0) + Call(SetNpcPos, NPC_Merlon, -337, 20, -360) + Call(SetNpcFlagBits, NPC_Merlon, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o335, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o336, COLLIDER_FLAGS_UPPER_MASK) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Return + Else + IfEq(GF_MAC01_QuickChangeDropped, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 16, MSG_MAC_Plaza_0040) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 16, MSG_MAC_Plaza_003B) + EndIf + EndIf + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 16, MSG_MAC_Plaza_003B) + EndSwitch + ExecWait(N(EVS_LetterPrompt_Merlon)) + ExecWait(N(EVS_LetterReward_Merlon)) + IfNe(LVarC, 0) + Return + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Merlon) = { - EVT_CALL(InterpNpcYaw, NPC_SELF, 133, 1) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_CH1_TOLD_MERLIN_ABOUT_DARK_TOADS) - EVT_CALL(SetNpcPos, NPC_SELF, 410, 0, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o335, COLLIDER_FLAGS_UPPER_MASK) - EVT_CASE_RANGE(STORY_CH6_RETURNED_TO_TOAD_TOWN, STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o336, COLLIDER_FLAGS_UPPER_MASK) - EVT_CASE_GE(STORY_CH3_GOT_SUPER_BOOTS) - EVT_IF_EQ(GF_MAC01_Merlon_HeardAboutDream, FALSE) - EVT_CALL(SetNpcPos, NPC_Merlon, -135, 20, -250) - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Think) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o335, COLLIDER_FLAGS_UPPER_MASK) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o336, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o336, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_SWITCH - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Merlon))) - EVT_RETURN - EVT_END + Call(InterpNpcYaw, NPC_SELF, 133, 1) + Switch(GB_StoryProgress) + CaseEq(STORY_CH1_TOLD_MERLIN_ABOUT_DARK_TOADS) + Call(SetNpcPos, NPC_SELF, 410, 0, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o335, COLLIDER_FLAGS_UPPER_MASK) + CaseRange(STORY_CH6_RETURNED_TO_TOAD_TOWN, STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o336, COLLIDER_FLAGS_UPPER_MASK) + CaseGe(STORY_CH3_GOT_SUPER_BOOTS) + IfEq(GF_MAC01_Merlon_HeardAboutDream, FALSE) + Call(SetNpcPos, NPC_Merlon, -135, 20, -250) + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Think) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o335, COLLIDER_FLAGS_UPPER_MASK) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o336, COLLIDER_FLAGS_UPPER_MASK) + EndIf + CaseDefault + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o336, COLLIDER_FLAGS_UPPER_MASK) + EndSwitch + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Merlon))) + Return + End }; EvtScript N(EVS_NpcInteract_DarkToad_01) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS) - EVT_CALL(SpeakToPlayer, NPC_DarkToad_01, ANIM_DarkToad_Red_Talk, ANIM_DarkToad_Red_Idle, 0, MSG_MAC_Plaza_004D) - EVT_CALL(SpeakToPlayer, NPC_DarkToad_02, ANIM_DarkToad_Black_Talk, ANIM_DarkToad_Black_Idle, 0, MSG_MAC_Plaza_004E) - EVT_CALL(SpeakToPlayer, NPC_DarkToad_03, ANIM_DarkToad_Yellow_Talk, ANIM_DarkToad_Yellow_Idle, 0, MSG_MAC_Plaza_004F) - EVT_CALL(SpeakToPlayer, NPC_DarkToad_04, ANIM_DarkToad_Green_Talk, ANIM_DarkToad_Green_Idle, 0, MSG_MAC_Plaza_0050) - EVT_CASE_LT(STORY_CH1_TOLD_MERLIN_ABOUT_DARK_TOADS) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4.0 / DT), 0, 300, EVT_FLOAT(15.0), EVT_FLOAT(-7.5)) - EVT_CALL(SpeakToPlayer, NPC_DarkToad_01, ANIM_DarkToad_Red_Talk, ANIM_DarkToad_Red_Idle, 0, MSG_MAC_Plaza_0051) - EVT_CALL(SpeakToPlayer, NPC_DarkToad_02, ANIM_DarkToad_Black_Talk, ANIM_DarkToad_Black_Idle, 0, MSG_MAC_Plaza_0052) - EVT_CALL(SpeakToPlayer, NPC_DarkToad_03, ANIM_DarkToad_Yellow_Talk, ANIM_DarkToad_Yellow_Idle, 0, MSG_MAC_Plaza_0053) - EVT_CALL(SpeakToPlayer, NPC_DarkToad_04, ANIM_DarkToad_Green_Talk, ANIM_DarkToad_Green_Idle, 0, MSG_MAC_Plaza_0054) - EVT_SET(GF_MAC01_Merlon_HintFromDarkToads, TRUE) + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_MET_STAR_SPIRITS) + Call(SpeakToPlayer, NPC_DarkToad_01, ANIM_DarkToad_Red_Talk, ANIM_DarkToad_Red_Idle, 0, MSG_MAC_Plaza_004D) + Call(SpeakToPlayer, NPC_DarkToad_02, ANIM_DarkToad_Black_Talk, ANIM_DarkToad_Black_Idle, 0, MSG_MAC_Plaza_004E) + Call(SpeakToPlayer, NPC_DarkToad_03, ANIM_DarkToad_Yellow_Talk, ANIM_DarkToad_Yellow_Idle, 0, MSG_MAC_Plaza_004F) + Call(SpeakToPlayer, NPC_DarkToad_04, ANIM_DarkToad_Green_Talk, ANIM_DarkToad_Green_Idle, 0, MSG_MAC_Plaza_0050) + CaseLt(STORY_CH1_TOLD_MERLIN_ABOUT_DARK_TOADS) + Call(AdjustCam, CAM_DEFAULT, Float(4.0 / DT), 0, 300, Float(15.0), Float(-7.5)) + Call(SpeakToPlayer, NPC_DarkToad_01, ANIM_DarkToad_Red_Talk, ANIM_DarkToad_Red_Idle, 0, MSG_MAC_Plaza_0051) + Call(SpeakToPlayer, NPC_DarkToad_02, ANIM_DarkToad_Black_Talk, ANIM_DarkToad_Black_Idle, 0, MSG_MAC_Plaza_0052) + Call(SpeakToPlayer, NPC_DarkToad_03, ANIM_DarkToad_Yellow_Talk, ANIM_DarkToad_Yellow_Idle, 0, MSG_MAC_Plaza_0053) + Call(SpeakToPlayer, NPC_DarkToad_04, ANIM_DarkToad_Green_Talk, ANIM_DarkToad_Green_Idle, 0, MSG_MAC_Plaza_0054) + Set(GF_MAC01_Merlon_HintFromDarkToads, TRUE) #if VERSION_PAL - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5.0 / DT)) + Call(ResetCam, CAM_DEFAULT, Float(5.0 / DT)) #else - EVT_CALL(ResetCam, CAM_DEFAULT, 5) + Call(ResetCam, CAM_DEFAULT, 5) #endif - EVT_END_SWITCH - EVT_RETURN - EVT_END + EndSwitch + Return + End }; EvtScript N(EVS_NpcIdle_DarkToad_01) = { - EVT_LOOP(0) - EVT_IF_GE(GB_StoryProgress, STORY_CH1_TOLD_MERLIN_ABOUT_DARK_TOADS) - EVT_SET(LVar0, 0) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_SWITCH(LVar1) - EVT_CASE_GE(460) - EVT_ADD(LVar0, 1) - EVT_END_SWITCH - EVT_SWITCH(LVar3) - EVT_CASE_RANGE(-50, 70) - EVT_ADD(LVar0, 1) - EVT_END_SWITCH - EVT_IF_EQ(LVar0, 2) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(0) - EVT_CALL(PartnerCanUseAbility, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC_WAIT(N(EVS_Scene_KoopaBrosUnmasked)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Loop(0) + IfGe(GB_StoryProgress, STORY_CH1_TOLD_MERLIN_ABOUT_DARK_TOADS) + Set(LVar0, 0) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + Switch(LVar1) + CaseGe(460) + Add(LVar0, 1) + EndSwitch + Switch(LVar3) + CaseRange(-50, 70) + Add(LVar0, 1) + EndSwitch + IfEq(LVar0, 2) + BreakLoop + EndIf + EndIf + Wait(1) + EndLoop + Loop(0) + Call(PartnerCanUseAbility, LVar0) + IfEq(LVar0, FALSE) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(DisablePlayerInput, TRUE) + ExecWait(N(EVS_Scene_KoopaBrosUnmasked)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_DarkToad_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_DarkToad_01))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_DarkToad_01))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_DarkToad_01))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_DarkToad_01))) + Return + End }; EvtScript N(EVS_NpcInit_DarkToad_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_DarkToad_01))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_DarkToad_01))) + Return + End }; EvtScript N(EVS_Scene_MerlonAndNinji) = { - EVT_IF_NE(GB_StoryProgress, STORY_CH6_RETURNED_TO_TOAD_TOWN) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcPos, NPC_Ninji, -278, 20, -376) - EVT_CALL(SetNpcYaw, NPC_Ninji, 0) - EVT_WAIT(40) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PlayerMoveTo, -276, -305, 0) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0047) - EVT_CALL(NpcFacePlayer, NPC_Ninji, 5) - EVT_WAIT(15 * DT) - EVT_CALL(GetNpcPos, NPC_Ninji, LVar0, LVar1, LVar2) + IfNe(GB_StoryProgress, STORY_CH6_RETURNED_TO_TOAD_TOWN) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(SetNpcPos, NPC_Ninji, -278, 20, -376) + Call(SetNpcYaw, NPC_Ninji, 0) + Wait(40) + Call(SetPlayerSpeed, Float(3.0 / DT)) + Call(PlayerMoveTo, -276, -305, 0) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0047) + Call(NpcFacePlayer, NPC_Ninji, 5) + Wait(15 * DT) + Call(GetNpcPos, NPC_Ninji, LVar0, LVar1, LVar2) #if VERSION_PAL - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(4.0 / DT), LVar0, LVar1, LVar2, 250, 15, -9) + Call(SetCamProperties, CAM_DEFAULT, Float(4.0 / DT), LVar0, LVar1, LVar2, 250, 15, -9) #else - EVT_CALL(SetCamProperties, CAM_DEFAULT, 4, LVar0, LVar1, LVar2, 250, 15, -9) + Call(SetCamProperties, CAM_DEFAULT, 4, LVar0, LVar1, LVar2, 250, 15, -9) #endif - EVT_CALL(SpeakToPlayer, NPC_Ninji, ANIM_Ninji_Talk, ANIM_Ninji_Idle, 0, MSG_MAC_Plaza_0048) - EVT_CALL(GetNpcPos, NPC_Merlon, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0049) + Call(SpeakToPlayer, NPC_Ninji, ANIM_Ninji_Talk, ANIM_Ninji_Idle, 0, MSG_MAC_Plaza_0048) + Call(GetNpcPos, NPC_Merlon, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0049) #if VERSION_PAL - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5.0 / DT)) + Call(ResetCam, CAM_DEFAULT, Float(5.0 / DT)) #else - EVT_CALL(ResetCam, CAM_DEFAULT, 5) + Call(ResetCam, CAM_DEFAULT, 5) #endif - EVT_CALL(SpeakToPlayer, NPC_Ninji, ANIM_Ninji_Talk, ANIM_Ninji_Idle, 0, MSG_MAC_Plaza_004A) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Ninji, ANIM_Ninji_Walk) - EVT_CALL(NpcMoveTo, NPC_Ninji, -230, -260, 0) - EVT_CALL(NpcMoveTo, NPC_Ninji, -185, -194, 0) - EVT_CALL(SetNpcPos, NPC_Ninji, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(25 * DT) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitud, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 8) - EVT_CALL(RotateModel, MODEL_door, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(5 * DT) - EVT_LOOP(10) - EVT_ADD(LVar0, -8) - EVT_CALL(RotateModel, MODEL_door, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitud, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_004B) - EVT_SET(GB_StoryProgress, STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_Ninji, ANIM_Ninji_Talk, ANIM_Ninji_Idle, 0, MSG_MAC_Plaza_004A) + Thread + Call(SetNpcAnimation, NPC_Ninji, ANIM_Ninji_Walk) + Call(NpcMoveTo, NPC_Ninji, -230, -260, 0) + Call(NpcMoveTo, NPC_Ninji, -185, -194, 0) + Call(SetNpcPos, NPC_Ninji, NPC_DISPOSE_LOCATION) + EndThread + Thread + Wait(25 * DT) + Call(PlaySoundAtCollider, COLLIDER_deilitud, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 8) + Call(RotateModel, MODEL_door, LVar0, 0, -1, 0) + Wait(1) + EndLoop + Wait(5 * DT) + Loop(10) + Add(LVar0, -8) + Call(RotateModel, MODEL_door, LVar0, 0, -1, 0) + Wait(1) + EndLoop + Call(PlaySoundAtCollider, COLLIDER_deilitud, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + EndThread + Wait(20 * DT) + Call(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_004B) + Set(GB_StoryProgress, STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Call(DisablePlayerInput, FALSE) + Return + End }; NpcSettings N(NpcSettings_Merlon) = { @@ -1288,665 +1288,665 @@ BSS s32 D_80262F6C[13]; #include "npc/flower_gate.inc.c" EvtScript N(EVS_NpcIdle_Toad_04) = { - EVT_CALL(WaitForPlayerInputEnabled) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Toad_04, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MAC_Plaza_007D) - EVT_SET(GB_StoryProgress, STORY_CH0_RETURNED_TO_TOAD_TOWN) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(WaitForPlayerInputEnabled) + Call(DisablePlayerInput, TRUE) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 10 * DT) + Call(SpeakToPlayer, NPC_Toad_04, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MAC_Plaza_007D) + Set(GB_StoryProgress, STORY_CH0_RETURNED_TO_TOAD_TOWN) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_Toad_04) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS) - EVT_SET(LVar0, MSG_MAC_Plaza_007C) - EVT_CASE_LT(STORY_CH1_SPOKE_WITH_MERLIN) - EVT_SET(LVar0, MSG_MAC_Plaza_007D) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Plaza_007E) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Plaza_007F) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Plaza_0080) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Plaza_0081) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC01_MailbagStolen, FALSE) - EVT_SET(LVar0, MSG_MAC_Plaza_0082) - EVT_ELSE - EVT_IF_EQ(GF_MAC01_MailbagReturned, FALSE) - EVT_SET(LVar0, MSG_MAC_Plaza_0083) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Plaza_0084) - EVT_END_IF - EVT_END_IF - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Plaza_0085) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Plaza_0086) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Plaza_0087) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Plaza_0088) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Plaza_0089) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Plaza_008A) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Plaza_008B) - EVT_CASE_GE(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_Outro_0046) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_Toad_04, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_MET_STAR_SPIRITS) + Set(LVar0, MSG_MAC_Plaza_007C) + CaseLt(STORY_CH1_SPOKE_WITH_MERLIN) + Set(LVar0, MSG_MAC_Plaza_007D) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Plaza_007E) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Plaza_007F) + Else + Set(LVar0, MSG_MAC_Plaza_0080) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Plaza_0081) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC01_MailbagStolen, FALSE) + Set(LVar0, MSG_MAC_Plaza_0082) + Else + IfEq(GF_MAC01_MailbagReturned, FALSE) + Set(LVar0, MSG_MAC_Plaza_0083) + Else + Set(LVar0, MSG_MAC_Plaza_0084) + EndIf + EndIf + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Plaza_0085) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Plaza_0086) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Plaza_0087) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Plaza_0088) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Plaza_0089) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Plaza_008A) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Plaza_008B) + CaseGe(STORY_EPILOGUE) + Set(LVar0, MSG_Outro_0046) + EndSwitch + Call(SpeakToPlayer, NPC_Toad_04, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_Toad_04) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH0_TWINK_GAVE_LUCKY_STAR) - EVT_CALL(SetNpcPos, NPC_SELF, -25, 0, -500) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Toad_04))) - EVT_END_IF - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_04))) - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH0_TWINK_GAVE_LUCKY_STAR) + Call(SetNpcPos, NPC_SELF, -25, 0, -500) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Toad_04))) + EndIf + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_04))) + Return + End }; EvtScript N(EVS_NpcInteract_Toad_05) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS) - EVT_SET(LVar0, MSG_MAC_Plaza_008C) - EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) - EVT_SET(LVar0, MSG_MAC_Plaza_008D) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Plaza_008E) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Plaza_008F) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Plaza_0090) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Plaza_0091) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC01_MailbagStolen, FALSE) - EVT_SET(LVar0, MSG_MAC_Plaza_0092) - EVT_ELSE - EVT_IF_EQ(GF_MAC01_MailbagReturned, FALSE) - EVT_SET(LVar0, MSG_MAC_Plaza_0093) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Plaza_0094) - EVT_END_IF - EVT_END_IF - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Plaza_0095) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Plaza_0096) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Plaza_0097) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Plaza_0098) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Plaza_0099) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Plaza_009A) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Plaza_009B) - EVT_CASE_GE(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_Outro_0047) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_Toad_05, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_MET_STAR_SPIRITS) + Set(LVar0, MSG_MAC_Plaza_008C) + CaseLt(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) + Set(LVar0, MSG_MAC_Plaza_008D) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Plaza_008E) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Plaza_008F) + Else + Set(LVar0, MSG_MAC_Plaza_0090) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Plaza_0091) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC01_MailbagStolen, FALSE) + Set(LVar0, MSG_MAC_Plaza_0092) + Else + IfEq(GF_MAC01_MailbagReturned, FALSE) + Set(LVar0, MSG_MAC_Plaza_0093) + Else + Set(LVar0, MSG_MAC_Plaza_0094) + EndIf + EndIf + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Plaza_0095) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Plaza_0096) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Plaza_0097) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Plaza_0098) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Plaza_0099) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Plaza_009A) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Plaza_009B) + CaseGe(STORY_EPILOGUE) + Set(LVar0, MSG_Outro_0047) + EndSwitch + Call(SpeakToPlayer, NPC_Toad_05, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcIdle_Toad_05) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(D_8025AA78_81B2F8) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(NpcFacePlayer, NPC_Toad_05, 0) - EVT_WAIT(5) - EVT_CALL(SpeakToPlayer, NPC_Toad_05, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_Outro_0048) - EVT_WAIT(10) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(4.0)) - EVT_CALL(PlayerMoveTo, 0, 580, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(NpcFacePlayer, NPC_Toad_05, 0) + Wait(5) + Call(SpeakToPlayer, NPC_Toad_05, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_Outro_0048) + Wait(10) + Call(SetPlayerSpeed, Float(4.0)) + Call(PlayerMoveTo, 0, 580, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Toad_05) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_05))) - EVT_IF_GE(GB_StoryProgress, STORY_EPILOGUE) - EVT_CALL(SetNpcPos, NPC_SELF, -50, 0, 580) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Toad_05))) - EVT_BIND_TRIGGER(EVT_PTR(N(D_8025AA78_81B2F8)), TRIGGER_FLOOR_TOUCH, COLLIDER_deilis, 1, 0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_05))) + IfGe(GB_StoryProgress, STORY_EPILOGUE) + Call(SetNpcPos, NPC_SELF, -50, 0, 580) + Call(SetNpcYaw, NPC_SELF, 90) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Toad_05))) + BindTrigger(Ref(N(D_8025AA78_81B2F8)), TRIGGER_FLOOR_TOUCH, COLLIDER_deilis, 1, 0) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Toad_06) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS) - EVT_SET(LVar0, MSG_MAC_Plaza_009C) - EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) - EVT_SET(LVar0, MSG_MAC_Plaza_009D) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Plaza_009E) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Plaza_009F) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Plaza_00A0) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Plaza_00A1) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC01_MailbagStolen, FALSE) - EVT_SET(LVar0, MSG_MAC_Plaza_00A2) - EVT_ELSE - EVT_IF_EQ(GF_MAC01_MailbagReturned, FALSE) - EVT_SET(LVar0, MSG_MAC_Plaza_00A3) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Plaza_00A4) - EVT_END_IF - EVT_END_IF - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Plaza_00A5) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Plaza_00A6) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Plaza_00A7) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Plaza_00A8) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Plaza_00A9) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Plaza_00AA) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Plaza_00AB) - EVT_CASE_GE(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_Outro_0049) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_Toad_06, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_MET_STAR_SPIRITS) + Set(LVar0, MSG_MAC_Plaza_009C) + CaseLt(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) + Set(LVar0, MSG_MAC_Plaza_009D) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Plaza_009E) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Plaza_009F) + Else + Set(LVar0, MSG_MAC_Plaza_00A0) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Plaza_00A1) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC01_MailbagStolen, FALSE) + Set(LVar0, MSG_MAC_Plaza_00A2) + Else + IfEq(GF_MAC01_MailbagReturned, FALSE) + Set(LVar0, MSG_MAC_Plaza_00A3) + Else + Set(LVar0, MSG_MAC_Plaza_00A4) + EndIf + EndIf + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Plaza_00A5) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Plaza_00A6) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Plaza_00A7) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Plaza_00A8) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Plaza_00A9) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Plaza_00AA) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Plaza_00AB) + CaseGe(STORY_EPILOGUE) + Set(LVar0, MSG_Outro_0049) + EndSwitch + Call(SpeakToPlayer, NPC_Toad_06, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcIdle_Toad_06) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInit_Toad_06) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_06))) - EVT_IF_GE(GB_StoryProgress, STORY_EPILOGUE) - EVT_CALL(SetNpcPos, NPC_SELF, -110, 20, -380) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Toad_06))) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_06))) + IfGe(GB_StoryProgress, STORY_EPILOGUE) + Call(SetNpcPos, NPC_SELF, -110, 20, -380) + Call(SetNpcYaw, NPC_SELF, 90) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Toad_06))) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Toad_07) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS) - EVT_SET(LVar0, MSG_MAC_Plaza_00AC) - EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) - EVT_SET(LVar0, MSG_MAC_Plaza_00AD) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Plaza_00AE) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Plaza_00AF) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Plaza_00B0) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Plaza_00B1) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC01_MailbagStolen, FALSE) - EVT_SET(LVar0, MSG_MAC_Plaza_00B2) - EVT_ELSE - EVT_IF_EQ(GF_MAC01_MailbagReturned, FALSE) - EVT_SET(LVar0, MSG_MAC_Plaza_00B3) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Plaza_00B4) - EVT_END_IF - EVT_END_IF - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Plaza_00B5) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Plaza_00B6) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Plaza_00B7) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Plaza_00B8) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Plaza_00B9) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Plaza_00BA) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Plaza_00BB) - EVT_CASE_GE(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_Outro_004A) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_Toad_07, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_MET_STAR_SPIRITS) + Set(LVar0, MSG_MAC_Plaza_00AC) + CaseLt(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) + Set(LVar0, MSG_MAC_Plaza_00AD) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Plaza_00AE) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Plaza_00AF) + Else + Set(LVar0, MSG_MAC_Plaza_00B0) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Plaza_00B1) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC01_MailbagStolen, FALSE) + Set(LVar0, MSG_MAC_Plaza_00B2) + Else + IfEq(GF_MAC01_MailbagReturned, FALSE) + Set(LVar0, MSG_MAC_Plaza_00B3) + Else + Set(LVar0, MSG_MAC_Plaza_00B4) + EndIf + EndIf + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Plaza_00B5) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Plaza_00B6) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Plaza_00B7) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Plaza_00B8) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Plaza_00B9) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Plaza_00BA) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Plaza_00BB) + CaseGe(STORY_EPILOGUE) + Set(LVar0, MSG_Outro_004A) + EndSwitch + Call(SpeakToPlayer, NPC_Toad_07, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcIdle_Toad_07) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(D_8025B110_81B990) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(NpcFacePlayer, NPC_Toad_07, 0) - EVT_WAIT(5) - EVT_CALL(SpeakToPlayer, NPC_Toad_07, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_Outro_004B) - EVT_WAIT(10) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(4.0)) - EVT_CALL(PlayerMoveTo, 600, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(NpcFacePlayer, NPC_Toad_07, 0) + Wait(5) + Call(SpeakToPlayer, NPC_Toad_07, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, MSG_Outro_004B) + Wait(10) + Call(SetPlayerSpeed, Float(4.0)) + Call(PlayerMoveTo, 600, 0, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Toad_07) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_07))) - EVT_IF_GE(GB_StoryProgress, STORY_EPILOGUE) - EVT_CALL(SetNpcPos, NPC_SELF, 530, 0, -50) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Toad_07))) - EVT_BIND_TRIGGER(EVT_PTR(N(D_8025B110_81B990)), TRIGGER_FLOOR_TOUCH, COLLIDER_deilie, 1, 0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_07))) + IfGe(GB_StoryProgress, STORY_EPILOGUE) + Call(SetNpcPos, NPC_SELF, 530, 0, -50) + Call(SetNpcYaw, NPC_SELF, 270) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Toad_07))) + BindTrigger(Ref(N(D_8025B110_81B990)), TRIGGER_FLOOR_TOUCH, COLLIDER_deilie, 1, 0) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Toad_08) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS) - EVT_SET(LVar0, MSG_MAC_Plaza_00BC) - EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) - EVT_SET(LVar0, MSG_MAC_Plaza_00BD) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Plaza_00BE) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Plaza_00BF) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Plaza_00C0) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Plaza_00C1) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC01_ShyGuysTramplingGarden, FALSE) - EVT_ELSE - EVT_SET(LVar0, GF_MAC01_ChasedShyGuysFromGardenA) - EVT_ADD(LVar0, GF_MAC01_ChasedShyGuysFromGardenB) - EVT_IF_LT(LVar0, 2) - EVT_SET(LVar0, MSG_MAC_Plaza_00C2) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Plaza_00C3) - EVT_END_IF - EVT_END_IF - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Plaza_00C4) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Plaza_00C5) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Plaza_00C6) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Plaza_00C7) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Plaza_00C8) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Plaza_00C9) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Plaza_00CA) - EVT_CASE_GE(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_Outro_004C) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_Toad_08, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_MET_STAR_SPIRITS) + Set(LVar0, MSG_MAC_Plaza_00BC) + CaseLt(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) + Set(LVar0, MSG_MAC_Plaza_00BD) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Plaza_00BE) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Plaza_00BF) + Else + Set(LVar0, MSG_MAC_Plaza_00C0) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Plaza_00C1) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC01_ShyGuysTramplingGarden, FALSE) + Else + Set(LVar0, GF_MAC01_ChasedShyGuysFromGardenA) + Add(LVar0, GF_MAC01_ChasedShyGuysFromGardenB) + IfLt(LVar0, 2) + Set(LVar0, MSG_MAC_Plaza_00C2) + Else + Set(LVar0, MSG_MAC_Plaza_00C3) + EndIf + EndIf + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Plaza_00C4) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Plaza_00C5) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Plaza_00C6) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Plaza_00C7) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Plaza_00C8) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Plaza_00C9) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Plaza_00CA) + CaseGe(STORY_EPILOGUE) + Set(LVar0, MSG_Outro_004C) + EndSwitch + Call(SpeakToPlayer, NPC_Toad_08, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_Toad_08) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_08))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_08))) + Return + End }; EvtScript N(EVS_NpcInteract_Toad_09) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS) - EVT_SET(LVar0, MSG_MAC_Plaza_00CB) - EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) - EVT_SET(LVar0, MSG_MAC_Plaza_00CC) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Plaza_00CD) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Plaza_00CE) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Plaza_00CF) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Plaza_00D0) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC00_DictionaryStolen, FALSE) - EVT_SET(LVar0, MSG_MAC_Plaza_00D1) - EVT_ELSE - EVT_IF_EQ(GF_MAC00_DictionaryReturned, FALSE) - EVT_SET(LVar0, MSG_MAC_Plaza_00D2) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Plaza_00D3) - EVT_END_IF - EVT_END_IF - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Plaza_00D4) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Plaza_00D5) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Plaza_00D6) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Plaza_00D7) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Plaza_00D8) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Plaza_00D9) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Plaza_00DA) - EVT_CASE_GE(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_Outro_004D) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_Toad_09, ANIM_Toad_Green_Talk, ANIM_Toad_Green_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_MET_STAR_SPIRITS) + Set(LVar0, MSG_MAC_Plaza_00CB) + CaseLt(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) + Set(LVar0, MSG_MAC_Plaza_00CC) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Plaza_00CD) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Plaza_00CE) + Else + Set(LVar0, MSG_MAC_Plaza_00CF) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Plaza_00D0) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC00_DictionaryStolen, FALSE) + Set(LVar0, MSG_MAC_Plaza_00D1) + Else + IfEq(GF_MAC00_DictionaryReturned, FALSE) + Set(LVar0, MSG_MAC_Plaza_00D2) + Else + Set(LVar0, MSG_MAC_Plaza_00D3) + EndIf + EndIf + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Plaza_00D4) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Plaza_00D5) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Plaza_00D6) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Plaza_00D7) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Plaza_00D8) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Plaza_00D9) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Plaza_00DA) + CaseGe(STORY_EPILOGUE) + Set(LVar0, MSG_Outro_004D) + EndSwitch + Call(SpeakToPlayer, NPC_Toad_09, ANIM_Toad_Green_Talk, ANIM_Toad_Green_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_Toad_09) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_09))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_09))) + Return + End }; EvtScript N(D_8025B760_81BFE0) = { - EVT_CALL(GetNpcPos, NPC_PostOfficeShyGuy, LVar2, LVar3, LVar4) - EVT_ADD(LVar3, 20) - EVT_CALL(MakeItemEntity, ITEM_CALCULATOR, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVar9, LVar0) - EVT_WAIT(1) - EVT_LOOP(80) - EVT_CALL(GetNpcPos, NPC_PostOfficeShyGuy, LVar2, LVar3, LVar4) - EVT_ADD(LVar3, 20) - EVT_CALL(SetItemPos, LVar9, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(RemoveItemEntity, LVar9) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_PostOfficeShyGuy, LVar2, LVar3, LVar4) + Add(LVar3, 20) + Call(MakeItemEntity, ITEM_CALCULATOR, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVar9, LVar0) + Wait(1) + Loop(80) + Call(GetNpcPos, NPC_PostOfficeShyGuy, LVar2, LVar3, LVar4) + Add(LVar3, 20) + Call(SetItemPos, LVar9, LVar2, LVar3, LVar4) + Wait(1) + EndLoop + Call(RemoveItemEntity, LVar9) + Return + End }; EvtScript N(D_8025B854_81C0D4) = { - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar2, 200) - EVT_IF_LT(LVar0, 50) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_PostOfficeShyGuy, -313, 0, 330) - EVT_CALL(SetNpcAnimation, NPC_PostOfficeShyGuy, ANIM_ShyGuy_Red_Anim04) - EVT_WAIT(21) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_MAC_Plaza_0007) - EVT_EXEC(N(D_8025B760_81BFE0)) - EVT_SET(LVar0, 6) - EVT_CALL(PlaySoundAtNpc, LVar0, SOUND_SHY_GUY_RUN_AWAY, SOUND_SPACE_DEFAULT) - EVT_EXEC_GET_TID(N(D_8024E6F8_80EF78), LVarA) - EVT_CALL(NpcMoveTo, NPC_PostOfficeShyGuy, -45, 330, 30) - EVT_CALL(NpcMoveTo, NPC_PostOfficeShyGuy, -45, 710, 30) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetNpcPos, NPC_PostOfficeShyGuy, NPC_DISPOSE_LOCATION) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar2, 200) + IfLt(LVar0, 50) + BreakLoop + EndIf + EndIf + Wait(1) + EndLoop + Call(SetNpcPos, NPC_PostOfficeShyGuy, -313, 0, 330) + Call(SetNpcAnimation, NPC_PostOfficeShyGuy, ANIM_ShyGuy_Red_Anim04) + Wait(21) + Call(DisablePlayerInput, TRUE) + Call(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_MAC_Plaza_0007) + Exec(N(D_8025B760_81BFE0)) + Set(LVar0, 6) + Call(PlaySoundAtNpc, LVar0, SOUND_SHY_GUY_RUN_AWAY, SOUND_SPACE_DEFAULT) + ExecGetTID(N(D_8024E6F8_80EF78), LVarA) + Call(NpcMoveTo, NPC_PostOfficeShyGuy, -45, 330, 30) + Call(NpcMoveTo, NPC_PostOfficeShyGuy, -45, 710, 30) + KillThread(LVarA) + Call(SetNpcPos, NPC_PostOfficeShyGuy, NPC_DISPOSE_LOCATION) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_ShyGuy_01) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) - EVT_RETURN - EVT_END_IF - EVT_IF_GT(GB_StoryProgress, STORY_CH4_STAR_SPIRIT_RESCUED) - EVT_RETURN - EVT_END_IF - EVT_IF_NE(GF_MAC01_CalculatorStolen, FALSE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_MAC01_CalculatorStolen, TRUE) - EVT_EXEC(N(D_8025B854_81C0D4)) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) + Return + EndIf + IfGt(GB_StoryProgress, STORY_CH4_STAR_SPIRIT_RESCUED) + Return + EndIf + IfNe(GF_MAC01_CalculatorStolen, FALSE) + Return + EndIf + Set(GF_MAC01_CalculatorStolen, TRUE) + Exec(N(D_8025B854_81C0D4)) + Return + End }; EvtScript N(EVS_NpcInteract_ToadHouseKeeper_A) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MAC_Plaza_001A) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MAC_Plaza_001A) + Return + End }; EvtScript N(EVS_NpcInteract_ToadHouseKeeper_B) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_Outro_0044) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_Outro_0044) + Return + End }; EvtScript N(EVS_ToadHouse_SetDialogue) = { - EVT_IF_EQ(AF_MAC_43, FALSE) - EVT_SET(LVar0, MSG_MAC_Plaza_0015) - EVT_SET(LVar8, MSG_MAC_Plaza_0016) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Plaza_001B) - EVT_SET(LVar8, MSG_MAC_Plaza_001B) - EVT_END_IF - EVT_SET(LVar1, MSG_MAC_Plaza_0017) - EVT_SET(LVar2, MSG_MAC_Plaza_0018) - EVT_SET(LVar3, MSG_MAC_Plaza_0019) - EVT_RETURN - EVT_END + IfEq(AF_MAC_43, FALSE) + Set(LVar0, MSG_MAC_Plaza_0015) + Set(LVar8, MSG_MAC_Plaza_0016) + Else + Set(LVar0, MSG_MAC_Plaza_001B) + Set(LVar8, MSG_MAC_Plaza_001B) + EndIf + Set(LVar1, MSG_MAC_Plaza_0017) + Set(LVar2, MSG_MAC_Plaza_0018) + Set(LVar3, MSG_MAC_Plaza_0019) + Return + End }; EvtScript N(EVS_ToadHouse_GetInBed) = { - EVT_EXEC(N(EVS_PlayRestingSong)) - EVT_CALL(PlayerMoveTo, 535, -155, 20) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(N(ToadHouse_CamSetFOV), 0, 40) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 116) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 99, -58) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 495, 130) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 507, -19) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 20) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_CALL(PlayerMoveTo, 580, -210, 20) - EVT_CALL(InterpPlayerYaw, 263, 1) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Still) - EVT_CALL(SetPlayerImgFXFlags, IMGFX_FLAG_800) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_GET_IN_BED, 1, 1, 0) - EVT_THREAD - EVT_WAIT(60) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) - EVT_END_THREAD - EVT_WAIT(20) - EVT_THREAD - EVT_WAIT(63) - EVT_CALL(N(ToadHouse_CamSetFOV), 0, 25) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_PlayRestingSong)) + Call(PlayerMoveTo, 535, -155, 20) + Thread + Wait(5) + Call(N(ToadHouse_CamSetFOV), 0, 40) + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamDistance, CAM_DEFAULT, 116) + Call(SetCamPitch, CAM_DEFAULT, 99, -58) + Call(SetCamPosA, CAM_DEFAULT, 495, 130) + Call(SetCamPosB, CAM_DEFAULT, 507, -19) + Call(SetCamPosC, CAM_DEFAULT, 0, 20) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Call(PlayerMoveTo, 580, -210, 20) + Call(InterpPlayerYaw, 263, 1) + Call(HidePlayerShadow, TRUE) + Call(SetPlayerAnimation, ANIM_Mario1_Still) + Call(SetPlayerImgFXFlags, IMGFX_FLAG_800) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_GET_IN_BED, 1, 1, 0) + Thread + Wait(60) + Call(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) + EndThread + Wait(20) + Thread + Wait(63) + Call(N(ToadHouse_CamSetFOV), 0, 25) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + EndThread + Return + End }; EvtScript N(EVS_ToadHouse_ReturnFromRest) = { - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(HidePlayerShadow, FALSE) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(SetPlayerPos, 568, 20, -186) - EVT_CALL(PlayerMoveTo, 525, -168, 20) - EVT_RETURN - EVT_END + Exec(N(EVS_SetupMusic)) + Call(HidePlayerShadow, FALSE) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetPlayerSpeed, Float(3.0)) + Call(SetPlayerPos, 568, 20, -186) + Call(PlayerMoveTo, 525, -168, 20) + Return + End }; EvtScript N(EVS_NpcInit_ToadHouseKeeper) = { - EVT_IF_GE(GB_StoryProgress, STORY_EPILOGUE) - EVT_CALL(SetNpcPos, NPC_SELF, 370, 20, -150) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ToadHouseKeeper_B))) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GF_MAC01_ChasedShyGuyFromToadHouse, FALSE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ToadHouseKeeper_A))) - EVT_CASE_DEFAULT - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ToadHouseKeeper))) - EVT_END_SWITCH - EVT_ELSE - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ToadHouseKeeper))) - EVT_END_IF - EVT_SET(AF_MAC_43, FALSE) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_EPILOGUE) + Call(SetNpcPos, NPC_SELF, 370, 20, -150) + Call(SetNpcYaw, NPC_SELF, 270) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ToadHouseKeeper_B))) + Return + EndIf + IfEq(GF_MAC01_ChasedShyGuyFromToadHouse, FALSE) + Switch(GB_StoryProgress) + CaseRange(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ToadHouseKeeper_A))) + CaseDefault + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ToadHouseKeeper))) + EndSwitch + Else + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ToadHouseKeeper))) + EndIf + Set(AF_MAC_43, FALSE) + Return + End }; EvtScript N(EVS_NpcIdle_ShyGuy_02) = { - EVT_CALL(SetNpcPos, NPC_SELF, 572, 36, -226) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03) - EVT_LOOP(0) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 1) - EVT_WAIT(3) - EVT_IF_EQ(MF_InsideToadHouse, TRUE) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_END_IF - EVT_CALL(NpcJump0, NPC_SELF, 539, 36, -242, 8) - EVT_WAIT(2) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 1) - EVT_WAIT(3) - EVT_IF_EQ(MF_InsideToadHouse, TRUE) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_END_IF - EVT_CALL(NpcJump0, NPC_SELF, 572, 36, -226, 8) - EVT_WAIT(2) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, 572, 36, -226) + Call(InterpNpcYaw, NPC_SELF, 270, 1) + Call(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03) + Loop(0) + Call(InterpNpcYaw, NPC_SELF, 270, 1) + Wait(3) + IfEq(MF_InsideToadHouse, TRUE) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + EndIf + Call(NpcJump0, NPC_SELF, 539, 36, -242, 8) + Wait(2) + Call(InterpNpcYaw, NPC_SELF, 90, 1) + Wait(3) + IfEq(MF_InsideToadHouse, TRUE) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + EndIf + Call(NpcJump0, NPC_SELF, 572, 36, -226, 8) + Wait(2) + EndLoop + Return + End }; EvtScript N(EVS_NpcAI_ShyGuy_02) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowSweat, NPC_SELF, 1, -45, EMOTER_NPC, 0, 0, 0, 0, 20) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim0C) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 36, LVar2, 10) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 1) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 550, 20, -161, 0) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilit2u, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 8) - EVT_CALL(RotateModel, MODEL_door_k, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(10) - EVT_ADD(LVar0, -8) - EVT_CALL(RotateModel, MODEL_door_k, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilit2u, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_CALL(ShowSweat, NPC_SELF, 1, -45, EMOTER_NPC, 0, 0, 0, 0, 20) - EVT_SET(LVar0, -1) - EVT_CALL(PlaySoundAtNpc, LVar0, SOUND_SHY_GUY_RUN_AWAY, SOUND_SPACE_DEFAULT) - EVT_EXEC_GET_TID(N(D_8024E6F8_80EF78), LVarA) - EVT_CALL(NpcMoveTo, NPC_SELF, 420, -118, 0) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(BindNpcInteract, NPC_ToadHouseToad, EVT_PTR(N(EVS_NpcInteract_ToadHouseKeeper))) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ShowSweat, NPC_SELF, 1, -45, EMOTER_NPC, 0, 0, 0, 0, 20) + Call(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim0C) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_SELF, LVar0, 36, LVar2, 10) + Call(SetNpcSpeed, NPC_SELF, Float(8.0)) + Call(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03) + Call(InterpNpcYaw, NPC_SELF, 270, 1) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 550, 20, -161, 0) + Thread + Wait(10) + Call(PlaySoundAtCollider, COLLIDER_deilit2u, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 8) + Call(RotateModel, MODEL_door_k, LVar0, 0, -1, 0) + Wait(1) + EndLoop + Loop(10) + Add(LVar0, -8) + Call(RotateModel, MODEL_door_k, LVar0, 0, -1, 0) + Wait(1) + EndLoop + Call(PlaySoundAtCollider, COLLIDER_deilit2u, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + EndThread + Call(ShowSweat, NPC_SELF, 1, -45, EMOTER_NPC, 0, 0, 0, 0, 20) + Set(LVar0, -1) + Call(PlaySoundAtNpc, LVar0, SOUND_SHY_GUY_RUN_AWAY, SOUND_SPACE_DEFAULT) + ExecGetTID(N(D_8024E6F8_80EF78), LVarA) + Call(NpcMoveTo, NPC_SELF, 420, -118, 0) + KillThread(LVarA) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(BindNpcInteract, NPC_ToadHouseToad, Ref(N(EVS_NpcInteract_ToadHouseKeeper))) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcHit_ShyGuy_02) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(LVar1, 1) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_SET(LVar1, 1) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_PARTNER) - EVT_SET(LVar1, 1) - EVT_CASE_DEFAULT - EVT_SET(LVar1, 0) - EVT_END_SWITCH - EVT_IF_EQ(LVar1, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(CheckPositionRelativeToPlane), 450, -190, 500, -103) - EVT_IF_EQ(LVar0, ENCOUNTER_TRIGGER_NONE) - EVT_RETURN - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SHY_GUY_OUCH, SOUND_SPACE_DEFAULT) - EVT_SET(GF_MAC01_ChasedShyGuyFromToadHouse, TRUE) - EVT_SET(AF_MAC_43, TRUE) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_ShyGuy_02))) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_CANT_INTERACT | ENEMY_FLAG_IGNORE_PARTNER, 1) - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(LVar1, 1) + CaseEq(ENCOUNTER_TRIGGER_JUMP) + Set(LVar1, 1) + CaseEq(ENCOUNTER_TRIGGER_PARTNER) + Set(LVar1, 1) + CaseDefault + Set(LVar1, 0) + EndSwitch + IfEq(LVar1, 0) + Return + EndIf + Call(N(CheckPositionRelativeToPlane), 450, -190, 500, -103) + IfEq(LVar0, ENCOUNTER_TRIGGER_NONE) + Return + EndIf + Call(PlaySoundAtNpc, NPC_SELF, SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_DEFAULT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SHY_GUY_OUCH, SOUND_SPACE_DEFAULT) + Set(GF_MAC01_ChasedShyGuyFromToadHouse, TRUE) + Set(AF_MAC_43, TRUE) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_ShyGuy_02))) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_CANT_INTERACT | ENEMY_FLAG_IGNORE_PARTNER, 1) + Return + End }; EvtScript N(EVS_NpcInit_ShyGuy_02) = { - EVT_IF_EQ(GF_MAC01_ChasedShyGuyFromToadHouse, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_ShyGuy_02))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_ShyGuy_02))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_MAC01_ChasedShyGuyFromToadHouse, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_ShyGuy_02))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_ShyGuy_02))) + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; Vec3f N(FlightPath_TwinkArrive)[] = { @@ -1962,120 +1962,120 @@ Vec3f N(FlightPath_TwinkDepart)[] = { }; EvtScript N(EVS_NpcIdle_Twink) = { - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 560) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetMusicTrack, 0, SONG_TWINK_THEME, 0, 8) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PlayerMoveTo, 500, -20, 0) - EVT_CALL(WaitForPlayerMoveToComplete) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_MAC_Plaza_00DB, 160, 40) - EVT_LOOP(2) - EVT_CALL(InterpPlayerYaw, 90, 7) - EVT_WAIT(10 * DT) - EVT_CALL(InterpPlayerYaw, 270, 7) - EVT_WAIT(10 * DT) - EVT_END_LOOP - EVT_WAIT(30 * DT) - EVT_CALL(GetPlayerPos, LVar4, LVar5, LVar6) - EVT_SUBF(LVar4, EVT_FLOAT(50.0)) - EVT_ADDF(LVar5, EVT_FLOAT(40.0)) - EVT_CALL(InterpNpcYaw, NPC_Twink, 90, 0) - EVT_CALL(LoadPath, 35 * DT, EVT_PTR(N(FlightPath_TwinkArrive)), ARRAY_COUNT(N(FlightPath_TwinkArrive)), EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_CALL(SetNpcPos, NPC_Twink, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(3.0/ DT), -10, -300, 15, -9) - EVT_CALL(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_MAC_Plaza_00DC) - EVT_WAIT(5 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_WAIT(15 * DT) - EVT_CALL(SetNpcJumpscale, NPC_Twink, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Twink, LVar0, LVar1, LVar2, 10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_MAC_Plaza_00DD) - EVT_WAIT(5 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Chuckle) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(3.0 / DT), -40, -200, 15, -15) - EVT_CALL(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_MAC_Plaza_00DE) - EVT_WAIT(5 * DT) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(InterpNpcYaw, NPC_Twink, 270, 0) - EVT_CALL(GetNpcPos, NPC_Twink, LVar4, LVar5, LVar6) - EVT_CALL(LoadPath, 35 * DT, EVT_PTR(N(FlightPath_TwinkDepart)), ARRAY_COUNT(N(FlightPath_TwinkDepart)), EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_ADD(LVar1, LVar4) - EVT_ADD(LVar2, LVar5) - EVT_ADD(LVar3, LVar6) - EVT_CALL(SetNpcPos, NPC_Twink, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_Twink, NPC_DISPOSE_LOCATION) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(GB_StoryProgress, STORY_CH1_RETURNED_TO_TOAD_TOWN) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, 560) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetMusicTrack, 0, SONG_TWINK_THEME, 0, 8) + Call(DisablePlayerInput, TRUE) + Call(SetPlayerSpeed, Float(3.0 / DT)) + Call(PlayerMoveTo, 500, -20, 0) + Call(WaitForPlayerMoveToComplete) + Call(InterpPlayerYaw, 270, 0) + Call(ShowMessageAtScreenPos, MSG_MAC_Plaza_00DB, 160, 40) + Loop(2) + Call(InterpPlayerYaw, 90, 7) + Wait(10 * DT) + Call(InterpPlayerYaw, 270, 7) + Wait(10 * DT) + EndLoop + Wait(30 * DT) + Call(GetPlayerPos, LVar4, LVar5, LVar6) + SubF(LVar4, Float(50.0)) + AddF(LVar5, Float(40.0)) + Call(InterpNpcYaw, NPC_Twink, 90, 0) + Call(LoadPath, 35 * DT, Ref(N(FlightPath_TwinkArrive)), ARRAY_COUNT(N(FlightPath_TwinkArrive)), EASING_COS_IN_OUT) + Loop(0) + Call(GetNextPathPos) + AddF(LVar1, LVar4) + AddF(LVar2, LVar5) + Call(SetNpcPos, NPC_Twink, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Call(AdjustCam, CAM_DEFAULT, Float(3.0/ DT), -10, -300, 15, -9) + Call(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_MAC_Plaza_00DC) + Wait(5 * DT) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Wait(15 * DT) + Call(SetNpcJumpscale, NPC_Twink, Float(1.0)) + Call(GetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Twink, LVar0, LVar1, LVar2, 10 * DT) + Call(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_MAC_Plaza_00DD) + Wait(5 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Chuckle) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Call(AdjustCam, CAM_DEFAULT, Float(3.0 / DT), -40, -200, 15, -15) + Call(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_MAC_Plaza_00DE) + Wait(5 * DT) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(InterpNpcYaw, NPC_Twink, 270, 0) + Call(GetNpcPos, NPC_Twink, LVar4, LVar5, LVar6) + Call(LoadPath, 35 * DT, Ref(N(FlightPath_TwinkDepart)), ARRAY_COUNT(N(FlightPath_TwinkDepart)), EASING_QUADRATIC_IN) + Loop(0) + Call(GetNextPathPos) + Add(LVar1, LVar4) + Add(LVar2, LVar5) + Add(LVar3, LVar6) + Call(SetNpcPos, NPC_Twink, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcPos, NPC_Twink, NPC_DISPOSE_LOCATION) + Exec(N(EVS_SetupMusic)) + Set(GB_StoryProgress, STORY_CH1_RETURNED_TO_TOAD_TOWN) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Twink) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH1_DEFEATED_JR_TROOPA) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Twink))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH1_DEFEATED_JR_TROOPA) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Twink))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Kolorado) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Plaza_00DF) - EVT_EXEC_WAIT(N(EVS_ArtifactPrompt_Kolorado)) - EVT_EXEC_WAIT(N(EVS_LetterPrompt_Kolorado)) - EVT_EXEC_WAIT(N(EVS_LetterReward_Kolorado)) - EVT_IF_NE(LVarC, 0) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Plaza_00DF) + ExecWait(N(EVS_ArtifactPrompt_Kolorado)) + ExecWait(N(EVS_LetterPrompt_Kolorado)) + ExecWait(N(EVS_LetterReward_Kolorado)) + IfNe(LVarC, 0) + Return + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Kolorado) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH5_RETURNED_TO_TOAD_TOWN, STORY_CH7_BEGAN_PEACH_MISSION) - EVT_IF_EQ(GF_NOK11_Defeated_KentC, FALSE) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Kolorado))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseRange(STORY_CH5_RETURNED_TO_TOAD_TOWN, STORY_CH7_BEGAN_PEACH_MISSION) + IfEq(GF_NOK11_Defeated_KentC, FALSE) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Kolorado))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + CaseDefault + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; AnimID N(ExtraAnims_Toad)[] = { diff --git a/src/world/area_mac/mac_01/npc/flower_gate.inc.c b/src/world/area_mac/mac_01/npc/flower_gate.inc.c index 76acaee2b27..93f26e20b8b 100644 --- a/src/world/area_mac/mac_01/npc/flower_gate.inc.c +++ b/src/world/area_mac/mac_01/npc/flower_gate.inc.c @@ -1,188 +1,188 @@ EvtScript N(EVS_MinhThankYou) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetNpcPos, NPC_MinhT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamProperties, CAM_DEFAULT, 4, LVar0, LVar1, LVar2, 300, 16, -8) - EVT_CALL(SpeakToPlayer, NPC_MinhT, ANIM_MinhT_Talk, ANIM_MinhT_Idle, 0, MSG_MAC_Plaza_006F) - EVT_CALL(ResetCam, CAM_DEFAULT, 4) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(GetNpcPos, NPC_MinhT, LVar0, LVar1, LVar2) + Call(SetCamProperties, CAM_DEFAULT, 4, LVar0, LVar1, LVar2, 300, 16, -8) + Call(SpeakToPlayer, NPC_MinhT, ANIM_MinhT_Talk, ANIM_MinhT_Idle, 0, MSG_MAC_Plaza_006F) + Call(ResetCam, CAM_DEFAULT, 4) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcIdle_GardenShyGuy1) = { - EVT_CALL(SetNpcPos, NPC_SELF, 170, 27, 380) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03) - EVT_LOOP(0) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 1) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 180, 27, 280, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, 220, 250, 15) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 310, 27, 250, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, 350, 280, 15) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 1) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 360, 27, 380, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, 300, 450, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, 230, 450, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, 170, 380, 15) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, 170, 27, 380) + Call(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03) + Loop(0) + Call(InterpNpcYaw, NPC_SELF, 90, 1) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 180, 27, 280, 15) + Call(NpcMoveTo, NPC_SELF, 220, 250, 15) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 310, 27, 250, 15) + Call(NpcMoveTo, NPC_SELF, 350, 280, 15) + Call(InterpNpcYaw, NPC_SELF, 270, 1) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 360, 27, 380, 15) + Call(NpcMoveTo, NPC_SELF, 300, 450, 15) + Call(NpcMoveTo, NPC_SELF, 230, 450, 15) + Call(NpcMoveTo, NPC_SELF, 170, 380, 15) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_GardenShyGuy2) = { - EVT_CALL(SetNpcPos, NPC_SELF, 350, 27, 280) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03) - EVT_LOOP(0) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 1) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 360, 27, 380, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, 300, 450, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, 230, 450, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, 170, 380, 15) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 1) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 180, 27, 280, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, 220, 250, 15) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 310, 27, 250, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, 350, 280, 15) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, 350, 27, 280) + Call(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03) + Loop(0) + Call(InterpNpcYaw, NPC_SELF, 270, 1) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 360, 27, 380, 15) + Call(NpcMoveTo, NPC_SELF, 300, 450, 15) + Call(NpcMoveTo, NPC_SELF, 230, 450, 15) + Call(NpcMoveTo, NPC_SELF, 170, 380, 15) + Call(InterpNpcYaw, NPC_SELF, 90, 1) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 180, 27, 280, 15) + Call(NpcMoveTo, NPC_SELF, 220, 250, 15) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 310, 27, 250, 15) + Call(NpcMoveTo, NPC_SELF, 350, 280, 15) + EndLoop + Return + End }; EvtScript N(EVS_GardenShyGuy_RunAway) = { - EVT_SET(LVarA, GF_MAC01_ChasedShyGuysFromGardenA) - EVT_ADD(LVarA, GF_MAC01_ChasedShyGuysFromGardenB) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim0C) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 27, LVar2, 10) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03) - EVT_CALL(ShowSweat, NPC_SELF, 1, -45, EMOTER_NPC, 0, 0, 0, 0, 20) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 1) - EVT_SET(LVar0, -1) - EVT_CALL(PlaySoundAtNpc, LVar0, SOUND_SHY_GUY_RUN_AWAY, SOUND_SPACE_DEFAULT) - EVT_EXEC_GET_TID(N(D_8024E6F8_80EF78), LVar9) - EVT_CALL(NpcMoveTo, NPC_SELF, 160, 400, 0) - EVT_KILL_THREAD(LVar9) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_IF_EQ(LVarA, 2) - EVT_EXEC(N(EVS_MinhThankYou)) - EVT_END_IF - EVT_CALL(ShowSweat, NPC_SELF, 1, -45, EMOTER_NPC, 0, 0, 0, 0, 20) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 110, 20, 420, 0) - EVT_CALL(ShowSweat, NPC_SELF, 1, -45, EMOTER_NPC, 0, 0, 0, 0, 20) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 40, 0, 450, 0) - EVT_CALL(ShowSweat, NPC_SELF, 1, -45, EMOTER_NPC, 0, 0, 0, 0, 20) - EVT_CALL(NpcMoveTo, NPC_SELF, -30, 550, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, -30, 700, 0) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END + Set(LVarA, GF_MAC01_ChasedShyGuysFromGardenA) + Add(LVarA, GF_MAC01_ChasedShyGuysFromGardenB) + Call(DisablePlayerInput, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim0C) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_SELF, LVar0, 27, LVar2, 10) + Call(SetNpcSpeed, NPC_SELF, Float(8.0)) + Call(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03) + Call(ShowSweat, NPC_SELF, 1, -45, EMOTER_NPC, 0, 0, 0, 0, 20) + Call(InterpNpcYaw, NPC_SELF, 270, 1) + Set(LVar0, -1) + Call(PlaySoundAtNpc, LVar0, SOUND_SHY_GUY_RUN_AWAY, SOUND_SPACE_DEFAULT) + ExecGetTID(N(D_8024E6F8_80EF78), LVar9) + Call(NpcMoveTo, NPC_SELF, 160, 400, 0) + KillThread(LVar9) + Call(DisablePlayerInput, FALSE) + IfEq(LVarA, 2) + Exec(N(EVS_MinhThankYou)) + EndIf + Call(ShowSweat, NPC_SELF, 1, -45, EMOTER_NPC, 0, 0, 0, 0, 20) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 110, 20, 420, 0) + Call(ShowSweat, NPC_SELF, 1, -45, EMOTER_NPC, 0, 0, 0, 0, 20) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 40, 0, 450, 0) + Call(ShowSweat, NPC_SELF, 1, -45, EMOTER_NPC, 0, 0, 0, 0, 20) + Call(NpcMoveTo, NPC_SELF, -30, 550, 0) + Call(NpcMoveTo, NPC_SELF, -30, 700, 0) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Return + End }; EvtScript N(EVS_GardenShyGuy_PlayHitReactionSounds) = { - EVT_SET(LVar0, 1) - EVT_CALL(GetOwnerEncounterTrigger, LVar1) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_PARTNER) - EVT_CASE_DEFAULT - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_IF_LE(LVar1, 50) - EVT_RETURN - EVT_END_IF - EVT_IF_LE(LVar3, 80) - EVT_RETURN - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SHY_GUY_OUCH, SOUND_SPACE_DEFAULT) - EVT_SET(LVar0, 0) - EVT_RETURN - EVT_END + Set(LVar0, 1) + Call(GetOwnerEncounterTrigger, LVar1) + Switch(LVar1) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + CaseEq(ENCOUNTER_TRIGGER_JUMP) + CaseEq(ENCOUNTER_TRIGGER_PARTNER) + CaseDefault + Return + EndSwitch + Call(GetPlayerPos, LVar1, LVar2, LVar3) + IfLe(LVar1, 50) + Return + EndIf + IfLe(LVar3, 80) + Return + EndIf + Call(PlaySoundAtNpc, NPC_SELF, SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_DEFAULT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SHY_GUY_OUCH, SOUND_SPACE_DEFAULT) + Set(LVar0, 0) + Return + End }; EvtScript N(EVS_NpcHit_GardenShyGuy1) = { - EVT_EXEC_WAIT(N(EVS_GardenShyGuy_PlayHitReactionSounds)) - EVT_IF_EQ(LVar0, 1) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_MAC01_ChasedShyGuysFromGardenA, TRUE) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_GardenShyGuy_RunAway))) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_CANT_INTERACT | ENEMY_FLAG_IGNORE_PARTNER, 1) - EVT_RETURN - EVT_END + ExecWait(N(EVS_GardenShyGuy_PlayHitReactionSounds)) + IfEq(LVar0, 1) + Return + EndIf + Set(GF_MAC01_ChasedShyGuysFromGardenA, TRUE) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_GardenShyGuy_RunAway))) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_CANT_INTERACT | ENEMY_FLAG_IGNORE_PARTNER, 1) + Return + End }; EvtScript N(EVS_NpcHit_GardenShyGuy2) = { - EVT_EXEC_WAIT(N(EVS_GardenShyGuy_PlayHitReactionSounds)) - EVT_IF_EQ(LVar0, 1) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_MAC01_ChasedShyGuysFromGardenB, TRUE) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_GardenShyGuy_RunAway))) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_CANT_INTERACT | ENEMY_FLAG_IGNORE_PARTNER, 1) - EVT_RETURN - EVT_END + ExecWait(N(EVS_GardenShyGuy_PlayHitReactionSounds)) + IfEq(LVar0, 1) + Return + EndIf + Set(GF_MAC01_ChasedShyGuysFromGardenB, TRUE) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_GardenShyGuy_RunAway))) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_CANT_INTERACT | ENEMY_FLAG_IGNORE_PARTNER, 1) + Return + End }; EvtScript N(EVS_NpcInit_GardenShyGuy1) = { - EVT_IF_EQ(GF_MAC01_ChasedShyGuysFromGardenA, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_GardenShyGuy1))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_GardenShyGuy1))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_MAC01_ChasedShyGuysFromGardenA, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_GardenShyGuy1))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_GardenShyGuy1))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_GardenShyGuy2) = { - EVT_IF_EQ(GF_MAC01_ChasedShyGuysFromGardenB, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_GardenShyGuy2))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_GardenShyGuy2))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_MAC01_ChasedShyGuysFromGardenB, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_GardenShyGuy2))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_GardenShyGuy2))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; // BUBULB EvtScript N(EVS_NpcInteract_Bubulb) = { - EVT_IF_EQ(GB_StoryProgress, STORY_EPILOGUE) - EVT_SET(LVar0, MSG_Outro_0045) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Plaza_0077) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, LVar0) - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_EPILOGUE) + Set(LVar0, MSG_Outro_0045) + Else + Set(LVar0, MSG_MAC_Plaza_0077) + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_Bubulb) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH5_STAR_SPRIT_DEPARTED, STORY_CH6_FLOWER_GATE_OPEN) - EVT_CALL(SetNpcPos, NPC_SELF, 200, 20, 500) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bubulb))) - EVT_CASE_EQ(STORY_EPILOGUE) - EVT_CALL(SetNpcPos, NPC_SELF, 230, 30, 400) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bubulb))) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseRange(STORY_CH5_STAR_SPRIT_DEPARTED, STORY_CH6_FLOWER_GATE_OPEN) + Call(SetNpcPos, NPC_SELF, 200, 20, 500) + Call(SetNpcYaw, NPC_SELF, 270) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bubulb))) + CaseEq(STORY_EPILOGUE) + Call(SetNpcPos, NPC_SELF, 230, 30, 400) + Call(SetNpcYaw, NPC_SELF, 270) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bubulb))) + EndSwitch + Return + End }; // MINH T @@ -212,115 +212,115 @@ API_CALLABLE(N(ResetPartnerTetherDist)) { } EvtScript N(EVS_FadeInFlowerGateGlowAlpha) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitf, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_door_ura, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_pica, TRUE) - EVT_CALL(SetModelCustomGfx, MODEL_pica, CUSTOM_GFX_4, -1) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_4, EVT_PTR(N(gfx_build_flower_gate_glow)), NULL) - EVT_CALL(MakeLerp, 0, 255, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetFlowerGateGlowAlpha), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitf, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_door_ura, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_pica, TRUE) + Call(SetModelCustomGfx, MODEL_pica, CUSTOM_GFX_4, -1) + Call(SetCustomGfxBuilders, CUSTOM_GFX_4, Ref(N(gfx_build_flower_gate_glow)), NULL) + Call(MakeLerp, 0, 255, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(N(SetFlowerGateGlowAlpha), LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_ModulateFlowerGateGlowAlpha) = { - EVT_SET(LVar1, 255) - EVT_LOOP(LVar0) - EVT_LOOP(15) - EVT_ADD(LVar1, -5) - EVT_CALL(N(SetFlowerGateGlowAlpha), LVar1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(15) - EVT_ADD(LVar1, 5) - EVT_CALL(N(SetFlowerGateGlowAlpha), LVar1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVar1, 255) + Loop(LVar0) + Loop(15) + Add(LVar1, -5) + Call(N(SetFlowerGateGlowAlpha), LVar1) + Wait(1) + EndLoop + Loop(15) + Add(LVar1, 5) + Call(N(SetFlowerGateGlowAlpha), LVar1) + Wait(1) + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_FadeOutFlowerGateGlowAlpha) = { - EVT_CALL(MakeLerp, 255, 0, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetFlowerGateGlowAlpha), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(EnableModel, MODEL_pica, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilitf, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_door_ura, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Call(MakeLerp, 255, 0, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(N(SetFlowerGateGlowAlpha), LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(EnableModel, MODEL_pica, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilitf, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_door_ura, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_Scene_FlowerGateAppears) = { #if VERSION_PAL - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(1.0 / DT), 266, 27, 373, 300, 15, -6) + Call(SetCamProperties, CAM_DEFAULT, Float(1.0 / DT), 266, 27, 373, 300, 15, -6) #else - EVT_CALL(SetCamProperties, CAM_DEFAULT, 1, 266, 27, 373, 300, 15, -6) + Call(SetCamProperties, CAM_DEFAULT, 1, 266, 27, 373, 300, 15, -6) #endif - EVT_EXEC(N(EVS_PlayFlowerGateSong)) - EVT_PLAY_EFFECT(EFFECT_LIGHT_RAYS, 0, 266, 50, 338, 1, LVar9) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitf, SOUND_FLOWER_GATE, SOUND_SPACE_DEFAULT) - EVT_EXEC_WAIT(N(EVS_FadeInFlowerGateGlowAlpha)) - EVT_THREAD - EVT_WAIT(10) - EVT_PLAY_EFFECT(EFFECT_FLOATING_FLOWER, 266, 50, 338, 100, 0) - EVT_WAIT(10) - EVT_PLAY_EFFECT(EFFECT_FLOATING_FLOWER, 240, 50, 338, 100, 0) - EVT_WAIT(10) - EVT_PLAY_EFFECT(EFFECT_FLOATING_FLOWER, 292, 50, 338, 100, 0) - EVT_END_THREAD - EVT_SET(LVar0, 3) - EVT_EXEC_GET_TID(N(EVS_ModulateFlowerGateGlowAlpha), LVar2) - EVT_WAIT(30 / DT) - EVT_CALL(EnableModel, MODEL_r_door, TRUE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitf, SOUND_WOODEN_DOOR_SPINNING, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 3060, 80, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_r_door, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(EnableModel, MODEL_r_door, FALSE) - EVT_CALL(EnableGroup, MODEL_to_flo, TRUE) - EVT_CALL(DismissEffect, LVar9) - EVT_CALL(PlaySoundAt, SOUND_WOODEN_DOOR_WAVES, SOUND_SPACE_DEFAULT, 266, 50, 338) - EVT_LOOP(3) - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 5, 266, 50, 338, 1, 20) - EVT_WAIT(5) - EVT_END_LOOP - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IS_THREAD_RUNNING(LVar2, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC_WAIT(N(EVS_FadeOutFlowerGateGlowAlpha)) + Exec(N(EVS_PlayFlowerGateSong)) + PlayEffect(EFFECT_LIGHT_RAYS, 0, 266, 50, 338, 1, LVar9) + Call(PlaySoundAtCollider, COLLIDER_deilitf, SOUND_FLOWER_GATE, SOUND_SPACE_DEFAULT) + ExecWait(N(EVS_FadeInFlowerGateGlowAlpha)) + Thread + Wait(10) + PlayEffect(EFFECT_FLOATING_FLOWER, 266, 50, 338, 100, 0) + Wait(10) + PlayEffect(EFFECT_FLOATING_FLOWER, 240, 50, 338, 100, 0) + Wait(10) + PlayEffect(EFFECT_FLOATING_FLOWER, 292, 50, 338, 100, 0) + EndThread + Set(LVar0, 3) + ExecGetTID(N(EVS_ModulateFlowerGateGlowAlpha), LVar2) + Wait(30 / DT) + Call(EnableModel, MODEL_r_door, TRUE) + Call(PlaySoundAtCollider, COLLIDER_deilitf, SOUND_WOODEN_DOOR_SPINNING, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 3060, 80, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_r_door, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(EnableModel, MODEL_r_door, FALSE) + Call(EnableGroup, MODEL_to_flo, TRUE) + Call(DismissEffect, LVar9) + Call(PlaySoundAt, SOUND_WOODEN_DOOR_WAVES, SOUND_SPACE_DEFAULT, 266, 50, 338) + Loop(3) + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 5, 266, 50, 338, 1, 20) + Wait(5) + EndLoop + Loop(0) + Wait(1) + IsThreadRunning(LVar2, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + ExecWait(N(EVS_FadeOutFlowerGateGlowAlpha)) #if VERSION_PAL - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(1 * DT)) + Call(ResetCam, CAM_DEFAULT, Float(1 * DT)) #else - EVT_CALL(ResetCam, CAM_DEFAULT, 1) + Call(ResetCam, CAM_DEFAULT, 1) #endif - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Exec(N(EVS_SetupMusic)) + Return + End }; s32 N(LetterList_MinhT_Unused)[] = { @@ -337,463 +337,463 @@ s32 N(ItemList_MagicalSeeds)[] = { }; EvtScript N(EVS_MinhT_PlantSeed) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SpeakToPlayer, NPC_MinhT, ANIM_MinhT_Talk, ANIM_MinhT_Idle, 0, LVar4) - EVT_WAIT(10 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 266, 27, 373) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 266, 27, 373) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SpeakToPlayer, NPC_MinhT, ANIM_MinhT_Talk, ANIM_MinhT_Idle, 0, LVar4) + Wait(10 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, 266, 27, 373) + Call(SetPanTarget, CAM_DEFAULT, 266, 27, 373) #if VERSION_PAL - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) #else - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 1) + Call(SetCamSpeed, CAM_DEFAULT, 1) #endif - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Run) - EVT_CALL(NpcMoveTo, NPC_SELF, 175, 444, 0) - EVT_CALL(NpcJump0, NPC_SELF, 200, 27, 435, 0) - EVT_SWITCH(LVar5) - EVT_CASE_EQ(0) - EVT_CALL(NpcMoveTo, NPC_SELF, 200, 407, 0) - EVT_CASE_EQ(1) - EVT_CALL(NpcMoveTo, NPC_SELF, 220, 420, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, 200, 270, 0) - EVT_CASE_EQ(2) - EVT_CALL(NpcMoveTo, NPC_SELF, 310, 420, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, 330, 270, 0) - EVT_CASE_EQ(3) - EVT_CALL(NpcMoveTo, NPC_SELF, 310, 420, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, 330, 407, 0) - EVT_END_SWITCH - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Cheer) - EVT_WAIT(20 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_PLANT_FLOWERS, SOUND_SPACE_DEFAULT) - EVT_SWITCH(LVar5) - EVT_CASE_EQ(0) - EVT_CALL(EnableModel, MODEL_o375, TRUE) - EVT_CALL(EnableModel, MODEL_o370, TRUE) - EVT_CASE_EQ(1) - EVT_CALL(EnableModel, MODEL_o377, TRUE) - EVT_CALL(EnableModel, MODEL_o372, TRUE) - EVT_CASE_EQ(2) - EVT_CALL(EnableModel, MODEL_o376, TRUE) - EVT_CALL(EnableModel, MODEL_o371, TRUE) - EVT_CASE_EQ(3) - EVT_CALL(EnableModel, MODEL_o378, TRUE) - EVT_CALL(EnableModel, MODEL_o373, TRUE) - EVT_END_SWITCH - EVT_IF_NE(LVar3, 3) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_END_THREAD - EVT_END_IF - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Run) - EVT_SWITCH(LVar5) - EVT_CASE_EQ(1) - EVT_CALL(NpcMoveTo, NPC_SELF, 220, 420, 0) - EVT_CASE_OR_EQ(2) - EVT_CASE_OR_EQ(3) - EVT_CALL(NpcMoveTo, NPC_SELF, 310, 420, 0) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(NpcMoveTo, NPC_SELF, 186, 425, 0) - EVT_CALL(NpcJump0, NPC_SELF, 175, 20, 444, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, 150, 480, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Idle) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_IF_EQ(LVar3, 3) - EVT_CALL(InterpNpcYaw, NPC_MinhT, 90, 0) - EVT_EXEC_WAIT(N(EVS_Scene_FlowerGateAppears)) - EVT_CALL(SpeakToPlayer, NPC_MinhT, ANIM_MinhT_Talk, ANIM_MinhT_Idle, 0, MSG_MAC_Plaza_0070) - EVT_SET(GB_StoryProgress, STORY_CH6_FLOWER_GATE_OPEN) - EVT_END_IF - EVT_RETURN - EVT_END + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(InterpNpcYaw, NPC_SELF, 90, 1) + Call(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Run) + Call(NpcMoveTo, NPC_SELF, 175, 444, 0) + Call(NpcJump0, NPC_SELF, 200, 27, 435, 0) + Switch(LVar5) + CaseEq(0) + Call(NpcMoveTo, NPC_SELF, 200, 407, 0) + CaseEq(1) + Call(NpcMoveTo, NPC_SELF, 220, 420, 0) + Call(NpcMoveTo, NPC_SELF, 200, 270, 0) + CaseEq(2) + Call(NpcMoveTo, NPC_SELF, 310, 420, 0) + Call(NpcMoveTo, NPC_SELF, 330, 270, 0) + CaseEq(3) + Call(NpcMoveTo, NPC_SELF, 310, 420, 0) + Call(NpcMoveTo, NPC_SELF, 330, 407, 0) + EndSwitch + Call(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Cheer) + Wait(20 * DT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_PLANT_FLOWERS, SOUND_SPACE_DEFAULT) + Switch(LVar5) + CaseEq(0) + Call(EnableModel, MODEL_o375, TRUE) + Call(EnableModel, MODEL_o370, TRUE) + CaseEq(1) + Call(EnableModel, MODEL_o377, TRUE) + Call(EnableModel, MODEL_o372, TRUE) + CaseEq(2) + Call(EnableModel, MODEL_o376, TRUE) + Call(EnableModel, MODEL_o371, TRUE) + CaseEq(3) + Call(EnableModel, MODEL_o378, TRUE) + Call(EnableModel, MODEL_o373, TRUE) + EndSwitch + IfNe(LVar3, 3) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + EndThread + EndIf + Call(InterpNpcYaw, NPC_SELF, 270, 1) + Call(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Run) + Switch(LVar5) + CaseEq(1) + Call(NpcMoveTo, NPC_SELF, 220, 420, 0) + CaseOrEq(2) + CaseOrEq(3) + Call(NpcMoveTo, NPC_SELF, 310, 420, 0) + EndCaseGroup + EndSwitch + Call(NpcMoveTo, NPC_SELF, 186, 425, 0) + Call(NpcJump0, NPC_SELF, 175, 20, 444, 0) + Call(NpcMoveTo, NPC_SELF, 150, 480, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Idle) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + IfEq(LVar3, 3) + Call(InterpNpcYaw, NPC_MinhT, 90, 0) + ExecWait(N(EVS_Scene_FlowerGateAppears)) + Call(SpeakToPlayer, NPC_MinhT, ANIM_MinhT_Talk, ANIM_MinhT_Idle, 0, MSG_MAC_Plaza_0070) + Set(GB_StoryProgress, STORY_CH6_FLOWER_GATE_OPEN) + EndIf + Return + End }; EvtScript N(D_80258FFC_81987C) = { - EVT_IF_NE(LVar5, 0) - EVT_CALL(SpeakToPlayer, NPC_MinhT, ANIM_MinhT_Talk, ANIM_MinhT_Idle, 0, MSG_MAC_Plaza_0075) - EVT_END_IF - EVT_SET(LVar0, EVT_PTR(N(ItemList_MagicalSeeds))) - EVT_SET(LVar1, 18) - EVT_EXEC_WAIT(N(EVS_ChooseKeyItem)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_RETURN - EVT_CASE_EQ(-1) - EVT_RETURN - EVT_CASE_EQ(ITEM_MAGICAL_SEED1) - EVT_SET(GF_MAC01_Planted_MagicalSeed1, TRUE) - EVT_SET(LVar4, MSG_MAC_Plaza_0076) - EVT_SET(LVar5, 0) - EVT_EXEC_WAIT(N(EVS_MinhT_PlantSeed)) - EVT_CASE_EQ(ITEM_MAGICAL_SEED2) - EVT_SET(GF_MAC01_Planted_MagicalSeed2, TRUE) - EVT_SET(LVar4, MSG_MAC_Plaza_0076) - EVT_SET(LVar5, 1) - EVT_EXEC_WAIT(N(EVS_MinhT_PlantSeed)) - EVT_CASE_EQ(ITEM_MAGICAL_SEED3) - EVT_SET(GF_MAC01_Planted_MagicalSeed3, TRUE) - EVT_SET(LVar4, MSG_MAC_Plaza_0076) - EVT_SET(LVar5, 2) - EVT_EXEC_WAIT(N(EVS_MinhT_PlantSeed)) - EVT_CASE_EQ(ITEM_MAGICAL_SEED4) - EVT_SET(GF_MAC01_Planted_MagicalSeed4, TRUE) - EVT_SET(LVar4, MSG_MAC_Plaza_0076) - EVT_SET(LVar5, 3) - EVT_EXEC_WAIT(N(EVS_MinhT_PlantSeed)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + IfNe(LVar5, 0) + Call(SpeakToPlayer, NPC_MinhT, ANIM_MinhT_Talk, ANIM_MinhT_Idle, 0, MSG_MAC_Plaza_0075) + EndIf + Set(LVar0, Ref(N(ItemList_MagicalSeeds))) + Set(LVar1, 18) + ExecWait(N(EVS_ChooseKeyItem)) + Switch(LVar0) + CaseEq(0) + Return + CaseEq(-1) + Return + CaseEq(ITEM_MAGICAL_SEED1) + Set(GF_MAC01_Planted_MagicalSeed1, TRUE) + Set(LVar4, MSG_MAC_Plaza_0076) + Set(LVar5, 0) + ExecWait(N(EVS_MinhT_PlantSeed)) + CaseEq(ITEM_MAGICAL_SEED2) + Set(GF_MAC01_Planted_MagicalSeed2, TRUE) + Set(LVar4, MSG_MAC_Plaza_0076) + Set(LVar5, 1) + ExecWait(N(EVS_MinhT_PlantSeed)) + CaseEq(ITEM_MAGICAL_SEED3) + Set(GF_MAC01_Planted_MagicalSeed3, TRUE) + Set(LVar4, MSG_MAC_Plaza_0076) + Set(LVar5, 2) + ExecWait(N(EVS_MinhT_PlantSeed)) + CaseEq(ITEM_MAGICAL_SEED4) + Set(GF_MAC01_Planted_MagicalSeed4, TRUE) + Set(LVar4, MSG_MAC_Plaza_0076) + Set(LVar5, 3) + ExecWait(N(EVS_MinhT_PlantSeed)) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_MinhT) = { - EVT_EXEC_WAIT(N(EVS_LetterPrompt_MinhT)) - EVT_EXEC_WAIT(N(EVS_LetterReward_MinhT)) - EVT_IF_NE(LVarC, 0) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar2, 0) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS) - EVT_SET(LVar0, MSG_MAC_Plaza_0065) - EVT_SET(LVar1, MSG_MAC_Plaza_0065) - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar2, 1) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, GF_MAC01_ChasedShyGuysFromGardenA) - EVT_ADD(LVar0, GF_MAC01_ChasedShyGuysFromGardenB) - EVT_IF_EQ(LVar0, 2) - EVT_SET(LVar2, 1) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Plaza_006D) - EVT_SET(LVar1, MSG_MAC_Plaza_006E) - EVT_END_IF - EVT_CASE_LT(STORY_CH6_FLOWER_GATE_OPEN) - EVT_SET(LVar2, 1) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_SET(LVar0, MSG_MAC_Plaza_0071) - EVT_SET(LVar1, MSG_MAC_Plaza_0071) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Plaza_0072) - EVT_SET(LVar1, MSG_MAC_Plaza_0072) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Plaza_0073) - EVT_SET(LVar1, MSG_MAC_Plaza_0073) - EVT_CASE_GE(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_Outro_0042) - EVT_SET(LVar1, MSG_Outro_0042) - EVT_END_SWITCH - EVT_IF_EQ(LVar2, 1) - EVT_SET(LVar3, GF_MAC01_Planted_MagicalSeed1) - EVT_ADD(LVar3, GF_MAC01_Planted_MagicalSeed2) - EVT_ADD(LVar3, GF_MAC01_Planted_MagicalSeed3) - EVT_ADD(LVar3, GF_MAC01_Planted_MagicalSeed4) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH5_STAR_SPRIT_DEPARTED, STORY_CH5_RETURNED_TO_TOAD_TOWN) - EVT_SET(LVar4, GF_MAC02_Gift_MagicalSeed1) - EVT_ADD(LVar4, GF_IWA02_Gift_MagicalSeed2) - EVT_ADD(LVar4, GF_MIM04_Gift_MagicalSeed3) - EVT_ADD(LVar4, GF_JAN03_Gift_MagicalSeed4) - EVT_SET(LVar5, GF_MAC01_HeardAboutBubulbs) - EVT_IF_EQ(LVar5, 0) - EVT_CALL(SpeakToPlayer, NPC_MinhT, ANIM_MinhT_Talk, ANIM_MinhT_Idle, 0, MSG_MAC_Plaza_0074) - EVT_SET(GF_MAC01_HeardAboutBubulbs, TRUE) - EVT_END_IF - EVT_IF_NE(LVar4, 0) - EVT_EXEC_WAIT(N(D_80258FFC_81987C)) - EVT_RETURN - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_MinhT, ANIM_MinhT_Talk, ANIM_MinhT_Idle, 0, MSG_MAC_Plaza_0075) - EVT_RETURN - EVT_END_SWITCH - EVT_SWITCH(LVar3) - EVT_CASE_EQ(0) - EVT_SET(LVar0, MSG_MAC_Plaza_0066) - EVT_SET(LVar1, MSG_MAC_Plaza_0066) - EVT_CASE_EQ(1) - EVT_SET(LVar0, MSG_MAC_Plaza_0068) - EVT_SET(LVar1, MSG_MAC_Plaza_0068) - EVT_CASE_EQ(2) - EVT_SET(LVar0, MSG_MAC_Plaza_006A) - EVT_SET(LVar1, MSG_MAC_Plaza_006A) - EVT_CASE_EQ(3) - EVT_SET(LVar0, MSG_MAC_Plaza_006C) - EVT_SET(LVar1, MSG_MAC_Plaza_006C) - EVT_END_SWITCH - EVT_END_IF - EVT_IF_EQ(AF_MAC_14, FALSE) - EVT_SET(AF_MAC_14, TRUE) - EVT_ELSE - EVT_SET(LVar0, LVar1) - EVT_SET(AF_MAC_14, FALSE) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_MinhT, ANIM_MinhT_Talk, ANIM_MinhT_Idle, 0, LVar0) - EVT_IF_EQ(LVar2, 1) - EVT_SET(LVar0, EVT_PTR(N(ItemList_MagicalSeeds))) - EVT_SET(LVar1, 18) - EVT_EXEC_WAIT(N(EVS_ChooseKeyItem)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_RETURN - EVT_CASE_EQ(-1) - EVT_RETURN - EVT_CASE_EQ(ITEM_MAGICAL_SEED1) - EVT_SET(GF_MAC01_Planted_MagicalSeed1, TRUE) - EVT_SET(LVar4, MSG_MAC_Plaza_0067) - EVT_SET(LVar5, 0) - EVT_EXEC_WAIT(N(EVS_MinhT_PlantSeed)) - EVT_CASE_EQ(ITEM_MAGICAL_SEED2) - EVT_SET(GF_MAC01_Planted_MagicalSeed2, TRUE) - EVT_SET(LVar4, MSG_MAC_Plaza_0069) - EVT_SET(LVar5, 1) - EVT_EXEC_WAIT(N(EVS_MinhT_PlantSeed)) - EVT_CASE_EQ(ITEM_MAGICAL_SEED3) - EVT_SET(GF_MAC01_Planted_MagicalSeed3, TRUE) - EVT_SET(LVar4, MSG_MAC_Plaza_006B) - EVT_SET(LVar5, 2) - EVT_EXEC_WAIT(N(EVS_MinhT_PlantSeed)) - EVT_CASE_EQ(ITEM_MAGICAL_SEED4) - EVT_SET(LVar5, 3) - EVT_EXEC_WAIT(N(EVS_MinhT_PlantSeed)) - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END + ExecWait(N(EVS_LetterPrompt_MinhT)) + ExecWait(N(EVS_LetterReward_MinhT)) + IfNe(LVarC, 0) + Return + EndIf + Set(LVar2, 0) + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_MET_STAR_SPIRITS) + Set(LVar0, MSG_MAC_Plaza_0065) + Set(LVar1, MSG_MAC_Plaza_0065) + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar2, 1) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Set(LVar0, GF_MAC01_ChasedShyGuysFromGardenA) + Add(LVar0, GF_MAC01_ChasedShyGuysFromGardenB) + IfEq(LVar0, 2) + Set(LVar2, 1) + Else + Set(LVar0, MSG_MAC_Plaza_006D) + Set(LVar1, MSG_MAC_Plaza_006E) + EndIf + CaseLt(STORY_CH6_FLOWER_GATE_OPEN) + Set(LVar2, 1) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Set(LVar0, MSG_MAC_Plaza_0071) + Set(LVar1, MSG_MAC_Plaza_0071) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Plaza_0072) + Set(LVar1, MSG_MAC_Plaza_0072) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Plaza_0073) + Set(LVar1, MSG_MAC_Plaza_0073) + CaseGe(STORY_EPILOGUE) + Set(LVar0, MSG_Outro_0042) + Set(LVar1, MSG_Outro_0042) + EndSwitch + IfEq(LVar2, 1) + Set(LVar3, GF_MAC01_Planted_MagicalSeed1) + Add(LVar3, GF_MAC01_Planted_MagicalSeed2) + Add(LVar3, GF_MAC01_Planted_MagicalSeed3) + Add(LVar3, GF_MAC01_Planted_MagicalSeed4) + Switch(GB_StoryProgress) + CaseRange(STORY_CH5_STAR_SPRIT_DEPARTED, STORY_CH5_RETURNED_TO_TOAD_TOWN) + Set(LVar4, GF_MAC02_Gift_MagicalSeed1) + Add(LVar4, GF_IWA02_Gift_MagicalSeed2) + Add(LVar4, GF_MIM04_Gift_MagicalSeed3) + Add(LVar4, GF_JAN03_Gift_MagicalSeed4) + Set(LVar5, GF_MAC01_HeardAboutBubulbs) + IfEq(LVar5, 0) + Call(SpeakToPlayer, NPC_MinhT, ANIM_MinhT_Talk, ANIM_MinhT_Idle, 0, MSG_MAC_Plaza_0074) + Set(GF_MAC01_HeardAboutBubulbs, TRUE) + EndIf + IfNe(LVar4, 0) + ExecWait(N(D_80258FFC_81987C)) + Return + EndIf + Call(SpeakToPlayer, NPC_MinhT, ANIM_MinhT_Talk, ANIM_MinhT_Idle, 0, MSG_MAC_Plaza_0075) + Return + EndSwitch + Switch(LVar3) + CaseEq(0) + Set(LVar0, MSG_MAC_Plaza_0066) + Set(LVar1, MSG_MAC_Plaza_0066) + CaseEq(1) + Set(LVar0, MSG_MAC_Plaza_0068) + Set(LVar1, MSG_MAC_Plaza_0068) + CaseEq(2) + Set(LVar0, MSG_MAC_Plaza_006A) + Set(LVar1, MSG_MAC_Plaza_006A) + CaseEq(3) + Set(LVar0, MSG_MAC_Plaza_006C) + Set(LVar1, MSG_MAC_Plaza_006C) + EndSwitch + EndIf + IfEq(AF_MAC_14, FALSE) + Set(AF_MAC_14, TRUE) + Else + Set(LVar0, LVar1) + Set(AF_MAC_14, FALSE) + EndIf + Call(SpeakToPlayer, NPC_MinhT, ANIM_MinhT_Talk, ANIM_MinhT_Idle, 0, LVar0) + IfEq(LVar2, 1) + Set(LVar0, Ref(N(ItemList_MagicalSeeds))) + Set(LVar1, 18) + ExecWait(N(EVS_ChooseKeyItem)) + Switch(LVar0) + CaseEq(0) + Return + CaseEq(-1) + Return + CaseEq(ITEM_MAGICAL_SEED1) + Set(GF_MAC01_Planted_MagicalSeed1, TRUE) + Set(LVar4, MSG_MAC_Plaza_0067) + Set(LVar5, 0) + ExecWait(N(EVS_MinhT_PlantSeed)) + CaseEq(ITEM_MAGICAL_SEED2) + Set(GF_MAC01_Planted_MagicalSeed2, TRUE) + Set(LVar4, MSG_MAC_Plaza_0069) + Set(LVar5, 1) + ExecWait(N(EVS_MinhT_PlantSeed)) + CaseEq(ITEM_MAGICAL_SEED3) + Set(GF_MAC01_Planted_MagicalSeed3, TRUE) + Set(LVar4, MSG_MAC_Plaza_006B) + Set(LVar5, 2) + ExecWait(N(EVS_MinhT_PlantSeed)) + CaseEq(ITEM_MAGICAL_SEED4) + Set(LVar5, 3) + ExecWait(N(EVS_MinhT_PlantSeed)) + EndSwitch + EndIf + Return + End }; EvtScript N(EVS_NpcAI_MinhT) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcIdle_MinhT) = { - EVT_THREAD - EVT_LOOP(0) - EVT_SET(LVar0, GF_MAC01_ChasedShyGuysFromGardenA) - EVT_ADD(LVar0, GF_MAC01_ChasedShyGuysFromGardenB) - EVT_IF_EQ(LVar0, 2) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Idle) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_400000, 0) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_MinhT))) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(3.0)) - EVT_ADD(LVar0, 25) - EVT_LOOP(0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Run) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Idle) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 7) - EVT_WAIT(10) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 7) - EVT_WAIT(10) - EVT_ADD(LVar0, -50) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Run) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Idle) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 7) - EVT_WAIT(10) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 7) - EVT_WAIT(10) - EVT_ADD(LVar0, 50) - EVT_END_LOOP - EVT_RETURN - EVT_END + Thread + Loop(0) + Set(LVar0, GF_MAC01_ChasedShyGuysFromGardenA) + Add(LVar0, GF_MAC01_ChasedShyGuysFromGardenB) + IfEq(LVar0, 2) + Call(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Idle) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_400000, 0) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_MinhT))) + BreakLoop + EndIf + Wait(1) + EndLoop + EndThread + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(SetNpcSpeed, NPC_SELF, Float(3.0)) + Add(LVar0, 25) + Loop(0) + Call(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Run) + Call(NpcMoveTo, NPC_SELF, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Idle) + Call(InterpNpcYaw, NPC_SELF, 270, 7) + Wait(10) + Call(InterpNpcYaw, NPC_SELF, 90, 7) + Wait(10) + Add(LVar0, -50) + Call(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Run) + Call(NpcMoveTo, NPC_SELF, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Idle) + Call(InterpNpcYaw, NPC_SELF, 90, 7) + Wait(10) + Call(InterpNpcYaw, NPC_SELF, 270, 7) + Wait(10) + Add(LVar0, 50) + EndLoop + Return + End }; EvtScript N(EVS_NpcInit_MinhT) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) - EVT_SET(GF_MAC01_ShyGuysTramplingGarden, TRUE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_400000, 1) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MinhT))) - EVT_END_SWITCH - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Idle) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_MinhT))) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseRange(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) + Set(GF_MAC01_ShyGuysTramplingGarden, TRUE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_400000, 1) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_MinhT))) + EndSwitch + Call(SetNpcAnimation, NPC_SELF, ANIM_MinhT_Idle) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_MinhT))) + Return + End }; // FLOWER GATE EvtScript N(EVS_ExitFlowerGate) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(2) - EVT_CALL(GetPlayerActionState, LVar3) - EVT_SET(LVar4, 0) - EVT_IF_EQ(LVar3, ACTION_STATE_IDLE) - EVT_ADD(LVar4, 1) - EVT_END_IF - EVT_IF_EQ(LVar3, ACTION_STATE_WALK) - EVT_ADD(LVar4, 1) - EVT_END_IF - EVT_IF_EQ(LVar3, ACTION_STATE_RUN) - EVT_ADD(LVar4, 1) - EVT_END_IF - EVT_IF_EQ(LVar4, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(SetPartnerTetherClose)) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitf, SOUND_FLOWER_GATE, SOUND_SPACE_DEFAULT) - EVT_EXEC_WAIT(N(EVS_FadeInFlowerGateGlowAlpha)) - EVT_SET(LVar0, 3) - EVT_EXEC_GET_TID(N(EVS_ModulateFlowerGateGlowAlpha), LVar2) - EVT_CALL(PlayerMoveTo, 300, 370, 15) - EVT_CALL(InterpPlayerYaw, -22, 0) - EVT_THREAD - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitf, SOUND_WOODEN_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, -120, 15, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_to_flo, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(45) - EVT_CALL(MakeLerp, -120, 0, 15, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_to_flo, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitf, SOUND_WOODEN_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_WAIT(15) - EVT_CALL(PlayerMoveTo, 257, 300, 30) - EVT_WAIT(60) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerPos, 0, -500, 0) - EVT_CALL(N(ResetPartnerTetherDist)) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, 0, -500, 0) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IS_THREAD_RUNNING(LVar2, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitf, SOUND_FLOWER_GATE | SOUND_ID_TRIGGER_CHANGE_SOUND, SOUND_SPACE_DEFAULT) - EVT_EXEC_WAIT(N(EVS_FadeOutFlowerGateGlowAlpha)) - EVT_CALL(EnableGroup, MODEL_to_flo, FALSE) - EVT_CALL(EnableGroup, MODEL_r_door, TRUE) - EVT_CALL(MakeLerp, 180, 360, 20, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_r_door, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_r_gate, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_IF_EQ(GF_StartedChapter6, FALSE) - EVT_SET(GF_StartedChapter6, TRUE) - EVT_CALL(FadeOutMusic, 0, 1500) - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_22"), kmr_22_ENTRY_6, TRANSITION_BEGIN_OR_END_CHAPTER) - EVT_WAIT(100) - EVT_RETURN - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("flo_00"), flo_00_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Wait(2) + Call(GetPlayerActionState, LVar3) + Set(LVar4, 0) + IfEq(LVar3, ACTION_STATE_IDLE) + Add(LVar4, 1) + EndIf + IfEq(LVar3, ACTION_STATE_WALK) + Add(LVar4, 1) + EndIf + IfEq(LVar3, ACTION_STATE_RUN) + Add(LVar4, 1) + EndIf + IfEq(LVar4, 0) + Call(DisablePlayerInput, FALSE) + Return + EndIf + Call(N(SetPartnerTetherClose)) + Call(PlaySoundAtCollider, COLLIDER_deilitf, SOUND_FLOWER_GATE, SOUND_SPACE_DEFAULT) + ExecWait(N(EVS_FadeInFlowerGateGlowAlpha)) + Set(LVar0, 3) + ExecGetTID(N(EVS_ModulateFlowerGateGlowAlpha), LVar2) + Call(PlayerMoveTo, 300, 370, 15) + Call(InterpPlayerYaw, -22, 0) + Thread + Call(PlaySoundAtCollider, COLLIDER_deilitf, SOUND_WOODEN_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, -120, 15, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_to_flo, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(45) + Call(MakeLerp, -120, 0, 15, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_to_flo, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_deilitf, SOUND_WOODEN_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + EndThread + Wait(15) + Call(PlayerMoveTo, 257, 300, 30) + Wait(60) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerPos, 0, -500, 0) + Call(N(ResetPartnerTetherDist)) + Call(DisablePartnerAI, 0) + Call(SetNpcPos, NPC_PARTNER, 0, -500, 0) + Loop(0) + Wait(1) + IsThreadRunning(LVar2, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_deilitf, SOUND_FLOWER_GATE | SOUND_ID_TRIGGER_CHANGE_SOUND, SOUND_SPACE_DEFAULT) + ExecWait(N(EVS_FadeOutFlowerGateGlowAlpha)) + Call(EnableGroup, MODEL_to_flo, FALSE) + Call(EnableGroup, MODEL_r_door, TRUE) + Call(MakeLerp, 180, 360, 20, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_r_door, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_r_gate, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + IfEq(GF_StartedChapter6, FALSE) + Set(GF_StartedChapter6, TRUE) + Call(FadeOutMusic, 0, 1500) + Call(GotoMapSpecial, Ref("kmr_22"), kmr_22_ENTRY_6, TRANSITION_BEGIN_OR_END_CHAPTER) + Wait(100) + Return + EndIf + Call(GotoMap, Ref("flo_00"), flo_00_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_EnterFlowerGate) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterpPlayerYaw, 180, 2) - EVT_CALL(SetPlayerPos, 264, 27, 320) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, 264, 27, 320) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitf, SOUND_FLOWER_GATE, SOUND_SPACE_DEFAULT) - EVT_EXEC_WAIT(N(EVS_FadeInFlowerGateGlowAlpha)) - EVT_SET(LVar0, 2) - EVT_EXEC_GET_TID(N(EVS_ModulateFlowerGateGlowAlpha), LVar2) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitf, SOUND_WOODEN_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, -120, 15, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_to_flo, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(EnablePartnerAI) - EVT_CALL(N(SetPartnerTetherClose)) - EVT_CALL(PlayerMoveTo, 264, 407, 30) - EVT_CALL(MakeLerp, -120, 0, 15, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_to_flo, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitf, SOUND_WOODEN_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IS_THREAD_RUNNING(LVar2, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_stopper, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(N(ResetPartnerTetherDist)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilitf, SOUND_FLOWER_GATE | SOUND_ID_TRIGGER_CHANGE_SOUND, SOUND_SPACE_DEFAULT) - EVT_EXEC_WAIT(N(EVS_FadeOutFlowerGateGlowAlpha)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_stopper, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(InterpPlayerYaw, 180, 2) + Call(SetPlayerPos, 264, 27, 320) + Call(DisablePartnerAI, 0) + Call(SetNpcPos, NPC_PARTNER, 264, 27, 320) + Call(PlaySoundAtCollider, COLLIDER_deilitf, SOUND_FLOWER_GATE, SOUND_SPACE_DEFAULT) + ExecWait(N(EVS_FadeInFlowerGateGlowAlpha)) + Set(LVar0, 2) + ExecGetTID(N(EVS_ModulateFlowerGateGlowAlpha), LVar2) + Call(PlaySoundAtCollider, COLLIDER_deilitf, SOUND_WOODEN_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, -120, 15, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_to_flo, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(EnablePartnerAI) + Call(N(SetPartnerTetherClose)) + Call(PlayerMoveTo, 264, 407, 30) + Call(MakeLerp, -120, 0, 15, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_to_flo, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_deilitf, SOUND_WOODEN_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Loop(0) + Wait(1) + IsThreadRunning(LVar2, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_stopper, COLLIDER_FLAGS_UPPER_MASK) + Call(N(ResetPartnerTetherDist)) + Call(DisablePlayerInput, FALSE) + Call(PlaySoundAtCollider, COLLIDER_deilitf, SOUND_FLOWER_GATE | SOUND_ID_TRIGGER_CHANGE_SOUND, SOUND_SPACE_DEFAULT) + ExecWait(N(EVS_FadeOutFlowerGateGlowAlpha)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_stopper, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_SetupFlowerModels) = { - EVT_IF_EQ(GF_MAC01_Planted_MagicalSeed1, FALSE) - EVT_CALL(EnableModel, MODEL_o375, FALSE) - EVT_CALL(EnableModel, MODEL_o370, FALSE) - EVT_END_IF - EVT_IF_EQ(GF_MAC01_Planted_MagicalSeed2, FALSE) - EVT_CALL(EnableModel, MODEL_o377, FALSE) - EVT_CALL(EnableModel, MODEL_o372, FALSE) - EVT_END_IF - EVT_IF_EQ(GF_MAC01_Planted_MagicalSeed3, FALSE) - EVT_CALL(EnableModel, MODEL_o376, FALSE) - EVT_CALL(EnableModel, MODEL_o371, FALSE) - EVT_END_IF - EVT_IF_EQ(GF_MAC01_Planted_MagicalSeed4, FALSE) - EVT_CALL(EnableModel, MODEL_o378, FALSE) - EVT_CALL(EnableModel, MODEL_o373, FALSE) - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH6_FLOWER_GATE_OPEN) - EVT_CALL(EnableGroup, MODEL_to_flo, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitf, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_door_ura, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_stopper, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_pica, FALSE) - EVT_CALL(EnableModel, MODEL_r_door, FALSE) - EVT_RETURN - EVT_END + IfEq(GF_MAC01_Planted_MagicalSeed1, FALSE) + Call(EnableModel, MODEL_o375, FALSE) + Call(EnableModel, MODEL_o370, FALSE) + EndIf + IfEq(GF_MAC01_Planted_MagicalSeed2, FALSE) + Call(EnableModel, MODEL_o377, FALSE) + Call(EnableModel, MODEL_o372, FALSE) + EndIf + IfEq(GF_MAC01_Planted_MagicalSeed3, FALSE) + Call(EnableModel, MODEL_o376, FALSE) + Call(EnableModel, MODEL_o371, FALSE) + EndIf + IfEq(GF_MAC01_Planted_MagicalSeed4, FALSE) + Call(EnableModel, MODEL_o378, FALSE) + Call(EnableModel, MODEL_o373, FALSE) + EndIf + IfLt(GB_StoryProgress, STORY_CH6_FLOWER_GATE_OPEN) + Call(EnableGroup, MODEL_to_flo, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitf, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_door_ura, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_stopper, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_pica, FALSE) + Call(EnableModel, MODEL_r_door, FALSE) + Return + End }; diff --git a/src/world/area_mac/mac_01/npc/post_office.inc.c b/src/world/area_mac/mac_01/npc/post_office.inc.c index e9e9bcf8d65..b765b21e4d4 100644 --- a/src/world/area_mac/mac_01/npc/post_office.inc.c +++ b/src/world/area_mac/mac_01/npc/post_office.inc.c @@ -228,181 +228,181 @@ s32 N(ItemList_Mailbag)[] = { }; EvtScript N(EVS_ItemPrompt_Mailbag) = { - EVT_CALL(FindKeyItem, ITEM_MAILBAG, LVar0) - EVT_IF_EQ(LVar0, -1) - EVT_CALL(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_0060) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_0061) - EVT_SET(LVar0, EVT_PTR(N(ItemList_Mailbag))) - EVT_SET(LVar1, 3) - EVT_EXEC_WAIT(N(EVS_ChooseKeyItem)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(-1) - EVT_CALL(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_0063) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_0062) - EVT_SET(GF_MAC01_MailbagReturned, TRUE) - EVT_WAIT(10) + Call(FindKeyItem, ITEM_MAILBAG, LVar0) + IfEq(LVar0, -1) + Call(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_0060) + Else + Call(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_0061) + Set(LVar0, Ref(N(ItemList_Mailbag))) + Set(LVar1, 3) + ExecWait(N(EVS_ChooseKeyItem)) + Switch(LVar0) + CaseEq(-1) + Call(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_0063) + CaseDefault + Call(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_0062) + Set(GF_MAC01_MailbagReturned, TRUE) + Wait(10) EVT_GIVE_STAR_PIECE() - EVT_WAIT(10) - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END + Wait(10) + EndSwitch + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Postmaster) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC01_MailbagReturned, FALSE) - EVT_EXEC_WAIT(N(EVS_ItemPrompt_Mailbag)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(GF_MAC01_Met_Postmaster, FALSE) - EVT_SET(GF_MAC01_Met_Postmaster, TRUE) - EVT_CALL(N(func_80244E90_805710)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(-1) - EVT_RETURN - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_0055) - EVT_END_SWITCH - EVT_ELSE - EVT_CALL(N(func_80244E90_805710)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(-1) - EVT_RETURN - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_0057) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_0056) - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(N(func_80245018_805898)) - EVT_LABEL(0) - EVT_CALL(N(func_80245028_8058A8)) - EVT_WAIT(5) - EVT_IF_EQ(LVar1, -1) - EVT_CALL(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_0059) - EVT_CALL(ShowChoice, MSG_Choice_000D) - EVT_CALL(CloseMessage) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(99) - EVT_ELSE - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_SET(LVarA, LVar1) - EVT_CALL(N(func_8024522C_805AAC)) - EVT_WAIT(5) - EVT_IF_EQ(LVar1, -1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(N(func_80245440_805CC0)) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(30) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 1) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_005C) - EVT_CALL(ShowMessageAtScreenPos, LVar0, 160, 40) - EVT_WAIT(5) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_DEFEATED_JR_TROOPA) - EVT_GOTO(99) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_005A) - EVT_CALL(ShowChoice, MSG_Choice_000D) - EVT_CALL(CloseMessage) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_LABEL(99) - EVT_IF_EQ(GF_MAC01_CheckedForLetters, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_005D) - EVT_SET(GF_MAC01_CheckedForLetters, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_005E) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC01_MailbagReturned, FALSE) + ExecWait(N(EVS_ItemPrompt_Mailbag)) + Return + EndIf + EndIf + IfEq(GF_MAC01_Met_Postmaster, FALSE) + Set(GF_MAC01_Met_Postmaster, TRUE) + Call(N(func_80244E90_805710)) + Switch(LVar0) + CaseEq(-1) + Return + CaseEq(1) + Call(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_0055) + EndSwitch + Else + Call(N(func_80244E90_805710)) + Switch(LVar0) + CaseEq(-1) + Return + CaseEq(0) + Call(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_0057) + CaseEq(1) + Call(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_0056) + EndSwitch + EndIf + Call(N(func_80245018_805898)) + Label(0) + Call(N(func_80245028_8058A8)) + Wait(5) + IfEq(LVar1, -1) + Call(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_0059) + Call(ShowChoice, MSG_Choice_000D) + Call(CloseMessage) + IfEq(LVar0, 0) + Goto(99) + Else + Goto(0) + EndIf + EndIf + Set(LVarA, LVar1) + Call(N(func_8024522C_805AAC)) + Wait(5) + IfEq(LVar1, -1) + Goto(0) + EndIf + Call(N(func_80245440_805CC0)) + IfEq(LVar1, 1) + Wait(30) + Call(InterpNpcYaw, NPC_PARTNER, 90, 1) + EndIf + Call(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_005C) + Call(ShowMessageAtScreenPos, LVar0, 160, 40) + Wait(5) + IfLt(GB_StoryProgress, STORY_CH1_DEFEATED_JR_TROOPA) + Goto(99) + EndIf + Call(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_005A) + Call(ShowChoice, MSG_Choice_000D) + Call(CloseMessage) + IfEq(LVar0, 0) + Goto(0) + EndIf + Label(99) + IfEq(GF_MAC01_CheckedForLetters, FALSE) + Call(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_005D) + Set(GF_MAC01_CheckedForLetters, TRUE) + Else + Call(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_MAC_Plaza_005E) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Postmaster_Epilogue) = { - EVT_CALL(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_Outro_0043) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_Idle, 0, MSG_Outro_0043) + Return + End }; EvtScript N(EVS_NpcInit_Postmaster) = { - EVT_CALL(SetNpcCollisionSize, NPC_SELF, 36, 42) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_GE(STORY_EPILOGUE) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Postmaster_Epilogue))) - EVT_CASE_DEFAULT - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Postmaster))) - EVT_END_SWITCH - EVT_IF_GE(GB_StoryProgress, STORY_CH3_BOW_JOINED_PARTY) - EVT_SET(GF_MAC01_UnlockedLetter_01, TRUE) - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH5_REACHED_LAVA_LAVA_ISLAND) - EVT_SET(GF_MAC01_UnlockedLetter_00, TRUE) - EVT_END_IF - EVT_SET(GF_MAC01_UnlockedLetter_02, TRUE) - EVT_IF_GE(GB_StoryProgress, STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_SET(GF_MAC01_UnlockedLetter_05, TRUE) - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_SET(GF_MAC01_UnlockedLetter_04, TRUE) - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH6_RETURNED_TO_TOAD_TOWN) - EVT_SET(GF_MAC01_UnlockedLetter_03, TRUE) - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH5_RETURNED_TO_TOAD_TOWN) - EVT_SET(GF_MAC01_UnlockedLetter_08, TRUE) - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST) - EVT_SET(GF_MAC01_UnlockedLetter_06, TRUE) - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH7_RAISED_FROZEN_STAIRS) - EVT_SET(GF_MAC01_UnlockedLetter_07, TRUE) - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_SET(GF_MAC01_UnlockedLetter_09, TRUE) - EVT_END_IF - EVT_IF_GE(GB_IWA00_Whacka_HitCount, 2) - EVT_SET(GF_MAC01_UnlockedLetter_0A, TRUE) - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH5_RETURNED_TO_TOAD_TOWN) - EVT_SET(GF_MAC01_UnlockedLetter_0B, TRUE) - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) - EVT_SET(GF_MAC01_UnlockedLetter_0C, TRUE) - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(GF_MAC01_UnlockedLetter_0D, TRUE) - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH5_RETURNED_TO_TOAD_TOWN) - EVT_SET(GF_MAC01_UnlockedLetter_0E, TRUE) - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(GF_MAC01_UnlockedLetter_10, TRUE) - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH8_REACHED_STAR_HAVEN) - EVT_SET(GF_MAC01_UnlockedLetter_0F, TRUE) - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH6_RETURNED_TO_TOAD_TOWN) - EVT_SET(GF_MAC01_UnlockedLetter_12, TRUE) - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(GF_MAC01_UnlockedLetter_11, TRUE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetNpcCollisionSize, NPC_SELF, 36, 42) + Switch(GB_StoryProgress) + CaseGe(STORY_EPILOGUE) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Postmaster_Epilogue))) + CaseDefault + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Postmaster))) + EndSwitch + IfGe(GB_StoryProgress, STORY_CH3_BOW_JOINED_PARTY) + Set(GF_MAC01_UnlockedLetter_01, TRUE) + EndIf + IfGe(GB_StoryProgress, STORY_CH5_REACHED_LAVA_LAVA_ISLAND) + Set(GF_MAC01_UnlockedLetter_00, TRUE) + EndIf + Set(GF_MAC01_UnlockedLetter_02, TRUE) + IfGe(GB_StoryProgress, STORY_CH1_STAR_SPRIT_DEPARTED) + Set(GF_MAC01_UnlockedLetter_05, TRUE) + EndIf + IfGe(GB_StoryProgress, STORY_CH4_STAR_SPRIT_DEPARTED) + Set(GF_MAC01_UnlockedLetter_04, TRUE) + EndIf + IfGe(GB_StoryProgress, STORY_CH6_RETURNED_TO_TOAD_TOWN) + Set(GF_MAC01_UnlockedLetter_03, TRUE) + EndIf + IfGe(GB_StoryProgress, STORY_CH5_RETURNED_TO_TOAD_TOWN) + Set(GF_MAC01_UnlockedLetter_08, TRUE) + EndIf + IfGe(GB_StoryProgress, STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST) + Set(GF_MAC01_UnlockedLetter_06, TRUE) + EndIf + IfGe(GB_StoryProgress, STORY_CH7_RAISED_FROZEN_STAIRS) + Set(GF_MAC01_UnlockedLetter_07, TRUE) + EndIf + IfGe(GB_StoryProgress, STORY_CH4_STAR_SPRIT_DEPARTED) + Set(GF_MAC01_UnlockedLetter_09, TRUE) + EndIf + IfGe(GB_IWA00_Whacka_HitCount, 2) + Set(GF_MAC01_UnlockedLetter_0A, TRUE) + EndIf + IfGe(GB_StoryProgress, STORY_CH5_RETURNED_TO_TOAD_TOWN) + Set(GF_MAC01_UnlockedLetter_0B, TRUE) + EndIf + IfGe(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) + Set(GF_MAC01_UnlockedLetter_0C, TRUE) + EndIf + IfGe(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) + Set(GF_MAC01_UnlockedLetter_0D, TRUE) + EndIf + IfGe(GB_StoryProgress, STORY_CH5_RETURNED_TO_TOAD_TOWN) + Set(GF_MAC01_UnlockedLetter_0E, TRUE) + EndIf + IfGe(GB_StoryProgress, STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(GF_MAC01_UnlockedLetter_10, TRUE) + EndIf + IfGe(GB_StoryProgress, STORY_CH8_REACHED_STAR_HAVEN) + Set(GF_MAC01_UnlockedLetter_0F, TRUE) + EndIf + IfGe(GB_StoryProgress, STORY_CH6_RETURNED_TO_TOAD_TOWN) + Set(GF_MAC01_UnlockedLetter_12, TRUE) + EndIf + IfGe(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) + Set(GF_MAC01_UnlockedLetter_11, TRUE) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Parakarry) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_MAC_Plaza_0064) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_MAC_Plaza_0064) + Return + End }; AnimID N(ExtraAnims_Parakarry)[] = { @@ -413,65 +413,65 @@ AnimID N(ExtraAnims_Parakarry)[] = { }; EvtScript N(EVS_NpcInit_Parakarry) = { - EVT_CALL(SetNpcCollisionSize, NPC_SELF, 37, 26) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Parakarry))) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldParakarry_Idle) - EVT_RETURN - EVT_END + Call(SetNpcCollisionSize, NPC_SELF, 37, 26) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Parakarry))) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldParakarry_Idle) + Return + End }; EvtScript N(EVS_CarryItem_PostOfficeShyGuy) = { - EVT_CALL(GetNpcPos, NPC_PostOfficeShyGuy, LVar2, LVar3, LVar4) - EVT_ADD(LVar3, 20) - EVT_CALL(MakeItemEntity, ITEM_MAILBAG, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVar9, LVar0) - EVT_WAIT(1) - EVT_LOOP(140) - EVT_CALL(GetNpcPos, NPC_PostOfficeShyGuy, LVar2, LVar3, LVar4) - EVT_ADD(LVar3, 20) - EVT_CALL(SetItemPos, LVar9, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(RemoveItemEntity, LVar9) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_PostOfficeShyGuy, LVar2, LVar3, LVar4) + Add(LVar3, 20) + Call(MakeItemEntity, ITEM_MAILBAG, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVar9, LVar0) + Wait(1) + Loop(140) + Call(GetNpcPos, NPC_PostOfficeShyGuy, LVar2, LVar3, LVar4) + Add(LVar3, 20) + Call(SetItemPos, LVar9, LVar2, LVar3, LVar4) + Wait(1) + EndLoop + Call(RemoveItemEntity, LVar9) + Return + End }; EvtScript N(EVS_PostOfficeShyGuy_Escape) = { - EVT_CALL(SetNpcPos, NPC_PostOfficeShyGuy, 357, 20, -440) - EVT_CALL(SetNpcAnimation, NPC_PostOfficeShyGuy, ANIM_ShyGuy_Red_Anim04) - EVT_EXEC(N(EVS_CarryItem_PostOfficeShyGuy)) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(60) - EVT_CALL(PlaySoundAtNpc, NPC_PostOfficeShyGuy, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_PostOfficeShyGuy, 247, 20, -440, 20) - EVT_SET(LVar0, 6) - EVT_CALL(PlaySoundAtNpc, LVar0, SOUND_SHY_GUY_RUN_AWAY, SOUND_SPACE_DEFAULT) - EVT_EXEC_GET_TID(N(D_8024E6F8_80EF78), LVarA) - EVT_CALL(NpcMoveTo, NPC_PostOfficeShyGuy, 180, -410, 20) - EVT_CALL(NpcMoveTo, NPC_PostOfficeShyGuy, 150, -333, 8) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetNpcPos, NPC_PostOfficeShyGuy, NPC_DISPOSE_LOCATION) - EVT_SET(GF_MAC01_MailbagStolen, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_PostOfficeShyGuy, 357, 20, -440) + Call(SetNpcAnimation, NPC_PostOfficeShyGuy, ANIM_ShyGuy_Red_Anim04) + Exec(N(EVS_CarryItem_PostOfficeShyGuy)) + Call(DisablePlayerInput, TRUE) + Wait(60) + Call(PlaySoundAtNpc, NPC_PostOfficeShyGuy, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_PostOfficeShyGuy, 247, 20, -440, 20) + Set(LVar0, 6) + Call(PlaySoundAtNpc, LVar0, SOUND_SHY_GUY_RUN_AWAY, SOUND_SPACE_DEFAULT) + ExecGetTID(N(D_8024E6F8_80EF78), LVarA) + Call(NpcMoveTo, NPC_PostOfficeShyGuy, 180, -410, 20) + Call(NpcMoveTo, NPC_PostOfficeShyGuy, 150, -333, 8) + KillThread(LVarA) + Call(SetNpcPos, NPC_PostOfficeShyGuy, NPC_DISPOSE_LOCATION) + Set(GF_MAC01_MailbagStolen, TRUE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Scene_MailbagTheft) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) - EVT_RETURN - EVT_END_IF - EVT_IF_GT(GB_StoryProgress, STORY_CH4_STAR_SPIRIT_RESCUED) - EVT_RETURN - EVT_END_IF - EVT_IF_NE(GF_MAC01_MailbagStolen, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_IdleAlt, 0, MSG_MAC_Plaza_005F) - EVT_EXEC(N(EVS_PostOfficeShyGuy_Escape)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) + Return + EndIf + IfGt(GB_StoryProgress, STORY_CH4_STAR_SPIRIT_RESCUED) + Return + EndIf + IfNe(GF_MAC01_MailbagStolen, FALSE) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(SpeakToPlayer, NPC_Postmaster, ANIM_Postmaster_Talk, ANIM_Postmaster_IdleAlt, 0, MSG_MAC_Plaza_005F) + Exec(N(EVS_PostOfficeShyGuy_Escape)) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_mac/mac_01/npc/read_fortune.inc.c b/src/world/area_mac/mac_01/npc/read_fortune.inc.c index 496a93f63ad..326bb0bfad9 100644 --- a/src/world/area_mac/mac_01/npc/read_fortune.inc.c +++ b/src/world/area_mac/mac_01/npc/read_fortune.inc.c @@ -139,355 +139,355 @@ API_CALLABLE(N(func_802446AC_804F2C)) { } EvtScript N(EVS_Merlon_AnimateDiscoBall) = { - EVT_CALL(EnableModel, MODEL_mirrorball, TRUE) - EVT_SET(LVar0, 328) - EVT_SET(LVar1, 0) - EVT_LOOP(50) - EVT_ADD(LVar0, -2) - EVT_CALL(TranslateModel, MODEL_mirrorball, -590, LVar0, -646) - EVT_ADD(LVar1, 3) - EVT_IF_GE(LVar1, 360) - EVT_ADD(LVar1, -360) - EVT_END_IF - EVT_CALL(RotateModel, MODEL_mirrorball, LVar1, 0, 1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(0) - EVT_CALL(TranslateModel, MODEL_mirrorball, -590, LVar0, -646) - EVT_ADD(LVar1, 3) - EVT_IF_GE(LVar1, 360) - EVT_ADD(LVar1, -360) - EVT_END_IF - EVT_CALL(RotateModel, MODEL_mirrorball, LVar1, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(ArrayVar(6), 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(150) - EVT_ADD(LVar0, 0) - EVT_CALL(TranslateModel, MODEL_mirrorball, -590, LVar0, -646) - EVT_ADD(LVar1, 6) - EVT_IF_GE(LVar1, 360) - EVT_ADD(LVar1, -360) - EVT_END_IF - EVT_CALL(RotateModel, MODEL_mirrorball, LVar1, 0, 1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(0) - EVT_CALL(TranslateModel, MODEL_mirrorball, -590, LVar0, -646) - EVT_ADD(LVar1, 3) - EVT_IF_GE(LVar1, 360) - EVT_ADD(LVar1, -360) - EVT_END_IF - EVT_CALL(RotateModel, MODEL_mirrorball, LVar1, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(ArrayVar(6), 2) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(50) - EVT_ADD(LVar0, 2) - EVT_CALL(TranslateModel, MODEL_mirrorball, -590, LVar0, -646) - EVT_ADD(LVar1, 3) - EVT_IF_GE(LVar1, 360) - EVT_ADD(LVar1, -360) - EVT_END_IF - EVT_CALL(RotateModel, MODEL_mirrorball, LVar1, 0, 1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EnableModel, MODEL_mirrorball, FALSE) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_mirrorball, TRUE) + Set(LVar0, 328) + Set(LVar1, 0) + Loop(50) + Add(LVar0, -2) + Call(TranslateModel, MODEL_mirrorball, -590, LVar0, -646) + Add(LVar1, 3) + IfGe(LVar1, 360) + Add(LVar1, -360) + EndIf + Call(RotateModel, MODEL_mirrorball, LVar1, 0, 1, 0) + Wait(1) + EndLoop + Loop(0) + Call(TranslateModel, MODEL_mirrorball, -590, LVar0, -646) + Add(LVar1, 3) + IfGe(LVar1, 360) + Add(LVar1, -360) + EndIf + Call(RotateModel, MODEL_mirrorball, LVar1, 0, 1, 0) + Wait(1) + IfEq(ArrayVar(6), 1) + BreakLoop + EndIf + Wait(1) + EndLoop + Loop(150) + Add(LVar0, 0) + Call(TranslateModel, MODEL_mirrorball, -590, LVar0, -646) + Add(LVar1, 6) + IfGe(LVar1, 360) + Add(LVar1, -360) + EndIf + Call(RotateModel, MODEL_mirrorball, LVar1, 0, 1, 0) + Wait(1) + EndLoop + Loop(0) + Call(TranslateModel, MODEL_mirrorball, -590, LVar0, -646) + Add(LVar1, 3) + IfGe(LVar1, 360) + Add(LVar1, -360) + EndIf + Call(RotateModel, MODEL_mirrorball, LVar1, 0, 1, 0) + Wait(1) + IfEq(ArrayVar(6), 2) + BreakLoop + EndIf + Wait(1) + EndLoop + Loop(50) + Add(LVar0, 2) + Call(TranslateModel, MODEL_mirrorball, -590, LVar0, -646) + Add(LVar1, 3) + IfGe(LVar1, 360) + Add(LVar1, -360) + EndIf + Call(RotateModel, MODEL_mirrorball, LVar1, 0, 1, 0) + Wait(1) + EndLoop + Call(EnableModel, MODEL_mirrorball, FALSE) + Return + End }; EvtScript N(EVS_Merlon_ReadFortuneFX) = { - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_RaiseArms) - EVT_CALL(GetModelCenter, MODEL_tama) - EVT_CALL(PlaySoundAt, SOUND_LRAW_CRYSTAL_BALL_GLOW, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), -1) - EVT_SET(ArrayVar(1), LVarF) - EVT_WAIT(30) - EVT_SET(ArrayVar(6), 0) - EVT_EXEC(N(EVS_Merlon_AnimateDiscoBall)) - EVT_WAIT(30) - EVT_THREAD - EVT_CALL(N(func_802440FC_80497C)) - EVT_END_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(GetCamDistance, CAM_DEFAULT, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_SETF(LVar0, EVT_FLOAT(284.6)) - EVT_ELSE - EVT_SETF(LVar0, EVT_FLOAT(-284.6)) - EVT_END_IF - EVT_CALL(SetCamDistance, CAM_DEFAULT, LVar0) - EVT_CALL(GetCamPitch, CAM_DEFAULT, LVar0, LVar1) - EVT_SETF(LVar1, EVT_FLOAT(-11.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, LVar0, LVar1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_SET(ArrayVar(6), 1) - EVT_PLAY_EFFECT(EFFECT_MERLIN_HOUSE_STARS, 0, -298, 21, -330) - EVT_SET(ArrayVar(2), LVarF) - EVT_CALL(GetModelCenter, MODEL_tama) - EVT_PLAY_EFFECT(EFFECT_MOTION_BLUR_FLAME, 0, LVar0, LVar1, LVar2, 1, -1) - EVT_SET(ArrayVar(3), LVarF) - EVT_PLAY_EFFECT(EFFECT_MOTION_BLUR_FLAME, 0, LVar0, LVar1, LVar2, 1, -1) - EVT_SET(ArrayVar(4), LVarF) - EVT_PLAY_EFFECT(EFFECT_MOTION_BLUR_FLAME, 0, LVar0, LVar1, LVar2, 1, -1) - EVT_SET(ArrayVar(5), LVarF) - EVT_THREAD - EVT_CALL(N(func_802443E0_804C60)) - EVT_END_THREAD - EVT_WAIT(50) - EVT_CALL(GetModelCenter, MODEL_tama) - EVT_CALL(PlaySoundAt, SOUND_CRYSTAL_BALL_WAVE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 3, LVar0, LVar1, LVar2, EVT_FLOAT(0.5), 20) - EVT_WAIT(30) - EVT_CALL(GetModelCenter, MODEL_tama) - EVT_CALL(PlaySoundAt, SOUND_CRYSTAL_BALL_WAVE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 3, LVar0, LVar1, LVar2, EVT_FLOAT(0.5), 20) - EVT_WAIT(30) - EVT_THREAD - EVT_CALL(N(func_802441EC_804A6C)) - EVT_END_THREAD - EVT_CALL(GetModelCenter, MODEL_tama) - EVT_CALL(PlaySoundAt, SOUND_CRYSTAL_BALL_WAVE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, EVT_FLOAT(0.5), 20) - EVT_WAIT(70) - EVT_CALL(DismissEffect, ArrayVar(2)) - EVT_WAIT(40) - EVT_CALL(PlaySoundAt, SOUND_LRAW_CRYSTAL_BALL_GLOW | SOUND_ID_TRIGGER_CHANGE_SOUND, 0, LVar0, LVar1, LVar2) - EVT_CALL(N(func_802446AC_804F2C), ArrayVar(1)) - EVT_WAIT(15) - EVT_CALL(DismissEffect, ArrayVar(1)) - EVT_THREAD - EVT_CALL(N(func_80244308_804B88)) - EVT_END_THREAD - EVT_WAIT(46) - EVT_SET(ArrayVar(6), 2) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5.0)) - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Idle) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_RaiseArms) + Call(GetModelCenter, MODEL_tama) + Call(PlaySoundAt, SOUND_LRAW_CRYSTAL_BALL_GLOW, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 0, LVar0, LVar1, LVar2, Float(1.0), -1) + Set(ArrayVar(1), LVarF) + Wait(30) + Set(ArrayVar(6), 0) + Exec(N(EVS_Merlon_AnimateDiscoBall)) + Wait(30) + Thread + Call(N(func_802440FC_80497C)) + EndThread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(GetCamDistance, CAM_DEFAULT, LVar0) + IfGt(LVar0, 0) + SetF(LVar0, Float(284.6)) + Else + SetF(LVar0, Float(-284.6)) + EndIf + Call(SetCamDistance, CAM_DEFAULT, LVar0) + Call(GetCamPitch, CAM_DEFAULT, LVar0, LVar1) + SetF(LVar1, Float(-11.0)) + Call(SetCamPitch, CAM_DEFAULT, LVar0, LVar1) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Set(ArrayVar(6), 1) + PlayEffect(EFFECT_MERLIN_HOUSE_STARS, 0, -298, 21, -330) + Set(ArrayVar(2), LVarF) + Call(GetModelCenter, MODEL_tama) + PlayEffect(EFFECT_MOTION_BLUR_FLAME, 0, LVar0, LVar1, LVar2, 1, -1) + Set(ArrayVar(3), LVarF) + PlayEffect(EFFECT_MOTION_BLUR_FLAME, 0, LVar0, LVar1, LVar2, 1, -1) + Set(ArrayVar(4), LVarF) + PlayEffect(EFFECT_MOTION_BLUR_FLAME, 0, LVar0, LVar1, LVar2, 1, -1) + Set(ArrayVar(5), LVarF) + Thread + Call(N(func_802443E0_804C60)) + EndThread + Wait(50) + Call(GetModelCenter, MODEL_tama) + Call(PlaySoundAt, SOUND_CRYSTAL_BALL_WAVE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 3, LVar0, LVar1, LVar2, Float(0.5), 20) + Wait(30) + Call(GetModelCenter, MODEL_tama) + Call(PlaySoundAt, SOUND_CRYSTAL_BALL_WAVE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 3, LVar0, LVar1, LVar2, Float(0.5), 20) + Wait(30) + Thread + Call(N(func_802441EC_804A6C)) + EndThread + Call(GetModelCenter, MODEL_tama) + Call(PlaySoundAt, SOUND_CRYSTAL_BALL_WAVE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, Float(0.5), 20) + Wait(70) + Call(DismissEffect, ArrayVar(2)) + Wait(40) + Call(PlaySoundAt, SOUND_LRAW_CRYSTAL_BALL_GLOW | SOUND_ID_TRIGGER_CHANGE_SOUND, 0, LVar0, LVar1, LVar2) + Call(N(func_802446AC_804F2C), ArrayVar(1)) + Wait(15) + Call(DismissEffect, ArrayVar(1)) + Thread + Call(N(func_80244308_804B88)) + EndThread + Wait(46) + Set(ArrayVar(6), 2) + Call(ResetCam, CAM_DEFAULT, Float(5.0)) + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Idle) + Return + End }; EvtScript N(EVS_Merlon_GiveHint) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0036) - EVT_CALL(ShowCoinCounter, TRUE) - EVT_CALL(ShowChoice, MSG_Choice_000D) - EVT_IF_NE(LVar0, 0) - EVT_CALL(ShowCoinCounter, FALSE) - EVT_CALL(ContinueSpeech, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0039) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(GetPlayerCoins)) - EVT_IF_LT(LVar0, 5) - EVT_CALL(ShowCoinCounter, FALSE) - EVT_CALL(ContinueSpeech, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_003A) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(AddCoin, -5) - EVT_CALL(ShowCoinCounter, FALSE) - EVT_CALL(ContinueSpeech, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0037) - EVT_CALL(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Gather1) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Gather1, ANIM_Merlon_Gather1, 0, MSG_MAC_Plaza_0038) - EVT_EXEC(N(EVS_PlaySpellcastSong)) - EVT_WAIT(20) - EVT_IF_EQ(MV_FortuneFXHandles, 0) - EVT_MALLOC_ARRAY(20, MV_FortuneFXHandles) - EVT_END_IF - EVT_USE_ARRAY(MV_FortuneFXHandles) - EVT_EXEC_WAIT(N(EVS_Merlon_ReadFortuneFX)) - EVT_WAIT(20) - EVT_EXEC(N(EVS_ResetMusicAfterFortune)) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) - EVT_SET(LVar0, MSG_MerlonHint_0000) - EVT_CASE_LT(STORY_CH1_KNOCKED_SWITCH_FROM_TREE) - EVT_SET(LVar0, MSG_MerlonHint_0001) - EVT_CASE_LT(STORY_CH1_KOOPER_JOINED_PARTY) - EVT_SET(LVar0, MSG_MerlonHint_0002) - EVT_CASE_LT(STORY_CH1_SPOTTED_BY_KOOPA_BROS) - EVT_SET(LVar0, MSG_MerlonHint_0003) - EVT_CASE_LT(STORY_CH1_BOMBETTE_JOINED_PARTY) - EVT_SET(LVar0, MSG_MerlonHint_0004) - EVT_CASE_LT(STORY_CH1_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MerlonHint_0005) - EVT_CASE_LT(STORY_CH2_PARAKARRY_JOINED_PARTY) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MerlonHint_0006) - EVT_ELSE - EVT_SET(LVar0, MSG_MerlonHint_0007) - EVT_END_IF - EVT_CASE_LT(STORY_CH2_ARRIVED_AT_DRY_DRY_DESERT) - EVT_SET(LVar0, MSG_MerlonHint_0008) - EVT_CASE_LT(STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST) - EVT_SET(LVar0, MSG_MerlonHint_0009) - EVT_CASE_LT(STORY_CH2_SHADY_MOUSE_ENTERED_SHOP) - EVT_SET(LVar0, MSG_MerlonHint_000A) - EVT_CASE_LT(STORY_CH2_BOUGHT_SECRET_ITEMS) - EVT_SET(LVar0, MSG_MerlonHint_000B) - EVT_CASE_LT(STORY_CH2_GOT_PULSE_STONE) - EVT_SET(LVar0, MSG_MerlonHint_000C) - EVT_CASE_LT(STORY_CH2_UNCOVERED_DRY_DRY_RUINS) - EVT_SET(LVar0, MSG_MerlonHint_000D) - EVT_CASE_LT(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) - EVT_SET(LVar0, MSG_MerlonHint_000E) - EVT_CASE_LT(STORY_CH2_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MerlonHint_000F) - EVT_CASE_LT(STORY_UNUSED_FFFFFFCC) - EVT_SET(LVar0, MSG_MerlonHint_0010) - EVT_CASE_LT(STORY_CH3_ALLOWED_INTO_FOREVER_FOREST) - EVT_SET(LVar0, MSG_MerlonHint_0011) - EVT_CASE_LT(STORY_CH3_ARRIVED_AT_BOOS_MANSION) - EVT_SET(LVar0, MSG_MerlonHint_0012) - EVT_CASE_LT(STORY_CH3_ENTERED_BOOS_MANSION) - EVT_SET(LVar0, MSG_MerlonHint_0013) - EVT_CASE_LT(STORY_CH3_GOT_WEIGHT) - EVT_SET(LVar0, MSG_MerlonHint_0014) - EVT_CASE_LT(STORY_CH3_WEIGHED_DOWN_CHANDELIER) - EVT_SET(LVar0, MSG_MerlonHint_0015) - EVT_CASE_LT(STORY_CH3_GOT_BOO_PORTRAIT) - EVT_SET(LVar0, MSG_MerlonHint_0016) - EVT_CASE_LT(STORY_CH3_BOW_JOINED_PARTY) - EVT_SET(LVar0, MSG_MerlonHint_0017) - EVT_CASE_LT(STORY_CH3_ARRIVED_AT_TUBBAS_MANOR) - EVT_SET(LVar0, MSG_MerlonHint_0018) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_IF_EQ(GF_DGB06_Chest_CastleKey1, FALSE) - EVT_SET(LVar0, MSG_MerlonHint_0019) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_IF_EQ(GF_DGB12_Chest_CastleKey1, FALSE) - EVT_SET(LVar0, MSG_MerlonHint_001A) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_IF_EQ(GF_DGB16_Item_CastleKey1, FALSE) - EVT_SET(LVar0, MSG_MerlonHint_001B) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_SET(LVar0, MSG_MerlonHint_001C) - EVT_CASE_LT(STORY_CH3_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MerlonHint_001D) - EVT_CASE_LT(STORY_CH4_FOUND_HIDDEN_DOOR) - EVT_SET(LVar0, MSG_MerlonHint_001E) - EVT_CASE_LT(STORY_CH4_GOT_STOREROOM_KEY) - EVT_SET(LVar0, MSG_MerlonHint_001F) - EVT_CASE_LT(STORY_CH4_GOT_TOY_TRAIN) - EVT_SET(LVar0, MSG_MerlonHint_0020) - EVT_CASE_LT(STORY_CH4_RETURNED_TOY_TRAIN) - EVT_SET(LVar0, MSG_MerlonHint_0021) - EVT_CASE_LT(STORY_CH4_GOT_FRYING_PAN) - EVT_SET(LVar0, MSG_MerlonHint_0022) - EVT_CASE_LT(STORY_CH4_GOT_TAYCE_TS_CAKE) - EVT_SET(LVar0, MSG_MerlonHint_0023) - EVT_CASE_LT(STORY_CH4_GAVE_CAKE_TO_GOURMET_GUY) - EVT_SET(LVar0, MSG_MerlonHint_0024) - EVT_CASE_LT(STORY_CH4_SOLVED_COLOR_PUZZLE) - EVT_SET(LVar0, MSG_MerlonHint_0025) - EVT_CASE_LT(STORY_CH4_DEFEATED_LANTERN_GHOST) - EVT_SET(LVar0, MSG_MerlonHint_0026) - EVT_CASE_LT(STORY_CH4_WATT_JOINED_PARTY) - EVT_SET(LVar0, MSG_MerlonHint_0027) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MerlonHint_0028) - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MerlonHint_0029) - EVT_CASE_LT(STORY_CH5_REACHED_LAVA_LAVA_ISLAND) - EVT_SET(LVar0, MSG_MerlonHint_002A) - EVT_CASE_LT(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) - EVT_SET(LVar0, MSG_MerlonHint_002B) - EVT_CASE_LT(STORY_CH5_SUSHIE_JOINED_PARTY) - EVT_SET(LVar0, MSG_MerlonHint_002C) - EVT_CASE_LT(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) - EVT_SET(LVar0, MSG_MerlonHint_002D) - EVT_CASE_LT(STORY_CH5_MOVED_RAVEN_STATUE) - EVT_SET(LVar0, MSG_MerlonHint_002E) - EVT_CASE_LT(STORY_CH5_RAPHAEL_LEFT_NEST) - EVT_SET(LVar0, MSG_MerlonHint_002F) - EVT_CASE_LT(STORY_CH5_ENTERED_MT_LAVA_LAVA) - EVT_SET(LVar0, MSG_MerlonHint_0030) - EVT_CASE_LT(STORY_CH5_GOT_ULTRA_HAMMER) - EVT_SET(LVar0, MSG_MerlonHint_0031) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MerlonHint_0032) - EVT_CASE_LT(STORY_CH5_TRADED_VASE_FOR_SEED) - EVT_SET(LVar0, MSG_MerlonHint_0033) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MerlonHint_0034) - EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN) - EVT_SET(LVar0, MSG_MerlonHint_0035) - EVT_CASE_LT(STORY_CH6_GOT_FERTILE_SOIL) - EVT_SET(LVar0, MSG_MerlonHint_0036) - EVT_CASE_RANGE(STORY_CH6_GOT_FERTILE_SOIL, STORY_CH6_GOT_WATER_STONE) - EVT_IF_EQ(GF_FLO07_Item_CrystalBerry, FALSE) - EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, FALSE) - EVT_SET(LVar0, MSG_MerlonHint_0037) - EVT_ELSE - EVT_SET(LVar0, MSG_MerlonHint_0038) - EVT_END_IF - EVT_ELSE - EVT_SET(LVar0, MSG_MerlonHint_0039) - EVT_END_IF - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_SET(LVar0, MSG_MerlonHint_003A) - EVT_CASE_LT(STORY_CH6_GREW_MAGIC_BEANSTALK) - EVT_SET(LVar0, MSG_MerlonHint_003B) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MerlonHint_003C) - EVT_CASE_LT(STORY_CH7_ARRIVED_AT_SHIVER_CITY) - EVT_SET(LVar0, MSG_MerlonHint_003D) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_SET(LVar0, MSG_MerlonHint_003E) - EVT_CASE_LT(STORY_CH7_GOT_SNOWMAN_SCARF) - EVT_SET(LVar0, MSG_MerlonHint_003F) - EVT_CASE_LT(STORY_CH7_GOT_SNOWMAN_BUCKET) - EVT_SET(LVar0, MSG_MerlonHint_0040) - EVT_CASE_LT(STORY_CH7_UNLOCKED_SHIVER_MOUNTAIN) - EVT_SET(LVar0, MSG_MerlonHint_0041) - EVT_CASE_LT(STORY_CH7_GOT_STAR_STONE) - EVT_SET(LVar0, MSG_MerlonHint_0042) - EVT_CASE_LT(STORY_CH7_ARRIVED_AT_CRYSTAL_PALACE) - EVT_SET(LVar0, MSG_MerlonHint_0043) - EVT_CASE_LT(STORY_CH7_DEFEATED_MIRROR_DUPLIGHOSTS) - EVT_SET(LVar0, MSG_MerlonHint_0044) - EVT_CASE_LT(STORY_CH7_DEFEATED_BOMBETTE_DUPLIGHOSTS) - EVT_SET(LVar0, MSG_MerlonHint_0045) - EVT_CASE_LT(STORY_CH7_FOUND_HIDDEN_ROOM_UNDER_STATUE) - EVT_SET(LVar0, MSG_MerlonHint_0046) - EVT_CASE_LT(STORY_CH7_SOLVED_ALBINO_DINO_PUZZLE) - EVT_SET(LVar0, MSG_MerlonHint_0047) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MerlonHint_0048) - EVT_CASE_LT(STORY_CH8_REACHED_STAR_HAVEN) - EVT_SET(LVar0, MSG_MerlonHint_0049) - EVT_CASE_LT(STORY_CH8_REACHED_BOWSERS_CASTLE) - EVT_SET(LVar0, MSG_MerlonHint_004A) - EVT_CASE_LT(STORY_CH8_REACHED_PEACHS_CASTLE) - EVT_IF_NE(GB_KPA81_BowserDoorState, 2) - EVT_SET(LVar0, MSG_MerlonHint_004B) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_IF_NE(GB_KPA82_BowserDoorState, 1) - EVT_SET(LVar0, MSG_MerlonHint_004C) - EVT_BREAK_SWITCH - EVT_END_IF - EVT_SET(LVar0, MSG_MerlonHint_004D) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MerlonHint_004E) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, LVar0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0036) + Call(ShowCoinCounter, TRUE) + Call(ShowChoice, MSG_Choice_000D) + IfNe(LVar0, 0) + Call(ShowCoinCounter, FALSE) + Call(ContinueSpeech, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0039) + Call(DisablePlayerInput, FALSE) + Return + EndIf + Call(N(GetPlayerCoins)) + IfLt(LVar0, 5) + Call(ShowCoinCounter, FALSE) + Call(ContinueSpeech, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_003A) + Call(DisablePlayerInput, FALSE) + Return + EndIf + Call(AddCoin, -5) + Call(ShowCoinCounter, FALSE) + Call(ContinueSpeech, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, MSG_MAC_Plaza_0037) + Call(SetNpcAnimation, NPC_Merlon, ANIM_Merlon_Gather1) + Wait(10) + Call(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Gather1, ANIM_Merlon_Gather1, 0, MSG_MAC_Plaza_0038) + Exec(N(EVS_PlaySpellcastSong)) + Wait(20) + IfEq(MV_FortuneFXHandles, 0) + MallocArray(20, MV_FortuneFXHandles) + EndIf + UseArray(MV_FortuneFXHandles) + ExecWait(N(EVS_Merlon_ReadFortuneFX)) + Wait(20) + Exec(N(EVS_ResetMusicAfterFortune)) + Switch(GB_StoryProgress) + CaseLt(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) + Set(LVar0, MSG_MerlonHint_0000) + CaseLt(STORY_CH1_KNOCKED_SWITCH_FROM_TREE) + Set(LVar0, MSG_MerlonHint_0001) + CaseLt(STORY_CH1_KOOPER_JOINED_PARTY) + Set(LVar0, MSG_MerlonHint_0002) + CaseLt(STORY_CH1_SPOTTED_BY_KOOPA_BROS) + Set(LVar0, MSG_MerlonHint_0003) + CaseLt(STORY_CH1_BOMBETTE_JOINED_PARTY) + Set(LVar0, MSG_MerlonHint_0004) + CaseLt(STORY_CH1_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MerlonHint_0005) + CaseLt(STORY_CH2_PARAKARRY_JOINED_PARTY) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MerlonHint_0006) + Else + Set(LVar0, MSG_MerlonHint_0007) + EndIf + CaseLt(STORY_CH2_ARRIVED_AT_DRY_DRY_DESERT) + Set(LVar0, MSG_MerlonHint_0008) + CaseLt(STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST) + Set(LVar0, MSG_MerlonHint_0009) + CaseLt(STORY_CH2_SHADY_MOUSE_ENTERED_SHOP) + Set(LVar0, MSG_MerlonHint_000A) + CaseLt(STORY_CH2_BOUGHT_SECRET_ITEMS) + Set(LVar0, MSG_MerlonHint_000B) + CaseLt(STORY_CH2_GOT_PULSE_STONE) + Set(LVar0, MSG_MerlonHint_000C) + CaseLt(STORY_CH2_UNCOVERED_DRY_DRY_RUINS) + Set(LVar0, MSG_MerlonHint_000D) + CaseLt(STORY_CH2_SOLVED_ARTIFACT_PUZZLE) + Set(LVar0, MSG_MerlonHint_000E) + CaseLt(STORY_CH2_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MerlonHint_000F) + CaseLt(STORY_UNUSED_FFFFFFCC) + Set(LVar0, MSG_MerlonHint_0010) + CaseLt(STORY_CH3_ALLOWED_INTO_FOREVER_FOREST) + Set(LVar0, MSG_MerlonHint_0011) + CaseLt(STORY_CH3_ARRIVED_AT_BOOS_MANSION) + Set(LVar0, MSG_MerlonHint_0012) + CaseLt(STORY_CH3_ENTERED_BOOS_MANSION) + Set(LVar0, MSG_MerlonHint_0013) + CaseLt(STORY_CH3_GOT_WEIGHT) + Set(LVar0, MSG_MerlonHint_0014) + CaseLt(STORY_CH3_WEIGHED_DOWN_CHANDELIER) + Set(LVar0, MSG_MerlonHint_0015) + CaseLt(STORY_CH3_GOT_BOO_PORTRAIT) + Set(LVar0, MSG_MerlonHint_0016) + CaseLt(STORY_CH3_BOW_JOINED_PARTY) + Set(LVar0, MSG_MerlonHint_0017) + CaseLt(STORY_CH3_ARRIVED_AT_TUBBAS_MANOR) + Set(LVar0, MSG_MerlonHint_0018) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + IfEq(GF_DGB06_Chest_CastleKey1, FALSE) + Set(LVar0, MSG_MerlonHint_0019) + BreakSwitch + EndIf + IfEq(GF_DGB12_Chest_CastleKey1, FALSE) + Set(LVar0, MSG_MerlonHint_001A) + BreakSwitch + EndIf + IfEq(GF_DGB16_Item_CastleKey1, FALSE) + Set(LVar0, MSG_MerlonHint_001B) + BreakSwitch + EndIf + Set(LVar0, MSG_MerlonHint_001C) + CaseLt(STORY_CH3_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MerlonHint_001D) + CaseLt(STORY_CH4_FOUND_HIDDEN_DOOR) + Set(LVar0, MSG_MerlonHint_001E) + CaseLt(STORY_CH4_GOT_STOREROOM_KEY) + Set(LVar0, MSG_MerlonHint_001F) + CaseLt(STORY_CH4_GOT_TOY_TRAIN) + Set(LVar0, MSG_MerlonHint_0020) + CaseLt(STORY_CH4_RETURNED_TOY_TRAIN) + Set(LVar0, MSG_MerlonHint_0021) + CaseLt(STORY_CH4_GOT_FRYING_PAN) + Set(LVar0, MSG_MerlonHint_0022) + CaseLt(STORY_CH4_GOT_TAYCE_TS_CAKE) + Set(LVar0, MSG_MerlonHint_0023) + CaseLt(STORY_CH4_GAVE_CAKE_TO_GOURMET_GUY) + Set(LVar0, MSG_MerlonHint_0024) + CaseLt(STORY_CH4_SOLVED_COLOR_PUZZLE) + Set(LVar0, MSG_MerlonHint_0025) + CaseLt(STORY_CH4_DEFEATED_LANTERN_GHOST) + Set(LVar0, MSG_MerlonHint_0026) + CaseLt(STORY_CH4_WATT_JOINED_PARTY) + Set(LVar0, MSG_MerlonHint_0027) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MerlonHint_0028) + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MerlonHint_0029) + CaseLt(STORY_CH5_REACHED_LAVA_LAVA_ISLAND) + Set(LVar0, MSG_MerlonHint_002A) + CaseLt(STORY_CH5_YOSHI_CHILDREN_ARE_MISSING) + Set(LVar0, MSG_MerlonHint_002B) + CaseLt(STORY_CH5_SUSHIE_JOINED_PARTY) + Set(LVar0, MSG_MerlonHint_002C) + CaseLt(STORY_CH5_ALL_YOSHI_CHILDREN_RESCUED) + Set(LVar0, MSG_MerlonHint_002D) + CaseLt(STORY_CH5_MOVED_RAVEN_STATUE) + Set(LVar0, MSG_MerlonHint_002E) + CaseLt(STORY_CH5_RAPHAEL_LEFT_NEST) + Set(LVar0, MSG_MerlonHint_002F) + CaseLt(STORY_CH5_ENTERED_MT_LAVA_LAVA) + Set(LVar0, MSG_MerlonHint_0030) + CaseLt(STORY_CH5_GOT_ULTRA_HAMMER) + Set(LVar0, MSG_MerlonHint_0031) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MerlonHint_0032) + CaseLt(STORY_CH5_TRADED_VASE_FOR_SEED) + Set(LVar0, MSG_MerlonHint_0033) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MerlonHint_0034) + CaseLt(STORY_CH6_GOT_MAGICAL_BEAN) + Set(LVar0, MSG_MerlonHint_0035) + CaseLt(STORY_CH6_GOT_FERTILE_SOIL) + Set(LVar0, MSG_MerlonHint_0036) + CaseRange(STORY_CH6_GOT_FERTILE_SOIL, STORY_CH6_GOT_WATER_STONE) + IfEq(GF_FLO07_Item_CrystalBerry, FALSE) + IfEq(GF_FLO10_LilyRequestedWaterStone, FALSE) + Set(LVar0, MSG_MerlonHint_0037) + Else + Set(LVar0, MSG_MerlonHint_0038) + EndIf + Else + Set(LVar0, MSG_MerlonHint_0039) + EndIf + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Set(LVar0, MSG_MerlonHint_003A) + CaseLt(STORY_CH6_GREW_MAGIC_BEANSTALK) + Set(LVar0, MSG_MerlonHint_003B) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MerlonHint_003C) + CaseLt(STORY_CH7_ARRIVED_AT_SHIVER_CITY) + Set(LVar0, MSG_MerlonHint_003D) + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Set(LVar0, MSG_MerlonHint_003E) + CaseLt(STORY_CH7_GOT_SNOWMAN_SCARF) + Set(LVar0, MSG_MerlonHint_003F) + CaseLt(STORY_CH7_GOT_SNOWMAN_BUCKET) + Set(LVar0, MSG_MerlonHint_0040) + CaseLt(STORY_CH7_UNLOCKED_SHIVER_MOUNTAIN) + Set(LVar0, MSG_MerlonHint_0041) + CaseLt(STORY_CH7_GOT_STAR_STONE) + Set(LVar0, MSG_MerlonHint_0042) + CaseLt(STORY_CH7_ARRIVED_AT_CRYSTAL_PALACE) + Set(LVar0, MSG_MerlonHint_0043) + CaseLt(STORY_CH7_DEFEATED_MIRROR_DUPLIGHOSTS) + Set(LVar0, MSG_MerlonHint_0044) + CaseLt(STORY_CH7_DEFEATED_BOMBETTE_DUPLIGHOSTS) + Set(LVar0, MSG_MerlonHint_0045) + CaseLt(STORY_CH7_FOUND_HIDDEN_ROOM_UNDER_STATUE) + Set(LVar0, MSG_MerlonHint_0046) + CaseLt(STORY_CH7_SOLVED_ALBINO_DINO_PUZZLE) + Set(LVar0, MSG_MerlonHint_0047) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MerlonHint_0048) + CaseLt(STORY_CH8_REACHED_STAR_HAVEN) + Set(LVar0, MSG_MerlonHint_0049) + CaseLt(STORY_CH8_REACHED_BOWSERS_CASTLE) + Set(LVar0, MSG_MerlonHint_004A) + CaseLt(STORY_CH8_REACHED_PEACHS_CASTLE) + IfNe(GB_KPA81_BowserDoorState, 2) + Set(LVar0, MSG_MerlonHint_004B) + BreakSwitch + EndIf + IfNe(GB_KPA82_BowserDoorState, 1) + Set(LVar0, MSG_MerlonHint_004C) + BreakSwitch + EndIf + Set(LVar0, MSG_MerlonHint_004D) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MerlonHint_004E) + EndSwitch + Call(SpeakToPlayer, NPC_Merlon, ANIM_Merlon_Talk, ANIM_Merlon_Idle, 0, LVar0) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_mac/mac_01/npc/rowf_and_rhuff.inc.c b/src/world/area_mac/mac_01/npc/rowf_and_rhuff.inc.c index 0d3761c38b2..48641b780e5 100644 --- a/src/world/area_mac/mac_01/npc/rowf_and_rhuff.inc.c +++ b/src/world/area_mac/mac_01/npc/rowf_and_rhuff.inc.c @@ -108,48 +108,48 @@ API_CALLABLE(N(HideRowfBadges)) { } EvtScript N(EVS_NpcInteract_Rowf_A) = { - EVT_IF_EQ(GF_MAC01_Met_Rowf_Early, FALSE) - EVT_SET(GF_MAC01_Met_Rowf_Early, TRUE) - EVT_SET(AF_MAC_41, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_MAC_Plaza_0000) - EVT_ELSE - EVT_IF_EQ(AF_MAC_41, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_MAC_Plaza_0001) - EVT_ELSE - EVT_SET(AF_MAC_41, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Think, 0, MSG_MAC_Plaza_0002) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_MAC01_Met_Rowf_Early, FALSE) + Set(GF_MAC01_Met_Rowf_Early, TRUE) + Set(AF_MAC_41, TRUE) + Call(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_MAC_Plaza_0000) + Else + IfEq(AF_MAC_41, TRUE) + Call(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_MAC_Plaza_0001) + Else + Set(AF_MAC_41, TRUE) + Call(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Think, 0, MSG_MAC_Plaza_0002) + EndIf + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Rowf_B) = { - EVT_SET(LVar0, GF_MAC01_RowfBadgeAvailableA) - EVT_ADD(LVar0, GF_MAC01_RowfBadgeAvailableB) - EVT_ADD(LVar0, GF_MAC01_RowfBadgeAvailableC) - EVT_IF_EQ(LVar0, 3) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_RETURNED_TO_TOAD_TOWN) - EVT_SET(LVar1, MSG_MAC_Plaza_0005) - EVT_ELSE - EVT_CALL(N(func_80244984_805204)) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LVar1, MSG_MAC_Plaza_0006) - EVT_ELSE - EVT_SET(LVar1, MSG_MAC_Plaza_0005) - EVT_END_IF - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, LVar1) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GF_MAC01_Met_Rowf_Late, FALSE) - EVT_SET(GF_MAC01_Met_Rowf_Late, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, MSG_MAC_Plaza_0003) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, MSG_MAC_Plaza_0004) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVar0, GF_MAC01_RowfBadgeAvailableA) + Add(LVar0, GF_MAC01_RowfBadgeAvailableB) + Add(LVar0, GF_MAC01_RowfBadgeAvailableC) + IfEq(LVar0, 3) + IfLt(GB_StoryProgress, STORY_CH5_RETURNED_TO_TOAD_TOWN) + Set(LVar1, MSG_MAC_Plaza_0005) + Else + Call(N(func_80244984_805204)) + IfEq(LVar0, 0) + Set(LVar1, MSG_MAC_Plaza_0006) + Else + Set(LVar1, MSG_MAC_Plaza_0005) + EndIf + EndIf + Call(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, LVar1) + Return + EndIf + IfEq(GF_MAC01_Met_Rowf_Late, FALSE) + Set(GF_MAC01_Met_Rowf_Late, TRUE) + Call(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, MSG_MAC_Plaza_0003) + Else + Call(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, MSG_MAC_Plaza_0004) + EndIf + Return + End }; s32 N(ItemList_Calculator)[] = { @@ -158,227 +158,227 @@ s32 N(ItemList_Calculator)[] = { }; EvtScript N(EVS_NpcInteract_Rowf_C) = { - EVT_IF_EQ(GF_MAC01_CalculatorReturned, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, MSG_MAC_Plaza_000A) - EVT_RETURN - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, MSG_MAC_Plaza_0008) - EVT_SET(LVar0, EVT_PTR(N(ItemList_Calculator))) - EVT_SET(LVar1, 1) - EVT_EXEC_WAIT(N(EVS_ChooseKeyItem)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CASE_EQ(-1) - EVT_CALL(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, MSG_MAC_Plaza_000B) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, MSG_MAC_Plaza_0009) - EVT_WAIT(10) - EVT_SET(LVar0, ITEM_I_SPY) - EVT_SET(LVar3, 2) - EVT_EXEC_WAIT(N(GiveItemReward)) - EVT_CALL(AddBadge, LVar0, LVar1) - EVT_SET(GF_MAC01_CalculatorReturned, TRUE) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_MAC_Plaza_0011) - EVT_END_SWITCH - EVT_RETURN - EVT_END + IfEq(GF_MAC01_CalculatorReturned, TRUE) + Call(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, MSG_MAC_Plaza_000A) + Return + EndIf + Call(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, MSG_MAC_Plaza_0008) + Set(LVar0, Ref(N(ItemList_Calculator))) + Set(LVar1, 1) + ExecWait(N(EVS_ChooseKeyItem)) + Switch(LVar0) + CaseEq(0) + CaseEq(-1) + Call(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, MSG_MAC_Plaza_000B) + CaseDefault + Call(SpeakToPlayer, NPC_Rowf, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, MSG_MAC_Plaza_0009) + Wait(10) + Set(LVar0, ITEM_I_SPY) + Set(LVar3, 2) + ExecWait(N(GiveItemReward)) + Call(AddBadge, LVar0, LVar1) + Set(GF_MAC01_CalculatorReturned, TRUE) + Wait(10) + Call(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_MAC_Plaza_0011) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_RhuffChapter1) = { - EVT_CALL(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_MAC_Plaza_000C) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_MAC_Plaza_000C) + Return + End }; EvtScript N(EVS_NpcInteract_Rhuff_B) = { - EVT_CALL(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_MAC_Plaza_0014) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_MAC_Plaza_0014) + Return + End }; EvtScript N(EVS_NpcInteract_Rhuff_C) = { - EVT_CALL(N(func_80244984_805204)) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_MAC_Plaza_000F) - EVT_ELSE - EVT_SET(LVar0, GF_MAC01_RowfBadgeAvailableA) - EVT_ADD(LVar0, GF_MAC01_RowfBadgeAvailableB) - EVT_ADD(LVar0, GF_MAC01_RowfBadgeAvailableC) - EVT_IF_EQ(LVar0, 3) - EVT_CALL(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_MAC_Plaza_000E) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_MAC_Plaza_000D) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(N(func_80244984_805204)) + IfEq(LVar0, 0) + Call(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_MAC_Plaza_000F) + Else + Set(LVar0, GF_MAC01_RowfBadgeAvailableA) + Add(LVar0, GF_MAC01_RowfBadgeAvailableB) + Add(LVar0, GF_MAC01_RowfBadgeAvailableC) + IfEq(LVar0, 3) + Call(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_MAC_Plaza_000E) + Else + Call(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_MAC_Plaza_000D) + EndIf + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Rhuff_D) = { - EVT_IF_EQ(GF_MAC01_CalculatorReturned, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, MSG_MAC_Plaza_0012) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_MAC_Plaza_0010) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_MAC01_CalculatorReturned, TRUE) + Call(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, MSG_MAC_Plaza_0012) + Else + Call(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Idle, 0, MSG_MAC_Plaza_0010) + EndIf + Return + End }; EvtScript N(EVS_NpcIdle_Rowf) = { - EVT_CALL(SetNpcPos, NPC_Rowf, -250, 0, 295) - EVT_LABEL(0) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Still) - EVT_CALL(NpcMoveTo, NPC_Rowf, -260, 281, 4) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Walk) - EVT_CALL(NpcMoveTo, NPC_Rowf, -410, 281, 60) - EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Idle) - EVT_CALL(RotateGroup, MODEL_jutan2, 60, 0, 0, 1) - EVT_WAIT(1) - EVT_CALL(SetNpcPos, NPC_Rowf, -407, 0, 281) - EVT_CALL(RotateGroup, MODEL_jutan2, 40, 0, 0, 1) - EVT_WAIT(1) - EVT_CALL(SetNpcPos, NPC_Rowf, -404, 0, 281) - EVT_CALL(RotateGroup, MODEL_jutan2, 20, 0, 0, 1) - EVT_WAIT(1) - EVT_CALL(SetNpcPos, NPC_Rowf, -401, 0, 281) - EVT_CALL(RotateGroup, MODEL_jutan2, 0, 0, 0, 1) - EVT_WAIT(1) - EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Still) - EVT_WAIT(5) - EVT_CALL(InterpNpcYaw, NPC_Rhuff, 90, 0) - EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Think) - EVT_WAIT(30) - EVT_THREAD - EVT_LOOP(2) - EVT_CALL(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_WaveOff) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_omote2, 0, 1, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, MODEL_omote2, 0, 0, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, MODEL_omote2, 0, 1, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, MODEL_omote2, 0, 0, 0) - EVT_WAIT(2) - EVT_CALL(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_Idle) - EVT_WAIT(20) - EVT_END_LOOP - EVT_LOOP(3) - EVT_CALL(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_WaveOff) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_omote2, 0, 1, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, MODEL_omote2, 0, 0, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, MODEL_omote2, 0, 1, 0) - EVT_WAIT(2) - EVT_CALL(TranslateModel, MODEL_omote2, 0, 0, 0) - EVT_WAIT(2) - EVT_CALL(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_Idle) - EVT_WAIT(2) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Still) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Idle) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Walk) - EVT_CALL(NpcMoveTo, NPC_Rowf, -250, 295, 60) - EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Idle) - EVT_WAIT(3) - EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_WaveOff) - EVT_WAIT(15) - EVT_CALL(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_Cheer) - EVT_WAIT(8) - EVT_CALL(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_Still) - EVT_CALL(InterpNpcYaw, NPC_Rhuff, -90, 0) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Talk) - EVT_CALL(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_Still) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Think) - EVT_CALL(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_Talk) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Talk) - EVT_CALL(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_Idle) - EVT_WAIT(20) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 90, 40, EASING_CUBIC_IN) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_jutan2, LVar0, 0, 0, 1) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(15) - EVT_CALL(ShowEmote, NPC_Rhuff, EMOTE_SHOCK, -45, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_Still) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Still) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Rowf, -250, 0, 295) + Label(0) + Wait(10) + Call(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Still) + Call(NpcMoveTo, NPC_Rowf, -260, 281, 4) + Wait(5) + Call(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Walk) + Call(NpcMoveTo, NPC_Rowf, -410, 281, 60) + Call(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Idle) + Call(RotateGroup, MODEL_jutan2, 60, 0, 0, 1) + Wait(1) + Call(SetNpcPos, NPC_Rowf, -407, 0, 281) + Call(RotateGroup, MODEL_jutan2, 40, 0, 0, 1) + Wait(1) + Call(SetNpcPos, NPC_Rowf, -404, 0, 281) + Call(RotateGroup, MODEL_jutan2, 20, 0, 0, 1) + Wait(1) + Call(SetNpcPos, NPC_Rowf, -401, 0, 281) + Call(RotateGroup, MODEL_jutan2, 0, 0, 0, 1) + Wait(1) + Call(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Still) + Wait(5) + Call(InterpNpcYaw, NPC_Rhuff, 90, 0) + Call(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Think) + Wait(30) + Thread + Loop(2) + Call(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_WaveOff) + Wait(1) + Call(TranslateModel, MODEL_omote2, 0, 1, 0) + Wait(2) + Call(TranslateModel, MODEL_omote2, 0, 0, 0) + Wait(2) + Call(TranslateModel, MODEL_omote2, 0, 1, 0) + Wait(2) + Call(TranslateModel, MODEL_omote2, 0, 0, 0) + Wait(2) + Call(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_Idle) + Wait(20) + EndLoop + Loop(3) + Call(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_WaveOff) + Wait(1) + Call(TranslateModel, MODEL_omote2, 0, 1, 0) + Wait(2) + Call(TranslateModel, MODEL_omote2, 0, 0, 0) + Wait(2) + Call(TranslateModel, MODEL_omote2, 0, 1, 0) + Wait(2) + Call(TranslateModel, MODEL_omote2, 0, 0, 0) + Wait(2) + Call(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_Idle) + Wait(2) + EndLoop + EndThread + Call(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Still) + Wait(5) + Call(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Idle) + Wait(20) + Call(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Walk) + Call(NpcMoveTo, NPC_Rowf, -250, 295, 60) + Call(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Idle) + Wait(3) + Call(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_WaveOff) + Wait(15) + Call(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_Cheer) + Wait(8) + Call(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_Still) + Call(InterpNpcYaw, NPC_Rhuff, -90, 0) + Wait(10) + Call(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Talk) + Call(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_Still) + Wait(30) + Call(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Think) + Call(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_Talk) + Wait(30) + Call(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Talk) + Call(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_Idle) + Wait(20) + Thread + Call(MakeLerp, 0, 90, 40, EASING_CUBIC_IN) + Label(10) + Call(UpdateLerp) + Call(RotateGroup, MODEL_jutan2, LVar0, 0, 0, 1) + IfEq(LVar1, 1) + Wait(1) + Goto(10) + EndIf + EndThread + Wait(15) + Call(ShowEmote, NPC_Rhuff, EMOTE_SHOCK, -45, 20, EMOTER_NPC, 0, 0, 0, 0) + Call(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_Still) + Wait(10) + Call(SetNpcAnimation, NPC_Rowf, ANIM_Rowf_Still) + Goto(0) + Return + End }; EvtScript N(EVS_NpcIdle_Rhuff_C) = { - EVT_CALL(SetNpcPos, NPC_SELF, -225, 0, 330) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_SET(LVar0, 0) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_IF_LT(LVar1, 50) - EVT_ADD(LVar0, 1) - EVT_END_IF - EVT_SWITCH(LVar3) - EVT_CASE_RANGE(280, 380) - EVT_ADD(LVar0, 1) - EVT_END_SWITCH - EVT_IF_EQ(LVar0, 2) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -25) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rowf_Run) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rowf_Idle) - EVT_CALL(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, MSG_MAC_Plaza_0013) - EVT_THREAD - EVT_CALL(func_802D1270, -280, 330, EVT_FLOAT(4.0)) - EVT_END_THREAD - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rowf_Run) - EVT_CALL(NpcMoveTo, NPC_SELF, -305, 330, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rowf_Idle) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, MSG_MAC_Plaza_0014) - EVT_SET(GF_MAC01_Met_Rhuff, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, -225, 0, 330) + Loop(0) + Wait(1) + Set(LVar0, 0) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + IfLt(LVar1, 50) + Add(LVar0, 1) + EndIf + Switch(LVar3) + CaseRange(280, 380) + Add(LVar0, 1) + EndSwitch + IfEq(LVar0, 2) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, TRUE) + Call(InterpPlayerYaw, 270, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, -25) + Call(SetNpcSpeed, NPC_SELF, Float(4.0)) + Call(SetNpcAnimation, NPC_SELF, ANIM_Rowf_Run) + Call(NpcMoveTo, NPC_SELF, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Rowf_Idle) + Call(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, MSG_MAC_Plaza_0013) + Thread + Call(func_802D1270, -280, 330, Float(4.0)) + EndThread + Call(SetNpcSpeed, NPC_SELF, Float(4.0)) + Call(SetNpcAnimation, NPC_SELF, ANIM_Rowf_Run) + Call(NpcMoveTo, NPC_SELF, -305, 330, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Rowf_Idle) + Wait(10) + Call(SpeakToPlayer, NPC_Rhuff, ANIM_Rowf_Talk, ANIM_Rowf_Cheer, 0, MSG_MAC_Plaza_0014) + Set(GF_MAC01_Met_Rhuff, TRUE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_UpdateRhuffAnims) = { - EVT_SET(LVar0, EVT_FLOAT(53.0)) - EVT_SET(LVar1, EVT_FLOAT(-192.0)) - EVT_SET(LVar2, EVT_FLOAT(-300.0)) - EVT_SET(LVar3, EVT_FLOAT(425.0)) - EVT_CALL(GetNpcPointer, NPC_Rhuff, LVar7) - EVT_LOOP(0) - EVT_CALL(N(RhuffUnravelUpdate)) - EVT_CALL(SetNpcPos, NPC_Rhuff, LVar4, 0, LVar5) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVar0, Float(53.0)) + Set(LVar1, Float(-192.0)) + Set(LVar2, Float(-300.0)) + Set(LVar3, Float(425.0)) + Call(GetNpcPointer, NPC_Rhuff, LVar7) + Loop(0) + Call(N(RhuffUnravelUpdate)) + Call(SetNpcPos, NPC_Rhuff, LVar4, 0, LVar5) + Wait(1) + EndLoop + Return + End }; s32 N(D_802555AC_815E2C)[] = { @@ -410,140 +410,140 @@ s32 N(D_802555AC_815E2C)[] = { }; EvtScript N(EVS_Rhuff_RevealBadges) = { - EVT_SET(MF_BadgeShopOpen, TRUE) - EVT_CALL(SetNpcYaw, NPC_Rowf, 270) - EVT_THREAD - EVT_CALL(PlaySoundAt, SOUND_ROWF_OPEN_SHOP, SOUND_SPACE_DEFAULT, -220, 37, 271) - EVT_CALL(MakeLerp, 0, -220, 30, EASING_COS_BOUNCE) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_omote, LVar0, 1, 0, 0) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(4) - EVT_THREAD - EVT_CALL(MakeLerp, 0, -120, 10, EASING_COS_SLOW_OVERSHOOT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, EVT_FLOAT(10.0)) - EVT_CALL(TranslateModel, MODEL_omote2, 0, LVar0, 0) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 0, 100, 5, EASING_COS_SLOW_OVERSHOOT) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, EVT_FLOAT(10.0)) - EVT_CALL(TranslateModel, MODEL_ura, 0, 0, LVar0) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(EnableModel, MODEL_ju_1, TRUE) - EVT_CALL(N(RevealRowfBadges)) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o295, SOUND_ROWF_PULL_RUG_OUT, SOUND_SPACE_DEFAULT) - EVT_USE_BUF(EVT_PTR(N(D_802555AC_815E2C))) - EVT_LOOP(50) - EVT_BUF_READ2(LVar0, MV_RowfRugRippleAmount) - EVT_CALL(RotateGroup, MODEL_jutan2, LVar0, 0, 1, 0) - EVT_DIVF(LVar0, EVT_FLOAT(10.0)) - EVT_SET(MV_RowfRugRotateAngle, LVar0) - EVT_CALL(RotateGroup, MODEL_jutan1, LVar0, 0, 1, 0) - EVT_DIVF(LVar0, EVT_FLOAT(200.0)) - EVT_ADDF(LVar0, EVT_FLOAT(1.0)) - EVT_CALL(ScaleGroup, MODEL_jutan2, LVar0, 1, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(NpcJump0, NPC_Rowf, -213, 6, 256, 16) - EVT_IF_EQ(GF_MAC01_RowfBadgeAvailableA, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_b3, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_IF_EQ(GF_MAC01_RowfBadgeAvailableB, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_b2, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_IF_EQ(GF_MAC01_RowfBadgeAvailableC, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_b1, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_RETURN - EVT_END + Set(MF_BadgeShopOpen, TRUE) + Call(SetNpcYaw, NPC_Rowf, 270) + Thread + Call(PlaySoundAt, SOUND_ROWF_OPEN_SHOP, SOUND_SPACE_DEFAULT, -220, 37, 271) + Call(MakeLerp, 0, -220, 30, EASING_COS_BOUNCE) + Label(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_omote, LVar0, 1, 0, 0) + IfEq(LVar1, 1) + Wait(1) + Goto(0) + EndIf + EndThread + Wait(4) + Thread + Call(MakeLerp, 0, -120, 10, EASING_COS_SLOW_OVERSHOOT) + Label(1) + Call(UpdateLerp) + DivF(LVar0, Float(10.0)) + Call(TranslateModel, MODEL_omote2, 0, LVar0, 0) + IfEq(LVar1, 1) + Wait(1) + Goto(1) + EndIf + EndThread + Thread + Call(MakeLerp, 0, 100, 5, EASING_COS_SLOW_OVERSHOOT) + Label(2) + Call(UpdateLerp) + DivF(LVar0, Float(10.0)) + Call(TranslateModel, MODEL_ura, 0, 0, LVar0) + IfEq(LVar1, 1) + Wait(1) + Goto(2) + EndIf + EndThread + Call(EnableModel, MODEL_ju_1, TRUE) + Call(N(RevealRowfBadges)) + Call(PlaySoundAtCollider, COLLIDER_o295, SOUND_ROWF_PULL_RUG_OUT, SOUND_SPACE_DEFAULT) + UseBuf(Ref(N(D_802555AC_815E2C))) + Loop(50) + BufRead2(LVar0, MV_RowfRugRippleAmount) + Call(RotateGroup, MODEL_jutan2, LVar0, 0, 1, 0) + DivF(LVar0, Float(10.0)) + Set(MV_RowfRugRotateAngle, LVar0) + Call(RotateGroup, MODEL_jutan1, LVar0, 0, 1, 0) + DivF(LVar0, Float(200.0)) + AddF(LVar0, Float(1.0)) + Call(ScaleGroup, MODEL_jutan2, LVar0, 1, LVar0) + Wait(1) + EndLoop + Call(NpcJump0, NPC_Rowf, -213, 6, 256, 16) + IfEq(GF_MAC01_RowfBadgeAvailableA, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_b3, COLLIDER_FLAGS_UPPER_MASK) + EndIf + IfEq(GF_MAC01_RowfBadgeAvailableB, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_b2, COLLIDER_FLAGS_UPPER_MASK) + EndIf + IfEq(GF_MAC01_RowfBadgeAvailableC, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_b1, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Return + End }; EvtScript N(EVS_Rhuff_HideBadges) = { - EVT_SET(MF_BadgeShopOpen, FALSE) - EVT_IF_EQ(GF_MAC01_RowfBadgeAvailableA, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b3, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_IF_EQ(GF_MAC01_RowfBadgeAvailableB, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b2, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_IF_EQ(GF_MAC01_RowfBadgeAvailableC, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b1, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_CALL(NpcJump0, NPC_Rowf, -220, -54, 261, 16) - EVT_THREAD - EVT_CALL(PlaySoundAtCollider, COLLIDER_o295, SOUND_ROWF_PUSH_RUG_IN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 600, 50, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_jutan2, LVar0, 0, 1, 0) - EVT_DIVF(LVar0, EVT_FLOAT(10.0)) - EVT_SET(MV_RowfRugRotateAngle, LVar0) - EVT_CALL(RotateGroup, MODEL_jutan1, LVar0, 0, 1, 0) - EVT_DIVF(LVar0, EVT_FLOAT(200.0)) - EVT_ADDF(LVar0, EVT_FLOAT(1.0)) - EVT_CALL(ScaleGroup, MODEL_jutan2, LVar0, 1, LVar0) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(EnableModel, MODEL_ju_1, FALSE) - EVT_CALL(N(HideRowfBadges)) - EVT_END_THREAD - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(MakeLerp, -220, 0, 20, EASING_QUADRATIC_IN) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_omote, LVar0, 1, 0, 0) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_ROWF_CLOSE_SHOP, SOUND_SPACE_DEFAULT, -220, 37, 271) - EVT_END_THREAD - EVT_WAIT(15) - EVT_THREAD - EVT_CALL(MakeLerp, -120, 0, 10, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, EVT_FLOAT(10.0)) - EVT_CALL(TranslateModel, MODEL_omote2, 0, LVar0, 0) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 100, 0, 5, EASING_COS_IN_OUT) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, EVT_FLOAT(10.0)) - EVT_CALL(TranslateModel, MODEL_ura, 0, 0, LVar0) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(31) - EVT_RETURN - EVT_END + Set(MF_BadgeShopOpen, FALSE) + IfEq(GF_MAC01_RowfBadgeAvailableA, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b3, COLLIDER_FLAGS_UPPER_MASK) + EndIf + IfEq(GF_MAC01_RowfBadgeAvailableB, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b2, COLLIDER_FLAGS_UPPER_MASK) + EndIf + IfEq(GF_MAC01_RowfBadgeAvailableC, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b1, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Call(NpcJump0, NPC_Rowf, -220, -54, 261, 16) + Thread + Call(PlaySoundAtCollider, COLLIDER_o295, SOUND_ROWF_PUSH_RUG_IN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 600, 50, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(RotateGroup, MODEL_jutan2, LVar0, 0, 1, 0) + DivF(LVar0, Float(10.0)) + Set(MV_RowfRugRotateAngle, LVar0) + Call(RotateGroup, MODEL_jutan1, LVar0, 0, 1, 0) + DivF(LVar0, Float(200.0)) + AddF(LVar0, Float(1.0)) + Call(ScaleGroup, MODEL_jutan2, LVar0, 1, LVar0) + IfEq(LVar1, 1) + Wait(1) + Goto(10) + EndIf + Call(EnableModel, MODEL_ju_1, FALSE) + Call(N(HideRowfBadges)) + EndThread + Wait(10) + Thread + Call(MakeLerp, -220, 0, 20, EASING_QUADRATIC_IN) + Label(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_omote, LVar0, 1, 0, 0) + IfEq(LVar1, 1) + Wait(1) + Goto(0) + EndIf + Call(PlaySoundAt, SOUND_ROWF_CLOSE_SHOP, SOUND_SPACE_DEFAULT, -220, 37, 271) + EndThread + Wait(15) + Thread + Call(MakeLerp, -120, 0, 10, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + DivF(LVar0, Float(10.0)) + Call(TranslateModel, MODEL_omote2, 0, LVar0, 0) + IfEq(LVar1, 1) + Wait(1) + Goto(1) + EndIf + EndThread + Thread + Call(MakeLerp, 100, 0, 5, EASING_COS_IN_OUT) + Label(2) + Call(UpdateLerp) + DivF(LVar0, Float(10.0)) + Call(TranslateModel, MODEL_ura, 0, 0, LVar0) + IfEq(LVar1, 1) + Wait(1) + Goto(2) + EndIf + EndThread + Wait(31) + Return + End }; enum BadgeShopStates { @@ -556,37 +556,37 @@ enum BadgeShopStates { }; EvtScript N(EVS_EnterBadgeShop) = { - EVT_IF_GE(MV_BadgeShopOpenState, BADGE_SHOP_OPENING) - EVT_RETURN - EVT_END_IF - EVT_IF_GE(MV_BadgeShopCloseState, BADGE_SHOP_CLOSE_WAITING) - EVT_RETURN - EVT_END_IF - EVT_SET(MF_BadgeShopOpen, TRUE) - EVT_SET(MV_BadgeShopOpenState, BADGE_SHOP_OPENING) - EVT_EXEC_WAIT(N(EVS_Rhuff_RevealBadges)) - EVT_SET(MV_BadgeShopOpenState, BADGE_SHOP_OPEN) - EVT_RETURN - EVT_END + IfGe(MV_BadgeShopOpenState, BADGE_SHOP_OPENING) + Return + EndIf + IfGe(MV_BadgeShopCloseState, BADGE_SHOP_CLOSE_WAITING) + Return + EndIf + Set(MF_BadgeShopOpen, TRUE) + Set(MV_BadgeShopOpenState, BADGE_SHOP_OPENING) + ExecWait(N(EVS_Rhuff_RevealBadges)) + Set(MV_BadgeShopOpenState, BADGE_SHOP_OPEN) + Return + End }; EvtScript N(EVS_ExitBadgeShop) = { - EVT_IF_EQ(MV_BadgeShopOpenState, BADGE_SHOP_OPEN_READY) - EVT_RETURN - EVT_END_IF - EVT_SET(MV_BadgeShopCloseState, BADGE_SHOP_CLOSE_WAITING) - EVT_SET(MF_BadgeShopOpen, FALSE) - EVT_LABEL(10) - EVT_IF_EQ(MV_BadgeShopOpenState, BADGE_SHOP_OPENING) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_SET(MV_BadgeShopCloseState, BADGE_SHOP_CLOSING) - EVT_EXEC_WAIT(N(EVS_Rhuff_HideBadges)) - EVT_SET(MV_BadgeShopOpenState, BADGE_SHOP_OPEN_READY) - EVT_SET(MV_BadgeShopCloseState, BADGE_SHOP_CLOSE_READY) - EVT_RETURN - EVT_END + IfEq(MV_BadgeShopOpenState, BADGE_SHOP_OPEN_READY) + Return + EndIf + Set(MV_BadgeShopCloseState, BADGE_SHOP_CLOSE_WAITING) + Set(MF_BadgeShopOpen, FALSE) + Label(10) + IfEq(MV_BadgeShopOpenState, BADGE_SHOP_OPENING) + Wait(1) + Goto(10) + EndIf + Set(MV_BadgeShopCloseState, BADGE_SHOP_CLOSING) + ExecWait(N(EVS_Rhuff_HideBadges)) + Set(MV_BadgeShopOpenState, BADGE_SHOP_OPEN_READY) + Set(MV_BadgeShopCloseState, BADGE_SHOP_CLOSE_READY) + Return + End }; API_CALLABLE(N(RowfShop_SetBadgePos)) { @@ -601,98 +601,98 @@ API_CALLABLE(N(RowfShop_SetBadgePos)) { } EvtScript N(EVS_NpcInit_Rowf) = { - EVT_SET(MV_BadgeShopOpenState, 0) - EVT_SET(MV_BadgeShopCloseState, 0) - EVT_SET(AF_MAC_40, FALSE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH1_DEFEATED_JR_TROOPA) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Rowf_A))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Rowf))) - EVT_CASE_LT(STORY_CH3_STAR_SPRIT_DEPARTED) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Rowf_B))) - EVT_SET(AF_MAC_40, TRUE) - EVT_CASE_DEFAULT - EVT_IF_EQ(GF_MAC01_CalculatorReturned, TRUE) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Rowf_B))) - EVT_SET(AF_MAC_40, TRUE) - EVT_ELSE - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Rowf_C))) - EVT_CALL(SetNpcPos, NPC_Rowf, -250, 0, 295) - EVT_END_IF - EVT_END_SWITCH - EVT_SET(AF_MAC_41, FALSE) - EVT_CALL(SetModelFlags, MODEL_ju_2, MODEL_FLAG_DO_BOUNDS_CULLING, FALSE) - EVT_CALL(EnableGroup, MODEL_jutan1, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b3, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(RotateGroup, MODEL_jutan1, 60, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_jutan2, 0, 0, 1, 0) - EVT_CALL(ScaleGroup, MODEL_jutan2, EVT_FLOAT(1.3), 1, EVT_FLOAT(1.3)) - EVT_SET(MV_RowfRugRotateAngle, 60) - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_0, MODEL_ju_1, TRUE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_0, EVT_PTR(N(gfx_build_rowf_rug_with_ripples)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_ju_1, CUSTOM_GFX_0, -1) - EVT_IF_EQ(AF_MAC_40, TRUE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_EnterBadgeShop)), TRIGGER_FLOOR_TOUCH, COLLIDER_roten, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitBadgeShop)), TRIGGER_FLOOR_TOUCH, COLLIDER_o444, 1, 0) - EVT_CALL(SetNpcJumpscale, NPC_Rowf, 1) - EVT_END_IF - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetModelFlags, MODEL_b1, MODEL_FLAG_INACTIVE, FALSE) - EVT_CALL(SetModelFlags, MODEL_b2, MODEL_FLAG_INACTIVE, FALSE) - EVT_CALL(SetModelFlags, MODEL_b3, MODEL_FLAG_INACTIVE, FALSE) - EVT_CALL(N(HideRowfBadges)) - EVT_LABEL(0) - EVT_IF_EQ(GF_MAC01_RowfBadgeAvailableA, FALSE) - EVT_CALL(GetModelCenter, MODEL_b3) - EVT_CALL(N(RowfShop_SetBadgePos), 0) - EVT_END_IF - EVT_IF_EQ(GF_MAC01_RowfBadgeAvailableB, FALSE) - EVT_CALL(GetModelCenter, MODEL_b2) - EVT_CALL(N(RowfShop_SetBadgePos), 1) - EVT_END_IF - EVT_IF_EQ(GF_MAC01_RowfBadgeAvailableC, FALSE) - EVT_CALL(GetModelCenter, MODEL_b1) - EVT_CALL(N(RowfShop_SetBadgePos), 2) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_THREAD - EVT_RETURN - EVT_END + Set(MV_BadgeShopOpenState, 0) + Set(MV_BadgeShopCloseState, 0) + Set(AF_MAC_40, FALSE) + Switch(GB_StoryProgress) + CaseLt(STORY_CH1_DEFEATED_JR_TROOPA) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Rowf_A))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Rowf))) + CaseLt(STORY_CH3_STAR_SPRIT_DEPARTED) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Rowf_B))) + Set(AF_MAC_40, TRUE) + CaseDefault + IfEq(GF_MAC01_CalculatorReturned, TRUE) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Rowf_B))) + Set(AF_MAC_40, TRUE) + Else + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Rowf_C))) + Call(SetNpcPos, NPC_Rowf, -250, 0, 295) + EndIf + EndSwitch + Set(AF_MAC_41, FALSE) + Call(SetModelFlags, MODEL_ju_2, MODEL_FLAG_DO_BOUNDS_CULLING, FALSE) + Call(EnableGroup, MODEL_jutan1, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b2, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_b3, COLLIDER_FLAGS_UPPER_MASK) + Call(RotateGroup, MODEL_jutan1, 60, 0, 1, 0) + Call(RotateGroup, MODEL_jutan2, 0, 0, 1, 0) + Call(ScaleGroup, MODEL_jutan2, Float(1.3), 1, Float(1.3)) + Set(MV_RowfRugRotateAngle, 60) + Call(MakeLocalVertexCopy, VTX_COPY_0, MODEL_ju_1, TRUE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_0, Ref(N(gfx_build_rowf_rug_with_ripples)), NULL) + Call(SetModelCustomGfx, MODEL_ju_1, CUSTOM_GFX_0, -1) + IfEq(AF_MAC_40, TRUE) + BindTrigger(Ref(N(EVS_EnterBadgeShop)), TRIGGER_FLOOR_TOUCH, COLLIDER_roten, 1, 0) + BindTrigger(Ref(N(EVS_ExitBadgeShop)), TRIGGER_FLOOR_TOUCH, COLLIDER_o444, 1, 0) + Call(SetNpcJumpscale, NPC_Rowf, 1) + EndIf + Thread + Wait(5) + Call(SetModelFlags, MODEL_b1, MODEL_FLAG_INACTIVE, FALSE) + Call(SetModelFlags, MODEL_b2, MODEL_FLAG_INACTIVE, FALSE) + Call(SetModelFlags, MODEL_b3, MODEL_FLAG_INACTIVE, FALSE) + Call(N(HideRowfBadges)) + Label(0) + IfEq(GF_MAC01_RowfBadgeAvailableA, FALSE) + Call(GetModelCenter, MODEL_b3) + Call(N(RowfShop_SetBadgePos), 0) + EndIf + IfEq(GF_MAC01_RowfBadgeAvailableB, FALSE) + Call(GetModelCenter, MODEL_b2) + Call(N(RowfShop_SetBadgePos), 1) + EndIf + IfEq(GF_MAC01_RowfBadgeAvailableC, FALSE) + Call(GetModelCenter, MODEL_b1) + Call(N(RowfShop_SetBadgePos), 2) + EndIf + Wait(1) + Goto(0) + EndThread + Return + End }; EvtScript N(EVS_NpcInit_Rhuff) = { - EVT_CALL(SetNpcScale, NPC_Rhuff, EVT_FLOAT(0.75), EVT_FLOAT(0.75), EVT_FLOAT(0.75)) - EVT_CALL(SetNpcPos, NPC_Rhuff, -230, 0, 320) - EVT_CALL(InterpNpcYaw, NPC_Rhuff, -90, 0) - EVT_CALL(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_Idle) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH1_DEFEATED_JR_TROOPA) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_RhuffChapter1))) - EVT_CASE_LT(STORY_CH2_BEGAN_PEACH_MISSION) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Rhuff_B))) - EVT_IF_EQ(GF_MAC01_Met_Rhuff, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Rhuff_C))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, -305, 0, 330) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPRIT_DEPARTED) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Rhuff_C))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_UpdateRhuffAnims))) - EVT_CASE_DEFAULT - EVT_IF_EQ(GF_MAC01_CalculatorReturned, TRUE) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Rhuff_C))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_UpdateRhuffAnims))) - EVT_ELSE - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Rhuff_D))) - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetNpcScale, NPC_Rhuff, Float(0.75), Float(0.75), Float(0.75)) + Call(SetNpcPos, NPC_Rhuff, -230, 0, 320) + Call(InterpNpcYaw, NPC_Rhuff, -90, 0) + Call(SetNpcAnimation, NPC_Rhuff, ANIM_Rowf_Idle) + Switch(GB_StoryProgress) + CaseLt(STORY_CH1_DEFEATED_JR_TROOPA) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_RhuffChapter1))) + CaseLt(STORY_CH2_BEGAN_PEACH_MISSION) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Rhuff_B))) + IfEq(GF_MAC01_Met_Rhuff, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Rhuff_C))) + Else + Call(SetNpcPos, NPC_SELF, -305, 0, 330) + Call(SetNpcYaw, NPC_SELF, 90) + EndIf + CaseLt(STORY_CH3_STAR_SPRIT_DEPARTED) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Rhuff_C))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_UpdateRhuffAnims))) + CaseDefault + IfEq(GF_MAC01_CalculatorReturned, TRUE) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Rhuff_C))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_UpdateRhuffAnims))) + Else + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Rhuff_D))) + EndIf + EndSwitch + Return + End }; AnimID N(ExtraAnims_Rowf)[] = { diff --git a/src/world/area_mac/mac_02/mac_02_1_music.c b/src/world/area_mac/mac_02/mac_02_1_music.c index a2bf0f172ee..78539501b47 100644 --- a/src/world/area_mac/mac_02/mac_02_1_music.c +++ b/src/world/area_mac/mac_02/mac_02_1_music.c @@ -1,12 +1,12 @@ #include "mac_02.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_INVASION, 0, 8) - EVT_CASE_DEFAULT - EVT_EXEC(N(EVS_SetupMusicTriggers)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseRange(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) + Call(SetMusicTrack, 0, SONG_SHY_GUY_INVASION, 0, 8) + CaseDefault + Exec(N(EVS_SetupMusicTriggers)) + EndSwitch + Return + End }; diff --git a/src/world/area_mac/mac_02/mac_02_2_main.c b/src/world/area_mac/mac_02/mac_02_2_main.c index 4336c3d5254..360807b902d 100644 --- a/src/world/area_mac/mac_02/mac_02_2_main.c +++ b/src/world/area_mac/mac_02/mac_02_2_main.c @@ -10,106 +10,106 @@ EvtScript N(EVS_ExitWalk_mac_01_3) = EVT_EXIT_WALK(60, mac_02_ENTRY_2, "mac_01", EvtScript N(EVS_ExitWalk_mac_03_0) = EVT_EXIT_WALK(60, mac_02_ENTRY_3, "mac_03", mac_03_ENTRY_0); EvtScript N(EVS_GotoMap_tik_06_3) = { - EVT_CALL(GotoMap, EVT_PTR("tik_06"), tik_06_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("tik_06"), tik_06_ENTRY_3) + Wait(100) + Return + End }; EvtScript N(EVS_GotoMap_tik_15_1) = { - EVT_CALL(GotoMap, EVT_PTR("tik_15"), tik_15_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("tik_15"), tik_15_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_SetupPipe) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_EXEC_WAIT(N(EVS_Pipe_ExitVertical)) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Set(LVarA, LVar0) + Set(LVarB, LVar1) + Set(LVarC, LVar2) + ExecWait(N(EVS_Pipe_ExitVertical)) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_mac_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_mim_10_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_mac_01_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_mac_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_SET(LVar0, mac_02_ENTRY_4) - EVT_SET(LVar1, COLLIDER_deilip) - EVT_SET(LVar2, EVT_PTR(N(EVS_GotoMap_tik_06_3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SetupPipe)), TRIGGER_FLOOR_TOUCH, LVar1, 1, 0) - EVT_SET(LVar0, mac_02_ENTRY_5) - EVT_SET(LVar1, COLLIDER_deilid) - EVT_SET(LVar2, EVT_PTR(N(EVS_GotoMap_tik_15_1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SetupPipe)), TRIGGER_FLOOR_TOUCH, LVar1, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_mac_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_mim_10_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_mac_01_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_mac_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Set(LVar0, mac_02_ENTRY_4) + Set(LVar1, COLLIDER_deilip) + Set(LVar2, Ref(N(EVS_GotoMap_tik_06_3))) + BindTrigger(Ref(N(EVS_SetupPipe)), TRIGGER_FLOOR_TOUCH, LVar1, 1, 0) + Set(LVar0, mac_02_ENTRY_5) + Set(LVar1, COLLIDER_deilid) + Set(LVar2, Ref(N(EVS_GotoMap_tik_15_1))) + BindTrigger(Ref(N(EVS_SetupPipe)), TRIGGER_FLOOR_TOUCH, LVar1, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH5_TRADED_VASE_FOR_SEED) - EVT_SET(GB_StoryProgress, STORY_CH5_RETURNED_TO_TOAD_TOWN) - EVT_END_IF - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_SET(AF_MAC_16, FALSE) - EVT_SET(AF_MAC_17, FALSE) - EVT_SET(AF_MAC_18, FALSE) - EVT_SET(AF_MAC_19, FALSE) - EVT_SET(AF_MAC_1A, FALSE) - EVT_SET(AF_MAC_1B, FALSE) - EVT_SET(AF_MAC_1C, FALSE) - EVT_SET(AF_MAC_1D, FALSE) - EVT_SET(AF_MAC_1E, FALSE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NpcGroup4))) - EVT_CASE_LT(STORY_CH3_SAW_BOO_ENTER_FOREST) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NpcGroup1))) - EVT_CASE_LT(STORY_CH3_STAR_SPRIT_DEPARTED) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NpcGroup4))) - EVT_CASE_LT(STORY_CH4_RETURNED_TOY_TRAIN) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NpcGroup3))) - EVT_CASE_DEFAULT - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NpcGroup4))) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_TWINK_GAVE_LUCKY_STAR) - EVT_CALL(EnableGroup, MODEL_st2, FALSE) - EVT_CALL(EnableGroup, MODEL_st3, FALSE) - EVT_CASE_LT(STORY_CH1_BEGAN_PEACH_MISSION) - EVT_CALL(EnableGroup, MODEL_st1, FALSE) - EVT_CALL(EnableGroup, MODEL_st3, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_st1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CASE_DEFAULT - EVT_CALL(EnableGroup, MODEL_st1, FALSE) - EVT_CALL(EnableGroup, MODEL_st2, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g47, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_SWITCH - EVT_CALL(EnableTexPanning, MODEL_hori, TRUE) - EVT_THREAD + IfEq(GB_StoryProgress, STORY_CH5_TRADED_VASE_FOR_SEED) + Set(GB_StoryProgress, STORY_CH5_RETURNED_TO_TOAD_TOWN) + EndIf + Set(GB_WorldLocation, LOCATION_TOAD_TOWN) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Set(AF_MAC_16, FALSE) + Set(AF_MAC_17, FALSE) + Set(AF_MAC_18, FALSE) + Set(AF_MAC_19, FALSE) + Set(AF_MAC_1A, FALSE) + Set(AF_MAC_1B, FALSE) + Set(AF_MAC_1C, FALSE) + Set(AF_MAC_1D, FALSE) + Set(AF_MAC_1E, FALSE) + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + Call(MakeNpcs, FALSE, Ref(N(NpcGroup4))) + CaseLt(STORY_CH3_SAW_BOO_ENTER_FOREST) + Call(MakeNpcs, FALSE, Ref(N(NpcGroup1))) + CaseLt(STORY_CH3_STAR_SPRIT_DEPARTED) + Call(MakeNpcs, FALSE, Ref(N(NpcGroup4))) + CaseLt(STORY_CH4_RETURNED_TOY_TRAIN) + Call(MakeNpcs, FALSE, Ref(N(NpcGroup3))) + CaseDefault + Call(MakeNpcs, FALSE, Ref(N(NpcGroup4))) + EndSwitch + ExecWait(N(EVS_MakeEntities)) + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_TWINK_GAVE_LUCKY_STAR) + Call(EnableGroup, MODEL_st2, FALSE) + Call(EnableGroup, MODEL_st3, FALSE) + CaseLt(STORY_CH1_BEGAN_PEACH_MISSION) + Call(EnableGroup, MODEL_st1, FALSE) + Call(EnableGroup, MODEL_st3, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_st1, COLLIDER_FLAGS_UPPER_MASK) + CaseDefault + Call(EnableGroup, MODEL_st1, FALSE) + Call(EnableGroup, MODEL_st2, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g47, COLLIDER_FLAGS_UPPER_MASK) + EndSwitch + Call(EnableTexPanning, MODEL_hori, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 100, 40, 200, -40) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_EXEC(N(EVS_SetupRooms)) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_LE(LVar0, mac_02_ENTRY_3) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_ELSE + Exec(N(EVS_UpdateTexturePan)) + EndThread + Exec(N(EVS_SetupRooms)) + Exec(N(EVS_SetupFoliage)) + Exec(N(EVS_SetupMusic)) + Call(GetEntryID, LVar0) + IfLe(LVar0, mac_02_ENTRY_3) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Else EVT_ENTER_PIPE_VERTICAL(N(EVS_BindExitTriggers)) - EVT_END_IF - EVT_RETURN - EVT_END + EndIf + Return + End }; diff --git a/src/world/area_mac/mac_02/mac_02_3_rooms.c b/src/world/area_mac/mac_02/mac_02_3_rooms.c index ad0cf0ef41a..7be4565b987 100644 --- a/src/world/area_mac/mac_02/mac_02_3_rooms.c +++ b/src/world/area_mac/mac_02/mac_02_3_rooms.c @@ -25,69 +25,69 @@ API_CALLABLE(N(InitEntryFromTunnels)) { EvtScript N(EVS_SetDoorRot_TayceT) = { - EVT_CALL(RotateModel, MODEL_c_door, LVar0, 0, -1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_c_door, LVar0, 0, -1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_TayceT) = { - EVT_SET(LVar1, LVar0) - EVT_CALL(RotateModel, MODEL_ck1, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_ck2, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_ck3, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_cy1, LVar1, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_cy2, LVar1, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_cy3, LVar1, -1, 0, 0) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + Call(RotateModel, MODEL_ck1, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_ck2, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_ck3, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_cy1, LVar1, -1, 0, 0) + Call(RotateModel, MODEL_cy2, LVar1, -1, 0, 0) + Call(RotateModel, MODEL_cy3, LVar1, -1, 0, 0) + Return + End }; EvtScript N(EVS_RoomListener_TayceT) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_CALL(SetGroupVisibility, MODEL_cook_in, MODEL_GROUP_VISIBLE) - EVT_SET(MF_MusicMixTrigger1, TRUE) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_CALL(SetGroupVisibility, MODEL_cook_in, MODEL_GROUP_HIDDEN) - EVT_SET(MF_MusicMixTrigger1, FALSE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Call(SetGroupVisibility, MODEL_cook_in, MODEL_GROUP_VISIBLE) + Set(MF_MusicMixTrigger1, TRUE) + CaseEq(ROOM_UPDATE_EXIT_END) + Call(SetGroupVisibility, MODEL_cook_in, MODEL_GROUP_HIDDEN) + Set(MF_MusicMixTrigger1, FALSE) + EndSwitch + Return + End }; EvtScript N(EVS_SetDoorRot_BlueHouse) = { - EVT_CALL(RotateModel, MODEL_sk_door, LVar0, 0, -1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_sk_door, LVar0, 0, -1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_BlueHouse) = { - EVT_SET(LVar1, LVar0) - EVT_CALL(RotateModel, MODEL_sk1, LVar1, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_sk2, LVar1, 0, 0, 1) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + Call(RotateModel, MODEL_sk1, LVar1, 0, 0, 1) + Call(RotateModel, MODEL_sk2, LVar1, 0, 0, 1) + Return + End }; EvtScript N(EVS_RoomListener_BlueHouse) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_IF_EQ(GF_MAC02_UnlockedHouse, FALSE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_LockedFromInside, 160, 40) - EVT_SET(LVar0, -1) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetGroupVisibility, MODEL_souko_in, MODEL_GROUP_VISIBLE) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_BEGIN) - EVT_IF_EQ(GF_MAC02_UnlockedHouse, FALSE) - EVT_SET(LVar0, -1) - EVT_RETURN - EVT_END_IF - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_CALL(SetGroupVisibility, MODEL_souko_in, MODEL_GROUP_HIDDEN) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + IfEq(GF_MAC02_UnlockedHouse, FALSE) + Call(ShowMessageAtScreenPos, MSG_Menus_Inspect_LockedFromInside, 160, 40) + Set(LVar0, -1) + Return + EndIf + Call(SetGroupVisibility, MODEL_souko_in, MODEL_GROUP_VISIBLE) + CaseEq(ROOM_UPDATE_EXIT_BEGIN) + IfEq(GF_MAC02_UnlockedHouse, FALSE) + Set(LVar0, -1) + Return + EndIf + CaseEq(ROOM_UPDATE_EXIT_END) + Call(SetGroupVisibility, MODEL_souko_in, MODEL_GROUP_HIDDEN) + EndSwitch + Return + End }; s32 N(InsideNPCs_TayceT)[] = { @@ -101,41 +101,41 @@ s32 N(InsideNPCs_BlueHouse)[] = { EvtScript N(EVS_SetupRooms) = { // tayce T's house on the right - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_LEFT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_TayceT)), - EVT_PTR(N(EVS_SetWallRot_TayceT)), + Ref(N(EVS_SetDoorRot_TayceT)), + Ref(N(EVS_SetWallRot_TayceT)), NULL, - EVT_PTR(N(EVS_RoomListener_TayceT)), + Ref(N(EVS_RoomListener_TayceT)), COLLIDER_deilit1u, COLLIDER_deilit1, MODEL_cooking, - EVT_PTR(N(InsideNPCs_TayceT))) + Ref(N(InsideNPCs_TayceT))) // blue house on the left - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_LEFT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_BlueHouse)), - EVT_PTR(N(EVS_SetWallRot_BlueHouse)), + Ref(N(EVS_SetDoorRot_BlueHouse)), + Ref(N(EVS_SetWallRot_BlueHouse)), NULL, - EVT_PTR(N(EVS_RoomListener_BlueHouse)), + Ref(N(EVS_RoomListener_BlueHouse)), COLLIDER_deilit2, COLLIDER_deilit2u, MODEL_souko, - EVT_PTR(N(InsideNPCs_BlueHouse))) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, mac_02_ENTRY_5) - EVT_SET(LVar0, 3) - EVT_EXEC(N(EVS_RoomListener_TayceT)) - EVT_CALL(SetGroupVisibility, MODEL_souko_in, MODEL_GROUP_VISIBLE) - EVT_CALL(N(InitEntryFromTunnels)) - EVT_SET(LVar0, 90) - EVT_CALL(RotateModel, MODEL_sk1, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_sk2, LVar0, 0, 0, 1) - EVT_ELSE - EVT_SET(LVar0, ROOM_UPDATE_EXIT_END) - EVT_EXEC(N(EVS_RoomListener_TayceT)) - EVT_EXEC(N(EVS_RoomListener_BlueHouse)) - EVT_END_IF - EVT_RETURN - EVT_END + Ref(N(InsideNPCs_BlueHouse))) + Call(GetEntryID, LVar0) + IfEq(LVar0, mac_02_ENTRY_5) + Set(LVar0, 3) + Exec(N(EVS_RoomListener_TayceT)) + Call(SetGroupVisibility, MODEL_souko_in, MODEL_GROUP_VISIBLE) + Call(N(InitEntryFromTunnels)) + Set(LVar0, 90) + Call(RotateModel, MODEL_sk1, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_sk2, LVar0, 0, 0, 1) + Else + Set(LVar0, ROOM_UPDATE_EXIT_END) + Exec(N(EVS_RoomListener_TayceT)) + Exec(N(EVS_RoomListener_BlueHouse)) + EndIf + Return + End }; diff --git a/src/world/area_mac/mac_02/mac_02_4_foliage.c b/src/world/area_mac/mac_02/mac_02_4_foliage.c index bb693de28b1..36f402679e3 100644 --- a/src/world/area_mac/mac_02/mac_02_4_foliage.c +++ b/src/world/area_mac/mac_02/mac_02_4_foliage.c @@ -113,18 +113,18 @@ BombTrigger N(BombPos_Tree4) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o409, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o361, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o370, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree3)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree4))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o378, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree4)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o409, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o361, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree3))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o370, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree3)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree4))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o378, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree4)), 1, 0) + Return + End }; diff --git a/src/world/area_mac/mac_02/mac_02_5_entity.c b/src/world/area_mac/mac_02/mac_02_5_entity.c index dcbcd3c9c65..3be8f97d66e 100644 --- a/src/world/area_mac/mac_02/mac_02_5_entity.c +++ b/src/world/area_mac/mac_02/mac_02_5_entity.c @@ -9,59 +9,59 @@ s32 N(ItemList_OddKey)[] = { }; EvtScript N(EVS_ChooseItem_OddKey) = { - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, -470, 30, -155) - EVT_SET(LVar0, MV_BlueHouseLockEntityID) - EVT_CALL(N(RemovePadlock)) - EVT_WAIT(5) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_SET(GF_MAC02_UnlockedHouse, TRUE) - EVT_CALL(CloseChoicePopup) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(ShowKeyChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) + Call(CloseChoicePopup) + Return + EndIf + IfEq(LVar0, -1) + Call(CloseChoicePopup) + Return + EndIf + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, -470, 30, -155) + Set(LVar0, MV_BlueHouseLockEntityID) + Call(N(RemovePadlock)) + Wait(5) + Call(RemoveKeyItemAt, LVar1) + Set(GF_MAC02_UnlockedHouse, TRUE) + Call(CloseChoicePopup) + Unbind + Return + End }; EvtScript N(EVS_ReadSign) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_016B, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_016B, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_OnInspect_StreetSign) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0171, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_0171, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, mac_02_ENTRY_5) - EVT_IF_EQ(GF_MAC02_UnlockedHouse, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), -470, 30, -155, 180, MAKE_ENTITY_END) - EVT_SET(MV_BlueHouseLockEntityID, LVar0) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_ChooseItem_OddKey)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(ItemList_OddKey)), 0, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(MakeItemEntity, ITEM_ODD_KEY, -412, 20, -320, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_MAC02_Item_OddKey) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 400, 0, 100, 0, MODEL_o236, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_MAC02_HiddenPanel) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Signpost), -375, 0, 190, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_ReadSign))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnInspect_StreetSign)), TRIGGER_WALL_PRESS_A, COLLIDER_sign, 1, 0) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, mac_02_ENTRY_5) + IfEq(GF_MAC02_UnlockedHouse, FALSE) + Call(MakeEntity, Ref(Entity_Padlock), -470, 30, -155, 180, MAKE_ENTITY_END) + Set(MV_BlueHouseLockEntityID, LVar0) + BindPadlock(Ref(N(EVS_ChooseItem_OddKey)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), Ref(N(ItemList_OddKey)), 0, 1) + EndIf + EndIf + Call(MakeItemEntity, ITEM_ODD_KEY, -412, 20, -320, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_MAC02_Item_OddKey) + Call(MakeEntity, Ref(Entity_HiddenPanel), 400, 0, 100, 0, MODEL_o236, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_MAC02_HiddenPanel) + Call(MakeEntity, Ref(Entity_Signpost), -375, 0, 190, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_ReadSign))) + BindTrigger(Ref(N(EVS_OnInspect_StreetSign)), TRIGGER_WALL_PRESS_A, COLLIDER_sign, 1, 0) + Return + End }; diff --git a/src/world/area_mac/mac_02/mac_02_7_music_mix.c b/src/world/area_mac/mac_02/mac_02_7_music_mix.c index a616738dfeb..c3231ea1c96 100644 --- a/src/world/area_mac/mac_02/mac_02_7_music_mix.c +++ b/src/world/area_mac/mac_02/mac_02_7_music_mix.c @@ -19,14 +19,14 @@ MusicProximityTrigger N(MusicMixTrigger2) = { }; EvtScript N(EVS_SetupMusicTriggers) = { - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN, 0, 8) - EVT_CALL(EnableMusicProximityMix, 0) - EVT_THREAD - EVT_CALL(N(MonitorMusicProximityTrigger), EVT_PTR(N(MusicMixTrigger1))) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(MonitorMusicProximityTrigger), EVT_PTR(N(MusicMixTrigger2))) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TOAD_TOWN, 0, 8) + Call(EnableMusicProximityMix, 0) + Thread + Call(N(MonitorMusicProximityTrigger), Ref(N(MusicMixTrigger1))) + EndThread + Thread + Call(N(MonitorMusicProximityTrigger), Ref(N(MusicMixTrigger2))) + EndThread + Return + End }; diff --git a/src/world/area_mac/mac_02/npc/bootler.inc.c b/src/world/area_mac/mac_02/npc/bootler.inc.c index 34a919b9ff9..6136f271c8b 100644 --- a/src/world/area_mac/mac_02/npc/bootler.inc.c +++ b/src/world/area_mac/mac_02/npc/bootler.inc.c @@ -1,130 +1,130 @@ EvtScript N(D_8024ACA4_82DF64) = { - EVT_IF_EQ(LVar0, EVT_FLOAT(0.0)) - EVT_CALL(PlaySoundAtNpc, NPC_Bootler, SOUND_BOO_VANISH_A, SOUND_SPACE_DEFAULT) - EVT_SETF(LVar1, EVT_FLOAT(24.0)) - EVT_ELSE - EVT_CALL(PlaySoundAtNpc, NPC_Bootler, SOUND_BOO_APPEAR_A, SOUND_SPACE_DEFAULT) - EVT_SETF(LVar1, EVT_FLOAT(-24.0)) - EVT_END_IF - EVT_LOOP(10) - EVT_ADDF(LVar0, LVar1) - EVT_CALL(SetNpcImgFXParams, NPC_Bootler, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + IfEq(LVar0, Float(0.0)) + Call(PlaySoundAtNpc, NPC_Bootler, SOUND_BOO_VANISH_A, SOUND_SPACE_DEFAULT) + SetF(LVar1, Float(24.0)) + Else + Call(PlaySoundAtNpc, NPC_Bootler, SOUND_BOO_APPEAR_A, SOUND_SPACE_DEFAULT) + SetF(LVar1, Float(-24.0)) + EndIf + Loop(10) + AddF(LVar0, LVar1) + Call(SetNpcImgFXParams, NPC_Bootler, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_Bootler) = { - EVT_LOOP(0) - EVT_WAIT(1) - EVT_SET(LVar0, 0) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_SWITCH(LVar3) - EVT_CASE_RANGE(-52, 47) - EVT_ADD(LVar0, 1) - EVT_END_SWITCH - EVT_IF_GT(LVar1, 140) - EVT_ADD(LVar0, 1) - EVT_END_IF - EVT_IF_EQ(LVar0, 2) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetMusicTrack, 0, SONG_BOOS_MANSION, 0, 8) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_MAC_Bridge_0022, 400, 100) - EVT_THREAD - EVT_CALL(SetNpcPos, NPC_SELF, 430, 60, -40) - EVT_CALL(SetNpcAnimation, NPC_Bootler, ANIM_Bootler_Walk) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_BOOTLER_HIDE, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcMoveTo, NPC_SELF, 580, -40, 0) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 430, 1, 35) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 430, 1, 35) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(275.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.5), EVT_FLOAT(-10.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PlayerMoveTo, 430, -40, 0) - EVT_CALL(InterpPlayerYaw, 315, 0) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(NpcMoveTo, NPC_PARTNER, 455, -40, 20 * DT) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 315, 0) - EVT_CALL(EnablePartnerAI) - EVT_CALL(SpeakToPlayer, NPC_FiceT, ANIM_FiceT_Afraid, ANIM_FiceT_Afraid, 0, MSG_MAC_Bridge_0023) - EVT_CALL(ShowChoice, MSG_Choice_0036) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LVar1, MSG_MAC_Bridge_0024) - EVT_ELSE - EVT_SET(LVar1, MSG_MAC_Bridge_0025) - EVT_END_IF - EVT_CALL(ContinueSpeech, NPC_FiceT, ANIM_FiceT_Afraid, ANIM_FiceT_Afraid, 0, LVar1) - EVT_WAIT(20 * DT) - EVT_SETF(LVar0, EVT_FLOAT(0.0)) - EVT_CALL(SetNpcAnimation, NPC_Bootler, ANIM_Bootler_Spook) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_ALPHA, 0, 0, 0, 0) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_CALL(SetNpcPos, NPC_SELF, 500, 50, 30) - EVT_EXEC_WAIT(N(D_8024ACA4_82DF64)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_FiceT, ANIM_FiceT_Afraid, ANIM_FiceT_Afraid, 5, MSG_MAC_Bridge_0026) - EVT_EXEC_WAIT(N(D_8024ACA4_82DF64)) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_WAIT(25 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, 0, EMOTE_QUESTION, 0, 30, EMOTER_PLAYER, 0, 0, 0, 0) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcScale, NPC_Bootler, EVT_FLOAT(2.0), EVT_FLOAT(2.0), EVT_FLOAT(2.0)) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_CALL(SetNpcPos, NPC_SELF, 360, 20, 30) - EVT_EXEC_WAIT(N(D_8024ACA4_82DF64)) - EVT_CALL(SpeakToPlayer, NPC_FiceT, ANIM_FiceT_Afraid, ANIM_FiceT_Afraid, 5, MSG_MAC_Bridge_0027) - EVT_EXEC_WAIT(N(D_8024ACA4_82DF64)) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_WAIT(25 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, 0, EMOTE_QUESTION, 0, 30, EMOTER_PLAYER, 0, 0, 0, 0) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Bootler, ANIM_Bootler_Walk) - EVT_CALL(SetNpcScale, NPC_Bootler, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetNpcPos, NPC_SELF, 480, 70, 10) - EVT_EXEC_WAIT(N(D_8024ACA4_82DF64)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_BOOTLER_HIDE, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcFlyTo, NPC_SELF, 550, 40, 10, 40 * DT, 10, EASING_LINEAR) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(SpeakToPlayer, NPC_FiceT, ANIM_FiceT_Afraid, ANIM_FiceT_Afraid, 5, MSG_MAC_Bridge_0028) - EVT_WAIT(10 * DT) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_WAIT(25 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, 0, EMOTE_QUESTION, 0, 30, EMOTER_PLAYER, 0, 0, 0, 0) - EVT_WAIT(40 * DT) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_CALL(SpeakToPlayer, NPC_FiceT, ANIM_FiceT_Afraid, ANIM_FiceT_Afraid, 0, MSG_MAC_Bridge_0029) - EVT_EXEC(N(EVS_SetupMusicTriggers)) - EVT_SET(GB_StoryProgress, STORY_CH3_SAW_BOO_ENTER_FOREST) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Loop(0) + Wait(1) + Set(LVar0, 0) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + Switch(LVar3) + CaseRange(-52, 47) + Add(LVar0, 1) + EndSwitch + IfGt(LVar1, 140) + Add(LVar0, 1) + EndIf + IfEq(LVar0, 2) + BreakLoop + EndIf + EndLoop + Call(SetMusicTrack, 0, SONG_BOOS_MANSION, 0, 8) + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_MAC_Bridge_0022, 400, 100) + Thread + Call(SetNpcPos, NPC_SELF, 430, 60, -40) + Call(SetNpcAnimation, NPC_Bootler, ANIM_Bootler_Walk) + Call(SetNpcSpeed, NPC_SELF, Float(3.0 / DT)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_BOOTLER_HIDE, SOUND_SPACE_DEFAULT) + Call(NpcMoveTo, NPC_SELF, 580, -40, 0) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndThread + Call(UseSettingsFrom, CAM_DEFAULT, 430, 1, 35) + Call(SetPanTarget, CAM_DEFAULT, 430, 1, 35) + Call(SetCamDistance, CAM_DEFAULT, Float(275.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(18.5), Float(-10.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetPlayerSpeed, Float(4.0 / DT)) + Call(PlayerMoveTo, 430, -40, 0) + Call(InterpPlayerYaw, 315, 0) + Call(DisablePartnerAI, 0) + Call(NpcMoveTo, NPC_PARTNER, 455, -40, 20 * DT) + Call(InterpNpcYaw, NPC_PARTNER, 315, 0) + Call(EnablePartnerAI) + Call(SpeakToPlayer, NPC_FiceT, ANIM_FiceT_Afraid, ANIM_FiceT_Afraid, 0, MSG_MAC_Bridge_0023) + Call(ShowChoice, MSG_Choice_0036) + IfEq(LVar0, 0) + Set(LVar1, MSG_MAC_Bridge_0024) + Else + Set(LVar1, MSG_MAC_Bridge_0025) + EndIf + Call(ContinueSpeech, NPC_FiceT, ANIM_FiceT_Afraid, ANIM_FiceT_Afraid, 0, LVar1) + Wait(20 * DT) + SetF(LVar0, Float(0.0)) + Call(SetNpcAnimation, NPC_Bootler, ANIM_Bootler_Spook) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_ALPHA, 0, 0, 0, 0) + Call(SetNpcYaw, NPC_SELF, 270) + Call(SetNpcPos, NPC_SELF, 500, 50, 30) + ExecWait(N(D_8024ACA4_82DF64)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_FiceT, ANIM_FiceT_Afraid, ANIM_FiceT_Afraid, 5, MSG_MAC_Bridge_0026) + ExecWait(N(D_8024ACA4_82DF64)) + Call(InterpPlayerYaw, 90, 0) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + Wait(25 * DT) + Call(PlaySoundAtPlayer, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) + Call(ShowEmote, 0, EMOTE_QUESTION, 0, 30, EMOTER_PLAYER, 0, 0, 0, 0) + Wait(30 * DT) + Call(SetNpcScale, NPC_Bootler, Float(2.0), Float(2.0), Float(2.0)) + Call(SetNpcYaw, NPC_SELF, 90) + Call(SetNpcPos, NPC_SELF, 360, 20, 30) + ExecWait(N(D_8024ACA4_82DF64)) + Call(SpeakToPlayer, NPC_FiceT, ANIM_FiceT_Afraid, ANIM_FiceT_Afraid, 5, MSG_MAC_Bridge_0027) + ExecWait(N(D_8024ACA4_82DF64)) + Call(InterpPlayerYaw, 270, 0) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + Wait(25 * DT) + Call(PlaySoundAtPlayer, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) + Call(ShowEmote, 0, EMOTE_QUESTION, 0, 30, EMOTER_PLAYER, 0, 0, 0, 0) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Bootler, ANIM_Bootler_Walk) + Call(SetNpcScale, NPC_Bootler, Float(1.0), Float(1.0), Float(1.0)) + Call(SetNpcPos, NPC_SELF, 480, 70, 10) + ExecWait(N(D_8024ACA4_82DF64)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_BOOTLER_HIDE, SOUND_SPACE_DEFAULT) + Call(NpcFlyTo, NPC_SELF, 550, 40, 10, 40 * DT, 10, EASING_LINEAR) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(SpeakToPlayer, NPC_FiceT, ANIM_FiceT_Afraid, ANIM_FiceT_Afraid, 5, MSG_MAC_Bridge_0028) + Wait(10 * DT) + Call(InterpPlayerYaw, 90, 0) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + Wait(25 * DT) + Call(PlaySoundAtPlayer, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) + Call(ShowEmote, 0, EMOTE_QUESTION, 0, 30, EMOTER_PLAYER, 0, 0, 0, 0) + Wait(40 * DT) + Call(InterpPlayerYaw, 270, 0) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + Call(SpeakToPlayer, NPC_FiceT, ANIM_FiceT_Afraid, ANIM_FiceT_Afraid, 0, MSG_MAC_Bridge_0029) + Exec(N(EVS_SetupMusicTriggers)) + Set(GB_StoryProgress, STORY_CH3_SAW_BOO_ENTER_FOREST) + Call(ResetCam, CAM_DEFAULT, Float(4.0 / DT)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Bootler) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Bootler))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH2_STAR_SPRIT_DEPARTED) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Bootler))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; diff --git a/src/world/area_mac/mac_02/npc/bubulb.inc.c b/src/world/area_mac/mac_02/npc/bubulb.inc.c index ff8516dd214..f47f7899523 100644 --- a/src/world/area_mac/mac_02/npc/bubulb.inc.c +++ b/src/world/area_mac/mac_02/npc/bubulb.inc.c @@ -1,50 +1,50 @@ EvtScript N(EVS_NpcInteract_Bubulb) = { - EVT_IF_EQ(GF_MAC02_Gift_MagicalSeed1, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_BuriedIdle, ANIM_Bubulb_Pink_BuriedIdle, 0, MSG_MAC_Bridge_0085) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_MOLE_POP, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Bubulb_Pink_PopUp) - EVT_WAIT(45) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Bubulb_Pink_Idle) - EVT_CALL(SetNpcCollisionSize, NPC_SELF, 45, 26) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_MAC_Bridge_0086) + IfEq(GF_MAC02_Gift_MagicalSeed1, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_BuriedIdle, ANIM_Bubulb_Pink_BuriedIdle, 0, MSG_MAC_Bridge_0085) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_MOLE_POP, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_SELF, ANIM_Bubulb_Pink_PopUp) + Wait(45) + Call(SetNpcAnimation, NPC_SELF, ANIM_Bubulb_Pink_Idle) + Call(SetNpcCollisionSize, NPC_SELF, 45, 26) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_MAC_Bridge_0086) EVT_GIVE_KEY_REWARD(ITEM_MAGICAL_SEED1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_MAC_Bridge_0087) - EVT_SET(GF_MAC02_Gift_MagicalSeed1, TRUE) - EVT_CALL(SetTattleMessage, NPC_Bubulb, MSG_NpcTattle_MAC_Bubulb_Revealed) - EVT_ELSE - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_CASE_LT(STORY_CH2_BEGAN_PEACH_MISSION) - EVT_SET(LVar0, MSG_MAC_Bridge_0088) - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Bridge_0089) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Bridge_008A) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Bridge_008B) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Bridge_008C) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Bridge_008D) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Bridge_008E) - EVT_CASE_DEFAULT - EVT_SET(LVar0, MSG_MAC_Bridge_008E) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_Bubulb, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, LVar0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_MAC_Bridge_0087) + Set(GF_MAC02_Gift_MagicalSeed1, TRUE) + Call(SetTattleMessage, NPC_Bubulb, MSG_NpcTattle_MAC_Bubulb_Revealed) + Else + Switch(GB_StoryProgress) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + CaseLt(STORY_CH2_BEGAN_PEACH_MISSION) + Set(LVar0, MSG_MAC_Bridge_0088) + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Bridge_0089) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Bridge_008A) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Bridge_008B) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Bridge_008C) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Bridge_008D) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Bridge_008E) + CaseDefault + Set(LVar0, MSG_MAC_Bridge_008E) + EndSwitch + Call(SpeakToPlayer, NPC_Bubulb, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, LVar0) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Bubulb) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bubulb))) - EVT_IF_EQ(GF_MAC02_Gift_MagicalSeed1, FALSE) - EVT_CALL(SetNpcCollisionSize, NPC_SELF, 25, 25) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Bubulb_Pink_BuriedIdle) - EVT_CALL(SetTattleMessage, NPC_Bubulb, MSG_NpcTattle_MAC_Bubulb_Hidden) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bubulb))) + IfEq(GF_MAC02_Gift_MagicalSeed1, FALSE) + Call(SetNpcCollisionSize, NPC_SELF, 25, 25) + Call(SetNpcAnimation, NPC_SELF, ANIM_Bubulb_Pink_BuriedIdle) + Call(SetTattleMessage, NPC_Bubulb, MSG_NpcTattle_MAC_Bubulb_Hidden) + EndIf + Return + End }; diff --git a/src/world/area_mac/mac_02/npc/cooking_apprentice.inc.c b/src/world/area_mac/mac_02/npc/cooking_apprentice.inc.c index 342b3a0b204..184cc18811e 100644 --- a/src/world/area_mac/mac_02/npc/cooking_apprentice.inc.c +++ b/src/world/area_mac/mac_02/npc/cooking_apprentice.inc.c @@ -1,46 +1,46 @@ EvtScript N(EVS_NpcInteract_CookingApprentice) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Bridge_004A) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Bridge_004B) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Bridge_004C) - EVT_CASE_LT(STORY_CH4_GOT_TAYCE_TS_CAKE) - EVT_SET(LVar0, MSG_MAC_Bridge_004D) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Bridge_004E) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC02_TayceT_HasCookbook, FALSE) - EVT_SET(LVar0, MSG_MAC_Bridge_004F) - EVT_ELSE - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Bridge_0050) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Bridge_0051) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Bridge_0052) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Bridge_0053) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Bridge_0054) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Bridge_0055) - EVT_END_SWITCH - EVT_END_IF - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Bridge_0056) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_CookingApprentice, ANIM_Toadette_Purple_Talk, ANIM_Toadette_Purple_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Bridge_004A) + Else + Set(LVar0, MSG_MAC_Bridge_004B) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Bridge_004C) + CaseLt(STORY_CH4_GOT_TAYCE_TS_CAKE) + Set(LVar0, MSG_MAC_Bridge_004D) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Bridge_004E) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC02_TayceT_HasCookbook, FALSE) + Set(LVar0, MSG_MAC_Bridge_004F) + Else + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Bridge_0050) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Bridge_0051) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Bridge_0052) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Bridge_0053) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Bridge_0054) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Bridge_0055) + EndSwitch + EndIf + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Bridge_0056) + EndSwitch + Call(SpeakToPlayer, NPC_CookingApprentice, ANIM_Toadette_Purple_Talk, ANIM_Toadette_Purple_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_CookingApprentice) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_CookingApprentice))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_CookingApprentice))) + Return + End }; diff --git a/src/world/area_mac/mac_02/npc/fice_t.inc.c b/src/world/area_mac/mac_02/npc/fice_t.inc.c index 4cb6d7df538..5492e96c68d 100644 --- a/src/world/area_mac/mac_02/npc/fice_t.inc.c +++ b/src/world/area_mac/mac_02/npc/fice_t.inc.c @@ -4,79 +4,79 @@ s32 N(LetterList_FiceT)[] = { }; EvtScript N(EVS_LetterPrompt_FiceT) = { - EVT_CALL(N(LetterDelivery_Init), + Call(N(LetterDelivery_Init), NPC_FiceT, ANIM_FiceT_Talk, ANIM_FiceT_Idle, ITEM_LETTER_TO_FICE_T, ITEM_NONE, MSG_MAC_Bridge_0036, MSG_MAC_Bridge_0037, MSG_MAC_Bridge_0038, 0, - EVT_PTR(N(LetterList_FiceT))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) - EVT_RETURN - EVT_END + Ref(N(LetterList_FiceT))) + ExecWait(N(EVS_DoLetterDelivery)) + Return + End }; EvtScript N(EVS_LetterReward_FiceT) = { - EVT_IF_EQ(LVarC, DELIVERY_ACCEPTED) - EVT_CALL(SpeakToPlayer, NPC_FiceT, ANIM_FiceT_Talk, ANIM_FiceT_Idle, 0, MSG_MAC_Bridge_0039) - EVT_CALL(SetNpcAnimation, NPC_FiceT, ANIM_FiceT_Afraid) - EVT_CALL(EndSpeech, NPC_FiceT, ANIM_FiceT_Afraid, ANIM_FiceT_Afraid, 0) + IfEq(LVarC, DELIVERY_ACCEPTED) + Call(SpeakToPlayer, NPC_FiceT, ANIM_FiceT_Talk, ANIM_FiceT_Idle, 0, MSG_MAC_Bridge_0039) + Call(SetNpcAnimation, NPC_FiceT, ANIM_FiceT_Afraid) + Call(EndSpeech, NPC_FiceT, ANIM_FiceT_Afraid, ANIM_FiceT_Afraid, 0) EVT_GIVE_STAR_PIECE() - EVT_CALL(SetNpcAnimation, NPC_FiceT, ANIM_FiceT_Idle) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_FiceT, ANIM_FiceT_Idle) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_FiceT) = { - EVT_SET(LVar3, 0) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Bridge_0021) - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar3, 1) - EVT_SET(LVar0, MSG_MAC_Bridge_002A) - EVT_SET(LVar1, MSG_MAC_Bridge_002B) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Bridge_002C) - EVT_SET(LVar1, MSG_MAC_Bridge_002D) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Bridge_002E) - EVT_SET(LVar1, MSG_MAC_Bridge_002F) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Bridge_0030) - EVT_SET(LVar1, MSG_MAC_Bridge_0031) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Bridge_0032) - EVT_SET(LVar1, MSG_MAC_Bridge_0033) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Bridge_0034) - EVT_SET(LVar1, MSG_MAC_Bridge_0035) - EVT_END_SWITCH - EVT_CALL(GetCurrentPartnerID, LVar2) - EVT_IF_EQ(LVar2, PARTNER_BOW) - EVT_CALL(SpeakToPlayer, NPC_FiceT, ANIM_FiceT_Afraid, ANIM_FiceT_Afraid, 0, LVar1) - EVT_ELSE - EVT_IF_EQ(LVar3, 0) - EVT_CALL(SpeakToPlayer, NPC_FiceT, ANIM_FiceT_Talk, ANIM_FiceT_Idle, 0, LVar0) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_FiceT, ANIM_FiceT_Afraid, ANIM_FiceT_Afraid, 0, LVar0) - EVT_END_IF - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_LetterPrompt_FiceT)) - EVT_EXEC_WAIT(N(EVS_LetterReward_FiceT)) - EVT_IF_NE(LVarC, DELIVERY_NOT_POSSIBLE) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVar3, 0) + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Bridge_0021) + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar3, 1) + Set(LVar0, MSG_MAC_Bridge_002A) + Set(LVar1, MSG_MAC_Bridge_002B) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Bridge_002C) + Set(LVar1, MSG_MAC_Bridge_002D) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Bridge_002E) + Set(LVar1, MSG_MAC_Bridge_002F) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Bridge_0030) + Set(LVar1, MSG_MAC_Bridge_0031) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Bridge_0032) + Set(LVar1, MSG_MAC_Bridge_0033) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Bridge_0034) + Set(LVar1, MSG_MAC_Bridge_0035) + EndSwitch + Call(GetCurrentPartnerID, LVar2) + IfEq(LVar2, PARTNER_BOW) + Call(SpeakToPlayer, NPC_FiceT, ANIM_FiceT_Afraid, ANIM_FiceT_Afraid, 0, LVar1) + Else + IfEq(LVar3, 0) + Call(SpeakToPlayer, NPC_FiceT, ANIM_FiceT_Talk, ANIM_FiceT_Idle, 0, LVar0) + Else + Call(SpeakToPlayer, NPC_FiceT, ANIM_FiceT_Afraid, ANIM_FiceT_Afraid, 0, LVar0) + EndIf + EndIf + ExecWait(N(EVS_LetterPrompt_FiceT)) + ExecWait(N(EVS_LetterReward_FiceT)) + IfNe(LVarC, DELIVERY_NOT_POSSIBLE) + Return + EndIf + Return + End }; EvtScript N(EVS_NpcInit_FiceT) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_FiceT_Afraid) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, 390, 0, -50) - EVT_END_IF - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_FiceT))) - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH2_STAR_SPRIT_DEPARTED) + Call(SetNpcAnimation, NPC_SELF, ANIM_FiceT_Afraid) + Else + Call(SetNpcPos, NPC_SELF, 390, 0, -50) + EndIf + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_FiceT))) + Return + End }; diff --git a/src/world/area_mac/mac_02/npc/shyguy_thief.inc.c b/src/world/area_mac/mac_02/npc/shyguy_thief.inc.c index 27f022e83f3..452c4fdd297 100644 --- a/src/world/area_mac/mac_02/npc/shyguy_thief.inc.c +++ b/src/world/area_mac/mac_02/npc/shyguy_thief.inc.c @@ -1,87 +1,87 @@ EvtScript N(D_8024B5AC_82E86C) = { - EVT_CALL(GetNpcPos, NPC_ShyGuy, LVar2, LVar3, LVar4) - EVT_ADD(LVar3, 20) - EVT_CALL(MakeItemEntity, ITEM_FRYING_PAN, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVar9, LVar0) - EVT_WAIT(1) - EVT_LOOP(70) - EVT_CALL(GetNpcPos, NPC_ShyGuy, LVar2, LVar3, LVar4) - EVT_ADD(LVar3, 20) - EVT_CALL(SetItemPos, LVar9, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(RemoveItemEntity, LVar9) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_ShyGuy, LVar2, LVar3, LVar4) + Add(LVar3, 20) + Call(MakeItemEntity, ITEM_FRYING_PAN, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVar9, LVar0) + Wait(1) + Loop(70) + Call(GetNpcPos, NPC_ShyGuy, LVar2, LVar3, LVar4) + Add(LVar3, 20) + Call(SetItemPos, LVar9, LVar2, LVar3, LVar4) + Wait(1) + EndLoop + Call(RemoveItemEntity, LVar9) + Return + End }; EvtScript N(D_8024B6A0_82E960) = { - EVT_LOOP(0) - EVT_CALL(PlaySoundAtNpc, NPC_ShyGuy, SOUND_SEQ_SHY_GUY_STEP, SOUND_SPACE_DEFAULT) - EVT_WAIT(2) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(PlaySoundAtNpc, NPC_ShyGuy, SOUND_SEQ_SHY_GUY_STEP, SOUND_SPACE_DEFAULT) + Wait(2) + EndLoop + Return + End }; EvtScript N(D_8024B6E8_82E9A8) = { - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 40) - EVT_IF_LT(LVar2, 180) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_MAC_Bridge_0016, 160, 40) - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(3.0), -140, 20, -140, 400, 15, -6) - EVT_CALL(SetNpcPos, NPC_ShyGuy, -200, 20, -260) - EVT_CALL(SetNpcAnimation, NPC_ShyGuy, ANIM_ShyGuy_Red_Anim04) - EVT_WAIT(10) - EVT_EXEC(N(D_8024B5AC_82E86C)) - EVT_THREAD - EVT_CALL(EnableGroup, MODEL_cook_in, TRUE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilit1u, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 8) - EVT_CALL(RotateModel, MODEL_c_door, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(5) - EVT_LOOP(10) - EVT_ADD(LVar0, -8) - EVT_CALL(RotateModel, MODEL_c_door, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilit1u, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_CALL(EnableGroup, MODEL_cook_in, FALSE) - EVT_END_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySoundAtNpc, NPC_ShyGuy, SOUND_SHY_GUY_RUN_AWAY, SOUND_SPACE_DEFAULT) - EVT_EXEC_GET_TID(N(D_8024B6A0_82E960), LVarA) - EVT_CALL(SetNpcSpeed, NPC_ShyGuy, 8) - EVT_CALL(NpcMoveTo, NPC_ShyGuy, -140, -240, 0) - EVT_CALL(NpcMoveTo, NPC_ShyGuy, -140, -140, 0) - EVT_CALL(NpcJump0, NPC_ShyGuy, -140, 0, -100, 0) - EVT_CALL(NpcMoveTo, NPC_ShyGuy, -190, -20, 0) - EVT_CALL(NpcMoveTo, NPC_ShyGuy, -350, -20, 0) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetNpcPos, NPC_ShyGuy, NPC_DISPOSE_LOCATION) - EVT_SET(GB_StoryProgress, STORY_CH4_FRYING_PAN_STOLEN) - EVT_WAIT(10) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, 40) + IfLt(LVar2, 180) + BreakLoop + EndIf + EndIf + Wait(1) + EndLoop + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_MAC_Bridge_0016, 160, 40) + Call(SetCamProperties, CAM_DEFAULT, Float(3.0), -140, 20, -140, 400, 15, -6) + Call(SetNpcPos, NPC_ShyGuy, -200, 20, -260) + Call(SetNpcAnimation, NPC_ShyGuy, ANIM_ShyGuy_Red_Anim04) + Wait(10) + Exec(N(D_8024B5AC_82E86C)) + Thread + Call(EnableGroup, MODEL_cook_in, TRUE) + Call(PlaySoundAtCollider, COLLIDER_deilit1u, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 8) + Call(RotateModel, MODEL_c_door, LVar0, 0, -1, 0) + Wait(1) + EndLoop + Wait(5) + Loop(10) + Add(LVar0, -8) + Call(RotateModel, MODEL_c_door, LVar0, 0, -1, 0) + Wait(1) + EndLoop + Call(PlaySoundAtCollider, COLLIDER_deilit1u, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Call(EnableGroup, MODEL_cook_in, FALSE) + EndThread + Wait(5) + Call(PlaySoundAtNpc, NPC_ShyGuy, SOUND_SHY_GUY_RUN_AWAY, SOUND_SPACE_DEFAULT) + ExecGetTID(N(D_8024B6A0_82E960), LVarA) + Call(SetNpcSpeed, NPC_ShyGuy, 8) + Call(NpcMoveTo, NPC_ShyGuy, -140, -240, 0) + Call(NpcMoveTo, NPC_ShyGuy, -140, -140, 0) + Call(NpcJump0, NPC_ShyGuy, -140, 0, -100, 0) + Call(NpcMoveTo, NPC_ShyGuy, -190, -20, 0) + Call(NpcMoveTo, NPC_ShyGuy, -350, -20, 0) + KillThread(LVarA) + Call(SetNpcPos, NPC_ShyGuy, NPC_DISPOSE_LOCATION) + Set(GB_StoryProgress, STORY_CH4_FRYING_PAN_STOLEN) + Wait(10) + Call(ResetCam, CAM_DEFAULT, Float(3.0)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_ShyGuy) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH4_FRYING_PAN_STOLEN) - EVT_EXEC(N(D_8024B6E8_82E9A8)) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH4_FRYING_PAN_STOLEN) + Exec(N(D_8024B6E8_82E9A8)) + EndIf + Return + End }; diff --git a/src/world/area_mac/mac_02/npc/tayce_t.inc.c b/src/world/area_mac/mac_02/npc/tayce_t.inc.c index 2a585c51107..1e6af058903 100644 --- a/src/world/area_mac/mac_02/npc/tayce_t.inc.c +++ b/src/world/area_mac/mac_02/npc/tayce_t.inc.c @@ -172,24 +172,24 @@ API_CALLABLE(N(TayceT_MakeItemList)) { } EvtScript N(EVS_Scene_TayceTCooking) = { - EVT_CALL(SetNpcFlagBits, NPC_TayceT, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_TayceT, ANIM_TayceT_Walk) - EVT_CALL(NpcMoveTo, NPC_TayceT, -186, -381, 20 * DT) - EVT_CALL(NpcMoveTo, NPC_TayceT, -220, -425, 30 * DT) - EVT_CALL(SetNpcAnimation, NPC_TayceT, ANIM_TayceT_Cooking) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Cooking, ANIM_TayceT_Cooking, 5, MSG_MAC_Bridge_000E) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_TayceT, ANIM_TayceT_TurnBack) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcYaw, NPC_TayceT, 90) - EVT_CALL(SetNpcAnimation, NPC_TayceT, ANIM_TayceT_Walk) - EVT_CALL(NpcMoveTo, NPC_TayceT, -186, -381, 20 * DT) - EVT_CALL(NpcMoveTo, NPC_TayceT, -236, -318, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_TayceT, ANIM_TayceT_Idle) - EVT_CALL(SetNpcFlagBits, NPC_TayceT, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_TayceT, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_TayceT, ANIM_TayceT_Walk) + Call(NpcMoveTo, NPC_TayceT, -186, -381, 20 * DT) + Call(NpcMoveTo, NPC_TayceT, -220, -425, 30 * DT) + Call(SetNpcAnimation, NPC_TayceT, ANIM_TayceT_Cooking) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Cooking, ANIM_TayceT_Cooking, 5, MSG_MAC_Bridge_000E) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_TayceT, ANIM_TayceT_TurnBack) + Wait(30 * DT) + Call(SetNpcYaw, NPC_TayceT, 90) + Call(SetNpcAnimation, NPC_TayceT, ANIM_TayceT_Walk) + Call(NpcMoveTo, NPC_TayceT, -186, -381, 20 * DT) + Call(NpcMoveTo, NPC_TayceT, -236, -318, 20 * DT) + Call(SetNpcAnimation, NPC_TayceT, ANIM_TayceT_Idle) + Call(SetNpcFlagBits, NPC_TayceT, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Return + End }; s32 N(ItemList_FryingPan)[] = { @@ -198,41 +198,41 @@ s32 N(ItemList_FryingPan)[] = { }; EvtScript N(EVS_TayceT_FryingPanAndCake) = { - EVT_IF_EQ(GF_MAC02_TayceT_HoldingCake, TRUE) - EVT_CALL(N(CheckItemsHasRoom), LVar0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_001A) + IfEq(GF_MAC02_TayceT_HoldingCake, TRUE) + Call(N(CheckItemsHasRoom), LVar0) + IfNe(LVar0, 0) + Call(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_001A) EVT_GIVE_CONSUMABLE_REWARD_ALT(ITEM_CAKE) - EVT_CALL(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_001B) - EVT_SET(GB_StoryProgress, STORY_CH4_GOT_TAYCE_TS_CAKE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_001C) - EVT_SET(GF_MAC02_TayceT_HoldingCake, TRUE) - EVT_END_IF - EVT_RETURN - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_IdleSad, 0, MSG_MAC_Bridge_0017) + Call(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_001B) + Set(GB_StoryProgress, STORY_CH4_GOT_TAYCE_TS_CAKE) + Else + Call(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_001C) + Set(GF_MAC02_TayceT_HoldingCake, TRUE) + EndIf + Return + EndIf + Call(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_IdleSad, 0, MSG_MAC_Bridge_0017) EVT_CHOOSE_KEY_ITEM_FROM(N(ItemList_FryingPan)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CASE_EQ(-1) - EVT_CALL(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_IdleSad, 0, MSG_MAC_Bridge_0018) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_TalkHappy, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0019) - EVT_EXEC_WAIT(N(EVS_Scene_TayceTCooking)) - EVT_CALL(N(CheckItemsHasRoom), LVar0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_001A) + Switch(LVar0) + CaseEq(0) + CaseEq(-1) + Call(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_IdleSad, 0, MSG_MAC_Bridge_0018) + CaseDefault + Call(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_TalkHappy, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0019) + ExecWait(N(EVS_Scene_TayceTCooking)) + Call(N(CheckItemsHasRoom), LVar0) + IfNe(LVar0, 0) + Call(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_001A) EVT_GIVE_CONSUMABLE_REWARD_ALT(ITEM_CAKE) - EVT_CALL(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_001B) - EVT_SET(GB_StoryProgress, STORY_CH4_GOT_TAYCE_TS_CAKE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_001C) - EVT_SET(GF_MAC02_TayceT_HoldingCake, TRUE) - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_001B) + Set(GB_StoryProgress, STORY_CH4_GOT_TAYCE_TS_CAKE) + Else + Call(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_001C) + Set(GF_MAC02_TayceT_HoldingCake, TRUE) + EndIf + EndSwitch + Return + End }; s32 N(ItemList_Cookbook)[] = { @@ -241,25 +241,25 @@ s32 N(ItemList_Cookbook)[] = { }; EvtScript N(EVS_TayceT_RequestCookbook) = { - EVT_IF_EQ(AF_MAC_01, FALSE) - EVT_CALL(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_001D) - EVT_SET(AF_MAC_01, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_001E) - EVT_SET(AF_MAC_01, FALSE) - EVT_END_IF - EVT_SET(LVar0, EVT_PTR(N(ItemList_Cookbook))) - EVT_SET(LVar1, 0) - EVT_EXEC_WAIT(N(EVS_ChooseKeyItem)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(-1) - EVT_CALL(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_001F) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0020) - EVT_SET(GF_MAC02_TayceT_HasCookbook, TRUE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + IfEq(AF_MAC_01, FALSE) + Call(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_001D) + Set(AF_MAC_01, TRUE) + Else + Call(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_001E) + Set(AF_MAC_01, FALSE) + EndIf + Set(LVar0, Ref(N(ItemList_Cookbook))) + Set(LVar1, 0) + ExecWait(N(EVS_ChooseKeyItem)) + Switch(LVar0) + CaseEq(-1) + Call(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_001F) + CaseDefault + Call(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0020) + Set(GF_MAC02_TayceT_HasCookbook, TRUE) + EndSwitch + Return + End }; EvtScript N(EVS_TayceT_Cook) = { @@ -270,194 +270,194 @@ EvtScript N(EVS_TayceT_Cook) = { #define LABEL_DONE 9 // greeting and opening choice - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_EQ(GF_MAC02_Met_TayceT, FALSE) - EVT_SET(GF_MAC02_Met_TayceT, TRUE) - EVT_SET(AF_MAC_01, TRUE) - EVT_CALL(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0000) - EVT_ELSE - EVT_IF_EQ(AF_MAC_01, FALSE) - EVT_CALL(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0001) - EVT_SET(AF_MAC_01, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0002) - EVT_END_IF - EVT_END_IF - EVT_CALL(N(GetItemCount), LVar0) - EVT_IF_LE(LVar0, 0) - EVT_CALL(ContinueSpeech, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0003) - EVT_GOTO(LABEL_DONE) - EVT_END_IF - EVT_CALL(ShowChoice, MSG_Choice_0010) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(ContinueSpeech, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0004) - EVT_GOTO(LABEL_DONE) - EVT_END_IF - EVT_CALL(ContinueSpeech, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0005) + Call(DisablePlayerInput, TRUE) + IfEq(GF_MAC02_Met_TayceT, FALSE) + Set(GF_MAC02_Met_TayceT, TRUE) + Set(AF_MAC_01, TRUE) + Call(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0000) + Else + IfEq(AF_MAC_01, FALSE) + Call(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0001) + Set(AF_MAC_01, TRUE) + Else + Call(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0002) + EndIf + EndIf + Call(N(GetItemCount), LVar0) + IfLe(LVar0, 0) + Call(ContinueSpeech, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0003) + Goto(LABEL_DONE) + EndIf + Call(ShowChoice, MSG_Choice_0010) + IfEq(LVar0, 1) + Call(ContinueSpeech, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0004) + Goto(LABEL_DONE) + EndIf + Call(ContinueSpeech, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0005) // choose the first ingredient - EVT_LABEL(LABEL_CHOOSE_FIRST) - EVT_SET(LVar3, 0) - EVT_CALL(N(TayceT_MakeItemList)) + Label(LABEL_CHOOSE_FIRST) + Set(LVar3, 0) + Call(N(TayceT_MakeItemList)) EVT_CHOOSE_CONSUMABLE_FROM(N(TayceT_ItemChoiceList), 0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CASE_EQ(-1) - EVT_CALL(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0006) - EVT_CALL(ShowChoice, MSG_Choice_0009) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ContinueSpeech, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0004) - EVT_GOTO(LABEL_DONE) - EVT_END_IF - EVT_CALL(CloseMessage) - EVT_SET(LVar3, 1) - EVT_CASE_DEFAULT - EVT_SET(LVar8, LVar0) - EVT_CALL(AddItem, LVar0, LVar1) - EVT_END_SWITCH - EVT_IF_EQ(LVar3, 1) - EVT_GOTO(LABEL_CHOOSE_FIRST) - EVT_END_IF - EVT_IF_EQ(GF_MAC02_TayceT_HasCookbook, FALSE) - EVT_GOTO(LABEL_CONFIRM_ONE) - EVT_END_IF - EVT_CALL(N(GetItemCount), LVar0) - EVT_IF_LT(LVar0, 2) - EVT_GOTO(LABEL_CONFIRM_ONE) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0007) - EVT_CALL(ShowChoice, MSG_Choice_0010) - EVT_CALL(CloseMessage) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(LABEL_CONFIRM_ONE) - EVT_END_IF + Switch(LVar0) + CaseEq(0) + CaseEq(-1) + Call(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0006) + Call(ShowChoice, MSG_Choice_0009) + IfEq(LVar0, 0) + Call(ContinueSpeech, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0004) + Goto(LABEL_DONE) + EndIf + Call(CloseMessage) + Set(LVar3, 1) + CaseDefault + Set(LVar8, LVar0) + Call(AddItem, LVar0, LVar1) + EndSwitch + IfEq(LVar3, 1) + Goto(LABEL_CHOOSE_FIRST) + EndIf + IfEq(GF_MAC02_TayceT_HasCookbook, FALSE) + Goto(LABEL_CONFIRM_ONE) + EndIf + Call(N(GetItemCount), LVar0) + IfLt(LVar0, 2) + Goto(LABEL_CONFIRM_ONE) + EndIf + Call(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0007) + Call(ShowChoice, MSG_Choice_0010) + Call(CloseMessage) + IfEq(LVar0, 1) + Goto(LABEL_CONFIRM_ONE) + EndIf // choose the second ingredient - EVT_LABEL(LABEL_CHOOSE_SECOND) - EVT_CALL(RemoveItem, LVar8, LVar0) - EVT_SET(LVar3, 0) - EVT_CALL(N(TayceT_MakeItemList)) + Label(LABEL_CHOOSE_SECOND) + Call(RemoveItem, LVar8, LVar0) + Set(LVar3, 0) + Call(N(TayceT_MakeItemList)) EVT_CHOOSE_CONSUMABLE_FROM(N(TayceT_ItemChoiceList), 0) - EVT_CALL(AddItem, LVar8, LVar1) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CASE_EQ(-1) - EVT_CALL(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0008) - EVT_CALL(ShowChoice, MSG_Choice_0008) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(CloseMessage) - EVT_GOTO(LABEL_CONFIRM_ONE) - EVT_END_IF - EVT_IF_EQ(LVar0, 2) - EVT_CALL(ContinueSpeech, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0004) - EVT_GOTO(LABEL_DONE) - EVT_END_IF - EVT_CALL(CloseMessage) - EVT_SET(LVar3, 1) - EVT_CASE_DEFAULT - EVT_SET(LVar9, LVar0) - EVT_CALL(AddItem, LVar0, LVar1) - EVT_IF_EQ(LVar8, LVar9) - EVT_CALL(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0009) - EVT_SET(LVar3, 1) - EVT_END_IF - EVT_END_SWITCH - EVT_IF_EQ(LVar3, 1) - EVT_GOTO(LABEL_CHOOSE_SECOND) - EVT_END_IF + Call(AddItem, LVar8, LVar1) + Switch(LVar0) + CaseEq(0) + CaseEq(-1) + Call(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0008) + Call(ShowChoice, MSG_Choice_0008) + IfEq(LVar0, 0) + Call(CloseMessage) + Goto(LABEL_CONFIRM_ONE) + EndIf + IfEq(LVar0, 2) + Call(ContinueSpeech, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0004) + Goto(LABEL_DONE) + EndIf + Call(CloseMessage) + Set(LVar3, 1) + CaseDefault + Set(LVar9, LVar0) + Call(AddItem, LVar0, LVar1) + IfEq(LVar8, LVar9) + Call(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0009) + Set(LVar3, 1) + EndIf + EndSwitch + IfEq(LVar3, 1) + Goto(LABEL_CHOOSE_SECOND) + EndIf // confirm cooking with two ingredients // no label here, but this position would be LABEL_CONFIRM_TWO - EVT_SET(LVar0, LVar8) - EVT_CALL(N(GetItemName), LVar0) - EVT_CALL(SetMessageText, LVar0, 0) - EVT_SET(LVar1, LVar9) - EVT_CALL(N(GetItemName), LVar1) - EVT_CALL(SetMessageText, LVar1, 1) - EVT_CALL(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_000B) - EVT_CALL(ShowChoice, MSG_Choice_0010) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(ContinueSpeech, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_000C) - EVT_GOTO(LABEL_DONE) - EVT_END_IF - EVT_CALL(N(GetCookResultForDoubleRecipe), LVar6, LVar7, LVar8, LVar9) - EVT_CALL(RemoveItem, LVar8, LVar0) - EVT_CALL(RemoveItem, LVar9, LVar0) - EVT_GOTO(LABEL_COOK) + Set(LVar0, LVar8) + Call(N(GetItemName), LVar0) + Call(SetMessageText, LVar0, 0) + Set(LVar1, LVar9) + Call(N(GetItemName), LVar1) + Call(SetMessageText, LVar1, 1) + Call(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_000B) + Call(ShowChoice, MSG_Choice_0010) + IfEq(LVar0, 1) + Call(ContinueSpeech, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_000C) + Goto(LABEL_DONE) + EndIf + Call(N(GetCookResultForDoubleRecipe), LVar6, LVar7, LVar8, LVar9) + Call(RemoveItem, LVar8, LVar0) + Call(RemoveItem, LVar9, LVar0) + Goto(LABEL_COOK) // confirm cooking with one ingredient - EVT_LABEL(LABEL_CONFIRM_ONE) - EVT_SET(LVar0, LVar8) - EVT_CALL(N(GetItemName), LVar0) - EVT_CALL(SetMessageText, LVar0, 0) - EVT_CALL(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_000A) - EVT_CALL(ShowChoice, MSG_Choice_0010) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(ContinueSpeech, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_000C) - EVT_GOTO(LABEL_DONE) - EVT_END_IF - EVT_CALL(N(GetCookResultForSingleRecipe), LVar6, LVar7, LVar8, GF_MAC02_TayceT_HasCookbook) - EVT_CALL(RemoveItem, LVar8, LVar0) + Label(LABEL_CONFIRM_ONE) + Set(LVar0, LVar8) + Call(N(GetItemName), LVar0) + Call(SetMessageText, LVar0, 0) + Call(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_000A) + Call(ShowChoice, MSG_Choice_0010) + IfEq(LVar0, 1) + Call(ContinueSpeech, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_000C) + Goto(LABEL_DONE) + EndIf + Call(N(GetCookResultForSingleRecipe), LVar6, LVar7, LVar8, GF_MAC02_TayceT_HasCookbook) + Call(RemoveItem, LVar8, LVar0) // the actual cooking animation and reaction message - EVT_LABEL(LABEL_COOK) - EVT_CALL(ContinueSpeech, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_000D) - EVT_EXEC_WAIT(N(EVS_Scene_TayceTCooking)) - EVT_SWITCH(LVar7) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0012) - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_000F) - EVT_CASE_EQ(3) - EVT_CALL(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0010) - EVT_CASE_EQ(4) - EVT_CALL(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0013) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0011) - EVT_END_SWITCH - EVT_CALL(ContinueSpeech, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0014) - EVT_CALL(N(SetRecipeDiscovered), LVar6) + Label(LABEL_COOK) + Call(ContinueSpeech, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_000D) + ExecWait(N(EVS_Scene_TayceTCooking)) + Switch(LVar7) + CaseEq(0) + Call(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0012) + CaseEq(2) + Call(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_000F) + CaseEq(3) + Call(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0010) + CaseEq(4) + Call(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0013) + CaseDefault + Call(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0011) + EndSwitch + Call(ContinueSpeech, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0014) + Call(N(SetRecipeDiscovered), LVar6) EVT_GIVE_CONSUMABLE_REWARD_ALT(LVar6) - EVT_CALL(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0015) + Call(SpeakToPlayer, NPC_TayceT, ANIM_TayceT_Talk, ANIM_TayceT_Idle, 0, MSG_MAC_Bridge_0015) // end the script - EVT_LABEL(LABEL_DONE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Label(LABEL_DONE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_TayceT) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) - EVT_IF_LT(GB_StoryProgress, STORY_CH4_GOT_TAYCE_TS_CAKE) - EVT_EXEC_WAIT(N(EVS_TayceT_FryingPanAndCake)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(FindKeyItem, ITEM_COOKBOOK, LVar0) - EVT_IF_EQ(LVar0, -1) - EVT_EXEC_WAIT(N(EVS_TayceT_Cook)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_TayceT_RequestCookbook)) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) + IfLt(GB_StoryProgress, STORY_CH4_GOT_TAYCE_TS_CAKE) + ExecWait(N(EVS_TayceT_FryingPanAndCake)) + Return + EndIf + EndIf + Call(FindKeyItem, ITEM_COOKBOOK, LVar0) + IfEq(LVar0, -1) + ExecWait(N(EVS_TayceT_Cook)) + Else + ExecWait(N(EVS_TayceT_RequestCookbook)) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_TayceT) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_TayceT))) - EVT_CALL(InterpNpcYaw, NPC_SELF, 45, 0) - EVT_CALL(SetNpcPos, NPC_SELF, -236, 20, -318) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TayceT_Idle) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) - EVT_IF_LT(GB_StoryProgress, STORY_CH4_GOT_TAYCE_TS_CAKE) - EVT_IF_NE(GF_MAC02_TayceT_HoldingCake, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TayceT_IdleSad) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_SET(AF_MAC_01, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_TayceT))) + Call(InterpNpcYaw, NPC_SELF, 45, 0) + Call(SetNpcPos, NPC_SELF, -236, 20, -318) + Call(SetNpcAnimation, NPC_SELF, ANIM_TayceT_Idle) + IfGe(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) + IfLt(GB_StoryProgress, STORY_CH4_GOT_TAYCE_TS_CAKE) + IfNe(GF_MAC02_TayceT_HoldingCake, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_TayceT_IdleSad) + Return + EndIf + EndIf + EndIf + Set(AF_MAC_01, FALSE) + Return + End }; diff --git a/src/world/area_mac/mac_02/npc/toad_1.inc.c b/src/world/area_mac/mac_02/npc/toad_1.inc.c index ba8d5070169..60106725607 100644 --- a/src/world/area_mac/mac_02/npc/toad_1.inc.c +++ b/src/world/area_mac/mac_02/npc/toad_1.inc.c @@ -1,77 +1,77 @@ EvtScript N(EVS_NpcInteract_Toad_01) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS) - EVT_SET(LVar0, MSG_MAC_Bridge_003A) - EVT_CASE_LT(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) - EVT_SET(LVar0, MSG_MAC_Bridge_003B) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Bridge_003C) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Bridge_003D) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Bridge_003E) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Bridge_003F) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC01_MailbagStolen, FALSE) - EVT_SET(LVar0, MSG_MAC_Bridge_0040) - EVT_ELSE - EVT_IF_EQ(GF_MAC01_MailbagReturned, FALSE) - EVT_SET(LVar0, MSG_MAC_Bridge_0041) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Bridge_0042) - EVT_END_IF - EVT_END_IF - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Bridge_0043) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Bridge_0044) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Bridge_0045) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Bridge_0046) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Bridge_0047) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Bridge_0048) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Bridge_0049) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_Toad_01, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_MET_STAR_SPIRITS) + Set(LVar0, MSG_MAC_Bridge_003A) + CaseLt(STORY_CH1_MERLIN_REVEALED_KOOPA_BROS) + Set(LVar0, MSG_MAC_Bridge_003B) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Bridge_003C) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Bridge_003D) + Else + Set(LVar0, MSG_MAC_Bridge_003E) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Bridge_003F) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC01_MailbagStolen, FALSE) + Set(LVar0, MSG_MAC_Bridge_0040) + Else + IfEq(GF_MAC01_MailbagReturned, FALSE) + Set(LVar0, MSG_MAC_Bridge_0041) + Else + Set(LVar0, MSG_MAC_Bridge_0042) + EndIf + EndIf + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Bridge_0043) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Bridge_0044) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Bridge_0045) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Bridge_0046) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Bridge_0047) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Bridge_0048) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Bridge_0049) + EndSwitch + Call(SpeakToPlayer, NPC_Toad_01, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcIdle_Toad_01) = { - EVT_CALL(SetNpcPos, NPC_SELF, 20, 0, -550) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(2.0)) - EVT_LOOP(0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Toad_Blue_Walk) - EVT_CALL(NpcMoveTo, NPC_SELF, -20, -550, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Toad_Blue_Idle) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 7) - EVT_WAIT(10) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 7) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Toad_Blue_Walk) - EVT_CALL(NpcMoveTo, NPC_SELF, 20, -550, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Toad_Blue_Idle) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 7) - EVT_WAIT(10) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 7) - EVT_WAIT(30) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, 20, 0, -550) + Call(SetNpcSpeed, NPC_SELF, Float(2.0)) + Loop(0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Toad_Blue_Walk) + Call(NpcMoveTo, NPC_SELF, -20, -550, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Toad_Blue_Idle) + Call(InterpNpcYaw, NPC_SELF, 90, 7) + Wait(10) + Call(InterpNpcYaw, NPC_SELF, 270, 7) + Wait(30) + Call(SetNpcAnimation, NPC_SELF, ANIM_Toad_Blue_Walk) + Call(NpcMoveTo, NPC_SELF, 20, -550, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Toad_Blue_Idle) + Call(InterpNpcYaw, NPC_SELF, 270, 7) + Wait(10) + Call(InterpNpcYaw, NPC_SELF, 90, 7) + Wait(30) + EndLoop + Return + End }; EvtScript N(EVS_NpcInit_Toad_01) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH1_BEGAN_PEACH_MISSION) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Toad_01))) - EVT_END_IF - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_01))) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH1_BEGAN_PEACH_MISSION) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Toad_01))) + EndIf + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_01))) + Return + End }; diff --git a/src/world/area_mac/mac_02/npc/toad_2.inc.c b/src/world/area_mac/mac_02/npc/toad_2.inc.c index 6c02261dcc1..e7e523376e3 100644 --- a/src/world/area_mac/mac_02/npc/toad_2.inc.c +++ b/src/world/area_mac/mac_02/npc/toad_2.inc.c @@ -1,41 +1,41 @@ EvtScript N(EVS_NpcInteract_Toad_02) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Bridge_0057) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Bridge_0058) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Bridge_0059) - EVT_CASE_LT(STORY_CH3_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Bridge_005A) - EVT_CASE_LT(STORY_CH4_GOT_TAYCE_TS_CAKE) - EVT_SET(LVar0, MSG_MAC_Bridge_005B) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Bridge_005C) - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Bridge_005D) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Bridge_005E) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Bridge_005F) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Bridge_0060) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Bridge_0061) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Bridge_0062) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Bridge_0063) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_Toad_02, ANIM_Toad_Green_Talk, ANIM_Toad_Green_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Bridge_0057) + Else + Set(LVar0, MSG_MAC_Bridge_0058) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Bridge_0059) + CaseLt(STORY_CH3_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Bridge_005A) + CaseLt(STORY_CH4_GOT_TAYCE_TS_CAKE) + Set(LVar0, MSG_MAC_Bridge_005B) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Bridge_005C) + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Bridge_005D) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Bridge_005E) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Bridge_005F) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Bridge_0060) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Bridge_0061) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Bridge_0062) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Bridge_0063) + EndSwitch + Call(SpeakToPlayer, NPC_Toad_02, ANIM_Toad_Green_Talk, ANIM_Toad_Green_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_Toad_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_02))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_02))) + Return + End }; diff --git a/src/world/area_mac/mac_02/npc/toad_3.inc.c b/src/world/area_mac/mac_02/npc/toad_3.inc.c index 339065799d5..acf98498521 100644 --- a/src/world/area_mac/mac_02/npc/toad_3.inc.c +++ b/src/world/area_mac/mac_02/npc/toad_3.inc.c @@ -1,46 +1,46 @@ EvtScript N(EVS_NpcInteract_Toad_03) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Bridge_006B) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Bridge_006C) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Bridge_006D) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_ShyGuyBlockingTracks, FALSE) - EVT_SET(LVar0, MSG_MAC_Bridge_006E) - EVT_ELSE - EVT_IF_EQ(GF_MAC03_ShyGuyChasedOff, FALSE) - EVT_SET(LVar0, MSG_MAC_Bridge_006F) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Bridge_0070) - EVT_END_IF - EVT_END_IF - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Bridge_0071) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Bridge_0072) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Bridge_0073) - EVT_SET(GF_MAC02_HeardAboutMinhT, TRUE) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Bridge_0074) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Bridge_0075) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Bridge_0076) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Bridge_0077) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_Toad_03, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Bridge_006B) + Else + Set(LVar0, MSG_MAC_Bridge_006C) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Bridge_006D) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_ShyGuyBlockingTracks, FALSE) + Set(LVar0, MSG_MAC_Bridge_006E) + Else + IfEq(GF_MAC03_ShyGuyChasedOff, FALSE) + Set(LVar0, MSG_MAC_Bridge_006F) + Else + Set(LVar0, MSG_MAC_Bridge_0070) + EndIf + EndIf + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Bridge_0071) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Bridge_0072) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Bridge_0073) + Set(GF_MAC02_HeardAboutMinhT, TRUE) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Bridge_0074) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Bridge_0075) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Bridge_0076) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Bridge_0077) + EndSwitch + Call(SpeakToPlayer, NPC_Toad_03, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_Toad_03) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_03))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_03))) + Return + End }; diff --git a/src/world/area_mac/mac_02/npc/toad_4.inc.c b/src/world/area_mac/mac_02/npc/toad_4.inc.c index 35267bc2a6f..104fd74752a 100644 --- a/src/world/area_mac/mac_02/npc/toad_4.inc.c +++ b/src/world/area_mac/mac_02/npc/toad_4.inc.c @@ -1,41 +1,41 @@ EvtScript N(EVS_NpcInteract_Toad_04) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Bridge_0078) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Bridge_0079) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Bridge_007A) - EVT_CASE_LT(STORY_CH3_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Bridge_007B) - EVT_CASE_LT(STORY_CH4_GOT_TAYCE_TS_CAKE) - EVT_SET(LVar0, MSG_MAC_Bridge_007C) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Bridge_007D) - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Bridge_007E) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Bridge_007F) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Bridge_0080) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Bridge_0081) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Bridge_0082) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Bridge_0083) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Bridge_0084) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_Toad_04, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Bridge_0078) + Else + Set(LVar0, MSG_MAC_Bridge_0079) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Bridge_007A) + CaseLt(STORY_CH3_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Bridge_007B) + CaseLt(STORY_CH4_GOT_TAYCE_TS_CAKE) + Set(LVar0, MSG_MAC_Bridge_007C) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Bridge_007D) + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Bridge_007E) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Bridge_007F) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Bridge_0080) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Bridge_0081) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Bridge_0082) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Bridge_0083) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Bridge_0084) + EndSwitch + Call(SpeakToPlayer, NPC_Toad_04, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_Toad_04) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_04))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_04))) + Return + End }; diff --git a/src/world/area_mac/mac_02/npc/toad_kid.inc.c b/src/world/area_mac/mac_02/npc/toad_kid.inc.c index 7966066adef..d126f292335 100644 --- a/src/world/area_mac/mac_02/npc/toad_kid.inc.c +++ b/src/world/area_mac/mac_02/npc/toad_kid.inc.c @@ -1,31 +1,31 @@ EvtScript N(EVS_NpcInteract_ToadKid) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Bridge_0064) - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Bridge_0065) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Bridge_0066) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Bridge_0067) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Bridge_0068) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Bridge_0069) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Bridge_006A) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_ToadKid, ANIM_ToadKid_Yellow_Talk, ANIM_ToadKid_Yellow_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Bridge_0064) + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Bridge_0065) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Bridge_0066) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Bridge_0067) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Bridge_0068) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Bridge_0069) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Bridge_006A) + EndSwitch + Call(SpeakToPlayer, NPC_ToadKid, ANIM_ToadKid_Yellow_Talk, ANIM_ToadKid_Yellow_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_ToadKid) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_ELSE - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ToadKid))) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH1_STAR_SPRIT_DEPARTED) + Call(RemoveNpc, NPC_SELF) + Else + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ToadKid))) + EndIf + Return + End }; diff --git a/src/world/area_mac/mac_03/mac_03_1_music.c b/src/world/area_mac/mac_03/mac_03_1_music.c index 6eace7ca38a..8aa42e76549 100644 --- a/src/world/area_mac/mac_03/mac_03_1_music.c +++ b/src/world/area_mac/mac_03/mac_03_1_music.c @@ -1,12 +1,12 @@ #include "mac_03.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_INVASION, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseRange(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) + Call(SetMusicTrack, 0, SONG_SHY_GUY_INVASION, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_TOAD_TOWN, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_mac/mac_03/mac_03_2_main.c b/src/world/area_mac/mac_03/mac_03_2_main.c index 4f19fc56232..9ef884d8508 100644 --- a/src/world/area_mac/mac_03/mac_03_2_main.c +++ b/src/world/area_mac/mac_03/mac_03_2_main.c @@ -5,46 +5,46 @@ EvtScript N(EVS_ExitWalk_mac_02_3) = EVT_EXIT_WALK(60, mac_03_ENTRY_0, "mac_02", mac_02_ENTRY_3); EvtScript N(EVS_GotoMap_mgm_00_0) = { - EVT_CALL(GotoMap, EVT_PTR("mgm_00"), mgm_00_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("mgm_00"), mgm_00_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitPipe_mgm_00_0) = EVT_EXIT_PIPE_VERTICAL(mac_02_ENTRY_2, COLLIDER_deilim, N(EVS_GotoMap_mgm_00_0)); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_mac_02_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitPipe_mgm_00_0)), TRIGGER_FLOOR_TOUCH, COLLIDER_deilim, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_mac_02_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitPipe_mgm_00_0)), TRIGGER_FLOOR_TOUCH, COLLIDER_deilim, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(mac_03_ENTRY_0) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(mac_03_ENTRY_1) - EVT_EXEC(N(EVS_ArriveFromMtRugged)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(mac_03_ENTRY_2) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(mac_03_ENTRY_0) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseEq(mac_03_ENTRY_1) + Exec(N(EVS_ArriveFromMtRugged)) + Exec(N(EVS_BindExitTriggers)) + CaseEq(mac_03_ENTRY_2) EVT_ENTER_PIPE_VERTICAL(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(mac_03_ENTRY_3) - EVT_END_SWITCH - EVT_RETURN - EVT_END + CaseEq(mac_03_ENTRY_3) + EndSwitch + Return + End }; EvtScript N(EVS_HidePlayroomPipe) = { - EVT_IF_EQ(GF_MAC03_UnlockedPlayroom, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_dokan, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilim, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_o241, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_MAC03_UnlockedPlayroom, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_dokan, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilim, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_o241, FALSE) + EndIf + Return + End }; API_CALLABLE(N(GetClockHandAngles)) { @@ -57,47 +57,47 @@ API_CALLABLE(N(GetClockHandAngles)) { } EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() + Set(GB_WorldLocation, LOCATION_TOAD_TOWN) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() #if VERSION_PAL - EVT_CALL(GetLanguage, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_o110, LVar0) + Call(GetLanguage, LVar0) + Call(SetModelTexVariant, MODEL_o110, LVar0) #endif - EVT_SET(AF_MAC_20, FALSE) - EVT_SET(AF_MAC_21, FALSE) - EVT_SET(AF_MAC_22, FALSE) - EVT_SET(AF_MAC_23, FALSE) - EVT_SET(AF_MAC_24, FALSE) - EVT_SET(AF_MAC_25, FALSE) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_CALL(GetDemoState, LVar0) - EVT_IF_EQ(LVar0, DEMO_STATE_NONE) - EVT_EXEC(N(EVS_InitializeLilOinks)) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_InitializeTrainScene)) - EVT_THREAD - EVT_SET(LVarF, 0) - EVT_LABEL(10) - EVT_ADD(LVarF, 1) - EVT_CALL(N(GetClockHandAngles)) - EVT_CALL(RotateModel, MODEL_o148, LVar0, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o147, LVar1, 0, 0, -1) - EVT_WAIT(10) - EVT_GOTO(10) - EVT_END_THREAD - EVT_CALL(GetDemoState, LVar0) - EVT_IF_NE(LVar0, DEMO_STATE_NONE) - EVT_EXEC_WAIT(N(EVS_PlayDemoScene)) - EVT_RETURN - EVT_END_IF - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_HidePlayroomPipe)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_SET(GF_MAC01_RowfBadgesChosen, FALSE) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(AF_MAC_20, FALSE) + Set(AF_MAC_21, FALSE) + Set(AF_MAC_22, FALSE) + Set(AF_MAC_23, FALSE) + Set(AF_MAC_24, FALSE) + Set(AF_MAC_25, FALSE) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Exec(N(EVS_MakeEntities)) + Exec(N(EVS_SetupFoliage)) + Call(GetDemoState, LVar0) + IfEq(LVar0, DEMO_STATE_NONE) + Exec(N(EVS_InitializeLilOinks)) + EndIf + ExecWait(N(EVS_InitializeTrainScene)) + Thread + Set(LVarF, 0) + Label(10) + Add(LVarF, 1) + Call(N(GetClockHandAngles)) + Call(RotateModel, MODEL_o148, LVar0, 0, 0, -1) + Call(RotateModel, MODEL_o147, LVar1, 0, 0, -1) + Wait(10) + Goto(10) + EndThread + Call(GetDemoState, LVar0) + IfNe(LVar0, DEMO_STATE_NONE) + ExecWait(N(EVS_PlayDemoScene)) + Return + EndIf + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_HidePlayroomPipe)) + Exec(N(EVS_EnterMap)) + Set(GF_MAC01_RowfBadgesChosen, FALSE) + Wait(1) + Return + End }; diff --git a/src/world/area_mac/mac_03/mac_03_3_train.c b/src/world/area_mac/mac_03/mac_03_3_train.c index f8b6c28d9ec..17032169f31 100644 --- a/src/world/area_mac/mac_03/mac_03_3_train.c +++ b/src/world/area_mac/mac_03/mac_03_3_train.c @@ -3,581 +3,581 @@ #include "common/CosInterpMinMax.inc.c" EvtScript N(EVS_OpenCrossingGates) = { - EVT_SET(LVarF, 0) - EVT_LOOP(40) - EVT_ADD(LVarF, 1) - EVT_SET(LVar1, LVarF) - EVT_CALL(N(CosInterpMinMax), LVar1, LVar0, 0, 105, 40, 1, 0) - EVT_CALL(RotateModel, MODEL_o183, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o184, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o191, LVar0, 0, 1, 0) - EVT_SET(LVar1, LVarF) - EVT_CALL(N(CosInterpMinMax), LVar1, LVar0, 0, 75, 40, 1, 0) - EVT_CALL(RotateModel, MODEL_o187, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o188, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o192, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVarF, 0) + Loop(40) + Add(LVarF, 1) + Set(LVar1, LVarF) + Call(N(CosInterpMinMax), LVar1, LVar0, 0, 105, 40, 1, 0) + Call(RotateModel, MODEL_o183, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o184, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o191, LVar0, 0, 1, 0) + Set(LVar1, LVarF) + Call(N(CosInterpMinMax), LVar1, LVar0, 0, 75, 40, 1, 0) + Call(RotateModel, MODEL_o187, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o188, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o192, LVar0, 0, 1, 0) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_CloseCrossingGates) = { - EVT_SET(LVarF, 0) - EVT_LOOP(40) - EVT_ADD(LVarF, 1) - EVT_SET(LVar1, LVarF) - EVT_CALL(N(CosInterpMinMax), LVar1, LVar0, 105, 0, 40, 1, 0) - EVT_CALL(RotateModel, MODEL_o183, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o184, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o191, LVar0, 0, 1, 0) - EVT_SET(LVar1, LVarF) - EVT_CALL(N(CosInterpMinMax), LVar1, LVar0, 75, 0, 40, 1, 0) - EVT_CALL(RotateModel, MODEL_o187, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o188, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o192, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVarF, 0) + Loop(40) + Add(LVarF, 1) + Set(LVar1, LVarF) + Call(N(CosInterpMinMax), LVar1, LVar0, 105, 0, 40, 1, 0) + Call(RotateModel, MODEL_o183, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o184, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o191, LVar0, 0, 1, 0) + Set(LVar1, LVarF) + Call(N(CosInterpMinMax), LVar1, LVar0, 75, 0, 40, 1, 0) + Call(RotateModel, MODEL_o187, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o188, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o192, LVar0, 0, 1, 0) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_SpawnSmoke) = { - EVT_CALL(PlaySoundAtModel, MODEL_07, SOUND_SEQ_TRAIN_CHUG, SOUND_SPACE_DEFAULT) - EVT_SETF(LVar0, MV_TrainMoveDist) - EVT_IF_EQ(MF_TrainReverseDir, FALSE) - EVT_ADDF(LVar0, -310) - EVT_ELSE - EVT_ADDF(LVar0, -450) - EVT_END_IF - EVT_SETF(LVar1, 140) - EVT_SETF(LVar2, 0) - EVT_SETF(LVar3, EVT_FLOAT(1.0)) - EVT_SETF(LVar4, EVT_FLOAT(3.0)) - EVT_ADD(LVarB, CLONED_MODEL(0)) - EVT_CALL(EnableModel, LVarB, TRUE) - EVT_LOOP(20) - EVT_CALL(TranslateModel, LVarB, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, LVarB, LVar3, LVar3, 1) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar3, EVT_FLOAT(0.046)) - EVT_MULF(LVar4, EVT_FLOAT(0.906)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EnableModel, LVarB, FALSE) - EVT_RETURN - EVT_END + Call(PlaySoundAtModel, MODEL_07, SOUND_SEQ_TRAIN_CHUG, SOUND_SPACE_DEFAULT) + SetF(LVar0, MV_TrainMoveDist) + IfEq(MF_TrainReverseDir, FALSE) + AddF(LVar0, -310) + Else + AddF(LVar0, -450) + EndIf + SetF(LVar1, 140) + SetF(LVar2, 0) + SetF(LVar3, Float(1.0)) + SetF(LVar4, Float(3.0)) + Add(LVarB, CLONED_MODEL(0)) + Call(EnableModel, LVarB, TRUE) + Loop(20) + Call(TranslateModel, LVarB, LVar0, LVar1, LVar2) + Call(ScaleModel, LVarB, LVar3, LVar3, 1) + AddF(LVar1, LVar4) + AddF(LVar3, Float(0.046)) + MulF(LVar4, Float(0.906)) + Wait(1) + EndLoop + Call(EnableModel, LVarB, FALSE) + Return + End }; EvtScript N(EVS_AnimateTrain) = { - EVT_LABEL(0) - EVT_SET(LVar0, MV_TrainMoveDist) - EVT_CALL(TranslateModel, MODEL_08, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_07, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_10, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_11, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_12, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_13, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_09, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_01, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_02, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_03, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_04, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_05, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_06, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_ura, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_omote, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_ura2, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_omote2, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_14, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_15, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_16, LVar0, 0, 0) - EVT_IF_EQ(MF_TrainReverseDir, TRUE) - EVT_SET(LVar0, 180) - EVT_CALL(TranslateModel, MODEL_08, -69, -50, 0) - EVT_CALL(TranslateModel, MODEL_07, -69, -50, 0) - EVT_CALL(TranslateModel, MODEL_10, 75, 25, 2) - EVT_CALL(TranslateModel, MODEL_11, 30, 30, 2) - EVT_CALL(TranslateModel, MODEL_12, -10, 30, 2) - EVT_CALL(TranslateModel, MODEL_13, -50, 30, 2) - EVT_CALL(TranslateModel, MODEL_09, -1, -58, 0) - EVT_CALL(TranslateModel, MODEL_ura, 82, -19, -35) - EVT_CALL(TranslateModel, MODEL_omote, 82, -19, -35) - EVT_CALL(TranslateModel, MODEL_ura2, 82, -19, 35) - EVT_CALL(TranslateModel, MODEL_omote2, 82, -19, 35) - EVT_CALL(TranslateModel, MODEL_14, -21, 30, 0) - EVT_CALL(TranslateModel, MODEL_15, -25, 30, 0) - EVT_CALL(TranslateModel, MODEL_16, -63, 15, 0) - EVT_CALL(RotateModel, MODEL_08, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_07, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_10, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_11, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_12, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_13, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_09, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_01, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_02, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_03, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_04, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_05, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_06, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_ura, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_omote, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_ura2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_omote2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_14, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_15, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_16, LVar0, 0, 1, 0) - EVT_CALL(TranslateModel, MODEL_08, 69, 50, 0) - EVT_CALL(TranslateModel, MODEL_07, 69, 50, 0) - EVT_CALL(TranslateModel, MODEL_10, -75, -25, -2) - EVT_CALL(TranslateModel, MODEL_11, -30, -30, -2) - EVT_CALL(TranslateModel, MODEL_12, 10, -30, -2) - EVT_CALL(TranslateModel, MODEL_13, 50, -30, -2) - EVT_CALL(TranslateModel, MODEL_09, 1, 58, 0) - EVT_CALL(TranslateModel, MODEL_ura, -82, 19, 35) - EVT_CALL(TranslateModel, MODEL_omote, -82, 19, 35) - EVT_CALL(TranslateModel, MODEL_ura2, -82, 19, -35) - EVT_CALL(TranslateModel, MODEL_omote2, -82, 19, -35) - EVT_CALL(TranslateModel, MODEL_14, 21, -30, 0) - EVT_CALL(TranslateModel, MODEL_15, 25, -30, 0) - EVT_CALL(TranslateModel, MODEL_16, 63, -15, 0) - EVT_END_IF - EVT_IF_EQ(MF_TrainReverseDir, FALSE) - EVT_SET(LVar2, MV_TrainMoveDist) - EVT_ELSE - EVT_SET(LVar2, 1000) - EVT_SUB(LVar2, MV_TrainMoveDist) - EVT_END_IF - EVT_SETF(LVar0, LVar2) - EVT_MULF(LVar0, EVT_FLOAT(-2.40625)) - EVT_CALL(RotateModel, MODEL_11, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_12, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_13, LVar0, 0, 0, 1) - EVT_MULF(LVar0, EVT_FLOAT(0.6)) - EVT_CALL(RotateModel, MODEL_10, LVar0, 0, 0, 1) - EVT_CALL(N(CosInterpMinMax), LVar2, LVar0, 0, -20, 75, 0, 0) - EVT_CALL(N(CosInterpMinMax), LVar2, LVar1, -10, 10, 75, 0, -90) - EVT_CALL(TranslateModel, MODEL_14, LVar0, LVar1, 0) - EVT_CALL(N(CosInterpMinMax), LVar2, LVar0, 0, -20, 75, 0, 0) - EVT_ADD(LVar0, 5) - EVT_CALL(TranslateModel, MODEL_16, LVar0, -14, 0) - EVT_CALL(N(CosInterpMinMax), LVar2, LVar0, 0, -20, 75, 0, 0) - EVT_CALL(N(CosInterpMinMax), LVar2, LVar1, -10, 10, 75, 0, -90) - EVT_CALL(TranslateModel, MODEL_15, LVar0, LVar1, 0) - EVT_CALL(N(CosInterpMinMax), LVar2, LVar0, -40, 40, 75, 0, 90) - EVT_CALL(RotateModel, MODEL_15, LVar0, 0, 0, 1) - EVT_CALL(N(CosInterpMinMax), LVarC, LVar0, EVT_FLOAT(-3.0), EVT_FLOAT(3.0), 10, 0, 0) - EVT_MULF(LVar0, MV_TrainMoveSpeed) - EVT_CALL(RotateModel, MODEL_09, LVar0, 0, 0, 1) - EVT_IF_NE(MV_TrainMoveSpeed, 0) - EVT_IF_EQ(LVarD, 0) - EVT_THREAD - EVT_WAIT(18) - EVT_EXEC(N(EVS_SpawnSmoke)) - EVT_END_THREAD - EVT_END_IF - EVT_END_IF - EVT_IF_LE(LVarD, 20) - EVT_CALL(N(CosInterpMinMax), LVarD, LVar0, EVT_FLOAT(0.703), EVT_FLOAT(1.0), 10, 0, 180) - EVT_CALL(N(CosInterpMinMax), LVarD, LVar2, EVT_FLOAT(0.0), EVT_FLOAT(0.296), 10, 0, 180) - EVT_SETF(LVar1, EVT_FLOAT(0.296)) - EVT_SUBF(LVar1, LVar2) - EVT_ADDF(LVar1, EVT_FLOAT(1.0)) - EVT_CALL(ScaleModel, MODEL_07, LVar1, LVar0, LVar1) - EVT_CALL(ScaleModel, MODEL_08, LVar1, LVar0, LVar1) - EVT_ELSE - EVT_SETF(LVar0, EVT_FLOAT(1.0)) - EVT_SETF(LVar2, EVT_FLOAT(0.296)) - EVT_SETF(LVar1, EVT_FLOAT(0.296)) - EVT_SUBF(LVar1, LVar2) - EVT_ADDF(LVar1, EVT_FLOAT(1.0)) - EVT_CALL(ScaleModel, MODEL_07, LVar1, LVar0, LVar1) - EVT_CALL(ScaleModel, MODEL_08, LVar1, LVar0, LVar1) - EVT_END_IF - EVT_IF_EQ(MF_TrainDepartDoorOpen, TRUE) - EVT_CALL(PlaySoundAt, SOUND_TRAIN_DOOR_OPEN, SOUND_SPACE_DEFAULT, -435, 84, 37) - EVT_SET(LVar8, 10) - EVT_SET(LFlag1, TRUE) - EVT_SET(MF_TrainDepartDoorOpen, FALSE) - EVT_END_IF - EVT_IF_EQ(MF_TrainDepartPlayerBoard, TRUE) - EVT_SET(LVar8, -10) - EVT_SET(LFlag1, TRUE) - EVT_SET(MF_TrainDepartPlayerBoard, FALSE) - EVT_END_IF - EVT_IF_EQ(MF_TrainArriveDoorOpen, TRUE) - EVT_CALL(PlaySoundAt, SOUND_TRAIN_DOOR_OPEN, SOUND_SPACE_DEFAULT, -413, 84, 38) - EVT_SET(LVar8, 10) - EVT_SET(LFlag2, TRUE) - EVT_SET(MF_TrainArriveDoorOpen, FALSE) - EVT_END_IF - EVT_IF_EQ(MF_TrainArrivePlayerDisembark, TRUE) - EVT_SET(LVar8, -10) - EVT_SET(LFlag2, TRUE) - EVT_SET(MF_TrainArrivePlayerDisembark, FALSE) - EVT_END_IF - EVT_IF_EQ(LFlag1, TRUE) - EVT_ADD(LVar9, LVar8) - EVT_IF_GE(LVar9, 90) - EVT_SET(LVar9, 90) - EVT_SET(LFlag1, FALSE) - EVT_END_IF - EVT_IF_LE(LVar9, 0) - EVT_SET(LVar9, 0) - EVT_SET(LFlag1, FALSE) - EVT_CALL(PlaySoundAt, SOUND_TRAIN_DOOR_CLOSE, SOUND_SPACE_DEFAULT, -435, 84, 37) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LFlag2, TRUE) - EVT_ADD(LVarA, LVar8) - EVT_IF_GE(LVarA, 90) - EVT_SET(LVarA, 90) - EVT_SET(LFlag2, FALSE) - EVT_END_IF - EVT_IF_LE(LVarA, 0) - EVT_SET(LVarA, 0) - EVT_SET(LFlag2, FALSE) - EVT_CALL(PlaySoundAt, SOUND_TRAIN_DOOR_CLOSE, SOUND_SPACE_DEFAULT, -413, 84, 38) - EVT_END_IF - EVT_END_IF - EVT_CALL(RotateModel, MODEL_omote, LVar9, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_ura, LVar9, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_omote2, LVarA, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_ura2, LVarA, 0, 1, 0) - EVT_IF_GT(MV_TrainMoveDist, 100) - EVT_IF_LT(MV_TrainMoveDist, 600) - EVT_IF_EQ(LFlag0, FALSE) - EVT_SET(LFlag0, TRUE) - EVT_EXEC(N(EVS_OpenCrossingGates)) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_IF_LE(MV_TrainMoveDist, 100) - EVT_IF_EQ(LFlag0, TRUE) - EVT_SET(LFlag0, FALSE) - EVT_EXEC(N(EVS_CloseCrossingGates)) - EVT_END_IF - EVT_END_IF - EVT_IF_GE(MV_TrainMoveDist, 600) - EVT_IF_EQ(LFlag0, TRUE) - EVT_SET(LFlag0, FALSE) - EVT_EXEC(N(EVS_CloseCrossingGates)) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(MF_TrainMoving, TRUE) - EVT_IF_EQ(MF_TrainReverseDir, FALSE) - EVT_SET(LVar0, MV_TrainMoveDist) - EVT_ADD(LVar0, -425) - EVT_ADD(LVar1, 75) - EVT_ADD(LVar2, 20) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_ELSE - EVT_SET(LVar0, MV_TrainMoveDist) - EVT_ADD(LVar0, -335) - EVT_ADD(LVar1, 75) - EVT_ADD(LVar2, 20) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_END_IF - EVT_ADD(MV_TrainMoveDist, MV_TrainMoveSpeed) - EVT_SET(LVar0, MV_TrainMoveDist) - EVT_DIV(LVar0, 75) - EVT_IF_NE(LVar0, LVarE) - EVT_SET(LVarE, LVar0) - EVT_SET(LVarD, -1) - EVT_ADD(LVarB, 1) - EVT_IF_EQ(LVarB, 10) - EVT_SET(LVarB, 0) - EVT_END_IF - EVT_END_IF - EVT_ADDF(LVarD, 1) - EVT_IF_GT(LVarD, 1000) - EVT_SET(LVarD, 1000) - EVT_END_IF - EVT_ADDF(LVarC, 1) - EVT_IF_GT(LVarC, 1000) - EVT_SET(LVarC, 0) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Set(LVar0, MV_TrainMoveDist) + Call(TranslateModel, MODEL_08, LVar0, 0, 0) + Call(TranslateModel, MODEL_07, LVar0, 0, 0) + Call(TranslateModel, MODEL_10, LVar0, 0, 0) + Call(TranslateModel, MODEL_11, LVar0, 0, 0) + Call(TranslateModel, MODEL_12, LVar0, 0, 0) + Call(TranslateModel, MODEL_13, LVar0, 0, 0) + Call(TranslateModel, MODEL_09, LVar0, 0, 0) + Call(TranslateModel, MODEL_01, LVar0, 0, 0) + Call(TranslateModel, MODEL_02, LVar0, 0, 0) + Call(TranslateModel, MODEL_03, LVar0, 0, 0) + Call(TranslateModel, MODEL_04, LVar0, 0, 0) + Call(TranslateModel, MODEL_05, LVar0, 0, 0) + Call(TranslateModel, MODEL_06, LVar0, 0, 0) + Call(TranslateModel, MODEL_ura, LVar0, 0, 0) + Call(TranslateModel, MODEL_omote, LVar0, 0, 0) + Call(TranslateModel, MODEL_ura2, LVar0, 0, 0) + Call(TranslateModel, MODEL_omote2, LVar0, 0, 0) + Call(TranslateModel, MODEL_14, LVar0, 0, 0) + Call(TranslateModel, MODEL_15, LVar0, 0, 0) + Call(TranslateModel, MODEL_16, LVar0, 0, 0) + IfEq(MF_TrainReverseDir, TRUE) + Set(LVar0, 180) + Call(TranslateModel, MODEL_08, -69, -50, 0) + Call(TranslateModel, MODEL_07, -69, -50, 0) + Call(TranslateModel, MODEL_10, 75, 25, 2) + Call(TranslateModel, MODEL_11, 30, 30, 2) + Call(TranslateModel, MODEL_12, -10, 30, 2) + Call(TranslateModel, MODEL_13, -50, 30, 2) + Call(TranslateModel, MODEL_09, -1, -58, 0) + Call(TranslateModel, MODEL_ura, 82, -19, -35) + Call(TranslateModel, MODEL_omote, 82, -19, -35) + Call(TranslateModel, MODEL_ura2, 82, -19, 35) + Call(TranslateModel, MODEL_omote2, 82, -19, 35) + Call(TranslateModel, MODEL_14, -21, 30, 0) + Call(TranslateModel, MODEL_15, -25, 30, 0) + Call(TranslateModel, MODEL_16, -63, 15, 0) + Call(RotateModel, MODEL_08, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_07, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_10, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_11, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_12, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_13, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_09, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_01, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_02, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_03, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_04, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_05, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_06, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_ura, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_omote, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_ura2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_omote2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_14, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_15, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_16, LVar0, 0, 1, 0) + Call(TranslateModel, MODEL_08, 69, 50, 0) + Call(TranslateModel, MODEL_07, 69, 50, 0) + Call(TranslateModel, MODEL_10, -75, -25, -2) + Call(TranslateModel, MODEL_11, -30, -30, -2) + Call(TranslateModel, MODEL_12, 10, -30, -2) + Call(TranslateModel, MODEL_13, 50, -30, -2) + Call(TranslateModel, MODEL_09, 1, 58, 0) + Call(TranslateModel, MODEL_ura, -82, 19, 35) + Call(TranslateModel, MODEL_omote, -82, 19, 35) + Call(TranslateModel, MODEL_ura2, -82, 19, -35) + Call(TranslateModel, MODEL_omote2, -82, 19, -35) + Call(TranslateModel, MODEL_14, 21, -30, 0) + Call(TranslateModel, MODEL_15, 25, -30, 0) + Call(TranslateModel, MODEL_16, 63, -15, 0) + EndIf + IfEq(MF_TrainReverseDir, FALSE) + Set(LVar2, MV_TrainMoveDist) + Else + Set(LVar2, 1000) + Sub(LVar2, MV_TrainMoveDist) + EndIf + SetF(LVar0, LVar2) + MulF(LVar0, Float(-2.40625)) + Call(RotateModel, MODEL_11, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_12, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_13, LVar0, 0, 0, 1) + MulF(LVar0, Float(0.6)) + Call(RotateModel, MODEL_10, LVar0, 0, 0, 1) + Call(N(CosInterpMinMax), LVar2, LVar0, 0, -20, 75, 0, 0) + Call(N(CosInterpMinMax), LVar2, LVar1, -10, 10, 75, 0, -90) + Call(TranslateModel, MODEL_14, LVar0, LVar1, 0) + Call(N(CosInterpMinMax), LVar2, LVar0, 0, -20, 75, 0, 0) + Add(LVar0, 5) + Call(TranslateModel, MODEL_16, LVar0, -14, 0) + Call(N(CosInterpMinMax), LVar2, LVar0, 0, -20, 75, 0, 0) + Call(N(CosInterpMinMax), LVar2, LVar1, -10, 10, 75, 0, -90) + Call(TranslateModel, MODEL_15, LVar0, LVar1, 0) + Call(N(CosInterpMinMax), LVar2, LVar0, -40, 40, 75, 0, 90) + Call(RotateModel, MODEL_15, LVar0, 0, 0, 1) + Call(N(CosInterpMinMax), LVarC, LVar0, Float(-3.0), Float(3.0), 10, 0, 0) + MulF(LVar0, MV_TrainMoveSpeed) + Call(RotateModel, MODEL_09, LVar0, 0, 0, 1) + IfNe(MV_TrainMoveSpeed, 0) + IfEq(LVarD, 0) + Thread + Wait(18) + Exec(N(EVS_SpawnSmoke)) + EndThread + EndIf + EndIf + IfLe(LVarD, 20) + Call(N(CosInterpMinMax), LVarD, LVar0, Float(0.703), Float(1.0), 10, 0, 180) + Call(N(CosInterpMinMax), LVarD, LVar2, Float(0.0), Float(0.296), 10, 0, 180) + SetF(LVar1, Float(0.296)) + SubF(LVar1, LVar2) + AddF(LVar1, Float(1.0)) + Call(ScaleModel, MODEL_07, LVar1, LVar0, LVar1) + Call(ScaleModel, MODEL_08, LVar1, LVar0, LVar1) + Else + SetF(LVar0, Float(1.0)) + SetF(LVar2, Float(0.296)) + SetF(LVar1, Float(0.296)) + SubF(LVar1, LVar2) + AddF(LVar1, Float(1.0)) + Call(ScaleModel, MODEL_07, LVar1, LVar0, LVar1) + Call(ScaleModel, MODEL_08, LVar1, LVar0, LVar1) + EndIf + IfEq(MF_TrainDepartDoorOpen, TRUE) + Call(PlaySoundAt, SOUND_TRAIN_DOOR_OPEN, SOUND_SPACE_DEFAULT, -435, 84, 37) + Set(LVar8, 10) + Set(LFlag1, TRUE) + Set(MF_TrainDepartDoorOpen, FALSE) + EndIf + IfEq(MF_TrainDepartPlayerBoard, TRUE) + Set(LVar8, -10) + Set(LFlag1, TRUE) + Set(MF_TrainDepartPlayerBoard, FALSE) + EndIf + IfEq(MF_TrainArriveDoorOpen, TRUE) + Call(PlaySoundAt, SOUND_TRAIN_DOOR_OPEN, SOUND_SPACE_DEFAULT, -413, 84, 38) + Set(LVar8, 10) + Set(LFlag2, TRUE) + Set(MF_TrainArriveDoorOpen, FALSE) + EndIf + IfEq(MF_TrainArrivePlayerDisembark, TRUE) + Set(LVar8, -10) + Set(LFlag2, TRUE) + Set(MF_TrainArrivePlayerDisembark, FALSE) + EndIf + IfEq(LFlag1, TRUE) + Add(LVar9, LVar8) + IfGe(LVar9, 90) + Set(LVar9, 90) + Set(LFlag1, FALSE) + EndIf + IfLe(LVar9, 0) + Set(LVar9, 0) + Set(LFlag1, FALSE) + Call(PlaySoundAt, SOUND_TRAIN_DOOR_CLOSE, SOUND_SPACE_DEFAULT, -435, 84, 37) + EndIf + EndIf + IfEq(LFlag2, TRUE) + Add(LVarA, LVar8) + IfGe(LVarA, 90) + Set(LVarA, 90) + Set(LFlag2, FALSE) + EndIf + IfLe(LVarA, 0) + Set(LVarA, 0) + Set(LFlag2, FALSE) + Call(PlaySoundAt, SOUND_TRAIN_DOOR_CLOSE, SOUND_SPACE_DEFAULT, -413, 84, 38) + EndIf + EndIf + Call(RotateModel, MODEL_omote, LVar9, 0, -1, 0) + Call(RotateModel, MODEL_ura, LVar9, 0, -1, 0) + Call(RotateModel, MODEL_omote2, LVarA, 0, 1, 0) + Call(RotateModel, MODEL_ura2, LVarA, 0, 1, 0) + IfGt(MV_TrainMoveDist, 100) + IfLt(MV_TrainMoveDist, 600) + IfEq(LFlag0, FALSE) + Set(LFlag0, TRUE) + Exec(N(EVS_OpenCrossingGates)) + EndIf + EndIf + EndIf + IfLe(MV_TrainMoveDist, 100) + IfEq(LFlag0, TRUE) + Set(LFlag0, FALSE) + Exec(N(EVS_CloseCrossingGates)) + EndIf + EndIf + IfGe(MV_TrainMoveDist, 600) + IfEq(LFlag0, TRUE) + Set(LFlag0, FALSE) + Exec(N(EVS_CloseCrossingGates)) + EndIf + EndIf + IfEq(MF_TrainMoving, TRUE) + IfEq(MF_TrainReverseDir, FALSE) + Set(LVar0, MV_TrainMoveDist) + Add(LVar0, -425) + Add(LVar1, 75) + Add(LVar2, 20) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Else + Set(LVar0, MV_TrainMoveDist) + Add(LVar0, -335) + Add(LVar1, 75) + Add(LVar2, 20) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + EndIf + EndIf + Add(MV_TrainMoveDist, MV_TrainMoveSpeed) + Set(LVar0, MV_TrainMoveDist) + Div(LVar0, 75) + IfNe(LVar0, LVarE) + Set(LVarE, LVar0) + Set(LVarD, -1) + Add(LVarB, 1) + IfEq(LVarB, 10) + Set(LVarB, 0) + EndIf + EndIf + AddF(LVarD, 1) + IfGt(LVarD, 1000) + Set(LVarD, 1000) + EndIf + AddF(LVarC, 1) + IfGt(LVarC, 1000) + Set(LVarC, 0) + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_UpdatePassengerPos) = { - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar0, MV_TrainMoveDist) - EVT_IF_EQ(MF_TrainReverseDir, FALSE) - EVT_ADD(LVar0, -425) - EVT_ELSE - EVT_ADD(LVar0, -335) - EVT_END_IF - EVT_SET(LVar3, LVar0) - EVT_SET(LVar4, LVar1) - EVT_SET(LVar5, LVar2) - EVT_IF_EQ(MF_TrainReverseDir, FALSE) - EVT_ADD(LVar3, -57) - EVT_ELSE - EVT_ADD(LVar3, 57) - EVT_END_IF - EVT_ADD(LVar4, -31) - EVT_ADD(LVar5, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar3, LVar4, LVar5) - EVT_IF_EQ(MF_TrainReverseDir, FALSE) - EVT_ADD(LVar0, 0) - EVT_ELSE - EVT_ADD(LVar0, 0) - EVT_END_IF - EVT_ADD(LVar1, -6) - EVT_ADD(LVar2, -40) - EVT_CALL(SetNpcPos, NPC_TrainToad_02, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar0, MV_TrainMoveDist) + IfEq(MF_TrainReverseDir, FALSE) + Add(LVar0, -425) + Else + Add(LVar0, -335) + EndIf + Set(LVar3, LVar0) + Set(LVar4, LVar1) + Set(LVar5, LVar2) + IfEq(MF_TrainReverseDir, FALSE) + Add(LVar3, -57) + Else + Add(LVar3, 57) + EndIf + Add(LVar4, -31) + Add(LVar5, 0) + Call(SetNpcPos, NPC_PARTNER, LVar3, LVar4, LVar5) + IfEq(MF_TrainReverseDir, FALSE) + Add(LVar0, 0) + Else + Add(LVar0, 0) + EndIf + Add(LVar1, -6) + Add(LVar2, -40) + Call(SetNpcPos, NPC_TrainToad_02, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_FollowTrainCamera) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_EQ(MF_TrainReverseDir, FALSE) - EVT_IF_GT(LVar0, 350) - EVT_SET(LVar0, 350) - EVT_END_IF - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 30) - EVT_ADD(LVar2, 40) - EVT_ELSE - EVT_IF_GT(LVar0, 350) - EVT_SET(LVar0, 350) - EVT_END_IF - EVT_ADD(LVar0, -40) - EVT_SET(LVar1, 30) - EVT_ADD(LVar2, 40) - EVT_END_IF - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfEq(MF_TrainReverseDir, FALSE) + IfGt(LVar0, 350) + Set(LVar0, 350) + EndIf + Add(LVar0, 40) + Set(LVar1, 30) + Add(LVar2, 40) + Else + IfGt(LVar0, 350) + Set(LVar0, 350) + EndIf + Add(LVar0, -40) + Set(LVar1, 30) + Add(LVar2, 40) + EndIf + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_ArriveFromMtRugged) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_CALL(EnableNpcShadow, NPC_PARTNER, FALSE) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitk, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kisya1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kisya2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kisya3, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_humikiri, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_fumikiri, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_EXEC_GET_TID(N(EVS_FollowTrainCamera), LVar9) - EVT_EXEC_GET_TID(N(EVS_UpdatePassengerPos), LVarE) - EVT_SET(MF_TrainMoving, TRUE) - EVT_SET(MV_TrainMoveDist, 1200) - EVT_SET(MV_TrainMoveSpeed, 0) - EVT_SET(MF_TrainReverseDir, TRUE) - EVT_WAIT(60) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_SET(MV_TrainMoveDist, 1200) - EVT_SET(MV_TrainMoveSpeed, -10) - EVT_SET(MF_TrainReverseDir, TRUE) - EVT_LABEL(0) - EVT_SETF(MV_TrainMoveSpeed, -90) - EVT_SUBF(MV_TrainMoveSpeed, MV_TrainMoveDist) - EVT_SUBF(MV_TrainMoveSpeed, EVT_FLOAT(10.0)) - EVT_DIVF(MV_TrainMoveSpeed, EVT_FLOAT(10.0)) - EVT_IF_LT(MV_TrainMoveSpeed, -10) - EVT_SET(MV_TrainMoveSpeed, -10) - EVT_END_IF - EVT_IF_LE(MV_TrainMoveDist, -90) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_LABEL(1) - EVT_SET(MV_TrainMoveDist, -90) - EVT_SET(MV_TrainMoveSpeed, 0) - EVT_CALL(PlaySound, SOUND_TRAIN_RELEASE_STEAM) - EVT_KILL_THREAD(LVarE) - EVT_SET(MF_TrainMoving, FALSE) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_SET(LVar0, -425) - EVT_SET(LVar1, 45) - EVT_SET(LVar2, 20) - EVT_CALL(SetPlayerActionState, ACTION_STATE_JUMP) - EVT_CALL(PlayerJump, LVar0, LVar1, LVar2, 15) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(3.0)) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar0, -410) - EVT_SET(LVar1, 45) - EVT_SET(LVar2, 20) - EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_KILL_THREAD(LVar9) - EVT_CALL(EnableNpcShadow, NPC_PARTNER, TRUE) - EVT_CALL(HidePlayerShadow, FALSE) - EVT_SET(MF_TrainArriveDoorOpen, TRUE) - EVT_WAIT(20) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -420, 20, 97) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -420, 20, 97) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(SetPlayerActionState, ACTION_STATE_JUMP) - EVT_CALL(PlayerJump, -420, 20, 97, 15) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_PARTNER, -406, 20, 71, 15) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilitk, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_kisya1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_kisya2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_kisya3, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_humikiri, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_fumikiri, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_SET(MF_TrainArrivePlayerDisembark, TRUE) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_TrainToad_01, ANIM_TrainToad_White_Talk, ANIM_TrainToad_White_Idle, 0, MSG_MAC_Station_0005) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(InterpPlayerYaw, 270, 0) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + Call(EnableNpcShadow, NPC_PARTNER, FALSE) + Call(HidePlayerShadow, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitk, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kisya1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kisya2, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kisya3, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_humikiri, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_fumikiri, COLLIDER_FLAGS_UPPER_MASK) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + ExecGetTID(N(EVS_FollowTrainCamera), LVar9) + ExecGetTID(N(EVS_UpdatePassengerPos), LVarE) + Set(MF_TrainMoving, TRUE) + Set(MV_TrainMoveDist, 1200) + Set(MV_TrainMoveSpeed, 0) + Set(MF_TrainReverseDir, TRUE) + Wait(60) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Set(MV_TrainMoveDist, 1200) + Set(MV_TrainMoveSpeed, -10) + Set(MF_TrainReverseDir, TRUE) + Label(0) + SetF(MV_TrainMoveSpeed, -90) + SubF(MV_TrainMoveSpeed, MV_TrainMoveDist) + SubF(MV_TrainMoveSpeed, Float(10.0)) + DivF(MV_TrainMoveSpeed, Float(10.0)) + IfLt(MV_TrainMoveSpeed, -10) + Set(MV_TrainMoveSpeed, -10) + EndIf + IfLe(MV_TrainMoveDist, -90) + Goto(1) + EndIf + Wait(1) + Goto(0) + Label(1) + Set(MV_TrainMoveDist, -90) + Set(MV_TrainMoveSpeed, 0) + Call(PlaySound, SOUND_TRAIN_RELEASE_STEAM) + KillThread(LVarE) + Set(MF_TrainMoving, FALSE) + Call(SetPlayerJumpscale, Float(1.0)) + Set(LVar0, -425) + Set(LVar1, 45) + Set(LVar2, 20) + Call(SetPlayerActionState, ACTION_STATE_JUMP) + Call(PlayerJump, LVar0, LVar1, LVar2, 15) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcSpeed, NPC_PARTNER, Float(3.0)) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar0, -410) + Set(LVar1, 45) + Set(LVar2, 20) + Call(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + KillThread(LVar9) + Call(EnableNpcShadow, NPC_PARTNER, TRUE) + Call(HidePlayerShadow, FALSE) + Set(MF_TrainArriveDoorOpen, TRUE) + Wait(20) + Call(UseSettingsFrom, CAM_DEFAULT, -420, 20, 97) + Call(SetPanTarget, CAM_DEFAULT, -420, 20, 97) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetPlayerJumpscale, Float(1.0)) + Call(SetPlayerActionState, ACTION_STATE_JUMP) + Call(PlayerJump, -420, 20, 97, 15) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(SetNpcJumpscale, NPC_PARTNER, Float(1.0)) + Call(NpcJump0, NPC_PARTNER, -406, 20, 71, 15) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilitk, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_kisya1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_kisya2, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_kisya3, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_humikiri, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_fumikiri, COLLIDER_FLAGS_UPPER_MASK) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(DisablePlayerPhysics, FALSE) + Call(EnablePartnerAI) + Set(MF_TrainArrivePlayerDisembark, TRUE) + Wait(20) + Call(SpeakToPlayer, NPC_TrainToad_01, ANIM_TrainToad_White_Talk, ANIM_TrainToad_White_Idle, 0, MSG_MAC_Station_0005) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_DepartForMtRugged) = { - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, mac_03_ENTRY_1) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_SET(MV_TrainMoveDist, 0) - EVT_SET(MV_TrainMoveSpeed, 0) - EVT_SET(MF_TrainReverseDir, FALSE) - EVT_SET(MF_TrainDepartDoorOpen, TRUE) - EVT_WAIT(20) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitk, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kisya1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kisya2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kisya3, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_humikiri, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_fumikiri, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetNpcFlagBits, NPC_TrainToad_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, -425, 70, 0) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_SET(LVar0, -425) - EVT_SET(LVar1, 45) - EVT_SET(LVar2, 20) - EVT_CALL(SetPlayerActionState, ACTION_STATE_JUMP) - EVT_CALL(PlayerJump, LVar0, LVar1, LVar2, 15) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(3.0)) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) - EVT_CALL(NpcMoveTo, NPC_PARTNER, -425, 70, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(1.0)) - EVT_SET(LVar0, -425) - EVT_SET(LVar1, 45) - EVT_SET(LVar2, 20) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10) - EVT_SET(MF_TrainDepartPlayerBoard, TRUE) - EVT_WAIT(20) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, -50) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(EnableNpcShadow, NPC_PARTNER, FALSE) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_SET(LVar0, -425) - EVT_SET(LVar1, 75) - EVT_SET(LVar2, 20) - EVT_CALL(SetPlayerActionState, ACTION_STATE_JUMP) - EVT_CALL(PlayerJump, LVar0, LVar1, LVar2, 15) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_SET(MF_TrainMoving, TRUE) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(3.0)) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -57) - EVT_ADD(LVar1, -31) - EVT_ADD(LVar2, 0) - EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_EXEC(N(EVS_UpdatePassengerPos)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(240.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(-100.0), EVT_FLOAT(-50.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(-2.5), EVT_FLOAT(-3.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 100) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_TrainToad_02, ANIM_TrainToad_Talk, ANIM_TrainToad_Still, 5, MSG_MAC_Station_0009) - EVT_CALL(PlaySound, SOUND_TRAIN_DEPARTURE) - EVT_THREAD - EVT_LOOP(1000) - EVT_ADDF(MV_TrainMoveSpeed, EVT_FLOAT(0.031)) - EVT_IF_GT(MV_TrainMoveSpeed, 10) - EVT_SETF(MV_TrainMoveSpeed, EVT_FLOAT(10.0)) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(40) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_EXEC_GET_TID(N(EVS_FollowTrainCamera), LVar9) - EVT_WAIT(170) - EVT_WAIT(100) - EVT_CALL(GotoMap, EVT_PTR("iwa_11"), iwa_11_ENTRY_0) - EVT_RETURN - EVT_END + IfEq(GF_MAC03_BombedRock, FALSE) + Return + EndIf + Call(GetEntryID, LVar0) + IfEq(LVar0, mac_03_ENTRY_1) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Set(MV_TrainMoveDist, 0) + Set(MV_TrainMoveSpeed, 0) + Set(MF_TrainReverseDir, FALSE) + Set(MF_TrainDepartDoorOpen, TRUE) + Wait(20) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitk, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kisya1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kisya2, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kisya3, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_humikiri, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_fumikiri, COLLIDER_FLAGS_UPPER_MASK) + Call(SetNpcFlagBits, NPC_TrainToad_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, -425, 70, 0) + Call(SetPlayerJumpscale, Float(1.0)) + Set(LVar0, -425) + Set(LVar1, 45) + Set(LVar2, 20) + Call(SetPlayerActionState, ACTION_STATE_JUMP) + Call(PlayerJump, LVar0, LVar1, LVar2, 15) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcSpeed, NPC_PARTNER, Float(3.0)) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) + Call(NpcMoveTo, NPC_PARTNER, -425, 70, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(SetNpcJumpscale, NPC_PARTNER, Float(1.0)) + Set(LVar0, -425) + Set(LVar1, 45) + Set(LVar2, 20) + Call(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10) + Set(MF_TrainDepartPlayerBoard, TRUE) + Wait(20) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Add(LVar2, -50) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(EnableNpcShadow, NPC_PARTNER, FALSE) + Call(HidePlayerShadow, TRUE) + Call(SetPlayerJumpscale, Float(1.0)) + Set(LVar0, -425) + Set(LVar1, 75) + Set(LVar2, 20) + Call(SetPlayerActionState, ACTION_STATE_JUMP) + Call(PlayerJump, LVar0, LVar1, LVar2, 15) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(InterpPlayerYaw, 90, 0) + Set(MF_TrainMoving, TRUE) + Call(SetNpcSpeed, NPC_PARTNER, Float(3.0)) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, -57) + Add(LVar1, -31) + Add(LVar2, 0) + Call(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + Exec(N(EVS_UpdatePassengerPos)) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(240.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(-100.0), Float(-50.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(-2.5), Float(-3.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 100) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_TrainToad_02, ANIM_TrainToad_Talk, ANIM_TrainToad_Still, 5, MSG_MAC_Station_0009) + Call(PlaySound, SOUND_TRAIN_DEPARTURE) + Thread + Loop(1000) + AddF(MV_TrainMoveSpeed, Float(0.031)) + IfGt(MV_TrainMoveSpeed, 10) + SetF(MV_TrainMoveSpeed, Float(10.0)) + EndIf + Wait(1) + EndLoop + EndThread + Wait(40) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + ExecGetTID(N(EVS_FollowTrainCamera), LVar9) + Wait(170) + Wait(100) + Call(GotoMap, Ref("iwa_11"), iwa_11_ENTRY_0) + Return + End }; EvtScript N(EVS_InitializeTrainScene) = { - EVT_CALL(SetModelFlags, MODEL_km, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_CALL(EnableModel, MODEL_km, FALSE) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(0)) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(1)) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(2)) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(3)) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(4)) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(5)) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(6)) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(7)) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(8)) - EVT_CALL(CloneModel, MODEL_km, CLONED_MODEL(9)) - EVT_EXEC(N(EVS_AnimateTrain)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Call(SetModelFlags, MODEL_km, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Call(EnableModel, MODEL_km, FALSE) + Call(CloneModel, MODEL_km, CLONED_MODEL(0)) + Call(CloneModel, MODEL_km, CLONED_MODEL(1)) + Call(CloneModel, MODEL_km, CLONED_MODEL(2)) + Call(CloneModel, MODEL_km, CLONED_MODEL(3)) + Call(CloneModel, MODEL_km, CLONED_MODEL(4)) + Call(CloneModel, MODEL_km, CLONED_MODEL(5)) + Call(CloneModel, MODEL_km, CLONED_MODEL(6)) + Call(CloneModel, MODEL_km, CLONED_MODEL(7)) + Call(CloneModel, MODEL_km, CLONED_MODEL(8)) + Call(CloneModel, MODEL_km, CLONED_MODEL(9)) + Exec(N(EVS_AnimateTrain)) + Wait(1) + Return + End }; diff --git a/src/world/area_mac/mac_03/mac_03_4_npc.c b/src/world/area_mac/mac_03/mac_03_4_npc.c index 7f148dd387c..2f6ef21f452 100644 --- a/src/world/area_mac/mac_03/mac_03_4_npc.c +++ b/src/world/area_mac/mac_03/mac_03_4_npc.c @@ -55,24 +55,24 @@ s32 N(LetterList_A)[] = { }; EvtScript N(EVS_LetterPrompt_ToadKid1A) = { - EVT_CALL(N(LetterDelivery_Init), NPC_ToadKid_01, + Call(N(LetterDelivery_Init), NPC_ToadKid_01, ANIM_ToadKid_Red_Talk, ANIM_ToadKid_Red_Idle, ITEM_LETTER_CHAIN_DANE_T_1, ITEM_NONE, MSG_MAC_Station_0049, MSG_MAC_Station_004A, MSG_MAC_Station_004B, MSG_MAC_Station_004C, - EVT_PTR(N(LetterList_A))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) - EVT_RETURN - EVT_END + Ref(N(LetterList_A))) + ExecWait(N(EVS_DoLetterDelivery)) + Return + End }; EvtScript N(EVS_LetterReward_ToadKid1A) = { - EVT_IF_EQ(LVarC, DELIVERY_ACCEPTED) - EVT_CALL(SpeakToPlayer, NPC_ToadKid_02, ANIM_ToadKid_Yellow_Talk, ANIM_ToadKid_Yellow_Idle, 0, MSG_MAC_Station_004D) + IfEq(LVarC, DELIVERY_ACCEPTED) + Call(SpeakToPlayer, NPC_ToadKid_02, ANIM_ToadKid_Yellow_Talk, ANIM_ToadKid_Yellow_Idle, 0, MSG_MAC_Station_004D) EVT_GIVE_KEY_REWARD(ITEM_LETTER_CHAIN_YOSHI_KID) - EVT_END_IF - EVT_RETURN - EVT_END + EndIf + Return + End }; s32 N(LetterList_B)[] = { @@ -81,528 +81,528 @@ s32 N(LetterList_B)[] = { }; EvtScript N(EVS_LetterPrompt_ToadKid1B) = { - EVT_CALL(N(LetterDelivery_Init), NPC_ToadKid_01, + Call(N(LetterDelivery_Init), NPC_ToadKid_01, ANIM_ToadKid_Red_Talk, ANIM_ToadKid_Red_Idle, ITEM_LETTER_CHAIN_DANE_T_2, ITEM_NONE, MSG_MAC_Station_004E, MSG_MAC_Station_004F, MSG_MAC_Station_0050, MSG_MAC_Station_0051, - EVT_PTR(N(LetterList_B))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) - EVT_RETURN - EVT_END + Ref(N(LetterList_B))) + ExecWait(N(EVS_DoLetterDelivery)) + Return + End }; EvtScript N(EVS_LetterReward_ToadKid1B) = { - EVT_IF_EQ(LVarC, DELIVERY_ACCEPTED) - EVT_CALL(SpeakToPlayer, NPC_ToadKid_02, ANIM_ToadKid_Yellow_Talk, ANIM_ToadKid_Yellow_Idle, 0, MSG_MAC_Station_0052) + IfEq(LVarC, DELIVERY_ACCEPTED) + Call(SpeakToPlayer, NPC_ToadKid_02, ANIM_ToadKid_Yellow_Talk, ANIM_ToadKid_Yellow_Idle, 0, MSG_MAC_Station_0052) // EVT_GIVE_KEY_REWARD(ITEM_LETTER_CHAIN_FROST_T), but LVar1/LVar0 are set in wrong order - EVT_SET(LVar1, 1) - EVT_SET(LVar0, ITEM_LETTER_CHAIN_FROST_T) - EVT_EXEC_WAIT(N(GiveItemReward)) - EVT_CALL(AddKeyItem, ITEM_LETTER_CHAIN_FROST_T) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVar1, 1) + Set(LVar0, ITEM_LETTER_CHAIN_FROST_T) + ExecWait(N(GiveItemReward)) + Call(AddKeyItem, ITEM_LETTER_CHAIN_FROST_T) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_TrainToad_01) = { - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_CALL(SpeakToPlayer, NPC_TrainToad_01, ANIM_TrainToad_White_SadTalk, ANIM_TrainToad_White_SadIdle, 0, MSG_MAC_Station_0000) - EVT_RETURN - EVT_END_IF - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) - EVT_IF_EQ(GF_MAC03_ShyGuyChasedOff, FALSE) - EVT_CALL(SpeakToPlayer, NPC_TrainToad_01, ANIM_TrainToad_White_SadTalk, ANIM_TrainToad_White_SadIdle, 0, MSG_MAC_Station_0007) - EVT_RETURN - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, mac_03_ENTRY_1) - EVT_CALL(SpeakToPlayer, NPC_TrainToad_01, ANIM_TrainToad_White_Talk, ANIM_TrainToad_White_Idle, 0, MSG_MAC_Station_0006) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GF_MAC03_ShyGuyChasedOff, FALSE) - EVT_IF_EQ(GF_MAC03_Conductor_ThankYouA, FALSE) - EVT_SET(GF_MAC03_Conductor_ThankYouA, TRUE) - EVT_SET(LVar0, MSG_MAC_Station_0001) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Station_0002) - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(GF_MAC03_Conductor_ThankYouB, FALSE) - EVT_SET(GF_MAC03_Conductor_ThankYouB, TRUE) - EVT_SET(LVar0, MSG_MAC_Station_0008) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Station_0002) - EVT_END_IF - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_TrainToad_01, ANIM_TrainToad_White_Talk, ANIM_TrainToad_White_Idle, 0, LVar0) - EVT_CALL(ShowChoice, MSG_Choice_000C) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ContinueSpeech, NPC_TrainToad_01, ANIM_TrainToad_White_Talk, ANIM_TrainToad_White_Idle, 0, MSG_MAC_Station_0003) - EVT_EXEC(N(EVS_DepartForMtRugged)) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_TrainToad_01, ANIM_TrainToad_White_Talk, ANIM_TrainToad_White_Idle, 0, MSG_MAC_Station_0004) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_MAC03_BombedRock, FALSE) + Call(SpeakToPlayer, NPC_TrainToad_01, ANIM_TrainToad_White_SadTalk, ANIM_TrainToad_White_SadIdle, 0, MSG_MAC_Station_0000) + Return + EndIf + Switch(GB_StoryProgress) + CaseRange(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) + IfEq(GF_MAC03_ShyGuyChasedOff, FALSE) + Call(SpeakToPlayer, NPC_TrainToad_01, ANIM_TrainToad_White_SadTalk, ANIM_TrainToad_White_SadIdle, 0, MSG_MAC_Station_0007) + Return + EndIf + EndSwitch + Call(GetEntryID, LVar0) + IfEq(LVar0, mac_03_ENTRY_1) + Call(SpeakToPlayer, NPC_TrainToad_01, ANIM_TrainToad_White_Talk, ANIM_TrainToad_White_Idle, 0, MSG_MAC_Station_0006) + Return + EndIf + IfEq(GF_MAC03_ShyGuyChasedOff, FALSE) + IfEq(GF_MAC03_Conductor_ThankYouA, FALSE) + Set(GF_MAC03_Conductor_ThankYouA, TRUE) + Set(LVar0, MSG_MAC_Station_0001) + Else + Set(LVar0, MSG_MAC_Station_0002) + EndIf + Else + IfEq(GF_MAC03_Conductor_ThankYouB, FALSE) + Set(GF_MAC03_Conductor_ThankYouB, TRUE) + Set(LVar0, MSG_MAC_Station_0008) + Else + Set(LVar0, MSG_MAC_Station_0002) + EndIf + EndIf + Call(SpeakToPlayer, NPC_TrainToad_01, ANIM_TrainToad_White_Talk, ANIM_TrainToad_White_Idle, 0, LVar0) + Call(ShowChoice, MSG_Choice_000C) + IfEq(LVar0, 0) + Call(ContinueSpeech, NPC_TrainToad_01, ANIM_TrainToad_White_Talk, ANIM_TrainToad_White_Idle, 0, MSG_MAC_Station_0003) + Exec(N(EVS_DepartForMtRugged)) + Else + Call(ContinueSpeech, NPC_TrainToad_01, ANIM_TrainToad_White_Talk, ANIM_TrainToad_White_Idle, 0, MSG_MAC_Station_0004) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_TrainToad_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_TrainToad_01))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_TrainToad_01))) + Return + End }; EvtScript N(EVS_NpcInteract_Toad_01) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Station_000A) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Station_000B) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Station_000C) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_ShyGuyBlockingTracks, FALSE) - EVT_SET(LVar0, MSG_MAC_Station_000D) - EVT_ELSE - EVT_IF_EQ(GF_MAC03_ShyGuyChasedOff, FALSE) - EVT_SET(LVar0, MSG_MAC_Station_000E) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Station_000F) - EVT_END_IF - EVT_END_IF - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Station_0010) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Station_0011) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Station_0012) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Station_0013) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Station_0014) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Station_0015) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Station_0016) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_Toad_01, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Station_000A) + Else + Set(LVar0, MSG_MAC_Station_000B) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Station_000C) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_ShyGuyBlockingTracks, FALSE) + Set(LVar0, MSG_MAC_Station_000D) + Else + IfEq(GF_MAC03_ShyGuyChasedOff, FALSE) + Set(LVar0, MSG_MAC_Station_000E) + Else + Set(LVar0, MSG_MAC_Station_000F) + EndIf + EndIf + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Station_0010) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Station_0011) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Station_0012) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Station_0013) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Station_0014) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Station_0015) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Station_0016) + EndSwitch + Call(SpeakToPlayer, NPC_Toad_01, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_Toad_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_01))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_01))) + Return + End }; EvtScript N(EVS_NpcInteract_Toadette_01) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Station_0017) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Station_0018) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Station_0019) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_ShyGuyBlockingTracks, FALSE) - EVT_SET(LVar0, MSG_MAC_Station_001A) - EVT_ELSE - EVT_IF_EQ(GF_MAC03_ShyGuyChasedOff, FALSE) - EVT_SET(LVar0, MSG_MAC_Station_001B) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Station_001C) - EVT_END_IF - EVT_END_IF - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Station_001D) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Station_001E) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Station_001F) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Station_0020) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Station_0021) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Station_0022) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Station_0023) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_Toadette_01, ANIM_Toadette_Purple_Talk, ANIM_Toadette_Purple_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Station_0017) + Else + Set(LVar0, MSG_MAC_Station_0018) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Station_0019) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_ShyGuyBlockingTracks, FALSE) + Set(LVar0, MSG_MAC_Station_001A) + Else + IfEq(GF_MAC03_ShyGuyChasedOff, FALSE) + Set(LVar0, MSG_MAC_Station_001B) + Else + Set(LVar0, MSG_MAC_Station_001C) + EndIf + EndIf + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Station_001D) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Station_001E) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Station_001F) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Station_0020) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Station_0021) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Station_0022) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Station_0023) + EndSwitch + Call(SpeakToPlayer, NPC_Toadette_01, ANIM_Toadette_Purple_Talk, ANIM_Toadette_Purple_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_Toadette_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toadette_01))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toadette_01))) + Return + End }; EvtScript N(EVS_NpcInteract_Toad_02) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Station_0024) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Station_0025) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Station_0026) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_ShyGuyBlockingTracks, FALSE) - EVT_SET(LVar0, MSG_MAC_Station_0027) - EVT_ELSE - EVT_IF_EQ(GF_MAC03_ShyGuyChasedOff, FALSE) - EVT_SET(LVar0, MSG_MAC_Station_0028) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Station_0029) - EVT_END_IF - EVT_END_IF - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Station_002A) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Station_002B) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Station_002C) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Station_002D) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Station_002E) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Station_002F) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Station_0030) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_Toad_02, ANIM_Toad_Green_Talk, ANIM_Toad_Green_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Station_0024) + Else + Set(LVar0, MSG_MAC_Station_0025) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Station_0026) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_ShyGuyBlockingTracks, FALSE) + Set(LVar0, MSG_MAC_Station_0027) + Else + IfEq(GF_MAC03_ShyGuyChasedOff, FALSE) + Set(LVar0, MSG_MAC_Station_0028) + Else + Set(LVar0, MSG_MAC_Station_0029) + EndIf + EndIf + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Station_002A) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Station_002B) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Station_002C) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Station_002D) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Station_002E) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Station_002F) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Station_0030) + EndSwitch + Call(SpeakToPlayer, NPC_Toad_02, ANIM_Toad_Green_Talk, ANIM_Toad_Green_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_Toad_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_02))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_02))) + Return + End }; EvtScript N(EVS_NpcInteract_ToadKid_02) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_FULL) - EVT_CALL(EnableNpcAI, NPC_ToadKid_01, FALSE) - EVT_CALL(EnableNpcAI, NPC_ToadKid_02, FALSE) - EVT_CALL(GetNpcAnimation, NPC_ToadKid_01, LVar2) - EVT_CALL(GetNpcAnimation, NPC_ToadKid_02, LVar3) - EVT_CALL(SetNpcAnimation, NPC_ToadKid_01, ANIM_ToadKid_Red_Idle) - EVT_CALL(SetNpcAnimation, NPC_ToadKid_02, ANIM_ToadKid_Yellow_Idle) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Station_0031) - EVT_SET(LVar1, MSG_MAC_Station_0032) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Station_0033) - EVT_SET(LVar1, MSG_MAC_Station_0034) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Station_0035) - EVT_SET(LVar1, MSG_MAC_Station_0036) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_ShyGuyBlockingTracks, FALSE) - EVT_ELSE - EVT_IF_EQ(GF_MAC03_ShyGuyChasedOff, FALSE) - EVT_SET(LVar0, MSG_MAC_Station_0037) - EVT_SET(LVar1, MSG_MAC_Station_0038) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Station_0039) - EVT_SET(LVar1, MSG_MAC_Station_003A) - EVT_END_IF - EVT_END_IF - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Station_003B) - EVT_SET(LVar1, MSG_MAC_Station_003C) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Station_003D) - EVT_SET(LVar1, MSG_MAC_Station_003E) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Station_003F) - EVT_SET(LVar1, MSG_MAC_Station_0040) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Station_0041) - EVT_SET(LVar1, MSG_MAC_Station_0042) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Station_0043) - EVT_SET(LVar1, MSG_MAC_Station_0044) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Station_0045) - EVT_SET(LVar1, MSG_MAC_Station_0046) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Station_0047) - EVT_SET(LVar1, MSG_MAC_Station_0048) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_ToadKid_01, ANIM_ToadKid_Red_Talk, ANIM_ToadKid_Red_Idle, 0, LVar0) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_ToadKid_02, ANIM_ToadKid_Yellow_Talk, ANIM_ToadKid_Yellow_Idle, 0, LVar1) - EVT_CALL(SetNpcAnimation, NPC_ToadKid_01, LVar2) - EVT_CALL(SetNpcAnimation, NPC_ToadKid_02, LVar3) - EVT_CALL(EnableNpcAI, NPC_ToadKid_01, TRUE) - EVT_CALL(EnableNpcAI, NPC_ToadKid_02, TRUE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_FULL) + Call(EnableNpcAI, NPC_ToadKid_01, FALSE) + Call(EnableNpcAI, NPC_ToadKid_02, FALSE) + Call(GetNpcAnimation, NPC_ToadKid_01, LVar2) + Call(GetNpcAnimation, NPC_ToadKid_02, LVar3) + Call(SetNpcAnimation, NPC_ToadKid_01, ANIM_ToadKid_Red_Idle) + Call(SetNpcAnimation, NPC_ToadKid_02, ANIM_ToadKid_Yellow_Idle) + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Station_0031) + Set(LVar1, MSG_MAC_Station_0032) + Else + Set(LVar0, MSG_MAC_Station_0033) + Set(LVar1, MSG_MAC_Station_0034) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Station_0035) + Set(LVar1, MSG_MAC_Station_0036) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_ShyGuyBlockingTracks, FALSE) + Else + IfEq(GF_MAC03_ShyGuyChasedOff, FALSE) + Set(LVar0, MSG_MAC_Station_0037) + Set(LVar1, MSG_MAC_Station_0038) + Else + Set(LVar0, MSG_MAC_Station_0039) + Set(LVar1, MSG_MAC_Station_003A) + EndIf + EndIf + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Station_003B) + Set(LVar1, MSG_MAC_Station_003C) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Station_003D) + Set(LVar1, MSG_MAC_Station_003E) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Station_003F) + Set(LVar1, MSG_MAC_Station_0040) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Station_0041) + Set(LVar1, MSG_MAC_Station_0042) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Station_0043) + Set(LVar1, MSG_MAC_Station_0044) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Station_0045) + Set(LVar1, MSG_MAC_Station_0046) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Station_0047) + Set(LVar1, MSG_MAC_Station_0048) + EndSwitch + Call(SpeakToPlayer, NPC_ToadKid_01, ANIM_ToadKid_Red_Talk, ANIM_ToadKid_Red_Idle, 0, LVar0) + Wait(10) + Call(SpeakToPlayer, NPC_ToadKid_02, ANIM_ToadKid_Yellow_Talk, ANIM_ToadKid_Yellow_Idle, 0, LVar1) + Call(SetNpcAnimation, NPC_ToadKid_01, LVar2) + Call(SetNpcAnimation, NPC_ToadKid_02, LVar3) + Call(EnableNpcAI, NPC_ToadKid_01, TRUE) + Call(EnableNpcAI, NPC_ToadKid_02, TRUE) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + End }; EvtScript N(EVS_NpcInteract_ToadKid_01) = { - EVT_EXEC_WAIT(N(EVS_NpcInteract_ToadKid_02)) - EVT_EXEC_WAIT(N(EVS_LetterPrompt_ToadKid1A)) - EVT_EXEC_WAIT(N(EVS_LetterReward_ToadKid1A)) - EVT_IF_NE(LVarC, 0) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_LetterPrompt_ToadKid1B)) - EVT_EXEC_WAIT(N(EVS_LetterReward_ToadKid1B)) - EVT_IF_NE(LVarC, 0) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + ExecWait(N(EVS_NpcInteract_ToadKid_02)) + ExecWait(N(EVS_LetterPrompt_ToadKid1A)) + ExecWait(N(EVS_LetterReward_ToadKid1A)) + IfNe(LVarC, 0) + Return + EndIf + ExecWait(N(EVS_LetterPrompt_ToadKid1B)) + ExecWait(N(EVS_LetterReward_ToadKid1B)) + IfNe(LVarC, 0) + Return + EndIf + Return + End }; EvtScript N(EVS_NpcInit_ToadKid_01) = { - EVT_CALL(BindNpcInteract, NPC_ToadKid_01, EVT_PTR(N(EVS_NpcInteract_ToadKid_01))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_ToadKid_01, Ref(N(EVS_NpcInteract_ToadKid_01))) + Return + End }; EvtScript N(EVS_NpcInit_ToadKid_02) = { - EVT_CALL(BindNpcInteract, NPC_ToadKid_02, EVT_PTR(N(EVS_NpcInteract_ToadKid_02))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_ToadKid_02, Ref(N(EVS_NpcInteract_ToadKid_02))) + Return + End }; EvtScript N(EVS_NpcInteract_Toadette_02) = { - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Station_0061) - EVT_SET(LVar1, MSG_MAC_Station_0062) - EVT_SET(LVar2, MSG_MAC_Station_0063) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Station_0064) - EVT_SET(LVar1, MSG_MAC_Station_0065) - EVT_SET(LVar2, MSG_MAC_Station_0066) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_Toadette_02, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 0, LVar0) - EVT_CALL(SpeakToPlayer, NPC_Toadette_03, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 0, LVar1) - EVT_CALL(SpeakToPlayer, NPC_Toadette_04, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 0, LVar2) - EVT_RETURN - EVT_END + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Station_0061) + Set(LVar1, MSG_MAC_Station_0062) + Set(LVar2, MSG_MAC_Station_0063) + Else + Set(LVar0, MSG_MAC_Station_0064) + Set(LVar1, MSG_MAC_Station_0065) + Set(LVar2, MSG_MAC_Station_0066) + EndIf + Call(SpeakToPlayer, NPC_Toadette_02, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 0, LVar0) + Call(SpeakToPlayer, NPC_Toadette_03, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 0, LVar1) + Call(SpeakToPlayer, NPC_Toadette_04, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 0, LVar2) + Return + End }; EvtScript N(EVS_NpcInit_Toadette_02) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toadette_02))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toadette_02))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Toad_03) = { - EVT_IF_EQ(GB_MAC03_LilOinkCount, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MAC_Station_0053) - EVT_CALL(ShowChoice, MSG_Choice_000D) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LVar0, MSG_MAC_Station_0056) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Station_0055) - EVT_END_IF - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVar0) - EVT_WAIT(10) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_SET(MF_Unk_08, TRUE) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(MF_Unk_07, FALSE) - EVT_SET(LVar0, MSG_MAC_Station_0054) - EVT_ELSE - EVT_CALL(N(GetOinkCount)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(9) - EVT_SET(LVar0, MSG_MAC_Station_0058) - EVT_CASE_EQ(8) - EVT_SET(LVar0, MSG_MAC_Station_0057) - EVT_CASE_EQ(0) - EVT_SET(LVar0, MSG_MAC_Station_0059) - EVT_CASE_EQ(1) - EVT_SET(LVar0, MSG_MAC_Station_005A) - EVT_CASE_EQ(2) - EVT_SET(LVar0, MSG_MAC_Station_005B) - EVT_CASE_EQ(3) - EVT_SET(LVar0, MSG_MAC_Station_005C) - EVT_CASE_EQ(4) - EVT_SET(LVar0, MSG_MAC_Station_005D) - EVT_CASE_EQ(5) - EVT_SET(LVar0, MSG_MAC_Station_005E) - EVT_CASE_EQ(6) - EVT_SET(LVar0, MSG_MAC_Station_005F) - EVT_CASE_EQ(7) - EVT_SET(LVar0, MSG_MAC_Station_0060) - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 16, LVar0) - EVT_RETURN - EVT_END + IfEq(GB_MAC03_LilOinkCount, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MAC_Station_0053) + Call(ShowChoice, MSG_Choice_000D) + IfEq(LVar0, 0) + Set(LVar0, MSG_MAC_Station_0056) + Else + Set(LVar0, MSG_MAC_Station_0055) + EndIf + Call(ContinueSpeech, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVar0) + Wait(10) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Set(MF_Unk_08, TRUE) + Return + EndIf + IfEq(MF_Unk_07, FALSE) + Set(LVar0, MSG_MAC_Station_0054) + Else + Call(N(GetOinkCount)) + Switch(LVar0) + CaseEq(9) + Set(LVar0, MSG_MAC_Station_0058) + CaseEq(8) + Set(LVar0, MSG_MAC_Station_0057) + CaseEq(0) + Set(LVar0, MSG_MAC_Station_0059) + CaseEq(1) + Set(LVar0, MSG_MAC_Station_005A) + CaseEq(2) + Set(LVar0, MSG_MAC_Station_005B) + CaseEq(3) + Set(LVar0, MSG_MAC_Station_005C) + CaseEq(4) + Set(LVar0, MSG_MAC_Station_005D) + CaseEq(5) + Set(LVar0, MSG_MAC_Station_005E) + CaseEq(6) + Set(LVar0, MSG_MAC_Station_005F) + CaseEq(7) + Set(LVar0, MSG_MAC_Station_0060) + EndSwitch + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 16, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_Toad_03) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_03))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_03))) + Return + End }; EvtScript N(D_8024A7F4_83BFF4) = { - EVT_LOOP(0) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SEQ_SHY_GUY_STEP, SOUND_SPACE_DEFAULT) - EVT_WAIT(2) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SEQ_SHY_GUY_STEP, SOUND_SPACE_DEFAULT) + Wait(2) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_ShyGuy) = { - EVT_CALL(SetNpcPos, NPC_SELF, -100, 0, -25) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_LOOP(0) - EVT_CALL(NpcMoveTo, NPC_SELF, -250, -25, 30) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 1) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, -250, 0, 30, 15) - EVT_CALL(NpcMoveTo, NPC_SELF, -100, 30, 30) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 1) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, -100, 0, -25, 15) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, -100, 0, -25) + Call(InterpNpcYaw, NPC_SELF, 270, 1) + Call(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03) + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Loop(0) + Call(NpcMoveTo, NPC_SELF, -250, -25, 30) + Call(InterpNpcYaw, NPC_SELF, 90, 1) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, -250, 0, 30, 15) + Call(NpcMoveTo, NPC_SELF, -100, 30, 30) + Call(InterpNpcYaw, NPC_SELF, 270, 1) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, -100, 0, -25, 15) + EndLoop + Return + End }; EvtScript N(EVS_NpcAI_ShyGuy) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim0C) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 10) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(8.0)) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 1) - EVT_EXEC_GET_TID(N(D_8024A7F4_83BFF4), LVarA) - EVT_CALL(NpcMoveTo, NPC_SELF, -100, 0, 0) - EVT_KILL_THREAD(LVarA) - EVT_CALL(ShowSweat, NPC_SELF, 1, 45, EMOTER_NPC, 0, 0, 0, 0, 20) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, -30, 0, 0, 20) - EVT_CALL(ShowSweat, NPC_SELF, 1, 45, EMOTER_NPC, 0, 0, 0, 0, 20) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SHY_GUY_RUN_AWAY, SOUND_SPACE_DEFAULT) - EVT_EXEC_GET_TID(N(D_8024A7F4_83BFF4), LVarA) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(8.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, 30, -200, 0) - EVT_CALL(ShowSweat, NPC_SELF, 1, -45, EMOTER_NPC, 0, 0, 0, 0, 20) - EVT_CALL(NpcMoveTo, NPC_SELF, -30, -400, 0) - EVT_CALL(ShowSweat, NPC_SELF, 1, 45, EMOTER_NPC, 0, 0, 0, 0, 20) - EVT_CALL(NpcMoveTo, NPC_SELF, 30, -600, 0) - EVT_CALL(ShowSweat, NPC_SELF, 1, -45, EMOTER_NPC, 0, 0, 0, 0, 20) - EVT_CALL(NpcMoveTo, NPC_SELF, 0, -650, 0) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_WAIT(200) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim0C) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 10) + Call(SetNpcSpeed, NPC_SELF, Float(8.0)) + Call(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03) + Call(InterpNpcYaw, NPC_SELF, 90, 1) + ExecGetTID(N(D_8024A7F4_83BFF4), LVarA) + Call(NpcMoveTo, NPC_SELF, -100, 0, 0) + KillThread(LVarA) + Call(ShowSweat, NPC_SELF, 1, 45, EMOTER_NPC, 0, 0, 0, 0, 20) + Call(DisablePlayerInput, FALSE) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, -30, 0, 0, 20) + Call(ShowSweat, NPC_SELF, 1, 45, EMOTER_NPC, 0, 0, 0, 0, 20) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SHY_GUY_RUN_AWAY, SOUND_SPACE_DEFAULT) + ExecGetTID(N(D_8024A7F4_83BFF4), LVarA) + Call(SetNpcSpeed, NPC_SELF, Float(8.0)) + Call(NpcMoveTo, NPC_SELF, 30, -200, 0) + Call(ShowSweat, NPC_SELF, 1, -45, EMOTER_NPC, 0, 0, 0, 0, 20) + Call(NpcMoveTo, NPC_SELF, -30, -400, 0) + Call(ShowSweat, NPC_SELF, 1, 45, EMOTER_NPC, 0, 0, 0, 0, 20) + Call(NpcMoveTo, NPC_SELF, 30, -600, 0) + Call(ShowSweat, NPC_SELF, 1, -45, EMOTER_NPC, 0, 0, 0, 0, 20) + Call(NpcMoveTo, NPC_SELF, 0, -650, 0) + KillThread(LVarA) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Wait(200) + Return + End }; EvtScript N(EVS_NpcHit_ShyGuy) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(LVar1, 1) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_SET(LVar1, 1) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_PARTNER) - EVT_SET(LVar1, 1) - EVT_CASE_DEFAULT - EVT_SET(LVar1, 0) - EVT_END_SWITCH - EVT_IF_EQ(LVar1, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SHY_GUY_OUCH, SOUND_SPACE_DEFAULT) - EVT_SET(GF_MAC03_ShyGuyChasedOff, TRUE) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_ShyGuy))) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_CANT_INTERACT | ENEMY_FLAG_IGNORE_PARTNER, 1) - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(LVar1, 1) + CaseEq(ENCOUNTER_TRIGGER_JUMP) + Set(LVar1, 1) + CaseEq(ENCOUNTER_TRIGGER_PARTNER) + Set(LVar1, 1) + CaseDefault + Set(LVar1, 0) + EndSwitch + IfEq(LVar1, 0) + Return + EndIf + Call(PlaySoundAtNpc, NPC_SELF, SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_DEFAULT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SHY_GUY_OUCH, SOUND_SPACE_DEFAULT) + Set(GF_MAC03_ShyGuyChasedOff, TRUE) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_ShyGuy))) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_CANT_INTERACT | ENEMY_FLAG_IGNORE_PARTNER, 1) + Return + End }; EvtScript N(EVS_NpcInit_ShyGuy) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, mac_03_ENTRY_1) - EVT_SET(GF_MAC03_ShyGuyBlockingTracks, TRUE) - EVT_SET(GF_MAC03_ShyGuyChasedOff, TRUE) - EVT_END_IF - EVT_IF_EQ(GF_MAC03_ShyGuyChasedOff, FALSE) - EVT_SET(GF_MAC03_ShyGuyBlockingTracks, TRUE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_ShyGuy))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_ShyGuy))) - EVT_RETURN - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseRange(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) + Call(GetEntryID, LVar0) + IfEq(LVar0, mac_03_ENTRY_1) + Set(GF_MAC03_ShyGuyBlockingTracks, TRUE) + Set(GF_MAC03_ShyGuyChasedOff, TRUE) + EndIf + IfEq(GF_MAC03_ShyGuyChasedOff, FALSE) + Set(GF_MAC03_ShyGuyBlockingTracks, TRUE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_ShyGuy))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_ShyGuy))) + Return + EndIf + EndSwitch + Call(RemoveNpc, NPC_SELF) + Return + End }; EvtScript N(EVS_NpcIdle_Toad_14) = { - EVT_LOOP(0) - EVT_SWITCH(GB_MAC03_LilOinkCapsuleState) - EVT_CASE_EQ(1) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(TranslateModel, MODEL_capsule, LVar0, LVar1, LVar2) - EVT_CASE_EQ(2) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcYaw, NPC_SELF, LVar3) - EVT_CALL(N(func_80241BD8_8333D8), 10, LVar0, LVar1, LVar2, LVar3) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Switch(GB_MAC03_LilOinkCapsuleState) + CaseEq(1) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(TranslateModel, MODEL_capsule, LVar0, LVar1, LVar2) + CaseEq(2) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(GetNpcYaw, NPC_SELF, LVar3) + Call(N(func_80241BD8_8333D8), 10, LVar0, LVar1, LVar2, LVar3) + EndSwitch + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcInit_Toad_14) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Toad_14))) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Toad_14))) + Return + End }; EvtScript N(EVS_NpcInit_Toad_04) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, 420, 20, -170) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) + Call(SetNpcPos, NPC_SELF, 420, 20, -170) + Return + End }; NpcData N(NpcData_Toads)[] = { diff --git a/src/world/area_mac/mac_03/mac_03_5_entity.c b/src/world/area_mac/mac_03/mac_03_5_entity.c index 49554867f28..eb2939e7c6f 100644 --- a/src/world/area_mac/mac_03/mac_03_5_entity.c +++ b/src/world/area_mac/mac_03/mac_03_5_entity.c @@ -2,40 +2,40 @@ #include "entity.h" EvtScript N(EVS_OnBlast_RailRock) = { - EVT_SET(GF_MAC03_BombedRock, TRUE) - EVT_RETURN - EVT_END + Set(GF_MAC03_BombedRock, TRUE) + Return + End }; EvtScript N(EVS_ReadSign_LilOInks) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0175, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_0175, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_OnInspect_StreetSign) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0172, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_0172, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(GetDemoState, LVar0) - EVT_IF_EQ(LVar0, DEMO_STATE_NONE) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BombableRock), -200, 0, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBlast_RailRock))) - EVT_END_IF - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 525, 0, 175, 0, MODEL_o11, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_MAC03_HiddenPanel) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Signpost), 185, 20, -350, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_ReadSign_LilOInks))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnInspect_StreetSign)), TRIGGER_WALL_PRESS_A, COLLIDER_sign, 1, 0) - EVT_RETURN - EVT_END + Call(GetDemoState, LVar0) + IfEq(LVar0, DEMO_STATE_NONE) + IfEq(GF_MAC03_BombedRock, FALSE) + Call(MakeEntity, Ref(Entity_BombableRock), -200, 0, 0, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnBlast_RailRock))) + EndIf + EndIf + Call(MakeEntity, Ref(Entity_HiddenPanel), 525, 0, 175, 0, MODEL_o11, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_MAC03_HiddenPanel) + Call(MakeEntity, Ref(Entity_Signpost), 185, 20, -350, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_ReadSign_LilOInks))) + BindTrigger(Ref(N(EVS_OnInspect_StreetSign)), TRIGGER_WALL_PRESS_A, COLLIDER_sign, 1, 0) + Return + End }; diff --git a/src/world/area_mac/mac_03/mac_03_6_foliage.c b/src/world/area_mac/mac_03/mac_03_6_foliage.c index a48d7853be9..ef940a2f8ff 100644 --- a/src/world/area_mac/mac_03/mac_03_6_foliage.c +++ b/src/world/area_mac/mac_03/mac_03_6_foliage.c @@ -3,42 +3,42 @@ #include "common/foliage.inc.c" EvtScript N(EVS_OnShakeTree3) = { - EVT_IF_EQ(GF_MAC03_UnlockedPlayroom, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(GF_MAC03_UnlockedPlayroom, TRUE) - EVT_WAIT(10) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -128, 20, -555) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -128, 20, -555) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(330.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 3) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(5) - EVT_CALL(PlaySoundWithVolume, SOUND_GROW, 0) - EVT_CALL(EnableModel, MODEL_o241, TRUE) - EVT_SET(LVar0, -30) - EVT_LOOP(30) - EVT_ADD(LVar0, 1) - EVT_CALL(TranslateModel, MODEL_o241, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(TranslateModel, MODEL_o241, 0, 0, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_dokan, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilim, COLLIDER_FLAGS_UPPER_MASK) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + IfEq(GF_MAC03_UnlockedPlayroom, TRUE) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Set(GF_MAC03_UnlockedPlayroom, TRUE) + Wait(10) + Call(UseSettingsFrom, CAM_DEFAULT, -128, 20, -555) + Call(SetPanTarget, CAM_DEFAULT, -128, 20, -555) + Call(SetCamDistance, CAM_DEFAULT, Float(330.0)) + Call(SetCamSpeed, CAM_DEFAULT, 3) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(5) + Call(PlaySoundWithVolume, SOUND_GROW, 0) + Call(EnableModel, MODEL_o241, TRUE) + Set(LVar0, -30) + Loop(30) + Add(LVar0, 1) + Call(TranslateModel, MODEL_o241, 0, LVar0, 0) + Wait(1) + EndLoop + Call(TranslateModel, MODEL_o241, 0, 0, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_dokan, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilim, COLLIDER_FLAGS_UPPER_MASK) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; FoliageModelList N(Tree1_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o240); @@ -110,15 +110,15 @@ BombTrigger N(BombPos_Tree3) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o212, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o211, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_mgm_tree, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree3)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o212, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o211, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree3))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_mgm_tree, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree3)), 1, 0) + Return + End }; diff --git a/src/world/area_mac/mac_03/mac_03_7_oinks.c b/src/world/area_mac/mac_03/mac_03_7_oinks.c index 9f2833f2b14..e593dc9d661 100644 --- a/src/world/area_mac/mac_03/mac_03_7_oinks.c +++ b/src/world/area_mac/mac_03/mac_03_7_oinks.c @@ -154,191 +154,191 @@ API_CALLABLE(N(PopLilOinkList)) { } EvtScript N(EVS_TurnCrank) = { - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_EQ(LVar0, PARTNER_LAKILESTER) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar0, 0) - EVT_LOOP(3) - EVT_CALL(RotateModel, MODEL_handle1, 3, -1, 0, 0) - EVT_WAIT(1) - EVT_CALL(RotateModel, MODEL_handle1, -3, -1, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(MF_Unk_06, FALSE) - EVT_RETURN - EVT_END_IF - EVT_IF_NE(GB_MAC03_LilOinkCapsuleState, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(GetPlayerCoins)) - EVT_IF_LT(LVar0, LIL_OINK_COIN_COST) - EVT_CALL(PlaySound, SOUND_MENU_ERROR) - EVT_RETURN - EVT_END_IF - EVT_CALL(PlaySound, SOUND_FLOOR_SWITCH_ACTIVATE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(AddCoin, -LIL_OINK_COIN_COST) - EVT_WAIT(20) - EVT_CALL(N(DismissCoinCounter)) - EVT_SET(MF_Unk_06, FALSE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 138, 25, -406) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 138, 25, -406) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 15, -13) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(PlaySoundAt, SOUND_TURN_MECHANISM, SOUND_SPACE_DEFAULT, 111, 89, -358) - EVT_SET(LVar0, 0) - EVT_LOOP(5) - EVT_ADD(LVar0, 6) - EVT_CALL(RotateModel, MODEL_handle1, LVar0, 0, 0, -1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(30) - EVT_ADD(LVar0, 10) - EVT_CALL(RotateModel, MODEL_handle1, LVar0, 0, 0, -1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(5) - EVT_ADD(LVar0, 6) - EVT_CALL(RotateModel, MODEL_handle1, LVar0, 0, 0, -1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_SETF(LVar0, EVT_FLOAT(1.0)) - EVT_LOOP(20) - EVT_ADDF(LVar0, EVT_FLOAT(0.2)) - EVT_CALL(ScaleModel, MODEL_boo, LVar0, LVar0, LVar0) - EVT_WAIT(1) - EVT_SUBF(LVar0, EVT_FLOAT(0.2)) - EVT_CALL(ScaleModel, MODEL_boo, LVar0, LVar0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SETF(LVar0, EVT_FLOAT(1.0)) - EVT_LOOP(10) - EVT_SUBF(LVar0, EVT_FLOAT(0.04)) - EVT_CALL(ScaleModel, MODEL_boo, 1, LVar0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(20) - EVT_LOOP(10) - EVT_ADDF(LVar0, EVT_FLOAT(0.08)) - EVT_CALL(ScaleModel, MODEL_boo, 1, LVar0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAt, SOUND_CAPSULE_OPEN, SOUND_SPACE_DEFAULT, 134, 132, -399) - EVT_LOOP(5) - EVT_SUBF(LVar0, EVT_FLOAT(0.08)) - EVT_CALL(ScaleModel, MODEL_boo, 1, LVar0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAt, SOUND_EAT_OR_DRINK, SOUND_SPACE_DEFAULT, 170, 73, -450) - EVT_SET(GB_MAC03_LilOinkCapsuleState, 1) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 230, 20, -270) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 15, -6) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(EnableModel, MODEL_capsule, TRUE) - EVT_CALL(MakeLerp, 0, 900, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, LVar0) - EVT_DIVF(LVar2, 10) - EVT_CALL(N(GetRollingCapsulePosition)) - EVT_CALL(SetNpcPos, NPC_Capsule, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LOOP(10) - EVT_ADD(LVar4, 5) - EVT_CALL(SetNpcPos, NPC_Capsule, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcJumpscale, NPC_Capsule, 1) - EVT_CALL(NpcJump0, NPC_Capsule, LVar2, EVT_FLOAT(63.0), -273, 5) - EVT_CALL(PlaySoundAtNpc, NPC_Capsule, SOUND_EAT_OR_DRINK, SOUND_SPACE_DEFAULT) - EVT_CALL(GetNpcPos, NPC_Capsule, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Capsule, LVar0, LVar1, LVar2, 10) - EVT_CALL(PlaySoundAtNpc, NPC_Capsule, SOUND_EAT_OR_DRINK, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Capsule, LVar0, LVar1, LVar2, 5) - EVT_CALL(PlaySoundAtNpc, NPC_Capsule, SOUND_EAT_OR_DRINK, SOUND_SPACE_DEFAULT) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_capsule, COLLIDER_FLAGS_UPPER_MASK) - EVT_WAIT(10) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END + Call(GetPartnerInUse, LVar0) + IfEq(LVar0, PARTNER_LAKILESTER) + Return + EndIf + Set(LVar0, 0) + Loop(3) + Call(RotateModel, MODEL_handle1, 3, -1, 0, 0) + Wait(1) + Call(RotateModel, MODEL_handle1, -3, -1, 0, 0) + Wait(1) + EndLoop + IfEq(MF_Unk_06, FALSE) + Return + EndIf + IfNe(GB_MAC03_LilOinkCapsuleState, 0) + Return + EndIf + Call(N(GetPlayerCoins)) + IfLt(LVar0, LIL_OINK_COIN_COST) + Call(PlaySound, SOUND_MENU_ERROR) + Return + EndIf + Call(PlaySound, SOUND_FLOOR_SWITCH_ACTIVATE) + Call(DisablePlayerInput, TRUE) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(AddCoin, -LIL_OINK_COIN_COST) + Wait(20) + Call(N(DismissCoinCounter)) + Set(MF_Unk_06, FALSE) + Call(UseSettingsFrom, CAM_DEFAULT, 138, 25, -406) + Call(SetPanTarget, CAM_DEFAULT, 138, 25, -406) + Call(SetCamPitch, CAM_DEFAULT, 15, -13) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10) + Thread + Call(PlaySoundAt, SOUND_TURN_MECHANISM, SOUND_SPACE_DEFAULT, 111, 89, -358) + Set(LVar0, 0) + Loop(5) + Add(LVar0, 6) + Call(RotateModel, MODEL_handle1, LVar0, 0, 0, -1) + Wait(1) + EndLoop + Loop(30) + Add(LVar0, 10) + Call(RotateModel, MODEL_handle1, LVar0, 0, 0, -1) + Wait(1) + EndLoop + Loop(5) + Add(LVar0, 6) + Call(RotateModel, MODEL_handle1, LVar0, 0, 0, -1) + Wait(1) + EndLoop + EndThread + SetF(LVar0, Float(1.0)) + Loop(20) + AddF(LVar0, Float(0.2)) + Call(ScaleModel, MODEL_boo, LVar0, LVar0, LVar0) + Wait(1) + SubF(LVar0, Float(0.2)) + Call(ScaleModel, MODEL_boo, LVar0, LVar0, LVar0) + Wait(1) + EndLoop + SetF(LVar0, Float(1.0)) + Loop(10) + SubF(LVar0, Float(0.04)) + Call(ScaleModel, MODEL_boo, 1, LVar0, 1) + Wait(1) + EndLoop + Wait(20) + Loop(10) + AddF(LVar0, Float(0.08)) + Call(ScaleModel, MODEL_boo, 1, LVar0, 1) + Wait(1) + EndLoop + Call(PlaySoundAt, SOUND_CAPSULE_OPEN, SOUND_SPACE_DEFAULT, 134, 132, -399) + Loop(5) + SubF(LVar0, Float(0.08)) + Call(ScaleModel, MODEL_boo, 1, LVar0, 1) + Wait(1) + EndLoop + Call(PlaySoundAt, SOUND_EAT_OR_DRINK, SOUND_SPACE_DEFAULT, 170, 73, -450) + Set(GB_MAC03_LilOinkCapsuleState, 1) + Call(SetPanTarget, CAM_DEFAULT, 230, 20, -270) + Call(SetCamPitch, CAM_DEFAULT, 15, -6) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(EnableModel, MODEL_capsule, TRUE) + Call(MakeLerp, 0, 900, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, LVar0) + DivF(LVar2, 10) + Call(N(GetRollingCapsulePosition)) + Call(SetNpcPos, NPC_Capsule, LVar2, LVar3, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Loop(10) + Add(LVar4, 5) + Call(SetNpcPos, NPC_Capsule, LVar2, LVar3, LVar4) + Wait(1) + EndLoop + Call(SetNpcJumpscale, NPC_Capsule, 1) + Call(NpcJump0, NPC_Capsule, LVar2, Float(63.0), -273, 5) + Call(PlaySoundAtNpc, NPC_Capsule, SOUND_EAT_OR_DRINK, SOUND_SPACE_DEFAULT) + Call(GetNpcPos, NPC_Capsule, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Capsule, LVar0, LVar1, LVar2, 10) + Call(PlaySoundAtNpc, NPC_Capsule, SOUND_EAT_OR_DRINK, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Capsule, LVar0, LVar1, LVar2, 5) + Call(PlaySoundAtNpc, NPC_Capsule, SOUND_EAT_OR_DRINK, SOUND_SPACE_DEFAULT) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_capsule, COLLIDER_FLAGS_UPPER_MASK) + Wait(10) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + End }; EvtScript N(EVS_LilOinkExplanation) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetNpcSpeed, NPC_Toad_03, EVT_FLOAT(4.0)) - EVT_CALL(SetNpcAnimation, NPC_Toad_03, ANIM_Toad_Red_Run) - EVT_CALL(NpcMoveTo, NPC_Toad_03, 157, -310, 0) - EVT_CALL(SetNpcAnimation, NPC_Toad_03, ANIM_Toad_Red_Idle) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Toad_03, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MAC_Station_0053) - EVT_CALL(ShowChoice, MSG_Choice_000D) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LVar0, MSG_MAC_Station_0056) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Station_0055) - EVT_END_IF - EVT_CALL(ContinueSpeech, NPC_Toad_03, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVar0) - EVT_WAIT(10) - EVT_SET(MF_Unk_08, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Toad_03, ANIM_Toad_Red_Run) - EVT_CALL(NpcMoveTo, NPC_Toad_03, 220, -160, 0) - EVT_CALL(SetNpcAnimation, NPC_Toad_03, ANIM_Toad_Red_Idle) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetNpcSpeed, NPC_Toad_03, Float(4.0)) + Call(SetNpcAnimation, NPC_Toad_03, ANIM_Toad_Red_Run) + Call(NpcMoveTo, NPC_Toad_03, 157, -310, 0) + Call(SetNpcAnimation, NPC_Toad_03, ANIM_Toad_Red_Idle) + Wait(10) + Call(SpeakToPlayer, NPC_Toad_03, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MAC_Station_0053) + Call(ShowChoice, MSG_Choice_000D) + IfEq(LVar0, 0) + Set(LVar0, MSG_MAC_Station_0056) + Else + Set(LVar0, MSG_MAC_Station_0055) + EndIf + Call(ContinueSpeech, NPC_Toad_03, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVar0) + Wait(10) + Set(MF_Unk_08, TRUE) + Call(SetNpcAnimation, NPC_Toad_03, ANIM_Toad_Red_Run) + Call(NpcMoveTo, NPC_Toad_03, 220, -160, 0) + Call(SetNpcAnimation, NPC_Toad_03, ANIM_Toad_Red_Idle) + Return + End }; EvtScript N(EVS_UseMachinePrompt) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_EQ(MF_Unk_08, FALSE) - EVT_EXEC(N(EVS_LilOinkExplanation)) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(InterruptUsePartner) - EVT_WAIT(10) - EVT_END_IF - EVT_CALL(PlayerMoveTo, 95, -365, 10) - EVT_END_IF - EVT_LOOP(0) - EVT_IF_NE(MF_Unk_08, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(ShowCoinCounter, TRUE) - EVT_SET(MF_Unk_06, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(N(GetFloorCollider), LVar0) - EVT_IF_EQ(LVar0, COLLIDER_step) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(N(DismissCoinCounter)) - EVT_SET(MF_Unk_06, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + IfEq(MF_Unk_08, FALSE) + Exec(N(EVS_LilOinkExplanation)) + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, PARTNER_NONE) + Call(InterruptUsePartner) + Wait(10) + EndIf + Call(PlayerMoveTo, 95, -365, 10) + EndIf + Loop(0) + IfNe(MF_Unk_08, FALSE) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(ShowCoinCounter, TRUE) + Set(MF_Unk_06, TRUE) + Call(DisablePlayerInput, FALSE) + Label(0) + Wait(1) + Call(N(GetFloorCollider), LVar0) + IfEq(LVar0, COLLIDER_step) + Goto(0) + EndIf + IfEq(LVar0, -1) + Goto(0) + EndIf + Call(N(DismissCoinCounter)) + Set(MF_Unk_06, FALSE) + Return + End }; LilOinkReward N(LilOinkPrizes)[] = { @@ -369,303 +369,303 @@ API_CALLABLE(N(GetLilOinkPrize)) { } EvtScript N(EVS_SpawnLilOinkPrize) = { - EVT_CALL(N(GetLilOinkPrize), LVar4, LVar5, LVar6) - EVT_CALL(RandInt, 100, LVar7) - EVT_IF_GT(LVar7, LVar6) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetNpcPos, NPC_LilOink_01, LVar1, LVar2, LVar3) - EVT_LOOP(LVar5) - EVT_CALL(MakeItemEntity, LVar4, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(N(GetLilOinkPrize), LVar4, LVar5, LVar6) + Call(RandInt, 100, LVar7) + IfGt(LVar7, LVar6) + Return + EndIf + Call(GetNpcPos, NPC_LilOink_01, LVar1, LVar2, LVar3) + Loop(LVar5) + Call(MakeItemEntity, LVar4, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_OpenCapsule) = { - EVT_CALL(N(GetFloorCollider), LVar0) - EVT_IF_NE(LVar0, COLLIDER_hummer) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_SET(MF_Unk_07, TRUE) - EVT_SETF(LVar0, EVT_FLOAT(1.0)) - EVT_LOOP(5) - EVT_SUBF(LVar0, EVT_FLOAT(0.03)) - EVT_CALL(ScaleModel, MODEL_capsule, 1, LVar0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(5) - EVT_ADDF(LVar0, EVT_FLOAT(0.03)) - EVT_CALL(ScaleModel, MODEL_capsule, 1, LVar0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetNpcPos, NPC_Capsule, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 10) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 1, 1, 1, 1) - EVT_CALL(EnableModel, MODEL_capsule, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_capsule, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GB_MAC03_LilOinkCapsuleState, 2) - EVT_CALL(SetNpcPos, NPC_Capsule, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcYaw, NPC_Capsule, 90) - EVT_CALL(EnableNpcShadow, NPC_Capsule, TRUE) - EVT_CALL(RandInt, 100, LVar3) - EVT_SWITCH(LVar3) - EVT_CASE_LT(3) - EVT_SET(LVar3, LIL_OINK_TYPE_GOLD) - EVT_CASE_LT(12) - EVT_SET(LVar3, LIL_OINK_TYPE_SILVER) - EVT_CASE_LT(19) - EVT_SET(LVar3, LIL_OINK_TYPE_SHROOM) - EVT_CASE_LT(26) - EVT_SET(LVar3, LIL_OINK_TYPE_FLOWER) - EVT_CASE_LT(33) - EVT_SET(LVar3, LIL_OINK_TYPE_STAR) - EVT_CASE_LT(40) - EVT_SET(LVar3, LIL_OINK_TYPE_QUESTION) - EVT_CASE_LT(55) - EVT_SET(LVar3, LIL_OINK_TYPE_BLACK) - EVT_CASE_LT(70) - EVT_SET(LVar3, LIL_OINK_TYPE_WHITE) - EVT_CASE_LT(85) - EVT_SET(LVar3, LIL_OINK_TYPE_PINK) - EVT_CASE_DEFAULT - EVT_SET(LVar3, LIL_OINK_TYPE_PIKACHU) - EVT_END_SWITCH - EVT_CALL(PlaySoundAtNpc, NPC_Capsule, SOUND_TORNADO_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(N(CreateLilOink), 10, LVar3, LVar0, LVar1, LVar2, 90) - EVT_WAIT(10) - EVT_IF_GE(GB_MAC03_LilOinkCount, 10) - EVT_SET(LVarA, LVar3) - EVT_CALL(GetNpcPos, NPC_LilOink_01, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(10) - EVT_CALL(EnableNpcAI, NPC_LilOink_01, FALSE) - EVT_CALL(NpcFaceNpc, NPC_LilOink_01, NPC_Capsule, 0) - EVT_WAIT(10) - EVT_CALL(NpcJump0, NPC_LilOink_01, LVar0, LVar1, LVar2, 15) - EVT_EXEC(N(EVS_SpawnLilOinkPrize)) - EVT_CALL(PlaySoundAtNpc, NPC_LilOink_01, SOUND_PLAYER_RUN_AWAY, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcSpeed, NPC_LilOink_01, 4) - EVT_CALL(NpcMoveTo, NPC_LilOink_01, 580, -170, 0) - EVT_CALL(NpcJump0, NPC_LilOink_01, 620, 20, -170, 15) - EVT_CALL(EnableNpcShadow, NPC_LilOink_01, FALSE) - EVT_CALL(SetNpcSpeed, NPC_LilOink_01, 1) - EVT_CALL(EnableNpcAI, NPC_LilOink_01, TRUE) - EVT_CALL(N(PopLilOinkList)) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, NPC_LilOink_01) - EVT_SET(LVar6, GB_MAC03_LilOinkCount) - EVT_LOOP(LVar6) - EVT_CALL(N(GetLilOinkPosition), LVar0, LVar2, LVar3, LVar4, LVar5) - EVT_CALL(SetNpcPos, LVar1, LVar2, LVar3, LVar4) - EVT_CALL(SetNpcYaw, LVar1, LVar5) - EVT_ADD(LVar0, 1) - EVT_ADD(LVar1, 1) - EVT_END_LOOP - EVT_SET(LVar3, LVarA) - EVT_END_IF - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 360, 20, -165) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 360, 20, -165) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 3) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(N(SetLilOinkAnim), 10, LIL_OINK_ANIM_2) - EVT_CALL(SetNpcJumpscale, NPC_Capsule, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_Capsule, 330, 20, -220, 20) - EVT_CALL(SetNpcSpeed, NPC_Capsule, EVT_FLOAT(4.0)) - EVT_CALL(NpcMoveTo, NPC_Capsule, 360, -180, 0) - EVT_SET(GB_MAC03_LilOinkCapsuleState, 0) - EVT_CALL(EnableNpcShadow, NPC_Capsule, FALSE) - EVT_CALL(N(GetLilOinkPosition), 10, LVar0, LVar1, LVar2, LVar4) - EVT_CALL(N(HideLilOink), 10) - EVT_SET(LVar5, NPC_LilOink_01) - EVT_ADD(LVar5, GB_MAC03_LilOinkCount) - EVT_CALL(SetNpcPos, LVar5, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcYaw, LVar5, LVar4) - EVT_CALL(EnableNpcShadow, LVar5, TRUE) - EVT_CALL(N(CreateLilOink), GB_MAC03_LilOinkCount, LVar3, LVar0, LVar1, LVar2, LVar4) - EVT_ADD(GB_MAC03_LilOinkCount, 1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END + Call(N(GetFloorCollider), LVar0) + IfNe(LVar0, COLLIDER_hummer) + Return + EndIf + Call(DisablePlayerInput, TRUE) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Set(MF_Unk_07, TRUE) + SetF(LVar0, Float(1.0)) + Loop(5) + SubF(LVar0, Float(0.03)) + Call(ScaleModel, MODEL_capsule, 1, LVar0, 1) + Wait(1) + EndLoop + Loop(5) + AddF(LVar0, Float(0.03)) + Call(ScaleModel, MODEL_capsule, 1, LVar0, 1) + Wait(1) + EndLoop + Call(GetNpcPos, NPC_Capsule, LVar0, LVar1, LVar2) + Sub(LVar1, 10) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 1, 1, 1, 1) + Call(EnableModel, MODEL_capsule, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_capsule, COLLIDER_FLAGS_UPPER_MASK) + Set(GB_MAC03_LilOinkCapsuleState, 2) + Call(SetNpcPos, NPC_Capsule, LVar0, LVar1, LVar2) + Call(SetNpcYaw, NPC_Capsule, 90) + Call(EnableNpcShadow, NPC_Capsule, TRUE) + Call(RandInt, 100, LVar3) + Switch(LVar3) + CaseLt(3) + Set(LVar3, LIL_OINK_TYPE_GOLD) + CaseLt(12) + Set(LVar3, LIL_OINK_TYPE_SILVER) + CaseLt(19) + Set(LVar3, LIL_OINK_TYPE_SHROOM) + CaseLt(26) + Set(LVar3, LIL_OINK_TYPE_FLOWER) + CaseLt(33) + Set(LVar3, LIL_OINK_TYPE_STAR) + CaseLt(40) + Set(LVar3, LIL_OINK_TYPE_QUESTION) + CaseLt(55) + Set(LVar3, LIL_OINK_TYPE_BLACK) + CaseLt(70) + Set(LVar3, LIL_OINK_TYPE_WHITE) + CaseLt(85) + Set(LVar3, LIL_OINK_TYPE_PINK) + CaseDefault + Set(LVar3, LIL_OINK_TYPE_PIKACHU) + EndSwitch + Call(PlaySoundAtNpc, NPC_Capsule, SOUND_TORNADO_JUMP, SOUND_SPACE_DEFAULT) + Call(N(CreateLilOink), 10, LVar3, LVar0, LVar1, LVar2, 90) + Wait(10) + IfGe(GB_MAC03_LilOinkCount, 10) + Set(LVarA, LVar3) + Call(GetNpcPos, NPC_LilOink_01, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(10) + Call(EnableNpcAI, NPC_LilOink_01, FALSE) + Call(NpcFaceNpc, NPC_LilOink_01, NPC_Capsule, 0) + Wait(10) + Call(NpcJump0, NPC_LilOink_01, LVar0, LVar1, LVar2, 15) + Exec(N(EVS_SpawnLilOinkPrize)) + Call(PlaySoundAtNpc, NPC_LilOink_01, SOUND_PLAYER_RUN_AWAY, SOUND_SPACE_DEFAULT) + Call(SetNpcSpeed, NPC_LilOink_01, 4) + Call(NpcMoveTo, NPC_LilOink_01, 580, -170, 0) + Call(NpcJump0, NPC_LilOink_01, 620, 20, -170, 15) + Call(EnableNpcShadow, NPC_LilOink_01, FALSE) + Call(SetNpcSpeed, NPC_LilOink_01, 1) + Call(EnableNpcAI, NPC_LilOink_01, TRUE) + Call(N(PopLilOinkList)) + Set(LVar0, 0) + Set(LVar1, NPC_LilOink_01) + Set(LVar6, GB_MAC03_LilOinkCount) + Loop(LVar6) + Call(N(GetLilOinkPosition), LVar0, LVar2, LVar3, LVar4, LVar5) + Call(SetNpcPos, LVar1, LVar2, LVar3, LVar4) + Call(SetNpcYaw, LVar1, LVar5) + Add(LVar0, 1) + Add(LVar1, 1) + EndLoop + Set(LVar3, LVarA) + EndIf + Call(UseSettingsFrom, CAM_DEFAULT, 360, 20, -165) + Call(SetPanTarget, CAM_DEFAULT, 360, 20, -165) + Call(SetCamSpeed, CAM_DEFAULT, 3) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10) + Call(N(SetLilOinkAnim), 10, LIL_OINK_ANIM_2) + Call(SetNpcJumpscale, NPC_Capsule, Float(1.0)) + Call(NpcJump0, NPC_Capsule, 330, 20, -220, 20) + Call(SetNpcSpeed, NPC_Capsule, Float(4.0)) + Call(NpcMoveTo, NPC_Capsule, 360, -180, 0) + Set(GB_MAC03_LilOinkCapsuleState, 0) + Call(EnableNpcShadow, NPC_Capsule, FALSE) + Call(N(GetLilOinkPosition), 10, LVar0, LVar1, LVar2, LVar4) + Call(N(HideLilOink), 10) + Set(LVar5, NPC_LilOink_01) + Add(LVar5, GB_MAC03_LilOinkCount) + Call(SetNpcPos, LVar5, LVar0, LVar1, LVar2) + Call(SetNpcYaw, LVar5, LVar4) + Call(EnableNpcShadow, LVar5, TRUE) + Call(N(CreateLilOink), GB_MAC03_LilOinkCount, LVar3, LVar0, LVar1, LVar2, LVar4) + Add(GB_MAC03_LilOinkCount, 1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + End }; EvtScript N(EVS_LilOinkFlee) = { - EVT_SET(LVar1, NPC_LilOink_01) - EVT_ADD(LVar1, LVar0) - EVT_CALL(EnableNpcAI, LVar1, FALSE) - EVT_CALL(NpcFacePlayer, LVar1, 0) - EVT_WAIT(10) - EVT_CALL(GetNpcPos, LVar1, LVar2, LVar3, LVar4) - EVT_CALL(NpcJump0, LVar1, LVar2, LVar3, LVar4, 10) - EVT_CALL(PlaySoundAtNpc, LVar1, SOUND_PLAYER_RUN_AWAY, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcSpeed, LVar1, 8) - EVT_CALL(NpcMoveTo, LVar1, 580, LVar4, 0) - EVT_CALL(NpcJump0, LVar1, 620, 20, LVar4, 15) - EVT_CALL(EnableNpcShadow, LVar1, FALSE) - EVT_CALL(SetNpcSpeed, LVar1, 1) - EVT_CALL(EnableNpcAI, LVar1, TRUE) - EVT_CALL(N(HideLilOink), LVar0) - EVT_SUB(GB_MAC03_LilOinkCount, 1) - EVT_RETURN - EVT_END + Set(LVar1, NPC_LilOink_01) + Add(LVar1, LVar0) + Call(EnableNpcAI, LVar1, FALSE) + Call(NpcFacePlayer, LVar1, 0) + Wait(10) + Call(GetNpcPos, LVar1, LVar2, LVar3, LVar4) + Call(NpcJump0, LVar1, LVar2, LVar3, LVar4, 10) + Call(PlaySoundAtNpc, LVar1, SOUND_PLAYER_RUN_AWAY, SOUND_SPACE_DEFAULT) + Call(SetNpcSpeed, LVar1, 8) + Call(NpcMoveTo, LVar1, 580, LVar4, 0) + Call(NpcJump0, LVar1, 620, 20, LVar4, 15) + Call(EnableNpcShadow, LVar1, FALSE) + Call(SetNpcSpeed, LVar1, 1) + Call(EnableNpcAI, LVar1, TRUE) + Call(N(HideLilOink), LVar0) + Sub(GB_MAC03_LilOinkCount, 1) + Return + End }; EvtScript N(EVS_EnterPen) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(func_802D2C14, 1) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deili, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deili, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 80, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_door, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlayerMoveTo, 370, -208, 15) - EVT_CALL(MakeLerp, 80, 0, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_door, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_deili, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deili, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_CALL(func_802D2C14, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_IF_EQ(GB_MAC03_LilOinkCount, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_SET(LVar0, GB_MAC03_LilOinkCount) - EVT_SET(LVar6, GB_MAC03_LilOinkCount) - EVT_LOOP(LVar6) - EVT_ADD(LVar0, -1) - EVT_EXEC(N(EVS_LilOinkFlee)) - EVT_WAIT(5) - EVT_END_LOOP - EVT_LOOP(0) - EVT_IF_EQ(GB_MAC03_LilOinkCount, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(func_802D2C14, 1) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deili, COLLIDER_FLAGS_UPPER_MASK) + Call(PlaySoundAtCollider, COLLIDER_deili, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 80, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_door, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlayerMoveTo, 370, -208, 15) + Call(MakeLerp, 80, 0, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_door, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_deili, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deili, COLLIDER_FLAGS_UPPER_MASK) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Call(func_802D2C14, 0) + Call(DisablePlayerInput, FALSE) + IfEq(GB_MAC03_LilOinkCount, 0) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Set(LVar0, GB_MAC03_LilOinkCount) + Set(LVar6, GB_MAC03_LilOinkCount) + Loop(LVar6) + Add(LVar0, -1) + Exec(N(EVS_LilOinkFlee)) + Wait(5) + EndLoop + Loop(0) + IfEq(GB_MAC03_LilOinkCount, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_ExitPen) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(func_802D2C14, 1) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deiliu, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deiliu, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 80, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_door, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlayerMoveTo, 370, -328, 15) - EVT_CALL(MakeLerp, 80, 0, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_door, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_deiliu, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deiliu, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(func_802D2C14, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(DisablePlayerInput, TRUE) + Call(func_802D2C14, 1) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deiliu, COLLIDER_FLAGS_UPPER_MASK) + Call(PlaySoundAtCollider, COLLIDER_deiliu, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 80, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_door, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlayerMoveTo, 370, -328, 15) + Call(MakeLerp, 80, 0, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_door, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_deiliu, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deiliu, COLLIDER_FLAGS_UPPER_MASK) + Call(func_802D2C14, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SyncLilOinkNpcPositions) = { - EVT_LOOP(0) - EVT_IF_NE(GB_MAC03_LilOinkCount, 0) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, NPC_LilOink_01) - EVT_SET(LVar6, GB_MAC03_LilOinkCount) - EVT_LOOP(LVar6) - EVT_CALL(GetNpcPos, LVar1, LVar2, LVar3, LVar4) - EVT_CALL(GetNpcYaw, LVar1, LVar5) - EVT_CALL(N(SetLilOinkPosition), LVar0, LVar2, LVar3, LVar4, LVar5) - EVT_ADD(LVar0, 1) - EVT_ADD(LVar1, 1) - EVT_END_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + IfNe(GB_MAC03_LilOinkCount, 0) + Set(LVar0, 0) + Set(LVar1, NPC_LilOink_01) + Set(LVar6, GB_MAC03_LilOinkCount) + Loop(LVar6) + Call(GetNpcPos, LVar1, LVar2, LVar3, LVar4) + Call(GetNpcYaw, LVar1, LVar5) + Call(N(SetLilOinkPosition), LVar0, LVar2, LVar3, LVar4, LVar5) + Add(LVar0, 1) + Add(LVar1, 1) + EndLoop + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_InitializeLilOinks) = { - EVT_IF_EQ(GB_MAC03_LilOinkCapsuleState, 1) - EVT_CALL(SetNpcPos, NPC_Capsule, 277, EVT_FLOAT(63.0), -273) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_capsule, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_capsule, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_SET(MF_Unk_06, FALSE) - EVT_SET(MF_Unk_07, FALSE) - EVT_IF_EQ(GB_MAC03_LilOinkCount, 0) - EVT_SET(MF_Unk_08, FALSE) - EVT_ELSE - EVT_SET(MF_Unk_08, TRUE) - EVT_END_IF - EVT_CALL(N(LoadLilOinks)) - EVT_IF_NE(GB_MAC03_LilOinkCount, 0) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, NPC_LilOink_01) - EVT_SET(LVar6, GB_MAC03_LilOinkCount) - EVT_LOOP(LVar6) - EVT_CALL(N(GetLilOinkPosition), LVar0, LVar2, LVar3, LVar4, LVar5) - EVT_CALL(SetNpcPos, LVar1, LVar2, LVar3, LVar4) - EVT_CALL(SetNpcYaw, LVar1, LVar5) - EVT_ADD(LVar0, 1) - EVT_ADD(LVar1, 1) - EVT_END_LOOP - EVT_END_IF - EVT_EXEC(N(EVS_SyncLilOinkNpcPositions)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseMachinePrompt)), TRIGGER_FLOOR_TOUCH, COLLIDER_step, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_TurnCrank)), TRIGGER_CEILING_TOUCH, COLLIDER_jump, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OpenCapsule)), TRIGGER_WALL_HAMMER, COLLIDER_capsule, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_EnterPen)), TRIGGER_WALL_PRESS_A, COLLIDER_deili, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitPen)), TRIGGER_WALL_PRESS_A, COLLIDER_deiliu, 1, 0) - EVT_RETURN - EVT_END + IfEq(GB_MAC03_LilOinkCapsuleState, 1) + Call(SetNpcPos, NPC_Capsule, 277, Float(63.0), -273) + Else + Call(EnableModel, MODEL_capsule, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_capsule, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Set(MF_Unk_06, FALSE) + Set(MF_Unk_07, FALSE) + IfEq(GB_MAC03_LilOinkCount, 0) + Set(MF_Unk_08, FALSE) + Else + Set(MF_Unk_08, TRUE) + EndIf + Call(N(LoadLilOinks)) + IfNe(GB_MAC03_LilOinkCount, 0) + Set(LVar0, 0) + Set(LVar1, NPC_LilOink_01) + Set(LVar6, GB_MAC03_LilOinkCount) + Loop(LVar6) + Call(N(GetLilOinkPosition), LVar0, LVar2, LVar3, LVar4, LVar5) + Call(SetNpcPos, LVar1, LVar2, LVar3, LVar4) + Call(SetNpcYaw, LVar1, LVar5) + Add(LVar0, 1) + Add(LVar1, 1) + EndLoop + EndIf + Exec(N(EVS_SyncLilOinkNpcPositions)) + BindTrigger(Ref(N(EVS_UseMachinePrompt)), TRIGGER_FLOOR_TOUCH, COLLIDER_step, 1, 0) + BindTrigger(Ref(N(EVS_TurnCrank)), TRIGGER_CEILING_TOUCH, COLLIDER_jump, 1, 0) + BindTrigger(Ref(N(EVS_OpenCapsule)), TRIGGER_WALL_HAMMER, COLLIDER_capsule, 1, 0) + BindTrigger(Ref(N(EVS_EnterPen)), TRIGGER_WALL_PRESS_A, COLLIDER_deili, 1, 0) + BindTrigger(Ref(N(EVS_ExitPen)), TRIGGER_WALL_PRESS_A, COLLIDER_deiliu, 1, 0) + Return + End }; diff --git a/src/world/area_mac/mac_03/mac_03_8_demo.c b/src/world/area_mac/mac_03/mac_03_8_demo.c index 426e2e0eef8..347965ddf46 100644 --- a/src/world/area_mac/mac_03/mac_03_8_demo.c +++ b/src/world/area_mac/mac_03/mac_03_8_demo.c @@ -1,152 +1,152 @@ #include "mac_03.h" EvtScript N(EVS_DemoFollowTrainCamera) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_EQ(MF_TrainReverseDir, FALSE) - EVT_IF_GT(LVar0, 350) - EVT_SET(LVar0, 350) - EVT_END_IF - EVT_ADD(LVar0, 40) - EVT_SET(LVar1, 30) - EVT_ADD(LVar2, 40) - EVT_ELSE - EVT_IF_GT(LVar0, 350) - EVT_SET(LVar0, 350) - EVT_END_IF - EVT_ADD(LVar0, -40) - EVT_SET(LVar1, 30) - EVT_ADD(LVar2, 40) - EVT_END_IF - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfEq(MF_TrainReverseDir, FALSE) + IfGt(LVar0, 350) + Set(LVar0, 350) + EndIf + Add(LVar0, 40) + Set(LVar1, 30) + Add(LVar2, 40) + Else + IfGt(LVar0, 350) + Set(LVar0, 350) + EndIf + Add(LVar0, -40) + Set(LVar1, 30) + Add(LVar2, 40) + EndIf + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_DemoUpdatePassengerPos) = { - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar0, MV_TrainMoveDist) - EVT_IF_EQ(MF_TrainReverseDir, FALSE) - EVT_ADD(LVar0, -425) - EVT_ELSE - EVT_ADD(LVar0, -335) - EVT_END_IF - EVT_SET(LVar3, LVar0) - EVT_SET(LVar4, LVar1) - EVT_SET(LVar5, LVar2) - EVT_IF_EQ(MF_TrainReverseDir, FALSE) - EVT_ADD(LVar3, -57) - EVT_ELSE - EVT_ADD(LVar3, 57) - EVT_END_IF - EVT_ADD(LVar4, -31) - EVT_ADD(LVar5, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar3, LVar4, LVar5) - EVT_IF_EQ(MF_TrainReverseDir, FALSE) - EVT_ADD(LVar0, 0) - EVT_ELSE - EVT_ADD(LVar0, 0) - EVT_END_IF - EVT_ADD(LVar1, -6) - EVT_ADD(LVar2, -40) - EVT_CALL(SetNpcPos, NPC_TrainToad_02, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar0, MV_TrainMoveDist) + IfEq(MF_TrainReverseDir, FALSE) + Add(LVar0, -425) + Else + Add(LVar0, -335) + EndIf + Set(LVar3, LVar0) + Set(LVar4, LVar1) + Set(LVar5, LVar2) + IfEq(MF_TrainReverseDir, FALSE) + Add(LVar3, -57) + Else + Add(LVar3, 57) + EndIf + Add(LVar4, -31) + Add(LVar5, 0) + Call(SetNpcPos, NPC_PARTNER, LVar3, LVar4, LVar5) + IfEq(MF_TrainReverseDir, FALSE) + Add(LVar0, 0) + Else + Add(LVar0, 0) + EndIf + Add(LVar1, -6) + Add(LVar2, -40) + Call(SetNpcPos, NPC_TrainToad_02, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_DemoDepartForMtRugged) = { - EVT_CALL(EnableWorldStatusBar, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_SET(MV_TrainMoveDist, 0) - EVT_SET(MV_TrainMoveSpeed, 0) - EVT_SET(MF_TrainReverseDir, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitk, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kisya1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kisya2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kisya3, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_humikiri, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_fumikiri, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableNpcShadow, NPC_PARTNER, FALSE) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_CALL(SetPlayerPos, -425, 45, 20) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar0, -410) - EVT_SET(LVar1, 45) - EVT_SET(LVar2, 20) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(InterpPlayerYaw, 90, 1) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_SET(MF_TrainMoving, TRUE) - EVT_EXEC(N(EVS_DemoUpdatePassengerPos)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(240.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(-100.0), EVT_FLOAT(-50.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(-2.5), EVT_FLOAT(-3.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 100) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_LOOP(1000) - EVT_ADDF(MV_TrainMoveSpeed, EVT_FLOAT(0.031)) - EVT_IF_GT(MV_TrainMoveSpeed, 10) - EVT_SETF(MV_TrainMoveSpeed, EVT_FLOAT(10.0)) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(40) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_EXEC_GET_TID(N(EVS_DemoFollowTrainCamera), LVar9) - EVT_WAIT(180) - EVT_IF_EQ(GF_DemoSceneDone, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_DemoSceneDone, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("mac_03"), mac_03_ENTRY_2, TRANSITION_END_DEMO_SCENE_BLACK) - EVT_WAIT(110) - EVT_RETURN - EVT_END + Call(EnableWorldStatusBar, FALSE) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Set(MV_TrainMoveDist, 0) + Set(MV_TrainMoveSpeed, 0) + Set(MF_TrainReverseDir, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitk, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kisya1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kisya2, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kisya3, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_humikiri, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_fumikiri, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableNpcShadow, NPC_PARTNER, FALSE) + Call(HidePlayerShadow, TRUE) + Call(SetPlayerPos, -425, 45, 20) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar0, -410) + Set(LVar1, 45) + Set(LVar2, 20) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(InterpPlayerYaw, 90, 1) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + Set(MF_TrainMoving, TRUE) + Exec(N(EVS_DemoUpdatePassengerPos)) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(240.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(-100.0), Float(-50.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(-2.5), Float(-3.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 100) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Loop(1000) + AddF(MV_TrainMoveSpeed, Float(0.031)) + IfGt(MV_TrainMoveSpeed, 10) + SetF(MV_TrainMoveSpeed, Float(10.0)) + EndIf + Wait(1) + EndLoop + EndThread + Wait(40) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + ExecGetTID(N(EVS_DemoFollowTrainCamera), LVar9) + Wait(180) + IfEq(GF_DemoSceneDone, TRUE) + Return + EndIf + Set(GF_DemoSceneDone, TRUE) + Call(GotoMapSpecial, Ref("mac_03"), mac_03_ENTRY_2, TRANSITION_END_DEMO_SCENE_BLACK) + Wait(110) + Return + End }; EvtScript N(EVS_MonitorDemoState) = { - EVT_WAIT(10) - EVT_LOOP(0) - EVT_CALL(GetDemoState, LVar0) - EVT_IF_EQ(LVar0, DEMO_STATE_CHANGE_MAP) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(GF_DemoSceneDone, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_DemoSceneDone, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("mac_03"), mac_03_ENTRY_2, TRANSITION_END_DEMO_SCENE_WHITE) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Wait(10) + Loop(0) + Call(GetDemoState, LVar0) + IfEq(LVar0, DEMO_STATE_CHANGE_MAP) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(GF_DemoSceneDone, TRUE) + Return + EndIf + Set(GF_DemoSceneDone, TRUE) + Call(GotoMapSpecial, Ref("mac_03"), mac_03_ENTRY_2, TRANSITION_END_DEMO_SCENE_WHITE) + Wait(100) + Return + End }; EvtScript N(EVS_PlayDemoScene) = { - EVT_SET(GF_DemoSceneDone, FALSE) - EVT_EXEC(N(EVS_MonitorDemoState)) - EVT_EXEC(N(EVS_DemoDepartForMtRugged)) - EVT_RETURN - EVT_END + Set(GF_DemoSceneDone, FALSE) + Exec(N(EVS_MonitorDemoState)) + Exec(N(EVS_DemoDepartForMtRugged)) + Return + End }; diff --git a/src/world/area_mac/mac_04/mac_04_1_music.c b/src/world/area_mac/mac_04/mac_04_1_music.c index 5bfec59aa03..6fbb6aff104 100644 --- a/src/world/area_mac/mac_04/mac_04_1_music.c +++ b/src/world/area_mac/mac_04/mac_04_1_music.c @@ -1,19 +1,19 @@ #include "mac_04.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, mac_04_ENTRY_4) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_INVASION, 0, 8) - EVT_CASE_DEFAULT - EVT_EXEC(N(EVS_SetupMusicTriggers)) - EVT_END_SWITCH - EVT_THREAD - EVT_WAIT(60) - EVT_CALL(StopSound, SOUND_LOOP_JAN_BEACH_WAVES) - EVT_END_THREAD - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfNe(LVar0, mac_04_ENTRY_4) + Switch(GB_StoryProgress) + CaseRange(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) + Call(SetMusicTrack, 0, SONG_SHY_GUY_INVASION, 0, 8) + CaseDefault + Exec(N(EVS_SetupMusicTriggers)) + EndSwitch + Thread + Wait(60) + Call(StopSound, SOUND_LOOP_JAN_BEACH_WAVES) + EndThread + EndIf + Return + End }; diff --git a/src/world/area_mac/mac_04/mac_04_2_main.c b/src/world/area_mac/mac_04/mac_04_2_main.c index 9a22ed0fd64..451f970d07c 100644 --- a/src/world/area_mac/mac_04/mac_04_2_main.c +++ b/src/world/area_mac/mac_04/mac_04_2_main.c @@ -26,86 +26,86 @@ EvtScript N(EVS_ExitWalk_mac_05_0) = EVT_EXIT_WALK(60, mac_04_ENTRY_1, "mac_05", EvtScript N(EVS_ExitWalk_mac_02_0) = EVT_EXIT_WALK(60, mac_04_ENTRY_0, "mac_02", mac_02_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_mac_05_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_mac_02_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_mac_05_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_mac_02_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(mac_04_ENTRY_2) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_EXEC(N(EVS_ExitToybox)) - EVT_THREAD - EVT_WAIT(20) - EVT_SET(MF_MusicMixTrigger, TRUE) - EVT_END_THREAD - EVT_CASE_EQ(mac_04_ENTRY_3) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CALL(SetPlayerPos, -420, 20, -95) - EVT_CALL(SetNpcPos, NPC_PARTNER, -420, 20, -65) - EVT_THREAD - EVT_WAIT(20) - EVT_SET(MF_MusicMixTrigger, TRUE) - EVT_END_THREAD - EVT_CASE_EQ(mac_04_ENTRY_4) - EVT_CALL(N(SetNightTintMode)) - EVT_CALL(N(SetNightFogParams), 0, 0, 0, 0, 0, 0, 0, 950, 1000) - EVT_EXEC(N(EVS_Scene_WishingToadKid)) - EVT_CASE_EQ(mac_04_ENTRY_5) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_DEFAULT - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(mac_04_ENTRY_2) + Exec(N(EVS_BindExitTriggers)) + Exec(N(EVS_ExitToybox)) + Thread + Wait(20) + Set(MF_MusicMixTrigger, TRUE) + EndThread + CaseEq(mac_04_ENTRY_3) + Exec(N(EVS_BindExitTriggers)) + Call(SetPlayerPos, -420, 20, -95) + Call(SetNpcPos, NPC_PARTNER, -420, 20, -65) + Thread + Wait(20) + Set(MF_MusicMixTrigger, TRUE) + EndThread + CaseEq(mac_04_ENTRY_4) + Call(N(SetNightTintMode)) + Call(N(SetNightFogParams), 0, 0, 0, 0, 0, 0, 0, 950, 1000) + Exec(N(EVS_Scene_WishingToadKid)) + CaseEq(mac_04_ENTRY_5) + Exec(N(EVS_BindExitTriggers)) + CaseDefault + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, mac_04_ENTRY_4) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(WishSceneNPCs))) - EVT_ELSE - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_STAR_SPRIT_DEPARTED) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CASE_LT(STORY_CH4_BEGAN_PEACH_MISSION) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(Chapter4NPCs))) - EVT_CASE_EQ(STORY_CH4_BEGAN_PEACH_MISSION) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(PostChapter4NPCs))) - EVT_CASE_LT(STORY_CH5_RETURNED_TO_TOAD_TOWN) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CASE_LT(STORY_CH7_BEGAN_PEACH_MISSION) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(Chapter7NPCs))) - EVT_CASE_DEFAULT - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_END_SWITCH - EVT_END_IF - EVT_SET(AF_MAC_31, FALSE) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupRooms)) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_EXEC(N(EVS_SetupShop)) - EVT_EXEC_WAIT(N(EVS_Toybox_SetupTrainPrompt)) - EVT_IF_EQ(GB_StoryProgress, STORY_CH4_BEGAN_PEACH_MISSION) - EVT_CALL(SetMusicTrack, 0, SONG_STAR_SPIRIT_THEME, 1, 8) - EVT_ELSE - EVT_EXEC(N(EVS_SetupMusic)) - EVT_END_IF - EVT_EXEC(N(EVS_EnterMap)) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, mac_04_ENTRY_5) - EVT_WAIT(65) - EVT_ELSE - EVT_WAIT(1) - EVT_END_IF - EVT_SET(GF_MAC01_RowfBadgesChosen, FALSE) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TOAD_TOWN) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(GetEntryID, LVar0) + IfEq(LVar0, mac_04_ENTRY_4) + Call(MakeNpcs, FALSE, Ref(N(WishSceneNPCs))) + Else + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_STAR_SPRIT_DEPARTED) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + CaseLt(STORY_CH4_BEGAN_PEACH_MISSION) + Call(MakeNpcs, FALSE, Ref(N(Chapter4NPCs))) + CaseEq(STORY_CH4_BEGAN_PEACH_MISSION) + Call(MakeNpcs, FALSE, Ref(N(PostChapter4NPCs))) + CaseLt(STORY_CH5_RETURNED_TO_TOAD_TOWN) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + CaseLt(STORY_CH7_BEGAN_PEACH_MISSION) + Call(MakeNpcs, FALSE, Ref(N(Chapter7NPCs))) + CaseDefault + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + EndSwitch + EndIf + Set(AF_MAC_31, FALSE) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupRooms)) + Exec(N(EVS_SetupFoliage)) + Exec(N(EVS_SetupShop)) + ExecWait(N(EVS_Toybox_SetupTrainPrompt)) + IfEq(GB_StoryProgress, STORY_CH4_BEGAN_PEACH_MISSION) + Call(SetMusicTrack, 0, SONG_STAR_SPIRIT_THEME, 1, 8) + Else + Exec(N(EVS_SetupMusic)) + EndIf + Exec(N(EVS_EnterMap)) + Call(GetEntryID, LVar0) + IfEq(LVar0, mac_04_ENTRY_5) + Wait(65) + Else + Wait(1) + EndIf + Set(GF_MAC01_RowfBadgesChosen, FALSE) + Return + End }; diff --git a/src/world/area_mac/mac_04/mac_04_3_rooms.c b/src/world/area_mac/mac_04/mac_04_3_rooms.c index 76709e58d53..1a660e2eaf9 100644 --- a/src/world/area_mac/mac_04/mac_04_3_rooms.c +++ b/src/world/area_mac/mac_04/mac_04_3_rooms.c @@ -12,157 +12,157 @@ API_CALLABLE(N(InitEntryFromToybox)) { } EvtScript N(EVS_SetDoorRot_Shop) = { - EVT_CALL(RotateModel, MODEL_msdoor, LVar0, 0, -1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_msdoor, LVar0, 0, -1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_Shop) = { - EVT_SET(LVar1, LVar0) - EVT_CALL(RotateModel, MODEL_my1, LVar1, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_my2, LVar1, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_my3, LVar1, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_my4, LVar1, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_my5, LVar1, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_mk1, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_mk2, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_mk3, LVar1, 1, 0, 0) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + Call(RotateModel, MODEL_my1, LVar1, -1, 0, 0) + Call(RotateModel, MODEL_my2, LVar1, -1, 0, 0) + Call(RotateModel, MODEL_my3, LVar1, -1, 0, 0) + Call(RotateModel, MODEL_my4, LVar1, -1, 0, 0) + Call(RotateModel, MODEL_my5, LVar1, -1, 0, 0) + Call(RotateModel, MODEL_mk1, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_mk2, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_mk3, LVar1, 1, 0, 0) + Return + End }; EvtScript N(EVS_RoomListener_Shop) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_CALL(EnableGroup, MODEL_mise_in, TRUE) - EVT_EXEC(N(EVS_OnEnterShop)) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_CALL(EnableGroup, MODEL_mise_in, FALSE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Call(EnableGroup, MODEL_mise_in, TRUE) + Exec(N(EVS_OnEnterShop)) + CaseEq(ROOM_UPDATE_EXIT_END) + Call(EnableGroup, MODEL_mise_in, FALSE) + EndSwitch + Return + End }; EvtScript N(EVS_SetDoorRot_NiceHouse) = { - EVT_CALL(RotateModel, MODEL_rndoor, LVar0, 0, -1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_rndoor, LVar0, 0, -1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_NiceHouse) = { - EVT_SET(LVar1, LVar0) - EVT_CALL(RotateModel, MODEL_rnk1, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_rnk2, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_rnk3, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_rnk4, LVar1, 1, 0, 0) - EVT_SET(LVar1, LVar0) - EVT_CALL(RotateModel, MODEL_rnk5, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_rnk6, LVar1, 0, 1, 0) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + Call(RotateModel, MODEL_rnk1, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_rnk2, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_rnk3, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_rnk4, LVar1, 1, 0, 0) + Set(LVar1, LVar0) + Call(RotateModel, MODEL_rnk5, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_rnk6, LVar1, 0, 1, 0) + Return + End }; EvtScript N(EVS_DropDoor_NiceHouse) = { - EVT_CALL(RotateModel, MODEL_rndoor, LVar0, 1, 0, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_rndoor, LVar0, 1, 0, 0) + Return + End }; EvtScript N(EVS_RoomListener_NiceHouse) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_CALL(EnableGroup, MODEL_rin_in, TRUE) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_CALL(EnableGroup, MODEL_rin_in, FALSE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Call(EnableGroup, MODEL_rin_in, TRUE) + CaseEq(ROOM_UPDATE_EXIT_END) + Call(EnableGroup, MODEL_rin_in, FALSE) + EndSwitch + Return + End }; EvtScript N(EVS_SetDoorRot_Storeroom) = { - EVT_CALL(RotateModel, MODEL_skd, LVar0, 0, -1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_skd, LVar0, 0, -1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_Storeroom) = { - EVT_SET(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(2.781)) - EVT_CALL(TranslateModel, MODEL_skk1, 0, 0, LVar1) - EVT_CALL(TranslateModel, MODEL_skk2, 0, 0, LVar1) - EVT_CALL(TranslateModel, MODEL_skk3, 0, 0, LVar1) - EVT_CALL(TranslateModel, MODEL_skk4, 0, 0, LVar1) - EVT_CALL(TranslateModel, MODEL_skk5, 0, 0, LVar1) - EVT_CALL(TranslateModel, MODEL_skk6, 0, 0, LVar1) - EVT_CALL(TranslateModel, MODEL_skk7, 0, 0, LVar1) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + MulF(LVar1, Float(2.781)) + Call(TranslateModel, MODEL_skk1, 0, 0, LVar1) + Call(TranslateModel, MODEL_skk2, 0, 0, LVar1) + Call(TranslateModel, MODEL_skk3, 0, 0, LVar1) + Call(TranslateModel, MODEL_skk4, 0, 0, LVar1) + Call(TranslateModel, MODEL_skk5, 0, 0, LVar1) + Call(TranslateModel, MODEL_skk6, 0, 0, LVar1) + Call(TranslateModel, MODEL_skk7, 0, 0, LVar1) + Return + End }; EvtScript N(EVS_DropDoor_Storeroom) = { - EVT_CALL(RotateModel, MODEL_skd, LVar0, 0, 0, -1) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_skd, LVar0, 0, 0, -1) + Return + End }; EvtScript N(EVS_RoomListener_Storeroom) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + EndSwitch + Return + End }; EvtScript N(EVS_SetDoorRot_Warehouse) = { - EVT_CALL(RotateModel, MODEL_hh_door, LVar0, 0, -1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_hh_door, LVar0, 0, -1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_Warehouse) = { - EVT_SET(LVar1, LVar0) - EVT_CALL(RotateModel, MODEL_hk1, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_hk2, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_hk3, LVar1, 0, 0, -1) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + Call(RotateModel, MODEL_hk1, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_hk2, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_hk3, LVar1, 0, 0, -1) + Return + End }; EvtScript N(EVS_RoomListener_Warehouse) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_CALL(EnableGroup, MODEL_heiho_in, TRUE) - EVT_SET(MF_MusicMixTrigger, TRUE) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_DONE) - EVT_EXEC(N(EVS_HiddenRoom_WaitForOuttaSight)) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_CALL(EnableGroup, MODEL_heiho_in, FALSE) - EVT_CALL(EnableGroup, MODEL_hi_soto, TRUE) - EVT_SET(MF_MusicMixTrigger, FALSE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Call(EnableGroup, MODEL_heiho_in, TRUE) + Set(MF_MusicMixTrigger, TRUE) + CaseEq(ROOM_UPDATE_ENTER_DONE) + Exec(N(EVS_HiddenRoom_WaitForOuttaSight)) + CaseEq(ROOM_UPDATE_EXIT_END) + Call(EnableGroup, MODEL_heiho_in, FALSE) + Call(EnableGroup, MODEL_hi_soto, TRUE) + Set(MF_MusicMixTrigger, FALSE) + EndSwitch + Return + End }; EvtScript N(EVS_SetDoorRot_HiddenRoom) = { - EVT_CALL(RotateModel, MODEL_hkai1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_hkai2, LVar0, 0, -1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_hkai1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_hkai2, LVar0, 0, -1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_HiddenRoom) = { - EVT_SET(LVar1, LVar0) - EVT_CALL(RotateModel, MODEL_hk4, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_hk5, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_hk6, LVar1, 0, 0, -1) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + Call(RotateModel, MODEL_hk4, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_hk5, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_hk6, LVar1, 0, 0, -1) + Return + End }; EvtScript N(EVS_RoomListener_HiddenRoom) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(InsideNPCs_Shop)[] = { @@ -183,92 +183,92 @@ s32 N(InsideNPCs_Warehouse)[] = { }; EvtScript N(EVS_MakeHiddenRoom) = { - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_LEFT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_HiddenRoom)), - EVT_PTR(N(EVS_SetWallRot_HiddenRoom)), + Ref(N(EVS_SetDoorRot_HiddenRoom)), + Ref(N(EVS_SetWallRot_HiddenRoom)), NULL, - EVT_PTR(N(EVS_RoomListener_HiddenRoom)), + Ref(N(EVS_RoomListener_HiddenRoom)), COLLIDER_deilit_hk, COLLIDER_deilit_hku, MODEL_o13, NULL) - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_MakeStoreroom) = { - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_2, ROOM_DOOR_LEFT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_Storeroom)), - EVT_PTR(N(EVS_SetWallRot_Storeroom)), - EVT_PTR(N(EVS_DropDoor_Storeroom)), - EVT_PTR(N(EVS_RoomListener_Storeroom)), + Ref(N(EVS_SetDoorRot_Storeroom)), + Ref(N(EVS_SetWallRot_Storeroom)), + Ref(N(EVS_DropDoor_Storeroom)), + Ref(N(EVS_RoomListener_Storeroom)), COLLIDER_deilit_sku, COLLIDER_deilit_sk, MODEL_o13, NULL) - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_SetupRooms) = { // harry's shop on the right - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_1, ROOM_DOOR_LEFT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_Shop)), - EVT_PTR(N(EVS_SetWallRot_Shop)), + Ref(N(EVS_SetDoorRot_Shop)), + Ref(N(EVS_SetWallRot_Shop)), NULL, - EVT_PTR(N(EVS_RoomListener_Shop)), + Ref(N(EVS_RoomListener_Shop)), COLLIDER_deilit_m, COLLIDER_deilit_mu, MODEL_mise, - EVT_PTR(N(InsideNPCs_Shop))) + Ref(N(InsideNPCs_Shop))) // nice house in the middle - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_LEFT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_NiceHouse)), - EVT_PTR(N(EVS_SetWallRot_NiceHouse)), - EVT_PTR(N(EVS_DropDoor_NiceHouse)), - EVT_PTR(N(EVS_RoomListener_NiceHouse)), + Ref(N(EVS_SetDoorRot_NiceHouse)), + Ref(N(EVS_SetWallRot_NiceHouse)), + Ref(N(EVS_DropDoor_NiceHouse)), + Ref(N(EVS_RoomListener_NiceHouse)), COLLIDER_deilit_r, COLLIDER_deilit_ru, MODEL_rinjin, - EVT_PTR(N(InsideNPCs_NiceHouse))) + Ref(N(InsideNPCs_NiceHouse))) // warehouse on the left - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_LEFT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_Warehouse)), - EVT_PTR(N(EVS_SetWallRot_Warehouse)), + Ref(N(EVS_SetDoorRot_Warehouse)), + Ref(N(EVS_SetWallRot_Warehouse)), NULL, - EVT_PTR(N(EVS_RoomListener_Warehouse)), + Ref(N(EVS_RoomListener_Warehouse)), COLLIDER_deilit_h, COLLIDER_deilit_hu, MODEL_heiho_house, - EVT_PTR(N(InsideNPCs_Warehouse))) - EVT_IF_GE(GB_StoryProgress, STORY_CH4_RETURNED_STOREROOM_KEY) - EVT_EXEC_WAIT(N(EVS_MakeStoreroom)) - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH4_FOUND_HIDDEN_DOOR) - EVT_EXEC_WAIT(N(EVS_MakeHiddenRoom)) - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_RANGE(mac_04_ENTRY_2, mac_04_ENTRY_3) - EVT_CALL(SetGroupVisibility, MODEL_heiho_in, MODEL_GROUP_VISIBLE) - EVT_CALL(N(InitEntryFromToybox)) - EVT_SET(LVar0, 90) - EVT_CALL(RotateModel, MODEL_hk1, LVar0, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_hk2, LVar0, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_hk3, LVar0, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_hk4, LVar0, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_hk5, LVar0, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_hk6, LVar0, 0, 0, -1) - EVT_CASE_DEFAULT - EVT_SET(LVar0, ROOM_UPDATE_EXIT_END) - EVT_EXEC(N(EVS_RoomListener_Shop)) - EVT_EXEC(N(EVS_RoomListener_NiceHouse)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Ref(N(InsideNPCs_Warehouse))) + IfGe(GB_StoryProgress, STORY_CH4_RETURNED_STOREROOM_KEY) + ExecWait(N(EVS_MakeStoreroom)) + EndIf + IfGe(GB_StoryProgress, STORY_CH4_FOUND_HIDDEN_DOOR) + ExecWait(N(EVS_MakeHiddenRoom)) + EndIf + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseRange(mac_04_ENTRY_2, mac_04_ENTRY_3) + Call(SetGroupVisibility, MODEL_heiho_in, MODEL_GROUP_VISIBLE) + Call(N(InitEntryFromToybox)) + Set(LVar0, 90) + Call(RotateModel, MODEL_hk1, LVar0, 0, 0, -1) + Call(RotateModel, MODEL_hk2, LVar0, 0, 0, -1) + Call(RotateModel, MODEL_hk3, LVar0, 0, 0, -1) + Call(RotateModel, MODEL_hk4, LVar0, 0, 0, -1) + Call(RotateModel, MODEL_hk5, LVar0, 0, 0, -1) + Call(RotateModel, MODEL_hk6, LVar0, 0, 0, -1) + CaseDefault + Set(LVar0, ROOM_UPDATE_EXIT_END) + Exec(N(EVS_RoomListener_Shop)) + Exec(N(EVS_RoomListener_NiceHouse)) + EndSwitch + Return + End }; diff --git a/src/world/area_mac/mac_04/mac_04_4_foliage.c b/src/world/area_mac/mac_04/mac_04_4_foliage.c index 5cf7376a5a6..957b3481eec 100644 --- a/src/world/area_mac/mac_04/mac_04_4_foliage.c +++ b/src/world/area_mac/mac_04/mac_04_4_foliage.c @@ -69,15 +69,15 @@ BombTrigger N(BombPos_Tree3) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o452, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o446, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o435, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree3)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o452, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o446, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree3))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o435, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree3)), 1, 0) + Return + End }; diff --git a/src/world/area_mac/mac_04/mac_04_5_shop.c b/src/world/area_mac/mac_04/mac_04_5_shop.c index bf439c6563e..219d8175323 100644 --- a/src/world/area_mac/mac_04/mac_04_5_shop.c +++ b/src/world/area_mac/mac_04/mac_04_5_shop.c @@ -47,14 +47,14 @@ ShopSellPriceData N(PriceList)[] = { }; EvtScript N(EVS_OnBuy) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(SHOP_BUY_RESULT_CANCEL) - EVT_CASE_EQ(SHOP_BUY_RESULT_4) - EVT_CASE_EQ(SHOP_BUY_RESULT_OK) - EVT_CASE_EQ(SHOP_BUY_RESULT_OK) //@bug duplicate case - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(SHOP_BUY_RESULT_CANCEL) + CaseEq(SHOP_BUY_RESULT_4) + CaseEq(SHOP_BUY_RESULT_OK) + CaseEq(SHOP_BUY_RESULT_OK) //@bug duplicate case + EndSwitch + Return + End }; ShopItemLocation N(ItemPositions)[] = { @@ -75,8 +75,8 @@ ShopOwner N(Owner) = { }; EvtScript N(EVS_SetupShop) = { - EVT_CALL(MakeShop, EVT_PTR(N(ItemPositions)), EVT_PTR(N(Inventory)), EVT_PTR(N(PriceList)), ITEM_ENTITY_FLAG_TOSS_LOWER) - EVT_CALL(MakeShopOwner, EVT_PTR(N(Owner))) - EVT_RETURN - EVT_END + Call(MakeShop, Ref(N(ItemPositions)), Ref(N(Inventory)), Ref(N(PriceList)), ITEM_ENTITY_FLAG_TOSS_LOWER) + Call(MakeShopOwner, Ref(N(Owner))) + Return + End }; diff --git a/src/world/area_mac/mac_04/mac_04_6_npc.c b/src/world/area_mac/mac_04/mac_04_6_npc.c index 49bb1756023..ee8536c2708 100644 --- a/src/world/area_mac/mac_04/mac_04_6_npc.c +++ b/src/world/area_mac/mac_04/mac_04_6_npc.c @@ -20,89 +20,89 @@ MAP_STATIC_PAD(1,key_choice); #include "world/common/complete/KeyItemChoice.inc.c" EvtScript N(EVS_TossTrainInToybox) = { - EVT_CALL(FacePlayerTowardPoint, -440, -150, 0) - EVT_WAIT(15) - EVT_THREAD - EVT_WAIT(7) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_ADD(LVar3, 50) - EVT_SETF(LVar5, 3) - EVT_CALL(MakeItemEntity, ITEM_TOY_TRAIN, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVar7, LVar0) - EVT_CALL(MakeLerp, LVar4, -150, 30, EASING_CUBIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetItemPos, LVar7, -440, LVar3, LVar0) - EVT_ADDF(LVar5, EVT_FLOAT(-0.5)) - EVT_ADD(LVar3, LVar5) - EVT_IF_LT(LVar3, 0) - EVT_SET(LVar3, 0) - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(RemoveItemEntity, LVar7) - EVT_END_THREAD - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_TakeItem) - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(10) - EVT_RETURN - EVT_END + Call(FacePlayerTowardPoint, -440, -150, 0) + Wait(15) + Thread + Wait(7) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Add(LVar3, 50) + SetF(LVar5, 3) + Call(MakeItemEntity, ITEM_TOY_TRAIN, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVar7, LVar0) + Call(MakeLerp, LVar4, -150, 30, EASING_CUBIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(SetItemPos, LVar7, -440, LVar3, LVar0) + AddF(LVar5, Float(-0.5)) + Add(LVar3, LVar5) + IfLt(LVar3, 0) + Set(LVar3, 0) + EndIf + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(RemoveItemEntity, LVar7) + EndThread + Call(SetPlayerAnimation, ANIM_MarioW1_TakeItem) + Wait(20) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(10) + Return + End }; EvtScript N(EVS_ItemPrompt_ToyTrain) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(ShowKeyChoicePopup) - EVT_SET(LVar2, LVar0) - EVT_IF_LE(LVar2, 0) - EVT_IF_EQ(LVar2, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_Toybox, 160, 40) - EVT_END_IF - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(PlaySoundAtCollider, COLLIDER_omo_ent, SOUND_OMO_TOYBOX_LID, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, -90, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(LVar2, 0) - EVT_SUB(LVar2, LVar0) - EVT_DIV(LVar2, 3) - EVT_CALL(RotateGroup, MODEL_box_top, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC_WAIT(N(EVS_TossTrainInToybox)) - EVT_CALL(MakeLerp, -90, 0, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(LVar2, 0) - EVT_SUB(LVar2, LVar0) - EVT_DIV(LVar2, 3) - EVT_CALL(RotateGroup, MODEL_box_top, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_omo_ent, SOUND_OMO_TOYBOX_LID, SOUND_SPACE_DEFAULT) - EVT_CALL(CloseChoicePopup) - EVT_SET(GB_StoryProgress, STORY_CH4_RETURNED_TOY_TRAIN) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_UNBIND - EVT_CALL(GotoMap, EVT_PTR("omo_03"), omo_03_ENTRY_6) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(ShowKeyChoicePopup) + Set(LVar2, LVar0) + IfLe(LVar2, 0) + IfEq(LVar2, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_Inspect_Toybox, 160, 40) + EndIf + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(RemoveKeyItemAt, LVar1) + Call(PlaySoundAtCollider, COLLIDER_omo_ent, SOUND_OMO_TOYBOX_LID, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, -90, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Set(LVar2, 0) + Sub(LVar2, LVar0) + Div(LVar2, 3) + Call(RotateGroup, MODEL_box_top, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + ExecWait(N(EVS_TossTrainInToybox)) + Call(MakeLerp, -90, 0, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Set(LVar2, 0) + Sub(LVar2, LVar0) + Div(LVar2, 3) + Call(RotateGroup, MODEL_box_top, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_omo_ent, SOUND_OMO_TOYBOX_LID, SOUND_SPACE_DEFAULT) + Call(CloseChoicePopup) + Set(GB_StoryProgress, STORY_CH4_RETURNED_TOY_TRAIN) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Unbind + Call(GotoMap, Ref("omo_03"), omo_03_ENTRY_6) + Wait(100) + Return + End }; s32 N(ItemList_ToyTrain)[] = { @@ -111,11 +111,11 @@ s32 N(ItemList_ToyTrain)[] = { }; EvtScript N(EVS_Toybox_SetupTrainPrompt) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH4_RETURNED_TOY_TRAIN) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_ItemPrompt_ToyTrain)), TRIGGER_WALL_PRESS_A, COLLIDER_o468, EVT_PTR(N(ItemList_ToyTrain)), 0, 1) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH4_RETURNED_TOY_TRAIN) + BindPadlock(Ref(N(EVS_ItemPrompt_ToyTrain)), TRIGGER_WALL_PRESS_A, COLLIDER_o468, Ref(N(ItemList_ToyTrain)), 0, 1) + EndIf + Return + End }; s32 N(get_total_equipped_bp_cost)(void) { diff --git a/src/world/area_mac/mac_04/mac_04_7_wish_scene.c b/src/world/area_mac/mac_04/mac_04_7_wish_scene.c index 25fcb56c441..36b32901d0c 100644 --- a/src/world/area_mac/mac_04/mac_04_7_wish_scene.c +++ b/src/world/area_mac/mac_04/mac_04_7_wish_scene.c @@ -8,31 +8,31 @@ #define NAME_SUFFIX EvtScript N(EVS_Scene_WishingToadKid) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -100, 0, 200) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -100, 0, 200) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(-400.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(6.0), EVT_FLOAT(-8.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_WishingToadKid, ANIM_ToadKid_Red_Talk, ANIM_ToadKid_Red_Disappointed, 0, MSG_HOS_0070) - EVT_WAIT(10) - EVT_CALL(GotoMap, EVT_PTR("hos_20"), hos_20_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(UseSettingsFrom, CAM_DEFAULT, -100, 0, 200) + Call(SetPanTarget, CAM_DEFAULT, -100, 0, 200) + Call(SetCamDistance, CAM_DEFAULT, Float(-400.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(6.0), Float(-8.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20) + Call(SpeakToPlayer, NPC_WishingToadKid, ANIM_ToadKid_Red_Talk, ANIM_ToadKid_Red_Disappointed, 0, MSG_HOS_0070) + Wait(10) + Call(GotoMap, Ref("hos_20"), hos_20_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_NpcInit_WishingToadKid) = { - EVT_CALL(SetNpcPos, NPC_SELF, -100, 0, 200) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, -100, 0, 200) + Call(SetNpcYaw, NPC_SELF, 90) + Return + End }; NpcData N(NpcData_WishSceneToads)[] = { diff --git a/src/world/area_mac/mac_04/mac_04_8_entity.c b/src/world/area_mac/mac_04/mac_04_8_entity.c index 99450da85e4..854bf497912 100644 --- a/src/world/area_mac/mac_04/mac_04_8_entity.c +++ b/src/world/area_mac/mac_04/mac_04_8_entity.c @@ -54,172 +54,172 @@ void N(appendGfx_shrunk_player)(void* data) { } EvtScript N(EVS_ShrinkPlayer) = { - EVT_SETF(MV_PlayerShrinkScale, EVT_FLOAT(1.0)) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_TIME_STOPPED, TRUE) - EVT_CALL(N(CreateShrinkingWorker)) - EVT_THREAD - EVT_WAIT(8) - EVT_CALL(MakeLerp, 100, 20, 20, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(MV_PlayerShrinkScale, LVar0) - EVT_DIVF(MV_PlayerShrinkScale, 100) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_RETURN - EVT_END + SetF(MV_PlayerShrinkScale, Float(1.0)) + Call(SetPlayerFlagBits, PS_FLAG_TIME_STOPPED, TRUE) + Call(N(CreateShrinkingWorker)) + Thread + Wait(8) + Call(MakeLerp, 100, 20, 20, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + SetF(MV_PlayerShrinkScale, LVar0) + DivF(MV_PlayerShrinkScale, 100) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Return + End }; EvtScript N(EVS_UnshrinkPlayer) = { - EVT_SETF(MV_PlayerShrinkScale, EVT_FLOAT(0.2)) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_TIME_STOPPED, TRUE) - EVT_CALL(N(CreateShrinkingWorker)) - EVT_THREAD - EVT_CALL(MakeLerp, 20, 100, 40, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(MV_PlayerShrinkScale, LVar0) - EVT_DIVF(MV_PlayerShrinkScale, 100) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_RETURN - EVT_END + SetF(MV_PlayerShrinkScale, Float(0.2)) + Call(SetPlayerFlagBits, PS_FLAG_TIME_STOPPED, TRUE) + Call(N(CreateShrinkingWorker)) + Thread + Call(MakeLerp, 20, 100, 40, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + SetF(MV_PlayerShrinkScale, LVar0) + DivF(MV_PlayerShrinkScale, 100) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Return + End }; EvtScript N(EVS_FinishUnshrinking) = { - EVT_CALL(SetPlayerFlagBits, PS_FLAG_TIME_STOPPED, FALSE) - EVT_CALL(N(DestroyShrinkingWorker)) - EVT_RETURN - EVT_END + Call(SetPlayerFlagBits, PS_FLAG_TIME_STOPPED, FALSE) + Call(N(DestroyShrinkingWorker)) + Return + End }; EvtScript N(EVS_FocusCameraOnPlayer) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_EnterToybox) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_EXEC_WAIT(N(EVS_ShrinkPlayer)) - EVT_CALL(SetPlayerActionState, ACTION_STATE_JUMP) - EVT_WAIT(1) - EVT_EXEC_GET_TID(N(EVS_FocusCameraOnPlayer), LVarA) - EVT_THREAD - EVT_CALL(PlaySoundAtCollider, COLLIDER_omo_ent, SOUND_OMO_TOYBOX_LID, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, -90, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(LVar2, 0) - EVT_SUB(LVar2, LVar0) - EVT_DIV(LVar2, 3) - EVT_CALL(RotateGroup, MODEL_box_top, LVar0, 0, 0, 1) - EVT_CALL(TranslateGroup, MODEL_box_top, 0, LVar2, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(PlaySoundAtPlayer, SOUND_TRANSPORTER_IN, SOUND_SPACE_DEFAULT) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.35)) - EVT_CALL(PlayerJump, -450, 20, -160, 32) - EVT_END_THREAD - EVT_WAIT(25) - EVT_IF_EQ(GF_StartedChapter4, FALSE) - EVT_SET(GF_StartedChapter4, TRUE) - EVT_CALL(FadeOutMusic, 0, 1500) - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_22"), kmr_22_ENTRY_4, TRANSITION_BEGIN_OR_END_CHAPTER) - EVT_WAIT(100) - EVT_RETURN - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("omo_03"), omo_03_ENTRY_4) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + ExecWait(N(EVS_ShrinkPlayer)) + Call(SetPlayerActionState, ACTION_STATE_JUMP) + Wait(1) + ExecGetTID(N(EVS_FocusCameraOnPlayer), LVarA) + Thread + Call(PlaySoundAtCollider, COLLIDER_omo_ent, SOUND_OMO_TOYBOX_LID, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, -90, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Set(LVar2, 0) + Sub(LVar2, LVar0) + Div(LVar2, 3) + Call(RotateGroup, MODEL_box_top, LVar0, 0, 0, 1) + Call(TranslateGroup, MODEL_box_top, 0, LVar2, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(PlaySoundAtPlayer, SOUND_TRANSPORTER_IN, SOUND_SPACE_DEFAULT) + Call(SetPlayerJumpscale, Float(0.35)) + Call(PlayerJump, -450, 20, -160, 32) + EndThread + Wait(25) + IfEq(GF_StartedChapter4, FALSE) + Set(GF_StartedChapter4, TRUE) + Call(FadeOutMusic, 0, 1500) + Call(GotoMapSpecial, Ref("kmr_22"), kmr_22_ENTRY_4, TRANSITION_BEGIN_OR_END_CHAPTER) + Wait(100) + Return + EndIf + Call(GotoMap, Ref("omo_03"), omo_03_ENTRY_4) + Wait(100) + Return + End }; EvtScript N(EVS_ExitToybox) = { - EVT_SET(AF_ExitingToybox, TRUE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_EXEC_WAIT(N(EVS_UnshrinkPlayer)) - EVT_CALL(SetPlayerActionState, ACTION_STATE_JUMP) - EVT_WAIT(1) - EVT_THREAD - EVT_CALL(MakeLerp, -90, 0, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(LVar2, 0) - EVT_SUB(LVar2, LVar0) - EVT_DIV(LVar2, 3) - EVT_CALL(RotateGroup, MODEL_box_top, LVar0, 0, 0, 1) - EVT_CALL(TranslateGroup, MODEL_box_top, 0, LVar2, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_omo_ent, SOUND_OMO_TOYBOX_LID, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_EXEC_GET_TID(N(EVS_FocusCameraOnPlayer), LVarA) - EVT_CALL(PlaySoundAtPlayer, SOUND_TRANSPORTER_OUT, SOUND_SPACE_DEFAULT) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7)) - EVT_CALL(PlayerJump, -480, 45, -90, 25) - EVT_EXEC_WAIT(N(EVS_FinishUnshrinking)) - EVT_KILL_THREAD(LVarA) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_RETURN - EVT_END + Set(AF_ExitingToybox, TRUE) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + ExecWait(N(EVS_UnshrinkPlayer)) + Call(SetPlayerActionState, ACTION_STATE_JUMP) + Wait(1) + Thread + Call(MakeLerp, -90, 0, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Set(LVar2, 0) + Sub(LVar2, LVar0) + Div(LVar2, 3) + Call(RotateGroup, MODEL_box_top, LVar0, 0, 0, 1) + Call(TranslateGroup, MODEL_box_top, 0, LVar2, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_omo_ent, SOUND_OMO_TOYBOX_LID, SOUND_SPACE_DEFAULT) + EndThread + ExecGetTID(N(EVS_FocusCameraOnPlayer), LVarA) + Call(PlaySoundAtPlayer, SOUND_TRANSPORTER_OUT, SOUND_SPACE_DEFAULT) + Call(SetPlayerJumpscale, Float(0.7)) + Call(PlayerJump, -480, 45, -90, 25) + ExecWait(N(EVS_FinishUnshrinking)) + KillThread(LVarA) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Return + End }; EvtScript N(EVS_BounceOffSpring) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_JUMP) - EVT_WAIT(1) - EVT_EXEC_GET_TID(N(EVS_FocusCameraOnPlayer), LVarA) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7)) - EVT_CALL(PlayerJump, -430, 20, -45, 15) - EVT_SET(AF_ExitingToybox, FALSE) - EVT_KILL_THREAD(LVarA) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_JUMP) + Wait(1) + ExecGetTID(N(EVS_FocusCameraOnPlayer), LVarA) + Call(SetPlayerJumpscale, Float(0.7)) + Call(PlayerJump, -430, 20, -45, 15) + Set(AF_ExitingToybox, FALSE) + KillThread(LVarA) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Return + End }; EvtScript N(EVS_UseSpring_Toybox) = { - EVT_IF_EQ(AF_ExitingToybox, FALSE) - EVT_EXEC(N(EVS_EnterToybox)) - EVT_ELSE - EVT_EXEC(N(EVS_BounceOffSpring)) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(AF_ExitingToybox, FALSE) + Exec(N(EVS_EnterToybox)) + Else + Exec(N(EVS_BounceOffSpring)) + EndIf + Return + End }; EvtScript N(EVS_UnlockStoreroom) = { - EVT_EXEC_WAIT(N(EVS_MakeStoreroom)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_MakeStoreroom)) + Return + End }; #include "world/common/todo/RemovePadlock.inc.c" @@ -230,82 +230,82 @@ s32 N(StoreroomKeyList)[] = { }; EvtScript N(EVS_ItemPrompt_StoreroomKey) = { - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_CALL(CloseChoicePopup) - EVT_RETURN - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, 155, 48, -480) - EVT_SET(LVar0, MV_StoreroomLockEntityID) - EVT_CALL(N(RemovePadlock)) - EVT_WAIT(5) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(CloseChoicePopup) - EVT_UNBIND - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SpeakToPlayer, NPC_HarryT, ANIM_HarryT_Talk, ANIM_HarryT_Idle, 0, MSG_MAC_Housing_0004) - EVT_CALL(SetNpcFlagBits, NPC_HarryT, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_HarryT, ANIM_HarryT_Run) - EVT_CALL(NpcMoveTo, NPC_HarryT, 295, -460, 0) - EVT_CALL(NpcMoveTo, NPC_HarryT, 230, -480, 0) - EVT_CALL(NpcJump0, NPC_HarryT, 200, 30, -524, 0) - EVT_CALL(SetNpcPos, NPC_HarryT, 200, 30, -524) - EVT_CALL(SetNpcAnimation, NPC_HarryT, ANIM_HarryT_Idle) - EVT_CALL(SetNpcFlagBits, NPC_HarryT, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SpeakToPlayer, NPC_HarryT, ANIM_HarryT_Talk, ANIM_HarryT_Idle, 0, MSG_MAC_Housing_0005) - EVT_SET(GB_StoryProgress, STORY_CH4_RETURNED_STOREROOM_KEY) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(ShowKeyChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) + Call(CloseChoicePopup) + Return + EndIf + IfEq(LVar0, -1) + Call(CloseChoicePopup) + Return + EndIf + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, 155, 48, -480) + Set(LVar0, MV_StoreroomLockEntityID) + Call(N(RemovePadlock)) + Wait(5) + Call(RemoveKeyItemAt, LVar1) + Call(CloseChoicePopup) + Unbind + Call(DisablePlayerInput, TRUE) + Call(SpeakToPlayer, NPC_HarryT, ANIM_HarryT_Talk, ANIM_HarryT_Idle, 0, MSG_MAC_Housing_0004) + Call(SetNpcFlagBits, NPC_HarryT, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_HarryT, ANIM_HarryT_Run) + Call(NpcMoveTo, NPC_HarryT, 295, -460, 0) + Call(NpcMoveTo, NPC_HarryT, 230, -480, 0) + Call(NpcJump0, NPC_HarryT, 200, 30, -524, 0) + Call(SetNpcPos, NPC_HarryT, 200, 30, -524) + Call(SetNpcAnimation, NPC_HarryT, ANIM_HarryT_Idle) + Call(SetNpcFlagBits, NPC_HarryT, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SpeakToPlayer, NPC_HarryT, ANIM_HarryT_Talk, ANIM_HarryT_Idle, 0, MSG_MAC_Housing_0005) + Set(GB_StoryProgress, STORY_CH4_RETURNED_STOREROOM_KEY) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_ForceStoreroomUnlock) = { - EVT_SET(LVar0, MV_StoreroomLockEntityID) - EVT_CALL(N(RemovePadlock)) - EVT_RETURN - EVT_END + Set(LVar0, MV_StoreroomLockEntityID) + Call(N(RemovePadlock)) + Return + End }; EvtScript N(EVS_OnInspect_StreetSign) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0173, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_0173, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH4_RETURNED_STOREROOM_KEY) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), 155, 48, -480, 90, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_UnlockStoreroom))) - EVT_SET(MV_StoreroomLockEntityID, LVar0) - EVT_CALL(SetEntityCullMode, 3) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_ItemPrompt_StoreroomKey)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(StoreroomKeyList)), 0, 1) - EVT_END_IF - EVT_CALL(MakeItemEntity, ITEM_VIS_GROUP(ITEM_TOY_TRAIN, VIS_GROUP_2), 50, 40, -430, ITEM_SPAWN_MODE_KEY, GF_MAC04_Item_ToyTrain) - EVT_THREAD - EVT_IF_LT(GB_StoryProgress, STORY_CH4_GOT_TOY_TRAIN) - EVT_LOOP(0) - EVT_IF_NE(GF_MAC04_Item_ToyTrain, FALSE) - EVT_SET(GB_StoryProgress, STORY_CH4_GOT_TOY_TRAIN) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_IF - EVT_END_THREAD - EVT_CALL(MakeItemEntity, ITEM_VIS_GROUP(ITEM_SNOWMAN_DOLL, VIS_GROUP_2), 50, 40, -310, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_MAC04_Item_SnowmanDoll) - EVT_CALL(MakeItemEntity, ITEM_VIS_GROUP(ITEM_VOLT_SHROOM, VIS_GROUP_2), 50, 40, -370, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_MAC04_Item_VoltShroom) - EVT_CALL(MakeItemEntity, ITEM_VIS_GROUP(ITEM_DIZZY_DIAL, VIS_GROUP_2), 50, 40, -490, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_MAC04_Item_DizzyDial) - EVT_CALL(MakeEntity, EVT_PTR(Entity_ScriptSpring), -480, 20, -90, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_UseSpring_Toybox))) - EVT_CALL(SetEntityCullMode, 2) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnInspect_StreetSign)), TRIGGER_WALL_PRESS_A, COLLIDER_sign, 1, 0) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH4_RETURNED_STOREROOM_KEY) + Call(MakeEntity, Ref(Entity_Padlock), 155, 48, -480, 90, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_UnlockStoreroom))) + Set(MV_StoreroomLockEntityID, LVar0) + Call(SetEntityCullMode, 3) + BindPadlock(Ref(N(EVS_ItemPrompt_StoreroomKey)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), Ref(N(StoreroomKeyList)), 0, 1) + EndIf + Call(MakeItemEntity, ITEM_VIS_GROUP(ITEM_TOY_TRAIN, VIS_GROUP_2), 50, 40, -430, ITEM_SPAWN_MODE_KEY, GF_MAC04_Item_ToyTrain) + Thread + IfLt(GB_StoryProgress, STORY_CH4_GOT_TOY_TRAIN) + Loop(0) + IfNe(GF_MAC04_Item_ToyTrain, FALSE) + Set(GB_StoryProgress, STORY_CH4_GOT_TOY_TRAIN) + BreakLoop + EndIf + Wait(1) + EndLoop + EndIf + EndThread + Call(MakeItemEntity, ITEM_VIS_GROUP(ITEM_SNOWMAN_DOLL, VIS_GROUP_2), 50, 40, -310, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_MAC04_Item_SnowmanDoll) + Call(MakeItemEntity, ITEM_VIS_GROUP(ITEM_VOLT_SHROOM, VIS_GROUP_2), 50, 40, -370, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_MAC04_Item_VoltShroom) + Call(MakeItemEntity, ITEM_VIS_GROUP(ITEM_DIZZY_DIAL, VIS_GROUP_2), 50, 40, -490, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_MAC04_Item_DizzyDial) + Call(MakeEntity, Ref(Entity_ScriptSpring), -480, 20, -90, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_UseSpring_Toybox))) + Call(SetEntityCullMode, 2) + BindTrigger(Ref(N(EVS_OnInspect_StreetSign)), TRIGGER_WALL_PRESS_A, COLLIDER_sign, 1, 0) + Return + End }; diff --git a/src/world/area_mac/mac_04/mac_04_9_music_mix.c b/src/world/area_mac/mac_04/mac_04_9_music_mix.c index 6523202cf50..8b0b9a9e3cc 100644 --- a/src/world/area_mac/mac_04/mac_04_9_music_mix.c +++ b/src/world/area_mac/mac_04/mac_04_9_music_mix.c @@ -11,11 +11,11 @@ MusicProximityTrigger N(MusicMixTrigger) = { }; EvtScript N(EVS_SetupMusicTriggers) = { - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN, 0, 8) - EVT_CALL(EnableMusicProximityMix, 0) - EVT_THREAD - EVT_CALL(N(MonitorMusicProximityTrigger), EVT_PTR(N(MusicMixTrigger))) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TOAD_TOWN, 0, 8) + Call(EnableMusicProximityMix, 0) + Thread + Call(N(MonitorMusicProximityTrigger), Ref(N(MusicMixTrigger))) + EndThread + Return + End }; diff --git a/src/world/area_mac/mac_04/npc_chet_rippo.inc.c b/src/world/area_mac/mac_04/npc_chet_rippo.inc.c index cc8328a0d39..1d934d71e45 100644 --- a/src/world/area_mac/mac_04/npc_chet_rippo.inc.c +++ b/src/world/area_mac/mac_04/npc_chet_rippo.inc.c @@ -94,124 +94,124 @@ API_CALLABLE(N(ForceStatusBarToAppear)) { } EvtScript N(EVS_NpcInteract_ChetRippo) = { - EVT_IF_EQ(GF_MAC04_Met_ChetRippo, FALSE) - EVT_SET(LVar0, MSG_MAC_Housing_00A8) - EVT_SET(GF_MAC04_Met_ChetRippo, TRUE) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Housing_00A9) - EVT_END_IF - EVT_CALL(N(SetStatusBarIgnoreChanges)) - EVT_CALL(SpeakToPlayer, NPC_ChetRippo, ANIM_ChetRippo_Talk, ANIM_ChetRippo_Idle, 0, LVar0) - EVT_CALL(ShowCoinCounter, TRUE) - EVT_CALL(ShowChoice, MSG_Choice_000E) - EVT_IF_NE(LVar0, 0) - EVT_CALL(ShowCoinCounter, FALSE) - EVT_CALL(ContinueSpeech, NPC_ChetRippo, ANIM_ChetRippo_Talk, ANIM_ChetRippo_Idle, 0, MSG_MAC_Housing_00AA) - EVT_CALL(N(SetStatusBarRespondToChanges)) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(GetPlayerCoins)) - EVT_IF_LT(LVar0, 39) - EVT_CALL(ShowCoinCounter, FALSE) - EVT_CALL(ContinueSpeech, NPC_ChetRippo, ANIM_ChetRippo_Talk, ANIM_ChetRippo_Idle, 0, MSG_MAC_Housing_00AB) - EVT_CALL(N(SetStatusBarRespondToChanges)) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(GetCurrentStatValues)) - EVT_CALL(SetMessageValue, LVar0, 0) - EVT_CALL(SetMessageValue, LVar1, 1) - EVT_CALL(SetMessageValue, LVar2, 2) - EVT_CALL(ContinueSpeech, NPC_ChetRippo, ANIM_ChetRippo_Talk, ANIM_ChetRippo_Idle, 0, MSG_MAC_Housing_00AC) - EVT_CALL(ShowChoice, MSG_Choice_000B) - EVT_IF_EQ(LVar0, 3) - EVT_CALL(ShowCoinCounter, FALSE) - EVT_CALL(ContinueSpeech, NPC_ChetRippo, ANIM_ChetRippo_Talk, ANIM_ChetRippo_Idle, 0, MSG_MAC_Housing_00AD) - EVT_CALL(N(SetStatusBarRespondToChanges)) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar2, 0) - EVT_CALL(N(GetCurrentStatMaxima), LVar3, LVar4, LVar5) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_IF_GT(LVar3, 40) - EVT_SET(LVar2, 1) - EVT_END_IF - EVT_SET(LVar1, MSG_Menus_00D1) - EVT_CASE_EQ(1) - EVT_IF_GT(LVar4, 40) - EVT_SET(LVar2, 1) - EVT_END_IF - EVT_SET(LVar1, MSG_Menus_00D2) - EVT_CASE_EQ(2) - EVT_IF_GT(LVar5, 24) - EVT_SET(LVar2, 1) - EVT_END_IF - EVT_SET(LVar1, MSG_Menus_00D3) - EVT_END_SWITCH - EVT_SET(LVarA, LVar0) - EVT_IF_EQ(LVar2, 1) - EVT_CALL(ShowCoinCounter, FALSE) - EVT_CALL(ContinueSpeech, NPC_ChetRippo, ANIM_ChetRippo_Talk, ANIM_ChetRippo_Idle, 0, MSG_MAC_Housing_00B1) - EVT_CALL(N(SetStatusBarRespondToChanges)) - EVT_RETURN - EVT_END_IF - EVT_CALL(AddCoin, -39) - EVT_CALL(ShowCoinCounter, FALSE) - EVT_CALL(SetMessageText, LVar1, 0) - EVT_CALL(ContinueSpeech, NPC_ChetRippo, ANIM_ChetRippo_Talk, ANIM_ChetRippo_Idle, 0, MSG_MAC_Housing_00AE) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_ChetRippo, ANIM_ChetRippo_Spread) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtNpc, NPC_ChetRippo, SOUND_MERLEE_APPEAR, SOUND_SPACE_DEFAULT) - EVT_CALL(GetNpcPos, NPC_ChetRippo, LVar6, LVar7, LVar8) - EVT_ADD(LVar7, 26) - EVT_PLAY_EFFECT(EFFECT_SHIMMER_BURST, 0, LVar6, LVar7, LVar8, 1, 60) - EVT_CALL(SetNpcAnimation, NPC_ChetRippo, ANIM_ChetRippo_ShakeSlow) - EVT_WAIT(80) - EVT_CALL(SetNpcAnimation, NPC_ChetRippo, ANIM_ChetRippo_Idle) - EVT_CALL(N(AdjustStatMaxima)) - EVT_CALL(N(EnforceNewStatLimits), LVar6) - EVT_IF_EQ(LVar6, 0) - EVT_SET(LVar7, MSG_MAC_Housing_00AF) - EVT_ELSE - EVT_SET(LVar7, MSG_MAC_Housing_00B0) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_ChetRippo, ANIM_ChetRippo_Talk, ANIM_ChetRippo_Idle, 0, LVar7) - EVT_WAIT(10) - EVT_CALL(GetNpcPos, NPC_ChetRippo, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_ChetRippo, SOUND_VANISH_IN_SMOKE, SOUND_SPACE_DEFAULT) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 1, 1, 1, 1) - EVT_CALL(SetNpcPos, NPC_ChetRippo, NPC_DISPOSE_LOCATION) - EVT_SET(AF_MAC_32, TRUE) - EVT_CALL(N(ForceStatusBarToAppear)) - EVT_RETURN - EVT_END + IfEq(GF_MAC04_Met_ChetRippo, FALSE) + Set(LVar0, MSG_MAC_Housing_00A8) + Set(GF_MAC04_Met_ChetRippo, TRUE) + Else + Set(LVar0, MSG_MAC_Housing_00A9) + EndIf + Call(N(SetStatusBarIgnoreChanges)) + Call(SpeakToPlayer, NPC_ChetRippo, ANIM_ChetRippo_Talk, ANIM_ChetRippo_Idle, 0, LVar0) + Call(ShowCoinCounter, TRUE) + Call(ShowChoice, MSG_Choice_000E) + IfNe(LVar0, 0) + Call(ShowCoinCounter, FALSE) + Call(ContinueSpeech, NPC_ChetRippo, ANIM_ChetRippo_Talk, ANIM_ChetRippo_Idle, 0, MSG_MAC_Housing_00AA) + Call(N(SetStatusBarRespondToChanges)) + Return + EndIf + Call(N(GetPlayerCoins)) + IfLt(LVar0, 39) + Call(ShowCoinCounter, FALSE) + Call(ContinueSpeech, NPC_ChetRippo, ANIM_ChetRippo_Talk, ANIM_ChetRippo_Idle, 0, MSG_MAC_Housing_00AB) + Call(N(SetStatusBarRespondToChanges)) + Return + EndIf + Call(N(GetCurrentStatValues)) + Call(SetMessageValue, LVar0, 0) + Call(SetMessageValue, LVar1, 1) + Call(SetMessageValue, LVar2, 2) + Call(ContinueSpeech, NPC_ChetRippo, ANIM_ChetRippo_Talk, ANIM_ChetRippo_Idle, 0, MSG_MAC_Housing_00AC) + Call(ShowChoice, MSG_Choice_000B) + IfEq(LVar0, 3) + Call(ShowCoinCounter, FALSE) + Call(ContinueSpeech, NPC_ChetRippo, ANIM_ChetRippo_Talk, ANIM_ChetRippo_Idle, 0, MSG_MAC_Housing_00AD) + Call(N(SetStatusBarRespondToChanges)) + Return + EndIf + Set(LVar2, 0) + Call(N(GetCurrentStatMaxima), LVar3, LVar4, LVar5) + Switch(LVar0) + CaseEq(0) + IfGt(LVar3, 40) + Set(LVar2, 1) + EndIf + Set(LVar1, MSG_Menus_00D1) + CaseEq(1) + IfGt(LVar4, 40) + Set(LVar2, 1) + EndIf + Set(LVar1, MSG_Menus_00D2) + CaseEq(2) + IfGt(LVar5, 24) + Set(LVar2, 1) + EndIf + Set(LVar1, MSG_Menus_00D3) + EndSwitch + Set(LVarA, LVar0) + IfEq(LVar2, 1) + Call(ShowCoinCounter, FALSE) + Call(ContinueSpeech, NPC_ChetRippo, ANIM_ChetRippo_Talk, ANIM_ChetRippo_Idle, 0, MSG_MAC_Housing_00B1) + Call(N(SetStatusBarRespondToChanges)) + Return + EndIf + Call(AddCoin, -39) + Call(ShowCoinCounter, FALSE) + Call(SetMessageText, LVar1, 0) + Call(ContinueSpeech, NPC_ChetRippo, ANIM_ChetRippo_Talk, ANIM_ChetRippo_Idle, 0, MSG_MAC_Housing_00AE) + Wait(10) + Call(SetNpcAnimation, NPC_ChetRippo, ANIM_ChetRippo_Spread) + Wait(10) + Call(PlaySoundAtNpc, NPC_ChetRippo, SOUND_MERLEE_APPEAR, SOUND_SPACE_DEFAULT) + Call(GetNpcPos, NPC_ChetRippo, LVar6, LVar7, LVar8) + Add(LVar7, 26) + PlayEffect(EFFECT_SHIMMER_BURST, 0, LVar6, LVar7, LVar8, 1, 60) + Call(SetNpcAnimation, NPC_ChetRippo, ANIM_ChetRippo_ShakeSlow) + Wait(80) + Call(SetNpcAnimation, NPC_ChetRippo, ANIM_ChetRippo_Idle) + Call(N(AdjustStatMaxima)) + Call(N(EnforceNewStatLimits), LVar6) + IfEq(LVar6, 0) + Set(LVar7, MSG_MAC_Housing_00AF) + Else + Set(LVar7, MSG_MAC_Housing_00B0) + EndIf + Call(SpeakToPlayer, NPC_ChetRippo, ANIM_ChetRippo_Talk, ANIM_ChetRippo_Idle, 0, LVar7) + Wait(10) + Call(GetNpcPos, NPC_ChetRippo, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_ChetRippo, SOUND_VANISH_IN_SMOKE, SOUND_SPACE_DEFAULT) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 1, 1, 1, 1) + Call(SetNpcPos, NPC_ChetRippo, NPC_DISPOSE_LOCATION) + Set(AF_MAC_32, TRUE) + Call(N(ForceStatusBarToAppear)) + Return + End }; EvtScript N(EVS_NpcInit_ChetRippo) = { - EVT_IF_EQ(AF_MAC_32, FALSE) - EVT_SET(LVar0, 0) - EVT_CALL(N(GetCurrentStatMaxima), LVar1, LVar2, LVar3) - EVT_IF_LE(LVar1, 5) - EVT_SET(LVar0, 1) - EVT_END_IF - EVT_IF_LE(LVar2, 5) - EVT_SET(LVar0, 1) - EVT_END_IF - EVT_IF_LE(LVar3, 3) - EVT_SET(LVar0, 1) - EVT_END_IF - EVT_ELSE - EVT_SET(LVar0, 1) - EVT_END_IF - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetNpcCollisionSize, NPC_SELF, 38, 52) - EVT_CALL(N(SetNpcShadowScale), -1, EVT_FLOAT(2.0)) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_DIRTY_SHADOW, TRUE) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ChetRippo))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(AF_MAC_32, FALSE) + Set(LVar0, 0) + Call(N(GetCurrentStatMaxima), LVar1, LVar2, LVar3) + IfLe(LVar1, 5) + Set(LVar0, 1) + EndIf + IfLe(LVar2, 5) + Set(LVar0, 1) + EndIf + IfLe(LVar3, 3) + Set(LVar0, 1) + EndIf + Else + Set(LVar0, 1) + EndIf + IfEq(LVar0, 0) + Call(SetNpcCollisionSize, NPC_SELF, 38, 52) + Call(N(SetNpcShadowScale), -1, Float(2.0)) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_DIRTY_SHADOW, TRUE) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ChetRippo))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; diff --git a/src/world/area_mac/mac_04/npc_goomba_family.inc.c b/src/world/area_mac/mac_04/npc_goomba_family.inc.c index 8d26d049032..901c41db267 100644 --- a/src/world/area_mac/mac_04/npc_goomba_family.inc.c +++ b/src/world/area_mac/mac_04/npc_goomba_family.inc.c @@ -1,57 +1,57 @@ EvtScript N(EVS_NpcInteract_Goomama) = { - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_EQ(LVar0, PARTNER_GOOMBARIO) - EVT_CALL(DisablePartnerAI, 1) - EVT_IF_EQ(GF_MAC04_HeardGoombaFamilyArgument, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_MAC_Housing_00B6) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_MAC_Housing_00B7) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_MAC_Housing_00B8) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_MAC_Housing_00B9) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_MAC_Housing_00BA) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_MAC_Housing_00BB) - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_MAC_Housing_00BC) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_MAC_Housing_00BD) - EVT_CALL(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_MAC_Housing_00BE) - EVT_SET(GF_MAC04_HeardGoombaFamilyArgument, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_MAC_Housing_00BF) - EVT_END_IF - EVT_CALL(EnablePartnerAI) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_MAC_Housing_00B5) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetCurrentPartnerID, LVar0) + IfEq(LVar0, PARTNER_GOOMBARIO) + Call(DisablePartnerAI, 1) + IfEq(GF_MAC04_HeardGoombaFamilyArgument, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_MAC_Housing_00B6) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_MAC_Housing_00B7) + Call(SpeakToPlayer, NPC_SELF, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_MAC_Housing_00B8) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_MAC_Housing_00B9) + Call(SpeakToPlayer, NPC_SELF, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_MAC_Housing_00BA) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_MAC_Housing_00BB) + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_MAC_Housing_00BC) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_MAC_Housing_00BD) + Call(SpeakToPlayer, NPC_Goombaria, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_MAC_Housing_00BE) + Set(GF_MAC04_HeardGoombaFamilyArgument, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_MAC_Housing_00BF) + EndIf + Call(EnablePartnerAI) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Goomama_Talk, ANIM_Goomama_Idle, 0, MSG_MAC_Housing_00B5) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Goombaria) = { - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_EQ(LVar0, PARTNER_GOOMBARIO) - EVT_CALL(DisablePartnerAI, 1) - EVT_IF_EQ(AF_MAC_30, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_MAC_Housing_00C1) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_MAC_Housing_00C2) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_MAC_Housing_00C3) - EVT_SET(AF_MAC_30, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_MAC_Housing_00C4) - EVT_END_IF - EVT_CALL(EnablePartnerAI) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_MAC_Housing_00C0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetCurrentPartnerID, LVar0) + IfEq(LVar0, PARTNER_GOOMBARIO) + Call(DisablePartnerAI, 1) + IfEq(AF_MAC_30, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_MAC_Housing_00C1) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_MAC_Housing_00C2) + Call(SpeakToPlayer, NPC_SELF, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_MAC_Housing_00C3) + Set(AF_MAC_30, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_MAC_Housing_00C4) + EndIf + Call(EnablePartnerAI) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Goombaria_Talk, ANIM_Goombaria_Idle, 0, MSG_MAC_Housing_00C0) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Goomama) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Goomama))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Goomama))) + Return + End }; EvtScript N(EVS_NpcInit_Goombaria) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Goombaria))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Goombaria))) + Return + End }; diff --git a/src/world/area_mac/mac_04/npc_gossip_trio.inc.c b/src/world/area_mac/mac_04/npc_gossip_trio.inc.c index e2d223d9f1a..214133e7849 100644 --- a/src/world/area_mac/mac_04/npc_gossip_trio.inc.c +++ b/src/world/area_mac/mac_04/npc_gossip_trio.inc.c @@ -1,83 +1,83 @@ EvtScript N(EVS_NpcInteract_GossipTrio) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Housing_0081) - EVT_SET(LVar1, MSG_MAC_Housing_0082) - EVT_SET(LVar2, MSG_MAC_Housing_0083) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Housing_0084) - EVT_SET(LVar1, MSG_MAC_Housing_0085) - EVT_SET(LVar2, MSG_MAC_Housing_0086) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Housing_0087) - EVT_SET(LVar1, MSG_MAC_Housing_0088) - EVT_SET(LVar2, MSG_MAC_Housing_0089) - EVT_CASE_LT(STORY_CH4_RETURNED_STOREROOM_KEY) - EVT_IF_EQ(GF_MAC04_StoreroomKeyStolen, FALSE) - EVT_SET(LVar0, MSG_MAC_Housing_008A) - EVT_SET(LVar1, MSG_MAC_Housing_008B) - EVT_SET(LVar2, MSG_MAC_Housing_008C) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Housing_008D) - EVT_SET(LVar1, MSG_MAC_Housing_008E) - EVT_SET(LVar2, MSG_MAC_Housing_008F) - EVT_END_IF - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Housing_0090) - EVT_SET(LVar1, MSG_MAC_Housing_0091) - EVT_SET(LVar2, MSG_MAC_Housing_0092) - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Housing_0093) - EVT_SET(LVar1, MSG_MAC_Housing_0094) - EVT_SET(LVar2, MSG_MAC_Housing_0095) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Housing_0096) - EVT_SET(LVar1, MSG_MAC_Housing_0097) - EVT_SET(LVar2, MSG_MAC_Housing_0098) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Housing_0099) - EVT_SET(LVar1, MSG_MAC_Housing_009A) - EVT_SET(LVar2, MSG_MAC_Housing_009B) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Housing_009C) - EVT_SET(LVar1, MSG_MAC_Housing_009D) - EVT_SET(LVar2, MSG_MAC_Housing_009E) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Housing_009F) - EVT_SET(LVar1, MSG_MAC_Housing_00A0) - EVT_SET(LVar2, MSG_MAC_Housing_00A1) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Housing_00A2) - EVT_SET(LVar1, MSG_MAC_Housing_00A3) - EVT_SET(LVar2, MSG_MAC_Housing_00A4) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Housing_00A5) - EVT_SET(LVar1, MSG_MAC_Housing_00A6) - EVT_SET(LVar2, MSG_MAC_Housing_00A7) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_GossipTrio1, ANIM_Toad_Green_Talk, ANIM_Toad_Green_Idle, 0, LVar0) - EVT_CALL(SpeakToPlayer, NPC_GossipTrio2, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVar1) - EVT_CALL(SpeakToPlayer, NPC_GossipTrio3, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, LVar2) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Housing_0081) + Set(LVar1, MSG_MAC_Housing_0082) + Set(LVar2, MSG_MAC_Housing_0083) + Else + Set(LVar0, MSG_MAC_Housing_0084) + Set(LVar1, MSG_MAC_Housing_0085) + Set(LVar2, MSG_MAC_Housing_0086) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Housing_0087) + Set(LVar1, MSG_MAC_Housing_0088) + Set(LVar2, MSG_MAC_Housing_0089) + CaseLt(STORY_CH4_RETURNED_STOREROOM_KEY) + IfEq(GF_MAC04_StoreroomKeyStolen, FALSE) + Set(LVar0, MSG_MAC_Housing_008A) + Set(LVar1, MSG_MAC_Housing_008B) + Set(LVar2, MSG_MAC_Housing_008C) + Else + Set(LVar0, MSG_MAC_Housing_008D) + Set(LVar1, MSG_MAC_Housing_008E) + Set(LVar2, MSG_MAC_Housing_008F) + EndIf + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Housing_0090) + Set(LVar1, MSG_MAC_Housing_0091) + Set(LVar2, MSG_MAC_Housing_0092) + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Housing_0093) + Set(LVar1, MSG_MAC_Housing_0094) + Set(LVar2, MSG_MAC_Housing_0095) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Housing_0096) + Set(LVar1, MSG_MAC_Housing_0097) + Set(LVar2, MSG_MAC_Housing_0098) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Housing_0099) + Set(LVar1, MSG_MAC_Housing_009A) + Set(LVar2, MSG_MAC_Housing_009B) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Housing_009C) + Set(LVar1, MSG_MAC_Housing_009D) + Set(LVar2, MSG_MAC_Housing_009E) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Housing_009F) + Set(LVar1, MSG_MAC_Housing_00A0) + Set(LVar2, MSG_MAC_Housing_00A1) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Housing_00A2) + Set(LVar1, MSG_MAC_Housing_00A3) + Set(LVar2, MSG_MAC_Housing_00A4) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Housing_00A5) + Set(LVar1, MSG_MAC_Housing_00A6) + Set(LVar2, MSG_MAC_Housing_00A7) + EndSwitch + Call(SpeakToPlayer, NPC_GossipTrio1, ANIM_Toad_Green_Talk, ANIM_Toad_Green_Idle, 0, LVar0) + Call(SpeakToPlayer, NPC_GossipTrio2, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVar1) + Call(SpeakToPlayer, NPC_GossipTrio3, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, LVar2) + Return + End }; EvtScript N(EVS_NpcInit_GossipTrio1) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_GossipTrio))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_GossipTrio))) + Return + End }; EvtScript N(EVS_NpcInit_GossipTrio2) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_GossipTrio))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_GossipTrio))) + Return + End }; EvtScript N(EVS_NpcInit_GossipTrio3) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_GossipTrio))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_GossipTrio))) + Return + End }; diff --git a/src/world/area_mac/mac_04/npc_harry_t.inc.c b/src/world/area_mac/mac_04/npc_harry_t.inc.c index 8c08fb1c623..66e08163cca 100644 --- a/src/world/area_mac/mac_04/npc_harry_t.inc.c +++ b/src/world/area_mac/mac_04/npc_harry_t.inc.c @@ -4,56 +4,56 @@ s32 N(ItemList_StoreroomKey)[] = { }; EvtScript N(EVS_NpcInteract_HarryT) = { - EVT_SET(LVar9, 0) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) - EVT_IF_LT(GB_StoryProgress, STORY_CH4_RETURNED_STOREROOM_KEY) - EVT_SET(LVar9, 1) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVar9, 1) - EVT_CALL(SpeakToPlayer, NPC_HarryT, ANIM_HarryT_Talk, ANIM_HarryT_Idle, 0, MSG_MAC_Housing_0001) - EVT_SET(LVar0, EVT_PTR(N(ItemList_StoreroomKey))) - EVT_SET(LVar1, 0) - EVT_EXEC_WAIT(N(EVS_ChooseKeyItem)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(-1) - EVT_CALL(SpeakToPlayer, NPC_HarryT, ANIM_HarryT_Talk, ANIM_HarryT_Idle, 0, MSG_MAC_Housing_0002) - EVT_CASE_EQ(0) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_HarryT, ANIM_HarryT_Talk, ANIM_HarryT_Idle, 0, MSG_MAC_Housing_0003) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcAnimation, NPC_HarryT, ANIM_HarryT_Run) - EVT_CALL(NpcMoveTo, NPC_HarryT, 295, -460, 0) - EVT_CALL(NpcMoveTo, NPC_HarryT, 230, -480, 0) - EVT_CALL(NpcJump0, NPC_HarryT, 198, 30, -480, 0) - EVT_CALL(NpcJump0, NPC_HarryT, 162, 40, -480, 0) - EVT_CALL(SetNpcAnimation, NPC_HarryT, ANIM_HarryT_Idle) - EVT_WAIT(20) - EVT_EXEC(N(EVS_ForceStoreroomUnlock)) - EVT_CALL(SetNpcAnimation, NPC_HarryT, ANIM_HarryT_Run) - EVT_CALL(NpcMoveTo, NPC_HarryT, 200, -524, 0) - EVT_CALL(SetNpcPos, NPC_HarryT, 200, 30, -524) - EVT_CALL(SetNpcAnimation, NPC_HarryT, ANIM_HarryT_Idle) - EVT_CALL(InterpNpcYaw, NPC_HarryT, 180, 0) - EVT_CALL(PlayerFaceNpc, NPC_HarryT, FALSE) - EVT_CALL(SpeakToPlayer, NPC_HarryT, ANIM_HarryT_Talk, ANIM_HarryT_Idle, 0, MSG_MAC_Housing_0005) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_GRAVITY, FALSE) - EVT_SET(GB_StoryProgress, STORY_CH4_RETURNED_STOREROOM_KEY) - EVT_END_SWITCH - EVT_ELSE - EVT_EXEC_WAIT(EVS_ShopOwnerDialog) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVar9, 0) + IfGe(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) + IfLt(GB_StoryProgress, STORY_CH4_RETURNED_STOREROOM_KEY) + Set(LVar9, 1) + EndIf + EndIf + IfEq(LVar9, 1) + Call(SpeakToPlayer, NPC_HarryT, ANIM_HarryT_Talk, ANIM_HarryT_Idle, 0, MSG_MAC_Housing_0001) + Set(LVar0, Ref(N(ItemList_StoreroomKey))) + Set(LVar1, 0) + ExecWait(N(EVS_ChooseKeyItem)) + Switch(LVar0) + CaseEq(-1) + Call(SpeakToPlayer, NPC_HarryT, ANIM_HarryT_Talk, ANIM_HarryT_Idle, 0, MSG_MAC_Housing_0002) + CaseEq(0) + CaseDefault + Call(SpeakToPlayer, NPC_HarryT, ANIM_HarryT_Talk, ANIM_HarryT_Idle, 0, MSG_MAC_Housing_0003) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcAnimation, NPC_HarryT, ANIM_HarryT_Run) + Call(NpcMoveTo, NPC_HarryT, 295, -460, 0) + Call(NpcMoveTo, NPC_HarryT, 230, -480, 0) + Call(NpcJump0, NPC_HarryT, 198, 30, -480, 0) + Call(NpcJump0, NPC_HarryT, 162, 40, -480, 0) + Call(SetNpcAnimation, NPC_HarryT, ANIM_HarryT_Idle) + Wait(20) + Exec(N(EVS_ForceStoreroomUnlock)) + Call(SetNpcAnimation, NPC_HarryT, ANIM_HarryT_Run) + Call(NpcMoveTo, NPC_HarryT, 200, -524, 0) + Call(SetNpcPos, NPC_HarryT, 200, 30, -524) + Call(SetNpcAnimation, NPC_HarryT, ANIM_HarryT_Idle) + Call(InterpNpcYaw, NPC_HarryT, 180, 0) + Call(PlayerFaceNpc, NPC_HarryT, FALSE) + Call(SpeakToPlayer, NPC_HarryT, ANIM_HarryT_Talk, ANIM_HarryT_Idle, 0, MSG_MAC_Housing_0005) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_GRAVITY, FALSE) + Set(GB_StoryProgress, STORY_CH4_RETURNED_STOREROOM_KEY) + EndSwitch + Else + ExecWait(EVS_ShopOwnerDialog) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_HarryT) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_HarryT))) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) - EVT_IF_LT(GB_StoryProgress, STORY_CH4_RETURNED_STOREROOM_KEY) - EVT_CALL(SetNpcAnimation, NPC_HarryT, ANIM_HarryT_Idle) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_HarryT))) + IfGe(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) + IfLt(GB_StoryProgress, STORY_CH4_RETURNED_STOREROOM_KEY) + Call(SetNpcAnimation, NPC_HarryT, ANIM_HarryT_Idle) + EndIf + EndIf + Return + End }; diff --git a/src/world/area_mac/mac_04/npc_muskular.inc.c b/src/world/area_mac/mac_04/npc_muskular.inc.c index d72e9d51701..d92757e7bbf 100644 --- a/src/world/area_mac/mac_04/npc_muskular.inc.c +++ b/src/world/area_mac/mac_04/npc_muskular.inc.c @@ -11,213 +11,213 @@ API_CALLABLE(N(UpgradeStarPowerCh4)) { } EvtScript N(EVS_NpcIdle_Muskular) = { - EVT_LOOP(0) - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Loop(10) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 1) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Loop(10) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 1) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_Scene_RescuedMuskular) = { - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(func_802CF56C, 2) - EVT_CALL(SetNpcPos, NPC_Muskular, -520, 40, 270) - EVT_CALL(PlayerFaceNpc, NPC_Muskular, FALSE) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Muskular, 0) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -420, 20, 235) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -470, 20, 250) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForPlayerInputEnabled) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(40 * DT) - EVT_CALL(SpeakToPlayer, NPC_Muskular, ANIM_WorldMuskular_Talk, ANIM_WorldMuskular_Idle, 512, MSG_MAC_Housing_00C5) - EVT_CALL(GetNpcPos, NPC_Muskular, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, -300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.5), -9) + Call(DisablePartnerAI, 0) + Call(func_802CF56C, 2) + Call(SetNpcPos, NPC_Muskular, -520, 40, 270) + Call(PlayerFaceNpc, NPC_Muskular, FALSE) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Muskular, 0) + Call(UseSettingsFrom, CAM_DEFAULT, -420, 20, 235) + Call(SetPanTarget, CAM_DEFAULT, -470, 20, 250) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForPlayerInputEnabled) + Call(DisablePlayerInput, TRUE) + Wait(40 * DT) + Call(SpeakToPlayer, NPC_Muskular, ANIM_WorldMuskular_Talk, ANIM_WorldMuskular_Idle, 512, MSG_MAC_Housing_00C5) + Call(GetNpcPos, NPC_Muskular, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, -300) + Call(SetCamPitch, CAM_DEFAULT, Float(17.5), -9) #if VERSION_PAL - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.6)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.6)) #else - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 3) + Call(SetCamSpeed, CAM_DEFAULT, 3) #endif - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Muskular, ANIM_WorldMuskular_Talk, ANIM_WorldMuskular_Idle, 512, MSG_MAC_Housing_00C6) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -470, 20, 250) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(MakeLerp, 0, 360, 10 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Muskular, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(EnableNpcAI, NPC_Muskular, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Muskular, ANIM_WorldMuskular_Leap) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_UsePower) - EVT_CALL(PlaySoundAtPlayer, SOUND_RECEIVE_STAR_POWER, SOUND_SPACE_DEFAULT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar1) - EVT_ADD(LVar0, 10) - EVT_ADD(LVar1, 50) - EVT_ADD(LVar2, 10) - EVT_ADD(LVar3, 30) - EVT_LOOP(5) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 20) - EVT_WAIT(6 * DT) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 1, LVar0, LVar3, LVar2, 20) - EVT_WAIT(6 * DT) - EVT_END_LOOP - EVT_WAIT(20 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_GET_STAR_POWER_WAVE, SOUND_SPACE_DEFAULT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 30) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetNpcAnimation, NPC_Muskular, ANIM_WorldMuskular_Idle) - EVT_CALL(EnableNpcAI, NPC_Muskular, TRUE) - EVT_CALL(N(UpgradeStarPowerCh4)) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0194, 160, 40) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Muskular, ANIM_WorldMuskular_Talk, ANIM_WorldMuskular_Idle, 512, MSG_MAC_Housing_00C7) - EVT_CALL(ShowMessageAtScreenPos, MSG_MAC_Housing_00C8, 160, 40) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -470, 20, 250) - EVT_CALL(SetCamDistance, CAM_DEFAULT, -500) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.5), -9) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_WAIT(1) - EVT_CALL(SetNpcPos, NPC_Twink, -600, 200, 350) - EVT_CALL(NpcFlyTo, NPC_Twink, -437, 60, 270, 0, -10, EASING_LINEAR) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_CALL(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_MAC_Housing_00C9) - EVT_CALL(InterpNpcYaw, NPC_Twink, 270, 0) - EVT_WAIT(20 * DT) - EVT_CALL(NpcJump1, NPC_Twink, -460, 45, 220, 10 * DT) - EVT_CALL(SpeakToNpc, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 512, NPC_Muskular, MSG_MAC_Housing_00CA) - EVT_CALL(SetCamDistance, CAM_DEFAULT, -300) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(1) - EVT_CALL(SpeakToNpc, NPC_Muskular, ANIM_WorldMuskular_Talk, ANIM_WorldMuskular_Idle, 512, NPC_Twink, MSG_MAC_Housing_00CB) - EVT_CALL(SpeakToNpc, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, NPC_Muskular, MSG_MAC_Housing_00CC) - EVT_CALL(SpeakToNpc, NPC_Muskular, ANIM_WorldMuskular_Talk, ANIM_WorldMuskular_Idle, 512, NPC_Twink, MSG_MAC_Housing_00CD) - EVT_CALL(SpeakToNpc, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, NPC_Muskular, MSG_MAC_Housing_00CE) - EVT_CALL(GetNpcPos, NPC_Muskular, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, -300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.5), -9) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToNpc, NPC_Muskular, ANIM_WorldMuskular_Talk, ANIM_WorldMuskular_Idle, 512, NPC_Twink, MSG_MAC_Housing_00CF) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -450, 20, 250) - EVT_CALL(SetCamDistance, CAM_DEFAULT, -400) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcFlagBits, NPC_Muskular, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) - EVT_THREAD - EVT_LOOP(25) - EVT_CALL(GetNpcPos, NPC_Muskular, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 20) - EVT_WAIT(4 * DT) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 1800) - EVT_CALL(MakeLerp, LVar2, LVar3, 100 * DT, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Muskular, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Muskular, LVar2, LVar3, LVar4) - EVT_SET(LVar5, LVar3) - EVT_ADD(LVar5, 180) - EVT_CALL(MakeLerp, LVar3, LVar5, 100 * DT, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, NPC_Muskular, LVar2, LVar0, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_Muskular, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(15 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Muskular, SOUND_STAR_SPIRIT_DEPART_1, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_WAIT(115 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetMusicTrack, 0, SONG_TWINK_THEME, 0, 8) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -450, 20, 250) - EVT_CALL(SetCamDistance, CAM_DEFAULT, -350) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Muskular, ANIM_WorldMuskular_Talk, ANIM_WorldMuskular_Idle, 512, MSG_MAC_Housing_00C6) + Call(SetPanTarget, CAM_DEFAULT, -470, 20, 250) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(MakeLerp, 0, 360, 10 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Muskular, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(EnableNpcAI, NPC_Muskular, FALSE) + Call(SetNpcAnimation, NPC_Muskular, ANIM_WorldMuskular_Leap) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_UsePower) + Call(PlaySoundAtPlayer, SOUND_RECEIVE_STAR_POWER, SOUND_SPACE_DEFAULT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar3, LVar1) + Add(LVar0, 10) + Add(LVar1, 50) + Add(LVar2, 10) + Add(LVar3, 30) + Loop(5) + PlayEffect(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 20) + Wait(6 * DT) + PlayEffect(EFFECT_SPARKLES, 1, LVar0, LVar3, LVar2, 20) + Wait(6 * DT) + EndLoop + Wait(20 * DT) + Call(PlaySoundAtPlayer, SOUND_GET_STAR_POWER_WAVE, SOUND_SPACE_DEFAULT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 20) + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 30) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetNpcAnimation, NPC_Muskular, ANIM_WorldMuskular_Idle) + Call(EnableNpcAI, NPC_Muskular, TRUE) + Call(N(UpgradeStarPowerCh4)) + Call(ShowMessageAtScreenPos, MSG_Menus_0194, 160, 40) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Muskular, ANIM_WorldMuskular_Talk, ANIM_WorldMuskular_Idle, 512, MSG_MAC_Housing_00C7) + Call(ShowMessageAtScreenPos, MSG_MAC_Housing_00C8, 160, 40) + Call(SetPanTarget, CAM_DEFAULT, -470, 20, 250) + Call(SetCamDistance, CAM_DEFAULT, -500) + Call(SetCamPitch, CAM_DEFAULT, Float(17.5), -9) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Wait(1) + Call(SetNpcPos, NPC_Twink, -600, 200, 350) + Call(NpcFlyTo, NPC_Twink, -437, 60, 270, 0, -10, EASING_LINEAR) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Call(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_MAC_Housing_00C9) + Call(InterpNpcYaw, NPC_Twink, 270, 0) + Wait(20 * DT) + Call(NpcJump1, NPC_Twink, -460, 45, 220, 10 * DT) + Call(SpeakToNpc, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 512, NPC_Muskular, MSG_MAC_Housing_00CA) + Call(SetCamDistance, CAM_DEFAULT, -300) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(1) + Call(SpeakToNpc, NPC_Muskular, ANIM_WorldMuskular_Talk, ANIM_WorldMuskular_Idle, 512, NPC_Twink, MSG_MAC_Housing_00CB) + Call(SpeakToNpc, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, NPC_Muskular, MSG_MAC_Housing_00CC) + Call(SpeakToNpc, NPC_Muskular, ANIM_WorldMuskular_Talk, ANIM_WorldMuskular_Idle, 512, NPC_Twink, MSG_MAC_Housing_00CD) + Call(SpeakToNpc, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, NPC_Muskular, MSG_MAC_Housing_00CE) + Call(GetNpcPos, NPC_Muskular, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, -300) + Call(SetCamPitch, CAM_DEFAULT, Float(17.5), -9) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(SpeakToNpc, NPC_Muskular, ANIM_WorldMuskular_Talk, ANIM_WorldMuskular_Idle, 512, NPC_Twink, MSG_MAC_Housing_00CF) + Call(SetPanTarget, CAM_DEFAULT, -450, 20, 250) + Call(SetCamDistance, CAM_DEFAULT, -400) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetNpcFlagBits, NPC_Muskular, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) + Thread + Loop(25) + Call(GetNpcPos, NPC_Muskular, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 20) + Wait(4 * DT) + EndLoop + EndThread + Thread + Set(LVar2, 0) + Set(LVar3, 1800) + Call(MakeLerp, LVar2, LVar3, 100 * DT, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Muskular, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(GetNpcPos, NPC_Muskular, LVar2, LVar3, LVar4) + Set(LVar5, LVar3) + Add(LVar5, 180) + Call(MakeLerp, LVar3, LVar5, 100 * DT, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetNpcPos, NPC_Muskular, LVar2, LVar0, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcPos, NPC_Muskular, NPC_DISPOSE_LOCATION) + EndThread + Thread + Wait(15 * DT) + Call(PlaySoundAtNpc, NPC_Muskular, SOUND_STAR_SPIRIT_DEPART_1, SOUND_SPACE_DEFAULT) + EndThread + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Wait(115 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetMusicTrack, 0, SONG_TWINK_THEME, 0, 8) + Call(SetPanTarget, CAM_DEFAULT, -450, 20, 250) + Call(SetCamDistance, CAM_DEFAULT, -350) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) #if VERSION_PAL - EVT_CALL(SetNpcSpeed, NPC_Twink, EVT_FLOAT(4.8)) + Call(SetNpcSpeed, NPC_Twink, Float(4.8)) #else -EVT_CALL(SetNpcSpeed, NPC_Twink, 4) +Call(SetNpcSpeed, NPC_Twink, 4) #endif - EVT_CALL(NpcFlyTo, NPC_Twink, -480, 40, 270, 0, 10, EASING_LINEAR) - EVT_CALL(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_MAC_Housing_00D0) - EVT_CALL(InterpNpcYaw, NPC_Twink, 270, 0) - EVT_WAIT(30 * DT) - EVT_CALL(NpcFacePlayer, NPC_Twink, 0) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_MAC_Housing_00D1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Question) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_MAC_Housing_00D2) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_MAC_Housing_00D3) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(NpcFlyTo, NPC_Twink, -600, 200, 350, 0, -10, EASING_LINEAR) - EVT_CALL(SetNpcPos, NPC_Twink, NPC_DISPOSE_LOCATION) - EVT_SET(GB_StoryProgress, STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(NpcFlyTo, NPC_Twink, -480, 40, 270, 0, 10, EASING_LINEAR) + Call(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_MAC_Housing_00D0) + Call(InterpNpcYaw, NPC_Twink, 270, 0) + Wait(30 * DT) + Call(NpcFacePlayer, NPC_Twink, 0) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_MAC_Housing_00D1) + Call(SetPlayerAnimation, ANIM_Mario1_Question) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_MAC_Housing_00D2) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + Wait(30 * DT) + Call(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_MAC_Housing_00D3) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(NpcFlyTo, NPC_Twink, -600, 200, 350, 0, -10, EASING_LINEAR) + Call(SetNpcPos, NPC_Twink, NPC_DISPOSE_LOCATION) + Set(GB_StoryProgress, STORY_CH4_STAR_SPRIT_DEPARTED) + Exec(N(EVS_SetupMusic)) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Muskular) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, mac_04_ENTRY_5) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Muskular))) - EVT_EXEC(N(EVS_Scene_RescuedMuskular)) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, mac_04_ENTRY_5) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Muskular))) + Exec(N(EVS_Scene_RescuedMuskular)) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; diff --git a/src/world/area_mac/mac_04/npc_new_residents.inc.c b/src/world/area_mac/mac_04/npc_new_residents.inc.c index b52427f9206..da3de8de773 100644 --- a/src/world/area_mac/mac_04/npc_new_residents.inc.c +++ b/src/world/area_mac/mac_04/npc_new_residents.inc.c @@ -1,89 +1,89 @@ EvtScript N(EVS_NpcInteract_NewResident1) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Housing_0006) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Housing_0007) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Housing_0008) - EVT_CASE_LT(STORY_CH4_RETURNED_STOREROOM_KEY) - EVT_IF_EQ(GF_MAC04_StoreroomKeyStolen, FALSE) - EVT_SET(LVar0, MSG_MAC_Housing_0009) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Housing_000A) - EVT_END_IF - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Housing_000B) - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Housing_000C) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Housing_000D) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Housing_000E) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Housing_000F) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Housing_0010) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Housing_0011) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Housing_0012) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toadette_Green_Talk, ANIM_Toadette_Green_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Housing_0006) + Else + Set(LVar0, MSG_MAC_Housing_0007) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Housing_0008) + CaseLt(STORY_CH4_RETURNED_STOREROOM_KEY) + IfEq(GF_MAC04_StoreroomKeyStolen, FALSE) + Set(LVar0, MSG_MAC_Housing_0009) + Else + Set(LVar0, MSG_MAC_Housing_000A) + EndIf + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Housing_000B) + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Housing_000C) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Housing_000D) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Housing_000E) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Housing_000F) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Housing_0010) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Housing_0011) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Housing_0012) + EndSwitch + Call(SpeakToPlayer, NPC_SELF, ANIM_Toadette_Green_Talk, ANIM_Toadette_Green_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_NewResident1) = { - EVT_SET(AF_MAC_2D, FALSE) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_NewResident1))) - EVT_RETURN - EVT_END + Set(AF_MAC_2D, FALSE) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_NewResident1))) + Return + End }; EvtScript N(EVS_NpcInteract_NewResident2) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Housing_0013) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Housing_0014) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Housing_0015) - EVT_CASE_LT(STORY_CH4_RETURNED_STOREROOM_KEY) - EVT_IF_EQ(GF_MAC04_StoreroomKeyStolen, FALSE) - EVT_SET(LVar0, MSG_MAC_Housing_0016) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Housing_0017) - EVT_END_IF - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Housing_0018) - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Housing_0019) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Housing_001A) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Housing_001B) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Housing_001C) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Housing_001D) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Housing_001E) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Housing_001F) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toadette_Purple_Talk, ANIM_Toadette_Purple_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Housing_0013) + Else + Set(LVar0, MSG_MAC_Housing_0014) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Housing_0015) + CaseLt(STORY_CH4_RETURNED_STOREROOM_KEY) + IfEq(GF_MAC04_StoreroomKeyStolen, FALSE) + Set(LVar0, MSG_MAC_Housing_0016) + Else + Set(LVar0, MSG_MAC_Housing_0017) + EndIf + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Housing_0018) + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Housing_0019) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Housing_001A) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Housing_001B) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Housing_001C) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Housing_001D) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Housing_001E) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Housing_001F) + EndSwitch + Call(SpeakToPlayer, NPC_SELF, ANIM_Toadette_Purple_Talk, ANIM_Toadette_Purple_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_NewResident2) = { - EVT_SET(AF_MAC_2E, FALSE) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_NewResident2))) - EVT_RETURN - EVT_END + Set(AF_MAC_2E, FALSE) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_NewResident2))) + Return + End }; diff --git a/src/world/area_mac/mac_04/npc_toad_01.inc.c b/src/world/area_mac/mac_04/npc_toad_01.inc.c index 81577d9b4b0..bc8b23c9279 100644 --- a/src/world/area_mac/mac_04/npc_toad_01.inc.c +++ b/src/world/area_mac/mac_04/npc_toad_01.inc.c @@ -1,43 +1,43 @@ EvtScript N(EVS_NpcInteract_Toad_01) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Housing_0020) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Housing_0021) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Housing_0022) - EVT_CASE_LT(STORY_CH4_RETURNED_STOREROOM_KEY) - EVT_IF_EQ(GF_MAC04_StoreroomKeyStolen, FALSE) - EVT_SET(LVar0, MSG_MAC_Housing_0023) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Housing_0024) - EVT_END_IF - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Housing_0025) - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Housing_0026) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Housing_0027) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Housing_0028) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Housing_0029) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Housing_002A) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Housing_002B) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Housing_002C) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Housing_0020) + Else + Set(LVar0, MSG_MAC_Housing_0021) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Housing_0022) + CaseLt(STORY_CH4_RETURNED_STOREROOM_KEY) + IfEq(GF_MAC04_StoreroomKeyStolen, FALSE) + Set(LVar0, MSG_MAC_Housing_0023) + Else + Set(LVar0, MSG_MAC_Housing_0024) + EndIf + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Housing_0025) + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Housing_0026) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Housing_0027) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Housing_0028) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Housing_0029) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Housing_002A) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Housing_002B) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Housing_002C) + EndSwitch + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_Toad_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_01))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_01))) + Return + End }; diff --git a/src/world/area_mac/mac_04/npc_toad_02.inc.c b/src/world/area_mac/mac_04/npc_toad_02.inc.c index cb4c12a65ad..758b63dc21b 100644 --- a/src/world/area_mac/mac_04/npc_toad_02.inc.c +++ b/src/world/area_mac/mac_04/npc_toad_02.inc.c @@ -1,43 +1,43 @@ EvtScript N(EVS_NpcInteract_Toad_02) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Housing_002D) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Housing_002E) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Housing_002F) - EVT_CASE_LT(STORY_CH4_RETURNED_STOREROOM_KEY) - EVT_IF_EQ(GF_MAC04_StoreroomKeyStolen, FALSE) - EVT_SET(LVar0, MSG_MAC_Housing_0030) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Housing_0031) - EVT_END_IF - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Housing_0032) - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Housing_0033) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Housing_0034) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Housing_0035) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Housing_0036) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Housing_0037) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Housing_0038) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Housing_0039) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Housing_002D) + Else + Set(LVar0, MSG_MAC_Housing_002E) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Housing_002F) + CaseLt(STORY_CH4_RETURNED_STOREROOM_KEY) + IfEq(GF_MAC04_StoreroomKeyStolen, FALSE) + Set(LVar0, MSG_MAC_Housing_0030) + Else + Set(LVar0, MSG_MAC_Housing_0031) + EndIf + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Housing_0032) + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Housing_0033) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Housing_0034) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Housing_0035) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Housing_0036) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Housing_0037) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Housing_0038) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Housing_0039) + EndSwitch + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_Toad_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_02))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_02))) + Return + End }; diff --git a/src/world/area_mac/mac_04/npc_toad_03.inc.c b/src/world/area_mac/mac_04/npc_toad_03.inc.c index c9debd37b95..4b8d14d4453 100644 --- a/src/world/area_mac/mac_04/npc_toad_03.inc.c +++ b/src/world/area_mac/mac_04/npc_toad_03.inc.c @@ -1,43 +1,43 @@ EvtScript N(EVS_NpcInteract_Toad_03) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Housing_0074) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Housing_0075) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Housing_0076) - EVT_CASE_LT(STORY_CH4_RETURNED_STOREROOM_KEY) - EVT_IF_EQ(GF_MAC04_StoreroomKeyStolen, FALSE) - EVT_SET(LVar0, MSG_MAC_Housing_0077) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Housing_0078) - EVT_END_IF - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Housing_0079) - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Housing_007A) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Housing_007B) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Housing_007C) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Housing_007D) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Housing_007E) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Housing_007F) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Housing_0080) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Green_Talk, ANIM_Toad_Green_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Housing_0074) + Else + Set(LVar0, MSG_MAC_Housing_0075) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Housing_0076) + CaseLt(STORY_CH4_RETURNED_STOREROOM_KEY) + IfEq(GF_MAC04_StoreroomKeyStolen, FALSE) + Set(LVar0, MSG_MAC_Housing_0077) + Else + Set(LVar0, MSG_MAC_Housing_0078) + EndIf + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Housing_0079) + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Housing_007A) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Housing_007B) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Housing_007C) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Housing_007D) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Housing_007E) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Housing_007F) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Housing_0080) + EndSwitch + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Green_Talk, ANIM_Toad_Green_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_Toad_03) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_03))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_03))) + Return + End }; diff --git a/src/world/area_mac/mac_04/npc_toad_kids.inc.c b/src/world/area_mac/mac_04/npc_toad_kids.inc.c index 52fc492cd9b..ae910df1fd3 100644 --- a/src/world/area_mac/mac_04/npc_toad_kids.inc.c +++ b/src/world/area_mac/mac_04/npc_toad_kids.inc.c @@ -1,83 +1,83 @@ EvtScript N(EVS_NpcInteract_ToadKids) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Housing_003A) - EVT_SET(LVar1, MSG_MAC_Housing_003B) - EVT_SET(LVar2, MSG_MAC_Housing_003C) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Housing_003D) - EVT_SET(LVar1, MSG_MAC_Housing_003E) - EVT_SET(LVar2, MSG_MAC_Housing_003F) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Housing_0040) - EVT_SET(LVar1, MSG_MAC_Housing_0041) - EVT_SET(LVar2, MSG_MAC_Housing_0042) - EVT_CASE_LT(STORY_CH4_RETURNED_STOREROOM_KEY) - EVT_IF_EQ(GF_MAC04_StoreroomKeyStolen, FALSE) - EVT_SET(LVar0, MSG_MAC_Housing_0043) - EVT_SET(LVar1, MSG_MAC_Housing_0044) - EVT_SET(LVar2, MSG_MAC_Housing_0045) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Housing_0046) - EVT_SET(LVar1, MSG_MAC_Housing_0047) - EVT_SET(LVar2, MSG_MAC_Housing_0048) - EVT_END_IF - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Housing_0049) - EVT_SET(LVar1, MSG_MAC_Housing_004A) - EVT_SET(LVar2, MSG_MAC_Housing_004B) - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Housing_004C) - EVT_SET(LVar1, MSG_MAC_Housing_004D) - EVT_SET(LVar2, MSG_MAC_Housing_004E) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Housing_004F) - EVT_SET(LVar1, MSG_MAC_Housing_0050) - EVT_SET(LVar2, MSG_MAC_Housing_0051) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Housing_0052) - EVT_SET(LVar1, MSG_MAC_Housing_0053) - EVT_SET(LVar2, MSG_MAC_Housing_0054) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Housing_0055) - EVT_SET(LVar1, MSG_MAC_Housing_0056) - EVT_SET(LVar2, MSG_MAC_Housing_0057) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Housing_0058) - EVT_SET(LVar1, MSG_MAC_Housing_0059) - EVT_SET(LVar2, MSG_MAC_Housing_005A) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Housing_005B) - EVT_SET(LVar1, MSG_MAC_Housing_005C) - EVT_SET(LVar2, MSG_MAC_Housing_005D) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Housing_005E) - EVT_SET(LVar1, MSG_MAC_Housing_005F) - EVT_SET(LVar2, MSG_MAC_Housing_0060) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_ToadKid_01, ANIM_ToadKid_Red_Talk, ANIM_ToadKid_Red_Idle, 0, LVar0) - EVT_CALL(SpeakToPlayer, NPC_ToadKid_02, ANIM_ToadKid_Yellow_Talk, ANIM_ToadKid_Yellow_Idle, 0, LVar1) - EVT_CALL(SpeakToPlayer, NPC_ToadKid_03, ANIM_ToadKid_Green_Talk, ANIM_ToadKid_Green_Idle, 0, LVar2) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Housing_003A) + Set(LVar1, MSG_MAC_Housing_003B) + Set(LVar2, MSG_MAC_Housing_003C) + Else + Set(LVar0, MSG_MAC_Housing_003D) + Set(LVar1, MSG_MAC_Housing_003E) + Set(LVar2, MSG_MAC_Housing_003F) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Housing_0040) + Set(LVar1, MSG_MAC_Housing_0041) + Set(LVar2, MSG_MAC_Housing_0042) + CaseLt(STORY_CH4_RETURNED_STOREROOM_KEY) + IfEq(GF_MAC04_StoreroomKeyStolen, FALSE) + Set(LVar0, MSG_MAC_Housing_0043) + Set(LVar1, MSG_MAC_Housing_0044) + Set(LVar2, MSG_MAC_Housing_0045) + Else + Set(LVar0, MSG_MAC_Housing_0046) + Set(LVar1, MSG_MAC_Housing_0047) + Set(LVar2, MSG_MAC_Housing_0048) + EndIf + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Housing_0049) + Set(LVar1, MSG_MAC_Housing_004A) + Set(LVar2, MSG_MAC_Housing_004B) + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Housing_004C) + Set(LVar1, MSG_MAC_Housing_004D) + Set(LVar2, MSG_MAC_Housing_004E) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Housing_004F) + Set(LVar1, MSG_MAC_Housing_0050) + Set(LVar2, MSG_MAC_Housing_0051) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Housing_0052) + Set(LVar1, MSG_MAC_Housing_0053) + Set(LVar2, MSG_MAC_Housing_0054) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Housing_0055) + Set(LVar1, MSG_MAC_Housing_0056) + Set(LVar2, MSG_MAC_Housing_0057) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Housing_0058) + Set(LVar1, MSG_MAC_Housing_0059) + Set(LVar2, MSG_MAC_Housing_005A) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Housing_005B) + Set(LVar1, MSG_MAC_Housing_005C) + Set(LVar2, MSG_MAC_Housing_005D) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Housing_005E) + Set(LVar1, MSG_MAC_Housing_005F) + Set(LVar2, MSG_MAC_Housing_0060) + EndSwitch + Call(SpeakToPlayer, NPC_ToadKid_01, ANIM_ToadKid_Red_Talk, ANIM_ToadKid_Red_Idle, 0, LVar0) + Call(SpeakToPlayer, NPC_ToadKid_02, ANIM_ToadKid_Yellow_Talk, ANIM_ToadKid_Yellow_Idle, 0, LVar1) + Call(SpeakToPlayer, NPC_ToadKid_03, ANIM_ToadKid_Green_Talk, ANIM_ToadKid_Green_Idle, 0, LVar2) + Return + End }; EvtScript N(EVS_NpcInit_ToadKid_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ToadKids))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ToadKids))) + Return + End }; EvtScript N(EVS_NpcInit_ToadKid_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ToadKids))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ToadKids))) + Return + End }; EvtScript N(EVS_NpcInit_ToadKid_03) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ToadKids))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ToadKids))) + Return + End }; diff --git a/src/world/area_mac/mac_04/npc_toadette_03.inc.c b/src/world/area_mac/mac_04/npc_toadette_03.inc.c index 51a4e713006..be9e6949eae 100644 --- a/src/world/area_mac/mac_04/npc_toadette_03.inc.c +++ b/src/world/area_mac/mac_04/npc_toadette_03.inc.c @@ -1,62 +1,62 @@ EvtScript N(EVS_NpcInteract_Toadette_03) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Housing_0061) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Housing_0062) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Housing_0063) - EVT_CASE_LT(STORY_CH4_ENTERED_THE_TOY_BOX) - EVT_SET(LVar0, MSG_MAC_Housing_0064) - EVT_CASE_LT(STORY_CH4_GOT_STOREROOM_KEY) - EVT_SET(LVar0, MSG_MAC_Housing_0065) - EVT_CASE_LT(STORY_CH4_RETURNED_STOREROOM_KEY) - EVT_SET(LVar0, MSG_MAC_Housing_0066) - EVT_CASE_LT(STORY_CH4_GOT_FRYING_PAN) - EVT_SET(LVar0, MSG_MAC_Housing_0067) - EVT_CASE_LT(STORY_CH4_GOT_TAYCE_TS_CAKE) - EVT_SET(LVar0, MSG_MAC_Housing_0068) - EVT_CASE_LT(STORY_CH4_SOLVED_COLOR_PUZZLE) - EVT_CALL(FindKeyItem, ITEM_MYSTERY_NOTE, LVar0) - EVT_IF_EQ(LVar0, -1) - EVT_IF_EQ(GF_MAC00_DictionaryReturned, FALSE) - EVT_SET(LVar0, MSG_MAC_Housing_0069) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Housing_006B) - EVT_END_IF - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Housing_006A) - EVT_END_IF - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Housing_006C) - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Housing_006D) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Housing_006E) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Housing_006F) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Housing_0070) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Housing_0071) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Housing_0072) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Housing_0073) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toadette_Orange_Talk, ANIM_Toadette_Orange_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Housing_0061) + Else + Set(LVar0, MSG_MAC_Housing_0062) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Housing_0063) + CaseLt(STORY_CH4_ENTERED_THE_TOY_BOX) + Set(LVar0, MSG_MAC_Housing_0064) + CaseLt(STORY_CH4_GOT_STOREROOM_KEY) + Set(LVar0, MSG_MAC_Housing_0065) + CaseLt(STORY_CH4_RETURNED_STOREROOM_KEY) + Set(LVar0, MSG_MAC_Housing_0066) + CaseLt(STORY_CH4_GOT_FRYING_PAN) + Set(LVar0, MSG_MAC_Housing_0067) + CaseLt(STORY_CH4_GOT_TAYCE_TS_CAKE) + Set(LVar0, MSG_MAC_Housing_0068) + CaseLt(STORY_CH4_SOLVED_COLOR_PUZZLE) + Call(FindKeyItem, ITEM_MYSTERY_NOTE, LVar0) + IfEq(LVar0, -1) + IfEq(GF_MAC00_DictionaryReturned, FALSE) + Set(LVar0, MSG_MAC_Housing_0069) + Else + Set(LVar0, MSG_MAC_Housing_006B) + EndIf + Else + Set(LVar0, MSG_MAC_Housing_006A) + EndIf + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Housing_006C) + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Housing_006D) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Housing_006E) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Housing_006F) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Housing_0070) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Housing_0071) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Housing_0072) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Housing_0073) + EndSwitch + Call(SpeakToPlayer, NPC_SELF, ANIM_Toadette_Orange_Talk, ANIM_Toadette_Orange_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_Toadette_03) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH3_STAR_SPIRIT_RESCUED, STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_CALL(SetNpcPos, NPC_SELF, -300, 0, 325) - EVT_END_SWITCH - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toadette_03))) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseRange(STORY_CH3_STAR_SPIRIT_RESCUED, STORY_CH4_STAR_SPRIT_DEPARTED) + Call(SetNpcPos, NPC_SELF, -300, 0, 325) + EndSwitch + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toadette_03))) + Return + End }; diff --git a/src/world/area_mac/mac_04/npc_toybox_shyguy.inc.c b/src/world/area_mac/mac_04/npc_toybox_shyguy.inc.c index 721322e5dff..d429c4150c0 100644 --- a/src/world/area_mac/mac_04/npc_toybox_shyguy.inc.c +++ b/src/world/area_mac/mac_04/npc_toybox_shyguy.inc.c @@ -10,246 +10,246 @@ API_CALLABLE(N(IsPartnerBow)) { } EvtScript N(EVS_ShyGuy_PlayFootstepSounds) = { - EVT_LOOP(0) - EVT_CALL(PlaySoundAtNpc, LVar0, SOUND_SEQ_SHY_GUY_STEP, SOUND_SPACE_DEFAULT) - EVT_WAIT(2) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(PlaySoundAtNpc, LVar0, SOUND_SEQ_SHY_GUY_STEP, SOUND_SPACE_DEFAULT) + Wait(2) + EndLoop + Return + End }; EvtScript N(EVS_SuspiciousGuy_OpenDoor) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilit_hu, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_SET(LVar0, 0) - EVT_LOOP(20) - EVT_ADD(LVar0, 3) - EVT_CALL(RotateModel, MODEL_hh_door, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(LVar0, 90) - EVT_CALL(RotateModel, MODEL_hh_door, LVar0, 0, -1, 0) - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_deilit_hu, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Set(LVar0, 0) + Loop(20) + Add(LVar0, 3) + Call(RotateModel, MODEL_hh_door, LVar0, 0, -1, 0) + Wait(1) + EndLoop + Set(LVar0, 90) + Call(RotateModel, MODEL_hh_door, LVar0, 0, -1, 0) + Return + End }; EvtScript N(EVS_SuspiciousGuy_CloseDoor) = { - EVT_SET(LVar0, 90) - EVT_LOOP(20) - EVT_ADD(LVar0, -3) - EVT_CALL(RotateModel, MODEL_hh_door, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(LVar0, 0) - EVT_CALL(RotateModel, MODEL_hh_door, LVar0, 0, -1, 0) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilit_hu, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_RETURN - EVT_END + Set(LVar0, 90) + Loop(20) + Add(LVar0, -3) + Call(RotateModel, MODEL_hh_door, LVar0, 0, -1, 0) + Wait(1) + EndLoop + Set(LVar0, 0) + Call(RotateModel, MODEL_hh_door, LVar0, 0, -1, 0) + Call(PlaySoundAtCollider, COLLIDER_deilit_hu, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Return + End }; EvtScript N(EVS_OpenSecretDoor) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilit_hk, SOUND_OMO_SECRET_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_SET(LVar0, 0) - EVT_LOOP(36) - EVT_ADD(LVar0, 10) - EVT_CALL(RotateModel, MODEL_hkai1, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_hkai2, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(LVar0, 0) - EVT_CALL(RotateModel, MODEL_hkai1, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_hkai2, LVar0, 0, 1, 0) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilit_hk, SOUND_OMO_SECRET_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySound, SOUND_CHIME_BEGIN_AMBUSH) - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_deilit_hk, SOUND_OMO_SECRET_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Set(LVar0, 0) + Loop(36) + Add(LVar0, 10) + Call(RotateModel, MODEL_hkai1, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_hkai2, LVar0, 0, 1, 0) + Wait(1) + EndLoop + Set(LVar0, 0) + Call(RotateModel, MODEL_hkai1, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_hkai2, LVar0, 0, 1, 0) + Call(PlaySoundAtCollider, COLLIDER_deilit_hk, SOUND_OMO_SECRET_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Call(PlaySound, SOUND_CHIME_BEGIN_AMBUSH) + Return + End }; EvtScript N(EVS_SuspiciousGuy_RevealSecretRoom) = { - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcFlagBits, NPC_ShyGuy_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SpeakToPlayer, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim11, ANIM_ShyGuy_Pink_Anim01, 5, MSG_MAC_Housing_00B3) - EVT_CALL(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim02) - EVT_WAIT(4 * DT) - EVT_CALL(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim03) - EVT_WAIT(4 * DT) - EVT_CALL(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim04) - EVT_WAIT(4 * DT) - EVT_CALL(NpcMoveTo, NPC_ShyGuy_01, -440, 3, 50 * DT) - EVT_CALL(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim01) - EVT_WAIT(8 * DT) - EVT_CALL(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim00) - EVT_CALL(InterpNpcYaw, NPC_ShyGuy_01, 180, 10 * DT) - EVT_CALL(InterpNpcYaw, NPC_ShyGuy_01, 0, 10 * DT) - EVT_CALL(InterpNpcYaw, NPC_ShyGuy_01, 180, 10 * DT) - EVT_CALL(InterpNpcYaw, NPC_ShyGuy_01, 0, 10 * DT) - EVT_CALL(SpeakToPlayer, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim11, ANIM_ShyGuy_Pink_Anim01, 5, MSG_MAC_Housing_00B4) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim08) - EVT_WAIT(4 * DT) - EVT_CALL(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim09) - EVT_WAIT(4 * DT) - EVT_CALL(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim0A) - EVT_EXEC(N(EVS_OpenSecretDoor)) - EVT_CALL(SetNpcJumpscale, NPC_ShyGuy_01, EVT_FLOAT(0.5)) - EVT_CALL(NpcJump0, NPC_ShyGuy_01, -440, 20, -75, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim00) - EVT_IF_LT(GB_StoryProgress, STORY_CH4_FOUND_HIDDEN_DOOR) - EVT_SET(GB_StoryProgress, STORY_CH4_FOUND_HIDDEN_DOOR) - EVT_EXEC_WAIT(N(EVS_MakeHiddenRoom)) - EVT_END_IF - EVT_RETURN - EVT_END + Wait(20 * DT) + Call(SetNpcFlagBits, NPC_ShyGuy_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SpeakToPlayer, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim11, ANIM_ShyGuy_Pink_Anim01, 5, MSG_MAC_Housing_00B3) + Call(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim02) + Wait(4 * DT) + Call(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim03) + Wait(4 * DT) + Call(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim04) + Wait(4 * DT) + Call(NpcMoveTo, NPC_ShyGuy_01, -440, 3, 50 * DT) + Call(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim01) + Wait(8 * DT) + Call(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim00) + Call(InterpNpcYaw, NPC_ShyGuy_01, 180, 10 * DT) + Call(InterpNpcYaw, NPC_ShyGuy_01, 0, 10 * DT) + Call(InterpNpcYaw, NPC_ShyGuy_01, 180, 10 * DT) + Call(InterpNpcYaw, NPC_ShyGuy_01, 0, 10 * DT) + Call(SpeakToPlayer, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim11, ANIM_ShyGuy_Pink_Anim01, 5, MSG_MAC_Housing_00B4) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim08) + Wait(4 * DT) + Call(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim09) + Wait(4 * DT) + Call(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim0A) + Exec(N(EVS_OpenSecretDoor)) + Call(SetNpcJumpscale, NPC_ShyGuy_01, Float(0.5)) + Call(NpcJump0, NPC_ShyGuy_01, -440, 20, -75, 20 * DT) + Call(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim00) + IfLt(GB_StoryProgress, STORY_CH4_FOUND_HIDDEN_DOOR) + Set(GB_StoryProgress, STORY_CH4_FOUND_HIDDEN_DOOR) + ExecWait(N(EVS_MakeHiddenRoom)) + EndIf + Return + End }; EvtScript N(EVS_SuspiciousGuy_RunAway) = { - EVT_CALL(PlaySoundAtNpc, NPC_ShyGuy_01, SOUND_SHY_GUY_OUCH, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAtNpc, NPC_ShyGuy_01, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_ShyGuy_01, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim11, ANIM_ShyGuy_Pink_Anim01, 0, MSG_MAC_Housing_00B2) - EVT_CALL(InterpNpcYaw, NPC_ShyGuy_01, 180, 10) - EVT_CALL(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim02) - EVT_WAIT(4 * DT) - EVT_CALL(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim03) - EVT_WAIT(4 * DT) - EVT_CALL(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim04) - EVT_WAIT(4 * DT) - EVT_EXEC_WAIT(N(EVS_SuspiciousGuy_OpenDoor)) - EVT_SET(LVar0, NPC_ShyGuy_01) - EVT_EXEC_GET_TID(N(EVS_ShyGuy_PlayFootstepSounds), LVarA) - EVT_CALL(NpcMoveTo, NPC_ShyGuy_01, -501, 223, 15 * DT) - EVT_KILL_THREAD(LVarA) - EVT_EXEC_WAIT(N(EVS_SuspiciousGuy_CloseDoor)) - EVT_RETURN - EVT_END + Call(PlaySoundAtNpc, NPC_ShyGuy_01, SOUND_SHY_GUY_OUCH, SOUND_SPACE_DEFAULT) + Call(PlaySoundAtNpc, NPC_ShyGuy_01, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_ShyGuy_01, EMOTE_EXCLAMATION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim11, ANIM_ShyGuy_Pink_Anim01, 0, MSG_MAC_Housing_00B2) + Call(InterpNpcYaw, NPC_ShyGuy_01, 180, 10) + Call(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim02) + Wait(4 * DT) + Call(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim03) + Wait(4 * DT) + Call(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim04) + Wait(4 * DT) + ExecWait(N(EVS_SuspiciousGuy_OpenDoor)) + Set(LVar0, NPC_ShyGuy_01) + ExecGetTID(N(EVS_ShyGuy_PlayFootstepSounds), LVarA) + Call(NpcMoveTo, NPC_ShyGuy_01, -501, 223, 15 * DT) + KillThread(LVarA) + ExecWait(N(EVS_SuspiciousGuy_CloseDoor)) + Return + End }; EvtScript N(EVS_HiddenRoom_WaitForOuttaSight) = { - EVT_SET_GROUP(EVT_GROUP_EF) - EVT_IF_NE(GB_StoryProgress, STORY_CH4_MET_WITH_TWINK) - EVT_RETURN - EVT_END_IF - EVT_LOOP(150 * DT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar2, 200) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(LVar7, 0) + SetGroup(EVT_GROUP_EF) + IfNe(GB_StoryProgress, STORY_CH4_MET_WITH_TWINK) + Return + EndIf + Loop(150 * DT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar2, 200) + Return + EndIf + Wait(1) + EndLoop + Set(LVar7, 0) // wait for player to use bow within 100 <= z <= 200 - EVT_LOOP(0) - EVT_CALL(N(IsPartnerBow)) - EVT_IF_TRUE(LVar0) - EVT_SET(LVar7, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar2, 100) - EVT_BREAK_LOOP - EVT_END_IF - EVT_IF_GT(LVar2, 200) + Loop(0) + Call(N(IsPartnerBow)) + IfTrue(LVar0) + Set(LVar7, 1) + BreakLoop + EndIf + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar2, 100) + BreakLoop + EndIf + IfGt(LVar2, 200) // automatically satisfied while exiting the front door - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC_WAIT(N(EVS_SuspiciousGuy_OpenDoor)) - EVT_CALL(SetNpcPos, NPC_ShyGuy_01, -501, 20, 223) - EVT_CALL(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim02) - EVT_CALL(NpcMoveTo, NPC_ShyGuy_01, -506, 168, 15) - EVT_CALL(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim00) - EVT_EXEC_WAIT(N(EVS_SuspiciousGuy_CloseDoor)) - EVT_IF_EQ(LVar7, 1) - EVT_EXEC_WAIT(N(EVS_SuspiciousGuy_RevealSecretRoom)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_SuspiciousGuy_RunAway)) - EVT_CALL(N(GetFloorCollider), LVar0) - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_EXEC(N(EVS_HiddenRoom_WaitForOuttaSight)) - EVT_END_THREAD - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_ShyGuy_01, NPC_DISPOSE_LOCATION) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Return + EndIf + Wait(1) + EndLoop + Call(DisablePlayerInput, TRUE) + ExecWait(N(EVS_SuspiciousGuy_OpenDoor)) + Call(SetNpcPos, NPC_ShyGuy_01, -501, 20, 223) + Call(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim02) + Call(NpcMoveTo, NPC_ShyGuy_01, -506, 168, 15) + Call(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Pink_Anim00) + ExecWait(N(EVS_SuspiciousGuy_CloseDoor)) + IfEq(LVar7, 1) + ExecWait(N(EVS_SuspiciousGuy_RevealSecretRoom)) + Else + ExecWait(N(EVS_SuspiciousGuy_RunAway)) + Call(N(GetFloorCollider), LVar0) + Thread + Wait(10 * DT) + Exec(N(EVS_HiddenRoom_WaitForOuttaSight)) + EndThread + EndIf + Call(SetNpcPos, NPC_ShyGuy_01, NPC_DISPOSE_LOCATION) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_ShyGuy_StealStoreroomKey) = { - EVT_CALL(GetNpcPos, NPC_ShyGuy_02, LVar2, LVar3, LVar4) - EVT_ADD(LVar3, 20) - EVT_CALL(MakeItemEntity, ITEM_VIS_GROUP(ITEM_STOREROOM_KEY, VIS_GROUP_1), LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVar9, LVar0) - EVT_WAIT(1) - EVT_LOOP(30) - EVT_CALL(GetNpcPos, NPC_ShyGuy_02, LVar2, LVar3, LVar4) - EVT_ADD(LVar3, 20) - EVT_CALL(SetItemPos, LVar9, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(RemoveItemEntity, LVar9) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_ShyGuy_02, LVar2, LVar3, LVar4) + Add(LVar3, 20) + Call(MakeItemEntity, ITEM_VIS_GROUP(ITEM_STOREROOM_KEY, VIS_GROUP_1), LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVar9, LVar0) + Wait(1) + Loop(30) + Call(GetNpcPos, NPC_ShyGuy_02, LVar2, LVar3, LVar4) + Add(LVar3, 20) + Call(SetItemPos, LVar9, LVar2, LVar3, LVar4) + Wait(1) + EndLoop + Call(RemoveItemEntity, LVar9) + Return + End }; EvtScript N(EVS_OnEnterShop) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) - EVT_RETURN - EVT_END_IF - EVT_IF_GT(GB_StoryProgress, STORY_CH4_GOT_STOREROOM_KEY) - EVT_RETURN - EVT_END_IF - EVT_IF_NE(GF_MAC04_StoreroomKeyStolen, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_ShyGuy_02, 250, 20, -402) - EVT_CALL(SetNpcAnimation, NPC_ShyGuy_02, ANIM_ShyGuy_Red_Anim04) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(30) - EVT_CALL(SpeakToPlayer, NPC_HarryT, ANIM_HarryT_Talk, ANIM_HarryT_Idle, 0, MSG_MAC_Housing_0000) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_THREAD - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(20) - EVT_SET(LVar0, 0) - EVT_LOOP(36) - EVT_CALL(InterpPlayerYaw, LVar0, 0) - EVT_ADD(LVar0, 45) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(InterpPlayerYaw, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(23) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilit_mu, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, 8) - EVT_CALL(RotateModel, MODEL_msdoor, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(10) - EVT_ADD(LVar0, -8) - EVT_CALL(RotateModel, MODEL_msdoor, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilit_mu, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_EXEC(N(EVS_ShyGuy_StealStoreroomKey)) - EVT_SET(LVar0, NPC_ShyGuy_02) - EVT_EXEC_GET_TID(N(EVS_ShyGuy_PlayFootstepSounds), LVarA) - EVT_CALL(NpcMoveTo, NPC_ShyGuy_02, 254, -66, 30) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetNpcPos, NPC_ShyGuy_02, NPC_DISPOSE_LOCATION) - EVT_SET(GF_MAC04_StoreroomKeyStolen, TRUE) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) + Return + EndIf + IfGt(GB_StoryProgress, STORY_CH4_GOT_STOREROOM_KEY) + Return + EndIf + IfNe(GF_MAC04_StoreroomKeyStolen, FALSE) + Return + EndIf + Call(SetNpcPos, NPC_ShyGuy_02, 250, 20, -402) + Call(SetNpcAnimation, NPC_ShyGuy_02, ANIM_ShyGuy_Red_Anim04) + Call(DisablePlayerInput, TRUE) + Wait(30) + Call(SpeakToPlayer, NPC_HarryT, ANIM_HarryT_Talk, ANIM_HarryT_Idle, 0, MSG_MAC_Housing_0000) + Call(DisablePlayerInput, FALSE) + Thread + Call(DisablePlayerInput, TRUE) + Wait(20) + Set(LVar0, 0) + Loop(36) + Call(InterpPlayerYaw, LVar0, 0) + Add(LVar0, 45) + Wait(1) + EndLoop + Call(InterpPlayerYaw, 0, 0) + Call(DisablePlayerInput, FALSE) + EndThread + Thread + Wait(23) + Call(PlaySoundAtCollider, COLLIDER_deilit_mu, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Set(LVar0, 0) + Loop(10) + Add(LVar0, 8) + Call(RotateModel, MODEL_msdoor, LVar0, 0, -1, 0) + Wait(1) + EndLoop + Loop(10) + Add(LVar0, -8) + Call(RotateModel, MODEL_msdoor, LVar0, 0, -1, 0) + Wait(1) + EndLoop + Call(PlaySoundAtCollider, COLLIDER_deilit_mu, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + EndThread + Exec(N(EVS_ShyGuy_StealStoreroomKey)) + Set(LVar0, NPC_ShyGuy_02) + ExecGetTID(N(EVS_ShyGuy_PlayFootstepSounds), LVarA) + Call(NpcMoveTo, NPC_ShyGuy_02, 254, -66, 30) + KillThread(LVarA) + Call(SetNpcPos, NPC_ShyGuy_02, NPC_DISPOSE_LOCATION) + Set(GF_MAC04_StoreroomKeyStolen, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_ShyGuy_02) = { - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/area_mac/mac_04/npc_twink.inc.c b/src/world/area_mac/mac_04/npc_twink.inc.c index f4aac86c842..e857dae6c71 100644 --- a/src/world/area_mac/mac_04/npc_twink.inc.c +++ b/src/world/area_mac/mac_04/npc_twink.inc.c @@ -1,12 +1,12 @@ #include "sprite/player.h" EvtScript N(EVS_NpcInit_TwinkEndCh4) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, mac_04_ENTRY_5) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfNe(LVar0, mac_04_ENTRY_5) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; Vec3f N(FlightPath_TwinkArrive)[] = { @@ -22,77 +22,77 @@ Vec3f N(FlightPath_TwinkDepart)[] = { }; EvtScript N(EVS_NpcIdle_TwinkStartCh4) = { - EVT_CALL(WaitForPlayerInputEnabled) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(PushSong, SONG_TWINK_THEME, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_MAC_Bridge_008F, 160, 40) - EVT_CALL(GetPlayerPos, LVar4, LVar5, LVar6) - EVT_SUBF(LVar4, EVT_FLOAT(50.0)) - EVT_ADDF(LVar5, EVT_FLOAT(40.0)) - EVT_CALL(InterpNpcYaw, NPC_Twink, 90, 0) - EVT_CALL(LoadPath, 35 * DT, EVT_PTR(N(FlightPath_TwinkArrive)), ARRAY_COUNT(N(FlightPath_TwinkArrive)), EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_CALL(SetNpcPos, NPC_Twink, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(3.0 / DT), -10, -300, 15, -9) - EVT_CALL(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_MAC_Bridge_0090) - EVT_WAIT(5 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_WAIT(15 * DT) - EVT_CALL(SetNpcJumpscale, NPC_Twink, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Twink, LVar0, LVar1, LVar2, 10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_MAC_Bridge_0091) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Chuckle) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_CALL(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_MAC_Bridge_0092) - EVT_WAIT(5 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Thinking) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(3.0 / DT), -40, -200, 15, -15) - EVT_CALL(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_MAC_Bridge_0093) - EVT_WAIT(5 * DT) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(InterpNpcYaw, NPC_Twink, 270, 0) - EVT_CALL(GetNpcPos, NPC_Twink, LVar4, LVar5, LVar6) - EVT_CALL(LoadPath, 35 * DT, EVT_PTR(N(FlightPath_TwinkDepart)), ARRAY_COUNT(N(FlightPath_TwinkDepart)), EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_ADD(LVar1, LVar4) - EVT_ADD(LVar2, LVar5) - EVT_ADD(LVar3, LVar6) - EVT_CALL(SetNpcPos, NPC_Twink, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_Twink, NPC_DISPOSE_LOCATION) - EVT_CALL(PopSong) - EVT_SET(GB_StoryProgress, STORY_CH4_MET_WITH_TWINK) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(WaitForPlayerInputEnabled) + Call(DisablePlayerInput, TRUE) + Call(PushSong, SONG_TWINK_THEME, 0) + Call(ShowMessageAtScreenPos, MSG_MAC_Bridge_008F, 160, 40) + Call(GetPlayerPos, LVar4, LVar5, LVar6) + SubF(LVar4, Float(50.0)) + AddF(LVar5, Float(40.0)) + Call(InterpNpcYaw, NPC_Twink, 90, 0) + Call(LoadPath, 35 * DT, Ref(N(FlightPath_TwinkArrive)), ARRAY_COUNT(N(FlightPath_TwinkArrive)), EASING_COS_IN_OUT) + Loop(0) + Call(GetNextPathPos) + AddF(LVar1, LVar4) + AddF(LVar2, LVar5) + Call(SetNpcPos, NPC_Twink, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Call(AdjustCam, CAM_DEFAULT, Float(3.0 / DT), -10, -300, 15, -9) + Call(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_MAC_Bridge_0090) + Wait(5 * DT) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Wait(15 * DT) + Call(SetNpcJumpscale, NPC_Twink, Float(1.0)) + Call(GetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Twink, LVar0, LVar1, LVar2, 10 * DT) + Call(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_MAC_Bridge_0091) + Call(SetPlayerAnimation, ANIM_Mario1_Chuckle) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Call(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_MAC_Bridge_0092) + Wait(5 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Thinking) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Call(AdjustCam, CAM_DEFAULT, Float(3.0 / DT), -40, -200, 15, -15) + Call(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_MAC_Bridge_0093) + Wait(5 * DT) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(InterpNpcYaw, NPC_Twink, 270, 0) + Call(GetNpcPos, NPC_Twink, LVar4, LVar5, LVar6) + Call(LoadPath, 35 * DT, Ref(N(FlightPath_TwinkDepart)), ARRAY_COUNT(N(FlightPath_TwinkDepart)), EASING_QUADRATIC_IN) + Loop(0) + Call(GetNextPathPos) + Add(LVar1, LVar4) + Add(LVar2, LVar5) + Add(LVar3, LVar6) + Call(SetNpcPos, NPC_Twink, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcPos, NPC_Twink, NPC_DISPOSE_LOCATION) + Call(PopSong) + Set(GB_StoryProgress, STORY_CH4_MET_WITH_TWINK) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_TwinkStartCh4) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH4_FRYING_PAN_STOLEN) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TwinkStartCh4))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH4_FRYING_PAN_STOLEN) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_TwinkStartCh4))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; diff --git a/src/world/area_mac/mac_05/mac_05_1_music.c b/src/world/area_mac/mac_05/mac_05_1_music.c index 7736a2622f5..fe80c2d09c6 100644 --- a/src/world/area_mac/mac_05/mac_05_1_music.c +++ b/src/world/area_mac/mac_05/mac_05_1_music.c @@ -1,46 +1,46 @@ #include "mac_05.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH5_WHALE_MOUTH_OPEN, STORY_CH5_ENTERED_WHALE) - EVT_CALL(SetMusicTrack, 0, SONG_WHALE_THEME, 0, 8) - EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_INVASION, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(FadeOutMusic, 0, 3000) - EVT_END_SWITCH - EVT_CALL(PlaySound, SOUND_LOOP_MAC_HARBOR_WATER) - EVT_CALL(ClearAmbientSounds, 250) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseRange(STORY_CH5_WHALE_MOUTH_OPEN, STORY_CH5_ENTERED_WHALE) + Call(SetMusicTrack, 0, SONG_WHALE_THEME, 0, 8) + CaseRange(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) + Call(SetMusicTrack, 0, SONG_SHY_GUY_INVASION, 0, 8) + CaseDefault + Call(FadeOutMusic, 0, 3000) + EndSwitch + Call(PlaySound, SOUND_LOOP_MAC_HARBOR_WATER) + Call(ClearAmbientSounds, 250) + Return + End }; EvtScript N(EVS_80244298) = { - EVT_CALL(SetMusicTrack, 0, SONG_JR_TROOPA_THEME, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_JR_TROOPA_THEME, 0, 8) + Return + End }; EvtScript N(EVS_802442C4) = { - EVT_CALL(FadeOutMusic, 0, 1000) - EVT_RETURN - EVT_END + Call(FadeOutMusic, 0, 1000) + Return + End }; EvtScript N(EVS_802442E8) = { - EVT_CALL(SetMusicTrack, 0, SONG_CLUB64, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CLUB64, 0, 8) + Return + End }; EvtScript N(EVS_80244314) = { - EVT_CALL(SetMusicTrack, 0, SONG_WHALE_THEME, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_WHALE_THEME, 0, 8) + Return + End }; EvtScript N(EVS_80244340) = { - EVT_CALL(FadeOutMusic, 0, 3000) - EVT_RETURN - EVT_END + Call(FadeOutMusic, 0, 3000) + Return + End }; diff --git a/src/world/area_mac/mac_05/mac_05_2_entity.c b/src/world/area_mac/mac_05/mac_05_2_entity.c index 0307dbeb082..e5eb9d2efaf 100644 --- a/src/world/area_mac/mac_05/mac_05_2_entity.c +++ b/src/world/area_mac/mac_05/mac_05_2_entity.c @@ -2,29 +2,29 @@ #include "entity.h" EvtScript N(EVS_OnInspect_StreetSign) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0174, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_0174, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_OnInspect_Menu) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_016C, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_016C, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), -150, 60, -375, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), -50, 0, -300, 0, MODEL_o106, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_MAC05_HiddenPanel) - EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), -490, 130, 160, 0, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_MAC05_MultiCoinBrick) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnInspect_StreetSign)), TRIGGER_WALL_PRESS_A, COLLIDER_sign, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnInspect_Menu)), TRIGGER_WALL_PRESS_A, COLLIDER_o154, 1, 0) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_SavePoint), -150, 60, -375, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HiddenPanel), -50, 0, -300, 0, MODEL_o106, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_MAC05_HiddenPanel) + Call(MakeEntity, Ref(Entity_MulticoinBlock), -490, 130, 160, 0, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_MAC05_MultiCoinBrick) + BindTrigger(Ref(N(EVS_OnInspect_StreetSign)), TRIGGER_WALL_PRESS_A, COLLIDER_sign, 1, 0) + BindTrigger(Ref(N(EVS_OnInspect_Menu)), TRIGGER_WALL_PRESS_A, COLLIDER_o154, 1, 0) + Return + End }; diff --git a/src/world/area_mac/mac_05/mac_05_3_main.c b/src/world/area_mac/mac_05/mac_05_3_main.c index 3b3cbff3bbb..cdc98328c3f 100644 --- a/src/world/area_mac/mac_05/mac_05_3_main.c +++ b/src/world/area_mac/mac_05/mac_05_3_main.c @@ -12,167 +12,167 @@ API_CALLABLE(N(func_8024047C_8525EC)) { } EvtScript N(D_8024457C_8566EC) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SET(LVarC, 0) - EVT_LABEL(0) - EVT_IF_GE(LVarC, 60) - EVT_SET(LVarC, 0) - EVT_END_IF - EVT_CALL(dup_mac_05_UnkFloatFunc001, LVarC, LVar0, EVT_FLOAT(-1.0), EVT_FLOAT(1.0), 30, 0, 0) - EVT_CALL(ScaleModel, MODEL_kaimen, 1, LVar0, 1) - EVT_ADD(LVarC, 1) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Set(LVarC, 0) + Label(0) + IfGe(LVarC, 60) + Set(LVarC, 0) + EndIf + Call(dup_mac_05_UnkFloatFunc001, LVarC, LVar0, Float(-1.0), Float(1.0), 30, 0, 0) + Call(ScaleModel, MODEL_kaimen, 1, LVar0, 1) + Add(LVarC, 1) + Wait(1) + Goto(0) + Return + End }; EvtScript N(D_80244648_8567B8) = { - EVT_LOOP(0) - EVT_CALL(MakeLerp, 600, -240, 320, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o177, LVar0, -25, -75) - EVT_CALL(RotateModel, MODEL_o177, 0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, -240, 600, 320, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o177, LVar0, -25, -75) - EVT_CALL(RotateModel, MODEL_o177, 180, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(MakeLerp, 600, -240, 320, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o177, LVar0, -25, -75) + Call(RotateModel, MODEL_o177, 0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, -240, 600, 320, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o177, LVar0, -25, -75) + Call(RotateModel, MODEL_o177, 180, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_ExitWalk_mac_04_1) = EVT_EXIT_WALK(60, mac_05_ENTRY_0, "mac_04", mac_04_ENTRY_1); EvtScript N(D_80244810_856980) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(UseExitHeading, 60, mac_05_ENTRY_3) - EVT_EXEC(ExitWalk) - EVT_SET(GB_StoryProgress, STORY_CH5_ENTERED_WHALE) - EVT_CALL(GotoMap, EVT_PTR("kgr_01"), kgr_01_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(UseExitHeading, 60, mac_05_ENTRY_3) + Exec(ExitWalk) + Set(GB_StoryProgress, STORY_CH5_ENTERED_WHALE) + Call(GotoMap, Ref("kgr_01"), kgr_01_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_mac_04_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(D_80244810_856980)), TRIGGER_FLOOR_TOUCH, COLLIDER_deilit9, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_mac_04_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) + BindTrigger(Ref(N(D_80244810_856980)), TRIGGER_FLOOR_TOUCH, COLLIDER_deilit9, 1, 0) + Return + End }; EvtScript N(D_802448C4_856A34) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(mac_05_ENTRY_0) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(mac_05_ENTRY_1) - EVT_EXEC(N(EVS_802496FC)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(mac_05_ENTRY_2) - EVT_EXEC(N(EVS_80248878)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(mac_05_ENTRY_3) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerPos, -160, -10, 371) - EVT_CALL(SetNpcPos, NPC_PARTNER, -160, -10, 371) - EVT_CALL(SetEnemyFlagBits, NPC_Whale, ENEMY_FLAG_CANT_INTERACT, 1) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(InterruptUsePartner) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(MakeLerp, -160, -220, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetPlayerPos, LVar0, -10, 371) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, -10, 371) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Yell) - EVT_WAIT(30) - EVT_CALL(SetPlayerPos, -280, -10, 371) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC_WAIT(EnterWalk) - EVT_CALL(SetNpcPos, NPC_Whale, -220, 10, 372) - EVT_CALL(SetEnemyFlagBits, NPC_Whale, ENEMY_FLAG_CANT_INTERACT, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(mac_05_ENTRY_0) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseEq(mac_05_ENTRY_1) + Exec(N(EVS_802496FC)) + Exec(N(EVS_BindExitTriggers)) + CaseEq(mac_05_ENTRY_2) + Exec(N(EVS_80248878)) + Exec(N(EVS_BindExitTriggers)) + CaseEq(mac_05_ENTRY_3) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerPos, -160, -10, 371) + Call(SetNpcPos, NPC_PARTNER, -160, -10, 371) + Call(SetEnemyFlagBits, NPC_Whale, ENEMY_FLAG_CANT_INTERACT, 1) + Call(DisablePartnerAI, 0) + Call(InterruptUsePartner) + Wait(10) + Thread + Call(MakeLerp, -160, -220, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetPlayerPos, LVar0, -10, 371) + Call(SetNpcPos, NPC_PARTNER, LVar0, -10, 371) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Yell) + Wait(30) + Call(SetPlayerPos, -280, -10, 371) + Call(EnablePartnerAI) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + ExecWait(EnterWalk) + Call(SetNpcPos, NPC_Whale, -220, 10, 372) + Call(SetEnemyFlagBits, NPC_Whale, ENEMY_FLAG_CANT_INTERACT, 0) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, EVT_PTR(N(NpcSetA))) - EVT_CASE_LT(STORY_CH5_REACHED_LAVA_LAVA_ISLAND) - EVT_SET(LVar0, EVT_PTR(N(NpcSetB))) - EVT_CASE_LT(STORY_CH5_RETURNED_TO_TOAD_TOWN) - EVT_CALL(GetEntryID, LVar1) - EVT_IF_EQ(LVar1, mac_05_ENTRY_1) - EVT_IF_EQ(GF_MAC01_Defeated_JrTroopa4, FALSE) - EVT_SET(LVar0, EVT_PTR(N(NpcSetC))) - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(NpcSetB))) - EVT_END_IF - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(NpcSetA))) - EVT_END_IF - EVT_CASE_LT(STORY_CH6_BEGAN_PEACH_MISSION) - EVT_SET(LVar0, EVT_PTR(N(NpcSetA))) - EVT_CASE_DEFAULT - EVT_SET(LVar0, EVT_PTR(N(NpcSetA))) - EVT_END_SWITCH - EVT_CALL(MakeNpcs, FALSE, LVar0) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupWhale)) - EVT_CALL(GetEntryID, LVar0) - EVT_EXEC(N(EVS_SetupRooms)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitne, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(D_802448C4_856A34)) - EVT_WAIT(1) - EVT_EXEC(N(D_8024457C_8566EC)) - EVT_CALL(SetTexPanner, MODEL_kaimen, 1) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_TOAD_TOWN) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Switch(GB_StoryProgress) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Set(LVar0, Ref(N(NpcSetA))) + CaseLt(STORY_CH5_REACHED_LAVA_LAVA_ISLAND) + Set(LVar0, Ref(N(NpcSetB))) + CaseLt(STORY_CH5_RETURNED_TO_TOAD_TOWN) + Call(GetEntryID, LVar1) + IfEq(LVar1, mac_05_ENTRY_1) + IfEq(GF_MAC01_Defeated_JrTroopa4, FALSE) + Set(LVar0, Ref(N(NpcSetC))) + Else + Set(LVar0, Ref(N(NpcSetB))) + EndIf + Else + Set(LVar0, Ref(N(NpcSetA))) + EndIf + CaseLt(STORY_CH6_BEGAN_PEACH_MISSION) + Set(LVar0, Ref(N(NpcSetA))) + CaseDefault + Set(LVar0, Ref(N(NpcSetA))) + EndSwitch + Call(MakeNpcs, FALSE, LVar0) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupWhale)) + Call(GetEntryID, LVar0) + Exec(N(EVS_SetupRooms)) + Exec(N(EVS_SetupMusic)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitne, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(D_802448C4_856A34)) + Wait(1) + Exec(N(D_8024457C_8566EC)) + Call(SetTexPanner, MODEL_kaimen, 1) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 100, 100, -70, -50) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_EXEC(N(D_80244648_8567B8)) - EVT_EXEC(N(EVS_AnimateClub64Sign)) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Exec(N(D_80244648_8567B8)) + Exec(N(EVS_AnimateClub64Sign)) + Return + End }; diff --git a/src/world/area_mac/mac_05/mac_05_4_npc.c b/src/world/area_mac/mac_05/mac_05_4_npc.c index a944a5e6ada..1193853b9de 100644 --- a/src/world/area_mac/mac_05/mac_05_4_npc.c +++ b/src/world/area_mac/mac_05/mac_05_4_npc.c @@ -39,15 +39,15 @@ s32 N(Fishmael_LetterList)[] = { }; EvtScript N(EVS_LetterPrompt_Fishmael) = { - EVT_CALL(N(LetterDelivery_Init), NPC_Fishmael, + Call(N(LetterDelivery_Init), NPC_Fishmael, ANIM_Fishmael_Talk, ANIM_Fishmael_Idle, ITEM_LETTER_CHAIN_FISHMAEL, ITEM_LETTER_CHAIN_KOOVER_2, MSG_MAC_Port_0064, MSG_MAC_Port_0065, MSG_MAC_Port_0066, MSG_MAC_Port_0067, - EVT_PTR(N(Fishmael_LetterList))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) - EVT_RETURN - EVT_END + Ref(N(Fishmael_LetterList))) + ExecWait(N(EVS_DoLetterDelivery)) + Return + End }; s32 N(Kolorado_LetterList)[] = { @@ -55,23 +55,23 @@ s32 N(Kolorado_LetterList)[] = { }; EvtScript N(EVS_LetterPrompt_Kolorado) = { - EVT_CALL(N(LetterDelivery_Init), NPC_Kolorado, + Call(N(LetterDelivery_Init), NPC_Kolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, ITEM_LETTER_TO_KOLORADO, ITEM_NONE, MSG_MAC_Port_0085, MSG_MAC_Port_0086, MSG_MAC_Port_0087, MSG_MAC_Port_0088, - EVT_PTR(N(Kolorado_LetterList))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) - EVT_RETURN - EVT_END + Ref(N(Kolorado_LetterList))) + ExecWait(N(EVS_DoLetterDelivery)) + Return + End }; EvtScript N(EVS_LetterReward_Kolorado) = { - EVT_IF_EQ(LVarC, DELIVERY_ACCEPTED) + IfEq(LVarC, DELIVERY_ACCEPTED) EVT_GIVE_STAR_PIECE() - EVT_END_IF - EVT_RETURN - EVT_END + EndIf + Return + End }; s32 N(ItemList_Artifact)[] = { @@ -80,55 +80,55 @@ s32 N(ItemList_Artifact)[] = { }; EvtScript N(EVS_ArtifactReward_Kolorado) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Port_008E) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Port_008E) EVT_GIVE_STAR_PIECE() - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Port_008F) - EVT_SET(GF_SBK_GaveArtifactToKolorado, TRUE) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Port_008F) + Set(GF_SBK_GaveArtifactToKolorado, TRUE) + Return + End }; EvtScript N(EVS_ArtifactPrompt_Kolorado) = { - EVT_IF_EQ(GF_SBK_GaveArtifactToKolorado, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(FindKeyItem, ITEM_ARTIFACT, LVar0) - EVT_IF_EQ(LVar0, -1) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(AF_MAC_44, FALSE) - EVT_SET(AF_MAC_44, TRUE) - EVT_IF_EQ(GF_SBK_KeptArtifactFromKolorado, FALSE) - EVT_SET(GF_SBK_KeptArtifactFromKolorado, FALSE) - EVT_SET(LVar0, MSG_MAC_Port_0089) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Port_008A) - EVT_END_IF - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Port_008B) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, LVar0) - EVT_SET(LVar0, EVT_PTR(N(ItemList_Artifact))) - EVT_SET(LVar1, 1) - EVT_EXEC_WAIT(N(EVS_ChooseKeyItem)) - EVT_SWITCH(LVar0) - EVT_CASE_GE(1) - EVT_EXEC_WAIT(N(EVS_ArtifactReward_Kolorado)) - EVT_BREAK_SWITCH - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Port_008C) - EVT_SET(LVar0, EVT_PTR(N(ItemList_Artifact))) - EVT_SET(LVar1, 1) - EVT_EXEC_WAIT(N(EVS_ChooseKeyItem)) - EVT_SWITCH(LVar0) - EVT_CASE_GE(1) - EVT_EXEC_WAIT(N(EVS_ArtifactReward_Kolorado)) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Port_008D) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_RETURN - EVT_END + IfEq(GF_SBK_GaveArtifactToKolorado, TRUE) + Return + EndIf + Call(FindKeyItem, ITEM_ARTIFACT, LVar0) + IfEq(LVar0, -1) + Return + EndIf + IfEq(AF_MAC_44, FALSE) + Set(AF_MAC_44, TRUE) + IfEq(GF_SBK_KeptArtifactFromKolorado, FALSE) + Set(GF_SBK_KeptArtifactFromKolorado, FALSE) + Set(LVar0, MSG_MAC_Port_0089) + Else + Set(LVar0, MSG_MAC_Port_008A) + EndIf + Else + Set(LVar0, MSG_MAC_Port_008B) + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, LVar0) + Set(LVar0, Ref(N(ItemList_Artifact))) + Set(LVar1, 1) + ExecWait(N(EVS_ChooseKeyItem)) + Switch(LVar0) + CaseGe(1) + ExecWait(N(EVS_ArtifactReward_Kolorado)) + BreakSwitch + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Port_008C) + Set(LVar0, Ref(N(ItemList_Artifact))) + Set(LVar1, 1) + ExecWait(N(EVS_ChooseKeyItem)) + Switch(LVar0) + CaseGe(1) + ExecWait(N(EVS_ArtifactReward_Kolorado)) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Port_008D) + EndSwitch + EndSwitch + Return + End }; API_CALLABLE(N(func_80242A90_854C00)) { @@ -306,383 +306,383 @@ API_CALLABLE(N(func_80242E84_854FF4)) { } EvtScript N(D_802484D8_85A648) = { - EVT_CALL(N(func_80242C78_854DE8), LVar0) - EVT_RETURN - EVT_END + Call(N(func_80242C78_854DE8), LVar0) + Return + End }; EvtScript N(D_802484F8_85A668) = { - EVT_CALL(GetNpcPos, NPC_Whale, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_ELSE - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 1) - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 1) - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 100) - EVT_CALL(GetNpcPos, NPC_Whale, LVar0, LVar1, LVar2) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_ELSE - EVT_SET(LVar3, LVar0) - EVT_SUB(LVar3, 100) - EVT_CALL(GetNpcPos, NPC_Whale, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, LVar3) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_Whale, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + IfEq(LVar0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Else + Call(SetCamSpeed, CAM_DEFAULT, 1) + EndIf + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, 1) + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, 100) + Call(GetNpcPos, NPC_Whale, LVar0, LVar1, LVar2) + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Else + Set(LVar3, LVar0) + Sub(LVar3, 100) + Call(GetNpcPos, NPC_Whale, LVar0, LVar1, LVar2) + Sub(LVar0, LVar3) + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(D_802486EC_85A85C) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar4, LVar4) - EVT_IF_GT(LVar0, -150) - EVT_CALL(GetPlayerPos, LVar0, LVar4, LVar4) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_ELSE - EVT_SET(LVar3, LVar0) - EVT_SUB(LVar3, -150) - EVT_CALL(GetPlayerPos, LVar0, LVar4, LVar4) - EVT_SUB(LVar0, LVar3) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Whale, LVar0, LVar4, LVar4) - EVT_IF_LT(LVar0, -150) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_ELSE - EVT_CALL(SetCamTarget, CAM_DEFAULT, -150, LVar1, LVar2) - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Loop(0) + Call(GetPlayerPos, LVar0, LVar4, LVar4) + IfGt(LVar0, -150) + Call(GetPlayerPos, LVar0, LVar4, LVar4) + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Else + Set(LVar3, LVar0) + Sub(LVar3, -150) + Call(GetPlayerPos, LVar0, LVar4, LVar4) + Sub(LVar0, LVar3) + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Whale, LVar0, LVar4, LVar4) + IfLt(LVar0, -150) + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Else + Call(SetCamTarget, CAM_DEFAULT, -150, LVar1, LVar2) + EndIf + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_80248878) = { - EVT_SET(GB_StoryProgress, STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, -120, 24, 375) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 400) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Still, 5, MSG_MAC_Port_009F) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Shout) - EVT_CALL(GetNpcPos, NPC_Whale, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 475) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 3) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.5)) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_CALL(SetPlayerPos, -120, 24, 375) - EVT_CALL(PlaySoundAtPlayer, SOUND_WHALE_EJECT, SOUND_SPACE_DEFAULT) - EVT_CALL(PlayerJump1, -310, -10, 372, 80) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(PlayerFaceNpc, NPC_Whale, FALSE) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetNpcPos, NPC_PARTNER, -120, 24, 375) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.5)) - EVT_CALL(PlaySoundAtNpc, NPC_PARTNER, SOUND_WHALE_EJECT, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_PARTNER, -345, 0, 372, 80) - EVT_CALL(ClearPartnerMoveHistory, NPC_PARTNER) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Whale, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetNpcPos, NPC_Fuzzipede, -120, 24, 375) - EVT_CALL(SetNpcJumpscale, NPC_Fuzzipede, EVT_FLOAT(0.5)) - EVT_CALL(PlaySoundAtNpc, NPC_Fuzzipede, SOUND_WHALE_EJECT, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Fuzzipede, -280, -10, 372, 90) - EVT_CALL(NpcFaceNpc, NPC_Fuzzipede, NPC_Whale, 0) - EVT_END_THREAD - EVT_WAIT(50) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(SetNpcJumpscale, NPC_Kolorado, EVT_FLOAT(0.1)) - EVT_CALL(NpcJump0, NPC_Kolorado, -380, -10, 372, 20) - EVT_CALL(NpcFaceNpc, NPC_Kolorado, NPC_Whale, 0) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Still) - EVT_WAIT(60) - EVT_CALL(NpcFacePlayer, NPC_Kolorado, 0) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Fuzzipede, 0) - EVT_CALL(NpcFaceNpc, NPC_Fuzzipede, NPC_Whale, 0) - EVT_CALL(PlayerFaceNpc, NPC_Fuzzipede, FALSE) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 3) - EVT_CALL(GetNpcPos, NPC_Fuzzipede, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Whale, LVar3, LVar4, LVar5) - EVT_ADD(LVar0, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_ADD(LVar2, LVar5) - EVT_DIV(LVar0, 2) - EVT_DIV(LVar1, 2) - EVT_DIV(LVar2, 2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 400) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Fuzzipede, ANIM_Fuzzipede_Anim24, ANIM_Fuzzipede_Anim04, 5, MSG_MAC_Port_00A0) - EVT_CALL(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Still, 5, MSG_MAC_Port_00A1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Whale, LVar3, LVar4, LVar5) - EVT_ADD(LVar0, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_ADD(LVar2, LVar5) - EVT_DIV(LVar0, 2) - EVT_DIV(LVar1, 2) - EVT_DIV(LVar2, 2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 475) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-63.5), 0) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.5), EVT_FLOAT(-5.0)) - EVT_CALL(SpeakToNpc, NPC_Fuzzipede, ANIM_Fuzzipede_Anim24, ANIM_Fuzzipede_Anim04, 0, NPC_Whale, MSG_MAC_Port_00A2) - EVT_CALL(NpcFacePlayer, NPC_Fuzzipede, 0) - EVT_WAIT(10) - EVT_CALL(EndSpeech, NPC_Fuzzipede, ANIM_Fuzzipede_Anim24, ANIM_Fuzzipede_Anim04, 0) - EVT_WAIT(10) - EVT_CALL(SetNpcJumpscale, NPC_Fuzzipede, 1) - EVT_CALL(GetNpcPos, NPC_Fuzzipede, LVar0, LVar1, LVar2) - EVT_CALL(FadeOutMusic, 0, 3000) - EVT_LOOP(10) - EVT_ADD(LVar2, -60) - EVT_CALL(PlaySoundAtNpc, NPC_Fuzzipede, SOUND_FUZZIPEDE_MOTION, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Fuzzipede, LVar0, LVar1, LVar2, 10) - EVT_CALL(NpcFaceNpc, NPC_Kolorado, NPC_Fuzzipede, 0) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Fuzzipede, 0) - EVT_CALL(PlayerFaceNpc, NPC_Fuzzipede, FALSE) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_Fuzzipede, NPC_DISPOSE_LOCATION) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(NpcFaceNpc, NPC_Kolorado, NPC_Whale, 0) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Whale, 0) - EVT_CALL(PlayerFaceNpc, NPC_Whale, FALSE) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Still, 5, MSG_MAC_Port_00A3) - EVT_CALL(GetNpcPos, NPC_Kolorado, LVar0, LVar1, LVar2) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_ADD(LVar0, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_ADD(LVar2, LVar5) - EVT_DIV(LVar0, 2) - EVT_DIV(LVar1, 2) - EVT_DIV(LVar2, 2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.0), EVT_FLOAT(-7.0)) - EVT_WAIT(5) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(NpcFacePlayer, NPC_Kolorado, 0) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Kolorado, 0) - EVT_CALL(PlayerFaceNpc, NPC_Kolorado, FALSE) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Kolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Port_00A4) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 3) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(NpcFaceNpc, NPC_Kolorado, NPC_PARTNER, 0) - EVT_CALL(PlayerFaceNpc, NPC_PARTNER, FALSE) - EVT_END_THREAD - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PARTNER_GOOMBARIO) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_MAC_Port_00A5) - EVT_CASE_EQ(PARTNER_KOOPER) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_MAC_Port_00A6) - EVT_CASE_EQ(PARTNER_BOMBETTE) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_MAC_Port_00A7) - EVT_CASE_EQ(PARTNER_PARAKARRY) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_MAC_Port_00A8) - EVT_CASE_EQ(PARTNER_BOW) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_MAC_Port_00A9) - EVT_CASE_EQ(PARTNER_WATT) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldWatt_Talk, ANIM_WorldWatt_Idle, 0, MSG_MAC_Port_00AA) - EVT_END_SWITCH - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Whale, LVar3, LVar4, LVar5) - EVT_ADD(LVar0, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_ADD(LVar2, LVar5) - EVT_DIV(LVar0, 2) - EVT_DIV(LVar1, 2) - EVT_DIV(LVar2, 2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 475) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-63.5), 0) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.5), EVT_FLOAT(-5.0)) - EVT_WAIT(5) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(NpcFaceNpc, NPC_Kolorado, NPC_Whale, 0) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Whale, 0) - EVT_CALL(PlayerFaceNpc, NPC_Whale, FALSE) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Still, 5, MSG_MAC_Port_00AB) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.5)) - EVT_THREAD - EVT_WAIT(100) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 1) - EVT_END_THREAD - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_RETURN - EVT_END + Set(GB_StoryProgress, STORY_CH5_DEFEATED_FUZZIPEDE) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(DisablePartnerAI, 0) + Call(SetNpcPos, NPC_PARTNER, -120, 24, 375) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 400) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Wait(20) + Call(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Still, 5, MSG_MAC_Port_009F) + Wait(20) + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Shout) + Call(GetNpcPos, NPC_Whale, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 475) + Call(SetCamSpeed, CAM_DEFAULT, 3) + Wait(10) + Thread + Call(SetPlayerJumpscale, Float(0.5)) + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + Call(SetPlayerPos, -120, 24, 375) + Call(PlaySoundAtPlayer, SOUND_WHALE_EJECT, SOUND_SPACE_DEFAULT) + Call(PlayerJump1, -310, -10, 372, 80) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(PlayerFaceNpc, NPC_Whale, FALSE) + EndThread + Thread + Wait(5) + Call(SetNpcPos, NPC_PARTNER, -120, 24, 375) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.5)) + Call(PlaySoundAtNpc, NPC_PARTNER, SOUND_WHALE_EJECT, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_PARTNER, -345, 0, 372, 80) + Call(ClearPartnerMoveHistory, NPC_PARTNER) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Whale, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + EndThread + Thread + Wait(10) + Call(SetNpcPos, NPC_Fuzzipede, -120, 24, 375) + Call(SetNpcJumpscale, NPC_Fuzzipede, Float(0.5)) + Call(PlaySoundAtNpc, NPC_Fuzzipede, SOUND_WHALE_EJECT, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Fuzzipede, -280, -10, 372, 90) + Call(NpcFaceNpc, NPC_Fuzzipede, NPC_Whale, 0) + EndThread + Wait(50) + Thread + Wait(15) + Call(SetNpcJumpscale, NPC_Kolorado, Float(0.1)) + Call(NpcJump0, NPC_Kolorado, -380, -10, 372, 20) + Call(NpcFaceNpc, NPC_Kolorado, NPC_Whale, 0) + EndThread + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Still) + Wait(60) + Call(NpcFacePlayer, NPC_Kolorado, 0) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Fuzzipede, 0) + Call(NpcFaceNpc, NPC_Fuzzipede, NPC_Whale, 0) + Call(PlayerFaceNpc, NPC_Fuzzipede, FALSE) + Call(SetCamSpeed, CAM_DEFAULT, 3) + Call(GetNpcPos, NPC_Fuzzipede, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Whale, LVar3, LVar4, LVar5) + Add(LVar0, LVar3) + Add(LVar1, LVar4) + Add(LVar2, LVar5) + Div(LVar0, 2) + Div(LVar1, 2) + Div(LVar2, 2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 400) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Fuzzipede, ANIM_Fuzzipede_Anim24, ANIM_Fuzzipede_Anim04, 5, MSG_MAC_Port_00A0) + Call(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Still, 5, MSG_MAC_Port_00A1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Whale, LVar3, LVar4, LVar5) + Add(LVar0, LVar3) + Add(LVar1, LVar4) + Add(LVar2, LVar5) + Div(LVar0, 2) + Div(LVar1, 2) + Div(LVar2, 2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamDistance, CAM_DEFAULT, 475) + Call(SetCamPosA, CAM_DEFAULT, Float(-63.5), 0) + Call(SetCamPitch, CAM_DEFAULT, Float(18.5), Float(-5.0)) + Call(SpeakToNpc, NPC_Fuzzipede, ANIM_Fuzzipede_Anim24, ANIM_Fuzzipede_Anim04, 0, NPC_Whale, MSG_MAC_Port_00A2) + Call(NpcFacePlayer, NPC_Fuzzipede, 0) + Wait(10) + Call(EndSpeech, NPC_Fuzzipede, ANIM_Fuzzipede_Anim24, ANIM_Fuzzipede_Anim04, 0) + Wait(10) + Call(SetNpcJumpscale, NPC_Fuzzipede, 1) + Call(GetNpcPos, NPC_Fuzzipede, LVar0, LVar1, LVar2) + Call(FadeOutMusic, 0, 3000) + Loop(10) + Add(LVar2, -60) + Call(PlaySoundAtNpc, NPC_Fuzzipede, SOUND_FUZZIPEDE_MOTION, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Fuzzipede, LVar0, LVar1, LVar2, 10) + Call(NpcFaceNpc, NPC_Kolorado, NPC_Fuzzipede, 0) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Fuzzipede, 0) + Call(PlayerFaceNpc, NPC_Fuzzipede, FALSE) + EndLoop + Call(SetNpcPos, NPC_Fuzzipede, NPC_DISPOSE_LOCATION) + Thread + Wait(5) + Call(NpcFaceNpc, NPC_Kolorado, NPC_Whale, 0) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Whale, 0) + Call(PlayerFaceNpc, NPC_Whale, FALSE) + EndThread + Call(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Still, 5, MSG_MAC_Port_00A3) + Call(GetNpcPos, NPC_Kolorado, LVar0, LVar1, LVar2) + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Add(LVar0, LVar3) + Add(LVar1, LVar4) + Add(LVar2, LVar5) + Div(LVar0, 2) + Div(LVar1, 2) + Div(LVar2, 2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPosA, CAM_DEFAULT, 0, 0) + Call(SetCamPitch, CAM_DEFAULT, Float(18.0), Float(-7.0)) + Wait(5) + Thread + Wait(5) + Call(NpcFacePlayer, NPC_Kolorado, 0) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Kolorado, 0) + Call(PlayerFaceNpc, NPC_Kolorado, FALSE) + EndThread + Call(SpeakToPlayer, NPC_Kolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Port_00A4) + Call(SetCamSpeed, CAM_DEFAULT, 3) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 250) + Thread + Wait(5) + Call(NpcFaceNpc, NPC_Kolorado, NPC_PARTNER, 0) + Call(PlayerFaceNpc, NPC_PARTNER, FALSE) + EndThread + Call(GetCurrentPartnerID, LVar0) + Switch(LVar0) + CaseEq(PARTNER_GOOMBARIO) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_MAC_Port_00A5) + CaseEq(PARTNER_KOOPER) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_MAC_Port_00A6) + CaseEq(PARTNER_BOMBETTE) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_MAC_Port_00A7) + CaseEq(PARTNER_PARAKARRY) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_MAC_Port_00A8) + CaseEq(PARTNER_BOW) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_MAC_Port_00A9) + CaseEq(PARTNER_WATT) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldWatt_Talk, ANIM_WorldWatt_Idle, 0, MSG_MAC_Port_00AA) + EndSwitch + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Whale, LVar3, LVar4, LVar5) + Add(LVar0, LVar3) + Add(LVar1, LVar4) + Add(LVar2, LVar5) + Div(LVar0, 2) + Div(LVar1, 2) + Div(LVar2, 2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamDistance, CAM_DEFAULT, 475) + Call(SetCamPosA, CAM_DEFAULT, Float(-63.5), 0) + Call(SetCamPitch, CAM_DEFAULT, Float(18.5), Float(-5.0)) + Wait(5) + Thread + Wait(5) + Call(NpcFaceNpc, NPC_Kolorado, NPC_Whale, 0) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Whale, 0) + Call(PlayerFaceNpc, NPC_Whale, FALSE) + EndThread + Call(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Still, 5, MSG_MAC_Port_00AB) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.5)) + Thread + Wait(100) + Call(SetCamSpeed, CAM_DEFAULT, 1) + EndThread + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Call(EnablePartnerAI) + Return + End }; EvtScript N(D_802496C0_85B830) = { - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Jump) - EVT_WAIT(5) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Fall) - EVT_RETURN - EVT_END + Call(SetPlayerAnimation, ANIM_Mario1_Jump) + Wait(5) + Call(SetPlayerAnimation, ANIM_Mario1_Fall) + Return + End }; EvtScript N(EVS_802496FC) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_SET(LVar0, 1) - EVT_EXEC_GET_TID(N(D_802484F8_85A668), LVarA) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 270) - EVT_SET(LVar0, 0) - EVT_EXEC_GET_TID(N(D_802484D8_85A648), LVarB) - EVT_SET(LVar0, 1) - EVT_EXEC_GET_TID(N(D_802484D8_85A648), LVarC) - EVT_IF_EQ(GB_StoryProgress, STORY_CH5_TRADED_VASE_FOR_SEED) - EVT_SET(LVar0, 2) - EVT_EXEC_GET_TID(N(D_802484D8_85A648), LVarD) - EVT_END_IF - EVT_CALL(N(func_80242E84_854FF4), 2) - EVT_KILL_THREAD(LVarB) - EVT_KILL_THREAD(LVarC) - EVT_IF_EQ(GB_StoryProgress, STORY_CH5_TRADED_VASE_FOR_SEED) - EVT_KILL_THREAD(LVarD) - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt9, COLLIDER_FLAGS_UPPER_MASK) - EVT_IF_EQ(GB_StoryProgress, STORY_CH5_TRADED_VASE_FOR_SEED) - EVT_CALL(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Run) - EVT_CALL(N(func_80242A90_854C00), 5, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_Kolorado, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcJumpscale, NPC_Kolorado, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_Kolorado, LVar0, LVar1, LVar2, 20) - EVT_CALL(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Idle) - EVT_END_IF - EVT_CALL(N(func_80242A90_854C00), 3, LVar0, LVar1, LVar2) - EVT_EXEC(N(D_802496C0_85B830)) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(PlayerJump, LVar0, LVar1, LVar2, 20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_RUN) - EVT_CALL(N(func_80242A90_854C00), 4, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 20) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tt9, COLLIDER_FLAGS_UPPER_MASK) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_TalkSad) - EVT_CALL(InterpNpcYaw, NPC_Whale, 270, 60) - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Whale, 0) - EVT_CALL(NpcJump0, NPC_Whale, -220, 10, 372, 20) - EVT_END_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, FALSE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH5_SUSHIE_JOINED_PARTY, STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC01_Defeated_JrTroopa4, FALSE) - EVT_CALL(SetNpcVar, NPC_JrTroopa_01, 0, 1) - EVT_END_IF - EVT_CASE_EQ(STORY_CH5_TRADED_VASE_FOR_SEED) - EVT_CALL(SetNpcVar, NPC_Kolorado, 0, 1) - EVT_END_SWITCH - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(InterpPlayerYaw, 270, 0) + Set(LVar0, 1) + ExecGetTID(N(D_802484F8_85A668), LVarA) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(SetNpcYaw, NPC_PARTNER, 270) + Set(LVar0, 0) + ExecGetTID(N(D_802484D8_85A648), LVarB) + Set(LVar0, 1) + ExecGetTID(N(D_802484D8_85A648), LVarC) + IfEq(GB_StoryProgress, STORY_CH5_TRADED_VASE_FOR_SEED) + Set(LVar0, 2) + ExecGetTID(N(D_802484D8_85A648), LVarD) + EndIf + Call(N(func_80242E84_854FF4), 2) + KillThread(LVarB) + KillThread(LVarC) + IfEq(GB_StoryProgress, STORY_CH5_TRADED_VASE_FOR_SEED) + KillThread(LVarD) + EndIf + Wait(1) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt9, COLLIDER_FLAGS_UPPER_MASK) + IfEq(GB_StoryProgress, STORY_CH5_TRADED_VASE_FOR_SEED) + Call(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Run) + Call(N(func_80242A90_854C00), 5, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_Kolorado, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(SetNpcJumpscale, NPC_Kolorado, Float(1.0)) + Call(NpcJump0, NPC_Kolorado, LVar0, LVar1, LVar2, 20) + Call(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Idle) + EndIf + Call(N(func_80242A90_854C00), 3, LVar0, LVar1, LVar2) + Exec(N(D_802496C0_85B830)) + Call(SetPlayerJumpscale, Float(1.0)) + Call(PlayerJump, LVar0, LVar1, LVar2, 20) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_RUN) + Call(N(func_80242A90_854C00), 4, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_PARTNER, Float(1.0)) + Call(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 20) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tt9, COLLIDER_FLAGS_UPPER_MASK) + KillThread(LVarA) + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_TalkSad) + Call(InterpNpcYaw, NPC_Whale, 270, 60) + Thread + Call(SetNpcJumpscale, NPC_Whale, 0) + Call(NpcJump0, NPC_Whale, -220, 10, 372, 20) + EndThread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, FALSE) + Switch(GB_StoryProgress) + CaseRange(STORY_CH5_SUSHIE_JOINED_PARTY, STORY_CH5_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC01_Defeated_JrTroopa4, FALSE) + Call(SetNpcVar, NPC_JrTroopa_01, 0, 1) + EndIf + CaseEq(STORY_CH5_TRADED_VASE_FOR_SEED) + Call(SetNpcVar, NPC_Kolorado, 0, 1) + EndSwitch + Exec(N(EVS_SetupMusic)) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Call(EnablePartnerAI) + Return + End }; EvtScript N(D_80249C34_85BDA4) = { - EVT_THREAD - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_CALL(PlayerJump1, -310, -10, 372, 30) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(PlayerFaceNpc, NPC_Whale, FALSE) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_PARTNER, -345, -10, 372, 30) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Whale, 0) - EVT_CALL(ClearPartnerMoveHistory, NPC_PARTNER) - EVT_CALL(EnablePartnerAI) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + Call(SetPlayerJumpscale, Float(1.0)) + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + Call(PlayerJump1, -310, -10, 372, 30) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(PlayerFaceNpc, NPC_Whale, FALSE) + EndThread + Thread + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(SetNpcJumpscale, NPC_PARTNER, Float(1.0)) + Call(NpcJump0, NPC_PARTNER, -345, -10, 372, 30) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Whale, 0) + Call(ClearPartnerMoveHistory, NPC_PARTNER) + Call(EnablePartnerAI) + EndThread + Return + End }; EvtScript N(D_80249D80_85BEF0) = { - EVT_WAIT(20) - EVT_CALL(PlayerMoveTo, -285, 485, 40) - EVT_CALL(PlayerMoveTo, -310, 372, 20) - EVT_CALL(PlayerFaceNpc, NPC_Whale, FALSE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(NpcMoveTo, NPC_PARTNER, -345, 372, 30) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Whale, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(ClearPartnerMoveHistory, NPC_PARTNER) - EVT_CALL(EnablePartnerAI) - EVT_RETURN - EVT_END + Wait(20) + Call(PlayerMoveTo, -285, 485, 40) + Call(PlayerMoveTo, -310, 372, 20) + Call(PlayerFaceNpc, NPC_Whale, FALSE) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(NpcMoveTo, NPC_PARTNER, -345, 372, 30) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Whale, Float(1.0)) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(ClearPartnerMoveHistory, NPC_PARTNER) + Call(EnablePartnerAI) + Return + End }; #include "world/common/todo/GetFloorCollider.inc.c" @@ -710,476 +710,476 @@ API_CALLABLE(N(func_802430B4_855224)) { } EvtScript N(D_80249E84_85BFF4) = { - EVT_SET(LVarA, 0) - EVT_LOOP(0) - EVT_CALL(N(GetFloorCollider), LVar0) - EVT_IF_EQ(LVar0, 29) - EVT_SET(LVar5, 0) - EVT_CALL(GetPlayerActionState, LVar1) - EVT_IF_EQ(LVar1, ACTION_STATE_HAMMER) - EVT_ADD(LVar5, 1) - EVT_END_IF - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_CALL(GetPlayerTargetYaw, LVar3) - EVT_IF_LT(LVar3, 180) - EVT_IF_GT(LVar2, -60) - EVT_ADD(LVar5, 1) - EVT_END_IF - EVT_ELSE - EVT_IF_GT(LVar2, -40) - EVT_ADD(LVar5, 1) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVar5, 2) - EVT_IF_EQ(LVarA, 2) - EVT_SET(LFlag0, TRUE) - EVT_RETURN - EVT_ELSE - EVT_CALL(DisablePlayerInput, TRUE) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerActionState, LVar1) - EVT_IF_EQ(LVar1, ACTION_STATE_IDLE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_CALL(PlayerJump1, LVar2, LVar3, LVar4, 10) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_CALL(PlaySoundAt, SOUND_WHALE_JIGGLE, SOUND_SPACE_DEFAULT, 0, 0, 480) - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Panic) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_WalkSad) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ADD(LVarA, 1) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVar1, ACTION_STATE_SPIN_POUND) - EVT_SET(LFlag0, TRUE) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(N(func_802430B4_855224), LVar2) - EVT_IF_EQ(LVar2, 29) - EVT_IF_EQ(LVar0, 29) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVarA, 0) + Loop(0) + Call(N(GetFloorCollider), LVar0) + IfEq(LVar0, 29) + Set(LVar5, 0) + Call(GetPlayerActionState, LVar1) + IfEq(LVar1, ACTION_STATE_HAMMER) + Add(LVar5, 1) + EndIf + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Call(GetPlayerTargetYaw, LVar3) + IfLt(LVar3, 180) + IfGt(LVar2, -60) + Add(LVar5, 1) + EndIf + Else + IfGt(LVar2, -40) + Add(LVar5, 1) + EndIf + EndIf + IfEq(LVar5, 2) + IfEq(LVarA, 2) + Set(LFlag0, TRUE) + Return + Else + Call(DisablePlayerInput, TRUE) + Loop(0) + Wait(1) + Call(GetPlayerActionState, LVar1) + IfEq(LVar1, ACTION_STATE_IDLE) + BreakLoop + EndIf + EndLoop + Wait(10) + Thread + Call(SetPlayerJumpscale, Float(1.0)) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + Call(PlayerJump1, LVar2, LVar3, LVar4, 10) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndThread + Call(PlaySoundAt, SOUND_WHALE_JIGGLE, SOUND_SPACE_DEFAULT, 0, 0, 480) + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Panic) + Wait(10) + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_WalkSad) + Call(DisablePlayerInput, FALSE) + Add(LVarA, 1) + EndIf + EndIf + IfEq(LVar1, ACTION_STATE_SPIN_POUND) + Set(LFlag0, TRUE) + Return + EndIf + EndIf + Call(N(func_802430B4_855224), LVar2) + IfEq(LVar2, 29) + IfEq(LVar0, 29) + Set(LFlag0, TRUE) + EndIf + Return + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(D_8024A1F8_85C368) = { - EVT_EXEC_WAIT(N(D_80249E84_85BFF4)) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(10) - EVT_CALL(PlaySoundAt, SOUND_WHALE_JIGGLE, SOUND_SPACE_DEFAULT, 0, 0, 480) - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Panic) - EVT_WAIT(10) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_EXEC_GET_TID(N(D_802486EC_85A85C), LVarA) - EVT_IF_EQ(LFlag0, TRUE) - EVT_EXEC(N(D_80249C34_85BDA4)) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Run) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Run, ANIM_Kolorado_Run, 5, MSG_MAC_Port_0090) - EVT_IF_EQ(LFlag0, FALSE) - EVT_EXEC(N(D_80249D80_85BEF0)) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_kujira, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_WalkSad) - EVT_CALL(MakeLerp, 480, 372, 50, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, NPC_Whale, -73, -53, LVar0) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(MakeLerp, -73, -220, 50, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, NPC_Whale, LVar0, -53, 372) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(20) - EVT_CALL(MakeLerp, -53, 10, 50, EASING_COS_IN_OUT) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, NPC_Whale, -220, LVar0, 372) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_HurtStill) - EVT_WAIT(50) - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Talk) - EVT_KILL_THREAD(LVarA) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Kolorado, LVar3, LVar4, LVar5) - EVT_ADD(LVar0, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_ADD(LVar2, LVar5) - EVT_DIV(LVar0, 2) - EVT_DIV(LVar1, 2) - EVT_DIV(LVar2, 2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(NpcFaceNpc, NPC_Kolorado, NPC_Whale, 0) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Kolorado, 0) - EVT_CALL(PlayerFaceNpc, NPC_Kolorado, FALSE) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Kolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Port_0091) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Whale, LVar3, LVar4, LVar5) - EVT_ADD(LVar0, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_ADD(LVar2, LVar5) - EVT_DIV(LVar0, 2) - EVT_DIV(LVar1, 2) - EVT_DIV(LVar2, 2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 475) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-63.5), 0) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.5), EVT_FLOAT(-5.0)) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(NpcFaceNpc, NPC_Kolorado, NPC_Whale, 0) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Whale, 0) - EVT_CALL(PlayerFaceNpc, NPC_Whale, FALSE) - EVT_END_THREAD - EVT_EXEC(N(EVS_80244314)) - EVT_CALL(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Talk, 5, MSG_MAC_Port_0092) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Kolorado, LVar3, LVar4, LVar5) - EVT_ADD(LVar0, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_ADD(LVar2, LVar5) - EVT_DIV(LVar0, 2) - EVT_DIV(LVar1, 2) - EVT_DIV(LVar2, 2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.0), EVT_FLOAT(-7.0)) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(NpcFaceNpc, NPC_Kolorado, NPC_Whale, 0) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Kolorado, 0) - EVT_CALL(PlayerFaceNpc, NPC_Kolorado, FALSE) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Kolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Port_0093) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Whale, LVar3, LVar4, LVar5) - EVT_ADD(LVar0, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_ADD(LVar2, LVar5) - EVT_DIV(LVar0, 2) - EVT_DIV(LVar1, 2) - EVT_DIV(LVar2, 2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 475) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-63.5), 0) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.5), EVT_FLOAT(-5.0)) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(NpcFaceNpc, NPC_Kolorado, NPC_Whale, 0) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Whale, 0) - EVT_CALL(PlayerFaceNpc, NPC_Whale, FALSE) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Still, 5, MSG_MAC_Port_0094) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Kolorado, LVar3, LVar4, LVar5) - EVT_ADD(LVar0, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_ADD(LVar2, LVar5) - EVT_DIV(LVar0, 2) - EVT_DIV(LVar1, 2) - EVT_DIV(LVar2, 2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.0), EVT_FLOAT(-7.0)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(NpcFaceNpc, NPC_Kolorado, NPC_Whale, 0) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Whale, 0) - EVT_CALL(PlayerFaceNpc, NPC_Whale, FALSE) - EVT_END_THREAD - EVT_SET(GB_StoryProgress, STORY_CH5_WHALE_MOUTH_OPEN) - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Yell) - EVT_WAIT(50) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + ExecWait(N(D_80249E84_85BFF4)) + Call(DisablePlayerInput, TRUE) + Wait(10) + Call(PlaySoundAt, SOUND_WHALE_JIGGLE, SOUND_SPACE_DEFAULT, 0, 0, 480) + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Panic) + Wait(10) + Call(DisablePlayerPhysics, TRUE) + ExecGetTID(N(D_802486EC_85A85C), LVarA) + IfEq(LFlag0, TRUE) + Exec(N(D_80249C34_85BDA4)) + EndIf + Wait(10) + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Run) + Wait(20) + Call(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Run, ANIM_Kolorado_Run, 5, MSG_MAC_Port_0090) + IfEq(LFlag0, FALSE) + Exec(N(D_80249D80_85BEF0)) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_kujira, COLLIDER_FLAGS_UPPER_MASK) + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_WalkSad) + Call(MakeLerp, 480, 372, 50, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(SetNpcPos, NPC_Whale, -73, -53, LVar0) + IfEq(LVar1, 1) + Wait(1) + Goto(0) + EndIf + Call(MakeLerp, -73, -220, 50, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(SetNpcPos, NPC_Whale, LVar0, -53, 372) + IfEq(LVar1, 1) + Wait(1) + Goto(1) + EndIf + Wait(20) + Call(MakeLerp, -53, 10, 50, EASING_COS_IN_OUT) + Label(2) + Call(UpdateLerp) + Call(SetNpcPos, NPC_Whale, -220, LVar0, 372) + IfEq(LVar1, 1) + Wait(1) + Goto(2) + EndIf + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_HurtStill) + Wait(50) + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Talk) + KillThread(LVarA) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Kolorado, LVar3, LVar4, LVar5) + Add(LVar0, LVar3) + Add(LVar1, LVar4) + Add(LVar2, LVar5) + Div(LVar0, 2) + Div(LVar1, 2) + Div(LVar2, 2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Thread + Wait(5) + Call(NpcFaceNpc, NPC_Kolorado, NPC_Whale, 0) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Kolorado, 0) + Call(PlayerFaceNpc, NPC_Kolorado, FALSE) + EndThread + Call(SpeakToPlayer, NPC_Kolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Port_0091) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Whale, LVar3, LVar4, LVar5) + Add(LVar0, LVar3) + Add(LVar1, LVar4) + Add(LVar2, LVar5) + Div(LVar0, 2) + Div(LVar1, 2) + Div(LVar2, 2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 475) + Call(SetCamPosA, CAM_DEFAULT, Float(-63.5), 0) + Call(SetCamPitch, CAM_DEFAULT, Float(18.5), Float(-5.0)) + Thread + Wait(5) + Call(NpcFaceNpc, NPC_Kolorado, NPC_Whale, 0) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Whale, 0) + Call(PlayerFaceNpc, NPC_Whale, FALSE) + EndThread + Exec(N(EVS_80244314)) + Call(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Talk, 5, MSG_MAC_Port_0092) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Kolorado, LVar3, LVar4, LVar5) + Add(LVar0, LVar3) + Add(LVar1, LVar4) + Add(LVar2, LVar5) + Div(LVar0, 2) + Div(LVar1, 2) + Div(LVar2, 2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPosA, CAM_DEFAULT, 0, 0) + Call(SetCamPitch, CAM_DEFAULT, Float(18.0), Float(-7.0)) + Thread + Wait(5) + Call(NpcFaceNpc, NPC_Kolorado, NPC_Whale, 0) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Kolorado, 0) + Call(PlayerFaceNpc, NPC_Kolorado, FALSE) + EndThread + Call(SpeakToPlayer, NPC_Kolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Port_0093) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Whale, LVar3, LVar4, LVar5) + Add(LVar0, LVar3) + Add(LVar1, LVar4) + Add(LVar2, LVar5) + Div(LVar0, 2) + Div(LVar1, 2) + Div(LVar2, 2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 475) + Call(SetCamPosA, CAM_DEFAULT, Float(-63.5), 0) + Call(SetCamPitch, CAM_DEFAULT, Float(18.5), Float(-5.0)) + Thread + Wait(5) + Call(NpcFaceNpc, NPC_Kolorado, NPC_Whale, 0) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Whale, 0) + Call(PlayerFaceNpc, NPC_Whale, FALSE) + EndThread + Call(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Still, 5, MSG_MAC_Port_0094) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Kolorado, LVar3, LVar4, LVar5) + Add(LVar0, LVar3) + Add(LVar1, LVar4) + Add(LVar2, LVar5) + Div(LVar0, 2) + Div(LVar1, 2) + Div(LVar2, 2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPosA, CAM_DEFAULT, 0, 0) + Call(SetCamPitch, CAM_DEFAULT, Float(18.0), Float(-7.0)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 450) + Thread + Wait(5) + Call(NpcFaceNpc, NPC_Kolorado, NPC_Whale, 0) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Whale, 0) + Call(PlayerFaceNpc, NPC_Whale, FALSE) + EndThread + Set(GB_StoryProgress, STORY_CH5_WHALE_MOUTH_OPEN) + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Yell) + Wait(50) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_Toad_01) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_IF_GE(GB_StoryProgress, STORY_CH5_WHALE_MOUTH_OPEN) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_ENTERED_WHALE) - EVT_CALL(GetNpcAnimation, NPC_Whale, LVar0) - EVT_IF_EQ(LVar0, ANIM_Kolorado_Yell) - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_IdleSad) - EVT_WAIT(15) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Still) - EVT_CALL(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Talk, 5, MSG_MAC_Port_0097) - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Yell) - EVT_WAIT(30) - EVT_RETURN - EVT_ELSE - EVT_CALL(GetNpcAnimation, NPC_Whale, LVar0) - EVT_IF_EQ(LVar0, ANIM_Kolorado_Yell) - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_IdleSad) - EVT_WAIT(15) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Still) - EVT_CALL(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Talk, 5, MSG_MAC_Port_0098) - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Yell) - EVT_WAIT(30) - EVT_RETURN - EVT_END_IF - EVT_ELSE - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Still, 5, MSG_MAC_Port_00B0) - EVT_CALL(ShowChoice, MSG_Choice_0010) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(ContinueSpeech, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Still, 5, MSG_MAC_Port_00B2) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_RETURN - EVT_ELSE - EVT_CALL(EndSpeech, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Still, 5) - EVT_END_IF - EVT_CALL(SetNpcJumpscale, NPC_SELF, 0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_SELF, -220, -30, 372, 20) - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_TalkSad) - EVT_CALL(InterpNpcYaw, NPC_Whale, 180, 60) - EVT_SET(LVar0, 0) - EVT_EXEC(N(D_802484F8_85A668)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt9, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_CALL(N(func_80242A90_854C00), 0, LVar0, LVar1, LVar2) - EVT_EXEC(N(D_802496C0_85B830)) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(PlayerJump, LVar0, LVar1, LVar2, 20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_THREAD - EVT_CALL(N(func_80242C78_854DE8), 0) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_RUN) - EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar3, LVar5, 10) - EVT_CALL(N(func_80242A90_854C00), 1, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 20) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_THREAD - EVT_CALL(N(func_80242C78_854DE8), 1) - EVT_END_THREAD - EVT_IF_LT(GB_StoryProgress, STORY_CH5_REACHED_LAVA_LAVA_ISLAND) - EVT_CALL(SpeakToPlayer, NPC_Kolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Talk, 0, MSG_MAC_Port_00AD) - EVT_CALL(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Run) - EVT_CALL(NpcMoveTo, NPC_Kolorado, LVar3, LVar5, 20) - EVT_CALL(N(func_80242A90_854C00), 2, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_Kolorado, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcJumpscale, NPC_Kolorado, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_Kolorado, LVar0, LVar1, LVar2, 20) - EVT_CALL(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Idle) - EVT_THREAD - EVT_CALL(N(func_80242C78_854DE8), 2) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Still, 5, MSG_MAC_Port_00AE) - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Shout) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Idle) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Still, 5, MSG_MAC_Port_00B1) - EVT_END_IF - EVT_SET(MF_Unk_01, FALSE) - EVT_THREAD - EVT_CALL(N(func_80242E84_854FF4), 0) - EVT_CALL(GotoMap, EVT_PTR("mac_06"), mac_06_ENTRY_0) - EVT_END_THREAD - EVT_IF_LT(GB_StoryProgress, STORY_CH5_REACHED_LAVA_LAVA_ISLAND) - EVT_CALL(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Still, 5, MSG_MAC_Port_00AF) - EVT_SET(MF_Unk_01, TRUE) - EVT_ELSE - EVT_SET(MF_Unk_01, TRUE) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH5_DEFEATED_FUZZIPEDE) + IfGe(GB_StoryProgress, STORY_CH5_WHALE_MOUTH_OPEN) + IfLt(GB_StoryProgress, STORY_CH5_ENTERED_WHALE) + Call(GetNpcAnimation, NPC_Whale, LVar0) + IfEq(LVar0, ANIM_Kolorado_Yell) + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_IdleSad) + Wait(15) + EndIf + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Still) + Call(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Talk, 5, MSG_MAC_Port_0097) + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Yell) + Wait(30) + Return + Else + Call(GetNpcAnimation, NPC_Whale, LVar0) + IfEq(LVar0, ANIM_Kolorado_Yell) + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_IdleSad) + Wait(15) + EndIf + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Still) + Call(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Talk, 5, MSG_MAC_Port_0098) + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Yell) + Wait(30) + Return + EndIf + Else + Return + EndIf + EndIf + Call(DisablePlayerPhysics, TRUE) + Call(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Still, 5, MSG_MAC_Port_00B0) + Call(ShowChoice, MSG_Choice_0010) + IfEq(LVar0, 1) + Call(ContinueSpeech, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Still, 5, MSG_MAC_Port_00B2) + Call(DisablePlayerPhysics, FALSE) + Return + Else + Call(EndSpeech, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Still, 5) + EndIf + Call(SetNpcJumpscale, NPC_SELF, 0) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_SELF, -220, -30, 372, 20) + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_TalkSad) + Call(InterpNpcYaw, NPC_Whale, 180, 60) + Set(LVar0, 0) + Exec(N(D_802484F8_85A668)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt9, COLLIDER_FLAGS_UPPER_MASK) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Call(N(func_80242A90_854C00), 0, LVar0, LVar1, LVar2) + Exec(N(D_802496C0_85B830)) + Call(SetPlayerJumpscale, Float(1.0)) + Call(PlayerJump, LVar0, LVar1, LVar2, 20) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(InterpPlayerYaw, 90, 0) + Thread + Call(N(func_80242C78_854DE8), 0) + EndThread + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_RUN) + Call(NpcMoveTo, NPC_PARTNER, LVar3, LVar5, 10) + Call(N(func_80242A90_854C00), 1, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_PARTNER, Float(1.0)) + Call(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 20) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + Thread + Call(N(func_80242C78_854DE8), 1) + EndThread + IfLt(GB_StoryProgress, STORY_CH5_REACHED_LAVA_LAVA_ISLAND) + Call(SpeakToPlayer, NPC_Kolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Talk, 0, MSG_MAC_Port_00AD) + Call(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Run) + Call(NpcMoveTo, NPC_Kolorado, LVar3, LVar5, 20) + Call(N(func_80242A90_854C00), 2, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_Kolorado, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(SetNpcJumpscale, NPC_Kolorado, Float(1.0)) + Call(NpcJump0, NPC_Kolorado, LVar0, LVar1, LVar2, 20) + Call(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Idle) + Thread + Call(N(func_80242C78_854DE8), 2) + EndThread + Call(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Still, 5, MSG_MAC_Port_00AE) + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Shout) + Wait(30) + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Idle) + Else + Call(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Still, 5, MSG_MAC_Port_00B1) + EndIf + Set(MF_Unk_01, FALSE) + Thread + Call(N(func_80242E84_854FF4), 0) + Call(GotoMap, Ref("mac_06"), mac_06_ENTRY_0) + EndThread + IfLt(GB_StoryProgress, STORY_CH5_REACHED_LAVA_LAVA_ISLAND) + Call(SpeakToPlayer, NPC_Whale, ANIM_Kolorado_Walk, ANIM_Kolorado_Still, 5, MSG_MAC_Port_00AF) + Set(MF_Unk_01, TRUE) + Else + Set(MF_Unk_01, TRUE) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Toad_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_01))) - EVT_CALL(SetNpcFlagBits, NPC_Whale, NPC_FLAG_HAS_NO_SPRITE, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Whale, NPC_FLAG_HAS_SHADOW, FALSE) - EVT_CALL(InterpNpcYaw, NPC_Whale, 270, 0) - EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) - EVT_CALL(SetNpcPos, NPC_Whale, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_WalkSad) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kujira_atari, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_CALL(SetNpcPos, NPC_Whale, 0, -60, 290) - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_WalkSad) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kujira_atari, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH5_WHALE_MOUTH_OPEN) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kujira, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Run) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kujira_atari, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetNpcPos, NPC_Whale, -73, -53, 480) - EVT_EXEC(N(D_8024A1F8_85C368)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, mac_05_ENTRY_2) - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Talk) - EVT_CALL(SetNpcPos, NPC_Whale, -220, 10, 372) - EVT_RETURN - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Talk) - EVT_CALL(SetNpcPos, NPC_Whale, -220, 10, 372) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Still) - EVT_CALL(SetNpcPos, NPC_Whale, -220, 10, 372) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_01))) + Call(SetNpcFlagBits, NPC_Whale, NPC_FLAG_HAS_NO_SPRITE, TRUE) + Call(SetNpcFlagBits, NPC_Whale, NPC_FLAG_HAS_SHADOW, FALSE) + Call(InterpNpcYaw, NPC_Whale, 270, 0) + IfLt(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) + Call(SetNpcPos, NPC_Whale, NPC_DISPOSE_LOCATION) + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_WalkSad) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kujira_atari, COLLIDER_FLAGS_UPPER_MASK) + Return + EndIf + IfLt(GB_StoryProgress, STORY_CH4_STAR_SPRIT_DEPARTED) + Call(SetNpcPos, NPC_Whale, 0, -60, 290) + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_WalkSad) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kujira_atari, COLLIDER_FLAGS_UPPER_MASK) + Return + EndIf + IfLt(GB_StoryProgress, STORY_CH5_WHALE_MOUTH_OPEN) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kujira, COLLIDER_FLAGS_UPPER_MASK) + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Run) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kujira_atari, COLLIDER_FLAGS_UPPER_MASK) + Call(SetNpcPos, NPC_Whale, -73, -53, 480) + Exec(N(D_8024A1F8_85C368)) + Return + EndIf + Call(GetEntryID, LVar0) + IfEq(LVar0, mac_05_ENTRY_2) + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Talk) + Call(SetNpcPos, NPC_Whale, -220, 10, 372) + Return + EndIf + IfLt(GB_StoryProgress, STORY_CH5_DEFEATED_FUZZIPEDE) + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Talk) + Call(SetNpcPos, NPC_Whale, -220, 10, 372) + Return + EndIf + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Still) + Call(SetNpcPos, NPC_Whale, -220, 10, 372) + Return + End }; EvtScript N(EVS_NpcIdle_Kolorado) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar1, -10) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(1.5)) - EVT_CALL(NpcMoveTo, NPC_SELF, -335, 400, 10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Port_00B3) - EVT_THREAD - EVT_WAIT(15 * DT) - EVT_CALL(PlayerMoveTo, -340, 380, 20 * DT) - EVT_CALL(InterpPlayerYaw, 45, 0) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Run) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(8.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_SELF, -280, 280, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, -340, 70, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, -260, -140, 0) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(7.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_SELF, 150, -140, 0) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_SET(GB_StoryProgress, STORY_CH5_RETURNED_TO_TOAD_TOWN) - EVT_IF_EQ(GF_MAC01_Defeated_JrTroopa4, FALSE) - EVT_CALL(SetNpcVar, NPC_JrTroopa_01, 0, 1) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Loop(0) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + IfEq(LVar1, -10) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) + Call(SetNpcSpeed, NPC_SELF, Float(1.5)) + Call(NpcMoveTo, NPC_SELF, -335, 400, 10) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) + Call(NpcFacePlayer, NPC_SELF, 0) + Loop(0) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Port_00B3) + Thread + Wait(15 * DT) + Call(PlayerMoveTo, -340, 380, 20 * DT) + Call(InterpPlayerYaw, 45, 0) + EndThread + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Run) + Call(SetNpcSpeed, NPC_SELF, Float(8.0 / DT)) + Call(NpcMoveTo, NPC_SELF, -280, 280, 0) + Call(NpcMoveTo, NPC_SELF, -340, 70, 0) + Call(NpcMoveTo, NPC_SELF, -260, -140, 0) + Call(SetNpcSpeed, NPC_SELF, Float(7.0 / DT)) + Call(NpcMoveTo, NPC_SELF, 150, -140, 0) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Set(GB_StoryProgress, STORY_CH5_RETURNED_TO_TOAD_TOWN) + IfEq(GF_MAC01_Defeated_JrTroopa4, FALSE) + Call(SetNpcVar, NPC_JrTroopa_01, 0, 1) + EndIf + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_Kolorado) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_WHALE_MOUTH_OPEN) - EVT_IF_EQ(AF_MAC_38, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Port_0083) - EVT_SET(AF_MAC_38, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Port_0084) - EVT_END_IF - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_CALL(SpeakToPlayer, NPC_Kolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Port_0095) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(30) - EVT_CALL(SpeakToPlayer, NPC_Kolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Port_0096) - EVT_CASE_LT(STORY_CH5_REACHED_LAVA_LAVA_ISLAND) - EVT_CALL(SpeakToPlayer, NPC_Kolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Port_00AC) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_ArtifactPrompt_Kolorado)) - EVT_EXEC_WAIT(N(EVS_LetterPrompt_Kolorado)) - EVT_EXEC_WAIT(N(EVS_LetterReward_Kolorado)) - EVT_IF_NE(LVarC, 0) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_WHALE_MOUTH_OPEN) + IfEq(AF_MAC_38, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Port_0083) + Set(AF_MAC_38, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Port_0084) + EndIf + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Call(SpeakToPlayer, NPC_Kolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Port_0095) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(10) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(30) + Call(SpeakToPlayer, NPC_Kolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Port_0096) + CaseLt(STORY_CH5_REACHED_LAVA_LAVA_ISLAND) + Call(SpeakToPlayer, NPC_Kolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_MAC_Port_00AC) + EndSwitch + ExecWait(N(EVS_ArtifactPrompt_Kolorado)) + ExecWait(N(EVS_LetterPrompt_Kolorado)) + ExecWait(N(EVS_LetterReward_Kolorado)) + IfNe(LVarC, 0) + Return + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Kolorado) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_REACHED_LAVA_LAVA_ISLAND) - EVT_CALL(SetNpcPos, NPC_SELF, -380, -10, 372) - EVT_CALL(NpcFaceNpc, NPC_SELF, NPC_Whale, 0) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Kolorado))) - EVT_CASE_EQ(STORY_CH5_TRADED_VASE_FOR_SEED) - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Kolorado))) - EVT_CASE_DEFAULT - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_REACHED_LAVA_LAVA_ISLAND) + Call(SetNpcPos, NPC_SELF, -380, -10, 372) + Call(NpcFaceNpc, NPC_SELF, NPC_Whale, 0) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Kolorado))) + CaseEq(STORY_CH5_TRADED_VASE_FOR_SEED) + Call(SetSelfVar, 0, 0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Kolorado))) + CaseDefault + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(EnableNpcShadow, NPC_SELF, FALSE) + EndSwitch + Return + End }; API_CALLABLE(N(func_802431B0_855320)) { @@ -1196,12 +1196,12 @@ API_CALLABLE(N(func_802431B0_855320)) { } EvtScript N(D_8024BCBC_85DE2C) = { - EVT_LOOP(0) - EVT_CALL(N(func_802431B0_855320)) - EVT_WAIT(5) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(N(func_802431B0_855320)) + Wait(5) + EndLoop + Return + End }; API_CALLABLE(N(func_80243254_8553C4)) { @@ -1228,515 +1228,515 @@ API_CALLABLE(N(func_80243254_8553C4)) { } EvtScript N(EVS_NpcIdle_JrTroopa_01) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_LABEL(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(45) - EVT_EXEC(N(EVS_80244298)) - EVT_CALL(PlaySound, SOUND_LOOP_JR_TROOPA_SWIM) - EVT_EXEC_GET_TID(N(D_8024BCBC_85DE2C), LVar9) - EVT_CALL(SetNpcPos, NPC_SELF, 150, -30, 490) - EVT_WAIT(5) - EVT_THREAD - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtPlayer, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, 0, EMOTE_EXCLAMATION, 0, 30, EMOTER_PLAYER, 0, 0, 0, 0) - EVT_CALL(PlaySoundAtNpc, NPC_PARTNER, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_PARTNER, EMOTE_EXCLAMATION, 0, 30, EMOTER_NPC, 0, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(ShowMessageAtScreenPos, MSG_MAC_Port_00B4, 160, 40) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -100, -10, 490) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -100, -10, 490) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 700) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(20.0), EVT_FLOAT(-8.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_ChargeTripped) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(2.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, -40, 490, 0) - EVT_KILL_THREAD(LVar9) - EVT_CALL(StopSound, SOUND_LOOP_JR_TROOPA_SWIM) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_JR_TROOPA_SPLASH, SOUND_SPACE_DEFAULT) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kujira, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o236, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Charge) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.5)) - EVT_CALL(NpcJump0, NPC_SELF, -100, -10, 490, 15) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_OutOfBreath) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_kujira, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o236, COLLIDER_FLAGS_UPPER_MASK) - EVT_WAIT(10) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.0), EVT_FLOAT(-7.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_TiredTalk, ANIM_JrTroopa_OutOfBreath, 0, MSG_MAC_Port_00B5) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 225) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_OutOfBreath, 0, MSG_MAC_Port_00B6) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -250, -10, 490) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Walk) - EVT_CALL(NpcMoveTo, NPC_SELF, -255, 490, 75) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_OutOfBreath) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_RunBack, ANIM_JrTroopa_RunBack, 0, MSG_MAC_Port_00B7) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_RunBack) - EVT_WAIT(15) - EVT_THREAD - EVT_CALL(N(func_80243254_8553C4), -1, LVar0, LVar2) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, LVar2, 45) - EVT_END_THREAD - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(StartBossBattle, SONG_JR_TROOPA_BATTLE) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Label(0) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Wait(1) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Wait(45) + Exec(N(EVS_80244298)) + Call(PlaySound, SOUND_LOOP_JR_TROOPA_SWIM) + ExecGetTID(N(D_8024BCBC_85DE2C), LVar9) + Call(SetNpcPos, NPC_SELF, 150, -30, 490) + Wait(5) + Thread + Call(InterpPlayerYaw, 90, 0) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + Wait(20) + Call(PlaySoundAtPlayer, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, 0, EMOTE_EXCLAMATION, 0, 30, EMOTER_PLAYER, 0, 0, 0, 0) + Call(PlaySoundAtNpc, NPC_PARTNER, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_PARTNER, EMOTE_EXCLAMATION, 0, 30, EMOTER_NPC, 0, 0, 0, 0) + EndThread + Call(ShowMessageAtScreenPos, MSG_MAC_Port_00B4, 160, 40) + Call(UseSettingsFrom, CAM_DEFAULT, -100, -10, 490) + Call(SetPanTarget, CAM_DEFAULT, -100, -10, 490) + Call(SetCamDistance, CAM_DEFAULT, 700) + Call(SetCamPitch, CAM_DEFAULT, Float(20.0), Float(-8.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_ChargeTripped) + Call(SetNpcSpeed, NPC_SELF, Float(2.0)) + Call(NpcMoveTo, NPC_SELF, -40, 490, 0) + KillThread(LVar9) + Call(StopSound, SOUND_LOOP_JR_TROOPA_SWIM) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_JR_TROOPA_SPLASH, SOUND_SPACE_DEFAULT) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kujira, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o236, COLLIDER_FLAGS_UPPER_MASK) + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Charge) + Call(SetNpcJumpscale, NPC_SELF, Float(1.5)) + Call(NpcJump0, NPC_SELF, -100, -10, 490, 15) + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_OutOfBreath) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_kujira, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o236, COLLIDER_FLAGS_UPPER_MASK) + Wait(10) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, Float(18.0), Float(-7.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_TiredTalk, ANIM_JrTroopa_OutOfBreath, 0, MSG_MAC_Port_00B5) + Call(SetCamDistance, CAM_DEFAULT, 225) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_OutOfBreath, 0, MSG_MAC_Port_00B6) + Call(SetPanTarget, CAM_DEFAULT, -250, -10, 490) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Walk) + Call(NpcMoveTo, NPC_SELF, -255, 490, 75) + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_OutOfBreath) + Wait(10) + Thread + Call(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_RunBack, ANIM_JrTroopa_RunBack, 0, MSG_MAC_Port_00B7) + EndThread + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_RunBack) + Wait(15) + Thread + Call(N(func_80243254_8553C4), -1, LVar0, LVar2) + Call(NpcMoveTo, NPC_SELF, LVar0, LVar2, 45) + EndThread + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Call(StartBossBattle, SONG_JR_TROOPA_BATTLE) + Return + End }; EvtScript N(EVS_NpcInteract_JrTroopa_01) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Defeated, ANIM_JrTroopa_Defeated, 5, MSG_MAC_Port_00BD) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Defeated, ANIM_JrTroopa_Defeated, 5, MSG_MAC_Port_00BD) + Return + End }; EvtScript N(EVS_NpcDefeat_JrTroopa_01) = { - EVT_CALL(DisablePartnerAI, 0) - EVT_SET(GF_MAC01_Defeated_JrTroopa4, TRUE) - EVT_CALL(SetPlayerPos, -340, -10, 380) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_PARTNER, -360, LVar1, 390) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 90) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(SetNpcPos, NPC_SELF, -300, -10, 380) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_JrTroopa_02, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_CALL(SetNpcYaw, NPC_JrTroopa_02, 270) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Defeated) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Defeated, ANIM_JrTroopa_Defeated, 0, MSG_MAC_Port_00BE) - EVT_CALL(FadeOutMusic, 0, 2000) - EVT_CALL(EnablePartnerAI) - EVT_RETURN - EVT_END + Call(DisablePartnerAI, 0) + Set(GF_MAC01_Defeated_JrTroopa4, TRUE) + Call(SetPlayerPos, -340, -10, 380) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_PARTNER, -360, LVar1, 390) + Call(SetNpcYaw, NPC_PARTNER, 90) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(SetNpcPos, NPC_SELF, -300, -10, 380) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_JrTroopa_02, LVar0, LVar1, LVar2) + Call(SetNpcYaw, NPC_SELF, 270) + Call(SetNpcYaw, NPC_JrTroopa_02, 270) + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Defeated) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Defeated, ANIM_JrTroopa_Defeated, 0, MSG_MAC_Port_00BE) + Call(FadeOutMusic, 0, 2000) + Call(EnablePartnerAI) + Return + End }; EvtScript N(EVS_NpcHit_JrTroopa_02) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_PARTNER) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Defeated, ANIM_JrTroopa_Defeated, 5, MSG_MAC_Port_00BD) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseOrEq(ENCOUNTER_TRIGGER_JUMP) + CaseOrEq(ENCOUNTER_TRIGGER_HAMMER) + CaseOrEq(ENCOUNTER_TRIGGER_PARTNER) + Call(DisablePlayerInput, TRUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Defeated, ANIM_JrTroopa_Defeated, 5, MSG_MAC_Port_00BD) + Call(DisablePlayerInput, FALSE) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_JrTroopa_01) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_JrTroopa_01))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_JrTroopa_01))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_JrTroopa_01))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_JrTroopa_01))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_JrTroopa_01))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_JrTroopa_01))) + Return + End }; EvtScript N(EVS_NpcInit_JrTroopa_02) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_JrTroopa_02))) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_JrTroopa_02))) + Return + End }; EvtScript N(EVS_NpcInteract_Fuzzipede1) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Port_004E) - EVT_SET(LVar1, MSG_MAC_Port_005B) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Port_004F) - EVT_SET(LVar1, MSG_MAC_Port_005C) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Port_0050) - EVT_SET(LVar1, MSG_MAC_Port_005D) - EVT_END_SWITCH - EVT_CALL(SpeakToNpc, NPC_Fishmael, ANIM_Fishmael_Talk, ANIM_Fishmael_Idle, 0, NPC_Fuzzipede, LVar0) - EVT_CALL(SpeakToNpc, NPC_Fuzzipede, ANIM_Fuzzipede_Anim24, ANIM_Fuzzipede_Anim04, 0, NPC_Fishmael, LVar1) - EVT_EXEC_WAIT(N(EVS_LetterPrompt_Fishmael)) - EVT_IF_NE(LVarC, 0) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Port_004E) + Set(LVar1, MSG_MAC_Port_005B) + Else + Set(LVar0, MSG_MAC_Port_004F) + Set(LVar1, MSG_MAC_Port_005C) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Port_0050) + Set(LVar1, MSG_MAC_Port_005D) + EndSwitch + Call(SpeakToNpc, NPC_Fishmael, ANIM_Fishmael_Talk, ANIM_Fishmael_Idle, 0, NPC_Fuzzipede, LVar0) + Call(SpeakToNpc, NPC_Fuzzipede, ANIM_Fuzzipede_Anim24, ANIM_Fuzzipede_Anim04, 0, NPC_Fishmael, LVar1) + ExecWait(N(EVS_LetterPrompt_Fishmael)) + IfNe(LVarC, 0) + Return + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Fishmael) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH4_RETURNED_STOREROOM_KEY) - EVT_IF_EQ(GF_MAC04_StoreroomKeyStolen, FALSE) - EVT_SET(LVar0, MSG_MAC_Port_0051) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Port_0052) - EVT_END_IF - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Port_0053) - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Port_0054) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Port_0055) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Port_0056) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Port_0057) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Port_0058) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Port_0059) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Port_005A) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Fishmael_Talk, ANIM_Fishmael_Idle, 0, LVar0) - EVT_EXEC_WAIT(N(EVS_LetterPrompt_Fishmael)) - EVT_IF_NE(LVarC, 0) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH4_RETURNED_STOREROOM_KEY) + IfEq(GF_MAC04_StoreroomKeyStolen, FALSE) + Set(LVar0, MSG_MAC_Port_0051) + Else + Set(LVar0, MSG_MAC_Port_0052) + EndIf + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Port_0053) + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Port_0054) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Port_0055) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Port_0056) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Port_0057) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Port_0058) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Port_0059) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Port_005A) + EndSwitch + Call(SpeakToPlayer, NPC_SELF, ANIM_Fishmael_Talk, ANIM_Fishmael_Idle, 0, LVar0) + ExecWait(N(EVS_LetterPrompt_Fishmael)) + IfNe(LVarC, 0) + Return + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Fuzzipede2) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Port_005E) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Port_005F) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Port_0060) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Port_0061) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Port_0062) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Port_0063) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Fuzzipede_Anim24, ANIM_Fuzzipede_Anim04, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Port_005E) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Port_005F) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Port_0060) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Port_0061) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Port_0062) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Port_0063) + EndSwitch + Call(SpeakToPlayer, NPC_SELF, ANIM_Fuzzipede_Anim24, ANIM_Fuzzipede_Anim04, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_Fishmael) = { - EVT_CALL(SetNpcCollisionSize, NPC_SELF, 38, 38) - EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Fuzzipede1))) - EVT_ELSE - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_400000, 0) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Fishmael))) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetNpcCollisionSize, NPC_SELF, 38, 38) + IfLt(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Fuzzipede1))) + Else + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_400000, 0) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Fishmael))) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Fuzzipede) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Fuzzipede1))) - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CASE_DEFAULT - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_400000, 0) - EVT_CALL(SetNpcPos, NPC_SELF, -575, 40, 120) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Fuzzipede2))) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Fuzzipede1))) + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + CaseDefault + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_400000, 0) + Call(SetNpcPos, NPC_SELF, -575, 40, 120) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Fuzzipede2))) + CaseDefault + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Toad_04) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Port_001A) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Port_001B) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Port_001C) - EVT_CASE_LT(STORY_CH4_RETURNED_STOREROOM_KEY) - EVT_IF_EQ(GF_MAC04_StoreroomKeyStolen, FALSE) - EVT_SET(LVar0, MSG_MAC_Port_001D) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Port_001E) - EVT_END_IF - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Port_001F) - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Port_0020) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Port_0021) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Port_0022) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Port_0023) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Port_0024) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Port_0025) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Port_0026) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Port_001A) + Else + Set(LVar0, MSG_MAC_Port_001B) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Port_001C) + CaseLt(STORY_CH4_RETURNED_STOREROOM_KEY) + IfEq(GF_MAC04_StoreroomKeyStolen, FALSE) + Set(LVar0, MSG_MAC_Port_001D) + Else + Set(LVar0, MSG_MAC_Port_001E) + EndIf + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Port_001F) + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Port_0020) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Port_0021) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Port_0022) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Port_0023) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Port_0024) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Port_0025) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Port_0026) + EndSwitch + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_Toad_04) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_04))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_04))) + Return + End }; EvtScript N(EVS_NpcInteract_Toad_05) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Port_0027) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Port_0028) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Port_0029) - EVT_CASE_LT(STORY_CH4_RETURNED_STOREROOM_KEY) - EVT_IF_EQ(GF_MAC04_StoreroomKeyStolen, FALSE) - EVT_SET(LVar0, MSG_MAC_Port_002A) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Port_002B) - EVT_END_IF - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Port_002C) - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Port_002D) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Port_002E) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Port_002F) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Port_0030) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Port_0031) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Port_0032) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Port_0033) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Port_0027) + Else + Set(LVar0, MSG_MAC_Port_0028) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Port_0029) + CaseLt(STORY_CH4_RETURNED_STOREROOM_KEY) + IfEq(GF_MAC04_StoreroomKeyStolen, FALSE) + Set(LVar0, MSG_MAC_Port_002A) + Else + Set(LVar0, MSG_MAC_Port_002B) + EndIf + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Port_002C) + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Port_002D) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Port_002E) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Port_002F) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Port_0030) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Port_0031) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Port_0032) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Port_0033) + EndSwitch + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_Toad_05) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_05))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_05))) + Return + End }; EvtScript N(EVS_NpcInteract_Toad_06) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Port_0034) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Port_0035) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Port_0036) - EVT_CASE_LT(STORY_CH4_RETURNED_STOREROOM_KEY) - EVT_IF_EQ(GF_MAC04_StoreroomKeyStolen, FALSE) - EVT_SET(LVar0, MSG_MAC_Port_0037) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Port_0038) - EVT_END_IF - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Port_0039) - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Port_003A) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Port_003B) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Port_003C) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Port_003D) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Port_003E) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Port_003F) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Port_0040) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Port_0034) + Else + Set(LVar0, MSG_MAC_Port_0035) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Port_0036) + CaseLt(STORY_CH4_RETURNED_STOREROOM_KEY) + IfEq(GF_MAC04_StoreroomKeyStolen, FALSE) + Set(LVar0, MSG_MAC_Port_0037) + Else + Set(LVar0, MSG_MAC_Port_0038) + EndIf + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Port_0039) + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Port_003A) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Port_003B) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Port_003C) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Port_003D) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Port_003E) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Port_003F) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Port_0040) + EndSwitch + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_Toad_06) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_06))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_06))) + Return + End }; EvtScript N(EVS_NpcInteract_Toad_07) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Port_0041) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Port_0042) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Port_0043) - EVT_CASE_LT(STORY_CH4_RETURNED_STOREROOM_KEY) - EVT_IF_EQ(GF_MAC04_StoreroomKeyStolen, FALSE) - EVT_SET(LVar0, MSG_MAC_Port_0044) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Port_0045) - EVT_END_IF - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Port_0046) - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Port_0047) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Port_0048) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Port_0049) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Port_004A) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Port_004B) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Port_004C) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Port_004D) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Port_0041) + Else + Set(LVar0, MSG_MAC_Port_0042) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Port_0043) + CaseLt(STORY_CH4_RETURNED_STOREROOM_KEY) + IfEq(GF_MAC04_StoreroomKeyStolen, FALSE) + Set(LVar0, MSG_MAC_Port_0044) + Else + Set(LVar0, MSG_MAC_Port_0045) + EndIf + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Port_0046) + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Port_0047) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Port_0048) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Port_0049) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Port_004A) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Port_004B) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Port_004C) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Port_004D) + EndSwitch + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Yellow_Talk, ANIM_Toad_Yellow_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_Toad_07) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_07))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_07))) + Return + End }; EvtScript N(EVS_NpcInteract_Bartender) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Port_0000) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Port_0001) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Port_0002) - EVT_CASE_LT(STORY_CH4_RETURNED_STOREROOM_KEY) - EVT_IF_EQ(GF_MAC04_StoreroomKeyStolen, FALSE) - EVT_SET(LVar0, MSG_MAC_Port_0003) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Port_0004) - EVT_END_IF - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Port_0005) - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Port_0006) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Port_0007) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Port_0008) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Port_0009) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Port_000A) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Port_000B) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Port_000C) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bartender_Talk, ANIM_Bartender_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Port_0000) + Else + Set(LVar0, MSG_MAC_Port_0001) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Port_0002) + CaseLt(STORY_CH4_RETURNED_STOREROOM_KEY) + IfEq(GF_MAC04_StoreroomKeyStolen, FALSE) + Set(LVar0, MSG_MAC_Port_0003) + Else + Set(LVar0, MSG_MAC_Port_0004) + EndIf + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Port_0005) + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Port_0006) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Port_0007) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Port_0008) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Port_0009) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Port_000A) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Port_000B) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Port_000C) + EndSwitch + Call(SpeakToPlayer, NPC_SELF, ANIM_Bartender_Talk, ANIM_Bartender_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_Bartender) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bartender))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bartender))) + Return + End }; EvtScript N(EVS_NpcInteract_Toad_02) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_MAC_Port_000D) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Port_000E) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Port_000F) - EVT_CASE_LT(STORY_CH4_RETURNED_STOREROOM_KEY) - EVT_IF_EQ(GF_MAC04_StoreroomKeyStolen, FALSE) - EVT_SET(LVar0, MSG_MAC_Port_0010) - EVT_ELSE - EVT_SET(LVar0, MSG_MAC_Port_0011) - EVT_END_IF - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Port_0012) - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_MAC_Port_0013) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Port_0014) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_MAC_Port_0015) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_MAC_Port_0016) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_MAC_Port_0017) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_MAC_Port_0018) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_MAC_Port_0019) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_MAC_Port_000D) + Else + Set(LVar0, MSG_MAC_Port_000E) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Port_000F) + CaseLt(STORY_CH4_RETURNED_STOREROOM_KEY) + IfEq(GF_MAC04_StoreroomKeyStolen, FALSE) + Set(LVar0, MSG_MAC_Port_0010) + Else + Set(LVar0, MSG_MAC_Port_0011) + EndIf + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Port_0012) + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_MAC_Port_0013) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Port_0014) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_MAC_Port_0015) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_MAC_Port_0016) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_MAC_Port_0017) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_MAC_Port_0018) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_MAC_Port_0019) + EndSwitch + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_Toad_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_02))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_02))) + Return + End }; s32 N(D_8024D704_85F874)[] = { @@ -1744,171 +1744,171 @@ s32 N(D_8024D704_85F874)[] = { }; EvtScript N(EVS_NpcInteract_ArtistToad) = { - EVT_SET(GF_MAC05_Met_Simon, TRUE) - EVT_SET(LVarA, 0) - EVT_IF_GE(GB_StoryProgress, STORY_CH2_BEGAN_PEACH_MISSION) - EVT_IF_EQ(AF_MAC_3E, TRUE) - EVT_SET(LVarA, 1) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVarA, 0) - EVT_IF_EQ(AF_MAC_3D, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_0070) - EVT_SET(AF_MAC_3D, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_0071) - EVT_END_IF - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GF_MAC05_SimonGaveLyrics, FALSE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_0072) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Musician_Poet_Write) - EVT_WAIT(60) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Musician_Poet_Idle) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_0073) - EVT_CALL(SpeakToPlayer, NPC_Chanterelle, ANIM_Chanterelle_Talk, ANIM_Chanterelle_Idle, 0, MSG_MAC_Port_0074) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_0075) + Set(GF_MAC05_Met_Simon, TRUE) + Set(LVarA, 0) + IfGe(GB_StoryProgress, STORY_CH2_BEGAN_PEACH_MISSION) + IfEq(AF_MAC_3E, TRUE) + Set(LVarA, 1) + EndIf + EndIf + IfEq(LVarA, 0) + IfEq(AF_MAC_3D, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_0070) + Set(AF_MAC_3D, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_0071) + EndIf + Return + EndIf + IfEq(GF_MAC05_SimonGaveLyrics, FALSE) + Call(DisablePartnerAI, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_0072) + Call(SetNpcAnimation, NPC_SELF, ANIM_Musician_Poet_Write) + Wait(60) + Call(SetNpcAnimation, NPC_SELF, ANIM_Musician_Poet_Idle) + Call(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_0073) + Call(SpeakToPlayer, NPC_Chanterelle, ANIM_Chanterelle_Talk, ANIM_Chanterelle_Idle, 0, MSG_MAC_Port_0074) + Call(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_0075) EVT_GIVE_KEY_REWARD(ITEM_LYRICS) - EVT_SET(GF_MAC05_SimonGaveLyrics, TRUE) - EVT_CALL(EnablePartnerAI) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GF_MAC05_SimonGotMelody, TRUE) - EVT_IF_EQ(AF_MAC_3D, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_0081) - EVT_SET(AF_MAC_3D, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_0082) - EVT_SET(AF_MAC_3D, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END_IF - EVT_CALL(FindKeyItem, ITEM_MELODY, LVar0) - EVT_IF_EQ(LVar0, -1) - EVT_IF_EQ(AF_MAC_3D, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_0076) - EVT_SET(AF_MAC_3D, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_0077) - EVT_END_IF - EVT_ELSE - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_IF_EQ(AF_MAC_3D, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_0078) - EVT_SET(AF_MAC_3D, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_0079) - EVT_END_IF - EVT_SET(LVar0, EVT_PTR(N(D_8024D704_85F874))) - EVT_SET(LVar1, 10) - EVT_EXEC_WAIT(N(EVS_ChooseKeyItem)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(-1) - EVT_CALL(EnablePartnerAI) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_007A) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_007B) - EVT_SET(GF_MAC05_SimonGotMelody, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Chanterelle, ANIM_Chanterelle_Talk, ANIM_Chanterelle_Idle, 0, MSG_MAC_Port_007C) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_007D) - EVT_CALL(SpeakToPlayer, NPC_Chanterelle, ANIM_Chanterelle_Talk, ANIM_Chanterelle_Idle, 0, MSG_MAC_Port_007E) - EVT_CALL(SetNpcFlagBits, NPC_Chanterelle, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_THREAD - EVT_CALL(PlayerMoveTo, 167, -513, 20) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_WAIT(10) - EVT_CALL(EnablePartnerAI) - EVT_CALL(func_802CF56C, 2) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Chanterelle, ANIM_Chanterelle_Walk) - EVT_CALL(NpcMoveTo, NPC_Chanterelle, 112, -511, 60) - EVT_CALL(SetNpcAnimation, NPC_Chanterelle, ANIM_Chanterelle_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Bartender, ANIM_Bartender_Walk) - EVT_CALL(NpcMoveTo, NPC_Bartender, 70, -540, 45) - EVT_CALL(SetNpcAnimation, NPC_Bartender, ANIM_Bartender_Idle) - EVT_END_THREAD - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 112, 0, -511) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 112, 0, -511) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(320.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(InterpNpcYaw, NPC_Toad_02, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_ArtistToad, 270, 0) - EVT_WAIT(60) - EVT_EXEC(N(EVS_802442C4)) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Pray) - EVT_CALL(SetNpcAnimation, NPC_Toad_02, ANIM_Toad_Red_Disappointed) - EVT_CALL(SetNpcAnimation, NPC_ArtistToad, ANIM_Musician_Poet_Pensive) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_Bartender, ANIM_Bartender_Talk) - EVT_CALL(SetNpcAnimation, NPC_Chanterelle, ANIM_Chanterelle_Still) - EVT_WAIT(30) - EVT_CALL(SetMusicTrack, 0, SONG_POP_DIVA_SONG, 0, 8) - EVT_CALL(SetNpcAnimation, NPC_Bartender, ANIM_Bartender_StrumGuitar) - EVT_CALL(SetNpcAnimation, NPC_Chanterelle, ANIM_Chanterelle_Idle) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Chanterelle, ANIM_Chanterelle_Sing) - EVT_WAIT(150 * DT) - EVT_WAIT(150 * DT) - EVT_WAIT(150 * DT) - EVT_CALL(SetNpcAnimation, NPC_Chanterelle, ANIM_Chanterelle_Idle) - EVT_CALL(SetNpcAnimation, NPC_Bartender, ANIM_Bartender_Idle) - EVT_WAIT(40 * DT) - EVT_CALL(SetNpcAnimation, NPC_Toad_02, ANIM_Toad_Red_Idle) - EVT_CALL(SetNpcAnimation, NPC_ArtistToad, ANIM_Musician_Poet_Idle) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(30 * DT) - EVT_EXEC(N(EVS_802442E8)) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Bartender, ANIM_Bartender_Walk) - EVT_CALL(NpcMoveTo, NPC_Bartender, -85, -520, 40) - EVT_CALL(SetNpcAnimation, NPC_Bartender, ANIM_Bartender_Idle) - EVT_CALL(InterpNpcYaw, NPC_Bartender, 90, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Chanterelle, ANIM_Chanterelle_Walk) - EVT_CALL(NpcMoveTo, NPC_Chanterelle, 208, -530, 60) - EVT_CALL(SetNpcAnimation, NPC_Chanterelle, ANIM_Chanterelle_Idle) - EVT_CALL(InterpNpcYaw, NPC_Chanterelle, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_ArtistToad, 90, 0) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_WAIT(10) - EVT_CALL(func_802CF56C, 2) - EVT_CALL(SetNpcFlagBits, NPC_Chanterelle, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_END_THREAD - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_WAIT(60) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_007F) - EVT_CALL(SpeakToPlayer, NPC_Chanterelle, ANIM_Chanterelle_Talk, ANIM_Chanterelle_Idle, 0, MSG_MAC_Port_0080) - EVT_WAIT(10) - EVT_SET(LVar0, ITEM_ATTACK_FX_D) - EVT_SET(LVar3, ITEM_TYPE_BADGE) - EVT_EXEC_WAIT(N(GiveItemReward)) - EVT_CALL(AddBadge, LVar0, LVar1) - EVT_CALL(SetTattleMessage, NPC_Chanterelle, MSG_NpcTattle_PopDiva_CanSing) - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END + Set(GF_MAC05_SimonGaveLyrics, TRUE) + Call(EnablePartnerAI) + Return + EndIf + IfEq(GF_MAC05_SimonGotMelody, TRUE) + IfEq(AF_MAC_3D, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_0081) + Set(AF_MAC_3D, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_0082) + Set(AF_MAC_3D, FALSE) + EndIf + Return + EndIf + Call(FindKeyItem, ITEM_MELODY, LVar0) + IfEq(LVar0, -1) + IfEq(AF_MAC_3D, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_0076) + Set(AF_MAC_3D, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_0077) + EndIf + Else + Call(DisablePartnerAI, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + IfEq(AF_MAC_3D, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_0078) + Set(AF_MAC_3D, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_0079) + EndIf + Set(LVar0, Ref(N(D_8024D704_85F874))) + Set(LVar1, 10) + ExecWait(N(EVS_ChooseKeyItem)) + Switch(LVar0) + CaseEq(-1) + Call(EnablePartnerAI) + Call(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_007A) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_007B) + Set(GF_MAC05_SimonGotMelody, TRUE) + Call(SpeakToPlayer, NPC_Chanterelle, ANIM_Chanterelle_Talk, ANIM_Chanterelle_Idle, 0, MSG_MAC_Port_007C) + Call(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_007D) + Call(SpeakToPlayer, NPC_Chanterelle, ANIM_Chanterelle_Talk, ANIM_Chanterelle_Idle, 0, MSG_MAC_Port_007E) + Call(SetNpcFlagBits, NPC_Chanterelle, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Thread + Call(PlayerMoveTo, 167, -513, 20) + Call(InterpPlayerYaw, 270, 0) + Wait(10) + Call(EnablePartnerAI) + Call(func_802CF56C, 2) + EndThread + Thread + Call(SetNpcAnimation, NPC_Chanterelle, ANIM_Chanterelle_Walk) + Call(NpcMoveTo, NPC_Chanterelle, 112, -511, 60) + Call(SetNpcAnimation, NPC_Chanterelle, ANIM_Chanterelle_Idle) + EndThread + Thread + Call(SetNpcAnimation, NPC_Bartender, ANIM_Bartender_Walk) + Call(NpcMoveTo, NPC_Bartender, 70, -540, 45) + Call(SetNpcAnimation, NPC_Bartender, ANIM_Bartender_Idle) + EndThread + Call(UseSettingsFrom, CAM_DEFAULT, 112, 0, -511) + Call(SetPanTarget, CAM_DEFAULT, 112, 0, -511) + Call(SetCamDistance, CAM_DEFAULT, Float(320.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(InterpNpcYaw, NPC_Toad_02, 90, 0) + Call(InterpNpcYaw, NPC_ArtistToad, 270, 0) + Wait(60) + Exec(N(EVS_802442C4)) + Call(SetPlayerAnimation, ANIM_Mario1_Pray) + Call(SetNpcAnimation, NPC_Toad_02, ANIM_Toad_Red_Disappointed) + Call(SetNpcAnimation, NPC_ArtistToad, ANIM_Musician_Poet_Pensive) + Wait(30) + Call(SetNpcAnimation, NPC_Bartender, ANIM_Bartender_Talk) + Call(SetNpcAnimation, NPC_Chanterelle, ANIM_Chanterelle_Still) + Wait(30) + Call(SetMusicTrack, 0, SONG_POP_DIVA_SONG, 0, 8) + Call(SetNpcAnimation, NPC_Bartender, ANIM_Bartender_StrumGuitar) + Call(SetNpcAnimation, NPC_Chanterelle, ANIM_Chanterelle_Idle) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Chanterelle, ANIM_Chanterelle_Sing) + Wait(150 * DT) + Wait(150 * DT) + Wait(150 * DT) + Call(SetNpcAnimation, NPC_Chanterelle, ANIM_Chanterelle_Idle) + Call(SetNpcAnimation, NPC_Bartender, ANIM_Bartender_Idle) + Wait(40 * DT) + Call(SetNpcAnimation, NPC_Toad_02, ANIM_Toad_Red_Idle) + Call(SetNpcAnimation, NPC_ArtistToad, ANIM_Musician_Poet_Idle) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(30 * DT) + Exec(N(EVS_802442E8)) + Thread + Call(SetNpcAnimation, NPC_Bartender, ANIM_Bartender_Walk) + Call(NpcMoveTo, NPC_Bartender, -85, -520, 40) + Call(SetNpcAnimation, NPC_Bartender, ANIM_Bartender_Idle) + Call(InterpNpcYaw, NPC_Bartender, 90, 0) + EndThread + Thread + Call(SetNpcAnimation, NPC_Chanterelle, ANIM_Chanterelle_Walk) + Call(NpcMoveTo, NPC_Chanterelle, 208, -530, 60) + Call(SetNpcAnimation, NPC_Chanterelle, ANIM_Chanterelle_Idle) + Call(InterpNpcYaw, NPC_Chanterelle, 270, 0) + Call(InterpNpcYaw, NPC_ArtistToad, 90, 0) + Call(InterpPlayerYaw, 90, 0) + Wait(10) + Call(func_802CF56C, 2) + Call(SetNpcFlagBits, NPC_Chanterelle, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + EndThread + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Wait(60) + Call(SpeakToPlayer, NPC_SELF, ANIM_Musician_Poet_Talk, ANIM_Musician_Poet_Idle, 0, MSG_MAC_Port_007F) + Call(SpeakToPlayer, NPC_Chanterelle, ANIM_Chanterelle_Talk, ANIM_Chanterelle_Idle, 0, MSG_MAC_Port_0080) + Wait(10) + Set(LVar0, ITEM_ATTACK_FX_D) + Set(LVar3, ITEM_TYPE_BADGE) + ExecWait(N(GiveItemReward)) + Call(AddBadge, LVar0, LVar1) + Call(SetTattleMessage, NPC_Chanterelle, MSG_NpcTattle_PopDiva_CanSing) + EndSwitch + EndIf + Return + End }; EvtScript N(EVS_NpcInit_ArtistToad) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ArtistToad))) - EVT_SET(AF_MAC_3D, FALSE) - EVT_SET(AF_MAC_3E, FALSE) - EVT_IF_EQ(GF_MAC05_Met_Simon, TRUE) - EVT_SET(AF_MAC_3E, TRUE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ArtistToad))) + Set(AF_MAC_3D, FALSE) + Set(AF_MAC_3E, FALSE) + IfEq(GF_MAC05_Met_Simon, TRUE) + Set(AF_MAC_3E, TRUE) + EndIf + Return + End }; API_CALLABLE(N(func_8024335C_8554CC)) { @@ -1920,79 +1920,79 @@ API_CALLABLE(N(func_8024335C_8554CC)) { } EvtScript N(D_8024E23C_8603AC) = { - EVT_SET(AF_JAN01_TreeDrop_StarPiece, TRUE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_400000 | ENEMY_FLAG_CANT_INTERACT, 1) - EVT_CALL(InterpNpcYaw, NPC_Chanterelle, 270, 0) - EVT_CALL(SetMusicTrack, 0, SONG_POP_DIVA_SONG, 1, 8) - EVT_CHILD_THREAD - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_Chanterelle, ANIM_Chanterelle_Sing) - EVT_WAIT(1900) - EVT_CALL(SetNpcAnimation, NPC_Chanterelle, ANIM_Chanterelle_Idle) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_WAIT(30) - EVT_CALL(N(func_8024335C_8554CC)) - EVT_SET(AF_JAN01_TreeDrop_StarPiece, FALSE) - EVT_END_CHILD_THREAD - EVT_LOOP(0) - EVT_IF_EQ(AF_JAN01_TreeDrop_StarPiece, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_EXEC(N(EVS_802442E8)) - EVT_CALL(SetNpcAnimation, NPC_Chanterelle, ANIM_Chanterelle_Idle) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_400000 | ENEMY_FLAG_CANT_INTERACT, 0) - EVT_RETURN - EVT_END + Set(AF_JAN01_TreeDrop_StarPiece, TRUE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_400000 | ENEMY_FLAG_CANT_INTERACT, 1) + Call(InterpNpcYaw, NPC_Chanterelle, 270, 0) + Call(SetMusicTrack, 0, SONG_POP_DIVA_SONG, 1, 8) + ChildThread + Wait(30) + Call(SetNpcAnimation, NPC_Chanterelle, ANIM_Chanterelle_Sing) + Wait(1900) + Call(SetNpcAnimation, NPC_Chanterelle, ANIM_Chanterelle_Idle) + EndChildThread + ChildThread + Wait(30) + Call(N(func_8024335C_8554CC)) + Set(AF_JAN01_TreeDrop_StarPiece, FALSE) + EndChildThread + Loop(0) + IfEq(AF_JAN01_TreeDrop_StarPiece, FALSE) + BreakLoop + EndIf + Wait(1) + EndLoop + Exec(N(EVS_802442E8)) + Call(SetNpcAnimation, NPC_Chanterelle, ANIM_Chanterelle_Idle) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_400000 | ENEMY_FLAG_CANT_INTERACT, 0) + Return + End }; EvtScript N(EVS_NpcInteract_Chanterelle) = { - EVT_IF_EQ(GF_MAC05_SimonGaveLyrics, FALSE) - EVT_IF_EQ(AF_MAC_3F, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Chanterelle_Talk, ANIM_Chanterelle_Idle, 0, MSG_MAC_Port_0068) - EVT_SET(AF_MAC_3F, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Chanterelle_Talk, ANIM_Chanterelle_Idle, 0, MSG_MAC_Port_0069) - EVT_SET(AF_MAC_3F, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GF_MAC05_SimonGotMelody, FALSE) - EVT_IF_EQ(AF_MAC_3F, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Chanterelle_Talk, ANIM_Chanterelle_Idle, 0, MSG_MAC_Port_006A) - EVT_SET(AF_MAC_3F, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Chanterelle_Talk, ANIM_Chanterelle_Idle, 0, MSG_MAC_Port_006B) - EVT_SET(AF_MAC_3F, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(AF_MAC_3F, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Chanterelle_Talk, ANIM_Chanterelle_Idle, 0, MSG_MAC_Port_006C) - EVT_SET(AF_MAC_3F, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Chanterelle_Talk, ANIM_Chanterelle_Idle, 0, MSG_MAC_Port_006D) - EVT_END_IF - EVT_CALL(ShowChoice, MSG_Choice_000D) - EVT_IF_NE(LVar0, 0) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Chanterelle_Talk, ANIM_Chanterelle_Idle, 0, MSG_MAC_Port_006E) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Chanterelle_Talk, ANIM_Chanterelle_Idle, 0, MSG_MAC_Port_006F) - EVT_EXEC(N(D_8024E23C_8603AC)) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_MAC05_SimonGaveLyrics, FALSE) + IfEq(AF_MAC_3F, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Chanterelle_Talk, ANIM_Chanterelle_Idle, 0, MSG_MAC_Port_0068) + Set(AF_MAC_3F, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Chanterelle_Talk, ANIM_Chanterelle_Idle, 0, MSG_MAC_Port_0069) + Set(AF_MAC_3F, FALSE) + EndIf + Return + EndIf + IfEq(GF_MAC05_SimonGotMelody, FALSE) + IfEq(AF_MAC_3F, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Chanterelle_Talk, ANIM_Chanterelle_Idle, 0, MSG_MAC_Port_006A) + Set(AF_MAC_3F, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Chanterelle_Talk, ANIM_Chanterelle_Idle, 0, MSG_MAC_Port_006B) + Set(AF_MAC_3F, FALSE) + EndIf + Return + EndIf + IfEq(AF_MAC_3F, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Chanterelle_Talk, ANIM_Chanterelle_Idle, 0, MSG_MAC_Port_006C) + Set(AF_MAC_3F, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Chanterelle_Talk, ANIM_Chanterelle_Idle, 0, MSG_MAC_Port_006D) + EndIf + Call(ShowChoice, MSG_Choice_000D) + IfNe(LVar0, 0) + Call(ContinueSpeech, NPC_SELF, ANIM_Chanterelle_Talk, ANIM_Chanterelle_Idle, 0, MSG_MAC_Port_006E) + Else + Call(ContinueSpeech, NPC_SELF, ANIM_Chanterelle_Talk, ANIM_Chanterelle_Idle, 0, MSG_MAC_Port_006F) + Exec(N(D_8024E23C_8603AC)) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Chanterelle) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Chanterelle))) - EVT_IF_EQ(GF_MAC05_SimonGotMelody, TRUE) - EVT_CALL(SetTattleMessage, NPC_Chanterelle, MSG_NpcTattle_PopDiva_CanSing) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Chanterelle))) + IfEq(GF_MAC05_SimonGotMelody, TRUE) + Call(SetTattleMessage, NPC_Chanterelle, MSG_NpcTattle_PopDiva_CanSing) + EndIf + Return + End }; API_CALLABLE(N(CheckTradeEventTime)) { @@ -2006,58 +2006,58 @@ API_CALLABLE(N(GetTradeEventItemCount)) { } EvtScript N(EVS_NpcInteract_Toad_03) = { - EVT_SET(LVar0, 7) - EVT_CALL(N(CheckTradeEventTime)) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Port_00BF) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(GetTradeEventItemCount)) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Port_00C0) - EVT_WAIT(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 1, 1, 1, 1) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_SET(GF_TradingEvent3_Active, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Port_00C1) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 11) - EVT_EXEC_WAIT(N(EVS_ChooseItem)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(-1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Port_00C5) - EVT_RETURN - EVT_CASE_EQ(ITEM_COCONUT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Port_00C2) + Set(LVar0, 7) + Call(N(CheckTradeEventTime)) + IfEq(LVar0, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Port_00BF) + Return + EndIf + Call(N(GetTradeEventItemCount)) + IfEq(LVar0, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Port_00C0) + Wait(10) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 1, 1, 1, 1) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Set(GF_TradingEvent3_Active, FALSE) + Return + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Port_00C1) + Set(LVar0, 0) + Set(LVar1, 11) + ExecWait(N(EVS_ChooseItem)) + Switch(LVar0) + CaseEq(-1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Port_00C5) + Return + CaseEq(ITEM_COCONUT) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Port_00C2) EVT_GIVE_CONSUMABLE_REWARD(ITEM_YUMMY_MEAL) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Port_00C3) - EVT_WAIT(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 1, 1, 1, 1) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_SET(GF_TradingEvent3_Active, FALSE) - EVT_ADD(GB_TradingEvent_Count, 1) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Port_00C4) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Port_00C3) + Wait(10) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 1, 1, 1, 1) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Set(GF_TradingEvent3_Active, FALSE) + Add(GB_TradingEvent_Count, 1) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_MAC_Port_00C4) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_TradeEventToad) = { - EVT_IF_NE(GF_TradingEvent3_Active, FALSE) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad_03))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfNe(GF_TradingEvent3_Active, FALSE) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad_03))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_Toad_01) = { diff --git a/src/world/area_mac/mac_05/mac_05_5_whale.c b/src/world/area_mac/mac_05/mac_05_5_whale.c index aaff79b3229..6f35bc0b610 100644 --- a/src/world/area_mac/mac_05/mac_05_5_whale.c +++ b/src/world/area_mac/mac_05/mac_05_5_whale.c @@ -24,332 +24,332 @@ API_CALLABLE(N(UnkPlayerPosFunc)) { MAP_RODATA_PAD(2, unk); EvtScript N(D_80250A5C_862BCC) = { - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, 30, 60, 30, 0, 0) - EVT_CALL(RotateModel, MODEL_o167, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o168, LVar0, -1, 0, 0) - EVT_RETURN - EVT_END + Call(N(UnkFloatFunc001), LVarC, LVar0, 30, 60, 30, 0, 0) + Call(RotateModel, MODEL_o167, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o168, LVar0, -1, 0, 0) + Return + End }; EvtScript N(D_80250AD4_862C44) = { - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, 0, 30, 30, 1, 0) - EVT_SETF(LVar1, LVar0) - EVT_DIVF(LVar1, EVT_FLOAT(3.0)) - EVT_CALL(RotateModel, MODEL_o173, LVar0, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_dou, LVar1, 0, 0, -1) - EVT_CALL(TranslateModel, MODEL_o170, -5, -68, 0) - EVT_CALL(TranslateModel, MODEL_o183, -5, -68, 0) - EVT_CALL(TranslateModel, MODEL_o167, 60, 29, -51) - EVT_CALL(TranslateModel, MODEL_o168, 60, 29, 51) - EVT_CALL(RotateModel, MODEL_o170, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o183, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o167, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o168, LVar1, 0, 0, -1) - EVT_CALL(TranslateModel, MODEL_o170, 5, 68, 0) - EVT_CALL(TranslateModel, MODEL_o183, 5, 68, 0) - EVT_CALL(TranslateModel, MODEL_o167, -60, -29, 51) - EVT_CALL(TranslateModel, MODEL_o168, -60, -29, -51) - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, 0, -40, 30, 1, 0) - EVT_CALL(TranslateModel, MODEL_bero, LVar0, 0, 0) - EVT_IF_GE(LVarC, 30) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt9, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_kujira_atari, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_RETURN - EVT_END + Call(N(UnkFloatFunc001), LVarC, LVar0, 0, 30, 30, 1, 0) + SetF(LVar1, LVar0) + DivF(LVar1, Float(3.0)) + Call(RotateModel, MODEL_o173, LVar0, 0, 0, 1) + Call(RotateGroup, MODEL_dou, LVar1, 0, 0, -1) + Call(TranslateModel, MODEL_o170, -5, -68, 0) + Call(TranslateModel, MODEL_o183, -5, -68, 0) + Call(TranslateModel, MODEL_o167, 60, 29, -51) + Call(TranslateModel, MODEL_o168, 60, 29, 51) + Call(RotateModel, MODEL_o170, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_o183, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_o167, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_o168, LVar1, 0, 0, -1) + Call(TranslateModel, MODEL_o170, 5, 68, 0) + Call(TranslateModel, MODEL_o183, 5, 68, 0) + Call(TranslateModel, MODEL_o167, -60, -29, 51) + Call(TranslateModel, MODEL_o168, -60, -29, -51) + Call(N(UnkFloatFunc001), LVarC, LVar0, 0, -40, 30, 1, 0) + Call(TranslateModel, MODEL_bero, LVar0, 0, 0) + IfGe(LVarC, 30) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt9, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_kujira_atari, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Return + End }; EvtScript N(D_80250D58_862EC8) = { - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, 0, -30, 8, 1, 0) - EVT_ADDF(LVar0, EVT_FLOAT(30.0)) - EVT_SETF(LVar1, LVar0) - EVT_DIVF(LVar1, EVT_FLOAT(3.0)) - EVT_CALL(RotateModel, MODEL_o173, LVar0, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_dou, LVar1, 0, 0, -1) - EVT_CALL(TranslateModel, MODEL_o170, -5, -68, 0) - EVT_CALL(TranslateModel, MODEL_o183, -5, -68, 0) - EVT_CALL(TranslateModel, MODEL_o167, 60, 29, -51) - EVT_CALL(TranslateModel, MODEL_o168, 60, 29, 51) - EVT_CALL(RotateModel, MODEL_o170, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o183, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o167, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o168, LVar1, 0, 0, -1) - EVT_CALL(TranslateModel, MODEL_o170, 5, 68, 0) - EVT_CALL(TranslateModel, MODEL_o183, 5, 68, 0) - EVT_CALL(TranslateModel, MODEL_o167, -60, -29, 51) - EVT_CALL(TranslateModel, MODEL_o168, -60, -29, -51) - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, 0, -40, 120, 1, 0) - EVT_CALL(TranslateModel, MODEL_bero, LVar0, 0, 0) - EVT_RETURN - EVT_END + Call(N(UnkFloatFunc001), LVarC, LVar0, 0, -30, 8, 1, 0) + AddF(LVar0, Float(30.0)) + SetF(LVar1, LVar0) + DivF(LVar1, Float(3.0)) + Call(RotateModel, MODEL_o173, LVar0, 0, 0, 1) + Call(RotateGroup, MODEL_dou, LVar1, 0, 0, -1) + Call(TranslateModel, MODEL_o170, -5, -68, 0) + Call(TranslateModel, MODEL_o183, -5, -68, 0) + Call(TranslateModel, MODEL_o167, 60, 29, -51) + Call(TranslateModel, MODEL_o168, 60, 29, 51) + Call(RotateModel, MODEL_o170, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_o183, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_o167, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_o168, LVar1, 0, 0, -1) + Call(TranslateModel, MODEL_o170, 5, 68, 0) + Call(TranslateModel, MODEL_o183, 5, 68, 0) + Call(TranslateModel, MODEL_o167, -60, -29, 51) + Call(TranslateModel, MODEL_o168, -60, -29, -51) + Call(N(UnkFloatFunc001), LVarC, LVar0, 0, -40, 120, 1, 0) + Call(TranslateModel, MODEL_bero, LVar0, 0, 0) + Return + End }; EvtScript N(D_80250FA4_863114) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(D_80250FB4_863124) = { - EVT_CALL(GetNpcVar, NPC_Whale, 0, LVar3) - EVT_IF_EQ(LVar3, 0) - EVT_CALL(N(UnkPlayerPosFunc)) - EVT_CALL(PlaySoundAt, SOUND_LOOP_WHALE_GEYSER, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(N(CreateWhaleGeyser), 0, LVar0, LVar1, LVar2, 0, -1, 0, 30) - EVT_CALL(SetNpcVar, NPC_Whale, 0, LVar0) - EVT_END_IF - EVT_CALL(GetNpcVar, NPC_Whale, 0, LVar3) - EVT_CALL(N(UnkPlayerPosFunc)) - EVT_CALL(N(SetWhaleGeyserPos), LVar3, LVar0, LVar1, LVar2) - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, 30, 60, 30, 0, 0) - EVT_CALL(RotateModel, MODEL_o167, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o168, LVar0, -1, 0, 0) - EVT_RETURN - EVT_END + Call(GetNpcVar, NPC_Whale, 0, LVar3) + IfEq(LVar3, 0) + Call(N(UnkPlayerPosFunc)) + Call(PlaySoundAt, SOUND_LOOP_WHALE_GEYSER, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Call(N(CreateWhaleGeyser), 0, LVar0, LVar1, LVar2, 0, -1, 0, 30) + Call(SetNpcVar, NPC_Whale, 0, LVar0) + EndIf + Call(GetNpcVar, NPC_Whale, 0, LVar3) + Call(N(UnkPlayerPosFunc)) + Call(N(SetWhaleGeyserPos), LVar3, LVar0, LVar1, LVar2) + Call(N(UnkFloatFunc001), LVarC, LVar0, 30, 60, 30, 0, 0) + Call(RotateModel, MODEL_o167, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o168, LVar0, -1, 0, 0) + Return + End }; EvtScript N(D_8025110C_86327C) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(D_8025111C_86328C) = { - EVT_IF_GE(LVarC, 0) - EVT_IF_LE(LVarC, 2) - EVT_CALL(EnableModel, MODEL_o170, FALSE) - EVT_CALL(EnableModel, MODEL_o183, TRUE) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVarC, 15) - EVT_CALL(EnableModel, MODEL_o170, FALSE) - EVT_CALL(EnableModel, MODEL_o183, TRUE) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVarC, 22) - EVT_CALL(EnableModel, MODEL_o170, FALSE) - EVT_CALL(EnableModel, MODEL_o183, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(EnableModel, MODEL_o170, TRUE) - EVT_CALL(EnableModel, MODEL_o183, FALSE) - EVT_RETURN - EVT_END + IfGe(LVarC, 0) + IfLe(LVarC, 2) + Call(EnableModel, MODEL_o170, FALSE) + Call(EnableModel, MODEL_o183, TRUE) + Return + EndIf + EndIf + IfEq(LVarC, 15) + Call(EnableModel, MODEL_o170, FALSE) + Call(EnableModel, MODEL_o183, TRUE) + Return + EndIf + IfEq(LVarC, 22) + Call(EnableModel, MODEL_o170, FALSE) + Call(EnableModel, MODEL_o183, TRUE) + Return + EndIf + Call(EnableModel, MODEL_o170, TRUE) + Call(EnableModel, MODEL_o183, FALSE) + Return + End }; EvtScript N(D_80251244_8633B4) = { - EVT_SET(LVar0, LVarC) - EVT_DIV(LVar0, 20) - EVT_MOD(LVar0, 2) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, EVT_FLOAT(-1.0), EVT_FLOAT(1.0), 3, 0, 0) - EVT_CALL(TranslateModel, MODEL_o173, LVar0, 0, 0) - EVT_CALL(TranslateGroup, MODEL_dou, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o170, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o183, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o167, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o168, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o167, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o168, LVar0, 0, 0) - EVT_RETURN - EVT_END + Set(LVar0, LVarC) + Div(LVar0, 20) + Mod(LVar0, 2) + IfEq(LVar0, 0) + Return + EndIf + Call(N(UnkFloatFunc001), LVarC, LVar0, Float(-1.0), Float(1.0), 3, 0, 0) + Call(TranslateModel, MODEL_o173, LVar0, 0, 0) + Call(TranslateGroup, MODEL_dou, LVar0, 0, 0) + Call(TranslateModel, MODEL_o170, LVar0, 0, 0) + Call(TranslateModel, MODEL_o183, LVar0, 0, 0) + Call(TranslateModel, MODEL_o167, LVar0, 0, 0) + Call(TranslateModel, MODEL_o168, LVar0, 0, 0) + Call(TranslateModel, MODEL_o167, LVar0, 0, 0) + Call(TranslateModel, MODEL_o168, LVar0, 0, 0) + Return + End }; EvtScript N(D_802513AC_86351C) = { - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, EVT_FLOAT(-6.0), EVT_FLOAT(6.0), 3, 0, 0) - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar1, EVT_FLOAT(6.0), EVT_FLOAT(-6.0), 2, 0, 0) - EVT_CALL(TranslateModel, MODEL_o173, LVar0, LVar1, 0) - EVT_CALL(TranslateGroup, MODEL_dou, LVar0, LVar1, 0) - EVT_CALL(TranslateModel, MODEL_o170, LVar0, LVar1, 0) - EVT_CALL(TranslateModel, MODEL_o183, LVar0, LVar1, 0) - EVT_CALL(TranslateModel, MODEL_o167, LVar0, LVar1, 0) - EVT_CALL(TranslateModel, MODEL_o168, LVar0, LVar1, 0) - EVT_CALL(TranslateModel, MODEL_o167, LVar0, LVar1, 0) - EVT_CALL(TranslateModel, MODEL_o168, LVar0, LVar1, 0) - EVT_RETURN - EVT_END + Call(N(UnkFloatFunc001), LVarC, LVar0, Float(-6.0), Float(6.0), 3, 0, 0) + Call(N(UnkFloatFunc001), LVarC, LVar1, Float(6.0), Float(-6.0), 2, 0, 0) + Call(TranslateModel, MODEL_o173, LVar0, LVar1, 0) + Call(TranslateGroup, MODEL_dou, LVar0, LVar1, 0) + Call(TranslateModel, MODEL_o170, LVar0, LVar1, 0) + Call(TranslateModel, MODEL_o183, LVar0, LVar1, 0) + Call(TranslateModel, MODEL_o167, LVar0, LVar1, 0) + Call(TranslateModel, MODEL_o168, LVar0, LVar1, 0) + Call(TranslateModel, MODEL_o167, LVar0, LVar1, 0) + Call(TranslateModel, MODEL_o168, LVar0, LVar1, 0) + Return + End }; EvtScript N(D_802514EC_86365C) = { - EVT_SET(LVar0, LVarC) - EVT_DIV(LVar0, 20) - EVT_MOD(LVar0, 2) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, EVT_FLOAT(-1.0), EVT_FLOAT(1.0), 3, 0, 0) - EVT_CALL(TranslateModel, MODEL_o173, LVar0, 0, 0) - EVT_CALL(TranslateGroup, MODEL_dou, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o170, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o183, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o167, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o168, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o167, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o168, LVar0, 0, 0) - EVT_RETURN - EVT_END + Set(LVar0, LVarC) + Div(LVar0, 20) + Mod(LVar0, 2) + IfEq(LVar0, 0) + Return + EndIf + Call(N(UnkFloatFunc001), LVarC, LVar0, Float(-1.0), Float(1.0), 3, 0, 0) + Call(TranslateModel, MODEL_o173, LVar0, 0, 0) + Call(TranslateGroup, MODEL_dou, LVar0, 0, 0) + Call(TranslateModel, MODEL_o170, LVar0, 0, 0) + Call(TranslateModel, MODEL_o183, LVar0, 0, 0) + Call(TranslateModel, MODEL_o167, LVar0, 0, 0) + Call(TranslateModel, MODEL_o168, LVar0, 0, 0) + Call(TranslateModel, MODEL_o167, LVar0, 0, 0) + Call(TranslateModel, MODEL_o168, LVar0, 0, 0) + Return + End }; EvtScript N(D_80251654_8637C4) = { - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, 30, 60, 30, 0, 0) - EVT_CALL(RotateModel, MODEL_o167, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o168, LVar0, -1, 0, 0) - EVT_RETURN - EVT_END + Call(N(UnkFloatFunc001), LVarC, LVar0, 30, 60, 30, 0, 0) + Call(RotateModel, MODEL_o167, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o168, LVar0, -1, 0, 0) + Return + End }; EvtScript N(D_802516CC_86383C) = { - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, 0, 8, 3, 0, 0) - EVT_SET(LVar1, LVar0) - EVT_DIV(LVar1, 3) - EVT_CALL(RotateModel, MODEL_o173, LVar0, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_dou, LVar1, 0, 0, -1) - EVT_CALL(TranslateModel, MODEL_o170, -5, -68, 0) - EVT_CALL(TranslateModel, MODEL_o183, -5, -68, 0) - EVT_CALL(TranslateModel, MODEL_o167, 60, 29, -51) - EVT_CALL(TranslateModel, MODEL_o168, 60, 29, 51) - EVT_CALL(RotateModel, MODEL_o170, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o183, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o167, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o168, LVar1, 0, 0, -1) - EVT_CALL(TranslateModel, MODEL_o170, 5, 68, 0) - EVT_CALL(TranslateModel, MODEL_o183, 5, 68, 0) - EVT_CALL(TranslateModel, MODEL_o167, -60, -29, 51) - EVT_CALL(TranslateModel, MODEL_o168, -60, -29, -51) - EVT_SET(LVar0, LVarC) - EVT_MUL(LVar0, 2) - EVT_CALL(N(UnkFloatFunc001), LVar0, LVar0, 30, 60, 3, 0, 0) - EVT_CALL(RotateModel, MODEL_o167, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o168, LVar0, -1, 0, 0) - EVT_RETURN - EVT_END + Call(N(UnkFloatFunc001), LVarC, LVar0, 0, 8, 3, 0, 0) + Set(LVar1, LVar0) + Div(LVar1, 3) + Call(RotateModel, MODEL_o173, LVar0, 0, 0, 1) + Call(RotateGroup, MODEL_dou, LVar1, 0, 0, -1) + Call(TranslateModel, MODEL_o170, -5, -68, 0) + Call(TranslateModel, MODEL_o183, -5, -68, 0) + Call(TranslateModel, MODEL_o167, 60, 29, -51) + Call(TranslateModel, MODEL_o168, 60, 29, 51) + Call(RotateModel, MODEL_o170, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_o183, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_o167, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_o168, LVar1, 0, 0, -1) + Call(TranslateModel, MODEL_o170, 5, 68, 0) + Call(TranslateModel, MODEL_o183, 5, 68, 0) + Call(TranslateModel, MODEL_o167, -60, -29, 51) + Call(TranslateModel, MODEL_o168, -60, -29, -51) + Set(LVar0, LVarC) + Mul(LVar0, 2) + Call(N(UnkFloatFunc001), LVar0, LVar0, 30, 60, 3, 0, 0) + Call(RotateModel, MODEL_o167, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o168, LVar0, -1, 0, 0) + Return + End }; EvtScript N(EVS_SetupWhale) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_1, MODEL_karada, TRUE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(unkAngleFunc002)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_karada, CUSTOM_GFX_1, -1) - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_2, MODEL_onaka, TRUE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_2, EVT_PTR(N(unkAngleFunc003)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_onaka, CUSTOM_GFX_2, -1) - EVT_THREAD - EVT_LABEL(0) - EVT_CALL(N(UnkAngleFunc001), 0, LVar0, LVar1, LVar2) - EVT_SUBF(LVar0, -80) - EVT_SUBF(LVar1, -18) - EVT_SUBF(LVar2, 420) - EVT_ADDF(LVar0, 130) - EVT_ADDF(LVar1, -20) - EVT_ADDF(LVar2, 0) - EVT_CALL(TranslateModel, MODEL_bero, LVar0, LVar1, LVar2) - EVT_CALL(TranslateModel, MODEL_o170, LVar0, LVar1, LVar2) - EVT_CALL(TranslateModel, MODEL_o183, LVar0, LVar1, LVar2) - EVT_CALL(TranslateModel, MODEL_o173, LVar0, LVar1, LVar2) - EVT_CALL(TranslateModel, MODEL_o167, LVar0, LVar1, LVar2) - EVT_CALL(TranslateModel, MODEL_o168, LVar0, LVar1, LVar2) - EVT_CALL(TranslateGroup, MODEL_dou, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcYaw, NPC_Whale, LVar0) - EVT_MULF(LVar0, -1) - EVT_ADDF(LVar0, -90) - EVT_CALL(TranslateModel, MODEL_bero, -100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o170, -100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o183, -100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o173, -100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o167, -100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o168, -100, 0, 0) - EVT_CALL(TranslateGroup, MODEL_dou, -100, 0, 0) - EVT_CALL(TranslateModel, MODEL_bero, 100, -1, 0) - EVT_CALL(TranslateModel, MODEL_o170, -5, -68, 0) - EVT_CALL(TranslateModel, MODEL_o183, -5, -68, 0) - EVT_CALL(TranslateModel, MODEL_o173, 102, 4, 0) - EVT_CALL(TranslateModel, MODEL_o167, 60, 29, -51) - EVT_CALL(TranslateModel, MODEL_o168, 60, 29, 51) - EVT_CALL(RotateModel, MODEL_bero, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o170, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o183, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o173, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o167, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o168, LVar0, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_dou, LVar0, 0, 1, 0) - EVT_CALL(TranslateModel, MODEL_bero, -100, 1, 0) - EVT_CALL(TranslateModel, MODEL_o170, 5, 68, 0) - EVT_CALL(TranslateModel, MODEL_o183, 5, 68, 0) - EVT_CALL(TranslateModel, MODEL_o173, -102, -4, 0) - EVT_CALL(TranslateModel, MODEL_o167, -60, -29, 51) - EVT_CALL(TranslateModel, MODEL_o168, -60, -29, -51) - EVT_CALL(TranslateModel, MODEL_bero, 100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o170, 100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o183, 100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o173, 100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o167, 100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o168, 100, 0, 0) - EVT_CALL(TranslateGroup, MODEL_dou, 100, 0, 0) - EVT_CALL(GetNpcAnimation, NPC_Whale, LVar0) - EVT_IF_NE(LVar0, LVarB) - EVT_SET(LVarB, LVar0) - EVT_SET(LVarC, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tt9, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_o170, TRUE) - EVT_CALL(EnableModel, MODEL_o183, FALSE) - EVT_IF_NE(LVarB, ANIM_Kolorado_Shout) - EVT_CALL(GetNpcVar, NPC_Whale, 0, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(PlaySound, SOUND_LRAW_WHALE_GEYSER | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_CALL(StopTrackingSoundPos, SOUND_LRAW_WHALE_GEYSER) - EVT_CALL(N(DisposeWhaleGeyser), LVar0) - EVT_CALL(SetNpcVar, NPC_Whale, 0, 0) - EVT_END_IF - EVT_END_IF - EVT_SWITCH(LVarB) - EVT_CASE_EQ(ANIM_Kolorado_IdleSad) - EVT_CALL(PlaySoundAtNpc, NPC_Whale, SOUND_WHALE_CLOSE_MOUTH, SOUND_SPACE_DEFAULT) - EVT_SET(LVarD, EVT_PTR(N(D_80250D58_862EC8))) - EVT_CASE_EQ(ANIM_Kolorado_Still) - EVT_SET(LVarD, EVT_PTR(N(D_80250A5C_862BCC))) - EVT_CASE_EQ(ANIM_Kolorado_Yell) - EVT_CALL(PlaySoundAtNpc, NPC_Whale, SOUND_WHALE_OPEN_MOUTH, SOUND_SPACE_DEFAULT) - EVT_SET(LVarD, EVT_PTR(N(D_80250AD4_862C44))) - EVT_CASE_EQ(ANIM_Kolorado_Idle) - EVT_SET(LVarD, EVT_PTR(N(D_80251654_8637C4))) - EVT_CASE_EQ(ANIM_Kolorado_Walk) - EVT_SET(LVarD, EVT_PTR(N(D_802516CC_86383C))) - EVT_CASE_EQ(ANIM_Kolorado_WalkSad) - EVT_SET(LVarD, EVT_PTR(N(D_80250FA4_863114))) - EVT_CALL(EnableModel, MODEL_o170, FALSE) - EVT_CALL(EnableModel, MODEL_o183, FALSE) - EVT_CASE_EQ(ANIM_Kolorado_Run) - EVT_SET(LVarD, EVT_PTR(N(D_80251244_8633B4))) - EVT_CALL(EnableModel, MODEL_o170, FALSE) - EVT_CALL(EnableModel, MODEL_o183, FALSE) - EVT_CASE_EQ(ANIM_Kolorado_Panic) - EVT_SET(LVarD, EVT_PTR(N(D_802513AC_86351C))) - EVT_CALL(EnableModel, MODEL_o170, FALSE) - EVT_CALL(EnableModel, MODEL_o183, FALSE) - EVT_CASE_EQ(ANIM_Kolorado_Talk) - EVT_SET(LVarD, EVT_PTR(N(D_802514EC_86365C))) - EVT_CASE_EQ(ANIM_Kolorado_Shout) - EVT_SET(LVarD, EVT_PTR(N(D_80250FB4_863124))) - EVT_CASE_EQ(ANIM_Kolorado_TalkSad) - EVT_SET(LVarD, EVT_PTR(N(D_8025110C_86327C))) - EVT_CASE_EQ(ANIM_Kolorado_HurtStill) - EVT_SET(LVarD, EVT_PTR(N(D_8025111C_86328C))) - EVT_END_SWITCH - EVT_END_IF - EVT_EXEC_WAIT(LVarD) - EVT_ADD(LVarC, 1) - EVT_IF_GT(LVarC, 1000) - EVT_SET(LVarC, 0) - EVT_END_IF - EVT_GOTO(0) - EVT_END_THREAD - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(MakeLocalVertexCopy, VTX_COPY_1, MODEL_karada, TRUE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_1, Ref(N(unkAngleFunc002)), NULL) + Call(SetModelCustomGfx, MODEL_karada, CUSTOM_GFX_1, -1) + Call(MakeLocalVertexCopy, VTX_COPY_2, MODEL_onaka, TRUE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_2, Ref(N(unkAngleFunc003)), NULL) + Call(SetModelCustomGfx, MODEL_onaka, CUSTOM_GFX_2, -1) + Thread + Label(0) + Call(N(UnkAngleFunc001), 0, LVar0, LVar1, LVar2) + SubF(LVar0, -80) + SubF(LVar1, -18) + SubF(LVar2, 420) + AddF(LVar0, 130) + AddF(LVar1, -20) + AddF(LVar2, 0) + Call(TranslateModel, MODEL_bero, LVar0, LVar1, LVar2) + Call(TranslateModel, MODEL_o170, LVar0, LVar1, LVar2) + Call(TranslateModel, MODEL_o183, LVar0, LVar1, LVar2) + Call(TranslateModel, MODEL_o173, LVar0, LVar1, LVar2) + Call(TranslateModel, MODEL_o167, LVar0, LVar1, LVar2) + Call(TranslateModel, MODEL_o168, LVar0, LVar1, LVar2) + Call(TranslateGroup, MODEL_dou, LVar0, LVar1, LVar2) + Call(GetNpcYaw, NPC_Whale, LVar0) + MulF(LVar0, -1) + AddF(LVar0, -90) + Call(TranslateModel, MODEL_bero, -100, 0, 0) + Call(TranslateModel, MODEL_o170, -100, 0, 0) + Call(TranslateModel, MODEL_o183, -100, 0, 0) + Call(TranslateModel, MODEL_o173, -100, 0, 0) + Call(TranslateModel, MODEL_o167, -100, 0, 0) + Call(TranslateModel, MODEL_o168, -100, 0, 0) + Call(TranslateGroup, MODEL_dou, -100, 0, 0) + Call(TranslateModel, MODEL_bero, 100, -1, 0) + Call(TranslateModel, MODEL_o170, -5, -68, 0) + Call(TranslateModel, MODEL_o183, -5, -68, 0) + Call(TranslateModel, MODEL_o173, 102, 4, 0) + Call(TranslateModel, MODEL_o167, 60, 29, -51) + Call(TranslateModel, MODEL_o168, 60, 29, 51) + Call(RotateModel, MODEL_bero, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o170, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o183, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o173, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o167, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o168, LVar0, 0, 1, 0) + Call(RotateGroup, MODEL_dou, LVar0, 0, 1, 0) + Call(TranslateModel, MODEL_bero, -100, 1, 0) + Call(TranslateModel, MODEL_o170, 5, 68, 0) + Call(TranslateModel, MODEL_o183, 5, 68, 0) + Call(TranslateModel, MODEL_o173, -102, -4, 0) + Call(TranslateModel, MODEL_o167, -60, -29, 51) + Call(TranslateModel, MODEL_o168, -60, -29, -51) + Call(TranslateModel, MODEL_bero, 100, 0, 0) + Call(TranslateModel, MODEL_o170, 100, 0, 0) + Call(TranslateModel, MODEL_o183, 100, 0, 0) + Call(TranslateModel, MODEL_o173, 100, 0, 0) + Call(TranslateModel, MODEL_o167, 100, 0, 0) + Call(TranslateModel, MODEL_o168, 100, 0, 0) + Call(TranslateGroup, MODEL_dou, 100, 0, 0) + Call(GetNpcAnimation, NPC_Whale, LVar0) + IfNe(LVar0, LVarB) + Set(LVarB, LVar0) + Set(LVarC, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tt9, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_o170, TRUE) + Call(EnableModel, MODEL_o183, FALSE) + IfNe(LVarB, ANIM_Kolorado_Shout) + Call(GetNpcVar, NPC_Whale, 0, LVar0) + IfNe(LVar0, 0) + Call(PlaySound, SOUND_LRAW_WHALE_GEYSER | SOUND_ID_TRIGGER_CHANGE_SOUND) + Call(StopTrackingSoundPos, SOUND_LRAW_WHALE_GEYSER) + Call(N(DisposeWhaleGeyser), LVar0) + Call(SetNpcVar, NPC_Whale, 0, 0) + EndIf + EndIf + Switch(LVarB) + CaseEq(ANIM_Kolorado_IdleSad) + Call(PlaySoundAtNpc, NPC_Whale, SOUND_WHALE_CLOSE_MOUTH, SOUND_SPACE_DEFAULT) + Set(LVarD, Ref(N(D_80250D58_862EC8))) + CaseEq(ANIM_Kolorado_Still) + Set(LVarD, Ref(N(D_80250A5C_862BCC))) + CaseEq(ANIM_Kolorado_Yell) + Call(PlaySoundAtNpc, NPC_Whale, SOUND_WHALE_OPEN_MOUTH, SOUND_SPACE_DEFAULT) + Set(LVarD, Ref(N(D_80250AD4_862C44))) + CaseEq(ANIM_Kolorado_Idle) + Set(LVarD, Ref(N(D_80251654_8637C4))) + CaseEq(ANIM_Kolorado_Walk) + Set(LVarD, Ref(N(D_802516CC_86383C))) + CaseEq(ANIM_Kolorado_WalkSad) + Set(LVarD, Ref(N(D_80250FA4_863114))) + Call(EnableModel, MODEL_o170, FALSE) + Call(EnableModel, MODEL_o183, FALSE) + CaseEq(ANIM_Kolorado_Run) + Set(LVarD, Ref(N(D_80251244_8633B4))) + Call(EnableModel, MODEL_o170, FALSE) + Call(EnableModel, MODEL_o183, FALSE) + CaseEq(ANIM_Kolorado_Panic) + Set(LVarD, Ref(N(D_802513AC_86351C))) + Call(EnableModel, MODEL_o170, FALSE) + Call(EnableModel, MODEL_o183, FALSE) + CaseEq(ANIM_Kolorado_Talk) + Set(LVarD, Ref(N(D_802514EC_86365C))) + CaseEq(ANIM_Kolorado_Shout) + Set(LVarD, Ref(N(D_80250FB4_863124))) + CaseEq(ANIM_Kolorado_TalkSad) + Set(LVarD, Ref(N(D_8025110C_86327C))) + CaseEq(ANIM_Kolorado_HurtStill) + Set(LVarD, Ref(N(D_8025111C_86328C))) + EndSwitch + EndIf + ExecWait(LVarD) + Add(LVarC, 1) + IfGt(LVarC, 1000) + Set(LVarC, 0) + EndIf + Goto(0) + EndThread + Return + End }; EvtScript N(EVS_802522B8) = { - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_IdleSad) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_IdleSad) + Return + End }; diff --git a/src/world/area_mac/mac_05/mac_05_6_rooms.c b/src/world/area_mac/mac_05/mac_05_6_rooms.c index 7b69f54cec9..e893190bc44 100644 --- a/src/world/area_mac/mac_05/mac_05_6_rooms.c +++ b/src/world/area_mac/mac_05/mac_05_6_rooms.c @@ -1,62 +1,62 @@ #include "mac_05.h" EvtScript N(D_802522E0_864450) = { - EVT_CALL(RotateModel, MODEL_o80, LVar0, 0, -1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o80, LVar0, 0, -1, 0) + Return + End }; EvtScript N(D_80252310_864480) = { - EVT_SET(LVar1, LVar0) - EVT_CALL(RotateModel, MODEL_o95, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o96, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o98, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o99, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o100, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o101, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o102, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o104, LVar1, 1, 0, 0) - EVT_SET(LVar1, LVar0) - EVT_CALL(RotateModel, MODEL_o133, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o134, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o137, LVar1, 1, 0, 0) - EVT_SET(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-1.0)) - EVT_CALL(RotateModel, MODEL_o82, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o83, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o84, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o136, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o81, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o135, LVar1, 1, 0, 0) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + Call(RotateModel, MODEL_o95, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_o96, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_o98, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_o99, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_o100, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_o101, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_o102, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_o104, LVar1, 1, 0, 0) + Set(LVar1, LVar0) + Call(RotateModel, MODEL_o133, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_o134, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_o137, LVar1, 1, 0, 0) + Set(LVar1, LVar0) + MulF(LVar1, Float(-1.0)) + Call(RotateModel, MODEL_o82, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_o83, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_o84, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_o136, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_o81, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_o135, LVar1, 1, 0, 0) + Return + End }; EvtScript N(D_80252580_8646F0) = { - EVT_CALL(RotateModel, MODEL_o80, LVar0, 1, 0, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o80, LVar0, 1, 0, 0) + Return + End }; EvtScript N(D_802525B0_864720) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetMusicTrack, 0, SONG_CLUB64, 0, 8) - EVT_CALL(StopSound, SOUND_LOOP_MAC_HARBOR_WATER) - EVT_CALL(StopTrackingSoundPos, SOUND_LRAW_MAC_HARBOR_WATER) - EVT_CALL(EnableGroup, MODEL_bar_inn, TRUE) - EVT_CALL(EnableModel, MODEL_o139, FALSE) - EVT_CALL(EnableModel, MODEL_o140, FALSE) - EVT_CASE_EQ(3) - EVT_SET(AF_JAN01_TreeDrop_StarPiece, FALSE) - EVT_CALL(EnableGroup, MODEL_bar_inn, FALSE) - EVT_CALL(EnableModel, MODEL_o139, TRUE) - EVT_CALL(EnableModel, MODEL_o140, TRUE) - EVT_WAIT(5) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(0) + Call(SetMusicTrack, 0, SONG_CLUB64, 0, 8) + Call(StopSound, SOUND_LOOP_MAC_HARBOR_WATER) + Call(StopTrackingSoundPos, SOUND_LRAW_MAC_HARBOR_WATER) + Call(EnableGroup, MODEL_bar_inn, TRUE) + Call(EnableModel, MODEL_o139, FALSE) + Call(EnableModel, MODEL_o140, FALSE) + CaseEq(3) + Set(AF_JAN01_TreeDrop_StarPiece, FALSE) + Call(EnableGroup, MODEL_bar_inn, FALSE) + Call(EnableModel, MODEL_o139, TRUE) + Call(EnableModel, MODEL_o140, TRUE) + Wait(5) + Exec(N(EVS_SetupMusic)) + EndSwitch + Return + End }; s32 N(D_802526C8_864838)[] = { @@ -69,18 +69,18 @@ s32 N(D_802526C8_864838)[] = { }; EvtScript N(EVS_SetupRooms) = { - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, 2, - EVT_PTR(N(D_802522E0_864450)), - EVT_PTR(N(D_80252310_864480)), - EVT_PTR(N(D_80252580_8646F0)), - EVT_PTR(N(D_802525B0_864720)), + Ref(N(D_802522E0_864450)), + Ref(N(D_80252310_864480)), + Ref(N(D_80252580_8646F0)), + Ref(N(D_802525B0_864720)), COLLIDER_deilit1, COLLIDER_deilit1u, MODEL_harbour_club, - EVT_PTR(N(D_802526C8_864838))) - EVT_SET(LVar0, 3) - EVT_EXEC(N(D_802525B0_864720)) - EVT_RETURN - EVT_END + Ref(N(D_802526C8_864838))) + Set(LVar0, 3) + Exec(N(D_802525B0_864720)) + Return + End }; diff --git a/src/world/area_mac/mac_05/mac_05_7_club64_sign.c b/src/world/area_mac/mac_05/mac_05_7_club64_sign.c index ce8cff8e5c3..5731682a3ca 100644 --- a/src/world/area_mac/mac_05/mac_05_7_club64_sign.c +++ b/src/world/area_mac/mac_05/mac_05_7_club64_sign.c @@ -93,9 +93,9 @@ void N(gfx_build_club_64)(s32 index) { } EvtScript N(EVS_AnimateClub64Sign) = { - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_3, MODEL_o187, TRUE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_3, EVT_PTR(N(gfx_build_club_64)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_o187, CUSTOM_GFX_3, -1) - EVT_RETURN - EVT_END + Call(MakeLocalVertexCopy, VTX_COPY_3, MODEL_o187, TRUE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_3, Ref(N(gfx_build_club_64)), NULL) + Call(SetModelCustomGfx, MODEL_o187, CUSTOM_GFX_3, -1) + Return + End }; diff --git a/src/world/area_mac/mac_06/mac_06_1_main.c b/src/world/area_mac/mac_06/mac_06_1_main.c index 9e6dbd0f40e..6c1cfd2b85f 100644 --- a/src/world/area_mac/mac_06/mac_06_1_main.c +++ b/src/world/area_mac/mac_06/mac_06_1_main.c @@ -30,51 +30,51 @@ API_CALLABLE(N(GetWaveAmplitude)) { #include "world/common/todo/SpawnSunEffect.inc.c" EvtScript N(EVS_AnimateWaves) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SET(LVarC, 0) - EVT_LABEL(0) - EVT_IF_GE(LVarC, 60) - EVT_SET(LVarC, 0) - EVT_END_IF - EVT_CALL(N(GetWaveAmplitude), LVarC, LVar0, EVT_FLOAT(-1.0), EVT_FLOAT(1.0), 30, 0, 0) - EVT_CALL(ScaleGroup, MODEL_g34, 1, LVar0, 1) - EVT_ADD(LVarC, 1) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Set(LVarC, 0) + Label(0) + IfGe(LVarC, 60) + Set(LVarC, 0) + EndIf + Call(N(GetWaveAmplitude), LVarC, LVar0, Float(-1.0), Float(1.0), 30, 0, 0) + Call(ScaleGroup, MODEL_g34, 1, LVar0, 1) + Add(LVarC, 1) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_FlyingGull)) - EVT_EXEC(N(EVS_WhaleMain)) - EVT_CALL(SetMusicTrack, 0, SONG_RIDING_THE_WHALE, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_BEACH) - EVT_EXEC(N(EVS_AnimateWaves)) - EVT_CALL(SetTexPanner, MODEL_o214, TEX_PANNER_1) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, mac_06_ENTRY_0) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_TOAD_TOWN) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Exec(N(EVS_FlyingGull)) + Exec(N(EVS_WhaleMain)) + Call(SetMusicTrack, 0, SONG_RIDING_THE_WHALE, 0, 8) + Call(PlayAmbientSounds, AMBIENT_BEACH) + Exec(N(EVS_AnimateWaves)) + Call(SetTexPanner, MODEL_o214, TEX_PANNER_1) + Call(N(SpawnSunEffect)) + Call(GetEntryID, LVar0) + IfEq(LVar0, mac_06_ENTRY_0) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 400, 150, 200, -60) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_ELSE - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Else + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( -400, -150, -200, 60) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_END_IF - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + EndIf + Return + End }; diff --git a/src/world/area_mac/mac_06/mac_06_2_whale.c b/src/world/area_mac/mac_06/mac_06_2_whale.c index 517ac48da98..b5565b92faf 100644 --- a/src/world/area_mac/mac_06/mac_06_2_whale.c +++ b/src/world/area_mac/mac_06/mac_06_2_whale.c @@ -24,328 +24,328 @@ API_CALLABLE(N(UnkPlayerPosFunc)) { MAP_RODATA_PAD(2, unk); EvtScript N(EVS_WhaleState_Still) = { - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, 30, 60, 30, 0, 0) - EVT_CALL(RotateModel, MODEL_o167, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o168, LVar0, -1, 0, 0) - EVT_RETURN - EVT_END + Call(N(UnkFloatFunc001), LVarC, LVar0, 30, 60, 30, 0, 0) + Call(RotateModel, MODEL_o167, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o168, LVar0, -1, 0, 0) + Return + End }; EvtScript N(EVS_WhaleState_2) = { - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, 0, 30, 30, 1, 0) - EVT_SETF(LVar1, LVar0) - EVT_DIVF(LVar1, EVT_FLOAT(3.0)) - EVT_CALL(RotateModel, MODEL_o173, LVar0, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_dou, LVar1, 0, 0, -1) - EVT_CALL(TranslateModel, MODEL_o170, -5, -68, 0) - EVT_CALL(TranslateModel, MODEL_o183, -5, -68, 0) - EVT_CALL(TranslateModel, MODEL_o167, 60, 29, -51) - EVT_CALL(TranslateModel, MODEL_o168, 60, 29, 51) - EVT_CALL(RotateModel, MODEL_o170, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o183, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o167, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o168, LVar1, 0, 0, -1) - EVT_CALL(TranslateModel, MODEL_o170, 5, 68, 0) - EVT_CALL(TranslateModel, MODEL_o183, 5, 68, 0) - EVT_CALL(TranslateModel, MODEL_o167, -60, -29, 51) - EVT_CALL(TranslateModel, MODEL_o168, -60, -29, -51) - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, 0, -40, 30, 1, 0) - EVT_CALL(TranslateModel, MODEL_bero, LVar0, 0, 0) - EVT_RETURN - EVT_END + Call(N(UnkFloatFunc001), LVarC, LVar0, 0, 30, 30, 1, 0) + SetF(LVar1, LVar0) + DivF(LVar1, Float(3.0)) + Call(RotateModel, MODEL_o173, LVar0, 0, 0, 1) + Call(RotateGroup, MODEL_dou, LVar1, 0, 0, -1) + Call(TranslateModel, MODEL_o170, -5, -68, 0) + Call(TranslateModel, MODEL_o183, -5, -68, 0) + Call(TranslateModel, MODEL_o167, 60, 29, -51) + Call(TranslateModel, MODEL_o168, 60, 29, 51) + Call(RotateModel, MODEL_o170, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_o183, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_o167, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_o168, LVar1, 0, 0, -1) + Call(TranslateModel, MODEL_o170, 5, 68, 0) + Call(TranslateModel, MODEL_o183, 5, 68, 0) + Call(TranslateModel, MODEL_o167, -60, -29, 51) + Call(TranslateModel, MODEL_o168, -60, -29, -51) + Call(N(UnkFloatFunc001), LVarC, LVar0, 0, -40, 30, 1, 0) + Call(TranslateModel, MODEL_bero, LVar0, 0, 0) + Return + End }; EvtScript N(EVS_WhaleState_IdleSad) = { - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, 0, -30, 8, 1, 0) - EVT_ADDF(LVar0, EVT_FLOAT(30.0)) - EVT_SETF(LVar1, LVar0) - EVT_DIVF(LVar1, EVT_FLOAT(3.0)) - EVT_CALL(RotateModel, MODEL_o173, LVar0, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_dou, LVar1, 0, 0, -1) - EVT_CALL(TranslateModel, MODEL_o170, -5, -68, 0) - EVT_CALL(TranslateModel, MODEL_o183, -5, -68, 0) - EVT_CALL(TranslateModel, MODEL_o167, 60, 29, -51) - EVT_CALL(TranslateModel, MODEL_o168, 60, 29, 51) - EVT_CALL(RotateModel, MODEL_o170, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o183, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o167, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o168, LVar1, 0, 0, -1) - EVT_CALL(TranslateModel, MODEL_o170, 5, 68, 0) - EVT_CALL(TranslateModel, MODEL_o183, 5, 68, 0) - EVT_CALL(TranslateModel, MODEL_o167, -60, -29, 51) - EVT_CALL(TranslateModel, MODEL_o168, -60, -29, -51) - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, 0, -40, 120, 1, 0) - EVT_CALL(TranslateModel, MODEL_bero, LVar0, 0, 0) - EVT_RETURN - EVT_END + Call(N(UnkFloatFunc001), LVarC, LVar0, 0, -30, 8, 1, 0) + AddF(LVar0, Float(30.0)) + SetF(LVar1, LVar0) + DivF(LVar1, Float(3.0)) + Call(RotateModel, MODEL_o173, LVar0, 0, 0, 1) + Call(RotateGroup, MODEL_dou, LVar1, 0, 0, -1) + Call(TranslateModel, MODEL_o170, -5, -68, 0) + Call(TranslateModel, MODEL_o183, -5, -68, 0) + Call(TranslateModel, MODEL_o167, 60, 29, -51) + Call(TranslateModel, MODEL_o168, 60, 29, 51) + Call(RotateModel, MODEL_o170, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_o183, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_o167, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_o168, LVar1, 0, 0, -1) + Call(TranslateModel, MODEL_o170, 5, 68, 0) + Call(TranslateModel, MODEL_o183, 5, 68, 0) + Call(TranslateModel, MODEL_o167, -60, -29, 51) + Call(TranslateModel, MODEL_o168, -60, -29, -51) + Call(N(UnkFloatFunc001), LVarC, LVar0, 0, -40, 120, 1, 0) + Call(TranslateModel, MODEL_bero, LVar0, 0, 0) + Return + End }; EvtScript N(EVS_WhaleState_WalkSad) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_WhaleState_Shout) = { - EVT_CALL(GetNpcVar, NPC_Whale, 0, LVar3) - EVT_IF_EQ(LVar3, 0) - EVT_CALL(N(UnkPlayerPosFunc)) - EVT_CALL(PlaySoundAt, SOUND_LOOP_WHALE_GEYSER, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(N(CreateWhaleGeyser), 0, LVar0, LVar1, LVar2, 0, -1, 0, 30) - EVT_CALL(SetNpcVar, NPC_Whale, 0, LVar0) - EVT_END_IF - EVT_CALL(GetNpcVar, NPC_Whale, 0, LVar3) - EVT_CALL(N(UnkPlayerPosFunc)) - EVT_CALL(N(SetWhaleGeyserPos), LVar3, LVar0, LVar1, LVar2) - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, 30, 60, 25, 0, 0) - EVT_CALL(RotateModel, MODEL_o167, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o168, LVar0, -1, 0, 0) - EVT_RETURN - EVT_END + Call(GetNpcVar, NPC_Whale, 0, LVar3) + IfEq(LVar3, 0) + Call(N(UnkPlayerPosFunc)) + Call(PlaySoundAt, SOUND_LOOP_WHALE_GEYSER, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Call(N(CreateWhaleGeyser), 0, LVar0, LVar1, LVar2, 0, -1, 0, 30) + Call(SetNpcVar, NPC_Whale, 0, LVar0) + EndIf + Call(GetNpcVar, NPC_Whale, 0, LVar3) + Call(N(UnkPlayerPosFunc)) + Call(N(SetWhaleGeyserPos), LVar3, LVar0, LVar1, LVar2) + Call(N(UnkFloatFunc001), LVarC, LVar0, 30, 60, 25, 0, 0) + Call(RotateModel, MODEL_o167, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o168, LVar0, -1, 0, 0) + Return + End }; EvtScript N(EVS_WhaleState_TalkSad) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_WhaleState_HurtStill) = { - EVT_IF_GE(LVarC, 0) - EVT_IF_LE(LVarC, 2) - EVT_CALL(EnableModel, MODEL_o170, FALSE) - EVT_CALL(EnableModel, MODEL_o183, TRUE) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVarC, 15) - EVT_CALL(EnableModel, MODEL_o170, FALSE) - EVT_CALL(EnableModel, MODEL_o183, TRUE) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVarC, 22) - EVT_CALL(EnableModel, MODEL_o170, FALSE) - EVT_CALL(EnableModel, MODEL_o183, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(EnableModel, MODEL_o170, TRUE) - EVT_CALL(EnableModel, MODEL_o183, FALSE) - EVT_RETURN - EVT_END + IfGe(LVarC, 0) + IfLe(LVarC, 2) + Call(EnableModel, MODEL_o170, FALSE) + Call(EnableModel, MODEL_o183, TRUE) + Return + EndIf + EndIf + IfEq(LVarC, 15) + Call(EnableModel, MODEL_o170, FALSE) + Call(EnableModel, MODEL_o183, TRUE) + Return + EndIf + IfEq(LVarC, 22) + Call(EnableModel, MODEL_o170, FALSE) + Call(EnableModel, MODEL_o183, TRUE) + Return + EndIf + Call(EnableModel, MODEL_o170, TRUE) + Call(EnableModel, MODEL_o183, FALSE) + Return + End }; EvtScript N(EVS_WhaleState_Run) = { - EVT_SET(LVar0, LVarC) - EVT_DIV(LVar0, 20) - EVT_MOD(LVar0, 2) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, EVT_FLOAT(-1.0), EVT_FLOAT(1.0), 3, 0, 0) - EVT_CALL(TranslateModel, MODEL_o173, LVar0, 0, 0) - EVT_CALL(TranslateGroup, MODEL_dou, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o170, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o183, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o167, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o168, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o167, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o168, LVar0, 0, 0) - EVT_RETURN - EVT_END + Set(LVar0, LVarC) + Div(LVar0, 20) + Mod(LVar0, 2) + IfEq(LVar0, 0) + Return + EndIf + Call(N(UnkFloatFunc001), LVarC, LVar0, Float(-1.0), Float(1.0), 3, 0, 0) + Call(TranslateModel, MODEL_o173, LVar0, 0, 0) + Call(TranslateGroup, MODEL_dou, LVar0, 0, 0) + Call(TranslateModel, MODEL_o170, LVar0, 0, 0) + Call(TranslateModel, MODEL_o183, LVar0, 0, 0) + Call(TranslateModel, MODEL_o167, LVar0, 0, 0) + Call(TranslateModel, MODEL_o168, LVar0, 0, 0) + Call(TranslateModel, MODEL_o167, LVar0, 0, 0) + Call(TranslateModel, MODEL_o168, LVar0, 0, 0) + Return + End }; EvtScript N(D_80242474_866FB4) = { - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, EVT_FLOAT(-6.0), EVT_FLOAT(6.0), 3, 0, 0) - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar1, EVT_FLOAT(6.0), EVT_FLOAT(-6.0), 2, 0, 0) - EVT_CALL(TranslateModel, MODEL_o173, LVar0, LVar1, 0) - EVT_CALL(TranslateGroup, MODEL_dou, LVar0, LVar1, 0) - EVT_CALL(TranslateModel, MODEL_o170, LVar0, LVar1, 0) - EVT_CALL(TranslateModel, MODEL_o183, LVar0, LVar1, 0) - EVT_CALL(TranslateModel, MODEL_o167, LVar0, LVar1, 0) - EVT_CALL(TranslateModel, MODEL_o168, LVar0, LVar1, 0) - EVT_CALL(TranslateModel, MODEL_o167, LVar0, LVar1, 0) - EVT_CALL(TranslateModel, MODEL_o168, LVar0, LVar1, 0) - EVT_RETURN - EVT_END + Call(N(UnkFloatFunc001), LVarC, LVar0, Float(-6.0), Float(6.0), 3, 0, 0) + Call(N(UnkFloatFunc001), LVarC, LVar1, Float(6.0), Float(-6.0), 2, 0, 0) + Call(TranslateModel, MODEL_o173, LVar0, LVar1, 0) + Call(TranslateGroup, MODEL_dou, LVar0, LVar1, 0) + Call(TranslateModel, MODEL_o170, LVar0, LVar1, 0) + Call(TranslateModel, MODEL_o183, LVar0, LVar1, 0) + Call(TranslateModel, MODEL_o167, LVar0, LVar1, 0) + Call(TranslateModel, MODEL_o168, LVar0, LVar1, 0) + Call(TranslateModel, MODEL_o167, LVar0, LVar1, 0) + Call(TranslateModel, MODEL_o168, LVar0, LVar1, 0) + Return + End }; EvtScript N(EVS_WhaleState_Talk) = { - EVT_SET(LVar0, LVarC) - EVT_DIV(LVar0, 20) - EVT_MOD(LVar0, 2) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, EVT_FLOAT(-1.0), EVT_FLOAT(1.0), 3, 0, 0) - EVT_CALL(TranslateModel, MODEL_o173, LVar0, 0, 0) - EVT_CALL(TranslateGroup, MODEL_dou, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o170, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o183, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o167, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o168, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o167, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o168, LVar0, 0, 0) - EVT_RETURN - EVT_END + Set(LVar0, LVarC) + Div(LVar0, 20) + Mod(LVar0, 2) + IfEq(LVar0, 0) + Return + EndIf + Call(N(UnkFloatFunc001), LVarC, LVar0, Float(-1.0), Float(1.0), 3, 0, 0) + Call(TranslateModel, MODEL_o173, LVar0, 0, 0) + Call(TranslateGroup, MODEL_dou, LVar0, 0, 0) + Call(TranslateModel, MODEL_o170, LVar0, 0, 0) + Call(TranslateModel, MODEL_o183, LVar0, 0, 0) + Call(TranslateModel, MODEL_o167, LVar0, 0, 0) + Call(TranslateModel, MODEL_o168, LVar0, 0, 0) + Call(TranslateModel, MODEL_o167, LVar0, 0, 0) + Call(TranslateModel, MODEL_o168, LVar0, 0, 0) + Return + End }; EvtScript N(EVS_WhaleState_Idle) = { - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, 30, 60, 30, 0, 0) - EVT_CALL(RotateModel, MODEL_o167, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o168, LVar0, -1, 0, 0) - EVT_RETURN - EVT_END + Call(N(UnkFloatFunc001), LVarC, LVar0, 30, 60, 30, 0, 0) + Call(RotateModel, MODEL_o167, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o168, LVar0, -1, 0, 0) + Return + End }; EvtScript N(EVS_WhaleState_Walk) = { - EVT_CALL(N(UnkFloatFunc001), LVarC, LVar0, 0, 30, 3, 0, 0) - EVT_SET(LVar1, LVar0) - EVT_DIV(LVar1, 3) - EVT_CALL(RotateModel, MODEL_o173, LVar0, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_dou, LVar1, 0, 0, -1) - EVT_CALL(TranslateModel, MODEL_o170, -5, -68, 0) - EVT_CALL(TranslateModel, MODEL_o183, -5, -68, 0) - EVT_CALL(TranslateModel, MODEL_o167, 60, 29, -51) - EVT_CALL(TranslateModel, MODEL_o168, 60, 29, 51) - EVT_CALL(RotateModel, MODEL_o170, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o183, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o167, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o168, LVar1, 0, 0, -1) - EVT_CALL(TranslateModel, MODEL_o170, 5, 68, 0) - EVT_CALL(TranslateModel, MODEL_o183, 5, 68, 0) - EVT_CALL(TranslateModel, MODEL_o167, -60, -29, 51) - EVT_CALL(TranslateModel, MODEL_o168, -60, -29, -51) - EVT_SET(LVar0, LVarC) - EVT_MUL(LVar0, 2) - EVT_CALL(N(UnkFloatFunc001), LVar0, LVar0, 30, 60, 3, 0, 0) - EVT_CALL(RotateModel, MODEL_o167, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o168, LVar0, -1, 0, 0) - EVT_RETURN - EVT_END + Call(N(UnkFloatFunc001), LVarC, LVar0, 0, 30, 3, 0, 0) + Set(LVar1, LVar0) + Div(LVar1, 3) + Call(RotateModel, MODEL_o173, LVar0, 0, 0, 1) + Call(RotateGroup, MODEL_dou, LVar1, 0, 0, -1) + Call(TranslateModel, MODEL_o170, -5, -68, 0) + Call(TranslateModel, MODEL_o183, -5, -68, 0) + Call(TranslateModel, MODEL_o167, 60, 29, -51) + Call(TranslateModel, MODEL_o168, 60, 29, 51) + Call(RotateModel, MODEL_o170, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_o183, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_o167, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_o168, LVar1, 0, 0, -1) + Call(TranslateModel, MODEL_o170, 5, 68, 0) + Call(TranslateModel, MODEL_o183, 5, 68, 0) + Call(TranslateModel, MODEL_o167, -60, -29, 51) + Call(TranslateModel, MODEL_o168, -60, -29, -51) + Set(LVar0, LVarC) + Mul(LVar0, 2) + Call(N(UnkFloatFunc001), LVar0, LVar0, 30, 60, 3, 0, 0) + Call(RotateModel, MODEL_o167, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o168, LVar0, -1, 0, 0) + Return + End }; EvtScript N(EVS_WhaleMain) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_1, MODEL_karada, TRUE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(unkAngleFunc002)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_karada, CUSTOM_GFX_1, -1) - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_2, MODEL_onaka, TRUE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_2, EVT_PTR(N(unkAngleFunc003)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_onaka, CUSTOM_GFX_2, -1) - EVT_CALL(SetNpcVar, NPC_Whale, 0, 0) - EVT_THREAD - EVT_LABEL(0) - EVT_CALL(N(UnkAngleFunc001), 0, LVar0, LVar1, LVar2) - EVT_SUBF(LVar0, -80) - EVT_SUBF(LVar1, -18) - EVT_SUBF(LVar2, 420) - EVT_ADDF(LVar0, 130) - EVT_ADDF(LVar1, -20) - EVT_ADDF(LVar2, 0) - EVT_CALL(TranslateModel, MODEL_bero, LVar0, LVar1, LVar2) - EVT_CALL(TranslateModel, MODEL_o170, LVar0, LVar1, LVar2) - EVT_CALL(TranslateModel, MODEL_o183, LVar0, LVar1, LVar2) - EVT_CALL(TranslateModel, MODEL_o173, LVar0, LVar1, LVar2) - EVT_CALL(TranslateModel, MODEL_o167, LVar0, LVar1, LVar2) - EVT_CALL(TranslateModel, MODEL_o168, LVar0, LVar1, LVar2) - EVT_CALL(TranslateGroup, MODEL_dou, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcYaw, NPC_Whale, LVar0) - EVT_MULF(LVar0, -1) - EVT_ADDF(LVar0, -90) - EVT_CALL(TranslateModel, MODEL_bero, -100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o170, -100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o183, -100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o173, -100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o167, -100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o168, -100, 0, 0) - EVT_CALL(TranslateGroup, MODEL_dou, -100, 0, 0) - EVT_CALL(TranslateModel, MODEL_bero, 100, -1, 0) - EVT_CALL(TranslateModel, MODEL_o170, -5, -68, 0) - EVT_CALL(TranslateModel, MODEL_o183, -5, -68, 0) - EVT_CALL(TranslateModel, MODEL_o173, 102, 4, 0) - EVT_CALL(TranslateModel, MODEL_o167, 60, 29, -51) - EVT_CALL(TranslateModel, MODEL_o168, 60, 29, 51) - EVT_CALL(RotateModel, MODEL_bero, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o170, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o183, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o173, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o167, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o168, LVar0, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_dou, LVar0, 0, 1, 0) - EVT_CALL(TranslateModel, MODEL_bero, -100, 1, 0) - EVT_CALL(TranslateModel, MODEL_o170, 5, 68, 0) - EVT_CALL(TranslateModel, MODEL_o183, 5, 68, 0) - EVT_CALL(TranslateModel, MODEL_o173, -102, -4, 0) - EVT_CALL(TranslateModel, MODEL_o167, -60, -29, 51) - EVT_CALL(TranslateModel, MODEL_o168, -60, -29, -51) - EVT_CALL(TranslateModel, MODEL_bero, 100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o170, 100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o183, 100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o173, 100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o167, 100, 0, 0) - EVT_CALL(TranslateModel, MODEL_o168, 100, 0, 0) - EVT_CALL(TranslateGroup, MODEL_dou, 100, 0, 0) - EVT_CALL(GetNpcAnimation, NPC_Whale, LVar0) - EVT_IF_NE(LVar0, LVarB) - EVT_SET(LVarB, LVar0) - EVT_SET(LVarC, 0) - EVT_CALL(EnableModel, MODEL_o170, TRUE) - EVT_CALL(EnableModel, MODEL_o183, FALSE) - EVT_IF_NE(LVarB, ANIM_Kolorado_Shout) - EVT_CALL(GetNpcVar, NPC_Whale, 0, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(PlaySound, SOUND_LRAW_WHALE_GEYSER | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_CALL(StopTrackingSoundPos, SOUND_LRAW_WHALE_GEYSER) - EVT_CALL(N(DisposeWhaleGeyser), LVar0) - EVT_CALL(SetNpcVar, NPC_Whale, 0, 0) - EVT_END_IF - EVT_END_IF - EVT_SWITCH(LVarB) - EVT_CASE_EQ(ANIM_Kolorado_IdleSad) - EVT_CALL(PlaySoundAtNpc, NPC_Whale, SOUND_WHALE_CLOSE_MOUTH, SOUND_SPACE_DEFAULT) - EVT_SET(LVarD, EVT_PTR(N(EVS_WhaleState_IdleSad))) - EVT_CASE_EQ(ANIM_Kolorado_Still) - EVT_SET(LVarD, EVT_PTR(N(EVS_WhaleState_Still))) - EVT_CASE_EQ(ANIM_Kolorado_Yell) - EVT_CALL(PlaySoundAtNpc, NPC_Whale, SOUND_WHALE_OPEN_MOUTH, SOUND_SPACE_DEFAULT) - EVT_SET(LVarD, EVT_PTR(N(EVS_WhaleState_2))) - EVT_CASE_EQ(ANIM_Kolorado_Idle) - EVT_SET(LVarD, EVT_PTR(N(EVS_WhaleState_Idle))) - EVT_CASE_EQ(ANIM_Kolorado_Walk) - EVT_SET(LVarD, EVT_PTR(N(EVS_WhaleState_Walk))) - EVT_CASE_EQ(ANIM_Kolorado_WalkSad) - EVT_SET(LVarD, EVT_PTR(N(EVS_WhaleState_WalkSad))) - EVT_CALL(EnableModel, MODEL_o170, FALSE) - EVT_CALL(EnableModel, MODEL_o183, FALSE) - EVT_CASE_EQ(ANIM_Kolorado_Run) - EVT_SET(LVarD, EVT_PTR(N(EVS_WhaleState_Run))) - EVT_CALL(EnableModel, MODEL_o170, FALSE) - EVT_CALL(EnableModel, MODEL_o183, FALSE) - EVT_CASE_EQ(ANIM_Kolorado_Panic) - EVT_SET(LVarD, EVT_PTR(N(D_80242474_866FB4))) - EVT_CALL(EnableModel, MODEL_o170, FALSE) - EVT_CALL(EnableModel, MODEL_o183, FALSE) - EVT_CASE_EQ(ANIM_Kolorado_Talk) - EVT_SET(LVarD, EVT_PTR(N(EVS_WhaleState_Talk))) - EVT_CASE_EQ(ANIM_Kolorado_Shout) - EVT_SET(LVarD, EVT_PTR(N(EVS_WhaleState_Shout))) - EVT_CASE_EQ(ANIM_Kolorado_TalkSad) - EVT_SET(LVarD, EVT_PTR(N(EVS_WhaleState_TalkSad))) - EVT_CASE_EQ(ANIM_Kolorado_HurtStill) - EVT_SET(LVarD, EVT_PTR(N(EVS_WhaleState_HurtStill))) - EVT_END_SWITCH - EVT_END_IF - EVT_EXEC_WAIT(LVarD) - EVT_ADD(LVarC, 1) - EVT_IF_GT(LVarC, 1000) - EVT_SET(LVarC, 0) - EVT_END_IF - EVT_GOTO(0) - EVT_END_THREAD - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(MakeLocalVertexCopy, VTX_COPY_1, MODEL_karada, TRUE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_1, Ref(N(unkAngleFunc002)), NULL) + Call(SetModelCustomGfx, MODEL_karada, CUSTOM_GFX_1, -1) + Call(MakeLocalVertexCopy, VTX_COPY_2, MODEL_onaka, TRUE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_2, Ref(N(unkAngleFunc003)), NULL) + Call(SetModelCustomGfx, MODEL_onaka, CUSTOM_GFX_2, -1) + Call(SetNpcVar, NPC_Whale, 0, 0) + Thread + Label(0) + Call(N(UnkAngleFunc001), 0, LVar0, LVar1, LVar2) + SubF(LVar0, -80) + SubF(LVar1, -18) + SubF(LVar2, 420) + AddF(LVar0, 130) + AddF(LVar1, -20) + AddF(LVar2, 0) + Call(TranslateModel, MODEL_bero, LVar0, LVar1, LVar2) + Call(TranslateModel, MODEL_o170, LVar0, LVar1, LVar2) + Call(TranslateModel, MODEL_o183, LVar0, LVar1, LVar2) + Call(TranslateModel, MODEL_o173, LVar0, LVar1, LVar2) + Call(TranslateModel, MODEL_o167, LVar0, LVar1, LVar2) + Call(TranslateModel, MODEL_o168, LVar0, LVar1, LVar2) + Call(TranslateGroup, MODEL_dou, LVar0, LVar1, LVar2) + Call(GetNpcYaw, NPC_Whale, LVar0) + MulF(LVar0, -1) + AddF(LVar0, -90) + Call(TranslateModel, MODEL_bero, -100, 0, 0) + Call(TranslateModel, MODEL_o170, -100, 0, 0) + Call(TranslateModel, MODEL_o183, -100, 0, 0) + Call(TranslateModel, MODEL_o173, -100, 0, 0) + Call(TranslateModel, MODEL_o167, -100, 0, 0) + Call(TranslateModel, MODEL_o168, -100, 0, 0) + Call(TranslateGroup, MODEL_dou, -100, 0, 0) + Call(TranslateModel, MODEL_bero, 100, -1, 0) + Call(TranslateModel, MODEL_o170, -5, -68, 0) + Call(TranslateModel, MODEL_o183, -5, -68, 0) + Call(TranslateModel, MODEL_o173, 102, 4, 0) + Call(TranslateModel, MODEL_o167, 60, 29, -51) + Call(TranslateModel, MODEL_o168, 60, 29, 51) + Call(RotateModel, MODEL_bero, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o170, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o183, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o173, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o167, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o168, LVar0, 0, 1, 0) + Call(RotateGroup, MODEL_dou, LVar0, 0, 1, 0) + Call(TranslateModel, MODEL_bero, -100, 1, 0) + Call(TranslateModel, MODEL_o170, 5, 68, 0) + Call(TranslateModel, MODEL_o183, 5, 68, 0) + Call(TranslateModel, MODEL_o173, -102, -4, 0) + Call(TranslateModel, MODEL_o167, -60, -29, 51) + Call(TranslateModel, MODEL_o168, -60, -29, -51) + Call(TranslateModel, MODEL_bero, 100, 0, 0) + Call(TranslateModel, MODEL_o170, 100, 0, 0) + Call(TranslateModel, MODEL_o183, 100, 0, 0) + Call(TranslateModel, MODEL_o173, 100, 0, 0) + Call(TranslateModel, MODEL_o167, 100, 0, 0) + Call(TranslateModel, MODEL_o168, 100, 0, 0) + Call(TranslateGroup, MODEL_dou, 100, 0, 0) + Call(GetNpcAnimation, NPC_Whale, LVar0) + IfNe(LVar0, LVarB) + Set(LVarB, LVar0) + Set(LVarC, 0) + Call(EnableModel, MODEL_o170, TRUE) + Call(EnableModel, MODEL_o183, FALSE) + IfNe(LVarB, ANIM_Kolorado_Shout) + Call(GetNpcVar, NPC_Whale, 0, LVar0) + IfNe(LVar0, 0) + Call(PlaySound, SOUND_LRAW_WHALE_GEYSER | SOUND_ID_TRIGGER_CHANGE_SOUND) + Call(StopTrackingSoundPos, SOUND_LRAW_WHALE_GEYSER) + Call(N(DisposeWhaleGeyser), LVar0) + Call(SetNpcVar, NPC_Whale, 0, 0) + EndIf + EndIf + Switch(LVarB) + CaseEq(ANIM_Kolorado_IdleSad) + Call(PlaySoundAtNpc, NPC_Whale, SOUND_WHALE_CLOSE_MOUTH, SOUND_SPACE_DEFAULT) + Set(LVarD, Ref(N(EVS_WhaleState_IdleSad))) + CaseEq(ANIM_Kolorado_Still) + Set(LVarD, Ref(N(EVS_WhaleState_Still))) + CaseEq(ANIM_Kolorado_Yell) + Call(PlaySoundAtNpc, NPC_Whale, SOUND_WHALE_OPEN_MOUTH, SOUND_SPACE_DEFAULT) + Set(LVarD, Ref(N(EVS_WhaleState_2))) + CaseEq(ANIM_Kolorado_Idle) + Set(LVarD, Ref(N(EVS_WhaleState_Idle))) + CaseEq(ANIM_Kolorado_Walk) + Set(LVarD, Ref(N(EVS_WhaleState_Walk))) + CaseEq(ANIM_Kolorado_WalkSad) + Set(LVarD, Ref(N(EVS_WhaleState_WalkSad))) + Call(EnableModel, MODEL_o170, FALSE) + Call(EnableModel, MODEL_o183, FALSE) + CaseEq(ANIM_Kolorado_Run) + Set(LVarD, Ref(N(EVS_WhaleState_Run))) + Call(EnableModel, MODEL_o170, FALSE) + Call(EnableModel, MODEL_o183, FALSE) + CaseEq(ANIM_Kolorado_Panic) + Set(LVarD, Ref(N(D_80242474_866FB4))) + Call(EnableModel, MODEL_o170, FALSE) + Call(EnableModel, MODEL_o183, FALSE) + CaseEq(ANIM_Kolorado_Talk) + Set(LVarD, Ref(N(EVS_WhaleState_Talk))) + CaseEq(ANIM_Kolorado_Shout) + Set(LVarD, Ref(N(EVS_WhaleState_Shout))) + CaseEq(ANIM_Kolorado_TalkSad) + Set(LVarD, Ref(N(EVS_WhaleState_TalkSad))) + CaseEq(ANIM_Kolorado_HurtStill) + Set(LVarD, Ref(N(EVS_WhaleState_HurtStill))) + EndSwitch + EndIf + ExecWait(LVarD) + Add(LVarC, 1) + IfGt(LVarC, 1000) + Set(LVarC, 0) + EndIf + Goto(0) + EndThread + Return + End }; EvtScript N(EVS_80243380) = { - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_IdleSad) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_IdleSad) + Return + End }; diff --git a/src/world/area_mac/mac_06/mac_06_3_npc.c b/src/world/area_mac/mac_06/mac_06_3_npc.c index f7f4758a65c..980dd6c610a 100644 --- a/src/world/area_mac/mac_06/mac_06_3_npc.c +++ b/src/world/area_mac/mac_06/mac_06_3_npc.c @@ -182,43 +182,43 @@ API_CALLABLE(N(func_802412AC_865DEC)) { } EvtScript N(EVS_NpcIdle_Whale) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, mac_06_ENTRY_0) - EVT_CALL(GetNpcPos, NPC_Whale, LVar0, LVar1, LVar2) - EVT_CALL(NpcFlyTo, NPC_Whale, 50, LVar1, 500, 120, 0, EASING_SIN_OUT) - EVT_THREAD - EVT_CALL(N(func_80241098_865BD8)) - EVT_END_THREAD - EVT_WAIT(150) - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Idle) - EVT_CALL(NpcFlyTo, NPC_Whale, 500, LVar1, 500, 120, 0, EASING_COS_IN) - EVT_IF_EQ(GF_StartedChapter5, FALSE) - EVT_SET(GF_StartedChapter5, TRUE) - EVT_CALL(FadeOutMusic, 0, 1500) - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_22"), kmr_22_ENTRY_5, TRANSITION_BEGIN_OR_END_CHAPTER) - EVT_ELSE - EVT_CALL(GotoMap, EVT_PTR("jan_00"), jan_00_ENTRY_0) - EVT_END_IF - EVT_ELSE - EVT_CALL(GetNpcPos, NPC_Whale, LVar0, LVar1, LVar2) - EVT_IF_GE(GB_StoryProgress, STORY_CH5_SUSHIE_JOINED_PARTY) - EVT_IF_EQ(GF_MAC01_Defeated_JrTroopa4, FALSE) - EVT_CALL(NpcFlyTo, NPC_Whale, -550, LVar1, 500, 240, 0, EASING_LINEAR) - EVT_CALL(SetNpcVar, NPC_JrTroopa, 0, 1) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(NpcFlyTo, NPC_Whale, -70, LVar1, 500, 120, 0, EASING_SIN_OUT) - EVT_THREAD - EVT_CALL(N(func_80241098_865BD8)) - EVT_END_THREAD - EVT_WAIT(150) - EVT_CALL(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Idle) - EVT_CALL(NpcFlyTo, NPC_Whale, -500, LVar1, 500, 120, 0, EASING_COS_IN) - EVT_CALL(GotoMap, EVT_PTR("mac_05"), mac_05_ENTRY_1) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, mac_06_ENTRY_0) + Call(GetNpcPos, NPC_Whale, LVar0, LVar1, LVar2) + Call(NpcFlyTo, NPC_Whale, 50, LVar1, 500, 120, 0, EASING_SIN_OUT) + Thread + Call(N(func_80241098_865BD8)) + EndThread + Wait(150) + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Idle) + Call(NpcFlyTo, NPC_Whale, 500, LVar1, 500, 120, 0, EASING_COS_IN) + IfEq(GF_StartedChapter5, FALSE) + Set(GF_StartedChapter5, TRUE) + Call(FadeOutMusic, 0, 1500) + Call(GotoMapSpecial, Ref("kmr_22"), kmr_22_ENTRY_5, TRANSITION_BEGIN_OR_END_CHAPTER) + Else + Call(GotoMap, Ref("jan_00"), jan_00_ENTRY_0) + EndIf + Else + Call(GetNpcPos, NPC_Whale, LVar0, LVar1, LVar2) + IfGe(GB_StoryProgress, STORY_CH5_SUSHIE_JOINED_PARTY) + IfEq(GF_MAC01_Defeated_JrTroopa4, FALSE) + Call(NpcFlyTo, NPC_Whale, -550, LVar1, 500, 240, 0, EASING_LINEAR) + Call(SetNpcVar, NPC_JrTroopa, 0, 1) + Return + EndIf + EndIf + Call(NpcFlyTo, NPC_Whale, -70, LVar1, 500, 120, 0, EASING_SIN_OUT) + Thread + Call(N(func_80241098_865BD8)) + EndThread + Wait(150) + Call(SetNpcAnimation, NPC_Whale, ANIM_Kolorado_Idle) + Call(NpcFlyTo, NPC_Whale, -500, LVar1, 500, 120, 0, EASING_COS_IN) + Call(GotoMap, Ref("mac_05"), mac_05_ENTRY_1) + EndIf + Return + End }; API_CALLABLE(N(SeagullYawInterp)) { @@ -278,68 +278,68 @@ API_CALLABLE(N(MakeJrTroopaBubbles)) { } EvtScript N(EVS_NpcInit_Whale) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_NO_SPRITE, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, mac_06_ENTRY_0) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_Kolorado, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_CALL(SetNpcPos, NPC_SELF, -300, 0, 500) - EVT_ELSE - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_Kolorado, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_CALL(SetNpcPos, NPC_SELF, 300, 0, 500) - EVT_END_IF - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Whale))) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_THREAD - EVT_CALL(N(func_80240E80_8659C0), 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(func_80240E80_8659C0), 1) - EVT_END_THREAD - EVT_THREAD - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_REACHED_LAVA_LAVA_ISLAND) - EVT_CALL(N(func_80240E80_8659C0), 2) - EVT_CASE_EQ(STORY_CH5_TRADED_VASE_FOR_SEED) - EVT_CALL(N(func_80240E80_8659C0), 2) - EVT_END_SWITCH - EVT_END_THREAD - EVT_IF_LT(GB_StoryProgress, STORY_CH5_REACHED_LAVA_LAVA_ISLAND) - EVT_RETURN - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH5_SUSHIE_JOINED_PARTY) - EVT_IF_EQ(GF_MAC01_Defeated_JrTroopa4, FALSE) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_THREAD - EVT_CALL(N(func_80241290_865DD0)) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, mac_06_ENTRY_0) - EVT_CALL(GotoMap, EVT_PTR("jan_00"), jan_00_ENTRY_0) - EVT_ELSE - EVT_CALL(GotoMap, EVT_PTR("mac_05"), mac_05_ENTRY_1) - EVT_END_IF - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_NO_SPRITE, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE) + Call(GetEntryID, LVar0) + IfEq(LVar0, mac_06_ENTRY_0) + Call(InterpPlayerYaw, 90, 0) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + Call(InterpNpcYaw, NPC_Kolorado, 90, 0) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Call(SetNpcPos, NPC_SELF, -300, 0, 500) + Else + Call(InterpPlayerYaw, 270, 0) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + Call(InterpNpcYaw, NPC_Kolorado, 270, 0) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Call(SetNpcPos, NPC_SELF, 300, 0, 500) + EndIf + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Whale))) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Thread + Call(N(func_80240E80_8659C0), 0) + EndThread + Thread + Call(N(func_80240E80_8659C0), 1) + EndThread + Thread + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_REACHED_LAVA_LAVA_ISLAND) + Call(N(func_80240E80_8659C0), 2) + CaseEq(STORY_CH5_TRADED_VASE_FOR_SEED) + Call(N(func_80240E80_8659C0), 2) + EndSwitch + EndThread + IfLt(GB_StoryProgress, STORY_CH5_REACHED_LAVA_LAVA_ISLAND) + Return + EndIf + IfGe(GB_StoryProgress, STORY_CH5_SUSHIE_JOINED_PARTY) + IfEq(GF_MAC01_Defeated_JrTroopa4, FALSE) + Return + EndIf + EndIf + Thread + Call(N(func_80241290_865DD0)) + Call(GetEntryID, LVar0) + IfEq(LVar0, mac_06_ENTRY_0) + Call(GotoMap, Ref("jan_00"), jan_00_ENTRY_0) + Else + Call(GotoMap, Ref("mac_05"), mac_05_ENTRY_1) + EndIf + EndThread + Return + End }; EvtScript N(EVS_NpcInit_Kolorado) = { - EVT_RETURN - EVT_END + Return + End }; Vec3f N(FlightPath)[] = { @@ -360,153 +360,153 @@ Vec3f N(FlightPath)[] = { }; EvtScript N(EVS_FlyingGull) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(CloneModel, MODEL_hontai, CLONED_MODEL_GULL) - EVT_SET(LFlag0, TRUE) - EVT_SET(LFlag1, FALSE) - EVT_SETF(LVar7, 0) - EVT_LABEL(10) - EVT_CALL(LoadPath, 500, EVT_PTR(N(FlightPath)), ARRAY_COUNT(N(FlightPath)), EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(TranslateModel, MODEL_hontai, LVar1, LVar2, LVar3) - EVT_SETF(LVar8, LVar2) - EVT_MULF(LVar8, -1) - EVT_CALL(TranslateModel, CLONED_MODEL_GULL, LVar1, LVar8, LVar3) - EVT_CALL(N(SeagullYawInterp)) - EVT_CALL(RotateModel, MODEL_hontai, LVar7, 0, 1, 0) - EVT_CALL(RotateModel, CLONED_MODEL_GULL, LVar7, 0, 1, 0) - EVT_CALL(RotateModel, CLONED_MODEL_GULL, 180, 0, 0, 1) - EVT_SET(LVar4, LVar1) - EVT_SET(LVar5, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_GOTO(10) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(CloneModel, MODEL_hontai, CLONED_MODEL_GULL) + Set(LFlag0, TRUE) + Set(LFlag1, FALSE) + SetF(LVar7, 0) + Label(10) + Call(LoadPath, 500, Ref(N(FlightPath)), ARRAY_COUNT(N(FlightPath)), EASING_LINEAR) + Label(0) + Call(GetNextPathPos) + Call(TranslateModel, MODEL_hontai, LVar1, LVar2, LVar3) + SetF(LVar8, LVar2) + MulF(LVar8, -1) + Call(TranslateModel, CLONED_MODEL_GULL, LVar1, LVar8, LVar3) + Call(N(SeagullYawInterp)) + Call(RotateModel, MODEL_hontai, LVar7, 0, 1, 0) + Call(RotateModel, CLONED_MODEL_GULL, LVar7, 0, 1, 0) + Call(RotateModel, CLONED_MODEL_GULL, 180, 0, 0, 1) + Set(LVar4, LVar1) + Set(LVar5, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(0) + EndIf + Goto(10) + Return + End }; EvtScript N(EVS_UnusedGull) = { - EVT_CALL(CloneModel, MODEL_hontai, LVar0) - EVT_SET(LVarF, LVar0) - EVT_SET(LFlag0, TRUE) - EVT_SET(LFlag1, FALSE) - EVT_SETF(LVar7, 0) - EVT_SET(LVar8, 0) - EVT_SET(LVar9, 0) - EVT_SET(LVarA, 0) - EVT_CALL(RandInt, 200, LVar1) - EVT_ADD(LVar0, -100) - EVT_CALL(RandInt, 50, LVar2) - EVT_ADD(LVar0, 50) - EVT_CALL(RandInt, 200, LVar3) - EVT_ADD(LVar0, -100) - EVT_LABEL(10) - EVT_LABEL(0) - EVT_SET(LVarE, LVarF) - EVT_IF_EQ(LVarE, CLONED_MODEL_UNUSED) - EVT_SET(LVarE, 22) - EVT_ELSE - EVT_ADD(LVarE, -1) - EVT_END_IF - EVT_CALL(N(func_802412AC_865DEC), LVarE, MV_Unk_00, MV_Unk_01, MV_Unk_02) - EVT_SETF(LVar0, MV_Unk_00) - EVT_SUBF(LVar0, LVar1) - EVT_IF_LT(LVar0, 0) - EVT_ADDF(LVar8, -1) - EVT_ELSE - EVT_ADDF(LVar8, 1) - EVT_END_IF - EVT_IF_LE(LVar8, -10) - EVT_SETF(LVar8, -10) - EVT_END_IF - EVT_IF_GE(LVar8, 10) - EVT_SETF(LVar8, 10) - EVT_END_IF - EVT_ADDF(LVar1, LVar8) - EVT_SETF(LVar0, MV_Unk_01) - EVT_SUBF(LVar0, LVar2) - EVT_IF_LT(LVar0, 0) - EVT_ADDF(LVar9, -1) - EVT_ELSE - EVT_ADDF(LVar9, 1) - EVT_END_IF - EVT_IF_LE(LVar9, -10) - EVT_SETF(LVar9, -10) - EVT_END_IF - EVT_IF_GE(LVar9, 10) - EVT_SETF(LVar9, 10) - EVT_END_IF - EVT_ADDF(LVar2, LVar9) - EVT_SETF(LVar0, MV_Unk_02) - EVT_SUBF(LVar0, LVar3) - EVT_IF_LT(LVar0, 0) - EVT_ADDF(LVarA, -1) - EVT_ELSE - EVT_ADDF(LVarA, 1) - EVT_END_IF - EVT_IF_LE(LVarA, -10) - EVT_SETF(LVarA, -10) - EVT_END_IF - EVT_IF_GE(LVarA, 10) - EVT_SETF(LVarA, 10) - EVT_END_IF - EVT_ADDF(LVar3, LVarA) - EVT_CALL(TranslateModel, LVarF, LVar1, LVar2, LVar3) - EVT_CALL(N(SeagullYawInterp)) - EVT_CALL(RotateModel, LVarF, LVar7, 0, 1, 0) - EVT_SET(LVar4, LVar1) - EVT_SET(LVar5, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_GOTO(10) - EVT_RETURN - EVT_END + Call(CloneModel, MODEL_hontai, LVar0) + Set(LVarF, LVar0) + Set(LFlag0, TRUE) + Set(LFlag1, FALSE) + SetF(LVar7, 0) + Set(LVar8, 0) + Set(LVar9, 0) + Set(LVarA, 0) + Call(RandInt, 200, LVar1) + Add(LVar0, -100) + Call(RandInt, 50, LVar2) + Add(LVar0, 50) + Call(RandInt, 200, LVar3) + Add(LVar0, -100) + Label(10) + Label(0) + Set(LVarE, LVarF) + IfEq(LVarE, CLONED_MODEL_UNUSED) + Set(LVarE, 22) + Else + Add(LVarE, -1) + EndIf + Call(N(func_802412AC_865DEC), LVarE, MV_Unk_00, MV_Unk_01, MV_Unk_02) + SetF(LVar0, MV_Unk_00) + SubF(LVar0, LVar1) + IfLt(LVar0, 0) + AddF(LVar8, -1) + Else + AddF(LVar8, 1) + EndIf + IfLe(LVar8, -10) + SetF(LVar8, -10) + EndIf + IfGe(LVar8, 10) + SetF(LVar8, 10) + EndIf + AddF(LVar1, LVar8) + SetF(LVar0, MV_Unk_01) + SubF(LVar0, LVar2) + IfLt(LVar0, 0) + AddF(LVar9, -1) + Else + AddF(LVar9, 1) + EndIf + IfLe(LVar9, -10) + SetF(LVar9, -10) + EndIf + IfGe(LVar9, 10) + SetF(LVar9, 10) + EndIf + AddF(LVar2, LVar9) + SetF(LVar0, MV_Unk_02) + SubF(LVar0, LVar3) + IfLt(LVar0, 0) + AddF(LVarA, -1) + Else + AddF(LVarA, 1) + EndIf + IfLe(LVarA, -10) + SetF(LVarA, -10) + EndIf + IfGe(LVarA, 10) + SetF(LVarA, 10) + EndIf + AddF(LVar3, LVarA) + Call(TranslateModel, LVarF, LVar1, LVar2, LVar3) + Call(N(SeagullYawInterp)) + Call(RotateModel, LVarF, LVar7, 0, 1, 0) + Set(LVar4, LVar1) + Set(LVar5, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(0) + EndIf + Goto(10) + Return + End }; EvtScript N(EVS_NpcIdle_JrTroopa) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(60) - EVT_CALL(SetMusicTrack, 0, SONG_JR_TROOPA_THEME, 0, 8) - EVT_CALL(PlaySound, SOUND_LOOP_JR_TROOPA_SWIM) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_ChargeTripped) - EVT_CALL(SetNpcPos, NPC_SELF, 250, -30, 500) - EVT_WAIT(5) - EVT_CHILD_THREAD - EVT_LOOP(0) - EVT_CALL(N(MakeJrTroopaBubbles)) - EVT_WAIT(5) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(2.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, -300, 500, 0) - EVT_CALL(GotoMap, EVT_PTR("mac_05"), mac_05_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Loop(0) + Call(GetSelfVar, 0, LVar0) + IfNe(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Wait(60) + Call(SetMusicTrack, 0, SONG_JR_TROOPA_THEME, 0, 8) + Call(PlaySound, SOUND_LOOP_JR_TROOPA_SWIM) + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_ChargeTripped) + Call(SetNpcPos, NPC_SELF, 250, -30, 500) + Wait(5) + ChildThread + Loop(0) + Call(N(MakeJrTroopaBubbles)) + Wait(5) + EndLoop + EndChildThread + Call(SetNpcSpeed, NPC_SELF, Float(2.0)) + Call(NpcMoveTo, NPC_SELF, -300, 500, 0) + Call(GotoMap, Ref("mac_05"), mac_05_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_NpcInit_JrTroopa) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH5_SUSHIE_JOINED_PARTY) - EVT_IF_EQ(GF_MAC01_Defeated_JrTroopa4, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_JrTroopa))) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH5_SUSHIE_JOINED_PARTY) + IfEq(GF_MAC01_Defeated_JrTroopa4, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_JrTroopa))) + Return + EndIf + EndIf + Call(RemoveNpc, NPC_SELF) + Return + End }; NpcData N(NpcData_Whale) = { diff --git a/src/world/area_mac/machi/machi_2_main.c b/src/world/area_mac/machi/machi_2_main.c index 55d4c000351..29443c061c4 100644 --- a/src/world/area_mac/machi/machi_2_main.c +++ b/src/world/area_mac/machi/machi_2_main.c @@ -26,52 +26,52 @@ API_CALLABLE(N(CheckGameVarRanges)) { } EvtScript N(EVS_GotoMap_kmr_09_1) = { - EVT_CALL(GotoMap, EVT_PTR("kmr_09"), kmr_09_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("kmr_09"), kmr_09_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_GotoMap_nok_10_0) = { - EVT_CALL(GotoMap, EVT_PTR("nok_10"), nok_10_ENTRY_0) //@bug map does not exist! - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("nok_10"), nok_10_ENTRY_0) //@bug map does not exist! + Wait(100) + Return + End }; EvtScript N(EVS_GotoMap_iwa_00_0) = { - EVT_CALL(GotoMap, EVT_PTR("iwa_00"), iwa_00_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("iwa_00"), iwa_00_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_GotoMap_tst_01_0) = { - EVT_CALL(GotoMap, EVT_PTR("tst_01"), tst_01_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("tst_01"), tst_01_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_GotoMap_jan_00_0) = { - EVT_CALL(GotoMap, EVT_PTR("jan_00"), jan_00_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("jan_00"), jan_00_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_Main) = { - EVT_CALL(N(CheckGameVarRanges)) - EVT_SETUP_CAMERA_DEFAULT() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_GotoMap_kmr_09_1)), TRIGGER_WALL_PUSH, COLLIDER_deilitn, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_GotoMap_nok_10_0)), TRIGGER_WALL_PUSH, COLLIDER_deilitne, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_GotoMap_iwa_00_0)), TRIGGER_WALL_PUSH, COLLIDER_deilite, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_GotoMap_tst_01_0)), TRIGGER_WALL_PUSH, COLLIDER_deilitnw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_GotoMap_jan_00_0)), TRIGGER_WALL_PUSH, COLLIDER_deilitsw, 1, 0) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_GoombaKing_Init)) - EVT_EXEC(N(EVS_FlyPartnerAround)) - EVT_RETURN - EVT_END + Call(N(CheckGameVarRanges)) + SetUP_CAMERA_DEFAULT() + ExecWait(N(EVS_MakeEntities)) + BindTrigger(Ref(N(EVS_GotoMap_kmr_09_1)), TRIGGER_WALL_PUSH, COLLIDER_deilitn, 1, 0) + BindTrigger(Ref(N(EVS_GotoMap_nok_10_0)), TRIGGER_WALL_PUSH, COLLIDER_deilitne, 1, 0) + BindTrigger(Ref(N(EVS_GotoMap_iwa_00_0)), TRIGGER_WALL_PUSH, COLLIDER_deilite, 1, 0) + BindTrigger(Ref(N(EVS_GotoMap_tst_01_0)), TRIGGER_WALL_PUSH, COLLIDER_deilitnw, 1, 0) + BindTrigger(Ref(N(EVS_GotoMap_jan_00_0)), TRIGGER_WALL_PUSH, COLLIDER_deilitsw, 1, 0) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_GoombaKing_Init)) + Exec(N(EVS_FlyPartnerAround)) + Return + End }; diff --git a/src/world/area_mac/machi/machi_3_entity.c b/src/world/area_mac/machi/machi_3_entity.c index 30e8da00833..797f128c413 100644 --- a/src/world/area_mac/machi/machi_3_entity.c +++ b/src/world/area_mac/machi/machi_3_entity.c @@ -68,24 +68,24 @@ API_CALLABLE(N(func_80240114_7E74B4)) { } EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HugeBlueSwitch), 278, 0, -318, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_GreenStompSwitch), 68, 0, -92, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueSwitch), 119, 0, -166, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_RedSwitch), 169, 0, -166, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 0, 60, -326, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), 40, 60, -326, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 80, 100, -326, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 120, 104, -326, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 160, 108, -326, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 200, 110, -326, 0, ITEM_MUSHROOM, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 240, 100, -326, 0, ITEM_MUSHROOM, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_GiantChest), -206, 0, -373, 0, ITEM_SUPER_HAMMER, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), -131, 0, -359, 0, 6, MAKE_ENTITY_END) - EVT_CALL(MakeItemEntity, ITEM_MUSHROOM, 70, 0, 0, ITEM_SPAWN_MODE_KEY, 1) - EVT_CALL(MakeItemEntity, ITEM_MUSHROOM, 94, 0, 0, ITEM_SPAWN_MODE_KEY, 1) - EVT_CALL(MakeItemEntity, ITEM_MUSHROOM, 118, 0, 0, ITEM_SPAWN_MODE_KEY, 1) - EVT_CALL(MakeItemEntity, ITEM_MUSHROOM, 142, 0, 0, ITEM_SPAWN_MODE_KEY, 1) - EVT_CALL(MakeItemEntity, ITEM_MUSHROOM, 166, 0, 0, ITEM_SPAWN_MODE_KEY, 1) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HugeBlueSwitch), 278, 0, -318, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_GreenStompSwitch), 68, 0, -92, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BlueSwitch), 119, 0, -166, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_RedSwitch), 169, 0, -166, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 0, 60, -326, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_MulticoinBlock), 40, 60, -326, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), 80, 100, -326, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), 120, 104, -326, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), 160, 108, -326, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_YellowBlock), 200, 110, -326, 0, ITEM_MUSHROOM, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_YellowBlock), 240, 100, -326, 0, ITEM_MUSHROOM, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_GiantChest), -206, 0, -373, 0, ITEM_SUPER_HAMMER, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_Chest), -131, 0, -359, 0, 6, MAKE_ENTITY_END) + Call(MakeItemEntity, ITEM_MUSHROOM, 70, 0, 0, ITEM_SPAWN_MODE_KEY, 1) + Call(MakeItemEntity, ITEM_MUSHROOM, 94, 0, 0, ITEM_SPAWN_MODE_KEY, 1) + Call(MakeItemEntity, ITEM_MUSHROOM, 118, 0, 0, ITEM_SPAWN_MODE_KEY, 1) + Call(MakeItemEntity, ITEM_MUSHROOM, 142, 0, 0, ITEM_SPAWN_MODE_KEY, 1) + Call(MakeItemEntity, ITEM_MUSHROOM, 166, 0, 0, ITEM_SPAWN_MODE_KEY, 1) + Return + End }; diff --git a/src/world/area_mac/machi/machi_4_goomba_king.c b/src/world/area_mac/machi/machi_4_goomba_king.c index 4ca6887f00b..4231108ef05 100644 --- a/src/world/area_mac/machi/machi_4_goomba_king.c +++ b/src/world/area_mac/machi/machi_4_goomba_king.c @@ -1,34 +1,34 @@ #include "machi.h" EvtScript N(EVS_GoombaKing_Init) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcAuxAI_GoombaKing) = { - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_RETURN - EVT_END + Call(SetNpcScale, NPC_SELF, Float(0.5), Float(0.5), Float(0.5)) + Return + End }; EvtScript N(EVS_NpcInteract_GoombaKing) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcAI_GoombaKing) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcHit_GoombaKing) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcDefeat_GoombaKing) = { - EVT_RETURN - EVT_END + Return + End }; NpcSettings N(NpcSettings_GoombaKing) = { diff --git a/src/world/area_mac/machi/machi_5_npc.c b/src/world/area_mac/machi/machi_5_npc.c index 2b435d9e7f9..0afd692f79d 100644 --- a/src/world/area_mac/machi/machi_5_npc.c +++ b/src/world/area_mac/machi/machi_5_npc.c @@ -110,108 +110,108 @@ API_CALLABLE(N(SetupChapter2)) { } EvtScript N(EVS_NpcAuxAI_Goompa) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_802411A8) = { - EVT_CALL(N(func_802401B0_7E7550)) - EVT_LABEL(0) - EVT_CALL(N(func_802402EC_7E768C)) - EVT_CALL(N(func_80240318_7E76B8)) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(N(func_802401B0_7E7550)) + Label(0) + Call(N(func_802402EC_7E768C)) + Call(N(func_80240318_7E76B8)) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_NpcInteract_Goompa) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcHit_Goompa) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcDefeat_Goompa) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcAI_Unused) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcAuxAI_Unused) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInteract_Unused) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcHit_Unused) = { - EVT_CALL(StartBattle) - EVT_RETURN - EVT_END + Call(StartBattle) + Return + End }; EvtScript N(EVS_NpcDefeat_Unused) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_StarRod) = { - EVT_CALL(BringPartnerOut, PARTNER_PARAKARRY) - EVT_WAIT(200) - EVT_CALL(PutPartnerAway) - EVT_RETURN - EVT_END + Call(BringPartnerOut, PARTNER_PARAKARRY) + Wait(200) + Call(PutPartnerAway) + Return + End }; EvtScript N(EVS_NpcAI_StarRod) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcAuxAI_StarRod) = { - EVT_CALL(N(SetupStarRodPaletteCycling)) - EVT_RETURN - EVT_END + Call(N(SetupStarRodPaletteCycling)) + Return + End }; EvtScript N(EVS_NpcInteract_Koopa) = { - EVT_CALL(N(SetupChapter1)) - EVT_RETURN - EVT_END + Call(N(SetupChapter1)) + Return + End }; EvtScript N(EVS_NpcAI_Koopa) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInteract_Kolorado) = { - EVT_CALL(N(SetupChapter2)) - EVT_RETURN - EVT_END + Call(N(SetupChapter2)) + Return + End }; EvtScript N(EVS_NpcAI_Kolorado) = { - EVT_RETURN - EVT_END + Return + End }; NpcSettings N(NpcSettings_StarRod) = { diff --git a/src/world/area_mac/machi/machi_6_misstar.c b/src/world/area_mac/machi/machi_6_misstar.c index 78d4b721391..7e4e2253c2c 100644 --- a/src/world/area_mac/machi/machi_6_misstar.c +++ b/src/world/area_mac/machi/machi_6_misstar.c @@ -40,59 +40,59 @@ API_CALLABLE(N(MisstarFlyAway)) { } EvtScript N(EVS_NpcAuxAI_Misstar) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcAux_Misstar) = { - EVT_LABEL(0) - EVT_SETF(LVar0, EVT_FLOAT(40.0)) - EVT_LOOP(20) - EVT_ADDF(LVar0, EVT_FLOAT(4.0)) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(20) - EVT_ADDF(LVar0, EVT_FLOAT(-4.0)) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + SetF(LVar0, Float(40.0)) + Loop(20) + AddF(LVar0, Float(4.0)) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + EndLoop + Loop(20) + AddF(LVar0, Float(-4.0)) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + EndLoop + Goto(0) + Return + End }; EvtScript N(EVS_Misstar_Bobbing) = { - EVT_LABEL(0) - EVT_LOOP(10) - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Loop(10) + Loop(10) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 1) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Loop(10) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 1) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndLoop + Goto(0) + Return + End }; EvtScript N(EVS_NpcAI_Misstar) = { - EVT_EXEC_GET_TID(N(EVS_Misstar_Bobbing), LVarA) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(AwaitPlayerApproach, LVar0, LVar2, 60) - EVT_CALL(N(MisstarFlyAway)) - EVT_KILL_THREAD(LVarA) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + ExecGetTID(N(EVS_Misstar_Bobbing), LVarA) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(AwaitPlayerApproach, LVar0, LVar2, 60) + Call(N(MisstarFlyAway)) + KillThread(LVarA) + Call(RemoveNpc, NPC_SELF) + Return + End }; NpcSettings N(NpcSettings_Misstar) = { diff --git a/src/world/area_mac/machi/machi_7_partner.c b/src/world/area_mac/machi/machi_7_partner.c index a07de6383c3..b6bb895f477 100644 --- a/src/world/area_mac/machi/machi_7_partner.c +++ b/src/world/area_mac/machi/machi_7_partner.c @@ -19,34 +19,34 @@ Vec3f N(FlightPath)[] = { }; EvtScript N(EVS_ChasePartner) = { - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Run) - EVT_LABEL(0) - EVT_CALL(GetAngleToNPC, NPC_PARTNER, LVar0) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_CALL(AddVectorPolar, LVar1, LVar3, EVT_FLOAT(4.0), LVar0) - EVT_CALL(InterpPlayerYaw, LVar0, 0) - EVT_CALL(SetPlayerPos, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(SetPlayerAnimation, ANIM_Mario1_Run) + Label(0) + Call(GetAngleToNPC, NPC_PARTNER, LVar0) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + Call(AddVectorPolar, LVar1, LVar3, Float(4.0), LVar0) + Call(InterpPlayerYaw, LVar0, 0) + Call(SetPlayerPos, LVar1, LVar2, LVar3) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_FlyPartnerAround) = { - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_FLYING, TRUE) - EVT_CALL(EnableNpcBlur, NPC_PARTNER, TRUE) - EVT_LABEL(10) - EVT_CALL(LoadPath, 500, EVT_PTR(N(FlightPath)), ARRAY_COUNT(N(FlightPath)), EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_GOTO(10) - EVT_RETURN - EVT_END + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_FLYING, TRUE) + Call(EnableNpcBlur, NPC_PARTNER, TRUE) + Label(10) + Call(LoadPath, 500, Ref(N(FlightPath)), ARRAY_COUNT(N(FlightPath)), EASING_LINEAR) + Label(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(0) + EndIf + Goto(10) + Return + End }; diff --git a/src/world/area_mgm/mgm_00/mgm_00_1_main.c b/src/world/area_mgm/mgm_00/mgm_00_1_main.c index 68f2f32bf1a..27394974938 100644 --- a/src/world/area_mgm/mgm_00/mgm_00_1_main.c +++ b/src/world/area_mgm/mgm_00/mgm_00_1_main.c @@ -2,106 +2,106 @@ // probably a blank EVS_SetupMusic EvtScript N(D_80241850_E0FFF0) = { - EVT_RETURN - EVT_END + Return + End }; #include "world/common/entity/Pipe.inc.c" EvtScript N(EVS_GotoMap_ToadTown) = { - EVT_CALL(GotoMap, EVT_PTR("mac_03"), mac_03_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("mac_03"), mac_03_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_OnEnterPipe_ToadTown) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_SET(LVarA, mgm_00_ENTRY_0) - EVT_SET(LVarB, COLLIDER_deili1) - EVT_SET(LVarC, EVT_PTR(N(EVS_GotoMap_ToadTown))) - EVT_EXEC_WAIT(N(EVS_Pipe_ExitHorizontal)) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Set(LVarA, mgm_00_ENTRY_0) + Set(LVarB, COLLIDER_deili1) + Set(LVarC, Ref(N(EVS_GotoMap_ToadTown))) + ExecWait(N(EVS_Pipe_ExitHorizontal)) + Return + End }; EvtScript N(EVS_GotoMap_JumpAttack) = { - EVT_CALL(GotoMap, EVT_PTR("mgm_01"), mgm_01_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("mgm_01"), mgm_01_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_OnEnterPipe_JumpAttack) = EVT_EXIT_PIPE_VERTICAL( mgm_00_ENTRY_1, COLLIDER_deili2, N(EVS_GotoMap_JumpAttack)); EvtScript N(EVS_GotoMap_SmashAttack) = { - EVT_CALL(GotoMap, EVT_PTR("mgm_02"), mgm_02_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("mgm_02"), mgm_02_ENTRY_0) + Wait(100) + Return + End }; MAP_RODATA_PAD(1, unk); EvtScript N(EVS_OnEnterPipe_SmashAttack) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_SET(LVarA, mgm_00_ENTRY_2) - EVT_SET(LVarB, COLLIDER_deili3) - EVT_SET(LVarC, EVT_PTR(N(EVS_GotoMap_SmashAttack))) - EVT_EXEC_WAIT(N(EVS_Pipe_ExitVertical)) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Set(LVarA, mgm_00_ENTRY_2) + Set(LVarB, COLLIDER_deili3) + Set(LVarC, Ref(N(EVS_GotoMap_SmashAttack))) + ExecWait(N(EVS_Pipe_ExitVertical)) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnEnterPipe_ToadTown)), TRIGGER_WALL_PUSH, COLLIDER_deili1, 1, 0) - EVT_IF_EQ(GF_MGM_Unlocked_JumpAttack, TRUE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnEnterPipe_JumpAttack)), TRIGGER_FLOOR_TOUCH, COLLIDER_deili2, 1, 0) - EVT_END_IF - EVT_IF_EQ(GF_MGM_Unlocked_SmashAttack, TRUE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnEnterPipe_SmashAttack)), TRIGGER_FLOOR_TOUCH, COLLIDER_deili3, 1, 0) - EVT_END_IF - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_OnEnterPipe_ToadTown)), TRIGGER_WALL_PUSH, COLLIDER_deili1, 1, 0) + IfEq(GF_MGM_Unlocked_JumpAttack, TRUE) + BindTrigger(Ref(N(EVS_OnEnterPipe_JumpAttack)), TRIGGER_FLOOR_TOUCH, COLLIDER_deili2, 1, 0) + EndIf + IfEq(GF_MGM_Unlocked_SmashAttack, TRUE) + BindTrigger(Ref(N(EVS_OnEnterPipe_SmashAttack)), TRIGGER_FLOOR_TOUCH, COLLIDER_deili3, 1, 0) + EndIf + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_IF_EQ(GF_MGM_Unlocked_JumpAttack, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o5, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deili2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_o5, FALSE) - EVT_END_IF - EVT_IF_EQ(GF_MGM_Unlocked_SmashAttack, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o9, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deili3, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_o9, FALSE) - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(mgm_00_ENTRY_0) - EVT_SET(LVarA, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_SET(LVarB, 1) - EVT_EXEC(N(EVS_Pipe_EnterHorizontal)) - EVT_CASE_EQ(mgm_00_ENTRY_1) - EVT_SET(LVarA, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(N(EVS_Pipe_EnterVertical)) - EVT_CASE_EQ(mgm_00_ENTRY_2) - EVT_SET(LVarA, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(N(EVS_Pipe_EnterVertical)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + IfEq(GF_MGM_Unlocked_JumpAttack, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o5, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deili2, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_o5, FALSE) + EndIf + IfEq(GF_MGM_Unlocked_SmashAttack, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o9, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deili3, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_o9, FALSE) + EndIf + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(mgm_00_ENTRY_0) + Set(LVarA, Ref(N(EVS_BindExitTriggers))) + Set(LVarB, 1) + Exec(N(EVS_Pipe_EnterHorizontal)) + CaseEq(mgm_00_ENTRY_1) + Set(LVarA, Ref(N(EVS_BindExitTriggers))) + Exec(N(EVS_Pipe_EnterVertical)) + CaseEq(mgm_00_ENTRY_2) + Set(LVarA, Ref(N(EVS_BindExitTriggers))) + Exec(N(EVS_Pipe_EnterVertical)) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SETUP_CAMERA_NO_LEAD() - EVT_EXEC_WAIT(N(D_80243C40_E123E0)) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(D_80241850_E0FFF0)) - EVT_EXEC(N(EVS_BindInteractTriggers)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + SetUP_CAMERA_NO_LEAD() + ExecWait(N(D_80243C40_E123E0)) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(D_80241850_E0FFF0)) + Exec(N(EVS_BindInteractTriggers)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_mgm/mgm_00/mgm_00_2_npc.c b/src/world/area_mgm/mgm_00/mgm_00_2_npc.c index e4c114bf896..8e33cf369aa 100644 --- a/src/world/area_mgm/mgm_00/mgm_00_2_npc.c +++ b/src/world/area_mgm/mgm_00/mgm_00_2_npc.c @@ -17,152 +17,152 @@ API_CALLABLE(N(GetAvailableGamesCount)) { } EvtScript N(EVS_RaisePipe_JumpAttack) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -25, 0, -155) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -25, 0, -155) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.2)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(5) - EVT_CALL(PlaySoundWithVolume, SOUND_GROW, 0) - EVT_CALL(EnableModel, MODEL_o5, TRUE) - EVT_SET(LVar0, -30) - EVT_LOOP(30) - EVT_ADD(LVar0, 1) - EVT_CALL(TranslateModel, MODEL_o5, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(TranslateModel, MODEL_o5, 0, 0, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o5, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deili2, COLLIDER_FLAGS_UPPER_MASK) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnEnterPipe_JumpAttack)), TRIGGER_FLOOR_TOUCH, COLLIDER_deili2, 1, 0) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, -25, 0, -155) + Call(SetPanTarget, CAM_DEFAULT, -25, 0, -155) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.2)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(5) + Call(PlaySoundWithVolume, SOUND_GROW, 0) + Call(EnableModel, MODEL_o5, TRUE) + Set(LVar0, -30) + Loop(30) + Add(LVar0, 1) + Call(TranslateModel, MODEL_o5, 0, LVar0, 0) + Wait(1) + EndLoop + Call(TranslateModel, MODEL_o5, 0, 0, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o5, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deili2, COLLIDER_FLAGS_UPPER_MASK) + BindTrigger(Ref(N(EVS_OnEnterPipe_JumpAttack)), TRIGGER_FLOOR_TOUCH, COLLIDER_deili2, 1, 0) + Wait(1) + Return + End }; EvtScript N(EVS_RaisePipe_SmashAttack) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 95, 0, -155) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 95, 0, -155) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.2)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(5) - EVT_CALL(PlaySoundWithVolume, SOUND_GROW, 0) - EVT_CALL(EnableModel, MODEL_o9, TRUE) - EVT_SET(LVar0, -30) - EVT_LOOP(30) - EVT_ADD(LVar0, 1) - EVT_CALL(TranslateModel, MODEL_o9, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(TranslateModel, MODEL_o9, 0, 0, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o9, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deili3, COLLIDER_FLAGS_UPPER_MASK) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnEnterPipe_SmashAttack)), TRIGGER_FLOOR_TOUCH, COLLIDER_deili3, 1, 0) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, 95, 0, -155) + Call(SetPanTarget, CAM_DEFAULT, 95, 0, -155) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.2)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(5) + Call(PlaySoundWithVolume, SOUND_GROW, 0) + Call(EnableModel, MODEL_o9, TRUE) + Set(LVar0, -30) + Loop(30) + Add(LVar0, 1) + Call(TranslateModel, MODEL_o9, 0, LVar0, 0) + Wait(1) + EndLoop + Call(TranslateModel, MODEL_o9, 0, 0, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o9, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deili3, COLLIDER_FLAGS_UPPER_MASK) + BindTrigger(Ref(N(EVS_OnEnterPipe_SmashAttack)), TRIGGER_FLOOR_TOUCH, COLLIDER_deili3, 1, 0) + Wait(1) + Return + End }; EvtScript N(EVS_SetCamera_RaisePipe) = { - EVT_WAIT(10) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, 0, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(450.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.2)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_RETURN - EVT_END + Wait(10) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, 0, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(450.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.2)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Return + End }; EvtScript N(EVS_NpcInteract_RedToad) = { - EVT_CALL(N(GetAvailableGamesCount)) - EVT_SET(LVar6, 0) - EVT_SET(LVar7, 0) - EVT_IF_EQ(GF_MGM_Unlocked_JumpAttack, FALSE) - EVT_SWITCH(LVar5) - EVT_CASE_EQ(0) - EVT_CASE_EQ(1) - EVT_SET(LVar6, 1) - EVT_SET(LVar7, 1) - EVT_CASE_EQ(2) - EVT_SET(LVar6, 1) - EVT_SET(LVar7, 3) - EVT_END_SWITCH - EVT_ELSE - EVT_IF_EQ(GF_MGM_Unlocked_SmashAttack, FALSE) - EVT_IF_LE(LVar5, 1) - EVT_SET(LVar6, 2) - EVT_ELSE - EVT_SET(LVar6, 3) - EVT_SET(LVar7, 2) - EVT_END_IF - EVT_ELSE - EVT_SET(LVar6, 4) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(GF_MGM00_Met_Receptionist, FALSE) - EVT_SET(GF_MGM00_Met_Receptionist, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0012) - EVT_ELSE - EVT_SWITCH(LVar6) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0013) - EVT_RETURN - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0014) - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0015) - EVT_RETURN - EVT_CASE_EQ(3) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0016) - EVT_CASE_EQ(4) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0017) - EVT_RETURN - EVT_END_SWITCH - EVT_END_IF - EVT_SWITCH(LVar7) - EVT_CASE_EQ(0) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 5) - EVT_CASE_EQ(1) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0018) - EVT_CASE_EQ(2) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0019) - EVT_CASE_EQ(3) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_001A) - EVT_END_SWITCH - EVT_SWITCH(LVar7) - EVT_CASE_EQ(0) - EVT_CASE_EQ(1) - EVT_SET(GF_MGM_Unlocked_JumpAttack, TRUE) - EVT_EXEC_WAIT(N(EVS_RaisePipe_JumpAttack)) - EVT_EXEC_WAIT(N(EVS_SetCamera_RaisePipe)) - EVT_CASE_EQ(2) - EVT_SET(GF_MGM_Unlocked_SmashAttack, TRUE) - EVT_EXEC_WAIT(N(EVS_RaisePipe_SmashAttack)) - EVT_EXEC_WAIT(N(EVS_SetCamera_RaisePipe)) - EVT_CASE_EQ(3) - EVT_SET(GF_MGM_Unlocked_JumpAttack, TRUE) - EVT_SET(GF_MGM_Unlocked_SmashAttack, TRUE) - EVT_EXEC_WAIT(N(EVS_RaisePipe_JumpAttack)) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_RaisePipe_SmashAttack)) - EVT_EXEC_WAIT(N(EVS_SetCamera_RaisePipe)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(N(GetAvailableGamesCount)) + Set(LVar6, 0) + Set(LVar7, 0) + IfEq(GF_MGM_Unlocked_JumpAttack, FALSE) + Switch(LVar5) + CaseEq(0) + CaseEq(1) + Set(LVar6, 1) + Set(LVar7, 1) + CaseEq(2) + Set(LVar6, 1) + Set(LVar7, 3) + EndSwitch + Else + IfEq(GF_MGM_Unlocked_SmashAttack, FALSE) + IfLe(LVar5, 1) + Set(LVar6, 2) + Else + Set(LVar6, 3) + Set(LVar7, 2) + EndIf + Else + Set(LVar6, 4) + EndIf + EndIf + IfEq(GF_MGM00_Met_Receptionist, FALSE) + Set(GF_MGM00_Met_Receptionist, TRUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0012) + Else + Switch(LVar6) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0013) + Return + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0014) + CaseEq(2) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0015) + Return + CaseEq(3) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0016) + CaseEq(4) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0017) + Return + EndSwitch + EndIf + Switch(LVar7) + CaseEq(0) + Call(EndSpeech, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 5) + CaseEq(1) + Call(ContinueSpeech, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0018) + CaseEq(2) + Call(ContinueSpeech, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0019) + CaseEq(3) + Call(ContinueSpeech, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_001A) + EndSwitch + Switch(LVar7) + CaseEq(0) + CaseEq(1) + Set(GF_MGM_Unlocked_JumpAttack, TRUE) + ExecWait(N(EVS_RaisePipe_JumpAttack)) + ExecWait(N(EVS_SetCamera_RaisePipe)) + CaseEq(2) + Set(GF_MGM_Unlocked_SmashAttack, TRUE) + ExecWait(N(EVS_RaisePipe_SmashAttack)) + ExecWait(N(EVS_SetCamera_RaisePipe)) + CaseEq(3) + Set(GF_MGM_Unlocked_JumpAttack, TRUE) + Set(GF_MGM_Unlocked_SmashAttack, TRUE) + ExecWait(N(EVS_RaisePipe_JumpAttack)) + Wait(10) + ExecWait(N(EVS_RaisePipe_SmashAttack)) + ExecWait(N(EVS_SetCamera_RaisePipe)) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_RedToad) = { - EVT_CALL(SetNpcCollisionSize, NPC_SELF, 32, 75) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_RedToad))) - EVT_RETURN - EVT_END + Call(SetNpcCollisionSize, NPC_SELF, 32, 75) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_RedToad))) + Return + End }; NpcData N(NpcData_RedToad) = { @@ -178,31 +178,31 @@ NpcData N(NpcData_RedToad) = { }; EvtScript N(EVS_NpcInteract_GreenToad) = { - EVT_CALL(N(GetAvailableGamesCount)) - EVT_SWITCH(LVar5) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Green_Talk, ANIM_Toad_Green_Idle, 0, MSG_MGM_0025) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Green_Talk, ANIM_Toad_Green_Idle, 0, MSG_MGM_0026) - EVT_CASE_DEFAULT - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Green_Talk, ANIM_Toad_Green_Idle, 0, MSG_MGM_0027) - EVT_CALL(SetSelfVar, 0, 1) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Green_Talk, ANIM_Toad_Green_Idle, 0, MSG_MGM_0028) - EVT_CALL(SetSelfVar, 0, 0) - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(N(GetAvailableGamesCount)) + Switch(LVar5) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Green_Talk, ANIM_Toad_Green_Idle, 0, MSG_MGM_0025) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Green_Talk, ANIM_Toad_Green_Idle, 0, MSG_MGM_0026) + CaseDefault + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Green_Talk, ANIM_Toad_Green_Idle, 0, MSG_MGM_0027) + Call(SetSelfVar, 0, 1) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Green_Talk, ANIM_Toad_Green_Idle, 0, MSG_MGM_0028) + Call(SetSelfVar, 0, 0) + EndIf + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_GreenToad) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_GreenToad))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_GreenToad))) + Return + End }; NpcData N(NpcData_GreenToad) = { @@ -232,27 +232,27 @@ NpcData N(NpcData_GreenToad) = { }; EvtScript N(EVS_NpcInteract_BlueToad) = { - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_LT(25) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, MSG_MGM_0029) - EVT_CASE_LT(50) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, MSG_MGM_002A) - EVT_CASE_LT(75) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, MSG_MGM_002B) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, MSG_MGM_002C) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetSelfVar, 0, LVar0) + Switch(LVar0) + CaseLt(25) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, MSG_MGM_0029) + CaseLt(50) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, MSG_MGM_002A) + CaseLt(75) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, MSG_MGM_002B) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, MSG_MGM_002C) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_BlueToad) = { - EVT_CALL(RandInt, 100, LVar0) - EVT_CALL(SetSelfVar, 0, LVar0) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_BlueToad))) - EVT_RETURN - EVT_END + Call(RandInt, 100, LVar0) + Call(SetSelfVar, 0, LVar0) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_BlueToad))) + Return + End }; NpcData N(NpcData_BlueToad) = { diff --git a/src/world/area_mgm/mgm_00/mgm_00_3_scoreboard.c b/src/world/area_mgm/mgm_00/mgm_00_3_scoreboard.c index 9cbb544acb0..59e7f07d9ee 100644 --- a/src/world/area_mgm/mgm_00/mgm_00_3_scoreboard.c +++ b/src/world/area_mgm/mgm_00/mgm_00_3_scoreboard.c @@ -25,8 +25,8 @@ typedef struct RecordDisplayData { } RecordDisplayData; /* size = 0x18 */ EvtScript N(D_80243C40_E123E0) = { - EVT_RETURN - EVT_END + Return + End }; #if VERSION_PAL @@ -182,28 +182,28 @@ API_CALLABLE(N(UpdateRecordDisplay)) { } EvtScript N(EVS_OnInteract_JumpRecords) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(N(UpdateRecordDisplay), MINIGAME_TYPE_JUMP) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(N(UpdateRecordDisplay), MINIGAME_TYPE_JUMP) + Call(DisablePlayerInput, FALSE) + Call(DisablePlayerPhysics, FALSE) + Return + End }; EvtScript N(EVS_OnInteract_SmashRecords) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(N(UpdateRecordDisplay), MINIGAME_TYPE_SMASH) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(N(UpdateRecordDisplay), MINIGAME_TYPE_SMASH) + Call(DisablePlayerInput, FALSE) + Call(DisablePlayerPhysics, FALSE) + Return + End }; EvtScript N(EVS_BindInteractTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnInteract_JumpRecords)), TRIGGER_WALL_PRESS_A, COLLIDER_score1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnInteract_SmashRecords)), TRIGGER_WALL_PRESS_A, COLLIDER_score2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_OnInteract_JumpRecords)), TRIGGER_WALL_PRESS_A, COLLIDER_score1, 1, 0) + BindTrigger(Ref(N(EVS_OnInteract_SmashRecords)), TRIGGER_WALL_PRESS_A, COLLIDER_score2, 1, 0) + Return + End }; diff --git a/src/world/area_mgm/mgm_01/mgm_01_1_main.c b/src/world/area_mgm/mgm_01/mgm_01_1_main.c index 0c164bb8cd8..a4ae6ba03b1 100644 --- a/src/world/area_mgm/mgm_01/mgm_01_1_main.c +++ b/src/world/area_mgm/mgm_01/mgm_01_1_main.c @@ -37,42 +37,42 @@ API_CALLABLE(N(GetSpotlightPos)) { } EvtScript N(EVS_UpdateSpotlight) = { - EVT_LABEL(0) - EVT_CALL(N(GetSpotlightPos)) - EVT_CALL(TranslateModel, MODEL_o36, LVar0, 0, LVar1) - EVT_CALL(RotateModel, MODEL_o37, LVar2, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o37, LVar3, 0, 0, 1) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(N(GetSpotlightPos)) + Call(TranslateModel, MODEL_o36, LVar0, 0, LVar1) + Call(RotateModel, MODEL_o37, LVar2, 1, 0, 0) + Call(RotateModel, MODEL_o37, LVar3, 0, 0, 1) + Wait(1) + Goto(0) + Return + End }; EvtScript N(D_8024189C_E13FFC) = { - EVT_CALL(EnableModel, MODEL_o64, FALSE) - EVT_CALL(EnableModel, MODEL_o65, FALSE) - EVT_CALL(EnableModel, MODEL_o66, FALSE) - EVT_CALL(EnableModel, MODEL_o67, FALSE) - EVT_CALL(EnableModel, MODEL_o53, FALSE) - EVT_CALL(EnableModel, MODEL_o68, FALSE) - EVT_CALL(EnableModel, MODEL_o73, FALSE) - EVT_CALL(EnableModel, MODEL_o54, FALSE) - EVT_CALL(EnableModel, MODEL_o69, FALSE) - EVT_CALL(EnableModel, MODEL_o55, FALSE) - EVT_CALL(EnableModel, MODEL_o72, FALSE) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_o64, FALSE) + Call(EnableModel, MODEL_o65, FALSE) + Call(EnableModel, MODEL_o66, FALSE) + Call(EnableModel, MODEL_o67, FALSE) + Call(EnableModel, MODEL_o53, FALSE) + Call(EnableModel, MODEL_o68, FALSE) + Call(EnableModel, MODEL_o73, FALSE) + Call(EnableModel, MODEL_o54, FALSE) + Call(EnableModel, MODEL_o69, FALSE) + Call(EnableModel, MODEL_o55, FALSE) + Call(EnableModel, MODEL_o72, FALSE) + Return + End }; EvtScript N(EVS_Main) = { - EVT_CALL(SetSpriteShading, SHADING_ARN_09) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(SetRenderMode, MODEL_o36, RENDER_MODE_SURFACE_XLU_ZB_ZUPD) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_UpdateSpotlight)) - EVT_EXEC(N(D_8024189C_E13FFC)) - EVT_EXEC(N(EVS_802424A4)) - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_ARN_09) + SetUP_CAMERA_NO_LEAD() + Call(SetRenderMode, MODEL_o36, RENDER_MODE_SURFACE_XLU_ZB_ZUPD) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_UpdateSpotlight)) + Exec(N(D_8024189C_E13FFC)) + Exec(N(EVS_802424A4)) + Return + End }; diff --git a/src/world/area_mgm/mgm_01/mgm_01_2_npc.c b/src/world/area_mgm/mgm_01/mgm_01_2_npc.c index 989f3f8a802..c6c55daaaae 100644 --- a/src/world/area_mgm/mgm_01/mgm_01_2_npc.c +++ b/src/world/area_mgm/mgm_01/mgm_01_2_npc.c @@ -719,304 +719,304 @@ JumpGamePanelType N(InitialConfigurations)[4][NUM_BLOCKS] = { }; EvtScript N(EVS_ManageMinigame) = { - EVT_LABEL(0) - EVT_SET(LVarA, 0) - EVT_SET(LVarB, 0) - EVT_CALL(GetNpcVar, NPC_Toad, 4, LVarC) - EVT_LOOP(11) - EVT_CALL(N(GetPanelInfo), LVarA) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(EnableModel, LVar1, FALSE) - EVT_CALL(N(SetPanelState), LVarA, 1) - EVT_CASE_EQ(2) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(InitPanelEmergeFromBlock), LVarA) - EVT_CALL(EnableModel, LVar1, TRUE) - EVT_CALL(N(SetPanelState), LVarA, 3) - EVT_CASE_EQ(4) - EVT_IF_NE(LVar2, 3) - EVT_IF_LT(LVar3, LVarC) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_END_IF - EVT_CALL(N(InitPanelHoldAboveBlock), LVarA) - EVT_CALL(N(SetPanelState), LVarA, 5) - EVT_CASE_EQ(6) - EVT_CALL(N(InitPanelMoveToTally), LVarA) - EVT_CALL(N(SetPanelState), LVarA, 7) - EVT_CASE_EQ(8) - EVT_CALL(N(EndPanelAnimation), LVarA) - EVT_CALL(N(SetPanelState), LVarA, 9) - EVT_END_SWITCH - EVT_SWITCH(LVar0) - EVT_CASE_EQ(3) - EVT_CALL(N(UpdatePanelEmergeFromBlock), LVarA) - EVT_IF_EQ(LVar3, 1) - EVT_CALL(N(SetPanelState), LVarA, 4) - EVT_END_IF - EVT_CASE_EQ(5) - EVT_CALL(N(UpdatetPanelHoldAboveBlock), LVarA) - EVT_IF_EQ(LVar3, 1) - EVT_CALL(N(SetPanelState), LVarA, 6) - EVT_END_IF - EVT_CASE_EQ(7) - EVT_CALL(N(UpdatePanelMoveToTally), LVarA) - EVT_IF_EQ(LVar3, 1) - EVT_CALL(N(SetPanelState), LVarA, 8) - EVT_END_IF - EVT_CASE_EQ(9) - EVT_IF_EQ(LVar2, 3) - EVT_SET(LVarB, 1) - EVT_ELSE - EVT_IF_EQ(LVar3, LVarC) - EVT_SET(LVarB, 2) - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH - EVT_IF_GE(LVar0, 2) - EVT_CALL(N(GetPanelPos), LVarA) - EVT_CALL(TranslateModel, LVar1, LVar5, LVar6, LVar7) - EVT_CALL(RotateModel, LVar1, LVar8, EVT_FLOAT(0.0), EVT_FLOAT(1.0), EVT_FLOAT(0.0)) - EVT_CALL(ScaleModel, LVar1, LVar9, LVar9, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_ADD(LVarA, 1) - EVT_END_LOOP - EVT_IF_NE(LVarB, 0) - EVT_GOTO(99) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_LABEL(99) - EVT_CALL(N(EnableMenus)) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PopSong) - EVT_END_THREAD - EVT_SWITCH(LVarB) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundWithVolume, SOUND_BOMBETTE_BLAST_LV2, 0) - EVT_WAIT(10) - EVT_CALL(PlaySoundWithVolume, SOUND_BOMBETTE_BLAST_LV2, 0) - EVT_WAIT(10) - EVT_CALL(N(EndBowserPanelAnimation)) - EVT_CALL(TranslateModel, LVar1, LVar5, LVar6, LVar7) - EVT_WAIT(15) - EVT_CALL(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0034) - EVT_CASE_EQ(2) - EVT_SWITCH(LVarC) - EVT_CASE_EQ(4) - EVT_CALL(N(UpdateRecords)) - EVT_CALL(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0035) - EVT_CASE_EQ(6) - EVT_CALL(N(UpdateRecords)) - EVT_CALL(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0036) - EVT_CASE_EQ(8) - EVT_CALL(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0037) - EVT_CALL(N(DoubleScore)) - EVT_CALL(PlaySoundWithVolume, SOUND_LUCKY, 0) - EVT_WAIT(30) - EVT_CALL(N(UpdateRecords)) - EVT_CALL(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0038) - EVT_END_SWITCH - EVT_CALL(ShowCoinCounter, TRUE) - EVT_WAIT(10) - EVT_CALL(N(GiveCoinReward)) - EVT_WAIT(15) - EVT_CALL(ShowCoinCounter, FALSE) - EVT_WAIT(5) - EVT_CALL(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_003A) - EVT_END_SWITCH - EVT_WAIT(10) - EVT_CALL(N(DestroyBlockEntities)) - EVT_EXEC(N(EVS_InitializePanels)) - EVT_WAIT(1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Set(LVarA, 0) + Set(LVarB, 0) + Call(GetNpcVar, NPC_Toad, 4, LVarC) + Loop(11) + Call(N(GetPanelInfo), LVarA) + Switch(LVar0) + CaseEq(0) + Call(EnableModel, LVar1, FALSE) + Call(N(SetPanelState), LVarA, 1) + CaseEq(2) + Call(DisablePlayerInput, TRUE) + Call(N(InitPanelEmergeFromBlock), LVarA) + Call(EnableModel, LVar1, TRUE) + Call(N(SetPanelState), LVarA, 3) + CaseEq(4) + IfNe(LVar2, 3) + IfLt(LVar3, LVarC) + Call(DisablePlayerInput, FALSE) + EndIf + EndIf + Call(N(InitPanelHoldAboveBlock), LVarA) + Call(N(SetPanelState), LVarA, 5) + CaseEq(6) + Call(N(InitPanelMoveToTally), LVarA) + Call(N(SetPanelState), LVarA, 7) + CaseEq(8) + Call(N(EndPanelAnimation), LVarA) + Call(N(SetPanelState), LVarA, 9) + EndSwitch + Switch(LVar0) + CaseEq(3) + Call(N(UpdatePanelEmergeFromBlock), LVarA) + IfEq(LVar3, 1) + Call(N(SetPanelState), LVarA, 4) + EndIf + CaseEq(5) + Call(N(UpdatetPanelHoldAboveBlock), LVarA) + IfEq(LVar3, 1) + Call(N(SetPanelState), LVarA, 6) + EndIf + CaseEq(7) + Call(N(UpdatePanelMoveToTally), LVarA) + IfEq(LVar3, 1) + Call(N(SetPanelState), LVarA, 8) + EndIf + CaseEq(9) + IfEq(LVar2, 3) + Set(LVarB, 1) + Else + IfEq(LVar3, LVarC) + Set(LVarB, 2) + EndIf + EndIf + EndSwitch + IfGe(LVar0, 2) + Call(N(GetPanelPos), LVarA) + Call(TranslateModel, LVar1, LVar5, LVar6, LVar7) + Call(RotateModel, LVar1, LVar8, Float(0.0), Float(1.0), Float(0.0)) + Call(ScaleModel, LVar1, LVar9, LVar9, Float(1.0)) + EndIf + Add(LVarA, 1) + EndLoop + IfNe(LVarB, 0) + Goto(99) + EndIf + Wait(1) + Goto(0) + Label(99) + Call(N(EnableMenus)) + Thread + Wait(15) + Call(PopSong) + EndThread + Switch(LVarB) + CaseEq(1) + Call(PlaySoundWithVolume, SOUND_BOMBETTE_BLAST_LV2, 0) + Wait(10) + Call(PlaySoundWithVolume, SOUND_BOMBETTE_BLAST_LV2, 0) + Wait(10) + Call(N(EndBowserPanelAnimation)) + Call(TranslateModel, LVar1, LVar5, LVar6, LVar7) + Wait(15) + Call(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0034) + CaseEq(2) + Switch(LVarC) + CaseEq(4) + Call(N(UpdateRecords)) + Call(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0035) + CaseEq(6) + Call(N(UpdateRecords)) + Call(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0036) + CaseEq(8) + Call(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0037) + Call(N(DoubleScore)) + Call(PlaySoundWithVolume, SOUND_LUCKY, 0) + Wait(30) + Call(N(UpdateRecords)) + Call(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0038) + EndSwitch + Call(ShowCoinCounter, TRUE) + Wait(10) + Call(N(GiveCoinReward)) + Wait(15) + Call(ShowCoinCounter, FALSE) + Wait(5) + Call(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_003A) + EndSwitch + Wait(10) + Call(N(DestroyBlockEntities)) + Exec(N(EVS_InitializePanels)) + Wait(1) + Call(DisablePlayerInput, FALSE) + Goto(0) + Return + End }; EvtScript N(EVS_OnBreakBlock_0) = { - EVT_CALL(N(OnBreakBlock), 0) - EVT_RETURN - EVT_END + Call(N(OnBreakBlock), 0) + Return + End }; EvtScript N(EVS_OnBreakBlock_1) = { - EVT_CALL(N(OnBreakBlock), 1) - EVT_RETURN - EVT_END + Call(N(OnBreakBlock), 1) + Return + End }; EvtScript N(EVS_OnBreakBlock_2) = { - EVT_CALL(N(OnBreakBlock), 2) - EVT_RETURN - EVT_END + Call(N(OnBreakBlock), 2) + Return + End }; EvtScript N(EVS_OnBreakBlock_3) = { - EVT_CALL(N(OnBreakBlock), 3) - EVT_RETURN - EVT_END + Call(N(OnBreakBlock), 3) + Return + End }; EvtScript N(EVS_OnBreakBlock_4) = { - EVT_CALL(N(OnBreakBlock), 4) - EVT_RETURN - EVT_END + Call(N(OnBreakBlock), 4) + Return + End }; EvtScript N(EVS_OnBreakBlock_5) = { - EVT_CALL(N(OnBreakBlock), 5) - EVT_RETURN - EVT_END + Call(N(OnBreakBlock), 5) + Return + End }; EvtScript N(EVS_OnBreakBlock_6) = { - EVT_CALL(N(OnBreakBlock), 6) - EVT_RETURN - EVT_END + Call(N(OnBreakBlock), 6) + Return + End }; EvtScript N(EVS_OnBreakBlock_7) = { - EVT_CALL(N(OnBreakBlock), 7) - EVT_RETURN - EVT_END + Call(N(OnBreakBlock), 7) + Return + End }; EvtScript N(EVS_OnBreakBlock_8) = { - EVT_CALL(N(OnBreakBlock), 8) - EVT_RETURN - EVT_END + Call(N(OnBreakBlock), 8) + Return + End }; EvtScript N(EVS_OnBreakBlock_9) = { - EVT_CALL(N(OnBreakBlock), 9) - EVT_RETURN - EVT_END + Call(N(OnBreakBlock), 9) + Return + End }; EvtScript N(EVS_OnBreakBlock_10) = { - EVT_CALL(N(OnBreakBlock), 10) - EVT_RETURN - EVT_END + Call(N(OnBreakBlock), 10) + Return + End }; EvtScript N(EVS_InitializePanels) = { - EVT_CALL(SetNpcVar, NPC_Toad, 2, -1) - EVT_CALL(N(InitializePanels)) - EVT_RETURN - EVT_END + Call(SetNpcVar, NPC_Toad, 2, -1) + Call(N(InitializePanels)) + Return + End }; EvtScript N(EVS_802424A4) = { - EVT_CALL(N(CreateMinigame)) - EVT_EXEC(N(EVS_InitializePanels)) - EVT_EXEC(N(EVS_ManageMinigame)) - EVT_RETURN - EVT_END + Call(N(CreateMinigame)) + Exec(N(EVS_InitializePanels)) + Exec(N(EVS_ManageMinigame)) + Return + End }; EvtScript N(EVS_DestroyMinigame) = { - EVT_CALL(N(DestroyMinigame)) - EVT_RETURN - EVT_END + Call(N(DestroyMinigame)) + Return + End }; EvtScript N(EVS_NpcInteract_Toad) = { - EVT_CALL(GetSelfVar, 1, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetSelfVar, 1, 1) - EVT_END_IF - EVT_CALL(GetSelfVar, 2, LVar0) - EVT_IF_EQ(LVar0, -1) - EVT_IF_EQ(GF_MGM_Met_JumpAttack, FALSE) - EVT_CALL(N(SetMsgImgs_Panels)) - EVT_CALL(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_002D) - EVT_SET(GF_MGM_Met_JumpAttack, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_002E) - EVT_END_IF - EVT_CALL(ShowCoinCounter, TRUE) - EVT_CALL(N(GetCoinCount)) - EVT_IF_LT(LVarA, 10) - EVT_CALL(ContinueSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0039) - EVT_CALL(N(HideCoinCounter)) - EVT_WAIT(12) - EVT_EXEC(N(EVS_DestroyMinigame)) - EVT_CALL(GotoMap, EVT_PTR("mgm_00"), mgm_00_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END_IF - EVT_CALL(ShowChoice, MSG_Choice_004E) - EVT_IF_EQ(LVar0, 3) - EVT_CALL(N(HideCoinCounter)) - EVT_WAIT(5) - EVT_CALL(ContinueSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0032) - EVT_EXEC(N(EVS_DestroyMinigame)) - EVT_CALL(GotoMap, EVT_PTR("mgm_00"), mgm_00_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetSelfVar, 6, LVar1) - EVT_IF_LT(LVar1, 100) - EVT_ADD(LVar1, 1) - EVT_CALL(SetSelfVar, 6, LVar1) - EVT_END_IF - EVT_THREAD - EVT_CALL(N(TakeCoinCost)) - EVT_END_THREAD - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SetNpcVar, NPC_Toad, 4, 4) - EVT_CALL(ContinueSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_002F) - EVT_CASE_EQ(1) - EVT_CALL(SetNpcVar, NPC_Toad, 4, 6) - EVT_CALL(ContinueSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0030) - EVT_CASE_EQ(2) - EVT_CALL(SetNpcVar, NPC_Toad, 4, 8) - EVT_CALL(ContinueSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0031) - EVT_CASE_EQ(3) - EVT_END_SWITCH - EVT_CALL(N(HideCoinCounter)) - EVT_CALL(EndSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 5) - EVT_WAIT(5) - EVT_CALL(N(CreateBlockEntities)) - EVT_WAIT(10) - EVT_CALL(EndSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 5) - EVT_CALL(PushSong, SONG_PLAYROOM, 0) - EVT_WAIT(10) - EVT_CALL(EndSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 5) - EVT_CALL(N(DisableMenus)) - EVT_CALL(SetNpcVar, NPC_Toad, 3, -1) - EVT_CALL(SetNpcVar, NPC_Toad, 2, 0) - EVT_WAIT(1) - EVT_ELSE - EVT_CALL(N(SetMsgVars_BlocksRemaining)) + Call(GetSelfVar, 1, LVar0) + IfEq(LVar0, 0) + Call(SetSelfVar, 1, 1) + EndIf + Call(GetSelfVar, 2, LVar0) + IfEq(LVar0, -1) + IfEq(GF_MGM_Met_JumpAttack, FALSE) + Call(N(SetMsgImgs_Panels)) + Call(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_002D) + Set(GF_MGM_Met_JumpAttack, TRUE) + Else + Call(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_002E) + EndIf + Call(ShowCoinCounter, TRUE) + Call(N(GetCoinCount)) + IfLt(LVarA, 10) + Call(ContinueSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0039) + Call(N(HideCoinCounter)) + Wait(12) + Exec(N(EVS_DestroyMinigame)) + Call(GotoMap, Ref("mgm_00"), mgm_00_ENTRY_1) + Wait(100) + Return + EndIf + Call(ShowChoice, MSG_Choice_004E) + IfEq(LVar0, 3) + Call(N(HideCoinCounter)) + Wait(5) + Call(ContinueSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0032) + Exec(N(EVS_DestroyMinigame)) + Call(GotoMap, Ref("mgm_00"), mgm_00_ENTRY_1) + Wait(100) + Return + EndIf + Call(GetSelfVar, 6, LVar1) + IfLt(LVar1, 100) + Add(LVar1, 1) + Call(SetSelfVar, 6, LVar1) + EndIf + Thread + Call(N(TakeCoinCost)) + EndThread + Switch(LVar0) + CaseEq(0) + Call(SetNpcVar, NPC_Toad, 4, 4) + Call(ContinueSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_002F) + CaseEq(1) + Call(SetNpcVar, NPC_Toad, 4, 6) + Call(ContinueSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0030) + CaseEq(2) + Call(SetNpcVar, NPC_Toad, 4, 8) + Call(ContinueSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0031) + CaseEq(3) + EndSwitch + Call(N(HideCoinCounter)) + Call(EndSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 5) + Wait(5) + Call(N(CreateBlockEntities)) + Wait(10) + Call(EndSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 5) + Call(PushSong, SONG_PLAYROOM, 0) + Wait(10) + Call(EndSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 5) + Call(N(DisableMenus)) + Call(SetNpcVar, NPC_Toad, 3, -1) + Call(SetNpcVar, NPC_Toad, 2, 0) + Wait(1) + Else + Call(N(SetMsgVars_BlocksRemaining)) #if VERSION_PAL - EVT_IF_EQ(LocalVar(13), 1) - EVT_CALL(SpeakToPlayer, 0, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_PAL_MGM_0036) - EVT_ELSE - EVT_CALL(SpeakToPlayer, 0, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0033) - EVT_END_IF + IfEq(LocalVar(13), 1) + Call(SpeakToPlayer, 0, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_PAL_MGM_0036) + Else + Call(SpeakToPlayer, 0, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0033) + EndIf #else - EVT_CALL(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0033) + Call(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0033) #endif - EVT_END_IF - EVT_RETURN - EVT_END + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Toad) = { - EVT_CALL(SetNpcPos, NPC_SELF, 75, -1, 100) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_CALL(SetNpcVar, NPC_Toad, 2, -1) - EVT_CALL(SetNpcVar, NPC_Toad, 1, 0) - EVT_CALL(SetNpcVar, NPC_Toad, 6, 0) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad))) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, 75, -1, 100) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Call(SetNpcVar, NPC_Toad, 2, -1) + Call(SetNpcVar, NPC_Toad, 1, 0) + Call(SetNpcVar, NPC_Toad, 6, 0) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad))) + Return + End }; NpcData N(NpcData_Toad) = { diff --git a/src/world/area_mgm/mgm_01/mgm_01_3_entity.c b/src/world/area_mgm/mgm_01/mgm_01_3_entity.c index e6f812f37fb..08b1eebc7d2 100644 --- a/src/world/area_mgm/mgm_01/mgm_01_3_entity.c +++ b/src/world/area_mgm/mgm_01/mgm_01_3_entity.c @@ -2,17 +2,17 @@ #include "entity.h" EvtScript N(EVS_ReadSign_HowToPlay) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(SetMsgImgs_Panels)) - EVT_CALL(ShowMessageAtScreenPos, MSG_MGM_003B, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(N(SetMsgImgs_Panels)) + Call(ShowMessageAtScreenPos, MSG_MGM_003B, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Signpost), -55, -2, -80, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_ReadSign_HowToPlay))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Signpost), -55, -2, -80, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_ReadSign_HowToPlay))) + Return + End }; diff --git a/src/world/area_mgm/mgm_02/mgm_02_1_main.c b/src/world/area_mgm/mgm_02/mgm_02_1_main.c index 02b5d40771f..d64c3a696cd 100644 --- a/src/world/area_mgm/mgm_02/mgm_02_1_main.c +++ b/src/world/area_mgm/mgm_02/mgm_02_1_main.c @@ -1,32 +1,32 @@ #include "mgm_02.h" EvtScript N(EVS_SetupCamera) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -300, -20, 200) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 250, -20, 220) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetPlayerPos, 250, 200, 220) - EVT_CALL(SetNpcPos, NPC_PARTNER, 250, 200, 220) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_LABEL(10) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_NE(LVar1, -20) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, -300, -20, 200) + Call(SetPanTarget, CAM_DEFAULT, 250, -20, 220) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(DisablePlayerInput, TRUE) + Call(SetPlayerPos, 250, 200, 220) + Call(SetNpcPos, NPC_PARTNER, 250, 200, 220) + Call(InterpPlayerYaw, 90, 0) + Label(10) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfNe(LVar1, -20) + Wait(1) + Goto(10) + EndIf + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SETUP_CAMERA_NO_LEAD() - EVT_EXEC(N(EVS_SetupCamera)) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_Dummy)) - EVT_EXEC_WAIT(N(EVS_InitializeMinigame)) - EVT_RETURN - EVT_END + SetUP_CAMERA_NO_LEAD() + Exec(N(EVS_SetupCamera)) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_Dummy)) + ExecWait(N(EVS_InitializeMinigame)) + Return + End }; diff --git a/src/world/area_mgm/mgm_02/mgm_02_2_npc.c b/src/world/area_mgm/mgm_02/mgm_02_2_npc.c index 92ad6ac43c0..121e38d647f 100644 --- a/src/world/area_mgm/mgm_02/mgm_02_2_npc.c +++ b/src/world/area_mgm/mgm_02/mgm_02_2_npc.c @@ -1020,8 +1020,8 @@ API_CALLABLE(N(HideCoinCounter)) { } EvtScript N(EVS_Dummy) = { - EVT_RETURN - EVT_END + Return + End }; #include "world/common/npc/Toad_Stationary.inc.c" @@ -1061,743 +1061,743 @@ s32 N(pal_variable) = 0; #endif EvtScript N(EVS_CreateScoreDisplay) = { - EVT_CALL(N(CreateScoreDisplay)) - EVT_RETURN - EVT_END + Call(N(CreateScoreDisplay)) + Return + End }; EvtScript N(read_sign_instructions) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(SetMsgImgs_Panel)) - EVT_CALL(ShowMessageAtScreenPos, MSG_MGM_0046, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(N(SetMsgImgs_Panel)) + Call(ShowMessageAtScreenPos, MSG_MGM_0046, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_ShowBox) = { - EVT_CALL(EnableModel, LVar0, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, LVar1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(TranslateModel, LVar0, 0, 0, 0) - EVT_RETURN - EVT_END + Call(EnableModel, LVar0, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, LVar1, COLLIDER_FLAGS_UPPER_MASK) + Call(TranslateModel, LVar0, 0, 0, 0) + Return + End }; EvtScript N(EVS_MakeBoxAppear) = { - EVT_EXEC(N(EVS_ShowBox)) - EVT_SET(LVarA, -25) - EVT_LOOP(13) - EVT_ADD(LVarA, 2) - EVT_CALL(TranslateModel, LVar0, 0, LVarA, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(TranslateModel, LVar0, 0, 0, 0) - EVT_RETURN - EVT_END + Exec(N(EVS_ShowBox)) + Set(LVarA, -25) + Loop(13) + Add(LVarA, 2) + Call(TranslateModel, LVar0, 0, LVarA, 0) + Wait(1) + EndLoop + Call(TranslateModel, LVar0, 0, 0, 0) + Return + End }; EvtScript N(EVS_HideBox) = { - EVT_CALL(TranslateModel, LVar0, 0, 0, 0) - EVT_CALL(EnableModel, LVar0, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVar1, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Call(TranslateModel, LVar0, 0, 0, 0) + Call(EnableModel, LVar0, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVar1, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_HideBoxWithSmoke) = { - EVT_EXEC(N(EVS_HideBox)) - EVT_WAIT(1) - EVT_CALL(GetColliderCenter, LVar1) - EVT_SUB(LVar1, 5) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 1, LVar0, LVar1, LVar2) - EVT_RETURN - EVT_END + Exec(N(EVS_HideBox)) + Wait(1) + Call(GetColliderCenter, LVar1) + Sub(LVar1, 5) + PlayEffect(EFFECT_WALKING_DUST, 1, LVar0, LVar1, LVar2) + Return + End }; EvtScript N(EVS_HideAllBoxes) = { - EVT_SET(LVar0, MODEL_a1) - EVT_SET(LVar1, MODEL_a1) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_a2) - EVT_SET(LVar1, MODEL_a2) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_a3) - EVT_SET(LVar1, MODEL_a3) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_a4) - EVT_SET(LVar1, MODEL_a4) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_a5) - EVT_SET(LVar1, MODEL_a5) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_b1) - EVT_SET(LVar1, MODEL_b1) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_b2) - EVT_SET(LVar1, MODEL_b2) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_b3) - EVT_SET(LVar1, MODEL_b3) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_b4) - EVT_SET(LVar1, MODEL_b4) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_b5) - EVT_SET(LVar1, MODEL_b5) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_c1) - EVT_SET(LVar1, MODEL_c1) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_c2) - EVT_SET(LVar1, MODEL_c2) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_c3) - EVT_SET(LVar1, MODEL_c3) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_c4) - EVT_SET(LVar1, MODEL_c4) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_c5) - EVT_SET(LVar1, MODEL_c5) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_d1) - EVT_SET(LVar1, MODEL_d1) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_d2) - EVT_SET(LVar1, MODEL_d2) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_d3) - EVT_SET(LVar1, MODEL_d3) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_d4) - EVT_SET(LVar1, MODEL_d4) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_d5) - EVT_SET(LVar1, MODEL_d5) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_e1) - EVT_SET(LVar1, MODEL_e1) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_e2) - EVT_SET(LVar1, MODEL_e2) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_e3) - EVT_SET(LVar1, MODEL_e3) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_e4) - EVT_SET(LVar1, MODEL_e4) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_e5) - EVT_SET(LVar1, MODEL_e5) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_f1) - EVT_SET(LVar1, MODEL_f1) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_f2) - EVT_SET(LVar1, MODEL_f2) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_f3) - EVT_SET(LVar1, MODEL_f3) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_f4) - EVT_SET(LVar1, MODEL_f4) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_f5) - EVT_SET(LVar1, MODEL_f5) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_g1) - EVT_SET(LVar1, MODEL_g1) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_g2) - EVT_SET(LVar1, MODEL_g2) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_g3) - EVT_SET(LVar1, MODEL_g3) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_g4) - EVT_SET(LVar1, MODEL_g4) - EVT_EXEC(N(EVS_HideBox)) - EVT_SET(LVar0, MODEL_g5) - EVT_SET(LVar1, MODEL_g5) - EVT_EXEC(N(EVS_HideBox)) - EVT_RETURN - EVT_END + Set(LVar0, MODEL_a1) + Set(LVar1, MODEL_a1) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_a2) + Set(LVar1, MODEL_a2) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_a3) + Set(LVar1, MODEL_a3) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_a4) + Set(LVar1, MODEL_a4) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_a5) + Set(LVar1, MODEL_a5) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_b1) + Set(LVar1, MODEL_b1) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_b2) + Set(LVar1, MODEL_b2) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_b3) + Set(LVar1, MODEL_b3) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_b4) + Set(LVar1, MODEL_b4) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_b5) + Set(LVar1, MODEL_b5) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_c1) + Set(LVar1, MODEL_c1) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_c2) + Set(LVar1, MODEL_c2) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_c3) + Set(LVar1, MODEL_c3) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_c4) + Set(LVar1, MODEL_c4) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_c5) + Set(LVar1, MODEL_c5) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_d1) + Set(LVar1, MODEL_d1) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_d2) + Set(LVar1, MODEL_d2) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_d3) + Set(LVar1, MODEL_d3) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_d4) + Set(LVar1, MODEL_d4) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_d5) + Set(LVar1, MODEL_d5) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_e1) + Set(LVar1, MODEL_e1) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_e2) + Set(LVar1, MODEL_e2) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_e3) + Set(LVar1, MODEL_e3) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_e4) + Set(LVar1, MODEL_e4) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_e5) + Set(LVar1, MODEL_e5) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_f1) + Set(LVar1, MODEL_f1) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_f2) + Set(LVar1, MODEL_f2) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_f3) + Set(LVar1, MODEL_f3) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_f4) + Set(LVar1, MODEL_f4) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_f5) + Set(LVar1, MODEL_f5) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_g1) + Set(LVar1, MODEL_g1) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_g2) + Set(LVar1, MODEL_g2) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_g3) + Set(LVar1, MODEL_g3) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_g4) + Set(LVar1, MODEL_g4) + Exec(N(EVS_HideBox)) + Set(LVar0, MODEL_g5) + Set(LVar1, MODEL_g5) + Exec(N(EVS_HideBox)) + Return + End }; EvtScript N(EVS_HideAllBoxesWithSmoke) = { - EVT_SET(LVar0, MODEL_a1) - EVT_SET(LVar1, MODEL_a1) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_a2) - EVT_SET(LVar1, MODEL_a2) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_a3) - EVT_SET(LVar1, MODEL_a3) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_a4) - EVT_SET(LVar1, MODEL_a4) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_a5) - EVT_SET(LVar1, MODEL_a5) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_b1) - EVT_SET(LVar1, MODEL_b1) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_b2) - EVT_SET(LVar1, MODEL_b2) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_b3) - EVT_SET(LVar1, MODEL_b3) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_b4) - EVT_SET(LVar1, MODEL_b4) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_b5) - EVT_SET(LVar1, MODEL_b5) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_c1) - EVT_SET(LVar1, MODEL_c1) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_c2) - EVT_SET(LVar1, MODEL_c2) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_c3) - EVT_SET(LVar1, MODEL_c3) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_c4) - EVT_SET(LVar1, MODEL_c4) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_c5) - EVT_SET(LVar1, MODEL_c5) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_d1) - EVT_SET(LVar1, MODEL_d1) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_d2) - EVT_SET(LVar1, MODEL_d2) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_d3) - EVT_SET(LVar1, MODEL_d3) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_d4) - EVT_SET(LVar1, MODEL_d4) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_d5) - EVT_SET(LVar1, MODEL_d5) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_e1) - EVT_SET(LVar1, MODEL_e1) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_e2) - EVT_SET(LVar1, MODEL_e2) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_e3) - EVT_SET(LVar1, MODEL_e3) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_e4) - EVT_SET(LVar1, MODEL_e4) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_e5) - EVT_SET(LVar1, MODEL_e5) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_f1) - EVT_SET(LVar1, MODEL_f1) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_f2) - EVT_SET(LVar1, MODEL_f2) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_f3) - EVT_SET(LVar1, MODEL_f3) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_f4) - EVT_SET(LVar1, MODEL_f4) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_f5) - EVT_SET(LVar1, MODEL_f5) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_g1) - EVT_SET(LVar1, MODEL_g1) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_g2) - EVT_SET(LVar1, MODEL_g2) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_g3) - EVT_SET(LVar1, MODEL_g3) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_g4) - EVT_SET(LVar1, MODEL_g4) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_SET(LVar0, MODEL_g5) - EVT_SET(LVar1, MODEL_g5) - EVT_EXEC(N(EVS_HideBoxWithSmoke)) - EVT_RETURN - EVT_END + Set(LVar0, MODEL_a1) + Set(LVar1, MODEL_a1) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_a2) + Set(LVar1, MODEL_a2) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_a3) + Set(LVar1, MODEL_a3) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_a4) + Set(LVar1, MODEL_a4) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_a5) + Set(LVar1, MODEL_a5) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_b1) + Set(LVar1, MODEL_b1) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_b2) + Set(LVar1, MODEL_b2) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_b3) + Set(LVar1, MODEL_b3) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_b4) + Set(LVar1, MODEL_b4) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_b5) + Set(LVar1, MODEL_b5) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_c1) + Set(LVar1, MODEL_c1) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_c2) + Set(LVar1, MODEL_c2) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_c3) + Set(LVar1, MODEL_c3) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_c4) + Set(LVar1, MODEL_c4) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_c5) + Set(LVar1, MODEL_c5) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_d1) + Set(LVar1, MODEL_d1) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_d2) + Set(LVar1, MODEL_d2) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_d3) + Set(LVar1, MODEL_d3) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_d4) + Set(LVar1, MODEL_d4) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_d5) + Set(LVar1, MODEL_d5) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_e1) + Set(LVar1, MODEL_e1) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_e2) + Set(LVar1, MODEL_e2) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_e3) + Set(LVar1, MODEL_e3) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_e4) + Set(LVar1, MODEL_e4) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_e5) + Set(LVar1, MODEL_e5) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_f1) + Set(LVar1, MODEL_f1) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_f2) + Set(LVar1, MODEL_f2) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_f3) + Set(LVar1, MODEL_f3) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_f4) + Set(LVar1, MODEL_f4) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_f5) + Set(LVar1, MODEL_f5) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_g1) + Set(LVar1, MODEL_g1) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_g2) + Set(LVar1, MODEL_g2) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_g3) + Set(LVar1, MODEL_g3) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_g4) + Set(LVar1, MODEL_g4) + Exec(N(EVS_HideBoxWithSmoke)) + Set(LVar0, MODEL_g5) + Set(LVar1, MODEL_g5) + Exec(N(EVS_HideBoxWithSmoke)) + Return + End }; EvtScript N(EVS_MakeAllBoxesAppear) = { - EVT_SET(LVar0, MODEL_a1) - EVT_SET(LVar1, MODEL_a1) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_a2) - EVT_SET(LVar1, MODEL_a2) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_a3) - EVT_SET(LVar1, MODEL_a3) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_a4) - EVT_SET(LVar1, MODEL_a4) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_a5) - EVT_SET(LVar1, MODEL_a5) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_b1) - EVT_SET(LVar1, MODEL_b1) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_b2) - EVT_SET(LVar1, MODEL_b2) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_b3) - EVT_SET(LVar1, MODEL_b3) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_b4) - EVT_SET(LVar1, MODEL_b4) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_b5) - EVT_SET(LVar1, MODEL_b5) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_c1) - EVT_SET(LVar1, MODEL_c1) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_c2) - EVT_SET(LVar1, MODEL_c2) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_c3) - EVT_SET(LVar1, MODEL_c3) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_c4) - EVT_SET(LVar1, MODEL_c4) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_c5) - EVT_SET(LVar1, MODEL_c5) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_d1) - EVT_SET(LVar1, MODEL_d1) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_d2) - EVT_SET(LVar1, MODEL_d2) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_d3) - EVT_SET(LVar1, MODEL_d3) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_d4) - EVT_SET(LVar1, MODEL_d4) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_d5) - EVT_SET(LVar1, MODEL_d5) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_e1) - EVT_SET(LVar1, MODEL_e1) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_e2) - EVT_SET(LVar1, MODEL_e2) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_e3) - EVT_SET(LVar1, MODEL_e3) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_e4) - EVT_SET(LVar1, MODEL_e4) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_e5) - EVT_SET(LVar1, MODEL_e5) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_f1) - EVT_SET(LVar1, MODEL_f1) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_f2) - EVT_SET(LVar1, MODEL_f2) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_f3) - EVT_SET(LVar1, MODEL_f3) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_f4) - EVT_SET(LVar1, MODEL_f4) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_f5) - EVT_SET(LVar1, MODEL_f5) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_g1) - EVT_SET(LVar1, MODEL_g1) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_g2) - EVT_SET(LVar1, MODEL_g2) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_g3) - EVT_SET(LVar1, MODEL_g3) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_g4) - EVT_SET(LVar1, MODEL_g4) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_SET(LVar0, MODEL_g5) - EVT_SET(LVar1, MODEL_g5) - EVT_EXEC(N(EVS_MakeBoxAppear)) - EVT_RETURN - EVT_END + Set(LVar0, MODEL_a1) + Set(LVar1, MODEL_a1) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_a2) + Set(LVar1, MODEL_a2) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_a3) + Set(LVar1, MODEL_a3) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_a4) + Set(LVar1, MODEL_a4) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_a5) + Set(LVar1, MODEL_a5) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_b1) + Set(LVar1, MODEL_b1) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_b2) + Set(LVar1, MODEL_b2) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_b3) + Set(LVar1, MODEL_b3) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_b4) + Set(LVar1, MODEL_b4) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_b5) + Set(LVar1, MODEL_b5) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_c1) + Set(LVar1, MODEL_c1) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_c2) + Set(LVar1, MODEL_c2) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_c3) + Set(LVar1, MODEL_c3) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_c4) + Set(LVar1, MODEL_c4) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_c5) + Set(LVar1, MODEL_c5) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_d1) + Set(LVar1, MODEL_d1) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_d2) + Set(LVar1, MODEL_d2) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_d3) + Set(LVar1, MODEL_d3) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_d4) + Set(LVar1, MODEL_d4) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_d5) + Set(LVar1, MODEL_d5) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_e1) + Set(LVar1, MODEL_e1) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_e2) + Set(LVar1, MODEL_e2) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_e3) + Set(LVar1, MODEL_e3) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_e4) + Set(LVar1, MODEL_e4) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_e5) + Set(LVar1, MODEL_e5) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_f1) + Set(LVar1, MODEL_f1) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_f2) + Set(LVar1, MODEL_f2) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_f3) + Set(LVar1, MODEL_f3) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_f4) + Set(LVar1, MODEL_f4) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_f5) + Set(LVar1, MODEL_f5) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_g1) + Set(LVar1, MODEL_g1) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_g2) + Set(LVar1, MODEL_g2) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_g3) + Set(LVar1, MODEL_g3) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_g4) + Set(LVar1, MODEL_g4) + Exec(N(EVS_MakeBoxAppear)) + Set(LVar0, MODEL_g5) + Set(LVar1, MODEL_g5) + Exec(N(EVS_MakeBoxAppear)) + Return + End }; EvtScript N(EVS_HidePeachPanels) = { - EVT_CALL(EnableModel, MODEL_o50, FALSE) - EVT_CALL(EnableModel, MODEL_o51, FALSE) - EVT_CALL(EnableModel, MODEL_o52, FALSE) - EVT_CALL(EnableModel, MODEL_o53, FALSE) - EVT_CALL(EnableModel, MODEL_o54, FALSE) - EVT_CALL(EnableModel, MODEL_o55, FALSE) - EVT_CALL(EnableModel, MODEL_o56, FALSE) - EVT_CALL(EnableModel, MODEL_o57, FALSE) - EVT_CALL(EnableModel, MODEL_o58, FALSE) - EVT_CALL(EnableModel, MODEL_o59, FALSE) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_o50, FALSE) + Call(EnableModel, MODEL_o51, FALSE) + Call(EnableModel, MODEL_o52, FALSE) + Call(EnableModel, MODEL_o53, FALSE) + Call(EnableModel, MODEL_o54, FALSE) + Call(EnableModel, MODEL_o55, FALSE) + Call(EnableModel, MODEL_o56, FALSE) + Call(EnableModel, MODEL_o57, FALSE) + Call(EnableModel, MODEL_o58, FALSE) + Call(EnableModel, MODEL_o59, FALSE) + Return + End }; EvtScript N(EVS_OnHitBox) = { - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_CALL(N(OnHitBox)) - EVT_CALL(GetColliderCenter, LVarB) - EVT_SWITCH(LVarC) - EVT_CASE_EQ(2) - EVT_ADD(LVar1, 2) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 25) - EVT_CASE_EQ(3) - EVT_CALL(TranslateModel, LVarA, 0, -9, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, LVarA, 0, -15, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, LVarA, 0, -21, 0) - EVT_WAIT(1) - EVT_CALL(EnableModel, LVarA, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVarB, COLLIDER_FLAGS_UPPER_MASK) - EVT_WAIT(4) - EVT_SUB(LVar1, 5) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 1, LVar0, LVar1, LVar2) - EVT_CASE_OR_EQ(0) - EVT_CASE_OR_EQ(1) - EVT_SUB(LVar1, 5) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 1, LVar0, LVar1, LVar2) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(EnableModel, LVarA, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVarB, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Set(LVarB, LVar1) + Call(N(OnHitBox)) + Call(GetColliderCenter, LVarB) + Switch(LVarC) + CaseEq(2) + Add(LVar1, 2) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 25) + CaseEq(3) + Call(TranslateModel, LVarA, 0, -9, 0) + Wait(1) + Call(TranslateModel, LVarA, 0, -15, 0) + Wait(1) + Call(TranslateModel, LVarA, 0, -21, 0) + Wait(1) + Call(EnableModel, LVarA, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVarB, COLLIDER_FLAGS_UPPER_MASK) + Wait(4) + Sub(LVar1, 5) + PlayEffect(EFFECT_WALKING_DUST, 1, LVar0, LVar1, LVar2) + CaseOrEq(0) + CaseOrEq(1) + Sub(LVar1, 5) + PlayEffect(EFFECT_WALKING_DUST, 1, LVar0, LVar1, LVar2) + EndCaseGroup + EndSwitch + Call(EnableModel, LVarA, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVarB, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(D_802441E4_E19F64) = { - EVT_SET(LVar0, MODEL_a1) - EVT_SET(LVar1, MODEL_a1) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_a2) - EVT_SET(LVar1, MODEL_a2) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_a3) - EVT_SET(LVar1, MODEL_a3) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_a4) - EVT_SET(LVar1, MODEL_a4) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_a5) - EVT_SET(LVar1, MODEL_a5) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_b1) - EVT_SET(LVar1, MODEL_b1) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_b2) - EVT_SET(LVar1, MODEL_b2) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_b3) - EVT_SET(LVar1, MODEL_b3) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_b4) - EVT_SET(LVar1, MODEL_b4) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_b5) - EVT_SET(LVar1, MODEL_b5) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_c1) - EVT_SET(LVar1, MODEL_c1) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_c2) - EVT_SET(LVar1, MODEL_c2) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_c3) - EVT_SET(LVar1, MODEL_c3) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_c4) - EVT_SET(LVar1, MODEL_c4) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_c5) - EVT_SET(LVar1, MODEL_c5) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_d1) - EVT_SET(LVar1, MODEL_d1) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_d2) - EVT_SET(LVar1, MODEL_d2) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_d3) - EVT_SET(LVar1, MODEL_d3) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_d4) - EVT_SET(LVar1, MODEL_d4) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_d5) - EVT_SET(LVar1, MODEL_d5) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_e1) - EVT_SET(LVar1, MODEL_e1) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_e2) - EVT_SET(LVar1, MODEL_e2) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_e3) - EVT_SET(LVar1, MODEL_e3) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_e4) - EVT_SET(LVar1, MODEL_e4) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_e5) - EVT_SET(LVar1, MODEL_e5) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_f1) - EVT_SET(LVar1, MODEL_f1) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_f2) - EVT_SET(LVar1, MODEL_f2) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_f3) - EVT_SET(LVar1, MODEL_f3) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_f4) - EVT_SET(LVar1, MODEL_f4) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_f5) - EVT_SET(LVar1, MODEL_f5) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_g1) - EVT_SET(LVar1, MODEL_g1) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_g2) - EVT_SET(LVar1, MODEL_g2) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_g3) - EVT_SET(LVar1, MODEL_g3) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_g4) - EVT_SET(LVar1, MODEL_g4) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_SET(LVar0, MODEL_g5) - EVT_SET(LVar1, MODEL_g5) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, MODEL_a1) + Set(LVar1, MODEL_a1) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_a2) + Set(LVar1, MODEL_a2) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_a3) + Set(LVar1, MODEL_a3) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_a4) + Set(LVar1, MODEL_a4) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_a5) + Set(LVar1, MODEL_a5) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_b1) + Set(LVar1, MODEL_b1) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_b2) + Set(LVar1, MODEL_b2) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_b3) + Set(LVar1, MODEL_b3) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_b4) + Set(LVar1, MODEL_b4) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_b5) + Set(LVar1, MODEL_b5) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_c1) + Set(LVar1, MODEL_c1) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_c2) + Set(LVar1, MODEL_c2) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_c3) + Set(LVar1, MODEL_c3) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_c4) + Set(LVar1, MODEL_c4) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_c5) + Set(LVar1, MODEL_c5) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_d1) + Set(LVar1, MODEL_d1) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_d2) + Set(LVar1, MODEL_d2) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_d3) + Set(LVar1, MODEL_d3) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_d4) + Set(LVar1, MODEL_d4) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_d5) + Set(LVar1, MODEL_d5) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_e1) + Set(LVar1, MODEL_e1) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_e2) + Set(LVar1, MODEL_e2) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_e3) + Set(LVar1, MODEL_e3) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_e4) + Set(LVar1, MODEL_e4) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_e5) + Set(LVar1, MODEL_e5) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_f1) + Set(LVar1, MODEL_f1) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_f2) + Set(LVar1, MODEL_f2) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_f3) + Set(LVar1, MODEL_f3) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_f4) + Set(LVar1, MODEL_f4) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_f5) + Set(LVar1, MODEL_f5) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_g1) + Set(LVar1, MODEL_g1) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_g2) + Set(LVar1, MODEL_g2) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_g3) + Set(LVar1, MODEL_g3) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_g4) + Set(LVar1, MODEL_g4) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Set(LVar0, MODEL_g5) + Set(LVar1, MODEL_g5) + BindTrigger(Ref(N(EVS_OnHitBox)), TRIGGER_WALL_HAMMER, LVar1, 1, 0) + Return + End }; EvtScript N(EVS_SetBoxContents) = { - EVT_CALL(N(SetBoxContents)) - EVT_RETURN - EVT_END + Call(N(SetBoxContents)) + Return + End }; EvtScript N(EVS_CleanupGame) = { - EVT_CALL(N(CleanupGame)) - EVT_RETURN - EVT_END + Call(N(CleanupGame)) + Return + End }; EvtScript N(EVS_Toad_GovernGame) = { - EVT_CALL(N(DisableMenus)) - EVT_CALL(N(RunMinigame)) - EVT_CALL(N(EnableMenus)) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetSelfVar, 3, 3) - EVT_CALL(PopSong) - EVT_EXEC(N(EVS_CleanupGame)) - EVT_CALL(ShowMessageAtScreenPos, MSG_MGM_0041, 160, 40) - EVT_WAIT(5) - EVT_CALL(SetSelfVar, 3, 4) - EVT_EXEC(N(EVS_HidePeachPanels)) - EVT_EXEC(N(EVS_HideAllBoxesWithSmoke)) - EVT_WAIT(15) - EVT_THREAD - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 358, -20, 185) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 358, -20, 185) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Toad, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(N(CreateSignpost)) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 1, 355, 45, -175) - EVT_THREAD - EVT_CALL(SetNpcPos, NPC_Toad, 358, -20, 185) - EVT_CALL(EnableNpcShadow, NPC_Toad, TRUE) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 1, 358, 5, 189) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_CANT_INTERACT | ENEMY_FLAG_IGNORE_PARTNER, 0) - EVT_END_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Toad, LVar3, LVar4, LVar5) - EVT_CALL(GetDist2D, LVarA, LVar0, LVar2, LVar3, LVar5) - EVT_DIV(LVarA, 8) - EVT_IF_LT(LVarA, 3) - EVT_SET(LVarA, 3) - EVT_END_IF - EVT_CALL(PlayerMoveTo, 330, 185, LVarA) - EVT_CALL(WaitForPlayerMoveToComplete) - EVT_CALL(SetNpcFlagBits, NPC_Toad, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_WAIT(5) - EVT_CALL(SetSelfVar, 3, 5) - EVT_CALL(N(UpdateRecords)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(-1) - EVT_CALL(SetSelfVar, 3, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0043) - EVT_CASE_EQ(0) - EVT_CALL(SetSelfVar, 3, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0044) + Call(N(DisableMenus)) + Call(N(RunMinigame)) + Call(N(EnableMenus)) + Call(DisablePlayerInput, TRUE) + Call(SetSelfVar, 3, 3) + Call(PopSong) + Exec(N(EVS_CleanupGame)) + Call(ShowMessageAtScreenPos, MSG_MGM_0041, 160, 40) + Wait(5) + Call(SetSelfVar, 3, 4) + Exec(N(EVS_HidePeachPanels)) + Exec(N(EVS_HideAllBoxesWithSmoke)) + Wait(15) + Thread + Call(UseSettingsFrom, CAM_DEFAULT, 358, -20, 185) + Call(SetPanTarget, CAM_DEFAULT, 358, -20, 185) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndThread + Call(SetNpcFlagBits, NPC_Toad, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(N(CreateSignpost)) + PlayEffect(EFFECT_WALKING_DUST, 1, 355, 45, -175) + Thread + Call(SetNpcPos, NPC_Toad, 358, -20, 185) + Call(EnableNpcShadow, NPC_Toad, TRUE) + PlayEffect(EFFECT_WALKING_DUST, 1, 358, 5, 189) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_CANT_INTERACT | ENEMY_FLAG_IGNORE_PARTNER, 0) + EndThread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Toad, LVar3, LVar4, LVar5) + Call(GetDist2D, LVarA, LVar0, LVar2, LVar3, LVar5) + Div(LVarA, 8) + IfLt(LVarA, 3) + Set(LVarA, 3) + EndIf + Call(PlayerMoveTo, 330, 185, LVarA) + Call(WaitForPlayerMoveToComplete) + Call(SetNpcFlagBits, NPC_Toad, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Wait(5) + Call(SetSelfVar, 3, 5) + Call(N(UpdateRecords)) + Switch(LVar0) + CaseEq(-1) + Call(SetSelfVar, 3, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0043) + CaseEq(0) + Call(SetSelfVar, 3, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0044) #if VERSION_PAL - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_PAL_MGM_0046) - EVT_CALL(ShowCoinCounter, TRUE) - EVT_WAIT(10) - EVT_CALL(N(GiveCoinReward)) - EVT_WAIT(15) - EVT_CALL(ShowCoinCounter, FALSE) - EVT_CALL(SetSelfVar, 3, 0) - EVT_WAIT(5) - EVT_CALL(ContinueSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0045) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_PAL_MGM_0046) + Call(ShowCoinCounter, TRUE) + Wait(10) + Call(N(GiveCoinReward)) + Wait(15) + Call(ShowCoinCounter, FALSE) + Call(SetSelfVar, 3, 0) + Wait(5) + Call(ContinueSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0045) #endif - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0042) - EVT_CALL(ShowCoinCounter, TRUE) - EVT_WAIT(10) - EVT_CALL(N(GiveCoinReward)) - EVT_WAIT(15) - EVT_CALL(ShowCoinCounter, FALSE) - EVT_CALL(SetSelfVar, 3, 0) - EVT_WAIT(5) - EVT_CALL(ContinueSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0045) - EVT_END_SWITCH - EVT_WAIT(5) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(450.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0042) + Call(ShowCoinCounter, TRUE) + Wait(10) + Call(N(GiveCoinReward)) + Wait(15) + Call(ShowCoinCounter, FALSE) + Call(SetSelfVar, 3, 0) + Wait(5) + Call(ContinueSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0045) + EndSwitch + Wait(5) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(450.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_InitializeMinigame) = { - EVT_CALL(N(CreateMinigame)) - EVT_EXEC(N(EVS_HideAllBoxes)) - EVT_CALL(N(CreateSignpost)) - EVT_EXEC(N(EVS_CreateScoreDisplay)) - EVT_EXEC(N(D_802441E4_E19F64)) - EVT_EXEC(N(EVS_HidePeachPanels)) - EVT_RETURN - EVT_END + Call(N(CreateMinigame)) + Exec(N(EVS_HideAllBoxes)) + Call(N(CreateSignpost)) + Exec(N(EVS_CreateScoreDisplay)) + Exec(N(D_802441E4_E19F64)) + Exec(N(EVS_HidePeachPanels)) + Return + End }; EvtScript N(EVS_DestroyMinigame) = { - EVT_CALL(N(DestroyMinigame)) - EVT_RETURN - EVT_END + Call(N(DestroyMinigame)) + Return + End }; EvtScript N(EVS_NpcInteract_Toad) = { - EVT_IF_EQ(GF_MGM_Met_SmashAttack, FALSE) - EVT_CALL(N(SetMsgImgs_Panel)) - EVT_SET(GF_MGM_Met_SmashAttack, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_003C) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_003D) - EVT_END_IF - EVT_CALL(ShowCoinCounter, TRUE) - EVT_CALL(N(GetCoinCount)) - EVT_IF_LT(LVarA, 10) - EVT_CALL(ContinueSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_003E) - EVT_CALL(N(HideCoinCounter)) - EVT_WAIT(12) - EVT_EXEC(N(EVS_DestroyMinigame)) - EVT_CALL(GotoMap, EVT_PTR("mgm_00"), mgm_00_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END_IF - EVT_CALL(ShowChoice, MSG_Choice_004F) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(GetSelfVar, 4, LVar1) - EVT_IF_LT(LVar1, 100) - EVT_ADD(LVar1, 1) - EVT_CALL(SetSelfVar, 4, LVar1) - EVT_END_IF - EVT_THREAD - EVT_CALL(N(TakeCoinCost)) - EVT_END_THREAD - EVT_CALL(ContinueSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_003F) - EVT_CALL(N(HideCoinCounter)) - EVT_CASE_DEFAULT - EVT_CALL(N(HideCoinCounter)) - EVT_WAIT(5) - EVT_CALL(ContinueSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0040) - EVT_EXEC(N(EVS_DestroyMinigame)) - EVT_CALL(GotoMap, EVT_PTR("mgm_00"), mgm_00_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END_SWITCH - EVT_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 3) - EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 10) - EVT_END_THREAD - EVT_CALL(EndSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 5) - EVT_CALL(SetSelfVar, 3, 1) - EVT_CALL(PlaySoundWithVolume, SOUND_SPAWN_BLOCK, 80) - EVT_EXEC(N(EVS_MakeAllBoxesAppear)) - EVT_EXEC(N(EVS_SetBoxContents)) - EVT_WAIT(25) - EVT_THREAD - EVT_WAIT(12) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 1, 358, -10, 185) - EVT_CALL(SetNpcPos, NPC_Toad, 358, 500, 185) - EVT_CALL(EnableNpcShadow, NPC_Toad, FALSE) - EVT_CALL(N(DestroySignpost)) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 1, 355, 30, -180) - EVT_END_THREAD - EVT_CALL(EndSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 5) - EVT_CALL(PushSong, SONG_PLAYROOM, 0) - EVT_WAIT(8) - EVT_CALL(EndSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 5) - EVT_CALL(EnablePartnerAI) - EVT_CALL(SetSelfVar, 3, 2) - EVT_EXEC(N(EVS_Toad_GovernGame)) - EVT_RETURN - EVT_END + IfEq(GF_MGM_Met_SmashAttack, FALSE) + Call(N(SetMsgImgs_Panel)) + Set(GF_MGM_Met_SmashAttack, TRUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_003C) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_003D) + EndIf + Call(ShowCoinCounter, TRUE) + Call(N(GetCoinCount)) + IfLt(LVarA, 10) + Call(ContinueSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_003E) + Call(N(HideCoinCounter)) + Wait(12) + Exec(N(EVS_DestroyMinigame)) + Call(GotoMap, Ref("mgm_00"), mgm_00_ENTRY_2) + Wait(100) + Return + EndIf + Call(ShowChoice, MSG_Choice_004F) + Switch(LVar0) + CaseEq(0) + Call(GetSelfVar, 4, LVar1) + IfLt(LVar1, 100) + Add(LVar1, 1) + Call(SetSelfVar, 4, LVar1) + EndIf + Thread + Call(N(TakeCoinCost)) + EndThread + Call(ContinueSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_003F) + Call(N(HideCoinCounter)) + CaseDefault + Call(N(HideCoinCounter)) + Wait(5) + Call(ContinueSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_MGM_0040) + Exec(N(EVS_DestroyMinigame)) + Call(GotoMap, Ref("mgm_00"), mgm_00_ENTRY_2) + Wait(100) + Return + EndSwitch + Thread + Call(DisablePartnerAI, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar2, 3) + Call(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 10) + EndThread + Call(EndSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 5) + Call(SetSelfVar, 3, 1) + Call(PlaySoundWithVolume, SOUND_SPAWN_BLOCK, 80) + Exec(N(EVS_MakeAllBoxesAppear)) + Exec(N(EVS_SetBoxContents)) + Wait(25) + Thread + Wait(12) + PlayEffect(EFFECT_WALKING_DUST, 1, 358, -10, 185) + Call(SetNpcPos, NPC_Toad, 358, 500, 185) + Call(EnableNpcShadow, NPC_Toad, FALSE) + Call(N(DestroySignpost)) + PlayEffect(EFFECT_WALKING_DUST, 1, 355, 30, -180) + EndThread + Call(EndSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 5) + Call(PushSong, SONG_PLAYROOM, 0) + Wait(8) + Call(EndSpeech, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 5) + Call(EnablePartnerAI) + Call(SetSelfVar, 3, 2) + Exec(N(EVS_Toad_GovernGame)) + Return + End }; EvtScript N(EVS_NpcInit_Toad) = { - EVT_CALL(SetNpcPos, NPC_Toad, 358, -20, 185) - EVT_CALL(SetSelfVar, 4, 0) - EVT_CALL(SetSelfVar, 3, 0) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad))) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Toad, 358, -20, 185) + Call(SetSelfVar, 4, 0) + Call(SetSelfVar, 3, 0) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad))) + Return + End }; NpcData N(NpcData_GuideToad) = { @@ -1813,75 +1813,75 @@ NpcData N(NpcData_GuideToad) = { }; EvtScript N(EVS_NpcInit_Fuzzy) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Fuzzy_Run) - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(NPC_Fuzzy_01) - EVT_CALL(SetSelfVar, 8, SOUND_FUZZY_HOP_A) - EVT_CASE_EQ(NPC_Fuzzy_02) - EVT_CALL(SetSelfVar, 8, SOUND_FUZZY_HOP_B) - EVT_CASE_EQ(NPC_Fuzzy_03) - EVT_CALL(SetSelfVar, 8, SOUND_FUZZY_HOP_C) - EVT_CASE_EQ(NPC_Fuzzy_04) - EVT_CALL(SetSelfVar, 8, SOUND_FUZZY_HOP_A) - EVT_CASE_DEFAULT - EVT_CALL(SetSelfVar, 8, SOUND_FUZZY_HOP_B) - EVT_END_SWITCH - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING | NPC_FLAG_JUMPING, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 50) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_ELSE - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_Fuzzy_Run) + Call(SetSelfVar, 0, 0) + Call(GetSelfNpcID, LVar0) + Switch(LVar0) + CaseEq(NPC_Fuzzy_01) + Call(SetSelfVar, 8, SOUND_FUZZY_HOP_A) + CaseEq(NPC_Fuzzy_02) + Call(SetSelfVar, 8, SOUND_FUZZY_HOP_B) + CaseEq(NPC_Fuzzy_03) + Call(SetSelfVar, 8, SOUND_FUZZY_HOP_C) + CaseEq(NPC_Fuzzy_04) + Call(SetSelfVar, 8, SOUND_FUZZY_HOP_A) + CaseDefault + Call(SetSelfVar, 8, SOUND_FUZZY_HOP_B) + EndSwitch + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING | NPC_FLAG_JUMPING, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(RandInt, 100, LVar0) + IfLt(LVar0, 50) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Else + Call(InterpNpcYaw, NPC_SELF, 270, 0) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Bobomb) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Bobomb_AngryIdle) - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING | NPC_FLAG_JUMPING, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(NPC_Bobomb_01) - EVT_CALL(SetSelfVar, 8, SOUND_NPC_JUMP) - EVT_CASE_EQ(NPC_Bobomb_02) - EVT_CALL(SetSelfVar, 8, SOUND_LOWER_NPC_JUMP) - EVT_CASE_EQ(NPC_Bobomb_03) - EVT_CALL(SetSelfVar, 8, SOUND_NPC_JUMP) - EVT_CASE_DEFAULT - EVT_CALL(SetSelfVar, 8, SOUND_LOWER_NPC_JUMP) - EVT_END_SWITCH - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 50) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_ELSE - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_Bobomb_AngryIdle) + Call(SetSelfVar, 0, 0) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING | NPC_FLAG_JUMPING, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(GetSelfNpcID, LVar0) + Switch(LVar0) + CaseEq(NPC_Bobomb_01) + Call(SetSelfVar, 8, SOUND_NPC_JUMP) + CaseEq(NPC_Bobomb_02) + Call(SetSelfVar, 8, SOUND_LOWER_NPC_JUMP) + CaseEq(NPC_Bobomb_03) + Call(SetSelfVar, 8, SOUND_NPC_JUMP) + CaseDefault + Call(SetSelfVar, 8, SOUND_LOWER_NPC_JUMP) + EndSwitch + Call(RandInt, 100, LVar0) + IfLt(LVar0, 50) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Else + Call(InterpNpcYaw, NPC_SELF, 270, 0) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Luigi) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Jump) - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING | NPC_FLAG_JUMPING, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 50) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_ELSE - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_Luigi_Jump) + Call(SetSelfVar, 0, 0) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING | NPC_FLAG_JUMPING, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(RandInt, 100, LVar0) + IfLt(LVar0, 50) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Else + Call(InterpNpcYaw, NPC_SELF, 270, 0) + EndIf + Return + End }; NpcData N(NpcData_Fuzzy_01) = { diff --git a/src/world/area_mgm/mgm_03/mgm_03_1_main.c b/src/world/area_mgm/mgm_03/mgm_03_1_main.c index d8195b0547e..174b747bceb 100644 --- a/src/world/area_mgm/mgm_03/mgm_03_1_main.c +++ b/src/world/area_mgm/mgm_03/mgm_03_1_main.c @@ -1,8 +1,8 @@ #include "mgm_03.h" EvtScript N(EVS_Main) = { - EVT_CALL(SetSpriteShading, SHADING_ARN_09) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_RETURN - EVT_END + Call(SetSpriteShading, SHADING_ARN_09) + SetUP_CAMERA_NO_LEAD() + Return + End }; diff --git a/src/world/area_mim/common/AnimateGates.inc.c b/src/world/area_mim/common/AnimateGates.inc.c index dade7ac17f1..a56531877f9 100644 --- a/src/world/area_mim/common/AnimateGates.inc.c +++ b/src/world/area_mim/common/AnimateGates.inc.c @@ -1,109 +1,109 @@ #include "common.h" EvtScript N(EVS_UseGate) = { - EVT_THREAD - EVT_CALL(PlaySoundAtCollider, LVar9, SOUND_FOREST_GATE_OPEN, SOUND_SPACE_DEFAULT) - EVT_WAIT(19) - EVT_CALL(PlaySoundAtCollider, LVar9, SOUND_FOREST_GATE_CLOSE, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_SWITCH(AB_MIM_1) - EVT_CASE_EQ(0) - EVT_THREAD - EVT_CALL(MakeLerp, 10, 90, 10, EASING_QUADRATIC_IN) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, LVar9) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(15) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, LVar7) - EVT_ADD(LVar2, LVar8) - EVT_CALL(PlayerMoveTo, LVar0, LVar2, 15) - EVT_END_THREAD - EVT_SET(LVar1, 1) - EVT_EXEC(N(EVS_SetGateCameraZones)) - EVT_CALL(MakeLerp, 90, 360, 30, EASING_LINEAR) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, LVar9) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_EXEC(N(EVS_ResetGates)) - EVT_SET(AB_MIM_1, 1) - EVT_SET(GF_MIM_ChoosingPath, TRUE) - EVT_CASE_EQ(1) - EVT_THREAD - EVT_CALL(MakeLerp, 360, 270, 10, EASING_QUADRATIC_IN) - EVT_LABEL(30) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, LVar9) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(30) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(15) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, LVar7) - EVT_SUB(LVar2, LVar8) - EVT_CALL(PlayerMoveTo, LVar0, LVar2, 15) - EVT_END_THREAD - EVT_SET(LVar1, 2) - EVT_EXEC(N(EVS_SetGateCameraZones)) - EVT_CALL(MakeLerp, 270, -10, 30, EASING_LINEAR) - EVT_LABEL(40) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, LVar9) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(40) - EVT_END_IF - EVT_SET(AB_MIM_1, 2) - EVT_CASE_EQ(2) - EVT_THREAD - EVT_CALL(MakeLerp, -10, 90, 10, EASING_QUADRATIC_IN) - EVT_LABEL(50) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, LVar9) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(50) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(15) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, LVar7) - EVT_ADD(LVar2, LVar8) - EVT_CALL(PlayerMoveTo, LVar0, LVar2, 15) - EVT_END_THREAD - EVT_SET(LVar1, 1) - EVT_EXEC(N(EVS_SetGateCameraZones)) - EVT_CALL(MakeLerp, 90, 360, 30, EASING_LINEAR) - EVT_LABEL(60) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, LVar9) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(60) - EVT_END_IF - EVT_EXEC(N(EVS_ResetGates)) - EVT_SET(AB_MIM_1, 1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Thread + Call(PlaySoundAtCollider, LVar9, SOUND_FOREST_GATE_OPEN, SOUND_SPACE_DEFAULT) + Wait(19) + Call(PlaySoundAtCollider, LVar9, SOUND_FOREST_GATE_CLOSE, SOUND_SPACE_DEFAULT) + EndThread + Switch(AB_MIM_1) + CaseEq(0) + Thread + Call(MakeLerp, 10, 90, 10, EASING_QUADRATIC_IN) + Label(10) + Call(UpdateLerp) + Call(RotateGroup, LVarA, LVar0, 0, 1, 0) + Call(UpdateColliderTransform, LVar9) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + EndThread + Wait(15) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, LVar7) + Add(LVar2, LVar8) + Call(PlayerMoveTo, LVar0, LVar2, 15) + EndThread + Set(LVar1, 1) + Exec(N(EVS_SetGateCameraZones)) + Call(MakeLerp, 90, 360, 30, EASING_LINEAR) + Label(20) + Call(UpdateLerp) + Call(RotateGroup, LVarA, LVar0, 0, 1, 0) + Call(UpdateColliderTransform, LVar9) + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Exec(N(EVS_ResetGates)) + Set(AB_MIM_1, 1) + Set(GF_MIM_ChoosingPath, TRUE) + CaseEq(1) + Thread + Call(MakeLerp, 360, 270, 10, EASING_QUADRATIC_IN) + Label(30) + Call(UpdateLerp) + Call(RotateGroup, LVarA, LVar0, 0, 1, 0) + Call(UpdateColliderTransform, LVar9) + Wait(1) + IfEq(LVar1, 1) + Goto(30) + EndIf + EndThread + Wait(15) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar0, LVar7) + Sub(LVar2, LVar8) + Call(PlayerMoveTo, LVar0, LVar2, 15) + EndThread + Set(LVar1, 2) + Exec(N(EVS_SetGateCameraZones)) + Call(MakeLerp, 270, -10, 30, EASING_LINEAR) + Label(40) + Call(UpdateLerp) + Call(RotateGroup, LVarA, LVar0, 0, 1, 0) + Call(UpdateColliderTransform, LVar9) + Wait(1) + IfEq(LVar1, 1) + Goto(40) + EndIf + Set(AB_MIM_1, 2) + CaseEq(2) + Thread + Call(MakeLerp, -10, 90, 10, EASING_QUADRATIC_IN) + Label(50) + Call(UpdateLerp) + Call(RotateGroup, LVarA, LVar0, 0, 1, 0) + Call(UpdateColliderTransform, LVar9) + Wait(1) + IfEq(LVar1, 1) + Goto(50) + EndIf + EndThread + Wait(15) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, LVar7) + Add(LVar2, LVar8) + Call(PlayerMoveTo, LVar0, LVar2, 15) + EndThread + Set(LVar1, 1) + Exec(N(EVS_SetGateCameraZones)) + Call(MakeLerp, 90, 360, 30, EASING_LINEAR) + Label(60) + Call(UpdateLerp) + Call(RotateGroup, LVarA, LVar0, 0, 1, 0) + Call(UpdateColliderTransform, LVar9) + Wait(1) + IfEq(LVar1, 1) + Goto(60) + EndIf + Exec(N(EVS_ResetGates)) + Set(AB_MIM_1, 1) + EndSwitch + Return + End }; diff --git a/src/world/area_mim/common/SetupGates.inc.c b/src/world/area_mim/common/SetupGates.inc.c index 1155aab4632..a88a4351ccd 100644 --- a/src/world/area_mim/common/SetupGates.inc.c +++ b/src/world/area_mim/common/SetupGates.inc.c @@ -1,30 +1,30 @@ #include "common.h" EvtScript N(EVS_SetupGates) = { - EVT_IF_EQ(GF_MIM_ChoosingPath, FALSE) - EVT_SET(GF_MIM_ChoosingPath, TRUE) - EVT_SET(AB_MIM_1, 2) - EVT_SET(LVar1, 2) - EVT_SET(LVar2, -10) - EVT_ELSE - EVT_SET(GF_MIM_ChoosingPath, FALSE) - EVT_SET(AB_MIM_1, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 10) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_SetGateCameraZones)) - EVT_EXEC(N(EVS_InitializeGates)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseGate_North)), TRIGGER_WALL_PRESS_A, COLLIDER_monn, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseGate_South)), TRIGGER_WALL_PRESS_A, COLLIDER_mons, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseGate_West)), TRIGGER_WALL_PRESS_A, COLLIDER_monw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseGate_East)), TRIGGER_WALL_PRESS_A, COLLIDER_mone, 1, 0) - EVT_RETURN - EVT_END + IfEq(GF_MIM_ChoosingPath, FALSE) + Set(GF_MIM_ChoosingPath, TRUE) + Set(AB_MIM_1, 2) + Set(LVar1, 2) + Set(LVar2, -10) + Else + Set(GF_MIM_ChoosingPath, FALSE) + Set(AB_MIM_1, 0) + Set(LVar1, 0) + Set(LVar2, 10) + EndIf + ExecWait(N(EVS_SetGateCameraZones)) + Exec(N(EVS_InitializeGates)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + BindTrigger(Ref(N(EVS_UseGate_North)), TRIGGER_WALL_PRESS_A, COLLIDER_monn, 1, 0) + BindTrigger(Ref(N(EVS_UseGate_South)), TRIGGER_WALL_PRESS_A, COLLIDER_mons, 1, 0) + BindTrigger(Ref(N(EVS_UseGate_West)), TRIGGER_WALL_PRESS_A, COLLIDER_monw, 1, 0) + BindTrigger(Ref(N(EVS_UseGate_East)), TRIGGER_WALL_PRESS_A, COLLIDER_mone, 1, 0) + Return + End }; diff --git a/src/world/area_mim/common/SupportGates.inc.c b/src/world/area_mim/common/SupportGates.inc.c index 240ed3906a5..7418022e54b 100644 --- a/src/world/area_mim/common/SupportGates.inc.c +++ b/src/world/area_mim/common/SupportGates.inc.c @@ -1,71 +1,71 @@ #include "common.h" EvtScript N(EVS_SetGateCameraZones) = { - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(SetZoneEnabled, ZONE_north, TRUE) - EVT_CALL(SetZoneEnabled, ZONE_west, TRUE) - EVT_CALL(SetZoneEnabled, ZONE_south, TRUE) - EVT_CALL(SetZoneEnabled, ZONE_east, TRUE) - EVT_CALL(SetZoneEnabled, ZONE_higashi, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_nishi, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_minami, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_kita, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_stage, FALSE) - EVT_SET(LVar1, 0) - EVT_CASE_EQ(1) - EVT_CALL(SetZoneEnabled, ZONE_north, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_west, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_south, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_east, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_higashi, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_nishi, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_minami, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_kita, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_stage, TRUE) - EVT_SET(LVar1, 1) - EVT_CASE_EQ(2) - EVT_CALL(SetZoneEnabled, ZONE_north, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_west, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_south, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_east, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_higashi, TRUE) - EVT_CALL(SetZoneEnabled, ZONE_nishi, TRUE) - EVT_CALL(SetZoneEnabled, ZONE_minami, TRUE) - EVT_CALL(SetZoneEnabled, ZONE_kita, TRUE) - EVT_CALL(SetZoneEnabled, ZONE_stage, FALSE) - EVT_SET(LVar1, 2) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar1) + CaseEq(0) + Call(SetZoneEnabled, ZONE_north, TRUE) + Call(SetZoneEnabled, ZONE_west, TRUE) + Call(SetZoneEnabled, ZONE_south, TRUE) + Call(SetZoneEnabled, ZONE_east, TRUE) + Call(SetZoneEnabled, ZONE_higashi, FALSE) + Call(SetZoneEnabled, ZONE_nishi, FALSE) + Call(SetZoneEnabled, ZONE_minami, FALSE) + Call(SetZoneEnabled, ZONE_kita, FALSE) + Call(SetZoneEnabled, ZONE_stage, FALSE) + Set(LVar1, 0) + CaseEq(1) + Call(SetZoneEnabled, ZONE_north, FALSE) + Call(SetZoneEnabled, ZONE_west, FALSE) + Call(SetZoneEnabled, ZONE_south, FALSE) + Call(SetZoneEnabled, ZONE_east, FALSE) + Call(SetZoneEnabled, ZONE_higashi, FALSE) + Call(SetZoneEnabled, ZONE_nishi, FALSE) + Call(SetZoneEnabled, ZONE_minami, FALSE) + Call(SetZoneEnabled, ZONE_kita, FALSE) + Call(SetZoneEnabled, ZONE_stage, TRUE) + Set(LVar1, 1) + CaseEq(2) + Call(SetZoneEnabled, ZONE_north, FALSE) + Call(SetZoneEnabled, ZONE_west, FALSE) + Call(SetZoneEnabled, ZONE_south, FALSE) + Call(SetZoneEnabled, ZONE_east, FALSE) + Call(SetZoneEnabled, ZONE_higashi, TRUE) + Call(SetZoneEnabled, ZONE_nishi, TRUE) + Call(SetZoneEnabled, ZONE_minami, TRUE) + Call(SetZoneEnabled, ZONE_kita, TRUE) + Call(SetZoneEnabled, ZONE_stage, FALSE) + Set(LVar1, 2) + EndSwitch + Return + End }; EvtScript N(EVS_InitializeGates) = { - EVT_CALL(ParentColliderToModel, COLLIDER_monn, MODEL_n1) - EVT_CALL(RotateGroup, MODEL_monn, LVar2, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_monn) - EVT_CALL(ParentColliderToModel, COLLIDER_mons, MODEL_s1) - EVT_CALL(RotateGroup, MODEL_mons, LVar2, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_mons) - EVT_CALL(ParentColliderToModel, COLLIDER_mone, MODEL_e1) - EVT_CALL(RotateGroup, MODEL_mone, LVar2, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_mone) - EVT_CALL(ParentColliderToModel, COLLIDER_monw, MODEL_w1) - EVT_CALL(RotateGroup, MODEL_monw, LVar2, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_monw) - EVT_RETURN - EVT_END + Call(ParentColliderToModel, COLLIDER_monn, MODEL_n1) + Call(RotateGroup, MODEL_monn, LVar2, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_monn) + Call(ParentColliderToModel, COLLIDER_mons, MODEL_s1) + Call(RotateGroup, MODEL_mons, LVar2, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_mons) + Call(ParentColliderToModel, COLLIDER_mone, MODEL_e1) + Call(RotateGroup, MODEL_mone, LVar2, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_mone) + Call(ParentColliderToModel, COLLIDER_monw, MODEL_w1) + Call(RotateGroup, MODEL_monw, LVar2, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_monw) + Return + End }; EvtScript N(EVS_ResetGates) = { - EVT_CALL(RotateGroup, MODEL_monn, 0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_monn) - EVT_CALL(RotateGroup, MODEL_mons, 0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_mons) - EVT_CALL(RotateGroup, MODEL_mone, 0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_mone) - EVT_CALL(RotateGroup, MODEL_monw, 0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_monw) - EVT_RETURN - EVT_END + Call(RotateGroup, MODEL_monn, 0, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_monn) + Call(RotateGroup, MODEL_mons, 0, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_mons) + Call(RotateGroup, MODEL_mone, 0, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_mone) + Call(RotateGroup, MODEL_monw, 0, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_monw) + Return + End }; diff --git a/src/world/area_mim/common/UseGates.inc.c b/src/world/area_mim/common/UseGates.inc.c index 5ab6f24a0e1..d0b79d875c9 100644 --- a/src/world/area_mim/common/UseGates.inc.c +++ b/src/world/area_mim/common/UseGates.inc.c @@ -1,49 +1,49 @@ #include "common.h" EvtScript N(EVS_UseGate_North) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 70) - EVT_SET(LVar9, COLLIDER_monn) - EVT_SET(LVarA, MODEL_monn) - EVT_EXEC_WAIT(N(EVS_UseGate)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Set(LVar7, 0) + Set(LVar8, 70) + Set(LVar9, COLLIDER_monn) + Set(LVarA, MODEL_monn) + ExecWait(N(EVS_UseGate)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_UseGate_South) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, -70) - EVT_SET(LVar9, COLLIDER_mons) - EVT_SET(LVarA, MODEL_mons) - EVT_EXEC_WAIT(N(EVS_UseGate)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Set(LVar7, 0) + Set(LVar8, -70) + Set(LVar9, COLLIDER_mons) + Set(LVarA, MODEL_mons) + ExecWait(N(EVS_UseGate)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_UseGate_East) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar7, -70) - EVT_SET(LVar8, 0) - EVT_SET(LVar9, COLLIDER_mone) - EVT_SET(LVarA, MODEL_mone) - EVT_EXEC_WAIT(N(EVS_UseGate)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Set(LVar7, -70) + Set(LVar8, 0) + Set(LVar9, COLLIDER_mone) + Set(LVarA, MODEL_mone) + ExecWait(N(EVS_UseGate)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_UseGate_West) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar7, 70) - EVT_SET(LVar8, 0) - EVT_SET(LVar9, COLLIDER_monw) - EVT_SET(LVarA, MODEL_monw) - EVT_EXEC_WAIT(N(EVS_UseGate)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Set(LVar7, 70) + Set(LVar8, 0) + Set(LVar9, COLLIDER_monw) + Set(LVarA, MODEL_monw) + ExecWait(N(EVS_UseGate)) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_mim/mim_01/mim_01_1_music.c b/src/world/area_mim/mim_01/mim_01_1_music.c index 280b5213098..08baf782860 100644 --- a/src/world/area_mim/mim_01/mim_01_1_music.c +++ b/src/world/area_mim/mim_01/mim_01_1_music.c @@ -1,8 +1,8 @@ #include "mim_01.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_SPOOKY) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8) + Call(PlayAmbientSounds, AMBIENT_SPOOKY) + Return + End }; diff --git a/src/world/area_mim/mim_01/mim_01_2_main.c b/src/world/area_mim/mim_01/mim_01_2_main.c index 64827c2f706..ed9f27dcf7c 100644 --- a/src/world/area_mim/mim_01/mim_01_2_main.c +++ b/src/world/area_mim/mim_01/mim_01_2_main.c @@ -10,34 +10,34 @@ EvtScript N(EVS_ExitWalk_e) = EVT_EXIT_WALK(60, mim_01_ENTRY_3, "mim_02", mim_02 MAP_RODATA_PAD(1,main); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_n)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_w)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_s)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_e)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_n)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_w)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_s)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_e)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FOREVER_FOREST) - EVT_CALL(SetSpriteShading, SHADING_MIM_01) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 650) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SET(GF_MAP_ForeverForest, TRUE) - EVT_SET(AB_MIM_2, GB_MIM_CurrentMapID) - EVT_CALL(GetMapID, GB_MIM_CurrentMapID) - EVT_EXEC_WAIT(N(EVS_SetupGates)) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupExitHint)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_CALL(N(SetForeverForestFog)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_FOREVER_FOREST) + Call(SetSpriteShading, SHADING_MIM_01) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 650) + Call(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Set(GF_MAP_ForeverForest, TRUE) + Set(AB_MIM_2, GB_MIM_CurrentMapID) + Call(GetMapID, GB_MIM_CurrentMapID) + ExecWait(N(EVS_SetupGates)) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupExitHint)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Call(N(SetForeverForestFog)) + Exec(N(EVS_SetupMusic)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Return + End }; diff --git a/src/world/area_mim/mim_01/mim_01_3_entity.c b/src/world/area_mim/mim_01/mim_01_3_entity.c index f0e01558e99..11b7b9b6aea 100644 --- a/src/world/area_mim/mim_01/mim_01_3_entity.c +++ b/src/world/area_mim/mim_01/mim_01_3_entity.c @@ -3,23 +3,23 @@ #include "entity.h" EvtScript N(EVS_ReadSign) = { - EVT_CALL(IsStartingConversation, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_017E, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END + Call(IsStartingConversation, LVar0) + IfEq(LVar0, TRUE) + Return + EndIf + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_017E, 160, 40) + Call(DisablePlayerInput, FALSE) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Signpost), -300, 0, 0, 270, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_ReadSign))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Signpost), -300, 0, 0, 270, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_ReadSign))) + Return + End }; diff --git a/src/world/area_mim/mim_01/mim_01_4_hint.c b/src/world/area_mim/mim_01/mim_01_4_hint.c index a648f13181a..bc35edd9599 100644 --- a/src/world/area_mim/mim_01/mim_01_4_hint.c +++ b/src/world/area_mim/mim_01/mim_01_4_hint.c @@ -12,120 +12,120 @@ API_CALLABLE(N(GetFlowerNormal)) { N(GetFirstTriangleNormal)(mdl->modelNode->displayData->displayList, &x, &y, &z); - evt_set_variable(script, *args++, EVT_FLOAT_TO_FIXED(x)); - evt_set_variable(script, *args++, EVT_FLOAT_TO_FIXED(y)); - evt_set_variable(script, *args++, EVT_FLOAT_TO_FIXED(z)); + evt_set_variable(script, *args++, Float_TO_FIXED(x)); + evt_set_variable(script, *args++, Float_TO_FIXED(y)); + evt_set_variable(script, *args++, Float_TO_FIXED(z)); return ApiStatus_DONE2; } EvtScript N(EVS_LaughingFlowers) = { - EVT_CALL(PlaySoundAt, SOUND_CHECK_LAUGHING_FLOWERS, SOUND_SPACE_DEFAULT, 301, 0, -27) - EVT_LOOP(6) - EVT_SET(LVar0, 2) - EVT_CALL(TranslateModel, MODEL_ea_1, 0, 0, LVar0) - EVT_CALL(TranslateModel, MODEL_ea_2, 0, 0, LVar0) - EVT_CALL(TranslateModel, MODEL_eb_1, 0, 0, LVar0) - EVT_CALL(TranslateModel, MODEL_eb_2, 0, 0, LVar0) - EVT_CALL(TranslateModel, MODEL_ec_1, 0, 0, LVar0) - EVT_CALL(TranslateModel, MODEL_ec_2, 0, 0, LVar0) - EVT_CALL(TranslateModel, MODEL_atari_kusa, 0, 0, LVar0) - EVT_WAIT(1) - EVT_SET(LVar0, -2) - EVT_CALL(TranslateModel, MODEL_ea_1, 0, 0, LVar0) - EVT_CALL(TranslateModel, MODEL_ea_2, 0, 0, LVar0) - EVT_CALL(TranslateModel, MODEL_eb_1, 0, 0, LVar0) - EVT_CALL(TranslateModel, MODEL_eb_2, 0, 0, LVar0) - EVT_CALL(TranslateModel, MODEL_ec_1, 0, 0, LVar0) - EVT_CALL(TranslateModel, MODEL_ec_2, 0, 0, LVar0) - EVT_CALL(TranslateModel, MODEL_atari_kusa, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(TranslateModel, MODEL_ea_1, 0, 0, 0) - EVT_CALL(TranslateModel, MODEL_ea_2, 0, 0, 0) - EVT_CALL(TranslateModel, MODEL_eb_1, 0, 0, 0) - EVT_CALL(TranslateModel, MODEL_eb_2, 0, 0, 0) - EVT_CALL(TranslateModel, MODEL_ec_1, 0, 0, 0) - EVT_CALL(TranslateModel, MODEL_ec_2, 0, 0, 0) - EVT_CALL(TranslateModel, MODEL_atari_kusa, 0, 0, 0) - EVT_WAIT(20) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, -0x8000) - EVT_WAIT(2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, -0x10000) - EVT_WAIT(2) - EVT_CALL(PlaySoundAt, SOUND_FLOWERS_LAUGH, SOUND_SPACE_DEFAULT, 301, 0, -27) - EVT_CALL(MakeLerp, 0, 30, 50, EASING_COS_IN_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(N(GetFlowerNormal), MODEL_ea_1, LVar7, LVar8, LVar9) - EVT_CALL(RotateModel, MODEL_ea_1, LVar0, LVar7, LVar8, LVar9) - EVT_CALL(RotateModel, MODEL_ea_2, LVar0, LVar7, LVar8, LVar9) - EVT_CALL(N(GetFlowerNormal), MODEL_eb_1, LVar7, LVar8, LVar9) - EVT_CALL(RotateModel, MODEL_eb_1, LVar0, LVar7, LVar8, LVar9) - EVT_CALL(RotateModel, MODEL_eb_2, LVar0, LVar7, LVar8, LVar9) - EVT_CALL(N(GetFlowerNormal), MODEL_ec_1, LVar7, LVar8, LVar9) - EVT_CALL(RotateModel, MODEL_ec_1, LVar0, LVar7, LVar8, LVar9) - EVT_CALL(RotateModel, MODEL_ec_2, LVar0, LVar7, LVar8, LVar9) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_FLOWERS_LAUGH, SOUND_SPACE_DEFAULT, 301, 0, -27) - EVT_CALL(MakeLerp, 30, -30, 50, EASING_COS_IN_OUT) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_CALL(N(GetFlowerNormal), MODEL_ea_1, LVar7, LVar8, LVar9) - EVT_CALL(RotateModel, MODEL_ea_1, LVar0, LVar7, LVar8, LVar9) - EVT_CALL(RotateModel, MODEL_ea_2, LVar0, LVar7, LVar8, LVar9) - EVT_CALL(N(GetFlowerNormal), MODEL_eb_1, LVar7, LVar8, LVar9) - EVT_CALL(RotateModel, MODEL_eb_1, LVar0, LVar7, LVar8, LVar9) - EVT_CALL(RotateModel, MODEL_eb_2, LVar0, LVar7, LVar8, LVar9) - EVT_CALL(N(GetFlowerNormal), MODEL_ec_1, LVar7, LVar8, LVar9) - EVT_CALL(RotateModel, MODEL_ec_1, LVar0, LVar7, LVar8, LVar9) - EVT_CALL(RotateModel, MODEL_ec_2, LVar0, LVar7, LVar8, LVar9) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_FLOWERS_LAUGH, SOUND_SPACE_DEFAULT, 301, 0, -27) - EVT_CALL(MakeLerp, -30, 0, 50, EASING_COS_IN_OUT) - EVT_LABEL(30) - EVT_CALL(UpdateLerp) - EVT_CALL(N(GetFlowerNormal), MODEL_ea_1, LVar7, LVar8, LVar9) - EVT_CALL(RotateModel, MODEL_ea_1, LVar0, LVar7, LVar8, LVar9) - EVT_CALL(RotateModel, MODEL_ea_2, LVar0, LVar7, LVar8, LVar9) - EVT_CALL(N(GetFlowerNormal), MODEL_eb_1, LVar7, LVar8, LVar9) - EVT_CALL(RotateModel, MODEL_eb_1, LVar0, LVar7, LVar8, LVar9) - EVT_CALL(RotateModel, MODEL_eb_2, LVar0, LVar7, LVar8, LVar9) - EVT_CALL(N(GetFlowerNormal), MODEL_ec_1, LVar7, LVar8, LVar9) - EVT_CALL(RotateModel, MODEL_ec_1, LVar0, LVar7, LVar8, LVar9) - EVT_CALL(RotateModel, MODEL_ec_2, LVar0, LVar7, LVar8, LVar9) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(30) - EVT_END_IF - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, -0x8000) - EVT_WAIT(2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, 0) - EVT_WAIT(30) - EVT_RETURN - EVT_END + Call(PlaySoundAt, SOUND_CHECK_LAUGHING_FLOWERS, SOUND_SPACE_DEFAULT, 301, 0, -27) + Loop(6) + Set(LVar0, 2) + Call(TranslateModel, MODEL_ea_1, 0, 0, LVar0) + Call(TranslateModel, MODEL_ea_2, 0, 0, LVar0) + Call(TranslateModel, MODEL_eb_1, 0, 0, LVar0) + Call(TranslateModel, MODEL_eb_2, 0, 0, LVar0) + Call(TranslateModel, MODEL_ec_1, 0, 0, LVar0) + Call(TranslateModel, MODEL_ec_2, 0, 0, LVar0) + Call(TranslateModel, MODEL_atari_kusa, 0, 0, LVar0) + Wait(1) + Set(LVar0, -2) + Call(TranslateModel, MODEL_ea_1, 0, 0, LVar0) + Call(TranslateModel, MODEL_ea_2, 0, 0, LVar0) + Call(TranslateModel, MODEL_eb_1, 0, 0, LVar0) + Call(TranslateModel, MODEL_eb_2, 0, 0, LVar0) + Call(TranslateModel, MODEL_ec_1, 0, 0, LVar0) + Call(TranslateModel, MODEL_ec_2, 0, 0, LVar0) + Call(TranslateModel, MODEL_atari_kusa, 0, 0, LVar0) + Wait(1) + EndLoop + Call(TranslateModel, MODEL_ea_1, 0, 0, 0) + Call(TranslateModel, MODEL_ea_2, 0, 0, 0) + Call(TranslateModel, MODEL_eb_1, 0, 0, 0) + Call(TranslateModel, MODEL_eb_2, 0, 0, 0) + Call(TranslateModel, MODEL_ec_1, 0, 0, 0) + Call(TranslateModel, MODEL_ec_2, 0, 0, 0) + Call(TranslateModel, MODEL_atari_kusa, 0, 0, 0) + Wait(20) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, -0x8000) + Wait(2) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, -0x10000) + Wait(2) + Call(PlaySoundAt, SOUND_FLOWERS_LAUGH, SOUND_SPACE_DEFAULT, 301, 0, -27) + Call(MakeLerp, 0, 30, 50, EASING_COS_IN_OUT) + Label(10) + Call(UpdateLerp) + Call(N(GetFlowerNormal), MODEL_ea_1, LVar7, LVar8, LVar9) + Call(RotateModel, MODEL_ea_1, LVar0, LVar7, LVar8, LVar9) + Call(RotateModel, MODEL_ea_2, LVar0, LVar7, LVar8, LVar9) + Call(N(GetFlowerNormal), MODEL_eb_1, LVar7, LVar8, LVar9) + Call(RotateModel, MODEL_eb_1, LVar0, LVar7, LVar8, LVar9) + Call(RotateModel, MODEL_eb_2, LVar0, LVar7, LVar8, LVar9) + Call(N(GetFlowerNormal), MODEL_ec_1, LVar7, LVar8, LVar9) + Call(RotateModel, MODEL_ec_1, LVar0, LVar7, LVar8, LVar9) + Call(RotateModel, MODEL_ec_2, LVar0, LVar7, LVar8, LVar9) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(PlaySoundAt, SOUND_FLOWERS_LAUGH, SOUND_SPACE_DEFAULT, 301, 0, -27) + Call(MakeLerp, 30, -30, 50, EASING_COS_IN_OUT) + Label(20) + Call(UpdateLerp) + Call(N(GetFlowerNormal), MODEL_ea_1, LVar7, LVar8, LVar9) + Call(RotateModel, MODEL_ea_1, LVar0, LVar7, LVar8, LVar9) + Call(RotateModel, MODEL_ea_2, LVar0, LVar7, LVar8, LVar9) + Call(N(GetFlowerNormal), MODEL_eb_1, LVar7, LVar8, LVar9) + Call(RotateModel, MODEL_eb_1, LVar0, LVar7, LVar8, LVar9) + Call(RotateModel, MODEL_eb_2, LVar0, LVar7, LVar8, LVar9) + Call(N(GetFlowerNormal), MODEL_ec_1, LVar7, LVar8, LVar9) + Call(RotateModel, MODEL_ec_1, LVar0, LVar7, LVar8, LVar9) + Call(RotateModel, MODEL_ec_2, LVar0, LVar7, LVar8, LVar9) + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Call(PlaySoundAt, SOUND_FLOWERS_LAUGH, SOUND_SPACE_DEFAULT, 301, 0, -27) + Call(MakeLerp, -30, 0, 50, EASING_COS_IN_OUT) + Label(30) + Call(UpdateLerp) + Call(N(GetFlowerNormal), MODEL_ea_1, LVar7, LVar8, LVar9) + Call(RotateModel, MODEL_ea_1, LVar0, LVar7, LVar8, LVar9) + Call(RotateModel, MODEL_ea_2, LVar0, LVar7, LVar8, LVar9) + Call(N(GetFlowerNormal), MODEL_eb_1, LVar7, LVar8, LVar9) + Call(RotateModel, MODEL_eb_1, LVar0, LVar7, LVar8, LVar9) + Call(RotateModel, MODEL_eb_2, LVar0, LVar7, LVar8, LVar9) + Call(N(GetFlowerNormal), MODEL_ec_1, LVar7, LVar8, LVar9) + Call(RotateModel, MODEL_ec_1, LVar0, LVar7, LVar8, LVar9) + Call(RotateModel, MODEL_ec_2, LVar0, LVar7, LVar8, LVar9) + Wait(1) + IfEq(LVar1, 1) + Goto(30) + EndIf + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, -0x8000) + Wait(2) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, 0) + Wait(30) + Return + End }; EvtScript N(EVS_WaitForPlayerNearby) = { - EVT_LABEL(0) - EVT_CALL(AwaitPlayerApproach, 350, 0, 50) - EVT_EXEC_WAIT(N(EVS_LaughingFlowers)) - EVT_CALL(AwaitPlayerLeave, 350, 0, 50) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(AwaitPlayerApproach, 350, 0, 50) + ExecWait(N(EVS_LaughingFlowers)) + Call(AwaitPlayerLeave, 350, 0, 50) + Goto(0) + Return + End }; EvtScript N(EVS_SetupExitHint) = { - EVT_CALL(SetTexPanner, MODEL_ea_2, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_eb_2, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_ec_2, TEX_PANNER_1) - EVT_EXEC(N(EVS_WaitForPlayerNearby)) - EVT_RETURN - EVT_END + Call(SetTexPanner, MODEL_ea_2, TEX_PANNER_1) + Call(SetTexPanner, MODEL_eb_2, TEX_PANNER_1) + Call(SetTexPanner, MODEL_ec_2, TEX_PANNER_1) + Exec(N(EVS_WaitForPlayerNearby)) + Return + End }; diff --git a/src/world/area_mim/mim_01/mim_01_5_gate.c b/src/world/area_mim/mim_01/mim_01_5_gate.c index 03fc92ba328..a5b264c4cff 100644 --- a/src/world/area_mim/mim_01/mim_01_5_gate.c +++ b/src/world/area_mim/mim_01/mim_01_5_gate.c @@ -1,293 +1,293 @@ #include "mim_01.h" EvtScript N(EVS_SetGateCameraZones) = { - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(SetZoneEnabled, ZONE_north, TRUE) - EVT_CALL(SetZoneEnabled, ZONE_west, TRUE) - EVT_CALL(SetZoneEnabled, ZONE_south, TRUE) - EVT_CALL(SetZoneEnabled, ZONE_east, TRUE) - EVT_CALL(SetZoneEnabled, ZONE_higashi, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_nishi, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_minami, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_kita, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_stage, FALSE) - EVT_SET(LVar1, 0) - EVT_CASE_EQ(1) - EVT_CALL(SetZoneEnabled, ZONE_north, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_west, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_south, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_east, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_higashi, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_nishi, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_minami, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_kita, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_stage, TRUE) - EVT_SET(LVar1, 1) - EVT_CASE_EQ(2) - EVT_CALL(SetZoneEnabled, ZONE_north, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_west, TRUE) - EVT_CALL(SetZoneEnabled, ZONE_south, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_east, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_higashi, TRUE) - EVT_CALL(SetZoneEnabled, ZONE_nishi, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_minami, TRUE) - EVT_CALL(SetZoneEnabled, ZONE_kita, TRUE) - EVT_CALL(SetZoneEnabled, ZONE_stage, FALSE) - EVT_SET(LVar1, 2) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar1) + CaseEq(0) + Call(SetZoneEnabled, ZONE_north, TRUE) + Call(SetZoneEnabled, ZONE_west, TRUE) + Call(SetZoneEnabled, ZONE_south, TRUE) + Call(SetZoneEnabled, ZONE_east, TRUE) + Call(SetZoneEnabled, ZONE_higashi, FALSE) + Call(SetZoneEnabled, ZONE_nishi, FALSE) + Call(SetZoneEnabled, ZONE_minami, FALSE) + Call(SetZoneEnabled, ZONE_kita, FALSE) + Call(SetZoneEnabled, ZONE_stage, FALSE) + Set(LVar1, 0) + CaseEq(1) + Call(SetZoneEnabled, ZONE_north, FALSE) + Call(SetZoneEnabled, ZONE_west, FALSE) + Call(SetZoneEnabled, ZONE_south, FALSE) + Call(SetZoneEnabled, ZONE_east, FALSE) + Call(SetZoneEnabled, ZONE_higashi, FALSE) + Call(SetZoneEnabled, ZONE_nishi, FALSE) + Call(SetZoneEnabled, ZONE_minami, FALSE) + Call(SetZoneEnabled, ZONE_kita, FALSE) + Call(SetZoneEnabled, ZONE_stage, TRUE) + Set(LVar1, 1) + CaseEq(2) + Call(SetZoneEnabled, ZONE_north, FALSE) + Call(SetZoneEnabled, ZONE_west, TRUE) + Call(SetZoneEnabled, ZONE_south, FALSE) + Call(SetZoneEnabled, ZONE_east, FALSE) + Call(SetZoneEnabled, ZONE_higashi, TRUE) + Call(SetZoneEnabled, ZONE_nishi, FALSE) + Call(SetZoneEnabled, ZONE_minami, TRUE) + Call(SetZoneEnabled, ZONE_kita, TRUE) + Call(SetZoneEnabled, ZONE_stage, FALSE) + Set(LVar1, 2) + EndSwitch + Return + End }; EvtScript N(EVS_InitializeGates) = { - EVT_CALL(ParentColliderToModel, COLLIDER_monn, MODEL_n1) - EVT_CALL(RotateGroup, MODEL_monn, LVar2, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_monn) - EVT_CALL(ParentColliderToModel, COLLIDER_mons, MODEL_s1) - EVT_CALL(RotateGroup, MODEL_mons, LVar2, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_mons) - EVT_CALL(ParentColliderToModel, COLLIDER_mone, MODEL_e1) - EVT_CALL(RotateGroup, MODEL_mone, LVar2, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_mone) - EVT_CALL(ParentColliderToModel, COLLIDER_monw, MODEL_w1) - EVT_CALL(RotateGroup, MODEL_monw, 10, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_monw) - EVT_RETURN - EVT_END + Call(ParentColliderToModel, COLLIDER_monn, MODEL_n1) + Call(RotateGroup, MODEL_monn, LVar2, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_monn) + Call(ParentColliderToModel, COLLIDER_mons, MODEL_s1) + Call(RotateGroup, MODEL_mons, LVar2, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_mons) + Call(ParentColliderToModel, COLLIDER_mone, MODEL_e1) + Call(RotateGroup, MODEL_mone, LVar2, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_mone) + Call(ParentColliderToModel, COLLIDER_monw, MODEL_w1) + Call(RotateGroup, MODEL_monw, 10, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_monw) + Return + End }; EvtScript N(EVS_ResetGates) = { - EVT_CALL(RotateGroup, MODEL_monn, 0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_monn) - EVT_CALL(RotateGroup, MODEL_mons, 0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_mons) - EVT_CALL(RotateGroup, MODEL_mone, 0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_mone) - EVT_CALL(RotateGroup, MODEL_monw, 0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_monw) - EVT_RETURN - EVT_END + Call(RotateGroup, MODEL_monn, 0, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_monn) + Call(RotateGroup, MODEL_mons, 0, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_mons) + Call(RotateGroup, MODEL_mone, 0, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_mone) + Call(RotateGroup, MODEL_monw, 0, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_monw) + Return + End }; EvtScript N(EVS_PlayGateSounds) = { - EVT_CALL(PlaySoundAtCollider, LVar9, SOUND_FOREST_GATE_OPEN, SOUND_SPACE_DEFAULT) - EVT_WAIT(19) - EVT_CALL(PlaySoundAtCollider, LVar9, SOUND_FOREST_GATE_CLOSE, SOUND_SPACE_DEFAULT) - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, LVar9, SOUND_FOREST_GATE_OPEN, SOUND_SPACE_DEFAULT) + Wait(19) + Call(PlaySoundAtCollider, LVar9, SOUND_FOREST_GATE_CLOSE, SOUND_SPACE_DEFAULT) + Return + End }; EvtScript N(EVS_UseGate) = { - EVT_EXEC(N(EVS_PlayGateSounds)) - EVT_SWITCH(AB_MIM_1) - EVT_CASE_EQ(0) - EVT_THREAD - EVT_CALL(MakeLerp, 10, 90, 10, EASING_QUADRATIC_IN) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, LVar9) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(15) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, LVar7) - EVT_ADD(LVar2, LVar8) - EVT_CALL(PlayerMoveTo, LVar0, LVar2, 15) - EVT_END_THREAD - EVT_SET(LVar1, 1) - EVT_EXEC(N(EVS_SetGateCameraZones)) - EVT_CALL(MakeLerp, 90, 360, 30, EASING_LINEAR) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, LVar9) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_EXEC(N(EVS_ResetGates)) - EVT_SET(AB_MIM_1, 1) - EVT_SET(GF_MIM_ChoosingPath, TRUE) - EVT_CASE_EQ(1) - EVT_THREAD - EVT_CALL(MakeLerp, 360, 270, 10, EASING_QUADRATIC_IN) - EVT_LABEL(30) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, LVar9) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(30) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(15) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, LVar7) - EVT_SUB(LVar2, LVar8) - EVT_CALL(PlayerMoveTo, LVar0, LVar2, 15) - EVT_END_THREAD - EVT_SET(LVar1, 2) - EVT_EXEC(N(EVS_SetGateCameraZones)) - EVT_CALL(MakeLerp, 270, -10, 30, EASING_LINEAR) - EVT_LABEL(40) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, LVar9) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(40) - EVT_END_IF - EVT_SET(AB_MIM_1, 2) - EVT_CASE_EQ(2) - EVT_THREAD - EVT_CALL(MakeLerp, -10, 90, 10, EASING_QUADRATIC_IN) - EVT_LABEL(50) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, LVar9) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(50) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(15) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, LVar7) - EVT_ADD(LVar2, LVar8) - EVT_CALL(PlayerMoveTo, LVar0, LVar2, 15) - EVT_END_THREAD - EVT_SET(LVar1, 1) - EVT_EXEC(N(EVS_SetGateCameraZones)) - EVT_CALL(MakeLerp, 90, 360, 30, EASING_LINEAR) - EVT_LABEL(60) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, LVar9) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(60) - EVT_END_IF - EVT_EXEC(N(EVS_ResetGates)) - EVT_SET(AB_MIM_1, 1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Exec(N(EVS_PlayGateSounds)) + Switch(AB_MIM_1) + CaseEq(0) + Thread + Call(MakeLerp, 10, 90, 10, EASING_QUADRATIC_IN) + Label(10) + Call(UpdateLerp) + Call(RotateGroup, LVarA, LVar0, 0, 1, 0) + Call(UpdateColliderTransform, LVar9) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + EndThread + Wait(15) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, LVar7) + Add(LVar2, LVar8) + Call(PlayerMoveTo, LVar0, LVar2, 15) + EndThread + Set(LVar1, 1) + Exec(N(EVS_SetGateCameraZones)) + Call(MakeLerp, 90, 360, 30, EASING_LINEAR) + Label(20) + Call(UpdateLerp) + Call(RotateGroup, LVarA, LVar0, 0, 1, 0) + Call(UpdateColliderTransform, LVar9) + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Exec(N(EVS_ResetGates)) + Set(AB_MIM_1, 1) + Set(GF_MIM_ChoosingPath, TRUE) + CaseEq(1) + Thread + Call(MakeLerp, 360, 270, 10, EASING_QUADRATIC_IN) + Label(30) + Call(UpdateLerp) + Call(RotateGroup, LVarA, LVar0, 0, 1, 0) + Call(UpdateColliderTransform, LVar9) + Wait(1) + IfEq(LVar1, 1) + Goto(30) + EndIf + EndThread + Wait(15) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar0, LVar7) + Sub(LVar2, LVar8) + Call(PlayerMoveTo, LVar0, LVar2, 15) + EndThread + Set(LVar1, 2) + Exec(N(EVS_SetGateCameraZones)) + Call(MakeLerp, 270, -10, 30, EASING_LINEAR) + Label(40) + Call(UpdateLerp) + Call(RotateGroup, LVarA, LVar0, 0, 1, 0) + Call(UpdateColliderTransform, LVar9) + Wait(1) + IfEq(LVar1, 1) + Goto(40) + EndIf + Set(AB_MIM_1, 2) + CaseEq(2) + Thread + Call(MakeLerp, -10, 90, 10, EASING_QUADRATIC_IN) + Label(50) + Call(UpdateLerp) + Call(RotateGroup, LVarA, LVar0, 0, 1, 0) + Call(UpdateColliderTransform, LVar9) + Wait(1) + IfEq(LVar1, 1) + Goto(50) + EndIf + EndThread + Wait(15) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, LVar7) + Add(LVar2, LVar8) + Call(PlayerMoveTo, LVar0, LVar2, 15) + EndThread + Set(LVar1, 1) + Exec(N(EVS_SetGateCameraZones)) + Call(MakeLerp, 90, 360, 30, EASING_LINEAR) + Label(60) + Call(UpdateLerp) + Call(RotateGroup, LVarA, LVar0, 0, 1, 0) + Call(UpdateColliderTransform, LVar9) + Wait(1) + IfEq(LVar1, 1) + Goto(60) + EndIf + Exec(N(EVS_ResetGates)) + Set(AB_MIM_1, 1) + EndSwitch + Return + End }; EvtScript N(EVS_UseGate_North) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 70) - EVT_SET(LVar9, 26) - EVT_SET(LVarA, 155) - EVT_EXEC_WAIT(N(EVS_UseGate)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Set(LVar7, 0) + Set(LVar8, 70) + Set(LVar9, 26) + Set(LVarA, 155) + ExecWait(N(EVS_UseGate)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_UseGate_South) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, -70) - EVT_SET(LVar9, 30) - EVT_SET(LVarA, 161) - EVT_EXEC_WAIT(N(EVS_UseGate)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Set(LVar7, 0) + Set(LVar8, -70) + Set(LVar9, 30) + Set(LVarA, 161) + ExecWait(N(EVS_UseGate)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_UseGate_East) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar7, -70) - EVT_SET(LVar8, 0) - EVT_SET(LVar9, 28) - EVT_SET(LVarA, 158) - EVT_EXEC_WAIT(N(EVS_UseGate)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Set(LVar7, -70) + Set(LVar8, 0) + Set(LVar9, 28) + Set(LVarA, 158) + ExecWait(N(EVS_UseGate)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_UseGate_West) = { - EVT_SET(LVar9, 32) - EVT_EXEC(N(EVS_PlayGateSounds)) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_NE(AB_MIM_1, 1) - EVT_THREAD - EVT_CALL(MakeLerp, 10, 90, 10, EASING_QUADRATIC_IN) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_monw, LVar0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_monw) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(15) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 70) - EVT_CALL(PlayerMoveTo, LVar0, LVar2, 15) - EVT_END_THREAD - EVT_SET(LVar1, 1) - EVT_EXEC(N(EVS_SetGateCameraZones)) - EVT_CALL(MakeLerp, 90, 360, 30, EASING_LINEAR) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_monw, LVar0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_monw) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_EXEC(N(EVS_ResetGates)) - EVT_SET(AB_MIM_1, 1) - EVT_SET(GF_MIM_ChoosingPath, TRUE) - EVT_ELSE - EVT_THREAD - EVT_CALL(MakeLerp, 360, 270, 10, EASING_QUADRATIC_IN) - EVT_LABEL(30) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_monw, LVar0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_monw) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(30) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(15) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 70) - EVT_CALL(PlayerMoveTo, LVar0, LVar2, 15) - EVT_END_THREAD - EVT_SET(LVar1, 2) - EVT_EXEC(N(EVS_SetGateCameraZones)) - EVT_CALL(MakeLerp, 270, 10, 30, EASING_LINEAR) - EVT_LABEL(40) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_monw, LVar0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_monw) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(40) - EVT_END_IF - EVT_SET(AB_MIM_1, 0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Set(LVar9, 32) + Exec(N(EVS_PlayGateSounds)) + Call(DisablePlayerInput, TRUE) + IfNe(AB_MIM_1, 1) + Thread + Call(MakeLerp, 10, 90, 10, EASING_QUADRATIC_IN) + Label(10) + Call(UpdateLerp) + Call(RotateGroup, MODEL_monw, LVar0, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_monw) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + EndThread + Wait(15) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 70) + Call(PlayerMoveTo, LVar0, LVar2, 15) + EndThread + Set(LVar1, 1) + Exec(N(EVS_SetGateCameraZones)) + Call(MakeLerp, 90, 360, 30, EASING_LINEAR) + Label(20) + Call(UpdateLerp) + Call(RotateGroup, MODEL_monw, LVar0, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_monw) + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Exec(N(EVS_ResetGates)) + Set(AB_MIM_1, 1) + Set(GF_MIM_ChoosingPath, TRUE) + Else + Thread + Call(MakeLerp, 360, 270, 10, EASING_QUADRATIC_IN) + Label(30) + Call(UpdateLerp) + Call(RotateGroup, MODEL_monw, LVar0, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_monw) + Wait(1) + IfEq(LVar1, 1) + Goto(30) + EndIf + EndThread + Wait(15) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar0, 70) + Call(PlayerMoveTo, LVar0, LVar2, 15) + EndThread + Set(LVar1, 2) + Exec(N(EVS_SetGateCameraZones)) + Call(MakeLerp, 270, 10, 30, EASING_LINEAR) + Label(40) + Call(UpdateLerp) + Call(RotateGroup, MODEL_monw, LVar0, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_monw) + Wait(1) + IfEq(LVar1, 1) + Goto(40) + EndIf + Set(AB_MIM_1, 0) + EndIf + Call(DisablePlayerInput, FALSE) + Return + End }; #include "../common/SetupGates.inc.c" diff --git a/src/world/area_mim/mim_02/mim_02_1_music.c b/src/world/area_mim/mim_02/mim_02_1_music.c index ef402e08c30..94f8a93ef5e 100644 --- a/src/world/area_mim/mim_02/mim_02_1_music.c +++ b/src/world/area_mim/mim_02/mim_02_1_music.c @@ -1,8 +1,8 @@ #include "mim_02.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_SPOOKY) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8) + Call(PlayAmbientSounds, AMBIENT_SPOOKY) + Return + End }; diff --git a/src/world/area_mim/mim_02/mim_02_2_main.c b/src/world/area_mim/mim_02/mim_02_2_main.c index 9341354c1f1..935f3dc2006 100644 --- a/src/world/area_mim/mim_02/mim_02_2_main.c +++ b/src/world/area_mim/mim_02/mim_02_2_main.c @@ -8,32 +8,32 @@ EvtScript N(EVS_ExitWalk_n) = EVT_EXIT_WALK(60, mim_02_ENTRY_2, "mim_01", mim_01 EvtScript N(EVS_ExitWalk_w) = EVT_EXIT_WALK(60, mim_02_ENTRY_3, "mim_01", mim_01_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_s)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_e)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_n)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_w)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_s)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_e)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_n)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_w)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FOREVER_FOREST) - EVT_CALL(SetSpriteShading, SHADING_MIM_02) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 650) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SET(AB_MIM_2, GB_MIM_CurrentMapID) - EVT_CALL(GetMapID, GB_MIM_CurrentMapID) - EVT_EXEC_WAIT(N(EVS_SetupGates)) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_SetupExitHint)) - EVT_CALL(N(SetForeverForestFog)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_FOREVER_FOREST) + Call(SetSpriteShading, SHADING_MIM_02) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 650) + Call(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Set(AB_MIM_2, GB_MIM_CurrentMapID) + Call(GetMapID, GB_MIM_CurrentMapID) + ExecWait(N(EVS_SetupGates)) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_SetupExitHint)) + Call(N(SetForeverForestFog)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Return + End }; diff --git a/src/world/area_mim/mim_02/mim_02_3_npc.c b/src/world/area_mim/mim_02/mim_02_3_npc.c index 63fc7191203..2e9048ba1c5 100644 --- a/src/world/area_mim/mim_02/mim_02_3_npc.c +++ b/src/world/area_mim/mim_02/mim_02_3_npc.c @@ -1,8 +1,8 @@ #include "mim_02.h" EvtScript N(EVS_Unused_DoNothing) = { - EVT_RETURN - EVT_END + Return + End }; #include "world/common/npc/Oaklie.inc.c" @@ -17,143 +17,143 @@ s32 N(KeyList)[] = { #include "world/common/complete/KeyItemChoice.inc.c" EvtScript N(EVS_NpcInteract_Oaklie) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH3_INVITED_TO_BOOS_MANSION) - EVT_CALL(SpeakToPlayer, NPC_Oaklie, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_0006) - EVT_RETURN - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_Oaklie, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_0007) - EVT_CALL(SetNpcFlagBits, NPC_Oaklie, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_WAIT(5 * DT) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Jump) - EVT_WAIT(15 * DT) - EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Fall) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -426, 58, -70) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(6.0), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_Oaklie, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcJumpscale, NPC_Oaklie, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_Oaklie, -426, 58, -70, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Land) - EVT_WAIT(5 * DT) - EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Idle) - EVT_CALL(SpeakToPlayer, NPC_Oaklie, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_0008) - EVT_WAIT(5 * DT) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Jump) - EVT_WAIT(15 * DT) - EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Fall) - EVT_END_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_Oaklie, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Oaklie, -333, 0, -81, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Land) - EVT_WAIT(5 * DT) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Jump) - EVT_WAIT(15 * DT) - EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Fall) - EVT_END_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_Oaklie, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Oaklie, -300, 0, -170, 15 * DT) - EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Land) - EVT_WAIT(5 * DT) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Jump) - EVT_WAIT(15 * DT) - EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Fall) - EVT_END_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_Oaklie, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Oaklie, -226, 0, -245, 15 * DT) - EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Land) - EVT_WAIT(5 * DT) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Jump) - EVT_WAIT(15 * DT) - EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Fall) - EVT_END_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_Oaklie, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Oaklie, -160, 0, -296, 15 * DT) - EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Land) - EVT_WAIT(5 * DT) - EVT_CALL(SetNpcPos, NPC_Oaklie, NPC_DISPOSE_LOCATION) - EVT_SET(GB_StoryProgress, STORY_CH3_ALLOWED_INTO_FOREVER_FOREST) - EVT_EXEC_WAIT(N(EVS_EnableWestGate)) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH3_INVITED_TO_BOOS_MANSION) + Call(SpeakToPlayer, NPC_Oaklie, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_0006) + Return + EndIf + Call(SpeakToPlayer, NPC_Oaklie, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_0007) + Call(SetNpcFlagBits, NPC_Oaklie, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Wait(5 * DT) + Thread + Call(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Jump) + Wait(15 * DT) + Call(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Fall) + EndThread + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, -426, 58, -70) + Call(SetCamPitch, CAM_DEFAULT, Float(6.0), Float(-6.0)) + Call(SetCamDistance, CAM_DEFAULT, 250) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndThread + Call(PlaySoundAtNpc, NPC_Oaklie, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(SetNpcJumpscale, NPC_Oaklie, Float(1.0)) + Call(NpcJump0, NPC_Oaklie, -426, 58, -70, 20 * DT) + Call(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Land) + Wait(5 * DT) + Call(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Idle) + Call(SpeakToPlayer, NPC_Oaklie, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_0008) + Wait(5 * DT) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + EndThread + Thread + Call(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Jump) + Wait(15 * DT) + Call(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Fall) + EndThread + Call(PlaySoundAtNpc, NPC_Oaklie, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Oaklie, -333, 0, -81, 20 * DT) + Call(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Land) + Wait(5 * DT) + Thread + Call(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Jump) + Wait(15 * DT) + Call(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Fall) + EndThread + Call(PlaySoundAtNpc, NPC_Oaklie, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Oaklie, -300, 0, -170, 15 * DT) + Call(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Land) + Wait(5 * DT) + Thread + Call(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Jump) + Wait(15 * DT) + Call(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Fall) + EndThread + Call(PlaySoundAtNpc, NPC_Oaklie, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Oaklie, -226, 0, -245, 15 * DT) + Call(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Land) + Wait(5 * DT) + Thread + Call(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Jump) + Wait(15 * DT) + Call(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Fall) + EndThread + Call(PlaySoundAtNpc, NPC_Oaklie, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Oaklie, -160, 0, -296, 15 * DT) + Call(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Land) + Wait(5 * DT) + Call(SetNpcPos, NPC_Oaklie, NPC_DISPOSE_LOCATION) + Set(GB_StoryProgress, STORY_CH3_ALLOWED_INTO_FOREVER_FOREST) + ExecWait(N(EVS_EnableWestGate)) + Return + End }; EvtScript N(EVS_NpcIdle_Oaklie) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_ALLOWED_INTO_FOREVER_FOREST) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(25) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(6.0), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Oaklie, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_0003) - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Jump) - EVT_WAIT(5 * DT) - EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Fall) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_END_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_Oaklie, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_SELF, -455, 0, 0, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Land) - EVT_WAIT(5 * DT) - EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Idle) - EVT_WAIT(15 * DT) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_RETURNED_TO_TOAD_TOWN) - EVT_CALL(SpeakToPlayer, NPC_Oaklie, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_0004) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Oaklie, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_0005) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_ALLOWED_INTO_FOREVER_FOREST) + Call(DisablePlayerInput, TRUE) + Wait(25) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamPitch, CAM_DEFAULT, Float(6.0), Float(-6.0)) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Oaklie, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_0003) + Wait(10 * DT) + Thread + Call(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Jump) + Wait(5 * DT) + Call(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Fall) + EndThread + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + EndThread + Call(PlaySoundAtNpc, NPC_Oaklie, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Call(NpcJump0, NPC_SELF, -455, 0, 0, 20 * DT) + Call(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Land) + Wait(5 * DT) + Call(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Idle) + Wait(15 * DT) + IfLt(GB_StoryProgress, STORY_CH1_RETURNED_TO_TOAD_TOWN) + Call(SpeakToPlayer, NPC_Oaklie, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_0004) + Else + Call(SpeakToPlayer, NPC_Oaklie, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_0005) + EndIf + Call(DisablePlayerInput, FALSE) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Oaklie) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Oaklie))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Oaklie))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_GE(STORY_CH3_ALLOWED_INTO_FOREVER_FOREST) - EVT_CALL(SetNpcPos, NPC_Oaklie, NPC_DISPOSE_LOCATION) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Oaklie))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Oaklie))) + Switch(GB_StoryProgress) + CaseGe(STORY_CH3_ALLOWED_INTO_FOREVER_FOREST) + Call(SetNpcPos, NPC_Oaklie, NPC_DISPOSE_LOCATION) + EndSwitch + Return + End }; NpcData N(NpcData_Oaklie) = { diff --git a/src/world/area_mim/mim_02/mim_02_4_gate.c b/src/world/area_mim/mim_02/mim_02_4_gate.c index 805b1e58d79..6e3139b0e21 100644 --- a/src/world/area_mim/mim_02/mim_02_4_gate.c +++ b/src/world/area_mim/mim_02/mim_02_4_gate.c @@ -5,86 +5,86 @@ #include "../common/AnimateGates.inc.c" EvtScript N(EVS_UseGate_North) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 70) - EVT_SET(LVar9, COLLIDER_monn) - EVT_SET(LVarA, MODEL_monn) - EVT_EXEC_WAIT(N(EVS_UseGate)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Set(LVar7, 0) + Set(LVar8, 70) + Set(LVar9, COLLIDER_monn) + Set(LVarA, MODEL_monn) + ExecWait(N(EVS_UseGate)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_UseGate_South) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, -70) - EVT_SET(LVar9, COLLIDER_mons) - EVT_SET(LVarA, MODEL_mons) - EVT_EXEC_WAIT(N(EVS_UseGate)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Set(LVar7, 0) + Set(LVar8, -70) + Set(LVar9, COLLIDER_mons) + Set(LVarA, MODEL_mons) + ExecWait(N(EVS_UseGate)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_UseGate_East) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar7, -70) - EVT_SET(LVar8, 0) - EVT_SET(LVar9, COLLIDER_mone) - EVT_SET(LVarA, MODEL_mone) - EVT_EXEC_WAIT(N(EVS_UseGate)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Set(LVar7, -70) + Set(LVar8, 0) + Set(LVar9, COLLIDER_mone) + Set(LVarA, MODEL_mone) + ExecWait(N(EVS_UseGate)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_UseGate_West) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar7, 70) - EVT_SET(LVar8, 0) - EVT_SET(LVar9, COLLIDER_monw) - EVT_SET(LVarA, MODEL_monw) - EVT_EXEC_WAIT(N(EVS_UseGate)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Set(LVar7, 70) + Set(LVar8, 0) + Set(LVar9, COLLIDER_monw) + Set(LVarA, MODEL_monw) + ExecWait(N(EVS_UseGate)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SetupGates) = { - EVT_IF_EQ(GF_MIM_ChoosingPath, FALSE) - EVT_SET(GF_MIM_ChoosingPath, TRUE) - EVT_SET(AB_MIM_1, 2) - EVT_SET(LVar1, 2) - EVT_SET(LVar2, -10) - EVT_ELSE - EVT_SET(GF_MIM_ChoosingPath, FALSE) - EVT_SET(AB_MIM_1, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 10) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_SetGateCameraZones)) - EVT_EXEC(N(EVS_InitializeGates)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseGate_North)), TRIGGER_WALL_PRESS_A, COLLIDER_monn, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseGate_South)), TRIGGER_WALL_PRESS_A, COLLIDER_mons, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseGate_East)), TRIGGER_WALL_PRESS_A, COLLIDER_mone, 1, 0) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_ALLOWED_INTO_FOREVER_FOREST) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseGate_West)), TRIGGER_WALL_PRESS_A, COLLIDER_monw, 1, 0) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_MIM_ChoosingPath, FALSE) + Set(GF_MIM_ChoosingPath, TRUE) + Set(AB_MIM_1, 2) + Set(LVar1, 2) + Set(LVar2, -10) + Else + Set(GF_MIM_ChoosingPath, FALSE) + Set(AB_MIM_1, 0) + Set(LVar1, 0) + Set(LVar2, 10) + EndIf + ExecWait(N(EVS_SetGateCameraZones)) + Exec(N(EVS_InitializeGates)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + BindTrigger(Ref(N(EVS_UseGate_North)), TRIGGER_WALL_PRESS_A, COLLIDER_monn, 1, 0) + BindTrigger(Ref(N(EVS_UseGate_South)), TRIGGER_WALL_PRESS_A, COLLIDER_mons, 1, 0) + BindTrigger(Ref(N(EVS_UseGate_East)), TRIGGER_WALL_PRESS_A, COLLIDER_mone, 1, 0) + IfGe(GB_StoryProgress, STORY_CH3_ALLOWED_INTO_FOREVER_FOREST) + BindTrigger(Ref(N(EVS_UseGate_West)), TRIGGER_WALL_PRESS_A, COLLIDER_monw, 1, 0) + EndIf + Return + End }; EvtScript N(EVS_EnableWestGate) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseGate_West)), TRIGGER_WALL_PRESS_A, COLLIDER_monw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_UseGate_West)), TRIGGER_WALL_PRESS_A, COLLIDER_monw, 1, 0) + Return + End }; diff --git a/src/world/area_mim/mim_02/mim_02_5_hint.c b/src/world/area_mim/mim_02/mim_02_5_hint.c index 1e03dd11ae8..b9359cdf201 100644 --- a/src/world/area_mim/mim_02/mim_02_5_hint.c +++ b/src/world/area_mim/mim_02/mim_02_5_hint.c @@ -1,32 +1,32 @@ #include "mim_02.h" EvtScript N(EVS_SetupExitHint) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SET(LVar0, 0) - EVT_CALL(EnableModel, MODEL_o414, TRUE) - EVT_CALL(EnableModel, MODEL_me, FALSE) - EVT_LABEL(10) - EVT_CALL(AwaitPlayerApproach, 20, -340, 50) - EVT_CALL(RandInt, 1, LVar2) - EVT_ADD(LVar2, 1) - EVT_CALL(EnableModel, MODEL_o414, FALSE) - EVT_CALL(EnableModel, MODEL_me, TRUE) - EVT_CALL(PlaySoundAt, SOUND_IMPISH_LAUGH, SOUND_SPACE_DEFAULT, 10, 110, -200) - EVT_LOOP(LVar2) - EVT_CALL(EnableModel, MODEL_o414, TRUE) - EVT_CALL(EnableModel, MODEL_me, FALSE) - EVT_WAIT(2) - EVT_CALL(EnableModel, MODEL_o414, FALSE) - EVT_CALL(EnableModel, MODEL_me, TRUE) - EVT_CALL(RandInt, 5, LVar3) - EVT_ADD(LVar3, 2) - EVT_WAIT(LVar3) - EVT_END_LOOP - EVT_WAIT(20) - EVT_CALL(EnableModel, MODEL_o414, TRUE) - EVT_CALL(EnableModel, MODEL_me, FALSE) - EVT_WAIT(60) - EVT_GOTO(10) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Set(LVar0, 0) + Call(EnableModel, MODEL_o414, TRUE) + Call(EnableModel, MODEL_me, FALSE) + Label(10) + Call(AwaitPlayerApproach, 20, -340, 50) + Call(RandInt, 1, LVar2) + Add(LVar2, 1) + Call(EnableModel, MODEL_o414, FALSE) + Call(EnableModel, MODEL_me, TRUE) + Call(PlaySoundAt, SOUND_IMPISH_LAUGH, SOUND_SPACE_DEFAULT, 10, 110, -200) + Loop(LVar2) + Call(EnableModel, MODEL_o414, TRUE) + Call(EnableModel, MODEL_me, FALSE) + Wait(2) + Call(EnableModel, MODEL_o414, FALSE) + Call(EnableModel, MODEL_me, TRUE) + Call(RandInt, 5, LVar3) + Add(LVar3, 2) + Wait(LVar3) + EndLoop + Wait(20) + Call(EnableModel, MODEL_o414, TRUE) + Call(EnableModel, MODEL_me, FALSE) + Wait(60) + Goto(10) + Return + End }; diff --git a/src/world/area_mim/mim_03/mim_03_1_music.c b/src/world/area_mim/mim_03/mim_03_1_music.c index 01aa2ff5a5c..2cd5ffcd842 100644 --- a/src/world/area_mim/mim_03/mim_03_1_music.c +++ b/src/world/area_mim/mim_03/mim_03_1_music.c @@ -1,8 +1,8 @@ #include "mim_03.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_SPOOKY) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8) + Call(PlayAmbientSounds, AMBIENT_SPOOKY) + Return + End }; diff --git a/src/world/area_mim/mim_03/mim_03_2_main.c b/src/world/area_mim/mim_03/mim_03_2_main.c index 1c99ebdb578..e1e8f2dfa27 100644 --- a/src/world/area_mim/mim_03/mim_03_2_main.c +++ b/src/world/area_mim/mim_03/mim_03_2_main.c @@ -13,44 +13,44 @@ EvtScript N(EVS_ExitWalk_s) = EVT_EXIT_WALK(60, mim_03_ENTRY_2, "mim_02", mim_02 EvtScript N(EVS_ExitWalk_e) = EVT_EXIT_WALK(60, mim_03_ENTRY_3, "mim_01", mim_01_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_n)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_w)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_s)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_e)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_n)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_w)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_s)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_e)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FOREVER_FOREST) - EVT_CALL(SetSpriteShading, SHADING_MIM_03) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 650) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SET(AB_MIM_2, GB_MIM_CurrentMapID) - EVT_CALL(GetMapID, GB_MIM_CurrentMapID) - EVT_SET(AF_MIM03_Oaklie_DialogueToggle, FALSE) - EVT_EXEC_WAIT(N(EVS_SetupGates)) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC_WAIT(N(EVS_SetupExitHint)) - EVT_CALL(N(SetForeverForestFog)) - EVT_THREAD - EVT_LABEL(0) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(N(GetPlayerDistFromMapCenter)) - EVT_IF_LT(LVar0, 350) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_ELSE - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_END_IF - EVT_GOTO(0) - EVT_END_THREAD - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_FOREVER_FOREST) + Call(SetSpriteShading, SHADING_MIM_03) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 650) + Call(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Set(AB_MIM_2, GB_MIM_CurrentMapID) + Call(GetMapID, GB_MIM_CurrentMapID) + Set(AF_MIM03_Oaklie_DialogueToggle, FALSE) + ExecWait(N(EVS_SetupGates)) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Exec(N(EVS_SetupMusic)) + ExecWait(N(EVS_SetupExitHint)) + Call(N(SetForeverForestFog)) + Thread + Label(0) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(N(GetPlayerDistFromMapCenter)) + IfLt(LVar0, 350) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Else + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + EndIf + Goto(0) + EndThread + Return + End }; diff --git a/src/world/area_mim/mim_03/mim_03_3_entity.c b/src/world/area_mim/mim_03/mim_03_3_entity.c index ae06b80e4b2..613fd28f040 100644 --- a/src/world/area_mim/mim_03/mim_03_3_entity.c +++ b/src/world/area_mim/mim_03/mim_03_3_entity.c @@ -1,6 +1,6 @@ #include "mim_03.h" EvtScript N(EVS_MakeEntities) = { - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/area_mim/mim_03/mim_03_4_hint.c b/src/world/area_mim/mim_03/mim_03_4_hint.c index 8452493c7b4..e1108c02cd3 100644 --- a/src/world/area_mim/mim_03/mim_03_4_hint.c +++ b/src/world/area_mim/mim_03/mim_03_4_hint.c @@ -12,9 +12,9 @@ API_CALLABLE(N(GetFlowerNormal)) { N(GetFirstTriangleNormal)(mdl->modelNode->displayData->displayList, &x, &y, &z); - evt_set_variable(script, *args++, EVT_FLOAT_TO_FIXED(x)); - evt_set_variable(script, *args++, EVT_FLOAT_TO_FIXED(y)); - evt_set_variable(script, *args++, EVT_FLOAT_TO_FIXED(z)); + evt_set_variable(script, *args++, Float_TO_FIXED(x)); + evt_set_variable(script, *args++, Float_TO_FIXED(y)); + evt_set_variable(script, *args++, Float_TO_FIXED(z)); return ApiStatus_DONE2; } @@ -44,139 +44,139 @@ s32 N(FlowerModels_East)[] = { }; EvtScript N(EVS_FlowersReact_Wrong) = { - EVT_CALL(SetTexPanOffset, LVar9, 0, 0, -0x8000) - EVT_WAIT(2) - EVT_CALL(SetTexPanOffset, LVar9, 0, 0, -0x10000) - EVT_WAIT(2) - EVT_CALL(MakeLerp, 0, 720, 200, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_USE_BUF(LVar8) - EVT_LOOP(3) - EVT_BUF_READ2(LVar6, LVar7) - EVT_CALL(N(GetFlowerNormal), LVar6, LVar3, LVar4, LVar5) - EVT_CALL(RotateModel, LVar6, LVar0, LVar3, LVar4, LVar5) - EVT_CALL(RotateModel, LVar7, LVar0, LVar3, LVar4, LVar5) - EVT_END_LOOP - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetTexPanOffset, LVar9, 0, 0, -0x8000) - EVT_WAIT(2) - EVT_CALL(SetTexPanOffset, LVar9, 0, 0, 0) - EVT_WAIT(2) - EVT_RETURN - EVT_END + Call(SetTexPanOffset, LVar9, 0, 0, -0x8000) + Wait(2) + Call(SetTexPanOffset, LVar9, 0, 0, -0x10000) + Wait(2) + Call(MakeLerp, 0, 720, 200, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + UseBuf(LVar8) + Loop(3) + BufRead2(LVar6, LVar7) + Call(N(GetFlowerNormal), LVar6, LVar3, LVar4, LVar5) + Call(RotateModel, LVar6, LVar0, LVar3, LVar4, LVar5) + Call(RotateModel, LVar7, LVar0, LVar3, LVar4, LVar5) + EndLoop + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(SetTexPanOffset, LVar9, 0, 0, -0x8000) + Wait(2) + Call(SetTexPanOffset, LVar9, 0, 0, 0) + Wait(2) + Return + End }; EvtScript N(EVS_FlowersReact_Correct) = { - EVT_LOOP(2) - EVT_CALL(SetTexPanOffset, LVar9, 0, 0, -0x8000) - EVT_WAIT(2) - EVT_CALL(MakeLerp, 0, 30, 50, EASING_COS_IN_OUT) - EVT_LABEL(5) - EVT_CALL(UpdateLerp) - EVT_USE_BUF(LVar8) - EVT_LOOP(4) - EVT_BUF_READ2(LVar6, LVar7) - EVT_CALL(N(GetFlowerNormal), LVar6, LVar3, LVar4, LVar5) - EVT_CALL(RotateModel, LVar6, LVar0, LVar3, LVar4, LVar5) - EVT_CALL(RotateModel, LVar7, LVar0, LVar3, LVar4, LVar5) - EVT_END_LOOP - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(5) - EVT_END_IF - EVT_CALL(MakeLerp, 30, -30, 50, EASING_COS_IN_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_USE_BUF(LVar8) - EVT_LOOP(4) - EVT_BUF_READ2(LVar6, LVar7) - EVT_CALL(N(GetFlowerNormal), LVar6, LVar3, LVar4, LVar5) - EVT_CALL(RotateModel, LVar6, LVar0, LVar3, LVar4, LVar5) - EVT_CALL(RotateModel, LVar7, LVar0, LVar3, LVar4, LVar5) - EVT_END_LOOP - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(MakeLerp, -30, 0, 50, EASING_COS_IN_OUT) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_USE_BUF(LVar8) - EVT_LOOP(4) - EVT_BUF_READ2(LVar6, LVar7) - EVT_CALL(N(GetFlowerNormal), LVar6, LVar3, LVar4, LVar5) - EVT_CALL(RotateModel, LVar6, LVar0, LVar3, LVar4, LVar5) - EVT_CALL(RotateModel, LVar7, LVar0, LVar3, LVar4, LVar5) - EVT_END_LOOP - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(SetTexPanOffset, LVar9, 0, 0, 0) - EVT_WAIT(2) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(2) + Call(SetTexPanOffset, LVar9, 0, 0, -0x8000) + Wait(2) + Call(MakeLerp, 0, 30, 50, EASING_COS_IN_OUT) + Label(5) + Call(UpdateLerp) + UseBuf(LVar8) + Loop(4) + BufRead2(LVar6, LVar7) + Call(N(GetFlowerNormal), LVar6, LVar3, LVar4, LVar5) + Call(RotateModel, LVar6, LVar0, LVar3, LVar4, LVar5) + Call(RotateModel, LVar7, LVar0, LVar3, LVar4, LVar5) + EndLoop + Wait(1) + IfEq(LVar1, 1) + Goto(5) + EndIf + Call(MakeLerp, 30, -30, 50, EASING_COS_IN_OUT) + Label(10) + Call(UpdateLerp) + UseBuf(LVar8) + Loop(4) + BufRead2(LVar6, LVar7) + Call(N(GetFlowerNormal), LVar6, LVar3, LVar4, LVar5) + Call(RotateModel, LVar6, LVar0, LVar3, LVar4, LVar5) + Call(RotateModel, LVar7, LVar0, LVar3, LVar4, LVar5) + EndLoop + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(MakeLerp, -30, 0, 50, EASING_COS_IN_OUT) + Label(20) + Call(UpdateLerp) + UseBuf(LVar8) + Loop(4) + BufRead2(LVar6, LVar7) + Call(N(GetFlowerNormal), LVar6, LVar3, LVar4, LVar5) + Call(RotateModel, LVar6, LVar0, LVar3, LVar4, LVar5) + Call(RotateModel, LVar7, LVar0, LVar3, LVar4, LVar5) + EndLoop + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Call(SetTexPanOffset, LVar9, 0, 0, 0) + Wait(2) + EndLoop + Return + End }; EvtScript N(EVS_CheckFlowers_North) = { - EVT_CALL(PlaySoundAt, SOUND_FLOWERS_LIGHT_GIGGLE, SOUND_SPACE_DEFAULT, 0, 0, -300) - EVT_SET(LVar8, EVT_PTR(N(FlowerModels_North))) - EVT_SET(LVar9, 0) - EVT_EXEC_WAIT(N(EVS_FlowersReact_Wrong)) - EVT_RETURN - EVT_END + Call(PlaySoundAt, SOUND_FLOWERS_LIGHT_GIGGLE, SOUND_SPACE_DEFAULT, 0, 0, -300) + Set(LVar8, Ref(N(FlowerModels_North))) + Set(LVar9, 0) + ExecWait(N(EVS_FlowersReact_Wrong)) + Return + End }; EvtScript N(EVS_CheckFlowers_West) = { - EVT_CALL(PlaySoundAt, SOUND_FLOWERS_SAD_GIGGLE, SOUND_SPACE_DEFAULT, -300, 0, 0) - EVT_SET(LVar8, EVT_PTR(N(FlowerModels_West))) - EVT_SET(LVar9, 1) - EVT_EXEC_WAIT(N(EVS_FlowersReact_Correct)) - EVT_RETURN - EVT_END + Call(PlaySoundAt, SOUND_FLOWERS_SAD_GIGGLE, SOUND_SPACE_DEFAULT, -300, 0, 0) + Set(LVar8, Ref(N(FlowerModels_West))) + Set(LVar9, 1) + ExecWait(N(EVS_FlowersReact_Correct)) + Return + End }; EvtScript N(EVS_CheckFlowers_South) = { - EVT_CALL(PlaySoundAt, SOUND_FLOWERS_LIGHT_GIGGLE, SOUND_SPACE_DEFAULT, 0, 0, 300) - EVT_SET(LVar8, EVT_PTR(N(FlowerModels_South))) - EVT_SET(LVar9, 2) - EVT_EXEC_WAIT(N(EVS_FlowersReact_Wrong)) - EVT_RETURN - EVT_END + Call(PlaySoundAt, SOUND_FLOWERS_LIGHT_GIGGLE, SOUND_SPACE_DEFAULT, 0, 0, 300) + Set(LVar8, Ref(N(FlowerModels_South))) + Set(LVar9, 2) + ExecWait(N(EVS_FlowersReact_Wrong)) + Return + End }; EvtScript N(EVS_CheckFlowers_East) = { - EVT_CALL(PlaySoundAt, SOUND_FLOWERS_LIGHT_GIGGLE, SOUND_SPACE_DEFAULT, 300, 0, 0) - EVT_SET(LVar8, EVT_PTR(N(FlowerModels_East))) - EVT_SET(LVar9, 3) - EVT_EXEC_WAIT(N(EVS_FlowersReact_Wrong)) - EVT_RETURN - EVT_END + Call(PlaySoundAt, SOUND_FLOWERS_LIGHT_GIGGLE, SOUND_SPACE_DEFAULT, 300, 0, 0) + Set(LVar8, Ref(N(FlowerModels_East))) + Set(LVar9, 3) + ExecWait(N(EVS_FlowersReact_Wrong)) + Return + End }; EvtScript N(EVS_SetupExitHint) = { - EVT_CALL(SetTexPanner, MODEL_o2, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o4, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o6, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o20, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_o22, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_o24, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_o26, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_o14, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_o16, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_o18, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_o8, TEX_PANNER_3) - EVT_CALL(SetTexPanner, MODEL_o10, TEX_PANNER_3) - EVT_CALL(SetTexPanner, MODEL_o12, TEX_PANNER_3) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_CheckFlowers_West)), TRIGGER_WALL_PRESS_A, COLLIDER_o132, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_CheckFlowers_North)), TRIGGER_WALL_PRESS_A, COLLIDER_o149, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_CheckFlowers_South)), TRIGGER_WALL_PRESS_A, COLLIDER_o151, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_CheckFlowers_East)), TRIGGER_WALL_PRESS_A, COLLIDER_o150, 1, 0) - EVT_RETURN - EVT_END + Call(SetTexPanner, MODEL_o2, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o4, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o6, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o20, TEX_PANNER_1) + Call(SetTexPanner, MODEL_o22, TEX_PANNER_1) + Call(SetTexPanner, MODEL_o24, TEX_PANNER_1) + Call(SetTexPanner, MODEL_o26, TEX_PANNER_1) + Call(SetTexPanner, MODEL_o14, TEX_PANNER_2) + Call(SetTexPanner, MODEL_o16, TEX_PANNER_2) + Call(SetTexPanner, MODEL_o18, TEX_PANNER_2) + Call(SetTexPanner, MODEL_o8, TEX_PANNER_3) + Call(SetTexPanner, MODEL_o10, TEX_PANNER_3) + Call(SetTexPanner, MODEL_o12, TEX_PANNER_3) + BindTrigger(Ref(N(EVS_CheckFlowers_West)), TRIGGER_WALL_PRESS_A, COLLIDER_o132, 1, 0) + BindTrigger(Ref(N(EVS_CheckFlowers_North)), TRIGGER_WALL_PRESS_A, COLLIDER_o149, 1, 0) + BindTrigger(Ref(N(EVS_CheckFlowers_South)), TRIGGER_WALL_PRESS_A, COLLIDER_o151, 1, 0) + BindTrigger(Ref(N(EVS_CheckFlowers_East)), TRIGGER_WALL_PRESS_A, COLLIDER_o150, 1, 0) + Return + End }; diff --git a/src/world/area_mim/mim_03/mim_03_6_npc.c b/src/world/area_mim/mim_03/mim_03_6_npc.c index d1848678c08..f0a33703b46 100644 --- a/src/world/area_mim/mim_03/mim_03_6_npc.c +++ b/src/world/area_mim/mim_03/mim_03_6_npc.c @@ -3,42 +3,42 @@ #include "world/common/npc/Oaklie.inc.c" EvtScript N(EVS_NpcInteract_Oaklie) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_BOW_JOINED_PARTY) - EVT_IF_EQ(AF_MIM03_Oaklie_DialogueToggle, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_0009) - EVT_SET(AF_MIM03_Oaklie_DialogueToggle, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_000A) - EVT_SET(AF_MIM03_Oaklie_DialogueToggle, FALSE) - EVT_END_IF - EVT_CASE_LT(STORY_CH5_REACHED_LAVA_LAVA_ISLAND) - EVT_IF_EQ(AF_MIM03_Oaklie_DialogueToggle, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_000B) - EVT_SET(AF_MIM03_Oaklie_DialogueToggle, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_000C) - EVT_SET(AF_MIM03_Oaklie_DialogueToggle, FALSE) - EVT_END_IF - EVT_CASE_GE(STORY_CH5_REACHED_LAVA_LAVA_ISLAND) - EVT_IF_EQ(AF_MIM03_Oaklie_DialogueToggle, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_000D) - EVT_SET(AF_MIM03_Oaklie_DialogueToggle, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_000E) - EVT_SET(AF_MIM03_Oaklie_DialogueToggle, FALSE) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_BOW_JOINED_PARTY) + IfEq(AF_MIM03_Oaklie_DialogueToggle, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_0009) + Set(AF_MIM03_Oaklie_DialogueToggle, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_000A) + Set(AF_MIM03_Oaklie_DialogueToggle, FALSE) + EndIf + CaseLt(STORY_CH5_REACHED_LAVA_LAVA_ISLAND) + IfEq(AF_MIM03_Oaklie_DialogueToggle, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_000B) + Set(AF_MIM03_Oaklie_DialogueToggle, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_000C) + Set(AF_MIM03_Oaklie_DialogueToggle, FALSE) + EndIf + CaseGe(STORY_CH5_REACHED_LAVA_LAVA_ISLAND) + IfEq(AF_MIM03_Oaklie_DialogueToggle, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_000D) + Set(AF_MIM03_Oaklie_DialogueToggle, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_000E) + Set(AF_MIM03_Oaklie_DialogueToggle, FALSE) + EndIf + EndSwitch + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Oaklie) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Oaklie))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Oaklie))) + Return + End }; NpcData N(NpcData_Oaklie) = { diff --git a/src/world/area_mim/mim_04/mim_04_1_music.c b/src/world/area_mim/mim_04/mim_04_1_music.c index 31053d960c3..a737f59f936 100644 --- a/src/world/area_mim/mim_04/mim_04_1_music.c +++ b/src/world/area_mim/mim_04/mim_04_1_music.c @@ -1,8 +1,8 @@ #include "mim_04.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_SPOOKY) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8) + Call(PlayAmbientSounds, AMBIENT_SPOOKY) + Return + End }; diff --git a/src/world/area_mim/mim_04/mim_04_2_main.c b/src/world/area_mim/mim_04/mim_04_2_main.c index 68f85569286..bc8d7a361fd 100644 --- a/src/world/area_mim/mim_04/mim_04_2_main.c +++ b/src/world/area_mim/mim_04/mim_04_2_main.c @@ -10,32 +10,32 @@ EvtScript N(EVS_ExitWalk_e) = EVT_EXIT_WALK(60, mim_04_ENTRY_3, "mim_03", mim_03 MAP_RODATA_PAD(1,main); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_n)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_w)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_s)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_e)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_n)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_w)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_s)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_e)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FOREVER_FOREST) - EVT_CALL(SetSpriteShading, SHADING_MIM_04) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 650) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SET(AB_MIM_2, GB_MIM_CurrentMapID) - EVT_CALL(GetMapID, GB_MIM_CurrentMapID) - EVT_EXEC_WAIT(N(EVS_SetupGates)) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_SetupExitHint)) - EVT_CALL(N(SetForeverForestFog)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_FOREVER_FOREST) + Call(SetSpriteShading, SHADING_MIM_04) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 650) + Call(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Set(AB_MIM_2, GB_MIM_CurrentMapID) + Call(GetMapID, GB_MIM_CurrentMapID) + ExecWait(N(EVS_SetupGates)) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_SetupExitHint)) + Call(N(SetForeverForestFog)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Return + End }; diff --git a/src/world/area_mim/mim_04/mim_04_3_entity.c b/src/world/area_mim/mim_04/mim_04_3_entity.c index 3dbbc0c4c25..0eccc822167 100644 --- a/src/world/area_mim/mim_04/mim_04_3_entity.c +++ b/src/world/area_mim/mim_04/mim_04_3_entity.c @@ -1,6 +1,6 @@ #include "mim_04.h" EvtScript N(EVS_MakeEntities) = { - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/area_mim/mim_04/mim_04_4_hint.c b/src/world/area_mim/mim_04/mim_04_4_hint.c index aa6accae463..3b98b3e9d54 100644 --- a/src/world/area_mim/mim_04/mim_04_4_hint.c +++ b/src/world/area_mim/mim_04/mim_04_4_hint.c @@ -56,31 +56,31 @@ API_CALLABLE(N(TryEvilTreeLaugh)) { } EvtScript N(EVS_ManageEvilTree) = { - EVT_LABEL(0) - EVT_CALL(AwaitPlayerApproach, 0, -340, 50) - EVT_CALL(AwaitPlayerLeave, 0, -340, 50) - EVT_CALL(N(TryEvilTreeLaugh)) - EVT_CALL(PlaySoundAt, SOUND_TREE_LAUGHTER, SOUND_SPACE_DEFAULT, 55, 96, -254) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(AwaitPlayerApproach, 0, -340, 50) + Call(AwaitPlayerLeave, 0, -340, 50) + Call(N(TryEvilTreeLaugh)) + Call(PlaySoundAt, SOUND_TREE_LAUGHTER, SOUND_SPACE_DEFAULT, 55, 96, -254) + Goto(0) + Return + End }; EvtScript N(EVS_SetupExitHint) = { - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(gfx_build_evil_tree_face)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_kao, CUSTOM_GFX_1, -1) - EVT_CALL(SetModelFlags, MODEL_kao, MODEL_FLAG_USES_CUSTOM_GFX, TRUE) - EVT_WAIT(20) - EVT_EXEC(N(EVS_ManageEvilTree)) - EVT_THREAD - EVT_CALL(SetTexPanner, MODEL_kao, TEX_PANNER_0) - EVT_LABEL(0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, -0x8000) - EVT_WAIT(2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, 0) - EVT_WAIT(3) - EVT_GOTO(0) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetCustomGfxBuilders, CUSTOM_GFX_1, Ref(N(gfx_build_evil_tree_face)), NULL) + Call(SetModelCustomGfx, MODEL_kao, CUSTOM_GFX_1, -1) + Call(SetModelFlags, MODEL_kao, MODEL_FLAG_USES_CUSTOM_GFX, TRUE) + Wait(20) + Exec(N(EVS_ManageEvilTree)) + Thread + Call(SetTexPanner, MODEL_kao, TEX_PANNER_0) + Label(0) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, -0x8000) + Wait(2) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, 0) + Wait(3) + Goto(0) + EndThread + Return + End }; diff --git a/src/world/area_mim/mim_04/mim_04_6_npc.c b/src/world/area_mim/mim_04/mim_04_6_npc.c index 7830708facd..e2667e57ff2 100644 --- a/src/world/area_mim/mim_04/mim_04_6_npc.c +++ b/src/world/area_mim/mim_04/mim_04_6_npc.c @@ -7,51 +7,51 @@ #include "world/common/complete/GiveReward.inc.c" EvtScript N(EVS_NpcInteract_Bubulb) = { - EVT_IF_EQ(GF_MIM04_Gift_MagicalSeed3, FALSE) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_MOLE_POP, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Bubulb_Green_PopUp) - EVT_WAIT(45) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Bubulb_Green_Idle) - EVT_CALL(SetNpcCollisionSize, NPC_SELF, 45, 26) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH3_000F) + IfEq(GF_MIM04_Gift_MagicalSeed3, FALSE) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_MOLE_POP, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_SELF, ANIM_Bubulb_Green_PopUp) + Wait(45) + Call(SetNpcAnimation, NPC_SELF, ANIM_Bubulb_Green_Idle) + Call(SetNpcCollisionSize, NPC_SELF, 45, 26) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH3_000F) EVT_GIVE_KEY_REWARD(ITEM_MAGICAL_SEED3) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH3_0010) - EVT_SET(GF_MIM04_Gift_MagicalSeed3, TRUE) - EVT_CALL(SetTattleMessage, NPC_Bubulb, MSG_NpcTattle_MIM_Bubulb_Revealed) - EVT_ELSE - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_CH3_0011) - EVT_SET(LVar1, MSG_CH3_0012) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_CH3_0013) - EVT_SET(LVar1, MSG_CH3_0014) - EVT_CASE_DEFAULT - EVT_SET(LVar0, MSG_CH3_0015) - EVT_SET(LVar1, MSG_CH3_0016) - EVT_END_SWITCH - EVT_IF_EQ(AF_MIM04_Bubulb_DialogueToggle, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Bubulb, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, LVar0) - EVT_SET(AF_MIM04_Bubulb_DialogueToggle, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Bubulb, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, LVar1) - EVT_SET(AF_MIM04_Bubulb_DialogueToggle, FALSE) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH3_0010) + Set(GF_MIM04_Gift_MagicalSeed3, TRUE) + Call(SetTattleMessage, NPC_Bubulb, MSG_NpcTattle_MIM_Bubulb_Revealed) + Else + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_CH3_0011) + Set(LVar1, MSG_CH3_0012) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_CH3_0013) + Set(LVar1, MSG_CH3_0014) + CaseDefault + Set(LVar0, MSG_CH3_0015) + Set(LVar1, MSG_CH3_0016) + EndSwitch + IfEq(AF_MIM04_Bubulb_DialogueToggle, FALSE) + Call(SpeakToPlayer, NPC_Bubulb, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, LVar0) + Set(AF_MIM04_Bubulb_DialogueToggle, TRUE) + Else + Call(SpeakToPlayer, NPC_Bubulb, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, LVar1) + Set(AF_MIM04_Bubulb_DialogueToggle, FALSE) + EndIf + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Bubulb) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bubulb))) - EVT_IF_EQ(GF_MIM04_Gift_MagicalSeed3, FALSE) - EVT_CALL(SetNpcCollisionSize, NPC_SELF, 25, 25) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Bubulb_Green_BuriedIdle) - EVT_CALL(SetTattleMessage, NPC_Bubulb, MSG_NpcTattle_MIM_Bubulb_Hidden) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bubulb))) + IfEq(GF_MIM04_Gift_MagicalSeed3, FALSE) + Call(SetNpcCollisionSize, NPC_SELF, 25, 25) + Call(SetNpcAnimation, NPC_SELF, ANIM_Bubulb_Green_BuriedIdle) + Call(SetTattleMessage, NPC_Bubulb, MSG_NpcTattle_MIM_Bubulb_Hidden) + EndIf + Return + End }; NpcData N(NpcData_Fuzzy) = { diff --git a/src/world/area_mim/mim_05/mim_05_1_music.c b/src/world/area_mim/mim_05/mim_05_1_music.c index 2dee2722da5..06027bdff54 100644 --- a/src/world/area_mim/mim_05/mim_05_1_music.c +++ b/src/world/area_mim/mim_05/mim_05_1_music.c @@ -1,8 +1,8 @@ #include "mim_05.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_SPOOKY) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8) + Call(PlayAmbientSounds, AMBIENT_SPOOKY) + Return + End }; diff --git a/src/world/area_mim/mim_05/mim_05_2_main.c b/src/world/area_mim/mim_05/mim_05_2_main.c index 073a1eccf44..078cb8b6673 100644 --- a/src/world/area_mim/mim_05/mim_05_2_main.c +++ b/src/world/area_mim/mim_05/mim_05_2_main.c @@ -8,32 +8,32 @@ EvtScript N(EVS_ExitWalk_s) = EVT_EXIT_WALK(60, mim_05_ENTRY_2, "mim_04", mim_04 EvtScript N(EVS_ExitWalk_e) = EVT_EXIT_WALK(60, mim_05_ENTRY_3, "mim_08", mim_08_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_n)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_w)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_s)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_e)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_n)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_w)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_s)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_e)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FOREVER_FOREST) - EVT_CALL(SetSpriteShading, SHADING_MIM_05) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 650) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SET(AB_MIM_2, GB_MIM_CurrentMapID) - EVT_CALL(GetMapID, GB_MIM_CurrentMapID) - EVT_EXEC_WAIT(N(EVS_SetupGates)) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC_WAIT(N(EVS_SetupExitHint)) - EVT_CALL(N(SetForeverForestFog)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_FOREVER_FOREST) + Call(SetSpriteShading, SHADING_MIM_05) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 650) + Call(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Set(AB_MIM_2, GB_MIM_CurrentMapID) + Call(GetMapID, GB_MIM_CurrentMapID) + ExecWait(N(EVS_SetupGates)) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Exec(N(EVS_SetupMusic)) + ExecWait(N(EVS_SetupExitHint)) + Call(N(SetForeverForestFog)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Return + End }; diff --git a/src/world/area_mim/mim_05/mim_05_3_entity.c b/src/world/area_mim/mim_05/mim_05_3_entity.c index 06dc84073a2..a0590b5007d 100644 --- a/src/world/area_mim/mim_05/mim_05_3_entity.c +++ b/src/world/area_mim/mim_05/mim_05_3_entity.c @@ -1,6 +1,6 @@ #include "mim_05.h" EvtScript N(EVS_MakeEntities) = { - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/area_mim/mim_05/mim_05_4_hint.c b/src/world/area_mim/mim_05/mim_05_4_hint.c index 3fbeb9bfe59..07e60a4e1f4 100644 --- a/src/world/area_mim/mim_05/mim_05_4_hint.c +++ b/src/world/area_mim/mim_05/mim_05_4_hint.c @@ -1,128 +1,128 @@ #include "mim_05.h" EvtScript N(EVS_FlickerTexPanner) = { - EVT_USE_ARRAY(LVar0) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_SET(LVarA, ArrayVar(0)) - EVT_CASE_EQ(1) - EVT_SET(LVarA, ArrayVar(1)) - EVT_CASE_EQ(2) - EVT_SET(LVarA, ArrayVar(2)) - EVT_CASE_EQ(4) - EVT_SET(LVarA, ArrayVar(4)) - EVT_CASE_EQ(5) - EVT_SET(LVarA, ArrayVar(5)) - EVT_END_SWITCH - EVT_IF_EQ(LVarA, 1) - EVT_CALL(PlaySoundAt, SOUND_MIM_MUSHROOM_GLOW, SOUND_SPACE_DEFAULT, -300, 0, -10) - EVT_CALL(SetTexPanOffset, LVar1, 0, 0, 0) - EVT_ELSE - EVT_CALL(SetTexPanOffset, LVar1, 0, 0, -0x8000) - EVT_END_IF - EVT_SET(LVar9, 1) - EVT_SUB(LVar9, LVarA) - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_SET(ArrayVar(0), LVar9) - EVT_CASE_EQ(1) - EVT_SET(ArrayVar(1), LVar9) - EVT_CASE_EQ(2) - EVT_SET(ArrayVar(2), LVar9) - EVT_CASE_EQ(4) - EVT_SET(ArrayVar(4), LVar9) - EVT_CASE_EQ(5) - EVT_SET(ArrayVar(5), LVar9) - EVT_END_SWITCH - EVT_RETURN - EVT_END + UseArray(LVar0) + Switch(LVar1) + CaseEq(0) + Set(LVarA, ArrayVar(0)) + CaseEq(1) + Set(LVarA, ArrayVar(1)) + CaseEq(2) + Set(LVarA, ArrayVar(2)) + CaseEq(4) + Set(LVarA, ArrayVar(4)) + CaseEq(5) + Set(LVarA, ArrayVar(5)) + EndSwitch + IfEq(LVarA, 1) + Call(PlaySoundAt, SOUND_MIM_MUSHROOM_GLOW, SOUND_SPACE_DEFAULT, -300, 0, -10) + Call(SetTexPanOffset, LVar1, 0, 0, 0) + Else + Call(SetTexPanOffset, LVar1, 0, 0, -0x8000) + EndIf + Set(LVar9, 1) + Sub(LVar9, LVarA) + Switch(LVar1) + CaseEq(0) + Set(ArrayVar(0), LVar9) + CaseEq(1) + Set(ArrayVar(1), LVar9) + CaseEq(2) + Set(ArrayVar(2), LVar9) + CaseEq(4) + Set(ArrayVar(4), LVar9) + CaseEq(5) + Set(ArrayVar(5), LVar9) + EndSwitch + Return + End }; EvtScript N(EVS_AnimateMushroomSet) = { - EVT_CALL(PlaySoundAt, SOUND_MIM_MUSHROOM_GLOW, SOUND_SPACE_DEFAULT, -300, 0, -10) - EVT_EXEC(N(EVS_FlickerTexPanner)) - EVT_WAIT(30) - EVT_LOOP(4) - EVT_EXEC(N(EVS_FlickerTexPanner)) - EVT_WAIT(3) - EVT_EXEC(N(EVS_FlickerTexPanner)) - EVT_WAIT(3) - EVT_END_LOOP - EVT_EXEC(N(EVS_FlickerTexPanner)) - EVT_RETURN - EVT_END + Call(PlaySoundAt, SOUND_MIM_MUSHROOM_GLOW, SOUND_SPACE_DEFAULT, -300, 0, -10) + Exec(N(EVS_FlickerTexPanner)) + Wait(30) + Loop(4) + Exec(N(EVS_FlickerTexPanner)) + Wait(3) + Exec(N(EVS_FlickerTexPanner)) + Wait(3) + EndLoop + Exec(N(EVS_FlickerTexPanner)) + Return + End }; EvtScript N(EVS_InspectMushrooms_West) = { - EVT_SET(LVar1, TEX_PANNER_2) - EVT_EXEC(N(EVS_AnimateMushroomSet)) - EVT_WAIT(10) - EVT_SET(LVar1, TEX_PANNER_4) - EVT_EXEC(N(EVS_AnimateMushroomSet)) - EVT_WAIT(10) - EVT_SET(LVar1, TEX_PANNER_5) - EVT_EXEC(N(EVS_AnimateMushroomSet)) - EVT_WAIT(10) - EVT_RETURN - EVT_END + Set(LVar1, TEX_PANNER_2) + Exec(N(EVS_AnimateMushroomSet)) + Wait(10) + Set(LVar1, TEX_PANNER_4) + Exec(N(EVS_AnimateMushroomSet)) + Wait(10) + Set(LVar1, TEX_PANNER_5) + Exec(N(EVS_AnimateMushroomSet)) + Wait(10) + Return + End }; EvtScript N(EVS_InspectMushrooms_South) = { - EVT_CALL(PlaySoundAt, SOUND_MIM_MUSHROOM_GLOW, SOUND_SPACE_DEFAULT, -20, 0, 300) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, -0x8000) - EVT_WAIT(20) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, 0) - EVT_RETURN - EVT_END + Call(PlaySoundAt, SOUND_MIM_MUSHROOM_GLOW, SOUND_SPACE_DEFAULT, -20, 0, 300) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, -0x8000) + Wait(20) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, 0) + Return + End }; EvtScript N(EVS_InspectMushrooms_North) = { - EVT_CALL(PlaySoundAt, SOUND_MIM_MUSHROOM_GLOW, SOUND_SPACE_DEFAULT, 20, 0, -300) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, -0x8000) - EVT_WAIT(20) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, 0) - EVT_RETURN - EVT_END + Call(PlaySoundAt, SOUND_MIM_MUSHROOM_GLOW, SOUND_SPACE_DEFAULT, 20, 0, -300) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, -0x8000) + Wait(20) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, 0) + Return + End }; EvtScript N(EVS_InspectMushrooms_East) = { - EVT_CALL(PlaySoundAt, SOUND_MIM_MUSHROOM_GLOW, SOUND_SPACE_DEFAULT, 300, 0, 10) - EVT_CALL(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, 0, -0x8000) - EVT_WAIT(50) - EVT_CALL(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, 0, 0) - EVT_RETURN - EVT_END + Call(PlaySoundAt, SOUND_MIM_MUSHROOM_GLOW, SOUND_SPACE_DEFAULT, 300, 0, 10) + Call(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, 0, -0x8000) + Wait(50) + Call(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, 0, 0) + Return + End }; EvtScript N(EVS_SetupExitHint) = { - EVT_CALL(SetTexPanner, MODEL_o402, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o510, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o511, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o403, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_o500, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_o501, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_o404, TEX_PANNER_3) - EVT_CALL(SetTexPanner, MODEL_o498, TEX_PANNER_3) - EVT_CALL(SetTexPanner, MODEL_o499, TEX_PANNER_3) - EVT_CALL(SetTexPanner, MODEL_o505, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_o509, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_o507, TEX_PANNER_4) - EVT_CALL(SetTexPanner, MODEL_o508, TEX_PANNER_4) - EVT_CALL(SetTexPanner, MODEL_o405, TEX_PANNER_5) - EVT_CALL(SetTexPanner, MODEL_o502, TEX_PANNER_5) - EVT_CALL(SetTexPanner, MODEL_o503, TEX_PANNER_5) - EVT_CALL(SetTexPanner, MODEL_o504, TEX_PANNER_5) - EVT_MALLOC_ARRAY(6, LVar0) - EVT_USE_ARRAY(LVar0) - EVT_SET(ArrayVar(0), 0) - EVT_SET(ArrayVar(1), 0) - EVT_SET(ArrayVar(2), 0) - EVT_SET(ArrayVar(4), 0) - EVT_SET(ArrayVar(5), 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_InspectMushrooms_South)), TRIGGER_WALL_PRESS_A, COLLIDER_o402, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_InspectMushrooms_North)), TRIGGER_WALL_PRESS_A, COLLIDER_o403, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_InspectMushrooms_West)), TRIGGER_WALL_PRESS_A, COLLIDER_o405, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_InspectMushrooms_East)), TRIGGER_WALL_PRESS_A, COLLIDER_o404, 1, 0) - EVT_RETURN - EVT_END + Call(SetTexPanner, MODEL_o402, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o510, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o511, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o403, TEX_PANNER_1) + Call(SetTexPanner, MODEL_o500, TEX_PANNER_1) + Call(SetTexPanner, MODEL_o501, TEX_PANNER_1) + Call(SetTexPanner, MODEL_o404, TEX_PANNER_3) + Call(SetTexPanner, MODEL_o498, TEX_PANNER_3) + Call(SetTexPanner, MODEL_o499, TEX_PANNER_3) + Call(SetTexPanner, MODEL_o505, TEX_PANNER_2) + Call(SetTexPanner, MODEL_o509, TEX_PANNER_2) + Call(SetTexPanner, MODEL_o507, TEX_PANNER_4) + Call(SetTexPanner, MODEL_o508, TEX_PANNER_4) + Call(SetTexPanner, MODEL_o405, TEX_PANNER_5) + Call(SetTexPanner, MODEL_o502, TEX_PANNER_5) + Call(SetTexPanner, MODEL_o503, TEX_PANNER_5) + Call(SetTexPanner, MODEL_o504, TEX_PANNER_5) + MallocArray(6, LVar0) + UseArray(LVar0) + Set(ArrayVar(0), 0) + Set(ArrayVar(1), 0) + Set(ArrayVar(2), 0) + Set(ArrayVar(4), 0) + Set(ArrayVar(5), 0) + BindTrigger(Ref(N(EVS_InspectMushrooms_South)), TRIGGER_WALL_PRESS_A, COLLIDER_o402, 1, 0) + BindTrigger(Ref(N(EVS_InspectMushrooms_North)), TRIGGER_WALL_PRESS_A, COLLIDER_o403, 1, 0) + BindTrigger(Ref(N(EVS_InspectMushrooms_West)), TRIGGER_WALL_PRESS_A, COLLIDER_o405, 1, 0) + BindTrigger(Ref(N(EVS_InspectMushrooms_East)), TRIGGER_WALL_PRESS_A, COLLIDER_o404, 1, 0) + Return + End }; diff --git a/src/world/area_mim/mim_06/mim_06_1_music.c b/src/world/area_mim/mim_06/mim_06_1_music.c index 8342a560ad4..721b6d9e866 100644 --- a/src/world/area_mim/mim_06/mim_06_1_music.c +++ b/src/world/area_mim/mim_06/mim_06_1_music.c @@ -1,8 +1,8 @@ #include "mim_06.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_SPOOKY) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8) + Call(PlayAmbientSounds, AMBIENT_SPOOKY) + Return + End }; diff --git a/src/world/area_mim/mim_06/mim_06_2_main.c b/src/world/area_mim/mim_06/mim_06_2_main.c index dbae685316a..2f0840a3b47 100644 --- a/src/world/area_mim/mim_06/mim_06_2_main.c +++ b/src/world/area_mim/mim_06/mim_06_2_main.c @@ -10,32 +10,32 @@ EvtScript N(EVS_ExitWalk_e) = EVT_EXIT_WALK(60, mim_06_ENTRY_3, "mim_05", mim_05 MAP_RODATA_PAD(1,main); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_n)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_w)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_s)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_e)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_n)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_w)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_s)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_e)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FOREVER_FOREST) - EVT_CALL(SetSpriteShading, SHADING_MIM_06) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 650) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SET(AB_MIM_2, GB_MIM_CurrentMapID) - EVT_CALL(GetMapID, GB_MIM_CurrentMapID) - EVT_EXEC_WAIT(N(EVS_SetupGates)) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC_WAIT(N(D_802439F8_BA8178)) - EVT_CALL(N(SetForeverForestFog)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_FOREVER_FOREST) + Call(SetSpriteShading, SHADING_MIM_06) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 650) + Call(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Set(AB_MIM_2, GB_MIM_CurrentMapID) + Call(GetMapID, GB_MIM_CurrentMapID) + ExecWait(N(EVS_SetupGates)) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Exec(N(EVS_SetupMusic)) + ExecWait(N(D_802439F8_BA8178)) + Call(N(SetForeverForestFog)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Return + End }; diff --git a/src/world/area_mim/mim_06/mim_06_3_entity.c b/src/world/area_mim/mim_06/mim_06_3_entity.c index 17372660677..c05cf40553b 100644 --- a/src/world/area_mim/mim_06/mim_06_3_entity.c +++ b/src/world/area_mim/mim_06/mim_06_3_entity.c @@ -1,6 +1,6 @@ #include "mim_06.h" EvtScript N(EVS_MakeEntities) = { - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/area_mim/mim_06/mim_06_4_hint.c b/src/world/area_mim/mim_06/mim_06_4_hint.c index c2128fdd403..4f38d8dd677 100644 --- a/src/world/area_mim/mim_06/mim_06_4_hint.c +++ b/src/world/area_mim/mim_06/mim_06_4_hint.c @@ -12,9 +12,9 @@ API_CALLABLE(N(GetFlowerNormal)) { N(GetFirstTriangleNormal)(mdl->modelNode->displayData->displayList, &x, &y, &z); - evt_set_variable(script, *args++, EVT_FLOAT_TO_FIXED(x)); - evt_set_variable(script, *args++, EVT_FLOAT_TO_FIXED(y)); - evt_set_variable(script, *args++, EVT_FLOAT_TO_FIXED(z)); + evt_set_variable(script, *args++, Float_TO_FIXED(x)); + evt_set_variable(script, *args++, Float_TO_FIXED(y)); + evt_set_variable(script, *args++, Float_TO_FIXED(z)); return ApiStatus_DONE2; } @@ -51,162 +51,162 @@ s32 N(FlowerModels_East)[] = { }; EvtScript N(EVS_FlowersWither) = { - EVT_CALL(RandInt, 20, LVar0) - EVT_ADD(LVar0, 1) - EVT_WAIT(LVar0) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SETF(LVar3, EVT_FLOAT(1.0)) - EVT_CALL(RandInt, 20, LVarC) - EVT_SUB(LVarC, 10) - EVT_LOOP(60) - EVT_ADD(LVar0, LVarC) - EVT_CALL(N(GetWitherTranslation), LVar0, LVar2) - EVT_SUB(LVar1, 1) - EVT_CALL(TranslateModel, LVarA, 0, LVar1, LVar2) - EVT_CALL(N(GetFlowerNormal), LVarA, LVar7, LVar8, LVar9) - EVT_CALL(RotateModel, LVarA, LVar0, LVar7, LVar8, LVar9) - EVT_CALL(ScaleModel, LVarA, LVar3, LVar3, LVar3) - EVT_CALL(TranslateModel, LVarB, 0, LVar1, LVar2) - EVT_CALL(N(GetFlowerNormal), LVarA, LVar7, LVar8, LVar9) - EVT_CALL(RotateModel, LVarB, LVar0, LVar7, LVar8, LVar9) - EVT_CALL(ScaleModel, LVarB, LVar3, LVar3, LVar3) - EVT_MULF(LVar3, EVT_FLOAT(0.965)) - EVT_WAIT(2) - EVT_END_LOOP - EVT_CALL(EnableModel, LVarA, FALSE) - EVT_CALL(EnableModel, LVarB, FALSE) - EVT_RETURN - EVT_END + Call(RandInt, 20, LVar0) + Add(LVar0, 1) + Wait(LVar0) + Set(LVar0, 0) + Set(LVar1, 0) + SetF(LVar3, Float(1.0)) + Call(RandInt, 20, LVarC) + Sub(LVarC, 10) + Loop(60) + Add(LVar0, LVarC) + Call(N(GetWitherTranslation), LVar0, LVar2) + Sub(LVar1, 1) + Call(TranslateModel, LVarA, 0, LVar1, LVar2) + Call(N(GetFlowerNormal), LVarA, LVar7, LVar8, LVar9) + Call(RotateModel, LVarA, LVar0, LVar7, LVar8, LVar9) + Call(ScaleModel, LVarA, LVar3, LVar3, LVar3) + Call(TranslateModel, LVarB, 0, LVar1, LVar2) + Call(N(GetFlowerNormal), LVarA, LVar7, LVar8, LVar9) + Call(RotateModel, LVarB, LVar0, LVar7, LVar8, LVar9) + Call(ScaleModel, LVarB, LVar3, LVar3, LVar3) + MulF(LVar3, Float(0.965)) + Wait(2) + EndLoop + Call(EnableModel, LVarA, FALSE) + Call(EnableModel, LVarB, FALSE) + Return + End }; EvtScript N(EVS_InspectFlowers_South) = { - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, -0x8000) - EVT_WAIT(2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, -0x10000) - EVT_CALL(PlaySoundAt, SOUND_FLOWERS_LAUGH, SOUND_SPACE_DEFAULT, -10, 0, -300) - EVT_CALL(MakeLerp, 0, 30, 50, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_USE_BUF(EVT_PTR(N(FlowerModels_South))) - EVT_LOOP(3) - EVT_BUF_READ2(LVar2, LVar3) - EVT_CALL(N(GetFlowerNormal), LVar2, LVar7, LVar8, LVar9) - EVT_CALL(RotateModel, LVar2, LVar0, LVar7, LVar8, LVar9) - EVT_CALL(RotateModel, LVar3, LVar0, LVar7, LVar8, LVar9) - EVT_END_LOOP - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(PlaySound, SOUND_FLOWERS_LAUGH) - EVT_CALL(MakeLerp, 30, -30, 50, EASING_COS_IN_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_USE_BUF(EVT_PTR(N(FlowerModels_South))) - EVT_LOOP(3) - EVT_BUF_READ2(LVar2, LVar3) - EVT_CALL(N(GetFlowerNormal), LVar2, LVar7, LVar8, LVar9) - EVT_CALL(RotateModel, LVar2, LVar0, LVar7, LVar8, LVar9) - EVT_CALL(RotateModel, LVar3, LVar0, LVar7, LVar8, LVar9) - EVT_END_LOOP - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(PlaySound, SOUND_FLOWERS_LAUGH) - EVT_CALL(MakeLerp, -30, 0, 50, EASING_COS_IN_OUT) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_USE_BUF(EVT_PTR(N(FlowerModels_South))) - EVT_LOOP(3) - EVT_BUF_READ2(LVar2, LVar3) - EVT_CALL(N(GetFlowerNormal), LVar2, LVar7, LVar8, LVar9) - EVT_CALL(RotateModel, LVar2, LVar0, LVar7, LVar8, LVar9) - EVT_CALL(RotateModel, LVar3, LVar0, LVar7, LVar8, LVar9) - EVT_END_LOOP - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, -0x8000) - EVT_WAIT(2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, 0) - EVT_RETURN - EVT_END + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, -0x8000) + Wait(2) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, -0x10000) + Call(PlaySoundAt, SOUND_FLOWERS_LAUGH, SOUND_SPACE_DEFAULT, -10, 0, -300) + Call(MakeLerp, 0, 30, 50, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + UseBuf(Ref(N(FlowerModels_South))) + Loop(3) + BufRead2(LVar2, LVar3) + Call(N(GetFlowerNormal), LVar2, LVar7, LVar8, LVar9) + Call(RotateModel, LVar2, LVar0, LVar7, LVar8, LVar9) + Call(RotateModel, LVar3, LVar0, LVar7, LVar8, LVar9) + EndLoop + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(PlaySound, SOUND_FLOWERS_LAUGH) + Call(MakeLerp, 30, -30, 50, EASING_COS_IN_OUT) + Label(10) + Call(UpdateLerp) + UseBuf(Ref(N(FlowerModels_South))) + Loop(3) + BufRead2(LVar2, LVar3) + Call(N(GetFlowerNormal), LVar2, LVar7, LVar8, LVar9) + Call(RotateModel, LVar2, LVar0, LVar7, LVar8, LVar9) + Call(RotateModel, LVar3, LVar0, LVar7, LVar8, LVar9) + EndLoop + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(PlaySound, SOUND_FLOWERS_LAUGH) + Call(MakeLerp, -30, 0, 50, EASING_COS_IN_OUT) + Label(20) + Call(UpdateLerp) + UseBuf(Ref(N(FlowerModels_South))) + Loop(3) + BufRead2(LVar2, LVar3) + Call(N(GetFlowerNormal), LVar2, LVar7, LVar8, LVar9) + Call(RotateModel, LVar2, LVar0, LVar7, LVar8, LVar9) + Call(RotateModel, LVar3, LVar0, LVar7, LVar8, LVar9) + EndLoop + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, -0x8000) + Wait(2) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, 0) + Return + End }; EvtScript N(EVS_InspectFlowers_West) = { - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, -0x8000) - EVT_WAIT(2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, -0x10000) - EVT_WAIT(15) - EVT_CALL(PlaySoundAt, SOUND_FLOWERS_WITHER, SOUND_SPACE_DEFAULT, -300, 0, -10) - EVT_USE_BUF(EVT_PTR(N(FlowerModels_West))) - EVT_BUF_READ2(LVarA, LVarB) - EVT_EXEC(N(EVS_FlowersWither)) - EVT_BUF_READ2(LVarA, LVarB) - EVT_EXEC(N(EVS_FlowersWither)) - EVT_BUF_READ2(LVarA, LVarB) - EVT_EXEC(N(EVS_FlowersWither)) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, -0x8000) + Wait(2) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, -0x10000) + Wait(15) + Call(PlaySoundAt, SOUND_FLOWERS_WITHER, SOUND_SPACE_DEFAULT, -300, 0, -10) + UseBuf(Ref(N(FlowerModels_West))) + BufRead2(LVarA, LVarB) + Exec(N(EVS_FlowersWither)) + BufRead2(LVarA, LVarB) + Exec(N(EVS_FlowersWither)) + BufRead2(LVarA, LVarB) + Exec(N(EVS_FlowersWither)) + Unbind + Return + End }; EvtScript N(EVS_InspectFlowers_North) = { - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, 0, -0x8000) - EVT_WAIT(2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, 0, -0x10000) - EVT_WAIT(15) - EVT_CALL(PlaySoundAt, SOUND_FLOWERS_WITHER, SOUND_SPACE_DEFAULT, 10, 0, 300) - EVT_USE_BUF(EVT_PTR(N(FlowerModels_North))) - EVT_BUF_READ2(LVarA, LVarB) - EVT_EXEC(N(EVS_FlowersWither)) - EVT_BUF_READ2(LVarA, LVarB) - EVT_EXEC(N(EVS_FlowersWither)) - EVT_BUF_READ2(LVarA, LVarB) - EVT_EXEC(N(EVS_FlowersWither)) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, 0, -0x8000) + Wait(2) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, 0, -0x10000) + Wait(15) + Call(PlaySoundAt, SOUND_FLOWERS_WITHER, SOUND_SPACE_DEFAULT, 10, 0, 300) + UseBuf(Ref(N(FlowerModels_North))) + BufRead2(LVarA, LVarB) + Exec(N(EVS_FlowersWither)) + BufRead2(LVarA, LVarB) + Exec(N(EVS_FlowersWither)) + BufRead2(LVarA, LVarB) + Exec(N(EVS_FlowersWither)) + Unbind + Return + End }; EvtScript N(EVS_InspectFlowers_East) = { - EVT_CALL(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, 0, -0x8000) - EVT_WAIT(2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, 0, -0x10000) - EVT_WAIT(15) - EVT_CALL(PlaySoundAt, SOUND_FLOWERS_WITHER, SOUND_SPACE_DEFAULT, 300, 0, -10) - EVT_USE_BUF(EVT_PTR(N(FlowerModels_East))) - EVT_BUF_READ2(LVarA, LVarB) - EVT_EXEC(N(EVS_FlowersWither)) - EVT_BUF_READ2(LVarA, LVarB) - EVT_EXEC(N(EVS_FlowersWither)) - EVT_BUF_READ2(LVarA, LVarB) - EVT_EXEC(N(EVS_FlowersWither)) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, 0, -0x8000) + Wait(2) + Call(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, 0, -0x10000) + Wait(15) + Call(PlaySoundAt, SOUND_FLOWERS_WITHER, SOUND_SPACE_DEFAULT, 300, 0, -10) + UseBuf(Ref(N(FlowerModels_East))) + BufRead2(LVarA, LVarB) + Exec(N(EVS_FlowersWither)) + BufRead2(LVarA, LVarB) + Exec(N(EVS_FlowersWither)) + BufRead2(LVarA, LVarB) + Exec(N(EVS_FlowersWither)) + Unbind + Return + End }; EvtScript N(D_802439F8_BA8178) = { - EVT_CALL(SetTexPanner, MODEL_sa_2, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_sb_2, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_sc_2, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_wa_2, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_wb_2, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_wc_2, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_na_2, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_nb_2, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_nc_2, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_ea_2, TEX_PANNER_3) - EVT_CALL(SetTexPanner, MODEL_eb_2, TEX_PANNER_3) - EVT_CALL(SetTexPanner, MODEL_ec_2, TEX_PANNER_3) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_InspectFlowers_South)), TRIGGER_WALL_PRESS_A, COLLIDER_o416, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_InspectFlowers_West)), TRIGGER_WALL_PRESS_A, COLLIDER_o418, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_InspectFlowers_North)), TRIGGER_WALL_PRESS_A, COLLIDER_o417, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_InspectFlowers_East)), TRIGGER_WALL_PRESS_A, COLLIDER_o331, 1, 0) - EVT_RETURN - EVT_END + Call(SetTexPanner, MODEL_sa_2, TEX_PANNER_0) + Call(SetTexPanner, MODEL_sb_2, TEX_PANNER_0) + Call(SetTexPanner, MODEL_sc_2, TEX_PANNER_0) + Call(SetTexPanner, MODEL_wa_2, TEX_PANNER_1) + Call(SetTexPanner, MODEL_wb_2, TEX_PANNER_1) + Call(SetTexPanner, MODEL_wc_2, TEX_PANNER_1) + Call(SetTexPanner, MODEL_na_2, TEX_PANNER_2) + Call(SetTexPanner, MODEL_nb_2, TEX_PANNER_2) + Call(SetTexPanner, MODEL_nc_2, TEX_PANNER_2) + Call(SetTexPanner, MODEL_ea_2, TEX_PANNER_3) + Call(SetTexPanner, MODEL_eb_2, TEX_PANNER_3) + Call(SetTexPanner, MODEL_ec_2, TEX_PANNER_3) + BindTrigger(Ref(N(EVS_InspectFlowers_South)), TRIGGER_WALL_PRESS_A, COLLIDER_o416, 1, 0) + BindTrigger(Ref(N(EVS_InspectFlowers_West)), TRIGGER_WALL_PRESS_A, COLLIDER_o418, 1, 0) + BindTrigger(Ref(N(EVS_InspectFlowers_North)), TRIGGER_WALL_PRESS_A, COLLIDER_o417, 1, 0) + BindTrigger(Ref(N(EVS_InspectFlowers_East)), TRIGGER_WALL_PRESS_A, COLLIDER_o331, 1, 0) + Return + End }; diff --git a/src/world/area_mim/mim_07/mim_07_1_music.c b/src/world/area_mim/mim_07/mim_07_1_music.c index ecc9939dc16..5cd6ab90858 100644 --- a/src/world/area_mim/mim_07/mim_07_1_music.c +++ b/src/world/area_mim/mim_07/mim_07_1_music.c @@ -1,14 +1,14 @@ #include "mim_07.h" EvtScript N(EVS_PlayForestMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_SPOOKY) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8) + Call(PlayAmbientSounds, AMBIENT_SPOOKY) + Return + End }; EvtScript N(EVS_JrTroopaMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_JR_TROOPA_THEME, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_JR_TROOPA_THEME, 0, 8) + Return + End }; diff --git a/src/world/area_mim/mim_07/mim_07_2_main.c b/src/world/area_mim/mim_07/mim_07_2_main.c index fbf8b836192..135d909c763 100644 --- a/src/world/area_mim/mim_07/mim_07_2_main.c +++ b/src/world/area_mim/mim_07/mim_07_2_main.c @@ -8,46 +8,46 @@ EvtScript N(EVS_ExitWalk_s) = EVT_EXIT_WALK(60, mim_07_ENTRY_2, "mim_06", mim_06 EvtScript N(EVS_ExitWalk_e) = EVT_EXIT_WALK(60, mim_07_ENTRY_3, "mim_11", mim_11_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_n)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_w)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_s)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_e)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_n)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_w)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_s)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_e)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FOREVER_FOREST) - EVT_CALL(SetSpriteShading, SHADING_MIM_07) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 650) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SET(AB_MIM_2, GB_MIM_CurrentMapID) - EVT_CALL(GetMapID, GB_MIM_CurrentMapID) - EVT_EXEC_WAIT(N(EVS_SetupGates)) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_EXEC(N(EVS_PlayForestMusic)) - EVT_EXEC_WAIT(N(EVS_SetupExitHint)) - EVT_CALL(N(SetForeverForestFog)) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, mim_07_ENTRY_3) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 500, -100, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 530, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_THREAD - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_END_THREAD - EVT_ELSE - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_END_IF - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_FOREVER_FOREST) + Call(SetSpriteShading, SHADING_MIM_07) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 650) + Call(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Set(AB_MIM_2, GB_MIM_CurrentMapID) + Call(GetMapID, GB_MIM_CurrentMapID) + ExecWait(N(EVS_SetupGates)) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Exec(N(EVS_PlayForestMusic)) + ExecWait(N(EVS_SetupExitHint)) + Call(N(SetForeverForestFog)) + Call(GetEntryID, LVar0) + IfEq(LVar0, mim_07_ENTRY_3) + Call(UseSettingsFrom, CAM_DEFAULT, 500, -100, 0) + Call(SetPanTarget, CAM_DEFAULT, 530, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Thread + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + EndThread + Else + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + EndIf + Return + End }; diff --git a/src/world/area_mim/mim_07/mim_07_3_entity.c b/src/world/area_mim/mim_07/mim_07_3_entity.c index 701abad7ebd..3d271febb55 100644 --- a/src/world/area_mim/mim_07/mim_07_3_entity.c +++ b/src/world/area_mim/mim_07/mim_07_3_entity.c @@ -2,23 +2,23 @@ #include "entity.h" EvtScript N(EVS_ReadSign) = { - EVT_CALL(IsStartingConversation, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_017F, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END + Call(IsStartingConversation, LVar0) + IfEq(LVar0, TRUE) + Return + EndIf + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_017F, 160, 40) + Call(DisablePlayerInput, FALSE) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Signpost), 280, 0, 0, 90, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_ReadSign))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Signpost), 280, 0, 0, 90, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_ReadSign))) + Return + End }; diff --git a/src/world/area_mim/mim_07/mim_07_4_hint.c b/src/world/area_mim/mim_07/mim_07_4_hint.c index 68648d1cc12..2934750ea9f 100644 --- a/src/world/area_mim/mim_07/mim_07_4_hint.c +++ b/src/world/area_mim/mim_07/mim_07_4_hint.c @@ -69,53 +69,53 @@ API_CALLABLE(N(TryEvilRockLaugh)) { } EvtScript N(EVS_ManageEvilRock) = { - EVT_LABEL(0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, -0x8000) - EVT_WAIT(3) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, 0) - EVT_WAIT(3) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, -0x8000) + Wait(3) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, 0) + Wait(3) + Goto(0) + Return + End }; EvtScript N(EVS_OnInspectEvilRock) = { - EVT_SET(LVar0, 0) - EVT_CALL(N(TryEvilRockLaugh)) - EVT_IF_EQ(LVar0, 1) - EVT_WAIT(10) - EVT_EXEC_GET_TID(N(EVS_ManageEvilRock), LVar9) - EVT_CALL(PlaySoundAt, SOUND_ROCK_LAUGHTER, SOUND_SPACE_DEFAULT, -34, 0, -300) - EVT_LOOP(18) - EVT_CALL(TranslateModel, MODEL_o289, EVT_FLOAT(1.0), 0, EVT_FLOAT(1.0)) - EVT_CALL(TranslateModel, MODEL_o440, EVT_FLOAT(1.0), 0, EVT_FLOAT(1.0)) - EVT_WAIT(2) - EVT_CALL(TranslateModel, MODEL_o289, EVT_FLOAT(-1.0), 0, EVT_FLOAT(-1.0)) - EVT_CALL(TranslateModel, MODEL_o440, EVT_FLOAT(-1.0), 0, EVT_FLOAT(-1.0)) - EVT_WAIT(2) - EVT_END_LOOP - EVT_LOOP(10) - EVT_CALL(TranslateModel, MODEL_o289, EVT_FLOAT(0.5), 0, EVT_FLOAT(0.5)) - EVT_CALL(TranslateModel, MODEL_o440, EVT_FLOAT(0.5), 0, EVT_FLOAT(0.5)) - EVT_WAIT(2) - EVT_CALL(TranslateModel, MODEL_o289, EVT_FLOAT(-0.5), 0, EVT_FLOAT(-0.5)) - EVT_CALL(TranslateModel, MODEL_o440, EVT_FLOAT(-0.5), 0, EVT_FLOAT(-0.5)) - EVT_WAIT(2) - EVT_END_LOOP - EVT_KILL_THREAD(LVar9) - EVT_CALL(TranslateModel, MODEL_o289, 0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o440, 0, 0, 0) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVar0, 0) + Call(N(TryEvilRockLaugh)) + IfEq(LVar0, 1) + Wait(10) + ExecGetTID(N(EVS_ManageEvilRock), LVar9) + Call(PlaySoundAt, SOUND_ROCK_LAUGHTER, SOUND_SPACE_DEFAULT, -34, 0, -300) + Loop(18) + Call(TranslateModel, MODEL_o289, Float(1.0), 0, Float(1.0)) + Call(TranslateModel, MODEL_o440, Float(1.0), 0, Float(1.0)) + Wait(2) + Call(TranslateModel, MODEL_o289, Float(-1.0), 0, Float(-1.0)) + Call(TranslateModel, MODEL_o440, Float(-1.0), 0, Float(-1.0)) + Wait(2) + EndLoop + Loop(10) + Call(TranslateModel, MODEL_o289, Float(0.5), 0, Float(0.5)) + Call(TranslateModel, MODEL_o440, Float(0.5), 0, Float(0.5)) + Wait(2) + Call(TranslateModel, MODEL_o289, Float(-0.5), 0, Float(-0.5)) + Call(TranslateModel, MODEL_o440, Float(-0.5), 0, Float(-0.5)) + Wait(2) + EndLoop + KillThread(LVar9) + Call(TranslateModel, MODEL_o289, 0, 0, 0) + Call(TranslateModel, MODEL_o440, 0, 0, 0) + EndIf + Return + End }; EvtScript N(EVS_SetupExitHint) = { - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(gfx_build_evil_rock_face)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_o440, CUSTOM_GFX_1, -1) - EVT_CALL(SetModelFlags, MODEL_o440, MODEL_FLAG_USES_CUSTOM_GFX, TRUE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnInspectEvilRock)), TRIGGER_WALL_PRESS_A, COLLIDER_o491, 1, 0) - EVT_CALL(SetTexPanner, MODEL_o440, TEX_PANNER_0) - EVT_RETURN - EVT_END + Call(SetCustomGfxBuilders, CUSTOM_GFX_1, Ref(N(gfx_build_evil_rock_face)), NULL) + Call(SetModelCustomGfx, MODEL_o440, CUSTOM_GFX_1, -1) + Call(SetModelFlags, MODEL_o440, MODEL_FLAG_USES_CUSTOM_GFX, TRUE) + BindTrigger(Ref(N(EVS_OnInspectEvilRock)), TRIGGER_WALL_PRESS_A, COLLIDER_o491, 1, 0) + Call(SetTexPanner, MODEL_o440, TEX_PANNER_0) + Return + End }; diff --git a/src/world/area_mim/mim_07/mim_07_5_gate.c b/src/world/area_mim/mim_07/mim_07_5_gate.c index f5e1712d9f7..b6df93ba835 100644 --- a/src/world/area_mim/mim_07/mim_07_5_gate.c +++ b/src/world/area_mim/mim_07/mim_07_5_gate.c @@ -1,264 +1,264 @@ #include "mim_07.h" EvtScript N(EVS_SetGateCameraZones) = { - EVT_SWITCH(LVar1) - EVT_CASE_EQ(0) - EVT_CALL(SetZoneEnabled, ZONE_north, TRUE) - EVT_CALL(SetZoneEnabled, ZONE_west, TRUE) - EVT_CALL(SetZoneEnabled, ZONE_south, TRUE) - EVT_CALL(SetZoneEnabled, ZONE_east, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_higashi, TRUE) - EVT_CALL(SetZoneEnabled, ZONE_nishi, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_minami, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_kita, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_stage, FALSE) - EVT_SET(LVar1, 0) - EVT_CASE_EQ(1) - EVT_CALL(SetZoneEnabled, ZONE_north, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_west, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_south, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_east, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_higashi, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_nishi, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_minami, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_kita, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_stage, TRUE) - EVT_SET(LVar1, 1) - EVT_CASE_EQ(2) - EVT_CALL(SetZoneEnabled, ZONE_north, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_west, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_south, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_east, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_higashi, TRUE) - EVT_CALL(SetZoneEnabled, ZONE_nishi, TRUE) - EVT_CALL(SetZoneEnabled, ZONE_minami, TRUE) - EVT_CALL(SetZoneEnabled, ZONE_kita, TRUE) - EVT_CALL(SetZoneEnabled, ZONE_stage, FALSE) - EVT_SET(LVar1, 2) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar1) + CaseEq(0) + Call(SetZoneEnabled, ZONE_north, TRUE) + Call(SetZoneEnabled, ZONE_west, TRUE) + Call(SetZoneEnabled, ZONE_south, TRUE) + Call(SetZoneEnabled, ZONE_east, FALSE) + Call(SetZoneEnabled, ZONE_higashi, TRUE) + Call(SetZoneEnabled, ZONE_nishi, FALSE) + Call(SetZoneEnabled, ZONE_minami, FALSE) + Call(SetZoneEnabled, ZONE_kita, FALSE) + Call(SetZoneEnabled, ZONE_stage, FALSE) + Set(LVar1, 0) + CaseEq(1) + Call(SetZoneEnabled, ZONE_north, FALSE) + Call(SetZoneEnabled, ZONE_west, FALSE) + Call(SetZoneEnabled, ZONE_south, FALSE) + Call(SetZoneEnabled, ZONE_east, FALSE) + Call(SetZoneEnabled, ZONE_higashi, FALSE) + Call(SetZoneEnabled, ZONE_nishi, FALSE) + Call(SetZoneEnabled, ZONE_minami, FALSE) + Call(SetZoneEnabled, ZONE_kita, FALSE) + Call(SetZoneEnabled, ZONE_stage, TRUE) + Set(LVar1, 1) + CaseEq(2) + Call(SetZoneEnabled, ZONE_north, FALSE) + Call(SetZoneEnabled, ZONE_west, FALSE) + Call(SetZoneEnabled, ZONE_south, FALSE) + Call(SetZoneEnabled, ZONE_east, FALSE) + Call(SetZoneEnabled, ZONE_higashi, TRUE) + Call(SetZoneEnabled, ZONE_nishi, TRUE) + Call(SetZoneEnabled, ZONE_minami, TRUE) + Call(SetZoneEnabled, ZONE_kita, TRUE) + Call(SetZoneEnabled, ZONE_stage, FALSE) + Set(LVar1, 2) + EndSwitch + Return + End }; EvtScript N(EVS_InitializeGates) = { - EVT_CALL(ParentColliderToModel, COLLIDER_monn, MODEL_n1) - EVT_CALL(RotateGroup, MODEL_monn, LVar2, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_monn) - EVT_CALL(ParentColliderToModel, COLLIDER_mons, MODEL_s1) - EVT_CALL(RotateGroup, MODEL_mons, LVar2, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_mons) - EVT_CALL(ParentColliderToModel, COLLIDER_mone, MODEL_e1) - EVT_CALL(RotateGroup, MODEL_mone, LVar2, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_mone) - EVT_CALL(ParentColliderToModel, COLLIDER_monw, MODEL_w1) - EVT_CALL(RotateGroup, MODEL_monw, LVar2, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_monw) - EVT_RETURN - EVT_END + Call(ParentColliderToModel, COLLIDER_monn, MODEL_n1) + Call(RotateGroup, MODEL_monn, LVar2, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_monn) + Call(ParentColliderToModel, COLLIDER_mons, MODEL_s1) + Call(RotateGroup, MODEL_mons, LVar2, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_mons) + Call(ParentColliderToModel, COLLIDER_mone, MODEL_e1) + Call(RotateGroup, MODEL_mone, LVar2, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_mone) + Call(ParentColliderToModel, COLLIDER_monw, MODEL_w1) + Call(RotateGroup, MODEL_monw, LVar2, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_monw) + Return + End }; EvtScript N(EVS_ResetGates) = { - EVT_CALL(RotateGroup, MODEL_monn, 0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_monn) - EVT_CALL(RotateGroup, MODEL_mons, 0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_mons) - EVT_CALL(RotateGroup, MODEL_mone, 0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_mone) - EVT_CALL(RotateGroup, MODEL_monw, 0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_monw) - EVT_RETURN - EVT_END + Call(RotateGroup, MODEL_monn, 0, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_monn) + Call(RotateGroup, MODEL_mons, 0, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_mons) + Call(RotateGroup, MODEL_mone, 0, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_mone) + Call(RotateGroup, MODEL_monw, 0, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_monw) + Return + End }; EvtScript N(EVS_UseGate) = { - EVT_THREAD - EVT_CALL(PlaySoundAtCollider, LVar9, SOUND_FOREST_GATE_OPEN, SOUND_SPACE_DEFAULT) - EVT_WAIT(19) - EVT_CALL(PlaySoundAtCollider, LVar9, SOUND_FOREST_GATE_CLOSE, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_SWITCH(AB_MIM_1) - EVT_CASE_EQ(0) - EVT_THREAD - EVT_CALL(MakeLerp, 10, 90, 10, EASING_QUADRATIC_IN) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, LVar9) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(15) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, LVar7) - EVT_ADD(LVar2, LVar8) - EVT_CALL(PlayerMoveTo, LVar0, LVar2, 15) - EVT_END_THREAD - EVT_SET(LVar1, 1) - EVT_EXEC(N(EVS_SetGateCameraZones)) - EVT_CALL(MakeLerp, 90, 360, 30, EASING_LINEAR) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, LVar9) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_EXEC(N(EVS_ResetGates)) - EVT_SET(AB_MIM_1, 1) - EVT_SET(GF_MIM_ChoosingPath, TRUE) - EVT_CASE_EQ(1) - EVT_THREAD - EVT_CALL(MakeLerp, 360, 270, 10, EASING_QUADRATIC_IN) - EVT_LABEL(30) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, LVar9) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(30) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(15) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, LVar7) - EVT_SUB(LVar2, LVar8) - EVT_CALL(PlayerMoveTo, LVar0, LVar2, 15) - EVT_END_THREAD - EVT_SET(LVar1, 2) - EVT_EXEC(N(EVS_SetGateCameraZones)) - EVT_CALL(MakeLerp, 270, -10, 30, EASING_LINEAR) - EVT_LABEL(40) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, LVar9) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(40) - EVT_END_IF - EVT_SET(AB_MIM_1, 2) - EVT_CASE_EQ(2) - EVT_THREAD - EVT_CALL(MakeLerp, -10, 90, 10, EASING_QUADRATIC_IN) - EVT_LABEL(50) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, LVar9) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(50) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(15) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, LVar7) - EVT_ADD(LVar2, LVar8) - EVT_CALL(PlayerMoveTo, LVar0, LVar2, 15) - EVT_END_THREAD - EVT_SET(LVar1, 1) - EVT_EXEC(N(EVS_SetGateCameraZones)) - EVT_CALL(MakeLerp, 90, 360, 30, EASING_LINEAR) - EVT_LABEL(60) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, LVar9) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(60) - EVT_END_IF - EVT_EXEC(N(EVS_ResetGates)) - EVT_SET(AB_MIM_1, 1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Thread + Call(PlaySoundAtCollider, LVar9, SOUND_FOREST_GATE_OPEN, SOUND_SPACE_DEFAULT) + Wait(19) + Call(PlaySoundAtCollider, LVar9, SOUND_FOREST_GATE_CLOSE, SOUND_SPACE_DEFAULT) + EndThread + Switch(AB_MIM_1) + CaseEq(0) + Thread + Call(MakeLerp, 10, 90, 10, EASING_QUADRATIC_IN) + Label(10) + Call(UpdateLerp) + Call(RotateGroup, LVarA, LVar0, 0, 1, 0) + Call(UpdateColliderTransform, LVar9) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + EndThread + Wait(15) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, LVar7) + Add(LVar2, LVar8) + Call(PlayerMoveTo, LVar0, LVar2, 15) + EndThread + Set(LVar1, 1) + Exec(N(EVS_SetGateCameraZones)) + Call(MakeLerp, 90, 360, 30, EASING_LINEAR) + Label(20) + Call(UpdateLerp) + Call(RotateGroup, LVarA, LVar0, 0, 1, 0) + Call(UpdateColliderTransform, LVar9) + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Exec(N(EVS_ResetGates)) + Set(AB_MIM_1, 1) + Set(GF_MIM_ChoosingPath, TRUE) + CaseEq(1) + Thread + Call(MakeLerp, 360, 270, 10, EASING_QUADRATIC_IN) + Label(30) + Call(UpdateLerp) + Call(RotateGroup, LVarA, LVar0, 0, 1, 0) + Call(UpdateColliderTransform, LVar9) + Wait(1) + IfEq(LVar1, 1) + Goto(30) + EndIf + EndThread + Wait(15) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar0, LVar7) + Sub(LVar2, LVar8) + Call(PlayerMoveTo, LVar0, LVar2, 15) + EndThread + Set(LVar1, 2) + Exec(N(EVS_SetGateCameraZones)) + Call(MakeLerp, 270, -10, 30, EASING_LINEAR) + Label(40) + Call(UpdateLerp) + Call(RotateGroup, LVarA, LVar0, 0, 1, 0) + Call(UpdateColliderTransform, LVar9) + Wait(1) + IfEq(LVar1, 1) + Goto(40) + EndIf + Set(AB_MIM_1, 2) + CaseEq(2) + Thread + Call(MakeLerp, -10, 90, 10, EASING_QUADRATIC_IN) + Label(50) + Call(UpdateLerp) + Call(RotateGroup, LVarA, LVar0, 0, 1, 0) + Call(UpdateColliderTransform, LVar9) + Wait(1) + IfEq(LVar1, 1) + Goto(50) + EndIf + EndThread + Wait(15) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, LVar7) + Add(LVar2, LVar8) + Call(PlayerMoveTo, LVar0, LVar2, 15) + EndThread + Set(LVar1, 1) + Exec(N(EVS_SetGateCameraZones)) + Call(MakeLerp, 90, 360, 30, EASING_LINEAR) + Label(60) + Call(UpdateLerp) + Call(RotateGroup, LVarA, LVar0, 0, 1, 0) + Call(UpdateColliderTransform, LVar9) + Wait(1) + IfEq(LVar1, 1) + Goto(60) + EndIf + Exec(N(EVS_ResetGates)) + Set(AB_MIM_1, 1) + EndSwitch + Return + End }; EvtScript N(EVS_UseGate_North) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 70) - EVT_SET(LVar9, COLLIDER_monn) - EVT_SET(LVarA, MODEL_monn) - EVT_EXEC_WAIT(N(EVS_UseGate)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Set(LVar7, 0) + Set(LVar8, 70) + Set(LVar9, COLLIDER_monn) + Set(LVarA, MODEL_monn) + ExecWait(N(EVS_UseGate)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_UseGate_South) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, -70) - EVT_SET(LVar9, COLLIDER_mons) - EVT_SET(LVarA, MODEL_mons) - EVT_EXEC_WAIT(N(EVS_UseGate)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Set(LVar7, 0) + Set(LVar8, -70) + Set(LVar9, COLLIDER_mons) + Set(LVarA, MODEL_mons) + ExecWait(N(EVS_UseGate)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_UseGate_East) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar7, -70) - EVT_SET(LVar8, 0) - EVT_SET(LVar9, COLLIDER_mone) - EVT_SET(LVarA, MODEL_mone) - EVT_EXEC_WAIT(N(EVS_UseGate)) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS) - EVT_IF_EQ(GF_MIM10_Defeated_JrTroopa, FALSE) - EVT_IF_EQ(GF_MIM10_JrTroopaFreakout, FALSE) - EVT_SET(GF_MIM10_JrTroopaFreakout, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH3_0017, 160, 40) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Set(LVar7, -70) + Set(LVar8, 0) + Set(LVar9, COLLIDER_mone) + Set(LVarA, MODEL_mone) + ExecWait(N(EVS_UseGate)) + IfGe(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS) + IfEq(GF_MIM10_Defeated_JrTroopa, FALSE) + IfEq(GF_MIM10_JrTroopaFreakout, FALSE) + Set(GF_MIM10_JrTroopaFreakout, TRUE) + Call(ShowMessageAtScreenPos, MSG_CH3_0017, 160, 40) + EndIf + EndIf + EndIf + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_UseGate_West) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar7, 70) - EVT_SET(LVar8, 0) - EVT_SET(LVar9, COLLIDER_monw) - EVT_SET(LVarA, MODEL_monw) - EVT_EXEC_WAIT(N(EVS_UseGate)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Set(LVar7, 70) + Set(LVar8, 0) + Set(LVar9, COLLIDER_monw) + Set(LVarA, MODEL_monw) + ExecWait(N(EVS_UseGate)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SetupGates) = { - EVT_IF_EQ(GF_MIM_ChoosingPath, FALSE) - EVT_SET(GF_MIM_ChoosingPath, TRUE) - EVT_SET(AB_MIM_1, 2) - EVT_SET(LVar1, 2) - EVT_SET(LVar2, -10) - EVT_ELSE - EVT_SET(GF_MIM_ChoosingPath, FALSE) - EVT_SET(AB_MIM_1, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 10) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_SetGateCameraZones)) - EVT_EXEC(N(EVS_InitializeGates)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseGate_North)), TRIGGER_WALL_PRESS_A, COLLIDER_monn, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseGate_South)), TRIGGER_WALL_PRESS_A, COLLIDER_mons, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseGate_West)), TRIGGER_WALL_PRESS_A, COLLIDER_monw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseGate_East)), TRIGGER_WALL_PRESS_A, COLLIDER_mone, 1, 0) - EVT_RETURN - EVT_END + IfEq(GF_MIM_ChoosingPath, FALSE) + Set(GF_MIM_ChoosingPath, TRUE) + Set(AB_MIM_1, 2) + Set(LVar1, 2) + Set(LVar2, -10) + Else + Set(GF_MIM_ChoosingPath, FALSE) + Set(AB_MIM_1, 0) + Set(LVar1, 0) + Set(LVar2, 10) + EndIf + ExecWait(N(EVS_SetGateCameraZones)) + Exec(N(EVS_InitializeGates)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + BindTrigger(Ref(N(EVS_UseGate_North)), TRIGGER_WALL_PRESS_A, COLLIDER_monn, 1, 0) + BindTrigger(Ref(N(EVS_UseGate_South)), TRIGGER_WALL_PRESS_A, COLLIDER_mons, 1, 0) + BindTrigger(Ref(N(EVS_UseGate_West)), TRIGGER_WALL_PRESS_A, COLLIDER_monw, 1, 0) + BindTrigger(Ref(N(EVS_UseGate_East)), TRIGGER_WALL_PRESS_A, COLLIDER_mone, 1, 0) + Return + End }; diff --git a/src/world/area_mim/mim_07/mim_07_6_npc.c b/src/world/area_mim/mim_07/mim_07_6_npc.c index 1f35692234d..9e72ba6630b 100644 --- a/src/world/area_mim/mim_07/mim_07_6_npc.c +++ b/src/world/area_mim/mim_07/mim_07_6_npc.c @@ -45,141 +45,141 @@ s32 N(D_802429AC_BACAEC)[] = { }; EvtScript N(EVS_NpcIdle_JrTroopa) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(mim_07_ENTRY_0) - EVT_USE_BUF(EVT_PTR(N(D_80242944_BACA84))) - EVT_CASE_EQ(mim_07_ENTRY_1) - EVT_USE_BUF(EVT_PTR(N(D_80242944_BACA84))) - EVT_CASE_EQ(mim_07_ENTRY_2) - EVT_USE_BUF(EVT_PTR(N(D_8024294C_BACA8C))) - EVT_CASE_EQ(mim_07_ENTRY_3) - EVT_USE_BUF(EVT_PTR(N(D_80242954_BACA94))) - EVT_END_SWITCH - EVT_BUF_READ2(LVar1, LVar2) - EVT_CALL(AwaitPlayerApproach, LVar1, LVar2, 80) - EVT_LABEL(10) - EVT_WAIT(1) - EVT_CALL(AwaitPlayerLeave, LVar1, LVar2, 100) - EVT_CALL(IsPlayerWithin, 0, 0, 410, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(InterruptUsePartner) - EVT_WAIT(20) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_JrTroopaMusic)) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(mim_07_ENTRY_0) - EVT_IF_LT(LVar1, 0) - EVT_USE_BUF(EVT_PTR(N(D_8024295C_BACA9C))) - EVT_ELSE - EVT_USE_BUF(EVT_PTR(N(D_8024296C_BACAAC))) - EVT_END_IF - EVT_CASE_EQ(mim_07_ENTRY_2) - EVT_IF_LT(LVar1, 0) - EVT_USE_BUF(EVT_PTR(N(D_8024297C_BACABC))) - EVT_ELSE - EVT_USE_BUF(EVT_PTR(N(D_8024298C_BACACC))) - EVT_END_IF - EVT_CASE_EQ(mim_07_ENTRY_3) - EVT_IF_LT(LVar3, 0) - EVT_USE_BUF(EVT_PTR(N(D_8024299C_BACADC))) - EVT_ELSE - EVT_USE_BUF(EVT_PTR(N(D_802429AC_BACAEC))) - EVT_END_IF - EVT_END_SWITCH - EVT_BUF_READ4(LVar2, LVar3, LVar4, LVar5) - EVT_CALL(SetSelfVar, 0, LVar2) - EVT_CALL(SetSelfVar, 1, LVar3) - EVT_CALL(SetNpcPos, NPC_SELF, LVar2, 0, LVar3) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle, 0, MSG_CH3_0018) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, LVar4) - EVT_ADD(LVar2, LVar5) - EVT_DIV(LVar0, 2) - EVT_DIV(LVar2, 2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(20.0), EVT_FLOAT(-6.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Run) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar4, LVar5, 30) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Idle) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle, 0, MSG_CH3_0019) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PARTNER_GOOMBARIO) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 5, MSG_CH3_001A) - EVT_CASE_EQ(PARTNER_KOOPER) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 5, MSG_CH3_001B) - EVT_CASE_EQ(PARTNER_BOMBETTE) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 5, MSG_CH3_001C) - EVT_CASE_EQ(PARTNER_PARAKARRY) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 5, MSG_CH3_001D) - EVT_CASE_EQ(PARTNER_BOW) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 5, MSG_CH3_001E) - EVT_END_SWITCH - EVT_CALL(EnablePartnerAI) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle, 0, MSG_CH3_001F) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_ChargeArmsUp) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(StartBossBattle, SONG_JR_TROOPA_BATTLE) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(mim_07_ENTRY_0) + UseBuf(Ref(N(D_80242944_BACA84))) + CaseEq(mim_07_ENTRY_1) + UseBuf(Ref(N(D_80242944_BACA84))) + CaseEq(mim_07_ENTRY_2) + UseBuf(Ref(N(D_8024294C_BACA8C))) + CaseEq(mim_07_ENTRY_3) + UseBuf(Ref(N(D_80242954_BACA94))) + EndSwitch + BufRead2(LVar1, LVar2) + Call(AwaitPlayerApproach, LVar1, LVar2, 80) + Label(10) + Wait(1) + Call(AwaitPlayerLeave, LVar1, LVar2, 100) + Call(IsPlayerWithin, 0, 0, 410, LVar0) + IfEq(LVar0, 0) + Goto(10) + EndIf + Call(DisablePlayerInput, TRUE) + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, PARTNER_NONE) + Call(InterruptUsePartner) + Wait(20) + EndIf + ExecWait(N(EVS_JrTroopaMusic)) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(mim_07_ENTRY_0) + IfLt(LVar1, 0) + UseBuf(Ref(N(D_8024295C_BACA9C))) + Else + UseBuf(Ref(N(D_8024296C_BACAAC))) + EndIf + CaseEq(mim_07_ENTRY_2) + IfLt(LVar1, 0) + UseBuf(Ref(N(D_8024297C_BACABC))) + Else + UseBuf(Ref(N(D_8024298C_BACACC))) + EndIf + CaseEq(mim_07_ENTRY_3) + IfLt(LVar3, 0) + UseBuf(Ref(N(D_8024299C_BACADC))) + Else + UseBuf(Ref(N(D_802429AC_BACAEC))) + EndIf + EndSwitch + BufRead4(LVar2, LVar3, LVar4, LVar5) + Call(SetSelfVar, 0, LVar2) + Call(SetSelfVar, 1, LVar3) + Call(SetNpcPos, NPC_SELF, LVar2, 0, LVar3) + Call(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle, 0, MSG_CH3_0018) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, LVar4) + Add(LVar2, LVar5) + Div(LVar0, 2) + Div(LVar2, 2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(20.0), Float(-6.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Run) + Call(NpcMoveTo, NPC_SELF, LVar4, LVar5, 30) + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Idle) + Call(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle, 0, MSG_CH3_0019) + Call(DisablePartnerAI, 0) + Call(GetCurrentPartnerID, LVar0) + Switch(LVar0) + CaseEq(PARTNER_GOOMBARIO) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 5, MSG_CH3_001A) + CaseEq(PARTNER_KOOPER) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 5, MSG_CH3_001B) + CaseEq(PARTNER_BOMBETTE) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 5, MSG_CH3_001C) + CaseEq(PARTNER_PARAKARRY) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 5, MSG_CH3_001D) + CaseEq(PARTNER_BOW) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 5, MSG_CH3_001E) + EndSwitch + Call(EnablePartnerAI) + Call(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle, 0, MSG_CH3_001F) + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_ChargeArmsUp) + Call(DisablePlayerInput, FALSE) + Call(StartBossBattle, SONG_JR_TROOPA_BATTLE) + Return + End }; EvtScript N(EVS_NpcDefeat_JrTroopa) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle, 0, MSG_CH3_0022) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_CALL(GetSelfVar, 1, LVar1) - EVT_IF_GE(LVar1, 0) - EVT_CALL(InterpNpcYaw, NPC_SELF, 200, 0) - EVT_ELSE - EVT_CALL(InterpNpcYaw, NPC_SELF, 330, 0) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_ChargeArmsUp) - EVT_WAIT(10 * DT) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, LVar1, 15) - EVT_SET(GF_MIM10_Defeated_JrTroopa, TRUE) - EVT_EXEC_WAIT(N(EVS_PlayForestMusic)) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle, 0, MSG_CH3_0022) + Call(GetSelfVar, 0, LVar0) + Call(GetSelfVar, 1, LVar1) + IfGe(LVar1, 0) + Call(InterpNpcYaw, NPC_SELF, 200, 0) + Else + Call(InterpNpcYaw, NPC_SELF, 330, 0) + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_ChargeArmsUp) + Wait(10 * DT) + Call(NpcMoveTo, NPC_SELF, LVar0, LVar1, 15) + Set(GF_MIM10_Defeated_JrTroopa, TRUE) + ExecWait(N(EVS_PlayForestMusic)) + Call(ResetCam, CAM_DEFAULT, Float(4.0 / DT)) + Call(RemoveNpc, NPC_SELF) + Return + End }; EvtScript N(EVS_NpcInit_JrTroopa) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS) - EVT_IF_EQ(GF_MIM10_Defeated_JrTroopa, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_JrTroopa))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_JrTroopa))) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS) + IfEq(GF_MIM10_Defeated_JrTroopa, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_JrTroopa))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_JrTroopa))) + Return + EndIf + EndIf + Call(RemoveNpc, NPC_SELF) + Return + End }; EvtScript N(EVS_NpcInit_Fuzzy) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS) - EVT_IF_EQ(GF_MIM10_Defeated_JrTroopa, FALSE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS) + IfEq(GF_MIM10_Defeated_JrTroopa, FALSE) + Call(RemoveNpc, NPC_SELF) + EndIf + EndIf + Return + End }; NpcData N(NpcData_Fuzzy_01) = { diff --git a/src/world/area_mim/mim_08/mim_08_1_music.c b/src/world/area_mim/mim_08/mim_08_1_music.c index 17e8f5bdb5c..0ae8c1d9ad8 100644 --- a/src/world/area_mim/mim_08/mim_08_1_music.c +++ b/src/world/area_mim/mim_08/mim_08_1_music.c @@ -1,8 +1,8 @@ #include "mim_08.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_SPOOKY) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8) + Call(PlayAmbientSounds, AMBIENT_SPOOKY) + Return + End }; diff --git a/src/world/area_mim/mim_08/mim_08_2_main.c b/src/world/area_mim/mim_08/mim_08_2_main.c index ce22471db88..bbb53ed7975 100644 --- a/src/world/area_mim/mim_08/mim_08_2_main.c +++ b/src/world/area_mim/mim_08/mim_08_2_main.c @@ -13,63 +13,63 @@ EvtScript N(EVS_ExitWalk_s) = EVT_EXIT_WALK(60, mim_08_ENTRY_2, "mim_01", mim_01 EvtScript N(EVS_ExitWalk_e) = EVT_EXIT_WALK(60, mim_08_ENTRY_3, "mim_01", mim_01_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_n)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_w)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_s)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_e)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_n)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_w)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_s)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_e)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(D_802431F0_BB0B30) = { - EVT_LOOP(6) - EVT_SET(LVar0, 2) - EVT_CALL(TranslateModel, MODEL_o507, LVar0, 0, LVar0) - EVT_CALL(TranslateModel, MODEL_o508, LVar0, 0, LVar0) - EVT_WAIT(1) - EVT_SET(LVar0, -2) - EVT_CALL(TranslateModel, MODEL_o507, LVar0, 0, LVar0) - EVT_CALL(TranslateModel, MODEL_o508, LVar0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o507, LVar0, 0, LVar0) - EVT_CALL(TranslateModel, MODEL_o508, LVar0, 0, LVar0) - EVT_WAIT(1) - EVT_SET(MV_Unk_00, 1) - EVT_RETURN - EVT_END + Loop(6) + Set(LVar0, 2) + Call(TranslateModel, MODEL_o507, LVar0, 0, LVar0) + Call(TranslateModel, MODEL_o508, LVar0, 0, LVar0) + Wait(1) + Set(LVar0, -2) + Call(TranslateModel, MODEL_o507, LVar0, 0, LVar0) + Call(TranslateModel, MODEL_o508, LVar0, 0, LVar0) + Wait(1) + EndLoop + Set(LVar0, 0) + Call(TranslateModel, MODEL_o507, LVar0, 0, LVar0) + Call(TranslateModel, MODEL_o508, LVar0, 0, LVar0) + Wait(1) + Set(MV_Unk_00, 1) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FOREVER_FOREST) - EVT_CALL(SetSpriteShading, SHADING_MIM_08) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 650) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SET(AB_MIM_2, GB_MIM_CurrentMapID) - EVT_CALL(GetMapID, GB_MIM_CurrentMapID) - EVT_EXEC_WAIT(N(EVS_SetupGates)) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_BIND_TRIGGER(EVT_PTR(N(D_802431F0_BB0B30)), TRIGGER_WALL_HAMMER, COLLIDER_o473, 1, 0) - EVT_CALL(N(SetForeverForestFog)) - EVT_THREAD - EVT_LABEL(0) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(N(GetPlayerDistFromMapCenter)) - EVT_IF_LT(LVar0, 350) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_ELSE - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_END_IF - EVT_GOTO(0) - EVT_END_THREAD - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_FOREVER_FOREST) + Call(SetSpriteShading, SHADING_MIM_08) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 650) + Call(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Set(AB_MIM_2, GB_MIM_CurrentMapID) + Call(GetMapID, GB_MIM_CurrentMapID) + ExecWait(N(EVS_SetupGates)) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Exec(N(EVS_SetupMusic)) + BindTrigger(Ref(N(D_802431F0_BB0B30)), TRIGGER_WALL_HAMMER, COLLIDER_o473, 1, 0) + Call(N(SetForeverForestFog)) + Thread + Label(0) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(N(GetPlayerDistFromMapCenter)) + IfLt(LVar0, 350) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Else + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + EndIf + Goto(0) + EndThread + Return + End }; diff --git a/src/world/area_mim/mim_08/mim_08_3_entity.c b/src/world/area_mim/mim_08/mim_08_3_entity.c index 24859688fe3..8851bd657f2 100644 --- a/src/world/area_mim/mim_08/mim_08_3_entity.c +++ b/src/world/area_mim/mim_08/mim_08_3_entity.c @@ -2,8 +2,8 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_RedBlock), 0, 93, 0, 45, ITEM_HP_PLUS_A, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_MIM08_BadgeBlock_HPPlusA) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_RedBlock), 0, 93, 0, 45, ITEM_HP_PLUS_A, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_MIM08_BadgeBlock_HPPlusA) + Return + End }; diff --git a/src/world/area_mim/mim_08/mim_08_5_npc.c b/src/world/area_mim/mim_08/mim_08_5_npc.c index 3f1cdba7281..2dea1d29012 100644 --- a/src/world/area_mim/mim_08/mim_08_5_npc.c +++ b/src/world/area_mim/mim_08/mim_08_5_npc.c @@ -5,24 +5,24 @@ #include "world/common/enemy/PiranhaPlant.inc.c" EvtScript N(EVS_NpcIdle_Bzzap) = { - EVT_LABEL(100) - EVT_WAIT(1) - EVT_IF_EQ(MV_Unk_00, 0) - EVT_GOTO(100) - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_SELF, -280, 108, 0) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump1, NPC_SELF, -280, 50, 10, 5) - EVT_WAIT(50) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Bzzap))) - EVT_RETURN - EVT_END + Label(100) + Wait(1) + IfEq(MV_Unk_00, 0) + Goto(100) + EndIf + Call(SetNpcPos, NPC_SELF, -280, 108, 0) + Call(SetNpcJumpscale, NPC_SELF, Float(0.0)) + Call(NpcJump1, NPC_SELF, -280, 50, 10, 5) + Wait(50) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_Bzzap))) + Return + End }; EvtScript N(EVS_NpcInit_Bzzap) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Bzzap))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Bzzap))) + Return + End }; NpcData N(NpcData_Bzzap) = { diff --git a/src/world/area_mim/mim_09/mim_09_1_music.c b/src/world/area_mim/mim_09/mim_09_1_music.c index 57dbb5688a8..571197d948b 100644 --- a/src/world/area_mim/mim_09/mim_09_1_music.c +++ b/src/world/area_mim/mim_09/mim_09_1_music.c @@ -1,8 +1,8 @@ #include "mim_09.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_SPOOKY) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8) + Call(PlayAmbientSounds, AMBIENT_SPOOKY) + Return + End }; diff --git a/src/world/area_mim/mim_09/mim_09_2_main.c b/src/world/area_mim/mim_09/mim_09_2_main.c index ecd26460ed7..2b3bd21453d 100644 --- a/src/world/area_mim/mim_09/mim_09_2_main.c +++ b/src/world/area_mim/mim_09/mim_09_2_main.c @@ -13,43 +13,43 @@ EvtScript N(EVS_ExitWalk_s) = EVT_EXIT_WALK(60, mim_09_ENTRY_2, "mim_07", mim_07 EvtScript N(EVS_ExitWalk_e) = EVT_EXIT_WALK(60, mim_09_ENTRY_3, "mim_01", mim_01_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_n)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_w)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_s)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_e)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_n)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_w)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_s)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_e)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FOREVER_FOREST) - EVT_CALL(SetSpriteShading, SHADING_MIM_09) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 650) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SET(AB_MIM_2, GB_MIM_CurrentMapID) - EVT_CALL(GetMapID, GB_MIM_CurrentMapID) - EVT_EXEC_WAIT(N(EVS_SetupGates)) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC_WAIT(N(EVS_SetupExitHint)) - EVT_CALL(N(SetForeverForestFog)) - EVT_THREAD - EVT_LABEL(0) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(N(GetPlayerDistFromMapCenter)) - EVT_IF_LT(LVar0, 350) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_ELSE - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_END_IF - EVT_GOTO(0) - EVT_END_THREAD - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_FOREVER_FOREST) + Call(SetSpriteShading, SHADING_MIM_09) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 650) + Call(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Set(AB_MIM_2, GB_MIM_CurrentMapID) + Call(GetMapID, GB_MIM_CurrentMapID) + ExecWait(N(EVS_SetupGates)) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Exec(N(EVS_SetupMusic)) + ExecWait(N(EVS_SetupExitHint)) + Call(N(SetForeverForestFog)) + Thread + Label(0) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(N(GetPlayerDistFromMapCenter)) + IfLt(LVar0, 350) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Else + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + EndIf + Goto(0) + EndThread + Return + End }; diff --git a/src/world/area_mim/mim_09/mim_09_3_entity.c b/src/world/area_mim/mim_09/mim_09_3_entity.c index 429fb29c28e..a95fc3c96ff 100644 --- a/src/world/area_mim/mim_09/mim_09_3_entity.c +++ b/src/world/area_mim/mim_09/mim_09_3_entity.c @@ -2,8 +2,8 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_RedBlock), 0, 92, 0, 45, ITEM_FP_PLUS_A, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_MIM09_BadgeBlock_FPPlusA) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_RedBlock), 0, 92, 0, 45, ITEM_FP_PLUS_A, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_MIM09_BadgeBlock_FPPlusA) + Return + End }; diff --git a/src/world/area_mim/mim_09/mim_09_4_hint.c b/src/world/area_mim/mim_09/mim_09_4_hint.c index 28f946e87b5..7657e5b0e82 100644 --- a/src/world/area_mim/mim_09/mim_09_4_hint.c +++ b/src/world/area_mim/mim_09/mim_09_4_hint.c @@ -1,95 +1,95 @@ #include "mim_09.h" EvtScript N(EVS_FlowersGentleRocking) = { - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, -0x8000) - EVT_WAIT(2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, -0x10000) - EVT_WAIT(2) - EVT_CALL(PlaySoundAt, SOUND_FLOWERS_LAUGH, SOUND_SPACE_DEFAULT, -23, 0, 300) - EVT_CALL(MakeLerp, 0, 30, 50, EASING_COS_IN_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o464, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o465, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o466, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o467, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o468, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o469, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_FLOWERS_LAUGH, SOUND_SPACE_DEFAULT, -23, 0, 300) - EVT_CALL(MakeLerp, 30, -30, 50, EASING_COS_IN_OUT) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o464, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o465, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o466, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o467, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o468, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o469, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_FLOWERS_LAUGH, SOUND_SPACE_DEFAULT, -23, 0, 300) - EVT_CALL(MakeLerp, -30, 0, 50, EASING_COS_IN_OUT) - EVT_LABEL(30) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o464, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o465, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o466, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o467, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o468, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o469, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(30) - EVT_END_IF - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, -0x8000) - EVT_WAIT(2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, 0) - EVT_WAIT(20) - EVT_RETURN - EVT_END + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, -0x8000) + Wait(2) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, -0x10000) + Wait(2) + Call(PlaySoundAt, SOUND_FLOWERS_LAUGH, SOUND_SPACE_DEFAULT, -23, 0, 300) + Call(MakeLerp, 0, 30, 50, EASING_COS_IN_OUT) + Label(10) + Call(UpdateLerp) + Call(RotateModel, MODEL_o464, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o465, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o466, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o467, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o468, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o469, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(PlaySoundAt, SOUND_FLOWERS_LAUGH, SOUND_SPACE_DEFAULT, -23, 0, 300) + Call(MakeLerp, 30, -30, 50, EASING_COS_IN_OUT) + Label(20) + Call(UpdateLerp) + Call(RotateModel, MODEL_o464, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o465, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o466, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o467, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o468, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o469, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Call(PlaySoundAt, SOUND_FLOWERS_LAUGH, SOUND_SPACE_DEFAULT, -23, 0, 300) + Call(MakeLerp, -30, 0, 50, EASING_COS_IN_OUT) + Label(30) + Call(UpdateLerp) + Call(RotateModel, MODEL_o464, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o465, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o466, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o467, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o468, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o469, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 1) + Goto(30) + EndIf + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, -0x8000) + Wait(2) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, 0) + Wait(20) + Return + End }; EvtScript N(EVS_InspectBush) = { - EVT_IF_EQ(MV_FoundHint, FALSE) - EVT_SET(MV_FoundHint, TRUE) - EVT_CALL(SetGroupVisibility, MODEL_hana, MODEL_GROUP_VISIBLE) - EVT_CALL(PlaySound, SOUND_FLOWERS_GROW) - EVT_CALL(MakeLerp, 10, 100, 30, EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_MULF(LVar0, EVT_FLOAT(0.01)) - EVT_CALL(ScaleModel, MODEL_o464, LVar0, LVar0, LVar0) - EVT_CALL(ScaleModel, MODEL_o465, LVar0, LVar0, LVar0) - EVT_CALL(ScaleModel, MODEL_o466, LVar0, LVar0, LVar0) - EVT_CALL(ScaleModel, MODEL_o467, LVar0, LVar0, LVar0) - EVT_CALL(ScaleModel, MODEL_o468, LVar0, LVar0, LVar0) - EVT_CALL(ScaleModel, MODEL_o469, LVar0, LVar0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_FlowersGentleRocking)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_FlowersGentleRocking)) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MV_FoundHint, FALSE) + Set(MV_FoundHint, TRUE) + Call(SetGroupVisibility, MODEL_hana, MODEL_GROUP_VISIBLE) + Call(PlaySound, SOUND_FLOWERS_GROW) + Call(MakeLerp, 10, 100, 30, EASING_LINEAR) + Label(0) + Call(UpdateLerp) + MulF(LVar0, Float(0.01)) + Call(ScaleModel, MODEL_o464, LVar0, LVar0, LVar0) + Call(ScaleModel, MODEL_o465, LVar0, LVar0, LVar0) + Call(ScaleModel, MODEL_o466, LVar0, LVar0, LVar0) + Call(ScaleModel, MODEL_o467, LVar0, LVar0, LVar0) + Call(ScaleModel, MODEL_o468, LVar0, LVar0, LVar0) + Call(ScaleModel, MODEL_o469, LVar0, LVar0, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Wait(10) + ExecWait(N(EVS_FlowersGentleRocking)) + Else + ExecWait(N(EVS_FlowersGentleRocking)) + EndIf + Return + End }; EvtScript N(EVS_SetupExitHint) = { - EVT_SET(MV_FoundHint, 0) - EVT_CALL(SetGroupVisibility, MODEL_hana, MODEL_GROUP_HIDDEN) - EVT_CALL(SetTexPanner, MODEL_o465, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o467, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o469, TEX_PANNER_0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_InspectBush)), TRIGGER_WALL_PRESS_A, COLLIDER_atari_kusa, 1, 0) - EVT_RETURN - EVT_END + Set(MV_FoundHint, 0) + Call(SetGroupVisibility, MODEL_hana, MODEL_GROUP_HIDDEN) + Call(SetTexPanner, MODEL_o465, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o467, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o469, TEX_PANNER_0) + BindTrigger(Ref(N(EVS_InspectBush)), TRIGGER_WALL_PRESS_A, COLLIDER_atari_kusa, 1, 0) + Return + End }; diff --git a/src/world/area_mim/mim_10/mim_10_1_music.c b/src/world/area_mim/mim_10/mim_10_1_music.c index be7542002ea..14ae86d5025 100644 --- a/src/world/area_mim/mim_10/mim_10_1_music.c +++ b/src/world/area_mim/mim_10/mim_10_1_music.c @@ -1,60 +1,60 @@ #include "mim_10.h" EvtScript N(EVS_SetToadTownMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_INVASION, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseRange(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) + Call(SetMusicTrack, 0, SONG_SHY_GUY_INVASION, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_TOAD_TOWN, 0, 8) + EndSwitch + Return + End }; EvtScript N(EVS_SetupMusic) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH3_SAW_BOO_ENTER_FOREST) - EVT_EXEC(N(EVS_SetToadTownMusic)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(N(EVS_SetToadTownMusic)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_IF_LT(LVar1, 0) - EVT_EXEC(N(EVS_SetToadTownMusic)) - EVT_WAIT(30) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8) - EVT_WAIT(15) - EVT_CALL(ClearAmbientSounds, 250) - EVT_WAIT(15) - EVT_GOTO(20) - EVT_END_IF - EVT_LABEL(10) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_IF_GE(LVar1, 100) - EVT_CALL(FadeOutMusic, 0, 1000) - EVT_WAIT(15) - EVT_WAIT(15) - EVT_CALL(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8) - EVT_WAIT(30) - EVT_GOTO(20) - EVT_END_IF - EVT_GOTO(10) - EVT_LABEL(20) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_IF_LT(LVar1, 0) - EVT_CALL(FadeOutMusic, 0, 1000) - EVT_WAIT(30) - EVT_EXEC(N(EVS_SetToadTownMusic)) - EVT_WAIT(30) - EVT_GOTO(10) - EVT_END_IF - EVT_GOTO(20) - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH3_SAW_BOO_ENTER_FOREST) + Exec(N(EVS_SetToadTownMusic)) + Return + EndIf + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(N(EVS_SetToadTownMusic)) + Return + EndIf + Call(GetPlayerPos, LVar1, LVar2, LVar3) + IfLt(LVar1, 0) + Exec(N(EVS_SetToadTownMusic)) + Wait(30) + Else + Call(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8) + Wait(15) + Call(ClearAmbientSounds, 250) + Wait(15) + Goto(20) + EndIf + Label(10) + Wait(1) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + IfGe(LVar1, 100) + Call(FadeOutMusic, 0, 1000) + Wait(15) + Wait(15) + Call(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8) + Wait(30) + Goto(20) + EndIf + Goto(10) + Label(20) + Wait(1) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + IfLt(LVar1, 0) + Call(FadeOutMusic, 0, 1000) + Wait(30) + Exec(N(EVS_SetToadTownMusic)) + Wait(30) + Goto(10) + EndIf + Goto(20) + Return + End }; diff --git a/src/world/area_mim/mim_10/mim_10_2_entity.c b/src/world/area_mim/mim_10/mim_10_2_entity.c index 54933478d47..3bbfff8905c 100644 --- a/src/world/area_mim/mim_10/mim_10_2_entity.c +++ b/src/world/area_mim/mim_10/mim_10_2_entity.c @@ -2,7 +2,7 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), -175, 60, -50, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_SavePoint), -175, 60, -50, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_mim/mim_10/mim_10_3_main.c b/src/world/area_mim/mim_10/mim_10_3_main.c index 5c7528607b5..abc1575b742 100644 --- a/src/world/area_mim/mim_10/mim_10_3_main.c +++ b/src/world/area_mim/mim_10/mim_10_3_main.c @@ -3,55 +3,55 @@ EvtScript N(EVS_ExitWalk_mac_02_1) = EVT_EXIT_WALK(60, mim_10_ENTRY_0, "mac_02", mac_02_ENTRY_1); EvtScript N(EVS_ExitWalk_mim_01_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(UseExitHeading, 60, mim_10_ENTRY_1) - EVT_EXEC(ExitWalk) - EVT_IF_EQ(GB_StoryProgress, STORY_CH3_INVITED_TO_BOOS_MANSION) - EVT_IF_EQ(GF_StartedChapter3, FALSE) - EVT_SET(GF_StartedChapter3, TRUE) - EVT_CALL(FadeOutMusic, 0, 1500) - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_22"), kmr_22_ENTRY_3, TRANSITION_BEGIN_OR_END_CHAPTER) - EVT_WAIT(100) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("mim_01"), mim_01_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(UseExitHeading, 60, mim_10_ENTRY_1) + Exec(ExitWalk) + IfEq(GB_StoryProgress, STORY_CH3_INVITED_TO_BOOS_MANSION) + IfEq(GF_StartedChapter3, FALSE) + Set(GF_StartedChapter3, TRUE) + Call(FadeOutMusic, 0, 1500) + Call(GotoMapSpecial, Ref("kmr_22"), kmr_22_ENTRY_3, TRANSITION_BEGIN_OR_END_CHAPTER) + Wait(100) + Return + EndIf + EndIf + Call(GotoMap, Ref("mim_01"), mim_01_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_mac_02_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_mim_01_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_mac_02_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_mim_01_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_SetupBootlerTrigger)) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_SET(GF_MAC01_RowfBadgesChosen, FALSE) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TOAD_TOWN) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Exec(N(EVS_SetupBootlerTrigger)) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Wait(1) + Set(GF_MAC01_RowfBadgesChosen, FALSE) + Return + End }; diff --git a/src/world/area_mim/mim_10/mim_10_4_npc.c b/src/world/area_mim/mim_10/mim_10_4_npc.c index 04a9f63e971..d640e333140 100644 --- a/src/world/area_mim/mim_10/mim_10_4_npc.c +++ b/src/world/area_mim/mim_10/mim_10_4_npc.c @@ -75,25 +75,25 @@ NpcSettings N(NpcSettings_JrTroopa) = { }; EvtScript N(EVS_Bootler_SpookPlayer) = { - EVT_CHILD_THREAD - EVT_CALL(GetPlayerPos, LVarA, LVarB, LVarC) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVarA, LVarB, LVarC) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_LOOP(0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 400) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_WAIT(5 * DT) - EVT_CALL(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Spook, ANIM_Bootler_Spook, 0, MSG_CH3_0002) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_RETURN - EVT_END + ChildThread + Call(GetPlayerPos, LVarA, LVarB, LVarC) + Call(UseSettingsFrom, CAM_DEFAULT, LVarA, LVarB, LVarC) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Loop(0) + Call(SetCamDistance, CAM_DEFAULT, 400) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(SetCamDistance, CAM_DEFAULT, 450) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + EndLoop + EndChildThread + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + Wait(5 * DT) + Call(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Spook, ANIM_Bootler_Spook, 0, MSG_CH3_0002) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Return + End }; #if VERSION_PAL @@ -103,154 +103,154 @@ EvtScript N(EVS_Bootler_SpookPlayer) = { #endif EvtScript N(EVS_Scene_BootlersInvitation) = { - EVT_CALL(N(AwaitPlayerApproachForest)) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 650) - EVT_CALL(N(InitializeLightingBright)) - EVT_THREAD - EVT_CALL(N(ReduceFogEndDist)) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(DarkenBackground)) - EVT_END_THREAD - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcPos, NPC_Bootler, 200, 44, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Bootler, IMGFX_SET_ALPHA, 0, 0, 0, 0) - EVT_SET(MV_Unk_00, TRUE) - EVT_CALL(SetMusicTrack, 0, SONG_BOOS_MANSION, 0, 8) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_LookAround) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_WAIT(10 * DT) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_WAIT(20 * DT) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_WAIT(20 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Bootler, SOUND_BOO_VANISH_A, SOUND_SPACE_DEFAULT) - EVT_SETF(LVar0, EVT_FLOAT(0.0)) - EVT_LOOP(20 * DT) - EVT_ADDF(LVar0, EVT_FLOAT(VAR_1)) - EVT_CALL(SetNpcImgFXParams, NPC_Bootler, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(20 * DT) - EVT_CALL(GetNpcPos, NPC_Bootler, LVarA, LVarB, LVarC) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVarA, LVarB, LVarC) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVarA, LVarB, LVarC) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 270) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Talk, ANIM_Bootler_Idle, 0, MSG_CH3_0000) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, TRUE) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Talk, ANIM_Bootler_Idle, 0, MSG_CH3_0001) - EVT_CALL(PlaySoundAtNpc, NPC_Bootler, SOUND_BOO_APPEAR_A, SOUND_SPACE_DEFAULT) - EVT_SETF(LVar0, EVT_FLOAT(240.0)) - EVT_LOOP(20 * DT) - EVT_SUBF(LVar0, EVT_FLOAT(VAR_1)) - EVT_CALL(SetNpcImgFXParams, NPC_Bootler, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(25 * DT) - EVT_CALL(SetNpcAnimation, NPC_Bootler, ANIM_Bootler_Spook) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Bootler, LVarA, LVarB, LVarC) - EVT_SUB(LVarB, 40) - EVT_CALL(SetNpcPos, NPC_Bootler, LVarA, LVarB, LVarC) - EVT_CALL(SetNpcScale, NPC_Bootler, EVT_FLOAT(3.0), EVT_FLOAT(3.0), EVT_FLOAT(3.0)) - EVT_SETF(LVar0, EVT_FLOAT(0.0)) - EVT_LOOP(20 * DT) - EVT_ADDF(LVar0, EVT_FLOAT(VAR_1)) - EVT_CALL(SetNpcImgFXParams, NPC_Bootler, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_Bootler, SOUND_BOOTLER_SPOOK, SOUND_SPACE_DEFAULT) - EVT_EXEC_WAIT(N(EVS_Bootler_SpookPlayer)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_SETF(LVar0, EVT_FLOAT(240.0)) - EVT_LOOP(20 * DT) - EVT_SUBF(LVar0, EVT_FLOAT(VAR_1)) - EVT_CALL(SetNpcImgFXParams, NPC_Bootler, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(GB_StoryProgress, STORY_CH3_INVITED_TO_BOOS_MANSION) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(SetNpcPos, NPC_Bootler, NPC_DISPOSE_LOCATION) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(N(AwaitPlayerApproachForest)) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 650) + Call(N(InitializeLightingBright)) + Thread + Call(N(ReduceFogEndDist)) + EndThread + Thread + Call(N(DarkenBackground)) + EndThread + Call(DisablePlayerInput, TRUE) + Call(SetNpcPos, NPC_Bootler, 200, 44, 0) + Call(SetNpcImgFXParams, NPC_Bootler, IMGFX_SET_ALPHA, 0, 0, 0, 0) + Set(MV_Unk_00, TRUE) + Call(SetMusicTrack, 0, SONG_BOOS_MANSION, 0, 8) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_MarioW2_LookAround) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Wait(10 * DT) + Call(InterpPlayerYaw, 270, 0) + Wait(20 * DT) + Call(InterpPlayerYaw, 90, 0) + Wait(20 * DT) + Call(PlaySoundAtNpc, NPC_Bootler, SOUND_BOO_VANISH_A, SOUND_SPACE_DEFAULT) + SetF(LVar0, Float(0.0)) + Loop(20 * DT) + AddF(LVar0, Float(VAR_1)) + Call(SetNpcImgFXParams, NPC_Bootler, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + EndLoop + Wait(20 * DT) + Call(GetNpcPos, NPC_Bootler, LVarA, LVarB, LVarC) + Call(UseSettingsFrom, CAM_DEFAULT, LVarA, LVarB, LVarC) + Call(SetPanTarget, CAM_DEFAULT, LVarA, LVarB, LVarC) + Call(SetCamDistance, CAM_DEFAULT, 270) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Talk, ANIM_Bootler_Idle, 0, MSG_CH3_0000) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamLeadPlayer, CAM_DEFAULT, TRUE) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Wait(30 * DT) + Call(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Talk, ANIM_Bootler_Idle, 0, MSG_CH3_0001) + Call(PlaySoundAtNpc, NPC_Bootler, SOUND_BOO_APPEAR_A, SOUND_SPACE_DEFAULT) + SetF(LVar0, Float(240.0)) + Loop(20 * DT) + SubF(LVar0, Float(VAR_1)) + Call(SetNpcImgFXParams, NPC_Bootler, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + EndLoop + Wait(25 * DT) + Call(SetNpcAnimation, NPC_Bootler, ANIM_Bootler_Spook) + Thread + Call(GetNpcPos, NPC_Bootler, LVarA, LVarB, LVarC) + Sub(LVarB, 40) + Call(SetNpcPos, NPC_Bootler, LVarA, LVarB, LVarC) + Call(SetNpcScale, NPC_Bootler, Float(3.0), Float(3.0), Float(3.0)) + SetF(LVar0, Float(0.0)) + Loop(20 * DT) + AddF(LVar0, Float(VAR_1)) + Call(SetNpcImgFXParams, NPC_Bootler, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + EndLoop + EndThread + Call(PlaySoundAtNpc, NPC_Bootler, SOUND_BOOTLER_SPOOK, SOUND_SPACE_DEFAULT) + ExecWait(N(EVS_Bootler_SpookPlayer)) + Call(SetCamDistance, CAM_DEFAULT, 450) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + SetF(LVar0, Float(240.0)) + Loop(20 * DT) + SubF(LVar0, Float(VAR_1)) + Call(SetNpcImgFXParams, NPC_Bootler, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + EndLoop + Set(GB_StoryProgress, STORY_CH3_INVITED_TO_BOOS_MANSION) + Exec(N(EVS_SetupMusic)) + Call(SetNpcPos, NPC_Bootler, NPC_DISPOSE_LOCATION) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SetupBootlerTrigger) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_SAW_BOO_ENTER_FOREST) - EVT_RETURN - EVT_CASE_LT(STORY_CH3_INVITED_TO_BOOS_MANSION) - EVT_EXEC(N(EVS_Scene_BootlersInvitation)) - EVT_CASE_RANGE(STORY_CH3_INVITED_TO_BOOS_MANSION, STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_SAW_BOO_ENTER_FOREST) + Return + CaseLt(STORY_CH3_INVITED_TO_BOOS_MANSION) + Exec(N(EVS_Scene_BootlersInvitation)) + CaseRange(STORY_CH3_INVITED_TO_BOOS_MANSION, STORY_CH3_STAR_SPIRIT_RESCUED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Bootler) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_SAW_BOO_ENTER_FOREST) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_CASE_LT(STORY_CH3_INVITED_TO_BOOS_MANSION) - EVT_SET(GF_KMR20_ReunitedWithLuigi, TRUE) - EVT_CASE_GE(STORY_CH3_INVITED_TO_BOOS_MANSION) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_SAW_BOO_ENTER_FOREST) + Call(RemoveNpc, NPC_SELF) + CaseLt(STORY_CH3_INVITED_TO_BOOS_MANSION) + Set(GF_KMR20_ReunitedWithLuigi, TRUE) + CaseGe(STORY_CH3_INVITED_TO_BOOS_MANSION) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; EvtScript N(EVS_NpcIdle_JrTroopa) = { - EVT_CALL(WaitForPlayerInputEnabled) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(MV_Unk_00, TRUE) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(3.0 / DT), LVar0, LVar1, LVar2, 300, 15, -7) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle, 5, MSG_CH3_0023) - EVT_WAIT(15 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_ChargeArmsUp) - EVT_SUB(LVar0, 200) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, LVar2, 25 * DT) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_SET(GF_MIM10_JrTroopaEscaped, TRUE) - EVT_SET(MV_Unk_00, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + Call(WaitForPlayerInputEnabled) + Call(DisablePlayerInput, TRUE) + Set(MV_Unk_00, TRUE) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(SetCamProperties, CAM_DEFAULT, Float(3.0 / DT), LVar0, LVar1, LVar2, 300, 15, -7) + Call(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle, 5, MSG_CH3_0023) + Wait(15 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_ChargeArmsUp) + Sub(LVar0, 200) + Call(NpcMoveTo, NPC_SELF, LVar0, LVar2, 25 * DT) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Set(GF_MIM10_JrTroopaEscaped, TRUE) + Set(MV_Unk_00, FALSE) + Call(DisablePlayerInput, FALSE) + Call(RemoveNpc, NPC_SELF) + Return + End }; EvtScript N(EVS_NpcInit_JrTroopa) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_JrTroopa))) - EVT_IF_EQ(GF_MIM10_JrTroopaEscaped, TRUE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GF_MIM10_Defeated_JrTroopa, FALSE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_JrTroopa))) + IfEq(GF_MIM10_JrTroopaEscaped, TRUE) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + IfEq(GF_MIM10_Defeated_JrTroopa, FALSE) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + Return + End }; NpcData N(NpcData_Bootler) = { diff --git a/src/world/area_mim/mim_11/mim_11_1_music.c b/src/world/area_mim/mim_11/mim_11_1_music.c index 353b694e76e..17ed8cc5948 100644 --- a/src/world/area_mim/mim_11/mim_11_1_music.c +++ b/src/world/area_mim/mim_11/mim_11_1_music.c @@ -1,13 +1,13 @@ #include "mim_11.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_ARRIVED_AT_BOOS_MANSION) - EVT_CALL(SetMusicTrack, 0, SONG_BOOS_MANSION, 1, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8) - EVT_END_SWITCH - EVT_CALL(PlayAmbientSounds, AMBIENT_SPOOKY) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_ARRIVED_AT_BOOS_MANSION) + Call(SetMusicTrack, 0, SONG_BOOS_MANSION, 1, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8) + EndSwitch + Call(PlayAmbientSounds, AMBIENT_SPOOKY) + Return + End }; diff --git a/src/world/area_mim/mim_11/mim_11_2_main.c b/src/world/area_mim/mim_11/mim_11_2_main.c index 35ba5af5e04..779a4761afc 100644 --- a/src/world/area_mim/mim_11/mim_11_2_main.c +++ b/src/world/area_mim/mim_11/mim_11_2_main.c @@ -73,184 +73,184 @@ API_CALLABLE(N(func_80240790_BB7800)) { } EvtScript N(EVS_Scene_ReachedMansion) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerPos, -800, 0, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, -800, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamType, CAM_DEFAULT, 1, TRUE) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(40.0), EVT_FLOAT(-63.59375)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 720) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 89, 84) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 89, 84) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 75, 0, 309) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(N(func_8024066C_BB76DC)) - EVT_WAIT(30) - EVT_CHILD_THREAD - EVT_CALL(N(func_80240790_BB7800)) - EVT_WAIT(90) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, -350) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_WAIT(50) - EVT_CALL(SetPlayerPos, -701, 0, -34) - EVT_CALL(SetNpcPos, NPC_PARTNER, -701, 0, -34) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, TRUE) - EVT_CALL(PlayerMoveTo, -407, 103, 120) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, FALSE) - EVT_WAIT(10) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlayerFaceNpc, NPC_PARTNER, FALSE) - EVT_END_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PARTNER_GOOMBARIO) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 5, MSG_CH3_0024) - EVT_CASE_EQ(PARTNER_KOOPER) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 5, MSG_CH3_0025) - EVT_CASE_EQ(PARTNER_BOMBETTE) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 5, MSG_CH3_0026) - EVT_CASE_EQ(PARTNER_PARAKARRY) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 5, MSG_CH3_0027) - EVT_END_SWITCH - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerPos, -800, 0, 0) + Call(SetNpcPos, NPC_PARTNER, -800, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamType, CAM_DEFAULT, 1, TRUE) + Call(SetCamPitch, CAM_DEFAULT, Float(40.0), Float(-63.59375)) + Call(SetCamDistance, CAM_DEFAULT, 720) + Call(SetCamPosA, CAM_DEFAULT, 89, 84) + Call(SetCamPosB, CAM_DEFAULT, 89, 84) + Call(SetCamPosC, CAM_DEFAULT, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 75, 0, 309) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(N(func_8024066C_BB76DC)) + Wait(30) + ChildThread + Call(N(func_80240790_BB7800)) + Wait(90) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, -350) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndLoop + EndChildThread + Wait(50) + Call(SetPlayerPos, -701, 0, -34) + Call(SetNpcPos, NPC_PARTNER, -701, 0, -34) + Call(DisablePlayerPhysics, FALSE) + Call(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, TRUE) + Call(PlayerMoveTo, -407, 103, 120) + Call(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, FALSE) + Wait(10) + Thread + Wait(15) + Call(PlayerFaceNpc, NPC_PARTNER, FALSE) + EndThread + Call(DisablePartnerAI, 0) + Call(GetCurrentPartnerID, LVar0) + Switch(LVar0) + CaseEq(PARTNER_GOOMBARIO) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 5, MSG_CH3_0024) + CaseEq(PARTNER_KOOPER) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 5, MSG_CH3_0025) + CaseEq(PARTNER_BOMBETTE) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 5, MSG_CH3_0026) + CaseEq(PARTNER_PARAKARRY) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 5, MSG_CH3_0027) + EndSwitch + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Return + End }; // interesting broken, unused snippet for starting next peach sequence EvtScript N(EVS_ExitWarp_osr_03_4) = { - EVT_CALL(FadeOutMusic, 0, 1500) - EVT_CALL(GotoMapSpecial, EVT_PTR("osr_03"), osr_03_ENTRY_4, 0xB) - EVT_WAIT(100) + Call(FadeOutMusic, 0, 1500) + Call(GotoMapSpecial, Ref("osr_03"), osr_03_ENTRY_4, 0xB) + Wait(100) }; EvtScript N(EVS_ExitWalk_mim_07_3) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(UseExitHeading, 60, mim_11_ENTRY_0) - EVT_EXEC(ExitWalk) - EVT_SET(GF_MIM_ChoosingPath, FALSE) - EVT_CALL(GotoMap, EVT_PTR("mim_07"), mim_07_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(UseExitHeading, 60, mim_11_ENTRY_0) + Exec(ExitWalk) + Set(GF_MIM_ChoosingPath, FALSE) + Call(GotoMap, Ref("mim_07"), mim_07_ENTRY_3) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_mim_12_0) = EVT_EXIT_WALK(60, mim_11_ENTRY_1, "mim_12", mim_12_ENTRY_0); EvtScript N(EVS_ExitWalk_obk_01_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, mim_11_ENTRY_2) - EVT_SET(LVar1, COLLIDER_ttd) - EVT_SET(LVar2, MODEL_doa) - EVT_SET(LVar3, MODEL_o166) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("obk_01"), obk_01_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, mim_11_ENTRY_2) + Set(LVar1, COLLIDER_ttd) + Set(LVar2, MODEL_doa) + Set(LVar3, MODEL_o166) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("obk_01"), obk_01_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_mim_07_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_mim_12_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_obk_01_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttd, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_mim_07_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_mim_12_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_obk_01_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttd, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_SET(AF_MIM_01, TRUE) - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(mim_11_ENTRY_0) - EVT_SET(AF_MIM_01, FALSE) - EVT_IF_LT(GB_StoryProgress, STORY_CH3_ARRIVED_AT_BOOS_MANSION) - EVT_SET(GB_StoryProgress, STORY_CH3_ARRIVED_AT_BOOS_MANSION) - EVT_EXEC_WAIT(N(EVS_Scene_ReachedMansion)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_IF - EVT_CASE_EQ(mim_11_ENTRY_1) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(mim_11_ENTRY_2) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar2, MODEL_doa) - EVT_SET(LVar3, MODEL_o166) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(mim_11_ENTRY_3) - EVT_IF_EQ(GF_MIM11_WarpPipe, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerPos, LVar0, NPC_DISPOSE_POS_Y, LVar2) - EVT_WAIT(30) - EVT_CALL(PlaySound, SOUND_GROW) - EVT_SET(GF_MIM11_WarpPipe, TRUE) - EVT_WAIT(30) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_SET(LVarA, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC_WAIT(N(EVS_Pipe_EnterVertical)) - EVT_CASE_EQ(mim_11_ENTRY_4) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(mim_11_ENTRY_5) - EVT_CALL(InterpPlayerYaw, 227, 0) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Set(AF_MIM_01, TRUE) + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(mim_11_ENTRY_0) + Set(AF_MIM_01, FALSE) + IfLt(GB_StoryProgress, STORY_CH3_ARRIVED_AT_BOOS_MANSION) + Set(GB_StoryProgress, STORY_CH3_ARRIVED_AT_BOOS_MANSION) + ExecWait(N(EVS_Scene_ReachedMansion)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Exec(N(EVS_BindExitTriggers)) + Else + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndIf + CaseEq(mim_11_ENTRY_1) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseEq(mim_11_ENTRY_2) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar2, MODEL_doa) + Set(LVar3, MODEL_o166) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(mim_11_ENTRY_3) + IfEq(GF_MIM11_WarpPipe, FALSE) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(SetPlayerPos, LVar0, NPC_DISPOSE_POS_Y, LVar2) + Wait(30) + Call(PlaySound, SOUND_GROW) + Set(GF_MIM11_WarpPipe, TRUE) + Wait(30) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + EndIf + Set(LVarA, Ref(N(EVS_BindExitTriggers))) + ExecWait(N(EVS_Pipe_EnterVertical)) + CaseEq(mim_11_ENTRY_4) + Exec(N(EVS_BindExitTriggers)) + CaseEq(mim_11_ENTRY_5) + Call(InterpPlayerYaw, 227, 0) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOOS_MANSION) - EVT_SET(GF_MAP_BoosMansion, TRUE) - EVT_CALL(SetSpriteShading, SHADING_MIM_11) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(EnableGroup, MODEL_g62, FALSE) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(D_802430E0_BBA150)) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_CALL(N(func_802405EC_BB765C)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOOS_MANSION) + Set(GF_MAP_BoosMansion, TRUE) + Call(SetSpriteShading, SHADING_MIM_11) + SetUP_CAMERA_NO_LEAD() + Call(EnableGroup, MODEL_g62, FALSE) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(D_802430E0_BBA150)) + Exec(N(EVS_SetupFoliage)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Call(N(func_802405EC_BB765C)) + Return + End }; diff --git a/src/world/area_mim/mim_11/mim_11_3_gate.c b/src/world/area_mim/mim_11/mim_11_3_gate.c index 969167c4e24..5045ecac54e 100644 --- a/src/world/area_mim/mim_11/mim_11_3_gate.c +++ b/src/world/area_mim/mim_11/mim_11_3_gate.c @@ -1,186 +1,186 @@ #include "mim_11.h" EvtScript N(D_80242560_BB95D0) = { - EVT_WAIT(30 * DT) - EVT_CALL(PlaySoundAtCollider, COLLIDER_mon, SOUND_METAL_GATE_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 80, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_h_mon1, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_h_mon2, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mon, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(2.0 / DT)) - EVT_CALL(PlayerMoveTo, -101, 17, 0) - EVT_WAIT(30 * DT) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_mon, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(MakeLerp, 80, 0, 8, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_h_mon1, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_h_mon2, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_mon, SOUND_METAL_GATE_CLOSE, SOUND_SPACE_DEFAULT) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 15, EVT_FLOAT(1.5)) - EVT_WAIT(20 * DT) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_CALL(SetCamType, CAM_DEFAULT, 0, TRUE) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(19.5), EVT_FLOAT(-14.9)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -133, 52) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 23, -109) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 23, 0, -109) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetMusicTrack, 0, SONG_BOOS_MANSION, 0, 8) - EVT_CALL(PlaySoundAtNpc, NPC_Bootler, SOUND_BOO_VANISH_A, SOUND_SPACE_DEFAULT) - EVT_SETF(LVar0, EVT_FLOAT(0.0)) - EVT_LOOP(90 * DT) - EVT_ADDF(LVar0, EVT_FLOAT(2.6667 / DT)) - EVT_CALL(SetNpcImgFXParams, NPC_Bootler, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Talk, ANIM_Bootler_Idle, 0, MSG_CH3_0028) - EVT_CALL(SetMusicTrack, 0, SONG_BOOS_MANSION, 1, 8) - EVT_WAIT(10 * DT) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(0.0), EVT_FLOAT(-25.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 550) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH3_0029, 160, 40) - EVT_WAIT(30 * DT) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(19.5), EVT_FLOAT(-14.9)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Talk, ANIM_Bootler_Idle, 0, MSG_CH3_002A) - EVT_CALL(PlaySoundAtNpc, NPC_Bootler, SOUND_BOO_APPEAR_A, SOUND_SPACE_DEFAULT) - EVT_SETF(LVar0, EVT_FLOAT(240.0)) - EVT_LOOP(90 * DT) - EVT_SUBF(LVar0, EVT_FLOAT(2.6667 / DT)) - EVT_CALL(SetNpcImgFXParams, NPC_Bootler, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(RemoveNpc, NPC_Bootler) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_RETURN - EVT_END + Wait(30 * DT) + Call(PlaySoundAtCollider, COLLIDER_mon, SOUND_METAL_GATE_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 80, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_h_mon1, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_h_mon2, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mon, COLLIDER_FLAGS_UPPER_MASK) + Call(SetPlayerSpeed, Float(2.0 / DT)) + Call(PlayerMoveTo, -101, 17, 0) + Wait(30 * DT) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_mon, COLLIDER_FLAGS_UPPER_MASK) + Call(MakeLerp, 80, 0, 8, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_h_mon1, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_h_mon2, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_mon, SOUND_METAL_GATE_CLOSE, SOUND_SPACE_DEFAULT) + Call(ShakeCam, CAM_DEFAULT, 0, 15, Float(1.5)) + Wait(20 * DT) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Call(SetCamType, CAM_DEFAULT, 0, TRUE) + Call(SetCamPitch, CAM_DEFAULT, Float(19.5), Float(-14.9)) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(SetCamPosA, CAM_DEFAULT, -133, 52) + Call(SetCamPosB, CAM_DEFAULT, 23, -109) + Call(SetCamPosC, CAM_DEFAULT, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 23, 0, -109) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetMusicTrack, 0, SONG_BOOS_MANSION, 0, 8) + Call(PlaySoundAtNpc, NPC_Bootler, SOUND_BOO_VANISH_A, SOUND_SPACE_DEFAULT) + SetF(LVar0, Float(0.0)) + Loop(90 * DT) + AddF(LVar0, Float(2.6667 / DT)) + Call(SetNpcImgFXParams, NPC_Bootler, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + EndLoop + Call(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Talk, ANIM_Bootler_Idle, 0, MSG_CH3_0028) + Call(SetMusicTrack, 0, SONG_BOOS_MANSION, 1, 8) + Wait(10 * DT) + Call(SetCamPitch, CAM_DEFAULT, Float(0.0), Float(-25.0)) + Call(SetCamDistance, CAM_DEFAULT, 550) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(ShowMessageAtScreenPos, MSG_CH3_0029, 160, 40) + Wait(30 * DT) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(19.5), Float(-14.9)) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Talk, ANIM_Bootler_Idle, 0, MSG_CH3_002A) + Call(PlaySoundAtNpc, NPC_Bootler, SOUND_BOO_APPEAR_A, SOUND_SPACE_DEFAULT) + SetF(LVar0, Float(240.0)) + Loop(90 * DT) + SubF(LVar0, Float(2.6667 / DT)) + Call(SetNpcImgFXParams, NPC_Bootler, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + EndLoop + Call(RemoveNpc, NPC_Bootler) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Return + End }; EvtScript N(D_80242B90_BB9C00) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_mon, SOUND_METAL_GATE_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mon, COLLIDER_FLAGS_UPPER_MASK) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 80, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_h_mon1, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_h_mon2, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(20) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 80) - EVT_SUB(LVar2, 80) - EVT_CALL(PlayerMoveTo, LVar0, LVar2, 30) - EVT_WAIT(10) - EVT_CALL(MakeLerp, 80, 0, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_h_mon1, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_h_mon2, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_mon, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlaySoundAtCollider, COLLIDER_mon, SOUND_METAL_GATE_CLOSE, SOUND_SPACE_DEFAULT) - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_mon, SOUND_METAL_GATE_OPEN, SOUND_SPACE_DEFAULT) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mon, COLLIDER_FLAGS_UPPER_MASK) + Thread + Call(MakeLerp, 0, 80, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_h_mon1, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_h_mon2, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Wait(20) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 80) + Sub(LVar2, 80) + Call(PlayerMoveTo, LVar0, LVar2, 30) + Wait(10) + Call(MakeLerp, 80, 0, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_h_mon1, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_h_mon2, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_mon, COLLIDER_FLAGS_UPPER_MASK) + Call(PlaySoundAtCollider, COLLIDER_mon, SOUND_METAL_GATE_CLOSE, SOUND_SPACE_DEFAULT) + Return + End }; EvtScript N(D_80242DC8_BB9E38) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_mon, SOUND_METAL_GATE_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mon, COLLIDER_FLAGS_UPPER_MASK) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 80, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_h_mon1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_h_mon2, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(20) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -80) - EVT_SUB(LVar2, -80) - EVT_CALL(PlayerMoveTo, LVar0, LVar2, 20) - EVT_CALL(MakeLerp, 80, 0, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_h_mon1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_h_mon2, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_mon, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlaySoundAtCollider, COLLIDER_mon, SOUND_METAL_GATE_CLOSE, SOUND_SPACE_DEFAULT) - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_mon, SOUND_METAL_GATE_OPEN, SOUND_SPACE_DEFAULT) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mon, COLLIDER_FLAGS_UPPER_MASK) + Thread + Call(MakeLerp, 0, 80, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_h_mon1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_h_mon2, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Wait(20) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, -80) + Sub(LVar2, -80) + Call(PlayerMoveTo, LVar0, LVar2, 20) + Call(MakeLerp, 80, 0, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_h_mon1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_h_mon2, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_mon, COLLIDER_FLAGS_UPPER_MASK) + Call(PlaySoundAtCollider, COLLIDER_mon, SOUND_METAL_GATE_CLOSE, SOUND_SPACE_DEFAULT) + Return + End }; EvtScript N(D_80242FF4_BBA064) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterruptUsePartner) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_OPENED_BOOS_MANSION_GATE) - EVT_SET(GB_StoryProgress, STORY_CH3_OPENED_BOOS_MANSION_GATE) - EVT_SET(AF_MIM_01, TRUE) - EVT_EXEC_WAIT(N(D_80242560_BB95D0)) - EVT_CASE_GE(STORY_CH3_OPENED_BOOS_MANSION_GATE) - EVT_IF_EQ(AF_MIM_01, FALSE) - EVT_EXEC_WAIT(N(D_80242B90_BB9C00)) - EVT_SET(AF_MIM_01, TRUE) - EVT_ELSE - EVT_EXEC_WAIT(N(D_80242DC8_BB9E38)) - EVT_SET(AF_MIM_01, FALSE) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(InterruptUsePartner) + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_OPENED_BOOS_MANSION_GATE) + Set(GB_StoryProgress, STORY_CH3_OPENED_BOOS_MANSION_GATE) + Set(AF_MIM_01, TRUE) + ExecWait(N(D_80242560_BB95D0)) + CaseGe(STORY_CH3_OPENED_BOOS_MANSION_GATE) + IfEq(AF_MIM_01, FALSE) + ExecWait(N(D_80242B90_BB9C00)) + Set(AF_MIM_01, TRUE) + Else + ExecWait(N(D_80242DC8_BB9E38)) + Set(AF_MIM_01, FALSE) + EndIf + EndSwitch + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(D_802430E0_BBA150) = { - EVT_BIND_TRIGGER(EVT_PTR(N(D_80242FF4_BBA064)), TRIGGER_WALL_PRESS_A, COLLIDER_mon, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(D_80242FF4_BBA064)), TRIGGER_WALL_PRESS_A, COLLIDER_mon, 1, 0) + Return + End }; diff --git a/src/world/area_mim/mim_11/mim_11_4_entity.c b/src/world/area_mim/mim_11/mim_11_4_entity.c index 111b4375b75..8c59312840b 100644 --- a/src/world/area_mim/mim_11/mim_11_4_entity.c +++ b/src/world/area_mim/mim_11/mim_11_4_entity.c @@ -2,26 +2,26 @@ #include "entity.h" EvtScript N(EVS_UseBluePipe) = { - EVT_CALL(GotoMap, EVT_PTR("tik_09"), tik_09_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("tik_09"), tik_09_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_MIM11_WarpPipe, FALSE) - EVT_IF_EQ(GF_TIK09_WarpPipe, TRUE) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, mim_11_ENTRY_3) - EVT_SET(GF_KMR02_WarpPipe, TRUE) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueWarpPipe), -275, 0, -225, 270, mim_11_ENTRY_3, EVT_PTR(N(EVS_UseBluePipe)), EVT_INDEX_OF_GAME_FLAG(GF_MIM11_WarpPipe), MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), 0, 60, -300, 45, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 220, 60, -80, 45, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -282, 60, 522, 0, ITEM_VOLT_SHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_MIM11_ItemBlock_VoltShroom) - EVT_RETURN - EVT_END + IfEq(GF_MIM11_WarpPipe, FALSE) + IfEq(GF_TIK09_WarpPipe, TRUE) + Call(GetEntryID, LVar0) + IfNe(LVar0, mim_11_ENTRY_3) + Set(GF_KMR02_WarpPipe, TRUE) + EndIf + EndIf + EndIf + Call(MakeEntity, Ref(Entity_BlueWarpPipe), -275, 0, -225, 270, mim_11_ENTRY_3, Ref(N(EVS_UseBluePipe)), EVT_INDEX_OF_GAME_FLAG(GF_MIM11_WarpPipe), MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HeartBlock), 0, 60, -300, 45, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_SavePoint), 220, 60, -80, 45, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_YellowBlock), -282, 60, 522, 0, ITEM_VOLT_SHROOM, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_MIM11_ItemBlock_VoltShroom) + Return + End }; diff --git a/src/world/area_mim/mim_11/mim_11_5_npc.c b/src/world/area_mim/mim_11/mim_11_5_npc.c index c33571b2e5c..3b2414542b7 100644 --- a/src/world/area_mim/mim_11/mim_11_5_npc.c +++ b/src/world/area_mim/mim_11/mim_11_5_npc.c @@ -46,32 +46,32 @@ API_CALLABLE(N(AnimateStarSpiritBobbing)) { } EvtScript N(EVS_NpcAux_Skolar) = { - EVT_CALL(N(AnimateStarSpiritBobbing)) - EVT_RETURN - EVT_END + Call(N(AnimateStarSpiritBobbing)) + Return + End }; EvtScript N(EVS_NpcInit_Skolar) = { - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_Skolar))) - EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, -100) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_IF_NE(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_Skolar))) + Call(SetNpcPos, NPC_SELF, 0, -1000, -100) + Call(EnableNpcShadow, NPC_SELF, FALSE) + IfNe(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Bootler) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_OPENED_BOOS_MANSION_GATE) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_ALPHA, 0, 0, 0, 0) - EVT_CASE_DEFAULT - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_OPENED_BOOS_MANSION_GATE) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_ALPHA, 0, 0, 0, 0) + CaseDefault + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; NpcData N(NpcData_Bootler)[] = { diff --git a/src/world/area_mim/mim_11/mim_11_6_foliage.c b/src/world/area_mim/mim_11/mim_11_6_foliage.c index 1d26e0e01a6..e1736021b56 100644 --- a/src/world/area_mim/mim_11/mim_11_6_foliage.c +++ b/src/world/area_mim/mim_11/mim_11_6_foliage.c @@ -40,14 +40,14 @@ SearchBushConfig N(SearchBush_Bush4) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o207, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o208, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o209, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush4))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o210, 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(SearchBush_Bush1))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o207, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush2))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o208, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush3))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o209, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush4))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o210, 1, 0) + Return + End }; diff --git a/src/world/area_mim/mim_12/mim_12_1_music.c b/src/world/area_mim/mim_12/mim_12_1_music.c index 3723509221e..9e98f208884 100644 --- a/src/world/area_mim/mim_12/mim_12_1_music.c +++ b/src/world/area_mim/mim_12/mim_12_1_music.c @@ -1,38 +1,38 @@ #include "mim_12.h" EvtScript N(EVS_StartForestMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_ARRIVED_AT_BOOS_MANSION) - EVT_CALL(SetMusicTrack, 0, SONG_BOOS_MANSION, 1, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8) - EVT_END_SWITCH - EVT_CALL(ClearAmbientSounds, 250) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_ARRIVED_AT_BOOS_MANSION) + Call(SetMusicTrack, 0, SONG_BOOS_MANSION, 1, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8) + EndSwitch + Call(ClearAmbientSounds, 250) + Return + End }; EvtScript N(EVS_StartGustyMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP) - EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) - EVT_END_SWITCH - EVT_CALL(PlayAmbientSounds, AMBIENT_WIND) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_TUBBA_WOKE_UP) + Call(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8) + EndSwitch + Call(PlayAmbientSounds, AMBIENT_WIND) + Return + End }; EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, mim_12_ENTRY_0) - EVT_EXEC_WAIT(N(EVS_StartForestMusic)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_StartGustyMusic)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, mim_12_ENTRY_0) + ExecWait(N(EVS_StartForestMusic)) + Else + ExecWait(N(EVS_StartGustyMusic)) + EndIf + Return + End }; diff --git a/src/world/area_mim/mim_12/mim_12_2_entity.c b/src/world/area_mim/mim_12/mim_12_2_entity.c index 87387444413..f823725e1f9 100644 --- a/src/world/area_mim/mim_12/mim_12_2_entity.c +++ b/src/world/area_mim/mim_12/mim_12_2_entity.c @@ -2,8 +2,8 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 100, 0, -40, 0, MODEL_o8, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_MIM12_HiddenPanel) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HiddenPanel), 100, 0, -40, 0, MODEL_o8, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_MIM12_HiddenPanel) + Return + End }; diff --git a/src/world/area_mim/mim_12/mim_12_3_main.c b/src/world/area_mim/mim_12/mim_12_3_main.c index c9da5326b4e..fa58a73614f 100644 --- a/src/world/area_mim/mim_12/mim_12_3_main.c +++ b/src/world/area_mim/mim_12/mim_12_3_main.c @@ -4,41 +4,41 @@ EvtScript N(EVS_ExitWalk_mim_11_1) = EVT_EXIT_WALK(60, mim_12_ENTRY_0, "mim_11", EvtScript N(EVS_ExitWalk_arn_07_2) = EVT_EXIT_WALK(60, mim_12_ENTRY_1, "arn_07", arn_07_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_mim_11_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_arn_07_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_mim_11_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_arn_07_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CALL(SetNpcPos, NPC_GateBoo_01, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_GateBoo_02, NPC_DISPOSE_LOCATION) - EVT_SETF(LVar0, EVT_FLOAT(240.0)) - EVT_LOOP(20) - EVT_SUBF(LVar0, EVT_FLOAT(12.0)) - EVT_CALL(SetNpcImgFXParams, NPC_GateBoo_01, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_GateBoo_02, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(10) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Call(SetNpcPos, NPC_GateBoo_01, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_GateBoo_02, NPC_DISPOSE_LOCATION) + SetF(LVar0, Float(240.0)) + Loop(20) + SubF(LVar0, Float(12.0)) + Call(SetNpcImgFXParams, NPC_GateBoo_01, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_GateBoo_02, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + EndLoop + Wait(10) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FOREVER_FOREST) - EVT_CALL(SetSpriteShading, SHADING_MIM_12) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 1024) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_SetupForestGate)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_FOREVER_FOREST) + Call(SetSpriteShading, SHADING_MIM_12) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 1024) + Call(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_SetupForestGate)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_mim/mim_12/mim_12_4_npc.c b/src/world/area_mim/mim_12/mim_12_4_npc.c index f8f91a59ab1..b27d245b157 100644 --- a/src/world/area_mim/mim_12/mim_12_4_npc.c +++ b/src/world/area_mim/mim_12/mim_12_4_npc.c @@ -3,13 +3,13 @@ #include "world/common/npc/Boo.inc.c" EvtScript N(EVS_NpcInit_GateBoo_01) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInit_GateBoo_02) = { - EVT_RETURN - EVT_END + Return + End }; NpcData N(NpcData_GateBoos)[] = { diff --git a/src/world/area_mim/mim_12/mim_12_5_gate.c b/src/world/area_mim/mim_12/mim_12_5_gate.c index 4f59f0cdcde..cf0cf9459b6 100644 --- a/src/world/area_mim/mim_12/mim_12_5_gate.c +++ b/src/world/area_mim/mim_12/mim_12_5_gate.c @@ -131,290 +131,290 @@ API_CALLABLE(N(MoveNpcAlongArc)) { } EvtScript N(EVS_FadeToForestShading) = { - EVT_CALL(N(InitializeGustyFogProperties)) - EVT_THREAD - EVT_CALL(N(InterpFogDistance), 990, 980, 1000, -1) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(InterpBackgroundDarkness), 0, 232, 20) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(InterpSpriteShadingColor), 160, 160, 255) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(N(InitializeGustyFogProperties)) + Thread + Call(N(InterpFogDistance), 990, 980, 1000, -1) + EndThread + Thread + Call(N(InterpBackgroundDarkness), 0, 232, 20) + EndThread + Thread + Call(N(InterpSpriteShadingColor), 160, 160, 255) + EndThread + Return + End }; EvtScript N(EVS_FadeToGustyShading) = { - EVT_CALL(N(InitializeGustyFogProperties)) - EVT_THREAD - EVT_CALL(N(InterpFogDistance), 980, 990, 1000, 1) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(InterpBackgroundDarkness), 232, 0, -20) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(InterpSpriteShadingColor), 255, 255, 255) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(N(InitializeGustyFogProperties)) + Thread + Call(N(InterpFogDistance), 980, 990, 1000, 1) + EndThread + Thread + Call(N(InterpBackgroundDarkness), 232, 0, -20) + EndThread + Thread + Call(N(InterpSpriteShadingColor), 255, 255, 255) + EndThread + Return + End }; EvtScript N(EVS_OpenGate) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_o67, SOUND_METAL_GATE_OPEN, SOUND_SPACE_DEFAULT) - EVT_SET(LVar3, 0) - EVT_SUB(LVar3, LVar2) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o67, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(MakeLerp, 0, 80, 30, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o68, LVar0, 0, LVar2, 0) - EVT_CALL(RotateModel, MODEL_o67, LVar0, 0, LVar3, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(10) - EVT_END_IF - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_o67, SOUND_METAL_GATE_OPEN, SOUND_SPACE_DEFAULT) + Set(LVar3, 0) + Sub(LVar3, LVar2) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o67, COLLIDER_FLAGS_UPPER_MASK) + Call(MakeLerp, 0, 80, 30, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(RotateModel, MODEL_o68, LVar0, 0, LVar2, 0) + Call(RotateModel, MODEL_o67, LVar0, 0, LVar3, 0) + Wait(1) + IfNe(LVar1, 0) + Goto(10) + EndIf + Return + End }; EvtScript N(EVS_CloseGate) = { - EVT_SET(LVar3, 0) - EVT_SUB(LVar3, LVar2) - EVT_CALL(MakeLerp, 80, 0, 30, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o68, LVar0, 0, LVar2, 0) - EVT_CALL(RotateModel, MODEL_o67, LVar0, 0, LVar3, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, COLLIDER_o67, SOUND_METAL_GATE_CLOSE, SOUND_SPACE_DEFAULT) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o67, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Set(LVar3, 0) + Sub(LVar3, LVar2) + Call(MakeLerp, 80, 0, 30, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(RotateModel, MODEL_o68, LVar0, 0, LVar2, 0) + Call(RotateModel, MODEL_o67, LVar0, 0, LVar3, 0) + Wait(1) + IfNe(LVar1, 0) + Goto(10) + EndIf + Call(PlaySoundAtCollider, COLLIDER_o67, SOUND_METAL_GATE_CLOSE, SOUND_SPACE_DEFAULT) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o67, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_EnterForest) = { - EVT_EXEC(N(EVS_FadeToForestShading)) - EVT_SET(LVar2, -1) - EVT_EXEC(N(EVS_OpenGate)) - EVT_WAIT(20) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, -185, 0, 0) - EVT_SET(LVar2, -1) - EVT_EXEC(N(EVS_CloseGate)) - EVT_EXEC_WAIT(N(EVS_StartForestMusic)) - EVT_RETURN - EVT_END + Exec(N(EVS_FadeToForestShading)) + Set(LVar2, -1) + Exec(N(EVS_OpenGate)) + Wait(20) + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, -185, 0, 0) + Set(LVar2, -1) + Exec(N(EVS_CloseGate)) + ExecWait(N(EVS_StartForestMusic)) + Return + End }; EvtScript N(EVS_LeaveForest) = { - EVT_EXEC(N(EVS_FadeToGustyShading)) - EVT_SET(LVar2, 1) - EVT_EXEC(N(EVS_OpenGate)) - EVT_WAIT(20) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, -20, 0, 0) - EVT_SET(LVar2, 1) - EVT_EXEC(N(EVS_CloseGate)) - EVT_EXEC_WAIT(N(EVS_StartGustyMusic)) - EVT_RETURN - EVT_END + Exec(N(EVS_FadeToGustyShading)) + Set(LVar2, 1) + Exec(N(EVS_OpenGate)) + Wait(20) + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, -20, 0, 0) + Set(LVar2, 1) + Exec(N(EVS_CloseGate)) + ExecWait(N(EVS_StartGustyMusic)) + Return + End }; EvtScript N(EVS_CantOpenGateMessage) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D9, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_00D9, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_UseGate) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterruptUsePartner) - EVT_IF_EQ(AF_MIM12_BackgroundLitUp, FALSE) - EVT_EXEC_WAIT(N(EVS_LeaveForest)) - EVT_SET(AF_MIM12_BackgroundLitUp, TRUE) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_EnterForest)) - EVT_SET(AF_MIM12_BackgroundLitUp, FALSE) - EVT_END_IF - EVT_WAIT(20) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(InterruptUsePartner) + IfEq(AF_MIM12_BackgroundLitUp, FALSE) + ExecWait(N(EVS_LeaveForest)) + Set(AF_MIM12_BackgroundLitUp, TRUE) + Else + ExecWait(N(EVS_EnterForest)) + Set(AF_MIM12_BackgroundLitUp, FALSE) + EndIf + Wait(20) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_FlyDownToGate) = { - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_GateBoo_02, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump1, NPC_GateBoo_02, -66, 13, -15, 20) - EVT_END_THREAD - EVT_CALL(SetNpcJumpscale, NPC_GateBoo_01, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump1, NPC_GateBoo_01, -89, 14, 28, 20) - EVT_WAIT(15) - EVT_RETURN - EVT_END + Thread + Call(SetNpcJumpscale, NPC_GateBoo_02, Float(0.0)) + Call(NpcJump1, NPC_GateBoo_02, -66, 13, -15, 20) + EndThread + Call(SetNpcJumpscale, NPC_GateBoo_01, Float(0.0)) + Call(NpcJump1, NPC_GateBoo_01, -89, 14, 28, 20) + Wait(15) + Return + End }; EvtScript N(EVS_HaveBoosOpenGate) = { - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_GateBoo_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_SET(LVar0, NPC_GateBoo_02) - EVT_SET(LVar1, -66) - EVT_SET(LVar2, -66) - EVT_SET(LVar3, 80) - EVT_SET(LVar4, 0) - EVT_SET(LVar5, 30) - EVT_CALL(N(MoveNpcAlongArc)) - EVT_END_THREAD - EVT_CALL(SetNpcFlagBits, NPC_GateBoo_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_SET(LVar0, NPC_GateBoo_01) - EVT_SET(LVar1, -135) - EVT_SET(LVar2, 59) - EVT_SET(LVar3, 40) - EVT_SET(LVar4, 120) - EVT_SET(LVar5, 30) - EVT_CALL(N(MoveNpcAlongArc)) - EVT_RETURN - EVT_END + Thread + Call(SetNpcFlagBits, NPC_GateBoo_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Set(LVar0, NPC_GateBoo_02) + Set(LVar1, -66) + Set(LVar2, -66) + Set(LVar3, 80) + Set(LVar4, 0) + Set(LVar5, 30) + Call(N(MoveNpcAlongArc)) + EndThread + Call(SetNpcFlagBits, NPC_GateBoo_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Set(LVar0, NPC_GateBoo_01) + Set(LVar1, -135) + Set(LVar2, 59) + Set(LVar3, 40) + Set(LVar4, 120) + Set(LVar5, 30) + Call(N(MoveNpcAlongArc)) + Return + End }; EvtScript N(EVS_HaveBoosCloseGate) = { - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_GateBoo_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_SET(LVar0, NPC_GateBoo_02) - EVT_SET(LVar1, -66) - EVT_SET(LVar2, -66) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 80) - EVT_SET(LVar5, 30) - EVT_CALL(N(MoveNpcAlongArc)) - EVT_END_THREAD - EVT_CALL(SetNpcFlagBits, NPC_GateBoo_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_SET(LVar0, NPC_GateBoo_01) - EVT_SET(LVar1, -135) - EVT_SET(LVar2, 59) - EVT_SET(LVar3, 120) - EVT_SET(LVar4, 40) - EVT_SET(LVar5, 30) - EVT_CALL(N(MoveNpcAlongArc)) - EVT_RETURN - EVT_END + Thread + Call(SetNpcFlagBits, NPC_GateBoo_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Set(LVar0, NPC_GateBoo_02) + Set(LVar1, -66) + Set(LVar2, -66) + Set(LVar3, 0) + Set(LVar4, 80) + Set(LVar5, 30) + Call(N(MoveNpcAlongArc)) + EndThread + Call(SetNpcFlagBits, NPC_GateBoo_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Set(LVar0, NPC_GateBoo_01) + Set(LVar1, -135) + Set(LVar2, 59) + Set(LVar3, 120) + Set(LVar4, 40) + Set(LVar5, 30) + Call(N(MoveNpcAlongArc)) + Return + End }; EvtScript N(EVS_Scene_UnlockGate) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(20 * DT) - EVT_CALL(GetCurrentPartnerID, LVar6) - EVT_CALL(BringPartnerOut, PARTNER_BOW) - EVT_IF_NE(LVar6, PARTNER_BOW) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_WorldBow_Walk) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_LOOP(10) - EVT_ADD(LVar1, 2) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_IF - EVT_WAIT(10 * DT) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, SPEECH_FACE_SPEAKER_ONLY, MSG_CH3_006C) - EVT_CALL(EnablePartnerAI) - EVT_CALL(SetNpcPos, NPC_GateBoo_01, -103, 65, 64) - EVT_CALL(SetNpcPos, NPC_GateBoo_02, -45, 65, -66) - EVT_CALL(PlaySoundAtNpc, NPC_GateBoo_01, SOUND_BOO_VANISH_A, SOUND_SPACE_DEFAULT) - EVT_SETF(LVar0, EVT_FLOAT(0.0)) - EVT_LOOP(20 * DT) - EVT_ADDF(LVar0, EVT_FLOAT(240.0 / (s32)(20 * DT))) - EVT_CALL(SetNpcImgFXParams, NPC_GateBoo_01, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_GateBoo_02, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(10 * DT) - EVT_EXEC_WAIT(N(EVS_FlyDownToGate)) - EVT_EXEC(N(EVS_FadeToGustyShading)) - EVT_SET(LVar2, 1) - EVT_EXEC(N(EVS_OpenGate)) - EVT_EXEC_WAIT(N(EVS_HaveBoosOpenGate)) - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_CALL(PlayerMoveTo, 25, 0, 60 * DT) - EVT_END_THREAD - EVT_WAIT(3 * DT) - EVT_CALL(GetCurrentPartnerID, LVar6) - EVT_IF_NE(LVar6, PARTNER_BOW) - EVT_CALL(NpcMoveTo, NPC_PARTNER, -38, 23, 60 * DT) - EVT_ELSE - EVT_WAIT(60 * DT) - EVT_END_IF - EVT_SET(LVar2, 1) - EVT_EXEC(N(EVS_CloseGate)) - EVT_EXEC_WAIT(N(EVS_StartGustyMusic)) - EVT_EXEC_WAIT(N(EVS_HaveBoosCloseGate)) - EVT_WAIT(10 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_GateBoo_01, SOUND_BOO_APPEAR_A, SOUND_SPACE_DEFAULT) - EVT_SETF(LVar0, EVT_FLOAT(240.0)) - EVT_LOOP(20 * DT) - EVT_SUBF(LVar0, EVT_FLOAT(240.0 / (s32)(20 * DT))) - EVT_CALL(SetNpcImgFXParams, NPC_GateBoo_01, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_GateBoo_02, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_GateBoo_01, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_GateBoo_02, NPC_DISPOSE_LOCATION) - EVT_WAIT(10 * DT) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_006D) - EVT_CALL(EnablePartnerAI) - EVT_WAIT(5 * DT) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Jump) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.5)) - EVT_CALL(PlayerJump, LVar0, LVar1, LVar2, 14 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Land) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_WAIT(10 * DT) - EVT_SET(GB_StoryProgress, STORY_CH3_UNLOCKED_GUSTY_GULCH) - EVT_CALL(PutPartnerAway) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_SET(AF_MIM12_BackgroundLitUp, TRUE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseGate)), TRIGGER_WALL_PRESS_A, COLLIDER_o67, 1, 0) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Wait(20 * DT) + Call(GetCurrentPartnerID, LVar6) + Call(BringPartnerOut, PARTNER_BOW) + IfNe(LVar6, PARTNER_BOW) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_WorldBow_Walk) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Loop(10) + Add(LVar1, 2) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndIf + Wait(10 * DT) + Call(DisablePartnerAI, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, SPEECH_FACE_SPEAKER_ONLY, MSG_CH3_006C) + Call(EnablePartnerAI) + Call(SetNpcPos, NPC_GateBoo_01, -103, 65, 64) + Call(SetNpcPos, NPC_GateBoo_02, -45, 65, -66) + Call(PlaySoundAtNpc, NPC_GateBoo_01, SOUND_BOO_VANISH_A, SOUND_SPACE_DEFAULT) + SetF(LVar0, Float(0.0)) + Loop(20 * DT) + AddF(LVar0, Float(240.0 / (s32)(20 * DT))) + Call(SetNpcImgFXParams, NPC_GateBoo_01, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_GateBoo_02, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + EndLoop + Wait(10 * DT) + ExecWait(N(EVS_FlyDownToGate)) + Exec(N(EVS_FadeToGustyShading)) + Set(LVar2, 1) + Exec(N(EVS_OpenGate)) + ExecWait(N(EVS_HaveBoosOpenGate)) + Wait(10 * DT) + Thread + Call(PlayerMoveTo, 25, 0, 60 * DT) + EndThread + Wait(3 * DT) + Call(GetCurrentPartnerID, LVar6) + IfNe(LVar6, PARTNER_BOW) + Call(NpcMoveTo, NPC_PARTNER, -38, 23, 60 * DT) + Else + Wait(60 * DT) + EndIf + Set(LVar2, 1) + Exec(N(EVS_CloseGate)) + ExecWait(N(EVS_StartGustyMusic)) + ExecWait(N(EVS_HaveBoosCloseGate)) + Wait(10 * DT) + Call(PlaySoundAtNpc, NPC_GateBoo_01, SOUND_BOO_APPEAR_A, SOUND_SPACE_DEFAULT) + SetF(LVar0, Float(240.0)) + Loop(20 * DT) + SubF(LVar0, Float(240.0 / (s32)(20 * DT))) + Call(SetNpcImgFXParams, NPC_GateBoo_01, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_GateBoo_02, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + EndLoop + Call(SetNpcPos, NPC_GateBoo_01, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_GateBoo_02, NPC_DISPOSE_LOCATION) + Wait(10 * DT) + Call(DisablePartnerAI, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_006D) + Call(EnablePartnerAI) + Wait(5 * DT) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerAnimation, ANIM_Mario1_Jump) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerJumpscale, Float(1.5)) + Call(PlayerJump, LVar0, LVar1, LVar2, 14 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Land) + Call(DisablePlayerPhysics, FALSE) + Wait(10 * DT) + Set(GB_StoryProgress, STORY_CH3_UNLOCKED_GUSTY_GULCH) + Call(PutPartnerAway) + Call(DisablePlayerInput, FALSE) + Set(AF_MIM12_BackgroundLitUp, TRUE) + BindTrigger(Ref(N(EVS_UseGate)), TRIGGER_WALL_PRESS_A, COLLIDER_o67, 1, 0) + Return + End }; EvtScript N(EVS_SetupForestGate) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_BOW_JOINED_PARTY) - EVT_CALL(N(InitializeForestFogProperties)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_CantOpenGateMessage)), TRIGGER_WALL_PRESS_A, COLLIDER_o67, 1, 0) - EVT_CASE_LT(STORY_CH3_UNLOCKED_GUSTY_GULCH) - EVT_CALL(N(InitializeForestFogProperties)) - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GE(LVar0, -200) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_EXEC_WAIT(N(EVS_Scene_UnlockGate)) - EVT_CASE_GE(STORY_CH3_UNLOCKED_GUSTY_GULCH) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, mim_12_ENTRY_0) - EVT_SET(AF_MIM12_BackgroundLitUp, FALSE) - EVT_CALL(N(InitializeForestFogProperties)) - EVT_ELSE - EVT_SET(AF_MIM12_BackgroundLitUp, TRUE) - EVT_CALL(N(InitializeGustyFogProperties)) - EVT_CALL(EnableSpriteShading, FALSE) - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseGate)), TRIGGER_WALL_PRESS_A, COLLIDER_o67, 1, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_BOW_JOINED_PARTY) + Call(N(InitializeForestFogProperties)) + BindTrigger(Ref(N(EVS_CantOpenGateMessage)), TRIGGER_WALL_PRESS_A, COLLIDER_o67, 1, 0) + CaseLt(STORY_CH3_UNLOCKED_GUSTY_GULCH) + Call(N(InitializeForestFogProperties)) + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGe(LVar0, -200) + BreakLoop + EndIf + Wait(1) + EndLoop + ExecWait(N(EVS_Scene_UnlockGate)) + CaseGe(STORY_CH3_UNLOCKED_GUSTY_GULCH) + Call(GetEntryID, LVar0) + IfEq(LVar0, mim_12_ENTRY_0) + Set(AF_MIM12_BackgroundLitUp, FALSE) + Call(N(InitializeForestFogProperties)) + Else + Set(AF_MIM12_BackgroundLitUp, TRUE) + Call(N(InitializeGustyFogProperties)) + Call(EnableSpriteShading, FALSE) + EndIf + BindTrigger(Ref(N(EVS_UseGate)), TRIGGER_WALL_PRESS_A, COLLIDER_o67, 1, 0) + EndSwitch + Return + End }; diff --git a/src/world/area_nok/common/GetIntoShell.inc.c b/src/world/area_nok/common/GetIntoShell.inc.c index 113d872809f..7b6a2d55874 100644 --- a/src/world/area_nok/common/GetIntoShell.inc.c +++ b/src/world/area_nok/common/GetIntoShell.inc.c @@ -1,19 +1,19 @@ #include "common.h" EvtScript N(EVS_GetIntoShell) = { - EVT_CALL(GetNpcYaw, LVar4, LVar1) - EVT_SET(LVar2, 30) - EVT_IF_GT(LVar1, 151) - EVT_IF_LE(LVar1, 331) - EVT_SET(LVar2, -30) - EVT_END_IF - EVT_END_IF - EVT_SET(LVar0, 0) - EVT_LOOP(15) - EVT_ADD(LVar0, LVar2) - EVT_CALL(SetNpcRotation, LVar3, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(GetNpcYaw, LVar4, LVar1) + Set(LVar2, 30) + IfGt(LVar1, 151) + IfLe(LVar1, 331) + Set(LVar2, -30) + EndIf + EndIf + Set(LVar0, 0) + Loop(15) + Add(LVar0, LVar2) + Call(SetNpcRotation, LVar3, 0, 0, LVar0) + Wait(1) + EndLoop + Return + End }; diff --git a/src/world/area_nok/nok_01/nok_01_1_music.c b/src/world/area_nok/nok_01/nok_01_1_music.c index e1f43bcaf2a..dd5af37a0af 100644 --- a/src/world/area_nok/nok_01/nok_01_1_music.c +++ b/src/world/area_nok/nok_01/nok_01_1_music.c @@ -1,65 +1,65 @@ #include "nok_01.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) - EVT_CALL(SetMusicTrack, 0, SONG_FUZZY_ATTACK, 0, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_VILLAGE, 0, 8) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) + Call(SetMusicTrack, 0, SONG_FUZZY_ATTACK, 0, 8) + Else + Call(SetMusicTrack, 0, SONG_KOOPA_VILLAGE, 0, 8) + EndIf + Return + End }; EvtScript N(EVS_80242C38) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) - EVT_CALL(SetMusicTrack, 0, SONG_FUZZY_ATTACK, 0, 7) - EVT_WAIT(4) - EVT_CALL(SetMusicTrack, 0, SONG_FUZZY_ATTACK, 0, 6) - EVT_WAIT(4) - EVT_CALL(SetMusicTrack, 0, SONG_FUZZY_ATTACK, 0, 5) - EVT_WAIT(4) - EVT_CALL(SetMusicTrack, 0, SONG_FUZZY_ATTACK, 0, 4) - EVT_WAIT(4) - EVT_CALL(SetMusicTrack, 0, SONG_FUZZY_ATTACK, 0, 3) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_VILLAGE, 0, 7) - EVT_WAIT(4) - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_VILLAGE, 0, 6) - EVT_WAIT(4) - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_VILLAGE, 0, 5) - EVT_WAIT(4) - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_VILLAGE, 0, 4) - EVT_WAIT(4) - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_VILLAGE, 0, 3) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) + Call(SetMusicTrack, 0, SONG_FUZZY_ATTACK, 0, 7) + Wait(4) + Call(SetMusicTrack, 0, SONG_FUZZY_ATTACK, 0, 6) + Wait(4) + Call(SetMusicTrack, 0, SONG_FUZZY_ATTACK, 0, 5) + Wait(4) + Call(SetMusicTrack, 0, SONG_FUZZY_ATTACK, 0, 4) + Wait(4) + Call(SetMusicTrack, 0, SONG_FUZZY_ATTACK, 0, 3) + Else + Call(SetMusicTrack, 0, SONG_KOOPA_VILLAGE, 0, 7) + Wait(4) + Call(SetMusicTrack, 0, SONG_KOOPA_VILLAGE, 0, 6) + Wait(4) + Call(SetMusicTrack, 0, SONG_KOOPA_VILLAGE, 0, 5) + Wait(4) + Call(SetMusicTrack, 0, SONG_KOOPA_VILLAGE, 0, 4) + Wait(4) + Call(SetMusicTrack, 0, SONG_KOOPA_VILLAGE, 0, 3) + EndIf + Return + End }; EvtScript N(EVS_80242DE0) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) - EVT_CALL(SetMusicTrack, 0, SONG_FUZZY_ATTACK, 0, 4) - EVT_WAIT(2) - EVT_CALL(SetMusicTrack, 0, SONG_FUZZY_ATTACK, 0, 5) - EVT_WAIT(2) - EVT_CALL(SetMusicTrack, 0, SONG_FUZZY_ATTACK, 0, 6) - EVT_WAIT(2) - EVT_CALL(SetMusicTrack, 0, SONG_FUZZY_ATTACK, 0, 7) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_VILLAGE, 0, 4) - EVT_WAIT(2) - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_VILLAGE, 0, 5) - EVT_WAIT(2) - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_VILLAGE, 0, 6) - EVT_WAIT(2) - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_VILLAGE, 0, 7) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) + Call(SetMusicTrack, 0, SONG_FUZZY_ATTACK, 0, 4) + Wait(2) + Call(SetMusicTrack, 0, SONG_FUZZY_ATTACK, 0, 5) + Wait(2) + Call(SetMusicTrack, 0, SONG_FUZZY_ATTACK, 0, 6) + Wait(2) + Call(SetMusicTrack, 0, SONG_FUZZY_ATTACK, 0, 7) + Else + Call(SetMusicTrack, 0, SONG_KOOPA_VILLAGE, 0, 4) + Wait(2) + Call(SetMusicTrack, 0, SONG_KOOPA_VILLAGE, 0, 5) + Wait(2) + Call(SetMusicTrack, 0, SONG_KOOPA_VILLAGE, 0, 6) + Wait(2) + Call(SetMusicTrack, 0, SONG_KOOPA_VILLAGE, 0, 7) + EndIf + Return + End }; EvtScript N(EVS_PlayRestingSong) = { - EVT_CALL(SetMusicTrack, 0, SONG_TAKING_REST, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TAKING_REST, 0, 8) + Return + End }; diff --git a/src/world/area_nok/nok_01/nok_01_2_main.c b/src/world/area_nok/nok_01/nok_01_2_main.c index 9c8d1dcea52..c7e78571c1d 100644 --- a/src/world/area_nok/nok_01/nok_01_2_main.c +++ b/src/world/area_nok/nok_01/nok_01_2_main.c @@ -1,123 +1,123 @@ #include "nok_01.h" EvtScript N(EVS_ExitWalk_nok_13_1) = { - EVT_IF_EQ(GB_KootFavor_State, KOOT_FAVOR_STATE_2) - EVT_SET(GF_KootFavor_LeftKoopaVillage, TRUE) - EVT_END_IF - EVT_CALL(N(func_802428B8_9C7C98)) - EVT_CALL(ClearAmbientSounds, 250) - EVT_CALL(UseExitHeading, 60, nok_01_ENTRY_0) - EVT_EXEC(ExitWalk) - EVT_CALL(GotoMap, EVT_PTR("nok_13"), nok_13_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + IfEq(GB_KootFavor_State, KOOT_FAVOR_STATE_2) + Set(GF_KootFavor_LeftKoopaVillage, TRUE) + EndIf + Call(N(func_802428B8_9C7C98)) + Call(ClearAmbientSounds, 250) + Call(UseExitHeading, 60, nok_01_ENTRY_0) + Exec(ExitWalk) + Call(GotoMap, Ref("nok_13"), nok_13_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_nok_02_0) = { - EVT_CALL(N(func_802428B8_9C7C98)) - EVT_CALL(ClearAmbientSounds, 250) - EVT_CALL(UseExitHeading, 60, nok_01_ENTRY_1) - EVT_EXEC(ExitWalk) - EVT_CALL(GotoMap, EVT_PTR("nok_02"), nok_02_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(N(func_802428B8_9C7C98)) + Call(ClearAmbientSounds, 250) + Call(UseExitHeading, 60, nok_01_ENTRY_1) + Exec(ExitWalk) + Call(GotoMap, Ref("nok_02"), nok_02_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_nok_13_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_nok_02_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_nok_13_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_nok_02_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_SET(LFlag0, FALSE) - EVT_IF_EQ(LVar0, nok_01_ENTRY_0) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_ARRIVED_AT_KOOPA_VILLAGE) - EVT_SET(LFlag0, TRUE) - EVT_THREAD - EVT_WAIT(30) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_THREAD - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(GetEntryID, LVar0) + Set(LFlag0, FALSE) + IfEq(LVar0, nok_01_ENTRY_0) + IfLt(GB_StoryProgress, STORY_CH1_ARRIVED_AT_KOOPA_VILLAGE) + Set(LFlag0, TRUE) + Thread + Wait(30) + Exec(N(EVS_BindExitTriggers)) + EndThread + EndIf + EndIf + IfEq(LFlag0, FALSE) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndIf + Return + End }; EvtScript N(EVS_TexPan_Flowers) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, MODEL_o298, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o320, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o402, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o396, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o397, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o398, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o399, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o400, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o401, TEX_PANNER_0) - EVT_LABEL(10) - EVT_LOOP(12) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(12) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0x4000, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(10) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, MODEL_o298, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o320, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o402, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o396, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o397, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o398, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o399, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o400, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o401, TEX_PANNER_0) + Label(10) + Loop(12) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, 0) + Wait(1) + EndLoop + Loop(12) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0x4000, 0) + Wait(1) + EndLoop + Goto(10) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_KOOPA_VILLAGE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() + Set(GB_WorldLocation, LOCATION_KOOPA_VILLAGE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() #if VERSION_PAL - EVT_CALL(GetLanguage, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_o340, LVar0) + Call(GetLanguage, LVar0) + Call(SetModelTexVariant, MODEL_o340, LVar0) #endif - EVT_SET(GF_MAP_KoopaVillage, TRUE) - EVT_SET(AF_NOK01_Dialogue_RelaxedKoopa, FALSE) - EVT_SET(AF_NOK01_Dialogue_Bobomb_01_Crisis, FALSE) - EVT_SET(AF_NOK01_Dialogue_Bobomb_02, FALSE) - EVT_SET(AF_NOK_0E, FALSE) - EVT_SET(GF_NOK01_Bush4_KoopaLeaf, FALSE) - EVT_IF_GE(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) - EVT_SET(GF_NOK01_RecoveredShellA, TRUE) - EVT_SET(GF_NOK01_RecoveredBlockShell, TRUE) - EVT_SET(GF_NOK01_RecoveredTreeShell, TRUE) - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(CrisisNPCs))) - EVT_ELSE - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NormalNPCs))) - EVT_END_IF - EVT_CALL(ClearDefeatedEnemies) - EVT_EXEC(N(EVS_SetupShop)) - EVT_EXEC(N(EVS_SetupRadio)) - EVT_EXEC(N(EVS_TexPan_Flowers)) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_MakeRooms)) - EVT_WAIT(1) - EVT_EXEC_WAIT(N(EVS_SetupFoliage)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(AB_NOK_0, 0) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GF_MAP_KoopaVillage, TRUE) + Set(AF_NOK01_Dialogue_RelaxedKoopa, FALSE) + Set(AF_NOK01_Dialogue_Bobomb_01_Crisis, FALSE) + Set(AF_NOK01_Dialogue_Bobomb_02, FALSE) + Set(AF_NOK_0E, FALSE) + Set(GF_NOK01_Bush4_KoopaLeaf, FALSE) + IfGe(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) + Set(GF_NOK01_RecoveredShellA, TRUE) + Set(GF_NOK01_RecoveredBlockShell, TRUE) + Set(GF_NOK01_RecoveredTreeShell, TRUE) + EndIf + IfLt(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) + Call(MakeNpcs, FALSE, Ref(N(CrisisNPCs))) + Else + Call(MakeNpcs, FALSE, Ref(N(NormalNPCs))) + EndIf + Call(ClearDefeatedEnemies) + Exec(N(EVS_SetupShop)) + Exec(N(EVS_SetupRadio)) + Exec(N(EVS_TexPan_Flowers)) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_MakeRooms)) + Wait(1) + ExecWait(N(EVS_SetupFoliage)) + Exec(N(EVS_SetupMusic)) + Set(AB_NOK_0, 0) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_nok/nok_01/nok_01_3_entity.c b/src/world/area_nok/nok_01/nok_01_3_entity.c index d560747c00d..58dcb4bcf7b 100644 --- a/src/world/area_nok/nok_01/nok_01_3_entity.c +++ b/src/world/area_nok/nok_01/nok_01_3_entity.c @@ -2,13 +2,13 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 20, 60, 370, 0, MAKE_ENTITY_END) - EVT_IF_EQ(GF_NOK01_RecoveredBlockShell, FALSE) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_BreakBlock_DropShell))) - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 425, 60, 125, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 150, 0, 350, 0, MODEL_o4, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_NOK01_HiddenPanel) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_BrickBlock), 20, 60, 370, 0, MAKE_ENTITY_END) + IfEq(GF_NOK01_RecoveredBlockShell, FALSE) + Call(AssignScript, Ref(N(EVS_BreakBlock_DropShell))) + EndIf + Call(MakeEntity, Ref(Entity_SavePoint), 425, 60, 125, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HiddenPanel), 150, 0, 350, 0, MODEL_o4, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_NOK01_HiddenPanel) + Return + End }; diff --git a/src/world/area_nok/nok_01/nok_01_4_npc.c b/src/world/area_nok/nok_01/nok_01_4_npc.c index 64f3e944fbc..8aa875957af 100644 --- a/src/world/area_nok/nok_01/nok_01_4_npc.c +++ b/src/world/area_nok/nok_01/nok_01_4_npc.c @@ -40,14 +40,14 @@ s32 N(LettersKoover1)[] = { }; EvtScript N(EVS_LetterPrompt_Koover1) = { - EVT_CALL(N(LetterDelivery_Init), + Call(N(LetterDelivery_Init), NPC_Koover, ANIM_Koopa_Talk, ANIM_Koopa_Idle, ITEM_LETTER_CHAIN_KOOVER_1, ITEM_LETTER_CHAIN_FISHMAEL, MSG_CH1_0009, MSG_CH1_000A, MSG_CH1_000B, MSG_CH1_000C, - EVT_PTR(N(LettersKoover1))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) - EVT_RETURN - EVT_END + Ref(N(LettersKoover1))) + ExecWait(N(EVS_DoLetterDelivery)) + Return + End }; s32 N(LettersKoover2)[] = { @@ -55,14 +55,14 @@ s32 N(LettersKoover2)[] = { }; EvtScript N(EVS_LetterPrompt_Koover2) = { - EVT_CALL(N(LetterDelivery_Init), + Call(N(LetterDelivery_Init), NPC_Koover, ANIM_Koopa_Talk, ANIM_Koopa_Idle, ITEM_LETTER_CHAIN_KOOVER_2, ITEM_LETTER_CHAIN_MR_E, MSG_CH1_000D, MSG_CH1_000E, MSG_CH1_000F, MSG_CH1_0010, - EVT_PTR(N(LettersKoover2))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) - EVT_RETURN - EVT_END + Ref(N(LettersKoover2))) + ExecWait(N(EVS_DoLetterDelivery)) + Return + End }; s32 N(LettersMortT)[] = { @@ -70,22 +70,22 @@ s32 N(LettersMortT)[] = { }; EvtScript N(EVS_LetterPrompt_MortT) = { - EVT_CALL(N(LetterDelivery_Init), + Call(N(LetterDelivery_Init), NPC_MortT, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, ITEM_LETTER_TO_MORT_T, ITEM_NONE, MSG_CH1_0039, MSG_CH1_003A, MSG_CH1_003B, MSG_CH1_003C, - EVT_PTR(N(LettersMortT))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) - EVT_RETURN - EVT_END + Ref(N(LettersMortT))) + ExecWait(N(EVS_DoLetterDelivery)) + Return + End }; EvtScript N(EVS_LetterReward_MortT) = { - EVT_IF_EQ(LVarC, DELIVERY_ACCEPTED) + IfEq(LVarC, DELIVERY_ACCEPTED) EVT_GIVE_STAR_PIECE() - EVT_END_IF - EVT_RETURN - EVT_END + EndIf + Return + End }; API_CALLABLE(N(IsNpcFacingRight)) { @@ -123,8 +123,8 @@ API_CALLABLE(N(SpawnExplosionEffect)) { } EvtScript N(EVS_DoNothing) = { - EVT_RETURN - EVT_END + Return + End }; #include "../common/GetIntoShell.inc.c" @@ -180,245 +180,245 @@ Vec2i N(FuzzyJumpPath2)[] = { }; EvtScript N(EVS_NpcIdle_MiscFuzzy1) = { - EVT_LABEL(100) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_ARRIVED_AT_KOOPA_VILLAGE) - EVT_WAIT(8) - EVT_GOTO(100) - EVT_END_IF - EVT_USE_BUF(EVT_PTR(N(FuzzyJumpPath1))) - EVT_SET(LVar1, 200) - EVT_BUF_READ2(LVar0, LVar2) - EVT_CALL(SetNpcPos, NPC_MiscFuzzy1, LVar0, LVar1, LVar2) - EVT_LABEL(0) - EVT_USE_BUF(EVT_PTR(N(FuzzyJumpPath1))) - EVT_LOOP(22) - EVT_SET(LVar1, 0) - EVT_BUF_READ2(LVar0, LVar2) - EVT_CALL(RandInt, 10, LVar3) - EVT_ADD(LVar3, 15) - EVT_CALL(PlaySoundAtNpc, NPC_MiscFuzzy1, SOUND_FUZZY_HOP_B, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_MiscFuzzy1, LVar0, LVar1, LVar2, LVar3) - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(100) + IfLt(GB_StoryProgress, STORY_CH1_ARRIVED_AT_KOOPA_VILLAGE) + Wait(8) + Goto(100) + EndIf + UseBuf(Ref(N(FuzzyJumpPath1))) + Set(LVar1, 200) + BufRead2(LVar0, LVar2) + Call(SetNpcPos, NPC_MiscFuzzy1, LVar0, LVar1, LVar2) + Label(0) + UseBuf(Ref(N(FuzzyJumpPath1))) + Loop(22) + Set(LVar1, 0) + BufRead2(LVar0, LVar2) + Call(RandInt, 10, LVar3) + Add(LVar3, 15) + Call(PlaySoundAtNpc, NPC_MiscFuzzy1, SOUND_FUZZY_HOP_B, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_MiscFuzzy1, LVar0, LVar1, LVar2, LVar3) + EndLoop + Goto(0) + Return + End }; EvtScript N(EVS_MiscFuzzyFlee) = { - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_CALL(MakeItemEntity, ITEM_COIN, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Fuzzy_Hurt) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_B, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 25) - EVT_ADD(LVar0, 40) - EVT_ADD(LVar2, -40) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Fuzzy_Hurt) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_B, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 15) - EVT_ADD(LVar0, 30) - EVT_ADD(LVar2, -30) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Fuzzy_Anim09) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_B, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 13) - EVT_ADD(LVar0, 20) - EVT_ADD(LVar2, -20) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_B, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 11) - EVT_ADD(LVar0, 10) - EVT_ADD(LVar2, -10) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_B, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 9) - EVT_ADD(LVar0, 80) - EVT_ADD(LVar2, -80) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Fuzzy_Run) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_B, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 15) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Thread + Call(MakeItemEntity, ITEM_COIN, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) + EndThread + Call(SetNpcAnimation, NPC_SELF, ANIM_Fuzzy_Hurt) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_B, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 25) + Add(LVar0, 40) + Add(LVar2, -40) + Call(SetNpcAnimation, NPC_SELF, ANIM_Fuzzy_Hurt) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_B, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 15) + Add(LVar0, 30) + Add(LVar2, -30) + Call(SetNpcAnimation, NPC_SELF, ANIM_Fuzzy_Anim09) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_B, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 13) + Add(LVar0, 20) + Add(LVar2, -20) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_B, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 11) + Add(LVar0, 10) + Add(LVar2, -10) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_B, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 9) + Add(LVar0, 80) + Add(LVar2, -80) + Call(SetNpcAnimation, NPC_SELF, ANIM_Fuzzy_Run) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_B, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 15) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Return + End }; EvtScript N(EVS_NpcHit_MiscFuzzy1) = { - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_MiscFuzzyFlee))) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_CANT_INTERACT | ENEMY_FLAG_IGNORE_PARTNER, 1) - EVT_RETURN - EVT_END + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_MiscFuzzyFlee))) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_CANT_INTERACT | ENEMY_FLAG_IGNORE_PARTNER, 1) + Return + End }; EvtScript N(EVS_NpcIdle_MiscFuzzy2) = { - EVT_LABEL(100) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_ARRIVED_AT_KOOPA_VILLAGE) - EVT_WAIT(8) - EVT_GOTO(100) - EVT_END_IF - EVT_USE_BUF(EVT_PTR(N(FuzzyJumpPath2))) - EVT_SET(LVar1, 200) - EVT_BUF_READ2(LVar0, LVar2) - EVT_MULF(LVar0, EVT_FLOAT(0.9)) - EVT_MULF(LVar2, EVT_FLOAT(0.9)) - EVT_CALL(SetNpcPos, NPC_MiscFuzzy2, LVar0, LVar1, LVar2) - EVT_LABEL(0) - EVT_USE_BUF(EVT_PTR(N(FuzzyJumpPath2))) - EVT_LOOP(22) - EVT_SET(LVar1, 0) - EVT_BUF_READ2(LVar0, LVar2) - EVT_CALL(RandInt, 9, LVar3) - EVT_ADD(LVar3, 13) - EVT_MULF(LVar0, EVT_FLOAT(0.9)) - EVT_MULF(LVar2, EVT_FLOAT(0.9)) - EVT_CALL(PlaySoundAtNpc, NPC_MiscFuzzy2, SOUND_FUZZY_HOP_C, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_MiscFuzzy2, LVar0, LVar1, LVar2, LVar3) - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(100) + IfLt(GB_StoryProgress, STORY_CH1_ARRIVED_AT_KOOPA_VILLAGE) + Wait(8) + Goto(100) + EndIf + UseBuf(Ref(N(FuzzyJumpPath2))) + Set(LVar1, 200) + BufRead2(LVar0, LVar2) + MulF(LVar0, Float(0.9)) + MulF(LVar2, Float(0.9)) + Call(SetNpcPos, NPC_MiscFuzzy2, LVar0, LVar1, LVar2) + Label(0) + UseBuf(Ref(N(FuzzyJumpPath2))) + Loop(22) + Set(LVar1, 0) + BufRead2(LVar0, LVar2) + Call(RandInt, 9, LVar3) + Add(LVar3, 13) + MulF(LVar0, Float(0.9)) + MulF(LVar2, Float(0.9)) + Call(PlaySoundAtNpc, NPC_MiscFuzzy2, SOUND_FUZZY_HOP_C, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_MiscFuzzy2, LVar0, LVar1, LVar2, LVar3) + EndLoop + Goto(0) + Return + End }; EvtScript N(EVS_NpcHit_MiscFuzzy2) = { - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_MiscFuzzyFlee))) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_CANT_INTERACT | ENEMY_FLAG_IGNORE_PARTNER, 1) - EVT_RETURN - EVT_END + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_MiscFuzzyFlee))) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_CANT_INTERACT | ENEMY_FLAG_IGNORE_PARTNER, 1) + Return + End }; EvtScript N(EVS_NpcInteract_Koopa_ShopOwner) = { - EVT_EXEC_WAIT(EVS_ShopOwnerDialog) - EVT_RETURN - EVT_END + ExecWait(EVS_ShopOwnerDialog) + Return + End }; EvtScript N(EVS_NpcInit_Koopa_ShopOwner) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Koopa_ShopOwner))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Koopa_ShopOwner))) + Return + End }; EvtScript N(EVS_ToadHouse_SetDialogue) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar1, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH1_0035) - EVT_SET(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar0, MSG_CH1_0033) - EVT_SET(LVar8, MSG_CH1_0034) - EVT_SET(LVar1, MSG_CH1_0036) - EVT_SET(LVar2, MSG_CH1_0037) - EVT_SET(LVar3, MSG_CH1_0038) - EVT_SET(LVar4, 0) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar1, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH1_0035) + Set(LVar0, 0) + Return + EndIf + Set(LVar0, MSG_CH1_0033) + Set(LVar8, MSG_CH1_0034) + Set(LVar1, MSG_CH1_0036) + Set(LVar2, MSG_CH1_0037) + Set(LVar3, MSG_CH1_0038) + Set(LVar4, 0) + Return + End }; EvtScript N(EVS_ToadHouse_GetInBed) = { - EVT_EXEC(N(EVS_PlayRestingSong)) - EVT_CALL(func_802D1270, -311, 85, EVT_FLOAT(3.0)) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(N(ToadHouse_CamSetFOV), 0, 40) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 34, -8) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 220) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -200, 53) - EVT_CALL(SetCamPosB, CAM_DEFAULT, -401, 50) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, -2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_CALL(func_802D1270, -334, 70, EVT_FLOAT(3.0)) - EVT_CALL(func_802D1270, -385, -6, EVT_FLOAT(3.0)) - EVT_WAIT(1) - EVT_CALL(InterpPlayerYaw, 160, 1) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Still) - EVT_CALL(SetPlayerImgFXFlags, IMGFX_FLAG_800) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_GET_IN_BED, 1, 1, 0) - EVT_THREAD - EVT_WAIT(60) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) - EVT_END_THREAD - EVT_WAIT(20) - EVT_THREAD - EVT_WAIT(63) - EVT_CALL(N(ToadHouse_CamSetFOV), 0, 25) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_PlayRestingSong)) + Call(func_802D1270, -311, 85, Float(3.0)) + Thread + Wait(5) + Call(N(ToadHouse_CamSetFOV), 0, 40) + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamPitch, CAM_DEFAULT, 34, -8) + Call(SetCamDistance, CAM_DEFAULT, 220) + Call(SetCamPosA, CAM_DEFAULT, -200, 53) + Call(SetCamPosB, CAM_DEFAULT, -401, 50) + Call(SetCamPosC, CAM_DEFAULT, 0, -2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Call(func_802D1270, -334, 70, Float(3.0)) + Call(func_802D1270, -385, -6, Float(3.0)) + Wait(1) + Call(InterpPlayerYaw, 160, 1) + Call(HidePlayerShadow, TRUE) + Call(SetPlayerAnimation, ANIM_Mario1_Still) + Call(SetPlayerImgFXFlags, IMGFX_FLAG_800) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_GET_IN_BED, 1, 1, 0) + Thread + Wait(60) + Call(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) + EndThread + Wait(20) + Thread + Wait(63) + Call(N(ToadHouse_CamSetFOV), 0, 25) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + EndThread + Return + End }; EvtScript N(EVS_ToadHouse_ReturnFromRest) = { - EVT_CALL(HidePlayerShadow, FALSE) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetPlayerPos, -380, 0, 5) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, -325, 79, 0) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Call(HidePlayerShadow, FALSE) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetPlayerPos, -380, 0, 5) + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, -325, 79, 0) + Exec(N(EVS_SetupMusic)) + Return + End }; EvtScript N(EVS_NpcInteract_MortT) = { - EVT_EXEC_WAIT(N(EVS_LetterPrompt_MortT)) - EVT_EXEC_WAIT(N(EVS_LetterReward_MortT)) - EVT_IF_NE(LVarC, DELIVERY_NOT_POSSIBLE) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_NpcInteract_ToadHouseKeeper)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_LetterPrompt_MortT)) + ExecWait(N(EVS_LetterReward_MortT)) + IfNe(LVarC, DELIVERY_NOT_POSSIBLE) + Return + EndIf + ExecWait(N(EVS_NpcInteract_ToadHouseKeeper)) + Return + End }; EvtScript N(EVS_NpcInit_MortT) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_MortT))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_MortT))) + Return + End }; EvtScript N(EVS_NpcInteract_RelaxedKoopa) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) - EVT_IF_EQ(AF_NOK01_Dialogue_RelaxedKoopa, FALSE) - EVT_CALL(SpeakToPlayer, NPC_RelaxedKoopa, ANIM_Koopa_LeanBackTalk, ANIM_Koopa_LeanBack, 5, MSG_CH1_0021) - EVT_SET(AF_NOK01_Dialogue_RelaxedKoopa, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_RelaxedKoopa, ANIM_Koopa_LeanBackTalk, ANIM_Koopa_LeanBack, 5, MSG_CH1_0022) - EVT_SET(AF_NOK01_Dialogue_RelaxedKoopa, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_RelaxedKoopa, ANIM_Koopa_LeanBackTalk, ANIM_Koopa_LeanBack, 5, MSG_CH1_0023) - EVT_RETURN - EVT_END_IF - EVT_SWITCH(AB_NOK_0) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_RelaxedKoopa, ANIM_Koopa_LeanBackTalk, ANIM_Koopa_LeanBack, 5, MSG_CH1_0024) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_RelaxedKoopa, ANIM_Koopa_LeanBackTalk, ANIM_Koopa_LeanBack, 5, MSG_CH1_0025) - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, NPC_RelaxedKoopa, ANIM_Koopa_LeanBackTalk, ANIM_Koopa_LeanBack, 5, MSG_CH1_0026) - EVT_CASE_EQ(3) - EVT_CALL(SpeakToPlayer, NPC_RelaxedKoopa, ANIM_Koopa_LeanBackTalk, ANIM_Koopa_LeanBack, 5, MSG_CH1_0027) - EVT_END_SWITCH - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) + IfEq(AF_NOK01_Dialogue_RelaxedKoopa, FALSE) + Call(SpeakToPlayer, NPC_RelaxedKoopa, ANIM_Koopa_LeanBackTalk, ANIM_Koopa_LeanBack, 5, MSG_CH1_0021) + Set(AF_NOK01_Dialogue_RelaxedKoopa, TRUE) + Else + Call(SpeakToPlayer, NPC_RelaxedKoopa, ANIM_Koopa_LeanBackTalk, ANIM_Koopa_LeanBack, 5, MSG_CH1_0022) + Set(AF_NOK01_Dialogue_RelaxedKoopa, FALSE) + EndIf + Return + EndIf + IfLt(GB_StoryProgress, STORY_CH1_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_RelaxedKoopa, ANIM_Koopa_LeanBackTalk, ANIM_Koopa_LeanBack, 5, MSG_CH1_0023) + Return + EndIf + Switch(AB_NOK_0) + CaseEq(0) + Call(SpeakToPlayer, NPC_RelaxedKoopa, ANIM_Koopa_LeanBackTalk, ANIM_Koopa_LeanBack, 5, MSG_CH1_0024) + CaseEq(1) + Call(SpeakToPlayer, NPC_RelaxedKoopa, ANIM_Koopa_LeanBackTalk, ANIM_Koopa_LeanBack, 5, MSG_CH1_0025) + CaseEq(2) + Call(SpeakToPlayer, NPC_RelaxedKoopa, ANIM_Koopa_LeanBackTalk, ANIM_Koopa_LeanBack, 5, MSG_CH1_0026) + CaseEq(3) + Call(SpeakToPlayer, NPC_RelaxedKoopa, ANIM_Koopa_LeanBackTalk, ANIM_Koopa_LeanBack, 5, MSG_CH1_0027) + EndSwitch + Return + End }; #include "npcs_crisis.inc.c" EvtScript N(EVS_NpcInit_RelaxedKoopa) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_RelaxedKoopa))) - EVT_CALL(SetNpcPos, NPC_RelaxedKoopa, 333, 17, -162) - EVT_CALL(InterpNpcYaw, NPC_RelaxedKoopa, 180, 0) - EVT_CALL(SetNpcAnimation, NPC_RelaxedKoopa, ANIM_Koopa_LeanBack) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_RelaxedKoopa))) + Call(SetNpcPos, NPC_RelaxedKoopa, 333, 17, -162) + Call(InterpNpcYaw, NPC_RelaxedKoopa, 180, 0) + Call(SetNpcAnimation, NPC_RelaxedKoopa, ANIM_Koopa_LeanBack) + Return + End }; #include "npcs_normal.inc.c" diff --git a/src/world/area_nok/nok_01/nok_01_5_shop.c b/src/world/area_nok/nok_01/nok_01_5_shop.c index fe3a933d807..396faf540ac 100644 --- a/src/world/area_nok/nok_01/nok_01_5_shop.c +++ b/src/world/area_nok/nok_01/nok_01_5_shop.c @@ -61,14 +61,14 @@ s32 N(missing_8024FC20_FC20)[] = { }; EvtScript N(EVS_OnBuy) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(SHOP_BUY_RESULT_CANCEL) - EVT_CASE_EQ(SHOP_BUY_RESULT_4) - EVT_CASE_EQ(SHOP_BUY_RESULT_OK) - EVT_CASE_EQ(SHOP_BUY_RESULT_2) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(SHOP_BUY_RESULT_CANCEL) + CaseEq(SHOP_BUY_RESULT_4) + CaseEq(SHOP_BUY_RESULT_OK) + CaseEq(SHOP_BUY_RESULT_2) + EndSwitch + Return + End }; ShopItemLocation N(ItemPositions)[] = { @@ -89,8 +89,8 @@ ShopOwner N(Owner) = { }; EvtScript N(EVS_SetupShop) = { - EVT_CALL(MakeShop, EVT_PTR(N(ItemPositions)), EVT_PTR(N(Inventory)), EVT_PTR(N(PriceList)), ITEM_ENTITY_FLAG_TOSS_LOWER) - EVT_CALL(MakeShopOwner, EVT_PTR(N(Owner))) - EVT_RETURN - EVT_END + Call(MakeShop, Ref(N(ItemPositions)), Ref(N(Inventory)), Ref(N(PriceList)), ITEM_ENTITY_FLAG_TOSS_LOWER) + Call(MakeShopOwner, Ref(N(Owner))) + Return + End }; diff --git a/src/world/area_nok/nok_01/nok_01_6_rooms.c b/src/world/area_nok/nok_01/nok_01_6_rooms.c index dba7d7073c7..a347a7183cf 100644 --- a/src/world/area_nok/nok_01/nok_01_6_rooms.c +++ b/src/world/area_nok/nok_01/nok_01_6_rooms.c @@ -15,207 +15,207 @@ API_CALLABLE(N(OnExitShop)) { } EvtScript N(EVS_AnimateSwingingSigns) = { - EVT_LABEL(9) - EVT_CALL(MakeLerp, 10, -10, 30, EASING_COS_IN_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o287, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o201, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(MakeLerp, -10, 10, 30, EASING_COS_IN_OUT) - EVT_LABEL(11) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o287, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o201, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(11) - EVT_END_IF - EVT_GOTO(9) - EVT_RETURN - EVT_END + Label(9) + Call(MakeLerp, 10, -10, 30, EASING_COS_IN_OUT) + Label(10) + Call(UpdateLerp) + Call(RotateModel, MODEL_o287, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o201, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(MakeLerp, -10, 10, 30, EASING_COS_IN_OUT) + Label(11) + Call(UpdateLerp) + Call(RotateModel, MODEL_o287, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o201, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(11) + EndIf + Goto(9) + Return + End }; EvtScript N(EVS_SpinCeilingFan) = { - EVT_LABEL(0) - EVT_SET(LVar0, 35) - EVT_LOOP(LVar0) - EVT_SET(LVar1, LVar0) - EVT_MUL(LVar1, 10) - EVT_CALL(RotateModel, MODEL_o247, LVar1, 0, -1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Set(LVar0, 35) + Loop(LVar0) + Set(LVar1, LVar0) + Mul(LVar1, 10) + Call(RotateModel, MODEL_o247, LVar1, 0, -1, 0) + Wait(1) + EndLoop + Goto(0) + Return + End }; EvtScript N(EVS_SetDoorRot_ToadHouse) = { - EVT_CALL(RotateModel, MODEL_o200, LVar0, 0, 1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o200, LVar0, 0, 1, 0) + Return + End }; EvtScript N(EVS_SetWallsRot_ToadHouse) = { - EVT_CALL(RotateModel, MODEL_o197, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o196, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o195, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o199, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o194, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o193, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o190, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o192, LVar0, 0, 1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o197, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_o196, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_o195, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_o199, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_o194, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o193, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o190, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o192, LVar0, 0, 1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_ToadHouse) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_WAIT(20) - EVT_SET(LVar0, 0) - EVT_LOOP(18) - EVT_ADD(LVar0, 5) - EVT_EXEC_WAIT(N(EVS_SetWallsRot_ToadHouse)) - EVT_END_LOOP - EVT_CASE_EQ(3) - EVT_SET(LVar0, 90) - EVT_LOOP(18) - EVT_SUB(LVar0, 5) - EVT_EXEC_WAIT(N(EVS_SetWallsRot_ToadHouse)) - EVT_END_LOOP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(0) + Wait(20) + Set(LVar0, 0) + Loop(18) + Add(LVar0, 5) + ExecWait(N(EVS_SetWallsRot_ToadHouse)) + EndLoop + CaseEq(3) + Set(LVar0, 90) + Loop(18) + Sub(LVar0, 5) + ExecWait(N(EVS_SetWallsRot_ToadHouse)) + EndLoop + EndSwitch + Return + End }; EvtScript N(EVS_SetDoorRot_Shop) = { - EVT_CALL(RotateModel, MODEL_o226, LVar0, 0, 1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o226, LVar0, 0, 1, 0) + Return + End }; EvtScript N(EVS_SetWallsRot_Shop) = { - EVT_SET(LVar1, LVar0) - EVT_DIVF(LVar1, 45) - EVT_CALL(TranslateModel, MODEL_o225, 0, LVar1, 0) - EVT_CALL(RotateModel, MODEL_o225, LVar0, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o224, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o223, LVar0, 0, 0, 1) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + DivF(LVar1, 45) + Call(TranslateModel, MODEL_o225, 0, LVar1, 0) + Call(RotateModel, MODEL_o225, LVar0, 0, 0, -1) + Call(RotateModel, MODEL_o224, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o223, LVar0, 0, 0, 1) + Return + End }; EvtScript N(EVS_SetWallRot_Shop) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_WAIT(20) - EVT_CALL(N(OnEnterShop)) - EVT_SET(LVar0, 0) - EVT_LOOP(18) - EVT_ADD(LVar0, 5) - EVT_EXEC_WAIT(N(EVS_SetWallsRot_Shop)) - EVT_END_LOOP - EVT_CASE_EQ(3) - EVT_CALL(N(OnExitShop)) - EVT_SET(LVar0, 90) - EVT_LOOP(18) - EVT_SUB(LVar0, 5) - EVT_EXEC_WAIT(N(EVS_SetWallsRot_Shop)) - EVT_END_LOOP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(0) + Wait(20) + Call(N(OnEnterShop)) + Set(LVar0, 0) + Loop(18) + Add(LVar0, 5) + ExecWait(N(EVS_SetWallsRot_Shop)) + EndLoop + CaseEq(3) + Call(N(OnExitShop)) + Set(LVar0, 90) + Loop(18) + Sub(LVar0, 5) + ExecWait(N(EVS_SetWallsRot_Shop)) + EndLoop + EndSwitch + Return + End }; EvtScript N(EVS_SetDoorRot_BeachHouse) = { - EVT_CALL(RotateModel, MODEL_o246, LVar0, 0, 1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o246, LVar0, 0, 1, 0) + Return + End }; EvtScript N(EVS_SetWallsRot_BeachHouse) = { - EVT_SETF(LVar1, LVar0) - EVT_DIVF(LVar1, 2) - EVT_CALL(RotateModel, MODEL_o243, LVar1, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o244, LVar1, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o242, LVar1, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o245, LVar1, -1, 0, 0) - EVT_RETURN - EVT_END + SetF(LVar1, LVar0) + DivF(LVar1, 2) + Call(RotateModel, MODEL_o243, LVar1, -1, 0, 0) + Call(RotateModel, MODEL_o244, LVar1, -1, 0, 0) + Call(RotateModel, MODEL_o242, LVar1, -1, 0, 0) + Call(RotateModel, MODEL_o245, LVar1, -1, 0, 0) + Return + End }; EvtScript N(EVS_SetWallRot_BeachHouse) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SET(LVar0, 0) - EVT_LOOP(18) - EVT_ADD(LVar0, 5) - EVT_EXEC_WAIT(N(EVS_SetWallsRot_BeachHouse)) - EVT_END_LOOP - EVT_CASE_EQ(3) - EVT_SET(LVar0, 90) - EVT_LOOP(18) - EVT_SUB(LVar0, 5) - EVT_EXEC_WAIT(N(EVS_SetWallsRot_BeachHouse)) - EVT_END_LOOP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(0) + Set(LVar0, 0) + Loop(18) + Add(LVar0, 5) + ExecWait(N(EVS_SetWallsRot_BeachHouse)) + EndLoop + CaseEq(3) + Set(LVar0, 90) + Loop(18) + Sub(LVar0, 5) + ExecWait(N(EVS_SetWallsRot_BeachHouse)) + EndLoop + EndSwitch + Return + End }; EvtScript N(EVS_DropDoor_BeachHouse) = { - EVT_SET(LVar1, LVar0) - EVT_DIVF(LVar1, 45) - EVT_CALL(TranslateModel, MODEL_o246, 0, LVar1, 0) - EVT_CALL(RotateModel, MODEL_o246, LVar0, 1, 0, 0) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + DivF(LVar1, 45) + Call(TranslateModel, MODEL_o246, 0, LVar1, 0) + Call(RotateModel, MODEL_o246, LVar0, 1, 0, 0) + Return + End }; EvtScript N(EVS_RoomListener_ToadHouse) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_CALL(SetGroupVisibility, MODEL_g111, MODEL_GROUP_VISIBLE) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_CALL(SetGroupVisibility, MODEL_g111, MODEL_GROUP_HIDDEN) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Call(SetGroupVisibility, MODEL_g111, MODEL_GROUP_VISIBLE) + CaseEq(ROOM_UPDATE_EXIT_END) + Call(SetGroupVisibility, MODEL_g111, MODEL_GROUP_HIDDEN) + EndSwitch + Return + End }; EvtScript N(EVS_RoomListener_Shop) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_CALL(SetGroupVisibility, MODEL_g114, MODEL_GROUP_VISIBLE) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_BEGIN) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_CALL(SetGroupVisibility, MODEL_g114, MODEL_GROUP_HIDDEN) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Call(SetGroupVisibility, MODEL_g114, MODEL_GROUP_VISIBLE) + CaseEq(ROOM_UPDATE_EXIT_BEGIN) + CaseEq(ROOM_UPDATE_EXIT_END) + Call(SetGroupVisibility, MODEL_g114, MODEL_GROUP_HIDDEN) + EndSwitch + Return + End }; EvtScript N(EVS_RoomListener_BeachHouse) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_CALL(SetGroupVisibility, MODEL_g79, MODEL_GROUP_VISIBLE) - EVT_CALL(N(SetRadioVolumeMax), AB_NOK_0) - EVT_EXEC(N(EVS_80242C38)) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_DONE) + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Call(SetGroupVisibility, MODEL_g79, MODEL_GROUP_VISIBLE) + Call(N(SetRadioVolumeMax), AB_NOK_0) + Exec(N(EVS_80242C38)) + CaseEq(ROOM_UPDATE_ENTER_DONE) // do nothing - EVT_CASE_EQ(ROOM_UPDATE_EXIT_BEGIN) - EVT_CALL(N(SetRadioVolumeMute), AB_NOK_0) - EVT_EXEC(N(EVS_80242DE0)) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_CALL(SetGroupVisibility, MODEL_g79, MODEL_GROUP_HIDDEN) - EVT_CALL(N(func_80242898_9C7C78)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + CaseEq(ROOM_UPDATE_EXIT_BEGIN) + Call(N(SetRadioVolumeMute), AB_NOK_0) + Exec(N(EVS_80242DE0)) + CaseEq(ROOM_UPDATE_EXIT_END) + Call(SetGroupVisibility, MODEL_g79, MODEL_GROUP_HIDDEN) + Call(N(func_80242898_9C7C78)) + EndSwitch + Return + End }; s32 N(InteriorNPCs_ToadHouse)[] = { @@ -242,58 +242,58 @@ s32 N(InteriorNPCs_BeachHouse_After)[] = { EvtScript N(EVS_MakeRooms) = { // toad house - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_RIGHT_HINGE_OPENS_OUT | ROOM_FLAG_CUSTOM_ANIM_WALL_ROT), - EVT_PTR(N(EVS_SetDoorRot_ToadHouse)), - EVT_PTR(N(EVS_SetWallRot_ToadHouse)), + Ref(N(EVS_SetDoorRot_ToadHouse)), + Ref(N(EVS_SetWallRot_ToadHouse)), NULL, - EVT_PTR(N(EVS_RoomListener_ToadHouse)), + Ref(N(EVS_RoomListener_ToadHouse)), COLLIDER_o200, COLLIDER_o284, MODEL_aka, - EVT_PTR(N(InteriorNPCs_ToadHouse))) + Ref(N(InteriorNPCs_ToadHouse))) // shop - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_1, ROOM_DOOR_RIGHT_HINGE_OPENS_OUT | ROOM_FLAG_CUSTOM_ANIM_WALL_ROT), - EVT_PTR(N(EVS_SetDoorRot_Shop)), - EVT_PTR(N(EVS_SetWallRot_Shop)), + Ref(N(EVS_SetDoorRot_Shop)), + Ref(N(EVS_SetWallRot_Shop)), NULL, - EVT_PTR(N(EVS_RoomListener_Shop)), + Ref(N(EVS_RoomListener_Shop)), COLLIDER_o226, COLLIDER_o286, MODEL_ki, - EVT_PTR(N(InteriorNPCs_Shop))) + Ref(N(InteriorNPCs_Shop))) // beach house - EVT_IF_LT(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) - EVT_CALL(CreateMapRoom, + IfLt(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_RIGHT_HINGE_OPENS_OUT | ROOM_FLAG_CUSTOM_ANIM_WALL_ROT), - EVT_PTR(N(EVS_SetDoorRot_BeachHouse)), - EVT_PTR(N(EVS_SetWallRot_BeachHouse)), - EVT_PTR(N(EVS_DropDoor_BeachHouse)), - EVT_PTR(N(EVS_RoomListener_BeachHouse)), + Ref(N(EVS_SetDoorRot_BeachHouse)), + Ref(N(EVS_SetWallRot_BeachHouse)), + Ref(N(EVS_DropDoor_BeachHouse)), + Ref(N(EVS_RoomListener_BeachHouse)), COLLIDER_o246, COLLIDER_o291, MODEL_ao, - EVT_PTR(N(InteriorNPCs_BeachHouse_Before))) - EVT_ELSE - EVT_CALL(CreateMapRoom, + Ref(N(InteriorNPCs_BeachHouse_Before))) + Else + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_RIGHT_HINGE_OPENS_OUT | ROOM_FLAG_CUSTOM_ANIM_WALL_ROT), - EVT_PTR(N(EVS_SetDoorRot_BeachHouse)), - EVT_PTR(N(EVS_SetWallRot_BeachHouse)), - EVT_PTR(N(EVS_DropDoor_BeachHouse)), - EVT_PTR(N(EVS_RoomListener_BeachHouse)), + Ref(N(EVS_SetDoorRot_BeachHouse)), + Ref(N(EVS_SetWallRot_BeachHouse)), + Ref(N(EVS_DropDoor_BeachHouse)), + Ref(N(EVS_RoomListener_BeachHouse)), COLLIDER_o246, COLLIDER_o291, MODEL_ao, - EVT_PTR(N(InteriorNPCs_BeachHouse_After))) - EVT_END_IF - EVT_CALL(N(InitializeRadio)) - EVT_SET(LVar0, ROOM_UPDATE_EXIT_END) - EVT_EXEC(N(EVS_RoomListener_ToadHouse)) - EVT_EXEC(N(EVS_RoomListener_Shop)) - EVT_EXEC(N(EVS_RoomListener_BeachHouse)) - EVT_EXEC(N(EVS_AnimateSwingingSigns)) - EVT_EXEC(N(EVS_SpinCeilingFan)) - EVT_RETURN - EVT_END + Ref(N(InteriorNPCs_BeachHouse_After))) + EndIf + Call(N(InitializeRadio)) + Set(LVar0, ROOM_UPDATE_EXIT_END) + Exec(N(EVS_RoomListener_ToadHouse)) + Exec(N(EVS_RoomListener_Shop)) + Exec(N(EVS_RoomListener_BeachHouse)) + Exec(N(EVS_AnimateSwingingSigns)) + Exec(N(EVS_SpinCeilingFan)) + Return + End }; diff --git a/src/world/area_nok/nok_01/nok_01_7_radio.c b/src/world/area_nok/nok_01/nok_01_7_radio.c index b1bff3b4f6c..9e4fd121a21 100644 --- a/src/world/area_nok/nok_01/nok_01_7_radio.c +++ b/src/world/area_nok/nok_01/nok_01_7_radio.c @@ -56,77 +56,77 @@ API_CALLABLE(N(SetTradeEventStartTime)) { } EvtScript N(EVS_InitiateTradingEvent) = { - EVT_SWITCH(GB_TradingEvent_Count) - EVT_CASE_EQ(0) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) - EVT_CALL(SwitchMessage, MSG_CH1_0028) - EVT_ELSE - EVT_CALL(SwitchMessage, MSG_CH1_0029) - EVT_END_IF - EVT_ELSE - EVT_CALL(SwitchMessage, MSG_CH1_002A) - EVT_SET(GF_TradingEvent1_Active, TRUE) - EVT_CALL(N(SetTradeEventStartTime)) - EVT_END_IF - EVT_CASE_EQ(1) - EVT_IF_LT(GB_StoryProgress, STORY_CH3_BEGAN_PEACH_MISSION) - EVT_CALL(SwitchMessage, MSG_CH1_002E) - EVT_ELSE - EVT_CALL(SwitchMessage, MSG_CH1_002B) - EVT_SET(GF_TradingEvent2_Active, TRUE) - EVT_CALL(N(SetTradeEventStartTime)) - EVT_END_IF - EVT_CASE_EQ(2) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SwitchMessage, MSG_CH1_002E) - EVT_ELSE - EVT_CALL(SwitchMessage, MSG_CH1_002C) - EVT_SET(GF_TradingEvent3_Active, TRUE) - EVT_CALL(N(SetTradeEventStartTime)) - EVT_END_IF - EVT_CASE_EQ(3) - EVT_CALL(SwitchMessage, MSG_CH1_002D) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_TradingEvent_Count) + CaseEq(0) + IfLt(GB_StoryProgress, STORY_CH1_STAR_SPRIT_DEPARTED) + IfLt(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) + Call(SwitchMessage, MSG_CH1_0028) + Else + Call(SwitchMessage, MSG_CH1_0029) + EndIf + Else + Call(SwitchMessage, MSG_CH1_002A) + Set(GF_TradingEvent1_Active, TRUE) + Call(N(SetTradeEventStartTime)) + EndIf + CaseEq(1) + IfLt(GB_StoryProgress, STORY_CH3_BEGAN_PEACH_MISSION) + Call(SwitchMessage, MSG_CH1_002E) + Else + Call(SwitchMessage, MSG_CH1_002B) + Set(GF_TradingEvent2_Active, TRUE) + Call(N(SetTradeEventStartTime)) + EndIf + CaseEq(2) + IfLt(GB_StoryProgress, STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SwitchMessage, MSG_CH1_002E) + Else + Call(SwitchMessage, MSG_CH1_002C) + Set(GF_TradingEvent3_Active, TRUE) + Call(N(SetTradeEventStartTime)) + EndIf + CaseEq(3) + Call(SwitchMessage, MSG_CH1_002D) + EndSwitch + Return + End }; EvtScript N(EVS_Interact_Radio) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(2) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_RideLaki) - EVT_WAIT(7) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_ADD(AB_NOK_0, 1) - EVT_IF_GE(AB_NOK_0, 4) - EVT_SET(AB_NOK_0, 0) - EVT_END_IF - EVT_IF_NE(GF_MAC05_SimonGotMelody, TRUE) - EVT_IF_EQ(AB_NOK_0, 2) - EVT_ADD(AB_NOK_0, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(N(SetRadioStation), AB_NOK_0) - EVT_SWITCH(AB_NOK_0) - EVT_CASE_EQ(0) // island sounds - EVT_CALL(ShowMessageAtScreenPos, MSG_CH1_002F, 160, 40) - EVT_CASE_EQ(1) // golden oldies - EVT_CALL(ShowMessageAtScreenPos, MSG_CH1_0030, 160, 40) - EVT_CASE_EQ(2) // hot hits - EVT_CALL(ShowMessageAtScreenPos, MSG_CH1_0031, 160, 40) - EVT_CASE_EQ(3) // information - EVT_CALL(ShowMessageAtScreenPos, MSG_CH1_0032, 160, 40) - EVT_EXEC_WAIT(N(EVS_InitiateTradingEvent)) - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(2) + Call(SetPlayerAnimation, ANIM_MarioW2_RideLaki) + Wait(7) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Add(AB_NOK_0, 1) + IfGe(AB_NOK_0, 4) + Set(AB_NOK_0, 0) + EndIf + IfNe(GF_MAC05_SimonGotMelody, TRUE) + IfEq(AB_NOK_0, 2) + Add(AB_NOK_0, 1) + EndIf + EndIf + Call(N(SetRadioStation), AB_NOK_0) + Switch(AB_NOK_0) + CaseEq(0) // island sounds + Call(ShowMessageAtScreenPos, MSG_CH1_002F, 160, 40) + CaseEq(1) // golden oldies + Call(ShowMessageAtScreenPos, MSG_CH1_0030, 160, 40) + CaseEq(2) // hot hits + Call(ShowMessageAtScreenPos, MSG_CH1_0031, 160, 40) + CaseEq(3) // information + Call(ShowMessageAtScreenPos, MSG_CH1_0032, 160, 40) + ExecWait(N(EVS_InitiateTradingEvent)) + EndSwitch + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SetupRadio) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Interact_Radio)), TRIGGER_WALL_PRESS_A, COLLIDER_o235, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_Interact_Radio)), TRIGGER_WALL_PRESS_A, COLLIDER_o235, 1, 0) + Return + End }; diff --git a/src/world/area_nok/nok_01/nok_01_8_foliage.c b/src/world/area_nok/nok_01/nok_01_8_foliage.c index 725d0514a9e..c2d20d76041 100644 --- a/src/world/area_nok/nok_01/nok_01_8_foliage.c +++ b/src/world/area_nok/nok_01/nok_01_8_foliage.c @@ -48,21 +48,21 @@ SearchBushConfig N(SearchBush_Bush3) = { FoliageModelList N(Bush6_BushModels) = FOLIAGE_MODEL_LIST(MODEL_o390, MODEL_o396, MODEL_o397, MODEL_o398); EvtScript N(EVS_Bush6_HideFlowers) = { - EVT_CALL(EnableModel, MODEL_o396, FALSE) - EVT_CALL(EnableModel, MODEL_o397, FALSE) - EVT_CALL(EnableModel, MODEL_o398, FALSE) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_o396, FALSE) + Call(EnableModel, MODEL_o397, FALSE) + Call(EnableModel, MODEL_o398, FALSE) + Return + End }; EvtScript N(EVS_OnSearchBush6) = { - EVT_CALL(EnableModel, MODEL_o396, TRUE) - EVT_WAIT(10) - EVT_CALL(EnableModel, MODEL_o398, TRUE) - EVT_WAIT(10) - EVT_CALL(EnableModel, MODEL_o397, TRUE) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_o396, TRUE) + Wait(10) + Call(EnableModel, MODEL_o398, TRUE) + Wait(10) + Call(EnableModel, MODEL_o397, TRUE) + Return + End }; SearchBushConfig N(SearchBush_Bush6) = { @@ -145,21 +145,21 @@ FoliageDropList N(Bush1_Drops) = { }; EvtScript N(EVS_Bush2_HideFlowers) = { - EVT_CALL(EnableModel, MODEL_o399, FALSE) - EVT_CALL(EnableModel, MODEL_o400, FALSE) - EVT_CALL(EnableModel, MODEL_o401, FALSE) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_o399, FALSE) + Call(EnableModel, MODEL_o400, FALSE) + Call(EnableModel, MODEL_o401, FALSE) + Return + End }; EvtScript N(EVS_OnSearchBush2) = { - EVT_CALL(EnableModel, MODEL_o399, TRUE) - EVT_WAIT(10) - EVT_CALL(EnableModel, MODEL_o401, TRUE) - EVT_WAIT(10) - EVT_CALL(EnableModel, MODEL_o400, TRUE) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_o399, TRUE) + Wait(10) + Call(EnableModel, MODEL_o401, TRUE) + Wait(10) + Call(EnableModel, MODEL_o400, TRUE) + Return + End }; SearchBushConfig N(SearchBush_Bush2) = { @@ -188,36 +188,36 @@ BombTrigger N(BombPos_Tree1) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush5))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o312, 1, 0) - EVT_IF_EQ(GB_KootFavor_Current, KOOT_FAVOR_CH6_2) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush3))) - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush4))) - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o313, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush6))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o419, 1, 0) - EVT_EXEC(N(EVS_Bush6_HideFlowers)) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush7))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o420, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush8))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o421, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush9))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o422, 1, 0) - EVT_IF_EQ(GB_KootFavor_Current, KOOT_FAVOR_CH3_2) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush1))) - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush2))) - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o423, 1, 0) - EVT_EXEC(N(EVS_Bush2_HideFlowers)) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o323, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush5))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o312, 1, 0) + IfEq(GB_KootFavor_Current, KOOT_FAVOR_CH6_2) + Set(LVar0, Ref(N(SearchBush_Bush3))) + Else + Set(LVar0, Ref(N(SearchBush_Bush4))) + EndIf + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o313, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush6))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o419, 1, 0) + Exec(N(EVS_Bush6_HideFlowers)) + Set(LVar0, Ref(N(SearchBush_Bush7))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o420, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush8))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o421, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush9))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o422, 1, 0) + IfEq(GB_KootFavor_Current, KOOT_FAVOR_CH3_2) + Set(LVar0, Ref(N(SearchBush_Bush1))) + Else + Set(LVar0, Ref(N(SearchBush_Bush2))) + EndIf + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o423, 1, 0) + Exec(N(EVS_Bush2_HideFlowers)) + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o323, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) // bind the same tree a second time for the koopa shell stuck inside - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Scene_RecoverTreeShell)), TRIGGER_WALL_HAMMER, COLLIDER_o323, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Scene_RecoverTreeShell)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_Scene_RecoverTreeShell)), TRIGGER_WALL_HAMMER, COLLIDER_o323, 1, 0) + BindTrigger(Ref(N(EVS_Scene_RecoverTreeShell)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Return + End }; diff --git a/src/world/area_nok/nok_01/npcs_crisis.inc.c b/src/world/area_nok/nok_01/npcs_crisis.inc.c index 36362f7ce4a..ca798e2c609 100644 --- a/src/world/area_nok/nok_01/npcs_crisis.inc.c +++ b/src/world/area_nok/nok_01/npcs_crisis.inc.c @@ -1,586 +1,586 @@ #include "sprite/player.h" EvtScript N(EVS_Scene_RecoverTreeShell) = { - EVT_WAIT(1) - EVT_IF_EQ(GF_NOK01_RecoveredTreeShell, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_NOK01_RecoveredTreeShell, TRUE) - EVT_CALL(BindNpcAI, NPC_Koopa_03, EVT_PTR(N(EVS_DoNothing))) - EVT_CALL(SetNpcAux, NPC_Koopa_03, EVT_PTR(N(EVS_DoNothing))) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(5) - EVT_CALL(NpcJump0, NPC_KoopaShell_03, 220, 0, 210, 20) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaShell_03, SOUND_ITEM_BOUNCE, SOUND_SPACE_DEFAULT) - EVT_CALL(PlayerFaceNpc, NPC_KoopaShell_03, FALSE) - EVT_CALL(NpcFaceNpc, NPC_Koopa_03, NPC_KoopaShell_03, 0) - EVT_CALL(SetNpcFlagBits, NPC_Koopa_03, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_ADD(LVar0, -1) - EVT_ADD(LVar2, -1) - EVT_CALL(GetNpcPos, NPC_Koopa_03, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcAnimation, NPC_Koopa_03, ANIM_KoopaWithoutShell_Happy) - EVT_CALL(NpcJump0, NPC_Koopa_03, LVar0, 0, LVar2, 15) - EVT_CALL(GetNpcPos, NPC_KoopaShell_03, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 1) - EVT_ADD(LVar2, 1) - EVT_CALL(SetNpcAnimation, NPC_Koopa_03, ANIM_KoopaWithoutShell_Run) - EVT_CALL(NpcMoveTo, NPC_Koopa_03, LVar0, LVar2, 15) - EVT_CALL(SetNpcAnimation, NPC_Koopa_03, ANIM_KoopaWithoutShell_Idle) - EVT_CALL(GetNpcPos, NPC_Koopa_03, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 1) - EVT_ADD(LVar2, 1) - EVT_ADD(LVar1, 10) - EVT_CALL(NpcJump0, NPC_KoopaShell_03, LVar0, LVar1, LVar2, 10) - EVT_CALL(PlayerFaceNpc, NPC_Koopa_03, FALSE) - EVT_CALL(NpcFacePlayer, NPC_Koopa_03, 0) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Koopa_03, ANIM_KoopaWithoutShell_Still) - EVT_CALL(EnableNpcBlur, NPC_KoopaShell_03, TRUE) - EVT_CALL(GetNpcPos, NPC_Koopa_03, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 1) - EVT_ADD(LVar2, 1) - EVT_ADD(LVar1, 20) - EVT_SET(LVar3, NPC_KoopaShell_03) - EVT_SET(LVar4, NPC_Koopa_03) - EVT_EXEC(N(EVS_GetIntoShell)) - EVT_CALL(InterpNpcYaw, LVar3, 60, 0) - EVT_CALL(NpcJump0, NPC_KoopaShell_03, LVar0, LVar1, LVar2, 30) - EVT_CALL(SetNpcPos, NPC_KoopaShell_03, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcSprite, NPC_Koopa_03, ANIM_Koopa_Idle) - EVT_CALL(SetNpcFlagBits, NPC_Koopa_03, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Koopa_03, ANIM_Koopa_Still) - EVT_WAIT(4) - EVT_CALL(EnableNpcBlur, NPC_KoopaShell_03, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Koopa_03, ANIM_Koopa_Happy) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_Koopa_03, ANIM_Koopa_Idle) - EVT_CALL(SpeakToPlayer, NPC_Koopa_03, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_001A) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Wait(1) + IfEq(GF_NOK01_RecoveredTreeShell, TRUE) + Return + EndIf + Set(GF_NOK01_RecoveredTreeShell, TRUE) + Call(BindNpcAI, NPC_Koopa_03, Ref(N(EVS_DoNothing))) + Call(SetNpcAux, NPC_Koopa_03, Ref(N(EVS_DoNothing))) + Call(DisablePlayerInput, TRUE) + Wait(5) + Call(NpcJump0, NPC_KoopaShell_03, 220, 0, 210, 20) + Call(PlaySoundAtNpc, NPC_KoopaShell_03, SOUND_ITEM_BOUNCE, SOUND_SPACE_DEFAULT) + Call(PlayerFaceNpc, NPC_KoopaShell_03, FALSE) + Call(NpcFaceNpc, NPC_Koopa_03, NPC_KoopaShell_03, 0) + Call(SetNpcFlagBits, NPC_Koopa_03, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Add(LVar0, -1) + Add(LVar2, -1) + Call(GetNpcPos, NPC_Koopa_03, LVar0, LVar1, LVar2) + Call(SetNpcAnimation, NPC_Koopa_03, ANIM_KoopaWithoutShell_Happy) + Call(NpcJump0, NPC_Koopa_03, LVar0, 0, LVar2, 15) + Call(GetNpcPos, NPC_KoopaShell_03, LVar0, LVar1, LVar2) + Add(LVar0, 1) + Add(LVar2, 1) + Call(SetNpcAnimation, NPC_Koopa_03, ANIM_KoopaWithoutShell_Run) + Call(NpcMoveTo, NPC_Koopa_03, LVar0, LVar2, 15) + Call(SetNpcAnimation, NPC_Koopa_03, ANIM_KoopaWithoutShell_Idle) + Call(GetNpcPos, NPC_Koopa_03, LVar0, LVar1, LVar2) + Add(LVar0, 1) + Add(LVar2, 1) + Add(LVar1, 10) + Call(NpcJump0, NPC_KoopaShell_03, LVar0, LVar1, LVar2, 10) + Call(PlayerFaceNpc, NPC_Koopa_03, FALSE) + Call(NpcFacePlayer, NPC_Koopa_03, 0) + Wait(10) + Call(SetNpcAnimation, NPC_Koopa_03, ANIM_KoopaWithoutShell_Still) + Call(EnableNpcBlur, NPC_KoopaShell_03, TRUE) + Call(GetNpcPos, NPC_Koopa_03, LVar0, LVar1, LVar2) + Add(LVar0, 1) + Add(LVar2, 1) + Add(LVar1, 20) + Set(LVar3, NPC_KoopaShell_03) + Set(LVar4, NPC_Koopa_03) + Exec(N(EVS_GetIntoShell)) + Call(InterpNpcYaw, LVar3, 60, 0) + Call(NpcJump0, NPC_KoopaShell_03, LVar0, LVar1, LVar2, 30) + Call(SetNpcPos, NPC_KoopaShell_03, NPC_DISPOSE_LOCATION) + Call(SetNpcSprite, NPC_Koopa_03, ANIM_Koopa_Idle) + Call(SetNpcFlagBits, NPC_Koopa_03, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcAnimation, NPC_Koopa_03, ANIM_Koopa_Still) + Wait(4) + Call(EnableNpcBlur, NPC_KoopaShell_03, TRUE) + Call(SetNpcAnimation, NPC_Koopa_03, ANIM_Koopa_Happy) + Wait(30) + Call(SetNpcAnimation, NPC_Koopa_03, ANIM_Koopa_Idle) + Call(SpeakToPlayer, NPC_Koopa_03, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_001A) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_Koopa_03_Crisis) = { - EVT_IF_EQ(GF_NOK01_RecoveredTreeShell, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Koopa_03, ANIM_Koopa_Talk, ANIM_Koopa_Happy, 0, MSG_CH1_001B) - EVT_RETURN - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_Koopa_03, ANIM_KoopaWithoutShell_CryTalk, ANIM_KoopaWithoutShell_CryIdle, 0, MSG_CH1_0019) - EVT_RETURN - EVT_END + IfEq(GF_NOK01_RecoveredTreeShell, TRUE) + Call(SpeakToPlayer, NPC_Koopa_03, ANIM_Koopa_Talk, ANIM_Koopa_Happy, 0, MSG_CH1_001B) + Return + EndIf + Call(SpeakToPlayer, NPC_Koopa_03, ANIM_KoopaWithoutShell_CryTalk, ANIM_KoopaWithoutShell_CryIdle, 0, MSG_CH1_0019) + Return + End }; EvtScript N(EVS_NpcIdle_Koopa_03_Crisis) = { - EVT_IF_EQ(GF_NOK01_RecoveredTreeShell, TRUE) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_NpcAI_KoopaWithoutShell_Wander)) - EVT_RETURN - EVT_END + IfEq(GF_NOK01_RecoveredTreeShell, TRUE) + Return + EndIf + ExecWait(N(EVS_NpcAI_KoopaWithoutShell_Wander)) + Return + End }; EvtScript N(EVS_Scene_RecoverBlockShell) = { - EVT_IF_EQ(GF_NOK01_RecoveredBlockShell, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_NOK01_RecoveredBlockShell, TRUE) - EVT_CALL(BindNpcAI, NPC_Koopa_02, EVT_PTR(N(EVS_DoNothing))) - EVT_CALL(SetNpcAux, NPC_Koopa_02, EVT_PTR(N(EVS_DoNothing))) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(NpcJump0, NPC_KoopaShell_02, 60, 0, 328, 20) - EVT_CALL(PlaySound, SOUND_ITEM_BOUNCE) - EVT_CALL(PlayerFaceNpc, NPC_KoopaShell_02, FALSE) - EVT_CALL(NpcFaceNpc, NPC_Koopa_02, NPC_KoopaShell_02, 0) - EVT_CALL(SetNpcFlagBits, NPC_Koopa_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_ADD(LVar0, -1) - EVT_ADD(LVar2, -1) - EVT_CALL(GetNpcPos, NPC_Koopa_02, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcAnimation, NPC_Koopa_02, ANIM_KoopaWithoutShell_Happy) - EVT_CALL(NpcJump0, NPC_Koopa_02, LVar0, 0, LVar2, 15) - EVT_CALL(GetNpcPos, NPC_KoopaShell_02, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 1) - EVT_ADD(LVar2, 1) - EVT_CALL(SetNpcAnimation, NPC_Koopa_02, ANIM_KoopaWithoutShell_Run) - EVT_CALL(NpcMoveTo, NPC_Koopa_02, LVar0, LVar2, 15) - EVT_CALL(SetNpcAnimation, NPC_Koopa_02, ANIM_KoopaWithoutShell_Idle) - EVT_CALL(GetNpcPos, NPC_Koopa_02, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 1) - EVT_ADD(LVar2, 1) - EVT_ADD(LVar1, 10) - EVT_CALL(NpcJump0, NPC_KoopaShell_02, LVar0, LVar1, LVar2, 10) - EVT_CALL(PlayerFaceNpc, NPC_Koopa_02, FALSE) - EVT_CALL(NpcFacePlayer, NPC_Koopa_02, 0) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Koopa_02, ANIM_KoopaWithoutShell_Still) - EVT_CALL(EnableNpcBlur, NPC_KoopaShell_02, TRUE) - EVT_CALL(GetNpcPos, NPC_Koopa_02, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 1) - EVT_ADD(LVar2, 1) - EVT_ADD(LVar1, 20) - EVT_SET(LVar3, NPC_KoopaShell_02) - EVT_SET(LVar4, NPC_Koopa_02) - EVT_EXEC(N(EVS_GetIntoShell)) - EVT_CALL(InterpNpcYaw, LVar3, 60, 0) - EVT_CALL(NpcJump0, NPC_KoopaShell_02, LVar0, LVar1, LVar2, 30) - EVT_CALL(SetNpcPos, NPC_KoopaShell_02, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcSprite, NPC_Koopa_02, ANIM_Koopa_Idle) - EVT_CALL(SetNpcFlagBits, NPC_Koopa_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Koopa_02, ANIM_Koopa_Still) - EVT_WAIT(4) - EVT_CALL(EnableNpcBlur, NPC_KoopaShell_02, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Koopa_02, ANIM_Koopa_Happy) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_Koopa_02, ANIM_Koopa_Idle) - EVT_CALL(SpeakToPlayer, NPC_Koopa_02, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0012) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + IfEq(GF_NOK01_RecoveredBlockShell, TRUE) + Return + EndIf + Set(GF_NOK01_RecoveredBlockShell, TRUE) + Call(BindNpcAI, NPC_Koopa_02, Ref(N(EVS_DoNothing))) + Call(SetNpcAux, NPC_Koopa_02, Ref(N(EVS_DoNothing))) + Call(DisablePlayerInput, TRUE) + Call(NpcJump0, NPC_KoopaShell_02, 60, 0, 328, 20) + Call(PlaySound, SOUND_ITEM_BOUNCE) + Call(PlayerFaceNpc, NPC_KoopaShell_02, FALSE) + Call(NpcFaceNpc, NPC_Koopa_02, NPC_KoopaShell_02, 0) + Call(SetNpcFlagBits, NPC_Koopa_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Add(LVar0, -1) + Add(LVar2, -1) + Call(GetNpcPos, NPC_Koopa_02, LVar0, LVar1, LVar2) + Call(SetNpcAnimation, NPC_Koopa_02, ANIM_KoopaWithoutShell_Happy) + Call(NpcJump0, NPC_Koopa_02, LVar0, 0, LVar2, 15) + Call(GetNpcPos, NPC_KoopaShell_02, LVar0, LVar1, LVar2) + Add(LVar0, 1) + Add(LVar2, 1) + Call(SetNpcAnimation, NPC_Koopa_02, ANIM_KoopaWithoutShell_Run) + Call(NpcMoveTo, NPC_Koopa_02, LVar0, LVar2, 15) + Call(SetNpcAnimation, NPC_Koopa_02, ANIM_KoopaWithoutShell_Idle) + Call(GetNpcPos, NPC_Koopa_02, LVar0, LVar1, LVar2) + Add(LVar0, 1) + Add(LVar2, 1) + Add(LVar1, 10) + Call(NpcJump0, NPC_KoopaShell_02, LVar0, LVar1, LVar2, 10) + Call(PlayerFaceNpc, NPC_Koopa_02, FALSE) + Call(NpcFacePlayer, NPC_Koopa_02, 0) + Wait(10) + Call(SetNpcAnimation, NPC_Koopa_02, ANIM_KoopaWithoutShell_Still) + Call(EnableNpcBlur, NPC_KoopaShell_02, TRUE) + Call(GetNpcPos, NPC_Koopa_02, LVar0, LVar1, LVar2) + Add(LVar0, 1) + Add(LVar2, 1) + Add(LVar1, 20) + Set(LVar3, NPC_KoopaShell_02) + Set(LVar4, NPC_Koopa_02) + Exec(N(EVS_GetIntoShell)) + Call(InterpNpcYaw, LVar3, 60, 0) + Call(NpcJump0, NPC_KoopaShell_02, LVar0, LVar1, LVar2, 30) + Call(SetNpcPos, NPC_KoopaShell_02, NPC_DISPOSE_LOCATION) + Call(SetNpcSprite, NPC_Koopa_02, ANIM_Koopa_Idle) + Call(SetNpcFlagBits, NPC_Koopa_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcAnimation, NPC_Koopa_02, ANIM_Koopa_Still) + Wait(4) + Call(EnableNpcBlur, NPC_KoopaShell_02, TRUE) + Call(SetNpcAnimation, NPC_Koopa_02, ANIM_Koopa_Happy) + Wait(30) + Call(SetNpcAnimation, NPC_Koopa_02, ANIM_Koopa_Idle) + Call(SpeakToPlayer, NPC_Koopa_02, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0012) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_BreakBlock_DropShell) = { - EVT_EXEC(N(EVS_Scene_RecoverBlockShell)) - EVT_RETURN - EVT_END + Exec(N(EVS_Scene_RecoverBlockShell)) + Return + End }; EvtScript N(EVS_NpcInteract_Koopa_02_Crisis) = { - EVT_IF_EQ(GF_NOK01_RecoveredBlockShell, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Koopa_02, ANIM_Koopa_Idle, ANIM_Koopa_Happy, 0, MSG_CH1_0013) - EVT_RETURN - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_Koopa_02, ANIM_KoopaWithoutShell_CryTalk, ANIM_KoopaWithoutShell_CryIdle, 0, MSG_CH1_0011) - EVT_RETURN - EVT_END + IfEq(GF_NOK01_RecoveredBlockShell, TRUE) + Call(SpeakToPlayer, NPC_Koopa_02, ANIM_Koopa_Idle, ANIM_Koopa_Happy, 0, MSG_CH1_0013) + Return + EndIf + Call(SpeakToPlayer, NPC_Koopa_02, ANIM_KoopaWithoutShell_CryTalk, ANIM_KoopaWithoutShell_CryIdle, 0, MSG_CH1_0011) + Return + End }; EvtScript N(EVS_NpcIdle_Koopa_02_Crisis) = { - EVT_IF_EQ(GF_NOK01_RecoveredBlockShell, TRUE) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_NOK01_RecoveredBlockShell, TRUE) + Return + EndIf + Return + End }; EvtScript N(EVS_Scene_KooverGetsMugged) = { - EVT_CALL(GetNpcPos, NPC_Koover, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 1) - EVT_ADD(LVar2, 1) - EVT_ADD(LVar1, 200) - EVT_CALL(SetNpcPos, NPC_FuzzyWithShell, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, -200) - EVT_CALL(NpcJump0, NPC_FuzzyWithShell, LVar0, LVar1, LVar2, 20) - EVT_PLAY_EFFECT(EFFECT_DAMAGE_STARS, FX_DAMAGE_STARS_3, LVar0, LVar1, LVar2, 0, -1, 0, 3) - EVT_THREAD - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 4) - EVT_WAIT(60) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 1) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Shocked) - EVT_WAIT(30) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_FuzzyWithShell, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcSprite, NPC_Koover, ANIM_KoopaWithoutShell_Idle) - EVT_CALL(SetNpcAnimation, NPC_Koover, ANIM_KoopaWithoutShell_Toppled) - EVT_CALL(GetNpcPos, NPC_Koover, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -20) - EVT_ADD(LVar2, -10) - EVT_CALL(NpcJump0, NPC_Koover, LVar0, LVar1, LVar2, 15) - EVT_CALL(GetNpcPos, NPC_FuzzyWithShell, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 1) - EVT_ADD(LVar2, 1) - EVT_CALL(SetNpcPos, NPC_KooversShell, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -1) - EVT_ADD(LVar2, -1) - EVT_WAIT(10) - EVT_ADD(LVar0, 50) - EVT_ADD(LVar2, -20) - EVT_THREAD - EVT_ADD(LVar0, 1) - EVT_ADD(LVar2, 1) - EVT_CALL(NpcJump0, NPC_KooversShell, LVar0, 0, LVar2, 20) - EVT_END_THREAD - EVT_WAIT(1) - EVT_CALL(SetNpcAnimation, NPC_FuzzyWithShell, ANIM_Fuzzy_Idle) - EVT_CALL(PlaySoundAtNpc, NPC_FuzzyWithShell, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_FuzzyWithShell, LVar0, 0, LVar2, 20) - EVT_CALL(SetNpcAnimation, NPC_Koover, ANIM_KoopaWithoutShell_Idle) - EVT_CALL(SetNpcAnimation, NPC_FuzzyWithShell, ANIM_Fuzzy_Anim0C) - EVT_THREAD - EVT_ADD(LVar0, 1) - EVT_ADD(LVar2, 1) - EVT_CALL(NpcJump0, NPC_KooversShell, LVar0, 0, LVar2, 20) - EVT_END_THREAD - EVT_WAIT(1) - EVT_CALL(PlaySoundAtNpc, NPC_FuzzyWithShell, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_FuzzyWithShell, LVar0, 0, LVar2, 20) - EVT_CALL(NpcFaceNpc, NPC_Koover, NPC_FuzzyWithShell, 0) - EVT_CALL(SetNpcAnimation, NPC_Koover, ANIM_KoopaWithoutShell_CryIdle) - EVT_THREAD - EVT_ADD(LVar0, 1) - EVT_ADD(LVar2, 1) - EVT_CALL(NpcJump0, NPC_KooversShell, LVar0, 0, LVar2, 20) - EVT_END_THREAD - EVT_WAIT(1) - EVT_CALL(PlaySoundAtNpc, NPC_FuzzyWithShell, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_FuzzyWithShell, LVar0, 0, LVar2, 20) - EVT_CALL(SetNpcAnimation, NPC_FuzzyWithShell, ANIM_Fuzzy_Idle) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_Koover, LVar0, LVar1, LVar2) + Add(LVar0, 1) + Add(LVar2, 1) + Add(LVar1, 200) + Call(SetNpcPos, NPC_FuzzyWithShell, LVar0, LVar1, LVar2) + Add(LVar1, -200) + Call(NpcJump0, NPC_FuzzyWithShell, LVar0, LVar1, LVar2, 20) + PlayEffect(EFFECT_DAMAGE_STARS, FX_DAMAGE_STARS_3, LVar0, LVar1, LVar2, 0, -1, 0, 3) + Thread + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, 4) + Wait(60) + Call(SetCamSpeed, CAM_DEFAULT, 1) + EndThread + Thread + Call(SetPlayerAnimation, ANIM_MarioW2_Shocked) + Wait(30) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndThread + Call(PlaySoundAtNpc, NPC_FuzzyWithShell, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) + Call(SetNpcSprite, NPC_Koover, ANIM_KoopaWithoutShell_Idle) + Call(SetNpcAnimation, NPC_Koover, ANIM_KoopaWithoutShell_Toppled) + Call(GetNpcPos, NPC_Koover, LVar0, LVar1, LVar2) + Add(LVar0, -20) + Add(LVar2, -10) + Call(NpcJump0, NPC_Koover, LVar0, LVar1, LVar2, 15) + Call(GetNpcPos, NPC_FuzzyWithShell, LVar0, LVar1, LVar2) + Add(LVar0, 1) + Add(LVar2, 1) + Call(SetNpcPos, NPC_KooversShell, LVar0, LVar1, LVar2) + Add(LVar0, -1) + Add(LVar2, -1) + Wait(10) + Add(LVar0, 50) + Add(LVar2, -20) + Thread + Add(LVar0, 1) + Add(LVar2, 1) + Call(NpcJump0, NPC_KooversShell, LVar0, 0, LVar2, 20) + EndThread + Wait(1) + Call(SetNpcAnimation, NPC_FuzzyWithShell, ANIM_Fuzzy_Idle) + Call(PlaySoundAtNpc, NPC_FuzzyWithShell, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_FuzzyWithShell, LVar0, 0, LVar2, 20) + Call(SetNpcAnimation, NPC_Koover, ANIM_KoopaWithoutShell_Idle) + Call(SetNpcAnimation, NPC_FuzzyWithShell, ANIM_Fuzzy_Anim0C) + Thread + Add(LVar0, 1) + Add(LVar2, 1) + Call(NpcJump0, NPC_KooversShell, LVar0, 0, LVar2, 20) + EndThread + Wait(1) + Call(PlaySoundAtNpc, NPC_FuzzyWithShell, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_FuzzyWithShell, LVar0, 0, LVar2, 20) + Call(NpcFaceNpc, NPC_Koover, NPC_FuzzyWithShell, 0) + Call(SetNpcAnimation, NPC_Koover, ANIM_KoopaWithoutShell_CryIdle) + Thread + Add(LVar0, 1) + Add(LVar2, 1) + Call(NpcJump0, NPC_KooversShell, LVar0, 0, LVar2, 20) + EndThread + Wait(1) + Call(PlaySoundAtNpc, NPC_FuzzyWithShell, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_FuzzyWithShell, LVar0, 0, LVar2, 20) + Call(SetNpcAnimation, NPC_FuzzyWithShell, ANIM_Fuzzy_Idle) + Return + End }; EvtScript N(EVS_NpcInteract_Koover_Crisis) = { - EVT_IF_EQ(GF_NOK01_RecoveredShellA, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Koover, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0003) - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH1_ARRIVED_AT_KOOPA_VILLAGE) - EVT_RETURN - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_Koover, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0000) - EVT_CALL(InterpPlayerYaw, 227, 5) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Thinking) - EVT_CALL(EndSpeech, NPC_Koover, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0) - EVT_CALL(InterpPlayerYaw, 47, 5) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(EndSpeech, NPC_Koover, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_WAIT(15) - EVT_CALL(EndSpeech, NPC_Koover, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0) - EVT_EXEC_WAIT(N(EVS_Scene_KooverGetsMugged)) - EVT_CALL(SpeakToNpc, NPC_Koover, ANIM_KoopaWithoutShell_CryTalk, ANIM_KoopaWithoutShell_CryIdle, 0, NPC_FuzzyWithShell, MSG_CH1_0001) - EVT_SET(GB_StoryProgress, STORY_CH1_ARRIVED_AT_KOOPA_VILLAGE) - EVT_RETURN - EVT_END + IfEq(GF_NOK01_RecoveredShellA, TRUE) + Call(SpeakToPlayer, NPC_Koover, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0003) + EndIf + IfGe(GB_StoryProgress, STORY_CH1_ARRIVED_AT_KOOPA_VILLAGE) + Return + EndIf + Call(SpeakToPlayer, NPC_Koover, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0000) + Call(InterpPlayerYaw, 227, 5) + Call(SetPlayerAnimation, ANIM_Mario1_Thinking) + Call(EndSpeech, NPC_Koover, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0) + Call(InterpPlayerYaw, 47, 5) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(EndSpeech, NPC_Koover, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + Wait(15) + Call(EndSpeech, NPC_Koover, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0) + ExecWait(N(EVS_Scene_KooverGetsMugged)) + Call(SpeakToNpc, NPC_Koover, ANIM_KoopaWithoutShell_CryTalk, ANIM_KoopaWithoutShell_CryIdle, 0, NPC_FuzzyWithShell, MSG_CH1_0001) + Set(GB_StoryProgress, STORY_CH1_ARRIVED_AT_KOOPA_VILLAGE) + Return + End }; EvtScript N(EVS_NpcIdle_Koover_Crisis) = { - EVT_IF_EQ(GF_NOK01_RecoveredShellA, TRUE) - EVT_CALL(SetNpcPos, NPC_FuzzyWithShell, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH1_ARRIVED_AT_KOOPA_VILLAGE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetPlayerPos, -386, 0, 399) - EVT_CALL(PlayerMoveTo, -308, 326, 30) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(NpcFacePlayer, NPC_Koover, 5) - EVT_WAIT(5) - EVT_CALL(GetNpcPos, NPC_Koover, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_ADD(LVar1, 35) - EVT_CALL(PlaySoundAtNpc, NPC_Koover, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_Koover, EMOTE_EXCLAMATION, 0, 20, EMOTER_POS, LVar0, LVar1, LVar2, 0) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_Koover, ANIM_Koopa_Run) - EVT_CALL(GetPlayerPos, LVarA, LVarB, LVarC) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVarA, LVarB, LVarC) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVarA, LVarB, LVarC) - EVT_CALL(GetCamDistance, CAM_DEFAULT, LVarA) - EVT_MULF(LVarA, EVT_FLOAT(0.7)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, LVarA) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 4) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(NpcMoveTo, NPC_Koover, -280, 301, 30) - EVT_CALL(SetNpcAnimation, NPC_Koover, ANIM_Koopa_Idle) - EVT_WAIT(7) - EVT_EXEC_WAIT(N(EVS_NpcInteract_Koover_Crisis)) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ELSE - EVT_WAIT(5) - EVT_CALL(GetNpcPos, NPC_FuzzyWithShell, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 40) - EVT_CALL(SetNpcPos, NPC_Koover, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_CALL(BindNpcInteract, NPC_Koover, 0) - EVT_CALL(SetNpcFlagBits, NPC_Koover, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_SET(LVar0, 0) - EVT_LABEL(0) - EVT_IF_EQ(GF_NOK01_RecoveredShellA, TRUE) - EVT_CALL(BindNpcInteract, NPC_Koover, EVT_PTR(N(EVS_NpcInteract_Koover_Crisis))) - EVT_CALL(SetNpcFlagBits, NPC_Koover, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetNpcPos, NPC_FuzzyWithShell, LVar0, LVar1, LVar2) - EVT_CALL(NpcFaceNpc, NPC_Koover, NPC_FuzzyWithShell, 0) - EVT_CALL(SetNpcAnimation, NPC_Koover, ANIM_KoopaWithoutShell_CryRun) - EVT_CALL(NpcMoveTo, NPC_Koover, LVar0, LVar2, 17) - EVT_CALL(SetNpcAnimation, NPC_Koover, ANIM_KoopaWithoutShell_CryIdle) - EVT_LABEL(1) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + IfEq(GF_NOK01_RecoveredShellA, TRUE) + Call(SetNpcPos, NPC_FuzzyWithShell, NPC_DISPOSE_LOCATION) + Return + EndIf + IfLt(GB_StoryProgress, STORY_CH1_ARRIVED_AT_KOOPA_VILLAGE) + Call(DisablePlayerInput, TRUE) + Call(SetPlayerPos, -386, 0, 399) + Call(PlayerMoveTo, -308, 326, 30) + Call(DisablePlayerPhysics, TRUE) + Call(NpcFacePlayer, NPC_Koover, 5) + Wait(5) + Call(GetNpcPos, NPC_Koover, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + Add(LVar1, 35) + Call(PlaySoundAtNpc, NPC_Koover, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_Koover, EMOTE_EXCLAMATION, 0, 20, EMOTER_POS, LVar0, LVar1, LVar2, 0) + Wait(20) + Call(SetNpcAnimation, NPC_Koover, ANIM_Koopa_Run) + Call(GetPlayerPos, LVarA, LVarB, LVarC) + Call(UseSettingsFrom, CAM_DEFAULT, LVarA, LVarB, LVarC) + Call(SetPanTarget, CAM_DEFAULT, LVarA, LVarB, LVarC) + Call(GetCamDistance, CAM_DEFAULT, LVarA) + MulF(LVarA, Float(0.7)) + Call(SetCamDistance, CAM_DEFAULT, LVarA) + Call(SetCamSpeed, CAM_DEFAULT, 4) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(NpcMoveTo, NPC_Koover, -280, 301, 30) + Call(SetNpcAnimation, NPC_Koover, ANIM_Koopa_Idle) + Wait(7) + ExecWait(N(EVS_NpcInteract_Koover_Crisis)) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Else + Wait(5) + Call(GetNpcPos, NPC_FuzzyWithShell, LVar0, LVar1, LVar2) + Sub(LVar0, 40) + Call(SetNpcPos, NPC_Koover, LVar0, LVar1, LVar2) + EndIf + Call(BindNpcInteract, NPC_Koover, 0) + Call(SetNpcFlagBits, NPC_Koover, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Set(LVar0, 0) + Label(0) + IfEq(GF_NOK01_RecoveredShellA, TRUE) + Call(BindNpcInteract, NPC_Koover, Ref(N(EVS_NpcInteract_Koover_Crisis))) + Call(SetNpcFlagBits, NPC_Koover, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Return + EndIf + Call(GetNpcPos, NPC_FuzzyWithShell, LVar0, LVar1, LVar2) + Call(NpcFaceNpc, NPC_Koover, NPC_FuzzyWithShell, 0) + Call(SetNpcAnimation, NPC_Koover, ANIM_KoopaWithoutShell_CryRun) + Call(NpcMoveTo, NPC_Koover, LVar0, LVar2, 17) + Call(SetNpcAnimation, NPC_Koover, ANIM_KoopaWithoutShell_CryIdle) + Label(1) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_NpcIdle_FuzzyWithShell) = { - EVT_SET_GROUP(EVT_GROUP_0A) - EVT_IF_EQ(GF_NOK01_RecoveredShellA, TRUE) - EVT_CALL(SetNpcPos, NPC_FuzzyWithShell, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_KooversShell, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END_IF - EVT_SET(LVarA, -208) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 282) - EVT_LABEL(10) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_ARRIVED_AT_KOOPA_VILLAGE) - EVT_CALL(GetNpcPos, NPC_FuzzyWithShell, LVarA, LVarB, LVarC) - EVT_ADD(LVarA, 20) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_SET(LVar0, 162) - EVT_LABEL(0) - EVT_IF_EQ(GF_NOK01_RecoveredShellA, TRUE) - EVT_CALL(SetNpcPos, NPC_FuzzyWithShell, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(CosInterpMinMax), LVar0, LVar1, -50, 50, 120, 0, 180) - EVT_CALL(N(CosInterpMinMax), LVar0, LVar2, -32, 32, 120, 0, 30) - EVT_ADD(LVar1, LVarA) - EVT_ADD(LVar2, LVarC) - EVT_CALL(SetNpcAnimation, NPC_FuzzyWithShell, ANIM_Fuzzy_Run) - EVT_CALL(SetNpcPos, NPC_FuzzyWithShell, LVar1, LVarB, LVar2) - EVT_SET(LVar3, LVarB) - EVT_ADD(LVar3, 2) - EVT_ADD(LVar0, 2) - EVT_ADD(LVar2, 1) - EVT_IF_EQ(LVar0, 240) - EVT_SET(LVar0, 0) - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_KooversShell, LVar1, LVar3, LVar2) - EVT_LABEL(1) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0A) + IfEq(GF_NOK01_RecoveredShellA, TRUE) + Call(SetNpcPos, NPC_FuzzyWithShell, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_KooversShell, NPC_DISPOSE_LOCATION) + Return + EndIf + Set(LVarA, -208) + Set(LVarB, 0) + Set(LVarC, 282) + Label(10) + IfLt(GB_StoryProgress, STORY_CH1_ARRIVED_AT_KOOPA_VILLAGE) + Call(GetNpcPos, NPC_FuzzyWithShell, LVarA, LVarB, LVarC) + Add(LVarA, 20) + Wait(1) + Goto(10) + EndIf + Set(LVar0, 162) + Label(0) + IfEq(GF_NOK01_RecoveredShellA, TRUE) + Call(SetNpcPos, NPC_FuzzyWithShell, NPC_DISPOSE_LOCATION) + Return + EndIf + Call(N(CosInterpMinMax), LVar0, LVar1, -50, 50, 120, 0, 180) + Call(N(CosInterpMinMax), LVar0, LVar2, -32, 32, 120, 0, 30) + Add(LVar1, LVarA) + Add(LVar2, LVarC) + Call(SetNpcAnimation, NPC_FuzzyWithShell, ANIM_Fuzzy_Run) + Call(SetNpcPos, NPC_FuzzyWithShell, LVar1, LVarB, LVar2) + Set(LVar3, LVarB) + Add(LVar3, 2) + Add(LVar0, 2) + Add(LVar2, 1) + IfEq(LVar0, 240) + Set(LVar0, 0) + EndIf + Call(SetNpcPos, NPC_KooversShell, LVar1, LVar3, LVar2) + Label(1) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_NpcHit_FuzzyWithShell) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SET(LVar1, 0) - EVT_IF_EQ(LVar0, ENCOUNTER_TRIGGER_HAMMER) - EVT_ADD(LVar1, 1) - EVT_END_IF - EVT_IF_EQ(LVar0, ENCOUNTER_TRIGGER_JUMP) - EVT_ADD(LVar1, 1) - EVT_END_IF - EVT_IF_NE(LVar1, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(GF_NOK01_RecoveredShellA, TRUE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_DISABLE_AI, 1) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_KooversShell, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcAnimation, NPC_FuzzyWithShell, ANIM_Fuzzy_Hurt) - EVT_CALL(PlaySoundAtNpc, NPC_FuzzyWithShell, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_FuzzyWithShell, LVar0, 0, LVar2, 25) - EVT_ADD(LVar0, 40) - EVT_ADD(LVar2, -40) - EVT_CALL(SetNpcAnimation, NPC_FuzzyWithShell, ANIM_Fuzzy_Hurt) - EVT_CALL(PlaySoundAtNpc, NPC_FuzzyWithShell, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_FuzzyWithShell, LVar0, 0, LVar2, 15) - EVT_ADD(LVar0, 30) - EVT_ADD(LVar2, -30) - EVT_CALL(SetNpcAnimation, NPC_FuzzyWithShell, ANIM_Fuzzy_Anim09) - EVT_CALL(PlaySoundAtNpc, NPC_FuzzyWithShell, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_FuzzyWithShell, LVar0, 0, LVar2, 13) - EVT_ADD(LVar0, 20) - EVT_ADD(LVar2, -20) - EVT_CALL(PlaySoundAtNpc, NPC_FuzzyWithShell, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_FuzzyWithShell, LVar0, 0, LVar2, 11) - EVT_ADD(LVar0, 10) - EVT_ADD(LVar2, -10) - EVT_CALL(PlaySoundAtNpc, NPC_FuzzyWithShell, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_FuzzyWithShell, LVar0, 0, LVar2, 9) - EVT_ADD(LVar0, 80) - EVT_ADD(LVar2, -80) - EVT_CALL(SetNpcAnimation, NPC_FuzzyWithShell, ANIM_Fuzzy_Run) - EVT_CALL(PlaySoundAtNpc, NPC_FuzzyWithShell, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_FuzzyWithShell, LVar0, 0, LVar2, 15) - EVT_CALL(SetNpcPos, NPC_FuzzyWithShell, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_CALL(GetNpcPos, NPC_KooversShell, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_KooversShell, LVar0, 0, LVar2, 15) - EVT_LOOP(70) - EVT_CALL(PlayerFaceNpc, NPC_FuzzyWithShell, FALSE) - EVT_CALL(NpcFaceNpc, NPC_Koover, NPC_FuzzyWithShell, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlayerFaceNpc, NPC_KooversShell, FALSE) - EVT_CALL(NpcFaceNpc, NPC_Koover, NPC_KooversShell, 0) - EVT_THREAD - EVT_CALL(AdjustCam, CAM_DEFAULT, 4, 0, EVT_FLOAT(-300.0), EVT_FLOAT(17.0), EVT_FLOAT(-7.0)) - EVT_END_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Koover, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(GetNpcPos, NPC_Koover, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcAnimation, NPC_Koover, ANIM_KoopaWithoutShell_Happy) - EVT_CALL(NpcJump0, NPC_Koover, LVar0, 0, LVar2, 15) - EVT_CALL(GetNpcPos, NPC_KooversShell, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 1) - EVT_ADD(LVar2, 1) - EVT_CALL(SetNpcAnimation, NPC_Koover, ANIM_KoopaWithoutShell_Run) - EVT_CALL(NpcMoveTo, NPC_Koover, LVar0, LVar2, 15) - EVT_CALL(SetNpcAnimation, NPC_Koover, ANIM_KoopaWithoutShell_Idle) - EVT_CALL(GetNpcPos, NPC_Koover, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 1) - EVT_ADD(LVar2, 1) - EVT_ADD(LVar1, 10) - EVT_CALL(NpcJump0, NPC_KooversShell, LVar0, LVar1, LVar2, 10) - EVT_CALL(PlayerFaceNpc, NPC_Koover, FALSE) - EVT_CALL(NpcFacePlayer, NPC_Koover, 0) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Koover, ANIM_KoopaWithoutShell_Still) - EVT_CALL(EnableNpcBlur, NPC_KooversShell, TRUE) - EVT_CALL(GetNpcPos, NPC_Koover, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 1) - EVT_ADD(LVar2, 1) - EVT_ADD(LVar1, 20) - EVT_SET(LVar3, NPC_KooversShell) - EVT_SET(LVar4, NPC_Koover) - EVT_EXEC(N(EVS_GetIntoShell)) - EVT_CALL(InterpNpcYaw, LVar3, 60, 0) - EVT_CALL(NpcJump0, NPC_KooversShell, LVar0, LVar1, LVar2, 30) - EVT_CALL(SetNpcPos, NPC_KooversShell, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcSprite, NPC_Koover, ANIM_Koopa_Idle) - EVT_CALL(SetNpcFlagBits, NPC_Koover, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Koover, ANIM_Koopa_Still) - EVT_WAIT(4) - EVT_CALL(EnableNpcBlur, NPC_KooversShell, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Koover, ANIM_Koopa_Idle) - EVT_CALL(SetNpcAnimation, NPC_Koover, ANIM_Koopa_Happy) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_Koover, ANIM_Koopa_Idle) - EVT_CALL(SpeakToPlayer, NPC_Koover, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0002) - EVT_THREAD - EVT_CALL(ResetCam, CAM_DEFAULT, 4) - EVT_END_THREAD - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetEnemyFlagBits, NPC_Koover, ENEMY_FLAG_400000, 0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Set(LVar1, 0) + IfEq(LVar0, ENCOUNTER_TRIGGER_HAMMER) + Add(LVar1, 1) + EndIf + IfEq(LVar0, ENCOUNTER_TRIGGER_JUMP) + Add(LVar1, 1) + EndIf + IfNe(LVar1, 0) + Call(DisablePlayerInput, TRUE) + Set(GF_NOK01_RecoveredShellA, TRUE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_DISABLE_AI, 1) + Thread + Call(GetNpcPos, NPC_KooversShell, LVar0, LVar1, LVar2) + Call(SetNpcAnimation, NPC_FuzzyWithShell, ANIM_Fuzzy_Hurt) + Call(PlaySoundAtNpc, NPC_FuzzyWithShell, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_FuzzyWithShell, LVar0, 0, LVar2, 25) + Add(LVar0, 40) + Add(LVar2, -40) + Call(SetNpcAnimation, NPC_FuzzyWithShell, ANIM_Fuzzy_Hurt) + Call(PlaySoundAtNpc, NPC_FuzzyWithShell, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_FuzzyWithShell, LVar0, 0, LVar2, 15) + Add(LVar0, 30) + Add(LVar2, -30) + Call(SetNpcAnimation, NPC_FuzzyWithShell, ANIM_Fuzzy_Anim09) + Call(PlaySoundAtNpc, NPC_FuzzyWithShell, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_FuzzyWithShell, LVar0, 0, LVar2, 13) + Add(LVar0, 20) + Add(LVar2, -20) + Call(PlaySoundAtNpc, NPC_FuzzyWithShell, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_FuzzyWithShell, LVar0, 0, LVar2, 11) + Add(LVar0, 10) + Add(LVar2, -10) + Call(PlaySoundAtNpc, NPC_FuzzyWithShell, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_FuzzyWithShell, LVar0, 0, LVar2, 9) + Add(LVar0, 80) + Add(LVar2, -80) + Call(SetNpcAnimation, NPC_FuzzyWithShell, ANIM_Fuzzy_Run) + Call(PlaySoundAtNpc, NPC_FuzzyWithShell, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_FuzzyWithShell, LVar0, 0, LVar2, 15) + Call(SetNpcPos, NPC_FuzzyWithShell, NPC_DISPOSE_LOCATION) + EndThread + Call(GetNpcPos, NPC_KooversShell, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_KooversShell, LVar0, 0, LVar2, 15) + Loop(70) + Call(PlayerFaceNpc, NPC_FuzzyWithShell, FALSE) + Call(NpcFaceNpc, NPC_Koover, NPC_FuzzyWithShell, 0) + Wait(1) + EndLoop + Call(PlayerFaceNpc, NPC_KooversShell, FALSE) + Call(NpcFaceNpc, NPC_Koover, NPC_KooversShell, 0) + Thread + Call(AdjustCam, CAM_DEFAULT, 4, 0, Float(-300.0), Float(17.0), Float(-7.0)) + EndThread + Call(SetNpcFlagBits, NPC_Koover, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(GetNpcPos, NPC_Koover, LVar0, LVar1, LVar2) + Call(SetNpcAnimation, NPC_Koover, ANIM_KoopaWithoutShell_Happy) + Call(NpcJump0, NPC_Koover, LVar0, 0, LVar2, 15) + Call(GetNpcPos, NPC_KooversShell, LVar0, LVar1, LVar2) + Add(LVar0, 1) + Add(LVar2, 1) + Call(SetNpcAnimation, NPC_Koover, ANIM_KoopaWithoutShell_Run) + Call(NpcMoveTo, NPC_Koover, LVar0, LVar2, 15) + Call(SetNpcAnimation, NPC_Koover, ANIM_KoopaWithoutShell_Idle) + Call(GetNpcPos, NPC_Koover, LVar0, LVar1, LVar2) + Add(LVar0, 1) + Add(LVar2, 1) + Add(LVar1, 10) + Call(NpcJump0, NPC_KooversShell, LVar0, LVar1, LVar2, 10) + Call(PlayerFaceNpc, NPC_Koover, FALSE) + Call(NpcFacePlayer, NPC_Koover, 0) + Wait(10) + Call(SetNpcAnimation, NPC_Koover, ANIM_KoopaWithoutShell_Still) + Call(EnableNpcBlur, NPC_KooversShell, TRUE) + Call(GetNpcPos, NPC_Koover, LVar0, LVar1, LVar2) + Add(LVar0, 1) + Add(LVar2, 1) + Add(LVar1, 20) + Set(LVar3, NPC_KooversShell) + Set(LVar4, NPC_Koover) + Exec(N(EVS_GetIntoShell)) + Call(InterpNpcYaw, LVar3, 60, 0) + Call(NpcJump0, NPC_KooversShell, LVar0, LVar1, LVar2, 30) + Call(SetNpcPos, NPC_KooversShell, NPC_DISPOSE_LOCATION) + Call(SetNpcSprite, NPC_Koover, ANIM_Koopa_Idle) + Call(SetNpcFlagBits, NPC_Koover, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcAnimation, NPC_Koover, ANIM_Koopa_Still) + Wait(4) + Call(EnableNpcBlur, NPC_KooversShell, TRUE) + Call(SetNpcAnimation, NPC_Koover, ANIM_Koopa_Idle) + Call(SetNpcAnimation, NPC_Koover, ANIM_Koopa_Happy) + Wait(30) + Call(SetNpcAnimation, NPC_Koover, ANIM_Koopa_Idle) + Call(SpeakToPlayer, NPC_Koover, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0002) + Thread + Call(ResetCam, CAM_DEFAULT, 4) + EndThread + Call(DisablePlayerInput, FALSE) + Call(SetEnemyFlagBits, NPC_Koover, ENEMY_FLAG_400000, 0) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Bobomb_01_Crisis) = { - EVT_IF_EQ(AF_NOK01_Dialogue_Bobomb_01_Crisis, FALSE) - EVT_SET(AF_NOK01_Dialogue_Bobomb_01_Crisis, TRUE) - EVT_SET(LVar0, MSG_CH1_003D) - EVT_ELSE - EVT_SET(AF_NOK01_Dialogue_Bobomb_01_Crisis, FALSE) - EVT_SET(LVar0, MSG_CH1_003E) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, LVar0) - EVT_RETURN - EVT_END + IfEq(AF_NOK01_Dialogue_Bobomb_01_Crisis, FALSE) + Set(AF_NOK01_Dialogue_Bobomb_01_Crisis, TRUE) + Set(LVar0, MSG_CH1_003D) + Else + Set(AF_NOK01_Dialogue_Bobomb_01_Crisis, FALSE) + Set(LVar0, MSG_CH1_003E) + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_Bobomb_01_Crisis) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bobomb_01_Crisis))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bobomb_01_Crisis))) + Return + End }; EvtScript N(EVS_NpcInteract_Bobomb_02_Crisis) = { - EVT_IF_EQ(AF_NOK01_Dialogue_Bobomb_02, FALSE) - EVT_SET(AF_NOK01_Dialogue_Bobomb_02, TRUE) - EVT_SET(LVar0, MSG_CH1_0044) - EVT_ELSE - EVT_SET(AF_NOK01_Dialogue_Bobomb_02, FALSE) - EVT_SET(LVar0, MSG_CH1_0045) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, LVar0) - EVT_RETURN - EVT_END + IfEq(AF_NOK01_Dialogue_Bobomb_02, FALSE) + Set(AF_NOK01_Dialogue_Bobomb_02, TRUE) + Set(LVar0, MSG_CH1_0044) + Else + Set(AF_NOK01_Dialogue_Bobomb_02, FALSE) + Set(LVar0, MSG_CH1_0045) + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_Bobomb_02_Crisis) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bobomb_02_Crisis))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bobomb_02_Crisis))) + Return + End }; EvtScript N(EVS_NpcInit_Koover_Crisis) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Koover_Crisis))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Koover_Crisis))) - EVT_IF_EQ(GF_NOK01_RecoveredShellA, TRUE) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_400000, 0) - EVT_RETURN - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH1_ARRIVED_AT_KOOPA_VILLAGE) - EVT_CALL(SetNpcSprite, NPC_SELF, ANIM_KoopaWithoutShell_Idle) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Koover_Crisis))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Koover_Crisis))) + IfEq(GF_NOK01_RecoveredShellA, TRUE) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_400000, 0) + Return + EndIf + IfGe(GB_StoryProgress, STORY_CH1_ARRIVED_AT_KOOPA_VILLAGE) + Call(SetNpcSprite, NPC_SELF, ANIM_KoopaWithoutShell_Idle) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_FuzzyWithShell) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_FuzzyWithShell))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_FuzzyWithShell))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_FuzzyWithShell))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_FuzzyWithShell))) + Return + End }; EvtScript N(EVS_NpcInit_MiscFuzzy1) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MiscFuzzy1))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_MiscFuzzy1))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_MiscFuzzy1))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_MiscFuzzy1))) + Return + End }; EvtScript N(EVS_NpcInit_MiscFuzzy2) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MiscFuzzy2))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_MiscFuzzy2))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_MiscFuzzy2))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_MiscFuzzy2))) + Return + End }; EvtScript N(EVS_NpcInit_KooversShell) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Koopa_Shell) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Koopa_Shell) + Return + End }; EvtScript N(EVS_NpcInit_Koopa_02_Crisis) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Koopa_02_Crisis))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Koopa_02_Crisis))) - EVT_CALL(SetNpcPos, NPC_Koopa_02, 40, 0, 325) - EVT_CALL(InterpNpcYaw, NPC_Koopa_02, 180, 0) - EVT_IF_EQ(GF_NOK01_RecoveredBlockShell, FALSE) - EVT_CALL(SetNpcPos, NPC_KoopaShell_02, 22, 85, 375) - EVT_CALL(SetNpcAnimation, NPC_Koopa_02, ANIM_KoopaWithoutShell_CryRun) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetNpcSprite, NPC_Koopa_02, ANIM_Koopa_Idle) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Koopa_02_Crisis))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Koopa_02_Crisis))) + Call(SetNpcPos, NPC_Koopa_02, 40, 0, 325) + Call(InterpNpcYaw, NPC_Koopa_02, 180, 0) + IfEq(GF_NOK01_RecoveredBlockShell, FALSE) + Call(SetNpcPos, NPC_KoopaShell_02, 22, 85, 375) + Call(SetNpcAnimation, NPC_Koopa_02, ANIM_KoopaWithoutShell_CryRun) + Return + EndIf + Call(SetNpcSprite, NPC_Koopa_02, ANIM_Koopa_Idle) + Return + End }; EvtScript N(EVS_NpcInit_KoopaShell_02) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Koopa_Shell) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Koopa_Shell) + Return + End }; EvtScript N(EVS_NpcInit_Koopa_03_Crisis) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Koopa_03_Crisis))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Koopa_03_Crisis))) - EVT_IF_EQ(GF_NOK01_RecoveredTreeShell, FALSE) - EVT_CALL(SetNpcPos, NPC_KoopaShell_03, 190, 114, 220) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetNpcSprite, NPC_Koopa_03, ANIM_Koopa_Idle) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Koopa_03_Crisis))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Koopa_03_Crisis))) + IfEq(GF_NOK01_RecoveredTreeShell, FALSE) + Call(SetNpcPos, NPC_KoopaShell_03, 190, 114, 220) + Return + EndIf + Call(SetNpcSprite, NPC_Koopa_03, ANIM_Koopa_Idle) + Return + End }; EvtScript N(EVS_NpcInit_KoopaShell_03) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Koopa_Shell) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Koopa_Shell) + Return + End }; diff --git a/src/world/area_nok/nok_01/npcs_normal.inc.c b/src/world/area_nok/nok_01/npcs_normal.inc.c index 28f1e0dead8..a8416d90c8a 100644 --- a/src/world/area_nok/nok_01/npcs_normal.inc.c +++ b/src/world/area_nok/nok_01/npcs_normal.inc.c @@ -1,273 +1,273 @@ EvtScript N(EVS_NpcInteract_Koover_Normal) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH1_KOOPER_JOINED_PARTY) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0003) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0004) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0005) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0006) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_NOK11_Defeated_KentC, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0007) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0008) - EVT_END_IF - EVT_CASE_GE(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0008) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_LetterPrompt_Koover1)) - EVT_IF_NE(LVarC, DELIVERY_NOT_POSSIBLE) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_LetterPrompt_Koover2)) - EVT_IF_NE(LVarC, DELIVERY_NOT_POSSIBLE) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH1_KOOPER_JOINED_PARTY) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0003) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0004) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0005) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0006) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + IfEq(GF_NOK11_Defeated_KentC, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0007) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0008) + EndIf + CaseGe(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0008) + EndSwitch + ExecWait(N(EVS_LetterPrompt_Koover1)) + IfNe(LVarC, DELIVERY_NOT_POSSIBLE) + Return + EndIf + ExecWait(N(EVS_LetterPrompt_Koover2)) + IfNe(LVarC, DELIVERY_NOT_POSSIBLE) + Return + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Koopa_02_Normal) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0014) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0015) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0016) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_NOK11_Defeated_KentC, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0017) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0018) - EVT_END_IF - EVT_CASE_GE(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0018) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0014) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0015) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0016) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + IfEq(GF_NOK11_Defeated_KentC, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0017) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0018) + EndIf + CaseGe(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0018) + EndSwitch + Return + End }; EvtScript N(EVS_NpcIdle_Koopa_03_Normal) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInteract_Koopa_03_Normal) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_001C) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_001D) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_001E) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_NOK11_Defeated_KentC, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_001F) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0020) - EVT_END_IF - EVT_CASE_GE(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0020) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_001C) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_001D) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_001E) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + IfEq(GF_NOK11_Defeated_KentC, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_001F) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0020) + EndIf + CaseGe(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0020) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Bobomb_01_Normal) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(AF_NOK01_Dialogue_Bobomb_01, FALSE) - EVT_SET(AF_NOK01_Dialogue_Bobomb_01, TRUE) - EVT_SET(LVar0, MSG_CH1_003F) - EVT_ELSE - EVT_SET(AF_NOK01_Dialogue_Bobomb_01, FALSE) - EVT_SET(LVar0, MSG_CH1_0040) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, LVar0) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_0041) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_0042) - EVT_CASE_GE(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_0043) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldBobomb_Red_Run) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldBobomb_Red_Idle) - EVT_WAIT(3) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_BOMBETTE_BLAST_LV1, SOUND_SPACE_DEFAULT) - EVT_CALL(N(SpawnExplosionEffect), LVar0, LVar1, LVar2) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + IfEq(AF_NOK01_Dialogue_Bobomb_01, FALSE) + Set(AF_NOK01_Dialogue_Bobomb_01, TRUE) + Set(LVar0, MSG_CH1_003F) + Else + Set(AF_NOK01_Dialogue_Bobomb_01, FALSE) + Set(LVar0, MSG_CH1_0040) + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, LVar0) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_0041) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_0042) + CaseGe(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(NpcFacePlayer, NPC_SELF, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_0043) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldBobomb_Red_Run) + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldBobomb_Red_Idle) + Wait(3) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_BOMBETTE_BLAST_LV1, SOUND_SPACE_DEFAULT) + Call(N(SpawnExplosionEffect), LVar0, LVar1, LVar2) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Bobomb_02_Normal) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(AF_NOK01_Dialogue_Bobomb_02, FALSE) - EVT_SET(AF_NOK01_Dialogue_Bobomb_02, TRUE) - EVT_SET(LVar0, MSG_CH1_0046) - EVT_ELSE - EVT_SET(AF_NOK01_Dialogue_Bobomb_02, FALSE) - EVT_SET(LVar0, MSG_CH1_0047) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, LVar0) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(AF_NOK01_Dialogue_Bobomb_02, FALSE) - EVT_SET(AF_NOK01_Dialogue_Bobomb_02, TRUE) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_CALL(BringPartnerOut, PARTNER_BOMBETTE) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_SELF, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_0048) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_0049) - EVT_CALL(EnablePartnerAI) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_004A) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldBobomb_Red_Run) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldBobomb_Red_Idle) - EVT_WAIT(3) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_BOMBETTE_BLAST_LV1, SOUND_SPACE_DEFAULT) - EVT_CALL(N(SpawnExplosionEffect), LVar0, LVar1, LVar2) - EVT_WAIT(30) - EVT_CALL(PutPartnerAway) - EVT_ELSE - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_004B) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldBobomb_Red_Run) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldBobomb_Red_Idle) - EVT_WAIT(3) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_BOMBETTE_BLAST_LV1, SOUND_SPACE_DEFAULT) - EVT_CALL(N(SpawnExplosionEffect), LVar0, LVar1, LVar2) - EVT_END_IF - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_004C) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldBobomb_Red_Run) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldBobomb_Red_Idle) - EVT_WAIT(3) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_BOMBETTE_BLAST_LV1, SOUND_SPACE_DEFAULT) - EVT_CALL(N(SpawnExplosionEffect), LVar0, LVar1, LVar2) - EVT_CASE_GE(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_004D) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldBobomb_Red_Run) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldBobomb_Red_Idle) - EVT_WAIT(3) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_BOMBETTE_BLAST_LV1, SOUND_SPACE_DEFAULT) - EVT_CALL(N(SpawnExplosionEffect), LVar0, LVar1, LVar2) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + IfEq(AF_NOK01_Dialogue_Bobomb_02, FALSE) + Set(AF_NOK01_Dialogue_Bobomb_02, TRUE) + Set(LVar0, MSG_CH1_0046) + Else + Set(AF_NOK01_Dialogue_Bobomb_02, FALSE) + Set(LVar0, MSG_CH1_0047) + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, LVar0) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + IfEq(AF_NOK01_Dialogue_Bobomb_02, FALSE) + Set(AF_NOK01_Dialogue_Bobomb_02, TRUE) + Call(NpcFacePlayer, NPC_SELF, 0) + Call(BringPartnerOut, PARTNER_BOMBETTE) + Call(NpcFaceNpc, NPC_PARTNER, NPC_SELF, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_0048) + Call(DisablePartnerAI, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_0049) + Call(EnablePartnerAI) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_004A) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldBobomb_Red_Run) + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldBobomb_Red_Idle) + Wait(3) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_BOMBETTE_BLAST_LV1, SOUND_SPACE_DEFAULT) + Call(N(SpawnExplosionEffect), LVar0, LVar1, LVar2) + Wait(30) + Call(PutPartnerAway) + Else + Call(NpcFacePlayer, NPC_SELF, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_004B) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldBobomb_Red_Run) + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldBobomb_Red_Idle) + Wait(3) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_BOMBETTE_BLAST_LV1, SOUND_SPACE_DEFAULT) + Call(N(SpawnExplosionEffect), LVar0, LVar1, LVar2) + EndIf + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(NpcFacePlayer, NPC_SELF, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_004C) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldBobomb_Red_Run) + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldBobomb_Red_Idle) + Wait(3) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_BOMBETTE_BLAST_LV1, SOUND_SPACE_DEFAULT) + Call(N(SpawnExplosionEffect), LVar0, LVar1, LVar2) + CaseGe(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(NpcFacePlayer, NPC_SELF, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_004D) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldBobomb_Red_Run) + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldBobomb_Red_Idle) + Wait(3) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_BOMBETTE_BLAST_LV1, SOUND_SPACE_DEFAULT) + Call(N(SpawnExplosionEffect), LVar0, LVar1, LVar2) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Bobomb_03_Normal) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(AF_NOK_0E, FALSE) - EVT_SET(AF_NOK_0E, TRUE) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_CALL(NpcFacePlayer, NPC_Bobomb_01, 0) - EVT_CALL(NpcFacePlayer, NPC_Bobomb_02, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_004E) - EVT_CALL(PlayerFaceNpc, NPC_Bobomb_01, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Bobomb_01, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_004F) - EVT_CALL(PlayerFaceNpc, NPC_Bobomb_02, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Bobomb_02, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_0050) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Bobomb_02, ANIM_WorldBobomb_Red_Run) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Bobomb_02, ANIM_WorldBobomb_Red_Idle) - EVT_WAIT(3) - EVT_CALL(GetNpcPos, NPC_Bobomb_02, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_Bobomb_02, SOUND_BOMBETTE_BLAST_LV1, SOUND_SPACE_DEFAULT) - EVT_CALL(N(SpawnExplosionEffect), LVar0, LVar1, LVar2) - EVT_END_THREAD - EVT_WAIT(20) - EVT_THREAD - EVT_CALL(PlayerFaceNpc, NPC_Bobomb_01, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Bobomb_01, ANIM_WorldBobomb_Red_Run) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Bobomb_01, ANIM_WorldBobomb_Red_Idle) - EVT_WAIT(3) - EVT_CALL(GetNpcPos, NPC_Bobomb_01, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_Bobomb_01, SOUND_BOMBETTE_BLAST_LV1, SOUND_SPACE_DEFAULT) - EVT_CALL(N(SpawnExplosionEffect), LVar0, LVar1, LVar2) - EVT_END_THREAD - EVT_WAIT(20) - EVT_THREAD - EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldBobomb_Red_Run) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldBobomb_Red_Idle) - EVT_WAIT(3) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_BOMBETTE_BLAST_LV1, SOUND_SPACE_DEFAULT) - EVT_CALL(N(SpawnExplosionEffect), LVar0, LVar1, LVar2) - EVT_END_THREAD - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_0051) - EVT_END_IF - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_0052) - EVT_CASE_GE(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_0053) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + IfEq(AF_NOK_0E, FALSE) + Set(AF_NOK_0E, TRUE) + Call(NpcFacePlayer, NPC_SELF, 0) + Call(NpcFacePlayer, NPC_Bobomb_01, 0) + Call(NpcFacePlayer, NPC_Bobomb_02, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_004E) + Call(PlayerFaceNpc, NPC_Bobomb_01, FALSE) + Call(SpeakToPlayer, NPC_Bobomb_01, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_004F) + Call(PlayerFaceNpc, NPC_Bobomb_02, FALSE) + Call(SpeakToPlayer, NPC_Bobomb_02, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_0050) + Thread + Call(SetNpcAnimation, NPC_Bobomb_02, ANIM_WorldBobomb_Red_Run) + Wait(10) + Call(SetNpcAnimation, NPC_Bobomb_02, ANIM_WorldBobomb_Red_Idle) + Wait(3) + Call(GetNpcPos, NPC_Bobomb_02, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_Bobomb_02, SOUND_BOMBETTE_BLAST_LV1, SOUND_SPACE_DEFAULT) + Call(N(SpawnExplosionEffect), LVar0, LVar1, LVar2) + EndThread + Wait(20) + Thread + Call(PlayerFaceNpc, NPC_Bobomb_01, FALSE) + Call(SetNpcAnimation, NPC_Bobomb_01, ANIM_WorldBobomb_Red_Run) + Wait(10) + Call(SetNpcAnimation, NPC_Bobomb_01, ANIM_WorldBobomb_Red_Idle) + Wait(3) + Call(GetNpcPos, NPC_Bobomb_01, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_Bobomb_01, SOUND_BOMBETTE_BLAST_LV1, SOUND_SPACE_DEFAULT) + Call(N(SpawnExplosionEffect), LVar0, LVar1, LVar2) + EndThread + Wait(20) + Thread + Call(PlayerFaceNpc, NPC_SELF, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldBobomb_Red_Run) + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldBobomb_Red_Idle) + Wait(3) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_BOMBETTE_BLAST_LV1, SOUND_SPACE_DEFAULT) + Call(N(SpawnExplosionEffect), LVar0, LVar1, LVar2) + EndThread + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_0051) + EndIf + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_0052) + CaseGe(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_0053) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Koover_Normal) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Koover_Normal))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Koover_Normal))) + Return + End }; EvtScript N(EVS_NpcInit_Koopa_02_Normal) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Koopa_02_Normal))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Koopa_02_Normal))) + Return + End }; EvtScript N(EVS_NpcInit_Koopa_03_Normal) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Koopa_03_Normal))) - EVT_IF_GE(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Koopa_03_Normal))) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Koopa_Still) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Koopa_03_Normal))) + IfGe(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Koopa_03_Normal))) + Call(SetNpcAnimation, NPC_SELF, ANIM_Koopa_Still) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Bobomb_01_Normal) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bobomb_01_Normal))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bobomb_01_Normal))) + Return + End }; EvtScript N(EVS_NpcInit_Bobomb_02_Normal) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bobomb_02_Normal))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bobomb_02_Normal))) + Return + End }; EvtScript N(EVS_NpcInit_Bobomb_03_Normal) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bobomb_03_Normal))) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bobomb_03_Normal))) + IfLt(GB_StoryProgress, STORY_CH1_STAR_SPRIT_DEPARTED) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; diff --git a/src/world/area_nok/nok_02/nok_02_10_epilogue.c b/src/world/area_nok/nok_02/nok_02_10_epilogue.c index 08aca7ae3cd..b4e28c77914 100644 --- a/src/world/area_nok/nok_02/nok_02_10_epilogue.c +++ b/src/world/area_nok/nok_02/nok_02_10_epilogue.c @@ -1,36 +1,36 @@ #include "nok_02.h" EvtScript N(EVS_Scene_Epilogue) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerPos, NPC_DISPOSE_LOCATION) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(50) - EVT_CALL(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Talk) - EVT_WAIT(15) - EVT_CALL(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Idle) - EVT_WAIT(15) - EVT_CALL(SetNpcAnimation, NPC_Bombette, ANIM_WorldBombette_Talk) - EVT_WAIT(15) - EVT_CALL(SetNpcAnimation, NPC_Bombette, ANIM_WorldBombette_Idle) - EVT_WAIT(15) - EVT_CALL(SetNpcAnimation, NPC_KoloradoWife_Epilogue, ANIM_KoloradoWife_Walk) - EVT_CALL(NpcMoveTo, NPC_KoloradoWife_Epilogue, -80, -50, 30) - EVT_CALL(SetNpcAnimation, NPC_KoloradoWife_Epilogue, ANIM_KoloradoWife_Idle) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -53, LVar1, LVar2) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(InterpNpcYaw, NPC_Parakarry, 270, 0) - EVT_WAIT(15) - EVT_CALL(SetNpcAnimation, NPC_KoloradoWife_Epilogue, ANIM_KoloradoWife_Talk) - EVT_WAIT(45) - EVT_CALL(FadeOutMusic, 0, 1000) - EVT_CALL(GotoMap, EVT_PTR("obk_09"), obk_09_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerPos, NPC_DISPOSE_LOCATION) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(50) + Call(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Talk) + Wait(15) + Call(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Idle) + Wait(15) + Call(SetNpcAnimation, NPC_Bombette, ANIM_WorldBombette_Talk) + Wait(15) + Call(SetNpcAnimation, NPC_Bombette, ANIM_WorldBombette_Idle) + Wait(15) + Call(SetNpcAnimation, NPC_KoloradoWife_Epilogue, ANIM_KoloradoWife_Walk) + Call(NpcMoveTo, NPC_KoloradoWife_Epilogue, -80, -50, 30) + Call(SetNpcAnimation, NPC_KoloradoWife_Epilogue, ANIM_KoloradoWife_Idle) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(SetPanTarget, CAM_DEFAULT, -53, LVar1, LVar2) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(InterpNpcYaw, NPC_Parakarry, 270, 0) + Wait(15) + Call(SetNpcAnimation, NPC_KoloradoWife_Epilogue, ANIM_KoloradoWife_Talk) + Wait(45) + Call(FadeOutMusic, 0, 1000) + Call(GotoMap, Ref("obk_09"), obk_09_ENTRY_2) + Wait(100) + Return + End }; diff --git a/src/world/area_nok/nok_02/nok_02_1_music.c b/src/world/area_nok/nok_02/nok_02_1_music.c index 8ef4593c297..84692d7acda 100644 --- a/src/world/area_nok/nok_02/nok_02_1_music.c +++ b/src/world/area_nok/nok_02/nok_02_1_music.c @@ -1,11 +1,11 @@ #include "nok_02.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) - EVT_CALL(SetMusicTrack, 0, SONG_FUZZY_ATTACK, 0, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_VILLAGE, 0, 8) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) + Call(SetMusicTrack, 0, SONG_FUZZY_ATTACK, 0, 8) + Else + Call(SetMusicTrack, 0, SONG_KOOPA_VILLAGE, 0, 8) + EndIf + Return + End }; diff --git a/src/world/area_nok/nok_02/nok_02_2_main.c b/src/world/area_nok/nok_02/nok_02_2_main.c index 992c4ffaf6d..166ac1bc1dd 100644 --- a/src/world/area_nok/nok_02/nok_02_2_main.c +++ b/src/world/area_nok/nok_02/nok_02_2_main.c @@ -9,135 +9,135 @@ #define NAME_SUFFIX EvtScript N(EVS_ExitWalk_nok_01_1) = { - EVT_CALL(UseExitHeading, 60, nok_02_ENTRY_0) - EVT_EXEC(ExitWalk) - EVT_CALL(GotoMap, EVT_PTR("nok_01"), nok_01_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(UseExitHeading, 60, nok_02_ENTRY_0) + Exec(ExitWalk) + Call(GotoMap, Ref("nok_01"), nok_01_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_nok_03_0) = { - EVT_IF_EQ(GB_KootFavor_State, KOOT_FAVOR_STATE_2) - EVT_SET(GF_KootFavor_LeftKoopaVillage, TRUE) - EVT_END_IF - EVT_CALL(UseExitHeading, 60, nok_02_ENTRY_1) - EVT_EXEC(ExitWalk) - EVT_CALL(GotoMap, EVT_PTR("nok_03"), nok_03_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + IfEq(GB_KootFavor_State, KOOT_FAVOR_STATE_2) + Set(GF_KootFavor_LeftKoopaVillage, TRUE) + EndIf + Call(UseExitHeading, 60, nok_02_ENTRY_1) + Exec(ExitWalk) + Call(GotoMap, Ref("nok_03"), nok_03_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_nok_01_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_nok_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_nok_01_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_nok_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + Return + End }; EvtScript N(EVS_TexPan_Flowers) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, MODEL_o312, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o460, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o461, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o462, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o454, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o455, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o456, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o457, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o458, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o459, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_o314, TEX_PANNER_0) - EVT_LABEL(10) - EVT_LOOP(12) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(12) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0x4000, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(10) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, MODEL_o312, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o460, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o461, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o462, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o454, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o455, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o456, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o457, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o458, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o459, TEX_PANNER_0) + Call(SetTexPanner, MODEL_o314, TEX_PANNER_0) + Label(10) + Loop(12) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, 0) + Wait(1) + EndLoop + Loop(12) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0x4000, 0) + Wait(1) + EndLoop + Goto(10) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(nok_02_ENTRY_2) - EVT_IF_EQ(GF_NOK02_WarpPipe, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerPos, LVar0, NPC_DISPOSE_POS_Y, LVar2) - EVT_WAIT(30) - EVT_CALL(PlaySound, SOUND_GROW) - EVT_SET(GF_NOK02_WarpPipe, TRUE) - EVT_WAIT(30) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_SET(LVarA, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC_WAIT(N(EVS_Pipe_EnterVertical)) - EVT_CASE_EQ(nok_02_ENTRY_4) - EVT_CASE_DEFAULT - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(nok_02_ENTRY_2) + IfEq(GF_NOK02_WarpPipe, FALSE) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(SetPlayerPos, LVar0, NPC_DISPOSE_POS_Y, LVar2) + Wait(30) + Call(PlaySound, SOUND_GROW) + Set(GF_NOK02_WarpPipe, TRUE) + Wait(30) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + EndIf + Set(LVarA, Ref(N(EVS_BindExitTriggers))) + ExecWait(N(EVS_Pipe_EnterVertical)) + CaseEq(nok_02_ENTRY_4) + CaseDefault + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_KOOPA_VILLAGE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, nok_02_ENTRY_3) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(EpilogueNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_TexPan_Flowers)) - EVT_EXEC(N(EVS_Scene_Epilogue)) - EVT_CALL(FadeInMusic, 0, SONG_KOOPA_VILLAGE, 0, 3000, 0, 127) - EVT_WAIT(1) - EVT_RETURN - EVT_END_IF - EVT_SET(AF_NOK_0F, FALSE) - EVT_SET(AF_NOK_10, FALSE) - EVT_SET(AF_NOK_12, FALSE) - EVT_SET(GF_NOK02_Bush1_KoopaLeaf, FALSE) - EVT_SET(AF_NOK_13, FALSE) - EVT_IF_GE(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) - EVT_SET(GF_NOK02_RecoveredShellA, TRUE) - EVT_SET(GF_NOK02_RecoveredShellB, TRUE) - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(CrisisNPCs))) - EVT_ELSE - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NormalNPCs))) - EVT_END_IF - EVT_CALL(ClearDefeatedEnemies) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupFoliage)) - EVT_EXEC(N(EVS_TexPan_Flowers)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Setup_Bookshelf)), TRIGGER_WALL_PRESS_A, COLLIDER_o236, 1, 0) - EVT_EXEC_WAIT(N(EVS_SetupRooms)) - EVT_CALL(GetDemoState, LVar0) - EVT_IF_NE(LVar0, DEMO_STATE_NONE) - EVT_EXEC_WAIT(N(EVS_SetupDemo)) - EVT_RETURN - EVT_END_IF - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitn, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_KOOPA_VILLAGE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(GetEntryID, LVar0) + IfEq(LVar0, nok_02_ENTRY_3) + Call(MakeNpcs, FALSE, Ref(N(EpilogueNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_TexPan_Flowers)) + Exec(N(EVS_Scene_Epilogue)) + Call(FadeInMusic, 0, SONG_KOOPA_VILLAGE, 0, 3000, 0, 127) + Wait(1) + Return + EndIf + Set(AF_NOK_0F, FALSE) + Set(AF_NOK_10, FALSE) + Set(AF_NOK_12, FALSE) + Set(GF_NOK02_Bush1_KoopaLeaf, FALSE) + Set(AF_NOK_13, FALSE) + IfGe(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) + Set(GF_NOK02_RecoveredShellA, TRUE) + Set(GF_NOK02_RecoveredShellB, TRUE) + EndIf + IfLt(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) + Call(MakeNpcs, FALSE, Ref(N(CrisisNPCs))) + Else + Call(MakeNpcs, FALSE, Ref(N(NormalNPCs))) + EndIf + Call(ClearDefeatedEnemies) + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupFoliage)) + Exec(N(EVS_TexPan_Flowers)) + BindTrigger(Ref(N(EVS_Setup_Bookshelf)), TRIGGER_WALL_PRESS_A, COLLIDER_o236, 1, 0) + ExecWait(N(EVS_SetupRooms)) + Call(GetDemoState, LVar0) + IfNe(LVar0, DEMO_STATE_NONE) + ExecWait(N(EVS_SetupDemo)) + Return + EndIf + Exec(N(EVS_SetupMusic)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitn, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_nok/nok_02/nok_02_3_entity.c b/src/world/area_nok/nok_02/nok_02_3_entity.c index 7cc5c10939d..c8a9f8d1034 100644 --- a/src/world/area_nok/nok_02/nok_02_3_entity.c +++ b/src/world/area_nok/nok_02/nok_02_3_entity.c @@ -4,45 +4,45 @@ #include "common/ItemEntityJumpToPos.inc.c" EvtScript N(EVS_BreakBlock_DropStarPiece) = { - EVT_CALL(N(ItemEntityJumpToPos), MV_StarPieceItem, EVT_FLOAT(227.0), EVT_FLOAT(0.0), EVT_FLOAT(247.0), 20, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(N(ItemEntityJumpToPos), MV_StarPieceItem, Float(227.0), Float(0.0), Float(247.0), 20, Float(1.0)) + Return + End }; EvtScript N(EVS_GotoMap_tik_01_3) = { - EVT_CALL(GotoMap, EVT_PTR("tik_01"), tik_01_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("tik_01"), tik_01_ENTRY_3) + Wait(100) + Return + End }; MAP_RODATA_PAD(1, exits); EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 151, 81, 251, 0, MAKE_ENTITY_END) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH1_KOOPER_JOINED_PARTY) - EVT_IF_EQ(GF_NOK02_RecoveredShellB, FALSE) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_BreakBlock_DropShell))) - EVT_END_IF - EVT_CASE_GE(STORY_CH1_KOOPER_JOINED_PARTY) - EVT_IF_EQ(GF_NOK02_Item_StarPiece, FALSE) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_BreakBlock_DropStarPiece))) - EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 150, 106, 250, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_NOK02_Item_StarPiece) - EVT_SET(MV_StarPieceItem, LVar0) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(CreatePushBlockGrid, 0, 5, 5, 88, -4, 188, 0) - EVT_CALL(SetPushBlock, 0, 0, 0, PUSH_GRID_BLOCK) - EVT_IF_EQ(GF_NOK02_WarpPipe, FALSE) - EVT_IF_EQ(GF_TIK01_WarpPipes, TRUE) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, nok_02_ENTRY_2) - EVT_SET(GF_NOK02_WarpPipe, TRUE) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueWarpPipe), 365, 0, 90, 30, nok_02_ENTRY_2, EVT_PTR(N(EVS_GotoMap_tik_01_3)), EVT_INDEX_OF_GAME_FLAG(GF_NOK02_WarpPipe), MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_BrickBlock), 151, 81, 251, 0, MAKE_ENTITY_END) + Switch(GB_StoryProgress) + CaseLt(STORY_CH1_KOOPER_JOINED_PARTY) + IfEq(GF_NOK02_RecoveredShellB, FALSE) + Call(AssignScript, Ref(N(EVS_BreakBlock_DropShell))) + EndIf + CaseGe(STORY_CH1_KOOPER_JOINED_PARTY) + IfEq(GF_NOK02_Item_StarPiece, FALSE) + Call(AssignScript, Ref(N(EVS_BreakBlock_DropStarPiece))) + Call(MakeItemEntity, ITEM_STAR_PIECE, 150, 106, 250, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_NOK02_Item_StarPiece) + Set(MV_StarPieceItem, LVar0) + EndIf + EndSwitch + Call(CreatePushBlockGrid, 0, 5, 5, 88, -4, 188, 0) + Call(SetPushBlock, 0, 0, 0, PUSH_GRID_BLOCK) + IfEq(GF_NOK02_WarpPipe, FALSE) + IfEq(GF_TIK01_WarpPipes, TRUE) + Call(GetEntryID, LVar0) + IfNe(LVar0, nok_02_ENTRY_2) + Set(GF_NOK02_WarpPipe, TRUE) + EndIf + EndIf + EndIf + Call(MakeEntity, Ref(Entity_BlueWarpPipe), 365, 0, 90, 30, nok_02_ENTRY_2, Ref(N(EVS_GotoMap_tik_01_3)), EVT_INDEX_OF_GAME_FLAG(GF_NOK02_WarpPipe), MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_nok/nok_02/nok_02_4_rooms.c b/src/world/area_nok/nok_02/nok_02_4_rooms.c index 7c90f830cce..53a5579aa44 100644 --- a/src/world/area_nok/nok_02/nok_02_4_rooms.c +++ b/src/world/area_nok/nok_02/nok_02_4_rooms.c @@ -9,256 +9,256 @@ API_CALLABLE(N(SpawnKooperFightingDust)) { } EvtScript N(EVS_SpinKooperCeilingFan) = { - EVT_LABEL(0) - EVT_SET(LVar0, 35) - EVT_LOOP(LVar0) - EVT_SET(LVar1, LVar0) - EVT_MUL(LVar1, 10) - EVT_CALL(RotateModel, MODEL_o184, LVar1, 0, -1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Set(LVar0, 35) + Loop(LVar0) + Set(LVar1, LVar0) + Mul(LVar1, 10) + Call(RotateModel, MODEL_o184, LVar1, 0, -1, 0) + Wait(1) + EndLoop + Goto(0) + Return + End }; EvtScript N(EVS_UpdateKooperFightSounds) = { - EVT_LOOP(0) - EVT_IF_EQ(GF_Quizmo_TakingQuiz, FALSE) - EVT_CALL(PlaySoundAt, SOUND_NOK_HOUSE_CONFLICT, SOUND_SPACE_DEFAULT, 0, 0, -180) - EVT_END_IF - EVT_CALL(RandInt, 30, LVar5) - EVT_ADD(LVar5, 30) - EVT_WAIT(LVar5) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + IfEq(GF_Quizmo_TakingQuiz, FALSE) + Call(PlaySoundAt, SOUND_NOK_HOUSE_CONFLICT, SOUND_SPACE_DEFAULT, 0, 0, -180) + EndIf + Call(RandInt, 30, LVar5) + Add(LVar5, 30) + Wait(LVar5) + EndLoop + Return + End }; EvtScript N(EVS_PlayKooperVsFuzzyEffects) = { - EVT_SET_GROUP(EVT_GROUP_0A) - EVT_EXEC_GET_TID(N(EVS_UpdateKooperFightSounds), MV_KooperFightSoundsScript) - EVT_LABEL(0) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH1_PROMISED_TO_HELP_KOOPER, STORY_CH4_BEGAN_PEACH_MISSION) - EVT_KILL_THREAD(MV_KooperFightSoundsScript) - EVT_RETURN - EVT_END_SWITCH - EVT_IF_EQ(GF_NOK02_ConfrontedBobombs, TRUE) - EVT_KILL_THREAD(MV_KooperFightSoundsScript) - EVT_RETURN - EVT_END_IF - EVT_CALL(RandInt, 30, LVar0) - EVT_ADD(LVar0, 10) - EVT_WAIT(LVar0) - EVT_CALL(RandInt, 10, LVar0) - EVT_ADD(LVar0, 5) - EVT_IF_EQ(GF_Quizmo_TakingQuiz, FALSE) - EVT_CALL(N(SpawnKooperFightingDust)) - EVT_END_IF - EVT_LOOP(LVar0) - EVT_IF_EQ(AF_NOK_12, TRUE) - EVT_KILL_THREAD(MV_KooperFightSoundsScript) - EVT_CALL(TranslateGroup, MODEL_kameki, 0, 0, 0) - EVT_LABEL(10) - EVT_IF_EQ(AF_NOK_12, TRUE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_EXEC_GET_TID(N(EVS_UpdateKooperFightSounds), MV_KooperFightSoundsScript) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(RandInt, 5, LVar1) - EVT_ADD(LVar1, 1) - EVT_MUL(LVar1, -1) - EVT_CALL(TranslateGroup, MODEL_kameki, 0, LVar1, 0) - EVT_WAIT(1) - EVT_CALL(TranslateGroup, MODEL_kameki, 0, LVar1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0A) + ExecGetTID(N(EVS_UpdateKooperFightSounds), MV_KooperFightSoundsScript) + Label(0) + Switch(GB_StoryProgress) + CaseRange(STORY_CH1_PROMISED_TO_HELP_KOOPER, STORY_CH4_BEGAN_PEACH_MISSION) + KillThread(MV_KooperFightSoundsScript) + Return + EndSwitch + IfEq(GF_NOK02_ConfrontedBobombs, TRUE) + KillThread(MV_KooperFightSoundsScript) + Return + EndIf + Call(RandInt, 30, LVar0) + Add(LVar0, 10) + Wait(LVar0) + Call(RandInt, 10, LVar0) + Add(LVar0, 5) + IfEq(GF_Quizmo_TakingQuiz, FALSE) + Call(N(SpawnKooperFightingDust)) + EndIf + Loop(LVar0) + IfEq(AF_NOK_12, TRUE) + KillThread(MV_KooperFightSoundsScript) + Call(TranslateGroup, MODEL_kameki, 0, 0, 0) + Label(10) + IfEq(AF_NOK_12, TRUE) + Wait(1) + Goto(10) + EndIf + ExecGetTID(N(EVS_UpdateKooperFightSounds), MV_KooperFightSoundsScript) + BreakLoop + EndIf + Call(RandInt, 5, LVar1) + Add(LVar1, 1) + Mul(LVar1, -1) + Call(TranslateGroup, MODEL_kameki, 0, LVar1, 0) + Wait(1) + Call(TranslateGroup, MODEL_kameki, 0, LVar1, 0) + Wait(1) + EndLoop + Goto(0) + Return + End }; EvtScript N(EVS_SetDoorRot_KoloradoHouse) = { - EVT_CALL(RotateModel, MODEL_o149, LVar0, 0, 1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o149, LVar0, 0, 1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_KoloradoHouse) = { - EVT_MULF(LVar0, EVT_FLOAT(-0.5)) - EVT_CALL(RotateModel, MODEL_o151, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o152, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o153, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o150, LVar0, 1, 0, 0) - EVT_RETURN - EVT_END + MulF(LVar0, Float(-0.5)) + Call(RotateModel, MODEL_o151, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o152, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o153, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o150, LVar0, 1, 0, 0) + Return + End }; EvtScript N(EVS_DropDoor_KoloradoHouse) = { - EVT_SET(LVar1, LVar0) - EVT_DIVF(LVar1, 45) - EVT_CALL(TranslateModel, MODEL_o149, 0, LVar1, 0) - EVT_CALL(RotateModel, MODEL_o149, LVar0, 1, 0, 0) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + DivF(LVar1, 45) + Call(TranslateModel, MODEL_o149, 0, LVar1, 0) + Call(RotateModel, MODEL_o149, LVar0, 1, 0, 0) + Return + End }; EvtScript N(EVS_SetDoorRot_KoloradoOffice) = { - EVT_CALL(RotateGroup, MODEL_g41, LVar0, 0, 1, 0) - EVT_RETURN - EVT_END + Call(RotateGroup, MODEL_g41, LVar0, 0, 1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_KoloradoOffice) = { - EVT_SET(LVar1, LVar0) - EVT_SUB(LVar1, 90) - EVT_MULF(LVar0, EVT_FLOAT(1.0)) - EVT_CALL(RotateModel, MODEL_o156, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o154, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o155, LVar0, 0, 0, 1) - EVT_MULF(LVar1, EVT_FLOAT(0.5)) - EVT_CALL(RotateModel, MODEL_o151, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o152, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o153, LVar1, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o150, LVar1, 1, 0, 0) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + Sub(LVar1, 90) + MulF(LVar0, Float(1.0)) + Call(RotateModel, MODEL_o156, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o154, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o155, LVar0, 0, 0, 1) + MulF(LVar1, Float(0.5)) + Call(RotateModel, MODEL_o151, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_o152, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_o153, LVar1, 1, 0, 0) + Call(RotateModel, MODEL_o150, LVar1, 1, 0, 0) + Return + End }; EvtScript N(EVS_SetDoorRot_KooperFrontDoor) = { - EVT_CALL(RotateModel, MODEL_o185, LVar0, 0, 1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o185, LVar0, 0, 1, 0) + Return + End }; EvtScript N(EVS_SetDoorRot_KooperBackDoor) = { - EVT_CALL(RotateModel, MODEL_o183, LVar0, 0, -1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o183, LVar0, 0, -1, 0) + Return + End }; EvtScript N(EVS_SetWallsRot_KooperHouse) = { - EVT_SET(LVar2, LVar0) - EVT_SET(LVar1, LVar0) - EVT_SUB(LVar1, 90) - EVT_DIVF(LVar1, -90) - EVT_MULF(LVar2, EVT_FLOAT(0.5)) - EVT_CALL(RotateModel, MODEL_o171, LVar2, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o181, LVar2, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o182, LVar2, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o180, LVar2, 0, 0, 1) - EVT_IF_NE(LVar1, 0) - EVT_CALL(ScaleModel, MODEL_o308, 1, LVar1, 1) - EVT_CALL(ScaleModel, MODEL_o307, 1, LVar1, 1) - EVT_CALL(EnableModel, MODEL_o308, TRUE) - EVT_CALL(EnableModel, MODEL_o307, TRUE) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_o308, FALSE) - EVT_CALL(EnableModel, MODEL_o307, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVar2, LVar0) + Set(LVar1, LVar0) + Sub(LVar1, 90) + DivF(LVar1, -90) + MulF(LVar2, Float(0.5)) + Call(RotateModel, MODEL_o171, LVar2, 0, 0, 1) + Call(RotateModel, MODEL_o181, LVar2, 0, 0, 1) + Call(RotateModel, MODEL_o182, LVar2, 0, 0, 1) + Call(RotateModel, MODEL_o180, LVar2, 0, 0, 1) + IfNe(LVar1, 0) + Call(ScaleModel, MODEL_o308, 1, LVar1, 1) + Call(ScaleModel, MODEL_o307, 1, LVar1, 1) + Call(EnableModel, MODEL_o308, TRUE) + Call(EnableModel, MODEL_o307, TRUE) + Else + Call(EnableModel, MODEL_o308, FALSE) + Call(EnableModel, MODEL_o307, FALSE) + EndIf + Return + End }; EvtScript N(EVS_SetWallRot_KooperHouse) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_WAIT(20) - EVT_SET(LVar0, 0) - EVT_LOOP(18) - EVT_ADD(LVar0, 5) - EVT_EXEC_WAIT(N(EVS_SetWallsRot_KooperHouse)) - EVT_END_LOOP - EVT_CASE_EQ(3) - EVT_SET(LVar0, 90) - EVT_LOOP(18) - EVT_SUB(LVar0, 5) - EVT_EXEC_WAIT(N(EVS_SetWallsRot_KooperHouse)) - EVT_END_LOOP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(0) + Wait(20) + Set(LVar0, 0) + Loop(18) + Add(LVar0, 5) + ExecWait(N(EVS_SetWallsRot_KooperHouse)) + EndLoop + CaseEq(3) + Set(LVar0, 90) + Loop(18) + Sub(LVar0, 5) + ExecWait(N(EVS_SetWallsRot_KooperHouse)) + EndLoop + EndSwitch + Return + End }; EvtScript N(EVS_SetDoorRot_KootHouse) = { - EVT_CALL(RotateModel, MODEL_o226, LVar0, 0, 1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o226, LVar0, 0, 1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_KootHouse) = { - EVT_MULF(LVar0, EVT_FLOAT(0.5)) - EVT_CALL(RotateModel, MODEL_o225, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o224, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o223, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o222, LVar0, -1, 0, 0) - EVT_RETURN - EVT_END + MulF(LVar0, Float(0.5)) + Call(RotateModel, MODEL_o225, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_o224, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_o223, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_o222, LVar0, -1, 0, 0) + Return + End }; EvtScript N(EVS_DropDoor_KootHouse) = { - EVT_SET(LVar1, LVar0) - EVT_DIVF(LVar1, 45) - EVT_CALL(TranslateModel, MODEL_o226, 0, LVar1, 0) - EVT_CALL(RotateModel, MODEL_o226, LVar0, 1, 0, 0) - EVT_RETURN - EVT_END + Set(LVar1, LVar0) + DivF(LVar1, 45) + Call(TranslateModel, MODEL_o226, 0, LVar1, 0) + Call(RotateModel, MODEL_o226, LVar0, 1, 0, 0) + Return + End }; EvtScript N(EVS_RoomListener_KooperHouse) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_SET(AF_NOK_12, TRUE) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_PROMISED_TO_HELP_KOOPER) - EVT_EXEC_WAIT(N(EVS_Scene_MeetKooper)) - EVT_SET(LVar0, ROOM_UPDATE_REQUEST_CANCEL) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetGroupVisibility, MODEL_g111, MODEL_GROUP_VISIBLE) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_DONE) - EVT_EXEC(N(EVS_FuzzyBoss_PlayerEntersKoopersHouse)) - EVT_SET(AF_NOK_10, TRUE) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_BEGIN) - EVT_SET(AF_NOK_10, FALSE) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_SET(AF_NOK_12, FALSE) - EVT_CALL(SetGroupVisibility, MODEL_g111, MODEL_GROUP_HIDDEN) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Set(AF_NOK_12, TRUE) + IfLt(GB_StoryProgress, STORY_CH1_PROMISED_TO_HELP_KOOPER) + ExecWait(N(EVS_Scene_MeetKooper)) + Set(LVar0, ROOM_UPDATE_REQUEST_CANCEL) + Return + EndIf + Call(SetGroupVisibility, MODEL_g111, MODEL_GROUP_VISIBLE) + CaseEq(ROOM_UPDATE_ENTER_DONE) + Exec(N(EVS_FuzzyBoss_PlayerEntersKoopersHouse)) + Set(AF_NOK_10, TRUE) + CaseEq(ROOM_UPDATE_EXIT_BEGIN) + Set(AF_NOK_10, FALSE) + CaseEq(ROOM_UPDATE_EXIT_END) + Set(AF_NOK_12, FALSE) + Call(SetGroupVisibility, MODEL_g111, MODEL_GROUP_HIDDEN) + EndSwitch + Return + End }; EvtScript N(EVS_RoomListener_KoloradoHouse) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_CALL(SetGroupVisibility, MODEL_g45, MODEL_GROUP_VISIBLE) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_DONE) + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Call(SetGroupVisibility, MODEL_g45, MODEL_GROUP_VISIBLE) + CaseEq(ROOM_UPDATE_ENTER_DONE) // do nothing - EVT_CASE_EQ(ROOM_UPDATE_EXIT_BEGIN) + CaseEq(ROOM_UPDATE_EXIT_BEGIN) // do nothing - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_CALL(SetGroupVisibility, MODEL_g45, MODEL_GROUP_HIDDEN) - EVT_END_SWITCH - EVT_RETURN - EVT_END + CaseEq(ROOM_UPDATE_EXIT_END) + Call(SetGroupVisibility, MODEL_g45, MODEL_GROUP_HIDDEN) + EndSwitch + Return + End }; EvtScript N(EVS_RoomListener_KootHouse) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_CALL(SetGroupVisibility, MODEL_g63, MODEL_GROUP_VISIBLE) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_DONE) + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Call(SetGroupVisibility, MODEL_g63, MODEL_GROUP_VISIBLE) + CaseEq(ROOM_UPDATE_ENTER_DONE) // do nothing - EVT_CASE_EQ(ROOM_UPDATE_EXIT_BEGIN) + CaseEq(ROOM_UPDATE_EXIT_BEGIN) // do nothing - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_CALL(SetGroupVisibility, MODEL_g63, MODEL_GROUP_HIDDEN) - EVT_END_SWITCH - EVT_RETURN - EVT_END + CaseEq(ROOM_UPDATE_EXIT_END) + Call(SetGroupVisibility, MODEL_g63, MODEL_GROUP_HIDDEN) + EndSwitch + Return + End }; s32 N(InteriorNPCs_BeforeKentC)[] = { @@ -288,142 +288,142 @@ s32 N(InteriorNPCs_KootHouse)[] = { }; EvtScript N(EVS_SetupRooms) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) + IfGe(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) // kolorado house - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_RIGHT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_KoloradoHouse)), - EVT_PTR(N(EVS_SetWallRot_KoloradoHouse)), - EVT_PTR(N(EVS_DropDoor_KoloradoHouse)), - EVT_PTR(N(EVS_RoomListener_KoloradoHouse)), + Ref(N(EVS_SetDoorRot_KoloradoHouse)), + Ref(N(EVS_SetWallRot_KoloradoHouse)), + Ref(N(EVS_DropDoor_KoloradoHouse)), + Ref(N(EVS_RoomListener_KoloradoHouse)), COLLIDER_o310, COLLIDER_o313, MODEL_sakuji, - EVT_PTR(N(InteriorNPCs_AfterKentC))) + Ref(N(InteriorNPCs_AfterKentC))) // kolorado office - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_RIGHT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_KoloradoOffice)), - EVT_PTR(N(EVS_SetWallRot_KoloradoOffice)), + Ref(N(EVS_SetDoorRot_KoloradoOffice)), + Ref(N(EVS_SetWallRot_KoloradoOffice)), NULL, NULL, COLLIDER_o314, COLLIDER_o317, MODEL_o271, NULL) - EVT_ELSE - EVT_IF_EQ(GF_NOK11_Defeated_KentC, TRUE) + Else + IfEq(GF_NOK11_Defeated_KentC, TRUE) // kolorado house - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_RIGHT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_KoloradoHouse)), - EVT_PTR(N(EVS_SetWallRot_KoloradoHouse)), - EVT_PTR(N(EVS_DropDoor_KoloradoHouse)), - EVT_PTR(N(EVS_RoomListener_KoloradoHouse)), + Ref(N(EVS_SetDoorRot_KoloradoHouse)), + Ref(N(EVS_SetWallRot_KoloradoHouse)), + Ref(N(EVS_DropDoor_KoloradoHouse)), + Ref(N(EVS_RoomListener_KoloradoHouse)), COLLIDER_o310, COLLIDER_o313, MODEL_sakuji, - EVT_PTR(N(InteriorNPCs_AfterKentC))) + Ref(N(InteriorNPCs_AfterKentC))) // kolorado office - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_RIGHT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_KoloradoOffice)), - EVT_PTR(N(EVS_SetWallRot_KoloradoOffice)), + Ref(N(EVS_SetDoorRot_KoloradoOffice)), + Ref(N(EVS_SetWallRot_KoloradoOffice)), NULL, NULL, COLLIDER_o314, COLLIDER_o317, MODEL_o271, NULL) - EVT_ELSE + Else // kolorado house - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_RIGHT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_KoloradoHouse)), - EVT_PTR(N(EVS_SetWallRot_KoloradoHouse)), - EVT_PTR(N(EVS_DropDoor_KoloradoHouse)), - EVT_PTR(N(EVS_RoomListener_KoloradoHouse)), + Ref(N(EVS_SetDoorRot_KoloradoHouse)), + Ref(N(EVS_SetWallRot_KoloradoHouse)), + Ref(N(EVS_DropDoor_KoloradoHouse)), + Ref(N(EVS_RoomListener_KoloradoHouse)), COLLIDER_o310, COLLIDER_o313, MODEL_sakuji, - EVT_PTR(N(InteriorNPCs_BeforeKentC))) + Ref(N(InteriorNPCs_BeforeKentC))) // kolorado office - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_RIGHT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_KoloradoOffice)), - EVT_PTR(N(EVS_SetWallRot_KoloradoOffice)), + Ref(N(EVS_SetDoorRot_KoloradoOffice)), + Ref(N(EVS_SetWallRot_KoloradoOffice)), NULL, NULL, COLLIDER_o314, COLLIDER_o317, MODEL_o271, NULL) - EVT_END_IF - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) + EndIf + EndIf + IfLt(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) // kooper front door - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_RIGHT_HINGE_OPENS_OUT | ROOM_FLAG_CUSTOM_ANIM_WALL_ROT), - EVT_PTR(N(EVS_SetDoorRot_KooperFrontDoor)), - EVT_PTR(N(EVS_SetWallRot_KooperHouse)), + Ref(N(EVS_SetDoorRot_KooperFrontDoor)), + Ref(N(EVS_SetWallRot_KooperHouse)), NULL, - EVT_PTR(N(EVS_RoomListener_KooperHouse)), + Ref(N(EVS_RoomListener_KooperHouse)), COLLIDER_o284, COLLIDER_o287, MODEL_kameki, - EVT_PTR(N(InteriorNPCs_KooperHouse_BeforeJoin))) + Ref(N(InteriorNPCs_KooperHouse_BeforeJoin))) // kooper back door - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_LEFT_HINGE_OPENS_OUT | ROOM_FLAG_CUSTOM_ANIM_WALL_ROT), - EVT_PTR(N(EVS_SetDoorRot_KooperBackDoor)), - EVT_PTR(N(EVS_SetWallRot_KooperHouse)), + Ref(N(EVS_SetDoorRot_KooperBackDoor)), + Ref(N(EVS_SetWallRot_KooperHouse)), NULL, - EVT_PTR(N(EVS_RoomListener_KooperHouse)), + Ref(N(EVS_RoomListener_KooperHouse)), COLLIDER_o302, COLLIDER_o299, MODEL_kameki, - EVT_PTR(N(InteriorNPCs_KooperHouse_BeforeJoin))) - EVT_ELSE + Ref(N(InteriorNPCs_KooperHouse_BeforeJoin))) + Else // kooper front door - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_RIGHT_HINGE_OPENS_OUT | ROOM_FLAG_CUSTOM_ANIM_WALL_ROT), - EVT_PTR(N(EVS_SetDoorRot_KooperFrontDoor)), - EVT_PTR(N(EVS_SetWallRot_KooperHouse)), + Ref(N(EVS_SetDoorRot_KooperFrontDoor)), + Ref(N(EVS_SetWallRot_KooperHouse)), NULL, - EVT_PTR(N(EVS_RoomListener_KooperHouse)), + Ref(N(EVS_RoomListener_KooperHouse)), COLLIDER_o284, COLLIDER_o287, MODEL_kameki, - EVT_PTR(N(InteriorNPCs_KooperHouse_AfterJoin))) + Ref(N(InteriorNPCs_KooperHouse_AfterJoin))) // kooper back door - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_LEFT_HINGE_OPENS_OUT | ROOM_FLAG_CUSTOM_ANIM_WALL_ROT), - EVT_PTR(N(EVS_SetDoorRot_KooperBackDoor)), - EVT_PTR(N(EVS_SetWallRot_KooperHouse)), + Ref(N(EVS_SetDoorRot_KooperBackDoor)), + Ref(N(EVS_SetWallRot_KooperHouse)), NULL, - EVT_PTR(N(EVS_RoomListener_KooperHouse)), + Ref(N(EVS_RoomListener_KooperHouse)), COLLIDER_o302, COLLIDER_o299, MODEL_kameki, - EVT_PTR(N(InteriorNPCs_KooperHouse_AfterJoin))) - EVT_END_IF + Ref(N(InteriorNPCs_KooperHouse_AfterJoin))) + EndIf // koot house - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_RIGHT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_KootHouse)), - EVT_PTR(N(EVS_SetWallRot_KootHouse)), - EVT_PTR(N(EVS_DropDoor_KootHouse)), - EVT_PTR(N(EVS_RoomListener_KootHouse)), + Ref(N(EVS_SetDoorRot_KootHouse)), + Ref(N(EVS_SetWallRot_KootHouse)), + Ref(N(EVS_DropDoor_KootHouse)), + Ref(N(EVS_RoomListener_KootHouse)), COLLIDER_o226, COLLIDER_o283, MODEL_mura, - EVT_PTR(N(InteriorNPCs_KootHouse))) - EVT_SET(LVar0, ROOM_UPDATE_EXIT_END) - EVT_EXEC(N(EVS_RoomListener_KoloradoHouse)) - EVT_EXEC(N(EVS_RoomListener_KooperHouse)) - EVT_EXEC(N(EVS_RoomListener_KootHouse)) - EVT_EXEC(N(EVS_SpinKooperCeilingFan)) - EVT_EXEC(N(EVS_PlayKooperVsFuzzyEffects)) - EVT_RETURN - EVT_END + Ref(N(InteriorNPCs_KootHouse))) + Set(LVar0, ROOM_UPDATE_EXIT_END) + Exec(N(EVS_RoomListener_KoloradoHouse)) + Exec(N(EVS_RoomListener_KooperHouse)) + Exec(N(EVS_RoomListener_KootHouse)) + Exec(N(EVS_SpinKooperCeilingFan)) + Exec(N(EVS_PlayKooperVsFuzzyEffects)) + Return + End }; diff --git a/src/world/area_nok/nok_02/nok_02_5_bookshelf.c b/src/world/area_nok/nok_02/nok_02_5_bookshelf.c index 2e4b29c9704..9eb2a11a771 100644 --- a/src/world/area_nok/nok_02/nok_02_5_bookshelf.c +++ b/src/world/area_nok/nok_02/nok_02_5_bookshelf.c @@ -1,9 +1,9 @@ #include "nok_02.h" EvtScript N(EVS_Setup_Bookshelf) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH1_00A1, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_CH1_00A1, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_nok/nok_02/nok_02_6_npc.c b/src/world/area_nok/nok_02/nok_02_6_npc.c index c304b25504c..95c69401d13 100644 --- a/src/world/area_nok/nok_02/nok_02_6_npc.c +++ b/src/world/area_nok/nok_02/nok_02_6_npc.c @@ -25,27 +25,27 @@ s32 N(LetterList_Kolorado)[] = { }; EvtScript N(EVS_LetterPrompt_Kolorado) = { - EVT_CALL(N(LetterDelivery_Init), + Call(N(LetterDelivery_Init), NPC_Kolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, ITEM_LETTER_TO_KOLORADO, ITEM_NONE, MSG_CH1_0097, MSG_CH1_0098, MSG_CH1_0099, MSG_CH1_009A, - EVT_PTR(N(LetterList_Kolorado))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) - EVT_RETURN - EVT_END + Ref(N(LetterList_Kolorado))) + ExecWait(N(EVS_DoLetterDelivery)) + Return + End }; EvtScript N(EVS_LetterReward_Kolorado) = { - EVT_IF_EQ(LVarC, DELIVERY_ACCEPTED) + IfEq(LVarC, DELIVERY_ACCEPTED) EVT_GIVE_STAR_PIECE() - EVT_END_IF - EVT_RETURN - EVT_END + EndIf + Return + End }; EvtScript N(EVS_DoNothing) = { - EVT_RETURN - EVT_END + Return + End }; #include "../common/GetIntoShell.inc.c" @@ -53,184 +53,184 @@ EvtScript N(EVS_DoNothing) = { #include "world/common/todo/SwitchToPartner.inc.c" EvtScript N(EVS_NpcInteract_Kooper) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH1_PROMISED_TO_HELP_KOOPER) - EVT_SET(GB_StoryProgress, STORY_CH1_PROMISED_TO_HELP_KOOPER) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH1_00B4, 160, 40) - EVT_CALL(GetPlayerPos, LVarA, LVarB, LVarC) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVarA, LVarB, LVarC) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, -180) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 375) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 17, EVT_FLOAT(-5.5)) + IfLt(GB_StoryProgress, STORY_CH1_PROMISED_TO_HELP_KOOPER) + Set(GB_StoryProgress, STORY_CH1_PROMISED_TO_HELP_KOOPER) + Call(ShowMessageAtScreenPos, MSG_CH1_00B4, 160, 40) + Call(GetPlayerPos, LVarA, LVarB, LVarC) + Call(UseSettingsFrom, CAM_DEFAULT, LVarA, LVarB, LVarC) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, -180) + Call(SetCamDistance, CAM_DEFAULT, 375) + Call(SetCamPitch, CAM_DEFAULT, 17, Float(-5.5)) #if VERSION_PAL - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4 / DT)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4 / DT)) #else - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 4) + Call(SetCamSpeed, CAM_DEFAULT, 4) #endif - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetGroupVisibility, MODEL_g111, MODEL_GROUP_VISIBLE) - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(PlaySoundAt, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT, 0, 0, -180) - EVT_CALL(MakeLerp, 0, 90, 15, EASING_COS_FAST_OVERSHOOT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o185, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_END_THREAD - EVT_THREAD - EVT_CALL(PlayerMoveTo, -25, -130, 10 * DT) - EVT_CALL(PlayerFaceNpc, NPC_Kooper, FALSE) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(SwitchToPartner), 1) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(NpcMoveTo, NPC_PARTNER, -55, -130, 15 * DT) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Kooper, 0) - EVT_CALL(EnablePartnerAI) - EVT_END_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Kooper, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcPos, NPC_Kooper, 0, 0, -207) - EVT_CALL(SetNpcAnimation, NPC_Kooper, ANIM_KooperWithoutShell_Idle) - EVT_WAIT(35 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kooper, ANIM_KooperWithoutShell_Run) - EVT_THREAD - EVT_LOOP(30 * DT) - EVT_CALL(PlayerFaceNpc, NPC_Kooper, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(NpcMoveTo, NPC_Kooper, 0, -148, 20 * DT) - EVT_THREAD - EVT_CALL(MakeLerp, 90, 0, 30, EASING_COS_IN_OUT) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o185, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT, 0, 0, -180) - EVT_CALL(SetGroupVisibility, MODEL_g111, MODEL_GROUP_HIDDEN) - EVT_END_THREAD - EVT_CALL(NpcMoveTo, NPC_Kooper, 25, -130, 10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kooper, ANIM_KooperWithoutShell_Idle) - EVT_CALL(NpcFacePlayer, NPC_Kooper, 0) - EVT_CALL(SetNpcFlagBits, NPC_Kooper, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Kooper, ANIM_KooperWithoutShell_Celebrate, ANIM_KooperWithoutShell_Idle, 0, MSG_CH1_00B5) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_WAIT(15 * DT) - EVT_CALL(EndSpeech, NPC_Kooper, ANIM_KooperWithoutShell_Talk, ANIM_KooperWithoutShell_Idle, 0) - EVT_CALL(SetNpcAnimation, NPC_Kooper, ANIM_KooperWithoutShell_Celebrate) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kooper, ANIM_KooperWithoutShell_Idle) - EVT_CALL(EndSpeech, NPC_Kooper, ANIM_KooperWithoutShell_Talk, ANIM_KooperWithoutShell_Idle, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetGroupVisibility, MODEL_g111, MODEL_GROUP_VISIBLE) + Thread + Wait(10 * DT) + Call(PlaySoundAt, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT, 0, 0, -180) + Call(MakeLerp, 0, 90, 15, EASING_COS_FAST_OVERSHOOT) + Label(10) + Call(UpdateLerp) + Call(RotateModel, MODEL_o185, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + EndThread + Thread + Call(PlayerMoveTo, -25, -130, 10 * DT) + Call(PlayerFaceNpc, NPC_Kooper, FALSE) + EndThread + Thread + Call(N(SwitchToPartner), 1) + Call(DisablePartnerAI, 0) + Call(NpcMoveTo, NPC_PARTNER, -55, -130, 15 * DT) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Kooper, 0) + Call(EnablePartnerAI) + EndThread + Call(SetNpcFlagBits, NPC_Kooper, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcPos, NPC_Kooper, 0, 0, -207) + Call(SetNpcAnimation, NPC_Kooper, ANIM_KooperWithoutShell_Idle) + Wait(35 * DT) + Call(SetNpcAnimation, NPC_Kooper, ANIM_KooperWithoutShell_Run) + Thread + Loop(30 * DT) + Call(PlayerFaceNpc, NPC_Kooper, FALSE) + Wait(1) + EndLoop + EndThread + Call(NpcMoveTo, NPC_Kooper, 0, -148, 20 * DT) + Thread + Call(MakeLerp, 90, 0, 30, EASING_COS_IN_OUT) + Label(20) + Call(UpdateLerp) + Call(RotateModel, MODEL_o185, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Call(PlaySoundAt, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT, 0, 0, -180) + Call(SetGroupVisibility, MODEL_g111, MODEL_GROUP_HIDDEN) + EndThread + Call(NpcMoveTo, NPC_Kooper, 25, -130, 10 * DT) + Call(SetNpcAnimation, NPC_Kooper, ANIM_KooperWithoutShell_Idle) + Call(NpcFacePlayer, NPC_Kooper, 0) + Call(SetNpcFlagBits, NPC_Kooper, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Kooper, ANIM_KooperWithoutShell_Celebrate, ANIM_KooperWithoutShell_Idle, 0, MSG_CH1_00B5) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + Wait(15 * DT) + Call(EndSpeech, NPC_Kooper, ANIM_KooperWithoutShell_Talk, ANIM_KooperWithoutShell_Idle, 0) + Call(SetNpcAnimation, NPC_Kooper, ANIM_KooperWithoutShell_Celebrate) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Kooper, ANIM_KooperWithoutShell_Idle) + Call(EndSpeech, NPC_Kooper, ANIM_KooperWithoutShell_Talk, ANIM_KooperWithoutShell_Idle, 0) #if VERSION_PAL - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(6 / DT), 30, EVT_FLOAT(225.0), EVT_FLOAT(17.0), EVT_FLOAT(-8.5)) + Call(AdjustCam, CAM_DEFAULT, Float(6 / DT), 30, Float(225.0), Float(17.0), Float(-8.5)) #else - EVT_CALL(AdjustCam, CAM_DEFAULT, 6, 30, EVT_FLOAT(225.0), EVT_FLOAT(17.0), EVT_FLOAT(-8.5)) + Call(AdjustCam, CAM_DEFAULT, 6, 30, Float(225.0), Float(17.0), Float(-8.5)) #endif - EVT_WAIT(5 * DT) - EVT_CALL(SpeakToPlayer, NPC_Kooper, ANIM_KooperWithoutShell_Talk, ANIM_KooperWithoutShell_Idle, 0, MSG_CH1_00B6) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kooper, ANIM_KooperWithoutShell_Bow) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kooper, ANIM_KooperWithoutShell_Idle) - EVT_CALL(EndSpeech, NPC_Kooper, ANIM_KooperWithoutShell_Talk, ANIM_KooperWithoutShell_Idle, 0) + Wait(5 * DT) + Call(SpeakToPlayer, NPC_Kooper, ANIM_KooperWithoutShell_Talk, ANIM_KooperWithoutShell_Idle, 0, MSG_CH1_00B6) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Kooper, ANIM_KooperWithoutShell_Bow) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Kooper, ANIM_KooperWithoutShell_Idle) + Call(EndSpeech, NPC_Kooper, ANIM_KooperWithoutShell_Talk, ANIM_KooperWithoutShell_Idle, 0) #if VERSION_PAL - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4 / DT), -30, EVT_FLOAT(225.0), EVT_FLOAT(17.0), EVT_FLOAT(-8.5)) + Call(AdjustCam, CAM_DEFAULT, Float(4 / DT), -30, Float(225.0), Float(17.0), Float(-8.5)) #else - EVT_CALL(AdjustCam, CAM_DEFAULT, 4, -30, EVT_FLOAT(225.0), EVT_FLOAT(17.0), EVT_FLOAT(-8.5)) + Call(AdjustCam, CAM_DEFAULT, 4, -30, Float(225.0), Float(17.0), Float(-8.5)) #endif - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_WAIT(3 * DT) - EVT_CALL(PlayerFaceNpc, NPC_PARTNER, FALSE) - EVT_END_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH1_00B7) - EVT_CALL(EnablePartnerAI) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(90.0), 0, EVT_FLOAT(375.0), EVT_FLOAT(17.0), EVT_FLOAT(-5.5)) - EVT_WAIT(10 * DT) - EVT_CALL(PlayerFaceNpc, NPC_Kooper, FALSE) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Kooper, ANIM_KooperWithoutShell_Talk, ANIM_KooperWithoutShell_Idle, 0, MSG_CH1_00B8) - EVT_CALL(BindNpcInteract, NPC_Kooper, EVT_PTR(N(EVS_NpcInteract_Kooper))) - EVT_THREAD + Wait(10 * DT) + Thread + Wait(3 * DT) + Call(PlayerFaceNpc, NPC_PARTNER, FALSE) + EndThread + Call(DisablePartnerAI, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH1_00B7) + Call(EnablePartnerAI) + Call(AdjustCam, CAM_DEFAULT, Float(90.0), 0, Float(375.0), Float(17.0), Float(-5.5)) + Wait(10 * DT) + Call(PlayerFaceNpc, NPC_Kooper, FALSE) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Kooper, ANIM_KooperWithoutShell_Talk, ANIM_KooperWithoutShell_Idle, 0, MSG_CH1_00B8) + Call(BindNpcInteract, NPC_Kooper, Ref(N(EVS_NpcInteract_Kooper))) + Thread #if VERSION_PAL - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) + Call(ResetCam, CAM_DEFAULT, Float(3.0 / DT)) #else - EVT_CALL(ResetCam, CAM_DEFAULT, 3) + Call(ResetCam, CAM_DEFAULT, 3) #endif - EVT_END_THREAD - EVT_RETURN - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH1_FUZZY_THIEF_HID_IN_TREE) - EVT_CALL(SpeakToPlayer, NPC_Kooper, ANIM_KooperWithoutShell_Talk, ANIM_KooperWithoutShell_Idle, 0, MSG_CH1_00BA) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Kooper, ANIM_KooperWithoutShell_Talk, ANIM_KooperWithoutShell_Idle, 0, MSG_CH1_00BB) - EVT_END_IF - EVT_RETURN - EVT_END + EndThread + Return + EndIf + IfLt(GB_StoryProgress, STORY_CH1_FUZZY_THIEF_HID_IN_TREE) + Call(SpeakToPlayer, NPC_Kooper, ANIM_KooperWithoutShell_Talk, ANIM_KooperWithoutShell_Idle, 0, MSG_CH1_00BA) + Else + Call(SpeakToPlayer, NPC_Kooper, ANIM_KooperWithoutShell_Talk, ANIM_KooperWithoutShell_Idle, 0, MSG_CH1_00BB) + EndIf + Return + End }; EvtScript N(EVS_Scene_MeetKooper) = { - EVT_EXEC_WAIT(N(EVS_NpcInteract_Kooper)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_NpcInteract_Kooper)) + Return + End }; EvtScript N(EVS_FuzzyBoss_PlayerEntersKoopersHouse) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH1_FUZZY_THIEF_LEFT_TOWN) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(MF_FuzzyBossTaunt, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(MF_FuzzyBossTaunt, TRUE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SpeakToPlayer, NPC_FuzzyBoss, ANIM_Fuzzy_Anim0C, ANIM_Fuzzy_Idle, 0, MSG_CH1_00B9) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetNpcAnimation, NPC_FuzzyBoss, ANIM_Fuzzy_Walk) - EVT_CALL(GetNpcPos, NPC_FuzzyBoss, LVarA, LVarB, LVarC) - EVT_SET(LVarD, LVarA) - EVT_ADD(LVarD, -5) - EVT_LABEL(10) - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_KoopersShell, 2) - EVT_CALL(NpcJump0, NPC_KoopersShell, LVarD, 0, LVarC, 12 * DT) - EVT_END_THREAD - EVT_WAIT(1) - EVT_CALL(SetNpcJumpscale, NPC_FuzzyBoss, 2) - EVT_CALL(PlaySoundAtNpc, NPC_FuzzyBoss, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_FuzzyBoss, LVarA, 0, LVarC, 12 * DT) - EVT_CALL(IsPlayerWithin, 0, -400, 130, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(10) - EVT_END_IF - EVT_SET(GB_StoryProgress, STORY_CH1_FUZZY_THIEF_LEFT_TOWN) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 0) - EVT_SET(LVarD, -514) - EVT_SET(LVarE, 15 * DT) - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_KoopersShell, 2) - EVT_CALL(NpcJump0, NPC_KoopersShell, LVarB, LVarC, LVarD, LVarE) - EVT_END_THREAD - EVT_WAIT(1) - EVT_CALL(SetNpcJumpscale, NPC_FuzzyBoss, 2) - EVT_CALL(PlaySoundAtNpc, NPC_FuzzyBoss, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_FuzzyBoss, LVarB, LVarC, LVarD, LVarE) - EVT_CALL(SetNpcFlagBits, NPC_FuzzyBoss, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_KoopersShell, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcPos, NPC_FuzzyBoss, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_KoopersShell, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH1_FUZZY_THIEF_LEFT_TOWN) + Return + EndIf + IfEq(MF_FuzzyBossTaunt, TRUE) + Return + EndIf + Set(MF_FuzzyBossTaunt, TRUE) + Call(DisablePlayerInput, TRUE) + Call(SpeakToPlayer, NPC_FuzzyBoss, ANIM_Fuzzy_Anim0C, ANIM_Fuzzy_Idle, 0, MSG_CH1_00B9) + Call(DisablePlayerInput, FALSE) + Call(SetNpcAnimation, NPC_FuzzyBoss, ANIM_Fuzzy_Walk) + Call(GetNpcPos, NPC_FuzzyBoss, LVarA, LVarB, LVarC) + Set(LVarD, LVarA) + Add(LVarD, -5) + Label(10) + Thread + Call(SetNpcJumpscale, NPC_KoopersShell, 2) + Call(NpcJump0, NPC_KoopersShell, LVarD, 0, LVarC, 12 * DT) + EndThread + Wait(1) + Call(SetNpcJumpscale, NPC_FuzzyBoss, 2) + Call(PlaySoundAtNpc, NPC_FuzzyBoss, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_FuzzyBoss, LVarA, 0, LVarC, 12 * DT) + Call(IsPlayerWithin, 0, -400, 130, LVar0) + IfEq(LVar0, 0) + Goto(10) + EndIf + Set(GB_StoryProgress, STORY_CH1_FUZZY_THIEF_LEFT_TOWN) + Set(LVarB, 0) + Set(LVarC, 0) + Set(LVarD, -514) + Set(LVarE, 15 * DT) + Thread + Call(SetNpcJumpscale, NPC_KoopersShell, 2) + Call(NpcJump0, NPC_KoopersShell, LVarB, LVarC, LVarD, LVarE) + EndThread + Wait(1) + Call(SetNpcJumpscale, NPC_FuzzyBoss, 2) + Call(PlaySoundAtNpc, NPC_FuzzyBoss, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_FuzzyBoss, LVarB, LVarC, LVarD, LVarE) + Call(SetNpcFlagBits, NPC_FuzzyBoss, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_KoopersShell, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcPos, NPC_FuzzyBoss, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_KoopersShell, NPC_DISPOSE_LOCATION) + Return + End }; Vec2i N(FuzzyJumpPath1)[] = { @@ -276,365 +276,365 @@ Vec2i N(FuzzyJumpPath2)[] = { }; EvtScript N(EVS_NpcIdle_MiscFuzzy1) = { - EVT_LABEL(100) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_ARRIVED_AT_KOOPA_VILLAGE) - EVT_WAIT(8) - EVT_GOTO(100) - EVT_END_IF - EVT_USE_BUF(EVT_PTR(N(FuzzyJumpPath1))) - EVT_SET(LVar1, 200) - EVT_BUF_READ2(LVar0, LVar2) - EVT_CALL(SetNpcPos, NPC_MiscFuzzy1, LVar0, LVar1, LVar2) - EVT_LABEL(0) - EVT_USE_BUF(EVT_PTR(N(FuzzyJumpPath1))) - EVT_LOOP(18) - EVT_SET(LVar1, 0) - EVT_BUF_READ2(LVar0, LVar2) - EVT_CALL(RandInt, 10, LVar3) - EVT_ADD(LVar3, 15) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_B, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_MiscFuzzy1, LVar0, LVar1, LVar2, LVar3) - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(100) + IfLt(GB_StoryProgress, STORY_CH1_ARRIVED_AT_KOOPA_VILLAGE) + Wait(8) + Goto(100) + EndIf + UseBuf(Ref(N(FuzzyJumpPath1))) + Set(LVar1, 200) + BufRead2(LVar0, LVar2) + Call(SetNpcPos, NPC_MiscFuzzy1, LVar0, LVar1, LVar2) + Label(0) + UseBuf(Ref(N(FuzzyJumpPath1))) + Loop(18) + Set(LVar1, 0) + BufRead2(LVar0, LVar2) + Call(RandInt, 10, LVar3) + Add(LVar3, 15) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_B, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_MiscFuzzy1, LVar0, LVar1, LVar2, LVar3) + EndLoop + Goto(0) + Return + End }; EvtScript N(EVS_MiscFuzzyFlee) = { - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_CALL(MakeItemEntity, ITEM_COIN, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Fuzzy_Hurt) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_B, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 25) - EVT_ADD(LVar0, 40) - EVT_ADD(LVar2, -40) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Fuzzy_Hurt) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_B, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 15) - EVT_ADD(LVar0, 30) - EVT_ADD(LVar2, -30) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Fuzzy_Anim09) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_B, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 13) - EVT_ADD(LVar0, 20) - EVT_ADD(LVar2, -20) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_B, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 11) - EVT_ADD(LVar0, 10) - EVT_ADD(LVar2, -10) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_B, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 9) - EVT_ADD(LVar0, 80) - EVT_ADD(LVar2, -80) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Fuzzy_Run) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_B, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 15) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Thread + Call(MakeItemEntity, ITEM_COIN, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) + EndThread + Call(SetNpcAnimation, NPC_SELF, ANIM_Fuzzy_Hurt) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_B, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 25) + Add(LVar0, 40) + Add(LVar2, -40) + Call(SetNpcAnimation, NPC_SELF, ANIM_Fuzzy_Hurt) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_B, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 15) + Add(LVar0, 30) + Add(LVar2, -30) + Call(SetNpcAnimation, NPC_SELF, ANIM_Fuzzy_Anim09) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_B, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 13) + Add(LVar0, 20) + Add(LVar2, -20) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_B, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 11) + Add(LVar0, 10) + Add(LVar2, -10) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_B, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 9) + Add(LVar0, 80) + Add(LVar2, -80) + Call(SetNpcAnimation, NPC_SELF, ANIM_Fuzzy_Run) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_B, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 15) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Return + End }; EvtScript N(EVS_NpcHit_MiscFuzzy1) = { - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_MiscFuzzyFlee))) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_CANT_INTERACT | ENEMY_FLAG_IGNORE_PARTNER, 1) - EVT_RETURN - EVT_END + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_MiscFuzzyFlee))) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_CANT_INTERACT | ENEMY_FLAG_IGNORE_PARTNER, 1) + Return + End }; EvtScript N(EVS_NpcIdle_MiscFuzzy2) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) - EVT_RETURN - EVT_END_IF - EVT_LABEL(100) - EVT_IF_EQ(AF_NOK_13, FALSE) - EVT_WAIT(1) - EVT_GOTO(100) - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_SELF, 438, 150, 155) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_C, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 438, 0, 150, 10) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_C, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 402, 0, 160, 15) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_C, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 384, 0, 160, 7) - EVT_LABEL(0) - EVT_USE_BUF(EVT_PTR(N(FuzzyJumpPath2))) - EVT_LOOP(18) - EVT_SET(LVar1, 0) - EVT_BUF_READ2(LVar0, LVar2) - EVT_CALL(RandInt, 9, LVar3) - EVT_ADD(LVar3, 13) - EVT_MULF(LVar0, EVT_FLOAT(0.9)) - EVT_MULF(LVar2, EVT_FLOAT(0.9)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_C, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, LVar3) - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) + Return + EndIf + Label(100) + IfEq(AF_NOK_13, FALSE) + Wait(1) + Goto(100) + EndIf + Call(SetNpcPos, NPC_SELF, 438, 150, 155) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_C, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 438, 0, 150, 10) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_C, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 402, 0, 160, 15) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_C, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 384, 0, 160, 7) + Label(0) + UseBuf(Ref(N(FuzzyJumpPath2))) + Loop(18) + Set(LVar1, 0) + BufRead2(LVar0, LVar2) + Call(RandInt, 9, LVar3) + Add(LVar3, 13) + MulF(LVar0, Float(0.9)) + MulF(LVar2, Float(0.9)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_C, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, LVar3) + EndLoop + Goto(0) + Return + End }; EvtScript N(EVS_NpcHit_MiscFuzzy2) = { - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_MiscFuzzyFlee))) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_CANT_INTERACT | ENEMY_FLAG_IGNORE_PARTNER, 1) - EVT_RETURN - EVT_END + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_MiscFuzzyFlee))) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_CANT_INTERACT | ENEMY_FLAG_IGNORE_PARTNER, 1) + Return + End }; EvtScript N(EVS_NpcInit_MiscFuzzy1) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MiscFuzzy1))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_MiscFuzzy1))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_MiscFuzzy1))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_MiscFuzzy1))) + Return + End }; EvtScript N(EVS_NpcInit_MiscFuzzy2) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MiscFuzzy2))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_MiscFuzzy2))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_MiscFuzzy2))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_MiscFuzzy2))) + Return + End }; EvtScript N(EVS_NpcInit_Fuzzy_Later) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MiscFuzzy2))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_MiscFuzzy2))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_MiscFuzzy2))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_MiscFuzzy2))) + Return + End }; EvtScript N(EVS_BreakBlock_DropShell) = { - EVT_IF_EQ(GF_NOK02_RecoveredShellB, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_NOK02_RecoveredShellB, TRUE) - EVT_CALL(BindNpcAI, NPC_Koopa_02, EVT_PTR(N(EVS_DoNothing))) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(NpcJump0, NPC_KoopaShell_02, 227, 0, 247, 20) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaShell_02, SOUND_ITEM_BOUNCE, SOUND_SPACE_DEFAULT) - EVT_CALL(PlayerFaceNpc, NPC_KoopaShell_02, FALSE) - EVT_CALL(NpcFaceNpc, NPC_Koopa_02, NPC_KoopaShell_02, 0) - EVT_CALL(SetNpcFlagBits, NPC_Koopa_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_ADD(LVar0, -1) - EVT_ADD(LVar2, -1) - EVT_CALL(GetNpcPos, NPC_Koopa_02, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcAnimation, NPC_Koopa_02, ANIM_KoopaWithoutShell_Happy) - EVT_CALL(NpcJump0, NPC_Koopa_02, LVar0, 0, LVar2, 15) - EVT_CALL(GetNpcPos, NPC_KoopaShell_02, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 1) - EVT_ADD(LVar2, 1) - EVT_CALL(SetNpcAnimation, NPC_Koopa_02, ANIM_KoopaWithoutShell_Run) - EVT_CALL(NpcMoveTo, NPC_Koopa_02, LVar0, LVar2, 15) - EVT_CALL(SetNpcAnimation, NPC_Koopa_02, ANIM_KoopaWithoutShell_Idle) - EVT_CALL(GetNpcPos, NPC_Koopa_02, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 1) - EVT_ADD(LVar2, 1) - EVT_ADD(LVar1, 10) - EVT_CALL(NpcJump0, NPC_KoopaShell_02, LVar0, LVar1, LVar2, 10) - EVT_CALL(PlayerFaceNpc, NPC_Koopa_02, FALSE) - EVT_CALL(NpcFacePlayer, NPC_Koopa_02, 0) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Koopa_02, ANIM_KoopaWithoutShell_Still) - EVT_CALL(EnableNpcBlur, NPC_KoopaShell_02, TRUE) - EVT_CALL(GetNpcPos, NPC_Koopa_02, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 1) - EVT_ADD(LVar2, 1) - EVT_ADD(LVar1, 20) - EVT_SET(LVar3, NPC_KoopaShell_02) - EVT_SET(LVar4, NPC_Koopa_02) - EVT_EXEC(N(EVS_GetIntoShell)) - EVT_CALL(InterpNpcYaw, LVar3, 60, 0) - EVT_CALL(NpcJump0, NPC_KoopaShell_02, LVar0, LVar1, LVar2, 30) - EVT_CALL(SetNpcPos, NPC_KoopaShell_02, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcSprite, NPC_Koopa_02, ANIM_Koopa_Idle) - EVT_CALL(SetNpcFlagBits, NPC_Koopa_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Koopa_02, ANIM_Koopa_Still) - EVT_WAIT(4) - EVT_CALL(EnableNpcBlur, NPC_KoopaShell_02, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Koopa_02, ANIM_Koopa_Happy) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_Koopa_02, ANIM_Koopa_Idle) - EVT_CALL(SpeakToPlayer, NPC_Koopa_02, ANIM_Koopa_Happy, ANIM_Koopa_Idle, 0, MSG_CH1_005E) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + IfEq(GF_NOK02_RecoveredShellB, TRUE) + Return + EndIf + Set(GF_NOK02_RecoveredShellB, TRUE) + Call(BindNpcAI, NPC_Koopa_02, Ref(N(EVS_DoNothing))) + Call(DisablePlayerInput, TRUE) + Call(NpcJump0, NPC_KoopaShell_02, 227, 0, 247, 20) + Call(PlaySoundAtNpc, NPC_KoopaShell_02, SOUND_ITEM_BOUNCE, SOUND_SPACE_DEFAULT) + Call(PlayerFaceNpc, NPC_KoopaShell_02, FALSE) + Call(NpcFaceNpc, NPC_Koopa_02, NPC_KoopaShell_02, 0) + Call(SetNpcFlagBits, NPC_Koopa_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Add(LVar0, -1) + Add(LVar2, -1) + Call(GetNpcPos, NPC_Koopa_02, LVar0, LVar1, LVar2) + Call(SetNpcAnimation, NPC_Koopa_02, ANIM_KoopaWithoutShell_Happy) + Call(NpcJump0, NPC_Koopa_02, LVar0, 0, LVar2, 15) + Call(GetNpcPos, NPC_KoopaShell_02, LVar0, LVar1, LVar2) + Add(LVar0, 1) + Add(LVar2, 1) + Call(SetNpcAnimation, NPC_Koopa_02, ANIM_KoopaWithoutShell_Run) + Call(NpcMoveTo, NPC_Koopa_02, LVar0, LVar2, 15) + Call(SetNpcAnimation, NPC_Koopa_02, ANIM_KoopaWithoutShell_Idle) + Call(GetNpcPos, NPC_Koopa_02, LVar0, LVar1, LVar2) + Add(LVar0, 1) + Add(LVar2, 1) + Add(LVar1, 10) + Call(NpcJump0, NPC_KoopaShell_02, LVar0, LVar1, LVar2, 10) + Call(PlayerFaceNpc, NPC_Koopa_02, FALSE) + Call(NpcFacePlayer, NPC_Koopa_02, 0) + Wait(10) + Call(SetNpcAnimation, NPC_Koopa_02, ANIM_KoopaWithoutShell_Still) + Call(EnableNpcBlur, NPC_KoopaShell_02, TRUE) + Call(GetNpcPos, NPC_Koopa_02, LVar0, LVar1, LVar2) + Add(LVar0, 1) + Add(LVar2, 1) + Add(LVar1, 20) + Set(LVar3, NPC_KoopaShell_02) + Set(LVar4, NPC_Koopa_02) + Exec(N(EVS_GetIntoShell)) + Call(InterpNpcYaw, LVar3, 60, 0) + Call(NpcJump0, NPC_KoopaShell_02, LVar0, LVar1, LVar2, 30) + Call(SetNpcPos, NPC_KoopaShell_02, NPC_DISPOSE_LOCATION) + Call(SetNpcSprite, NPC_Koopa_02, ANIM_Koopa_Idle) + Call(SetNpcFlagBits, NPC_Koopa_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcAnimation, NPC_Koopa_02, ANIM_Koopa_Still) + Wait(4) + Call(EnableNpcBlur, NPC_KoopaShell_02, TRUE) + Call(SetNpcAnimation, NPC_Koopa_02, ANIM_Koopa_Happy) + Wait(30) + Call(SetNpcAnimation, NPC_Koopa_02, ANIM_Koopa_Idle) + Call(SpeakToPlayer, NPC_Koopa_02, ANIM_Koopa_Happy, ANIM_Koopa_Idle, 0, MSG_CH1_005E) + Call(DisablePlayerInput, FALSE) + Return + End }; #include "npcs_crisis.inc.c" #include "npcs_normal.inc.c" EvtScript N(EVS_AnimateDoor_KoloradoHouse) = { - EVT_CALL(PlaySoundAtCollider, LVar9, SOUND_BASIC_DOOR_OPEN, 0) - EVT_CALL(MakeLerp, 0, 80, 15, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_CALL(MakeLerp, 80, 0, 15, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, LVar9, SOUND_BASIC_DOOR_CLOSE, 0) - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, LVar9, SOUND_BASIC_DOOR_OPEN, 0) + Call(MakeLerp, 0, 80, 15, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, LVarA, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(20) + Call(MakeLerp, 80, 0, 15, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, LVarA, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, LVar9, SOUND_BASIC_DOOR_CLOSE, 0) + Return + End }; EvtScript N(EVS_KoloradoWife_FetchFromHouse) = { - EVT_CALL(EnableModel, MODEL_g98, TRUE) - EVT_CALL(EnableGroup, MODEL_g109, TRUE) - EVT_CALL(EnableGroup, MODEL_g47, TRUE) - EVT_SET(LVarA, MODEL_g42) - EVT_SET(LVar9, COLLIDER_o310) - EVT_EXEC(N(EVS_AnimateDoor_KoloradoHouse)) - EVT_CALL(NpcMoveTo, NPC_KoloradoWife, -314, -94, 10) - EVT_WAIT(10) - EVT_CALL(NpcMoveTo, NPC_KoloradoWife, -304, -161, 20) - EVT_WAIT(100) - EVT_EXEC(N(EVS_AnimateDoor_KoloradoHouse)) - EVT_WAIT(10) - EVT_CALL(NpcMoveTo, NPC_KoloradoWife, -308, -102, 20) - EVT_WAIT(10) - EVT_CALL(NpcMoveTo, NPC_KoloradoWife, -338, -85, 20) - EVT_CALL(NpcFacePlayer, NPC_KoloradoWife, 0) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_KoloradoWife, ANIM_KoloradoWife_Idle) - EVT_CALL(EnableModel, MODEL_g98, FALSE) - EVT_CALL(EnableGroup, MODEL_g109, FALSE) - EVT_CALL(EnableGroup, MODEL_g47, FALSE) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_g98, TRUE) + Call(EnableGroup, MODEL_g109, TRUE) + Call(EnableGroup, MODEL_g47, TRUE) + Set(LVarA, MODEL_g42) + Set(LVar9, COLLIDER_o310) + Exec(N(EVS_AnimateDoor_KoloradoHouse)) + Call(NpcMoveTo, NPC_KoloradoWife, -314, -94, 10) + Wait(10) + Call(NpcMoveTo, NPC_KoloradoWife, -304, -161, 20) + Wait(100) + Exec(N(EVS_AnimateDoor_KoloradoHouse)) + Wait(10) + Call(NpcMoveTo, NPC_KoloradoWife, -308, -102, 20) + Wait(10) + Call(NpcMoveTo, NPC_KoloradoWife, -338, -85, 20) + Call(NpcFacePlayer, NPC_KoloradoWife, 0) + Wait(20) + Call(SetNpcAnimation, NPC_KoloradoWife, ANIM_KoloradoWife_Idle) + Call(EnableModel, MODEL_g98, FALSE) + Call(EnableGroup, MODEL_g109, FALSE) + Call(EnableGroup, MODEL_g47, FALSE) + Return + End }; EvtScript N(EVS_KoloradoWife_FetchFromOffice) = { - EVT_SET(LVarA, MODEL_g41) - EVT_SET(LVar9, COLLIDER_o314) - EVT_CALL(NpcMoveTo, NPC_KoloradoWife, -277, -186, 20) - EVT_EXEC(N(EVS_AnimateDoor_KoloradoHouse)) - EVT_WAIT(10) - EVT_CALL(NpcMoveTo, NPC_KoloradoWife, -265, -261, 20) - EVT_WAIT(100) - EVT_EXEC(N(EVS_AnimateDoor_KoloradoHouse)) - EVT_WAIT(10) - EVT_CALL(NpcMoveTo, NPC_KoloradoWife, -277, -186, 20) - EVT_WAIT(10) - EVT_CALL(NpcMoveTo, NPC_KoloradoWife, -328, -180, 20) - EVT_CALL(NpcFacePlayer, NPC_KoloradoWife, 0) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_KoloradoWife, ANIM_KoloradoWife_Idle) - EVT_RETURN - EVT_END + Set(LVarA, MODEL_g41) + Set(LVar9, COLLIDER_o314) + Call(NpcMoveTo, NPC_KoloradoWife, -277, -186, 20) + Exec(N(EVS_AnimateDoor_KoloradoHouse)) + Wait(10) + Call(NpcMoveTo, NPC_KoloradoWife, -265, -261, 20) + Wait(100) + Exec(N(EVS_AnimateDoor_KoloradoHouse)) + Wait(10) + Call(NpcMoveTo, NPC_KoloradoWife, -277, -186, 20) + Wait(10) + Call(NpcMoveTo, NPC_KoloradoWife, -328, -180, 20) + Call(NpcFacePlayer, NPC_KoloradoWife, 0) + Wait(20) + Call(SetNpcAnimation, NPC_KoloradoWife, ANIM_KoloradoWife_Idle) + Return + End }; EvtScript N(EVS_KoloradoWife_FetchKoopaLegends) = { - EVT_CALL(SetNpcFlagBits, NPC_KoloradoWife, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SpeakToPlayer, NPC_KoloradoWife, ANIM_KoloradoWife_Talk, ANIM_KoloradoWife_Idle, 0, MSG_CH1_0090) - EVT_CALL(SetNpcAnimation, NPC_KoloradoWife, ANIM_KoloradoWife_Walk) - EVT_IF_GE(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_EXEC_WAIT(N(EVS_KoloradoWife_FetchFromHouse)) - EVT_ELSE - EVT_IF_EQ(GF_NOK11_Defeated_KentC, TRUE) - EVT_EXEC_WAIT(N(EVS_KoloradoWife_FetchFromHouse)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_KoloradoWife_FetchFromOffice)) - EVT_END_IF - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_KoloradoWife, ANIM_KoloradoWife_Talk, ANIM_KoloradoWife_Idle, 0, MSG_CH1_0091) + Call(SetNpcFlagBits, NPC_KoloradoWife, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SpeakToPlayer, NPC_KoloradoWife, ANIM_KoloradoWife_Talk, ANIM_KoloradoWife_Idle, 0, MSG_CH1_0090) + Call(SetNpcAnimation, NPC_KoloradoWife, ANIM_KoloradoWife_Walk) + IfGe(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) + ExecWait(N(EVS_KoloradoWife_FetchFromHouse)) + Else + IfEq(GF_NOK11_Defeated_KentC, TRUE) + ExecWait(N(EVS_KoloradoWife_FetchFromHouse)) + Else + ExecWait(N(EVS_KoloradoWife_FetchFromOffice)) + EndIf + EndIf + Call(SpeakToPlayer, NPC_KoloradoWife, ANIM_KoloradoWife_Talk, ANIM_KoloradoWife_Idle, 0, MSG_CH1_0091) EVT_GIVE_KEY_REWARD(ITEM_KOOT_KOOPA_LEGENDS) - EVT_CALL(SpeakToPlayer, NPC_KoloradoWife, ANIM_KoloradoWife_Talk, ANIM_KoloradoWife_Idle, 0, MSG_CH1_0092) - EVT_CALL(SetNpcFlagBits, NPC_KoloradoWife, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_KoloradoWife, ANIM_KoloradoWife_Talk, ANIM_KoloradoWife_Idle, 0, MSG_CH1_0092) + Call(SetNpcFlagBits, NPC_KoloradoWife, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_KoloradoWife) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH1_KOOPER_JOINED_PARTY) - EVT_IF_EQ(GF_NOK02_KoloradoWife_FuzzyComplaint, FALSE) - EVT_SET(GF_NOK02_KoloradoWife_FuzzyComplaint, TRUE) - EVT_CALL(SpeakToPlayer, NPC_KoloradoWife, ANIM_KoloradoWife_Talk, ANIM_KoloradoWife_Idle, 0, MSG_CH1_0088) - EVT_RETURN - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_KoloradoWife, ANIM_KoloradoWife_Talk, ANIM_KoloradoWife_Idle, 0, MSG_CH1_0089) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_KoloradoWife, ANIM_KoloradoWife_Talk, ANIM_KoloradoWife_Idle, 0, MSG_CH1_008A) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_KoloradoWife, ANIM_KoloradoWife_Talk, ANIM_KoloradoWife_Idle, 0, MSG_CH1_008B) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_KoloradoWife, ANIM_KoloradoWife_Talk, ANIM_KoloradoWife_Idle, 0, MSG_CH1_008C) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_KoloradoWife, ANIM_KoloradoWife_Talk, ANIM_KoloradoWife_Idle, 0, MSG_CH1_008D) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_NOK11_Defeated_KentC, FALSE) - EVT_CALL(SpeakToPlayer, NPC_KoloradoWife, ANIM_KoloradoWife_Talk, ANIM_KoloradoWife_Idle, 0, MSG_CH1_008E) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_KoloradoWife, ANIM_KoloradoWife_Talk, ANIM_KoloradoWife_Idle, 0, MSG_CH1_008F) - EVT_END_IF - EVT_CASE_GE(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_KoloradoWife, ANIM_KoloradoWife_Talk, ANIM_KoloradoWife_Idle, 0, MSG_CH1_008F) - EVT_END_SWITCH - EVT_IF_EQ(GB_KootFavor_Current, KOOT_FAVOR_CH1_2) - EVT_IF_EQ(GF_NOK02_Gift_KoopaLegends, FALSE) - EVT_SET(GF_NOK02_Gift_KoopaLegends, TRUE) - EVT_EXEC_WAIT(N(EVS_MarioSalute)) - EVT_EXEC_WAIT(N(EVS_KoloradoWife_FetchKoopaLegends)) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH1_KOOPER_JOINED_PARTY) + IfEq(GF_NOK02_KoloradoWife_FuzzyComplaint, FALSE) + Set(GF_NOK02_KoloradoWife_FuzzyComplaint, TRUE) + Call(SpeakToPlayer, NPC_KoloradoWife, ANIM_KoloradoWife_Talk, ANIM_KoloradoWife_Idle, 0, MSG_CH1_0088) + Return + EndIf + Call(SpeakToPlayer, NPC_KoloradoWife, ANIM_KoloradoWife_Talk, ANIM_KoloradoWife_Idle, 0, MSG_CH1_0089) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_KoloradoWife, ANIM_KoloradoWife_Talk, ANIM_KoloradoWife_Idle, 0, MSG_CH1_008A) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_KoloradoWife, ANIM_KoloradoWife_Talk, ANIM_KoloradoWife_Idle, 0, MSG_CH1_008B) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_KoloradoWife, ANIM_KoloradoWife_Talk, ANIM_KoloradoWife_Idle, 0, MSG_CH1_008C) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_KoloradoWife, ANIM_KoloradoWife_Talk, ANIM_KoloradoWife_Idle, 0, MSG_CH1_008D) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + IfEq(GF_NOK11_Defeated_KentC, FALSE) + Call(SpeakToPlayer, NPC_KoloradoWife, ANIM_KoloradoWife_Talk, ANIM_KoloradoWife_Idle, 0, MSG_CH1_008E) + Else + Call(SpeakToPlayer, NPC_KoloradoWife, ANIM_KoloradoWife_Talk, ANIM_KoloradoWife_Idle, 0, MSG_CH1_008F) + EndIf + CaseGe(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_KoloradoWife, ANIM_KoloradoWife_Talk, ANIM_KoloradoWife_Idle, 0, MSG_CH1_008F) + EndSwitch + IfEq(GB_KootFavor_Current, KOOT_FAVOR_CH1_2) + IfEq(GF_NOK02_Gift_KoopaLegends, FALSE) + Set(GF_NOK02_Gift_KoopaLegends, TRUE) + ExecWait(N(EVS_MarioSalute)) + ExecWait(N(EVS_KoloradoWife_FetchKoopaLegends)) + EndIf + EndIf + Return + End }; EvtScript N(EVS_NpcInit_KoloradoWife) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_KoloradoWife))) - EVT_IF_GE(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(SetNpcPos, NPC_SELF, -338, 0, -85) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GF_NOK11_Defeated_KentC, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, -338, 0, -85) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_KoloradoWife))) + IfGe(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) + Call(SetNpcPos, NPC_SELF, -338, 0, -85) + Return + EndIf + IfEq(GF_NOK11_Defeated_KentC, TRUE) + Call(SetNpcPos, NPC_SELF, -338, 0, -85) + Return + EndIf + Return + End }; EvtScript N(EVS_NpcInit_KoopaKoot) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_KoopaKoot))) - EVT_EXEC(N(EVS_SetupKootFavors)) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_KoopaKoot))) + Exec(N(EVS_SetupKootFavors)) + Return + End }; EvtScript N(EVS_NpcInit_Koopa_Epilogue) = { - EVT_CALL(SetNpcPos, NPC_SELF, -25, 10, -50) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, -25, 10, -50) + Call(SetNpcYaw, NPC_SELF, 90) + Return + End }; EvtScript N(EVS_NpcInit_Bombette_Epilogue) = { - EVT_CALL(SetNpcPos, NPC_SELF, 25, 0, -50) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, 25, 0, -50) + Call(SetNpcYaw, NPC_SELF, 270) + Return + End }; EvtScript N(EVS_NpcInit_KoloradoWife_Epilogue) = { - EVT_CALL(SetNpcPos, NPC_SELF, -150, 0, -50) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, -150, 0, -50) + Call(SetNpcYaw, NPC_SELF, 90) + Return + End }; NpcData N(NpcData_Crisis)[] = { diff --git a/src/world/area_nok/nok_02/nok_02_7_demo.c b/src/world/area_nok/nok_02/nok_02_7_demo.c index 9392639b01a..f340e0336b3 100644 --- a/src/world/area_nok/nok_02/nok_02_7_demo.c +++ b/src/world/area_nok/nok_02/nok_02_7_demo.c @@ -2,151 +2,151 @@ #include "world/partners.h" EvtScript N(EVS_ProvideDemoInputs) = { - EVT_CALL(DemoJoystickXY, 6, 4) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 29, 20) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 64, 34) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 68, 41) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 67, 44) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 65, 52) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 63, 60) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 62, 65) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 62, 66) - EVT_WAIT(3) - EVT_CALL(DemoJoystickXY, 62, 67) - EVT_WAIT(2) - EVT_CALL(DemoJoystickXY, 61, 69) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 24, 79) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 1, 83) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 2, 84) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 2, 82) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 3, 43) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -1, 0) - EVT_WAIT(3) - EVT_CALL(DemoSetButtons, BUTTON_A) - EVT_WAIT(8) - EVT_CALL(DemoSetButtons, 0) - EVT_WAIT(75) - EVT_CALL(DemoJoystickXY, 7, 2) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 39, 8) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 74, 10) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 74, 12) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 74, 19) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 72, 29) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 68, 42) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 65, 54) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 63, 62) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 62, 66) - EVT_WAIT(3) - EVT_CALL(DemoJoystickXY, 59, 70) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 53, 72) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 52, 73) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 43, 75) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 35, 77) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 33, 77) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 34, 77) - EVT_WAIT(3) - EVT_CALL(DemoJoystickXY, 33, 77) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 18, 78) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 11, 79) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 4, 32) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -1, 1) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, -1, 0) - EVT_WAIT(1) - EVT_CALL(DemoSetButtons, BUTTON_A) - EVT_WAIT(6) - EVT_CALL(DemoSetButtons, 0) - EVT_WAIT(53) - EVT_CALL(DemoJoystickXY, 2, 0) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 11, 1) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 28, 5) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 57, 15) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 68, 26) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 69, 33) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 65, 51) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 63, 61) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 62, 66) - EVT_WAIT(4) - EVT_CALL(DemoJoystickXY, 61, 66) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 52, 68) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 38, 72) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 30, 74) - EVT_WAIT(2) - EVT_CALL(DemoJoystickXY, 27, 67) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 0, 0) - EVT_WAIT(10) - EVT_IF_EQ(GF_DemoSceneDone, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_DemoSceneDone, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("nok_02"), nok_02_ENTRY_2, TRANSITION_END_DEMO_SCENE_BLACK) - EVT_WAIT(110) - EVT_RETURN - EVT_END + Call(DemoJoystickXY, 6, 4) + Wait(1) + Call(DemoJoystickXY, 29, 20) + Wait(1) + Call(DemoJoystickXY, 64, 34) + Wait(1) + Call(DemoJoystickXY, 68, 41) + Wait(1) + Call(DemoJoystickXY, 67, 44) + Wait(1) + Call(DemoJoystickXY, 65, 52) + Wait(1) + Call(DemoJoystickXY, 63, 60) + Wait(1) + Call(DemoJoystickXY, 62, 65) + Wait(1) + Call(DemoJoystickXY, 62, 66) + Wait(3) + Call(DemoJoystickXY, 62, 67) + Wait(2) + Call(DemoJoystickXY, 61, 69) + Wait(1) + Call(DemoJoystickXY, 24, 79) + Wait(1) + Call(DemoJoystickXY, 1, 83) + Wait(1) + Call(DemoJoystickXY, 2, 84) + Wait(1) + Call(DemoJoystickXY, 2, 82) + Wait(1) + Call(DemoJoystickXY, 3, 43) + Wait(1) + Call(DemoJoystickXY, -1, 0) + Wait(3) + Call(DemoSetButtons, BUTTON_A) + Wait(8) + Call(DemoSetButtons, 0) + Wait(75) + Call(DemoJoystickXY, 7, 2) + Wait(1) + Call(DemoJoystickXY, 39, 8) + Wait(1) + Call(DemoJoystickXY, 74, 10) + Wait(1) + Call(DemoJoystickXY, 74, 12) + Wait(1) + Call(DemoJoystickXY, 74, 19) + Wait(1) + Call(DemoJoystickXY, 72, 29) + Wait(1) + Call(DemoJoystickXY, 68, 42) + Wait(1) + Call(DemoJoystickXY, 65, 54) + Wait(1) + Call(DemoJoystickXY, 63, 62) + Wait(1) + Call(DemoJoystickXY, 62, 66) + Wait(3) + Call(DemoJoystickXY, 59, 70) + Wait(1) + Call(DemoJoystickXY, 53, 72) + Wait(1) + Call(DemoJoystickXY, 52, 73) + Wait(1) + Call(DemoJoystickXY, 43, 75) + Wait(1) + Call(DemoJoystickXY, 35, 77) + Wait(1) + Call(DemoJoystickXY, 33, 77) + Wait(1) + Call(DemoJoystickXY, 34, 77) + Wait(3) + Call(DemoJoystickXY, 33, 77) + Wait(1) + Call(DemoJoystickXY, 18, 78) + Wait(1) + Call(DemoJoystickXY, 11, 79) + Wait(1) + Call(DemoJoystickXY, 4, 32) + Wait(1) + Call(DemoJoystickXY, -1, 1) + Wait(1) + Call(DemoJoystickXY, -1, 0) + Wait(1) + Call(DemoSetButtons, BUTTON_A) + Wait(6) + Call(DemoSetButtons, 0) + Wait(53) + Call(DemoJoystickXY, 2, 0) + Wait(1) + Call(DemoJoystickXY, 11, 1) + Wait(1) + Call(DemoJoystickXY, 28, 5) + Wait(1) + Call(DemoJoystickXY, 57, 15) + Wait(1) + Call(DemoJoystickXY, 68, 26) + Wait(1) + Call(DemoJoystickXY, 69, 33) + Wait(1) + Call(DemoJoystickXY, 65, 51) + Wait(1) + Call(DemoJoystickXY, 63, 61) + Wait(1) + Call(DemoJoystickXY, 62, 66) + Wait(4) + Call(DemoJoystickXY, 61, 66) + Wait(1) + Call(DemoJoystickXY, 52, 68) + Wait(1) + Call(DemoJoystickXY, 38, 72) + Wait(1) + Call(DemoJoystickXY, 30, 74) + Wait(2) + Call(DemoJoystickXY, 27, 67) + Wait(1) + Call(DemoJoystickXY, 0, 0) + Wait(10) + IfEq(GF_DemoSceneDone, TRUE) + Return + EndIf + Set(GF_DemoSceneDone, TRUE) + Call(GotoMapSpecial, Ref("nok_02"), nok_02_ENTRY_2, TRANSITION_END_DEMO_SCENE_BLACK) + Wait(110) + Return + End }; EvtScript N(EVS_MonitorDemoState) = { - EVT_WAIT(10) - EVT_LOOP(0) - EVT_CALL(GetDemoState, LVar0) - EVT_IF_EQ(LVar0, DEMO_STATE_CHANGE_MAP) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(GF_DemoSceneDone, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_DemoSceneDone, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("nok_02"), nok_02_ENTRY_2, TRANSITION_END_DEMO_SCENE_WHITE) - EVT_WAIT(110) - EVT_RETURN - EVT_END + Wait(10) + Loop(0) + Call(GetDemoState, LVar0) + IfEq(LVar0, DEMO_STATE_CHANGE_MAP) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(GF_DemoSceneDone, TRUE) + Return + EndIf + Set(GF_DemoSceneDone, TRUE) + Call(GotoMapSpecial, Ref("nok_02"), nok_02_ENTRY_2, TRANSITION_END_DEMO_SCENE_WHITE) + Wait(110) + Return + End }; s32 N(DemoInitState) = 0; @@ -176,10 +176,10 @@ API_CALLABLE(N(SetupDemoScene)) { } EvtScript N(EVS_SetupDemo) = { - EVT_CALL(N(SetupDemoScene)) - EVT_SET(GF_DemoSceneDone, FALSE) - EVT_EXEC(N(EVS_MonitorDemoState)) - EVT_EXEC(N(EVS_ProvideDemoInputs)) - EVT_RETURN - EVT_END + Call(N(SetupDemoScene)) + Set(GF_DemoSceneDone, FALSE) + Exec(N(EVS_MonitorDemoState)) + Exec(N(EVS_ProvideDemoInputs)) + Return + End }; diff --git a/src/world/area_nok/nok_02/nok_02_8_koot_favors.c b/src/world/area_nok/nok_02/nok_02_8_koot_favors.c index f54633852f0..dbfa5a96bc8 100644 --- a/src/world/area_nok/nok_02/nok_02_8_koot_favors.c +++ b/src/world/area_nok/nok_02/nok_02_8_koot_favors.c @@ -351,206 +351,206 @@ API_CALLABLE(N(MakeFavorItemList)) { } EvtScript N(EVS_NpcInteract_KoopaKoot) = { - EVT_CALL(func_802CF56C, 1) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00A2) - EVT_GOTO(90) - EVT_END_IF - EVT_IF_EQ(GB_KootFavor_State, KOOT_FAVOR_STATE_2) - EVT_IF_EQ(GF_MAC02_KootFavor_CurrentComplete, FALSE) - EVT_CALL(N(MakeFavorItemList), GB_KootFavor_Current) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LVar0, EVT_PTR(N(FavorItemList))) - EVT_SET(LVar1, 9) - EVT_EXEC_WAIT(N(EVS_ChooseKeyItem_Koot)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(-1) - EVT_CASE_EQ(0) - EVT_CASE_DEFAULT - EVT_SET(GF_MAC02_KootFavor_CurrentComplete, TRUE) - EVT_END_SWITCH - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(FavorItemList))) - EVT_SET(LVar1, 9) - EVT_EXEC_WAIT(N(EVS_ChooseItem_Koot)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(-1) - EVT_CASE_EQ(0) - EVT_CASE_DEFAULT - EVT_SET(GF_MAC02_KootFavor_CurrentComplete, TRUE) - EVT_END_SWITCH - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(GF_MAC02_KootFavor_CurrentComplete, TRUE) - EVT_CALL(N(SetFavorComplete), GB_KootFavor_Current) - EVT_ADD(GB_KootFavor_Completed, 1) - EVT_CALL(N(IsFourthMultipleFavor), GB_KootFavor_Completed) - EVT_IF_FALSE(LVar0) - EVT_CALL(N(GetFavorMessages), GB_KootFavor_Current) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, LVar1) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00B1) + Call(func_802CF56C, 1) + IfLt(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) + Call(SpeakToPlayer, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00A2) + Goto(90) + EndIf + IfEq(GB_KootFavor_State, KOOT_FAVOR_STATE_2) + IfEq(GF_MAC02_KootFavor_CurrentComplete, FALSE) + Call(N(MakeFavorItemList), GB_KootFavor_Current) + IfEq(LVar0, 0) + Set(LVar0, Ref(N(FavorItemList))) + Set(LVar1, 9) + ExecWait(N(EVS_ChooseKeyItem_Koot)) + Switch(LVar0) + CaseEq(-1) + CaseEq(0) + CaseDefault + Set(GF_MAC02_KootFavor_CurrentComplete, TRUE) + EndSwitch + Else + Set(LVar0, Ref(N(FavorItemList))) + Set(LVar1, 9) + ExecWait(N(EVS_ChooseItem_Koot)) + Switch(LVar0) + CaseEq(-1) + CaseEq(0) + CaseDefault + Set(GF_MAC02_KootFavor_CurrentComplete, TRUE) + EndSwitch + EndIf + EndIf + IfEq(GF_MAC02_KootFavor_CurrentComplete, TRUE) + Call(N(SetFavorComplete), GB_KootFavor_Current) + Add(GB_KootFavor_Completed, 1) + Call(N(IsFourthMultipleFavor), GB_KootFavor_Completed) + IfFalse(LVar0) + Call(N(GetFavorMessages), GB_KootFavor_Current) + Call(SpeakToPlayer, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, LVar1) + Call(ContinueSpeech, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00B1) #define NAME_SUFFIX _Koot EVT_GIVE_COIN() #define NAME_SUFFIX - EVT_ELSE - EVT_CALL(N(GetFavorMessages), GB_KootFavor_Current) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, LVar2) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00B1) - EVT_CALL(ShowGotItem, ITEM_STAR_PIECE, TRUE, ITEM_PICKUP_FLAG_3_STAR_PIECES) - EVT_CALL(AddStarPieces, 3) - EVT_END_IF - EVT_SWITCH(GB_KootFavor_Completed) + Else + Call(N(GetFavorMessages), GB_KootFavor_Current) + Call(SpeakToPlayer, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, LVar2) + Call(ContinueSpeech, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00B1) + Call(ShowGotItem, ITEM_STAR_PIECE, TRUE, ITEM_PICKUP_FLAG_3_STAR_PIECES) + Call(AddStarPieces, 3) + EndIf + Switch(GB_KootFavor_Completed) #define NAME_SUFFIX _Koot - EVT_CASE_EQ(1 + KOOT_FAVOR_CH1_2) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00B2) + CaseEq(1 + KOOT_FAVOR_CH1_2) + Call(SpeakToPlayer, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00B2) EVT_GIVE_KEY_REWARD(ITEM_SILVER_CREDIT) - EVT_CASE_EQ(1 + KOOT_FAVOR_CH4_2) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00B3) + CaseEq(1 + KOOT_FAVOR_CH4_2) + Call(SpeakToPlayer, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00B3) EVT_GIVE_KEY_REWARD(ITEM_GOLD_CREDIT) - EVT_CALL(FindKeyItem, ITEM_SILVER_CREDIT, LVar1) - EVT_CALL(RemoveKeyItemAt, LVar1) + Call(FindKeyItem, ITEM_SILVER_CREDIT, LVar1) + Call(RemoveKeyItemAt, LVar1) #define NAME_SUFFIX - EVT_END_SWITCH - EVT_SET(GB_KootFavor_State, KOOT_FAVOR_STATE_0) - EVT_GOTO(90) - EVT_END_IF + EndSwitch + Set(GB_KootFavor_State, KOOT_FAVOR_STATE_0) + Goto(90) + EndIf // ask about current favor progress - EVT_IF_EQ(GF_KootFavor_LeftKoopaArea, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00AD) - EVT_CALL(ShowChoice, MSG_Choice_0012) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) // go on - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00AE) - EVT_CASE_EQ(1) // give up - EVT_CALL(N(GiveUpFavor), GB_KootFavor_Current) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00B0) - EVT_SET(GB_KootFavor_State, KOOT_FAVOR_STATE_1) - EVT_GOTO(90) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00AF) - EVT_END_IF - EVT_GOTO(50) - EVT_CASE_EQ(2) // forgotten - EVT_CALL(N(GetFavorMessages), GB_KootFavor_Current) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, LVar0) - EVT_END_SWITCH - EVT_ELSE - EVT_IF_EQ(GF_KootFavor_LeftKoopaVillage, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00AA) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00AB) - EVT_END_IF - EVT_CALL(ShowChoice, MSG_Choice_0010) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(N(GetFavorMessages), GB_KootFavor_Current) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, LVar0) - EVT_SET(GF_KootFavor_LeftKoopaVillage, FALSE) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00AC) - EVT_END_IF - EVT_END_IF - EVT_GOTO(90) - EVT_END_IF - EVT_CALL(N(FindNextFavor), GB_KootFavor_Current) - EVT_IF_EQ(LVar0, 0) - EVT_IF_LT(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00A5) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00A6) - EVT_END_IF - EVT_GOTO(90) - EVT_ELSE - EVT_IF_EQ(GB_KootFavor_State, KOOT_FAVOR_STATE_0) - EVT_IF_EQ(GF_NOK02_Met_KoopaKoot, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00A3) - EVT_SET(GF_NOK02_Met_KoopaKoot, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00A4) - EVT_END_IF - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00A7) - EVT_END_IF - EVT_END_IF - EVT_LABEL(50) - EVT_CALL(ShowChoice, MSG_Choice_0010) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00A9) - EVT_CALL(N(GetFavorMessages), GB_KootFavor_Current) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, LVar0) - EVT_SET(GB_KootFavor_State, KOOT_FAVOR_STATE_2) - EVT_SET(GF_KootFavor_LeftKoopaVillage, FALSE) - EVT_SET(GF_MAC02_KootFavor_CurrentComplete, FALSE) - EVT_SET(GF_KootFavor_LeftKoopaArea, FALSE) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00A8) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaKoot_SwingCane) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaKoot_IdleCane) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_KoopaKoot_TalkCane, ANIM_KoopaKoot_IdleCane, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaKoot_StillCane) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaKoot_Idle) - EVT_SET(GB_KootFavor_State, KOOT_FAVOR_STATE_1) - EVT_SET(GB_KootFavor_Current, KOOT_FAVOR_CH1_1) - EVT_END_IF - EVT_LABEL(90) - EVT_CALL(EnablePartnerAI) - EVT_RETURN - EVT_END + IfEq(GF_KootFavor_LeftKoopaArea, TRUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00AD) + Call(ShowChoice, MSG_Choice_0012) + Switch(LVar0) + CaseEq(0) // go on + Call(ContinueSpeech, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00AE) + CaseEq(1) // give up + Call(N(GiveUpFavor), GB_KootFavor_Current) + IfEq(LVar0, 0) + Call(ContinueSpeech, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00B0) + Set(GB_KootFavor_State, KOOT_FAVOR_STATE_1) + Goto(90) + Else + Call(ContinueSpeech, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00AF) + EndIf + Goto(50) + CaseEq(2) // forgotten + Call(N(GetFavorMessages), GB_KootFavor_Current) + Call(ContinueSpeech, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, LVar0) + EndSwitch + Else + IfEq(GF_KootFavor_LeftKoopaVillage, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00AA) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00AB) + EndIf + Call(ShowChoice, MSG_Choice_0010) + IfEq(LVar0, 0) + Call(N(GetFavorMessages), GB_KootFavor_Current) + Call(ContinueSpeech, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, LVar0) + Set(GF_KootFavor_LeftKoopaVillage, FALSE) + Else + Call(ContinueSpeech, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00AC) + EndIf + EndIf + Goto(90) + EndIf + Call(N(FindNextFavor), GB_KootFavor_Current) + IfEq(LVar0, 0) + IfLt(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00A5) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00A6) + EndIf + Goto(90) + Else + IfEq(GB_KootFavor_State, KOOT_FAVOR_STATE_0) + IfEq(GF_NOK02_Met_KoopaKoot, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00A3) + Set(GF_NOK02_Met_KoopaKoot, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00A4) + EndIf + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00A7) + EndIf + EndIf + Label(50) + Call(ShowChoice, MSG_Choice_0010) + IfEq(LVar0, 0) + Call(ContinueSpeech, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00A9) + Call(N(GetFavorMessages), GB_KootFavor_Current) + Call(ContinueSpeech, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, LVar0) + Set(GB_KootFavor_State, KOOT_FAVOR_STATE_2) + Set(GF_KootFavor_LeftKoopaVillage, FALSE) + Set(GF_MAC02_KootFavor_CurrentComplete, FALSE) + Set(GF_KootFavor_LeftKoopaArea, FALSE) + Else + Call(ContinueSpeech, NPC_SELF, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH1_00A8) + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaKoot_SwingCane) + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaKoot_IdleCane) + Call(EndSpeech, NPC_SELF, ANIM_KoopaKoot_TalkCane, ANIM_KoopaKoot_IdleCane, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaKoot_StillCane) + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaKoot_Idle) + Set(GB_KootFavor_State, KOOT_FAVOR_STATE_1) + Set(GB_KootFavor_Current, KOOT_FAVOR_CH1_1) + EndIf + Label(90) + Call(EnablePartnerAI) + Return + End }; EvtScript N(EVS_SetupKootFavors) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) - EVT_GOTO(80) - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_GOTO(75) - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_GOTO(70) - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) - EVT_GOTO(60) - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_GOTO(50) - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH5_RETURNED_TO_TOAD_TOWN) - EVT_GOTO(40) - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH6_RETURNED_TO_TOAD_TOWN) - EVT_GOTO(30) - EVT_END_IF - EVT_SET(GF_NOK02_KootFavor14_Unlocked, TRUE) - EVT_LABEL(20) - EVT_SET(GF_NOK02_KootFavor13_Unlocked, TRUE) - EVT_SET(GF_NOK02_KootFavor12_Unlocked, TRUE) - EVT_SET(GF_NOK02_KootFavor11_Unlocked, TRUE) - EVT_LABEL(30) - EVT_SET(GF_NOK02_KootFavor10_Unlocked, TRUE) - EVT_SET(GF_NOK02_KootFavor0F_Unlocked, TRUE) - EVT_SET(GF_NOK02_KootFavor0E_Unlocked, TRUE) - EVT_LABEL(40) - EVT_SET(GF_NOK02_KootFavor0D_Unlocked, TRUE) - EVT_SET(GF_NOK02_KootFavor0C_Unlocked, TRUE) - EVT_SET(GF_NOK02_KootFavor0B_Unlocked, TRUE) - EVT_LABEL(50) - EVT_SET(GF_NOK02_KootFavor0A_Unlocked, TRUE) - EVT_SET(GF_NOK02_KootFavor09_Unlocked, TRUE) - EVT_SET(GF_NOK02_KootFavor08_Unlocked, TRUE) - EVT_LABEL(60) - EVT_SET(GF_NOK02_KootFavor07_Unlocked, TRUE) - EVT_SET(GF_NOK02_KootFavor06_Unlocked, TRUE) - EVT_SET(GF_NOK02_KootFavor05_Unlocked, TRUE) - EVT_LABEL(70) - EVT_SET(GF_NOK02_KootFavor04_Unlocked, TRUE) - EVT_SET(GF_NOK02_KootFavor03_Unlocked, TRUE) - EVT_SET(GF_NOK02_KootFavor02_Unlocked, TRUE) - EVT_LABEL(75) - EVT_SET(GF_NOK02_KootFavor01_Unlocked, TRUE) - EVT_SET(GF_NOK02_KootFavor00_Unlocked, TRUE) - EVT_LABEL(80) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) + Goto(80) + EndIf + IfLt(GB_StoryProgress, STORY_CH1_STAR_SPRIT_DEPARTED) + Goto(75) + EndIf + IfLt(GB_StoryProgress, STORY_CH2_STAR_SPRIT_DEPARTED) + Goto(70) + EndIf + IfLt(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED) + Goto(60) + EndIf + IfLt(GB_StoryProgress, STORY_CH4_STAR_SPRIT_DEPARTED) + Goto(50) + EndIf + IfLt(GB_StoryProgress, STORY_CH5_RETURNED_TO_TOAD_TOWN) + Goto(40) + EndIf + IfLt(GB_StoryProgress, STORY_CH6_RETURNED_TO_TOAD_TOWN) + Goto(30) + EndIf + Set(GF_NOK02_KootFavor14_Unlocked, TRUE) + Label(20) + Set(GF_NOK02_KootFavor13_Unlocked, TRUE) + Set(GF_NOK02_KootFavor12_Unlocked, TRUE) + Set(GF_NOK02_KootFavor11_Unlocked, TRUE) + Label(30) + Set(GF_NOK02_KootFavor10_Unlocked, TRUE) + Set(GF_NOK02_KootFavor0F_Unlocked, TRUE) + Set(GF_NOK02_KootFavor0E_Unlocked, TRUE) + Label(40) + Set(GF_NOK02_KootFavor0D_Unlocked, TRUE) + Set(GF_NOK02_KootFavor0C_Unlocked, TRUE) + Set(GF_NOK02_KootFavor0B_Unlocked, TRUE) + Label(50) + Set(GF_NOK02_KootFavor0A_Unlocked, TRUE) + Set(GF_NOK02_KootFavor09_Unlocked, TRUE) + Set(GF_NOK02_KootFavor08_Unlocked, TRUE) + Label(60) + Set(GF_NOK02_KootFavor07_Unlocked, TRUE) + Set(GF_NOK02_KootFavor06_Unlocked, TRUE) + Set(GF_NOK02_KootFavor05_Unlocked, TRUE) + Label(70) + Set(GF_NOK02_KootFavor04_Unlocked, TRUE) + Set(GF_NOK02_KootFavor03_Unlocked, TRUE) + Set(GF_NOK02_KootFavor02_Unlocked, TRUE) + Label(75) + Set(GF_NOK02_KootFavor01_Unlocked, TRUE) + Set(GF_NOK02_KootFavor00_Unlocked, TRUE) + Label(80) + Return + End }; diff --git a/src/world/area_nok/nok_02/nok_02_9_foliage.c b/src/world/area_nok/nok_02/nok_02_9_foliage.c index c8e284d4af0..d25c8a618f7 100644 --- a/src/world/area_nok/nok_02/nok_02_9_foliage.c +++ b/src/world/area_nok/nok_02/nok_02_9_foliage.c @@ -37,21 +37,21 @@ SearchBushConfig N(SearchBush_Bush3) = { FoliageModelList N(Bush4_BushModels) = FOLIAGE_MODEL_LIST(MODEL_o446, MODEL_o454, MODEL_o455, MODEL_o456); EvtScript N(EVS_Bush4_HideFlowers) = { - EVT_CALL(EnableModel, MODEL_o454, FALSE) - EVT_CALL(EnableModel, MODEL_o455, FALSE) - EVT_CALL(EnableModel, MODEL_o456, FALSE) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_o454, FALSE) + Call(EnableModel, MODEL_o455, FALSE) + Call(EnableModel, MODEL_o456, FALSE) + Return + End }; EvtScript N(EVS_OnSearchBush4) = { - EVT_CALL(EnableModel, MODEL_o454, TRUE) - EVT_WAIT(10) - EVT_CALL(EnableModel, MODEL_o456, TRUE) - EVT_WAIT(10) - EVT_CALL(EnableModel, MODEL_o455, TRUE) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_o454, TRUE) + Wait(10) + Call(EnableModel, MODEL_o456, TRUE) + Wait(10) + Call(EnableModel, MODEL_o455, TRUE) + Return + End }; SearchBushConfig N(SearchBush_Bush4) = { @@ -62,21 +62,21 @@ SearchBushConfig N(SearchBush_Bush4) = { FoliageModelList N(Bush5_BushModels) = FOLIAGE_MODEL_LIST(MODEL_o447, MODEL_o457, MODEL_o458, MODEL_o459); EvtScript N(EVS_Bush5_HideFlowers) = { - EVT_CALL(EnableModel, MODEL_o457, FALSE) - EVT_CALL(EnableModel, MODEL_o458, FALSE) - EVT_CALL(EnableModel, MODEL_o459, FALSE) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_o457, FALSE) + Call(EnableModel, MODEL_o458, FALSE) + Call(EnableModel, MODEL_o459, FALSE) + Return + End }; EvtScript N(EVS_OnSearchBush5) = { - EVT_CALL(EnableModel, MODEL_o457, TRUE) - EVT_WAIT(10) - EVT_CALL(EnableModel, MODEL_o459, TRUE) - EVT_WAIT(10) - EVT_CALL(EnableModel, MODEL_o458, TRUE) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_o457, TRUE) + Wait(10) + Call(EnableModel, MODEL_o459, TRUE) + Wait(10) + Call(EnableModel, MODEL_o458, TRUE) + Return + End }; SearchBushConfig N(SearchBush_Bush5) = { @@ -107,10 +107,10 @@ FoliageModelList N(Tree1_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o284); FoliageModelList N(Tree1_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o283); EvtScript N(EVS_OnShakeTree1) = { - EVT_WAIT(15) - EVT_SET(AF_NOK_13, TRUE) - EVT_RETURN - EVT_END + Wait(15) + Set(AF_NOK_13, TRUE) + Return + End }; ShakeTreeConfig N(ShakeTree_Tree1) = { @@ -125,23 +125,23 @@ BombTrigger N(BombPos_Tree1) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o332, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o427, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o458, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush4))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o459, 1, 0) - EVT_EXEC(N(EVS_Bush4_HideFlowers)) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush5))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o460, 1, 0) - EVT_EXEC(N(EVS_Bush5_HideFlowers)) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Bush6))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o461, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o346, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(SearchBush_Bush1))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o332, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush2))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o427, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush3))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o458, 1, 0) + Set(LVar0, Ref(N(SearchBush_Bush4))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o459, 1, 0) + Exec(N(EVS_Bush4_HideFlowers)) + Set(LVar0, Ref(N(SearchBush_Bush5))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o460, 1, 0) + Exec(N(EVS_Bush5_HideFlowers)) + Set(LVar0, Ref(N(SearchBush_Bush6))) + BindTrigger(Ref(N(EVS_SearchBush)), TRIGGER_WALL_PRESS_A, COLLIDER_o461, 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o346, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Return + End }; diff --git a/src/world/area_nok/nok_02/npcs_crisis.inc.c b/src/world/area_nok/nok_02/npcs_crisis.inc.c index d3b41e4168c..228667c597f 100644 --- a/src/world/area_nok/nok_02/npcs_crisis.inc.c +++ b/src/world/area_nok/nok_02/npcs_crisis.inc.c @@ -165,358 +165,358 @@ API_CALLABLE(N(ChooseLocationNotNearPlayer)) { } EvtScript N(EVS_NpcInteract_Koopa_02_Crisis) = { - EVT_IF_EQ(GF_NOK02_RecoveredShellB, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Koopa_02, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_005F) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GF_NOK02_StolenShellComplaintB, FALSE) - EVT_SET(GF_NOK02_StolenShellComplaintB, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Koopa_02, ANIM_KoopaWithoutShell_CryTalk, ANIM_KoopaWithoutShell_CryIdle, 0, MSG_CH1_005C) - EVT_RETURN - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_Koopa_02, ANIM_KoopaWithoutShell_CryTalk, ANIM_KoopaWithoutShell_CryIdle, 0, MSG_CH1_005D) - EVT_RETURN - EVT_END + IfEq(GF_NOK02_RecoveredShellB, TRUE) + Call(SpeakToPlayer, NPC_Koopa_02, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_005F) + Return + EndIf + IfEq(GF_NOK02_StolenShellComplaintB, FALSE) + Set(GF_NOK02_StolenShellComplaintB, TRUE) + Call(SpeakToPlayer, NPC_Koopa_02, ANIM_KoopaWithoutShell_CryTalk, ANIM_KoopaWithoutShell_CryIdle, 0, MSG_CH1_005C) + Return + EndIf + Call(SpeakToPlayer, NPC_Koopa_02, ANIM_KoopaWithoutShell_CryTalk, ANIM_KoopaWithoutShell_CryIdle, 0, MSG_CH1_005D) + Return + End }; EvtScript N(EVS_NpcIdle_Koopa_02_Crisis) = { - EVT_IF_EQ(GF_NOK02_RecoveredShellB, TRUE) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_NpcAI_Koopa_Wander)) - EVT_RETURN - EVT_END + IfEq(GF_NOK02_RecoveredShellB, TRUE) + Return + EndIf + ExecWait(N(EVS_NpcAI_Koopa_Wander)) + Return + End }; EvtScript N(EVS_NpcInteract_Koopa_01_Crisis) = { - EVT_IF_EQ(GF_NOK02_RecoveredShellA, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Koopa_01, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0057) - EVT_RETURN - EVT_END_IF - EVT_SUSPEND_THREAD(MV_KoopaChaseThiefScript) - EVT_WAIT(1) - EVT_IF_EQ(GF_NOK02_StolenShellComplaintA, FALSE) - EVT_SET(GF_NOK02_StolenShellComplaintA, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Koopa_01, ANIM_KoopaWithoutShell_CryTalk, ANIM_KoopaWithoutShell_CryIdle, 0, MSG_CH1_0054) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Koopa_01, ANIM_KoopaWithoutShell_CryTalk, ANIM_KoopaWithoutShell_CryIdle, 0, MSG_CH1_0055) - EVT_END_IF - EVT_RESUME_THREAD(MV_KoopaChaseThiefScript) - EVT_RETURN - EVT_END + IfEq(GF_NOK02_RecoveredShellA, TRUE) + Call(SpeakToPlayer, NPC_Koopa_01, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0057) + Return + EndIf + SuspendThread(MV_KoopaChaseThiefScript) + Wait(1) + IfEq(GF_NOK02_StolenShellComplaintA, FALSE) + Set(GF_NOK02_StolenShellComplaintA, TRUE) + Call(SpeakToPlayer, NPC_Koopa_01, ANIM_KoopaWithoutShell_CryTalk, ANIM_KoopaWithoutShell_CryIdle, 0, MSG_CH1_0054) + Else + Call(SpeakToPlayer, NPC_Koopa_01, ANIM_KoopaWithoutShell_CryTalk, ANIM_KoopaWithoutShell_CryIdle, 0, MSG_CH1_0055) + EndIf + ResumeThread(MV_KoopaChaseThiefScript) + Return + End }; EvtScript N(EVS_TetherShellToFuzzy) = { - EVT_LABEL(0) - EVT_CALL(GetNpcPos, NPC_FuzzyThief, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 1) - EVT_CALL(SetNpcPos, NPC_KoopaShell_01, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetNpcPos, NPC_FuzzyThief, LVar0, LVar1, LVar2) + Add(LVar2, 1) + Call(SetNpcPos, NPC_KoopaShell_01, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_FuzzyThief_AvoidCapture) = { - EVT_CALL(GetNpcPointer, NPC_FuzzyThief, LVarF) - EVT_CALL(GetNpcPointer, NPC_Koopa_01, LVarE) - EVT_SET(LVar2, 0) - EVT_LABEL(0) - EVT_CALL(N(IsPlayerOrKoopaNearby), LVarF, LVarE) - EVT_SET(MV_IsPlayerNearbyThief, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_LABEL(1) - EVT_CALL(N(ChooseSafeJumpLocation), LVarF, LVarE) - EVT_CALL(SetNpcFlagBits, NPC_FuzzyThief, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_FuzzyThief, LVarA, 0, LVarB, LVarC) - EVT_CALL(SetNpcFlagBits, NPC_FuzzyThief, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(N(IsPlayerOrKoopaNearby), LVarF, LVarE) - EVT_SET(MV_IsPlayerNearbyThief, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_GOTO(1) - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(GetNpcPointer, NPC_FuzzyThief, LVarF) + Call(GetNpcPointer, NPC_Koopa_01, LVarE) + Set(LVar2, 0) + Label(0) + Call(N(IsPlayerOrKoopaNearby), LVarF, LVarE) + Set(MV_IsPlayerNearbyThief, LVar0) + IfNe(LVar0, 0) + Label(1) + Call(N(ChooseSafeJumpLocation), LVarF, LVarE) + Call(SetNpcFlagBits, NPC_FuzzyThief, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_FuzzyThief, LVarA, 0, LVarB, LVarC) + Call(SetNpcFlagBits, NPC_FuzzyThief, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(N(IsPlayerOrKoopaNearby), LVarF, LVarE) + Set(MV_IsPlayerNearbyThief, LVar0) + IfNe(LVar0, 0) + Goto(1) + EndIf + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_Koopa_01_ChaseThief) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_LABEL(0) - EVT_CALL(GetNpcPos, NPC_KoopaShell_01, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcAnimation, NPC_Koopa_01, LVarF) - EVT_CALL(SetNpcAnimation, NPC_Koopa_01, ANIM_KoopaWithoutShell_CryRun) - EVT_CALL(NpcMoveTo, NPC_Koopa_01, LVar0, LVar2, 30) - EVT_CALL(SetNpcAnimation, NPC_Koopa_01, ANIM_KoopaWithoutShell_CryIdle) - EVT_CALL(RandInt, 20, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_WAIT(LVar0) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0B) + Label(0) + Call(GetNpcPos, NPC_KoopaShell_01, LVar0, LVar1, LVar2) + Call(GetNpcAnimation, NPC_Koopa_01, LVarF) + Call(SetNpcAnimation, NPC_Koopa_01, ANIM_KoopaWithoutShell_CryRun) + Call(NpcMoveTo, NPC_Koopa_01, LVar0, LVar2, 30) + Call(SetNpcAnimation, NPC_Koopa_01, ANIM_KoopaWithoutShell_CryIdle) + Call(RandInt, 20, LVar0) + IfNe(LVar0, 0) + Wait(LVar0) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_Koopa_01_FaceShell) = { - EVT_LABEL(0) - EVT_CALL(NpcFaceNpc, NPC_Koopa_01, NPC_KoopaShell_01, 0) - EVT_WAIT(5) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(NpcFaceNpc, NPC_Koopa_01, NPC_KoopaShell_01, 0) + Wait(5) + Goto(0) + Return + End }; EvtScript N(D_8024BDB0_9E2DD0) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 0) - EVT_LOOP(0) - EVT_CALL(N(IsPlayerWalking)) - EVT_CALL(IsPlayerWithin, -150, 250, 150, LVar1) - EVT_IF_EQ(LVar1, TRUE) - EVT_IF_EQ(LVar0, 1) - EVT_SET(LVar3, 1) - EVT_ELSE - EVT_SET(LVar3, 0) - EVT_WAIT(20) - EVT_END_IF - EVT_ELSE - EVT_SET(LVar3, 0) - EVT_END_IF - EVT_IF_NE(LVar3, LVar4) - EVT_IF_EQ(LVar3, 0) - EVT_EXEC_GET_TID(N(EVS_Koopa_01_ChaseThief), MV_KoopaChaseThiefScript) - EVT_ELSE - EVT_IF_NE(MV_KoopaChaseThiefScript, -1) - EVT_KILL_THREAD(MV_KoopaChaseThiefScript) - EVT_SET(MV_KoopaChaseThiefScript, -1) - EVT_END_IF - EVT_END_IF - EVT_SET(LVar4, LVar3) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0B) + Set(LVar3, 0) + Set(LVar4, 0) + Loop(0) + Call(N(IsPlayerWalking)) + Call(IsPlayerWithin, -150, 250, 150, LVar1) + IfEq(LVar1, TRUE) + IfEq(LVar0, 1) + Set(LVar3, 1) + Else + Set(LVar3, 0) + Wait(20) + EndIf + Else + Set(LVar3, 0) + EndIf + IfNe(LVar3, LVar4) + IfEq(LVar3, 0) + ExecGetTID(N(EVS_Koopa_01_ChaseThief), MV_KoopaChaseThiefScript) + Else + IfNe(MV_KoopaChaseThiefScript, -1) + KillThread(MV_KoopaChaseThiefScript) + Set(MV_KoopaChaseThiefScript, -1) + EndIf + EndIf + Set(LVar4, LVar3) + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_Koopa_01_Crisis) = { - EVT_IF_EQ(GF_NOK02_RecoveredShellA, TRUE) - EVT_CALL(SetNpcPos, NPC_FuzzyThief, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_KoopaShell_01, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcSpeed, NPC_Koopa_01, EVT_FLOAT(3.0)) - EVT_LABEL(5) - EVT_CALL(GetNpcPointer, NPC_Koopa_01, LVarF) - EVT_CALL(N(ChooseLocationNotNearPlayer), LVarF) - EVT_CALL(SetNpcAnimation, NPC_Koopa_01, ANIM_Koopa_Run) - EVT_CALL(NpcMoveTo, NPC_Koopa_01, LVarA, LVarB, 0) - EVT_CALL(SetNpcAnimation, NPC_Koopa_01, ANIM_Koopa_Talk) - EVT_WAIT(10) - EVT_GOTO(5) - EVT_END_IF - EVT_EXEC_GET_TID(N(EVS_TetherShellToFuzzy), LVar9) - EVT_EXEC_GET_TID(N(EVS_FuzzyThief_AvoidCapture), LVar8) - EVT_EXEC_GET_TID(N(EVS_Koopa_01_ChaseThief), MV_KoopaChaseThiefScript) - EVT_EXEC_GET_TID(N(D_8024BDB0_9E2DD0), MV_Unk_01) - EVT_LABEL(10) - EVT_IF_EQ(GF_NOK02_RecoveredShellA, FALSE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_ELSE - EVT_KILL_THREAD(LVar9) - EVT_KILL_THREAD(LVar8) - EVT_IS_THREAD_RUNNING(MV_KoopaChaseThiefScript, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_KILL_THREAD(MV_KoopaChaseThiefScript) - EVT_END_IF - EVT_IS_THREAD_RUNNING(MV_Unk_01, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_KILL_THREAD(MV_Unk_01) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_FuzzyThief, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(GetNpcPos, NPC_KoopaShell_01, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcAnimation, NPC_FuzzyThief, ANIM_Fuzzy_Hurt) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_FuzzyThief, LVar0, 0, LVar2, 25) - EVT_ADD(LVar0, 40) - EVT_ADD(LVar2, -40) - EVT_CALL(SetNpcAnimation, NPC_FuzzyThief, ANIM_Fuzzy_Hurt) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_FuzzyThief, LVar0, 0, LVar2, 15) - EVT_ADD(LVar0, 30) - EVT_CALL(SetNpcAnimation, NPC_FuzzyThief, ANIM_Fuzzy_Anim09) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_FuzzyThief, LVar0, 0, LVar2, 13) - EVT_ADD(LVar0, 20) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_FuzzyThief, LVar0, 0, LVar2, 11) - EVT_ADD(LVar0, 10) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_FuzzyThief, LVar0, 0, LVar2, 9) - EVT_ADD(LVar0, 160) - EVT_CALL(SetNpcAnimation, NPC_FuzzyThief, ANIM_Fuzzy_Run) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_FuzzyThief, LVar0, 0, LVar2, 15) - EVT_CALL(SetNpcFlagBits, NPC_FuzzyThief, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcPos, NPC_FuzzyThief, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_CALL(GetNpcPos, NPC_KoopaShell_01, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_KoopaShell_01, LVar0, 0, LVar2, 15) - EVT_LOOP(70) - EVT_CALL(PlayerFaceNpc, NPC_FuzzyThief, FALSE) - EVT_CALL(NpcFaceNpc, NPC_Koopa_01, NPC_FuzzyThief, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlayerFaceNpc, NPC_KoopaShell_01, FALSE) - EVT_CALL(NpcFaceNpc, NPC_Koopa_01, NPC_KoopaShell_01, 0) - EVT_THREAD - EVT_CALL(AdjustCam, CAM_DEFAULT, 4, 0, EVT_FLOAT(300.0), EVT_FLOAT(17.0), EVT_FLOAT(-7.0)) - EVT_END_THREAD - EVT_CALL(GetNpcPos, NPC_Koopa_01, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcAnimation, NPC_Koopa_01, ANIM_KoopaWithoutShell_Happy) - EVT_CALL(NpcJump0, NPC_Koopa_01, LVar0, 0, LVar2, 15) - EVT_CALL(GetNpcPos, NPC_KoopaShell_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 1) - EVT_ADD(LVar2, 1) - EVT_CALL(SetNpcAnimation, NPC_Koopa_01, ANIM_KoopaWithoutShell_Run) - EVT_CALL(NpcMoveTo, NPC_Koopa_01, LVar0, LVar2, 15) - EVT_CALL(SetNpcAnimation, NPC_Koopa_01, ANIM_KoopaWithoutShell_Idle) - EVT_CALL(GetNpcPos, NPC_Koopa_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 1) - EVT_ADD(LVar2, 1) - EVT_ADD(LVar1, 10) - EVT_CALL(NpcJump0, NPC_KoopaShell_01, LVar0, LVar1, LVar2, 10) - EVT_CALL(PlayerFaceNpc, NPC_Koopa_01, FALSE) - EVT_CALL(NpcFacePlayer, NPC_Koopa_01, 0) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Koopa_01, ANIM_KoopaWithoutShell_Still) - EVT_CALL(EnableNpcBlur, NPC_KoopaShell_01, TRUE) - EVT_CALL(GetNpcPos, NPC_Koopa_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 1) - EVT_ADD(LVar2, 1) - EVT_ADD(LVar1, 20) - EVT_SET(LVar3, NPC_KoopaShell_01) - EVT_SET(LVar4, NPC_Koopa_01) - EVT_EXEC(N(EVS_GetIntoShell)) - EVT_CALL(InterpNpcYaw, LVar3, 60, 0) - EVT_CALL(NpcJump0, NPC_KoopaShell_01, LVar0, LVar1, LVar2, 30) - EVT_CALL(SetNpcPos, NPC_KoopaShell_01, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcSprite, NPC_Koopa_01, ANIM_Koopa_Idle) - EVT_CALL(SetNpcFlagBits, NPC_Koopa_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Koopa_01, ANIM_Koopa_Still) - EVT_WAIT(4) - EVT_CALL(EnableNpcBlur, NPC_KoopaShell_01, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Koopa_01, ANIM_Koopa_Happy) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_Koopa_01, ANIM_Koopa_Idle) - EVT_CALL(SpeakToPlayer, NPC_Koopa_01, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0056) - EVT_THREAD - EVT_CALL(ResetCam, CAM_DEFAULT, 4) - EVT_END_THREAD - EVT_WAIT(30) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Koopa_01_Crisis))) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_NOK02_RecoveredShellA, TRUE) + Call(SetNpcPos, NPC_FuzzyThief, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_KoopaShell_01, NPC_DISPOSE_LOCATION) + Call(SetNpcSpeed, NPC_Koopa_01, Float(3.0)) + Label(5) + Call(GetNpcPointer, NPC_Koopa_01, LVarF) + Call(N(ChooseLocationNotNearPlayer), LVarF) + Call(SetNpcAnimation, NPC_Koopa_01, ANIM_Koopa_Run) + Call(NpcMoveTo, NPC_Koopa_01, LVarA, LVarB, 0) + Call(SetNpcAnimation, NPC_Koopa_01, ANIM_Koopa_Talk) + Wait(10) + Goto(5) + EndIf + ExecGetTID(N(EVS_TetherShellToFuzzy), LVar9) + ExecGetTID(N(EVS_FuzzyThief_AvoidCapture), LVar8) + ExecGetTID(N(EVS_Koopa_01_ChaseThief), MV_KoopaChaseThiefScript) + ExecGetTID(N(D_8024BDB0_9E2DD0), MV_Unk_01) + Label(10) + IfEq(GF_NOK02_RecoveredShellA, FALSE) + Wait(1) + Goto(10) + Else + KillThread(LVar9) + KillThread(LVar8) + IsThreadRunning(MV_KoopaChaseThiefScript, LVar0) + IfEq(LVar0, 1) + KillThread(MV_KoopaChaseThiefScript) + EndIf + IsThreadRunning(MV_Unk_01, LVar0) + IfEq(LVar0, 1) + KillThread(MV_Unk_01) + EndIf + Call(DisablePlayerInput, TRUE) + Thread + Call(SetNpcFlagBits, NPC_FuzzyThief, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(GetNpcPos, NPC_KoopaShell_01, LVar0, LVar1, LVar2) + Call(SetNpcAnimation, NPC_FuzzyThief, ANIM_Fuzzy_Hurt) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_FuzzyThief, LVar0, 0, LVar2, 25) + Add(LVar0, 40) + Add(LVar2, -40) + Call(SetNpcAnimation, NPC_FuzzyThief, ANIM_Fuzzy_Hurt) + Wait(10) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_FuzzyThief, LVar0, 0, LVar2, 15) + Add(LVar0, 30) + Call(SetNpcAnimation, NPC_FuzzyThief, ANIM_Fuzzy_Anim09) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_FuzzyThief, LVar0, 0, LVar2, 13) + Add(LVar0, 20) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_FuzzyThief, LVar0, 0, LVar2, 11) + Add(LVar0, 10) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_FuzzyThief, LVar0, 0, LVar2, 9) + Add(LVar0, 160) + Call(SetNpcAnimation, NPC_FuzzyThief, ANIM_Fuzzy_Run) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FUZZY_HOP_A, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_FuzzyThief, LVar0, 0, LVar2, 15) + Call(SetNpcFlagBits, NPC_FuzzyThief, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcPos, NPC_FuzzyThief, NPC_DISPOSE_LOCATION) + EndThread + Call(GetNpcPos, NPC_KoopaShell_01, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_KoopaShell_01, LVar0, 0, LVar2, 15) + Loop(70) + Call(PlayerFaceNpc, NPC_FuzzyThief, FALSE) + Call(NpcFaceNpc, NPC_Koopa_01, NPC_FuzzyThief, 0) + Wait(1) + EndLoop + Call(PlayerFaceNpc, NPC_KoopaShell_01, FALSE) + Call(NpcFaceNpc, NPC_Koopa_01, NPC_KoopaShell_01, 0) + Thread + Call(AdjustCam, CAM_DEFAULT, 4, 0, Float(300.0), Float(17.0), Float(-7.0)) + EndThread + Call(GetNpcPos, NPC_Koopa_01, LVar0, LVar1, LVar2) + Call(SetNpcAnimation, NPC_Koopa_01, ANIM_KoopaWithoutShell_Happy) + Call(NpcJump0, NPC_Koopa_01, LVar0, 0, LVar2, 15) + Call(GetNpcPos, NPC_KoopaShell_01, LVar0, LVar1, LVar2) + Add(LVar0, 1) + Add(LVar2, 1) + Call(SetNpcAnimation, NPC_Koopa_01, ANIM_KoopaWithoutShell_Run) + Call(NpcMoveTo, NPC_Koopa_01, LVar0, LVar2, 15) + Call(SetNpcAnimation, NPC_Koopa_01, ANIM_KoopaWithoutShell_Idle) + Call(GetNpcPos, NPC_Koopa_01, LVar0, LVar1, LVar2) + Add(LVar0, 1) + Add(LVar2, 1) + Add(LVar1, 10) + Call(NpcJump0, NPC_KoopaShell_01, LVar0, LVar1, LVar2, 10) + Call(PlayerFaceNpc, NPC_Koopa_01, FALSE) + Call(NpcFacePlayer, NPC_Koopa_01, 0) + Wait(10) + Call(SetNpcAnimation, NPC_Koopa_01, ANIM_KoopaWithoutShell_Still) + Call(EnableNpcBlur, NPC_KoopaShell_01, TRUE) + Call(GetNpcPos, NPC_Koopa_01, LVar0, LVar1, LVar2) + Add(LVar0, 1) + Add(LVar2, 1) + Add(LVar1, 20) + Set(LVar3, NPC_KoopaShell_01) + Set(LVar4, NPC_Koopa_01) + Exec(N(EVS_GetIntoShell)) + Call(InterpNpcYaw, LVar3, 60, 0) + Call(NpcJump0, NPC_KoopaShell_01, LVar0, LVar1, LVar2, 30) + Call(SetNpcPos, NPC_KoopaShell_01, NPC_DISPOSE_LOCATION) + Call(SetNpcSprite, NPC_Koopa_01, ANIM_Koopa_Idle) + Call(SetNpcFlagBits, NPC_Koopa_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcAnimation, NPC_Koopa_01, ANIM_Koopa_Still) + Wait(4) + Call(EnableNpcBlur, NPC_KoopaShell_01, TRUE) + Call(SetNpcAnimation, NPC_Koopa_01, ANIM_Koopa_Happy) + Wait(30) + Call(SetNpcAnimation, NPC_Koopa_01, ANIM_Koopa_Idle) + Call(SpeakToPlayer, NPC_Koopa_01, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0056) + Thread + Call(ResetCam, CAM_DEFAULT, 4) + EndThread + Wait(30) + Call(DisablePlayerInput, FALSE) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcIdle_Koopa_01_Crisis))) + Return + EndIf + Return + End }; EvtScript N(EVS_NpcHit_Fuzzy_Thief) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(GF_NOK02_RecoveredShellA, TRUE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_DISABLE_AI, 1) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_SET(GF_NOK02_RecoveredShellA, TRUE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_DISABLE_AI, 1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(GF_NOK02_RecoveredShellA, TRUE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_DISABLE_AI, 1) + CaseEq(ENCOUNTER_TRIGGER_JUMP) + Set(GF_NOK02_RecoveredShellA, TRUE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_DISABLE_AI, 1) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Koopa_01_Crisis) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Koopa_01_Crisis))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Koopa_01_Crisis))) - EVT_IF_EQ(GF_NOK02_RecoveredShellA, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcSprite, NPC_SELF, ANIM_KoopaWithoutShell_CryIdle) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Koopa_01_Crisis))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Koopa_01_Crisis))) + IfEq(GF_NOK02_RecoveredShellA, TRUE) + Return + EndIf + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcSprite, NPC_SELF, ANIM_KoopaWithoutShell_CryIdle) + Return + End }; EvtScript N(EVS_NpcInit_Fuzzy_Thief) = { - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_Fuzzy_Thief))) - EVT_IF_EQ(GF_NOK02_RecoveredShellA, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_Fuzzy_Thief))) + IfEq(GF_NOK02_RecoveredShellA, TRUE) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_KoopaShell_01_Crisis) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Koopa_Shell) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Koopa_Shell) + Return + End }; EvtScript N(EVS_NpcInit_Koopa_02_Crisis) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Koopa_02_Crisis))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Koopa_02_Crisis))) - EVT_IF_EQ(GF_NOK02_RecoveredShellB, FALSE) - EVT_CALL(SetNpcPos, NPC_KoopaShell_02, 150, 106, 250) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetNpcSprite, NPC_Koopa_02, ANIM_Koopa_Idle) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Koopa_02_Crisis))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Koopa_02_Crisis))) + IfEq(GF_NOK02_RecoveredShellB, FALSE) + Call(SetNpcPos, NPC_KoopaShell_02, 150, 106, 250) + Return + EndIf + Call(SetNpcSprite, NPC_Koopa_02, ANIM_Koopa_Idle) + Return + End }; EvtScript N(EVS_NpcInit_KoopaShell_02_Crisis) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Koopa_Shell) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Koopa_Shell) + Return + End }; EvtScript N(EVS_NpcInit_Kooper) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH1_PROMISED_TO_HELP_KOOPER) - EVT_CALL(SetNpcPos, NPC_Kooper, NPC_DISPOSE_LOCATION) - EVT_CASE_GE(STORY_CH1_KOOPER_JOINED_PARTY) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Kooper))) - EVT_CALL(SetNpcPos, NPC_Kooper, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Kooper))) - EVT_END_SWITCH - EVT_CALL(SetNpcSprite, NPC_Kooper, ANIM_KooperWithoutShell_Idle) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH1_PROMISED_TO_HELP_KOOPER) + Call(SetNpcPos, NPC_Kooper, NPC_DISPOSE_LOCATION) + CaseGe(STORY_CH1_KOOPER_JOINED_PARTY) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Kooper))) + Call(SetNpcPos, NPC_Kooper, NPC_DISPOSE_LOCATION) + Return + CaseDefault + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Kooper))) + EndSwitch + Call(SetNpcSprite, NPC_Kooper, ANIM_KooperWithoutShell_Idle) + Return + End }; EvtScript N(EVS_NpcInit_FuzzyBoss) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH1_FUZZY_THIEF_LEFT_TOWN) - EVT_CALL(SetNpcPos, NPC_FuzzyBoss, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_KoopersShell, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH1_FUZZY_THIEF_LEFT_TOWN) + Call(SetNpcPos, NPC_FuzzyBoss, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_KoopersShell, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_KoopersShell) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKooper_StillShellAlt) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKooper_StillShellAlt) + Return + End }; diff --git a/src/world/area_nok/nok_02/npcs_normal.inc.c b/src/world/area_nok/nok_02/npcs_normal.inc.c index 3a706180b12..a095da42a97 100644 --- a/src/world/area_nok/nok_02/npcs_normal.inc.c +++ b/src/world/area_nok/nok_02/npcs_normal.inc.c @@ -31,302 +31,302 @@ API_CALLABLE(N(DoCircleSprint)) { } EvtScript N(EVS_NpcInteract_Koopa_01_Normal) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH1_KOOPER_JOINED_PARTY) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0057) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0058) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0059) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_005A) - EVT_CASE_GE(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_005B) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH1_KOOPER_JOINED_PARTY) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0057) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0058) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0059) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_005A) + CaseGe(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_005B) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Koopa_01_Normal) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Koopa_01_Normal))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Koopa_01_Normal))) + Return + End }; EvtScript N(EVS_NpcInteract_Koopa_02_Normal) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH1_KOOPER_JOINED_PARTY) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_005F) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0060) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0061) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0062) - EVT_CASE_GE(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0063) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH1_KOOPER_JOINED_PARTY) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_005F) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0060) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0061) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0062) + CaseGe(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0063) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Koopa_02_Normal) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Koopa_02_Normal))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Koopa_02_Normal))) + Return + End }; EvtScript N(EVS_Koopa_03_CircleSprint) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Koopa_Run) - EVT_CALL(EnableNpcBlur, NPC_Koopa_03, TRUE) - EVT_CALL(GetNpcPointer, NPC_Koopa_03, LVarF) - EVT_CALL(N(DoCircleSprint), LVarF, -150, 15) - EVT_CALL(EnableNpcBlur, NPC_Koopa_03, FALSE) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Koopa_Idle) - EVT_WAIT(5) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Koopa_Run) + Call(EnableNpcBlur, NPC_Koopa_03, TRUE) + Call(GetNpcPointer, NPC_Koopa_03, LVarF) + Call(N(DoCircleSprint), LVarF, -150, 15) + Call(EnableNpcBlur, NPC_Koopa_03, FALSE) + Call(NpcFacePlayer, NPC_SELF, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Koopa_Idle) + Wait(5) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_Koopa_03_Normal) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH1_KOOPER_JOINED_PARTY) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0064) - EVT_EXEC_WAIT(N(EVS_Koopa_03_CircleSprint)) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0065) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0066) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0067) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0068) - EVT_CASE_GE(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0069) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH1_KOOPER_JOINED_PARTY) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0064) + ExecWait(N(EVS_Koopa_03_CircleSprint)) + Call(ContinueSpeech, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0065) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0066) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0067) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0068) + CaseGe(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_0069) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Koopa_03) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Koopa_03_Normal))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Koopa_03_Normal))) + Return + End }; EvtScript N(EVS_NpcInteract_Koopa_04_Normal) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH1_KOOPER_JOINED_PARTY) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_006A) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_006B) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_006C) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_006D) - EVT_CASE_GE(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_006E) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH1_KOOPER_JOINED_PARTY) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_006A) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_006B) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_006C) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_006D) + CaseGe(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Koopa_Talk, ANIM_Koopa_Idle, 0, MSG_CH1_006E) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Koopa_04) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Koopa_04_Normal))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Koopa_04_Normal))) + Return + End }; EvtScript N(EVS_Dueling_Bobombs) = { - EVT_LABEL(10) - EVT_IF_EQ(AF_NOK_10, FALSE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_EQ(AF_NOK_11, TRUE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_Bobomb_02, ANIM_WorldBobomb_Green_Run) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Bobomb_02, ANIM_WorldBobomb_Green_Idle) - EVT_WAIT(3) - EVT_CALL(GetNpcPos, NPC_Bobomb_02, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_Bobomb_02, SOUND_BOMBETTE_BLAST_LV1, SOUND_SPACE_DEFAULT) - EVT_CALL(N(SpawnExplosionEffect), LVar0, LVar1, LVar2) - EVT_WAIT(30) - EVT_LABEL(20) - EVT_IF_EQ(AF_NOK_10, FALSE) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_END_IF - EVT_IF_EQ(AF_NOK_11, TRUE) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_Bobomb_01, ANIM_WorldBobomb_Blue_Run) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Bobomb_01, ANIM_WorldBobomb_Blue_Idle) - EVT_WAIT(3) - EVT_CALL(GetNpcPos, NPC_Bobomb_01, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_Bobomb_01, SOUND_BOMBETTE_BLAST_LV1, SOUND_SPACE_DEFAULT) - EVT_CALL(N(SpawnExplosionEffect), LVar0, LVar1, LVar2) - EVT_WAIT(30) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Label(10) + IfEq(AF_NOK_10, FALSE) + Wait(1) + Goto(10) + EndIf + IfEq(AF_NOK_11, TRUE) + Wait(1) + Goto(10) + EndIf + Call(SetNpcAnimation, NPC_Bobomb_02, ANIM_WorldBobomb_Green_Run) + Wait(10) + Call(SetNpcAnimation, NPC_Bobomb_02, ANIM_WorldBobomb_Green_Idle) + Wait(3) + Call(GetNpcPos, NPC_Bobomb_02, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_Bobomb_02, SOUND_BOMBETTE_BLAST_LV1, SOUND_SPACE_DEFAULT) + Call(N(SpawnExplosionEffect), LVar0, LVar1, LVar2) + Wait(30) + Label(20) + IfEq(AF_NOK_10, FALSE) + Wait(1) + Goto(20) + EndIf + IfEq(AF_NOK_11, TRUE) + Wait(1) + Goto(20) + EndIf + Call(SetNpcAnimation, NPC_Bobomb_01, ANIM_WorldBobomb_Blue_Run) + Wait(10) + Call(SetNpcAnimation, NPC_Bobomb_01, ANIM_WorldBobomb_Blue_Idle) + Wait(3) + Call(GetNpcPos, NPC_Bobomb_01, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_Bobomb_01, SOUND_BOMBETTE_BLAST_LV1, SOUND_SPACE_DEFAULT) + Call(N(SpawnExplosionEffect), LVar0, LVar1, LVar2) + Wait(30) + Goto(10) + Return + End }; EvtScript N(EVS_Scene_ConfrontBobombs) = { - EVT_IF_EQ(GB_KootFavor_Current, KOOT_FAVOR_CH5_2) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_EQ(LVar0, PARTNER_BOMBETTE) - EVT_SET(AF_NOK_11, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Bobomb_01, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, MSG_CH1_007B) - EVT_CALL(SpeakToNpc, NPC_Bobomb_02, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, NPC_Bobomb_01, MSG_CH1_007C) - EVT_CALL(SpeakToPlayer, NPC_Bobomb_01, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, MSG_CH1_007D) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToNpc, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, NPC_Bobomb_01, MSG_CH1_007E) - EVT_CALL(EnablePartnerAI) - EVT_CALL(SpeakToPlayer, NPC_Bobomb_01, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 5, MSG_CH1_007F) - EVT_CALL(SpeakToNpc, NPC_Bobomb_02, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, NPC_Bobomb_01, MSG_CH1_0080) - EVT_CALL(SetNpcAnimation, NPC_Bobomb_01, ANIM_WorldBobomb_Blue_Idle) - EVT_CALL(SetNpcAnimation, NPC_Bobomb_02, ANIM_WorldBobomb_Green_Idle) - EVT_SET(GF_NOK02_ConfrontedBobombs, TRUE) - EVT_SET(GF_MAC02_KootFavor_CurrentComplete, TRUE) - EVT_ELSE - EVT_SET(AF_NOK_11, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Bobomb_01, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, MSG_CH1_007B) - EVT_CALL(SpeakToNpc, NPC_Bobomb_02, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, NPC_Bobomb_01, MSG_CH1_007C) - EVT_CALL(SpeakToPlayer, NPC_Bobomb_01, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 5, MSG_CH1_0081) - EVT_CALL(SpeakToNpc, NPC_Bobomb_02, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, NPC_Bobomb_01, MSG_CH1_0082) - EVT_SET(AF_NOK_11, FALSE) - EVT_END_IF - EVT_ELSE - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_EQ(LVar0, PARTNER_BOMBETTE) - EVT_SET(AF_NOK_11, TRUE) - EVT_CALL(SpeakToNpc, NPC_Bobomb_02, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, NPC_PARTNER, MSG_CH1_0077) - EVT_CALL(SpeakToNpc, NPC_Bobomb_01, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, NPC_PARTNER, MSG_CH1_0078) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToNpc, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, NPC_Bobomb_01, MSG_CH1_0079) - EVT_CALL(EnablePartnerAI) - EVT_CALL(SpeakToPlayer, NPC_Bobomb_01, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 5, MSG_CH1_007A) - EVT_SET(AF_NOK_11, FALSE) - EVT_ELSE - EVT_SET(AF_NOK_11, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Bobomb_02, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, MSG_CH1_0073) - EVT_CALL(SpeakToNpc, NPC_Bobomb_01, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, NPC_Bobomb_02, MSG_CH1_0074) - EVT_CALL(SpeakToNpc, NPC_Bobomb_02, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, NPC_Bobomb_01, MSG_CH1_0075) - EVT_CALL(SpeakToNpc, NPC_Bobomb_01, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, NPC_Bobomb_02, MSG_CH1_0076) - EVT_SET(AF_NOK_11, FALSE) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_KootFavor_Current, KOOT_FAVOR_CH5_2) + Call(GetCurrentPartnerID, LVar0) + IfEq(LVar0, PARTNER_BOMBETTE) + Set(AF_NOK_11, TRUE) + Call(SpeakToPlayer, NPC_Bobomb_01, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, MSG_CH1_007B) + Call(SpeakToNpc, NPC_Bobomb_02, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, NPC_Bobomb_01, MSG_CH1_007C) + Call(SpeakToPlayer, NPC_Bobomb_01, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, MSG_CH1_007D) + Call(DisablePartnerAI, 0) + Call(SpeakToNpc, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, NPC_Bobomb_01, MSG_CH1_007E) + Call(EnablePartnerAI) + Call(SpeakToPlayer, NPC_Bobomb_01, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 5, MSG_CH1_007F) + Call(SpeakToNpc, NPC_Bobomb_02, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, NPC_Bobomb_01, MSG_CH1_0080) + Call(SetNpcAnimation, NPC_Bobomb_01, ANIM_WorldBobomb_Blue_Idle) + Call(SetNpcAnimation, NPC_Bobomb_02, ANIM_WorldBobomb_Green_Idle) + Set(GF_NOK02_ConfrontedBobombs, TRUE) + Set(GF_MAC02_KootFavor_CurrentComplete, TRUE) + Else + Set(AF_NOK_11, TRUE) + Call(SpeakToPlayer, NPC_Bobomb_01, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, MSG_CH1_007B) + Call(SpeakToNpc, NPC_Bobomb_02, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, NPC_Bobomb_01, MSG_CH1_007C) + Call(SpeakToPlayer, NPC_Bobomb_01, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 5, MSG_CH1_0081) + Call(SpeakToNpc, NPC_Bobomb_02, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, NPC_Bobomb_01, MSG_CH1_0082) + Set(AF_NOK_11, FALSE) + EndIf + Else + Call(GetCurrentPartnerID, LVar0) + IfEq(LVar0, PARTNER_BOMBETTE) + Set(AF_NOK_11, TRUE) + Call(SpeakToNpc, NPC_Bobomb_02, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, NPC_PARTNER, MSG_CH1_0077) + Call(SpeakToNpc, NPC_Bobomb_01, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, NPC_PARTNER, MSG_CH1_0078) + Call(DisablePartnerAI, 0) + Call(SpeakToNpc, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, NPC_Bobomb_01, MSG_CH1_0079) + Call(EnablePartnerAI) + Call(SpeakToPlayer, NPC_Bobomb_01, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 5, MSG_CH1_007A) + Set(AF_NOK_11, FALSE) + Else + Set(AF_NOK_11, TRUE) + Call(SpeakToPlayer, NPC_Bobomb_02, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, MSG_CH1_0073) + Call(SpeakToNpc, NPC_Bobomb_01, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, NPC_Bobomb_02, MSG_CH1_0074) + Call(SpeakToNpc, NPC_Bobomb_02, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, NPC_Bobomb_01, MSG_CH1_0075) + Call(SpeakToNpc, NPC_Bobomb_01, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, NPC_Bobomb_02, MSG_CH1_0076) + Set(AF_NOK_11, FALSE) + EndIf + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Bobomb_01) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(AF_NOK_0F, FALSE) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_EQ(LVar0, PARTNER_BOMBETTE) - EVT_SET(AF_NOK_0F, TRUE) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_SELF, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, MSG_CH1_006F) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_0070) - EVT_CALL(EnablePartnerAI) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, MSG_CH1_0071) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, MSG_CH1_0072) - EVT_END_IF - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, MSG_CH1_0072) - EVT_END_IF - EVT_CASE_GE(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_NOK02_ConfrontedBobombs, FALSE) - EVT_EXEC_WAIT(N(EVS_Scene_ConfrontBobombs)) - EVT_ELSE - EVT_SET(AF_NOK_11, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, MSG_CH1_007F) - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + IfEq(AF_NOK_0F, FALSE) + Call(GetCurrentPartnerID, LVar0) + IfEq(LVar0, PARTNER_BOMBETTE) + Set(AF_NOK_0F, TRUE) + Call(NpcFacePlayer, NPC_SELF, 0) + Call(NpcFaceNpc, NPC_PARTNER, NPC_SELF, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, MSG_CH1_006F) + Call(DisablePartnerAI, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_0070) + Call(EnablePartnerAI) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, MSG_CH1_0071) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, MSG_CH1_0072) + EndIf + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, MSG_CH1_0072) + EndIf + CaseGe(STORY_CH4_STAR_SPRIT_DEPARTED) + IfEq(GF_NOK02_ConfrontedBobombs, FALSE) + ExecWait(N(EVS_Scene_ConfrontBobombs)) + Else + Set(AF_NOK_11, TRUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, MSG_CH1_007F) + EndIf + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Bobomb_02) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, MSG_CH1_0083) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_NOK02_ConfrontedBobombs, FALSE) - EVT_EXEC_WAIT(N(EVS_Scene_ConfrontBobombs)) - EVT_ELSE - EVT_SET(AF_NOK_11, TRUE) - EVT_CALL(SpeakToNpc, NPC_SELF, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, NPC_Bobomb_01, MSG_CH1_0080) - EVT_END_IF - EVT_CASE_GE(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, MSG_CH1_0084) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, MSG_CH1_0083) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + IfEq(GF_NOK02_ConfrontedBobombs, FALSE) + ExecWait(N(EVS_Scene_ConfrontBobombs)) + Else + Set(AF_NOK_11, TRUE) + Call(SpeakToNpc, NPC_SELF, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, NPC_Bobomb_01, MSG_CH1_0080) + EndIf + CaseGe(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, MSG_CH1_0084) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Bobomb_03) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, MSG_CH1_0085) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_NOK02_ConfrontedBobombs, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, MSG_CH1_0086) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, MSG_CH1_0087) - EVT_END_IF - EVT_CASE_GE(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, MSG_CH1_0087) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, MSG_CH1_0085) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + IfEq(GF_NOK02_ConfrontedBobombs, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, MSG_CH1_0086) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, MSG_CH1_0087) + EndIf + CaseGe(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, MSG_CH1_0087) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Bobomb_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bobomb_01))) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bobomb_01))) + IfLt(GB_StoryProgress, STORY_CH1_STAR_SPRIT_DEPARTED) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Bobomb_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bobomb_02))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CASE_GE(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_NOK02_ConfrontedBobombs, TRUE) - EVT_RETURN - EVT_END_IF - EVT_EXEC(N(EVS_Dueling_Bobombs)) - EVT_SET(AF_NOK_11, FALSE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bobomb_02))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + CaseGe(STORY_CH4_STAR_SPRIT_DEPARTED) + IfEq(GF_NOK02_ConfrontedBobombs, TRUE) + Return + EndIf + Exec(N(EVS_Dueling_Bobombs)) + Set(AF_NOK_11, FALSE) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Bobomb_03) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bobomb_03))) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bobomb_03))) + IfLt(GB_StoryProgress, STORY_CH1_STAR_SPRIT_DEPARTED) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; s32 N(ItemList_Artifact)[] = { @@ -335,86 +335,86 @@ s32 N(ItemList_Artifact)[] = { }; EvtScript N(EVS_ArtifactReward_Kolorado) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH1_009F) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH1_009F) EVT_GIVE_STAR_PIECE() - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH1_00A0) - EVT_SET(GF_SBK_GaveArtifactToKolorado, TRUE) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH1_00A0) + Set(GF_SBK_GaveArtifactToKolorado, TRUE) + Return + End }; EvtScript N(EVS_ArtifactPrompt_Kolorado) = { - EVT_IF_EQ(GF_SBK_GaveArtifactToKolorado, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(FindKeyItem, ITEM_ARTIFACT, LVar0) - EVT_IF_EQ(LVar0, -1) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(AF_NOK_15, FALSE) - EVT_SET(AF_NOK_15, TRUE) - EVT_IF_EQ(GF_SBK_KeptArtifactFromKolorado, FALSE) - EVT_SET(GF_SBK_KeptArtifactFromKolorado, FALSE) - EVT_SET(LVar0, MSG_CH1_009B) - EVT_ELSE - EVT_SET(LVar0, MSG_CH1_009C) - EVT_END_IF - EVT_ELSE - EVT_SET(LVar0, MSG_CH1_009C) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, LVar0) - EVT_SET(LVar0, EVT_PTR(N(ItemList_Artifact))) - EVT_SET(LVar1, 7) - EVT_EXEC_WAIT(N(EVS_ChooseKeyItem)) - EVT_SWITCH(LVar0) - EVT_CASE_GE(1) - EVT_EXEC_WAIT(N(EVS_ArtifactReward_Kolorado)) - EVT_BREAK_SWITCH - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH1_009D) - EVT_SET(LVar0, EVT_PTR(N(ItemList_Artifact))) - EVT_SET(LVar1, 7) - EVT_EXEC_WAIT(N(EVS_ChooseKeyItem)) - EVT_SWITCH(LVar0) - EVT_CASE_GE(1) - EVT_EXEC_WAIT(N(EVS_ArtifactReward_Kolorado)) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH1_009E) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_RETURN - EVT_END + IfEq(GF_SBK_GaveArtifactToKolorado, TRUE) + Return + EndIf + Call(FindKeyItem, ITEM_ARTIFACT, LVar0) + IfEq(LVar0, -1) + Return + EndIf + IfEq(AF_NOK_15, FALSE) + Set(AF_NOK_15, TRUE) + IfEq(GF_SBK_KeptArtifactFromKolorado, FALSE) + Set(GF_SBK_KeptArtifactFromKolorado, FALSE) + Set(LVar0, MSG_CH1_009B) + Else + Set(LVar0, MSG_CH1_009C) + EndIf + Else + Set(LVar0, MSG_CH1_009C) + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, LVar0) + Set(LVar0, Ref(N(ItemList_Artifact))) + Set(LVar1, 7) + ExecWait(N(EVS_ChooseKeyItem)) + Switch(LVar0) + CaseGe(1) + ExecWait(N(EVS_ArtifactReward_Kolorado)) + BreakSwitch + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH1_009D) + Set(LVar0, Ref(N(ItemList_Artifact))) + Set(LVar1, 7) + ExecWait(N(EVS_ChooseKeyItem)) + Switch(LVar0) + CaseGe(1) + ExecWait(N(EVS_ArtifactReward_Kolorado)) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH1_009E) + EndSwitch + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Kolorado) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH1_0093) - EVT_CALL(NpcFaceNpc, NPC_KoloradoWife, NPC_SELF, 0) - EVT_CALL(SpeakToPlayer, NPC_KoloradoWife, ANIM_KoloradoWife_Talk, ANIM_KoloradoWife_Idle, 5, MSG_CH1_0094) - EVT_CALL(NpcFaceNpc, NPC_SELF, NPC_KoloradoWife, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 5, MSG_CH1_0095) - EVT_WAIT(15) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_WAIT(15) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH1_0096) - EVT_EXEC_WAIT(N(EVS_ArtifactPrompt_Kolorado)) - EVT_EXEC_WAIT(N(EVS_LetterPrompt_Kolorado)) - EVT_EXEC_WAIT(N(EVS_LetterReward_Kolorado)) - EVT_IF_NE(LVarC, DELIVERY_NOT_POSSIBLE) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH1_0093) + Call(NpcFaceNpc, NPC_KoloradoWife, NPC_SELF, 0) + Call(SpeakToPlayer, NPC_KoloradoWife, ANIM_KoloradoWife_Talk, ANIM_KoloradoWife_Idle, 5, MSG_CH1_0094) + Call(NpcFaceNpc, NPC_SELF, NPC_KoloradoWife, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 5, MSG_CH1_0095) + Wait(15) + Call(NpcFacePlayer, NPC_SELF, 0) + Wait(15) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH1_0096) + ExecWait(N(EVS_ArtifactPrompt_Kolorado)) + ExecWait(N(EVS_LetterPrompt_Kolorado)) + ExecWait(N(EVS_LetterReward_Kolorado)) + IfNe(LVarC, DELIVERY_NOT_POSSIBLE) + Return + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Kolorado) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Kolorado))) - EVT_IF_GE(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GF_NOK11_Defeated_KentC, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Kolorado))) + IfGe(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) + Return + EndIf + IfEq(GF_NOK11_Defeated_KentC, TRUE) + Return + EndIf + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Return + End }; diff --git a/src/world/area_nok/nok_03/nok_03_1_music.c b/src/world/area_nok/nok_03/nok_03_1_music.c index 3d2265dbb10..7b744d5e4a8 100644 --- a/src/world/area_nok/nok_03/nok_03_1_music.c +++ b/src/world/area_nok/nok_03/nok_03_1_music.c @@ -1,12 +1,12 @@ #include "nok_03.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) - EVT_CALL(SetMusicTrack, 0, SONG_FUZZY_ATTACK, 0, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_VILLAGE, 0, 8) - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_LOOP_NOK_WATER, SOUND_SPACE_DEFAULT, 887, 0, -41) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) + Call(SetMusicTrack, 0, SONG_FUZZY_ATTACK, 0, 8) + Else + Call(SetMusicTrack, 0, SONG_KOOPA_VILLAGE, 0, 8) + EndIf + Call(PlaySoundAt, SOUND_LOOP_NOK_WATER, SOUND_SPACE_DEFAULT, 887, 0, -41) + Return + End }; diff --git a/src/world/area_nok/nok_03/nok_03_2_main.c b/src/world/area_nok/nok_03/nok_03_2_main.c index 83541f923f4..cc3867b1f94 100644 --- a/src/world/area_nok/nok_03/nok_03_2_main.c +++ b/src/world/area_nok/nok_03/nok_03_2_main.c @@ -4,75 +4,75 @@ EvtScript N(EVS_ExitWalk_nok_02_1) = EVT_EXIT_WALK_NOK(60, nok_03_ENTRY_0, "nok_ EvtScript N(EVS_ExitWalk_nok_04_0) = EVT_EXIT_WALK_NOK(123, nok_03_ENTRY_1, "nok_04", nok_04_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_nok_02_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_nok_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_nok_02_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_nok_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_TexPan_Flowers) = { - EVT_CALL(SetTexPanner, MODEL_hanahana, TEX_PANNER_0) - EVT_LABEL(10) - EVT_LOOP(12) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(12) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0x4000, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(10) - EVT_RETURN - EVT_END + Call(SetTexPanner, MODEL_hanahana, TEX_PANNER_0) + Label(10) + Loop(12) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, 0) + Wait(1) + EndLoop + Loop(12) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0x4000, 0) + Wait(1) + EndLoop + Goto(10) + Return + End }; EvtScript N(EVS_TexPan_Water) = { - EVT_THREAD - EVT_CALL(SetTexPanner, MODEL_suimen1, TEX_PANNER_1) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LABEL(10) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, LVar2) - EVT_SUB(LVar0, 100) - EVT_SUB(LVar1, 400) - EVT_ADD(LVar1, 1000) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_kabemizu, TEX_PANNER_2) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LABEL(20) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_AUX, LVar1, LVar2) - EVT_SUB(LVar0, 100) - EVT_ADD(LVar1, 800) - EVT_SUB(LVar1, 400) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_RETURN - EVT_END + Thread + Call(SetTexPanner, MODEL_suimen1, TEX_PANNER_1) + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Label(10) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, LVar2) + Sub(LVar0, 100) + Sub(LVar1, 400) + Add(LVar1, 1000) + Wait(1) + Goto(10) + EndThread + Call(SetTexPanner, MODEL_kabemizu, TEX_PANNER_2) + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Label(20) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar0, 0) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_AUX, LVar1, LVar2) + Sub(LVar0, 100) + Add(LVar1, 800) + Sub(LVar1, 400) + Wait(1) + Goto(20) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_KOOPA_VILLAGE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_IF_LT(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_TexPan_Flowers)) - EVT_EXEC(N(EVS_TexPan_Water)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_KOOPA_VILLAGE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + IfLt(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + EndIf + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_TexPan_Flowers)) + Exec(N(EVS_TexPan_Water)) + Exec(N(EVS_SetupMusic)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; diff --git a/src/world/area_nok/nok_03/nok_03_3_entity.c b/src/world/area_nok/nok_03/nok_03_3_entity.c index 95faf7f4ed1..421b1fa43a9 100644 --- a/src/world/area_nok/nok_03/nok_03_3_entity.c +++ b/src/world/area_nok/nok_03/nok_03_3_entity.c @@ -2,7 +2,7 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_HP_PLUS_B, 218, 64, -100, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_NOK03_Item_HPPlusB) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_HP_PLUS_B, 218, 64, -100, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_NOK03_Item_HPPlusB) + Return + End }; diff --git a/src/world/area_nok/nok_03/nok_03_4_npc.c b/src/world/area_nok/nok_03/nok_03_4_npc.c index 1f1f291b74f..e60b65ba1ee 100644 --- a/src/world/area_nok/nok_03/nok_03_4_npc.c +++ b/src/world/area_nok/nok_03/nok_03_4_npc.c @@ -5,124 +5,124 @@ #include "world/common/npc/Koopa.inc.c" EvtScript N(EVS_NpcIdle_FuzzyBoss) = { - EVT_THREAD - EVT_LABEL(0) - EVT_CALL(GetNpcPos, NPC_Fuzzy_03, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 2) - EVT_CALL(SetNpcPos, NPC_KoopersShell, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_THREAD - EVT_LABEL(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Fuzzy_03, LVar3, LVar4, LVar5) - EVT_SET(LVar6, LVar3) - EVT_SUB(LVar6, LVar0) - EVT_IF_LT(LVar6, 100) - EVT_ADD(LVar3, 100) - EVT_CALL(PlaySoundAtNpc, NPC_Fuzzy_03, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Fuzzy_03, LVar3, LVar4, LVar5, 10 * DT) - EVT_SET(GB_StoryProgress, STORY_CH1_FUZZY_THIEF_RAN_AWAY) - EVT_END_IF - EVT_IF_GT(LVar3, 1200) - EVT_CALL(SetNpcPos, NPC_Fuzzy_03, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_KoopersShell, NPC_DISPOSE_LOCATION) - EVT_CALL(EnableNpcShadow, NPC_Fuzzy_03, FALSE) - EVT_CALL(EnableNpcShadow, NPC_KoopersShell, FALSE) - EVT_RETURN - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(1) - EVT_RETURN - EVT_END + Thread + Label(0) + Call(GetNpcPos, NPC_Fuzzy_03, LVar0, LVar1, LVar2) + Add(LVar2, 2) + Call(SetNpcPos, NPC_KoopersShell, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + EndThread + Label(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Fuzzy_03, LVar3, LVar4, LVar5) + Set(LVar6, LVar3) + Sub(LVar6, LVar0) + IfLt(LVar6, 100) + Add(LVar3, 100) + Call(PlaySoundAtNpc, NPC_Fuzzy_03, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Fuzzy_03, LVar3, LVar4, LVar5, 10 * DT) + Set(GB_StoryProgress, STORY_CH1_FUZZY_THIEF_RAN_AWAY) + EndIf + IfGt(LVar3, 1200) + Call(SetNpcPos, NPC_Fuzzy_03, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_KoopersShell, NPC_DISPOSE_LOCATION) + Call(EnableNpcShadow, NPC_Fuzzy_03, FALSE) + Call(EnableNpcShadow, NPC_KoopersShell, FALSE) + Return + EndIf + Wait(1) + Goto(1) + Return + End }; EvtScript N(EVS_NpcIdle_Fuzzy_01) = { - EVT_WAIT(5) - EVT_LABEL(10) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, -400) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(3.0)) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 6) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.2)) - EVT_ADD(LVar0, 20) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 8) - EVT_SUB(LVar0, 15) - EVT_ADD(LVar2, 20) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 10) - EVT_ADD(LVar0, 20) - EVT_ADD(LVar2, 20) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 8) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.8)) - EVT_CALL(NpcJump0, NPC_SELF, -341, 0, 23, 15) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_BEGIN_WITH_CHASING, 1) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Fuzzy_Wander))) - EVT_RETURN - EVT_END + Wait(5) + Label(10) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, -400) + Wait(1) + Goto(10) + EndIf + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetNpcJumpscale, NPC_SELF, Float(3.0)) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 6) + Call(SetNpcJumpscale, NPC_SELF, Float(1.2)) + Add(LVar0, 20) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 8) + Sub(LVar0, 15) + Add(LVar2, 20) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 10) + Add(LVar0, 20) + Add(LVar2, 20) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 8) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(SetNpcJumpscale, NPC_SELF, Float(1.8)) + Call(NpcJump0, NPC_SELF, -341, 0, 23, 15) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_BEGIN_WITH_CHASING, 1) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_Fuzzy_Wander))) + Return + End }; EvtScript N(EVS_NpcIdle_Fuzzy_02) = { - EVT_WAIT(5) - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, -140) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 0) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(3.0)) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 6) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_BEGIN_WITH_CHASING, 1) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Fuzzy_Wander))) - EVT_RETURN - EVT_END + Wait(5) + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, -140) + Wait(1) + Goto(0) + EndIf + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Set(LVar1, 0) + Call(SetNpcJumpscale, NPC_SELF, Float(3.0)) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 6) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_BEGIN_WITH_CHASING, 1) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_Fuzzy_Wander))) + Return + End }; EvtScript N(EVS_NpcInit_Fuzzy_01) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Fuzzy_01))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Fuzzy_01))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_Fuzzy_02) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Fuzzy_02))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Fuzzy_02))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_FuzzyBoss) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH1_FUZZY_THIEF_RAN_AWAY) - EVT_CALL(SetNpcFlagBits, NPC_Fuzzy_03, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_KoopersShell, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcPos, NPC_Fuzzy_03, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_KoopersShell, NPC_DISPOSE_LOCATION) - EVT_CALL(EnableNpcShadow, NPC_Fuzzy_03, FALSE) - EVT_CALL(EnableNpcShadow, NPC_KoopersShell, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_FuzzyBoss))) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH1_FUZZY_THIEF_RAN_AWAY) + Call(SetNpcFlagBits, NPC_Fuzzy_03, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_KoopersShell, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcPos, NPC_Fuzzy_03, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_KoopersShell, NPC_DISPOSE_LOCATION) + Call(EnableNpcShadow, NPC_Fuzzy_03, FALSE) + Call(EnableNpcShadow, NPC_KoopersShell, FALSE) + Return + EndIf + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_FuzzyBoss))) + Return + End }; EvtScript N(EVS_NpcInit_KoopersShell) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKooper_StillShellAlt) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKooper_StillShellAlt) + Return + End }; NpcData N(NpcData_Fuzzy_01) = { diff --git a/src/world/area_nok/nok_04/nok_04_1_music.c b/src/world/area_nok/nok_04/nok_04_1_music.c index 93c77fd2812..f0a81ebb3e2 100644 --- a/src/world/area_nok/nok_04/nok_04_1_music.c +++ b/src/world/area_nok/nok_04/nok_04_1_music.c @@ -1,25 +1,25 @@ #include "nok_04.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) - EVT_CALL(SetMusicTrack, 0, SONG_FUZZY_ATTACK, 0, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_VILLAGE, 0, 8) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) + Call(SetMusicTrack, 0, SONG_FUZZY_ATTACK, 0, 8) + Else + Call(SetMusicTrack, 0, SONG_KOOPA_VILLAGE, 0, 8) + EndIf + Return + End }; EvtScript N(EVS_PushPartnerSong) = { - EVT_CALL(PushSong, SONG_NEW_PARTNER, 0) - EVT_RETURN - EVT_END + Call(PushSong, SONG_NEW_PARTNER, 0) + Return + End }; EvtScript N(EVS_PopSong) = { - EVT_CALL(FadeOutMusic, 0, 500) - EVT_WAIT(15) - EVT_CALL(PopSong) - EVT_RETURN - EVT_END + Call(FadeOutMusic, 0, 500) + Wait(15) + Call(PopSong) + Return + End }; diff --git a/src/world/area_nok/nok_04/nok_04_2_main.c b/src/world/area_nok/nok_04/nok_04_2_main.c index 926dce31d78..2798ef63f67 100644 --- a/src/world/area_nok/nok_04/nok_04_2_main.c +++ b/src/world/area_nok/nok_04/nok_04_2_main.c @@ -3,35 +3,35 @@ EvtScript N(EVS_ExitWalk_nok_03_1) = EVT_EXIT_WALK_NOK(60, nok_04_ENTRY_0, "nok_03", nok_03_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_nok_03_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_nok_03_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) + Return + End }; MAP_RODATA_PAD(1, exits); EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_KOOPA_VILLAGE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_SET(AF_NOK04_PlayingGame, FALSE) - EVT_SET(AF_NOK04_BattleStarted, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o147, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_SET(LVar0, TREE_0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_HitTree)), TRIGGER_WALL_HAMMER, COLLIDER_o59, 1, 0) - EVT_SET(LVar0, TREE_1) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_HitTree)), TRIGGER_WALL_HAMMER, COLLIDER_o58, 1, 0) - EVT_SET(LVar0, TREE_2) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_HitTree)), TRIGGER_WALL_HAMMER, COLLIDER_o57, 1, 0) - EVT_SET(LVar0, TREE_3) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_HitTree)), TRIGGER_WALL_HAMMER, COLLIDER_o56, 1, 0) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitsw, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_KOOPA_VILLAGE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Set(AF_NOK04_PlayingGame, FALSE) + Set(AF_NOK04_BattleStarted, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o147, COLLIDER_FLAGS_UPPER_MASK) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Set(LVar0, TREE_0) + BindTrigger(Ref(N(EVS_HitTree)), TRIGGER_WALL_HAMMER, COLLIDER_o59, 1, 0) + Set(LVar0, TREE_1) + BindTrigger(Ref(N(EVS_HitTree)), TRIGGER_WALL_HAMMER, COLLIDER_o58, 1, 0) + Set(LVar0, TREE_2) + BindTrigger(Ref(N(EVS_HitTree)), TRIGGER_WALL_HAMMER, COLLIDER_o57, 1, 0) + Set(LVar0, TREE_3) + BindTrigger(Ref(N(EVS_HitTree)), TRIGGER_WALL_HAMMER, COLLIDER_o56, 1, 0) + Exec(N(EVS_SetupMusic)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitsw, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; diff --git a/src/world/area_nok/nok_04/nok_04_3_entity.c b/src/world/area_nok/nok_04/nok_04_3_entity.c index 155b043d545..6a4d81811bb 100644 --- a/src/world/area_nok/nok_04/nok_04_3_entity.c +++ b/src/world/area_nok/nok_04/nok_04_3_entity.c @@ -2,6 +2,6 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/area_nok/nok_04/nok_04_4_npc.c b/src/world/area_nok/nok_04/nok_04_4_npc.c index 15661c0e967..c2560b2c8fd 100644 --- a/src/world/area_nok/nok_04/nok_04_4_npc.c +++ b/src/world/area_nok/nok_04/nok_04_4_npc.c @@ -41,57 +41,57 @@ s32 N(TreeHidingSpotPositions)[] = { #include "common/CosInterpMinMax.inc.c" EvtScript N(EVS_AnimBranch_JumpTo) = { - EVT_SET(LVar2, LVar0) - EVT_SET(LVar3, LVar1) - EVT_SET(LVar4, 600) - EVT_DIV(LVar4, 100) - EVT_ADD(LVar4, 27) - EVT_CALL(RandInt, 1, LVar5) - EVT_MUL(LVar5, 20) - EVT_SUB(LVar5, 10) - EVT_SET(LVar6, 0) - EVT_SETF(LVar8, EVT_FLOAT(5.0)) - EVT_CALL(MakeLerp, LVar5, 0, LVar4, EASING_COS_FAST_OVERSHOOT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_MULF(LVar0, EVT_FLOAT(0.40625)) - EVT_ADD(LVar6, 1) - EVT_SETF(LVar9, LVar8) - EVT_MULF(LVar9, EVT_FLOAT(-1.0)) - EVT_CALL(N(CosInterpMinMax), LVar6, LVar7, LVar9, LVar8, 3, 0, 0) - EVT_MULF(LVar8, EVT_FLOAT(0.90625)) - EVT_CALL(TranslateModel, LVar2, LVar7, LVar0, 0) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVar2, LVar0) + Set(LVar3, LVar1) + Set(LVar4, 600) + Div(LVar4, 100) + Add(LVar4, 27) + Call(RandInt, 1, LVar5) + Mul(LVar5, 20) + Sub(LVar5, 10) + Set(LVar6, 0) + SetF(LVar8, Float(5.0)) + Call(MakeLerp, LVar5, 0, LVar4, EASING_COS_FAST_OVERSHOOT) + Label(0) + Call(UpdateLerp) + MulF(LVar0, Float(0.40625)) + Add(LVar6, 1) + SetF(LVar9, LVar8) + MulF(LVar9, Float(-1.0)) + Call(N(CosInterpMinMax), LVar6, LVar7, LVar9, LVar8, 3, 0, 0) + MulF(LVar8, Float(0.90625)) + Call(TranslateModel, LVar2, LVar7, LVar0, 0) + IfEq(LVar1, 1) + Wait(1) + Goto(0) + EndIf + Return + End }; EvtScript N(EVS_AnimBranch_Hit) = { - EVT_SET(LVar2, LVar0) - EVT_SET(LVar3, LVar1) - EVT_SET(LVar4, 600) - EVT_DIV(LVar4, 100) - EVT_ADD(LVar4, 27) - EVT_SET(LVar0, 5) - EVT_LOOP(LVar0) - EVT_CALL(TranslateModel, LVar2, LVar0, 0, 0) - EVT_WAIT(1) - EVT_SET(LVar1, LVar0) - EVT_MUL(LVar1, -1) - EVT_CALL(TranslateModel, LVar2, LVar1, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVar2, LVar0) + Set(LVar3, LVar1) + Set(LVar4, 600) + Div(LVar4, 100) + Add(LVar4, 27) + Set(LVar0, 5) + Loop(LVar0) + Call(TranslateModel, LVar2, LVar0, 0, 0) + Wait(1) + Set(LVar1, LVar0) + Mul(LVar1, -1) + Call(TranslateModel, LVar2, LVar1, 0, 0) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_MoveCam_TrackBoss) = { - EVT_CALL(InterpCamTargetPos, 0, 1, LVarA, LVarB, LVarC, LVarD) - EVT_RETURN - EVT_END + Call(InterpCamTargetPos, 0, 1, LVarA, LVarB, LVarC, LVarD) + Return + End }; Vtx N(ThreadSegmentVertices)[] = { @@ -337,476 +337,476 @@ void N(build_gfx_thread)(void) { } EvtScript N(EVS_BossJumpTo) = { - EVT_CALL(PlaySoundAtNpc, NPC_BossFuzzy, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_BossFuzzy, LVarA, LVarB, LVarC, LVarD) - EVT_RETURN - EVT_END + Call(PlaySoundAtNpc, NPC_BossFuzzy, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_BossFuzzy, LVarA, LVarB, LVarC, LVarD) + Return + End }; EvtScript N(EVS_Scene_ShuffleFuzzyPositions) = { - EVT_CALL(PlayerFaceNpc, NPC_BossFuzzy, FALSE) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH1_00BE, 160, 40) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetCamType, CAM_DEFAULT, 1, FALSE) - EVT_CALL(SetCamDistance, CAM_DEFAULT, -597) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 10, -11) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 707) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 90, 0, 228) + Call(PlayerFaceNpc, NPC_BossFuzzy, FALSE) + Call(ShowMessageAtScreenPos, MSG_CH1_00BE, 160, 40) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetCamType, CAM_DEFAULT, 1, FALSE) + Call(SetCamDistance, CAM_DEFAULT, -597) + Call(SetCamPitch, CAM_DEFAULT, 10, -11) + Call(SetCamPosA, CAM_DEFAULT, 0, 707) + Call(SetCamPosB, CAM_DEFAULT, 0, 0) + Call(SetCamPosC, CAM_DEFAULT, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 90, 0, 228) #if VERSION_PAL - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3 / DT)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3 / DT)) #else - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 3) + Call(SetCamSpeed, CAM_DEFAULT, 3) #endif - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(60 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_CALL(SetNpcJumpscale, NPC_BossFuzzy, 3) - EVT_CALL(SetNpcJumpscale, NPC_KoopersShell, 3) - EVT_CALL(SetNpcJumpscale, NPC_Fuzzy_01, 3) - EVT_CALL(SetNpcJumpscale, NPC_Fuzzy_02, 3) - EVT_CALL(SetNpcJumpscale, NPC_Fuzzy_03, 3) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(60 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Call(SetNpcJumpscale, NPC_BossFuzzy, 3) + Call(SetNpcJumpscale, NPC_KoopersShell, 3) + Call(SetNpcJumpscale, NPC_Fuzzy_01, 3) + Call(SetNpcJumpscale, NPC_Fuzzy_02, 3) + Call(SetNpcJumpscale, NPC_Fuzzy_03, 3) // get number of jumps - EVT_SWITCH(MV_CorrectCount) - EVT_CASE_EQ(0) - EVT_SET(LVarE, 10) - EVT_CASE_EQ(1) - EVT_SET(LVarE, 9) - EVT_CASE_EQ(2) - EVT_SET(LVarE, 8) - EVT_END_SWITCH - EVT_CALL(RandInt, 3, LVar0) - EVT_ADD(LVarE, LVar0) - EVT_SET(LVar6, 0) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 0) - EVT_SET(LVar9, 0) - EVT_SET(LVarF, MV_CorrectTreeIndex) + Switch(MV_CorrectCount) + CaseEq(0) + Set(LVarE, 10) + CaseEq(1) + Set(LVarE, 9) + CaseEq(2) + Set(LVarE, 8) + EndSwitch + Call(RandInt, 3, LVar0) + Add(LVarE, LVar0) + Set(LVar6, 0) + Set(LVar7, 0) + Set(LVar8, 0) + Set(LVar9, 0) + Set(LVarF, MV_CorrectTreeIndex) // the shuffle - EVT_LOOP(LVarE) - EVT_SET(LVarA, MV_CorrectTreeIndex) - EVT_CALL(N(EVS_ConvertTreeIndex), LVarF, MV_CorrectTreeIndex) - EVT_SWITCH(LVarF) - EVT_CASE_EQ(0) - EVT_SET(LVarB, TREE_2) - EVT_SET(LVarC, TREE_3) - EVT_CASE_EQ(1) - EVT_IF_EQ(LVarA, 2) - EVT_SET(LVarB, TREE_0) - EVT_SET(LVarC, TREE_3) - EVT_ELSE - EVT_SET(LVarB, TREE_2) - EVT_SET(LVarC, TREE_3) - EVT_END_IF - EVT_CASE_EQ(2) - EVT_IF_EQ(LVarA, 3) - EVT_SET(LVarB, TREE_0) - EVT_SET(LVarC, TREE_1) - EVT_ELSE - EVT_SET(LVarB, TREE_0) - EVT_SET(LVarC, TREE_3) - EVT_END_IF - EVT_CASE_EQ(3) - EVT_SET(LVarB, TREE_0) - EVT_SET(LVarC, TREE_1) - EVT_CASE_EQ(4) - EVT_IF_EQ(LVarA, 1) - EVT_SET(LVarB, TREE_0) - EVT_SET(LVarC, TREE_3) - EVT_ELSE - EVT_SET(LVarB, TREE_0) - EVT_SET(LVarC, TREE_1) - EVT_END_IF - EVT_CASE_EQ(5) - EVT_IF_EQ(LVarA, 0) - EVT_SET(LVarB, TREE_2) - EVT_SET(LVarC, TREE_3) - EVT_ELSE - EVT_SET(LVarB, TREE_0) - EVT_SET(LVarC, TREE_3) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(RandInt, 1, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_ADD(LVarF, -1) - EVT_ELSE - EVT_ADD(LVarF, 1) - EVT_END_IF - EVT_IF_GE(LVarF, 6) - EVT_SET(LVarF, 0) - EVT_END_IF - EVT_IF_LT(LVarF, 0) - EVT_SET(LVarF, 5) - EVT_END_IF + Loop(LVarE) + Set(LVarA, MV_CorrectTreeIndex) + Call(N(EVS_ConvertTreeIndex), LVarF, MV_CorrectTreeIndex) + Switch(LVarF) + CaseEq(0) + Set(LVarB, TREE_2) + Set(LVarC, TREE_3) + CaseEq(1) + IfEq(LVarA, 2) + Set(LVarB, TREE_0) + Set(LVarC, TREE_3) + Else + Set(LVarB, TREE_2) + Set(LVarC, TREE_3) + EndIf + CaseEq(2) + IfEq(LVarA, 3) + Set(LVarB, TREE_0) + Set(LVarC, TREE_1) + Else + Set(LVarB, TREE_0) + Set(LVarC, TREE_3) + EndIf + CaseEq(3) + Set(LVarB, TREE_0) + Set(LVarC, TREE_1) + CaseEq(4) + IfEq(LVarA, 1) + Set(LVarB, TREE_0) + Set(LVarC, TREE_3) + Else + Set(LVarB, TREE_0) + Set(LVarC, TREE_1) + EndIf + CaseEq(5) + IfEq(LVarA, 0) + Set(LVarB, TREE_2) + Set(LVarC, TREE_3) + Else + Set(LVarB, TREE_0) + Set(LVarC, TREE_3) + EndIf + EndSwitch + Call(RandInt, 1, LVar0) + IfEq(LVar0, 0) + Add(LVarF, -1) + Else + Add(LVarF, 1) + EndIf + IfGe(LVarF, 6) + Set(LVarF, 0) + EndIf + IfLt(LVarF, 0) + Set(LVarF, 5) + EndIf // get time for each jump - EVT_SWITCH(MV_CorrectCount) - EVT_CASE_EQ(0) - EVT_SET(LVarD, 15) - EVT_CASE_EQ(1) - EVT_SET(LVarD, 10) - EVT_CASE_EQ(2) - EVT_SET(LVarD, 6) - EVT_END_SWITCH - EVT_SET(LVar0, ANIM_Fuzzy_Jump) - EVT_CALL(RandInt, 2, LVar1) - EVT_ADD(LVar0, LVar1) - EVT_CALL(SetNpcAnimation, NPC_BossFuzzy, LVar0) - EVT_CALL(SetNpcAnimation, NPC_Fuzzy_01, LVar0) - EVT_CALL(SetNpcAnimation, NPC_Fuzzy_02, LVar0) - EVT_CALL(SetNpcAnimation, NPC_Fuzzy_03, LVar0) - EVT_CALL(PlaySound, SOUND_SEQ_FUZZY_HOP) - EVT_THREAD - EVT_CALL(N(GetTreeHidingSpotPos), MV_CorrectTreeIndex, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_BossFuzzy, LVar0, LVar1, LVar2, LVarD) - EVT_END_THREAD - EVT_IF_NE(MV_CorrectTreeIndex, LVarA) - EVT_THREAD - EVT_CALL(N(GetTreeHidingSpotPos), MV_CorrectTreeIndex, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Fuzzy_01, LVar0, LVar1, LVar2) - EVT_CALL(N(GetTreeHidingSpotPos), LVarA, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Fuzzy_01, LVar0, LVar1, LVar2, LVarD) - EVT_END_THREAD - EVT_SET(LFlag0, FALSE) - EVT_IF_EQ(LVarB, 0) - EVT_IF_EQ(LVarC, 3) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LFlag0, FALSE) - EVT_THREAD - EVT_CALL(N(GetTreeHidingSpotPos), LVarB, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Fuzzy_02, LVar0, LVar1, LVar2) - EVT_CALL(N(GetTreeHidingSpotPos), LVarC, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Fuzzy_02, LVar0, LVar1, LVar2, LVarD) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(GetTreeHidingSpotPos), LVarC, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Fuzzy_03, LVar0, LVar1, LVar2) - EVT_CALL(N(GetTreeHidingSpotPos), LVarB, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Fuzzy_03, LVar0, LVar1, LVar2, LVarD) - EVT_END_THREAD - EVT_ELSE - EVT_THREAD - EVT_CALL(N(GetTreeHidingSpotPos), LVarB, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Fuzzy_02, LVar0, LVar1, LVar2) - EVT_CALL(N(GetTreeHidingSpotPos), LVarB, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Fuzzy_02, LVar0, LVar1, LVar2, LVarD) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(GetTreeHidingSpotPos), LVarC, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Fuzzy_03, LVar0, LVar1, LVar2) - EVT_CALL(N(GetTreeHidingSpotPos), LVarC, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Fuzzy_03, LVar0, LVar1, LVar2, LVarD) - EVT_END_THREAD - EVT_END_IF - EVT_ELSE - EVT_THREAD - EVT_ADD(LVarA, 1) - EVT_MOD(LVarA, 4) - EVT_CALL(N(GetTreeHidingSpotPos), LVarA, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Fuzzy_01, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Fuzzy_01, LVar0, LVar1, LVar2, LVarD) - EVT_END_THREAD - EVT_THREAD - EVT_ADD(LVarA, 2) - EVT_MOD(LVarA, 4) - EVT_CALL(N(GetTreeHidingSpotPos), LVarA, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Fuzzy_02, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Fuzzy_02, LVar0, LVar1, LVar2, LVarD) - EVT_END_THREAD - EVT_THREAD - EVT_ADD(LVarA, 3) - EVT_MOD(LVarA, 4) - EVT_CALL(N(GetTreeHidingSpotPos), LVarA, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Fuzzy_03, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Fuzzy_03, LVar0, LVar1, LVar2, LVarD) - EVT_END_THREAD - EVT_END_IF - EVT_WAIT(2) - EVT_CALL(N(GetTreeHidingSpotPos), MV_CorrectTreeIndex, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 2) - EVT_CALL(NpcJump0, NPC_KoopersShell, LVar0, LVar1, LVar2, LVarD) - EVT_CALL(SetNpcAnimation, NPC_BossFuzzy, ANIM_Fuzzy_Still) - EVT_CALL(SetNpcAnimation, NPC_Fuzzy_01, ANIM_Fuzzy_Still) - EVT_CALL(SetNpcAnimation, NPC_Fuzzy_02, ANIM_Fuzzy_Still) - EVT_CALL(SetNpcAnimation, NPC_Fuzzy_03, ANIM_Fuzzy_Still) - EVT_CALL(N(AnimateTreeBranch), TREE_0, 0) - EVT_CALL(N(AnimateTreeBranch), TREE_1, 0) - EVT_CALL(N(AnimateTreeBranch), TREE_2, 0) - EVT_CALL(N(AnimateTreeBranch), TREE_3, 0) - EVT_CALL(PlaySound, SOUND_SHAKE_TREE_LEAVES) - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(30) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) + Switch(MV_CorrectCount) + CaseEq(0) + Set(LVarD, 15) + CaseEq(1) + Set(LVarD, 10) + CaseEq(2) + Set(LVarD, 6) + EndSwitch + Set(LVar0, ANIM_Fuzzy_Jump) + Call(RandInt, 2, LVar1) + Add(LVar0, LVar1) + Call(SetNpcAnimation, NPC_BossFuzzy, LVar0) + Call(SetNpcAnimation, NPC_Fuzzy_01, LVar0) + Call(SetNpcAnimation, NPC_Fuzzy_02, LVar0) + Call(SetNpcAnimation, NPC_Fuzzy_03, LVar0) + Call(PlaySound, SOUND_SEQ_FUZZY_HOP) + Thread + Call(N(GetTreeHidingSpotPos), MV_CorrectTreeIndex, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_BossFuzzy, LVar0, LVar1, LVar2, LVarD) + EndThread + IfNe(MV_CorrectTreeIndex, LVarA) + Thread + Call(N(GetTreeHidingSpotPos), MV_CorrectTreeIndex, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Fuzzy_01, LVar0, LVar1, LVar2) + Call(N(GetTreeHidingSpotPos), LVarA, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Fuzzy_01, LVar0, LVar1, LVar2, LVarD) + EndThread + Set(LFlag0, FALSE) + IfEq(LVarB, 0) + IfEq(LVarC, 3) + Set(LFlag0, TRUE) + EndIf + EndIf + IfEq(LFlag0, FALSE) + Thread + Call(N(GetTreeHidingSpotPos), LVarB, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Fuzzy_02, LVar0, LVar1, LVar2) + Call(N(GetTreeHidingSpotPos), LVarC, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Fuzzy_02, LVar0, LVar1, LVar2, LVarD) + EndThread + Thread + Call(N(GetTreeHidingSpotPos), LVarC, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Fuzzy_03, LVar0, LVar1, LVar2) + Call(N(GetTreeHidingSpotPos), LVarB, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Fuzzy_03, LVar0, LVar1, LVar2, LVarD) + EndThread + Else + Thread + Call(N(GetTreeHidingSpotPos), LVarB, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Fuzzy_02, LVar0, LVar1, LVar2) + Call(N(GetTreeHidingSpotPos), LVarB, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Fuzzy_02, LVar0, LVar1, LVar2, LVarD) + EndThread + Thread + Call(N(GetTreeHidingSpotPos), LVarC, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Fuzzy_03, LVar0, LVar1, LVar2) + Call(N(GetTreeHidingSpotPos), LVarC, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Fuzzy_03, LVar0, LVar1, LVar2, LVarD) + EndThread + EndIf + Else + Thread + Add(LVarA, 1) + Mod(LVarA, 4) + Call(N(GetTreeHidingSpotPos), LVarA, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Fuzzy_01, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Fuzzy_01, LVar0, LVar1, LVar2, LVarD) + EndThread + Thread + Add(LVarA, 2) + Mod(LVarA, 4) + Call(N(GetTreeHidingSpotPos), LVarA, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Fuzzy_02, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Fuzzy_02, LVar0, LVar1, LVar2, LVarD) + EndThread + Thread + Add(LVarA, 3) + Mod(LVarA, 4) + Call(N(GetTreeHidingSpotPos), LVarA, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Fuzzy_03, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Fuzzy_03, LVar0, LVar1, LVar2, LVarD) + EndThread + EndIf + Wait(2) + Call(N(GetTreeHidingSpotPos), MV_CorrectTreeIndex, LVar0, LVar1, LVar2) + Add(LVar2, 2) + Call(NpcJump0, NPC_KoopersShell, LVar0, LVar1, LVar2, LVarD) + Call(SetNpcAnimation, NPC_BossFuzzy, ANIM_Fuzzy_Still) + Call(SetNpcAnimation, NPC_Fuzzy_01, ANIM_Fuzzy_Still) + Call(SetNpcAnimation, NPC_Fuzzy_02, ANIM_Fuzzy_Still) + Call(SetNpcAnimation, NPC_Fuzzy_03, ANIM_Fuzzy_Still) + Call(N(AnimateTreeBranch), TREE_0, 0) + Call(N(AnimateTreeBranch), TREE_1, 0) + Call(N(AnimateTreeBranch), TREE_2, 0) + Call(N(AnimateTreeBranch), TREE_3, 0) + Call(PlaySound, SOUND_SHAKE_TREE_LEAVES) + EndLoop + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(30) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 0) #if VERSION_PAL - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3 / DT)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3 / DT)) #else - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 3) + Call(SetCamSpeed, CAM_DEFAULT, 3) #endif - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_FuzzyBoss_TauntFromTree) = { - EVT_SET(AF_NOK04_PlayingGame, TRUE) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_END_THREAD - EVT_END_IF - EVT_CALL(N(AnimateTreeBranch), 2, 0) - EVT_CALL(PlaySound, SOUND_SHAKE_TREE_LEAVES) - EVT_CALL(SetNpcAnimation, NPC_BossFuzzy, ANIM_Fuzzy_Anim0B) - EVT_CALL(N(GetTreeHidingSpotPos), 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetThreadAnchorPos), LVar0, LVar1, LVar2) - EVT_CALL(N(SetThreadTargetLengthAngle), 50, 0, 0) - EVT_CALL(GetNpcPointer, NPC_BossFuzzy, LVar0) - EVT_CALL(GetNpcPointer, NPC_KoopersShell, LVar1) - EVT_CALL(N(AttachThreadBackNpc), LVar0) - EVT_CALL(N(AttachThreadFrontNpc), LVar1) - EVT_CALL(SetModelFlags, MODEL_o177, MODEL_FLAG_USES_CUSTOM_GFX, TRUE) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_FUZZY_THIEF_HID_IN_TREE) - EVT_SET(LVar0, MSG_CH1_00BC) - EVT_SET(GB_StoryProgress, STORY_CH1_FUZZY_THIEF_HID_IN_TREE) - EVT_ELSE - EVT_SET(LVar0, MSG_CH1_00BD) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_BossFuzzy, ANIM_Fuzzy_Anim0C, ANIM_Fuzzy_Idle, 5, LVar0) - EVT_CALL(SetMusicTrack, 0, SONG_PLAYROOM, 0, 8) - EVT_CALL(N(SetThreadTargetLengthAngle), 0, 0, 30 * DT) - EVT_WAIT(30 * DT) - EVT_CALL(SetModelFlags, MODEL_o177, MODEL_FLAG_USES_CUSTOM_GFX, FALSE) - EVT_CALL(N(AttachThreadFrontNpc), NULL) - EVT_CALL(N(AttachThreadBackNpc), NULL) - EVT_EXEC(N(EVS_Scene_ShuffleFuzzyPositions)) - EVT_RETURN - EVT_END + Set(AF_NOK04_PlayingGame, TRUE) + IfEq(LFlag0, FALSE) + Call(DisablePlayerInput, TRUE) + Thread + Wait(20 * DT) + Call(DisablePlayerPhysics, TRUE) + EndThread + EndIf + Call(N(AnimateTreeBranch), 2, 0) + Call(PlaySound, SOUND_SHAKE_TREE_LEAVES) + Call(SetNpcAnimation, NPC_BossFuzzy, ANIM_Fuzzy_Anim0B) + Call(N(GetTreeHidingSpotPos), 2, LVar0, LVar1, LVar2) + Call(N(SetThreadAnchorPos), LVar0, LVar1, LVar2) + Call(N(SetThreadTargetLengthAngle), 50, 0, 0) + Call(GetNpcPointer, NPC_BossFuzzy, LVar0) + Call(GetNpcPointer, NPC_KoopersShell, LVar1) + Call(N(AttachThreadBackNpc), LVar0) + Call(N(AttachThreadFrontNpc), LVar1) + Call(SetModelFlags, MODEL_o177, MODEL_FLAG_USES_CUSTOM_GFX, TRUE) + IfLt(GB_StoryProgress, STORY_CH1_FUZZY_THIEF_HID_IN_TREE) + Set(LVar0, MSG_CH1_00BC) + Set(GB_StoryProgress, STORY_CH1_FUZZY_THIEF_HID_IN_TREE) + Else + Set(LVar0, MSG_CH1_00BD) + EndIf + Call(SpeakToPlayer, NPC_BossFuzzy, ANIM_Fuzzy_Anim0C, ANIM_Fuzzy_Idle, 5, LVar0) + Call(SetMusicTrack, 0, SONG_PLAYROOM, 0, 8) + Call(N(SetThreadTargetLengthAngle), 0, 0, 30 * DT) + Wait(30 * DT) + Call(SetModelFlags, MODEL_o177, MODEL_FLAG_USES_CUSTOM_GFX, FALSE) + Call(N(AttachThreadFrontNpc), NULL) + Call(N(AttachThreadBackNpc), NULL) + Exec(N(EVS_Scene_ShuffleFuzzyPositions)) + Return + End }; EvtScript N(EVS_Scene_HideInTree) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_CH1_FUZZY_THIEF_HID_IN_TREE) - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 60) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_SET(LFlag0, FALSE) - EVT_EXEC(N(EVS_FuzzyBoss_TauntFromTree)) - EVT_RETURN - EVT_CASE_GE(STORY_CH1_KOOPER_JOINED_PARTY) - EVT_CALL(SetNpcPos, NPC_BossFuzzy, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_KoopersShell, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, TRUE) - EVT_THREAD - EVT_WAIT(17 * DT) - EVT_CALL(DisablePlayerPhysics, TRUE) + Switch(GB_StoryProgress) + CaseEq(STORY_CH1_FUZZY_THIEF_HID_IN_TREE) + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, 60) + Wait(1) + Goto(0) + EndIf + Set(LFlag0, FALSE) + Exec(N(EVS_FuzzyBoss_TauntFromTree)) + Return + CaseGe(STORY_CH1_KOOPER_JOINED_PARTY) + Call(SetNpcPos, NPC_BossFuzzy, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_KoopersShell, NPC_DISPOSE_LOCATION) + Return + EndSwitch + Call(DisablePlayerInput, TRUE) + Thread + Wait(17 * DT) + Call(DisablePlayerPhysics, TRUE) #if VERSION_PAL - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(4 / DT)) + Call(SetPlayerSpeed, Float(4 / DT)) #else - EVT_CALL(SetPlayerSpeed, 4) + Call(SetPlayerSpeed, 4) #endif - EVT_CALL(PlayerMoveTo, -300, 325, 0) - EVT_END_THREAD - EVT_WAIT(5 * DT) - EVT_CALL(SetNpcJumpscale, NPC_BossFuzzy, EVT_FLOAT(0.703)) - EVT_CALL(SetNpcJumpscale, NPC_KoopersShell, EVT_FLOAT(0.703)) - EVT_THREAD - EVT_WAIT(20 * DT) - EVT_SET(LVarA, 58) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 227) - EVT_SET(LVarD, 80 * DT) - EVT_EXEC(N(EVS_MoveCam_TrackBoss)) - EVT_END_THREAD - EVT_SET(LVarA, -260) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 290) - EVT_SET(LVarD, 20 * DT) - EVT_EXEC(N(EVS_BossJumpTo)) - EVT_WAIT(1) - EVT_CALL(NpcJump0, NPC_KoopersShell, LVarA, 0, 293, LVarD) - EVT_SET(LVarA, -180) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 245) - EVT_SET(LVarD, 15 * DT) - EVT_EXEC(N(EVS_BossJumpTo)) - EVT_WAIT(1) - EVT_CALL(NpcJump0, NPC_KoopersShell, LVarA, LVarB, 248, LVarD) - EVT_SET(LVarA, -100) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 235) - EVT_SET(LVarD, 15 * DT) - EVT_EXEC(N(EVS_BossJumpTo)) - EVT_WAIT(1) - EVT_CALL(NpcJump0, NPC_KoopersShell, LVarA, LVarB, 238, LVarD) - EVT_SET(LVarA, 85) - EVT_SET(LVarB, 0) - EVT_SET(LVarC, 217) - EVT_SET(LVarD, 30 * DT) - EVT_EXEC(N(EVS_BossJumpTo)) - EVT_WAIT(1) - EVT_CALL(NpcJump0, NPC_KoopersShell, LVarA, LVarB, 220, LVarD) - EVT_CALL(N(GetTreeHidingSpotPos), 2, LVar0, LVar1, LVar2) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar3) - EVT_SET(LVarD, 30 * DT) - EVT_EXEC(N(EVS_BossJumpTo)) - EVT_WAIT(1) - EVT_ADD(LVarC, 3) - EVT_CALL(NpcJump0, NPC_KoopersShell, LVarA, LVarB, LVarC, LVarD) - EVT_CALL(EnableNpcShadow, NPC_BossFuzzy, FALSE) - EVT_CALL(EnableNpcShadow, NPC_KoopersShell, FALSE) - EVT_CALL(N(AnimateTreeBranch), 2, 0) - EVT_CALL(PlaySound, SOUND_SHAKE_TREE_LEAVES) - EVT_CALL(SetPlayerPos, -152, 0, 235) - EVT_CALL(PlayerMoveTo, 58, 227, 60 * DT) - EVT_SET(LFlag0, TRUE) - EVT_EXEC(N(EVS_FuzzyBoss_TauntFromTree)) - EVT_RETURN - EVT_END + Call(PlayerMoveTo, -300, 325, 0) + EndThread + Wait(5 * DT) + Call(SetNpcJumpscale, NPC_BossFuzzy, Float(0.703)) + Call(SetNpcJumpscale, NPC_KoopersShell, Float(0.703)) + Thread + Wait(20 * DT) + Set(LVarA, 58) + Set(LVarB, 0) + Set(LVarC, 227) + Set(LVarD, 80 * DT) + Exec(N(EVS_MoveCam_TrackBoss)) + EndThread + Set(LVarA, -260) + Set(LVarB, 0) + Set(LVarC, 290) + Set(LVarD, 20 * DT) + Exec(N(EVS_BossJumpTo)) + Wait(1) + Call(NpcJump0, NPC_KoopersShell, LVarA, 0, 293, LVarD) + Set(LVarA, -180) + Set(LVarB, 0) + Set(LVarC, 245) + Set(LVarD, 15 * DT) + Exec(N(EVS_BossJumpTo)) + Wait(1) + Call(NpcJump0, NPC_KoopersShell, LVarA, LVarB, 248, LVarD) + Set(LVarA, -100) + Set(LVarB, 0) + Set(LVarC, 235) + Set(LVarD, 15 * DT) + Exec(N(EVS_BossJumpTo)) + Wait(1) + Call(NpcJump0, NPC_KoopersShell, LVarA, LVarB, 238, LVarD) + Set(LVarA, 85) + Set(LVarB, 0) + Set(LVarC, 217) + Set(LVarD, 30 * DT) + Exec(N(EVS_BossJumpTo)) + Wait(1) + Call(NpcJump0, NPC_KoopersShell, LVarA, LVarB, 220, LVarD) + Call(N(GetTreeHidingSpotPos), 2, LVar0, LVar1, LVar2) + Set(LVarA, LVar0) + Set(LVarB, LVar1) + Set(LVarC, LVar3) + Set(LVarD, 30 * DT) + Exec(N(EVS_BossJumpTo)) + Wait(1) + Add(LVarC, 3) + Call(NpcJump0, NPC_KoopersShell, LVarA, LVarB, LVarC, LVarD) + Call(EnableNpcShadow, NPC_BossFuzzy, FALSE) + Call(EnableNpcShadow, NPC_KoopersShell, FALSE) + Call(N(AnimateTreeBranch), 2, 0) + Call(PlaySound, SOUND_SHAKE_TREE_LEAVES) + Call(SetPlayerPos, -152, 0, 235) + Call(PlayerMoveTo, 58, 227, 60 * DT) + Set(LFlag0, TRUE) + Exec(N(EVS_FuzzyBoss_TauntFromTree)) + Return + End }; EvtScript N(EVS_NpcIdle_WaitForWrongAnswer) = { - EVT_LABEL(0) - EVT_IF_EQ(MV_WrongAnswerBattle, 1) - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_LABEL(1) - EVT_IF_EQ(MV_WrongAnswerBattle, 1) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + IfEq(MV_WrongAnswerBattle, 1) + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Label(1) + IfEq(MV_WrongAnswerBattle, 1) + Wait(1) + Goto(1) + EndIf + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_Unused_RandomlyReveal) = { - EVT_CALL(RandInt, 399, LVar4) - EVT_DIV(LVar4, 100) - EVT_LABEL(0) - EVT_CALL(RandInt, 300, LVar5) - EVT_SWITCH(LVar5) - EVT_CASE_LT(100) - EVT_SUB(LVar4, 1) - EVT_CASE_LT(200) - EVT_ADD(LVar4, 1) - EVT_END_SWITCH - EVT_IF_LT(LVar4, 0) - EVT_SET(LVar4, 1) - EVT_END_IF - EVT_IF_GT(LVar4, 3) - EVT_SET(LVar4, 2) - EVT_END_IF - EVT_CALL(N(GetTreeHidingSpotPos), LVar4, LVar0, LVar1, LVar2) - EVT_CALL(RandInt, 10, LVar3) - EVT_ADD(LVar3, 20) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, LVar3) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(RandInt, 399, LVar4) + Div(LVar4, 100) + Label(0) + Call(RandInt, 300, LVar5) + Switch(LVar5) + CaseLt(100) + Sub(LVar4, 1) + CaseLt(200) + Add(LVar4, 1) + EndSwitch + IfLt(LVar4, 0) + Set(LVar4, 1) + EndIf + IfGt(LVar4, 3) + Set(LVar4, 2) + EndIf + Call(N(GetTreeHidingSpotPos), LVar4, LVar0, LVar1, LVar2) + Call(RandInt, 10, LVar3) + Add(LVar3, 20) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, LVar3) + Goto(0) + Return + End }; EvtScript N(EVS_NpcDefeat_WrongFuzzy) = { - EVT_CALL(N(InitThreadData)) - EVT_CALL(SetNpcAnimation, NPC_AmbushFuzzy, ANIM_Fuzzy_Anim0B) - EVT_CALL(N(GetTreeHidingSpotPos), MV_LastWrongTreeIndex, LVar0, LVar1, LVar2) - EVT_CALL(N(SetThreadAnchorPos), LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 50) - EVT_CALL(GetNpcPointer, NPC_AmbushFuzzy, LVar3) - EVT_CALL(N(AttachThreadFrontNpc), LVar3) - EVT_CALL(N(AttachThreadBackNpc), NULL) - EVT_CALL(N(SetThreadTargetLengthAngle), LVar1, 0, -1) - EVT_CALL(SetModelFlags, MODEL_o177, MODEL_FLAG_USES_CUSTOM_GFX, TRUE) - EVT_CALL(N(SetThreadTargetLengthAngle), 0, 0, 30) - EVT_WAIT(30) - EVT_CALL(N(AttachThreadFrontNpc), NULL) - EVT_CALL(SetModelFlags, MODEL_o177, MODEL_FLAG_USES_CUSTOM_GFX, FALSE) - EVT_SET(MV_WrongAnswerBattle, 0) - EVT_RETURN - EVT_END + Call(N(InitThreadData)) + Call(SetNpcAnimation, NPC_AmbushFuzzy, ANIM_Fuzzy_Anim0B) + Call(N(GetTreeHidingSpotPos), MV_LastWrongTreeIndex, LVar0, LVar1, LVar2) + Call(N(SetThreadAnchorPos), LVar0, LVar1, LVar2) + Sub(LVar1, 50) + Call(GetNpcPointer, NPC_AmbushFuzzy, LVar3) + Call(N(AttachThreadFrontNpc), LVar3) + Call(N(AttachThreadBackNpc), NULL) + Call(N(SetThreadTargetLengthAngle), LVar1, 0, -1) + Call(SetModelFlags, MODEL_o177, MODEL_FLAG_USES_CUSTOM_GFX, TRUE) + Call(N(SetThreadTargetLengthAngle), 0, 0, 30) + Wait(30) + Call(N(AttachThreadFrontNpc), NULL) + Call(SetModelFlags, MODEL_o177, MODEL_FLAG_USES_CUSTOM_GFX, FALSE) + Set(MV_WrongAnswerBattle, 0) + Return + End }; EvtScript N(EVS_MoveShellUp) = { - EVT_SET(LVar3, LVar0) - EVT_CALL(MakeLerp, LVarB, LVarD, 30, EASING_QUARTIC_IN) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, NPC_KoopersShell, LVar3, LVar0, LVar2) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVar3, LVar0) + Call(MakeLerp, LVarB, LVarD, 30, EASING_QUARTIC_IN) + Label(0) + Call(UpdateLerp) + Call(SetNpcPos, NPC_KoopersShell, LVar3, LVar0, LVar2) + IfEq(LVar1, 1) + Wait(1) + Goto(0) + EndIf + Return + End }; EvtScript N(EVS_MoveShellDown) = { - EVT_SET(LVar3, LVar0) - EVT_CALL(MakeLerp, LVarB, LVarD, 30, EASING_QUARTIC_IN) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, NPC_KoopersShell, LVar3, LVar0, LVar2) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVar3, LVar0) + Call(MakeLerp, LVarB, LVarD, 30, EASING_QUARTIC_IN) + Label(0) + Call(UpdateLerp) + Call(SetNpcPos, NPC_KoopersShell, LVar3, LVar0, LVar2) + IfEq(LVar1, 1) + Wait(1) + Goto(0) + EndIf + Return + End }; EvtScript N(EVS_NpcAI_DoNothing) = { - EVT_LABEL(10) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Label(10) + Wait(1) + Goto(10) + Return + End }; EvtScript N(EVS_NpcAI_StartBossBattle) = { - EVT_IF_EQ(AF_NOK04_BattleStarted, FALSE) - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_SET(AF_NOK04_BattleStarted, TRUE) - EVT_END_IF - EVT_LABEL(10) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + IfEq(AF_NOK04_BattleStarted, FALSE) + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Set(AF_NOK04_BattleStarted, TRUE) + EndIf + Label(10) + Wait(1) + Goto(10) + Return + End }; EvtScript N(EVS_NpcDefeat_FuzzyBoss) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_SET(AF_NOK04_BattleDone, TRUE) - EVT_SET(AF_NOK04_CamPanDone, FALSE) - EVT_LABEL(10) - EVT_IF_EQ(AF_NOK04_CamPanDone, FALSE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(BindNpcAI, NPC_BossFuzzy, EVT_PTR(N(EVS_NpcAI_DoNothing))) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Set(AF_NOK04_BattleDone, TRUE) + Set(AF_NOK04_CamPanDone, FALSE) + Label(10) + IfEq(AF_NOK04_CamPanDone, FALSE) + Wait(1) + Goto(10) + EndIf + Call(BindNpcAI, NPC_BossFuzzy, Ref(N(EVS_NpcAI_DoNothing))) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + Call(DisablePlayerInput, FALSE) + EndSwitch + Return + End }; s32 N(ShellChoiceDone) = FALSE; @@ -829,26 +829,26 @@ API_CALLABLE(N(SetShellChosen)) { } EvtScript N(EVS_ShellPrompt) = { - EVT_SET(LFlagA, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_LABEL(0) - EVT_CALL(ShowKeyChoicePopup) - EVT_CALL(CloseChoicePopup) - EVT_IF_NE(LVar0, 25) - EVT_IF_EQ(LFlagA, FALSE) - EVT_SET(LFlagA, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Kooper, ANIM_KooperWithoutShell_Talk, ANIM_KooperWithoutShell_Idle, 0, MSG_CH1_00C5) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Kooper, ANIM_KooperWithoutShell_Talk, ANIM_KooperWithoutShell_Idle, 0, MSG_CH1_00C6) - EVT_END_IF - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(N(SetShellChosen)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END + Set(LFlagA, FALSE) + Call(DisablePlayerInput, TRUE) + Label(0) + Call(ShowKeyChoicePopup) + Call(CloseChoicePopup) + IfNe(LVar0, 25) + IfEq(LFlagA, FALSE) + Set(LFlagA, TRUE) + Call(SpeakToPlayer, NPC_Kooper, ANIM_KooperWithoutShell_Talk, ANIM_KooperWithoutShell_Idle, 0, MSG_CH1_00C5) + Else + Call(SpeakToPlayer, NPC_Kooper, ANIM_KooperWithoutShell_Talk, ANIM_KooperWithoutShell_Idle, 0, MSG_CH1_00C6) + EndIf + Goto(0) + EndIf + Call(RemoveKeyItemAt, LVar1) + Call(N(SetShellChosen)) + Call(DisablePlayerInput, FALSE) + Unbind + Return + End }; s32 N(ShellList)[] = { @@ -857,672 +857,672 @@ s32 N(ShellList)[] = { }; EvtScript N(EVS_ChooseShell) = { - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_ShellPrompt)), TRIGGER_FORCE_ACTIVATE, 0, EVT_PTR(N(ShellList)), 0, 1) - EVT_CALL(N(AwaitShellChoice)) - EVT_RETURN - EVT_END + BindPadlock(Ref(N(EVS_ShellPrompt)), TRIGGER_FORCE_ACTIVATE, 0, Ref(N(ShellList)), 0, 1) + Call(N(AwaitShellChoice)) + Return + End }; EvtScript N(EVS_Scene_KooperArrives) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, -104) - EVT_SUB(LVar2, 241) - EVT_MUL(LVar0, -101) - EVT_MUL(LVar2, 35) - EVT_ADD(LVar0, LVar2) - EVT_IF_LE(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcPos, NPC_Kooper, -350, 0, 350) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -220, 0, 270) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -220, 0, 270) - EVT_CALL(GetCamDistance, CAM_DEFAULT, LVarA) - EVT_MULF(LVarA, EVT_FLOAT(0.703125)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, LVarA) + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar0, -104) + Sub(LVar2, 241) + Mul(LVar0, -101) + Mul(LVar2, 35) + Add(LVar0, LVar2) + IfLe(LVar0, 0) + Wait(1) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Call(SetNpcPos, NPC_Kooper, -350, 0, 350) + Call(UseSettingsFrom, CAM_DEFAULT, -220, 0, 270) + Call(SetPanTarget, CAM_DEFAULT, -220, 0, 270) + Call(GetCamDistance, CAM_DEFAULT, LVarA) + MulF(LVarA, Float(0.703125)) + Call(SetCamDistance, CAM_DEFAULT, LVarA) #if VERSION_PAL - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3 / DT)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3 / DT)) #else - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 3) + Call(SetCamSpeed, CAM_DEFAULT, 3) #endif - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(PlayerMoveTo, -205, 267, 40) - EVT_CALL(PlayerFaceNpc, NPC_Kooper, FALSE) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_Kooper, ANIM_KooperWithoutShell_RunAngry) - EVT_CALL(NpcMoveTo, NPC_Kooper, -246, 290, 30) - EVT_CALL(SetNpcAnimation, NPC_Kooper, ANIM_KooperWithoutShell_IdleAngry) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_Kooper, ANIM_KooperWithoutShell_TalkAngry, ANIM_KooperWithoutShell_IdleAngry, 0, MSG_CH1_00C3) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Kooper, 0) - EVT_CALL(SpeakToNpc, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, NPC_Kooper, MSG_CH1_00C4) - EVT_CALL(SetNpcAnimation, NPC_Kooper, ANIM_KooperWithoutShell_Idle) - EVT_EXEC_WAIT(N(EVS_ChooseShell)) - EVT_CALL(PlayerMoveTo, -207, 268, 7) - EVT_CALL(PlayerFaceNpc, NPC_Kooper, FALSE) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_TakeItem) - EVT_CALL(SetNpcJumpscale, NPC_KoopersShell, 1) - EVT_THREAD - EVT_LOOP(30) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -15) - EVT_ADD(LVar1, 8) - EVT_ADD(LVar2, 12) - EVT_CALL(SetNpcPos, NPC_KoopersShell, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_Kooper, ANIM_KooperWithoutShell_Idle) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_Kooper, ANIM_KooperWithoutShell_Talk, ANIM_KooperWithoutShell_Idle, 0, MSG_CH1_00C7) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kooper, ANIM_KooperWithoutShell_Celebrate) - EVT_WAIT(15 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kooper, ANIM_KooperWithoutShell_Idle) - EVT_CALL(EndSpeech, NPC_Kooper, ANIM_KooperWithoutShell_Talk, ANIM_KooperWithoutShell_Idle, 0) - EVT_CALL(PlayerFaceNpc, NPC_Kooper, FALSE) - EVT_CALL(NpcFacePlayer, NPC_Kooper, 0) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetNpcAnimation, NPC_Kooper, ANIM_KooperWithoutShell_Still) - EVT_CALL(EnableNpcBlur, NPC_KoopersShell, TRUE) - EVT_CALL(GetNpcPos, NPC_Kooper, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 1) - EVT_ADD(LVar2, 1) - EVT_ADD(LVar1, 20) - EVT_SET(LVar3, 1) - EVT_SET(LVar4, 6) - EVT_EXEC(N(EVS_GetIntoShell)) - EVT_CALL(InterpNpcYaw, LVar3, 60, 0) - EVT_CALL(NpcJump0, NPC_KoopersShell, LVar0, LVar1, LVar2, 30 * DT) - EVT_CALL(SetNpcPos, NPC_KoopersShell, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcSprite, NPC_Kooper, ANIM_WorldKooper_Idle) - EVT_CALL(SetNpcFlagBits, NPC_Kooper, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcSprite, NPC_Kooper, ANIM_WorldKooper_Still) - EVT_WAIT(4 * DT) - EVT_CALL(EnableNpcBlur, NPC_KoopersShell, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Kooper, ANIM_WorldKooper_Idle) - EVT_CALL(SetNpcSprite, NPC_Kooper, ANIM_WorldKooper_Celebrate) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kooper, ANIM_WorldKooper_Idle) - EVT_CALL(SpeakToNpc, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, NPC_Kooper, MSG_CH1_00C8) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_Kooper, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH1_00C9) - EVT_WAIT(10 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, 0, EMOTE_QUESTION, -45, 50, EMOTER_PLAYER, 0, 0, 0, 0) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Thinking) - EVT_WAIT(40 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH1_00CA) - EVT_CALL(SpeakToPlayer, NPC_Kooper, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH1_00CB) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToNpc, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, NPC_Kooper, MSG_CH1_00CC) - EVT_CALL(EnablePartnerAI) - EVT_CALL(PlayerFaceNpc, NPC_Kooper, FALSE) - EVT_LABEL(10) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Thinking) - EVT_CALL(ShowChoice, MSG_Choice_000F) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(EndSpeech, NPC_Kooper, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0) - EVT_CALL(SpeakToPlayer, NPC_Kooper, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH1_00CD) - EVT_GOTO(10) - EVT_ELSE - EVT_CALL(EndSpeech, NPC_Kooper, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0) - EVT_CALL(SpeakToPlayer, NPC_Kooper, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH1_00CE) - EVT_CALL(SetNpcAnimation, NPC_Kooper, ANIM_WorldKooper_Celebrate) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kooper, ANIM_WorldKooper_Idle) - EVT_CALL(EndSpeech, NPC_Kooper, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0) - EVT_SET(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) - EVT_END_IF - EVT_CALL(N(ChangeNpcToPartner), NPC_Kooper, PARTNER_KOOPER) - EVT_CALL(N(LoadPartyImage)) - EVT_EXEC(N(EVS_PushPartnerSong)) - EVT_WAIT(15 * DT) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_018A, 160, 40) - EVT_EXEC(N(EVS_PopSong)) - EVT_WAIT(10 * DT) - EVT_CALL(EnablePartnerAI) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Wait(20 * DT) + Call(PlayerMoveTo, -205, 267, 40) + Call(PlayerFaceNpc, NPC_Kooper, FALSE) + EndThread + Call(SetNpcAnimation, NPC_Kooper, ANIM_KooperWithoutShell_RunAngry) + Call(NpcMoveTo, NPC_Kooper, -246, 290, 30) + Call(SetNpcAnimation, NPC_Kooper, ANIM_KooperWithoutShell_IdleAngry) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_Kooper, ANIM_KooperWithoutShell_TalkAngry, ANIM_KooperWithoutShell_IdleAngry, 0, MSG_CH1_00C3) + Call(DisablePartnerAI, 0) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Kooper, 0) + Call(SpeakToNpc, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, NPC_Kooper, MSG_CH1_00C4) + Call(SetNpcAnimation, NPC_Kooper, ANIM_KooperWithoutShell_Idle) + ExecWait(N(EVS_ChooseShell)) + Call(PlayerMoveTo, -207, 268, 7) + Call(PlayerFaceNpc, NPC_Kooper, FALSE) + Call(SetPlayerAnimation, ANIM_MarioW1_TakeItem) + Call(SetNpcJumpscale, NPC_KoopersShell, 1) + Thread + Loop(30) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, -15) + Add(LVar1, 8) + Add(LVar2, 12) + Call(SetNpcPos, NPC_KoopersShell, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + Call(SetNpcAnimation, NPC_Kooper, ANIM_KooperWithoutShell_Idle) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_Kooper, ANIM_KooperWithoutShell_Talk, ANIM_KooperWithoutShell_Idle, 0, MSG_CH1_00C7) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Kooper, ANIM_KooperWithoutShell_Celebrate) + Wait(15 * DT) + Call(SetNpcAnimation, NPC_Kooper, ANIM_KooperWithoutShell_Idle) + Call(EndSpeech, NPC_Kooper, ANIM_KooperWithoutShell_Talk, ANIM_KooperWithoutShell_Idle, 0) + Call(PlayerFaceNpc, NPC_Kooper, FALSE) + Call(NpcFacePlayer, NPC_Kooper, 0) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetNpcAnimation, NPC_Kooper, ANIM_KooperWithoutShell_Still) + Call(EnableNpcBlur, NPC_KoopersShell, TRUE) + Call(GetNpcPos, NPC_Kooper, LVar0, LVar1, LVar2) + Add(LVar0, 1) + Add(LVar2, 1) + Add(LVar1, 20) + Set(LVar3, 1) + Set(LVar4, 6) + Exec(N(EVS_GetIntoShell)) + Call(InterpNpcYaw, LVar3, 60, 0) + Call(NpcJump0, NPC_KoopersShell, LVar0, LVar1, LVar2, 30 * DT) + Call(SetNpcPos, NPC_KoopersShell, NPC_DISPOSE_LOCATION) + Call(SetNpcSprite, NPC_Kooper, ANIM_WorldKooper_Idle) + Call(SetNpcFlagBits, NPC_Kooper, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcSprite, NPC_Kooper, ANIM_WorldKooper_Still) + Wait(4 * DT) + Call(EnableNpcBlur, NPC_KoopersShell, TRUE) + Call(SetNpcAnimation, NPC_Kooper, ANIM_WorldKooper_Idle) + Call(SetNpcSprite, NPC_Kooper, ANIM_WorldKooper_Celebrate) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Kooper, ANIM_WorldKooper_Idle) + Call(SpeakToNpc, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, NPC_Kooper, MSG_CH1_00C8) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_Kooper, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH1_00C9) + Wait(10 * DT) + Call(PlaySoundAtPlayer, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) + Call(ShowEmote, 0, EMOTE_QUESTION, -45, 50, EMOTER_PLAYER, 0, 0, 0, 0) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Thinking) + Wait(40 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH1_00CA) + Call(SpeakToPlayer, NPC_Kooper, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH1_00CB) + Wait(10 * DT) + Call(SpeakToNpc, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, NPC_Kooper, MSG_CH1_00CC) + Call(EnablePartnerAI) + Call(PlayerFaceNpc, NPC_Kooper, FALSE) + Label(10) + Call(SetPlayerAnimation, ANIM_Mario1_Thinking) + Call(ShowChoice, MSG_Choice_000F) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + IfEq(LVar0, 1) + Call(EndSpeech, NPC_Kooper, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0) + Call(SpeakToPlayer, NPC_Kooper, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH1_00CD) + Goto(10) + Else + Call(EndSpeech, NPC_Kooper, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0) + Call(SpeakToPlayer, NPC_Kooper, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH1_00CE) + Call(SetNpcAnimation, NPC_Kooper, ANIM_WorldKooper_Celebrate) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Kooper, ANIM_WorldKooper_Idle) + Call(EndSpeech, NPC_Kooper, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0) + Set(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) + EndIf + Call(N(ChangeNpcToPartner), NPC_Kooper, PARTNER_KOOPER) + Call(N(LoadPartyImage)) + Exec(N(EVS_PushPartnerSong)) + Wait(15 * DT) + Call(ShowMessageAtScreenPos, MSG_Menus_018A, 160, 40) + Exec(N(EVS_PopSong)) + Wait(10 * DT) + Call(EnablePartnerAI) + Call(PanToTarget, CAM_DEFAULT, 0, 0) #if VERSION_PAL - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3 / DT)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3 / DT)) #else - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 3) + Call(SetCamSpeed, CAM_DEFAULT, 3) #endif - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(AwaitPlayerApproach, -400, 400, 100) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH1_00CF, 160, 40) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -100, 0, 225) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -100, 0, 225) - EVT_CALL(SetCamDistance, CAM_DEFAULT, -250) + Call(DisablePlayerInput, FALSE) + Call(AwaitPlayerApproach, -400, 400, 100) + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_CH1_00CF, 160, 40) + Call(UseSettingsFrom, CAM_DEFAULT, -100, 0, 225) + Call(SetPanTarget, CAM_DEFAULT, -100, 0, 225) + Call(SetCamDistance, CAM_DEFAULT, -250) #if VERSION_PAL - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3 / DT)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3 / DT)) #else - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 3) + Call(SetCamSpeed, CAM_DEFAULT, 3) #endif - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_BossFuzzy, ANIM_Fuzzy_Walk) - EVT_CALL(SetNpcPos, NPC_BossFuzzy, 63, 0, 212) - EVT_CALL(EnableNpcShadow, NPC_BossFuzzy, TRUE) - EVT_CALL(SetNpcJumpscale, NPC_BossFuzzy, EVT_FLOAT(2.0)) - EVT_CALL(PlaySoundAtNpc, NPC_BossFuzzy, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_BossFuzzy, -100, 0, 225, 20) - EVT_SET(AF_NOK04_TauntMsgDone, FALSE) - EVT_SET(AF_NOK04_FleeMsgDone, FALSE) - EVT_SET(AF_NOK04_BattleDone, FALSE) - EVT_THREAD - EVT_CALL(ShowMessageAtScreenPos, MSG_CH1_00D0, 160, 40) - EVT_SET(AF_NOK04_TauntMsgDone, TRUE) - EVT_END_THREAD - EVT_CALL(GetNpcPos, NPC_BossFuzzy, LVarA, LVarB, LVarC) - EVT_LABEL(30) - EVT_CALL(SetNpcJumpscale, NPC_BossFuzzy, EVT_FLOAT(2.0)) - EVT_CALL(PlaySoundAtNpc, NPC_BossFuzzy, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_BossFuzzy, LVarA, LVarB, LVarC, 12 * DT) - EVT_IF_EQ(AF_NOK04_TauntMsgDone, FALSE) - EVT_GOTO(30) - EVT_END_IF - EVT_THREAD - EVT_WAIT(27 * DT) - EVT_CALL(BindNpcDefeat, NPC_BossFuzzy, EVT_PTR(N(EVS_NpcDefeat_FuzzyBoss))) - EVT_CALL(BindNpcAI, NPC_BossFuzzy, EVT_PTR(N(EVS_NpcAI_StartBossBattle))) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_BossFuzzy, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_BossFuzzy, -212, 0, 237, 15 * DT) - EVT_CALL(GetPlayerPos, LVarA, LVarB, LVarC) - EVT_ADD(LVarB, 37) - EVT_CALL(PlaySoundAtNpc, NPC_BossFuzzy, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_BossFuzzy, LVarA, LVarB, LVarC, 20 * DT) - EVT_WAIT(2) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_PanicHoverStill) - EVT_CALL(PlaySoundAtNpc, NPC_BossFuzzy, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_BossFuzzy, LVarA, LVarB, LVarC, 15 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_LABEL(21) - EVT_IF_EQ(AF_NOK04_BattleDone, FALSE) - EVT_WAIT(1) - EVT_GOTO(21) - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_BossFuzzy, -255, 0, 287) - EVT_CALL(GetNpcPos, NPC_BossFuzzy, LVarA, LVarB, LVarC) - EVT_LABEL(31) - EVT_CALL(SetNpcJumpscale, NPC_BossFuzzy, EVT_FLOAT(2.0)) - EVT_CALL(PlaySoundAtNpc, NPC_BossFuzzy, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_BossFuzzy, LVarA, LVarB, LVarC, 15 * DT) - EVT_IF_EQ(AF_NOK04_FleeMsgDone, FALSE) - EVT_GOTO(31) - EVT_END_IF - EVT_ADD(LVarA, 70) - EVT_ADD(LVarC, -30) - EVT_CALL(PlaySoundAtNpc, NPC_BossFuzzy, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_BossFuzzy, LVarA, LVarB, LVarC, 15 * DT) - EVT_ADD(LVarA, 70) - EVT_ADD(LVarC, -30) - EVT_CALL(PlaySoundAtNpc, NPC_BossFuzzy, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_BossFuzzy, LVarA, LVarB, LVarC, 20 * DT) - EVT_CALL(EnableNpcShadow, NPC_BossFuzzy, FALSE) - EVT_CALL(SetNpcPos, NPC_BossFuzzy, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -260, 0, 284) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -260, 0, 284) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_BossFuzzy, ANIM_Fuzzy_Walk) + Call(SetNpcPos, NPC_BossFuzzy, 63, 0, 212) + Call(EnableNpcShadow, NPC_BossFuzzy, TRUE) + Call(SetNpcJumpscale, NPC_BossFuzzy, Float(2.0)) + Call(PlaySoundAtNpc, NPC_BossFuzzy, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_BossFuzzy, -100, 0, 225, 20) + Set(AF_NOK04_TauntMsgDone, FALSE) + Set(AF_NOK04_FleeMsgDone, FALSE) + Set(AF_NOK04_BattleDone, FALSE) + Thread + Call(ShowMessageAtScreenPos, MSG_CH1_00D0, 160, 40) + Set(AF_NOK04_TauntMsgDone, TRUE) + EndThread + Call(GetNpcPos, NPC_BossFuzzy, LVarA, LVarB, LVarC) + Label(30) + Call(SetNpcJumpscale, NPC_BossFuzzy, Float(2.0)) + Call(PlaySoundAtNpc, NPC_BossFuzzy, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_BossFuzzy, LVarA, LVarB, LVarC, 12 * DT) + IfEq(AF_NOK04_TauntMsgDone, FALSE) + Goto(30) + EndIf + Thread + Wait(27 * DT) + Call(BindNpcDefeat, NPC_BossFuzzy, Ref(N(EVS_NpcDefeat_FuzzyBoss))) + Call(BindNpcAI, NPC_BossFuzzy, Ref(N(EVS_NpcAI_StartBossBattle))) + EndThread + Thread + Call(PlaySoundAtNpc, NPC_BossFuzzy, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_BossFuzzy, -212, 0, 237, 15 * DT) + Call(GetPlayerPos, LVarA, LVarB, LVarC) + Add(LVarB, 37) + Call(PlaySoundAtNpc, NPC_BossFuzzy, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_BossFuzzy, LVarA, LVarB, LVarC, 20 * DT) + Wait(2) + Call(SetPlayerAnimation, ANIM_MarioW2_PanicHoverStill) + Call(PlaySoundAtNpc, NPC_BossFuzzy, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_BossFuzzy, LVarA, LVarB, LVarC, 15 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Label(21) + IfEq(AF_NOK04_BattleDone, FALSE) + Wait(1) + Goto(21) + EndIf + Call(SetNpcPos, NPC_BossFuzzy, -255, 0, 287) + Call(GetNpcPos, NPC_BossFuzzy, LVarA, LVarB, LVarC) + Label(31) + Call(SetNpcJumpscale, NPC_BossFuzzy, Float(2.0)) + Call(PlaySoundAtNpc, NPC_BossFuzzy, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_BossFuzzy, LVarA, LVarB, LVarC, 15 * DT) + IfEq(AF_NOK04_FleeMsgDone, FALSE) + Goto(31) + EndIf + Add(LVarA, 70) + Add(LVarC, -30) + Call(PlaySoundAtNpc, NPC_BossFuzzy, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_BossFuzzy, LVarA, LVarB, LVarC, 15 * DT) + Add(LVarA, 70) + Add(LVarC, -30) + Call(PlaySoundAtNpc, NPC_BossFuzzy, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_BossFuzzy, LVarA, LVarB, LVarC, 20 * DT) + Call(EnableNpcShadow, NPC_BossFuzzy, FALSE) + Call(SetNpcPos, NPC_BossFuzzy, NPC_DISPOSE_LOCATION) + EndThread + Call(UseSettingsFrom, CAM_DEFAULT, -260, 0, 284) + Call(SetPanTarget, CAM_DEFAULT, -260, 0, 284) + Call(PanToTarget, CAM_DEFAULT, 0, 1) #if VERSION_PAL - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2 / DT)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2 / DT)) #else - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 2) + Call(SetCamSpeed, CAM_DEFAULT, 2) #endif - EVT_THREAD - EVT_WAIT(5 * DT) - EVT_CALL(SetNpcPos, NPC_Fuzzy_01, 63, 0, 212) - EVT_CALL(EnableNpcShadow, NPC_Fuzzy_01, TRUE) - EVT_CALL(SetNpcJumpscale, NPC_Fuzzy_01, EVT_FLOAT(2.0)) - EVT_CALL(PlaySoundAtNpc, NPC_Fuzzy_01, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Fuzzy_01, -100, 0, 225, 10 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Fuzzy_01, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Fuzzy_01, -197, 0, 227, 20 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Fuzzy_01, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Fuzzy_01, -233, 0, 285, 10 * DT) - EVT_LABEL(22) - EVT_IF_EQ(AF_NOK04_BattleDone, FALSE) - EVT_WAIT(1) - EVT_GOTO(22) - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_Fuzzy_01, -210, 0, 244) - EVT_CALL(GetNpcPos, NPC_Fuzzy_01, LVarA, LVarB, LVarC) - EVT_LABEL(32) - EVT_CALL(SetNpcJumpscale, NPC_Fuzzy_01, EVT_FLOAT(2.0)) - EVT_CALL(PlaySoundAtNpc, NPC_Fuzzy_01, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Fuzzy_01, LVarA, LVarB, LVarC, 12 * DT) - EVT_IF_EQ(AF_NOK04_FleeMsgDone, FALSE) - EVT_GOTO(32) - EVT_END_IF - EVT_ADD(LVarA, 70) - EVT_ADD(LVarC, -30) - EVT_CALL(PlaySoundAtNpc, NPC_Fuzzy_01, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Fuzzy_01, LVarA, LVarB, LVarC, 10 * DT) - EVT_ADD(LVarA, 70) - EVT_ADD(LVarC, -30) - EVT_CALL(PlaySoundAtNpc, NPC_Fuzzy_01, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Fuzzy_01, LVarA, LVarB, LVarC, 20 * DT) - EVT_CALL(EnableNpcShadow, NPC_Fuzzy_01, FALSE) - EVT_CALL(SetNpcPos, NPC_Fuzzy_01, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(7 * DT) - EVT_CALL(SetNpcPos, NPC_Fuzzy_02, 63, 0, 212) - EVT_CALL(EnableNpcShadow, NPC_Fuzzy_02, TRUE) - EVT_CALL(SetNpcJumpscale, NPC_Fuzzy_02, EVT_FLOAT(2.0)) - EVT_CALL(PlaySoundAtNpc, NPC_Fuzzy_02, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Fuzzy_02, -122, 0, 219, 20 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Fuzzy_02, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Fuzzy_02, -177, 0, 242, 10 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Fuzzy_02, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Fuzzy_02, -213, 0, 300, 15 * DT) - EVT_LABEL(23) - EVT_IF_EQ(AF_NOK04_BattleDone, FALSE) - EVT_WAIT(1) - EVT_GOTO(23) - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_Fuzzy_02, -210, 0, 266) - EVT_CALL(GetNpcPos, NPC_Fuzzy_02, LVarA, LVarB, LVarC) - EVT_WAIT(2) - EVT_LABEL(33) - EVT_CALL(SetNpcJumpscale, NPC_Fuzzy_02, EVT_FLOAT(2.0)) - EVT_CALL(PlaySoundAtNpc, NPC_Fuzzy_02, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Fuzzy_02, LVarA, LVarB, LVarC, 12 * DT) - EVT_IF_EQ(AF_NOK04_FleeMsgDone, FALSE) - EVT_GOTO(33) - EVT_END_IF - EVT_ADD(LVarA, 70) - EVT_ADD(LVarC, -30) - EVT_CALL(PlaySoundAtNpc, NPC_Fuzzy_02, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Fuzzy_02, LVarA, LVarB, LVarC, 20 * DT) - EVT_ADD(LVarA, 70) - EVT_ADD(LVarC, -30) - EVT_CALL(PlaySoundAtNpc, NPC_Fuzzy_02, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Fuzzy_02, LVarA, LVarB, LVarC, 15 * DT) - EVT_CALL(EnableNpcShadow, NPC_Fuzzy_02, FALSE) - EVT_CALL(SetNpcPos, NPC_Fuzzy_02, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(8 * DT) - EVT_CALL(SetNpcPos, NPC_Fuzzy_03, 63, 0, 212) - EVT_CALL(EnableNpcShadow, NPC_Fuzzy_03, TRUE) - EVT_CALL(SetNpcJumpscale, NPC_Fuzzy_03, EVT_FLOAT(2.0)) - EVT_CALL(PlaySoundAtNpc, NPC_Fuzzy_03, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Fuzzy_03, -100, 0, 269, 20 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Fuzzy_03, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Fuzzy_03, -217, 0, 212, 10 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Fuzzy_03, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Fuzzy_03, -253, 0, 270, 10 * DT) - EVT_LABEL(24) - EVT_IF_EQ(AF_NOK04_BattleDone, FALSE) - EVT_WAIT(1) - EVT_GOTO(24) - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_Fuzzy_03, -183, 0, 257) - EVT_CALL(GetNpcPos, NPC_Fuzzy_03, LVarA, LVarB, LVarC) - EVT_WAIT(5 * DT) - EVT_LABEL(34) - EVT_CALL(SetNpcJumpscale, NPC_Fuzzy_03, EVT_FLOAT(2.0)) - EVT_CALL(PlaySoundAtNpc, NPC_Fuzzy_03, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Fuzzy_03, LVarA, LVarB, LVarC, 12 * DT) - EVT_IF_EQ(AF_NOK04_FleeMsgDone, FALSE) - EVT_GOTO(34) - EVT_END_IF - EVT_ADD(LVarA, 70) - EVT_ADD(LVarC, -30) - EVT_CALL(PlaySoundAtNpc, NPC_Fuzzy_03, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Fuzzy_03, LVarA, LVarB, LVarC, 15 * DT) - EVT_ADD(LVarA, 70) - EVT_ADD(LVarC, -30) - EVT_CALL(PlaySoundAtNpc, NPC_Fuzzy_03, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Fuzzy_03, LVarA, LVarB, LVarC, 20 * DT) - EVT_CALL(EnableNpcShadow, NPC_Fuzzy_03, FALSE) - EVT_CALL(SetNpcPos, NPC_Fuzzy_03, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_LABEL(40) - EVT_IF_EQ(AF_NOK04_BattleDone, FALSE) - EVT_WAIT(1) - EVT_GOTO(40) - EVT_END_IF - EVT_CALL(SetPlayerPos, -305, 0, 329) - EVT_CALL(InterpPlayerYaw, 50, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, -335, 0, 355) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 50, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH1_00D1, 160, 40) - EVT_SET(AF_NOK04_FleeMsgDone, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -260, 0, 284) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -260, 0, 284) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(15 * DT) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_SET(AF_NOK04_CamPanDone, TRUE) - EVT_WAIT(30 * DT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Thread + Wait(5 * DT) + Call(SetNpcPos, NPC_Fuzzy_01, 63, 0, 212) + Call(EnableNpcShadow, NPC_Fuzzy_01, TRUE) + Call(SetNpcJumpscale, NPC_Fuzzy_01, Float(2.0)) + Call(PlaySoundAtNpc, NPC_Fuzzy_01, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Fuzzy_01, -100, 0, 225, 10 * DT) + Call(PlaySoundAtNpc, NPC_Fuzzy_01, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Fuzzy_01, -197, 0, 227, 20 * DT) + Call(PlaySoundAtNpc, NPC_Fuzzy_01, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Fuzzy_01, -233, 0, 285, 10 * DT) + Label(22) + IfEq(AF_NOK04_BattleDone, FALSE) + Wait(1) + Goto(22) + EndIf + Call(SetNpcPos, NPC_Fuzzy_01, -210, 0, 244) + Call(GetNpcPos, NPC_Fuzzy_01, LVarA, LVarB, LVarC) + Label(32) + Call(SetNpcJumpscale, NPC_Fuzzy_01, Float(2.0)) + Call(PlaySoundAtNpc, NPC_Fuzzy_01, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Fuzzy_01, LVarA, LVarB, LVarC, 12 * DT) + IfEq(AF_NOK04_FleeMsgDone, FALSE) + Goto(32) + EndIf + Add(LVarA, 70) + Add(LVarC, -30) + Call(PlaySoundAtNpc, NPC_Fuzzy_01, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Fuzzy_01, LVarA, LVarB, LVarC, 10 * DT) + Add(LVarA, 70) + Add(LVarC, -30) + Call(PlaySoundAtNpc, NPC_Fuzzy_01, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Fuzzy_01, LVarA, LVarB, LVarC, 20 * DT) + Call(EnableNpcShadow, NPC_Fuzzy_01, FALSE) + Call(SetNpcPos, NPC_Fuzzy_01, NPC_DISPOSE_LOCATION) + EndThread + Thread + Wait(7 * DT) + Call(SetNpcPos, NPC_Fuzzy_02, 63, 0, 212) + Call(EnableNpcShadow, NPC_Fuzzy_02, TRUE) + Call(SetNpcJumpscale, NPC_Fuzzy_02, Float(2.0)) + Call(PlaySoundAtNpc, NPC_Fuzzy_02, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Fuzzy_02, -122, 0, 219, 20 * DT) + Call(PlaySoundAtNpc, NPC_Fuzzy_02, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Fuzzy_02, -177, 0, 242, 10 * DT) + Call(PlaySoundAtNpc, NPC_Fuzzy_02, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Fuzzy_02, -213, 0, 300, 15 * DT) + Label(23) + IfEq(AF_NOK04_BattleDone, FALSE) + Wait(1) + Goto(23) + EndIf + Call(SetNpcPos, NPC_Fuzzy_02, -210, 0, 266) + Call(GetNpcPos, NPC_Fuzzy_02, LVarA, LVarB, LVarC) + Wait(2) + Label(33) + Call(SetNpcJumpscale, NPC_Fuzzy_02, Float(2.0)) + Call(PlaySoundAtNpc, NPC_Fuzzy_02, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Fuzzy_02, LVarA, LVarB, LVarC, 12 * DT) + IfEq(AF_NOK04_FleeMsgDone, FALSE) + Goto(33) + EndIf + Add(LVarA, 70) + Add(LVarC, -30) + Call(PlaySoundAtNpc, NPC_Fuzzy_02, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Fuzzy_02, LVarA, LVarB, LVarC, 20 * DT) + Add(LVarA, 70) + Add(LVarC, -30) + Call(PlaySoundAtNpc, NPC_Fuzzy_02, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Fuzzy_02, LVarA, LVarB, LVarC, 15 * DT) + Call(EnableNpcShadow, NPC_Fuzzy_02, FALSE) + Call(SetNpcPos, NPC_Fuzzy_02, NPC_DISPOSE_LOCATION) + EndThread + Thread + Wait(8 * DT) + Call(SetNpcPos, NPC_Fuzzy_03, 63, 0, 212) + Call(EnableNpcShadow, NPC_Fuzzy_03, TRUE) + Call(SetNpcJumpscale, NPC_Fuzzy_03, Float(2.0)) + Call(PlaySoundAtNpc, NPC_Fuzzy_03, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Fuzzy_03, -100, 0, 269, 20 * DT) + Call(PlaySoundAtNpc, NPC_Fuzzy_03, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Fuzzy_03, -217, 0, 212, 10 * DT) + Call(PlaySoundAtNpc, NPC_Fuzzy_03, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Fuzzy_03, -253, 0, 270, 10 * DT) + Label(24) + IfEq(AF_NOK04_BattleDone, FALSE) + Wait(1) + Goto(24) + EndIf + Call(SetNpcPos, NPC_Fuzzy_03, -183, 0, 257) + Call(GetNpcPos, NPC_Fuzzy_03, LVarA, LVarB, LVarC) + Wait(5 * DT) + Label(34) + Call(SetNpcJumpscale, NPC_Fuzzy_03, Float(2.0)) + Call(PlaySoundAtNpc, NPC_Fuzzy_03, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Fuzzy_03, LVarA, LVarB, LVarC, 12 * DT) + IfEq(AF_NOK04_FleeMsgDone, FALSE) + Goto(34) + EndIf + Add(LVarA, 70) + Add(LVarC, -30) + Call(PlaySoundAtNpc, NPC_Fuzzy_03, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Fuzzy_03, LVarA, LVarB, LVarC, 15 * DT) + Add(LVarA, 70) + Add(LVarC, -30) + Call(PlaySoundAtNpc, NPC_Fuzzy_03, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Fuzzy_03, LVarA, LVarB, LVarC, 20 * DT) + Call(EnableNpcShadow, NPC_Fuzzy_03, FALSE) + Call(SetNpcPos, NPC_Fuzzy_03, NPC_DISPOSE_LOCATION) + EndThread + Label(40) + IfEq(AF_NOK04_BattleDone, FALSE) + Wait(1) + Goto(40) + EndIf + Call(SetPlayerPos, -305, 0, 329) + Call(InterpPlayerYaw, 50, 0) + Call(SetNpcPos, NPC_PARTNER, -335, 0, 355) + Call(InterpNpcYaw, NPC_PARTNER, 50, 0) + Call(ShowMessageAtScreenPos, MSG_CH1_00D1, 160, 40) + Set(AF_NOK04_FleeMsgDone, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, -260, 0, 284) + Call(SetPanTarget, CAM_DEFAULT, -260, 0, 284) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(15 * DT) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Set(AF_NOK04_CamPanDone, TRUE) + Wait(30 * DT) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_HitTree_Correct) = { - EVT_THREAD - EVT_CALL(N(GetTreeHidingSpotPos), LVar0, LVar0, LVar1, LVar2) - EVT_CALL(GetPlayerPos, LVarA, LVarB, LVarC) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVarA, LVarB, LVarC) - EVT_ADD(LVarA, LVar0) - EVT_ADD(LVarC, LVar2) - EVT_DIV(LVarA, 2) - EVT_DIV(LVarC, 2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVarA, LVarB, LVarC) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 15, -11) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 3) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_CALL(N(GetTreeHidingSpotPos), LVar0, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPointer, NPC_BossFuzzy, LVarE) - EVT_CALL(GetNpcPointer, NPC_KoopersShell, LVarF) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_SWITCH(MV_CorrectCount) - EVT_CASE_EQ(0) - EVT_SET(LVar4, LVarC) - EVT_SUB(LVar4, 4) - EVT_CALL(N(SetThreadAnchorPos), LVarA, LVarB, LVar4) - EVT_CALL(SetModelFlags, MODEL_o177, MODEL_FLAG_USES_CUSTOM_GFX, TRUE) - EVT_SET(LVar3, LVarB) - EVT_DIV(LVar3, 2) - EVT_SET(LVarD, LVarB) - EVT_SUB(LVarD, LVar3) - EVT_EXEC(N(EVS_MoveShellDown)) - EVT_WAIT(1) - EVT_WAIT(30) - EVT_CALL(N(AttachThreadFrontNpc), NULL) - EVT_CALL(N(AttachThreadBackNpc), NULL) - EVT_CALL(N(SetThreadTargetLengthAngle), 0, 0, -1) - EVT_CALL(N(SetThreadTargetLengthAngle), LVar3, 0, -1) - EVT_WAIT(1) - EVT_CALL(N(AttachThreadFrontNpc), LVarF) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_BossFuzzy, ANIM_Fuzzy_Hurt) - EVT_CALL(PlayerFaceNpc, NPC_BossFuzzy, FALSE) - EVT_CALL(SetNpcJumpscale, NPC_BossFuzzy, 0) - EVT_CALL(PlaySoundAtNpc, NPC_BossFuzzy, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_BossFuzzy, LVarA, LVarD, LVarC, 30) - EVT_CALL(SetNpcAnimation, NPC_BossFuzzy, ANIM_Fuzzy_Anim09) - EVT_SET(LVar9, LVarC) - EVT_CALL(SpeakToPlayer, NPC_BossFuzzy, ANIM_Fuzzy_Anim0C, ANIM_Fuzzy_Idle, 5, MSG_CH1_00BF) - EVT_CALL(N(SetThreadTargetLengthAngle), 0, 0, 30) - EVT_CALL(SetNpcAnimation, NPC_BossFuzzy, ANIM_Fuzzy_Anim0B) - EVT_SET(LVarC, LVar9) - EVT_CALL(PlaySoundAtNpc, NPC_BossFuzzy, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_BossFuzzy, LVarA, LVarB, LVarC, 30) - EVT_CALL(N(AttachThreadFrontNpc), NULL) - EVT_CALL(SetModelFlags, MODEL_o177, MODEL_FLAG_USES_CUSTOM_GFX, FALSE) - EVT_ADD(MV_CorrectCount, 1) - EVT_EXEC(N(EVS_Scene_ShuffleFuzzyPositions)) - EVT_RETURN - EVT_CASE_EQ(1) - EVT_SET(LVar4, LVarC) - EVT_SUB(LVar4, 4) - EVT_CALL(N(SetThreadAnchorPos), LVarA, LVarB, LVar4) - EVT_CALL(SetModelFlags, MODEL_o177, MODEL_FLAG_USES_CUSTOM_GFX, TRUE) - EVT_SET(LVar3, LVarB) - EVT_MUL(LVar3, 2) - EVT_DIV(LVar3, 3) - EVT_SET(LVarD, LVarB) - EVT_SUB(LVarD, LVar3) - EVT_EXEC(N(EVS_MoveShellUp)) - EVT_WAIT(1) - EVT_WAIT(30) - EVT_CALL(N(AttachThreadFrontNpc), NULL) - EVT_CALL(N(AttachThreadBackNpc), NULL) - EVT_CALL(N(SetThreadTargetLengthAngle), 0, 0, -1) - EVT_CALL(N(SetThreadTargetLengthAngle), LVar3, 0, -1) - EVT_WAIT(1) - EVT_CALL(N(AttachThreadFrontNpc), LVarF) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_BossFuzzy, ANIM_Fuzzy_Hurt) - EVT_CALL(PlayerFaceNpc, NPC_BossFuzzy, FALSE) - EVT_CALL(SetNpcJumpscale, NPC_BossFuzzy, 0) - EVT_CALL(PlaySoundAtNpc, NPC_BossFuzzy, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_BossFuzzy, LVarA, LVarD, LVarC, 30) - EVT_CALL(SetNpcAnimation, NPC_BossFuzzy, ANIM_Fuzzy_Anim09) - EVT_SET(LVar9, LVarC) - EVT_CALL(SpeakToPlayer, NPC_BossFuzzy, ANIM_Fuzzy_Anim0C, ANIM_Fuzzy_Idle, 5, MSG_CH1_00C0) - EVT_CALL(N(SetThreadTargetLengthAngle), 0, 0, 30) - EVT_CALL(SetNpcAnimation, NPC_BossFuzzy, ANIM_Fuzzy_Anim0B) - EVT_SET(LVarC, LVar9) - EVT_CALL(PlaySoundAtNpc, NPC_BossFuzzy, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_BossFuzzy, LVarA, LVarB, LVarC, 30) - EVT_CALL(N(AttachThreadFrontNpc), NULL) - EVT_CALL(SetModelFlags, MODEL_o177, MODEL_FLAG_USES_CUSTOM_GFX, FALSE) - EVT_ADD(MV_CorrectCount, 1) - EVT_EXEC(N(EVS_Scene_ShuffleFuzzyPositions)) - EVT_RETURN - EVT_CASE_EQ(2) - EVT_CALL(SetNpcAnimation, NPC_BossFuzzy, ANIM_Fuzzy_Hurt) - EVT_CALL(PlayerFaceNpc, NPC_BossFuzzy, FALSE) - EVT_CALL(N(SetThreadAnchorPos), LVarA, LVarB, LVarC) - EVT_CALL(N(SetThreadTargetLengthAngle), 0, 0, -1) - EVT_SET(LVar0, LVarB) - EVT_SUB(LVar0, 50) - EVT_CALL(N(SetThreadTargetLengthAngle), LVar0, 0, 0) - EVT_CALL(N(AttachThreadFrontNpc), LVarF) - EVT_CALL(N(AttachThreadBackNpc), LVarE) - EVT_CALL(SetModelFlags, MODEL_o177, MODEL_FLAG_USES_CUSTOM_GFX, TRUE) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_BossFuzzy, ANIM_Fuzzy_Anim09) - EVT_CALL(SpeakToPlayer, NPC_BossFuzzy, ANIM_Fuzzy_Anim0C, ANIM_Fuzzy_Idle, 5, MSG_CH1_00C1) - EVT_WAIT(10 * DT) - EVT_CALL(N(AttachThreadFrontNpc), NULL) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 40) - EVT_CALL(SetNpcJumpscale, NPC_KoopersShell, EVT_FLOAT(0.6)) - EVT_CALL(NpcJump0, NPC_KoopersShell, LVar0, LVar1, LVar2, 10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_GetItem) - EVT_THREAD - EVT_WAIT(4 * DT) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_ADD(LVar4, 50) - EVT_ADD(LVar5, 2) - EVT_ADD(LVar3, 8) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 3, LVar3, LVar4, LVar5, 20) - EVT_ADD(LVar3, -16) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 3, LVar3, LVar4, LVar5, 20) - EVT_END_THREAD - EVT_CALL(PlaySound, SOUND_JINGLE_GOT_KEY) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_GotKooperShell, 160, 40) - EVT_CALL(SetNpcPos, NPC_KoopersShell, NPC_DISPOSE_LOCATION) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(AddKeyItem, ITEM_KOOPER_SHELL) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_BossFuzzy, ANIM_Fuzzy_Anim0C, ANIM_Fuzzy_Idle, 5, MSG_CH1_00C2) - EVT_CALL(SetNpcAnimation, NPC_BossFuzzy, ANIM_Fuzzy_Anim0B) - EVT_CALL(N(SetThreadTargetLengthAngle), 0, 0, 20 * DT) - EVT_WAIT(20 * DT) - EVT_CALL(SetModelFlags, MODEL_o177, MODEL_FLAG_USES_CUSTOM_GFX, FALSE) - EVT_CALL(N(AttachThreadBackNpc), 0) - EVT_CALL(SetNpcPos, NPC_BossFuzzy, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_KoopersShell, NPC_DISPOSE_LOCATION) - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_VILLAGE, 0, 8) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_SET(AF_NOK04_PlayingGame, FALSE) - EVT_EXEC(N(EVS_Scene_KooperArrives)) - EVT_END_SWITCH - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) + Thread + Call(N(GetTreeHidingSpotPos), LVar0, LVar0, LVar1, LVar2) + Call(GetPlayerPos, LVarA, LVarB, LVarC) + Call(UseSettingsFrom, CAM_DEFAULT, LVarA, LVarB, LVarC) + Add(LVarA, LVar0) + Add(LVarC, LVar2) + Div(LVarA, 2) + Div(LVarC, 2) + Call(SetPanTarget, CAM_DEFAULT, LVarA, LVarB, LVarC) + Call(SetCamPitch, CAM_DEFAULT, 15, -11) + Call(SetCamSpeed, CAM_DEFAULT, 3) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Call(N(GetTreeHidingSpotPos), LVar0, LVar0, LVar1, LVar2) + Call(GetNpcPointer, NPC_BossFuzzy, LVarE) + Call(GetNpcPointer, NPC_KoopersShell, LVarF) + Set(LVarA, LVar0) + Set(LVarB, LVar1) + Set(LVarC, LVar2) + Switch(MV_CorrectCount) + CaseEq(0) + Set(LVar4, LVarC) + Sub(LVar4, 4) + Call(N(SetThreadAnchorPos), LVarA, LVarB, LVar4) + Call(SetModelFlags, MODEL_o177, MODEL_FLAG_USES_CUSTOM_GFX, TRUE) + Set(LVar3, LVarB) + Div(LVar3, 2) + Set(LVarD, LVarB) + Sub(LVarD, LVar3) + Exec(N(EVS_MoveShellDown)) + Wait(1) + Wait(30) + Call(N(AttachThreadFrontNpc), NULL) + Call(N(AttachThreadBackNpc), NULL) + Call(N(SetThreadTargetLengthAngle), 0, 0, -1) + Call(N(SetThreadTargetLengthAngle), LVar3, 0, -1) + Wait(1) + Call(N(AttachThreadFrontNpc), LVarF) + Wait(20) + Call(SetNpcAnimation, NPC_BossFuzzy, ANIM_Fuzzy_Hurt) + Call(PlayerFaceNpc, NPC_BossFuzzy, FALSE) + Call(SetNpcJumpscale, NPC_BossFuzzy, 0) + Call(PlaySoundAtNpc, NPC_BossFuzzy, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_BossFuzzy, LVarA, LVarD, LVarC, 30) + Call(SetNpcAnimation, NPC_BossFuzzy, ANIM_Fuzzy_Anim09) + Set(LVar9, LVarC) + Call(SpeakToPlayer, NPC_BossFuzzy, ANIM_Fuzzy_Anim0C, ANIM_Fuzzy_Idle, 5, MSG_CH1_00BF) + Call(N(SetThreadTargetLengthAngle), 0, 0, 30) + Call(SetNpcAnimation, NPC_BossFuzzy, ANIM_Fuzzy_Anim0B) + Set(LVarC, LVar9) + Call(PlaySoundAtNpc, NPC_BossFuzzy, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_BossFuzzy, LVarA, LVarB, LVarC, 30) + Call(N(AttachThreadFrontNpc), NULL) + Call(SetModelFlags, MODEL_o177, MODEL_FLAG_USES_CUSTOM_GFX, FALSE) + Add(MV_CorrectCount, 1) + Exec(N(EVS_Scene_ShuffleFuzzyPositions)) + Return + CaseEq(1) + Set(LVar4, LVarC) + Sub(LVar4, 4) + Call(N(SetThreadAnchorPos), LVarA, LVarB, LVar4) + Call(SetModelFlags, MODEL_o177, MODEL_FLAG_USES_CUSTOM_GFX, TRUE) + Set(LVar3, LVarB) + Mul(LVar3, 2) + Div(LVar3, 3) + Set(LVarD, LVarB) + Sub(LVarD, LVar3) + Exec(N(EVS_MoveShellUp)) + Wait(1) + Wait(30) + Call(N(AttachThreadFrontNpc), NULL) + Call(N(AttachThreadBackNpc), NULL) + Call(N(SetThreadTargetLengthAngle), 0, 0, -1) + Call(N(SetThreadTargetLengthAngle), LVar3, 0, -1) + Wait(1) + Call(N(AttachThreadFrontNpc), LVarF) + Wait(20) + Call(SetNpcAnimation, NPC_BossFuzzy, ANIM_Fuzzy_Hurt) + Call(PlayerFaceNpc, NPC_BossFuzzy, FALSE) + Call(SetNpcJumpscale, NPC_BossFuzzy, 0) + Call(PlaySoundAtNpc, NPC_BossFuzzy, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_BossFuzzy, LVarA, LVarD, LVarC, 30) + Call(SetNpcAnimation, NPC_BossFuzzy, ANIM_Fuzzy_Anim09) + Set(LVar9, LVarC) + Call(SpeakToPlayer, NPC_BossFuzzy, ANIM_Fuzzy_Anim0C, ANIM_Fuzzy_Idle, 5, MSG_CH1_00C0) + Call(N(SetThreadTargetLengthAngle), 0, 0, 30) + Call(SetNpcAnimation, NPC_BossFuzzy, ANIM_Fuzzy_Anim0B) + Set(LVarC, LVar9) + Call(PlaySoundAtNpc, NPC_BossFuzzy, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_BossFuzzy, LVarA, LVarB, LVarC, 30) + Call(N(AttachThreadFrontNpc), NULL) + Call(SetModelFlags, MODEL_o177, MODEL_FLAG_USES_CUSTOM_GFX, FALSE) + Add(MV_CorrectCount, 1) + Exec(N(EVS_Scene_ShuffleFuzzyPositions)) + Return + CaseEq(2) + Call(SetNpcAnimation, NPC_BossFuzzy, ANIM_Fuzzy_Hurt) + Call(PlayerFaceNpc, NPC_BossFuzzy, FALSE) + Call(N(SetThreadAnchorPos), LVarA, LVarB, LVarC) + Call(N(SetThreadTargetLengthAngle), 0, 0, -1) + Set(LVar0, LVarB) + Sub(LVar0, 50) + Call(N(SetThreadTargetLengthAngle), LVar0, 0, 0) + Call(N(AttachThreadFrontNpc), LVarF) + Call(N(AttachThreadBackNpc), LVarE) + Call(SetModelFlags, MODEL_o177, MODEL_FLAG_USES_CUSTOM_GFX, TRUE) + Wait(20) + Call(SetNpcAnimation, NPC_BossFuzzy, ANIM_Fuzzy_Anim09) + Call(SpeakToPlayer, NPC_BossFuzzy, ANIM_Fuzzy_Anim0C, ANIM_Fuzzy_Idle, 5, MSG_CH1_00C1) + Wait(10 * DT) + Call(N(AttachThreadFrontNpc), NULL) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 40) + Call(SetNpcJumpscale, NPC_KoopersShell, Float(0.6)) + Call(NpcJump0, NPC_KoopersShell, LVar0, LVar1, LVar2, 10 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_GetItem) + Thread + Wait(4 * DT) + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Add(LVar4, 50) + Add(LVar5, 2) + Add(LVar3, 8) + PlayEffect(EFFECT_SPARKLES, 3, LVar3, LVar4, LVar5, 20) + Add(LVar3, -16) + PlayEffect(EFFECT_SPARKLES, 3, LVar3, LVar4, LVar5, 20) + EndThread + Call(PlaySound, SOUND_JINGLE_GOT_KEY) + Call(ShowMessageAtScreenPos, MSG_Menus_GotKooperShell, 160, 40) + Call(SetNpcPos, NPC_KoopersShell, NPC_DISPOSE_LOCATION) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(AddKeyItem, ITEM_KOOPER_SHELL) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_BossFuzzy, ANIM_Fuzzy_Anim0C, ANIM_Fuzzy_Idle, 5, MSG_CH1_00C2) + Call(SetNpcAnimation, NPC_BossFuzzy, ANIM_Fuzzy_Anim0B) + Call(N(SetThreadTargetLengthAngle), 0, 0, 20 * DT) + Wait(20 * DT) + Call(SetModelFlags, MODEL_o177, MODEL_FLAG_USES_CUSTOM_GFX, FALSE) + Call(N(AttachThreadBackNpc), 0) + Call(SetNpcPos, NPC_BossFuzzy, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_KoopersShell, NPC_DISPOSE_LOCATION) + Call(SetMusicTrack, 0, SONG_KOOPA_VILLAGE, 0, 8) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Set(AF_NOK04_PlayingGame, FALSE) + Exec(N(EVS_Scene_KooperArrives)) + EndSwitch + Call(PanToTarget, CAM_DEFAULT, 0, 0) #if VERSION_PAL - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3 / DT)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3 / DT)) #else - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 3) + Call(SetCamSpeed, CAM_DEFAULT, 3) #endif - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HitTree_Wrong) = { - EVT_THREAD - EVT_CALL(N(GetTreeHidingSpotPos), LVar0, LVar0, LVar1, LVar2) - EVT_CALL(GetPlayerPos, LVarA, LVarB, LVarC) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVarA, LVarB, LVarC) - EVT_ADD(LVarA, LVar0) - EVT_ADD(LVarC, LVar2) - EVT_DIV(LVarA, 2) - EVT_DIV(LVarC, 2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVarA, LVarB, LVarC) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 15, -11) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 3) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_WAIT(15) - EVT_SET(MV_LastWrongTreeIndex, LVar0) - EVT_CALL(N(GetTreeHidingSpotPos), MV_LastWrongTreeIndex, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPointer, NPC_KoopersShell, LVarF) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_CALL(RandInt, 999, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_LT(200) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(MakeItemEntity, ITEM_HEART, LVar0, 200, LVar2, ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS, 0) - EVT_WAIT(30) - EVT_CASE_LT(400) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(MakeItemEntity, ITEM_COIN, LVar0, 200, LVar2, ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS, 0) - EVT_WAIT(30) - EVT_CASE_LT(1000) - EVT_CALL(SetNpcAnimation, NPC_AmbushFuzzy, ANIM_Fuzzy_Anim06) - EVT_CALL(SetNpcJumpscale, NPC_AmbushFuzzy, 1) - EVT_CALL(SetNpcPos, NPC_AmbushFuzzy, LVarA, LVarB, LVarC) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 10) - EVT_ADD(LVar1, 10) - EVT_CALL(PlaySoundAtNpc, NPC_AmbushFuzzy, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_AmbushFuzzy, LVar0, LVar1, LVar2, 20) - EVT_SET(MV_WrongAnswerBattle, 1) - EVT_END_SWITCH - EVT_LABEL(0) - EVT_IF_EQ(MV_WrongAnswerBattle, 1) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(20) - EVT_EXEC(N(EVS_Scene_ShuffleFuzzyPositions)) - EVT_RETURN - EVT_END + Thread + Call(N(GetTreeHidingSpotPos), LVar0, LVar0, LVar1, LVar2) + Call(GetPlayerPos, LVarA, LVarB, LVarC) + Call(UseSettingsFrom, CAM_DEFAULT, LVarA, LVarB, LVarC) + Add(LVarA, LVar0) + Add(LVarC, LVar2) + Div(LVarA, 2) + Div(LVarC, 2) + Call(SetPanTarget, CAM_DEFAULT, LVarA, LVarB, LVarC) + Call(SetCamPitch, CAM_DEFAULT, 15, -11) + Call(SetCamSpeed, CAM_DEFAULT, 3) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Wait(15) + Set(MV_LastWrongTreeIndex, LVar0) + Call(N(GetTreeHidingSpotPos), MV_LastWrongTreeIndex, LVar0, LVar1, LVar2) + Call(GetNpcPointer, NPC_KoopersShell, LVarF) + Set(LVarA, LVar0) + Set(LVarB, LVar1) + Set(LVarC, LVar2) + Call(RandInt, 999, LVar0) + Switch(LVar0) + CaseLt(200) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(MakeItemEntity, ITEM_HEART, LVar0, 200, LVar2, ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS, 0) + Wait(30) + CaseLt(400) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(MakeItemEntity, ITEM_COIN, LVar0, 200, LVar2, ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS, 0) + Wait(30) + CaseLt(1000) + Call(SetNpcAnimation, NPC_AmbushFuzzy, ANIM_Fuzzy_Anim06) + Call(SetNpcJumpscale, NPC_AmbushFuzzy, 1) + Call(SetNpcPos, NPC_AmbushFuzzy, LVarA, LVarB, LVarC) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar2, 10) + Add(LVar1, 10) + Call(PlaySoundAtNpc, NPC_AmbushFuzzy, SOUND_SEQ_FUZZY_HOP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_AmbushFuzzy, LVar0, LVar1, LVar2, 20) + Set(MV_WrongAnswerBattle, 1) + EndSwitch + Label(0) + IfEq(MV_WrongAnswerBattle, 1) + Wait(1) + Goto(0) + EndIf + Wait(20) + Exec(N(EVS_Scene_ShuffleFuzzyPositions)) + Return + End }; EvtScript N(EVS_HitTree) = { - EVT_CALL(N(AnimateTreeBranch), LVar0, 1) - EVT_CALL(PlaySound, SOUND_SHAKE_TREE_LEAVES) - EVT_IF_EQ(AF_NOK04_PlayingGame, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_END_THREAD - EVT_IF_EQ(LVar0, MV_CorrectTreeIndex) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySound, SOUND_APPROVE) - EVT_END_THREAD - EVT_EXEC_WAIT(N(EVS_HitTree_Correct)) - EVT_ELSE - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySound, SOUND_MENU_ERROR) - EVT_END_THREAD - EVT_EXEC_WAIT(N(EVS_HitTree_Wrong)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(N(AnimateTreeBranch), LVar0, 1) + Call(PlaySound, SOUND_SHAKE_TREE_LEAVES) + IfEq(AF_NOK04_PlayingGame, FALSE) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Thread + Wait(20) + Call(DisablePlayerPhysics, TRUE) + EndThread + IfEq(LVar0, MV_CorrectTreeIndex) + Thread + Wait(15) + Call(PlaySound, SOUND_APPROVE) + EndThread + ExecWait(N(EVS_HitTree_Correct)) + Else + Thread + Wait(15) + Call(PlaySound, SOUND_MENU_ERROR) + EndThread + ExecWait(N(EVS_HitTree_Wrong)) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Kooper) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_SetupMinigame) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_Scene_HideInTree))) - EVT_IF_GE(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) - EVT_CALL(SetNpcPos, NPC_BossFuzzy, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_KoopersShell, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END_IF - EVT_SET(MV_CorrectCount, 0) - EVT_SET(MV_CorrectTreeIndex, 2) - EVT_SET(MV_LastCorrectTreeIndex, 2) - EVT_CALL(N(InitThreadData)) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_0, NULL, EVT_PTR(N(build_gfx_thread))) - EVT_CALL(SetNpcPos, NPC_BossFuzzy, -293, 0, 319) - EVT_CALL(SetNpcPos, NPC_KoopersShell, -293, 0, 322) - EVT_CALL(EnableNpcShadow, NPC_AmbushFuzzy, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Fuzzy_01, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Fuzzy_02, FALSE) - EVT_CALL(EnableNpcShadow, NPC_Fuzzy_03, FALSE) - EVT_CALL(SetModelFlags, MODEL_o177, MODEL_FLAG_DO_BOUNDS_CULLING, FALSE) - EVT_IF_GE(GB_StoryProgress, STORY_CH1_FUZZY_THIEF_HID_IN_TREE) - EVT_CALL(N(GetTreeHidingSpotPos), LVar4, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_BossFuzzy, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_KoopersShell, LVar0, LVar1, LVar2) - EVT_CALL(EnableNpcShadow, NPC_BossFuzzy, FALSE) - EVT_CALL(EnableNpcShadow, NPC_KoopersShell, FALSE) - EVT_END_IF - EVT_WAIT(1) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_Scene_HideInTree))) + IfGe(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) + Call(SetNpcPos, NPC_BossFuzzy, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_KoopersShell, NPC_DISPOSE_LOCATION) + Return + EndIf + Set(MV_CorrectCount, 0) + Set(MV_CorrectTreeIndex, 2) + Set(MV_LastCorrectTreeIndex, 2) + Call(N(InitThreadData)) + Call(SetCustomGfxBuilders, CUSTOM_GFX_0, NULL, Ref(N(build_gfx_thread))) + Call(SetNpcPos, NPC_BossFuzzy, -293, 0, 319) + Call(SetNpcPos, NPC_KoopersShell, -293, 0, 322) + Call(EnableNpcShadow, NPC_AmbushFuzzy, FALSE) + Call(EnableNpcShadow, NPC_Fuzzy_01, FALSE) + Call(EnableNpcShadow, NPC_Fuzzy_02, FALSE) + Call(EnableNpcShadow, NPC_Fuzzy_03, FALSE) + Call(SetModelFlags, MODEL_o177, MODEL_FLAG_DO_BOUNDS_CULLING, FALSE) + IfGe(GB_StoryProgress, STORY_CH1_FUZZY_THIEF_HID_IN_TREE) + Call(N(GetTreeHidingSpotPos), LVar4, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_BossFuzzy, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_KoopersShell, LVar0, LVar1, LVar2) + Call(EnableNpcShadow, NPC_BossFuzzy, FALSE) + Call(EnableNpcShadow, NPC_KoopersShell, FALSE) + EndIf + Wait(1) + Return + End }; EvtScript N(EVS_NpcInit_KoopersShell) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldKooper_StillShellAlt) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldKooper_StillShellAlt) + Return + End }; EvtScript N(EVS_NpcInit_WrongFuzzy) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_WaitForWrongAnswer))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_WrongFuzzy))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_WaitForWrongAnswer))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_WrongFuzzy))) + Return + End }; EvtScript N(EVS_NpcInit_Fuzzy_Aux) = { - EVT_CALL(BindNpcIdle, NPC_SELF, 0) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, 0) + Return + End }; EvtScript N(EVS_NpcInit_Kooper) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Kooper))) - EVT_IF_GE(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) - EVT_CALL(InterpNpcYaw, NPC_Kooper, 225, 0) - EVT_CALL(SetNpcPos, NPC_Kooper, -275, 0, 305) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(SetNpcSprite, NPC_Kooper, ANIM_KooperWithoutShell_IdleAngry) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Kooper))) + IfGe(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) + IfLt(GB_StoryProgress, STORY_CH1_KOOPER_JOINED_PARTY) + Call(InterpNpcYaw, NPC_Kooper, 225, 0) + Call(SetNpcPos, NPC_Kooper, -275, 0, 305) + Return + EndIf + EndIf + Call(SetNpcSprite, NPC_Kooper, ANIM_KooperWithoutShell_IdleAngry) + Return + End }; NpcData N(NpcData_Minigame)[] = { diff --git a/src/world/area_nok/nok_11/nok_11_1_music.c b/src/world/area_nok/nok_11/nok_11_1_music.c index 1965dac133f..92d5cde5340 100644 --- a/src/world/area_nok/nok_11/nok_11_1_music.c +++ b/src/world/area_nok/nok_11/nok_11_1_music.c @@ -1,13 +1,13 @@ #include "nok_11.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) + Return + End }; EvtScript N(EVS_PlayJrTroopaSong) = { - EVT_CALL(SetMusicTrack, 0, SONG_JR_TROOPA_THEME, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_JR_TROOPA_THEME, 0, 8) + Return + End }; diff --git a/src/world/area_nok/nok_11/nok_11_2_main.c b/src/world/area_nok/nok_11/nok_11_2_main.c index fcbaa04aa9c..80e35b153a2 100644 --- a/src/world/area_nok/nok_11/nok_11_2_main.c +++ b/src/world/area_nok/nok_11/nok_11_2_main.c @@ -1,108 +1,108 @@ #include "nok_11.h" EvtScript N(EVS_ExitWalk_mac_01_1) = { - EVT_IF_EQ(GB_KootFavor_State, KOOT_FAVOR_STATE_2) - EVT_SET(GF_KootFavor_LeftKoopaArea, TRUE) - EVT_END_IF - EVT_CALL(UseExitHeading, 60, nok_11_ENTRY_0) - EVT_EXEC(ExitWalk) - EVT_CALL(GotoMap, EVT_PTR("mac_01"), mac_01_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + IfEq(GB_KootFavor_State, KOOT_FAVOR_STATE_2) + Set(GF_KootFavor_LeftKoopaArea, TRUE) + EndIf + Call(UseExitHeading, 60, nok_11_ENTRY_0) + Exec(ExitWalk) + Call(GotoMap, Ref("mac_01"), mac_01_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_nok_12_0) = EVT_EXIT_WALK_NOK(60, nok_11_ENTRY_1, "nok_12", nok_12_ENTRY_0); EvtScript N(EVS_TexPan_Flowers) = { - EVT_CALL(SetTexPanner, MODEL_hana2, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_hana3, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_hana4, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_hana5, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_hana6, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_hana7, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_hana8, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_hana9, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_hana10, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_hanahana, TEX_PANNER_0) - EVT_LABEL(10) - EVT_LOOP(12) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(12) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0x4000, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(10) - EVT_RETURN - EVT_END + Call(SetTexPanner, MODEL_hana2, TEX_PANNER_0) + Call(SetTexPanner, MODEL_hana3, TEX_PANNER_0) + Call(SetTexPanner, MODEL_hana4, TEX_PANNER_0) + Call(SetTexPanner, MODEL_hana5, TEX_PANNER_0) + Call(SetTexPanner, MODEL_hana6, TEX_PANNER_0) + Call(SetTexPanner, MODEL_hana7, TEX_PANNER_0) + Call(SetTexPanner, MODEL_hana8, TEX_PANNER_0) + Call(SetTexPanner, MODEL_hana9, TEX_PANNER_0) + Call(SetTexPanner, MODEL_hana10, TEX_PANNER_0) + Call(SetTexPanner, MODEL_hanahana, TEX_PANNER_0) + Label(10) + Loop(12) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, 0) + Wait(1) + EndLoop + Loop(12) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0x4000, 0) + Wait(1) + EndLoop + Goto(10) + Return + End }; EvtScript N(EVS_TexPan_Water) = { - EVT_THREAD - EVT_CALL(SetTexPanner, MODEL_suimen1, TEX_PANNER_1) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LABEL(10) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, LVar2) - EVT_SUB(LVar0, 100) - EVT_SUB(LVar1, 400) - EVT_ADD(LVar1, 1000) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_kabemizu, TEX_PANNER_2) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LABEL(20) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_AUX, LVar1, LVar2) - EVT_SUB(LVar0, 100) - EVT_ADD(LVar1, 800) - EVT_SUB(LVar1, 400) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_RETURN - EVT_END + Thread + Call(SetTexPanner, MODEL_suimen1, TEX_PANNER_1) + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Label(10) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, LVar2) + Sub(LVar0, 100) + Sub(LVar1, 400) + Add(LVar1, 1000) + Wait(1) + Goto(10) + EndThread + Call(SetTexPanner, MODEL_kabemizu, TEX_PANNER_2) + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Label(20) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar0, 0) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_AUX, LVar1, LVar2) + Sub(LVar0, 100) + Add(LVar1, 800) + Sub(LVar1, 400) + Wait(1) + Goto(20) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_mac_01_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiri1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_nok_12_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_mac_01_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiri1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_nok_12_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PLEASANT_PATH) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_SET(GF_MAP_PleasantPath, TRUE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(JrTroopaNPCs))) - EVT_ELSE - EVT_IF_GE(GB_StoryProgress, STORY_CH5_RETURNED_TO_TOAD_TOWN) - EVT_IF_EQ(GF_NOK11_Defeated_KentC, FALSE) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(KentCKoopaNPCs))) - EVT_ELSE - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_END_IF - EVT_ELSE - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_END_IF - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_TexPan_Flowers)) - EVT_EXEC(N(EVS_TexPan_Water)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(PlaySound, SOUND_LOOP_NOK_WATER) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_PLEASANT_PATH) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Set(GF_MAP_PleasantPath, TRUE) + IfEq(GB_StoryProgress, STORY_CH1_STAR_SPRIT_DEPARTED) + Call(MakeNpcs, FALSE, Ref(N(JrTroopaNPCs))) + Else + IfGe(GB_StoryProgress, STORY_CH5_RETURNED_TO_TOAD_TOWN) + IfEq(GF_NOK11_Defeated_KentC, FALSE) + Call(MakeNpcs, FALSE, Ref(N(KentCKoopaNPCs))) + Else + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + EndIf + Else + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + EndIf + EndIf + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_TexPan_Flowers)) + Exec(N(EVS_TexPan_Water)) + Exec(N(EVS_SetupMusic)) + Call(PlaySound, SOUND_LOOP_NOK_WATER) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; diff --git a/src/world/area_nok/nok_11/nok_11_3_entity.c b/src/world/area_nok/nok_11/nok_11_3_entity.c index 95253efe968..3620425f5dc 100644 --- a/src/world/area_nok/nok_11/nok_11_3_entity.c +++ b/src/world/area_nok/nok_11/nok_11_3_entity.c @@ -2,16 +2,16 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 30, 60, -85, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 110, 60, -85, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_NOK11_ItemBlock_Coin) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 330, 60, -85, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_RedBlock), 380, 60, -85, 0, ITEM_DIZZY_ATTACK, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_NOK11_BadgeBlock_DizzyAttack) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 650, 60, -85, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 700, 60, -85, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 750, 60, -85, 0, ITEM_FRIGHT_JAR, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_NOK11_ItemBlock_FrightJar) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_BrickBlock), 30, 60, -85, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_YellowBlock), 110, 60, -85, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_NOK11_ItemBlock_Coin) + Call(MakeEntity, Ref(Entity_BrickBlock), 330, 60, -85, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_RedBlock), 380, 60, -85, 0, ITEM_DIZZY_ATTACK, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_NOK11_BadgeBlock_DizzyAttack) + Call(MakeEntity, Ref(Entity_BrickBlock), 650, 60, -85, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), 700, 60, -85, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_YellowBlock), 750, 60, -85, 0, ITEM_FRIGHT_JAR, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_NOK11_ItemBlock_FrightJar) + Return + End }; diff --git a/src/world/area_nok/nok_11/nok_11_4_npc.c b/src/world/area_nok/nok_11/nok_11_4_npc.c index 83226cd7aee..5a52846b4e3 100644 --- a/src/world/area_nok/nok_11/nok_11_4_npc.c +++ b/src/world/area_nok/nok_11/nok_11_4_npc.c @@ -10,13 +10,13 @@ #include "common/foliage.inc.c" EvtScript N(EVS_JrTroopa_RunFX) = { - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_JrTroopa_01, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, LVar0, LVar1, LVar2, 0) - EVT_WAIT(3) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetNpcPos, NPC_JrTroopa_01, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_LANDING_DUST, 1, LVar0, LVar1, LVar2, 0) + Wait(3) + EndLoop + Return + End }; FoliageModelList N(SceneBush_Models) = FOLIAGE_MODEL_LIST(MODEL_o125); @@ -26,190 +26,190 @@ SearchBushConfig N(SearchBush_Scene) = { }; EvtScript N(EVS_NpcIdle_JrTroopa_01) = { - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LE(LVar0, -125) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CHILD_THREAD - EVT_LABEL(10) - EVT_WAIT(3) - EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_CHILD_THREAD - EVT_EXEC(N(EVS_PlayJrTroopaSong)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle, 5, MSG_CH1_011E) - EVT_WAIT(15 * DT) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(90.0), -190, 0, -40, 200, EVT_FLOAT(15.0), EVT_FLOAT(-8.5)) - EVT_WAIT(15 * DT) - EVT_SET(LVar0, EVT_PTR(N(SearchBush_Scene))) - EVT_EXEC(N(EVS_SearchBush)) - EVT_WAIT(15 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_SELF, -230, 0, -157, 15 * DT) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_WAIT(15 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointTapFoot, 0, MSG_CH1_011F) - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(4.0 / DT), -140, 0, -40, 400, EVT_FLOAT(15.0), EVT_FLOAT(-5.0)) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Charge) - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Trip) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH1_0120, 160, 40) - EVT_END_THREAD - EVT_THREAD - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_LOOP(10 * DT) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2, 0, 0) - EVT_WAIT(2) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(NpcMoveTo, NPC_SELF, -201, -67, 10 * DT) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.0)) - EVT_CALL(NpcJump1, NPC_SELF, -191, 0, -32, 5 * DT) - EVT_EXEC_GET_TID(N(EVS_JrTroopa_RunFX), LVarA) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SLIDE, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcMoveTo, NPC_SELF, -165, 50, 15 * DT) - EVT_KILL_THREAD(LVarA) - EVT_CALL(StopSound, SOUND_SLIDE) - EVT_WAIT(5 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_FallHeadfirstBack) - EVT_WAIT(15 * DT) - EVT_THREAD - EVT_WAIT(15 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_WATER_SPLASH, SOUND_SPACE_DEFAULT) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 5) - EVT_PLAY_EFFECT(EFFECT_WATER_SPLASH, 2, LVar0, LVar1, LVar2, EVT_FLOAT(0.7), 30) - EVT_ADD(LVar0, 10) - EVT_PLAY_EFFECT(EFFECT_WATER_SPLASH, 2, LVar0, LVar1, LVar2, EVT_FLOAT(0.7), 30) - EVT_WAIT(5 * DT) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 25) - EVT_PLAY_EFFECT(EFFECT_WATER_SPLASH, 2, LVar0, LVar1, LVar2, EVT_FLOAT(0.7), 30) - EVT_ADD(LVar0, 10) - EVT_PLAY_EFFECT(EFFECT_WATER_SPLASH, 2, LVar0, LVar1, LVar2, EVT_FLOAT(0.7), 30) - EVT_WAIT(5 * DT) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, -15) - EVT_PLAY_EFFECT(EFFECT_WATER_SPLASH, 2, LVar0, LVar1, LVar2, EVT_FLOAT(0.7), 30) - EVT_ADD(LVar0, 10) - EVT_PLAY_EFFECT(EFFECT_WATER_SPLASH, 2, LVar0, LVar1, LVar2, EVT_FLOAT(0.7), 30) - EVT_END_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_FALL_QUICK, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.5)) - EVT_CALL(NpcJump0, NPC_SELF, -165, -90, 50, 20 * DT) - EVT_WAIT(30 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_JR_TROOPA_SCAMPER, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_ScamperBack) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_THREAD - EVT_WAIT(85 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_ClimbUpBack) - EVT_END_THREAD - EVT_CALL(SetNpcJumpscale, NPC_SELF, 0) - EVT_CALL(NpcJump0, NPC_SELF, -165, 0, 50, 90 * DT) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Charge) - EVT_CALL(NpcMoveTo, NPC_SELF, -190, -45, 10 * DT) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_PointTapFoot) - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(90.0), -140, 0, -40, 250, EVT_FLOAT(15.0), EVT_FLOAT(-8.5)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointTapFoot, 0, MSG_CH1_0121) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PARTNER_GOOMBARIO) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 5, MSG_CH1_0122) - EVT_CASE_EQ(PARTNER_KOOPER) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 5, MSG_CH1_0123) - EVT_CASE_EQ(PARTNER_BOMBETTE) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 5, MSG_CH1_0124) - EVT_END_SWITCH - EVT_CALL(EnablePartnerAI) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointTapFoot, 0, MSG_CH1_0125) - EVT_CALL(ShowChoice, MSG_Choice_0013) - EVT_WAIT(10 * DT) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointTapFoot, 0, MSG_CH1_0126) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointTapFoot, 0, MSG_CH1_0127) - EVT_END_IF - EVT_WAIT(10 * DT) - EVT_CALL(StartBossBattle, SONG_JR_TROOPA_BATTLE) - EVT_RETURN - EVT_END + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLe(LVar0, -125) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(DisablePlayerInput, TRUE) + ChildThread + Label(10) + Wait(3) + Call(PlayerFaceNpc, NPC_SELF, FALSE) + Wait(1) + Goto(10) + EndChildThread + Exec(N(EVS_PlayJrTroopaSong)) + Call(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle, 5, MSG_CH1_011E) + Wait(15 * DT) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamProperties, CAM_DEFAULT, Float(90.0), -190, 0, -40, 200, Float(15.0), Float(-8.5)) + Wait(15 * DT) + Set(LVar0, Ref(N(SearchBush_Scene))) + Exec(N(EVS_SearchBush)) + Wait(15 * DT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Call(NpcJump0, NPC_SELF, -230, 0, -157, 15 * DT) + Call(NpcFacePlayer, NPC_SELF, 0) + Wait(15 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointTapFoot, 0, MSG_CH1_011F) + Call(SetCamProperties, CAM_DEFAULT, Float(4.0 / DT), -140, 0, -40, 400, Float(15.0), Float(-5.0)) + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Charge) + Wait(10 * DT) + Thread + Wait(10 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Trip) + Call(ShowMessageAtScreenPos, MSG_CH1_0120, 160, 40) + EndThread + Thread + EndThread + Thread + Wait(10 * DT) + Loop(10 * DT) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2, 0, 0) + Wait(2) + EndLoop + EndThread + Call(NpcMoveTo, NPC_SELF, -201, -67, 10 * DT) + Call(SetNpcJumpscale, NPC_SELF, Float(2.0)) + Call(NpcJump1, NPC_SELF, -191, 0, -32, 5 * DT) + ExecGetTID(N(EVS_JrTroopa_RunFX), LVarA) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SLIDE, SOUND_SPACE_DEFAULT) + Call(NpcMoveTo, NPC_SELF, -165, 50, 15 * DT) + KillThread(LVarA) + Call(StopSound, SOUND_SLIDE) + Wait(5 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_FallHeadfirstBack) + Wait(15 * DT) + Thread + Wait(15 * DT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_WATER_SPLASH, SOUND_SPACE_DEFAULT) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 5) + PlayEffect(EFFECT_WATER_SPLASH, 2, LVar0, LVar1, LVar2, Float(0.7), 30) + Add(LVar0, 10) + PlayEffect(EFFECT_WATER_SPLASH, 2, LVar0, LVar1, LVar2, Float(0.7), 30) + Wait(5 * DT) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 25) + PlayEffect(EFFECT_WATER_SPLASH, 2, LVar0, LVar1, LVar2, Float(0.7), 30) + Add(LVar0, 10) + PlayEffect(EFFECT_WATER_SPLASH, 2, LVar0, LVar1, LVar2, Float(0.7), 30) + Wait(5 * DT) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, -15) + PlayEffect(EFFECT_WATER_SPLASH, 2, LVar0, LVar1, LVar2, Float(0.7), 30) + Add(LVar0, 10) + PlayEffect(EFFECT_WATER_SPLASH, 2, LVar0, LVar1, LVar2, Float(0.7), 30) + EndThread + Call(PlaySoundAtNpc, NPC_SELF, SOUND_FALL_QUICK, SOUND_SPACE_DEFAULT) + Call(SetNpcJumpscale, NPC_SELF, Float(0.5)) + Call(NpcJump0, NPC_SELF, -165, -90, 50, 20 * DT) + Wait(30 * DT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_JR_TROOPA_SCAMPER, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_ScamperBack) + Call(SetNpcYaw, NPC_SELF, 270) + Thread + Wait(85 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_ClimbUpBack) + EndThread + Call(SetNpcJumpscale, NPC_SELF, 0) + Call(NpcJump0, NPC_SELF, -165, 0, 50, 90 * DT) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Charge) + Call(NpcMoveTo, NPC_SELF, -190, -45, 10 * DT) + Call(NpcFacePlayer, NPC_SELF, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_PointTapFoot) + Call(SetCamProperties, CAM_DEFAULT, Float(90.0), -140, 0, -40, 250, Float(15.0), Float(-8.5)) + Call(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointTapFoot, 0, MSG_CH1_0121) + Call(DisablePartnerAI, 0) + Call(GetCurrentPartnerID, LVar0) + Switch(LVar0) + CaseEq(PARTNER_GOOMBARIO) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 5, MSG_CH1_0122) + CaseEq(PARTNER_KOOPER) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 5, MSG_CH1_0123) + CaseEq(PARTNER_BOMBETTE) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 5, MSG_CH1_0124) + EndSwitch + Call(EnablePartnerAI) + Call(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointTapFoot, 0, MSG_CH1_0125) + Call(ShowChoice, MSG_Choice_0013) + Wait(10 * DT) + IfEq(LVar0, 0) + Call(ContinueSpeech, NPC_SELF, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointTapFoot, 0, MSG_CH1_0126) + Else + Call(ContinueSpeech, NPC_SELF, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_PointTapFoot, 0, MSG_CH1_0127) + EndIf + Wait(10 * DT) + Call(StartBossBattle, SONG_JR_TROOPA_BATTLE) + Return + End }; EvtScript N(EVS_NpcAI_JrTroopa_01) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInteract_JrTroopa_01) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Defeated, ANIM_JrTroopa_Defeated, 5, MSG_CH1_012B) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Defeated, ANIM_JrTroopa_Defeated, 5, MSG_CH1_012B) + Return + End }; EvtScript N(EVS_NpcIdle_JrTroopa_02) = { - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_JrTroopa_01, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetNpcPos, NPC_JrTroopa_01, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcHit_JrTroopa_02) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_PARTNER) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Defeated, ANIM_JrTroopa_Defeated, 5, MSG_CH1_012B) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseOrEq(ENCOUNTER_TRIGGER_JUMP) + CaseOrEq(ENCOUNTER_TRIGGER_HAMMER) + CaseOrEq(ENCOUNTER_TRIGGER_PARTNER) + Call(DisablePlayerInput, TRUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Defeated, ANIM_JrTroopa_Defeated, 5, MSG_CH1_012B) + Call(DisablePlayerInput, FALSE) + EndSwitch + Return + End }; EvtScript N(EVS_NpcDefeat_JrTroopa_01) = { - EVT_CALL(ClearDefeatedEnemies) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Defeated) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_JrTroopa_02, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcCollisionSize, NPC_SELF, 24, 32) - EVT_CALL(SetNpcCollisionSize, NPC_JrTroopa_02, 24, 32) - EVT_SET(GB_StoryProgress, STORY_CH1_DEFEATED_JR_TROOPA) - EVT_THREAD - EVT_WAIT(4) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_END_THREAD - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_JrTroopa_01))) - EVT_CALL(SetNpcFlagBits, NPC_JrTroopa_02, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(ClearDefeatedEnemies) + Call(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Defeated) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_JrTroopa_02, LVar0, LVar1, LVar2) + Call(SetNpcCollisionSize, NPC_SELF, 24, 32) + Call(SetNpcCollisionSize, NPC_JrTroopa_02, 24, 32) + Set(GB_StoryProgress, STORY_CH1_DEFEATED_JR_TROOPA) + Thread + Wait(4) + Exec(N(EVS_SetupMusic)) + EndThread + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_JrTroopa_01))) + Call(SetNpcFlagBits, NPC_JrTroopa_02, NPC_FLAG_INVISIBLE, TRUE) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_KentCKoopa_02) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_0134) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_0134) + Return + End }; API_CALLABLE(N(KentCheckNotEnoughCoins)) { @@ -233,220 +233,220 @@ API_CALLABLE(N(KentTakeCoins)) { } EvtScript N(EVS_NpcIdle_KentCKoopa_01) = { - EVT_LABEL(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_EQ(AB_NOK_2, 0) - EVT_IF_GE(LVar0, -260) - EVT_GOTO(10) - EVT_ELSE - EVT_GOTO(2) - EVT_END_IF - EVT_ELSE - EVT_IF_LE(LVar0, -55) - EVT_GOTO(10) - EVT_ELSE - EVT_GOTO(2) - EVT_END_IF - EVT_END_IF - EVT_LABEL(2) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_LABEL(10) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterruptUsePartner) - EVT_CALL(SetMusicTrack, 0, SONG_MINIBOSS_BATTLE, 0, 8) - EVT_CALL(SpeakToPlayer, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_012C) - EVT_IF_EQ(AB_NOK_2, 0) - EVT_SET(LVar0, 20) - EVT_ELSE - EVT_SET(LVar0, -20) - EVT_END_IF - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(5.0), LVar0, EVT_FLOAT(275.0), EVT_FLOAT(17.5), EVT_FLOAT(-12.0)) - EVT_CALL(SpeakToPlayer, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_012D) - EVT_LABEL(15) - EVT_CALL(ShowCoinCounter, TRUE) - EVT_CALL(ShowChoice, MSG_Choice_0045) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(30) - EVT_END_IF - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(50) - EVT_END_IF - EVT_IF_EQ(AB_NOK_2, 0) - EVT_SET(LVar0, 20) - EVT_ELSE - EVT_SET(LVar0, -20) - EVT_END_IF - EVT_CALL(ShowCoinCounter, FALSE) - EVT_CALL(ContinueSpeech, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_012E) - EVT_CALL(ShowCoinCounter, TRUE) - EVT_CALL(ShowChoice, MSG_Choice_0045) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(30) - EVT_END_IF - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(50) - EVT_END_IF - EVT_CALL(ShowCoinCounter, FALSE) - EVT_LABEL(20) - EVT_CALL(ContinueSpeech, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_0135) - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_IF_EQ(AB_NOK_2, 0) - EVT_SET(LVar0, 20) - EVT_ELSE - EVT_SET(LVar0, -20) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_0136) - EVT_CALL(SetNpcAnimation, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim05) - EVT_IF_EQ(AB_NOK_2, 0) - EVT_SET(LVar0, 90) - EVT_ELSE - EVT_SET(LVar0, 270) - EVT_END_IF - EVT_CALL(InterpNpcYaw, NPC_KentCKoopa_02, LVar0, 0) - EVT_WAIT(30) - EVT_IF_EQ(AB_NOK_2, 0) - EVT_SET(LVar0, 125) - EVT_ELSE - EVT_SET(LVar0, -430) - EVT_END_IF - EVT_CALL(NpcMoveTo, NPC_KentCKoopa_02, LVar0, -37, 40) - EVT_CALL(SetNpcPos, NPC_KentCKoopa_02, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5.0)) - EVT_GOTO(100) - EVT_LABEL(30) - EVT_CALL(N(KentCheckNotEnoughCoins)) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(40) - EVT_END_IF - EVT_CALL(CloseMessage) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_EQ(AB_NOK_2, 0) - EVT_SET(LVar0, -215) - EVT_ELSE - EVT_SET(LVar0, -100) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim03) - EVT_CALL(NpcMoveTo, NPC_KentCKoopa_02, LVar0, LVar2, 20) - EVT_CALL(SetNpcAnimation, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim01) - EVT_CALL(N(KentTakeCoins)) - EVT_CALL(ShowCoinCounter, FALSE) - EVT_CALL(SpeakToPlayer, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_0133) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim03) - EVT_CALL(NpcMoveTo, NPC_KentCKoopa_02, -167, -100, 20) - EVT_CALL(SetNpcFlagBits, NPC_KentCKoopa_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(BindNpcInteract, NPC_KentCKoopa_02, EVT_PTR(N(EVS_NpcInteract_KentCKoopa_02))) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcAnimation, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim01) - EVT_IF_EQ(AB_NOK_2, 0) - EVT_SET(LVar0, 270) - EVT_ELSE - EVT_SET(LVar0, 90) - EVT_END_IF - EVT_CALL(InterpNpcYaw, NPC_KentCKoopa_02, LVar0, 0) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_0134) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5.0)) - EVT_GOTO(100) - EVT_LABEL(40) - EVT_CALL(ShowCoinCounter, FALSE) - EVT_CALL(ContinueSpeech, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_012F) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5.0)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_WAIT(30) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_LABEL(41) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_EQ(AB_NOK_2, 0) - EVT_IF_GE(LVar0, -255) - EVT_SET(LVar3, -256) - EVT_GOTO(43) - EVT_ELSE - EVT_GOTO(42) - EVT_END_IF - EVT_ELSE - EVT_IF_LE(LVar0, -60) - EVT_SET(LVar3, -59) - EVT_GOTO(43) - EVT_ELSE - EVT_GOTO(42) - EVT_END_IF - EVT_END_IF - EVT_LABEL(42) - EVT_WAIT(1) - EVT_GOTO(41) - EVT_LABEL(43) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterruptUsePartner) - EVT_CALL(SetPlayerPos, LVar3, LVar1, LVar2) - EVT_CALL(SpeakToPlayer, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_0130) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerPos, LVar3, LVar1, LVar2) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_GOTO(41) - EVT_LABEL(50) - EVT_CALL(ShowCoinCounter, FALSE) - EVT_CALL(ContinueSpeech, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_0131) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5.0)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_WAIT(30) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_LABEL(51) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_EQ(AB_NOK_2, 0) - EVT_IF_GE(LVar0, -255) - EVT_SET(LVar3, -256) - EVT_GOTO(53) - EVT_ELSE - EVT_GOTO(52) - EVT_END_IF - EVT_ELSE - EVT_IF_LE(LVar0, -60) - EVT_SET(LVar3, -59) - EVT_GOTO(53) - EVT_ELSE - EVT_GOTO(52) - EVT_END_IF - EVT_END_IF - EVT_LABEL(52) - EVT_WAIT(1) - EVT_GOTO(51) - EVT_LABEL(53) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterruptUsePartner) - EVT_CALL(SetMusicTrack, 0, SONG_MINIBOSS_BATTLE, 0, 8) - EVT_CALL(SetPlayerPos, LVar3, LVar1, LVar2) - EVT_CALL(SpeakToPlayer, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_0132) - EVT_IF_EQ(AB_NOK_2, 0) - EVT_SET(LVar0, 20) - EVT_ELSE - EVT_SET(LVar0, -20) - EVT_END_IF - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(5.0), LVar0, EVT_FLOAT(275.0), EVT_FLOAT(17.5), EVT_FLOAT(-12.0)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerPos, LVar3, LVar1, LVar2) - EVT_GOTO(15) - EVT_LABEL(100) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_WAIT(30) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Label(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfEq(AB_NOK_2, 0) + IfGe(LVar0, -260) + Goto(10) + Else + Goto(2) + EndIf + Else + IfLe(LVar0, -55) + Goto(10) + Else + Goto(2) + EndIf + EndIf + Label(2) + Wait(1) + Goto(1) + Label(10) + Call(DisablePlayerInput, TRUE) + Call(InterruptUsePartner) + Call(SetMusicTrack, 0, SONG_MINIBOSS_BATTLE, 0, 8) + Call(SpeakToPlayer, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_012C) + IfEq(AB_NOK_2, 0) + Set(LVar0, 20) + Else + Set(LVar0, -20) + EndIf + Call(AdjustCam, CAM_DEFAULT, Float(5.0), LVar0, Float(275.0), Float(17.5), Float(-12.0)) + Call(SpeakToPlayer, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_012D) + Label(15) + Call(ShowCoinCounter, TRUE) + Call(ShowChoice, MSG_Choice_0045) + IfEq(LVar0, 0) + Goto(30) + EndIf + IfEq(LVar0, 1) + Goto(50) + EndIf + IfEq(AB_NOK_2, 0) + Set(LVar0, 20) + Else + Set(LVar0, -20) + EndIf + Call(ShowCoinCounter, FALSE) + Call(ContinueSpeech, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_012E) + Call(ShowCoinCounter, TRUE) + Call(ShowChoice, MSG_Choice_0045) + IfEq(LVar0, 0) + Goto(30) + EndIf + IfEq(LVar0, 1) + Goto(50) + EndIf + Call(ShowCoinCounter, FALSE) + Label(20) + Call(ContinueSpeech, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_0135) + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + IfEq(AB_NOK_2, 0) + Set(LVar0, 20) + Else + Set(LVar0, -20) + EndIf + Call(SpeakToPlayer, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_0136) + Call(SetNpcAnimation, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim05) + IfEq(AB_NOK_2, 0) + Set(LVar0, 90) + Else + Set(LVar0, 270) + EndIf + Call(InterpNpcYaw, NPC_KentCKoopa_02, LVar0, 0) + Wait(30) + IfEq(AB_NOK_2, 0) + Set(LVar0, 125) + Else + Set(LVar0, -430) + EndIf + Call(NpcMoveTo, NPC_KentCKoopa_02, LVar0, -37, 40) + Call(SetNpcPos, NPC_KentCKoopa_02, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(ResetCam, CAM_DEFAULT, Float(5.0)) + Goto(100) + Label(30) + Call(N(KentCheckNotEnoughCoins)) + IfEq(LVar0, 1) + Goto(40) + EndIf + Call(CloseMessage) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfEq(AB_NOK_2, 0) + Set(LVar0, -215) + Else + Set(LVar0, -100) + EndIf + Call(SetNpcAnimation, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim03) + Call(NpcMoveTo, NPC_KentCKoopa_02, LVar0, LVar2, 20) + Call(SetNpcAnimation, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim01) + Call(N(KentTakeCoins)) + Call(ShowCoinCounter, FALSE) + Call(SpeakToPlayer, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_0133) + Wait(20) + Call(SetNpcAnimation, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim03) + Call(NpcMoveTo, NPC_KentCKoopa_02, -167, -100, 20) + Call(SetNpcFlagBits, NPC_KentCKoopa_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(BindNpcInteract, NPC_KentCKoopa_02, Ref(N(EVS_NpcInteract_KentCKoopa_02))) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(SetNpcAnimation, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim01) + IfEq(AB_NOK_2, 0) + Set(LVar0, 270) + Else + Set(LVar0, 90) + EndIf + Call(InterpNpcYaw, NPC_KentCKoopa_02, LVar0, 0) + Wait(10) + Call(SpeakToPlayer, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_0134) + Call(ResetCam, CAM_DEFAULT, Float(5.0)) + Goto(100) + Label(40) + Call(ShowCoinCounter, FALSE) + Call(ContinueSpeech, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_012F) + Call(ResetCam, CAM_DEFAULT, Float(5.0)) + Exec(N(EVS_SetupMusic)) + Wait(30) + Call(DisablePlayerInput, FALSE) + Label(41) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfEq(AB_NOK_2, 0) + IfGe(LVar0, -255) + Set(LVar3, -256) + Goto(43) + Else + Goto(42) + EndIf + Else + IfLe(LVar0, -60) + Set(LVar3, -59) + Goto(43) + Else + Goto(42) + EndIf + EndIf + Label(42) + Wait(1) + Goto(41) + Label(43) + Call(DisablePlayerInput, TRUE) + Call(InterruptUsePartner) + Call(SetPlayerPos, LVar3, LVar1, LVar2) + Call(SpeakToPlayer, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_0130) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerPos, LVar3, LVar1, LVar2) + Call(DisablePlayerInput, FALSE) + Goto(41) + Label(50) + Call(ShowCoinCounter, FALSE) + Call(ContinueSpeech, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_0131) + Call(ResetCam, CAM_DEFAULT, Float(5.0)) + Exec(N(EVS_SetupMusic)) + Wait(30) + Call(DisablePlayerInput, FALSE) + Label(51) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfEq(AB_NOK_2, 0) + IfGe(LVar0, -255) + Set(LVar3, -256) + Goto(53) + Else + Goto(52) + EndIf + Else + IfLe(LVar0, -60) + Set(LVar3, -59) + Goto(53) + Else + Goto(52) + EndIf + EndIf + Label(52) + Wait(1) + Goto(51) + Label(53) + Call(DisablePlayerInput, TRUE) + Call(InterruptUsePartner) + Call(SetMusicTrack, 0, SONG_MINIBOSS_BATTLE, 0, 8) + Call(SetPlayerPos, LVar3, LVar1, LVar2) + Call(SpeakToPlayer, NPC_KentCKoopa_02, ANIM_KentCKoopa_Anim02, ANIM_KentCKoopa_Anim01, 0, MSG_CH1_0132) + IfEq(AB_NOK_2, 0) + Set(LVar0, 20) + Else + Set(LVar0, -20) + EndIf + Call(AdjustCam, CAM_DEFAULT, Float(5.0), LVar0, Float(275.0), Float(17.5), Float(-12.0)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerPos, LVar3, LVar1, LVar2) + Goto(15) + Label(100) + Exec(N(EVS_SetupMusic)) + Wait(30) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcDefeat_KentCKoopa_01) = { - EVT_SET(GF_NOK11_Defeated_KentC, TRUE) - EVT_CALL(ClearDefeatedEnemies) - EVT_RETURN - EVT_END + Set(GF_NOK11_Defeated_KentC, TRUE) + Call(ClearDefeatedEnemies) + Return + End }; EvtScript N(EVS_NpcDefeat_KentCKoopa_02) = { - EVT_CALL(ClearDefeatedEnemies) - EVT_RETURN - EVT_END + Call(ClearDefeatedEnemies) + Return + End }; NpcData N(NpcData_KoopaTroopa) = { @@ -516,20 +516,20 @@ NpcData N(NpcData_SpikedGoomba) = { }; EvtScript N(EVS_NpcInit_JrTroopa_01) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_JrTroopa_01))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_JrTroopa_01))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_JrTroopa_01))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_JrTroopa_01))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_JrTroopa_01))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_JrTroopa_01))) + Return + End }; EvtScript N(EVS_NpcInit_JrTroopa_02) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_JrTroopa_02))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_JrTroopa_02))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_JrTroopa_02))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_JrTroopa_02))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) + Return + End }; NpcData N(NpcData_JrTroopa)[] = { @@ -558,26 +558,26 @@ NpcData N(NpcData_JrTroopa)[] = { }; EvtScript N(EVS_NpcInit_KentCKoopa_01) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_KentCKoopa_01))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_KentCKoopa_01))) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(GetEntryID, AB_NOK_2) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_KentCKoopa_01))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_KentCKoopa_01))) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(GetEntryID, AB_NOK_2) + Return + End }; EvtScript N(EVS_NpcInit_KentCKoopa_02) = { - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_KentCKoopa_02))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(GetEntryID, LVar3) - EVT_IF_EQ(LVar3, nok_11_ENTRY_0) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_ELSE - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_KentCKoopa_02))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(GetEntryID, LVar3) + IfEq(LVar3, nok_11_ENTRY_0) + Call(SetNpcYaw, NPC_SELF, 270) + Else + Call(SetNpcYaw, NPC_SELF, 90) + EndIf + Return + End }; NpcData N(NpcData_KentCKoopa)[] = { diff --git a/src/world/area_nok/nok_12/nok_12_1_music.c b/src/world/area_nok/nok_12/nok_12_1_music.c index 33ff1775cdb..f017aa44c9e 100644 --- a/src/world/area_nok/nok_12/nok_12_1_music.c +++ b/src/world/area_nok/nok_12/nok_12_1_music.c @@ -1,8 +1,8 @@ #include "nok_12.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) - EVT_CALL(PlaySound, SOUND_LOOP_NOK_WATER) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) + Call(PlaySound, SOUND_LOOP_NOK_WATER) + Return + End }; diff --git a/src/world/area_nok/nok_12/nok_12_2_main.c b/src/world/area_nok/nok_12/nok_12_2_main.c index 46b5a0bd82f..c05a14fd978 100644 --- a/src/world/area_nok/nok_12/nok_12_2_main.c +++ b/src/world/area_nok/nok_12/nok_12_2_main.c @@ -29,124 +29,124 @@ EvtScript N(EVS_ExitWalk_nok_11_1) = EVT_EXIT_WALK_NOK(60, nok_12_ENTRY_0, "nok_ EvtScript N(EVS_ExitWalk_nok_13_0) = EVT_EXIT_WALK_NOK(60, nok_12_ENTRY_1, "nok_13", nok_13_ENTRY_0); EvtScript N(EVS_UpdateEnounterStages) = { - EVT_LABEL(0) - EVT_IF_GE(GB_StoryProgress, STORY_CH1_MADE_FIRST_BRIDGE) - EVT_CALL(N(UpdateEnounterStages), -380, -170, -100, 999, BTL_NOK_STAGE_00, BTL_NOK_STAGE_02) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + IfGe(GB_StoryProgress, STORY_CH1_MADE_FIRST_BRIDGE) + Call(N(UpdateEnounterStages), -380, -170, -100, 999, BTL_NOK_STAGE_00, BTL_NOK_STAGE_02) + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_TexPan_Flowers) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, MODEL_hana1, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_hana2, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_hana3, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_hana4, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_hana5, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_hana6, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_hana7, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_hanahna, TEX_PANNER_0) - EVT_LABEL(10) - EVT_LOOP(12) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(12) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0x4000, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(10) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, MODEL_hana1, TEX_PANNER_0) + Call(SetTexPanner, MODEL_hana2, TEX_PANNER_0) + Call(SetTexPanner, MODEL_hana3, TEX_PANNER_0) + Call(SetTexPanner, MODEL_hana4, TEX_PANNER_0) + Call(SetTexPanner, MODEL_hana5, TEX_PANNER_0) + Call(SetTexPanner, MODEL_hana6, TEX_PANNER_0) + Call(SetTexPanner, MODEL_hana7, TEX_PANNER_0) + Call(SetTexPanner, MODEL_hanahna, TEX_PANNER_0) + Label(10) + Loop(12) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, 0) + Wait(1) + EndLoop + Loop(12) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0x4000, 0) + Wait(1) + EndLoop + Goto(10) + Return + End }; EvtScript N(EVS_TexPan_Water) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_THREAD - EVT_CALL(SetTexPanner, MODEL_suimen1, TEX_PANNER_1) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LABEL(10) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, LVar2) - EVT_SUB(LVar0, 100) - EVT_SUB(LVar1, 400) - EVT_ADD(LVar1, 1000) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_kabemizu1, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_kabemizu2, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_kabemizu3, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_kabemizu4, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_kabemizu5, TEX_PANNER_2) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LABEL(20) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_AUX, LVar1, LVar2) - EVT_SUB(LVar0, 100) - EVT_ADD(LVar1, 800) - EVT_SUB(LVar1, 400) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Thread + Call(SetTexPanner, MODEL_suimen1, TEX_PANNER_1) + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Label(10) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, LVar2) + Sub(LVar0, 100) + Sub(LVar1, 400) + Add(LVar1, 1000) + Wait(1) + Goto(10) + EndThread + Call(SetTexPanner, MODEL_kabemizu1, TEX_PANNER_2) + Call(SetTexPanner, MODEL_kabemizu2, TEX_PANNER_2) + Call(SetTexPanner, MODEL_kabemizu3, TEX_PANNER_2) + Call(SetTexPanner, MODEL_kabemizu4, TEX_PANNER_2) + Call(SetTexPanner, MODEL_kabemizu5, TEX_PANNER_2) + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Label(20) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar0, 0) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_AUX, LVar1, LVar2) + Sub(LVar0, 100) + Add(LVar1, 800) + Sub(LVar1, 400) + Wait(1) + Goto(20) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_nok_11_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_nok_13_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_nok_11_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_nok_13_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PLEASANT_PATH) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SET(AF_NOK12_HitSwitch, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(GetDemoState, LVar0) - EVT_IF_EQ(LVar0, DEMO_STATE_NONE) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_ELSE - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, nok_12_ENTRY_2) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DemoNPCs))) - EVT_END_IF - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupFoliage)) - EVT_EXEC(N(EVS_TexPan_Flowers)) - EVT_EXEC(N(EVS_TexPan_Water)) - EVT_EXEC(N(EVS_SetupBridge)) - EVT_CALL(GetDemoState, LVar0) - EVT_IF_NE(LVar0, DEMO_STATE_NONE) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, nok_12_ENTRY_2) - EVT_EXEC_WAIT(N(EVS_PlayDemoScene1)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_PlayDemoScene2)) - EVT_END_IF - EVT_RETURN - EVT_END_IF - EVT_EXEC(N(EVS_UpdateEnounterStages)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_SET(GF_MAC01_RowfBadgesChosen, FALSE) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_PLEASANT_PATH) + Call(SetSpriteShading, SHADING_NONE) + Set(AF_NOK12_HitSwitch, FALSE) + SetUP_CAMERA_DEFAULT() + Call(GetDemoState, LVar0) + IfEq(LVar0, DEMO_STATE_NONE) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Else + Call(GetEntryID, LVar0) + IfEq(LVar0, nok_12_ENTRY_2) + Call(MakeNpcs, FALSE, Ref(N(DemoNPCs))) + EndIf + EndIf + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupFoliage)) + Exec(N(EVS_TexPan_Flowers)) + Exec(N(EVS_TexPan_Water)) + Exec(N(EVS_SetupBridge)) + Call(GetDemoState, LVar0) + IfNe(LVar0, DEMO_STATE_NONE) + Call(GetEntryID, LVar0) + IfEq(LVar0, nok_12_ENTRY_2) + ExecWait(N(EVS_PlayDemoScene1)) + Else + ExecWait(N(EVS_PlayDemoScene2)) + EndIf + Return + EndIf + Exec(N(EVS_UpdateEnounterStages)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Wait(1) + Set(GF_MAC01_RowfBadgesChosen, FALSE) + Return + End }; diff --git a/src/world/area_nok/nok_12/nok_12_3_entity.c b/src/world/area_nok/nok_12/nok_12_3_entity.c index 817c25c6e51..ae2ec99a076 100644 --- a/src/world/area_nok/nok_12/nok_12_3_entity.c +++ b/src/world/area_nok/nok_12/nok_12_3_entity.c @@ -23,60 +23,60 @@ API_CALLABLE(N(SetNpcVarSafe)) { #include "world/common/todo/SetEntityPosition.inc.c" EvtScript N(EVS_BreakBlock_Ambush) = { - EVT_CALL(N(SetNpcVarSafe), NPC_SpikedGoomba, 0, 1) - EVT_RETURN - EVT_END + Call(N(SetNpcVarSafe), NPC_SpikedGoomba, 0, 1) + Return + End }; EvtScript N(EVS_OnShakeTree_DropSwitch) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH1_KNOCKED_SWITCH_FROM_TREE) - EVT_SET(GB_StoryProgress, STORY_CH1_KNOCKED_SWITCH_FROM_TREE) - EVT_WAIT(15) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(MakeLerp, 95, 0, 12, EASING_QUADRATIC_IN) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetEntityPosition), MV_SwitchEntityID, -470, LVar0, -150) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_OBJECT_LAND, SOUND_SPACE_DEFAULT, -470, LVar0, -150) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_END_THREAD - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH1_KNOCKED_SWITCH_FROM_TREE) + Set(GB_StoryProgress, STORY_CH1_KNOCKED_SWITCH_FROM_TREE) + Wait(15) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(DisablePlayerInput, TRUE) + Call(MakeLerp, 95, 0, 12, EASING_QUADRATIC_IN) + Label(0) + Call(UpdateLerp) + Call(N(SetEntityPosition), MV_SwitchEntityID, -470, LVar0, -150) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(PlaySoundAt, SOUND_OBJECT_LAND, SOUND_SPACE_DEFAULT, -470, LVar0, -150) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.0)) + Thread + Wait(5) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + EndThread + Call(DisablePlayerInput, FALSE) + EndIf + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_LE(GB_StoryProgress, STORY_CH1_KNOCKED_SWITCH_FROM_TREE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH1_KNOCKED_SWITCH_FROM_TREE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueSwitch), -470, 0, -150, 0, MAKE_ENTITY_END) - EVT_CALL(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_NOK12_HitSwitch)) - EVT_ELSE - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueSwitch), NPC_DISPOSE_LOCATION, 0, MAKE_ENTITY_END) - EVT_CALL(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_NOK12_HitSwitch)) - EVT_SET(MV_SwitchEntityID, LVar0) - EVT_END_IF - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -560, 60, -120, 0, ITEM_POW_BLOCK, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_NOK12_ItemBlock_POWBlock) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), -165, 60, -130, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_BreakBlock_Ambush))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 520, 110, -180, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 595, 110, -180, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 720, 135, -180, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), 820, 135, -180, 0, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_NOK12_MultiCoinBrick) - EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, -220, -50, 155, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_NOK12_Item_StarPiece) - EVT_CALL(MakeItemEntity, ITEM_SLEEPY_SHEEP, 392, 25, -145, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_NOK12_Item_SleepySheep) - EVT_RETURN - EVT_END + IfLe(GB_StoryProgress, STORY_CH1_KNOCKED_SWITCH_FROM_TREE) + IfEq(GB_StoryProgress, STORY_CH1_KNOCKED_SWITCH_FROM_TREE) + Call(MakeEntity, Ref(Entity_BlueSwitch), -470, 0, -150, 0, MAKE_ENTITY_END) + Call(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_NOK12_HitSwitch)) + Else + Call(MakeEntity, Ref(Entity_BlueSwitch), NPC_DISPOSE_LOCATION, 0, MAKE_ENTITY_END) + Call(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_NOK12_HitSwitch)) + Set(MV_SwitchEntityID, LVar0) + EndIf + EndIf + Call(MakeEntity, Ref(Entity_YellowBlock), -560, 60, -120, 0, ITEM_POW_BLOCK, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_NOK12_ItemBlock_POWBlock) + Call(MakeEntity, Ref(Entity_BrickBlock), -165, 60, -130, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_BreakBlock_Ambush))) + Call(MakeEntity, Ref(Entity_BrickBlock), 520, 110, -180, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), 595, 110, -180, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), 720, 135, -180, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_MulticoinBlock), 820, 135, -180, 0, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_NOK12_MultiCoinBrick) + Call(MakeItemEntity, ITEM_STAR_PIECE, -220, -50, 155, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_NOK12_Item_StarPiece) + Call(MakeItemEntity, ITEM_SLEEPY_SHEEP, 392, 25, -145, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_NOK12_Item_SleepySheep) + Return + End }; diff --git a/src/world/area_nok/nok_12/nok_12_4_bridge.c b/src/world/area_nok/nok_12/nok_12_4_bridge.c index c3dd0fdaac7..8c235b4ad5f 100644 --- a/src/world/area_nok/nok_12/nok_12_4_bridge.c +++ b/src/world/area_nok/nok_12/nok_12_4_bridge.c @@ -4,137 +4,137 @@ #include "world/common/EnableCameraLeadingPlayer.inc.c" EvtScript N(EVS_Scene_BuildBridge) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(20) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(N(DisableCameraLeadingPlayer)) - EVT_CALL(InterpCamTargetPos, CAM_DEFAULT, 1, -272, 0, -56, 20) - EVT_WAIT(15) - EVT_CALL(PlaySoundAt, SOUND_NOK_BRIDGE_THUD_1, SOUND_SPACE_DEFAULT, -275, 0, -39) - EVT_CALL(MakeLerp, -320, 0, 15, EASING_QUADRATIC_IN) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_hashi, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(10) - EVT_END_IF - EVT_LOOP(6) - EVT_CALL(TranslateGroup, MODEL_hashi, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(TranslateGroup, MODEL_hashi, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(15) - EVT_CALL(PlaySoundAt, SOUND_NOK_BRIDGE_THUD_2, SOUND_SPACE_DEFAULT, -275, 0, -39) - EVT_CALL(MakeLerp, 0, 90, 10, EASING_QUADRATIC_IN) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o97, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o95, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o94, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o96, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o93, LVar0, -1, 0, 0) - EVT_CALL(TranslateModel, MODEL_o91, 0, -80, 0) - EVT_CALL(TranslateModel, MODEL_o101, 0, -80, 0) - EVT_CALL(TranslateModel, MODEL_o92, 0, -80, 0) - EVT_CALL(TranslateModel, MODEL_o99, 0, -80, 0) - EVT_CALL(TranslateModel, MODEL_o100, 0, -80, 0) - EVT_CALL(RotateModel, MODEL_o91, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o101, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o92, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o99, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o100, LVar0, -1, 0, 0) - EVT_CALL(TranslateModel, MODEL_o91, 0, 80, 0) - EVT_CALL(TranslateModel, MODEL_o101, 0, 80, 0) - EVT_CALL(TranslateModel, MODEL_o92, 0, 80, 0) - EVT_CALL(TranslateModel, MODEL_o99, 0, 80, 0) - EVT_CALL(TranslateModel, MODEL_o100, 0, 80, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(20) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(PlaySoundAt, SOUND_NOK_BRIDGE_THUD_3, SOUND_SPACE_DEFAULT, -275, 0, -39) - EVT_CALL(MakeLerp, 0, 90, 10, EASING_QUADRATIC_IN) - EVT_LABEL(30) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o91, 0, -80, 0) - EVT_CALL(TranslateModel, MODEL_o101, 0, -80, 0) - EVT_CALL(TranslateModel, MODEL_o92, 0, -80, 0) - EVT_CALL(TranslateModel, MODEL_o99, 0, -80, 0) - EVT_CALL(TranslateModel, MODEL_o100, 0, -80, 0) - EVT_CALL(RotateModel, MODEL_o91, 90, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o101, 90, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o92, 90, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o99, 90, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o100, 90, -1, 0, 0) - EVT_CALL(TranslateModel, MODEL_o91, 0, 80, 0) - EVT_CALL(TranslateModel, MODEL_o101, 0, 80, 0) - EVT_CALL(TranslateModel, MODEL_o92, 0, 80, 0) - EVT_CALL(TranslateModel, MODEL_o99, 0, 80, 0) - EVT_CALL(TranslateModel, MODEL_o100, 0, 80, 0) - EVT_CALL(RotateModel, MODEL_o91, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o101, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o92, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o99, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o100, LVar0, -1, 0, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(30) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o204, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) - EVT_WAIT(10) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(InterpCamTargetPos, CAM_DEFAULT, 1, LVar0, LVar1, LVar2, 10) - EVT_CALL(N(EnableCameraLeadingPlayer)) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_SET(GB_StoryProgress, STORY_CH1_MADE_FIRST_BRIDGE) - EVT_CALL(SetGroupVisibility, MODEL_off, MODEL_GROUP_HIDDEN) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Wait(20) + Call(DisablePlayerPhysics, TRUE) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(N(DisableCameraLeadingPlayer)) + Call(InterpCamTargetPos, CAM_DEFAULT, 1, -272, 0, -56, 20) + Wait(15) + Call(PlaySoundAt, SOUND_NOK_BRIDGE_THUD_1, SOUND_SPACE_DEFAULT, -275, 0, -39) + Call(MakeLerp, -320, 0, 15, EASING_QUADRATIC_IN) + Label(10) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_hashi, 0, LVar0, 0) + Wait(1) + IfNe(LVar1, 0) + Goto(10) + EndIf + Loop(6) + Call(TranslateGroup, MODEL_hashi, 0, 3, 0) + Wait(1) + Call(TranslateGroup, MODEL_hashi, 0, 0, 0) + Wait(1) + EndLoop + Wait(15) + Call(PlaySoundAt, SOUND_NOK_BRIDGE_THUD_2, SOUND_SPACE_DEFAULT, -275, 0, -39) + Call(MakeLerp, 0, 90, 10, EASING_QUADRATIC_IN) + Label(20) + Call(UpdateLerp) + Call(RotateModel, MODEL_o97, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_o95, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_o94, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_o96, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_o93, LVar0, -1, 0, 0) + Call(TranslateModel, MODEL_o91, 0, -80, 0) + Call(TranslateModel, MODEL_o101, 0, -80, 0) + Call(TranslateModel, MODEL_o92, 0, -80, 0) + Call(TranslateModel, MODEL_o99, 0, -80, 0) + Call(TranslateModel, MODEL_o100, 0, -80, 0) + Call(RotateModel, MODEL_o91, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_o101, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_o92, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_o99, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_o100, LVar0, -1, 0, 0) + Call(TranslateModel, MODEL_o91, 0, 80, 0) + Call(TranslateModel, MODEL_o101, 0, 80, 0) + Call(TranslateModel, MODEL_o92, 0, 80, 0) + Call(TranslateModel, MODEL_o99, 0, 80, 0) + Call(TranslateModel, MODEL_o100, 0, 80, 0) + Wait(1) + IfNe(LVar1, 0) + Goto(20) + EndIf + Wait(10) + Call(PlaySoundAt, SOUND_NOK_BRIDGE_THUD_3, SOUND_SPACE_DEFAULT, -275, 0, -39) + Call(MakeLerp, 0, 90, 10, EASING_QUADRATIC_IN) + Label(30) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o91, 0, -80, 0) + Call(TranslateModel, MODEL_o101, 0, -80, 0) + Call(TranslateModel, MODEL_o92, 0, -80, 0) + Call(TranslateModel, MODEL_o99, 0, -80, 0) + Call(TranslateModel, MODEL_o100, 0, -80, 0) + Call(RotateModel, MODEL_o91, 90, -1, 0, 0) + Call(RotateModel, MODEL_o101, 90, -1, 0, 0) + Call(RotateModel, MODEL_o92, 90, -1, 0, 0) + Call(RotateModel, MODEL_o99, 90, -1, 0, 0) + Call(RotateModel, MODEL_o100, 90, -1, 0, 0) + Call(TranslateModel, MODEL_o91, 0, 80, 0) + Call(TranslateModel, MODEL_o101, 0, 80, 0) + Call(TranslateModel, MODEL_o92, 0, 80, 0) + Call(TranslateModel, MODEL_o99, 0, 80, 0) + Call(TranslateModel, MODEL_o100, 0, 80, 0) + Call(RotateModel, MODEL_o91, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_o101, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_o92, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_o99, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_o100, LVar0, -1, 0, 0) + Wait(1) + IfNe(LVar1, 0) + Goto(30) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o204, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) + Wait(10) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(InterpCamTargetPos, CAM_DEFAULT, 1, LVar0, LVar1, LVar2, 10) + Call(N(EnableCameraLeadingPlayer)) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Set(GB_StoryProgress, STORY_CH1_MADE_FIRST_BRIDGE) + Call(SetGroupVisibility, MODEL_off, MODEL_GROUP_HIDDEN) + Unbind + Return + End }; EvtScript N(EVS_SetupBridge) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH1_MADE_FIRST_BRIDGE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Scene_BuildBridge)), TRIGGER_AREA_FLAG_SET, AF_NOK12_HitSwitch, 1, 0) - EVT_CALL(TranslateGroup, MODEL_hashi, 0, -320, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o204, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetGroupVisibility, MODEL_off, MODEL_GROUP_HIDDEN) - EVT_CALL(RotateModel, MODEL_o97, 90, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o95, 90, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o94, 90, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o96, 90, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o93, 90, -1, 0, 0) - EVT_CALL(TranslateModel, MODEL_o91, 0, -80, 0) - EVT_CALL(TranslateModel, MODEL_o101, 0, -80, 0) - EVT_CALL(TranslateModel, MODEL_o92, 0, -80, 0) - EVT_CALL(TranslateModel, MODEL_o99, 0, -80, 0) - EVT_CALL(TranslateModel, MODEL_o100, 0, -80, 0) - EVT_CALL(RotateModel, MODEL_o91, 90, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o101, 90, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o92, 90, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o99, 90, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o100, 90, -1, 0, 0) - EVT_CALL(TranslateModel, MODEL_o91, 0, 80, 0) - EVT_CALL(TranslateModel, MODEL_o101, 0, 80, 0) - EVT_CALL(TranslateModel, MODEL_o92, 0, 80, 0) - EVT_CALL(TranslateModel, MODEL_o99, 0, 80, 0) - EVT_CALL(TranslateModel, MODEL_o100, 0, 80, 0) - EVT_CALL(RotateModel, MODEL_o91, 90, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o101, 90, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o92, 90, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o99, 90, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o100, 90, -1, 0, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH1_MADE_FIRST_BRIDGE) + BindTrigger(Ref(N(EVS_Scene_BuildBridge)), TRIGGER_AREA_FLAG_SET, AF_NOK12_HitSwitch, 1, 0) + Call(TranslateGroup, MODEL_hashi, 0, -320, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o204, COLLIDER_FLAGS_UPPER_MASK) + Return + EndIf + Call(SetGroupVisibility, MODEL_off, MODEL_GROUP_HIDDEN) + Call(RotateModel, MODEL_o97, 90, -1, 0, 0) + Call(RotateModel, MODEL_o95, 90, -1, 0, 0) + Call(RotateModel, MODEL_o94, 90, -1, 0, 0) + Call(RotateModel, MODEL_o96, 90, -1, 0, 0) + Call(RotateModel, MODEL_o93, 90, -1, 0, 0) + Call(TranslateModel, MODEL_o91, 0, -80, 0) + Call(TranslateModel, MODEL_o101, 0, -80, 0) + Call(TranslateModel, MODEL_o92, 0, -80, 0) + Call(TranslateModel, MODEL_o99, 0, -80, 0) + Call(TranslateModel, MODEL_o100, 0, -80, 0) + Call(RotateModel, MODEL_o91, 90, -1, 0, 0) + Call(RotateModel, MODEL_o101, 90, -1, 0, 0) + Call(RotateModel, MODEL_o92, 90, -1, 0, 0) + Call(RotateModel, MODEL_o99, 90, -1, 0, 0) + Call(RotateModel, MODEL_o100, 90, -1, 0, 0) + Call(TranslateModel, MODEL_o91, 0, 80, 0) + Call(TranslateModel, MODEL_o101, 0, 80, 0) + Call(TranslateModel, MODEL_o92, 0, 80, 0) + Call(TranslateModel, MODEL_o99, 0, 80, 0) + Call(TranslateModel, MODEL_o100, 0, 80, 0) + Call(RotateModel, MODEL_o91, 90, -1, 0, 0) + Call(RotateModel, MODEL_o101, 90, -1, 0, 0) + Call(RotateModel, MODEL_o92, 90, -1, 0, 0) + Call(RotateModel, MODEL_o99, 90, -1, 0, 0) + Call(RotateModel, MODEL_o100, 90, -1, 0, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; diff --git a/src/world/area_nok/nok_12/nok_12_5_foliage.c b/src/world/area_nok/nok_12/nok_12_5_foliage.c index d1a02dd01ea..c3b847b1c73 100644 --- a/src/world/area_nok/nok_12/nok_12_5_foliage.c +++ b/src/world/area_nok/nok_12/nok_12_5_foliage.c @@ -17,9 +17,9 @@ BombTrigger N(BombPos_Tree1) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o397, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o397, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Return + End }; diff --git a/src/world/area_nok/nok_12/nok_12_6_npc.c b/src/world/area_nok/nok_12/nok_12_6_npc.c index 1edd0d07f6c..e0a4d2d7233 100644 --- a/src/world/area_nok/nok_12/nok_12_6_npc.c +++ b/src/world/area_nok/nok_12/nok_12_6_npc.c @@ -8,91 +8,91 @@ // 'sleep' on top of brick block until it's broken EvtScript N(EVS_NpcIdle_SpikedGoomba) = { - EVT_LABEL(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_SpikedGoomba_Sleep) - EVT_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_AI_FOUND_PLAYER_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, -90, 0, 10, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_SELF, LVar0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetNpcPos, NPC_SELF, LVarA, LVarB, LVarC) - EVT_CALL(MakeLerp, 0, 360, 15, EASING_LINEAR) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.7)) - EVT_CALL(NpcJump0, NPC_SELF, -65, 0, -120, 25) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_SpikedGoomba_Hurt) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_SpikedGoomba_Idle) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_SpikedGoomba_Wander))) - EVT_RETURN - EVT_END + Label(0) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Wait(1) + Goto(0) + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_SpikedGoomba_Sleep) + Thread + Call(PlaySoundAtNpc, NPC_SELF, SOUND_AI_FOUND_PLAYER_JUMP, SOUND_SPACE_DEFAULT) + Call(MakeLerp, -90, 0, 10, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_SELF, LVar0, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(GetNpcPos, NPC_SELF, LVarA, LVarB, LVarC) + Call(MakeLerp, 0, 360, 15, EASING_LINEAR) + Label(2) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_SELF, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(2) + EndIf + Call(SetNpcRotation, NPC_SELF, 0, 0, 0) + EndThread + Call(SetNpcJumpscale, NPC_SELF, Float(0.7)) + Call(NpcJump0, NPC_SELF, -65, 0, -120, 25) + Call(SetNpcAnimation, NPC_SELF, ANIM_SpikedGoomba_Hurt) + Wait(20) + Call(SetNpcAnimation, NPC_SELF, ANIM_SpikedGoomba_Idle) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_SpikedGoomba_Wander))) + Return + End }; EvtScript N(EVS_NpcInit_SpikedGoomba) = { - EVT_CALL(SetNpcPos, NPC_SELF, -165, 86, -118) - EVT_CALL(SetNpcRotation, NPC_SELF, -85, 0, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_SpikedGoomba))) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, -165, 86, -118) + Call(SetNpcRotation, NPC_SELF, -85, 0, 0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_SpikedGoomba))) + Return + End }; EvtScript N(EVS_NpcIdle_KoopaTroopa_02) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_KoopaTroopa_Demo_MissAttack) = { - EVT_WAIT(45) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaTroopa_ShellEnter) - EVT_WAIT(8) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaTroopa_ShellSpin) - EVT_WAIT(6) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 80) - EVT_ADD(LVar2, 100) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, LVar2, 12) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaTroopa_ShellExit) - EVT_WAIT(8) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaTroopa_Idle) - EVT_RETURN - EVT_END + Wait(45) + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaTroopa_ShellEnter) + Wait(8) + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaTroopa_ShellSpin) + Wait(6) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Sub(LVar0, 80) + Add(LVar2, 100) + Call(NpcMoveTo, NPC_SELF, LVar0, LVar2, 12) + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaTroopa_ShellExit) + Wait(8) + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaTroopa_Idle) + Return + End }; EvtScript N(EVS_NpcInit_KoopaTroopa_02) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_GE(LVar0, nok_12_ENTRY_2) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_KoopaTroopa_02))) - EVT_CALL(SetNpcPos, NPC_SELF, 310, 0, -165) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfGe(LVar0, nok_12_ENTRY_2) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_KoopaTroopa_02))) + Call(SetNpcPos, NPC_SELF, 310, 0, -165) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_KoopaTroopa_02_Demo) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_GE(LVar0, nok_12_ENTRY_2) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_KoopaTroopa_Demo_MissAttack))) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfGe(LVar0, nok_12_ENTRY_2) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_KoopaTroopa_Demo_MissAttack))) + EndIf + Return + End }; NpcData N(NpcData_KoopaTroopa_01) = { diff --git a/src/world/area_nok/nok_12/nok_12_7_demo.c b/src/world/area_nok/nok_12/nok_12_7_demo.c index 7139a7cc32d..94733a020ca 100644 --- a/src/world/area_nok/nok_12/nok_12_7_demo.c +++ b/src/world/area_nok/nok_12/nok_12_7_demo.c @@ -4,130 +4,130 @@ #include "world/partners.h" EvtScript N(EVS_ProvideDemoInputs1) = { - EVT_CALL(DemoJoystickXY, 79, -7) - EVT_WAIT(28) - EVT_CALL(DemoSetButtons, BUTTON_A) - EVT_WAIT(18) - EVT_CALL(DemoSetButtons, 0) - EVT_WAIT(11) - EVT_CALL(DemoSetButtons, BUTTON_A) - EVT_WAIT(7) - EVT_CALL(DemoSetButtons, 0) - EVT_WAIT(13) - EVT_CALL(DemoSetButtons, BUTTON_A) - EVT_WAIT(16) - EVT_CALL(DemoSetButtons, 0) - EVT_WAIT(12) - EVT_CALL(DemoSetButtons, BUTTON_A) - EVT_WAIT(14) - EVT_CALL(DemoSetButtons, 0) - EVT_WAIT(10) - EVT_IF_EQ(GF_DemoSceneDone, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_DemoSceneDone, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("nok_12"), nok_12_ENTRY_2, TRANSITION_END_DEMO_SCENE_BLACK) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DemoJoystickXY, 79, -7) + Wait(28) + Call(DemoSetButtons, BUTTON_A) + Wait(18) + Call(DemoSetButtons, 0) + Wait(11) + Call(DemoSetButtons, BUTTON_A) + Wait(7) + Call(DemoSetButtons, 0) + Wait(13) + Call(DemoSetButtons, BUTTON_A) + Wait(16) + Call(DemoSetButtons, 0) + Wait(12) + Call(DemoSetButtons, BUTTON_A) + Wait(14) + Call(DemoSetButtons, 0) + Wait(10) + IfEq(GF_DemoSceneDone, TRUE) + Return + EndIf + Set(GF_DemoSceneDone, TRUE) + Call(GotoMapSpecial, Ref("nok_12"), nok_12_ENTRY_2, TRANSITION_END_DEMO_SCENE_BLACK) + Wait(100) + Return + End }; EvtScript N(EVS_MonitorDemoState1) = { - EVT_WAIT(10) - EVT_LOOP(0) - EVT_CALL(GetDemoState, LVar0) - EVT_IF_EQ(LVar0, DEMO_STATE_CHANGE_MAP) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(GF_DemoSceneDone, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_DemoSceneDone, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("nok_12"), nok_12_ENTRY_2, TRANSITION_END_DEMO_SCENE_WHITE) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Wait(10) + Loop(0) + Call(GetDemoState, LVar0) + IfEq(LVar0, DEMO_STATE_CHANGE_MAP) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(GF_DemoSceneDone, TRUE) + Return + EndIf + Set(GF_DemoSceneDone, TRUE) + Call(GotoMapSpecial, Ref("nok_12"), nok_12_ENTRY_2, TRANSITION_END_DEMO_SCENE_WHITE) + Wait(100) + Return + End }; EvtScript N(EVS_ProvideDemoInputs2) = { - EVT_WAIT(13) - EVT_CALL(DemoSetButtons, BUTTON_B) - EVT_WAIT(3) - EVT_CALL(DemoSetButtons, 0) - EVT_WAIT(160) - EVT_CALL(DemoJoystickXY, 0, 0) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 0, -6) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 1, -11) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 3, -18) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 7, -31) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 12, -42) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 16, -49) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 25, -56) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 36, -60) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 47, -61) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 52, -59) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 55, -52) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 56, -48) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 58, -44) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 61, -41) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 62, -40) - EVT_WAIT(20) - EVT_CALL(DemoJoystickXY, 63, -41) - EVT_WAIT(5) - EVT_CALL(DemoJoystickXY, 64, -41) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 67, -39) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 68, -39) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 68, -39) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 70, 0) - EVT_WAIT(20) - EVT_IF_EQ(GF_DemoSceneDone, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_DemoSceneDone, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("nok_12"), nok_12_ENTRY_2, TRANSITION_END_DEMO_SCENE_BLACK) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Wait(13) + Call(DemoSetButtons, BUTTON_B) + Wait(3) + Call(DemoSetButtons, 0) + Wait(160) + Call(DemoJoystickXY, 0, 0) + Wait(1) + Call(DemoJoystickXY, 0, -6) + Wait(1) + Call(DemoJoystickXY, 1, -11) + Wait(1) + Call(DemoJoystickXY, 3, -18) + Wait(1) + Call(DemoJoystickXY, 7, -31) + Wait(1) + Call(DemoJoystickXY, 12, -42) + Wait(1) + Call(DemoJoystickXY, 16, -49) + Wait(1) + Call(DemoJoystickXY, 25, -56) + Wait(1) + Call(DemoJoystickXY, 36, -60) + Wait(1) + Call(DemoJoystickXY, 47, -61) + Wait(1) + Call(DemoJoystickXY, 52, -59) + Wait(1) + Call(DemoJoystickXY, 55, -52) + Wait(1) + Call(DemoJoystickXY, 56, -48) + Wait(1) + Call(DemoJoystickXY, 58, -44) + Wait(1) + Call(DemoJoystickXY, 61, -41) + Wait(1) + Call(DemoJoystickXY, 62, -40) + Wait(20) + Call(DemoJoystickXY, 63, -41) + Wait(5) + Call(DemoJoystickXY, 64, -41) + Wait(1) + Call(DemoJoystickXY, 67, -39) + Wait(1) + Call(DemoJoystickXY, 68, -39) + Wait(1) + Call(DemoJoystickXY, 68, -39) + Wait(1) + Call(DemoJoystickXY, 70, 0) + Wait(20) + IfEq(GF_DemoSceneDone, TRUE) + Return + EndIf + Set(GF_DemoSceneDone, TRUE) + Call(GotoMapSpecial, Ref("nok_12"), nok_12_ENTRY_2, TRANSITION_END_DEMO_SCENE_BLACK) + Wait(100) + Return + End }; EvtScript N(EVS_MonitorDemoState2) = { - EVT_WAIT(10) - EVT_LOOP(0) - EVT_CALL(GetDemoState, LVar0) - EVT_IF_EQ(LVar0, DEMO_STATE_CHANGE_MAP) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(GF_DemoSceneDone, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_DemoSceneDone, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("nok_12"), nok_12_ENTRY_2, TRANSITION_END_DEMO_SCENE_WHITE) - EVT_WAIT(216) - EVT_RETURN - EVT_END + Wait(10) + Loop(0) + Call(GetDemoState, LVar0) + IfEq(LVar0, DEMO_STATE_CHANGE_MAP) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(GF_DemoSceneDone, TRUE) + Return + EndIf + Set(GF_DemoSceneDone, TRUE) + Call(GotoMapSpecial, Ref("nok_12"), nok_12_ENTRY_2, TRANSITION_END_DEMO_SCENE_WHITE) + Wait(216) + Return + End }; s32 N(DemoInitState1) = 0; @@ -159,12 +159,12 @@ API_CALLABLE(N(SetupDemoScene1)) { EvtScript N(EVS_PlayDemoScene1) = { - EVT_CALL(N(SetupDemoScene1)) - EVT_SET(GF_DemoSceneDone, FALSE) - EVT_EXEC(N(EVS_MonitorDemoState1)) - EVT_EXEC(N(EVS_ProvideDemoInputs1)) - EVT_RETURN - EVT_END + Call(N(SetupDemoScene1)) + Set(GF_DemoSceneDone, FALSE) + Exec(N(EVS_MonitorDemoState1)) + Exec(N(EVS_ProvideDemoInputs1)) + Return + End }; s32 N(DemoInitState2) = 0; @@ -195,10 +195,10 @@ API_CALLABLE(N(SetupDemoScene2)) { } EvtScript N(EVS_PlayDemoScene2) = { - EVT_CALL(N(SetupDemoScene2)) - EVT_SET(GF_DemoSceneDone, FALSE) - EVT_EXEC(N(EVS_MonitorDemoState2)) - EVT_EXEC(N(EVS_ProvideDemoInputs2)) - EVT_RETURN - EVT_END + Call(N(SetupDemoScene2)) + Set(GF_DemoSceneDone, FALSE) + Exec(N(EVS_MonitorDemoState2)) + Exec(N(EVS_ProvideDemoInputs2)) + Return + End }; diff --git a/src/world/area_nok/nok_13/nok_13_1_music.c b/src/world/area_nok/nok_13/nok_13_1_music.c index 336004456a8..c96f6e058be 100644 --- a/src/world/area_nok/nok_13/nok_13_1_music.c +++ b/src/world/area_nok/nok_13/nok_13_1_music.c @@ -1,8 +1,8 @@ #include "nok_13.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) - EVT_CALL(PlaySound, SOUND_LOOP_NOK_WATER) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) + Call(PlaySound, SOUND_LOOP_NOK_WATER) + Return + End }; diff --git a/src/world/area_nok/nok_13/nok_13_2_main.c b/src/world/area_nok/nok_13/nok_13_2_main.c index 9ff08ba84d2..65cec9ee54a 100644 --- a/src/world/area_nok/nok_13/nok_13_2_main.c +++ b/src/world/area_nok/nok_13/nok_13_2_main.c @@ -1,104 +1,104 @@ #include "nok_13.h" EvtScript N(EVS_ExitWalk_nok_12_1) = { - EVT_CALL(UseExitHeading, 60, nok_13_ENTRY_0) - EVT_EXEC(ExitWalk) - EVT_CALL(GotoMap, EVT_PTR("nok_12"), nok_12_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(UseExitHeading, 60, nok_13_ENTRY_0) + Exec(ExitWalk) + Call(GotoMap, Ref("nok_12"), nok_12_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_nok_01_0) = { - EVT_CALL(UseExitHeading, 60, nok_13_ENTRY_1) - EVT_EXEC(ExitWalk) - EVT_CALL(GotoMap, EVT_PTR("nok_01"), nok_01_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(UseExitHeading, 60, nok_13_ENTRY_1) + Exec(ExitWalk) + Call(GotoMap, Ref("nok_01"), nok_01_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_nok_14_0) = { - EVT_CALL(UseExitHeading, 60, nok_13_ENTRY_2) - EVT_EXEC(ExitWalk) - EVT_CALL(GotoMap, EVT_PTR("nok_14"), nok_14_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(UseExitHeading, 60, nok_13_ENTRY_2) + Exec(ExitWalk) + Call(GotoMap, Ref("nok_14"), nok_14_ENTRY_0) + Wait(100) + Return + End }; MAP_RODATA_PAD(1, exits); EvtScript N(EVS_TexPan_Flowers) = { - EVT_CALL(SetTexPanner, MODEL_hana1, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_hana2, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_hanahana, TEX_PANNER_0) - EVT_LABEL(10) - EVT_LOOP(12) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(12) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0x4000, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(10) - EVT_RETURN - EVT_END + Call(SetTexPanner, MODEL_hana1, TEX_PANNER_0) + Call(SetTexPanner, MODEL_hana2, TEX_PANNER_0) + Call(SetTexPanner, MODEL_hanahana, TEX_PANNER_0) + Label(10) + Loop(12) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, 0) + Wait(1) + EndLoop + Loop(12) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0x4000, 0) + Wait(1) + EndLoop + Goto(10) + Return + End }; EvtScript N(EVS_TexPan_Water) = { - EVT_THREAD - EVT_CALL(SetTexPanner, MODEL_suimen1, TEX_PANNER_1) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LABEL(10) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, LVar2) - EVT_SUB(LVar0, 100) - EVT_SUB(LVar1, 400) - EVT_ADD(LVar1, 1000) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_kabemizu1, TEX_PANNER_2) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LABEL(20) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_AUX, LVar1, LVar2) - EVT_SUB(LVar0, 100) - EVT_ADD(LVar1, 800) - EVT_SUB(LVar1, 400) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_RETURN - EVT_END + Thread + Call(SetTexPanner, MODEL_suimen1, TEX_PANNER_1) + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Label(10) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, LVar2) + Sub(LVar0, 100) + Sub(LVar1, 400) + Add(LVar1, 1000) + Wait(1) + Goto(10) + EndThread + Call(SetTexPanner, MODEL_kabemizu1, TEX_PANNER_2) + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Label(20) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar0, 0) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_AUX, LVar1, LVar2) + Sub(LVar0, 100) + Add(LVar1, 800) + Sub(LVar1, 400) + Wait(1) + Goto(20) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_nok_12_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_nok_01_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_nok_14_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_nok_12_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_nok_01_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_nok_14_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PLEASANT_PATH) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_TexPan_Flowers)) - EVT_EXEC(N(EVS_TexPan_Water)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_SetupMusicalHill)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_PLEASANT_PATH) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_TexPan_Flowers)) + Exec(N(EVS_TexPan_Water)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_SetupMusicalHill)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; diff --git a/src/world/area_nok/nok_13/nok_13_3_entity.c b/src/world/area_nok/nok_13/nok_13_3_entity.c index 7748314c44d..f4f97a92e1f 100644 --- a/src/world/area_nok/nok_13/nok_13_3_entity.c +++ b/src/world/area_nok/nok_13/nok_13_3_entity.c @@ -3,66 +3,66 @@ #include "effects.h" EvtScript N(EVS_BreakBlock_First) = { - EVT_IF_EQ(AB_NOK_1, 0) - EVT_SET(AB_NOK_1, 1) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(AB_NOK_1, 0) + Set(AB_NOK_1, 1) + EndIf + Return + End }; EvtScript N(EVS_BreakBlock_Second) = { - EVT_IF_EQ(AB_NOK_1, 1) - EVT_SET(AB_NOK_1, 2) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(AB_NOK_1, 1) + Set(AB_NOK_1, 2) + EndIf + Return + End }; EvtScript N(EVS_BreakBlock_Third) = { - EVT_IF_EQ(AB_NOK_1, 2) - EVT_CALL(PlaySound, SOUND_CHIME_SOLVED_PUZZLE) - EVT_CALL(PlaySoundAt, SOUND_SPAWN_BLOCK, SOUND_SPACE_DEFAULT, 40, 60, -285) - EVT_SET(AB_NOK_1, 3) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, 40, 73, -285, 10) - EVT_CALL(MakeEntity, EVT_PTR(Entity_RedBlock), 40, 60, -285, 90, ITEM_ATTACK_FX_B, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_NOK13_BadgeBlock_AttackFXB) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(AB_NOK_1, 2) + Call(PlaySound, SOUND_CHIME_SOLVED_PUZZLE) + Call(PlaySoundAt, SOUND_SPAWN_BLOCK, SOUND_SPACE_DEFAULT, 40, 60, -285) + Set(AB_NOK_1, 3) + PlayEffect(EFFECT_SPARKLES, 0, 40, 73, -285, 10) + Call(MakeEntity, Ref(Entity_RedBlock), 40, 60, -285, 90, ITEM_ATTACK_FX_B, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_NOK13_BadgeBlock_AttackFXB) + EndIf + Return + End }; EvtScript N(EVS_ReadSign_Directions) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0178, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_0178, 160, 40) + Call(DisablePlayerInput, FALSE) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Signpost), -430, 150, -75, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_ReadSign_Directions))) - EVT_IF_EQ(GF_NOK13_BadgeBlock_AttackFXB, FALSE) - EVT_SET(AB_NOK_1, 0) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 70, 0, -250, 90, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_BreakBlock_First))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 70, 0, -320, 90, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_BreakBlock_Second))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), -10, 0, -285, 90, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_BreakBlock_Third))) - EVT_ELSE - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 70, 0, -250, 90, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 70, 0, -320, 90, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), -10, 0, -285, 90, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_RedBlock), 40, 60, -285, 90, ITEM_ATTACK_FX_B, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_NOK13_BadgeBlock_AttackFXB) - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), -255, 150, -100, 90, MODEL_jimen_u, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_NOK13_HiddenPanel) - EVT_CALL(MakeItemEntity, ITEM_HONEY_SYRUP, -155, 150, -130, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_NOK13_Item_HoneySyrup) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Signpost), -430, 150, -75, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_ReadSign_Directions))) + IfEq(GF_NOK13_BadgeBlock_AttackFXB, FALSE) + Set(AB_NOK_1, 0) + Call(MakeEntity, Ref(Entity_BrickBlock), 70, 0, -250, 90, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_BreakBlock_First))) + Call(MakeEntity, Ref(Entity_BrickBlock), 70, 0, -320, 90, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_BreakBlock_Second))) + Call(MakeEntity, Ref(Entity_BrickBlock), -10, 0, -285, 90, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_BreakBlock_Third))) + Else + Call(MakeEntity, Ref(Entity_BrickBlock), 70, 0, -250, 90, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), 70, 0, -320, 90, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), -10, 0, -285, 90, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_RedBlock), 40, 60, -285, 90, ITEM_ATTACK_FX_B, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_NOK13_BadgeBlock_AttackFXB) + EndIf + Call(MakeEntity, Ref(Entity_HiddenPanel), -255, 150, -100, 90, MODEL_jimen_u, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_NOK13_HiddenPanel) + Call(MakeItemEntity, ITEM_HONEY_SYRUP, -155, 150, -130, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_NOK13_Item_HoneySyrup) + Return + End }; diff --git a/src/world/area_nok/nok_13/nok_13_5.c b/src/world/area_nok/nok_13/nok_13_5.c index 1e996c3b731..15670f2be15 100644 --- a/src/world/area_nok/nok_13/nok_13_5.c +++ b/src/world/area_nok/nok_13/nok_13_5.c @@ -11,20 +11,20 @@ API_CALLABLE(N(GetAngleToPlayer)) { } EvtScript N(EVS_RotateHillTowardPlayer) = { - EVT_LABEL(0) - EVT_CALL(N(GetAngleToPlayer), LVar0) - EVT_ADD(LVar0, 180) - EVT_CALL(RotateModel, MODEL_o363, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(N(GetAngleToPlayer), LVar0) + Add(LVar0, 180) + Call(RotateModel, MODEL_o363, LVar0, 0, -1, 0) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_PlaySong) = { - EVT_CALL(SetMusicTrack, 0, LVar0, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, LVar0, 0, 8) + Return + End }; void N(musical_hill_orbit_listener)(PlayerOrbitState* orbit, s32 event) { @@ -57,8 +57,8 @@ PlayerOrbitTarget N(RunAroundTarget) = { }; EvtScript N(EVS_SetupMusicalHill) = { - EVT_EXEC(N(EVS_RotateHillTowardPlayer)) - EVT_CALL(N(MonitorPlayerOrbiting), EVT_PTR(N(RunAroundTarget))) - EVT_RETURN - EVT_END + Exec(N(EVS_RotateHillTowardPlayer)) + Call(N(MonitorPlayerOrbiting), Ref(N(RunAroundTarget))) + Return + End }; diff --git a/src/world/area_nok/nok_14/nok_14_1_music.c b/src/world/area_nok/nok_14/nok_14_1_music.c index 437216a7fd4..41b85f59660 100644 --- a/src/world/area_nok/nok_14/nok_14_1_music.c +++ b/src/world/area_nok/nok_14/nok_14_1_music.c @@ -1,8 +1,8 @@ #include "nok_14.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) - EVT_CALL(PlaySound, SOUND_LOOP_NOK_WATER) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) + Call(PlaySound, SOUND_LOOP_NOK_WATER) + Return + End }; diff --git a/src/world/area_nok/nok_14/nok_14_2_main.c b/src/world/area_nok/nok_14/nok_14_2_main.c index c04424e0459..612b333a7ad 100644 --- a/src/world/area_nok/nok_14/nok_14_2_main.c +++ b/src/world/area_nok/nok_14/nok_14_2_main.c @@ -29,101 +29,101 @@ EvtScript N(EVS_ExitWalk_nok_13_2) = EVT_EXIT_WALK_NOK(60, nok_14_ENTRY_0, "nok_ EvtScript N(EVS_ExitWalk_nok_15_0) = EVT_EXIT_WALK_NOK(60, nok_14_ENTRY_1, "nok_15", nok_15_ENTRY_0); EvtScript N(EVS_TexPan_Flowers) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, MODEL_hana1, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_hana3, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_hana4, TEX_PANNER_0) - EVT_LABEL(10) - EVT_LOOP(12) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(12) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0x00004000, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(10) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, MODEL_hana1, TEX_PANNER_0) + Call(SetTexPanner, MODEL_hana3, TEX_PANNER_0) + Call(SetTexPanner, MODEL_hana4, TEX_PANNER_0) + Label(10) + Loop(12) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, 0) + Wait(1) + EndLoop + Loop(12) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0x00004000, 0) + Wait(1) + EndLoop + Goto(10) + Return + End }; EvtScript N(EVS_TexPan_Water) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_THREAD - EVT_CALL(SetTexPanner, MODEL_suimen1, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_suimen2, TEX_PANNER_1) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LABEL(10) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, LVar2) - EVT_SUB(LVar0, 100) - EVT_SUB(LVar1, 400) - EVT_ADD(LVar1, 1000) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetTexPanner, MODEL_kabemizu1, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_kabemizu2, TEX_PANNER_2) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LABEL(20) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_AUX, LVar1, LVar2) - EVT_SUB(LVar0, 100) - EVT_ADD(LVar1, 800) - EVT_SUB(LVar2, 400) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_taki1, TEX_PANNER_3) - EVT_SET(LVar0, 0) - EVT_LABEL(30) - EVT_CALL(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, 0, LVar0) - EVT_SUB(LVar0, 1000) - EVT_WAIT(1) - EVT_GOTO(30) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Thread + Call(SetTexPanner, MODEL_suimen1, TEX_PANNER_1) + Call(SetTexPanner, MODEL_suimen2, TEX_PANNER_1) + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Label(10) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, LVar2) + Sub(LVar0, 100) + Sub(LVar1, 400) + Add(LVar1, 1000) + Wait(1) + Goto(10) + EndThread + Thread + Call(SetTexPanner, MODEL_kabemizu1, TEX_PANNER_2) + Call(SetTexPanner, MODEL_kabemizu2, TEX_PANNER_2) + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Label(20) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar0, 0) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_AUX, LVar1, LVar2) + Sub(LVar0, 100) + Add(LVar1, 800) + Sub(LVar2, 400) + Wait(1) + Goto(20) + EndThread + Call(SetTexPanner, MODEL_taki1, TEX_PANNER_3) + Set(LVar0, 0) + Label(30) + Call(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, 0, LVar0) + Sub(LVar0, 1000) + Wait(1) + Goto(30) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_nok_13_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_nok_15_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_nok_13_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_nok_15_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + Return + End }; EvtScript N(EVS_UpdateEnounterStages) = { - EVT_LABEL(0) - EVT_IF_GE(GB_StoryProgress, STORY_CH1_MADE_SECOND_BRIDGE) - EVT_CALL(N(UpdateEnounterStages), -115, 110, -110, 999, BTL_NOK_STAGE_00, BTL_NOK_STAGE_02) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + IfGe(GB_StoryProgress, STORY_CH1_MADE_SECOND_BRIDGE) + Call(N(UpdateEnounterStages), -115, 110, -110, 999, BTL_NOK_STAGE_00, BTL_NOK_STAGE_02) + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PLEASANT_PATH) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_TexPan_Flowers)) - EVT_EXEC(N(EVS_TexPan_Water)) - EVT_EXEC(N(EVS_SetupBridge)) - EVT_EXEC(N(EVS_UpdateEnounterStages)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit2, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_PLEASANT_PATH) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_TexPan_Flowers)) + Exec(N(EVS_TexPan_Water)) + Exec(N(EVS_SetupBridge)) + Exec(N(EVS_UpdateEnounterStages)) + Exec(N(EVS_SetupMusic)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit2, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; diff --git a/src/world/area_nok/nok_14/nok_14_3_entity.c b/src/world/area_nok/nok_14/nok_14_3_entity.c index 18c1f35b6cd..4d13c630052 100644 --- a/src/world/area_nok/nok_14/nok_14_3_entity.c +++ b/src/world/area_nok/nok_14/nok_14_3_entity.c @@ -2,72 +2,72 @@ #include "entity.h" EvtScript N(EVS_ReadSign_NoEntry) = { - EVT_CALL(IsStartingConversation, LVar0) - EVT_IF_EQ(LVar0, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0179, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END + Call(IsStartingConversation, LVar0) + IfEq(LVar0, TRUE) + Return + EndIf + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_0179, 160, 40) + Call(DisablePlayerInput, FALSE) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + End }; EvtScript N(EVS_BreakBlock_ThunderBolt) = { - EVT_IF_EQ(GF_NOK14_Item_ThunderBolt, TRUE) - EVT_RETURN - EVT_END_IF - EVT_THREAD - EVT_CALL(DisablePlayerInput, TRUE) - EVT_LOOP(25) - EVT_WAIT(1) - EVT_CALL(GetNpcPos, NPC_KoopaTroopa_02, LVar0, LVar1, LVar2) - EVT_CALL(SetItemPos, MV_Item_ThunderBolt, LVar0, LVar1, LVar2) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_KoopaTroopa_02, NPC_DISPOSE_LOCATION) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_THREAD - EVT_CALL(SetNpcPos, NPC_KoopaTroopa_02, -345, 75, -117) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_KoopaTroopa_02, EVT_FLOAT(1.5)) - EVT_IF_LE(LVar0, -345) - EVT_CALL(NpcJump0, NPC_KoopaTroopa_02, -280, 0, -112, 20) - EVT_ELSE - EVT_CALL(NpcJump0, NPC_KoopaTroopa_02, -410, 0, -112, 20) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_NOK14_Item_ThunderBolt, TRUE) + Return + EndIf + Thread + Call(DisablePlayerInput, TRUE) + Loop(25) + Wait(1) + Call(GetNpcPos, NPC_KoopaTroopa_02, LVar0, LVar1, LVar2) + Call(SetItemPos, MV_Item_ThunderBolt, LVar0, LVar1, LVar2) + EndLoop + Call(SetNpcPos, NPC_KoopaTroopa_02, NPC_DISPOSE_LOCATION) + Call(DisablePlayerInput, FALSE) + EndThread + Call(SetNpcPos, NPC_KoopaTroopa_02, -345, 75, -117) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_KoopaTroopa_02, Float(1.5)) + IfLe(LVar0, -345) + Call(NpcJump0, NPC_KoopaTroopa_02, -280, 0, -112, 20) + Else + Call(NpcJump0, NPC_KoopaTroopa_02, -410, 0, -112, 20) + EndIf + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Signpost), -150, 0, -175, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_ReadSign_NoEntry))) - EVT_SET(LVar0, 1) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_MADE_SECOND_BRIDGE) - EVT_SET(LVar0, 0) - EVT_END_IF - EVT_IF_EQ(LVar0, 0) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueSwitch), 100, 0, -185, 0, MAKE_ENTITY_END) - EVT_CALL(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_NOK14_HitSwitch)) - EVT_END_IF - EVT_CALL(MakeItemEntity, ITEM_COIN, -655, 75, -35, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_NOK14_Item_CoinA) - EVT_CALL(MakeItemEntity, ITEM_COIN, -640, 75, -20, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_NOK14_Item_CoinB) - EVT_CALL(MakeItemEntity, ITEM_COIN, -640, 75, -50, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_NOK14_Item_CoinC) - EVT_CALL(MakeItemEntity, ITEM_COIN, -670, 75, -20, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_NOK14_Item_CoinD) - EVT_CALL(MakeItemEntity, ITEM_COIN, -670, 75, -50, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_NOK14_Item_CoinE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), -345, 77, -117, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_BreakBlock_ThunderBolt))) - EVT_CALL(MakeItemEntity, ITEM_THUNDER_BOLT, -345, 102, -117, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_NOK14_Item_ThunderBolt) - EVT_SET(MV_Item_ThunderBolt, LVar0) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 200, 60, -160, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 250, 60, -160, 0, ITEM_FIRE_FLOWER, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_NOK14_HiddenItem_FireFlower) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 300, 60, -160, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), -650, 75, -50, 0, MODEL_o251, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_NOK14_HiddenPanel) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Signpost), -150, 0, -175, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_ReadSign_NoEntry))) + Set(LVar0, 1) + IfLt(GB_StoryProgress, STORY_CH1_MADE_SECOND_BRIDGE) + Set(LVar0, 0) + EndIf + IfEq(LVar0, 0) + Call(MakeEntity, Ref(Entity_BlueSwitch), 100, 0, -185, 0, MAKE_ENTITY_END) + Call(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_NOK14_HitSwitch)) + EndIf + Call(MakeItemEntity, ITEM_COIN, -655, 75, -35, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_NOK14_Item_CoinA) + Call(MakeItemEntity, ITEM_COIN, -640, 75, -20, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_NOK14_Item_CoinB) + Call(MakeItemEntity, ITEM_COIN, -640, 75, -50, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_NOK14_Item_CoinC) + Call(MakeItemEntity, ITEM_COIN, -670, 75, -20, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_NOK14_Item_CoinD) + Call(MakeItemEntity, ITEM_COIN, -670, 75, -50, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_NOK14_Item_CoinE) + Call(MakeEntity, Ref(Entity_BrickBlock), -345, 77, -117, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_BreakBlock_ThunderBolt))) + Call(MakeItemEntity, ITEM_THUNDER_BOLT, -345, 102, -117, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_NOK14_Item_ThunderBolt) + Set(MV_Item_ThunderBolt, LVar0) + Call(MakeEntity, Ref(Entity_BrickBlock), 200, 60, -160, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 250, 60, -160, 0, ITEM_FIRE_FLOWER, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_NOK14_HiddenItem_FireFlower) + Call(MakeEntity, Ref(Entity_BrickBlock), 300, 60, -160, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HiddenPanel), -650, 75, -50, 0, MODEL_o251, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_NOK14_HiddenPanel) + Return + End }; diff --git a/src/world/area_nok/nok_14/nok_14_4_bridge.c b/src/world/area_nok/nok_14/nok_14_4_bridge.c index 696a17cce4e..d3cfe61bf95 100644 --- a/src/world/area_nok/nok_14/nok_14_4_bridge.c +++ b/src/world/area_nok/nok_14/nok_14_4_bridge.c @@ -4,147 +4,147 @@ #include "world/common/EnableCameraLeadingPlayer.inc.c" EvtScript N(EVS_Scene_BuildBridge) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(10) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(N(DisableCameraLeadingPlayer)) - EVT_CALL(InterpCamTargetPos, CAM_DEFAULT, TRUE, 3, 0, -60, 20) - EVT_WAIT(10) - EVT_SET(GB_StoryProgress, STORY_CH1_MADE_SECOND_BRIDGE) - EVT_CALL(PlaySoundAt, SOUND_NOK_BRIDGE_THUD_1, SOUND_SPACE_DEFAULT, 0, 0, -60) - EVT_CALL(MakeLerp, -200, 0, 15, EASING_COS_IN) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_hashi, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(10) - EVT_END_IF - EVT_LOOP(6) - EVT_CALL(TranslateGroup, MODEL_hashi, 0, 3, 0) - EVT_WAIT(1) - EVT_CALL(TranslateGroup, MODEL_hashi, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(15) - EVT_CALL(PlaySoundAt, SOUND_NOK_BRIDGE_XYLOPHONE_1, SOUND_SPACE_DEFAULT, -84, 0, -60) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 90, 8, EASING_COS_IN_OUT) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_ita11, LVar0, -1, 0, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(20) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(3) - EVT_CALL(PlaySoundAt, SOUND_NOK_BRIDGE_XYLOPHONE_2, SOUND_SPACE_DEFAULT, -56, 0, -60) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 90, 8, EASING_LINEAR) - EVT_LABEL(24) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_ita22, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(24) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(3) - EVT_CALL(PlaySoundAt, SOUND_NOK_BRIDGE_XYLOPHONE_3, SOUND_SPACE_DEFAULT, -28, 0, -60) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 90, 8, EASING_LINEAR) - EVT_LABEL(21) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_ita33, LVar0, -1, 0, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(21) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(3) - EVT_CALL(PlaySoundAt, SOUND_NOK_BRIDGE_XYLOPHONE_4, SOUND_SPACE_DEFAULT, 0, 0, -60) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 90, 8, EASING_LINEAR) - EVT_LABEL(25) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_ita44, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(25) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(3) - EVT_CALL(PlaySoundAt, SOUND_NOK_BRIDGE_XYLOPHONE_5, SOUND_SPACE_DEFAULT, 28, 0, -60) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 90, 8, EASING_LINEAR) - EVT_LABEL(22) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_ita55, LVar0, -1, 0, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(22) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(3) - EVT_CALL(PlaySoundAt, SOUND_NOK_BRIDGE_XYLOPHONE_6, SOUND_SPACE_DEFAULT, 56, 0, -60) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 90, 8, EASING_LINEAR) - EVT_LABEL(26) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_ita66, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(26) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(3) - EVT_CALL(PlaySoundAt, SOUND_NOK_BRIDGE_XYLOPHONE_7, SOUND_SPACE_DEFAULT, 84, 0, -60) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 90, 8, EASING_LINEAR) - EVT_LABEL(23) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_ita77, LVar0, -1, 0, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(23) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o255, COLLIDER_FLAGS_UPPER_MASK) - EVT_WAIT(20) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(InterpCamTargetPos, CAM_DEFAULT, TRUE, LVar0, LVar1, LVar2, 10) - EVT_CALL(N(EnableCameraLeadingPlayer)) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_UNBIND - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(DisablePlayerInput, TRUE) + Wait(10) + Call(DisablePlayerPhysics, TRUE) + Call(N(DisableCameraLeadingPlayer)) + Call(InterpCamTargetPos, CAM_DEFAULT, TRUE, 3, 0, -60, 20) + Wait(10) + Set(GB_StoryProgress, STORY_CH1_MADE_SECOND_BRIDGE) + Call(PlaySoundAt, SOUND_NOK_BRIDGE_THUD_1, SOUND_SPACE_DEFAULT, 0, 0, -60) + Call(MakeLerp, -200, 0, 15, EASING_COS_IN) + Label(10) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_hashi, 0, LVar0, 0) + Wait(1) + IfNe(LVar1, 0) + Goto(10) + EndIf + Loop(6) + Call(TranslateGroup, MODEL_hashi, 0, 3, 0) + Wait(1) + Call(TranslateGroup, MODEL_hashi, 0, 0, 0) + Wait(1) + EndLoop + Wait(15) + Call(PlaySoundAt, SOUND_NOK_BRIDGE_XYLOPHONE_1, SOUND_SPACE_DEFAULT, -84, 0, -60) + Thread + Call(MakeLerp, 0, 90, 8, EASING_COS_IN_OUT) + Label(20) + Call(UpdateLerp) + Call(RotateModel, MODEL_ita11, LVar0, -1, 0, 0) + Wait(1) + IfNe(LVar1, 0) + Goto(20) + EndIf + EndThread + Wait(3) + Call(PlaySoundAt, SOUND_NOK_BRIDGE_XYLOPHONE_2, SOUND_SPACE_DEFAULT, -56, 0, -60) + Thread + Call(MakeLerp, 0, 90, 8, EASING_LINEAR) + Label(24) + Call(UpdateLerp) + Call(RotateModel, MODEL_ita22, LVar0, 1, 0, 0) + Wait(1) + IfNe(LVar1, 0) + Goto(24) + EndIf + EndThread + Wait(3) + Call(PlaySoundAt, SOUND_NOK_BRIDGE_XYLOPHONE_3, SOUND_SPACE_DEFAULT, -28, 0, -60) + Thread + Call(MakeLerp, 0, 90, 8, EASING_LINEAR) + Label(21) + Call(UpdateLerp) + Call(RotateModel, MODEL_ita33, LVar0, -1, 0, 0) + Wait(1) + IfNe(LVar1, 0) + Goto(21) + EndIf + EndThread + Wait(3) + Call(PlaySoundAt, SOUND_NOK_BRIDGE_XYLOPHONE_4, SOUND_SPACE_DEFAULT, 0, 0, -60) + Thread + Call(MakeLerp, 0, 90, 8, EASING_LINEAR) + Label(25) + Call(UpdateLerp) + Call(RotateModel, MODEL_ita44, LVar0, 1, 0, 0) + Wait(1) + IfNe(LVar1, 0) + Goto(25) + EndIf + EndThread + Wait(3) + Call(PlaySoundAt, SOUND_NOK_BRIDGE_XYLOPHONE_5, SOUND_SPACE_DEFAULT, 28, 0, -60) + Thread + Call(MakeLerp, 0, 90, 8, EASING_LINEAR) + Label(22) + Call(UpdateLerp) + Call(RotateModel, MODEL_ita55, LVar0, -1, 0, 0) + Wait(1) + IfNe(LVar1, 0) + Goto(22) + EndIf + EndThread + Wait(3) + Call(PlaySoundAt, SOUND_NOK_BRIDGE_XYLOPHONE_6, SOUND_SPACE_DEFAULT, 56, 0, -60) + Thread + Call(MakeLerp, 0, 90, 8, EASING_LINEAR) + Label(26) + Call(UpdateLerp) + Call(RotateModel, MODEL_ita66, LVar0, 1, 0, 0) + Wait(1) + IfNe(LVar1, 0) + Goto(26) + EndIf + EndThread + Wait(3) + Call(PlaySoundAt, SOUND_NOK_BRIDGE_XYLOPHONE_7, SOUND_SPACE_DEFAULT, 84, 0, -60) + Thread + Call(MakeLerp, 0, 90, 8, EASING_LINEAR) + Label(23) + Call(UpdateLerp) + Call(RotateModel, MODEL_ita77, LVar0, -1, 0, 0) + Wait(1) + IfNe(LVar1, 0) + Goto(23) + EndIf + EndThread + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o255, COLLIDER_FLAGS_UPPER_MASK) + Wait(20) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(InterpCamTargetPos, CAM_DEFAULT, TRUE, LVar0, LVar1, LVar2, 10) + Call(N(EnableCameraLeadingPlayer)) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Unbind + Return + End }; EvtScript N(EVS_SetupBridge) = { - EVT_SET(LVar0, 1) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_MADE_SECOND_BRIDGE) - EVT_SET(LVar0, 0) - EVT_END_IF - EVT_IF_EQ(LVar0, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Scene_BuildBridge)), TRIGGER_AREA_FLAG_SET, AF_NOK14_HitSwitch, 1, 0) - EVT_CALL(TranslateGroup, MODEL_hashi, 0, -200, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o255, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END_IF - EVT_CALL(RotateModel, MODEL_ita11, 90, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_ita33, 90, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_ita55, 90, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_ita77, 90, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_ita22, 90, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_ita44, 90, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_ita66, 90, 1, 0, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Set(LVar0, 1) + IfLt(GB_StoryProgress, STORY_CH1_MADE_SECOND_BRIDGE) + Set(LVar0, 0) + EndIf + IfEq(LVar0, 0) + BindTrigger(Ref(N(EVS_Scene_BuildBridge)), TRIGGER_AREA_FLAG_SET, AF_NOK14_HitSwitch, 1, 0) + Call(TranslateGroup, MODEL_hashi, 0, -200, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o255, COLLIDER_FLAGS_UPPER_MASK) + Return + EndIf + Call(RotateModel, MODEL_ita11, 90, -1, 0, 0) + Call(RotateModel, MODEL_ita33, 90, -1, 0, 0) + Call(RotateModel, MODEL_ita55, 90, -1, 0, 0) + Call(RotateModel, MODEL_ita77, 90, -1, 0, 0) + Call(RotateModel, MODEL_ita22, 90, 1, 0, 0) + Call(RotateModel, MODEL_ita44, 90, 1, 0, 0) + Call(RotateModel, MODEL_ita66, 90, 1, 0, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; diff --git a/src/world/area_nok/nok_14/nok_14_5_npc.c b/src/world/area_nok/nok_14/nok_14_5_npc.c index 498fb5bd143..7d54b0de13e 100644 --- a/src/world/area_nok/nok_14/nok_14_5_npc.c +++ b/src/world/area_nok/nok_14/nok_14_5_npc.c @@ -6,50 +6,50 @@ #include "world/common/enemy/KoopaTroopa_Stationary.inc.c" EvtScript N(EVS_NpcIdle_KoopaTroopa_01) = { - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(AwaitPlayerApproach, -650, -35, 100) - EVT_CALL(PlaySoundAt, SOUND_SEARCH_BUSH, SOUND_SPACE_DEFAULT, -650, 75, -120) - EVT_THREAD - EVT_LOOP(5) - EVT_CALL(TranslateModel, MODEL_o122, 2, 0, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, MODEL_o122, -2, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(5) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_CAMERA_FOR_YAW | NPC_FLAG_200000, TRUE) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 360, 20, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.6)) - EVT_CALL(NpcJump0, NPC_SELF, -650, 75, -30, 20) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_CAMERA_FOR_YAW | NPC_FLAG_200000, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_KoopaTroopa_Wander))) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(AwaitPlayerApproach, -650, -35, 100) + Call(PlaySoundAt, SOUND_SEARCH_BUSH, SOUND_SPACE_DEFAULT, -650, 75, -120) + Thread + Loop(5) + Call(TranslateModel, MODEL_o122, 2, 0, 0) + Wait(1) + Call(TranslateModel, MODEL_o122, -2, 0, 0) + Wait(1) + EndLoop + EndThread + Wait(5) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_CAMERA_FOR_YAW | NPC_FLAG_200000, TRUE) + Thread + Call(MakeLerp, 0, 360, 20, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_SELF, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + EndThread + Call(SetNpcJumpscale, NPC_SELF, Float(0.6)) + Call(NpcJump0, NPC_SELF, -650, 75, -30, 20) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_CAMERA_FOR_YAW | NPC_FLAG_200000, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_KoopaTroopa_Wander))) + Return + End }; EvtScript N(EVS_NpcInit_KoopaTroopa_01) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, -650, 75, -150) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_KoopaTroopa_01))) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcPos, NPC_SELF, -650, 75, -150) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_KoopaTroopa_01))) + Return + End }; EvtScript N(EVS_NpcInit_KoopaTroopa_02) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE) + Return + End }; NpcData N(NpcData_KoopaTroopa_01) = { diff --git a/src/world/area_nok/nok_15/nok_15_1_music.c b/src/world/area_nok/nok_15/nok_15_1_music.c index dd85f814486..307d47c9b84 100644 --- a/src/world/area_nok/nok_15/nok_15_1_music.c +++ b/src/world/area_nok/nok_15/nok_15_1_music.c @@ -1,8 +1,8 @@ #include "nok_15.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) - EVT_CALL(PlaySound, SOUND_LOOP_NOK_WATER) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) + Call(PlaySound, SOUND_LOOP_NOK_WATER) + Return + End }; diff --git a/src/world/area_nok/nok_15/nok_15_2_main.c b/src/world/area_nok/nok_15/nok_15_2_main.c index 437562e8f70..3af5b598a56 100644 --- a/src/world/area_nok/nok_15/nok_15_2_main.c +++ b/src/world/area_nok/nok_15/nok_15_2_main.c @@ -13,113 +13,113 @@ BombTrigger N(BombPos_Wall) = { }; EvtScript N(EVS_BlastWall) = { - EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 0, 60, 61, 1, 10, 30) - EVT_SET(GF_NOK15_BombedWall, TRUE) - EVT_CALL(EnableModel, MODEL_bomb_ato, TRUE) - EVT_CALL(EnableModel, MODEL_bomb_1, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) - EVT_UNBIND - EVT_RETURN - EVT_END + PlayEffect(EFFECT_BOMBETTE_BREAKING, 0, 60, 61, 1, 10, 30) + Set(GF_NOK15_BombedWall, TRUE) + Call(EnableModel, MODEL_bomb_ato, TRUE) + Call(EnableModel, MODEL_bomb_1, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) + Unbind + Return + End }; EvtScript N(EVS_TexPan_Water) = { - EVT_THREAD - EVT_CALL(SetTexPanner, MODEL_suimen1, TEX_PANNER_1) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LABEL(10) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, LVar2) - EVT_SUB(LVar0, 100) - EVT_SUB(LVar1, 400) - EVT_ADD(LVar1, 1000) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_kabemizu1, TEX_PANNER_2) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LABEL(20) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_AUX, LVar1, LVar2) - EVT_SUB(LVar0, 100) - EVT_ADD(LVar1, 800) - EVT_SUB(LVar2, 400) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_RETURN - EVT_END + Thread + Call(SetTexPanner, MODEL_suimen1, TEX_PANNER_1) + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Label(10) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, LVar2) + Sub(LVar0, 100) + Sub(LVar1, 400) + Add(LVar1, 1000) + Wait(1) + Goto(10) + EndThread + Call(SetTexPanner, MODEL_kabemizu1, TEX_PANNER_2) + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Label(20) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar0, 0) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_AUX, LVar1, LVar2) + Sub(LVar0, 100) + Add(LVar1, 800) + Sub(LVar2, 400) + Wait(1) + Goto(20) + Return + End }; EvtScript N(EVS_GotoMap_nok_15_4) = { - EVT_CALL(GotoMap, EVT_PTR("nok_15"), nok_15_ENTRY_4) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("nok_15"), nok_15_ENTRY_4) + Wait(100) + Return + End }; EvtScript N(EVS_GotoMap_nok_15_3) = { - EVT_CALL(GotoMap, EVT_PTR("nok_15"), nok_15_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("nok_15"), nok_15_ENTRY_3) + Wait(100) + Return + End }; MAP_RODATA_PAD(1, exits); EvtScript N(EVS_ExitPipe) = { - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_EXEC_WAIT(N(EVS_Pipe_ExitVertical)) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Set(LVarB, LVar1) + Set(LVarC, LVar2) + ExecWait(N(EVS_Pipe_ExitVertical)) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_nok_14_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_trd_00_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_trd_00_4)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) - EVT_SET(LVar0, nok_15_ENTRY_3) - EVT_SET(LVar1, COLLIDER_o680) - EVT_SET(LVar2, EVT_PTR(N(EVS_GotoMap_nok_15_4))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitPipe)), TRIGGER_FLOOR_TOUCH, LVar1, 1, 0) - EVT_SET(LVar0, nok_15_ENTRY_4) - EVT_SET(LVar1, COLLIDER_o679) - EVT_SET(LVar2, EVT_PTR(N(EVS_GotoMap_nok_15_3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitPipe)), TRIGGER_FLOOR_TOUCH, LVar1, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_nok_14_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_trd_00_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_trd_00_4)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) + Set(LVar0, nok_15_ENTRY_3) + Set(LVar1, COLLIDER_o680) + Set(LVar2, Ref(N(EVS_GotoMap_nok_15_4))) + BindTrigger(Ref(N(EVS_ExitPipe)), TRIGGER_FLOOR_TOUCH, LVar1, 1, 0) + Set(LVar0, nok_15_ENTRY_4) + Set(LVar1, COLLIDER_o679) + Set(LVar2, Ref(N(EVS_GotoMap_nok_15_3))) + BindTrigger(Ref(N(EVS_ExitPipe)), TRIGGER_FLOOR_TOUCH, LVar1, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PLEASANT_PATH) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_EXEC(N(EVS_TexPan_Water)) - EVT_IF_EQ(GF_NOK15_BombedWall, FALSE) - EVT_CALL(EnableModel, MODEL_bomb_ato, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BlastWall)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Wall)), 1, 0) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_bomb_1, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_LE(LVar0, nok_15_ENTRY_2) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_ELSE - EVT_SET(LVarA, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(N(EVS_Pipe_EnterVertical)) - EVT_END_IF - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_PLEASANT_PATH) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupFoliage)) + Exec(N(EVS_TexPan_Water)) + IfEq(GF_NOK15_BombedWall, FALSE) + Call(EnableModel, MODEL_bomb_ato, FALSE) + BindTrigger(Ref(N(EVS_BlastWall)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Wall)), 1, 0) + Else + Call(EnableModel, MODEL_bomb_1, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Exec(N(EVS_SetupMusic)) + Call(GetEntryID, LVar0) + IfLe(LVar0, nok_15_ENTRY_2) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Else + Set(LVarA, Ref(N(EVS_BindExitTriggers))) + Exec(N(EVS_Pipe_EnterVertical)) + EndIf + Wait(1) + Return + End }; diff --git a/src/world/area_nok/nok_15/nok_15_3_entity.c b/src/world/area_nok/nok_15/nok_15_3_entity.c index e871872fb41..1be07490735 100644 --- a/src/world/area_nok/nok_15/nok_15_3_entity.c +++ b/src/world/area_nok/nok_15/nok_15_3_entity.c @@ -2,7 +2,7 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), -50, 60, -825, 35, 6, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HeartBlock), -50, 60, -825, 35, 6, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_nok/nok_15/nok_15_5_foliage.c b/src/world/area_nok/nok_15/nok_15_5_foliage.c index 9fd731818da..fc4cfc9d096 100644 --- a/src/world/area_nok/nok_15/nok_15_5_foliage.c +++ b/src/world/area_nok/nok_15/nok_15_5_foliage.c @@ -30,9 +30,9 @@ BombTrigger N(BombPos_Tree1) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o677, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o677, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Return + End }; diff --git a/src/world/area_obk/common/TrafficBoos.inc.c b/src/world/area_obk/common/TrafficBoos.inc.c index c61b456533c..b8cd6750f26 100644 --- a/src/world/area_obk/common/TrafficBoos.inc.c +++ b/src/world/area_obk/common/TrafficBoos.inc.c @@ -95,16 +95,16 @@ API_CALLABLE(N(UpdateTrafficBooAlpha)) { } EvtScript N(EVS_NpcIdle_TrafficBoo) = { - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_CALL(N(TrafficBooInit)) - EVT_LOOP(0) - EVT_CALL(N(UpdateTrafficBooMotion)) - EVT_CALL(N(UpdateTrafficBooAlpha)) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_CALL(SetNpcRenderMode, NPC_SELF, RENDER_MODE_SURFACE_XLU_LAYER1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVar0, 0) + Set(LVar1, 0) + Call(N(TrafficBooInit)) + Loop(0) + Call(N(UpdateTrafficBooMotion)) + Call(N(UpdateTrafficBooAlpha)) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Call(SetNpcRenderMode, NPC_SELF, RENDER_MODE_SURFACE_XLU_LAYER1) + Wait(1) + EndLoop + Return + End }; diff --git a/src/world/area_obk/obk_01/obk_01_1_music.c b/src/world/area_obk/obk_01/obk_01_1_music.c index 1e989572f49..2287f443ac1 100644 --- a/src/world/area_obk/obk_01/obk_01_1_music.c +++ b/src/world/area_obk/obk_01/obk_01_1_music.c @@ -1,12 +1,12 @@ #include "obk_01.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_BOOS_MANSION, 0, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_CHEERFUL_BOOS_MANSION, 0, 8) - EVT_END_IF - EVT_CALL(ClearAmbientSounds, 250) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_BOOS_MANSION, 0, 8) + Else + Call(SetMusicTrack, 0, SONG_CHEERFUL_BOOS_MANSION, 0, 8) + EndIf + Call(ClearAmbientSounds, 250) + Return + End }; diff --git a/src/world/area_obk/obk_01/obk_01_2_main.c b/src/world/area_obk/obk_01/obk_01_2_main.c index 414bf98fe26..c5a22ba13c3 100644 --- a/src/world/area_obk/obk_01/obk_01_2_main.c +++ b/src/world/area_obk/obk_01/obk_01_2_main.c @@ -1,206 +1,206 @@ #include "obk_01.h" EvtScript N(EVS_ExitDoors_mim_11_2) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, obk_01_ENTRY_0) - EVT_SET(LVar1, COLLIDER_tt1) - EVT_SET(LVar2, MODEL_door1_2) - EVT_SET(LVar3, MODEL_door1_1) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("mim_11"), mim_11_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, obk_01_ENTRY_0) + Set(LVar1, COLLIDER_tt1) + Set(LVar2, MODEL_door1_2) + Set(LVar3, MODEL_door1_1) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("mim_11"), mim_11_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoor_obk_02_0) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH3_WEIGHED_DOWN_CHANDELIER) - EVT_RETURN - EVT_END_IF - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, obk_01_ENTRY_1) - EVT_SET(LVar1, COLLIDER_tt2) - EVT_SET(LVar2, MODEL_door2) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("obk_02"), obk_02_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH3_WEIGHED_DOWN_CHANDELIER) + Return + EndIf + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, obk_01_ENTRY_1) + Set(LVar1, COLLIDER_tt2) + Set(LVar2, MODEL_door2) + Set(LVar3, DOOR_SWING_IN) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("obk_02"), obk_02_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoor_obk_05_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_IF_LT(GB_StoryProgress, STORY_CH3_TRIGGERED_DOOR_JUMP_SCARE) - EVT_EXEC(N(EVS_Scene_JumpScareBoo)) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, obk_01_ENTRY_2) - EVT_SET(LVar1, COLLIDER_tt3) - EVT_SET(LVar2, MODEL_door3) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("obk_05"), obk_05_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + IfLt(GB_StoryProgress, STORY_CH3_TRIGGERED_DOOR_JUMP_SCARE) + Exec(N(EVS_Scene_JumpScareBoo)) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, obk_01_ENTRY_2) + Set(LVar1, COLLIDER_tt3) + Set(LVar2, MODEL_door3) + Set(LVar3, DOOR_SWING_IN) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("obk_05"), obk_05_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoor_obk_07_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_IF_LT(GB_StoryProgress, STORY_CH3_TRIGGERED_DOOR_JUMP_SCARE) - EVT_EXEC(N(EVS_Scene_JumpScareBoo)) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, obk_01_ENTRY_3) - EVT_SET(LVar1, COLLIDER_tt4) - EVT_SET(LVar2, MODEL_door4) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("obk_07"), obk_07_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + IfLt(GB_StoryProgress, STORY_CH3_TRIGGERED_DOOR_JUMP_SCARE) + Exec(N(EVS_Scene_JumpScareBoo)) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, obk_01_ENTRY_3) + Set(LVar1, COLLIDER_tt4) + Set(LVar2, MODEL_door4) + Set(LVar3, DOOR_SWING_IN) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("obk_07"), obk_07_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoor_obk_08_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_IF_LT(GB_StoryProgress, STORY_CH3_TRIGGERED_DOOR_JUMP_SCARE) - EVT_EXEC(N(EVS_Scene_JumpScareBoo)) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, obk_01_ENTRY_4) - EVT_SET(LVar1, COLLIDER_tt5) - EVT_SET(LVar2, MODEL_door5) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("obk_08"), obk_08_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + IfLt(GB_StoryProgress, STORY_CH3_TRIGGERED_DOOR_JUMP_SCARE) + Exec(N(EVS_Scene_JumpScareBoo)) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, obk_01_ENTRY_4) + Set(LVar1, COLLIDER_tt5) + Set(LVar2, MODEL_door5) + Set(LVar3, DOOR_SWING_IN) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("obk_08"), obk_08_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoor_obk_09_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, obk_01_ENTRY_5) - EVT_SET(LVar1, COLLIDER_tt6) - EVT_SET(LVar2, MODEL_door6_1) - EVT_SET(LVar3, MODEL_door6_2) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("obk_09"), obk_09_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, obk_01_ENTRY_5) + Set(LVar1, COLLIDER_tt6) + Set(LVar2, MODEL_door6_1) + Set(LVar3, MODEL_door6_2) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("obk_09"), obk_09_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoor_obk_09_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, obk_01_ENTRY_6) - EVT_SET(LVar1, COLLIDER_tt6_1) - EVT_SET(LVar2, MODEL_door7_1) - EVT_SET(LVar3, MODEL_door7_2) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("obk_09"), obk_09_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, obk_01_ENTRY_6) + Set(LVar1, COLLIDER_tt6_1) + Set(LVar2, MODEL_door7_1) + Set(LVar3, MODEL_door7_2) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("obk_09"), obk_09_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_mim_11_2)), TRIGGER_WALL_PRESS_A, COLLIDER_tt1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_obk_02_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tt2, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_obk_05_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tt3, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_obk_07_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tt4, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_obk_08_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tt5, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_obk_09_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tt6, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_obk_09_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tt6_1, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_mim_11_2)), TRIGGER_WALL_PRESS_A, COLLIDER_tt1, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoor_obk_02_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tt2, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoor_obk_05_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tt3, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoor_obk_07_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tt4, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoor_obk_08_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tt5, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoor_obk_09_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tt6, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoor_obk_09_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tt6_1, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(obk_01_ENTRY_0) - EVT_IF_EQ(GF_OBK01_Visited, FALSE) - EVT_SET(GF_OBK01_Visited, TRUE) - EVT_SET(GB_StoryProgress, STORY_CH3_ENTERED_BOOS_MANSION) - EVT_END_IF - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar2, MODEL_door1_2) - EVT_SET(LVar3, MODEL_door1_1) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(obk_01_ENTRY_1) - EVT_SET(LVar2, MODEL_door2) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_CASE_EQ(obk_01_ENTRY_2) - EVT_SET(LVar2, MODEL_door3) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_CASE_EQ(obk_01_ENTRY_3) - EVT_SET(LVar2, MODEL_door4) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_CASE_EQ(obk_01_ENTRY_4) - EVT_SET(LVar2, MODEL_door5) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_CASE_EQ(obk_01_ENTRY_5) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar2, MODEL_door6_1) - EVT_SET(LVar3, MODEL_door6_2) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(obk_01_ENTRY_6) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar2, MODEL_door7_1) - EVT_SET(LVar3, MODEL_door7_2) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Exec(N(EVS_BindExitTriggers)) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(obk_01_ENTRY_0) + IfEq(GF_OBK01_Visited, FALSE) + Set(GF_OBK01_Visited, TRUE) + Set(GB_StoryProgress, STORY_CH3_ENTERED_BOOS_MANSION) + EndIf + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar2, MODEL_door1_2) + Set(LVar3, MODEL_door1_1) + ExecWait(EnterDoubleDoor) + CaseEq(obk_01_ENTRY_1) + Set(LVar2, MODEL_door2) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + CaseEq(obk_01_ENTRY_2) + Set(LVar2, MODEL_door3) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + CaseEq(obk_01_ENTRY_3) + Set(LVar2, MODEL_door4) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + CaseEq(obk_01_ENTRY_4) + Set(LVar2, MODEL_door5) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + CaseEq(obk_01_ENTRY_5) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar2, MODEL_door6_1) + Set(LVar3, MODEL_door6_2) + ExecWait(EnterDoubleDoor) + CaseEq(obk_01_ENTRY_6) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar2, MODEL_door7_1) + Set(LVar3, MODEL_door7_2) + ExecWait(EnterDoubleDoor) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOOS_MANSION) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_SET(GF_MAP_BoosMansion, TRUE) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupChandelier)) - EVT_EXEC(N(EVS_SetupPortrait)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOOS_MANSION) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Set(GF_MAP_BoosMansion, TRUE) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupChandelier)) + Exec(N(EVS_SetupPortrait)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_obk/obk_01/obk_01_3_chandelier.c b/src/world/area_obk/obk_01/obk_01_3_chandelier.c index f4fe342f249..5cdd6a42f10 100644 --- a/src/world/area_obk/obk_01/obk_01_3_chandelier.c +++ b/src/world/area_obk/obk_01/obk_01_3_chandelier.c @@ -309,321 +309,321 @@ API_CALLABLE(N(ChandelierTryRelease)) { } EvtScript N(EVS_ManageChandelierPosition) = { - EVT_CALL(N(UpdateChandelier), LVar0) - EVT_RETURN - EVT_END + Call(N(UpdateChandelier), LVar0) + Return + End }; EvtScript N(EVS_ManageCabinetPosition) = { - EVT_LABEL(10) - EVT_IF_NE(AF_OBK01_CabinetMoved, FALSE) - EVT_GOTO(30) - EVT_END_IF - EVT_SET(LVar0, MV_CabinetPosOffset) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(20) - EVT_END_IF - EVT_ADD(LVar0, 3) - EVT_IF_LT(LVar0, 0) - EVT_GOTO(20) - EVT_END_IF - EVT_SET(LVar0, 0) - EVT_LABEL(20) - EVT_CALL(TranslateModel, MODEL_hon1, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_hon2, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o557) - EVT_CALL(UpdateColliderTransform, COLLIDER_o556) - EVT_SET(MV_CabinetPosOffset, LVar0) - EVT_LABEL(30) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Label(10) + IfNe(AF_OBK01_CabinetMoved, FALSE) + Goto(30) + EndIf + Set(LVar0, MV_CabinetPosOffset) + IfEq(LVar0, 0) + Goto(20) + EndIf + Add(LVar0, 3) + IfLt(LVar0, 0) + Goto(20) + EndIf + Set(LVar0, 0) + Label(20) + Call(TranslateModel, MODEL_hon1, LVar0, 0, 0) + Call(TranslateModel, MODEL_hon2, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o557) + Call(UpdateColliderTransform, COLLIDER_o556) + Set(MV_CabinetPosOffset, LVar0) + Label(30) + Wait(1) + Goto(10) + Return + End }; EvtScript N(EVS_Couch_AnimateCushion) = { - EVT_CALL(TranslateModel, LVar8, 0, -1, 0) - EVT_WAIT(1) - EVT_CALL(TranslateModel, LVar8, 0, -2, 0) - EVT_WAIT(1) - EVT_CALL(MakeLerp, 0, 20, 3, EASING_COS_FAST_OVERSHOOT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, LVar8, -100, 0, 0) - EVT_CALL(RotateModel, LVar8, LVar0, 0, 0, 1) - EVT_CALL(TranslateModel, LVar8, 100, 0, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(MakeLerp, 20, 0, 10, EASING_QUADRATIC_OUT) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, LVar8, -100, 0, 0) - EVT_CALL(RotateModel, LVar8, LVar0, 0, 0, 1) - EVT_CALL(TranslateModel, LVar8, 100, 0, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(2) - EVT_END_IF - EVT_RETURN - EVT_END + Call(TranslateModel, LVar8, 0, -1, 0) + Wait(1) + Call(TranslateModel, LVar8, 0, -2, 0) + Wait(1) + Call(MakeLerp, 0, 20, 3, EASING_COS_FAST_OVERSHOOT) + Label(1) + Call(UpdateLerp) + Call(TranslateModel, LVar8, -100, 0, 0) + Call(RotateModel, LVar8, LVar0, 0, 0, 1) + Call(TranslateModel, LVar8, 100, 0, 0) + Wait(1) + IfNe(LVar1, 0) + Goto(1) + EndIf + Call(MakeLerp, 20, 0, 10, EASING_QUADRATIC_OUT) + Label(2) + Call(UpdateLerp) + Call(TranslateModel, LVar8, -100, 0, 0) + Call(RotateModel, LVar8, LVar0, 0, 0, 1) + Call(TranslateModel, LVar8, 100, 0, 0) + Wait(1) + IfNe(LVar1, 0) + Goto(2) + EndIf + Return + End }; EvtScript N(EVS_Couch_AnimateSpring) = { - EVT_WAIT(2) - EVT_CALL(MakeLerp, 10, 25, 3, EASING_COS_FAST_OVERSHOOT) - EVT_LABEL(5) - EVT_SET(LVar2, LVar0) - EVT_SUB(LVar2, 10) - EVT_CALL(UpdateLerp) - EVT_SET(LVar3, LVar0) - EVT_MULF(LVar3, EVT_FLOAT(0.1)) - EVT_CALL(ScaleModel, LVar8, EVT_FLOAT(1.0), LVar3, EVT_FLOAT(1.0)) - EVT_CALL(RotateModel, LVar8, LVar2, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(5) - EVT_END_IF - EVT_CALL(MakeLerp, 25, 10, 10, EASING_QUADRATIC_OUT) - EVT_LABEL(6) - EVT_CALL(UpdateLerp) - EVT_SET(LVar2, LVar0) - EVT_SUB(LVar2, 10) - EVT_SET(LVar3, LVar0) - EVT_MULF(LVar3, EVT_FLOAT(0.1)) - EVT_CALL(ScaleModel, LVar8, EVT_FLOAT(1.0), LVar3, EVT_FLOAT(1.0)) - EVT_CALL(RotateModel, LVar8, LVar2, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(6) - EVT_END_IF - EVT_RETURN - EVT_END + Wait(2) + Call(MakeLerp, 10, 25, 3, EASING_COS_FAST_OVERSHOOT) + Label(5) + Set(LVar2, LVar0) + Sub(LVar2, 10) + Call(UpdateLerp) + Set(LVar3, LVar0) + MulF(LVar3, Float(0.1)) + Call(ScaleModel, LVar8, Float(1.0), LVar3, Float(1.0)) + Call(RotateModel, LVar8, LVar2, 0, 0, 1) + Wait(1) + IfNe(LVar1, 0) + Goto(5) + EndIf + Call(MakeLerp, 25, 10, 10, EASING_QUADRATIC_OUT) + Label(6) + Call(UpdateLerp) + Set(LVar2, LVar0) + Sub(LVar2, 10) + Set(LVar3, LVar0) + MulF(LVar3, Float(0.1)) + Call(ScaleModel, LVar8, Float(1.0), LVar3, Float(1.0)) + Call(RotateModel, LVar8, LVar2, 0, 0, 1) + Wait(1) + IfNe(LVar1, 0) + Goto(6) + EndIf + Return + End }; EvtScript N(EVS_LaunchFromCouch_GrabChandelier) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(InterruptUsePartner) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerActionState, LVar8) - EVT_IF_EQ(LVar8, ACTION_STATE_IDLE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_SET(LVarA, LVar0) - EVT_USE_ARRAY(LVar0) - EVT_SET(CONTROL_DATA_8, FALSE) - EVT_SET(LVar8, MODEL_tobu1) - EVT_EXEC(N(EVS_Couch_AnimateCushion)) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o567, SOUND_SPRING, SOUND_SPACE_DEFAULT) - EVT_SET(LVar8, MODEL_bane1) - EVT_EXEC(N(EVS_Couch_AnimateSpring)) - EVT_CALL(SetPlayerActionState, ACTION_STATE_JUMP) - EVT_WAIT(1) - EVT_CALL(N(EnableCameraFollowPlayerY)) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_SUB(LVar3, 1) - EVT_CALL(SetPlayerPos, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_SUB(LVar3, 1) - EVT_CALL(SetPlayerPos, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, -420, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(10.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 750) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 455, -210, 279) - EVT_END_THREAD - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.8)) - EVT_CALL(PlayerJump, 455, -135, 279, 30) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(SetPlayerPos, 445, -135, 279) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_HoldOnto) - EVT_WAIT(1) - EVT_SET(AF_OBK01_CabinetMoved, TRUE) - EVT_THREAD - EVT_WAIT(60) - EVT_CALL(MakeLerp, 0, -100, 100, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_hon1, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_hon2, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o557) - EVT_CALL(UpdateColliderTransform, COLLIDER_o556) - EVT_SET(MV_CabinetPosOffset, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(AF_OBK01_CabinetMoved, FALSE) - EVT_GOTO(15) - EVT_END_IF - EVT_IF_NE(LVar1, 0) - EVT_GOTO(10) - EVT_END_IF - EVT_LABEL(15) - EVT_END_THREAD - EVT_SET(CONTROL_DATA_STATE, CONTROL_STATE_DROP) - EVT_CHILD_THREAD - EVT_WAIT(30) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.5)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 455, -420, 279) - EVT_END_CHILD_THREAD - EVT_CALL(N(ChandelierTryRelease), LVarA) - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(35) - EVT_END_IF - EVT_IF_NE(LVar0, -1) - EVT_GOTO(40) - EVT_END_IF - EVT_LABEL(35) - EVT_CALL(CloseChoicePopup) - EVT_LABEL(39) - EVT_SET(CONTROL_DATA_STATE, CONTROL_STATE_RETRACT) - EVT_SET(CONTROL_DATA_8, TRUE) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, -420, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_END_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_THREAD - EVT_WAIT(30) - EVT_SET(AF_OBK01_CabinetMoved, FALSE) - EVT_END_THREAD - EVT_RETURN - EVT_LABEL(40) - EVT_CALL(FindKeyItem, ITEM_BOO_WEIGHT, LVar1) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(MakeItemEntity, LVar0, 447, -350, 278, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(GB_StoryProgress, STORY_CH3_WEIGHED_DOWN_CHANDELIER) - EVT_CALL(CloseChoicePopup) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_LaunchFromCouch_Crash)), TRIGGER_FLOOR_TOUCH, COLLIDER_o567, 1, 0) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(InterruptUsePartner) + Loop(0) + Wait(1) + Call(GetPlayerActionState, LVar8) + IfEq(LVar8, ACTION_STATE_IDLE) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerPhysics, TRUE) + Set(LVarA, LVar0) + UseArray(LVar0) + Set(CONTROL_DATA_8, FALSE) + Set(LVar8, MODEL_tobu1) + Exec(N(EVS_Couch_AnimateCushion)) + Call(PlaySoundAtCollider, COLLIDER_o567, SOUND_SPRING, SOUND_SPACE_DEFAULT) + Set(LVar8, MODEL_bane1) + Exec(N(EVS_Couch_AnimateSpring)) + Call(SetPlayerActionState, ACTION_STATE_JUMP) + Wait(1) + Call(N(EnableCameraFollowPlayerY)) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Sub(LVar3, 1) + Call(SetPlayerPos, LVar2, LVar3, LVar4) + Wait(1) + Sub(LVar3, 1) + Call(SetPlayerPos, LVar2, LVar3, LVar4) + Wait(1) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, -420, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(10.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Call(SetCamDistance, CAM_DEFAULT, 750) + Call(SetPanTarget, CAM_DEFAULT, 455, -210, 279) + EndThread + Call(SetPlayerJumpscale, Float(0.8)) + Call(PlayerJump, 455, -135, 279, 30) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(SetPlayerPos, 445, -135, 279) + Wait(1) + Call(SetPlayerAnimation, ANIM_MarioW2_HoldOnto) + Wait(1) + Set(AF_OBK01_CabinetMoved, TRUE) + Thread + Wait(60) + Call(MakeLerp, 0, -100, 100, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(TranslateModel, MODEL_hon1, LVar0, 0, 0) + Call(TranslateModel, MODEL_hon2, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o557) + Call(UpdateColliderTransform, COLLIDER_o556) + Set(MV_CabinetPosOffset, LVar0) + Wait(1) + IfEq(AF_OBK01_CabinetMoved, FALSE) + Goto(15) + EndIf + IfNe(LVar1, 0) + Goto(10) + EndIf + Label(15) + EndThread + Set(CONTROL_DATA_STATE, CONTROL_STATE_DROP) + ChildThread + Wait(30) + Call(SetCamDistance, CAM_DEFAULT, 450) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.5)) + Call(SetPanTarget, CAM_DEFAULT, 455, -420, 279) + EndChildThread + Call(N(ChandelierTryRelease), LVarA) + Call(ShowKeyChoicePopup) + IfEq(LVar0, 0) + Goto(35) + EndIf + IfNe(LVar0, -1) + Goto(40) + EndIf + Label(35) + Call(CloseChoicePopup) + Label(39) + Set(CONTROL_DATA_STATE, CONTROL_STATE_RETRACT) + Set(CONTROL_DATA_8, TRUE) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar0, -420, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + EndThread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(EnablePartnerAI) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Thread + Wait(30) + Set(AF_OBK01_CabinetMoved, FALSE) + EndThread + Return + Label(40) + Call(FindKeyItem, ITEM_BOO_WEIGHT, LVar1) + Call(RemoveKeyItemAt, LVar1) + Call(MakeItemEntity, LVar0, 447, -350, 278, ITEM_SPAWN_MODE_DECORATION, 0) + Set(GB_StoryProgress, STORY_CH3_WEIGHED_DOWN_CHANDELIER) + Call(CloseChoicePopup) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + BindTrigger(Ref(N(EVS_LaunchFromCouch_Crash)), TRIGGER_FLOOR_TOUCH, COLLIDER_o567, 1, 0) + Call(EnablePartnerAI) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Unbind + Return + End }; EvtScript N(EVS_TetherCameraToPlayer) = { - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_LaunchFromCouch_Crash) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterruptUsePartner) - EVT_CALL(DisablePartnerAI, 0) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerActionState, LVar0) - EVT_IF_EQ(LVar0, ACTION_STATE_IDLE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_SET(LVar8, MODEL_tobu1) - EVT_EXEC(N(EVS_Couch_AnimateCushion)) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o567, SOUND_SPRING, SOUND_SPACE_DEFAULT) - EVT_SET(LVar8, MODEL_bane1) - EVT_EXEC(N(EVS_Couch_AnimateSpring)) - EVT_CALL(SetPlayerActionState, ACTION_STATE_JUMP) - EVT_EXEC_GET_TID(N(EVS_TetherCameraToPlayer), LVarA) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_SUB(LVar3, 1) - EVT_CALL(SetPlayerPos, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_SUB(LVar3, 1) - EVT_CALL(SetPlayerPos, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.4)) - EVT_CALL(PlayerJump, 51, -210, 87, 60) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtPlayer, SOUND_TRIP, SOUND_SPACE_DEFAULT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Collapse) - EVT_WAIT(30) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_GetUp) - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_DustOff) - EVT_WAIT(7) - EVT_CALL(PlaySoundAtPlayer, SOUND_DUST_OFF, SOUND_SPACE_DEFAULT) - EVT_WAIT(8) - EVT_CALL(PlaySoundAtPlayer, SOUND_DUST_OFF, SOUND_SPACE_DEFAULT) - EVT_WAIT(15) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_KILL_THREAD(LVarA) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_WAIT(1) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(InterruptUsePartner) + Call(DisablePartnerAI, 0) + Loop(0) + Wait(1) + Call(GetPlayerActionState, LVar0) + IfEq(LVar0, ACTION_STATE_IDLE) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerPhysics, TRUE) + Set(LVar8, MODEL_tobu1) + Exec(N(EVS_Couch_AnimateCushion)) + Call(PlaySoundAtCollider, COLLIDER_o567, SOUND_SPRING, SOUND_SPACE_DEFAULT) + Set(LVar8, MODEL_bane1) + Exec(N(EVS_Couch_AnimateSpring)) + Call(SetPlayerActionState, ACTION_STATE_JUMP) + ExecGetTID(N(EVS_TetherCameraToPlayer), LVarA) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Sub(LVar3, 1) + Call(SetPlayerPos, LVar2, LVar3, LVar4) + Wait(1) + Sub(LVar3, 1) + Call(SetPlayerPos, LVar2, LVar3, LVar4) + Wait(1) + Call(SetPlayerJumpscale, Float(0.4)) + Call(PlayerJump, 51, -210, 87, 60) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(PlaySoundAtPlayer, SOUND_TRIP, SOUND_SPACE_DEFAULT) + Call(SetPlayerAnimation, ANIM_MarioW2_Collapse) + Wait(30) + Call(SetPlayerAnimation, ANIM_Mario1_GetUp) + Wait(20) + Call(SetPlayerAnimation, ANIM_Mario1_DustOff) + Wait(7) + Call(PlaySoundAtPlayer, SOUND_DUST_OFF, SOUND_SPACE_DEFAULT) + Wait(8) + Call(PlaySoundAtPlayer, SOUND_DUST_OFF, SOUND_SPACE_DEFAULT) + Wait(15) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + KillThread(LVarA) + Call(DisablePlayerPhysics, FALSE) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Wait(1) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SetupChandelier) = { - EVT_MALLOC_ARRAY(3, LVarA) - EVT_SET(CONTROL_DATA_PTR, NULL) - EVT_SET(CONTROL_DATA_STATE, CONTROL_STATE_WAITING) - EVT_SET(CONTROL_DATA_8, FALSE) - EVT_CALL(ParentColliderToModel, COLLIDER_o557, MODEL_hon1) - EVT_CALL(ParentColliderToModel, COLLIDER_o556, MODEL_hon2) - EVT_CALL(ParentColliderToModel, COLLIDER_tobu_1_1, MODEL_tobu_1_1) - EVT_CALL(ParentColliderToModel, COLLIDER_o567, MODEL_tobu1) - EVT_CALL(ParentColliderToModel, COLLIDER_tabu_3_1, MODEL_tobu_3_1) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_WEIGHED_DOWN_CHANDELIER) - EVT_SET(LVar0, -100) - EVT_CALL(TranslateModel, MODEL_hon1, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_hon2, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o557) - EVT_CALL(UpdateColliderTransform, COLLIDER_o556) - EVT_SET(LVar0, -220) - EVT_CALL(TranslateModel, MODEL_kusari_1, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_kusari_2, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_wa, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_hi, 0, LVar0, 0) - EVT_CALL(MakeItemEntity, ITEM_BOO_WEIGHT, 447, -350, 278, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_LaunchFromCouch_Crash)), TRIGGER_FLOOR_TOUCH, COLLIDER_o567, 1, 0) - EVT_ELSE - EVT_SET(MV_UnusedPosOffset, 0) - EVT_SET(MV_CabinetPosOffset, 0) - EVT_EXEC(N(EVS_ManageCabinetPosition)) - EVT_SET(LVar0, LVarA) - EVT_EXEC(N(EVS_ManageChandelierPosition)) - EVT_SET(LVar0, LVarA) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_LaunchFromCouch_GrabChandelier)), TRIGGER_FLOOR_TOUCH, COLLIDER_o567, EVT_PTR(N(ItemList_BooWeight)), 0, 1) - EVT_END_IF - EVT_RETURN - EVT_END + MallocArray(3, LVarA) + Set(CONTROL_DATA_PTR, NULL) + Set(CONTROL_DATA_STATE, CONTROL_STATE_WAITING) + Set(CONTROL_DATA_8, FALSE) + Call(ParentColliderToModel, COLLIDER_o557, MODEL_hon1) + Call(ParentColliderToModel, COLLIDER_o556, MODEL_hon2) + Call(ParentColliderToModel, COLLIDER_tobu_1_1, MODEL_tobu_1_1) + Call(ParentColliderToModel, COLLIDER_o567, MODEL_tobu1) + Call(ParentColliderToModel, COLLIDER_tabu_3_1, MODEL_tobu_3_1) + IfGe(GB_StoryProgress, STORY_CH3_WEIGHED_DOWN_CHANDELIER) + Set(LVar0, -100) + Call(TranslateModel, MODEL_hon1, LVar0, 0, 0) + Call(TranslateModel, MODEL_hon2, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o557) + Call(UpdateColliderTransform, COLLIDER_o556) + Set(LVar0, -220) + Call(TranslateModel, MODEL_kusari_1, 0, LVar0, 0) + Call(TranslateModel, MODEL_kusari_2, 0, LVar0, 0) + Call(TranslateModel, MODEL_wa, 0, LVar0, 0) + Call(TranslateModel, MODEL_hi, 0, LVar0, 0) + Call(MakeItemEntity, ITEM_BOO_WEIGHT, 447, -350, 278, ITEM_SPAWN_MODE_DECORATION, 0) + BindTrigger(Ref(N(EVS_LaunchFromCouch_Crash)), TRIGGER_FLOOR_TOUCH, COLLIDER_o567, 1, 0) + Else + Set(MV_UnusedPosOffset, 0) + Set(MV_CabinetPosOffset, 0) + Exec(N(EVS_ManageCabinetPosition)) + Set(LVar0, LVarA) + Exec(N(EVS_ManageChandelierPosition)) + Set(LVar0, LVarA) + BindPadlock(Ref(N(EVS_LaunchFromCouch_GrabChandelier)), TRIGGER_FLOOR_TOUCH, COLLIDER_o567, Ref(N(ItemList_BooWeight)), 0, 1) + EndIf + Return + End }; diff --git a/src/world/area_obk/obk_01/obk_01_4_portrait.c b/src/world/area_obk/obk_01/obk_01_4_portrait.c index b5c97e453a3..7191a770604 100644 --- a/src/world/area_obk/obk_01/obk_01_4_portrait.c +++ b/src/world/area_obk/obk_01/obk_01_4_portrait.c @@ -12,207 +12,207 @@ API_CALLABLE(N(SetPortraitItemAlpha)) { EvtScript N(EVS_AnimateSpeakingPortrait) = { // hide empty frames - EVT_CALL(EnableModel, MODEL_n1, FALSE) - EVT_CALL(EnableModel, MODEL_n2, FALSE) - EVT_LOOP(0) + Call(EnableModel, MODEL_n1, FALSE) + Call(EnableModel, MODEL_n2, FALSE) + Loop(0) // toggle different frames of the speaking 'animation' - EVT_CALL(EnableModel, MODEL_u1, TRUE) - EVT_CALL(EnableModel, MODEL_u2, TRUE) - EVT_CALL(EnableModel, MODEL_si1, FALSE) - EVT_CALL(EnableModel, MODEL_si2, FALSE) - EVT_WAIT(5) - EVT_CALL(EnableModel, MODEL_u1, FALSE) - EVT_CALL(EnableModel, MODEL_u2, FALSE) - EVT_CALL(EnableModel, MODEL_si1, TRUE) - EVT_CALL(EnableModel, MODEL_si2, TRUE) - EVT_WAIT(5) - EVT_SUB(LVar0, 1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_u1, TRUE) + Call(EnableModel, MODEL_u2, TRUE) + Call(EnableModel, MODEL_si1, FALSE) + Call(EnableModel, MODEL_si2, FALSE) + Wait(5) + Call(EnableModel, MODEL_u1, FALSE) + Call(EnableModel, MODEL_u2, FALSE) + Call(EnableModel, MODEL_si1, TRUE) + Call(EnableModel, MODEL_si2, TRUE) + Wait(5) + Sub(LVar0, 1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_Interact_LowerPortrait) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_GOT_BOO_PORTRAIT) - EVT_IF_EQ(GF_OBK01_Met_Portrait, FALSE) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH3_002B, 160, 40) - EVT_SET(GF_OBK01_Met_Portrait, TRUE) - EVT_ELSE - EVT_CALL(ShowMessageAtScreenPos, MSG_CH3_002C, 160, 40) - EVT_END_IF - EVT_CASE_EQ(STORY_CH3_GOT_BOO_PORTRAIT) - EVT_CALL(ShowKeyChoicePopup) - EVT_CALL(CloseChoicePopup) - EVT_SWITCH(LVar0) - EVT_CASE_GE(1) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_Lift) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 40) - EVT_CALL(MakeItemEntity, ITEM_BOO_PORTRAIT, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_CALL(N(SetPortraitItemAlpha)) - EVT_SET(LVarA, LVar0) - EVT_WAIT(30 * DT) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_SET(LVar6, 40) - EVT_ADD(LVar6, LVar4) - EVT_SET(LVar7, 70) - EVT_ADD(LVar7, LVar4) - EVT_CALL(MakeLerp, LVar6, LVar7, 20 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetItemPos, LVarA, LVar3, LVar0, LVar5) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(MakeLerp, 255, 0, 30 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetItemAlpha, LVarA, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(30 * DT) - EVT_CALL(RemoveItemEntity, LVarA) - EVT_IF_EQ(GF_OBK01_Met_Portrait, TRUE) - EVT_SET(LVar0, 25) - EVT_EXEC(N(EVS_AnimateSpeakingPortrait)) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH3_002D, 160, 40) - EVT_ELSE - EVT_SET(LVar0, 35) - EVT_EXEC(N(EVS_AnimateSpeakingPortrait)) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH3_002E, 160, 40) - EVT_END_IF - EVT_SET(GB_StoryProgress, STORY_CH3_RESTORED_BOO_PORTRAIT) - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetPlayerAnimation, SPRITE_ID_BACK_FACING | ANIM_Mario1_BeforeJump) - EVT_WAIT(3) - EVT_CALL(SetPlayerAnimation, SPRITE_ID_BACK_FACING | ANIM_Mario1_Jump) - EVT_WAIT(1) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(PlayerJump, 812, -170, -2, 20 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_TRANSPORTER_IN, SOUND_SPACE_DEFAULT) - EVT_WAIT(10 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 812, 0, 28) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 812, 0, 28) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Jump) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtPlayer, SOUND_TRANSPORTER_OUT, SOUND_SPACE_DEFAULT) - EVT_CALL(SetPlayerPos, 812, 61, -2) - EVT_CALL(PlayerJump, 812, 0, 28, 8 * DT) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(EnablePartnerAI) - EVT_IF_EQ(GF_OBK01_Portrait_Farewell, FALSE) - EVT_WAIT(10 * DT) - EVT_SET(LVar0, 5) - EVT_EXEC(N(EVS_AnimateSpeakingPortrait)) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH3_002F, 160, 40) - EVT_SET(GF_OBK01_Portrait_Farewell, TRUE) - EVT_END_IF - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_WAIT(2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_GOT_BOO_PORTRAIT) + IfEq(GF_OBK01_Met_Portrait, FALSE) + Call(ShowMessageAtScreenPos, MSG_CH3_002B, 160, 40) + Set(GF_OBK01_Met_Portrait, TRUE) + Else + Call(ShowMessageAtScreenPos, MSG_CH3_002C, 160, 40) + EndIf + CaseEq(STORY_CH3_GOT_BOO_PORTRAIT) + Call(ShowKeyChoicePopup) + Call(CloseChoicePopup) + Switch(LVar0) + CaseGe(1) + Call(RemoveKeyItemAt, LVar1) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_MarioW1_Lift) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 40) + Call(MakeItemEntity, ITEM_BOO_PORTRAIT, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_DECORATION, 0) + Call(N(SetPortraitItemAlpha)) + Set(LVarA, LVar0) + Wait(30 * DT) + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Set(LVar6, 40) + Add(LVar6, LVar4) + Set(LVar7, 70) + Add(LVar7, LVar4) + Call(MakeLerp, LVar6, LVar7, 20 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetItemPos, LVarA, LVar3, LVar0, LVar5) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(MakeLerp, 255, 0, 30 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetItemAlpha, LVarA, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(30 * DT) + Call(RemoveItemEntity, LVarA) + IfEq(GF_OBK01_Met_Portrait, TRUE) + Set(LVar0, 25) + Exec(N(EVS_AnimateSpeakingPortrait)) + Call(ShowMessageAtScreenPos, MSG_CH3_002D, 160, 40) + Else + Set(LVar0, 35) + Exec(N(EVS_AnimateSpeakingPortrait)) + Call(ShowMessageAtScreenPos, MSG_CH3_002E, 160, 40) + EndIf + Set(GB_StoryProgress, STORY_CH3_RESTORED_BOO_PORTRAIT) + EndSwitch + CaseDefault + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Call(SetPlayerAnimation, SPRITE_ID_BACK_FACING | ANIM_Mario1_BeforeJump) + Wait(3) + Call(SetPlayerAnimation, SPRITE_ID_BACK_FACING | ANIM_Mario1_Jump) + Wait(1) + Call(SetPlayerJumpscale, Float(1.0)) + Call(PlayerJump, 812, -170, -2, 20 * DT) + Call(PlaySoundAtPlayer, SOUND_TRANSPORTER_IN, SOUND_SPACE_DEFAULT) + Wait(10 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, 812, 0, 28) + Call(SetPanTarget, CAM_DEFAULT, 812, 0, 28) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Jump) + Wait(1) + Call(PlaySoundAtPlayer, SOUND_TRANSPORTER_OUT, SOUND_SPACE_DEFAULT) + Call(SetPlayerPos, 812, 61, -2) + Call(PlayerJump, 812, 0, 28, 8 * DT) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(EnablePartnerAI) + IfEq(GF_OBK01_Portrait_Farewell, FALSE) + Wait(10 * DT) + Set(LVar0, 5) + Exec(N(EVS_AnimateSpeakingPortrait)) + Call(ShowMessageAtScreenPos, MSG_CH3_002F, 160, 40) + Set(GF_OBK01_Portrait_Farewell, TRUE) + EndIf + Call(DisablePlayerPhysics, FALSE) + Wait(2) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + EndSwitch + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Interact_UpperPortrait) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetPlayerAnimation, SPRITE_ID_BACK_FACING | ANIM_Mario1_BeforeJump) - EVT_WAIT(3) - EVT_CALL(SetPlayerAnimation, SPRITE_ID_BACK_FACING | ANIM_Mario1_Jump) - EVT_WAIT(1) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(PlayerJump, 812, 40, -2, 20) - EVT_CALL(PlaySoundAtPlayer, SOUND_TRANSPORTER_IN, SOUND_SPACE_DEFAULT) - EVT_WAIT(10 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 812, -210, 28) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 812, -210, 28) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Jump) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtPlayer, SOUND_TRANSPORTER_OUT, SOUND_SPACE_DEFAULT) - EVT_CALL(SetPlayerPos, 812, -146, -2) - EVT_CALL(PlayerJump, 812, -210, 28, 8 * DT) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_WAIT(2) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Call(SetPlayerAnimation, SPRITE_ID_BACK_FACING | ANIM_Mario1_BeforeJump) + Wait(3) + Call(SetPlayerAnimation, SPRITE_ID_BACK_FACING | ANIM_Mario1_Jump) + Wait(1) + Call(SetPlayerJumpscale, Float(1.0)) + Call(PlayerJump, 812, 40, -2, 20) + Call(PlaySoundAtPlayer, SOUND_TRANSPORTER_IN, SOUND_SPACE_DEFAULT) + Wait(10 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, 812, -210, 28) + Call(SetPanTarget, CAM_DEFAULT, 812, -210, 28) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Jump) + Wait(1) + Call(PlaySoundAtPlayer, SOUND_TRANSPORTER_OUT, SOUND_SPACE_DEFAULT) + Call(SetPlayerPos, 812, -146, -2) + Call(PlayerJump, 812, -210, 28, 8 * DT) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(EnablePartnerAI) + Call(DisablePlayerPhysics, FALSE) + Wait(2) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_PortraitFrame_ShakeWhenNear) = { - EVT_LOOP(0) - EVT_IF_EQ(AF_OBK01_IsPlayerNearPortrait, TRUE) - EVT_IF_NE(AF_OBK01_WasPlayerNearPortrait, AF_OBK01_IsPlayerNearPortrait) - EVT_LOOP(3) - EVT_CALL(RotateModel, MODEL_n1, 5, 0, 0, 1) - EVT_WAIT(2) - EVT_CALL(RotateModel, MODEL_n1, 0, 0, 0, 1) - EVT_WAIT(1) - EVT_CALL(RotateModel, MODEL_n1, 5, 0, 0, 1) - EVT_WAIT(2) - EVT_CALL(RotateModel, MODEL_n1, 0, 0, 0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_IF - EVT_END_IF - EVT_SET(AF_OBK01_WasPlayerNearPortrait, AF_OBK01_IsPlayerNearPortrait) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + IfEq(AF_OBK01_IsPlayerNearPortrait, TRUE) + IfNe(AF_OBK01_WasPlayerNearPortrait, AF_OBK01_IsPlayerNearPortrait) + Loop(3) + Call(RotateModel, MODEL_n1, 5, 0, 0, 1) + Wait(2) + Call(RotateModel, MODEL_n1, 0, 0, 0, 1) + Wait(1) + Call(RotateModel, MODEL_n1, 5, 0, 0, 1) + Wait(2) + Call(RotateModel, MODEL_n1, 0, 0, 0, 1) + Wait(1) + EndLoop + EndIf + EndIf + Set(AF_OBK01_WasPlayerNearPortrait, AF_OBK01_IsPlayerNearPortrait) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_PortraitFrame_MonitorPlayerPos) = { - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(AF_OBK01_IsPlayerNearPortrait, FALSE) - EVT_IF_EQ(GF_OBK01_Met_Portrait, FALSE) - EVT_IF_GE(LVar1, -210) - EVT_IF_LE(LVar1, -100) - EVT_IF_GE(LVar0, 775) - EVT_SET(AF_OBK01_IsPlayerNearPortrait, TRUE) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(AF_OBK01_IsPlayerNearPortrait, FALSE) + IfEq(GF_OBK01_Met_Portrait, FALSE) + IfGe(LVar1, -210) + IfLe(LVar1, -100) + IfGe(LVar0, 775) + Set(AF_OBK01_IsPlayerNearPortrait, TRUE) + EndIf + EndIf + EndIf + EndIf + Wait(1) + EndLoop + Return + End }; s32 N(ItemList_BooPortrait)[] = { @@ -221,27 +221,27 @@ s32 N(ItemList_BooPortrait)[] = { }; EvtScript N(EVS_SetupPortrait) = { - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_Interact_LowerPortrait)), TRIGGER_WALL_PRESS_A, COLLIDER_aa1, EVT_PTR(N(ItemList_BooPortrait)), 0, 1) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Interact_UpperPortrait)), TRIGGER_WALL_PRESS_A, COLLIDER_aa2, 1, 0) - EVT_EXEC(N(EVS_PortraitFrame_MonitorPlayerPos)) - EVT_EXEC(N(EVS_PortraitFrame_ShakeWhenNear)) - EVT_IF_LT(GB_StoryProgress, STORY_CH3_RESTORED_BOO_PORTRAIT) - EVT_CALL(EnableModel, MODEL_n1, TRUE) - EVT_CALL(EnableModel, MODEL_u1, FALSE) - EVT_CALL(EnableModel, MODEL_si1, FALSE) - EVT_CALL(EnableModel, MODEL_n2, TRUE) - EVT_CALL(EnableModel, MODEL_u2, FALSE) - EVT_CALL(EnableModel, MODEL_si2, FALSE) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_n1, FALSE) - EVT_CALL(EnableModel, MODEL_n2, FALSE) - EVT_CALL(EnableModel, MODEL_u1, TRUE) - EVT_CALL(EnableModel, MODEL_u2, TRUE) - EVT_CALL(EnableModel, MODEL_si1, FALSE) - EVT_CALL(EnableModel, MODEL_si2, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END + BindPadlock(Ref(N(EVS_Interact_LowerPortrait)), TRIGGER_WALL_PRESS_A, COLLIDER_aa1, Ref(N(ItemList_BooPortrait)), 0, 1) + BindTrigger(Ref(N(EVS_Interact_UpperPortrait)), TRIGGER_WALL_PRESS_A, COLLIDER_aa2, 1, 0) + Exec(N(EVS_PortraitFrame_MonitorPlayerPos)) + Exec(N(EVS_PortraitFrame_ShakeWhenNear)) + IfLt(GB_StoryProgress, STORY_CH3_RESTORED_BOO_PORTRAIT) + Call(EnableModel, MODEL_n1, TRUE) + Call(EnableModel, MODEL_u1, FALSE) + Call(EnableModel, MODEL_si1, FALSE) + Call(EnableModel, MODEL_n2, TRUE) + Call(EnableModel, MODEL_u2, FALSE) + Call(EnableModel, MODEL_si2, FALSE) + Else + Call(EnableModel, MODEL_n1, FALSE) + Call(EnableModel, MODEL_n2, FALSE) + Call(EnableModel, MODEL_u1, TRUE) + Call(EnableModel, MODEL_u2, TRUE) + Call(EnableModel, MODEL_si1, FALSE) + Call(EnableModel, MODEL_si2, FALSE) + EndIf + Return + End }; s32 N(Unused_80243C7C_3C7C)[] = { diff --git a/src/world/area_obk/obk_01/obk_01_5_jump_scare.c b/src/world/area_obk/obk_01/obk_01_5_jump_scare.c index f0c93a9d264..dd599c1ffea 100644 --- a/src/world/area_obk/obk_01/obk_01_5_jump_scare.c +++ b/src/world/area_obk/obk_01/obk_01_5_jump_scare.c @@ -2,42 +2,42 @@ #include "effects.h" EvtScript N(EVS_Scene_JumpScareBoo) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_ADD(LVar4, 80) - EVT_CALL(SetNpcPos, NPC_JumpScareBoo, LVar3, LVar4, LVar5) - EVT_THREAD - EVT_WAIT(5 * DT) - EVT_SUB(LVar3, 10) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 0, LVar3, LVar4, LVar5, EVT_FLOAT(2.8), 50) - EVT_END_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_JumpScareBoo, SOUND_JUMP_SCARE, SOUND_SPACE_DEFAULT) - EVT_SUB(LVar4, 12) - EVT_CALL(MakeLerp, 10, 450, 8 * DT, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, LVar0) - EVT_DIVF(LVar2, EVT_FLOAT(100.0)) - EVT_CALL(SetNpcScale, NPC_JumpScareBoo, LVar2, LVar2, LVar2) - EVT_MULF(LVar2, 12) - EVT_SETF(LVar6, LVar4) - EVT_SUBF(LVar6, LVar2) - EVT_CALL(SetNpcPos, NPC_JumpScareBoo, LVar3, LVar6, LVar5) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(15) - EVT_SETF(LVar0, EVT_FLOAT(240.0)) - EVT_LOOP(20 * DT) - EVT_SUBF(LVar0, EVT_FLOAT(240.0 / (s32)(20 * DT))) - EVT_CALL(SetNpcImgFXParams, NPC_JumpScareBoo, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(RemoveNpc, NPC_JumpScareBoo) - EVT_SET(GB_StoryProgress, STORY_CH3_TRIGGERED_DOOR_JUMP_SCARE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Add(LVar4, 80) + Call(SetNpcPos, NPC_JumpScareBoo, LVar3, LVar4, LVar5) + Thread + Wait(5 * DT) + Sub(LVar3, 10) + PlayEffect(EFFECT_RADIAL_SHIMMER, 0, LVar3, LVar4, LVar5, Float(2.8), 50) + EndThread + Call(PlaySoundAtNpc, NPC_JumpScareBoo, SOUND_JUMP_SCARE, SOUND_SPACE_DEFAULT) + Sub(LVar4, 12) + Call(MakeLerp, 10, 450, 8 * DT, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, LVar0) + DivF(LVar2, Float(100.0)) + Call(SetNpcScale, NPC_JumpScareBoo, LVar2, LVar2, LVar2) + MulF(LVar2, 12) + SetF(LVar6, LVar4) + SubF(LVar6, LVar2) + Call(SetNpcPos, NPC_JumpScareBoo, LVar3, LVar6, LVar5) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(15) + SetF(LVar0, Float(240.0)) + Loop(20 * DT) + SubF(LVar0, Float(240.0 / (s32)(20 * DT))) + Call(SetNpcImgFXParams, NPC_JumpScareBoo, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + EndLoop + Call(RemoveNpc, NPC_JumpScareBoo) + Set(GB_StoryProgress, STORY_CH3_TRIGGERED_DOOR_JUMP_SCARE) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_obk/obk_01/obk_01_6_npc.c b/src/world/area_obk/obk_01/obk_01_6_npc.c index 3057e485e8c..23deb74cd1e 100644 --- a/src/world/area_obk/obk_01/obk_01_6_npc.c +++ b/src/world/area_obk/obk_01/obk_01_6_npc.c @@ -13,14 +13,14 @@ s32 N(LetterList_Franky)[] = { }; EvtScript N(EVS_LetterPrompt_Franky) = { - EVT_CALL(N(LetterDelivery_Init), + Call(N(LetterDelivery_Init), NPC_Franky, ANIM_Boo_Talk, ANIM_Boo_Idle, ITEM_LETTER_CHAIN_FRANKY, ITEM_LETTER_CHAIN_DANE_T_1, MSG_CH3_0067, MSG_CH3_0068, MSG_CH3_0069, MSG_CH3_006A, - EVT_PTR(N(LetterList_Franky))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) - EVT_RETURN - EVT_END + Ref(N(LetterList_Franky))) + ExecWait(N(EVS_DoLetterDelivery)) + Return + End }; enum { @@ -100,92 +100,92 @@ API_CALLABLE(N(UpdateTrafficBooAlpha)) { EvtScript N(EVS_NpcIdle_TrafficBoo) = { - EVT_CALL(N(UpdateTrafficBooMotion)) - EVT_RETURN - EVT_END + Call(N(UpdateTrafficBooMotion)) + Return + End }; EvtScript N(EVS_NpcAux_TrafficBoo) = { - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_CALL(N(UpdateTrafficBooAlpha)) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVar1, 0) + Loop(0) + Call(N(UpdateTrafficBooAlpha)) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcInit_TrafficBoo1) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TrafficBoo))) - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_TrafficBoo))) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_TrafficBoo))) + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_TrafficBoo))) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_TrafficBoo2) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TrafficBoo))) - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_TrafficBoo))) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_TrafficBoo))) + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_TrafficBoo))) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_UpstairsBoo) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0061) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0062) - EVT_CASE_GE(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0063) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0061) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0062) + CaseGe(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0063) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Franky) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0064) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0065) - EVT_CASE_GE(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0066) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_LetterPrompt_Franky)) - EVT_IF_NE(LVarC, 0) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GB_KootFavor_Current, KOOT_FAVOR_CH5_3) - EVT_IF_EQ(GF_OBK01_Gift_OldPhoto, FALSE) - EVT_SET(GF_OBK01_Gift_OldPhoto, TRUE) - EVT_EXEC_WAIT(N(EVS_MarioSalute)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_006B) + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0064) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0065) + CaseGe(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0066) + EndSwitch + ExecWait(N(EVS_LetterPrompt_Franky)) + IfNe(LVarC, 0) + Return + EndIf + IfEq(GB_KootFavor_Current, KOOT_FAVOR_CH5_3) + IfEq(GF_OBK01_Gift_OldPhoto, FALSE) + Set(GF_OBK01_Gift_OldPhoto, TRUE) + ExecWait(N(EVS_MarioSalute)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_006B) EVT_GIVE_KEY_REWARD(ITEM_KOOT_OLD_PHOTO) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + EndIf + EndIf + Return + End }; EvtScript N(EVS_NpcInit_UpstairsBoo) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_UpstairsBoo))) - EVT_IF_LT(GB_StoryProgress, STORY_CH3_BOW_JOINED_PARTY) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_UpstairsBoo))) + IfLt(GB_StoryProgress, STORY_CH3_BOW_JOINED_PARTY) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Franky) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Franky))) - EVT_IF_LT(GB_StoryProgress, STORY_CH3_BOW_JOINED_PARTY) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Franky))) + IfLt(GB_StoryProgress, STORY_CH3_BOW_JOINED_PARTY) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; NpcData N(NpcData_JumpScareBoo) = { diff --git a/src/world/area_obk/obk_01/obk_01_7_entity.c b/src/world/area_obk/obk_01/obk_01_7_entity.c index 4dd65a15028..ca1cffc358c 100644 --- a/src/world/area_obk/obk_01/obk_01_7_entity.c +++ b/src/world/area_obk/obk_01/obk_01_7_entity.c @@ -2,8 +2,8 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 675, -420, 415, 180, MODEL_o317, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_OBK01_HiddenPanel) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HiddenPanel), 675, -420, 415, 180, MODEL_o317, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_OBK01_HiddenPanel) + Return + End }; diff --git a/src/world/area_obk/obk_02/obk_02_1_music.c b/src/world/area_obk/obk_02/obk_02_1_music.c index d1fab022957..ae404ba0a3f 100644 --- a/src/world/area_obk/obk_02/obk_02_1_music.c +++ b/src/world/area_obk/obk_02/obk_02_1_music.c @@ -1,11 +1,11 @@ #include "obk_02.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_BOOS_MANSION, 0, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_CHEERFUL_BOOS_MANSION, 0, 8) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_BOOS_MANSION, 0, 8) + Else + Call(SetMusicTrack, 0, SONG_CHEERFUL_BOOS_MANSION, 0, 8) + EndIf + Return + End }; diff --git a/src/world/area_obk/obk_02/obk_02_2_main.c b/src/world/area_obk/obk_02/obk_02_2_main.c index 5b54d505da0..b3603d76b6d 100644 --- a/src/world/area_obk/obk_02/obk_02_2_main.c +++ b/src/world/area_obk/obk_02/obk_02_2_main.c @@ -9,193 +9,193 @@ enum { }; EvtScript N(EVS_ExitDoor_obk_01_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, obk_02_ENTRY_0) - EVT_SET(LVar1, COLLIDER_tt1) - EVT_SET(LVar2, MODEL_door1b) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("obk_01"), obk_01_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, obk_02_ENTRY_0) + Set(LVar1, COLLIDER_tt1) + Set(LVar2, MODEL_door1b) + Set(LVar3, DOOR_SWING_OUT) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("obk_01"), obk_01_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoor_obk_03_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, obk_02_ENTRY_1) - EVT_SET(LVar1, COLLIDER_tt2) - EVT_SET(LVar2, MODEL_door2) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("obk_03"), obk_03_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, obk_02_ENTRY_1) + Set(LVar1, COLLIDER_tt2) + Set(LVar2, MODEL_door2) + Set(LVar3, DOOR_SWING_OUT) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("obk_03"), obk_03_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_obk_06_1) = EVT_EXIT_WALK(60, obk_02_ENTRY_2, "obk_06", obk_06_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_obk_01_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tt1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_obk_03_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tt2, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_obk_06_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoor_obk_01_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tt1, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoor_obk_03_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tt2, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_obk_06_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(obk_02_ENTRY_0) - EVT_SET(LVar2, MODEL_door1b) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_EXEC_WAIT(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(obk_02_ENTRY_1) - EVT_SET(LVar2, MODEL_door2) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_EXEC_WAIT(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(obk_02_ENTRY_2) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(obk_02_ENTRY_0) + Set(LVar2, MODEL_door1b) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSingleDoor) + ExecWait(N(EVS_BindExitTriggers)) + CaseEq(obk_02_ENTRY_1) + Set(LVar2, MODEL_door2) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSingleDoor) + ExecWait(N(EVS_BindExitTriggers)) + CaseEq(obk_02_ENTRY_2) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; EvtScript N(EVS_TexPan_Fog) = { - EVT_THREAD - EVT_CALL(SetTexPanner, MODEL_r1, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_r2, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_r3, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_r4, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_r5, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_r6, TEX_PANNER_1) - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, 0) - EVT_WAIT(2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0x8000, 0) - EVT_WAIT(2) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_m2, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_m3, TEX_PANNER_0) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 300) - EVT_ADD(LVar1, 100) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, LVar0, LVar1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Thread + Call(SetTexPanner, MODEL_r1, TEX_PANNER_1) + Call(SetTexPanner, MODEL_r2, TEX_PANNER_1) + Call(SetTexPanner, MODEL_r3, TEX_PANNER_1) + Call(SetTexPanner, MODEL_r4, TEX_PANNER_1) + Call(SetTexPanner, MODEL_r5, TEX_PANNER_1) + Call(SetTexPanner, MODEL_r6, TEX_PANNER_1) + Loop(0) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, 0) + Wait(2) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0x8000, 0) + Wait(2) + EndLoop + EndThread + Call(SetTexPanner, MODEL_m2, TEX_PANNER_0) + Call(SetTexPanner, MODEL_m3, TEX_PANNER_0) + Set(LVar0, 0) + Set(LVar1, 0) + Loop(0) + Add(LVar0, 300) + Add(LVar1, 100) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, LVar0, LVar1) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_OnStep_UpperFloor) = { - EVT_SET(MV_CurrentMapRegion, REGION_UPPER_FLOOR) - EVT_RETURN - EVT_END + Set(MV_CurrentMapRegion, REGION_UPPER_FLOOR) + Return + End }; EvtScript N(EVS_OnStep_Stairs) = { - EVT_SET(MV_CurrentMapRegion, REGION_STAIRS) - EVT_RETURN - EVT_END + Set(MV_CurrentMapRegion, REGION_STAIRS) + Return + End }; EvtScript N(EVS_OnStep_LowerFloor) = { - EVT_SET(MV_CurrentMapRegion, REGION_LOWER_FLOOR) - EVT_RETURN - EVT_END + Set(MV_CurrentMapRegion, REGION_LOWER_FLOOR) + Return + End }; EvtScript N(EVS_EnableModels_LowerFloor) = { - EVT_CALL(EnableGroup, MODEL_off_1, TRUE) - EVT_CALL(EnableGroup, MODEL_bom, TRUE) - EVT_CALL(EnableGroup, MODEL_tokei, TRUE) - EVT_CALL(EnableGroup, MODEL_hikido, TRUE) - EVT_IF_EQ(GF_OBK06_BombedWall, FALSE) - EVT_CALL(EnableModel, MODEL_bomu_ato, FALSE) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_bom_mae, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(EnableGroup, MODEL_off_1, TRUE) + Call(EnableGroup, MODEL_bom, TRUE) + Call(EnableGroup, MODEL_tokei, TRUE) + Call(EnableGroup, MODEL_hikido, TRUE) + IfEq(GF_OBK06_BombedWall, FALSE) + Call(EnableModel, MODEL_bomu_ato, FALSE) + Else + Call(EnableModel, MODEL_bom_mae, FALSE) + EndIf + Return + End }; EvtScript N(EVS_DisableModels_LowerFloor) = { - EVT_CALL(EnableGroup, MODEL_off_1, FALSE) - EVT_CALL(EnableGroup, MODEL_bom, FALSE) - EVT_CALL(EnableGroup, MODEL_tokei, FALSE) - EVT_CALL(EnableGroup, MODEL_hikido, FALSE) - EVT_RETURN - EVT_END + Call(EnableGroup, MODEL_off_1, FALSE) + Call(EnableGroup, MODEL_bom, FALSE) + Call(EnableGroup, MODEL_tokei, FALSE) + Call(EnableGroup, MODEL_hikido, FALSE) + Return + End }; EvtScript N(EVS_EnableModels_UpperFloor) = { - EVT_CALL(EnableGroup, MODEL_off_2, TRUE) - EVT_CALL(EnableGroup, MODEL_shiyan, TRUE) - EVT_CALL(EnableGroup, MODEL_door_1, TRUE) - EVT_RETURN - EVT_END + Call(EnableGroup, MODEL_off_2, TRUE) + Call(EnableGroup, MODEL_shiyan, TRUE) + Call(EnableGroup, MODEL_door_1, TRUE) + Return + End }; EvtScript N(EVS_DisableModels_UpperFloor) = { - EVT_CALL(EnableGroup, MODEL_off_2, FALSE) - EVT_CALL(EnableGroup, MODEL_shiyan, FALSE) - EVT_CALL(EnableGroup, MODEL_door_1, FALSE) - EVT_RETURN - EVT_END + Call(EnableGroup, MODEL_off_2, FALSE) + Call(EnableGroup, MODEL_shiyan, FALSE) + Call(EnableGroup, MODEL_door_1, FALSE) + Return + End }; EvtScript N(EVS_ManageRegionVisibility) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnStep_UpperFloor)), TRIGGER_FLOOR_TOUCH, COLLIDER_o296, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnStep_Stairs)), TRIGGER_FLOOR_TOUCH, COLLIDER_o309, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnStep_LowerFloor)), TRIGGER_FLOOR_TOUCH, COLLIDER_o291, 1, 0) - EVT_SET(MV_CurrentMapRegion, REGION_INIT) - EVT_SET(MV_LastMapRegion, REGION_INIT_LAST) - EVT_LOOP(0) - EVT_IF_NE(MV_CurrentMapRegion, MV_LastMapRegion) - EVT_SWITCH(MV_CurrentMapRegion) - EVT_CASE_EQ(REGION_UPPER_FLOOR) - EVT_EXEC_WAIT(N(EVS_DisableModels_LowerFloor)) - EVT_EXEC_WAIT(N(EVS_EnableModels_UpperFloor)) - EVT_CASE_EQ(REGION_STAIRS) - EVT_EXEC_WAIT(N(EVS_EnableModels_LowerFloor)) - EVT_EXEC_WAIT(N(EVS_EnableModels_UpperFloor)) - EVT_CASE_EQ(REGION_LOWER_FLOOR) - EVT_EXEC_WAIT(N(EVS_EnableModels_LowerFloor)) - EVT_EXEC_WAIT(N(EVS_DisableModels_UpperFloor)) - EVT_END_SWITCH - EVT_END_IF - EVT_SET(MV_LastMapRegion, MV_CurrentMapRegion) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_OnStep_UpperFloor)), TRIGGER_FLOOR_TOUCH, COLLIDER_o296, 1, 0) + BindTrigger(Ref(N(EVS_OnStep_Stairs)), TRIGGER_FLOOR_TOUCH, COLLIDER_o309, 1, 0) + BindTrigger(Ref(N(EVS_OnStep_LowerFloor)), TRIGGER_FLOOR_TOUCH, COLLIDER_o291, 1, 0) + Set(MV_CurrentMapRegion, REGION_INIT) + Set(MV_LastMapRegion, REGION_INIT_LAST) + Loop(0) + IfNe(MV_CurrentMapRegion, MV_LastMapRegion) + Switch(MV_CurrentMapRegion) + CaseEq(REGION_UPPER_FLOOR) + ExecWait(N(EVS_DisableModels_LowerFloor)) + ExecWait(N(EVS_EnableModels_UpperFloor)) + CaseEq(REGION_STAIRS) + ExecWait(N(EVS_EnableModels_LowerFloor)) + ExecWait(N(EVS_EnableModels_UpperFloor)) + CaseEq(REGION_LOWER_FLOOR) + ExecWait(N(EVS_EnableModels_LowerFloor)) + ExecWait(N(EVS_DisableModels_UpperFloor)) + EndSwitch + EndIf + Set(MV_LastMapRegion, MV_CurrentMapRegion) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOOS_MANSION) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_TexPan_Fog)) - EVT_EXEC(N(EVS_SetupBombableWall)) - EVT_EXEC(N(EVS_ClockDoNothing)) - EVT_EXEC(N(EVS_UpdateClock)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_EXEC(N(EVS_ManageRegionVisibility)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_si, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOOS_MANSION) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_TexPan_Fog)) + Exec(N(EVS_SetupBombableWall)) + Exec(N(EVS_ClockDoNothing)) + Exec(N(EVS_UpdateClock)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Exec(N(EVS_ManageRegionVisibility)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_si, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; diff --git a/src/world/area_obk/obk_02/obk_02_3_npc.c b/src/world/area_obk/obk_02/obk_02_3_npc.c index eb92d4c2a97..d47305a8b03 100644 --- a/src/world/area_obk/obk_02/obk_02_3_npc.c +++ b/src/world/area_obk/obk_02/obk_02_3_npc.c @@ -7,15 +7,15 @@ #include "../common/TrafficBoos.inc.c" EvtScript N(EVS_NpcInit_TrafficBoo1) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TrafficBoo))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_TrafficBoo))) + Return + End }; EvtScript N(EVS_NpcInit_TrafficBoo2) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TrafficBoo))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_TrafficBoo))) + Return + End }; NpcData N(NpcData_TrafficBoos)[] = { diff --git a/src/world/area_obk/obk_02/obk_02_4_bombable.c b/src/world/area_obk/obk_02/obk_02_4_bombable.c index 1a48c9ab6df..4f337cb57c8 100644 --- a/src/world/area_obk/obk_02/obk_02_4_bombable.c +++ b/src/world/area_obk/obk_02/obk_02_4_bombable.c @@ -7,30 +7,30 @@ BombTrigger N(BombPos_Wall) = { }; EvtScript N(EVS_OnBlast_Wall) = { - EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 1, 33, 33, 1, 10, 30) - EVT_LOOP(10) - EVT_CALL(EnableModel, MODEL_bomu_ato, FALSE) - EVT_CALL(EnableModel, MODEL_bom_mae, TRUE) - EVT_WAIT(1) - EVT_CALL(EnableModel, MODEL_bomu_ato, TRUE) - EVT_CALL(EnableModel, MODEL_bom_mae, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GF_OBK06_BombedWall, TRUE) - EVT_UNBIND - EVT_RETURN - EVT_END + PlayEffect(EFFECT_BOMBETTE_BREAKING, 1, 33, 33, 1, 10, 30) + Loop(10) + Call(EnableModel, MODEL_bomu_ato, FALSE) + Call(EnableModel, MODEL_bom_mae, TRUE) + Wait(1) + Call(EnableModel, MODEL_bomu_ato, TRUE) + Call(EnableModel, MODEL_bom_mae, FALSE) + Wait(1) + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK) + Set(GF_OBK06_BombedWall, TRUE) + Unbind + Return + End }; EvtScript N(EVS_SetupBombableWall) = { - EVT_IF_EQ(GF_OBK06_BombedWall, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnBlast_Wall)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Wall)), 1, 0) - EVT_CALL(EnableModel, MODEL_bomu_ato, FALSE) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_bom_mae, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_OBK06_BombedWall, FALSE) + BindTrigger(Ref(N(EVS_OnBlast_Wall)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Wall)), 1, 0) + Call(EnableModel, MODEL_bomu_ato, FALSE) + Else + Call(EnableModel, MODEL_bom_mae, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Return + End }; diff --git a/src/world/area_obk/obk_02/obk_02_5_clock.c b/src/world/area_obk/obk_02/obk_02_5_clock.c index a90f512b302..3c8f5942a03 100644 --- a/src/world/area_obk/obk_02/obk_02_5_clock.c +++ b/src/world/area_obk/obk_02/obk_02_5_clock.c @@ -7,35 +7,35 @@ API_CALLABLE(N(GetPendulumAngle)) { } EvtScript N(EVS_ClockDoNothing) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_UpdateClock) = { - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LABEL(10) - EVT_CALL(RotateModel, MODEL_na, LVar0, 0, 0, 1) - EVT_ADD(LVar0, -6) - EVT_WAIT(30 * DT) - EVT_GOTO(10) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LABEL(20) - EVT_CALL(RotateModel, MODEL_mi, LVar0, 0, 0, 1) - EVT_ADD(LVar0, -1) - EVT_WAIT(60 * DT) - EVT_GOTO(20) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar1, 0) - EVT_LABEL(30) - EVT_CALL(N(GetPendulumAngle)) - EVT_CALL(RotateModel, MODEL_fu, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_GOTO(30) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + Set(LVar0, 0) + Label(10) + Call(RotateModel, MODEL_na, LVar0, 0, 0, 1) + Add(LVar0, -6) + Wait(30 * DT) + Goto(10) + EndThread + Thread + Set(LVar0, 0) + Label(20) + Call(RotateModel, MODEL_mi, LVar0, 0, 0, 1) + Add(LVar0, -1) + Wait(60 * DT) + Goto(20) + EndThread + Thread + Set(LVar1, 0) + Label(30) + Call(N(GetPendulumAngle)) + Call(RotateModel, MODEL_fu, LVar0, 0, 0, 1) + Wait(1) + Goto(30) + EndThread + Return + End }; diff --git a/src/world/area_obk/obk_02/obk_02_6_entity.c b/src/world/area_obk/obk_02/obk_02_6_entity.c index c127cdaf838..ace6590b839 100644 --- a/src/world/area_obk/obk_02/obk_02_6_entity.c +++ b/src/world/area_obk/obk_02/obk_02_6_entity.c @@ -3,58 +3,58 @@ #include "sprite/player.h" EvtScript N(EVS_ChestTrap) = { - EVT_WAIT(15) - EVT_THREAD - EVT_CALL(PlaySoundAt, SOUND_OBK_CHANDELIER_RELEASE, SOUND_SPACE_DEFAULT, 4, 26, -12) - EVT_CALL(MakeLerp, 0, -80, 10 * DT, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_shiyan, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAt, SOUND_OBK_CHANDELIER_STOP, SOUND_SPACE_DEFAULT, 4, 26, -12) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(1.5)) - EVT_WAIT(40 * DT) - EVT_CALL(PlaySoundAt, SOUND_OBK_CHANDELIER_RETRACT, SOUND_SPACE_DEFAULT, 4, 26, -12) - EVT_CALL(MakeLerp, -80, 0, 20 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_shiyan, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(2) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_FlailArms) - EVT_WAIT(48 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_SET(GF_OBK02_TriggeredChestTrap, TRUE) - EVT_WAIT(5 * DT) - EVT_RETURN - EVT_END + Wait(15) + Thread + Call(PlaySoundAt, SOUND_OBK_CHANDELIER_RELEASE, SOUND_SPACE_DEFAULT, 4, 26, -12) + Call(MakeLerp, 0, -80, 10 * DT, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_shiyan, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAt, SOUND_OBK_CHANDELIER_STOP, SOUND_SPACE_DEFAULT, 4, 26, -12) + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(1.5)) + Wait(40 * DT) + Call(PlaySoundAt, SOUND_OBK_CHANDELIER_RETRACT, SOUND_SPACE_DEFAULT, 4, 26, -12) + Call(MakeLerp, -80, 0, 20 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_shiyan, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Wait(2) + Call(SetPlayerAnimation, ANIM_MarioW2_FlailArms) + Wait(48 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Set(GF_OBK02_TriggeredChestTrap, TRUE) + Wait(5 * DT) + Return + End }; EvtScript N(EVS_OpenChest) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC_WAIT(N(EVS_ChestTrap)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + ExecWait(N(EVS_ChestTrap)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 0, 0, 0, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_OBK02_Chest_Trap) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenChest))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 100, -210, 0, 0, MODEL_yuka_b1, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_OBK02_HiddenPanel) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Chest), 0, 0, 0, 0, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_OBK02_Chest_Trap) + Call(AssignScript, Ref(N(EVS_OpenChest))) + Call(MakeEntity, Ref(Entity_HiddenPanel), 100, -210, 0, 0, MODEL_yuka_b1, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_OBK02_HiddenPanel) + Return + End }; diff --git a/src/world/area_obk/obk_03/obk_03_1_music.c b/src/world/area_obk/obk_03/obk_03_1_music.c index 3d97ca0983c..c9a57994b54 100644 --- a/src/world/area_obk/obk_03/obk_03_1_music.c +++ b/src/world/area_obk/obk_03/obk_03_1_music.c @@ -1,11 +1,11 @@ #include "obk_03.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_BOOS_MANSION, 0, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_CHEERFUL_BOOS_MANSION, 0, 8) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_BOOS_MANSION, 0, 8) + Else + Call(SetMusicTrack, 0, SONG_CHEERFUL_BOOS_MANSION, 0, 8) + EndIf + Return + End }; diff --git a/src/world/area_obk/obk_03/obk_03_2_main.c b/src/world/area_obk/obk_03/obk_03_2_main.c index c2c69bced2b..5e5074413aa 100644 --- a/src/world/area_obk/obk_03/obk_03_2_main.c +++ b/src/world/area_obk/obk_03/obk_03_2_main.c @@ -1,84 +1,84 @@ #include "obk_03.h" EvtScript N(EVS_ExitDoor_obk_02_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, obk_03_ENTRY_0) - EVT_SET(LVar1, COLLIDER_tt2) - EVT_SET(LVar2, MODEL_door_2_1) - EVT_SET(LVar4, MODEL_door_2_2) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(ExitSplitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("obk_02"), obk_02_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, obk_03_ENTRY_0) + Set(LVar1, COLLIDER_tt2) + Set(LVar2, MODEL_door_2_1) + Set(LVar4, MODEL_door_2_2) + Set(LVar3, DOOR_SWING_IN) + Exec(ExitSplitSingleDoor) + Wait(17) + Call(GotoMap, Ref("obk_02"), obk_02_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoor_obk_04_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, obk_03_ENTRY_1) - EVT_SET(LVar1, COLLIDER_tt1) - EVT_SET(LVar2, MODEL_door_1) - EVT_SET(LVar4, MODEL_o494) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC(ExitSplitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("obk_04"), obk_04_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, obk_03_ENTRY_1) + Set(LVar1, COLLIDER_tt1) + Set(LVar2, MODEL_door_1) + Set(LVar4, MODEL_o494) + Set(LVar3, DOOR_SWING_OUT) + Exec(ExitSplitSingleDoor) + Wait(17) + Call(GotoMap, Ref("obk_04"), obk_04_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(obk_03_ENTRY_0) - EVT_SET(LVar2, MODEL_door_2_1) - EVT_SET(LVar4, MODEL_door_2_2) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSplitSingleDoor) - EVT_CASE_EQ(obk_03_ENTRY_1) - EVT_SET(LVar2, MODEL_door_1) - EVT_SET(LVar4, MODEL_o494) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSplitSingleDoor) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(obk_03_ENTRY_0) + Set(LVar2, MODEL_door_2_1) + Set(LVar4, MODEL_door_2_2) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSplitSingleDoor) + CaseEq(obk_03_ENTRY_1) + Set(LVar2, MODEL_door_1) + Set(LVar4, MODEL_o494) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSplitSingleDoor) + EndSwitch + Return + End }; EvtScript N(EVS_TexPan_Fog) = { - EVT_CALL(SetTexPanner, MODEL_m2, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_m4, TEX_PANNER_0) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LABEL(20) - EVT_ADD(LVar0, 300) - EVT_ADD(LVar1, 100) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, LVar0, LVar1) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_RETURN - EVT_END + Call(SetTexPanner, MODEL_m2, TEX_PANNER_0) + Call(SetTexPanner, MODEL_m4, TEX_PANNER_0) + Set(LVar0, 0) + Set(LVar1, 0) + Label(20) + Add(LVar0, 300) + Add(LVar1, 100) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, LVar0, LVar1) + Wait(1) + Goto(20) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOOS_MANSION) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupStairs)) - EVT_EXEC(N(EVS_SetupRockingChair)) - EVT_EXEC_WAIT(N(EVS_SetupShop)) - EVT_EXEC(N(EVS_TexPan_Fog)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_obk_04_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tt1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_obk_02_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tt2, 1, 0) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOOS_MANSION) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupStairs)) + Exec(N(EVS_SetupRockingChair)) + ExecWait(N(EVS_SetupShop)) + Exec(N(EVS_TexPan_Fog)) + Exec(N(EVS_SetupMusic)) + BindTrigger(Ref(N(EVS_ExitDoor_obk_04_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tt1, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoor_obk_02_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tt2, 1, 0) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_obk/obk_03/obk_03_3_shop.c b/src/world/area_obk/obk_03/obk_03_3_shop.c index fbd7caf4b3c..b6734603bf9 100644 --- a/src/world/area_obk/obk_03/obk_03_3_shop.c +++ b/src/world/area_obk/obk_03/obk_03_3_shop.c @@ -55,14 +55,14 @@ ShopItemLocation N(ItemPositions)[] = { }; EvtScript N(EVS_OnBuy) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(SHOP_BUY_RESULT_CANCEL) - EVT_CASE_EQ(SHOP_BUY_RESULT_4) - EVT_CASE_EQ(SHOP_BUY_RESULT_OK) - EVT_CASE_EQ(SHOP_BUY_RESULT_2) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(SHOP_BUY_RESULT_CANCEL) + CaseEq(SHOP_BUY_RESULT_4) + CaseEq(SHOP_BUY_RESULT_OK) + CaseEq(SHOP_BUY_RESULT_2) + EndSwitch + Return + End }; ShopOwner N(Owner) = { @@ -74,18 +74,18 @@ ShopOwner N(Owner) = { }; EvtScript N(EVS_SetupShop) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH3_BOW_JOINED_PARTY) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_dummy, COLLIDER_FLAGS_UPPER_MASK) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o485, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o486, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o487, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o488, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o489, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o490, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_CALL(MakeShop, EVT_PTR(N(ItemPositions)), EVT_PTR(N(Inventory)), EVT_PTR(N(PriceList)), 0) - EVT_CALL(MakeShopOwner, EVT_PTR(N(Owner))) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH3_BOW_JOINED_PARTY) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_dummy, COLLIDER_FLAGS_UPPER_MASK) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o485, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o486, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o487, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o488, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o489, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o490, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Call(MakeShop, Ref(N(ItemPositions)), Ref(N(Inventory)), Ref(N(PriceList)), 0) + Call(MakeShopOwner, Ref(N(Owner))) + Return + End }; diff --git a/src/world/area_obk/obk_03/obk_03_4_entity.c b/src/world/area_obk/obk_03/obk_03_4_entity.c index 9de93abbf13..59fcffd3c8b 100644 --- a/src/world/area_obk/obk_03/obk_03_4_entity.c +++ b/src/world/area_obk/obk_03/obk_03_4_entity.c @@ -9,164 +9,164 @@ extern EvtScript N(EVS_HitSwitch_Third); #include "world/common/todo/GetEntityPosition.inc.c" EvtScript N(EVS_SecondSwitch_Drop) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(N(GetEntityPosition), LVar7, LVarA, LVarB, LVarC) - EVT_CALL(PlaySoundAt, SOUND_FALL_QUICK, SOUND_SPACE_DEFAULT, LVarA, LVarB, LVarC) - EVT_END_THREAD - EVT_CALL(MakeLerp, LVar3, LVar5, LVar6, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetEntityPosition), LVar7, LVar2, LVar0, LVar4) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(N(GetEntityPosition), LVar7, LVarA, LVarB, LVarC) - EVT_CALL(PlaySoundAt, SOUND_OBJECT_LAND, SOUND_SPACE_DEFAULT, LVarA, LVarB, LVarC) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, LVar8, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Thread + Wait(10) + Call(N(GetEntityPosition), LVar7, LVarA, LVarB, LVarC) + Call(PlaySoundAt, SOUND_FALL_QUICK, SOUND_SPACE_DEFAULT, LVarA, LVarB, LVarC) + EndThread + Call(MakeLerp, LVar3, LVar5, LVar6, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(N(SetEntityPosition), LVar7, LVar2, LVar0, LVar4) + IfEq(LVar1, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(N(GetEntityPosition), LVar7, LVarA, LVarB, LVarC) + Call(PlaySoundAt, SOUND_OBJECT_LAND, SOUND_SPACE_DEFAULT, LVarA, LVarB, LVarC) + Call(ShakeCam, CAM_DEFAULT, 0, LVar8, Float(1.0)) + Wait(10) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_ThirdSwitch_Drop) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(N(GetEntityPosition), LVar7, LVarA, LVarB, LVarC) - EVT_CALL(PlaySoundAt, SOUND_LARGE_FALL_QUICK, SOUND_SPACE_DEFAULT, LVarA, LVarB, LVarC) - EVT_END_THREAD - EVT_CALL(MakeLerp, LVar3, LVar5, LVar6, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetEntityPosition), LVar7, LVar2, LVar0, LVar4) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(N(GetEntityPosition), LVar7, LVarA, LVarB, LVarC) - EVT_CALL(PlaySoundAt, SOUND_HEAVY_OBJECT_DROP, SOUND_SPACE_DEFAULT, LVarA, LVarB, LVarC) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, LVar8, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Thread + Wait(10) + Call(N(GetEntityPosition), LVar7, LVarA, LVarB, LVarC) + Call(PlaySoundAt, SOUND_LARGE_FALL_QUICK, SOUND_SPACE_DEFAULT, LVarA, LVarB, LVarC) + EndThread + Call(MakeLerp, LVar3, LVar5, LVar6, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(N(SetEntityPosition), LVar7, LVar2, LVar0, LVar4) + IfEq(LVar1, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(N(GetEntityPosition), LVar7, LVarA, LVarB, LVarC) + Call(PlaySoundAt, SOUND_HEAVY_OBJECT_DROP, SOUND_SPACE_DEFAULT, LVarA, LVarB, LVarC) + Call(ShakeCam, CAM_DEFAULT, 0, LVar8, Float(1.0)) + Wait(10) + Call(DisablePlayerInput, FALSE) + Return + End }; // if the player is under the switch as it falls, jump out of the way EvtScript N(EVS_SecondSwitch_JumpToSafety) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LE(LVar0, 340) - EVT_RETURN - EVT_END_IF - EVT_IF_GE(LVar0, 372) - EVT_RETURN - EVT_END_IF - EVT_IF_LE(LVar2, -115) - EVT_RETURN - EVT_END_IF - EVT_IF_GE(LVar2, -85) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_FlailArms) - EVT_WAIT(8 * DT) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_WAIT(2) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(2.0)) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_CALL(PlayerJump1, 330, -210, -49, 10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(5 * DT) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLe(LVar0, 340) + Return + EndIf + IfGe(LVar0, 372) + Return + EndIf + IfLe(LVar2, -115) + Return + EndIf + IfGe(LVar2, -85) + Return + EndIf + Call(SetPlayerAnimation, ANIM_MarioW2_FlailArms) + Wait(8 * DT) + Call(InterpPlayerYaw, 90, 0) + Wait(2) + Call(SetPlayerJumpscale, Float(2.0)) + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + Call(PlayerJump1, 330, -210, -49, 10 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(5 * DT) + Return + End }; // if the player is under the switch as it falls, jump out of the way EvtScript N(EVS_ThirdSwitch_JumpToSafety) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LE(LVar0, 394) - EVT_RETURN - EVT_END_IF - EVT_IF_GE(LVar0, 470) - EVT_RETURN - EVT_END_IF - EVT_IF_LE(LVar2, -135) - EVT_RETURN - EVT_END_IF - EVT_IF_GE(LVar2, -62) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_FlailArms) - EVT_WAIT(8 * DT) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_WAIT(2) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(2.0)) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_CALL(PlayerJump1, 352, -210, -5, 10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(5 * DT) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLe(LVar0, 394) + Return + EndIf + IfGe(LVar0, 470) + Return + EndIf + IfLe(LVar2, -135) + Return + EndIf + IfGe(LVar2, -62) + Return + EndIf + Call(SetPlayerAnimation, ANIM_MarioW2_FlailArms) + Wait(8 * DT) + Call(InterpPlayerYaw, 90, 0) + Wait(2) + Call(SetPlayerJumpscale, Float(2.0)) + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + Call(PlayerJump1, 352, -210, -5, 10 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(5 * DT) + Return + End }; EvtScript N(EVS_HitSwitch_First) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueSwitch), 360, -210, -100, 0, MAKE_ENTITY_END) - EVT_CALL(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_OBK03_HitSecondSwitch)) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_HitSwitch_Second))) - EVT_EXEC(N(EVS_SecondSwitch_JumpToSafety)) - EVT_SET(LVar2, 360) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, -100) - EVT_SET(LVar5, -210) - EVT_SET(LVar6, 20 * DT) - EVT_SET(LVar7, LVar0) - EVT_SET(LVar8, 5) - EVT_EXEC_WAIT(N(EVS_SecondSwitch_Drop)) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_BlueSwitch), 360, -210, -100, 0, MAKE_ENTITY_END) + Call(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_OBK03_HitSecondSwitch)) + Call(AssignScript, Ref(N(EVS_HitSwitch_Second))) + Exec(N(EVS_SecondSwitch_JumpToSafety)) + Set(LVar2, 360) + Set(LVar3, 0) + Set(LVar4, -100) + Set(LVar5, -210) + Set(LVar6, 20 * DT) + Set(LVar7, LVar0) + Set(LVar8, 5) + ExecWait(N(EVS_SecondSwitch_Drop)) + Return + End }; EvtScript N(EVS_HitSwitch_Second) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HugeBlueSwitch), 440, -210, -100, 0, MAKE_ENTITY_END) - EVT_CALL(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_OBK03_HitThirdSwitch)) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_HitSwitch_Third))) - EVT_EXEC(N(EVS_ThirdSwitch_JumpToSafety)) - EVT_SET(LVar2, 440) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, -100) - EVT_SET(LVar5, -210) - EVT_SET(LVar6, 20 * DT) - EVT_SET(LVar7, LVar0) - EVT_SET(LVar8, 30) - EVT_EXEC_WAIT(N(EVS_ThirdSwitch_Drop)) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HugeBlueSwitch), 440, -210, -100, 0, MAKE_ENTITY_END) + Call(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_OBK03_HitThirdSwitch)) + Call(AssignScript, Ref(N(EVS_HitSwitch_Third))) + Exec(N(EVS_ThirdSwitch_JumpToSafety)) + Set(LVar2, 440) + Set(LVar3, 0) + Set(LVar4, -100) + Set(LVar5, -210) + Set(LVar6, 20 * DT) + Set(LVar7, LVar0) + Set(LVar8, 30) + ExecWait(N(EVS_ThirdSwitch_Drop)) + Return + End }; EvtScript N(EVS_HitSwitch_Third) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH3_HIT_HUGE_BLUE_SWITCH) - EVT_EXEC(N(EVS_Scene_DropSteps)) - EVT_SET(GB_StoryProgress, STORY_CH3_HIT_HUGE_BLUE_SWITCH) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH3_HIT_HUGE_BLUE_SWITCH) + Exec(N(EVS_Scene_DropSteps)) + Set(GB_StoryProgress, STORY_CH3_HIT_HUGE_BLUE_SWITCH) + EndIf + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH3_HIT_HUGE_BLUE_SWITCH) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueSwitch), 300, -210, -100, 0, MAKE_ENTITY_END) - EVT_CALL(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_OBK03_HitFirstSwitch)) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_HitSwitch_First))) - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_WoodenCrate), -130, 0, -50, 0, ITEM_SUPER_SHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignCrateFlag, GF_OBK03_Crate_SuperShroom) - EVT_CALL(MakeEntity, EVT_PTR(Entity_WoodenCrate), 155, 0, -100, 0, -1, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_WoodenCrate), -165, 0, -50, 0, -1, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH3_HIT_HUGE_BLUE_SWITCH) + Call(MakeEntity, Ref(Entity_BlueSwitch), 300, -210, -100, 0, MAKE_ENTITY_END) + Call(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_OBK03_HitFirstSwitch)) + Call(AssignScript, Ref(N(EVS_HitSwitch_First))) + EndIf + Call(MakeEntity, Ref(Entity_WoodenCrate), -130, 0, -50, 0, ITEM_SUPER_SHROOM, MAKE_ENTITY_END) + Call(AssignCrateFlag, GF_OBK03_Crate_SuperShroom) + Call(MakeEntity, Ref(Entity_WoodenCrate), 155, 0, -100, 0, -1, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_WoodenCrate), -165, 0, -50, 0, -1, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_obk/obk_03/obk_03_5_stairs.c b/src/world/area_obk/obk_03/obk_03_5_stairs.c index ec8c80e9725..f2392937a4c 100644 --- a/src/world/area_obk/obk_03/obk_03_5_stairs.c +++ b/src/world/area_obk/obk_03/obk_03_5_stairs.c @@ -2,149 +2,149 @@ #include "effects.h" EvtScript N(EVS_DropStep) = { - EVT_CALL(MakeLerp, LVar0, 0, LVar1, EASING_COS_FAST_OVERSHOOT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, LVar2, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(10) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeLerp, LVar0, 0, LVar1, EASING_COS_FAST_OVERSHOOT) + Label(10) + Call(UpdateLerp) + Call(TranslateModel, LVar2, 0, LVar0, 0) + Wait(1) + IfNe(LVar1, 0) + Goto(10) + EndIf + Return + End }; EvtScript N(EVS_PlayDropStepFX) = { - EVT_CALL(PlaySoundAt, SOUND_OBK_STAIRS_DROP, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(LVarA) - EVT_SET(LVar3, LVar0) - EVT_SET(LVar4, LVar1) - EVT_SET(LVar5, LVar2) - EVT_ADD(LVar3, 0) - EVT_ADD(LVar4, -8) - EVT_ADD(LVar5, -70) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, LVar3, LVar4, LVar5, 0) - EVT_SET(LVar6, LVar0) - EVT_SET(LVar7, LVar1) - EVT_SET(LVar8, LVar2) - EVT_ADD(LVar6, 0) - EVT_ADD(LVar7, -8) - EVT_ADD(LVar8, 70) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, LVar6, LVar7, LVar8, 0) - EVT_RETURN - EVT_END + Call(PlaySoundAt, SOUND_OBK_STAIRS_DROP, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Wait(LVarA) + Set(LVar3, LVar0) + Set(LVar4, LVar1) + Set(LVar5, LVar2) + Add(LVar3, 0) + Add(LVar4, -8) + Add(LVar5, -70) + PlayEffect(EFFECT_LANDING_DUST, 1, LVar3, LVar4, LVar5, 0) + Set(LVar6, LVar0) + Set(LVar7, LVar1) + Set(LVar8, LVar2) + Add(LVar6, 0) + Add(LVar7, -8) + Add(LVar8, 70) + PlayEffect(EFFECT_LANDING_DUST, 1, LVar6, LVar7, LVar8, 0) + Return + End }; EvtScript N(EVS_Cam_FocusOnStairs) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 15) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Sub(LVar1, 15) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Return + End }; EvtScript N(EVS_Cam_ResetFocus) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Return + End }; // first step only #define EVT_DROP_STEP_1(x, y, z, delay, dist, modelID) \ - EVT_SET(LVar0, x) \ - EVT_SET(LVar1, y) \ - EVT_SET(LVar2, z) \ - EVT_EXEC_WAIT(N(EVS_Cam_FocusOnStairs)) \ - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30, EVT_FLOAT(3.0)) \ - EVT_SET(LVar0, x) \ - EVT_SET(LVar1, y) \ - EVT_SET(LVar2, z) \ - EVT_SET(LVarA, delay) \ - EVT_EXEC(N(EVS_PlayDropStepFX)) \ - EVT_SET(LVar0, dist) \ - EVT_SET(LVar1, 5 * DT) \ - EVT_SET(LVar2, modelID) \ - EVT_EXEC(N(EVS_DropStep)) \ - EVT_WAIT(5) + Set(LVar0, x) \ + Set(LVar1, y) \ + Set(LVar2, z) \ + ExecWait(N(EVS_Cam_FocusOnStairs)) \ + Call(ShakeCam, CAM_DEFAULT, 0, 30, Float(3.0)) \ + Set(LVar0, x) \ + Set(LVar1, y) \ + Set(LVar2, z) \ + Set(LVarA, delay) \ + Exec(N(EVS_PlayDropStepFX)) \ + Set(LVar0, dist) \ + Set(LVar1, 5 * DT) \ + Set(LVar2, modelID) \ + Exec(N(EVS_DropStep)) \ + Wait(5) // second step only #define EVT_DROP_STEP_2(x, y, z, delay, dist, modelID) \ - EVT_SET(LVar0, x) \ - EVT_SET(LVar1, y) \ - EVT_SET(LVar2, z) \ - EVT_EXEC(N(EVS_Cam_FocusOnStairs)) \ - EVT_SET(LVar0, x) \ - EVT_SET(LVar1, y) \ - EVT_SET(LVar2, z) \ - EVT_SET(LVarA, delay) \ - EVT_EXEC(N(EVS_PlayDropStepFX)) \ - EVT_SET(LVar0, dist) \ - EVT_SET(LVar1, 5 * DT) \ - EVT_SET(LVar2, modelID) \ - EVT_EXEC(N(EVS_DropStep)) \ - EVT_WAIT(5) + Set(LVar0, x) \ + Set(LVar1, y) \ + Set(LVar2, z) \ + Exec(N(EVS_Cam_FocusOnStairs)) \ + Set(LVar0, x) \ + Set(LVar1, y) \ + Set(LVar2, z) \ + Set(LVarA, delay) \ + Exec(N(EVS_PlayDropStepFX)) \ + Set(LVar0, dist) \ + Set(LVar1, 5 * DT) \ + Set(LVar2, modelID) \ + Exec(N(EVS_DropStep)) \ + Wait(5) // other steps #define EVT_DROP_STEP_N(x, y, z, delay, dist, modelID) \ - EVT_SET(LVar0, x) \ - EVT_SET(LVar1, y) \ - EVT_SET(LVar2, z) \ - EVT_EXEC_WAIT(N(EVS_Cam_FocusOnStairs)) \ - EVT_SET(LVar0, x) \ - EVT_SET(LVar1, y) \ - EVT_SET(LVar2, z) \ - EVT_SET(LVarA, delay) \ - EVT_EXEC(N(EVS_PlayDropStepFX)) \ - EVT_SET(LVar0, dist) \ - EVT_SET(LVar1, 5 * DT) \ - EVT_SET(LVar2, modelID) \ - EVT_EXEC(N(EVS_DropStep)) \ - EVT_WAIT(5) + Set(LVar0, x) \ + Set(LVar1, y) \ + Set(LVar2, z) \ + ExecWait(N(EVS_Cam_FocusOnStairs)) \ + Set(LVar0, x) \ + Set(LVar1, y) \ + Set(LVar2, z) \ + Set(LVarA, delay) \ + Exec(N(EVS_PlayDropStepFX)) \ + Set(LVar0, dist) \ + Set(LVar1, 5 * DT) \ + Set(LVar2, modelID) \ + Exec(N(EVS_DropStep)) \ + Wait(5) // last step only #define EVT_DROP_STEP_L(x, y, z, delay, dist, modelID) \ - EVT_SET(LVar0, x) \ - EVT_SET(LVar1, y) \ - EVT_SET(LVar2, z) \ - EVT_EXEC_WAIT(N(EVS_Cam_FocusOnStairs)) \ - EVT_SET(LVar0, x) \ - EVT_SET(LVar1, y) \ - EVT_SET(LVar2, z) \ - EVT_SET(LVarA, delay) \ - EVT_EXEC(N(EVS_PlayDropStepFX)) \ - EVT_SET(LVar0, dist) \ - EVT_SET(LVar1, 2 * DT) \ - EVT_SET(LVar2, modelID) \ - EVT_EXEC_WAIT(N(EVS_DropStep)) \ + Set(LVar0, x) \ + Set(LVar1, y) \ + Set(LVar2, z) \ + ExecWait(N(EVS_Cam_FocusOnStairs)) \ + Set(LVar0, x) \ + Set(LVar1, y) \ + Set(LVar2, z) \ + Set(LVarA, delay) \ + Exec(N(EVS_PlayDropStepFX)) \ + Set(LVar0, dist) \ + Set(LVar1, 2 * DT) \ + Set(LVar2, modelID) \ + ExecWait(N(EVS_DropStep)) \ EvtScript N(EVS_Scene_DropSteps) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(EnableModel, MODEL_yk1, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_k1, TRUE) - EVT_CALL(EnableModel, MODEL_k2, TRUE) - EVT_CALL(EnableModel, MODEL_k3, TRUE) - EVT_CALL(EnableModel, MODEL_k4, TRUE) - EVT_CALL(EnableModel, MODEL_k5, TRUE) - EVT_CALL(EnableModel, MODEL_k6, TRUE) - EVT_CALL(EnableModel, MODEL_k7, TRUE) - EVT_CALL(EnableModel, MODEL_k8, TRUE) - EVT_CALL(TranslateModel, MODEL_k1, 0, 180, 0) - EVT_CALL(TranslateModel, MODEL_k2, 0, 155, 0) - EVT_CALL(TranslateModel, MODEL_k3, 0, 130, 0) - EVT_CALL(TranslateModel, MODEL_k4, 0, 105, 0) - EVT_CALL(TranslateModel, MODEL_k5, 0, 80, 0) - EVT_CALL(TranslateModel, MODEL_k6, 0, 55, 0) - EVT_CALL(TranslateModel, MODEL_k7, 0, 30, 0) - EVT_CALL(TranslateModel, MODEL_k8, 0, 5, 0) + Call(DisablePlayerInput, TRUE) + Call(EnableModel, MODEL_yk1, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_k1, TRUE) + Call(EnableModel, MODEL_k2, TRUE) + Call(EnableModel, MODEL_k3, TRUE) + Call(EnableModel, MODEL_k4, TRUE) + Call(EnableModel, MODEL_k5, TRUE) + Call(EnableModel, MODEL_k6, TRUE) + Call(EnableModel, MODEL_k7, TRUE) + Call(EnableModel, MODEL_k8, TRUE) + Call(TranslateModel, MODEL_k1, 0, 180, 0) + Call(TranslateModel, MODEL_k2, 0, 155, 0) + Call(TranslateModel, MODEL_k3, 0, 130, 0) + Call(TranslateModel, MODEL_k4, 0, 105, 0) + Call(TranslateModel, MODEL_k5, 0, 80, 0) + Call(TranslateModel, MODEL_k6, 0, 55, 0) + Call(TranslateModel, MODEL_k7, 0, 30, 0) + Call(TranslateModel, MODEL_k8, 0, 5, 0) EVT_DROP_STEP_1(275, -185, 188, 28, 175, MODEL_k1) EVT_DROP_STEP_2(225, -160, 188, 28, 150, MODEL_k2) EVT_DROP_STEP_N(175, -135, 188, 28, 125, MODEL_k3) @@ -153,49 +153,49 @@ EvtScript N(EVS_Scene_DropSteps) = { EVT_DROP_STEP_N (25, -60, 188, 14, 50, MODEL_k6) EVT_DROP_STEP_N(-25, -35, 188, 9, 25, MODEL_k7) EVT_DROP_STEP_L(-75, -10, 188, 4, 0, MODEL_k8) - EVT_CALL(EnableModel, MODEL_kage, TRUE) - EVT_CALL(EnableModel, MODEL_kage_no, FALSE) - EVT_WAIT(30 * DT) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_k1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_k2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_k3, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_k4, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_k5, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_k6, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_k7, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_kaidan, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC_WAIT(N(EVS_Cam_ResetFocus)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_kage, TRUE) + Call(EnableModel, MODEL_kage_no, FALSE) + Wait(30 * DT) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_k1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_k2, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_k3, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_k4, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_k5, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_k6, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_k7, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_kaidan, COLLIDER_FLAGS_UPPER_MASK) + ExecWait(N(EVS_Cam_ResetFocus)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SetupStairs) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH3_HIT_HUGE_BLUE_SWITCH) - EVT_CALL(EnableModel, MODEL_k1, FALSE) - EVT_CALL(EnableModel, MODEL_k2, FALSE) - EVT_CALL(EnableModel, MODEL_k3, FALSE) - EVT_CALL(EnableModel, MODEL_k4, FALSE) - EVT_CALL(EnableModel, MODEL_k5, FALSE) - EVT_CALL(EnableModel, MODEL_k6, FALSE) - EVT_CALL(EnableModel, MODEL_k7, FALSE) - EVT_CALL(EnableModel, MODEL_k8, FALSE) - EVT_CALL(EnableModel, MODEL_kage, FALSE) - EVT_CALL(EnableModel, MODEL_kage_no, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_k1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_k2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_k3, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_k4, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_k5, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_k6, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_k7, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kaidan, COLLIDER_FLAGS_UPPER_MASK) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_yk1, FALSE) - EVT_CALL(EnableModel, MODEL_kage, TRUE) - EVT_CALL(EnableModel, MODEL_kage_no, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH3_HIT_HUGE_BLUE_SWITCH) + Call(EnableModel, MODEL_k1, FALSE) + Call(EnableModel, MODEL_k2, FALSE) + Call(EnableModel, MODEL_k3, FALSE) + Call(EnableModel, MODEL_k4, FALSE) + Call(EnableModel, MODEL_k5, FALSE) + Call(EnableModel, MODEL_k6, FALSE) + Call(EnableModel, MODEL_k7, FALSE) + Call(EnableModel, MODEL_k8, FALSE) + Call(EnableModel, MODEL_kage, FALSE) + Call(EnableModel, MODEL_kage_no, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_k1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_k2, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_k3, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_k4, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_k5, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_k6, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_k7, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_kaidan, COLLIDER_FLAGS_UPPER_MASK) + Else + Call(EnableModel, MODEL_yk1, FALSE) + Call(EnableModel, MODEL_kage, TRUE) + Call(EnableModel, MODEL_kage_no, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Return + End }; diff --git a/src/world/area_obk/obk_03/obk_03_6_npc.c b/src/world/area_obk/obk_03/obk_03_6_npc.c index 0e25b044960..fd6dbac3f3a 100644 --- a/src/world/area_obk/obk_03/obk_03_6_npc.c +++ b/src/world/area_obk/obk_03/obk_03_6_npc.c @@ -10,43 +10,43 @@ s32 N(LetterList_Igor)[] = { }; EvtScript N(EVS_LetterPrompt_Igor) = { - EVT_CALL(N(LetterDelivery_Init), + Call(N(LetterDelivery_Init), NPC_Igor, ANIM_Boo_Talk, ANIM_Boo_Idle, ITEM_LETTER_TO_IGOR, ITEM_NONE, MSG_CH3_005D, MSG_CH3_005E, MSG_CH3_005F, MSG_CH3_0060, - EVT_PTR(N(LetterList_Igor))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) - EVT_RETURN - EVT_END + Ref(N(LetterList_Igor))) + ExecWait(N(EVS_DoLetterDelivery)) + Return + End }; EvtScript N(EVS_LetterReward_Igor) = { - EVT_IF_EQ(LVarC, DELIVERY_ACCEPTED) + IfEq(LVarC, DELIVERY_ACCEPTED) EVT_GIVE_STAR_PIECE() - EVT_END_IF - EVT_RETURN - EVT_END + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Igor) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH3_BOW_JOINED_PARTY) - EVT_EXEC_WAIT(EVS_ShopOwnerDialog) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_005C) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_LetterPrompt_Igor)) - EVT_EXEC_WAIT(N(EVS_LetterReward_Igor)) - EVT_IF_NE(LVarC, 0) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH3_BOW_JOINED_PARTY) + ExecWait(EVS_ShopOwnerDialog) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_005C) + EndIf + ExecWait(N(EVS_LetterPrompt_Igor)) + ExecWait(N(EVS_LetterReward_Igor)) + IfNe(LVarC, 0) + Return + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Igor) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Igor))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Igor))) + Return + End }; NpcData N(NpcData_Igor) = { diff --git a/src/world/area_obk/obk_03/obk_03_7_rocking_chair.c b/src/world/area_obk/obk_03/obk_03_7_rocking_chair.c index e1d582a3348..a0f4609c8c5 100644 --- a/src/world/area_obk/obk_03/obk_03_7_rocking_chair.c +++ b/src/world/area_obk/obk_03/obk_03_7_rocking_chair.c @@ -4,10 +4,10 @@ #include "../common/RockingChair.inc.c" EvtScript N(EVS_SetupRockingChair) = { - EVT_CALL(ParentColliderToModel, COLLIDER_i1, MODEL_i1) - EVT_CALL(ParentColliderToModel, COLLIDER_i2, MODEL_i3) - EVT_CALL(ParentColliderToModel, COLLIDER_i3, MODEL_i3) - EVT_CALL(N(UpdateRockingChair)) - EVT_RETURN - EVT_END + Call(ParentColliderToModel, COLLIDER_i1, MODEL_i1) + Call(ParentColliderToModel, COLLIDER_i2, MODEL_i3) + Call(ParentColliderToModel, COLLIDER_i3, MODEL_i3) + Call(N(UpdateRockingChair)) + Return + End }; diff --git a/src/world/area_obk/obk_04/obk_04_1_music.c b/src/world/area_obk/obk_04/obk_04_1_music.c index ecff24bc928..9450e38d5d8 100644 --- a/src/world/area_obk/obk_04/obk_04_1_music.c +++ b/src/world/area_obk/obk_04/obk_04_1_music.c @@ -1,19 +1,19 @@ #include "obk_04.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_BOOS_MANSION, 0, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_CHEERFUL_BOOS_MANSION, 0, 8) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_BOOS_MANSION, 0, 8) + Else + Call(SetMusicTrack, 0, SONG_CHEERFUL_BOOS_MANSION, 0, 8) + EndIf + Return + End }; EvtScript N(EVS_PlayUpgradeSong) = { - EVT_CALL(PushSong, SONG_ITEM_UPGRADE, 1) - EVT_WAIT(130) - EVT_CALL(PopSong) - EVT_RETURN - EVT_END + Call(PushSong, SONG_ITEM_UPGRADE, 1) + Wait(130) + Call(PopSong) + Return + End }; diff --git a/src/world/area_obk/obk_04/obk_04_2_entity.c b/src/world/area_obk/obk_04/obk_04_2_entity.c index b213d6b30f1..1757e245fce 100644 --- a/src/world/area_obk/obk_04/obk_04_2_entity.c +++ b/src/world/area_obk/obk_04/obk_04_2_entity.c @@ -10,44 +10,44 @@ API_CALLABLE(N(SetItemAlpha)) { } EvtScript N(EVS_OnSmash_Floor) = { - EVT_SET(GF_OBK04_BoardedFloor, TRUE) - EVT_RETURN - EVT_END + Set(GF_OBK04_BoardedFloor, TRUE) + Return + End }; EvtScript N(EVS_OnSmash_Unused) = { - EVT_SET(GF_OBK04_UnusedBoardedFloor, TRUE) - EVT_RETURN - EVT_END + Set(GF_OBK04_UnusedBoardedFloor, TRUE) + Return + End }; EvtScript N(EVS_OpenGiantChest) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(GF_OBK04_GiantChest, TRUE) - EVT_EXEC(N(EVS_Scene_BoosUnleashed)) - EVT_CALL(DisablePlayerInput, FALSE) -EVT_END_IF -EVT_RETURN -EVT_END + Call(DisablePlayerInput, TRUE) + Set(GF_OBK04_GiantChest, TRUE) + Exec(N(EVS_Scene_BoosUnleashed)) + Call(DisablePlayerInput, FALSE) +EndIf +Return +End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_GiantChest), 180, 0, -175, -10, ITEM_NONE, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_OBK04_GiantChest) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenGiantChest))) - EVT_CALL(MakeItemEntity, ITEM_MENU_BOOTS2, NPC_DISPOSE_LOCATION, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_CALL(N(SetItemAlpha)) - EVT_SET(MV_KeepAwayItem, LVar0) - EVT_IF_EQ(GF_OBK04_BoardedFloor, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BoardedFloor), 0, 0, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnSmash_Floor))) - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_WoodenCrate), -60, 0, -190, 0, ITEM_MAPLE_SYRUP, MAKE_ENTITY_END) - EVT_CALL(AssignCrateFlag, GF_OBK04_Crate_MapleSyrup) - EVT_CALL(MakeEntity, EVT_PTR(Entity_WoodenCrate), -60, 30, -190, 0, -1, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_WoodenCrate), -20, 0, -190, 0, -1, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), -175, 0, -75, 0, MODEL_o318, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_OBK04_HiddenPanel) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_GiantChest), 180, 0, -175, -10, ITEM_NONE, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_OBK04_GiantChest) + Call(AssignScript, Ref(N(EVS_OpenGiantChest))) + Call(MakeItemEntity, ITEM_MENU_BOOTS2, NPC_DISPOSE_LOCATION, ITEM_SPAWN_MODE_DECORATION, 0) + Call(N(SetItemAlpha)) + Set(MV_KeepAwayItem, LVar0) + IfEq(GF_OBK04_BoardedFloor, FALSE) + Call(MakeEntity, Ref(Entity_BoardedFloor), 0, 0, 0, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnSmash_Floor))) + EndIf + Call(MakeEntity, Ref(Entity_WoodenCrate), -60, 0, -190, 0, ITEM_MAPLE_SYRUP, MAKE_ENTITY_END) + Call(AssignCrateFlag, GF_OBK04_Crate_MapleSyrup) + Call(MakeEntity, Ref(Entity_WoodenCrate), -60, 30, -190, 0, -1, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_WoodenCrate), -20, 0, -190, 0, -1, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HiddenPanel), -175, 0, -75, 0, MODEL_o318, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_OBK04_HiddenPanel) + Return + End }; diff --git a/src/world/area_obk/obk_04/obk_04_3_npc.c b/src/world/area_obk/obk_04/obk_04_3_npc.c index d7099688fa9..1aa5cb683e5 100644 --- a/src/world/area_obk/obk_04/obk_04_3_npc.c +++ b/src/world/area_obk/obk_04/obk_04_3_npc.c @@ -241,249 +241,249 @@ API_CALLABLE(N(UpdateKeepAwayBoo)) { } EvtScript N(EVS_NpcIdle_Boo_01) = { - EVT_WAIT(4) - EVT_CALL(N(InitHiddenBoo)) - EVT_LABEL(10) - EVT_CALL(N(UpdateHiddenBoo)) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Wait(4) + Call(N(InitHiddenBoo)) + Label(10) + Call(N(UpdateHiddenBoo)) + Wait(1) + Goto(10) + Return + End }; EvtScript N(EVS_NpcIdle_KeepAwayBoo) = { - EVT_WAIT(5) - EVT_CALL(N(InitKeepAwayBoo)) - EVT_LABEL(10) - EVT_CALL(N(UpdateKeepAwayBoo)) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Wait(5) + Call(N(InitKeepAwayBoo)) + Label(10) + Call(N(UpdateKeepAwayBoo)) + Wait(1) + Goto(10) + Return + End }; EvtScript N(EVS_OnHit_KeepAwayBoo) = { - EVT_IF_EQ(MV_ThrowTargetNpc, LVar0) - EVT_SET(MV_KeepAwayResult, KEEP_AWAY_RIGHT) - EVT_ELSE - EVT_SET(MV_KeepAwayResult, KEEP_AWAY_WRONG) - EVT_END_IF - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Boo_Cower) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Boo_Idle) - EVT_END_THREAD - EVT_RETURN - EVT_END + IfEq(MV_ThrowTargetNpc, LVar0) + Set(MV_KeepAwayResult, KEEP_AWAY_RIGHT) + Else + Set(MV_KeepAwayResult, KEEP_AWAY_WRONG) + EndIf + Thread + Call(SetNpcAnimation, NPC_SELF, ANIM_Boo_Cower) + Wait(30) + Call(SetNpcAnimation, NPC_SELF, ANIM_Boo_Idle) + EndThread + Return + End }; EvtScript N(EVS_NpcHit_KeepAwayBoo1) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(LVar0, NPC_KeepAwayBoo1) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_SET(LVar0, NPC_KeepAwayBoo1) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(LVar0, NPC_KeepAwayBoo1) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + CaseEq(ENCOUNTER_TRIGGER_JUMP) + Set(LVar0, NPC_KeepAwayBoo1) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_NpcHit_KeepAwayBoo2) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(LVar0, NPC_KeepAwayBoo2) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_SET(LVar0, NPC_KeepAwayBoo2) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(LVar0, NPC_KeepAwayBoo2) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + CaseEq(ENCOUNTER_TRIGGER_JUMP) + Set(LVar0, NPC_KeepAwayBoo2) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_NpcHit_KeepAwayBoo3) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(LVar0, NPC_KeepAwayBoo3) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_SET(LVar0, NPC_KeepAwayBoo3) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(LVar0, NPC_KeepAwayBoo3) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + CaseEq(ENCOUNTER_TRIGGER_JUMP) + Set(LVar0, NPC_KeepAwayBoo3) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_NpcHit_KeepAwayBoo4) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(LVar0, NPC_KeepAwayBoo4) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_SET(LVar0, NPC_KeepAwayBoo4) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(LVar0, NPC_KeepAwayBoo4) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + CaseEq(ENCOUNTER_TRIGGER_JUMP) + Set(LVar0, NPC_KeepAwayBoo4) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_NpcHit_KeepAwayBoo5) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(LVar0, NPC_KeepAwayBoo5) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_SET(LVar0, NPC_KeepAwayBoo5) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(LVar0, NPC_KeepAwayBoo5) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + CaseEq(ENCOUNTER_TRIGGER_JUMP) + Set(LVar0, NPC_KeepAwayBoo5) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_NpcHit_KeepAwayBoo6) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(LVar0, NPC_KeepAwayBoo6) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_SET(LVar0, NPC_KeepAwayBoo6) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(LVar0, NPC_KeepAwayBoo6) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + CaseEq(ENCOUNTER_TRIGGER_JUMP) + Set(LVar0, NPC_KeepAwayBoo6) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_NpcHit_KeepAwayBoo7) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(LVar0, NPC_KeepAwayBoo7) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_SET(LVar0, NPC_KeepAwayBoo7) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(LVar0, NPC_KeepAwayBoo7) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + CaseEq(ENCOUNTER_TRIGGER_JUMP) + Set(LVar0, NPC_KeepAwayBoo7) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_NpcHit_KeepAwayBoo8) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(LVar0, NPC_KeepAwayBoo8) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_SET(LVar0, NPC_KeepAwayBoo8) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(LVar0, NPC_KeepAwayBoo8) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + CaseEq(ENCOUNTER_TRIGGER_JUMP) + Set(LVar0, NPC_KeepAwayBoo8) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Boo_01) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Boo_01))) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Boo_01))) + IfGe(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_KeepAwayBoo1) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_KeepAwayBoo))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_KeepAwayBoo1))) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_KeepAwayBoo))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_KeepAwayBoo1))) + IfGe(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_KeepAwayBoo2) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_KeepAwayBoo))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_KeepAwayBoo2))) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_KeepAwayBoo))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_KeepAwayBoo2))) + IfGe(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_KeepAwayBoo3) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_KeepAwayBoo))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_KeepAwayBoo3))) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_KeepAwayBoo))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_KeepAwayBoo3))) + IfGe(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_KeepAwayBoo4) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_KeepAwayBoo))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_KeepAwayBoo4))) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_KeepAwayBoo))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_KeepAwayBoo4))) + IfGe(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_KeepAwayBoo5) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_KeepAwayBoo))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_KeepAwayBoo5))) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_KeepAwayBoo))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_KeepAwayBoo5))) + IfGe(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_KeepAwayBoo6) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_KeepAwayBoo))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_KeepAwayBoo6))) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_KeepAwayBoo))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_KeepAwayBoo6))) + IfGe(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_KeepAwayBoo7) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_KeepAwayBoo))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_KeepAwayBoo7))) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_KeepAwayBoo))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_KeepAwayBoo7))) + IfGe(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_KeepAwayBoo8) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_KeepAwayBoo))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_KeepAwayBoo8))) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_KeepAwayBoo))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_KeepAwayBoo8))) + IfGe(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_Boo_01) = { @@ -586,38 +586,38 @@ NpcData N(NpcData_KeepAwayBoo8) = { }; EvtScript N(EVS_NpcInit_Boo_10) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInit_Boo_11) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, TRUE) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, TRUE) + Return + End }; EvtScript N(EVS_NpcInteract_TutorialBoo) = { - EVT_IF_EQ(GF_OBK04_HiddenPanel, FALSE) - EVT_CALL(SpeakToPlayer, NPC_TutorialBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_003F) - EVT_ELSE - EVT_IF_EQ(GF_OBK04_HeardAboutHiddenPanels, FALSE) - EVT_CALL(SpeakToPlayer, NPC_TutorialBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0040) - EVT_SET(GF_OBK04_HeardAboutHiddenPanels, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_TutorialBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0041) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_OBK04_HiddenPanel, FALSE) + Call(SpeakToPlayer, NPC_TutorialBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_003F) + Else + IfEq(GF_OBK04_HeardAboutHiddenPanels, FALSE) + Call(SpeakToPlayer, NPC_TutorialBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0040) + Set(GF_OBK04_HeardAboutHiddenPanels, TRUE) + Else + Call(SpeakToPlayer, NPC_TutorialBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0041) + EndIf + EndIf + Return + End }; EvtScript N(EVS_NpcInit_TutorialBoo) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_TutorialBoo))) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS) - EVT_CALL(SetNpcPos, NPC_TutorialBoo, -160, 10, -175) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_TutorialBoo))) + IfGe(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS) + Call(SetNpcPos, NPC_TutorialBoo, -160, 10, -175) + EndIf + Return + End }; NpcData N(NpcData_KeepAwayExtras)[] = { diff --git a/src/world/area_obk/obk_04/obk_04_4_main.c b/src/world/area_obk/obk_04/obk_04_4_main.c index 7f3de781fb2..a85109ba67f 100644 --- a/src/world/area_obk/obk_04/obk_04_4_main.c +++ b/src/world/area_obk/obk_04/obk_04_4_main.c @@ -2,83 +2,83 @@ #include "effects.h" EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(obk_04_ENTRY_0) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, -150, LVar2, 0) - EVT_END_THREAD - EVT_CALL(EnableModel, MODEL_door_off1, FALSE) - EVT_CALL(EnableModel, MODEL_door_off2, FALSE) - EVT_SET(LVar2, MODEL_door1) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_CALL(EnableModel, MODEL_door_off1, TRUE) - EVT_CALL(EnableModel, MODEL_door_off2, TRUE) - EVT_WAIT(20) - EVT_CALL(MakeLerp, 0, -90, 15, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_door1, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, -215, 0, 25, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, -215, 0, -25, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, -200, 0, 25, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, -200, 0, -25, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, -185, 0, 25, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, -185, 0, -25, 0) - EVT_WAIT(20) - EVT_CALL(EnableModel, MODEL_door1, FALSE) - EVT_CALL(MakeLerp, 0, 10, 15, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_door_off1, LVar0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(EnableModel, MODEL_door_off3, FALSE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(obk_04_ENTRY_0) + Thread + Wait(10) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, -150, LVar2, 0) + EndThread + Call(EnableModel, MODEL_door_off1, FALSE) + Call(EnableModel, MODEL_door_off2, FALSE) + Set(LVar2, MODEL_door1) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + Call(EnableModel, MODEL_door_off1, TRUE) + Call(EnableModel, MODEL_door_off2, TRUE) + Wait(20) + Call(MakeLerp, 0, -90, 15, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_door1, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + PlayEffect(EFFECT_LANDING_DUST, 1, -215, 0, 25, 0) + PlayEffect(EFFECT_LANDING_DUST, 1, -215, 0, -25, 0) + PlayEffect(EFFECT_LANDING_DUST, 1, -200, 0, 25, 0) + PlayEffect(EFFECT_LANDING_DUST, 1, -200, 0, -25, 0) + PlayEffect(EFFECT_LANDING_DUST, 1, -185, 0, 25, 0) + PlayEffect(EFFECT_LANDING_DUST, 1, -185, 0, -25, 0) + Wait(20) + Call(EnableModel, MODEL_door1, FALSE) + Call(MakeLerp, 0, 10, 15, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_door_off1, LVar0, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(EnableModel, MODEL_door_off3, FALSE) + EndSwitch + Return + End }; EvtScript N(EVS_TexPan_Fog) = { - EVT_THREAD - EVT_CALL(SetTexPanner, MODEL_m1, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_m2, TEX_PANNER_0) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LABEL(20) - EVT_ADD(LVar0, 300) - EVT_ADD(LVar1, 100) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, LVar0, LVar1) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + Call(SetTexPanner, MODEL_m1, TEX_PANNER_0) + Call(SetTexPanner, MODEL_m2, TEX_PANNER_0) + Set(LVar0, 0) + Set(LVar1, 0) + Label(20) + Add(LVar0, 300) + Add(LVar1, 100) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, LVar0, LVar1) + Wait(1) + Goto(20) + EndThread + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOOS_MANSION) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_ManageHole)) - EVT_EXEC(N(EVS_TexPan_Fog)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_hip1, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOOS_MANSION) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_ManageHole)) + Exec(N(EVS_TexPan_Fog)) + Exec(N(EVS_EnterMap)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_hip1, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_obk/obk_04/obk_04_5_hole.c b/src/world/area_obk/obk_04/obk_04_5_hole.c index 2ae64f9dbb6..f58ea7f4ab2 100644 --- a/src/world/area_obk/obk_04/obk_04_5_hole.c +++ b/src/world/area_obk/obk_04/obk_04_5_hole.c @@ -8,10 +8,10 @@ API_CALLABLE(N(AwaitPlayerEnterHole)) { } EvtScript N(EVS_ManageHole) = { - EVT_CALL(N(AwaitPlayerEnterHole)) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(GotoMap, EVT_PTR("obk_03"), obk_03_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(N(AwaitPlayerEnterHole)) + Call(DisablePlayerPhysics, TRUE) + Call(GotoMap, Ref("obk_03"), obk_03_ENTRY_2) + Wait(100) + Return + End }; diff --git a/src/world/area_obk/obk_04/obk_04_6_game.c b/src/world/area_obk/obk_04/obk_04_6_game.c index 730a0ceefbf..a5c089ac42e 100644 --- a/src/world/area_obk/obk_04/obk_04_6_game.c +++ b/src/world/area_obk/obk_04/obk_04_6_game.c @@ -140,381 +140,381 @@ API_CALLABLE(N(WaitForFirstCarrier)) { } EvtScript N(EVS_TetherItemToDummy) = { - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_DummyBoo, LVar0, LVar1, LVar2) - EVT_CALL(SetItemPos, MV_KeepAwayItem, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetNpcPos, NPC_DummyBoo, LVar0, LVar1, LVar2) + Call(SetItemPos, MV_KeepAwayItem, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_IntroduceAndHideBoots) = { - EVT_CALL(N(WaitForFirstCarrier)) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(MakeLerp, 255, 0, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetItemAlpha, MV_KeepAwayItem, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_LOOP(20) - EVT_CALL(GetNpcPos, NPC_KeepAwayBoo1, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_DummyBoo, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_DummyBoo, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END + Call(N(WaitForFirstCarrier)) + Thread + Wait(10) + Call(MakeLerp, 255, 0, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetItemAlpha, MV_KeepAwayItem, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Loop(20) + Call(GetNpcPos, NPC_KeepAwayBoo1, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_DummyBoo, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(SetNpcPos, NPC_DummyBoo, NPC_DISPOSE_LOCATION) + Return + End }; // useless EvtScript N(EVS_DetermineCarrierNPC) = { - EVT_SWITCH(MV_ThrowTargetNpc) - EVT_CASE_EQ(NPC_Boo_01) - EVT_SET(MV_ItemCarrierNpc, NPC_Boo_01) - EVT_CASE_EQ(NPC_KeepAwayBoo1) - EVT_SET(MV_ItemCarrierNpc, NPC_KeepAwayBoo1) - EVT_CASE_EQ(NPC_KeepAwayBoo2) - EVT_SET(MV_ItemCarrierNpc, NPC_KeepAwayBoo2) - EVT_CASE_EQ(NPC_KeepAwayBoo3) - EVT_SET(MV_ItemCarrierNpc, NPC_KeepAwayBoo3) - EVT_CASE_EQ(NPC_KeepAwayBoo4) - EVT_SET(MV_ItemCarrierNpc, NPC_KeepAwayBoo4) - EVT_CASE_EQ(NPC_KeepAwayBoo5) - EVT_SET(MV_ItemCarrierNpc, NPC_KeepAwayBoo5) - EVT_CASE_EQ(NPC_KeepAwayBoo6) - EVT_SET(MV_ItemCarrierNpc, NPC_KeepAwayBoo6) - EVT_CASE_EQ(NPC_KeepAwayBoo7) - EVT_SET(MV_ItemCarrierNpc, NPC_KeepAwayBoo7) - EVT_CASE_EQ(NPC_KeepAwayBoo8) - EVT_SET(MV_ItemCarrierNpc, NPC_KeepAwayBoo8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(MV_ThrowTargetNpc) + CaseEq(NPC_Boo_01) + Set(MV_ItemCarrierNpc, NPC_Boo_01) + CaseEq(NPC_KeepAwayBoo1) + Set(MV_ItemCarrierNpc, NPC_KeepAwayBoo1) + CaseEq(NPC_KeepAwayBoo2) + Set(MV_ItemCarrierNpc, NPC_KeepAwayBoo2) + CaseEq(NPC_KeepAwayBoo3) + Set(MV_ItemCarrierNpc, NPC_KeepAwayBoo3) + CaseEq(NPC_KeepAwayBoo4) + Set(MV_ItemCarrierNpc, NPC_KeepAwayBoo4) + CaseEq(NPC_KeepAwayBoo5) + Set(MV_ItemCarrierNpc, NPC_KeepAwayBoo5) + CaseEq(NPC_KeepAwayBoo6) + Set(MV_ItemCarrierNpc, NPC_KeepAwayBoo6) + CaseEq(NPC_KeepAwayBoo7) + Set(MV_ItemCarrierNpc, NPC_KeepAwayBoo7) + CaseEq(NPC_KeepAwayBoo8) + Set(MV_ItemCarrierNpc, NPC_KeepAwayBoo8) + EndSwitch + Return + End }; EvtScript N(EVS_BooAppear) = { - EVT_WAIT(10) - EVT_CALL(MakeLerp, 0, 255, 60, EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcImgFXParams, LVarA, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Wait(10) + Call(MakeLerp, 0, 255, 60, EASING_LINEAR) + Label(0) + Call(UpdateLerp) + Call(SetNpcImgFXParams, LVarA, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Return + End }; EvtScript N(EVS_BooSpookAndVanish) = { - EVT_CALL(SetNpcFlagBits, LVarA, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, FALSE) - EVT_CALL(NpcFacePlayer, LVarA, 0) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, LVarA, ANIM_Boo_Spook) - EVT_WAIT(10) - EVT_CALL(MakeLerp, 255, 0, 60, EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcImgFXParams, LVarA, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetNpcPos, LVarA, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, LVarA, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, FALSE) + Call(NpcFacePlayer, LVarA, 0) + Wait(5) + Call(SetNpcAnimation, LVarA, ANIM_Boo_Spook) + Wait(10) + Call(MakeLerp, 255, 0, 60, EASING_LINEAR) + Label(0) + Call(UpdateLerp) + Call(SetNpcImgFXParams, LVarA, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(SetNpcPos, LVarA, NPC_DISPOSE_LOCATION) + Return + End }; EvtScript N(EVS_SpawnGotSuperBootsFX) = { - EVT_THREAD - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(8.0), 0, EVT_FLOAT(300.0), EVT_FLOAT(17.5), EVT_FLOAT(-9.5)) - EVT_END_THREAD - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_Lift) - EVT_CALL(GetPlayerPos, LVar5, LVar6, LVar7) - EVT_ADD(LVar6, 40) - EVT_CALL(MakeItemEntity, ITEM_SUPER_BOOTS, LVar5, LVar6, LVar7, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVarC, LVar0) - EVT_ADD(LVar6, 16) - EVT_PLAY_EFFECT(EFFECT_GOT_ITEM_OUTLINE, 0, LVar5, LVar6, LVar7, EVT_FLOAT(1.0), LVar8) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 9, LVar5, LVar6, LVar7, EVT_FLOAT(1.0), 100) - EVT_THREAD - EVT_WAIT(4) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_ADD(LVar4, 50) - EVT_ADD(LVar5, 2) - EVT_ADD(LVar3, 8) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 3, LVar3, LVar4, LVar5, 20) - EVT_ADD(LVar3, -16) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 3, LVar3, LVar4, LVar5, 20) - EVT_END_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_EQ(MF_WaitForUpgradeDone, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DismissItemOutline, LVar8) - EVT_CALL(RemoveItemEntity, LVarC) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_THREAD - EVT_CALL(ResetCam, CAM_DEFAULT, 3) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + Call(AdjustCam, CAM_DEFAULT, Float(8.0), 0, Float(300.0), Float(17.5), Float(-9.5)) + EndThread + Call(SetPlayerAnimation, ANIM_MarioW1_Lift) + Call(GetPlayerPos, LVar5, LVar6, LVar7) + Add(LVar6, 40) + Call(MakeItemEntity, ITEM_SUPER_BOOTS, LVar5, LVar6, LVar7, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVarC, LVar0) + Add(LVar6, 16) + PlayEffect(EFFECT_GOT_ITEM_OUTLINE, 0, LVar5, LVar6, LVar7, Float(1.0), LVar8) + PlayEffect(EFFECT_RADIAL_SHIMMER, 9, LVar5, LVar6, LVar7, Float(1.0), 100) + Thread + Wait(4) + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Add(LVar4, 50) + Add(LVar5, 2) + Add(LVar3, 8) + PlayEffect(EFFECT_SPARKLES, 3, LVar3, LVar4, LVar5, 20) + Add(LVar3, -16) + PlayEffect(EFFECT_SPARKLES, 3, LVar3, LVar4, LVar5, 20) + EndThread + Loop(0) + Wait(1) + IfEq(MF_WaitForUpgradeDone, TRUE) + BreakLoop + EndIf + EndLoop + Call(DismissItemOutline, LVar8) + Call(RemoveItemEntity, LVarC) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Thread + Call(ResetCam, CAM_DEFAULT, 3) + EndThread + Return + End }; EvtScript N(EVS_Scene_BoosUnleashed) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetMusicTrack, 0, SONG_BOO_MINIGAME, 0, 8) - EVT_EXEC(N(EVS_TetherItemToDummy)) - EVT_WAIT(1) - EVT_EXEC(N(EVS_IntroduceAndHideBoots)) - EVT_SET(MV_KeepAwayStarted, TRUE) - EVT_WAIT(30) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(2.0), 0, 0, 0, EVT_FLOAT(400.0), EVT_FLOAT(15.0), EVT_FLOAT(-7.0)) - EVT_WAIT(60) - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(2.0), 0, 0, 0, EVT_FLOAT(325.0), EVT_FLOAT(13.0), EVT_FLOAT(-13.0)) + Call(DisablePlayerInput, TRUE) + Call(SetMusicTrack, 0, SONG_BOO_MINIGAME, 0, 8) + Exec(N(EVS_TetherItemToDummy)) + Wait(1) + Exec(N(EVS_IntroduceAndHideBoots)) + Set(MV_KeepAwayStarted, TRUE) + Wait(30) + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + Wait(20) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(InterpPlayerYaw, 270, 0) + Call(SetCamProperties, CAM_DEFAULT, Float(2.0), 0, 0, 0, Float(400.0), Float(15.0), Float(-7.0)) + Wait(60) + Call(SetCamProperties, CAM_DEFAULT, Float(2.0), 0, 0, 0, Float(325.0), Float(13.0), Float(-13.0)) // have item appear with leader via dummy NPC - EVT_CALL(SetNpcPos, NPC_LeaderBoo, 0, 45, 20) - EVT_CALL(SetNpcPos, NPC_DummyBoo, 0, 65, 0) - EVT_CALL(MakeLerp, 0, 255, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcImgFXParams, NPC_LeaderBoo, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_CALL(SetItemAlpha, MV_KeepAwayItem, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP + Call(SetNpcPos, NPC_LeaderBoo, 0, 45, 20) + Call(SetNpcPos, NPC_DummyBoo, 0, 65, 0) + Call(MakeLerp, 0, 255, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcImgFXParams, NPC_LeaderBoo, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Call(SetItemAlpha, MV_KeepAwayItem, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop // explain the game - EVT_CALL(SpeakToPlayer, NPC_LeaderBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_003A) - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(2.0), 0, 0, 0, EVT_FLOAT(450.0), EVT_FLOAT(15.0), EVT_FLOAT(-7.0)) - EVT_CALL(SpeakToPlayer, NPC_LeaderBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_003B) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_EQ(MV_Unk_02, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(MV_KeepAwayRound, 0) - EVT_LABEL(100) - EVT_ADD(MV_KeepAwayRound, 1) - EVT_IF_GE(MV_KeepAwayRound, 10) - EVT_SET(MV_KeepAwayRound, 10) - EVT_END_IF - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(2.0), 0, 0, 0, EVT_FLOAT(500.0), EVT_FLOAT(15.0), EVT_FLOAT(-7.0)) - EVT_WAIT(20) + Call(SpeakToPlayer, NPC_LeaderBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_003A) + Call(SetCamProperties, CAM_DEFAULT, Float(2.0), 0, 0, 0, Float(450.0), Float(15.0), Float(-7.0)) + Call(SpeakToPlayer, NPC_LeaderBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_003B) + Loop(0) + Wait(1) + IfEq(MV_Unk_02, 1) + BreakLoop + EndIf + EndLoop + Set(MV_KeepAwayRound, 0) + Label(100) + Add(MV_KeepAwayRound, 1) + IfGe(MV_KeepAwayRound, 10) + Set(MV_KeepAwayRound, 10) + EndIf + Call(SetCamProperties, CAM_DEFAULT, Float(2.0), 0, 0, 0, Float(500.0), Float(15.0), Float(-7.0)) + Wait(20) // first throw -- from leader // choose which boo will have the item next - EVT_CALL(RandInt, KEEP_AWAY_BOO_7, LVar0) - EVT_SET(MV_KeepAwayTarget, LVar0) + Call(RandInt, KEEP_AWAY_BOO_7, LVar0) + Set(MV_KeepAwayTarget, LVar0) // jump dummy to the location of that NPC - EVT_SET(LVar1, 30) - EVT_CALL(N(GetKeepAwayCarrierYaw)) - EVT_CALL(N(GetItemJumpDest)) - EVT_CALL(PlaySoundAtNpc, NPC_DummyBoo, SOUND_THROW, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcJumpscale, NPC_DummyBoo, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_DummyBoo, LVar0, LVar1, LVar2, 14 * DT) - EVT_CALL(SetNpcPos, NPC_DummyBoo, NPC_DISPOSE_LOCATION) - EVT_WAIT(30 * DT) - EVT_THREAD - EVT_CALL(MakeLerp, 255, 0, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcImgFXParams, NPC_LeaderBoo, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD + Set(LVar1, 30) + Call(N(GetKeepAwayCarrierYaw)) + Call(N(GetItemJumpDest)) + Call(PlaySoundAtNpc, NPC_DummyBoo, SOUND_THROW, SOUND_SPACE_DEFAULT) + Call(SetNpcJumpscale, NPC_DummyBoo, Float(1.0)) + Call(NpcJump0, NPC_DummyBoo, LVar0, LVar1, LVar2, 14 * DT) + Call(SetNpcPos, NPC_DummyBoo, NPC_DISPOSE_LOCATION) + Wait(30 * DT) + Thread + Call(MakeLerp, 255, 0, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcImgFXParams, NPC_LeaderBoo, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread // throw between 4-10 times - EVT_CALL(RandInt, 4, MV_KeepAwayThrows) - EVT_ADD(MV_KeepAwayThrows, 6) - EVT_LOOP(0) - EVT_CALL(N(GetKeepAwayCarrierPos)) + Call(RandInt, 4, MV_KeepAwayThrows) + Add(MV_KeepAwayThrows, 6) + Loop(0) + Call(N(GetKeepAwayCarrierPos)) // choose which boo will have the item next - EVT_CALL(SetNpcPos, NPC_DummyBoo, LVar0, LVar1, LVar2) - EVT_CALL(RandInt, KEEP_AWAY_BOO_7, LVar0) - EVT_IF_EQ(MV_KeepAwayTarget, LVar0) - EVT_ADD(LVar0, 4) - EVT_IF_GE(LVar0, 8) - EVT_SUB(LVar0, 8) - EVT_END_IF - EVT_END_IF - EVT_SET(MV_KeepAwayTarget, LVar0) + Call(SetNpcPos, NPC_DummyBoo, LVar0, LVar1, LVar2) + Call(RandInt, KEEP_AWAY_BOO_7, LVar0) + IfEq(MV_KeepAwayTarget, LVar0) + Add(LVar0, 4) + IfGe(LVar0, 8) + Sub(LVar0, 8) + EndIf + EndIf + Set(MV_KeepAwayTarget, LVar0) // jump dummy to the location of that NPC - EVT_SET(LVar1, 30) - EVT_CALL(N(GetKeepAwayCarrierYaw)) - EVT_CALL(N(GetItemJumpDest)) - EVT_CALL(PlaySoundAtNpc, NPC_DummyBoo, SOUND_THROW, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcJumpscale, NPC_DummyBoo, EVT_FLOAT(1.5)) - EVT_CALL(NpcJump0, NPC_DummyBoo, LVar0, LVar1, LVar2, 14 * DT) - EVT_CALL(SetNpcPos, NPC_DummyBoo, NPC_DISPOSE_LOCATION) - EVT_CALL(RandInt, 10 * DT, LVar0) - EVT_ADD(LVar0, 5 * DT) - EVT_WAIT(LVar0) - EVT_ADD(MV_KeepAwayThrows, -1) - EVT_IF_EQ(MV_KeepAwayThrows, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(MV_KeepAwayMovement, KEEP_AWAY_SPIRAL) - EVT_CALL(RandInt, 50, LVar0) - EVT_ADD(LVar0, 100) - EVT_WAIT(LVar0) - EVT_CALL(MakeLerp, 0, 255, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcImgFXParams, NPC_LeaderBoo, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SpeakToPlayer, NPC_LeaderBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 5, MSG_CH3_003C) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_NE(MV_KeepAwayResult, KEEP_AWAY_WAITING) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(MV_KeepAwayMovement, KEEP_AWAY_STOP) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_EQ(MV_KeepAwayResult, KEEP_AWAY_WRONG) + Set(LVar1, 30) + Call(N(GetKeepAwayCarrierYaw)) + Call(N(GetItemJumpDest)) + Call(PlaySoundAtNpc, NPC_DummyBoo, SOUND_THROW, SOUND_SPACE_DEFAULT) + Call(SetNpcJumpscale, NPC_DummyBoo, Float(1.5)) + Call(NpcJump0, NPC_DummyBoo, LVar0, LVar1, LVar2, 14 * DT) + Call(SetNpcPos, NPC_DummyBoo, NPC_DISPOSE_LOCATION) + Call(RandInt, 10 * DT, LVar0) + Add(LVar0, 5 * DT) + Wait(LVar0) + Add(MV_KeepAwayThrows, -1) + IfEq(MV_KeepAwayThrows, 0) + BreakLoop + EndIf + EndLoop + Set(MV_KeepAwayMovement, KEEP_AWAY_SPIRAL) + Call(RandInt, 50, LVar0) + Add(LVar0, 100) + Wait(LVar0) + Call(MakeLerp, 0, 255, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcImgFXParams, NPC_LeaderBoo, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SpeakToPlayer, NPC_LeaderBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 5, MSG_CH3_003C) + Call(DisablePlayerInput, FALSE) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Loop(0) + Wait(1) + IfNe(MV_KeepAwayResult, KEEP_AWAY_WAITING) + BreakLoop + EndIf + EndLoop + Set(MV_KeepAwayMovement, KEEP_AWAY_STOP) + Call(DisablePlayerInput, TRUE) + IfEq(MV_KeepAwayResult, KEEP_AWAY_WRONG) // player hit the wrong Boo, begin another round - EVT_WAIT(20) - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(2.0), 0, 0, 0, EVT_FLOAT(450.0), EVT_FLOAT(15.0), EVT_FLOAT(-7.0)) - EVT_WAIT(30) - EVT_EXEC_WAIT(N(EVS_DetermineCarrierNPC)) - EVT_CALL(GetNpcPos, MV_ItemCarrierNpc, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_DummyBoo, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_DummyBoo, LVar3, LVar4, LVar5) - EVT_SET(LVar6, 25) - EVT_ADD(LVar6, LVar4) - EVT_CALL(MakeLerp, LVar4, LVar6, 20, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, NPC_DummyBoo, LVar3, LVar0, LVar5) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SpeakToPlayer, MV_ItemCarrierNpc, ANIM_Boo_Talk, ANIM_Boo_Idle, 5, MSG_CH3_003E) - EVT_CALL(PlaySoundAtNpc, NPC_DummyBoo, SOUND_THROW, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcJumpscale, NPC_DummyBoo, EVT_FLOAT(2.0)) - EVT_CALL(NpcJump0, NPC_DummyBoo, 0, 65, 0, 10) - EVT_CALL(SpeakToPlayer, NPC_LeaderBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 5, MSG_CH3_003B) - EVT_SET(MV_KeepAwayResult, KEEP_AWAY_WAITING) - EVT_SET(MV_KeepAwayMovement, KEEP_AWAY_CLOCKWISE) - EVT_CALL(N(GetPlayerPosOutsideKeepAwayRing)) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(4.0)) - EVT_CALL(PlayerMoveTo, LVar0, LVar2, 0) - EVT_WAIT(30) - EVT_GOTO(100) - EVT_END_IF - EVT_LOOP(0) - EVT_CALL(GetPlayerActionState, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, ACTION_STATE_IDLE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC_WAIT(N(EVS_DetermineCarrierNPC)) - EVT_CALL(GetNpcPos, MV_ItemCarrierNpc, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(SetNpcPos, NPC_DummyBoo, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 30) - EVT_CALL(PlaySoundAtNpc, NPC_DummyBoo, SOUND_THROW, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcJumpscale, NPC_DummyBoo, EVT_FLOAT(2.0)) - EVT_CALL(NpcJump0, NPC_DummyBoo, LVar0, LVar1, LVar2, 10) - EVT_WAIT(10) - EVT_CALL(SetNpcPos, NPC_DummyBoo, NPC_DISPOSE_LOCATION) - EVT_WAIT(1) - EVT_SET(MF_WaitForUpgradeDone, FALSE) - EVT_EXEC(N(EVS_PlayUpgradeSong)) - EVT_EXEC(N(EVS_SpawnGotSuperBootsFX)) - EVT_CALL(N(UpgradeBootsToSuper)) - EVT_WAIT(30) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0180, 160, 40) - EVT_SET(MF_WaitForUpgradeDone, TRUE) - EVT_WAIT(30) - EVT_CALL(N(GetPlayerPosOutsideKeepAwayRing)) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(4.0)) - EVT_CALL(PlayerMoveTo, LVar0, LVar2, 0) - EVT_WAIT(20) - EVT_CALL(GetNpcPos, NPC_LeaderBoo, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_LeaderBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_003D) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(450.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(PlaySound, SOUND_BOO_SPOOK) - EVT_END_THREAD - EVT_SET(LVarA, NPC_KeepAwayBoo1) - EVT_EXEC(N(EVS_BooSpookAndVanish)) - EVT_SET(LVarA, NPC_KeepAwayBoo2) - EVT_EXEC(N(EVS_BooSpookAndVanish)) - EVT_SET(LVarA, NPC_KeepAwayBoo3) - EVT_EXEC(N(EVS_BooSpookAndVanish)) - EVT_SET(LVarA, NPC_KeepAwayBoo4) - EVT_EXEC(N(EVS_BooSpookAndVanish)) - EVT_SET(LVarA, NPC_KeepAwayBoo5) - EVT_EXEC(N(EVS_BooSpookAndVanish)) - EVT_SET(LVarA, NPC_KeepAwayBoo6) - EVT_EXEC(N(EVS_BooSpookAndVanish)) - EVT_SET(LVarA, NPC_KeepAwayBoo7) - EVT_EXEC(N(EVS_BooSpookAndVanish)) - EVT_SET(LVarA, NPC_KeepAwayBoo8) - EVT_EXEC(N(EVS_BooSpookAndVanish)) - EVT_SET(LVarA, NPC_LeaderBoo) - EVT_EXEC(N(EVS_BooSpookAndVanish)) - EVT_WAIT(60) - EVT_CALL(SetNpcPos, NPC_TutorialBoo, -160, 10, -175) - EVT_CALL(SetNpcImgFXParams, NPC_TutorialBoo, IMGFX_SET_ALPHA, 0, 0, 0, 0) - EVT_SET(LVarA, NPC_TutorialBoo) - EVT_EXEC(N(EVS_BooAppear)) - EVT_WAIT(60) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(450.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_WAIT(20) - EVT_SET(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Wait(20) + Call(SetCamProperties, CAM_DEFAULT, Float(2.0), 0, 0, 0, Float(450.0), Float(15.0), Float(-7.0)) + Wait(30) + ExecWait(N(EVS_DetermineCarrierNPC)) + Call(GetNpcPos, MV_ItemCarrierNpc, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_DummyBoo, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_DummyBoo, LVar3, LVar4, LVar5) + Set(LVar6, 25) + Add(LVar6, LVar4) + Call(MakeLerp, LVar4, LVar6, 20, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcPos, NPC_DummyBoo, LVar3, LVar0, LVar5) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SpeakToPlayer, MV_ItemCarrierNpc, ANIM_Boo_Talk, ANIM_Boo_Idle, 5, MSG_CH3_003E) + Call(PlaySoundAtNpc, NPC_DummyBoo, SOUND_THROW, SOUND_SPACE_DEFAULT) + Call(SetNpcJumpscale, NPC_DummyBoo, Float(2.0)) + Call(NpcJump0, NPC_DummyBoo, 0, 65, 0, 10) + Call(SpeakToPlayer, NPC_LeaderBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 5, MSG_CH3_003B) + Set(MV_KeepAwayResult, KEEP_AWAY_WAITING) + Set(MV_KeepAwayMovement, KEEP_AWAY_CLOCKWISE) + Call(N(GetPlayerPosOutsideKeepAwayRing)) + Call(SetPlayerSpeed, Float(4.0)) + Call(PlayerMoveTo, LVar0, LVar2, 0) + Wait(30) + Goto(100) + EndIf + Loop(0) + Call(GetPlayerActionState, LVar0) + Wait(1) + IfEq(LVar0, ACTION_STATE_IDLE) + BreakLoop + EndIf + EndLoop + ExecWait(N(EVS_DetermineCarrierNPC)) + Call(GetNpcPos, MV_ItemCarrierNpc, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(SetNpcPos, NPC_DummyBoo, LVar0, LVar1, LVar2) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 30) + Call(PlaySoundAtNpc, NPC_DummyBoo, SOUND_THROW, SOUND_SPACE_DEFAULT) + Call(SetNpcJumpscale, NPC_DummyBoo, Float(2.0)) + Call(NpcJump0, NPC_DummyBoo, LVar0, LVar1, LVar2, 10) + Wait(10) + Call(SetNpcPos, NPC_DummyBoo, NPC_DISPOSE_LOCATION) + Wait(1) + Set(MF_WaitForUpgradeDone, FALSE) + Exec(N(EVS_PlayUpgradeSong)) + Exec(N(EVS_SpawnGotSuperBootsFX)) + Call(N(UpgradeBootsToSuper)) + Wait(30) + Call(ShowMessageAtScreenPos, MSG_Menus_0180, 160, 40) + Set(MF_WaitForUpgradeDone, TRUE) + Wait(30) + Call(N(GetPlayerPosOutsideKeepAwayRing)) + Call(SetPlayerSpeed, Float(4.0)) + Call(PlayerMoveTo, LVar0, LVar2, 0) + Wait(20) + Call(GetNpcPos, NPC_LeaderBoo, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(350.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_LeaderBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_003D) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(450.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20) + Thread + Wait(30) + Call(PlaySound, SOUND_BOO_SPOOK) + EndThread + Set(LVarA, NPC_KeepAwayBoo1) + Exec(N(EVS_BooSpookAndVanish)) + Set(LVarA, NPC_KeepAwayBoo2) + Exec(N(EVS_BooSpookAndVanish)) + Set(LVarA, NPC_KeepAwayBoo3) + Exec(N(EVS_BooSpookAndVanish)) + Set(LVarA, NPC_KeepAwayBoo4) + Exec(N(EVS_BooSpookAndVanish)) + Set(LVarA, NPC_KeepAwayBoo5) + Exec(N(EVS_BooSpookAndVanish)) + Set(LVarA, NPC_KeepAwayBoo6) + Exec(N(EVS_BooSpookAndVanish)) + Set(LVarA, NPC_KeepAwayBoo7) + Exec(N(EVS_BooSpookAndVanish)) + Set(LVarA, NPC_KeepAwayBoo8) + Exec(N(EVS_BooSpookAndVanish)) + Set(LVarA, NPC_LeaderBoo) + Exec(N(EVS_BooSpookAndVanish)) + Wait(60) + Call(SetNpcPos, NPC_TutorialBoo, -160, 10, -175) + Call(SetNpcImgFXParams, NPC_TutorialBoo, IMGFX_SET_ALPHA, 0, 0, 0, 0) + Set(LVarA, NPC_TutorialBoo) + Exec(N(EVS_BooAppear)) + Wait(60) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(450.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Wait(20) + Set(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_obk/obk_05/obk_05_1_music.c b/src/world/area_obk/obk_05/obk_05_1_music.c index d2e222b8536..2dcd4371a8a 100644 --- a/src/world/area_obk/obk_05/obk_05_1_music.c +++ b/src/world/area_obk/obk_05/obk_05_1_music.c @@ -1,11 +1,11 @@ #include "obk_05.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_BOOS_MANSION, 0, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_CHEERFUL_BOOS_MANSION, 0, 8) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_BOOS_MANSION, 0, 8) + Else + Call(SetMusicTrack, 0, SONG_CHEERFUL_BOOS_MANSION, 0, 8) + EndIf + Return + End }; diff --git a/src/world/area_obk/obk_05/obk_05_2_main.c b/src/world/area_obk/obk_05/obk_05_2_main.c index b4c3ba3d57a..cbd4dec13d6 100644 --- a/src/world/area_obk/obk_05/obk_05_2_main.c +++ b/src/world/area_obk/obk_05/obk_05_2_main.c @@ -1,47 +1,47 @@ #include "obk_05.h" EvtScript N(EVS_EnterDoor_obk_05_0) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(obk_05_ENTRY_0) - EVT_SET(LVar2, MODEL_door1) - EVT_SET(LVar4, MODEL_door1b) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSplitSingleDoor) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(obk_05_ENTRY_0) + Set(LVar2, MODEL_door1) + Set(LVar4, MODEL_door1b) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSplitSingleDoor) + EndSwitch + Return + End }; EvtScript N(EVS_ExitDoor_obk_01_2) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, obk_05_ENTRY_0) - EVT_SET(LVar1, COLLIDER_tt1) - EVT_SET(LVar2, MODEL_door1) - EVT_SET(LVar4, MODEL_door1b) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC(ExitSplitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("obk_01"), obk_01_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, obk_05_ENTRY_0) + Set(LVar1, COLLIDER_tt1) + Set(LVar2, MODEL_door1) + Set(LVar4, MODEL_door1b) + Set(LVar3, DOOR_SWING_OUT) + Exec(ExitSplitSingleDoor) + Wait(17) + Call(GotoMap, Ref("obk_01"), obk_01_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_TexPan_Fog) = { - EVT_CALL(SetTexPanner, MODEL_m1, 0) - EVT_CALL(SetTexPanner, MODEL_m2, 0) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 300) - EVT_ADD(LVar1, 100) - EVT_CALL(SetTexPanOffset, 0, 0, LVar0, LVar1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetTexPanner, MODEL_m1, 0) + Call(SetTexPanner, MODEL_m2, 0) + Set(LVar0, 0) + Set(LVar1, 0) + Loop(0) + Add(LVar0, 300) + Add(LVar1, 100) + Call(SetTexPanOffset, 0, 0, LVar0, LVar1) + Wait(1) + EndLoop + Return + End }; #include "world/common/EnableCameraFollowPlayerY.inc.c" @@ -56,46 +56,46 @@ API_CALLABLE(N(RetroJar_AwaitPlayerEntry)) { } EvtScript N(EVS_ManageRetroJar) = { - EVT_LOOP(0) - EVT_CALL(N(RetroJar_AwaitPlayerEntry)) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(1) - EVT_IF_EQ(MF_IsRetroMario, FALSE) - EVT_CALL(PlaySoundAtPlayer, SOUND_JUMP_8BIT_MARIO, SOUND_SPACE_DEFAULT) - EVT_CALL(Disable8bitMario, FALSE) - EVT_CALL(SetMusicTrack, 0, SONG_CHAPTER_START, 1, 8) - EVT_SET(MF_IsRetroMario, TRUE) - EVT_ELSE - EVT_CALL(PlaySoundAtPlayer, SOUND_QUICK_PLAYER_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(Disable8bitMario, TRUE) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(MF_IsRetroMario, FALSE) - EVT_END_IF - EVT_CALL(N(DisableCameraFollowPlayerY)) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(PlayerJump, -105, 30, -55, 30) - EVT_WAIT(1) - EVT_CALL(N(EnableCameraFollowPlayerY)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(N(RetroJar_AwaitPlayerEntry)) + Call(DisablePlayerInput, TRUE) + Wait(1) + IfEq(MF_IsRetroMario, FALSE) + Call(PlaySoundAtPlayer, SOUND_JUMP_8BIT_MARIO, SOUND_SPACE_DEFAULT) + Call(Disable8bitMario, FALSE) + Call(SetMusicTrack, 0, SONG_CHAPTER_START, 1, 8) + Set(MF_IsRetroMario, TRUE) + Else + Call(PlaySoundAtPlayer, SOUND_QUICK_PLAYER_JUMP, SOUND_SPACE_DEFAULT) + Call(Disable8bitMario, TRUE) + Exec(N(EVS_SetupMusic)) + Set(MF_IsRetroMario, FALSE) + EndIf + Call(N(DisableCameraFollowPlayerY)) + Call(SetPlayerJumpscale, Float(1.0)) + Call(PlayerJump, -105, 30, -55, 30) + Wait(1) + Call(N(EnableCameraFollowPlayerY)) + Call(DisablePlayerInput, FALSE) + EndLoop + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOOS_MANSION) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupRockingChairs)) - EVT_EXEC(N(EVS_ManageHole)) - EVT_EXEC(N(EVS_TexPan_Fog)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_obk_01_2)), TRIGGER_WALL_PRESS_A, COLLIDER_tt1, 1, 0) - EVT_EXEC(N(EVS_EnterDoor_obk_05_0)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_hip1, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_ManageRetroJar)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOOS_MANSION) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupRockingChairs)) + Exec(N(EVS_ManageHole)) + Exec(N(EVS_TexPan_Fog)) + BindTrigger(Ref(N(EVS_ExitDoor_obk_01_2)), TRIGGER_WALL_PRESS_A, COLLIDER_tt1, 1, 0) + Exec(N(EVS_EnterDoor_obk_05_0)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_hip1, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_ManageRetroJar)) + Return + End }; diff --git a/src/world/area_obk/obk_05/obk_05_3_rocking_chair.c b/src/world/area_obk/obk_05/obk_05_3_rocking_chair.c index 78467ed207f..73940587d06 100644 --- a/src/world/area_obk/obk_05/obk_05_3_rocking_chair.c +++ b/src/world/area_obk/obk_05/obk_05_3_rocking_chair.c @@ -7,16 +7,16 @@ extern EvtScript N(EVS_SetupRockingChair); #include "../common/RockingChair.inc.c" EvtScript N(EVS_SetupRockingChairs) = { - EVT_EXEC(N(EVS_SetupRockingChair)) - EVT_RETURN - EVT_END + Exec(N(EVS_SetupRockingChair)) + Return + End }; EvtScript N(EVS_SetupRockingChair) = { - EVT_CALL(ParentColliderToModel, COLLIDER_i1, MODEL_i1) - EVT_CALL(ParentColliderToModel, COLLIDER_i2, MODEL_i3) - EVT_CALL(ParentColliderToModel, COLLIDER_i3, MODEL_i3) - EVT_CALL(N(UpdateRockingChair)) - EVT_RETURN - EVT_END + Call(ParentColliderToModel, COLLIDER_i1, MODEL_i1) + Call(ParentColliderToModel, COLLIDER_i2, MODEL_i3) + Call(ParentColliderToModel, COLLIDER_i3, MODEL_i3) + Call(N(UpdateRockingChair)) + Return + End }; diff --git a/src/world/area_obk/obk_05/obk_05_4_hole.c b/src/world/area_obk/obk_05/obk_05_4_hole.c index d7b7da49de7..cf36edccf1a 100644 --- a/src/world/area_obk/obk_05/obk_05_4_hole.c +++ b/src/world/area_obk/obk_05/obk_05_4_hole.c @@ -9,10 +9,10 @@ API_CALLABLE(N(AwaitPlayerEnterHole)) { } EvtScript N(EVS_ManageHole) = { - EVT_CALL(N(AwaitPlayerEnterHole)) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(GotoMap, EVT_PTR("obk_06"), obk_06_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(N(AwaitPlayerEnterHole)) + Call(DisablePlayerPhysics, TRUE) + Call(GotoMap, Ref("obk_06"), obk_06_ENTRY_0) + Wait(100) + Return + End }; diff --git a/src/world/area_obk/obk_05/obk_05_5_npc.c b/src/world/area_obk/obk_05/obk_05_5_npc.c index 3ff475f9fdd..583d4a6fa02 100644 --- a/src/world/area_obk/obk_05/obk_05_5_npc.c +++ b/src/world/area_obk/obk_05/obk_05_5_npc.c @@ -7,15 +7,15 @@ #include "../common/TrafficBoos.inc.c" EvtScript N(EVS_NpcInit_TrafficBoo1) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TrafficBoo))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_TrafficBoo))) + Return + End }; EvtScript N(EVS_NpcInit_TrafficBoo2) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TrafficBoo))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_TrafficBoo))) + Return + End }; NpcData N(NpcData_Boo_01)[] = { diff --git a/src/world/area_obk/obk_05/obk_05_6_entity.c b/src/world/area_obk/obk_05/obk_05_6_entity.c index 467eebe218f..21e17da8986 100644 --- a/src/world/area_obk/obk_05/obk_05_6_entity.c +++ b/src/world/area_obk/obk_05/obk_05_6_entity.c @@ -2,20 +2,20 @@ #include "entity.h" EvtScript N(EVS_OnSmashFloor) = { - EVT_SET(GF_OBK05_BoardedFloor, TRUE) - EVT_RETURN - EVT_END + Set(GF_OBK05_BoardedFloor, TRUE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_OBK05_BoardedFloor, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BoardedFloor), 0, 0, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnSmashFloor))) - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_WoodenCrate), 200, 0, -100, 0, ITEM_APPLE, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_WoodenCrate), 200, 30, -100, 0, -1, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_WoodenCrate), 165, 0, -100, 0, ITEM_APPLE, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_WoodenCrate), -105, 0, -55, 0, -1, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + IfEq(GF_OBK05_BoardedFloor, FALSE) + Call(MakeEntity, Ref(Entity_BoardedFloor), 0, 0, 0, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnSmashFloor))) + EndIf + Call(MakeEntity, Ref(Entity_WoodenCrate), 200, 0, -100, 0, ITEM_APPLE, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_WoodenCrate), 200, 30, -100, 0, -1, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_WoodenCrate), 165, 0, -100, 0, ITEM_APPLE, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_WoodenCrate), -105, 0, -55, 0, -1, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_obk/obk_06/obk_06_1_music.c b/src/world/area_obk/obk_06/obk_06_1_music.c index eba1ff6085b..5fe52f53c66 100644 --- a/src/world/area_obk/obk_06/obk_06_1_music.c +++ b/src/world/area_obk/obk_06/obk_06_1_music.c @@ -1,11 +1,11 @@ #include "obk_06.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_BOOS_MANSION, 0, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_CHEERFUL_BOOS_MANSION, 0, 8) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_BOOS_MANSION, 0, 8) + Else + Call(SetMusicTrack, 0, SONG_CHEERFUL_BOOS_MANSION, 0, 8) + EndIf + Return + End }; diff --git a/src/world/area_obk/obk_06/obk_06_2_main.c b/src/world/area_obk/obk_06/obk_06_2_main.c index 95294ac5db7..200f5d26840 100644 --- a/src/world/area_obk/obk_06/obk_06_2_main.c +++ b/src/world/area_obk/obk_06/obk_06_2_main.c @@ -3,32 +3,32 @@ EvtScript N(EVS_ExitWalk_obk_02_2) = EVT_EXIT_WALK(60, obk_06_ENTRY_1, "obk_02", obk_02_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_obk_02_2)), TRIGGER_FLOOR_ABOVE, COLLIDER__deili, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_obk_02_2)), TRIGGER_FLOOR_ABOVE, COLLIDER__deili, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(obk_06_ENTRY_0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_obk_02_2)), TRIGGER_FLOOR_TOUCH, COLLIDER__deili, 1, 0) - EVT_CASE_EQ(obk_06_ENTRY_1) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(obk_06_ENTRY_0) + BindTrigger(Ref(N(EVS_ExitWalk_obk_02_2)), TRIGGER_FLOOR_TOUCH, COLLIDER__deili, 1, 0) + CaseEq(obk_06_ENTRY_1) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOOS_MANSION) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupBombables)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOOS_MANSION) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupBombables)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_obk/obk_06/obk_06_3_bombable.c b/src/world/area_obk/obk_06/obk_06_3_bombable.c index 2228c004033..62adf3b6b41 100644 --- a/src/world/area_obk/obk_06/obk_06_3_bombable.c +++ b/src/world/area_obk/obk_06/obk_06_3_bombable.c @@ -7,30 +7,30 @@ BombTrigger N(BombPos_Wall) = { }; EvtScript N(EVS_OnBlast_Wall) = { - EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 1, 23, 26, 1, 10, 30) - EVT_LOOP(10) - EVT_CALL(EnableModel, MODEL_bom_ato, FALSE) - EVT_CALL(EnableModel, MODEL_bom1, TRUE) - EVT_WAIT(1) - EVT_CALL(EnableModel, MODEL_bom_ato, TRUE) - EVT_CALL(EnableModel, MODEL_bom1, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GF_OBK06_BombedWall, TRUE) - EVT_UNBIND - EVT_RETURN - EVT_END + PlayEffect(EFFECT_BOMBETTE_BREAKING, 1, 23, 26, 1, 10, 30) + Loop(10) + Call(EnableModel, MODEL_bom_ato, FALSE) + Call(EnableModel, MODEL_bom1, TRUE) + Wait(1) + Call(EnableModel, MODEL_bom_ato, TRUE) + Call(EnableModel, MODEL_bom1, FALSE) + Wait(1) + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) + Set(GF_OBK06_BombedWall, TRUE) + Unbind + Return + End }; EvtScript N(EVS_SetupBombables) = { - EVT_IF_EQ(GF_OBK06_BombedWall, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnBlast_Wall)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Wall)), 1, 0) - EVT_CALL(EnableModel, MODEL_bom_ato, FALSE) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_bom1, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_OBK06_BombedWall, FALSE) + BindTrigger(Ref(N(EVS_OnBlast_Wall)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Wall)), 1, 0) + Call(EnableModel, MODEL_bom_ato, FALSE) + Else + Call(EnableModel, MODEL_bom1, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Return + End }; diff --git a/src/world/area_obk/obk_06/obk_06_4_entity.c b/src/world/area_obk/obk_06/obk_06_4_entity.c index 50bb556178e..27b17e256db 100644 --- a/src/world/area_obk/obk_06/obk_06_4_entity.c +++ b/src/world/area_obk/obk_06/obk_06_4_entity.c @@ -2,21 +2,21 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_OBK06_Item_BoosPortrait, FALSE) - EVT_CALL(MakeItemEntity, ITEM_BOO_PORTRAIT, 230, 125, -215, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OBK06_Item_BoosPortrait) - EVT_THREAD - EVT_LOOP(0) - EVT_IF_NE(GF_OBK06_Item_BoosPortrait, FALSE) - EVT_SET(GB_StoryProgress, STORY_CH3_GOT_BOO_PORTRAIT) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_WoodenCrate), -110, 30, 50, 0, -1, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_WoodenCrate), -110, 0, 50, 0, ITEM_STAR_PIECE, MAKE_ENTITY_END) - EVT_CALL(AssignCrateFlag, GF_OBK06_Crate_StarPiece) - EVT_RETURN - EVT_END + IfEq(GF_OBK06_Item_BoosPortrait, FALSE) + Call(MakeItemEntity, ITEM_BOO_PORTRAIT, 230, 125, -215, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OBK06_Item_BoosPortrait) + Thread + Loop(0) + IfNe(GF_OBK06_Item_BoosPortrait, FALSE) + Set(GB_StoryProgress, STORY_CH3_GOT_BOO_PORTRAIT) + BreakLoop + EndIf + Wait(1) + EndLoop + EndThread + EndIf + Call(MakeEntity, Ref(Entity_WoodenCrate), -110, 30, 50, 0, -1, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_WoodenCrate), -110, 0, 50, 0, ITEM_STAR_PIECE, MAKE_ENTITY_END) + Call(AssignCrateFlag, GF_OBK06_Crate_StarPiece) + Return + End }; diff --git a/src/world/area_obk/obk_07/obk_07_1_music.c b/src/world/area_obk/obk_07/obk_07_1_music.c index a36b7055d6c..91be0126028 100644 --- a/src/world/area_obk/obk_07/obk_07_1_music.c +++ b/src/world/area_obk/obk_07/obk_07_1_music.c @@ -1,11 +1,11 @@ #include "obk_07.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_BOOS_MANSION, 0, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_CHEERFUL_BOOS_MANSION, 0, 8) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_BOOS_MANSION, 0, 8) + Else + Call(SetMusicTrack, 0, SONG_CHEERFUL_BOOS_MANSION, 0, 8) + EndIf + Return + End }; diff --git a/src/world/area_obk/obk_07/obk_07_2_main.c b/src/world/area_obk/obk_07/obk_07_2_main.c index 28e759d1e9d..eace8368ae5 100644 --- a/src/world/area_obk/obk_07/obk_07_2_main.c +++ b/src/world/area_obk/obk_07/obk_07_2_main.c @@ -1,68 +1,68 @@ #include "obk_07.h" EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SET(LVar2, MODEL_door_1) - EVT_SET(LVar4, MODEL_door1b) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSplitSingleDoor) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Set(LVar2, MODEL_door_1) + Set(LVar4, MODEL_door1b) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSplitSingleDoor) + Return + End }; EvtScript N(EVS_ExitDoors_obk_01_3) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, obk_07_ENTRY_0) - EVT_SET(LVar1, COLLIDER_tt1) - EVT_SET(LVar2, MODEL_door_1) - EVT_SET(LVar4, MODEL_door1b) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC(ExitSplitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("obk_01"), obk_01_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, obk_07_ENTRY_0) + Set(LVar1, COLLIDER_tt1) + Set(LVar2, MODEL_door_1) + Set(LVar4, MODEL_door1b) + Set(LVar3, DOOR_SWING_OUT) + Exec(ExitSplitSingleDoor) + Wait(17) + Call(GotoMap, Ref("obk_01"), obk_01_ENTRY_3) + Wait(100) + Return + End }; EvtScript N(EVS_TexPan_Fog) = { - EVT_THREAD - EVT_CALL(EnableTexPanning, MODEL_ma, TRUE) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, 2, 1, LVar0, LVar1) - EVT_ADD(LVar0, 300) - EVT_ADD(LVar1, 100) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_m2, 0) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 300) - EVT_ADD(LVar1, 100) - EVT_CALL(SetTexPanOffset, 0, 0, LVar0, LVar1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Thread + Call(EnableTexPanning, MODEL_ma, TRUE) + Set(LVar0, 0) + Set(LVar1, 0) + Loop(0) + Call(SetTexPanOffset, 2, 1, LVar0, LVar1) + Add(LVar0, 300) + Add(LVar1, 100) + Wait(1) + EndLoop + EndThread + Call(SetTexPanner, MODEL_m2, 0) + Set(LVar0, 0) + Set(LVar1, 0) + Loop(0) + Add(LVar0, 300) + Add(LVar1, 100) + Call(SetTexPanOffset, 0, 0, LVar0, LVar1) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOOS_MANSION) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_TexPan_Fog)) - EVT_EXEC(N(EVS_SetupFireplace)) - EVT_EXEC(N(EVS_SetupPhonograph)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_obk_01_3)), TRIGGER_WALL_PRESS_A, COLLIDER_tt1, 1, 0) - EVT_EXEC(N(EVS_EnterMap)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOOS_MANSION) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_TexPan_Fog)) + Exec(N(EVS_SetupFireplace)) + Exec(N(EVS_SetupPhonograph)) + BindTrigger(Ref(N(EVS_ExitDoors_obk_01_3)), TRIGGER_WALL_PRESS_A, COLLIDER_tt1, 1, 0) + Exec(N(EVS_EnterMap)) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_obk/obk_07/obk_07_3_entity.c b/src/world/area_obk/obk_07/obk_07_3_entity.c index b402ae8d1cb..871f63e9cdd 100644 --- a/src/world/area_obk/obk_07/obk_07_3_entity.c +++ b/src/world/area_obk/obk_07/obk_07_3_entity.c @@ -4,20 +4,20 @@ #include "world/common/entity/Chest.inc.c" EvtScript N(EVS_OpenChest_BooWeight) = { - EVT_SET(LVarA, ITEM_BOO_WEIGHT) - EVT_SET(LVarB, ITEM_TYPE_KEY) - EVT_SET(GB_StoryProgress, STORY_CH3_GOT_WEIGHT) - EVT_SET(GF_OBK07_Chest_Weight, TRUE) - EVT_EXEC_WAIT(N(EVS_Chest_GetItem)) - EVT_EXEC_WAIT(N(EVS_Scene_PlayerGotChestItem)) - EVT_RETURN - EVT_END + Set(LVarA, ITEM_BOO_WEIGHT) + Set(LVarB, ITEM_TYPE_KEY) + Set(GB_StoryProgress, STORY_CH3_GOT_WEIGHT) + Set(GF_OBK07_Chest_Weight, TRUE) + ExecWait(N(EVS_Chest_GetItem)) + ExecWait(N(EVS_Scene_PlayerGotChestItem)) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 170, 0, -160, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_OBK07_Chest_Weight) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenChest_BooWeight))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Chest), 170, 0, -160, 0, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_OBK07_Chest_Weight) + Call(AssignScript, Ref(N(EVS_OpenChest_BooWeight))) + Return + End }; diff --git a/src/world/area_obk/obk_07/obk_07_4_fireplace.c b/src/world/area_obk/obk_07/obk_07_4_fireplace.c index 5c164b55f4a..cb314d2e3df 100644 --- a/src/world/area_obk/obk_07/obk_07_4_fireplace.c +++ b/src/world/area_obk/obk_07/obk_07_4_fireplace.c @@ -33,91 +33,91 @@ Vec3i N(ExplosionPositions3)[] = { }; EvtScript N(EVS_PlayExplosionFX) = { - EVT_USE_BUF(LVar0) - EVT_BUF_READ3(LVarA, LVarB, LVarC) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 0, LVarA, LVarB, LVarC, EVT_FLOAT(1.203), 20) - EVT_WAIT(1) - EVT_BUF_READ3(LVarA, LVarB, LVarC) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 0, LVarA, LVarB, LVarC, EVT_FLOAT(1.5), 20) - EVT_WAIT(1) - EVT_BUF_READ3(LVarA, LVarB, LVarC) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 0, LVarA, LVarB, LVarC, EVT_FLOAT(2.0), 20) - EVT_WAIT(1) - EVT_BUF_READ3(LVarA, LVarB, LVarC) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 0, LVarA, LVarB, LVarC, EVT_FLOAT(2.5), 20) - EVT_WAIT(1) - EVT_BUF_READ3(LVarA, LVarB, LVarC) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 0, LVarA, LVarB, LVarC, EVT_FLOAT(3.0), 20) - EVT_WAIT(1) - EVT_BUF_READ3(LVarA, LVarB, LVarC) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 0, LVarA, LVarB, LVarC, EVT_FLOAT(3.5), 20) - EVT_WAIT(1) - EVT_BUF_READ3(LVarA, LVarB, LVarC) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 0, LVarA, LVarB, LVarC, EVT_FLOAT(4.0), 80) - EVT_RETURN - EVT_END + UseBuf(LVar0) + BufRead3(LVarA, LVarB, LVarC) + PlayEffect(EFFECT_RING_BLAST, 0, LVarA, LVarB, LVarC, Float(1.203), 20) + Wait(1) + BufRead3(LVarA, LVarB, LVarC) + PlayEffect(EFFECT_RING_BLAST, 0, LVarA, LVarB, LVarC, Float(1.5), 20) + Wait(1) + BufRead3(LVarA, LVarB, LVarC) + PlayEffect(EFFECT_RING_BLAST, 0, LVarA, LVarB, LVarC, Float(2.0), 20) + Wait(1) + BufRead3(LVarA, LVarB, LVarC) + PlayEffect(EFFECT_RING_BLAST, 0, LVarA, LVarB, LVarC, Float(2.5), 20) + Wait(1) + BufRead3(LVarA, LVarB, LVarC) + PlayEffect(EFFECT_RING_BLAST, 0, LVarA, LVarB, LVarC, Float(3.0), 20) + Wait(1) + BufRead3(LVarA, LVarB, LVarC) + PlayEffect(EFFECT_RING_BLAST, 0, LVarA, LVarB, LVarC, Float(3.5), 20) + Wait(1) + BufRead3(LVarA, LVarB, LVarC) + PlayEffect(EFFECT_RING_BLAST, 0, LVarA, LVarB, LVarC, Float(4.0), 80) + Return + End }; EvtScript N(EVS_PlaySmokeFX) = { - EVT_LOOP(10) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(RandInt, 30, LVar3) - EVT_CALL(RandInt, 30, LVar4) - EVT_ADD(LVar0, -15) - EVT_ADD(LVar2, 10) - EVT_ADD(LVar0, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, 1, 20) - EVT_WAIT(6) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(10) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(RandInt, 30, LVar3) + Call(RandInt, 30, LVar4) + Add(LVar0, -15) + Add(LVar2, 10) + Add(LVar0, LVar3) + Add(LVar1, LVar4) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, 1, 20) + Wait(6) + EndLoop + Return + End }; EvtScript N(EVS_Inspect_Fireplace) = { - EVT_IF_EQ(MV_InspectingFireplace, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(MV_InspectingFireplace, TRUE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_THREAD - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4.0), 0, EVT_FLOAT(250.0), EVT_FLOAT(17.5), EVT_FLOAT(-10.0)) - EVT_END_THREAD - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 25) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 10) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_END_THREAD - EVT_CALL(PlaySoundAtPlayer, SOUND_FIREPLACE_BURST, SOUND_SPACE_DEFAULT) - EVT_SET(LVar0, EVT_PTR(N(ExplosionPositions1))) - EVT_EXEC(N(EVS_PlayExplosionFX)) - EVT_SET(LVar0, EVT_PTR(N(ExplosionPositions2))) - EVT_EXEC(N(EVS_PlayExplosionFX)) - EVT_SET(LVar0, EVT_PTR(N(ExplosionPositions3))) - EVT_EXEC(N(EVS_PlayExplosionFX)) - EVT_WAIT(5) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Burnt) - EVT_WAIT(60) - EVT_EXEC_WAIT(N(EVS_PlaySmokeFX)) - EVT_WAIT(40) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_SET(MV_InspectingFireplace, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + IfEq(MV_InspectingFireplace, TRUE) + Return + EndIf + Set(MV_InspectingFireplace, TRUE) + Call(DisablePlayerInput, TRUE) + Thread + Call(AdjustCam, CAM_DEFAULT, Float(4.0), 0, Float(250.0), Float(17.5), Float(-10.0)) + EndThread + Wait(10) + Thread + Call(DisablePartnerAI, 0) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar0, 25) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 10) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(EnablePartnerAI) + Call(InterpPlayerYaw, 90, 0) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + EndThread + Call(PlaySoundAtPlayer, SOUND_FIREPLACE_BURST, SOUND_SPACE_DEFAULT) + Set(LVar0, Ref(N(ExplosionPositions1))) + Exec(N(EVS_PlayExplosionFX)) + Set(LVar0, Ref(N(ExplosionPositions2))) + Exec(N(EVS_PlayExplosionFX)) + Set(LVar0, Ref(N(ExplosionPositions3))) + Exec(N(EVS_PlayExplosionFX)) + Wait(5) + Call(SetPlayerAnimation, ANIM_Mario1_Burnt) + Wait(60) + ExecWait(N(EVS_PlaySmokeFX)) + Wait(40) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + Set(MV_InspectingFireplace, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SetupFireplace) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Inspect_Fireplace)), TRIGGER_WALL_PRESS_A, COLLIDER_o283, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_Inspect_Fireplace)), TRIGGER_WALL_PRESS_A, COLLIDER_o283, 1, 0) + Return + End }; diff --git a/src/world/area_obk/obk_07/obk_07_5_npc.c b/src/world/area_obk/obk_07/obk_07_5_npc.c index 5c1d7e375c1..c0399b9f22a 100644 --- a/src/world/area_obk/obk_07/obk_07_5_npc.c +++ b/src/world/area_obk/obk_07/obk_07_5_npc.c @@ -7,9 +7,9 @@ #include "../common/TrafficBoos.inc.c" EvtScript N(EVS_NpcInit_TrafficBoo1) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TrafficBoo))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_TrafficBoo))) + Return + End }; NpcData N(NpcData_TrafficBoo1) = { @@ -24,9 +24,9 @@ NpcData N(NpcData_TrafficBoo1) = { }; EvtScript N(EVS_NpcInit_TrafficBoo2) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TrafficBoo))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_TrafficBoo))) + Return + End }; NpcData N(NpcData_TrafficBoo2) = { @@ -41,14 +41,14 @@ NpcData N(NpcData_TrafficBoo2) = { }; EvtScript N(EVS_NpcInit_GuardBoo) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH3_GOT_WEIGHT) - EVT_SET(MV_GuardDeparted, TRUE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_SetupGuardBoo)) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH3_GOT_WEIGHT) + Set(MV_GuardDeparted, TRUE) + Call(RemoveNpc, NPC_SELF) + Else + ExecWait(N(EVS_SetupGuardBoo)) + EndIf + Return + End }; NpcData N(NpcData_GuardBoo) = { diff --git a/src/world/area_obk/obk_07/obk_07_6_phonograph.c b/src/world/area_obk/obk_07/obk_07_6_phonograph.c index 24c2ab7d679..7a8b7c1b6d4 100644 --- a/src/world/area_obk/obk_07/obk_07_6_phonograph.c +++ b/src/world/area_obk/obk_07/obk_07_6_phonograph.c @@ -611,559 +611,559 @@ API_CALLABLE(N(InitGuardBooAlpha)) { } EvtScript N(EVS_UpdatePhonographScale) = { - EVT_LABEL(30) - EVT_CALL(MakeLerp, 100, 200, 30, EASING_COS_IN_OUT) - EVT_LABEL(31) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, LVar0) - EVT_CALL(N(GetPhonographScaleDivisor)) - EVT_DIVF(LVar2, LVar3) - EVT_CALL(N(SetPhonographScale)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(31) - EVT_END_IF - EVT_CALL(MakeLerp, 200, 100, 30, EASING_COS_IN_OUT) - EVT_LABEL(32) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, LVar0) - EVT_CALL(N(GetPhonographScaleDivisor)) - EVT_DIVF(LVar2, LVar3) - EVT_CALL(N(SetPhonographScale)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(32) - EVT_END_IF - EVT_GOTO(30) - EVT_RETURN - EVT_END + Label(30) + Call(MakeLerp, 100, 200, 30, EASING_COS_IN_OUT) + Label(31) + Call(UpdateLerp) + SetF(LVar2, LVar0) + Call(N(GetPhonographScaleDivisor)) + DivF(LVar2, LVar3) + Call(N(SetPhonographScale)) + Wait(1) + IfEq(LVar1, 1) + Goto(31) + EndIf + Call(MakeLerp, 200, 100, 30, EASING_COS_IN_OUT) + Label(32) + Call(UpdateLerp) + SetF(LVar2, LVar0) + Call(N(GetPhonographScaleDivisor)) + DivF(LVar2, LVar3) + Call(N(SetPhonographScale)) + Wait(1) + IfEq(LVar1, 1) + Goto(32) + EndIf + Goto(30) + Return + End }; EvtScript N(EVS_UpdateCrankRotation) = { - EVT_SET(LVar0, 0) - EVT_LABEL(10) - EVT_CALL(N(SetCrankRotation)) - EVT_ADD(LVar0, 2) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Set(LVar0, 0) + Label(10) + Call(N(SetCrankRotation)) + Add(LVar0, 2) + Wait(1) + Goto(10) + Return + End }; EvtScript N(EVS_UpdateRecordRotation) = { - EVT_SET(LVar0, 0) - EVT_LABEL(20) - EVT_CALL(N(SetRecordRotation)) - EVT_ADD(LVar0, 10) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_RETURN - EVT_END + Set(LVar0, 0) + Label(20) + Call(N(SetRecordRotation)) + Add(LVar0, 10) + Wait(1) + Goto(20) + Return + End }; EvtScript N(EVS_SetPhonographScale) = { - EVT_SET(MF_CancelScaleScript, FALSE) - EVT_LOOP(0) - EVT_IF_EQ(MF_CancelScaleScript, TRUE) - EVT_CALL(N(CheckScaleNearUnity)) - EVT_IF_EQ(LVar2, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_CALL(N(SaveLastUpdateValue)) - EVT_CALL(N(GetPhonographScale)) - EVT_CALL(ScaleModel, MODEL_rap, LVar0, LVar0, LVar0) - EVT_CALL(UpdateColliderTransform, COLLIDER_t) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(MF_CancelScaleScript, FALSE) - EVT_CALL(ScaleModel, MODEL_rap, 1, 1, 1) - EVT_RETURN - EVT_END + Set(MF_CancelScaleScript, FALSE) + Loop(0) + IfEq(MF_CancelScaleScript, TRUE) + Call(N(CheckScaleNearUnity)) + IfEq(LVar2, 1) + BreakLoop + EndIf + EndIf + Call(N(SaveLastUpdateValue)) + Call(N(GetPhonographScale)) + Call(ScaleModel, MODEL_rap, LVar0, LVar0, LVar0) + Call(UpdateColliderTransform, COLLIDER_t) + Wait(1) + EndLoop + Set(MF_CancelScaleScript, FALSE) + Call(ScaleModel, MODEL_rap, 1, 1, 1) + Return + End }; EvtScript N(EVS_SetCrankRotation) = { - EVT_SET(MF_CancelCrankScript, FALSE) - EVT_LOOP(0) - EVT_IF_EQ(MF_CancelCrankScript, TRUE) - EVT_CALL(N(CheckAngleNearZero)) - EVT_IF_EQ(LVar2, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_CALL(N(SaveLastUpdateValue)) - EVT_CALL(N(GetCrankRotation)) - EVT_CALL(RotateGroup, MODEL_bo, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(MF_CancelCrankScript, FALSE) - EVT_CALL(RotateGroup, MODEL_bo, 0, 1, 0, 0) - EVT_RETURN - EVT_END + Set(MF_CancelCrankScript, FALSE) + Loop(0) + IfEq(MF_CancelCrankScript, TRUE) + Call(N(CheckAngleNearZero)) + IfEq(LVar2, 1) + BreakLoop + EndIf + EndIf + Call(N(SaveLastUpdateValue)) + Call(N(GetCrankRotation)) + Call(RotateGroup, MODEL_bo, LVar0, 1, 0, 0) + Wait(1) + EndLoop + Set(MF_CancelCrankScript, FALSE) + Call(RotateGroup, MODEL_bo, 0, 1, 0, 0) + Return + End }; EvtScript N(EVS_SetRecordRotation) = { - EVT_SET(MF_CancelRecordScript, FALSE) - EVT_LOOP(0) - EVT_IF_EQ(MF_CancelRecordScript, TRUE) - EVT_CALL(N(CheckAngleNearZero)) - EVT_IF_EQ(LVar2, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_CALL(N(SaveLastUpdateValue)) - EVT_CALL(N(GetRecordRotation)) - EVT_CALL(RotateGroup, MODEL_rec, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(MF_CancelRecordScript, FALSE) - EVT_CALL(RotateGroup, MODEL_rec, 0, 0, -1, 0) - EVT_RETURN - EVT_END + Set(MF_CancelRecordScript, FALSE) + Loop(0) + IfEq(MF_CancelRecordScript, TRUE) + Call(N(CheckAngleNearZero)) + IfEq(LVar2, 1) + BreakLoop + EndIf + EndIf + Call(N(SaveLastUpdateValue)) + Call(N(GetRecordRotation)) + Call(RotateGroup, MODEL_rec, LVar0, 0, -1, 0) + Wait(1) + EndLoop + Set(MF_CancelRecordScript, FALSE) + Call(RotateGroup, MODEL_rec, 0, 0, -1, 0) + Return + End }; EvtScript N(EVS_WindDownPhonograph) = { - EVT_SET(MV_WindingDown, TRUE) - EVT_CALL(MakeLerp, MV_MashInputsAmount, 0, LVar0, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(func_80240EF8_BCFAE8)) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcRotation, NPC_GuardBoo, 0, 0, 0) + Set(MV_WindingDown, TRUE) + Call(MakeLerp, MV_MashInputsAmount, 0, LVar0, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(N(func_80240EF8_BCFAE8)) + IfEq(LVar1, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetNpcRotation, NPC_GuardBoo, 0, 0, 0) // signal scripts should stop - EVT_SET(MF_CancelScaleScript, TRUE) - EVT_SET(MF_CancelCrankScript, TRUE) - EVT_SET(MF_CancelRecordScript, TRUE) + Set(MF_CancelScaleScript, TRUE) + Set(MF_CancelCrankScript, TRUE) + Set(MF_CancelRecordScript, TRUE) // wait for canceled scripts to end - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_EQ(MF_CancelScaleScript, FALSE) - EVT_IF_EQ(MF_CancelCrankScript, FALSE) - EVT_IF_EQ(MF_CancelRecordScript, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_LOOP + Loop(0) + Wait(1) + IfEq(MF_CancelScaleScript, FALSE) + IfEq(MF_CancelCrankScript, FALSE) + IfEq(MF_CancelRecordScript, FALSE) + BreakLoop + EndIf + EndIf + EndIf + EndLoop // kill the completed scripts - EVT_KILL_THREAD(MV_UpdateScaleScript) - EVT_KILL_THREAD(MV_UpdateCrankScript) - EVT_KILL_THREAD(MV_UpdateRecordScript) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(MV_WindingDown, FALSE) - EVT_RETURN - EVT_END + KillThread(MV_UpdateScaleScript) + KillThread(MV_UpdateCrankScript) + KillThread(MV_UpdateRecordScript) + Exec(N(EVS_SetupMusic)) + Set(MV_WindingDown, FALSE) + Return + End }; EvtScript N(EVS_PlayPhonograph) = { - EVT_IF_EQ(MV_WindingDown, TRUE) - EVT_IS_THREAD_RUNNING(MV_WindDownScript, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_KILL_THREAD(MV_WindDownScript) - EVT_IS_THREAD_RUNNING(MV_UpdateScaleScript, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_KILL_THREAD(MV_UpdateScaleScript) - EVT_END_IF - EVT_IS_THREAD_RUNNING(MV_UpdateCrankScript, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_KILL_THREAD(MV_UpdateCrankScript) - EVT_END_IF - EVT_IS_THREAD_RUNNING(MV_UpdateRecordScript, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_KILL_THREAD(MV_UpdateRecordScript) - EVT_END_IF - EVT_IS_THREAD_RUNNING(MV_SetScaleScript, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_KILL_THREAD(MV_SetScaleScript) - EVT_END_IF - EVT_IS_THREAD_RUNNING(MV_SetCrankScript, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_KILL_THREAD(MV_SetCrankScript) - EVT_END_IF - EVT_IS_THREAD_RUNNING(MV_SetRecordScript, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_KILL_THREAD(MV_SetRecordScript) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(2.0)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar2, -170) - EVT_GOTO(33) - EVT_END_IF - EVT_LABEL(11) - EVT_CALL(PlayerMoveTo, -202, -170, 0) - EVT_LABEL(33) - EVT_CALL(PlayerMoveTo, -216, -115, 0) - EVT_CALL(InterpPlayerYaw, 38, 1) - EVT_LOOP(0) + IfEq(MV_WindingDown, TRUE) + IsThreadRunning(MV_WindDownScript, LVar0) + IfEq(LVar0, 1) + KillThread(MV_WindDownScript) + IsThreadRunning(MV_UpdateScaleScript, LVar0) + IfEq(LVar0, 1) + KillThread(MV_UpdateScaleScript) + EndIf + IsThreadRunning(MV_UpdateCrankScript, LVar0) + IfEq(LVar0, 1) + KillThread(MV_UpdateCrankScript) + EndIf + IsThreadRunning(MV_UpdateRecordScript, LVar0) + IfEq(LVar0, 1) + KillThread(MV_UpdateRecordScript) + EndIf + IsThreadRunning(MV_SetScaleScript, LVar0) + IfEq(LVar0, 1) + KillThread(MV_SetScaleScript) + EndIf + IsThreadRunning(MV_SetCrankScript, LVar0) + IfEq(LVar0, 1) + KillThread(MV_SetCrankScript) + EndIf + IsThreadRunning(MV_SetRecordScript, LVar0) + IfEq(LVar0, 1) + KillThread(MV_SetRecordScript) + EndIf + EndIf + EndIf + Call(SetPlayerSpeed, Float(2.0)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar2, -170) + Goto(33) + EndIf + Label(11) + Call(PlayerMoveTo, -202, -170, 0) + Label(33) + Call(PlayerMoveTo, -216, -115, 0) + Call(InterpPlayerYaw, 38, 1) + Loop(0) // wait for tutorial message dismissal if there is one - EVT_WAIT(1) - EVT_IF_EQ(MV_ReadyToPlay, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(5) - EVT_CALL(N(CreatePhonographHudData)) - EVT_CALL(N(PlayRecordSong)) - EVT_WAIT(30) - EVT_CALL(N(InitPhonographHud)) - EVT_IF_EQ(MV_GuardDeparted, FALSE) - EVT_CALL(BindNpcAI, NPC_GuardBoo, EVT_PTR(N(EVS_NpcAI_GuardBoo_Wary))) - EVT_EXEC_GET_TID(N(EVS_UpdateGuardBoo), MV_UpdateGuardScript) - EVT_ELSE - EVT_EXEC_GET_TID(N(EVS_DummyUpdateGuardBoo), MV_UpdateGuardScript) - EVT_END_IF - EVT_EXEC_GET_TID(N(EVS_UpdatePhonographScale), MV_UpdateScaleScript) - EVT_EXEC_GET_TID(N(EVS_UpdateCrankRotation), MV_UpdateCrankScript) - EVT_EXEC_GET_TID(N(EVS_UpdateRecordRotation), MV_UpdateRecordScript) - EVT_EXEC_GET_TID(N(EVS_SetPhonographScale), MV_SetScaleScript) - EVT_EXEC_GET_TID(N(EVS_SetCrankRotation), MV_SetCrankScript) - EVT_EXEC_GET_TID(N(EVS_SetRecordRotation), MV_SetRecordScript) - EVT_CALL(N(SavePhonographUpdateScriptIDs)) - EVT_LOOP(0) - EVT_CALL(N(func_80241790_BD0380)) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(N(DestroyPhonographHudData)) - EVT_WAIT(1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(0) + Wait(1) + IfEq(MV_ReadyToPlay, TRUE) + BreakLoop + EndIf + EndLoop + Wait(5) + Call(N(CreatePhonographHudData)) + Call(N(PlayRecordSong)) + Wait(30) + Call(N(InitPhonographHud)) + IfEq(MV_GuardDeparted, FALSE) + Call(BindNpcAI, NPC_GuardBoo, Ref(N(EVS_NpcAI_GuardBoo_Wary))) + ExecGetTID(N(EVS_UpdateGuardBoo), MV_UpdateGuardScript) + Else + ExecGetTID(N(EVS_DummyUpdateGuardBoo), MV_UpdateGuardScript) + EndIf + ExecGetTID(N(EVS_UpdatePhonographScale), MV_UpdateScaleScript) + ExecGetTID(N(EVS_UpdateCrankRotation), MV_UpdateCrankScript) + ExecGetTID(N(EVS_UpdateRecordRotation), MV_UpdateRecordScript) + ExecGetTID(N(EVS_SetPhonographScale), MV_SetScaleScript) + ExecGetTID(N(EVS_SetCrankRotation), MV_SetCrankScript) + ExecGetTID(N(EVS_SetRecordRotation), MV_SetRecordScript) + Call(N(SavePhonographUpdateScriptIDs)) + Loop(0) + Call(N(func_80241790_BD0380)) + IfEq(LVar0, 1) + Call(N(DestroyPhonographHudData)) + Wait(1) + BreakLoop + EndIf + Wait(1) + EndLoop + Loop(0) // wait for the guard to finish jumping or spinning - EVT_WAIT(1) - EVT_IF_EQ(MF_GuardBusy, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_KILL_THREAD(MV_UpdateGuardScript) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_IF_EQ(MV_GuardDeparted, FALSE) - EVT_IF_EQ(MV_GuardDancing, TRUE) - EVT_SET(LVar0, 150) - EVT_ELSE - EVT_SET(LVar0, 80) - EVT_END_IF - EVT_EXEC_GET_TID(N(EVS_WindDownPhonograph), MV_WindDownScript) - EVT_EXEC_GET_TID(N(EVS_GuardBoo_ReturnToPost), MV_GuardReturnScript) - EVT_ELSE - EVT_SET(LVar0, 80) - EVT_EXEC_GET_TID(N(EVS_WindDownPhonograph), MV_WindDownScript) - EVT_END_IF - EVT_RETURN - EVT_END + Wait(1) + IfEq(MF_GuardBusy, FALSE) + BreakLoop + EndIf + EndLoop + KillThread(MV_UpdateGuardScript) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + IfEq(MV_GuardDeparted, FALSE) + IfEq(MV_GuardDancing, TRUE) + Set(LVar0, 150) + Else + Set(LVar0, 80) + EndIf + ExecGetTID(N(EVS_WindDownPhonograph), MV_WindDownScript) + ExecGetTID(N(EVS_GuardBoo_ReturnToPost), MV_GuardReturnScript) + Else + Set(LVar0, 80) + ExecGetTID(N(EVS_WindDownPhonograph), MV_WindDownScript) + EndIf + Return + End }; EvtScript N(EVS_Inspect_Phonograph) = { - EVT_IF_EQ(MV_GuardDancing, TRUE) - EVT_IF_EQ(MV_GuardDeparted, FALSE) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_PLAYED_THE_RECORD) - EVT_GOTO(50) - EVT_END_IF + IfEq(MV_GuardDancing, TRUE) + IfEq(MV_GuardDeparted, FALSE) + Return + EndIf + EndIf + Call(DisablePlayerInput, TRUE) + IfGe(GB_StoryProgress, STORY_CH3_PLAYED_THE_RECORD) + Goto(50) + EndIf // choose a record - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_Phonograph, 160, 40) - EVT_GOTO(100) - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_GOTO(100) - EVT_END_IF - EVT_CALL(N(GetSelectedRecordIndex)) - EVT_IF_EQ(LVar0, -1) - EVT_GOTO(100) - EVT_END_IF - EVT_SET(GB_OBK07_SelectedRecord, LVar0) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_SET(GB_StoryProgress, STORY_CH3_PLAYED_THE_RECORD) - EVT_CALL(EnableModel, MODEL_reco, TRUE) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_CarryIdle) - EVT_WAIT(15) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(15) - EVT_CALL(CloseChoicePopup) + Call(ShowKeyChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_Inspect_Phonograph, 160, 40) + Goto(100) + EndIf + IfEq(LVar0, -1) + Goto(100) + EndIf + Call(N(GetSelectedRecordIndex)) + IfEq(LVar0, -1) + Goto(100) + EndIf + Set(GB_OBK07_SelectedRecord, LVar0) + Call(RemoveKeyItemAt, LVar1) + Set(GB_StoryProgress, STORY_CH3_PLAYED_THE_RECORD) + Call(EnableModel, MODEL_reco, TRUE) + Call(SetPlayerAnimation, ANIM_MarioW1_CarryIdle) + Wait(15) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(15) + Call(CloseChoicePopup) // try playing - EVT_LABEL(50) - EVT_SET(MV_ReadyToPlay, TRUE) - EVT_IF_LT(GB_StoryProgress, STORY_CH3_GOT_WEIGHT) - EVT_SET(MV_ReadyToPlay, FALSE) - EVT_THREAD - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0181, 160, 40) - EVT_SET(MV_ReadyToPlay, TRUE) - EVT_END_THREAD - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_PlayPhonograph)) - EVT_RETURN + Label(50) + Set(MV_ReadyToPlay, TRUE) + IfLt(GB_StoryProgress, STORY_CH3_GOT_WEIGHT) + Set(MV_ReadyToPlay, FALSE) + Thread + Call(ShowMessageAtScreenPos, MSG_Menus_0181, 160, 40) + Set(MV_ReadyToPlay, TRUE) + EndThread + EndIf + ExecWait(N(EVS_PlayPhonograph)) + Return // done - EVT_LABEL(100) - EVT_CALL(CloseChoicePopup) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Label(100) + Call(CloseChoicePopup) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcAI_GuardBoo_Wary) = { - EVT_CALL(SetNpcAnimation, NPC_GuardBoo, ANIM_Boo_Idle) - EVT_LABEL(0) - EVT_CALL(RandInt, 30, LVar0) - EVT_ADD(LVar0, 30) - EVT_WAIT(LVar0) - EVT_CALL(InterpNpcYaw, NPC_GuardBoo, 90, 5) - EVT_CALL(RandInt, 30, LVar0) - EVT_ADD(LVar0, 30) - EVT_WAIT(LVar0) - EVT_CALL(InterpNpcYaw, NPC_GuardBoo, 270, 5) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_GuardBoo, ANIM_Boo_Idle) + Label(0) + Call(RandInt, 30, LVar0) + Add(LVar0, 30) + Wait(LVar0) + Call(InterpNpcYaw, NPC_GuardBoo, 90, 5) + Call(RandInt, 30, LVar0) + Add(LVar0, 30) + Wait(LVar0) + Call(InterpNpcYaw, NPC_GuardBoo, 270, 5) + Goto(0) + Return + End }; EvtScript N(EVS_NpcAI_GuardBoo_DoNothing) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcAI_GuardBoo_Dancing) = { - EVT_LOOP(0) - EVT_CALL(RandInt, 99, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_LT(30) - EVT_CALL(RandInt, 10, LVar0) - EVT_ADD(LVar0, 10) - EVT_WAIT(LVar0) - EVT_CALL(InterpNpcYaw, NPC_GuardBoo, 90, 5) - EVT_CALL(RandInt, 10, LVar0) - EVT_ADD(LVar0, 10) - EVT_WAIT(LVar0) - EVT_CALL(InterpNpcYaw, NPC_GuardBoo, 270, 5) - EVT_CASE_LT(60) - EVT_CALL(GetNpcPos, NPC_GuardBoo, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_GuardBoo, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_GuardBoo, LVar0, LVar1, LVar2, 10) - EVT_CASE_LT(99) - EVT_CALL(MakeLerp, 0, 720, 20, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_GuardBoo, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_SWITCH - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(RandInt, 99, LVar0) + Switch(LVar0) + CaseLt(30) + Call(RandInt, 10, LVar0) + Add(LVar0, 10) + Wait(LVar0) + Call(InterpNpcYaw, NPC_GuardBoo, 90, 5) + Call(RandInt, 10, LVar0) + Add(LVar0, 10) + Wait(LVar0) + Call(InterpNpcYaw, NPC_GuardBoo, 270, 5) + CaseLt(60) + Call(GetNpcPos, NPC_GuardBoo, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_GuardBoo, Float(1.0)) + Call(NpcJump0, NPC_GuardBoo, LVar0, LVar1, LVar2, 10) + CaseLt(99) + Call(MakeLerp, 0, 720, 20, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_GuardBoo, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndSwitch + EndLoop + Return + End }; EvtScript N(EVS_GuardBoo_ReturnToPost) = { - EVT_WAIT(1) - EVT_IF_EQ(MV_GuardDancing, TRUE) - EVT_WAIT(150) - EVT_CALL(BindNpcAI, NPC_GuardBoo, EVT_PTR(N(EVS_NpcAI_GuardBoo_DoNothing))) - EVT_WAIT(1) - EVT_CALL(SetNpcRotation, NPC_GuardBoo, 0, 0, 0) - EVT_WAIT(90) - EVT_ELSE - EVT_CALL(BindNpcAI, NPC_GuardBoo, EVT_PTR(N(EVS_NpcAI_GuardBoo_DoNothing))) - EVT_WAIT(1) - EVT_CALL(SetNpcRotation, NPC_GuardBoo, 0, 0, 0) - EVT_END_IF - EVT_CALL(AwaitPlayerLeave, 168, -136, 50) - EVT_CALL(MakeLerp, 180, 0, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcImgFXParams, NPC_GuardBoo, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_GuardBoo, 168, 0, -136) - EVT_CALL(MakeLerp, 0, 180, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcImgFXParams, NPC_GuardBoo, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(MV_GuardDancing, FALSE) - EVT_CALL(BindNpcAI, NPC_GuardBoo, EVT_PTR(N(EVS_NpcAI_GuardBoo_Wary))) - EVT_RETURN - EVT_END + Wait(1) + IfEq(MV_GuardDancing, TRUE) + Wait(150) + Call(BindNpcAI, NPC_GuardBoo, Ref(N(EVS_NpcAI_GuardBoo_DoNothing))) + Wait(1) + Call(SetNpcRotation, NPC_GuardBoo, 0, 0, 0) + Wait(90) + Else + Call(BindNpcAI, NPC_GuardBoo, Ref(N(EVS_NpcAI_GuardBoo_DoNothing))) + Wait(1) + Call(SetNpcRotation, NPC_GuardBoo, 0, 0, 0) + EndIf + Call(AwaitPlayerLeave, 168, -136, 50) + Call(MakeLerp, 180, 0, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcImgFXParams, NPC_GuardBoo, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + IfEq(LVar1, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetNpcPos, NPC_GuardBoo, 168, 0, -136) + Call(MakeLerp, 0, 180, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcImgFXParams, NPC_GuardBoo, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + IfEq(LVar1, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Set(MV_GuardDancing, FALSE) + Call(BindNpcAI, NPC_GuardBoo, Ref(N(EVS_NpcAI_GuardBoo_Wary))) + Return + End }; EvtScript N(EVS_UpdateGuardBoo) = { - EVT_SET(MV_GuardDancing, FALSE) - EVT_SET(MF_GuardBusy, FALSE) - EVT_CALL(InterpNpcYaw, NPC_GuardBoo, 270, 5) - EVT_SET(LVarC, 0) - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_GuardBoo, LVar0, LVar1, LVar2) - EVT_IF_LE(LVar0, -92) - EVT_SET(MV_GuardDancing, TRUE) - EVT_CALL(BindNpcAI, NPC_GuardBoo, EVT_PTR(N(EVS_NpcAI_GuardBoo_Dancing))) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVarA, 0) - EVT_CALL(N(UpdateGuardBooPos)) - EVT_IF_NE(LVarC, 0) - EVT_SUB(LVarC, 1) - EVT_END_IF - EVT_WAIT(1) - EVT_ELSE - EVT_IF_NE(LVarC, 0) - EVT_CALL(N(UpdateGuardBooPos)) - EVT_IF_NE(LVarC, 0) - EVT_SUB(LVarC, 1) - EVT_END_IF - EVT_WAIT(1) - EVT_ELSE - EVT_SET(LVarC, 20) - EVT_CALL(RandInt, 99, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_LT(60) - EVT_CASE_LT(80) - EVT_CALL(BindNpcAI, NPC_GuardBoo, EVT_PTR(N(EVS_NpcAI_GuardBoo_DoNothing))) - EVT_SET(MF_GuardBusy, TRUE) - EVT_CALL(GetNpcPos, NPC_GuardBoo, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_GuardBoo, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_GuardBoo, LVar0, LVar1, LVar2, 10) - EVT_SET(MF_GuardBusy, FALSE) - EVT_CALL(BindNpcAI, NPC_GuardBoo, EVT_PTR(N(EVS_NpcAI_GuardBoo_Wary))) - EVT_CASE_LT(99) - EVT_CALL(BindNpcAI, NPC_GuardBoo, EVT_PTR(N(EVS_NpcAI_GuardBoo_DoNothing))) - EVT_SET(MF_GuardBusy, TRUE) - EVT_CALL(MakeLerp, 0, 720, 20, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_GuardBoo, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(MF_GuardBusy, FALSE) - EVT_CALL(BindNpcAI, NPC_GuardBoo, EVT_PTR(N(EVS_NpcAI_GuardBoo_Wary))) - EVT_END_SWITCH - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVarB, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(MV_GuardDancing, FALSE) + Set(MF_GuardBusy, FALSE) + Call(InterpNpcYaw, NPC_GuardBoo, 270, 5) + Set(LVarC, 0) + Loop(0) + Call(GetNpcPos, NPC_GuardBoo, LVar0, LVar1, LVar2) + IfLe(LVar0, -92) + Set(MV_GuardDancing, TRUE) + Call(BindNpcAI, NPC_GuardBoo, Ref(N(EVS_NpcAI_GuardBoo_Dancing))) + Return + EndIf + IfEq(LVarA, 0) + Call(N(UpdateGuardBooPos)) + IfNe(LVarC, 0) + Sub(LVarC, 1) + EndIf + Wait(1) + Else + IfNe(LVarC, 0) + Call(N(UpdateGuardBooPos)) + IfNe(LVarC, 0) + Sub(LVarC, 1) + EndIf + Wait(1) + Else + Set(LVarC, 20) + Call(RandInt, 99, LVar0) + Switch(LVar0) + CaseLt(60) + CaseLt(80) + Call(BindNpcAI, NPC_GuardBoo, Ref(N(EVS_NpcAI_GuardBoo_DoNothing))) + Set(MF_GuardBusy, TRUE) + Call(GetNpcPos, NPC_GuardBoo, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_GuardBoo, Float(1.0)) + Call(NpcJump0, NPC_GuardBoo, LVar0, LVar1, LVar2, 10) + Set(MF_GuardBusy, FALSE) + Call(BindNpcAI, NPC_GuardBoo, Ref(N(EVS_NpcAI_GuardBoo_Wary))) + CaseLt(99) + Call(BindNpcAI, NPC_GuardBoo, Ref(N(EVS_NpcAI_GuardBoo_DoNothing))) + Set(MF_GuardBusy, TRUE) + Call(MakeLerp, 0, 720, 20, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_GuardBoo, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Set(MF_GuardBusy, FALSE) + Call(BindNpcAI, NPC_GuardBoo, Ref(N(EVS_NpcAI_GuardBoo_Wary))) + EndSwitch + EndIf + EndIf + IfEq(LVarB, 1) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_DummyUpdateGuardBoo) = { - EVT_LOOP(0) - EVT_CALL(N(GuardBooDoNothing)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(N(GuardBooDoNothing)) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_GuardBooVanish) = { - EVT_THREAD - EVT_WAIT(25) - EVT_CALL(PlaySoundAtNpc, NPC_GuardBoo, SOUND_BOO_SPOOK, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_GuardBoo, ANIM_Boo_Spook) - EVT_WAIT(10) - EVT_CALL(MakeLerp, 255, 0, 60, EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcImgFXParams, NPC_GuardBoo, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_GuardBoo, NPC_DISPOSE_LOCATION) - EVT_SET(MV_GuardDeparted, TRUE) - EVT_RETURN - EVT_END + Thread + Wait(25) + Call(PlaySoundAtNpc, NPC_GuardBoo, SOUND_BOO_SPOOK, SOUND_SPACE_DEFAULT) + EndThread + Call(SetNpcAnimation, NPC_GuardBoo, ANIM_Boo_Spook) + Wait(10) + Call(MakeLerp, 255, 0, 60, EASING_LINEAR) + Label(0) + Call(UpdateLerp) + Call(SetNpcImgFXParams, NPC_GuardBoo, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(SetNpcPos, NPC_GuardBoo, NPC_DISPOSE_LOCATION) + Set(MV_GuardDeparted, TRUE) + Return + End }; EvtScript N(EVS_NpcInteract_GuardBoo) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_PLAYED_THE_RECORD) - EVT_IF_EQ(GF_OBK08_Item_Record, TRUE) - EVT_CALL(SpeakToPlayer, NPC_GuardBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0036) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_GuardBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0035) - EVT_END_IF - EVT_CASE_EQ(STORY_CH3_PLAYED_THE_RECORD) - EVT_IF_EQ(MV_GuardDancing, TRUE) - EVT_CALL(SpeakToPlayer, NPC_GuardBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0037) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_GuardBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0038) - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_PLAYED_THE_RECORD) + IfEq(GF_OBK08_Item_Record, TRUE) + Call(SpeakToPlayer, NPC_GuardBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0036) + Else + Call(SpeakToPlayer, NPC_GuardBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0035) + EndIf + CaseEq(STORY_CH3_PLAYED_THE_RECORD) + IfEq(MV_GuardDancing, TRUE) + Call(SpeakToPlayer, NPC_GuardBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0037) + Else + Call(SpeakToPlayer, NPC_GuardBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0038) + EndIf + EndSwitch + Return + End }; EvtScript N(EVS_Scene_PlayerGotChestItem) = { - EVT_KILL_THREAD(MV_GuardReturnScript) - EVT_CALL(SetNpcRotation, NPC_GuardBoo, 0, 0, 0) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(BindNpcAI, NPC_GuardBoo, EVT_PTR(N(EVS_NpcAI_GuardBoo_DoNothing))) - EVT_CALL(GetNpcPos, NPC_GuardBoo, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_GuardBoo, ANIM_Boo_Cower, ANIM_Boo_Cower, 0, MSG_CH3_0039) - EVT_CALL(SetNpcAnimation, NPC_GuardBoo, ANIM_Boo_Idle) - EVT_CALL(EndSpeech, NPC_GuardBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0) - EVT_EXEC_WAIT(N(EVS_GuardBooVanish)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + KillThread(MV_GuardReturnScript) + Call(SetNpcRotation, NPC_GuardBoo, 0, 0, 0) + Exec(N(EVS_SetupMusic)) + Call(DisablePlayerInput, TRUE) + Call(BindNpcAI, NPC_GuardBoo, Ref(N(EVS_NpcAI_GuardBoo_DoNothing))) + Call(GetNpcPos, NPC_GuardBoo, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_GuardBoo, ANIM_Boo_Cower, ANIM_Boo_Cower, 0, MSG_CH3_0039) + Call(SetNpcAnimation, NPC_GuardBoo, ANIM_Boo_Idle) + Call(EndSpeech, NPC_GuardBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0) + ExecWait(N(EVS_GuardBooVanish)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SetupGuardBoo) = { - EVT_CALL(SetNpcScale, NPC_GuardBoo, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0)) - EVT_CALL(SetNpcCollisionSize, NPC_GuardBoo, 40, 40) - EVT_CALL(N(InitGuardBooAlpha)) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_GuardBoo))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcAI_GuardBoo_Wary))) - EVT_CALL(SetNpcPos, NPC_GuardBoo, 168, 0, -136) - EVT_RETURN - EVT_END + Call(SetNpcScale, NPC_GuardBoo, Float(1.0), Float(1.0), Float(1.0)) + Call(SetNpcCollisionSize, NPC_GuardBoo, 40, 40) + Call(N(InitGuardBooAlpha)) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_GuardBoo))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcAI_GuardBoo_Wary))) + Call(SetNpcPos, NPC_GuardBoo, 168, 0, -136) + Return + End }; EvtScript N(EVS_SetupPhonograph) = { - EVT_CALL(N(CreatePhonographData)) - EVT_CALL(ParentColliderToModel, COLLIDER_t, MODEL_rap) - EVT_IF_LT(GB_StoryProgress, STORY_CH3_PLAYED_THE_RECORD) - EVT_CALL(EnableModel, MODEL_reco, FALSE) - EVT_END_IF - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_Inspect_Phonograph)), TRIGGER_WALL_PRESS_A, COLLIDER_o344, EVT_PTR(N(ItemList_Records)), 0, 1) - EVT_RETURN - EVT_END + Call(N(CreatePhonographData)) + Call(ParentColliderToModel, COLLIDER_t, MODEL_rap) + IfLt(GB_StoryProgress, STORY_CH3_PLAYED_THE_RECORD) + Call(EnableModel, MODEL_reco, FALSE) + EndIf + BindPadlock(Ref(N(EVS_Inspect_Phonograph)), TRIGGER_WALL_PRESS_A, COLLIDER_o344, Ref(N(ItemList_Records)), 0, 1) + Return + End }; diff --git a/src/world/area_obk/obk_08/obk_08_1_music.c b/src/world/area_obk/obk_08/obk_08_1_music.c index c6e3aadeb60..f20a52426ef 100644 --- a/src/world/area_obk/obk_08/obk_08_1_music.c +++ b/src/world/area_obk/obk_08/obk_08_1_music.c @@ -1,11 +1,11 @@ #include "obk_08.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_BOOS_MANSION, 0, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_CHEERFUL_BOOS_MANSION, 0, 8) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_BOOS_MANSION, 0, 8) + Else + Call(SetMusicTrack, 0, SONG_CHEERFUL_BOOS_MANSION, 0, 8) + EndIf + Return + End }; diff --git a/src/world/area_obk/obk_08/obk_08_2_main.c b/src/world/area_obk/obk_08/obk_08_2_main.c index ee5b3e80c5d..91e5c1c4cbb 100644 --- a/src/world/area_obk/obk_08/obk_08_2_main.c +++ b/src/world/area_obk/obk_08/obk_08_2_main.c @@ -1,59 +1,59 @@ #include "obk_08.h" EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SET(LVar2, MODEL_door1) - EVT_SET(LVar4, MODEL_door1b) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSplitSingleDoor) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Set(LVar2, MODEL_door1) + Set(LVar4, MODEL_door1b) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSplitSingleDoor) + Return + End }; EvtScript N(EVS_ExitMap_obk_01_4) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, obk_08_ENTRY_0) - EVT_SET(LVar1, COLLIDER_tt1) - EVT_SET(LVar2, MODEL_door1) - EVT_SET(LVar4, MODEL_door1b) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC(ExitSplitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("obk_01"), obk_01_ENTRY_4) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, obk_08_ENTRY_0) + Set(LVar1, COLLIDER_tt1) + Set(LVar2, MODEL_door1) + Set(LVar4, MODEL_door1b) + Set(LVar3, DOOR_SWING_OUT) + Exec(ExitSplitSingleDoor) + Wait(17) + Call(GotoMap, Ref("obk_01"), obk_01_ENTRY_4) + Wait(100) + Return + End }; EvtScript N(EVS_TexPan_Fog) = { - EVT_CALL(SetTexPanner, MODEL_moku1, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_moku2, TEX_PANNER_0) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 300) - EVT_ADD(LVar1, 100) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, LVar0, LVar1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetTexPanner, MODEL_moku1, TEX_PANNER_0) + Call(SetTexPanner, MODEL_moku2, TEX_PANNER_0) + Set(LVar0, 0) + Set(LVar1, 0) + Loop(0) + Add(LVar0, 300) + Add(LVar1, 100) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, LVar0, LVar1) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOOS_MANSION) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_SET(AF_OBK08_KeepAwayStarted, FALSE) - EVT_EXEC(N(EVS_SetupCabinets)) - EVT_EXEC(N(EVS_ManageWindows)) - EVT_EXEC(N(EVS_TexPan_Fog)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitMap_obk_01_4)), TRIGGER_WALL_PRESS_A, COLLIDER_tt1, 1, 0) - EVT_EXEC(N(EVS_EnterMap)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOOS_MANSION) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Set(AF_OBK08_KeepAwayStarted, FALSE) + Exec(N(EVS_SetupCabinets)) + Exec(N(EVS_ManageWindows)) + Exec(N(EVS_TexPan_Fog)) + BindTrigger(Ref(N(EVS_ExitMap_obk_01_4)), TRIGGER_WALL_PRESS_A, COLLIDER_tt1, 1, 0) + Exec(N(EVS_EnterMap)) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_obk/obk_08/obk_08_3_cabinets.c b/src/world/area_obk/obk_08/obk_08_3_cabinets.c index 8fc01296e26..3217122e42c 100644 --- a/src/world/area_obk/obk_08/obk_08_3_cabinets.c +++ b/src/world/area_obk/obk_08/obk_08_3_cabinets.c @@ -23,99 +23,99 @@ API_CALLABLE(N(DamagePlayer1HP)) { } EvtScript N(EVS_GetPartnerInUseAnims) = { - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PARTNER_GOOMBARIO) - EVT_SET(LVarA, ANIM_WorldGoombario_Run) - EVT_SET(LVarB, ANIM_WorldGoombario_Idle) - EVT_CASE_EQ(PARTNER_KOOPER) - EVT_SET(LVarA, ANIM_WorldKooper_Run) - EVT_SET(LVarB, ANIM_WorldKooper_Idle) - EVT_CASE_EQ(PARTNER_BOMBETTE) - EVT_SET(LVarA, ANIM_WorldBombette_Run) - EVT_SET(LVarB, ANIM_WorldBombette_Idle) - EVT_CASE_EQ(PARTNER_PARAKARRY) - EVT_SET(LVarA, ANIM_WorldParakarry_Run) - EVT_SET(LVarB, ANIM_WorldParakarry_Idle) - EVT_CASE_EQ(PARTNER_BOW) - EVT_SET(LVarA, ANIM_WorldBow_Run) - EVT_SET(LVarB, ANIM_WorldBow_Idle) - EVT_CASE_EQ(PARTNER_WATT) - EVT_SET(LVarA, ANIM_WorldWatt_Run) - EVT_SET(LVarB, ANIM_WorldWatt_Idle) - EVT_CASE_EQ(PARTNER_SUSHIE) - EVT_SET(LVarA, ANIM_WorldSushie_Run) - EVT_SET(LVarB, ANIM_WorldSushie_Idle) - EVT_CASE_EQ(PARTNER_LAKILESTER) - EVT_SET(LVarA, ANIM_WorldLakilester_Run) - EVT_SET(LVarB, ANIM_WorldLakilester_Idle) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetCurrentPartnerID, LVar0) + Switch(LVar0) + CaseEq(PARTNER_GOOMBARIO) + Set(LVarA, ANIM_WorldGoombario_Run) + Set(LVarB, ANIM_WorldGoombario_Idle) + CaseEq(PARTNER_KOOPER) + Set(LVarA, ANIM_WorldKooper_Run) + Set(LVarB, ANIM_WorldKooper_Idle) + CaseEq(PARTNER_BOMBETTE) + Set(LVarA, ANIM_WorldBombette_Run) + Set(LVarB, ANIM_WorldBombette_Idle) + CaseEq(PARTNER_PARAKARRY) + Set(LVarA, ANIM_WorldParakarry_Run) + Set(LVarB, ANIM_WorldParakarry_Idle) + CaseEq(PARTNER_BOW) + Set(LVarA, ANIM_WorldBow_Run) + Set(LVarB, ANIM_WorldBow_Idle) + CaseEq(PARTNER_WATT) + Set(LVarA, ANIM_WorldWatt_Run) + Set(LVarB, ANIM_WorldWatt_Idle) + CaseEq(PARTNER_SUSHIE) + Set(LVarA, ANIM_WorldSushie_Run) + Set(LVarB, ANIM_WorldSushie_Idle) + CaseEq(PARTNER_LAKILESTER) + Set(LVarA, ANIM_WorldLakilester_Run) + Set(LVarB, ANIM_WorldLakilester_Idle) + EndSwitch + Return + End }; EvtScript N(EVS_CrushPlayer) = { - EVT_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_EXEC_WAIT(N(EVS_GetPartnerInUseAnims)) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, LVarA) - EVT_CALL(NpcMoveTo, NPC_PARTNER, -93, LVar2, 15) - EVT_EXEC_WAIT(N(EVS_GetPartnerInUseAnims)) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, LVarB) - EVT_WAIT(15) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_END_THREAD - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_WAIT(8) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_WAIT(13) - EVT_CALL(GetPlayerPos, MV_KnockdownPosX, MV_KnockdownPosY, MV_KnockdownPosZ) - EVT_CALL(N(KnockdownCreate), SPR_Mario1, 37) //TODO hardcoded player raster ID - EVT_CALL(N(KnockdownSetPos), MV_KnockdownPosX, MV_KnockdownPosY, MV_KnockdownPosZ) - EVT_WAIT(1) - EVT_CALL(SetPlayerPos, 0, 1000, 0) // unusual dispose location - EVT_CALL(MakeLerp, 0, 90, 10, EASING_QUADRATIC_IN) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(KnockdownSetRot), LVar0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_ADD(MV_KnockdownPosY, 3) - EVT_CALL(N(KnockdownSetPos), MV_KnockdownPosX, MV_KnockdownPosY, MV_KnockdownPosZ) - EVT_CALL(N(DamagePlayer1HP)) - EVT_RETURN - EVT_END + Thread + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + ExecWait(N(EVS_GetPartnerInUseAnims)) + Call(SetNpcAnimation, NPC_PARTNER, LVarA) + Call(NpcMoveTo, NPC_PARTNER, -93, LVar2, 15) + ExecWait(N(EVS_GetPartnerInUseAnims)) + Call(SetNpcAnimation, NPC_PARTNER, LVarB) + Wait(15) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + EndThread + Call(DisablePlayerPhysics, TRUE) + Wait(8) + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + Wait(13) + Call(GetPlayerPos, MV_KnockdownPosX, MV_KnockdownPosY, MV_KnockdownPosZ) + Call(N(KnockdownCreate), SPR_Mario1, 37) //TODO hardcoded player raster ID + Call(N(KnockdownSetPos), MV_KnockdownPosX, MV_KnockdownPosY, MV_KnockdownPosZ) + Wait(1) + Call(SetPlayerPos, 0, 1000, 0) // unusual dispose location + Call(MakeLerp, 0, 90, 10, EASING_QUADRATIC_IN) + Label(0) + Call(UpdateLerp) + Call(N(KnockdownSetRot), LVar0, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Add(MV_KnockdownPosY, 3) + Call(N(KnockdownSetPos), MV_KnockdownPosX, MV_KnockdownPosY, MV_KnockdownPosZ) + Call(N(DamagePlayer1HP)) + Return + End }; EvtScript N(EVS_RestorePlayer) = { - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_WAIT(15) - EVT_SUB(MV_KnockdownPosY, 3) - EVT_CALL(N(KnockdownSetPos), MV_KnockdownPosX, MV_KnockdownPosY, MV_KnockdownPosZ) - EVT_CALL(MakeLerp, 90, 0, 15, EASING_QUADRATIC_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(N(KnockdownSetRot), LVar0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(N(KnockdownDestroy)) - EVT_CALL(SetPlayerPos, MV_KnockdownPosX, MV_KnockdownPosY, MV_KnockdownPosZ) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW3_ShakeHeadHard) - EVT_WAIT(25) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_RETURN - EVT_END + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(InterpPlayerYaw, 270, 0) + Wait(15) + Sub(MV_KnockdownPosY, 3) + Call(N(KnockdownSetPos), MV_KnockdownPosX, MV_KnockdownPosY, MV_KnockdownPosZ) + Call(MakeLerp, 90, 0, 15, EASING_QUADRATIC_OUT) + Label(1) + Call(UpdateLerp) + Call(N(KnockdownSetRot), LVar0, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(N(KnockdownDestroy)) + Call(SetPlayerPos, MV_KnockdownPosX, MV_KnockdownPosY, MV_KnockdownPosZ) + Wait(10) + Call(SetPlayerAnimation, ANIM_MarioW3_ShakeHeadHard) + Wait(25) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(EnablePartnerAI) + Call(DisablePlayerPhysics, FALSE) + Return + End }; Vec2i N(DustEmitters_FarCabinet)[] = { @@ -157,185 +157,185 @@ Vec2i N(DustEmitters_NearCabinet)[] = { }; EvtScript N(EVS_MiddleCabinet_OpenDoors) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_tansu2, SOUND_OBK_CHECK_CABINET, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 120, 15, EASING_QUARTIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_t_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_t_2, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_tansu2, SOUND_OBK_CHECK_CABINET, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 120, 15, EASING_QUARTIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_t_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_t_2, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_MiddleCabinet_CloseDoors) = { - EVT_CALL(MakeLerp, 120, 0, 15, EASING_QUARTIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_t_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_t_2, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_tansu2, SOUND_OBK_CHECK_CABINET, SOUND_SPACE_DEFAULT) - EVT_RETURN - EVT_END + Call(MakeLerp, 120, 0, 15, EASING_QUARTIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_t_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_t_2, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_tansu2, SOUND_OBK_CHECK_CABINET, SOUND_SPACE_DEFAULT) + Return + End }; EvtScript N(EVS_Interact_MiddleCabinet) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH3_GOT_RECORD) - EVT_CALL(DeleteTrigger, MV_Trigger_NearCabinet) - EVT_CALL(DeleteTrigger, MV_Trigger_MidCabinet) - EVT_CALL(DeleteTrigger, MV_Trigger_FarCabinet) - EVT_EXEC(N(EVS_Scene_BoosUnleashed)) - EVT_EXEC_WAIT(N(EVS_MiddleCabinet_OpenDoors)) - EVT_SET(AF_OBK08_KeepAwayStarted, TRUE) - EVT_WAIT(50) - EVT_EXEC_WAIT(N(EVS_MiddleCabinet_CloseDoors)) - EVT_ELSE - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterruptUsePartner) - EVT_EXEC_WAIT(N(EVS_MiddleCabinet_OpenDoors)) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(EVS_MiddleCabinet_CloseDoors)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH3_GOT_RECORD) + Call(DeleteTrigger, MV_Trigger_NearCabinet) + Call(DeleteTrigger, MV_Trigger_MidCabinet) + Call(DeleteTrigger, MV_Trigger_FarCabinet) + Exec(N(EVS_Scene_BoosUnleashed)) + ExecWait(N(EVS_MiddleCabinet_OpenDoors)) + Set(AF_OBK08_KeepAwayStarted, TRUE) + Wait(50) + ExecWait(N(EVS_MiddleCabinet_CloseDoors)) + Else + Call(DisablePlayerInput, TRUE) + Call(InterruptUsePartner) + ExecWait(N(EVS_MiddleCabinet_OpenDoors)) + Wait(20) + ExecWait(N(EVS_MiddleCabinet_CloseDoors)) + Call(DisablePlayerInput, FALSE) + EndIf + Return + End }; EvtScript N(EVS_Interact_NearCabinet) = { - EVT_LABEL(3) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterruptUsePartner) - EVT_LOOP(3) - EVT_CALL(PlaySoundAtCollider, COLLIDER_tansu1, SOUND_OBK_CHECK_CABINET, SOUND_SPACE_DEFAULT) - EVT_CALL(RotateModel, MODEL_tansu1, -1, 1, 0, 0) - EVT_WAIT(2) - EVT_CALL(RotateModel, MODEL_tansu1, 0, 1, 0, 0) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtCollider, COLLIDER_tansu1, SOUND_OBK_CHECK_CABINET, SOUND_SPACE_DEFAULT) - EVT_CALL(TranslateModel, MODEL_tansu1, 0, 0, 100) - EVT_CALL(RotateModel, MODEL_tansu1, 1, 1, 0, 0) - EVT_CALL(TranslateModel, MODEL_tansu1, 0, 0, -100) - EVT_WAIT(2) - EVT_CALL(RotateModel, MODEL_tansu1, 0, 1, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_EXEC(N(EVS_CrushPlayer)) - EVT_CALL(MakeLerp, 0, -90, 30, EASING_QUARTIC_IN) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_tansu1, LVar0, 0, 0, 1) - EVT_CALL(UpdateColliderTransform, COLLIDER_tansu1) - EVT_CALL(UpdateColliderTransform, COLLIDER_o372) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, COLLIDER_tansu1, SOUND_OBK_CABINET_CRASH, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30, EVT_FLOAT(1.5)) - EVT_END_THREAD - EVT_USE_BUF(EVT_PTR(N(DustEmitters_NearCabinet))) - EVT_LOOP(16) - EVT_BUF_READ2(LVar0, LVar1) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 2, LVar0, 0, LVar1, 0) - EVT_END_LOOP - EVT_WAIT(60) - EVT_CALL(MakeLerp, -90, 0, 10, EASING_LINEAR) - EVT_LABEL(15) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_tansu1, LVar0, 0, 0, 1) - EVT_CALL(UpdateColliderTransform, COLLIDER_tansu1) - EVT_CALL(UpdateColliderTransform, COLLIDER_o372) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(15) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_RestorePlayer)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Label(3) + Call(DisablePlayerInput, TRUE) + Call(InterruptUsePartner) + Loop(3) + Call(PlaySoundAtCollider, COLLIDER_tansu1, SOUND_OBK_CHECK_CABINET, SOUND_SPACE_DEFAULT) + Call(RotateModel, MODEL_tansu1, -1, 1, 0, 0) + Wait(2) + Call(RotateModel, MODEL_tansu1, 0, 1, 0, 0) + Wait(1) + Call(PlaySoundAtCollider, COLLIDER_tansu1, SOUND_OBK_CHECK_CABINET, SOUND_SPACE_DEFAULT) + Call(TranslateModel, MODEL_tansu1, 0, 0, 100) + Call(RotateModel, MODEL_tansu1, 1, 1, 0, 0) + Call(TranslateModel, MODEL_tansu1, 0, 0, -100) + Wait(2) + Call(RotateModel, MODEL_tansu1, 0, 1, 0, 0) + Wait(1) + EndLoop + Exec(N(EVS_CrushPlayer)) + Call(MakeLerp, 0, -90, 30, EASING_QUARTIC_IN) + Label(10) + Call(UpdateLerp) + Call(RotateModel, MODEL_tansu1, LVar0, 0, 0, 1) + Call(UpdateColliderTransform, COLLIDER_tansu1) + Call(UpdateColliderTransform, COLLIDER_o372) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(PlaySoundAtCollider, COLLIDER_tansu1, SOUND_OBK_CABINET_CRASH, SOUND_SPACE_DEFAULT) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 30, Float(1.5)) + EndThread + UseBuf(Ref(N(DustEmitters_NearCabinet))) + Loop(16) + BufRead2(LVar0, LVar1) + PlayEffect(EFFECT_LANDING_DUST, 2, LVar0, 0, LVar1, 0) + EndLoop + Wait(60) + Call(MakeLerp, -90, 0, 10, EASING_LINEAR) + Label(15) + Call(UpdateLerp) + Call(RotateModel, MODEL_tansu1, LVar0, 0, 0, 1) + Call(UpdateColliderTransform, COLLIDER_tansu1) + Call(UpdateColliderTransform, COLLIDER_o372) + Wait(1) + IfEq(LVar1, 1) + Goto(15) + EndIf + ExecWait(N(EVS_RestorePlayer)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Interact_FarCabinet) = { - EVT_LABEL(5) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterruptUsePartner) - EVT_LOOP(5) - EVT_CALL(PlaySoundAtCollider, COLLIDER_tansu3, SOUND_OBK_CHECK_CABINET, SOUND_SPACE_DEFAULT) - EVT_CALL(RotateModel, MODEL_tansu3, -1, 1, 0, 0) - EVT_WAIT(2) - EVT_CALL(RotateModel, MODEL_tansu3, 0, 1, 0, 0) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtCollider, COLLIDER_tansu3, SOUND_OBK_CHECK_CABINET, SOUND_SPACE_DEFAULT) - EVT_CALL(TranslateModel, MODEL_tansu3, 0, 0, 100) - EVT_CALL(RotateModel, MODEL_tansu3, 1, 1, 0, 0) - EVT_CALL(TranslateModel, MODEL_tansu3, 0, 0, -100) - EVT_WAIT(2) - EVT_CALL(RotateModel, MODEL_tansu3, 0, 1, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_EXEC(N(EVS_CrushPlayer)) - EVT_CALL(MakeLerp, 0, -90, 30, EASING_QUARTIC_IN) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_tansu3, LVar0, 0, 0, 1) - EVT_CALL(UpdateColliderTransform, COLLIDER_tansu3) - EVT_CALL(UpdateColliderTransform, COLLIDER_o373) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, COLLIDER_tansu3, SOUND_OBK_CABINET_CRASH, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30, EVT_FLOAT(1.5)) - EVT_END_THREAD - EVT_USE_BUF(EVT_PTR(N(DustEmitters_FarCabinet))) - EVT_LOOP(16) - EVT_BUF_READ2(LVar0, LVar1) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 2, LVar0, 0, LVar1, 0) - EVT_END_LOOP - EVT_WAIT(60) - EVT_CALL(MakeLerp, -90, 0, 10, EASING_LINEAR) - EVT_LABEL(25) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_tansu3, LVar0, 0, 0, 1) - EVT_CALL(UpdateColliderTransform, COLLIDER_tansu3) - EVT_CALL(UpdateColliderTransform, COLLIDER_o373) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(25) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_RestorePlayer)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Label(5) + Call(DisablePlayerInput, TRUE) + Call(InterruptUsePartner) + Loop(5) + Call(PlaySoundAtCollider, COLLIDER_tansu3, SOUND_OBK_CHECK_CABINET, SOUND_SPACE_DEFAULT) + Call(RotateModel, MODEL_tansu3, -1, 1, 0, 0) + Wait(2) + Call(RotateModel, MODEL_tansu3, 0, 1, 0, 0) + Wait(1) + Call(PlaySoundAtCollider, COLLIDER_tansu3, SOUND_OBK_CHECK_CABINET, SOUND_SPACE_DEFAULT) + Call(TranslateModel, MODEL_tansu3, 0, 0, 100) + Call(RotateModel, MODEL_tansu3, 1, 1, 0, 0) + Call(TranslateModel, MODEL_tansu3, 0, 0, -100) + Wait(2) + Call(RotateModel, MODEL_tansu3, 0, 1, 0, 0) + Wait(1) + EndLoop + Exec(N(EVS_CrushPlayer)) + Call(MakeLerp, 0, -90, 30, EASING_QUARTIC_IN) + Label(20) + Call(UpdateLerp) + Call(RotateModel, MODEL_tansu3, LVar0, 0, 0, 1) + Call(UpdateColliderTransform, COLLIDER_tansu3) + Call(UpdateColliderTransform, COLLIDER_o373) + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Call(PlaySoundAtCollider, COLLIDER_tansu3, SOUND_OBK_CABINET_CRASH, SOUND_SPACE_DEFAULT) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 30, Float(1.5)) + EndThread + UseBuf(Ref(N(DustEmitters_FarCabinet))) + Loop(16) + BufRead2(LVar0, LVar1) + PlayEffect(EFFECT_LANDING_DUST, 2, LVar0, 0, LVar1, 0) + EndLoop + Wait(60) + Call(MakeLerp, -90, 0, 10, EASING_LINEAR) + Label(25) + Call(UpdateLerp) + Call(RotateModel, MODEL_tansu3, LVar0, 0, 0, 1) + Call(UpdateColliderTransform, COLLIDER_tansu3) + Call(UpdateColliderTransform, COLLIDER_o373) + Wait(1) + IfEq(LVar1, 1) + Goto(25) + EndIf + ExecWait(N(EVS_RestorePlayer)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SetupCabinets) = { - EVT_CALL(ParentColliderToModel, COLLIDER_tansu1, MODEL_tansu1) - EVT_CALL(ParentColliderToModel, COLLIDER_o372, MODEL_tansu1) - EVT_CALL(ParentColliderToModel, COLLIDER_tansu3, MODEL_tansu3) - EVT_CALL(ParentColliderToModel, COLLIDER_o373, MODEL_tansu3) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Interact_NearCabinet)), TRIGGER_WALL_PRESS_A, COLLIDER_tansu1, 1, MV_Trigger_NearCabinet) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Interact_MiddleCabinet)), TRIGGER_WALL_PRESS_A, COLLIDER_tansu2, 1, MV_Trigger_MidCabinet) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Interact_FarCabinet)), TRIGGER_WALL_PRESS_A, COLLIDER_tansu3, 1, MV_Trigger_FarCabinet) - EVT_RETURN - EVT_END + Call(ParentColliderToModel, COLLIDER_tansu1, MODEL_tansu1) + Call(ParentColliderToModel, COLLIDER_o372, MODEL_tansu1) + Call(ParentColliderToModel, COLLIDER_tansu3, MODEL_tansu3) + Call(ParentColliderToModel, COLLIDER_o373, MODEL_tansu3) + BindTrigger(Ref(N(EVS_Interact_NearCabinet)), TRIGGER_WALL_PRESS_A, COLLIDER_tansu1, 1, MV_Trigger_NearCabinet) + BindTrigger(Ref(N(EVS_Interact_MiddleCabinet)), TRIGGER_WALL_PRESS_A, COLLIDER_tansu2, 1, MV_Trigger_MidCabinet) + BindTrigger(Ref(N(EVS_Interact_FarCabinet)), TRIGGER_WALL_PRESS_A, COLLIDER_tansu3, 1, MV_Trigger_FarCabinet) + Return + End }; EvtScript N(EVS_BindCabinetTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Interact_NearCabinet)), TRIGGER_WALL_PRESS_A, COLLIDER_tansu1, 1, MV_Trigger_NearCabinet) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Interact_MiddleCabinet)), TRIGGER_WALL_PRESS_A, COLLIDER_tansu2, 1, MV_Trigger_MidCabinet) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Interact_FarCabinet)), TRIGGER_WALL_PRESS_A, COLLIDER_tansu3, 1, MV_Trigger_FarCabinet) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_Interact_NearCabinet)), TRIGGER_WALL_PRESS_A, COLLIDER_tansu1, 1, MV_Trigger_NearCabinet) + BindTrigger(Ref(N(EVS_Interact_MiddleCabinet)), TRIGGER_WALL_PRESS_A, COLLIDER_tansu2, 1, MV_Trigger_MidCabinet) + BindTrigger(Ref(N(EVS_Interact_FarCabinet)), TRIGGER_WALL_PRESS_A, COLLIDER_tansu3, 1, MV_Trigger_FarCabinet) + Return + End }; diff --git a/src/world/area_obk/obk_08/obk_08_4_entity.c b/src/world/area_obk/obk_08/obk_08_4_entity.c index 4db50563953..65d7a69d387 100644 --- a/src/world/area_obk/obk_08/obk_08_4_entity.c +++ b/src/world/area_obk/obk_08/obk_08_4_entity.c @@ -14,162 +14,162 @@ API_CALLABLE(N(EnableItemTransparency)) { } EvtScript N(EVS_AnimateShutterLeft) = { - EVT_CALL(PlaySoundWithVolume, SOUND_SEQ_WINDOW_OPEN, 0) - EVT_CALL(PlaySoundAtModel, LVar2, SOUND_SEQ_WINDOW_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(N(ShutterCrashRumble), 5) - EVT_SET(LVar3, 90) - EVT_CALL(MakeLerp, 0, LVar3, 15, EASING_COS_FAST_OVERSHOOT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, LVar2, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(N(ShutterCrashRumble), 5) - EVT_SET(LVar4, 0) - EVT_LABEL(15) - EVT_CALL(MakeLerp, LVar3, 20, 20, EASING_COS_FAST_OVERSHOOT) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, LVar2, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(N(ShutterCrashRumble), 5) - EVT_CALL(MakeLerp, 20, LVar3, 5, EASING_COS_FAST_OVERSHOOT) - EVT_LABEL(30) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, LVar2, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(30) - EVT_END_IF - EVT_CALL(N(ShutterCrashRumble), 5) - EVT_IF_NE(MV_WindowsIdle, 0) - EVT_GOTO(35) - EVT_END_IF - EVT_ADD(LVar4, 1) - EVT_IF_NE(LVar4, 2) - EVT_GOTO(15) - EVT_END_IF - EVT_LABEL(35) - EVT_CALL(MakeLerp, LVar3, 0, 15, EASING_QUADRATIC_IN) - EVT_LABEL(40) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, LVar2, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(40) - EVT_END_IF - EVT_CALL(PlaySoundWithVolume, SOUND_SEQ_WINDOW_CLOSE, 0) - EVT_CALL(PlaySoundAtModel, LVar2, SOUND_SEQ_WINDOW_CLOSE, SOUND_SPACE_DEFAULT) - EVT_RETURN - EVT_END + Call(PlaySoundWithVolume, SOUND_SEQ_WINDOW_OPEN, 0) + Call(PlaySoundAtModel, LVar2, SOUND_SEQ_WINDOW_OPEN, SOUND_SPACE_DEFAULT) + Call(N(ShutterCrashRumble), 5) + Set(LVar3, 90) + Call(MakeLerp, 0, LVar3, 15, EASING_COS_FAST_OVERSHOOT) + Label(10) + Call(UpdateLerp) + Call(RotateModel, LVar2, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(N(ShutterCrashRumble), 5) + Set(LVar4, 0) + Label(15) + Call(MakeLerp, LVar3, 20, 20, EASING_COS_FAST_OVERSHOOT) + Label(20) + Call(UpdateLerp) + Call(RotateModel, LVar2, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Call(N(ShutterCrashRumble), 5) + Call(MakeLerp, 20, LVar3, 5, EASING_COS_FAST_OVERSHOOT) + Label(30) + Call(UpdateLerp) + Call(RotateModel, LVar2, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(30) + EndIf + Call(N(ShutterCrashRumble), 5) + IfNe(MV_WindowsIdle, 0) + Goto(35) + EndIf + Add(LVar4, 1) + IfNe(LVar4, 2) + Goto(15) + EndIf + Label(35) + Call(MakeLerp, LVar3, 0, 15, EASING_QUADRATIC_IN) + Label(40) + Call(UpdateLerp) + Call(RotateModel, LVar2, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(40) + EndIf + Call(PlaySoundWithVolume, SOUND_SEQ_WINDOW_CLOSE, 0) + Call(PlaySoundAtModel, LVar2, SOUND_SEQ_WINDOW_CLOSE, SOUND_SPACE_DEFAULT) + Return + End }; EvtScript N(EVS_AnimateShutterRight) = { - EVT_CALL(N(ShutterCrashRumble), 5) - EVT_SET(LVar3, 90) - EVT_CALL(MakeLerp, 0, LVar3, 15, EASING_COS_FAST_OVERSHOOT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, LVar2, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(N(ShutterCrashRumble), 5) - EVT_SET(LVar4, 0) - EVT_LABEL(15) - EVT_CALL(MakeLerp, LVar3, 20, 17, EASING_COS_FAST_OVERSHOOT) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, LVar2, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(N(ShutterCrashRumble), 5) - EVT_CALL(MakeLerp, 20, LVar3, 8, EASING_COS_FAST_OVERSHOOT) - EVT_LABEL(30) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, LVar2, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(30) - EVT_END_IF - EVT_CALL(N(ShutterCrashRumble), 5) - EVT_IF_NE(MV_WindowsIdle, 0) - EVT_GOTO(35) - EVT_END_IF - EVT_ADD(LVar4, 1) - EVT_IF_NE(LVar4, 2) - EVT_GOTO(15) - EVT_END_IF - EVT_LABEL(35) - EVT_CALL(MakeLerp, LVar3, 0, 15, EASING_QUADRATIC_IN) - EVT_LABEL(40) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, LVar2, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(40) - EVT_END_IF - EVT_RETURN - EVT_END + Call(N(ShutterCrashRumble), 5) + Set(LVar3, 90) + Call(MakeLerp, 0, LVar3, 15, EASING_COS_FAST_OVERSHOOT) + Label(10) + Call(UpdateLerp) + Call(RotateModel, LVar2, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(N(ShutterCrashRumble), 5) + Set(LVar4, 0) + Label(15) + Call(MakeLerp, LVar3, 20, 17, EASING_COS_FAST_OVERSHOOT) + Label(20) + Call(UpdateLerp) + Call(RotateModel, LVar2, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Call(N(ShutterCrashRumble), 5) + Call(MakeLerp, 20, LVar3, 8, EASING_COS_FAST_OVERSHOOT) + Label(30) + Call(UpdateLerp) + Call(RotateModel, LVar2, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(30) + EndIf + Call(N(ShutterCrashRumble), 5) + IfNe(MV_WindowsIdle, 0) + Goto(35) + EndIf + Add(LVar4, 1) + IfNe(LVar4, 2) + Goto(15) + EndIf + Label(35) + Call(MakeLerp, LVar3, 0, 15, EASING_QUADRATIC_IN) + Label(40) + Call(UpdateLerp) + Call(RotateModel, LVar2, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(40) + EndIf + Return + End }; EvtScript N(EVS_ManageWindows) = { - EVT_LABEL(10) - EVT_CALL(AwaitPlayerApproach, 0, -390, 150) - EVT_SET(MV_WindowsIdle, FALSE) - EVT_SET(LVar5, 0) - EVT_SET(LVar2, MODEL_m21) - EVT_EXEC(N(EVS_AnimateShutterLeft)) - EVT_WAIT(3) - EVT_SET(LVar2, MODEL_m22) - EVT_EXEC(N(EVS_AnimateShutterRight)) - EVT_WAIT(2) - EVT_SET(LVar5, 1) - EVT_SET(LVar2, MODEL_m41) - EVT_EXEC(N(EVS_AnimateShutterLeft)) - EVT_WAIT(3) - EVT_SET(LVar2, MODEL_m42) - EVT_EXEC(N(EVS_AnimateShutterRight)) - EVT_WAIT(2) - EVT_SET(LVar5, 0) - EVT_SET(LVar2, MODEL_m31) - EVT_EXEC(N(EVS_AnimateShutterLeft)) - EVT_WAIT(2) - EVT_SET(LVar2, MODEL_m32) - EVT_EXEC(N(EVS_AnimateShutterRight)) - EVT_WAIT(2) - EVT_SET(LVar5, 1) - EVT_SET(LVar2, MODEL_m11) - EVT_EXEC(N(EVS_AnimateShutterLeft)) - EVT_WAIT(3) - EVT_SET(LVar2, MODEL_m12) - EVT_EXEC(N(EVS_AnimateShutterRight)) - EVT_WAIT(2) - EVT_CALL(AwaitPlayerLeave, 0, -390, 170) - EVT_SET(MV_WindowsIdle, TRUE) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Label(10) + Call(AwaitPlayerApproach, 0, -390, 150) + Set(MV_WindowsIdle, FALSE) + Set(LVar5, 0) + Set(LVar2, MODEL_m21) + Exec(N(EVS_AnimateShutterLeft)) + Wait(3) + Set(LVar2, MODEL_m22) + Exec(N(EVS_AnimateShutterRight)) + Wait(2) + Set(LVar5, 1) + Set(LVar2, MODEL_m41) + Exec(N(EVS_AnimateShutterLeft)) + Wait(3) + Set(LVar2, MODEL_m42) + Exec(N(EVS_AnimateShutterRight)) + Wait(2) + Set(LVar5, 0) + Set(LVar2, MODEL_m31) + Exec(N(EVS_AnimateShutterLeft)) + Wait(2) + Set(LVar2, MODEL_m32) + Exec(N(EVS_AnimateShutterRight)) + Wait(2) + Set(LVar5, 1) + Set(LVar2, MODEL_m11) + Exec(N(EVS_AnimateShutterLeft)) + Wait(3) + Set(LVar2, MODEL_m12) + Exec(N(EVS_AnimateShutterRight)) + Wait(2) + Call(AwaitPlayerLeave, 0, -390, 170) + Set(MV_WindowsIdle, TRUE) + Goto(10) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH3_GOT_RECORD) - EVT_CALL(MakeItemEntity, ITEM_BOO_RECORD, 0, 0, -20, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OBK08_Item_Record) - EVT_ELSE - EVT_CALL(MakeItemEntity, ITEM_BOO_RECORD, NPC_DISPOSE_LOCATION, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_CALL(N(EnableItemTransparency)) - EVT_SET(MV_KeepAwayItem, LVar0) - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 0, 0, 0, 0, MODEL_yuka_jyu, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_OBK08_HiddenPanel) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH3_GOT_RECORD) + Call(MakeItemEntity, ITEM_BOO_RECORD, 0, 0, -20, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OBK08_Item_Record) + Else + Call(MakeItemEntity, ITEM_BOO_RECORD, NPC_DISPOSE_LOCATION, ITEM_SPAWN_MODE_DECORATION, 0) + Call(N(EnableItemTransparency)) + Set(MV_KeepAwayItem, LVar0) + EndIf + Call(MakeEntity, Ref(Entity_HiddenPanel), 0, 0, 0, 0, MODEL_yuka_jyu, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_OBK08_HiddenPanel) + Return + End }; diff --git a/src/world/area_obk/obk_08/obk_08_5_npc.c b/src/world/area_obk/obk_08/obk_08_5_npc.c index 9426d7a19b0..760bfa2f61e 100644 --- a/src/world/area_obk/obk_08/obk_08_5_npc.c +++ b/src/world/area_obk/obk_08/obk_08_5_npc.c @@ -201,249 +201,249 @@ API_CALLABLE(func_80240D10_BD4580) { } EvtScript N(EVS_NpcIdle_Boo_01) = { - EVT_WAIT(4) - EVT_CALL(N(func_802408A0_BD4110)) - EVT_LABEL(10) - EVT_CALL(N(func_80240AF0_BD4360)) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Wait(4) + Call(N(func_802408A0_BD4110)) + Label(10) + Call(N(func_80240AF0_BD4360)) + Wait(1) + Goto(10) + Return + End }; EvtScript N(EVS_NpcIdle_KeepAwayBoo) = { - EVT_WAIT(5) - EVT_CALL(N(func_80240CA0_BD4510)) - EVT_LABEL(10) - EVT_CALL(func_80240D10_BD4580) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Wait(5) + Call(N(func_80240CA0_BD4510)) + Label(10) + Call(func_80240D10_BD4580) + Wait(1) + Goto(10) + Return + End }; EvtScript N(EVS_OnHit_KeepAwayBoo) = { - EVT_IF_EQ(MV_ThrowTargetNpc, LVar0) - EVT_SET(MV_KeepAwayResult, KEEP_AWAY_RIGHT) - EVT_ELSE - EVT_SET(MV_KeepAwayResult, KEEP_AWAY_WRONG) - EVT_END_IF - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Boo_Cower) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Boo_Idle) - EVT_END_THREAD - EVT_RETURN - EVT_END + IfEq(MV_ThrowTargetNpc, LVar0) + Set(MV_KeepAwayResult, KEEP_AWAY_RIGHT) + Else + Set(MV_KeepAwayResult, KEEP_AWAY_WRONG) + EndIf + Thread + Call(SetNpcAnimation, NPC_SELF, ANIM_Boo_Cower) + Wait(30) + Call(SetNpcAnimation, NPC_SELF, ANIM_Boo_Idle) + EndThread + Return + End }; EvtScript N(EVS_NpcHit_KeepAwayBoo1) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(LVar0, NPC_KeepAwayBoo1) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_SET(LVar0, NPC_KeepAwayBoo1) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(LVar0, NPC_KeepAwayBoo1) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + CaseEq(ENCOUNTER_TRIGGER_JUMP) + Set(LVar0, NPC_KeepAwayBoo1) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_NpcHit_KeepAwayBoo2) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(LVar0, NPC_KeepAwayBoo2) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_SET(LVar0, NPC_KeepAwayBoo2) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(LVar0, NPC_KeepAwayBoo2) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + CaseEq(ENCOUNTER_TRIGGER_JUMP) + Set(LVar0, NPC_KeepAwayBoo2) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_NpcHit_KeepAwayBoo3) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(LVar0, NPC_KeepAwayBoo3) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_SET(LVar0, NPC_KeepAwayBoo3) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(LVar0, NPC_KeepAwayBoo3) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + CaseEq(ENCOUNTER_TRIGGER_JUMP) + Set(LVar0, NPC_KeepAwayBoo3) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_NpcHit_KeepAwayBoo4) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(LVar0, NPC_KeepAwayBoo4) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_SET(LVar0, NPC_KeepAwayBoo4) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(LVar0, NPC_KeepAwayBoo4) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + CaseEq(ENCOUNTER_TRIGGER_JUMP) + Set(LVar0, NPC_KeepAwayBoo4) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_NpcHit_KeepAwayBoo5) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(LVar0, NPC_KeepAwayBoo5) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_SET(LVar0, NPC_KeepAwayBoo5) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(LVar0, NPC_KeepAwayBoo5) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + CaseEq(ENCOUNTER_TRIGGER_JUMP) + Set(LVar0, NPC_KeepAwayBoo5) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_NpcHit_KeepAwayBoo6) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(LVar0, NPC_KeepAwayBoo6) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_SET(LVar0, NPC_KeepAwayBoo6) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(LVar0, NPC_KeepAwayBoo6) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + CaseEq(ENCOUNTER_TRIGGER_JUMP) + Set(LVar0, NPC_KeepAwayBoo6) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_NpcHit_KeepAwayBoo7) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(LVar0, NPC_KeepAwayBoo7) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_SET(LVar0, NPC_KeepAwayBoo7) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(LVar0, NPC_KeepAwayBoo7) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + CaseEq(ENCOUNTER_TRIGGER_JUMP) + Set(LVar0, NPC_KeepAwayBoo7) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_NpcHit_KeepAwayBoo8) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(LVar0, NPC_KeepAwayBoo8) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_SET(LVar0, NPC_KeepAwayBoo8) - EVT_EXEC_WAIT(N(EVS_OnHit_KeepAwayBoo)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(LVar0, NPC_KeepAwayBoo8) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + CaseEq(ENCOUNTER_TRIGGER_JUMP) + Set(LVar0, NPC_KeepAwayBoo8) + ExecWait(N(EVS_OnHit_KeepAwayBoo)) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Boo_01) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Boo_01))) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_GOT_RECORD) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Boo_01))) + IfGe(GB_StoryProgress, STORY_CH3_GOT_RECORD) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_KeepAwayBoo1) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_KeepAwayBoo))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_KeepAwayBoo1))) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_GOT_RECORD) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_KeepAwayBoo))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_KeepAwayBoo1))) + IfGe(GB_StoryProgress, STORY_CH3_GOT_RECORD) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_KeepAwayBoo2) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_KeepAwayBoo))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_KeepAwayBoo2))) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_GOT_RECORD) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_KeepAwayBoo))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_KeepAwayBoo2))) + IfGe(GB_StoryProgress, STORY_CH3_GOT_RECORD) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_KeepAwayBoo3) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_KeepAwayBoo))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_KeepAwayBoo3))) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_GOT_RECORD) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_KeepAwayBoo))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_KeepAwayBoo3))) + IfGe(GB_StoryProgress, STORY_CH3_GOT_RECORD) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_KeepAwayBoo4) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_KeepAwayBoo))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_KeepAwayBoo4))) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_GOT_RECORD) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_KeepAwayBoo))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_KeepAwayBoo4))) + IfGe(GB_StoryProgress, STORY_CH3_GOT_RECORD) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_KeepAwayBoo5) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_KeepAwayBoo))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_KeepAwayBoo5))) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_GOT_RECORD) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_KeepAwayBoo))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_KeepAwayBoo5))) + IfGe(GB_StoryProgress, STORY_CH3_GOT_RECORD) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_KeepAwayBoo6) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_KeepAwayBoo))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_KeepAwayBoo6))) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_GOT_RECORD) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_KeepAwayBoo))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_KeepAwayBoo6))) + IfGe(GB_StoryProgress, STORY_CH3_GOT_RECORD) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_KeepAwayBoo7) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_KeepAwayBoo))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_KeepAwayBoo7))) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_GOT_RECORD) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_KeepAwayBoo))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_KeepAwayBoo7))) + IfGe(GB_StoryProgress, STORY_CH3_GOT_RECORD) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_KeepAwayBoo8) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_KeepAwayBoo))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_KeepAwayBoo8))) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_GOT_RECORD) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_KeepAwayBoo))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_KeepAwayBoo8))) + IfGe(GB_StoryProgress, STORY_CH3_GOT_RECORD) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_Boo_01) = { @@ -550,15 +550,15 @@ NpcData N(NpcData_KeepAwayBoo8) = { #include "../common/TrafficBoos.inc.c" EvtScript N(EVS_NpcInit_TrafficBoo1) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TrafficBoo))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_TrafficBoo))) + Return + End }; EvtScript N(EVS_NpcInit_TrafficBoo2) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TrafficBoo))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_TrafficBoo))) + Return + End }; NpcData N(NpcData_TrafficBoos)[] = { @@ -585,14 +585,14 @@ NpcData N(NpcData_TrafficBoos)[] = { }; EvtScript N(EVS_NpcInit_Boo_12) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInit_Boo_13) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, TRUE) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, TRUE) + Return + End }; NpcData N(NpcData_KeepAwayExtras)[] = { diff --git a/src/world/area_obk/obk_08/obk_08_6_game.c b/src/world/area_obk/obk_08/obk_08_6_game.c index 69010bc0667..84b304fc15a 100644 --- a/src/world/area_obk/obk_08/obk_08_6_game.c +++ b/src/world/area_obk/obk_08/obk_08_6_game.c @@ -107,338 +107,338 @@ API_CALLABLE(N(GetPlayerPosOutsideKeepAwayRing)) { } EvtScript N(EVS_DetermineCarrierNPC) = { - EVT_SWITCH(MV_ThrowTargetNpc) - EVT_CASE_EQ(NPC_Boo_01) - EVT_SET(MV_ItemCarrierNpc, NPC_Boo_01) - EVT_CASE_EQ(NPC_KeepAwayBoo1) - EVT_SET(MV_ItemCarrierNpc, NPC_KeepAwayBoo1) - EVT_CASE_EQ(NPC_KeepAwayBoo2) - EVT_SET(MV_ItemCarrierNpc, NPC_KeepAwayBoo2) - EVT_CASE_EQ(NPC_KeepAwayBoo3) - EVT_SET(MV_ItemCarrierNpc, NPC_KeepAwayBoo3) - EVT_CASE_EQ(NPC_KeepAwayBoo4) - EVT_SET(MV_ItemCarrierNpc, NPC_KeepAwayBoo4) - EVT_CASE_EQ(NPC_KeepAwayBoo5) - EVT_SET(MV_ItemCarrierNpc, NPC_KeepAwayBoo5) - EVT_CASE_EQ(NPC_KeepAwayBoo6) - EVT_SET(MV_ItemCarrierNpc, NPC_KeepAwayBoo6) - EVT_CASE_EQ(NPC_KeepAwayBoo7) - EVT_SET(MV_ItemCarrierNpc, NPC_KeepAwayBoo7) - EVT_CASE_EQ(NPC_KeepAwayBoo8) - EVT_SET(MV_ItemCarrierNpc, NPC_KeepAwayBoo8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(MV_ThrowTargetNpc) + CaseEq(NPC_Boo_01) + Set(MV_ItemCarrierNpc, NPC_Boo_01) + CaseEq(NPC_KeepAwayBoo1) + Set(MV_ItemCarrierNpc, NPC_KeepAwayBoo1) + CaseEq(NPC_KeepAwayBoo2) + Set(MV_ItemCarrierNpc, NPC_KeepAwayBoo2) + CaseEq(NPC_KeepAwayBoo3) + Set(MV_ItemCarrierNpc, NPC_KeepAwayBoo3) + CaseEq(NPC_KeepAwayBoo4) + Set(MV_ItemCarrierNpc, NPC_KeepAwayBoo4) + CaseEq(NPC_KeepAwayBoo5) + Set(MV_ItemCarrierNpc, NPC_KeepAwayBoo5) + CaseEq(NPC_KeepAwayBoo6) + Set(MV_ItemCarrierNpc, NPC_KeepAwayBoo6) + CaseEq(NPC_KeepAwayBoo7) + Set(MV_ItemCarrierNpc, NPC_KeepAwayBoo7) + CaseEq(NPC_KeepAwayBoo8) + Set(MV_ItemCarrierNpc, NPC_KeepAwayBoo8) + EndSwitch + Return + End }; EvtScript N(EVS_TetherItemToNpcWithOffset) = { - EVT_LOOP(0) - EVT_CALL(GetNpcPos, LVar0, LVar6, LVar7, LVar8) - EVT_ADD(LVar6, LVar3) - EVT_ADD(LVar7, LVar4) - EVT_ADD(LVar8, LVar5) - EVT_CALL(SetItemPos, MV_KeepAwayItem, LVar6, LVar7, LVar8) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetNpcPos, LVar0, LVar6, LVar7, LVar8) + Add(LVar6, LVar3) + Add(LVar7, LVar4) + Add(LVar8, LVar5) + Call(SetItemPos, MV_KeepAwayItem, LVar6, LVar7, LVar8) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_BooSpookAndVanish) = { - EVT_CALL(SetNpcFlagBits, LVarA, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, FALSE) - EVT_CALL(NpcFacePlayer, LVarA, 0) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, LVarA, ANIM_Boo_Spook) - EVT_WAIT(10) - EVT_CALL(MakeLerp, 255, 0, 60, EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcImgFXParams, LVarA, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetNpcPos, LVarA, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, LVarA, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, FALSE) + Call(NpcFacePlayer, LVarA, 0) + Wait(5) + Call(SetNpcAnimation, LVarA, ANIM_Boo_Spook) + Wait(10) + Call(MakeLerp, 255, 0, 60, EASING_LINEAR) + Label(0) + Call(UpdateLerp) + Call(SetNpcImgFXParams, LVarA, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(SetNpcPos, LVarA, NPC_DISPOSE_LOCATION) + Return + End }; EvtScript N(EVS_Scene_BoosUnleashed) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterruptUsePartner) - EVT_CALL(SetMusicTrack, 0, SONG_BOO_MINIGAME, 0, 8) - EVT_WAIT(20) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_WAIT(20) - EVT_THREAD - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(2.0)) - EVT_CALL(PlayerMoveTo, -170, 0, 0) - EVT_END_THREAD - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(2.0), 0, 0, 0, EVT_FLOAT(450.0), EVT_FLOAT(15.0), EVT_FLOAT(-7.0)) - EVT_WAIT(60) - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(2.0), 0, 0, 0, EVT_FLOAT(325.0), EVT_FLOAT(13.0), EVT_FLOAT(-13.0)) - EVT_CALL(SetNpcPos, NPC_LeaderBoo, 0, 45, 20) - EVT_CALL(SetItemPos, MV_KeepAwayItem, 0, 65, 0) - EVT_CALL(MakeLerp, 0, 255, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcImgFXParams, NPC_LeaderBoo, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_CALL(SetItemAlpha, MV_KeepAwayItem, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SpeakToPlayer, NPC_LeaderBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0030) - EVT_LABEL(50) - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(2.0), 0, 0, 0, EVT_FLOAT(500.0), EVT_FLOAT(15.0), EVT_FLOAT(-7.0)) - EVT_WAIT(20) - EVT_CALL(MakeLerp, 255, 0, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcImgFXParams, NPC_LeaderBoo, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_CALL(SetItemAlpha, MV_KeepAwayItem, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_EQ(MV_Unk_01, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(10) - EVT_SET(LVar0, 270) - EVT_SET(MV_Unk_Angle, LVar0) - EVT_CALL(N(func_80241220_BD4A90)) - EVT_CALL(MakeLerp, 0, 255, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcImgFXParams, NPC_LeaderBoo, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_CALL(GetNpcPos, NPC_LeaderBoo, LVar3, LVar4, LVar5) - EVT_ADD(LVar4, 20) - EVT_CALL(SetItemPos, MV_KeepAwayItem, LVar3, LVar4, LVar5) - EVT_CALL(SetItemAlpha, MV_KeepAwayItem, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_LeaderBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0031) - EVT_WAIT(20) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_LeaderBoo, LVar3, LVar4, LVar5) - EVT_SET(LVar6, LVar4) - EVT_ADD(LVar6, 20) - EVT_CALL(MakeLerp, LVar6, LVar4, 20, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetItemPos, MV_KeepAwayItem, LVar3, LVar0, LVar5) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetItemPos, MV_KeepAwayItem, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_WAIT(20) - EVT_CALL(RandInt, 360, LVar0) - EVT_ADD(LVar0, 180) - EVT_SET(LVarA, LVar0) - EVT_CALL(RandInt, 20, LVar0) - EVT_ADD(LVar0, 360) - EVT_SET(LVarB, LVar0) - EVT_SET(LVar0, MV_Unk_Angle) - EVT_LOOP(0) - EVT_CALL(N(func_80241220_BD4A90)) - EVT_CALL(N(func_802412BC_BD4B2C)) - EVT_WAIT(1) - EVT_ADD(LVarA, -2) - EVT_IF_LE(LVarA, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LOOP(0) - EVT_CALL(N(func_80241220_BD4A90)) - EVT_CALL(N(func_802412BC_BD4B2C)) - EVT_CALL(N(func_80241300_BD4B70)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_LeaderBoo, SOUND_THROW, SOUND_SPACE_DEFAULT) - EVT_CALL(GetNpcPos, NPC_LeaderBoo, LVar3, LVar4, LVar5) - EVT_ADD(LVar5, 20) - EVT_SET(LVar6, LVar4) - EVT_ADD(LVar6, -30) - EVT_CALL(MakeLerp, LVar4, LVar6, 15, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetItemPos, MV_KeepAwayItem, LVar3, LVar0, LVar5) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetItemPos, MV_KeepAwayItem, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_LOOP(0) - EVT_CALL(N(func_80241220_BD4A90)) - EVT_CALL(N(func_802412BC_BD4B2C)) - EVT_WAIT(1) - EVT_ADD(LVarB, -2) - EVT_IF_LE(LVarB, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SpeakToPlayer, NPC_LeaderBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0032) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_WAIT(10) - EVT_SET(MV_KeepAwayResult, KEEP_AWAY_WAITING) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_NE(MV_KeepAwayResult, KEEP_AWAY_WAITING) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(MV_Unk_02, 1) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC_WAIT(N(EVS_DetermineCarrierNPC)) - EVT_IF_EQ(MV_KeepAwayResult, KEEP_AWAY_RIGHT) - EVT_CALL(GetNpcPos, MV_ItemCarrierNpc, LVar3, LVar4, LVar5) - EVT_CALL(SetNpcPos, NPC_DummyBoo, LVar3, LVar4, LVar5) - EVT_SET(LVar0, NPC_DummyBoo) + Call(DisablePlayerInput, TRUE) + Call(InterruptUsePartner) + Call(SetMusicTrack, 0, SONG_BOO_MINIGAME, 0, 8) + Wait(20) + Call(InterpPlayerYaw, 90, 0) + Wait(20) + Thread + Call(SetPlayerSpeed, Float(2.0)) + Call(PlayerMoveTo, -170, 0, 0) + EndThread + Call(SetCamProperties, CAM_DEFAULT, Float(2.0), 0, 0, 0, Float(450.0), Float(15.0), Float(-7.0)) + Wait(60) + Call(SetCamProperties, CAM_DEFAULT, Float(2.0), 0, 0, 0, Float(325.0), Float(13.0), Float(-13.0)) + Call(SetNpcPos, NPC_LeaderBoo, 0, 45, 20) + Call(SetItemPos, MV_KeepAwayItem, 0, 65, 0) + Call(MakeLerp, 0, 255, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcImgFXParams, NPC_LeaderBoo, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Call(SetItemAlpha, MV_KeepAwayItem, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SpeakToPlayer, NPC_LeaderBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0030) + Label(50) + Call(SetCamProperties, CAM_DEFAULT, Float(2.0), 0, 0, 0, Float(500.0), Float(15.0), Float(-7.0)) + Wait(20) + Call(MakeLerp, 255, 0, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcImgFXParams, NPC_LeaderBoo, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Call(SetItemAlpha, MV_KeepAwayItem, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Loop(0) + Wait(1) + IfEq(MV_Unk_01, 1) + BreakLoop + EndIf + EndLoop + Wait(10) + Set(LVar0, 270) + Set(MV_Unk_Angle, LVar0) + Call(N(func_80241220_BD4A90)) + Call(MakeLerp, 0, 255, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcImgFXParams, NPC_LeaderBoo, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Call(GetNpcPos, NPC_LeaderBoo, LVar3, LVar4, LVar5) + Add(LVar4, 20) + Call(SetItemPos, MV_KeepAwayItem, LVar3, LVar4, LVar5) + Call(SetItemAlpha, MV_KeepAwayItem, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(20) + Call(SpeakToPlayer, NPC_LeaderBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0031) + Wait(20) + Thread + Call(GetNpcPos, NPC_LeaderBoo, LVar3, LVar4, LVar5) + Set(LVar6, LVar4) + Add(LVar6, 20) + Call(MakeLerp, LVar6, LVar4, 20, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetItemPos, MV_KeepAwayItem, LVar3, LVar0, LVar5) + IfEq(LVar1, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetItemPos, MV_KeepAwayItem, NPC_DISPOSE_LOCATION) + EndThread + Wait(20) + Call(RandInt, 360, LVar0) + Add(LVar0, 180) + Set(LVarA, LVar0) + Call(RandInt, 20, LVar0) + Add(LVar0, 360) + Set(LVarB, LVar0) + Set(LVar0, MV_Unk_Angle) + Loop(0) + Call(N(func_80241220_BD4A90)) + Call(N(func_802412BC_BD4B2C)) + Wait(1) + Add(LVarA, -2) + IfLe(LVarA, 0) + BreakLoop + EndIf + EndLoop + Loop(0) + Call(N(func_80241220_BD4A90)) + Call(N(func_802412BC_BD4B2C)) + Call(N(func_80241300_BD4B70)) + Wait(1) + IfEq(LVar1, TRUE) + BreakLoop + EndIf + EndLoop + Thread + Call(PlaySoundAtNpc, NPC_LeaderBoo, SOUND_THROW, SOUND_SPACE_DEFAULT) + Call(GetNpcPos, NPC_LeaderBoo, LVar3, LVar4, LVar5) + Add(LVar5, 20) + Set(LVar6, LVar4) + Add(LVar6, -30) + Call(MakeLerp, LVar4, LVar6, 15, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetItemPos, MV_KeepAwayItem, LVar3, LVar0, LVar5) + IfEq(LVar1, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetItemPos, MV_KeepAwayItem, NPC_DISPOSE_LOCATION) + EndThread + Loop(0) + Call(N(func_80241220_BD4A90)) + Call(N(func_802412BC_BD4B2C)) + Wait(1) + Add(LVarB, -2) + IfLe(LVarB, 0) + BreakLoop + EndIf + EndLoop + Call(SpeakToPlayer, NPC_LeaderBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0032) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Wait(10) + Set(MV_KeepAwayResult, KEEP_AWAY_WAITING) + Call(DisablePlayerInput, FALSE) + Loop(0) + Wait(1) + IfNe(MV_KeepAwayResult, KEEP_AWAY_WAITING) + BreakLoop + EndIf + EndLoop + Set(MV_Unk_02, 1) + Call(DisablePlayerInput, TRUE) + ExecWait(N(EVS_DetermineCarrierNPC)) + IfEq(MV_KeepAwayResult, KEEP_AWAY_RIGHT) + Call(GetNpcPos, MV_ItemCarrierNpc, LVar3, LVar4, LVar5) + Call(SetNpcPos, NPC_DummyBoo, LVar3, LVar4, LVar5) + Set(LVar0, NPC_DummyBoo) EVT_VEC3I_SET(LVar3, 0, 0, -20) - EVT_EXEC(N(EVS_TetherItemToNpcWithOffset)) - EVT_CALL(PlaySoundAtNpc, NPC_DummyBoo, SOUND_THROW, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcJumpscale, NPC_DummyBoo, EVT_FLOAT(2.0)) - EVT_CALL(NpcJump0, NPC_DummyBoo, 0, 0, 0, 20) - EVT_CALL(SetNpcPos, NPC_DummyBoo, NPC_DISPOSE_LOCATION) - EVT_CALL(MakeItemEntity, ITEM_BOO_RECORD, 0, 0, -20, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OBK08_Item_Record) - EVT_WAIT(20) - EVT_CALL(GetNpcPos, NPC_LeaderBoo, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_LeaderBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0033) - EVT_WAIT(20) - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_LeaderBoo, 0) - EVT_CALL(NpcJump1, NPC_LeaderBoo, 0, 45, 0, 20) - EVT_CALL(InterpNpcYaw, NPC_LeaderBoo, 90, 0) - EVT_END_THREAD - EVT_CALL(N(GetPlayerPosOutsideKeepAwayRing)) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(4.0)) - EVT_CALL(PlayerMoveTo, LVar0, LVar2, 0) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(450.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(PlaySound, SOUND_BOO_SPOOK) - EVT_END_THREAD - EVT_SET(LVarA, NPC_KeepAwayBoo1) - EVT_EXEC(N(EVS_BooSpookAndVanish)) - EVT_SET(LVarA, NPC_KeepAwayBoo2) - EVT_EXEC(N(EVS_BooSpookAndVanish)) - EVT_SET(LVarA, NPC_KeepAwayBoo3) - EVT_EXEC(N(EVS_BooSpookAndVanish)) - EVT_SET(LVarA, NPC_KeepAwayBoo4) - EVT_EXEC(N(EVS_BooSpookAndVanish)) - EVT_SET(LVarA, NPC_KeepAwayBoo5) - EVT_EXEC(N(EVS_BooSpookAndVanish)) - EVT_SET(LVarA, NPC_KeepAwayBoo6) - EVT_EXEC(N(EVS_BooSpookAndVanish)) - EVT_SET(LVarA, NPC_KeepAwayBoo7) - EVT_EXEC(N(EVS_BooSpookAndVanish)) - EVT_SET(LVarA, NPC_KeepAwayBoo8) - EVT_EXEC(N(EVS_BooSpookAndVanish)) - EVT_SET(LVarA, NPC_LeaderBoo) - EVT_EXEC(N(EVS_BooSpookAndVanish)) - EVT_WAIT(60) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(450.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_ELSE - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(2.0), 0, 0, 0, EVT_FLOAT(450.0), EVT_FLOAT(15.0), EVT_FLOAT(-7.0)) - EVT_WAIT(30) - EVT_CALL(SetNpcFlagBits, MV_ItemCarrierNpc, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, FALSE) - EVT_CALL(GetNpcPos, MV_ItemCarrierNpc, LVar3, LVar4, LVar5) - EVT_CALL(GetAngleBetweenNPCs, MV_ItemCarrierNpc, NPC_Boo_01, LVar0) - EVT_CALL(InterpNpcYaw, MV_ItemCarrierNpc, LVar0, 0) - EVT_CALL(SetNpcJumpscale, MV_ItemCarrierNpc, 0) - EVT_CALL(NpcJump0, MV_ItemCarrierNpc, 0, 45, 0, 20) - EVT_CALL(InterpNpcYaw, MV_ItemCarrierNpc, 90, 0) - EVT_CALL(GetNpcPos, MV_ItemCarrierNpc, LVar6, LVar7, LVar8) - EVT_SET(LVarA, LVar7) - EVT_ADD(LVarA, 20) - EVT_CALL(MakeLerp, LVar7, LVarA, 20, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetItemPos, MV_KeepAwayItem, LVar6, LVar0, LVar8) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, MV_ItemCarrierNpc, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0034) - EVT_CALL(GetNpcPos, NPC_LeaderBoo, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, MV_ItemCarrierNpc, LVarA, LVarB, LVarC) - EVT_CALL(SetNpcPos, NPC_LeaderBoo, LVarA, LVarB, LVarC) - EVT_CALL(SetNpcPos, MV_ItemCarrierNpc, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(MakeLerp, 255, 0, 20, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcImgFXParams, MV_ItemCarrierNpc, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(10) - EVT_CALL(SetNpcPos, MV_ItemCarrierNpc, LVar3, LVar4, LVar5) - EVT_CALL(InterpNpcYaw, MV_ItemCarrierNpc, 90, 0) - EVT_CALL(MakeLerp, 0, 255, 20, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcImgFXParams, MV_ItemCarrierNpc, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcFlagBits, MV_ItemCarrierNpc, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) - EVT_SET(MV_KeepAwayResult, KEEP_AWAY_WAITING) - EVT_SET(MV_Unk_02, 0) - EVT_CALL(N(GetPlayerPosOutsideKeepAwayRing)) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(4.0)) - EVT_CALL(PlayerMoveTo, LVar0, LVar2, 0) - EVT_GOTO(50) - EVT_END_IF - EVT_SET(GB_StoryProgress, STORY_CH3_GOT_RECORD) - EVT_EXEC(N(EVS_BindCabinetTriggers)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Exec(N(EVS_TetherItemToNpcWithOffset)) + Call(PlaySoundAtNpc, NPC_DummyBoo, SOUND_THROW, SOUND_SPACE_DEFAULT) + Call(SetNpcJumpscale, NPC_DummyBoo, Float(2.0)) + Call(NpcJump0, NPC_DummyBoo, 0, 0, 0, 20) + Call(SetNpcPos, NPC_DummyBoo, NPC_DISPOSE_LOCATION) + Call(MakeItemEntity, ITEM_BOO_RECORD, 0, 0, -20, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OBK08_Item_Record) + Wait(20) + Call(GetNpcPos, NPC_LeaderBoo, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(350.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_LeaderBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0033) + Wait(20) + Thread + Call(SetNpcJumpscale, NPC_LeaderBoo, 0) + Call(NpcJump1, NPC_LeaderBoo, 0, 45, 0, 20) + Call(InterpNpcYaw, NPC_LeaderBoo, 90, 0) + EndThread + Call(N(GetPlayerPosOutsideKeepAwayRing)) + Call(SetPlayerSpeed, Float(4.0)) + Call(PlayerMoveTo, LVar0, LVar2, 0) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(450.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20) + Thread + Wait(30) + Call(PlaySound, SOUND_BOO_SPOOK) + EndThread + Set(LVarA, NPC_KeepAwayBoo1) + Exec(N(EVS_BooSpookAndVanish)) + Set(LVarA, NPC_KeepAwayBoo2) + Exec(N(EVS_BooSpookAndVanish)) + Set(LVarA, NPC_KeepAwayBoo3) + Exec(N(EVS_BooSpookAndVanish)) + Set(LVarA, NPC_KeepAwayBoo4) + Exec(N(EVS_BooSpookAndVanish)) + Set(LVarA, NPC_KeepAwayBoo5) + Exec(N(EVS_BooSpookAndVanish)) + Set(LVarA, NPC_KeepAwayBoo6) + Exec(N(EVS_BooSpookAndVanish)) + Set(LVarA, NPC_KeepAwayBoo7) + Exec(N(EVS_BooSpookAndVanish)) + Set(LVarA, NPC_KeepAwayBoo8) + Exec(N(EVS_BooSpookAndVanish)) + Set(LVarA, NPC_LeaderBoo) + Exec(N(EVS_BooSpookAndVanish)) + Wait(60) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(450.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Else + Call(SetCamProperties, CAM_DEFAULT, Float(2.0), 0, 0, 0, Float(450.0), Float(15.0), Float(-7.0)) + Wait(30) + Call(SetNpcFlagBits, MV_ItemCarrierNpc, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, FALSE) + Call(GetNpcPos, MV_ItemCarrierNpc, LVar3, LVar4, LVar5) + Call(GetAngleBetweenNPCs, MV_ItemCarrierNpc, NPC_Boo_01, LVar0) + Call(InterpNpcYaw, MV_ItemCarrierNpc, LVar0, 0) + Call(SetNpcJumpscale, MV_ItemCarrierNpc, 0) + Call(NpcJump0, MV_ItemCarrierNpc, 0, 45, 0, 20) + Call(InterpNpcYaw, MV_ItemCarrierNpc, 90, 0) + Call(GetNpcPos, MV_ItemCarrierNpc, LVar6, LVar7, LVar8) + Set(LVarA, LVar7) + Add(LVarA, 20) + Call(MakeLerp, LVar7, LVarA, 20, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetItemPos, MV_KeepAwayItem, LVar6, LVar0, LVar8) + IfEq(LVar1, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Wait(20) + Call(SpeakToPlayer, MV_ItemCarrierNpc, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_CH3_0034) + Call(GetNpcPos, NPC_LeaderBoo, LVar0, LVar1, LVar2) + Call(GetNpcPos, MV_ItemCarrierNpc, LVarA, LVarB, LVarC) + Call(SetNpcPos, NPC_LeaderBoo, LVarA, LVarB, LVarC) + Call(SetNpcPos, MV_ItemCarrierNpc, LVar0, LVar1, LVar2) + Wait(1) + Call(MakeLerp, 255, 0, 20, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcImgFXParams, MV_ItemCarrierNpc, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(10) + Call(SetNpcPos, MV_ItemCarrierNpc, LVar3, LVar4, LVar5) + Call(InterpNpcYaw, MV_ItemCarrierNpc, 90, 0) + Call(MakeLerp, 0, 255, 20, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcImgFXParams, MV_ItemCarrierNpc, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcFlagBits, MV_ItemCarrierNpc, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) + Set(MV_KeepAwayResult, KEEP_AWAY_WAITING) + Set(MV_Unk_02, 0) + Call(N(GetPlayerPosOutsideKeepAwayRing)) + Call(SetPlayerSpeed, Float(4.0)) + Call(PlayerMoveTo, LVar0, LVar2, 0) + Goto(50) + EndIf + Set(GB_StoryProgress, STORY_CH3_GOT_RECORD) + Exec(N(EVS_BindCabinetTriggers)) + Exec(N(EVS_SetupMusic)) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_obk/obk_09/obk_09_1_music.c b/src/world/area_obk/obk_09/obk_09_1_music.c index 6b6b8d034a0..251b938d983 100644 --- a/src/world/area_obk/obk_09/obk_09_1_music.c +++ b/src/world/area_obk/obk_09/obk_09_1_music.c @@ -1,25 +1,25 @@ #include "obk_09.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SetMusicTrack, 0, SONG_BOOS_MANSION, 0, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_CHEERFUL_BOOS_MANSION, 0, 8) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SetMusicTrack, 0, SONG_BOOS_MANSION, 0, 8) + Else + Call(SetMusicTrack, 0, SONG_CHEERFUL_BOOS_MANSION, 0, 8) + EndIf + Return + End }; EvtScript N(EVS_PlayNewPartnerSong) = { - EVT_CALL(SetMusicTrack, 0, SONG_NEW_PARTNER, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_NEW_PARTNER, 0, 8) + Return + End }; EvtScript N(EVS_ResetMusic) = { - EVT_CALL(FadeOutMusic, 0, 500) - EVT_WAIT(15) - EVT_CALL(SetMusicTrack, 0, SONG_BOOS_MANSION, 0, 8) - EVT_RETURN - EVT_END + Call(FadeOutMusic, 0, 500) + Wait(15) + Call(SetMusicTrack, 0, SONG_BOOS_MANSION, 0, 8) + Return + End }; diff --git a/src/world/area_obk/obk_09/obk_09_2_main.c b/src/world/area_obk/obk_09/obk_09_2_main.c index 0ad617b354d..cb4488ecb00 100644 --- a/src/world/area_obk/obk_09/obk_09_2_main.c +++ b/src/world/area_obk/obk_09/obk_09_2_main.c @@ -1,78 +1,78 @@ #include "obk_09.h" EvtScript N(EVS_EnterMap) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(EnableGroup, MODEL_ori, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ori, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(obk_09_ENTRY_0) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar2, MODEL_d1_2) - EVT_SET(LVar3, MODEL_d1_1) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(obk_09_ENTRY_1) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar2, MODEL_d2_2) - EVT_SET(LVar3, MODEL_d2_1) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_END_SWITCH - EVT_EXEC(N(EVS_Scene_MeetBow)) - EVT_WAIT(1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(EnableGroup, MODEL_ori, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ori, COLLIDER_FLAGS_UPPER_MASK) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(obk_09_ENTRY_0) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar2, MODEL_d1_2) + Set(LVar3, MODEL_d1_1) + ExecWait(EnterDoubleDoor) + CaseEq(obk_09_ENTRY_1) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar2, MODEL_d2_2) + Set(LVar3, MODEL_d2_1) + ExecWait(EnterDoubleDoor) + EndSwitch + Exec(N(EVS_Scene_MeetBow)) + Wait(1) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_ExitDoors_obk_01_5) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, obk_09_ENTRY_0) - EVT_SET(LVar1, COLLIDER_tt1) - EVT_SET(LVar2, MODEL_d1_2) - EVT_SET(LVar3, MODEL_d1_1) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("obk_01"), obk_01_ENTRY_5) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, obk_09_ENTRY_0) + Set(LVar1, COLLIDER_tt1) + Set(LVar2, MODEL_d1_2) + Set(LVar3, MODEL_d1_1) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("obk_01"), obk_01_ENTRY_5) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_obk_01_6) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, obk_09_ENTRY_1) - EVT_SET(LVar1, COLLIDER_tt2) - EVT_SET(LVar2, MODEL_d2_2) - EVT_SET(LVar3, MODEL_d2_1) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("obk_01"), obk_01_ENTRY_6) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, obk_09_ENTRY_1) + Set(LVar1, COLLIDER_tt2) + Set(LVar2, MODEL_d2_2) + Set(LVar3, MODEL_d2_1) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("obk_01"), obk_01_ENTRY_6) + Wait(100) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_BOOS_MANSION) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, obk_09_ENTRY_2) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(EpilogueNPCs))) - EVT_EXEC(N(EVS_Scene_Epilogue)) - EVT_CALL(FadeInMusic, 0, SONG_CHEERFUL_BOOS_MANSION, 0, 3000, 0, 127) - EVT_WAIT(1) - EVT_RETURN - EVT_END_IF - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_obk_01_5)), TRIGGER_WALL_PRESS_A, COLLIDER_tt1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_obk_01_6)), TRIGGER_WALL_PRESS_A, COLLIDER_tt2, 1, 0) - EVT_EXEC(N(EVS_EnterMap)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_BOOS_MANSION) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(GetEntryID, LVar0) + IfEq(LVar0, obk_09_ENTRY_2) + Call(MakeNpcs, FALSE, Ref(N(EpilogueNPCs))) + Exec(N(EVS_Scene_Epilogue)) + Call(FadeInMusic, 0, SONG_CHEERFUL_BOOS_MANSION, 0, 3000, 0, 127) + Wait(1) + Return + EndIf + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + BindTrigger(Ref(N(EVS_ExitDoors_obk_01_5)), TRIGGER_WALL_PRESS_A, COLLIDER_tt1, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_obk_01_6)), TRIGGER_WALL_PRESS_A, COLLIDER_tt2, 1, 0) + Exec(N(EVS_EnterMap)) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_obk/obk_09/obk_09_3_meet_bow.c b/src/world/area_obk/obk_09/obk_09_3_meet_bow.c index f55477b9171..b2dc97039ee 100644 --- a/src/world/area_obk/obk_09/obk_09_3_meet_bow.c +++ b/src/world/area_obk/obk_09/obk_09_3_meet_bow.c @@ -5,186 +5,186 @@ #include "world/common/util/ChangeNpcToPartner.inc.c" EvtScript N(EVS_Scene_MeetBow) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH3_BOW_JOINED_PARTY) - EVT_RETURN - EVT_END_IF - EVT_SET(GB_StoryProgress, STORY_CH3_BOW_JOINED_PARTY) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetMusicTrack, 0, SONG_CHEERFUL_BOOS_MANSION, 0, 8) - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerPos, -180, 0, 344) - EVT_CALL(SetNpcPos, NPC_PARTNER, -180, 20, 344) - EVT_CALL(PlayerMoveTo, 0, 190, 60 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_JoltAwake) - EVT_END_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, TRUE) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(5.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 500) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 200, 280) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, 110) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(48 * DT) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH3_0042, 160, 40) - EVT_KILL_THREAD(LVarA) - EVT_CALL(InterpPlayerYaw, 40, 0) - EVT_CALL(SetPlayerAnimation, SPRITE_ID_BACK_FACING | ANIM_Mario1_Idle) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(4.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 400) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 200, 300) - EVT_CALL(SetCamPosB, CAM_DEFAULT, -20, 10) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 60) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcPos, NPC_Bow, -10, 80, -35) - EVT_CALL(SetNpcPos, NPC_Bootler, 30, 70, -75) - EVT_CALL(SetNpcYaw, NPC_Bow, 270) - EVT_CALL(SetNpcYaw, NPC_Bootler, 270) - EVT_CALL(PlaySoundAtNpc, NPC_Bow, SOUND_BOO_VANISH_A, SOUND_SPACE_DEFAULT) - EVT_SETF(LVar0, EVT_FLOAT(0.0)) - EVT_LOOP(20 * DT) - EVT_ADDF(LVar0, EVT_FLOAT(240.0 / (s32)(20 * DT))) - EVT_CALL(SetNpcImgFXParams, NPC_Bow, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_Bootler, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(40 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 50, -70) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(3.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 50, -70) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_Bow, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_0043) - EVT_CALL(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Talk, ANIM_Bootler_Idle, 0, MSG_CH3_0044) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Bow, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_0045) - EVT_WAIT(20) - EVT_CALL(InterpNpcYaw, NPC_Bow, 225, 0) - EVT_CALL(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Talk, ANIM_Bootler_Idle, 0, MSG_CH3_0046) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 20, 50, -70) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Talk, ANIM_Bootler_Idle, 0, MSG_CH3_0047) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, TRUE) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.5), EVT_FLOAT(-9.5)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 550) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 200, 300) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, 80) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Dejected, ANIM_Bootler_Quaver, 0, MSG_CH3_0048) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 50, -70) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(3.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 20, 50, -70) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Talk, ANIM_Bootler_Idle, 0, MSG_CH3_0049) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 50, -70) - EVT_WAIT(10 * DT) - EVT_CALL(InterpNpcYaw, NPC_Bow, 270, 0) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Bow, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 5, MSG_CH3_004A) - EVT_CALL(InterpNpcYaw, NPC_Bow, 90, 0) - EVT_CALL(SpeakToPlayer, NPC_Bow, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 5, MSG_CH3_004B) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 550) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(3.0), EVT_FLOAT(-12.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(10 * DT) - EVT_CALL(EnableGroup, MODEL_ori, TRUE) - EVT_CALL(SetNpcPos, NPC_Skolar, 1, 650, 80) - EVT_CALL(EnableNpcShadow, NPC_Skolar, FALSE) - EVT_CALL(PlaySoundAtNpc, NPC_Skolar, SOUND_LOOP_OBK_LOWER_CHAIN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, -280, -480, 100 * DT, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_ori, 0, LVar0, 0) - EVT_ADD(LVar0, 650) - EVT_CALL(SetNpcPos, NPC_Skolar, 1, LVar0, 80) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(StopSound, SOUND_LOOP_OBK_LOWER_CHAIN) - EVT_CALL(PlaySoundAtNpc, NPC_Skolar, SOUND_OBK_CAGE_SLAM, SOUND_SPACE_DEFAULT) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 15, EVT_FLOAT(0.2)) - EVT_WAIT(40 * DT) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, TRUE) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(30.0), EVT_FLOAT(-18.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 500) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 350) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_Skolar, ANIM_WorldSkolar_TalkRelaxed, ANIM_WorldSkolar_IdleSad, 0, MSG_CH3_004C) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 50, -70) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(3.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 50, -70) - EVT_WAIT(20 * DT) - EVT_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcPos, NPC_Skolar, 1, 620, 80) - EVT_CALL(EnableNpcShadow, NPC_Skolar, FALSE) - EVT_CALL(PlaySoundAtNpc, NPC_Skolar, SOUND_LOOP_OBK_LOWER_CHAIN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, -480, -280, 100 * DT, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_ori, 0, LVar0, 0) - EVT_ADD(LVar0, 640) - EVT_CALL(SetNpcPos, NPC_Skolar, 1, LVar0, 80) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(StopSound, SOUND_LOOP_OBK_LOWER_CHAIN) - EVT_CALL(EnableGroup, MODEL_ori, FALSE) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Bow, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_004D) - EVT_CALL(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Panic, ANIM_Bootler_Shock, 0, MSG_CH3_004E) - EVT_CALL(SpeakToNpc, NPC_Bow, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, NPC_Bootler, MSG_CH3_004F) - EVT_CALL(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Flail, ANIM_Bootler_Quaver, 0, MSG_CH3_0050) - EVT_CALL(SpeakToPlayer, NPC_Bow, ANIM_WorldBow_SpookLoop, ANIM_WorldBow_Idle, 0, MSG_CH3_0051) - EVT_CALL(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Dejected, ANIM_Bootler_Quaver, 0, MSG_CH3_0052) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetNpcJumpscale, NPC_Bow, 0) - EVT_CALL(GetNpcPos, NPC_Bow, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 40) - EVT_ADD(LVar2, 150) - EVT_CALL(NpcJump0, NPC_Bow, LVar0, LVar1, LVar2, 25 * DT) - EVT_CALL(SpeakToPlayer, NPC_Bow, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_0053) - EVT_CALL(N(ChangeNpcToPartner), 0, 9) - EVT_CALL(N(LoadPartyImage)) - EVT_EXEC(N(EVS_PlayNewPartnerSong)) - EVT_WAIT(15 * DT) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_018D, 160, 40) - EVT_EXEC(N(EVS_ResetMusic)) - EVT_WAIT(10 * DT) - EVT_WAIT(10 * DT) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Celebrate, ANIM_WorldBow_Celebrate, 0, MSG_CH3_0054) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH3_BOW_JOINED_PARTY) + Return + EndIf + Set(GB_StoryProgress, STORY_CH3_BOW_JOINED_PARTY) + Call(DisablePlayerInput, TRUE) + Call(SetMusicTrack, 0, SONG_CHEERFUL_BOOS_MANSION, 0, 8) + Thread + Wait(10 * DT) + Call(SetPlayerPos, -180, 0, 344) + Call(SetNpcPos, NPC_PARTNER, -180, 20, 344) + Call(PlayerMoveTo, 0, 190, 60 * DT) + Call(SetPlayerAnimation, ANIM_MarioW2_JoltAwake) + EndThread + Wait(10 * DT) + Call(SetCamType, CAM_DEFAULT, 4, TRUE) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(5.0), Float(-9.0)) + Call(SetCamDistance, CAM_DEFAULT, 500) + Call(SetCamPosA, CAM_DEFAULT, 200, 280) + Call(SetCamPosB, CAM_DEFAULT, 0, 110) + Call(SetCamPosC, CAM_DEFAULT, 0, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(48 * DT) + Call(ShowMessageAtScreenPos, MSG_CH3_0042, 160, 40) + KillThread(LVarA) + Call(InterpPlayerYaw, 40, 0) + Call(SetPlayerAnimation, SPRITE_ID_BACK_FACING | ANIM_Mario1_Idle) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(SetCamPitch, CAM_DEFAULT, Float(4.0), Float(-9.0)) + Call(SetCamDistance, CAM_DEFAULT, 400) + Call(SetCamPosA, CAM_DEFAULT, 200, 300) + Call(SetCamPosB, CAM_DEFAULT, -20, 10) + Call(SetCamPosC, CAM_DEFAULT, 0, 60) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20 * DT) + Call(SetNpcPos, NPC_Bow, -10, 80, -35) + Call(SetNpcPos, NPC_Bootler, 30, 70, -75) + Call(SetNpcYaw, NPC_Bow, 270) + Call(SetNpcYaw, NPC_Bootler, 270) + Call(PlaySoundAtNpc, NPC_Bow, SOUND_BOO_VANISH_A, SOUND_SPACE_DEFAULT) + SetF(LVar0, Float(0.0)) + Loop(20 * DT) + AddF(LVar0, Float(240.0 / (s32)(20 * DT))) + Call(SetNpcImgFXParams, NPC_Bow, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_Bootler, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + EndLoop + Wait(40 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 50, -70) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(3.0), Float(-10.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetPanTarget, CAM_DEFAULT, 0, 50, -70) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_Bow, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_0043) + Call(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Talk, ANIM_Bootler_Idle, 0, MSG_CH3_0044) + Wait(10) + Call(SpeakToPlayer, NPC_Bow, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_0045) + Wait(20) + Call(InterpNpcYaw, NPC_Bow, 225, 0) + Call(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Talk, ANIM_Bootler_Idle, 0, MSG_CH3_0046) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(SetPanTarget, CAM_DEFAULT, 20, 50, -70) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Talk, ANIM_Bootler_Idle, 0, MSG_CH3_0047) + Call(SetCamType, CAM_DEFAULT, 4, TRUE) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.5), Float(-9.5)) + Call(SetCamDistance, CAM_DEFAULT, 550) + Call(SetCamPosA, CAM_DEFAULT, 200, 300) + Call(SetCamPosB, CAM_DEFAULT, 0, 80) + Call(SetCamPosC, CAM_DEFAULT, 0, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Dejected, ANIM_Bootler_Quaver, 0, MSG_CH3_0048) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 50, -70) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, Float(3.0), Float(-10.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetPanTarget, CAM_DEFAULT, 20, 50, -70) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Talk, ANIM_Bootler_Idle, 0, MSG_CH3_0049) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(SetPanTarget, CAM_DEFAULT, 0, 50, -70) + Wait(10 * DT) + Call(InterpNpcYaw, NPC_Bow, 270, 0) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Bow, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 5, MSG_CH3_004A) + Call(InterpNpcYaw, NPC_Bow, 90, 0) + Call(SpeakToPlayer, NPC_Bow, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 5, MSG_CH3_004B) + Call(SetCamDistance, CAM_DEFAULT, 550) + Call(SetCamPitch, CAM_DEFAULT, Float(3.0), Float(-12.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(10 * DT) + Call(EnableGroup, MODEL_ori, TRUE) + Call(SetNpcPos, NPC_Skolar, 1, 650, 80) + Call(EnableNpcShadow, NPC_Skolar, FALSE) + Call(PlaySoundAtNpc, NPC_Skolar, SOUND_LOOP_OBK_LOWER_CHAIN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, -280, -480, 100 * DT, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_ori, 0, LVar0, 0) + Add(LVar0, 650) + Call(SetNpcPos, NPC_Skolar, 1, LVar0, 80) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(StopSound, SOUND_LOOP_OBK_LOWER_CHAIN) + Call(PlaySoundAtNpc, NPC_Skolar, SOUND_OBK_CAGE_SLAM, SOUND_SPACE_DEFAULT) + Call(ShakeCam, CAM_DEFAULT, 0, 15, Float(0.2)) + Wait(40 * DT) + Call(SetCamType, CAM_DEFAULT, 4, TRUE) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(30.0), Float(-18.0)) + Call(SetCamDistance, CAM_DEFAULT, 500) + Call(SetCamPosA, CAM_DEFAULT, 0, 350) + Call(SetCamPosB, CAM_DEFAULT, 0, 0) + Call(SetCamPosC, CAM_DEFAULT, 0, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_Skolar, ANIM_WorldSkolar_TalkRelaxed, ANIM_WorldSkolar_IdleSad, 0, MSG_CH3_004C) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 50, -70) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, Float(3.0), Float(-10.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetPanTarget, CAM_DEFAULT, 0, 50, -70) + Wait(20 * DT) + Thread + Wait(30 * DT) + Call(SetNpcPos, NPC_Skolar, 1, 620, 80) + Call(EnableNpcShadow, NPC_Skolar, FALSE) + Call(PlaySoundAtNpc, NPC_Skolar, SOUND_LOOP_OBK_LOWER_CHAIN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, -480, -280, 100 * DT, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_ori, 0, LVar0, 0) + Add(LVar0, 640) + Call(SetNpcPos, NPC_Skolar, 1, LVar0, 80) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(StopSound, SOUND_LOOP_OBK_LOWER_CHAIN) + Call(EnableGroup, MODEL_ori, FALSE) + EndThread + Call(SpeakToPlayer, NPC_Bow, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_004D) + Call(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Panic, ANIM_Bootler_Shock, 0, MSG_CH3_004E) + Call(SpeakToNpc, NPC_Bow, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, NPC_Bootler, MSG_CH3_004F) + Call(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Flail, ANIM_Bootler_Quaver, 0, MSG_CH3_0050) + Call(SpeakToPlayer, NPC_Bow, ANIM_WorldBow_SpookLoop, ANIM_WorldBow_Idle, 0, MSG_CH3_0051) + Call(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Dejected, ANIM_Bootler_Quaver, 0, MSG_CH3_0052) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetNpcJumpscale, NPC_Bow, 0) + Call(GetNpcPos, NPC_Bow, LVar0, LVar1, LVar2) + Sub(LVar1, 40) + Add(LVar2, 150) + Call(NpcJump0, NPC_Bow, LVar0, LVar1, LVar2, 25 * DT) + Call(SpeakToPlayer, NPC_Bow, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_0053) + Call(N(ChangeNpcToPartner), 0, 9) + Call(N(LoadPartyImage)) + Exec(N(EVS_PlayNewPartnerSong)) + Wait(15 * DT) + Call(ShowMessageAtScreenPos, MSG_Menus_018D, 160, 40) + Exec(N(EVS_ResetMusic)) + Wait(10 * DT) + Wait(10 * DT) + Call(DisablePartnerAI, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Celebrate, ANIM_WorldBow_Celebrate, 0, MSG_CH3_0054) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_obk/obk_09/obk_09_4_npc.c b/src/world/area_obk/obk_09/obk_09_4_npc.c index 6978c3b591c..a8788010920 100644 --- a/src/world/area_obk/obk_09/obk_09_4_npc.c +++ b/src/world/area_obk/obk_09/obk_09_4_npc.c @@ -54,81 +54,81 @@ API_CALLABLE(N(ImprisonedCardUpdate)) { #include "world/common/npc/StarSpirit.inc.c" EvtScript N(EVS_NpcInit_Bow) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInteract_Bootler) = { - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_EQ(LVar0, PARTNER_BOW) - EVT_CALL(SpeakToNpc, NPC_Bootler, ANIM_Bootler_Talk, ANIM_Bootler_Talk, 0, NPC_PARTNER, MSG_CH3_0057) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToNpc, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, NPC_Bootler, MSG_CH3_0058) - EVT_CALL(EnablePartnerAI) - EVT_CALL(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Dejected, ANIM_Bootler_Quaver, 0, MSG_CH3_0059) - EVT_ELSE - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA) - EVT_CALL(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Dejected, ANIM_Bootler_Quaver, 0, MSG_CH3_0055) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Dejected, ANIM_Bootler_Quaver, 0, MSG_CH3_0056) - EVT_CASE_GE(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Dejected, ANIM_Bootler_Quaver, 0, MSG_CH3_005A) - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Flail, ANIM_Bootler_Flail, 0, MSG_CH3_005B) - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetCurrentPartnerID, LVar0) + IfEq(LVar0, PARTNER_BOW) + Call(SpeakToNpc, NPC_Bootler, ANIM_Bootler_Talk, ANIM_Bootler_Talk, 0, NPC_PARTNER, MSG_CH3_0057) + Call(DisablePartnerAI, 0) + Call(SpeakToNpc, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, NPC_Bootler, MSG_CH3_0058) + Call(EnablePartnerAI) + Call(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Dejected, ANIM_Bootler_Quaver, 0, MSG_CH3_0059) + Else + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_DEFEATED_TUBBA_BLUBBA) + Call(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Dejected, ANIM_Bootler_Quaver, 0, MSG_CH3_0055) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Dejected, ANIM_Bootler_Quaver, 0, MSG_CH3_0056) + CaseGe(STORY_CH5_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Dejected, ANIM_Bootler_Quaver, 0, MSG_CH3_005A) + Wait(20) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + Wait(20) + Call(SpeakToPlayer, NPC_Bootler, ANIM_Bootler_Flail, ANIM_Bootler_Flail, 0, MSG_CH3_005B) + EndSwitch + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Bootler) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bootler))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH3_BOW_JOINED_PARTY) - EVT_CASE_GE(STORY_CH3_BOW_JOINED_PARTY) - EVT_CALL(SetNpcPos, NPC_Bootler, 30, 70, -75) - EVT_CALL(SetNpcYaw, NPC_Bootler, 270) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bootler))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH3_BOW_JOINED_PARTY) + CaseGe(STORY_CH3_BOW_JOINED_PARTY) + Call(SetNpcPos, NPC_Bootler, 30, 70, -75) + Call(SetNpcYaw, NPC_Bootler, 270) + CaseDefault + EndSwitch + Return + End }; EvtScript N(EVS_NpcAux_Skolar) = { - EVT_CALL(N(ImprisonedCardSetup)) - EVT_CALL(N(ImprisonedCardUpdate)) - EVT_RETURN - EVT_END + Call(N(ImprisonedCardSetup)) + Call(N(ImprisonedCardUpdate)) + Return + End }; EvtScript N(EVS_NpcInit_Skolar) = { - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_Skolar))) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldSkolar_IdleSad) - EVT_CALL(SetNpcPos, NPC_SELF, 0, NPC_DISPOSE_POS_Y, -100) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_ALPHA, 170, 0, 0, 0) - EVT_IF_GE(GB_StoryProgress, STORY_CH3_BOW_JOINED_PARTY) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_Skolar))) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldSkolar_IdleSad) + Call(SetNpcPos, NPC_SELF, 0, NPC_DISPOSE_POS_Y, -100) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_ALPHA, 170, 0, 0, 0) + IfGe(GB_StoryProgress, STORY_CH3_BOW_JOINED_PARTY) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Bow_Epilogue) = { - EVT_CALL(SetNpcPos, NPC_SELF, -196, 10, 121) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, -196, 10, 121) + Call(SetNpcYaw, NPC_SELF, 90) + Return + End }; EvtScript N(EVS_NpcInit_Bootler_Epilogue) = { - EVT_CALL(SetNpcPos, NPC_SELF, -82, 10, 212) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, -82, 10, 212) + Call(SetNpcYaw, NPC_SELF, 270) + Return + End }; NpcData N(NpcData_Default)[] = { diff --git a/src/world/area_obk/obk_09/obk_09_6_epilogue.c b/src/world/area_obk/obk_09/obk_09_6_epilogue.c index 83e8f3cc78f..c70ed14447a 100644 --- a/src/world/area_obk/obk_09/obk_09_6_epilogue.c +++ b/src/world/area_obk/obk_09/obk_09_6_epilogue.c @@ -6,54 +6,54 @@ API_CALLABLE(N(SetInvitationLetterScale)) { } EvtScript N(EVS_Scene_Epilogue) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerPos, NPC_DISPOSE_LOCATION) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, TRUE) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-8.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -280, 234) - EVT_CALL(SetCamPosB, CAM_DEFAULT, -135, 105) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetNpcAnimation, NPC_Bootler, ANIM_Bootler_Walk) - EVT_CALL(NpcMoveTo, NPC_Bootler, -159, 158, 50) - EVT_CALL(SetNpcAnimation, NPC_Bootler, ANIM_Bootler_Idle) - EVT_WAIT(15) - EVT_CALL(SetNpcAnimation, NPC_Bootler, ANIM_Bootler_Talk) - EVT_WAIT(15) - EVT_CALL(SetNpcAnimation, NPC_Bootler, ANIM_Bootler_Idle) - EVT_WAIT(15) - EVT_THREAD - EVT_CALL(DropResizableItemEntity, ITEM_LETTER_TO_KOLORADO, NPC_DISPOSE_LOCATION, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_CALL(N(SetInvitationLetterScale)) - EVT_LOOP(35) - EVT_CALL(GetNpcPos, NPC_Bootler, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, -16) - EVT_ADD(LVar2, 4) - EVT_ADD(LVar3, -10) - EVT_CALL(SetItemPos, LVar0, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(35) - EVT_CALL(RemoveItemEntity, LVar0) - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(NpcMoveTo, NPC_Bootler, -172, 143, 20) - EVT_CALL(SetNpcJumpscale, NPC_Bootler, 0) - EVT_WAIT(10) - EVT_CALL(NpcJump1, NPC_Bootler, -159, 10, 158, 20) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Bow, ANIM_WorldBow_Read) - EVT_WAIT(40) - EVT_CALL(SetNpcAnimation, NPC_Bow, ANIM_WorldBow_Idle) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Bow, ANIM_WorldBow_CelebrateSlow) - EVT_WAIT(30) - EVT_CALL(FadeOutMusic, 0, 1000) - EVT_CALL(GotoMap, EVT_PTR(NEXT_EPILOGUE_MAP), omo_03_ENTRY_5) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerPos, NPC_DISPOSE_LOCATION) + Call(SetCamType, CAM_DEFAULT, 4, TRUE) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-8.0)) + Call(SetCamDistance, CAM_DEFAULT, 450) + Call(SetCamPosA, CAM_DEFAULT, -280, 234) + Call(SetCamPosB, CAM_DEFAULT, -135, 105) + Call(SetCamPosC, CAM_DEFAULT, 0, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetNpcAnimation, NPC_Bootler, ANIM_Bootler_Walk) + Call(NpcMoveTo, NPC_Bootler, -159, 158, 50) + Call(SetNpcAnimation, NPC_Bootler, ANIM_Bootler_Idle) + Wait(15) + Call(SetNpcAnimation, NPC_Bootler, ANIM_Bootler_Talk) + Wait(15) + Call(SetNpcAnimation, NPC_Bootler, ANIM_Bootler_Idle) + Wait(15) + Thread + Call(DropResizableItemEntity, ITEM_LETTER_TO_KOLORADO, NPC_DISPOSE_LOCATION, ITEM_SPAWN_MODE_DECORATION, 0) + Call(N(SetInvitationLetterScale)) + Loop(35) + Call(GetNpcPos, NPC_Bootler, LVar1, LVar2, LVar3) + Add(LVar1, -16) + Add(LVar2, 4) + Add(LVar3, -10) + Call(SetItemPos, LVar0, LVar1, LVar2, LVar3) + Wait(1) + EndLoop + Wait(35) + Call(RemoveItemEntity, LVar0) + EndThread + Wait(10) + Call(NpcMoveTo, NPC_Bootler, -172, 143, 20) + Call(SetNpcJumpscale, NPC_Bootler, 0) + Wait(10) + Call(NpcJump1, NPC_Bootler, -159, 10, 158, 20) + Wait(10) + Call(SetNpcAnimation, NPC_Bow, ANIM_WorldBow_Read) + Wait(40) + Call(SetNpcAnimation, NPC_Bow, ANIM_WorldBow_Idle) + Wait(10) + Call(SetNpcAnimation, NPC_Bow, ANIM_WorldBow_CelebrateSlow) + Wait(30) + Call(FadeOutMusic, 0, 1000) + Call(GotoMap, Ref(NEXT_EPILOGUE_MAP), omo_03_ENTRY_5) + Wait(100) + Return + End }; diff --git a/src/world/area_omo/common/RockingHorse.inc.c b/src/world/area_omo/common/RockingHorse.inc.c index 6a638d2fc6f..5dc968f6997 100644 --- a/src/world/area_omo/common/RockingHorse.inc.c +++ b/src/world/area_omo/common/RockingHorse.inc.c @@ -63,7 +63,7 @@ API_CALLABLE(N(UpdateRockingHorses)) { } EvtScript N(EVS_Gizmos_RockingHorses) = { - EVT_CALL(N(UpdateRockingHorses)) - EVT_RETURN - EVT_END + Call(N(UpdateRockingHorses)) + Return + End }; diff --git a/src/world/area_omo/common/ToyTrain.inc.c b/src/world/area_omo/common/ToyTrain.inc.c index 064d136ce08..3c852fa38f9 100644 --- a/src/world/area_omo/common/ToyTrain.inc.c +++ b/src/world/area_omo/common/ToyTrain.inc.c @@ -18,602 +18,602 @@ #include "common/IsAOrBPressed.inc.c" EvtScript N(EVS_Scene_RideTrain) = { - EVT_MALLOC_ARRAY(20, LVar0) - EVT_USE_ARRAY(LVar0) - EVT_SETF(ArrayVar(2), EVT_FLOAT(0.0)) - EVT_SETF(ArrayVar(3), EVT_FLOAT(0.0)) - EVT_SETF(ArrayVar(7), EVT_FLOAT(0.0)) - EVT_SETF(ArrayVar(8), EVT_FLOAT(0.0)) - EVT_SETF(ArrayVar(14), EVT_FLOAT(0.0)) - EVT_SETF(ArrayVar(15), EVT_FLOAT(0.0)) - EVT_SETF(ArrayVar(16), EVT_FLOAT(0.0)) - EVT_SET(AF_OMO_03, FALSE) - EVT_LABEL(0) - EVT_SWITCH(MV_TrainUnk_00) - EVT_CASE_EQ(0) - EVT_USE_BUF(MV_TrainUnk_01) - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_SETF(ArrayVar(0), LVar0) - EVT_SETF(ArrayVar(1), LVar1) - EVT_CALL(AddVectorPolar, ArrayVar(0), ArrayVar(1), EVT_FLOAT(40.0), LVar2) - EVT_SETF(ArrayVar(5), LVar0) - EVT_SETF(ArrayVar(6), LVar1) - EVT_SETF(LVar3, LVar2) - EVT_ADDF(LVar3, EVT_FLOAT(180.0)) - EVT_CALL(AddVectorPolar, ArrayVar(5), ArrayVar(6), EVT_FLOAT(40.0), LVar3) - EVT_SETF(ArrayVar(11), LVar0) - EVT_SETF(ArrayVar(12), LVar1) - EVT_SETF(MV_TrainPos, ArrayVar(11)) - EVT_SETF(MV_TrainUnk_0C, ArrayVar(12)) - EVT_SETF(MV_TrainUnk_0D, LVar2) - EVT_SETF(ArrayVar(17), EVT_FLOAT(0.0)) - EVT_LABEL(11) - EVT_BUF_READ2(LVar2, LVar3) - EVT_IF_EQ(LVar2, -1) - EVT_GOTO(12) - EVT_END_IF - EVT_CALL(GetDist2D, LVar4, LVar0, LVar1, LVar2, LVar3) - EVT_ADDF(ArrayVar(17), LVar4) - EVT_SETF(LVar0, LVar2) - EVT_SETF(LVar1, LVar3) - EVT_GOTO(11) - EVT_LABEL(12) - EVT_SUBF(ArrayVar(17), EVT_FLOAT(40.0)) - EVT_SETF(ArrayVar(10), EVT_FLOAT(0.0)) - EVT_SETF(ArrayVar(13), EVT_FLOAT(0.0)) - EVT_SET(ArrayVar(18), 0) - EVT_IF_EQ(MF_TrainUnk_00, TRUE) - EVT_SET(MV_TrainUnk_00, 1) - EVT_END_IF - EVT_CASE_EQ(1) - EVT_USE_BUF(MV_TrainUnk_01) - EVT_CALL(N(AdvanceBuffer), 3, 0, 0) - EVT_BUF_READ2(LVar0, LVar1) - EVT_IF_EQ(LVar0, -1) - EVT_SET(MV_TrainUnk_00, 100) - EVT_SET(MF_TrainUnk_00, FALSE) - EVT_ELSE - EVT_SETF(ArrayVar(2), LVar0) - EVT_SETF(ArrayVar(3), LVar1) - EVT_SET(ArrayVar(4), 1) - EVT_SETF(ArrayVar(7), LVar0) - EVT_SETF(ArrayVar(8), LVar1) - EVT_SET(ArrayVar(9), 1) - EVT_SET(MV_TrainUnk_00, 10) - EVT_END_IF - EVT_CASE_EQ(10) - EVT_SWITCH(MV_TrainUnk_02) - EVT_CASE_EQ(0) - EVT_SETF(ArrayVar(10), EVT_FLOAT(10.0)) - EVT_CASE_EQ(1) - EVT_CALL(N(CosInterpMinMax), ArrayVar(18), ArrayVar(10), EVT_FLOAT(0.0), EVT_FLOAT(10.0), 100, 1, EVT_FLOAT(0.0)) - EVT_ADD(ArrayVar(18), 1) - EVT_CASE_EQ(2) - EVT_SET(LVar0, ArrayVar(13)) - EVT_SET(LVar1, ArrayVar(17)) - EVT_CALL(N(CosInterpMinMax), LVar0, ArrayVar(10), EVT_FLOAT(10.0), EVT_FLOAT(2.0), LVar1, 0, EVT_FLOAT(0.0)) - EVT_CASE_EQ(3) - EVT_SET(LVar0, ArrayVar(13)) - EVT_SET(LVar1, ArrayVar(17)) - EVT_DIV(LVar1, 2) - EVT_CALL(N(CosInterpMinMax), LVar0, ArrayVar(10), EVT_FLOAT(1.0), EVT_FLOAT(10.0), LVar1, 0, EVT_FLOAT(0.0)) - EVT_END_SWITCH - EVT_CALL(GetDist2D, LVar0, ArrayVar(0), ArrayVar(1), ArrayVar(2), ArrayVar(3)) - EVT_CALL(N(CompareFloats), LVar0, ArrayVar(10), LVar2) - EVT_IF_EQ(LVar2, 1) - EVT_CALL(N(SetAngleClamped), LVar0, ArrayVar(0), ArrayVar(1), ArrayVar(2), ArrayVar(3)) - EVT_CALL(AddVectorPolar, ArrayVar(0), ArrayVar(1), ArrayVar(10), LVar0) - EVT_ELSE - EVT_SETF(LVar1, ArrayVar(10)) - EVT_SUBF(LVar1, LVar0) - EVT_SETF(ArrayVar(0), ArrayVar(2)) - EVT_SETF(ArrayVar(1), ArrayVar(3)) - EVT_USE_BUF(MV_TrainUnk_01) - EVT_CALL(N(AdvanceBuffer), 3, 2, ArrayVar(4)) - EVT_BUF_READ2(ArrayVar(2), ArrayVar(3)) - EVT_ADD(ArrayVar(4), 1) - EVT_IF_EQ(ArrayVar(2), -1) - EVT_SET(MV_TrainUnk_00, 100) - EVT_SET(MF_TrainUnk_00, FALSE) - EVT_SET(LFlag1, TRUE) - EVT_ELSE - EVT_CALL(N(SetAngleClamped), LVar0, ArrayVar(0), ArrayVar(1), ArrayVar(2), ArrayVar(3)) - EVT_CALL(AddVectorPolar, ArrayVar(0), ArrayVar(1), LVar1, LVar0) - EVT_END_IF - EVT_END_IF - EVT_CALL(GetDist2D, LVar0, ArrayVar(5), ArrayVar(6), ArrayVar(7), ArrayVar(8)) - EVT_CALL(N(CompareFloats), LVar0, ArrayVar(10), LVar2) - EVT_IF_EQ(LVar2, 1) - EVT_CALL(N(SetAngleClamped), LVar0, ArrayVar(5), ArrayVar(6), ArrayVar(7), ArrayVar(8)) - EVT_CALL(AddVectorPolar, ArrayVar(5), ArrayVar(6), ArrayVar(10), LVar0) - EVT_ELSE - EVT_SETF(LVar1, ArrayVar(10)) - EVT_SUBF(LVar1, LVar0) - EVT_SETF(ArrayVar(5), ArrayVar(7)) - EVT_SETF(ArrayVar(6), ArrayVar(8)) - EVT_USE_BUF(MV_TrainUnk_01) - EVT_CALL(N(AdvanceBuffer), 3, 2, ArrayVar(9)) - EVT_BUF_READ2(ArrayVar(7), ArrayVar(8)) - EVT_ADD(ArrayVar(9), 1) - EVT_IF_EQ(ArrayVar(7), -1) - EVT_SET(MV_TrainUnk_00, 100) - EVT_SET(MF_TrainUnk_00, FALSE) - EVT_SET(LFlag1, FALSE) - EVT_ELSE - EVT_CALL(N(SetAngleClamped), LVar0, ArrayVar(5), ArrayVar(6), ArrayVar(7), ArrayVar(8)) - EVT_CALL(AddVectorPolar, ArrayVar(5), ArrayVar(6), LVar1, LVar0) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(MV_TrainUnk_00, 100) - EVT_IF_EQ(LFlag1, TRUE) - EVT_CALL(N(SetAngleClamped), LVar0, ArrayVar(0), ArrayVar(1), ArrayVar(5), ArrayVar(6)) - EVT_SETF(ArrayVar(5), ArrayVar(0)) - EVT_SETF(ArrayVar(6), ArrayVar(1)) - EVT_CALL(AddVectorPolar, ArrayVar(5), ArrayVar(6), EVT_FLOAT(80.0), LVar0) - EVT_ELSE - EVT_CALL(N(SetAngleClamped), LVar0, ArrayVar(5), ArrayVar(6), ArrayVar(0), ArrayVar(1)) - EVT_SETF(ArrayVar(0), ArrayVar(5)) - EVT_SETF(ArrayVar(1), ArrayVar(6)) - EVT_CALL(AddVectorPolar, ArrayVar(0), ArrayVar(1), EVT_FLOAT(80.0), LVar0) - EVT_END_IF - EVT_END_IF - EVT_SETF(LVar0, ArrayVar(0)) - EVT_SETF(LVar1, ArrayVar(1)) - EVT_ADDF(LVar0, ArrayVar(5)) - EVT_ADDF(LVar1, ArrayVar(6)) - EVT_DIVF(LVar0, EVT_FLOAT(2.0)) - EVT_DIVF(LVar1, EVT_FLOAT(2.0)) - EVT_CALL(N(SetAngleClamped), LVar2, ArrayVar(5), ArrayVar(6), ArrayVar(0), ArrayVar(1)) - EVT_SETF(MV_TrainPos, LVar0) - EVT_SETF(MV_TrainUnk_0C, LVar1) - EVT_SETF(MV_TrainUnk_0D, LVar2) - EVT_CALL(GetDist2D, LVar3, LVar0, LVar1, ArrayVar(11), ArrayVar(12)) - EVT_ADDF(ArrayVar(13), LVar3) - EVT_SETF(ArrayVar(14), ArrayVar(13)) - EVT_MULF(ArrayVar(14), EVT_FLOAT(1.432)) - EVT_IF_EQ(LFlag0, FALSE) - EVT_SETF(LVar0, ArrayVar(10)) - EVT_IF_LT(LVar0, 1) - EVT_SETF(LVar0, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_DIVF(LVar0, EVT_FLOAT(3.0)) - EVT_SUBF(ArrayVar(15), LVar0) - EVT_IF_LT(ArrayVar(15), -10) - EVT_SETF(ArrayVar(15), EVT_FLOAT(-10.0)) - EVT_SET(LFlag0, TRUE) - EVT_IF_EQ(AF_OMO_03, FALSE) - EVT_CALL(PlaySound, SOUND_OMO_TOY_TRAIN_WHISTLE_A) - EVT_ELSE - EVT_CALL(PlaySound, SOUND_OMO_TOY_TRAIN_WHISTLE_B) - EVT_END_IF - EVT_END_IF - EVT_ELSE - EVT_SETF(LVar0, ArrayVar(10)) - EVT_IF_LT(LVar0, 1) - EVT_SETF(LVar0, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_DIVF(LVar0, EVT_FLOAT(3.0)) - EVT_ADDF(ArrayVar(15), LVar0) - EVT_IF_GT(ArrayVar(15), 10) - EVT_SETF(ArrayVar(15), EVT_FLOAT(10.0)) - EVT_SET(LFlag0, FALSE) - EVT_IF_EQ(AF_OMO_03, FALSE) - EVT_CALL(PlaySound, SOUND_OMO_TOY_TRAIN_CLICK) - EVT_SET(AF_OMO_03, TRUE) - EVT_ELSE - EVT_CALL(PlaySound, SOUND_OMO_TOY_TRAIN_CLICK) - EVT_SET(AF_OMO_03, FALSE) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_SETF(LVar0, MV_TrainPos) - EVT_SETF(LVar1, MV_TrainUnk_0C) - EVT_SETF(LVar2, MV_TrainUnk_0D) - EVT_CALL(AddVectorPolar, LVar0, LVar1, EVT_FLOAT(15.0), LVar2) - EVT_CALL(N(SetPlayerStatusPosYaw), LVar0, 50, LVar1, MV_TrainUnk_0D) - EVT_SETF(LVar0, MV_TrainPos) - EVT_SETF(LVar1, MV_TrainUnk_0C) - EVT_SETF(LVar2, MV_TrainUnk_0D) - EVT_ADDF(LVar2, EVT_FLOAT(180.0)) - EVT_CALL(AddVectorPolar, LVar0, LVar1, EVT_FLOAT(15.0), LVar2) - EVT_CALL(N(SetNpcPosYaw), -4, LVar0, 50, LVar1, MV_TrainUnk_0D) - EVT_SETF(LVar0, MV_TrainPos) - EVT_SETF(LVar1, MV_TrainUnk_0C) - EVT_SETF(LVar2, MV_TrainUnk_0D) - EVT_IF_LT(LVar2, 180) - EVT_ADDF(LVar2, EVT_FLOAT(90.0)) - EVT_ELSE - EVT_SUBF(LVar2, EVT_FLOAT(90.0)) - EVT_END_IF - EVT_CALL(AddVectorPolar, LVar0, LVar1, EVT_FLOAT(20.0), LVar2) - EVT_CALL(N(SetNpcPosYaw), 0, LVar0, 50, LVar1, MV_TrainUnk_0D) - EVT_CASE_EQ(100) - EVT_END_SWITCH - EVT_CALL(TranslateGroup, MODEL_p2, EVT_FLOAT(79.1), EVT_FLOAT(-27.93), EVT_FLOAT(-29.53)) - EVT_CALL(TranslateGroup, MODEL_p3, EVT_FLOAT(-35.1), EVT_FLOAT(-27.93), EVT_FLOAT(-29.53)) - EVT_CALL(RotateGroup, MODEL_p2, EVT_FLOAT(-45.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(1.0)) - EVT_CALL(RotateGroup, MODEL_p3, EVT_FLOAT(45.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(1.0)) - EVT_CALL(TranslateGroup, MODEL_p5, EVT_FLOAT(40.5), EVT_FLOAT(-20.0), EVT_FLOAT(-0.4)) - EVT_CALL(TranslateGroup, MODEL_p6, EVT_FLOAT(-39.5), EVT_FLOAT(-20.0), EVT_FLOAT(-0.4)) - EVT_CALL(TranslateGroup, MODEL_popo, MV_TrainPos, EVT_FLOAT(10.0), MV_TrainUnk_0C) - EVT_IF_LT(MV_TrainUnk_0D, 180) - EVT_SETF(LVar1, MV_TrainUnk_0D) - EVT_SUBF(LVar1, EVT_FLOAT(90.0)) - EVT_CALL(RotateGroup, MODEL_popo, LVar1, EVT_FLOAT(0.0), EVT_FLOAT(-1.0), EVT_FLOAT(0.0)) - EVT_ELSE - EVT_SETF(LVar1, MV_TrainUnk_0D) - EVT_SUBF(LVar1, EVT_FLOAT(180.0)) - EVT_SUBF(LVar1, EVT_FLOAT(90.0)) - EVT_CALL(RotateGroup, MODEL_popo, LVar1, EVT_FLOAT(0.0), EVT_FLOAT(-1.0), EVT_FLOAT(0.0)) - EVT_END_IF - EVT_CALL(RotateGroup, MODEL_p2, EVT_FLOAT(45.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(1.0)) - EVT_CALL(RotateGroup, MODEL_p3, EVT_FLOAT(-45.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(1.0)) - EVT_CALL(TranslateGroup, MODEL_p2, EVT_FLOAT(-79.1), EVT_FLOAT(27.93), EVT_FLOAT(29.53)) - EVT_CALL(TranslateGroup, MODEL_p3, EVT_FLOAT(35.1), EVT_FLOAT(27.93), EVT_FLOAT(29.53)) - EVT_CALL(TranslateGroup, MODEL_p5, EVT_FLOAT(-40.5), EVT_FLOAT(20.0), EVT_FLOAT(0.4)) - EVT_CALL(TranslateGroup, MODEL_p6, EVT_FLOAT(39.5), EVT_FLOAT(20.0), EVT_FLOAT(0.4)) - EVT_IF_LT(MV_TrainUnk_0D, 180) - EVT_CALL(RotateGroup, MODEL_p5, ArrayVar(14), EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(-1.0)) - EVT_CALL(RotateGroup, MODEL_p6, ArrayVar(14), EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(-1.0)) - EVT_ELSE - EVT_CALL(RotateGroup, MODEL_p5, ArrayVar(14), EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(1.0)) - EVT_CALL(RotateGroup, MODEL_p6, ArrayVar(14), EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CALL(TranslateGroup, MODEL_p2, EVT_FLOAT(0.0), ArrayVar(15), EVT_FLOAT(0.0)) - EVT_SETF(LVar0, ArrayVar(15)) - EVT_MULF(LVar0, EVT_FLOAT(-1.0)) - EVT_CALL(TranslateGroup, MODEL_p3, EVT_FLOAT(0.0), LVar0, EVT_FLOAT(0.0)) - EVT_SETF(LVar0, ArrayVar(10)) - EVT_IF_LT(LVar0, 1) - EVT_SETF(LVar0, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_ADDF(ArrayVar(16), LVar0) - EVT_IF_GT(ArrayVar(16), 360) - EVT_SUBF(ArrayVar(16), EVT_FLOAT(360.0)) - EVT_END_IF - EVT_CALL(RotateGroup, MODEL_p4, ArrayVar(16), EVT_FLOAT(0.0), EVT_FLOAT(1.0), EVT_FLOAT(0.0)) - EVT_SETF(ArrayVar(11), MV_TrainPos) - EVT_SETF(ArrayVar(12), MV_TrainUnk_0C) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + MallocArray(20, LVar0) + UseArray(LVar0) + SetF(ArrayVar(2), Float(0.0)) + SetF(ArrayVar(3), Float(0.0)) + SetF(ArrayVar(7), Float(0.0)) + SetF(ArrayVar(8), Float(0.0)) + SetF(ArrayVar(14), Float(0.0)) + SetF(ArrayVar(15), Float(0.0)) + SetF(ArrayVar(16), Float(0.0)) + Set(AF_OMO_03, FALSE) + Label(0) + Switch(MV_TrainUnk_00) + CaseEq(0) + UseBuf(MV_TrainUnk_01) + BufRead3(LVar0, LVar1, LVar2) + SetF(ArrayVar(0), LVar0) + SetF(ArrayVar(1), LVar1) + Call(AddVectorPolar, ArrayVar(0), ArrayVar(1), Float(40.0), LVar2) + SetF(ArrayVar(5), LVar0) + SetF(ArrayVar(6), LVar1) + SetF(LVar3, LVar2) + AddF(LVar3, Float(180.0)) + Call(AddVectorPolar, ArrayVar(5), ArrayVar(6), Float(40.0), LVar3) + SetF(ArrayVar(11), LVar0) + SetF(ArrayVar(12), LVar1) + SetF(MV_TrainPos, ArrayVar(11)) + SetF(MV_TrainUnk_0C, ArrayVar(12)) + SetF(MV_TrainUnk_0D, LVar2) + SetF(ArrayVar(17), Float(0.0)) + Label(11) + BufRead2(LVar2, LVar3) + IfEq(LVar2, -1) + Goto(12) + EndIf + Call(GetDist2D, LVar4, LVar0, LVar1, LVar2, LVar3) + AddF(ArrayVar(17), LVar4) + SetF(LVar0, LVar2) + SetF(LVar1, LVar3) + Goto(11) + Label(12) + SubF(ArrayVar(17), Float(40.0)) + SetF(ArrayVar(10), Float(0.0)) + SetF(ArrayVar(13), Float(0.0)) + Set(ArrayVar(18), 0) + IfEq(MF_TrainUnk_00, TRUE) + Set(MV_TrainUnk_00, 1) + EndIf + CaseEq(1) + UseBuf(MV_TrainUnk_01) + Call(N(AdvanceBuffer), 3, 0, 0) + BufRead2(LVar0, LVar1) + IfEq(LVar0, -1) + Set(MV_TrainUnk_00, 100) + Set(MF_TrainUnk_00, FALSE) + Else + SetF(ArrayVar(2), LVar0) + SetF(ArrayVar(3), LVar1) + Set(ArrayVar(4), 1) + SetF(ArrayVar(7), LVar0) + SetF(ArrayVar(8), LVar1) + Set(ArrayVar(9), 1) + Set(MV_TrainUnk_00, 10) + EndIf + CaseEq(10) + Switch(MV_TrainUnk_02) + CaseEq(0) + SetF(ArrayVar(10), Float(10.0)) + CaseEq(1) + Call(N(CosInterpMinMax), ArrayVar(18), ArrayVar(10), Float(0.0), Float(10.0), 100, 1, Float(0.0)) + Add(ArrayVar(18), 1) + CaseEq(2) + Set(LVar0, ArrayVar(13)) + Set(LVar1, ArrayVar(17)) + Call(N(CosInterpMinMax), LVar0, ArrayVar(10), Float(10.0), Float(2.0), LVar1, 0, Float(0.0)) + CaseEq(3) + Set(LVar0, ArrayVar(13)) + Set(LVar1, ArrayVar(17)) + Div(LVar1, 2) + Call(N(CosInterpMinMax), LVar0, ArrayVar(10), Float(1.0), Float(10.0), LVar1, 0, Float(0.0)) + EndSwitch + Call(GetDist2D, LVar0, ArrayVar(0), ArrayVar(1), ArrayVar(2), ArrayVar(3)) + Call(N(CompareFloats), LVar0, ArrayVar(10), LVar2) + IfEq(LVar2, 1) + Call(N(SetAngleClamped), LVar0, ArrayVar(0), ArrayVar(1), ArrayVar(2), ArrayVar(3)) + Call(AddVectorPolar, ArrayVar(0), ArrayVar(1), ArrayVar(10), LVar0) + Else + SetF(LVar1, ArrayVar(10)) + SubF(LVar1, LVar0) + SetF(ArrayVar(0), ArrayVar(2)) + SetF(ArrayVar(1), ArrayVar(3)) + UseBuf(MV_TrainUnk_01) + Call(N(AdvanceBuffer), 3, 2, ArrayVar(4)) + BufRead2(ArrayVar(2), ArrayVar(3)) + Add(ArrayVar(4), 1) + IfEq(ArrayVar(2), -1) + Set(MV_TrainUnk_00, 100) + Set(MF_TrainUnk_00, FALSE) + Set(LFlag1, TRUE) + Else + Call(N(SetAngleClamped), LVar0, ArrayVar(0), ArrayVar(1), ArrayVar(2), ArrayVar(3)) + Call(AddVectorPolar, ArrayVar(0), ArrayVar(1), LVar1, LVar0) + EndIf + EndIf + Call(GetDist2D, LVar0, ArrayVar(5), ArrayVar(6), ArrayVar(7), ArrayVar(8)) + Call(N(CompareFloats), LVar0, ArrayVar(10), LVar2) + IfEq(LVar2, 1) + Call(N(SetAngleClamped), LVar0, ArrayVar(5), ArrayVar(6), ArrayVar(7), ArrayVar(8)) + Call(AddVectorPolar, ArrayVar(5), ArrayVar(6), ArrayVar(10), LVar0) + Else + SetF(LVar1, ArrayVar(10)) + SubF(LVar1, LVar0) + SetF(ArrayVar(5), ArrayVar(7)) + SetF(ArrayVar(6), ArrayVar(8)) + UseBuf(MV_TrainUnk_01) + Call(N(AdvanceBuffer), 3, 2, ArrayVar(9)) + BufRead2(ArrayVar(7), ArrayVar(8)) + Add(ArrayVar(9), 1) + IfEq(ArrayVar(7), -1) + Set(MV_TrainUnk_00, 100) + Set(MF_TrainUnk_00, FALSE) + Set(LFlag1, FALSE) + Else + Call(N(SetAngleClamped), LVar0, ArrayVar(5), ArrayVar(6), ArrayVar(7), ArrayVar(8)) + Call(AddVectorPolar, ArrayVar(5), ArrayVar(6), LVar1, LVar0) + EndIf + EndIf + IfEq(MV_TrainUnk_00, 100) + IfEq(LFlag1, TRUE) + Call(N(SetAngleClamped), LVar0, ArrayVar(0), ArrayVar(1), ArrayVar(5), ArrayVar(6)) + SetF(ArrayVar(5), ArrayVar(0)) + SetF(ArrayVar(6), ArrayVar(1)) + Call(AddVectorPolar, ArrayVar(5), ArrayVar(6), Float(80.0), LVar0) + Else + Call(N(SetAngleClamped), LVar0, ArrayVar(5), ArrayVar(6), ArrayVar(0), ArrayVar(1)) + SetF(ArrayVar(0), ArrayVar(5)) + SetF(ArrayVar(1), ArrayVar(6)) + Call(AddVectorPolar, ArrayVar(0), ArrayVar(1), Float(80.0), LVar0) + EndIf + EndIf + SetF(LVar0, ArrayVar(0)) + SetF(LVar1, ArrayVar(1)) + AddF(LVar0, ArrayVar(5)) + AddF(LVar1, ArrayVar(6)) + DivF(LVar0, Float(2.0)) + DivF(LVar1, Float(2.0)) + Call(N(SetAngleClamped), LVar2, ArrayVar(5), ArrayVar(6), ArrayVar(0), ArrayVar(1)) + SetF(MV_TrainPos, LVar0) + SetF(MV_TrainUnk_0C, LVar1) + SetF(MV_TrainUnk_0D, LVar2) + Call(GetDist2D, LVar3, LVar0, LVar1, ArrayVar(11), ArrayVar(12)) + AddF(ArrayVar(13), LVar3) + SetF(ArrayVar(14), ArrayVar(13)) + MulF(ArrayVar(14), Float(1.432)) + IfEq(LFlag0, FALSE) + SetF(LVar0, ArrayVar(10)) + IfLt(LVar0, 1) + SetF(LVar0, Float(1.0)) + EndIf + DivF(LVar0, Float(3.0)) + SubF(ArrayVar(15), LVar0) + IfLt(ArrayVar(15), -10) + SetF(ArrayVar(15), Float(-10.0)) + Set(LFlag0, TRUE) + IfEq(AF_OMO_03, FALSE) + Call(PlaySound, SOUND_OMO_TOY_TRAIN_WHISTLE_A) + Else + Call(PlaySound, SOUND_OMO_TOY_TRAIN_WHISTLE_B) + EndIf + EndIf + Else + SetF(LVar0, ArrayVar(10)) + IfLt(LVar0, 1) + SetF(LVar0, Float(1.0)) + EndIf + DivF(LVar0, Float(3.0)) + AddF(ArrayVar(15), LVar0) + IfGt(ArrayVar(15), 10) + SetF(ArrayVar(15), Float(10.0)) + Set(LFlag0, FALSE) + IfEq(AF_OMO_03, FALSE) + Call(PlaySound, SOUND_OMO_TOY_TRAIN_CLICK) + Set(AF_OMO_03, TRUE) + Else + Call(PlaySound, SOUND_OMO_TOY_TRAIN_CLICK) + Set(AF_OMO_03, FALSE) + EndIf + EndIf + EndIf + SetF(LVar0, MV_TrainPos) + SetF(LVar1, MV_TrainUnk_0C) + SetF(LVar2, MV_TrainUnk_0D) + Call(AddVectorPolar, LVar0, LVar1, Float(15.0), LVar2) + Call(N(SetPlayerStatusPosYaw), LVar0, 50, LVar1, MV_TrainUnk_0D) + SetF(LVar0, MV_TrainPos) + SetF(LVar1, MV_TrainUnk_0C) + SetF(LVar2, MV_TrainUnk_0D) + AddF(LVar2, Float(180.0)) + Call(AddVectorPolar, LVar0, LVar1, Float(15.0), LVar2) + Call(N(SetNpcPosYaw), -4, LVar0, 50, LVar1, MV_TrainUnk_0D) + SetF(LVar0, MV_TrainPos) + SetF(LVar1, MV_TrainUnk_0C) + SetF(LVar2, MV_TrainUnk_0D) + IfLt(LVar2, 180) + AddF(LVar2, Float(90.0)) + Else + SubF(LVar2, Float(90.0)) + EndIf + Call(AddVectorPolar, LVar0, LVar1, Float(20.0), LVar2) + Call(N(SetNpcPosYaw), 0, LVar0, 50, LVar1, MV_TrainUnk_0D) + CaseEq(100) + EndSwitch + Call(TranslateGroup, MODEL_p2, Float(79.1), Float(-27.93), Float(-29.53)) + Call(TranslateGroup, MODEL_p3, Float(-35.1), Float(-27.93), Float(-29.53)) + Call(RotateGroup, MODEL_p2, Float(-45.0), Float(0.0), Float(0.0), Float(1.0)) + Call(RotateGroup, MODEL_p3, Float(45.0), Float(0.0), Float(0.0), Float(1.0)) + Call(TranslateGroup, MODEL_p5, Float(40.5), Float(-20.0), Float(-0.4)) + Call(TranslateGroup, MODEL_p6, Float(-39.5), Float(-20.0), Float(-0.4)) + Call(TranslateGroup, MODEL_popo, MV_TrainPos, Float(10.0), MV_TrainUnk_0C) + IfLt(MV_TrainUnk_0D, 180) + SetF(LVar1, MV_TrainUnk_0D) + SubF(LVar1, Float(90.0)) + Call(RotateGroup, MODEL_popo, LVar1, Float(0.0), Float(-1.0), Float(0.0)) + Else + SetF(LVar1, MV_TrainUnk_0D) + SubF(LVar1, Float(180.0)) + SubF(LVar1, Float(90.0)) + Call(RotateGroup, MODEL_popo, LVar1, Float(0.0), Float(-1.0), Float(0.0)) + EndIf + Call(RotateGroup, MODEL_p2, Float(45.0), Float(0.0), Float(0.0), Float(1.0)) + Call(RotateGroup, MODEL_p3, Float(-45.0), Float(0.0), Float(0.0), Float(1.0)) + Call(TranslateGroup, MODEL_p2, Float(-79.1), Float(27.93), Float(29.53)) + Call(TranslateGroup, MODEL_p3, Float(35.1), Float(27.93), Float(29.53)) + Call(TranslateGroup, MODEL_p5, Float(-40.5), Float(20.0), Float(0.4)) + Call(TranslateGroup, MODEL_p6, Float(39.5), Float(20.0), Float(0.4)) + IfLt(MV_TrainUnk_0D, 180) + Call(RotateGroup, MODEL_p5, ArrayVar(14), Float(0.0), Float(0.0), Float(-1.0)) + Call(RotateGroup, MODEL_p6, ArrayVar(14), Float(0.0), Float(0.0), Float(-1.0)) + Else + Call(RotateGroup, MODEL_p5, ArrayVar(14), Float(0.0), Float(0.0), Float(1.0)) + Call(RotateGroup, MODEL_p6, ArrayVar(14), Float(0.0), Float(0.0), Float(1.0)) + EndIf + Call(TranslateGroup, MODEL_p2, Float(0.0), ArrayVar(15), Float(0.0)) + SetF(LVar0, ArrayVar(15)) + MulF(LVar0, Float(-1.0)) + Call(TranslateGroup, MODEL_p3, Float(0.0), LVar0, Float(0.0)) + SetF(LVar0, ArrayVar(10)) + IfLt(LVar0, 1) + SetF(LVar0, Float(1.0)) + EndIf + AddF(ArrayVar(16), LVar0) + IfGt(ArrayVar(16), 360) + SubF(ArrayVar(16), Float(360.0)) + EndIf + Call(RotateGroup, MODEL_p4, ArrayVar(16), Float(0.0), Float(1.0), Float(0.0)) + SetF(ArrayVar(11), MV_TrainPos) + SetF(ArrayVar(12), MV_TrainUnk_0C) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_TrainUnk_A) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, 0, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetCamTarget, CAM_DEFAULT, LVar0, 0, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_TrainUnk_B) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(MakeLerp, 0, LVar1, 45, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar2, LVar0, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(MakeLerp, 0, LVar1, 45, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Call(SetCamTarget, CAM_DEFAULT, LVar2, LVar0, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_TrainUnk_C) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(MakeLerp, LVar1, 0, 40, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar2, LVar0, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, 0, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(MakeLerp, LVar1, 0, 40, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Call(SetCamTarget, CAM_DEFAULT, LVar2, LVar0, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetCamTarget, CAM_DEFAULT, LVar0, 0, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_TrainUnk_D) = { - EVT_CALL(SetNpcFlagBits, NPC_Conductor, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_THREAD - EVT_USE_BUF(LVar0) - EVT_BUF_READ3(LVar1, LVar2, LVar3) - EVT_CALL(AddVectorPolar, LVar1, LVar2, EVT_FLOAT(15.0), LVar3) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Walk) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(4.0)) - EVT_CALL(PlayerMoveTo, LVar1, LVar2, 0) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(0.7)) - EVT_CALL(PlayerMoveTo, LVar1, LVar2, 0) - EVT_CALL(SetPlayerPos, LVar1, 50, LVar2) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(InterpPlayerYaw, LVar3, 0) - EVT_END_THREAD - EVT_WAIT(5) - EVT_USE_BUF(LVar0) - EVT_BUF_READ3(LVar1, LVar2, LVar3) - EVT_SETF(LVarA, LVar3) - EVT_ADDF(LVar3, EVT_FLOAT(180.0)) - EVT_CALL(AddVectorPolar, LVar1, LVar2, EVT_FLOAT(15.0), LVar3) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.7)) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar1, 50, LVar2, 10) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(0.5)) - EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar1, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, LVarA, 0) - EVT_WAIT(5) - EVT_USE_BUF(LVar0) - EVT_BUF_READ3(LVar1, LVar2, LVar3) - EVT_SETF(LVarA, LVar3) - EVT_IF_LT(LVar3, 180) - EVT_ADDF(LVar3, EVT_FLOAT(90.0)) - EVT_ELSE - EVT_SUBF(LVar3, EVT_FLOAT(90.0)) - EVT_END_IF - EVT_SETF(LVar4, LVar1) - EVT_SETF(LVar5, LVar2) - EVT_SETF(LVar6, LVar3) - EVT_CALL(AddVectorPolar, LVar1, LVar2, EVT_FLOAT(100.0), LVar3) - EVT_CALL(SetNpcSpeed, NPC_Conductor, EVT_FLOAT(3.0)) - EVT_CALL(SetNpcAnimation, NPC_Conductor, ANIM_TrainToad_Walk) - EVT_CALL(NpcMoveTo, NPC_Conductor, LVar1, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_Conductor, ANIM_TrainToad_Idle) - EVT_CALL(AddVectorPolar, LVar4, LVar5, EVT_FLOAT(20.0), LVar6) - EVT_CALL(SetNpcJumpscale, NPC_Conductor, EVT_FLOAT(0.7)) - EVT_CALL(NpcJump0, NPC_Conductor, LVar4, 50, LVar5, 10) - EVT_CALL(InterpNpcYaw, NPC_Conductor, LVarA, 0) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 5, MSG_CH4_0009) - EVT_CALL(PlaySound, SOUND_LRAW_TOYBOX_TRAIN_GEAR) - EVT_CALL(SetMusicTrack, 0, SONG_TOYBOX_TRAIN, 0, 8) - EVT_WAIT(10) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_Conductor, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Thread + UseBuf(LVar0) + BufRead3(LVar1, LVar2, LVar3) + Call(AddVectorPolar, LVar1, LVar2, Float(15.0), LVar3) + Call(SetPlayerAnimation, ANIM_Mario1_Walk) + Call(SetPlayerSpeed, Float(4.0)) + Call(PlayerMoveTo, LVar1, LVar2, 0) + Call(SetPlayerSpeed, Float(0.7)) + Call(PlayerMoveTo, LVar1, LVar2, 0) + Call(SetPlayerPos, LVar1, 50, LVar2) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(InterpPlayerYaw, LVar3, 0) + EndThread + Wait(5) + UseBuf(LVar0) + BufRead3(LVar1, LVar2, LVar3) + SetF(LVarA, LVar3) + AddF(LVar3, Float(180.0)) + Call(AddVectorPolar, LVar1, LVar2, Float(15.0), LVar3) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.7)) + Call(NpcJump0, NPC_PARTNER, LVar1, 50, LVar2, 10) + Call(SetNpcSpeed, NPC_PARTNER, Float(0.5)) + Call(NpcMoveTo, NPC_PARTNER, LVar1, LVar2, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(InterpNpcYaw, NPC_PARTNER, LVarA, 0) + Wait(5) + UseBuf(LVar0) + BufRead3(LVar1, LVar2, LVar3) + SetF(LVarA, LVar3) + IfLt(LVar3, 180) + AddF(LVar3, Float(90.0)) + Else + SubF(LVar3, Float(90.0)) + EndIf + SetF(LVar4, LVar1) + SetF(LVar5, LVar2) + SetF(LVar6, LVar3) + Call(AddVectorPolar, LVar1, LVar2, Float(100.0), LVar3) + Call(SetNpcSpeed, NPC_Conductor, Float(3.0)) + Call(SetNpcAnimation, NPC_Conductor, ANIM_TrainToad_Walk) + Call(NpcMoveTo, NPC_Conductor, LVar1, LVar2, 0) + Call(SetNpcAnimation, NPC_Conductor, ANIM_TrainToad_Idle) + Call(AddVectorPolar, LVar4, LVar5, Float(20.0), LVar6) + Call(SetNpcJumpscale, NPC_Conductor, Float(0.7)) + Call(NpcJump0, NPC_Conductor, LVar4, 50, LVar5, 10) + Call(InterpNpcYaw, NPC_Conductor, LVarA, 0) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 5, MSG_CH4_0009) + Call(PlaySound, SOUND_LRAW_TOYBOX_TRAIN_GEAR) + Call(SetMusicTrack, 0, SONG_TOYBOX_TRAIN, 0, 8) + Wait(10) + Return + End }; #ifdef INCLUDE_ALTERNATES EvtScript N(EVS_TrainUnk_AltD) = { - EVT_CALL(SetNpcFlagBits, NPC_Conductor, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_SET(AF_OMO_06, FALSE) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_IF_LT(LVar2, 50) - EVT_USE_BUF(LVar9) - EVT_BUF_READ4(LVar3, LVar4, LVar5, LVar6) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(2.5)) - EVT_CALL(PlayerMoveTo, LVar3, LVar4, 0) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(PlayerJump, LVar5, 50, LVar6, 15) - EVT_END_IF - EVT_THREAD - EVT_USE_BUF(LVar0) - EVT_BUF_READ3(LVar1, LVar2, LVar3) - EVT_CALL(AddVectorPolar, LVar1, LVar2, EVT_FLOAT(15.0), LVar3) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Walk) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(4.0)) - EVT_CALL(PlayerMoveTo, LVar1, LVar2, 0) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(0.7)) - EVT_CALL(PlayerMoveTo, LVar1, LVar2, 0) - EVT_CALL(SetPlayerPos, LVar1, 50, LVar2) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(InterpPlayerYaw, LVar3, 0) - EVT_END_THREAD - EVT_WAIT(5) - EVT_USE_BUF(LVar0) - EVT_BUF_READ3(LVar1, LVar2, LVar3) - EVT_SETF(LVarA, LVar3) - EVT_ADDF(LVar3, EVT_FLOAT(180.0)) - EVT_CALL(AddVectorPolar, LVar1, LVar2, EVT_FLOAT(15.0), LVar3) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.7)) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar1, 50, LVar2, 10) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(0.1)) - EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar1, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, LVarA, 0) - EVT_WAIT(5) - EVT_USE_BUF(LVar0) - EVT_BUF_READ3(LVar1, LVar2, LVar3) - EVT_SETF(LVarA, LVar3) - EVT_ADDF(LVar3, EVT_FLOAT(90.0)) - EVT_SETF(LVar4, LVar1) - EVT_SETF(LVar5, LVar2) - EVT_SETF(LVar6, LVar3) - EVT_CALL(AddVectorPolar, LVar1, LVar2, EVT_FLOAT(60.0), LVar3) - EVT_CALL(SetNpcSpeed, NPC_Conductor, EVT_FLOAT(3.0)) - EVT_CALL(SetNpcAnimation, NPC_Conductor, ANIM_TrainToad_Walk) - EVT_CALL(NpcMoveTo, NPC_Conductor, LVar1, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_Conductor, ANIM_TrainToad_Idle) - EVT_CALL(AddVectorPolar, LVar4, LVar5, EVT_FLOAT(20.0), LVar6) - EVT_CALL(SetNpcJumpscale, NPC_Conductor, EVT_FLOAT(0.7)) - EVT_CALL(NpcJump0, NPC_Conductor, LVar4, 50, LVar5, 10) - EVT_CALL(InterpNpcYaw, NPC_Conductor, LVarA, 0) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 5, MSG_CH4_0009) - EVT_CALL(PlaySound, SOUND_LRAW_TOYBOX_TRAIN_GEAR) - EVT_CALL(SetMusicTrack, 0, SONG_TOYBOX_TRAIN, 0, 8) - EVT_WAIT(10) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_Conductor, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Set(AF_OMO_06, FALSE) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + IfLt(LVar2, 50) + UseBuf(LVar9) + BufRead4(LVar3, LVar4, LVar5, LVar6) + Call(SetPlayerSpeed, Float(2.5)) + Call(PlayerMoveTo, LVar3, LVar4, 0) + Call(SetPlayerJumpscale, Float(1.0)) + Call(PlayerJump, LVar5, 50, LVar6, 15) + EndIf + Thread + UseBuf(LVar0) + BufRead3(LVar1, LVar2, LVar3) + Call(AddVectorPolar, LVar1, LVar2, Float(15.0), LVar3) + Call(SetPlayerAnimation, ANIM_Mario1_Walk) + Call(SetPlayerSpeed, Float(4.0)) + Call(PlayerMoveTo, LVar1, LVar2, 0) + Call(SetPlayerSpeed, Float(0.7)) + Call(PlayerMoveTo, LVar1, LVar2, 0) + Call(SetPlayerPos, LVar1, 50, LVar2) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(InterpPlayerYaw, LVar3, 0) + EndThread + Wait(5) + UseBuf(LVar0) + BufRead3(LVar1, LVar2, LVar3) + SetF(LVarA, LVar3) + AddF(LVar3, Float(180.0)) + Call(AddVectorPolar, LVar1, LVar2, Float(15.0), LVar3) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.7)) + Call(NpcJump0, NPC_PARTNER, LVar1, 50, LVar2, 10) + Call(SetNpcSpeed, NPC_PARTNER, Float(0.1)) + Call(NpcMoveTo, NPC_PARTNER, LVar1, LVar2, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(InterpNpcYaw, NPC_PARTNER, LVarA, 0) + Wait(5) + UseBuf(LVar0) + BufRead3(LVar1, LVar2, LVar3) + SetF(LVarA, LVar3) + AddF(LVar3, Float(90.0)) + SetF(LVar4, LVar1) + SetF(LVar5, LVar2) + SetF(LVar6, LVar3) + Call(AddVectorPolar, LVar1, LVar2, Float(60.0), LVar3) + Call(SetNpcSpeed, NPC_Conductor, Float(3.0)) + Call(SetNpcAnimation, NPC_Conductor, ANIM_TrainToad_Walk) + Call(NpcMoveTo, NPC_Conductor, LVar1, LVar2, 0) + Call(SetNpcAnimation, NPC_Conductor, ANIM_TrainToad_Idle) + Call(AddVectorPolar, LVar4, LVar5, Float(20.0), LVar6) + Call(SetNpcJumpscale, NPC_Conductor, Float(0.7)) + Call(NpcJump0, NPC_Conductor, LVar4, 50, LVar5, 10) + Call(InterpNpcYaw, NPC_Conductor, LVarA, 0) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 5, MSG_CH4_0009) + Call(PlaySound, SOUND_LRAW_TOYBOX_TRAIN_GEAR) + Call(SetMusicTrack, 0, SONG_TOYBOX_TRAIN, 0, 8) + Wait(10) + Return + End }; #endif EvtScript N(EVS_TrainUnk_E) = { - EVT_CALL(StopSound, SOUND_LRAW_TOYBOX_TRAIN_GEAR) - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) - EVT_CALL(SetNpcFlagBits, NPC_Conductor, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_SETF(LVar0, MV_TrainPos) - EVT_SETF(LVar1, MV_TrainUnk_0C) - EVT_SETF(LVar2, MV_TrainUnk_0D) - EVT_IF_LT(LVar2, 180) - EVT_ADDF(LVar2, EVT_FLOAT(90.0)) - EVT_ELSE - EVT_SUBF(LVar2, EVT_FLOAT(90.0)) - EVT_END_IF - EVT_CALL(AddVectorPolar, LVar0, LVar1, EVT_FLOAT(100.0), LVar2) - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Conductor, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_Conductor, LVar0, 50, LVar1, 10) - EVT_CALL(SetNpcAnimation, NPC_Conductor, ANIM_TrainToad_Walk) - EVT_CALL(SetNpcSpeed, NPC_Conductor, EVT_FLOAT(2.0)) - EVT_USE_BUF(LVar9) - EVT_BUF_READ2(LVar3, LVar4) - EVT_CALL(NpcMoveTo, NPC_Conductor, LVar3, LVar4, 0) - EVT_CALL(SetNpcAnimation, NPC_Conductor, ANIM_TrainToad_Idle) - EVT_CALL(InterpNpcYaw, NPC_Conductor, 270, 15) - EVT_CALL(SetNpcFlagBits, NPC_Conductor, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_END_THREAD - EVT_WAIT(10) - EVT_THREAD - EVT_ADDF(LVar2, EVT_FLOAT(60.0)) - EVT_CALL(AddVectorPolar, LVar0, LVar1, EVT_FLOAT(20.0), LVar2) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Walk) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, LVar0, LVar1, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_WAIT(10) - EVT_SUB(LVar1, 30) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(2.5)) - EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar0, LVar1, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_RETURN - EVT_END + Call(StopSound, SOUND_LRAW_TOYBOX_TRAIN_GEAR) + Call(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) + Call(SetNpcFlagBits, NPC_Conductor, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + SetF(LVar0, MV_TrainPos) + SetF(LVar1, MV_TrainUnk_0C) + SetF(LVar2, MV_TrainUnk_0D) + IfLt(LVar2, 180) + AddF(LVar2, Float(90.0)) + Else + SubF(LVar2, Float(90.0)) + EndIf + Call(AddVectorPolar, LVar0, LVar1, Float(100.0), LVar2) + Thread + Call(SetNpcJumpscale, NPC_Conductor, Float(1.0)) + Call(NpcJump0, NPC_Conductor, LVar0, 50, LVar1, 10) + Call(SetNpcAnimation, NPC_Conductor, ANIM_TrainToad_Walk) + Call(SetNpcSpeed, NPC_Conductor, Float(2.0)) + UseBuf(LVar9) + BufRead2(LVar3, LVar4) + Call(NpcMoveTo, NPC_Conductor, LVar3, LVar4, 0) + Call(SetNpcAnimation, NPC_Conductor, ANIM_TrainToad_Idle) + Call(InterpNpcYaw, NPC_Conductor, 270, 15) + Call(SetNpcFlagBits, NPC_Conductor, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + EndThread + Wait(10) + Thread + AddF(LVar2, Float(60.0)) + Call(AddVectorPolar, LVar0, LVar1, Float(20.0), LVar2) + Call(SetPlayerAnimation, ANIM_Mario1_Walk) + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, LVar0, LVar1, 0) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndThread + Wait(10) + Sub(LVar1, 30) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) + Call(SetNpcSpeed, NPC_PARTNER, Float(2.5)) + Call(NpcMoveTo, NPC_PARTNER, LVar0, LVar1, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Return + End }; #ifdef INCLUDE_ALTERNATES EvtScript N(EVS_TrainUnk_AltE) = { - EVT_CALL(StopSound, SOUND_LRAW_TOYBOX_TRAIN_GEAR) - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) - EVT_CALL(SetNpcFlagBits, NPC_Conductor, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_SET(AF_OMO_06, TRUE) - EVT_SETF(LVar0, MV_TrainPos) - EVT_SETF(LVar1, MV_TrainUnk_0C) - EVT_SETF(LVar2, MV_TrainUnk_0D) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Conductor, ANIM_TrainToad_Walk) - EVT_CALL(SetNpcSpeed, NPC_Conductor, EVT_FLOAT(3.5)) - EVT_USE_BUF(LVar9) - EVT_BUF_READ2(LVar3, LVar4) - EVT_CALL(NpcMoveTo, NPC_Conductor, LVar3, LVar4, 0) - EVT_CALL(SetNpcAnimation, NPC_Conductor, ANIM_TrainToad_SadIdle) - EVT_CALL(InterpNpcYaw, NPC_Conductor, 90, 0) - EVT_CALL(SetNpcFlagBits, NPC_Conductor, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_END_THREAD - EVT_WAIT(10) - EVT_THREAD - EVT_ADDF(LVar2, EVT_FLOAT(85.0)) - EVT_CALL(AddVectorPolar, LVar0, LVar1, EVT_FLOAT(80.0), LVar2) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Walk) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, LVar0, LVar1, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_WAIT(10) - EVT_ADDF(LVar2, EVT_FLOAT(50.0)) - EVT_CALL(AddVectorPolar, LVar0, LVar1, EVT_FLOAT(85.0), LVar2) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(2.5)) - EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar0, LVar1, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_RETURN - EVT_END + Call(StopSound, SOUND_LRAW_TOYBOX_TRAIN_GEAR) + Call(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) + Call(SetNpcFlagBits, NPC_Conductor, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Set(AF_OMO_06, TRUE) + SetF(LVar0, MV_TrainPos) + SetF(LVar1, MV_TrainUnk_0C) + SetF(LVar2, MV_TrainUnk_0D) + Thread + Call(SetNpcAnimation, NPC_Conductor, ANIM_TrainToad_Walk) + Call(SetNpcSpeed, NPC_Conductor, Float(3.5)) + UseBuf(LVar9) + BufRead2(LVar3, LVar4) + Call(NpcMoveTo, NPC_Conductor, LVar3, LVar4, 0) + Call(SetNpcAnimation, NPC_Conductor, ANIM_TrainToad_SadIdle) + Call(InterpNpcYaw, NPC_Conductor, 90, 0) + Call(SetNpcFlagBits, NPC_Conductor, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + EndThread + Wait(10) + Thread + AddF(LVar2, Float(85.0)) + Call(AddVectorPolar, LVar0, LVar1, Float(80.0), LVar2) + Call(SetPlayerAnimation, ANIM_Mario1_Walk) + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, LVar0, LVar1, 0) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndThread + Wait(10) + AddF(LVar2, Float(50.0)) + Call(AddVectorPolar, LVar0, LVar1, Float(85.0), LVar2) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) + Call(SetNpcSpeed, NPC_PARTNER, Float(2.5)) + Call(NpcMoveTo, NPC_PARTNER, LVar0, LVar1, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Return + End }; #endif EvtScript N(EVS_TrainUnk_F) = { - EVT_SWITCH(AB_OMO_6) - EVT_CASE_EQ(0) - EVT_CALL(GotoMapSpecial, EVT_PTR("omo_03"), omo_03_ENTRY_3, TRANSITION_TOY_TRAIN) - EVT_CASE_EQ(1) - EVT_CALL(GotoMapSpecial, EVT_PTR("omo_06"), omo_06_ENTRY_3, TRANSITION_TOY_TRAIN) - EVT_CASE_EQ(2) - EVT_CALL(GotoMapSpecial, EVT_PTR("omo_08"), omo_08_ENTRY_2, TRANSITION_TOY_TRAIN) - EVT_CASE_EQ(3) - EVT_CALL(GotoMapSpecial, EVT_PTR("omo_10"), omo_10_ENTRY_3, TRANSITION_TOY_TRAIN) - EVT_END_SWITCH - EVT_WAIT(100) - EVT_RETURN - EVT_END + Switch(AB_OMO_6) + CaseEq(0) + Call(GotoMapSpecial, Ref("omo_03"), omo_03_ENTRY_3, TRANSITION_TOY_TRAIN) + CaseEq(1) + Call(GotoMapSpecial, Ref("omo_06"), omo_06_ENTRY_3, TRANSITION_TOY_TRAIN) + CaseEq(2) + Call(GotoMapSpecial, Ref("omo_08"), omo_08_ENTRY_2, TRANSITION_TOY_TRAIN) + CaseEq(3) + Call(GotoMapSpecial, Ref("omo_10"), omo_10_ENTRY_3, TRANSITION_TOY_TRAIN) + EndSwitch + Wait(100) + Return + End }; EvtScript N(EVS_TrainUnk_G) = { - EVT_SWITCH(AB_OMO_5) - EVT_CASE_RANGE(0, 1) - EVT_SWITCH(AB_OMO_6) - EVT_CASE_EQ(0) - EVT_CALL(GotoMapSpecial, EVT_PTR("omo_03"), omo_03_ENTRY_2, TRANSITION_TOY_TRAIN) - EVT_CASE_EQ(1) - EVT_CALL(GotoMapSpecial, EVT_PTR("omo_06"), omo_06_ENTRY_2, TRANSITION_TOY_TRAIN) - EVT_CASE_EQ(2) - EVT_CALL(GotoMapSpecial, EVT_PTR("omo_08"), omo_08_ENTRY_1, TRANSITION_TOY_TRAIN) - EVT_CASE_EQ(3) - EVT_CALL(GotoMapSpecial, EVT_PTR("omo_10"), omo_10_ENTRY_2, TRANSITION_TOY_TRAIN) - EVT_END_SWITCH - EVT_CASE_EQ(2) - EVT_SWITCH(AB_OMO_6) - EVT_CASE_EQ(0) - EVT_CALL(GotoMapSpecial, EVT_PTR("omo_03"), omo_03_ENTRY_2, TRANSITION_TOY_TRAIN) - EVT_CASE_EQ(1) - EVT_IF_EQ(GF_OMO03_BlueSwitchActivated, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("omo_06"), omo_06_ENTRY_2, TRANSITION_TOY_TRAIN) - EVT_ELSE - EVT_CALL(GotoMapSpecial, EVT_PTR("omo_03"), omo_03_ENTRY_2, TRANSITION_TOY_TRAIN) - EVT_END_IF - EVT_CASE_EQ(3) - EVT_CALL(GotoMapSpecial, EVT_PTR("omo_10"), omo_10_ENTRY_2, TRANSITION_TOY_TRAIN) - EVT_END_SWITCH - EVT_CASE_EQ(3) - EVT_SWITCH(AB_OMO_6) - EVT_CASE_EQ(0) - EVT_CALL(GotoMapSpecial, EVT_PTR("omo_03"), omo_03_ENTRY_2, TRANSITION_TOY_TRAIN) - EVT_CASE_EQ(1) - EVT_IF_EQ(GF_OMO03_BlueSwitchActivated, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("omo_06"), omo_06_ENTRY_2, TRANSITION_TOY_TRAIN) - EVT_ELSE - EVT_CALL(GotoMapSpecial, EVT_PTR("omo_03"), omo_03_ENTRY_2, TRANSITION_TOY_TRAIN) - EVT_END_IF - EVT_CASE_EQ(2) - EVT_IF_EQ(GF_OMO03_BlueSwitchActivated, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("omo_08"), omo_08_ENTRY_1, TRANSITION_TOY_TRAIN) - EVT_ELSE - EVT_CALL(GotoMapSpecial, EVT_PTR("omo_03"), omo_03_ENTRY_2, TRANSITION_TOY_TRAIN) - EVT_END_IF - EVT_END_SWITCH - EVT_END_SWITCH - EVT_WAIT(100) - EVT_RETURN - EVT_END + Switch(AB_OMO_5) + CaseRange(0, 1) + Switch(AB_OMO_6) + CaseEq(0) + Call(GotoMapSpecial, Ref("omo_03"), omo_03_ENTRY_2, TRANSITION_TOY_TRAIN) + CaseEq(1) + Call(GotoMapSpecial, Ref("omo_06"), omo_06_ENTRY_2, TRANSITION_TOY_TRAIN) + CaseEq(2) + Call(GotoMapSpecial, Ref("omo_08"), omo_08_ENTRY_1, TRANSITION_TOY_TRAIN) + CaseEq(3) + Call(GotoMapSpecial, Ref("omo_10"), omo_10_ENTRY_2, TRANSITION_TOY_TRAIN) + EndSwitch + CaseEq(2) + Switch(AB_OMO_6) + CaseEq(0) + Call(GotoMapSpecial, Ref("omo_03"), omo_03_ENTRY_2, TRANSITION_TOY_TRAIN) + CaseEq(1) + IfEq(GF_OMO03_BlueSwitchActivated, TRUE) + Call(GotoMapSpecial, Ref("omo_06"), omo_06_ENTRY_2, TRANSITION_TOY_TRAIN) + Else + Call(GotoMapSpecial, Ref("omo_03"), omo_03_ENTRY_2, TRANSITION_TOY_TRAIN) + EndIf + CaseEq(3) + Call(GotoMapSpecial, Ref("omo_10"), omo_10_ENTRY_2, TRANSITION_TOY_TRAIN) + EndSwitch + CaseEq(3) + Switch(AB_OMO_6) + CaseEq(0) + Call(GotoMapSpecial, Ref("omo_03"), omo_03_ENTRY_2, TRANSITION_TOY_TRAIN) + CaseEq(1) + IfEq(GF_OMO03_BlueSwitchActivated, TRUE) + Call(GotoMapSpecial, Ref("omo_06"), omo_06_ENTRY_2, TRANSITION_TOY_TRAIN) + Else + Call(GotoMapSpecial, Ref("omo_03"), omo_03_ENTRY_2, TRANSITION_TOY_TRAIN) + EndIf + CaseEq(2) + IfEq(GF_OMO03_BlueSwitchActivated, TRUE) + Call(GotoMapSpecial, Ref("omo_08"), omo_08_ENTRY_1, TRANSITION_TOY_TRAIN) + Else + Call(GotoMapSpecial, Ref("omo_03"), omo_03_ENTRY_2, TRANSITION_TOY_TRAIN) + EndIf + EndSwitch + EndSwitch + Wait(100) + Return + End }; EvtScript N(EVS_TrainUnk_H) = { - EVT_LABEL(10) - EVT_WAIT(1) - EVT_CALL(N(IsAOrBPressed)) - EVT_IF_NE(LVar0, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_EQ(AF_OMO_UsingRightSwitch, FALSE) - EVT_EXEC_WAIT(N(EVS_TrainUnk_F)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_TrainUnk_G)) - EVT_END_IF - EVT_RETURN - EVT_END + Label(10) + Wait(1) + Call(N(IsAOrBPressed)) + IfNe(LVar0, 1) + Goto(10) + EndIf + IfEq(AF_OMO_UsingRightSwitch, FALSE) + ExecWait(N(EVS_TrainUnk_F)) + Else + ExecWait(N(EVS_TrainUnk_G)) + EndIf + Return + End }; diff --git a/src/world/area_omo/common/TrainStationSwitches.inc.c b/src/world/area_omo/common/TrainStationSwitches.inc.c index a054b79a0be..c642640bcb0 100644 --- a/src/world/area_omo/common/TrainStationSwitches.inc.c +++ b/src/world/area_omo/common/TrainStationSwitches.inc.c @@ -2,188 +2,188 @@ // controls the large arrow hovering in front of the train station EvtScript N(EVS_UpdateDirectionArrow) = { - EVT_CALL(SetTexPanner, MODEL_y_a, TEX_PANNER_2) - EVT_CALL(EnableTexPanning, MODEL_y_a, TRUE) + Call(SetTexPanner, MODEL_y_a, TEX_PANNER_2) + Call(EnableTexPanning, MODEL_y_a, TRUE) // adjust color with a UV offset into a color palette texture - EVT_SET(MV_ArrowTexUOffset, 0x4000 * 2) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, MV_ArrowTexUOffset, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_SET(LVar5, 0) + Set(MV_ArrowTexUOffset, 0x4000 * 2) + Thread + Loop(0) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, MV_ArrowTexUOffset, 0) + Wait(1) + EndLoop + EndThread + Set(LVar5, 0) // slowly rotate the arrow - EVT_LABEL(0) - EVT_ADD(LVar5, 2) - EVT_IF_GT(LVar5, 360) - EVT_SUB(LVar5, 360) - EVT_END_IF - EVT_CALL(RotateModel, MODEL_y_a, LVar5, 0, 0, -1) - EVT_WAIT(1) - EVT_IF_EQ(MF_EitherSwitchPressed, TRUE) - EVT_GOTO(10) - EVT_END_IF - EVT_GOTO(0) - EVT_LABEL(10) - EVT_IF_EQ(AF_OMO_UsingRightSwitch, FALSE) - EVT_SET(LVar2, 270) - EVT_CALL(EnableTexPanning, MODEL_y_c2, FALSE) - EVT_CALL(EnableTexPanning, MODEL_y_b2, TRUE) - EVT_ELSE - EVT_SET(LVar2, 90) - EVT_CALL(EnableTexPanning, MODEL_y_b2, FALSE) - EVT_CALL(EnableTexPanning, MODEL_y_c2, TRUE) - EVT_END_IF - EVT_IF_LT(LVar2, LVar5) - EVT_ADD(LVar2, 360) - EVT_END_IF - EVT_SET(LVar6, AF_OMO_UsingRightSwitch) - EVT_CALL(MakeLerp, LVar5, LVar2, 60, EASING_COS_FAST_OVERSHOOT) - EVT_CALL(UpdateLerp) - EVT_SET(LVar4, -1) - EVT_LABEL(11) - EVT_CALL(UpdateLerp) - EVT_IF_LT(LVar2, LVar0) - EVT_SET(LVar3, 0) - EVT_ELSE - EVT_SET(LVar3, 1) - EVT_END_IF - EVT_IF_NE(LVar4, -1) - EVT_IF_NE(LVar3, LVar4) - EVT_CALL(PlaySound, SOUND_OMO_TRAIN_SWITCH_RATTLE) - EVT_END_IF - EVT_END_IF - EVT_SET(LVar4, LVar3) - EVT_CALL(RotateModel, MODEL_y_a, LVar0, 0, 0, -1) - EVT_WAIT(1) - EVT_IF_NE(AF_OMO_UsingRightSwitch, LVar6) - EVT_GOTO(21) - EVT_END_IF - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(11) - EVT_END_IF - EVT_CALL(PlaySound, SOUND_OMO_TRAIN_SWITCH_SELECT) - EVT_IF_EQ(AF_OMO_UsingRightSwitch, FALSE) - EVT_SET(MV_ArrowTexUOffset, 0x4000) - EVT_ELSE - EVT_SET(MV_ArrowTexUOffset, 0x4000 * 3) - EVT_END_IF - EVT_LABEL(20) - EVT_WAIT(1) - EVT_IF_EQ(AF_OMO_UsingRightSwitch, LVar6) - EVT_GOTO(20) - EVT_END_IF - EVT_LABEL(21) - EVT_SET(LVar5, LVar0) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Label(0) + Add(LVar5, 2) + IfGt(LVar5, 360) + Sub(LVar5, 360) + EndIf + Call(RotateModel, MODEL_y_a, LVar5, 0, 0, -1) + Wait(1) + IfEq(MF_EitherSwitchPressed, TRUE) + Goto(10) + EndIf + Goto(0) + Label(10) + IfEq(AF_OMO_UsingRightSwitch, FALSE) + Set(LVar2, 270) + Call(EnableTexPanning, MODEL_y_c2, FALSE) + Call(EnableTexPanning, MODEL_y_b2, TRUE) + Else + Set(LVar2, 90) + Call(EnableTexPanning, MODEL_y_b2, FALSE) + Call(EnableTexPanning, MODEL_y_c2, TRUE) + EndIf + IfLt(LVar2, LVar5) + Add(LVar2, 360) + EndIf + Set(LVar6, AF_OMO_UsingRightSwitch) + Call(MakeLerp, LVar5, LVar2, 60, EASING_COS_FAST_OVERSHOOT) + Call(UpdateLerp) + Set(LVar4, -1) + Label(11) + Call(UpdateLerp) + IfLt(LVar2, LVar0) + Set(LVar3, 0) + Else + Set(LVar3, 1) + EndIf + IfNe(LVar4, -1) + IfNe(LVar3, LVar4) + Call(PlaySound, SOUND_OMO_TRAIN_SWITCH_RATTLE) + EndIf + EndIf + Set(LVar4, LVar3) + Call(RotateModel, MODEL_y_a, LVar0, 0, 0, -1) + Wait(1) + IfNe(AF_OMO_UsingRightSwitch, LVar6) + Goto(21) + EndIf + IfEq(LVar1, 1) + Goto(11) + EndIf + Call(PlaySound, SOUND_OMO_TRAIN_SWITCH_SELECT) + IfEq(AF_OMO_UsingRightSwitch, FALSE) + Set(MV_ArrowTexUOffset, 0x4000) + Else + Set(MV_ArrowTexUOffset, 0x4000 * 3) + EndIf + Label(20) + Wait(1) + IfEq(AF_OMO_UsingRightSwitch, LVar6) + Goto(20) + EndIf + Label(21) + Set(LVar5, LVar0) + Goto(10) + Return + End }; EvtScript N(EVS_PressSwitch_Left) = { - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_EQ(LVar0, PARTNER_PARAKARRY) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(MF_EitherSwitchPressed, TRUE) - EVT_IF_EQ(AF_OMO_UsingRightSwitch, FALSE) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_SET(MF_EitherSwitchPressed, TRUE) - EVT_SET(AF_OMO_UsingRightSwitch, FALSE) - EVT_CALL(MakeLerp, 0, -18, 15, EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_y_b1, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_y_b2, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o920) - EVT_CALL(UpdateColliderTransform, COLLIDER_o921) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(MakeLerp, -18, 0, 15, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_y_b1, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_y_b2, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o920) - EVT_CALL(UpdateColliderTransform, COLLIDER_o921) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, PARTNER_NONE) + Call(GetCurrentPartnerID, LVar0) + IfEq(LVar0, PARTNER_PARAKARRY) + Return + EndIf + EndIf + IfEq(MF_EitherSwitchPressed, TRUE) + IfEq(AF_OMO_UsingRightSwitch, FALSE) + Return + EndIf + EndIf + Set(MF_EitherSwitchPressed, TRUE) + Set(AF_OMO_UsingRightSwitch, FALSE) + Call(MakeLerp, 0, -18, 15, EASING_LINEAR) + Label(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_y_b1, 0, LVar0, 0) + Call(TranslateModel, MODEL_y_b2, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o920) + Call(UpdateColliderTransform, COLLIDER_o921) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(MakeLerp, -18, 0, 15, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(TranslateModel, MODEL_y_b1, 0, LVar0, 0) + Call(TranslateModel, MODEL_y_b2, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o920) + Call(UpdateColliderTransform, COLLIDER_o921) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Return + End }; EvtScript N(EVS_PressSwitch_Right) = { - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_EQ(LVar0, PARTNER_PARAKARRY) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(MF_EitherSwitchPressed, TRUE) - EVT_IF_EQ(AF_OMO_UsingRightSwitch, TRUE) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_SET(MF_EitherSwitchPressed, TRUE) - EVT_SET(AF_OMO_UsingRightSwitch, TRUE) - EVT_CALL(MakeLerp, 0, -18, 15, EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_y_c1, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_y_c2, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o923) - EVT_CALL(UpdateColliderTransform, COLLIDER_o924) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(MakeLerp, -18, 0, 15, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_y_c1, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_y_c2, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o923) - EVT_CALL(UpdateColliderTransform, COLLIDER_o924) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, PARTNER_NONE) + Call(GetCurrentPartnerID, LVar0) + IfEq(LVar0, PARTNER_PARAKARRY) + Return + EndIf + EndIf + IfEq(MF_EitherSwitchPressed, TRUE) + IfEq(AF_OMO_UsingRightSwitch, TRUE) + Return + EndIf + EndIf + Set(MF_EitherSwitchPressed, TRUE) + Set(AF_OMO_UsingRightSwitch, TRUE) + Call(MakeLerp, 0, -18, 15, EASING_LINEAR) + Label(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_y_c1, 0, LVar0, 0) + Call(TranslateModel, MODEL_y_c2, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o923) + Call(UpdateColliderTransform, COLLIDER_o924) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(MakeLerp, -18, 0, 15, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(TranslateModel, MODEL_y_c1, 0, LVar0, 0) + Call(TranslateModel, MODEL_y_c2, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o923) + Call(UpdateColliderTransform, COLLIDER_o924) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Return + End }; #include "world/common/atomic/TexturePan.inc.c" EvtScript N(EVS_SetupSwitches) = { - EVT_SET(MF_EitherSwitchPressed, FALSE) - EVT_SET(AF_JAN01_TreeDrop_StarPiece, FALSE) - EVT_EXEC(N(EVS_UpdateDirectionArrow)) - EVT_CALL(ParentColliderToModel, COLLIDER_o920, MODEL_y_b1) - EVT_CALL(ParentColliderToModel, COLLIDER_o921, MODEL_y_b2) - EVT_CALL(ParentColliderToModel, COLLIDER_o923, MODEL_y_c1) - EVT_CALL(ParentColliderToModel, COLLIDER_o924, MODEL_y_c2) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_PressSwitch_Left)), TRIGGER_FLOOR_TOUCH, COLLIDER_o920, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_PressSwitch_Left)), TRIGGER_WALL_HAMMER, COLLIDER_o921, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_PressSwitch_Right)), TRIGGER_FLOOR_TOUCH, COLLIDER_o923, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_PressSwitch_Right)), TRIGGER_WALL_HAMMER, COLLIDER_o924, 1, 0) - EVT_THREAD + Set(MF_EitherSwitchPressed, FALSE) + Set(AF_JAN01_TreeDrop_StarPiece, FALSE) + Exec(N(EVS_UpdateDirectionArrow)) + Call(ParentColliderToModel, COLLIDER_o920, MODEL_y_b1) + Call(ParentColliderToModel, COLLIDER_o921, MODEL_y_b2) + Call(ParentColliderToModel, COLLIDER_o923, MODEL_y_c1) + Call(ParentColliderToModel, COLLIDER_o924, MODEL_y_c2) + BindTrigger(Ref(N(EVS_PressSwitch_Left)), TRIGGER_FLOOR_TOUCH, COLLIDER_o920, 1, 0) + BindTrigger(Ref(N(EVS_PressSwitch_Left)), TRIGGER_WALL_HAMMER, COLLIDER_o921, 1, 0) + BindTrigger(Ref(N(EVS_PressSwitch_Right)), TRIGGER_FLOOR_TOUCH, COLLIDER_o923, 1, 0) + BindTrigger(Ref(N(EVS_PressSwitch_Right)), TRIGGER_WALL_HAMMER, COLLIDER_o924, 1, 0) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP(-1100, 0, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; diff --git a/src/world/area_omo/omo_01/omo_01_1_music.c b/src/world/area_omo/omo_01/omo_01_1_music.c index ed917e8bf87..dfffeb5debe 100644 --- a/src/world/area_omo/omo_01/omo_01_1_music.c +++ b/src/world/area_omo/omo_01/omo_01_1_music.c @@ -1,7 +1,7 @@ #include "omo_01.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) + Return + End }; diff --git a/src/world/area_omo/omo_01/omo_01_2_main.c b/src/world/area_omo/omo_01/omo_01_2_main.c index 5f97ee4e84e..64fc868f99b 100644 --- a/src/world/area_omo/omo_01/omo_01_2_main.c +++ b/src/world/area_omo/omo_01/omo_01_2_main.c @@ -3,25 +3,25 @@ EvtScript N(EVS_ExitWalk_omo_13_0) = EVT_EXIT_WALK(60, omo_01_ENTRY_0, "omo_13", omo_13_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_13_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_omo_13_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_SET(GF_MAP_ShyGuysToybox, TRUE) - EVT_SET(GF_OMO01_Visited, TRUE) - EVT_SET(GF_MAC01_CalculatorStolen, TRUE) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupGizmos)) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Set(GF_MAP_ShyGuysToybox, TRUE) + Set(GF_OMO01_Visited, TRUE) + Set(GF_MAC01_CalculatorStolen, TRUE) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupGizmos)) + ExecWait(N(EVS_SetupMusic)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; diff --git a/src/world/area_omo/omo_01/omo_01_3_gizmos.c b/src/world/area_omo/omo_01/omo_01_3_gizmos.c index bc2e1a6a184..6dd87ffa192 100644 --- a/src/world/area_omo/omo_01/omo_01_3_gizmos.c +++ b/src/world/area_omo/omo_01/omo_01_3_gizmos.c @@ -2,71 +2,71 @@ #include "model.h" EvtScript N(EVS_Gizmos_Wheels) = { - EVT_LOOP(0) - EVT_CALL(MakeLerp, 0, -360, 100, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_ha1, LVar0, 1, 0, 1) - EVT_CALL(RotateModel, MODEL_ha2, LVar0, 1, 0, 1) - EVT_CALL(RotateModel, MODEL_ha3, LVar0, 1, 0, 1) - EVT_CALL(RotateModel, MODEL_ha4, LVar0, 1, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(MakeLerp, 0, -360, 100, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_ha1, LVar0, 1, 0, 1) + Call(RotateModel, MODEL_ha2, LVar0, 1, 0, 1) + Call(RotateModel, MODEL_ha3, LVar0, 1, 0, 1) + Call(RotateModel, MODEL_ha4, LVar0, 1, 0, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_Gizmos_Shutters) = { - EVT_LOOP(0) - EVT_CALL(MakeLerp, 0, 160, 60, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m2_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m2_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m4_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m4_2, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(MakeLerp, 160, 0, 60, EASING_COS_IN_OUT) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m2_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m2_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m4_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m4_2, LVar0, 0, 1, 0) - EVT_WAIT(2) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(MakeLerp, 0, 160, 60, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m2_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m2_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m4_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m4_2, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(MakeLerp, 160, 0, 60, EASING_COS_IN_OUT) + Label(2) + Call(UpdateLerp) + Call(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m2_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m2_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m4_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m4_2, LVar0, 0, 1, 0) + Wait(2) + IfEq(LVar1, 1) + Goto(2) + EndIf + EndLoop + Return + End }; EvtScript N(EVS_Gizmos_Clocks) = { - EVT_LOOP(0) - EVT_CALL(MakeLerp, 0, -360, 100, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_hari1, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_hari2, LVar0, 1, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(MakeLerp, 0, -360, 100, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_hari1, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_hari2, LVar0, 1, 0, 1) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + EndLoop + Return + End }; s32 N(RockingHorseModels)[] = { @@ -79,10 +79,10 @@ s32 N(RockingHorseModels)[] = { #import "../common/RockingHorse.inc.c" EvtScript N(EVS_SetupGizmos) = { - EVT_EXEC(N(EVS_Gizmos_Wheels)) - EVT_EXEC(N(EVS_Gizmos_Shutters)) - EVT_EXEC(N(EVS_Gizmos_Clocks)) - EVT_EXEC(N(EVS_Gizmos_RockingHorses)) - EVT_RETURN - EVT_END + Exec(N(EVS_Gizmos_Wheels)) + Exec(N(EVS_Gizmos_Shutters)) + Exec(N(EVS_Gizmos_Clocks)) + Exec(N(EVS_Gizmos_RockingHorses)) + Return + End }; diff --git a/src/world/area_omo/omo_01/omo_01_4_npc.c b/src/world/area_omo/omo_01/omo_01_4_npc.c index f51dc2094f1..44651e66ced 100644 --- a/src/world/area_omo/omo_01/omo_01_4_npc.c +++ b/src/world/area_omo/omo_01/omo_01_4_npc.c @@ -3,78 +3,78 @@ #include "world/common/enemy/ShyGuy_AvoidPlayer.inc.c" EvtScript N(EVS_ShyGuy_CarryItem) = { - EVT_SET(LVarA, LVar0) // npcID - EVT_SET(LVarB, LVar1) // itemID - EVT_SET(LVarD, LVar2) // item type - EVT_SET(LVarE, LVar3) // pickup flag - EVT_CALL(SetNpcVar, LVarA, 10, 0) - EVT_CALL(GetNpcPos, LVarA, LVar2, LVar3, LVar4) - EVT_ADD(LVar3, 26) - EVT_CALL(MakeItemEntity, LVarB, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVar9, LVar0) - EVT_WAIT(1) - EVT_LABEL(10) - EVT_CALL(GetNpcPos, LVarA, LVar2, LVar3, LVar4) - EVT_ADD(LVar3, 26) - EVT_SUB(LVar4, 1) - EVT_CALL(SetItemPos, LVar9, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_CALL(GetNpcVar, LVarA, 10, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(RemoveItemEntity, LVar9) - EVT_SWITCH(LVarD) - EVT_CASE_EQ(ITEM_TYPE_CONSUMABLE) - EVT_CALL(MakeItemEntity, LVarB, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS, LVarE) - EVT_CASE_EQ(ITEM_TYPE_KEY) - EVT_CALL(DropItemEntity, LVarB, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, LVarE) - EVT_CASE_EQ(ITEM_TYPE_BADGE) - EVT_CALL(DropItemEntity, LVarB, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_FALL, LVarE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Set(LVarA, LVar0) // npcID + Set(LVarB, LVar1) // itemID + Set(LVarD, LVar2) // item type + Set(LVarE, LVar3) // pickup flag + Call(SetNpcVar, LVarA, 10, 0) + Call(GetNpcPos, LVarA, LVar2, LVar3, LVar4) + Add(LVar3, 26) + Call(MakeItemEntity, LVarB, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVar9, LVar0) + Wait(1) + Label(10) + Call(GetNpcPos, LVarA, LVar2, LVar3, LVar4) + Add(LVar3, 26) + Sub(LVar4, 1) + Call(SetItemPos, LVar9, LVar2, LVar3, LVar4) + Wait(1) + Call(GetNpcVar, LVarA, 10, LVar0) + IfEq(LVar0, 0) + Goto(10) + EndIf + Call(RemoveItemEntity, LVar9) + Switch(LVarD) + CaseEq(ITEM_TYPE_CONSUMABLE) + Call(MakeItemEntity, LVarB, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS, LVarE) + CaseEq(ITEM_TYPE_KEY) + Call(DropItemEntity, LVarB, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, LVarE) + CaseEq(ITEM_TYPE_BADGE) + Call(DropItemEntity, LVarB, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_FALL, LVarE) + EndSwitch + Return + End }; EvtScript N(EVS_NpcDefeat_ShyGuy) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_SET(GF_OMO09_Defeated_CalculatorThief, TRUE) - EVT_CALL(SetSelfVar, 10, 1) - EVT_WAIT(2) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(OnPlayerFled, 0) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_CALL(SetSelfVar, 10, 1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Set(GF_OMO09_Defeated_CalculatorThief, TRUE) + Call(SetSelfVar, 10, 1) + Wait(2) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_FLED) + Call(OnPlayerFled, 0) + CaseEq(OUTCOME_ENEMY_FLED) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) + Call(RemoveNpc, NPC_SELF) + Call(SetSelfVar, 10, 1) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_ShyGuy) = { - EVT_IF_EQ(GF_OMO09_Defeated_CalculatorThief, TRUE) - EVT_IF_EQ(GF_OMO01_Item_Calculator, FALSE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_END_IF - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_ShyGuy))) - EVT_SET(LVar0, NPC_ShyGuy_01) - EVT_IF_EQ(GF_OMO01_Item_Calculator, FALSE) - EVT_SET(LVar1, ITEM_CALCULATOR) - EVT_SET(LVar2, ITEM_TYPE_KEY) - EVT_SET_CONST(LVar3, GF_OMO01_Item_Calculator) - EVT_ELSE - EVT_SET(LVar1, ITEM_MAPLE_SYRUP) - EVT_SET(LVar2, ITEM_TYPE_CONSUMABLE) - EVT_SET(LVar3, 0) - EVT_END_IF - EVT_EXEC(N(EVS_ShyGuy_CarryItem)) - EVT_RETURN - EVT_END + IfEq(GF_OMO09_Defeated_CalculatorThief, TRUE) + IfEq(GF_OMO01_Item_Calculator, FALSE) + Call(RemoveNpc, NPC_SELF) + EndIf + EndIf + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_ShyGuy))) + Set(LVar0, NPC_ShyGuy_01) + IfEq(GF_OMO01_Item_Calculator, FALSE) + Set(LVar1, ITEM_CALCULATOR) + Set(LVar2, ITEM_TYPE_KEY) + SetConst(LVar3, GF_OMO01_Item_Calculator) + Else + Set(LVar1, ITEM_MAPLE_SYRUP) + Set(LVar2, ITEM_TYPE_CONSUMABLE) + Set(LVar3, 0) + EndIf + Exec(N(EVS_ShyGuy_CarryItem)) + Return + End }; NpcData N(NpcData_ShyGuy_01) = { @@ -102,14 +102,14 @@ NpcData N(NpcData_ShyGuy_01) = { }; EvtScript N(EVS_NpcInit_ShyGuy_02) = { - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_ShyGuy))) - EVT_SET(LVar0, NPC_ShyGuy_02) - EVT_SET(LVar1, ITEM_CAKE_MIX) - EVT_SET(LVar2, ITEM_TYPE_CONSUMABLE) - EVT_SET(LVar3, 0) - EVT_EXEC(N(EVS_ShyGuy_CarryItem)) - EVT_RETURN - EVT_END + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_ShyGuy))) + Set(LVar0, NPC_ShyGuy_02) + Set(LVar1, ITEM_CAKE_MIX) + Set(LVar2, ITEM_TYPE_CONSUMABLE) + Set(LVar3, 0) + Exec(N(EVS_ShyGuy_CarryItem)) + Return + End }; NpcData N(NpcData_ShyGuy_02) = { @@ -137,14 +137,14 @@ NpcData N(NpcData_ShyGuy_02) = { }; EvtScript N(EVS_NpcInit_ShyGuy_03) = { - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_ShyGuy))) - EVT_SET(LVar0, NPC_ShyGuy_03) - EVT_SET(LVar1, ITEM_CAKE_MIX) - EVT_SET(LVar2, ITEM_TYPE_CONSUMABLE) - EVT_SET(LVar3, 0) - EVT_EXEC(N(EVS_ShyGuy_CarryItem)) - EVT_RETURN - EVT_END + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_ShyGuy))) + Set(LVar0, NPC_ShyGuy_03) + Set(LVar1, ITEM_CAKE_MIX) + Set(LVar2, ITEM_TYPE_CONSUMABLE) + Set(LVar3, 0) + Exec(N(EVS_ShyGuy_CarryItem)) + Return + End }; NpcData N(NpcData_ShyGuy_03) = { @@ -172,14 +172,14 @@ NpcData N(NpcData_ShyGuy_03) = { }; EvtScript N(EVS_NpcInit_ShyGuy_04) = { - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_ShyGuy))) - EVT_SET(LVar0, NPC_ShyGuy_04) - EVT_SET(LVar1, ITEM_MUSHROOM) - EVT_SET(LVar2, ITEM_TYPE_CONSUMABLE) - EVT_SET(LVar3, 0) - EVT_EXEC(N(EVS_ShyGuy_CarryItem)) - EVT_RETURN - EVT_END + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_ShyGuy))) + Set(LVar0, NPC_ShyGuy_04) + Set(LVar1, ITEM_MUSHROOM) + Set(LVar2, ITEM_TYPE_CONSUMABLE) + Set(LVar3, 0) + Exec(N(EVS_ShyGuy_CarryItem)) + Return + End }; NpcData N(NpcData_ShyGuy_04) = { @@ -207,14 +207,14 @@ NpcData N(NpcData_ShyGuy_04) = { }; EvtScript N(EVS_NpcInit_ShyGuy_05) = { - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_ShyGuy))) - EVT_SET(LVar0, NPC_ShyGuy_05) - EVT_SET(LVar1, ITEM_FIRE_FLOWER) - EVT_SET(LVar2, ITEM_TYPE_CONSUMABLE) - EVT_SET(LVar3, 0) - EVT_EXEC(N(EVS_ShyGuy_CarryItem)) - EVT_RETURN - EVT_END + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_ShyGuy))) + Set(LVar0, NPC_ShyGuy_05) + Set(LVar1, ITEM_FIRE_FLOWER) + Set(LVar2, ITEM_TYPE_CONSUMABLE) + Set(LVar3, 0) + Exec(N(EVS_ShyGuy_CarryItem)) + Return + End }; NpcData N(NpcData_ShyGuy_05) = { diff --git a/src/world/area_omo/omo_01/omo_01_5_entity.c b/src/world/area_omo/omo_01/omo_01_5_entity.c index 18e543e242a..496b9b1410c 100644 --- a/src/world/area_omo/omo_01/omo_01_5_entity.c +++ b/src/world/area_omo/omo_01/omo_01_5_entity.c @@ -2,15 +2,15 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_OMO09_Defeated_CalculatorThief, TRUE) - EVT_IF_EQ(GF_OMO01_Item_Calculator, FALSE) - EVT_CALL(MakeItemEntity, ITEM_CALCULATOR, -93, 0, 35, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO01_Item_Calculator) - EVT_END_IF - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), -80, 60, -235, 0, ITEM_MYSTERY, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OMO01_HiddenItem_Mystery) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), -30, 60, -235, 0, ITEM_FRIGHT_JAR, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OMO01_HiddenItem_FrightJar) - EVT_RETURN - EVT_END + IfEq(GF_OMO09_Defeated_CalculatorThief, TRUE) + IfEq(GF_OMO01_Item_Calculator, FALSE) + Call(MakeItemEntity, ITEM_CALCULATOR, -93, 0, 35, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO01_Item_Calculator) + EndIf + EndIf + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), -80, 60, -235, 0, ITEM_MYSTERY, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OMO01_HiddenItem_Mystery) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), -30, 60, -235, 0, ITEM_FRIGHT_JAR, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OMO01_HiddenItem_FrightJar) + Return + End }; diff --git a/src/world/area_omo/omo_02/omo_02_1_music.c b/src/world/area_omo/omo_02/omo_02_1_music.c index a250912706e..4a9dc795944 100644 --- a/src/world/area_omo/omo_02/omo_02_1_music.c +++ b/src/world/area_omo/omo_02/omo_02_1_music.c @@ -1,7 +1,7 @@ #include "omo_02.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) + Return + End }; diff --git a/src/world/area_omo/omo_02/omo_02_2_main.c b/src/world/area_omo/omo_02/omo_02_2_main.c index 8a2ce5600f7..6d01634ed8d 100644 --- a/src/world/area_omo/omo_02/omo_02_2_main.c +++ b/src/world/area_omo/omo_02/omo_02_2_main.c @@ -4,24 +4,24 @@ EvtScript N(EVS_ExitWalk_omo_10_1) = EVT_EXIT_WALK(60, omo_02_ENTRY_0, "omo_10", EvtScript N(EVS_ExitWalk_omo_14_0) = EVT_EXIT_WALK(60, omo_02_ENTRY_1, "omo_14", omo_14_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_10_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_14_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_omo_10_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_omo_14_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupGizmos)) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_EXEC_WAIT(N(EVS_SetupBarricade)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupGizmos)) + ExecWait(N(EVS_SetupMusic)) + ExecWait(N(EVS_SetupBarricade)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; diff --git a/src/world/area_omo/omo_02/omo_02_3_entity.c b/src/world/area_omo/omo_02/omo_02_3_entity.c index 791c4710f1a..01247a5d27a 100644 --- a/src/world/area_omo/omo_02/omo_02_3_entity.c +++ b/src/world/area_omo/omo_02/omo_02_3_entity.c @@ -5,49 +5,49 @@ #include "world/common/DisableCameraFollowPlayerY.inc.c" EvtScript N(EVS_TetherCamToPlayer) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_StarBoxLaunch_Impl) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_JUMP) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_LOOP(4) - EVT_ADD(LVar1, 10) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(N(EnableCameraFollowPlayerY)) - EVT_EXEC_GET_TID(N(EVS_TetherCamToPlayer), LVarA) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7)) - EVT_CALL(PlayerJump, -290, 85, -78, 40) - EVT_KILL_THREAD(LVarA) - EVT_CALL(N(DisableCameraFollowPlayerY)) - EVT_WAIT(3) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(N(DisableCameraFollowPlayerY)) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_JUMP) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Loop(4) + Add(LVar1, 10) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(N(EnableCameraFollowPlayerY)) + ExecGetTID(N(EVS_TetherCamToPlayer), LVarA) + Call(SetPlayerJumpscale, Float(0.7)) + Call(PlayerJump, -290, 85, -78, 40) + KillThread(LVarA) + Call(N(DisableCameraFollowPlayerY)) + Wait(3) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(N(DisableCameraFollowPlayerY)) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 300, 60, -100, 0, ITEM_SLEEPY_SHEEP, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OMO02_ItemBlock_SleepySheep) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), -200, 60, -78, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OMO02_HiddenItem_Coin) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), -80, 89, -78, 0, MAKE_ENTITY_END) - EVT_CALL(MakeItemEntity, ITEM_SHOOTING_STAR, -80, 114, -78, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_OMO02_Item_ShootingStar) - EVT_CALL(MakeEntity, EVT_PTR(Entity_StarBoxLauncher), -358, 0, -82, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_StarBoxLaunch_Impl))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_YellowBlock), 300, 60, -100, 0, ITEM_SLEEPY_SHEEP, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OMO02_ItemBlock_SleepySheep) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), -200, 60, -78, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OMO02_HiddenItem_Coin) + Call(MakeEntity, Ref(Entity_BrickBlock), -80, 89, -78, 0, MAKE_ENTITY_END) + Call(MakeItemEntity, ITEM_SHOOTING_STAR, -80, 114, -78, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_OMO02_Item_ShootingStar) + Call(MakeEntity, Ref(Entity_StarBoxLauncher), -358, 0, -82, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_StarBoxLaunch_Impl))) + Return + End }; diff --git a/src/world/area_omo/omo_02/omo_02_4_gizmos.c b/src/world/area_omo/omo_02/omo_02_4_gizmos.c index a6735ee3acc..084c603a0e4 100644 --- a/src/world/area_omo/omo_02/omo_02_4_gizmos.c +++ b/src/world/area_omo/omo_02/omo_02_4_gizmos.c @@ -1,73 +1,73 @@ #include "omo_02.h" EvtScript N(EVS_Gizmos_Wheels) = { - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, -360, 100, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_ha1, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha2, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha3, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha4, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha5, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha6, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha7, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(MakeLerp, 0, -360, 100, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_ha1, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha2, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha3, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha4, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha5, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha6, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha7, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_Gizmos_Shutters) = { - EVT_LABEL(0) - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, 160, 60, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_m2_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m2_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m3_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m3_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m4_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m4_2, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(MakeLerp, 160, 0, 60, EASING_COS_IN_OUT) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_m2_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m2_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m3_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m3_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m4_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m4_2, LVar0, 0, 1, 0) - EVT_WAIT(2) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Label(0) + Call(MakeLerp, 0, 160, 60, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_m2_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m2_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m3_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m3_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m4_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m4_2, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(MakeLerp, 160, 0, 60, EASING_COS_IN_OUT) + Label(2) + Call(UpdateLerp) + Call(RotateModel, MODEL_m2_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m2_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m3_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m3_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m4_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m4_2, LVar0, 0, 1, 0) + Wait(2) + IfEq(LVar1, 1) + Goto(2) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_Gizmos_Empty1) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_Gizmos_Empty2) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_Gizmos_Unused) = { - EVT_RETURN - EVT_END + Return + End }; s32 N(RockingHorseModels)[] = { @@ -79,12 +79,12 @@ s32 N(RockingHorseModels)[] = { #import "../common/RockingHorse.inc.c" EvtScript N(EVS_SetupGizmos) = { - EVT_EXEC(N(EVS_Gizmos_Wheels)) - EVT_EXEC(N(EVS_Gizmos_Shutters)) - EVT_EXEC(N(EVS_Gizmos_Empty1)) - EVT_EXEC(N(EVS_Gizmos_Empty2)) - EVT_EXEC(N(EVS_Gizmos_RockingHorses)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Exec(N(EVS_Gizmos_Wheels)) + Exec(N(EVS_Gizmos_Shutters)) + Exec(N(EVS_Gizmos_Empty1)) + Exec(N(EVS_Gizmos_Empty2)) + Exec(N(EVS_Gizmos_RockingHorses)) + Wait(1) + Return + End }; diff --git a/src/world/area_omo/omo_02/omo_02_5_barricade.c b/src/world/area_omo/omo_02/omo_02_5_barricade.c index 2656c10318e..ee951a4ec01 100644 --- a/src/world/area_omo/omo_02/omo_02_5_barricade.c +++ b/src/world/area_omo/omo_02/omo_02_5_barricade.c @@ -184,280 +184,280 @@ BombTrigger N(BombPos_Barricade) = { }; EvtScript N(EVS_Scene_BreakBarricade) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(EnableGroup, MODEL_hibi, FALSE) - EVT_THREAD - EVT_CALL(N(AnimateBarricadeParts)) - EVT_LOOP(10) - EVT_USE_BUF(EVT_PTR(N(BarricadeModels))) - EVT_LOOP(ARRAY_COUNT(N(BarricadeModels))) - EVT_BUF_READ1(LVar0) - EVT_CALL(EnableModel, LVar0, TRUE) - EVT_END_LOOP - EVT_WAIT(2) - EVT_USE_BUF(EVT_PTR(N(BarricadeModels))) - EVT_LOOP(ARRAY_COUNT(N(BarricadeModels))) - EVT_BUF_READ1(LVar0) - EVT_CALL(EnableModel, LVar0, FALSE) - EVT_END_LOOP - EVT_WAIT(2) - EVT_END_LOOP - EVT_USE_BUF(EVT_PTR(N(BarricadeColliders))) - EVT_LOOP(ARRAY_COUNT(N(BarricadeColliders))) - EVT_BUF_READ1(LVar0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVar0, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(30) - EVT_KILL_THREAD(MV_RestrictCamScript) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_WAIT(1) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -380, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -380, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 0, -10, 20, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_t1, LVar0, EVT_FLOAT(0.518), 0, EVT_FLOAT(1.931)) - EVT_CALL(UpdateColliderTransform, COLLIDER_t1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, -10, 7, 40, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_t1, LVar0, EVT_FLOAT(0.518), 0, EVT_FLOAT(1.931)) - EVT_CALL(UpdateColliderTransform, COLLIDER_t1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 7, -90, 30, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_t1, LVar0, EVT_FLOAT(0.518), 0, EVT_FLOAT(1.931)) - EVT_CALL(UpdateColliderTransform, COLLIDER_t1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtModel, MODEL_t1, SOUND_OMO_BARRICADE_DROP, SOUND_SPACE_DEFAULT) - EVT_CALL(GetModelCenter, MODEL_t1) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, LVar0, LVar1, LVar2, 0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(MakeLerp, 0, -10, 20, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_t2_1, LVar0, EVT_FLOAT(0.518), 0, EVT_FLOAT(1.931)) - EVT_CALL(UpdateColliderTransform, COLLIDER_t2_1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, -10, 7, 40, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_t2_1, LVar0, EVT_FLOAT(0.518), 0, EVT_FLOAT(1.931)) - EVT_CALL(UpdateColliderTransform, COLLIDER_t2_1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 7, -90, 30, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_t2_1, LVar0, EVT_FLOAT(0.518), 0, EVT_FLOAT(1.931)) - EVT_CALL(UpdateColliderTransform, COLLIDER_t2_1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtModel, MODEL_t2_1, SOUND_OMO_BARRICADE_DROP, SOUND_SPACE_DEFAULT) - EVT_CALL(GetModelCenter, MODEL_t2_1) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, LVar0, LVar1, LVar2, 0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_SET(LVar0, 1) - EVT_LOOP(10) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetNpcJumpscale, LVar0, EVT_FLOAT(1.5)) - EVT_CALL(GetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_IF_EQ(LVar2, 0) - EVT_CALL(NpcJump0, LVar0, LVar1, 0, LVar3, 20) - EVT_END_IF - EVT_END_THREAD - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_CALL(MakeLerp, 0, -10, 20, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_t3_2, LVar0, EVT_FLOAT(0.518), 0, EVT_FLOAT(1.931)) - EVT_CALL(UpdateColliderTransform, COLLIDER_t3_2) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, -10, 7, 40, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_t3_2, LVar0, EVT_FLOAT(0.518), 0, EVT_FLOAT(1.931)) - EVT_CALL(UpdateColliderTransform, COLLIDER_t3_2) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 7, -90, 30, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_t3_2, LVar0, EVT_FLOAT(0.518), 0, EVT_FLOAT(1.931)) - EVT_CALL(UpdateColliderTransform, COLLIDER_t3_2) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtModel, MODEL_t3_2, SOUND_OMO_BARRICADE_DROP, SOUND_SPACE_DEFAULT) - EVT_CALL(GetModelCenter, MODEL_t3_2) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, LVar0, LVar1, LVar2, 0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_WAIT(35) - EVT_CALL(PlaySound, SOUND_LOOP_SHY_GUY_CROWD_2) - EVT_END_THREAD - EVT_SET(LVar0, 1) - EVT_SET(LVar5, 1) - EVT_LOOP(10) - EVT_THREAD - EVT_CALL(SetNpcJumpscale, LVar0, EVT_FLOAT(1.5)) - EVT_CALL(GetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(RandInt, 10, LVar4) - EVT_ADD(LVar4, 10) - EVT_IF_EQ(LVar2, 0) - EVT_CALL(NpcJump0, LVar0, LVar1, 0, LVar3, LVar4) - EVT_END_IF - EVT_CALL(SetNpcVar, LVar0, 0, CROWD_STATE_TURN_AROUND) - EVT_WAIT(LVar5) - EVT_CALL(SetNpcVar, LVar0, 0, CROWD_STATE_RUN_AWAY) - EVT_END_THREAD - EVT_ADD(LVar0, 1) - EVT_ADD(LVar5, 12) - EVT_END_LOOP - EVT_WAIT(60) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -125, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -125, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(165) - EVT_CALL(PlaySound, SOUND_LRAW_SHY_GUY_CROWD_2 | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_CALL(StopTrackingSoundPos, SOUND_LRAW_SHY_GUY_CROWD_2) - EVT_CALL(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Red_Anim04) - EVT_CALL(SetNpcPos, NPC_ShyGuy_01, -285, 0, 35) - EVT_CALL(SetNpcSpeed, NPC_ShyGuy_01, EVT_FLOAT(8.0)) - EVT_CALL(NpcMoveTo, NPC_ShyGuy_01, -135, 23, 0) - EVT_CALL(NpcMoveTo, NPC_ShyGuy_01, -110, -13, 0) - EVT_CALL(SetNpcJumpscale, NPC_ShyGuy_01, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcRotationPivot, NPC_ShyGuy_01, 10) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(10) - EVT_ADD(LVar0, -9) - EVT_CALL(SetNpcRotation, NPC_ShyGuy_01, 0, 0, LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetNpcRotation, NPC_ShyGuy_01, 0, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Red_Anim10) - EVT_END_THREAD - EVT_CALL(NpcJump0, NPC_ShyGuy_01, -45, 0, -8, 10) - EVT_CALL(PlaySoundAtNpc, NPC_ShyGuy_01, SOUND_ACTOR_TRIP, SOUND_SPACE_DEFAULT) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0)) - EVT_WAIT(50) - EVT_LOOP(2) - EVT_CALL(PlaySoundAtNpc, LVar9, SOUND_ACTOR_TWITCH, SOUND_SPACE_DEFAULT) - EVT_WAIT(7) - EVT_END_LOOP - EVT_CALL(SetNpcRotationPivot, NPC_ShyGuy_01, 0) - EVT_CALL(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Red_Anim01) - EVT_CALL(NpcJump0, NPC_ShyGuy_01, -50, 0, -8, 10) - EVT_CALL(InterpNpcYaw, NPC_ShyGuy_01, 270, 0) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtNpc, NPC_ShyGuy_01, SOUND_SHY_GUY_FLEE_LOOP, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Red_Anim04) - EVT_CALL(SetNpcSpeed, NPC_ShyGuy_01, EVT_FLOAT(6.0)) - EVT_CALL(NpcMoveTo, NPC_ShyGuy_01, 100, 50, 0) - EVT_CALL(RemoveNpc, NPC_ShyGuy_01) - EVT_WAIT(30) - EVT_CALL(StopSound, SOUND_SHY_GUY_FLEE_LOOP) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_SET(GF_OMO02_BombedWall, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(EnableGroup, MODEL_hibi, FALSE) + Thread + Call(N(AnimateBarricadeParts)) + Loop(10) + UseBuf(Ref(N(BarricadeModels))) + Loop(ARRAY_COUNT(N(BarricadeModels))) + BufRead1(LVar0) + Call(EnableModel, LVar0, TRUE) + EndLoop + Wait(2) + UseBuf(Ref(N(BarricadeModels))) + Loop(ARRAY_COUNT(N(BarricadeModels))) + BufRead1(LVar0) + Call(EnableModel, LVar0, FALSE) + EndLoop + Wait(2) + EndLoop + UseBuf(Ref(N(BarricadeColliders))) + Loop(ARRAY_COUNT(N(BarricadeColliders))) + BufRead1(LVar0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVar0, COLLIDER_FLAGS_UPPER_MASK) + EndLoop + EndThread + Thread + Wait(30) + KillThread(MV_RestrictCamScript) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Wait(1) + Call(UseSettingsFrom, CAM_DEFAULT, -380, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, -380, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndThread + Thread + Call(MakeLerp, 0, -10, 20, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_t1, LVar0, Float(0.518), 0, Float(1.931)) + Call(UpdateColliderTransform, COLLIDER_t1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, -10, 7, 40, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_t1, LVar0, Float(0.518), 0, Float(1.931)) + Call(UpdateColliderTransform, COLLIDER_t1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 7, -90, 30, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_t1, LVar0, Float(0.518), 0, Float(1.931)) + Call(UpdateColliderTransform, COLLIDER_t1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtModel, MODEL_t1, SOUND_OMO_BARRICADE_DROP, SOUND_SPACE_DEFAULT) + Call(GetModelCenter, MODEL_t1) + PlayEffect(EFFECT_LANDING_DUST, 4, LVar0, LVar1, LVar2, 0) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.0)) + EndThread + Thread + Wait(5) + Call(MakeLerp, 0, -10, 20, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_t2_1, LVar0, Float(0.518), 0, Float(1.931)) + Call(UpdateColliderTransform, COLLIDER_t2_1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, -10, 7, 40, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_t2_1, LVar0, Float(0.518), 0, Float(1.931)) + Call(UpdateColliderTransform, COLLIDER_t2_1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 7, -90, 30, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_t2_1, LVar0, Float(0.518), 0, Float(1.931)) + Call(UpdateColliderTransform, COLLIDER_t2_1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtModel, MODEL_t2_1, SOUND_OMO_BARRICADE_DROP, SOUND_SPACE_DEFAULT) + Call(GetModelCenter, MODEL_t2_1) + PlayEffect(EFFECT_LANDING_DUST, 4, LVar0, LVar1, LVar2, 0) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.0)) + EndThread + Set(LVar0, 1) + Loop(10) + Thread + Wait(10) + Call(SetNpcJumpscale, LVar0, Float(1.5)) + Call(GetNpcPos, LVar0, LVar1, LVar2, LVar3) + IfEq(LVar2, 0) + Call(NpcJump0, LVar0, LVar1, 0, LVar3, 20) + EndIf + EndThread + Add(LVar0, 1) + EndLoop + Call(MakeLerp, 0, -10, 20, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_t3_2, LVar0, Float(0.518), 0, Float(1.931)) + Call(UpdateColliderTransform, COLLIDER_t3_2) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, -10, 7, 40, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_t3_2, LVar0, Float(0.518), 0, Float(1.931)) + Call(UpdateColliderTransform, COLLIDER_t3_2) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 7, -90, 30, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_t3_2, LVar0, Float(0.518), 0, Float(1.931)) + Call(UpdateColliderTransform, COLLIDER_t3_2) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtModel, MODEL_t3_2, SOUND_OMO_BARRICADE_DROP, SOUND_SPACE_DEFAULT) + Call(GetModelCenter, MODEL_t3_2) + PlayEffect(EFFECT_LANDING_DUST, 4, LVar0, LVar1, LVar2, 0) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.0)) + Thread + Wait(35) + Call(PlaySound, SOUND_LOOP_SHY_GUY_CROWD_2) + EndThread + Set(LVar0, 1) + Set(LVar5, 1) + Loop(10) + Thread + Call(SetNpcJumpscale, LVar0, Float(1.5)) + Call(GetNpcPos, LVar0, LVar1, LVar2, LVar3) + Call(RandInt, 10, LVar4) + Add(LVar4, 10) + IfEq(LVar2, 0) + Call(NpcJump0, LVar0, LVar1, 0, LVar3, LVar4) + EndIf + Call(SetNpcVar, LVar0, 0, CROWD_STATE_TURN_AROUND) + Wait(LVar5) + Call(SetNpcVar, LVar0, 0, CROWD_STATE_RUN_AWAY) + EndThread + Add(LVar0, 1) + Add(LVar5, 12) + EndLoop + Wait(60) + Call(UseSettingsFrom, CAM_DEFAULT, -125, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, -125, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(165) + Call(PlaySound, SOUND_LRAW_SHY_GUY_CROWD_2 | SOUND_ID_TRIGGER_CHANGE_SOUND) + Call(StopTrackingSoundPos, SOUND_LRAW_SHY_GUY_CROWD_2) + Call(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Red_Anim04) + Call(SetNpcPos, NPC_ShyGuy_01, -285, 0, 35) + Call(SetNpcSpeed, NPC_ShyGuy_01, Float(8.0)) + Call(NpcMoveTo, NPC_ShyGuy_01, -135, 23, 0) + Call(NpcMoveTo, NPC_ShyGuy_01, -110, -13, 0) + Call(SetNpcJumpscale, NPC_ShyGuy_01, Float(1.0)) + Call(SetNpcRotationPivot, NPC_ShyGuy_01, 10) + Thread + Set(LVar0, 0) + Loop(10) + Add(LVar0, -9) + Call(SetNpcRotation, NPC_ShyGuy_01, 0, 0, LVar0) + Wait(1) + EndLoop + EndThread + Thread + Wait(10) + Call(SetNpcRotation, NPC_ShyGuy_01, 0, 0, 0) + Call(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Red_Anim10) + EndThread + Call(NpcJump0, NPC_ShyGuy_01, -45, 0, -8, 10) + Call(PlaySoundAtNpc, NPC_ShyGuy_01, SOUND_ACTOR_TRIP, SOUND_SPACE_DEFAULT) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.0)) + Wait(50) + Loop(2) + Call(PlaySoundAtNpc, LVar9, SOUND_ACTOR_TWITCH, SOUND_SPACE_DEFAULT) + Wait(7) + EndLoop + Call(SetNpcRotationPivot, NPC_ShyGuy_01, 0) + Call(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Red_Anim01) + Call(NpcJump0, NPC_ShyGuy_01, -50, 0, -8, 10) + Call(InterpNpcYaw, NPC_ShyGuy_01, 270, 0) + Wait(20) + Call(PlaySoundAtNpc, NPC_ShyGuy_01, SOUND_SHY_GUY_FLEE_LOOP, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Red_Anim04) + Call(SetNpcSpeed, NPC_ShyGuy_01, Float(6.0)) + Call(NpcMoveTo, NPC_ShyGuy_01, 100, 50, 0) + Call(RemoveNpc, NPC_ShyGuy_01) + Wait(30) + Call(StopSound, SOUND_SHY_GUY_FLEE_LOOP) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Set(GF_OMO02_BombedWall, TRUE) + Call(DisablePlayerInput, FALSE) + Unbind + Return + End }; EvtScript N(EVS_SetupBarricade) = { - EVT_CALL(ParentColliderToModel, COLLIDER_t1, MODEL_t1) - EVT_CALL(ParentColliderToModel, COLLIDER_t2, MODEL_t2) - EVT_CALL(ParentColliderToModel, COLLIDER_t3, MODEL_t3) - EVT_CALL(ParentColliderToModel, COLLIDER_t4, MODEL_t4) - EVT_CALL(ParentColliderToModel, COLLIDER_t5, MODEL_t5) - EVT_CALL(ParentColliderToModel, COLLIDER_t2_1, MODEL_t2_1) - EVT_CALL(ParentColliderToModel, COLLIDER_t2_2, MODEL_t2_2) - EVT_CALL(ParentColliderToModel, COLLIDER_t2_3, MODEL_t2_3) - EVT_CALL(ParentColliderToModel, COLLIDER_t2_4, MODEL_t2_4) - EVT_CALL(ParentColliderToModel, COLLIDER_t2_5, MODEL_t2_5) - EVT_CALL(ParentColliderToModel, COLLIDER_t3_1, MODEL_t3_1) - EVT_CALL(ParentColliderToModel, COLLIDER_t3_2, MODEL_t3_2) - EVT_CALL(ParentColliderToModel, COLLIDER_t3_3, MODEL_t3_3) - EVT_CALL(ParentColliderToModel, COLLIDER_t3_4, MODEL_t3_4) - EVT_CALL(ParentColliderToModel, COLLIDER_t3_5, MODEL_t3_5) - EVT_IF_EQ(GF_OMO02_BombedWall, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Scene_BreakBarricade)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Barricade)), 1, 0) - EVT_ELSE - EVT_CALL(EnableGroup, MODEL_hibi, FALSE) - EVT_USE_BUF(EVT_PTR(N(BarricadeModels))) - EVT_LOOP(ARRAY_COUNT(N(BarricadeModels))) - EVT_BUF_READ1(LVar0) - EVT_CALL(EnableModel, LVar0, FALSE) - EVT_END_LOOP - EVT_USE_BUF(EVT_PTR(N(BarricadeColliders))) - EVT_LOOP(ARRAY_COUNT(N(BarricadeColliders))) - EVT_BUF_READ1(LVar0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVar0, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_LOOP - EVT_CALL(RotateModel, MODEL_t1, -90, EVT_FLOAT(0.518), 0, EVT_FLOAT(1.931)) - EVT_CALL(RotateModel, MODEL_t2_1, -90, EVT_FLOAT(0.518), 0, EVT_FLOAT(1.931)) - EVT_CALL(RotateModel, MODEL_t3_2, -90, EVT_FLOAT(0.518), 0, EVT_FLOAT(1.931)) - EVT_CALL(UpdateColliderTransform, COLLIDER_t1) - EVT_CALL(UpdateColliderTransform, COLLIDER_t2_1) - EVT_CALL(UpdateColliderTransform, COLLIDER_t3_2) - EVT_END_IF - EVT_RETURN - EVT_END + Call(ParentColliderToModel, COLLIDER_t1, MODEL_t1) + Call(ParentColliderToModel, COLLIDER_t2, MODEL_t2) + Call(ParentColliderToModel, COLLIDER_t3, MODEL_t3) + Call(ParentColliderToModel, COLLIDER_t4, MODEL_t4) + Call(ParentColliderToModel, COLLIDER_t5, MODEL_t5) + Call(ParentColliderToModel, COLLIDER_t2_1, MODEL_t2_1) + Call(ParentColliderToModel, COLLIDER_t2_2, MODEL_t2_2) + Call(ParentColliderToModel, COLLIDER_t2_3, MODEL_t2_3) + Call(ParentColliderToModel, COLLIDER_t2_4, MODEL_t2_4) + Call(ParentColliderToModel, COLLIDER_t2_5, MODEL_t2_5) + Call(ParentColliderToModel, COLLIDER_t3_1, MODEL_t3_1) + Call(ParentColliderToModel, COLLIDER_t3_2, MODEL_t3_2) + Call(ParentColliderToModel, COLLIDER_t3_3, MODEL_t3_3) + Call(ParentColliderToModel, COLLIDER_t3_4, MODEL_t3_4) + Call(ParentColliderToModel, COLLIDER_t3_5, MODEL_t3_5) + IfEq(GF_OMO02_BombedWall, FALSE) + BindTrigger(Ref(N(EVS_Scene_BreakBarricade)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Barricade)), 1, 0) + Else + Call(EnableGroup, MODEL_hibi, FALSE) + UseBuf(Ref(N(BarricadeModels))) + Loop(ARRAY_COUNT(N(BarricadeModels))) + BufRead1(LVar0) + Call(EnableModel, LVar0, FALSE) + EndLoop + UseBuf(Ref(N(BarricadeColliders))) + Loop(ARRAY_COUNT(N(BarricadeColliders))) + BufRead1(LVar0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVar0, COLLIDER_FLAGS_UPPER_MASK) + EndLoop + Call(RotateModel, MODEL_t1, -90, Float(0.518), 0, Float(1.931)) + Call(RotateModel, MODEL_t2_1, -90, Float(0.518), 0, Float(1.931)) + Call(RotateModel, MODEL_t3_2, -90, Float(0.518), 0, Float(1.931)) + Call(UpdateColliderTransform, COLLIDER_t1) + Call(UpdateColliderTransform, COLLIDER_t2_1) + Call(UpdateColliderTransform, COLLIDER_t3_2) + EndIf + Return + End }; diff --git a/src/world/area_omo/omo_02/omo_02_6_npc.c b/src/world/area_omo/omo_02/omo_02_6_npc.c index df545dead86..7f3f3f1f9cf 100644 --- a/src/world/area_omo/omo_02/omo_02_6_npc.c +++ b/src/world/area_omo/omo_02/omo_02_6_npc.c @@ -6,78 +6,78 @@ #include "world/common/enemy/SpyGuy.inc.c" EvtScript N(EVS_RestrictCamFromBarricade) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, 0, LVar2) - EVT_CALL(GetCamPosB, CAM_DEFAULT, LVar0, LVar1) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(-600.0), LVar1) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, 0, LVar2) + Call(GetCamPosB, CAM_DEFAULT, LVar0, LVar1) + Call(SetCamPosB, CAM_DEFAULT, Float(-600.0), LVar1) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_PlayShyGuyRunSounds) = { - EVT_LOOP(0) - EVT_CALL(PlaySoundAtNpc, NPC_ShyGuy_01, SOUND_SEQ_SHY_GUY_STEP, SOUND_SPACE_DEFAULT) - EVT_WAIT(8) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(PlaySoundAtNpc, NPC_ShyGuy_01, SOUND_SEQ_SHY_GUY_STEP, SOUND_SPACE_DEFAULT) + Wait(8) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_ShyGuy_Loner) = { - EVT_IF_EQ(GF_OMO02_ShyGuyFledBehindWall, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 15 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -570, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -570, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_EXEC_GET_TID(N(EVS_PlayShyGuyRunSounds), LVarA) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(6.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_SELF, -575, 0, 0) - EVT_KILL_THREAD(LVarA) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, -460, 0, -20, 40 / DT) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC_GET_TID(N(EVS_RestrictCamFromBarricade), MV_RestrictCamScript) - EVT_SET(GF_OMO02_ShyGuyFledBehindWall, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ELSE - EVT_EXEC_GET_TID(N(EVS_RestrictCamFromBarricade), MV_RestrictCamScript) - EVT_CALL(SetNpcPos, NPC_SELF, -575, 0, -20) - EVT_LABEL(10) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, -760) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_WAIT(20 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, -460, 0, -20, 40 / DT) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_OMO02_ShyGuyFledBehindWall, FALSE) + Call(DisablePlayerInput, TRUE) + Wait(30 * DT) + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 15 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, -570, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, -570, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + ExecGetTID(N(EVS_PlayShyGuyRunSounds), LVarA) + Call(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03) + Call(SetNpcSpeed, NPC_SELF, Float(6.0 / DT)) + Call(NpcMoveTo, NPC_SELF, -575, 0, 0) + KillThread(LVarA) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, -460, 0, -20, 40 / DT) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + ExecGetTID(N(EVS_RestrictCamFromBarricade), MV_RestrictCamScript) + Set(GF_OMO02_ShyGuyFledBehindWall, TRUE) + Call(DisablePlayerInput, FALSE) + Else + ExecGetTID(N(EVS_RestrictCamFromBarricade), MV_RestrictCamScript) + Call(SetNpcPos, NPC_SELF, -575, 0, -20) + Label(10) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, -760) + Wait(1) + Goto(10) + EndIf + Wait(20 * DT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, -460, 0, -20, 40 / DT) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_ShyGuy_Loner) = { - EVT_IF_EQ(GF_OMO02_BombedWall, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, -800, 0, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_ShyGuy_Loner))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_OMO02_BombedWall, FALSE) + Call(SetNpcPos, NPC_SELF, -800, 0, 0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_ShyGuy_Loner))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; s32 N(CrowdScriptA)[] = { @@ -164,93 +164,93 @@ s32* N(CrowdFleeScripts)[] = { }; EvtScript N(EVS_NpcIdle_ShyGuy_Crowd) = { - EVT_CALL(GetNpcPos, NPC_SELF, LVarA, LVarB, LVarC) - EVT_LABEL(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(CROWD_STATE_INIT) - EVT_CALL(RandInt, 2, LVar0) - EVT_ADD(LVar0, 1) - EVT_CALL(SetSelfVar, 0, LVar0) - EVT_CASE_EQ(CROWD_STATE_RANDOM_LOOK) - EVT_LOOP(3) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_WAIT(2) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_WAIT(2) - EVT_CALL(RandInt, 1, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_WAIT(2) - EVT_END_IF - EVT_CALL(RandInt, 10, LVar0) - EVT_ADD(LVar0, 5) - EVT_WAIT(LVar0) - EVT_END_LOOP - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, CROWD_STATE_RANDOM_LOOK) - EVT_CALL(SetSelfVar, 0, CROWD_STATE_RANDOM_DELAY) - EVT_END_IF - EVT_CASE_EQ(CROWD_STATE_RANDOM_JUMP) - EVT_CALL(RandInt, 1, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 15) - EVT_END_IF - EVT_END_IF - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, CROWD_STATE_RANDOM_JUMP) - EVT_CALL(SetSelfVar, 0, CROWD_STATE_RANDOM_DELAY) - EVT_END_IF - EVT_CASE_EQ(CROWD_STATE_RANDOM_DELAY) - EVT_CALL(RandInt, 30, LVar0) - EVT_ADD(LVar0, 10) - EVT_WAIT(LVar0) - EVT_CALL(RandInt, 1, LVar0) - EVT_ADD(LVar0, 1) - EVT_CALL(GetSelfVar, 0, LVar1) - EVT_IF_EQ(LVar1, CROWD_STATE_RANDOM_DELAY) - EVT_CALL(SetSelfVar, 0, LVar0) - EVT_END_IF - EVT_CASE_EQ(CROWD_STATE_TURN_AROUND) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_WAIT(2) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_WAIT(2) - EVT_CASE_EQ(CROWD_STATE_RUN_AWAY) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_WORLD_COLLISION, 1) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_USE_BUF(EVT_PTR(N(CrowdFleeScripts))) - EVT_LOOP(LVar0) - EVT_BUF_READ1(LVar1) - EVT_END_LOOP - EVT_USE_BUF(LVar1) - EVT_LABEL(10) - EVT_BUF_READ1(LVar2) // get cmd - EVT_SWITCH(LVar2) - EVT_CASE_EQ(op_CS_MOVE) - EVT_BUF_READ2(LVar3, LVar4) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim04) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(10.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar3, LVar4, 0) - EVT_CASE_EQ(op_CS_JUMP) - EVT_BUF_READ3(LVar3, LVar4, LVar5) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_SELF, LVar3, LVar4, LVar5, 10) - EVT_END_SWITCH - EVT_IF_NE(LVar2, op_CS_END) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(SetSelfVar, 0, CROWD_STATE_DISPOSE) - EVT_CASE_EQ(CROWD_STATE_DISPOSE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_SELF, LVarA, LVarB, LVarC) + Label(0) + Call(GetSelfVar, 0, LVar0) + Switch(LVar0) + CaseEq(CROWD_STATE_INIT) + Call(RandInt, 2, LVar0) + Add(LVar0, 1) + Call(SetSelfVar, 0, LVar0) + CaseEq(CROWD_STATE_RANDOM_LOOK) + Loop(3) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Wait(2) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Wait(2) + Call(RandInt, 1, LVar0) + IfEq(LVar0, 1) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Wait(2) + EndIf + Call(RandInt, 10, LVar0) + Add(LVar0, 5) + Wait(LVar0) + EndLoop + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, CROWD_STATE_RANDOM_LOOK) + Call(SetSelfVar, 0, CROWD_STATE_RANDOM_DELAY) + EndIf + CaseEq(CROWD_STATE_RANDOM_JUMP) + Call(RandInt, 1, LVar0) + IfEq(LVar0, 1) + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + IfEq(LVar1, 0) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 15) + EndIf + EndIf + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, CROWD_STATE_RANDOM_JUMP) + Call(SetSelfVar, 0, CROWD_STATE_RANDOM_DELAY) + EndIf + CaseEq(CROWD_STATE_RANDOM_DELAY) + Call(RandInt, 30, LVar0) + Add(LVar0, 10) + Wait(LVar0) + Call(RandInt, 1, LVar0) + Add(LVar0, 1) + Call(GetSelfVar, 0, LVar1) + IfEq(LVar1, CROWD_STATE_RANDOM_DELAY) + Call(SetSelfVar, 0, LVar0) + EndIf + CaseEq(CROWD_STATE_TURN_AROUND) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Wait(2) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Wait(2) + CaseEq(CROWD_STATE_RUN_AWAY) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_IGNORE_WORLD_COLLISION, 1) + Call(GetSelfNpcID, LVar0) + UseBuf(Ref(N(CrowdFleeScripts))) + Loop(LVar0) + BufRead1(LVar1) + EndLoop + UseBuf(LVar1) + Label(10) + BufRead1(LVar2) // get cmd + Switch(LVar2) + CaseEq(op_CS_MOVE) + BufRead2(LVar3, LVar4) + Call(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim04) + Call(SetNpcSpeed, NPC_SELF, Float(10.0)) + Call(NpcMoveTo, NPC_SELF, LVar3, LVar4, 0) + CaseEq(op_CS_JUMP) + BufRead3(LVar3, LVar4, LVar5) + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Call(NpcJump0, NPC_SELF, LVar3, LVar4, LVar5, 10) + EndSwitch + IfNe(LVar2, op_CS_END) + Goto(10) + EndIf + Call(SetSelfVar, 0, CROWD_STATE_DISPOSE) + CaseEq(CROWD_STATE_DISPOSE) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Wait(1) + Goto(0) + Return + End }; Vec3i N(InitialCrowdPositions)[] = { @@ -267,20 +267,20 @@ Vec3i N(InitialCrowdPositions)[] = { }; EvtScript N(EVS_NpcInit_ShyGuy_Crowd) = { - EVT_IF_EQ(GF_OMO02_BombedWall, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_ShyGuy_Crowd))) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_SUB(LVar0, NPC_ShyGuy_01) - EVT_USE_BUF(EVT_PTR(N(InitialCrowdPositions))) - EVT_LOOP(LVar0) - EVT_BUF_READ3(LVar1, LVar2, LVar3) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_OMO02_BombedWall, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_ShyGuy_Crowd))) + Call(GetSelfNpcID, LVar0) + Sub(LVar0, NPC_ShyGuy_01) + UseBuf(Ref(N(InitialCrowdPositions))) + Loop(LVar0) + BufRead3(LVar1, LVar2, LVar3) + EndLoop + Call(SetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_ShyGuy_Loner) = { diff --git a/src/world/area_omo/omo_03/omo_03_1_music.c b/src/world/area_omo/omo_03/omo_03_1_music.c index 0009a63ea78..be201869e36 100644 --- a/src/world/area_omo/omo_03/omo_03_1_music.c +++ b/src/world/area_omo/omo_03/omo_03_1_music.c @@ -1,20 +1,20 @@ #include "omo_03.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) - EVT_ELSE - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_RANGE(omo_03_ENTRY_2, omo_03_ENTRY_3) - EVT_CALL(SetMusicTrack, 0, SONG_TOYBOX_TRAIN, 0, 8) - EVT_CASE_EQ(omo_03_ENTRY_5) - EVT_CALL(FadeInMusic, 0, SONG_SHY_GUY_TOYBOX, 0, 3000, 0, 127) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Call(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) + Else + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseRange(omo_03_ENTRY_2, omo_03_ENTRY_3) + Call(SetMusicTrack, 0, SONG_TOYBOX_TRAIN, 0, 8) + CaseEq(omo_03_ENTRY_5) + Call(FadeInMusic, 0, SONG_SHY_GUY_TOYBOX, 0, 3000, 0, 127) + CaseDefault + Call(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) + EndSwitch + EndIf + Return + End }; diff --git a/src/world/area_omo/omo_03/omo_03_2_main.c b/src/world/area_omo/omo_03/omo_03_2_main.c index b8de882f4aa..9717c54f13a 100644 --- a/src/world/area_omo/omo_03/omo_03_2_main.c +++ b/src/world/area_omo/omo_03/omo_03_2_main.c @@ -4,76 +4,76 @@ EvtScript N(EVS_ExitWalk_omo_13_1) = EVT_EXIT_WALK(60, omo_03_ENTRY_0, "omo_13", EvtScript N(EVS_ExitWalk_omo_04_0) = EVT_EXIT_WALK(60, omo_03_ENTRY_1, "omo_04", omo_04_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_13_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_omo_13_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_omo_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_SET(AF_OMO_04, FALSE) - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_RANGE(omo_03_ENTRY_0, omo_03_ENTRY_1) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_CASE_EQ(omo_03_ENTRY_4) - EVT_SET(AF_OMO_04, TRUE) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_EXEC(N(EVS_Scene_EnterSpring)) - EVT_CASE_EQ(omo_03_ENTRY_5) - EVT_EXEC(N(EVS_Scene_Epilogue)) - EVT_CASE_EQ(omo_03_ENTRY_6) - EVT_EXEC(N(EVS_Scene_TrainDropped)) - EVT_CASE_DEFAULT - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_WAIT(3) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Set(AF_OMO_04, FALSE) + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseRange(omo_03_ENTRY_0, omo_03_ENTRY_1) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + CaseEq(omo_03_ENTRY_4) + Set(AF_OMO_04, TRUE) + Exec(N(EVS_BindExitTriggers)) + Exec(N(EVS_Scene_EnterSpring)) + CaseEq(omo_03_ENTRY_5) + Exec(N(EVS_Scene_Epilogue)) + CaseEq(omo_03_ENTRY_6) + Exec(N(EVS_Scene_TrainDropped)) + CaseDefault + Exec(N(EVS_BindExitTriggers)) + Wait(3) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH4_ENTERED_THE_TOY_BOX) - EVT_SET(GB_StoryProgress, STORY_CH4_ENTERED_THE_TOY_BOX) - EVT_END_IF - EVT_SET(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() + IfLt(GB_StoryProgress, STORY_CH4_ENTERED_THE_TOY_BOX) + Set(GB_StoryProgress, STORY_CH4_ENTERED_THE_TOY_BOX) + EndIf + Set(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() #if VERSION_PAL - EVT_CALL(GetLanguage, LVar0) - EVT_SWITCH(LVar0) - EVT_IF_GE(LVar0, LANGUAGE_FR) // or LANGUAGE_ES - EVT_SUB(LVar0, LANGUAGE_FR - LANGUAGE_EN) - EVT_END_IF - EVT_CALL(SetModelTexVariant, MODEL_s, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_a, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_t, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_i, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_o, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_n, LVar0) + Call(GetLanguage, LVar0) + Switch(LVar0) + IfGe(LVar0, LANGUAGE_FR) // or LANGUAGE_ES + Sub(LVar0, LANGUAGE_FR - LANGUAGE_EN) + EndIf + Call(SetModelTexVariant, MODEL_s, LVar0) + Call(SetModelTexVariant, MODEL_a, LVar0) + Call(SetModelTexVariant, MODEL_t, LVar0) + Call(SetModelTexVariant, MODEL_i, LVar0) + Call(SetModelTexVariant, MODEL_o, LVar0) + Call(SetModelTexVariant, MODEL_n, LVar0) #endif - EVT_SET(AF_OMO_05, FALSE) - EVT_SET(GF_MAP_ShyGuysToybox, TRUE) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, omo_03_ENTRY_5) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_ELSE - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(EpilogueNPCs))) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupGizmos)) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_EXEC_WAIT(N(EVS_8024746C)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(AF_OMO_05, FALSE) + Set(GF_MAP_ShyGuysToybox, TRUE) + Call(GetEntryID, LVar0) + IfNe(LVar0, omo_03_ENTRY_5) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Else + Call(MakeNpcs, TRUE, Ref(N(EpilogueNPCs))) + EndIf + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupGizmos)) + ExecWait(N(EVS_SetupMusic)) + ExecWait(N(EVS_8024746C)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_omo/omo_03/omo_03_3_gizmos.c b/src/world/area_omo/omo_03/omo_03_3_gizmos.c index a735a05ca4d..c1437723ca4 100644 --- a/src/world/area_omo/omo_03/omo_03_3_gizmos.c +++ b/src/world/area_omo/omo_03/omo_03_3_gizmos.c @@ -3,125 +3,125 @@ #include "effects.h" EvtScript N(EVS_Gizmos_Wheels) = { - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, -360, 100, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_ha1, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha2, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha3, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha4, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(MakeLerp, 0, -360, 100, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_ha1, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha2, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha3, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha4, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_Gizmos_Shutters) = { - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, 160, 60, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(MakeLerp, 160, 0, 60, EASING_COS_IN_OUT) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) - EVT_WAIT(2) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(MakeLerp, 0, 160, 60, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(MakeLerp, 160, 0, 60, EASING_COS_IN_OUT) + Label(2) + Call(UpdateLerp) + Call(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) + Wait(2) + IfEq(LVar1, 1) + Goto(2) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_Gizmos_Clocks) = { - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, -360, 100, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_hari1, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(MakeLerp, 0, -360, 100, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_hari1, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_Scene_PullBlueSwitch) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(MakeLerp, 0, 70, 30, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_bou1, LVar0, 0, 0, 1) - EVT_CALL(UpdateColliderTransform, COLLIDER_bou1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_OMO_TRAIN_TRACK_LEVER, SOUND_SPACE_DEFAULT, -440, 10, 40) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o978, COLLIDER_FLAGS_UPPER_MASK) - EVT_WAIT(20) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -184, 10, -229) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -184, 10, -229) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(517.4)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-180.0), EVT_FLOAT(-322.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(25.0), EVT_FLOAT(-6.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_CALL(PlaySoundAt, SOUND_OMO_FLIP_TRAIN_TRACK, SOUND_SPACE_DEFAULT, -130, 0, -215) - EVT_CALL(MakeLerp, 0, 180, 30, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o933, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o818, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o817, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_OMO_FLIP_TRACK_THUD, SOUND_SPACE_DEFAULT, -130, 0, -215) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(1.0)) - EVT_CALL(GetModelCenter, MODEL_o932) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 3, LVar0, LVar1, LVar2, 0) - EVT_WAIT(30) - EVT_SET(GF_OMO03_BlueSwitchActivated, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Conductor, ANIM_TrainToad_Idle) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(MakeLerp, 0, 70, 30, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_bou1, LVar0, 0, 0, 1) + Call(UpdateColliderTransform, COLLIDER_bou1) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(PlaySoundAt, SOUND_OMO_TRAIN_TRACK_LEVER, SOUND_SPACE_DEFAULT, -440, 10, 40) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o978, COLLIDER_FLAGS_UPPER_MASK) + Wait(20) + Call(UseSettingsFrom, CAM_DEFAULT, -184, 10, -229) + Call(SetPanTarget, CAM_DEFAULT, -184, 10, -229) + Call(SetCamDistance, CAM_DEFAULT, Float(517.4)) + Call(SetCamPosA, CAM_DEFAULT, Float(-180.0), Float(-322.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(25.0), Float(-6.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20) + Call(PlaySoundAt, SOUND_OMO_FLIP_TRAIN_TRACK, SOUND_SPACE_DEFAULT, -130, 0, -215) + Call(MakeLerp, 0, 180, 30, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_o933, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o818, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o817, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(PlaySoundAt, SOUND_OMO_FLIP_TRACK_THUD, SOUND_SPACE_DEFAULT, -130, 0, -215) + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(1.0)) + Call(GetModelCenter, MODEL_o932) + PlayEffect(EFFECT_LANDING_DUST, 3, LVar0, LVar1, LVar2, 0) + Wait(30) + Set(GF_OMO03_BlueSwitchActivated, TRUE) + Call(SetNpcAnimation, NPC_Conductor, ANIM_TrainToad_Idle) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Call(DisablePlayerInput, FALSE) + Unbind + Return + End }; EvtScript N(EVS_SetupGizmos) = { - EVT_EXEC(N(EVS_Gizmos_Wheels)) - EVT_EXEC(N(EVS_Gizmos_Shutters)) - EVT_EXEC(N(EVS_Gizmos_Clocks)) - EVT_CALL(ParentColliderToModel, COLLIDER_bou1, MODEL_bou1) - EVT_IF_EQ(GF_OMO03_BlueSwitchActivated, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Scene_PullBlueSwitch)), TRIGGER_WALL_PRESS_A, COLLIDER_o801, 1, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o978, COLLIDER_FLAGS_UPPER_MASK) - EVT_ELSE - EVT_CALL(RotateModel, MODEL_bou1, 70, 0, 0, 1) - EVT_CALL(UpdateColliderTransform, COLLIDER_bou1) - EVT_CALL(RotateModel, MODEL_o933, 180, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o818, 180, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o817, 180, 1, 0, 0) - EVT_END_IF - EVT_RETURN - EVT_END + Exec(N(EVS_Gizmos_Wheels)) + Exec(N(EVS_Gizmos_Shutters)) + Exec(N(EVS_Gizmos_Clocks)) + Call(ParentColliderToModel, COLLIDER_bou1, MODEL_bou1) + IfEq(GF_OMO03_BlueSwitchActivated, FALSE) + BindTrigger(Ref(N(EVS_Scene_PullBlueSwitch)), TRIGGER_WALL_PRESS_A, COLLIDER_o801, 1, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o978, COLLIDER_FLAGS_UPPER_MASK) + Else + Call(RotateModel, MODEL_bou1, 70, 0, 0, 1) + Call(UpdateColliderTransform, COLLIDER_bou1) + Call(RotateModel, MODEL_o933, 180, 1, 0, 0) + Call(RotateModel, MODEL_o818, 180, 1, 0, 0) + Call(RotateModel, MODEL_o817, 180, 1, 0, 0) + EndIf + Return + End }; diff --git a/src/world/area_omo/omo_03/omo_03_4_entity.c b/src/world/area_omo/omo_03/omo_03_4_entity.c index a3049f54a1f..5bca284a88b 100644 --- a/src/world/area_omo/omo_03/omo_03_4_entity.c +++ b/src/world/area_omo/omo_03/omo_03_4_entity.c @@ -6,87 +6,87 @@ #define NAME_SUFFIX EvtScript N(EVS_TetherCamToPlayer) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_UseSpring_Exit) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_JUMP) - EVT_WAIT(1) - EVT_EXEC_GET_TID(N(EVS_TetherCamToPlayer), LVarA) - EVT_IF_EQ(AF_OMO_04, FALSE) - EVT_CALL(N(EnableCameraFollowPlayerY_Spring)) - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(GotoMap, EVT_PTR("mac_04"), mac_04_ENTRY_2) - EVT_WAIT(100) - EVT_END_THREAD - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7)) - EVT_CALL(PlayerJump, -245, 270, 250, 20) - EVT_ELSE - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(PlayerJump, -95, 0, 250, 25) - EVT_SET(AF_OMO_04, FALSE) - EVT_END_IF - EVT_KILL_THREAD(LVarA) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_JUMP) + Wait(1) + ExecGetTID(N(EVS_TetherCamToPlayer), LVarA) + IfEq(AF_OMO_04, FALSE) + Call(N(EnableCameraFollowPlayerY_Spring)) + Thread + Wait(6) + Call(GotoMap, Ref("mac_04"), mac_04_ENTRY_2) + Wait(100) + EndThread + Call(SetPlayerJumpscale, Float(0.7)) + Call(PlayerJump, -245, 270, 250, 20) + Else + Call(SetPlayerJumpscale, Float(1.0)) + Call(PlayerJump, -95, 0, 250, 25) + Set(AF_OMO_04, FALSE) + EndIf + KillThread(LVarA) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Return + End }; EvtScript N(EVS_Scene_EnterSpring) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_JUMP) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 100) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_EXEC_GET_TID(N(EVS_TetherCamToPlayer), LVarA) - EVT_THREAD - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PARTNER_PARAKARRY) - EVT_CASE_EQ(PARTNER_LAKILESTER) - EVT_CASE_EQ(PARTNER_BOW) - EVT_CASE_EQ(PARTNER_WATT) - EVT_CASE_DEFAULT - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.7)) - EVT_CALL(NpcJump0, NPC_PARTNER, -150, 25, 250, 37) - EVT_CALL(NpcJump0, NPC_PARTNER, -110, 0, 190, 20) - EVT_END_SWITCH - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(EnablePartnerAI) - EVT_END_THREAD - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7)) - EVT_CALL(PlayerJump, -150, 25, 250, 25) - EVT_KILL_THREAD(LVarA) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_JUMP) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Add(LVar1, 100) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Wait(1) + ExecGetTID(N(EVS_TetherCamToPlayer), LVarA) + Thread + Call(GetCurrentPartnerID, LVar0) + Switch(LVar0) + CaseEq(PARTNER_PARAKARRY) + CaseEq(PARTNER_LAKILESTER) + CaseEq(PARTNER_BOW) + CaseEq(PARTNER_WATT) + CaseDefault + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.7)) + Call(NpcJump0, NPC_PARTNER, -150, 25, 250, 37) + Call(NpcJump0, NPC_PARTNER, -110, 0, 190, 20) + EndSwitch + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE) + Call(EnablePartnerAI) + EndThread + Call(SetPlayerJumpscale, Float(0.7)) + Call(PlayerJump, -150, 25, 250, 25) + KillThread(LVarA) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), -250, 60, 50, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_ScriptSpring), -150, 0, 250, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_UseSpring_Exit))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 203, 0, 200, 0, MODEL_o930, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_OMO03_HiddenPanel) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 400, 60, -50, 0, ITEM_STONE_CAP, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OMO03_HiddenItem_StoneCap) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_SavePoint), -250, 60, 50, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_ScriptSpring), -150, 0, 250, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_UseSpring_Exit))) + Call(MakeEntity, Ref(Entity_HiddenPanel), 203, 0, 200, 0, MODEL_o930, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_OMO03_HiddenPanel) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 400, 60, -50, 0, ITEM_STONE_CAP, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OMO03_HiddenItem_StoneCap) + Return + End }; diff --git a/src/world/area_omo/omo_03/omo_03_5_npc.c b/src/world/area_omo/omo_03/omo_03_5_npc.c index 4a59de185c2..08983d68cfb 100644 --- a/src/world/area_omo/omo_03/omo_03_5_npc.c +++ b/src/world/area_omo/omo_03/omo_03_5_npc.c @@ -6,59 +6,59 @@ #include "world/common/enemy/ShyGuy_Stationary.inc.c" EvtScript N(EVS_ItemPrompt_ToyTrain) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_LT(GB_StoryProgress, STORY_CH4_RETURNED_TOY_TRAIN) - EVT_CALL(ShowKeyChoicePopup) - EVT_CALL(CloseChoicePopup) - EVT_IF_EQ(LVar0, ITEM_TOY_TRAIN) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0002) - EVT_ELSE - EVT_IF_EQ(AF_OMO_05, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_SadTalk, ANIM_TrainToad_SadIdle, 0, MSG_CH4_0000) - EVT_SET(AF_OMO_05, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_SadTalk, ANIM_TrainToad_SadIdle, 0, MSG_CH4_0001) - EVT_SET(AF_OMO_05, FALSE) - EVT_END_IF - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(GF_OMO03_LearnedAboutTrainSwitches, FALSE) - EVT_IF_EQ(AF_OMO_05, FALSE) - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Conductor, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcJumpscale, NPC_Conductor, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_Conductor, LVar0, LVar1, LVar2) - EVT_LOOP(2) - EVT_CALL(NpcJump1, NPC_Conductor, LVar0, LVar1, LVar2, 15) - EVT_END_LOOP - EVT_CALL(SetNpcFlagBits, NPC_Conductor, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_END_THREAD - EVT_WAIT(10) - EVT_IF_EQ(MF_EitherSwitchPressed, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0003) - EVT_CALL(EndSpeech, NPC_Conductor, -1, -1, 0) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0003) - EVT_CALL(ContinueSpeech, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0005) - EVT_SET(GF_OMO03_LearnedAboutTrainSwitches, TRUE) - EVT_END_IF - EVT_SET(AF_OMO_05, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0004) - EVT_SET(GF_OMO03_LearnedAboutTrainSwitches, TRUE) - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(AF_OMO_06, FALSE) - EVT_EXEC_WAIT(N(EVS_8024705C)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_80246108)) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + IfLt(GB_StoryProgress, STORY_CH4_RETURNED_TOY_TRAIN) + Call(ShowKeyChoicePopup) + Call(CloseChoicePopup) + IfEq(LVar0, ITEM_TOY_TRAIN) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0002) + Else + IfEq(AF_OMO_05, FALSE) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_SadTalk, ANIM_TrainToad_SadIdle, 0, MSG_CH4_0000) + Set(AF_OMO_05, TRUE) + Else + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_SadTalk, ANIM_TrainToad_SadIdle, 0, MSG_CH4_0001) + Set(AF_OMO_05, FALSE) + EndIf + EndIf + Else + IfEq(GF_OMO03_LearnedAboutTrainSwitches, FALSE) + IfEq(AF_OMO_05, FALSE) + Thread + Call(SetNpcFlagBits, NPC_Conductor, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcJumpscale, NPC_Conductor, Float(1.0)) + Call(GetNpcPos, NPC_Conductor, LVar0, LVar1, LVar2) + Loop(2) + Call(NpcJump1, NPC_Conductor, LVar0, LVar1, LVar2, 15) + EndLoop + Call(SetNpcFlagBits, NPC_Conductor, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + EndThread + Wait(10) + IfEq(MF_EitherSwitchPressed, FALSE) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0003) + Call(EndSpeech, NPC_Conductor, -1, -1, 0) + Else + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0003) + Call(ContinueSpeech, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0005) + Set(GF_OMO03_LearnedAboutTrainSwitches, TRUE) + EndIf + Set(AF_OMO_05, TRUE) + Else + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0004) + Set(GF_OMO03_LearnedAboutTrainSwitches, TRUE) + EndIf + Else + IfEq(AF_OMO_06, FALSE) + ExecWait(N(EVS_8024705C)) + Else + ExecWait(N(EVS_80246108)) + EndIf + EndIf + EndIf + Call(DisablePlayerInput, FALSE) + Unbind + Return + End }; s32 N(ToyTrainList)[] = { @@ -67,58 +67,58 @@ s32 N(ToyTrainList)[] = { }; EvtScript N(EVS_NpcInteract_Conductor) = { - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_ItemPrompt_ToyTrain)), TRIGGER_FORCE_ACTIVATE, 0, EVT_PTR(N(ToyTrainList)), 0, 1) - EVT_RETURN - EVT_END + BindPadlock(Ref(N(EVS_ItemPrompt_ToyTrain)), TRIGGER_FORCE_ACTIVATE, 0, Ref(N(ToyTrainList)), 0, 1) + Return + End }; EvtScript N(EVS_NpcInit_Conductor) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH4_RETURNED_TOY_TRAIN) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TrainToad_SadIdle) - EVT_END_IF - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Conductor))) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH4_RETURNED_TOY_TRAIN) + Call(SetNpcAnimation, NPC_SELF, ANIM_TrainToad_SadIdle) + EndIf + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Conductor))) + Return + End }; EvtScript N(EVS_NpcInteract_TrainToad) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH4_GOT_STOREROOM_KEY) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Blue_SadTalk, ANIM_TrainToad_Blue_SadIdle, 0, MSG_CH4_0017) - EVT_CASE_LT(STORY_CH4_RETURNED_STOREROOM_KEY) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Blue_Talk, ANIM_TrainToad_Blue_Idle, 0, MSG_CH4_0018) - EVT_CASE_LT(STORY_CH4_RETURNED_TOY_TRAIN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Blue_Talk, ANIM_TrainToad_Blue_Idle, 0, MSG_CH4_0019) - EVT_CASE_LT(STORY_CH4_GOT_FRYING_PAN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Blue_Talk, ANIM_TrainToad_Blue_Idle, 0, MSG_CH4_001A) - EVT_CASE_LT(STORY_CH4_GOT_TAYCE_TS_CAKE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Blue_Talk, ANIM_TrainToad_Blue_Idle, 0, MSG_CH4_001B) - EVT_CASE_LT(STORY_CH4_GAVE_CAKE_TO_GOURMET_GUY) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Blue_Talk, ANIM_TrainToad_Blue_Idle, 0, MSG_CH4_001C) - EVT_CASE_LT(STORY_CH4_PULLED_SWITCH_SWITCH) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Blue_Talk, ANIM_TrainToad_Blue_Idle, 0, MSG_CH4_001D) - EVT_CASE_LT(STORY_CH4_SOLVED_COLOR_PUZZLE) - EVT_CALL(FindKeyItem, ITEM_MYSTERY_NOTE, LVar0) - EVT_IF_EQ(LVar0, -1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Blue_Talk, ANIM_TrainToad_Blue_Idle, 0, MSG_CH4_001E) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Blue_Talk, ANIM_TrainToad_Blue_Idle, 0, MSG_CH4_001F) - EVT_END_IF - EVT_CASE_LT(STORY_CH4_WATT_JOINED_PARTY) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Blue_Talk, ANIM_TrainToad_Blue_Idle, 0, MSG_CH4_0020) - EVT_CASE_LT(STORY_CH4_DEFEATED_GENERAL_GUY) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Blue_Talk, ANIM_TrainToad_Blue_Idle, 0, MSG_CH4_0021) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Blue_Talk, ANIM_TrainToad_Blue_Idle, 0, MSG_CH4_0022) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH4_GOT_STOREROOM_KEY) + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Blue_SadTalk, ANIM_TrainToad_Blue_SadIdle, 0, MSG_CH4_0017) + CaseLt(STORY_CH4_RETURNED_STOREROOM_KEY) + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Blue_Talk, ANIM_TrainToad_Blue_Idle, 0, MSG_CH4_0018) + CaseLt(STORY_CH4_RETURNED_TOY_TRAIN) + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Blue_Talk, ANIM_TrainToad_Blue_Idle, 0, MSG_CH4_0019) + CaseLt(STORY_CH4_GOT_FRYING_PAN) + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Blue_Talk, ANIM_TrainToad_Blue_Idle, 0, MSG_CH4_001A) + CaseLt(STORY_CH4_GOT_TAYCE_TS_CAKE) + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Blue_Talk, ANIM_TrainToad_Blue_Idle, 0, MSG_CH4_001B) + CaseLt(STORY_CH4_GAVE_CAKE_TO_GOURMET_GUY) + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Blue_Talk, ANIM_TrainToad_Blue_Idle, 0, MSG_CH4_001C) + CaseLt(STORY_CH4_PULLED_SWITCH_SWITCH) + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Blue_Talk, ANIM_TrainToad_Blue_Idle, 0, MSG_CH4_001D) + CaseLt(STORY_CH4_SOLVED_COLOR_PUZZLE) + Call(FindKeyItem, ITEM_MYSTERY_NOTE, LVar0) + IfEq(LVar0, -1) + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Blue_Talk, ANIM_TrainToad_Blue_Idle, 0, MSG_CH4_001E) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Blue_Talk, ANIM_TrainToad_Blue_Idle, 0, MSG_CH4_001F) + EndIf + CaseLt(STORY_CH4_WATT_JOINED_PARTY) + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Blue_Talk, ANIM_TrainToad_Blue_Idle, 0, MSG_CH4_0020) + CaseLt(STORY_CH4_DEFEATED_GENERAL_GUY) + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Blue_Talk, ANIM_TrainToad_Blue_Idle, 0, MSG_CH4_0021) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Blue_Talk, ANIM_TrainToad_Blue_Idle, 0, MSG_CH4_0022) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_TrainToad) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_TrainToad))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_TrainToad))) + Return + End }; NpcData N(NpcData_TrainToads)[] = { diff --git a/src/world/area_omo/omo_03/omo_03_6_train.c b/src/world/area_omo/omo_03/omo_03_6_train.c index 9374a5e6f49..3275a05395d 100644 --- a/src/world/area_omo/omo_03/omo_03_6_train.c +++ b/src/world/area_omo/omo_03/omo_03_6_train.c @@ -18,324 +18,324 @@ Vec2i N(D_80246090_DAB2D0)[] = { }; s32 N(D_802460A0_DAB2E0)[] = { - EVT_FLOAT(-298.93), EVT_FLOAT(-288.62), EVT_FLOAT(140.0), - EVT_FLOAT(-262.5), EVT_FLOAT(-245.336), EVT_FLOAT(0.0), - EVT_FLOAT(-175.0), EVT_FLOAT(169.89), EVT_FLOAT(-220.49), + Float(-298.93), Float(-288.62), Float(140.0), + Float(-262.5), Float(-245.336), Float(0.0), + Float(-175.0), Float(169.89), Float(-220.49), -1, -1, -1 }; s32 N(D_802460D0_DAB310)[] = { - EVT_FLOAT(-298.93), EVT_FLOAT(-288.62), EVT_FLOAT(140.0), - EVT_FLOAT(-262.5), EVT_FLOAT(-245.336), EVT_FLOAT(0.0), - EVT_FLOAT(-175.0), EVT_FLOAT(262.5), EVT_FLOAT(-245.336), - EVT_FLOAT(479.165), EVT_FLOAT(-503.546), + Float(-298.93), Float(-288.62), Float(140.0), + Float(-262.5), Float(-245.336), Float(0.0), + Float(-175.0), Float(262.5), Float(-245.336), + Float(479.165), Float(-503.546), -1, -1, -1 }; EvtScript N(EVS_80246108) = { - EVT_IF_EQ(GF_OMO03_BlueSwitchActivated, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_SadTalk, ANIM_TrainToad_SadIdle, 0, MSG_CH4_0014) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_ELSE - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Conductor, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcJumpscale, NPC_Conductor, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_Conductor, LVar0, LVar1, LVar2) - EVT_LOOP(2) - EVT_CALL(NpcJump1, NPC_Conductor, LVar0, LVar1, LVar2, 15) - EVT_END_LOOP - EVT_CALL(SetNpcFlagBits, NPC_Conductor, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0015) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o939, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o941, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC_GET_TID(N(EVS_TrainUnk_C), LVarB) - EVT_SET(LVar0, EVT_PTR(N(D_802460A0_DAB2E0))) - EVT_SET(LVar9, EVT_PTR(N(D_80246090_DAB2D0))) - EVT_EXEC_WAIT(N(EVS_TrainUnk_AltD)) - EVT_IF_EQ(AB_OMO_6, 0) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_802460A0_DAB2E0))) - EVT_SET(MV_TrainUnk_02, 3) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_LABEL(20) - EVT_IF_EQ(MF_TrainUnk_00, TRUE) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_END_IF - EVT_WAIT(20) - EVT_KILL_THREAD(LVarB) - EVT_EXEC(N(EVS_TrainUnk_B)) - EVT_CALL(N(EnableCameraFollowPlayerY)) - EVT_SET(LVar9, EVT_PTR(N(D_80246080_DAB2C0))) - EVT_EXEC_WAIT(N(EVS_TrainUnk_E)) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_000E) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o939, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o941, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ELSE - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_802460D0_DAB310))) - EVT_SET(MV_TrainUnk_02, 1) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_WAIT(1) - EVT_EXEC(N(EVS_TrainUnk_H)) - EVT_LABEL(30) - EVT_IF_LT(MV_TrainPos, 350) - EVT_WAIT(1) - EVT_GOTO(30) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("omo_16"), omo_16_ENTRY_0) - EVT_SET(GB_OMO_TrainDestination, 0) - EVT_WAIT(100) - EVT_END_IF - EVT_END_IF - EVT_UNBIND - EVT_RETURN - EVT_END + IfEq(GF_OMO03_BlueSwitchActivated, FALSE) + Call(DisablePlayerInput, TRUE) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_SadTalk, ANIM_TrainToad_SadIdle, 0, MSG_CH4_0014) + Call(DisablePlayerInput, FALSE) + Return + Else + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Thread + Call(SetNpcFlagBits, NPC_Conductor, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcJumpscale, NPC_Conductor, Float(1.0)) + Call(GetNpcPos, NPC_Conductor, LVar0, LVar1, LVar2) + Loop(2) + Call(NpcJump1, NPC_Conductor, LVar0, LVar1, LVar2, 15) + EndLoop + Call(SetNpcFlagBits, NPC_Conductor, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + EndThread + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0015) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o939, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o941, COLLIDER_FLAGS_UPPER_MASK) + ExecGetTID(N(EVS_TrainUnk_C), LVarB) + Set(LVar0, Ref(N(D_802460A0_DAB2E0))) + Set(LVar9, Ref(N(D_80246090_DAB2D0))) + ExecWait(N(EVS_TrainUnk_AltD)) + IfEq(AB_OMO_6, 0) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_802460A0_DAB2E0))) + Set(MV_TrainUnk_02, 3) + Set(MF_TrainUnk_00, TRUE) + Label(20) + IfEq(MF_TrainUnk_00, TRUE) + Wait(1) + Goto(20) + EndIf + Wait(20) + KillThread(LVarB) + Exec(N(EVS_TrainUnk_B)) + Call(N(EnableCameraFollowPlayerY)) + Set(LVar9, Ref(N(D_80246080_DAB2C0))) + ExecWait(N(EVS_TrainUnk_E)) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_000E) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o939, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o941, COLLIDER_FLAGS_UPPER_MASK) + Call(DisablePlayerPhysics, FALSE) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Else + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_802460D0_DAB310))) + Set(MV_TrainUnk_02, 1) + Set(MF_TrainUnk_00, TRUE) + Wait(1) + Exec(N(EVS_TrainUnk_H)) + Label(30) + IfLt(MV_TrainPos, 350) + Wait(1) + Goto(30) + EndIf + Call(GotoMap, Ref("omo_16"), omo_16_ENTRY_0) + Set(GB_OMO_TrainDestination, 0) + Wait(100) + EndIf + EndIf + Unbind + Return + End }; s32 N(D_80246510_DAB750)[] = { - EVT_FLOAT(131.251), EVT_FLOAT(-210.168), EVT_FLOAT(74.997), - EVT_FLOAT(262.5), EVT_FLOAT(-245.336), EVT_FLOAT(479.165), - EVT_FLOAT(-503.546), + Float(131.251), Float(-210.168), Float(74.997), + Float(262.5), Float(-245.336), Float(479.165), + Float(-503.546), -1, -1, -1 }; EvtScript N(D_80246538_DAB778) = { - EVT_CALL(FadeOutMusic, 0, 3000) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_WAIT(10) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o939, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o941, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_TrainUnk_C)) - EVT_SET(AB_OMO_5, 0) - EVT_SET(LVar0, EVT_PTR(N(D_80246510_DAB750))) - EVT_EXEC_WAIT(N(EVS_TrainUnk_D)) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_80246510_DAB750))) - EVT_SET(MV_TrainUnk_02, 1) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_LABEL(10) - EVT_IF_LT(MV_TrainPos, 350) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("omo_16"), omo_16_ENTRY_0) - EVT_SET(GB_OMO_TrainDestination, 0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(FadeOutMusic, 0, 3000) + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Wait(10) + Call(DisablePlayerPhysics, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o939, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o941, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_TrainUnk_C)) + Set(AB_OMO_5, 0) + Set(LVar0, Ref(N(D_80246510_DAB750))) + ExecWait(N(EVS_TrainUnk_D)) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_80246510_DAB750))) + Set(MV_TrainUnk_02, 1) + Set(MF_TrainUnk_00, TRUE) + Label(10) + IfLt(MV_TrainPos, 350) + Wait(1) + Goto(10) + EndIf + Call(GotoMap, Ref("omo_16"), omo_16_ENTRY_0) + Set(GB_OMO_TrainDestination, 0) + Wait(100) + Return + End }; s32 N(D_802466C0_DAB900)[] = { - EVT_FLOAT(131.251), EVT_FLOAT(-210.168), EVT_FLOAT(254.997), - EVT_FLOAT(0.0), EVT_FLOAT(-175.0), EVT_FLOAT(-262.5), - EVT_FLOAT(-245.336), EVT_FLOAT(-353.418), EVT_FLOAT(-353.688), - EVT_FLOAT(-479.165), EVT_FLOAT(-503.546), + Float(131.251), Float(-210.168), Float(254.997), + Float(0.0), Float(-175.0), Float(-262.5), + Float(-245.336), Float(-353.418), Float(-353.688), + Float(-479.165), Float(-503.546), -1, -1, -1 }; EvtScript N(D_802466F8_DAB938) = { - EVT_CALL(FadeOutMusic, 0, 3000) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_WAIT(10) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o939, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o941, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_TrainUnk_C)) - EVT_SET(AB_OMO_5, 0) - EVT_SET(LVar0, EVT_PTR(N(D_802466C0_DAB900))) - EVT_EXEC_WAIT(N(EVS_TrainUnk_D)) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_802466C0_DAB900))) - EVT_SET(MV_TrainUnk_02, 1) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_LABEL(10) - EVT_IF_GT(MV_TrainPos, -350) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("omo_16"), omo_16_ENTRY_1) - EVT_SET(GB_OMO_TrainDestination, 3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(FadeOutMusic, 0, 3000) + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Wait(10) + Call(DisablePlayerPhysics, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o939, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o941, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_TrainUnk_C)) + Set(AB_OMO_5, 0) + Set(LVar0, Ref(N(D_802466C0_DAB900))) + ExecWait(N(EVS_TrainUnk_D)) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_802466C0_DAB900))) + Set(MV_TrainUnk_02, 1) + Set(MF_TrainUnk_00, TRUE) + Label(10) + IfGt(MV_TrainPos, -350) + Wait(1) + Goto(10) + EndIf + Call(GotoMap, Ref("omo_16"), omo_16_ENTRY_1) + Set(GB_OMO_TrainDestination, 3) + Wait(100) + Return + End }; s32 N(D_80246880_DABAC0)[] = { - EVT_FLOAT(414.885), EVT_FLOAT(-426.942), EVT_FLOAT(219.92), - EVT_FLOAT(353.553), EVT_FLOAT(-353.553), EVT_FLOAT(262.5), - EVT_FLOAT(-245.336), EVT_FLOAT(92.61), EVT_FLOAT(-199.49), + Float(414.885), Float(-426.942), Float(219.92), + Float(353.553), Float(-353.553), Float(262.5), + Float(-245.336), Float(92.61), Float(-199.49), -1, -1, -1 }; s32 N(D_802468B0_DABAF0)[] = { - EVT_FLOAT(414.885), EVT_FLOAT(-426.942), EVT_FLOAT(219.92), - EVT_FLOAT(353.553), EVT_FLOAT(-353.553), EVT_FLOAT(262.5), - EVT_FLOAT(-245.336), EVT_FLOAT(0.0), EVT_FLOAT(-175.0), - EVT_FLOAT(-262.5), EVT_FLOAT(-245.336), EVT_FLOAT(-353.418), - EVT_FLOAT(-353.688), EVT_FLOAT(-479.165), EVT_FLOAT(-503.546), + Float(414.885), Float(-426.942), Float(219.92), + Float(353.553), Float(-353.553), Float(262.5), + Float(-245.336), Float(0.0), Float(-175.0), + Float(-262.5), Float(-245.336), Float(-353.418), + Float(-353.688), Float(-479.165), Float(-503.546), -1, -1, -1 }; EvtScript N(D_802468F8_DABB38) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o939, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o941, COLLIDER_FLAGS_UPPER_MASK) - EVT_IF_EQ(AB_OMO_6, 0) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_80246880_DABAC0))) - EVT_SET(MV_TrainUnk_02, 2) - EVT_EXEC(N(EVS_Scene_RideTrain)) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_WAIT(1) - EVT_EXEC_GET_TID(N(EVS_TrainUnk_A), LVarB) - EVT_LABEL(10) - EVT_IF_EQ(MF_TrainUnk_00, TRUE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_WAIT(20) - EVT_KILL_THREAD(LVarB) - EVT_EXEC(N(EVS_TrainUnk_B)) - EVT_CALL(N(EnableCameraFollowPlayerY)) - EVT_SET(LVar9, EVT_PTR(N(D_80246080_DAB2C0))) - EVT_EXEC_WAIT(N(EVS_TrainUnk_E)) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_000E) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o939, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o941, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ELSE - EVT_EXEC(N(EVS_TrainUnk_A)) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_802468B0_DABAF0))) - EVT_SET(MV_TrainUnk_02, 0) - EVT_EXEC(N(EVS_Scene_RideTrain)) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_WAIT(1) - EVT_EXEC(N(EVS_TrainUnk_H)) - EVT_LABEL(20) - EVT_IF_GT(MV_TrainPos, -350) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("omo_16"), omo_16_ENTRY_1) - EVT_SET(GB_OMO_TrainDestination, 3) - EVT_WAIT(100) - EVT_END_IF - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(DisablePartnerAI, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o939, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o941, COLLIDER_FLAGS_UPPER_MASK) + IfEq(AB_OMO_6, 0) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_80246880_DABAC0))) + Set(MV_TrainUnk_02, 2) + Exec(N(EVS_Scene_RideTrain)) + Set(MF_TrainUnk_00, TRUE) + Wait(1) + ExecGetTID(N(EVS_TrainUnk_A), LVarB) + Label(10) + IfEq(MF_TrainUnk_00, TRUE) + Wait(1) + Goto(10) + EndIf + Wait(20) + KillThread(LVarB) + Exec(N(EVS_TrainUnk_B)) + Call(N(EnableCameraFollowPlayerY)) + Set(LVar9, Ref(N(D_80246080_DAB2C0))) + ExecWait(N(EVS_TrainUnk_E)) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_000E) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o939, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o941, COLLIDER_FLAGS_UPPER_MASK) + Call(DisablePlayerPhysics, FALSE) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Else + Exec(N(EVS_TrainUnk_A)) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_802468B0_DABAF0))) + Set(MV_TrainUnk_02, 0) + Exec(N(EVS_Scene_RideTrain)) + Set(MF_TrainUnk_00, TRUE) + Wait(1) + Exec(N(EVS_TrainUnk_H)) + Label(20) + IfGt(MV_TrainPos, -350) + Wait(1) + Goto(20) + EndIf + Call(GotoMap, Ref("omo_16"), omo_16_ENTRY_1) + Set(GB_OMO_TrainDestination, 3) + Wait(100) + EndIf + Return + End }; s32 N(D_80246BE0_DABE20)[] = { - EVT_FLOAT(-414.885), EVT_FLOAT(-426.942), EVT_FLOAT(140.075), - EVT_FLOAT(-353.418), EVT_FLOAT(-353.688), EVT_FLOAT(-262.5), - EVT_FLOAT(-245.336), EVT_FLOAT(0.0), EVT_FLOAT(-175.0), - EVT_FLOAT(169.89), EVT_FLOAT(-220.49), + Float(-414.885), Float(-426.942), Float(140.075), + Float(-353.418), Float(-353.688), Float(-262.5), + Float(-245.336), Float(0.0), Float(-175.0), + Float(169.89), Float(-220.49), -1, -1, -1 }; s32 N(D_80246C18_DABE58)[] = { - EVT_FLOAT(-414.885), EVT_FLOAT(-426.942), EVT_FLOAT(140.075), - EVT_FLOAT(-353.418), EVT_FLOAT(-353.688), EVT_FLOAT(-273.25), - EVT_FLOAT(-257.95), + Float(-414.885), Float(-426.942), Float(140.075), + Float(-353.418), Float(-353.688), Float(-273.25), + Float(-257.95), -1, -1, -1 }; s32 N(D_80246C40_DABE80)[] = { - EVT_FLOAT(-414.885), EVT_FLOAT(-426.942), EVT_FLOAT(140.075), - EVT_FLOAT(-353.418), EVT_FLOAT(-353.688), EVT_FLOAT(-262.5), - EVT_FLOAT(-245.336), EVT_FLOAT(0.0), EVT_FLOAT(-175.0), - EVT_FLOAT(262.5), EVT_FLOAT(-245.336), EVT_FLOAT(479.165), - EVT_FLOAT(-503.546), + Float(-414.885), Float(-426.942), Float(140.075), + Float(-353.418), Float(-353.688), Float(-262.5), + Float(-245.336), Float(0.0), Float(-175.0), + Float(262.5), Float(-245.336), Float(479.165), + Float(-503.546), -1, -1, -1 }; EvtScript N(D_80246C80_DABEC0) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o939, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o941, COLLIDER_FLAGS_UPPER_MASK) - EVT_IF_EQ(GF_OMO03_BlueSwitchActivated, FALSE) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_80246C18_DABE58))) - EVT_ELSE - EVT_IF_EQ(AB_OMO_6, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_80246BE0_DABE20))) - EVT_ELSE - EVT_GOTO(15) - EVT_END_IF - EVT_END_IF - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_02, 2) - EVT_EXEC(N(EVS_Scene_RideTrain)) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_WAIT(1) - EVT_EXEC_GET_TID(N(EVS_TrainUnk_A), LVarB) - EVT_LABEL(10) - EVT_IF_EQ(MF_TrainUnk_00, TRUE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_WAIT(20) - EVT_KILL_THREAD(LVarB) - EVT_EXEC(N(EVS_TrainUnk_B)) - EVT_CALL(N(EnableCameraFollowPlayerY)) - EVT_IF_EQ(GF_OMO03_BlueSwitchActivated, TRUE) - EVT_SET(LVar9, EVT_PTR(N(D_80246080_DAB2C0))) - EVT_EXEC_WAIT(N(EVS_TrainUnk_E)) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_000E) - EVT_ELSE - EVT_SET(LVar9, EVT_PTR(N(D_80246088_DAB2C8))) - EVT_EXEC_WAIT(N(EVS_TrainUnk_AltE)) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_SadTalk, ANIM_TrainToad_SadIdle, 0, MSG_CH4_0013) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o939, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o941, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_LABEL(15) - EVT_EXEC(N(EVS_TrainUnk_A)) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_80246C40_DABE80))) - EVT_SET(MV_TrainUnk_02, 0) - EVT_EXEC(N(EVS_Scene_RideTrain)) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_WAIT(1) - EVT_EXEC(N(EVS_TrainUnk_H)) - EVT_LABEL(20) - EVT_IF_LT(MV_TrainPos, 350) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("omo_16"), omo_16_ENTRY_0) - EVT_SET(GB_OMO_TrainDestination, 0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o939, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o941, COLLIDER_FLAGS_UPPER_MASK) + IfEq(GF_OMO03_BlueSwitchActivated, FALSE) + Set(MV_TrainUnk_01, Ref(N(D_80246C18_DABE58))) + Else + IfEq(AB_OMO_6, 0) + Set(MV_TrainUnk_01, Ref(N(D_80246BE0_DABE20))) + Else + Goto(15) + EndIf + EndIf + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_02, 2) + Exec(N(EVS_Scene_RideTrain)) + Set(MF_TrainUnk_00, TRUE) + Wait(1) + ExecGetTID(N(EVS_TrainUnk_A), LVarB) + Label(10) + IfEq(MF_TrainUnk_00, TRUE) + Wait(1) + Goto(10) + EndIf + Wait(20) + KillThread(LVarB) + Exec(N(EVS_TrainUnk_B)) + Call(N(EnableCameraFollowPlayerY)) + IfEq(GF_OMO03_BlueSwitchActivated, TRUE) + Set(LVar9, Ref(N(D_80246080_DAB2C0))) + ExecWait(N(EVS_TrainUnk_E)) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_000E) + Else + Set(LVar9, Ref(N(D_80246088_DAB2C8))) + ExecWait(N(EVS_TrainUnk_AltE)) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_SadTalk, ANIM_TrainToad_SadIdle, 0, MSG_CH4_0013) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o939, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o941, COLLIDER_FLAGS_UPPER_MASK) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE) + Call(DisablePlayerPhysics, FALSE) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Return + Label(15) + Exec(N(EVS_TrainUnk_A)) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_80246C40_DABE80))) + Set(MV_TrainUnk_02, 0) + Exec(N(EVS_Scene_RideTrain)) + Set(MF_TrainUnk_00, TRUE) + Wait(1) + Exec(N(EVS_TrainUnk_H)) + Label(20) + IfLt(MV_TrainPos, 350) + Wait(1) + Goto(20) + EndIf + Call(GotoMap, Ref("omo_16"), omo_16_ENTRY_0) + Set(GB_OMO_TrainDestination, 0) + Wait(100) + Return + End }; s32 N(D_80247044_DAC284)[] = { @@ -347,118 +347,118 @@ s32 N(D_80247050_DAC290)[] = { }; EvtScript N(EVS_8024705C) = { - EVT_IF_EQ(MF_EitherSwitchPressed, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0006) - EVT_ELSE - EVT_IF_EQ(AF_OMO_UsingRightSwitch, FALSE) - EVT_IF_EQ(GF_OMO03_BlueSwitchActivated, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_SadTalk, ANIM_TrainToad_SadIdle, 5, MSG_CH4_0012) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0007) - EVT_CALL(ShowChoice, MSG_Choice_003A) - EVT_IF_NE(LVar0, 3) - EVT_CALL(CloseMessage) - EVT_USE_BUF(EVT_PTR(N(D_80247044_DAC284))) - EVT_ADD(LVar0, 1) - EVT_LOOP(LVar0) - EVT_BUF_READ1(LVar1) - EVT_END_LOOP - EVT_SET(AB_OMO_6, LVar1) - EVT_EXEC_WAIT(N(D_802466F8_DAB938)) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0008) - EVT_END_IF - EVT_END_IF - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0007) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH4_PULLED_SWITCH_SWITCH) - EVT_CALL(ShowChoice, MSG_Choice_0037) - EVT_IF_NE(LVar0, 1) - EVT_CALL(CloseMessage) - EVT_USE_BUF(EVT_PTR(N(D_80247050_DAC290))) - EVT_ADD(LVar0, 1) - EVT_LOOP(LVar0) - EVT_BUF_READ1(LVar1) - EVT_END_LOOP - EVT_SET(AB_OMO_6, LVar1) - EVT_EXEC_WAIT(N(D_80246538_DAB778)) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0008) - EVT_END_IF - EVT_CASE_LT(STORY_CH4_SOLVED_COLOR_PUZZLE) - EVT_CALL(ShowChoice, MSG_Choice_0038) - EVT_IF_NE(LVar0, 2) - EVT_CALL(CloseMessage) - EVT_USE_BUF(EVT_PTR(N(D_80247050_DAC290))) - EVT_ADD(LVar0, 1) - EVT_LOOP(LVar0) - EVT_BUF_READ1(LVar1) - EVT_END_LOOP - EVT_SET(AB_OMO_6, LVar1) - EVT_EXEC_WAIT(N(D_80246538_DAB778)) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0008) - EVT_END_IF - EVT_CASE_GE(STORY_CH4_SOLVED_COLOR_PUZZLE) - EVT_CALL(ShowChoice, MSG_Choice_0039) - EVT_IF_NE(LVar0, 3) - EVT_CALL(CloseMessage) - EVT_USE_BUF(EVT_PTR(N(D_80247050_DAC290))) - EVT_ADD(LVar0, 1) - EVT_LOOP(LVar0) - EVT_BUF_READ1(LVar1) - EVT_END_LOOP - EVT_SET(AB_OMO_6, LVar1) - EVT_EXEC_WAIT(N(D_80246538_DAB778)) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0008) - EVT_END_IF - EVT_END_SWITCH - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MF_EitherSwitchPressed, FALSE) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0006) + Else + IfEq(AF_OMO_UsingRightSwitch, FALSE) + IfEq(GF_OMO03_BlueSwitchActivated, FALSE) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_SadTalk, ANIM_TrainToad_SadIdle, 5, MSG_CH4_0012) + Else + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0007) + Call(ShowChoice, MSG_Choice_003A) + IfNe(LVar0, 3) + Call(CloseMessage) + UseBuf(Ref(N(D_80247044_DAC284))) + Add(LVar0, 1) + Loop(LVar0) + BufRead1(LVar1) + EndLoop + Set(AB_OMO_6, LVar1) + ExecWait(N(D_802466F8_DAB938)) + Else + Call(ContinueSpeech, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0008) + EndIf + EndIf + Else + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0007) + Switch(GB_StoryProgress) + CaseLt(STORY_CH4_PULLED_SWITCH_SWITCH) + Call(ShowChoice, MSG_Choice_0037) + IfNe(LVar0, 1) + Call(CloseMessage) + UseBuf(Ref(N(D_80247050_DAC290))) + Add(LVar0, 1) + Loop(LVar0) + BufRead1(LVar1) + EndLoop + Set(AB_OMO_6, LVar1) + ExecWait(N(D_80246538_DAB778)) + Else + Call(ContinueSpeech, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0008) + EndIf + CaseLt(STORY_CH4_SOLVED_COLOR_PUZZLE) + Call(ShowChoice, MSG_Choice_0038) + IfNe(LVar0, 2) + Call(CloseMessage) + UseBuf(Ref(N(D_80247050_DAC290))) + Add(LVar0, 1) + Loop(LVar0) + BufRead1(LVar1) + EndLoop + Set(AB_OMO_6, LVar1) + ExecWait(N(D_80246538_DAB778)) + Else + Call(ContinueSpeech, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0008) + EndIf + CaseGe(STORY_CH4_SOLVED_COLOR_PUZZLE) + Call(ShowChoice, MSG_Choice_0039) + IfNe(LVar0, 3) + Call(CloseMessage) + UseBuf(Ref(N(D_80247050_DAC290))) + Add(LVar0, 1) + Loop(LVar0) + BufRead1(LVar1) + EndLoop + Set(AB_OMO_6, LVar1) + ExecWait(N(D_80246538_DAB778)) + Else + Call(ContinueSpeech, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0008) + EndIf + EndSwitch + EndIf + EndIf + Return + End }; s32 N(D_80247454_DAC694)[] = { - EVT_FLOAT(131.251), EVT_FLOAT(-210.168), EVT_FLOAT(74.997), + Float(131.251), Float(-210.168), Float(74.997), -1, -1, -1 }; EvtScript N(EVS_8024746C) = { - EVT_EXEC_WAIT(N(EVS_SetupSwitches)) - EVT_CALL(EnableGroup, MODEL_po, FALSE) - EVT_IF_LT(GB_StoryProgress, STORY_CH4_RETURNED_TOY_TRAIN) - EVT_CALL(EnableGroup, MODEL_popo, FALSE) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_eki1, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_80247454_DAC694))) - EVT_SET(MV_TrainUnk_02, 0) - EVT_EXEC(N(EVS_Scene_RideTrain)) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_ELSE - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(omo_03_ENTRY_2) - EVT_EXEC(N(D_80246C80_DABEC0)) - EVT_CASE_EQ(omo_03_ENTRY_3) - EVT_EXEC(N(D_802468F8_DABB38)) - EVT_CASE_EQ(omo_03_ENTRY_6) - EVT_CALL(EnableGroup, MODEL_popo, FALSE) - EVT_CALL(EnableGroup, MODEL_po, TRUE) - EVT_CASE_DEFAULT - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_80247454_DAC694))) - EVT_SET(MV_TrainUnk_02, 0) - EVT_EXEC(N(EVS_Scene_RideTrain)) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END + ExecWait(N(EVS_SetupSwitches)) + Call(EnableGroup, MODEL_po, FALSE) + IfLt(GB_StoryProgress, STORY_CH4_RETURNED_TOY_TRAIN) + Call(EnableGroup, MODEL_popo, FALSE) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_eki1, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Call(GetLoadType, LVar1) + IfEq(LVar1, 1) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_80247454_DAC694))) + Set(MV_TrainUnk_02, 0) + Exec(N(EVS_Scene_RideTrain)) + Set(MF_TrainUnk_00, TRUE) + Else + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(omo_03_ENTRY_2) + Exec(N(D_80246C80_DABEC0)) + CaseEq(omo_03_ENTRY_3) + Exec(N(D_802468F8_DABB38)) + CaseEq(omo_03_ENTRY_6) + Call(EnableGroup, MODEL_popo, FALSE) + Call(EnableGroup, MODEL_po, TRUE) + CaseDefault + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_80247454_DAC694))) + Set(MV_TrainUnk_02, 0) + Exec(N(EVS_Scene_RideTrain)) + Set(MF_TrainUnk_00, TRUE) + EndSwitch + EndIf + Return + End }; diff --git a/src/world/area_omo/omo_03/omo_03_7_train_drop.c b/src/world/area_omo/omo_03/omo_03_7_train_drop.c index 45f73821880..37f8bf2ed55 100644 --- a/src/world/area_omo/omo_03/omo_03_7_train_drop.c +++ b/src/world/area_omo/omo_03/omo_03_7_train_drop.c @@ -19,124 +19,124 @@ Vec3f N(SecondBouncePath)[] = { }; EvtScript N(EVS_Scene_TrainDropped) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(90.0), 82, 24, 12, 580, EVT_FLOAT(16.5), EVT_FLOAT(-8.5)) - EVT_CALL(TranslateGroup, MODEL_po, -170, 400, -196) - EVT_SET(MV_DroppedTrainAngle, 30) - EVT_WAIT(45) - EVT_THREAD - EVT_CALL(MakeLerp, MV_DroppedTrainAngle, 40, 29, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(MV_DroppedTrainAngle, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(LoadPath, 30, EVT_PTR(N(FallPath)), ARRAY_COUNT(N(FallPath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(TranslateGroup, MODEL_po, LVar1, LVar2, LVar3) - EVT_CALL(RotateGroup, MODEL_po, MV_DroppedTrainAngle, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtModel, MODEL_p_8, SOUND_OMO_TOYBOX_TRAIN_DROP, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(3.0)) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Conductor, ANIM_TrainToad_Idle) - EVT_CALL(SetNpcJumpscale, NPC_Conductor, EVT_FLOAT(3.0)) - EVT_CALL(GetNpcPos, NPC_Conductor, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Conductor, LVar0, LVar1, LVar2, 12) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_TrainToad, ANIM_TrainToad_Blue_Idle) - EVT_CALL(SetNpcJumpscale, NPC_TrainToad, EVT_FLOAT(3.0)) - EVT_CALL(GetNpcPos, NPC_TrainToad, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_TrainToad, LVar0, LVar1, LVar2, 15) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, MV_DroppedTrainAngle, 18, 19, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(MV_DroppedTrainAngle, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(LoadPath, 20, EVT_PTR(N(FirstBouncePath)), ARRAY_COUNT(N(FirstBouncePath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(TranslateGroup, MODEL_po, LVar1, LVar2, LVar3) - EVT_CALL(RotateGroup, MODEL_po, MV_DroppedTrainAngle, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtModel, MODEL_p_8, SOUND_OMO_TOYBOX_TRAIN_DROP, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 8, EVT_FLOAT(2.0)) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Conductor, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Conductor, LVar0, LVar1, LVar2, 10) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_TrainToad, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_TrainToad, LVar0, LVar1, LVar2, 10) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, MV_DroppedTrainAngle, 0, 14, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(MV_DroppedTrainAngle, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(LoadPath, 15, EVT_PTR(N(SecondBouncePath)), ARRAY_COUNT(N(SecondBouncePath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(TranslateGroup, MODEL_po, LVar1, LVar2, LVar3) - EVT_CALL(RotateGroup, MODEL_po, MV_DroppedTrainAngle, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtModel, MODEL_p_8, SOUND_OMO_TOYBOX_TRAIN_DROP, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Conductor, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Conductor, LVar0, LVar1, LVar2, 8) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_TrainToad, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_TrainToad, LVar0, LVar1, LVar2, 5) - EVT_LOOP(0) - EVT_CALL(InterpNpcYaw, NPC_TrainToad, 270, 0) - EVT_WAIT(25) - EVT_CALL(InterpNpcYaw, NPC_TrainToad, 90, 0) - EVT_WAIT(25) - EVT_END_LOOP - EVT_END_THREAD - EVT_SET(GB_StoryProgress, STORY_CH4_RETURNED_TOY_TRAIN) - EVT_WAIT(75) - EVT_CALL(GotoMap, EVT_PTR("mac_04"), mac_04_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(SetCamProperties, CAM_DEFAULT, Float(90.0), 82, 24, 12, 580, Float(16.5), Float(-8.5)) + Call(TranslateGroup, MODEL_po, -170, 400, -196) + Set(MV_DroppedTrainAngle, 30) + Wait(45) + Thread + Call(MakeLerp, MV_DroppedTrainAngle, 40, 29, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Set(MV_DroppedTrainAngle, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(LoadPath, 30, Ref(N(FallPath)), ARRAY_COUNT(N(FallPath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(TranslateGroup, MODEL_po, LVar1, LVar2, LVar3) + Call(RotateGroup, MODEL_po, MV_DroppedTrainAngle, 0, 0, 1) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtModel, MODEL_p_8, SOUND_OMO_TOYBOX_TRAIN_DROP, SOUND_SPACE_DEFAULT) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(3.0)) + EndThread + Thread + Call(SetNpcAnimation, NPC_Conductor, ANIM_TrainToad_Idle) + Call(SetNpcJumpscale, NPC_Conductor, Float(3.0)) + Call(GetNpcPos, NPC_Conductor, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Conductor, LVar0, LVar1, LVar2, 12) + EndThread + Thread + Call(SetNpcAnimation, NPC_TrainToad, ANIM_TrainToad_Blue_Idle) + Call(SetNpcJumpscale, NPC_TrainToad, Float(3.0)) + Call(GetNpcPos, NPC_TrainToad, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_TrainToad, LVar0, LVar1, LVar2, 15) + EndThread + Thread + Call(MakeLerp, MV_DroppedTrainAngle, 18, 19, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Set(MV_DroppedTrainAngle, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(LoadPath, 20, Ref(N(FirstBouncePath)), ARRAY_COUNT(N(FirstBouncePath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(TranslateGroup, MODEL_po, LVar1, LVar2, LVar3) + Call(RotateGroup, MODEL_po, MV_DroppedTrainAngle, 0, 0, 1) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtModel, MODEL_p_8, SOUND_OMO_TOYBOX_TRAIN_DROP, SOUND_SPACE_DEFAULT) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 8, Float(2.0)) + EndThread + Thread + Call(GetNpcPos, NPC_Conductor, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Conductor, LVar0, LVar1, LVar2, 10) + EndThread + Thread + Call(GetNpcPos, NPC_TrainToad, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_TrainToad, LVar0, LVar1, LVar2, 10) + EndThread + Thread + Call(MakeLerp, MV_DroppedTrainAngle, 0, 14, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Set(MV_DroppedTrainAngle, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(LoadPath, 15, Ref(N(SecondBouncePath)), ARRAY_COUNT(N(SecondBouncePath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(TranslateGroup, MODEL_po, LVar1, LVar2, LVar3) + Call(RotateGroup, MODEL_po, MV_DroppedTrainAngle, 0, 0, 1) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtModel, MODEL_p_8, SOUND_OMO_TOYBOX_TRAIN_DROP, SOUND_SPACE_DEFAULT) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(1.0)) + EndThread + Thread + Call(GetNpcPos, NPC_Conductor, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Conductor, LVar0, LVar1, LVar2, 8) + EndThread + Thread + Call(GetNpcPos, NPC_TrainToad, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_TrainToad, LVar0, LVar1, LVar2, 5) + Loop(0) + Call(InterpNpcYaw, NPC_TrainToad, 270, 0) + Wait(25) + Call(InterpNpcYaw, NPC_TrainToad, 90, 0) + Wait(25) + EndLoop + EndThread + Set(GB_StoryProgress, STORY_CH4_RETURNED_TOY_TRAIN) + Wait(75) + Call(GotoMap, Ref("mac_04"), mac_04_ENTRY_3) + Wait(100) + Return + End }; diff --git a/src/world/area_omo/omo_03/omo_03_8_epilogue.c b/src/world/area_omo/omo_03/omo_03_8_epilogue.c index ed0f816ae7f..9bb68625723 100644 --- a/src/world/area_omo/omo_03/omo_03_8_epilogue.c +++ b/src/world/area_omo/omo_03/omo_03_8_epilogue.c @@ -9,44 +9,44 @@ Vec3f N(FlightPath)[] = { }; EvtScript N(EVS_Scene_Epilogue) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(GetNpcPos, NPC_Watt, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 13) - EVT_PLAY_EFFECT(EFFECT_STATIC_STATUS, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.9), 5, 0) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 50, 0, 160) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 50, 0, 160) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(16.0), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Red_Anim11) - EVT_CALL(SetNpcAnimation, NPC_ShyGuy_02, ANIM_ShyGuy_Red_Anim11) - EVT_CALL(SetNpcAnimation, NPC_ShyGuy_03, ANIM_ShyGuy_Red_Anim11) - EVT_WAIT(60) - EVT_CALL(SetNpcAnimation, NPC_Watt, ANIM_WorldWatt_Talk) - EVT_CALL(SetNpcAnimation, NPC_ShyGuy_02, ANIM_ShyGuy_Red_Anim01) - EVT_CALL(SetNpcAnimation, NPC_ShyGuy_03, ANIM_ShyGuy_Red_Anim01) - EVT_CALL(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Walk) - EVT_CALL(LoadPath, 60, EVT_PTR(N(FlightPath)), ARRAY_COUNT(N(FlightPath)), EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Parakarry, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Idle) - EVT_CALL(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Red_Anim01) - EVT_CALL(SetNpcAnimation, NPC_Watt, ANIM_WorldWatt_Idle) - EVT_CALL(NpcFaceNpc, NPC_Watt, NPC_Parakarry, 0) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Talk) - EVT_WAIT(60) - EVT_CALL(FadeOutMusic, 0, 1000) - EVT_CALL(GotoMap, EVT_PTR("jan_04"), jan_04_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(GetNpcPos, NPC_Watt, LVar0, LVar1, LVar2) + Add(LVar1, 13) + PlayEffect(EFFECT_STATIC_STATUS, 0, LVar0, LVar1, LVar2, Float(0.9), 5, 0) + Call(UseSettingsFrom, CAM_DEFAULT, 50, 0, 160) + Call(SetPanTarget, CAM_DEFAULT, 50, 0, 160) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(SetCamPitch, CAM_DEFAULT, Float(16.0), Float(-7.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Red_Anim11) + Call(SetNpcAnimation, NPC_ShyGuy_02, ANIM_ShyGuy_Red_Anim11) + Call(SetNpcAnimation, NPC_ShyGuy_03, ANIM_ShyGuy_Red_Anim11) + Wait(60) + Call(SetNpcAnimation, NPC_Watt, ANIM_WorldWatt_Talk) + Call(SetNpcAnimation, NPC_ShyGuy_02, ANIM_ShyGuy_Red_Anim01) + Call(SetNpcAnimation, NPC_ShyGuy_03, ANIM_ShyGuy_Red_Anim01) + Call(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Walk) + Call(LoadPath, 60, Ref(N(FlightPath)), ARRAY_COUNT(N(FlightPath)), EASING_LINEAR) + Label(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Parakarry, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(0) + EndIf + Call(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Idle) + Call(SetNpcAnimation, NPC_ShyGuy_01, ANIM_ShyGuy_Red_Anim01) + Call(SetNpcAnimation, NPC_Watt, ANIM_WorldWatt_Idle) + Call(NpcFaceNpc, NPC_Watt, NPC_Parakarry, 0) + Wait(10) + Call(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Talk) + Wait(60) + Call(FadeOutMusic, 0, 1000) + Call(GotoMap, Ref("jan_04"), jan_04_ENTRY_3) + Wait(100) + Return + End }; diff --git a/src/world/area_omo/omo_04/omo_04_1_music.c b/src/world/area_omo/omo_04/omo_04_1_music.c index 10887d300e9..1bb5fc02e4c 100644 --- a/src/world/area_omo/omo_04/omo_04_1_music.c +++ b/src/world/area_omo/omo_04/omo_04_1_music.c @@ -1,11 +1,11 @@ #include "omo_04.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_EQ(GF_OMO04_SpawnedPeachChoice1, FALSE) - EVT_CALL(SetMusicTrack, 0, SONG_KAMMY_KOOPA_THEME, 0, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_OMO04_SpawnedPeachChoice1, FALSE) + Call(SetMusicTrack, 0, SONG_KAMMY_KOOPA_THEME, 0, 8) + Else + Call(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) + EndIf + Return + End }; diff --git a/src/world/area_omo/omo_04/omo_04_2_main.c b/src/world/area_omo/omo_04/omo_04_2_main.c index 29818495f93..c563fd57300 100644 --- a/src/world/area_omo/omo_04/omo_04_2_main.c +++ b/src/world/area_omo/omo_04/omo_04_2_main.c @@ -5,42 +5,42 @@ EvtScript N(EVS_ExitWalk_omo_03_1) = EVT_EXIT_WALK(60, omo_04_ENTRY_0, "omo_03", MAP_RODATA_PAD(1, exits); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_03_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_omo_03_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_IF_EQ(GF_OMO04_SpawnedPeachChoice1, FALSE) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(KammySceneNPCs))) - EVT_ELSE - EVT_IF_EQ(GF_OMO04_Item_Mushroom, FALSE) - EVT_SWITCH(GB_OMO_PeachChoice1) - EVT_CASE_EQ(0) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(GoombaAmbushNPCs))) - EVT_CASE_EQ(1) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(ClubbaAmbushNPCs))) - EVT_CASE_EQ(2) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(MakeItemEntity, ITEM_MUSHROOM, 1100, 0, 0, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO04_Item_Mushroom) - EVT_END_SWITCH - EVT_ELSE - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_END_IF - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupGizmos)) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_EQ(GF_OMO04_SpawnedPeachChoice1, FALSE) - EVT_EXEC(N(EVS_Scene_KammySetAmbush)) - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_END_IF - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + IfEq(GF_OMO04_SpawnedPeachChoice1, FALSE) + Call(MakeNpcs, TRUE, Ref(N(KammySceneNPCs))) + Else + IfEq(GF_OMO04_Item_Mushroom, FALSE) + Switch(GB_OMO_PeachChoice1) + CaseEq(0) + Call(MakeNpcs, TRUE, Ref(N(GoombaAmbushNPCs))) + CaseEq(1) + Call(MakeNpcs, TRUE, Ref(N(ClubbaAmbushNPCs))) + CaseEq(2) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Call(MakeItemEntity, ITEM_MUSHROOM, 1100, 0, 0, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO04_Item_Mushroom) + EndSwitch + Else + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + EndIf + EndIf + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupGizmos)) + ExecWait(N(EVS_SetupMusic)) + IfEq(GF_OMO04_SpawnedPeachChoice1, FALSE) + Exec(N(EVS_Scene_KammySetAmbush)) + Else + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + EndIf + Return + End }; diff --git a/src/world/area_omo/omo_04/omo_04_3_gizmos.c b/src/world/area_omo/omo_04/omo_04_3_gizmos.c index 552cf5b3cd5..92d5ce48940 100644 --- a/src/world/area_omo/omo_04/omo_04_3_gizmos.c +++ b/src/world/area_omo/omo_04/omo_04_3_gizmos.c @@ -1,61 +1,61 @@ #include "omo_04.h" EvtScript N(EVS_Gizmos_Wheels) = { - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, -360, 100, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_ha1, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha2, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha3, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha4, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha5, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(MakeLerp, 0, -360, 100, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_ha1, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha2, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha3, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha4, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha5, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_Gizmos_Shutters) = { - EVT_LABEL(0) - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, 160, 60, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m2_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m2_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m3_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m3_2, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(MakeLerp, 160, 0, 60, EASING_COS_IN_OUT) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m2_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m2_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m3_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m3_2, LVar0, 0, 1, 0) - EVT_WAIT(2) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Label(0) + Call(MakeLerp, 0, 160, 60, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m2_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m2_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m3_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m3_2, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(MakeLerp, 160, 0, 60, EASING_COS_IN_OUT) + Label(2) + Call(UpdateLerp) + Call(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m2_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m2_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m3_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m3_2, LVar0, 0, 1, 0) + Wait(2) + IfEq(LVar1, 1) + Goto(2) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_SetupGizmos) = { - EVT_EXEC(N(EVS_Gizmos_Wheels)) - EVT_EXEC(N(EVS_Gizmos_Shutters)) - EVT_RETURN - EVT_END + Exec(N(EVS_Gizmos_Wheels)) + Exec(N(EVS_Gizmos_Shutters)) + Return + End }; diff --git a/src/world/area_omo/omo_04/omo_04_4_entity.c b/src/world/area_omo/omo_04/omo_04_4_entity.c index 9f8de4dc31c..7ae0b39d527 100644 --- a/src/world/area_omo/omo_04/omo_04_4_entity.c +++ b/src/world/area_omo/omo_04/omo_04_4_entity.c @@ -4,27 +4,27 @@ #include "world/common/entity/Chest.inc.c" EvtScript N(EVS_OpenChest_StoreroomKey) = { - EVT_SET(LVarA, ITEM_STOREROOM_KEY) - EVT_SET(LVarB, ITEM_TYPE_KEY) - EVT_SET(GF_OMO04_Chest_StoreroomKey, TRUE) - EVT_EXEC_WAIT(N(EVS_Chest_GetItem)) - EVT_SET(GF_MAC04_StoreroomKeyStolen, TRUE) - EVT_SET(GB_StoryProgress, STORY_CH4_GOT_STOREROOM_KEY) - EVT_RETURN - EVT_END + Set(LVarA, ITEM_STOREROOM_KEY) + Set(LVarB, ITEM_TYPE_KEY) + Set(GF_OMO04_Chest_StoreroomKey, TRUE) + ExecWait(N(EVS_Chest_GetItem)) + Set(GF_MAC04_StoreroomKeyStolen, TRUE) + Set(GB_StoryProgress, STORY_CH4_GOT_STOREROOM_KEY) + Return + End }; #include "world/common/EnableCameraFollowPlayerY.inc.c" #include "world/common/DisableCameraFollowPlayerY.inc.c" EvtScript N(EVS_TetherCamToPlayer) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; Vec3i N(StarBoxLaunchTargets)[] = { @@ -39,77 +39,77 @@ Vec3i N(StarBoxLaunchTargets)[] = { }; EvtScript N(EVS_StarBoxLaunch_Impl) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_USE_BUF(EVT_PTR(N(StarBoxLaunchTargets))) - EVT_LOOP(LVar0) - EVT_BUF_READ3(LVar7, LVar8, LVar9) - EVT_END_LOOP - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_WAIT(1) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAUNCH) - EVT_WAIT(1) - EVT_CALL(N(EnableCameraFollowPlayerY)) - EVT_EXEC_GET_TID(N(EVS_TetherCamToPlayer), LVarA) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7)) - EVT_CALL(PlayerJump, LVar7, LVar8, LVar9, 40) - EVT_KILL_THREAD(LVarA) - EVT_CALL(N(DisableCameraFollowPlayerY)) - EVT_WAIT(1) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + UseBuf(Ref(N(StarBoxLaunchTargets))) + Loop(LVar0) + BufRead3(LVar7, LVar8, LVar9) + EndLoop + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Wait(1) + Call(SetPlayerActionState, ACTION_STATE_LAUNCH) + Wait(1) + Call(N(EnableCameraFollowPlayerY)) + ExecGetTID(N(EVS_TetherCamToPlayer), LVarA) + Call(SetPlayerJumpscale, Float(0.7)) + Call(PlayerJump, LVar7, LVar8, LVar9, 40) + KillThread(LVarA) + Call(N(DisableCameraFollowPlayerY)) + Wait(1) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_StarBoxLaunch1) = { - EVT_SET(LVar0, 1) // entityID - EVT_EXEC_WAIT(N(EVS_StarBoxLaunch_Impl)) - EVT_RETURN - EVT_END + Set(LVar0, 1) // entityID + ExecWait(N(EVS_StarBoxLaunch_Impl)) + Return + End }; EvtScript N(EVS_StarBoxLaunch2) = { - EVT_SET(LVar0, 2) // entityID - EVT_EXEC_WAIT(N(EVS_StarBoxLaunch_Impl)) - EVT_RETURN - EVT_END + Set(LVar0, 2) // entityID + ExecWait(N(EVS_StarBoxLaunch_Impl)) + Return + End }; EvtScript N(EVS_StarBoxLaunch3) = { - EVT_SET(LVar0, 3) // entityID - EVT_EXEC_WAIT(N(EVS_StarBoxLaunch_Impl)) - EVT_RETURN - EVT_END + Set(LVar0, 3) // entityID + ExecWait(N(EVS_StarBoxLaunch_Impl)) + Return + End }; EvtScript N(EVS_StarBoxLaunch4) = { - EVT_SET(LVar0, 4) // entityID - EVT_EXEC_WAIT(N(EVS_StarBoxLaunch_Impl)) - EVT_RETURN - EVT_END + Set(LVar0, 4) // entityID + ExecWait(N(EVS_StarBoxLaunch_Impl)) + Return + End }; EvtScript N(EVS_StarBoxLaunch5) = { - EVT_SET(LVar0, 5) // entityID - EVT_EXEC_WAIT(N(EVS_StarBoxLaunch_Impl)) - EVT_RETURN - EVT_END + Set(LVar0, 5) // entityID + ExecWait(N(EVS_StarBoxLaunch_Impl)) + Return + End }; EvtScript N(EVS_StarBoxLaunch6) = { - EVT_SET(LVar0, 6) // entityID - EVT_EXEC_WAIT(N(EVS_StarBoxLaunch_Impl)) - EVT_RETURN - EVT_END + Set(LVar0, 6) // entityID + ExecWait(N(EVS_StarBoxLaunch_Impl)) + Return + End }; EvtScript N(EVS_StarBoxLaunch7) = { - EVT_SET(LVar0, 7) // entityID - EVT_EXEC_WAIT(N(EVS_StarBoxLaunch_Impl)) - EVT_RETURN - EVT_END + Set(LVar0, 7) // entityID + ExecWait(N(EVS_StarBoxLaunch_Impl)) + Return + End }; API_CALLABLE(N(func_802402F4_DAD6F4)) { @@ -122,39 +122,39 @@ API_CALLABLE(N(func_802402F4_DAD6F4)) { } EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 1150, 0, 0, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_OMO04_Chest_StoreroomKey) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenChest_StoreroomKey))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_StarBoxLauncher), -892, 0, -125, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_StarBoxLaunch1))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_StarBoxLauncher), -847, 0, 98, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_StarBoxLaunch2))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_StarBoxLauncher), -722, 0, -72, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_StarBoxLaunch3))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_StarBoxLauncher), -647, 80, 62, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_StarBoxLaunch4))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_StarBoxLauncher), -607, 0, 133, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_StarBoxLaunch5))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_StarBoxLauncher), -467, 0, 133, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_StarBoxLaunch6))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_StarBoxLauncher), 712, 0, 133, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_StarBoxLaunch7))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 575, 60, 60, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OMO04_ItemBlock_CoinA) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 761, 60, -85, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OMO04_ItemBlock_CoinB) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 885, 140, -110, 0, ITEM_THUNDER_BOLT, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OMO04_ItemBlock_ThunderBolt) - EVT_CALL(MakeItemEntity, ITEM_COIN, -892, 110, -124, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO04_Item_CoinA) - EVT_CALL(MakeItemEntity, ITEM_COIN, -892, 130, -124, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO04_Item_CoinB) - EVT_CALL(MakeItemEntity, ITEM_COIN, -892, 150, -124, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO04_Item_CoinC) - EVT_CALL(MakeItemEntity, ITEM_COIN, -637, 190, 62, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO04_Item_CoinD) - EVT_CALL(MakeItemEntity, ITEM_COIN, -614, 210, 62, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO04_Item_CoinE) - EVT_CALL(MakeItemEntity, ITEM_COIN, -594, 220, 62, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO04_Item_CoinF) - EVT_CALL(MakeItemEntity, ITEM_COIN, -574, 210, 62, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO04_Item_CoinG) - EVT_CALL(MakeItemEntity, ITEM_COIN, -554, 190, 62, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO04_Item_CoinH) - EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 120, 180, -80, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO04_Item_StarPieceA) - EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, -90, 0, -125, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO04_Item_StarPieceB) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Chest), 1150, 0, 0, 0, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_OMO04_Chest_StoreroomKey) + Call(AssignScript, Ref(N(EVS_OpenChest_StoreroomKey))) + Call(MakeEntity, Ref(Entity_StarBoxLauncher), -892, 0, -125, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_StarBoxLaunch1))) + Call(MakeEntity, Ref(Entity_StarBoxLauncher), -847, 0, 98, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_StarBoxLaunch2))) + Call(MakeEntity, Ref(Entity_StarBoxLauncher), -722, 0, -72, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_StarBoxLaunch3))) + Call(MakeEntity, Ref(Entity_StarBoxLauncher), -647, 80, 62, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_StarBoxLaunch4))) + Call(MakeEntity, Ref(Entity_StarBoxLauncher), -607, 0, 133, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_StarBoxLaunch5))) + Call(MakeEntity, Ref(Entity_StarBoxLauncher), -467, 0, 133, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_StarBoxLaunch6))) + Call(MakeEntity, Ref(Entity_StarBoxLauncher), 712, 0, 133, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_StarBoxLaunch7))) + Call(MakeEntity, Ref(Entity_YellowBlock), 575, 60, 60, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OMO04_ItemBlock_CoinA) + Call(MakeEntity, Ref(Entity_YellowBlock), 761, 60, -85, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OMO04_ItemBlock_CoinB) + Call(MakeEntity, Ref(Entity_YellowBlock), 885, 140, -110, 0, ITEM_THUNDER_BOLT, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OMO04_ItemBlock_ThunderBolt) + Call(MakeItemEntity, ITEM_COIN, -892, 110, -124, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO04_Item_CoinA) + Call(MakeItemEntity, ITEM_COIN, -892, 130, -124, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO04_Item_CoinB) + Call(MakeItemEntity, ITEM_COIN, -892, 150, -124, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO04_Item_CoinC) + Call(MakeItemEntity, ITEM_COIN, -637, 190, 62, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO04_Item_CoinD) + Call(MakeItemEntity, ITEM_COIN, -614, 210, 62, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO04_Item_CoinE) + Call(MakeItemEntity, ITEM_COIN, -594, 220, 62, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO04_Item_CoinF) + Call(MakeItemEntity, ITEM_COIN, -574, 210, 62, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO04_Item_CoinG) + Call(MakeItemEntity, ITEM_COIN, -554, 190, 62, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO04_Item_CoinH) + Call(MakeItemEntity, ITEM_STAR_PIECE, 120, 180, -80, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO04_Item_StarPieceA) + Call(MakeItemEntity, ITEM_STAR_PIECE, -90, 0, -125, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO04_Item_StarPieceB) + Return + End }; diff --git a/src/world/area_omo/omo_04/omo_04_5_npc.c b/src/world/area_omo/omo_04/omo_04_5_npc.c index f94a81a795e..a1070b33231 100644 --- a/src/world/area_omo/omo_04/omo_04_5_npc.c +++ b/src/world/area_omo/omo_04/omo_04_5_npc.c @@ -22,71 +22,71 @@ NpcSettings N(NpcSettings_Goomba) = { #include "world/common/EnableCameraLeadingPlayer.inc.c" EvtScript N(EVS_NpcIdle_Goomba) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 1050) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(DisableCameraLeadingPlayer)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(5.0), LVar0, LVar1, LVar2, 300, EVT_FLOAT(13.0), EVT_FLOAT(-9.5)) - EVT_IF_EQ(GB_OMO_PeachChoice1, 0) - EVT_CALL(SpeakToPlayer, NPC_Goomba, ANIM_Goomba_Run, ANIM_Goomba_Idle, 0, MSG_CH4_003A) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Clubba, ANIM_WorldClubba_Anim05, ANIM_WorldClubba_Anim02, 0, MSG_CH4_003B) - EVT_END_IF - EVT_THREAD - EVT_CALL(N(EnableCameraLeadingPlayer)) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_END_THREAD - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, 1050) + Wait(1) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Call(N(DisableCameraLeadingPlayer)) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(SetCamProperties, CAM_DEFAULT, Float(5.0), LVar0, LVar1, LVar2, 300, Float(13.0), Float(-9.5)) + IfEq(GB_OMO_PeachChoice1, 0) + Call(SpeakToPlayer, NPC_Goomba, ANIM_Goomba_Run, ANIM_Goomba_Idle, 0, MSG_CH4_003A) + Else + Call(SpeakToPlayer, NPC_Clubba, ANIM_WorldClubba_Anim05, ANIM_WorldClubba_Anim02, 0, MSG_CH4_003B) + EndIf + Thread + Call(N(EnableCameraLeadingPlayer)) + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + EndThread + Call(DisablePlayerInput, FALSE) + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Return + End }; EvtScript N(EVS_NpcDefeat_Goomba) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_SET(GF_OMO04_Item_Mushroom, TRUE) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Set(GF_OMO04_Item_Mushroom, TRUE) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Goomba) = { - EVT_IF_EQ(GB_OMO_PeachChoice1, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Goomba))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Goomba))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_OMO_PeachChoice1, 0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Goomba))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Goomba))) + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Clubba) = { - EVT_IF_EQ(GB_OMO_PeachChoice1, 1) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Goomba))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Goomba))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_OMO_PeachChoice1, 1) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Goomba))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Goomba))) + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Kammy) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Kammy))) - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_Kammy))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Kammy))) + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_Kammy))) + Return + End }; NpcData N(NpcData_Goomba) = { diff --git a/src/world/area_omo/omo_04/omo_04_6_scenes.c b/src/world/area_omo/omo_04/omo_04_6_scenes.c index f9588c4c6b6..ad15b4361e8 100644 --- a/src/world/area_omo/omo_04/omo_04_6_scenes.c +++ b/src/world/area_omo/omo_04/omo_04_6_scenes.c @@ -7,61 +7,61 @@ s32 N(HoverOffsets)[] = { }; EvtScript N(EVS_NpcIdle_Kammy) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar6, LVar3, LVar4) - EVT_LOOP(0) - EVT_USE_BUF(EVT_PTR(N(HoverOffsets))) - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) - EVT_CALL(GetSelfVar, 0, LVar5) - EVT_IF_EQ(LVar5, 0) - EVT_SWITCH(LVar6) - EVT_CASE_LT(LVar2) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_CASE_GT(LVar2) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_END_SWITCH - EVT_SET(LVar6, LVar2) - EVT_WAIT(1) - EVT_ELSE - EVT_BUF_READ1(LVar1) - EVT_ADD(LVar3, LVar1) - EVT_CALL(SetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) - EVT_WAIT(3) - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Call(GetNpcPos, NPC_SELF, LVar6, LVar3, LVar4) + Loop(0) + UseBuf(Ref(N(HoverOffsets))) + Loop(10) + Call(GetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) + Call(GetSelfVar, 0, LVar5) + IfEq(LVar5, 0) + Switch(LVar6) + CaseLt(LVar2) + Call(SetNpcYaw, NPC_SELF, 90) + CaseGt(LVar2) + Call(SetNpcYaw, NPC_SELF, 270) + EndSwitch + Set(LVar6, LVar2) + Wait(1) + Else + BufRead1(LVar1) + Add(LVar3, LVar1) + Call(SetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) + Wait(3) + EndIf + EndLoop + EndLoop + Return + End }; #define KAMMY_NPC NPC_Kammy #include "world/common/util/GetKammyBroomEmitterPos.inc.c" EvtScript N(EVS_NpcAux_Kammy) = { - EVT_SET(MF_KammyFlying, FALSE) - EVT_CALL(GetNpcPos, NPC_Kammy, LVar6, LVar7, LVar8) - EVT_LOOP(0) - EVT_CALL(N(GetKammyBroomEmitterPos), MF_KammyFlying) - EVT_CALL(GetNpcPos, NPC_Kammy, LVar9, LVarA, LVarB) - EVT_SET(LVar3, LVar9) - EVT_SET(LVar4, LVarA) - EVT_SET(LVar5, LVarB) - EVT_SUBF(LVar3, LVar6) - EVT_SUBF(LVar4, LVar7) - EVT_SUBF(LVar5, LVar8) - EVT_SETF(LVar6, LVar9) - EVT_SETF(LVar7, LVarA) - EVT_SETF(LVar8, LVarB) - EVT_IF_NE(LVar3, 0) - EVT_IF_NE(LVar5, 0) - EVT_PLAY_EFFECT(EFFECT_PURPLE_RING, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_END_IF - EVT_WAIT(3) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(MF_KammyFlying, FALSE) + Call(GetNpcPos, NPC_Kammy, LVar6, LVar7, LVar8) + Loop(0) + Call(N(GetKammyBroomEmitterPos), MF_KammyFlying) + Call(GetNpcPos, NPC_Kammy, LVar9, LVarA, LVarB) + Set(LVar3, LVar9) + Set(LVar4, LVarA) + Set(LVar5, LVarB) + SubF(LVar3, LVar6) + SubF(LVar4, LVar7) + SubF(LVar5, LVar8) + SetF(LVar6, LVar9) + SetF(LVar7, LVarA) + SetF(LVar8, LVarB) + IfNe(LVar3, 0) + IfNe(LVar5, 0) + PlayEffect(EFFECT_PURPLE_RING, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.0)) + EndIf + EndIf + Wait(3) + EndLoop + Return + End }; Vec3f N(FlightPath_Kammy1)[] = { @@ -89,159 +89,159 @@ Vec3f N(FlightPath_Kammy3)[] = { }; EvtScript N(EVS_PlayKammyFlightSounds) = { - EVT_LOOP(0) - EVT_CALL(PlaySoundAtNpc, NPC_Kammy, SOUND_FLIGHT, SOUND_SPACE_DEFAULT) - EVT_WAIT(4) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(PlaySoundAtNpc, NPC_Kammy, SOUND_FLIGHT, SOUND_SPACE_DEFAULT) + Wait(4) + EndLoop + Return + End }; EvtScript N(EVS_Scene_KammySetAmbush) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(GF_OMO04_SpawnedPeachChoice1, TRUE) - EVT_SET(AB_OMO_CurrentPeachChoice, GB_OMO_PeachChoice1) - EVT_SWITCH(AB_OMO_CurrentPeachChoice) - EVT_CASE_EQ(0) - EVT_SET(MV_AmbushID, NPC_Goomba) - EVT_CASE_EQ(1) - EVT_SET(MV_AmbushID, NPC_Clubba) - EVT_CASE_EQ(2) - EVT_SET(MV_AmbushID, ITEM_MUSHROOM) - EVT_END_SWITCH - EVT_CALL(SetNpcPos, NPC_Kammy, 800, 140, -20) - EVT_CALL(SetNpcYaw, NPC_Kammy, 270) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim15) - EVT_IF_NE(AB_OMO_CurrentPeachChoice, 2) - EVT_CALL(SetNpcPos, MV_AmbushID, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 1100, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 1100, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(500.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(60 * DT) - EVT_EXEC_GET_TID(N(EVS_PlayKammyFlightSounds), MV_FlightSoundsScriptID) - EVT_SET(MF_KammyFlying, TRUE) - EVT_THREAD - EVT_WAIT(100 * DT) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) + Call(DisablePlayerInput, TRUE) + Set(GF_OMO04_SpawnedPeachChoice1, TRUE) + Set(AB_OMO_CurrentPeachChoice, GB_OMO_PeachChoice1) + Switch(AB_OMO_CurrentPeachChoice) + CaseEq(0) + Set(MV_AmbushID, NPC_Goomba) + CaseEq(1) + Set(MV_AmbushID, NPC_Clubba) + CaseEq(2) + Set(MV_AmbushID, ITEM_MUSHROOM) + EndSwitch + Call(SetNpcPos, NPC_Kammy, 800, 140, -20) + Call(SetNpcYaw, NPC_Kammy, 270) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim15) + IfNe(AB_OMO_CurrentPeachChoice, 2) + Call(SetNpcPos, MV_AmbushID, NPC_DISPOSE_LOCATION) + EndIf + Call(UseSettingsFrom, CAM_DEFAULT, 1100, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 1100, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(500.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-7.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(60 * DT) + ExecGetTID(N(EVS_PlayKammyFlightSounds), MV_FlightSoundsScriptID) + Set(MF_KammyFlying, TRUE) + Thread + Wait(100 * DT) + Call(SetCamDistance, CAM_DEFAULT, Float(350.0)) #if VERSION_PAL - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2 / DT)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2 / DT)) #else - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 2) + Call(SetCamSpeed, CAM_DEFAULT, 2) #endif - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_CALL(LoadPath, 150 * DT, EVT_PTR(N(FlightPath_Kammy1)), ARRAY_COUNT(N(FlightPath_Kammy1)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Kammy, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_NE(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(MF_KammyFlying, FALSE) - EVT_KILL_THREAD(MV_FlightSoundsScriptID) - EVT_CALL(PlaySoundAtNpc, NPC_Kammy, SOUND_SKID, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim10) - EVT_WAIT(1) - EVT_CALL(SetNpcRotation, NPC_Kammy, 0, 0, -5) - EVT_WAIT(1) - EVT_CALL(SetNpcRotation, NPC_Kammy, 0, 0, -10) - EVT_WAIT(1) - EVT_CALL(SetNpcRotation, NPC_Kammy, 0, 0, -15) - EVT_WAIT(1) - EVT_CALL(SetNpcRotation, NPC_Kammy, 0, 0, -10) - EVT_WAIT(1) - EVT_CALL(SetNpcRotation, NPC_Kammy, 0, 0, -15) - EVT_WAIT(1) - EVT_CALL(SetNpcRotation, NPC_Kammy, 0, 0, -10) - EVT_WAIT(1) - EVT_CALL(SetNpcRotation, NPC_Kammy, 0, 0, -15) - EVT_WAIT(1) - EVT_CALL(SetNpcRotation, NPC_Kammy, 0, 0, -10) - EVT_WAIT(1) - EVT_CALL(SetNpcRotation, NPC_Kammy, 0, 0, -15) - EVT_WAIT(3) - EVT_CALL(SetNpcRotation, NPC_Kammy, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(LoadPath, 10 * DT, EVT_PTR(N(FlightPath_Kammy2)), ARRAY_COUNT(N(FlightPath_Kammy2)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Kammy, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_NE(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(15 * DT) - EVT_CALL(SetNpcVar, NPC_Kammy, 0, 1) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim13) - EVT_WAIT(45 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0E) - EVT_CALL(GetNpcPos, NPC_Kammy, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 25) - EVT_ADD(LVar1, 38) - EVT_CALL(PlaySoundAt, SOUND_KAMMY_SUMMON_MAGIC, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 100) - EVT_WAIT(100 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0F) - EVT_ADD(LVar0, 55) - EVT_CALL(PlaySoundAt, SOUND_VANISH_IN_SMOKE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, 0, 0, 1, 15, 3, 8) - EVT_WAIT(5 * DT) - EVT_IF_NE(AB_OMO_CurrentPeachChoice, 2) - EVT_CALL(SetNpcPos, MV_AmbushID, LVar0, 0, 0) - EVT_ELSE - EVT_CALL(MakeItemEntity, MV_AmbushID, LVar0, 0, 0, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_END_IF - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim13) - EVT_WAIT(45 * DT) - EVT_SWITCH(AB_OMO_CurrentPeachChoice) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim16, ANIM_WorldKammy_Anim13, 517, MSG_CH4_0036) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim16, ANIM_WorldKammy_Anim13, 517, MSG_CH4_0037) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim16, ANIM_WorldKammy_Anim13, 517, MSG_CH4_0038) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim16, ANIM_WorldKammy_Anim13, 517, MSG_CH4_0039) - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim16, ANIM_WorldKammy_Anim13, 517, MSG_CH4_0034) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim16, ANIM_WorldKammy_Anim13, 517, MSG_CH4_0035) - EVT_END_SWITCH - EVT_CALL(SetNpcVar, NPC_Kammy, 0, 0) - EVT_WAIT(5 * DT) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(500.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_EXEC_GET_TID(N(EVS_PlayKammyFlightSounds), MV_FlightSoundsScriptID) - EVT_SET(MF_KammyFlying, TRUE) - EVT_THREAD - EVT_CALL(LoadPath, 130 * DT, EVT_PTR(N(FlightPath_Kammy3)), ARRAY_COUNT(N(FlightPath_Kammy3)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Kammy, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_NE(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(90 * DT) - EVT_IF_NE(AB_OMO_CurrentPeachChoice, 2) - EVT_CALL(PlaySoundAtNpc, MV_AmbushID, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, MV_AmbushID, EMOTE_QUESTION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(5 * DT) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("omo_04"), omo_04_ENTRY_0) - EVT_WAIT(100 * DT) - EVT_RETURN - EVT_END + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Call(LoadPath, 150 * DT, Ref(N(FlightPath_Kammy1)), ARRAY_COUNT(N(FlightPath_Kammy1)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Kammy, LVar1, LVar2, LVar3) + Wait(1) + IfNe(LVar0, 1) + BreakLoop + EndIf + EndLoop + Set(MF_KammyFlying, FALSE) + KillThread(MV_FlightSoundsScriptID) + Call(PlaySoundAtNpc, NPC_Kammy, SOUND_SKID, SOUND_SPACE_DEFAULT) + Thread + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim10) + Wait(1) + Call(SetNpcRotation, NPC_Kammy, 0, 0, -5) + Wait(1) + Call(SetNpcRotation, NPC_Kammy, 0, 0, -10) + Wait(1) + Call(SetNpcRotation, NPC_Kammy, 0, 0, -15) + Wait(1) + Call(SetNpcRotation, NPC_Kammy, 0, 0, -10) + Wait(1) + Call(SetNpcRotation, NPC_Kammy, 0, 0, -15) + Wait(1) + Call(SetNpcRotation, NPC_Kammy, 0, 0, -10) + Wait(1) + Call(SetNpcRotation, NPC_Kammy, 0, 0, -15) + Wait(1) + Call(SetNpcRotation, NPC_Kammy, 0, 0, -10) + Wait(1) + Call(SetNpcRotation, NPC_Kammy, 0, 0, -15) + Wait(3) + Call(SetNpcRotation, NPC_Kammy, 0, 0, 0) + EndThread + Call(LoadPath, 10 * DT, Ref(N(FlightPath_Kammy2)), ARRAY_COUNT(N(FlightPath_Kammy2)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Kammy, LVar1, LVar2, LVar3) + Wait(1) + IfNe(LVar0, 1) + BreakLoop + EndIf + EndLoop + Wait(15 * DT) + Call(SetNpcVar, NPC_Kammy, 0, 1) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim13) + Wait(45 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0E) + Call(GetNpcPos, NPC_Kammy, LVar0, LVar1, LVar2) + Add(LVar0, 25) + Add(LVar1, 38) + Call(PlaySoundAt, SOUND_KAMMY_SUMMON_MAGIC, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, Float(1.0), 100) + Wait(100 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0F) + Add(LVar0, 55) + Call(PlaySoundAt, SOUND_VANISH_IN_SMOKE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, 0, 0, 1, 15, 3, 8) + Wait(5 * DT) + IfNe(AB_OMO_CurrentPeachChoice, 2) + Call(SetNpcPos, MV_AmbushID, LVar0, 0, 0) + Else + Call(MakeItemEntity, MV_AmbushID, LVar0, 0, 0, ITEM_SPAWN_MODE_DECORATION, 0) + EndIf + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim13) + Wait(45 * DT) + Switch(AB_OMO_CurrentPeachChoice) + CaseEq(0) + Call(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim16, ANIM_WorldKammy_Anim13, 517, MSG_CH4_0036) + Wait(30 * DT) + Call(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim16, ANIM_WorldKammy_Anim13, 517, MSG_CH4_0037) + CaseEq(1) + Call(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim16, ANIM_WorldKammy_Anim13, 517, MSG_CH4_0038) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim16, ANIM_WorldKammy_Anim13, 517, MSG_CH4_0039) + CaseEq(2) + Call(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim16, ANIM_WorldKammy_Anim13, 517, MSG_CH4_0034) + Wait(30 * DT) + Call(SpeakToPlayer, NPC_Kammy, ANIM_WorldKammy_Anim16, ANIM_WorldKammy_Anim13, 517, MSG_CH4_0035) + EndSwitch + Call(SetNpcVar, NPC_Kammy, 0, 0) + Wait(5 * DT) + Call(SetCamDistance, CAM_DEFAULT, Float(500.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + ExecGetTID(N(EVS_PlayKammyFlightSounds), MV_FlightSoundsScriptID) + Set(MF_KammyFlying, TRUE) + Thread + Call(LoadPath, 130 * DT, Ref(N(FlightPath_Kammy3)), ARRAY_COUNT(N(FlightPath_Kammy3)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Kammy, LVar1, LVar2, LVar3) + Wait(1) + IfNe(LVar0, 1) + BreakLoop + EndIf + EndLoop + EndThread + Wait(90 * DT) + IfNe(AB_OMO_CurrentPeachChoice, 2) + Call(PlaySoundAtNpc, MV_AmbushID, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) + Call(ShowEmote, MV_AmbushID, EMOTE_QUESTION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) + Wait(5 * DT) + EndIf + Call(GotoMap, Ref("omo_04"), omo_04_ENTRY_0) + Wait(100 * DT) + Return + End }; diff --git a/src/world/area_omo/omo_05/omo_05_1_music.c b/src/world/area_omo/omo_05/omo_05_1_music.c index 4806dca2205..cc02c9a2898 100644 --- a/src/world/area_omo/omo_05/omo_05_1_music.c +++ b/src/world/area_omo/omo_05/omo_05_1_music.c @@ -1,7 +1,7 @@ #include "omo_05.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) + Return + End }; diff --git a/src/world/area_omo/omo_05/omo_05_2_main.c b/src/world/area_omo/omo_05/omo_05_2_main.c index c24baf8f247..4b6e2c8dbe9 100644 --- a/src/world/area_omo/omo_05/omo_05_2_main.c +++ b/src/world/area_omo/omo_05/omo_05_2_main.c @@ -6,35 +6,35 @@ EvtScript N(EVS_ExitWalk_omo_17_1) = EVT_EXIT_WALK(60, omo_05_ENTRY_1, "omo_17", MAP_RODATA_PAD(1, exits); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_17_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_17_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili4, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_omo_17_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_omo_17_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili4, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupGizmos)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetGroupVisibility, MODEL_popo, MODEL_GROUP_HIDDEN) - EVT_IF_GE(GB_StoryProgress, STORY_CH4_GAVE_CAKE_TO_GOURMET_GUY) - EVT_CALL(RotateModel, MODEL_o331, 105, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o332, 105, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o333, 105, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o328, 105, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o329, 105, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o330, 105, 0, 1, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt2, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupGizmos)) + Exec(N(EVS_SetupMusic)) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetGroupVisibility, MODEL_popo, MODEL_GROUP_HIDDEN) + IfGe(GB_StoryProgress, STORY_CH4_GAVE_CAKE_TO_GOURMET_GUY) + Call(RotateModel, MODEL_o331, 105, 0, 1, 0) + Call(RotateModel, MODEL_o332, 105, 0, 1, 0) + Call(RotateModel, MODEL_o333, 105, 0, 1, 0) + Call(RotateModel, MODEL_o328, 105, 0, 1, 0) + Call(RotateModel, MODEL_o329, 105, 0, 1, 0) + Call(RotateModel, MODEL_o330, 105, 0, 1, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt2, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; diff --git a/src/world/area_omo/omo_05/omo_05_3_gizmos.c b/src/world/area_omo/omo_05/omo_05_3_gizmos.c index 307930b4832..b4e4c39d735 100644 --- a/src/world/area_omo/omo_05/omo_05_3_gizmos.c +++ b/src/world/area_omo/omo_05/omo_05_3_gizmos.c @@ -1,85 +1,85 @@ #include "omo_05.h" EvtScript N(EVS_Gizmos_Wheels) = { - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, -360, 100, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_ha1, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha2, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha3, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha4, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha5, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha6, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha7, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha8, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha9, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha10, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha11, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha12, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha13, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(MakeLerp, 0, -360, 100, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_ha1, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha2, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha3, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha4, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha5, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha6, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha7, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha8, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha9, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha10, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha11, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha12, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha13, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_Gizmos_Shutters) = { - EVT_LABEL(0) - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, 160, 60, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m2_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m2_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m3_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m3_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m4_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m4_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m5_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m5_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m6_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m6_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m7_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m7_2, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(MakeLerp, 160, 0, 60, EASING_COS_IN_OUT) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m2_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m2_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m3_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m3_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m4_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m4_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m5_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m5_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m6_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m6_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m7_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m7_2, LVar0, 0, 1, 0) - EVT_WAIT(2) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Label(0) + Call(MakeLerp, 0, 160, 60, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m2_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m2_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m3_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m3_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m4_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m4_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m5_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m5_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m6_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m6_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m7_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m7_2, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(MakeLerp, 160, 0, 60, EASING_COS_IN_OUT) + Label(2) + Call(UpdateLerp) + Call(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m2_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m2_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m3_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m3_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m4_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m4_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m5_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m5_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m6_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m6_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m7_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m7_2, LVar0, 0, 1, 0) + Wait(2) + IfEq(LVar1, 1) + Goto(2) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_SetupGizmos) = { - EVT_EXEC(N(EVS_Gizmos_Wheels)) - EVT_EXEC(N(EVS_Gizmos_Shutters)) - EVT_RETURN - EVT_END + Exec(N(EVS_Gizmos_Wheels)) + Exec(N(EVS_Gizmos_Shutters)) + Return + End }; diff --git a/src/world/area_omo/omo_05/omo_05_4_npc.c b/src/world/area_omo/omo_05/omo_05_4_npc.c index 0c542e6253d..a3bed591752 100644 --- a/src/world/area_omo/omo_05/omo_05_4_npc.c +++ b/src/world/area_omo/omo_05/omo_05_4_npc.c @@ -55,339 +55,339 @@ API_CALLABLE(N(MakeAllConsumablesItemList)) { } EvtScript N(EVS_NpcInteract_GourmetGuy) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, 0, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, 0, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.5), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(N(MakeAllConsumablesItemList)) - EVT_CALL(NpcFacePlayer, NPC_SELF, 1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GourmetGuy_Idle) - EVT_IF_EQ(GF_OMO01_Met_GourmetGuy, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 0, MSG_CH4_0040) - EVT_SET(GF_OMO01_Met_GourmetGuy, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 0, MSG_CH4_0041) - EVT_END_IF + Call(DisablePlayerInput, TRUE) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, 0, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, 0, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(SetCamPitch, CAM_DEFAULT, Float(17.5), Float(-10.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(N(MakeAllConsumablesItemList)) + Call(NpcFacePlayer, NPC_SELF, 1) + Call(SetNpcAnimation, NPC_SELF, ANIM_GourmetGuy_Idle) + IfEq(GF_OMO01_Met_GourmetGuy, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 0, MSG_CH4_0040) + Set(GF_OMO01_Met_GourmetGuy, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 0, MSG_CH4_0041) + EndIf EVT_CHOOSE_CONSUMABLE_FROM(N(AllConsumables), -1) - EVT_IF_LE(LVar0, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GourmetGuy_SitIdle) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(8.0 / DT)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar8, LVar0) - EVT_CALL(N(JudgeFoodQuality), LVar0) - EVT_CALL(MakeItemEntity, LVar8, -255, 35, 110, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVar7, LVar0) - EVT_CALL(SetItemFlags, LVar7, 64, 1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GourmetGuy_Eat) - EVT_LOOP(6) - EVT_WAIT(10 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_EAT_OR_DRINK, SOUND_SPACE_DEFAULT) - EVT_END_LOOP - EVT_IF_NE(LVar9, 2) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(10.0 / DT)) - EVT_WAIT(10 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SPIT_OUT, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GourmetGuy_SpitOut) - EVT_CALL(SetItemFlags, LVar7, 64, 0) - EVT_CALL(GetAngleToPlayer, NPC_SELF, LVar0) - EVT_IF_LT(LVar0, 180) - EVT_CALL(MakeLerp, 0, 100, 7 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, EVT_FLOAT(-1.0)) - EVT_SETF(LVar3, EVT_FLOAT(-0.35)) - EVT_SETF(LVar4, EVT_FLOAT(0.0)) - EVT_MULF(LVar2, LVar0) - EVT_MULF(LVar3, LVar0) - EVT_MULF(LVar4, LVar0) - EVT_ADDF(LVar2, EVT_FLOAT(-270.0)) - EVT_ADDF(LVar3, EVT_FLOAT(35.0)) - EVT_ADDF(LVar4, EVT_FLOAT(110.0)) - EVT_CALL(SetItemPos, LVar7, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 0, 100, 7 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, EVT_FLOAT(-1.0)) - EVT_SETF(LVar3, EVT_FLOAT(0.35)) - EVT_SETF(LVar4, EVT_FLOAT(0.0)) - EVT_MULF(LVar2, LVar0) - EVT_MULF(LVar3, LVar0) - EVT_MULF(LVar4, LVar0) - EVT_ADDF(LVar2, EVT_FLOAT(-355.0)) - EVT_ADDF(LVar3, EVT_FLOAT(0.0)) - EVT_ADDF(LVar4, EVT_FLOAT(110.0)) - EVT_CALL(SetItemPos, LVar7, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_ELSE - EVT_CALL(MakeLerp, 0, 100, 7 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, EVT_FLOAT(1.0)) - EVT_SETF(LVar3, EVT_FLOAT(-0.35)) - EVT_SETF(LVar4, EVT_FLOAT(0.0)) - EVT_MULF(LVar2, LVar0) - EVT_MULF(LVar3, LVar0) - EVT_MULF(LVar4, LVar0) - EVT_ADDF(LVar2, EVT_FLOAT(-240.0)) - EVT_ADDF(LVar3, EVT_FLOAT(35.0)) - EVT_ADDF(LVar4, EVT_FLOAT(110.0)) - EVT_CALL(SetItemPos, LVar7, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 0, 100, 7 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, EVT_FLOAT(1.0)) - EVT_SETF(LVar3, EVT_FLOAT(0.35)) - EVT_SETF(LVar4, EVT_FLOAT(0.0)) - EVT_MULF(LVar2, LVar0) - EVT_MULF(LVar3, LVar0) - EVT_MULF(LVar4, LVar0) - EVT_ADDF(LVar2, EVT_FLOAT(-155.0)) - EVT_ADDF(LVar3, EVT_FLOAT(0.0)) - EVT_ADDF(LVar4, EVT_FLOAT(110.0)) - EVT_CALL(SetItemPos, LVar7, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_END_IF - EVT_CALL(RemoveItemEntity, LVar7) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GourmetGuy_Idle) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 0, MSG_CH4_0042) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GourmetGuy_SitIdle) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 0, MSG_CH4_0043) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GourmetGuy_SitIdle) - EVT_CASE_EQ(2) - EVT_THREAD - EVT_CALL(ShowMessageAtScreenPos, MSG_CH4_0044, 160, 40) - EVT_END_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GourmetGuy_Surprise) - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_GourmetGuy_Fork, NPC_FLAG_INVISIBLE, FALSE) - EVT_CALL(GetNpcPos, NPC_GourmetGuy_Fork, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_GourmetGuy_Fork, EVT_FLOAT(0.05)) - EVT_CALL(NpcJump0, NPC_GourmetGuy_Fork, LVar0, 2, LVar2, 8 * DT) - EVT_CALL(SetNpcRotationPivot, NPC_GourmetGuy_Fork, 15) - EVT_SET(LVar3, 0) - EVT_LOOP(5) - EVT_ADD(LVar3, 50) - EVT_CALL(SetNpcRotation, NPC_GourmetGuy_Fork, 0, 0, LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_ADD(LVar2, 20) - EVT_CALL(SetNpcJumpscale, NPC_GourmetGuy_Fork, EVT_FLOAT(0.2)) - EVT_CALL(NpcJump0, NPC_GourmetGuy_Fork, LVar0, -10, LVar2, 8 * DT) - EVT_WAIT(10 * DT) - EVT_CALL(RemoveNpc, NPC_GourmetGuy_Fork) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_GourmetGuy_Knife, NPC_FLAG_INVISIBLE, FALSE) - EVT_CALL(GetNpcPos, NPC_GourmetGuy_Knife, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_GourmetGuy_Knife, EVT_FLOAT(0.05)) - EVT_CALL(NpcJump0, NPC_GourmetGuy_Knife, LVar0, 2, LVar2, 8 * DT) - EVT_CALL(SetNpcRotationPivot, NPC_GourmetGuy_Knife, 15) - EVT_SET(LVar3, 0) - EVT_LOOP(5) - EVT_SUB(LVar3, 50) - EVT_CALL(SetNpcRotation, NPC_GourmetGuy_Knife, 0, 0, LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_ADD(LVar2, 20) - EVT_CALL(SetNpcJumpscale, NPC_GourmetGuy_Knife, EVT_FLOAT(0.2)) - EVT_CALL(NpcJump0, NPC_GourmetGuy_Knife, LVar0, -10, LVar2, 8 * DT) - EVT_WAIT(10 * DT) - EVT_CALL(RemoveNpc, NPC_GourmetGuy_Knife) - EVT_END_THREAD - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -250, 25, -100) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -250, 25, -100) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(420.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(12.0), EVT_FLOAT(-1.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(25.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_GOURMET_GUY_SHOCK_1, SOUND_SPACE_DEFAULT) - EVT_WAIT(33 * DT) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(320.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(13.0), EVT_FLOAT(-0.8)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(25.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_GOURMET_GUY_SHOCK_2, SOUND_SPACE_DEFAULT) - EVT_WAIT(33 * DT) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(14.0), EVT_FLOAT(0.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(25.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_GOURMET_GUY_SHOCK_3, SOUND_SPACE_DEFAULT) - EVT_WAIT(18 * DT) - EVT_CALL(SetMusicTrack, 0, SONG_GOURMET_GUY_FREAKOUT, 0, 8) - EVT_WAIT(30 * DT) - EVT_CALL(SetMotionBlurParams, 0, 0, 0, 320, 240, 128, 10) - EVT_LOOP(7) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(320.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(14.0), EVT_FLOAT(0.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(15.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(14.0), EVT_FLOAT(0.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(15.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_LOOP - EVT_CALL(RotateModel, MODEL_o331, 105, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o332, 105, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o333, 105, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o328, 105, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o329, 105, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o330, 105, 0, 1, 0) - EVT_WAIT(5 * DT) - EVT_CALL(N(SpinCameraAround)) - EVT_CALL(N(SpinCameraAround)) - EVT_CALL(N(SpinCameraAround)) - EVT_CALL(SetMotionBlurParams, 0, 0, 0, 320, 240, 0, 10) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -250, 0, 100) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -250, 0, 100) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetSelfVar, 0, 1) - EVT_THREAD - EVT_LABEL(19) - EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(19) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_GOURMET_GUY_RUN, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GourmetGuy_Panic) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(20.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_SELF, 0, 110, 0) - EVT_WAIT(20 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_GOURMET_GUY_RUN, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_UPSIDE_DOWN, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, 0, 145, 110) - EVT_CALL(NpcMoveTo, NPC_SELF, -500, 110, 0) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_UPSIDE_DOWN, FALSE) - EVT_WAIT(20 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_GOURMET_GUY_RUN, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, -45) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_CALL(MakeLerp, 0, 100, 30 * DT, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, EVT_FLOAT(3.95)) - EVT_SETF(LVar3, EVT_FLOAT(-1.9)) - EVT_SETF(LVar4, EVT_FLOAT(0.0)) - EVT_MULF(LVar2, LVar0) - EVT_MULF(LVar3, LVar0) - EVT_MULF(LVar4, LVar0) - EVT_ADDF(LVar2, EVT_FLOAT(-445.0)) - EVT_ADDF(LVar3, EVT_FLOAT(130.0)) - EVT_ADDF(LVar4, EVT_FLOAT(230.0)) - EVT_CALL(SetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_WAIT(20 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_GOURMET_GUY_RUN, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, 0) - EVT_CALL(SetNpcPos, NPC_SELF, -500, 0, 110) - EVT_CALL(NpcMoveTo, NPC_SELF, -250, 110, 0) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GourmetGuy_TalkSurprise) - EVT_THREAD - EVT_WAIT(15 * DT) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(-2.5), EVT_FLOAT(-24.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.5 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(15 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_GOURMET_GUY_LAUNCH, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GourmetGuy_Leap) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.002)) - EVT_CALL(NpcJump0, NPC_SELF, -250, 500, 110, 40 * DT) - EVT_CALL(SetSelfVar, 0, 2) - EVT_END_THREAD - EVT_CALL(ShowMessageAtScreenPos, MSG_CH4_0045, 160, 40) - EVT_LABEL(12) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 2) - EVT_WAIT(1) - EVT_GOTO(12) - EVT_END_IF - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(MakeItemEntity, ITEM_COOKBOOK, LVar0, 400, LVar2, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_OMO05_Item_Cookbook) - EVT_WAIT(30 * DT) - EVT_CALL(EnablePartnerAI) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Thinking) - EVT_WAIT(1) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_WAIT(60 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt2, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GB_StoryProgress, STORY_CH4_GAVE_CAKE_TO_GOURMET_GUY) - EVT_END_SWITCH - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH4_GAVE_CAKE_TO_GOURMET_GUY) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfLe(LVar0, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_GourmetGuy_SitIdle) + Call(ResetCam, CAM_DEFAULT, Float(8.0 / DT)) + Call(DisablePlayerInput, FALSE) + Return + EndIf + Set(LVar8, LVar0) + Call(N(JudgeFoodQuality), LVar0) + Call(MakeItemEntity, LVar8, -255, 35, 110, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVar7, LVar0) + Call(SetItemFlags, LVar7, 64, 1) + Call(SetNpcAnimation, NPC_SELF, ANIM_GourmetGuy_Eat) + Loop(6) + Wait(10 * DT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_EAT_OR_DRINK, SOUND_SPACE_DEFAULT) + EndLoop + IfNe(LVar9, 2) + Call(ResetCam, CAM_DEFAULT, Float(10.0 / DT)) + Wait(10 * DT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SPIT_OUT, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_SELF, ANIM_GourmetGuy_SpitOut) + Call(SetItemFlags, LVar7, 64, 0) + Call(GetAngleToPlayer, NPC_SELF, LVar0) + IfLt(LVar0, 180) + Call(MakeLerp, 0, 100, 7 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, Float(-1.0)) + SetF(LVar3, Float(-0.35)) + SetF(LVar4, Float(0.0)) + MulF(LVar2, LVar0) + MulF(LVar3, LVar0) + MulF(LVar4, LVar0) + AddF(LVar2, Float(-270.0)) + AddF(LVar3, Float(35.0)) + AddF(LVar4, Float(110.0)) + Call(SetItemPos, LVar7, LVar2, LVar3, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 0, 100, 7 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, Float(-1.0)) + SetF(LVar3, Float(0.35)) + SetF(LVar4, Float(0.0)) + MulF(LVar2, LVar0) + MulF(LVar3, LVar0) + MulF(LVar4, LVar0) + AddF(LVar2, Float(-355.0)) + AddF(LVar3, Float(0.0)) + AddF(LVar4, Float(110.0)) + Call(SetItemPos, LVar7, LVar2, LVar3, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Else + Call(MakeLerp, 0, 100, 7 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, Float(1.0)) + SetF(LVar3, Float(-0.35)) + SetF(LVar4, Float(0.0)) + MulF(LVar2, LVar0) + MulF(LVar3, LVar0) + MulF(LVar4, LVar0) + AddF(LVar2, Float(-240.0)) + AddF(LVar3, Float(35.0)) + AddF(LVar4, Float(110.0)) + Call(SetItemPos, LVar7, LVar2, LVar3, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 0, 100, 7 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, Float(1.0)) + SetF(LVar3, Float(0.35)) + SetF(LVar4, Float(0.0)) + MulF(LVar2, LVar0) + MulF(LVar3, LVar0) + MulF(LVar4, LVar0) + AddF(LVar2, Float(-155.0)) + AddF(LVar3, Float(0.0)) + AddF(LVar4, Float(110.0)) + Call(SetItemPos, LVar7, LVar2, LVar3, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndIf + EndIf + Call(RemoveItemEntity, LVar7) + Call(SetNpcAnimation, NPC_SELF, ANIM_GourmetGuy_Idle) + Switch(LVar9) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 0, MSG_CH4_0042) + Call(SetNpcAnimation, NPC_SELF, ANIM_GourmetGuy_SitIdle) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_GourmetGuy_Talk, ANIM_GourmetGuy_Idle, 0, MSG_CH4_0043) + Call(SetNpcAnimation, NPC_SELF, ANIM_GourmetGuy_SitIdle) + CaseEq(2) + Thread + Call(ShowMessageAtScreenPos, MSG_CH4_0044, 160, 40) + EndThread + Call(DisablePartnerAI, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_GourmetGuy_Surprise) + Thread + Call(SetNpcFlagBits, NPC_GourmetGuy_Fork, NPC_FLAG_INVISIBLE, FALSE) + Call(GetNpcPos, NPC_GourmetGuy_Fork, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_GourmetGuy_Fork, Float(0.05)) + Call(NpcJump0, NPC_GourmetGuy_Fork, LVar0, 2, LVar2, 8 * DT) + Call(SetNpcRotationPivot, NPC_GourmetGuy_Fork, 15) + Set(LVar3, 0) + Loop(5) + Add(LVar3, 50) + Call(SetNpcRotation, NPC_GourmetGuy_Fork, 0, 0, LVar3) + Wait(1) + EndLoop + Add(LVar2, 20) + Call(SetNpcJumpscale, NPC_GourmetGuy_Fork, Float(0.2)) + Call(NpcJump0, NPC_GourmetGuy_Fork, LVar0, -10, LVar2, 8 * DT) + Wait(10 * DT) + Call(RemoveNpc, NPC_GourmetGuy_Fork) + EndThread + Thread + Call(SetNpcFlagBits, NPC_GourmetGuy_Knife, NPC_FLAG_INVISIBLE, FALSE) + Call(GetNpcPos, NPC_GourmetGuy_Knife, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_GourmetGuy_Knife, Float(0.05)) + Call(NpcJump0, NPC_GourmetGuy_Knife, LVar0, 2, LVar2, 8 * DT) + Call(SetNpcRotationPivot, NPC_GourmetGuy_Knife, 15) + Set(LVar3, 0) + Loop(5) + Sub(LVar3, 50) + Call(SetNpcRotation, NPC_GourmetGuy_Knife, 0, 0, LVar3) + Wait(1) + EndLoop + Add(LVar2, 20) + Call(SetNpcJumpscale, NPC_GourmetGuy_Knife, Float(0.2)) + Call(NpcJump0, NPC_GourmetGuy_Knife, LVar0, -10, LVar2, 8 * DT) + Wait(10 * DT) + Call(RemoveNpc, NPC_GourmetGuy_Knife) + EndThread + Call(UseSettingsFrom, CAM_DEFAULT, -250, 25, -100) + Call(SetPanTarget, CAM_DEFAULT, -250, 25, -100) + Call(SetCamDistance, CAM_DEFAULT, Float(420.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(12.0), Float(-1.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(25.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_GOURMET_GUY_SHOCK_1, SOUND_SPACE_DEFAULT) + Wait(33 * DT) + Call(SetCamDistance, CAM_DEFAULT, Float(320.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(13.0), Float(-0.8)) + Call(SetCamSpeed, CAM_DEFAULT, Float(25.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_GOURMET_GUY_SHOCK_2, SOUND_SPACE_DEFAULT) + Wait(33 * DT) + Call(SetCamDistance, CAM_DEFAULT, Float(250.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(14.0), Float(0.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(25.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_GOURMET_GUY_SHOCK_3, SOUND_SPACE_DEFAULT) + Wait(18 * DT) + Call(SetMusicTrack, 0, SONG_GOURMET_GUY_FREAKOUT, 0, 8) + Wait(30 * DT) + Call(SetMotionBlurParams, 0, 0, 0, 320, 240, 128, 10) + Loop(7) + Call(SetCamDistance, CAM_DEFAULT, Float(320.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(14.0), Float(0.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(15.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(250.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(14.0), Float(0.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(15.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndLoop + Call(RotateModel, MODEL_o331, 105, 0, 1, 0) + Call(RotateModel, MODEL_o332, 105, 0, 1, 0) + Call(RotateModel, MODEL_o333, 105, 0, 1, 0) + Call(RotateModel, MODEL_o328, 105, 0, 1, 0) + Call(RotateModel, MODEL_o329, 105, 0, 1, 0) + Call(RotateModel, MODEL_o330, 105, 0, 1, 0) + Wait(5 * DT) + Call(N(SpinCameraAround)) + Call(N(SpinCameraAround)) + Call(N(SpinCameraAround)) + Call(SetMotionBlurParams, 0, 0, 0, 320, 240, 0, 10) + Call(UseSettingsFrom, CAM_DEFAULT, -250, 0, 100) + Call(SetPanTarget, CAM_DEFAULT, -250, 0, 100) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetSelfVar, 0, 1) + Thread + Label(19) + Call(PlayerFaceNpc, NPC_SELF, FALSE) + Call(GetSelfVar, 0, LVar0) + IfNe(LVar0, 0) + Wait(1) + Goto(19) + EndIf + EndThread + Call(PlaySoundAtNpc, NPC_SELF, SOUND_GOURMET_GUY_RUN, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_SELF, ANIM_GourmetGuy_Panic) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcSpeed, NPC_SELF, Float(20.0 / DT)) + Call(NpcMoveTo, NPC_SELF, 0, 110, 0) + Wait(20 * DT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_GOURMET_GUY_RUN, SOUND_SPACE_DEFAULT) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_UPSIDE_DOWN, TRUE) + Call(SetNpcPos, NPC_SELF, 0, 145, 110) + Call(NpcMoveTo, NPC_SELF, -500, 110, 0) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_UPSIDE_DOWN, FALSE) + Wait(20 * DT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_GOURMET_GUY_RUN, SOUND_SPACE_DEFAULT) + Call(SetNpcRotation, NPC_SELF, 0, 0, -45) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Call(MakeLerp, 0, 100, 30 * DT, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + SetF(LVar2, Float(3.95)) + SetF(LVar3, Float(-1.9)) + SetF(LVar4, Float(0.0)) + MulF(LVar2, LVar0) + MulF(LVar3, LVar0) + MulF(LVar4, LVar0) + AddF(LVar2, Float(-445.0)) + AddF(LVar3, Float(130.0)) + AddF(LVar4, Float(230.0)) + Call(SetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Wait(20 * DT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_GOURMET_GUY_RUN, SOUND_SPACE_DEFAULT) + Call(SetNpcRotation, NPC_SELF, 0, 0, 0) + Call(SetNpcPos, NPC_SELF, -500, 0, 110) + Call(NpcMoveTo, NPC_SELF, -250, 110, 0) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_GourmetGuy_TalkSurprise) + Thread + Wait(15 * DT) + Call(SetCamPitch, CAM_DEFAULT, Float(-2.5), Float(-24.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.5 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Thread + Wait(15 * DT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_GOURMET_GUY_LAUNCH, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_SELF, ANIM_GourmetGuy_Leap) + Call(SetNpcJumpscale, NPC_SELF, Float(0.002)) + Call(NpcJump0, NPC_SELF, -250, 500, 110, 40 * DT) + Call(SetSelfVar, 0, 2) + EndThread + Call(ShowMessageAtScreenPos, MSG_CH4_0045, 160, 40) + Label(12) + Call(GetSelfVar, 0, LVar0) + IfNe(LVar0, 2) + Wait(1) + Goto(12) + EndIf + Call(SetSelfVar, 0, 0) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(MakeItemEntity, ITEM_COOKBOOK, LVar0, 400, LVar2, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_OMO05_Item_Cookbook) + Wait(30 * DT) + Call(EnablePartnerAI) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Thinking) + Wait(1) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Wait(60 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt2, COLLIDER_FLAGS_UPPER_MASK) + Set(GB_StoryProgress, STORY_CH4_GAVE_CAKE_TO_GOURMET_GUY) + EndSwitch + Exec(N(EVS_SetupMusic)) + Call(DisablePlayerInput, FALSE) + IfEq(GB_StoryProgress, STORY_CH4_GAVE_CAKE_TO_GOURMET_GUY) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_GourmetGuy) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH4_GAVE_CAKE_TO_GOURMET_GUY) - EVT_CALL(RemoveNpc, NPC_GourmetGuy_Fork) - EVT_CALL(RemoveNpc, NPC_GourmetGuy_Knife) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_ELSE - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GourmetGuy_SitIdle) - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy_Fork, ANIM_GourmetGuy_Fork) - EVT_CALL(SetNpcFlagBits, NPC_GourmetGuy_Fork, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetNpcPos, NPC_GourmetGuy_Fork, -285, 50, 90) - EVT_CALL(SetNpcAnimation, NPC_GourmetGuy_Knife, ANIM_GourmetGuy_Knife) - EVT_CALL(SetNpcFlagBits, NPC_GourmetGuy_Knife, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetNpcPos, NPC_GourmetGuy_Knife, -210, 50, 90) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_GourmetGuy))) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH4_GAVE_CAKE_TO_GOURMET_GUY) + Call(RemoveNpc, NPC_GourmetGuy_Fork) + Call(RemoveNpc, NPC_GourmetGuy_Knife) + Call(RemoveNpc, NPC_SELF) + Else + Call(SetNpcAnimation, NPC_SELF, ANIM_GourmetGuy_SitIdle) + Call(SetNpcAnimation, NPC_GourmetGuy_Fork, ANIM_GourmetGuy_Fork) + Call(SetNpcFlagBits, NPC_GourmetGuy_Fork, NPC_FLAG_INVISIBLE, TRUE) + Call(SetNpcPos, NPC_GourmetGuy_Fork, -285, 50, 90) + Call(SetNpcAnimation, NPC_GourmetGuy_Knife, ANIM_GourmetGuy_Knife) + Call(SetNpcFlagBits, NPC_GourmetGuy_Knife, NPC_FLAG_INVISIBLE, TRUE) + Call(SetNpcPos, NPC_GourmetGuy_Knife, -210, 50, 90) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_GourmetGuy))) + EndIf + Return + End }; NpcData N(NpcData_GourmetGuy)[] = { diff --git a/src/world/area_omo/omo_05/omo_05_5_entity.c b/src/world/area_omo/omo_05/omo_05_5_entity.c index 43b8aea44fe..cfd8a68ef76 100644 --- a/src/world/area_omo/omo_05/omo_05_5_entity.c +++ b/src/world/area_omo/omo_05/omo_05_5_entity.c @@ -2,19 +2,19 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 400, 70, -150, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OMO05_ItemBlock_CoinA) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 550, 70, -150, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OMO05_ItemBlock_CoinB) - EVT_IF_EQ(GF_OMO05_Item_Cookbook, FALSE) - EVT_IF_GT(GB_StoryProgress, STORY_CH4_GOT_TAYCE_TS_CAKE) - EVT_CALL(MakeItemEntity, ITEM_COOKBOOK, -250, 0, 120, ITEM_SPAWN_MODE_KEY, GF_OMO05_Item_Cookbook) - EVT_END_IF - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 475, 70, -150, 0, ITEM_DIZZY_DIAL, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OMO05_HiddenItem_DizzyDial) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), -540, 70, -150, 0, ITEM_SUPER_SODA, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OMO05_HiddenItem_SuperSoda) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_YellowBlock), 400, 70, -150, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OMO05_ItemBlock_CoinA) + Call(MakeEntity, Ref(Entity_YellowBlock), 550, 70, -150, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OMO05_ItemBlock_CoinB) + IfEq(GF_OMO05_Item_Cookbook, FALSE) + IfGt(GB_StoryProgress, STORY_CH4_GOT_TAYCE_TS_CAKE) + Call(MakeItemEntity, ITEM_COOKBOOK, -250, 0, 120, ITEM_SPAWN_MODE_KEY, GF_OMO05_Item_Cookbook) + EndIf + EndIf + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 475, 70, -150, 0, ITEM_DIZZY_DIAL, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OMO05_HiddenItem_DizzyDial) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), -540, 70, -150, 0, ITEM_SUPER_SODA, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OMO05_HiddenItem_SuperSoda) + Return + End }; diff --git a/src/world/area_omo/omo_06/omo_06_1_music.c b/src/world/area_omo/omo_06/omo_06_1_music.c index e54a91fb168..aea692528be 100644 --- a/src/world/area_omo/omo_06/omo_06_1_music.c +++ b/src/world/area_omo/omo_06/omo_06_1_music.c @@ -1,18 +1,18 @@ #include "omo_06.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) - EVT_ELSE - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_RANGE(omo_06_ENTRY_2, omo_06_ENTRY_3) - EVT_CALL(SetMusicTrack, 0, SONG_TOYBOX_TRAIN, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Call(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) + Else + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseRange(omo_06_ENTRY_2, omo_06_ENTRY_3) + Call(SetMusicTrack, 0, SONG_TOYBOX_TRAIN, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) + EndSwitch + EndIf + Return + End }; diff --git a/src/world/area_omo/omo_06/omo_06_2_main.c b/src/world/area_omo/omo_06/omo_06_2_main.c index 06fe8dd75ee..8a13fa6fd60 100644 --- a/src/world/area_omo/omo_06/omo_06_2_main.c +++ b/src/world/area_omo/omo_06/omo_06_2_main.c @@ -5,58 +5,58 @@ EvtScript N(EVS_ExitWalk_omo_17_3) = EVT_EXIT_WALK(60, omo_06_ENTRY_1, "omo_17", EvtScript N(EVS_ExitWalk_omo_07_0) = EVT_EXIT_WALK(60, omo_06_ENTRY_4, "omo_07", omo_07_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_17_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_17_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilit5, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_07_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_omo_17_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_omo_17_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilit5, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_omo_07_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_RANGE(omo_06_ENTRY_2, omo_06_ENTRY_3) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_WAIT(3) - EVT_CASE_DEFAULT - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseRange(omo_06_ENTRY_2, omo_06_ENTRY_3) + Exec(N(EVS_BindExitTriggers)) + Wait(3) + CaseDefault + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() + Set(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() #if VERSION_PAL - EVT_CALL(GetLanguage, LVar0) - EVT_SWITCH(LVar0) - EVT_IF_GE(LVar0, LANGUAGE_FR) // or LANGUAGE_ES - EVT_SUB(LVar0, LANGUAGE_FR - LANGUAGE_EN) - EVT_END_IF - EVT_CALL(SetModelTexVariant, MODEL_s, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_a, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_t, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_i, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_o, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_n, LVar0) + Call(GetLanguage, LVar0) + Switch(LVar0) + IfGe(LVar0, LANGUAGE_FR) // or LANGUAGE_ES + Sub(LVar0, LANGUAGE_FR - LANGUAGE_EN) + EndIf + Call(SetModelTexVariant, MODEL_s, LVar0) + Call(SetModelTexVariant, MODEL_a, LVar0) + Call(SetModelTexVariant, MODEL_t, LVar0) + Call(SetModelTexVariant, MODEL_i, LVar0) + Call(SetModelTexVariant, MODEL_o, LVar0) + Call(SetModelTexVariant, MODEL_n, LVar0) #endif - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupGizmos)) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_EXEC_WAIT(N(EVS_80244F40)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupGizmos)) + ExecWait(N(EVS_SetupMusic)) + ExecWait(N(EVS_80244F40)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_omo/omo_06/omo_06_3_gizmos.c b/src/world/area_omo/omo_06/omo_06_3_gizmos.c index 05bac21b754..3a6743675a4 100644 --- a/src/world/area_omo/omo_06/omo_06_3_gizmos.c +++ b/src/world/area_omo/omo_06/omo_06_3_gizmos.c @@ -2,112 +2,112 @@ #include "effects.h" EvtScript N(EVS_Gizmos_Wheels) = { - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, -360, 100, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_ha1, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha2, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha3, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha4, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(MakeLerp, 0, -360, 100, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_ha1, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha2, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha3, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha4, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_Gizmos_Shutters) = { - EVT_LABEL(0) - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, 160, 60, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m2_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m2_2, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(MakeLerp, 160, 0, 60, EASING_COS_IN_OUT) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m2_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m2_2, LVar0, 0, 1, 0) - EVT_WAIT(2) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Label(0) + Call(MakeLerp, 0, 160, 60, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m2_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m2_2, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(MakeLerp, 160, 0, 60, EASING_COS_IN_OUT) + Label(2) + Call(UpdateLerp) + Call(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m2_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m2_2, LVar0, 0, 1, 0) + Wait(2) + IfEq(LVar1, 1) + Goto(2) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_Scene_PullPinkSwitch) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(MakeLerp, 0, 70, 30 * DT, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_bou1, LVar0, 0, 0, 1) - EVT_CALL(UpdateColliderTransform, COLLIDER_bou1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_OMO_TRAIN_TRACK_LEVER, SOUND_SPACE_DEFAULT, -395, 0, -185) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o930, COLLIDER_FLAGS_UPPER_MASK) - EVT_WAIT(20 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 223, 10, -165) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 223, 10, -165) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(500.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-500.0), EVT_FLOAT(-200.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20 * DT) - EVT_CALL(PlaySoundAt, SOUND_OMO_FLIP_TRAIN_TRACK, SOUND_SPACE_DEFAULT, 265, 0, -235) - EVT_CALL(MakeLerp, 0, 180, 30 * DT, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o898, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o899, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o897, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_OMO_FLIP_TRACK_THUD, SOUND_SPACE_DEFAULT, 265, 0, -235) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(1.0)) - EVT_CALL(GetModelCenter, MODEL_o897) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 3, LVar0, LVar1, LVar2, 0) - EVT_WAIT(30 * DT) - EVT_SET(GB_StoryProgress, STORY_CH4_PULLED_SWITCH_SWITCH) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(MakeLerp, 0, 70, 30 * DT, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_bou1, LVar0, 0, 0, 1) + Call(UpdateColliderTransform, COLLIDER_bou1) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(PlaySoundAt, SOUND_OMO_TRAIN_TRACK_LEVER, SOUND_SPACE_DEFAULT, -395, 0, -185) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o930, COLLIDER_FLAGS_UPPER_MASK) + Wait(20 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, 223, 10, -165) + Call(SetPanTarget, CAM_DEFAULT, 223, 10, -165) + Call(SetCamDistance, CAM_DEFAULT, Float(500.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(-500.0), Float(-200.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20 * DT) + Call(PlaySoundAt, SOUND_OMO_FLIP_TRAIN_TRACK, SOUND_SPACE_DEFAULT, 265, 0, -235) + Call(MakeLerp, 0, 180, 30 * DT, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_o898, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o899, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o897, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(PlaySoundAt, SOUND_OMO_FLIP_TRACK_THUD, SOUND_SPACE_DEFAULT, 265, 0, -235) + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(1.0)) + Call(GetModelCenter, MODEL_o897) + PlayEffect(EFFECT_LANDING_DUST, 3, LVar0, LVar1, LVar2, 0) + Wait(30 * DT) + Set(GB_StoryProgress, STORY_CH4_PULLED_SWITCH_SWITCH) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Call(DisablePlayerInput, FALSE) + Unbind + Return + End }; EvtScript N(EVS_SetupGizmos) = { - EVT_EXEC(N(EVS_Gizmos_Wheels)) - EVT_EXEC(N(EVS_Gizmos_Shutters)) - EVT_CALL(ParentColliderToModel, COLLIDER_bou1, MODEL_bou1) - EVT_IF_LT(GB_StoryProgress, STORY_CH4_PULLED_SWITCH_SWITCH) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Scene_PullPinkSwitch)), TRIGGER_WALL_PRESS_A, COLLIDER_o664, 1, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o930, COLLIDER_FLAGS_UPPER_MASK) - EVT_ELSE - EVT_CALL(RotateModel, MODEL_bou1, 70, 0, 0, 1) - EVT_CALL(UpdateColliderTransform, COLLIDER_bou1) - EVT_CALL(RotateModel, MODEL_o898, 180, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o899, 180, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o897, 180, 1, 0, 0) - EVT_END_IF - EVT_RETURN - EVT_END + Exec(N(EVS_Gizmos_Wheels)) + Exec(N(EVS_Gizmos_Shutters)) + Call(ParentColliderToModel, COLLIDER_bou1, MODEL_bou1) + IfLt(GB_StoryProgress, STORY_CH4_PULLED_SWITCH_SWITCH) + BindTrigger(Ref(N(EVS_Scene_PullPinkSwitch)), TRIGGER_WALL_PRESS_A, COLLIDER_o664, 1, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o930, COLLIDER_FLAGS_UPPER_MASK) + Else + Call(RotateModel, MODEL_bou1, 70, 0, 0, 1) + Call(UpdateColliderTransform, COLLIDER_bou1) + Call(RotateModel, MODEL_o898, 180, 1, 0, 0) + Call(RotateModel, MODEL_o899, 180, 1, 0, 0) + Call(RotateModel, MODEL_o897, 180, 1, 0, 0) + EndIf + Return + End }; diff --git a/src/world/area_omo/omo_06/omo_06_4_train.c b/src/world/area_omo/omo_06/omo_06_4_train.c index 3eb78b9d25d..13014a78651 100644 --- a/src/world/area_omo/omo_06/omo_06_4_train.c +++ b/src/world/area_omo/omo_06/omo_06_4_train.c @@ -8,208 +8,208 @@ Vec2i N(D_80244160_DBBA70) = { }; s32 N(D_80244168_DBBA78)[] = { - EVT_FLOAT(-1.825), EVT_FLOAT(-35.275), EVT_FLOAT(66.038), - EVT_FLOAT(162.917), EVT_FLOAT(-108.494), EVT_FLOAT(353.442), - EVT_FLOAT(-353.717), EVT_FLOAT(414.885), EVT_FLOAT(-426.942), + Float(-1.825), Float(-35.275), Float(66.038), + Float(162.917), Float(-108.494), Float(353.442), + Float(-353.717), Float(414.885), Float(-426.942), -1, -1, -1 }; EvtScript N(D_80244198_DBBAA8) = { - EVT_CALL(FadeOutMusic, 0, 3000) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_WAIT(10) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_EXEC(N(EVS_TrainUnk_C)) - EVT_SET(AB_OMO_5, 1) - EVT_SET(LVar0, EVT_PTR(N(D_80244168_DBBA78))) - EVT_EXEC_WAIT(N(EVS_TrainUnk_D)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o898, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_80244168_DBBA78))) - EVT_SET(MV_TrainUnk_02, 1) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_LABEL(10) - EVT_IF_LT(MV_TrainPos, 350) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("omo_16"), omo_16_ENTRY_0) - EVT_SET(GB_OMO_TrainDestination, 1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(FadeOutMusic, 0, 3000) + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Wait(10) + Call(DisablePlayerPhysics, TRUE) + Exec(N(EVS_TrainUnk_C)) + Set(AB_OMO_5, 1) + Set(LVar0, Ref(N(D_80244168_DBBA78))) + ExecWait(N(EVS_TrainUnk_D)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o898, COLLIDER_FLAGS_UPPER_MASK) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_80244168_DBBA78))) + Set(MV_TrainUnk_02, 1) + Set(MF_TrainUnk_00, TRUE) + Label(10) + IfLt(MV_TrainPos, 350) + Wait(1) + Goto(10) + EndIf + Call(GotoMap, Ref("omo_16"), omo_16_ENTRY_0) + Set(GB_OMO_TrainDestination, 1) + Wait(100) + Return + End }; s32 N(D_80244308_DBBC18)[] = { - EVT_FLOAT(-1.825), EVT_FLOAT(-35.275), EVT_FLOAT(246.038), - EVT_FLOAT(-166.506), EVT_FLOAT(37.917), EVT_FLOAT(-500.0), - EVT_FLOAT(0.279), EVT_FLOAT(-600.0), EVT_FLOAT(0.558), + Float(-1.825), Float(-35.275), Float(246.038), + Float(-166.506), Float(37.917), Float(-500.0), + Float(0.279), Float(-600.0), Float(0.558), -1, -1, -1 }; EvtScript N(D_80244338_DBBC48) = { - EVT_CALL(FadeOutMusic, 0, 3000) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_WAIT(10) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_EXEC(N(EVS_TrainUnk_C)) - EVT_SET(AB_OMO_5, 1) - EVT_SET(LVar0, EVT_PTR(N(D_80244308_DBBC18))) - EVT_EXEC_WAIT(N(EVS_TrainUnk_D)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o898, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_80244308_DBBC18))) - EVT_SET(MV_TrainUnk_02, 1) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_LABEL(10) - EVT_IF_GT(MV_TrainPos, -480) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("omo_16"), omo_16_ENTRY_1) - EVT_SET(GB_OMO_TrainDestination, 0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(FadeOutMusic, 0, 3000) + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Wait(10) + Call(DisablePlayerPhysics, TRUE) + Exec(N(EVS_TrainUnk_C)) + Set(AB_OMO_5, 1) + Set(LVar0, Ref(N(D_80244308_DBBC18))) + ExecWait(N(EVS_TrainUnk_D)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o898, COLLIDER_FLAGS_UPPER_MASK) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_80244308_DBBC18))) + Set(MV_TrainUnk_02, 1) + Set(MF_TrainUnk_00, TRUE) + Label(10) + IfGt(MV_TrainPos, -480) + Wait(1) + Goto(10) + EndIf + Call(GotoMap, Ref("omo_16"), omo_16_ENTRY_1) + Set(GB_OMO_TrainDestination, 0) + Wait(100) + Return + End }; s32 N(D_802444A8_DBBDB8)[] = { - EVT_FLOAT(414.885), EVT_FLOAT(-426.942), EVT_FLOAT(219.925), - EVT_FLOAT(353.442), EVT_FLOAT(-353.717), EVT_FLOAT(162.917), - EVT_FLOAT(-108.494), EVT_FLOAT(-38.38), EVT_FLOAT(-19.05), + Float(414.885), Float(-426.942), Float(219.925), + Float(353.442), Float(-353.717), Float(162.917), + Float(-108.494), Float(-38.38), Float(-19.05), -1, -1, -1 }; s32 N(D_802444D8_DBBDE8)[] = { - EVT_FLOAT(414.885), EVT_FLOAT(-426.942), EVT_FLOAT(219.925), - EVT_FLOAT(353.442), EVT_FLOAT(-353.717), EVT_FLOAT(162.917), - EVT_FLOAT(-108.494), EVT_FLOAT(-166.506), EVT_FLOAT(37.917), - EVT_FLOAT(-500.0), EVT_FLOAT(0.279), EVT_FLOAT(-600.0), - EVT_FLOAT(0.558), -1, -1, -1 + Float(414.885), Float(-426.942), Float(219.925), + Float(353.442), Float(-353.717), Float(162.917), + Float(-108.494), Float(-166.506), Float(37.917), + Float(-500.0), Float(0.279), Float(-600.0), + Float(0.558), -1, -1, -1 }; EvtScript N(D_80244518_DBBE28) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o898, COLLIDER_FLAGS_UPPER_MASK) - EVT_IF_EQ(AB_OMO_6, 1) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_802444A8_DBBDB8))) - EVT_SET(MV_TrainUnk_02, 2) - EVT_EXEC(N(EVS_Scene_RideTrain)) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_WAIT(1) - EVT_EXEC_GET_TID(N(EVS_TrainUnk_A), LVarB) - EVT_LABEL(10) - EVT_IF_EQ(MF_TrainUnk_00, TRUE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_WAIT(20) - EVT_KILL_THREAD(LVarB) - EVT_EXEC(N(EVS_TrainUnk_B)) - EVT_CALL(N(EnableCameraFollowPlayerY)) - EVT_SET(LVar9, EVT_PTR(N(D_80244160_DBBA70))) - EVT_EXEC_WAIT(N(EVS_TrainUnk_E)) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_000F) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o898, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ELSE - EVT_EXEC(N(EVS_TrainUnk_A)) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_802444D8_DBBDE8))) - EVT_SET(MV_TrainUnk_02, 0) - EVT_EXEC(N(EVS_Scene_RideTrain)) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_WAIT(1) - EVT_EXEC(N(EVS_TrainUnk_H)) - EVT_LABEL(20) - EVT_IF_GT(MV_TrainPos, -480) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("omo_16"), omo_16_ENTRY_1) - EVT_SET(GB_OMO_TrainDestination, 0) - EVT_WAIT(100) - EVT_END_IF - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(DisablePartnerAI, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o898, COLLIDER_FLAGS_UPPER_MASK) + IfEq(AB_OMO_6, 1) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_802444A8_DBBDB8))) + Set(MV_TrainUnk_02, 2) + Exec(N(EVS_Scene_RideTrain)) + Set(MF_TrainUnk_00, TRUE) + Wait(1) + ExecGetTID(N(EVS_TrainUnk_A), LVarB) + Label(10) + IfEq(MF_TrainUnk_00, TRUE) + Wait(1) + Goto(10) + EndIf + Wait(20) + KillThread(LVarB) + Exec(N(EVS_TrainUnk_B)) + Call(N(EnableCameraFollowPlayerY)) + Set(LVar9, Ref(N(D_80244160_DBBA70))) + ExecWait(N(EVS_TrainUnk_E)) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_000F) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o898, COLLIDER_FLAGS_UPPER_MASK) + Call(DisablePlayerPhysics, FALSE) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Else + Exec(N(EVS_TrainUnk_A)) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_802444D8_DBBDE8))) + Set(MV_TrainUnk_02, 0) + Exec(N(EVS_Scene_RideTrain)) + Set(MF_TrainUnk_00, TRUE) + Wait(1) + Exec(N(EVS_TrainUnk_H)) + Label(20) + IfGt(MV_TrainPos, -480) + Wait(1) + Goto(20) + EndIf + Call(GotoMap, Ref("omo_16"), omo_16_ENTRY_1) + Set(GB_OMO_TrainDestination, 0) + Wait(100) + EndIf + Return + End }; s32 N(D_802447D0_DBC0E0)[] = { - EVT_FLOAT(-600.0), EVT_FLOAT(0.558), EVT_FLOAT(89.875), - EVT_FLOAT(-500.0), EVT_FLOAT(0.279), EVT_FLOAT(-166.506), - EVT_FLOAT(37.917), EVT_FLOAT(34.74), EVT_FLOAT(-51.5), + Float(-600.0), Float(0.558), Float(89.875), + Float(-500.0), Float(0.279), Float(-166.506), + Float(37.917), Float(34.74), Float(-51.5), -1, -1, -1 }; s32 N(D_80244800_DBC110)[] = { - EVT_FLOAT(-600.0), EVT_FLOAT(0.558), EVT_FLOAT(89.875), - EVT_FLOAT(-500.0), EVT_FLOAT(0.279), EVT_FLOAT(-166.506), - EVT_FLOAT(37.917), EVT_FLOAT(162.917), EVT_FLOAT(-108.494), - EVT_FLOAT(353.442), EVT_FLOAT(-353.717), EVT_FLOAT(414.885), - EVT_FLOAT(-426.942), + Float(-600.0), Float(0.558), Float(89.875), + Float(-500.0), Float(0.279), Float(-166.506), + Float(37.917), Float(162.917), Float(-108.494), + Float(353.442), Float(-353.717), Float(414.885), + Float(-426.942), -1, -1, -1 }; EvtScript N(D_80244840_DBC150) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o898, COLLIDER_FLAGS_UPPER_MASK) - EVT_IF_EQ(AB_OMO_6, 1) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_802447D0_DBC0E0))) - EVT_SET(MV_TrainUnk_02, 2) - EVT_EXEC(N(EVS_Scene_RideTrain)) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_WAIT(1) - EVT_EXEC_GET_TID(N(EVS_TrainUnk_A), LVarB) - EVT_LABEL(10) - EVT_IF_EQ(MF_TrainUnk_00, TRUE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_WAIT(20) - EVT_KILL_THREAD(LVarB) - EVT_EXEC(N(EVS_TrainUnk_B)) - EVT_CALL(N(EnableCameraFollowPlayerY)) - EVT_SET(LVar9, EVT_PTR(N(D_80244160_DBBA70))) - EVT_EXEC_WAIT(N(EVS_TrainUnk_E)) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_000F) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o898, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ELSE - EVT_EXEC(N(EVS_TrainUnk_A)) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_80244800_DBC110))) - EVT_SET(MV_TrainUnk_02, 0) - EVT_EXEC(N(EVS_Scene_RideTrain)) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_WAIT(1) - EVT_EXEC(N(EVS_TrainUnk_H)) - EVT_LABEL(20) - EVT_IF_LT(MV_TrainPos, 350) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("omo_16"), omo_16_ENTRY_0) - EVT_SET(GB_OMO_TrainDestination, 1) - EVT_WAIT(100) - EVT_END_IF - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(DisablePartnerAI, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o898, COLLIDER_FLAGS_UPPER_MASK) + IfEq(AB_OMO_6, 1) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_802447D0_DBC0E0))) + Set(MV_TrainUnk_02, 2) + Exec(N(EVS_Scene_RideTrain)) + Set(MF_TrainUnk_00, TRUE) + Wait(1) + ExecGetTID(N(EVS_TrainUnk_A), LVarB) + Label(10) + IfEq(MF_TrainUnk_00, TRUE) + Wait(1) + Goto(10) + EndIf + Wait(20) + KillThread(LVarB) + Exec(N(EVS_TrainUnk_B)) + Call(N(EnableCameraFollowPlayerY)) + Set(LVar9, Ref(N(D_80244160_DBBA70))) + ExecWait(N(EVS_TrainUnk_E)) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_000F) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o898, COLLIDER_FLAGS_UPPER_MASK) + Call(DisablePlayerPhysics, FALSE) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Else + Exec(N(EVS_TrainUnk_A)) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_80244800_DBC110))) + Set(MV_TrainUnk_02, 0) + Exec(N(EVS_Scene_RideTrain)) + Set(MF_TrainUnk_00, TRUE) + Wait(1) + Exec(N(EVS_TrainUnk_H)) + Label(20) + IfLt(MV_TrainPos, 350) + Wait(1) + Goto(20) + EndIf + Call(GotoMap, Ref("omo_16"), omo_16_ENTRY_0) + Set(GB_OMO_TrainDestination, 1) + Wait(100) + EndIf + Return + End }; s32 N(D_80244AF8_DBC408)[] = { @@ -221,110 +221,110 @@ s32 N(D_80244B04_DBC414)[] = { }; EvtScript N(D_80244B10_DBC420) = { - EVT_IF_EQ(MF_EitherSwitchPressed, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0006) - EVT_ELSE - EVT_IF_EQ(AF_OMO_UsingRightSwitch, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0007) - EVT_IF_EQ(GF_OMO03_BlueSwitchActivated, FALSE) - EVT_CALL(ShowChoice, MSG_Choice_003D) - EVT_IF_NE(LVar0, 1) - EVT_CALL(CloseMessage) - EVT_USE_BUF(EVT_PTR(N(D_80244AF8_DBC408))) - EVT_ADD(LVar0, 1) - EVT_LOOP(LVar0) - EVT_BUF_READ1(LVar1) - EVT_END_LOOP - EVT_SET(AB_OMO_6, LVar1) - EVT_EXEC_WAIT(N(D_80244338_DBBC48)) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0008) - EVT_END_IF - EVT_ELSE - EVT_CALL(ShowChoice, MSG_Choice_003E) - EVT_IF_NE(LVar0, 3) - EVT_CALL(CloseMessage) - EVT_USE_BUF(EVT_PTR(N(D_80244AF8_DBC408))) - EVT_ADD(LVar0, 1) - EVT_LOOP(LVar0) - EVT_BUF_READ1(LVar1) - EVT_END_LOOP - EVT_SET(AB_OMO_6, LVar1) - EVT_EXEC_WAIT(N(D_80244338_DBBC48)) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0008) - EVT_END_IF - EVT_END_IF - EVT_ELSE - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH4_PULLED_SWITCH_SWITCH) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_SadTalk, ANIM_TrainToad_SadIdle, 0, MSG_CH4_0012) - EVT_CASE_LT(STORY_CH4_SOLVED_COLOR_PUZZLE) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0007) - EVT_CALL(ShowChoice, MSG_Choice_003B) - EVT_IF_NE(LVar0, 1) - EVT_CALL(CloseMessage) - EVT_USE_BUF(EVT_PTR(N(D_80244B04_DBC414))) - EVT_ADD(LVar0, 1) - EVT_LOOP(LVar0) - EVT_BUF_READ1(LVar1) - EVT_END_LOOP - EVT_SET(AB_OMO_6, LVar1) - EVT_EXEC_WAIT(N(D_80244198_DBBAA8)) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0008) - EVT_END_IF - EVT_CASE_GE(STORY_CH4_SOLVED_COLOR_PUZZLE) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0007) - EVT_CALL(ShowChoice, MSG_Choice_003C) - EVT_IF_NE(LVar0, 3) - EVT_CALL(CloseMessage) - EVT_USE_BUF(EVT_PTR(N(D_80244B04_DBC414))) - EVT_ADD(LVar0, 1) - EVT_LOOP(LVar0) - EVT_BUF_READ1(LVar1) - EVT_END_LOOP - EVT_SET(AB_OMO_6, LVar1) - EVT_EXEC_WAIT(N(D_80244198_DBBAA8)) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0008) - EVT_END_IF - EVT_END_SWITCH - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MF_EitherSwitchPressed, FALSE) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0006) + Else + IfEq(AF_OMO_UsingRightSwitch, FALSE) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0007) + IfEq(GF_OMO03_BlueSwitchActivated, FALSE) + Call(ShowChoice, MSG_Choice_003D) + IfNe(LVar0, 1) + Call(CloseMessage) + UseBuf(Ref(N(D_80244AF8_DBC408))) + Add(LVar0, 1) + Loop(LVar0) + BufRead1(LVar1) + EndLoop + Set(AB_OMO_6, LVar1) + ExecWait(N(D_80244338_DBBC48)) + Else + Call(ContinueSpeech, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0008) + EndIf + Else + Call(ShowChoice, MSG_Choice_003E) + IfNe(LVar0, 3) + Call(CloseMessage) + UseBuf(Ref(N(D_80244AF8_DBC408))) + Add(LVar0, 1) + Loop(LVar0) + BufRead1(LVar1) + EndLoop + Set(AB_OMO_6, LVar1) + ExecWait(N(D_80244338_DBBC48)) + Else + Call(ContinueSpeech, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0008) + EndIf + EndIf + Else + Switch(GB_StoryProgress) + CaseLt(STORY_CH4_PULLED_SWITCH_SWITCH) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_SadTalk, ANIM_TrainToad_SadIdle, 0, MSG_CH4_0012) + CaseLt(STORY_CH4_SOLVED_COLOR_PUZZLE) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0007) + Call(ShowChoice, MSG_Choice_003B) + IfNe(LVar0, 1) + Call(CloseMessage) + UseBuf(Ref(N(D_80244B04_DBC414))) + Add(LVar0, 1) + Loop(LVar0) + BufRead1(LVar1) + EndLoop + Set(AB_OMO_6, LVar1) + ExecWait(N(D_80244198_DBBAA8)) + Else + Call(ContinueSpeech, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0008) + EndIf + CaseGe(STORY_CH4_SOLVED_COLOR_PUZZLE) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0007) + Call(ShowChoice, MSG_Choice_003C) + IfNe(LVar0, 3) + Call(CloseMessage) + UseBuf(Ref(N(D_80244B04_DBC414))) + Add(LVar0, 1) + Loop(LVar0) + BufRead1(LVar1) + EndLoop + Set(AB_OMO_6, LVar1) + ExecWait(N(D_80244198_DBBAA8)) + Else + Call(ContinueSpeech, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0008) + EndIf + EndSwitch + EndIf + EndIf + Return + End }; s32 N(D_80244F28_DBC838)[] = { - EVT_FLOAT(-1.825), EVT_FLOAT(-35.275), EVT_FLOAT(66.038), + Float(-1.825), Float(-35.275), Float(66.038), -1, -1, -1 }; EvtScript N(EVS_80244F40) = { - EVT_EXEC_WAIT(N(EVS_SetupSwitches)) - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_80244F28_DBC838))) - EVT_SET(MV_TrainUnk_02, 0) - EVT_EXEC(N(EVS_Scene_RideTrain)) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_ELSE - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(omo_06_ENTRY_2) - EVT_EXEC(N(D_80244840_DBC150)) - EVT_CASE_EQ(omo_06_ENTRY_3) - EVT_EXEC(N(D_80244518_DBBE28)) - EVT_CASE_DEFAULT - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_80244F28_DBC838))) - EVT_SET(MV_TrainUnk_02, 0) - EVT_EXEC(N(EVS_Scene_RideTrain)) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END + ExecWait(N(EVS_SetupSwitches)) + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_80244F28_DBC838))) + Set(MV_TrainUnk_02, 0) + Exec(N(EVS_Scene_RideTrain)) + Set(MF_TrainUnk_00, TRUE) + Else + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(omo_06_ENTRY_2) + Exec(N(D_80244840_DBC150)) + CaseEq(omo_06_ENTRY_3) + Exec(N(D_80244518_DBBE28)) + CaseDefault + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_80244F28_DBC838))) + Set(MV_TrainUnk_02, 0) + Exec(N(EVS_Scene_RideTrain)) + Set(MF_TrainUnk_00, TRUE) + EndSwitch + EndIf + Return + End }; diff --git a/src/world/area_omo/omo_06/omo_06_5_npc.c b/src/world/area_omo/omo_06/omo_06_5_npc.c index 162250b290b..7f766f2d041 100644 --- a/src/world/area_omo/omo_06/omo_06_5_npc.c +++ b/src/world/area_omo/omo_06/omo_06_5_npc.c @@ -3,46 +3,46 @@ #include "world/common/npc/TrainToad.inc.c" EvtScript N(EVS_NpcInteract_Conductor) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC_WAIT(N(D_80244B10_DBC420)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + ExecWait(N(D_80244B10_DBC420)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Conductor) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Conductor))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Conductor))) + Return + End }; EvtScript N(EVS_NpcInteract_TrainToad) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH4_GOT_FRYING_PAN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Pink_Talk, ANIM_TrainToad_Pink_Idle, 0, MSG_CH4_0023) - EVT_CASE_LT(STORY_CH4_GOT_TAYCE_TS_CAKE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Pink_Talk, ANIM_TrainToad_Pink_Idle, 0, MSG_CH4_0024) - EVT_CASE_LT(STORY_CH4_GAVE_CAKE_TO_GOURMET_GUY) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Pink_Talk, ANIM_TrainToad_Pink_Idle, 0, MSG_CH4_0025) - EVT_CASE_LT(STORY_CH4_PULLED_SWITCH_SWITCH) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Pink_Talk, ANIM_TrainToad_Pink_Idle, 0, MSG_CH4_0026) - EVT_CASE_LT(STORY_CH4_SOLVED_COLOR_PUZZLE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Pink_Talk, ANIM_TrainToad_Pink_Idle, 0, MSG_CH4_0027) - EVT_CASE_LT(STORY_CH4_WATT_JOINED_PARTY) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Pink_Talk, ANIM_TrainToad_Pink_Idle, 0, MSG_CH4_0028) - EVT_CASE_LT(STORY_CH4_DEFEATED_GENERAL_GUY) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Pink_Talk, ANIM_TrainToad_Pink_Idle, 0, MSG_CH4_0029) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Pink_Talk, ANIM_TrainToad_Pink_Idle, 0, MSG_CH4_002A) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH4_GOT_FRYING_PAN) + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Pink_Talk, ANIM_TrainToad_Pink_Idle, 0, MSG_CH4_0023) + CaseLt(STORY_CH4_GOT_TAYCE_TS_CAKE) + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Pink_Talk, ANIM_TrainToad_Pink_Idle, 0, MSG_CH4_0024) + CaseLt(STORY_CH4_GAVE_CAKE_TO_GOURMET_GUY) + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Pink_Talk, ANIM_TrainToad_Pink_Idle, 0, MSG_CH4_0025) + CaseLt(STORY_CH4_PULLED_SWITCH_SWITCH) + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Pink_Talk, ANIM_TrainToad_Pink_Idle, 0, MSG_CH4_0026) + CaseLt(STORY_CH4_SOLVED_COLOR_PUZZLE) + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Pink_Talk, ANIM_TrainToad_Pink_Idle, 0, MSG_CH4_0027) + CaseLt(STORY_CH4_WATT_JOINED_PARTY) + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Pink_Talk, ANIM_TrainToad_Pink_Idle, 0, MSG_CH4_0028) + CaseLt(STORY_CH4_DEFEATED_GENERAL_GUY) + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Pink_Talk, ANIM_TrainToad_Pink_Idle, 0, MSG_CH4_0029) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Pink_Talk, ANIM_TrainToad_Pink_Idle, 0, MSG_CH4_002A) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_TrainToad) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_TrainToad))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_TrainToad))) + Return + End }; NpcData N(NpcSettings_Toads)[] = { diff --git a/src/world/area_omo/omo_06/omo_06_6_entity.c b/src/world/area_omo/omo_06/omo_06_6_entity.c index b8895b90eef..dee6d2a0f22 100644 --- a/src/world/area_omo/omo_06/omo_06_6_entity.c +++ b/src/world/area_omo/omo_06/omo_06_6_entity.c @@ -4,24 +4,24 @@ #include "world/common/entity/Chest.inc.c" EvtScript N(EVS_OpenChest_Mailbag) = { - EVT_SET(LVarA, ITEM_MAILBAG) - EVT_SET(LVarB, ITEM_TYPE_KEY) - EVT_SET(GF_OMO06_Chest_Mailbag, TRUE) - EVT_EXEC_WAIT(N(EVS_Chest_GetItem)) - EVT_SET(GF_MAC01_MailbagStolen, TRUE) - EVT_RETURN - EVT_END + Set(LVarA, ITEM_MAILBAG) + Set(LVarB, ITEM_TYPE_KEY) + Set(GF_OMO06_Chest_Mailbag, TRUE) + ExecWait(N(EVS_Chest_GetItem)) + Set(GF_MAC01_MailbagStolen, TRUE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), -200, 60, 300, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), -280, 60, -290, 0, ITEM_THUNDER_RAGE, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OMO06_HiddenItem_ThunderRage) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 400, 0, 60, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_OMO06_Chest_Mailbag) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenChest_Mailbag))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 100, 0, 400, 0, MODEL_o817, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_OMO06_HiddenPanel) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_SavePoint), -200, 60, 300, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), -280, 60, -290, 0, ITEM_THUNDER_RAGE, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OMO06_HiddenItem_ThunderRage) + Call(MakeEntity, Ref(Entity_Chest), 400, 0, 60, 0, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_OMO06_Chest_Mailbag) + Call(AssignScript, Ref(N(EVS_OpenChest_Mailbag))) + Call(MakeEntity, Ref(Entity_HiddenPanel), 100, 0, 400, 0, MODEL_o817, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_OMO06_HiddenPanel) + Return + End }; diff --git a/src/world/area_omo/omo_07/omo_07_1_music.c b/src/world/area_omo/omo_07/omo_07_1_music.c index 1f4a155fb85..668806468fd 100644 --- a/src/world/area_omo/omo_07/omo_07_1_music.c +++ b/src/world/area_omo/omo_07/omo_07_1_music.c @@ -1,11 +1,11 @@ #include "omo_07.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_EQ(GF_OMO07_SpawnedPeachChoice2, FALSE) - EVT_CALL(SetMusicTrack, 0, SONG_KAMMY_KOOPA_THEME, 0, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_OMO07_SpawnedPeachChoice2, FALSE) + Call(SetMusicTrack, 0, SONG_KAMMY_KOOPA_THEME, 0, 8) + Else + Call(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) + EndIf + Return + End }; diff --git a/src/world/area_omo/omo_07/omo_07_2_main.c b/src/world/area_omo/omo_07/omo_07_2_main.c index c88a9d5c1a4..709f485460d 100644 --- a/src/world/area_omo/omo_07/omo_07_2_main.c +++ b/src/world/area_omo/omo_07/omo_07_2_main.c @@ -5,44 +5,44 @@ EvtScript N(EVS_ExitWalk_omo_06_4) = EVT_EXIT_WALK(60, omo_07_ENTRY_0, "omo_06", MAP_RODATA_PAD(1, exits); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_06_4)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_omo_06_4)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_IF_EQ(GF_OMO07_SpawnedPeachChoice2, FALSE) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(KammySceneNPCs))) - EVT_ELSE - EVT_IF_EQ(GF_OMO07_Item_ThunderRage, FALSE) - EVT_SWITCH(GB_OMO_PeachChoice2) - EVT_CASE_EQ(0) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(FuzzyAmbushNPCs))) - EVT_CASE_EQ(1) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(HammerBrosAmbushNPCs))) - EVT_CASE_EQ(2) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(MakeItemEntity, ITEM_THUNDER_RAGE, 1080, 0, 0, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO07_Item_ThunderRage) - EVT_END_SWITCH - EVT_ELSE - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_END_IF - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupGizmos)) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_SetupShyGuyPool)) - EVT_IF_EQ(GF_OMO07_SpawnedPeachChoice2, FALSE) - EVT_EXEC(N(EVS_Scene_KammySetAmbush)) - EVT_WAIT(2) - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_END_IF - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + IfEq(GF_OMO07_SpawnedPeachChoice2, FALSE) + Call(MakeNpcs, TRUE, Ref(N(KammySceneNPCs))) + Else + IfEq(GF_OMO07_Item_ThunderRage, FALSE) + Switch(GB_OMO_PeachChoice2) + CaseEq(0) + Call(MakeNpcs, TRUE, Ref(N(FuzzyAmbushNPCs))) + CaseEq(1) + Call(MakeNpcs, TRUE, Ref(N(HammerBrosAmbushNPCs))) + CaseEq(2) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Call(MakeItemEntity, ITEM_THUNDER_RAGE, 1080, 0, 0, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO07_Item_ThunderRage) + EndSwitch + Else + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + EndIf + EndIf + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupGizmos)) + ExecWait(N(EVS_SetupMusic)) + Exec(N(EVS_SetupShyGuyPool)) + IfEq(GF_OMO07_SpawnedPeachChoice2, FALSE) + Exec(N(EVS_Scene_KammySetAmbush)) + Wait(2) + Else + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + EndIf + Return + End }; diff --git a/src/world/area_omo/omo_07/omo_07_3_gizmos.c b/src/world/area_omo/omo_07/omo_07_3_gizmos.c index 7b7f820b06d..3613b65a299 100644 --- a/src/world/area_omo/omo_07/omo_07_3_gizmos.c +++ b/src/world/area_omo/omo_07/omo_07_3_gizmos.c @@ -1,49 +1,49 @@ #include "omo_07.h" EvtScript N(EVS_Gizmos_Shutters) = { - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, 160, 60, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(MakeLerp, 160, 0, 60, EASING_COS_IN_OUT) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) - EVT_WAIT(2) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(MakeLerp, 0, 160, 60, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(MakeLerp, 160, 0, 60, EASING_COS_IN_OUT) + Label(2) + Call(UpdateLerp) + Call(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) + Wait(2) + IfEq(LVar1, 1) + Goto(2) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_Gizmos_Clocks) = { - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, -360, 100, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_hari1, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_hari2, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(MakeLerp, 0, -360, 100, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_hari1, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_hari2, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_SetupGizmos) = { - EVT_EXEC(N(EVS_Gizmos_Shutters)) - EVT_EXEC(N(EVS_Gizmos_Clocks)) - EVT_RETURN - EVT_END + Exec(N(EVS_Gizmos_Shutters)) + Exec(N(EVS_Gizmos_Clocks)) + Return + End }; diff --git a/src/world/area_omo/omo_07/omo_07_4_npc.c b/src/world/area_omo/omo_07/omo_07_4_npc.c index b76be486aca..a31c87c6489 100644 --- a/src/world/area_omo/omo_07/omo_07_4_npc.c +++ b/src/world/area_omo/omo_07/omo_07_4_npc.c @@ -57,294 +57,294 @@ API_CALLABLE(N(SetShyGuyPoolState)) { } EvtScript N(EVS_Push_SecretDoor) = { - EVT_IF_EQ(AF_OMO07_DoorOpening, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar2, -50) - EVT_RETURN - EVT_END_IF - EVT_IF_GT(LVar0, 15) - EVT_IF_LT(LVar0, 35) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(AF_OMO07_DoorOpening, TRUE) - EVT_CALL(PlaySoundAt, SOUND_OMO_DOOR_FLIP, SOUND_SPACE_DEFAULT, 25, 0, -55) - EVT_THREAD - EVT_IF_LT(LVar0, 25) - EVT_CALL(MakeLerp, 0, 180, 30, EASING_COS_IN_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_k, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_ELSE - EVT_CALL(MakeLerp, 180, 0, 30, EASING_COS_IN_OUT) - EVT_LABEL(11) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_k, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(11) - EVT_END_IF - EVT_END_IF - EVT_CALL(UpdateColliderTransform, COLLIDER_tt1) - EVT_END_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 60) - EVT_WAIT(10) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, LVar0, LVar2, 0) - EVT_SET(AF_OMO07_DoorOpening, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + IfEq(AF_OMO07_DoorOpening, TRUE) + Return + EndIf + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar2, -50) + Return + EndIf + IfGt(LVar0, 15) + IfLt(LVar0, 35) + Return + EndIf + EndIf + Call(DisablePlayerInput, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) + Set(AF_OMO07_DoorOpening, TRUE) + Call(PlaySoundAt, SOUND_OMO_DOOR_FLIP, SOUND_SPACE_DEFAULT, 25, 0, -55) + Thread + IfLt(LVar0, 25) + Call(MakeLerp, 0, 180, 30, EASING_COS_IN_OUT) + Label(10) + Call(UpdateLerp) + Call(RotateModel, MODEL_k, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Else + Call(MakeLerp, 180, 0, 30, EASING_COS_IN_OUT) + Label(11) + Call(UpdateLerp) + Call(RotateModel, MODEL_k, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(11) + EndIf + EndIf + Call(UpdateColliderTransform, COLLIDER_tt1) + EndThread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar2, 60) + Wait(10) + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, LVar0, LVar2, 0) + Set(AF_OMO07_DoorOpening, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SetupShyGuyPool) = { - EVT_CALL(ParentColliderToModel, COLLIDER_tt1, MODEL_k) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Push_SecretDoor)), TRIGGER_WALL_PUSH, COLLIDER_tt1, 1, 0) - EVT_SET(AF_OMO07_NpcPool0, FALSE) - EVT_SET(AF_OMO07_NpcPool1, FALSE) - EVT_SET(AF_OMO07_NpcPool2, FALSE) - EVT_SET(AF_OMO07_NpcPool3, FALSE) - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_IF_LT(LVar0, 400) - EVT_GOTO(0) - EVT_END_IF - EVT_LABEL(1) - EVT_SET(LVar4, -1) - EVT_IF_EQ(AF_OMO07_NpcPool3, FALSE) - EVT_SET(LVar4, NPC_ShyGuy_03) - EVT_END_IF - EVT_IF_EQ(AF_OMO07_NpcPool2, FALSE) - EVT_SET(LVar4, NPC_ShyGuy_02) - EVT_END_IF - EVT_IF_EQ(AF_OMO07_NpcPool1, FALSE) - EVT_SET(LVar4, NPC_ShyGuy_01) - EVT_END_IF - EVT_IF_EQ(LVar4, -1) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_IF_EQ(AF_OMO07_NpcPool0, FALSE) - EVT_SET(AF_OMO07_NpcPool0, TRUE) - EVT_ELSE - EVT_WAIT(40) - EVT_END_IF - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar2, -85) - EVT_GOTO(1) - EVT_END_IF - EVT_IF_LT(LVar0, -50) - EVT_GOTO(1) - EVT_END_IF - EVT_IF_GT(LVar0, 600) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(N(SetShyGuyPoolState), LVar4, TRUE) - EVT_CALL(SetNpcVar, LVar4, SHYGUY_VAR_STATE, SHYGUY_STATE_RUN_TO_DOOR) - EVT_WAIT(1) - EVT_LABEL(2) - EVT_CALL(GetNpcVar, LVar4, SHYGUY_VAR_STATE, LVar3) - EVT_IF_EQ(LVar3, SHYGUY_STATE_RUN_TO_DOOR) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_GOTO(1) - EVT_RETURN - EVT_END + Call(ParentColliderToModel, COLLIDER_tt1, MODEL_k) + BindTrigger(Ref(N(EVS_Push_SecretDoor)), TRIGGER_WALL_PUSH, COLLIDER_tt1, 1, 0) + Set(AF_OMO07_NpcPool0, FALSE) + Set(AF_OMO07_NpcPool1, FALSE) + Set(AF_OMO07_NpcPool2, FALSE) + Set(AF_OMO07_NpcPool3, FALSE) + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + IfLt(LVar0, 400) + Goto(0) + EndIf + Label(1) + Set(LVar4, -1) + IfEq(AF_OMO07_NpcPool3, FALSE) + Set(LVar4, NPC_ShyGuy_03) + EndIf + IfEq(AF_OMO07_NpcPool2, FALSE) + Set(LVar4, NPC_ShyGuy_02) + EndIf + IfEq(AF_OMO07_NpcPool1, FALSE) + Set(LVar4, NPC_ShyGuy_01) + EndIf + IfEq(LVar4, -1) + Wait(1) + Goto(1) + EndIf + IfEq(AF_OMO07_NpcPool0, FALSE) + Set(AF_OMO07_NpcPool0, TRUE) + Else + Wait(40) + EndIf + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar2, -85) + Goto(1) + EndIf + IfLt(LVar0, -50) + Goto(1) + EndIf + IfGt(LVar0, 600) + Goto(1) + EndIf + Call(N(SetShyGuyPoolState), LVar4, TRUE) + Call(SetNpcVar, LVar4, SHYGUY_VAR_STATE, SHYGUY_STATE_RUN_TO_DOOR) + Wait(1) + Label(2) + Call(GetNpcVar, LVar4, SHYGUY_VAR_STATE, LVar3) + IfEq(LVar3, SHYGUY_STATE_RUN_TO_DOOR) + Wait(1) + Goto(2) + EndIf + Goto(1) + Return + End }; EvtScript N(EVS_NpcAI_ShyGuy) = { - EVT_LABEL(0) - EVT_CALL(GetSelfVar, SHYGUY_VAR_STATE, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(SHYGUY_STATE_FREE) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CASE_EQ(SHYGUY_STATE_RUN_TO_DOOR) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) - EVT_CALL(EnableNpcShadow, NPC_SELF, TRUE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_PASSIVE, 0) - EVT_CALL(SetNpcPos, NPC_SELF, 800, 0, 75) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(4.0)) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, 665, 75, 0) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(4.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, 635, -107, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, 100, -107, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, -10, -107, 0) - EVT_CALL(SetSelfVar, SHYGUY_VAR_STATE, SHYGUY_STATE_WAIT_AT_DOOR) - EVT_CALL(SetSelfVar, SHYGUY_VAR_WAIT_TIME, 0) - EVT_CASE_EQ(SHYGUY_STATE_WAIT_AT_DOOR) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 130) - EVT_WAIT(40) - EVT_CALL(SetSelfVar, SHYGUY_VAR_STATE, SHYGUY_STATE_OPEN_DOOR) - EVT_END_IF - EVT_CALL(GetSelfVar, SHYGUY_VAR_WAIT_TIME, LVar0) - EVT_ADD(LVar0, 1) - EVT_CALL(SetSelfVar, SHYGUY_VAR_WAIT_TIME, LVar0) - EVT_IF_GT(LVar0, 180) - EVT_WAIT(40) - EVT_CALL(SetSelfVar, SHYGUY_VAR_STATE, SHYGUY_STATE_OPEN_DOOR) - EVT_CALL(SetSelfVar, SHYGUY_VAR_WAIT_TIME, 0) - EVT_END_IF - EVT_CASE_EQ(SHYGUY_STATE_OPEN_DOOR) - EVT_CALL(PlaySoundAt, SOUND_OMO_DOOR_FLIP, SOUND_SPACE_DEFAULT, 25, 0, -55) - EVT_THREAD - EVT_SET(AF_OMO07_DoorOpening, TRUE) - EVT_SET(LVar2, MV_SecretDoorAngle) - EVT_ADD(LVar2, 180) - EVT_CALL(MakeLerp, MV_SecretDoorAngle, LVar2, 30, EASING_COS_IN_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_k, LVar0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_tt1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_SET(MV_SecretDoorAngle, LVar2) - EVT_MOD(MV_SecretDoorAngle, 360) - EVT_SET(AF_OMO07_DoorOpening, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(NpcMoveTo, NPC_SELF, -10, 50, 0) - EVT_CALL(GetSelfVar, SHYGUY_VAR_STATE, LVar0) - EVT_IF_EQ(LVar0, SHYGUY_STATE_OPEN_DOOR) - EVT_CALL(SetSelfVar, SHYGUY_VAR_STATE, SHYGUY_STATE_ACTIVE) - EVT_END_IF - EVT_CASE_EQ(SHYGUY_STATE_ACTIVE) - EVT_WAIT(1) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_ShyGuy_Patrol))) - EVT_WAIT(10) - EVT_CASE_EQ(SHYGUY_STATE_RECYCLE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_LOOP(30) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_CALL(N(SetShyGuyPoolState), LVar0, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetSelfVar, SHYGUY_VAR_STATE, SHYGUY_STATE_FREE) - EVT_CASE_EQ(SHYGUY_STATE_FORCE_RECYCLE) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_CALL(N(SetShyGuyPoolState), LVar0, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(SetSelfVar, SHYGUY_VAR_STATE, SHYGUY_STATE_FREE) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetSelfVar, SHYGUY_VAR_STATE, LVar0) + Switch(LVar0) + CaseEq(SHYGUY_STATE_FREE) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + CaseEq(SHYGUY_STATE_RUN_TO_DOOR) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) + Call(EnableNpcShadow, NPC_SELF, TRUE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_PASSIVE, 0) + Call(SetNpcPos, NPC_SELF, 800, 0, 75) + Call(SetNpcSpeed, NPC_SELF, Float(4.0)) + Call(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03) + Call(SetNpcSpeed, NPC_SELF, Float(5.0)) + Call(NpcMoveTo, NPC_SELF, 665, 75, 0) + Call(SetNpcSpeed, NPC_SELF, Float(4.0)) + Call(NpcMoveTo, NPC_SELF, 635, -107, 0) + Call(NpcMoveTo, NPC_SELF, 100, -107, 0) + Call(NpcMoveTo, NPC_SELF, -10, -107, 0) + Call(SetSelfVar, SHYGUY_VAR_STATE, SHYGUY_STATE_WAIT_AT_DOOR) + Call(SetSelfVar, SHYGUY_VAR_WAIT_TIME, 0) + CaseEq(SHYGUY_STATE_WAIT_AT_DOOR) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, 130) + Wait(40) + Call(SetSelfVar, SHYGUY_VAR_STATE, SHYGUY_STATE_OPEN_DOOR) + EndIf + Call(GetSelfVar, SHYGUY_VAR_WAIT_TIME, LVar0) + Add(LVar0, 1) + Call(SetSelfVar, SHYGUY_VAR_WAIT_TIME, LVar0) + IfGt(LVar0, 180) + Wait(40) + Call(SetSelfVar, SHYGUY_VAR_STATE, SHYGUY_STATE_OPEN_DOOR) + Call(SetSelfVar, SHYGUY_VAR_WAIT_TIME, 0) + EndIf + CaseEq(SHYGUY_STATE_OPEN_DOOR) + Call(PlaySoundAt, SOUND_OMO_DOOR_FLIP, SOUND_SPACE_DEFAULT, 25, 0, -55) + Thread + Set(AF_OMO07_DoorOpening, TRUE) + Set(LVar2, MV_SecretDoorAngle) + Add(LVar2, 180) + Call(MakeLerp, MV_SecretDoorAngle, LVar2, 30, EASING_COS_IN_OUT) + Label(10) + Call(UpdateLerp) + Call(RotateModel, MODEL_k, LVar0, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_tt1) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Set(MV_SecretDoorAngle, LVar2) + Mod(MV_SecretDoorAngle, 360) + Set(AF_OMO07_DoorOpening, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + EndThread + Wait(10) + Call(NpcMoveTo, NPC_SELF, -10, 50, 0) + Call(GetSelfVar, SHYGUY_VAR_STATE, LVar0) + IfEq(LVar0, SHYGUY_STATE_OPEN_DOOR) + Call(SetSelfVar, SHYGUY_VAR_STATE, SHYGUY_STATE_ACTIVE) + EndIf + CaseEq(SHYGUY_STATE_ACTIVE) + Wait(1) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_ShyGuy_Patrol))) + Wait(10) + CaseEq(SHYGUY_STATE_RECYCLE) + Call(DisablePlayerInput, TRUE) + Loop(30) + Call(GetSelfNpcID, LVar0) + Call(N(SetShyGuyPoolState), LVar0, FALSE) + Wait(1) + EndLoop + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(DisablePlayerInput, FALSE) + Call(SetSelfVar, SHYGUY_VAR_STATE, SHYGUY_STATE_FREE) + CaseEq(SHYGUY_STATE_FORCE_RECYCLE) + Call(GetSelfNpcID, LVar0) + Call(N(SetShyGuyPoolState), LVar0, FALSE) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(SetSelfVar, SHYGUY_VAR_STATE, SHYGUY_STATE_FREE) + EndSwitch + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_NpcDefeat_ShyGuy) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_PASSIVE, 1) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetSelfVar, SHYGUY_VAR_STATE, SHYGUY_STATE_RECYCLE) - EVT_WAIT(1) - EVT_CALL(SetSelfVar, SHYGUY_VAR_STATE, SHYGUY_STATE_RECYCLE) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_ShyGuy))) - EVT_CALL(DoNpcDefeat) - EVT_WAIT(1) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_PASSIVE, 1) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetSelfVar, SHYGUY_VAR_STATE, SHYGUY_STATE_RECYCLE) + Wait(1) + Call(SetSelfVar, SHYGUY_VAR_STATE, SHYGUY_STATE_RECYCLE) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_ShyGuy))) + Call(DoNpcDefeat) + Wait(1) + CaseEq(OUTCOME_PLAYER_LOST) + Call(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03) + CaseEq(OUTCOME_PLAYER_FLED) + Call(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_ShyGuy) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcAI_ShyGuy))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_ShyGuy))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcAI_ShyGuy))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_ShyGuy))) + Return + End }; EvtScript N(EVS_NpcIdle_Fuzzy) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 990) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(DisableCameraLeadingPlayer)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(5.0), LVar0, LVar1, LVar2, 300, EVT_FLOAT(13.0), EVT_FLOAT(-9.5)) - EVT_IF_EQ(GB_OMO_PeachChoice2, 0) - EVT_CALL(SpeakToPlayer, NPC_Fuzzy, ANIM_Fuzzy_Anim0B, ANIM_Fuzzy_Idle, 0, MSG_CH4_003C) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 0, MSG_CH4_003D) - EVT_END_IF - EVT_THREAD - EVT_CALL(N(EnableCameraLeadingPlayer)) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_END_THREAD - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, 990) + Wait(1) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Call(N(DisableCameraLeadingPlayer)) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(SetCamProperties, CAM_DEFAULT, Float(5.0), LVar0, LVar1, LVar2, 300, Float(13.0), Float(-9.5)) + IfEq(GB_OMO_PeachChoice2, 0) + Call(SpeakToPlayer, NPC_Fuzzy, ANIM_Fuzzy_Anim0B, ANIM_Fuzzy_Idle, 0, MSG_CH4_003C) + Else + Call(SpeakToPlayer, NPC_HammerBros, ANIM_HammerBros_Anim0A, ANIM_HammerBros_Anim02, 0, MSG_CH4_003D) + EndIf + Thread + Call(N(EnableCameraLeadingPlayer)) + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + EndThread + Call(DisablePlayerInput, FALSE) + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Return + End }; EvtScript N(EVS_NpcDefeat_Fuzzy) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_SET(GF_OMO07_Item_ThunderRage, TRUE) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Set(GF_OMO07_Item_ThunderRage, TRUE) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Fuzzy) = { - EVT_IF_EQ(GB_OMO_PeachChoice2, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Fuzzy))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Fuzzy))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_OMO_PeachChoice2, 0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Fuzzy))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Fuzzy))) + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_HammerBros) = { - EVT_IF_EQ(GB_OMO_PeachChoice2, 1) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Fuzzy))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Fuzzy))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_OMO_PeachChoice2, 1) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Fuzzy))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Fuzzy))) + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Kammy) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Kammy))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Kammy))) + Return + End }; NpcData N(NpcData_ShyGuy) = { diff --git a/src/world/area_omo/omo_07/omo_07_5_entity.c b/src/world/area_omo/omo_07/omo_07_5_entity.c index 737e66c9a38..bbf16712fd8 100644 --- a/src/world/area_omo/omo_07/omo_07_5_entity.c +++ b/src/world/area_omo/omo_07/omo_07_5_entity.c @@ -4,13 +4,13 @@ #include "world/common/entity/Chest.inc.c" EvtScript N(EVS_OpenChest_FryingPan) = { - EVT_SET(LVarA, ITEM_FRYING_PAN) - EVT_SET(LVarB, ITEM_TYPE_KEY) - EVT_SET(GF_OMO07_Chest_FryingPan, TRUE) - EVT_SET(GB_StoryProgress, STORY_CH4_GOT_FRYING_PAN) - EVT_EXEC_WAIT(N(EVS_Chest_GetItem)) - EVT_RETURN - EVT_END + Set(LVarA, ITEM_FRYING_PAN) + Set(LVarB, ITEM_TYPE_KEY) + Set(GF_OMO07_Chest_FryingPan, TRUE) + Set(GB_StoryProgress, STORY_CH4_GOT_FRYING_PAN) + ExecWait(N(EVS_Chest_GetItem)) + Return + End }; EvtScript N(EVS_OpenChest_DefendPlus) = EVT_OPEN_CHEST_BADGE(ITEM_DEFEND_PLUS_A, GF_OMO07_Chest_DefendPlusA); @@ -21,13 +21,13 @@ EvtScript N(EVS_OpenChest_IcePower) = EVT_OPEN_CHEST_BADGE(ITEM_ICE_POWER, GF_OM #include "world/common/DisableCameraFollowPlayerY.inc.c" EvtScript N(EVS_TetherCamToPlayer) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; Vec3i N(StarBoxLaunchTargets)[] = { @@ -37,72 +37,72 @@ Vec3i N(StarBoxLaunchTargets)[] = { }; EvtScript N(EVS_StarBoxLaunch_Impl) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_USE_BUF(EVT_PTR(N(StarBoxLaunchTargets))) - EVT_LOOP(LVar0) - EVT_BUF_READ3(LVar7, LVar8, LVar9) - EVT_END_LOOP - EVT_CALL(SetPlayerActionState, ACTION_STATE_JUMP) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_LOOP(4) - EVT_ADD(LVar1, 10) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(N(EnableCameraFollowPlayerY)) - EVT_EXEC_GET_TID(N(EVS_TetherCamToPlayer), LVarA) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7)) - EVT_CALL(PlayerJump, LVar7, LVar8, LVar9, 40) - EVT_KILL_THREAD(LVarA) - EVT_WAIT(3) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(N(DisableCameraFollowPlayerY)) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + UseBuf(Ref(N(StarBoxLaunchTargets))) + Loop(LVar0) + BufRead3(LVar7, LVar8, LVar9) + EndLoop + Call(SetPlayerActionState, ACTION_STATE_JUMP) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Loop(4) + Add(LVar1, 10) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(N(EnableCameraFollowPlayerY)) + ExecGetTID(N(EVS_TetherCamToPlayer), LVarA) + Call(SetPlayerJumpscale, Float(0.7)) + Call(PlayerJump, LVar7, LVar8, LVar9, 40) + KillThread(LVarA) + Wait(3) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(N(DisableCameraFollowPlayerY)) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_StarBoxLaunch1) = { - EVT_SET(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_StarBoxLaunch_Impl)) - EVT_RETURN - EVT_END + Set(LVar0, 1) + ExecWait(N(EVS_StarBoxLaunch_Impl)) + Return + End }; EvtScript N(EVS_StarBoxLaunch2) = { - EVT_SET(LVar0, 2) - EVT_EXEC_WAIT(N(EVS_StarBoxLaunch_Impl)) - EVT_RETURN - EVT_END + Set(LVar0, 2) + ExecWait(N(EVS_StarBoxLaunch_Impl)) + Return + End }; EvtScript N(EVS_StarBoxLaunch3) = { - EVT_SET(LVar0, 3) - EVT_EXEC_WAIT(N(EVS_StarBoxLaunch_Impl)) - EVT_RETURN - EVT_END + Set(LVar0, 3) + ExecWait(N(EVS_StarBoxLaunch_Impl)) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 1130, 0, 0, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_OMO07_Chest_FryingPan) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenChest_FryingPan))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), -910, 80, -100, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_OMO07_Chest_DefendPlusA) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenChest_DefendPlus))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 750, 0, -100, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_OMO07_Chest_IcePower) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenChest_IcePower))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 650, 60, -30, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OMO07_ItemBlock_Coin) - EVT_CALL(MakeEntity, EVT_PTR(Entity_StarBoxLauncher), -330, 0, 127, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_StarBoxLaunch1))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_StarBoxLauncher), -260, 0, 127, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_StarBoxLaunch2))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_StarBoxLauncher), -192, 80, -132, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_StarBoxLaunch3))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Chest), 1130, 0, 0, 0, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_OMO07_Chest_FryingPan) + Call(AssignScript, Ref(N(EVS_OpenChest_FryingPan))) + Call(MakeEntity, Ref(Entity_Chest), -910, 80, -100, 0, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_OMO07_Chest_DefendPlusA) + Call(AssignScript, Ref(N(EVS_OpenChest_DefendPlus))) + Call(MakeEntity, Ref(Entity_Chest), 750, 0, -100, 0, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_OMO07_Chest_IcePower) + Call(AssignScript, Ref(N(EVS_OpenChest_IcePower))) + Call(MakeEntity, Ref(Entity_YellowBlock), 650, 60, -30, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OMO07_ItemBlock_Coin) + Call(MakeEntity, Ref(Entity_StarBoxLauncher), -330, 0, 127, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_StarBoxLaunch1))) + Call(MakeEntity, Ref(Entity_StarBoxLauncher), -260, 0, 127, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_StarBoxLaunch2))) + Call(MakeEntity, Ref(Entity_StarBoxLauncher), -192, 80, -132, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_StarBoxLaunch3))) + Return + End }; diff --git a/src/world/area_omo/omo_07/omo_07_6_scenes.c b/src/world/area_omo/omo_07/omo_07_6_scenes.c index 297b7d5b709..c032b7a2bf2 100644 --- a/src/world/area_omo/omo_07/omo_07_6_scenes.c +++ b/src/world/area_omo/omo_07/omo_07_6_scenes.c @@ -7,112 +7,112 @@ s32 N(HoverOffsets)[] = { }; EvtScript N(EVS_NpcIdle_Kammy) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar6, LVar3, LVar4) - EVT_LOOP(0) - EVT_USE_BUF(EVT_PTR(N(HoverOffsets))) - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) - EVT_CALL(GetSelfVar, 0, LVar5) - EVT_IF_EQ(LVar5, 0) - EVT_WAIT(1) - EVT_ELSE - EVT_BUF_READ1(LVar1) - EVT_ADD(LVar3, LVar1) - EVT_CALL(SetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) - EVT_WAIT(3) - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Call(GetNpcPos, NPC_SELF, LVar6, LVar3, LVar4) + Loop(0) + UseBuf(Ref(N(HoverOffsets))) + Loop(10) + Call(GetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) + Call(GetSelfVar, 0, LVar5) + IfEq(LVar5, 0) + Wait(1) + Else + BufRead1(LVar1) + Add(LVar3, LVar1) + Call(SetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) + Wait(3) + EndIf + EndLoop + EndLoop + Return + End }; #define KAMMY_NPC NPC_Kammy #include "world/common/util/GetKammyBroomEmitterPos.inc.c" EvtScript N(EVS_NpcAux_Kammy) = { - EVT_CALL(GetNpcPos, NPC_Kammy, LVar6, LVar7, LVar8) - EVT_LOOP(0) - EVT_CALL(N(GetKammyBroomEmitterPos)) - EVT_CALL(GetNpcPos, NPC_Kammy, LVar9, LVarA, LVarB) - EVT_SET(LVar3, LVar9) - EVT_SET(LVar4, LVarA) - EVT_SET(LVar5, LVarB) - EVT_SUBF(LVar3, LVar6) - EVT_SUBF(LVar4, LVar7) - EVT_SUBF(LVar5, LVar8) - EVT_SETF(LVar6, LVar9) - EVT_SETF(LVar7, LVarA) - EVT_SETF(LVar8, LVarB) - EVT_IF_NE(LVar3, 0) - EVT_IF_NE(LVar5, 0) - EVT_PLAY_EFFECT(EFFECT_PURPLE_RING, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_END_IF - EVT_WAIT(3) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_Kammy, LVar6, LVar7, LVar8) + Loop(0) + Call(N(GetKammyBroomEmitterPos)) + Call(GetNpcPos, NPC_Kammy, LVar9, LVarA, LVarB) + Set(LVar3, LVar9) + Set(LVar4, LVarA) + Set(LVar5, LVarB) + SubF(LVar3, LVar6) + SubF(LVar4, LVar7) + SubF(LVar5, LVar8) + SetF(LVar6, LVar9) + SetF(LVar7, LVarA) + SetF(LVar8, LVarB) + IfNe(LVar3, 0) + IfNe(LVar5, 0) + PlayEffect(EFFECT_PURPLE_RING, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.0)) + EndIf + EndIf + Wait(3) + EndLoop + Return + End }; EvtScript N(EVS_Scene_KammySetAmbush) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(GF_OMO07_SpawnedPeachChoice2, TRUE) - EVT_SET(AB_OMO_CurrentPeachChoice, GB_OMO_PeachChoice2) - EVT_SWITCH(AB_OMO_CurrentPeachChoice) - EVT_CASE_EQ(0) - EVT_SET(MV_AmbushID, NPC_Fuzzy) - EVT_CASE_EQ(1) - EVT_SET(MV_AmbushID, NPC_HammerBros) - EVT_CASE_EQ(2) - EVT_SET(MV_AmbushID, ITEM_THUNDER_RAGE) - EVT_END_SWITCH - EVT_CALL(SetNpcPos, NPC_Kammy, 1000, 15, 0) - EVT_CALL(SetNpcYaw, NPC_Kammy, 90) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim13) - EVT_IF_NE(AB_OMO_CurrentPeachChoice, 2) - EVT_CALL(SetNpcPos, MV_AmbushID, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 1060, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 1060, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(5 * DT) - EVT_CALL(SetNpcVar, NPC_Kammy, 0, 1) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim13) - EVT_WAIT(25 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0E) - EVT_CALL(GetNpcPos, NPC_Kammy, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 25) - EVT_ADD(LVar1, 38) - EVT_CALL(PlaySoundAt, SOUND_KAMMY_SUMMON_MAGIC, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 75) - EVT_WAIT(75 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0F) - EVT_ADD(LVar0, 55) - EVT_CALL(PlaySoundAt, SOUND_VANISH_IN_SMOKE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, 0, 0, 1, 15, 3, 8) - EVT_WAIT(5 * DT) - EVT_IF_NE(AB_OMO_CurrentPeachChoice, 2) - EVT_CALL(SetNpcPos, MV_AmbushID, LVar0, 0, 0) - EVT_ELSE - EVT_CALL(MakeItemEntity, MV_AmbushID, LVar0, 0, 0, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_END_IF - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim13) - EVT_CALL(SetNpcVar, NPC_Kammy, 0, 0) - EVT_WAIT(5 * DT) - EVT_IF_NE(AB_OMO_CurrentPeachChoice, 2) - EVT_CALL(PlaySoundAtNpc, MV_AmbushID, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, MV_AmbushID, EMOTE_QUESTION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(5 * DT) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("omo_07"), omo_07_ENTRY_0) - EVT_WAIT(100 * DT) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Set(GF_OMO07_SpawnedPeachChoice2, TRUE) + Set(AB_OMO_CurrentPeachChoice, GB_OMO_PeachChoice2) + Switch(AB_OMO_CurrentPeachChoice) + CaseEq(0) + Set(MV_AmbushID, NPC_Fuzzy) + CaseEq(1) + Set(MV_AmbushID, NPC_HammerBros) + CaseEq(2) + Set(MV_AmbushID, ITEM_THUNDER_RAGE) + EndSwitch + Call(SetNpcPos, NPC_Kammy, 1000, 15, 0) + Call(SetNpcYaw, NPC_Kammy, 90) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim13) + IfNe(AB_OMO_CurrentPeachChoice, 2) + Call(SetNpcPos, MV_AmbushID, NPC_DISPOSE_LOCATION) + EndIf + Call(UseSettingsFrom, CAM_DEFAULT, 1060, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 1060, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(350.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-7.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(5 * DT) + Call(SetNpcVar, NPC_Kammy, 0, 1) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim13) + Wait(25 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0E) + Call(GetNpcPos, NPC_Kammy, LVar0, LVar1, LVar2) + Add(LVar0, 25) + Add(LVar1, 38) + Call(PlaySoundAt, SOUND_KAMMY_SUMMON_MAGIC, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, Float(1.0), 75) + Wait(75 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0F) + Add(LVar0, 55) + Call(PlaySoundAt, SOUND_VANISH_IN_SMOKE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, 0, 0, 1, 15, 3, 8) + Wait(5 * DT) + IfNe(AB_OMO_CurrentPeachChoice, 2) + Call(SetNpcPos, MV_AmbushID, LVar0, 0, 0) + Else + Call(MakeItemEntity, MV_AmbushID, LVar0, 0, 0, ITEM_SPAWN_MODE_DECORATION, 0) + EndIf + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim13) + Call(SetNpcVar, NPC_Kammy, 0, 0) + Wait(5 * DT) + IfNe(AB_OMO_CurrentPeachChoice, 2) + Call(PlaySoundAtNpc, MV_AmbushID, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) + Call(ShowEmote, MV_AmbushID, EMOTE_QUESTION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) + Wait(5 * DT) + EndIf + Call(GotoMap, Ref("omo_07"), omo_07_ENTRY_0) + Wait(100 * DT) + Return + End }; diff --git a/src/world/area_omo/omo_08/omo_08_1_music.c b/src/world/area_omo/omo_08/omo_08_1_music.c index 218c4442883..3f1cfcb45ee 100644 --- a/src/world/area_omo/omo_08/omo_08_1_music.c +++ b/src/world/area_omo/omo_08/omo_08_1_music.c @@ -1,17 +1,17 @@ #include "omo_08.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) - EVT_ELSE - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, omo_08_ENTRY_0) - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_TOYBOX_TRAIN, 0, 8) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Call(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) + Else + Call(GetEntryID, LVar0) + IfEq(LVar0, omo_08_ENTRY_0) + Call(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) + Else + Call(SetMusicTrack, 0, SONG_TOYBOX_TRAIN, 0, 8) + EndIf + EndIf + Return + End }; diff --git a/src/world/area_omo/omo_08/omo_08_2_main.c b/src/world/area_omo/omo_08/omo_08_2_main.c index 3d14065b1a7..bda75cb4c88 100644 --- a/src/world/area_omo/omo_08/omo_08_2_main.c +++ b/src/world/area_omo/omo_08/omo_08_2_main.c @@ -3,55 +3,55 @@ EvtScript N(EVS_ExitWalk_omo_09_0) = EVT_EXIT_WALK(60, omo_08_ENTRY_0, "omo_09", omo_09_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_09_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_omo_09_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, omo_08_ENTRY_0) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_ELSE - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_WAIT(3) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(GetEntryID, LVar0) + IfEq(LVar0, omo_08_ENTRY_0) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Else + Exec(N(EVS_BindExitTriggers)) + Wait(3) + EndIf + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() + Set(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() #if VERSION_PAL - EVT_CALL(GetLanguage, LVar0) - EVT_SWITCH(LVar0) - EVT_IF_GE(LVar0, LANGUAGE_FR) // or LANGUAGE_ES - EVT_SUB(LVar0, LANGUAGE_FR - LANGUAGE_EN) - EVT_END_IF - EVT_CALL(SetModelTexVariant, MODEL_s, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_a, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_t, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_i, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_o, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_n, LVar0) + Call(GetLanguage, LVar0) + Switch(LVar0) + IfGe(LVar0, LANGUAGE_FR) // or LANGUAGE_ES + Sub(LVar0, LANGUAGE_FR - LANGUAGE_EN) + EndIf + Call(SetModelTexVariant, MODEL_s, LVar0) + Call(SetModelTexVariant, MODEL_a, LVar0) + Call(SetModelTexVariant, MODEL_t, LVar0) + Call(SetModelTexVariant, MODEL_i, LVar0) + Call(SetModelTexVariant, MODEL_o, LVar0) + Call(SetModelTexVariant, MODEL_n, LVar0) #endif - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_EXEC_WAIT(N(EVS_SetupTrain)) - EVT_EXEC_WAIT(N(EVS_SetupBoxes)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupMusic)) + ExecWait(N(EVS_SetupTrain)) + ExecWait(N(EVS_SetupBoxes)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_omo/omo_08/omo_08_3_boxes.c b/src/world/area_omo/omo_08/omo_08_3_boxes.c index 8f376cf55f1..45fb8a79dec 100644 --- a/src/world/area_omo/omo_08/omo_08_3_boxes.c +++ b/src/world/area_omo/omo_08/omo_08_3_boxes.c @@ -37,705 +37,705 @@ s32 N(BlueBoxInfo)[] = { }; EvtScript N(EVS_GreenLightOff) = { - EVT_CALL(EnableModel, MODEL_bm1_1, TRUE) - EVT_CALL(EnableModel, MODEL_b1_1, TRUE) - EVT_CALL(EnableModel, MODEL_bm1_2, FALSE) - EVT_CALL(EnableModel, MODEL_b1_2, FALSE) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_bm1_1, TRUE) + Call(EnableModel, MODEL_b1_1, TRUE) + Call(EnableModel, MODEL_bm1_2, FALSE) + Call(EnableModel, MODEL_b1_2, FALSE) + Return + End }; EvtScript N(EVS_YellowLightOff) = { - EVT_CALL(EnableModel, MODEL_bm2_1, TRUE) - EVT_CALL(EnableModel, MODEL_b2_1, TRUE) - EVT_CALL(EnableModel, MODEL_bm2_2, FALSE) - EVT_CALL(EnableModel, MODEL_b2_2, FALSE) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_bm2_1, TRUE) + Call(EnableModel, MODEL_b2_1, TRUE) + Call(EnableModel, MODEL_bm2_2, FALSE) + Call(EnableModel, MODEL_b2_2, FALSE) + Return + End }; EvtScript N(EVS_RedLightOff) = { - EVT_CALL(EnableModel, MODEL_bm3_1, TRUE) - EVT_CALL(EnableModel, MODEL_b3_1, TRUE) - EVT_CALL(EnableModel, MODEL_bm3_2, FALSE) - EVT_CALL(EnableModel, MODEL_b3_2, FALSE) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_bm3_1, TRUE) + Call(EnableModel, MODEL_b3_1, TRUE) + Call(EnableModel, MODEL_bm3_2, FALSE) + Call(EnableModel, MODEL_b3_2, FALSE) + Return + End }; EvtScript N(EVS_BlueLightOff) = { - EVT_CALL(EnableModel, MODEL_bm4_1, TRUE) - EVT_CALL(EnableModel, MODEL_b4_1, TRUE) - EVT_CALL(EnableModel, MODEL_bm4_2, FALSE) - EVT_CALL(EnableModel, MODEL_b4_2, FALSE) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_bm4_1, TRUE) + Call(EnableModel, MODEL_b4_1, TRUE) + Call(EnableModel, MODEL_bm4_2, FALSE) + Call(EnableModel, MODEL_b4_2, FALSE) + Return + End }; EvtScript N(EVS_GreenLightOn) = { - EVT_CALL(EnableModel, MODEL_bm1_1, FALSE) - EVT_CALL(EnableModel, MODEL_b1_1, FALSE) - EVT_CALL(EnableModel, MODEL_bm1_2, TRUE) - EVT_CALL(EnableModel, MODEL_b1_2, TRUE) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_bm1_1, FALSE) + Call(EnableModel, MODEL_b1_1, FALSE) + Call(EnableModel, MODEL_bm1_2, TRUE) + Call(EnableModel, MODEL_b1_2, TRUE) + Return + End }; EvtScript N(EVS_YellowLightOn) = { - EVT_CALL(EnableModel, MODEL_bm2_1, FALSE) - EVT_CALL(EnableModel, MODEL_b2_1, FALSE) - EVT_CALL(EnableModel, MODEL_bm2_2, TRUE) - EVT_CALL(EnableModel, MODEL_b2_2, TRUE) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_bm2_1, FALSE) + Call(EnableModel, MODEL_b2_1, FALSE) + Call(EnableModel, MODEL_bm2_2, TRUE) + Call(EnableModel, MODEL_b2_2, TRUE) + Return + End }; EvtScript N(EVS_RedLightOn) = { - EVT_CALL(EnableModel, MODEL_bm3_1, FALSE) - EVT_CALL(EnableModel, MODEL_b3_1, FALSE) - EVT_CALL(EnableModel, MODEL_bm3_2, TRUE) - EVT_CALL(EnableModel, MODEL_b3_2, TRUE) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_bm3_1, FALSE) + Call(EnableModel, MODEL_b3_1, FALSE) + Call(EnableModel, MODEL_bm3_2, TRUE) + Call(EnableModel, MODEL_b3_2, TRUE) + Return + End }; EvtScript N(EVS_BlueLightOn) = { - EVT_CALL(EnableModel, MODEL_bm4_1, FALSE) - EVT_CALL(EnableModel, MODEL_b4_1, FALSE) - EVT_CALL(EnableModel, MODEL_bm4_2, TRUE) - EVT_CALL(EnableModel, MODEL_b4_2, TRUE) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_bm4_1, FALSE) + Call(EnableModel, MODEL_b4_1, FALSE) + Call(EnableModel, MODEL_bm4_2, TRUE) + Call(EnableModel, MODEL_b4_2, TRUE) + Return + End }; EvtScript N(EVS_ResetBoxesAfterAmbush) = { // wait for all shy guys to be defeated - EVT_LABEL(0) - EVT_CALL(GetNpcPos, NPC_ShyGuy_01, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_ShyGuy_02, LVar0, LVar2, LVar3) - EVT_CALL(GetNpcPos, NPC_ShyGuy_03, LVar0, LVar3, LVar4) - EVT_CALL(GetNpcPos, NPC_ShyGuy_04, LVar0, LVar4, LVar5) - EVT_ADD(LVar1, LVar2) - EVT_ADD(LVar1, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_IF_NE(LVar1, 4 * NPC_DISPOSE_POS_Y) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_THREAD - EVT_EXEC(N(EVS_GreenLightOff)) - EVT_CALL(MakeLerp, 90, 0, 10, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_bm1_2, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_bm1_1, LVar0, -1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(2) - EVT_THREAD - EVT_EXEC(N(EVS_YellowLightOff)) - EVT_CALL(MakeLerp, 90, 0, 10, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_bm2_2, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_bm2_1, LVar0, -1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(3) - EVT_THREAD - EVT_EXEC(N(EVS_RedLightOff)) - EVT_CALL(MakeLerp, 90, 0, 10, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_bm3_2, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_bm3_1, LVar0, -1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(3) - EVT_EXEC(N(EVS_BlueLightOff)) - EVT_CALL(MakeLerp, 90, 0, 10, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_bm4_2, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_bm4_1, LVar0, -1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(MV_BoxHitSequence, 0) - EVT_SET(MV_BoxHitCount, 0) - EVT_CALL(EnableModel, MODEL_bm1_2, FALSE) - EVT_CALL(EnableModel, MODEL_b1_2, FALSE) - EVT_SET(LVar0, EVT_PTR(N(GreenBoxInfo))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_HitBox)), TRIGGER_WALL_HAMMER, COLLIDER_o907, 1, 0) - EVT_CALL(EnableModel, MODEL_bm2_2, FALSE) - EVT_CALL(EnableModel, MODEL_b2_2, FALSE) - EVT_SET(LVar0, EVT_PTR(N(YellowBoxInfo))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_HitBox)), TRIGGER_WALL_HAMMER, COLLIDER_o911, 1, 0) - EVT_CALL(EnableModel, MODEL_bm3_2, FALSE) - EVT_CALL(EnableModel, MODEL_b3_2, FALSE) - EVT_SET(LVar0, EVT_PTR(N(RedBoxInfo))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_HitBox)), TRIGGER_WALL_HAMMER, COLLIDER_o915, 1, 0) - EVT_CALL(EnableModel, MODEL_bm4_2, FALSE) - EVT_CALL(EnableModel, MODEL_b4_2, FALSE) - EVT_SET(LVar0, EVT_PTR(N(BlueBoxInfo))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_HitBox)), TRIGGER_WALL_HAMMER, COLLIDER_o918, 1, 0) - EVT_RETURN - EVT_END + Label(0) + Call(GetNpcPos, NPC_ShyGuy_01, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_ShyGuy_02, LVar0, LVar2, LVar3) + Call(GetNpcPos, NPC_ShyGuy_03, LVar0, LVar3, LVar4) + Call(GetNpcPos, NPC_ShyGuy_04, LVar0, LVar4, LVar5) + Add(LVar1, LVar2) + Add(LVar1, LVar3) + Add(LVar1, LVar4) + IfNe(LVar1, 4 * NPC_DISPOSE_POS_Y) + Wait(1) + Goto(0) + EndIf + Thread + Exec(N(EVS_GreenLightOff)) + Call(MakeLerp, 90, 0, 10, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_bm1_2, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_bm1_1, LVar0, -1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Wait(2) + Thread + Exec(N(EVS_YellowLightOff)) + Call(MakeLerp, 90, 0, 10, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_bm2_2, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_bm2_1, LVar0, -1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Wait(3) + Thread + Exec(N(EVS_RedLightOff)) + Call(MakeLerp, 90, 0, 10, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_bm3_2, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_bm3_1, LVar0, -1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Wait(3) + Exec(N(EVS_BlueLightOff)) + Call(MakeLerp, 90, 0, 10, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_bm4_2, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_bm4_1, LVar0, -1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Set(MV_BoxHitSequence, 0) + Set(MV_BoxHitCount, 0) + Call(EnableModel, MODEL_bm1_2, FALSE) + Call(EnableModel, MODEL_b1_2, FALSE) + Set(LVar0, Ref(N(GreenBoxInfo))) + BindTrigger(Ref(N(EVS_HitBox)), TRIGGER_WALL_HAMMER, COLLIDER_o907, 1, 0) + Call(EnableModel, MODEL_bm2_2, FALSE) + Call(EnableModel, MODEL_b2_2, FALSE) + Set(LVar0, Ref(N(YellowBoxInfo))) + BindTrigger(Ref(N(EVS_HitBox)), TRIGGER_WALL_HAMMER, COLLIDER_o911, 1, 0) + Call(EnableModel, MODEL_bm3_2, FALSE) + Call(EnableModel, MODEL_b3_2, FALSE) + Set(LVar0, Ref(N(RedBoxInfo))) + BindTrigger(Ref(N(EVS_HitBox)), TRIGGER_WALL_HAMMER, COLLIDER_o915, 1, 0) + Call(EnableModel, MODEL_bm4_2, FALSE) + Call(EnableModel, MODEL_b4_2, FALSE) + Set(LVar0, Ref(N(BlueBoxInfo))) + BindTrigger(Ref(N(EVS_HitBox)), TRIGGER_WALL_HAMMER, COLLIDER_o918, 1, 0) + Return + End }; EvtScript N(EVS_BoxResult_GiveCoins) = { - EVT_SET(LVar0, 4) - EVT_LOOP(3) - EVT_EXEC(N(EVS_GreenLightOff)) - EVT_WAIT(LVar0) - EVT_EXEC(N(EVS_YellowLightOff)) - EVT_WAIT(LVar0) - EVT_EXEC(N(EVS_RedLightOff)) - EVT_WAIT(LVar0) - EVT_EXEC(N(EVS_BlueLightOff)) - EVT_WAIT(LVar0) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o907, SOUND_OMO_BOX_CHIME_2, SOUND_SPACE_DEFAULT) - EVT_EXEC(N(EVS_GreenLightOn)) - EVT_WAIT(LVar0) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o911, SOUND_OMO_BOX_CHIME_1, SOUND_SPACE_DEFAULT) - EVT_EXEC(N(EVS_YellowLightOn)) - EVT_WAIT(LVar0) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o915, SOUND_OMO_BOX_CHIME_3, SOUND_SPACE_DEFAULT) - EVT_EXEC(N(EVS_RedLightOn)) - EVT_WAIT(LVar0) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o918, SOUND_OMO_BOX_CHIME_4, SOUND_SPACE_DEFAULT) - EVT_EXEC(N(EVS_BlueLightOn)) - EVT_WAIT(LVar0) - EVT_SUB(LVar0, 1) - EVT_END_LOOP - EVT_WAIT(4) - EVT_SET(LVar0, 4) - EVT_LOOP(3) - EVT_EXEC(N(EVS_GreenLightOff)) - EVT_EXEC(N(EVS_YellowLightOff)) - EVT_EXEC(N(EVS_RedLightOff)) - EVT_EXEC(N(EVS_BlueLightOff)) - EVT_WAIT(LVar0) - EVT_CALL(PlaySound, SOUND_OMO_BOX_DONE) - EVT_EXEC(N(EVS_GreenLightOn)) - EVT_EXEC(N(EVS_YellowLightOn)) - EVT_EXEC(N(EVS_RedLightOn)) - EVT_EXEC(N(EVS_BlueLightOn)) - EVT_WAIT(LVar0) - EVT_SUB(LVar0, 1) - EVT_END_LOOP - EVT_WAIT(2) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 90, 10, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_bm1_2, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_bm1_1, LVar0, -1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(GetModelCenter, MODEL_b1_1) - EVT_CALL(MakeItemEntity, ITEM_COIN, LVar0, 40, LVar2, ITEM_SPAWN_MODE_BATTLE_REWARD, 0) - EVT_END_THREAD - EVT_WAIT(3) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 90, 10, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_bm2_2, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_bm2_1, LVar0, -1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(GetModelCenter, MODEL_b2_1) - EVT_CALL(MakeItemEntity, ITEM_COIN, LVar0, 40, LVar2, ITEM_SPAWN_MODE_BATTLE_REWARD, 0) - EVT_END_THREAD - EVT_WAIT(3) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 90, 10, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_bm3_2, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_bm3_1, LVar0, -1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(GetModelCenter, MODEL_b3_1) - EVT_CALL(MakeItemEntity, ITEM_COIN, LVar0, 40, LVar2, ITEM_SPAWN_MODE_BATTLE_REWARD, 0) - EVT_END_THREAD - EVT_WAIT(3) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 90, 10, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_bm4_2, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_bm4_1, LVar0, -1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(GetModelCenter, MODEL_b4_1) - EVT_CALL(MakeItemEntity, ITEM_COIN, LVar0, 40, LVar2, ITEM_SPAWN_MODE_BATTLE_REWARD, 0) - EVT_WAIT(20) - EVT_CALL(ResetCam, CAM_DEFAULT, 2) - EVT_END_THREAD - EVT_RETURN - EVT_END + Set(LVar0, 4) + Loop(3) + Exec(N(EVS_GreenLightOff)) + Wait(LVar0) + Exec(N(EVS_YellowLightOff)) + Wait(LVar0) + Exec(N(EVS_RedLightOff)) + Wait(LVar0) + Exec(N(EVS_BlueLightOff)) + Wait(LVar0) + Call(PlaySoundAtCollider, COLLIDER_o907, SOUND_OMO_BOX_CHIME_2, SOUND_SPACE_DEFAULT) + Exec(N(EVS_GreenLightOn)) + Wait(LVar0) + Call(PlaySoundAtCollider, COLLIDER_o911, SOUND_OMO_BOX_CHIME_1, SOUND_SPACE_DEFAULT) + Exec(N(EVS_YellowLightOn)) + Wait(LVar0) + Call(PlaySoundAtCollider, COLLIDER_o915, SOUND_OMO_BOX_CHIME_3, SOUND_SPACE_DEFAULT) + Exec(N(EVS_RedLightOn)) + Wait(LVar0) + Call(PlaySoundAtCollider, COLLIDER_o918, SOUND_OMO_BOX_CHIME_4, SOUND_SPACE_DEFAULT) + Exec(N(EVS_BlueLightOn)) + Wait(LVar0) + Sub(LVar0, 1) + EndLoop + Wait(4) + Set(LVar0, 4) + Loop(3) + Exec(N(EVS_GreenLightOff)) + Exec(N(EVS_YellowLightOff)) + Exec(N(EVS_RedLightOff)) + Exec(N(EVS_BlueLightOff)) + Wait(LVar0) + Call(PlaySound, SOUND_OMO_BOX_DONE) + Exec(N(EVS_GreenLightOn)) + Exec(N(EVS_YellowLightOn)) + Exec(N(EVS_RedLightOn)) + Exec(N(EVS_BlueLightOn)) + Wait(LVar0) + Sub(LVar0, 1) + EndLoop + Wait(2) + Thread + Call(MakeLerp, 0, 90, 10, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_bm1_2, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_bm1_1, LVar0, -1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(GetModelCenter, MODEL_b1_1) + Call(MakeItemEntity, ITEM_COIN, LVar0, 40, LVar2, ITEM_SPAWN_MODE_BATTLE_REWARD, 0) + EndThread + Wait(3) + Thread + Call(MakeLerp, 0, 90, 10, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_bm2_2, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_bm2_1, LVar0, -1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(GetModelCenter, MODEL_b2_1) + Call(MakeItemEntity, ITEM_COIN, LVar0, 40, LVar2, ITEM_SPAWN_MODE_BATTLE_REWARD, 0) + EndThread + Wait(3) + Thread + Call(MakeLerp, 0, 90, 10, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_bm3_2, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_bm3_1, LVar0, -1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(GetModelCenter, MODEL_b3_1) + Call(MakeItemEntity, ITEM_COIN, LVar0, 40, LVar2, ITEM_SPAWN_MODE_BATTLE_REWARD, 0) + EndThread + Wait(3) + Thread + Call(MakeLerp, 0, 90, 10, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_bm4_2, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_bm4_1, LVar0, -1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(GetModelCenter, MODEL_b4_1) + Call(MakeItemEntity, ITEM_COIN, LVar0, 40, LVar2, ITEM_SPAWN_MODE_BATTLE_REWARD, 0) + Wait(20) + Call(ResetCam, CAM_DEFAULT, 2) + EndThread + Return + End }; EvtScript N(EVS_BoxResult_RepairTrack) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_LOOP(4) - EVT_EXEC(N(EVS_GreenLightOff)) - EVT_WAIT(3) - EVT_EXEC(N(EVS_YellowLightOff)) - EVT_WAIT(3) - EVT_EXEC(N(EVS_RedLightOff)) - EVT_WAIT(3) - EVT_EXEC(N(EVS_BlueLightOff)) - EVT_WAIT(3) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o907, SOUND_OMO_BOX_CHIME_2, SOUND_SPACE_DEFAULT) - EVT_EXEC(N(EVS_GreenLightOn)) - EVT_WAIT(3) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o911, SOUND_OMO_BOX_CHIME_1, SOUND_SPACE_DEFAULT) - EVT_EXEC(N(EVS_YellowLightOn)) - EVT_WAIT(3) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o915, SOUND_OMO_BOX_CHIME_3, SOUND_SPACE_DEFAULT) - EVT_EXEC(N(EVS_RedLightOn)) - EVT_WAIT(3) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o918, SOUND_OMO_BOX_CHIME_4, SOUND_SPACE_DEFAULT) - EVT_EXEC(N(EVS_BlueLightOn)) - EVT_WAIT(3) - EVT_END_LOOP - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 160, 10, -200) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 160, 10, -200) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 700) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 40, EVT_FLOAT(-4.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(30) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 90, 40, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_t1, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(GetModelCenter, MODEL_o875) - EVT_CALL(PlaySoundAt, SOUND_OMO_COLORED_PANEL_DROP, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, LVar0, LVar1, LVar2, 0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 3, EVT_FLOAT(0.8)) - EVT_END_THREAD - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 90, 40, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_t2, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(GetModelCenter, MODEL_o877) - EVT_CALL(PlaySoundAt, SOUND_OMO_COLORED_PANEL_DROP, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, LVar0, LVar1, LVar2, 0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 3, EVT_FLOAT(0.8)) - EVT_END_THREAD - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 90, 40, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_t3, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(GetModelCenter, MODEL_o879) - EVT_CALL(PlaySoundAt, SOUND_OMO_COLORED_PANEL_DROP, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, LVar0, LVar1, LVar2, 0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 3, EVT_FLOAT(0.8)) - EVT_END_THREAD - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 90, 40, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_t4, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(GetModelCenter, MODEL_o881) - EVT_CALL(PlaySoundAt, SOUND_OMO_COLORED_PANEL_DROP, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, LVar0, LVar1, LVar2, 0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 3, EVT_FLOAT(0.8)) - EVT_END_THREAD - EVT_WAIT(100) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 100, 0, 370) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 100, 0, 370) - EVT_CALL(SetCamDistance, CAM_DEFAULT, -450) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 16, EVT_FLOAT(-6.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(GetModelCenter, MODEL_b1_1) - EVT_CALL(SetGroupVisibility, MODEL_b1, MODEL_GROUP_HIDDEN) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o907, SOUND_VANISH_IN_SMOKE, SOUND_SPACE_DEFAULT) - EVT_LOOP(4) - EVT_SET(LVar3, 20) - EVT_CALL(RandInt, 40, LVar6) - EVT_SUB(LVar3, LVar6) - EVT_ADD(LVar3, LVar0) - EVT_SET(LVar4, 20) - EVT_CALL(RandInt, 40, LVar7) - EVT_SUB(LVar4, LVar7) - EVT_ADD(LVar4, LVar1) - EVT_SET(LVar5, 20) - EVT_CALL(RandInt, 40, LVar8) - EVT_SUB(LVar5, LVar8) - EVT_ADD(LVar5, LVar2) - EVT_PLAY_EFFECT(EFFECT_EXPLOSION, 0, LVar3, LVar4, LVar5) - EVT_WAIT(2) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(30) - EVT_THREAD - EVT_CALL(GetModelCenter, MODEL_b2_1) - EVT_CALL(SetGroupVisibility, MODEL_b2, MODEL_GROUP_HIDDEN) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o911, SOUND_VANISH_IN_SMOKE, SOUND_SPACE_DEFAULT) - EVT_LOOP(4) - EVT_SET(LVar3, 20) - EVT_CALL(RandInt, 40, LVar6) - EVT_SUB(LVar3, LVar6) - EVT_ADD(LVar3, LVar0) - EVT_SET(LVar4, 20) - EVT_CALL(RandInt, 40, LVar7) - EVT_SUB(LVar4, LVar7) - EVT_ADD(LVar4, LVar1) - EVT_SET(LVar5, 20) - EVT_CALL(RandInt, 40, LVar8) - EVT_SUB(LVar5, LVar8) - EVT_ADD(LVar5, LVar2) - EVT_PLAY_EFFECT(EFFECT_EXPLOSION, 0, LVar3, LVar4, LVar5) - EVT_WAIT(2) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(30) - EVT_THREAD - EVT_CALL(GetModelCenter, MODEL_b3_1) - EVT_CALL(SetGroupVisibility, MODEL_b3, MODEL_GROUP_HIDDEN) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o915, SOUND_VANISH_IN_SMOKE, SOUND_SPACE_DEFAULT) - EVT_LOOP(4) - EVT_SET(LVar3, 20) - EVT_CALL(RandInt, 40, LVar6) - EVT_SUB(LVar3, LVar6) - EVT_ADD(LVar3, LVar0) - EVT_SET(LVar4, 20) - EVT_CALL(RandInt, 40, LVar7) - EVT_SUB(LVar4, LVar7) - EVT_ADD(LVar4, LVar1) - EVT_SET(LVar5, 20) - EVT_CALL(RandInt, 40, LVar8) - EVT_SUB(LVar5, LVar8) - EVT_ADD(LVar5, LVar2) - EVT_PLAY_EFFECT(EFFECT_EXPLOSION, 0, LVar3, LVar4, LVar5) - EVT_WAIT(2) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(30) - EVT_THREAD - EVT_CALL(GetModelCenter, MODEL_b4_1) - EVT_CALL(SetGroupVisibility, MODEL_b4, MODEL_GROUP_HIDDEN) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o918, SOUND_VANISH_IN_SMOKE, SOUND_SPACE_DEFAULT) - EVT_LOOP(4) - EVT_SET(LVar3, 20) - EVT_CALL(RandInt, 40, LVar6) - EVT_SUB(LVar3, LVar6) - EVT_ADD(LVar3, LVar0) - EVT_SET(LVar4, 20) - EVT_CALL(RandInt, 40, LVar7) - EVT_SUB(LVar4, LVar7) - EVT_ADD(LVar4, LVar1) - EVT_SET(LVar5, 20) - EVT_CALL(RandInt, 40, LVar8) - EVT_SUB(LVar5, LVar8) - EVT_ADD(LVar5, LVar2) - EVT_PLAY_EFFECT(EFFECT_EXPLOSION, 0, LVar3, LVar4, LVar5) - EVT_WAIT(2) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o907, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o911, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o915, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o918, COLLIDER_FLAGS_UPPER_MASK) - EVT_WAIT(20) - EVT_CALL(ResetCam, CAM_DEFAULT, 2) - EVT_SET(GB_StoryProgress, STORY_CH4_SOLVED_COLOR_PUZZLE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Loop(4) + Exec(N(EVS_GreenLightOff)) + Wait(3) + Exec(N(EVS_YellowLightOff)) + Wait(3) + Exec(N(EVS_RedLightOff)) + Wait(3) + Exec(N(EVS_BlueLightOff)) + Wait(3) + Call(PlaySoundAtCollider, COLLIDER_o907, SOUND_OMO_BOX_CHIME_2, SOUND_SPACE_DEFAULT) + Exec(N(EVS_GreenLightOn)) + Wait(3) + Call(PlaySoundAtCollider, COLLIDER_o911, SOUND_OMO_BOX_CHIME_1, SOUND_SPACE_DEFAULT) + Exec(N(EVS_YellowLightOn)) + Wait(3) + Call(PlaySoundAtCollider, COLLIDER_o915, SOUND_OMO_BOX_CHIME_3, SOUND_SPACE_DEFAULT) + Exec(N(EVS_RedLightOn)) + Wait(3) + Call(PlaySoundAtCollider, COLLIDER_o918, SOUND_OMO_BOX_CHIME_4, SOUND_SPACE_DEFAULT) + Exec(N(EVS_BlueLightOn)) + Wait(3) + EndLoop + Call(UseSettingsFrom, CAM_DEFAULT, 160, 10, -200) + Call(SetPanTarget, CAM_DEFAULT, 160, 10, -200) + Call(SetCamDistance, CAM_DEFAULT, 700) + Call(SetCamPitch, CAM_DEFAULT, 40, Float(-4.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(30) + Thread + Call(MakeLerp, 0, 90, 40, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_t1, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(GetModelCenter, MODEL_o875) + Call(PlaySoundAt, SOUND_OMO_COLORED_PANEL_DROP, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_LANDING_DUST, 4, LVar0, LVar1, LVar2, 0) + Call(ShakeCam, CAM_DEFAULT, 0, 3, Float(0.8)) + EndThread + Wait(10) + Thread + Call(MakeLerp, 0, 90, 40, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_t2, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(GetModelCenter, MODEL_o877) + Call(PlaySoundAt, SOUND_OMO_COLORED_PANEL_DROP, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_LANDING_DUST, 4, LVar0, LVar1, LVar2, 0) + Call(ShakeCam, CAM_DEFAULT, 0, 3, Float(0.8)) + EndThread + Wait(10) + Thread + Call(MakeLerp, 0, 90, 40, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_t3, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(GetModelCenter, MODEL_o879) + Call(PlaySoundAt, SOUND_OMO_COLORED_PANEL_DROP, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_LANDING_DUST, 4, LVar0, LVar1, LVar2, 0) + Call(ShakeCam, CAM_DEFAULT, 0, 3, Float(0.8)) + EndThread + Wait(10) + Thread + Call(MakeLerp, 0, 90, 40, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_t4, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(GetModelCenter, MODEL_o881) + Call(PlaySoundAt, SOUND_OMO_COLORED_PANEL_DROP, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_LANDING_DUST, 4, LVar0, LVar1, LVar2, 0) + Call(ShakeCam, CAM_DEFAULT, 0, 3, Float(0.8)) + EndThread + Wait(100) + Call(UseSettingsFrom, CAM_DEFAULT, 100, 0, 370) + Call(SetPanTarget, CAM_DEFAULT, 100, 0, 370) + Call(SetCamDistance, CAM_DEFAULT, -450) + Call(SetCamPitch, CAM_DEFAULT, 16, Float(-6.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(10) + Thread + Call(GetModelCenter, MODEL_b1_1) + Call(SetGroupVisibility, MODEL_b1, MODEL_GROUP_HIDDEN) + Call(PlaySoundAtCollider, COLLIDER_o907, SOUND_VANISH_IN_SMOKE, SOUND_SPACE_DEFAULT) + Loop(4) + Set(LVar3, 20) + Call(RandInt, 40, LVar6) + Sub(LVar3, LVar6) + Add(LVar3, LVar0) + Set(LVar4, 20) + Call(RandInt, 40, LVar7) + Sub(LVar4, LVar7) + Add(LVar4, LVar1) + Set(LVar5, 20) + Call(RandInt, 40, LVar8) + Sub(LVar5, LVar8) + Add(LVar5, LVar2) + PlayEffect(EFFECT_EXPLOSION, 0, LVar3, LVar4, LVar5) + Wait(2) + EndLoop + EndThread + Wait(30) + Thread + Call(GetModelCenter, MODEL_b2_1) + Call(SetGroupVisibility, MODEL_b2, MODEL_GROUP_HIDDEN) + Call(PlaySoundAtCollider, COLLIDER_o911, SOUND_VANISH_IN_SMOKE, SOUND_SPACE_DEFAULT) + Loop(4) + Set(LVar3, 20) + Call(RandInt, 40, LVar6) + Sub(LVar3, LVar6) + Add(LVar3, LVar0) + Set(LVar4, 20) + Call(RandInt, 40, LVar7) + Sub(LVar4, LVar7) + Add(LVar4, LVar1) + Set(LVar5, 20) + Call(RandInt, 40, LVar8) + Sub(LVar5, LVar8) + Add(LVar5, LVar2) + PlayEffect(EFFECT_EXPLOSION, 0, LVar3, LVar4, LVar5) + Wait(2) + EndLoop + EndThread + Wait(30) + Thread + Call(GetModelCenter, MODEL_b3_1) + Call(SetGroupVisibility, MODEL_b3, MODEL_GROUP_HIDDEN) + Call(PlaySoundAtCollider, COLLIDER_o915, SOUND_VANISH_IN_SMOKE, SOUND_SPACE_DEFAULT) + Loop(4) + Set(LVar3, 20) + Call(RandInt, 40, LVar6) + Sub(LVar3, LVar6) + Add(LVar3, LVar0) + Set(LVar4, 20) + Call(RandInt, 40, LVar7) + Sub(LVar4, LVar7) + Add(LVar4, LVar1) + Set(LVar5, 20) + Call(RandInt, 40, LVar8) + Sub(LVar5, LVar8) + Add(LVar5, LVar2) + PlayEffect(EFFECT_EXPLOSION, 0, LVar3, LVar4, LVar5) + Wait(2) + EndLoop + EndThread + Wait(30) + Thread + Call(GetModelCenter, MODEL_b4_1) + Call(SetGroupVisibility, MODEL_b4, MODEL_GROUP_HIDDEN) + Call(PlaySoundAtCollider, COLLIDER_o918, SOUND_VANISH_IN_SMOKE, SOUND_SPACE_DEFAULT) + Loop(4) + Set(LVar3, 20) + Call(RandInt, 40, LVar6) + Sub(LVar3, LVar6) + Add(LVar3, LVar0) + Set(LVar4, 20) + Call(RandInt, 40, LVar7) + Sub(LVar4, LVar7) + Add(LVar4, LVar1) + Set(LVar5, 20) + Call(RandInt, 40, LVar8) + Sub(LVar5, LVar8) + Add(LVar5, LVar2) + PlayEffect(EFFECT_EXPLOSION, 0, LVar3, LVar4, LVar5) + Wait(2) + EndLoop + EndThread + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o907, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o911, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o915, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o918, COLLIDER_FLAGS_UPPER_MASK) + Wait(20) + Call(ResetCam, CAM_DEFAULT, 2) + Set(GB_StoryProgress, STORY_CH4_SOLVED_COLOR_PUZZLE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_BoxResult_ReleaseShyGuys) = { - EVT_SET(LVar0, 4) - EVT_LOOP(3) - EVT_EXEC(N(EVS_GreenLightOff)) - EVT_WAIT(LVar0) - EVT_EXEC(N(EVS_YellowLightOff)) - EVT_WAIT(LVar0) - EVT_EXEC(N(EVS_RedLightOff)) - EVT_WAIT(LVar0) - EVT_EXEC(N(EVS_BlueLightOff)) - EVT_WAIT(LVar0) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o907, SOUND_OMO_BOX_CHIME_2, SOUND_SPACE_DEFAULT) - EVT_EXEC(N(EVS_BlueLightOn)) - EVT_WAIT(LVar0) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o911, SOUND_OMO_BOX_CHIME_1, SOUND_SPACE_DEFAULT) - EVT_EXEC(N(EVS_RedLightOn)) - EVT_WAIT(LVar0) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o915, SOUND_OMO_BOX_CHIME_3, SOUND_SPACE_DEFAULT) - EVT_EXEC(N(EVS_YellowLightOn)) - EVT_WAIT(LVar0) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o918, SOUND_OMO_BOX_CHIME_4, SOUND_SPACE_DEFAULT) - EVT_EXEC(N(EVS_GreenLightOn)) - EVT_WAIT(LVar0) - EVT_SUB(LVar0, 1) - EVT_END_LOOP - EVT_WAIT(4) - EVT_SET(LVar0, 4) - EVT_LOOP(3) - EVT_EXEC(N(EVS_GreenLightOff)) - EVT_EXEC(N(EVS_YellowLightOff)) - EVT_EXEC(N(EVS_RedLightOff)) - EVT_EXEC(N(EVS_BlueLightOff)) - EVT_WAIT(LVar0) - EVT_CALL(PlaySound, SOUND_OMO_BOX_DONE) - EVT_EXEC(N(EVS_GreenLightOn)) - EVT_EXEC(N(EVS_YellowLightOn)) - EVT_EXEC(N(EVS_RedLightOn)) - EVT_EXEC(N(EVS_BlueLightOn)) - EVT_WAIT(LVar0) - EVT_SUB(LVar0, 1) - EVT_END_LOOP - EVT_WAIT(2) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 90, 10, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_bm1_2, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_bm1_1, LVar0, -1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_o907, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(GetModelCenter, MODEL_b1_1) - EVT_CALL(SetNpcPos, NPC_ShyGuy_01, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_ShyGuy_01, EVT_FLOAT(1.0)) - EVT_ADD(LVar2, 60) - EVT_CALL(NpcJump0, NPC_ShyGuy_01, LVar0, 0, LVar2, 20) - EVT_CALL(SetNpcFlagBits, NPC_ShyGuy_01, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_END_THREAD - EVT_WAIT(3) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 90, 10, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_bm2_2, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_bm2_1, LVar0, -1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_o911, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(GetModelCenter, MODEL_b2_1) - EVT_CALL(SetNpcPos, NPC_ShyGuy_02, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_ShyGuy_02, EVT_FLOAT(1.0)) - EVT_ADD(LVar2, 60) - EVT_CALL(NpcJump0, NPC_ShyGuy_02, LVar0, 0, LVar2, 20) - EVT_CALL(SetNpcFlagBits, NPC_ShyGuy_02, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_END_THREAD - EVT_WAIT(3) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 90, 10, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_bm3_2, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_bm3_1, LVar0, -1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_o915, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(GetModelCenter, MODEL_b3_1) - EVT_CALL(SetNpcPos, NPC_ShyGuy_03, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_ShyGuy_03, EVT_FLOAT(1.0)) - EVT_ADD(LVar2, 60) - EVT_CALL(NpcJump0, NPC_ShyGuy_03, LVar0, 0, LVar2, 20) - EVT_CALL(SetNpcFlagBits, NPC_ShyGuy_03, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_END_THREAD - EVT_WAIT(3) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 90, 10, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_bm4_2, LVar0, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_bm4_1, LVar0, -1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_o918, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(GetModelCenter, MODEL_b4_1) - EVT_CALL(SetNpcPos, NPC_ShyGuy_04, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_ShyGuy_04, EVT_FLOAT(1.0)) - EVT_ADD(LVar2, 60) - EVT_CALL(NpcJump0, NPC_ShyGuy_04, LVar0, 0, LVar2, 20) - EVT_CALL(SetNpcFlagBits, NPC_ShyGuy_04, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(ResetCam, CAM_DEFAULT, 1) - EVT_EXEC(N(EVS_ResetBoxesAfterAmbush)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Set(LVar0, 4) + Loop(3) + Exec(N(EVS_GreenLightOff)) + Wait(LVar0) + Exec(N(EVS_YellowLightOff)) + Wait(LVar0) + Exec(N(EVS_RedLightOff)) + Wait(LVar0) + Exec(N(EVS_BlueLightOff)) + Wait(LVar0) + Call(PlaySoundAtCollider, COLLIDER_o907, SOUND_OMO_BOX_CHIME_2, SOUND_SPACE_DEFAULT) + Exec(N(EVS_BlueLightOn)) + Wait(LVar0) + Call(PlaySoundAtCollider, COLLIDER_o911, SOUND_OMO_BOX_CHIME_1, SOUND_SPACE_DEFAULT) + Exec(N(EVS_RedLightOn)) + Wait(LVar0) + Call(PlaySoundAtCollider, COLLIDER_o915, SOUND_OMO_BOX_CHIME_3, SOUND_SPACE_DEFAULT) + Exec(N(EVS_YellowLightOn)) + Wait(LVar0) + Call(PlaySoundAtCollider, COLLIDER_o918, SOUND_OMO_BOX_CHIME_4, SOUND_SPACE_DEFAULT) + Exec(N(EVS_GreenLightOn)) + Wait(LVar0) + Sub(LVar0, 1) + EndLoop + Wait(4) + Set(LVar0, 4) + Loop(3) + Exec(N(EVS_GreenLightOff)) + Exec(N(EVS_YellowLightOff)) + Exec(N(EVS_RedLightOff)) + Exec(N(EVS_BlueLightOff)) + Wait(LVar0) + Call(PlaySound, SOUND_OMO_BOX_DONE) + Exec(N(EVS_GreenLightOn)) + Exec(N(EVS_YellowLightOn)) + Exec(N(EVS_RedLightOn)) + Exec(N(EVS_BlueLightOn)) + Wait(LVar0) + Sub(LVar0, 1) + EndLoop + Wait(2) + Thread + Call(MakeLerp, 0, 90, 10, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_bm1_2, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_bm1_1, LVar0, -1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_o907, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(GetModelCenter, MODEL_b1_1) + Call(SetNpcPos, NPC_ShyGuy_01, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_ShyGuy_01, Float(1.0)) + Add(LVar2, 60) + Call(NpcJump0, NPC_ShyGuy_01, LVar0, 0, LVar2, 20) + Call(SetNpcFlagBits, NPC_ShyGuy_01, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + EndThread + Wait(3) + Thread + Call(MakeLerp, 0, 90, 10, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_bm2_2, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_bm2_1, LVar0, -1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_o911, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(GetModelCenter, MODEL_b2_1) + Call(SetNpcPos, NPC_ShyGuy_02, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_ShyGuy_02, Float(1.0)) + Add(LVar2, 60) + Call(NpcJump0, NPC_ShyGuy_02, LVar0, 0, LVar2, 20) + Call(SetNpcFlagBits, NPC_ShyGuy_02, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + EndThread + Wait(3) + Thread + Call(MakeLerp, 0, 90, 10, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_bm3_2, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_bm3_1, LVar0, -1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_o915, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(GetModelCenter, MODEL_b3_1) + Call(SetNpcPos, NPC_ShyGuy_03, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_ShyGuy_03, Float(1.0)) + Add(LVar2, 60) + Call(NpcJump0, NPC_ShyGuy_03, LVar0, 0, LVar2, 20) + Call(SetNpcFlagBits, NPC_ShyGuy_03, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + EndThread + Wait(3) + Thread + Call(MakeLerp, 0, 90, 10, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_bm4_2, LVar0, -1, 0, 0) + Call(RotateModel, MODEL_bm4_1, LVar0, -1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_o918, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(GetModelCenter, MODEL_b4_1) + Call(SetNpcPos, NPC_ShyGuy_04, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_ShyGuy_04, Float(1.0)) + Add(LVar2, 60) + Call(NpcJump0, NPC_ShyGuy_04, LVar0, 0, LVar2, 20) + Call(SetNpcFlagBits, NPC_ShyGuy_04, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(ResetCam, CAM_DEFAULT, 1) + Exec(N(EVS_ResetBoxesAfterAmbush)) + EndThread + Return + End }; EvtScript N(EVS_HitBox) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(EVT_PTR(N(GreenBoxInfo))) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o907, SOUND_OMO_BOX_GLOW_2, SOUND_SPACE_DEFAULT) - EVT_CASE_EQ(EVT_PTR(N(YellowBoxInfo))) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o911, SOUND_OMO_BOX_GLOW_1, SOUND_SPACE_DEFAULT) - EVT_CASE_EQ(EVT_PTR(N(RedBoxInfo))) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o915, SOUND_OMO_BOX_GLOW_3, SOUND_SPACE_DEFAULT) - EVT_CASE_EQ(EVT_PTR(N(BlueBoxInfo))) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o918, SOUND_OMO_BOX_GLOW_4, SOUND_SPACE_DEFAULT) - EVT_END_SWITCH - EVT_USE_BUF(LVar0) - EVT_BUF_READ1(LVar1) - EVT_BUF_READ4(LVar2, LVar3, LVar4, LVar5) - EVT_LOOP(5) - EVT_CALL(EnableModel, LVar2, FALSE) - EVT_CALL(EnableModel, LVar3, FALSE) - EVT_CALL(EnableModel, LVar4, TRUE) - EVT_CALL(EnableModel, LVar5, TRUE) - EVT_WAIT(1) - EVT_CALL(EnableModel, LVar2, TRUE) - EVT_CALL(EnableModel, LVar3, TRUE) - EVT_CALL(EnableModel, LVar4, FALSE) - EVT_CALL(EnableModel, LVar5, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_MUL(MV_BoxHitSequence, 4) // shift left by 2 - EVT_BITWISE_OR(MV_BoxHitSequence, LVar1) - EVT_ADD(MV_BoxHitCount, 1) - EVT_IF_EQ(MV_BoxHitCount, 4) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(5) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 100, 0, 370) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 100, 0, 370) - EVT_CALL(SetCamDistance, CAM_DEFAULT, -450) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 16, EVT_FLOAT(-6.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(30) - EVT_SWITCH(MV_BoxHitSequence) - EVT_CASE_EQ(BOX_SEQUENCE(BOX_COLOR_GREEN, BOX_COLOR_YELLOW, BOX_COLOR_RED, BOX_COLOR_BLUE)) - EVT_EXEC_WAIT(N(EVS_BoxResult_GiveCoins)) - EVT_CASE_EQ(BOX_SEQUENCE(BOX_COLOR_YELLOW, BOX_COLOR_GREEN, BOX_COLOR_RED, BOX_COLOR_BLUE)) - EVT_EXEC_WAIT(N(EVS_BoxResult_RepairTrack)) - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(N(EVS_BoxResult_ReleaseShyGuys)) - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ELSE - EVT_THREAD - EVT_LABEL(10) - EVT_CALL(EnableModel, LVar2, FALSE) - EVT_CALL(EnableModel, LVar3, FALSE) - EVT_CALL(EnableModel, LVar4, TRUE) - EVT_CALL(EnableModel, LVar5, TRUE) - EVT_WAIT(5) - EVT_CALL(EnableModel, LVar2, TRUE) - EVT_CALL(EnableModel, LVar3, TRUE) - EVT_CALL(EnableModel, LVar4, FALSE) - EVT_CALL(EnableModel, LVar5, FALSE) - EVT_WAIT(10) - EVT_IF_NE(MV_BoxHitCount, 4) - EVT_GOTO(10) - EVT_END_IF - EVT_END_THREAD - EVT_END_IF - EVT_UNBIND - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(Ref(N(GreenBoxInfo))) + Call(PlaySoundAtCollider, COLLIDER_o907, SOUND_OMO_BOX_GLOW_2, SOUND_SPACE_DEFAULT) + CaseEq(Ref(N(YellowBoxInfo))) + Call(PlaySoundAtCollider, COLLIDER_o911, SOUND_OMO_BOX_GLOW_1, SOUND_SPACE_DEFAULT) + CaseEq(Ref(N(RedBoxInfo))) + Call(PlaySoundAtCollider, COLLIDER_o915, SOUND_OMO_BOX_GLOW_3, SOUND_SPACE_DEFAULT) + CaseEq(Ref(N(BlueBoxInfo))) + Call(PlaySoundAtCollider, COLLIDER_o918, SOUND_OMO_BOX_GLOW_4, SOUND_SPACE_DEFAULT) + EndSwitch + UseBuf(LVar0) + BufRead1(LVar1) + BufRead4(LVar2, LVar3, LVar4, LVar5) + Loop(5) + Call(EnableModel, LVar2, FALSE) + Call(EnableModel, LVar3, FALSE) + Call(EnableModel, LVar4, TRUE) + Call(EnableModel, LVar5, TRUE) + Wait(1) + Call(EnableModel, LVar2, TRUE) + Call(EnableModel, LVar3, TRUE) + Call(EnableModel, LVar4, FALSE) + Call(EnableModel, LVar5, FALSE) + Wait(1) + EndLoop + Mul(MV_BoxHitSequence, 4) // shift left by 2 + BitwiseOr(MV_BoxHitSequence, LVar1) + Add(MV_BoxHitCount, 1) + IfEq(MV_BoxHitCount, 4) + Call(DisablePlayerInput, TRUE) + Wait(5) + Call(UseSettingsFrom, CAM_DEFAULT, 100, 0, 370) + Call(SetPanTarget, CAM_DEFAULT, 100, 0, 370) + Call(SetCamDistance, CAM_DEFAULT, -450) + Call(SetCamPitch, CAM_DEFAULT, 16, Float(-6.0)) + Call(SetCamSpeed, CAM_DEFAULT, 1) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(30) + Switch(MV_BoxHitSequence) + CaseEq(BOX_SEQUENCE(BOX_COLOR_GREEN, BOX_COLOR_YELLOW, BOX_COLOR_RED, BOX_COLOR_BLUE)) + ExecWait(N(EVS_BoxResult_GiveCoins)) + CaseEq(BOX_SEQUENCE(BOX_COLOR_YELLOW, BOX_COLOR_GREEN, BOX_COLOR_RED, BOX_COLOR_BLUE)) + ExecWait(N(EVS_BoxResult_RepairTrack)) + CaseDefault + ExecWait(N(EVS_BoxResult_ReleaseShyGuys)) + EndSwitch + Call(DisablePlayerInput, FALSE) + Else + Thread + Label(10) + Call(EnableModel, LVar2, FALSE) + Call(EnableModel, LVar3, FALSE) + Call(EnableModel, LVar4, TRUE) + Call(EnableModel, LVar5, TRUE) + Wait(5) + Call(EnableModel, LVar2, TRUE) + Call(EnableModel, LVar3, TRUE) + Call(EnableModel, LVar4, FALSE) + Call(EnableModel, LVar5, FALSE) + Wait(10) + IfNe(MV_BoxHitCount, 4) + Goto(10) + EndIf + EndThread + EndIf + Unbind + Return + End }; EvtScript N(EVS_SetupBoxes) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH4_SOLVED_COLOR_PUZZLE) - EVT_SET(MV_BoxHitSequence, 0) - EVT_SET(MV_BoxHitCount, 0) - EVT_CALL(EnableModel, MODEL_bm1_2, FALSE) - EVT_CALL(EnableModel, MODEL_b1_2, FALSE) - EVT_SET(LVar0, EVT_PTR(N(GreenBoxInfo))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_HitBox)), TRIGGER_WALL_HAMMER, COLLIDER_o907, 1, 0) - EVT_CALL(EnableModel, MODEL_bm2_2, FALSE) - EVT_CALL(EnableModel, MODEL_b2_2, FALSE) - EVT_SET(LVar0, EVT_PTR(N(YellowBoxInfo))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_HitBox)), TRIGGER_WALL_HAMMER, COLLIDER_o911, 1, 0) - EVT_CALL(EnableModel, MODEL_bm3_2, FALSE) - EVT_CALL(EnableModel, MODEL_b3_2, FALSE) - EVT_SET(LVar0, EVT_PTR(N(RedBoxInfo))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_HitBox)), TRIGGER_WALL_HAMMER, COLLIDER_o915, 1, 0) - EVT_CALL(EnableModel, MODEL_bm4_2, FALSE) - EVT_CALL(EnableModel, MODEL_b4_2, FALSE) - EVT_SET(LVar0, EVT_PTR(N(BlueBoxInfo))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_HitBox)), TRIGGER_WALL_HAMMER, COLLIDER_o918, 1, 0) - EVT_ELSE - EVT_CALL(SetGroupVisibility, MODEL_box, MODEL_GROUP_HIDDEN) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o907, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o911, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o915, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o918, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_sen1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_sen2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(RotateGroup, MODEL_t1, 90, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_t2, 90, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_t3, 90, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_t4, 90, 1, 0, 0) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH4_SOLVED_COLOR_PUZZLE) + Set(MV_BoxHitSequence, 0) + Set(MV_BoxHitCount, 0) + Call(EnableModel, MODEL_bm1_2, FALSE) + Call(EnableModel, MODEL_b1_2, FALSE) + Set(LVar0, Ref(N(GreenBoxInfo))) + BindTrigger(Ref(N(EVS_HitBox)), TRIGGER_WALL_HAMMER, COLLIDER_o907, 1, 0) + Call(EnableModel, MODEL_bm2_2, FALSE) + Call(EnableModel, MODEL_b2_2, FALSE) + Set(LVar0, Ref(N(YellowBoxInfo))) + BindTrigger(Ref(N(EVS_HitBox)), TRIGGER_WALL_HAMMER, COLLIDER_o911, 1, 0) + Call(EnableModel, MODEL_bm3_2, FALSE) + Call(EnableModel, MODEL_b3_2, FALSE) + Set(LVar0, Ref(N(RedBoxInfo))) + BindTrigger(Ref(N(EVS_HitBox)), TRIGGER_WALL_HAMMER, COLLIDER_o915, 1, 0) + Call(EnableModel, MODEL_bm4_2, FALSE) + Call(EnableModel, MODEL_b4_2, FALSE) + Set(LVar0, Ref(N(BlueBoxInfo))) + BindTrigger(Ref(N(EVS_HitBox)), TRIGGER_WALL_HAMMER, COLLIDER_o918, 1, 0) + Else + Call(SetGroupVisibility, MODEL_box, MODEL_GROUP_HIDDEN) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o907, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o911, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o915, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o918, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_sen1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_sen2, COLLIDER_FLAGS_UPPER_MASK) + Call(RotateGroup, MODEL_t1, 90, 1, 0, 0) + Call(RotateGroup, MODEL_t2, 90, 1, 0, 0) + Call(RotateGroup, MODEL_t3, 90, 1, 0, 0) + Call(RotateGroup, MODEL_t4, 90, 1, 0, 0) + EndIf + Return + End }; diff --git a/src/world/area_omo/omo_08/omo_08_4_train.c b/src/world/area_omo/omo_08/omo_08_4_train.c index 87625caf460..2b9653fbfed 100644 --- a/src/world/area_omo/omo_08/omo_08_4_train.c +++ b/src/world/area_omo/omo_08/omo_08_4_train.c @@ -8,210 +8,210 @@ Vec2i N(D_80246740_DCAB10) = { }; s32 N(D_80246748_DCAB18)[] = { - EVT_FLOAT(-131.227), EVT_FLOAT(-210.271), EVT_FLOAT(105.004), - EVT_FLOAT(0.0), EVT_FLOAT(-175.0), EVT_FLOAT(262.5), - EVT_FLOAT(-245.336), EVT_FLOAT(479.165), EVT_FLOAT(-503.546), + Float(-131.227), Float(-210.271), Float(105.004), + Float(0.0), Float(-175.0), Float(262.5), + Float(-245.336), Float(479.165), Float(-503.546), -1, -1, -1 }; EvtScript N(D_80246778_DCAB48) = { - EVT_CALL(FadeOutMusic, 0, 3000) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_WAIT(10) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_EXEC(N(EVS_TrainUnk_C)) - EVT_SET(AB_OMO_5, 2) - EVT_SET(LVar0, EVT_PTR(N(D_80246748_DCAB18))) - EVT_EXEC_WAIT(N(EVS_TrainUnk_D)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1074, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_80246748_DCAB18))) - EVT_SET(MV_TrainUnk_02, 1) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_LABEL(10) - EVT_IF_LT(MV_TrainPos, 350) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("omo_16"), omo_16_ENTRY_0) - EVT_SET(GB_OMO_TrainDestination, 2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(FadeOutMusic, 0, 3000) + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Wait(10) + Call(DisablePlayerPhysics, TRUE) + Exec(N(EVS_TrainUnk_C)) + Set(AB_OMO_5, 2) + Set(LVar0, Ref(N(D_80246748_DCAB18))) + ExecWait(N(EVS_TrainUnk_D)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1074, COLLIDER_FLAGS_UPPER_MASK) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_80246748_DCAB18))) + Set(MV_TrainUnk_02, 1) + Set(MF_TrainUnk_00, TRUE) + Label(10) + IfLt(MV_TrainPos, 350) + Wait(1) + Goto(10) + EndIf + Call(GotoMap, Ref("omo_16"), omo_16_ENTRY_0) + Set(GB_OMO_TrainDestination, 2) + Wait(100) + Return + End }; s32 N(D_802468E8_DCACB8)[] = { - EVT_FLOAT(-131.227), EVT_FLOAT(-210.271), EVT_FLOAT(285.004), - EVT_FLOAT(-262.5), EVT_FLOAT(-245.336), EVT_FLOAT(-353.418), - EVT_FLOAT(-353.688), EVT_FLOAT(-479.165), EVT_FLOAT(-503.546), + Float(-131.227), Float(-210.271), Float(285.004), + Float(-262.5), Float(-245.336), Float(-353.418), + Float(-353.688), Float(-479.165), Float(-503.546), -1, -1, -1 }; EvtScript N(D_80246918_DCACE8) = { - EVT_CALL(FadeOutMusic, 0, 3000) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_WAIT(10) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_EXEC(N(EVS_TrainUnk_C)) - EVT_SET(AB_OMO_5, 2) - EVT_SET(LVar0, EVT_PTR(N(D_802468E8_DCACB8))) - EVT_EXEC_WAIT(N(EVS_TrainUnk_D)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1074, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_802468E8_DCACB8))) - EVT_SET(MV_TrainUnk_02, 1) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_LABEL(10) - EVT_IF_GT(MV_TrainPos, -350) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("omo_16"), omo_16_ENTRY_1) - EVT_SET(GB_OMO_TrainDestination, 1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(FadeOutMusic, 0, 3000) + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Wait(10) + Call(DisablePlayerPhysics, TRUE) + Exec(N(EVS_TrainUnk_C)) + Set(AB_OMO_5, 2) + Set(LVar0, Ref(N(D_802468E8_DCACB8))) + ExecWait(N(EVS_TrainUnk_D)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1074, COLLIDER_FLAGS_UPPER_MASK) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_802468E8_DCACB8))) + Set(MV_TrainUnk_02, 1) + Set(MF_TrainUnk_00, TRUE) + Label(10) + IfGt(MV_TrainPos, -350) + Wait(1) + Goto(10) + EndIf + Call(GotoMap, Ref("omo_16"), omo_16_ENTRY_1) + Set(GB_OMO_TrainDestination, 1) + Wait(100) + Return + End }; s32 N(D_80246A88_DCAE58)[] = { - EVT_FLOAT(414.885), EVT_FLOAT(-426.942), EVT_FLOAT(219.92), - EVT_FLOAT(353.553), EVT_FLOAT(-353.553), EVT_FLOAT(262.5), - EVT_FLOAT(-245.336), EVT_FLOAT(0.0), EVT_FLOAT(-175.0), - EVT_FLOAT(-169.87), EVT_FLOAT(-220.59), + Float(414.885), Float(-426.942), Float(219.92), + Float(353.553), Float(-353.553), Float(262.5), + Float(-245.336), Float(0.0), Float(-175.0), + Float(-169.87), Float(-220.59), -1, -1, -1 }; s32 N(D_80246AC0_DCAE90)[] = { - EVT_FLOAT(414.885), EVT_FLOAT(-426.942), EVT_FLOAT(219.92), - EVT_FLOAT(353.553), EVT_FLOAT(-353.553), EVT_FLOAT(262.5), - EVT_FLOAT(-245.336), EVT_FLOAT(0.0), EVT_FLOAT(-175.0), - EVT_FLOAT(-262.5), EVT_FLOAT(-245.336), EVT_FLOAT(-353.418), - EVT_FLOAT(-353.688), EVT_FLOAT(-479.165), EVT_FLOAT(-503.546), + Float(414.885), Float(-426.942), Float(219.92), + Float(353.553), Float(-353.553), Float(262.5), + Float(-245.336), Float(0.0), Float(-175.0), + Float(-262.5), Float(-245.336), Float(-353.418), + Float(-353.688), Float(-479.165), Float(-503.546), -1, -1, -1 }; EvtScript N(D_80246B08_DCAED8) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1074, COLLIDER_FLAGS_UPPER_MASK) - EVT_IF_EQ(AB_OMO_6, 2) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_80246A88_DCAE58))) - EVT_SET(MV_TrainUnk_02, 2) - EVT_EXEC(N(EVS_Scene_RideTrain)) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_WAIT(1) - EVT_EXEC_GET_TID(N(EVS_TrainUnk_A), LVarB) - EVT_LABEL(10) - EVT_IF_EQ(MF_TrainUnk_00, TRUE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_WAIT(20) - EVT_KILL_THREAD(LVarB) - EVT_EXEC(N(EVS_TrainUnk_B)) - EVT_CALL(N(EnableCameraFollowPlayerY)) - EVT_SET(LVar9, EVT_PTR(N(D_80246740_DCAB10))) - EVT_EXEC_WAIT(N(EVS_TrainUnk_E)) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0010) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o1074, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ELSE - EVT_EXEC(N(EVS_TrainUnk_A)) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_80246AC0_DCAE90))) - EVT_SET(MV_TrainUnk_02, 0) - EVT_EXEC(N(EVS_Scene_RideTrain)) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_WAIT(1) - EVT_EXEC(N(EVS_TrainUnk_H)) - EVT_LABEL(20) - EVT_IF_GT(MV_TrainPos, -350) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("omo_16"), omo_16_ENTRY_1) - EVT_SET(GB_OMO_TrainDestination, 1) - EVT_WAIT(100) - EVT_END_IF - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(DisablePartnerAI, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1074, COLLIDER_FLAGS_UPPER_MASK) + IfEq(AB_OMO_6, 2) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_80246A88_DCAE58))) + Set(MV_TrainUnk_02, 2) + Exec(N(EVS_Scene_RideTrain)) + Set(MF_TrainUnk_00, TRUE) + Wait(1) + ExecGetTID(N(EVS_TrainUnk_A), LVarB) + Label(10) + IfEq(MF_TrainUnk_00, TRUE) + Wait(1) + Goto(10) + EndIf + Wait(20) + KillThread(LVarB) + Exec(N(EVS_TrainUnk_B)) + Call(N(EnableCameraFollowPlayerY)) + Set(LVar9, Ref(N(D_80246740_DCAB10))) + ExecWait(N(EVS_TrainUnk_E)) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0010) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o1074, COLLIDER_FLAGS_UPPER_MASK) + Call(DisablePlayerPhysics, FALSE) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Else + Exec(N(EVS_TrainUnk_A)) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_80246AC0_DCAE90))) + Set(MV_TrainUnk_02, 0) + Exec(N(EVS_Scene_RideTrain)) + Set(MF_TrainUnk_00, TRUE) + Wait(1) + Exec(N(EVS_TrainUnk_H)) + Label(20) + IfGt(MV_TrainPos, -350) + Wait(1) + Goto(20) + EndIf + Call(GotoMap, Ref("omo_16"), omo_16_ENTRY_1) + Set(GB_OMO_TrainDestination, 1) + Wait(100) + EndIf + Return + End }; s32 N(D_80246DC0_DCB190)[] = { - EVT_FLOAT(-414.885), EVT_FLOAT(-426.942), EVT_FLOAT(140.075), - EVT_FLOAT(-353.418), EVT_FLOAT(-353.688), EVT_FLOAT(-262.5), - EVT_FLOAT(-245.336), EVT_FLOAT(-92.58), EVT_FLOAT(-199.95), + Float(-414.885), Float(-426.942), Float(140.075), + Float(-353.418), Float(-353.688), Float(-262.5), + Float(-245.336), Float(-92.58), Float(-199.95), -1, -1, -1 }; s32 N(D_80246DF0_DCB1C0)[] = { - EVT_FLOAT(-414.885), EVT_FLOAT(-426.942), EVT_FLOAT(140.075), - EVT_FLOAT(-353.418), EVT_FLOAT(-353.688), EVT_FLOAT(-262.5), - EVT_FLOAT(-245.336), EVT_FLOAT(0.0), EVT_FLOAT(-175.0), - EVT_FLOAT(262.5), EVT_FLOAT(-245.336), EVT_FLOAT(479.165), - EVT_FLOAT(-503.546), + Float(-414.885), Float(-426.942), Float(140.075), + Float(-353.418), Float(-353.688), Float(-262.5), + Float(-245.336), Float(0.0), Float(-175.0), + Float(262.5), Float(-245.336), Float(479.165), + Float(-503.546), -1, -1, -1 }; EvtScript N(D_80246E30_DCB200) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1074, COLLIDER_FLAGS_UPPER_MASK) - EVT_IF_EQ(AB_OMO_6, 2) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_80246DC0_DCB190))) - EVT_SET(MV_TrainUnk_02, 2) - EVT_EXEC(N(EVS_Scene_RideTrain)) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_WAIT(1) - EVT_EXEC_GET_TID(N(EVS_TrainUnk_A), LVarB) - EVT_LABEL(10) - EVT_IF_EQ(MF_TrainUnk_00, TRUE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_WAIT(20) - EVT_KILL_THREAD(LVarB) - EVT_EXEC(N(EVS_TrainUnk_B)) - EVT_CALL(N(EnableCameraFollowPlayerY)) - EVT_SET(LVar9, EVT_PTR(N(D_80246740_DCAB10))) - EVT_EXEC_WAIT(N(EVS_TrainUnk_E)) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0010) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o1074, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ELSE - EVT_EXEC(N(EVS_TrainUnk_A)) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_80246DF0_DCB1C0))) - EVT_SET(MV_TrainUnk_02, 0) - EVT_EXEC(N(EVS_Scene_RideTrain)) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_WAIT(1) - EVT_EXEC(N(EVS_TrainUnk_H)) - EVT_LABEL(20) - EVT_IF_LT(MV_TrainPos, 350) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("omo_16"), omo_16_ENTRY_0) - EVT_SET(GB_OMO_TrainDestination, 2) - EVT_WAIT(100) - EVT_END_IF - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(DisablePartnerAI, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1074, COLLIDER_FLAGS_UPPER_MASK) + IfEq(AB_OMO_6, 2) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_80246DC0_DCB190))) + Set(MV_TrainUnk_02, 2) + Exec(N(EVS_Scene_RideTrain)) + Set(MF_TrainUnk_00, TRUE) + Wait(1) + ExecGetTID(N(EVS_TrainUnk_A), LVarB) + Label(10) + IfEq(MF_TrainUnk_00, TRUE) + Wait(1) + Goto(10) + EndIf + Wait(20) + KillThread(LVarB) + Exec(N(EVS_TrainUnk_B)) + Call(N(EnableCameraFollowPlayerY)) + Set(LVar9, Ref(N(D_80246740_DCAB10))) + ExecWait(N(EVS_TrainUnk_E)) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0010) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o1074, COLLIDER_FLAGS_UPPER_MASK) + Call(DisablePlayerPhysics, FALSE) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Else + Exec(N(EVS_TrainUnk_A)) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_80246DF0_DCB1C0))) + Set(MV_TrainUnk_02, 0) + Exec(N(EVS_Scene_RideTrain)) + Set(MF_TrainUnk_00, TRUE) + Wait(1) + Exec(N(EVS_TrainUnk_H)) + Label(20) + IfLt(MV_TrainPos, 350) + Wait(1) + Goto(20) + EndIf + Call(GotoMap, Ref("omo_16"), omo_16_ENTRY_0) + Set(GB_OMO_TrainDestination, 2) + Wait(100) + EndIf + Return + End }; s32 N(D_802470E8_DCB4B8)[] = { @@ -223,95 +223,95 @@ s32 N(D_802470F4_DCB4C4)[] = { }; EvtScript N(EVS_80247100) = { - EVT_IF_EQ(MF_EitherSwitchPressed, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0006) - EVT_ELSE - EVT_IF_EQ(AF_OMO_UsingRightSwitch, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0007) - EVT_IF_EQ(GF_OMO03_BlueSwitchActivated, FALSE) - EVT_CALL(ShowChoice, MSG_Choice_0040) - EVT_IF_NE(LVar0, 2) - EVT_CALL(CloseMessage) - EVT_USE_BUF(EVT_PTR(N(D_802470E8_DCB4B8))) - EVT_ADD(LVar0, 1) - EVT_LOOP(LVar0) - EVT_BUF_READ1(LVar1) - EVT_END_LOOP - EVT_SET(AB_OMO_6, LVar1) - EVT_EXEC_WAIT(N(D_80246918_DCACE8)) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0008) - EVT_END_IF - EVT_ELSE - EVT_CALL(ShowChoice, MSG_Choice_0041) - EVT_IF_NE(LVar0, 3) - EVT_CALL(CloseMessage) - EVT_USE_BUF(EVT_PTR(N(D_802470E8_DCB4B8))) - EVT_ADD(LVar0, 1) - EVT_LOOP(LVar0) - EVT_BUF_READ1(LVar1) - EVT_END_LOOP - EVT_SET(AB_OMO_6, LVar1) - EVT_EXEC_WAIT(N(D_80246918_DCACE8)) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0008) - EVT_END_IF - EVT_END_IF - EVT_ELSE - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH4_SOLVED_COLOR_PUZZLE) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_SadTalk, ANIM_TrainToad_SadIdle, 0, MSG_CH4_0016) - EVT_CASE_GE(STORY_CH4_SOLVED_COLOR_PUZZLE) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0007) - EVT_CALL(ShowChoice, MSG_Choice_003F) - EVT_IF_NE(LVar0, 3) - EVT_CALL(CloseMessage) - EVT_USE_BUF(EVT_PTR(N(D_802470F4_DCB4C4))) - EVT_ADD(LVar0, 1) - EVT_LOOP(LVar0) - EVT_BUF_READ1(LVar1) - EVT_END_LOOP - EVT_SET(AB_OMO_6, LVar1) - EVT_EXEC_WAIT(N(D_80246778_DCAB48)) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0008) - EVT_END_IF - EVT_END_SWITCH - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MF_EitherSwitchPressed, FALSE) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0006) + Else + IfEq(AF_OMO_UsingRightSwitch, FALSE) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0007) + IfEq(GF_OMO03_BlueSwitchActivated, FALSE) + Call(ShowChoice, MSG_Choice_0040) + IfNe(LVar0, 2) + Call(CloseMessage) + UseBuf(Ref(N(D_802470E8_DCB4B8))) + Add(LVar0, 1) + Loop(LVar0) + BufRead1(LVar1) + EndLoop + Set(AB_OMO_6, LVar1) + ExecWait(N(D_80246918_DCACE8)) + Else + Call(ContinueSpeech, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0008) + EndIf + Else + Call(ShowChoice, MSG_Choice_0041) + IfNe(LVar0, 3) + Call(CloseMessage) + UseBuf(Ref(N(D_802470E8_DCB4B8))) + Add(LVar0, 1) + Loop(LVar0) + BufRead1(LVar1) + EndLoop + Set(AB_OMO_6, LVar1) + ExecWait(N(D_80246918_DCACE8)) + Else + Call(ContinueSpeech, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0008) + EndIf + EndIf + Else + Switch(GB_StoryProgress) + CaseLt(STORY_CH4_SOLVED_COLOR_PUZZLE) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_SadTalk, ANIM_TrainToad_SadIdle, 0, MSG_CH4_0016) + CaseGe(STORY_CH4_SOLVED_COLOR_PUZZLE) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0007) + Call(ShowChoice, MSG_Choice_003F) + IfNe(LVar0, 3) + Call(CloseMessage) + UseBuf(Ref(N(D_802470F4_DCB4C4))) + Add(LVar0, 1) + Loop(LVar0) + BufRead1(LVar1) + EndLoop + Set(AB_OMO_6, LVar1) + ExecWait(N(D_80246778_DCAB48)) + Else + Call(ContinueSpeech, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0008) + EndIf + EndSwitch + EndIf + EndIf + Return + End }; s32 N(D_80247438_DCB808)[] = { - EVT_FLOAT(-131.227), EVT_FLOAT(-210.271), EVT_FLOAT(105.004), + Float(-131.227), Float(-210.271), Float(105.004), -1, -1, -1 }; EvtScript N(EVS_SetupTrain) = { - EVT_EXEC_WAIT(N(EVS_SetupSwitches)) - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_80247438_DCB808))) - EVT_SET(MV_TrainUnk_02, 0) - EVT_EXEC(N(EVS_Scene_RideTrain)) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_ELSE - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(omo_08_ENTRY_1) - EVT_EXEC(N(D_80246E30_DCB200)) - EVT_CASE_EQ(omo_08_ENTRY_2) - EVT_EXEC(N(D_80246B08_DCAED8)) - EVT_CASE_DEFAULT - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_80247438_DCB808))) - EVT_SET(MV_TrainUnk_02, 0) - EVT_EXEC(N(EVS_Scene_RideTrain)) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END + ExecWait(N(EVS_SetupSwitches)) + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_80247438_DCB808))) + Set(MV_TrainUnk_02, 0) + Exec(N(EVS_Scene_RideTrain)) + Set(MF_TrainUnk_00, TRUE) + Else + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(omo_08_ENTRY_1) + Exec(N(D_80246E30_DCB200)) + CaseEq(omo_08_ENTRY_2) + Exec(N(D_80246B08_DCAED8)) + CaseDefault + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_80247438_DCB808))) + Set(MV_TrainUnk_02, 0) + Exec(N(EVS_Scene_RideTrain)) + Set(MF_TrainUnk_00, TRUE) + EndSwitch + EndIf + Return + End }; diff --git a/src/world/area_omo/omo_08/omo_08_5_entity.c b/src/world/area_omo/omo_08/omo_08_5_entity.c index b9d1cdb640e..dabf954dc58 100644 --- a/src/world/area_omo/omo_08/omo_08_5_entity.c +++ b/src/world/area_omo/omo_08/omo_08_5_entity.c @@ -2,11 +2,11 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), -350, 60, 50, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 350, 60, 60, 0, ITEM_FIRE_FLOWER, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OMO08_HiddenItem_FireFlower) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), -200, 0, 200, 0, MODEL_soto, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_OMO08_HiddenPanel) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_SavePoint), -350, 60, 50, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 350, 60, 60, 0, ITEM_FIRE_FLOWER, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OMO08_HiddenItem_FireFlower) + Call(MakeEntity, Ref(Entity_HiddenPanel), -200, 0, 200, 0, MODEL_soto, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_OMO08_HiddenPanel) + Return + End }; diff --git a/src/world/area_omo/omo_08/omo_08_6_npc.c b/src/world/area_omo/omo_08/omo_08_6_npc.c index 3f4e005d0a2..7e55fd29c6f 100644 --- a/src/world/area_omo/omo_08/omo_08_6_npc.c +++ b/src/world/area_omo/omo_08/omo_08_6_npc.c @@ -4,97 +4,97 @@ #include "world/common/enemy/ShyGuy_Wander.inc.c" EvtScript N(EVS_NpcInteract_Conductor) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC_WAIT(N(EVS_80247100)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + ExecWait(N(EVS_80247100)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Conductor) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Conductor))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Conductor))) + Return + End }; EvtScript N(EVS_NpcInteract_TrainToad) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH4_SOLVED_COLOR_PUZZLE) - EVT_CALL(FindKeyItem, ITEM_MYSTERY_NOTE, LVar0) - EVT_IF_EQ(LVar0, -1) - EVT_IF_EQ(GF_OMO09_SpawnedPeachChoice3, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Green_Talk, ANIM_TrainToad_Green_Idle, 0, MSG_CH4_002B) - EVT_ELSE - EVT_IF_EQ(GF_OMO09_Chest_Dictionary, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Green_Talk, ANIM_TrainToad_Green_Idle, 0, MSG_CH4_002C) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Green_Talk, ANIM_TrainToad_Green_Idle, 0, MSG_CH4_002F) - EVT_END_IF - EVT_END_IF - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Green_Talk, ANIM_TrainToad_Green_Idle, 0, MSG_CH4_002D) - EVT_END_IF - EVT_CASE_LT(STORY_CH4_WATT_JOINED_PARTY) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Green_Talk, ANIM_TrainToad_Green_Idle, 0, MSG_CH4_002E) - EVT_CASE_LT(STORY_CH4_DEFEATED_GENERAL_GUY) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Green_Talk, ANIM_TrainToad_Green_Idle, 0, MSG_CH4_002F) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Green_Talk, ANIM_TrainToad_Green_Idle, 0, MSG_CH4_0030) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH4_SOLVED_COLOR_PUZZLE) + Call(FindKeyItem, ITEM_MYSTERY_NOTE, LVar0) + IfEq(LVar0, -1) + IfEq(GF_OMO09_SpawnedPeachChoice3, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Green_Talk, ANIM_TrainToad_Green_Idle, 0, MSG_CH4_002B) + Else + IfEq(GF_OMO09_Chest_Dictionary, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Green_Talk, ANIM_TrainToad_Green_Idle, 0, MSG_CH4_002C) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Green_Talk, ANIM_TrainToad_Green_Idle, 0, MSG_CH4_002F) + EndIf + EndIf + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Green_Talk, ANIM_TrainToad_Green_Idle, 0, MSG_CH4_002D) + EndIf + CaseLt(STORY_CH4_WATT_JOINED_PARTY) + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Green_Talk, ANIM_TrainToad_Green_Idle, 0, MSG_CH4_002E) + CaseLt(STORY_CH4_DEFEATED_GENERAL_GUY) + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Green_Talk, ANIM_TrainToad_Green_Idle, 0, MSG_CH4_002F) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Green_Talk, ANIM_TrainToad_Green_Idle, 0, MSG_CH4_0030) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_TrainToad) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_TrainToad))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_TrainToad))) + Return + End }; EvtScript N(EVS_NpcAI_BoxedShyGuy) = { - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(SetSelfVar, 0, 1) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_ShyGuy_Wander))) - EVT_END_IF - EVT_CASE_EQ(2) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(25) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetSelfVar, 0, LVar0) + Switch(LVar0) + CaseEq(0) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + IfEq(LVar1, 0) + Call(SetSelfVar, 0, 1) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_ShyGuy_Wander))) + EndIf + CaseEq(2) + Call(DisablePlayerInput, TRUE) + Wait(25) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(SetSelfVar, 0, 0) + Call(DisablePlayerInput, FALSE) + EndSwitch + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcDefeat_BoxedShyGuy) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(SetSelfVar, 0, 2) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_BoxedShyGuy))) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(SetSelfVar, 0, 2) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_BoxedShyGuy))) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_BoxedShyGuy) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcAI_BoxedShyGuy))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_BoxedShyGuy))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcAI_BoxedShyGuy))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_BoxedShyGuy))) + Return + End }; NpcData N(NpcData_Toads)[] = { diff --git a/src/world/area_omo/omo_09/omo_09_1_music.c b/src/world/area_omo/omo_09/omo_09_1_music.c index 90f4b728617..c5c26a51c65 100644 --- a/src/world/area_omo/omo_09/omo_09_1_music.c +++ b/src/world/area_omo/omo_09/omo_09_1_music.c @@ -1,11 +1,11 @@ #include "omo_09.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_EQ(GF_OMO09_SpawnedPeachChoice3, FALSE) - EVT_CALL(SetMusicTrack, 0, SONG_KAMMY_KOOPA_THEME, 0, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_OMO09_SpawnedPeachChoice3, FALSE) + Call(SetMusicTrack, 0, SONG_KAMMY_KOOPA_THEME, 0, 8) + Else + Call(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) + EndIf + Return + End }; diff --git a/src/world/area_omo/omo_09/omo_09_2_main.c b/src/world/area_omo/omo_09/omo_09_2_main.c index 80c3c6dd43a..e4e9fe2a2f1 100644 --- a/src/world/area_omo/omo_09/omo_09_2_main.c +++ b/src/world/area_omo/omo_09/omo_09_2_main.c @@ -5,56 +5,56 @@ EvtScript N(EVS_ExitWalk_omo_08_0) = EVT_EXIT_WALK(60, omo_09_ENTRY_0, "omo_08", MAP_RODATA_PAD(1, exits); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_08_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_omo_08_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) - EVT_IF_GE(GB_StoryProgress, STORY_CH4_DEFEATED_GENERAL_GUY) - EVT_SET(GF_OMO09_SpawnedPeachChoice3, TRUE) - EVT_END_IF - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() + Set(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) + IfGe(GB_StoryProgress, STORY_CH4_DEFEATED_GENERAL_GUY) + Set(GF_OMO09_SpawnedPeachChoice3, TRUE) + EndIf + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() #if VERSION_PAL - EVT_CALL(GetLanguage, LVar0) - EVT_IF_EQ(LVar0, LANGUAGE_ES) - EVT_SET(LVar0, LANGUAGE_FR) - EVT_END_IF - EVT_CALL(SetModelTexVariant, MODEL_s1, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_s2, LVar0) + Call(GetLanguage, LVar0) + IfEq(LVar0, LANGUAGE_ES) + Set(LVar0, LANGUAGE_FR) + EndIf + Call(SetModelTexVariant, MODEL_s1, LVar0) + Call(SetModelTexVariant, MODEL_s2, LVar0) #endif - EVT_IF_EQ(GF_OMO09_SpawnedPeachChoice3, FALSE) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(KammySceneNPCs))) - EVT_ELSE - EVT_IF_EQ(GF_OMO09_Item_SuperSoda, FALSE) - EVT_SWITCH(GB_OMO_PeachChoice3) - EVT_CASE_EQ(0) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(PokeyAmbushNPCs))) - EVT_CASE_EQ(1) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(KoopatrolAmbushNPCs))) - EVT_CASE_EQ(2) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(MakeItemEntity, ITEM_SUPER_SODA, 1900, 150, 0, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_SuperSoda) - EVT_END_SWITCH - EVT_ELSE - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_END_IF - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupGizmos)) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_EXEC_WAIT(N(EVS_SetupConveyors)) - EVT_EXEC_WAIT(N(EVS_SetupSlotMachine)) - EVT_IF_EQ(GF_OMO09_SpawnedPeachChoice3, FALSE) - EVT_EXEC(N(EVS_Scene_KammySetAmbush)) - EVT_WAIT(2) - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_OMO09_SpawnedPeachChoice3, FALSE) + Call(MakeNpcs, TRUE, Ref(N(KammySceneNPCs))) + Else + IfEq(GF_OMO09_Item_SuperSoda, FALSE) + Switch(GB_OMO_PeachChoice3) + CaseEq(0) + Call(MakeNpcs, TRUE, Ref(N(PokeyAmbushNPCs))) + CaseEq(1) + Call(MakeNpcs, TRUE, Ref(N(KoopatrolAmbushNPCs))) + CaseEq(2) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Call(MakeItemEntity, ITEM_SUPER_SODA, 1900, 150, 0, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_SuperSoda) + EndSwitch + Else + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + EndIf + EndIf + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupGizmos)) + ExecWait(N(EVS_SetupMusic)) + ExecWait(N(EVS_SetupConveyors)) + ExecWait(N(EVS_SetupSlotMachine)) + IfEq(GF_OMO09_SpawnedPeachChoice3, FALSE) + Exec(N(EVS_Scene_KammySetAmbush)) + Wait(2) + Else + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + EndIf + Return + End }; diff --git a/src/world/area_omo/omo_09/omo_09_3_conveyors.c b/src/world/area_omo/omo_09/omo_09_3_conveyors.c index 976d076afeb..db27e438e2a 100644 --- a/src/world/area_omo/omo_09/omo_09_3_conveyors.c +++ b/src/world/area_omo/omo_09/omo_09_3_conveyors.c @@ -105,29 +105,29 @@ API_CALLABLE(N(AddConveyorPush)) { } EvtScript N(EVS_SetupConveyors) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_CALL(EnableTexPanning, MODEL_1, TRUE) - EVT_CALL(EnableTexPanning, MODEL_3, TRUE) - EVT_CALL(EnableTexPanning, MODEL_4, TRUE) - EVT_CALL(EnableTexPanning, MODEL_8, TRUE) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LABEL(0) - EVT_CALL(N(WaitWhileConveyorPaused)) - EVT_ADD(LVar1, -1280) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, LVar1) - EVT_CALL(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, 0, LVar1) - EVT_CALL(SetTexPanOffset, TEX_PANNER_4, TEX_PANNER_MAIN, 0, LVar1) - EVT_CALL(SetTexPanOffset, TEX_PANNER_8, TEX_PANNER_MAIN, 0, LVar1) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_THREAD - EVT_THREAD - EVT_LABEL(10) - EVT_CALL(N(AddConveyorPush)) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_THREAD - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0B) + Call(EnableTexPanning, MODEL_1, TRUE) + Call(EnableTexPanning, MODEL_3, TRUE) + Call(EnableTexPanning, MODEL_4, TRUE) + Call(EnableTexPanning, MODEL_8, TRUE) + Thread + Set(LVar0, 0) + Label(0) + Call(N(WaitWhileConveyorPaused)) + Add(LVar1, -1280) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, LVar1) + Call(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, 0, LVar1) + Call(SetTexPanOffset, TEX_PANNER_4, TEX_PANNER_MAIN, 0, LVar1) + Call(SetTexPanOffset, TEX_PANNER_8, TEX_PANNER_MAIN, 0, LVar1) + Wait(1) + Goto(0) + EndThread + Thread + Label(10) + Call(N(AddConveyorPush)) + Wait(1) + Goto(10) + EndThread + Return + End }; diff --git a/src/world/area_omo/omo_09/omo_09_4_slot_machine.c b/src/world/area_omo/omo_09/omo_09_4_slot_machine.c index 26ee8c8168d..acfbdff1291 100644 --- a/src/world/area_omo/omo_09/omo_09_4_slot_machine.c +++ b/src/world/area_omo/omo_09/omo_09_4_slot_machine.c @@ -21,26 +21,26 @@ enum SlotMachineProgress { }; EvtScript N(EVS_SetCam_ViewReels) = { - EVT_WAIT(8) - EVT_CALL(N(DisableCameraLeadingPlayer)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 535, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 535, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_RETURN - EVT_END + Wait(8) + Call(N(DisableCameraLeadingPlayer)) + Call(UseSettingsFrom, CAM_DEFAULT, 535, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 535, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Return + End }; EvtScript N(EVS_SetCam_ViewPayout) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 535, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 535, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(275.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(16.0), EVT_FLOAT(-30.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, 535, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 535, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(275.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(16.0), Float(-30.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; s32 N(HitBlockRecoilOffsets)[] = { @@ -50,339 +50,339 @@ s32 N(HitBlockRecoilOffsets)[] = { }; EvtScript N(EVS_HitBlockRecoil) = { - EVT_USE_BUF(EVT_PTR(N(HitBlockRecoilOffsets))) - EVT_LOOP(12) - EVT_BUF_READ1(LVar1) - EVT_CALL(TranslateModel, LVar0, 0, LVar1, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + UseBuf(Ref(N(HitBlockRecoilOffsets))) + Loop(12) + BufRead1(LVar1) + Call(TranslateModel, LVar0, 0, LVar1, 0) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_HitBlock_SlotStart) = { - EVT_IF_EQ(MF_HitStartBlock, FALSE) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySoundAtCollider, COLLIDER_s1, SOUND_LOOP_OMO_SLOT_MACHINE, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_SET(MF_HitStartBlock, TRUE) - EVT_SET(AF_OMO09_StartBlock_DontBlink, TRUE) - EVT_CALL(EnableModel, MODEL_s1, TRUE) - EVT_CALL(EnableModel, MODEL_s2, FALSE) - EVT_SET(LVar0, MODEL_s1) - EVT_EXEC_WAIT(N(EVS_HitBlockRecoil)) - EVT_CALL(EnableModel, MODEL_s1, FALSE) - EVT_CALL(EnableModel, MODEL_s2, TRUE) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MF_HitStartBlock, FALSE) + Thread + Wait(15) + Call(PlaySoundAtCollider, COLLIDER_s1, SOUND_LOOP_OMO_SLOT_MACHINE, SOUND_SPACE_DEFAULT) + EndThread + Set(MF_HitStartBlock, TRUE) + Set(AF_OMO09_StartBlock_DontBlink, TRUE) + Call(EnableModel, MODEL_s1, TRUE) + Call(EnableModel, MODEL_s2, FALSE) + Set(LVar0, MODEL_s1) + ExecWait(N(EVS_HitBlockRecoil)) + Call(EnableModel, MODEL_s1, FALSE) + Call(EnableModel, MODEL_s2, TRUE) + EndIf + Return + End }; EvtScript N(EVS_HitBlock_SlotWheel1) = { - EVT_IF_EQ(MF_Block1_Hit, FALSE) - EVT_SET(MF_Block1_Hit, TRUE) - EVT_ADD(MV_SlotMachineProgress, SLOT_PROGRESS_HIT_ONE) - EVT_SET(MV_ProgressOnHitBlock1, MV_SlotMachineProgress) - EVT_IF_EQ(MV_SlotMachineProgress, SLOT_PROGRESS_HIT_THREE) - EVT_EXEC(N(EVS_SetCam_ViewReels)) - EVT_SET(MV_SlotMachineProgress, SLOT_PROGRESS_DISPENSE) - EVT_END_IF - EVT_SET(AF_OMO09_Block1_DontBlink, TRUE) - EVT_CALL(EnableModel, MODEL_h1, TRUE) - EVT_CALL(EnableModel, MODEL_h1_a, FALSE) - EVT_SET(LVar0, MODEL_h1) - EVT_EXEC_WAIT(N(EVS_HitBlockRecoil)) - EVT_CALL(EnableModel, MODEL_h1, FALSE) - EVT_CALL(EnableModel, MODEL_h1_a, TRUE) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MF_Block1_Hit, FALSE) + Set(MF_Block1_Hit, TRUE) + Add(MV_SlotMachineProgress, SLOT_PROGRESS_HIT_ONE) + Set(MV_ProgressOnHitBlock1, MV_SlotMachineProgress) + IfEq(MV_SlotMachineProgress, SLOT_PROGRESS_HIT_THREE) + Exec(N(EVS_SetCam_ViewReels)) + Set(MV_SlotMachineProgress, SLOT_PROGRESS_DISPENSE) + EndIf + Set(AF_OMO09_Block1_DontBlink, TRUE) + Call(EnableModel, MODEL_h1, TRUE) + Call(EnableModel, MODEL_h1_a, FALSE) + Set(LVar0, MODEL_h1) + ExecWait(N(EVS_HitBlockRecoil)) + Call(EnableModel, MODEL_h1, FALSE) + Call(EnableModel, MODEL_h1_a, TRUE) + EndIf + Return + End }; EvtScript N(EVS_HitBlock_SlotWheel2) = { - EVT_IF_EQ(MF_Block2_Hit, FALSE) - EVT_SET(MF_Block2_Hit, TRUE) - EVT_ADD(MV_SlotMachineProgress, SLOT_PROGRESS_HIT_ONE) - EVT_SET(MV_ProgressOnHitBlock2, MV_SlotMachineProgress) - EVT_IF_EQ(MV_SlotMachineProgress, SLOT_PROGRESS_HIT_THREE) - EVT_EXEC(N(EVS_SetCam_ViewReels)) - EVT_SET(MV_SlotMachineProgress, SLOT_PROGRESS_DISPENSE) - EVT_END_IF - EVT_SET(AF_OMO09_Block2_DontBlink, TRUE) - EVT_CALL(EnableModel, MODEL_h2, TRUE) - EVT_CALL(EnableModel, MODEL_h2_a, FALSE) - EVT_SET(LVar0, MODEL_h2) - EVT_EXEC_WAIT(N(EVS_HitBlockRecoil)) - EVT_CALL(EnableModel, MODEL_h2, FALSE) - EVT_CALL(EnableModel, MODEL_h2_a, TRUE) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MF_Block2_Hit, FALSE) + Set(MF_Block2_Hit, TRUE) + Add(MV_SlotMachineProgress, SLOT_PROGRESS_HIT_ONE) + Set(MV_ProgressOnHitBlock2, MV_SlotMachineProgress) + IfEq(MV_SlotMachineProgress, SLOT_PROGRESS_HIT_THREE) + Exec(N(EVS_SetCam_ViewReels)) + Set(MV_SlotMachineProgress, SLOT_PROGRESS_DISPENSE) + EndIf + Set(AF_OMO09_Block2_DontBlink, TRUE) + Call(EnableModel, MODEL_h2, TRUE) + Call(EnableModel, MODEL_h2_a, FALSE) + Set(LVar0, MODEL_h2) + ExecWait(N(EVS_HitBlockRecoil)) + Call(EnableModel, MODEL_h2, FALSE) + Call(EnableModel, MODEL_h2_a, TRUE) + EndIf + Return + End }; EvtScript N(EVS_HitBlock_SlotWheel3) = { - EVT_IF_EQ(MF_Block3_Hit, FALSE) - EVT_SET(MF_Block3_Hit, TRUE) - EVT_ADD(MV_SlotMachineProgress, SLOT_PROGRESS_HIT_ONE) - EVT_SET(MV_ProgressOnHitBlock3, MV_SlotMachineProgress) - EVT_IF_EQ(MV_SlotMachineProgress, SLOT_PROGRESS_HIT_THREE) - EVT_EXEC(N(EVS_SetCam_ViewReels)) - EVT_SET(MV_SlotMachineProgress, SLOT_PROGRESS_DISPENSE) - EVT_END_IF - EVT_SET(AF_OMO09_Block3_DontBlink, TRUE) - EVT_CALL(EnableModel, MODEL_h3, TRUE) - EVT_CALL(EnableModel, MODEL_h3_a, FALSE) - EVT_SET(LVar0, MODEL_h3) - EVT_EXEC_WAIT(N(EVS_HitBlockRecoil)) - EVT_CALL(EnableModel, MODEL_h3, FALSE) - EVT_CALL(EnableModel, MODEL_h3_a, TRUE) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MF_Block3_Hit, FALSE) + Set(MF_Block3_Hit, TRUE) + Add(MV_SlotMachineProgress, SLOT_PROGRESS_HIT_ONE) + Set(MV_ProgressOnHitBlock3, MV_SlotMachineProgress) + IfEq(MV_SlotMachineProgress, SLOT_PROGRESS_HIT_THREE) + Exec(N(EVS_SetCam_ViewReels)) + Set(MV_SlotMachineProgress, SLOT_PROGRESS_DISPENSE) + EndIf + Set(AF_OMO09_Block3_DontBlink, TRUE) + Call(EnableModel, MODEL_h3, TRUE) + Call(EnableModel, MODEL_h3_a, FALSE) + Set(LVar0, MODEL_h3) + ExecWait(N(EVS_HitBlockRecoil)) + Call(EnableModel, MODEL_h3, FALSE) + Call(EnableModel, MODEL_h3_a, TRUE) + EndIf + Return + End }; EvtScript N(EVS_UpdateActiveBlock1) = { - EVT_SET(MF_Block1_Active, TRUE) - EVT_SET(LVar2, MV_SlotWheel1_Angle) - EVT_ADD(LVar2, 360) - EVT_SET(LVar5, 0) - EVT_SET(LVar9, 0) - EVT_CALL(MakeLerp, MV_SlotWheel1_Angle, LVar2, 50, EASING_QUADRATIC_IN) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o864, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o865, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o866, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o867, LVar0, 1, 0, 0) - EVT_SET(LVar8, LVar0) - EVT_SUB(LVar8, LVar9) - EVT_SET(LVar9, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(RandInt, 7, LVar7) - EVT_MUL(LVar7, 45) - EVT_ADD(LVar7, 2520) - EVT_SET(LVar6, LVar7) - EVT_DIV(LVar6, LVar8) - EVT_SET(LVar3, LVar2) - EVT_ADD(LVar3, LVar7) - EVT_CALL(MakeLerp, LVar2, LVar3, LVar6, EASING_LINEAR) - EVT_LABEL(5) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o864, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o865, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o866, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o867, LVar0, 1, 0, 0) - EVT_IF_EQ(MF_Block1_Hit, TRUE) - EVT_SET(LVar9, LVar0) - EVT_MOD(LVar9, 45) - EVT_IF_EQ(LVar9, 0) - EVT_SUB(MV_ProgressOnHitBlock1, 1) - EVT_IF_EQ(MV_ProgressOnHitBlock1, 0) - EVT_GOTO(10) - EVT_END_IF - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(AB_OMO09_IsPlayerNearSlotMachine, FALSE) - EVT_SET(MF_Block1_Hit, TRUE) - EVT_ADD(MV_SlotMachineProgress, SLOT_PROGRESS_HIT_ONE) - EVT_SET(MV_ProgressOnHitBlock1, MV_SlotMachineProgress) - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(5) - EVT_LABEL(10) - EVT_IF_EQ(MF_Block1_Hit, TRUE) - EVT_SET(LVar3, LVar0) - EVT_END_IF - EVT_SET(LVar4, LVar3) - EVT_ADD(LVar4, 1080) - EVT_CALL(MakeLerp, LVar3, LVar4, 40, EASING_QUADRATIC_OUT) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o864, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o865, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o866, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o867, LVar0, 1, 0, 0) - EVT_IF_NE(LVar3, LVar0) - EVT_WAIT(1) - EVT_END_IF - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_SET(MF_Block1_Hit, TRUE) - EVT_SET(MF_Block1_Active, FALSE) - EVT_SET(MV_SlotWheel1_Angle, LVar4) - EVT_IF_EQ(AB_OMO09_IsPlayerNearSlotMachine, TRUE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_h1, SOUND_DING, SOUND_SPACE_DEFAULT) - EVT_END_IF - EVT_RETURN - EVT_END + Set(MF_Block1_Active, TRUE) + Set(LVar2, MV_SlotWheel1_Angle) + Add(LVar2, 360) + Set(LVar5, 0) + Set(LVar9, 0) + Call(MakeLerp, MV_SlotWheel1_Angle, LVar2, 50, EASING_QUADRATIC_IN) + Label(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o864, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o865, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o866, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o867, LVar0, 1, 0, 0) + Set(LVar8, LVar0) + Sub(LVar8, LVar9) + Set(LVar9, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(RandInt, 7, LVar7) + Mul(LVar7, 45) + Add(LVar7, 2520) + Set(LVar6, LVar7) + Div(LVar6, LVar8) + Set(LVar3, LVar2) + Add(LVar3, LVar7) + Call(MakeLerp, LVar2, LVar3, LVar6, EASING_LINEAR) + Label(5) + Call(UpdateLerp) + Call(RotateModel, MODEL_o864, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o865, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o866, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o867, LVar0, 1, 0, 0) + IfEq(MF_Block1_Hit, TRUE) + Set(LVar9, LVar0) + Mod(LVar9, 45) + IfEq(LVar9, 0) + Sub(MV_ProgressOnHitBlock1, 1) + IfEq(MV_ProgressOnHitBlock1, 0) + Goto(10) + EndIf + EndIf + Else + IfEq(AB_OMO09_IsPlayerNearSlotMachine, FALSE) + Set(MF_Block1_Hit, TRUE) + Add(MV_SlotMachineProgress, SLOT_PROGRESS_HIT_ONE) + Set(MV_ProgressOnHitBlock1, MV_SlotMachineProgress) + EndIf + EndIf + Wait(1) + Goto(5) + Label(10) + IfEq(MF_Block1_Hit, TRUE) + Set(LVar3, LVar0) + EndIf + Set(LVar4, LVar3) + Add(LVar4, 1080) + Call(MakeLerp, LVar3, LVar4, 40, EASING_QUADRATIC_OUT) + Label(2) + Call(UpdateLerp) + Call(RotateModel, MODEL_o864, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o865, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o866, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o867, LVar0, 1, 0, 0) + IfNe(LVar3, LVar0) + Wait(1) + EndIf + IfEq(LVar1, 1) + Goto(2) + EndIf + Set(MF_Block1_Hit, TRUE) + Set(MF_Block1_Active, FALSE) + Set(MV_SlotWheel1_Angle, LVar4) + IfEq(AB_OMO09_IsPlayerNearSlotMachine, TRUE) + Call(PlaySoundAtCollider, COLLIDER_h1, SOUND_DING, SOUND_SPACE_DEFAULT) + EndIf + Return + End }; EvtScript N(EVS_UpdateActiveBlock2) = { - EVT_SET(MF_Block2_Active, TRUE) - EVT_SET(LVar2, MV_SlotWheel2_Angle) - EVT_ADD(LVar2, 360) - EVT_SET(LVar5, 0) - EVT_SET(LVar9, 0) - EVT_CALL(MakeLerp, MV_SlotWheel2_Angle, LVar2, 50, EASING_QUADRATIC_IN) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o868, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o869, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o870, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o871, LVar0, 1, 0, 0) - EVT_SET(LVar8, LVar0) - EVT_SUB(LVar8, LVar9) - EVT_SET(LVar9, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(RandInt, 7, LVar7) - EVT_MUL(LVar7, 45) - EVT_ADD(LVar7, 3240) - EVT_SET(LVar6, LVar7) - EVT_DIV(LVar6, LVar8) - EVT_SET(LVar3, LVar2) - EVT_ADD(LVar3, LVar7) - EVT_CALL(MakeLerp, LVar2, LVar3, LVar6, EASING_LINEAR) - EVT_LABEL(5) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o868, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o869, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o870, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o871, LVar0, 1, 0, 0) - EVT_IF_EQ(MF_Block2_Hit, TRUE) - EVT_SET(LVar9, LVar0) - EVT_MOD(LVar9, 45) - EVT_IF_EQ(LVar9, 0) - EVT_SUB(MV_ProgressOnHitBlock2, 1) - EVT_IF_EQ(MV_ProgressOnHitBlock2, 0) - EVT_GOTO(10) - EVT_END_IF - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(AB_OMO09_IsPlayerNearSlotMachine, FALSE) - EVT_SET(MF_Block2_Hit, TRUE) - EVT_ADD(MV_SlotMachineProgress, SLOT_PROGRESS_HIT_ONE) - EVT_SET(MV_ProgressOnHitBlock2, MV_SlotMachineProgress) - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(5) - EVT_LABEL(10) - EVT_IF_EQ(MF_Block2_Hit, TRUE) - EVT_SET(LVar3, LVar0) - EVT_END_IF - EVT_SET(LVar4, LVar3) - EVT_ADD(LVar4, 1080) - EVT_CALL(MakeLerp, LVar3, LVar4, 40, EASING_QUADRATIC_OUT) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o868, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o869, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o870, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o871, LVar0, 1, 0, 0) - EVT_IF_NE(LVar3, LVar0) - EVT_WAIT(1) - EVT_END_IF - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_SET(MF_Block2_Hit, TRUE) - EVT_SET(MF_Block2_Active, FALSE) - EVT_SET(MV_SlotWheel2_Angle, LVar4) - EVT_IF_EQ(AB_OMO09_IsPlayerNearSlotMachine, TRUE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_h2, SOUND_DING, SOUND_SPACE_DEFAULT) - EVT_END_IF - EVT_RETURN - EVT_END + Set(MF_Block2_Active, TRUE) + Set(LVar2, MV_SlotWheel2_Angle) + Add(LVar2, 360) + Set(LVar5, 0) + Set(LVar9, 0) + Call(MakeLerp, MV_SlotWheel2_Angle, LVar2, 50, EASING_QUADRATIC_IN) + Label(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o868, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o869, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o870, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o871, LVar0, 1, 0, 0) + Set(LVar8, LVar0) + Sub(LVar8, LVar9) + Set(LVar9, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(RandInt, 7, LVar7) + Mul(LVar7, 45) + Add(LVar7, 3240) + Set(LVar6, LVar7) + Div(LVar6, LVar8) + Set(LVar3, LVar2) + Add(LVar3, LVar7) + Call(MakeLerp, LVar2, LVar3, LVar6, EASING_LINEAR) + Label(5) + Call(UpdateLerp) + Call(RotateModel, MODEL_o868, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o869, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o870, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o871, LVar0, 1, 0, 0) + IfEq(MF_Block2_Hit, TRUE) + Set(LVar9, LVar0) + Mod(LVar9, 45) + IfEq(LVar9, 0) + Sub(MV_ProgressOnHitBlock2, 1) + IfEq(MV_ProgressOnHitBlock2, 0) + Goto(10) + EndIf + EndIf + Else + IfEq(AB_OMO09_IsPlayerNearSlotMachine, FALSE) + Set(MF_Block2_Hit, TRUE) + Add(MV_SlotMachineProgress, SLOT_PROGRESS_HIT_ONE) + Set(MV_ProgressOnHitBlock2, MV_SlotMachineProgress) + EndIf + EndIf + Wait(1) + Goto(5) + Label(10) + IfEq(MF_Block2_Hit, TRUE) + Set(LVar3, LVar0) + EndIf + Set(LVar4, LVar3) + Add(LVar4, 1080) + Call(MakeLerp, LVar3, LVar4, 40, EASING_QUADRATIC_OUT) + Label(2) + Call(UpdateLerp) + Call(RotateModel, MODEL_o868, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o869, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o870, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o871, LVar0, 1, 0, 0) + IfNe(LVar3, LVar0) + Wait(1) + EndIf + IfEq(LVar1, 1) + Goto(2) + EndIf + Set(MF_Block2_Hit, TRUE) + Set(MF_Block2_Active, FALSE) + Set(MV_SlotWheel2_Angle, LVar4) + IfEq(AB_OMO09_IsPlayerNearSlotMachine, TRUE) + Call(PlaySoundAtCollider, COLLIDER_h2, SOUND_DING, SOUND_SPACE_DEFAULT) + EndIf + Return + End }; EvtScript N(EVS_UpdateActiveBlock3) = { - EVT_SET(MF_Block3_Active, TRUE) - EVT_SET(LVar2, MV_SlotWheel3_Angle) - EVT_ADD(LVar2, 360) - EVT_SET(LVar5, 0) - EVT_SET(LVar9, 0) - EVT_CALL(MakeLerp, MV_SlotWheel3_Angle, LVar2, 50, EASING_QUADRATIC_IN) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o872, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o873, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o874, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o875, LVar0, 1, 0, 0) - EVT_SET(LVar8, LVar0) - EVT_SUB(LVar8, LVar9) - EVT_SET(LVar9, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(RandInt, 7, LVar7) - EVT_MUL(LVar7, 45) - EVT_ADD(LVar7, 3960) - EVT_SET(LVar6, LVar7) - EVT_DIV(LVar6, LVar8) - EVT_SET(LVar3, LVar2) - EVT_ADD(LVar3, LVar7) - EVT_CALL(MakeLerp, LVar2, LVar3, LVar6, EASING_LINEAR) - EVT_LABEL(5) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o872, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o873, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o874, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o875, LVar0, 1, 0, 0) - EVT_IF_EQ(MF_Block3_Hit, TRUE) - EVT_SET(LVar9, LVar0) - EVT_MOD(LVar9, 45) - EVT_IF_EQ(LVar9, 0) - EVT_SUB(MV_ProgressOnHitBlock3, 1) - EVT_IF_EQ(MV_ProgressOnHitBlock3, 0) - EVT_GOTO(10) - EVT_END_IF - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(AB_OMO09_IsPlayerNearSlotMachine, FALSE) - EVT_SET(MF_Block3_Hit, TRUE) - EVT_ADD(MV_SlotMachineProgress, SLOT_PROGRESS_HIT_ONE) - EVT_SET(MV_ProgressOnHitBlock3, MV_SlotMachineProgress) - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(5) - EVT_LABEL(10) - EVT_IF_EQ(MF_Block3_Hit, TRUE) - EVT_SET(LVar3, LVar0) - EVT_END_IF - EVT_SET(LVar4, LVar3) - EVT_ADD(LVar4, 1080) - EVT_CALL(MakeLerp, LVar3, LVar4, 40, EASING_QUADRATIC_OUT) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o872, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o873, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o874, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o875, LVar0, 1, 0, 0) - EVT_IF_NE(LVar3, LVar0) - EVT_WAIT(1) - EVT_END_IF - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_SET(MF_Block3_Hit, TRUE) - EVT_SET(MF_Block3_Active, FALSE) - EVT_SET(MV_SlotWheel3_Angle, LVar4) - EVT_IF_EQ(AB_OMO09_IsPlayerNearSlotMachine, TRUE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_h3, SOUND_DING, SOUND_SPACE_DEFAULT) - EVT_END_IF - EVT_RETURN - EVT_END + Set(MF_Block3_Active, TRUE) + Set(LVar2, MV_SlotWheel3_Angle) + Add(LVar2, 360) + Set(LVar5, 0) + Set(LVar9, 0) + Call(MakeLerp, MV_SlotWheel3_Angle, LVar2, 50, EASING_QUADRATIC_IN) + Label(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o872, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o873, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o874, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o875, LVar0, 1, 0, 0) + Set(LVar8, LVar0) + Sub(LVar8, LVar9) + Set(LVar9, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(RandInt, 7, LVar7) + Mul(LVar7, 45) + Add(LVar7, 3960) + Set(LVar6, LVar7) + Div(LVar6, LVar8) + Set(LVar3, LVar2) + Add(LVar3, LVar7) + Call(MakeLerp, LVar2, LVar3, LVar6, EASING_LINEAR) + Label(5) + Call(UpdateLerp) + Call(RotateModel, MODEL_o872, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o873, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o874, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o875, LVar0, 1, 0, 0) + IfEq(MF_Block3_Hit, TRUE) + Set(LVar9, LVar0) + Mod(LVar9, 45) + IfEq(LVar9, 0) + Sub(MV_ProgressOnHitBlock3, 1) + IfEq(MV_ProgressOnHitBlock3, 0) + Goto(10) + EndIf + EndIf + Else + IfEq(AB_OMO09_IsPlayerNearSlotMachine, FALSE) + Set(MF_Block3_Hit, TRUE) + Add(MV_SlotMachineProgress, SLOT_PROGRESS_HIT_ONE) + Set(MV_ProgressOnHitBlock3, MV_SlotMachineProgress) + EndIf + EndIf + Wait(1) + Goto(5) + Label(10) + IfEq(MF_Block3_Hit, TRUE) + Set(LVar3, LVar0) + EndIf + Set(LVar4, LVar3) + Add(LVar4, 1080) + Call(MakeLerp, LVar3, LVar4, 40, EASING_QUADRATIC_OUT) + Label(2) + Call(UpdateLerp) + Call(RotateModel, MODEL_o872, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o873, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o874, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o875, LVar0, 1, 0, 0) + IfNe(LVar3, LVar0) + Wait(1) + EndIf + IfEq(LVar1, 1) + Goto(2) + EndIf + Set(MF_Block3_Hit, TRUE) + Set(MF_Block3_Active, FALSE) + Set(MV_SlotWheel3_Angle, LVar4) + IfEq(AB_OMO09_IsPlayerNearSlotMachine, TRUE) + Call(PlaySoundAtCollider, COLLIDER_h3, SOUND_DING, SOUND_SPACE_DEFAULT) + EndIf + Return + End }; //TODO these should be a 3x8 array @@ -446,323 +446,323 @@ API_CALLABLE(N(CheckSlotsResult)) { } EvtScript N(EVS_Block1_UpdateBlinking) = { - EVT_SET(AF_OMO09_Block1_DontBlink, FALSE) - EVT_SET(LVar0, 0) - EVT_LABEL(0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(EnableModel, MODEL_h1, TRUE) - EVT_CALL(EnableModel, MODEL_h1_a, FALSE) - EVT_SET(LVar0, 1) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_h1, FALSE) - EVT_CALL(EnableModel, MODEL_h1_a, TRUE) - EVT_SET(LVar0, 0) - EVT_END_IF - EVT_LOOP(10) - EVT_WAIT(1) - EVT_IF_EQ(AB_OMO09_IsPlayerNearSlotMachine, FALSE) - EVT_SET(AF_OMO09_Block1_DontBlink, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_IF_EQ(AF_OMO09_Block1_DontBlink, FALSE) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Set(AF_OMO09_Block1_DontBlink, FALSE) + Set(LVar0, 0) + Label(0) + IfEq(LVar0, 0) + Call(EnableModel, MODEL_h1, TRUE) + Call(EnableModel, MODEL_h1_a, FALSE) + Set(LVar0, 1) + Else + Call(EnableModel, MODEL_h1, FALSE) + Call(EnableModel, MODEL_h1_a, TRUE) + Set(LVar0, 0) + EndIf + Loop(10) + Wait(1) + IfEq(AB_OMO09_IsPlayerNearSlotMachine, FALSE) + Set(AF_OMO09_Block1_DontBlink, TRUE) + BreakLoop + EndIf + EndLoop + IfEq(AF_OMO09_Block1_DontBlink, FALSE) + Goto(0) + EndIf + Return + End }; EvtScript N(EVS_Block2_UpdateBlinking) = { - EVT_SET(AF_OMO09_Block2_DontBlink, FALSE) - EVT_SET(LVar0, 0) - EVT_LABEL(0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(EnableModel, MODEL_h2, TRUE) - EVT_CALL(EnableModel, MODEL_h2_a, FALSE) - EVT_SET(LVar0, 1) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_h2, FALSE) - EVT_CALL(EnableModel, MODEL_h2_a, TRUE) - EVT_SET(LVar0, 0) - EVT_END_IF - EVT_LOOP(10) - EVT_WAIT(1) - EVT_IF_EQ(AB_OMO09_IsPlayerNearSlotMachine, FALSE) - EVT_SET(AF_OMO09_Block2_DontBlink, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_IF_EQ(AF_OMO09_Block2_DontBlink, FALSE) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Set(AF_OMO09_Block2_DontBlink, FALSE) + Set(LVar0, 0) + Label(0) + IfEq(LVar0, 0) + Call(EnableModel, MODEL_h2, TRUE) + Call(EnableModel, MODEL_h2_a, FALSE) + Set(LVar0, 1) + Else + Call(EnableModel, MODEL_h2, FALSE) + Call(EnableModel, MODEL_h2_a, TRUE) + Set(LVar0, 0) + EndIf + Loop(10) + Wait(1) + IfEq(AB_OMO09_IsPlayerNearSlotMachine, FALSE) + Set(AF_OMO09_Block2_DontBlink, TRUE) + BreakLoop + EndIf + EndLoop + IfEq(AF_OMO09_Block2_DontBlink, FALSE) + Goto(0) + EndIf + Return + End }; EvtScript N(EVS_Block3_UpdateBlinking) = { - EVT_SET(AF_OMO09_Block3_DontBlink, FALSE) - EVT_SET(LVar0, 0) - EVT_LABEL(0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(EnableModel, MODEL_h3, TRUE) - EVT_CALL(EnableModel, MODEL_h3_a, FALSE) - EVT_SET(LVar0, 1) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_h3, FALSE) - EVT_CALL(EnableModel, MODEL_h3_a, TRUE) - EVT_SET(LVar0, 0) - EVT_END_IF - EVT_LOOP(10) - EVT_WAIT(1) - EVT_IF_EQ(AB_OMO09_IsPlayerNearSlotMachine, FALSE) - EVT_SET(AF_OMO09_Block3_DontBlink, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_IF_EQ(AF_OMO09_Block3_DontBlink, FALSE) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Set(AF_OMO09_Block3_DontBlink, FALSE) + Set(LVar0, 0) + Label(0) + IfEq(LVar0, 0) + Call(EnableModel, MODEL_h3, TRUE) + Call(EnableModel, MODEL_h3_a, FALSE) + Set(LVar0, 1) + Else + Call(EnableModel, MODEL_h3, FALSE) + Call(EnableModel, MODEL_h3_a, TRUE) + Set(LVar0, 0) + EndIf + Loop(10) + Wait(1) + IfEq(AB_OMO09_IsPlayerNearSlotMachine, FALSE) + Set(AF_OMO09_Block3_DontBlink, TRUE) + BreakLoop + EndIf + EndLoop + IfEq(AF_OMO09_Block3_DontBlink, FALSE) + Goto(0) + EndIf + Return + End }; EvtScript N(EVS_StartBlock_UpdateBlinking) = { - EVT_SET(AF_OMO09_StartBlock_DontBlink, FALSE) - EVT_SET(LVar0, 0) - EVT_LABEL(0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(EnableModel, MODEL_s1, TRUE) - EVT_CALL(EnableModel, MODEL_s2, FALSE) - EVT_SET(LVar0, 1) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_s1, FALSE) - EVT_CALL(EnableModel, MODEL_s2, TRUE) - EVT_SET(LVar0, 0) - EVT_END_IF - EVT_WAIT(10) - EVT_IF_EQ(AF_OMO09_StartBlock_DontBlink, FALSE) - EVT_GOTO(0) - EVT_END_IF - EVT_SET(AB_OMO09_IsPlayerNearSlotMachine, TRUE) - EVT_EXEC(N(EVS_Block1_UpdateBlinking)) - EVT_EXEC(N(EVS_Block2_UpdateBlinking)) - EVT_EXEC(N(EVS_Block3_UpdateBlinking)) - EVT_RETURN - EVT_END + Set(AF_OMO09_StartBlock_DontBlink, FALSE) + Set(LVar0, 0) + Label(0) + IfEq(LVar0, 0) + Call(EnableModel, MODEL_s1, TRUE) + Call(EnableModel, MODEL_s2, FALSE) + Set(LVar0, 1) + Else + Call(EnableModel, MODEL_s1, FALSE) + Call(EnableModel, MODEL_s2, TRUE) + Set(LVar0, 0) + EndIf + Wait(10) + IfEq(AF_OMO09_StartBlock_DontBlink, FALSE) + Goto(0) + EndIf + Set(AB_OMO09_IsPlayerNearSlotMachine, TRUE) + Exec(N(EVS_Block1_UpdateBlinking)) + Exec(N(EVS_Block2_UpdateBlinking)) + Exec(N(EVS_Block3_UpdateBlinking)) + Return + End }; EvtScript N(EVS_SlotMachine_MainUpdate) = { - EVT_LABEL(0) - EVT_SET(MF_AnimateSlotLights, FALSE) - EVT_LABEL(1) - EVT_WAIT(1) - EVT_IF_EQ(MF_HitStartBlock, FALSE) - EVT_GOTO(1) - EVT_END_IF - EVT_SET(MF_Block1_Hit, FALSE) - EVT_SET(MF_Block2_Hit, FALSE) - EVT_SET(MF_Block3_Hit, FALSE) - EVT_SET(MV_ProgressOnHitBlock1, 0) - EVT_SET(MV_ProgressOnHitBlock2, 0) - EVT_SET(MV_ProgressOnHitBlock3, 0) - EVT_SET(MV_SlotMachineProgress, 0) - EVT_EXEC(N(EVS_UpdateActiveBlock1)) - EVT_EXEC(N(EVS_UpdateActiveBlock2)) - EVT_EXEC(N(EVS_UpdateActiveBlock3)) - EVT_WAIT(3) - EVT_SET(LVar0, 0) - EVT_SET(LVar2, 0) - EVT_LABEL(2) - EVT_CALL(IsPlayerWithin, 525, 0, 500, AB_OMO09_IsPlayerNearSlotMachine) - EVT_IF_EQ(AB_OMO09_IsPlayerNearSlotMachine, FALSE) - EVT_CALL(StopSound, SOUND_LOOP_OMO_SLOT_MACHINE) - EVT_WAIT(100) - EVT_GOTO(99) - EVT_END_IF + Label(0) + Set(MF_AnimateSlotLights, FALSE) + Label(1) + Wait(1) + IfEq(MF_HitStartBlock, FALSE) + Goto(1) + EndIf + Set(MF_Block1_Hit, FALSE) + Set(MF_Block2_Hit, FALSE) + Set(MF_Block3_Hit, FALSE) + Set(MV_ProgressOnHitBlock1, 0) + Set(MV_ProgressOnHitBlock2, 0) + Set(MV_ProgressOnHitBlock3, 0) + Set(MV_SlotMachineProgress, 0) + Exec(N(EVS_UpdateActiveBlock1)) + Exec(N(EVS_UpdateActiveBlock2)) + Exec(N(EVS_UpdateActiveBlock3)) + Wait(3) + Set(LVar0, 0) + Set(LVar2, 0) + Label(2) + Call(IsPlayerWithin, 525, 0, 500, AB_OMO09_IsPlayerNearSlotMachine) + IfEq(AB_OMO09_IsPlayerNearSlotMachine, FALSE) + Call(StopSound, SOUND_LOOP_OMO_SLOT_MACHINE) + Wait(100) + Goto(99) + EndIf // how many blocks have been hit? - EVT_SET(LVar1, MF_Block1_Active) - EVT_ADD(LVar1, MF_Block2_Active) - EVT_ADD(LVar1, MF_Block3_Active) - EVT_IF_EQ(LVar2, 0) - EVT_SET(LVarA, SLOT_MATCH_NONE) - EVT_IF_EQ(MF_Block1_Active, FALSE) - EVT_IF_EQ(MF_Block2_Active, FALSE) - EVT_SET(LVar2, 1) - EVT_CALL(N(CheckSlotsResult), MV_SlotWheel1_Angle, MV_SlotWheel2_Angle, -1) - EVT_END_IF - EVT_IF_EQ(MF_Block3_Active, FALSE) - EVT_SET(LVar2, 1) - EVT_CALL(N(CheckSlotsResult), MV_SlotWheel1_Angle, -1, MV_SlotWheel3_Angle) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(MF_Block2_Active, FALSE) - EVT_IF_EQ(MF_Block3_Active, FALSE) - EVT_SET(LVar2, 1) - EVT_CALL(N(CheckSlotsResult), -1, MV_SlotWheel2_Angle, MV_SlotWheel3_Angle) - EVT_END_IF - EVT_END_IF - EVT_IF_NE(LVarA, SLOT_MATCH_NONE) + Set(LVar1, MF_Block1_Active) + Add(LVar1, MF_Block2_Active) + Add(LVar1, MF_Block3_Active) + IfEq(LVar2, 0) + Set(LVarA, SLOT_MATCH_NONE) + IfEq(MF_Block1_Active, FALSE) + IfEq(MF_Block2_Active, FALSE) + Set(LVar2, 1) + Call(N(CheckSlotsResult), MV_SlotWheel1_Angle, MV_SlotWheel2_Angle, -1) + EndIf + IfEq(MF_Block3_Active, FALSE) + Set(LVar2, 1) + Call(N(CheckSlotsResult), MV_SlotWheel1_Angle, -1, MV_SlotWheel3_Angle) + EndIf + EndIf + IfEq(MF_Block2_Active, FALSE) + IfEq(MF_Block3_Active, FALSE) + Set(LVar2, 1) + Call(N(CheckSlotsResult), -1, MV_SlotWheel2_Angle, MV_SlotWheel3_Angle) + EndIf + EndIf + IfNe(LVarA, SLOT_MATCH_NONE) // partial match after two blocks hit - EVT_SET(MF_AnimateSlotLights, TRUE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o881, SOUND_LRAW_OMO_SLOT_MACHINE | SOUND_ID_TRIGGER_CHANGE_VOLUME, SOUND_SPACE_DEFAULT) - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) + Set(MF_AnimateSlotLights, TRUE) + Call(PlaySoundAtCollider, COLLIDER_o881, SOUND_LRAW_OMO_SLOT_MACHINE | SOUND_ID_TRIGGER_CHANGE_VOLUME, SOUND_SPACE_DEFAULT) + EndIf + EndIf + Wait(1) // wait until all blocks are hit - EVT_IF_NE(LVar1, 0) - EVT_GOTO(2) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(StopSound, SOUND_LOOP_OMO_SLOT_MACHINE) - EVT_WAIT(20) - EVT_CALL(N(CheckSlotsResult), MV_SlotWheel1_Angle, MV_SlotWheel2_Angle, MV_SlotWheel3_Angle) - EVT_IF_NE(LVarA, 0) - EVT_SET(MF_AnimateSlotLights, TRUE) - EVT_END_IF - EVT_SET(MV_ResetCamSpeed, EVT_FLOAT(90.0)) + IfNe(LVar1, 0) + Goto(2) + EndIf + Call(DisablePlayerInput, TRUE) + Call(StopSound, SOUND_LOOP_OMO_SLOT_MACHINE) + Wait(20) + Call(N(CheckSlotsResult), MV_SlotWheel1_Angle, MV_SlotWheel2_Angle, MV_SlotWheel3_Angle) + IfNe(LVarA, 0) + Set(MF_AnimateSlotLights, TRUE) + EndIf + Set(MV_ResetCamSpeed, Float(90.0)) // dispense rewards - EVT_SWITCH(LVarB) - EVT_CASE_EQ(SYM_SHYGUY) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(SLOT_MATCH_THREE) - EVT_EXEC_WAIT(N(EVS_SetCam_ViewPayout)) - EVT_THREAD - EVT_CALL(SetNpcPos, NPC_ShyGuy_Jackpot1, 485, 130, -50) - EVT_CALL(SetNpcJumpscale, NPC_ShyGuy_Jackpot1, EVT_FLOAT(0.8)) - EVT_CALL(NpcJump0, NPC_ShyGuy_Jackpot1, 460, 0, 50, 30) - EVT_CALL(SetNpcFlagBits, NPC_ShyGuy_Jackpot1, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcPos, NPC_ShyGuy_Jackpot2, 510, 130, -50) - EVT_CALL(SetNpcJumpscale, NPC_ShyGuy_Jackpot2, EVT_FLOAT(0.8)) - EVT_CALL(NpcJump0, NPC_ShyGuy_Jackpot2, 497, 0, 50, 30) - EVT_CALL(SetNpcFlagBits, NPC_ShyGuy_Jackpot2, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcPos, NPC_ShyGuy_Jackpot3, 535, 130, -50) - EVT_CALL(SetNpcJumpscale, NPC_ShyGuy_Jackpot3, EVT_FLOAT(0.8)) - EVT_CALL(NpcJump0, NPC_ShyGuy_Jackpot3, 535, 0, 50, 30) - EVT_CALL(SetNpcFlagBits, NPC_ShyGuy_Jackpot3, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcPos, NPC_ShyGuy_Jackpot4, 560, 130, -50) - EVT_CALL(SetNpcJumpscale, NPC_ShyGuy_Jackpot4, EVT_FLOAT(0.8)) - EVT_CALL(NpcJump0, NPC_ShyGuy_Jackpot4, 573, 0, 50, 30) - EVT_CALL(SetNpcFlagBits, NPC_ShyGuy_Jackpot4, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcPos, NPC_ShyGuy_Jackpot5, 585, 130, -50) - EVT_CALL(SetNpcJumpscale, NPC_ShyGuy_Jackpot5, EVT_FLOAT(0.8)) - EVT_CALL(NpcJump0, NPC_ShyGuy_Jackpot5, 610, 0, 50, 30) - EVT_CALL(SetNpcFlagBits, NPC_ShyGuy_Jackpot5, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_END_THREAD - EVT_WAIT(20) - EVT_CASE_EQ(SLOT_MATCH_TWO) - EVT_EXEC_WAIT(N(EVS_SetCam_ViewPayout)) - EVT_THREAD - EVT_CALL(SetNpcPos, NPC_ShyGuy_Jackpot2, 510, 130, -50) - EVT_CALL(SetNpcJumpscale, NPC_ShyGuy_Jackpot2, EVT_FLOAT(0.8)) - EVT_CALL(NpcJump0, NPC_ShyGuy_Jackpot2, 497, 0, 50, 30) - EVT_CALL(SetNpcFlagBits, NPC_ShyGuy_Jackpot2, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcPos, NPC_ShyGuy_Jackpot4, 560, 130, -50) - EVT_CALL(SetNpcJumpscale, NPC_ShyGuy_Jackpot4, EVT_FLOAT(0.8)) - EVT_CALL(NpcJump0, NPC_ShyGuy_Jackpot4, 573, 0, 50, 30) - EVT_CALL(SetNpcFlagBits, NPC_ShyGuy_Jackpot4, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_END_THREAD - EVT_WAIT(20) - EVT_CASE_DEFAULT - EVT_SET(MV_ResetCamSpeed, EVT_FLOAT(2.0)) - EVT_END_SWITCH - EVT_CASE_EQ(SYM_COIN) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(SLOT_MATCH_THREE) - EVT_EXEC_WAIT(N(EVS_SetCam_ViewPayout)) - EVT_THREAD - EVT_LOOP(2) - EVT_SET(LVar1, 480) - EVT_LOOP(5) - EVT_ADD(LVar1, 20) - EVT_CALL(MakeItemEntity, ITEM_COIN, LVar1, 150, 50, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) - EVT_WAIT(3) - EVT_END_LOOP - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(30) - EVT_CASE_EQ(SLOT_MATCH_TWO) - EVT_EXEC_WAIT(N(EVS_SetCam_ViewPayout)) - EVT_CALL(MakeItemEntity, ITEM_COIN, 535, 150, 50, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) - EVT_WAIT(30) - EVT_CASE_DEFAULT - EVT_SET(MV_ResetCamSpeed, EVT_FLOAT(2.0)) - EVT_END_SWITCH - EVT_CASE_EQ(SYM_STAR) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(SLOT_MATCH_THREE) - EVT_EXEC_WAIT(N(EVS_SetCam_ViewPayout)) - EVT_THREAD - EVT_LOOP(2) - EVT_SET(LVar1, 480) - EVT_LOOP(5) - EVT_ADD(LVar1, 20) - EVT_CALL(MakeItemEntity, ITEM_MUSHROOM, LVar1, 150, 50, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) - EVT_WAIT(3) - EVT_END_LOOP - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(30) - EVT_CASE_EQ(SLOT_MATCH_TWO) - EVT_EXEC_WAIT(N(EVS_SetCam_ViewPayout)) - EVT_CALL(MakeItemEntity, ITEM_MUSHROOM, 535, 150, 50, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) - EVT_WAIT(30) - EVT_CASE_DEFAULT - EVT_SET(MV_ResetCamSpeed, EVT_FLOAT(2.0)) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_CALL(N(EnableCameraLeadingPlayer)) - EVT_CALL(ResetCam, CAM_DEFAULT, MV_ResetCamSpeed) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_LOOP(0) - EVT_SET(LVar0, 0) - EVT_SET(LVar4, -1) - EVT_LOOP(5) - EVT_CALL(GetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_IF_GE(LVar2, 0) - EVT_SET(LVar4, 0) - EVT_END_IF - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_IF_NE(LVar4, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(50) - EVT_LABEL(99) - EVT_SET(MF_HitStartBlock, FALSE) - EVT_SET(MF_Block1_Hit, TRUE) - EVT_SET(MF_Block2_Hit, TRUE) - EVT_SET(MF_Block3_Hit, TRUE) - EVT_SET(MF_Block1_Active, FALSE) - EVT_SET(MF_Block2_Active, FALSE) - EVT_SET(MF_Block3_Active, FALSE) - EVT_SET(MF_AnimateSlotLights, FALSE) - EVT_SET(AF_OMO09_Block1_DontBlink, FALSE) - EVT_SET(AF_OMO09_Block2_DontBlink, FALSE) - EVT_SET(AF_OMO09_Block3_DontBlink, FALSE) - EVT_CALL(EnableModel, MODEL_s1, TRUE) - EVT_CALL(EnableModel, MODEL_s2, FALSE) - EVT_EXEC(N(EVS_StartBlock_UpdateBlinking)) - EVT_CALL(EnableModel, MODEL_h1, TRUE) - EVT_CALL(EnableModel, MODEL_h1_a, FALSE) - EVT_CALL(EnableModel, MODEL_h2, TRUE) - EVT_CALL(EnableModel, MODEL_h2_a, FALSE) - EVT_CALL(EnableModel, MODEL_h3, TRUE) - EVT_CALL(EnableModel, MODEL_h3_a, FALSE) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Switch(LVarB) + CaseEq(SYM_SHYGUY) + Switch(LVarA) + CaseEq(SLOT_MATCH_THREE) + ExecWait(N(EVS_SetCam_ViewPayout)) + Thread + Call(SetNpcPos, NPC_ShyGuy_Jackpot1, 485, 130, -50) + Call(SetNpcJumpscale, NPC_ShyGuy_Jackpot1, Float(0.8)) + Call(NpcJump0, NPC_ShyGuy_Jackpot1, 460, 0, 50, 30) + Call(SetNpcFlagBits, NPC_ShyGuy_Jackpot1, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + EndThread + Thread + Call(SetNpcPos, NPC_ShyGuy_Jackpot2, 510, 130, -50) + Call(SetNpcJumpscale, NPC_ShyGuy_Jackpot2, Float(0.8)) + Call(NpcJump0, NPC_ShyGuy_Jackpot2, 497, 0, 50, 30) + Call(SetNpcFlagBits, NPC_ShyGuy_Jackpot2, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + EndThread + Thread + Call(SetNpcPos, NPC_ShyGuy_Jackpot3, 535, 130, -50) + Call(SetNpcJumpscale, NPC_ShyGuy_Jackpot3, Float(0.8)) + Call(NpcJump0, NPC_ShyGuy_Jackpot3, 535, 0, 50, 30) + Call(SetNpcFlagBits, NPC_ShyGuy_Jackpot3, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + EndThread + Thread + Call(SetNpcPos, NPC_ShyGuy_Jackpot4, 560, 130, -50) + Call(SetNpcJumpscale, NPC_ShyGuy_Jackpot4, Float(0.8)) + Call(NpcJump0, NPC_ShyGuy_Jackpot4, 573, 0, 50, 30) + Call(SetNpcFlagBits, NPC_ShyGuy_Jackpot4, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + EndThread + Thread + Call(SetNpcPos, NPC_ShyGuy_Jackpot5, 585, 130, -50) + Call(SetNpcJumpscale, NPC_ShyGuy_Jackpot5, Float(0.8)) + Call(NpcJump0, NPC_ShyGuy_Jackpot5, 610, 0, 50, 30) + Call(SetNpcFlagBits, NPC_ShyGuy_Jackpot5, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + EndThread + Wait(20) + CaseEq(SLOT_MATCH_TWO) + ExecWait(N(EVS_SetCam_ViewPayout)) + Thread + Call(SetNpcPos, NPC_ShyGuy_Jackpot2, 510, 130, -50) + Call(SetNpcJumpscale, NPC_ShyGuy_Jackpot2, Float(0.8)) + Call(NpcJump0, NPC_ShyGuy_Jackpot2, 497, 0, 50, 30) + Call(SetNpcFlagBits, NPC_ShyGuy_Jackpot2, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + EndThread + Thread + Call(SetNpcPos, NPC_ShyGuy_Jackpot4, 560, 130, -50) + Call(SetNpcJumpscale, NPC_ShyGuy_Jackpot4, Float(0.8)) + Call(NpcJump0, NPC_ShyGuy_Jackpot4, 573, 0, 50, 30) + Call(SetNpcFlagBits, NPC_ShyGuy_Jackpot4, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + EndThread + Wait(20) + CaseDefault + Set(MV_ResetCamSpeed, Float(2.0)) + EndSwitch + CaseEq(SYM_COIN) + Switch(LVarA) + CaseEq(SLOT_MATCH_THREE) + ExecWait(N(EVS_SetCam_ViewPayout)) + Thread + Loop(2) + Set(LVar1, 480) + Loop(5) + Add(LVar1, 20) + Call(MakeItemEntity, ITEM_COIN, LVar1, 150, 50, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) + Wait(3) + EndLoop + EndLoop + EndThread + Wait(30) + CaseEq(SLOT_MATCH_TWO) + ExecWait(N(EVS_SetCam_ViewPayout)) + Call(MakeItemEntity, ITEM_COIN, 535, 150, 50, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) + Wait(30) + CaseDefault + Set(MV_ResetCamSpeed, Float(2.0)) + EndSwitch + CaseEq(SYM_STAR) + Switch(LVarA) + CaseEq(SLOT_MATCH_THREE) + ExecWait(N(EVS_SetCam_ViewPayout)) + Thread + Loop(2) + Set(LVar1, 480) + Loop(5) + Add(LVar1, 20) + Call(MakeItemEntity, ITEM_MUSHROOM, LVar1, 150, 50, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) + Wait(3) + EndLoop + EndLoop + EndThread + Wait(30) + CaseEq(SLOT_MATCH_TWO) + ExecWait(N(EVS_SetCam_ViewPayout)) + Call(MakeItemEntity, ITEM_MUSHROOM, 535, 150, 50, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) + Wait(30) + CaseDefault + Set(MV_ResetCamSpeed, Float(2.0)) + EndSwitch + EndSwitch + Call(N(EnableCameraLeadingPlayer)) + Call(ResetCam, CAM_DEFAULT, MV_ResetCamSpeed) + Call(DisablePlayerInput, FALSE) + Loop(0) + Set(LVar0, 0) + Set(LVar4, -1) + Loop(5) + Call(GetNpcPos, LVar0, LVar1, LVar2, LVar3) + IfGe(LVar2, 0) + Set(LVar4, 0) + EndIf + Add(LVar0, 1) + EndLoop + IfNe(LVar4, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Wait(50) + Label(99) + Set(MF_HitStartBlock, FALSE) + Set(MF_Block1_Hit, TRUE) + Set(MF_Block2_Hit, TRUE) + Set(MF_Block3_Hit, TRUE) + Set(MF_Block1_Active, FALSE) + Set(MF_Block2_Active, FALSE) + Set(MF_Block3_Active, FALSE) + Set(MF_AnimateSlotLights, FALSE) + Set(AF_OMO09_Block1_DontBlink, FALSE) + Set(AF_OMO09_Block2_DontBlink, FALSE) + Set(AF_OMO09_Block3_DontBlink, FALSE) + Call(EnableModel, MODEL_s1, TRUE) + Call(EnableModel, MODEL_s2, FALSE) + Exec(N(EVS_StartBlock_UpdateBlinking)) + Call(EnableModel, MODEL_h1, TRUE) + Call(EnableModel, MODEL_h1_a, FALSE) + Call(EnableModel, MODEL_h2, TRUE) + Call(EnableModel, MODEL_h2_a, FALSE) + Call(EnableModel, MODEL_h3, TRUE) + Call(EnableModel, MODEL_h3_a, FALSE) + Goto(0) + Return + End }; s32 N(SlotMachineBlocks)[] = { @@ -813,66 +813,66 @@ API_CALLABLE(N(UpdateSlotMachineBlockShadows)) { } EvtScript N(EVS_SetupSlotMachine) = { - EVT_CALL(ParentColliderToModel, COLLIDER_s1, MODEL_s1) - EVT_CALL(ParentColliderToModel, COLLIDER_h1, MODEL_h1) - EVT_CALL(ParentColliderToModel, COLLIDER_h2, MODEL_h2) - EVT_CALL(ParentColliderToModel, COLLIDER_h3, MODEL_h3) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_HitBlock_SlotStart)), TRIGGER_CEILING_TOUCH, COLLIDER_s1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_HitBlock_SlotWheel1)), TRIGGER_CEILING_TOUCH, COLLIDER_h1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_HitBlock_SlotWheel2)), TRIGGER_CEILING_TOUCH, COLLIDER_h2, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_HitBlock_SlotWheel3)), TRIGGER_CEILING_TOUCH, COLLIDER_h3, 1, 0) - EVT_CALL(RandInt, 7, MV_SlotWheel1_Angle) - EVT_MUL(MV_SlotWheel1_Angle, 45) - EVT_CALL(RotateModel, MODEL_o864, MV_SlotWheel1_Angle, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o865, MV_SlotWheel1_Angle, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o866, MV_SlotWheel1_Angle, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o867, MV_SlotWheel1_Angle, 1, 0, 0) - EVT_CALL(RandInt, 7, MV_SlotWheel2_Angle) - EVT_MUL(MV_SlotWheel2_Angle, 45) - EVT_CALL(RotateModel, MODEL_o868, MV_SlotWheel2_Angle, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o869, MV_SlotWheel2_Angle, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o870, MV_SlotWheel2_Angle, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o871, MV_SlotWheel2_Angle, 1, 0, 0) - EVT_CALL(RandInt, 7, MV_SlotWheel3_Angle) - EVT_MUL(MV_SlotWheel3_Angle, 45) - EVT_CALL(RotateModel, MODEL_o872, MV_SlotWheel3_Angle, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o873, MV_SlotWheel3_Angle, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o874, MV_SlotWheel3_Angle, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o875, MV_SlotWheel3_Angle, 1, 0, 0) - EVT_SET(MF_HitStartBlock, FALSE) - EVT_SET(MF_Block1_Hit, TRUE) - EVT_SET(MF_Block2_Hit, TRUE) - EVT_SET(MF_Block3_Hit, TRUE) - EVT_SET(MF_Block1_Active, FALSE) - EVT_SET(MF_Block2_Active, FALSE) - EVT_SET(MF_Block3_Active, FALSE) - EVT_SET(MF_AnimateSlotLights, FALSE) - EVT_CALL(EnableTexPanning, MODEL_o888, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o876, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o884, TRUE) - EVT_THREAD - EVT_SET(LVar1, 0) - EVT_LOOP(0) - EVT_IF_EQ(MF_AnimateSlotLights, TRUE) - EVT_ADD(LVar1, -1110) - EVT_END_IF - EVT_CALL(SetTexPanOffset, TEX_PANNER_B, TEX_PANNER_MAIN, 0, LVar1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(UpdateSlotMachineBlockShadows)) - EVT_END_THREAD - EVT_CALL(EnableModel, MODEL_s1, TRUE) - EVT_CALL(EnableModel, MODEL_s2, FALSE) - EVT_EXEC(N(EVS_StartBlock_UpdateBlinking)) - EVT_CALL(EnableModel, MODEL_h1, TRUE) - EVT_CALL(EnableModel, MODEL_h1_a, FALSE) - EVT_CALL(EnableModel, MODEL_h2, TRUE) - EVT_CALL(EnableModel, MODEL_h2_a, FALSE) - EVT_CALL(EnableModel, MODEL_h3, TRUE) - EVT_CALL(EnableModel, MODEL_h3_a, FALSE) - EVT_EXEC(N(EVS_SlotMachine_MainUpdate)) - EVT_RETURN - EVT_END + Call(ParentColliderToModel, COLLIDER_s1, MODEL_s1) + Call(ParentColliderToModel, COLLIDER_h1, MODEL_h1) + Call(ParentColliderToModel, COLLIDER_h2, MODEL_h2) + Call(ParentColliderToModel, COLLIDER_h3, MODEL_h3) + BindTrigger(Ref(N(EVS_HitBlock_SlotStart)), TRIGGER_CEILING_TOUCH, COLLIDER_s1, 1, 0) + BindTrigger(Ref(N(EVS_HitBlock_SlotWheel1)), TRIGGER_CEILING_TOUCH, COLLIDER_h1, 1, 0) + BindTrigger(Ref(N(EVS_HitBlock_SlotWheel2)), TRIGGER_CEILING_TOUCH, COLLIDER_h2, 1, 0) + BindTrigger(Ref(N(EVS_HitBlock_SlotWheel3)), TRIGGER_CEILING_TOUCH, COLLIDER_h3, 1, 0) + Call(RandInt, 7, MV_SlotWheel1_Angle) + Mul(MV_SlotWheel1_Angle, 45) + Call(RotateModel, MODEL_o864, MV_SlotWheel1_Angle, 1, 0, 0) + Call(RotateModel, MODEL_o865, MV_SlotWheel1_Angle, 1, 0, 0) + Call(RotateModel, MODEL_o866, MV_SlotWheel1_Angle, 1, 0, 0) + Call(RotateModel, MODEL_o867, MV_SlotWheel1_Angle, 1, 0, 0) + Call(RandInt, 7, MV_SlotWheel2_Angle) + Mul(MV_SlotWheel2_Angle, 45) + Call(RotateModel, MODEL_o868, MV_SlotWheel2_Angle, 1, 0, 0) + Call(RotateModel, MODEL_o869, MV_SlotWheel2_Angle, 1, 0, 0) + Call(RotateModel, MODEL_o870, MV_SlotWheel2_Angle, 1, 0, 0) + Call(RotateModel, MODEL_o871, MV_SlotWheel2_Angle, 1, 0, 0) + Call(RandInt, 7, MV_SlotWheel3_Angle) + Mul(MV_SlotWheel3_Angle, 45) + Call(RotateModel, MODEL_o872, MV_SlotWheel3_Angle, 1, 0, 0) + Call(RotateModel, MODEL_o873, MV_SlotWheel3_Angle, 1, 0, 0) + Call(RotateModel, MODEL_o874, MV_SlotWheel3_Angle, 1, 0, 0) + Call(RotateModel, MODEL_o875, MV_SlotWheel3_Angle, 1, 0, 0) + Set(MF_HitStartBlock, FALSE) + Set(MF_Block1_Hit, TRUE) + Set(MF_Block2_Hit, TRUE) + Set(MF_Block3_Hit, TRUE) + Set(MF_Block1_Active, FALSE) + Set(MF_Block2_Active, FALSE) + Set(MF_Block3_Active, FALSE) + Set(MF_AnimateSlotLights, FALSE) + Call(EnableTexPanning, MODEL_o888, TRUE) + Call(EnableTexPanning, MODEL_o876, TRUE) + Call(EnableTexPanning, MODEL_o884, TRUE) + Thread + Set(LVar1, 0) + Loop(0) + IfEq(MF_AnimateSlotLights, TRUE) + Add(LVar1, -1110) + EndIf + Call(SetTexPanOffset, TEX_PANNER_B, TEX_PANNER_MAIN, 0, LVar1) + Wait(1) + EndLoop + EndThread + Thread + Call(N(UpdateSlotMachineBlockShadows)) + EndThread + Call(EnableModel, MODEL_s1, TRUE) + Call(EnableModel, MODEL_s2, FALSE) + Exec(N(EVS_StartBlock_UpdateBlinking)) + Call(EnableModel, MODEL_h1, TRUE) + Call(EnableModel, MODEL_h1_a, FALSE) + Call(EnableModel, MODEL_h2, TRUE) + Call(EnableModel, MODEL_h2_a, FALSE) + Call(EnableModel, MODEL_h3, TRUE) + Call(EnableModel, MODEL_h3_a, FALSE) + Exec(N(EVS_SlotMachine_MainUpdate)) + Return + End }; diff --git a/src/world/area_omo/omo_09/omo_09_5_gizmos.c b/src/world/area_omo/omo_09/omo_09_5_gizmos.c index 490202b0879..5688d0c3cc7 100644 --- a/src/world/area_omo/omo_09/omo_09_5_gizmos.c +++ b/src/world/area_omo/omo_09/omo_09_5_gizmos.c @@ -1,76 +1,76 @@ #include "omo_09.h" EvtScript N(EVS_Gizmos_Wheels) = { - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, -360, 100, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_ha1, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha2, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha3, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha4, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha5, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(MakeLerp, 0, -360, 100, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_ha1, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha2, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha3, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha4, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha5, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_Gizmos_Shutters) = { - EVT_LABEL(0) - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, 160, 60, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m2_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m2_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m3_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m3_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m4_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m4_2, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(MakeLerp, 160, 0, 60, EASING_COS_IN_OUT) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m2_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m2_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m3_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m3_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m4_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m4_2, LVar0, 0, 1, 0) - EVT_WAIT(2) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Label(0) + Call(MakeLerp, 0, 160, 60, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m2_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m2_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m3_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m3_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m4_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m4_2, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(MakeLerp, 160, 0, 60, EASING_COS_IN_OUT) + Label(2) + Call(UpdateLerp) + Call(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m2_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m2_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m3_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m3_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m4_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m4_2, LVar0, 0, 1, 0) + Wait(2) + IfEq(LVar1, 1) + Goto(2) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_Gizmos_Clocks) = { - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, -360, 100, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_hari1, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_hari2, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(MakeLerp, 0, -360, 100, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_hari1, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_hari2, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Goto(0) + Return + End }; typedef struct MovingBlock { @@ -97,55 +97,55 @@ API_CALLABLE(N(AwaitPlayerNearPlatforms)) { } EvtScript N(EVS_Gizmos_MovingBlocks) = { - EVT_SET_GROUP(EVT_GROUP_EF) - EVT_CALL(N(AwaitPlayerNearPlatforms)) - EVT_WAIT(LVar9) - EVT_CALL(ParentColliderToModel, LVar6, LVar7) - EVT_LOOP(0) - EVT_CALL(MakeLerp, 0, LVar8, LVar8, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, LVar7, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, LVar6) - EVT_CALL(N(AwaitPlayerNearPlatforms)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LOOP(30) - EVT_CALL(N(AwaitPlayerNearPlatforms)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(MakeLerp, LVar8, 0, LVar8, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, LVar7, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, LVar6) - EVT_CALL(N(AwaitPlayerNearPlatforms)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LOOP(30) - EVT_CALL(N(AwaitPlayerNearPlatforms)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_EF) + Call(N(AwaitPlayerNearPlatforms)) + Wait(LVar9) + Call(ParentColliderToModel, LVar6, LVar7) + Loop(0) + Call(MakeLerp, 0, LVar8, LVar8, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, LVar7, 0, LVar0, 0) + Call(UpdateColliderTransform, LVar6) + Call(N(AwaitPlayerNearPlatforms)) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Loop(30) + Call(N(AwaitPlayerNearPlatforms)) + Wait(1) + EndLoop + Call(MakeLerp, LVar8, 0, LVar8, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, LVar7, 0, LVar0, 0) + Call(UpdateColliderTransform, LVar6) + Call(N(AwaitPlayerNearPlatforms)) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Loop(30) + Call(N(AwaitPlayerNearPlatforms)) + Wait(1) + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_SetupGizmos) = { - EVT_EXEC(N(EVS_Gizmos_Wheels)) - EVT_EXEC(N(EVS_Gizmos_Shutters)) - EVT_EXEC(N(EVS_Gizmos_Clocks)) - EVT_USE_BUF(EVT_PTR(N(MovingBlockPlatforms))) - EVT_LOOP(ARRAY_COUNT(N(MovingBlockPlatforms))) - EVT_BUF_READ4(LVar6, LVar7, LVar8, LVar9) - EVT_EXEC(N(EVS_Gizmos_MovingBlocks)) - EVT_END_LOOP - EVT_RETURN - EVT_END + Exec(N(EVS_Gizmos_Wheels)) + Exec(N(EVS_Gizmos_Shutters)) + Exec(N(EVS_Gizmos_Clocks)) + UseBuf(Ref(N(MovingBlockPlatforms))) + Loop(ARRAY_COUNT(N(MovingBlockPlatforms))) + BufRead4(LVar6, LVar7, LVar8, LVar9) + Exec(N(EVS_Gizmos_MovingBlocks)) + EndLoop + Return + End }; diff --git a/src/world/area_omo/omo_09/omo_09_6_entity.c b/src/world/area_omo/omo_09/omo_09_6_entity.c index 8da67d94f6f..85f727182ad 100644 --- a/src/world/area_omo/omo_09/omo_09_6_entity.c +++ b/src/world/area_omo/omo_09/omo_09_6_entity.c @@ -4,40 +4,40 @@ #include "world/common/entity/Chest.inc.c" EvtScript N(EVS_OpenChest_Dictionary) = { - EVT_SET(LVarA, ITEM_DICTIONARY) - EVT_SET(LVarB, ITEM_TYPE_KEY) - EVT_SET(GF_OMO09_Chest_Dictionary, TRUE) - EVT_EXEC_WAIT(N(EVS_Chest_GetItem)) - EVT_SET(GF_MAC00_DictionaryStolen, TRUE) - EVT_RETURN - EVT_END + Set(LVarA, ITEM_DICTIONARY) + Set(LVarB, ITEM_TYPE_KEY) + Set(GF_OMO09_Chest_Dictionary, TRUE) + ExecWait(N(EVS_Chest_GetItem)) + Set(GF_MAC00_DictionaryStolen, TRUE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_COIN, -760, 10, 0, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_CoinA) - EVT_CALL(MakeItemEntity, ITEM_COIN, -700, 10, 0, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_CoinB) - EVT_CALL(MakeItemEntity, ITEM_COIN, -640, 10, 0, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_CoinC) - EVT_CALL(MakeItemEntity, ITEM_COIN, -440, 10, 100, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_CoinD) - EVT_CALL(MakeItemEntity, ITEM_COIN, -380, 10, 100, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_CoinE) - EVT_CALL(MakeItemEntity, ITEM_COIN, -320, 10, 100, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_CoinF) - EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 1800, 25, 0, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_StarPiece) - EVT_CALL(MakeItemEntity, ITEM_COIN, 1775, 25, -50, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_CoinG) - EVT_CALL(MakeItemEntity, ITEM_COIN, 1825, 25, -50, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_CoinH) - EVT_CALL(MakeItemEntity, ITEM_COIN, 1750, 25, 0, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_CoinI) - EVT_CALL(MakeItemEntity, ITEM_COIN, 1850, 25, 0, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_CoinJ) - EVT_CALL(MakeItemEntity, ITEM_COIN, 1775, 25, 50, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_CoinK) - EVT_CALL(MakeItemEntity, ITEM_COIN, 1825, 25, 50, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_CoinL) - EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), 1285, 230, -50, 0, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OMO09_MultiCoinBrick) - EVT_CALL(UseDynamicShadow, TRUE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 1950, 150, -31, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_OMO09_Chest_Dictionary) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenChest_Dictionary))) - EVT_IF_EQ(GF_OMO09_Defeated_MysteryNoteThief, TRUE) - EVT_IF_EQ(GF_OMO09_Item_MysteryNote, FALSE) - EVT_CALL(MakeItemEntity, ITEM_MYSTERY_NOTE, 142, 10, -96, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_MysteryNote) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_COIN, -760, 10, 0, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_CoinA) + Call(MakeItemEntity, ITEM_COIN, -700, 10, 0, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_CoinB) + Call(MakeItemEntity, ITEM_COIN, -640, 10, 0, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_CoinC) + Call(MakeItemEntity, ITEM_COIN, -440, 10, 100, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_CoinD) + Call(MakeItemEntity, ITEM_COIN, -380, 10, 100, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_CoinE) + Call(MakeItemEntity, ITEM_COIN, -320, 10, 100, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_CoinF) + Call(MakeItemEntity, ITEM_STAR_PIECE, 1800, 25, 0, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_StarPiece) + Call(MakeItemEntity, ITEM_COIN, 1775, 25, -50, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_CoinG) + Call(MakeItemEntity, ITEM_COIN, 1825, 25, -50, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_CoinH) + Call(MakeItemEntity, ITEM_COIN, 1750, 25, 0, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_CoinI) + Call(MakeItemEntity, ITEM_COIN, 1850, 25, 0, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_CoinJ) + Call(MakeItemEntity, ITEM_COIN, 1775, 25, 50, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_CoinK) + Call(MakeItemEntity, ITEM_COIN, 1825, 25, 50, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_CoinL) + Call(MakeEntity, Ref(Entity_MulticoinBlock), 1285, 230, -50, 0, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OMO09_MultiCoinBrick) + Call(UseDynamicShadow, TRUE) + Call(MakeEntity, Ref(Entity_Chest), 1950, 150, -31, 0, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_OMO09_Chest_Dictionary) + Call(AssignScript, Ref(N(EVS_OpenChest_Dictionary))) + IfEq(GF_OMO09_Defeated_MysteryNoteThief, TRUE) + IfEq(GF_OMO09_Item_MysteryNote, FALSE) + Call(MakeItemEntity, ITEM_MYSTERY_NOTE, 142, 10, -96, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_OMO09_Item_MysteryNote) + EndIf + EndIf + Return + End }; diff --git a/src/world/area_omo/omo_09/omo_09_7_npc.c b/src/world/area_omo/omo_09/omo_09_7_npc.c index 555fda390fc..6268f49490a 100644 --- a/src/world/area_omo/omo_09/omo_09_7_npc.c +++ b/src/world/area_omo/omo_09/omo_09_7_npc.c @@ -18,9 +18,9 @@ MobileAISettings N(AISettings_ShyGuy_Wander_NoReaction) = { }; EvtScript N(EVS_NpcAI_ShyGuy_Wander_NoReaction) = { - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_ShyGuy_Wander_NoReaction))) - EVT_RETURN - EVT_END + Call(BasicAI_Main, Ref(N(AISettings_ShyGuy_Wander_NoReaction))) + Return + End }; NpcSettings N(NpcSettings_ShyGuy_Wander_NoReaction) = { @@ -43,170 +43,170 @@ NpcSettings N(NpcSettings_ShyGuy_Wander_NoReaction) = { #include "world/common/EnableCameraLeadingPlayer.inc.c" EvtScript N(EVS_ShyGuy_CarryItem) = { - EVT_SET(LVarA, LVar0) // npcID - EVT_SET(LVarB, LVar1) // itemID - EVT_SET(LVarD, LVar2) // item type - EVT_SET(LVarE, LVar3) // pickup flag - EVT_CALL(SetNpcVar, LVarA, 10, 0) - EVT_CALL(GetNpcPos, LVarA, LVar2, LVar3, LVar4) - EVT_ADD(LVar3, 26) - EVT_CALL(MakeItemEntity, LVarB, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVar9, LVar0) - EVT_WAIT(1) - EVT_LABEL(10) - EVT_CALL(GetNpcPos, LVarA, LVar2, LVar3, LVar4) - EVT_ADD(LVar3, 26) - EVT_CALL(SetItemPos, LVar9, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_CALL(GetNpcVar, LVarA, 10, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(RemoveItemEntity, LVar9) - EVT_SWITCH(LVarD) - EVT_CASE_EQ(ITEM_TYPE_CONSUMABLE) - EVT_CALL(MakeItemEntity, LVarB, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS, LVarE) - EVT_CASE_EQ(ITEM_TYPE_KEY) - EVT_CALL(DropItemEntity, LVarB, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, LVarE) - EVT_CASE_EQ(ITEM_TYPE_BADGE) - EVT_CALL(DropItemEntity, LVarB, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_FALL, LVarE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Set(LVarA, LVar0) // npcID + Set(LVarB, LVar1) // itemID + Set(LVarD, LVar2) // item type + Set(LVarE, LVar3) // pickup flag + Call(SetNpcVar, LVarA, 10, 0) + Call(GetNpcPos, LVarA, LVar2, LVar3, LVar4) + Add(LVar3, 26) + Call(MakeItemEntity, LVarB, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVar9, LVar0) + Wait(1) + Label(10) + Call(GetNpcPos, LVarA, LVar2, LVar3, LVar4) + Add(LVar3, 26) + Call(SetItemPos, LVar9, LVar2, LVar3, LVar4) + Wait(1) + Call(GetNpcVar, LVarA, 10, LVar0) + IfEq(LVar0, 0) + Goto(10) + EndIf + Call(RemoveItemEntity, LVar9) + Switch(LVarD) + CaseEq(ITEM_TYPE_CONSUMABLE) + Call(MakeItemEntity, LVarB, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS, LVarE) + CaseEq(ITEM_TYPE_KEY) + Call(DropItemEntity, LVarB, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, LVarE) + CaseEq(ITEM_TYPE_BADGE) + Call(DropItemEntity, LVarB, LVar2, LVar3, LVar4, ITEM_SPAWN_MODE_FALL, LVarE) + EndSwitch + Return + End }; EvtScript N(EVS_NpcDefeat_ShyGuy_Thief) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_SET(GF_OMO09_Defeated_MysteryNoteThief, TRUE) - EVT_CALL(SetSelfVar, 10, 1) - EVT_WAIT(2) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_SET(GF_OMO09_Defeated_MysteryNoteThief, TRUE) - EVT_CALL(SetSelfVar, 10, 1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Set(GF_OMO09_Defeated_MysteryNoteThief, TRUE) + Call(SetSelfVar, 10, 1) + Wait(2) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_FLED) + CaseEq(OUTCOME_ENEMY_FLED) + Set(GF_OMO09_Defeated_MysteryNoteThief, TRUE) + Call(SetSelfVar, 10, 1) + EndSwitch + Return + End }; EvtScript N(EVS_NpcIdle_Pokey) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 1850) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_LT(LVar1, 150) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(DisableCameraLeadingPlayer)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(5.0), LVar0, LVar1, LVar2, 300, EVT_FLOAT(13.0), EVT_FLOAT(-9.5)) - EVT_IF_EQ(GB_OMO_PeachChoice3, 0) - EVT_CALL(SpeakToPlayer, NPC_Pokey, ANIM_Pokey_Idle4, ANIM_Pokey_Idle4, 0, MSG_CH4_003E) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Koopatrol, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_CH4_003F) - EVT_END_IF - EVT_THREAD - EVT_CALL(N(EnableCameraLeadingPlayer)) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_END_THREAD - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, 1850) + Goto(0) + EndIf + IfLt(LVar1, 150) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Call(N(DisableCameraLeadingPlayer)) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(SetCamProperties, CAM_DEFAULT, Float(5.0), LVar0, LVar1, LVar2, 300, Float(13.0), Float(-9.5)) + IfEq(GB_OMO_PeachChoice3, 0) + Call(SpeakToPlayer, NPC_Pokey, ANIM_Pokey_Idle4, ANIM_Pokey_Idle4, 0, MSG_CH4_003E) + Else + Call(SpeakToPlayer, NPC_Koopatrol, ANIM_WorldKoopatrol_Anim08, ANIM_WorldKoopatrol_Anim01, 0, MSG_CH4_003F) + EndIf + Thread + Call(N(EnableCameraLeadingPlayer)) + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + EndThread + Call(DisablePlayerInput, FALSE) + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Return + End }; EvtScript N(EVS_NpcDefeat_Pokey) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_SET(GF_OMO09_Item_SuperSoda, TRUE) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Set(GF_OMO09_Item_SuperSoda, TRUE) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Pokey) = { - EVT_IF_EQ(GB_OMO_PeachChoice3, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Pokey))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Pokey))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_OMO_PeachChoice3, 0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Pokey))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Pokey))) + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Koopatrol) = { - EVT_IF_EQ(GB_OMO_PeachChoice3, 1) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Pokey))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Pokey))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_OMO_PeachChoice3, 1) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Pokey))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Pokey))) + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Kammy) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Kammy))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Kammy))) + Return + End }; EvtScript N(EVS_NpcAI_ShyGuy_Jackpot) = { - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(SetSelfVar, 0, 1) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_ShyGuy_Wander))) - EVT_END_IF - EVT_CASE_EQ(2) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(25) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetSelfVar, 0, LVar0) + Switch(LVar0) + CaseEq(0) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + IfEq(LVar1, 0) + Call(SetSelfVar, 0, 1) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_ShyGuy_Wander))) + EndIf + CaseEq(2) + Call(DisablePlayerInput, TRUE) + Wait(25) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(SetSelfVar, 0, 0) + Call(DisablePlayerInput, FALSE) + EndSwitch + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcDefeat_ShyGuy_Jackpot) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(SetSelfVar, 0, 2) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_ShyGuy_Jackpot))) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(SetSelfVar, 0, 2) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_ShyGuy_Jackpot))) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_ShyGuy_Jackpot) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcAI_ShyGuy_Jackpot))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_ShyGuy_Jackpot))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcAI_ShyGuy_Jackpot))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_ShyGuy_Jackpot))) + Return + End }; NpcData N(NpcData_Pokey) = { @@ -369,18 +369,18 @@ NpcData N(NpcData_Kammy) = { }; EvtScript N(EVS_ShyGuy_Thief) = { - EVT_IF_EQ(GF_OMO09_Defeated_MysteryNoteThief, TRUE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_ShyGuy_Thief))) - EVT_SET(LVar0, NPC_ShyGuy_Thief) - EVT_SET(LVar1, ITEM_MYSTERY_NOTE) - EVT_SET(LVar2, ITEM_TYPE_KEY) - EVT_SET_CONST(LVar3, GF_OMO09_Item_MysteryNote) - EVT_EXEC(N(EVS_ShyGuy_CarryItem)) - EVT_RETURN - EVT_END + IfEq(GF_OMO09_Defeated_MysteryNoteThief, TRUE) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_ShyGuy_Thief))) + Set(LVar0, NPC_ShyGuy_Thief) + Set(LVar1, ITEM_MYSTERY_NOTE) + Set(LVar2, ITEM_TYPE_KEY) + SetConst(LVar3, GF_OMO09_Item_MysteryNote) + Exec(N(EVS_ShyGuy_CarryItem)) + Return + End }; NpcData N(NpcData_ShyGuy_Thief) = { diff --git a/src/world/area_omo/omo_09/omo_09_8_scenes.c b/src/world/area_omo/omo_09/omo_09_8_scenes.c index 1694a83f4f1..dc8f115c066 100644 --- a/src/world/area_omo/omo_09/omo_09_8_scenes.c +++ b/src/world/area_omo/omo_09/omo_09_8_scenes.c @@ -7,112 +7,112 @@ s32 N(HoverOffsets)[] = { }; EvtScript N(EVS_NpcIdle_Kammy) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar6, LVar3, LVar4) - EVT_LOOP(0) - EVT_USE_BUF(EVT_PTR(N(HoverOffsets))) - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) - EVT_CALL(GetSelfVar, 0, LVar5) - EVT_IF_EQ(LVar5, 0) - EVT_WAIT(1) - EVT_ELSE - EVT_BUF_READ1(LVar1) - EVT_ADD(LVar3, LVar1) - EVT_CALL(SetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) - EVT_WAIT(3) - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Call(GetNpcPos, NPC_SELF, LVar6, LVar3, LVar4) + Loop(0) + UseBuf(Ref(N(HoverOffsets))) + Loop(10) + Call(GetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) + Call(GetSelfVar, 0, LVar5) + IfEq(LVar5, 0) + Wait(1) + Else + BufRead1(LVar1) + Add(LVar3, LVar1) + Call(SetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) + Wait(3) + EndIf + EndLoop + EndLoop + Return + End }; #define KAMMY_NPC NPC_Kammy #include "world/common/util/GetKammyBroomEmitterPos.inc.c" EvtScript N(EVS_NpcAux_Kammy) = { - EVT_CALL(GetNpcPos, NPC_Kammy, LVar6, LVar7, LVar8) - EVT_LOOP(0) - EVT_CALL(N(GetKammyBroomEmitterPos)) - EVT_CALL(GetNpcPos, NPC_Kammy, LVar9, LVarA, LVarB) - EVT_SET(LVar3, LVar9) - EVT_SET(LVar4, LVarA) - EVT_SET(LVar5, LVarB) - EVT_SUBF(LVar3, LVar6) - EVT_SUBF(LVar4, LVar7) - EVT_SUBF(LVar5, LVar8) - EVT_SETF(LVar6, LVar9) - EVT_SETF(LVar7, LVarA) - EVT_SETF(LVar8, LVarB) - EVT_IF_NE(LVar3, 0) - EVT_IF_NE(LVar5, 0) - EVT_PLAY_EFFECT(EFFECT_PURPLE_RING, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_END_IF - EVT_WAIT(3) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_Kammy, LVar6, LVar7, LVar8) + Loop(0) + Call(N(GetKammyBroomEmitterPos)) + Call(GetNpcPos, NPC_Kammy, LVar9, LVarA, LVarB) + Set(LVar3, LVar9) + Set(LVar4, LVarA) + Set(LVar5, LVarB) + SubF(LVar3, LVar6) + SubF(LVar4, LVar7) + SubF(LVar5, LVar8) + SetF(LVar6, LVar9) + SetF(LVar7, LVarA) + SetF(LVar8, LVarB) + IfNe(LVar3, 0) + IfNe(LVar5, 0) + PlayEffect(EFFECT_PURPLE_RING, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.0)) + EndIf + EndIf + Wait(3) + EndLoop + Return + End }; EvtScript N(EVS_Scene_KammySetAmbush) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(GF_OMO09_SpawnedPeachChoice3, TRUE) - EVT_SET(AB_OMO_CurrentPeachChoice, GB_OMO_PeachChoice3) - EVT_SWITCH(AB_OMO_CurrentPeachChoice) - EVT_CASE_EQ(0) - EVT_SET(MV_AmbushID, NPC_Pokey) - EVT_CASE_EQ(1) - EVT_SET(MV_AmbushID, NPC_Koopatrol) - EVT_CASE_EQ(2) - EVT_SET(MV_AmbushID, ITEM_SUPER_SODA) - EVT_END_SWITCH - EVT_CALL(SetNpcPos, NPC_Kammy, 1820, 165, 0) - EVT_CALL(SetNpcYaw, NPC_Kammy, 90) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim13) - EVT_IF_NE(AB_OMO_CurrentPeachChoice, 2) - EVT_CALL(SetNpcPos, MV_AmbushID, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 1900, 150, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 1900, 150, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(5 * DT) - EVT_CALL(SetNpcVar, NPC_Kammy, 0, 1) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim13) - EVT_WAIT(25 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0E) - EVT_CALL(GetNpcPos, NPC_Kammy, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 25) - EVT_ADD(LVar1, 38) - EVT_CALL(PlaySoundAt, SOUND_KAMMY_SUMMON_MAGIC, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.0), 75) - EVT_WAIT(75 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0F) - EVT_ADD(LVar0, 55) - EVT_CALL(PlaySoundAt, SOUND_VANISH_IN_SMOKE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, 150, 0, 1, 15, 3, 8) - EVT_WAIT(5 * DT) - EVT_IF_NE(AB_OMO_CurrentPeachChoice, 2) - EVT_CALL(SetNpcPos, MV_AmbushID, LVar0, 150, 0) - EVT_ELSE - EVT_CALL(MakeItemEntity, MV_AmbushID, LVar0, 150, 0, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_END_IF - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim13) - EVT_CALL(SetNpcVar, NPC_Kammy, 0, 0) - EVT_WAIT(5 * DT) - EVT_IF_NE(AB_OMO_CurrentPeachChoice, 2) - EVT_CALL(PlaySoundAtNpc, MV_AmbushID, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, MV_AmbushID, EMOTE_QUESTION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(5 * DT) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("omo_09"), omo_09_ENTRY_0) - EVT_WAIT(100 * DT) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Set(GF_OMO09_SpawnedPeachChoice3, TRUE) + Set(AB_OMO_CurrentPeachChoice, GB_OMO_PeachChoice3) + Switch(AB_OMO_CurrentPeachChoice) + CaseEq(0) + Set(MV_AmbushID, NPC_Pokey) + CaseEq(1) + Set(MV_AmbushID, NPC_Koopatrol) + CaseEq(2) + Set(MV_AmbushID, ITEM_SUPER_SODA) + EndSwitch + Call(SetNpcPos, NPC_Kammy, 1820, 165, 0) + Call(SetNpcYaw, NPC_Kammy, 90) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim13) + IfNe(AB_OMO_CurrentPeachChoice, 2) + Call(SetNpcPos, MV_AmbushID, NPC_DISPOSE_LOCATION) + EndIf + Call(UseSettingsFrom, CAM_DEFAULT, 1900, 150, 0) + Call(SetPanTarget, CAM_DEFAULT, 1900, 150, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(350.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-7.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(5 * DT) + Call(SetNpcVar, NPC_Kammy, 0, 1) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim13) + Wait(25 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0E) + Call(GetNpcPos, NPC_Kammy, LVar0, LVar1, LVar2) + Add(LVar0, 25) + Add(LVar1, 38) + Call(PlaySoundAt, SOUND_KAMMY_SUMMON_MAGIC, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_GATHER_ENERGY_PINK, 0, LVar0, LVar1, LVar2, Float(1.0), 75) + Wait(75 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim0F) + Add(LVar0, 55) + Call(PlaySoundAt, SOUND_VANISH_IN_SMOKE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, 150, 0, 1, 15, 3, 8) + Wait(5 * DT) + IfNe(AB_OMO_CurrentPeachChoice, 2) + Call(SetNpcPos, MV_AmbushID, LVar0, 150, 0) + Else + Call(MakeItemEntity, MV_AmbushID, LVar0, 150, 0, ITEM_SPAWN_MODE_DECORATION, 0) + EndIf + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim13) + Call(SetNpcVar, NPC_Kammy, 0, 0) + Wait(5 * DT) + IfNe(AB_OMO_CurrentPeachChoice, 2) + Call(PlaySoundAtNpc, MV_AmbushID, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) + Call(ShowEmote, MV_AmbushID, EMOTE_QUESTION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) + Wait(5 * DT) + EndIf + Call(GotoMap, Ref("omo_09"), omo_09_ENTRY_0) + Wait(100 * DT) + Return + End }; diff --git a/src/world/area_omo/omo_10/omo_10_1_music.c b/src/world/area_omo/omo_10/omo_10_1_music.c index 11f32100f91..349e1fd750d 100644 --- a/src/world/area_omo/omo_10/omo_10_1_music.c +++ b/src/world/area_omo/omo_10/omo_10_1_music.c @@ -1,18 +1,18 @@ #include "omo_10.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) - EVT_ELSE - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_RANGE(omo_10_ENTRY_0, omo_10_ENTRY_1) - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_TOYBOX_TRAIN, 0, 8) - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Call(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) + Else + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseRange(omo_10_ENTRY_0, omo_10_ENTRY_1) + Call(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_TOYBOX_TRAIN, 0, 8) + EndSwitch + EndIf + Return + End }; diff --git a/src/world/area_omo/omo_10/omo_10_2_main.c b/src/world/area_omo/omo_10/omo_10_2_main.c index c53e886b26e..30c45eace34 100644 --- a/src/world/area_omo/omo_10/omo_10_2_main.c +++ b/src/world/area_omo/omo_10/omo_10_2_main.c @@ -4,57 +4,57 @@ EvtScript N(EVS_ExitWalk_omo_11_1) = EVT_EXIT_WALK(60, omo_10_ENTRY_0, "omo_11", EvtScript N(EVS_ExitWalk_omo_02_0) = EVT_EXIT_WALK(60, omo_10_ENTRY_1, "omo_02", omo_02_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_11_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili4, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_02_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_omo_11_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili4, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_omo_02_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_RANGE(omo_10_ENTRY_0, omo_10_ENTRY_1) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_CASE_DEFAULT - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_WAIT(3) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseRange(omo_10_ENTRY_0, omo_10_ENTRY_1) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + CaseDefault + Exec(N(EVS_BindExitTriggers)) + Wait(3) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() + Set(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() #if VERSION_PAL - EVT_CALL(GetLanguage, LVar0) - EVT_SWITCH(LVar0) - EVT_IF_GE(LVar0, LANGUAGE_FR) // or LANGUAGE_ES - EVT_SUB(LVar0, LANGUAGE_FR - LANGUAGE_EN) - EVT_END_IF - EVT_CALL(SetModelTexVariant, MODEL_s, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_a, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_t, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_i, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_o, LVar0) - EVT_CALL(SetModelTexVariant, MODEL_n, LVar0) + Call(GetLanguage, LVar0) + Switch(LVar0) + IfGe(LVar0, LANGUAGE_FR) // or LANGUAGE_ES + Sub(LVar0, LANGUAGE_FR - LANGUAGE_EN) + EndIf + Call(SetModelTexVariant, MODEL_s, LVar0) + Call(SetModelTexVariant, MODEL_a, LVar0) + Call(SetModelTexVariant, MODEL_t, LVar0) + Call(SetModelTexVariant, MODEL_i, LVar0) + Call(SetModelTexVariant, MODEL_o, LVar0) + Call(SetModelTexVariant, MODEL_n, LVar0) #endif - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupGizmos)) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_EXEC_WAIT(N(EVS_SetupTrain)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupGizmos)) + ExecWait(N(EVS_SetupMusic)) + ExecWait(N(EVS_SetupTrain)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_omo/omo_10/omo_10_3_gizmos.c b/src/world/area_omo/omo_10/omo_10_3_gizmos.c index 206cbd1c361..d057859f363 100644 --- a/src/world/area_omo/omo_10/omo_10_3_gizmos.c +++ b/src/world/area_omo/omo_10/omo_10_3_gizmos.c @@ -1,73 +1,73 @@ #include "omo_10.h" EvtScript N(EVS_Gizmos_Wheels) = { - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, -360, 100, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_ha1, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha2, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha3, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha4, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha5, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(MakeLerp, 0, -360, 100, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_ha1, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha2, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha3, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha4, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha5, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_Gizmos_Shutters) = { - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, 160, 60, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m2_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m2_2, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(MakeLerp, 160, 0, 60, EASING_COS_IN_OUT) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_m2_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m2_2, LVar0, 0, 1, 0) - EVT_WAIT(2) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(MakeLerp, 0, 160, 60, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m2_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m2_2, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(MakeLerp, 160, 0, 60, EASING_COS_IN_OUT) + Label(2) + Call(UpdateLerp) + Call(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_m2_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m2_2, LVar0, 0, 1, 0) + Wait(2) + IfEq(LVar1, 1) + Goto(2) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_Gizmos_Clocks) = { - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, -360, 100, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_hari1, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_hari2, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(MakeLerp, 0, -360, 100, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_hari1, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_hari2, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_SetupGizmos) = { - EVT_EXEC(N(EVS_Gizmos_Wheels)) - EVT_EXEC(N(EVS_Gizmos_Shutters)) - EVT_EXEC(N(EVS_Gizmos_Clocks)) - EVT_RETURN - EVT_END + Exec(N(EVS_Gizmos_Wheels)) + Exec(N(EVS_Gizmos_Shutters)) + Exec(N(EVS_Gizmos_Clocks)) + Return + End }; diff --git a/src/world/area_omo/omo_10/omo_10_4_train.c b/src/world/area_omo/omo_10/omo_10_4_train.c index 6a9656c1bd7..47b61a4983a 100644 --- a/src/world/area_omo/omo_10/omo_10_4_train.c +++ b/src/world/area_omo/omo_10/omo_10_4_train.c @@ -8,213 +8,213 @@ Vec2i N(D_80243AC0_DDB470) = { }; s32 N(D_80243AC8_DDB478)[] = { - EVT_FLOAT(-2.266), EVT_FLOAT(-209.494), EVT_FLOAT(90.0), - EVT_FLOAT(124.202), EVT_FLOAT(-209.494), EVT_FLOAT(262.5), - EVT_FLOAT(-245.336), EVT_FLOAT(479.165), EVT_FLOAT(-503.546), + Float(-2.266), Float(-209.494), Float(90.0), + Float(124.202), Float(-209.494), Float(262.5), + Float(-245.336), Float(479.165), Float(-503.546), -1, -1, -1 }; EvtScript N(D_80243AF8_DDB4A8) = { - EVT_CALL(FadeOutMusic, 0, 3000) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_WAIT(10) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_EXEC(N(EVS_TrainUnk_C)) - EVT_SET(AB_OMO_5, 3) - EVT_SET(LVar0, EVT_PTR(N(D_80243AC8_DDB478))) - EVT_EXEC_WAIT(N(EVS_TrainUnk_D)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o961, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_80243AC8_DDB478))) - EVT_SET(MV_TrainUnk_02, 1) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_LABEL(10) - EVT_IF_LT(MV_TrainPos, 350) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("omo_16"), omo_16_ENTRY_0) - EVT_SET(GB_OMO_TrainDestination, 3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(FadeOutMusic, 0, 3000) + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Wait(10) + Call(DisablePlayerPhysics, TRUE) + Exec(N(EVS_TrainUnk_C)) + Set(AB_OMO_5, 3) + Set(LVar0, Ref(N(D_80243AC8_DDB478))) + ExecWait(N(EVS_TrainUnk_D)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o961, COLLIDER_FLAGS_UPPER_MASK) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_80243AC8_DDB478))) + Set(MV_TrainUnk_02, 1) + Set(MF_TrainUnk_00, TRUE) + Label(10) + IfLt(MV_TrainPos, 350) + Wait(1) + Goto(10) + EndIf + Call(GotoMap, Ref("omo_16"), omo_16_ENTRY_0) + Set(GB_OMO_TrainDestination, 3) + Wait(100) + Return + End }; s32 N(D_80243C68_DDB618)[] = { - EVT_FLOAT(-2.266), EVT_FLOAT(-209.494), EVT_FLOAT(270.0), - EVT_FLOAT(-128.733), EVT_FLOAT(-209.494), EVT_FLOAT(-262.5), - EVT_FLOAT(-245.336), EVT_FLOAT(-353.418), EVT_FLOAT(-353.688), - EVT_FLOAT(-479.165), EVT_FLOAT(-503.546), + Float(-2.266), Float(-209.494), Float(270.0), + Float(-128.733), Float(-209.494), Float(-262.5), + Float(-245.336), Float(-353.418), Float(-353.688), + Float(-479.165), Float(-503.546), -1, -1, -1 }; EvtScript N(D_80243CA0_DDB650) = { - EVT_CALL(FadeOutMusic, 0, 3000) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_WAIT(10) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_EXEC(N(EVS_TrainUnk_C)) - EVT_SET(AB_OMO_5, 3) - EVT_SET(LVar0, EVT_PTR(N(D_80243C68_DDB618))) - EVT_EXEC_WAIT(N(EVS_TrainUnk_D)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o961, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_80243C68_DDB618))) - EVT_SET(MV_TrainUnk_02, 1) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_LABEL(10) - EVT_IF_GT(MV_TrainPos, -350) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("omo_16"), omo_16_ENTRY_1) - EVT_SET(GB_OMO_TrainDestination, 2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(FadeOutMusic, 0, 3000) + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Wait(10) + Call(DisablePlayerPhysics, TRUE) + Exec(N(EVS_TrainUnk_C)) + Set(AB_OMO_5, 3) + Set(LVar0, Ref(N(D_80243C68_DDB618))) + ExecWait(N(EVS_TrainUnk_D)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o961, COLLIDER_FLAGS_UPPER_MASK) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_80243C68_DDB618))) + Set(MV_TrainUnk_02, 1) + Set(MF_TrainUnk_00, TRUE) + Label(10) + IfGt(MV_TrainPos, -350) + Wait(1) + Goto(10) + EndIf + Call(GotoMap, Ref("omo_16"), omo_16_ENTRY_1) + Set(GB_OMO_TrainDestination, 2) + Wait(100) + Return + End }; s32 N(D_80243E10_DDB7C0)[] = { - EVT_FLOAT(414.885), EVT_FLOAT(-426.942), EVT_FLOAT(219.92), - EVT_FLOAT(353.553), EVT_FLOAT(-353.553), EVT_FLOAT(262.5), - EVT_FLOAT(-245.336), EVT_FLOAT(124.202), EVT_FLOAT(-209.494), - EVT_FLOAT(-42.27), EVT_FLOAT(-209.49), + Float(414.885), Float(-426.942), Float(219.92), + Float(353.553), Float(-353.553), Float(262.5), + Float(-245.336), Float(124.202), Float(-209.494), + Float(-42.27), Float(-209.49), -1, -1, -1 }; s32 N(D_80243E48_DDB7F8)[] = { - EVT_FLOAT(414.885), EVT_FLOAT(-426.942), EVT_FLOAT(219.92), - EVT_FLOAT(353.553), EVT_FLOAT(-353.553), EVT_FLOAT(262.5), - EVT_FLOAT(-245.336), EVT_FLOAT(124.202), EVT_FLOAT(-209.494), - EVT_FLOAT(-128.733), EVT_FLOAT(-209.494), EVT_FLOAT(-262.5), - EVT_FLOAT(-245.336), EVT_FLOAT(-353.418), EVT_FLOAT(-353.688), - EVT_FLOAT(-479.165), EVT_FLOAT(-503.546), + Float(414.885), Float(-426.942), Float(219.92), + Float(353.553), Float(-353.553), Float(262.5), + Float(-245.336), Float(124.202), Float(-209.494), + Float(-128.733), Float(-209.494), Float(-262.5), + Float(-245.336), Float(-353.418), Float(-353.688), + Float(-479.165), Float(-503.546), -1, -1, -1 }; EvtScript N(D_80243E98_DDB848) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o961, COLLIDER_FLAGS_UPPER_MASK) - EVT_IF_EQ(AB_OMO_6, 3) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_80243E10_DDB7C0))) - EVT_SET(MV_TrainUnk_02, 2) - EVT_EXEC(N(EVS_Scene_RideTrain)) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_WAIT(1) - EVT_EXEC_GET_TID(N(EVS_TrainUnk_A), LVarB) - EVT_LABEL(10) - EVT_IF_EQ(MF_TrainUnk_00, TRUE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_WAIT(20) - EVT_KILL_THREAD(LVarB) - EVT_EXEC(N(EVS_TrainUnk_B)) - EVT_CALL(N(EnableCameraFollowPlayerY)) - EVT_SET(LVar9, EVT_PTR(N(D_80243AC0_DDB470))) - EVT_EXEC_WAIT(N(EVS_TrainUnk_E)) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0011) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o961, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ELSE - EVT_EXEC(N(EVS_TrainUnk_A)) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_80243E48_DDB7F8))) - EVT_SET(MV_TrainUnk_02, 0) - EVT_EXEC(N(EVS_Scene_RideTrain)) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_WAIT(1) - EVT_EXEC(N(EVS_TrainUnk_H)) - EVT_LABEL(20) - EVT_IF_GT(MV_TrainPos, -350) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("omo_16"), omo_16_ENTRY_1) - EVT_SET(GB_OMO_TrainDestination, 2) - EVT_WAIT(100) - EVT_END_IF - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(DisablePartnerAI, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o961, COLLIDER_FLAGS_UPPER_MASK) + IfEq(AB_OMO_6, 3) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_80243E10_DDB7C0))) + Set(MV_TrainUnk_02, 2) + Exec(N(EVS_Scene_RideTrain)) + Set(MF_TrainUnk_00, TRUE) + Wait(1) + ExecGetTID(N(EVS_TrainUnk_A), LVarB) + Label(10) + IfEq(MF_TrainUnk_00, TRUE) + Wait(1) + Goto(10) + EndIf + Wait(20) + KillThread(LVarB) + Exec(N(EVS_TrainUnk_B)) + Call(N(EnableCameraFollowPlayerY)) + Set(LVar9, Ref(N(D_80243AC0_DDB470))) + ExecWait(N(EVS_TrainUnk_E)) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0011) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o961, COLLIDER_FLAGS_UPPER_MASK) + Call(DisablePlayerPhysics, FALSE) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Else + Exec(N(EVS_TrainUnk_A)) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_80243E48_DDB7F8))) + Set(MV_TrainUnk_02, 0) + Exec(N(EVS_Scene_RideTrain)) + Set(MF_TrainUnk_00, TRUE) + Wait(1) + Exec(N(EVS_TrainUnk_H)) + Label(20) + IfGt(MV_TrainPos, -350) + Wait(1) + Goto(20) + EndIf + Call(GotoMap, Ref("omo_16"), omo_16_ENTRY_1) + Set(GB_OMO_TrainDestination, 2) + Wait(100) + EndIf + Return + End }; s32 N(D_80244150_DDBB00)[] = { - EVT_FLOAT(-414.885), EVT_FLOAT(-426.942), EVT_FLOAT(140.075), - EVT_FLOAT(-353.418), EVT_FLOAT(-353.688), EVT_FLOAT(-262.5), - EVT_FLOAT(-245.336), EVT_FLOAT(-128.733), EVT_FLOAT(-209.494), - EVT_FLOAT(37.73), EVT_FLOAT(-209.49), + Float(-414.885), Float(-426.942), Float(140.075), + Float(-353.418), Float(-353.688), Float(-262.5), + Float(-245.336), Float(-128.733), Float(-209.494), + Float(37.73), Float(-209.49), -1, -1, -1 }; s32 N(D_80244188_DDBB38)[] = { - EVT_FLOAT(-414.885), EVT_FLOAT(-426.942), EVT_FLOAT(140.075), - EVT_FLOAT(-353.418), EVT_FLOAT(-353.688), EVT_FLOAT(-262.5), - EVT_FLOAT(-245.336), EVT_FLOAT(-128.733), EVT_FLOAT(-209.494), - EVT_FLOAT(124.202), EVT_FLOAT(-209.494), EVT_FLOAT(262.5), - EVT_FLOAT(-245.336), EVT_FLOAT(479.165), EVT_FLOAT(-503.546), + Float(-414.885), Float(-426.942), Float(140.075), + Float(-353.418), Float(-353.688), Float(-262.5), + Float(-245.336), Float(-128.733), Float(-209.494), + Float(124.202), Float(-209.494), Float(262.5), + Float(-245.336), Float(479.165), Float(-503.546), -1, -1, -1 }; EvtScript N(D_802441D0_DDBB80) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o961, COLLIDER_FLAGS_UPPER_MASK) - EVT_IF_EQ(AB_OMO_6, 3) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_80244150_DDBB00))) - EVT_SET(MV_TrainUnk_02, 2) - EVT_EXEC(N(EVS_Scene_RideTrain)) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_WAIT(1) - EVT_EXEC_GET_TID(N(EVS_TrainUnk_A), LVarB) - EVT_LABEL(10) - EVT_IF_EQ(MF_TrainUnk_00, TRUE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_WAIT(20) - EVT_KILL_THREAD(LVarB) - EVT_EXEC(N(EVS_TrainUnk_B)) - EVT_CALL(N(EnableCameraFollowPlayerY)) - EVT_SET(LVar9, EVT_PTR(N(D_80243AC0_DDB470))) - EVT_EXEC_WAIT(N(EVS_TrainUnk_E)) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0011) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o961, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ELSE - EVT_EXEC(N(EVS_TrainUnk_A)) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_80244188_DDBB38))) - EVT_SET(MV_TrainUnk_02, 0) - EVT_EXEC(N(EVS_Scene_RideTrain)) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_WAIT(1) - EVT_EXEC(N(EVS_TrainUnk_H)) - EVT_LABEL(20) - EVT_IF_LT(MV_TrainPos, 350) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("omo_16"), omo_16_ENTRY_0) - EVT_SET(GB_OMO_TrainDestination, 3) - EVT_WAIT(100) - EVT_END_IF - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(DisablePartnerAI, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o961, COLLIDER_FLAGS_UPPER_MASK) + IfEq(AB_OMO_6, 3) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_80244150_DDBB00))) + Set(MV_TrainUnk_02, 2) + Exec(N(EVS_Scene_RideTrain)) + Set(MF_TrainUnk_00, TRUE) + Wait(1) + ExecGetTID(N(EVS_TrainUnk_A), LVarB) + Label(10) + IfEq(MF_TrainUnk_00, TRUE) + Wait(1) + Goto(10) + EndIf + Wait(20) + KillThread(LVarB) + Exec(N(EVS_TrainUnk_B)) + Call(N(EnableCameraFollowPlayerY)) + Set(LVar9, Ref(N(D_80243AC0_DDB470))) + ExecWait(N(EVS_TrainUnk_E)) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0011) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o961, COLLIDER_FLAGS_UPPER_MASK) + Call(DisablePlayerPhysics, FALSE) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Else + Exec(N(EVS_TrainUnk_A)) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_80244188_DDBB38))) + Set(MV_TrainUnk_02, 0) + Exec(N(EVS_Scene_RideTrain)) + Set(MF_TrainUnk_00, TRUE) + Wait(1) + Exec(N(EVS_TrainUnk_H)) + Label(20) + IfLt(MV_TrainPos, 350) + Wait(1) + Goto(20) + EndIf + Call(GotoMap, Ref("omo_16"), omo_16_ENTRY_0) + Set(GB_OMO_TrainDestination, 3) + Wait(100) + EndIf + Return + End }; s32 N(D_80244488_DDBE38)[] = { @@ -226,74 +226,74 @@ s32 N(D_80244494_DDBE44)[] = { }; EvtScript N(D_802444A0_DDBE50) = { - EVT_IF_EQ(MF_EitherSwitchPressed, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0006) - EVT_ELSE - EVT_IF_EQ(AF_OMO_UsingRightSwitch, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0007) - EVT_CALL(ShowChoice, MSG_Choice_0043) - EVT_IF_NE(LVar0, 3) - EVT_CALL(CloseMessage) - EVT_USE_BUF(EVT_PTR(N(D_80244488_DDBE38))) - EVT_ADD(LVar0, 1) - EVT_LOOP(LVar0) - EVT_BUF_READ1(LVar1) - EVT_END_LOOP - EVT_SET(AB_OMO_6, LVar1) - EVT_EXEC_WAIT(N(D_80243CA0_DDB650)) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0008) - EVT_END_IF - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0007) - EVT_CALL(ShowChoice, MSG_Choice_0042) - EVT_IF_NE(LVar0, 3) - EVT_CALL(CloseMessage) - EVT_USE_BUF(EVT_PTR(N(D_80244494_DDBE44))) - EVT_ADD(LVar0, 1) - EVT_LOOP(LVar0) - EVT_BUF_READ1(LVar1) - EVT_END_LOOP - EVT_SET(AB_OMO_6, LVar1) - EVT_EXEC_WAIT(N(D_80243AF8_DDB4A8)) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0008) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MF_EitherSwitchPressed, FALSE) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0006) + Else + IfEq(AF_OMO_UsingRightSwitch, FALSE) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0007) + Call(ShowChoice, MSG_Choice_0043) + IfNe(LVar0, 3) + Call(CloseMessage) + UseBuf(Ref(N(D_80244488_DDBE38))) + Add(LVar0, 1) + Loop(LVar0) + BufRead1(LVar1) + EndLoop + Set(AB_OMO_6, LVar1) + ExecWait(N(D_80243CA0_DDB650)) + Else + Call(ContinueSpeech, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0008) + EndIf + Else + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0007) + Call(ShowChoice, MSG_Choice_0042) + IfNe(LVar0, 3) + Call(CloseMessage) + UseBuf(Ref(N(D_80244494_DDBE44))) + Add(LVar0, 1) + Loop(LVar0) + BufRead1(LVar1) + EndLoop + Set(AB_OMO_6, LVar1) + ExecWait(N(D_80243AF8_DDB4A8)) + Else + Call(ContinueSpeech, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 0, MSG_CH4_0008) + EndIf + EndIf + EndIf + Return + End }; s32 N(D_802446B8_DDC068)[] = { - EVT_FLOAT(-2.266), EVT_FLOAT(-209.494), EVT_FLOAT(90.0), + Float(-2.266), Float(-209.494), Float(90.0), -1, -1, -1 }; EvtScript N(EVS_SetupTrain) = { - EVT_EXEC_WAIT(N(EVS_SetupSwitches)) - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_802446B8_DDC068))) - EVT_SET(MV_TrainUnk_02, 0) - EVT_EXEC(N(EVS_Scene_RideTrain)) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_ELSE - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(omo_10_ENTRY_2) - EVT_EXEC(N(D_802441D0_DDBB80)) - EVT_CASE_EQ(omo_10_ENTRY_3) - EVT_EXEC(N(D_80243E98_DDB848)) - EVT_CASE_DEFAULT - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_802446B8_DDC068))) - EVT_SET(MV_TrainUnk_02, 0) - EVT_EXEC(N(EVS_Scene_RideTrain)) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END + ExecWait(N(EVS_SetupSwitches)) + Call(GetLoadType, LVar1) + IfEq(LVar1, 1) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_802446B8_DDC068))) + Set(MV_TrainUnk_02, 0) + Exec(N(EVS_Scene_RideTrain)) + Set(MF_TrainUnk_00, TRUE) + Else + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(omo_10_ENTRY_2) + Exec(N(D_802441D0_DDBB80)) + CaseEq(omo_10_ENTRY_3) + Exec(N(D_80243E98_DDB848)) + CaseDefault + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_802446B8_DDC068))) + Set(MV_TrainUnk_02, 0) + Exec(N(EVS_Scene_RideTrain)) + Set(MF_TrainUnk_00, TRUE) + EndSwitch + EndIf + Return + End }; diff --git a/src/world/area_omo/omo_10/omo_10_5_npc.c b/src/world/area_omo/omo_10/omo_10_5_npc.c index 47427b7c715..e2582544332 100644 --- a/src/world/area_omo/omo_10/omo_10_5_npc.c +++ b/src/world/area_omo/omo_10/omo_10_5_npc.c @@ -3,36 +3,36 @@ #include "world/common/npc/TrainToad.inc.c" EvtScript N(EVS_NpcInteract_Conductor) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC_WAIT(N(D_802444A0_DDBE50)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + ExecWait(N(D_802444A0_DDBE50)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Conductor) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Conductor))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Conductor))) + Return + End }; EvtScript N(EVS_NpcInteract_TrainToad) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH4_WATT_JOINED_PARTY) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Red_Talk, ANIM_TrainToad_Red_Idle, 0, MSG_CH4_0031) - EVT_CASE_LT(STORY_CH4_DEFEATED_GENERAL_GUY) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Red_Talk, ANIM_TrainToad_Red_Idle, 0, MSG_CH4_0032) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Red_Talk, ANIM_TrainToad_Red_Idle, 0, MSG_CH4_0033) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH4_WATT_JOINED_PARTY) + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Red_Talk, ANIM_TrainToad_Red_Idle, 0, MSG_CH4_0031) + CaseLt(STORY_CH4_DEFEATED_GENERAL_GUY) + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Red_Talk, ANIM_TrainToad_Red_Idle, 0, MSG_CH4_0032) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_TrainToad_Red_Talk, ANIM_TrainToad_Red_Idle, 0, MSG_CH4_0033) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_TrainToad) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_TrainToad))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_TrainToad))) + Return + End }; NpcData N(NpcData_Toads)[] = { diff --git a/src/world/area_omo/omo_10/omo_10_6_entity.c b/src/world/area_omo/omo_10/omo_10_6_entity.c index 53f5b769e5a..eb08dd0aaae 100644 --- a/src/world/area_omo/omo_10/omo_10_6_entity.c +++ b/src/world/area_omo/omo_10/omo_10_6_entity.c @@ -2,12 +2,12 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), -350, 60, 60, 0, ITEM_SUPER_SHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OMO10_HiddenItem_SuperShroom) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), 250, 60, 55, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 150, 60, 55, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 0, 0, 200, 0, MODEL_soto, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_OMO10_HiddenPanel) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), -350, 60, 60, 0, ITEM_SUPER_SHROOM, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OMO10_HiddenItem_SuperShroom) + Call(MakeEntity, Ref(Entity_HeartBlock), 250, 60, 55, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_SavePoint), 150, 60, 55, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HiddenPanel), 0, 0, 200, 0, MODEL_soto, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_OMO10_HiddenPanel) + Return + End }; diff --git a/src/world/area_omo/omo_11/omo_11_1_music.c b/src/world/area_omo/omo_11/omo_11_1_music.c index a88f827f4ac..785017d844b 100644 --- a/src/world/area_omo/omo_11/omo_11_1_music.c +++ b/src/world/area_omo/omo_11/omo_11_1_music.c @@ -1,7 +1,7 @@ #include "omo_11.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) + Return + End }; diff --git a/src/world/area_omo/omo_11/omo_11_2_main.c b/src/world/area_omo/omo_11/omo_11_2_main.c index 320d9b412bc..58cea24aa4c 100644 --- a/src/world/area_omo/omo_11/omo_11_2_main.c +++ b/src/world/area_omo/omo_11/omo_11_2_main.c @@ -4,23 +4,23 @@ EvtScript N(EVS_ExitWalk_omo_12_0) = EVT_EXIT_WALK(60, omo_11_ENTRY_0, "omo_12", EvtScript N(EVS_ExitWalk_omo_10_0) = EVT_EXIT_WALK(60, omo_11_ENTRY_1, "omo_10", omo_10_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_12_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_10_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_omo_12_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_omo_10_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_EXEC_WAIT(N(EVS_SetupGizmos)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupMusic)) + ExecWait(N(EVS_SetupGizmos)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; diff --git a/src/world/area_omo/omo_11/omo_11_3_gizmos.c b/src/world/area_omo/omo_11/omo_11_3_gizmos.c index 577a5d9cd2a..d41c618c1d5 100644 --- a/src/world/area_omo/omo_11/omo_11_3_gizmos.c +++ b/src/world/area_omo/omo_11/omo_11_3_gizmos.c @@ -230,113 +230,113 @@ API_CALLABLE(N(UpdateRotatingPlatforms)) { } EvtScript N(EVS_UpdateBasicPlatform_Silent) = { - EVT_CALL(RandInt, 20, LVarA) - EVT_WAIT(LVarA) - EVT_USE_BUF(LVar0) - EVT_BUF_READ4(LVar6, LVar7, LVar8, LVar9) - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, -82, 60, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, LVar6, 0, LVar0, 0) - EVT_CALL(TranslateModel, LVar8, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, LVar7) - EVT_CALL(UpdateColliderTransform, LVar9) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(20) - EVT_CALL(MakeLerp, -82, 0, 60, EASING_COS_IN_OUT) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, LVar6, 0, LVar0, 0) - EVT_CALL(TranslateModel, LVar8, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, LVar7) - EVT_CALL(UpdateColliderTransform, LVar9) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(20) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(RandInt, 20, LVarA) + Wait(LVarA) + UseBuf(LVar0) + BufRead4(LVar6, LVar7, LVar8, LVar9) + Label(0) + Call(MakeLerp, 0, -82, 60, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(TranslateModel, LVar6, 0, LVar0, 0) + Call(TranslateModel, LVar8, 0, LVar0, 0) + Call(UpdateColliderTransform, LVar7) + Call(UpdateColliderTransform, LVar9) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Wait(20) + Call(MakeLerp, -82, 0, 60, EASING_COS_IN_OUT) + Label(2) + Call(UpdateLerp) + Call(TranslateModel, LVar6, 0, LVar0, 0) + Call(TranslateModel, LVar8, 0, LVar0, 0) + Call(UpdateColliderTransform, LVar7) + Call(UpdateColliderTransform, LVar9) + Wait(1) + IfEq(LVar1, 1) + Goto(2) + EndIf + Wait(20) + Goto(0) + Return + End }; EvtScript N(EVS_UpdateBasicPlatform_Audible) = { - EVT_CALL(RandInt, 20, LVarA) - EVT_WAIT(LVarA) - EVT_USE_BUF(LVar0) - EVT_BUF_READ4(LVar6, LVar7, LVar8, LVar9) - EVT_LABEL(0) - EVT_CALL(PlaySound, SOUND_OMO_PLATFORM_ASCEND) - EVT_CALL(MakeLerp, 0, 70, 51, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, LVar6, 0, LVar0, 0) - EVT_CALL(TranslateModel, LVar8, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, LVar7) - EVT_CALL(UpdateColliderTransform, LVar9) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(20) - EVT_CALL(PlaySound, SOUND_OMO_PLATFORM_DESCEND) - EVT_CALL(MakeLerp, 70, 0, 51, EASING_COS_IN_OUT) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, LVar6, 0, LVar0, 0) - EVT_CALL(TranslateModel, LVar8, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, LVar7) - EVT_CALL(UpdateColliderTransform, LVar9) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(20) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(RandInt, 20, LVarA) + Wait(LVarA) + UseBuf(LVar0) + BufRead4(LVar6, LVar7, LVar8, LVar9) + Label(0) + Call(PlaySound, SOUND_OMO_PLATFORM_ASCEND) + Call(MakeLerp, 0, 70, 51, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(TranslateModel, LVar6, 0, LVar0, 0) + Call(TranslateModel, LVar8, 0, LVar0, 0) + Call(UpdateColliderTransform, LVar7) + Call(UpdateColliderTransform, LVar9) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Wait(20) + Call(PlaySound, SOUND_OMO_PLATFORM_DESCEND) + Call(MakeLerp, 70, 0, 51, EASING_COS_IN_OUT) + Label(2) + Call(UpdateLerp) + Call(TranslateModel, LVar6, 0, LVar0, 0) + Call(TranslateModel, LVar8, 0, LVar0, 0) + Call(UpdateColliderTransform, LVar7) + Call(UpdateColliderTransform, LVar9) + Wait(1) + IfEq(LVar1, 1) + Goto(2) + EndIf + Wait(20) + Goto(0) + Return + End }; EvtScript N(EVS_SetupGizmos) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_CALL(ParentColliderToModel, COLLIDER_1_0, MODEL_1_0) - EVT_CALL(ParentColliderToModel, COLLIDER_fl, MODEL_fl) - EVT_CALL(ParentColliderToModel, COLLIDER_1_1, MODEL_1_1) - EVT_CALL(ParentColliderToModel, COLLIDER_f1_1, MODEL_f1_1) - EVT_CALL(ParentColliderToModel, COLLIDER_1_2, MODEL_1_2) - EVT_CALL(ParentColliderToModel, COLLIDER_f1_2, MODEL_f1_2) - EVT_CALL(ParentColliderToModel, COLLIDER_1_3, MODEL_1_3) - EVT_CALL(ParentColliderToModel, COLLIDER_f1_3, MODEL_f1_3) - EVT_THREAD - EVT_CALL(N(UpdateRotatingPlatforms)) - EVT_END_THREAD - EVT_CALL(ParentColliderToModel, COLLIDER_2_1, MODEL_2_1) - EVT_CALL(ParentColliderToModel, COLLIDER_f2_1, MODEL_f2_1) - EVT_CALL(ParentColliderToModel, COLLIDER_2_2, MODEL_2_2) - EVT_CALL(ParentColliderToModel, COLLIDER_f2_2, MODEL_f2_2) - EVT_CALL(ParentColliderToModel, COLLIDER_2_3, MODEL_2_3) - EVT_CALL(ParentColliderToModel, COLLIDER_f2_3, MODEL_f2_3) - EVT_CALL(ParentColliderToModel, COLLIDER_2_4, MODEL_2_4) - EVT_CALL(ParentColliderToModel, COLLIDER_f2_4, MODEL_f2_4) - EVT_CALL(ParentColliderToModel, COLLIDER_2_5, MODEL_2_5) - EVT_CALL(ParentColliderToModel, COLLIDER_f2_5, MODEL_f2_5) - EVT_SET(LVar0, EVT_PTR(N(BasicPlatform1))) - EVT_EXEC(N(EVS_UpdateBasicPlatform_Silent)) - EVT_SET(LVar0, EVT_PTR(N(BasicPlatform2))) - EVT_EXEC(N(EVS_UpdateBasicPlatform_Silent)) - EVT_SET(LVar0, EVT_PTR(N(BasicPlatform3))) - EVT_EXEC(N(EVS_UpdateBasicPlatform_Silent)) - EVT_SET(LVar0, EVT_PTR(N(BasicPlatform4))) - EVT_EXEC(N(EVS_UpdateBasicPlatform_Audible)) - EVT_SET(LVar0, EVT_PTR(N(BasicPlatform5))) - EVT_EXEC(N(EVS_UpdateBasicPlatform_Silent)) - EVT_THREAD - EVT_CALL(N(UpdatePlatformShadows)) - EVT_END_THREAD - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0B) + Call(ParentColliderToModel, COLLIDER_1_0, MODEL_1_0) + Call(ParentColliderToModel, COLLIDER_fl, MODEL_fl) + Call(ParentColliderToModel, COLLIDER_1_1, MODEL_1_1) + Call(ParentColliderToModel, COLLIDER_f1_1, MODEL_f1_1) + Call(ParentColliderToModel, COLLIDER_1_2, MODEL_1_2) + Call(ParentColliderToModel, COLLIDER_f1_2, MODEL_f1_2) + Call(ParentColliderToModel, COLLIDER_1_3, MODEL_1_3) + Call(ParentColliderToModel, COLLIDER_f1_3, MODEL_f1_3) + Thread + Call(N(UpdateRotatingPlatforms)) + EndThread + Call(ParentColliderToModel, COLLIDER_2_1, MODEL_2_1) + Call(ParentColliderToModel, COLLIDER_f2_1, MODEL_f2_1) + Call(ParentColliderToModel, COLLIDER_2_2, MODEL_2_2) + Call(ParentColliderToModel, COLLIDER_f2_2, MODEL_f2_2) + Call(ParentColliderToModel, COLLIDER_2_3, MODEL_2_3) + Call(ParentColliderToModel, COLLIDER_f2_3, MODEL_f2_3) + Call(ParentColliderToModel, COLLIDER_2_4, MODEL_2_4) + Call(ParentColliderToModel, COLLIDER_f2_4, MODEL_f2_4) + Call(ParentColliderToModel, COLLIDER_2_5, MODEL_2_5) + Call(ParentColliderToModel, COLLIDER_f2_5, MODEL_f2_5) + Set(LVar0, Ref(N(BasicPlatform1))) + Exec(N(EVS_UpdateBasicPlatform_Silent)) + Set(LVar0, Ref(N(BasicPlatform2))) + Exec(N(EVS_UpdateBasicPlatform_Silent)) + Set(LVar0, Ref(N(BasicPlatform3))) + Exec(N(EVS_UpdateBasicPlatform_Silent)) + Set(LVar0, Ref(N(BasicPlatform4))) + Exec(N(EVS_UpdateBasicPlatform_Audible)) + Set(LVar0, Ref(N(BasicPlatform5))) + Exec(N(EVS_UpdateBasicPlatform_Silent)) + Thread + Call(N(UpdatePlatformShadows)) + EndThread + Return + End }; diff --git a/src/world/area_omo/omo_11/omo_11_4_entity.c b/src/world/area_omo/omo_11/omo_11_4_entity.c index 8eb1b59ffd0..c081453dac7 100644 --- a/src/world/area_omo/omo_11/omo_11_4_entity.c +++ b/src/world/area_omo/omo_11/omo_11_4_entity.c @@ -7,19 +7,19 @@ EvtScript N(EVS_MakeEntities) = { EVT_MAKE_SUPER_BLOCK(-115, 270, -120, 0) - EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), 315, 270, -100, 0, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OMO11_MultiCoinBrick) - EVT_CALL(UseDynamicShadow, TRUE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 685, 60, -100, 0, ITEM_VOLT_SHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OMO11_HiddenItem_VoltShroom) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), -600, 60, -50, 0, ITEM_SNOWMAN_DOLL, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OMO11_HiddenItem_SnowmanDoll) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -100, 60, -45, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OMO11_ItemBlock_CoinB) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenRedBlock), -150, 60, -45, 0, ITEM_DEEP_FOCUS2, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OMO11_HiddenBadge_DeepFocus2) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -200, 60, -45, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OMO11_ItemBlock_CoinA) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_MulticoinBlock), 315, 270, -100, 0, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OMO11_MultiCoinBrick) + Call(UseDynamicShadow, TRUE) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 685, 60, -100, 0, ITEM_VOLT_SHROOM, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OMO11_HiddenItem_VoltShroom) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), -600, 60, -50, 0, ITEM_SNOWMAN_DOLL, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OMO11_HiddenItem_SnowmanDoll) + Call(MakeEntity, Ref(Entity_YellowBlock), -100, 60, -45, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OMO11_ItemBlock_CoinB) + Call(MakeEntity, Ref(Entity_HiddenRedBlock), -150, 60, -45, 0, ITEM_DEEP_FOCUS2, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OMO11_HiddenBadge_DeepFocus2) + Call(MakeEntity, Ref(Entity_YellowBlock), -200, 60, -45, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OMO11_ItemBlock_CoinA) + Return + End }; diff --git a/src/world/area_omo/omo_12/omo_12_1_music.c b/src/world/area_omo/omo_12/omo_12_1_music.c index d27ab3736b1..60059ec7b7e 100644 --- a/src/world/area_omo/omo_12/omo_12_1_music.c +++ b/src/world/area_omo/omo_12/omo_12_1_music.c @@ -1,34 +1,34 @@ #include "omo_12.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH4_DEFEATED_LANTERN_GHOST) - EVT_CALL(SetMusicTrack, 0, SONG_CREEPY_TOYBOX, 0, 8) - EVT_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_GE(GB_StoryProgress, STORY_CH4_DEFEATED_LANTERN_GHOST) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) - EVT_END_THREAD - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH4_DEFEATED_LANTERN_GHOST) + Call(SetMusicTrack, 0, SONG_CREEPY_TOYBOX, 0, 8) + Thread + Loop(0) + Wait(1) + IfGe(GB_StoryProgress, STORY_CH4_DEFEATED_LANTERN_GHOST) + BreakLoop + EndIf + EndLoop + Call(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) + EndThread + Else + Call(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) + EndIf + Return + End }; EvtScript N(EVS_PushPartnerSong) = { - EVT_CALL(PushSong, SONG_NEW_PARTNER, 0) - EVT_RETURN - EVT_END + Call(PushSong, SONG_NEW_PARTNER, 0) + Return + End }; EvtScript N(EVS_PopSong) = { - EVT_CALL(FadeOutMusic, 0, 500) - EVT_WAIT(15) - EVT_CALL(PopSong) - EVT_RETURN - EVT_END + Call(FadeOutMusic, 0, 500) + Wait(15) + Call(PopSong) + Return + End }; diff --git a/src/world/area_omo/omo_12/omo_12_2_main.c b/src/world/area_omo/omo_12/omo_12_2_main.c index 97e23433551..e407b580ac0 100644 --- a/src/world/area_omo/omo_12/omo_12_2_main.c +++ b/src/world/area_omo/omo_12/omo_12_2_main.c @@ -3,32 +3,32 @@ EvtScript N(EVS_ExitWalk_omo_11_0) = EVT_EXIT_WALK(60, omo_12_ENTRY_0, "omo_11", omo_11_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_11_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_omo_11_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_EXEC_WAIT(N(EVS_SetupLightSource)) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH4_DEFEATED_LANTERN_GHOST) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_EXEC(N(EVS_EnterScene)) - EVT_WAIT(1) - EVT_CASE_LT(STORY_CH4_WATT_JOINED_PARTY) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_CASE_GE(STORY_CH4_WATT_JOINED_PARTY) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_SetupMusic)) + ExecWait(N(EVS_SetupLightSource)) + Switch(GB_StoryProgress) + CaseLt(STORY_CH4_DEFEATED_LANTERN_GHOST) + Exec(N(EVS_BindExitTriggers)) + Exec(N(EVS_EnterScene)) + Wait(1) + CaseLt(STORY_CH4_WATT_JOINED_PARTY) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + CaseGe(STORY_CH4_WATT_JOINED_PARTY) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + EndSwitch + Return + End }; diff --git a/src/world/area_omo/omo_12/omo_12_3_npc.c b/src/world/area_omo/omo_12/omo_12_3_npc.c index 2120b66059c..3b60013a1d6 100644 --- a/src/world/area_omo/omo_12/omo_12_3_npc.c +++ b/src/world/area_omo/omo_12/omo_12_3_npc.c @@ -51,127 +51,127 @@ enum { }; EvtScript N(EVS_ManageLanternLight) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_LABEL(0) - EVT_SWITCH(AB_OMO12_LightSource) - EVT_CASE_EQ(LIGHT_FROM_DEFAULT) - EVT_CASE_EQ(LIGHT_FROM_GHOST) - EVT_CALL(GetNpcPos, NPC_BigLanternGhost, LVar0, LVar1, LVar2) - EVT_SET(LVar3, AB_OMO12_LightPowerMod) - EVT_ADD(LVar3, 128) - EVT_CALL(N(SetLightOriginAndPower), LVar0, LVar1, LVar2, LVar3) - EVT_CASE_EQ(LIGHT_FROM_WATT) - EVT_CALL(GetNpcPos, NPC_Watt, LVar0, LVar1, LVar2) - EVT_SET(LVar3, AB_OMO12_LightPowerMod) - EVT_ADD(LVar3, 128) - EVT_CALL(N(SetLightOriginAndPower), LVar0, LVar1, LVar2, LVar3) - EVT_CASE_EQ(LIGHT_FROM_LANTERN) - EVT_CALL(GetNpcPos, NPC_LaternTop, LVar0, LVar1, LVar2) - EVT_SET(LVar3, AB_OMO12_LightPowerMod) - EVT_ADD(LVar3, 128) - EVT_CALL(N(SetLightOriginAndPower), LVar0, LVar1, LVar2, LVar3) - EVT_CASE_EQ(LIGHT_FROM_FLICK_OFF) - EVT_CALL(N(SetLightOff)) - EVT_SET(AB_OMO12_LightSource, LIGHT_FROM_DEFAULT) - EVT_CASE_EQ(LIGHT_FROM_HIDDEN) - EVT_SET(LVar3, AB_OMO12_LightPowerMod) - EVT_ADD(LVar3, 128) - EVT_CALL(N(SetLightOriginAndPower), NPC_DISPOSE_LOCATION, LVar3) - EVT_SET(AB_OMO12_LightSource, LIGHT_FROM_DEFAULT) - EVT_CASE_EQ(LIGHT_FROM_NO_CHANGE) - EVT_RETURN - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Label(0) + Switch(AB_OMO12_LightSource) + CaseEq(LIGHT_FROM_DEFAULT) + CaseEq(LIGHT_FROM_GHOST) + Call(GetNpcPos, NPC_BigLanternGhost, LVar0, LVar1, LVar2) + Set(LVar3, AB_OMO12_LightPowerMod) + Add(LVar3, 128) + Call(N(SetLightOriginAndPower), LVar0, LVar1, LVar2, LVar3) + CaseEq(LIGHT_FROM_WATT) + Call(GetNpcPos, NPC_Watt, LVar0, LVar1, LVar2) + Set(LVar3, AB_OMO12_LightPowerMod) + Add(LVar3, 128) + Call(N(SetLightOriginAndPower), LVar0, LVar1, LVar2, LVar3) + CaseEq(LIGHT_FROM_LANTERN) + Call(GetNpcPos, NPC_LaternTop, LVar0, LVar1, LVar2) + Set(LVar3, AB_OMO12_LightPowerMod) + Add(LVar3, 128) + Call(N(SetLightOriginAndPower), LVar0, LVar1, LVar2, LVar3) + CaseEq(LIGHT_FROM_FLICK_OFF) + Call(N(SetLightOff)) + Set(AB_OMO12_LightSource, LIGHT_FROM_DEFAULT) + CaseEq(LIGHT_FROM_HIDDEN) + Set(LVar3, AB_OMO12_LightPowerMod) + Add(LVar3, 128) + Call(N(SetLightOriginAndPower), NPC_DISPOSE_LOCATION, LVar3) + Set(AB_OMO12_LightSource, LIGHT_FROM_DEFAULT) + CaseEq(LIGHT_FROM_NO_CHANGE) + Return + EndSwitch + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_SetupLightSource) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH4_DEFEATED_LANTERN_GHOST) - EVT_SET(AB_OMO12_LightSource, LIGHT_FROM_HIDDEN) - EVT_SET(AB_OMO12_LightPowerMod, 127) - EVT_EXEC(N(EVS_ManageLanternLight)) - EVT_CASE_LT(STORY_CH4_WATT_JOINED_PARTY) - EVT_SET(AB_OMO12_LightSource, LIGHT_FROM_LANTERN) - EVT_SET(AB_OMO12_LightPowerMod, 102) - EVT_EXEC(N(EVS_ManageLanternLight)) - EVT_CASE_GE(STORY_CH4_WATT_JOINED_PARTY) - EVT_EXEC_WAIT(N(EVS_CreateDarkness)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH4_DEFEATED_LANTERN_GHOST) + Set(AB_OMO12_LightSource, LIGHT_FROM_HIDDEN) + Set(AB_OMO12_LightPowerMod, 127) + Exec(N(EVS_ManageLanternLight)) + CaseLt(STORY_CH4_WATT_JOINED_PARTY) + Set(AB_OMO12_LightSource, LIGHT_FROM_LANTERN) + Set(AB_OMO12_LightPowerMod, 102) + Exec(N(EVS_ManageLanternLight)) + CaseGe(STORY_CH4_WATT_JOINED_PARTY) + ExecWait(N(EVS_CreateDarkness)) + EndSwitch + Return + End }; EvtScript N(EVS_EnterScene) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetPlayerPos, 70, 20, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH4_004E, 160, 40) - EVT_CALL(SetNpcPos, NPC_BigLanternGhost, -150, 0, 20) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -150, 0, 20) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -150, 0, 20) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20 * DT) - EVT_CALL(GetNpcPos, NPC_BigLanternGhost, LVar2, LVar3, LVar4) - EVT_ADD(LVar2, 32) - EVT_ADD(LVar3, 10) + Call(DisablePlayerInput, TRUE) + Call(SetPlayerPos, 70, 20, 0) + Call(ShowMessageAtScreenPos, MSG_CH4_004E, 160, 40) + Call(SetNpcPos, NPC_BigLanternGhost, -150, 0, 20) + Call(UseSettingsFrom, CAM_DEFAULT, -150, 0, 20) + Call(SetPanTarget, CAM_DEFAULT, -150, 0, 20) + Call(SetCamDistance, CAM_DEFAULT, Float(350.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-9.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20 * DT) + Call(GetNpcPos, NPC_BigLanternGhost, LVar2, LVar3, LVar4) + Add(LVar2, 32) + Add(LVar3, 10) // turn on lantern light - EVT_CALL(MakeLerp, 255, 100, 60 * DT, EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetLightOriginAndPower), LVar2, LVar3, LVar4, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_BigLanternGhost, ANIM_BigLanternGhost_Anim05, ANIM_BigLanternGhost_Anim01, 0, MSG_CH4_004F) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 50, 0, 20) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.7 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_SET(AB_OMO12_LightSource, LIGHT_FROM_GHOST) - EVT_SET(AB_OMO12_LightPowerMod, -28) - EVT_CALL(SetNpcAnimation, NPC_BigLanternGhost, ANIM_BigLanternGhost_Anim06) - EVT_CALL(SetNpcSpeed, NPC_BigLanternGhost, EVT_FLOAT(3.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_BigLanternGhost, 0, 20, 0) - EVT_CALL(SetNpcAnimation, NPC_BigLanternGhost, ANIM_BigLanternGhost_Anim01) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_BigLanternGhost, ANIM_BigLanternGhost_Anim05, ANIM_BigLanternGhost_Anim01, 0, MSG_CH4_0050) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(0.5)) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_BigLanternGhost, ANIM_BigLanternGhost_Anim0F) - EVT_WAIT(5 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Shocked) - EVT_WAIT(15 * DT) - EVT_THREAD - EVT_WAIT(20 * DT) - EVT_SET(AB_OMO12_LightSource, LIGHT_FROM_FLICK_OFF) - EVT_END_THREAD - EVT_CALL(SetNpcVar, NPC_BigLanternGhost, 0, 1) - EVT_RETURN - EVT_END + Call(MakeLerp, 255, 100, 60 * DT, EASING_LINEAR) + Label(0) + Call(UpdateLerp) + Call(N(SetLightOriginAndPower), LVar2, LVar3, LVar4, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(SpeakToPlayer, NPC_BigLanternGhost, ANIM_BigLanternGhost_Anim05, ANIM_BigLanternGhost_Anim01, 0, MSG_CH4_004F) + Call(SetPanTarget, CAM_DEFAULT, 50, 0, 20) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.7 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Set(AB_OMO12_LightSource, LIGHT_FROM_GHOST) + Set(AB_OMO12_LightPowerMod, -28) + Call(SetNpcAnimation, NPC_BigLanternGhost, ANIM_BigLanternGhost_Anim06) + Call(SetNpcSpeed, NPC_BigLanternGhost, Float(3.0 / DT)) + Call(NpcMoveTo, NPC_BigLanternGhost, 0, 20, 0) + Call(SetNpcAnimation, NPC_BigLanternGhost, ANIM_BigLanternGhost_Anim01) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_BigLanternGhost, ANIM_BigLanternGhost_Anim05, ANIM_BigLanternGhost_Anim01, 0, MSG_CH4_0050) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(0.5)) + EndThread + Call(SetNpcAnimation, NPC_BigLanternGhost, ANIM_BigLanternGhost_Anim0F) + Wait(5 * DT) + Call(SetPlayerAnimation, ANIM_MarioW2_Shocked) + Wait(15 * DT) + Thread + Wait(20 * DT) + Set(AB_OMO12_LightSource, LIGHT_FROM_FLICK_OFF) + EndThread + Call(SetNpcVar, NPC_BigLanternGhost, 0, 1) + Return + End }; EvtScript N(EVS_UseWattTutorial) = { - EVT_LOOP(0) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_EQ(LVar0, PARTNER_WATT) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldWatt_Celebrate, ANIM_WorldWatt_Idle, 5, MSG_CH4_005C) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Loop(0) + Call(GetPartnerInUse, LVar0) + IfEq(LVar0, PARTNER_WATT) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldWatt_Celebrate, ANIM_WorldWatt_Idle, 5, MSG_CH4_005C) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Return + End }; Vec3f N(WattRightFlightPath)[] = { @@ -192,420 +192,420 @@ BombTrigger N(BombPos_Lantern_Unused) = { }; EvtScript N(EVS_Scene_ReleaseWatt) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(DisableCameraLeadingPlayer)) - EVT_CALL(GetNpcPos, NPC_LaternTop, LVar0, LVar1, LVar2) - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(2.0 / DT), LVar0, LVar1, LVar2, EVT_FLOAT(450.0), EVT_FLOAT(15.0), EVT_FLOAT(-6.0)) - EVT_SET(LVarA, 0) - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_IF_EQ(LVar0, ENCOUNTER_TRIGGER_PARTNER) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_EQ(LVar0, PARTNER_BOMBETTE) - EVT_CALL(SetNpcAnimation, NPC_Watt, ANIM_WorldWatt_Hurt) - EVT_SET(LVarA, -1) - EVT_END_IF - EVT_END_IF - EVT_CALL(NpcFacePlayer, NPC_Watt, 0) - EVT_IF_EQ(LVarA, 0) - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_PARTNER) - EVT_CASE_DEFAULT - EVT_CALL(GetEncounterTriggerHitTier, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(25 * DT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(PlaySound, SOUND_OMO_LANTERN_BREAK) - EVT_SET(AF_OMO_10, FALSE) - EVT_LOOP(8) - EVT_CALL(SetNpcFlagBits, NPC_LaternTop, NPC_FLAG_INVISIBLE, TRUE) - EVT_WAIT(3) - EVT_CALL(SetNpcFlagBits, NPC_LaternTop, NPC_FLAG_INVISIBLE, FALSE) - EVT_WAIT(3) - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_LaternTop, ANIM_BigLanternGhost_Anim03) - EVT_CALL(SetNpcAnimation, NPC_LaternBottom, ANIM_BigLanternGhost_Anim04) - EVT_THREAD - EVT_LABEL(10) - EVT_CALL(SetNpcFlagBits, NPC_LaternTop, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_LaternBottom, NPC_FLAG_INVISIBLE, TRUE) - EVT_WAIT(2) - EVT_CALL(SetNpcFlagBits, NPC_LaternTop, NPC_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_LaternBottom, NPC_FLAG_INVISIBLE, FALSE) - EVT_WAIT(2) - EVT_IF_EQ(AF_OMO_10, FALSE) - EVT_GOTO(10) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(GetAngleToPlayer, NPC_LaternTop, LVar0) - EVT_IF_LT(LVar0, 180) - EVT_SET(LVar1, 27) - EVT_SET(LVar2, 50) - EVT_ELSE - EVT_SET(LVar1, -27) - EVT_SET(LVar2, -50) - EVT_END_IF - EVT_CALL(func_802D2C14, 1) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PlayerMoveTo, LVar1, 0, 0) - EVT_CALL(PlayerFaceNpc, NPC_LaternTop, 3) - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_LaternTop, 0) - EVT_CALL(GetNpcPos, NPC_LaternTop, LVar0, 20, LVar2) - EVT_CALL(NpcJump0, NPC_LaternTop, LVar0, 20, LVar2, 20 * DT) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(6 * DT) - EVT_CALL(GetNpcPos, NPC_LaternTop, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Watt, LVar0, 6, LVar2) - EVT_LOOP(7) - EVT_CALL(SetNpcFlagBits, NPC_LaternTop, NPC_FLAG_INVISIBLE, TRUE) - EVT_WAIT(1) - EVT_CALL(SetNpcFlagBits, NPC_LaternTop, NPC_FLAG_INVISIBLE, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(10 * DT) - EVT_SET(AB_OMO12_LightSource, LIGHT_FROM_WATT) - EVT_SET(AB_OMO12_LightPowerMod, 72) - EVT_WAIT(40 * DT) - EVT_SET(AF_OMO_10, TRUE) - EVT_CALL(SetNpcPos, NPC_LaternTop, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_LaternBottom, NPC_DISPOSE_LOCATION) - EVT_WAIT(25) - EVT_CALL(GetPlayerPos, LVar3, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Watt, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, LVar3) - EVT_DIV(LVar0, 2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-8.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_IF_EQ(LVarA, -1) - EVT_CALL(SpeakToPlayer, NPC_Watt, ANIM_WorldWatt_Strain, ANIM_WorldWatt_Hurt, 0, MSG_CH4_0058) - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Pray) - EVT_WAIT(15 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_CALL(EndSpeech, NPC_Watt, ANIM_WorldWatt_Strain, ANIM_WorldWatt_Hurt, 0) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Watt, ANIM_WorldWatt_Celebrate, ANIM_WorldWatt_Idle, 0, MSG_CH4_0057) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_END_IF - EVT_CALL(func_802D2C14, 0) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Watt, ANIM_WorldWatt_Idle) - EVT_CALL(PlaySoundAtNpc, NPC_Watt, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_Watt, EMOTE_EXCLAMATION, 0, 30, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(40 * DT) - EVT_CALL(SpeakToPlayer, NPC_Watt, ANIM_WorldWatt_Talk, ANIM_WorldWatt_Idle, 0, MSG_CH4_0059) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_TouchNose) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_WAIT(20 * DT) - EVT_CALL(EndSpeech, NPC_Watt, ANIM_WorldWatt_Talk, ANIM_WorldWatt_Idle, 0) - EVT_WAIT(20 * DT) - EVT_CALL(GetAngleToPlayer, NPC_Watt, LVar0) - EVT_IF_LT(LVar0, 180) - EVT_SET(LVar1, -25) - EVT_ELSE - EVT_SET(LVar1, 25) - EVT_END_IF - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_ADD(LVar1, LVar2) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) - EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar1, LVar4, 0) - EVT_CALL(NpcFacePlayer, NPC_PARTNER, 3) - EVT_CALL(EnablePartnerAI) - EVT_END_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Watt, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(GetNpcPos, NPC_Watt, LVar7, LVar8, LVar9) - EVT_CALL(GetAngleToPlayer, NPC_Watt, LVar0) - EVT_IF_LT(LVar0, 180) - EVT_CALL(LoadPath, 15 * DT, EVT_PTR(N(WattRightFlightPath)), ARRAY_COUNT(N(WattRightFlightPath)), EASING_LINEAR) - EVT_SET(LVar4, 12) - EVT_ELSE - EVT_CALL(LoadPath, 15 * DT, EVT_PTR(N(WattLeftFlightPath)), ARRAY_COUNT(N(WattLeftFlightPath)), EASING_LINEAR) - EVT_SET(LVar4, -12) - EVT_END_IF - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, LVar4) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_LABEL(30) - EVT_CALL(GetNextPathPos) - EVT_ADD(LVar1, LVar7) - EVT_ADD(LVar2, LVar8) - EVT_ADD(LVar3, LVar9) - EVT_CALL(SetNpcPos, NPC_Watt, LVar1, LVar2, LVar3) - EVT_CALL(PlayerFaceNpc, NPC_Watt, FALSE) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(30) - EVT_END_IF - EVT_CALL(NpcFacePlayer, NPC_Watt, 3) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_Watt, ANIM_WorldWatt_Talk, ANIM_WorldWatt_Idle, 0, MSG_CH4_005A) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(5 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_WAIT(20 * DT) - EVT_CALL(EndSpeech, NPC_Watt, ANIM_WorldWatt_Talk, ANIM_WorldWatt_Idle, 0) - EVT_SET(AB_OMO12_LightSource, LIGHT_FROM_NO_CHANGE) - EVT_WAIT(1) - EVT_CALL(N(ChangeNpcToPartner), NPC_Watt, PARTNER_WATT) - EVT_CALL(N(LoadPartyImage)) - EVT_EXEC(N(EVS_PushPartnerSong)) - EVT_WAIT(15 * DT) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_018E, 160, 40) - EVT_EXEC(N(EVS_PopSong)) - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar2, LVar3, LVar4) - EVT_CALL(MakeLerp, 200, 255, 45 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetLightOriginAndPower), LVar2, LVar3, LVar4, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_ADD(LVar3, 8) - EVT_CALL(N(SetLightOriginAndPower), LVar2, LVar3, LVar4, LVar0) - EVT_END_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(CloseMessage) - EVT_WAIT(10 * DT) - EVT_EXEC_WAIT(N(EVS_CreateDarkness)) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldWatt_Talk, ANIM_WorldWatt_Idle, 0, MSG_CH4_005B) - EVT_CALL(EnablePartnerAI) - EVT_EXEC(N(EVS_UseWattTutorial)) - EVT_CALL(N(EnableCameraLeadingPlayer)) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5.0 / DT)) - EVT_SET(GB_StoryProgress, STORY_CH4_WATT_JOINED_PARTY) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(RemoveNpc, NPC_LaternTop) - EVT_CALL(RemoveNpc, NPC_LaternBottom) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(N(DisableCameraLeadingPlayer)) + Call(GetNpcPos, NPC_LaternTop, LVar0, LVar1, LVar2) + Call(SetCamProperties, CAM_DEFAULT, Float(2.0 / DT), LVar0, LVar1, LVar2, Float(450.0), Float(15.0), Float(-6.0)) + Set(LVarA, 0) + Call(GetOwnerEncounterTrigger, LVar0) + IfEq(LVar0, ENCOUNTER_TRIGGER_PARTNER) + Call(GetCurrentPartnerID, LVar0) + IfEq(LVar0, PARTNER_BOMBETTE) + Call(SetNpcAnimation, NPC_Watt, ANIM_WorldWatt_Hurt) + Set(LVarA, -1) + EndIf + EndIf + Call(NpcFacePlayer, NPC_Watt, 0) + IfEq(LVarA, 0) + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + CaseEq(ENCOUNTER_TRIGGER_PARTNER) + CaseDefault + Call(GetEncounterTriggerHitTier, LVar0) + IfEq(LVar0, 0) + Wait(25 * DT) + Call(DisablePlayerInput, FALSE) + Return + EndIf + EndSwitch + EndIf + Call(PlaySound, SOUND_OMO_LANTERN_BREAK) + Set(AF_OMO_10, FALSE) + Loop(8) + Call(SetNpcFlagBits, NPC_LaternTop, NPC_FLAG_INVISIBLE, TRUE) + Wait(3) + Call(SetNpcFlagBits, NPC_LaternTop, NPC_FLAG_INVISIBLE, FALSE) + Wait(3) + EndLoop + Call(SetNpcAnimation, NPC_LaternTop, ANIM_BigLanternGhost_Anim03) + Call(SetNpcAnimation, NPC_LaternBottom, ANIM_BigLanternGhost_Anim04) + Thread + Label(10) + Call(SetNpcFlagBits, NPC_LaternTop, NPC_FLAG_INVISIBLE, TRUE) + Call(SetNpcFlagBits, NPC_LaternBottom, NPC_FLAG_INVISIBLE, TRUE) + Wait(2) + Call(SetNpcFlagBits, NPC_LaternTop, NPC_FLAG_INVISIBLE, FALSE) + Call(SetNpcFlagBits, NPC_LaternBottom, NPC_FLAG_INVISIBLE, FALSE) + Wait(2) + IfEq(AF_OMO_10, FALSE) + Goto(10) + EndIf + EndThread + Call(GetAngleToPlayer, NPC_LaternTop, LVar0) + IfLt(LVar0, 180) + Set(LVar1, 27) + Set(LVar2, 50) + Else + Set(LVar1, -27) + Set(LVar2, -50) + EndIf + Call(func_802D2C14, 1) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetPlayerSpeed, Float(3.0 / DT)) + Call(PlayerMoveTo, LVar1, 0, 0) + Call(PlayerFaceNpc, NPC_LaternTop, 3) + Thread + Call(SetNpcJumpscale, NPC_LaternTop, 0) + Call(GetNpcPos, NPC_LaternTop, LVar0, 20, LVar2) + Call(NpcJump0, NPC_LaternTop, LVar0, 20, LVar2, 20 * DT) + EndThread + Thread + Wait(6 * DT) + Call(GetNpcPos, NPC_LaternTop, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Watt, LVar0, 6, LVar2) + Loop(7) + Call(SetNpcFlagBits, NPC_LaternTop, NPC_FLAG_INVISIBLE, TRUE) + Wait(1) + Call(SetNpcFlagBits, NPC_LaternTop, NPC_FLAG_INVISIBLE, FALSE) + Wait(1) + EndLoop + EndThread + Wait(10 * DT) + Set(AB_OMO12_LightSource, LIGHT_FROM_WATT) + Set(AB_OMO12_LightPowerMod, 72) + Wait(40 * DT) + Set(AF_OMO_10, TRUE) + Call(SetNpcPos, NPC_LaternTop, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_LaternBottom, NPC_DISPOSE_LOCATION) + Wait(25) + Call(GetPlayerPos, LVar3, LVar1, LVar2) + Call(GetNpcPos, NPC_Watt, LVar0, LVar1, LVar2) + Add(LVar0, LVar3) + Div(LVar0, 2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-8.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + IfEq(LVarA, -1) + Call(SpeakToPlayer, NPC_Watt, ANIM_WorldWatt_Strain, ANIM_WorldWatt_Hurt, 0, MSG_CH4_0058) + Thread + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Pray) + Wait(15 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndThread + Call(EndSpeech, NPC_Watt, ANIM_WorldWatt_Strain, ANIM_WorldWatt_Hurt, 0) + Else + Call(SpeakToPlayer, NPC_Watt, ANIM_WorldWatt_Celebrate, ANIM_WorldWatt_Idle, 0, MSG_CH4_0057) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + EndIf + Call(func_802D2C14, 0) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_Watt, ANIM_WorldWatt_Idle) + Call(PlaySoundAtNpc, NPC_Watt, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_Watt, EMOTE_EXCLAMATION, 0, 30, EMOTER_NPC, 0, 0, 0, 0) + Wait(40 * DT) + Call(SpeakToPlayer, NPC_Watt, ANIM_WorldWatt_Talk, ANIM_WorldWatt_Idle, 0, MSG_CH4_0059) + Call(SetPlayerAnimation, ANIM_MarioW2_TouchNose) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + Wait(20 * DT) + Call(EndSpeech, NPC_Watt, ANIM_WorldWatt_Talk, ANIM_WorldWatt_Idle, 0) + Wait(20 * DT) + Call(GetAngleToPlayer, NPC_Watt, LVar0) + IfLt(LVar0, 180) + Set(LVar1, -25) + Else + Set(LVar1, 25) + EndIf + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Thread + Call(DisablePartnerAI, 0) + Add(LVar1, LVar2) + Call(SetNpcSpeed, NPC_PARTNER, Float(3.0 / DT)) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) + Call(NpcMoveTo, NPC_PARTNER, LVar1, LVar4, 0) + Call(NpcFacePlayer, NPC_PARTNER, 3) + Call(EnablePartnerAI) + EndThread + Call(SetNpcFlagBits, NPC_Watt, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(GetNpcPos, NPC_Watt, LVar7, LVar8, LVar9) + Call(GetAngleToPlayer, NPC_Watt, LVar0) + IfLt(LVar0, 180) + Call(LoadPath, 15 * DT, Ref(N(WattRightFlightPath)), ARRAY_COUNT(N(WattRightFlightPath)), EASING_LINEAR) + Set(LVar4, 12) + Else + Call(LoadPath, 15 * DT, Ref(N(WattLeftFlightPath)), ARRAY_COUNT(N(WattLeftFlightPath)), EASING_LINEAR) + Set(LVar4, -12) + EndIf + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, LVar4) + Call(SetPanTarget, CAM_DEFAULT, LVar0, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Label(30) + Call(GetNextPathPos) + Add(LVar1, LVar7) + Add(LVar2, LVar8) + Add(LVar3, LVar9) + Call(SetNpcPos, NPC_Watt, LVar1, LVar2, LVar3) + Call(PlayerFaceNpc, NPC_Watt, FALSE) + Wait(1) + IfEq(LVar0, 1) + Goto(30) + EndIf + Call(NpcFacePlayer, NPC_Watt, 3) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_Watt, ANIM_WorldWatt_Talk, ANIM_WorldWatt_Idle, 0, MSG_CH4_005A) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(5 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + Wait(20 * DT) + Call(EndSpeech, NPC_Watt, ANIM_WorldWatt_Talk, ANIM_WorldWatt_Idle, 0) + Set(AB_OMO12_LightSource, LIGHT_FROM_NO_CHANGE) + Wait(1) + Call(N(ChangeNpcToPartner), NPC_Watt, PARTNER_WATT) + Call(N(LoadPartyImage)) + Exec(N(EVS_PushPartnerSong)) + Wait(15 * DT) + Call(ShowMessageAtScreenPos, MSG_Menus_018E, 160, 40) + Exec(N(EVS_PopSong)) + Wait(10 * DT) + Thread + Call(GetNpcPos, NPC_PARTNER, LVar2, LVar3, LVar4) + Call(MakeLerp, 200, 255, 45 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(N(SetLightOriginAndPower), LVar2, LVar3, LVar4, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Add(LVar3, 8) + Call(N(SetLightOriginAndPower), LVar2, LVar3, LVar4, LVar0) + EndThread + Wait(30 * DT) + Call(CloseMessage) + Wait(10 * DT) + ExecWait(N(EVS_CreateDarkness)) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldWatt_Talk, ANIM_WorldWatt_Idle, 0, MSG_CH4_005B) + Call(EnablePartnerAI) + Exec(N(EVS_UseWattTutorial)) + Call(N(EnableCameraLeadingPlayer)) + Call(ResetCam, CAM_DEFAULT, Float(5.0 / DT)) + Set(GB_StoryProgress, STORY_CH4_WATT_JOINED_PARTY) + Call(DisablePlayerInput, FALSE) + Call(RemoveNpc, NPC_LaternTop) + Call(RemoveNpc, NPC_LaternBottom) + Unbind + Return + End }; EvtScript N(EVS_NpcIdle_BigLanternGhost) = { - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_WAIT(1) - EVT_IF_NE(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(1) - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_RETURN - EVT_END + Loop(0) + Call(GetSelfVar, 0, LVar0) + Wait(1) + IfNe(LVar0, 0) + BreakLoop + EndIf + EndLoop + Wait(1) + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Return + End }; EvtScript N(EVS_NpcDefeat_BigLanternGhost) = { - EVT_WAIT(1) - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_SET(AB_OMO12_LightSource, LIGHT_FROM_DEFAULT) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(N(SetLightOriginAndPower), LVar0, LVar1, LVar2, 100) - EVT_THREAD - EVT_SET(MF_LanternGhost_DoneSpeaking, FALSE) - EVT_CALL(SpeakToPlayer, NPC_BigLanternGhost, ANIM_BigLanternGhost_Anim08, ANIM_BigLanternGhost_Anim08, 0, MSG_CH4_0054) - EVT_SET(MF_LanternGhost_DoneSpeaking, TRUE) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(SetNpcJumpscale, NPC_LaternTop, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcPos, NPC_LaternTop, 0, 0, 20) - EVT_CALL(NpcJump0, NPC_LaternTop, 0, 0, 20, 10) - EVT_CALL(SetNpcPos, NPC_LaternBottom, 0, 0, 20) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_BigLanternGhost_Anim07) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(10.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, 400, 0, 0) - EVT_LABEL(0) - EVT_IF_EQ(MF_LanternGhost_DoneSpeaking, FALSE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetNpcPos, NPC_LaternTop, LVar3, LVar4, LVar5) - EVT_SUBF(LVar3, LVar0) - EVT_SUBF(LVar4, LVar1) - EVT_SUBF(LVar5, LVar2) - EVT_DIVF(LVar3, EVT_FLOAT(60.0)) - EVT_DIVF(LVar4, EVT_FLOAT(60.0)) - EVT_DIVF(LVar5, EVT_FLOAT(60.0)) - EVT_SETF(LVar6, EVT_FLOAT(2.167)) - EVT_SETF(LVar7, EVT_FLOAT(100.0)) - EVT_LOOP(60) - EVT_ADDF(LVar0, LVar3) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_ADDF(LVar7, LVar6) - EVT_CALL(N(SetLightOriginAndPower), LVar0, LVar1, LVar2, LVar7) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(AB_OMO12_LightSource, LIGHT_FROM_LANTERN) - EVT_SET(AB_OMO12_LightPowerMod, 102) - EVT_WAIT(1) - EVT_CALL(SetNpcVar, NPC_LaternTop, 0, 1) - EVT_SET(GB_StoryProgress, STORY_CH4_DEFEATED_LANTERN_GHOST) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Wait(1) + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Set(AB_OMO12_LightSource, LIGHT_FROM_DEFAULT) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(N(SetLightOriginAndPower), LVar0, LVar1, LVar2, 100) + Thread + Set(MF_LanternGhost_DoneSpeaking, FALSE) + Call(SpeakToPlayer, NPC_BigLanternGhost, ANIM_BigLanternGhost_Anim08, ANIM_BigLanternGhost_Anim08, 0, MSG_CH4_0054) + Set(MF_LanternGhost_DoneSpeaking, TRUE) + EndThread + Thread + Wait(15) + Call(SetNpcJumpscale, NPC_LaternTop, Float(1.0)) + Call(SetNpcPos, NPC_LaternTop, 0, 0, 20) + Call(NpcJump0, NPC_LaternTop, 0, 0, 20, 10) + Call(SetNpcPos, NPC_LaternBottom, 0, 0, 20) + EndThread + Call(SetNpcAnimation, NPC_SELF, ANIM_BigLanternGhost_Anim07) + Call(SetNpcSpeed, NPC_SELF, Float(10.0)) + Call(NpcMoveTo, NPC_SELF, 400, 0, 0) + Label(0) + IfEq(MF_LanternGhost_DoneSpeaking, FALSE) + Wait(1) + Goto(0) + EndIf + Call(GetNpcPos, NPC_LaternTop, LVar3, LVar4, LVar5) + SubF(LVar3, LVar0) + SubF(LVar4, LVar1) + SubF(LVar5, LVar2) + DivF(LVar3, Float(60.0)) + DivF(LVar4, Float(60.0)) + DivF(LVar5, Float(60.0)) + SetF(LVar6, Float(2.167)) + SetF(LVar7, Float(100.0)) + Loop(60) + AddF(LVar0, LVar3) + AddF(LVar1, LVar4) + AddF(LVar2, LVar5) + AddF(LVar7, LVar6) + Call(N(SetLightOriginAndPower), LVar0, LVar1, LVar2, LVar7) + Wait(1) + EndLoop + Set(AB_OMO12_LightSource, LIGHT_FROM_LANTERN) + Set(AB_OMO12_LightPowerMod, 102) + Wait(1) + Call(SetNpcVar, NPC_LaternTop, 0, 1) + Set(GB_StoryProgress, STORY_CH4_DEFEATED_LANTERN_GHOST) + Call(DisablePlayerInput, FALSE) + Call(RemoveNpc, NPC_SELF) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_BigLanternGhost) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH4_DEFEATED_LANTERN_GHOST) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_BigLanternGhost))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_BigLanternGhost))) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH4_DEFEATED_LANTERN_GHOST) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_BigLanternGhost))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_BigLanternGhost))) + Return + End }; EvtScript N(EVS_NpcInteract_LanternTop) = { - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, 10) - EVT_WAIT(6) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, -9) - EVT_WAIT(6) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, 8) - EVT_WAIT(5) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, -7) - EVT_WAIT(5) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, 6) - EVT_WAIT(4) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, -5) - EVT_WAIT(4) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, 4) - EVT_WAIT(3) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, -3) - EVT_WAIT(3) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, 2) - EVT_WAIT(2) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_BigLanternGhost_Anim02, ANIM_BigLanternGhost_Anim02, 5, MSG_CH4_0055) - EVT_RETURN - EVT_END + Thread + Wait(15) + Call(SetNpcRotation, NPC_SELF, 0, 0, 10) + Wait(6) + Call(SetNpcRotation, NPC_SELF, 0, 0, -9) + Wait(6) + Call(SetNpcRotation, NPC_SELF, 0, 0, 8) + Wait(5) + Call(SetNpcRotation, NPC_SELF, 0, 0, -7) + Wait(5) + Call(SetNpcRotation, NPC_SELF, 0, 0, 6) + Wait(4) + Call(SetNpcRotation, NPC_SELF, 0, 0, -5) + Wait(4) + Call(SetNpcRotation, NPC_SELF, 0, 0, 4) + Wait(3) + Call(SetNpcRotation, NPC_SELF, 0, 0, -3) + Wait(3) + Call(SetNpcRotation, NPC_SELF, 0, 0, 2) + Wait(2) + Call(SetNpcRotation, NPC_SELF, 0, 0, 0) + EndThread + Call(SpeakToPlayer, NPC_SELF, ANIM_BigLanternGhost_Anim02, ANIM_BigLanternGhost_Anim02, 5, MSG_CH4_0055) + Return + End }; EvtScript N(EVS_NpcIdle_LanternTop) = { - EVT_LABEL(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CASE_EQ(1) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(AwaitPlayerLeave, LVar0, LVar2, 100) - EVT_CALL(PartnerCanUseAbility, LVar0) - EVT_IF_NE(LVar0, TRUE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 16) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 8) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 4) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_BigLanternGhost_Anim02, ANIM_BigLanternGhost_Anim02, 0, MSG_CH4_0056) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetSelfVar, 0, 2) - EVT_END_IF - EVT_CASE_EQ(2) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(AwaitPlayerApproach, LVar0, LVar2, 60) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 2) - EVT_CALL(SetSelfVar, 0, 1) - EVT_END_IF - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetSelfVar, 0, LVar0) + Switch(LVar0) + CaseEq(0) + CaseEq(1) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(AwaitPlayerLeave, LVar0, LVar2, 100) + Call(PartnerCanUseAbility, LVar0) + IfNe(LVar0, TRUE) + Call(DisablePlayerInput, TRUE) + Thread + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 16) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 8) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 4) + EndThread + Call(SpeakToPlayer, NPC_SELF, ANIM_BigLanternGhost_Anim02, ANIM_BigLanternGhost_Anim02, 0, MSG_CH4_0056) + Call(DisablePlayerInput, FALSE) + EndIf + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 1) + Call(SetSelfVar, 0, 2) + EndIf + CaseEq(2) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(AwaitPlayerApproach, LVar0, LVar2, 60) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 2) + Call(SetSelfVar, 0, 1) + EndIf + EndSwitch + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_NpcInit_LanternTop) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH4_DEFEATED_LANTERN_GHOST) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_BigLanternGhost_Anim02) - EVT_CASE_LT(STORY_CH4_WATT_JOINED_PARTY) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_BigLanternGhost_Anim02) - EVT_CALL(SetNpcPos, NPC_SELF, 0, 0, 20) - EVT_CALL(SetSelfVar, 0, 2) - EVT_CASE_GE(STORY_CH4_WATT_JOINED_PARTY) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_LanternTop))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_LanternTop))) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH4_DEFEATED_LANTERN_GHOST) + Call(SetNpcAnimation, NPC_SELF, ANIM_BigLanternGhost_Anim02) + CaseLt(STORY_CH4_WATT_JOINED_PARTY) + Call(SetNpcAnimation, NPC_SELF, ANIM_BigLanternGhost_Anim02) + Call(SetNpcPos, NPC_SELF, 0, 0, 20) + Call(SetSelfVar, 0, 2) + CaseGe(STORY_CH4_WATT_JOINED_PARTY) + Call(RemoveNpc, NPC_SELF) + Return + EndSwitch + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_LanternTop))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_LanternTop))) + Return + End }; EvtScript N(EVS_NpcInit_LanternBottom) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH4_DEFEATED_LANTERN_GHOST) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_BigLanternGhost_Anim02) - EVT_CASE_LT(STORY_CH4_WATT_JOINED_PARTY) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_BigLanternGhost_Anim02) - EVT_CALL(SetNpcPos, NPC_SELF, 0, 0, 20) - EVT_CASE_GE(STORY_CH4_WATT_JOINED_PARTY) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_SWITCH - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_Scene_ReleaseWatt))) - EVT_CALL(SetNpcFlagBits, NPC_LaternBottom, NPC_FLAG_INVISIBLE, TRUE) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH4_DEFEATED_LANTERN_GHOST) + Call(SetNpcAnimation, NPC_SELF, ANIM_BigLanternGhost_Anim02) + CaseLt(STORY_CH4_WATT_JOINED_PARTY) + Call(SetNpcAnimation, NPC_SELF, ANIM_BigLanternGhost_Anim02) + Call(SetNpcPos, NPC_SELF, 0, 0, 20) + CaseGe(STORY_CH4_WATT_JOINED_PARTY) + Call(RemoveNpc, NPC_SELF) + Return + EndSwitch + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_Scene_ReleaseWatt))) + Call(SetNpcFlagBits, NPC_LaternBottom, NPC_FLAG_INVISIBLE, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_Watt) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH4_DEFEATED_LANTERN_GHOST) - EVT_CASE_LT(STORY_CH4_WATT_JOINED_PARTY) - EVT_CASE_GE(STORY_CH4_WATT_JOINED_PARTY) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH4_DEFEATED_LANTERN_GHOST) + CaseLt(STORY_CH4_WATT_JOINED_PARTY) + CaseGe(STORY_CH4_WATT_JOINED_PARTY) + Call(RemoveNpc, NPC_SELF) + Return + EndSwitch + Return + End }; AnimID N(ExtraAnims_LanternGhost)[] = { diff --git a/src/world/area_omo/omo_13/omo_13_1_music.c b/src/world/area_omo/omo_13/omo_13_1_music.c index 24ed41321eb..0aed77396ec 100644 --- a/src/world/area_omo/omo_13/omo_13_1_music.c +++ b/src/world/area_omo/omo_13/omo_13_1_music.c @@ -1,7 +1,7 @@ #include "omo_13.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) + Return + End }; diff --git a/src/world/area_omo/omo_13/omo_13_2_main.c b/src/world/area_omo/omo_13/omo_13_2_main.c index 424cd7429d1..a14c787dc0f 100644 --- a/src/world/area_omo/omo_13/omo_13_2_main.c +++ b/src/world/area_omo/omo_13/omo_13_2_main.c @@ -4,26 +4,26 @@ EvtScript N(EVS_ExitWalk_omo_01_0) = EVT_EXIT_WALK(60, omo_13_ENTRY_0, "omo_01", EvtScript N(EVS_ExitWalk_omo_03_0) = EVT_EXIT_WALK(60, omo_13_ENTRY_1, "omo_03", omo_03_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_01_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_omo_01_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_omo_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_IF_EQ(GF_OMO13_Defeated_AntiGuy, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_he, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupGizmos)) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + IfEq(GF_OMO13_Defeated_AntiGuy, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_he, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupGizmos)) + ExecWait(N(EVS_SetupMusic)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; diff --git a/src/world/area_omo/omo_13/omo_13_3_gizmos.c b/src/world/area_omo/omo_13/omo_13_3_gizmos.c index f985a42a609..7956b89f479 100644 --- a/src/world/area_omo/omo_13/omo_13_3_gizmos.c +++ b/src/world/area_omo/omo_13/omo_13_3_gizmos.c @@ -2,59 +2,59 @@ #include "model.h" EvtScript N(EVS_Gizmos_Wheels) = { - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, -360, 100, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_ha1, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha2, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(MakeLerp, 0, -360, 100, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_ha1, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha2, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_Gizmos_Shutters) = { - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, 160, 60, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(MakeLerp, 160, 0, 60, EASING_COS_IN_OUT) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) - EVT_WAIT(2) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(MakeLerp, 0, 160, 60, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(MakeLerp, 160, 0, 60, EASING_COS_IN_OUT) + Label(2) + Call(UpdateLerp) + Call(RotateModel, MODEL_m1_1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_m1_2, LVar0, 0, 1, 0) + Wait(2) + IfEq(LVar1, 1) + Goto(2) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_Gizmos_Clocks) = { - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, -360, 100, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_hari1, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(MakeLerp, 0, -360, 100, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_hari1, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Goto(0) + Return + End }; s32 N(RockingHorseModels)[] = { @@ -65,10 +65,10 @@ s32 N(RockingHorseModels)[] = { #import "../common/RockingHorse.inc.c" EvtScript N(EVS_SetupGizmos) = { - EVT_EXEC(N(EVS_Gizmos_Wheels)) - EVT_EXEC(N(EVS_Gizmos_Shutters)) - EVT_EXEC(N(EVS_Gizmos_Clocks)) - EVT_EXEC(N(EVS_Gizmos_RockingHorses)) - EVT_RETURN - EVT_END + Exec(N(EVS_Gizmos_Wheels)) + Exec(N(EVS_Gizmos_Shutters)) + Exec(N(EVS_Gizmos_Clocks)) + Exec(N(EVS_Gizmos_RockingHorses)) + Return + End }; diff --git a/src/world/area_omo/omo_13/omo_13_4_npc.c b/src/world/area_omo/omo_13/omo_13_4_npc.c index a1eed070afd..dabc37bfe9f 100644 --- a/src/world/area_omo/omo_13/omo_13_4_npc.c +++ b/src/world/area_omo/omo_13/omo_13_4_npc.c @@ -21,77 +21,77 @@ s32 N(BribeItemList)[] = { }; EvtScript N(EVS_NpcInteract_AntiGuy) = { - EVT_IF_EQ(GF_OMO13_Defeated_AntiGuy, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim15, ANIM_ShyGuy_Black_Anim15, 5, MSG_CH4_004D) - EVT_RETURN - EVT_END_IF - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(5.0), 10, EVT_FLOAT(300.0), EVT_FLOAT(15.0), EVT_FLOAT(-7.5)) - EVT_CALL(FindItem, ITEM_LEMON_CANDY, LVar0) - EVT_IF_EQ(LVar0, -1) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_TouchNose) - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim11, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH4_0046) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim13, ANIM_ShyGuy_Black_Anim01, 0) - EVT_CALL(ShowChoice, MSG_Choice_0044) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim11, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH4_0048) - EVT_ELSE - EVT_WAIT(5) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim11, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH4_0047) - EVT_CALL(ShowChoice, MSG_Choice_0044) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim11, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH4_0048) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim11, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH4_0049) - EVT_CALL(SetNpcVar, NPC_SELF, 0, 1) - EVT_END_IF - EVT_END_IF - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim11, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH4_004A) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 30, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(30) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim11, ANIM_ShyGuy_Black_Anim01, 0) - EVT_WAIT(15) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_JoltAwake) - EVT_WAIT(15) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_WAIT(15) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim11, ANIM_ShyGuy_Black_Anim01, 0) - EVT_SET(LVar0, EVT_PTR(N(BribeItemList))) - EVT_SET(LVar1, -1) - EVT_EXEC_WAIT(N(EVS_ChooseItem)) - EVT_IF_EQ(LVar0, -1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim11, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH4_004B) - EVT_CALL(ShowChoice, MSG_Choice_0044) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim11, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH4_0048) - EVT_ELSE - EVT_WAIT(5) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim11, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH4_0047) - EVT_CALL(ShowChoice, MSG_Choice_0044) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim11, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH4_0048) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim11, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH4_0049) - EVT_CALL(SetNpcVar, NPC_SELF, 0, 1) - EVT_END_IF - EVT_END_IF - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim11, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH4_004C) - EVT_WAIT(20) - EVT_SET(GF_OMO13_Defeated_AntiGuy, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_he, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetNpcVar, NPC_SELF, 0, 2) - EVT_END_IF - EVT_END_IF - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5.0)) - EVT_RETURN - EVT_END + IfEq(GF_OMO13_Defeated_AntiGuy, TRUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim15, ANIM_ShyGuy_Black_Anim15, 5, MSG_CH4_004D) + Return + EndIf + Call(AdjustCam, CAM_DEFAULT, Float(5.0), 10, Float(300.0), Float(15.0), Float(-7.5)) + Call(FindItem, ITEM_LEMON_CANDY, LVar0) + IfEq(LVar0, -1) + Thread + Wait(10) + Call(SetPlayerAnimation, ANIM_MarioW2_TouchNose) + Wait(20) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndThread + Call(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim11, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH4_0046) + Call(EndSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim13, ANIM_ShyGuy_Black_Anim01, 0) + Call(ShowChoice, MSG_Choice_0044) + IfEq(LVar0, 0) + Call(ContinueSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim11, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH4_0048) + Else + Wait(5) + Call(ContinueSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim11, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH4_0047) + Call(ShowChoice, MSG_Choice_0044) + IfEq(LVar0, 0) + Call(ContinueSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim11, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH4_0048) + Else + Call(ContinueSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim11, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH4_0049) + Call(SetNpcVar, NPC_SELF, 0, 1) + EndIf + EndIf + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim11, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH4_004A) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 30, EMOTER_NPC, 0, 0, 0, 0) + Wait(30) + Call(EndSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim11, ANIM_ShyGuy_Black_Anim01, 0) + Wait(15) + Call(SetPlayerAnimation, ANIM_MarioW2_JoltAwake) + Wait(15) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + Wait(15) + Call(EndSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim11, ANIM_ShyGuy_Black_Anim01, 0) + Set(LVar0, Ref(N(BribeItemList))) + Set(LVar1, -1) + ExecWait(N(EVS_ChooseItem)) + IfEq(LVar0, -1) + Call(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim11, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH4_004B) + Call(ShowChoice, MSG_Choice_0044) + IfEq(LVar0, 0) + Call(ContinueSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim11, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH4_0048) + Else + Wait(5) + Call(ContinueSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim11, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH4_0047) + Call(ShowChoice, MSG_Choice_0044) + IfEq(LVar0, 0) + Call(ContinueSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim11, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH4_0048) + Else + Call(ContinueSpeech, NPC_SELF, ANIM_ShyGuy_Black_Anim11, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH4_0049) + Call(SetNpcVar, NPC_SELF, 0, 1) + EndIf + EndIf + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_ShyGuy_Black_Anim11, ANIM_ShyGuy_Black_Anim01, 0, MSG_CH4_004C) + Wait(20) + Set(GF_OMO13_Defeated_AntiGuy, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_he, COLLIDER_FLAGS_UPPER_MASK) + Call(SetNpcVar, NPC_SELF, 0, 2) + EndIf + EndIf + Call(ResetCam, CAM_DEFAULT, Float(5.0)) + Return + End }; API_CALLABLE(N(UpdateAntiGuyPosition)) { @@ -133,80 +133,80 @@ API_CALLABLE(N(UpdateAntiGuyPosition)) { } EvtScript N(EVS_NpcIdle_AntiGuy) = { - EVT_LABEL(0) - EVT_CALL(N(UpdateAntiGuyPosition)) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_EQ(LVar0, 1) - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_LABEL(1) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_GOTO(0) - EVT_ELSE - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Black_Anim02) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar2, -60) - EVT_IF_LT(LVar0, 110) - EVT_ADD(LVar0, 60) - EVT_ELSE - EVT_ADD(LVar0, -60) - EVT_END_IF - EVT_ELSE - EVT_IF_LT(LVar0, 110) - EVT_ADD(LVar0, -60) - EVT_ELSE - EVT_ADD(LVar0, 60) - EVT_END_IF - EVT_END_IF - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(3.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, -100, 0) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Black_Anim15) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_LABEL(9) - EVT_WAIT(1) - EVT_GOTO(9) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(N(UpdateAntiGuyPosition)) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Wait(1) + Goto(0) + EndIf + IfEq(LVar0, 1) + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Label(1) + Call(GetSelfVar, 0, LVar0) + IfNe(LVar0, 0) + Wait(1) + Goto(1) + EndIf + Goto(0) + Else + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Black_Anim02) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + IfLt(LVar2, -60) + IfLt(LVar0, 110) + Add(LVar0, 60) + Else + Add(LVar0, -60) + EndIf + Else + IfLt(LVar0, 110) + Add(LVar0, -60) + Else + Add(LVar0, 60) + EndIf + EndIf + Call(SetNpcSpeed, NPC_SELF, Float(3.0)) + Call(NpcMoveTo, NPC_SELF, LVar0, -100, 0) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Black_Anim15) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Label(9) + Wait(1) + Goto(9) + EndIf + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_NpcDefeat_AntiGuy) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_SET(GF_OMO13_Defeated_AntiGuy, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_he, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CALL(SetSelfVar, 0, 0) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(SetSelfVar, 0, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Set(GF_OMO13_Defeated_AntiGuy, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_he, COLLIDER_FLAGS_UPPER_MASK) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_LOST) + Call(SetSelfVar, 0, 0) + CaseEq(OUTCOME_PLAYER_FLED) + Call(SetSelfVar, 0, 0) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_AntiGuy) = { - EVT_IF_EQ(GF_OMO13_Defeated_AntiGuy, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_AntiGuy))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_AntiGuy))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_AntiGuy))) - EVT_ELSE - EVT_CALL(RemoveEncounter, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_OMO13_Defeated_AntiGuy, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_AntiGuy))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_AntiGuy))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_AntiGuy))) + Else + Call(RemoveEncounter, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_AntiGuy) = { diff --git a/src/world/area_omo/omo_13/omo_13_5_entity.c b/src/world/area_omo/omo_13/omo_13_5_entity.c index aab71300555..0be8773b366 100644 --- a/src/world/area_omo/omo_13/omo_13_5_entity.c +++ b/src/world/area_omo/omo_13/omo_13_5_entity.c @@ -6,13 +6,13 @@ EvtScript N(EVS_OpenChest_PowerPlus) = EVT_OPEN_CHEST_BADGE(ITEM_POWER_PLUS_B, GF_OMO13_Chest_PowerPlusB); EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 110, 0, -60, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_OMO13_Chest_PowerPlusB) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenChest_PowerPlus))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -375, 60, -95, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OMO13_ItemBlock_Coin) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 470, 60, -60, 0, ITEM_MAPLE_SYRUP, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OMO13_HiddenItem_MapleSyrup) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Chest), 110, 0, -60, 0, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_OMO13_Chest_PowerPlusB) + Call(AssignScript, Ref(N(EVS_OpenChest_PowerPlus))) + Call(MakeEntity, Ref(Entity_YellowBlock), -375, 60, -95, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OMO13_ItemBlock_Coin) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 470, 60, -60, 0, ITEM_MAPLE_SYRUP, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OMO13_HiddenItem_MapleSyrup) + Return + End }; diff --git a/src/world/area_omo/omo_14/omo_14_1_music.c b/src/world/area_omo/omo_14/omo_14_1_music.c index 7db90eadc78..4ac8ed3211e 100644 --- a/src/world/area_omo/omo_14/omo_14_1_music.c +++ b/src/world/area_omo/omo_14/omo_14_1_music.c @@ -1,7 +1,7 @@ #include "omo_14.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) + Return + End }; diff --git a/src/world/area_omo/omo_14/omo_14_2_main.c b/src/world/area_omo/omo_14/omo_14_2_main.c index 9a710aa4bf8..0263454d0e2 100644 --- a/src/world/area_omo/omo_14/omo_14_2_main.c +++ b/src/world/area_omo/omo_14/omo_14_2_main.c @@ -6,30 +6,30 @@ EvtScript N(EVS_ExitWalk_omo_02_1) = EVT_EXIT_WALK(60, omo_14_ENTRY_0, "omo_02", EvtScript N(EVS_ExitWalk_omo_15_0) = EVT_EXIT_WALK(60, omo_14_ENTRY_1, "omo_15", omo_15_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_02_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_15_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_omo_02_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_omo_15_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_IF_LT(GB_StoryProgress, STORY_CH4_OPENED_GENERAL_GUY_ROOM) - EVT_CALL(PlaySoundAtNpc, NPC_ShyGuy_01, SOUND_LOOP_SHY_GUY_CROWD_1, SOUND_SPACE_DEFAULT) - EVT_END_IF - EVT_EXEC(N(EVS_CreateDarkness)) - EVT_IF_GE(GB_StoryProgress, STORY_CH4_OPENED_GENERAL_GUY_ROOM) - EVT_CALL(EnableModel, MODEL_o823, FALSE) - EVT_CALL(EnableModel, MODEL_o828, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Exec(N(EVS_SetupMusic)) + IfLt(GB_StoryProgress, STORY_CH4_OPENED_GENERAL_GUY_ROOM) + Call(PlaySoundAtNpc, NPC_ShyGuy_01, SOUND_LOOP_SHY_GUY_CROWD_1, SOUND_SPACE_DEFAULT) + EndIf + Exec(N(EVS_CreateDarkness)) + IfGe(GB_StoryProgress, STORY_CH4_OPENED_GENERAL_GUY_ROOM) + Call(EnableModel, MODEL_o823, FALSE) + Call(EnableModel, MODEL_o828, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; diff --git a/src/world/area_omo/omo_14/omo_14_3_npc.c b/src/world/area_omo/omo_14/omo_14_3_npc.c index 68e2c06ffb2..4c777a11699 100644 --- a/src/world/area_omo/omo_14/omo_14_3_npc.c +++ b/src/world/area_omo/omo_14/omo_14_3_npc.c @@ -95,260 +95,260 @@ Vec2i N(CrowdChaseGoalPositions)[] = { }; EvtScript N(EVS_NpcIdle_ShyGuy_Loner) = { - EVT_SETF(LVarA, EVT_FLOAT(3.5 / DT)) - EVT_SET(AF_OMO_11, FALSE) - EVT_CALL(SetNpcSpeed, NPC_SELF, LVarA) - EVT_LABEL(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_IF_GT(LVar2, -210) - EVT_CALL(N(GetActingPartner)) - EVT_SET(MV_ActingPartner, LVar9) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(-1) - EVT_CALL(SetNpcSpeed, NPC_SELF, LVarA) - EVT_CALL(N(SurroundPlayer)) - EVT_IF_GT(LVarE, 30) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(PlaySound, SOUND_MASTER_SMACK) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 10 * DT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 1, 4, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_WAIT(3 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_PanicRun) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(PlaySound, SOUND_MASTER_PUNCH) - EVT_CALL(PlayerJump1, LVar0, LVar1, LVar2, 15 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_ELSE - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_CALL(NpcJump0, NPC_SELF, LVar3, LVar4, LVar5, 10 * DT) - EVT_END_IF - EVT_SET(LVarE, 0) - EVT_END_IF - EVT_CASE_EQ(PARTNER_WATT) - EVT_USE_BUF(EVT_PTR(N(CrowdChaseGoalPositions))) - EVT_BUF_READ2(LVar3, LVar4) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 180) - EVT_CALL(GetSelfVar, 1, LVar9) - EVT_IF_NE(LVar9, 6) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 15 * DT) - EVT_END_IF - EVT_IF_EQ(AF_OMO_11, FALSE) - EVT_SET(AF_OMO_11, TRUE) - EVT_END_IF - EVT_USE_BUF(EVT_PTR(N(CrowdChaseGoalPositions))) - EVT_BUF_READ2(LVar1, LVar2) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(4.0 / DT)) - EVT_CALL(N(SimpleMoveNPC), LVar3, LVar4) - EVT_ELSE - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 150) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_SELF, LVar3, 0, LVar4, 15 * DT) - EVT_WAIT(30 * DT) - EVT_ELSE - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_SELF, LVar3, 0, LVar4, 15 * DT) - EVT_WAIT(30 * DT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_CALL(SetSelfVar, 0, 1) - EVT_END_IF - EVT_CASE_EQ(PARTNER_BOW) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_IF_LT(LVar2, 30) - EVT_CALL(N(SimpleMoveNPC), 200, 0) - EVT_ELSE - EVT_CALL(N(SimpleMoveNPC), -150, 0) - EVT_END_IF - EVT_END_SWITCH - EVT_SET(LVar9, MV_ActingPartner) - EVT_CALL(SetSelfVar, 1, LVar9) - EVT_ELSE - EVT_CALL(N(SimpleMoveNPC), 200, 0) - EVT_END_IF - EVT_CASE_EQ(1) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_IF_LT(LVar2, 150) - EVT_CALL(N(GetActingPartner)) - EVT_IF_NE(LVar9, 6) - EVT_CALL(SetSelfVar, 0, 0) - EVT_END_IF - EVT_ELSE - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 5, MSG_CH4_005D) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 15 * DT) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(4.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_SELF, 230, 0, 0) - EVT_CALL(SetNpcSpeed, NPC_SELF, LVarA) - EVT_SET(LVar0, 1) - EVT_LOOP(10) - EVT_CALL(SetNpcVar, LVar0, 0, 2) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_WAIT(45 * DT) - EVT_CALL(StopSound, SOUND_LOOP_SHY_GUY_CROWD_1) - EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 5, MSG_CH4_005E) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(PlaySoundAtCollider, COLLIDER_tt1, SOUND_TROMP_CRASH, SOUND_SPACE_DEFAULT) - EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 0, 37, 37, 1, 10, 30) - EVT_CALL(EnableModel, MODEL_o821, TRUE) - EVT_LOOP(10) - EVT_CALL(EnableModel, MODEL_o823, TRUE) - EVT_CALL(EnableModel, MODEL_o828, TRUE) - EVT_WAIT(1) - EVT_CALL(EnableModel, MODEL_o823, FALSE) - EVT_CALL(EnableModel, MODEL_o828, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) - EVT_WAIT(40 * DT) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(4.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, 300, 0, 0) - EVT_SET(GB_StoryProgress, STORY_CH4_OPENED_GENERAL_GUY_ROOM) - EVT_WAIT(30 * DT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + SetF(LVarA, Float(3.5 / DT)) + Set(AF_OMO_11, FALSE) + Call(SetNpcSpeed, NPC_SELF, LVarA) + Label(0) + Call(GetSelfVar, 0, LVar0) + Switch(LVar0) + CaseEq(0) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + IfGt(LVar2, -210) + Call(N(GetActingPartner)) + Set(MV_ActingPartner, LVar9) + Switch(LVar9) + CaseEq(-1) + Call(SetNpcSpeed, NPC_SELF, LVarA) + Call(N(SurroundPlayer)) + IfGt(LVarE, 30) + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfEq(LVar1, 0) + Call(PlaySound, SOUND_MASTER_SMACK) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 10 * DT) + Thread + Call(ShakeCam, CAM_DEFAULT, 1, 4, Float(1.0)) + EndThread + Wait(3 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_PanicRun) + Call(SetPlayerJumpscale, Float(1.0)) + Call(PlaySound, SOUND_MASTER_PUNCH) + Call(PlayerJump1, LVar0, LVar1, LVar2, 15 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Else + Call(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + Call(NpcJump0, NPC_SELF, LVar3, LVar4, LVar5, 10 * DT) + EndIf + Set(LVarE, 0) + EndIf + CaseEq(PARTNER_WATT) + UseBuf(Ref(N(CrowdChaseGoalPositions))) + BufRead2(LVar3, LVar4) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + IfLt(LVar0, 180) + Call(GetSelfVar, 1, LVar9) + IfNe(LVar9, 6) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Call(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 15 * DT) + EndIf + IfEq(AF_OMO_11, FALSE) + Set(AF_OMO_11, TRUE) + EndIf + UseBuf(Ref(N(CrowdChaseGoalPositions))) + BufRead2(LVar1, LVar2) + Call(SetNpcSpeed, NPC_SELF, Float(4.0 / DT)) + Call(N(SimpleMoveNPC), LVar3, LVar4) + Else + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, 150) + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Call(NpcJump0, NPC_SELF, LVar3, 0, LVar4, 15 * DT) + Wait(30 * DT) + Else + Call(DisablePlayerInput, TRUE) + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Call(NpcJump0, NPC_SELF, LVar3, 0, LVar4, 15 * DT) + Wait(30 * DT) + Call(DisablePlayerInput, FALSE) + EndIf + Call(SetSelfVar, 0, 1) + EndIf + CaseEq(PARTNER_BOW) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + IfLt(LVar2, 30) + Call(N(SimpleMoveNPC), 200, 0) + Else + Call(N(SimpleMoveNPC), -150, 0) + EndIf + EndSwitch + Set(LVar9, MV_ActingPartner) + Call(SetSelfVar, 1, LVar9) + Else + Call(N(SimpleMoveNPC), 200, 0) + EndIf + CaseEq(1) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + IfLt(LVar2, 150) + Call(N(GetActingPartner)) + IfNe(LVar9, 6) + Call(SetSelfVar, 0, 0) + EndIf + Else + Call(DisablePlayerInput, TRUE) + Call(SpeakToPlayer, NPC_SELF, -1, -1, 5, MSG_CH4_005D) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Call(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 15 * DT) + Call(SetNpcSpeed, NPC_SELF, Float(4.0 / DT)) + Call(NpcMoveTo, NPC_SELF, 230, 0, 0) + Call(SetNpcSpeed, NPC_SELF, LVarA) + Set(LVar0, 1) + Loop(10) + Call(SetNpcVar, LVar0, 0, 2) + Add(LVar0, 1) + EndLoop + Wait(45 * DT) + Call(StopSound, SOUND_LOOP_SHY_GUY_CROWD_1) + Call(SpeakToPlayer, NPC_SELF, -1, -1, 5, MSG_CH4_005E) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(1.0)) + EndThread + Call(PlaySoundAtCollider, COLLIDER_tt1, SOUND_TROMP_CRASH, SOUND_SPACE_DEFAULT) + PlayEffect(EFFECT_BOMBETTE_BREAKING, 0, 37, 37, 1, 10, 30) + Call(EnableModel, MODEL_o821, TRUE) + Loop(10) + Call(EnableModel, MODEL_o823, TRUE) + Call(EnableModel, MODEL_o828, TRUE) + Wait(1) + Call(EnableModel, MODEL_o823, FALSE) + Call(EnableModel, MODEL_o828, FALSE) + Wait(1) + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) + Wait(40 * DT) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Wait(20 * DT) + Call(SetNpcSpeed, NPC_SELF, Float(4.0)) + Call(NpcMoveTo, NPC_SELF, 300, 0, 0) + Set(GB_StoryProgress, STORY_CH4_OPENED_GENERAL_GUY_ROOM) + Wait(30 * DT) + Call(DisablePlayerInput, FALSE) + Call(RemoveNpc, NPC_SELF) + EndIf + EndSwitch + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_NpcIdle_ShyGuy_Crowd) = { - EVT_CALL(RandInt, 15, LVarA) - EVT_ADD(LVarA, 20) - EVT_DIVF(LVarA, EVT_FLOAT(10.0 * DT)) - EVT_CALL(SetNpcSpeed, NPC_SELF, LVarA) - EVT_LABEL(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_IF_GT(LVar2, -210) - EVT_CALL(N(GetActingPartner)) - EVT_SET(MV_ActingPartner, LVar9) - EVT_SWITCH(LVar9) - EVT_CASE_EQ(-1) - EVT_CALL(SetNpcSpeed, NPC_SELF, LVarA) - EVT_CALL(N(SurroundPlayer)) - EVT_IF_GT(LVarE, 30) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_EQ(LVar1, 0) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 10 * DT) - EVT_ELSE - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_CALL(NpcJump0, NPC_SELF, LVar3, LVar4, LVar5, 10 * DT) - EVT_END_IF - EVT_SET(LVarE, 0) - EVT_END_IF - EVT_CASE_EQ(PARTNER_WATT) - EVT_CALL(GetSelfVar, 1, LVar9) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_IF_NE(LVar9, 6) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 15 * DT) - EVT_END_IF - EVT_CALL(GetSelfNpcID, LVar5) - EVT_USE_BUF(EVT_PTR(N(CrowdChaseGoalPositions))) - EVT_LOOP(LVar5) - EVT_BUF_READ2(LVar3, LVar4) - EVT_END_LOOP - EVT_IF_EQ(LVar0, LVarF) - EVT_SET(LVar3, LVar0) - EVT_ADD(LVar3, 10) - EVT_SET(LVar4, 50) - EVT_END_IF - EVT_SET(LVarF, LVar0) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(7.0 / DT)) - EVT_CALL(N(SimpleMoveNPC), LVar3, LVar4) - EVT_CALL(GetNpcVar, NPC_ShyGuy_01, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetSelfVar, 0, 1) - EVT_END_IF - EVT_CASE_EQ(PARTNER_BOW) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_IF_LT(LVar2, 30) - EVT_CALL(N(SimpleMoveNPC), 200, 0) - EVT_ELSE - EVT_CALL(N(SimpleMoveNPC), -150, 0) - EVT_END_IF - EVT_END_SWITCH - EVT_SET(LVar9, MV_ActingPartner) - EVT_CALL(SetSelfVar, 1, LVar9) - EVT_ELSE - EVT_CALL(N(SimpleMoveNPC), 200, 0) - EVT_END_IF - EVT_CASE_EQ(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(RandInt, 360, LVar0) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 0) - EVT_CALL(RandInt, 20 * DT, LVar0) - EVT_ADD(LVar0, 1) - EVT_WAIT(LVar0) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_SELF, 2) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 12 * DT) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(N(GetActingPartner)) - EVT_IF_NE(LVar9, 6) - EVT_CALL(SetSelfVar, 0, 0) - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(2) - EVT_CALL(RandInt, 15 * DT, LVar0) - EVT_ADD(LVar0, 1) - EVT_WAIT(LVar0) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_SELF, 235, LVar1, LVar2, 20 * DT * DT) - EVT_WAIT(30 * DT) - EVT_CALL(SetSelfVar, 0, 3) - EVT_CASE_EQ(3) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(4.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_SELF, 235, 0, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, 300, 0, 0) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(RandInt, 15, LVarA) + Add(LVarA, 20) + DivF(LVarA, Float(10.0 * DT)) + Call(SetNpcSpeed, NPC_SELF, LVarA) + Label(0) + Call(GetSelfVar, 0, LVar0) + Switch(LVar0) + CaseEq(0) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + IfGt(LVar2, -210) + Call(N(GetActingPartner)) + Set(MV_ActingPartner, LVar9) + Switch(LVar9) + CaseEq(-1) + Call(SetNpcSpeed, NPC_SELF, LVarA) + Call(N(SurroundPlayer)) + IfGt(LVarE, 30) + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfEq(LVar1, 0) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 10 * DT) + Else + Call(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + Call(NpcJump0, NPC_SELF, LVar3, LVar4, LVar5, 10 * DT) + EndIf + Set(LVarE, 0) + EndIf + CaseEq(PARTNER_WATT) + Call(GetSelfVar, 1, LVar9) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + IfNe(LVar9, 6) + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Call(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 15 * DT) + EndIf + Call(GetSelfNpcID, LVar5) + UseBuf(Ref(N(CrowdChaseGoalPositions))) + Loop(LVar5) + BufRead2(LVar3, LVar4) + EndLoop + IfEq(LVar0, LVarF) + Set(LVar3, LVar0) + Add(LVar3, 10) + Set(LVar4, 50) + EndIf + Set(LVarF, LVar0) + Call(SetNpcSpeed, NPC_SELF, Float(7.0 / DT)) + Call(N(SimpleMoveNPC), LVar3, LVar4) + Call(GetNpcVar, NPC_ShyGuy_01, 0, LVar0) + IfEq(LVar0, 1) + Call(SetSelfVar, 0, 1) + EndIf + CaseEq(PARTNER_BOW) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + IfLt(LVar2, 30) + Call(N(SimpleMoveNPC), 200, 0) + Else + Call(N(SimpleMoveNPC), -150, 0) + EndIf + EndSwitch + Set(LVar9, MV_ActingPartner) + Call(SetSelfVar, 1, LVar9) + Else + Call(N(SimpleMoveNPC), 200, 0) + EndIf + CaseEq(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(RandInt, 360, LVar0) + Call(InterpNpcYaw, NPC_SELF, LVar0, 0) + Call(RandInt, 20 * DT, LVar0) + Add(LVar0, 1) + Wait(LVar0) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_SELF, 2) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 12 * DT) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 1) + Call(N(GetActingPartner)) + IfNe(LVar9, 6) + Call(SetSelfVar, 0, 0) + EndIf + EndIf + CaseEq(2) + Call(RandInt, 15 * DT, LVar0) + Add(LVar0, 1) + Wait(LVar0) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Call(NpcJump0, NPC_SELF, 235, LVar1, LVar2, 20 * DT * DT) + Wait(30 * DT) + Call(SetSelfVar, 0, 3) + CaseEq(3) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(SetNpcSpeed, NPC_SELF, Float(4.0 / DT)) + Call(NpcMoveTo, NPC_SELF, 235, 0, 0) + Call(NpcMoveTo, NPC_SELF, 300, 0, 0) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_NpcInit_ShyGuy_Loner) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH4_OPENED_GENERAL_GUY_ROOM) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_ShyGuy_Loner))) - EVT_CALL(SetNpcPos, NPC_SELF, 120, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim02) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH4_OPENED_GENERAL_GUY_ROOM) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_ShyGuy_Loner))) + Call(SetNpcPos, NPC_SELF, 120, 0, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim02) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; Vec3i N(CrowdInitialPositions)[] = { @@ -365,21 +365,21 @@ Vec3i N(CrowdInitialPositions)[] = { }; EvtScript N(EVS_NpcInit_ShyGuy_Crowd) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_ShyGuy_Crowd))) - EVT_IF_LT(GB_StoryProgress, STORY_CH4_OPENED_GENERAL_GUY_ROOM) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_SUB(LVar0, 0) - EVT_USE_BUF(EVT_PTR(N(CrowdInitialPositions))) - EVT_LOOP(LVar0) - EVT_BUF_READ3(LVar1, LVar2, LVar3) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim02) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_ShyGuy_Crowd))) + IfLt(GB_StoryProgress, STORY_CH4_OPENED_GENERAL_GUY_ROOM) + Call(GetSelfNpcID, LVar0) + Sub(LVar0, 0) + UseBuf(Ref(N(CrowdInitialPositions))) + Loop(LVar0) + BufRead3(LVar1, LVar2, LVar3) + EndLoop + Call(SetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) + Call(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim02) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_ShyGuy_Loner) = { diff --git a/src/world/area_omo/omo_15/omo_15_1_music.c b/src/world/area_omo/omo_15/omo_15_1_music.c index a8db67f0383..00749bbbad9 100644 --- a/src/world/area_omo/omo_15/omo_15_1_music.c +++ b/src/world/area_omo/omo_15/omo_15_1_music.c @@ -1,14 +1,14 @@ #include "omo_15.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH4_DEFEATED_GENERAL_GUY) - EVT_CALL(SetMusicTrack, 0, SONG_GENERAL_GUY_THEME, 0, 8) - EVT_CASE_EQ(STORY_CH4_DEFEATED_GENERAL_GUY) - EVT_CALL(FadeOutMusic, 0, 500) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH4_DEFEATED_GENERAL_GUY) + Call(SetMusicTrack, 0, SONG_GENERAL_GUY_THEME, 0, 8) + CaseEq(STORY_CH4_DEFEATED_GENERAL_GUY) + Call(FadeOutMusic, 0, 500) + CaseDefault + Call(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_omo/omo_15/omo_15_2_main.c b/src/world/area_omo/omo_15/omo_15_2_main.c index 1657874bed1..8fbb6472ec0 100644 --- a/src/world/area_omo/omo_15/omo_15_2_main.c +++ b/src/world/area_omo/omo_15/omo_15_2_main.c @@ -6,97 +6,97 @@ EvtScript N(EVS_TrySpawningStarCard) = { // determine if card should be spawned - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_CH4_OPENED_GENERAL_GUY_ROOM) - EVT_SET(LVar0, FALSE) - EVT_SET(GB_StoryProgress, STORY_CH4_DEFEATED_GENERAL_GUY) - EVT_CASE_EQ(STORY_CH4_DEFEATED_GENERAL_GUY) - EVT_SET(LVar0, TRUE) - EVT_CASE_DEFAULT - EVT_RETURN - EVT_END_SWITCH - EVT_IF_EQ(LVar0, FALSE) + Switch(GB_StoryProgress) + CaseEq(STORY_CH4_OPENED_GENERAL_GUY_ROOM) + Set(LVar0, FALSE) + Set(GB_StoryProgress, STORY_CH4_DEFEATED_GENERAL_GUY) + CaseEq(STORY_CH4_DEFEATED_GENERAL_GUY) + Set(LVar0, TRUE) + CaseDefault + Return + EndSwitch + IfEq(LVar0, FALSE) // card appearing scene - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -100, 85, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.5)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -100, 30, 0) + Call(DisablePlayerInput, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, -100, 85, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.5)) + Call(SetPanTarget, CAM_DEFAULT, -100, 30, 0) EVT_SPIRIT_ADJUST_CAM(10000) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(N(StarSpiritEffectFunc2), 3, 180, 215, 60, 0, -100, 85, 0, 30, 0) - EVT_THREAD - EVT_CALL(N(StarSpiritEffectFunc3)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(PlaySound, SOUND_LOOP_STAR_ORB_RISING) - EVT_CALL(N(StarSpiritEffectFunc1)) - EVT_CALL(StopSound, SOUND_LOOP_STAR_ORB_RISING) - EVT_CALL(PlaySoundAt, SOUND_STAR_ORB_BURST, SOUND_SPACE_DEFAULT, -100, 85, 0) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(45) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(180) - EVT_WAIT(115) - EVT_CALL(PlaySoundAt, SOUND_STAR_CARD_APPEARS, SOUND_SPACE_DEFAULT, -100, 85, 0) - EVT_END_THREAD - EVT_CALL(N(StarSpiritEffectFunc4), 1) - EVT_THREAD - EVT_WAIT(80) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_ADD(LVar1, 100) - EVT_CALL(SetCamDistance, CAM_DEFAULT, LVar1) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -100, 0, 0) - EVT_CALL(N(StarSpiritEffectFunc4), 2) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar2, LVar3, LVar4) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar2, LVar3, LVar4) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ELSE + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(N(StarSpiritEffectFunc2), 3, 180, 215, 60, 0, -100, 85, 0, 30, 0) + Thread + Call(N(StarSpiritEffectFunc3)) + EndThread + Thread + Wait(1) + Call(PlaySound, SOUND_LOOP_STAR_ORB_RISING) + Call(N(StarSpiritEffectFunc1)) + Call(StopSound, SOUND_LOOP_STAR_ORB_RISING) + Call(PlaySoundAt, SOUND_STAR_ORB_BURST, SOUND_SPACE_DEFAULT, -100, 85, 0) + EndThread + Thread + Wait(45) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + EndThread + Thread + Wait(180) + Wait(115) + Call(PlaySoundAt, SOUND_STAR_CARD_APPEARS, SOUND_SPACE_DEFAULT, -100, 85, 0) + EndThread + Call(N(StarSpiritEffectFunc4), 1) + Thread + Wait(80) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndThread + Add(LVar1, 100) + Call(SetCamDistance, CAM_DEFAULT, LVar1) + Call(SetPanTarget, CAM_DEFAULT, -100, 0, 0) + Call(N(StarSpiritEffectFunc4), 2) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Call(UseSettingsFrom, CAM_DEFAULT, LVar2, LVar3, LVar4) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar2, LVar3, LVar4) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Else // just make the card spawn - EVT_CALL(N(StarSpiritEffectFunc5), 3, -100, 30, 0, 0) - EVT_THREAD - EVT_CALL(N(StarSpiritEffectFunc6)) - EVT_END_THREAD - EVT_WAIT(1) - EVT_END_IF + Call(N(StarSpiritEffectFunc5), 3, -100, 30, 0, 0) + Thread + Call(N(StarSpiritEffectFunc6)) + EndThread + Wait(1) + EndIf // wait for pickup - EVT_CALL(N(StarSpiritEffectFunc4), 3) - EVT_CALL(PlaySoundAtPlayer, SOUND_RESCUE_STAR_SPIRIT, SOUND_SPACE_DEFAULT) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(GB_StoryProgress, STORY_CH4_STAR_SPIRIT_RESCUED) - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_23"), kmr_23_ENTRY_3, TRANSITION_GET_STAR_CARD) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(N(StarSpiritEffectFunc4), 3) + Call(PlaySoundAtPlayer, SOUND_RESCUE_STAR_SPIRIT, SOUND_SPACE_DEFAULT) + Call(DisablePlayerInput, TRUE) + Set(GB_StoryProgress, STORY_CH4_STAR_SPIRIT_RESCUED) + Call(GotoMapSpecial, Ref("kmr_23"), kmr_23_ENTRY_3, TRANSITION_GET_STAR_CARD) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_omo_14_1) = EVT_EXIT_WALK(60, omo_15_ENTRY_0, "omo_14", omo_14_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_14_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_omo_14_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_IF_EQ(GB_StoryProgress, STORY_CH4_DEFEATED_GENERAL_GUY) - EVT_EXEC(N(EVS_TrySpawningStarCard)) - EVT_END_IF - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_SetupMusic)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + IfEq(GB_StoryProgress, STORY_CH4_DEFEATED_GENERAL_GUY) + Exec(N(EVS_TrySpawningStarCard)) + EndIf + Return + End }; diff --git a/src/world/area_omo/omo_15/omo_15_3_npc.c b/src/world/area_omo/omo_15/omo_15_3_npc.c index bd419dd0898..d1a2751ff36 100644 --- a/src/world/area_omo/omo_15/omo_15_3_npc.c +++ b/src/world/area_omo/omo_15/omo_15_3_npc.c @@ -21,99 +21,99 @@ s32 N(BeginSurroundCrowdPositions)[] = { }; EvtScript N(EVS_Scene_MeetingGeneralGuy) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(30 * DT) - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(InterruptUsePartner) - EVT_WAIT(30 * DT) - EVT_CALL(func_802D2C14, 1) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_WAIT(45 * DT) - EVT_CALL(func_802D2C14, 0) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_GeneralGuy, ANIM_GeneralGuy_Anim0A, ANIM_GeneralGuy_Anim02, 0, MSG_CH4_005F) - EVT_WAIT(10 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 250, -50, 10) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 250, -50, 10) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(205.0), EVT_FLOAT(11.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_GeneralGuy, ANIM_GeneralGuy_Anim0A, ANIM_GeneralGuy_Anim02, 0, MSG_CH4_0060) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_GeneralGuy, ANIM_GeneralGuy_Anim0A, ANIM_GeneralGuy_Anim02, 0, MSG_CH4_0061) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_GeneralGuy, ANIM_GeneralGuy_Anim0A, ANIM_GeneralGuy_Anim02, 0, MSG_CH4_0062) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PlayerMoveTo, -200, 0, 0) - EVT_SET(LVar0, NPC_ShyGuy_01) - EVT_LOOP(9) - EVT_CALL(SetNpcAnimation, LVar0, ANIM_ShyGuy_Red_Anim02) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_GeneralGuy, ANIM_GeneralGuy_Anim0C) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH4_0063, 160, 40) - EVT_CALL(SetNpcAnimation, NPC_GeneralGuy, ANIM_GeneralGuy_Anim02) - EVT_WAIT(20 * DT) - EVT_SET(LVar0, NPC_ShyGuy_01) - EVT_LOOP(9) - EVT_CALL(SetNpcAnimation, LVar0, ANIM_ShyGuy_Red_Anim01) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_CALL(SpeakToPlayer, NPC_GeneralGuy, ANIM_GeneralGuy_Anim02, ANIM_GeneralGuy_Anim0A, 0, MSG_CH4_0064) - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(PlaySound, SOUND_LOOP_SHY_GUY_CROWD_2) - EVT_SET(LVar0, NPC_ShyGuy_01) - EVT_LOOP(9) - EVT_CALL(SetNpcVar, LVar0, 0, MANAGER_ARMY_CHARGE) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_END_THREAD + Call(DisablePlayerInput, TRUE) + Wait(30 * DT) + Thread + Wait(10 * DT) + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, PARTNER_NONE) + Call(InterruptUsePartner) + Wait(30 * DT) + Call(func_802D2C14, 1) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Wait(45 * DT) + Call(func_802D2C14, 0) + EndIf + EndThread + Call(SpeakToPlayer, NPC_GeneralGuy, ANIM_GeneralGuy_Anim0A, ANIM_GeneralGuy_Anim02, 0, MSG_CH4_005F) + Wait(10 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, 250, -50, 10) + Call(SetPanTarget, CAM_DEFAULT, 250, -50, 10) + Call(SetCamPosB, CAM_DEFAULT, Float(205.0), Float(11.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_GeneralGuy, ANIM_GeneralGuy_Anim0A, ANIM_GeneralGuy_Anim02, 0, MSG_CH4_0060) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_GeneralGuy, ANIM_GeneralGuy_Anim0A, ANIM_GeneralGuy_Anim02, 0, MSG_CH4_0061) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_GeneralGuy, ANIM_GeneralGuy_Anim0A, ANIM_GeneralGuy_Anim02, 0, MSG_CH4_0062) + Call(SetPlayerSpeed, Float(3.0 / DT)) + Call(PlayerMoveTo, -200, 0, 0) + Set(LVar0, NPC_ShyGuy_01) + Loop(9) + Call(SetNpcAnimation, LVar0, ANIM_ShyGuy_Red_Anim02) + Add(LVar0, 1) + EndLoop + Call(SetNpcAnimation, NPC_GeneralGuy, ANIM_GeneralGuy_Anim0C) + Call(ShowMessageAtScreenPos, MSG_CH4_0063, 160, 40) + Call(SetNpcAnimation, NPC_GeneralGuy, ANIM_GeneralGuy_Anim02) + Wait(20 * DT) + Set(LVar0, NPC_ShyGuy_01) + Loop(9) + Call(SetNpcAnimation, LVar0, ANIM_ShyGuy_Red_Anim01) + Add(LVar0, 1) + EndLoop + Call(SpeakToPlayer, NPC_GeneralGuy, ANIM_GeneralGuy_Anim02, ANIM_GeneralGuy_Anim0A, 0, MSG_CH4_0064) + Thread + Wait(10 * DT) + Call(PlaySound, SOUND_LOOP_SHY_GUY_CROWD_2) + Set(LVar0, NPC_ShyGuy_01) + Loop(9) + Call(SetNpcVar, LVar0, 0, MANAGER_ARMY_CHARGE) + Add(LVar0, 1) + EndLoop + EndThread // screen 'shaking' from charging army - EVT_LOOP(30) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(330.0)) - EVT_WAIT(1) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(320.0)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(LVar0, NPC_ShyGuy_01) - EVT_USE_BUF(EVT_PTR(N(BeginSurroundCrowdPositions))) - EVT_LOOP(9) - EVT_BUF_READ3(LVar1, LVar2, LVar3) - EVT_CALL(SetNpcSpeed, LVar0, LVar1) - EVT_CALL(SetNpcPos, LVar0, LVar2, 0, LVar3) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_WAIT(20 * DT) + Loop(30) + Call(SetCamDistance, CAM_DEFAULT, Float(330.0)) + Wait(1) + Call(SetCamDistance, CAM_DEFAULT, Float(320.0)) + Wait(1) + EndLoop + Set(LVar0, NPC_ShyGuy_01) + UseBuf(Ref(N(BeginSurroundCrowdPositions))) + Loop(9) + BufRead3(LVar1, LVar2, LVar3) + Call(SetNpcSpeed, LVar0, LVar1) + Call(SetNpcPos, LVar0, LVar2, 0, LVar3) + Add(LVar0, 1) + EndLoop + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Wait(20 * DT) // wait for battle to be over - EVT_LABEL(5) - EVT_CALL(GetNpcVar, NPC_ShyGuy_09, 0, LVar0) - EVT_IF_NE(LVar0, MANAGER_ARMY_FLEE) - EVT_WAIT(1) - EVT_GOTO(5) - EVT_END_IF - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_EQ(LVar0, PARTNER_WATT) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_TALK, PARTNER_ANIM_IDLE, 0, MSG_CH4_0075) - EVT_CALL(EnablePartnerAI) - EVT_END_IF - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 150, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.5 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(FadeOutMusic, 0, 3000 * DT) - EVT_EXEC(N(EVS_TrySpawningStarCard)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Label(5) + Call(GetNpcVar, NPC_ShyGuy_09, 0, LVar0) + IfNe(LVar0, MANAGER_ARMY_FLEE) + Wait(1) + Goto(5) + EndIf + Call(GetCurrentPartnerID, LVar0) + IfEq(LVar0, PARTNER_WATT) + Call(DisablePartnerAI, 0) + Call(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_TALK, PARTNER_ANIM_IDLE, 0, MSG_CH4_0075) + Call(EnablePartnerAI) + EndIf + Call(InterpPlayerYaw, 90, 0) + Call(SetPanTarget, CAM_DEFAULT, 150, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.5 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(FadeOutMusic, 0, 3000 * DT) + Exec(N(EVS_TrySpawningStarCard)) + Call(DisablePlayerInput, FALSE) + Return + End }; s32 N(CrowdFleeScriptA)[] = { @@ -240,160 +240,160 @@ Vec3i N(PostBattleGeneralPosition) = { }; EvtScript N(EVS_NpcIdle_ShyGuy) = { - EVT_LABEL(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(MANAGER_ARMY_CHARGE) - EVT_THREAD - EVT_CALL(GetSelfNpcID, LVar0) - EVT_SUB(LVar0, 0) - EVT_USE_BUF(EVT_PTR(N(FinalSurroundCrowdPositions))) - EVT_LOOP(LVar0) - EVT_BUF_READ3(LVar1, LVar2, LVar3) - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(3.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar1, LVar2, LVar3) - EVT_END_THREAD - EVT_WAIT(60) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_CALL(SetSelfVar, 0, MANAGER_IDLE_STATE) - EVT_IF_EQ(LVar0, NPC_ShyGuy_09) - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(StopSound, SOUND_LOOP_SHY_GUY_CROWD_2) - EVT_END_THREAD - EVT_CALL(StartBossBattle, SONG_GENERAL_GUY_BATTLE) - EVT_END_IF - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetSelfVar, 0, LVar0) + Switch(LVar0) + CaseEq(MANAGER_ARMY_CHARGE) + Thread + Call(GetSelfNpcID, LVar0) + Sub(LVar0, 0) + UseBuf(Ref(N(FinalSurroundCrowdPositions))) + Loop(LVar0) + BufRead3(LVar1, LVar2, LVar3) + EndLoop + Call(SetNpcAnimation, NPC_SELF, ANIM_ShyGuy_Red_Anim03) + Call(SetNpcSpeed, NPC_SELF, Float(3.0)) + Call(NpcMoveTo, NPC_SELF, LVar1, LVar2, LVar3) + EndThread + Wait(60) + Call(GetSelfNpcID, LVar0) + Call(SetSelfVar, 0, MANAGER_IDLE_STATE) + IfEq(LVar0, NPC_ShyGuy_09) + Thread + Wait(20) + Call(StopSound, SOUND_LOOP_SHY_GUY_CROWD_2) + EndThread + Call(StartBossBattle, SONG_GENERAL_GUY_BATTLE) + EndIf + EndSwitch + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_BossDefeated_RunAway) = { - EVT_CALL(GetSelfNpcID, LVar9) - EVT_IF_EQ(LVar9, NPC_GeneralGuy) - EVT_CALL(PlaySound, SOUND_LOOP_SHY_GUY_CROWD_2) - EVT_USE_BUF(EVT_PTR(N(GeneralGuyFleeScripts))) - EVT_BUF_READ1(LVar1) - EVT_USE_BUF(LVar1) - EVT_CALL(SetNpcAnimation, LVar9, ANIM_GeneralGuy_Anim0E) - EVT_LOOP(0) - EVT_BUF_READ1(LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(op_CS_MOVE) - EVT_BUF_READ2(LVar3, LVar4) - EVT_CALL(SetNpcSpeed, NPC_GeneralGuy, EVT_FLOAT(8.0)) - EVT_CALL(NpcMoveTo, NPC_GeneralGuy, LVar3, LVar4, 0) - EVT_CASE_EQ(op_CS_JUMP) - EVT_BUF_READ3(LVar3, LVar4, LVar5) - EVT_CALL(SetNpcJumpscale, NPC_GeneralGuy, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_GeneralGuy, LVar3, LVar4, LVar5, 10) - EVT_END_SWITCH - EVT_IF_EQ(LVar2, op_CS_END) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySound, SOUND_LRAW_SHY_GUY_CROWD_2 | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_CALL(StopTrackingSoundPos, SOUND_LRAW_SHY_GUY_CROWD_2) - EVT_ELSE - EVT_SET(LVar0, LVar9) - EVT_SUB(LVar0, 0) - EVT_USE_BUF(EVT_PTR(N(CrowdFleeScripts))) - EVT_LOOP(LVar0) - EVT_BUF_READ1(LVar1) - EVT_END_LOOP - EVT_USE_BUF(LVar1) - EVT_LOOP(0) - EVT_BUF_READ1(LVar2) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(op_CS_MOVE) - EVT_BUF_READ2(LVar3, LVar4) - EVT_CALL(SetNpcAnimation, LVar9, ANIM_ShyGuy_Red_Anim04) - EVT_CALL(SetNpcSpeed, LVar9, EVT_FLOAT(8.0)) - EVT_CALL(NpcMoveTo, LVar9, LVar3, LVar4, 0) - EVT_CASE_EQ(op_CS_JUMP) - EVT_BUF_READ3(LVar3, LVar4, LVar5) - EVT_CALL(SetNpcJumpscale, LVar9, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, LVar9, LVar3, LVar4, LVar5, 10) - EVT_CASE_EQ(op_CS_FALL) - EVT_CALL(SetNpcRotationPivot, LVar9, 10) - EVT_THREAD - EVT_SET(LVar3, 0) - EVT_LOOP(10) - EVT_ADD(LVar3, 9) - EVT_CALL(SetNpcRotation, LVar9, 0, 0, LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(NpcJump0, LVar9, -180, 0, 63, 4) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetNpcRotation, LVar9, 0, 0, 0) - EVT_CALL(SetNpcAnimation, LVar9, ANIM_ShyGuy_Red_Anim10) - EVT_CALL(PlayerFaceNpc, LVar9, 3) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, LVar9, 3) - EVT_END_THREAD - EVT_CALL(NpcJump0, LVar9, -220, 0, 63, 10) - EVT_CALL(PlaySoundAtNpc, LVar9, SOUND_ACTOR_TRIP, SOUND_SPACE_DEFAULT) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0)) - EVT_WAIT(50) - EVT_LOOP(2) - EVT_CALL(PlaySoundAtNpc, LVar9, SOUND_ACTOR_TWITCH, SOUND_SPACE_DEFAULT) - EVT_WAIT(7) - EVT_END_LOOP - EVT_WAIT(6) - EVT_CALL(SetNpcRotationPivot, LVar9, 0) - EVT_CALL(SetNpcAnimation, LVar9, ANIM_ShyGuy_Red_Anim01) - EVT_CALL(NpcJump0, LVar9, -230, 0, 63, 10) - EVT_CALL(InterpNpcYaw, LVar9, 90, 0) - EVT_WAIT(20) - EVT_THREAD - EVT_CALL(PlaySoundAtNpc, LVar9, SOUND_SHY_GUY_FLEE_LOOP, SOUND_SPACE_DEFAULT) - EVT_WAIT(45) - EVT_CALL(StopSound, SOUND_SHY_GUY_FLEE_LOOP) - EVT_CALL(SetNpcVar, NPC_ShyGuy_09, 0, MANAGER_ARMY_FLEE) - EVT_END_THREAD - EVT_END_SWITCH - EVT_IF_EQ(LVar2, op_CS_END) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_CALL(SetNpcFlagBits, LVar9, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcPos, LVar9, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END + Call(GetSelfNpcID, LVar9) + IfEq(LVar9, NPC_GeneralGuy) + Call(PlaySound, SOUND_LOOP_SHY_GUY_CROWD_2) + UseBuf(Ref(N(GeneralGuyFleeScripts))) + BufRead1(LVar1) + UseBuf(LVar1) + Call(SetNpcAnimation, LVar9, ANIM_GeneralGuy_Anim0E) + Loop(0) + BufRead1(LVar2) + Switch(LVar2) + CaseEq(op_CS_MOVE) + BufRead2(LVar3, LVar4) + Call(SetNpcSpeed, NPC_GeneralGuy, Float(8.0)) + Call(NpcMoveTo, NPC_GeneralGuy, LVar3, LVar4, 0) + CaseEq(op_CS_JUMP) + BufRead3(LVar3, LVar4, LVar5) + Call(SetNpcJumpscale, NPC_GeneralGuy, Float(1.0)) + Call(NpcJump0, NPC_GeneralGuy, LVar3, LVar4, LVar5, 10) + EndSwitch + IfEq(LVar2, op_CS_END) + BreakLoop + EndIf + EndLoop + Call(PlaySound, SOUND_LRAW_SHY_GUY_CROWD_2 | SOUND_ID_TRIGGER_CHANGE_SOUND) + Call(StopTrackingSoundPos, SOUND_LRAW_SHY_GUY_CROWD_2) + Else + Set(LVar0, LVar9) + Sub(LVar0, 0) + UseBuf(Ref(N(CrowdFleeScripts))) + Loop(LVar0) + BufRead1(LVar1) + EndLoop + UseBuf(LVar1) + Loop(0) + BufRead1(LVar2) + Switch(LVar2) + CaseEq(op_CS_MOVE) + BufRead2(LVar3, LVar4) + Call(SetNpcAnimation, LVar9, ANIM_ShyGuy_Red_Anim04) + Call(SetNpcSpeed, LVar9, Float(8.0)) + Call(NpcMoveTo, LVar9, LVar3, LVar4, 0) + CaseEq(op_CS_JUMP) + BufRead3(LVar3, LVar4, LVar5) + Call(SetNpcJumpscale, LVar9, Float(1.0)) + Call(NpcJump0, LVar9, LVar3, LVar4, LVar5, 10) + CaseEq(op_CS_FALL) + Call(SetNpcRotationPivot, LVar9, 10) + Thread + Set(LVar3, 0) + Loop(10) + Add(LVar3, 9) + Call(SetNpcRotation, LVar9, 0, 0, LVar3) + Wait(1) + EndLoop + EndThread + Call(NpcJump0, LVar9, -180, 0, 63, 4) + Thread + Wait(10) + Call(SetNpcRotation, LVar9, 0, 0, 0) + Call(SetNpcAnimation, LVar9, ANIM_ShyGuy_Red_Anim10) + Call(PlayerFaceNpc, LVar9, 3) + Call(NpcFaceNpc, NPC_PARTNER, LVar9, 3) + EndThread + Call(NpcJump0, LVar9, -220, 0, 63, 10) + Call(PlaySoundAtNpc, LVar9, SOUND_ACTOR_TRIP, SOUND_SPACE_DEFAULT) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.0)) + Wait(50) + Loop(2) + Call(PlaySoundAtNpc, LVar9, SOUND_ACTOR_TWITCH, SOUND_SPACE_DEFAULT) + Wait(7) + EndLoop + Wait(6) + Call(SetNpcRotationPivot, LVar9, 0) + Call(SetNpcAnimation, LVar9, ANIM_ShyGuy_Red_Anim01) + Call(NpcJump0, LVar9, -230, 0, 63, 10) + Call(InterpNpcYaw, LVar9, 90, 0) + Wait(20) + Thread + Call(PlaySoundAtNpc, LVar9, SOUND_SHY_GUY_FLEE_LOOP, SOUND_SPACE_DEFAULT) + Wait(45) + Call(StopSound, SOUND_SHY_GUY_FLEE_LOOP) + Call(SetNpcVar, NPC_ShyGuy_09, 0, MANAGER_ARMY_FLEE) + EndThread + EndSwitch + IfEq(LVar2, op_CS_END) + BreakLoop + EndIf + EndLoop + EndIf + Call(SetNpcFlagBits, LVar9, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcPos, LVar9, NPC_DISPOSE_LOCATION) + Return + End }; EvtScript N(EVS_NpcDefeat_GeneralGuy) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_IF_EQ(LVar0, NPC_GeneralGuy) - EVT_CALL(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAG_2, TRUE) - EVT_USE_BUF(EVT_PTR(N(FinalSurroundCrowdPositions))) - EVT_SET(LVar0, NPC_ShyGuy_01) - EVT_LOOP(9) - EVT_BUF_READ3(LVar1, LVar2, LVar3) - EVT_CALL(SetNpcPos, LVar0, LVar1, 0, LVar2) - EVT_CALL(NpcFacePlayer, LVar0, 0) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_USE_BUF(EVT_PTR(N(PostBattleGeneralPosition))) - EVT_BUF_READ3(LVar1, LVar2, LVar3) - EVT_CALL(SetNpcPos, NPC_GeneralGuy, LVar1, LVar2, LVar3) - EVT_END_IF - EVT_EXEC(N(EVS_BossDefeated_RunAway)) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) + Call(GetSelfNpcID, LVar0) + IfEq(LVar0, NPC_GeneralGuy) + Call(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAG_2, TRUE) + UseBuf(Ref(N(FinalSurroundCrowdPositions))) + Set(LVar0, NPC_ShyGuy_01) + Loop(9) + BufRead3(LVar1, LVar2, LVar3) + Call(SetNpcPos, LVar0, LVar1, 0, LVar2) + Call(NpcFacePlayer, LVar0, 0) + Add(LVar0, 1) + EndLoop + UseBuf(Ref(N(PostBattleGeneralPosition))) + BufRead3(LVar1, LVar2, LVar3) + Call(SetNpcPos, NPC_GeneralGuy, LVar1, LVar2, LVar3) + EndIf + Exec(N(EVS_BossDefeated_RunAway)) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; Vec3i N(InitialCrowdPositions)[] = { @@ -409,33 +409,33 @@ Vec3i N(InitialCrowdPositions)[] = { }; EvtScript N(EVS_NpcInit_ShyGuy) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH4_DEFEATED_GENERAL_GUY) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_ShyGuy))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_GeneralGuy))) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_SUB(LVar0, 0) - EVT_USE_BUF(EVT_PTR(N(InitialCrowdPositions))) - EVT_LOOP(LVar0) - EVT_BUF_READ3(LVar1, LVar2, LVar3) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH4_DEFEATED_GENERAL_GUY) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_ShyGuy))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_GeneralGuy))) + Call(GetSelfNpcID, LVar0) + Sub(LVar0, 0) + UseBuf(Ref(N(InitialCrowdPositions))) + Loop(LVar0) + BufRead3(LVar1, LVar2, LVar3) + EndLoop + Call(SetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) + Else + Call(RemoveNpc, NPC_SELF) + Return + EndIf + Return + End }; EvtScript N(EVS_NpcInit_GeneralGuy) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH4_DEFEATED_GENERAL_GUY) - EVT_EXEC(N(EVS_Scene_MeetingGeneralGuy)) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_GeneralGuy))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH4_DEFEATED_GENERAL_GUY) + Exec(N(EVS_Scene_MeetingGeneralGuy)) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_GeneralGuy))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_GeneralGuy)[] = { diff --git a/src/world/area_omo/omo_16/omo_16_1_main.c b/src/world/area_omo/omo_16/omo_16_1_main.c index 536d4eed346..c8bfc8c28ca 100644 --- a/src/world/area_omo/omo_16/omo_16_1_main.c +++ b/src/world/area_omo/omo_16/omo_16_1_main.c @@ -1,13 +1,13 @@ #include "omo_16.h" EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(SetMusicTrack, 0, SONG_TOYBOX_TRAIN, 0, 8) - EVT_EXEC_WAIT(N(EVS_802429C4)) - EVT_WAIT(3) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Call(SetMusicTrack, 0, SONG_TOYBOX_TRAIN, 0, 8) + ExecWait(N(EVS_802429C4)) + Wait(3) + Return + End }; diff --git a/src/world/area_omo/omo_16/omo_16_2_train.c b/src/world/area_omo/omo_16/omo_16_2_train.c index b2bc57bfac3..ee56c82059b 100644 --- a/src/world/area_omo/omo_16/omo_16_2_train.c +++ b/src/world/area_omo/omo_16/omo_16_2_train.c @@ -3,75 +3,75 @@ #include "../common/ToyTrain.inc.c" EvtScript N(D_8024262C_DEE4FC) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, omo_16_ENTRY_0) - EVT_WAIT(140) - EVT_SWITCH(GB_OMO_TrainDestination) - EVT_CASE_EQ(0) - EVT_IF_EQ(AB_OMO_6, 1) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 5, MSG_CH4_000B) - EVT_END_IF - EVT_CASE_EQ(1) - EVT_IF_EQ(AB_OMO_6, 2) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 5, MSG_CH4_000C) - EVT_END_IF - EVT_CASE_EQ(2) - EVT_IF_EQ(AB_OMO_6, 3) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 5, MSG_CH4_000D) - EVT_END_IF - EVT_CASE_EQ(3) - EVT_IF_EQ(AB_OMO_6, 0) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 5, MSG_CH4_000A) - EVT_END_IF - EVT_END_SWITCH - EVT_ELSE - EVT_WAIT(140) - EVT_SWITCH(GB_OMO_TrainDestination) - EVT_CASE_EQ(0) - EVT_IF_EQ(AB_OMO_6, 0) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 5, MSG_CH4_000A) - EVT_END_IF - EVT_CASE_EQ(1) - EVT_IF_EQ(AB_OMO_6, 1) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 5, MSG_CH4_000B) - EVT_END_IF - EVT_CASE_EQ(2) - EVT_IF_EQ(AB_OMO_6, 2) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 5, MSG_CH4_000C) - EVT_END_IF - EVT_CASE_EQ(3) - EVT_IF_EQ(AB_OMO_6, 3) - EVT_CALL(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 5, MSG_CH4_000D) - EVT_END_IF - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, omo_16_ENTRY_0) + Wait(140) + Switch(GB_OMO_TrainDestination) + CaseEq(0) + IfEq(AB_OMO_6, 1) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 5, MSG_CH4_000B) + EndIf + CaseEq(1) + IfEq(AB_OMO_6, 2) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 5, MSG_CH4_000C) + EndIf + CaseEq(2) + IfEq(AB_OMO_6, 3) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 5, MSG_CH4_000D) + EndIf + CaseEq(3) + IfEq(AB_OMO_6, 0) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 5, MSG_CH4_000A) + EndIf + EndSwitch + Else + Wait(140) + Switch(GB_OMO_TrainDestination) + CaseEq(0) + IfEq(AB_OMO_6, 0) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 5, MSG_CH4_000A) + EndIf + CaseEq(1) + IfEq(AB_OMO_6, 1) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 5, MSG_CH4_000B) + EndIf + CaseEq(2) + IfEq(AB_OMO_6, 2) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 5, MSG_CH4_000C) + EndIf + CaseEq(3) + IfEq(AB_OMO_6, 3) + Call(SpeakToPlayer, NPC_Conductor, ANIM_TrainToad_Talk, ANIM_TrainToad_Idle, 5, MSG_CH4_000D) + EndIf + EndSwitch + EndIf + Return + End }; EvtScript N(D_802428CC_DEE79C) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, -2000) - EVT_SET(LVar0, -2000) - EVT_END_IF - EVT_IF_GT(LVar0, 2000) - EVT_SET(LVar0, 2000) - EVT_END_IF - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, EVT_FLOAT(50.0), LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, -2000) + Set(LVar0, -2000) + EndIf + IfGt(LVar0, 2000) + Set(LVar0, 2000) + EndIf + Call(SetCamTarget, CAM_DEFAULT, LVar0, Float(50.0), LVar2) + Wait(1) + Goto(0) + Return + End }; s32 N(D_80242984_DEE854)[] = { - -1550, EVT_FLOAT(0.0), EVT_FLOAT(90.0), 1550, EVT_FLOAT(0.0), + -1550, Float(0.0), Float(90.0), 1550, Float(0.0), -1, -1, -1 }; s32 N(D_802429A4_DEE874)[] = { - 1550, EVT_FLOAT(0.0), EVT_FLOAT(270.0), -1550, EVT_FLOAT(0.0), + 1550, Float(0.0), Float(270.0), -1550, Float(0.0), -1, -1, -1 }; @@ -90,75 +90,75 @@ API_CALLABLE(N(CheckForSceneSkip)) { } EvtScript N(EVS_802429C4) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_EXEC(N(D_802428CC_DEE79C)) - EVT_EXEC(N(D_8024262C_DEE4FC)) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, omo_16_ENTRY_0) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_80242984_DEE854))) - EVT_SET(MV_TrainUnk_02, 0) - EVT_EXEC(N(EVS_Scene_RideTrain)) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_THREAD - EVT_LABEL(10) - EVT_CALL(N(CheckForSceneSkip)) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(11) - EVT_END_IF - EVT_WAIT(1) - EVT_IF_LT(MV_TrainPos, 1400) - EVT_GOTO(10) - EVT_END_IF - EVT_SWITCH(GB_OMO_TrainDestination) - EVT_CASE_EQ(0) - EVT_CALL(GotoMap, EVT_PTR("omo_06"), omo_06_ENTRY_2) - EVT_CASE_EQ(1) - EVT_CALL(GotoMap, EVT_PTR("omo_08"), omo_08_ENTRY_1) - EVT_CASE_EQ(2) - EVT_CALL(GotoMap, EVT_PTR("omo_10"), omo_10_ENTRY_2) - EVT_CASE_EQ(3) - EVT_CALL(GotoMap, EVT_PTR("omo_03"), omo_03_ENTRY_2) - EVT_END_SWITCH - EVT_WAIT(100) - EVT_RETURN - EVT_LABEL(11) - EVT_EXEC_WAIT(N(EVS_TrainUnk_G)) - EVT_END_THREAD - EVT_ELSE - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(D_802429A4_DEE874))) - EVT_SET(MV_TrainUnk_02, 0) - EVT_EXEC(N(EVS_Scene_RideTrain)) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_THREAD - EVT_LABEL(30) - EVT_CALL(N(CheckForSceneSkip)) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(31) - EVT_END_IF - EVT_WAIT(1) - EVT_IF_GT(MV_TrainPos, -1400) - EVT_GOTO(30) - EVT_END_IF - EVT_SWITCH(GB_OMO_TrainDestination) - EVT_CASE_EQ(0) - EVT_CALL(GotoMap, EVT_PTR("omo_03"), omo_03_ENTRY_3) - EVT_CASE_EQ(1) - EVT_CALL(GotoMap, EVT_PTR("omo_06"), omo_06_ENTRY_3) - EVT_CASE_EQ(2) - EVT_CALL(GotoMap, EVT_PTR("omo_08"), omo_08_ENTRY_2) - EVT_CASE_EQ(3) - EVT_CALL(GotoMap, EVT_PTR("omo_10"), omo_10_ENTRY_3) - EVT_END_SWITCH - EVT_WAIT(100) - EVT_RETURN - EVT_LABEL(31) - EVT_EXEC_WAIT(N(EVS_TrainUnk_F)) - EVT_END_THREAD - EVT_END_IF - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Exec(N(D_802428CC_DEE79C)) + Exec(N(D_8024262C_DEE4FC)) + Call(GetEntryID, LVar0) + IfEq(LVar0, omo_16_ENTRY_0) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_80242984_DEE854))) + Set(MV_TrainUnk_02, 0) + Exec(N(EVS_Scene_RideTrain)) + Set(MF_TrainUnk_00, TRUE) + Thread + Label(10) + Call(N(CheckForSceneSkip)) + IfEq(LVar0, 1) + Goto(11) + EndIf + Wait(1) + IfLt(MV_TrainPos, 1400) + Goto(10) + EndIf + Switch(GB_OMO_TrainDestination) + CaseEq(0) + Call(GotoMap, Ref("omo_06"), omo_06_ENTRY_2) + CaseEq(1) + Call(GotoMap, Ref("omo_08"), omo_08_ENTRY_1) + CaseEq(2) + Call(GotoMap, Ref("omo_10"), omo_10_ENTRY_2) + CaseEq(3) + Call(GotoMap, Ref("omo_03"), omo_03_ENTRY_2) + EndSwitch + Wait(100) + Return + Label(11) + ExecWait(N(EVS_TrainUnk_G)) + EndThread + Else + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(D_802429A4_DEE874))) + Set(MV_TrainUnk_02, 0) + Exec(N(EVS_Scene_RideTrain)) + Set(MF_TrainUnk_00, TRUE) + Thread + Label(30) + Call(N(CheckForSceneSkip)) + IfEq(LVar0, 1) + Goto(31) + EndIf + Wait(1) + IfGt(MV_TrainPos, -1400) + Goto(30) + EndIf + Switch(GB_OMO_TrainDestination) + CaseEq(0) + Call(GotoMap, Ref("omo_03"), omo_03_ENTRY_3) + CaseEq(1) + Call(GotoMap, Ref("omo_06"), omo_06_ENTRY_3) + CaseEq(2) + Call(GotoMap, Ref("omo_08"), omo_08_ENTRY_2) + CaseEq(3) + Call(GotoMap, Ref("omo_10"), omo_10_ENTRY_3) + EndSwitch + Wait(100) + Return + Label(31) + ExecWait(N(EVS_TrainUnk_F)) + EndThread + EndIf + Return + End }; diff --git a/src/world/area_omo/omo_17/omo_17_1_main.c b/src/world/area_omo/omo_17/omo_17_1_main.c index 426148c20e8..aa2651c20b5 100644 --- a/src/world/area_omo/omo_17/omo_17_1_main.c +++ b/src/world/area_omo/omo_17/omo_17_1_main.c @@ -6,33 +6,33 @@ EvtScript N(EVS_ExitWalk_omo_06_0) = EVT_EXIT_WALK(60, omo_17_ENTRY_2, "omo_06", EvtScript N(EVS_ExitWalk_omo_06_1) = EVT_EXIT_WALK(60, omo_17_ENTRY_3, "omo_06", omo_06_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_05_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_05_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili5, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_06_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_omo_06_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili6, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_omo_05_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_omo_05_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili5, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_omo_06_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_omo_06_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili6, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupGizmos)) - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_RANGE(omo_17_ENTRY_4, omo_17_ENTRY_5) - EVT_EXEC_WAIT(N(EVS_EnterTrain)) - EVT_WAIT(3) - EVT_CASE_DEFAULT - EVT_CALL(SetGroupVisibility, MODEL_popo, MODEL_GROUP_HIDDEN) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_SHY_GUYS_TOYBOX) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupGizmos)) + Call(SetMusicTrack, 0, SONG_SHY_GUY_TOYBOX, 0, 8) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseRange(omo_17_ENTRY_4, omo_17_ENTRY_5) + ExecWait(N(EVS_EnterTrain)) + Wait(3) + CaseDefault + Call(SetGroupVisibility, MODEL_popo, MODEL_GROUP_HIDDEN) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + EndSwitch + Return + End }; diff --git a/src/world/area_omo/omo_17/omo_17_2_gizmos.c b/src/world/area_omo/omo_17/omo_17_2_gizmos.c index 87d8d16f31a..aa8f45018ba 100644 --- a/src/world/area_omo/omo_17/omo_17_2_gizmos.c +++ b/src/world/area_omo/omo_17/omo_17_2_gizmos.c @@ -1,39 +1,39 @@ #include "omo_17.h" EvtScript N(EVS_Gizmos_Wheels) = { - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, -360, 100, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_ha1, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha2, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha3, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha4, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha5, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha6, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha7, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha8, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha9, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha10, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha11, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha12, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha13, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha14, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha15, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha16, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha17, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_ha18, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(MakeLerp, 0, -360, 100, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_ha1, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha2, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha3, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha4, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha5, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha6, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha7, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha8, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha9, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha10, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha11, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha12, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha13, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha14, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha15, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha16, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha17, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_ha18, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_SetupGizmos) = { - EVT_EXEC(N(EVS_Gizmos_Wheels)) - EVT_RETURN - EVT_END + Exec(N(EVS_Gizmos_Wheels)) + Return + End }; diff --git a/src/world/area_omo/omo_17/omo_17_3_train.c b/src/world/area_omo/omo_17/omo_17_3_train.c index cce185ca9ca..6db1f488278 100644 --- a/src/world/area_omo/omo_17/omo_17_3_train.c +++ b/src/world/area_omo/omo_17/omo_17_3_train.c @@ -3,75 +3,75 @@ #include "../common/ToyTrain.inc.c" EvtScript N(D_80245CEC_DF4B8C) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, -600) - EVT_SET(LVar0, -600) - EVT_END_IF - EVT_IF_GT(LVar0, 600) - EVT_SET(LVar0, 600) - EVT_END_IF - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, EVT_FLOAT(50.0), LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, -600) + Set(LVar0, -600) + EndIf + IfGt(LVar0, 600) + Set(LVar0, 600) + EndIf + Call(SetCamTarget, CAM_DEFAULT, LVar0, Float(50.0), LVar2) + Wait(1) + Goto(0) + Return + End }; s32 N(EVS_TrainPath_LeftToRight)[] = { - EVT_FLOAT(-720.0), EVT_FLOAT(0.0), EVT_FLOAT(90.0), - EVT_FLOAT(720.0), EVT_FLOAT(0.0), + Float(-720.0), Float(0.0), Float(90.0), + Float(720.0), Float(0.0), -1, -1, -1, }; s32 N(EVS_TrainPath_RightToLeft)[] = { - EVT_FLOAT(720.0), EVT_FLOAT(0.0), EVT_FLOAT(270.0), - EVT_FLOAT(-720.0), EVT_FLOAT(0.0), + Float(720.0), Float(0.0), Float(270.0), + Float(-720.0), Float(0.0), -1, -1, -1, }; EvtScript N(EVS_EnterTrain) = { - EVT_CALL(ParentColliderToModel, COLLIDER_p1, MODEL_o1) - EVT_CALL(ParentColliderToModel, COLLIDER_pp1, MODEL_o1) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_EXEC(N(D_80245CEC_DF4B8C)) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(omo_17_ENTRY_4) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(EVS_TrainPath_LeftToRight))) - EVT_SET(MV_TrainUnk_02, 0) - EVT_EXEC(N(EVS_Scene_RideTrain)) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_THREAD - EVT_LABEL(10) - EVT_IF_LT(MV_TrainPos, 600) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("omo_06"), omo_06_ENTRY_0) - EVT_WAIT(100) - EVT_END_THREAD - EVT_CASE_EQ(omo_17_ENTRY_5) - EVT_SET(MV_TrainUnk_00, 0) - EVT_SET(MV_TrainUnk_01, EVT_PTR(N(EVS_TrainPath_RightToLeft))) - EVT_SET(MV_TrainUnk_02, 0) - EVT_EXEC(N(EVS_Scene_RideTrain)) - EVT_SET(MF_TrainUnk_00, TRUE) - EVT_THREAD - EVT_LABEL(20) - EVT_IF_GT(MV_TrainPos, -600) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("omo_05"), omo_05_ENTRY_1) - EVT_WAIT(100) - EVT_END_THREAD - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(ParentColliderToModel, COLLIDER_p1, MODEL_o1) + Call(ParentColliderToModel, COLLIDER_pp1, MODEL_o1) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Exec(N(D_80245CEC_DF4B8C)) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(omo_17_ENTRY_4) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(EVS_TrainPath_LeftToRight))) + Set(MV_TrainUnk_02, 0) + Exec(N(EVS_Scene_RideTrain)) + Set(MF_TrainUnk_00, TRUE) + Thread + Label(10) + IfLt(MV_TrainPos, 600) + Wait(1) + Goto(10) + EndIf + Call(GotoMap, Ref("omo_06"), omo_06_ENTRY_0) + Wait(100) + EndThread + CaseEq(omo_17_ENTRY_5) + Set(MV_TrainUnk_00, 0) + Set(MV_TrainUnk_01, Ref(N(EVS_TrainPath_RightToLeft))) + Set(MV_TrainUnk_02, 0) + Exec(N(EVS_Scene_RideTrain)) + Set(MF_TrainUnk_00, TRUE) + Thread + Label(20) + IfGt(MV_TrainPos, -600) + Wait(1) + Goto(20) + EndIf + Call(GotoMap, Ref("omo_05"), omo_05_ENTRY_1) + Wait(100) + EndThread + EndSwitch + Return + End }; MAP_RODATA_PAD(1, strings); diff --git a/src/world/area_omo/omo_17/omo_17_4_npc.c b/src/world/area_omo/omo_17/omo_17_4_npc.c index a672c17b679..ab2cbb3497f 100644 --- a/src/world/area_omo/omo_17/omo_17_4_npc.c +++ b/src/world/area_omo/omo_17/omo_17_4_npc.c @@ -7,18 +7,18 @@ #include "world/common/enemy/SpyGuy.inc.c" EvtScript N(EVS_NpcAuxAI_Conductor) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInteract_Conductor) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcAI_Conductor) = { - EVT_RETURN - EVT_END + Return + End }; NpcSettings N(NpcSettings_Conductor) = { diff --git a/src/world/area_omo/omo_17/omo_17_5_entity.c b/src/world/area_omo/omo_17/omo_17_5_entity.c index 7d12d260b04..ed39003823d 100644 --- a/src/world/area_omo/omo_17/omo_17_5_entity.c +++ b/src/world/area_omo/omo_17/omo_17_5_entity.c @@ -2,14 +2,14 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -75, 120, 135, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OMO17_ItemBlock_CoinA) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -50, 70, -150, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OMO17_ItemBlock_CoinB) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 0, 70, -150, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OMO17_ItemBlock_CoinC) - EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), -25, 70, -150, 0, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OMO17_MultiCoinBrick) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_YellowBlock), -75, 120, 135, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OMO17_ItemBlock_CoinA) + Call(MakeEntity, Ref(Entity_YellowBlock), -50, 70, -150, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OMO17_ItemBlock_CoinB) + Call(MakeEntity, Ref(Entity_YellowBlock), 0, 70, -150, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OMO17_ItemBlock_CoinC) + Call(MakeEntity, Ref(Entity_MulticoinBlock), -25, 70, -150, 0, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OMO17_MultiCoinBrick) + Return + End }; diff --git a/src/world/area_osr/osr_00/osr_00_1_music.c b/src/world/area_osr/osr_00/osr_00_1_music.c index 16fb242fc5a..e147cfee55c 100644 --- a/src/world/area_osr/osr_00/osr_00_1_music.c +++ b/src/world/area_osr/osr_00/osr_00_1_music.c @@ -1,18 +1,18 @@ #include "osr_00.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_INTRO) - EVT_CALL(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 8) - EVT_CASE_EQ(STORY_EPILOGUE) - EVT_CALL(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN, 0, 8) - EVT_END_SWITCH - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, osr_00_ENTRY_3) - EVT_CALL(ClearAmbientSounds, 250) - EVT_END_IF - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseEq(STORY_INTRO) + Call(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 1, 8) + CaseEq(STORY_EPILOGUE) + Call(SetMusicTrack, 0, SONG_PEACHS_CASTLE_PARTY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_TOAD_TOWN, 0, 8) + EndSwitch + Call(GetEntryID, LVar0) + IfEq(LVar0, osr_00_ENTRY_3) + Call(ClearAmbientSounds, 250) + EndIf + Return + End }; diff --git a/src/world/area_osr/osr_00/osr_00_2_main.c b/src/world/area_osr/osr_00/osr_00_2_main.c index d9a33279149..ce1b25ddfe7 100644 --- a/src/world/area_osr/osr_00/osr_00_2_main.c +++ b/src/world/area_osr/osr_00/osr_00_2_main.c @@ -14,77 +14,77 @@ EvtScript N(EVS_ExitWalk_mac_01_2) = EVT_EXIT_WALK(60, osr_00_ENTRY_0, "mac_01", EvtScript N(EVS_ExitDoors_kkj_00_6) = EVT_EXIT_DOUBLE_DOOR(osr_00_ENTRY_2, "kkj_00", kkj_00_ENTRY_6, COLLIDER_deilitn, MODEL_d2, MODEL_d1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_mac_01_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_kkj_00_6)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitn, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_mac_01_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_kkj_00_6)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitn, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(osr_00_ENTRY_2) - EVT_SET(LVar2, MODEL_d2) - EVT_SET(LVar3, MODEL_d1) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(osr_00_ENTRY_3) - EVT_EXEC(N(EVS_Scene_ShowInvitation)) - EVT_CASE_EQ(osr_00_ENTRY_4) - EVT_EXEC(N(EVS_Scene_ApproachParty)) - EVT_CASE_DEFAULT - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(osr_00_ENTRY_2) + Set(LVar2, MODEL_d2) + Set(LVar3, MODEL_d1) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(osr_00_ENTRY_3) + Exec(N(EVS_Scene_ShowInvitation)) + CaseEq(osr_00_ENTRY_4) + Exec(N(EVS_Scene_ApproachParty)) + CaseDefault + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; EvtScript N(EVS_TexPan_Fountain) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, MODEL_fw1, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_w2, TEX_PANNER_2) - EVT_THREAD + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, MODEL_fw1, TEX_PANNER_1) + Call(SetTexPanner, MODEL_w2, TEX_PANNER_2) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 0, -200, 0, 0) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( 0, 0, 0, 300) TEX_PAN_PARAMS_FREQ( 0, 0, 0, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PEACH_CASTLE_GROUNDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_INTRO) - EVT_CALL(N(CreateSunshine)) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(IntroNPCs))) - EVT_CASE_GE(STORY_EPILOGUE) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(EpilogueNPCs))) - EVT_END_SWITCH - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, osr_00_ENTRY_3) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, osr_00_ENTRY_3) - EVT_EXEC(N(EVS_TexPan_Fountain)) - EVT_CALL(PlaySoundAtF, SOUND_LOOP_OSR_FOUNTAIN_INTACT, SOUND_SPACE_WITH_DEPTH, 300, 0, 400) - EVT_END_IF - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_PEACH_CASTLE_GROUNDS) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Switch(GB_StoryProgress) + CaseEq(STORY_INTRO) + Call(N(CreateSunshine)) + Call(MakeNpcs, FALSE, Ref(N(IntroNPCs))) + CaseGe(STORY_EPILOGUE) + Call(N(SpawnSunEffect)) + Call(MakeNpcs, FALSE, Ref(N(EpilogueNPCs))) + EndSwitch + Call(GetEntryID, LVar0) + IfNe(LVar0, osr_00_ENTRY_3) + Exec(N(EVS_SetupMusic)) + EndIf + Call(GetEntryID, LVar0) + IfNe(LVar0, osr_00_ENTRY_3) + Exec(N(EVS_TexPan_Fountain)) + Call(PlaySoundAtF, SOUND_LOOP_OSR_FOUNTAIN_INTACT, SOUND_SPACE_WITH_DEPTH, 300, 0, 400) + EndIf + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_osr/osr_00/osr_00_4_npc_epilogue.c b/src/world/area_osr/osr_00/osr_00_4_npc_epilogue.c index 24e963ab3da..cae89afbef9 100644 --- a/src/world/area_osr/osr_00/osr_00_4_npc_epilogue.c +++ b/src/world/area_osr/osr_00/osr_00_4_npc_epilogue.c @@ -14,185 +14,185 @@ NpcSettings N(NpcSettings_Unused) = { #include "world/common/npc/Mouser.inc.c" EvtScript N(EVS_NpcInteract_LeaderYoshi) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_Talk, ANIM_VillageLeader_Idle, 0, MSG_Outro_0055) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_VillageLeader_Talk, ANIM_VillageLeader_Idle, 0, MSG_Outro_0055) + Return + End }; EvtScript N(EVS_NpcInit_LeaderYoshi) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_LeaderYoshi))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_LeaderYoshi))) + Return + End }; EvtScript N(EVS_NpcInteract_Yoshi) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Green_Talk, ANIM_Yoshi_Green_Idle, 0, MSG_Outro_0060) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Yoshi_Green_Talk, ANIM_Yoshi_Green_Idle, 0, MSG_Outro_0060) + Return + End }; EvtScript N(EVS_NpcInit_Yoshi) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Yoshi))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Yoshi))) + Return + End }; EvtScript N(EVS_NpcInteract_YoshiKid) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Green_Talk, ANIM_YoshiKid_Green_Idle, 0, MSG_Outro_0061) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_YoshiKid_Green_Talk, ANIM_YoshiKid_Green_Idle, 0, MSG_Outro_0061) + Return + End }; EvtScript N(EVS_NpcInit_YoshiKid) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_YoshiKid))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_YoshiKid))) + Return + End }; EvtScript N(EVS_NpcInteract_MayorPenguin) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, MSG_Outro_0056) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, MSG_Outro_0056) + Return + End }; EvtScript N(EVS_NpcInit_MayorPenguin) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_MayorPenguin))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_MayorPenguin))) + Return + End }; EvtScript N(EVS_NpcInteract_MayorPenguinWife) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguinWife_Laugh, ANIM_MayorPenguinWife_Idle, 0, MSG_Outro_0057) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguinWife_Laugh, ANIM_MayorPenguinWife_Idle, 0, MSG_Outro_0057) + Return + End }; EvtScript N(EVS_NpcInit_MayorPenguinWife) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_MayorPenguinWife))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_MayorPenguinWife))) + Return + End }; EvtScript N(EVS_NpcInteract_Penguin_01) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_Outro_0062) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_Outro_0062) + Return + End }; EvtScript N(EVS_NpcInit_Penguin_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Penguin_01))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Penguin_01))) + Return + End }; EvtScript N(EVS_NpcInteract_Penguin_02) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_Outro_0063) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_Outro_0063) + Return + End }; EvtScript N(EVS_NpcInit_Penguin_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Penguin_02))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Penguin_02))) + Return + End }; EvtScript N(EVS_NpcInteract_Moustafa) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_Outro_0058) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Moustafa_Shout, ANIM_Moustafa_Idle, 0, MSG_Outro_0058) + Return + End }; EvtScript N(EVS_NpcInit_Moustafa) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Moustafa))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Moustafa))) + Return + End }; EvtScript N(EVS_NpcInteract_Mouser) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Purple_Talk, ANIM_Mouser_Purple_Idle, 0, MSG_Outro_005E) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Mouser_Purple_Talk, ANIM_Mouser_Purple_Idle, 0, MSG_Outro_005E) + Return + End }; EvtScript N(EVS_NpcInit_Mouser) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Mouser))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Mouser))) + Return + End }; EvtScript N(EVS_NpcInteract_Boo_01) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_Outro_005D) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Talk, ANIM_Boo_Idle, 0, MSG_Outro_005D) + Return + End }; EvtScript N(EVS_NpcInit_Boo_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Boo_01))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Boo_01))) + Return + End }; EvtScript N(EVS_NpcInteract_Boo_02) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_Outro_005F) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_Outro_005F) + Return + End }; EvtScript N(EVS_NpcInit_Boo_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Boo_02))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Boo_02))) + Return + End }; EvtScript N(EVS_NpcInteract_Toad) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, MSG_Outro_0059) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Blue_Talk, ANIM_Toad_Blue_Idle, 0, MSG_Outro_0059) + Return + End }; EvtScript N(EVS_NpcInit_Toad) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad))) + Return + End }; EvtScript N(EVS_NpcInteract_ToadGuard_01) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Red_Talk, ANIM_ToadGuard_Red_Idle, 0, MSG_Outro_005A) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Red_Talk, ANIM_ToadGuard_Red_Idle, 0, MSG_Outro_005A) + Return + End }; EvtScript N(EVS_NpcInit_ToadGuard_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ToadGuard_01))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ToadGuard_01))) + Return + End }; EvtScript N(EVS_Guard_StopPlayer) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(NpcFacePlayer, NPC_ToadGuard_02, 0) - EVT_WAIT(5) - EVT_CALL(SpeakToPlayer, NPC_ToadGuard_02, ANIM_ToadGuard_Yellow_Talk, ANIM_ToadGuard_Yellow_Idle, 0, MSG_Outro_005C) - EVT_WAIT(10) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(4.0)) - EVT_CALL(PlayerMoveTo, 610, 110, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(NpcFacePlayer, NPC_ToadGuard_02, 0) + Wait(5) + Call(SpeakToPlayer, NPC_ToadGuard_02, ANIM_ToadGuard_Yellow_Talk, ANIM_ToadGuard_Yellow_Idle, 0, MSG_Outro_005C) + Wait(10) + Call(SetPlayerSpeed, Float(4.0)) + Call(PlayerMoveTo, 610, 110, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_ToadGuard_02) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Yellow_Talk, ANIM_ToadGuard_Yellow_Idle, 0, MSG_Outro_005B) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_ToadGuard_Yellow_Talk, ANIM_ToadGuard_Yellow_Idle, 0, MSG_Outro_005B) + Return + End }; EvtScript N(EVS_NpcInit_ToadGuard_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ToadGuard_02))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Guard_StopPlayer)), TRIGGER_FLOOR_TOUCH, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ToadGuard_02))) + BindTrigger(Ref(N(EVS_Guard_StopPlayer)), TRIGGER_FLOOR_TOUCH, COLLIDER_deilie, 1, 0) + Return + End }; AnimID N(ExtraAnims_YoshiLeader)[] = { diff --git a/src/world/area_osr/osr_00/osr_00_5_scenes.c b/src/world/area_osr/osr_00/osr_00_5_scenes.c index 27641f4a8a5..8a2ebe7f6c0 100644 --- a/src/world/area_osr/osr_00/osr_00_5_scenes.c +++ b/src/world/area_osr/osr_00/osr_00_5_scenes.c @@ -43,50 +43,50 @@ API_CALLABLE(N(func_802406E0_AACF10)) { } EvtScript N(EVS_Scene_ShowInvitation) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 775) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 20, -19) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(N(SetModelTintMode), APPLY_TINT_BG, NULL, ENV_TINT_REMAP) - EVT_CALL(N(SetModelTintMode), APPLY_TINT_GROUPS, -1, ENV_TINT_REMAP) - EVT_CALL(N(func_80240678_AACEA8), 200, 200, 200, 40, 40, 40) - EVT_CALL(N(func_802406E0_AACF10)) - EVT_WAIT(15 * DT) - EVT_CALL(ShowMessageAtScreenPos, MSG_Intro_0022, 160, 40) - EVT_WAIT(12 * DT) - EVT_CALL(ShowMessageAtScreenPos, MSG_Intro_0023, 160, 40) - EVT_WAIT(3) - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_20"), kmr_20_ENTRY_1, TRANSITION_SLOW_FADE_TO_WHITE) - EVT_WAIT(40 * DT) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamDistance, CAM_DEFAULT, 775) + Call(SetCamPitch, CAM_DEFAULT, 20, -19) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(N(SetModelTintMode), APPLY_TINT_BG, NULL, ENV_TINT_REMAP) + Call(N(SetModelTintMode), APPLY_TINT_GROUPS, -1, ENV_TINT_REMAP) + Call(N(func_80240678_AACEA8), 200, 200, 200, 40, 40, 40) + Call(N(func_802406E0_AACF10)) + Wait(15 * DT) + Call(ShowMessageAtScreenPos, MSG_Intro_0022, 160, 40) + Wait(12 * DT) + Call(ShowMessageAtScreenPos, MSG_Intro_0023, 160, 40) + Wait(3) + Call(GotoMapSpecial, Ref("kmr_20"), kmr_20_ENTRY_1, TRANSITION_SLOW_FADE_TO_WHITE) + Wait(40 * DT) + Return + End }; EvtScript N(EVS_Scene_ApproachParty) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(675.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(3.5), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(60.0), 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_CALL(PlayerMoveTo, 0, -250, 150 * DT) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Luigi, ANIM_Luigi_RunBack) - EVT_CALL(SetNpcPos, NPC_Luigi, 0, 0, 350) - EVT_CALL(NpcMoveTo, NPC_Luigi, 0, -200, 150 * DT) - EVT_CALL(SetNpcAnimation, NPC_Luigi, ANIM_Luigi_IdleBack) - EVT_END_THREAD - EVT_WAIT(100 * DT) - EVT_CALL(GotoMap, EVT_PTR("kkj_00"), kkj_00_ENTRY_5) - EVT_WAIT(100 * DT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(675.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(3.5), Float(-6.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(60.0), 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Call(PlayerMoveTo, 0, -250, 150 * DT) + EndThread + Thread + Call(SetNpcAnimation, NPC_Luigi, ANIM_Luigi_RunBack) + Call(SetNpcPos, NPC_Luigi, 0, 0, 350) + Call(NpcMoveTo, NPC_Luigi, 0, -200, 150 * DT) + Call(SetNpcAnimation, NPC_Luigi, ANIM_Luigi_IdleBack) + EndThread + Wait(100 * DT) + Call(GotoMap, Ref("kkj_00"), kkj_00_ENTRY_5) + Wait(100 * DT) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_osr/osr_01/osr_01_1_music.c b/src/world/area_osr/osr_01/osr_01_1_music.c index cfca48ed31d..790d97c84c8 100644 --- a/src/world/area_osr/osr_01/osr_01_1_music.c +++ b/src/world/area_osr/osr_01/osr_01_1_music.c @@ -2,23 +2,23 @@ #include "osr_01.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_RANGE(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) - EVT_CALL(SetMusicTrack, 0, SONG_SHY_GUY_INVASION, 0, 6) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN, 0, 6) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseRange(STORY_CH3_STAR_SPRIT_DEPARTED, STORY_CH4_STAR_SPIRIT_RESCUED) + Call(SetMusicTrack, 0, SONG_SHY_GUY_INVASION, 0, 6) + CaseDefault + Call(SetMusicTrack, 0, SONG_TOAD_TOWN, 0, 6) + EndSwitch + Return + End }; EvtScript N(EVS_PlaySong_Starship) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, osr_01_ENTRY_3) - EVT_CALL(SetMusicTrack, 0, SONG_STARSHIP_THEME, 0, 8) - EVT_ELSE - EVT_EXEC(N(EVS_SetupMusic)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, osr_01_ENTRY_3) + Call(SetMusicTrack, 0, SONG_STARSHIP_THEME, 0, 8) + Else + Exec(N(EVS_SetupMusic)) + EndIf + Return + End }; diff --git a/src/world/area_osr/osr_01/osr_01_2_main.c b/src/world/area_osr/osr_01/osr_01_2_main.c index 9db3c5f322d..6ee6dd79345 100644 --- a/src/world/area_osr/osr_01/osr_01_2_main.c +++ b/src/world/area_osr/osr_01/osr_01_2_main.c @@ -7,54 +7,54 @@ EvtScript N(EVS_ExitWalk_mac_01_2) = EVT_EXIT_WALK(60, osr_01_ENTRY_0, "mac_01", EvtScript N(EVS_ExitWalk_hos_00_0) = EVT_EXIT_WALK(60, osr_01_ENTRY_1, "hos_00", hos_00_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_mac_01_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_hos_00_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_mac_01_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_hos_00_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_TexPan_Fountain) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, MODEL_o501, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_w2, TEX_PANNER_2) - EVT_THREAD + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, MODEL_o501, TEX_PANNER_1) + Call(SetTexPanner, MODEL_w2, TEX_PANNER_2) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 0, -200, 0, 0) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( 0, 0, 0, 300) TEX_PAN_PARAMS_FREQ( 0, 0, 0, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PEACH_CASTLE_GROUNDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_SET(AF_OSR_01, FALSE) - EVT_SET(GF_MAP_PeachCastleGrounds, TRUE) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_PlaySong_Starship)) - EVT_EXEC(N(EVS_TexPan_Fountain)) - EVT_CALL(PlaySoundAtF, SOUND_LOOP_OSR_FOUNTAIN_BROKEN, SOUND_SPACE_WITH_DEPTH, 300, 2, 399) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(osr_01_ENTRY_3) - EVT_CALL(EnableModel, MODEL_o492, FALSE) - EVT_EXEC(N(EVS_Scene_Wishing)) - EVT_CASE_DEFAULT - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_PEACH_CASTLE_GROUNDS) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Set(AF_OSR_01, FALSE) + Set(GF_MAP_PeachCastleGrounds, TRUE) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_PlaySong_Starship)) + Exec(N(EVS_TexPan_Fountain)) + Call(PlaySoundAtF, SOUND_LOOP_OSR_FOUNTAIN_BROKEN, SOUND_SPACE_WITH_DEPTH, 300, 2, 399) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(osr_01_ENTRY_3) + Call(EnableModel, MODEL_o492, FALSE) + Exec(N(EVS_Scene_Wishing)) + CaseDefault + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Wait(1) + Return + End }; diff --git a/src/world/area_osr/osr_01/osr_01_3_npc.c b/src/world/area_osr/osr_01/osr_01_3_npc.c index 3d0ddec015b..67dd4ca8e58 100644 --- a/src/world/area_osr/osr_01/osr_01_3_npc.c +++ b/src/world/area_osr/osr_01/osr_01_3_npc.c @@ -6,24 +6,24 @@ #include "world/common/complete/LetterDelivery.inc.c" EvtScript N(EVS_Scene_Wishing) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 400) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 400) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(3.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(30) - EVT_CALL(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_HOS_006F) - EVT_WAIT(10) - EVT_CALL(GotoMap, EVT_PTR("mac_04"), mac_04_ENTRY_4) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 400) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 400) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(3.0), Float(-10.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(30) + Call(SpeakToPlayer, NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_HOS_006F) + Wait(10) + Call(GotoMap, Ref("mac_04"), mac_04_ENTRY_4) + Wait(100) + Return + End }; s32 N(LetterList)[] = { @@ -32,71 +32,71 @@ s32 N(LetterList)[] = { }; EvtScript N(EVS_NpcInteract_Toad) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_MET_STAR_SPIRITS) - EVT_SET(LVar0, MSG_OSR_0000) - EVT_CASE_LT(STORY_CH1_SPOKE_WITH_MERLIN) - EVT_SET(LVar0, MSG_OSR_0001) - EVT_CASE_LT(STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_OSR_0002) - EVT_CASE_LT(STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC03_BombedRock, FALSE) - EVT_SET(LVar0, MSG_OSR_0003) - EVT_ELSE - EVT_SET(LVar0, MSG_OSR_0004) - EVT_END_IF - EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_OSR_0005) - EVT_CASE_LT(STORY_CH4_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_MAC01_MailbagStolen, FALSE) - EVT_SET(LVar0, MSG_OSR_0006) - EVT_ELSE - EVT_IF_EQ(GF_MAC01_MailbagReturned, FALSE) - EVT_SET(LVar0, MSG_OSR_0007) - EVT_ELSE - EVT_SET(LVar0, MSG_OSR_0008) - EVT_END_IF - EVT_END_IF - EVT_CASE_LT(STORY_CH5_DEFEATED_FUZZIPEDE) - EVT_SET(LVar0, MSG_OSR_0009) - EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_OSR_000A) - EVT_CASE_LT(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_SET(LVar0, MSG_OSR_000B) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SET(LVar0, MSG_OSR_000C) - EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_SET(LVar0, MSG_OSR_000D) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_SET(LVar0, MSG_OSR_000E) - EVT_CASE_LT(STORY_EPILOGUE) - EVT_SET(LVar0, MSG_OSR_000F) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVar0) - EVT_CALL(N(LetterDelivery_Init), + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_MET_STAR_SPIRITS) + Set(LVar0, MSG_OSR_0000) + CaseLt(STORY_CH1_SPOKE_WITH_MERLIN) + Set(LVar0, MSG_OSR_0001) + CaseLt(STORY_CH1_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_OSR_0002) + CaseLt(STORY_CH2_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC03_BombedRock, FALSE) + Set(LVar0, MSG_OSR_0003) + Else + Set(LVar0, MSG_OSR_0004) + EndIf + CaseLt(STORY_CH3_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_OSR_0005) + CaseLt(STORY_CH4_STAR_SPRIT_DEPARTED) + IfEq(GF_MAC01_MailbagStolen, FALSE) + Set(LVar0, MSG_OSR_0006) + Else + IfEq(GF_MAC01_MailbagReturned, FALSE) + Set(LVar0, MSG_OSR_0007) + Else + Set(LVar0, MSG_OSR_0008) + EndIf + EndIf + CaseLt(STORY_CH5_DEFEATED_FUZZIPEDE) + Set(LVar0, MSG_OSR_0009) + CaseLt(STORY_CH5_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_OSR_000A) + CaseLt(STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Set(LVar0, MSG_OSR_000B) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Set(LVar0, MSG_OSR_000C) + CaseLt(STORY_CH7_INVITED_TO_STARBORN_VALLEY) + Set(LVar0, MSG_OSR_000D) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Set(LVar0, MSG_OSR_000E) + CaseLt(STORY_EPILOGUE) + Set(LVar0, MSG_OSR_000F) + EndSwitch + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, LVar0) + Call(N(LetterDelivery_Init), NPC_Toad, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, ITEM_LETTER_CHAIN_MUSS_T, ITEM_LETTER_CHAIN_KOOVER_1, MSG_OSR_0010, MSG_OSR_0011, MSG_OSR_0012, MSG_OSR_0013, - EVT_PTR(N(LetterList))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) - EVT_IF_EQ(LVarC, 1) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + Ref(N(LetterList))) + ExecWait(N(EVS_DoLetterDelivery)) + IfEq(LVarC, 1) + Return + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Toad) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(osr_01_ENTRY_3) - EVT_CALL(SetNpcPos, NPC_SELF, 0, 0, 400) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_CASE_DEFAULT - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toad))) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(osr_01_ENTRY_3) + Call(SetNpcPos, NPC_SELF, 0, 0, 400) + Call(SetNpcYaw, NPC_SELF, 90) + CaseDefault + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toad))) + EndSwitch + Return + End }; NpcData N(NpcData_Toad) = { diff --git a/src/world/area_osr/osr_02/osr_02_1_main.c b/src/world/area_osr/osr_02/osr_02_1_main.c index c41c1cd446b..2ab8517be1b 100644 --- a/src/world/area_osr/osr_02/osr_02_1_main.c +++ b/src/world/area_osr/osr_02/osr_02_1_main.c @@ -9,123 +9,123 @@ API_CALLABLE(N(SetAvailableDisguise)) { } EvtScript N(EVS_ExitDoor_kpa_121_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_SET(LVar0, osr_02_ENTRY_0) - EVT_SET(LVar1, COLLIDER_tt1) - EVT_SET(LVar2, MODEL_o570) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kpa_121"), kpa_121_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Set(LVar0, osr_02_ENTRY_0) + Set(LVar1, COLLIDER_tt1) + Set(LVar2, MODEL_o570) + Set(LVar3, DOOR_SWING_IN) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("kpa_121"), kpa_121_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoor_kkj_10_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE) - EVT_SET(LVar0, osr_02_ENTRY_1) - EVT_SET(LVar1, COLLIDER_tt2) - EVT_SET(LVar2, MODEL_d2) - EVT_SET(LVar3, MODEL_d1) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("kkj_10"), kkj_10_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_LARGE) + Set(LVar0, osr_02_ENTRY_1) + Set(LVar1, COLLIDER_tt2) + Set(LVar2, MODEL_d2) + Set(LVar3, MODEL_d1) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("kkj_10"), kkj_10_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_KeepPeachFromBowsersCastle) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 1) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0180) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 1) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Peach_0180) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_KeepPeachFromBowsersCastle)), TRIGGER_WALL_PRESS_A, COLLIDER_tt1, 1, 0) - EVT_ELSE - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_kpa_121_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tt1, 1, 0) - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_kkj_10_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tt2, 1, 0) - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) + BindTrigger(Ref(N(EVS_KeepPeachFromBowsersCastle)), TRIGGER_WALL_PRESS_A, COLLIDER_tt1, 1, 0) + Else + BindTrigger(Ref(N(EVS_ExitDoor_kpa_121_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tt1, 1, 0) + EndIf + BindTrigger(Ref(N(EVS_ExitDoor_kkj_10_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tt2, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(osr_02_ENTRY_0) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_SET(LVar2, MODEL_o570) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_CASE_EQ(osr_02_ENTRY_1) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_LARGE) - EVT_SET(LVar2, MODEL_d2) - EVT_SET(LVar3, MODEL_d1) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(osr_02_ENTRY_2) - EVT_EXEC(N(EVS_Scene_ReturnStarRod)) - EVT_END_SWITCH - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(osr_02_ENTRY_0) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Set(LVar2, MODEL_o570) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + CaseEq(osr_02_ENTRY_1) + Call(UseDoorSounds, DOOR_SOUNDS_LARGE) + Set(LVar2, MODEL_d2) + Set(LVar3, MODEL_d1) + ExecWait(EnterDoubleDoor) + CaseEq(osr_02_ENTRY_2) + Exec(N(EVS_Scene_ReturnStarRod)) + EndSwitch + Exec(N(EVS_BindExitTriggers)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_PEACHS_CASTLE) - EVT_IF_GT(GB_StoryProgress, STORY_CH8_REACHED_BOWSERS_CASTLE) - EVT_SET(GF_MAP_PeachsCastle, TRUE) - EVT_END_IF - EVT_CALL(SetSpriteShading, SHADING_OSR_02) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_IF_EQ(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) - EVT_CALL(N(SetAvailableDisguise), PEACH_DISGUISE_CLUBBA) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(PeachNPCs))) - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(osr_02_ENTRY_2) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_IF_EQ(GF_KKJ25_Defeated_Bowser, FALSE) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_PINK, EVT_FLOAT(-269.16895), EVT_FLOAT(50.0), EVT_FLOAT(100.22), 1, LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_PINK, EVT_FLOAT(-2.6025392), EVT_FLOAT(50.0), EVT_FLOAT(161.583), 1, LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_PINK, EVT_FLOAT(182.146), EVT_FLOAT(50.0), EVT_FLOAT(158.033), 1, LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_PINK, EVT_FLOAT(346.938), EVT_FLOAT(50.0), EVT_FLOAT(31.861), 1, LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_PINK, EVT_FLOAT(291.045), EVT_FLOAT(86.206), EVT_FLOAT(-191.08205), 1, LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_PINK, EVT_FLOAT(-105.39165), EVT_FLOAT(70.0), EVT_FLOAT(-203.115235), 1, LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_PINK, EVT_FLOAT(-52.5), EVT_FLOAT(70.0), EVT_FLOAT(-233.73735), 1, LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_PINK, EVT_FLOAT(52.5), EVT_FLOAT(70.0), EVT_FLOAT(-233.73735), 1, LVar0) - EVT_PLAY_EFFECT(EFFECT_FLAME, FX_FLAME_PINK, EVT_FLOAT(108.229), EVT_FLOAT(70.0), EVT_FLOAT(-200.6), 1, LVar0) - EVT_ELSE - EVT_CALL(EnableGroup, MODEL_g116, FALSE) - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH8_REACHED_BOWSERS_CASTLE) - EVT_CALL(FadeOutMusic, 0, 500) - EVT_END_IF - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_IF_EQ(GB_StoryProgress, STORY_CH8_REACHED_BOWSERS_CASTLE) - EVT_SET(GB_StoryProgress, STORY_CH8_REACHED_PEACHS_CASTLE) - EVT_END_IF - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_PEACHS_CASTLE) + IfGt(GB_StoryProgress, STORY_CH8_REACHED_BOWSERS_CASTLE) + Set(GF_MAP_PeachsCastle, TRUE) + EndIf + Call(SetSpriteShading, SHADING_OSR_02) + SetUP_CAMERA_NO_LEAD() + IfEq(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) + Call(N(SetAvailableDisguise), PEACH_DISGUISE_CLUBBA) + Call(MakeNpcs, FALSE, Ref(N(PeachNPCs))) + EndIf + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(osr_02_ENTRY_2) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + EndSwitch + ExecWait(N(EVS_MakeEntities)) + IfEq(GF_KKJ25_Defeated_Bowser, FALSE) + PlayEffect(EFFECT_FLAME, FX_FLAME_PINK, Float(-269.16895), Float(50.0), Float(100.22), 1, LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_PINK, Float(-2.6025392), Float(50.0), Float(161.583), 1, LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_PINK, Float(182.146), Float(50.0), Float(158.033), 1, LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_PINK, Float(346.938), Float(50.0), Float(31.861), 1, LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_PINK, Float(291.045), Float(86.206), Float(-191.08205), 1, LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_PINK, Float(-105.39165), Float(70.0), Float(-203.115235), 1, LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_PINK, Float(-52.5), Float(70.0), Float(-233.73735), 1, LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_PINK, Float(52.5), Float(70.0), Float(-233.73735), 1, LVar0) + PlayEffect(EFFECT_FLAME, FX_FLAME_PINK, Float(108.229), Float(70.0), Float(-200.6), 1, LVar0) + Else + Call(EnableGroup, MODEL_g116, FALSE) + EndIf + IfGe(GB_StoryProgress, STORY_CH8_REACHED_BOWSERS_CASTLE) + Call(FadeOutMusic, 0, 500) + EndIf + Exec(N(EVS_EnterMap)) + Wait(1) + IfEq(GB_StoryProgress, STORY_CH8_REACHED_BOWSERS_CASTLE) + Set(GB_StoryProgress, STORY_CH8_REACHED_PEACHS_CASTLE) + EndIf + Return + End }; diff --git a/src/world/area_osr/osr_02/osr_02_2_entity.c b/src/world/area_osr/osr_02/osr_02_2_entity.c index 6db6a9c9656..4864dd63248 100644 --- a/src/world/area_osr/osr_02/osr_02_2_entity.c +++ b/src/world/area_osr/osr_02/osr_02_2_entity.c @@ -2,15 +2,15 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_KKJ25_Defeated_Bowser, TRUE) - EVT_RETURN - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_RETURN - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 180, 60, -15, 0, ITEM_ULTRA_SHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_OSR02_HiddenItem_UltraShroom) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), -100, 60, -50, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + IfEq(GF_KKJ25_Defeated_Bowser, TRUE) + Return + EndIf + IfLt(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) + Return + EndIf + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 180, 60, -15, 0, ITEM_ULTRA_SHROOM, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_OSR02_HiddenItem_UltraShroom) + Call(MakeEntity, Ref(Entity_SavePoint), -100, 60, -50, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_osr/osr_02/osr_02_3_npc.c b/src/world/area_osr/osr_02/osr_02_3_npc.c index 884c702875c..1c2d41694c7 100644 --- a/src/world/area_osr/osr_02/osr_02_3_npc.c +++ b/src/world/area_osr/osr_02/osr_02_3_npc.c @@ -30,349 +30,349 @@ Vec3f N(FlightPath_TwinkDepart)[] = { }; EvtScript N(EVS_StarSpirit_FlyAway) = { - EVT_CALL(SetNpcFlagBits, LVar4, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) - EVT_THREAD - EVT_LOOP(30) - EVT_CALL(GetNpcPos, LVar4, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 20) - EVT_WAIT(6) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(30) - EVT_CALL(GetNpcPos, LVar4, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 40) - EVT_WAIT(8) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 0, 1800, 100, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, LVar4, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(GetNpcPos, LVar4, LVar7, LVar8, LVar9) - EVT_CALL(MakeLerp, 80, 260, 100, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, LVar4, LVar7, LVar0, LVar9) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcPos, LVar4, LVar7, NPC_DISPOSE_POS_Y, LVar9) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, LVar4, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) + Thread + Loop(30) + Call(GetNpcPos, LVar4, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 20) + Wait(6) + EndLoop + EndThread + Thread + Loop(30) + Call(GetNpcPos, LVar4, LVar0, LVar1, LVar2) + Add(LVar1, 20) + PlayEffect(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 40) + Wait(8) + EndLoop + EndThread + Thread + Call(MakeLerp, 0, 1800, 100, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, LVar4, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(GetNpcPos, LVar4, LVar7, LVar8, LVar9) + Call(MakeLerp, 80, 260, 100, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetNpcPos, LVar4, LVar7, LVar0, LVar9) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcPos, LVar4, LVar7, NPC_DISPOSE_POS_Y, LVar9) + Return + End }; EvtScript N(EVS_Twink_FlyAway) = { - EVT_THREAD - EVT_LOOP(30) - EVT_CALL(GetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 20) - EVT_WAIT(6) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(30) - EVT_CALL(GetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 40) - EVT_WAIT(8) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 0, 2160, 120, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Twink, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_Twink, SOUND_TWINK_DEPART, SOUND_SPACE_DEFAULT) - EVT_CALL(LoadPath, 120, EVT_PTR(N(FlightPath_TwinkDepart)), ARRAY_COUNT(N(FlightPath_TwinkDepart)), EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Twink, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_Twink, LVar1, NPC_DISPOSE_POS_Y, LVar3) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(0.5), 0, 550, EVT_FLOAT(17.0), EVT_FLOAT(-10.0)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + Loop(30) + Call(GetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 20) + Wait(6) + EndLoop + EndThread + Thread + Loop(30) + Call(GetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) + Add(LVar1, 20) + PlayEffect(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 40) + Wait(8) + EndLoop + EndThread + Thread + Call(MakeLerp, 0, 2160, 120, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Twink, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(PlaySoundAtNpc, NPC_Twink, SOUND_TWINK_DEPART, SOUND_SPACE_DEFAULT) + Call(LoadPath, 120, Ref(N(FlightPath_TwinkDepart)), ARRAY_COUNT(N(FlightPath_TwinkDepart)), EASING_QUADRATIC_IN) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Twink, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcPos, NPC_Twink, LVar1, NPC_DISPOSE_POS_Y, LVar3) + EndThread + Thread + Call(AdjustCam, CAM_DEFAULT, Float(0.5), 0, 550, Float(17.0), Float(-10.0)) + EndThread + Return + End }; EvtScript N(EVS_Scene_ReturnStarRod) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetMusicTrack, 0, SONG_STAR_SPIRIT_THEME, 2, 8) - EVT_CALL(SetPlayerPos, 15, 0, 30) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_PARTNER, -70, LVar1, 15) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 90) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(700.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_TakeItem) - EVT_CALL(SetNpcPos, NPC_StarRod, 30, 25, 30) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_Eldstar, ANIM_WorldEldstar_Leap) - EVT_CALL(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) - EVT_SET(LVar1, 80) - EVT_SET(LVar2, 35) - EVT_CALL(SetNpcJumpscale, NPC_StarRod, EVT_FLOAT(0.5)) - EVT_CALL(NpcJump1, NPC_StarRod, LVar0, LVar1, LVar2, 20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(PlaySound, SOUND_RECEIVE_STAR_POWER) - EVT_LOOP(6) - EVT_PLAY_EFFECT(EFFECT_RADIAL_SHIMMER, 9, LVar0, LVar1, LVar2, 1, 20) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 1, LVar0, LVar1, LVar2, 30) - EVT_WAIT(10) - EVT_END_LOOP - EVT_LOOP(20) - EVT_ADD(LVar1, -1) - EVT_CALL(SetNpcPos, NPC_StarRod, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_StarRod, NPC_DISPOSE_LOCATION) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_Eldstar, ANIM_WorldEldstar_Idle) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 0, MSG_Outro_0000) - EVT_WAIT(10) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetNpcJumpscale, NPC_Eldstar, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump0, NPC_Eldstar, 120, 80, 0, 40) - EVT_CALL(InterpNpcYaw, NPC_Eldstar, 270, 0) - EVT_END_THREAD - EVT_CALL(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) - EVT_SET(LVar0, 120) - EVT_SET(LVar1, 80) - EVT_SET(LVar2, 0) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-5.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_Mamar, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-5.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Mamar, ANIM_WorldMamar_TalkHappy, ANIM_WorldMamar_Idle, 0, MSG_Outro_0001) - EVT_CALL(GetNpcPos, NPC_Skolar, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-5.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Skolar, ANIM_WorldSkolar_TalkAngry, ANIM_WorldSkolar_Idle, 0, MSG_Outro_0002) - EVT_CALL(GetNpcPos, NPC_Muskular, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-5.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Muskular, ANIM_WorldMuskular_Talk, ANIM_WorldMuskular_Idle, 0, MSG_Outro_0003) - EVT_CALL(GetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-5.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Misstar, ANIM_WorldMisstar_Talk, ANIM_WorldMisstar_Idle, 0, MSG_Outro_0004) - EVT_CALL(GetNpcPos, NPC_Klevar, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-5.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Klevar, ANIM_WorldKlevar_Talk, ANIM_WorldKlevar_Idle, 0, MSG_Outro_0005) - EVT_CALL(GetNpcPos, NPC_Kalmar, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-5.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Kalmar, ANIM_WorldKalmar_Talk, ANIM_WorldKalmar_Idle, 0, MSG_Outro_0006) - EVT_CALL(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-5.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 0, MSG_Outro_0007) - EVT_CALL(GetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-2.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(5) - EVT_CALL(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 5, MSG_Outro_0008) - EVT_CALL(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(275.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 0, MSG_Outro_0009) - EVT_WAIT(20) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(90.0), 70, 400, EVT_FLOAT(17.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_THREAD - EVT_SET(LVar4, NPC_Eldstar) - EVT_CALL(PlaySoundAtNpc, LVar4, SOUND_STAR_SPIRIT_DEPART_1, SOUND_SPACE_DEFAULT) - EVT_EXEC_WAIT(N(EVS_StarSpirit_FlyAway)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(30) - EVT_SET(LVar4, NPC_Misstar) - EVT_CALL(PlaySoundAtNpc, LVar4, SOUND_STAR_SPIRIT_DEPART_2, SOUND_SPACE_DEFAULT) - EVT_EXEC_WAIT(N(EVS_StarSpirit_FlyAway)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(60) - EVT_SET(LVar4, NPC_Skolar) - EVT_CALL(PlaySoundAtNpc, LVar4, SOUND_STAR_SPIRIT_DEPART_1, SOUND_SPACE_DEFAULT) - EVT_EXEC_WAIT(N(EVS_StarSpirit_FlyAway)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(90) - EVT_SET(LVar4, NPC_Mamar) - EVT_CALL(PlaySoundAtNpc, LVar4, SOUND_STAR_SPIRIT_DEPART_2, SOUND_SPACE_DEFAULT) - EVT_EXEC_WAIT(N(EVS_StarSpirit_FlyAway)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(120) - EVT_SET(LVar4, NPC_Kalmar) - EVT_CALL(PlaySoundAtNpc, LVar4, SOUND_STAR_SPIRIT_DEPART_1, SOUND_SPACE_DEFAULT) - EVT_EXEC_WAIT(N(EVS_StarSpirit_FlyAway)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(150) - EVT_SET(LVar4, NPC_Muskular) - EVT_CALL(PlaySoundAtNpc, LVar4, SOUND_STAR_SPIRIT_DEPART_2, SOUND_SPACE_DEFAULT) - EVT_EXEC_WAIT(N(EVS_StarSpirit_FlyAway)) - EVT_END_THREAD - EVT_WAIT(180) - EVT_SET(LVar4, NPC_Klevar) - EVT_CALL(PlaySoundAtNpc, LVar4, SOUND_STAR_SPIRIT_DEPART_1, SOUND_SPACE_DEFAULT) - EVT_EXEC_WAIT(N(EVS_StarSpirit_FlyAway)) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(20) - EVT_CALL(SetMusicTrack, 0, SONG_TWINK_THEME, 1, 8) - EVT_CALL(LoadPath, 30, EVT_PTR(N(FlightPath_TwinkStepForward)), ARRAY_COUNT(N(FlightPath_TwinkStepForward)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Twink, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(5) - EVT_CALL(InterpNpcYaw, NPC_Twink, 270, 0) - EVT_WAIT(10) - EVT_CALL(GetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-4.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Outro_000A) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach2_RaiseArms) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach2_TalkIdle) - EVT_CALL(SpeakToPlayer, NPC_Peach, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Outro_000B) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach2_LowerArms) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Idle) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Twink, ANIM_Twink_Disappointed) - EVT_CALL(SpeakToPlayer, NPC_Twink, ANIM_Twink_Disappointed, ANIM_Twink_Disappointed, 0, MSG_Outro_000C) - EVT_CALL(SetNpcAnimation, NPC_Twink, ANIM_Twink_Idle) - EVT_CALL(EndSpeech, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0) - EVT_WAIT(20) - EVT_EXEC(N(EVS_Twink_FlyAway)) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_WAIT(250) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Walk) - EVT_CALL(NpcMoveTo, NPC_Peach, -10, 30, 40) - EVT_CALL(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Idle) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_WAIT(60) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_WAIT(20) - EVT_CALL(GotoMap, EVT_PTR("hos_10"), hos_10_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(SetMusicTrack, 0, SONG_STAR_SPIRIT_THEME, 2, 8) + Call(SetPlayerPos, 15, 0, 30) + Call(InterpPlayerYaw, 90, 0) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_PARTNER, -70, LVar1, 15) + Call(SetNpcYaw, NPC_PARTNER, 90) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-7.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(700.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(SetCamDistance, CAM_DEFAULT, Float(350.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20) + Call(SetPlayerAnimation, ANIM_MarioW1_TakeItem) + Call(SetNpcPos, NPC_StarRod, 30, 25, 30) + Wait(20) + Call(SetNpcAnimation, NPC_Eldstar, ANIM_WorldEldstar_Leap) + Call(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) + Set(LVar1, 80) + Set(LVar2, 35) + Call(SetNpcJumpscale, NPC_StarRod, Float(0.5)) + Call(NpcJump1, NPC_StarRod, LVar0, LVar1, LVar2, 20) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(PlaySound, SOUND_RECEIVE_STAR_POWER) + Loop(6) + PlayEffect(EFFECT_RADIAL_SHIMMER, 9, LVar0, LVar1, LVar2, 1, 20) + PlayEffect(EFFECT_SPARKLES, 1, LVar0, LVar1, LVar2, 30) + Wait(10) + EndLoop + Loop(20) + Add(LVar1, -1) + Call(SetNpcPos, NPC_StarRod, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(SetNpcPos, NPC_StarRod, NPC_DISPOSE_LOCATION) + Wait(20) + Call(SetNpcAnimation, NPC_Eldstar, ANIM_WorldEldstar_Idle) + Wait(10) + Call(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 0, MSG_Outro_0000) + Wait(10) + Thread + Wait(5) + Call(SetNpcJumpscale, NPC_Eldstar, Float(0.0)) + Call(NpcJump0, NPC_Eldstar, 120, 80, 0, 40) + Call(InterpNpcYaw, NPC_Eldstar, 270, 0) + EndThread + Call(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) + Set(LVar0, 120) + Set(LVar1, 80) + Set(LVar2, 0) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-5.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(GetNpcPos, NPC_Mamar, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-5.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Mamar, ANIM_WorldMamar_TalkHappy, ANIM_WorldMamar_Idle, 0, MSG_Outro_0001) + Call(GetNpcPos, NPC_Skolar, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-5.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Skolar, ANIM_WorldSkolar_TalkAngry, ANIM_WorldSkolar_Idle, 0, MSG_Outro_0002) + Call(GetNpcPos, NPC_Muskular, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-5.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Muskular, ANIM_WorldMuskular_Talk, ANIM_WorldMuskular_Idle, 0, MSG_Outro_0003) + Call(GetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-5.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Misstar, ANIM_WorldMisstar_Talk, ANIM_WorldMisstar_Idle, 0, MSG_Outro_0004) + Call(GetNpcPos, NPC_Klevar, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-5.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Klevar, ANIM_WorldKlevar_Talk, ANIM_WorldKlevar_Idle, 0, MSG_Outro_0005) + Call(GetNpcPos, NPC_Kalmar, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-5.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Kalmar, ANIM_WorldKalmar_Talk, ANIM_WorldKalmar_Idle, 0, MSG_Outro_0006) + Call(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-5.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 0, MSG_Outro_0007) + Call(GetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-2.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(5) + Call(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 5, MSG_Outro_0008) + Call(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-6.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(275.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 0, MSG_Outro_0009) + Wait(20) + Call(AdjustCam, CAM_DEFAULT, Float(90.0), 70, 400, Float(17.0), Float(-11.0)) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Thread + Set(LVar4, NPC_Eldstar) + Call(PlaySoundAtNpc, LVar4, SOUND_STAR_SPIRIT_DEPART_1, SOUND_SPACE_DEFAULT) + ExecWait(N(EVS_StarSpirit_FlyAway)) + EndThread + Thread + Wait(30) + Set(LVar4, NPC_Misstar) + Call(PlaySoundAtNpc, LVar4, SOUND_STAR_SPIRIT_DEPART_2, SOUND_SPACE_DEFAULT) + ExecWait(N(EVS_StarSpirit_FlyAway)) + EndThread + Thread + Wait(60) + Set(LVar4, NPC_Skolar) + Call(PlaySoundAtNpc, LVar4, SOUND_STAR_SPIRIT_DEPART_1, SOUND_SPACE_DEFAULT) + ExecWait(N(EVS_StarSpirit_FlyAway)) + EndThread + Thread + Wait(90) + Set(LVar4, NPC_Mamar) + Call(PlaySoundAtNpc, LVar4, SOUND_STAR_SPIRIT_DEPART_2, SOUND_SPACE_DEFAULT) + ExecWait(N(EVS_StarSpirit_FlyAway)) + EndThread + Thread + Wait(120) + Set(LVar4, NPC_Kalmar) + Call(PlaySoundAtNpc, LVar4, SOUND_STAR_SPIRIT_DEPART_1, SOUND_SPACE_DEFAULT) + ExecWait(N(EVS_StarSpirit_FlyAway)) + EndThread + Thread + Wait(150) + Set(LVar4, NPC_Muskular) + Call(PlaySoundAtNpc, LVar4, SOUND_STAR_SPIRIT_DEPART_2, SOUND_SPACE_DEFAULT) + ExecWait(N(EVS_StarSpirit_FlyAway)) + EndThread + Wait(180) + Set(LVar4, NPC_Klevar) + Call(PlaySoundAtNpc, LVar4, SOUND_STAR_SPIRIT_DEPART_1, SOUND_SPACE_DEFAULT) + ExecWait(N(EVS_StarSpirit_FlyAway)) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(20) + Call(SetMusicTrack, 0, SONG_TWINK_THEME, 1, 8) + Call(LoadPath, 30, Ref(N(FlightPath_TwinkStepForward)), ARRAY_COUNT(N(FlightPath_TwinkStepForward)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Twink, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Wait(5) + Call(InterpNpcYaw, NPC_Twink, 270, 0) + Wait(10) + Call(GetNpcPos, NPC_Twink, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-4.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0, MSG_Outro_000A) + Wait(10) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach2_RaiseArms) + Wait(10) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach2_TalkIdle) + Call(SpeakToPlayer, NPC_Peach, ANIM_Peach2_Talk, ANIM_Peach2_TalkIdle, 5, MSG_Outro_000B) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach2_LowerArms) + Wait(10) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Idle) + Wait(10) + Call(SetNpcAnimation, NPC_Twink, ANIM_Twink_Disappointed) + Call(SpeakToPlayer, NPC_Twink, ANIM_Twink_Disappointed, ANIM_Twink_Disappointed, 0, MSG_Outro_000C) + Call(SetNpcAnimation, NPC_Twink, ANIM_Twink_Idle) + Call(EndSpeech, NPC_Twink, ANIM_Twink_Talk, ANIM_Twink_Idle, 0) + Wait(20) + Exec(N(EVS_Twink_FlyAway)) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Wait(250) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Walk) + Call(NpcMoveTo, NPC_Peach, -10, 30, 40) + Call(SetNpcAnimation, NPC_Peach, ANIM_Peach1_Idle) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(InterpPlayerYaw, 270, 0) + Wait(60) + Call(InterpPlayerYaw, 90, 0) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Wait(20) + Call(GotoMap, Ref("hos_10"), hos_10_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_NpcInit_Peach) = { - EVT_CALL(SetNpcPos, NPC_SELF, -25, 0, 40) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, -25, 0, 40) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Return + End }; EvtScript N(EVS_NpcInit_Twink) = { - EVT_CALL(SetNpcPos, NPC_SELF, -10, 40, 10) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, -10, 40, 10) + Call(SetNpcYaw, NPC_SELF, 90) + Return + End }; s16 N(SpiritHoverOffsets)[] = { @@ -400,70 +400,70 @@ API_CALLABLE(N(AnimateSpiritHover)) { } EvtScript N(EVS_NpcAux_Eldstar) = { - EVT_CALL(N(AnimateSpiritHover)) - EVT_RETURN - EVT_END + Call(N(AnimateSpiritHover)) + Return + End }; EvtScript N(EVS_NpcInit_Eldstar) = { - EVT_CALL(SetNpcPos, NPC_Eldstar, 60, 20, 30) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_Eldstar))) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Eldstar, 60, 20, 30) + Call(NpcFacePlayer, NPC_SELF, 0) + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_Eldstar))) + Return + End }; EvtScript N(EVS_NpcInit_Mamar) = { - EVT_CALL(SetNpcPos, NPC_SELF, 66, 80, -27) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_Eldstar))) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, 66, 80, -27) + Call(NpcFacePlayer, NPC_SELF, 0) + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_Eldstar))) + Return + End }; EvtScript N(EVS_NpcInit_Skolar) = { - EVT_CALL(SetNpcPos, NPC_SELF, 53, 80, -95) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_Eldstar))) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, 53, 80, -95) + Call(NpcFacePlayer, NPC_SELF, 0) + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_Eldstar))) + Return + End }; EvtScript N(EVS_NpcInit_Muskular) = { - EVT_CALL(SetNpcPos, NPC_SELF, 91, 80, -132) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_Eldstar))) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, 91, 80, -132) + Call(NpcFacePlayer, NPC_SELF, 0) + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_Eldstar))) + Return + End }; EvtScript N(EVS_NpcInit_Misstar) = { - EVT_CALL(SetNpcPos, NPC_SELF, 151, 80, -132) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_Eldstar))) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, 151, 80, -132) + Call(NpcFacePlayer, NPC_SELF, 0) + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_Eldstar))) + Return + End }; EvtScript N(EVS_NpcInit_Klevar) = { - EVT_CALL(SetNpcPos, NPC_SELF, 189, 80, -95) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_Eldstar))) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, 189, 80, -95) + Call(NpcFacePlayer, NPC_SELF, 0) + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_Eldstar))) + Return + End }; EvtScript N(EVS_NpcInit_Kalmar) = { - EVT_CALL(SetNpcPos, NPC_SELF, 176, 80, -27) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_Eldstar))) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, 176, 80, -27) + Call(NpcFacePlayer, NPC_SELF, 0) + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_Eldstar))) + Return + End }; EvtScript N(EVS_NpcInit_StarRod) = { - EVT_RETURN - EVT_END + Return + End }; AnimID N(ExtraAnims_Peach)[] = { diff --git a/src/world/area_osr/osr_02/osr_02_4_npc_peach.c b/src/world/area_osr/osr_02/osr_02_4_npc_peach.c index 5b8c843ce64..cb476b5eb38 100644 --- a/src/world/area_osr/osr_02/osr_02_4_npc_peach.c +++ b/src/world/area_osr/osr_02/osr_02_4_npc_peach.c @@ -18,59 +18,59 @@ AnimID N(ExtraAnims_Clubba)[] = { }; EvtScript N(EVS_NpcInteract_Clubba) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(CancelMessage) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim08) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim02) - EVT_CALL(N(GetPeachDisguise), LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SET(LVar1, MSG_Peach_014A) - EVT_CASE_EQ(3) - EVT_SET(LVar1, MSG_Peach_014B) - EVT_CASE_DEFAULT - EVT_SET(LVar1, MSG_Peach_014C) - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldClubba_Anim05, ANIM_WorldClubba_Anim02, 16, LVar1) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim07) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(CancelMessage) + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim08) + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim02) + Call(N(GetPeachDisguise), LVar0) + Switch(LVar0) + CaseEq(0) + Set(LVar1, MSG_Peach_014A) + CaseEq(3) + Set(LVar1, MSG_Peach_014B) + CaseDefault + Set(LVar1, MSG_Peach_014C) + EndSwitch + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldClubba_Anim05, ANIM_WorldClubba_Anim02, 16, LVar1) + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim07) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcIdle_Clubba) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(AwaitPlayerApproach, LVar1, LVar3, 85) - EVT_THREAD - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldClubba_Anim07, ANIM_WorldClubba_Anim07, 5, MSG_Peach_0149) - EVT_END_THREAD - EVT_CALL(SetSelfVar, 0, 1) - EVT_ELSE - EVT_CALL(AwaitPlayerLeave, LVar1, LVar3, 90) - EVT_CALL(CancelMessage) - EVT_CALL(SetSelfVar, 0, 0) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Call(GetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) + Loop(0) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Call(AwaitPlayerApproach, LVar1, LVar3, 85) + Thread + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldClubba_Anim07, ANIM_WorldClubba_Anim07, 5, MSG_Peach_0149) + EndThread + Call(SetSelfVar, 0, 1) + Else + Call(AwaitPlayerLeave, LVar1, LVar3, 90) + Call(CancelMessage) + Call(SetSelfVar, 0, 0) + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcInit_Clubba) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim07) - EVT_CALL(SetNpcPos, NPC_SELF, -40, 20, -170) - EVT_CALL(SetNpcYaw, NPC_SELF, 200) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Clubba))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Clubba))) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim07) + Call(SetNpcPos, NPC_SELF, -40, 20, -170) + Call(SetNpcYaw, NPC_SELF, 200) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Clubba))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Clubba))) + Return + End }; NpcData N(NpcData_Clubba) = { diff --git a/src/world/area_osr/osr_03/osr_03_1_main.c b/src/world/area_osr/osr_03/osr_03_1_main.c index 3aca2eda02a..f06f05e4441 100644 --- a/src/world/area_osr/osr_03/osr_03_1_main.c +++ b/src/world/area_osr/osr_03/osr_03_1_main.c @@ -1,91 +1,91 @@ #include "osr_03.h" EvtScript N(EVS_HideGroundModels) = { - EVT_CALL(EnableGroup, MODEL_hiru, FALSE) - EVT_CALL(EnableGroup, MODEL_niwa, FALSE) - EVT_CALL(EnableGroup, MODEL_jimidori, FALSE) - EVT_CALL(EnableGroup, MODEL_kumo, FALSE) - EVT_CALL(EnableGroup, MODEL_ki1, FALSE) - EVT_CALL(EnableGroup, MODEL_jimen, FALSE) - EVT_CALL(EnableGroup, MODEL_kemuri, FALSE) - EVT_CALL(EnableGroup, MODEL_obj, FALSE) - EVT_RETURN - EVT_END + Call(EnableGroup, MODEL_hiru, FALSE) + Call(EnableGroup, MODEL_niwa, FALSE) + Call(EnableGroup, MODEL_jimidori, FALSE) + Call(EnableGroup, MODEL_kumo, FALSE) + Call(EnableGroup, MODEL_ki1, FALSE) + Call(EnableGroup, MODEL_jimen, FALSE) + Call(EnableGroup, MODEL_kemuri, FALSE) + Call(EnableGroup, MODEL_obj, FALSE) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(osr_03_ENTRY_1) - EVT_EXEC(N(MV_Scene_CastleAscending)) - EVT_CASE_EQ(osr_03_ENTRY_2) - EVT_EXEC(N(MV_Scene_PlayerTossedOut)) - EVT_CASE_EQ(osr_03_ENTRY_3) - EVT_EXEC(N(EVS_HideGroundModels)) - EVT_EXEC(N(EVS_Scene_Starship)) - EVT_CASE_EQ(osr_03_ENTRY_4) - EVT_WAIT(15) - EVT_EXEC(N(EVS_Scene_BeginInterlude)) - EVT_CASE_EQ(osr_03_ENTRY_5) - EVT_EXEC(N(EVS_HideGroundModels)) - EVT_EXEC(N(EVS_Scene_CastleDestruction)) - EVT_CASE_EQ(osr_03_ENTRY_6) - EVT_EXEC(N(EVS_Scene_UnusedTossOut)) - EVT_CASE_DEFAULT - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(osr_03_ENTRY_1) + Exec(N(MV_Scene_CastleAscending)) + CaseEq(osr_03_ENTRY_2) + Exec(N(MV_Scene_PlayerTossedOut)) + CaseEq(osr_03_ENTRY_3) + Exec(N(EVS_HideGroundModels)) + Exec(N(EVS_Scene_Starship)) + CaseEq(osr_03_ENTRY_4) + Wait(15) + Exec(N(EVS_Scene_BeginInterlude)) + CaseEq(osr_03_ENTRY_5) + Exec(N(EVS_HideGroundModels)) + Exec(N(EVS_Scene_CastleDestruction)) + CaseEq(osr_03_ENTRY_6) + Exec(N(EVS_Scene_UnusedTossOut)) + CaseDefault + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_NONE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(osr_03_ENTRY_4) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_OR_EQ(STORY_CH0_MET_STAR_SPIRITS) - EVT_CASE_OR_EQ(STORY_CH1_STAR_SPIRIT_RESCUED) - EVT_CASE_OR_EQ(STORY_CH3_STAR_SPIRIT_RESCUED) - EVT_CALL(ClearAmbientSounds, 250) - EVT_CALL(SetMusicTrack, 0, SONG_PRISONER_PEACH_THEME, 0, 8) - EVT_END_CASE_GROUP - EVT_CASE_EQ(STORY_CH2_STAR_SPIRIT_RESCUED) - EVT_CALL(ClearAmbientSounds, 250) - EVT_CALL(SetMusicTrack, 0, SONG_BOWSER_THEME, 0, 8) - EVT_CASE_OR_EQ(STORY_CH4_STAR_SPIRIT_RESCUED) - EVT_CASE_OR_EQ(STORY_CH5_OPENED_ESCAPE_ROUTE) - EVT_CASE_OR_EQ(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_CALL(ClearAmbientSounds, 250) - EVT_CALL(SetMusicTrack, 0, SONG_PEACH_MISSION, 0, 8) - EVT_END_CASE_GROUP - EVT_CASE_EQ(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(ClearAmbientSounds, 250) - EVT_CALL(FadeOutMusic, 0, 500) - EVT_CASE_DEFAULT - EVT_IF_EQ(GF_KKJ25_Defeated_Bowser, FALSE) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_BOWSERS_CASTLE_FALLS, 0, 8) - EVT_END_IF - EVT_END_SWITCH - EVT_EXEC(N(EVS_EnterMap)) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, osr_03_ENTRY_4) - EVT_WAIT(15) - EVT_ELSE - EVT_WAIT(1) - EVT_END_IF - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_NONE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(osr_03_ENTRY_4) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + CaseDefault + EndSwitch + Switch(GB_StoryProgress) + CaseOrEq(STORY_CH0_MET_STAR_SPIRITS) + CaseOrEq(STORY_CH1_STAR_SPIRIT_RESCUED) + CaseOrEq(STORY_CH3_STAR_SPIRIT_RESCUED) + Call(ClearAmbientSounds, 250) + Call(SetMusicTrack, 0, SONG_PRISONER_PEACH_THEME, 0, 8) + EndCaseGroup + CaseEq(STORY_CH2_STAR_SPIRIT_RESCUED) + Call(ClearAmbientSounds, 250) + Call(SetMusicTrack, 0, SONG_BOWSER_THEME, 0, 8) + CaseOrEq(STORY_CH4_STAR_SPIRIT_RESCUED) + CaseOrEq(STORY_CH5_OPENED_ESCAPE_ROUTE) + CaseOrEq(STORY_CH6_STAR_SPIRIT_RESCUED) + Call(ClearAmbientSounds, 250) + Call(SetMusicTrack, 0, SONG_PEACH_MISSION, 0, 8) + EndCaseGroup + CaseEq(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(ClearAmbientSounds, 250) + Call(FadeOutMusic, 0, 500) + CaseDefault + IfEq(GF_KKJ25_Defeated_Bowser, FALSE) + Else + Call(SetMusicTrack, 0, SONG_BOWSERS_CASTLE_FALLS, 0, 8) + EndIf + EndSwitch + Exec(N(EVS_EnterMap)) + Call(GetEntryID, LVar0) + IfEq(LVar0, osr_03_ENTRY_4) + Wait(15) + Else + Wait(1) + EndIf + Return + End }; diff --git a/src/world/area_osr/osr_03/osr_03_3_intro.c b/src/world/area_osr/osr_03/osr_03_3_intro.c index 1f959029209..4d821a60267 100644 --- a/src/world/area_osr/osr_03/osr_03_3_intro.c +++ b/src/world/area_osr/osr_03/osr_03_3_intro.c @@ -18,17 +18,17 @@ Vec3f N(UnusedFallingPath1)[] = { }; EvtScript N(EVS_UnusedFalling1) = { - EVT_CALL(LoadPath, 90, EVT_PTR(N(UnusedFallingPath1)), ARRAY_COUNT(N(UnusedFallingPath1)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetPlayerPos, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_NE(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(LoadPath, 90, Ref(N(UnusedFallingPath1)), ARRAY_COUNT(N(UnusedFallingPath1)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetPlayerPos, LVar1, LVar2, LVar3) + Wait(1) + IfNe(LVar0, 1) + BreakLoop + EndIf + EndLoop + Return + End }; Vec3f N(UnusedFallingPath2)[] = { @@ -43,192 +43,192 @@ Vec3f N(UnusedFallingPath2)[] = { }; EvtScript N(EVS_UnusedFalling2) = { - EVT_CALL(LoadPath, 135, EVT_PTR(N(UnusedFallingPath2)), ARRAY_COUNT(N(UnusedFallingPath2)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetPlayerPos, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_NE(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(LoadPath, 135, Ref(N(UnusedFallingPath2)), ARRAY_COUNT(N(UnusedFallingPath2)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetPlayerPos, LVar1, LVar2, LVar3) + Wait(1) + IfNe(LVar0, 1) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_AnimateSwingingChains) = { - EVT_LOOP(0) - EVT_CALL(MakeLerp, 90, -90, 30 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_ku_ta, 0, MV_CastleLiftDist, 0) - EVT_CALL(N(MakeCastleChainAngle), LVar0) - EVT_CALL(RotateGroup, MODEL_ku_ta, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LOOP(2) - EVT_CALL(TranslateGroup, MODEL_ku_ta, 0, MV_CastleLiftDist, 0) - EVT_CALL(RotateGroup, MODEL_ku_ta, -20, 0, 0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(MakeLerp, -90, 90, 30 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_ku_ta, 0, MV_CastleLiftDist, 0) - EVT_CALL(N(MakeCastleChainAngle), LVar0) - EVT_CALL(RotateGroup, MODEL_ku_ta, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LOOP(2) - EVT_CALL(TranslateGroup, MODEL_ku_ta, 0, MV_CastleLiftDist, 0) - EVT_CALL(RotateGroup, MODEL_ku_ta, 20, 0, 0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(MakeLerp, 90, -90, 30 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_ku_ta, 0, MV_CastleLiftDist, 0) + Call(N(MakeCastleChainAngle), LVar0) + Call(RotateGroup, MODEL_ku_ta, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Loop(2) + Call(TranslateGroup, MODEL_ku_ta, 0, MV_CastleLiftDist, 0) + Call(RotateGroup, MODEL_ku_ta, -20, 0, 0, 1) + Wait(1) + EndLoop + Call(MakeLerp, -90, 90, 30 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_ku_ta, 0, MV_CastleLiftDist, 0) + Call(N(MakeCastleChainAngle), LVar0) + Call(RotateGroup, MODEL_ku_ta, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Loop(2) + Call(TranslateGroup, MODEL_ku_ta, 0, MV_CastleLiftDist, 0) + Call(RotateGroup, MODEL_ku_ta, 20, 0, 0, 1) + Wait(1) + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_AnimateSpinningRing) = { - EVT_LOOP(0) - EVT_CALL(MakeLerp, 45, -45, 60 * DT, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_wa, 0, MV_CastleLiftDist, 0) - EVT_CALL(RotateGroup, MODEL_wa, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, -45, 45, 60 * DT, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_wa, 0, MV_CastleLiftDist, 0) - EVT_CALL(RotateGroup, MODEL_wa, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(MakeLerp, 45, -45, 60 * DT, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_wa, 0, MV_CastleLiftDist, 0) + Call(RotateGroup, MODEL_wa, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, -45, 45, 60 * DT, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_wa, 0, MV_CastleLiftDist, 0) + Call(RotateGroup, MODEL_wa, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_AnimateCastle) = { - EVT_SET(MV_CastleLiftDist, 0) - EVT_EXEC(N(EVS_AnimateSwingingChains)) - EVT_EXEC(N(EVS_AnimateSpinningRing)) - EVT_CALL(MakeLerp, -800, 4500, 400 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(MV_CastleLiftDist, LVar0) - EVT_CALL(TranslateGroup, MODEL_g439, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_kao, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_yoru, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(MV_CastleLiftDist, 0) + Exec(N(EVS_AnimateSwingingChains)) + Exec(N(EVS_AnimateSpinningRing)) + Call(MakeLerp, -800, 4500, 400 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Set(MV_CastleLiftDist, LVar0) + Call(TranslateGroup, MODEL_g439, 0, LVar0, 0) + Call(TranslateGroup, MODEL_kao, 0, LVar0, 0) + Call(TranslateGroup, MODEL_yoru, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_80241190) = { - EVT_CALL(MakeLerp, 0, -5000, 300, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o1464, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(MakeLerp, 0, -5000, 300, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o1464, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_80241224) = { - EVT_CALL(MakeLerp, 0, -5000, 300, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o1502, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(MakeLerp, 0, -5000, 300, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o1502, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_802412B8) = { - EVT_CALL(MakeLerp, 0, -5000, 300, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o1465, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(MakeLerp, 0, -5000, 300, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o1465, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_8024134C) = { - EVT_CALL(MakeLerp, 0, -5000, 300, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o1503, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(MakeLerp, 0, -5000, 300, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o1503, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(MV_Scene_CastleAscending) = { - EVT_CALL(SetMusicTrack, 0, SONG_BOWSER_ATTACKS, 0, 8) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerPos, 0, 0, 2000) - EVT_CALL(EnableGroup, MODEL_hiru, FALSE) - EVT_CALL(EnableGroup, MODEL_niwa, FALSE) - EVT_CALL(EnableGroup, MODEL_jimidori, FALSE) - EVT_CALL(EnableGroup, MODEL_ki1, FALSE) - EVT_CALL(EnableGroup, MODEL_jimen, FALSE) - EVT_CALL(EnableGroup, MODEL_kemuri, FALSE) - EVT_CALL(EnableGroup, MODEL_obj, FALSE) - EVT_CALL(EnableGroup, MODEL_g277, FALSE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 80, 16, 4096) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, -1, 0) - EVT_CALL(SetCamType, CAM_DEFAULT, 1, TRUE) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -150, 0, 0) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(-13.0), EVT_FLOAT(18.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_EXEC(N(EVS_AnimateCastle)) - EVT_WAIT(1) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -50, 200, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(1000.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.75)) - EVT_WAIT(180 * DT) - EVT_CALL(GotoMap, EVT_PTR("kkj_13"), kkj_13_ENTRY_2) - EVT_WAIT(100 * DT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BOWSER_ATTACKS, 0, 8) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerPos, 0, 0, 2000) + Call(EnableGroup, MODEL_hiru, FALSE) + Call(EnableGroup, MODEL_niwa, FALSE) + Call(EnableGroup, MODEL_jimidori, FALSE) + Call(EnableGroup, MODEL_ki1, FALSE) + Call(EnableGroup, MODEL_jimen, FALSE) + Call(EnableGroup, MODEL_kemuri, FALSE) + Call(EnableGroup, MODEL_obj, FALSE) + Call(EnableGroup, MODEL_g277, FALSE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 80, 16, 4096) + Call(UseSettingsFrom, CAM_DEFAULT, 0, -1, 0) + Call(SetCamType, CAM_DEFAULT, 1, TRUE) + Call(SetPanTarget, CAM_DEFAULT, -150, 0, 0) + Call(SetCamPitch, CAM_DEFAULT, Float(-13.0), Float(18.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Exec(N(EVS_AnimateCastle)) + Wait(1) + Call(SetPanTarget, CAM_DEFAULT, -50, 200, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(1000.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.75)) + Wait(180 * DT) + Call(GotoMap, Ref("kkj_13"), kkj_13_ENTRY_2) + Wait(100 * DT) + Call(DisablePlayerInput, FALSE) + Return + End }; Vec3f N(FlightPath_TossedOut)[] = { @@ -238,84 +238,84 @@ Vec3f N(FlightPath_TossedOut)[] = { }; EvtScript N(MV_Scene_PlayerTossedOut) = { - EVT_CALL(FadeOutMusic, 0, 500) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_UsePower) - EVT_CALL(EnableGroup, MODEL_hiru, FALSE) - EVT_CALL(EnableGroup, MODEL_niwa, FALSE) - EVT_CALL(EnableGroup, MODEL_jimidori, FALSE) - EVT_CALL(EnableGroup, MODEL_kumo, FALSE) - EVT_CALL(EnableGroup, MODEL_ki1, FALSE) - EVT_CALL(EnableGroup, MODEL_jimen, FALSE) - EVT_CALL(EnableGroup, MODEL_kemuri, FALSE) - EVT_CALL(EnableGroup, MODEL_obj, FALSE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 80, 16, 4096) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, -1, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, -1, 0) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(-13.0), EVT_FLOAT(18.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_SET(MV_CastleLiftDist, 0) - EVT_EXEC(N(EVS_AnimateSwingingChains)) - EVT_EXEC(N(EVS_AnimateSpinningRing)) - EVT_CHILD_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_ADD(LVar0, 45) - EVT_CALL(InterpPlayerYaw, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(LoadPath, 90 * DT, EVT_PTR(N(FlightPath_TossedOut)), ARRAY_COUNT(N(FlightPath_TossedOut)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetPlayerPos, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(GotoMap, EVT_PTR("kkj_13"), kkj_13_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(FadeOutMusic, 0, 500) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerAnimation, ANIM_Mario1_UsePower) + Call(EnableGroup, MODEL_hiru, FALSE) + Call(EnableGroup, MODEL_niwa, FALSE) + Call(EnableGroup, MODEL_jimidori, FALSE) + Call(EnableGroup, MODEL_kumo, FALSE) + Call(EnableGroup, MODEL_ki1, FALSE) + Call(EnableGroup, MODEL_jimen, FALSE) + Call(EnableGroup, MODEL_kemuri, FALSE) + Call(EnableGroup, MODEL_obj, FALSE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 80, 16, 4096) + Call(UseSettingsFrom, CAM_DEFAULT, 0, -1, 0) + Call(SetPanTarget, CAM_DEFAULT, 0, -1, 0) + Call(SetCamPitch, CAM_DEFAULT, Float(-13.0), Float(18.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Set(MV_CastleLiftDist, 0) + Exec(N(EVS_AnimateSwingingChains)) + Exec(N(EVS_AnimateSpinningRing)) + ChildThread + Set(LVar0, 0) + Loop(0) + Add(LVar0, 45) + Call(InterpPlayerYaw, LVar0, 0) + Wait(1) + EndLoop + EndChildThread + Call(LoadPath, 90 * DT, Ref(N(FlightPath_TossedOut)), ARRAY_COUNT(N(FlightPath_TossedOut)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetPlayerPos, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(GotoMap, Ref("kkj_13"), kkj_13_ENTRY_3) + Wait(100) + Return + End }; // alternate scene for the player being tossed out the window, where they flutter down like a piece of paper EvtScript N(EVS_Scene_UnusedTossOut) = { - EVT_CALL(FadeOutMusic, 0, 500) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, TRUE) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Hurt) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, FALSE) - EVT_CALL(EnableGroup, MODEL_hiru, FALSE) - EVT_CALL(EnableGroup, MODEL_niwa, FALSE) - EVT_CALL(EnableGroup, MODEL_jimidori, FALSE) - EVT_CALL(EnableGroup, MODEL_kumo, FALSE) - EVT_CALL(EnableGroup, MODEL_ki1, FALSE) - EVT_CALL(EnableGroup, MODEL_jimen, FALSE) - EVT_CALL(EnableGroup, MODEL_kemuri, FALSE) - EVT_CALL(EnableGroup, MODEL_obj, FALSE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 6000) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -400, -1500, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(3500.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -300, -160) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 300, 80) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(-30.0), EVT_FLOAT(0.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_WAIT(15) - EVT_EXEC_WAIT(N(EVS_UnusedFalling2)) - EVT_WAIT(60) - EVT_CALL(GotoMap, EVT_PTR("hos_10"), hos_10_ENTRY_5) - EVT_WAIT(100) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(FadeOutMusic, 0, 500) + Call(DisablePlayerInput, TRUE) + Call(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, TRUE) + Call(InterpPlayerYaw, 90, 0) + Call(SetPlayerAnimation, ANIM_Mario1_Hurt) + Call(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, FALSE) + Call(EnableGroup, MODEL_hiru, FALSE) + Call(EnableGroup, MODEL_niwa, FALSE) + Call(EnableGroup, MODEL_jimidori, FALSE) + Call(EnableGroup, MODEL_kumo, FALSE) + Call(EnableGroup, MODEL_ki1, FALSE) + Call(EnableGroup, MODEL_jimen, FALSE) + Call(EnableGroup, MODEL_kemuri, FALSE) + Call(EnableGroup, MODEL_obj, FALSE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 6000) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, -400, -1500, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(3500.0)) + Call(SetCamPosA, CAM_DEFAULT, -300, -160) + Call(SetCamPosB, CAM_DEFAULT, 300, 80) + Call(SetCamPitch, CAM_DEFAULT, Float(-30.0), Float(0.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(DisablePlayerPhysics, TRUE) + Wait(15) + ExecWait(N(EVS_UnusedFalling2)) + Wait(60) + Call(GotoMap, Ref("hos_10"), hos_10_ENTRY_5) + Wait(100) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_osr/osr_03/osr_03_4_starship.c b/src/world/area_osr/osr_03/osr_03_4_starship.c index be700bdb757..a0ff79cc041 100644 --- a/src/world/area_osr/osr_03/osr_03_4_starship.c +++ b/src/world/area_osr/osr_03/osr_03_4_starship.c @@ -1,21 +1,21 @@ #include "osr_03.h" EvtScript N(EVS_SetStarshipPosRot) = { - EVT_LOOP(0) - EVT_CALL(TranslateGroup, MODEL_g277, MV_Starship_PosX, MV_Starship_PosY, MV_Starship_PosZ) - EVT_CALL(RotateGroup, MODEL_g277, MV_Starship_Yaw, 0, 1, 0) - EVT_SET(LVar0, MV_Starship_PosX) - EVT_SET(LVar1, MV_Starship_PosY) - EVT_SET(LVar2, MV_Starship_PosZ) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar2, -10) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 20) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(TranslateGroup, MODEL_g277, MV_Starship_PosX, MV_Starship_PosY, MV_Starship_PosZ) + Call(RotateGroup, MODEL_g277, MV_Starship_Yaw, 0, 1, 0) + Set(LVar0, MV_Starship_PosX) + Set(LVar1, MV_Starship_PosY) + Set(LVar2, MV_Starship_PosZ) + Add(LVar1, 20) + Add(LVar2, -10) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar2, 20) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; Vec3f N(FlightPath)[] = { @@ -31,68 +31,68 @@ Vec3f N(FlightPath)[] = { }; EvtScript N(EVS_Scene_Starship) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(TranslateGroup, MODEL_g277, -700, -350, 1600) - EVT_SET(MV_Starship_Yaw, 50) - EVT_SET(MV_Starship_PosX, -700) - EVT_SET(MV_Starship_PosY, -350) - EVT_SET(MV_Starship_PosZ, 1600) - EVT_EXEC(N(EVS_SetStarshipPosRot)) - EVT_SET(MV_CastleLiftDist, 0) - EVT_EXEC(N(EVS_AnimateSwingingChains)) - EVT_EXEC(N(EVS_AnimateSpinningRing)) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 80, 16, 4096) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, -1, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, -1, 0) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(-13.0), EVT_FLOAT(18.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_CALL(PlaySound, SOUND_STARSHIP_NEAR_FLYBY) - EVT_CALL(MakeLerp, 50, 10, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(MV_Starship_Yaw, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 10, 115, 80, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(MV_Starship_Yaw, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CHILD_THREAD - EVT_LOOP(0) - EVT_CALL(FacePlayerTowardPoint, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_THREAD - EVT_CALL(LoadPath, 120, EVT_PTR(N(FlightPath)), ARRAY_COUNT(N(FlightPath)), EASING_LINEAR) - EVT_LABEL(90) - EVT_CALL(GetNextPathPos) - EVT_SET(MV_Starship_PosX, LVar1) - EVT_SET(MV_Starship_PosY, LVar2) - EVT_SET(MV_Starship_PosZ, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(90) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(100) - EVT_CALL(GotoMap, EVT_PTR("kpa_60"), kpa_60_ENTRY_4) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(TranslateGroup, MODEL_g277, -700, -350, 1600) + Set(MV_Starship_Yaw, 50) + Set(MV_Starship_PosX, -700) + Set(MV_Starship_PosY, -350) + Set(MV_Starship_PosZ, 1600) + Exec(N(EVS_SetStarshipPosRot)) + Set(MV_CastleLiftDist, 0) + Exec(N(EVS_AnimateSwingingChains)) + Exec(N(EVS_AnimateSpinningRing)) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 80, 16, 4096) + Call(UseSettingsFrom, CAM_DEFAULT, 0, -1, 0) + Call(SetPanTarget, CAM_DEFAULT, 0, -1, 0) + Call(SetCamPitch, CAM_DEFAULT, Float(-13.0), Float(18.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Call(PlaySound, SOUND_STARSHIP_NEAR_FLYBY) + Call(MakeLerp, 50, 10, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Set(MV_Starship_Yaw, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 10, 115, 80, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Set(MV_Starship_Yaw, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + ChildThread + Loop(0) + Call(FacePlayerTowardPoint, 0, 0, 0) + Wait(1) + EndLoop + EndChildThread + Thread + Call(LoadPath, 120, Ref(N(FlightPath)), ARRAY_COUNT(N(FlightPath)), EASING_LINEAR) + Label(90) + Call(GetNextPathPos) + Set(MV_Starship_PosX, LVar1) + Set(MV_Starship_PosY, LVar2) + Set(MV_Starship_PosZ, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(90) + EndIf + EndThread + Wait(100) + Call(GotoMap, Ref("kpa_60"), kpa_60_ENTRY_4) + Wait(100) + Return + End }; diff --git a/src/world/area_osr/osr_03/osr_03_5_interlude.c b/src/world/area_osr/osr_03/osr_03_5_interlude.c index cde6a83cf80..be5ca45c615 100644 --- a/src/world/area_osr/osr_03/osr_03_5_interlude.c +++ b/src/world/area_osr/osr_03/osr_03_5_interlude.c @@ -34,127 +34,127 @@ Vec3f N(KammyFlightPath2)[] = { }; EvtScript N(EVS_PlayKammyFlightFX) = { - EVT_CHILD_THREAD - EVT_SET(LVar0, 110) - EVT_LOOP(0) - EVT_CALL(PlaySoundWithVolume, SOUND_FLIGHT, LVar0) - EVT_ADD(LVar0, -2) - EVT_IF_LT(LVar0, 10) - EVT_SET(LVar0, 10) - EVT_END_IF - EVT_WAIT(4) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(GetNpcPos, NPC_Kammy, LVar6, LVar7, LVar8) - EVT_LOOP(0) - EVT_CALL(N(GetKammyFlightEmitterPos)) - EVT_CALL(GetNpcPos, NPC_Kammy, LVar9, LVarA, LVarB) - EVT_SET(LVar3, LVar9) - EVT_SET(LVar4, LVarA) - EVT_SET(LVar5, LVarB) - EVT_SUB(LVar3, LVar6) - EVT_SUB(LVar4, LVar7) - EVT_SUB(LVar5, LVar8) - EVT_SET(LVar6, LVar9) - EVT_SET(LVar7, LVarA) - EVT_SET(LVar8, LVarB) - EVT_IF_EQ(LVar3, 0) - EVT_IF_EQ(LVar5, 0) - EVT_ELSE - EVT_PLAY_EFFECT(EFFECT_PURPLE_RING, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_ELSE - EVT_PLAY_EFFECT(EFFECT_PURPLE_RING, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_WAIT(3) - EVT_END_LOOP - EVT_RETURN - EVT_END + ChildThread + Set(LVar0, 110) + Loop(0) + Call(PlaySoundWithVolume, SOUND_FLIGHT, LVar0) + Add(LVar0, -2) + IfLt(LVar0, 10) + Set(LVar0, 10) + EndIf + Wait(4) + EndLoop + EndChildThread + Call(GetNpcPos, NPC_Kammy, LVar6, LVar7, LVar8) + Loop(0) + Call(N(GetKammyFlightEmitterPos)) + Call(GetNpcPos, NPC_Kammy, LVar9, LVarA, LVarB) + Set(LVar3, LVar9) + Set(LVar4, LVarA) + Set(LVar5, LVarB) + Sub(LVar3, LVar6) + Sub(LVar4, LVar7) + Sub(LVar5, LVar8) + Set(LVar6, LVar9) + Set(LVar7, LVarA) + Set(LVar8, LVarB) + IfEq(LVar3, 0) + IfEq(LVar5, 0) + Else + PlayEffect(EFFECT_PURPLE_RING, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.0)) + EndIf + Else + PlayEffect(EFFECT_PURPLE_RING, 0, LVar0, LVar1, LVar2, LVar3, LVar4, LVar5, Float(1.0)) + EndIf + Wait(3) + EndLoop + Return + End }; EvtScript N(EVS_KammyReturnsToCastle) = { - EVT_WAIT(30) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(NpcFacePlayer, NPC_Kammy, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_EXEC_GET_TID(N(EVS_PlayKammyFlightFX), LVar9) - EVT_CALL(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim1A) - EVT_CALL(LoadPath, 30, EVT_PTR(N(KammyFlightPath1)), ARRAY_COUNT(N(KammyFlightPath1)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Kammy, LVar1, LVar2, LVar3) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(LoadPath, 150, EVT_PTR(N(KammyFlightPath2)), ARRAY_COUNT(N(KammyFlightPath2)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Kammy, LVar1, LVar2, LVar3) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_KILL_THREAD(LVar9) - EVT_RETURN - EVT_END + Wait(30) + Thread + Loop(0) + Call(NpcFacePlayer, NPC_Kammy, 0) + Wait(1) + EndLoop + EndThread + ExecGetTID(N(EVS_PlayKammyFlightFX), LVar9) + Call(SetNpcAnimation, NPC_Kammy, ANIM_WorldKammy_Anim1A) + Call(LoadPath, 30, Ref(N(KammyFlightPath1)), ARRAY_COUNT(N(KammyFlightPath1)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Kammy, LVar1, LVar2, LVar3) + IfEq(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(LoadPath, 150, Ref(N(KammyFlightPath2)), ARRAY_COUNT(N(KammyFlightPath2)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Kammy, LVar1, LVar2, LVar3) + IfEq(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + KillThread(LVar9) + Return + End }; EvtScript N(EVS_Scene_BeginInterlude) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(EnableGroup, MODEL_hiru, FALSE) - EVT_CALL(EnableGroup, MODEL_niwa, FALSE) - EVT_CALL(EnableGroup, MODEL_jimidori, FALSE) - EVT_CALL(EnableGroup, MODEL_kumo, FALSE) - EVT_CALL(EnableGroup, MODEL_ki1, FALSE) - EVT_CALL(EnableGroup, MODEL_jimen, FALSE) - EVT_CALL(EnableGroup, MODEL_kemuri, FALSE) - EVT_CALL(EnableGroup, MODEL_obj, FALSE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 80, 16, 4096) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, -1, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, -1, 0) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(-13.0), EVT_FLOAT(18.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_SET(MV_CastleLiftDist, 0) - EVT_EXEC(N(EVS_AnimateSwingingChains)) - EVT_EXEC(N(EVS_AnimateSpinningRing)) - EVT_WAIT(30) - EVT_IF_LT(GB_StoryProgress, STORY_CH0_KAMMY_RETURNED_TO_BOWSER) - EVT_EXEC_WAIT(N(EVS_KammyReturnsToCastle)) - EVT_END_IF - EVT_WAIT(80) - EVT_CALL(N(SetPlayerAsPeach)) - EVT_SET(GB_KKJ_LastPartner, LVar0) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH0_KAMMY_RETURNED_TO_BOWSER) - EVT_CALL(GotoMap, EVT_PTR("kkj_15"), kkj_15_ENTRY_2) - EVT_CASE_LT(STORY_CH0_BEGAN_PEACH_MISSION) - EVT_CALL(GotoMap, EVT_PTR("kkj_14"), kkj_14_ENTRY_3) - EVT_CASE_LT(STORY_CH1_BEGAN_PEACH_MISSION) - EVT_CALL(GotoMap, EVT_PTR("kkj_14"), kkj_14_ENTRY_4) - EVT_CASE_LT(STORY_CH2_BEGAN_PEACH_MISSION) - EVT_CALL(GotoMap, EVT_PTR("kkj_14"), kkj_14_ENTRY_5) - EVT_CASE_LT(STORY_CH3_BEGAN_PEACH_MISSION) - EVT_CALL(GotoMap, EVT_PTR("kkj_14"), kkj_14_ENTRY_6) - EVT_CASE_LT(STORY_CH4_BEGAN_PEACH_MISSION) - EVT_CALL(GotoMap, EVT_PTR("kkj_14"), kkj_14_ENTRY_7) - EVT_CASE_LT(STORY_CH5_BEGAN_PEACH_MISSION) - EVT_CALL(GotoMap, EVT_PTR("kkj_14"), kkj_14_ENTRY_8) - EVT_CASE_LT(STORY_CH6_BEGAN_PEACH_MISSION) - EVT_CALL(GotoMap, EVT_PTR("kkj_14"), kkj_14_ENTRY_9) - EVT_CASE_LT(STORY_CH7_BEGAN_PEACH_MISSION) - EVT_CALL(GotoMap, EVT_PTR("kkj_26"), kkj_26_ENTRY_1) - EVT_END_SWITCH - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(EnableGroup, MODEL_hiru, FALSE) + Call(EnableGroup, MODEL_niwa, FALSE) + Call(EnableGroup, MODEL_jimidori, FALSE) + Call(EnableGroup, MODEL_kumo, FALSE) + Call(EnableGroup, MODEL_ki1, FALSE) + Call(EnableGroup, MODEL_jimen, FALSE) + Call(EnableGroup, MODEL_kemuri, FALSE) + Call(EnableGroup, MODEL_obj, FALSE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 80, 16, 4096) + Call(UseSettingsFrom, CAM_DEFAULT, 0, -1, 0) + Call(SetPanTarget, CAM_DEFAULT, 0, -1, 0) + Call(SetCamPitch, CAM_DEFAULT, Float(-13.0), Float(18.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Set(MV_CastleLiftDist, 0) + Exec(N(EVS_AnimateSwingingChains)) + Exec(N(EVS_AnimateSpinningRing)) + Wait(30) + IfLt(GB_StoryProgress, STORY_CH0_KAMMY_RETURNED_TO_BOWSER) + ExecWait(N(EVS_KammyReturnsToCastle)) + EndIf + Wait(80) + Call(N(SetPlayerAsPeach)) + Set(GB_KKJ_LastPartner, LVar0) + Switch(GB_StoryProgress) + CaseLt(STORY_CH0_KAMMY_RETURNED_TO_BOWSER) + Call(GotoMap, Ref("kkj_15"), kkj_15_ENTRY_2) + CaseLt(STORY_CH0_BEGAN_PEACH_MISSION) + Call(GotoMap, Ref("kkj_14"), kkj_14_ENTRY_3) + CaseLt(STORY_CH1_BEGAN_PEACH_MISSION) + Call(GotoMap, Ref("kkj_14"), kkj_14_ENTRY_4) + CaseLt(STORY_CH2_BEGAN_PEACH_MISSION) + Call(GotoMap, Ref("kkj_14"), kkj_14_ENTRY_5) + CaseLt(STORY_CH3_BEGAN_PEACH_MISSION) + Call(GotoMap, Ref("kkj_14"), kkj_14_ENTRY_6) + CaseLt(STORY_CH4_BEGAN_PEACH_MISSION) + Call(GotoMap, Ref("kkj_14"), kkj_14_ENTRY_7) + CaseLt(STORY_CH5_BEGAN_PEACH_MISSION) + Call(GotoMap, Ref("kkj_14"), kkj_14_ENTRY_8) + CaseLt(STORY_CH6_BEGAN_PEACH_MISSION) + Call(GotoMap, Ref("kkj_14"), kkj_14_ENTRY_9) + CaseLt(STORY_CH7_BEGAN_PEACH_MISSION) + Call(GotoMap, Ref("kkj_26"), kkj_26_ENTRY_1) + EndSwitch + Wait(100) + Return + End }; diff --git a/src/world/area_osr/osr_03/osr_03_6_ending.c b/src/world/area_osr/osr_03/osr_03_6_ending.c index 3d28cd4598e..963d4975702 100644 --- a/src/world/area_osr/osr_03/osr_03_6_ending.c +++ b/src/world/area_osr/osr_03/osr_03_6_ending.c @@ -62,18 +62,18 @@ API_CALLABLE(N(BigExplosionRumble)) { } EvtScript N(EVS_UpdateCamShaking) = { - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 210, EVT_FLOAT(2.0)) - EVT_CALL(MakeLerp, 200, 50, 65, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, 100) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 4, LVar0) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(ShakeCam, CAM_DEFAULT, 0, 210, Float(2.0)) + Call(MakeLerp, 200, 50, 65, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + DivF(LVar0, 100) + Call(ShakeCam, CAM_DEFAULT, 0, 4, LVar0) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; s32 N(ExplosionPositions)[] = { @@ -88,104 +88,104 @@ s32 N(ExplosionPositions)[] = { }; EvtScript N(EVS_PlayExplosionFX) = { - EVT_SET(LVar4, 20) - EVT_SET(LVar5, 110) - EVT_LOOP(0) - EVT_USE_BUF(EVT_PTR(N(ExplosionPositions))) - EVT_LOOP(8) - EVT_CALL(PlaySoundWithVolume, SOUND_SEQ_FINALE_EXPLOSION, LVar5) - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 0, LVar0, LVar1, LVar2, EVT_FLOAT(6.0), 30) - EVT_WAIT(LVar4) - EVT_END_LOOP - EVT_ADD(LVar5, -10) - EVT_IF_LT(LVar5, 10) - EVT_SET(LVar5, 10) - EVT_END_IF - EVT_ADD(LVar4, -4) - EVT_IF_LT(LVar4, 5) - EVT_SET(LVar4, 5) - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVar4, 20) + Set(LVar5, 110) + Loop(0) + UseBuf(Ref(N(ExplosionPositions))) + Loop(8) + Call(PlaySoundWithVolume, SOUND_SEQ_FINALE_EXPLOSION, LVar5) + BufRead3(LVar0, LVar1, LVar2) + PlayEffect(EFFECT_RING_BLAST, 0, LVar0, LVar1, LVar2, Float(6.0), 30) + Wait(LVar4) + EndLoop + Add(LVar5, -10) + IfLt(LVar5, 10) + Set(LVar5, 10) + EndIf + Add(LVar4, -4) + IfLt(LVar4, 5) + Set(LVar4, 5) + EndIf + EndLoop + Return + End }; EvtScript N(EVS_Scene_CastleDestruction) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(SetPlayerPos, 0, 0, 0) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_SET(MV_CastleLiftDist, 0) - EVT_EXEC(N(EVS_AnimateSwingingChains)) - EVT_EXEC(N(EVS_AnimateSpinningRing)) - EVT_EXEC(N(EVS_UpdateCamShaking)) - EVT_EXEC_GET_TID(N(EVS_PlayExplosionFX), LVar9) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 22, 16, 4096) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamType, CAM_DEFAULT, 1, TRUE) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -60, 0, 0) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(-20.0), EVT_FLOAT(-4.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, -40) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(20) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(-13.0), EVT_FLOAT(15.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.3)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_LOOP(6) - EVT_CALL(RandInt, 20, LVar0) - EVT_ADD(LVar0, 30) - EVT_WAIT(LVar0) - EVT_CALL(N(FlashScreenWhite)) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(MakeLerp, 220, 600, 90, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, LVar0) - EVT_DIVF(LVar2, 10) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, LVar2, 16, 4096) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 600, 1200, 250, EASING_CUBIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, LVar0) - EVT_DIVF(LVar2, 10) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, LVar2, 1, 4096) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_KILL_THREAD(LVar9) - EVT_WAIT(50) - EVT_CALL(PlaySound, SOUND_KPA_LIGHT_RAYS) - EVT_PLAY_EFFECT(EFFECT_LIGHT_RAYS, 2, 0, -430, 1920, 15, LVar9) - EVT_WAIT(30) - EVT_THREAD - EVT_CALL(N(BigExplosionRumble), 30, EVT_FLOAT(2.0)) - EVT_CALL(MakeLerp, 200, 100, 15, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, 100) - EVT_CALL(N(BigExplosionRumble), 4, LVar0) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(GotoMapSpecial, EVT_PTR("hos_10"), hos_10_ENTRY_1, TRANSITION_SLOW_FADE_TO_WHITE) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(SetPlayerPos, 0, 0, 0) + Call(DisablePlayerPhysics, TRUE) + Set(MV_CastleLiftDist, 0) + Exec(N(EVS_AnimateSwingingChains)) + Exec(N(EVS_AnimateSpinningRing)) + Exec(N(EVS_UpdateCamShaking)) + ExecGetTID(N(EVS_PlayExplosionFX), LVar9) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 22, 16, 4096) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetCamType, CAM_DEFAULT, 1, TRUE) + Call(SetPanTarget, CAM_DEFAULT, -60, 0, 0) + Call(SetCamPitch, CAM_DEFAULT, Float(-20.0), Float(-4.0)) + Call(SetCamPosA, CAM_DEFAULT, 0, -40) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(20) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetCamPitch, CAM_DEFAULT, Float(-13.0), Float(15.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.3)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Loop(6) + Call(RandInt, 20, LVar0) + Add(LVar0, 30) + Wait(LVar0) + Call(N(FlashScreenWhite)) + EndLoop + EndThread + Call(MakeLerp, 220, 600, 90, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, LVar0) + DivF(LVar2, 10) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, LVar2, 16, 4096) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 600, 1200, 250, EASING_CUBIC_OUT) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, LVar0) + DivF(LVar2, 10) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, LVar2, 1, 4096) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + KillThread(LVar9) + Wait(50) + Call(PlaySound, SOUND_KPA_LIGHT_RAYS) + PlayEffect(EFFECT_LIGHT_RAYS, 2, 0, -430, 1920, 15, LVar9) + Wait(30) + Thread + Call(N(BigExplosionRumble), 30, Float(2.0)) + Call(MakeLerp, 200, 100, 15, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + DivF(LVar0, 100) + Call(N(BigExplosionRumble), 4, LVar0) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(GotoMapSpecial, Ref("hos_10"), hos_10_ENTRY_1, TRANSITION_SLOW_FADE_TO_WHITE) + Wait(100) + Return + End }; diff --git a/src/world/area_osr/osr_04/osr_04_1_main.c b/src/world/area_osr/osr_04/osr_04_1_main.c index 76326479042..805584a39f7 100644 --- a/src/world/area_osr/osr_04/osr_04_1_main.c +++ b/src/world/area_osr/osr_04/osr_04_1_main.c @@ -1,40 +1,40 @@ #include "osr_04.h" EvtScript N(EVS_TexPan_Smoke) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, MODEL_ke1, TEX_PANNER_0) - EVT_CALL(SetTexPanner, MODEL_ke2, TEX_PANNER_1) - EVT_CALL(SetTexPanner, MODEL_ke3, TEX_PANNER_2) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LABEL(10) - EVT_LOOP(5) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, 0, LVar0, LVar1) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, 0, LVar0, LVar1) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, 0, LVar0, LVar1) - EVT_ADD(LVar1, 100) - EVT_WAIT(1) - EVT_END_LOOP - EVT_ADD(LVar0, 0x2000) - EVT_GOTO(10) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, MODEL_ke1, TEX_PANNER_0) + Call(SetTexPanner, MODEL_ke2, TEX_PANNER_1) + Call(SetTexPanner, MODEL_ke3, TEX_PANNER_2) + Set(LVar0, 0) + Set(LVar1, 0) + Label(10) + Loop(5) + Call(SetTexPanOffset, TEX_PANNER_0, 0, LVar0, LVar1) + Call(SetTexPanOffset, TEX_PANNER_1, 0, LVar0, LVar1) + Call(SetTexPanOffset, TEX_PANNER_2, 0, LVar0, LVar1) + Add(LVar1, 100) + Wait(1) + EndLoop + Add(LVar0, 0x2000) + Goto(10) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_EXEC(N(EVS_Scene_BowsersAssault)) - EVT_EXEC(N(EVS_TexPan_Smoke)) - EVT_RETURN - EVT_END + Exec(N(EVS_Scene_BowsersAssault)) + Exec(N(EVS_TexPan_Smoke)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_NONE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(FadeOutMusic, 0, 500) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_NONE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(FadeOutMusic, 0, 500) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_osr/osr_04/osr_04_2_assault.c b/src/world/area_osr/osr_04/osr_04_2_assault.c index e539b64a3ab..d7bb00e41df 100644 --- a/src/world/area_osr/osr_04/osr_04_2_assault.c +++ b/src/world/area_osr/osr_04/osr_04_2_assault.c @@ -27,27 +27,27 @@ s32 N(ThinTileSpawnPositions)[] = { }; EvtScript N(EVS_DropDebris_ThinTiles) = { - EVT_USE_BUF(EVT_PTR(N(ThinTileSpawnPositions))) - EVT_LOOP(0) - EVT_BUF_READ3(LVar2, LVar3, LVar4) - EVT_IF_EQ(LVar2, -1) - EVT_RETURN - EVT_END_IF - EVT_CALL(MakeLerp, 500, 0, LVar4, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_o1, LVar2, LVar0, LVar3) - EVT_CALL(RotateGroup, MODEL_o1, LVar4, 1, 1, 1) - EVT_SUB(LVar4, 15) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + UseBuf(Ref(N(ThinTileSpawnPositions))) + Loop(0) + BufRead3(LVar2, LVar3, LVar4) + IfEq(LVar2, -1) + Return + EndIf + Call(MakeLerp, 500, 0, LVar4, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_o1, LVar2, LVar0, LVar3) + Call(RotateGroup, MODEL_o1, LVar4, 1, 1, 1) + Sub(LVar4, 15) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(1) + EndLoop + Return + End }; s32 N(ThickTileSpawnPositions)[] = { @@ -62,43 +62,43 @@ s32 N(ThickTileSpawnPositions)[] = { }; EvtScript N(EVS_DropDebris_ThickTiles) = { - EVT_USE_BUF(EVT_PTR(N(ThickTileSpawnPositions))) - EVT_LOOP(0) - EVT_BUF_READ3(LVar2, LVar3, LVar4) - EVT_IF_EQ(LVar2, -1) - EVT_RETURN - EVT_END_IF - EVT_CALL(MakeLerp, 500, 0, LVar4, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_o2, LVar2, LVar0, LVar3) - EVT_CALL(RotateGroup, MODEL_o2, LVar4, 1, 1, 1) - EVT_ADD(LVar4, 15) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + UseBuf(Ref(N(ThickTileSpawnPositions))) + Loop(0) + BufRead3(LVar2, LVar3, LVar4) + IfEq(LVar2, -1) + Return + EndIf + Call(MakeLerp, 500, 0, LVar4, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_o2, LVar2, LVar0, LVar3) + Call(RotateGroup, MODEL_o2, LVar4, 1, 1, 1) + Add(LVar4, 15) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_DropDebris_Flag) = { - EVT_CALL(MakeLerp, 500, 0, 80, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_o3, -340, LVar0, 830) - EVT_CALL(RotateGroup, MODEL_o3, LVar4, 1, 1, 1) - EVT_SUB(LVar4, 30) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(MakeLerp, 500, 0, 80, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_o3, -340, LVar0, 830) + Call(RotateGroup, MODEL_o3, LVar4, 1, 1, 1) + Sub(LVar4, 30) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; s32 N(LeafClumpSpawnPositions)[] = { @@ -109,43 +109,43 @@ s32 N(LeafClumpSpawnPositions)[] = { }; EvtScript N(EVS_DropDebris_Leaves) = { - EVT_USE_BUF(EVT_PTR(N(LeafClumpSpawnPositions))) - EVT_LOOP(0) - EVT_BUF_READ3(LVar2, LVar3, LVar4) - EVT_IF_EQ(LVar2, -1) - EVT_RETURN - EVT_END_IF - EVT_CALL(MakeLerp, 500, 0, LVar4, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_o4, LVar2, LVar0, LVar3) - EVT_CALL(RotateGroup, MODEL_o4, LVar4, 1, 1, 1) - EVT_ADD(LVar4, 15) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + UseBuf(Ref(N(LeafClumpSpawnPositions))) + Loop(0) + BufRead3(LVar2, LVar3, LVar4) + IfEq(LVar2, -1) + Return + EndIf + Call(MakeLerp, 500, 0, LVar4, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_o4, LVar2, LVar0, LVar3) + Call(RotateGroup, MODEL_o4, LVar4, 1, 1, 1) + Add(LVar4, 15) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_DropDebris_TreeTrunk) = { - EVT_CALL(MakeLerp, 500, 0, 80, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_o5, -190, LVar0, 1030) - EVT_CALL(RotateGroup, MODEL_o5, LVar4, 1, 1, 1) - EVT_SUB(LVar4, 15) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(MakeLerp, 500, 0, 80, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_o5, -190, LVar0, 1030) + Call(RotateGroup, MODEL_o5, LVar4, 1, 1, 1) + Sub(LVar4, 15) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; s32 N(StoneBlockSpawnPositions)[] = { @@ -160,422 +160,422 @@ s32 N(StoneBlockSpawnPositions)[] = { }; EvtScript N(EVS_DropDebris_StoneBlocks) = { - EVT_USE_BUF(EVT_PTR(N(StoneBlockSpawnPositions))) - EVT_LOOP(0) - EVT_BUF_READ3(LVar2, LVar3, LVar4) - EVT_IF_EQ(LVar2, -1) - EVT_RETURN - EVT_END_IF - EVT_CALL(MakeLerp, 500, 0, LVar4, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_o6, LVar2, LVar0, LVar3) - EVT_CALL(RotateGroup, MODEL_o6, LVar4, 1, 1, 1) - EVT_ADD(LVar4, 15) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + UseBuf(Ref(N(StoneBlockSpawnPositions))) + Loop(0) + BufRead3(LVar2, LVar3, LVar4) + IfEq(LVar2, -1) + Return + EndIf + Call(MakeLerp, 500, 0, LVar4, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_o6, LVar2, LVar0, LVar3) + Call(RotateGroup, MODEL_o6, LVar4, 1, 1, 1) + Add(LVar4, 15) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_AnimateSwingingChains) = { - EVT_LOOP(0) - EVT_CALL(MakeLerp, 90, -90, 30 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_ku_ta, 0, MV_CastleLiftDist, 0) - EVT_CALL(N(MakeCastleChainAngle), LVar0) - EVT_CALL(RotateGroup, MODEL_ku_ta, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LOOP(2) - EVT_CALL(TranslateGroup, MODEL_ku_ta, 0, MV_CastleLiftDist, 0) - EVT_CALL(RotateGroup, MODEL_ku_ta, -20, 0, 0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(MakeLerp, -90, 90, 30 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_ku_ta, 0, MV_CastleLiftDist, 0) - EVT_CALL(N(MakeCastleChainAngle), LVar0) - EVT_CALL(RotateGroup, MODEL_ku_ta, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LOOP(2) - EVT_CALL(TranslateGroup, MODEL_ku_ta, 0, MV_CastleLiftDist, 0) - EVT_CALL(RotateGroup, MODEL_ku_ta, 20, 0, 0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(MakeLerp, 90, -90, 30 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_ku_ta, 0, MV_CastleLiftDist, 0) + Call(N(MakeCastleChainAngle), LVar0) + Call(RotateGroup, MODEL_ku_ta, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Loop(2) + Call(TranslateGroup, MODEL_ku_ta, 0, MV_CastleLiftDist, 0) + Call(RotateGroup, MODEL_ku_ta, -20, 0, 0, 1) + Wait(1) + EndLoop + Call(MakeLerp, -90, 90, 30 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_ku_ta, 0, MV_CastleLiftDist, 0) + Call(N(MakeCastleChainAngle), LVar0) + Call(RotateGroup, MODEL_ku_ta, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Loop(2) + Call(TranslateGroup, MODEL_ku_ta, 0, MV_CastleLiftDist, 0) + Call(RotateGroup, MODEL_ku_ta, 20, 0, 0, 1) + Wait(1) + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_AnimateSpinningRing) = { - EVT_LOOP(0) - EVT_CALL(MakeLerp, 45, -45, 60, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_wa, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, -45, 45, 60, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_wa, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(MakeLerp, 45, -45, 60, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_wa, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, -45, 45, 60, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_wa, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_LiftCastleUp) = { - EVT_THREAD - EVT_WAIT(120 * DT) - EVT_CALL(SetMusicTrack, 0, SONG_BOWSER_ATTACKS, 0, 8) - EVT_END_THREAD - EVT_SET(MV_CastleLiftDist, 0) - EVT_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(MakeLerp, 0, 2500, 450 * DT, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(MV_CastleLiftDist, LVar0) - EVT_CALL(TranslateGroup, MODEL_g439, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_kao, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_hiru, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_EXEC(N(EVS_AnimateSwingingChains)) - EVT_EXEC(N(EVS_AnimateSpinningRing)) - EVT_THREAD - EVT_LOOP(0) - EVT_CALL(MakeLerp, 10, -10, 40 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_ADD(MV_CastleLiftDist, LVar0) - EVT_CALL(TranslateGroup, MODEL_wa, 0, MV_CastleLiftDist, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, -10, 10, 40 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_ADD(MV_CastleLiftDist, LVar0) - EVT_CALL(TranslateGroup, MODEL_wa, 0, MV_CastleLiftDist, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_END_THREAD - EVT_LABEL(22) - EVT_IF_LT(MV_CastleLiftDist, 1000) - EVT_WAIT(1) - EVT_GOTO(22) - EVT_END_IF - EVT_THREAD - EVT_LOOP(300) - EVT_SUB(MV_SmokeVelY, 3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_LABEL(23) - EVT_IF_LT(MV_CastleLiftDist, 1150) - EVT_WAIT(1) - EVT_GOTO(23) - EVT_END_IF - EVT_SET(LVar3, 0) - EVT_EXEC(N(EVS_DropDebris_ThinTiles)) - EVT_EXEC(N(EVS_DropDebris_ThickTiles)) - EVT_EXEC(N(EVS_DropDebris_StoneBlocks)) - EVT_WAIT(10 * DT) - EVT_EXEC(N(EVS_DropDebris_Flag)) - EVT_EXEC(N(EVS_DropDebris_Leaves)) - EVT_EXEC(N(EVS_DropDebris_TreeTrunk)) - EVT_WAIT(150 * DT) - EVT_RETURN - EVT_END + Thread + Wait(120 * DT) + Call(SetMusicTrack, 0, SONG_BOWSER_ATTACKS, 0, 8) + EndThread + Set(MV_CastleLiftDist, 0) + Thread + Wait(20 * DT) + Call(MakeLerp, 0, 2500, 450 * DT, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Set(MV_CastleLiftDist, LVar0) + Call(TranslateGroup, MODEL_g439, 0, LVar0, 0) + Call(TranslateGroup, MODEL_kao, 0, LVar0, 0) + Call(TranslateGroup, MODEL_hiru, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Exec(N(EVS_AnimateSwingingChains)) + Exec(N(EVS_AnimateSpinningRing)) + Thread + Loop(0) + Call(MakeLerp, 10, -10, 40 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Add(MV_CastleLiftDist, LVar0) + Call(TranslateGroup, MODEL_wa, 0, MV_CastleLiftDist, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, -10, 10, 40 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Add(MV_CastleLiftDist, LVar0) + Call(TranslateGroup, MODEL_wa, 0, MV_CastleLiftDist, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + EndThread + Label(22) + IfLt(MV_CastleLiftDist, 1000) + Wait(1) + Goto(22) + EndIf + Thread + Loop(300) + Sub(MV_SmokeVelY, 3) + Wait(1) + EndLoop + EndThread + Label(23) + IfLt(MV_CastleLiftDist, 1150) + Wait(1) + Goto(23) + EndIf + Set(LVar3, 0) + Exec(N(EVS_DropDebris_ThinTiles)) + Exec(N(EVS_DropDebris_ThickTiles)) + Exec(N(EVS_DropDebris_StoneBlocks)) + Wait(10 * DT) + Exec(N(EVS_DropDebris_Flag)) + Exec(N(EVS_DropDebris_Leaves)) + Exec(N(EVS_DropDebris_TreeTrunk)) + Wait(150 * DT) + Return + End }; EvtScript N(EVS_RaiseSmokeClouds) = { - EVT_SET(MV_SmokeVelY, 0) - EVT_THREAD - EVT_CALL(PlaySound, SOUND_OSR_SMOKE_RISING_1) - EVT_CALL(MakeLerp, 0, 650, 40 * DT, EASING_CUBIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_ADD(LVar0, MV_SmokeVelY) - EVT_CALL(TranslateGroup, MODEL_kem1, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LOOP(0) - EVT_CALL(MakeLerp, 600, 650, 25 * DT, EASING_CUBIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_ADD(LVar0, MV_SmokeVelY) - EVT_CALL(TranslateGroup, MODEL_kem1, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 650, 600, 35 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_ADD(LVar0, MV_SmokeVelY) - EVT_CALL(TranslateGroup, MODEL_kem1, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(PlaySound, SOUND_OSR_SMOKE_RISING_2) - EVT_CALL(MakeLerp, 0, 400, 30 * DT, EASING_CUBIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_kem2, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LOOP(0) - EVT_CALL(MakeLerp, 350, 400, 12 * DT, EASING_CUBIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_ADD(LVar0, MV_SmokeVelY) - EVT_CALL(TranslateGroup, MODEL_kem2, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 400, 350, 17 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_ADD(LVar0, MV_SmokeVelY) - EVT_CALL(TranslateGroup, MODEL_kem2, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(40) - EVT_CALL(PlaySound, SOUND_OSR_SMOKE_RISING_3) - EVT_CALL(MakeLerp, 0, 200, 20 * DT, EASING_CUBIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_kem3, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LOOP(0) - EVT_CALL(MakeLerp, 150, 200, 25 * DT, EASING_CUBIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_ADD(LVar0, MV_SmokeVelY) - EVT_CALL(TranslateGroup, MODEL_kem3, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 200, 150, 35 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_ADD(LVar0, MV_SmokeVelY) - EVT_CALL(TranslateGroup, MODEL_kem3, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_END_THREAD - EVT_RETURN - EVT_END + Set(MV_SmokeVelY, 0) + Thread + Call(PlaySound, SOUND_OSR_SMOKE_RISING_1) + Call(MakeLerp, 0, 650, 40 * DT, EASING_CUBIC_OUT) + Loop(0) + Call(UpdateLerp) + Add(LVar0, MV_SmokeVelY) + Call(TranslateGroup, MODEL_kem1, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Loop(0) + Call(MakeLerp, 600, 650, 25 * DT, EASING_CUBIC_OUT) + Loop(0) + Call(UpdateLerp) + Add(LVar0, MV_SmokeVelY) + Call(TranslateGroup, MODEL_kem1, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 650, 600, 35 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Add(LVar0, MV_SmokeVelY) + Call(TranslateGroup, MODEL_kem1, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + EndThread + Thread + Wait(20 * DT) + Call(PlaySound, SOUND_OSR_SMOKE_RISING_2) + Call(MakeLerp, 0, 400, 30 * DT, EASING_CUBIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_kem2, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Loop(0) + Call(MakeLerp, 350, 400, 12 * DT, EASING_CUBIC_OUT) + Loop(0) + Call(UpdateLerp) + Add(LVar0, MV_SmokeVelY) + Call(TranslateGroup, MODEL_kem2, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 400, 350, 17 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Add(LVar0, MV_SmokeVelY) + Call(TranslateGroup, MODEL_kem2, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + EndThread + Thread + Wait(40) + Call(PlaySound, SOUND_OSR_SMOKE_RISING_3) + Call(MakeLerp, 0, 200, 20 * DT, EASING_CUBIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_kem3, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Loop(0) + Call(MakeLerp, 150, 200, 25 * DT, EASING_CUBIC_OUT) + Loop(0) + Call(UpdateLerp) + Add(LVar0, MV_SmokeVelY) + Call(TranslateGroup, MODEL_kem3, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 200, 150, 35 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Add(LVar0, MV_SmokeVelY) + Call(TranslateGroup, MODEL_kem3, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + EndThread + Return + End }; EvtScript N(EVS_Scene_BowsersAssault) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(EnableGroup, MODEL_yoru, FALSE) - EVT_CALL(SetPlayerPos, 0, 0, 2000) - EVT_THREAD - EVT_CALL(PlaySound, SOUND_LOOP_OSR_RUMBLING) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 450 * DT, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 100 * DT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_WAIT(50 * DT) - EVT_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(MakeLerp, 0, 45, 30 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_ki1, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 0, 100, 30 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_ki1, 45, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_ki1, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(EnableGroup, MODEL_ki1, FALSE) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(45 * DT) - EVT_CALL(MakeLerp, 0, 30, 30 * DT, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_ki2, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 0, 100, 100 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_ki2, 30, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_ki2, LVar0, -1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(EnableGroup, MODEL_ki2, FALSE) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(75 * DT) - EVT_CALL(MakeLerp, 0, 100, 100 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_jime, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(PlaySound, SOUND_OSR_GROUND_CRACKING) - EVT_CALL(MakeLerp, 0, 30, 50 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_1, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(MakeLerp, 0, 40, 40 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_2, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 0, 20, 50 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_3, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(15 * DT) - EVT_CALL(MakeLerp, 0, 10, 35 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_4, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 0, -20, 50 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_5, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, -10, 50 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_6, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_RaiseSmokeClouds)) - EVT_EXEC_WAIT(N(EVS_LiftCastleUp)) - EVT_CALL(GotoMap, EVT_PTR("kkj_03"), kkj_03_ENTRY_1) - EVT_WAIT(100 * DT) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(EnableGroup, MODEL_yoru, FALSE) + Call(SetPlayerPos, 0, 0, 2000) + Thread + Call(PlaySound, SOUND_LOOP_OSR_RUMBLING) + Call(ShakeCam, CAM_DEFAULT, 0, 450 * DT, Float(2.0)) + Call(ShakeCam, CAM_DEFAULT, 0, 100 * DT, Float(1.0)) + EndThread + Wait(50 * DT) + Thread + Wait(30 * DT) + Call(MakeLerp, 0, 45, 30 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_ki1, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 0, 100, 30 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_ki1, 45, 0, 0, 1) + Call(RotateGroup, MODEL_ki1, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(EnableGroup, MODEL_ki1, FALSE) + EndThread + Thread + Wait(45 * DT) + Call(MakeLerp, 0, 30, 30 * DT, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_ki2, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 0, 100, 100 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_ki2, 30, 0, 0, 1) + Call(RotateGroup, MODEL_ki2, LVar0, -1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(EnableGroup, MODEL_ki2, FALSE) + EndThread + Thread + Wait(75 * DT) + Call(MakeLerp, 0, 100, 100 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_jime, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(PlaySound, SOUND_OSR_GROUND_CRACKING) + Call(MakeLerp, 0, 30, 50 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_1, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Wait(10 * DT) + Call(MakeLerp, 0, 40, 40 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_2, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(MakeLerp, 0, 20, 50 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_3, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Wait(15 * DT) + Call(MakeLerp, 0, 10, 35 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_4, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(MakeLerp, 0, -20, 50 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_5, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(MakeLerp, 0, -10, 50 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_6, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_RaiseSmokeClouds)) + ExecWait(N(EVS_LiftCastleUp)) + Call(GotoMap, Ref("kkj_03"), kkj_03_ENTRY_1) + Wait(100 * DT) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_pra/common/GlassShimmer.inc.c b/src/world/area_pra/common/GlassShimmer.inc.c index bbed7abd05c..e2a893317a6 100644 --- a/src/world/area_pra/common/GlassShimmer.inc.c +++ b/src/world/area_pra/common/GlassShimmer.inc.c @@ -4,21 +4,21 @@ // LVar1 wall 2 model ID // LVar2 tex panner ID EvtScript N(EVS_GlassShimmer) = { - EVT_CALL(SetTexPanner, LVar0, LVar2) - EVT_CALL(SetTexPanner, LVar1, LVar2) - EVT_LOOP(0) - EVT_CALL(EnableModel, LVar0, TRUE) - EVT_CALL(EnableModel, LVar1, TRUE) - EVT_SET(LVarA, 0) - EVT_LOOP(20) - EVT_CALL(SetTexPanOffset, LVar2, 0, LVarA, 0) - EVT_ADD(LVarA, 3000) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EnableModel, LVar0, FALSE) - EVT_CALL(EnableModel, LVar1, FALSE) - EVT_WAIT(160) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetTexPanner, LVar0, LVar2) + Call(SetTexPanner, LVar1, LVar2) + Loop(0) + Call(EnableModel, LVar0, TRUE) + Call(EnableModel, LVar1, TRUE) + Set(LVarA, 0) + Loop(20) + Call(SetTexPanOffset, LVar2, 0, LVarA, 0) + Add(LVarA, 3000) + Wait(1) + EndLoop + Call(EnableModel, LVar0, FALSE) + Call(EnableModel, LVar1, FALSE) + Wait(160) + EndLoop + Return + End }; diff --git a/src/world/area_pra/common/Reflection.data.inc.c b/src/world/area_pra/common/Reflection.data.inc.c index a017861e2a8..f8c3a05f827 100644 --- a/src/world/area_pra/common/Reflection.data.inc.c +++ b/src/world/area_pra/common/Reflection.data.inc.c @@ -1,45 +1,45 @@ #include "common.h" EvtScript N(EVS_Reflection_Unk) = { - EVT_CALL(GetEntryID, LVarA) - EVT_IF_EQ(LVarA, LVar1) - EVT_SET(LVar0, REFLECTION_WALL_ONLY) - EVT_END_IF - EVT_IF_EQ(LVarA, LVar2) - EVT_SET(LVar0, REFLECTION_WALL_ONLY) - EVT_END_IF - EVT_IF_EQ(LVarA, LVar3) - EVT_SET(LVar0, REFLECTION_WALL_ONLY) - EVT_END_IF - EVT_IF_EQ(LVarA, LVar4) - EVT_SET(LVar0, REFLECTION_WALL_ONLY) - EVT_END_IF - EVT_IF_EQ(LVarA, LVar5) - EVT_SET(LVar0, REFLECTION_WALL_ONLY) - EVT_END_IF - EVT_IF_EQ(LVarA, LVar6) - EVT_SET(LVar0, REFLECTION_WALL_ONLY) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVarA) + IfEq(LVarA, LVar1) + Set(LVar0, REFLECTION_WALL_ONLY) + EndIf + IfEq(LVarA, LVar2) + Set(LVar0, REFLECTION_WALL_ONLY) + EndIf + IfEq(LVarA, LVar3) + Set(LVar0, REFLECTION_WALL_ONLY) + EndIf + IfEq(LVarA, LVar4) + Set(LVar0, REFLECTION_WALL_ONLY) + EndIf + IfEq(LVarA, LVar5) + Set(LVar0, REFLECTION_WALL_ONLY) + EndIf + IfEq(LVarA, LVar6) + Set(LVar0, REFLECTION_WALL_ONLY) + EndIf + Return + End }; // LVar0 mode // LVar1 disable wall flag (reflections wont show if false) EvtScript N(EVS_SetupReflections) = { - EVT_MALLOC_ARRAY(16, LVarA) - EVT_IF_EQ(LVar1, FALSE) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(REFLECTION_FLOOR_WALL) - EVT_CALL(N(EnableWallReflection)) - EVT_CASE_EQ(REFLECTION_FLOOR_ONLY) + MallocArray(16, LVarA) + IfEq(LVar1, FALSE) + Switch(LVar0) + CaseEq(REFLECTION_FLOOR_WALL) + Call(N(EnableWallReflection)) + CaseEq(REFLECTION_FLOOR_ONLY) // do nothing - EVT_CASE_EQ(REFLECTION_WALL_ONLY) - EVT_CALL(N(EnableWallReflection)) - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(N(EnableFloorReflection), LVar0) - EVT_CALL(N(EnablePartnerReflection), LVar0) - EVT_RETURN - EVT_END + CaseEq(REFLECTION_WALL_ONLY) + Call(N(EnableWallReflection)) + EndSwitch + EndIf + Call(N(EnableFloorReflection), LVar0) + Call(N(EnablePartnerReflection), LVar0) + Return + End }; diff --git a/src/world/area_pra/pra_01/pra_01_1_music.c b/src/world/area_pra/pra_01/pra_01_1_music.c index a228e19d8d9..0a8b9caa73a 100644 --- a/src/world/area_pra/pra_01/pra_01_1_music.c +++ b/src/world/area_pra/pra_01/pra_01_1_music.c @@ -1,12 +1,12 @@ #include "pra_01.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH7_BEGAN_PEACH_MISSION) - EVT_CALL(SetMusicTrack, 0, SONG_STAR_SPIRIT_THEME, 1, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_SHIVER_MOUNTAIN, 0, 8) - EVT_END_IF - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH7_BEGAN_PEACH_MISSION) + Call(SetMusicTrack, 0, SONG_STAR_SPIRIT_THEME, 1, 8) + Else + Call(SetMusicTrack, 0, SONG_SHIVER_MOUNTAIN, 0, 8) + EndIf + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Return + End }; diff --git a/src/world/area_pra/pra_01/pra_01_2_main.c b/src/world/area_pra/pra_01/pra_01_2_main.c index 3db8dc01e63..0ffbd68ff8e 100644 --- a/src/world/area_pra/pra_01/pra_01_2_main.c +++ b/src/world/area_pra/pra_01/pra_01_2_main.c @@ -15,88 +15,88 @@ EvtScript N(EVS_ExitWalk_sam_10_1) = EVT_EXIT_WALK(60, pra_01_ENTRY_0, "sam_10", EvtScript N(EVS_ExitWalk_pra_15_0) = EVT_EXIT_WALK(60, pra_01_ENTRY_3, "pra_15", pra_15_ENTRY_0); EvtScript N(EVS_ExitDoor_pra_02_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_01_ENTRY_1) - EVT_SET(LVar1, COLLIDER_deilittse) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(NearDoorModelsR))) - EVT_END_IF - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_02"), pra_02_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_01_ENTRY_1) + Set(LVar1, COLLIDER_deilittse) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothDoorModelsL))) + Set(LVar3, Ref(N(BothDoorModelsR))) + Else + Set(LVar2, Ref(N(NearDoorModelsL))) + Set(LVar3, Ref(N(NearDoorModelsR))) + EndIf + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_02"), pra_02_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoor_pra_02_5) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_01_ENTRY_2) - EVT_SET(LVar1, COLLIDER_deilittse) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(FarDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(FarDoorModelsR))) - EVT_END_IF - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_02"), pra_02_ENTRY_5) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_01_ENTRY_2) + Set(LVar1, COLLIDER_deilittse) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothDoorModelsL))) + Set(LVar3, Ref(N(BothDoorModelsR))) + Else + Set(LVar2, Ref(N(FarDoorModelsL))) + Set(LVar3, Ref(N(FarDoorModelsR))) + EndIf + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_02"), pra_02_ENTRY_5) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sam_10_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_pra_15_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_pra_02_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_pra_02_5)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sam_10_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_pra_15_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoor_pra_02_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoor_pra_02_5)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(pra_01_ENTRY_0) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(pra_01_ENTRY_1) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(NearDoorModelsR))) - EVT_END_IF - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(pra_01_ENTRY_2) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(FarDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(FarDoorModelsR))) - EVT_END_IF - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(pra_01_ENTRY_3) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(pra_01_ENTRY_4) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(pra_01_ENTRY_0) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseEq(pra_01_ENTRY_1) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothDoorModelsL))) + Set(LVar3, Ref(N(BothDoorModelsR))) + Else + Set(LVar2, Ref(N(NearDoorModelsL))) + Set(LVar3, Ref(N(NearDoorModelsR))) + EndIf + ExecWait(BaseEnterDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(pra_01_ENTRY_2) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothDoorModelsL))) + Set(LVar3, Ref(N(BothDoorModelsR))) + Else + Set(LVar2, Ref(N(FarDoorModelsL))) + Set(LVar3, Ref(N(FarDoorModelsR))) + EndIf + ExecWait(BaseEnterDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(pra_01_ENTRY_3) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseEq(pra_01_ENTRY_4) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + Return + End }; API_CALLABLE(N(SetupFog)) { @@ -112,41 +112,41 @@ API_CALLABLE(N(DisableFloorReflection)) { } EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHIVER_MOUNTAIN) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_SET(GF_MAP_CrystalPalace, TRUE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH7_BEGAN_PEACH_MISSION) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_CALL(N(SetupFog)) - EVT_CALL(N(DisableFloorReflection)) - EVT_SET(LVar0, MODEL_o549) - EVT_SET(LVar1, MODEL_o549) - EVT_SET(LVar2, TEX_PANNER_0) - EVT_EXEC(N(EVS_GlassShimmer)) - EVT_SET(LVar0, REFLECTION_WALL_ONLY) - EVT_SET(LVar1, GF_PRA_BrokeIllusion) - EVT_EXEC(N(EVS_SetupReflections)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilisw, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1328, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1368, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1338, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1389, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilinw, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1327, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1373, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1337, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1386, SURFACE_TYPE_SNOW) - EVT_EXEC(N(EVS_EnterMap)) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, pra_01_ENTRY_4) - EVT_WAIT(65) - EVT_ELSE - EVT_WAIT(1) - EVT_END_IF - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_SHIVER_MOUNTAIN) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Set(GF_MAP_CrystalPalace, TRUE) + IfEq(GB_StoryProgress, STORY_CH7_BEGAN_PEACH_MISSION) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + EndIf + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupMusic)) + Call(N(SetupFog)) + Call(N(DisableFloorReflection)) + Set(LVar0, MODEL_o549) + Set(LVar1, MODEL_o549) + Set(LVar2, TEX_PANNER_0) + Exec(N(EVS_GlassShimmer)) + Set(LVar0, REFLECTION_WALL_ONLY) + Set(LVar1, GF_PRA_BrokeIllusion) + Exec(N(EVS_SetupReflections)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilisw, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1328, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1368, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1338, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1389, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilinw, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1327, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1373, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1337, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1386, SURFACE_TYPE_SNOW) + Exec(N(EVS_EnterMap)) + Call(GetEntryID, LVar0) + IfEq(LVar0, pra_01_ENTRY_4) + Wait(65) + Else + Wait(1) + EndIf + Return + End }; diff --git a/src/world/area_pra/pra_01/pra_01_3_npc.c b/src/world/area_pra/pra_01/pra_01_3_npc.c index bb91749607f..6c58a419123 100644 --- a/src/world/area_pra/pra_01/pra_01_3_npc.c +++ b/src/world/area_pra/pra_01/pra_01_3_npc.c @@ -17,169 +17,169 @@ API_CALLABLE(N(UpgradeStarPowerCh7)) { } EvtScript N(EVS_NpcIdle_Kalmar) = { - EVT_LOOP(0) - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Loop(10) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 1) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Loop(10) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 1) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_Scene_RescuedKalmar) = { - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(func_802CF56C, 2) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar0) - EVT_ADD(LVar3, -50) - EVT_SET(LVar4, LVar1) - EVT_ADD(LVar4, 26) - EVT_CALL(SetNpcPos, NPC_Kalmar, LVar3, LVar4, LVar2) - EVT_CALL(PlayerFaceNpc, NPC_Kalmar, FALSE) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Kalmar, 0) - EVT_ADD(LVar0, -25) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(575.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 18, -5) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(WaitForPlayerInputEnabled) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(40 * DT) - EVT_CALL(SpeakToPlayer, NPC_Kalmar, ANIM_WorldKalmar_Talk, ANIM_WorldKalmar_Idle, 512, MSG_CH7_016D) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 18, -6) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(MakeLerp, 0, 360, 10 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Kalmar, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(EnableNpcAI, NPC_Kalmar, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_Leap) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_UsePower) - EVT_CALL(PlaySoundAtPlayer, SOUND_RECEIVE_STAR_POWER, SOUND_SPACE_DEFAULT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar1) - EVT_ADD(LVar1, 50) - EVT_ADD(LVar2, 10) - EVT_ADD(LVar3, 30) - EVT_LOOP(5) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 20) - EVT_WAIT(6 * DT) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 1, LVar0, LVar3, LVar2, 20) - EVT_WAIT(6 * DT) - EVT_END_LOOP - EVT_WAIT(20 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_GET_STAR_POWER_WAVE, SOUND_SPACE_DEFAULT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 30) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_Idle) - EVT_CALL(EnableNpcAI, NPC_Kalmar, TRUE) - EVT_CALL(N(UpgradeStarPowerCh7)) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0197, 160, 40) - EVT_WAIT(10 * DT) - EVT_CALL(GetNpcPos, NPC_Kalmar, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Kalmar, ANIM_WorldKalmar_Talk, ANIM_WorldKalmar_Idle, 512, MSG_CH7_016E) - EVT_WAIT(10 * DT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -25) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Kalmar, ANIM_WorldKalmar_Talk, ANIM_WorldKalmar_Idle, 512, MSG_CH7_016F) - EVT_CALL(SetNpcFlagBits, NPC_Kalmar, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) - EVT_THREAD - EVT_LOOP(25) - EVT_CALL(GetNpcPos, NPC_Kalmar, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 20) - EVT_WAIT(4 * DT) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 1800) - EVT_CALL(MakeLerp, LVar2, LVar3, 100 * DT, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Kalmar, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Kalmar, LVar2, LVar3, LVar4) - EVT_SET(LVar5, LVar3) - EVT_ADD(LVar5, 180) - EVT_CALL(MakeLerp, LVar3, LVar5, 100 * DT, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, NPC_Kalmar, LVar2, LVar0, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_Kalmar, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(15 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Kalmar, SOUND_STAR_SPIRIT_DEPART_1, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_WAIT(90 * DT) + Call(DisablePartnerAI, 0) + Call(func_802CF56C, 2) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar3, LVar0) + Add(LVar3, -50) + Set(LVar4, LVar1) + Add(LVar4, 26) + Call(SetNpcPos, NPC_Kalmar, LVar3, LVar4, LVar2) + Call(PlayerFaceNpc, NPC_Kalmar, FALSE) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Kalmar, 0) + Add(LVar0, -25) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(575.0)) + Call(SetCamPitch, CAM_DEFAULT, 18, -5) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(WaitForPlayerInputEnabled) + Call(DisablePlayerInput, TRUE) + Wait(40 * DT) + Call(SpeakToPlayer, NPC_Kalmar, ANIM_WorldKalmar_Talk, ANIM_WorldKalmar_Idle, 512, MSG_CH7_016D) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(SetCamPitch, CAM_DEFAULT, 18, -6) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(MakeLerp, 0, 360, 10 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Kalmar, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(EnableNpcAI, NPC_Kalmar, FALSE) + Call(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_Leap) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_UsePower) + Call(PlaySoundAtPlayer, SOUND_RECEIVE_STAR_POWER, SOUND_SPACE_DEFAULT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar3, LVar1) + Add(LVar1, 50) + Add(LVar2, 10) + Add(LVar3, 30) + Loop(5) + PlayEffect(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 20) + Wait(6 * DT) + PlayEffect(EFFECT_SPARKLES, 1, LVar0, LVar3, LVar2, 20) + Wait(6 * DT) + EndLoop + Wait(20 * DT) + Call(PlaySoundAtPlayer, SOUND_GET_STAR_POWER_WAVE, SOUND_SPACE_DEFAULT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 20) + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 30) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetNpcAnimation, NPC_Kalmar, ANIM_WorldKalmar_Idle) + Call(EnableNpcAI, NPC_Kalmar, TRUE) + Call(N(UpgradeStarPowerCh7)) + Call(ShowMessageAtScreenPos, MSG_Menus_0197, 160, 40) + Wait(10 * DT) + Call(GetNpcPos, NPC_Kalmar, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(350.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Kalmar, ANIM_WorldKalmar_Talk, ANIM_WorldKalmar_Idle, 512, MSG_CH7_016E) + Wait(10 * DT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, -25) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Kalmar, ANIM_WorldKalmar_Talk, ANIM_WorldKalmar_Idle, 512, MSG_CH7_016F) + Call(SetNpcFlagBits, NPC_Kalmar, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) + Thread + Loop(25) + Call(GetNpcPos, NPC_Kalmar, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 20) + Wait(4 * DT) + EndLoop + EndThread + Thread + Set(LVar2, 0) + Set(LVar3, 1800) + Call(MakeLerp, LVar2, LVar3, 100 * DT, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Kalmar, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(GetNpcPos, NPC_Kalmar, LVar2, LVar3, LVar4) + Set(LVar5, LVar3) + Add(LVar5, 180) + Call(MakeLerp, LVar3, LVar5, 100 * DT, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetNpcPos, NPC_Kalmar, LVar2, LVar0, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcPos, NPC_Kalmar, NPC_DISPOSE_LOCATION) + EndThread + Thread + Wait(15 * DT) + Call(PlaySoundAtNpc, NPC_Kalmar, SOUND_STAR_SPIRIT_DEPART_1, SOUND_SPACE_DEFAULT) + EndThread + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Wait(90 * DT) #if VERSION_PAL - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(3 / DT)) + Call(ResetCam, CAM_DEFAULT, Float(3 / DT)) #else - EVT_CALL(ResetCam, CAM_DEFAULT, 3) + Call(ResetCam, CAM_DEFAULT, 3) #endif - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_SET(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Set(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) + Exec(N(EVS_SetupMusic)) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Kalmar) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Kalmar))) - EVT_EXEC(N(EVS_Scene_RescuedKalmar)) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Kalmar))) + Exec(N(EVS_Scene_RescuedKalmar)) + Return + End }; NpcData N(NpcData_Kalmar) = { diff --git a/src/world/area_pra/pra_01/pra_01_4_entity.c b/src/world/area_pra/pra_01/pra_01_4_entity.c index 664597407cf..2c54b2e4d3a 100644 --- a/src/world/area_pra/pra_01/pra_01_4_entity.c +++ b/src/world/area_pra/pra_01/pra_01_4_entity.c @@ -2,6 +2,6 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/area_pra/pra_02/pra_02_1_music.c b/src/world/area_pra/pra_02/pra_02_1_music.c index 49b8cd19f67..87804ff20df 100644 --- a/src/world/area_pra/pra_02/pra_02_1_music.c +++ b/src/world/area_pra/pra_02/pra_02_1_music.c @@ -1,7 +1,7 @@ #include "pra_02.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + Return + End }; diff --git a/src/world/area_pra/pra_02/pra_02_2_main.c b/src/world/area_pra/pra_02/pra_02_2_main.c index b57c7edc52d..e231a60d45d 100644 --- a/src/world/area_pra/pra_02/pra_02_2_main.c +++ b/src/world/area_pra/pra_02/pra_02_2_main.c @@ -5,10 +5,10 @@ #include "../common/GlassShimmer.inc.c" EvtScript N(EVS_UpdateShiftingWallPos) = { - EVT_CALL(TranslateGroup, MODEL_g293, 0, 250, 0) - EVT_CALL(TranslateGroup, MODEL_g291, 0, MV_WallPosOffset, 0) - EVT_RETURN - EVT_END + Call(TranslateGroup, MODEL_g293, 0, 250, 0) + Call(TranslateGroup, MODEL_g291, 0, MV_WallPosOffset, 0) + Return + End }; s32 N(NearLeftDoorModelsL)[] = { MODEL_o772, MODEL_o844, -1 }; @@ -38,314 +38,314 @@ s32 N(FarCenterDoorModels)[] = { MODEL_o774, -1 }; s32 N(EmptyModelList)[] = { -1 }; EvtScript N(EVS_ExitDoors_pra_01_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, pra_02_ENTRY_0) - EVT_SET(LVar1, 24) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothLeftDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(NearLeftDoorModelsR))) - EVT_END_IF - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_01"), pra_01_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, pra_02_ENTRY_0) + Set(LVar1, 24) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothLeftDoorModelsL))) + Set(LVar3, Ref(N(BothLeftDoorModelsR))) + Else + Set(LVar2, Ref(N(NearLeftDoorModelsL))) + Set(LVar3, Ref(N(NearLeftDoorModelsR))) + EndIf + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_01"), pra_01_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_03_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, pra_02_ENTRY_1) - EVT_SET(LVar1, 56) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(NearCenterDoorModels))) - EVT_SET(LVar3, EVT_PTR(N(FarCenterDoorModels))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearCenterDoorModels))) - EVT_SET(LVar3, EVT_PTR(N(EmptyModelList))) - EVT_END_IF - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_03"), pra_03_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, pra_02_ENTRY_1) + Set(LVar1, 56) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(NearCenterDoorModels))) + Set(LVar3, Ref(N(FarCenterDoorModels))) + Else + Set(LVar2, Ref(N(NearCenterDoorModels))) + Set(LVar3, Ref(N(EmptyModelList))) + EndIf + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_03"), pra_03_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_16_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, pra_02_ENTRY_2) - EVT_SET(LVar1, 36) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothRedDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothRedDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearRedDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(NearRedDoorModelsR))) - EVT_END_IF - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_16"), pra_16_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, pra_02_ENTRY_2) + Set(LVar1, 36) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothRedDoorModelsL))) + Set(LVar3, Ref(N(BothRedDoorModelsR))) + Else + Set(LVar2, Ref(N(NearRedDoorModelsL))) + Set(LVar3, Ref(N(NearRedDoorModelsR))) + EndIf + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_16"), pra_16_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_13_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, pra_02_ENTRY_2) - EVT_SET(LVar1, 36) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothBlueDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothBlueDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearBlueDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(NearBlueDoorModelsR))) - EVT_END_IF - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_13"), pra_13_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, pra_02_ENTRY_2) + Set(LVar1, 36) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothBlueDoorModelsL))) + Set(LVar3, Ref(N(BothBlueDoorModelsR))) + Else + Set(LVar2, Ref(N(NearBlueDoorModelsL))) + Set(LVar3, Ref(N(NearBlueDoorModelsR))) + EndIf + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_13"), pra_13_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_16_3) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, pra_02_ENTRY_3) - EVT_SET(LVar1, 32) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothRedDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothRedDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(FarRedDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(FarRedDoorModelsR))) - EVT_END_IF - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_16"), pra_16_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, pra_02_ENTRY_3) + Set(LVar1, 32) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothRedDoorModelsL))) + Set(LVar3, Ref(N(BothRedDoorModelsR))) + Else + Set(LVar2, Ref(N(FarRedDoorModelsL))) + Set(LVar3, Ref(N(FarRedDoorModelsR))) + EndIf + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_16"), pra_16_ENTRY_3) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_13_3) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, pra_02_ENTRY_3) - EVT_SET(LVar1, 32) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothBlueDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothBlueDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(FarBlueDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(FarBlueDoorModelsR))) - EVT_END_IF -EVT_END_IF -EVT_EXEC(BaseExitDoor) -EVT_WAIT(17) -EVT_CALL(GotoMap, EVT_PTR("pra_13"), pra_13_ENTRY_3) -EVT_WAIT(100) -EVT_RETURN -EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, pra_02_ENTRY_3) + Set(LVar1, 32) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothBlueDoorModelsL))) + Set(LVar3, Ref(N(BothBlueDoorModelsR))) + Else + Set(LVar2, Ref(N(FarBlueDoorModelsL))) + Set(LVar3, Ref(N(FarBlueDoorModelsR))) + EndIf +EndIf +Exec(BaseExitDoor) +Wait(17) +Call(GotoMap, Ref("pra_13"), pra_13_ENTRY_3) +Wait(100) +Return +End }; EvtScript N(EVS_ExitDoors_pra_04_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, pra_02_ENTRY_4) - EVT_SET(LVar1, 51) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(NearCenterDoorModels))) - EVT_SET(LVar3, EVT_PTR(N(FarCenterDoorModels))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(EmptyModelList))) - EVT_SET(LVar3, EVT_PTR(N(FarCenterDoorModels))) - EVT_END_IF - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_04"), pra_04_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, pra_02_ENTRY_4) + Set(LVar1, 51) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(NearCenterDoorModels))) + Set(LVar3, Ref(N(FarCenterDoorModels))) + Else + Set(LVar2, Ref(N(EmptyModelList))) + Set(LVar3, Ref(N(FarCenterDoorModels))) + EndIf + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_04"), pra_04_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_01_2) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, pra_02_ENTRY_5) - EVT_SET(LVar1, COLLIDER_deilittnw) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothLeftDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(FarLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(FarLeftDoorModelsR))) - EVT_END_IF - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_01"), pra_01_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, pra_02_ENTRY_5) + Set(LVar1, COLLIDER_deilittnw) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothLeftDoorModelsL))) + Set(LVar3, Ref(N(BothLeftDoorModelsR))) + Else + Set(LVar2, Ref(N(FarLeftDoorModelsL))) + Set(LVar3, Ref(N(FarLeftDoorModelsR))) + EndIf + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_01"), pra_01_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_01_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_03_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittssw, 1, 0) - EVT_IF_EQ(GF_PRA02_DoorColorToggle, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittse2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne2, COLLIDER_FLAGS_UPPER_MASK) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittse, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_IF_EQ(GF_PRA02_UnlockedRedDoor, TRUE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_16_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_16_3)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) - EVT_END_IF - EVT_IF_EQ(GF_PRA02_UnlockedBlueDoor, TRUE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_13_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse2, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_13_3)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne2, 1, 0) - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_04_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnnw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_01_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_pra_01_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_03_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittssw, 1, 0) + IfEq(GF_PRA02_DoorColorToggle, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittse2, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne2, COLLIDER_FLAGS_UPPER_MASK) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittse, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) + EndIf + IfEq(GF_PRA02_UnlockedRedDoor, TRUE) + BindTrigger(Ref(N(EVS_ExitDoors_pra_16_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_16_3)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) + EndIf + IfEq(GF_PRA02_UnlockedBlueDoor, TRUE) + BindTrigger(Ref(N(EVS_ExitDoors_pra_13_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse2, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_13_3)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne2, 1, 0) + EndIf + BindTrigger(Ref(N(EVS_ExitDoors_pra_04_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnnw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_01_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(pra_02_ENTRY_0) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_IF_EQ(GF_PRA02_Visited, FALSE) - EVT_SET(GF_PRA02_Visited, TRUE) - EVT_SET(GB_StoryProgress, STORY_CH7_ARRIVED_AT_CRYSTAL_PALACE) - EVT_END_IF - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothLeftDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(NearLeftDoorModelsR))) - EVT_END_IF - EVT_CASE_EQ(pra_02_ENTRY_1) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(NearCenterDoorModels))) - EVT_SET(LVar3, EVT_PTR(N(FarCenterDoorModels))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearCenterDoorModels))) - EVT_SET(LVar3, EVT_PTR(N(EmptyModelList))) - EVT_END_IF - EVT_CASE_EQ(pra_02_ENTRY_2) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_IF_EQ(GF_PRA02_DoorColorToggle, FALSE) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothRedDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothRedDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearRedDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(NearRedDoorModelsR))) - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothBlueDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothBlueDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearBlueDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(NearBlueDoorModelsR))) - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(pra_02_ENTRY_3) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_IF_EQ(GF_PRA02_DoorColorToggle, FALSE) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothRedDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothRedDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(FarRedDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(FarRedDoorModelsR))) - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothBlueDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothBlueDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(FarBlueDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(FarBlueDoorModelsR))) - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(pra_02_ENTRY_4) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(NearCenterDoorModels))) - EVT_SET(LVar3, EVT_PTR(N(FarCenterDoorModels))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(EmptyModelList))) - EVT_SET(LVar3, EVT_PTR(N(FarCenterDoorModels))) - EVT_END_IF - EVT_CASE_EQ(pra_02_ENTRY_5) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothLeftDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(FarLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(FarLeftDoorModelsR))) - EVT_END_IF - EVT_END_SWITCH - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(pra_02_ENTRY_0) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + IfEq(GF_PRA02_Visited, FALSE) + Set(GF_PRA02_Visited, TRUE) + Set(GB_StoryProgress, STORY_CH7_ARRIVED_AT_CRYSTAL_PALACE) + EndIf + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothLeftDoorModelsL))) + Set(LVar3, Ref(N(BothLeftDoorModelsR))) + Else + Set(LVar2, Ref(N(NearLeftDoorModelsL))) + Set(LVar3, Ref(N(NearLeftDoorModelsR))) + EndIf + CaseEq(pra_02_ENTRY_1) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(NearCenterDoorModels))) + Set(LVar3, Ref(N(FarCenterDoorModels))) + Else + Set(LVar2, Ref(N(NearCenterDoorModels))) + Set(LVar3, Ref(N(EmptyModelList))) + EndIf + CaseEq(pra_02_ENTRY_2) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + IfEq(GF_PRA02_DoorColorToggle, FALSE) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothRedDoorModelsL))) + Set(LVar3, Ref(N(BothRedDoorModelsR))) + Else + Set(LVar2, Ref(N(NearRedDoorModelsL))) + Set(LVar3, Ref(N(NearRedDoorModelsR))) + EndIf + Else + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothBlueDoorModelsL))) + Set(LVar3, Ref(N(BothBlueDoorModelsR))) + Else + Set(LVar2, Ref(N(NearBlueDoorModelsL))) + Set(LVar3, Ref(N(NearBlueDoorModelsR))) + EndIf + EndIf + CaseEq(pra_02_ENTRY_3) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + IfEq(GF_PRA02_DoorColorToggle, FALSE) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothRedDoorModelsL))) + Set(LVar3, Ref(N(BothRedDoorModelsR))) + Else + Set(LVar2, Ref(N(FarRedDoorModelsL))) + Set(LVar3, Ref(N(FarRedDoorModelsR))) + EndIf + Else + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothBlueDoorModelsL))) + Set(LVar3, Ref(N(BothBlueDoorModelsR))) + Else + Set(LVar2, Ref(N(FarBlueDoorModelsL))) + Set(LVar3, Ref(N(FarBlueDoorModelsR))) + EndIf + EndIf + CaseEq(pra_02_ENTRY_4) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(NearCenterDoorModels))) + Set(LVar3, Ref(N(FarCenterDoorModels))) + Else + Set(LVar2, Ref(N(EmptyModelList))) + Set(LVar3, Ref(N(FarCenterDoorModels))) + EndIf + CaseEq(pra_02_ENTRY_5) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothLeftDoorModelsL))) + Set(LVar3, Ref(N(BothLeftDoorModelsR))) + Else + Set(LVar2, Ref(N(FarLeftDoorModelsL))) + Set(LVar3, Ref(N(FarLeftDoorModelsR))) + EndIf + EndSwitch + ExecWait(BaseEnterDoor) + Exec(N(EVS_BindExitTriggers)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_IF_EQ(GF_PRA02_DoorColorToggle, FALSE) - EVT_SET(MV_WallPosOffset, 0) - EVT_CALL(SetGroupVisibility, MODEL_g308, MODEL_GROUP_HIDDEN) - EVT_ELSE - EVT_SET(MV_WallPosOffset, -250) - EVT_CALL(SetGroupVisibility, MODEL_g307, MODEL_GROUP_HIDDEN) - EVT_END_IF - EVT_EXEC(N(EVS_UpdateShiftingWallPos)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ManagePoundableSwitch)), TRIGGER_FLOOR_TOUCH, COLLIDER_o1342, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ManagePoundableSwitch)), TRIGGER_FLOOR_TOUCH, COLLIDER_o1344, 1, 0) - EVT_SET(LVar0, MODEL_o549) - EVT_SET(LVar1, MODEL_o549) - EVT_SET(LVar2, TEX_PANNER_0) - EVT_EXEC(N(EVS_GlassShimmer)) - EVT_SET(LVar0, REFLECTION_WALL_ONLY) - EVT_SET(LVar1, GF_PRA_BrokeIllusion) - EVT_EXEC(N(EVS_SetupReflections)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + ExecWait(N(EVS_MakeEntities)) + IfEq(GF_PRA02_DoorColorToggle, FALSE) + Set(MV_WallPosOffset, 0) + Call(SetGroupVisibility, MODEL_g308, MODEL_GROUP_HIDDEN) + Else + Set(MV_WallPosOffset, -250) + Call(SetGroupVisibility, MODEL_g307, MODEL_GROUP_HIDDEN) + EndIf + Exec(N(EVS_UpdateShiftingWallPos)) + BindTrigger(Ref(N(EVS_ManagePoundableSwitch)), TRIGGER_FLOOR_TOUCH, COLLIDER_o1342, 1, 0) + BindTrigger(Ref(N(EVS_ManagePoundableSwitch)), TRIGGER_FLOOR_TOUCH, COLLIDER_o1344, 1, 0) + Set(LVar0, MODEL_o549) + Set(LVar1, MODEL_o549) + Set(LVar2, TEX_PANNER_0) + Exec(N(EVS_GlassShimmer)) + Set(LVar0, REFLECTION_WALL_ONLY) + Set(LVar1, GF_PRA_BrokeIllusion) + Exec(N(EVS_SetupReflections)) + Exec(N(EVS_EnterMap)) + Wait(1) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_pra/pra_02/pra_02_3_npc.c b/src/world/area_pra/pra_02/pra_02_3_npc.c index 1b69fec1148..73b53de465e 100644 --- a/src/world/area_pra/pra_02/pra_02_3_npc.c +++ b/src/world/area_pra/pra_02/pra_02_3_npc.c @@ -1,8 +1,8 @@ #include "pra_02.h" EvtScript N(EVS_NpcAuxAI_Unused) = { - EVT_RETURN - EVT_END + Return + End }; NpcSettings N(NpcSettings_Unused) = { diff --git a/src/world/area_pra/pra_02/pra_02_4_entity.c b/src/world/area_pra/pra_02/pra_02_4_entity.c index 0aa9cd6f810..19fd50818e0 100644 --- a/src/world/area_pra/pra_02/pra_02_4_entity.c +++ b/src/world/area_pra/pra_02/pra_02_4_entity.c @@ -18,38 +18,38 @@ s32 N(BlueKeyList)[] = { }; EvtScript N(EVS_RaisePoundableSwitch) = { - EVT_CALL(MakeLerp, -10, 0, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g307, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_g308, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o1342) - EVT_CALL(UpdateColliderTransform, COLLIDER_o1344) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(MakeLerp, -10, 0, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g307, 0, LVar0, 0) + Call(TranslateGroup, MODEL_g308, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o1342) + Call(UpdateColliderTransform, COLLIDER_o1344) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_LowerPoundableSwitch) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_o1344, SOUND_FLOOR_SWITCH_ACTIVATE, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, -10, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g307, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_g308, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o1342) - EVT_CALL(UpdateColliderTransform, COLLIDER_o1344) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_o1344, SOUND_FLOOR_SWITCH_ACTIVATE, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, -10, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g307, 0, LVar0, 0) + Call(TranslateGroup, MODEL_g308, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o1342) + Call(UpdateColliderTransform, COLLIDER_o1344) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; #include "world/common/todo/IsPlayerPounding.inc.c" @@ -75,203 +75,203 @@ API_CALLABLE(N(UpdatePadlockPosition)) { } EvtScript N(EVS_ManagePoundableSwitch) = { - EVT_CALL(N(IsPlayerPounding)) - EVT_IF_EQ(LVar0, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_EQ(GF_PRA02_DoorColorToggle, FALSE) - EVT_CALL(MakeLerp, 0, -250, 250 * DT, EASING_LINEAR) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittse, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilittse2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilittne2, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GF_PRA02_DoorColorToggle, TRUE) - EVT_EXEC(N(EVS_LowerPoundableSwitch)) - EVT_ELSE - EVT_CALL(MakeLerp, -250, 0, 250 * DT, EASING_LINEAR) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittse2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilittse, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GF_PRA02_DoorColorToggle, FALSE) - EVT_EXEC(N(EVS_LowerPoundableSwitch)) - EVT_END_IF - EVT_WAIT(30) - EVT_THREAD - EVT_PLAY_EFFECT(EFFECT_DUST, 0, 1000, 250, 60, 50) - EVT_PLAY_EFFECT(EFFECT_DUST, 0, 1000, 250, 120, 50) - EVT_PLAY_EFFECT(EFFECT_DUST, 0, 1000, 250, 180, 50) - EVT_PLAY_EFFECT(EFFECT_DUST, 0, 1000, 250, -60, 50) - EVT_PLAY_EFFECT(EFFECT_DUST, 0, 1000, 250, -120, 50) - EVT_PLAY_EFFECT(EFFECT_DUST, 0, 1000, 250, -180, 50) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(PlaySound, SOUND_PRA_SHIFT_FLOORS_RUMBLE) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 250 * DT, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10 * DT, EVT_FLOAT(1.5)) - EVT_CALL(PlaySound, SOUND_PRA_SHIFT_FLOORS_THUD) // ??? somehow this terminates the looping SOUND_PRA_SHIFT_FLOORS_RUMBLE - EVT_END_THREAD - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_SET(MV_WallPosOffset, LVar0) - EVT_EXEC_WAIT(N(EVS_UpdateShiftingWallPos)) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(10 * DT) - EVT_IF_EQ(GF_PRA02_DoorColorToggle, TRUE) - EVT_CALL(SetGroupVisibility, MODEL_g307, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_g308, MODEL_GROUP_VISIBLE) - EVT_EXEC_WAIT(N(EVS_RaisePoundableSwitch)) - EVT_ELSE - EVT_CALL(SetGroupVisibility, MODEL_g307, MODEL_GROUP_VISIBLE) - EVT_CALL(SetGroupVisibility, MODEL_g308, MODEL_GROUP_HIDDEN) - EVT_EXEC_WAIT(N(EVS_RaisePoundableSwitch)) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(N(IsPlayerPounding)) + IfEq(LVar0, FALSE) + Return + EndIf + Call(DisablePlayerInput, TRUE) + IfEq(GF_PRA02_DoorColorToggle, FALSE) + Call(MakeLerp, 0, -250, 250 * DT, EASING_LINEAR) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittse, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilittse2, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilittne2, COLLIDER_FLAGS_UPPER_MASK) + Set(GF_PRA02_DoorColorToggle, TRUE) + Exec(N(EVS_LowerPoundableSwitch)) + Else + Call(MakeLerp, -250, 0, 250 * DT, EASING_LINEAR) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittse2, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne2, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilittse, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) + Set(GF_PRA02_DoorColorToggle, FALSE) + Exec(N(EVS_LowerPoundableSwitch)) + EndIf + Wait(30) + Thread + PlayEffect(EFFECT_DUST, 0, 1000, 250, 60, 50) + PlayEffect(EFFECT_DUST, 0, 1000, 250, 120, 50) + PlayEffect(EFFECT_DUST, 0, 1000, 250, 180, 50) + PlayEffect(EFFECT_DUST, 0, 1000, 250, -60, 50) + PlayEffect(EFFECT_DUST, 0, 1000, 250, -120, 50) + PlayEffect(EFFECT_DUST, 0, 1000, 250, -180, 50) + EndThread + Thread + Call(PlaySound, SOUND_PRA_SHIFT_FLOORS_RUMBLE) + Call(ShakeCam, CAM_DEFAULT, 0, 250 * DT, Float(0.5)) + Call(ShakeCam, CAM_DEFAULT, 0, 10 * DT, Float(1.5)) + Call(PlaySound, SOUND_PRA_SHIFT_FLOORS_THUD) // ??? somehow this terminates the looping SOUND_PRA_SHIFT_FLOORS_RUMBLE + EndThread + Label(0) + Call(UpdateLerp) + Set(MV_WallPosOffset, LVar0) + ExecWait(N(EVS_UpdateShiftingWallPos)) + IfEq(LVar1, 1) + Goto(0) + EndIf + Wait(10 * DT) + IfEq(GF_PRA02_DoorColorToggle, TRUE) + Call(SetGroupVisibility, MODEL_g307, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_g308, MODEL_GROUP_VISIBLE) + ExecWait(N(EVS_RaisePoundableSwitch)) + Else + Call(SetGroupVisibility, MODEL_g307, MODEL_GROUP_VISIBLE) + Call(SetGroupVisibility, MODEL_g308, MODEL_GROUP_HIDDEN) + ExecWait(N(EVS_RaisePoundableSwitch)) + EndIf + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_DoNothing) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_UsePadlock_Dummy) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_DoNothing)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_DoNothing)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_DoNothing)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) + BindTrigger(Ref(N(EVS_DoNothing)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) + Return + End }; EvtScript N(EVS_UpdatePadlockPositions) = { - EVT_LOOP(0) - EVT_CALL(N(UpdatePadlockPosition), MV_NearRedPadlock, 987, 8, 84) - EVT_CALL(N(UpdatePadlockPosition), MV_FarRedPadlock, 987, 8, -84) - EVT_CALL(N(UpdatePadlockPosition), MV_NearBluePadlock, 987, 258, 84) - EVT_CALL(N(UpdatePadlockPosition), MV_FarBluePadlock, 987, 258, -84) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(N(UpdatePadlockPosition), MV_NearRedPadlock, 987, 8, 84) + Call(N(UpdatePadlockPosition), MV_FarRedPadlock, 987, 8, -84) + Call(N(UpdatePadlockPosition), MV_NearBluePadlock, 987, 258, 84) + Call(N(UpdatePadlockPosition), MV_FarBluePadlock, 987, 258, -84) + Wait(1) + EndLoop + Return + End }; #include "world/common/todo/RemovePadlock.inc.c" #include "world/common/todo/GetEntityPosition.inc.c" EvtScript N(EVS_ItemPrompt_RedPadlock) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END_IF - EVT_CALL(FindKeyItem, ITEM_RED_KEY, LVar0) - EVT_CALL(RemoveKeyItemAt, LVar0) - EVT_CALL(CloseChoicePopup) - EVT_SET(GF_PRA02_UnlockedRedDoor, TRUE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_16_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_16_3)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) - EVT_CALL(N(GetEntityPosition), MV_NearRedPadlock, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(N(GetEntityPosition), MV_FarRedPadlock, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_SET(LVar0, MV_NearRedPadlock) - EVT_SET(MV_NearRedPadlock, -1) - EVT_CALL(N(RemovePadlock)) - EVT_SET(LVar0, MV_FarRedPadlock) - EVT_SET(MV_FarRedPadlock, -1) - EVT_CALL(N(RemovePadlock)) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_UNBIND - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(ShowKeyChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + EndIf + IfEq(LVar0, -1) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + EndIf + Call(FindKeyItem, ITEM_RED_KEY, LVar0) + Call(RemoveKeyItemAt, LVar0) + Call(CloseChoicePopup) + Set(GF_PRA02_UnlockedRedDoor, TRUE) + BindTrigger(Ref(N(EVS_ExitDoors_pra_16_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_16_3)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) + Call(N(GetEntityPosition), MV_NearRedPadlock, LVar0, LVar1, LVar2) + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Call(N(GetEntityPosition), MV_FarRedPadlock, LVar0, LVar1, LVar2) + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Set(LVar0, MV_NearRedPadlock) + Set(MV_NearRedPadlock, -1) + Call(N(RemovePadlock)) + Set(LVar0, MV_FarRedPadlock) + Set(MV_FarRedPadlock, -1) + Call(N(RemovePadlock)) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Unbind + Return + End }; EvtScript N(EVS_ItemPrompt_BluePadlock) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END_IF - EVT_CALL(FindKeyItem, ITEM_BLUE_KEY, LVar0) - EVT_CALL(RemoveKeyItemAt, LVar0) - EVT_CALL(CloseChoicePopup) - EVT_SET(GF_PRA02_UnlockedBlueDoor, TRUE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_13_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse2, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_13_3)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne2, 1, 0) - EVT_CALL(N(GetEntityPosition), MV_NearBluePadlock, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(N(GetEntityPosition), MV_FarBluePadlock, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_SET(LVar0, MV_NearBluePadlock) - EVT_SET(MV_NearBluePadlock, -1) - EVT_CALL(N(RemovePadlock)) - EVT_SET(LVar0, MV_FarBluePadlock) - EVT_SET(MV_FarBluePadlock, -1) - EVT_CALL(N(RemovePadlock)) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_UNBIND - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(ShowKeyChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + EndIf + IfEq(LVar0, -1) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + EndIf + Call(FindKeyItem, ITEM_BLUE_KEY, LVar0) + Call(RemoveKeyItemAt, LVar0) + Call(CloseChoicePopup) + Set(GF_PRA02_UnlockedBlueDoor, TRUE) + BindTrigger(Ref(N(EVS_ExitDoors_pra_13_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse2, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_13_3)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne2, 1, 0) + Call(N(GetEntityPosition), MV_NearBluePadlock, LVar0, LVar1, LVar2) + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Call(N(GetEntityPosition), MV_FarBluePadlock, LVar0, LVar1, LVar2) + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Set(LVar0, MV_NearBluePadlock) + Set(MV_NearBluePadlock, -1) + Call(N(RemovePadlock)) + Set(LVar0, MV_FarBluePadlock) + Set(MV_FarBluePadlock, -1) + Call(N(RemovePadlock)) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Unbind + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_SET(MV_NearRedPadlock, -1) - EVT_SET(MV_FarRedPadlock, -1) - EVT_SET(MV_NearBluePadlock, -1) - EVT_SET(MV_FarBluePadlock, -1) - EVT_SET(LVar2, COLLISION_WITH_ENTITY_BIT) - EVT_IF_EQ(GF_PRA02_UnlockedRedDoor, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), 987, 8, 84, -80, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_UsePadlock_Dummy))) - EVT_SET(MV_NearRedPadlock, LVar0) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_ItemPrompt_RedPadlock)), TRIGGER_WALL_PRESS_A, LVar2, EVT_PTR(N(RedKeyList)), 0, 1) - EVT_ADD(LVar2, 1) - EVT_CALL(UseDynamicShadow, TRUE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), 987, 8, -84, -80, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_UsePadlock_Dummy))) - EVT_SET(MV_FarRedPadlock, LVar0) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_ItemPrompt_RedPadlock)), TRIGGER_WALL_PRESS_A, LVar2, EVT_PTR(N(RedKeyList)), 0, 1) - EVT_ADD(LVar2, 1) - EVT_CALL(UseDynamicShadow, TRUE) - EVT_END_IF - EVT_IF_EQ(GF_PRA02_UnlockedBlueDoor, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), 987, 258, 84, -80, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_UsePadlock_Dummy))) - EVT_SET(MV_NearBluePadlock, LVar0) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_ItemPrompt_BluePadlock)), TRIGGER_WALL_PRESS_A, LVar2, EVT_PTR(N(BlueKeyList)), 0, 1) - EVT_ADD(LVar2, 1) - EVT_CALL(UseDynamicShadow, TRUE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), 987, 258, -84, -80, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_UsePadlock_Dummy))) - EVT_SET(MV_FarBluePadlock, LVar0) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_ItemPrompt_BluePadlock)), TRIGGER_WALL_PRESS_A, LVar2, EVT_PTR(N(BlueKeyList)), 0, 1) - EVT_ADD(LVar2, 1) - EVT_CALL(UseDynamicShadow, TRUE) - EVT_END_IF - EVT_EXEC(N(EVS_UpdatePadlockPositions)) - EVT_CALL(ParentColliderToModel, COLLIDER_o1344, MODEL_o1222) - EVT_CALL(ParentColliderToModel, COLLIDER_o1342, MODEL_o1228) - EVT_RETURN - EVT_END + Set(MV_NearRedPadlock, -1) + Set(MV_FarRedPadlock, -1) + Set(MV_NearBluePadlock, -1) + Set(MV_FarBluePadlock, -1) + Set(LVar2, COLLISION_WITH_ENTITY_BIT) + IfEq(GF_PRA02_UnlockedRedDoor, FALSE) + Call(MakeEntity, Ref(Entity_Padlock), 987, 8, 84, -80, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_UsePadlock_Dummy))) + Set(MV_NearRedPadlock, LVar0) + BindPadlock(Ref(N(EVS_ItemPrompt_RedPadlock)), TRIGGER_WALL_PRESS_A, LVar2, Ref(N(RedKeyList)), 0, 1) + Add(LVar2, 1) + Call(UseDynamicShadow, TRUE) + Call(MakeEntity, Ref(Entity_Padlock), 987, 8, -84, -80, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_UsePadlock_Dummy))) + Set(MV_FarRedPadlock, LVar0) + BindPadlock(Ref(N(EVS_ItemPrompt_RedPadlock)), TRIGGER_WALL_PRESS_A, LVar2, Ref(N(RedKeyList)), 0, 1) + Add(LVar2, 1) + Call(UseDynamicShadow, TRUE) + EndIf + IfEq(GF_PRA02_UnlockedBlueDoor, FALSE) + Call(MakeEntity, Ref(Entity_Padlock), 987, 258, 84, -80, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_UsePadlock_Dummy))) + Set(MV_NearBluePadlock, LVar0) + BindPadlock(Ref(N(EVS_ItemPrompt_BluePadlock)), TRIGGER_WALL_PRESS_A, LVar2, Ref(N(BlueKeyList)), 0, 1) + Add(LVar2, 1) + Call(UseDynamicShadow, TRUE) + Call(MakeEntity, Ref(Entity_Padlock), 987, 258, -84, -80, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_UsePadlock_Dummy))) + Set(MV_FarBluePadlock, LVar0) + BindPadlock(Ref(N(EVS_ItemPrompt_BluePadlock)), TRIGGER_WALL_PRESS_A, LVar2, Ref(N(BlueKeyList)), 0, 1) + Add(LVar2, 1) + Call(UseDynamicShadow, TRUE) + EndIf + Exec(N(EVS_UpdatePadlockPositions)) + Call(ParentColliderToModel, COLLIDER_o1344, MODEL_o1222) + Call(ParentColliderToModel, COLLIDER_o1342, MODEL_o1228) + Return + End }; diff --git a/src/world/area_pra/pra_03/pra_03_1_music.c b/src/world/area_pra/pra_03/pra_03_1_music.c index f3f23971ad9..aa7de5f4677 100644 --- a/src/world/area_pra/pra_03/pra_03_1_music.c +++ b/src/world/area_pra/pra_03/pra_03_1_music.c @@ -1,8 +1,8 @@ #include "pra_03.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Return + End }; diff --git a/src/world/area_pra/pra_03/pra_03_2_main.c b/src/world/area_pra/pra_03/pra_03_2_main.c index b64621f4e1c..9d8a79b18ca 100644 --- a/src/world/area_pra/pra_03/pra_03_2_main.c +++ b/src/world/area_pra/pra_03/pra_03_2_main.c @@ -1,75 +1,75 @@ #include "pra_03.h" EvtScript N(EVS_ExitDoors_pra_02_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_03_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittnnw) - EVT_SET(LVar2, MODEL_o774) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_02"), pra_02_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_03_ENTRY_0) + Set(LVar1, COLLIDER_deilittnnw) + Set(LVar2, MODEL_o774) + Set(LVar3, DOOR_SWING_IN) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("pra_02"), pra_02_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_38_0) = EVT_EXIT_DOUBLE_DOOR(pra_03_ENTRY_1, "pra_38", pra_38_ENTRY_0, COLLIDER_deilittne, MODEL_o880, MODEL_o878); EvtScript N(EVS_ExitDoors_pra_09_0) = EVT_EXIT_DOUBLE_DOOR(pra_03_ENTRY_2, "pra_09", pra_09_ENTRY_0, COLLIDER_deilittnne, MODEL_o989, MODEL_o988); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_02_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnnw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_38_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_09_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnne, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_pra_02_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnnw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_38_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_09_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnne, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(pra_03_ENTRY_0) - EVT_SET(LVar2, MODEL_o774) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_CASE_EQ(pra_03_ENTRY_1) - EVT_SET(LVar2, MODEL_o880) - EVT_SET(LVar3, MODEL_o878) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(pra_03_ENTRY_2) - EVT_SET(LVar2, MODEL_o989) - EVT_SET(LVar3, MODEL_o988) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_END_SWITCH - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(pra_03_ENTRY_0) + Set(LVar2, MODEL_o774) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + CaseEq(pra_03_ENTRY_1) + Set(LVar2, MODEL_o880) + Set(LVar3, MODEL_o878) + ExecWait(EnterDoubleDoor) + CaseEq(pra_03_ENTRY_2) + Set(LVar2, MODEL_o989) + Set(LVar3, MODEL_o988) + ExecWait(EnterDoubleDoor) + EndSwitch + Exec(N(EVS_BindExitTriggers)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_IF_EQ(GF_PRA04_BoardedFloor, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_g286, FALSE) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_o998, FALSE) - EVT_END_IF - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + IfEq(GF_PRA04_BoardedFloor, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_g286, FALSE) + Else + Call(EnableModel, MODEL_o998, FALSE) + EndIf + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_pra/pra_03/pra_03_3_entity.c b/src/world/area_pra/pra_03/pra_03_3_entity.c index b33e0d39bb6..ecb9ee6b4df 100644 --- a/src/world/area_pra/pra_03/pra_03_3_entity.c +++ b/src/world/area_pra/pra_03/pra_03_3_entity.c @@ -38,55 +38,55 @@ API_CALLABLE(N(MonitorPlayerFloor)) { } EvtScript N(EVS_TetherCamToPlayerWithCeiling) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GE(LVar1, LVar3) - EVT_SET(LVar1, LVar3) - EVT_END_IF - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGe(LVar1, LVar3) + Set(LVar1, LVar3) + EndIf + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_UseSpring) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAUNCH) - EVT_CALL(GetPlayerPos, LVar7, LVar8, LVar9) - EVT_IF_EQ(MV_PlayerFloor, 0) - EVT_SET(LVar3, -175) - EVT_EXEC_GET_TID(N(EVS_TetherCamToPlayerWithCeiling), LVarA) - EVT_CALL(N(GetTargetPosXForSpring_Floor0)) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(2.0)) - EVT_SET(LVar1, -200) - EVT_SET(LVar2, 15) - EVT_ELSE - EVT_SET(LVar3, 0) - EVT_EXEC_GET_TID(N(EVS_TetherCamToPlayerWithCeiling), LVarA) - EVT_CALL(N(GetTargetPosXForSpring_Floor1)) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7)) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 35) - EVT_END_IF - EVT_CALL(PlayerJump, LVar0, LVar1, LVar9, LVar2) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_WAIT(2) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAUNCH) + Call(GetPlayerPos, LVar7, LVar8, LVar9) + IfEq(MV_PlayerFloor, 0) + Set(LVar3, -175) + ExecGetTID(N(EVS_TetherCamToPlayerWithCeiling), LVarA) + Call(N(GetTargetPosXForSpring_Floor0)) + Call(SetPlayerJumpscale, Float(2.0)) + Set(LVar1, -200) + Set(LVar2, 15) + Else + Set(LVar3, 0) + ExecGetTID(N(EVS_TetherCamToPlayerWithCeiling), LVarA) + Call(N(GetTargetPosXForSpring_Floor1)) + Call(SetPlayerJumpscale, Float(0.7)) + Set(LVar1, 0) + Set(LVar2, 35) + EndIf + Call(PlayerJump, LVar0, LVar1, LVar9, LVar2) + KillThread(LVarA) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Wait(2) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_THREAD - EVT_CALL(N(MonitorPlayerFloor)) - EVT_END_THREAD - EVT_CALL(MakeEntity, EVT_PTR(Entity_ScriptSpring), 124, -200, -75, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_UseSpring))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), -200, 60, -75, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Thread + Call(N(MonitorPlayerFloor)) + EndThread + Call(MakeEntity, Ref(Entity_ScriptSpring), 124, -200, -75, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_UseSpring))) + Call(MakeEntity, Ref(Entity_SavePoint), -200, 60, -75, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_pra/pra_04/pra_04_1_music.c b/src/world/area_pra/pra_04/pra_04_1_music.c index ed174637751..c0646d494ec 100644 --- a/src/world/area_pra/pra_04/pra_04_1_music.c +++ b/src/world/area_pra/pra_04/pra_04_1_music.c @@ -1,8 +1,8 @@ #include "pra_04.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Return + End }; diff --git a/src/world/area_pra/pra_04/pra_04_2_main.c b/src/world/area_pra/pra_04/pra_04_2_main.c index 298f4e3e62f..e719bc16084 100644 --- a/src/world/area_pra/pra_04/pra_04_2_main.c +++ b/src/world/area_pra/pra_04/pra_04_2_main.c @@ -1,18 +1,18 @@ #include "pra_04.h" EvtScript N(EVS_ExitDoor_pra_02_4) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_04_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittssw) - EVT_SET(LVar2, MODEL_o847) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_02"), pra_02_ENTRY_4) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_04_ENTRY_0) + Set(LVar1, COLLIDER_deilittssw) + Set(LVar2, MODEL_o847) + Set(LVar3, DOOR_SWING_OUT) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("pra_02"), pra_02_ENTRY_4) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_39_0) = EVT_EXIT_DOUBLE_DOOR(pra_04_ENTRY_1, "pra_39", pra_39_ENTRY_0, COLLIDER_deilittse, MODEL_o874, MODEL_o876); @@ -21,50 +21,50 @@ EvtScript N(EVS_ExitDoors_pra_10_0) = EVT_EXIT_DOUBLE_DOOR(pra_04_ENTRY_2, "pra_ MAP_RODATA_PAD(1, exits); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_pra_02_4)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittssw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_39_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_10_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsse, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoor_pra_02_4)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittssw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_39_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_10_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsse, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(pra_04_ENTRY_0) - EVT_SET(LVar2, MODEL_o847) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_CASE_EQ(pra_04_ENTRY_1) - EVT_SET(LVar2, MODEL_o874) - EVT_SET(LVar3, MODEL_o876) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(pra_04_ENTRY_2) - EVT_SET(LVar2, MODEL_o986) - EVT_SET(LVar3, MODEL_o987) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_END_SWITCH - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(pra_04_ENTRY_0) + Set(LVar2, MODEL_o847) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSingleDoor) + CaseEq(pra_04_ENTRY_1) + Set(LVar2, MODEL_o874) + Set(LVar3, MODEL_o876) + ExecWait(EnterDoubleDoor) + CaseEq(pra_04_ENTRY_2) + Set(LVar2, MODEL_o986) + Set(LVar3, MODEL_o987) + ExecWait(EnterDoubleDoor) + EndSwitch + Exec(N(EVS_BindExitTriggers)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_IF_EQ(GF_PRA04_BoardedFloor, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitts, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_o994, FALSE) - EVT_END_IF - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + IfEq(GF_PRA04_BoardedFloor, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitts, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_o994, FALSE) + EndIf + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_pra/pra_04/pra_04_3_entity.c b/src/world/area_pra/pra_04/pra_04_3_entity.c index 28d8d57d742..12681f01346 100644 --- a/src/world/area_pra/pra_04/pra_04_3_entity.c +++ b/src/world/area_pra/pra_04/pra_04_3_entity.c @@ -38,68 +38,68 @@ API_CALLABLE(N(MonitorPlayerFloor)) { } EvtScript N(EVS_TetherCamToPlayerWithCeiling) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GE(LVar1, LVar3) - EVT_SET(LVar1, LVar3) - EVT_END_IF - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGe(LVar1, LVar3) + Set(LVar1, LVar3) + EndIf + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_UseSpring) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAUNCH) - EVT_CALL(GetPlayerPos, LVar7, LVar8, LVar9) - EVT_IF_EQ(MV_PlayerFloor, 0) - EVT_SET(LVar3, -175) - EVT_EXEC_GET_TID(N(EVS_TetherCamToPlayerWithCeiling), LVarA) - EVT_CALL(N(GetTargetPosXForSpring_Floor0)) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(2.0)) - EVT_SET(LVar1, -200) - EVT_SET(LVar2, 15) - EVT_ELSE - EVT_SET(LVar3, 0) - EVT_EXEC_GET_TID(N(EVS_TetherCamToPlayerWithCeiling), LVarA) - EVT_CALL(N(GetTargetPosXForSpring_Floor1)) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7)) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 35) - EVT_END_IF - EVT_CALL(PlayerJump, LVar0, LVar1, LVar9, LVar2) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_WAIT(2) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAUNCH) + Call(GetPlayerPos, LVar7, LVar8, LVar9) + IfEq(MV_PlayerFloor, 0) + Set(LVar3, -175) + ExecGetTID(N(EVS_TetherCamToPlayerWithCeiling), LVarA) + Call(N(GetTargetPosXForSpring_Floor0)) + Call(SetPlayerJumpscale, Float(2.0)) + Set(LVar1, -200) + Set(LVar2, 15) + Else + Set(LVar3, 0) + ExecGetTID(N(EVS_TetherCamToPlayerWithCeiling), LVarA) + Call(N(GetTargetPosXForSpring_Floor1)) + Call(SetPlayerJumpscale, Float(0.7)) + Set(LVar1, 0) + Set(LVar2, 35) + EndIf + Call(PlayerJump, LVar0, LVar1, LVar9, LVar2) + KillThread(LVarA) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Wait(2) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_BreakFloor) = { - EVT_SET(GF_PRA04_BoardedFloor, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitts, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_o994, FALSE) - EVT_RETURN - EVT_END + Set(GF_PRA04_BoardedFloor, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitts, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_o994, FALSE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_THREAD - EVT_CALL(N(MonitorPlayerFloor)) - EVT_END_THREAD - EVT_CALL(MakeEntity, EVT_PTR(Entity_ScriptSpring), 124, -200, 80, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_UseSpring))) - EVT_IF_EQ(GF_PRA04_BoardedFloor, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BoardedFloor), 124, 0, 80, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_BreakFloor))) - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -200, 60, 75, 0, ITEM_SUPER_SHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_PRA04_ItemBlock_SuperShroom) - EVT_RETURN - EVT_END + Thread + Call(N(MonitorPlayerFloor)) + EndThread + Call(MakeEntity, Ref(Entity_ScriptSpring), 124, -200, 80, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_UseSpring))) + IfEq(GF_PRA04_BoardedFloor, FALSE) + Call(MakeEntity, Ref(Entity_BoardedFloor), 124, 0, 80, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_BreakFloor))) + EndIf + Call(MakeEntity, Ref(Entity_YellowBlock), -200, 60, 75, 0, ITEM_SUPER_SHROOM, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_PRA04_ItemBlock_SuperShroom) + Return + End }; diff --git a/src/world/area_pra/pra_05/pra_05_1_music.c b/src/world/area_pra/pra_05/pra_05_1_music.c index 03059ca6e4d..fd4a38f0c5d 100644 --- a/src/world/area_pra/pra_05/pra_05_1_music.c +++ b/src/world/area_pra/pra_05/pra_05_1_music.c @@ -1,8 +1,8 @@ #include "pra_05.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Return + End }; diff --git a/src/world/area_pra/pra_05/pra_05_2_main.c b/src/world/area_pra/pra_05/pra_05_2_main.c index c18d4c1cbf0..afa02025a6f 100644 --- a/src/world/area_pra/pra_05/pra_05_2_main.c +++ b/src/world/area_pra/pra_05/pra_05_2_main.c @@ -4,54 +4,54 @@ #include "../common/Reflection.data.inc.c" EvtScript N(EVS_ExitDoors_pra_38_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_05_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittsw) - EVT_SET(LVar2, MODEL_o772) - EVT_SET(LVar3, MODEL_o768) - EVT_SET(LVar4, MODEL_o844) - EVT_SET(LVar5, MODEL_o846) - EVT_EXEC(ExitSplitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_38"), pra_38_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_05_ENTRY_0) + Set(LVar1, COLLIDER_deilittsw) + Set(LVar2, MODEL_o772) + Set(LVar3, MODEL_o768) + Set(LVar4, MODEL_o844) + Set(LVar5, MODEL_o846) + Exec(ExitSplitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("pra_38"), pra_38_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_38_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_pra_38_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_SET(LVar0, pra_05_ENTRY_0) - EVT_SET(LVar2, MODEL_o772) - EVT_SET(LVar3, MODEL_o768) - EVT_SET(LVar4, MODEL_o844) - EVT_SET(LVar5, MODEL_o846) - EVT_EXEC_WAIT(EnterSplitDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END + Set(LVar0, pra_05_ENTRY_0) + Set(LVar2, MODEL_o772) + Set(LVar3, MODEL_o768) + Set(LVar4, MODEL_o844) + Set(LVar5, MODEL_o846) + ExecWait(EnterSplitDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(LVar0, REFLECTION_FLOOR_ONLY) - EVT_SET(LVar1, GF_PRA_BrokeIllusion) - EVT_EXEC(N(EVS_SetupReflections)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Set(LVar0, REFLECTION_FLOOR_ONLY) + Set(LVar1, GF_PRA_BrokeIllusion) + Exec(N(EVS_SetupReflections)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_pra/pra_05/pra_05_3_entity.c b/src/world/area_pra/pra_05/pra_05_3_entity.c index aed93bd7fec..c0592d16525 100644 --- a/src/world/area_pra/pra_05/pra_05_3_entity.c +++ b/src/world/area_pra/pra_05/pra_05_3_entity.c @@ -6,9 +6,9 @@ EvtScript N(EVS_OpenChest_BlueKey) = EVT_OPEN_CHEST_KEY(ITEM_BLUE_KEY, GF_PRA05_Chest_BlueKey); EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 200, 20, 94, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_PRA05_Chest_BlueKey) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenChest_BlueKey))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Chest), 200, 20, 94, 0, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_PRA05_Chest_BlueKey) + Call(AssignScript, Ref(N(EVS_OpenChest_BlueKey))) + Return + End }; diff --git a/src/world/area_pra/pra_06/pra_06_1_music.c b/src/world/area_pra/pra_06/pra_06_1_music.c index bbb63e87c4f..4ce1c18b697 100644 --- a/src/world/area_pra/pra_06/pra_06_1_music.c +++ b/src/world/area_pra/pra_06/pra_06_1_music.c @@ -1,8 +1,8 @@ #include "pra_06.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Return + End }; diff --git a/src/world/area_pra/pra_06/pra_06_2_main.c b/src/world/area_pra/pra_06/pra_06_2_main.c index 1cda12577ca..0355cc293da 100644 --- a/src/world/area_pra/pra_06/pra_06_2_main.c +++ b/src/world/area_pra/pra_06/pra_06_2_main.c @@ -11,54 +11,54 @@ s32 N(map_init)(void) { #include "../common/Reflection.data.inc.c" EvtScript N(EVS_ExitDoors_pra_39_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_06_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittsw) - EVT_SET(LVar2, MODEL_o772) - EVT_SET(LVar3, MODEL_o768) - EVT_SET(LVar4, MODEL_o844) - EVT_SET(LVar5, MODEL_o846) - EVT_EXEC(ExitSplitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_39"), pra_39_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_06_ENTRY_0) + Set(LVar1, COLLIDER_deilittsw) + Set(LVar2, MODEL_o772) + Set(LVar3, MODEL_o768) + Set(LVar4, MODEL_o844) + Set(LVar5, MODEL_o846) + Exec(ExitSplitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("pra_39"), pra_39_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_39_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_pra_39_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) + Return + End }; EvtScript N(EVS_EnterDoors_0) = { - EVT_SET(LVar0, pra_06_ENTRY_0) - EVT_SET(LVar2, MODEL_o772) - EVT_SET(LVar3, MODEL_o768) - EVT_SET(LVar4, MODEL_o844) - EVT_SET(LVar5, MODEL_o846) - EVT_EXEC_WAIT(EnterSplitDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END + Set(LVar0, pra_06_ENTRY_0) + Set(LVar2, MODEL_o772) + Set(LVar3, MODEL_o768) + Set(LVar4, MODEL_o844) + Set(LVar5, MODEL_o846) + ExecWait(EnterSplitDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(LVar0, REFLECTION_FLOOR_ONLY) - EVT_SET(LVar1, GF_PRA_BrokeIllusion) - EVT_EXEC(N(EVS_SetupReflections)) - EVT_EXEC(N(EVS_EnterDoors_0)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Set(LVar0, REFLECTION_FLOOR_ONLY) + Set(LVar1, GF_PRA_BrokeIllusion) + Exec(N(EVS_SetupReflections)) + Exec(N(EVS_EnterDoors_0)) + Wait(1) + Return + End }; diff --git a/src/world/area_pra/pra_06/pra_06_3_entity.c b/src/world/area_pra/pra_06/pra_06_3_entity.c index f1d43ee0a45..88e0379b7e4 100644 --- a/src/world/area_pra/pra_06/pra_06_3_entity.c +++ b/src/world/area_pra/pra_06/pra_06_3_entity.c @@ -1,7 +1,7 @@ #include "pra_06.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_SHOOTING_STAR, 200, 20, 94, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_PRA06_Item_ShootingStar) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_SHOOTING_STAR, 200, 20, 94, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_PRA06_Item_ShootingStar) + Return + End }; diff --git a/src/world/area_pra/pra_09/pra_09_1_music.c b/src/world/area_pra/pra_09/pra_09_1_music.c index feb38b4da98..f9775309115 100644 --- a/src/world/area_pra/pra_09/pra_09_1_music.c +++ b/src/world/area_pra/pra_09/pra_09_1_music.c @@ -1,8 +1,8 @@ #include "pra_09.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Return + End }; diff --git a/src/world/area_pra/pra_09/pra_09_2_main.c b/src/world/area_pra/pra_09/pra_09_2_main.c index ba7311ca545..e7f61d7ff3b 100644 --- a/src/world/area_pra/pra_09/pra_09_2_main.c +++ b/src/world/area_pra/pra_09/pra_09_2_main.c @@ -5,49 +5,49 @@ #include "../common/Reflection.data.inc.c" EvtScript N(EVS_ExitDoors_pra_03_2) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_09_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittsw) - EVT_SET(LVar2, MODEL_o772) - EVT_SET(LVar3, MODEL_o768) - EVT_SET(LVar4, MODEL_o844) - EVT_SET(LVar5, MODEL_o846) - EVT_EXEC(ExitSplitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_03"), pra_03_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_09_ENTRY_0) + Set(LVar1, COLLIDER_deilittsw) + Set(LVar2, MODEL_o772) + Set(LVar3, MODEL_o768) + Set(LVar4, MODEL_o844) + Set(LVar5, MODEL_o846) + Exec(ExitSplitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("pra_03"), pra_03_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_pra_11_0) = EVT_EXIT_WALK(60, pra_09_ENTRY_1, "pra_11", pra_11_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_03_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) - EVT_IF_GE(GB_StoryProgress, STORY_CH7_DEFEATED_BOMBETTE_DUPLIGHOSTS) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_pra_11_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) - EVT_END_IF - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_pra_03_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) + IfGe(GB_StoryProgress, STORY_CH7_DEFEATED_BOMBETTE_DUPLIGHOSTS) + BindTrigger(Ref(N(EVS_ExitWalk_pra_11_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) + EndIf + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(pra_09_ENTRY_0) - EVT_SET(LVar2, MODEL_o772) - EVT_SET(LVar3, MODEL_o768) - EVT_SET(LVar4, MODEL_o844) - EVT_SET(LVar5, MODEL_o846) - EVT_EXEC_WAIT(EnterSplitDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(pra_09_ENTRY_1) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(pra_09_ENTRY_0) + Set(LVar2, MODEL_o772) + Set(LVar3, MODEL_o768) + Set(LVar4, MODEL_o844) + Set(LVar5, MODEL_o846) + ExecWait(EnterSplitDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(pra_09_ENTRY_1) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; BombTrigger N(BombPos_Wall) = { @@ -56,39 +56,39 @@ BombTrigger N(BombPos_Wall) = { }; EvtScript N(EVS_BlastWall) = { - EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 0, 38, 30, 1, 10, 30) - EVT_CALL(EnableModel, MODEL_g260, FALSE) - EVT_CALL(EnableModel, MODEL_g265, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittse, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_o952, TRUE) - EVT_SET(GF_PRA09_BombedWall, TRUE) - EVT_UNBIND - EVT_RETURN - EVT_END + PlayEffect(EFFECT_BOMBETTE_BREAKING, 0, 38, 30, 1, 10, 30) + Call(EnableModel, MODEL_g260, FALSE) + Call(EnableModel, MODEL_g265, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittse, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_o952, TRUE) + Set(GF_PRA09_BombedWall, TRUE) + Unbind + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_IF_EQ(GF_PRA09_BombedWall, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BlastWall)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Wall)), 1, 0) - EVT_CALL(EnableModel, MODEL_o952, FALSE) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_g260, FALSE) - EVT_CALL(EnableModel, MODEL_g265, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittse, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(LVar0, 1) - EVT_SET(LVar1, GF_PRA_BrokeIllusion) - EVT_EXEC(N(EVS_SetupReflections)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + IfEq(GF_PRA09_BombedWall, FALSE) + BindTrigger(Ref(N(EVS_BlastWall)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Wall)), 1, 0) + Call(EnableModel, MODEL_o952, FALSE) + Else + Call(EnableModel, MODEL_g260, FALSE) + Call(EnableModel, MODEL_g265, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittse, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Exec(N(EVS_SetupMusic)) + Set(LVar0, 1) + Set(LVar1, GF_PRA_BrokeIllusion) + Exec(N(EVS_SetupReflections)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_pra/pra_09/pra_09_3_npc.c b/src/world/area_pra/pra_09/pra_09_3_npc.c index 97ef3836640..f91113077ed 100644 --- a/src/world/area_pra/pra_09/pra_09_3_npc.c +++ b/src/world/area_pra/pra_09/pra_09_3_npc.c @@ -96,665 +96,665 @@ API_CALLABLE(N(ChangeNpcCollisionRadius)) { } EvtScript N(EVS_FocusCam_OnPosition) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, LVarA) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(12.0), EVT_FLOAT(-5.5)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(500.0), EVT_FLOAT(20.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, LVarA) + Call(SetCamDistance, CAM_DEFAULT, Float(350.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(12.0), Float(-5.5)) + Call(SetCamPosB, CAM_DEFAULT, Float(500.0), Float(20.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_FocusCam_StartBattle) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(6.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(500.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(386.0), EVT_FLOAT(20.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(6.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(500.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(386.0), Float(20.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Return + End }; EvtScript N(EVS_FocusCam_OnPlayer) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, 386) - EVT_SET(LVar0, 386) - EVT_END_IF - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(6.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(500.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(500.0), EVT_FLOAT(20.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar0, 386) + Set(LVar0, 386) + EndIf + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(6.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(500.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(500.0), Float(20.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Return + End }; EvtScript N(EVS_Imposter_Unmask) = { - EVT_CALL(N(ChangeNpcCollisionRadius)) - EVT_CALL(SetNpcFlagBits, LVar3, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SpeakToPlayer, LVar3, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, LVar5) - EVT_CALL(GetNpcPos, LVar3, LVar0, LVar1, LVar2) - EVT_CALL(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, LVar3, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, LVar3, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcPos, LVar4, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, LVar4, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 2880, 40, EASING_QUADRATIC_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, LVar4, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(EndSpeech, LVar4, ANIM_Duplighost_Anim05, ANIM_Duplighost_Anim02, 0) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnPlayer)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_THREAD - EVT_CALL(SetNpcAnimation, LVar4, ANIM_Duplighost_Anim04) - EVT_CALL(InterpNpcYaw, LVar4, 90, 0) - EVT_CALL(SetNpcSpeed, LVar4, EVT_FLOAT(6.5)) - EVT_CALL(PlaySoundAtNpc, LVar4, SOUND_DUPLIGHOST_LEAP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcMoveTo, LVar4, 0, LVar2, 0) - EVT_CALL(SetNpcPos, LVar4, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_WAIT(15) - EVT_RETURN - EVT_END + Call(N(ChangeNpcCollisionRadius)) + Call(SetNpcFlagBits, LVar3, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SpeakToPlayer, LVar3, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, LVar5) + Call(GetNpcPos, LVar3, LVar0, LVar1, LVar2) + Call(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) + Call(SetNpcPos, LVar3, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, LVar3, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcPos, LVar4, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, LVar4, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 2880, 40, EASING_QUADRATIC_OUT) + Label(1) + Call(UpdateLerp) + Call(SetNpcRotation, LVar4, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(EndSpeech, LVar4, ANIM_Duplighost_Anim05, ANIM_Duplighost_Anim02, 0) + ExecWait(N(EVS_FocusCam_OnPlayer)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Thread + Call(SetNpcAnimation, LVar4, ANIM_Duplighost_Anim04) + Call(InterpNpcYaw, LVar4, 90, 0) + Call(SetNpcSpeed, LVar4, Float(6.5)) + Call(PlaySoundAtNpc, LVar4, SOUND_DUPLIGHOST_LEAP, SOUND_SPACE_DEFAULT) + Call(NpcMoveTo, LVar4, 0, LVar2, 0) + Call(SetNpcPos, LVar4, NPC_DISPOSE_LOCATION) + EndThread + Wait(15) + Return + End }; EvtScript N(EVS_Imposter_HopTwice) = { - EVT_CALL(SetNpcJumpscale, LVar3, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, LVar3, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, LVar3, LVar0, LVar1, LVar2, 10) - EVT_CALL(GetNpcPos, LVar3, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, LVar3, LVar0, LVar1, LVar2, 10) - EVT_RETURN - EVT_END + Call(SetNpcJumpscale, LVar3, Float(1.0)) + Call(GetNpcPos, LVar3, LVar0, LVar1, LVar2) + Call(NpcJump0, LVar3, LVar0, LVar1, LVar2, 10) + Call(GetNpcPos, LVar3, LVar0, LVar1, LVar2) + Call(NpcJump0, LVar3, LVar0, LVar1, LVar2, 10) + Return + End }; EvtScript N(EVS_RevealEveryImposter) = { - EVT_IF_EQ(MV_RevealedFakeBombette1, 0) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Bombette_02, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Bombette_02, NPC_DISPOSE_LOCATION) - EVT_CALL(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Duplighost_01, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_Duplighost_01, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_Duplighost_01, ANIM_Duplighost_Anim04) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(NpcMoveTo, NPC_Duplighost_01, LVar0, LVar2, 30) - EVT_END_THREAD - EVT_END_IF - EVT_IF_EQ(MV_RevealedFakeBombette2, 0) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Bombette_03, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Bombette_03, NPC_DISPOSE_LOCATION) - EVT_CALL(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Duplighost_02, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_Duplighost_02, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_Duplighost_02, ANIM_Duplighost_Anim04) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(NpcMoveTo, NPC_Duplighost_02, LVar0, LVar2, 30) - EVT_END_THREAD - EVT_END_IF - EVT_IF_EQ(MV_RevealedFakeBombette3, 0) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Bombette_04, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Bombette_04, NPC_DISPOSE_LOCATION) - EVT_CALL(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Duplighost_03, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_Duplighost_03, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_Duplighost_03, ANIM_Duplighost_Anim04) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(NpcMoveTo, NPC_Duplighost_03, LVar0, LVar2, 30) - EVT_END_THREAD - EVT_END_IF - EVT_IF_EQ(MV_RevealedFakeBombette4, 0) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Bombette_05, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Bombette_05, NPC_DISPOSE_LOCATION) - EVT_CALL(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Duplighost_04, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_Duplighost_04, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_Duplighost_04, ANIM_Duplighost_Anim04) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(NpcMoveTo, NPC_Duplighost_04, LVar0, LVar2, 30) - EVT_END_THREAD - EVT_END_IF - EVT_WAIT(20) - EVT_RETURN - EVT_END + IfEq(MV_RevealedFakeBombette1, 0) + Thread + Call(GetNpcPos, NPC_Bombette_02, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Bombette_02, NPC_DISPOSE_LOCATION) + Call(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Duplighost_01, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_Duplighost_01, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_Duplighost_01, ANIM_Duplighost_Anim04) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(NpcMoveTo, NPC_Duplighost_01, LVar0, LVar2, 30) + EndThread + EndIf + IfEq(MV_RevealedFakeBombette2, 0) + Thread + Call(GetNpcPos, NPC_Bombette_03, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Bombette_03, NPC_DISPOSE_LOCATION) + Call(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Duplighost_02, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_Duplighost_02, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_Duplighost_02, ANIM_Duplighost_Anim04) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(NpcMoveTo, NPC_Duplighost_02, LVar0, LVar2, 30) + EndThread + EndIf + IfEq(MV_RevealedFakeBombette3, 0) + Thread + Call(GetNpcPos, NPC_Bombette_04, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Bombette_04, NPC_DISPOSE_LOCATION) + Call(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Duplighost_03, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_Duplighost_03, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_Duplighost_03, ANIM_Duplighost_Anim04) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(NpcMoveTo, NPC_Duplighost_03, LVar0, LVar2, 30) + EndThread + EndIf + IfEq(MV_RevealedFakeBombette4, 0) + Thread + Call(GetNpcPos, NPC_Bombette_05, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Bombette_05, NPC_DISPOSE_LOCATION) + Call(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Duplighost_04, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_Duplighost_04, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_Duplighost_04, ANIM_Duplighost_Anim04) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(NpcMoveTo, NPC_Duplighost_04, LVar0, LVar2, 30) + EndThread + EndIf + Wait(20) + Return + End }; EvtScript N(EVS_Imposter_ChaseDownPlayer) = { - EVT_CALL(SetNpcFlagBits, LVar3, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, LVar3, ANIM_WorldBombette_Run) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(NpcMoveTo, LVar3, LVar0, LVar2, 30) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, LVar3, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, LVar3, ANIM_WorldBombette_Run) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(NpcMoveTo, LVar3, LVar0, LVar2, 30) + Return + End }; EvtScript N(EVS_Imposter_CarryPlayerBack) = { - EVT_CALL(InterpNpcYaw, LVar3, LVar9, 0) - EVT_LOOP(30) - EVT_CALL(GetNpcPos, NPC_Bombette_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, LVar4) - EVT_ADD(LVar1, LVar5) - EVT_ADD(LVar2, LVar6) - EVT_CALL(SetNpcPos, LVar3, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(InterpNpcYaw, LVar3, LVar9, 0) + Loop(30) + Call(GetNpcPos, NPC_Bombette_01, LVar0, LVar1, LVar2) + Add(LVar0, LVar4) + Add(LVar1, LVar5) + Add(LVar2, LVar6) + Call(SetNpcPos, LVar3, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_Imposter_ReturnToStation) = { - EVT_CALL(NpcMoveTo, LVar3, LVar0, LVar2, 20) - EVT_CALL(SetNpcAnimation, LVar3, ANIM_WorldBombette_Idle) - EVT_CALL(SetNpcFlagBits, LVar3, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(InterpNpcYaw, LVar3, 90, 0) - EVT_RETURN - EVT_END + Call(NpcMoveTo, LVar3, LVar0, LVar2, 20) + Call(SetNpcAnimation, LVar3, ANIM_WorldBombette_Idle) + Call(SetNpcFlagBits, LVar3, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(InterpNpcYaw, LVar3, 90, 0) + Return + End }; EvtScript N(EVS_PreventPlayerLeaving) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerActionState, LVar0) - EVT_IF_EQ(LVar0, ACTION_STATE_IDLE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_IF_EQ(MV_RevealedFakeBombette1, 0) - EVT_SET(LVar3, NPC_Bombette_02) - EVT_EXEC(N(EVS_Imposter_ChaseDownPlayer)) - EVT_END_IF - EVT_IF_EQ(MV_RevealedFakeBombette2, 0) - EVT_SET(LVar3, NPC_Bombette_03) - EVT_EXEC(N(EVS_Imposter_ChaseDownPlayer)) - EVT_END_IF - EVT_IF_EQ(MV_RevealedFakeBombette3, 0) - EVT_SET(LVar3, NPC_Bombette_04) - EVT_EXEC(N(EVS_Imposter_ChaseDownPlayer)) - EVT_END_IF - EVT_IF_EQ(MV_RevealedFakeBombette4, 0) - EVT_SET(LVar3, NPC_Bombette_05) - EVT_EXEC(N(EVS_Imposter_ChaseDownPlayer)) - EVT_END_IF - EVT_SET(LVar3, 0) - EVT_EXEC_WAIT(N(EVS_Imposter_ChaseDownPlayer)) - EVT_CALL(InterpPlayerYaw, 90, 3) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_LayingDown) - EVT_CALL(GetNpcPos, NPC_Bombette_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(10) - EVT_THREAD - EVT_LOOP(35) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, 0, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(30) - EVT_CALL(GetNpcPos, NPC_Bombette_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_IF_EQ(MV_RevealedFakeBombette1, 0) - EVT_SET(LVar3, NPC_Bombette_02) - EVT_SET(LVar4, 0) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, 10) - EVT_EXEC(N(EVS_Imposter_CarryPlayerBack)) - EVT_END_IF - EVT_IF_EQ(MV_RevealedFakeBombette2, 0) - EVT_SET(LVar3, NPC_Bombette_03) - EVT_SET(LVar4, -20) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, 0) - EVT_EXEC(N(EVS_Imposter_CarryPlayerBack)) - EVT_END_IF - EVT_IF_EQ(MV_RevealedFakeBombette3, 0) - EVT_SET(LVar3, NPC_Bombette_04) - EVT_SET(LVar4, -20) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, 10) - EVT_EXEC(N(EVS_Imposter_CarryPlayerBack)) - EVT_END_IF - EVT_IF_EQ(MV_RevealedFakeBombette4, 0) - EVT_SET(LVar3, NPC_Bombette_05) - EVT_SET(LVar4, -20) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, 20) - EVT_EXEC(N(EVS_Imposter_CarryPlayerBack)) - EVT_END_IF - EVT_CALL(NpcMoveTo, NPC_Bombette_01, 370, 73, 30) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_IF_EQ(MV_RevealedFakeBombette1, 0) - EVT_SET(LVar3, NPC_Bombette_02) - EVT_SET(LVar0, 280) - EVT_SET(LVar2, 100) - EVT_EXEC(N(EVS_Imposter_ReturnToStation)) - EVT_END_IF - EVT_IF_EQ(MV_RevealedFakeBombette2, 0) - EVT_SET(LVar3, NPC_Bombette_03) - EVT_SET(LVar0, 315) - EVT_SET(LVar2, 55) - EVT_EXEC(N(EVS_Imposter_ReturnToStation)) - EVT_END_IF - EVT_IF_EQ(MV_RevealedFakeBombette3, 0) - EVT_SET(LVar3, NPC_Bombette_04) - EVT_SET(LVar0, 350) - EVT_SET(LVar2, 80) - EVT_EXEC(N(EVS_Imposter_ReturnToStation)) - EVT_END_IF - EVT_IF_EQ(MV_RevealedFakeBombette4, 0) - EVT_SET(LVar3, NPC_Bombette_05) - EVT_SET(LVar0, 420) - EVT_SET(LVar2, 60) - EVT_EXEC(N(EVS_Imposter_ReturnToStation)) - EVT_END_IF - EVT_SET(LVar3, 0) - EVT_SET(LVar0, 385) - EVT_SET(LVar2, 120) - EVT_EXEC_WAIT(N(EVS_Imposter_ReturnToStation)) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH7_014E, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Loop(0) + Wait(1) + Call(GetPlayerActionState, LVar0) + IfEq(LVar0, ACTION_STATE_IDLE) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerPhysics, TRUE) + IfEq(MV_RevealedFakeBombette1, 0) + Set(LVar3, NPC_Bombette_02) + Exec(N(EVS_Imposter_ChaseDownPlayer)) + EndIf + IfEq(MV_RevealedFakeBombette2, 0) + Set(LVar3, NPC_Bombette_03) + Exec(N(EVS_Imposter_ChaseDownPlayer)) + EndIf + IfEq(MV_RevealedFakeBombette3, 0) + Set(LVar3, NPC_Bombette_04) + Exec(N(EVS_Imposter_ChaseDownPlayer)) + EndIf + IfEq(MV_RevealedFakeBombette4, 0) + Set(LVar3, NPC_Bombette_05) + Exec(N(EVS_Imposter_ChaseDownPlayer)) + EndIf + Set(LVar3, 0) + ExecWait(N(EVS_Imposter_ChaseDownPlayer)) + Call(InterpPlayerYaw, 90, 3) + Call(SetPlayerAnimation, ANIM_MarioW2_LayingDown) + Call(GetNpcPos, NPC_Bombette_01, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(10) + Thread + Loop(35) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, 0, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + EndLoop + Call(PanToTarget, CAM_DEFAULT, 0, 0) + EndThread + Thread + Loop(30) + Call(GetNpcPos, NPC_Bombette_01, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + IfEq(MV_RevealedFakeBombette1, 0) + Set(LVar3, NPC_Bombette_02) + Set(LVar4, 0) + Set(LVar5, 0) + Set(LVar6, 10) + Exec(N(EVS_Imposter_CarryPlayerBack)) + EndIf + IfEq(MV_RevealedFakeBombette2, 0) + Set(LVar3, NPC_Bombette_03) + Set(LVar4, -20) + Set(LVar5, 0) + Set(LVar6, 0) + Exec(N(EVS_Imposter_CarryPlayerBack)) + EndIf + IfEq(MV_RevealedFakeBombette3, 0) + Set(LVar3, NPC_Bombette_04) + Set(LVar4, -20) + Set(LVar5, 0) + Set(LVar6, 10) + Exec(N(EVS_Imposter_CarryPlayerBack)) + EndIf + IfEq(MV_RevealedFakeBombette4, 0) + Set(LVar3, NPC_Bombette_05) + Set(LVar4, -20) + Set(LVar5, 0) + Set(LVar6, 20) + Exec(N(EVS_Imposter_CarryPlayerBack)) + EndIf + Call(NpcMoveTo, NPC_Bombette_01, 370, 73, 30) + Call(DisablePlayerPhysics, FALSE) + IfEq(MV_RevealedFakeBombette1, 0) + Set(LVar3, NPC_Bombette_02) + Set(LVar0, 280) + Set(LVar2, 100) + Exec(N(EVS_Imposter_ReturnToStation)) + EndIf + IfEq(MV_RevealedFakeBombette2, 0) + Set(LVar3, NPC_Bombette_03) + Set(LVar0, 315) + Set(LVar2, 55) + Exec(N(EVS_Imposter_ReturnToStation)) + EndIf + IfEq(MV_RevealedFakeBombette3, 0) + Set(LVar3, NPC_Bombette_04) + Set(LVar0, 350) + Set(LVar2, 80) + Exec(N(EVS_Imposter_ReturnToStation)) + EndIf + IfEq(MV_RevealedFakeBombette4, 0) + Set(LVar3, NPC_Bombette_05) + Set(LVar0, 420) + Set(LVar2, 60) + Exec(N(EVS_Imposter_ReturnToStation)) + EndIf + Set(LVar3, 0) + Set(LVar0, 385) + Set(LVar2, 120) + ExecWait(N(EVS_Imposter_ReturnToStation)) + Call(ShowMessageAtScreenPos, MSG_CH7_014E, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_ManageImpostersScene) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH7_DEFEATED_BOMBETTE_DUPLIGHOSTS) - EVT_RETURN - EVT_END_IF - EVT_LABEL(0) - EVT_SET(LVar0, GF_PRA09_BombedWall) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(25) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_INVISIBLE | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 386, 0, 93) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 386, 0, 93) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(500.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(12.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(500.0), EVT_FLOAT(20.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_SET(LVar0, NPC_Bombette_04) - EVT_SET(LVar1, 350) - EVT_SET(LVar2, 150) - EVT_SET(LVar3, 90) - EVT_CALL(SetNpcFlagBits, LVar0, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(N(ImposterFallFromCeiling)) - EVT_WAIT(1) - EVT_CALL(SetNpcFlagBits, LVar0, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_END_THREAD - EVT_WAIT(5) - EVT_THREAD - EVT_SET(LVar0, NPC_Bombette_02) - EVT_SET(LVar1, 280) - EVT_SET(LVar2, 150) - EVT_SET(LVar3, 100) - EVT_CALL(SetNpcFlagBits, LVar0, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(N(ImposterFallFromCeiling)) - EVT_WAIT(1) - EVT_CALL(SetNpcFlagBits, LVar0, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_END_THREAD - EVT_WAIT(5) - EVT_THREAD - EVT_SET(LVar0, NPC_Bombette_05) - EVT_SET(LVar1, 420) - EVT_SET(LVar2, 150) - EVT_SET(LVar3, 60) - EVT_CALL(SetNpcFlagBits, LVar0, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(N(ImposterFallFromCeiling)) - EVT_WAIT(1) - EVT_CALL(SetNpcFlagBits, LVar0, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_END_THREAD - EVT_WAIT(5) - EVT_THREAD - EVT_SET(LVar0, NPC_Bombette_01) - EVT_SET(LVar1, 385) - EVT_SET(LVar2, 150) - EVT_SET(LVar3, 120) - EVT_CALL(SetNpcFlagBits, LVar0, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(N(ImposterFallFromCeiling)) - EVT_WAIT(1) - EVT_CALL(SetNpcFlagBits, LVar0, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_END_THREAD - EVT_WAIT(5) - EVT_SET(LVar0, NPC_Bombette_03) - EVT_SET(LVar1, 315) - EVT_SET(LVar2, 150) - EVT_SET(LVar3, 55) - EVT_CALL(SetNpcFlagBits, LVar0, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(N(ImposterFallFromCeiling)) - EVT_WAIT(1) - EVT_CALL(SetNpcFlagBits, LVar0, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_WAIT(30) - EVT_CALL(GetNpcPos, NPC_Bombette_01, LVar0, LVar1, LVar2) - EVT_SETF(LVarA, EVT_FLOAT(3.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnPosition)) - EVT_SET(LVar3, 0) - EVT_EXEC(N(EVS_Imposter_HopTwice)) - EVT_CALL(SpeakToPlayer, NPC_Bombette_01, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_013C) - EVT_CALL(GetNpcPos, NPC_Bombette_02, LVar0, LVar1, LVar2) - EVT_SETF(LVarA, EVT_FLOAT(3.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnPosition)) - EVT_SET(LVar3, 1) - EVT_EXEC(N(EVS_Imposter_HopTwice)) - EVT_CALL(SpeakToPlayer, NPC_Bombette_02, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_013D) - EVT_CALL(GetNpcPos, NPC_Bombette_03, LVar0, LVar1, LVar2) - EVT_SETF(LVarA, EVT_FLOAT(3.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnPosition)) - EVT_SET(LVar3, 2) - EVT_EXEC(N(EVS_Imposter_HopTwice)) - EVT_CALL(SpeakToPlayer, NPC_Bombette_03, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_013E) - EVT_CALL(GetNpcPos, NPC_Bombette_04, LVar0, LVar1, LVar2) - EVT_SETF(LVarA, EVT_FLOAT(3.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnPosition)) - EVT_SET(LVar3, 3) - EVT_EXEC(N(EVS_Imposter_HopTwice)) - EVT_CALL(SpeakToPlayer, NPC_Bombette_04, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_013F) - EVT_CALL(GetNpcPos, NPC_Bombette_05, LVar0, LVar1, LVar2) - EVT_SETF(LVarA, EVT_FLOAT(3.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnPosition)) - EVT_SET(LVar3, 4) - EVT_EXEC(N(EVS_Imposter_HopTwice)) - EVT_CALL(SpeakToPlayer, NPC_Bombette_05, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_0140) - EVT_CALL(GetNpcPos, NPC_Bombette_01, LVar0, LVar1, LVar2) - EVT_SETF(LVarA, EVT_FLOAT(3.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnPosition)) - EVT_CALL(SpeakToPlayer, NPC_Bombette_01, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_0141) - EVT_CALL(GetNpcPos, NPC_Bombette_03, LVar0, LVar1, LVar2) - EVT_SETF(LVarA, EVT_FLOAT(3.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnPosition)) - EVT_CALL(SpeakToPlayer, NPC_Bombette_03, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_0142) - EVT_CALL(GetNpcPos, NPC_Bombette_04, LVar0, LVar1, LVar2) - EVT_SETF(LVarA, EVT_FLOAT(3.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnPosition)) - EVT_CALL(SpeakToPlayer, NPC_Bombette_04, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_0143) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_CHANGE_PARTNER | PS_FLAG_NO_PARTNER_USAGE, TRUE) - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, 490) - EVT_SET(LVar9, 270) - EVT_EXEC_WAIT(N(EVS_PreventPlayerLeaving)) - EVT_END_IF - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 190) - EVT_SET(LVar9, 90) - EVT_EXEC_WAIT(N(EVS_PreventPlayerLeaving)) - EVT_END_IF - EVT_IF_EQ(MV_RevealedFakeBombette1, 1) - EVT_IF_EQ(MV_RevealedFakeBombette2, 1) - EVT_IF_EQ(MV_RevealedFakeBombette3, 1) - EVT_IF_EQ(MV_RevealedFakeBombette4, 1) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(GetNpcPos, NPC_Bombette_01, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Bombette_01, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_INVISIBLE, FALSE) - EVT_CALL(GetAngleToNPC, NPC_PARTNER, LVarA) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LE(LVarA, 180) - EVT_ADD(LVar0, 20) - EVT_ELSE - EVT_ADD(LVar0, -20) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_WorldBombette_Walk) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 20) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_WorldBombette_Idle) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_014F) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_WorldBombette_HappyJump) - EVT_THREAD - EVT_WAIT(5) - EVT_ADD(LVar1, 10) - EVT_CALL(GetAngleToNPC, NPC_PARTNER, LVarA) - EVT_IF_GE(LVarA, 180) - EVT_ADD(LVar0, 20) - EVT_END_IF - EVT_PLAY_EFFECT(EFFECT_RECOVER, 2, LVar0, LVar1, LVar2, 0) - EVT_CALL(PlaySoundAtPlayer, SOUND_HEART_BOUNCE, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_WorldBombette_Idle) - EVT_WAIT(10) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_CHANGE_PARTNER | PS_FLAG_NO_PARTNER_USAGE, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_SET(GB_StoryProgress, STORY_CH7_DEFEATED_BOMBETTE_DUPLIGHOSTS) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_pra_11_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_SWITCH(MV_UnmaskingState) - EVT_CASE_EQ(0) - EVT_WAIT(1) - EVT_CASE_EQ(1) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetNpcPos, NPC_Bombette_01, LVar0, LVar1, LVar2) - EVT_SETF(LVarA, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnPosition)) - EVT_CALL(SpeakToPlayer, NPC_Bombette_01, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Hurt, 0, MSG_CH7_0149) - EVT_EXEC_WAIT(N(EVS_FocusCam_StartBattle)) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_EXEC_WAIT(N(EVS_RevealEveryImposter)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(N(ChooseImposterBattleFormation), MV_RevealedFakeBombette1, MV_RevealedFakeBombette2, MV_RevealedFakeBombette3, MV_RevealedFakeBombette4) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_BREAK_LOOP - EVT_CASE_EQ(2) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetNpcPos, NPC_Bombette_02, LVar0, LVar1, LVar2) - EVT_SETF(LVarA, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnPosition)) - EVT_SET(LVar3, NPC_Bombette_02) - EVT_SET(LVar4, NPC_Duplighost_01) - EVT_SET(LVar5, MSG_CH7_014A) - EVT_EXEC_WAIT(N(EVS_Imposter_Unmask)) - EVT_SET(MV_UnmaskingState, 0) - EVT_SET(MV_RevealedFakeBombette1, 1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CASE_EQ(3) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetNpcPos, NPC_Bombette_03, LVar0, LVar1, LVar2) - EVT_SETF(LVarA, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnPosition)) - EVT_SET(LVar3, NPC_Bombette_03) - EVT_SET(LVar4, NPC_Duplighost_02) - EVT_SET(LVar5, MSG_CH7_014B) - EVT_EXEC_WAIT(N(EVS_Imposter_Unmask)) - EVT_SET(MV_UnmaskingState, 0) - EVT_SET(MV_RevealedFakeBombette2, 1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CASE_EQ(4) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetNpcPos, NPC_Bombette_04, LVar0, LVar1, LVar2) - EVT_SETF(LVarA, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnPosition)) - EVT_SET(LVar3, NPC_Bombette_04) - EVT_SET(LVar4, NPC_Duplighost_03) - EVT_SET(LVar5, MSG_CH7_014C) - EVT_EXEC_WAIT(N(EVS_Imposter_Unmask)) - EVT_SET(MV_UnmaskingState, 0) - EVT_SET(MV_RevealedFakeBombette3, 1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CASE_EQ(5) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetNpcPos, NPC_Bombette_05, LVar0, LVar1, LVar2) - EVT_SETF(LVarA, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnPosition)) - EVT_SET(LVar3, NPC_Bombette_05) - EVT_SET(LVar4, NPC_Duplighost_04) - EVT_SET(LVar5, MSG_CH7_014D) - EVT_EXEC_WAIT(N(EVS_Imposter_Unmask)) - EVT_SET(MV_UnmaskingState, 0) - EVT_SET(MV_RevealedFakeBombette4, 1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_SWITCH - EVT_END_LOOP - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH7_DEFEATED_BOMBETTE_DUPLIGHOSTS) + Return + EndIf + Label(0) + Set(LVar0, GF_PRA09_BombedWall) + Wait(1) + IfEq(LVar0, 0) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Wait(25) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_INVISIBLE | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, 386, 0, 93) + Call(SetPanTarget, CAM_DEFAULT, 386, 0, 93) + Call(SetCamDistance, CAM_DEFAULT, Float(500.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(12.0), Float(-7.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(500.0), Float(20.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Set(LVar0, NPC_Bombette_04) + Set(LVar1, 350) + Set(LVar2, 150) + Set(LVar3, 90) + Call(SetNpcFlagBits, LVar0, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(N(ImposterFallFromCeiling)) + Wait(1) + Call(SetNpcFlagBits, LVar0, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + EndThread + Wait(5) + Thread + Set(LVar0, NPC_Bombette_02) + Set(LVar1, 280) + Set(LVar2, 150) + Set(LVar3, 100) + Call(SetNpcFlagBits, LVar0, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(N(ImposterFallFromCeiling)) + Wait(1) + Call(SetNpcFlagBits, LVar0, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + EndThread + Wait(5) + Thread + Set(LVar0, NPC_Bombette_05) + Set(LVar1, 420) + Set(LVar2, 150) + Set(LVar3, 60) + Call(SetNpcFlagBits, LVar0, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(N(ImposterFallFromCeiling)) + Wait(1) + Call(SetNpcFlagBits, LVar0, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + EndThread + Wait(5) + Thread + Set(LVar0, NPC_Bombette_01) + Set(LVar1, 385) + Set(LVar2, 150) + Set(LVar3, 120) + Call(SetNpcFlagBits, LVar0, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(N(ImposterFallFromCeiling)) + Wait(1) + Call(SetNpcFlagBits, LVar0, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + EndThread + Wait(5) + Set(LVar0, NPC_Bombette_03) + Set(LVar1, 315) + Set(LVar2, 150) + Set(LVar3, 55) + Call(SetNpcFlagBits, LVar0, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(N(ImposterFallFromCeiling)) + Wait(1) + Call(SetNpcFlagBits, LVar0, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Wait(30) + Call(GetNpcPos, NPC_Bombette_01, LVar0, LVar1, LVar2) + SetF(LVarA, Float(3.0)) + ExecWait(N(EVS_FocusCam_OnPosition)) + Set(LVar3, 0) + Exec(N(EVS_Imposter_HopTwice)) + Call(SpeakToPlayer, NPC_Bombette_01, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_013C) + Call(GetNpcPos, NPC_Bombette_02, LVar0, LVar1, LVar2) + SetF(LVarA, Float(3.0)) + ExecWait(N(EVS_FocusCam_OnPosition)) + Set(LVar3, 1) + Exec(N(EVS_Imposter_HopTwice)) + Call(SpeakToPlayer, NPC_Bombette_02, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_013D) + Call(GetNpcPos, NPC_Bombette_03, LVar0, LVar1, LVar2) + SetF(LVarA, Float(3.0)) + ExecWait(N(EVS_FocusCam_OnPosition)) + Set(LVar3, 2) + Exec(N(EVS_Imposter_HopTwice)) + Call(SpeakToPlayer, NPC_Bombette_03, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_013E) + Call(GetNpcPos, NPC_Bombette_04, LVar0, LVar1, LVar2) + SetF(LVarA, Float(3.0)) + ExecWait(N(EVS_FocusCam_OnPosition)) + Set(LVar3, 3) + Exec(N(EVS_Imposter_HopTwice)) + Call(SpeakToPlayer, NPC_Bombette_04, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_013F) + Call(GetNpcPos, NPC_Bombette_05, LVar0, LVar1, LVar2) + SetF(LVarA, Float(3.0)) + ExecWait(N(EVS_FocusCam_OnPosition)) + Set(LVar3, 4) + Exec(N(EVS_Imposter_HopTwice)) + Call(SpeakToPlayer, NPC_Bombette_05, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_0140) + Call(GetNpcPos, NPC_Bombette_01, LVar0, LVar1, LVar2) + SetF(LVarA, Float(3.0)) + ExecWait(N(EVS_FocusCam_OnPosition)) + Call(SpeakToPlayer, NPC_Bombette_01, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_0141) + Call(GetNpcPos, NPC_Bombette_03, LVar0, LVar1, LVar2) + SetF(LVarA, Float(3.0)) + ExecWait(N(EVS_FocusCam_OnPosition)) + Call(SpeakToPlayer, NPC_Bombette_03, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_0142) + Call(GetNpcPos, NPC_Bombette_04, LVar0, LVar1, LVar2) + SetF(LVarA, Float(3.0)) + ExecWait(N(EVS_FocusCam_OnPosition)) + Call(SpeakToPlayer, NPC_Bombette_04, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_0143) + Call(ResetCam, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Call(SetPlayerFlagBits, PS_FLAG_NO_CHANGE_PARTNER | PS_FLAG_NO_PARTNER_USAGE, TRUE) + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar0, 490) + Set(LVar9, 270) + ExecWait(N(EVS_PreventPlayerLeaving)) + EndIf + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, 190) + Set(LVar9, 90) + ExecWait(N(EVS_PreventPlayerLeaving)) + EndIf + IfEq(MV_RevealedFakeBombette1, 1) + IfEq(MV_RevealedFakeBombette2, 1) + IfEq(MV_RevealedFakeBombette3, 1) + IfEq(MV_RevealedFakeBombette4, 1) + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(GetNpcPos, NPC_Bombette_01, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Bombette_01, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_INVISIBLE, FALSE) + Call(GetAngleToNPC, NPC_PARTNER, LVarA) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLe(LVarA, 180) + Add(LVar0, 20) + Else + Add(LVar0, -20) + EndIf + Call(SetNpcAnimation, NPC_PARTNER, ANIM_WorldBombette_Walk) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 20) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_WorldBombette_Idle) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_014F) + Call(SetNpcJumpscale, NPC_PARTNER, Float(1.0)) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_WorldBombette_HappyJump) + Thread + Wait(5) + Add(LVar1, 10) + Call(GetAngleToNPC, NPC_PARTNER, LVarA) + IfGe(LVarA, 180) + Add(LVar0, 20) + EndIf + PlayEffect(EFFECT_RECOVER, 2, LVar0, LVar1, LVar2, 0) + Call(PlaySoundAtPlayer, SOUND_HEART_BOUNCE, SOUND_SPACE_DEFAULT) + EndThread + Call(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_WorldBombette_Idle) + Wait(10) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetPlayerFlagBits, PS_FLAG_NO_CHANGE_PARTNER | PS_FLAG_NO_PARTNER_USAGE, FALSE) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Set(GB_StoryProgress, STORY_CH7_DEFEATED_BOMBETTE_DUPLIGHOSTS) + BindTrigger(Ref(N(EVS_ExitWalk_pra_11_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) + BreakLoop + EndIf + EndIf + EndIf + EndIf + Switch(MV_UnmaskingState) + CaseEq(0) + Wait(1) + CaseEq(1) + Call(DisablePlayerInput, TRUE) + Call(GetNpcPos, NPC_Bombette_01, LVar0, LVar1, LVar2) + SetF(LVarA, Float(6.0)) + ExecWait(N(EVS_FocusCam_OnPosition)) + Call(SpeakToPlayer, NPC_Bombette_01, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Hurt, 0, MSG_CH7_0149) + ExecWait(N(EVS_FocusCam_StartBattle)) + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + ExecWait(N(EVS_RevealEveryImposter)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(N(ChooseImposterBattleFormation), MV_RevealedFakeBombette1, MV_RevealedFakeBombette2, MV_RevealedFakeBombette3, MV_RevealedFakeBombette4) + Call(DisablePlayerInput, FALSE) + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + BreakLoop + CaseEq(2) + Call(DisablePlayerInput, TRUE) + Call(GetNpcPos, NPC_Bombette_02, LVar0, LVar1, LVar2) + SetF(LVarA, Float(6.0)) + ExecWait(N(EVS_FocusCam_OnPosition)) + Set(LVar3, NPC_Bombette_02) + Set(LVar4, NPC_Duplighost_01) + Set(LVar5, MSG_CH7_014A) + ExecWait(N(EVS_Imposter_Unmask)) + Set(MV_UnmaskingState, 0) + Set(MV_RevealedFakeBombette1, 1) + Call(DisablePlayerInput, FALSE) + CaseEq(3) + Call(DisablePlayerInput, TRUE) + Call(GetNpcPos, NPC_Bombette_03, LVar0, LVar1, LVar2) + SetF(LVarA, Float(6.0)) + ExecWait(N(EVS_FocusCam_OnPosition)) + Set(LVar3, NPC_Bombette_03) + Set(LVar4, NPC_Duplighost_02) + Set(LVar5, MSG_CH7_014B) + ExecWait(N(EVS_Imposter_Unmask)) + Set(MV_UnmaskingState, 0) + Set(MV_RevealedFakeBombette2, 1) + Call(DisablePlayerInput, FALSE) + CaseEq(4) + Call(DisablePlayerInput, TRUE) + Call(GetNpcPos, NPC_Bombette_04, LVar0, LVar1, LVar2) + SetF(LVarA, Float(6.0)) + ExecWait(N(EVS_FocusCam_OnPosition)) + Set(LVar3, NPC_Bombette_04) + Set(LVar4, NPC_Duplighost_03) + Set(LVar5, MSG_CH7_014C) + ExecWait(N(EVS_Imposter_Unmask)) + Set(MV_UnmaskingState, 0) + Set(MV_RevealedFakeBombette3, 1) + Call(DisablePlayerInput, FALSE) + CaseEq(5) + Call(DisablePlayerInput, TRUE) + Call(GetNpcPos, NPC_Bombette_05, LVar0, LVar1, LVar2) + SetF(LVarA, Float(6.0)) + ExecWait(N(EVS_FocusCam_OnPosition)) + Set(LVar3, NPC_Bombette_05) + Set(LVar4, NPC_Duplighost_04) + Set(LVar5, MSG_CH7_014D) + ExecWait(N(EVS_Imposter_Unmask)) + Set(MV_UnmaskingState, 0) + Set(MV_RevealedFakeBombette4, 1) + Call(DisablePlayerInput, FALSE) + EndSwitch + EndLoop + Return + End }; EvtScript N(EVS_NpcDefeat_Duplighost_05) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(GetNpcPos, NPC_Bombette_01, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Bombette_01, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_INVISIBLE | NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_CHANGE_PARTNER | PS_FLAG_NO_PARTNER_USAGE, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_SET(GB_StoryProgress, STORY_CH7_DEFEATED_BOMBETTE_DUPLIGHOSTS) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_pra_11_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(GetNpcPos, NPC_Bombette_01, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Bombette_01, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_INVISIBLE | NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetPlayerFlagBits, PS_FLAG_NO_CHANGE_PARTNER | PS_FLAG_NO_PARTNER_USAGE, FALSE) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Set(GB_StoryProgress, STORY_CH7_DEFEATED_BOMBETTE_DUPLIGHOSTS) + BindTrigger(Ref(N(EVS_ExitWalk_pra_11_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) + Return + End }; EvtScript N(EVS_NpcInteract_Bombette_01) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_0144) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_0144) + Return + End }; EvtScript N(EVS_NpcInteract_Bombette_02) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_0145) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_0145) + Return + End }; EvtScript N(EVS_NpcInteract_Bombette_03) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_0146) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_0146) + Return + End }; EvtScript N(EVS_NpcInteract_Bombette_04) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_0147) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_0147) + Return + End }; EvtScript N(EVS_NpcInteract_Bombette_05) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_0148) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_0148) + Return + End }; EvtScript N(EVS_NpcInit_Duplighost_05) = { - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Duplighost_05))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) - EVT_EXEC(N(EVS_ManageImpostersScene)) - EVT_RETURN - EVT_END + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Duplighost_05))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) + Exec(N(EVS_ManageImpostersScene)) + Return + End }; EvtScript N(EVS_NpcInit_Bombette_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bombette_01))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bombette_01))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Bombette_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bombette_02))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bombette_02))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Bombette_03) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bombette_03))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bombette_03))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Bombette_04) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bombette_04))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bombette_04))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Bombette_05) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bombette_05))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bombette_05))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Duplighost_01) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_REFLECT_FLOOR | NPC_FLAG_10000000, TRUE) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_REFLECT_FLOOR | NPC_FLAG_10000000, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_Duplighost_02) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_REFLECT_FLOOR | NPC_FLAG_10000000, TRUE) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_REFLECT_FLOOR | NPC_FLAG_10000000, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_Duplighost_03) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_REFLECT_FLOOR | NPC_FLAG_10000000, TRUE) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_REFLECT_FLOOR | NPC_FLAG_10000000, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_Duplighost_04) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_REFLECT_FLOOR | NPC_FLAG_10000000, TRUE) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_REFLECT_FLOOR | NPC_FLAG_10000000, TRUE) + Return + End }; NpcData N(NpcData_InteractableBombettes)[] = { @@ -864,143 +864,143 @@ NpcData N(NpcData_Duplighosts)[] = { }; EvtScript N(EVS_NpcHit_TargetBombette_01) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(MV_UnmaskingState, NPC_Bombette_01 + 1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(MV_UnmaskingState, NPC_Bombette_01 + 1) + EndSwitch + Return + End }; EvtScript N(EVS_NpcHit_TargetBombette_02) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(MV_UnmaskingState, NPC_Bombette_02 + 1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(MV_UnmaskingState, NPC_Bombette_02 + 1) + EndSwitch + Return + End }; EvtScript N(EVS_NpcHit_TargetBombette_03) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(MV_UnmaskingState, NPC_Bombette_03 + 1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(MV_UnmaskingState, NPC_Bombette_03 + 1) + EndSwitch + Return + End }; EvtScript N(EVS_NpcHit_TargetBombette_04) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(MV_UnmaskingState, NPC_Bombette_04 + 1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(MV_UnmaskingState, NPC_Bombette_04 + 1) + EndSwitch + Return + End }; EvtScript N(EVS_NpcHit_TargetBombette_05) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(MV_UnmaskingState, NPC_Bombette_05 + 1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(MV_UnmaskingState, NPC_Bombette_05 + 1) + EndSwitch + Return + End }; EvtScript N(EVS_NpcIdle_TargetBombette_01) = { - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_Bombette_01, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Bombette_01_Target, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetNpcPos, NPC_Bombette_01, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Bombette_01_Target, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_TargetBombette_02) = { - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_Bombette_02, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Bombette_02_Target, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetNpcPos, NPC_Bombette_02, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Bombette_02_Target, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_TargetBombette_03) = { - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_Bombette_03, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Bombette_03_Target, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetNpcPos, NPC_Bombette_03, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Bombette_03_Target, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_TargetBombette_04) = { - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_Bombette_04, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Bombette_04_Target, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetNpcPos, NPC_Bombette_04, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Bombette_04_Target, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_TargetBombette_05) = { - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_Bombette_05, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Bombette_05_Target, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetNpcPos, NPC_Bombette_05, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Bombette_05_Target, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcInit_TargetBombette_01) = { - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_TargetBombette_01))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TargetBombette_01))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) - EVT_RETURN - EVT_END + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_TargetBombette_01))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_TargetBombette_01))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_TargetBombette_02) = { - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_TargetBombette_02))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TargetBombette_02))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) - EVT_RETURN - EVT_END + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_TargetBombette_02))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_TargetBombette_02))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_TargetBombette_03) = { - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_TargetBombette_03))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TargetBombette_03))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) - EVT_RETURN - EVT_END + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_TargetBombette_03))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_TargetBombette_03))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_TargetBombette_04) = { - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_TargetBombette_04))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TargetBombette_04))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) - EVT_RETURN - EVT_END + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_TargetBombette_04))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_TargetBombette_04))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_TargetBombette_05) = { - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_TargetBombette_05))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TargetBombette_05))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) - EVT_RETURN - EVT_END + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_TargetBombette_05))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_TargetBombette_05))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) + Return + End }; NpcData N(NpcData_TargetBombettes)[] = { diff --git a/src/world/area_pra/pra_10/pra_10_1_music.c b/src/world/area_pra/pra_10/pra_10_1_music.c index 207070c6524..57c46e1757f 100644 --- a/src/world/area_pra/pra_10/pra_10_1_music.c +++ b/src/world/area_pra/pra_10/pra_10_1_music.c @@ -1,8 +1,8 @@ #include "pra_10.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Return + End }; diff --git a/src/world/area_pra/pra_10/pra_10_2_main.c b/src/world/area_pra/pra_10/pra_10_2_main.c index 16b95f265b6..de64046bc1f 100644 --- a/src/world/area_pra/pra_10/pra_10_2_main.c +++ b/src/world/area_pra/pra_10/pra_10_2_main.c @@ -4,78 +4,78 @@ #include "../common/Reflection.data.inc.c" EvtScript N(EVS_ExitDoors_pra_04_2) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_10_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittsw) - EVT_SET(LVar2, MODEL_o772) - EVT_SET(LVar3, MODEL_o768) - EVT_SET(LVar4, MODEL_o844) - EVT_SET(LVar5, MODEL_o846) - EVT_EXEC(ExitSplitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_04"), pra_04_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_10_ENTRY_0) + Set(LVar1, COLLIDER_deilittsw) + Set(LVar2, MODEL_o772) + Set(LVar3, MODEL_o768) + Set(LVar4, MODEL_o844) + Set(LVar5, MODEL_o846) + Exec(ExitSplitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("pra_04"), pra_04_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_12_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_10_ENTRY_1) - EVT_SET(LVar1, COLLIDER_deilittse) - EVT_SET(LVar2, MODEL_o1019) - EVT_SET(LVar3, MODEL_o1021) - EVT_SET(LVar4, MODEL_o1020) - EVT_SET(LVar5, MODEL_o1022) - EVT_EXEC(ExitSplitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_12"), pra_12_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_10_ENTRY_1) + Set(LVar1, COLLIDER_deilittse) + Set(LVar2, MODEL_o1019) + Set(LVar3, MODEL_o1021) + Set(LVar4, MODEL_o1020) + Set(LVar5, MODEL_o1022) + Exec(ExitSplitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("pra_12"), pra_12_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_04_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_12_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_pra_04_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_12_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(pra_10_ENTRY_0) - EVT_SET(LVar2, MODEL_o772) - EVT_SET(LVar3, MODEL_o768) - EVT_SET(LVar4, MODEL_o844) - EVT_SET(LVar5, MODEL_o846) - EVT_EXEC_WAIT(EnterSplitDoubleDoor) - EVT_CASE_EQ(pra_10_ENTRY_1) - EVT_SET(LVar2, MODEL_o1019) - EVT_SET(LVar3, MODEL_o1021) - EVT_SET(LVar4, MODEL_o1020) - EVT_SET(LVar5, MODEL_o1022) - EVT_EXEC_WAIT(EnterSplitDoubleDoor) - EVT_END_SWITCH - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(pra_10_ENTRY_0) + Set(LVar2, MODEL_o772) + Set(LVar3, MODEL_o768) + Set(LVar4, MODEL_o844) + Set(LVar5, MODEL_o846) + ExecWait(EnterSplitDoubleDoor) + CaseEq(pra_10_ENTRY_1) + Set(LVar2, MODEL_o1019) + Set(LVar3, MODEL_o1021) + Set(LVar4, MODEL_o1020) + Set(LVar5, MODEL_o1022) + ExecWait(EnterSplitDoubleDoor) + EndSwitch + Exec(N(EVS_BindExitTriggers)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(LVar0, REFLECTION_FLOOR_ONLY) - EVT_SET(LVar1, GF_PRA_BrokeIllusion) - EVT_EXEC(N(EVS_SetupReflections)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Exec(N(EVS_SetupMusic)) + Set(LVar0, REFLECTION_FLOOR_ONLY) + Set(LVar1, GF_PRA_BrokeIllusion) + Exec(N(EVS_SetupReflections)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_pra/pra_10/pra_10_3_npc.c b/src/world/area_pra/pra_10/pra_10_3_npc.c index 92c29cb9d16..1c89fa7495c 100644 --- a/src/world/area_pra/pra_10/pra_10_3_npc.c +++ b/src/world/area_pra/pra_10/pra_10_3_npc.c @@ -3,9 +3,9 @@ #include "world/common/enemy/Swooper.inc.c" EvtScript N(EVS_NpcInit_Swoopula) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) + Return + End }; NpcData N(NpcData_Swoopula_01) = { diff --git a/src/world/area_pra/pra_11/pra_11_1_music.c b/src/world/area_pra/pra_11/pra_11_1_music.c index 83f1dd16666..11bd3636350 100644 --- a/src/world/area_pra/pra_11/pra_11_1_music.c +++ b/src/world/area_pra/pra_11/pra_11_1_music.c @@ -1,8 +1,8 @@ #include "pra_11.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Return + End }; diff --git a/src/world/area_pra/pra_11/pra_11_2_main.c b/src/world/area_pra/pra_11/pra_11_2_main.c index 8d6a74c347b..5228a2193d9 100644 --- a/src/world/area_pra/pra_11/pra_11_2_main.c +++ b/src/world/area_pra/pra_11/pra_11_2_main.c @@ -6,35 +6,35 @@ EvtScript N(EVS_ExitWalk_pra_09_1) = EVT_EXIT_WALK(60, pra_11_ENTRY_0, "pra_09", pra_09_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_pra_09_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_pra_09_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(EnableModel, MODEL_g270, FALSE) - EVT_CALL(EnableModel, MODEL_g271, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittsw, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(LVar0, REFLECTION_FLOOR_ONLY) - EVT_SET(LVar1, GF_PRA_BrokeIllusion) - EVT_EXEC(N(EVS_SetupReflections)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + ExecWait(N(EVS_MakeEntities)) + Call(EnableModel, MODEL_g270, FALSE) + Call(EnableModel, MODEL_g271, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittsw, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_SetupMusic)) + Set(LVar0, REFLECTION_FLOOR_ONLY) + Set(LVar1, GF_PRA_BrokeIllusion) + Exec(N(EVS_SetupReflections)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_pra/pra_11/pra_11_3_entity.c b/src/world/area_pra/pra_11/pra_11_3_entity.c index 8ce35ab7ace..bad64efaa33 100644 --- a/src/world/area_pra/pra_11/pra_11_3_entity.c +++ b/src/world/area_pra/pra_11/pra_11_3_entity.c @@ -6,9 +6,9 @@ EvtScript N(EVS_OpenChest_RedKey) = EVT_OPEN_CHEST_KEY(ITEM_RED_KEY, GF_PRA11_Chest_RedKey); EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 200, 20, 94, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_PRA11_Chest_RedKey) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenChest_RedKey))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Chest), 200, 20, 94, 0, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_PRA11_Chest_RedKey) + Call(AssignScript, Ref(N(EVS_OpenChest_RedKey))) + Return + End }; diff --git a/src/world/area_pra/pra_12/pra_12_1_music.c b/src/world/area_pra/pra_12/pra_12_1_music.c index d5cee786fd9..9863f2ec356 100644 --- a/src/world/area_pra/pra_12/pra_12_1_music.c +++ b/src/world/area_pra/pra_12/pra_12_1_music.c @@ -1,8 +1,8 @@ #include "pra_12.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Return + End }; diff --git a/src/world/area_pra/pra_12/pra_12_2_main.c b/src/world/area_pra/pra_12/pra_12_2_main.c index a73644942ba..1c059a149b4 100644 --- a/src/world/area_pra/pra_12/pra_12_2_main.c +++ b/src/world/area_pra/pra_12/pra_12_2_main.c @@ -11,54 +11,54 @@ s32 N(map_init)(void) { #include "../common/Reflection.data.inc.c" EvtScript N(EVS_ExitDoors_pra_10_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_12_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittsw) - EVT_SET(LVar2, MODEL_o772) - EVT_SET(LVar3, MODEL_o768) - EVT_SET(LVar4, MODEL_o844) - EVT_SET(LVar5, MODEL_o846) - EVT_EXEC(ExitSplitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_10"), pra_10_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_12_ENTRY_0) + Set(LVar1, COLLIDER_deilittsw) + Set(LVar2, MODEL_o772) + Set(LVar3, MODEL_o768) + Set(LVar4, MODEL_o844) + Set(LVar5, MODEL_o846) + Exec(ExitSplitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("pra_10"), pra_10_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_10_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_pra_10_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_SET(LVar0, pra_12_ENTRY_0) - EVT_SET(LVar2, MODEL_o772) - EVT_SET(LVar3, MODEL_o768) - EVT_SET(LVar4, MODEL_o844) - EVT_SET(LVar5, MODEL_o846) - EVT_EXEC_WAIT(EnterSplitDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END + Set(LVar0, pra_12_ENTRY_0) + Set(LVar2, MODEL_o772) + Set(LVar3, MODEL_o768) + Set(LVar4, MODEL_o844) + Set(LVar5, MODEL_o846) + ExecWait(EnterSplitDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(LVar0, REFLECTION_FLOOR_ONLY) - EVT_SET(LVar1, GF_PRA_BrokeIllusion) - EVT_EXEC(N(EVS_SetupReflections)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Set(LVar0, REFLECTION_FLOOR_ONLY) + Set(LVar1, GF_PRA_BrokeIllusion) + Exec(N(EVS_SetupReflections)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_pra/pra_12/pra_12_3_entity.c b/src/world/area_pra/pra_12/pra_12_3_entity.c index f26cbb92376..26eeae21212 100644 --- a/src/world/area_pra/pra_12/pra_12_3_entity.c +++ b/src/world/area_pra/pra_12/pra_12_3_entity.c @@ -6,9 +6,9 @@ EvtScript N(EVS_OpenChest_PDownDUp) = EVT_OPEN_CHEST_BADGE(ITEM_P_DOWN_D_UP, GF_PRA12_Chest_PDownDUp); EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 200, 20, 94, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_PRA12_Chest_PDownDUp) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenChest_PDownDUp))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Chest), 200, 20, 94, 0, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_PRA12_Chest_PDownDUp) + Call(AssignScript, Ref(N(EVS_OpenChest_PDownDUp))) + Return + End }; diff --git a/src/world/area_pra/pra_13/pra_13_1_music.c b/src/world/area_pra/pra_13/pra_13_1_music.c index 8f0e0d627d1..5f478201ae4 100644 --- a/src/world/area_pra/pra_13/pra_13_1_music.c +++ b/src/world/area_pra/pra_13/pra_13_1_music.c @@ -1,7 +1,7 @@ #include "pra_13.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + Return + End }; diff --git a/src/world/area_pra/pra_13/pra_13_2_main.c b/src/world/area_pra/pra_13/pra_13_2_main.c index 03bc181ba45..5960015d6e6 100644 --- a/src/world/area_pra/pra_13/pra_13_2_main.c +++ b/src/world/area_pra/pra_13/pra_13_2_main.c @@ -16,104 +16,104 @@ s32 N(BothLeftDoorModelsL)[] = { MODEL_o772, MODEL_o844, MODEL_o859, MODEL_o860, s32 N(BothLeftDoorModelsR)[] = { MODEL_o768, MODEL_o846, MODEL_o861, MODEL_o862, -1 }; EvtScript N(EVS_ExitDoors_pra_02_2) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 20) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothLeftDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(NearLeftDoorModelsR))) - EVT_END_IF - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_02"), pra_02_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, 0) + Set(LVar1, 20) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothLeftDoorModelsL))) + Set(LVar3, Ref(N(BothLeftDoorModelsR))) + Else + Set(LVar2, Ref(N(NearLeftDoorModelsL))) + Set(LVar3, Ref(N(NearLeftDoorModelsR))) + EndIf + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_02"), pra_02_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_pra_14_0) = EVT_EXIT_WALK(60, pra_13_ENTRY_1, "pra_14", pra_14_ENTRY_0); EvtScript N(EVS_Unused_1) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_ExitWalk_pra_14_1) = EVT_EXIT_WALK(60, pra_13_ENTRY_2, "pra_14", pra_14_ENTRY_1); EvtScript N(EVS_Unused_2) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_ExitDoors_pra_02_3) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, 3) - EVT_SET(LVar1, 24) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothLeftDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(FarLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(FarLeftDoorModelsR))) - EVT_END_IF - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_02"), pra_02_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, 3) + Set(LVar1, 24) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothLeftDoorModelsL))) + Set(LVar3, Ref(N(BothLeftDoorModelsR))) + Else + Set(LVar2, Ref(N(FarLeftDoorModelsL))) + Set(LVar3, Ref(N(FarLeftDoorModelsR))) + EndIf + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_02"), pra_02_ENTRY_3) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_02_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_pra_14_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_pra_14_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_02_3)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_pra_02_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_pra_14_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_pra_14_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_02_3)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(pra_13_ENTRY_0) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothLeftDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(NearLeftDoorModelsR))) - EVT_END_IF - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(pra_13_ENTRY_1) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(pra_13_ENTRY_2) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(pra_13_ENTRY_3) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothLeftDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(FarLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(FarLeftDoorModelsR))) - EVT_END_IF - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(pra_13_ENTRY_0) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothLeftDoorModelsL))) + Set(LVar3, Ref(N(BothLeftDoorModelsR))) + Else + Set(LVar2, Ref(N(NearLeftDoorModelsL))) + Set(LVar3, Ref(N(NearLeftDoorModelsR))) + EndIf + ExecWait(BaseEnterDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(pra_13_ENTRY_1) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseEq(pra_13_ENTRY_2) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseEq(pra_13_ENTRY_3) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothLeftDoorModelsL))) + Set(LVar3, Ref(N(BothLeftDoorModelsR))) + Else + Set(LVar2, Ref(N(FarLeftDoorModelsL))) + Set(LVar3, Ref(N(FarLeftDoorModelsR))) + EndIf + ExecWait(BaseEnterDoor) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + Return + End }; BombTrigger N(BombPos_NearWall) = { @@ -127,64 +127,64 @@ BombTrigger N(BombPos_FarWall) = { }; EvtScript N(EVS_BlastWall_Near) = { - EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 0, 50, 34, 1, 10, 30) - EVT_CALL(EnableModel, MODEL_g260, FALSE) - EVT_CALL(EnableModel, MODEL_g265, FALSE) - EVT_CALL(EnableModel, MODEL_o952, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittse, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GF_PRA13_BombedWallA, TRUE) - EVT_SET(GF_PRA_BrokeIllusion, TRUE) - EVT_UNBIND - EVT_RETURN - EVT_END + PlayEffect(EFFECT_BOMBETTE_BREAKING, 0, 50, 34, 1, 10, 30) + Call(EnableModel, MODEL_g260, FALSE) + Call(EnableModel, MODEL_g265, FALSE) + Call(EnableModel, MODEL_o952, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittse, COLLIDER_FLAGS_UPPER_MASK) + Set(GF_PRA13_BombedWallA, TRUE) + Set(GF_PRA_BrokeIllusion, TRUE) + Unbind + Return + End }; EvtScript N(EVS_BlastWall_Far) = { - EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 0, 65, 34, 1, 10, 30) - EVT_CALL(EnableModel, MODEL_g289, FALSE) - EVT_CALL(EnableModel, MODEL_g290, FALSE) - EVT_CALL(EnableModel, MODEL_o1009, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GF_PRA13_BombedWallB, TRUE) - EVT_UNBIND - EVT_RETURN - EVT_END + PlayEffect(EFFECT_BOMBETTE_BREAKING, 0, 65, 34, 1, 10, 30) + Call(EnableModel, MODEL_g289, FALSE) + Call(EnableModel, MODEL_g290, FALSE) + Call(EnableModel, MODEL_o1009, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) + Set(GF_PRA13_BombedWallB, TRUE) + Unbind + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_SET(LVar0, MODEL_o945) - EVT_SET(LVar1, MODEL_o947) - EVT_SET(LVar2, 0) - EVT_EXEC(N(EVS_GlassShimmer)) - EVT_SET(LVar0, REFLECTION_FLOOR_WALL) - EVT_SET(LVar1, GF_PRA_BrokeIllusion) - EVT_EXEC(N(EVS_SetupReflections)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_IF_EQ(GF_PRA13_BombedWallA, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BlastWall_Near)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_NearWall)), 1, 0) - EVT_CALL(EnableModel, MODEL_o952, FALSE) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_g260, FALSE) - EVT_CALL(EnableModel, MODEL_g265, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittse, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_IF_EQ(GF_PRA13_BombedWallB, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BlastWall_Far)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_FarWall)), 1, 0) - EVT_CALL(EnableModel, MODEL_o1009, FALSE) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_g289, FALSE) - EVT_CALL(EnableModel, MODEL_g290, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Set(LVar0, MODEL_o945) + Set(LVar1, MODEL_o947) + Set(LVar2, 0) + Exec(N(EVS_GlassShimmer)) + Set(LVar0, REFLECTION_FLOOR_WALL) + Set(LVar1, GF_PRA_BrokeIllusion) + Exec(N(EVS_SetupReflections)) + Exec(N(EVS_EnterMap)) + Wait(1) + Exec(N(EVS_SetupMusic)) + IfEq(GF_PRA13_BombedWallA, FALSE) + BindTrigger(Ref(N(EVS_BlastWall_Near)), TRIGGER_POINT_BOMB, Ref(N(BombPos_NearWall)), 1, 0) + Call(EnableModel, MODEL_o952, FALSE) + Else + Call(EnableModel, MODEL_g260, FALSE) + Call(EnableModel, MODEL_g265, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittse, COLLIDER_FLAGS_UPPER_MASK) + EndIf + IfEq(GF_PRA13_BombedWallB, FALSE) + BindTrigger(Ref(N(EVS_BlastWall_Far)), TRIGGER_POINT_BOMB, Ref(N(BombPos_FarWall)), 1, 0) + Call(EnableModel, MODEL_o1009, FALSE) + Else + Call(EnableModel, MODEL_g289, FALSE) + Call(EnableModel, MODEL_g290, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Return + End }; diff --git a/src/world/area_pra/pra_13/pra_13_3_npc.c b/src/world/area_pra/pra_13/pra_13_3_npc.c index 5ca635123aa..9860e56ce6e 100644 --- a/src/world/area_pra/pra_13/pra_13_3_npc.c +++ b/src/world/area_pra/pra_13/pra_13_3_npc.c @@ -65,159 +65,159 @@ void N(appendGfx_fake_player)(void* data) { } EvtScript N(EVS_ImposterSpin) = { - EVT_CALL(MakeLerp, 0, 8 * 360, 40, EASING_QUADRATIC_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, LVar4, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeLerp, 0, 8 * 360, 40, EASING_QUADRATIC_OUT) + Label(1) + Call(UpdateLerp) + Call(SetNpcRotation, LVar4, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Return + End }; EvtScript N(EVS_Scene_ImpostersCaught) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, pra_13_ENTRY_2) - EVT_IF_LT(GB_StoryProgress, STORY_CH7_DEFEATED_MIRROR_DUPLIGHOSTS) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(10) - EVT_CALL(SetNpcYaw, NPC_FakeMario, 90) - EVT_THREAD - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(2.0)) - EVT_CALL(PlayerMoveTo, 440, -70, 0) - EVT_END_THREAD - EVT_WAIT(15) - EVT_CALL(GetNpcPos, NPC_FakeMario, LVar0, LVar1, LVar2) - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(5.0), LVar0, LVar1, LVar2, EVT_FLOAT(350.0), EVT_FLOAT(12.0), EVT_FLOAT(-7.0)) - EVT_CALL(SpeakToPlayer, NPC_FakeMario, ANIM_Mario1_Flail, ANIM_Mario1_Flail, 0, MSG_CH7_0139) - EVT_CALL(SpeakToPlayer, NPC_FakeBombette, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_013A) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(6.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_FakeMario, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_FakeMario, NPC_DISPOSE_LOCATION) - EVT_CALL(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Duplighost_01, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_Duplighost_01, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcFlagBits, NPC_Duplighost_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_SET(LVar4, 2) - EVT_CALL(SetNpcYaw, NPC_Duplighost_01, 90) - EVT_EXEC_WAIT(N(EVS_ImposterSpin)) - EVT_CALL(SetNpcAnimation, NPC_Duplighost_01, ANIM_Duplighost_Anim04) - EVT_CALL(SetNpcFlagBits, NPC_Duplighost_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(NpcMoveTo, NPC_Duplighost_01, 430, -70, 15) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_FakeBombette, LVar0, LVar1, LVar2) - EVT_CALL(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_FakeBombette, 389, 0, -61) - EVT_CALL(SetNpcPos, NPC_Duplighost_02, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_Duplighost_02, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcFlagBits, NPC_FakeBombette, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_HAS_NO_SPRITE, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Duplighost_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_SET(LVar4, 3) - EVT_CALL(SetNpcYaw, NPC_Duplighost_02, 90) - EVT_EXEC_WAIT(N(EVS_ImposterSpin)) - EVT_CALL(SetNpcAnimation, NPC_Duplighost_02, ANIM_Duplighost_Anim04) - EVT_CALL(SetNpcFlagBits, NPC_Duplighost_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(NpcMoveTo, NPC_Duplighost_02, 420, -70, 15) - EVT_END_THREAD - EVT_WAIT(35) - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, pra_13_ENTRY_2) + IfLt(GB_StoryProgress, STORY_CH7_DEFEATED_MIRROR_DUPLIGHOSTS) + Call(DisablePlayerInput, TRUE) + Wait(10) + Call(SetNpcYaw, NPC_FakeMario, 90) + Thread + Call(SetPlayerSpeed, Float(2.0)) + Call(PlayerMoveTo, 440, -70, 0) + EndThread + Wait(15) + Call(GetNpcPos, NPC_FakeMario, LVar0, LVar1, LVar2) + Call(SetCamProperties, CAM_DEFAULT, Float(5.0), LVar0, LVar1, LVar2, Float(350.0), Float(12.0), Float(-7.0)) + Call(SpeakToPlayer, NPC_FakeMario, ANIM_Mario1_Flail, ANIM_Mario1_Flail, 0, MSG_CH7_0139) + Call(SpeakToPlayer, NPC_FakeBombette, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH7_013A) + Call(ResetCam, CAM_DEFAULT, Float(6.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Thread + Call(GetNpcPos, NPC_FakeMario, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_FakeMario, NPC_DISPOSE_LOCATION) + Call(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Duplighost_01, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_Duplighost_01, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) + Call(SetNpcFlagBits, NPC_Duplighost_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Set(LVar4, 2) + Call(SetNpcYaw, NPC_Duplighost_01, 90) + ExecWait(N(EVS_ImposterSpin)) + Call(SetNpcAnimation, NPC_Duplighost_01, ANIM_Duplighost_Anim04) + Call(SetNpcFlagBits, NPC_Duplighost_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(NpcMoveTo, NPC_Duplighost_01, 430, -70, 15) + EndThread + Thread + Call(GetNpcPos, NPC_FakeBombette, LVar0, LVar1, LVar2) + Call(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_FakeBombette, 389, 0, -61) + Call(SetNpcPos, NPC_Duplighost_02, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_Duplighost_02, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) + Call(SetNpcFlagBits, NPC_FakeBombette, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_HAS_NO_SPRITE, TRUE) + Call(SetNpcFlagBits, NPC_Duplighost_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Set(LVar4, 3) + Call(SetNpcYaw, NPC_Duplighost_02, 90) + ExecWait(N(EVS_ImposterSpin)) + Call(SetNpcAnimation, NPC_Duplighost_02, ANIM_Duplighost_Anim04) + Call(SetNpcFlagBits, NPC_Duplighost_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(NpcMoveTo, NPC_Duplighost_02, 420, -70, 15) + EndThread + Wait(35) + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + EndIf + EndIf + Return + End }; EvtScript N(EVS_Scene_DefeatImposters) = { - EVT_CALL(SetNpcPos, NPC_Duplighost_01, 400, 0, -70) - EVT_CALL(SetNpcPos, NPC_Duplighost_02, 370, 0, -70) - EVT_CALL(SetNpcAnimation, NPC_Duplighost_01, ANIM_Duplighost_Anim02) - EVT_CALL(SetNpcAnimation, NPC_Duplighost_02, ANIM_Duplighost_Anim02) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(SetNpcPos, NPC_FakeBombette, NPC_DISPOSE_LOCATION) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Duplighost_01, ANIM_Duplighost_Anim05, ANIM_Duplighost_Anim02, 0, MSG_CH7_013B) - EVT_WAIT(10) - EVT_CALL(InterpNpcYaw, NPC_Duplighost_01, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_Duplighost_02, 270, 0) - EVT_WAIT(15) - EVT_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_Duplighost_01, SOUND_DUPLIGHOST_LEAP, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_Duplighost_01, ANIM_Duplighost_Anim04) - EVT_CALL(NpcMoveTo, NPC_Duplighost_01, 0, -70, 45) - EVT_CALL(SetNpcPos, NPC_Duplighost_01, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_Duplighost_02, SOUND_DUPLIGHOST_LEAP, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_Duplighost_02, ANIM_Duplighost_Anim04) - EVT_CALL(NpcMoveTo, NPC_Duplighost_02, -30, -70, 45) - EVT_CALL(SetNpcPos, NPC_Duplighost_02, -30, -1000, 0) - EVT_SET(GB_StoryProgress, STORY_CH7_DEFEATED_MIRROR_DUPLIGHOSTS) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Duplighost_01, 400, 0, -70) + Call(SetNpcPos, NPC_Duplighost_02, 370, 0, -70) + Call(SetNpcAnimation, NPC_Duplighost_01, ANIM_Duplighost_Anim02) + Call(SetNpcAnimation, NPC_Duplighost_02, ANIM_Duplighost_Anim02) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(SetNpcPos, NPC_FakeBombette, NPC_DISPOSE_LOCATION) + Wait(10) + Call(SpeakToPlayer, NPC_Duplighost_01, ANIM_Duplighost_Anim05, ANIM_Duplighost_Anim02, 0, MSG_CH7_013B) + Wait(10) + Call(InterpNpcYaw, NPC_Duplighost_01, 270, 0) + Call(InterpNpcYaw, NPC_Duplighost_02, 270, 0) + Wait(15) + Thread + Call(PlaySoundAtNpc, NPC_Duplighost_01, SOUND_DUPLIGHOST_LEAP, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_Duplighost_01, ANIM_Duplighost_Anim04) + Call(NpcMoveTo, NPC_Duplighost_01, 0, -70, 45) + Call(SetNpcPos, NPC_Duplighost_01, NPC_DISPOSE_LOCATION) + EndThread + Call(PlaySoundAtNpc, NPC_Duplighost_02, SOUND_DUPLIGHOST_LEAP, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_Duplighost_02, ANIM_Duplighost_Anim04) + Call(NpcMoveTo, NPC_Duplighost_02, -30, -70, 45) + Call(SetNpcPos, NPC_Duplighost_02, -30, -1000, 0) + Set(GB_StoryProgress, STORY_CH7_DEFEATED_MIRROR_DUPLIGHOSTS) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + SetGroup(EVT_GROUP_0B) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_FakeMario) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_10000000, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Mario1_Idle) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, pra_13_ENTRY_2) - EVT_IF_LT(GB_StoryProgress, STORY_CH7_DEFEATED_MIRROR_DUPLIGHOSTS) - EVT_CALL(SetNpcPos, NPC_SELF, 375, 0, -59) - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(GF_PRA_BrokeIllusion, TRUE) - EVT_IF_LT(GB_StoryProgress, STORY_CH7_DEFEATED_MIRROR_DUPLIGHOSTS) - EVT_CALL(SetNpcPos, NPC_SELF, 465, 0, -59) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_10000000, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Mario1_Idle) + Call(GetEntryID, LVar0) + IfEq(LVar0, pra_13_ENTRY_2) + IfLt(GB_StoryProgress, STORY_CH7_DEFEATED_MIRROR_DUPLIGHOSTS) + Call(SetNpcPos, NPC_SELF, 375, 0, -59) + EndIf + Else + IfEq(GF_PRA_BrokeIllusion, TRUE) + IfLt(GB_StoryProgress, STORY_CH7_DEFEATED_MIRROR_DUPLIGHOSTS) + Call(SetNpcPos, NPC_SELF, 465, 0, -59) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + EndIf + EndIf + EndIf + Return + End }; EvtScript N(EVS_NpcInit_FakeBombette) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_Scene_ImpostersCaught))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_Scene_DefeatImposters))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_10000000, TRUE) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, pra_13_ENTRY_2) - EVT_IF_LT(GB_StoryProgress, STORY_CH7_DEFEATED_MIRROR_DUPLIGHOSTS) - EVT_CALL(SetNpcPos, NPC_SELF, 345, 0, -59) - EVT_MALLOC_ARRAY(16, LVarA) - EVT_CALL(N(CreateFakePlayerRenderer)) - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(GF_PRA_BrokeIllusion, TRUE) - EVT_IF_LT(GB_StoryProgress, STORY_CH7_DEFEATED_MIRROR_DUPLIGHOSTS) - EVT_CALL(SetNpcPos, NPC_SELF, 435, 0, -59) - EVT_MALLOC_ARRAY(16, LVarA) - EVT_CALL(N(CreateFakePlayerRenderer)) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_Scene_ImpostersCaught))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_Scene_DefeatImposters))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_10000000, TRUE) + Call(GetEntryID, LVar0) + IfEq(LVar0, pra_13_ENTRY_2) + IfLt(GB_StoryProgress, STORY_CH7_DEFEATED_MIRROR_DUPLIGHOSTS) + Call(SetNpcPos, NPC_SELF, 345, 0, -59) + MallocArray(16, LVarA) + Call(N(CreateFakePlayerRenderer)) + EndIf + Else + IfEq(GF_PRA_BrokeIllusion, TRUE) + IfLt(GB_StoryProgress, STORY_CH7_DEFEATED_MIRROR_DUPLIGHOSTS) + Call(SetNpcPos, NPC_SELF, 435, 0, -59) + MallocArray(16, LVarA) + Call(N(CreateFakePlayerRenderer)) + EndIf + EndIf + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Duplighost_01) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_10000000, TRUE) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_10000000, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_Duplighost_02) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_10000000, TRUE) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_10000000, TRUE) + Return + End }; NpcData N(NpcData_FakeMario) = { diff --git a/src/world/area_pra/pra_14/pra_14_1_music.c b/src/world/area_pra/pra_14/pra_14_1_music.c index ee974e28452..76f2ad02208 100644 --- a/src/world/area_pra/pra_14/pra_14_1_music.c +++ b/src/world/area_pra/pra_14/pra_14_1_music.c @@ -1,8 +1,8 @@ #include "pra_14.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Return + End }; diff --git a/src/world/area_pra/pra_14/pra_14_2_main.c b/src/world/area_pra/pra_14/pra_14_2_main.c index cb899e9141f..2fe02899502 100644 --- a/src/world/area_pra/pra_14/pra_14_2_main.c +++ b/src/world/area_pra/pra_14/pra_14_2_main.c @@ -8,17 +8,17 @@ EvtScript N(EVS_ExitWalk_pra_13_1) = EVT_EXIT_WALK(60, pra_14_ENTRY_0, "pra_13", EvtScript N(EVS_ExitWalk_pra_13_2) = EVT_EXIT_WALK(60, pra_14_ENTRY_1, "pra_13", pra_13_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_pra_13_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_pra_13_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_pra_13_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_pra_13_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; BombTrigger N(BombPos_WallA) = { @@ -32,53 +32,53 @@ BombTrigger N(BombPos_WallB) = { }; EvtScript N(EVS_BlastWallA) = { - EVT_CALL(EnableModel, MODEL_g289, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittsw, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GF_PRA13_BombedWallA, TRUE) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_g289, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittsw, COLLIDER_FLAGS_UPPER_MASK) + Set(GF_PRA13_BombedWallA, TRUE) + Unbind + Return + End }; EvtScript N(EVS_BlastWallB) = { - EVT_CALL(EnableModel, MODEL_g260, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittnw, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GF_PRA13_BombedWallB, TRUE) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_g260, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittnw, COLLIDER_FLAGS_UPPER_MASK) + Set(GF_PRA13_BombedWallB, TRUE) + Unbind + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(LVar0, 40) - EVT_SET(LVar1, 40) - EVT_SET(LVar2, TEX_PANNER_0) - EVT_EXEC(N(EVS_GlassShimmer)) - EVT_SET(LVar0, REFLECTION_WALL_ONLY) - EVT_SET(LVar1, TRUE) // always disable reflections in this room - EVT_EXEC(N(EVS_SetupReflections)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_IF_EQ(GF_PRA13_BombedWallA, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BlastWallA)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_WallA)), 1, 0) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_g289, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittsw, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_IF_EQ(GF_PRA13_BombedWallB, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BlastWallB)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_WallB)), 1, 0) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_g260, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittnw, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Set(LVar0, 40) + Set(LVar1, 40) + Set(LVar2, TEX_PANNER_0) + Exec(N(EVS_GlassShimmer)) + Set(LVar0, REFLECTION_WALL_ONLY) + Set(LVar1, TRUE) // always disable reflections in this room + Exec(N(EVS_SetupReflections)) + Exec(N(EVS_EnterMap)) + Wait(1) + IfEq(GF_PRA13_BombedWallA, FALSE) + BindTrigger(Ref(N(EVS_BlastWallA)), TRIGGER_POINT_BOMB, Ref(N(BombPos_WallA)), 1, 0) + Else + Call(EnableModel, MODEL_g289, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittsw, COLLIDER_FLAGS_UPPER_MASK) + EndIf + IfEq(GF_PRA13_BombedWallB, FALSE) + BindTrigger(Ref(N(EVS_BlastWallB)), TRIGGER_POINT_BOMB, Ref(N(BombPos_WallB)), 1, 0) + Else + Call(EnableModel, MODEL_g260, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittnw, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Return + End }; diff --git a/src/world/area_pra/pra_14/pra_14_3_entity.c b/src/world/area_pra/pra_14/pra_14_3_entity.c index 716882f2219..d4494892ac4 100644 --- a/src/world/area_pra/pra_14/pra_14_3_entity.c +++ b/src/world/area_pra/pra_14/pra_14_3_entity.c @@ -4,10 +4,10 @@ #include "world/common/entity/Chest.inc.c" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), 445, 60, 80, 0, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_PRA14_MultiCoinBrickA) - EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), 445, 60, -80, 0, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_PRA14_MultiCoinBrickB) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_MulticoinBlock), 445, 60, 80, 0, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_PRA14_MultiCoinBrickA) + Call(MakeEntity, Ref(Entity_MulticoinBlock), 445, 60, -80, 0, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_PRA14_MultiCoinBrickB) + Return + End }; diff --git a/src/world/area_pra/pra_15/pra_15_1_music.c b/src/world/area_pra/pra_15/pra_15_1_music.c index a7a78200043..0ab09f24a4f 100644 --- a/src/world/area_pra/pra_15/pra_15_1_music.c +++ b/src/world/area_pra/pra_15/pra_15_1_music.c @@ -1,8 +1,8 @@ #include "pra_15.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_SHIVER_MOUNTAIN, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_SHIVER_MOUNTAIN, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Return + End }; diff --git a/src/world/area_pra/pra_15/pra_15_2_main.c b/src/world/area_pra/pra_15/pra_15_2_main.c index 494e494b7e0..1ac6ee29802 100644 --- a/src/world/area_pra/pra_15/pra_15_2_main.c +++ b/src/world/area_pra/pra_15/pra_15_2_main.c @@ -8,33 +8,33 @@ API_CALLABLE(N(DisableTotalFloorReflections)) { EvtScript N(EVS_ExitWalk_pra_01_3) = EVT_EXIT_WALK(60, pra_15_ENTRY_0, "pra_01", pra_01_ENTRY_3); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_pra_01_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_pra_01_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(pra_15_ENTRY_0) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(pra_15_ENTRY_0) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1298, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilie, SURFACE_TYPE_SNOW) - EVT_CALL(N(DisableTotalFloorReflections)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1298, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilie, SURFACE_TYPE_SNOW) + Call(N(DisableTotalFloorReflections)) + Exec(N(EVS_EnterMap)) + Wait(1) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_pra/pra_15/pra_15_3_entity.c b/src/world/area_pra/pra_15/pra_15_3_entity.c index 01768793236..020e76eba22 100644 --- a/src/world/area_pra/pra_15/pra_15_3_entity.c +++ b/src/world/area_pra/pra_15/pra_15_3_entity.c @@ -1,7 +1,7 @@ #include "pra_15.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 395, -60, 120, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_PRA15_Item_StarPiece) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_STAR_PIECE, 395, -60, 120, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_PRA15_Item_StarPiece) + Return + End }; diff --git a/src/world/area_pra/pra_16/pra_16_1_music.c b/src/world/area_pra/pra_16/pra_16_1_music.c index c62875db85f..3b9dcdefd28 100644 --- a/src/world/area_pra/pra_16/pra_16_1_music.c +++ b/src/world/area_pra/pra_16/pra_16_1_music.c @@ -1,7 +1,7 @@ #include "pra_16.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + Return + End }; diff --git a/src/world/area_pra/pra_16/pra_16_2_main.c b/src/world/area_pra/pra_16/pra_16_2_main.c index 65917c628cf..cacf8cfdb84 100644 --- a/src/world/area_pra/pra_16/pra_16_2_main.c +++ b/src/world/area_pra/pra_16/pra_16_2_main.c @@ -21,161 +21,161 @@ s32 N(BothLeftDoorModelsL)[] = { MODEL_o874, MODEL_o875, MODEL_o880, MODEL_o881, s32 N(BothLeftDoorModelsR)[] = { MODEL_o876, MODEL_o877, MODEL_o878, MODEL_o879, -1 }; EvtScript N(EVS_ExitDoors_pra_02_2) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, pra_16_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittsw) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothRightDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(NearRightDoorModelsR))) - EVT_END_IF - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_02"), pra_02_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, pra_16_ENTRY_0) + Set(LVar1, COLLIDER_deilittsw) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothRightDoorModelsL))) + Set(LVar3, Ref(N(BothRightDoorModelsR))) + Else + Set(LVar2, Ref(N(NearRightDoorModelsL))) + Set(LVar3, Ref(N(NearRightDoorModelsR))) + EndIf + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_02"), pra_02_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_18_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, pra_16_ENTRY_1) - EVT_SET(LVar1, COLLIDER_deilittse) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothLeftDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(NearLeftDoorModelsR))) - EVT_END_IF - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_18"), pra_18_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, pra_16_ENTRY_1) + Set(LVar1, COLLIDER_deilittse) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothLeftDoorModelsL))) + Set(LVar3, Ref(N(BothLeftDoorModelsR))) + Else + Set(LVar2, Ref(N(NearLeftDoorModelsL))) + Set(LVar3, Ref(N(NearLeftDoorModelsR))) + EndIf + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_18"), pra_18_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_18_2) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SET(LVar0, pra_16_ENTRY_2) - EVT_SET(LVar1, COLLIDER_deilittne) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothLeftDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(FarLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(FarLeftDoorModelsR))) - EVT_END_IF - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_18"), pra_18_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Set(LVar0, pra_16_ENTRY_2) + Set(LVar1, COLLIDER_deilittne) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothLeftDoorModelsL))) + Set(LVar3, Ref(N(BothLeftDoorModelsR))) + Else + Set(LVar2, Ref(N(FarLeftDoorModelsL))) + Set(LVar3, Ref(N(FarLeftDoorModelsR))) + EndIf + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_18"), pra_18_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_02_3) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_SET(LVar0, pra_16_ENTRY_3) - EVT_SET(LVar1, COLLIDER_deilittnw) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothRightDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(FarRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(FarRightDoorModelsR))) - EVT_END_IF - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_02"), pra_02_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + Set(LVar0, pra_16_ENTRY_3) + Set(LVar1, COLLIDER_deilittnw) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothRightDoorModelsL))) + Set(LVar3, Ref(N(BothRightDoorModelsR))) + Else + Set(LVar2, Ref(N(FarRightDoorModelsL))) + Set(LVar3, Ref(N(FarRightDoorModelsR))) + EndIf + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_02"), pra_02_ENTRY_3) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_02_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_18_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_18_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_02_3)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_pra_02_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_18_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_18_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_02_3)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(pra_16_ENTRY_0) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothRightDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(NearRightDoorModelsR))) - EVT_END_IF - EVT_CASE_EQ(pra_16_ENTRY_1) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothLeftDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(NearLeftDoorModelsR))) - EVT_END_IF - EVT_CASE_EQ(pra_16_ENTRY_2) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothLeftDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(FarLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(FarLeftDoorModelsR))) - EVT_END_IF - EVT_CASE_EQ(pra_16_ENTRY_3) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothRightDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(FarRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(FarRightDoorModelsR))) - EVT_END_IF - EVT_END_SWITCH - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(pra_16_ENTRY_0) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothRightDoorModelsL))) + Set(LVar3, Ref(N(BothRightDoorModelsR))) + Else + Set(LVar2, Ref(N(NearRightDoorModelsL))) + Set(LVar3, Ref(N(NearRightDoorModelsR))) + EndIf + CaseEq(pra_16_ENTRY_1) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothLeftDoorModelsL))) + Set(LVar3, Ref(N(BothLeftDoorModelsR))) + Else + Set(LVar2, Ref(N(NearLeftDoorModelsL))) + Set(LVar3, Ref(N(NearLeftDoorModelsR))) + EndIf + CaseEq(pra_16_ENTRY_2) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothLeftDoorModelsL))) + Set(LVar3, Ref(N(BothLeftDoorModelsR))) + Else + Set(LVar2, Ref(N(FarLeftDoorModelsL))) + Set(LVar3, Ref(N(FarLeftDoorModelsR))) + EndIf + CaseEq(pra_16_ENTRY_3) + Call(UseDoorSounds, DOOR_SOUNDS_CREAKY) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothRightDoorModelsL))) + Set(LVar3, Ref(N(BothRightDoorModelsR))) + Else + Set(LVar2, Ref(N(FarRightDoorModelsL))) + Set(LVar3, Ref(N(FarRightDoorModelsR))) + EndIf + EndSwitch + ExecWait(BaseEnterDoor) + Exec(N(EVS_BindExitTriggers)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(LVar0, MODEL_o945) - EVT_SET(LVar1, MODEL_o947) - EVT_SET(LVar2, TEX_PANNER_0) - EVT_EXEC(N(EVS_GlassShimmer)) - EVT_SET(LVar0, REFLECTION_FLOOR_WALL) - EVT_SET(LVar1, GF_PRA_BrokeIllusion) - EVT_EXEC(N(EVS_SetupReflections)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Exec(N(EVS_SetupMusic)) + Set(LVar0, MODEL_o945) + Set(LVar1, MODEL_o947) + Set(LVar2, TEX_PANNER_0) + Exec(N(EVS_GlassShimmer)) + Set(LVar0, REFLECTION_FLOOR_WALL) + Set(LVar1, GF_PRA_BrokeIllusion) + Exec(N(EVS_SetupReflections)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_pra/pra_18/pra_18_1_music.c b/src/world/area_pra/pra_18/pra_18_1_music.c index a050c1951e1..bcb92ea2531 100644 --- a/src/world/area_pra/pra_18/pra_18_1_music.c +++ b/src/world/area_pra/pra_18/pra_18_1_music.c @@ -1,8 +1,8 @@ #include "pra_18.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Return + End }; diff --git a/src/world/area_pra/pra_18/pra_18_2_main.c b/src/world/area_pra/pra_18/pra_18_2_main.c index e5b813b3b9f..e7088d6f396 100644 --- a/src/world/area_pra/pra_18/pra_18_2_main.c +++ b/src/world/area_pra/pra_18/pra_18_2_main.c @@ -16,129 +16,129 @@ s32 N(LeftDoorModelsL)[] = { MODEL_o995, MODEL_o996, -1 }; s32 N(LeftDoorModelsR)[] = { MODEL_o997, MODEL_o998, -1 }; EvtScript N(EVS_ExitDoors_pra_16_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_18_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittsw) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothRightDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(NearRightDoorModelsR))) - EVT_END_IF - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_16"), pra_16_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_18_ENTRY_0) + Set(LVar1, COLLIDER_deilittsw) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothRightDoorModelsL))) + Set(LVar3, Ref(N(BothRightDoorModelsR))) + Else + Set(LVar2, Ref(N(NearRightDoorModelsL))) + Set(LVar3, Ref(N(NearRightDoorModelsR))) + EndIf + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_16"), pra_16_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_33_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_18_ENTRY_1) - EVT_SET(LVar1, COLLIDER_deilittne) - EVT_SET(LVar2, EVT_PTR(N(LeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(LeftDoorModelsR))) - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_33"), pra_33_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_18_ENTRY_1) + Set(LVar1, COLLIDER_deilittne) + Set(LVar2, Ref(N(LeftDoorModelsL))) + Set(LVar3, Ref(N(LeftDoorModelsR))) + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_33"), pra_33_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_16_2) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_18_ENTRY_2) - EVT_SET(LVar1, COLLIDER_deilittnw) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothRightDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(FarRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(FarRightDoorModelsR))) - EVT_END_IF - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_16"), pra_16_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_18_ENTRY_2) + Set(LVar1, COLLIDER_deilittnw) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothRightDoorModelsL))) + Set(LVar3, Ref(N(BothRightDoorModelsR))) + Else + Set(LVar2, Ref(N(FarRightDoorModelsL))) + Set(LVar3, Ref(N(FarRightDoorModelsR))) + EndIf + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_16"), pra_16_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_16_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) - EVT_IF_GE(GB_StoryProgress, STORY_CH7_DEFEATED_CLUBBAS) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_33_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_16_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_pra_16_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) + IfGe(GB_StoryProgress, STORY_CH7_DEFEATED_CLUBBAS) + BindTrigger(Ref(N(EVS_ExitDoors_pra_33_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) + EndIf + BindTrigger(Ref(N(EVS_ExitDoors_pra_16_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(pra_18_ENTRY_0) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothRightDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(NearRightDoorModelsR))) - EVT_END_IF - EVT_CASE_EQ(pra_18_ENTRY_1) - EVT_SET(LVar2, EVT_PTR(N(LeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(LeftDoorModelsR))) - EVT_CASE_EQ(pra_18_ENTRY_2) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothRightDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(FarRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(FarRightDoorModelsR))) - EVT_END_IF - EVT_END_SWITCH - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(pra_18_ENTRY_0) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothRightDoorModelsL))) + Set(LVar3, Ref(N(BothRightDoorModelsR))) + Else + Set(LVar2, Ref(N(NearRightDoorModelsL))) + Set(LVar3, Ref(N(NearRightDoorModelsR))) + EndIf + CaseEq(pra_18_ENTRY_1) + Set(LVar2, Ref(N(LeftDoorModelsL))) + Set(LVar3, Ref(N(LeftDoorModelsR))) + CaseEq(pra_18_ENTRY_2) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothRightDoorModelsL))) + Set(LVar3, Ref(N(BothRightDoorModelsR))) + Else + Set(LVar2, Ref(N(FarRightDoorModelsL))) + Set(LVar3, Ref(N(FarRightDoorModelsR))) + EndIf + EndSwitch + ExecWait(BaseEnterDoor) + Exec(N(EVS_BindExitTriggers)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH7_DEFEATED_CLUBBAS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1174, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetGroupVisibility, MODEL_g298, MODEL_GROUP_HIDDEN) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1175, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetGroupVisibility, MODEL_g296, MODEL_GROUP_HIDDEN) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1176, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetGroupVisibility, MODEL_g297, MODEL_GROUP_HIDDEN) - EVT_ELSE - EVT_SWITCH(GB_PRA18_ClubbasDefeated) - EVT_CASE_EQ(1) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1176, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetGroupVisibility, MODEL_g297, MODEL_GROUP_HIDDEN) - EVT_CASE_EQ(2) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1175, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetGroupVisibility, MODEL_g296, MODEL_GROUP_HIDDEN) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1176, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetGroupVisibility, MODEL_g297, MODEL_GROUP_HIDDEN) - EVT_END_SWITCH - EVT_END_IF - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Exec(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH7_DEFEATED_CLUBBAS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1174, COLLIDER_FLAGS_UPPER_MASK) + Call(SetGroupVisibility, MODEL_g298, MODEL_GROUP_HIDDEN) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1175, COLLIDER_FLAGS_UPPER_MASK) + Call(SetGroupVisibility, MODEL_g296, MODEL_GROUP_HIDDEN) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1176, COLLIDER_FLAGS_UPPER_MASK) + Call(SetGroupVisibility, MODEL_g297, MODEL_GROUP_HIDDEN) + Else + Switch(GB_PRA18_ClubbasDefeated) + CaseEq(1) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1176, COLLIDER_FLAGS_UPPER_MASK) + Call(SetGroupVisibility, MODEL_g297, MODEL_GROUP_HIDDEN) + CaseEq(2) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1175, COLLIDER_FLAGS_UPPER_MASK) + Call(SetGroupVisibility, MODEL_g296, MODEL_GROUP_HIDDEN) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1176, COLLIDER_FLAGS_UPPER_MASK) + Call(SetGroupVisibility, MODEL_g297, MODEL_GROUP_HIDDEN) + EndSwitch + EndIf + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_pra/pra_18/pra_18_3_npc.c b/src/world/area_pra/pra_18/pra_18_3_npc.c index 034a0d07c01..d173de410f1 100644 --- a/src/world/area_pra/pra_18/pra_18_3_npc.c +++ b/src/world/area_pra/pra_18/pra_18_3_npc.c @@ -12,324 +12,324 @@ NpcSettings N(NpcSettings_Clubba) = { }; EvtScript N(EVS_NpcInteract_Clubba_01) = { - EVT_CALL(SetSelfVar, 0, 1) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 1) + Return + End }; EvtScript N(EVS_NpcInteract_Clubba_02) = { - EVT_CALL(SetSelfVar, 0, 1) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 1) + Return + End }; EvtScript N(EVS_NpcInteract_Clubba_03) = { - EVT_CALL(SetSelfVar, 0, 1) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 1) + Return + End }; EvtScript N(EVS_NpcHit_Clubba_01) = { - EVT_CALL(SetSelfVar, 0, 2) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 2) + Return + End }; EvtScript N(EVS_NpcHit_Clubba_02) = { - EVT_CALL(SetSelfVar, 0, 2) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 2) + Return + End }; EvtScript N(EVS_NpcHit_Clubba_03) = { - EVT_CALL(SetSelfVar, 0, 2) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 2) + Return + End }; EvtScript N(EVS_NpcHit_Clubba_01_Aux) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcHit_Clubba_02_Aux) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcHit_Clubba_03_Aux) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcIdle_Clubba_01) = { - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_CALL(IsPlayerWithin, LVar3, LVar5, 80, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_IF_NE(LVar0, 2) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldClubba_Frost_Anim05, ANIM_WorldClubba_Frost_Anim02, 0, MSG_CH7_0150) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_RETURN - EVT_END + Loop(0) + Wait(1) + Call(GetSelfVar, 0, LVar0) + IfNe(LVar0, 0) + BreakLoop + EndIf + Call(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + Call(IsPlayerWithin, LVar3, LVar5, 80, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + EndLoop + IfNe(LVar0, 2) + Call(DisablePlayerInput, TRUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldClubba_Frost_Anim05, ANIM_WorldClubba_Frost_Anim02, 0, MSG_CH7_0150) + Call(DisablePlayerInput, FALSE) + EndIf + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Return + End }; EvtScript N(EVS_NpcIdle_Clubba_02) = { - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_CALL(IsPlayerWithin, LVar3, LVar5, 80, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_IF_NE(LVar0, 2) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldClubba_Frost_Anim05, ANIM_WorldClubba_Frost_Anim02, 0, MSG_CH7_0151) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_RETURN - EVT_END + Loop(0) + Wait(1) + Call(GetSelfVar, 0, LVar0) + IfNe(LVar0, 0) + BreakLoop + EndIf + Call(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + Call(IsPlayerWithin, LVar3, LVar5, 80, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + EndLoop + IfNe(LVar0, 2) + Call(DisablePlayerInput, TRUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldClubba_Frost_Anim05, ANIM_WorldClubba_Frost_Anim02, 0, MSG_CH7_0151) + Call(DisablePlayerInput, FALSE) + EndIf + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Return + End }; EvtScript N(EVS_NpcIdle_Clubba_03) = { - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_CALL(IsPlayerWithin, LVar3, LVar5, 80, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 2) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldClubba_Frost_Anim05, ANIM_WorldClubba_Frost_Anim02, 0, MSG_CH7_0152) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_RETURN - EVT_END + Loop(0) + Wait(1) + Call(GetSelfVar, 0, LVar0) + IfNe(LVar0, 0) + BreakLoop + EndIf + Call(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + Call(IsPlayerWithin, LVar3, LVar5, 80, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + EndLoop + Call(GetSelfVar, 0, LVar0) + IfNe(LVar0, 2) + Call(DisablePlayerInput, TRUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldClubba_Frost_Anim05, ANIM_WorldClubba_Frost_Anim02, 0, MSG_CH7_0152) + Call(DisablePlayerInput, FALSE) + EndIf + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Return + End }; EvtScript N(EVS_PlayClubbaDefeatFX) = { - EVT_WAIT(20) - EVT_LOOP(4) - EVT_SET(LVar0, LVarA) - EVT_SET(LVar1, LVarB) - EVT_SET(LVar2, LVarC) - EVT_CALL(RandInt, 50, LVar3) - EVT_CALL(RandInt, 50, LVar4) - EVT_ADD(LVar0, -15) - EVT_ADD(LVar0, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_PLAY_EFFECT(EFFECT_FIREWORK, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.8), 0) - EVT_CALL(PlaySoundAt, SOUND_SEQ_BULLET_BILL_EXPLODE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(2) - EVT_SET(LVar0, LVarA) - EVT_SET(LVar1, LVarB) - EVT_SET(LVar2, LVarC) - EVT_CALL(RandInt, 50, LVar3) - EVT_CALL(RandInt, 50, LVar4) - EVT_ADD(LVar0, -15) - EVT_ADD(LVar0, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_PLAY_EFFECT(EFFECT_FIREWORK, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.8), 0) - EVT_CALL(PlaySoundAt, SOUND_SEQ_BULLET_BILL_EXPLODE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(8) - EVT_END_LOOP - EVT_RETURN - EVT_END + Wait(20) + Loop(4) + Set(LVar0, LVarA) + Set(LVar1, LVarB) + Set(LVar2, LVarC) + Call(RandInt, 50, LVar3) + Call(RandInt, 50, LVar4) + Add(LVar0, -15) + Add(LVar0, LVar3) + Add(LVar1, LVar4) + PlayEffect(EFFECT_FIREWORK, 0, LVar0, LVar1, LVar2, Float(0.8), 0) + Call(PlaySoundAt, SOUND_SEQ_BULLET_BILL_EXPLODE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Wait(2) + Set(LVar0, LVarA) + Set(LVar1, LVarB) + Set(LVar2, LVarC) + Call(RandInt, 50, LVar3) + Call(RandInt, 50, LVar4) + Add(LVar0, -15) + Add(LVar0, LVar3) + Add(LVar1, LVar4) + PlayEffect(EFFECT_FIREWORK, 0, LVar0, LVar1, LVar2, Float(0.8), 0) + Call(PlaySoundAt, SOUND_SEQ_BULLET_BILL_EXPLODE, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Wait(8) + EndLoop + Return + End }; EvtScript N(EVS_NpcDefeat_Clubba_01) = { - EVT_THREAD - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(50) - EVT_LOOP(10) - EVT_WAIT(2) - EVT_CALL(SetGroupVisibility, MODEL_g297, MODEL_GROUP_VISIBLE) - EVT_WAIT(2) - EVT_CALL(SetGroupVisibility, MODEL_g297, MODEL_GROUP_HIDDEN) - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1176, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GB_PRA18_ClubbasDefeated, 1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(30) - EVT_SET(LVarA, 270) - EVT_SET(LVarB, 20) - EVT_SET(LVarC, -75) - EVT_EXEC(N(EVS_PlayClubbaDefeatFX)) - EVT_END_THREAD - EVT_CALL(DoNpcDefeat) - EVT_RETURN - EVT_END + Thread + Call(DisablePlayerInput, TRUE) + Wait(50) + Loop(10) + Wait(2) + Call(SetGroupVisibility, MODEL_g297, MODEL_GROUP_VISIBLE) + Wait(2) + Call(SetGroupVisibility, MODEL_g297, MODEL_GROUP_HIDDEN) + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1176, COLLIDER_FLAGS_UPPER_MASK) + Set(GB_PRA18_ClubbasDefeated, 1) + Call(DisablePlayerInput, FALSE) + EndThread + Thread + Wait(30) + Set(LVarA, 270) + Set(LVarB, 20) + Set(LVarC, -75) + Exec(N(EVS_PlayClubbaDefeatFX)) + EndThread + Call(DoNpcDefeat) + Return + End }; EvtScript N(EVS_NpcDefeat_Clubba_02) = { - EVT_THREAD - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(50) - EVT_LOOP(10) - EVT_WAIT(2) - EVT_CALL(SetGroupVisibility, MODEL_g296, MODEL_GROUP_VISIBLE) - EVT_WAIT(2) - EVT_CALL(SetGroupVisibility, MODEL_g296, MODEL_GROUP_HIDDEN) - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1175, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GB_PRA18_ClubbasDefeated, 2) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(30) - EVT_SET(LVarA, 480) - EVT_SET(LVarB, 20) - EVT_SET(LVarC, -75) - EVT_EXEC(N(EVS_PlayClubbaDefeatFX)) - EVT_END_THREAD - EVT_CALL(DoNpcDefeat) - EVT_RETURN - EVT_END + Thread + Call(DisablePlayerInput, TRUE) + Wait(50) + Loop(10) + Wait(2) + Call(SetGroupVisibility, MODEL_g296, MODEL_GROUP_VISIBLE) + Wait(2) + Call(SetGroupVisibility, MODEL_g296, MODEL_GROUP_HIDDEN) + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1175, COLLIDER_FLAGS_UPPER_MASK) + Set(GB_PRA18_ClubbasDefeated, 2) + Call(DisablePlayerInput, FALSE) + EndThread + Thread + Wait(30) + Set(LVarA, 480) + Set(LVarB, 20) + Set(LVarC, -75) + Exec(N(EVS_PlayClubbaDefeatFX)) + EndThread + Call(DoNpcDefeat) + Return + End }; EvtScript N(EVS_NpcDefeat_Clubba_03) = { - EVT_THREAD - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(50) - EVT_LOOP(10) - EVT_WAIT(2) - EVT_CALL(SetGroupVisibility, MODEL_g298, MODEL_GROUP_VISIBLE) - EVT_WAIT(2) - EVT_CALL(SetGroupVisibility, MODEL_g298, MODEL_GROUP_HIDDEN) - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1174, COLLIDER_FLAGS_UPPER_MASK) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_33_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) - EVT_SET(GB_StoryProgress, STORY_CH7_DEFEATED_CLUBBAS) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(30) - EVT_SET(LVarA, 725) - EVT_SET(LVarB, 20) - EVT_SET(LVarC, -75) - EVT_EXEC(N(EVS_PlayClubbaDefeatFX)) - EVT_END_THREAD - EVT_CALL(DoNpcDefeat) - EVT_RETURN - EVT_END + Thread + Call(DisablePlayerInput, TRUE) + Wait(50) + Loop(10) + Wait(2) + Call(SetGroupVisibility, MODEL_g298, MODEL_GROUP_VISIBLE) + Wait(2) + Call(SetGroupVisibility, MODEL_g298, MODEL_GROUP_HIDDEN) + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1174, COLLIDER_FLAGS_UPPER_MASK) + BindTrigger(Ref(N(EVS_ExitDoors_pra_33_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) + Set(GB_StoryProgress, STORY_CH7_DEFEATED_CLUBBAS) + Call(DisablePlayerInput, FALSE) + EndThread + Thread + Wait(30) + Set(LVarA, 725) + Set(LVarB, 20) + Set(LVarC, -75) + Exec(N(EVS_PlayClubbaDefeatFX)) + EndThread + Call(DoNpcDefeat) + Return + End }; EvtScript N(EVS_NpcInit_Clubba_01) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH7_DEFEATED_CLUBBAS) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_IF_GE(GB_PRA18_ClubbasDefeated, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Clubba_01))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Clubba_01))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Clubba_01))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_Clubba_01))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_10000000, TRUE) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH7_DEFEATED_CLUBBAS) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + IfGe(GB_PRA18_ClubbasDefeated, 1) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Clubba_01))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Clubba_01))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Clubba_01))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_Clubba_01))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_10000000, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_Clubba_02) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH7_DEFEATED_CLUBBAS) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_IF_GE(GB_PRA18_ClubbasDefeated, 2) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Clubba_02))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Clubba_02))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Clubba_02))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_Clubba_02))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_10000000, TRUE) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH7_DEFEATED_CLUBBAS) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + IfGe(GB_PRA18_ClubbasDefeated, 2) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Clubba_02))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Clubba_02))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Clubba_02))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_Clubba_02))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_10000000, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_Clubba_03) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH7_DEFEATED_CLUBBAS) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Clubba_03))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Clubba_03))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Clubba_03))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_Clubba_03))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_10000000, TRUE) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH7_DEFEATED_CLUBBAS) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Clubba_03))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Clubba_03))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Clubba_03))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_Clubba_03))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_10000000, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_Clubba_01_Aux) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH7_DEFEATED_CLUBBAS) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_IF_GE(GB_PRA18_ClubbasDefeated, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_10000000, TRUE) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_Clubba_01_Aux))) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH7_DEFEATED_CLUBBAS) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + IfGe(GB_PRA18_ClubbasDefeated, 1) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_10000000, TRUE) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_Clubba_01_Aux))) + Return + End }; EvtScript N(EVS_NpcInit_Clubba_02_Aux) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH7_DEFEATED_CLUBBAS) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_IF_GE(GB_PRA18_ClubbasDefeated, 2) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_10000000, TRUE) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_Clubba_02_Aux))) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH7_DEFEATED_CLUBBAS) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + IfGe(GB_PRA18_ClubbasDefeated, 2) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_10000000, TRUE) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_Clubba_02_Aux))) + Return + End }; EvtScript N(EVS_NpcInit_Clubba_03_Aux) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH7_DEFEATED_CLUBBAS) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_10000000, TRUE) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_Clubba_03_Aux))) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH7_DEFEATED_CLUBBAS) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_10000000, TRUE) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_Clubba_03_Aux))) + Return + End }; #if VERSION_PAL diff --git a/src/world/area_pra/pra_19/pra_19_1_music.c b/src/world/area_pra/pra_19/pra_19_1_music.c index 1f3cc9c6ef3..49d305f7427 100644 --- a/src/world/area_pra/pra_19/pra_19_1_music.c +++ b/src/world/area_pra/pra_19/pra_19_1_music.c @@ -1,8 +1,8 @@ #include "pra_19.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Return + End }; diff --git a/src/world/area_pra/pra_19/pra_19_2_main.c b/src/world/area_pra/pra_19/pra_19_2_main.c index 1e308f9abb4..042b572b068 100644 --- a/src/world/area_pra/pra_19/pra_19_2_main.c +++ b/src/world/area_pra/pra_19/pra_19_2_main.c @@ -8,71 +8,71 @@ s32 N(DoorModelsL)[] = { MODEL_o772, MODEL_o844, -1 }; s32 N(DoorModelsR)[] = { MODEL_o768, MODEL_o846, -1 }; EvtScript N(EVS_ExitDoor_pra_35_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_19_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittsw) - EVT_SET(LVar2, EVT_PTR(N(DoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(DoorModelsR))) - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_35"), pra_35_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_19_ENTRY_0) + Set(LVar1, COLLIDER_deilittsw) + Set(LVar2, Ref(N(DoorModelsL))) + Set(LVar3, Ref(N(DoorModelsR))) + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_35"), pra_35_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_pra_20_0) = EVT_EXIT_WALK(60, pra_19_ENTRY_1, "pra_20", pra_20_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_pra_35_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) - EVT_IF_GE(GB_StoryProgress, STORY_CH7_DEFEATED_KOOPER_DUPLIGHOSTS) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_pra_20_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) - EVT_END_IF - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoor_pra_35_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) + IfGe(GB_StoryProgress, STORY_CH7_DEFEATED_KOOPER_DUPLIGHOSTS) + BindTrigger(Ref(N(EVS_ExitWalk_pra_20_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) + EndIf + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(pra_19_ENTRY_0) - EVT_SET(LVar2, EVT_PTR(N(DoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(DoorModelsR))) - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(pra_19_ENTRY_1) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(pra_19_ENTRY_0) + Set(LVar2, Ref(N(DoorModelsL))) + Set(LVar3, Ref(N(DoorModelsR))) + ExecWait(BaseEnterDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(pra_19_ENTRY_1) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH7_DEFEATED_KOOPER_DUPLIGHOSTS) - EVT_CALL(EnableModel, MODEL_o1024, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1054, COLLIDER_FLAGS_UPPER_MASK) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_o1026, FALSE) - EVT_END_IF - EVT_SET(LVar0, MODEL_o945) - EVT_SET(LVar1, MODEL_o947) - EVT_SET(LVar2, TEX_PANNER_0) - EVT_EXEC(N(EVS_GlassShimmer)) - EVT_SET(LVar0, REFLECTION_FLOOR_WALL) - EVT_SET(LVar1, TRUE) // disable reflections in this room - EVT_EXEC(N(EVS_SetupReflections)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Exec(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH7_DEFEATED_KOOPER_DUPLIGHOSTS) + Call(EnableModel, MODEL_o1024, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1054, COLLIDER_FLAGS_UPPER_MASK) + Else + Call(EnableModel, MODEL_o1026, FALSE) + EndIf + Set(LVar0, MODEL_o945) + Set(LVar1, MODEL_o947) + Set(LVar2, TEX_PANNER_0) + Exec(N(EVS_GlassShimmer)) + Set(LVar0, REFLECTION_FLOOR_WALL) + Set(LVar1, TRUE) // disable reflections in this room + Exec(N(EVS_SetupReflections)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_pra/pra_19/pra_19_3_npc.c b/src/world/area_pra/pra_19/pra_19_3_npc.c index ccae33a2e87..6a2f6f52bcc 100644 --- a/src/world/area_pra/pra_19/pra_19_3_npc.c +++ b/src/world/area_pra/pra_19/pra_19_3_npc.c @@ -206,797 +206,797 @@ API_CALLABLE(N(UpdateExampleKooperMotion)) { } EvtScript N(EVS_FocusCam_OnPosition) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, LVarA) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(12.0), EVT_FLOAT(-5.5)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(500.0), EVT_FLOAT(20.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, LVarA) + Call(SetCamDistance, CAM_DEFAULT, Float(350.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(12.0), Float(-5.5)) + Call(SetCamPosB, CAM_DEFAULT, Float(500.0), Float(20.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_FocusCam_StartBattle) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(6.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(500.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(386.0), EVT_FLOAT(20.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(6.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(500.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(386.0), Float(20.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Return + End }; EvtScript N(EVS_FocusCam_OnPlayer) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, 386) - EVT_SET(LVar0, 386) - EVT_END_IF - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(6.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(500.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(500.0), EVT_FLOAT(20.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar0, 386) + Set(LVar0, 386) + EndIf + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(6.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(500.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(500.0), Float(20.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Return + End }; EvtScript N(EVS_Imposter_Unmask) = { - EVT_CALL(N(ChangeNpcCollisionRadius)) - EVT_CALL(SetNpcFlagBits, LVar3, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SpeakToPlayer, LVar3, LVar6, LVar7, 0, LVar5) - EVT_CALL(GetNpcPos, LVar3, LVar0, LVar1, LVar2) - EVT_CALL(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, LVar3, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, LVar3, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcPos, LVar4, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, LVar4, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 8 * 360, 40, EASING_QUADRATIC_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, LVar4, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(EndSpeech, LVar4, ANIM_Duplighost_Anim05, ANIM_Duplighost_Anim02, 0) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnPlayer)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_THREAD - EVT_CALL(SetNpcAnimation, LVar4, ANIM_Duplighost_Anim04) - EVT_CALL(InterpNpcYaw, LVar4, 90, 0) - EVT_CALL(SetNpcSpeed, LVar4, EVT_FLOAT(6.5)) - EVT_CALL(PlaySoundAtNpc, LVar4, SOUND_DUPLIGHOST_LEAP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcMoveTo, LVar4, 0, LVar2, 0) - EVT_CALL(SetNpcPos, LVar4, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_WAIT(15) - EVT_RETURN - EVT_END + Call(N(ChangeNpcCollisionRadius)) + Call(SetNpcFlagBits, LVar3, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SpeakToPlayer, LVar3, LVar6, LVar7, 0, LVar5) + Call(GetNpcPos, LVar3, LVar0, LVar1, LVar2) + Call(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) + Call(SetNpcPos, LVar3, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, LVar3, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcPos, LVar4, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, LVar4, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 8 * 360, 40, EASING_QUADRATIC_OUT) + Label(1) + Call(UpdateLerp) + Call(SetNpcRotation, LVar4, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(EndSpeech, LVar4, ANIM_Duplighost_Anim05, ANIM_Duplighost_Anim02, 0) + ExecWait(N(EVS_FocusCam_OnPlayer)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Thread + Call(SetNpcAnimation, LVar4, ANIM_Duplighost_Anim04) + Call(InterpNpcYaw, LVar4, 90, 0) + Call(SetNpcSpeed, LVar4, Float(6.5)) + Call(PlaySoundAtNpc, LVar4, SOUND_DUPLIGHOST_LEAP, SOUND_SPACE_DEFAULT) + Call(NpcMoveTo, LVar4, 0, LVar2, 0) + Call(SetNpcPos, LVar4, NPC_DISPOSE_LOCATION) + EndThread + Wait(15) + Return + End }; EvtScript N(EVS_Imposter_HopTwice) = { - EVT_CALL(SetNpcJumpscale, LVar3, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, LVar3, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, LVar3, LVar0, LVar1, LVar2, 10) - EVT_CALL(GetNpcPos, LVar3, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, LVar3, LVar0, LVar1, LVar2, 10) - EVT_RETURN - EVT_END + Call(SetNpcJumpscale, LVar3, Float(1.0)) + Call(GetNpcPos, LVar3, LVar0, LVar1, LVar2) + Call(NpcJump0, LVar3, LVar0, LVar1, LVar2, 10) + Call(GetNpcPos, LVar3, LVar0, LVar1, LVar2) + Call(NpcJump0, LVar3, LVar0, LVar1, LVar2, 10) + Return + End }; EvtScript N(EVS_RevealEveryImposter) = { - EVT_IF_EQ(MV_RevealedFakeGoompa, 0) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_FakeGoompa, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_FakeGoompa, NPC_DISPOSE_LOCATION) - EVT_CALL(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_GoompaGhost, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_GoompaGhost, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(NpcMoveTo, NPC_GoompaGhost, LVar0, LVar2, 30) - EVT_END_THREAD - EVT_END_IF - EVT_IF_EQ(MV_RevealedFakeLuigi, 0) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_FakeLuigi, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_FakeLuigi, NPC_DISPOSE_LOCATION) - EVT_CALL(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_LuigiGhost, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_LuigiGhost, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(NpcMoveTo, NPC_LuigiGhost, LVar0, LVar2, 30) - EVT_END_THREAD - EVT_END_IF - EVT_IF_EQ(MV_RevealedFakeKoopaKoot, 0) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_FakeKoopaKoot, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_FakeKoopaKoot, NPC_DISPOSE_LOCATION) - EVT_CALL(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_KoopaKootGhost, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaKootGhost, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(NpcMoveTo, NPC_KoopaKootGhost, LVar0, LVar2, 30) - EVT_END_THREAD - EVT_END_IF - EVT_IF_EQ(MV_RevealedFakeKolorado, 0) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_FakeKolorado, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_FakeKolorado, NPC_DISPOSE_LOCATION) - EVT_CALL(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_KoloradoGhost, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_KoloradoGhost, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(NpcMoveTo, NPC_KoloradoGhost, LVar0, LVar2, 30) - EVT_END_THREAD - EVT_END_IF - EVT_WAIT(20) - EVT_RETURN - EVT_END + IfEq(MV_RevealedFakeGoompa, 0) + Thread + Call(GetNpcPos, NPC_FakeGoompa, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_FakeGoompa, NPC_DISPOSE_LOCATION) + Call(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_GoompaGhost, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_GoompaGhost, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(NpcMoveTo, NPC_GoompaGhost, LVar0, LVar2, 30) + EndThread + EndIf + IfEq(MV_RevealedFakeLuigi, 0) + Thread + Call(GetNpcPos, NPC_FakeLuigi, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_FakeLuigi, NPC_DISPOSE_LOCATION) + Call(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_LuigiGhost, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_LuigiGhost, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(NpcMoveTo, NPC_LuigiGhost, LVar0, LVar2, 30) + EndThread + EndIf + IfEq(MV_RevealedFakeKoopaKoot, 0) + Thread + Call(GetNpcPos, NPC_FakeKoopaKoot, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_FakeKoopaKoot, NPC_DISPOSE_LOCATION) + Call(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_KoopaKootGhost, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_KoopaKootGhost, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(NpcMoveTo, NPC_KoopaKootGhost, LVar0, LVar2, 30) + EndThread + EndIf + IfEq(MV_RevealedFakeKolorado, 0) + Thread + Call(GetNpcPos, NPC_FakeKolorado, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_FakeKolorado, NPC_DISPOSE_LOCATION) + Call(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_KoloradoGhost, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_KoloradoGhost, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(NpcMoveTo, NPC_KoloradoGhost, LVar0, LVar2, 30) + EndThread + EndIf + Wait(20) + Return + End }; EvtScript N(EVS_Imposter_ChaseDownPlayer) = { - EVT_CALL(SetNpcFlagBits, LVar3, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, LVar3, LVar4) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(NpcMoveTo, LVar3, LVar0, LVar2, 30) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, LVar3, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, LVar3, LVar4) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(NpcMoveTo, LVar3, LVar0, LVar2, 30) + Return + End }; EvtScript N(EVS_Imposter_CarryPlayerBack) = { - EVT_CALL(InterpNpcYaw, LVar3, LVar9, 0) - EVT_LOOP(30) - EVT_CALL(GetNpcPos, NPC_FakeKooper, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, LVar4) - EVT_ADD(LVar1, LVar5) - EVT_ADD(LVar2, LVar6) - EVT_CALL(SetNpcPos, LVar3, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(InterpNpcYaw, LVar3, LVar9, 0) + Loop(30) + Call(GetNpcPos, NPC_FakeKooper, LVar0, LVar1, LVar2) + Add(LVar0, LVar4) + Add(LVar1, LVar5) + Add(LVar2, LVar6) + Call(SetNpcPos, LVar3, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_Imposter_ReturnToStation) = { - EVT_CALL(NpcMoveTo, LVar3, LVar0, LVar2, 20) - EVT_CALL(SetNpcAnimation, LVar3, LVar4) - EVT_CALL(SetNpcFlagBits, LVar3, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(InterpNpcYaw, LVar3, 90, 0) - EVT_RETURN - EVT_END + Call(NpcMoveTo, LVar3, LVar0, LVar2, 20) + Call(SetNpcAnimation, LVar3, LVar4) + Call(SetNpcFlagBits, LVar3, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(InterpNpcYaw, LVar3, 90, 0) + Return + End }; EvtScript N(EVS_PreventPlayerLeaving) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerActionState, LVar0) - EVT_IF_EQ(LVar0, ACTION_STATE_IDLE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_IF_EQ(MV_RevealedFakeGoompa, 0) - EVT_SET(LVar3, NPC_FakeGoompa) - EVT_SET(LVar4, ANIM_Goompa_Run) - EVT_EXEC(N(EVS_Imposter_ChaseDownPlayer)) - EVT_END_IF - EVT_IF_EQ(MV_RevealedFakeLuigi, 0) - EVT_SET(LVar3, NPC_FakeLuigi) - EVT_SET(LVar4, ANIM_Luigi_Run) - EVT_EXEC(N(EVS_Imposter_ChaseDownPlayer)) - EVT_END_IF - EVT_IF_EQ(MV_RevealedFakeKoopaKoot, 0) - EVT_SET(LVar3, NPC_FakeKoopaKoot) - EVT_SET(LVar4, ANIM_KoopaKoot_Run) - EVT_EXEC(N(EVS_Imposter_ChaseDownPlayer)) - EVT_END_IF - EVT_IF_EQ(MV_RevealedFakeKolorado, 0) - EVT_SET(LVar3, NPC_FakeKolorado) - EVT_SET(LVar4, ANIM_Kolorado_Run) - EVT_EXEC(N(EVS_Imposter_ChaseDownPlayer)) - EVT_END_IF - EVT_SET(LVar3, NPC_FakeKooper) - EVT_SET(LVar4, ANIM_WorldKooper_Run) - EVT_EXEC_WAIT(N(EVS_Imposter_ChaseDownPlayer)) - EVT_CALL(InterpPlayerYaw, 90, 3) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_LayingDown) - EVT_CALL(GetNpcPos, NPC_FakeKooper, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 30) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(10) - EVT_THREAD - EVT_LOOP(35) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, 0, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(30) - EVT_CALL(GetNpcPos, NPC_FakeKooper, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 30) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_IF_EQ(MV_RevealedFakeGoompa, 0) - EVT_SET(LVar3, NPC_FakeGoompa) - EVT_SET(LVar4, 0) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, 10) - EVT_EXEC(N(EVS_Imposter_CarryPlayerBack)) - EVT_END_IF - EVT_IF_EQ(MV_RevealedFakeLuigi, 0) - EVT_SET(LVar3, NPC_FakeLuigi) - EVT_SET(LVar4, -20) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, 0) - EVT_EXEC(N(EVS_Imposter_CarryPlayerBack)) - EVT_END_IF - EVT_IF_EQ(MV_RevealedFakeKoopaKoot, 0) - EVT_SET(LVar3, NPC_FakeKoopaKoot) - EVT_SET(LVar4, -20) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, 10) - EVT_EXEC(N(EVS_Imposter_CarryPlayerBack)) - EVT_END_IF - EVT_IF_EQ(MV_RevealedFakeKolorado, 0) - EVT_SET(LVar3, NPC_FakeKolorado) - EVT_SET(LVar4, -20) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, 20) - EVT_EXEC(N(EVS_Imposter_CarryPlayerBack)) - EVT_END_IF - EVT_CALL(NpcMoveTo, NPC_FakeKooper, 370, 73, 30) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_IF_EQ(MV_RevealedFakeGoompa, 0) - EVT_SET(LVar3, NPC_FakeGoompa) - EVT_SET(LVar4, ANIM_Goompa_Idle) - EVT_SET(LVar0, 350) - EVT_SET(LVar2, 90) - EVT_EXEC(N(EVS_Imposter_ReturnToStation)) - EVT_END_IF - EVT_IF_EQ(MV_RevealedFakeLuigi, 0) - EVT_SET(LVar3, NPC_FakeLuigi) - EVT_SET(LVar4, ANIM_Luigi_Idle) - EVT_SET(LVar0, 280) - EVT_SET(LVar2, 90) - EVT_EXEC(N(EVS_Imposter_ReturnToStation)) - EVT_END_IF - EVT_IF_EQ(MV_RevealedFakeKoopaKoot, 0) - EVT_SET(LVar3, NPC_FakeKoopaKoot) - EVT_SET(LVar4, ANIM_KoopaKoot_Idle) - EVT_SET(LVar0, 420) - EVT_SET(LVar2, 60) - EVT_EXEC(N(EVS_Imposter_ReturnToStation)) - EVT_END_IF - EVT_IF_EQ(MV_RevealedFakeKolorado, 0) - EVT_SET(LVar3, NPC_FakeKolorado) - EVT_SET(LVar4, ANIM_Kolorado_Idle) - EVT_SET(LVar0, 315) - EVT_SET(LVar2, 55) - EVT_EXEC(N(EVS_Imposter_ReturnToStation)) - EVT_END_IF - EVT_SET(LVar3, NPC_FakeKooper) - EVT_SET(LVar4, ANIM_WorldKooper_Idle) - EVT_SET(LVar0, 385) - EVT_SET(LVar2, 120) - EVT_EXEC_WAIT(N(EVS_Imposter_ReturnToStation)) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH7_0165, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Loop(0) + Wait(1) + Call(GetPlayerActionState, LVar0) + IfEq(LVar0, ACTION_STATE_IDLE) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerPhysics, TRUE) + IfEq(MV_RevealedFakeGoompa, 0) + Set(LVar3, NPC_FakeGoompa) + Set(LVar4, ANIM_Goompa_Run) + Exec(N(EVS_Imposter_ChaseDownPlayer)) + EndIf + IfEq(MV_RevealedFakeLuigi, 0) + Set(LVar3, NPC_FakeLuigi) + Set(LVar4, ANIM_Luigi_Run) + Exec(N(EVS_Imposter_ChaseDownPlayer)) + EndIf + IfEq(MV_RevealedFakeKoopaKoot, 0) + Set(LVar3, NPC_FakeKoopaKoot) + Set(LVar4, ANIM_KoopaKoot_Run) + Exec(N(EVS_Imposter_ChaseDownPlayer)) + EndIf + IfEq(MV_RevealedFakeKolorado, 0) + Set(LVar3, NPC_FakeKolorado) + Set(LVar4, ANIM_Kolorado_Run) + Exec(N(EVS_Imposter_ChaseDownPlayer)) + EndIf + Set(LVar3, NPC_FakeKooper) + Set(LVar4, ANIM_WorldKooper_Run) + ExecWait(N(EVS_Imposter_ChaseDownPlayer)) + Call(InterpPlayerYaw, 90, 3) + Call(SetPlayerAnimation, ANIM_MarioW2_LayingDown) + Call(GetNpcPos, NPC_FakeKooper, LVar0, LVar1, LVar2) + Add(LVar1, 30) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(10) + Thread + Loop(35) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, 0, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + EndLoop + Call(PanToTarget, CAM_DEFAULT, 0, 0) + EndThread + Thread + Loop(30) + Call(GetNpcPos, NPC_FakeKooper, LVar0, LVar1, LVar2) + Add(LVar1, 30) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + IfEq(MV_RevealedFakeGoompa, 0) + Set(LVar3, NPC_FakeGoompa) + Set(LVar4, 0) + Set(LVar5, 0) + Set(LVar6, 10) + Exec(N(EVS_Imposter_CarryPlayerBack)) + EndIf + IfEq(MV_RevealedFakeLuigi, 0) + Set(LVar3, NPC_FakeLuigi) + Set(LVar4, -20) + Set(LVar5, 0) + Set(LVar6, 0) + Exec(N(EVS_Imposter_CarryPlayerBack)) + EndIf + IfEq(MV_RevealedFakeKoopaKoot, 0) + Set(LVar3, NPC_FakeKoopaKoot) + Set(LVar4, -20) + Set(LVar5, 0) + Set(LVar6, 10) + Exec(N(EVS_Imposter_CarryPlayerBack)) + EndIf + IfEq(MV_RevealedFakeKolorado, 0) + Set(LVar3, NPC_FakeKolorado) + Set(LVar4, -20) + Set(LVar5, 0) + Set(LVar6, 20) + Exec(N(EVS_Imposter_CarryPlayerBack)) + EndIf + Call(NpcMoveTo, NPC_FakeKooper, 370, 73, 30) + Call(DisablePlayerPhysics, FALSE) + IfEq(MV_RevealedFakeGoompa, 0) + Set(LVar3, NPC_FakeGoompa) + Set(LVar4, ANIM_Goompa_Idle) + Set(LVar0, 350) + Set(LVar2, 90) + Exec(N(EVS_Imposter_ReturnToStation)) + EndIf + IfEq(MV_RevealedFakeLuigi, 0) + Set(LVar3, NPC_FakeLuigi) + Set(LVar4, ANIM_Luigi_Idle) + Set(LVar0, 280) + Set(LVar2, 90) + Exec(N(EVS_Imposter_ReturnToStation)) + EndIf + IfEq(MV_RevealedFakeKoopaKoot, 0) + Set(LVar3, NPC_FakeKoopaKoot) + Set(LVar4, ANIM_KoopaKoot_Idle) + Set(LVar0, 420) + Set(LVar2, 60) + Exec(N(EVS_Imposter_ReturnToStation)) + EndIf + IfEq(MV_RevealedFakeKolorado, 0) + Set(LVar3, NPC_FakeKolorado) + Set(LVar4, ANIM_Kolorado_Idle) + Set(LVar0, 315) + Set(LVar2, 55) + Exec(N(EVS_Imposter_ReturnToStation)) + EndIf + Set(LVar3, NPC_FakeKooper) + Set(LVar4, ANIM_WorldKooper_Idle) + Set(LVar0, 385) + Set(LVar2, 120) + ExecWait(N(EVS_Imposter_ReturnToStation)) + Call(ShowMessageAtScreenPos, MSG_CH7_0165, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Example_UseKooper) = { - EVT_CALL(GetNpcPos, NPC_ExamplePlayer, LVar3, LVar4, LVar5) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_ExamplePlayer, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 10) - EVT_CALL(NpcMoveTo, NPC_ExampleKooper, LVar0, LVar2, 4) - EVT_WAIT(2) - EVT_CALL(SetNpcAnimation, NPC_ExampleKooper, ANIM_WorldKooper_EnterShell) - EVT_WAIT(2) - EVT_CALL(SetNpcAnimation, NPC_ExampleKooper, ANIM_WorldKooper_SpinShell) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_ExamplePlayer, ANIM_Mario1_Jump) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_ExamplePlayer, ANIM_Mario1_Land) - EVT_END_THREAD - EVT_CALL(SetNpcJumpscale, NPC_ExamplePlayer, EVT_FLOAT(2.0)) - EVT_CALL(GetNpcPos, NPC_ExamplePlayer, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_ExamplePlayer, LVar0, LVar1, LVar2, 10) - EVT_LABEL(10) - EVT_CALL(GetNpcPos, NPC_ExamplePlayer, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_ExampleKooper, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar0) - EVT_ADD(LVar3, 140) - EVT_CALL(N(UpdateExampleKooperMotion), NPC_ExampleKooper, LVar3, 0) - EVT_CALL(N(UpdateExampleKooperMotion), NPC_ExampleKooper, LVar0, 1) - EVT_CALL(SetNpcAnimation, NPC_ExampleKooper, ANIM_WorldKooper_StillShell) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_ExamplePlayer, ANIM_Mario1_Jump) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_ExamplePlayer, ANIM_Mario1_Land) - EVT_END_THREAD - EVT_CALL(SetNpcJumpscale, NPC_ExamplePlayer, EVT_FLOAT(2.0)) - EVT_CALL(GetNpcPos, NPC_ExamplePlayer, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_ExamplePlayer, LVar0, LVar1, LVar2, 10) - EVT_CALL(SetNpcAnimation, NPC_ExampleKooper, ANIM_WorldKooper_SpinShell) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_ExamplePlayer, LVar3, LVar4, LVar5) + Thread + Call(GetNpcPos, NPC_ExamplePlayer, LVar0, LVar1, LVar2) + Add(LVar0, 10) + Call(NpcMoveTo, NPC_ExampleKooper, LVar0, LVar2, 4) + Wait(2) + Call(SetNpcAnimation, NPC_ExampleKooper, ANIM_WorldKooper_EnterShell) + Wait(2) + Call(SetNpcAnimation, NPC_ExampleKooper, ANIM_WorldKooper_SpinShell) + EndThread + Thread + Call(SetNpcAnimation, NPC_ExamplePlayer, ANIM_Mario1_Jump) + Wait(10) + Call(SetNpcAnimation, NPC_ExamplePlayer, ANIM_Mario1_Land) + EndThread + Call(SetNpcJumpscale, NPC_ExamplePlayer, Float(2.0)) + Call(GetNpcPos, NPC_ExamplePlayer, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_ExamplePlayer, LVar0, LVar1, LVar2, 10) + Label(10) + Call(GetNpcPos, NPC_ExamplePlayer, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_ExampleKooper, LVar0, LVar1, LVar2) + Set(LVar3, LVar0) + Add(LVar3, 140) + Call(N(UpdateExampleKooperMotion), NPC_ExampleKooper, LVar3, 0) + Call(N(UpdateExampleKooperMotion), NPC_ExampleKooper, LVar0, 1) + Call(SetNpcAnimation, NPC_ExampleKooper, ANIM_WorldKooper_StillShell) + Thread + Call(SetNpcAnimation, NPC_ExamplePlayer, ANIM_Mario1_Jump) + Wait(10) + Call(SetNpcAnimation, NPC_ExamplePlayer, ANIM_Mario1_Land) + EndThread + Call(SetNpcJumpscale, NPC_ExamplePlayer, Float(2.0)) + Call(GetNpcPos, NPC_ExamplePlayer, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_ExamplePlayer, LVar0, LVar1, LVar2, 10) + Call(SetNpcAnimation, NPC_ExampleKooper, ANIM_WorldKooper_SpinShell) + Goto(10) + Return + End }; EvtScript N(EVS_Imposter_BurstFromWall) = { - EVT_CALL(SetNpcPos, LVar3, 533, 0, 77) - EVT_CALL(SetNpcFlagBits, LVar3, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcSpeed, LVar3, EVT_FLOAT(6.0)) - EVT_CALL(SetNpcAnimation, LVar3, LVar4) - EVT_CALL(NpcMoveTo, LVar3, LVar0, LVar2, 0) - EVT_CALL(SetNpcFlagBits, LVar3, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcAnimation, LVar3, LVar5) - EVT_CALL(InterpNpcYaw, LVar3, 90, 0) - EVT_RETURN - EVT_END + Call(SetNpcPos, LVar3, 533, 0, 77) + Call(SetNpcFlagBits, LVar3, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcSpeed, LVar3, Float(6.0)) + Call(SetNpcAnimation, LVar3, LVar4) + Call(NpcMoveTo, LVar3, LVar0, LVar2, 0) + Call(SetNpcFlagBits, LVar3, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcAnimation, LVar3, LVar5) + Call(InterpNpcYaw, LVar3, 90, 0) + Return + End }; EvtScript N(EVS_ManageImpostersScene) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH7_DEFEATED_KOOPER_DUPLIGHOSTS) - EVT_GOTO(30) - EVT_END_IF - EVT_IF_EQ(GB_PRA19_TutorialState, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_EQ(GB_PRA19_TutorialState, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_EQ(GB_PRA19_TutorialState, 2) - EVT_GOTO(20) - EVT_END_IF - EVT_LABEL(0) - EVT_CALL(SetNpcAnimation, NPC_ExamplePlayer, ANIM_Mario1_Idle) - EVT_CALL(SetNpcPos, NPC_ExamplePlayer, 53, 0, -75) - EVT_CALL(SetNpcAnimation, NPC_ExampleKooper, ANIM_WorldKooper_Idle) - EVT_CALL(SetNpcPos, NPC_ExampleKooper, 23, 0, -75) - EVT_LABEL(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_IF_LT(LVar0, 110) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(SetNpcSpeed, NPC_ExamplePlayer, EVT_FLOAT(3.0)) - EVT_CALL(SetNpcAnimation, NPC_ExamplePlayer, ANIM_Mario1_Walk) - EVT_THREAD - EVT_CALL(SetNpcSpeed, NPC_ExampleKooper, EVT_FLOAT(3.0)) - EVT_CALL(SetNpcAnimation, NPC_ExampleKooper, ANIM_WorldKooper_Walk) - EVT_CALL(NpcMoveTo, NPC_ExampleKooper, 385, -75, 0) - EVT_CALL(SetNpcAnimation, NPC_ExampleKooper, ANIM_WorldKooper_Idle) - EVT_END_THREAD - EVT_CALL(NpcMoveTo, NPC_ExamplePlayer, 415, -75, 0) - EVT_CALL(SetNpcAnimation, NPC_ExamplePlayer, ANIM_Mario1_Idle) - EVT_SET(GB_PRA19_TutorialState, 1) - EVT_GOTO(11) - EVT_LABEL(10) - EVT_CALL(SetNpcAnimation, NPC_ExamplePlayer, ANIM_Mario1_Idle) - EVT_CALL(SetNpcPos, NPC_ExamplePlayer, 415, 0, -75) - EVT_CALL(SetNpcAnimation, NPC_ExampleKooper, ANIM_WorldKooper_Idle) - EVT_CALL(SetNpcPos, NPC_ExampleKooper, 385, 0, -75) - EVT_LABEL(11) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_IF_LT(LVar0, 380) - EVT_GOTO(11) - EVT_END_IF - EVT_EXEC(N(EVS_Example_UseKooper)) - EVT_SET(GB_PRA19_TutorialState, 2) - EVT_GOTO(21) - EVT_LABEL(20) - EVT_CALL(SetNpcAnimation, NPC_ExamplePlayer, ANIM_Mario1_Idle) - EVT_CALL(SetNpcPos, NPC_ExamplePlayer, 415, 0, -75) - EVT_CALL(SetNpcAnimation, NPC_ExampleKooper, ANIM_WorldKooper_Idle) - EVT_CALL(SetNpcPos, NPC_ExampleKooper, 385, 0, -75) - EVT_EXEC(N(EVS_Example_UseKooper)) - EVT_LABEL(21) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar3, LVar4, LVar5) - EVT_IF_LT(LVar0, 510) - EVT_GOTO(21) - EVT_END_IF - EVT_IF_LT(LVar3, LVar0) - EVT_GOTO(21) - EVT_END_IF - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_INVISIBLE | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_CHANGE_PARTNER | PS_FLAG_NO_PARTNER_USAGE, TRUE) - EVT_WAIT(60) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Question) - EVT_CALL(PlaySoundAtPlayer, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, 0, EMOTE_QUESTION, 0, 30, EMOTER_PLAYER, 0, 0, 0, 0) - EVT_WAIT(35) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o1054, SOUND_TROMP_CRASH, SOUND_SPACE_DEFAULT) - EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 0, 34, 22, 1, 10, 30) - EVT_CALL(EnableModel, MODEL_o1024, FALSE) - EVT_CALL(EnableModel, MODEL_o1026, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1054, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar3, NPC_FakeGoompa) - EVT_SET(LVar4, ANIM_Goompa_Run) - EVT_SET(LVar5, ANIM_Goompa_Idle) - EVT_SET(LVar0, 350) - EVT_SET(LVar2, 90) - EVT_EXEC(N(EVS_Imposter_BurstFromWall)) - EVT_SET(LVar3, NPC_FakeLuigi) - EVT_SET(LVar4, ANIM_Luigi_Run) - EVT_SET(LVar5, ANIM_Luigi_Idle) - EVT_SET(LVar0, 280) - EVT_SET(LVar2, 90) - EVT_EXEC(N(EVS_Imposter_BurstFromWall)) - EVT_SET(LVar3, NPC_FakeKoopaKoot) - EVT_SET(LVar4, ANIM_KoopaKoot_Run) - EVT_SET(LVar5, ANIM_KoopaKoot_Idle) - EVT_SET(LVar0, 420) - EVT_SET(LVar2, 60) - EVT_EXEC(N(EVS_Imposter_BurstFromWall)) - EVT_SET(LVar3, NPC_FakeKolorado) - EVT_SET(LVar4, ANIM_Kolorado_Run) - EVT_SET(LVar5, ANIM_Kolorado_Idle) - EVT_SET(LVar0, 315) - EVT_SET(LVar2, 55) - EVT_EXEC(N(EVS_Imposter_BurstFromWall)) - EVT_SET(LVar3, NPC_FakeKooper) - EVT_SET(LVar4, ANIM_WorldKooper_Run) - EVT_SET(LVar5, ANIM_WorldKooper_Idle) - EVT_SET(LVar0, 385) - EVT_SET(LVar2, 120) - EVT_EXEC(N(EVS_Imposter_BurstFromWall)) - EVT_THREAD - EVT_WAIT(2) - EVT_CALL(N(AwaitImposterHitPlayer)) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_STATIC_COLLISION | PS_FLAG_ROTATION_LOCKED | PS_FLAG_FACE_FORWARD, TRUE) - EVT_CALL(MakeLerp, 0, 11 * 180, 30, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(InterpPlayerYaw, LVar0, 0) - EVT_CALL(N(SetPlayerFacingAngle)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_STATIC_COLLISION | PS_FLAG_ROTATION_LOCKED | PS_FLAG_FACE_FORWARD, FALSE) - EVT_END_THREAD - EVT_WAIT(60) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(10) + IfGe(GB_StoryProgress, STORY_CH7_DEFEATED_KOOPER_DUPLIGHOSTS) + Goto(30) + EndIf + IfEq(GB_PRA19_TutorialState, 0) + Goto(0) + EndIf + IfEq(GB_PRA19_TutorialState, 1) + Goto(10) + EndIf + IfEq(GB_PRA19_TutorialState, 2) + Goto(20) + EndIf + Label(0) + Call(SetNpcAnimation, NPC_ExamplePlayer, ANIM_Mario1_Idle) + Call(SetNpcPos, NPC_ExamplePlayer, 53, 0, -75) + Call(SetNpcAnimation, NPC_ExampleKooper, ANIM_WorldKooper_Idle) + Call(SetNpcPos, NPC_ExampleKooper, 23, 0, -75) + Label(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + IfLt(LVar0, 110) + Goto(1) + EndIf + Call(SetNpcSpeed, NPC_ExamplePlayer, Float(3.0)) + Call(SetNpcAnimation, NPC_ExamplePlayer, ANIM_Mario1_Walk) + Thread + Call(SetNpcSpeed, NPC_ExampleKooper, Float(3.0)) + Call(SetNpcAnimation, NPC_ExampleKooper, ANIM_WorldKooper_Walk) + Call(NpcMoveTo, NPC_ExampleKooper, 385, -75, 0) + Call(SetNpcAnimation, NPC_ExampleKooper, ANIM_WorldKooper_Idle) + EndThread + Call(NpcMoveTo, NPC_ExamplePlayer, 415, -75, 0) + Call(SetNpcAnimation, NPC_ExamplePlayer, ANIM_Mario1_Idle) + Set(GB_PRA19_TutorialState, 1) + Goto(11) + Label(10) + Call(SetNpcAnimation, NPC_ExamplePlayer, ANIM_Mario1_Idle) + Call(SetNpcPos, NPC_ExamplePlayer, 415, 0, -75) + Call(SetNpcAnimation, NPC_ExampleKooper, ANIM_WorldKooper_Idle) + Call(SetNpcPos, NPC_ExampleKooper, 385, 0, -75) + Label(11) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + IfLt(LVar0, 380) + Goto(11) + EndIf + Exec(N(EVS_Example_UseKooper)) + Set(GB_PRA19_TutorialState, 2) + Goto(21) + Label(20) + Call(SetNpcAnimation, NPC_ExamplePlayer, ANIM_Mario1_Idle) + Call(SetNpcPos, NPC_ExamplePlayer, 415, 0, -75) + Call(SetNpcAnimation, NPC_ExampleKooper, ANIM_WorldKooper_Idle) + Call(SetNpcPos, NPC_ExampleKooper, 385, 0, -75) + Exec(N(EVS_Example_UseKooper)) + Label(21) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Wait(1) + Call(GetNpcPos, NPC_PARTNER, LVar3, LVar4, LVar5) + IfLt(LVar0, 510) + Goto(21) + EndIf + IfLt(LVar3, LVar0) + Goto(21) + EndIf + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_INVISIBLE | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(SetPlayerFlagBits, PS_FLAG_NO_CHANGE_PARTNER | PS_FLAG_NO_PARTNER_USAGE, TRUE) + Wait(60) + Call(SetPlayerAnimation, ANIM_Mario1_Question) + Call(PlaySoundAtPlayer, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) + Call(ShowEmote, 0, EMOTE_QUESTION, 0, 30, EMOTER_PLAYER, 0, 0, 0, 0) + Wait(35) + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + Call(PlaySoundAtCollider, COLLIDER_o1054, SOUND_TROMP_CRASH, SOUND_SPACE_DEFAULT) + PlayEffect(EFFECT_BOMBETTE_BREAKING, 0, 34, 22, 1, 10, 30) + Call(EnableModel, MODEL_o1024, FALSE) + Call(EnableModel, MODEL_o1026, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1054, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar3, NPC_FakeGoompa) + Set(LVar4, ANIM_Goompa_Run) + Set(LVar5, ANIM_Goompa_Idle) + Set(LVar0, 350) + Set(LVar2, 90) + Exec(N(EVS_Imposter_BurstFromWall)) + Set(LVar3, NPC_FakeLuigi) + Set(LVar4, ANIM_Luigi_Run) + Set(LVar5, ANIM_Luigi_Idle) + Set(LVar0, 280) + Set(LVar2, 90) + Exec(N(EVS_Imposter_BurstFromWall)) + Set(LVar3, NPC_FakeKoopaKoot) + Set(LVar4, ANIM_KoopaKoot_Run) + Set(LVar5, ANIM_KoopaKoot_Idle) + Set(LVar0, 420) + Set(LVar2, 60) + Exec(N(EVS_Imposter_BurstFromWall)) + Set(LVar3, NPC_FakeKolorado) + Set(LVar4, ANIM_Kolorado_Run) + Set(LVar5, ANIM_Kolorado_Idle) + Set(LVar0, 315) + Set(LVar2, 55) + Exec(N(EVS_Imposter_BurstFromWall)) + Set(LVar3, NPC_FakeKooper) + Set(LVar4, ANIM_WorldKooper_Run) + Set(LVar5, ANIM_WorldKooper_Idle) + Set(LVar0, 385) + Set(LVar2, 120) + Exec(N(EVS_Imposter_BurstFromWall)) + Thread + Wait(2) + Call(N(AwaitImposterHitPlayer)) + Call(SetPlayerFlagBits, PS_FLAG_NO_STATIC_COLLISION | PS_FLAG_ROTATION_LOCKED | PS_FLAG_FACE_FORWARD, TRUE) + Call(MakeLerp, 0, 11 * 180, 30, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(InterpPlayerYaw, LVar0, 0) + Call(N(SetPlayerFacingAngle)) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetPlayerFlagBits, PS_FLAG_NO_STATIC_COLLISION | PS_FLAG_ROTATION_LOCKED | PS_FLAG_FACE_FORWARD, FALSE) + EndThread + Wait(60) + Call(InterpPlayerYaw, 270, 0) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(10) // kolorado imposter speaks - EVT_CALL(GetNpcPos, NPC_FakeKolorado, LVar0, LVar1, LVar2) - EVT_SETF(LVarA, EVT_FLOAT(3.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnPosition)) - EVT_SET(LVar3, NPC_FakeKolorado) - EVT_EXEC(N(EVS_Imposter_HopTwice)) - EVT_CALL(SpeakToPlayer, NPC_FakeKolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH7_0153) + Call(GetNpcPos, NPC_FakeKolorado, LVar0, LVar1, LVar2) + SetF(LVarA, Float(3.0)) + ExecWait(N(EVS_FocusCam_OnPosition)) + Set(LVar3, NPC_FakeKolorado) + Exec(N(EVS_Imposter_HopTwice)) + Call(SpeakToPlayer, NPC_FakeKolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH7_0153) // goomba imposter speaks - EVT_CALL(GetNpcPos, NPC_FakeGoompa, LVar0, LVar1, LVar2) - EVT_SETF(LVarA, EVT_FLOAT(3.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnPosition)) - EVT_SET(LVar3, NPC_FakeGoompa) - EVT_EXEC(N(EVS_Imposter_HopTwice)) - EVT_CALL(SpeakToPlayer, NPC_FakeGoompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH7_0154) + Call(GetNpcPos, NPC_FakeGoompa, LVar0, LVar1, LVar2) + SetF(LVarA, Float(3.0)) + ExecWait(N(EVS_FocusCam_OnPosition)) + Set(LVar3, NPC_FakeGoompa) + Exec(N(EVS_Imposter_HopTwice)) + Call(SpeakToPlayer, NPC_FakeGoompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH7_0154) // goomba imposter speaks - EVT_CALL(GetNpcPos, NPC_FakeKooper, LVar0, LVar1, LVar2) - EVT_SETF(LVarA, EVT_FLOAT(3.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnPosition)) - EVT_SET(LVar3, NPC_FakeKooper) - EVT_EXEC(N(EVS_Imposter_HopTwice)) - EVT_CALL(SpeakToPlayer, NPC_FakeKooper, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_0155) + Call(GetNpcPos, NPC_FakeKooper, LVar0, LVar1, LVar2) + SetF(LVarA, Float(3.0)) + ExecWait(N(EVS_FocusCam_OnPosition)) + Set(LVar3, NPC_FakeKooper) + Exec(N(EVS_Imposter_HopTwice)) + Call(SpeakToPlayer, NPC_FakeKooper, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_0155) // goomba imposter speaks - EVT_CALL(GetNpcPos, NPC_FakeKoopaKoot, LVar0, LVar1, LVar2) - EVT_SETF(LVarA, EVT_FLOAT(3.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnPosition)) - EVT_SET(LVar3, NPC_FakeKoopaKoot) - EVT_EXEC(N(EVS_Imposter_HopTwice)) - EVT_CALL(SpeakToPlayer, NPC_FakeKoopaKoot, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH7_0156) + Call(GetNpcPos, NPC_FakeKoopaKoot, LVar0, LVar1, LVar2) + SetF(LVarA, Float(3.0)) + ExecWait(N(EVS_FocusCam_OnPosition)) + Set(LVar3, NPC_FakeKoopaKoot) + Exec(N(EVS_Imposter_HopTwice)) + Call(SpeakToPlayer, NPC_FakeKoopaKoot, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH7_0156) // luigi imposter speaks - EVT_CALL(GetNpcPos, NPC_FakeLuigi, LVar0, LVar1, LVar2) - EVT_SETF(LVarA, EVT_FLOAT(3.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnPosition)) - EVT_SET(LVar3, NPC_FakeLuigi) - EVT_EXEC(N(EVS_Imposter_HopTwice)) - EVT_CALL(SpeakToPlayer, NPC_FakeLuigi, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH7_0157) + Call(GetNpcPos, NPC_FakeLuigi, LVar0, LVar1, LVar2) + SetF(LVarA, Float(3.0)) + ExecWait(N(EVS_FocusCam_OnPosition)) + Set(LVar3, NPC_FakeLuigi) + Exec(N(EVS_Imposter_HopTwice)) + Call(SpeakToPlayer, NPC_FakeLuigi, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH7_0157) // follow-up dialogue - EVT_CALL(GetNpcPos, NPC_FakeKolorado, LVar0, LVar1, LVar2) - EVT_SETF(LVarA, EVT_FLOAT(3.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnPosition)) - EVT_CALL(SpeakToPlayer, NPC_FakeKolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH7_0158) - EVT_CALL(GetNpcPos, NPC_FakeGoompa, LVar0, LVar1, LVar2) - EVT_SETF(LVarA, EVT_FLOAT(3.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnPosition)) - EVT_CALL(SpeakToPlayer, NPC_FakeGoompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH7_0159) - EVT_CALL(GetNpcPos, NPC_FakeLuigi, LVar0, LVar1, LVar2) - EVT_SETF(LVarA, EVT_FLOAT(3.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnPosition)) - EVT_CALL(SpeakToPlayer, NPC_FakeLuigi, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH7_015A) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_CHANGE_PARTNER | PS_FLAG_NO_PARTNER_USAGE, TRUE) - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, 490) - EVT_SET(LVar9, 270) - EVT_EXEC_WAIT(N(EVS_PreventPlayerLeaving)) - EVT_END_IF - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 190) - EVT_SET(LVar9, 90) - EVT_EXEC_WAIT(N(EVS_PreventPlayerLeaving)) - EVT_END_IF - EVT_IF_EQ(MV_RevealedFakeGoompa, 1) - EVT_IF_EQ(MV_RevealedFakeLuigi, 1) - EVT_IF_EQ(MV_RevealedFakeKoopaKoot, 1) - EVT_IF_EQ(MV_RevealedFakeKolorado, 1) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(GetNpcPos, NPC_FakeKooper, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_FakeKooper, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_INVISIBLE, FALSE) - EVT_CALL(GetAngleToNPC, NPC_PARTNER, LVarA) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LE(LVarA, 180) - EVT_ADD(LVar0, 50) - EVT_ELSE - EVT_ADD(LVar0, -50) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_WorldKooper_Walk) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 20) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_WorldKooper_Idle) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_0166) - EVT_WAIT(10) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_CHANGE_PARTNER | PS_FLAG_NO_PARTNER_USAGE, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_pra_20_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) - EVT_SET(GB_StoryProgress, STORY_CH7_DEFEATED_KOOPER_DUPLIGHOSTS) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_SWITCH(MV_UnmaskingState) - EVT_CASE_EQ(0) - EVT_WAIT(1) - EVT_CASE_EQ(NPC_FakeKooper + 1) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcAnimation, NPC_FakeKooper, ANIM_WorldKooper_Hurt) - EVT_CALL(GetNpcPos, NPC_FakeKooper, LVar0, LVar1, LVar2) - EVT_SETF(LVarA, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnPosition)) - EVT_CALL(SpeakToPlayer, NPC_FakeKooper, ANIM_WorldKooper_Hurt, ANIM_WorldKooper_Hurt, 0, MSG_CH7_0162) - EVT_EXEC_WAIT(N(EVS_FocusCam_StartBattle)) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_EXEC_WAIT(N(EVS_RevealEveryImposter)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(N(ChooseImposterBattleFormation), MV_RevealedFakeGoompa, MV_RevealedFakeLuigi, MV_RevealedFakeKoopaKoot, MV_RevealedFakeKolorado) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_BREAK_LOOP - EVT_CASE_EQ(NPC_FakeGoompa + 1) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetNpcPos, NPC_FakeGoompa, LVar0, LVar1, LVar2) - EVT_SETF(LVarA, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnPosition)) - EVT_SET(LVar3, NPC_FakeGoompa) - EVT_SET(LVar4, NPC_GoompaGhost) - EVT_SET(LVar5, MSG_CH7_0161) - EVT_SET(LVar6, ANIM_Goompa_Talk) - EVT_SET(LVar7, ANIM_Goompa_Idle) - EVT_EXEC_WAIT(N(EVS_Imposter_Unmask)) - EVT_SET(MV_UnmaskingState, 0) - EVT_SET(MV_RevealedFakeGoompa, 1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CASE_EQ(NPC_FakeLuigi + 1) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetNpcPos, NPC_FakeLuigi, LVar0, LVar1, LVar2) - EVT_SETF(LVarA, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnPosition)) - EVT_SET(LVar3, NPC_FakeLuigi) - EVT_SET(LVar4, NPC_LuigiGhost) - EVT_SET(LVar5, MSG_CH7_0164) - EVT_SET(LVar6, ANIM_Luigi_Talk) - EVT_SET(LVar7, ANIM_Luigi_Idle) - EVT_EXEC_WAIT(N(EVS_Imposter_Unmask)) - EVT_SET(MV_UnmaskingState, 0) - EVT_SET(MV_RevealedFakeLuigi, 1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CASE_EQ(NPC_FakeKoopaKoot + 1) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetNpcPos, NPC_FakeKoopaKoot, LVar0, LVar1, LVar2) - EVT_SETF(LVarA, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnPosition)) - EVT_SET(LVar3, NPC_FakeKoopaKoot) - EVT_SET(LVar4, NPC_KoopaKootGhost) - EVT_SET(LVar5, MSG_CH7_0163) - EVT_SET(LVar6, ANIM_KoopaKoot_Talk) - EVT_SET(LVar7, ANIM_KoopaKoot_Idle) - EVT_EXEC_WAIT(N(EVS_Imposter_Unmask)) - EVT_SET(MV_UnmaskingState, 0) - EVT_SET(MV_RevealedFakeKoopaKoot, 1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CASE_EQ(NPC_FakeKolorado + 1) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetNpcPos, NPC_FakeKolorado, LVar0, LVar1, LVar2) - EVT_SETF(LVarA, EVT_FLOAT(6.0)) - EVT_EXEC_WAIT(N(EVS_FocusCam_OnPosition)) - EVT_SET(LVar3, NPC_FakeKolorado) - EVT_SET(LVar4, NPC_KoloradoGhost) - EVT_SET(LVar5, MSG_CH7_0160) - EVT_SET(LVar6, ANIM_Kolorado_Talk) - EVT_SET(LVar7, ANIM_Kolorado_Idle) - EVT_EXEC_WAIT(N(EVS_Imposter_Unmask)) - EVT_WAIT(1) - EVT_SET(MV_UnmaskingState, 0) - EVT_SET(MV_RevealedFakeKolorado, 1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_SWITCH - EVT_END_LOOP - EVT_LABEL(30) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_FakeKolorado, LVar0, LVar1, LVar2) + SetF(LVarA, Float(3.0)) + ExecWait(N(EVS_FocusCam_OnPosition)) + Call(SpeakToPlayer, NPC_FakeKolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH7_0158) + Call(GetNpcPos, NPC_FakeGoompa, LVar0, LVar1, LVar2) + SetF(LVarA, Float(3.0)) + ExecWait(N(EVS_FocusCam_OnPosition)) + Call(SpeakToPlayer, NPC_FakeGoompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH7_0159) + Call(GetNpcPos, NPC_FakeLuigi, LVar0, LVar1, LVar2) + SetF(LVarA, Float(3.0)) + ExecWait(N(EVS_FocusCam_OnPosition)) + Call(SpeakToPlayer, NPC_FakeLuigi, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH7_015A) + Call(ResetCam, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Call(SetPlayerFlagBits, PS_FLAG_NO_CHANGE_PARTNER | PS_FLAG_NO_PARTNER_USAGE, TRUE) + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar0, 490) + Set(LVar9, 270) + ExecWait(N(EVS_PreventPlayerLeaving)) + EndIf + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, 190) + Set(LVar9, 90) + ExecWait(N(EVS_PreventPlayerLeaving)) + EndIf + IfEq(MV_RevealedFakeGoompa, 1) + IfEq(MV_RevealedFakeLuigi, 1) + IfEq(MV_RevealedFakeKoopaKoot, 1) + IfEq(MV_RevealedFakeKolorado, 1) + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(GetNpcPos, NPC_FakeKooper, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_FakeKooper, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_INVISIBLE, FALSE) + Call(GetAngleToNPC, NPC_PARTNER, LVarA) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLe(LVarA, 180) + Add(LVar0, 50) + Else + Add(LVar0, -50) + EndIf + Call(SetNpcAnimation, NPC_PARTNER, ANIM_WorldKooper_Walk) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 20) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_WorldKooper_Idle) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_0166) + Wait(10) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetPlayerFlagBits, PS_FLAG_NO_CHANGE_PARTNER | PS_FLAG_NO_PARTNER_USAGE, FALSE) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + BindTrigger(Ref(N(EVS_ExitWalk_pra_20_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) + Set(GB_StoryProgress, STORY_CH7_DEFEATED_KOOPER_DUPLIGHOSTS) + BreakLoop + EndIf + EndIf + EndIf + EndIf + Switch(MV_UnmaskingState) + CaseEq(0) + Wait(1) + CaseEq(NPC_FakeKooper + 1) + Call(DisablePlayerInput, TRUE) + Call(SetNpcAnimation, NPC_FakeKooper, ANIM_WorldKooper_Hurt) + Call(GetNpcPos, NPC_FakeKooper, LVar0, LVar1, LVar2) + SetF(LVarA, Float(6.0)) + ExecWait(N(EVS_FocusCam_OnPosition)) + Call(SpeakToPlayer, NPC_FakeKooper, ANIM_WorldKooper_Hurt, ANIM_WorldKooper_Hurt, 0, MSG_CH7_0162) + ExecWait(N(EVS_FocusCam_StartBattle)) + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + ExecWait(N(EVS_RevealEveryImposter)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(N(ChooseImposterBattleFormation), MV_RevealedFakeGoompa, MV_RevealedFakeLuigi, MV_RevealedFakeKoopaKoot, MV_RevealedFakeKolorado) + Call(DisablePlayerInput, FALSE) + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + BreakLoop + CaseEq(NPC_FakeGoompa + 1) + Call(DisablePlayerInput, TRUE) + Call(GetNpcPos, NPC_FakeGoompa, LVar0, LVar1, LVar2) + SetF(LVarA, Float(6.0)) + ExecWait(N(EVS_FocusCam_OnPosition)) + Set(LVar3, NPC_FakeGoompa) + Set(LVar4, NPC_GoompaGhost) + Set(LVar5, MSG_CH7_0161) + Set(LVar6, ANIM_Goompa_Talk) + Set(LVar7, ANIM_Goompa_Idle) + ExecWait(N(EVS_Imposter_Unmask)) + Set(MV_UnmaskingState, 0) + Set(MV_RevealedFakeGoompa, 1) + Call(DisablePlayerInput, FALSE) + CaseEq(NPC_FakeLuigi + 1) + Call(DisablePlayerInput, TRUE) + Call(GetNpcPos, NPC_FakeLuigi, LVar0, LVar1, LVar2) + SetF(LVarA, Float(6.0)) + ExecWait(N(EVS_FocusCam_OnPosition)) + Set(LVar3, NPC_FakeLuigi) + Set(LVar4, NPC_LuigiGhost) + Set(LVar5, MSG_CH7_0164) + Set(LVar6, ANIM_Luigi_Talk) + Set(LVar7, ANIM_Luigi_Idle) + ExecWait(N(EVS_Imposter_Unmask)) + Set(MV_UnmaskingState, 0) + Set(MV_RevealedFakeLuigi, 1) + Call(DisablePlayerInput, FALSE) + CaseEq(NPC_FakeKoopaKoot + 1) + Call(DisablePlayerInput, TRUE) + Call(GetNpcPos, NPC_FakeKoopaKoot, LVar0, LVar1, LVar2) + SetF(LVarA, Float(6.0)) + ExecWait(N(EVS_FocusCam_OnPosition)) + Set(LVar3, NPC_FakeKoopaKoot) + Set(LVar4, NPC_KoopaKootGhost) + Set(LVar5, MSG_CH7_0163) + Set(LVar6, ANIM_KoopaKoot_Talk) + Set(LVar7, ANIM_KoopaKoot_Idle) + ExecWait(N(EVS_Imposter_Unmask)) + Set(MV_UnmaskingState, 0) + Set(MV_RevealedFakeKoopaKoot, 1) + Call(DisablePlayerInput, FALSE) + CaseEq(NPC_FakeKolorado + 1) + Call(DisablePlayerInput, TRUE) + Call(GetNpcPos, NPC_FakeKolorado, LVar0, LVar1, LVar2) + SetF(LVarA, Float(6.0)) + ExecWait(N(EVS_FocusCam_OnPosition)) + Set(LVar3, NPC_FakeKolorado) + Set(LVar4, NPC_KoloradoGhost) + Set(LVar5, MSG_CH7_0160) + Set(LVar6, ANIM_Kolorado_Talk) + Set(LVar7, ANIM_Kolorado_Idle) + ExecWait(N(EVS_Imposter_Unmask)) + Wait(1) + Set(MV_UnmaskingState, 0) + Set(MV_RevealedFakeKolorado, 1) + Call(DisablePlayerInput, FALSE) + EndSwitch + EndLoop + Label(30) + Return + End }; EvtScript N(EVS_Scene_DefeatMiniboss) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetNpcPos, NPC_FakeKooper, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_FakeKooper, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_INVISIBLE | NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_CHANGE_PARTNER | PS_FLAG_NO_PARTNER_USAGE, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_pra_20_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) - EVT_SET(GB_StoryProgress, STORY_CH7_DEFEATED_KOOPER_DUPLIGHOSTS) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(GetNpcPos, NPC_FakeKooper, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_FakeKooper, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_INVISIBLE | NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetPlayerFlagBits, PS_FLAG_NO_CHANGE_PARTNER | PS_FLAG_NO_PARTNER_USAGE, FALSE) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + BindTrigger(Ref(N(EVS_ExitWalk_pra_20_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) + Set(GB_StoryProgress, STORY_CH7_DEFEATED_KOOPER_DUPLIGHOSTS) + Return + End }; EvtScript N(EVS_NpcInteract_FakeKooper) = { - EVT_CALL(SpeakToPlayer, NPC_FakeKooper, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_015D) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_FakeKooper, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_015D) + Return + End }; EvtScript N(EVS_NpcInteract_FakeGoompa) = { - EVT_CALL(SpeakToPlayer, NPC_FakeGoompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH7_015C) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_FakeGoompa, ANIM_Goompa_Talk, ANIM_Goompa_Idle, 0, MSG_CH7_015C) + Return + End }; EvtScript N(EVS_NpcInteract_FakeLuigi) = { - EVT_CALL(SpeakToPlayer, NPC_FakeLuigi, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH7_015F) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_FakeLuigi, ANIM_Luigi_Talk, ANIM_Luigi_Idle, 0, MSG_CH7_015F) + Return + End }; EvtScript N(EVS_NpcInteract_FakeKoopaKoot) = { - EVT_CALL(SpeakToPlayer, NPC_FakeKoopaKoot, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH7_015E) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_FakeKoopaKoot, ANIM_KoopaKoot_Talk, ANIM_KoopaKoot_Idle, 0, MSG_CH7_015E) + Return + End }; EvtScript N(EVS_NpcInteract_FakeKolorado) = { - EVT_CALL(SpeakToPlayer, NPC_FakeKolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH7_015B) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_FakeKolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH7_015B) + Return + End }; EvtScript N(EVS_NpcInit_Duplighost_Controller) = { - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_Scene_DefeatMiniboss))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) - EVT_EXEC(N(EVS_ManageImpostersScene)) - EVT_RETURN - EVT_END + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_Scene_DefeatMiniboss))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) + Exec(N(EVS_ManageImpostersScene)) + Return + End }; EvtScript N(EVS_NpcInit_FakeKooper) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_FakeKooper))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_FakeKooper))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_FakeGoompa) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_FakeGoompa))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_FakeGoompa))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_FakeLuigi) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_FakeLuigi))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_FakeLuigi))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_FakeKoopaKoot) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_FakeKoopaKoot))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_FakeKoopaKoot))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_FakeKolorado) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_FakeKolorado))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_FakeKolorado))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_ExamplePlayer) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Mario1_Idle) - EVT_MALLOC_ARRAY(16, LVarA) - EVT_CALL(N(CreateExamplePlayerRenderer)) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Mario1_Idle) + MallocArray(16, LVarA) + Call(N(CreateExamplePlayerRenderer)) + Return + End }; EvtScript N(EVS_NpcInit_ExampleKooper) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_Duplighost_Goompa) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR | NPC_FLAG_10000000, TRUE) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR | NPC_FLAG_10000000, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_Duplighost_Luigi) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR | NPC_FLAG_10000000, TRUE) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR | NPC_FLAG_10000000, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_Duplighost_KoopaKoot) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR | NPC_FLAG_10000000, TRUE) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR | NPC_FLAG_10000000, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_Duplighost_Kolorado) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR | NPC_FLAG_10000000, TRUE) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR | NPC_FLAG_10000000, TRUE) + Return + End }; AnimID N(ExtraAnims_Goompa)[] = { @@ -1346,143 +1346,143 @@ NpcData N(NpcData_Duplighosts)[] = { }; EvtScript N(EVS_NpcIdle_TargetKooper) = { - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_FakeKooper, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_TargetKooper, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetNpcPos, NPC_FakeKooper, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_TargetKooper, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_TargetGoompa) = { - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_FakeGoompa, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_TargetGoompa, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetNpcPos, NPC_FakeGoompa, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_TargetGoompa, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_TargetLuigi) = { - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_FakeLuigi, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_TargetLuigi, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetNpcPos, NPC_FakeLuigi, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_TargetLuigi, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_TargetKoopaKoot) = { - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_FakeKoopaKoot, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_TargetKoopaKoot, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetNpcPos, NPC_FakeKoopaKoot, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_TargetKoopaKoot, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_TargetKolorado) = { - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_FakeKolorado, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_TargetKolorado, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetNpcPos, NPC_FakeKolorado, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_TargetKolorado, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcHit_TargetKooper) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(MV_UnmaskingState, NPC_FakeKooper + 1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(MV_UnmaskingState, NPC_FakeKooper + 1) + EndSwitch + Return + End }; EvtScript N(EVS_NpcHit_TargetGoompa) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(MV_UnmaskingState, NPC_FakeGoompa + 1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(MV_UnmaskingState, NPC_FakeGoompa + 1) + EndSwitch + Return + End }; EvtScript N(EVS_NpcHit_TargetLuigi) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(MV_UnmaskingState, NPC_FakeLuigi + 1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(MV_UnmaskingState, NPC_FakeLuigi + 1) + EndSwitch + Return + End }; EvtScript N(EVS_NpcHit_TargetKoopaKoot) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(MV_UnmaskingState, NPC_FakeKoopaKoot + 1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(MV_UnmaskingState, NPC_FakeKoopaKoot + 1) + EndSwitch + Return + End }; EvtScript N(EVS_NpcHit_TargetKolorado) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_SET(MV_UnmaskingState, NPC_FakeKolorado + 1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + Set(MV_UnmaskingState, NPC_FakeKolorado + 1) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_TargetKooper) = { - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_TargetKooper))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TargetKooper))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) - EVT_RETURN - EVT_END + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_TargetKooper))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_TargetKooper))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_TargetGoompa) = { - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_TargetGoompa))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TargetGoompa))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) - EVT_RETURN - EVT_END + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_TargetGoompa))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_TargetGoompa))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_TargetLuigi) = { - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_TargetLuigi))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TargetLuigi))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) - EVT_RETURN - EVT_END + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_TargetLuigi))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_TargetLuigi))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_TargetKoopaKoot) = { - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_TargetKoopaKoot))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TargetKoopaKoot))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) - EVT_RETURN - EVT_END + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_TargetKoopaKoot))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_TargetKoopaKoot))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_TargetKolorado) = { - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_TargetKolorado))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TargetKolorado))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) - EVT_RETURN - EVT_END + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_TargetKolorado))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_TargetKolorado))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) + Return + End }; NpcData N(NpcData_Targets)[] = { diff --git a/src/world/area_pra/pra_20/pra_20_1_music.c b/src/world/area_pra/pra_20/pra_20_1_music.c index 0ee04c2ed82..52fa5d7876d 100644 --- a/src/world/area_pra/pra_20/pra_20_1_music.c +++ b/src/world/area_pra/pra_20/pra_20_1_music.c @@ -1,8 +1,8 @@ #include "pra_20.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Return + End }; diff --git a/src/world/area_pra/pra_20/pra_20_2_main.c b/src/world/area_pra/pra_20/pra_20_2_main.c index 0c7ceda9d4e..1b514abcf38 100644 --- a/src/world/area_pra/pra_20/pra_20_2_main.c +++ b/src/world/area_pra/pra_20/pra_20_2_main.c @@ -21,165 +21,165 @@ s32 N(ModelListNone)[] = { -1 }; EvtScript N(EVS_ExitWalk_pra_19_1) = EVT_EXIT_WALK(60, pra_20_ENTRY_0, "pra_19", pra_19_ENTRY_1); EvtScript N(EVS_ExitDoor_pra_21_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_20_ENTRY_1) - EVT_SET(LVar1, COLLIDER_deilittssw) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(NearSingleDoorModels))) - EVT_SET(LVar3, EVT_PTR(N(FarSingleDoorModels))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearSingleDoorModels))) - EVT_SET(LVar3, EVT_PTR(N(ModelListNone))) - EVT_END_IF - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_21"), pra_21_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_20_ENTRY_1) + Set(LVar1, COLLIDER_deilittssw) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(NearSingleDoorModels))) + Set(LVar3, Ref(N(FarSingleDoorModels))) + Else + Set(LVar2, Ref(N(NearSingleDoorModels))) + Set(LVar3, Ref(N(ModelListNone))) + EndIf + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_21"), pra_21_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_29_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_20_ENTRY_2) - EVT_SET(LVar1, COLLIDER_deilittse) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothRightDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(NearRightDoorModelsR))) - EVT_END_IF - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_29"), pra_29_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_20_ENTRY_2) + Set(LVar1, COLLIDER_deilittse) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothRightDoorModelsL))) + Set(LVar3, Ref(N(BothRightDoorModelsR))) + Else + Set(LVar2, Ref(N(NearRightDoorModelsL))) + Set(LVar3, Ref(N(NearRightDoorModelsR))) + EndIf + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_29"), pra_29_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_29_3) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_20_ENTRY_3) - EVT_SET(LVar1, COLLIDER_deilittne) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothRightDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(BackRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BackRightDoorModelsR))) - EVT_END_IF - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_29"), pra_29_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_20_ENTRY_3) + Set(LVar1, COLLIDER_deilittne) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothRightDoorModelsL))) + Set(LVar3, Ref(N(BothRightDoorModelsR))) + Else + Set(LVar2, Ref(N(BackRightDoorModelsL))) + Set(LVar3, Ref(N(BackRightDoorModelsR))) + EndIf + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_29"), pra_29_ENTRY_3) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoor_pra_22_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_20_ENTRY_4) - EVT_SET(LVar1, COLLIDER_deilittnnw) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(NearSingleDoorModels))) - EVT_SET(LVar3, EVT_PTR(N(FarSingleDoorModels))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(ModelListNone))) - EVT_SET(LVar3, EVT_PTR(N(FarSingleDoorModels))) - EVT_END_IF - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_22"), pra_22_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_20_ENTRY_4) + Set(LVar1, COLLIDER_deilittnnw) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(NearSingleDoorModels))) + Set(LVar3, Ref(N(FarSingleDoorModels))) + Else + Set(LVar2, Ref(N(ModelListNone))) + Set(LVar3, Ref(N(FarSingleDoorModels))) + EndIf + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_22"), pra_22_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_pra_19_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_pra_21_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittssw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_29_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_29_3)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_pra_22_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnnw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_pra_19_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoor_pra_21_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittssw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_29_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_29_3)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoor_pra_22_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnnw, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(pra_20_ENTRY_0) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(pra_20_ENTRY_1) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(NearSingleDoorModels))) - EVT_SET(LVar3, EVT_PTR(N(FarSingleDoorModels))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearSingleDoorModels))) - EVT_SET(LVar3, EVT_PTR(N(ModelListNone))) - EVT_END_IF - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(pra_20_ENTRY_2) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothRightDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(NearRightDoorModelsR))) - EVT_END_IF - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(pra_20_ENTRY_3) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothRightDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(BackRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BackRightDoorModelsR))) - EVT_END_IF - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(pra_20_ENTRY_4) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(NearSingleDoorModels))) - EVT_SET(LVar3, EVT_PTR(N(FarSingleDoorModels))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(FarSingleDoorModels))) - EVT_SET(LVar3, EVT_PTR(N(ModelListNone))) - EVT_END_IF - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(pra_20_ENTRY_0) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseEq(pra_20_ENTRY_1) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(NearSingleDoorModels))) + Set(LVar3, Ref(N(FarSingleDoorModels))) + Else + Set(LVar2, Ref(N(NearSingleDoorModels))) + Set(LVar3, Ref(N(ModelListNone))) + EndIf + ExecWait(BaseEnterDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(pra_20_ENTRY_2) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothRightDoorModelsL))) + Set(LVar3, Ref(N(BothRightDoorModelsR))) + Else + Set(LVar2, Ref(N(NearRightDoorModelsL))) + Set(LVar3, Ref(N(NearRightDoorModelsR))) + EndIf + ExecWait(BaseEnterDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(pra_20_ENTRY_3) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothRightDoorModelsL))) + Set(LVar3, Ref(N(BothRightDoorModelsR))) + Else + Set(LVar2, Ref(N(BackRightDoorModelsL))) + Set(LVar3, Ref(N(BackRightDoorModelsR))) + EndIf + ExecWait(BaseEnterDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(pra_20_ENTRY_4) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(NearSingleDoorModels))) + Set(LVar3, Ref(N(FarSingleDoorModels))) + Else + Set(LVar2, Ref(N(FarSingleDoorModels))) + Set(LVar3, Ref(N(ModelListNone))) + EndIf + ExecWait(BaseEnterDoor) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(EnableModel, MODEL_o981, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1019, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, MODEL_o945) - EVT_SET(LVar1, MODEL_o947) - EVT_SET(LVar2, TEX_PANNER_0) - EVT_EXEC(N(EVS_GlassShimmer)) - EVT_SET(LVar0, REFLECTION_FLOOR_WALL) - EVT_SET(LVar1, GF_PRA_BrokeIllusion) - EVT_EXEC(N(EVS_SetupReflections)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Exec(N(EVS_SetupMusic)) + Call(EnableModel, MODEL_o981, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1019, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, MODEL_o945) + Set(LVar1, MODEL_o947) + Set(LVar2, TEX_PANNER_0) + Exec(N(EVS_GlassShimmer)) + Set(LVar0, REFLECTION_FLOOR_WALL) + Set(LVar1, GF_PRA_BrokeIllusion) + Exec(N(EVS_SetupReflections)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_pra/pra_21/pra_21_1_music.c b/src/world/area_pra/pra_21/pra_21_1_music.c index cf5707e0960..9267980401b 100644 --- a/src/world/area_pra/pra_21/pra_21_1_music.c +++ b/src/world/area_pra/pra_21/pra_21_1_music.c @@ -1,8 +1,8 @@ #include "pra_21.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Return + End }; diff --git a/src/world/area_pra/pra_21/pra_21_2_main.c b/src/world/area_pra/pra_21/pra_21_2_main.c index e79e8493fee..df4dc8bab4e 100644 --- a/src/world/area_pra/pra_21/pra_21_2_main.c +++ b/src/world/area_pra/pra_21/pra_21_2_main.c @@ -4,89 +4,89 @@ s32 N(DoorModelsL)[] = { MODEL_o977, -1 }; s32 N(DoorModelsR)[] = { MODEL_o976, -1 }; EvtScript N(EVS_ExitDoor_pra_20_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_21_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittnnw) - EVT_SET(LVar2, MODEL_o774) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_20"), pra_20_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_21_ENTRY_0) + Set(LVar1, COLLIDER_deilittnnw) + Set(LVar2, MODEL_o774) + Set(LVar3, DOOR_SWING_IN) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("pra_20"), pra_20_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_36_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_21_ENTRY_1) - EVT_SET(LVar1, COLLIDER_deilittnne) - EVT_SET(LVar2, EVT_PTR(N(DoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(DoorModelsR))) - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_36"), pra_36_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_21_ENTRY_1) + Set(LVar1, COLLIDER_deilittnne) + Set(LVar2, Ref(N(DoorModelsL))) + Set(LVar3, Ref(N(DoorModelsR))) + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_36"), pra_36_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_pra_20_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnnw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_36_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnne, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoor_pra_20_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnnw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_36_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnne, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(pra_21_ENTRY_0) - EVT_SET(LVar2, MODEL_o774) - EVT_SET(LVar3, DOOR_SWING_IN) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_CASE_EQ(pra_21_ENTRY_1) - EVT_SET(LVar2, EVT_PTR(N(DoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(DoorModelsR))) - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_END_SWITCH - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(pra_21_ENTRY_0) + Set(LVar2, MODEL_o774) + Set(LVar3, DOOR_SWING_IN) + ExecWait(EnterSingleDoor) + CaseEq(pra_21_ENTRY_1) + Set(LVar2, Ref(N(DoorModelsL))) + Set(LVar3, Ref(N(DoorModelsR))) + ExecWait(BaseEnterDoor) + EndSwitch + Exec(N(EVS_BindExitTriggers)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_IF_LT(GB_StoryProgress, STORY_CH7_FOUND_HIDDEN_ROOM_UNDER_STATUE) - EVT_SET(LVar0, 0) - EVT_ELSE - EVT_SWITCH(GB_PRA_TwinStatueState) - EVT_CASE_EQ(0) - EVT_SET(LVar0, -50) - EVT_CASE_EQ(1) - EVT_SET(LVar0, -50) - EVT_CASE_EQ(2) - EVT_SET(LVar0, 50) - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(ParentColliderToModel, COLLIDER_o1063, MODEL_o980) - EVT_CALL(TranslateModel, MODEL_o980, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o981, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o982, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o983, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o984, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o1063) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + IfLt(GB_StoryProgress, STORY_CH7_FOUND_HIDDEN_ROOM_UNDER_STATUE) + Set(LVar0, 0) + Else + Switch(GB_PRA_TwinStatueState) + CaseEq(0) + Set(LVar0, -50) + CaseEq(1) + Set(LVar0, -50) + CaseEq(2) + Set(LVar0, 50) + EndSwitch + EndIf + Call(ParentColliderToModel, COLLIDER_o1063, MODEL_o980) + Call(TranslateModel, MODEL_o980, LVar0, 0, 0) + Call(TranslateModel, MODEL_o981, LVar0, 0, 0) + Call(TranslateModel, MODEL_o982, LVar0, 0, 0) + Call(TranslateModel, MODEL_o983, LVar0, 0, 0) + Call(TranslateModel, MODEL_o984, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o1063) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_pra/pra_21/pra_21_3_entity.c b/src/world/area_pra/pra_21/pra_21_3_entity.c index 1b5e1084276..241cbd4b4df 100644 --- a/src/world/area_pra/pra_21/pra_21_3_entity.c +++ b/src/world/area_pra/pra_21/pra_21_3_entity.c @@ -26,62 +26,62 @@ API_CALLABLE(N(MonitorPlayerFloor)) { } EvtScript N(EVS_TetherCamToPlayer) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GE(LVar1, LVar3) - EVT_SET(LVar1, LVar3) - EVT_END_IF - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGe(LVar1, LVar3) + Set(LVar1, LVar3) + EndIf + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_UseSpring) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAUNCH) - EVT_CALL(GetPlayerPos, LVar7, LVar8, LVar9) - EVT_IF_EQ(MV_PlayerFloor, 0) - EVT_SET(LVar3, -175) - EVT_EXEC_GET_TID(N(EVS_TetherCamToPlayer), LVarA) - EVT_CALL(N(GetTargetPosXForSpring)) - EVT_SET(LVar1, -200) - EVT_SET(LVar2, 15) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(2.0)) - EVT_ELSE - EVT_SET(LVar3, 0) - EVT_EXEC_GET_TID(N(EVS_TetherCamToPlayer), LVarA) - EVT_IF_EQ(GB_PRA_TwinStatueState, 2) - EVT_SET(LVar0, 340) - EVT_ELSE - EVT_SET(LVar0, 410) - EVT_END_IF - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 35) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7)) - EVT_END_IF - EVT_CALL(PlayerJump, LVar0, LVar1, LVar9, LVar2) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_WAIT(2) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAUNCH) + Call(GetPlayerPos, LVar7, LVar8, LVar9) + IfEq(MV_PlayerFloor, 0) + Set(LVar3, -175) + ExecGetTID(N(EVS_TetherCamToPlayer), LVarA) + Call(N(GetTargetPosXForSpring)) + Set(LVar1, -200) + Set(LVar2, 15) + Call(SetPlayerJumpscale, Float(2.0)) + Else + Set(LVar3, 0) + ExecGetTID(N(EVS_TetherCamToPlayer), LVarA) + IfEq(GB_PRA_TwinStatueState, 2) + Set(LVar0, 340) + Else + Set(LVar0, 410) + EndIf + Set(LVar1, 0) + Set(LVar2, 35) + Call(SetPlayerJumpscale, Float(0.7)) + EndIf + Call(PlayerJump, LVar0, LVar1, LVar9, LVar2) + KillThread(LVarA) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Wait(2) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_THREAD - EVT_CALL(N(MonitorPlayerFloor)) - EVT_END_THREAD - EVT_CALL(MakeEntity, EVT_PTR(Entity_ScriptSpring), 366, -200, -80, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_UseSpring))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 55, 80, -75, 0, ITEM_MAPLE_SYRUP, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_PRA21_ItemBlock_MapleSyrup) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 50, 0, -75, 0, MODEL_o961, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_PRA21_HiddenPanel) - EVT_RETURN - EVT_END + Thread + Call(N(MonitorPlayerFloor)) + EndThread + Call(MakeEntity, Ref(Entity_ScriptSpring), 366, -200, -80, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_UseSpring))) + Call(MakeEntity, Ref(Entity_YellowBlock), 55, 80, -75, 0, ITEM_MAPLE_SYRUP, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_PRA21_ItemBlock_MapleSyrup) + Call(MakeEntity, Ref(Entity_HiddenPanel), 50, 0, -75, 0, MODEL_o961, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_PRA21_HiddenPanel) + Return + End }; diff --git a/src/world/area_pra/pra_22/pra_22_1_music.c b/src/world/area_pra/pra_22/pra_22_1_music.c index 0c8cc77d46a..d36a1fe359f 100644 --- a/src/world/area_pra/pra_22/pra_22_1_music.c +++ b/src/world/area_pra/pra_22/pra_22_1_music.c @@ -1,8 +1,8 @@ #include "pra_22.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Return + End }; diff --git a/src/world/area_pra/pra_22/pra_22_2_main.c b/src/world/area_pra/pra_22/pra_22_2_main.c index c164d886ec8..0f05c0d2967 100644 --- a/src/world/area_pra/pra_22/pra_22_2_main.c +++ b/src/world/area_pra/pra_22/pra_22_2_main.c @@ -32,210 +32,210 @@ s32 N(DoorModelsL)[] = { MODEL_o1001, -1 }; s32 N(DoorModelsR)[] = { MODEL_o1002, -1 }; EvtScript N(EVS_ExitDoors_pra_20_4) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_22_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittssw) - EVT_SET(LVar2, MODEL_o1085) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC(ExitSingleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_20"), pra_20_ENTRY_4) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_22_ENTRY_0) + Set(LVar1, COLLIDER_deilittssw) + Set(LVar2, MODEL_o1085) + Set(LVar3, DOOR_SWING_OUT) + Exec(ExitSingleDoor) + Wait(17) + Call(GotoMap, Ref("pra_20"), pra_20_ENTRY_4) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_37_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_22_ENTRY_1) - EVT_SET(LVar1, COLLIDER_deilittsse) - EVT_SET(LVar2, EVT_PTR(N(DoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(DoorModelsR))) - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_37"), pra_37_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_22_ENTRY_1) + Set(LVar1, COLLIDER_deilittsse) + Set(LVar2, Ref(N(DoorModelsL))) + Set(LVar3, Ref(N(DoorModelsR))) + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_37"), pra_37_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_20_4)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittssw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_37_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsse, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_pra_20_4)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittssw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_37_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsse, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(pra_22_ENTRY_0) - EVT_SET(LVar2, MODEL_o1085) - EVT_SET(LVar3, DOOR_SWING_OUT) - EVT_EXEC_WAIT(EnterSingleDoor) - EVT_CASE_EQ(pra_22_ENTRY_1) - EVT_SET(LVar2, EVT_PTR(N(DoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(DoorModelsR))) - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_END_SWITCH - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(pra_22_ENTRY_0) + Set(LVar2, MODEL_o1085) + Set(LVar3, DOOR_SWING_OUT) + ExecWait(EnterSingleDoor) + CaseEq(pra_22_ENTRY_1) + Set(LVar2, Ref(N(DoorModelsL))) + Set(LVar3, Ref(N(DoorModelsR))) + ExecWait(BaseEnterDoor) + EndSwitch + Exec(N(EVS_BindExitTriggers)) + Return + End }; EvtScript N(EVS_PushRightStatue_Impl) = { - EVT_LOOP(30) - EVT_CALL(GetPartnerInUse, LVarA) - EVT_IF_NE(LVarA, PARTNER_NONE) - EVT_SET(LVar8, -1) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(UnkFunc11), LVar9) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LVar8, -1) - EVT_RETURN - EVT_ELSE - EVT_CALL(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetPartnerInUse, LVarA) - EVT_IF_NE(LVarA, PARTNER_NONE) - EVT_SET(LVar8, -1) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 100, EVT_FLOAT(0.6)) - EVT_END_THREAD - EVT_THREAD - EVT_IF_GE(LVar6, LVar7) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_ELSE - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_END_IF - EVT_CALL(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar1, LVar0) - EVT_SET(LVar2, LVar7) - EVT_SUB(LVar2, LVar6) - EVT_ADD(LVar1, LVar2) - EVT_CALL(MakeLerp, LVar0, LVar1, 100, EASING_LINEAR) - EVT_SET(LVar3, 0) - EVT_LOOP(0) - EVT_CALL(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) - EVT_CALL(UpdateLerp) - EVT_CALL(N(PreventFalling)) - EVT_IF_EQ(LVarA, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_WAIT(1) - EVT_IF_EQ(LVarA, 1) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_TouchedLava) - EVT_WAIT(15) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(1) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_FALLING) - EVT_WAIT(1) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_THREAD - EVT_CALL(MakeLerp, LVar6, LVar7, 100, EASING_LINEAR) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o1064, SOUND_LOOP_MOVE_STATUE, SOUND_SPACE_DEFAULT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o1005, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o1006, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o1007, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o1008, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o1009, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o1064) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(StopSound, SOUND_LOOP_MOVE_STATUE) - EVT_RETURN - EVT_END + Loop(30) + Call(GetPartnerInUse, LVarA) + IfNe(LVarA, PARTNER_NONE) + Set(LVar8, -1) + Return + EndIf + Call(N(UnkFunc11), LVar9) + IfEq(LVar0, 0) + Set(LVar8, -1) + Return + Else + Call(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) + EndIf + Wait(1) + EndLoop + Call(GetPartnerInUse, LVarA) + IfNe(LVarA, PARTNER_NONE) + Set(LVar8, -1) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 100, Float(0.6)) + EndThread + Thread + IfGe(LVar6, LVar7) + Call(InterpPlayerYaw, 270, 0) + Else + Call(InterpPlayerYaw, 90, 0) + EndIf + Call(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar1, LVar0) + Set(LVar2, LVar7) + Sub(LVar2, LVar6) + Add(LVar1, LVar2) + Call(MakeLerp, LVar0, LVar1, 100, EASING_LINEAR) + Set(LVar3, 0) + Loop(0) + Call(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) + Call(UpdateLerp) + Call(N(PreventFalling)) + IfEq(LVarA, TRUE) + BreakLoop + EndIf + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Wait(1) + IfEq(LVarA, 1) + Call(DisablePlayerPhysics, TRUE) + Wait(1) + Call(SetPlayerAnimation, ANIM_MarioW2_TouchedLava) + Wait(15) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(1) + Call(DisablePlayerPhysics, FALSE) + Call(SetPlayerActionState, ACTION_STATE_FALLING) + Wait(1) + EndIf + Call(DisablePlayerInput, FALSE) + EndThread + Call(MakeLerp, LVar6, LVar7, 100, EASING_LINEAR) + Call(PlaySoundAtCollider, COLLIDER_o1064, SOUND_LOOP_MOVE_STATUE, SOUND_SPACE_DEFAULT) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o1005, LVar0, 0, 0) + Call(TranslateModel, MODEL_o1006, LVar0, 0, 0) + Call(TranslateModel, MODEL_o1007, LVar0, 0, 0) + Call(TranslateModel, MODEL_o1008, LVar0, 0, 0) + Call(TranslateModel, MODEL_o1009, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o1064) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(StopSound, SOUND_LOOP_MOVE_STATUE) + Return + End }; EvtScript N(EVS_PushStatue) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LE(LVar0, 337) - EVT_SET(LVar6, 0) - EVT_SET(LVar7, 50) - EVT_SET(LVar8, 2) - EVT_END_IF - EVT_IF_GE(LVar0, 413) - EVT_SET(LVar6, 0) - EVT_SET(LVar7, -50) - EVT_SET(LVar8, 1) - EVT_ELSE - EVT_RETURN - EVT_END_IF - EVT_SET(LVar9, COLLIDER_o1064) - EVT_EXEC_WAIT(N(EVS_PushRightStatue_Impl)) - EVT_IF_NE(LVar8, -1) - EVT_SET(GB_StoryProgress, STORY_CH7_FOUND_HIDDEN_ROOM_UNDER_STATUE) - EVT_SET(GB_PRA_TwinStatueState, LVar8) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_UNBIND - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLe(LVar0, 337) + Set(LVar6, 0) + Set(LVar7, 50) + Set(LVar8, 2) + EndIf + IfGe(LVar0, 413) + Set(LVar6, 0) + Set(LVar7, -50) + Set(LVar8, 1) + Else + Return + EndIf + Set(LVar9, COLLIDER_o1064) + ExecWait(N(EVS_PushRightStatue_Impl)) + IfNe(LVar8, -1) + Set(GB_StoryProgress, STORY_CH7_FOUND_HIDDEN_ROOM_UNDER_STATUE) + Set(GB_PRA_TwinStatueState, LVar8) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(1.0)) + EndThread + Unbind + EndIf + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_IF_LT(GB_StoryProgress, STORY_CH7_FOUND_HIDDEN_ROOM_UNDER_STATUE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_PushStatue)), TRIGGER_WALL_PUSH, COLLIDER_o1064, 1, 0) - EVT_SET(LVar0, 0) - EVT_ELSE - EVT_SWITCH(GB_PRA_TwinStatueState) - EVT_CASE_EQ(0) - EVT_SET(LVar0, -50) - EVT_CASE_EQ(1) - EVT_SET(LVar0, -50) - EVT_CASE_EQ(2) - EVT_SET(LVar0, 50) - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(ParentColliderToModel, COLLIDER_o1064, MODEL_o1005) - EVT_CALL(TranslateModel, MODEL_o1005, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o1006, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o1007, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o1008, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o1009, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o1064) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + IfLt(GB_StoryProgress, STORY_CH7_FOUND_HIDDEN_ROOM_UNDER_STATUE) + BindTrigger(Ref(N(EVS_PushStatue)), TRIGGER_WALL_PUSH, COLLIDER_o1064, 1, 0) + Set(LVar0, 0) + Else + Switch(GB_PRA_TwinStatueState) + CaseEq(0) + Set(LVar0, -50) + CaseEq(1) + Set(LVar0, -50) + CaseEq(2) + Set(LVar0, 50) + EndSwitch + EndIf + Call(ParentColliderToModel, COLLIDER_o1064, MODEL_o1005) + Call(TranslateModel, MODEL_o1005, LVar0, 0, 0) + Call(TranslateModel, MODEL_o1006, LVar0, 0, 0) + Call(TranslateModel, MODEL_o1007, LVar0, 0, 0) + Call(TranslateModel, MODEL_o1008, LVar0, 0, 0) + Call(TranslateModel, MODEL_o1009, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o1064) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_pra/pra_22/pra_22_3_entity.c b/src/world/area_pra/pra_22/pra_22_3_entity.c index dc83aaf7728..462e9b58fe4 100644 --- a/src/world/area_pra/pra_22/pra_22_3_entity.c +++ b/src/world/area_pra/pra_22/pra_22_3_entity.c @@ -26,62 +26,62 @@ API_CALLABLE(N(MonitorPlayerFloor)) { } EvtScript N(EVS_TetherCamToPlayer) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GE(LVar1, LVar3) - EVT_SET(LVar1, LVar3) - EVT_END_IF - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGe(LVar1, LVar3) + Set(LVar1, LVar3) + EndIf + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_UseSpring) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAUNCH) - EVT_CALL(GetPlayerPos, LVar7, LVar8, LVar9) - EVT_IF_EQ(MV_PlayerFloor, 0) - EVT_SET(LVar3, -175) - EVT_EXEC_GET_TID(N(EVS_TetherCamToPlayer), LVarA) - EVT_CALL(N(GetTargetPosXForSpring)) - EVT_SET(LVar1, -200) - EVT_SET(LVar2, 15) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(2.0)) - EVT_ELSE - EVT_SET(LVar3, 0) - EVT_EXEC_GET_TID(N(EVS_TetherCamToPlayer), LVarA) - EVT_IF_EQ(GB_PRA_TwinStatueState, 2) - EVT_SET(LVar0, 340) - EVT_ELSE - EVT_SET(LVar0, 410) - EVT_END_IF - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 35) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7)) - EVT_END_IF - EVT_CALL(PlayerJump, LVar0, LVar1, LVar9, LVar2) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_WAIT(2) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAUNCH) + Call(GetPlayerPos, LVar7, LVar8, LVar9) + IfEq(MV_PlayerFloor, 0) + Set(LVar3, -175) + ExecGetTID(N(EVS_TetherCamToPlayer), LVarA) + Call(N(GetTargetPosXForSpring)) + Set(LVar1, -200) + Set(LVar2, 15) + Call(SetPlayerJumpscale, Float(2.0)) + Else + Set(LVar3, 0) + ExecGetTID(N(EVS_TetherCamToPlayer), LVarA) + IfEq(GB_PRA_TwinStatueState, 2) + Set(LVar0, 340) + Else + Set(LVar0, 410) + EndIf + Set(LVar1, 0) + Set(LVar2, 35) + Call(SetPlayerJumpscale, Float(0.7)) + EndIf + Call(PlayerJump, LVar0, LVar1, LVar9, LVar2) + KillThread(LVarA) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Wait(2) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_THREAD - EVT_CALL(N(MonitorPlayerFloor)) - EVT_END_THREAD - EVT_CALL(MakeEntity, EVT_PTR(Entity_ScriptSpring), 366, -200, 80, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_UseSpring))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 55, 80, 75, 0, ITEM_JAMMIN_JELLY, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_PRA22_HiddenItem_JamminJelly) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 50, 0, 75, 0, MODEL_o1088, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_PRA22_HiddenPanel) - EVT_RETURN - EVT_END + Thread + Call(N(MonitorPlayerFloor)) + EndThread + Call(MakeEntity, Ref(Entity_ScriptSpring), 366, -200, 80, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_UseSpring))) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 55, 80, 75, 0, ITEM_JAMMIN_JELLY, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_PRA22_HiddenItem_JamminJelly) + Call(MakeEntity, Ref(Entity_HiddenPanel), 50, 0, 75, 0, MODEL_o1088, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_PRA22_HiddenPanel) + Return + End }; diff --git a/src/world/area_pra/pra_27/pra_27_1_music.c b/src/world/area_pra/pra_27/pra_27_1_music.c index 5f0f230f776..b3e61ae1c78 100644 --- a/src/world/area_pra/pra_27/pra_27_1_music.c +++ b/src/world/area_pra/pra_27/pra_27_1_music.c @@ -1,8 +1,8 @@ #include "pra_27.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Return + End }; diff --git a/src/world/area_pra/pra_27/pra_27_2_main.c b/src/world/area_pra/pra_27/pra_27_2_main.c index ed581d09963..e9e2c06b36f 100644 --- a/src/world/area_pra/pra_27/pra_27_2_main.c +++ b/src/world/area_pra/pra_27/pra_27_2_main.c @@ -14,50 +14,50 @@ s32 N(DoorModelsL)[] = { MODEL_o772, MODEL_o844, -1 }; s32 N(DoorModelsR)[] = { MODEL_o768, MODEL_o846, -1 }; EvtScript N(EVS_ExitDoors_pra_36_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_27_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittsw) - EVT_SET(LVar2, EVT_PTR(N(DoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(DoorModelsR))) - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_36"), pra_36_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_27_ENTRY_0) + Set(LVar1, COLLIDER_deilittsw) + Set(LVar2, Ref(N(DoorModelsL))) + Set(LVar3, Ref(N(DoorModelsR))) + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_36"), pra_36_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_36_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_pra_36_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_SET(LVar0, pra_27_ENTRY_0) - EVT_SET(LVar2, EVT_PTR(N(DoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(DoorModelsR))) - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END + Set(LVar0, pra_27_ENTRY_0) + Set(LVar2, Ref(N(DoorModelsL))) + Set(LVar3, Ref(N(DoorModelsR))) + ExecWait(BaseEnterDoor) + Exec(N(EVS_BindExitTriggers)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(LVar0, REFLECTION_FLOOR_ONLY) - EVT_SET(LVar1, GF_PRA_BrokeIllusion) - EVT_EXEC(N(EVS_SetupReflections)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Set(LVar0, REFLECTION_FLOOR_ONLY) + Set(LVar1, GF_PRA_BrokeIllusion) + Exec(N(EVS_SetupReflections)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_pra/pra_27/pra_27_3_entity.c b/src/world/area_pra/pra_27/pra_27_3_entity.c index 62763d319ff..40c70b9cd25 100644 --- a/src/world/area_pra/pra_27/pra_27_3_entity.c +++ b/src/world/area_pra/pra_27/pra_27_3_entity.c @@ -6,9 +6,9 @@ EvtScript N(EVS_OpenChest_PalaceKey) = EVT_OPEN_CHEST_KEY(ITEM_CRYSTAL_PALACE_KEY, GF_PRA27_Chest_PalaceKey); EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 200, 20, 94, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_PRA27_Chest_PalaceKey) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenChest_PalaceKey))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Chest), 200, 20, 94, 0, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_PRA27_Chest_PalaceKey) + Call(AssignScript, Ref(N(EVS_OpenChest_PalaceKey))) + Return + End }; diff --git a/src/world/area_pra/pra_28/pra_28_1_music.c b/src/world/area_pra/pra_28/pra_28_1_music.c index 34bb62ed420..a0e5f10f90e 100644 --- a/src/world/area_pra/pra_28/pra_28_1_music.c +++ b/src/world/area_pra/pra_28/pra_28_1_music.c @@ -1,8 +1,8 @@ #include "pra_28.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Return + End }; diff --git a/src/world/area_pra/pra_28/pra_28_2_main.c b/src/world/area_pra/pra_28/pra_28_2_main.c index f9939cf46f3..5544c1dbd1c 100644 --- a/src/world/area_pra/pra_28/pra_28_2_main.c +++ b/src/world/area_pra/pra_28/pra_28_2_main.c @@ -14,50 +14,50 @@ s32 N(DoorModelsL)[] = { MODEL_o772, MODEL_o844, -1 }; s32 N(DoorModelsR)[] = { MODEL_o768, MODEL_o846, -1 }; EvtScript N(EVS_ExitDoors_pra_37_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_28_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittsw) - EVT_SET(LVar2, EVT_PTR(N(DoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(DoorModelsR))) - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_37"), pra_37_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_28_ENTRY_0) + Set(LVar1, COLLIDER_deilittsw) + Set(LVar2, Ref(N(DoorModelsL))) + Set(LVar3, Ref(N(DoorModelsR))) + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_37"), pra_37_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_37_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_pra_37_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_SET(LVar0, pra_28_ENTRY_0) - EVT_SET(LVar2, EVT_PTR(N(DoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(DoorModelsR))) - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END + Set(LVar0, pra_28_ENTRY_0) + Set(LVar2, Ref(N(DoorModelsL))) + Set(LVar3, Ref(N(DoorModelsR))) + ExecWait(BaseEnterDoor) + Exec(N(EVS_BindExitTriggers)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(LVar0, REFLECTION_FLOOR_ONLY) - EVT_SET(LVar1, GF_PRA_BrokeIllusion) - EVT_EXEC(N(EVS_SetupReflections)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Set(LVar0, REFLECTION_FLOOR_ONLY) + Set(LVar1, GF_PRA_BrokeIllusion) + Exec(N(EVS_SetupReflections)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_pra/pra_28/pra_28_3_entity.c b/src/world/area_pra/pra_28/pra_28_3_entity.c index a14f47cfd0f..b710d508703 100644 --- a/src/world/area_pra/pra_28/pra_28_3_entity.c +++ b/src/world/area_pra/pra_28/pra_28_3_entity.c @@ -6,9 +6,9 @@ EvtScript N(EVS_OpenChest_PUpDDown) = EVT_OPEN_CHEST_BADGE(ITEM_P_UP_D_DOWN, GF_PRA28_Chest_PUpDDown); EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 200, 20, 94, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_PRA28_Chest_PUpDDown) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenChest_PUpDDown))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Chest), 200, 20, 94, 0, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_PRA28_Chest_PUpDDown) + Call(AssignScript, Ref(N(EVS_OpenChest_PUpDDown))) + Return + End }; diff --git a/src/world/area_pra/pra_29/pra_29_1_music.c b/src/world/area_pra/pra_29/pra_29_1_music.c index c313ca22cd8..9b117bf68cc 100644 --- a/src/world/area_pra/pra_29/pra_29_1_music.c +++ b/src/world/area_pra/pra_29/pra_29_1_music.c @@ -1,8 +1,8 @@ #include "pra_29.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Return + End }; diff --git a/src/world/area_pra/pra_29/pra_29_2_entity.c b/src/world/area_pra/pra_29/pra_29_2_entity.c index 09fc29ec56e..80a8ba2bb79 100644 --- a/src/world/area_pra/pra_29/pra_29_2_entity.c +++ b/src/world/area_pra/pra_29/pra_29_2_entity.c @@ -2,12 +2,12 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH7_EXTENDED_PALACE_BRIDGE) - EVT_ELSE - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueSwitch), 330, 0, -77, 0, 2, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueSwitch), 330, 0, 77, 0, 1, MAKE_ENTITY_END) - EVT_CALL(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_PRA09_HitSwitch)) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH7_EXTENDED_PALACE_BRIDGE) + Else + Call(MakeEntity, Ref(Entity_BlueSwitch), 330, 0, -77, 0, 2, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BlueSwitch), 330, 0, 77, 0, 1, MAKE_ENTITY_END) + Call(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_PRA09_HitSwitch)) + EndIf + Return + End }; diff --git a/src/world/area_pra/pra_29/pra_29_3_main.c b/src/world/area_pra/pra_29/pra_29_3_main.c index 7722f8914fe..ed3ca82c917 100644 --- a/src/world/area_pra/pra_29/pra_29_3_main.c +++ b/src/world/area_pra/pra_29/pra_29_3_main.c @@ -20,158 +20,158 @@ s32 N(BothRightDoorModelsL)[] = { MODEL_o995, MODEL_o1096, -1 }; s32 N(BothRightDoorModelsR)[] = { MODEL_o997, MODEL_o1094, -1 }; EvtScript N(EVS_ExitDoors_pra_20_2) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_29_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittsw) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothLeftDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(NearLeftDoorModelsR))) - EVT_END_IF - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_20"), pra_20_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_29_ENTRY_0) + Set(LVar1, COLLIDER_deilittsw) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothLeftDoorModelsL))) + Set(LVar3, Ref(N(BothLeftDoorModelsR))) + Else + Set(LVar2, Ref(N(NearLeftDoorModelsL))) + Set(LVar3, Ref(N(NearLeftDoorModelsR))) + EndIf + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_20"), pra_20_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_34_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_29_ENTRY_1) - EVT_SET(LVar1, COLLIDER_deilittse) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothRightDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(NearRightDoorModelsR))) - EVT_END_IF - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_34"), pra_34_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_29_ENTRY_1) + Set(LVar1, COLLIDER_deilittse) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothRightDoorModelsL))) + Set(LVar3, Ref(N(BothRightDoorModelsR))) + Else + Set(LVar2, Ref(N(NearRightDoorModelsL))) + Set(LVar3, Ref(N(NearRightDoorModelsR))) + EndIf + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_34"), pra_34_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_34_3) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_29_ENTRY_2) - EVT_SET(LVar1, COLLIDER_deilittne) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothRightDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(FarRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(FarRightDoorModelsR))) - EVT_END_IF - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_34"), pra_34_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_29_ENTRY_2) + Set(LVar1, COLLIDER_deilittne) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothRightDoorModelsL))) + Set(LVar3, Ref(N(BothRightDoorModelsR))) + Else + Set(LVar2, Ref(N(FarRightDoorModelsL))) + Set(LVar3, Ref(N(FarRightDoorModelsR))) + EndIf + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_34"), pra_34_ENTRY_3) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_20_3) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_29_ENTRY_3) - EVT_SET(LVar1, COLLIDER_deilittnw) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothLeftDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(FarLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(FarLeftDoorModelsR))) - EVT_END_IF - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_20"), pra_20_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_29_ENTRY_3) + Set(LVar1, COLLIDER_deilittnw) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothLeftDoorModelsL))) + Set(LVar3, Ref(N(BothLeftDoorModelsR))) + Else + Set(LVar2, Ref(N(FarLeftDoorModelsL))) + Set(LVar3, Ref(N(FarLeftDoorModelsR))) + EndIf + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_20"), pra_20_ENTRY_3) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_20_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_34_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_34_3)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_20_3)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_pra_20_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_34_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_34_3)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_20_3)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(pra_29_ENTRY_0) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothLeftDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(NearLeftDoorModelsR))) - EVT_END_IF - EVT_CASE_EQ(pra_29_ENTRY_1) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothRightDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(NearRightDoorModelsR))) - EVT_END_IF - EVT_CASE_EQ(pra_29_ENTRY_2) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothRightDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(FarRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(FarRightDoorModelsR))) - EVT_END_IF - EVT_CASE_EQ(pra_29_ENTRY_3) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothLeftDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(FarLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(FarLeftDoorModelsR))) - EVT_END_IF - EVT_END_SWITCH - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(pra_29_ENTRY_0) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothLeftDoorModelsL))) + Set(LVar3, Ref(N(BothLeftDoorModelsR))) + Else + Set(LVar2, Ref(N(NearLeftDoorModelsL))) + Set(LVar3, Ref(N(NearLeftDoorModelsR))) + EndIf + CaseEq(pra_29_ENTRY_1) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothRightDoorModelsL))) + Set(LVar3, Ref(N(BothRightDoorModelsR))) + Else + Set(LVar2, Ref(N(NearRightDoorModelsL))) + Set(LVar3, Ref(N(NearRightDoorModelsR))) + EndIf + CaseEq(pra_29_ENTRY_2) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothRightDoorModelsL))) + Set(LVar3, Ref(N(BothRightDoorModelsR))) + Else + Set(LVar2, Ref(N(FarRightDoorModelsL))) + Set(LVar3, Ref(N(FarRightDoorModelsR))) + EndIf + CaseEq(pra_29_ENTRY_3) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothLeftDoorModelsL))) + Set(LVar3, Ref(N(BothLeftDoorModelsR))) + Else + Set(LVar2, Ref(N(FarLeftDoorModelsL))) + Set(LVar3, Ref(N(FarLeftDoorModelsR))) + EndIf + EndSwitch + ExecWait(BaseEnterDoor) + Exec(N(EVS_BindExitTriggers)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_SetupBridge)) - EVT_SET(LVar0, MODEL_o945) - EVT_SET(LVar1, MODEL_o945) - EVT_SET(LVar2, TEX_PANNER_0) - EVT_EXEC(N(EVS_GlassShimmer)) - EVT_SET(LVar0, REFLECTION_WALL_ONLY) - EVT_IF_GE(GB_StoryProgress, STORY_CH7_EXTENDED_PALACE_BRIDGE) - EVT_SET(LVar1, TRUE) - EVT_ELSE - EVT_SET(LVar1, FALSE) - EVT_END_IF - EVT_EXEC(N(EVS_SetupReflections)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_SetupBridge)) + Set(LVar0, MODEL_o945) + Set(LVar1, MODEL_o945) + Set(LVar2, TEX_PANNER_0) + Exec(N(EVS_GlassShimmer)) + Set(LVar0, REFLECTION_WALL_ONLY) + IfGe(GB_StoryProgress, STORY_CH7_EXTENDED_PALACE_BRIDGE) + Set(LVar1, TRUE) + Else + Set(LVar1, FALSE) + EndIf + Exec(N(EVS_SetupReflections)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_pra/pra_29/pra_29_4_bridge.c b/src/world/area_pra/pra_29/pra_29_4_bridge.c index 013fd1881c4..60d33de8fbb 100644 --- a/src/world/area_pra/pra_29/pra_29_4_bridge.c +++ b/src/world/area_pra/pra_29/pra_29_4_bridge.c @@ -49,60 +49,60 @@ void N(setup_gfx_bridge)(s32 index) { #include "world/common/todo/PlayRisingBubble.inc.c" EvtScript N(EVS_ExtendBridgeFromMirror) = { - EVT_WAIT(40) - EVT_THREAD - EVT_LOOP(5) - EVT_CALL(N(PlayRisingBubble), 260, 0, 0) - EVT_WAIT(10) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(PlaySoundAt, SOUND_PRA_EXTEND_HIDDEN_BRIDGE, SOUND_SPACE_DEFAULT, 250, 0, 0) - EVT_CALL(MakeLerp, 0, 511, 80, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(MV_BridgeExtendAmt, LVar0) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1041, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GB_StoryProgress, STORY_CH7_EXTENDED_PALACE_BRIDGE) - EVT_UNBIND - EVT_RETURN - EVT_END + Wait(40) + Thread + Loop(5) + Call(N(PlayRisingBubble), 260, 0, 0) + Wait(10) + EndLoop + EndThread + Call(PlaySoundAt, SOUND_PRA_EXTEND_HIDDEN_BRIDGE, SOUND_SPACE_DEFAULT, 250, 0, 0) + Call(MakeLerp, 0, 511, 80, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Set(MV_BridgeExtendAmt, LVar0) + IfEq(LVar1, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1041, COLLIDER_FLAGS_UPPER_MASK) + Set(GB_StoryProgress, STORY_CH7_EXTENDED_PALACE_BRIDGE) + Unbind + Return + End }; EvtScript N(EVS_SetupBridge) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH7_EXTENDED_PALACE_BRIDGE) - EVT_CALL(EnableModel, MODEL_u00, FALSE) - EVT_CALL(EnableModel, MODEL_s00, FALSE) - EVT_SET(MV_BridgeExtendAmt, 0) - EVT_SET(MV_UnusedBridgeAlpha, 255) - EVT_CALL(SetModelCustomGfx, MODEL_u02, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelCustomGfx, MODEL_s02, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) - EVT_CALL(SetModelFlags, MODEL_u02, MODEL_FLAG_USES_CUSTOM_GFX, FALSE) - EVT_CALL(SetModelFlags, MODEL_s02, MODEL_FLAG_USES_CUSTOM_GFX, FALSE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_0, EVT_PTR(N(setup_gfx_bridge)), NULL) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(setup_gfx_bridge)), NULL) - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_0, MODEL_u02, TRUE) - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_1, MODEL_u01, FALSE) - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_2, MODEL_u03, FALSE) - EVT_CALL(SetModelFlags, MODEL_u02, MODEL_FLAG_USES_CUSTOM_GFX | MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_3, MODEL_s02, TRUE) - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_4, MODEL_s01, FALSE) - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_5, MODEL_s03, FALSE) - EVT_CALL(SetModelFlags, MODEL_s02, MODEL_FLAG_USES_CUSTOM_GFX | MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExtendBridgeFromMirror)), TRIGGER_AREA_FLAG_SET, AF_PRA09_HitSwitch, 1, 0) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1041, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_u00, FALSE) - EVT_CALL(EnableModel, MODEL_u01, FALSE) - EVT_CALL(EnableModel, MODEL_u02, FALSE) - EVT_CALL(EnableModel, MODEL_s00, FALSE) - EVT_CALL(EnableModel, MODEL_s01, FALSE) - EVT_CALL(EnableModel, MODEL_s02, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH7_EXTENDED_PALACE_BRIDGE) + Call(EnableModel, MODEL_u00, FALSE) + Call(EnableModel, MODEL_s00, FALSE) + Set(MV_BridgeExtendAmt, 0) + Set(MV_UnusedBridgeAlpha, 255) + Call(SetModelCustomGfx, MODEL_u02, CUSTOM_GFX_0, ENV_TINT_UNCHANGED) + Call(SetModelCustomGfx, MODEL_s02, CUSTOM_GFX_1, ENV_TINT_UNCHANGED) + Call(SetModelFlags, MODEL_u02, MODEL_FLAG_USES_CUSTOM_GFX, FALSE) + Call(SetModelFlags, MODEL_s02, MODEL_FLAG_USES_CUSTOM_GFX, FALSE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_0, Ref(N(setup_gfx_bridge)), NULL) + Call(SetCustomGfxBuilders, CUSTOM_GFX_1, Ref(N(setup_gfx_bridge)), NULL) + Call(MakeLocalVertexCopy, VTX_COPY_0, MODEL_u02, TRUE) + Call(MakeLocalVertexCopy, VTX_COPY_1, MODEL_u01, FALSE) + Call(MakeLocalVertexCopy, VTX_COPY_2, MODEL_u03, FALSE) + Call(SetModelFlags, MODEL_u02, MODEL_FLAG_USES_CUSTOM_GFX | MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) + Call(MakeLocalVertexCopy, VTX_COPY_3, MODEL_s02, TRUE) + Call(MakeLocalVertexCopy, VTX_COPY_4, MODEL_s01, FALSE) + Call(MakeLocalVertexCopy, VTX_COPY_5, MODEL_s03, FALSE) + Call(SetModelFlags, MODEL_s02, MODEL_FLAG_USES_CUSTOM_GFX | MODEL_FLAG_HAS_LOCAL_VERTEX_COPY, TRUE) + BindTrigger(Ref(N(EVS_ExtendBridgeFromMirror)), TRIGGER_AREA_FLAG_SET, AF_PRA09_HitSwitch, 1, 0) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1041, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_u00, FALSE) + Call(EnableModel, MODEL_u01, FALSE) + Call(EnableModel, MODEL_u02, FALSE) + Call(EnableModel, MODEL_s00, FALSE) + Call(EnableModel, MODEL_s01, FALSE) + Call(EnableModel, MODEL_s02, FALSE) + EndIf + Return + End }; diff --git a/src/world/area_pra/pra_31/pra_31_1_music.c b/src/world/area_pra/pra_31/pra_31_1_music.c index 228ff38c3ed..126a746149a 100644 --- a/src/world/area_pra/pra_31/pra_31_1_music.c +++ b/src/world/area_pra/pra_31/pra_31_1_music.c @@ -1,8 +1,8 @@ #include "pra_31.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Return + End }; diff --git a/src/world/area_pra/pra_31/pra_31_2_npc.c b/src/world/area_pra/pra_31/pra_31_2_npc.c index 33cc7402d1e..426766e43dc 100644 --- a/src/world/area_pra/pra_31/pra_31_2_npc.c +++ b/src/world/area_pra/pra_31/pra_31_2_npc.c @@ -31,139 +31,139 @@ API_CALLABLE(N(CalculateDinoLerpValues)) { } EvtScript N(EVS_ChangeDinoDirection) = { - EVT_CALL(N(GetAngleToPlayer)) - EVT_SWITCH(LVar0) - EVT_CASE_RANGE(45, 134) - EVT_SET(LVar5, 90) - EVT_SET(LVar6, ANIM_AlbinoDino_Still) - EVT_SET(LVarA, 90) - EVT_CASE_RANGE(135, 224) - EVT_SET(LVar5, 180) - EVT_SET(LVar6, ANIM_AlbinoDino_StillFwd) - EVT_SET(LVarA, 270) - EVT_CASE_RANGE(225, 314) - EVT_SET(LVar5, 270) - EVT_SET(LVar6, ANIM_AlbinoDino_Still) - EVT_SET(LVarA, 270) - EVT_CASE_DEFAULT - EVT_SET(LVar5, 0) - EVT_SET(LVar6, ANIM_AlbinoDino_StillBack) - EVT_SET(LVarA, 270) - EVT_END_SWITCH - EVT_SWITCH(LVar3) - EVT_CASE_EQ(NPC_AlbinoDino_01) - EVT_SET(LVar0, MV_DinoYaw_01) - EVT_CASE_EQ(NPC_AlbinoDino_02) - EVT_SET(LVar0, MV_DinoYaw_02) - EVT_CASE_EQ(NPC_AlbinoDino_03) - EVT_SET(LVar0, MV_DinoYaw_03) - EVT_END_SWITCH - EVT_IF_NE(LVar5, LVar0) - EVT_THREAD - EVT_CALL(N(CalculateDinoLerpValues)) - EVT_CALL(MakeLerp, LVar6, LVar7, LVar8, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SWITCH(LVar3) - EVT_CASE_EQ(NPC_AlbinoDino_01) - EVT_SET(MV_StatueYaw_01, LVar0) - EVT_CASE_EQ(NPC_AlbinoDino_02) - EVT_SET(MV_StatueYaw_02, LVar0) - EVT_CASE_EQ(NPC_AlbinoDino_03) - EVT_SET(MV_StatueYaw_03, LVar0) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_PRA_ROTATE_ALBINO_DINO, SOUND_SPACE_DEFAULT) - EVT_SWITCH(LVar5) - EVT_CASE_OR_EQ(90) - EVT_CASE_OR_EQ(270) - EVT_CALL(MakeLerp, 0, 540, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, 0) - EVT_CALL(SetNpcYaw, NPC_SELF, LVarA) - EVT_CASE_DEFAULT - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(SetNpcYaw, NPC_SELF, LVarA) - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, 360, 20, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, LVar6) - EVT_SWITCH(LVar3) - EVT_CASE_EQ(NPC_AlbinoDino_01) - EVT_SET(MV_DinoYaw_01, LVar5) - EVT_CASE_EQ(NPC_AlbinoDino_02) - EVT_SET(MV_DinoYaw_02, LVar5) - EVT_CASE_EQ(NPC_AlbinoDino_03) - EVT_SET(MV_DinoYaw_03, LVar5) - EVT_END_SWITCH - EVT_CALL(N(SetDinoAngle), LVar3, LVar5) - EVT_CALL(SpeakToPlayer, NPC_SELF, LVar6, LVar6, 5, LVar4) - EVT_RETURN - EVT_END + Call(N(GetAngleToPlayer)) + Switch(LVar0) + CaseRange(45, 134) + Set(LVar5, 90) + Set(LVar6, ANIM_AlbinoDino_Still) + Set(LVarA, 90) + CaseRange(135, 224) + Set(LVar5, 180) + Set(LVar6, ANIM_AlbinoDino_StillFwd) + Set(LVarA, 270) + CaseRange(225, 314) + Set(LVar5, 270) + Set(LVar6, ANIM_AlbinoDino_Still) + Set(LVarA, 270) + CaseDefault + Set(LVar5, 0) + Set(LVar6, ANIM_AlbinoDino_StillBack) + Set(LVarA, 270) + EndSwitch + Switch(LVar3) + CaseEq(NPC_AlbinoDino_01) + Set(LVar0, MV_DinoYaw_01) + CaseEq(NPC_AlbinoDino_02) + Set(LVar0, MV_DinoYaw_02) + CaseEq(NPC_AlbinoDino_03) + Set(LVar0, MV_DinoYaw_03) + EndSwitch + IfNe(LVar5, LVar0) + Thread + Call(N(CalculateDinoLerpValues)) + Call(MakeLerp, LVar6, LVar7, LVar8, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Switch(LVar3) + CaseEq(NPC_AlbinoDino_01) + Set(MV_StatueYaw_01, LVar0) + CaseEq(NPC_AlbinoDino_02) + Set(MV_StatueYaw_02, LVar0) + CaseEq(NPC_AlbinoDino_03) + Set(MV_StatueYaw_03, LVar0) + EndSwitch + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(PlaySoundAtNpc, NPC_SELF, SOUND_PRA_ROTATE_ALBINO_DINO, SOUND_SPACE_DEFAULT) + Switch(LVar5) + CaseOrEq(90) + CaseOrEq(270) + Call(MakeLerp, 0, 540, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_SELF, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcRotation, NPC_SELF, 0, 0, 0) + Call(SetNpcYaw, NPC_SELF, LVarA) + CaseDefault + Thread + Wait(15) + Call(SetNpcYaw, NPC_SELF, LVarA) + EndThread + Call(MakeLerp, 0, 360, 20, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_SELF, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndSwitch + EndIf + Call(SetNpcAnimation, NPC_SELF, LVar6) + Switch(LVar3) + CaseEq(NPC_AlbinoDino_01) + Set(MV_DinoYaw_01, LVar5) + CaseEq(NPC_AlbinoDino_02) + Set(MV_DinoYaw_02, LVar5) + CaseEq(NPC_AlbinoDino_03) + Set(MV_DinoYaw_03, LVar5) + EndSwitch + Call(N(SetDinoAngle), LVar3, LVar5) + Call(SpeakToPlayer, NPC_SELF, LVar6, LVar6, 5, LVar4) + Return + End }; EvtScript N(EVS_NpcInteract_AlbinoDino_01) = { - EVT_SET(LVar3, NPC_AlbinoDino_01) - EVT_SET(LVar4, MSG_CH7_0167) - EVT_EXEC_WAIT(N(EVS_ChangeDinoDirection)) - EVT_RETURN - EVT_END + Set(LVar3, NPC_AlbinoDino_01) + Set(LVar4, MSG_CH7_0167) + ExecWait(N(EVS_ChangeDinoDirection)) + Return + End }; EvtScript N(EVS_NpcInteract_AlbinoDino_02) = { - EVT_SET(LVar3, NPC_AlbinoDino_02) - EVT_SET(LVar4, MSG_CH7_0168) - EVT_EXEC_WAIT(N(EVS_ChangeDinoDirection)) - EVT_RETURN - EVT_END + Set(LVar3, NPC_AlbinoDino_02) + Set(LVar4, MSG_CH7_0168) + ExecWait(N(EVS_ChangeDinoDirection)) + Return + End }; EvtScript N(EVS_NpcInteract_AlbinoDino_03) = { - EVT_SET(LVar3, NPC_AlbinoDino_03) - EVT_SET(LVar4, MSG_CH7_0169) - EVT_EXEC_WAIT(N(EVS_ChangeDinoDirection)) - EVT_RETURN - EVT_END + Set(LVar3, NPC_AlbinoDino_03) + Set(LVar4, MSG_CH7_0169) + ExecWait(N(EVS_ChangeDinoDirection)) + Return + End }; EvtScript N(EVS_NpcInit_AlbinoDino_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_AlbinoDino_01))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_AlbinoDino_01))) + Return + End }; EvtScript N(EVS_NpcInit_AlbinoDino_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_AlbinoDino_02))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_AlbinoDino_02))) + Return + End }; EvtScript N(EVS_NpcInit_AlbinoDino_03) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_AlbinoDino_03))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_AlbinoDino_03))) + Return + End }; NpcData N(NpcData_AlbinoDinos)[] = { diff --git a/src/world/area_pra/pra_31/pra_31_3_main.c b/src/world/area_pra/pra_31/pra_31_3_main.c index 27325d535a3..a99b6368c38 100644 --- a/src/world/area_pra/pra_31/pra_31_3_main.c +++ b/src/world/area_pra/pra_31/pra_31_3_main.c @@ -8,89 +8,89 @@ s32 N(FarLeftDoorModelsL)[] = { MODEL_o859, -1 }; s32 N(FarLeftDoorModelsR)[] = { MODEL_o861, -1 }; EvtScript N(EVS_ExitDoors_pra_34_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_31_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittsw) - EVT_SET(LVar2, EVT_PTR(N(NearLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(NearLeftDoorModelsR))) - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_34"), pra_34_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_31_ENTRY_0) + Set(LVar1, COLLIDER_deilittsw) + Set(LVar2, Ref(N(NearLeftDoorModelsL))) + Set(LVar3, Ref(N(NearLeftDoorModelsR))) + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_34"), pra_34_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_40_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_31_ENTRY_1) - EVT_SET(LVar1, COLLIDER_deilitte) - EVT_SET(LVar2, EVT_PTR(N(RightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(RightDoorModelsR))) - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_40"), pra_40_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_31_ENTRY_1) + Set(LVar1, COLLIDER_deilitte) + Set(LVar2, Ref(N(RightDoorModelsL))) + Set(LVar3, Ref(N(RightDoorModelsR))) + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_40"), pra_40_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_34_2) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_31_ENTRY_2) - EVT_SET(LVar1, COLLIDER_deilittnw) - EVT_SET(LVar2, EVT_PTR(N(FarLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(FarLeftDoorModelsR))) - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_34"), pra_34_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_31_ENTRY_2) + Set(LVar1, COLLIDER_deilittnw) + Set(LVar2, Ref(N(FarLeftDoorModelsL))) + Set(LVar3, Ref(N(FarLeftDoorModelsR))) + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_34"), pra_34_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_34_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_40_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitte, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_34_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_pra_34_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_40_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitte, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_34_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(pra_31_ENTRY_0) - EVT_SET(LVar2, EVT_PTR(N(NearLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(NearLeftDoorModelsR))) - EVT_CASE_EQ(pra_31_ENTRY_1) - EVT_SET(LVar2, EVT_PTR(N(RightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(RightDoorModelsR))) - EVT_CASE_EQ(pra_31_ENTRY_2) - EVT_SET(LVar2, EVT_PTR(N(FarLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(FarLeftDoorModelsR))) - EVT_END_SWITCH - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(pra_31_ENTRY_0) + Set(LVar2, Ref(N(NearLeftDoorModelsL))) + Set(LVar3, Ref(N(NearLeftDoorModelsR))) + CaseEq(pra_31_ENTRY_1) + Set(LVar2, Ref(N(RightDoorModelsL))) + Set(LVar3, Ref(N(RightDoorModelsR))) + CaseEq(pra_31_ENTRY_2) + Set(LVar2, Ref(N(FarLeftDoorModelsL))) + Set(LVar3, Ref(N(FarLeftDoorModelsR))) + EndSwitch + ExecWait(BaseEnterDoor) + Exec(N(EVS_BindExitTriggers)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_SetupPuzzle)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_SetupPuzzle)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_pra/pra_31/pra_31_4_puzzle.c b/src/world/area_pra/pra_31/pra_31_4_puzzle.c index 44dedda2773..2558210e417 100644 --- a/src/world/area_pra/pra_31/pra_31_4_puzzle.c +++ b/src/world/area_pra/pra_31/pra_31_4_puzzle.c @@ -305,279 +305,279 @@ API_CALLABLE(N(EndBlockPushingState)) { } EvtScript N(EVS_Scene_PuzzleSolved) = { - EVT_LOOP(0) - EVT_IF_EQ(MV_PuzzleSolved, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_LOOP(0) - EVT_IF_EQ(MV_PushingStatue, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySound, SOUND_CHIME_SOLVED_PUZZLE) - EVT_WAIT(40) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 325, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 325, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(12.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(323.3), EVT_FLOAT(-66.5)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(500.0), EVT_FLOAT(296.8)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_WAIT(45) - EVT_CALL(SetGroupVisibility, MODEL_g255, MODEL_GROUP_VISIBLE) - EVT_CALL(SetGroupVisibility, MODEL_g262, MODEL_GROUP_VISIBLE) - EVT_CALL(SetGroupVisibility, MODEL_g264, MODEL_GROUP_VISIBLE) - EVT_CALL(SetGroupVisibility, MODEL_g265, MODEL_GROUP_VISIBLE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o1071, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(50) - EVT_CALL(PlaySoundAtModel, MODEL_k1, SOUND_PRA_UNFOLD_EXIT, 0) - EVT_WAIT(25) - EVT_CALL(PlaySoundAtModel, MODEL_k2, SOUND_PRA_UNFOLD_STEP, 0) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtModel, MODEL_k3, SOUND_PRA_UNFOLD_STEP, 0) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtModel, MODEL_k3, SOUND_PRA_UNFOLD_STEP, 0) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtModel, MODEL_k3, SOUND_PRA_UNFOLD_STEP, 0) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtModel, MODEL_k3, SOUND_PRA_UNFOLD_STEP, 0) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtModel, MODEL_k3, SOUND_PRA_UNFOLD_STEP, 0) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtModel, MODEL_k3, SOUND_PRA_UNFOLD_STEP, 0) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtModel, MODEL_k3, SOUND_PRA_UNFOLD_STEP, 0) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtModel, MODEL_k3, SOUND_PRA_UNFOLD_STEP, 0) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtModel, MODEL_k3, SOUND_PRA_UNFOLD_STEP, 0) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtModel, MODEL_k3, SOUND_PRA_UNFOLD_STEP, 0) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtModel, MODEL_k3, SOUND_PRA_UNFOLD_STEP, 0) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtModel, MODEL_k3, SOUND_PRA_UNFOLD_STEP, 0) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtModel, MODEL_k3, SOUND_PRA_UNFOLD_STEP, 0) - EVT_WAIT(5) - EVT_CALL(PlaySoundAtModel, MODEL_k3, SOUND_PRA_UNFOLD_STEP, 0) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(50) - EVT_CALL(EnableModel, MODEL_n1, FALSE) - EVT_CALL(EnableModel, MODEL_k1, TRUE) - EVT_WAIT(10) - EVT_CALL(EnableModel, MODEL_n2, FALSE) - EVT_CALL(EnableModel, MODEL_k2, TRUE) - EVT_WAIT(30) - EVT_CALL(EnableModel, MODEL_n3, FALSE) - EVT_CALL(EnableModel, MODEL_k3, TRUE) - EVT_WAIT(22) - EVT_CALL(EnableModel, MODEL_n4, FALSE) - EVT_CALL(EnableModel, MODEL_k4, TRUE) - EVT_WAIT(18) - EVT_CALL(EnableModel, MODEL_n5, FALSE) - EVT_CALL(EnableModel, MODEL_k5, TRUE) - EVT_END_THREAD - EVT_CALL(PlayModelAnimation, MDL_ANIMATOR_0, EVT_PTR(N(AS_Stairs_Unfold))) - EVT_WAIT(200) - EVT_SET(GB_StoryProgress, STORY_CH7_SOLVED_ALBINO_DINO_PUZZLE) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Loop(0) + IfEq(MV_PuzzleSolved, TRUE) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(DisablePlayerInput, TRUE) + Loop(0) + IfEq(MV_PushingStatue, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(PlaySound, SOUND_CHIME_SOLVED_PUZZLE) + Wait(40) + Call(UseSettingsFrom, CAM_DEFAULT, 325, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 325, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(12.0), Float(-10.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(350.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(323.3), Float(-66.5)) + Call(SetCamPosB, CAM_DEFAULT, Float(500.0), Float(296.8)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Wait(45) + Call(SetGroupVisibility, MODEL_g255, MODEL_GROUP_VISIBLE) + Call(SetGroupVisibility, MODEL_g262, MODEL_GROUP_VISIBLE) + Call(SetGroupVisibility, MODEL_g264, MODEL_GROUP_VISIBLE) + Call(SetGroupVisibility, MODEL_g265, MODEL_GROUP_VISIBLE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o1071, COLLIDER_FLAGS_UPPER_MASK) + EndThread + Thread + Wait(50) + Call(PlaySoundAtModel, MODEL_k1, SOUND_PRA_UNFOLD_EXIT, 0) + Wait(25) + Call(PlaySoundAtModel, MODEL_k2, SOUND_PRA_UNFOLD_STEP, 0) + Wait(5) + Call(PlaySoundAtModel, MODEL_k3, SOUND_PRA_UNFOLD_STEP, 0) + Wait(5) + Call(PlaySoundAtModel, MODEL_k3, SOUND_PRA_UNFOLD_STEP, 0) + Wait(5) + Call(PlaySoundAtModel, MODEL_k3, SOUND_PRA_UNFOLD_STEP, 0) + Wait(5) + Call(PlaySoundAtModel, MODEL_k3, SOUND_PRA_UNFOLD_STEP, 0) + Wait(5) + Call(PlaySoundAtModel, MODEL_k3, SOUND_PRA_UNFOLD_STEP, 0) + Wait(5) + Call(PlaySoundAtModel, MODEL_k3, SOUND_PRA_UNFOLD_STEP, 0) + Wait(5) + Call(PlaySoundAtModel, MODEL_k3, SOUND_PRA_UNFOLD_STEP, 0) + Wait(5) + Call(PlaySoundAtModel, MODEL_k3, SOUND_PRA_UNFOLD_STEP, 0) + Wait(5) + Call(PlaySoundAtModel, MODEL_k3, SOUND_PRA_UNFOLD_STEP, 0) + Wait(5) + Call(PlaySoundAtModel, MODEL_k3, SOUND_PRA_UNFOLD_STEP, 0) + Wait(5) + Call(PlaySoundAtModel, MODEL_k3, SOUND_PRA_UNFOLD_STEP, 0) + Wait(5) + Call(PlaySoundAtModel, MODEL_k3, SOUND_PRA_UNFOLD_STEP, 0) + Wait(5) + Call(PlaySoundAtModel, MODEL_k3, SOUND_PRA_UNFOLD_STEP, 0) + Wait(5) + Call(PlaySoundAtModel, MODEL_k3, SOUND_PRA_UNFOLD_STEP, 0) + EndThread + Thread + Wait(50) + Call(EnableModel, MODEL_n1, FALSE) + Call(EnableModel, MODEL_k1, TRUE) + Wait(10) + Call(EnableModel, MODEL_n2, FALSE) + Call(EnableModel, MODEL_k2, TRUE) + Wait(30) + Call(EnableModel, MODEL_n3, FALSE) + Call(EnableModel, MODEL_k3, TRUE) + Wait(22) + Call(EnableModel, MODEL_n4, FALSE) + Call(EnableModel, MODEL_k4, TRUE) + Wait(18) + Call(EnableModel, MODEL_n5, FALSE) + Call(EnableModel, MODEL_k5, TRUE) + EndThread + Call(PlayModelAnimation, MDL_ANIMATOR_0, Ref(N(AS_Stairs_Unfold))) + Wait(200) + Set(GB_StoryProgress, STORY_CH7_SOLVED_ALBINO_DINO_PUZZLE) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_UpdateStatuePositions) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(N(GetDinoStatuePosRot), NPC_AlbinoDino_01) - EVT_SET(MV_StatueYaw_01, LVar2) - EVT_CALL(N(GetDinoStatuePosRot), NPC_AlbinoDino_02) - EVT_SET(MV_StatueYaw_02, LVar2) - EVT_CALL(N(GetDinoStatuePosRot), NPC_AlbinoDino_03) - EVT_SET(MV_StatueYaw_03, LVar2) - EVT_LOOP(0) - EVT_CALL(N(GetDinoStatuePosRot), NPC_AlbinoDino_01) - EVT_CALL(TranslateGroup, MODEL_s01, LVar0, 0, LVar1) - EVT_CALL(RotateGroup, MODEL_g292, MV_StatueYaw_01, 0, 1, 0) - EVT_CALL(N(GetDinoStatuePosRot), NPC_AlbinoDino_02) - EVT_CALL(TranslateGroup, MODEL_s02, LVar0, 0, LVar1) - EVT_CALL(RotateGroup, MODEL_g298, MV_StatueYaw_02, 0, 1, 0) - EVT_CALL(N(GetDinoStatuePosRot), NPC_AlbinoDino_03) - EVT_CALL(TranslateGroup, MODEL_s03, LVar0, 0, LVar1) - EVT_CALL(RotateGroup, MODEL_g299, MV_StatueYaw_03, 0, 1, 0) - EVT_CALL(N(GetDinoNpcPosRot), NPC_AlbinoDino_01) - EVT_CALL(SetNpcPos, NPC_AlbinoDino_01, LVar0, -10, LVar1) - EVT_CALL(N(GetDinoNpcPosRot), NPC_AlbinoDino_02) - EVT_CALL(SetNpcPos, NPC_AlbinoDino_02, LVar0, -10, LVar1) - EVT_CALL(N(GetDinoNpcPosRot), NPC_AlbinoDino_03) - EVT_CALL(SetNpcPos, NPC_AlbinoDino_03, LVar0, -10, LVar1) - EVT_CALL(UpdateColliderTransform, COLLIDER_s01n) - EVT_CALL(UpdateColliderTransform, COLLIDER_s01e) - EVT_CALL(UpdateColliderTransform, COLLIDER_s01s) - EVT_CALL(UpdateColliderTransform, COLLIDER_s01w) - EVT_CALL(UpdateColliderTransform, COLLIDER_s02n) - EVT_CALL(UpdateColliderTransform, COLLIDER_s02e) - EVT_CALL(UpdateColliderTransform, COLLIDER_s02s) - EVT_CALL(UpdateColliderTransform, COLLIDER_s02w) - EVT_CALL(UpdateColliderTransform, COLLIDER_s03n) - EVT_CALL(UpdateColliderTransform, COLLIDER_s03e) - EVT_CALL(UpdateColliderTransform, COLLIDER_s03s) - EVT_CALL(UpdateColliderTransform, COLLIDER_s03w) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(N(GetDinoStatuePosRot), NPC_AlbinoDino_01) + Set(MV_StatueYaw_01, LVar2) + Call(N(GetDinoStatuePosRot), NPC_AlbinoDino_02) + Set(MV_StatueYaw_02, LVar2) + Call(N(GetDinoStatuePosRot), NPC_AlbinoDino_03) + Set(MV_StatueYaw_03, LVar2) + Loop(0) + Call(N(GetDinoStatuePosRot), NPC_AlbinoDino_01) + Call(TranslateGroup, MODEL_s01, LVar0, 0, LVar1) + Call(RotateGroup, MODEL_g292, MV_StatueYaw_01, 0, 1, 0) + Call(N(GetDinoStatuePosRot), NPC_AlbinoDino_02) + Call(TranslateGroup, MODEL_s02, LVar0, 0, LVar1) + Call(RotateGroup, MODEL_g298, MV_StatueYaw_02, 0, 1, 0) + Call(N(GetDinoStatuePosRot), NPC_AlbinoDino_03) + Call(TranslateGroup, MODEL_s03, LVar0, 0, LVar1) + Call(RotateGroup, MODEL_g299, MV_StatueYaw_03, 0, 1, 0) + Call(N(GetDinoNpcPosRot), NPC_AlbinoDino_01) + Call(SetNpcPos, NPC_AlbinoDino_01, LVar0, -10, LVar1) + Call(N(GetDinoNpcPosRot), NPC_AlbinoDino_02) + Call(SetNpcPos, NPC_AlbinoDino_02, LVar0, -10, LVar1) + Call(N(GetDinoNpcPosRot), NPC_AlbinoDino_03) + Call(SetNpcPos, NPC_AlbinoDino_03, LVar0, -10, LVar1) + Call(UpdateColliderTransform, COLLIDER_s01n) + Call(UpdateColliderTransform, COLLIDER_s01e) + Call(UpdateColliderTransform, COLLIDER_s01s) + Call(UpdateColliderTransform, COLLIDER_s01w) + Call(UpdateColliderTransform, COLLIDER_s02n) + Call(UpdateColliderTransform, COLLIDER_s02e) + Call(UpdateColliderTransform, COLLIDER_s02s) + Call(UpdateColliderTransform, COLLIDER_s02w) + Call(UpdateColliderTransform, COLLIDER_s03n) + Call(UpdateColliderTransform, COLLIDER_s03e) + Call(UpdateColliderTransform, COLLIDER_s03s) + Call(UpdateColliderTransform, COLLIDER_s03w) + Wait(1) + EndLoop + Return + End }; #include "world/common/todo/UnkFunc11.inc.c" EvtScript N(EVS_PushStatue_Impl) = { - EVT_CALL(N(GetPlayerPushDirection), LVarA) - EVT_CALL(InterpPlayerYaw, LVar0, 0) - EVT_LOOP(20) - EVT_CALL(N(UnkFunc11), LVar9) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_ELSE - EVT_CALL(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_THREAD - EVT_CALL(N(GetPlayerPushLerpValues), LVarA) - EVT_CALL(MakeLerp, LVar3, LVar4, PUSH_TIME, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) - EVT_CALL(UpdateLerp) - EVT_CALL(N(UnkFunc12)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, PUSH_TIME, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_SET(MV_PushingStatue, TRUE) - EVT_CALL(PlaySoundAtCollider, LVar9, SOUND_PRA_PUSH_STATUE, 0) - EVT_CALL(N(BeginPushingStatue), LVarA) - EVT_WAIT(PUSH_TIME) - EVT_SET(MV_PushingStatue, FALSE) - EVT_CALL(N(EndBlockPushingState)) - EVT_THREAD - EVT_CALL(DisablePlayerInput, FALSE) - EVT_WAIT(2) - EVT_CALL(N(UnkFunc11), LVar9) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(2) - EVT_CALL(N(UnkFunc11), LVar9) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_END_IF - EVT_END_IF - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(N(GetPlayerPushDirection), LVarA) + Call(InterpPlayerYaw, LVar0, 0) + Loop(20) + Call(N(UnkFunc11), LVar9) + IfEq(LVar0, 0) + Return + Else + Call(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) + EndIf + Wait(1) + EndLoop + Call(DisablePlayerInput, TRUE) + Thread + Call(N(GetPlayerPushLerpValues), LVarA) + Call(MakeLerp, LVar3, LVar4, PUSH_TIME, EASING_LINEAR) + Loop(0) + Call(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) + Call(UpdateLerp) + Call(N(UnkFunc12)) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(ShakeCam, CAM_DEFAULT, 0, PUSH_TIME, Float(0.3)) + EndThread + Set(MV_PushingStatue, TRUE) + Call(PlaySoundAtCollider, LVar9, SOUND_PRA_PUSH_STATUE, 0) + Call(N(BeginPushingStatue), LVarA) + Wait(PUSH_TIME) + Set(MV_PushingStatue, FALSE) + Call(N(EndBlockPushingState)) + Thread + Call(DisablePlayerInput, FALSE) + Wait(2) + Call(N(UnkFunc11), LVar9) + IfEq(LVar0, 0) + Wait(2) + Call(N(UnkFunc11), LVar9) + IfEq(LVar0, 0) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + EndIf + EndIf + EndThread + Return + End }; EvtScript N(EVS_PushStatue_01) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH7_SOLVED_ALBINO_DINO_PUZZLE) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(IsDestCellUnavailable), NPC_AlbinoDino_01) - EVT_IF_EQ(LVar0, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(LVarA, NPC_AlbinoDino_01) - EVT_SET(LVar9, COLLIDER_s01e) - EVT_EXEC_WAIT(N(EVS_PushStatue_Impl)) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH7_SOLVED_ALBINO_DINO_PUZZLE) + Return + EndIf + Call(N(IsDestCellUnavailable), NPC_AlbinoDino_01) + IfEq(LVar0, TRUE) + Return + EndIf + Set(LVarA, NPC_AlbinoDino_01) + Set(LVar9, COLLIDER_s01e) + ExecWait(N(EVS_PushStatue_Impl)) + Return + End }; EvtScript N(EVS_PushStatue_02) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH7_SOLVED_ALBINO_DINO_PUZZLE) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(IsDestCellUnavailable), NPC_AlbinoDino_02) - EVT_IF_EQ(LVar0, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(LVarA, NPC_AlbinoDino_02) - EVT_SET(LVar9, COLLIDER_s02e) - EVT_EXEC_WAIT(N(EVS_PushStatue_Impl)) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH7_SOLVED_ALBINO_DINO_PUZZLE) + Return + EndIf + Call(N(IsDestCellUnavailable), NPC_AlbinoDino_02) + IfEq(LVar0, TRUE) + Return + EndIf + Set(LVarA, NPC_AlbinoDino_02) + Set(LVar9, COLLIDER_s02e) + ExecWait(N(EVS_PushStatue_Impl)) + Return + End }; EvtScript N(EVS_PushStatue_03) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH7_SOLVED_ALBINO_DINO_PUZZLE) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(IsDestCellUnavailable), NPC_AlbinoDino_03) - EVT_IF_EQ(LVar0, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(LVarA, NPC_AlbinoDino_03) - EVT_SET(LVar9, COLLIDER_s03e) - EVT_EXEC_WAIT(N(EVS_PushStatue_Impl)) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH7_SOLVED_ALBINO_DINO_PUZZLE) + Return + EndIf + Call(N(IsDestCellUnavailable), NPC_AlbinoDino_03) + IfEq(LVar0, TRUE) + Return + EndIf + Set(LVarA, NPC_AlbinoDino_03) + Set(LVar9, COLLIDER_s03e) + ExecWait(N(EVS_PushStatue_Impl)) + Return + End }; EvtScript N(EVS_SetupPuzzle) = { - EVT_CALL(InitAnimatedModels) - EVT_CALL(LoadAnimatedModel, MDL_ANIMATOR_0, EVT_PTR(N(AS_Stairs_Skeleton))) - EVT_CALL(SetAnimatedModelRootPosition, MDL_ANIMATOR_0, 0, 0, 0) - EVT_CALL(SetAnimatedModelRenderMode, MDL_ANIMATOR_0, RENDER_MODE_SURFACE_OPA) - EVT_THREAD - EVT_CALL(N(EVS_ManagePuzzle)) - EVT_END_THREAD - EVT_WAIT(1) - EVT_CALL(ParentColliderToModel, COLLIDER_s01n, MODEL_o1032) - EVT_CALL(ParentColliderToModel, COLLIDER_s01e, MODEL_o1032) - EVT_CALL(ParentColliderToModel, COLLIDER_s01s, MODEL_o1032) - EVT_CALL(ParentColliderToModel, COLLIDER_s01w, MODEL_o1032) - EVT_CALL(ParentColliderToModel, COLLIDER_s02n, MODEL_o1040) - EVT_CALL(ParentColliderToModel, COLLIDER_s02e, MODEL_o1040) - EVT_CALL(ParentColliderToModel, COLLIDER_s02s, MODEL_o1040) - EVT_CALL(ParentColliderToModel, COLLIDER_s02w, MODEL_o1040) - EVT_CALL(ParentColliderToModel, COLLIDER_s03n, MODEL_o1044) - EVT_CALL(ParentColliderToModel, COLLIDER_s03e, MODEL_o1044) - EVT_CALL(ParentColliderToModel, COLLIDER_s03s, MODEL_o1044) - EVT_CALL(ParentColliderToModel, COLLIDER_s03w, MODEL_o1044) - EVT_SET(MV_PuzzleSolved, FALSE) - EVT_EXEC(N(EVS_UpdateStatuePositions)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_PushStatue_01)), TRIGGER_WALL_PUSH, COLLIDER_s01e, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_PushStatue_02)), TRIGGER_WALL_PUSH, COLLIDER_s02e, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_PushStatue_03)), TRIGGER_WALL_PUSH, COLLIDER_s03e, 1, 0) - EVT_IF_GE(GB_StoryProgress, STORY_CH7_SOLVED_ALBINO_DINO_PUZZLE) - EVT_CALL(PlayModelAnimation, MDL_ANIMATOR_0, EVT_PTR(N(AS_Stairs_InitializeAfter))) - EVT_CALL(SetGroupVisibility, MODEL_no, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_kage_yuka, MODEL_GROUP_VISIBLE) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1071, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlayModelAnimation, MDL_ANIMATOR_0, EVT_PTR(N(AS_Stairs_InitializeBefore))) - EVT_CALL(SetGroupVisibility, MODEL_g255, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_g262, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_g264, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_g265, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_no, MODEL_GROUP_VISIBLE) - EVT_CALL(SetGroupVisibility, MODEL_kage_yuka, MODEL_GROUP_HIDDEN) - EVT_EXEC(N(EVS_Scene_PuzzleSolved)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(InitAnimatedModels) + Call(LoadAnimatedModel, MDL_ANIMATOR_0, Ref(N(AS_Stairs_Skeleton))) + Call(SetAnimatedModelRootPosition, MDL_ANIMATOR_0, 0, 0, 0) + Call(SetAnimatedModelRenderMode, MDL_ANIMATOR_0, RENDER_MODE_SURFACE_OPA) + Thread + Call(N(EVS_ManagePuzzle)) + EndThread + Wait(1) + Call(ParentColliderToModel, COLLIDER_s01n, MODEL_o1032) + Call(ParentColliderToModel, COLLIDER_s01e, MODEL_o1032) + Call(ParentColliderToModel, COLLIDER_s01s, MODEL_o1032) + Call(ParentColliderToModel, COLLIDER_s01w, MODEL_o1032) + Call(ParentColliderToModel, COLLIDER_s02n, MODEL_o1040) + Call(ParentColliderToModel, COLLIDER_s02e, MODEL_o1040) + Call(ParentColliderToModel, COLLIDER_s02s, MODEL_o1040) + Call(ParentColliderToModel, COLLIDER_s02w, MODEL_o1040) + Call(ParentColliderToModel, COLLIDER_s03n, MODEL_o1044) + Call(ParentColliderToModel, COLLIDER_s03e, MODEL_o1044) + Call(ParentColliderToModel, COLLIDER_s03s, MODEL_o1044) + Call(ParentColliderToModel, COLLIDER_s03w, MODEL_o1044) + Set(MV_PuzzleSolved, FALSE) + Exec(N(EVS_UpdateStatuePositions)) + BindTrigger(Ref(N(EVS_PushStatue_01)), TRIGGER_WALL_PUSH, COLLIDER_s01e, 1, 0) + BindTrigger(Ref(N(EVS_PushStatue_02)), TRIGGER_WALL_PUSH, COLLIDER_s02e, 1, 0) + BindTrigger(Ref(N(EVS_PushStatue_03)), TRIGGER_WALL_PUSH, COLLIDER_s03e, 1, 0) + IfGe(GB_StoryProgress, STORY_CH7_SOLVED_ALBINO_DINO_PUZZLE) + Call(PlayModelAnimation, MDL_ANIMATOR_0, Ref(N(AS_Stairs_InitializeAfter))) + Call(SetGroupVisibility, MODEL_no, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_kage_yuka, MODEL_GROUP_VISIBLE) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1071, COLLIDER_FLAGS_UPPER_MASK) + Call(PlayModelAnimation, MDL_ANIMATOR_0, Ref(N(AS_Stairs_InitializeBefore))) + Call(SetGroupVisibility, MODEL_g255, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_g262, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_g264, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_g265, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_no, MODEL_GROUP_VISIBLE) + Call(SetGroupVisibility, MODEL_kage_yuka, MODEL_GROUP_HIDDEN) + Exec(N(EVS_Scene_PuzzleSolved)) + EndIf + Return + End }; diff --git a/src/world/area_pra/pra_32/pra_32_1_music.c b/src/world/area_pra/pra_32/pra_32_1_music.c index 542721a92ca..3338d392424 100644 --- a/src/world/area_pra/pra_32/pra_32_1_music.c +++ b/src/world/area_pra/pra_32/pra_32_1_music.c @@ -1,12 +1,12 @@ #include "pra_32.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH7_DEFEATED_CRYSTAL_KING) - EVT_CALL(FadeOutMusic, 0, 500) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_END_IF - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH7_DEFEATED_CRYSTAL_KING) + Call(FadeOutMusic, 0, 500) + Else + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + EndIf + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Return + End }; diff --git a/src/world/area_pra/pra_32/pra_32_2_main.c b/src/world/area_pra/pra_32/pra_32_2_main.c index 609016db4d1..7998e6ecf36 100644 --- a/src/world/area_pra/pra_32/pra_32_2_main.c +++ b/src/world/area_pra/pra_32/pra_32_2_main.c @@ -10,127 +10,127 @@ API_CALLABLE(N(DisableFloorReflections)) { } EvtScript N(EVS_SpawnStarCard) = { - EVT_SET(LVar0, 0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 595, 185, 116) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.6)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 595, 130, 116) + Set(LVar0, 0) + IfEq(LVar0, 0) + Call(DisablePlayerInput, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, 595, 185, 116) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.6)) + Call(SetPanTarget, CAM_DEFAULT, 595, 130, 116) EVT_SPIRIT_ADJUST_CAM(10000) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(N(StarSpiritEffectFunc2), 6, 180, 590, 120, 116, 595, 185, 116, 130, 100) - EVT_THREAD - EVT_CALL(N(StarSpiritEffectFunc3)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(PlaySound, SOUND_LOOP_STAR_ORB_RISING) - EVT_CALL(N(StarSpiritEffectFunc1)) - EVT_CALL(StopSound, SOUND_LOOP_STAR_ORB_RISING) - EVT_CALL(PlaySoundAt, SOUND_STAR_ORB_BURST, SOUND_SPACE_DEFAULT, 595, 185, 116) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(45) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(180) - EVT_WAIT(115) - EVT_CALL(PlaySoundAt, SOUND_STAR_CARD_APPEARS, SOUND_SPACE_DEFAULT, 595, 185, 116) - EVT_END_THREAD - EVT_CALL(N(StarSpiritEffectFunc4), 1) - EVT_THREAD - EVT_WAIT(80) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_ADD(LVar1, 100) - EVT_CALL(SetCamDistance, CAM_DEFAULT, LVar1) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 595, 100, 116) - EVT_CALL(N(StarSpiritEffectFunc4), 2) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar2, LVar3, LVar4) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar2, LVar3, LVar4) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ELSE - EVT_CALL(N(StarSpiritEffectFunc5), 6, 595, 130, 116, 100) - EVT_THREAD - EVT_CALL(N(StarSpiritEffectFunc6)) - EVT_END_THREAD - EVT_WAIT(1) - EVT_END_IF - EVT_CALL(N(StarSpiritEffectFunc4), 3) - EVT_CALL(PlaySoundAtPlayer, SOUND_RESCUE_STAR_SPIRIT, SOUND_SPACE_DEFAULT) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(GB_StoryProgress, STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_23"), kmr_23_ENTRY_6, TRANSITION_GET_STAR_CARD) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(N(StarSpiritEffectFunc2), 6, 180, 590, 120, 116, 595, 185, 116, 130, 100) + Thread + Call(N(StarSpiritEffectFunc3)) + EndThread + Thread + Wait(1) + Call(PlaySound, SOUND_LOOP_STAR_ORB_RISING) + Call(N(StarSpiritEffectFunc1)) + Call(StopSound, SOUND_LOOP_STAR_ORB_RISING) + Call(PlaySoundAt, SOUND_STAR_ORB_BURST, SOUND_SPACE_DEFAULT, 595, 185, 116) + EndThread + Thread + Wait(45) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + EndThread + Thread + Wait(180) + Wait(115) + Call(PlaySoundAt, SOUND_STAR_CARD_APPEARS, SOUND_SPACE_DEFAULT, 595, 185, 116) + EndThread + Call(N(StarSpiritEffectFunc4), 1) + Thread + Wait(80) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndThread + Add(LVar1, 100) + Call(SetCamDistance, CAM_DEFAULT, LVar1) + Call(SetPanTarget, CAM_DEFAULT, 595, 100, 116) + Call(N(StarSpiritEffectFunc4), 2) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Call(UseSettingsFrom, CAM_DEFAULT, LVar2, LVar3, LVar4) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar2, LVar3, LVar4) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Else + Call(N(StarSpiritEffectFunc5), 6, 595, 130, 116, 100) + Thread + Call(N(StarSpiritEffectFunc6)) + EndThread + Wait(1) + EndIf + Call(N(StarSpiritEffectFunc4), 3) + Call(PlaySoundAtPlayer, SOUND_RESCUE_STAR_SPIRIT, SOUND_SPACE_DEFAULT) + Call(DisablePlayerInput, TRUE) + Set(GB_StoryProgress, STORY_CH7_STAR_SPIRIT_RESCUED) + Call(GotoMapSpecial, Ref("kmr_23"), kmr_23_ENTRY_6, TRANSITION_GET_STAR_CARD) + Wait(100) + Return + End }; EvtScript N(EVS_RespawnStarCard) = { - EVT_SET(LVar0, 1) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 595, 185, 116) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.6)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 595, 130, 116) + Set(LVar0, 1) + IfEq(LVar0, 0) + Call(DisablePlayerInput, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, 595, 185, 116) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.6)) + Call(SetPanTarget, CAM_DEFAULT, 595, 130, 116) EVT_SPIRIT_ADJUST_CAM(10000) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(N(StarSpiritEffectFunc2), 6, 180, 590, 120, 116, 595, 185, 116, 130, 100) - EVT_THREAD - EVT_CALL(N(StarSpiritEffectFunc3)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(PlaySound, SOUND_LOOP_STAR_ORB_RISING) - EVT_CALL(N(StarSpiritEffectFunc1)) - EVT_CALL(StopSound, SOUND_LOOP_STAR_ORB_RISING) - EVT_CALL(PlaySoundAt, SOUND_STAR_ORB_BURST, SOUND_SPACE_DEFAULT, 595, 185, 116) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(45) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(180) - EVT_WAIT(115) - EVT_CALL(PlaySoundAt, SOUND_STAR_CARD_APPEARS, SOUND_SPACE_DEFAULT, 595, 185, 116) - EVT_END_THREAD - EVT_CALL(N(StarSpiritEffectFunc4), 1) - EVT_THREAD - EVT_WAIT(80) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_ADD(LVar1, 100) - EVT_CALL(SetCamDistance, CAM_DEFAULT, LVar1) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 595, 100, 116) - EVT_CALL(N(StarSpiritEffectFunc4), 2) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar2, LVar3, LVar4) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar2, LVar3, LVar4) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ELSE - EVT_CALL(N(StarSpiritEffectFunc5), 6, 595, 130, 116, 100) - EVT_THREAD - EVT_CALL(N(StarSpiritEffectFunc6)) - EVT_END_THREAD - EVT_WAIT(1) - EVT_END_IF - EVT_CALL(N(StarSpiritEffectFunc4), 3) - EVT_CALL(PlaySoundAtPlayer, SOUND_RESCUE_STAR_SPIRIT, SOUND_SPACE_DEFAULT) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(GB_StoryProgress, STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_23"), kmr_23_ENTRY_6, TRANSITION_GET_STAR_CARD) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(N(StarSpiritEffectFunc2), 6, 180, 590, 120, 116, 595, 185, 116, 130, 100) + Thread + Call(N(StarSpiritEffectFunc3)) + EndThread + Thread + Wait(1) + Call(PlaySound, SOUND_LOOP_STAR_ORB_RISING) + Call(N(StarSpiritEffectFunc1)) + Call(StopSound, SOUND_LOOP_STAR_ORB_RISING) + Call(PlaySoundAt, SOUND_STAR_ORB_BURST, SOUND_SPACE_DEFAULT, 595, 185, 116) + EndThread + Thread + Wait(45) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + EndThread + Thread + Wait(180) + Wait(115) + Call(PlaySoundAt, SOUND_STAR_CARD_APPEARS, SOUND_SPACE_DEFAULT, 595, 185, 116) + EndThread + Call(N(StarSpiritEffectFunc4), 1) + Thread + Wait(80) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndThread + Add(LVar1, 100) + Call(SetCamDistance, CAM_DEFAULT, LVar1) + Call(SetPanTarget, CAM_DEFAULT, 595, 100, 116) + Call(N(StarSpiritEffectFunc4), 2) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Call(UseSettingsFrom, CAM_DEFAULT, LVar2, LVar3, LVar4) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar2, LVar3, LVar4) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Else + Call(N(StarSpiritEffectFunc5), 6, 595, 130, 116, 100) + Thread + Call(N(StarSpiritEffectFunc6)) + EndThread + Wait(1) + EndIf + Call(N(StarSpiritEffectFunc4), 3) + Call(PlaySoundAtPlayer, SOUND_RESCUE_STAR_SPIRIT, SOUND_SPACE_DEFAULT) + Call(DisablePlayerInput, TRUE) + Set(GB_StoryProgress, STORY_CH7_STAR_SPIRIT_RESCUED) + Call(GotoMapSpecial, Ref("kmr_23"), kmr_23_ENTRY_6, TRANSITION_GET_STAR_CARD) + Wait(100) + Return + End }; s32 N(DoorModelsL)[] = { @@ -142,47 +142,47 @@ s32 N(DoorModelsR)[] = { }; EvtScript N(EVS_ExitDoors_pra_40_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_32_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittw) - EVT_SET(LVar2, EVT_PTR(N(DoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(DoorModelsR))) - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_40"), pra_40_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_32_ENTRY_0) + Set(LVar1, COLLIDER_deilittw) + Set(LVar2, Ref(N(DoorModelsL))) + Set(LVar3, Ref(N(DoorModelsR))) + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_40"), pra_40_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_40_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_pra_40_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_SET(LVar2, EVT_PTR(N(DoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(DoorModelsR))) - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END + Set(LVar2, Ref(N(DoorModelsL))) + Set(LVar3, Ref(N(DoorModelsR))) + ExecWait(BaseEnterDoor) + Exec(N(EVS_BindExitTriggers)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1309, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1293, SURFACE_TYPE_SNOW) - EVT_PLAY_EFFECT(EFFECT_SNOWFALL, 0, 120) - EVT_CALL(N(DisableFloorReflections)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1309, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1293, SURFACE_TYPE_SNOW) + PlayEffect(EFFECT_SNOWFALL, 0, 120) + Call(N(DisableFloorReflections)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_pra/pra_32/pra_32_3_npc.c b/src/world/area_pra/pra_32/pra_32_3_npc.c index 81d86cc95cc..a14efdfe47b 100644 --- a/src/world/area_pra/pra_32/pra_32_3_npc.c +++ b/src/world/area_pra/pra_32/pra_32_3_npc.c @@ -6,235 +6,235 @@ #include "world/common/npc/StarSpirit.inc.c" EvtScript N(EVS_AnimateCam_CrystalKing) = { - EVT_SET(MV_CamDistance, 400) - EVT_THREAD - EVT_CALL(MakeLerp, 400, 300, 200 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(MV_CamDistance, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(MakeLerp, 200, 100, 200 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, NPC_CrystalKing_01, 588, LVar0, 116) - EVT_SET(LVar5, LVar0) - EVT_ADD(LVar5, -30) - EVT_IF_GE(LVar5, 100) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 588, LVar5, 116) - EVT_CALL(SetCamDistance, CAM_DEFAULT, MV_CamDistance) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(MV_CamDistance, 400) + Thread + Call(MakeLerp, 400, 300, 200 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Set(MV_CamDistance, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(MakeLerp, 200, 100, 200 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcPos, NPC_CrystalKing_01, 588, LVar0, 116) + Set(LVar5, LVar0) + Add(LVar5, -30) + IfGe(LVar5, 100) + Call(SetPanTarget, CAM_DEFAULT, 588, LVar5, 116) + Call(SetCamDistance, CAM_DEFAULT, MV_CamDistance) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndIf + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_Scene_CrystalKingAppears) = { - EVT_CALL(EnableNpcShadow, NPC_CrystalKing_01, FALSE) - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_IF_LT(LVar0, 377) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterruptUsePartner) - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_KING_THEME, 0, 8) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH7_016A, 160, 40) - EVT_CALL(SetNpcPos, NPC_CrystalKing_01, 588, 200, 116) - EVT_CALL(SetNpcImgFXParams, NPC_CrystalKing_01, IMGFX_SET_ALPHA, 0, 0, 0, 0) - EVT_CALL(GetNpcPos, NPC_CrystalKing_01, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, -30) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(12.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_BeforeJump) - EVT_CALL(SetPlayerPos, 475, 100, 116) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(PartnerIsFlying, LVar4) - EVT_IF_EQ(LVar4, FALSE) - EVT_CALL(SetNpcPos, NPC_PARTNER, 452, 116, 120) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_PARTNER, 452, 100, 120) - EVT_END_IF - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_CrystalKing_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 10) - EVT_PLAY_EFFECT(EFFECT_MISC_PARTICLES, 0, LVar0, LVar1, LVar2, 50, 50, 1, 40, 50) - EVT_WAIT(20 * DT) - EVT_PLAY_EFFECT(EFFECT_MISC_PARTICLES, 0, LVar0, LVar1, LVar2, 50, 50, 1, 40, 50) - EVT_WAIT(20 * DT) - EVT_PLAY_EFFECT(EFFECT_MISC_PARTICLES, 0, LVar0, LVar1, LVar2, 50, 50, 1, 40, 50) - EVT_WAIT(20 * DT) - EVT_PLAY_EFFECT(EFFECT_MISC_PARTICLES, 1, LVar0, LVar1, LVar2, 50, 50, 1, 20, 40) - EVT_WAIT(20 * DT) - EVT_PLAY_EFFECT(EFFECT_MISC_PARTICLES, 1, LVar0, LVar1, LVar2, 50, 50, 1, 20, 40) - EVT_WAIT(20 * DT) - EVT_PLAY_EFFECT(EFFECT_MISC_PARTICLES, 1, LVar0, LVar1, LVar2, 50, 50, 1, 20, 40) - EVT_WAIT(20 * DT) - EVT_PLAY_EFFECT(EFFECT_BIG_SNOWFLAKES, 0, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 2, LVar0, LVar1, LVar2, 10) - EVT_WAIT(20 * DT) - EVT_PLAY_EFFECT(EFFECT_BIG_SNOWFLAKES, 0, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 7) - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, 255, 120 * DT, EASING_LINEAR) - EVT_LABEL(5) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcImgFXParams, NPC_CrystalKing_01, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(5) - EVT_END_IF - EVT_CALL(EnableNpcShadow, NPC_CrystalKing_01, TRUE) - EVT_WAIT(30 * DT) - EVT_EXEC_WAIT(N(EVS_AnimateCam_CrystalKing)) - EVT_WAIT(20 * DT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_CrystalKing_01, LVar3, LVar4, LVar5) - EVT_CALL(SetNpcPos, NPC_SELF, LVar3, LVar4, LVar2) - EVT_ADD(LVar0, LVar3) - EVT_DIV(LVar0, 2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_CrystalKing_01, ANIM_CrystalKing_Anim09, ANIM_CrystalKing_Anim09, 0, MSG_CH7_016B) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Run) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(2.5 / DT)) - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1309, 0) - EVT_CALL(PlayerMoveTo, 564, 116, 0) - EVT_END_THREAD - EVT_CALL(StartBossBattle, SONG_CRYSTAL_KING_BATTLE) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_CrystalKing_01, FALSE) + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + IfLt(LVar0, 377) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Call(InterruptUsePartner) + Call(SetMusicTrack, 0, SONG_CRYSTAL_KING_THEME, 0, 8) + Call(ShowMessageAtScreenPos, MSG_CH7_016A, 160, 40) + Call(SetNpcPos, NPC_CrystalKing_01, 588, 200, 116) + Call(SetNpcImgFXParams, NPC_CrystalKing_01, IMGFX_SET_ALPHA, 0, 0, 0, 0) + Call(GetNpcPos, NPC_CrystalKing_01, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Add(LVar1, -30) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(SetCamPitch, CAM_DEFAULT, Float(12.0), Float(-10.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_BeforeJump) + Call(SetPlayerPos, 475, 100, 116) + Call(DisablePartnerAI, 0) + Call(PartnerIsFlying, LVar4) + IfEq(LVar4, FALSE) + Call(SetNpcPos, NPC_PARTNER, 452, 116, 120) + Else + Call(SetNpcPos, NPC_PARTNER, 452, 100, 120) + EndIf + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Call(GetNpcPos, NPC_CrystalKing_01, LVar0, LVar1, LVar2) + Add(LVar1, 10) + PlayEffect(EFFECT_MISC_PARTICLES, 0, LVar0, LVar1, LVar2, 50, 50, 1, 40, 50) + Wait(20 * DT) + PlayEffect(EFFECT_MISC_PARTICLES, 0, LVar0, LVar1, LVar2, 50, 50, 1, 40, 50) + Wait(20 * DT) + PlayEffect(EFFECT_MISC_PARTICLES, 0, LVar0, LVar1, LVar2, 50, 50, 1, 40, 50) + Wait(20 * DT) + PlayEffect(EFFECT_MISC_PARTICLES, 1, LVar0, LVar1, LVar2, 50, 50, 1, 20, 40) + Wait(20 * DT) + PlayEffect(EFFECT_MISC_PARTICLES, 1, LVar0, LVar1, LVar2, 50, 50, 1, 20, 40) + Wait(20 * DT) + PlayEffect(EFFECT_MISC_PARTICLES, 1, LVar0, LVar1, LVar2, 50, 50, 1, 20, 40) + Wait(20 * DT) + PlayEffect(EFFECT_BIG_SNOWFLAKES, 0, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SPARKLES, 2, LVar0, LVar1, LVar2, 10) + Wait(20 * DT) + PlayEffect(EFFECT_BIG_SNOWFLAKES, 0, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 7) + EndThread + Call(MakeLerp, 0, 255, 120 * DT, EASING_LINEAR) + Label(5) + Call(UpdateLerp) + Call(SetNpcImgFXParams, NPC_CrystalKing_01, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(5) + EndIf + Call(EnableNpcShadow, NPC_CrystalKing_01, TRUE) + Wait(30 * DT) + ExecWait(N(EVS_AnimateCam_CrystalKing)) + Wait(20 * DT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_CrystalKing_01, LVar3, LVar4, LVar5) + Call(SetNpcPos, NPC_SELF, LVar3, LVar4, LVar2) + Add(LVar0, LVar3) + Div(LVar0, 2) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_CrystalKing_01, ANIM_CrystalKing_Anim09, ANIM_CrystalKing_Anim09, 0, MSG_CH7_016B) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetPlayerAnimation, ANIM_Mario1_Run) + Call(SetPlayerSpeed, Float(2.5 / DT)) + Thread + Wait(10 * DT) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1309, 0) + Call(PlayerMoveTo, 564, 116, 0) + EndThread + Call(StartBossBattle, SONG_CRYSTAL_KING_BATTLE) + Return + End }; EvtScript N(EVS_Scene_BossDefeated) = { - EVT_THREAD - EVT_WAIT(2) - EVT_CALL(FadeOutMusic, 0, 500) - EVT_END_THREAD - EVT_CALL(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAG_1, TRUE) - EVT_CALL(SetPlayerPos, 475, 100, 116) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(GetNpcPos, NPC_CrystalKing_01, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(12.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_CrystalKing_01, ANIM_CrystalKing_Anim09, ANIM_CrystalKing_Anim09, 0, MSG_CH7_016C) - EVT_THREAD - EVT_CALL(SetNpcRotationPivot, NPC_CrystalKing_01, 30) - EVT_CALL(MakeLerp, 0, 19 * 360, 210 * DT, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_CrystalKing_01, 0, 0, LVar0) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 100, 200, 210 * DT, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVarA, LVar0) - EVT_MULF(LVarA, EVT_FLOAT(0.01)) - EVT_CALL(SetNpcScale, NPC_CrystalKing_01, LVarA, LVarA, 1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(MakeLerp, 255, 122, 30 * DT, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcImgFXParams, NPC_CrystalKing_01, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_CrystalKing_01, SOUND_CRYSTAL_KING_DISAPPEAR, SOUND_SPACE_DEFAULT) - EVT_CALL(GetNpcPos, NPC_CrystalKing_01, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SHIMMER_BURST, 0, LVar0, LVar1, LVar2, 1, 130) - EVT_END_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(MakeLerp, 120, 0, 30 * DT, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcImgFXParams, NPC_CrystalKing_01, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcImgFXParams, NPC_CrystalKing_01, IMGFX_SET_ALPHA, 0, 0, 0, 0) - EVT_CALL(GetNpcPos, NPC_CrystalKing_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 1, LVar0, LVar1, LVar2, 40) - EVT_CALL(SetNpcPos, NPC_CrystalKing_01, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_WAIT(75 * DT) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1309, SURFACE_TYPE_SNOW) - EVT_WAIT(25) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_EXEC(N(EVS_SpawnStarCard)) - EVT_SET(GB_StoryProgress, STORY_CH7_DEFEATED_CRYSTAL_KING) - EVT_RETURN - EVT_END + Thread + Wait(2) + Call(FadeOutMusic, 0, 500) + EndThread + Call(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAG_1, TRUE) + Call(SetPlayerPos, 475, 100, 116) + Call(DisablePartnerAI, 0) + Call(GetNpcPos, NPC_CrystalKing_01, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(12.0), Float(-10.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_CrystalKing_01, ANIM_CrystalKing_Anim09, ANIM_CrystalKing_Anim09, 0, MSG_CH7_016C) + Thread + Call(SetNpcRotationPivot, NPC_CrystalKing_01, 30) + Call(MakeLerp, 0, 19 * 360, 210 * DT, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_CrystalKing_01, 0, 0, LVar0) + IfEq(LVar1, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + EndThread + Thread + Call(MakeLerp, 100, 200, 210 * DT, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + SetF(LVarA, LVar0) + MulF(LVarA, Float(0.01)) + Call(SetNpcScale, NPC_CrystalKing_01, LVarA, LVarA, 1) + IfEq(LVar1, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + EndThread + Call(MakeLerp, 255, 122, 30 * DT, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(SetNpcImgFXParams, NPC_CrystalKing_01, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + IfEq(LVar1, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Thread + Call(PlaySoundAtNpc, NPC_CrystalKing_01, SOUND_CRYSTAL_KING_DISAPPEAR, SOUND_SPACE_DEFAULT) + Call(GetNpcPos, NPC_CrystalKing_01, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SHIMMER_BURST, 0, LVar0, LVar1, LVar2, 1, 130) + EndThread + Wait(30 * DT) + Call(MakeLerp, 120, 0, 30 * DT, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(SetNpcImgFXParams, NPC_CrystalKing_01, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + IfEq(LVar1, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetNpcImgFXParams, NPC_CrystalKing_01, IMGFX_SET_ALPHA, 0, 0, 0, 0) + Call(GetNpcPos, NPC_CrystalKing_01, LVar0, LVar1, LVar2) + Add(LVar1, 20) + PlayEffect(EFFECT_SPARKLES, 1, LVar0, LVar1, LVar2, 40) + Call(SetNpcPos, NPC_CrystalKing_01, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Wait(75 * DT) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o1309, SURFACE_TYPE_SNOW) + Wait(25) + Call(DisablePlayerInput, FALSE) + Call(EnablePartnerAI) + Exec(N(EVS_SpawnStarCard)) + Set(GB_StoryProgress, STORY_CH7_DEFEATED_CRYSTAL_KING) + Return + End }; EvtScript N(EVS_NpcInit_CrystalKing) = { - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_Scene_BossDefeated))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_DEFEATED_CRYSTAL_KING) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_Scene_CrystalKingAppears))) - EVT_CASE_EQ(STORY_CH7_DEFEATED_CRYSTAL_KING) - EVT_EXEC(N(EVS_RespawnStarCard)) - EVT_CASE_GT(STORY_CH7_DEFEATED_CRYSTAL_KING) - EVT_END_SWITCH - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE) - EVT_CALL(SetNpcYaw, NPC_CrystalKing_01, 270) - EVT_RETURN - EVT_END + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_Scene_BossDefeated))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_DEFEATED_CRYSTAL_KING) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_Scene_CrystalKingAppears))) + CaseEq(STORY_CH7_DEFEATED_CRYSTAL_KING) + Exec(N(EVS_RespawnStarCard)) + CaseGt(STORY_CH7_DEFEATED_CRYSTAL_KING) + EndSwitch + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_10000000, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE) + Call(SetNpcYaw, NPC_CrystalKing_01, 270) + Return + End }; EvtScript N(EVS_NpcInit_CrystalKing_Aux) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInit_Kalmar) = { - EVT_RETURN - EVT_END + Return + End }; NpcData N(NpcData_CrystalKing_01)[] = { diff --git a/src/world/area_pra/pra_33/pra_33_1_music.c b/src/world/area_pra/pra_33/pra_33_1_music.c index 029799bc02b..71af7e481d4 100644 --- a/src/world/area_pra/pra_33/pra_33_1_music.c +++ b/src/world/area_pra/pra_33/pra_33_1_music.c @@ -1,8 +1,8 @@ #include "pra_33.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Return + End }; diff --git a/src/world/area_pra/pra_33/pra_33_2_main.c b/src/world/area_pra/pra_33/pra_33_2_main.c index dbf419f4982..38a7f80b7e3 100644 --- a/src/world/area_pra/pra_33/pra_33_2_main.c +++ b/src/world/area_pra/pra_33/pra_33_2_main.c @@ -12,69 +12,69 @@ s32 N(LeftDoorModelsL)[] = { MODEL_o859, -1 }; s32 N(LeftDoorModelsR)[] = { MODEL_o861, -1 }; EvtScript N(EVS_ExitDoors_pra_35_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_33_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittse) - EVT_SET(LVar2, EVT_PTR(N(RightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(RightDoorModelsR))) - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_35"), pra_35_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_33_ENTRY_0) + Set(LVar1, COLLIDER_deilittse) + Set(LVar2, Ref(N(RightDoorModelsL))) + Set(LVar3, Ref(N(RightDoorModelsR))) + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_35"), pra_35_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_18_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_33_ENTRY_1) - EVT_SET(LVar1, COLLIDER_deilittnw) - EVT_SET(LVar2, EVT_PTR(N(LeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(LeftDoorModelsR))) - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_18"), pra_18_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_33_ENTRY_1) + Set(LVar1, COLLIDER_deilittnw) + Set(LVar2, Ref(N(LeftDoorModelsL))) + Set(LVar3, Ref(N(LeftDoorModelsR))) + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_18"), pra_18_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_pra_35_2) = EVT_EXIT_WALK(60, pra_33_ENTRY_2, "pra_35", pra_35_ENTRY_2); EvtScript N(EVS_Unused) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_35_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_18_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_pra_35_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_pra_35_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_18_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_pra_35_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(pra_33_ENTRY_0) - EVT_SET(LVar2, EVT_PTR(N(RightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(RightDoorModelsR))) - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(pra_33_ENTRY_1) - EVT_SET(LVar2, EVT_PTR(N(LeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(LeftDoorModelsR))) - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(pra_33_ENTRY_2) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(pra_33_ENTRY_0) + Set(LVar2, Ref(N(RightDoorModelsL))) + Set(LVar3, Ref(N(RightDoorModelsR))) + ExecWait(BaseEnterDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(pra_33_ENTRY_1) + Set(LVar2, Ref(N(LeftDoorModelsL))) + Set(LVar3, Ref(N(LeftDoorModelsR))) + ExecWait(BaseEnterDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(pra_33_ENTRY_2) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; BombTrigger N(BombPos_Wall) = { @@ -83,41 +83,41 @@ BombTrigger N(BombPos_Wall) = { }; EvtScript N(EVS_BlastWall) = { - EVT_SET(GF_PRA33_BombedWall, TRUE) - EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 0, 2, 34, 1, 10, 30) - EVT_CALL(EnableGroup, MODEL_g267, FALSE) - EVT_CALL(EnableGroup, MODEL_g270, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) - EVT_UNBIND - EVT_RETURN - EVT_END + Set(GF_PRA33_BombedWall, TRUE) + PlayEffect(EFFECT_BOMBETTE_BREAKING, 0, 2, 34, 1, 10, 30) + Call(EnableGroup, MODEL_g267, FALSE) + Call(EnableGroup, MODEL_g270, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) + Unbind + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_IF_EQ(GF_PRA33_BombedWall, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BlastWall)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Wall)), 1, 0) - EVT_CALL(EnableGroup, MODEL_g270, FALSE) - EVT_ELSE - EVT_CALL(EnableGroup, MODEL_g267, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_SET(LVar0, MODEL_o945) - EVT_SET(LVar1, MODEL_o987) - EVT_SET(LVar2, TEX_PANNER_0) - EVT_EXEC(N(EVS_GlassShimmer)) - EVT_SET(LVar0, REFLECTION_WALL_ONLY) - EVT_SET(LVar1, GF_PRA_BrokeIllusion) - EVT_EXEC(N(EVS_SetupReflections)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + IfEq(GF_PRA33_BombedWall, FALSE) + BindTrigger(Ref(N(EVS_BlastWall)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Wall)), 1, 0) + Call(EnableGroup, MODEL_g270, FALSE) + Else + Call(EnableGroup, MODEL_g267, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Set(LVar0, MODEL_o945) + Set(LVar1, MODEL_o987) + Set(LVar2, TEX_PANNER_0) + Exec(N(EVS_GlassShimmer)) + Set(LVar0, REFLECTION_WALL_ONLY) + Set(LVar1, GF_PRA_BrokeIllusion) + Exec(N(EVS_SetupReflections)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_pra/pra_33/pra_33_3_entity.c b/src/world/area_pra/pra_33/pra_33_3_entity.c index 529edf072a5..a470778bc9d 100644 --- a/src/world/area_pra/pra_33/pra_33_3_entity.c +++ b/src/world/area_pra/pra_33/pra_33_3_entity.c @@ -29,63 +29,63 @@ API_CALLABLE(N(UpdateDaisPlayerPos)) { } EvtScript N(EVS_ActivateSwitch) = { - EVT_IF_EQ(AF_PRA33_FlippingWall, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(AF_PRA33_FlippingWall, TRUE) + IfEq(AF_PRA33_FlippingWall, TRUE) + Return + EndIf + Set(AF_PRA33_FlippingWall, TRUE) // set wall orientation - EVT_IF_EQ(MV_WallFlipped, FALSE) - EVT_SET(MV_WallFlipped, TRUE) - EVT_ELSE - EVT_SET(MV_WallFlipped, FALSE) - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, COLLIDER_o1063, SOUND_PRA_FLIP_WALL, SOUND_SPACE_DEFAULT) - EVT_CALL(N(CheckPlayerOnDais)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o1063, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(N(GetDaisRelativePlayerPos)) + IfEq(MV_WallFlipped, FALSE) + Set(MV_WallFlipped, TRUE) + Else + Set(MV_WallFlipped, FALSE) + EndIf + Call(PlaySoundAtCollider, COLLIDER_o1063, SOUND_PRA_FLIP_WALL, SOUND_SPACE_DEFAULT) + Call(N(CheckPlayerOnDais)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o1063, COLLIDER_FLAGS_UPPER_MASK) + Call(N(GetDaisRelativePlayerPos)) // prepare the lerp - EVT_IF_EQ(MV_WallFlipped, FALSE) - EVT_SET(LVar2, 180) - EVT_CALL(MakeLerp, 180, 360, 15, EASING_LINEAR) - EVT_ELSE - EVT_SET(LVar2, 0) - EVT_CALL(MakeLerp, 0, 180, 15, EASING_LINEAR) - EVT_END_IF + IfEq(MV_WallFlipped, FALSE) + Set(LVar2, 180) + Call(MakeLerp, 180, 360, 15, EASING_LINEAR) + Else + Set(LVar2, 0) + Call(MakeLerp, 0, 180, 15, EASING_LINEAR) + EndIf // spin the dais and move the player if necessary - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g260, LVar0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o1045) - EVT_CALL(N(CheckPlayerOnDais)) - EVT_IF_EQ(LVarA, TRUE) - EVT_SET(LVar3, LVar2) - EVT_SUB(LVar3, LVar0) - EVT_SET(LVar2, LVar0) - EVT_ADD(LVar7, LVar3) - EVT_CALL(N(UpdateDaisPlayerPos)) - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(AF_PRA33_FlippingWall, FALSE) - EVT_CALL(N(CheckPlayerOnDais)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1063, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g260, LVar0, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_o1045) + Call(N(CheckPlayerOnDais)) + IfEq(LVarA, TRUE) + Set(LVar3, LVar2) + Sub(LVar3, LVar0) + Set(LVar2, LVar0) + Add(LVar7, LVar3) + Call(N(UpdateDaisPlayerPos)) + EndIf + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Set(AF_PRA33_FlippingWall, FALSE) + Call(N(CheckPlayerOnDais)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1063, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_SET(GF_PRA33_Unused, FALSE) - EVT_SET(AF_PRA33_FlippingWall, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_RedSwitch), 310, 0, 110, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_ActivateSwitch))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_RedSwitch), 310, 0, -110, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_ActivateSwitch))) - EVT_CALL(ParentColliderToModel, COLLIDER_o1045, MODEL_o990) - EVT_CALL(ParentColliderToModel, COLLIDER_o1063, MODEL_o990) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1063, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Set(GF_PRA33_Unused, FALSE) + Set(AF_PRA33_FlippingWall, FALSE) + Call(MakeEntity, Ref(Entity_RedSwitch), 310, 0, 110, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_ActivateSwitch))) + Call(MakeEntity, Ref(Entity_RedSwitch), 310, 0, -110, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_ActivateSwitch))) + Call(ParentColliderToModel, COLLIDER_o1045, MODEL_o990) + Call(ParentColliderToModel, COLLIDER_o1063, MODEL_o990) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1063, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; diff --git a/src/world/area_pra/pra_34/pra_34_1_music.c b/src/world/area_pra/pra_34/pra_34_1_music.c index cc1c3999d4e..77449218334 100644 --- a/src/world/area_pra/pra_34/pra_34_1_music.c +++ b/src/world/area_pra/pra_34/pra_34_1_music.c @@ -1,8 +1,8 @@ #include "pra_34.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Return + End }; diff --git a/src/world/area_pra/pra_34/pra_34_2_main.c b/src/world/area_pra/pra_34/pra_34_2_main.c index cad6076cc95..dc784e5a1ef 100644 --- a/src/world/area_pra/pra_34/pra_34_2_main.c +++ b/src/world/area_pra/pra_34/pra_34_2_main.c @@ -20,83 +20,83 @@ s32 N(BothRightDoorModelsL)[] = { MODEL_o874, MODEL_o875, MODEL_o880, MODEL_o881 s32 N(BothRightDoorModelsR)[] = { MODEL_o876, MODEL_o877, MODEL_o878, MODEL_o879, -1 }; EvtScript N(EVS_ExitDoors_pra_29_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_34_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittsw) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothLeftDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(NearLeftDoorModelsR))) - EVT_END_IF - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_29"), pra_29_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_34_ENTRY_0) + Set(LVar1, COLLIDER_deilittsw) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothLeftDoorModelsL))) + Set(LVar3, Ref(N(BothLeftDoorModelsR))) + Else + Set(LVar2, Ref(N(NearLeftDoorModelsL))) + Set(LVar3, Ref(N(NearLeftDoorModelsR))) + EndIf + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_29"), pra_29_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_31_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_34_ENTRY_1) - EVT_SET(LVar1, COLLIDER_deilittse) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothRightDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(NearRightDoorModelsR))) - EVT_END_IF - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_31"), pra_31_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_34_ENTRY_1) + Set(LVar1, COLLIDER_deilittse) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothRightDoorModelsL))) + Set(LVar3, Ref(N(BothRightDoorModelsR))) + Else + Set(LVar2, Ref(N(NearRightDoorModelsL))) + Set(LVar3, Ref(N(NearRightDoorModelsR))) + EndIf + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_31"), pra_31_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_31_2) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_34_ENTRY_2) - EVT_SET(LVar1, COLLIDER_deilittne) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothRightDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(FarRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(FarRightDoorModelsR))) - EVT_END_IF - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_31"), pra_31_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_34_ENTRY_2) + Set(LVar1, COLLIDER_deilittne) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothRightDoorModelsL))) + Set(LVar3, Ref(N(BothRightDoorModelsR))) + Else + Set(LVar2, Ref(N(FarRightDoorModelsL))) + Set(LVar3, Ref(N(FarRightDoorModelsR))) + EndIf + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_31"), pra_31_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_29_2) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_34_ENTRY_3) - EVT_SET(LVar1, COLLIDER_deilittnw) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothLeftDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(FarLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(FarLeftDoorModelsR))) - EVT_END_IF - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_29"), pra_29_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_34_ENTRY_3) + Set(LVar1, COLLIDER_deilittnw) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothLeftDoorModelsL))) + Set(LVar3, Ref(N(BothLeftDoorModelsR))) + Else + Set(LVar2, Ref(N(FarLeftDoorModelsL))) + Set(LVar3, Ref(N(FarLeftDoorModelsR))) + EndIf + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_29"), pra_29_ENTRY_2) + Wait(100) + Return + End }; #include "world/common/todo/RemovePadlock.inc.c" @@ -108,111 +108,111 @@ s32 N(PalaceKeyList)[] = { }; EvtScript N(EVS_UnlockPrompt_Doors) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SUSPEND_GROUP(EVT_GROUP_01) - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_CALL(CloseChoicePopup) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_RETURN - EVT_END_IF - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(CloseChoicePopup) - EVT_SET(GF_PRA34_UnlockedDoor, TRUE) - EVT_CALL(N(GetEntityPosition), MV_FarPadlockEntityID, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(N(GetEntityPosition), MV_NearPadlockEntityID, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_SET(LVar0, MV_FarPadlockEntityID) - EVT_CALL(N(RemovePadlock)) - EVT_SET(LVar0, MV_NearPadlockEntityID) - EVT_CALL(N(RemovePadlock)) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_UNBIND - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + SuspendGroup(EVT_GROUP_01) + Call(ShowKeyChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) + Call(CloseChoicePopup) + ResumeGroup(EVT_GROUP_01) + Return + EndIf + IfEq(LVar0, -1) + Call(CloseChoicePopup) + ResumeGroup(EVT_GROUP_01) + Return + EndIf + Call(RemoveKeyItemAt, LVar1) + Call(CloseChoicePopup) + Set(GF_PRA34_UnlockedDoor, TRUE) + Call(N(GetEntityPosition), MV_FarPadlockEntityID, LVar0, LVar1, LVar2) + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Call(N(GetEntityPosition), MV_NearPadlockEntityID, LVar0, LVar1, LVar2) + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Set(LVar0, MV_FarPadlockEntityID) + Call(N(RemovePadlock)) + Set(LVar0, MV_NearPadlockEntityID) + Call(N(RemovePadlock)) + ResumeGroup(EVT_GROUP_01) + Unbind + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_29_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_29_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0) - EVT_IF_EQ(GF_PRA34_UnlockedDoor, FALSE) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_UnlockPrompt_Doors)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(PalaceKeyList)), 0, 1) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_UnlockPrompt_Doors)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(1), EVT_PTR(N(PalaceKeyList)), 0, 1) - EVT_ELSE - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_31_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_31_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) - EVT_END_IF - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_pra_29_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_29_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0) + IfEq(GF_PRA34_UnlockedDoor, FALSE) + BindPadlock(Ref(N(EVS_UnlockPrompt_Doors)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), Ref(N(PalaceKeyList)), 0, 1) + BindPadlock(Ref(N(EVS_UnlockPrompt_Doors)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(1), Ref(N(PalaceKeyList)), 0, 1) + Else + BindTrigger(Ref(N(EVS_ExitDoors_pra_31_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_31_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) + EndIf + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(pra_34_ENTRY_0) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothLeftDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(NearLeftDoorModelsR))) - EVT_END_IF - EVT_CASE_EQ(pra_34_ENTRY_1) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothRightDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(NearRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(NearRightDoorModelsR))) - EVT_END_IF - EVT_CASE_EQ(pra_34_ENTRY_2) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothRightDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(FarRightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(FarRightDoorModelsR))) - EVT_END_IF - EVT_CASE_EQ(pra_34_ENTRY_3) - EVT_IF_EQ(GF_PRA_BrokeIllusion, FALSE) - EVT_SET(LVar2, EVT_PTR(N(BothLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(BothLeftDoorModelsR))) - EVT_ELSE - EVT_SET(LVar2, EVT_PTR(N(FarLeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(FarLeftDoorModelsR))) - EVT_END_IF - EVT_END_SWITCH - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(pra_34_ENTRY_0) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothLeftDoorModelsL))) + Set(LVar3, Ref(N(BothLeftDoorModelsR))) + Else + Set(LVar2, Ref(N(NearLeftDoorModelsL))) + Set(LVar3, Ref(N(NearLeftDoorModelsR))) + EndIf + CaseEq(pra_34_ENTRY_1) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothRightDoorModelsL))) + Set(LVar3, Ref(N(BothRightDoorModelsR))) + Else + Set(LVar2, Ref(N(NearRightDoorModelsL))) + Set(LVar3, Ref(N(NearRightDoorModelsR))) + EndIf + CaseEq(pra_34_ENTRY_2) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothRightDoorModelsL))) + Set(LVar3, Ref(N(BothRightDoorModelsR))) + Else + Set(LVar2, Ref(N(FarRightDoorModelsL))) + Set(LVar3, Ref(N(FarRightDoorModelsR))) + EndIf + CaseEq(pra_34_ENTRY_3) + IfEq(GF_PRA_BrokeIllusion, FALSE) + Set(LVar2, Ref(N(BothLeftDoorModelsL))) + Set(LVar3, Ref(N(BothLeftDoorModelsR))) + Else + Set(LVar2, Ref(N(FarLeftDoorModelsL))) + Set(LVar3, Ref(N(FarLeftDoorModelsR))) + EndIf + EndSwitch + ExecWait(BaseEnterDoor) + Exec(N(EVS_BindExitTriggers)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(LVar0, MODEL_o945) - EVT_SET(LVar1, MODEL_o947) - EVT_SET(LVar2, TEX_PANNER_0) - EVT_EXEC(N(EVS_GlassShimmer)) - EVT_SET(LVar0, REFLECTION_FLOOR_WALL) - EVT_SET(LVar1, GF_PRA_BrokeIllusion) - EVT_EXEC(N(EVS_SetupReflections)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Set(LVar0, MODEL_o945) + Set(LVar1, MODEL_o947) + Set(LVar2, TEX_PANNER_0) + Exec(N(EVS_GlassShimmer)) + Set(LVar0, REFLECTION_FLOOR_WALL) + Set(LVar1, GF_PRA_BrokeIllusion) + Exec(N(EVS_SetupReflections)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_pra/pra_34/pra_34_3_entity.c b/src/world/area_pra/pra_34/pra_34_3_entity.c index edc54b2ac54..e5d006db39b 100644 --- a/src/world/area_pra/pra_34/pra_34_3_entity.c +++ b/src/world/area_pra/pra_34/pra_34_3_entity.c @@ -2,23 +2,23 @@ #include "entity.h" EvtScript N(EVS_Interact_Padlock) = { - EVT_SET(GF_PRA34_UnlockedDoor, TRUE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_31_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_31_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) - EVT_RETURN - EVT_END + Set(GF_PRA34_UnlockedDoor, TRUE) + BindTrigger(Ref(N(EVS_ExitDoors_pra_31_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_31_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_PRA34_UnlockedDoor, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), 240, 8, -75, 270, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_Interact_Padlock))) - EVT_SET(MV_FarPadlockEntityID, LVar0) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), 240, 8, 75, 270, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_Interact_Padlock))) - EVT_SET(MV_NearPadlockEntityID, LVar0) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_PRA34_UnlockedDoor, FALSE) + Call(MakeEntity, Ref(Entity_Padlock), 240, 8, -75, 270, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_Interact_Padlock))) + Set(MV_FarPadlockEntityID, LVar0) + Call(MakeEntity, Ref(Entity_Padlock), 240, 8, 75, 270, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_Interact_Padlock))) + Set(MV_NearPadlockEntityID, LVar0) + EndIf + Return + End }; diff --git a/src/world/area_pra/pra_35/pra_35_1_music.c b/src/world/area_pra/pra_35/pra_35_1_music.c index de4299f6827..6e49c7523eb 100644 --- a/src/world/area_pra/pra_35/pra_35_1_music.c +++ b/src/world/area_pra/pra_35/pra_35_1_music.c @@ -1,8 +1,8 @@ #include "pra_35.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Return + End }; diff --git a/src/world/area_pra/pra_35/pra_35_2_main.c b/src/world/area_pra/pra_35/pra_35_2_main.c index ebe0a052e54..a5525367c67 100644 --- a/src/world/area_pra/pra_35/pra_35_2_main.c +++ b/src/world/area_pra/pra_35/pra_35_2_main.c @@ -12,69 +12,69 @@ s32 N(RightDoorModelsL)[] = { MODEL_o861, MODEL_o862, -1 }; s32 N(RightDoorModelsR)[] = { MODEL_o859, MODEL_o860, -1 }; EvtScript N(EVS_ExitWalk_pra_33_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_35_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittsw) - EVT_SET(LVar2, EVT_PTR(N(LeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(LeftDoorModelsR))) - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_33"), pra_33_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_35_ENTRY_0) + Set(LVar1, COLLIDER_deilittsw) + Set(LVar2, Ref(N(LeftDoorModelsL))) + Set(LVar3, Ref(N(LeftDoorModelsR))) + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_33"), pra_33_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_pra_19_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_35_ENTRY_1) - EVT_SET(LVar1, COLLIDER_deilittsw) - EVT_SET(LVar2, EVT_PTR(N(RightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(RightDoorModelsR))) - EVT_EXEC(BaseExitDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_19"), pra_19_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_35_ENTRY_1) + Set(LVar1, COLLIDER_deilittsw) + Set(LVar2, Ref(N(RightDoorModelsL))) + Set(LVar3, Ref(N(RightDoorModelsR))) + Exec(BaseExitDoor) + Wait(17) + Call(GotoMap, Ref("pra_19"), pra_19_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_pra_33_2) = EVT_EXIT_WALK(60, pra_35_ENTRY_2, "pra_33", pra_33_ENTRY_2); EvtScript N(EVS_Unused) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_pra_33_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_pra_19_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_pra_33_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_pra_33_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_pra_19_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_pra_33_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(pra_35_ENTRY_0) - EVT_SET(LVar2, EVT_PTR(N(LeftDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(LeftDoorModelsR))) - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(pra_35_ENTRY_1) - EVT_SET(LVar2, EVT_PTR(N(RightDoorModelsL))) - EVT_SET(LVar3, EVT_PTR(N(RightDoorModelsR))) - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(pra_35_ENTRY_2) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(pra_35_ENTRY_0) + Set(LVar2, Ref(N(LeftDoorModelsL))) + Set(LVar3, Ref(N(LeftDoorModelsR))) + ExecWait(BaseEnterDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(pra_35_ENTRY_1) + Set(LVar2, Ref(N(RightDoorModelsL))) + Set(LVar3, Ref(N(RightDoorModelsR))) + ExecWait(BaseEnterDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(pra_35_ENTRY_2) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; BombTrigger N(D_802432A8_D904F8) = { @@ -83,38 +83,38 @@ BombTrigger N(D_802432A8_D904F8) = { }; EvtScript N(D_802432B8_D90508) = { - EVT_CALL(EnableGroup, MODEL_g297, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittnw, COLLIDER_FLAGS_UPPER_MASK) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(EnableGroup, MODEL_g297, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittnw, COLLIDER_FLAGS_UPPER_MASK) + Unbind + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_SET(LVar0, 64) - EVT_SET(LVar1, 65) - EVT_SET(LVar2, 0) - EVT_EXEC(N(EVS_GlassShimmer)) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_IF_EQ(GF_PRA33_BombedWall, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(D_802432B8_D90508)), TRIGGER_POINT_BOMB, EVT_PTR(N(D_802432A8_D904F8)), 1, 0) - EVT_ELSE - EVT_CALL(EnableGroup, MODEL_g297, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittnw, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_SET(LVar0, 0) - EVT_SET(LVar1, GF_PRA_BrokeIllusion) - EVT_EXEC(N(EVS_SetupReflections)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Set(LVar0, 64) + Set(LVar1, 65) + Set(LVar2, 0) + Exec(N(EVS_GlassShimmer)) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_EnterMap)) + Wait(1) + IfEq(GF_PRA33_BombedWall, FALSE) + BindTrigger(Ref(N(D_802432B8_D90508)), TRIGGER_POINT_BOMB, Ref(N(D_802432A8_D904F8)), 1, 0) + Else + Call(EnableGroup, MODEL_g297, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittnw, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Set(LVar0, 0) + Set(LVar1, GF_PRA_BrokeIllusion) + Exec(N(EVS_SetupReflections)) + Exec(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/area_pra/pra_35/pra_35_3_npc.c b/src/world/area_pra/pra_35/pra_35_3_npc.c index 2d1e6dc3cbf..2f60ec0ac11 100644 --- a/src/world/area_pra/pra_35/pra_35_3_npc.c +++ b/src/world/area_pra/pra_35/pra_35_3_npc.c @@ -7,9 +7,9 @@ #include "world/common/enemy/ai/WanderMeleeAI.inc.c" EvtScript N(EVS_NpcInit_EnableReflection) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) + Return + End }; NpcData N(NpcData_Clubba)[] = { diff --git a/src/world/area_pra/pra_35/pra_35_4_entity.c b/src/world/area_pra/pra_35/pra_35_4_entity.c index edc3e748a87..fb448bda2fa 100644 --- a/src/world/area_pra/pra_35/pra_35_4_entity.c +++ b/src/world/area_pra/pra_35/pra_35_4_entity.c @@ -6,9 +6,9 @@ EvtScript N(EVS_OpenChest_TripleDip) = EVT_OPEN_CHEST_BADGE(ITEM_TRIPLE_DIP, GF_PRA35_Chest_TripleDip); EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 435, 0, -70, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_PRA35_Chest_TripleDip) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenChest_TripleDip))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Chest), 435, 0, -70, 0, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_PRA35_Chest_TripleDip) + Call(AssignScript, Ref(N(EVS_OpenChest_TripleDip))) + Return + End }; diff --git a/src/world/area_pra/pra_36/pra_36_1_music.c b/src/world/area_pra/pra_36/pra_36_1_music.c index 93d97123d64..b19dd89ef84 100644 --- a/src/world/area_pra/pra_36/pra_36_1_music.c +++ b/src/world/area_pra/pra_36/pra_36_1_music.c @@ -1,8 +1,8 @@ #include "pra_36.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Return + End }; diff --git a/src/world/area_pra/pra_36/pra_36_2_main.c b/src/world/area_pra/pra_36/pra_36_2_main.c index 3cae3cdaba4..457b3e404b2 100644 --- a/src/world/area_pra/pra_36/pra_36_2_main.c +++ b/src/world/area_pra/pra_36/pra_36_2_main.c @@ -11,81 +11,81 @@ s32 N(map_init)(void) { #include "../common/Reflection.data.inc.c" EvtScript N(EVS_ExitDoors_pra_21_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_36_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittsw) - EVT_SET(LVar2, MODEL_o772) - EVT_SET(LVar3, MODEL_o768) - EVT_SET(LVar4, MODEL_o844) - EVT_SET(LVar5, MODEL_o846) - EVT_EXEC(ExitSplitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_21"), pra_21_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_36_ENTRY_0) + Set(LVar1, COLLIDER_deilittsw) + Set(LVar2, MODEL_o772) + Set(LVar3, MODEL_o768) + Set(LVar4, MODEL_o844) + Set(LVar5, MODEL_o846) + Exec(ExitSplitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("pra_21"), pra_21_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_27_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_36_ENTRY_1) - EVT_SET(LVar1, COLLIDER_deilittse) - EVT_SET(LVar2, MODEL_o1019) - EVT_SET(LVar3, MODEL_o1021) - EVT_SET(LVar4, MODEL_o1020) - EVT_SET(LVar5, MODEL_o1022) - EVT_EXEC(ExitSplitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_27"), pra_27_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_36_ENTRY_1) + Set(LVar1, COLLIDER_deilittse) + Set(LVar2, MODEL_o1019) + Set(LVar3, MODEL_o1021) + Set(LVar4, MODEL_o1020) + Set(LVar5, MODEL_o1022) + Exec(ExitSplitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("pra_27"), pra_27_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_21_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_27_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_pra_21_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_27_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(pra_36_ENTRY_0) - EVT_SET(LVar2, MODEL_o772) - EVT_SET(LVar3, MODEL_o768) - EVT_SET(LVar4, MODEL_o844) - EVT_SET(LVar5, MODEL_o846) - EVT_EXEC_WAIT(EnterSplitDoubleDoor) - EVT_CASE_EQ(pra_36_ENTRY_1) - EVT_SET(LVar2, MODEL_o1019) - EVT_SET(LVar3, MODEL_o1021) - EVT_SET(LVar4, MODEL_o1020) - EVT_SET(LVar5, MODEL_o1022) - EVT_EXEC_WAIT(EnterSplitDoubleDoor) - EVT_END_SWITCH - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(pra_36_ENTRY_0) + Set(LVar2, MODEL_o772) + Set(LVar3, MODEL_o768) + Set(LVar4, MODEL_o844) + Set(LVar5, MODEL_o846) + ExecWait(EnterSplitDoubleDoor) + CaseEq(pra_36_ENTRY_1) + Set(LVar2, MODEL_o1019) + Set(LVar3, MODEL_o1021) + Set(LVar4, MODEL_o1020) + Set(LVar5, MODEL_o1022) + ExecWait(EnterSplitDoubleDoor) + EndSwitch + Exec(N(EVS_BindExitTriggers)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(LVar0, REFLECTION_FLOOR_ONLY) - EVT_SET(LVar1, GF_PRA_BrokeIllusion) - EVT_EXEC(N(EVS_SetupReflections)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Exec(N(EVS_SetupMusic)) + Set(LVar0, REFLECTION_FLOOR_ONLY) + Set(LVar1, GF_PRA_BrokeIllusion) + Exec(N(EVS_SetupReflections)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_pra/pra_36/pra_36_3_npc.c b/src/world/area_pra/pra_36/pra_36_3_npc.c index 997dede00a6..47a35a482cc 100644 --- a/src/world/area_pra/pra_36/pra_36_3_npc.c +++ b/src/world/area_pra/pra_36/pra_36_3_npc.c @@ -3,9 +3,9 @@ #include "world/common/enemy/Duplighost_Wander.inc.c" EvtScript N(EVS_NpcInit_Duplighost) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) + Return + End }; NpcData N(NpcData_Duplighost) = { diff --git a/src/world/area_pra/pra_37/pra_37_1_music.c b/src/world/area_pra/pra_37/pra_37_1_music.c index 51af2ae18c7..2be8e456aa6 100644 --- a/src/world/area_pra/pra_37/pra_37_1_music.c +++ b/src/world/area_pra/pra_37/pra_37_1_music.c @@ -1,8 +1,8 @@ #include "pra_37.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Return + End }; diff --git a/src/world/area_pra/pra_37/pra_37_2_main.c b/src/world/area_pra/pra_37/pra_37_2_main.c index ede256d9d31..56258d6cc97 100644 --- a/src/world/area_pra/pra_37/pra_37_2_main.c +++ b/src/world/area_pra/pra_37/pra_37_2_main.c @@ -11,81 +11,81 @@ s32 N(map_init)(void) { #include "../common/Reflection.data.inc.c" EvtScript N(EVS_ExitDoors_pra_22_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_37_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittsw) - EVT_SET(LVar2, MODEL_o772) - EVT_SET(LVar3, MODEL_o768) - EVT_SET(LVar4, MODEL_o844) - EVT_SET(LVar5, MODEL_o846) - EVT_EXEC(ExitSplitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_22"), pra_22_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_37_ENTRY_0) + Set(LVar1, COLLIDER_deilittsw) + Set(LVar2, MODEL_o772) + Set(LVar3, MODEL_o768) + Set(LVar4, MODEL_o844) + Set(LVar5, MODEL_o846) + Exec(ExitSplitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("pra_22"), pra_22_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_28_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_37_ENTRY_1) - EVT_SET(LVar1, COLLIDER_deilittse) - EVT_SET(LVar2, MODEL_o1019) - EVT_SET(LVar3, MODEL_o1021) - EVT_SET(LVar4, MODEL_o1020) - EVT_SET(LVar5, MODEL_o1022) - EVT_EXEC(ExitSplitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_28"), pra_28_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_37_ENTRY_1) + Set(LVar1, COLLIDER_deilittse) + Set(LVar2, MODEL_o1019) + Set(LVar3, MODEL_o1021) + Set(LVar4, MODEL_o1020) + Set(LVar5, MODEL_o1022) + Exec(ExitSplitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("pra_28"), pra_28_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_22_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_28_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_pra_22_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_28_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(pra_37_ENTRY_0) - EVT_SET(LVar2, MODEL_o772) - EVT_SET(LVar3, MODEL_o768) - EVT_SET(LVar4, MODEL_o844) - EVT_SET(LVar5, MODEL_o846) - EVT_EXEC_WAIT(EnterSplitDoubleDoor) - EVT_CASE_EQ(pra_37_ENTRY_1) - EVT_SET(LVar2, MODEL_o1019) - EVT_SET(LVar3, MODEL_o1021) - EVT_SET(LVar4, MODEL_o1020) - EVT_SET(LVar5, MODEL_o1022) - EVT_EXEC_WAIT(EnterSplitDoubleDoor) - EVT_END_SWITCH - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(pra_37_ENTRY_0) + Set(LVar2, MODEL_o772) + Set(LVar3, MODEL_o768) + Set(LVar4, MODEL_o844) + Set(LVar5, MODEL_o846) + ExecWait(EnterSplitDoubleDoor) + CaseEq(pra_37_ENTRY_1) + Set(LVar2, MODEL_o1019) + Set(LVar3, MODEL_o1021) + Set(LVar4, MODEL_o1020) + Set(LVar5, MODEL_o1022) + ExecWait(EnterSplitDoubleDoor) + EndSwitch + Exec(N(EVS_BindExitTriggers)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(LVar0, REFLECTION_FLOOR_ONLY) - EVT_SET(LVar1, GF_PRA_BrokeIllusion) - EVT_EXEC(N(EVS_SetupReflections)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Exec(N(EVS_SetupMusic)) + Set(LVar0, REFLECTION_FLOOR_ONLY) + Set(LVar1, GF_PRA_BrokeIllusion) + Exec(N(EVS_SetupReflections)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_pra/pra_37/pra_37_3_npc.c b/src/world/area_pra/pra_37/pra_37_3_npc.c index 5d0b3e0b751..8c1b44228c7 100644 --- a/src/world/area_pra/pra_37/pra_37_3_npc.c +++ b/src/world/area_pra/pra_37/pra_37_3_npc.c @@ -4,9 +4,9 @@ #include "world/common/enemy/FrostClubba_Multi.inc.c" EvtScript N(EVS_NpcInit_FrostClubba) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) + Return + End }; NpcData N(NpcData_FrostClubba)[] = { diff --git a/src/world/area_pra/pra_38/pra_38_1_music.c b/src/world/area_pra/pra_38/pra_38_1_music.c index 6e469007af2..76d0f0bda90 100644 --- a/src/world/area_pra/pra_38/pra_38_1_music.c +++ b/src/world/area_pra/pra_38/pra_38_1_music.c @@ -1,8 +1,8 @@ #include "pra_38.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Return + End }; diff --git a/src/world/area_pra/pra_38/pra_38_2_main.c b/src/world/area_pra/pra_38/pra_38_2_main.c index 29c629d356d..03c470d27cc 100644 --- a/src/world/area_pra/pra_38/pra_38_2_main.c +++ b/src/world/area_pra/pra_38/pra_38_2_main.c @@ -11,81 +11,81 @@ s32 N(map_init)(void) { #include "../common/Reflection.data.inc.c" EvtScript N(EVS_ExitDoors_pra_03_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_38_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittsw) - EVT_SET(LVar2, MODEL_o772) - EVT_SET(LVar3, MODEL_o768) - EVT_SET(LVar4, MODEL_o844) - EVT_SET(LVar5, MODEL_o846) - EVT_EXEC(ExitSplitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_03"), pra_03_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_38_ENTRY_0) + Set(LVar1, COLLIDER_deilittsw) + Set(LVar2, MODEL_o772) + Set(LVar3, MODEL_o768) + Set(LVar4, MODEL_o844) + Set(LVar5, MODEL_o846) + Exec(ExitSplitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("pra_03"), pra_03_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_05_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_38_ENTRY_1) - EVT_SET(LVar1, COLLIDER_deilittse) - EVT_SET(LVar2, MODEL_o1019) - EVT_SET(LVar3, MODEL_o1021) - EVT_SET(LVar4, MODEL_o1020) - EVT_SET(LVar5, MODEL_o1022) - EVT_EXEC(ExitSplitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_05"), pra_05_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_38_ENTRY_1) + Set(LVar1, COLLIDER_deilittse) + Set(LVar2, MODEL_o1019) + Set(LVar3, MODEL_o1021) + Set(LVar4, MODEL_o1020) + Set(LVar5, MODEL_o1022) + Exec(ExitSplitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("pra_05"), pra_05_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_03_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_05_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_pra_03_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_05_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(pra_38_ENTRY_0) - EVT_SET(LVar2, MODEL_o772) - EVT_SET(LVar3, MODEL_o768) - EVT_SET(LVar4, MODEL_o844) - EVT_SET(LVar5, MODEL_o846) - EVT_EXEC_WAIT(EnterSplitDoubleDoor) - EVT_CASE_EQ(pra_38_ENTRY_1) - EVT_SET(LVar2, MODEL_o1019) - EVT_SET(LVar3, MODEL_o1021) - EVT_SET(LVar4, MODEL_o1020) - EVT_SET(LVar5, MODEL_o1022) - EVT_EXEC_WAIT(EnterSplitDoubleDoor) - EVT_END_SWITCH - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(pra_38_ENTRY_0) + Set(LVar2, MODEL_o772) + Set(LVar3, MODEL_o768) + Set(LVar4, MODEL_o844) + Set(LVar5, MODEL_o846) + ExecWait(EnterSplitDoubleDoor) + CaseEq(pra_38_ENTRY_1) + Set(LVar2, MODEL_o1019) + Set(LVar3, MODEL_o1021) + Set(LVar4, MODEL_o1020) + Set(LVar5, MODEL_o1022) + ExecWait(EnterSplitDoubleDoor) + EndSwitch + Exec(N(EVS_BindExitTriggers)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(LVar0, REFLECTION_FLOOR_ONLY) - EVT_SET(LVar1, GF_PRA_BrokeIllusion) - EVT_EXEC(N(EVS_SetupReflections)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Exec(N(EVS_SetupMusic)) + Set(LVar0, REFLECTION_FLOOR_ONLY) + Set(LVar1, GF_PRA_BrokeIllusion) + Exec(N(EVS_SetupReflections)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_pra/pra_38/pra_38_3_npc.c b/src/world/area_pra/pra_38/pra_38_3_npc.c index a22cbb7858b..4decf2598da 100644 --- a/src/world/area_pra/pra_38/pra_38_3_npc.c +++ b/src/world/area_pra/pra_38/pra_38_3_npc.c @@ -3,9 +3,9 @@ #include "world/common/enemy/Swooper.inc.c" EvtScript N(EVS_NpcInit_Swoopula) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) + Return + End }; NpcData N(NpcData_Swoopula_01) = { diff --git a/src/world/area_pra/pra_39/pra_39_1_music.c b/src/world/area_pra/pra_39/pra_39_1_music.c index e8adfd0e037..f26cb5d336a 100644 --- a/src/world/area_pra/pra_39/pra_39_1_music.c +++ b/src/world/area_pra/pra_39/pra_39_1_music.c @@ -1,8 +1,8 @@ #include "pra_39.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Return + End }; diff --git a/src/world/area_pra/pra_39/pra_39_2_main.c b/src/world/area_pra/pra_39/pra_39_2_main.c index 55294274d35..aa4e37e5d9c 100644 --- a/src/world/area_pra/pra_39/pra_39_2_main.c +++ b/src/world/area_pra/pra_39/pra_39_2_main.c @@ -11,81 +11,81 @@ s32 N(map_init)(void) { #include "../common/Reflection.data.inc.c" EvtScript N(EVS_ExitDoors_pra_04_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_39_ENTRY_0) - EVT_SET(LVar1, COLLIDER_deilittsw) - EVT_SET(LVar2, MODEL_o772) - EVT_SET(LVar3, MODEL_o768) - EVT_SET(LVar4, MODEL_o844) - EVT_SET(LVar5, MODEL_o846) - EVT_EXEC(ExitSplitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_04"), pra_04_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_39_ENTRY_0) + Set(LVar1, COLLIDER_deilittsw) + Set(LVar2, MODEL_o772) + Set(LVar3, MODEL_o768) + Set(LVar4, MODEL_o844) + Set(LVar5, MODEL_o846) + Exec(ExitSplitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("pra_04"), pra_04_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitDoors_pra_06_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, pra_39_ENTRY_1) - EVT_SET(LVar1, COLLIDER_deilittse) - EVT_SET(LVar2, MODEL_o1019) - EVT_SET(LVar3, MODEL_o1021) - EVT_SET(LVar4, MODEL_o1020) - EVT_SET(LVar5, MODEL_o1022) - EVT_EXEC(ExitSplitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("pra_06"), pra_06_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, pra_39_ENTRY_1) + Set(LVar1, COLLIDER_deilittse) + Set(LVar2, MODEL_o1019) + Set(LVar3, MODEL_o1021) + Set(LVar4, MODEL_o1020) + Set(LVar5, MODEL_o1022) + Exec(ExitSplitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("pra_06"), pra_06_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_04_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_06_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_pra_04_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_06_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(pra_39_ENTRY_0) - EVT_SET(LVar2, MODEL_o772) - EVT_SET(LVar3, MODEL_o768) - EVT_SET(LVar4, MODEL_o844) - EVT_SET(LVar5, MODEL_o846) - EVT_EXEC_WAIT(EnterSplitDoubleDoor) - EVT_CASE_EQ(pra_39_ENTRY_1) - EVT_SET(LVar2, MODEL_o1019) - EVT_SET(LVar3, MODEL_o1021) - EVT_SET(LVar4, MODEL_o1020) - EVT_SET(LVar5, MODEL_o1022) - EVT_EXEC_WAIT(EnterSplitDoubleDoor) - EVT_END_SWITCH - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(pra_39_ENTRY_0) + Set(LVar2, MODEL_o772) + Set(LVar3, MODEL_o768) + Set(LVar4, MODEL_o844) + Set(LVar5, MODEL_o846) + ExecWait(EnterSplitDoubleDoor) + CaseEq(pra_39_ENTRY_1) + Set(LVar2, MODEL_o1019) + Set(LVar3, MODEL_o1021) + Set(LVar4, MODEL_o1020) + Set(LVar5, MODEL_o1022) + ExecWait(EnterSplitDoubleDoor) + EndSwitch + Exec(N(EVS_BindExitTriggers)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(LVar0, REFLECTION_FLOOR_ONLY) - EVT_SET(LVar1, GF_PRA_BrokeIllusion) - EVT_EXEC(N(EVS_SetupReflections)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Exec(N(EVS_SetupMusic)) + Set(LVar0, REFLECTION_FLOOR_ONLY) + Set(LVar1, GF_PRA_BrokeIllusion) + Exec(N(EVS_SetupReflections)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_pra/pra_39/pra_39_3_npc.c b/src/world/area_pra/pra_39/pra_39_3_npc.c index e1fe45fc5da..4e4189430d2 100644 --- a/src/world/area_pra/pra_39/pra_39_3_npc.c +++ b/src/world/area_pra/pra_39/pra_39_3_npc.c @@ -4,9 +4,9 @@ #include "world/common/enemy/Duplighost_Wander.inc.c" EvtScript N(EVS_NpcInit_Duplighost) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_REFLECT_FLOOR, TRUE) + Return + End }; NpcData N(NpcData_Duplighost) = { diff --git a/src/world/area_pra/pra_40/pra_40_1_music.c b/src/world/area_pra/pra_40/pra_40_1_music.c index b7223d29c80..11e8aa3c9c5 100644 --- a/src/world/area_pra/pra_40/pra_40_1_music.c +++ b/src/world/area_pra/pra_40/pra_40_1_music.c @@ -1,8 +1,8 @@ #include "pra_40.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_CRYSTAL_PALACE, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Return + End }; diff --git a/src/world/area_pra/pra_40/pra_40_2_main.c b/src/world/area_pra/pra_40/pra_40_2_main.c index 5877ed14b81..5023dd61579 100644 --- a/src/world/area_pra/pra_40/pra_40_2_main.c +++ b/src/world/area_pra/pra_40/pra_40_2_main.c @@ -7,46 +7,46 @@ EvtScript N(EVS_ExitDoors_pra_31_1) = EVT_EXIT_DOUBLE_DOOR(pra_40_ENTRY_0, "pra_ EvtScript N(EVS_ExitDoors_pra_32_0) = EVT_EXIT_DOUBLE_DOOR(pra_40_ENTRY_1, "pra_32", pra_32_ENTRY_0, COLLIDER_deilitt2, MODEL_o880, MODEL_o878); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_31_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitt1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_pra_32_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitt2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_pra_31_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitt1, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_pra_32_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitt2, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(pra_40_ENTRY_0) - EVT_SET(LVar2, MODEL_o1055) - EVT_SET(LVar3, MODEL_o1053) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(pra_40_ENTRY_1) - EVT_SET(LVar2, MODEL_o880) - EVT_SET(LVar3, MODEL_o878) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_END_SWITCH - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(pra_40_ENTRY_0) + Set(LVar2, MODEL_o1055) + Set(LVar3, MODEL_o1053) + ExecWait(EnterDoubleDoor) + CaseEq(pra_40_ENTRY_1) + Set(LVar2, MODEL_o880) + Set(LVar3, MODEL_o878) + ExecWait(EnterDoubleDoor) + EndSwitch + Exec(N(EVS_BindExitTriggers)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_CRYSTAL_PALACE) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 24, 24, 40) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_pra/pra_40/pra_40_3_entity.c b/src/world/area_pra/pra_40/pra_40_3_entity.c index 85aad0cc3ea..2d422f52e71 100644 --- a/src/world/area_pra/pra_40/pra_40_3_entity.c +++ b/src/world/area_pra/pra_40/pra_40_3_entity.c @@ -2,8 +2,8 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 165, 60, -50, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), 85, 60, -50, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_SavePoint), 165, 60, -50, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HeartBlock), 85, 60, -50, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_sam/common/ManageSnowfall.inc.c b/src/world/area_sam/common/ManageSnowfall.inc.c index 02b94366648..e9513d6a21d 100644 --- a/src/world/area_sam/common/ManageSnowfall.inc.c +++ b/src/world/area_sam/common/ManageSnowfall.inc.c @@ -3,19 +3,19 @@ #include "effects.h" EvtScript N(EVS_ManageSnowfall) = { - EVT_SET(AF_SAM_Snowing, TRUE) - EVT_SET(AF_SAM_LastSnowing, FALSE) - EVT_LABEL(10) - EVT_IF_NE(AF_SAM_Snowing, AF_SAM_LastSnowing) - EVT_IF_EQ(AF_SAM_Snowing, FALSE) - EVT_CALL(RemoveEffect, LVarF) - EVT_ELSE - EVT_PLAY_EFFECT(EFFECT_SNOWFALL, 0, 10) - EVT_END_IF - EVT_SET(AF_SAM_LastSnowing, AF_SAM_Snowing) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Set(AF_SAM_Snowing, TRUE) + Set(AF_SAM_LastSnowing, FALSE) + Label(10) + IfNe(AF_SAM_Snowing, AF_SAM_LastSnowing) + IfEq(AF_SAM_Snowing, FALSE) + Call(RemoveEffect, LVarF) + Else + PlayEffect(EFFECT_SNOWFALL, 0, 10) + EndIf + Set(AF_SAM_LastSnowing, AF_SAM_Snowing) + EndIf + Wait(1) + Goto(10) + Return + End }; diff --git a/src/world/area_sam/sam_01/sam_01_1_music.c b/src/world/area_sam/sam_01/sam_01_1_music.c index 03ecd0028cd..8a06d6cc749 100644 --- a/src/world/area_sam/sam_01/sam_01_1_music.c +++ b/src/world/area_sam/sam_01/sam_01_1_music.c @@ -1,14 +1,14 @@ #include "sam_01.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_CALL(SetMusicTrack, 0, SONG_SHIVER_CITY, 0, 8) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(SetMusicTrack, 0, SONG_PENGUIN_MYSTERY, 0, 8) - EVT_CASE_GE(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(SetMusicTrack, 0, SONG_SHIVER_CITY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + Call(SetMusicTrack, 0, SONG_SHIVER_CITY, 0, 8) + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(SetMusicTrack, 0, SONG_PENGUIN_MYSTERY, 0, 8) + CaseGe(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(SetMusicTrack, 0, SONG_SHIVER_CITY, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_sam/sam_01/sam_01_2_main.c b/src/world/area_sam/sam_01/sam_01_2_main.c index 7240e8fce52..d88346fab32 100644 --- a/src/world/area_sam/sam_01/sam_01_2_main.c +++ b/src/world/area_sam/sam_01/sam_01_2_main.c @@ -6,101 +6,101 @@ EvtScript N(EVS_ExitWalk_sam_02_0) = EVT_EXIT_WALK(60, sam_01_ENTRY_0, "sam_02", sam_02_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sam_02_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sam_02_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; #include "../common/ManageSnowfall.inc.c" EvtScript N(EVS_OpenAndCloseMayorsDoor) = { - EVT_CALL(EnableGroup, MODEL_s_naisou, TRUE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_tts, SOUND_BASIC_DOOR_OPEN, 0) - EVT_CALL(MakeLerp, 0, -80, 15, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_s_doa, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_CALL(MakeLerp, -80, 0, 15, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_s_doa, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_tts, SOUND_BASIC_DOOR_CLOSE, 0) - EVT_CALL(EnableGroup, MODEL_s_naisou, FALSE) - EVT_RETURN - EVT_END + Call(EnableGroup, MODEL_s_naisou, TRUE) + Call(PlaySoundAtCollider, COLLIDER_tts, SOUND_BASIC_DOOR_OPEN, 0) + Call(MakeLerp, 0, -80, 15, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_s_doa, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(20) + Call(MakeLerp, -80, 0, 15, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_s_doa, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_tts, SOUND_BASIC_DOOR_CLOSE, 0) + Call(EnableGroup, MODEL_s_naisou, FALSE) + Return + End }; EvtScript N(EVS_SetupHerringway) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH7_SPOKE_WITH_HERRINGWAY) - EVT_CALL(SetNpcPos, NPC_Herringway, -202, 0, 276) - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_IF_LT(LVar0, -40) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcFlagBits, NPC_Herringway, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Herringway, ANIM_Herringway_Walk) - EVT_CALL(NpcMoveTo, NPC_Herringway, -265, 275, 20 * DT) - EVT_EXEC(N(EVS_OpenAndCloseMayorsDoor)) - EVT_WAIT(20 * DT) - EVT_CALL(NpcMoveTo, NPC_Herringway, -290, 157, 20 * DT) - EVT_WAIT(20 * DT) - EVT_THREAD - EVT_CALL(NpcMoveTo, NPC_Herringway, -228, 91, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Herringway, ANIM_Herringway_Idle) - EVT_CALL(InterpNpcYaw, NPC_Herringway, 270, 0) - EVT_CALL(SetNpcFlagBits, NPC_Herringway, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_END_THREAD - EVT_SET(GB_StoryProgress, STORY_CH7_HERRINGWAY_AT_MAYORS_HOUSE) - EVT_CALL(BindNpcInteract, NPC_Herringway, EVT_PTR(N(EVS_NpcInteract_Herringway))) - EVT_EXEC_WAIT(N(EVS_SetupMayorRooms)) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH7_SPOKE_WITH_HERRINGWAY) + Call(SetNpcPos, NPC_Herringway, -202, 0, 276) + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + IfLt(LVar0, -40) + BreakLoop + EndIf + EndLoop + Call(SetNpcFlagBits, NPC_Herringway, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_Herringway, ANIM_Herringway_Walk) + Call(NpcMoveTo, NPC_Herringway, -265, 275, 20 * DT) + Exec(N(EVS_OpenAndCloseMayorsDoor)) + Wait(20 * DT) + Call(NpcMoveTo, NPC_Herringway, -290, 157, 20 * DT) + Wait(20 * DT) + Thread + Call(NpcMoveTo, NPC_Herringway, -228, 91, 20 * DT) + Call(SetNpcAnimation, NPC_Herringway, ANIM_Herringway_Idle) + Call(InterpNpcYaw, NPC_Herringway, 270, 0) + Call(SetNpcFlagBits, NPC_Herringway, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + EndThread + Set(GB_StoryProgress, STORY_CH7_HERRINGWAY_AT_MAYORS_HOUSE) + Call(BindNpcInteract, NPC_Herringway, Ref(N(EVS_NpcInteract_Herringway))) + ExecWait(N(EVS_SetupMayorRooms)) + EndIf + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHIVER_CITY) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(BeforeNPCs))) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(MysteryNPCs))) - EVT_CASE_GE(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(AfterNPCs))) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_ManageSnowfall)) - EVT_EXEC_WAIT(N(EVS_SetupRooms)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o341, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_f_noki, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_m_noki, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o398, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o399, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o402, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o408, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o409, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilie, SURFACE_TYPE_SNOW) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupHerringway)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_SHIVER_CITY) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + Call(MakeNpcs, FALSE, Ref(N(BeforeNPCs))) + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(MakeNpcs, FALSE, Ref(N(MysteryNPCs))) + CaseGe(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(MakeNpcs, FALSE, Ref(N(AfterNPCs))) + EndSwitch + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupMusic)) + Exec(N(EVS_ManageSnowfall)) + ExecWait(N(EVS_SetupRooms)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o341, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_f_noki, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_m_noki, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o398, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o399, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o402, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o408, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o409, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilie, SURFACE_TYPE_SNOW) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Exec(N(EVS_SetupHerringway)) + Return + End }; diff --git a/src/world/area_sam/sam_01/sam_01_3_rooms.c b/src/world/area_sam/sam_01/sam_01_3_rooms.c index 9c46b2caac7..dad744da991 100644 --- a/src/world/area_sam/sam_01/sam_01_3_rooms.c +++ b/src/world/area_sam/sam_01/sam_01_3_rooms.c @@ -1,196 +1,196 @@ #include "sam_01.h" EvtScript N(EVS_SetDoorRot_MayorFoyer) = { - EVT_CALL(RotateModel, MODEL_o235, LVar0, 0, -1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o235, LVar0, 0, -1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_MayorFoyer) = { - EVT_CALL(RotateGroup, MODEL_s_mae, LVar0, 1, 0, 0) - EVT_IF_GT(LVar0, 89) - EVT_CALL(SetGroupVisibility, MODEL_s_mae, MODEL_GROUP_HIDDEN) - EVT_END_IF - EVT_IF_LT(LVar0, 89) - EVT_CALL(SetGroupVisibility, MODEL_s_mae, MODEL_GROUP_VISIBLE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(RotateGroup, MODEL_s_mae, LVar0, 1, 0, 0) + IfGt(LVar0, 89) + Call(SetGroupVisibility, MODEL_s_mae, MODEL_GROUP_HIDDEN) + EndIf + IfLt(LVar0, 89) + Call(SetGroupVisibility, MODEL_s_mae, MODEL_GROUP_VISIBLE) + EndIf + Return + End }; EvtScript N(EVS_DropDoor_MayorFoyer) = { - EVT_CALL(RotateModel, MODEL_o235, LVar0, 1, 0, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o235, LVar0, 1, 0, 0) + Return + End }; EvtScript N(EVS_RoomListener_MayorFoyer) = { - EVT_CALL(UseRoomDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_SET(AF_SAM_04, TRUE) - EVT_SET(AF_SAM_Snowing, FALSE) - EVT_CALL(SetGroupVisibility, MODEL_s_naisou, MODEL_GROUP_VISIBLE) - EVT_IF_GE(GB_StoryProgress, STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(SetNpcPos, NPC_MayorPenguin, -275, 0, -200) - EVT_CALL(InterpNpcYaw, NPC_MayorPenguin, 180, 0) - EVT_CALL(SetNpcPos, NPC_MayorPenguinWife, -300, 0, -50) - EVT_CALL(InterpNpcYaw, NPC_MayorPenguinWife, 0, 0) - EVT_END_IF - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_SET(AF_SAM_04, FALSE) - EVT_SET(AF_SAM_Snowing, TRUE) - EVT_CALL(SetGroupVisibility, MODEL_s_naisou, MODEL_GROUP_HIDDEN) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(UseRoomDoorSounds, DOOR_SOUNDS_BASIC) + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Set(AF_SAM_04, TRUE) + Set(AF_SAM_Snowing, FALSE) + Call(SetGroupVisibility, MODEL_s_naisou, MODEL_GROUP_VISIBLE) + IfGe(GB_StoryProgress, STORY_CH7_MAYOR_MURDER_SOLVED) + Call(SetNpcPos, NPC_MayorPenguin, -275, 0, -200) + Call(InterpNpcYaw, NPC_MayorPenguin, 180, 0) + Call(SetNpcPos, NPC_MayorPenguinWife, -300, 0, -50) + Call(InterpNpcYaw, NPC_MayorPenguinWife, 0, 0) + EndIf + CaseEq(ROOM_UPDATE_EXIT_END) + Set(AF_SAM_04, FALSE) + Set(AF_SAM_Snowing, TRUE) + Call(SetGroupVisibility, MODEL_s_naisou, MODEL_GROUP_HIDDEN) + EndSwitch + Return + End }; EvtScript N(EVS_SetDoorRot_MayorOffice) = { - EVT_CALL(RotateModel, MODEL_o236, LVar0, 0, -1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o236, LVar0, 0, -1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_MayorOffice) = { - EVT_CALL(RotateGroup, MODEL_s_yane, LVar0, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_s_yoko, LVar0, 0, 0, -1) - EVT_IF_GT(LVar0, 89) - EVT_CALL(EnableGroup, MODEL_s_yoko, FALSE) - EVT_END_IF - EVT_IF_LT(LVar0, 89) - EVT_CALL(EnableGroup, MODEL_s_yoko, TRUE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(RotateGroup, MODEL_s_yane, LVar0, 0, 0, 1) + Call(RotateGroup, MODEL_s_yoko, LVar0, 0, 0, -1) + IfGt(LVar0, 89) + Call(EnableGroup, MODEL_s_yoko, FALSE) + EndIf + IfLt(LVar0, 89) + Call(EnableGroup, MODEL_s_yoko, TRUE) + EndIf + Return + End }; EvtScript N(EVS_RoomListener_MayorOffice) = { - EVT_CALL(UseRoomDoorSounds, DOOR_SOUNDS_BASIC) - EVT_IF_EQ(GB_StoryProgress, STORY_CH7_HERRINGWAY_AT_MAYORS_HOUSE) - EVT_IF_EQ(AF_SAM_03, TRUE) - EVT_SET(LVar0, -1) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_IF_EQ(GB_StoryProgress, STORY_CH7_HERRINGWAY_AT_MAYORS_HOUSE) - EVT_THREAD - EVT_CALL(BindNpcInteract, NPC_Herringway, 0) - EVT_CALL(SetNpcFlagBits, NPC_Herringway, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Herringway, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Herringway, ANIM_Penguin_Walk) - EVT_CALL(SetNpcSpeed, NPC_Herringway, EVT_FLOAT(1.5 / DT)) - EVT_CALL(NpcMoveTo, NPC_Herringway, -252, -55, 0) - EVT_CALL(SetNpcAnimation, NPC_Herringway, ANIM_Penguin_Idle) - EVT_CALL(SetNpcFlagBits, NPC_Herringway, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(BindNpcInteract, NPC_Herringway, EVT_PTR(N(EVS_NpcInteract_Herringway))) - EVT_END_THREAD - EVT_END_IF - EVT_CASE_EQ(ROOM_UPDATE_ENTER_DONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH7_HERRINGWAY_AT_MAYORS_HOUSE) - EVT_CALL(SetMusicTrack, 0, SONG_PENGUIN_WHODUNIT, 1, 8) - EVT_END_IF - EVT_SET(AF_SAM_03, TRUE) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_IF_EQ(GB_StoryProgress, STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_END_IF - EVT_SET(AF_SAM_03, FALSE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(UseRoomDoorSounds, DOOR_SOUNDS_BASIC) + IfEq(GB_StoryProgress, STORY_CH7_HERRINGWAY_AT_MAYORS_HOUSE) + IfEq(AF_SAM_03, TRUE) + Set(LVar0, -1) + Return + EndIf + EndIf + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + IfEq(GB_StoryProgress, STORY_CH7_HERRINGWAY_AT_MAYORS_HOUSE) + Thread + Call(BindNpcInteract, NPC_Herringway, 0) + Call(SetNpcFlagBits, NPC_Herringway, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Herringway, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_Herringway, ANIM_Penguin_Walk) + Call(SetNpcSpeed, NPC_Herringway, Float(1.5 / DT)) + Call(NpcMoveTo, NPC_Herringway, -252, -55, 0) + Call(SetNpcAnimation, NPC_Herringway, ANIM_Penguin_Idle) + Call(SetNpcFlagBits, NPC_Herringway, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(BindNpcInteract, NPC_Herringway, Ref(N(EVS_NpcInteract_Herringway))) + EndThread + EndIf + CaseEq(ROOM_UPDATE_ENTER_DONE) + IfEq(GB_StoryProgress, STORY_CH7_HERRINGWAY_AT_MAYORS_HOUSE) + Call(SetMusicTrack, 0, SONG_PENGUIN_WHODUNIT, 1, 8) + EndIf + Set(AF_SAM_03, TRUE) + CaseEq(ROOM_UPDATE_EXIT_END) + IfEq(GB_StoryProgress, STORY_CH7_MAYOR_MURDER_MYSTERY) + Exec(N(EVS_SetupMusic)) + EndIf + Set(AF_SAM_03, FALSE) + EndSwitch + Return + End }; EvtScript N(EVS_SetDoorRot_MiddleHouse) = { - EVT_CALL(RotateModel, MODEL_o253, LVar0, -1, 0, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o253, LVar0, -1, 0, 0) + Return + End }; EvtScript N(EVS_SetWallRot_MiddleHouse) = { - EVT_CALL(RotateGroup, MODEL_f_ue, LVar0, 0, 0, -1) - EVT_CALL(RotateGroup, MODEL_f_sita, LVar0, 0, 0, 1) - EVT_IF_GT(LVar0, 89) - EVT_CALL(SetGroupVisibility, MODEL_f_sita, MODEL_GROUP_HIDDEN) - EVT_END_IF - EVT_IF_LT(LVar0, 89) - EVT_CALL(SetGroupVisibility, MODEL_f_sita, MODEL_GROUP_VISIBLE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(RotateGroup, MODEL_f_ue, LVar0, 0, 0, -1) + Call(RotateGroup, MODEL_f_sita, LVar0, 0, 0, 1) + IfGt(LVar0, 89) + Call(SetGroupVisibility, MODEL_f_sita, MODEL_GROUP_HIDDEN) + EndIf + IfLt(LVar0, 89) + Call(SetGroupVisibility, MODEL_f_sita, MODEL_GROUP_VISIBLE) + EndIf + Return + End }; EvtScript N(EVS_RoomListener_MiddleHouse) = { - EVT_CALL(UseRoomDoorSounds, DOOR_SOUNDS_DOOR) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_SET(AF_SAM_Snowing, FALSE) - EVT_CALL(SetGroupVisibility, MODEL_f_naiso, MODEL_GROUP_VISIBLE) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_DONE) + Call(UseRoomDoorSounds, DOOR_SOUNDS_DOOR) + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Set(AF_SAM_Snowing, FALSE) + Call(SetGroupVisibility, MODEL_f_naiso, MODEL_GROUP_VISIBLE) + CaseEq(ROOM_UPDATE_ENTER_DONE) // do nothing - EVT_CASE_EQ(ROOM_UPDATE_EXIT_BEGIN) + CaseEq(ROOM_UPDATE_EXIT_BEGIN) // do nothing - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_SET(AF_SAM_Snowing, TRUE) - EVT_CALL(SetGroupVisibility, MODEL_f_naiso, MODEL_GROUP_HIDDEN) - EVT_END_SWITCH - EVT_RETURN - EVT_END + CaseEq(ROOM_UPDATE_EXIT_END) + Set(AF_SAM_Snowing, TRUE) + Call(SetGroupVisibility, MODEL_f_naiso, MODEL_GROUP_HIDDEN) + EndSwitch + Return + End }; EvtScript N(EVS_SetDoorRot_UpperRightHouse) = { - EVT_CALL(RotateModel, MODEL_o336, LVar0, 0, -1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o336, LVar0, 0, -1, 0) + Return + End }; EvtScript N(EVS_SetDoorRot_LowerRightHouse) = { - EVT_CALL(RotateModel, MODEL_o402, LVar0, -1, 0, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o402, LVar0, -1, 0, 0) + Return + End }; EvtScript N(EVS_SetWallRot_RightHouse) = { - EVT_CALL(RotateGroup, MODEL_m_ue, LVar0, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_m_mae, LVar0, 0, 0, -1) - EVT_IF_GT(LVar0, 89) - EVT_CALL(SetGroupVisibility, MODEL_m_mae, MODEL_GROUP_HIDDEN) - EVT_END_IF - EVT_IF_LT(LVar0, 89) - EVT_CALL(SetGroupVisibility, MODEL_m_mae, MODEL_GROUP_VISIBLE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(RotateGroup, MODEL_m_ue, LVar0, 0, 0, 1) + Call(RotateGroup, MODEL_m_mae, LVar0, 0, 0, -1) + IfGt(LVar0, 89) + Call(SetGroupVisibility, MODEL_m_mae, MODEL_GROUP_HIDDEN) + EndIf + IfLt(LVar0, 89) + Call(SetGroupVisibility, MODEL_m_mae, MODEL_GROUP_VISIBLE) + EndIf + Return + End }; EvtScript N(EVS_RoomListener_UpperRightHouse) = { - EVT_CALL(UseRoomDoorSounds, DOOR_SOUNDS_BASIC) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_SET(AF_SAM_Snowing, FALSE) - EVT_CALL(SetGroupVisibility, MODEL_m_naiso, MODEL_GROUP_VISIBLE) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_SET(AF_SAM_Snowing, TRUE) - EVT_CALL(SetGroupVisibility, MODEL_m_naiso, MODEL_GROUP_HIDDEN) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(UseRoomDoorSounds, DOOR_SOUNDS_BASIC) + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Set(AF_SAM_Snowing, FALSE) + Call(SetGroupVisibility, MODEL_m_naiso, MODEL_GROUP_VISIBLE) + CaseEq(ROOM_UPDATE_EXIT_END) + Set(AF_SAM_Snowing, TRUE) + Call(SetGroupVisibility, MODEL_m_naiso, MODEL_GROUP_HIDDEN) + EndSwitch + Return + End }; EvtScript N(EVS_RoomListener_LowerRightHouse) = { - EVT_CALL(UseRoomDoorSounds, DOOR_SOUNDS_DOOR) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_SET(AF_SAM_Snowing, FALSE) - EVT_CALL(SetGroupVisibility, MODEL_m_naiso, MODEL_GROUP_VISIBLE) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_SET(AF_SAM_Snowing, TRUE) - EVT_CALL(SetGroupVisibility, MODEL_m_naiso, MODEL_GROUP_HIDDEN) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(UseRoomDoorSounds, DOOR_SOUNDS_DOOR) + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Set(AF_SAM_Snowing, FALSE) + Call(SetGroupVisibility, MODEL_m_naiso, MODEL_GROUP_VISIBLE) + CaseEq(ROOM_UPDATE_EXIT_END) + Set(AF_SAM_Snowing, TRUE) + Call(SetGroupVisibility, MODEL_m_naiso, MODEL_GROUP_HIDDEN) + EndSwitch + Return + End }; s32 N(InteriorNPCs_MayorBefore)[] = { @@ -223,81 +223,81 @@ s32 N(InteriorNPCs_RightHouse)[] = { }; EvtScript N(EVS_SetupMayorRooms) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_SET(LVar0, EVT_PTR(N(InteriorNPCs_MayorBefore))) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_SET(LVar0, EVT_PTR(N(InteriorNPCs_MayorBefore))) - EVT_CASE_GE(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_SET(LVar0, EVT_PTR(N(InteriorNPCs_MayorAfter))) - EVT_END_SWITCH + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + Set(LVar0, Ref(N(InteriorNPCs_MayorBefore))) + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Set(LVar0, Ref(N(InteriorNPCs_MayorBefore))) + CaseGe(STORY_CH7_MAYOR_MURDER_SOLVED) + Set(LVar0, Ref(N(InteriorNPCs_MayorAfter))) + EndSwitch // mayor's foyer - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_LEFT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_MayorFoyer)), - EVT_PTR(N(EVS_SetWallRot_MayorFoyer)), - EVT_PTR(N(EVS_DropDoor_MayorFoyer)), - EVT_PTR(N(EVS_RoomListener_MayorFoyer)), + Ref(N(EVS_SetDoorRot_MayorFoyer)), + Ref(N(EVS_SetWallRot_MayorFoyer)), + Ref(N(EVS_DropDoor_MayorFoyer)), + Ref(N(EVS_RoomListener_MayorFoyer)), COLLIDER_tts, COLLIDER_o352, MODEL_son, LVar0) // mayor's office - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_LEFT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_MayorOffice)), - EVT_PTR(N(EVS_SetWallRot_MayorOffice)), + Ref(N(EVS_SetDoorRot_MayorOffice)), + Ref(N(EVS_SetWallRot_MayorOffice)), NULL, - EVT_PTR(N(EVS_RoomListener_MayorOffice)), + Ref(N(EVS_RoomListener_MayorOffice)), COLLIDER_ttsn, COLLIDER_o353, MODEL_o430, NULL) - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_SetupRooms) = { - EVT_CALL(SetGroupVisibility, MODEL_s_naisou, MODEL_GROUP_HIDDEN) - EVT_IF_NE(GB_StoryProgress, STORY_CH7_SPOKE_WITH_HERRINGWAY) - EVT_EXEC_WAIT(N(EVS_SetupMayorRooms)) - EVT_END_IF + Call(SetGroupVisibility, MODEL_s_naisou, MODEL_GROUP_HIDDEN) + IfNe(GB_StoryProgress, STORY_CH7_SPOKE_WITH_HERRINGWAY) + ExecWait(N(EVS_SetupMayorRooms)) + EndIf // upper middle house - EVT_CALL(SetGroupVisibility, MODEL_f_naiso, MODEL_GROUP_HIDDEN) - EVT_CALL(CreateMapRoom, + Call(SetGroupVisibility, MODEL_f_naiso, MODEL_GROUP_HIDDEN) + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_RIGHT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_MiddleHouse)), - EVT_PTR(N(EVS_SetWallRot_MiddleHouse)), + Ref(N(EVS_SetDoorRot_MiddleHouse)), + Ref(N(EVS_SetWallRot_MiddleHouse)), NULL, - EVT_PTR(N(EVS_RoomListener_MiddleHouse)), + Ref(N(EVS_RoomListener_MiddleHouse)), COLLIDER_ttf2, COLLIDER_o354, MODEL_f2, - EVT_PTR(N(InteriorNPCs_MiddleHouse))) + Ref(N(InteriorNPCs_MiddleHouse))) // lower right house - EVT_CALL(SetGroupVisibility, MODEL_m_naiso, MODEL_GROUP_HIDDEN) - EVT_CALL(CreateMapRoom, + Call(SetGroupVisibility, MODEL_m_naiso, MODEL_GROUP_HIDDEN) + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_1, ROOM_DOOR_LEFT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_UpperRightHouse)), - EVT_PTR(N(EVS_SetWallRot_RightHouse)), + Ref(N(EVS_SetDoorRot_UpperRightHouse)), + Ref(N(EVS_SetWallRot_RightHouse)), NULL, - EVT_PTR(N(EVS_RoomListener_UpperRightHouse)), + Ref(N(EVS_RoomListener_UpperRightHouse)), COLLIDER_ttm, COLLIDER_o355, MODEL_min, - EVT_PTR(N(InteriorNPCs_RightHouse))) + Ref(N(InteriorNPCs_RightHouse))) // upper right house - EVT_CALL(SetGroupVisibility, MODEL_m_naiso, MODEL_GROUP_HIDDEN) - EVT_CALL(CreateMapRoom, + Call(SetGroupVisibility, MODEL_m_naiso, MODEL_GROUP_HIDDEN) + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_RIGHT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_LowerRightHouse)), - EVT_PTR(N(EVS_SetWallRot_RightHouse)), + Ref(N(EVS_SetDoorRot_LowerRightHouse)), + Ref(N(EVS_SetWallRot_RightHouse)), NULL, - EVT_PTR(N(EVS_RoomListener_LowerRightHouse)), + Ref(N(EVS_RoomListener_LowerRightHouse)), COLLIDER_o376, COLLIDER_o390, MODEL_min, - EVT_PTR(N(InteriorNPCs_RightHouse))) - EVT_RETURN - EVT_END + Ref(N(InteriorNPCs_RightHouse))) + Return + End }; diff --git a/src/world/area_sam/sam_01/sam_01_4_npc.c b/src/world/area_sam/sam_01/sam_01_4_npc.c index ebb8236cb4e..2a310dd14f7 100644 --- a/src/world/area_sam/sam_01/sam_01_4_npc.c +++ b/src/world/area_sam/sam_01/sam_01_4_npc.c @@ -19,611 +19,611 @@ s32 N(MayorLetterList)[] = { }; EvtScript N(EVS_LetterPrompt_Mayor) = { - EVT_CALL(N(LetterDelivery_Init), + Call(N(LetterDelivery_Init), NPC_MayorPenguin, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, ITEM_LETTER_TO_MAYOR_PENGUIN, ITEM_NONE, MSG_CH7_0041, MSG_CH7_0042, MSG_CH7_0043, MSG_CH7_0044, - EVT_PTR(N(MayorLetterList))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) - EVT_RETURN - EVT_END + Ref(N(MayorLetterList))) + ExecWait(N(EVS_DoLetterDelivery)) + Return + End }; EvtScript N(EVS_LetterReward_Mayor) = { - EVT_IF_EQ(LVarC, DELIVERY_ACCEPTED) + IfEq(LVarC, DELIVERY_ACCEPTED) EVT_GIVE_STAR_PIECE() - EVT_END_IF - EVT_RETURN - EVT_END + EndIf + Return + End }; EvtScript N(EVS_Mayor_CarryBucket) = { - EVT_LABEL(0) - EVT_CALL(GetNpcPos, NPC_MayorPenguin, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -5) - EVT_ADD(LVar1, 15) - EVT_CALL(GetNpcYaw, NPC_MayorPenguin, LVar3) - EVT_IF_GE(LVar3, 90) - EVT_IF_LE(LVar3, 270) - EVT_ADD(LVar2, 10) - EVT_ELSE - EVT_ADD(LVar2, -10) - EVT_END_IF - EVT_ELSE - EVT_ADD(LVar2, -10) - EVT_END_IF - EVT_CALL(SetItemPos, MV_BucketItemID, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetNpcPos, NPC_MayorPenguin, LVar0, LVar1, LVar2) + Add(LVar0, -5) + Add(LVar1, 15) + Call(GetNpcYaw, NPC_MayorPenguin, LVar3) + IfGe(LVar3, 90) + IfLe(LVar3, 270) + Add(LVar2, 10) + Else + Add(LVar2, -10) + EndIf + Else + Add(LVar2, -10) + EndIf + Call(SetItemPos, MV_BucketItemID, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_Mayor_HandOverBucket) = { - EVT_CALL(GetNpcYaw, NPC_MayorPenguin, LVar3) - EVT_IF_GE(LVar3, 90) - EVT_IF_LE(LVar3, 270) - EVT_ADD(LVar2, 10) - EVT_SET(LVar4, 10) - EVT_ELSE - EVT_ADD(LVar2, -10) - EVT_SET(LVar4, -10) - EVT_END_IF - EVT_ELSE - EVT_SUB(LVar2, 10) - EVT_SET(LVar4, 10) - EVT_END_IF - EVT_THREAD - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_MayorPenguin, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -5) - EVT_ADD(LVar1, 15) - EVT_ADD(LVar2, LVar4) - EVT_CALL(SetItemPos, MV_BucketItemID, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetItemPos, MV_BucketItemID, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_CALL(NpcMoveTo, NPC_MayorPenguin, LVar0, LVar2, 10 * DT) - EVT_RETURN - EVT_END + Call(GetNpcYaw, NPC_MayorPenguin, LVar3) + IfGe(LVar3, 90) + IfLe(LVar3, 270) + Add(LVar2, 10) + Set(LVar4, 10) + Else + Add(LVar2, -10) + Set(LVar4, -10) + EndIf + Else + Sub(LVar2, 10) + Set(LVar4, 10) + EndIf + Thread + Loop(10) + Call(GetNpcPos, NPC_MayorPenguin, LVar0, LVar1, LVar2) + Add(LVar0, -5) + Add(LVar1, 15) + Add(LVar2, LVar4) + Call(SetItemPos, MV_BucketItemID, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(SetItemPos, MV_BucketItemID, NPC_DISPOSE_LOCATION) + EndThread + Call(NpcMoveTo, NPC_MayorPenguin, LVar0, LVar2, 10 * DT) + Return + End }; EvtScript N(EVS_NpcInteract_MayorPenguin) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_CALL(FadeOutMusic, 0, 500) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH7_0002, 160, 40) - EVT_EXEC_WAIT(N(EVS_Scene_MysteryBegins)) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH7_0002, 160, 40) - EVT_CASE_LT(STORY_CH7_GOT_SNOWMAN_SCARF) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, MSG_CH7_0039) - EVT_CASE_LT(STORY_CH7_GOT_SNOWMAN_BUCKET) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_IF_GE(LVar2, LVar5) - EVT_SET(MV_PlayerLeftOfMayor, 0) - EVT_ELSE - EVT_SET(MV_PlayerLeftOfMayor, 1) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, MSG_CH7_003A) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MayorPenguin_Walk) - EVT_CALL(NpcMoveTo, NPC_SELF, -338, -247, 20) - EVT_CALL(PlaySoundAtCollider, COLLIDER_yana, SOUND_WOODEN_DOOR_OPEN, 0) - EVT_CALL(MakeLerp, 0, 70, 30, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o411, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o412, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_WAIT(20 * DT) - EVT_CALL(MakeLerp, 70, 0, 30, EASING_LINEAR) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o411, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o412, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, COLLIDER_yana, SOUND_WOODEN_DOOR_CLOSE, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MayorPenguin_Carry) - EVT_CALL(InterpNpcYaw, NPC_SELF, 180, 0) - EVT_EXEC_GET_TID(N(EVS_Mayor_CarryBucket), LVarA) - EVT_WAIT(10 * DT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_EQ(MV_PlayerLeftOfMayor, 0) - EVT_ADD(LVar2, -40) - EVT_ELSE - EVT_ADD(LVar2, 40) - EVT_END_IF - EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, LVar2, 20) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, MSG_CH7_003B) - EVT_KILL_THREAD(LVarA) - EVT_EXEC_WAIT(N(EVS_Mayor_HandOverBucket)) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MayorPenguin_Idle) + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + Call(FadeOutMusic, 0, 500) + Call(ShowMessageAtScreenPos, MSG_CH7_0002, 160, 40) + ExecWait(N(EVS_Scene_MysteryBegins)) + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(ShowMessageAtScreenPos, MSG_CH7_0002, 160, 40) + CaseLt(STORY_CH7_GOT_SNOWMAN_SCARF) + Call(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, MSG_CH7_0039) + CaseLt(STORY_CH7_GOT_SNOWMAN_BUCKET) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + IfGe(LVar2, LVar5) + Set(MV_PlayerLeftOfMayor, 0) + Else + Set(MV_PlayerLeftOfMayor, 1) + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, MSG_CH7_003A) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_MayorPenguin_Walk) + Call(NpcMoveTo, NPC_SELF, -338, -247, 20) + Call(PlaySoundAtCollider, COLLIDER_yana, SOUND_WOODEN_DOOR_OPEN, 0) + Call(MakeLerp, 0, 70, 30, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(RotateModel, MODEL_o411, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_o412, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Wait(20 * DT) + Call(MakeLerp, 70, 0, 30, EASING_LINEAR) + Label(20) + Call(UpdateLerp) + Call(RotateModel, MODEL_o411, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_o412, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Call(PlaySoundAtCollider, COLLIDER_yana, SOUND_WOODEN_DOOR_CLOSE, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_MayorPenguin_Carry) + Call(InterpNpcYaw, NPC_SELF, 180, 0) + ExecGetTID(N(EVS_Mayor_CarryBucket), LVarA) + Wait(10 * DT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfEq(MV_PlayerLeftOfMayor, 0) + Add(LVar2, -40) + Else + Add(LVar2, 40) + EndIf + Call(NpcMoveTo, NPC_SELF, LVar0, LVar2, 20) + Call(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, MSG_CH7_003B) + KillThread(LVarA) + ExecWait(N(EVS_Mayor_HandOverBucket)) + Call(SetNpcAnimation, NPC_SELF, ANIM_MayorPenguin_Idle) EVT_GIVE_KEY_REWARD(ITEM_SNOWMAN_BUCKET) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, MSG_CH7_003C) - EVT_CALL(GetNpcPos, NPC_MayorPenguin, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-8.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, MSG_CH7_003D) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_SET(GB_StoryProgress, STORY_CH7_GOT_SNOWMAN_BUCKET) - EVT_CASE_LT(STORY_CH7_UNLOCKED_SHIVER_MOUNTAIN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, MSG_CH7_003E) - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, MSG_CH7_003F) - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, MSG_CH7_0040) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_LetterPrompt_Mayor)) - EVT_EXEC_WAIT(N(EVS_LetterReward_Mayor)) - EVT_IF_NE(LVarC, DELIVERY_NOT_POSSIBLE) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, MSG_CH7_003C) + Call(GetNpcPos, NPC_MayorPenguin, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(250.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-8.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, MSG_CH7_003D) + Call(ResetCam, CAM_DEFAULT, Float(3.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Set(GB_StoryProgress, STORY_CH7_GOT_SNOWMAN_BUCKET) + CaseLt(STORY_CH7_UNLOCKED_SHIVER_MOUNTAIN) + Call(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, MSG_CH7_003E) + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, MSG_CH7_003F) + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, MSG_CH7_0040) + EndSwitch + ExecWait(N(EVS_LetterPrompt_Mayor)) + ExecWait(N(EVS_LetterReward_Mayor)) + IfNe(LVarC, DELIVERY_NOT_POSSIBLE) + Return + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_MayorPenguinWife) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_IF_EQ(GF_SAM01_Met_MayorsWife, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguinWife_Talk, ANIM_MayorPenguinWife_Idle, 0, MSG_CH7_0000) - EVT_SET(GF_SAM01_Met_MayorsWife, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguinWife_Talk, ANIM_MayorPenguinWife_Idle, 0, MSG_CH7_0001) - EVT_END_IF - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguinWife_PointTalk, ANIM_MayorPenguinWife_Idle, 0, MSG_CH7_001C) - EVT_CASE_LT(STORY_CH7_GOT_SNOWMAN_SCARF) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguinWife_Laugh, ANIM_MayorPenguinWife_Idle, 0, MSG_CH7_0035) - EVT_CASE_LT(STORY_CH7_GOT_SNOWMAN_BUCKET) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguinWife_Laugh, ANIM_MayorPenguinWife_Idle, 0, MSG_CH7_0036) - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguinWife_Laugh, ANIM_MayorPenguinWife_Idle, 0, MSG_CH7_0037) - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguinWife_Laugh, ANIM_MayorPenguinWife_Idle, 0, MSG_CH7_0038) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + IfEq(GF_SAM01_Met_MayorsWife, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguinWife_Talk, ANIM_MayorPenguinWife_Idle, 0, MSG_CH7_0000) + Set(GF_SAM01_Met_MayorsWife, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguinWife_Talk, ANIM_MayorPenguinWife_Idle, 0, MSG_CH7_0001) + EndIf + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguinWife_PointTalk, ANIM_MayorPenguinWife_Idle, 0, MSG_CH7_001C) + CaseLt(STORY_CH7_GOT_SNOWMAN_SCARF) + Call(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguinWife_Laugh, ANIM_MayorPenguinWife_Idle, 0, MSG_CH7_0035) + CaseLt(STORY_CH7_GOT_SNOWMAN_BUCKET) + Call(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguinWife_Laugh, ANIM_MayorPenguinWife_Idle, 0, MSG_CH7_0036) + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguinWife_Laugh, ANIM_MayorPenguinWife_Idle, 0, MSG_CH7_0037) + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_MayorPenguinWife_Laugh, ANIM_MayorPenguinWife_Idle, 0, MSG_CH7_0038) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_PenguinPatrol) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_SPOKE_WITH_HERRINGWAY) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_001B) - EVT_CASE_GE(STORY_CH7_SPOKE_WITH_HERRINGWAY) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_001D) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_SPOKE_WITH_HERRINGWAY) + Call(SpeakToPlayer, NPC_SELF, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_001B) + CaseGe(STORY_CH7_SPOKE_WITH_HERRINGWAY) + Call(SpeakToPlayer, NPC_SELF, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_001D) + EndSwitch + Return + End }; EvtScript N(EVS_NpcIdle_PenguinPatrol) = { - EVT_LABEL(0) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_CH7_HERRINGWAY_AT_MAYORS_HOUSE) - EVT_IF_EQ(AF_SAM_03, TRUE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar2, -130) - EVT_EXEC_WAIT(N(EVS_Scene_MysterySolved)) - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Switch(GB_StoryProgress) + CaseEq(STORY_CH7_HERRINGWAY_AT_MAYORS_HOUSE) + IfEq(AF_SAM_03, TRUE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar2, -130) + ExecWait(N(EVS_Scene_MysterySolved)) + EndIf + EndIf + EndSwitch + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_NpcInteract_Herringway) = { - EVT_IF_EQ(AF_SAM_04, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Herringway_Talk, ANIM_Herringway_Idle, 0, MSG_CH7_00D3) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Herringway_Talk, ANIM_Herringway_Idle, 0, MSG_CH7_00D4) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(AF_SAM_04, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Herringway_Talk, ANIM_Herringway_Idle, 0, MSG_CH7_00D3) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Herringway_Talk, ANIM_Herringway_Idle, 0, MSG_CH7_00D4) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Penguin_01) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_SWITCH(MV_DialogueState_Penguin1) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0045) - EVT_SET(MV_DialogueState_Penguin1, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0046) - EVT_SET(MV_DialogueState_Penguin1, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_SWITCH(MV_DialogueState_Penguin1) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0047) - EVT_SET(MV_DialogueState_Penguin1, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0048) - EVT_SET(MV_DialogueState_Penguin1, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_SWITCH(MV_DialogueState_Penguin1) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0049) - EVT_SET(MV_DialogueState_Penguin1, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_004A) - EVT_SET(MV_DialogueState_Penguin1, 0) - EVT_END_SWITCH - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_004B) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + Switch(MV_DialogueState_Penguin1) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0045) + Set(MV_DialogueState_Penguin1, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0046) + Set(MV_DialogueState_Penguin1, 0) + EndSwitch + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Switch(MV_DialogueState_Penguin1) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0047) + Set(MV_DialogueState_Penguin1, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0048) + Set(MV_DialogueState_Penguin1, 0) + EndSwitch + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Switch(MV_DialogueState_Penguin1) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0049) + Set(MV_DialogueState_Penguin1, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_004A) + Set(MV_DialogueState_Penguin1, 0) + EndSwitch + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_004B) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Penguin_02) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_SWITCH(MV_DialogueState_Penguin2) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_004C) - EVT_SET(MV_DialogueState_Penguin2, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_004D) - EVT_SET(MV_DialogueState_Penguin2, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_SWITCH(MV_DialogueState_Penguin2) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_004E) - EVT_SET(MV_DialogueState_Penguin2, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_004F) - EVT_SET(MV_DialogueState_Penguin2, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_SWITCH(MV_DialogueState_Penguin2) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0050) - EVT_SET(MV_DialogueState_Penguin2, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0051) - EVT_SET(MV_DialogueState_Penguin2, 0) - EVT_END_SWITCH - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0052) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + Switch(MV_DialogueState_Penguin2) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_004C) + Set(MV_DialogueState_Penguin2, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_004D) + Set(MV_DialogueState_Penguin2, 0) + EndSwitch + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Switch(MV_DialogueState_Penguin2) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_004E) + Set(MV_DialogueState_Penguin2, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_004F) + Set(MV_DialogueState_Penguin2, 0) + EndSwitch + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Switch(MV_DialogueState_Penguin2) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0050) + Set(MV_DialogueState_Penguin2, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0051) + Set(MV_DialogueState_Penguin2, 0) + EndSwitch + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0052) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Penguin_03) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_SWITCH(MV_DialogueState_Penguin3) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0053) - EVT_SET(MV_DialogueState_Penguin3, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0054) - EVT_SET(MV_DialogueState_Penguin3, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_SWITCH(MV_DialogueState_Penguin3) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0055) - EVT_SET(MV_DialogueState_Penguin3, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0056) - EVT_SET(MV_DialogueState_Penguin3, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_SWITCH(MV_DialogueState_Penguin3) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0057) - EVT_SET(MV_DialogueState_Penguin3, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0058) - EVT_SET(MV_DialogueState_Penguin3, 0) - EVT_END_SWITCH - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0059) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + Switch(MV_DialogueState_Penguin3) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0053) + Set(MV_DialogueState_Penguin3, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0054) + Set(MV_DialogueState_Penguin3, 0) + EndSwitch + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Switch(MV_DialogueState_Penguin3) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0055) + Set(MV_DialogueState_Penguin3, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0056) + Set(MV_DialogueState_Penguin3, 0) + EndSwitch + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Switch(MV_DialogueState_Penguin3) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0057) + Set(MV_DialogueState_Penguin3, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0058) + Set(MV_DialogueState_Penguin3, 0) + EndSwitch + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0059) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Penguin_04) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_SWITCH(MV_DialogueState_Penguin4) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_005A) - EVT_SET(MV_DialogueState_Penguin4, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_005B) - EVT_SET(MV_DialogueState_Penguin4, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_SWITCH(MV_DialogueState_Penguin4) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_005C) - EVT_SET(MV_DialogueState_Penguin4, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_005D) - EVT_SET(MV_DialogueState_Penguin4, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_SWITCH(MV_DialogueState_Penguin4) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_005E) - EVT_SET(MV_DialogueState_Penguin4, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_005F) - EVT_SET(MV_DialogueState_Penguin4, 0) - EVT_END_SWITCH - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0060) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + Switch(MV_DialogueState_Penguin4) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_005A) + Set(MV_DialogueState_Penguin4, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_005B) + Set(MV_DialogueState_Penguin4, 0) + EndSwitch + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Switch(MV_DialogueState_Penguin4) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_005C) + Set(MV_DialogueState_Penguin4, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_005D) + Set(MV_DialogueState_Penguin4, 0) + EndSwitch + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Switch(MV_DialogueState_Penguin4) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_005E) + Set(MV_DialogueState_Penguin4, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_005F) + Set(MV_DialogueState_Penguin4, 0) + EndSwitch + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0060) + EndSwitch + Return + End }; EvtScript N(EVS_PenguinCrowd_Leave) = { - EVT_CALL(SetNpcFlagBits, NPC_Penguin_05, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Penguin_06, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Penguin_07, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Penguin_08, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(BindNpcInteract, NPC_Penguin_05, 0) - EVT_CALL(BindNpcInteract, NPC_Penguin_06, 0) - EVT_CALL(BindNpcInteract, NPC_Penguin_07, 0) - EVT_CALL(BindNpcInteract, NPC_Penguin_08, 0) - EVT_THREAD - EVT_CALL(SetNpcSpeed, NPC_Penguin_05, EVT_FLOAT(3.0)) - EVT_CALL(SetNpcAnimation, NPC_Penguin_05, ANIM_Penguin_Walk) - EVT_CALL(NpcMoveTo, NPC_Penguin_05, 600, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_Penguin_05, ANIM_Penguin_Idle) - EVT_CALL(SetNpcPos, NPC_Penguin_05, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(SetNpcSpeed, NPC_Penguin_06, EVT_FLOAT(3.0)) - EVT_CALL(SetNpcAnimation, NPC_Penguin_06, ANIM_Penguin_Walk) - EVT_CALL(NpcMoveTo, NPC_Penguin_06, 600, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_Penguin_06, ANIM_Penguin_Idle) - EVT_CALL(SetNpcPos, NPC_Penguin_06, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(SetNpcSpeed, NPC_Penguin_07, EVT_FLOAT(3.0)) - EVT_CALL(SetNpcAnimation, NPC_Penguin_07, ANIM_Penguin_Walk) - EVT_CALL(NpcMoveTo, NPC_Penguin_07, 600, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_Penguin_07, ANIM_Penguin_Idle) - EVT_CALL(SetNpcPos, NPC_Penguin_07, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(SetNpcSpeed, NPC_Penguin_08, EVT_FLOAT(3.0)) - EVT_CALL(SetNpcAnimation, NPC_Penguin_08, ANIM_Penguin_Walk) - EVT_CALL(NpcMoveTo, NPC_Penguin_08, 600, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_Penguin_08, ANIM_Penguin_Idle) - EVT_CALL(SetNpcPos, NPC_Penguin_08, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_Penguin_05, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Penguin_06, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Penguin_07, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Penguin_08, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(BindNpcInteract, NPC_Penguin_05, 0) + Call(BindNpcInteract, NPC_Penguin_06, 0) + Call(BindNpcInteract, NPC_Penguin_07, 0) + Call(BindNpcInteract, NPC_Penguin_08, 0) + Thread + Call(SetNpcSpeed, NPC_Penguin_05, Float(3.0)) + Call(SetNpcAnimation, NPC_Penguin_05, ANIM_Penguin_Walk) + Call(NpcMoveTo, NPC_Penguin_05, 600, 0, 0) + Call(SetNpcAnimation, NPC_Penguin_05, ANIM_Penguin_Idle) + Call(SetNpcPos, NPC_Penguin_05, NPC_DISPOSE_LOCATION) + EndThread + Wait(10) + Thread + Call(SetNpcSpeed, NPC_Penguin_06, Float(3.0)) + Call(SetNpcAnimation, NPC_Penguin_06, ANIM_Penguin_Walk) + Call(NpcMoveTo, NPC_Penguin_06, 600, 0, 0) + Call(SetNpcAnimation, NPC_Penguin_06, ANIM_Penguin_Idle) + Call(SetNpcPos, NPC_Penguin_06, NPC_DISPOSE_LOCATION) + EndThread + Wait(10) + Thread + Call(SetNpcSpeed, NPC_Penguin_07, Float(3.0)) + Call(SetNpcAnimation, NPC_Penguin_07, ANIM_Penguin_Walk) + Call(NpcMoveTo, NPC_Penguin_07, 600, 0, 0) + Call(SetNpcAnimation, NPC_Penguin_07, ANIM_Penguin_Idle) + Call(SetNpcPos, NPC_Penguin_07, NPC_DISPOSE_LOCATION) + EndThread + Wait(10) + Thread + Call(SetNpcSpeed, NPC_Penguin_08, Float(3.0)) + Call(SetNpcAnimation, NPC_Penguin_08, ANIM_Penguin_Walk) + Call(NpcMoveTo, NPC_Penguin_08, 600, 0, 0) + Call(SetNpcAnimation, NPC_Penguin_08, ANIM_Penguin_Idle) + Call(SetNpcPos, NPC_Penguin_08, NPC_DISPOSE_LOCATION) + EndThread + Return + End }; EvtScript N(EVS_NpcInteract_PenguinCrowd) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(SpeakToPlayer, NPC_Penguin_05, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 5, MSG_CH7_0061) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Penguin_06, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 5, MSG_CH7_0062) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Penguin_07, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 5, MSG_CH7_0063) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Penguin_08, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 5, MSG_CH7_0064) - EVT_CASE_EQ(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(SpeakToPlayer, NPC_Penguin_05, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 5, MSG_CH7_0065) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Penguin_06, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 5, MSG_CH7_0066) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Penguin_07, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 5, MSG_CH7_0067) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Penguin_08, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 5, MSG_CH7_0068) - EVT_EXEC(N(EVS_PenguinCrowd_Leave)) - EVT_WAIT(1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(SpeakToPlayer, NPC_Penguin_05, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 5, MSG_CH7_0061) + Wait(10) + Call(SpeakToPlayer, NPC_Penguin_06, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 5, MSG_CH7_0062) + Wait(10) + Call(SpeakToPlayer, NPC_Penguin_07, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 5, MSG_CH7_0063) + Wait(10) + Call(SpeakToPlayer, NPC_Penguin_08, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 5, MSG_CH7_0064) + CaseEq(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(SpeakToPlayer, NPC_Penguin_05, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 5, MSG_CH7_0065) + Wait(10) + Call(SpeakToPlayer, NPC_Penguin_06, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 5, MSG_CH7_0066) + Wait(10) + Call(SpeakToPlayer, NPC_Penguin_07, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 5, MSG_CH7_0067) + Wait(10) + Call(SpeakToPlayer, NPC_Penguin_08, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 5, MSG_CH7_0068) + Exec(N(EVS_PenguinCrowd_Leave)) + Wait(1) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Penguin_06) = { - EVT_EXEC_WAIT(N(EVS_NpcInteract_PenguinCrowd)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_NpcInteract_PenguinCrowd)) + Return + End }; EvtScript N(EVS_NpcInteract_Penguin_07) = { - EVT_EXEC_WAIT(N(EVS_NpcInteract_PenguinCrowd)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_NpcInteract_PenguinCrowd)) + Return + End }; EvtScript N(EVS_NpcInteract_Penguin_08) = { - EVT_EXEC_WAIT(N(EVS_NpcInteract_PenguinCrowd)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_NpcInteract_PenguinCrowd)) + Return + End }; EvtScript N(EVS_Inspect_Present) = { - EVT_CALL(ShowMessageAtScreenPos, MSG_CH7_0004, 160, 40) - EVT_RETURN - EVT_END + Call(ShowMessageAtScreenPos, MSG_CH7_0004, 160, 40) + Return + End }; EvtScript N(EVS_NpcInit_MayorPenguin) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_MayorPenguin))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(SetNpcPos, NPC_SELF, -270, 0, -205) - EVT_CALL(InterpNpcYaw, NPC_SELF, 180, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MayorPenguin_Dead) - EVT_CASE_GE(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(SetNpcPos, NPC_SELF, -300, 0, -160) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_MayorPenguin))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(SetNpcPos, NPC_SELF, -270, 0, -205) + Call(InterpNpcYaw, NPC_SELF, 180, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_MayorPenguin_Dead) + CaseGe(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(SetNpcPos, NPC_SELF, -300, 0, -160) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_MayorDummy) = { - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(InterpNpcYaw, NPC_SELF, 183, 0) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(InterpNpcYaw, NPC_SELF, 183, 0) + Return + End }; EvtScript N(EVS_NpcInit_MayorPenguinWife) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_MayorPenguinWife))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_CALL(SetNpcPos, NPC_SELF, -310, 0, 94) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(SetNpcPos, NPC_SELF, -297, 0, -69) - EVT_CASE_GE(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(SetNpcPos, NPC_SELF, -297, 0, -69) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_MayorPenguinWife))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + Call(SetNpcPos, NPC_SELF, -310, 0, 94) + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(SetNpcPos, NPC_SELF, -297, 0, -69) + CaseGe(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(SetNpcPos, NPC_SELF, -297, 0, -69) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_PenguinPatrol) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_PenguinPatrol))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_PenguinPatrol))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(SetNpcPos, NPC_SELF, -255, 0, -178) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_PenguinPatrol))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_PenguinPatrol))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(SetNpcPos, NPC_SELF, -255, 0, -178) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Herringway) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_SPOKE_WITH_HERRINGWAY) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INACTIVE, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CASE_LT(STORY_CH7_HERRINGWAY_AT_MAYORS_HOUSE) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(BindNpcInteract, NPC_Herringway, EVT_PTR(N(EVS_NpcInteract_Herringway))) - EVT_CALL(SetNpcPos, NPC_SELF, -228, 0, 91) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_CASE_GE(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INACTIVE, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_SPOKE_WITH_HERRINGWAY) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INACTIVE, TRUE) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + CaseLt(STORY_CH7_HERRINGWAY_AT_MAYORS_HOUSE) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(BindNpcInteract, NPC_Herringway, Ref(N(EVS_NpcInteract_Herringway))) + Call(SetNpcPos, NPC_SELF, -228, 0, 91) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + CaseGe(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INACTIVE, TRUE) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Penguin_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Penguin_01))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Penguin_01))) + Return + End }; EvtScript N(EVS_NpcInit_Penguin_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Penguin_02))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Penguin_02))) + Return + End }; EvtScript N(EVS_NpcInit_Penguin_03) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Penguin_03))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Penguin_03))) + Return + End }; EvtScript N(EVS_NpcInit_Penguin_04) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Penguin_04))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Penguin_04))) + Return + End }; EvtScript N(EVS_NpcInit_Penguin_05) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_PenguinCrowd))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(SetNpcPos, NPC_SELF, -150, 0, 0) - EVT_CASE_GE(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_PenguinCrowd))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(SetNpcPos, NPC_SELF, -150, 0, 0) + CaseGe(STORY_CH7_MAYOR_MURDER_SOLVED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Penguin_06) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Penguin_06))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(SetNpcPos, NPC_SELF, -90, 0, 0) - EVT_CASE_GE(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Penguin_06))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(SetNpcPos, NPC_SELF, -90, 0, 0) + CaseGe(STORY_CH7_MAYOR_MURDER_SOLVED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Penguin_07) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Penguin_07))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(SetNpcPos, NPC_SELF, -120, 0, -30) - EVT_CASE_GE(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Penguin_07))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(SetNpcPos, NPC_SELF, -120, 0, -30) + CaseGe(STORY_CH7_MAYOR_MURDER_SOLVED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Penguin_08) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Penguin_08))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(SetNpcPos, NPC_SELF, -120, 0, 30) - EVT_CASE_GE(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Penguin_08))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(SetNpcPos, NPC_SELF, -120, 0, 30) + CaseGe(STORY_CH7_MAYOR_MURDER_SOLVED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Penguin_09) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(SetNpcFlagBits, NPC_Penguin_09, NPC_FLAG_INVISIBLE | NPC_FLAG_10000000, TRUE) - EVT_CALL(EnableNpcShadow, NPC_Penguin_09, FALSE) - EVT_CALL(SetNpcPos, NPC_Penguin_09, -325, 0, -240) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH7_MAYOR_MURDER_SOLVED) + Call(SetNpcFlagBits, NPC_Penguin_09, NPC_FLAG_INVISIBLE | NPC_FLAG_10000000, TRUE) + Call(EnableNpcShadow, NPC_Penguin_09, FALSE) + Call(SetNpcPos, NPC_Penguin_09, -325, 0, -240) + EndIf + Return + End }; NpcData N(NpcData_MayorPenguin)[] = { diff --git a/src/world/area_sam/sam_01/sam_01_5_scenes.c b/src/world/area_sam/sam_01/sam_01_5_scenes.c index 0a549373250..8a7c03005fc 100644 --- a/src/world/area_sam/sam_01/sam_01_5_scenes.c +++ b/src/world/area_sam/sam_01/sam_01_5_scenes.c @@ -5,729 +5,729 @@ #include "world/common/todo/GetLeftRightPoints.inc.c" EvtScript N(EVS_MayorCarryGift) = { - EVT_CALL(GetNpcPos, NPC_MayorPenguin, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Penguin_09, LVar3, LVar4, LVar5) - EVT_SUB(LVar3, LVar0) - EVT_SUB(LVar4, LVar1) - EVT_SUB(LVar5, LVar2) - EVT_ADD(LVar3, 3) - EVT_ADD(LVar5, 5) - EVT_LABEL(0) - EVT_CALL(GetNpcPos, NPC_MayorPenguin, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_ADD(LVar2, LVar5) - EVT_CALL(SetNpcPos, NPC_Penguin_09, LVar0, LVar1, LVar2) - EVT_SET(LVar6, LVar0) - EVT_SUB(LVar6, 10) - EVT_CALL(SetItemPos, MV_PresentItemID, LVar6, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_MayorPenguin, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Penguin_09, LVar3, LVar4, LVar5) + Sub(LVar3, LVar0) + Sub(LVar4, LVar1) + Sub(LVar5, LVar2) + Add(LVar3, 3) + Add(LVar5, 5) + Label(0) + Call(GetNpcPos, NPC_MayorPenguin, LVar0, LVar1, LVar2) + Add(LVar0, LVar3) + Add(LVar1, LVar4) + Add(LVar2, LVar5) + Call(SetNpcPos, NPC_Penguin_09, LVar0, LVar1, LVar2) + Set(LVar6, LVar0) + Sub(LVar6, 10) + Call(SetItemPos, MV_PresentItemID, LVar6, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_HerringwayCarryPresent) = { - EVT_CALL(N(GetItemEntityPosition), MV_PresentItemID, LVarA, LVarB, LVarC) - EVT_LOOP(6) - EVT_CALL(SetItemPos, MV_PresentItemID, LVarA, LVarB, LVarC) - EVT_ADD(LVarC, 10) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_Herringway, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 20) - EVT_CALL(SetItemPos, MV_PresentItemID, LVar0, LVarB, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(N(GetItemEntityPosition), MV_PresentItemID, LVarA, LVarB, LVarC) + Loop(6) + Call(SetItemPos, MV_PresentItemID, LVarA, LVarB, LVarC) + Add(LVarC, 10) + Wait(1) + EndLoop + Loop(0) + Call(GetNpcPos, NPC_Herringway, LVar0, LVar1, LVar2) + Add(LVar2, 20) + Call(SetItemPos, MV_PresentItemID, LVar0, LVarB, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_OpenMayorsOfficeDoor) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_ttsn, SOUND_BASIC_DOOR_OPEN, 0) - EVT_CALL(MakeLerp, 0, 80, 20, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o236, LVar0, 0, -1, 0) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_ttsn, SOUND_BASIC_DOOR_OPEN, 0) + Call(MakeLerp, 0, 80, 20, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o236, LVar0, 0, -1, 0) + IfEq(LVar1, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_CloseMayorsOfficeDoor) = { - EVT_CALL(MakeLerp, 80, 0, 20, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o236, LVar0, 0, -1, 0) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_ttsn, SOUND_BASIC_DOOR_CLOSE, 0) - EVT_RETURN - EVT_END + Call(MakeLerp, 80, 0, 20, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o236, LVar0, 0, -1, 0) + IfEq(LVar1, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(PlaySoundAtCollider, COLLIDER_ttsn, SOUND_BASIC_DOOR_CLOSE, 0) + Return + End }; EvtScript N(EVS_Scene_MysteryBegins) = { - EVT_CALL(InterruptUsePartner) - EVT_CALL(SetNpcFlagBits, NPC_MayorPenguin, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_MayorPenguinWife, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, EVT_FLOAT(-236.1), EVT_FLOAT(0.0), EVT_FLOAT(-45.6)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-300.0), EVT_FLOAT(-53.7)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(20 * DT) - EVT_EXEC_WAIT(N(EVS_OpenMayorsOfficeDoor)) - EVT_THREAD - EVT_WAIT(20 * DT) - EVT_EXEC_WAIT(N(EVS_CloseMayorsOfficeDoor)) - EVT_END_THREAD - EVT_CALL(SetNpcFlagBits, NPC_MayorPenguinWife, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(SetNpcPos, NPC_MayorPenguinWife, -255, 0, 28) - EVT_CALL(SetNpcSpeed, NPC_MayorPenguinWife, EVT_FLOAT(2.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Walk) - EVT_CALL(NpcMoveTo, NPC_MayorPenguinWife, -255, -30, 0) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Idle) - EVT_CALL(SpeakToPlayer, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Talk, ANIM_MayorPenguinWife_Idle, 0, MSG_CH7_0005) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -255, 0, -150) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.4 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetPlayerPos, -284, 0, -165) - EVT_CALL(InterpPlayerYaw, 180, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, -320, 0, -190) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 180, 0) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Walk) - EVT_CALL(NpcMoveTo, NPC_MayorPenguinWife, -255, -40, 0) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_CALL(NpcMoveTo, NPC_MayorPenguinWife, -255, -165, 0) - EVT_CALL(InterpPlayerYaw, 0, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 0, 0) - EVT_CALL(NpcMoveTo, NPC_MayorPenguinWife, -255, -185, 0) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Idle) - EVT_CALL(PlaySoundAtNpc, NPC_MayorPenguinWife, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_MayorPenguinWife, EMOTE_EXCLAMATION, 0, 30, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Walk) - EVT_CALL(SetNpcSpeed, NPC_MayorPenguinWife, EVT_FLOAT(0.5 / DT)) - EVT_CALL(NpcMoveTo, NPC_MayorPenguinWife, -255, -200, 0) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Inspect) - EVT_WAIT(35 * DT) - EVT_THREAD - EVT_CALL(SetMusicTrack, 0, SONG_PENGUIN_WHODUNIT, 0, 8) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Horror) - EVT_SET(MF_ContinueScene, FALSE) - EVT_CALL(SpeakToPlayer, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Horror, ANIM_MayorPenguinWife_Horror, 0, MSG_CH7_0006) - EVT_SET(MF_ContinueScene, TRUE) - EVT_END_THREAD - EVT_CALL(SetMotionBlurParams, 0, 0, 0, 320, 240, 128, 10) - EVT_LOOP(5) - EVT_CALL(GetNpcPos, NPC_MayorPenguinWife, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(210.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(10.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_MayorPenguinWife, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(10.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_LOOP - EVT_CALL(SetMotionBlurParams, 0, 0, 0, 320, 240, 0, 10) - EVT_LABEL(2) - EVT_IF_EQ(MF_ContinueScene, FALSE) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcSpeed, NPC_MayorPenguinWife, EVT_FLOAT(6.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Panic) - EVT_CALL(NpcMoveTo, NPC_MayorPenguinWife, -255, 0, 0) - EVT_CALL(SetNpcPos, NPC_MayorPenguinWife, -255, 0, 60) - EVT_WAIT(30 * DT) - EVT_SET(MF_ContinueScene, FALSE) - EVT_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_WAIT(60 * DT) - EVT_SET(MF_ContinueScene, TRUE) - EVT_END_THREAD - EVT_CALL(ShowMessageAtScreenPos, MSG_CH7_0007, 160, 40) - EVT_LABEL(100) - EVT_IF_EQ(MF_ContinueScene, FALSE) - EVT_WAIT(1) - EVT_GOTO(100) - EVT_END_IF - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(600.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-8.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.6 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(InterpPlayerYaw, 180, 5) - EVT_WAIT(20 * DT) - EVT_CALL(InterpPlayerYaw, 0, 5) - EVT_WAIT(90 * DT) - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(InterpPlayerYaw, 180, 5) - EVT_END_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, EVT_FLOAT(-236.1), EVT_FLOAT(0.0), EVT_FLOAT(-45.6)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-300.0), EVT_FLOAT(-53.7)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetNpcPos, NPC_PARTNER, -306, 0, -116) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToPlayer, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Horror, ANIM_MayorPenguinWife_Horror, 5, MSG_CH7_0008) - EVT_WAIT(20 * DT) - EVT_EXEC_WAIT(N(EVS_OpenMayorsOfficeDoor)) - EVT_THREAD - EVT_WAIT(30 * DT) - EVT_EXEC_WAIT(N(EVS_CloseMayorsOfficeDoor)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(MF_ContinueScene, FALSE) - EVT_CALL(SetNpcPos, NPC_PenguinPatrol, -255, 0, 50) - EVT_CALL(SetNpcSpeed, NPC_PenguinPatrol, EVT_FLOAT(2.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Walk) - EVT_CALL(NpcMoveTo, NPC_PenguinPatrol, -255, -75, 0) - EVT_CALL(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Idle) - EVT_SET(MF_ContinueScene, TRUE) - EVT_END_THREAD - EVT_CALL(SetNpcPos, NPC_MayorPenguinWife, -255, 0, 80) - EVT_CALL(SetNpcSpeed, NPC_MayorPenguinWife, EVT_FLOAT(2.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Walk) - EVT_CALL(NpcMoveTo, NPC_MayorPenguinWife, -255, -20, 0) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Idle) - EVT_LABEL(5) - EVT_IF_EQ(MF_ContinueScene, FALSE) - EVT_WAIT(1) - EVT_GOTO(5) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_PointTalk, ANIM_MayorPenguinWife_Point, 0, MSG_CH7_0009) - EVT_CALL(InterpNpcYaw, NPC_PenguinPatrol, 180, 0) - EVT_WAIT(30 * DT) - EVT_CALL(InterpNpcYaw, NPC_PenguinPatrol, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -255, 0, -150) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.4 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(PlayerMoveTo, -315, -150, 20 * DT) - EVT_CALL(InterpPlayerYaw, 0, 0) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Walk) - EVT_CALL(NpcMoveTo, NPC_PenguinPatrol, -255, -180, 0) - EVT_CALL(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Idle) - EVT_WAIT(20 * DT) - EVT_THREAD - EVT_SET(MF_ContinueScene, FALSE) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Walk) - EVT_CALL(NpcMoveTo, NPC_MayorPenguinWife, -255, -70, 0) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Idle) - EVT_SET(MF_ContinueScene, TRUE) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Inspect) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Idle) - EVT_CALL(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_000A) - EVT_LABEL(6) - EVT_IF_EQ(MF_ContinueScene, FALSE) - EVT_WAIT(1) - EVT_GOTO(6) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_PointTalk, ANIM_MayorPenguinWife_Point, 0, MSG_CH7_000B) - EVT_WAIT(20 * DT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, EVT_FLOAT(-340.5), EVT_FLOAT(0.0), EVT_FLOAT(-180.7)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-463.0), EVT_FLOAT(180.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(-215.0), EVT_FLOAT(-175.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.5), EVT_FLOAT(-8.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(GetAngleToPlayer, NPC_PenguinPatrol, LVar0) - EVT_CALL(InterpNpcYaw, NPC_PenguinPatrol, LVar0, 0) - EVT_CALL(PlayerFaceNpc, NPC_PenguinPatrol, FALSE) - EVT_WAIT(13 * DT) - EVT_CALL(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_000C) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW3_ShakeHead) - EVT_WAIT(35 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_000D) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToPlayer, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_PointTalk, ANIM_MayorPenguinWife_Point, 0, MSG_CH7_000E) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW3_ShakeHead) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_000F) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(PARTNER_GOOMBARIO) - EVT_CALL(SpeakToNpc, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, NPC_PenguinPatrol, MSG_CH7_0010) - EVT_CASE_EQ(PARTNER_KOOPER) - EVT_CALL(SpeakToNpc, NPC_PARTNER, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, NPC_PenguinPatrol, MSG_CH7_0011) - EVT_CASE_EQ(PARTNER_BOMBETTE) - EVT_CALL(SpeakToNpc, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, NPC_PenguinPatrol, MSG_CH7_0012) - EVT_CASE_EQ(PARTNER_PARAKARRY) - EVT_CALL(SpeakToNpc, NPC_PARTNER, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, NPC_PenguinPatrol, MSG_CH7_0013) - EVT_CASE_EQ(PARTNER_BOW) - EVT_CALL(SpeakToNpc, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, NPC_PenguinPatrol, MSG_CH7_0014) - EVT_CASE_EQ(PARTNER_WATT) - EVT_CALL(SpeakToNpc, NPC_PARTNER, ANIM_WorldWatt_Talk, ANIM_WorldWatt_Idle, 0, NPC_PenguinPatrol, MSG_CH7_0015) - EVT_CASE_EQ(PARTNER_SUSHIE) - EVT_CALL(SpeakToNpc, NPC_PARTNER, ANIM_WorldSushie_Talk, ANIM_WorldSushie_Idle, 0, NPC_PenguinPatrol, MSG_CH7_0016) - EVT_CASE_EQ(PARTNER_LAKILESTER) - EVT_CALL(SpeakToNpc, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, NPC_PenguinPatrol, MSG_CH7_0017) - EVT_END_SWITCH - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_0018) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_TalkThink, ANIM_PenguinPatrol_StillThink, 0, MSG_CH7_0019) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_001A) - EVT_CALL(SetNpcPos, NPC_Penguin_05, -150, 0, 0) - EVT_CALL(InterpNpcYaw, NPC_Penguin_05, 90, 0) - EVT_CALL(SetNpcPos, NPC_Penguin_06, -90, 0, 0) - EVT_CALL(InterpNpcYaw, NPC_Penguin_06, 270, 0) - EVT_CALL(SetNpcPos, NPC_Penguin_07, -120, 0, -30) - EVT_CALL(InterpNpcYaw, NPC_Penguin_07, 180, 0) - EVT_CALL(SetNpcPos, NPC_Penguin_08, -120, 0, 30) - EVT_CALL(InterpNpcYaw, NPC_Penguin_08, 0, 0) - EVT_CALL(SetNpcFlagBits, NPC_MayorPenguin, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_MayorPenguinWife, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_SET(GB_StoryProgress, STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_SET(GB_SAM11_FrozenPondDamage, 0) - EVT_SET(MV_DialogueState_Penguin1, 0) - EVT_SET(MV_DialogueState_Penguin2, 0) - EVT_SET(MV_DialogueState_Penguin3, 0) - EVT_SET(MV_DialogueState_Penguin4, 0) - EVT_RETURN - EVT_END + Call(InterruptUsePartner) + Call(SetNpcFlagBits, NPC_MayorPenguin, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_MayorPenguinWife, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, Float(-236.1), Float(0.0), Float(-45.6)) + Call(SetCamPosA, CAM_DEFAULT, Float(-300.0), Float(-53.7)) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(20 * DT) + ExecWait(N(EVS_OpenMayorsOfficeDoor)) + Thread + Wait(20 * DT) + ExecWait(N(EVS_CloseMayorsOfficeDoor)) + EndThread + Call(SetNpcFlagBits, NPC_MayorPenguinWife, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(SetNpcPos, NPC_MayorPenguinWife, -255, 0, 28) + Call(SetNpcSpeed, NPC_MayorPenguinWife, Float(2.0 / DT)) + Call(SetNpcAnimation, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Walk) + Call(NpcMoveTo, NPC_MayorPenguinWife, -255, -30, 0) + Call(SetNpcAnimation, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Idle) + Call(SpeakToPlayer, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Talk, ANIM_MayorPenguinWife_Idle, 0, MSG_CH7_0005) + Call(SetPanTarget, CAM_DEFAULT, -255, 0, -150) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.4 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(DisablePartnerAI, 0) + Call(SetPlayerPos, -284, 0, -165) + Call(InterpPlayerYaw, 180, 0) + Call(SetNpcPos, NPC_PARTNER, -320, 0, -190) + Call(InterpNpcYaw, NPC_PARTNER, 180, 0) + Call(SetNpcAnimation, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Walk) + Call(NpcMoveTo, NPC_MayorPenguinWife, -255, -40, 0) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Call(NpcMoveTo, NPC_MayorPenguinWife, -255, -165, 0) + Call(InterpPlayerYaw, 0, 0) + Call(InterpNpcYaw, NPC_PARTNER, 0, 0) + Call(NpcMoveTo, NPC_MayorPenguinWife, -255, -185, 0) + Call(SetNpcAnimation, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Idle) + Call(PlaySoundAtNpc, NPC_MayorPenguinWife, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_MayorPenguinWife, EMOTE_EXCLAMATION, 0, 30, EMOTER_NPC, 0, 0, 0, 0) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Walk) + Call(SetNpcSpeed, NPC_MayorPenguinWife, Float(0.5 / DT)) + Call(NpcMoveTo, NPC_MayorPenguinWife, -255, -200, 0) + Call(SetNpcAnimation, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Inspect) + Wait(35 * DT) + Thread + Call(SetMusicTrack, 0, SONG_PENGUIN_WHODUNIT, 0, 8) + Call(SetNpcAnimation, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Horror) + Set(MF_ContinueScene, FALSE) + Call(SpeakToPlayer, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Horror, ANIM_MayorPenguinWife_Horror, 0, MSG_CH7_0006) + Set(MF_ContinueScene, TRUE) + EndThread + Call(SetMotionBlurParams, 0, 0, 0, 320, 240, 128, 10) + Loop(5) + Call(GetNpcPos, NPC_MayorPenguinWife, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(210.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(10.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(GetNpcPos, NPC_MayorPenguinWife, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(10.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndLoop + Call(SetMotionBlurParams, 0, 0, 0, 320, 240, 0, 10) + Label(2) + IfEq(MF_ContinueScene, FALSE) + Wait(1) + Goto(2) + EndIf + Wait(20 * DT) + Call(SetNpcSpeed, NPC_MayorPenguinWife, Float(6.0 / DT)) + Call(SetNpcAnimation, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Panic) + Call(NpcMoveTo, NPC_MayorPenguinWife, -255, 0, 0) + Call(SetNpcPos, NPC_MayorPenguinWife, -255, 0, 60) + Wait(30 * DT) + Set(MF_ContinueScene, FALSE) + Thread + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + Wait(60 * DT) + Set(MF_ContinueScene, TRUE) + EndThread + Call(ShowMessageAtScreenPos, MSG_CH7_0007, 160, 40) + Label(100) + IfEq(MF_ContinueScene, FALSE) + Wait(1) + Goto(100) + EndIf + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetCamDistance, CAM_DEFAULT, Float(600.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-8.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.6 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(InterpPlayerYaw, 180, 5) + Wait(20 * DT) + Call(InterpPlayerYaw, 0, 5) + Wait(90 * DT) + Thread + Wait(10 * DT) + Call(InterpPlayerYaw, 180, 5) + EndThread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, Float(-236.1), Float(0.0), Float(-45.6)) + Call(SetCamPosA, CAM_DEFAULT, Float(-300.0), Float(-53.7)) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetNpcPos, NPC_PARTNER, -306, 0, -116) + Call(SetNpcYaw, NPC_PARTNER, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(30 * DT) + Call(SpeakToPlayer, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Horror, ANIM_MayorPenguinWife_Horror, 5, MSG_CH7_0008) + Wait(20 * DT) + ExecWait(N(EVS_OpenMayorsOfficeDoor)) + Thread + Wait(30 * DT) + ExecWait(N(EVS_CloseMayorsOfficeDoor)) + EndThread + Thread + Set(MF_ContinueScene, FALSE) + Call(SetNpcPos, NPC_PenguinPatrol, -255, 0, 50) + Call(SetNpcSpeed, NPC_PenguinPatrol, Float(2.0 / DT)) + Call(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Walk) + Call(NpcMoveTo, NPC_PenguinPatrol, -255, -75, 0) + Call(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Idle) + Set(MF_ContinueScene, TRUE) + EndThread + Call(SetNpcPos, NPC_MayorPenguinWife, -255, 0, 80) + Call(SetNpcSpeed, NPC_MayorPenguinWife, Float(2.0 / DT)) + Call(SetNpcAnimation, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Walk) + Call(NpcMoveTo, NPC_MayorPenguinWife, -255, -20, 0) + Call(SetNpcAnimation, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Idle) + Label(5) + IfEq(MF_ContinueScene, FALSE) + Wait(1) + Goto(5) + EndIf + Call(SpeakToPlayer, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_PointTalk, ANIM_MayorPenguinWife_Point, 0, MSG_CH7_0009) + Call(InterpNpcYaw, NPC_PenguinPatrol, 180, 0) + Wait(30 * DT) + Call(InterpNpcYaw, NPC_PenguinPatrol, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, -255, 0, -150) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.4 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Wait(30 * DT) + Call(PlayerMoveTo, -315, -150, 20 * DT) + Call(InterpPlayerYaw, 0, 0) + EndThread + Call(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Walk) + Call(NpcMoveTo, NPC_PenguinPatrol, -255, -180, 0) + Call(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Idle) + Wait(20 * DT) + Thread + Set(MF_ContinueScene, FALSE) + Call(SetNpcAnimation, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Walk) + Call(NpcMoveTo, NPC_MayorPenguinWife, -255, -70, 0) + Call(SetNpcAnimation, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Idle) + Set(MF_ContinueScene, TRUE) + EndThread + Call(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Inspect) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Idle) + Call(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_000A) + Label(6) + IfEq(MF_ContinueScene, FALSE) + Wait(1) + Goto(6) + EndIf + Call(SpeakToPlayer, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_PointTalk, ANIM_MayorPenguinWife_Point, 0, MSG_CH7_000B) + Wait(20 * DT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, Float(-340.5), Float(0.0), Float(-180.7)) + Call(SetCamPosA, CAM_DEFAULT, Float(-463.0), Float(180.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(-215.0), Float(-175.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.5), Float(-8.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(250.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(GetAngleToPlayer, NPC_PenguinPatrol, LVar0) + Call(InterpNpcYaw, NPC_PenguinPatrol, LVar0, 0) + Call(PlayerFaceNpc, NPC_PenguinPatrol, FALSE) + Wait(13 * DT) + Call(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_000C) + Call(SetPlayerAnimation, ANIM_MarioW3_ShakeHead) + Wait(35 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_000D) + Wait(30 * DT) + Call(SpeakToPlayer, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_PointTalk, ANIM_MayorPenguinWife_Point, 0, MSG_CH7_000E) + Call(SetPlayerAnimation, ANIM_MarioW3_ShakeHead) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_000F) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(GetCurrentPartnerID, LVar0) + Switch(LVar0) + CaseEq(PARTNER_GOOMBARIO) + Call(SpeakToNpc, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, NPC_PenguinPatrol, MSG_CH7_0010) + CaseEq(PARTNER_KOOPER) + Call(SpeakToNpc, NPC_PARTNER, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, NPC_PenguinPatrol, MSG_CH7_0011) + CaseEq(PARTNER_BOMBETTE) + Call(SpeakToNpc, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, NPC_PenguinPatrol, MSG_CH7_0012) + CaseEq(PARTNER_PARAKARRY) + Call(SpeakToNpc, NPC_PARTNER, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, NPC_PenguinPatrol, MSG_CH7_0013) + CaseEq(PARTNER_BOW) + Call(SpeakToNpc, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, NPC_PenguinPatrol, MSG_CH7_0014) + CaseEq(PARTNER_WATT) + Call(SpeakToNpc, NPC_PARTNER, ANIM_WorldWatt_Talk, ANIM_WorldWatt_Idle, 0, NPC_PenguinPatrol, MSG_CH7_0015) + CaseEq(PARTNER_SUSHIE) + Call(SpeakToNpc, NPC_PARTNER, ANIM_WorldSushie_Talk, ANIM_WorldSushie_Idle, 0, NPC_PenguinPatrol, MSG_CH7_0016) + CaseEq(PARTNER_LAKILESTER) + Call(SpeakToNpc, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, NPC_PenguinPatrol, MSG_CH7_0017) + EndSwitch + Wait(10 * DT) + Call(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_0018) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_TalkThink, ANIM_PenguinPatrol_StillThink, 0, MSG_CH7_0019) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_001A) + Call(SetNpcPos, NPC_Penguin_05, -150, 0, 0) + Call(InterpNpcYaw, NPC_Penguin_05, 90, 0) + Call(SetNpcPos, NPC_Penguin_06, -90, 0, 0) + Call(InterpNpcYaw, NPC_Penguin_06, 270, 0) + Call(SetNpcPos, NPC_Penguin_07, -120, 0, -30) + Call(InterpNpcYaw, NPC_Penguin_07, 180, 0) + Call(SetNpcPos, NPC_Penguin_08, -120, 0, 30) + Call(InterpNpcYaw, NPC_Penguin_08, 0, 0) + Call(SetNpcFlagBits, NPC_MayorPenguin, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcFlagBits, NPC_MayorPenguinWife, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(EnablePartnerAI) + Set(GB_StoryProgress, STORY_CH7_MAYOR_MURDER_MYSTERY) + Set(GB_SAM11_FrozenPondDamage, 0) + Set(MV_DialogueState_Penguin1, 0) + Set(MV_DialogueState_Penguin2, 0) + Set(MV_DialogueState_Penguin3, 0) + Set(MV_DialogueState_Penguin4, 0) + Return + End }; EvtScript N(EVS_Scene_MysterySolved) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(InterruptUsePartner) - EVT_WAIT(20) - EVT_END_IF - EVT_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(3.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_PARTNER, -262, -103, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_END_THREAD - EVT_CALL(GetAngleToPlayer, NPC_PenguinPatrol, LVar0) - EVT_CALL(InterpNpcYaw, NPC_PenguinPatrol, LVar0, 0) - EVT_CALL(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_001D) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(40 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(GetNpcPos, NPC_PenguinPatrol, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetPlayerPos, -255, 0, -135) - EVT_CALL(PlayerFaceNpc, NPC_PenguinPatrol, FALSE) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_001E) - EVT_CALL(GetNpcPos, NPC_PenguinPatrol, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 10) - EVT_CALL(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Walk) - EVT_CALL(SetNpcSpeed, NPC_PenguinPatrol, EVT_FLOAT(2.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_PenguinPatrol, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Idle) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Inspect) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 5, MSG_CH7_001F) - EVT_CALL(GetAngleToPlayer, NPC_PenguinPatrol, LVar0) - EVT_CALL(InterpNpcYaw, NPC_PenguinPatrol, LVar0, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_WAIT(20 * DT) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_CALL(PlayerMoveTo, LVar0, LVar2, 20 * DT) - EVT_CALL(PlayerFaceNpc, NPC_Herringway, FALSE) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) - EVT_CALL(NpcMoveTo, NPC_PARTNER, -306, -116, 10 * DT) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Herringway, 0) - EVT_END_THREAD - EVT_CALL(GetNpcPos, NPC_PenguinPatrol, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 20) - EVT_CALL(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Walk) - EVT_CALL(SetNpcSpeed, NPC_PenguinPatrol, EVT_FLOAT(2.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_PenguinPatrol, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_0020) - EVT_CALL(GetNpcPos, NPC_Herringway, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_PenguinPatrol, LVar3, LVar4, LVar5) - EVT_ADDF(LVar0, LVar3) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_DIVF(LVar0, EVT_FLOAT(2.0)) - EVT_DIVF(LVar1, EVT_FLOAT(2.0)) - EVT_DIVF(LVar2, EVT_FLOAT(2.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Herringway, ANIM_Herringway_Talk, ANIM_Herringway_Idle, 0, MSG_CH7_0021) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(GetAngleBetweenNPCs, NPC_MayorPenguinWife, NPC_PenguinPatrol, LVar0) - EVT_CALL(InterpNpcYaw, NPC_MayorPenguinWife, LVar0, 0) - EVT_CALL(GetAngleBetweenNPCs, NPC_Herringway, NPC_PenguinPatrol, LVar0) - EVT_CALL(InterpNpcYaw, NPC_Herringway, LVar0, 0) - EVT_CALL(PlayerFaceNpc, NPC_PenguinPatrol, FALSE) - EVT_WAIT(1) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_PenguinPatrol, 0) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_TalkThink, ANIM_PenguinPatrol_StillThink, 0, MSG_CH7_0022) - EVT_CALL(GetAngleBetweenNPCs, NPC_MayorPenguinWife, NPC_Herringway, LVar0) - EVT_CALL(InterpNpcYaw, NPC_MayorPenguinWife, LVar0, 0) - EVT_CALL(GetAngleBetweenNPCs, NPC_PenguinPatrol, NPC_Herringway, LVar0) - EVT_CALL(InterpNpcYaw, NPC_PenguinPatrol, LVar0, 0) - EVT_CALL(PlayerFaceNpc, NPC_Herringway, FALSE) - EVT_WAIT(1) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Herringway, 0) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Herringway, ANIM_Herringway_Talk, ANIM_Herringway_Idle, 0, MSG_CH7_0023) - EVT_CALL(GetAngleBetweenNPCs, NPC_Herringway, NPC_MayorPenguinWife, LVar0) - EVT_CALL(InterpNpcYaw, NPC_Herringway, LVar0, 0) - EVT_CALL(GetAngleBetweenNPCs, NPC_PenguinPatrol, NPC_MayorPenguinWife, LVar0) - EVT_CALL(InterpNpcYaw, NPC_PenguinPatrol, LVar0, 0) - EVT_CALL(PlayerFaceNpc, NPC_MayorPenguinWife, FALSE) - EVT_WAIT(1) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_MayorPenguinWife, 0) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_PointTalk, ANIM_MayorPenguinWife_Point, 0, MSG_CH7_0024) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.5), EVT_FLOAT(-6.5)) - EVT_CALL(N(GetLeftRightPoints), LVar0, LVar2, 45) - EVT_CALL(SetCamPosA, CAM_DEFAULT, LVar0, LVar1) - EVT_CALL(SetCamPosB, CAM_DEFAULT, LVar2, LVar3) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(GetAngleBetweenNPCs, NPC_MayorPenguinWife, NPC_PenguinPatrol, LVar0) - EVT_CALL(InterpNpcYaw, NPC_MayorPenguinWife, LVar0, 0) - EVT_CALL(GetAngleBetweenNPCs, NPC_Herringway, NPC_PenguinPatrol, LVar0) - EVT_CALL(InterpNpcYaw, NPC_Herringway, LVar0, 0) - EVT_CALL(PlayerFaceNpc, NPC_PenguinPatrol, FALSE) - EVT_WAIT(1) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_PenguinPatrol, 0) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_TalkThink, ANIM_PenguinPatrol_StillThink, 0, MSG_CH7_0025) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Twitch) - EVT_WAIT(30 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_MayorPenguin, SOUND_ACTOR_TWITCH, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Dead) - EVT_WAIT(2 * DT) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Twitch) - EVT_WAIT(20 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_MayorPenguin, SOUND_ACTOR_TWITCH, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Dead) - EVT_WAIT(2 * DT) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Twitch) - EVT_WAIT(20 * DT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(N(GetLeftRightPoints), LVar0, LVar2, -95) - EVT_CALL(SetCamPosA, CAM_DEFAULT, LVar0, LVar1) - EVT_CALL(SetCamPosB, CAM_DEFAULT, LVar2, LVar3) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(FadeOutMusic, 0, 500) - EVT_CALL(SpeakToPlayer, NPC_MayorPenguin, ANIM_MayorPenguin_Twitch, ANIM_MayorPenguin_Twitch, 0, MSG_CH7_0026) - EVT_CALL(GetAngleBetweenNPCs, NPC_PenguinPatrol, NPC_MayorPenguin, LVar0) - EVT_CALL(InterpNpcYaw, NPC_PenguinPatrol, LVar0, 0) - EVT_CALL(GetAngleBetweenNPCs, NPC_MayorPenguinWife, NPC_MayorPenguin, LVar0) - EVT_CALL(InterpNpcYaw, NPC_MayorPenguinWife, LVar0, 0) - EVT_CALL(GetAngleBetweenNPCs, NPC_Herringway, NPC_MayorPenguin, LVar0) - EVT_CALL(InterpNpcYaw, NPC_Herringway, LVar0, 0) - EVT_CALL(PlayerFaceNpc, NPC_MayorPenguin, FALSE) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_MayorPenguin, 0) - EVT_CALL(PlaySoundAtNpc, NPC_MayorPenguin, SOUND_ACTOR_TWITCH, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Dead) - EVT_WAIT(2 * DT) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Twitch) - EVT_WAIT(20 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_MayorPenguin, SOUND_ACTOR_TWITCH, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Dead) - EVT_WAIT(2 * DT) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Twitch) - EVT_WAIT(20 * DT) - EVT_CALL(GetNpcPos, NPC_MayorPenguin, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 11) - EVT_ADD(LVar2, 10) - EVT_CALL(SetNpcPos, NPC_MayorPenguin, LVar0, LVar1, LVar2) - EVT_CALL(EnableNpcShadow, NPC_MayorPenguin, FALSE) - EVT_CALL(SetNpcPos, NPC_MayorDummy, -270, 0, -205) - EVT_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcPos, NPC_MayorDummy, NPC_DISPOSE_LOCATION) - EVT_CALL(EnableNpcShadow, NPC_MayorPenguin, TRUE) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_WakeUp) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Idle) - EVT_CALL(PlaySoundAtNpc, NPC_MayorPenguin, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcJumpscale, NPC_MayorPenguin, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_MayorPenguin, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_MayorPenguin, LVar0, 0, LVar2, 10 * DT) - EVT_CALL(SetMusicTrack, 0, SONG_PENGUIN_WAKES_UP, 0, 8) - EVT_CALL(SpeakToPlayer, NPC_MayorPenguin, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, MSG_CH7_0027) - EVT_CALL(InterpNpcYaw, NPC_MayorPenguin, 0, 0) - EVT_WAIT(20 * DT) - EVT_CALL(InterpNpcYaw, NPC_MayorPenguin, 180, 0) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Surprise) - EVT_CALL(SetNpcJumpscale, NPC_MayorPenguinWife, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_MayorPenguinWife, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_MayorPenguinWife, LVar0, LVar1, LVar2, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Idle) - EVT_CALL(SpeakToPlayer, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Talk, ANIM_MayorPenguinWife_Idle, 0, MSG_CH7_0028) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToPlayer, NPC_MayorPenguin, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, MSG_CH7_0029) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SpeakToNpc, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, NPC_MayorPenguin, MSG_CH7_002A) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToNpc, NPC_MayorPenguin, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, NPC_PenguinPatrol, MSG_CH7_002B) - EVT_CALL(GetNpcPos, NPC_MayorPenguin, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(280.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SpeakToPlayer, NPC_MayorPenguin, ANIM_MayorPenguin_CarryTalk, ANIM_MayorPenguin_Idle, 0, MSG_CH7_002C) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_LOOP(200) - EVT_CALL(GetAngleBetweenNPCs, NPC_PenguinPatrol, NPC_MayorPenguin, LVar0) - EVT_CALL(InterpNpcYaw, NPC_PenguinPatrol, LVar0, 0) - EVT_CALL(GetAngleBetweenNPCs, NPC_Herringway, NPC_MayorPenguin, LVar0) - EVT_CALL(InterpNpcYaw, NPC_Herringway, LVar0, 0) - EVT_CALL(GetAngleBetweenNPCs, NPC_MayorPenguinWife, NPC_MayorPenguin, LVar0) - EVT_CALL(InterpNpcYaw, NPC_MayorPenguinWife, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Penguin_09, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcSpeed, NPC_MayorPenguin, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Walk) - EVT_CALL(SetNpcFlagBits, NPC_MayorPenguin, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(NpcMoveTo, NPC_MayorPenguin, -320, -258, 0) - EVT_CALL(InterpNpcYaw, NPC_MayorPenguin, 180, 0) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Idle) - EVT_WAIT(30 * DT) - EVT_THREAD - EVT_WAIT(25 * DT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 30) - EVT_CALL(PlayerMoveTo, LVar0, LVar2, 20 * DT) - EVT_CALL(PlayerFaceNpc, NPC_MayorPenguin, FALSE) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_MayorPenguin, 0) - EVT_WAIT(50 * DT) - EVT_CALL(PlayerFaceNpc, NPC_MayorPenguin, FALSE) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_MayorPenguin, 0) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_SET(LVar0, 0) - EVT_LOOP(8) - EVT_CALL(GetNpcPos, NPC_Penguin_09, LVar0, LVar1, LVar2) - EVT_ADDF(LVar1, EVT_FLOAT(1.25)) - EVT_CALL(SetNpcPos, NPC_Penguin_09, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_PickUp) - EVT_WAIT(30 * DT) - EVT_EXEC_GET_TID(N(EVS_MayorCarryGift), LVarA) - EVT_CALL(GetNpcPos, NPC_Herringway, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, -25) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-300.0), EVT_FLOAT(0.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.3 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Carry) - EVT_CALL(GetNpcPos, NPC_Herringway, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, -35) - EVT_CALL(NpcMoveTo, NPC_MayorPenguin, LVar0, LVar2, 0) - EVT_KILL_THREAD(LVarA) - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_LOOP(7) - EVT_CALL(GetNpcPos, NPC_Penguin_09, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 1) - EVT_CALL(SetNpcPos, NPC_Penguin_09, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcFlagBits, NPC_MayorPenguin, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToNpc, NPC_MayorPenguin, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, NPC_Herringway, MSG_CH7_002D) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Give) - EVT_WAIT(60 * DT) - EVT_CALL(GetNpcPos, NPC_Herringway, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, -5) - EVT_CALL(NpcMoveTo, NPC_Herringway, LVar0, LVar2, 0) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Idle) - EVT_CALL(SetNpcAnimation, NPC_Herringway, ANIM_Herringway_Recieve) - EVT_CALL(SpeakToNpc, NPC_Herringway, ANIM_Herringway_TalkCarry, ANIM_Herringway_IdleCarry, 0, NPC_MayorPenguin, MSG_CH7_002E) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(20 * DT) - EVT_CALL(InterpNpcYaw, NPC_MayorPenguin, 0, 0) - EVT_CALL(InterpNpcYaw, NPC_MayorPenguinWife, 0, 0) - EVT_CALL(InterpNpcYaw, NPC_Herringway, 0, 0) - EVT_CALL(PlayerFaceNpc, NPC_PenguinPatrol, FALSE) - EVT_CALL(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_002F) - EVT_CALL(GetNpcPos, NPC_Herringway, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.3 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcSpeed, NPC_MayorPenguin, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetNpcFlagBits, NPC_MayorPenguin, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Walk) - EVT_CALL(NpcMoveTo, NPC_MayorPenguin, -249, -109, 0) - EVT_CALL(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Idle) - EVT_LOOP(100) - EVT_CALL(GetAngleBetweenNPCs, NPC_MayorPenguin, NPC_PenguinPatrol, LVar0) - EVT_CALL(InterpNpcYaw, NPC_MayorPenguin, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(100) - EVT_CALL(GetAngleBetweenNPCs, NPC_MayorPenguinWife, NPC_PenguinPatrol, LVar0) - EVT_CALL(InterpNpcYaw, NPC_MayorPenguinWife, LVar0, 0) - EVT_CALL(PlayerFaceNpc, NPC_PenguinPatrol, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcFlagBits, NPC_PenguinPatrol, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcSpeed, NPC_PenguinPatrol, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Walk) - EVT_CALL(NpcMoveTo, NPC_PenguinPatrol, -210, -80, 0) - EVT_CALL(NpcMoveTo, NPC_PenguinPatrol, -250, -10, 0) - EVT_CALL(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Idle) - EVT_CALL(SetNpcFlagBits, NPC_PenguinPatrol, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_EXEC_WAIT(N(EVS_OpenMayorsOfficeDoor)) - EVT_CALL(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Walk) - EVT_CALL(NpcMoveTo, NPC_PenguinPatrol, -250, 50, 0) - EVT_CALL(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Idle) - EVT_CALL(SpeakToPlayer, NPC_MayorPenguin, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, MSG_CH7_0030) - EVT_CALL(SpeakToPlayer, NPC_Herringway, ANIM_Herringway_TalkCarry, ANIM_Herringway_IdleCarry, 0, MSG_CH7_0031) - EVT_EXEC_GET_TID(N(EVS_HerringwayCarryPresent), LVarA) - EVT_CALL(SetNpcSpeed, NPC_Herringway, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_Herringway, ANIM_Herringway_WalkCarry) - EVT_CALL(NpcMoveTo, NPC_Herringway, -250, 50, 0) - EVT_CALL(SetNpcAnimation, NPC_Herringway, ANIM_Herringway_IdleCarry) - EVT_KILL_THREAD(LVarA) - EVT_CALL(RemoveItemEntity, MV_PresentItemID) - EVT_EXEC_WAIT(N(EVS_CloseMayorsOfficeDoor)) - EVT_SET(GB_StoryProgress, STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToPlayer, NPC_MayorPenguin, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 5, MSG_CH7_0032) - EVT_CALL(GetNpcPos, NPC_MayorPenguin, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToPlayer, NPC_MayorPenguin, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, MSG_CH7_0033) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(1) - EVT_CALL(SpeakToPlayer, NPC_MayorPenguin, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, MSG_CH7_0034) - EVT_CALL(SetNpcFlagBits, NPC_MayorPenguin, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcPos, NPC_PenguinPatrol, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_Herringway, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_Herringway, NPC_FLAG_INACTIVE, TRUE) - EVT_CALL(EnableNpcShadow, NPC_Herringway, FALSE) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_SET(MV_DialogueState_Penguin1, 0) - EVT_SET(MV_DialogueState_Penguin2, 0) - EVT_SET(MV_DialogueState_Penguin3, 0) - EVT_SET(MV_DialogueState_Penguin4, 0) - EVT_CALL(SetNpcFlagBits, NPC_MayorPenguin, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_MayorPenguinWife, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(SetNpcPos, NPC_Penguin_09, NPC_DISPOSE_LOCATION) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, PARTNER_NONE) + Call(InterruptUsePartner) + Wait(20) + EndIf + Thread + Call(DisablePartnerAI, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) + Call(SetNpcSpeed, NPC_PARTNER, Float(3.0 / DT)) + Call(NpcMoveTo, NPC_PARTNER, -262, -103, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + EndThread + Call(GetAngleToPlayer, NPC_PenguinPatrol, LVar0) + Call(InterpNpcYaw, NPC_PenguinPatrol, LVar0, 0) + Call(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_001D) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(40 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(GetNpcPos, NPC_PenguinPatrol, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetPlayerPos, -255, 0, -135) + Call(PlayerFaceNpc, NPC_PenguinPatrol, FALSE) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_001E) + Call(GetNpcPos, NPC_PenguinPatrol, LVar0, LVar1, LVar2) + Sub(LVar2, 10) + Call(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Walk) + Call(SetNpcSpeed, NPC_PenguinPatrol, Float(2.0 / DT)) + Call(NpcMoveTo, NPC_PenguinPatrol, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Idle) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Inspect) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Idle) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 5, MSG_CH7_001F) + Call(GetAngleToPlayer, NPC_PenguinPatrol, LVar0) + Call(InterpNpcYaw, NPC_PenguinPatrol, LVar0, 0) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + Wait(20 * DT) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Call(PlayerMoveTo, LVar0, LVar2, 20 * DT) + Call(PlayerFaceNpc, NPC_Herringway, FALSE) + EndThread + Thread + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) + Call(NpcMoveTo, NPC_PARTNER, -306, -116, 10 * DT) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Herringway, 0) + EndThread + Call(GetNpcPos, NPC_PenguinPatrol, LVar0, LVar1, LVar2) + Add(LVar2, 20) + Call(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Walk) + Call(SetNpcSpeed, NPC_PenguinPatrol, Float(2.0 / DT)) + Call(NpcMoveTo, NPC_PenguinPatrol, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Idle) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_0020) + Call(GetNpcPos, NPC_Herringway, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_PenguinPatrol, LVar3, LVar4, LVar5) + AddF(LVar0, LVar3) + AddF(LVar1, LVar4) + AddF(LVar2, LVar5) + DivF(LVar0, Float(2.0)) + DivF(LVar1, Float(2.0)) + DivF(LVar2, Float(2.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Herringway, ANIM_Herringway_Talk, ANIM_Herringway_Idle, 0, MSG_CH7_0021) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(GetAngleBetweenNPCs, NPC_MayorPenguinWife, NPC_PenguinPatrol, LVar0) + Call(InterpNpcYaw, NPC_MayorPenguinWife, LVar0, 0) + Call(GetAngleBetweenNPCs, NPC_Herringway, NPC_PenguinPatrol, LVar0) + Call(InterpNpcYaw, NPC_Herringway, LVar0, 0) + Call(PlayerFaceNpc, NPC_PenguinPatrol, FALSE) + Wait(1) + Call(NpcFaceNpc, NPC_PARTNER, NPC_PenguinPatrol, 0) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_TalkThink, ANIM_PenguinPatrol_StillThink, 0, MSG_CH7_0022) + Call(GetAngleBetweenNPCs, NPC_MayorPenguinWife, NPC_Herringway, LVar0) + Call(InterpNpcYaw, NPC_MayorPenguinWife, LVar0, 0) + Call(GetAngleBetweenNPCs, NPC_PenguinPatrol, NPC_Herringway, LVar0) + Call(InterpNpcYaw, NPC_PenguinPatrol, LVar0, 0) + Call(PlayerFaceNpc, NPC_Herringway, FALSE) + Wait(1) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Herringway, 0) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Herringway, ANIM_Herringway_Talk, ANIM_Herringway_Idle, 0, MSG_CH7_0023) + Call(GetAngleBetweenNPCs, NPC_Herringway, NPC_MayorPenguinWife, LVar0) + Call(InterpNpcYaw, NPC_Herringway, LVar0, 0) + Call(GetAngleBetweenNPCs, NPC_PenguinPatrol, NPC_MayorPenguinWife, LVar0) + Call(InterpNpcYaw, NPC_PenguinPatrol, LVar0, 0) + Call(PlayerFaceNpc, NPC_MayorPenguinWife, FALSE) + Wait(1) + Call(NpcFaceNpc, NPC_PARTNER, NPC_MayorPenguinWife, 0) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_PointTalk, ANIM_MayorPenguinWife_Point, 0, MSG_CH7_0024) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.5), Float(-6.5)) + Call(N(GetLeftRightPoints), LVar0, LVar2, 45) + Call(SetCamPosA, CAM_DEFAULT, LVar0, LVar1) + Call(SetCamPosB, CAM_DEFAULT, LVar2, LVar3) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(GetAngleBetweenNPCs, NPC_MayorPenguinWife, NPC_PenguinPatrol, LVar0) + Call(InterpNpcYaw, NPC_MayorPenguinWife, LVar0, 0) + Call(GetAngleBetweenNPCs, NPC_Herringway, NPC_PenguinPatrol, LVar0) + Call(InterpNpcYaw, NPC_Herringway, LVar0, 0) + Call(PlayerFaceNpc, NPC_PenguinPatrol, FALSE) + Wait(1) + Call(NpcFaceNpc, NPC_PARTNER, NPC_PenguinPatrol, 0) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_TalkThink, ANIM_PenguinPatrol_StillThink, 0, MSG_CH7_0025) + Call(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Twitch) + Wait(30 * DT) + Call(PlaySoundAtNpc, NPC_MayorPenguin, SOUND_ACTOR_TWITCH, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Dead) + Wait(2 * DT) + Call(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Twitch) + Wait(20 * DT) + Call(PlaySoundAtNpc, NPC_MayorPenguin, SOUND_ACTOR_TWITCH, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Dead) + Wait(2 * DT) + Call(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Twitch) + Wait(20 * DT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(N(GetLeftRightPoints), LVar0, LVar2, -95) + Call(SetCamPosA, CAM_DEFAULT, LVar0, LVar1) + Call(SetCamPosB, CAM_DEFAULT, LVar2, LVar3) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(FadeOutMusic, 0, 500) + Call(SpeakToPlayer, NPC_MayorPenguin, ANIM_MayorPenguin_Twitch, ANIM_MayorPenguin_Twitch, 0, MSG_CH7_0026) + Call(GetAngleBetweenNPCs, NPC_PenguinPatrol, NPC_MayorPenguin, LVar0) + Call(InterpNpcYaw, NPC_PenguinPatrol, LVar0, 0) + Call(GetAngleBetweenNPCs, NPC_MayorPenguinWife, NPC_MayorPenguin, LVar0) + Call(InterpNpcYaw, NPC_MayorPenguinWife, LVar0, 0) + Call(GetAngleBetweenNPCs, NPC_Herringway, NPC_MayorPenguin, LVar0) + Call(InterpNpcYaw, NPC_Herringway, LVar0, 0) + Call(PlayerFaceNpc, NPC_MayorPenguin, FALSE) + Call(NpcFaceNpc, NPC_PARTNER, NPC_MayorPenguin, 0) + Call(PlaySoundAtNpc, NPC_MayorPenguin, SOUND_ACTOR_TWITCH, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Dead) + Wait(2 * DT) + Call(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Twitch) + Wait(20 * DT) + Call(PlaySoundAtNpc, NPC_MayorPenguin, SOUND_ACTOR_TWITCH, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Dead) + Wait(2 * DT) + Call(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Twitch) + Wait(20 * DT) + Call(GetNpcPos, NPC_MayorPenguin, LVar0, LVar1, LVar2) + Add(LVar0, 11) + Add(LVar2, 10) + Call(SetNpcPos, NPC_MayorPenguin, LVar0, LVar1, LVar2) + Call(EnableNpcShadow, NPC_MayorPenguin, FALSE) + Call(SetNpcPos, NPC_MayorDummy, -270, 0, -205) + Thread + Wait(30 * DT) + Call(SetNpcPos, NPC_MayorDummy, NPC_DISPOSE_LOCATION) + Call(EnableNpcShadow, NPC_MayorPenguin, TRUE) + EndThread + Call(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_WakeUp) + Wait(30 * DT) + Call(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Idle) + Call(PlaySoundAtNpc, NPC_MayorPenguin, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(SetNpcJumpscale, NPC_MayorPenguin, Float(1.0)) + Call(GetNpcPos, NPC_MayorPenguin, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_MayorPenguin, LVar0, 0, LVar2, 10 * DT) + Call(SetMusicTrack, 0, SONG_PENGUIN_WAKES_UP, 0, 8) + Call(SpeakToPlayer, NPC_MayorPenguin, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, MSG_CH7_0027) + Call(InterpNpcYaw, NPC_MayorPenguin, 0, 0) + Wait(20 * DT) + Call(InterpNpcYaw, NPC_MayorPenguin, 180, 0) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Surprise) + Call(SetNpcJumpscale, NPC_MayorPenguinWife, Float(1.0)) + Call(GetNpcPos, NPC_MayorPenguinWife, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_MayorPenguinWife, LVar0, LVar1, LVar2, 20 * DT) + Call(SetNpcAnimation, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Idle) + Call(SpeakToPlayer, NPC_MayorPenguinWife, ANIM_MayorPenguinWife_Talk, ANIM_MayorPenguinWife_Idle, 0, MSG_CH7_0028) + Wait(30 * DT) + Call(SpeakToPlayer, NPC_MayorPenguin, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, MSG_CH7_0029) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SpeakToNpc, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, NPC_MayorPenguin, MSG_CH7_002A) + Wait(10 * DT) + Call(SpeakToNpc, NPC_MayorPenguin, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, NPC_PenguinPatrol, MSG_CH7_002B) + Call(GetNpcPos, NPC_MayorPenguin, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(280.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SpeakToPlayer, NPC_MayorPenguin, ANIM_MayorPenguin_CarryTalk, ANIM_MayorPenguin_Idle, 0, MSG_CH7_002C) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Loop(200) + Call(GetAngleBetweenNPCs, NPC_PenguinPatrol, NPC_MayorPenguin, LVar0) + Call(InterpNpcYaw, NPC_PenguinPatrol, LVar0, 0) + Call(GetAngleBetweenNPCs, NPC_Herringway, NPC_MayorPenguin, LVar0) + Call(InterpNpcYaw, NPC_Herringway, LVar0, 0) + Call(GetAngleBetweenNPCs, NPC_MayorPenguinWife, NPC_MayorPenguin, LVar0) + Call(InterpNpcYaw, NPC_MayorPenguinWife, LVar0, 0) + Wait(1) + EndLoop + EndThread + Call(SetNpcFlagBits, NPC_Penguin_09, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcSpeed, NPC_MayorPenguin, Float(3.0 / DT)) + Call(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Walk) + Call(SetNpcFlagBits, NPC_MayorPenguin, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(NpcMoveTo, NPC_MayorPenguin, -320, -258, 0) + Call(InterpNpcYaw, NPC_MayorPenguin, 180, 0) + Call(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Idle) + Wait(30 * DT) + Thread + Wait(25 * DT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar0, 30) + Call(PlayerMoveTo, LVar0, LVar2, 20 * DT) + Call(PlayerFaceNpc, NPC_MayorPenguin, FALSE) + Call(NpcFaceNpc, NPC_PARTNER, NPC_MayorPenguin, 0) + Wait(50 * DT) + Call(PlayerFaceNpc, NPC_MayorPenguin, FALSE) + Call(NpcFaceNpc, NPC_PARTNER, NPC_MayorPenguin, 0) + EndThread + Thread + Wait(10 * DT) + Set(LVar0, 0) + Loop(8) + Call(GetNpcPos, NPC_Penguin_09, LVar0, LVar1, LVar2) + AddF(LVar1, Float(1.25)) + Call(SetNpcPos, NPC_Penguin_09, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + Call(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_PickUp) + Wait(30 * DT) + ExecGetTID(N(EVS_MayorCarryGift), LVarA) + Call(GetNpcPos, NPC_Herringway, LVar0, LVar1, LVar2) + Add(LVar2, -25) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamPosA, CAM_DEFAULT, Float(-300.0), Float(0.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.3 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Carry) + Call(GetNpcPos, NPC_Herringway, LVar0, LVar1, LVar2) + Add(LVar2, -35) + Call(NpcMoveTo, NPC_MayorPenguin, LVar0, LVar2, 0) + KillThread(LVarA) + Wait(10 * DT) + Thread + Wait(10 * DT) + Loop(7) + Call(GetNpcPos, NPC_Penguin_09, LVar0, LVar1, LVar2) + Add(LVar2, 1) + Call(SetNpcPos, NPC_Penguin_09, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + Wait(30 * DT) + Call(SetNpcFlagBits, NPC_MayorPenguin, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToNpc, NPC_MayorPenguin, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, NPC_Herringway, MSG_CH7_002D) + Call(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Give) + Wait(60 * DT) + Call(GetNpcPos, NPC_Herringway, LVar0, LVar1, LVar2) + Add(LVar2, -5) + Call(NpcMoveTo, NPC_Herringway, LVar0, LVar2, 0) + Call(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Idle) + Call(SetNpcAnimation, NPC_Herringway, ANIM_Herringway_Recieve) + Call(SpeakToNpc, NPC_Herringway, ANIM_Herringway_TalkCarry, ANIM_Herringway_IdleCarry, 0, NPC_MayorPenguin, MSG_CH7_002E) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(20 * DT) + Call(InterpNpcYaw, NPC_MayorPenguin, 0, 0) + Call(InterpNpcYaw, NPC_MayorPenguinWife, 0, 0) + Call(InterpNpcYaw, NPC_Herringway, 0, 0) + Call(PlayerFaceNpc, NPC_PenguinPatrol, FALSE) + Call(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_002F) + Call(GetNpcPos, NPC_Herringway, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.3 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Wait(10 * DT) + Call(SetNpcSpeed, NPC_MayorPenguin, Float(3.0 / DT)) + Call(SetNpcFlagBits, NPC_MayorPenguin, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Walk) + Call(NpcMoveTo, NPC_MayorPenguin, -249, -109, 0) + Call(SetNpcAnimation, NPC_MayorPenguin, ANIM_MayorPenguin_Idle) + Loop(100) + Call(GetAngleBetweenNPCs, NPC_MayorPenguin, NPC_PenguinPatrol, LVar0) + Call(InterpNpcYaw, NPC_MayorPenguin, LVar0, 0) + Wait(1) + EndLoop + EndThread + Thread + Loop(100) + Call(GetAngleBetweenNPCs, NPC_MayorPenguinWife, NPC_PenguinPatrol, LVar0) + Call(InterpNpcYaw, NPC_MayorPenguinWife, LVar0, 0) + Call(PlayerFaceNpc, NPC_PenguinPatrol, FALSE) + Wait(1) + EndLoop + EndThread + Call(SetNpcFlagBits, NPC_PenguinPatrol, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcSpeed, NPC_PenguinPatrol, Float(3.0 / DT)) + Call(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Walk) + Call(NpcMoveTo, NPC_PenguinPatrol, -210, -80, 0) + Call(NpcMoveTo, NPC_PenguinPatrol, -250, -10, 0) + Call(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Idle) + Call(SetNpcFlagBits, NPC_PenguinPatrol, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + ExecWait(N(EVS_OpenMayorsOfficeDoor)) + Call(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Walk) + Call(NpcMoveTo, NPC_PenguinPatrol, -250, 50, 0) + Call(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Idle) + Call(SpeakToPlayer, NPC_MayorPenguin, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, MSG_CH7_0030) + Call(SpeakToPlayer, NPC_Herringway, ANIM_Herringway_TalkCarry, ANIM_Herringway_IdleCarry, 0, MSG_CH7_0031) + ExecGetTID(N(EVS_HerringwayCarryPresent), LVarA) + Call(SetNpcSpeed, NPC_Herringway, Float(3.0 / DT)) + Call(SetNpcAnimation, NPC_Herringway, ANIM_Herringway_WalkCarry) + Call(NpcMoveTo, NPC_Herringway, -250, 50, 0) + Call(SetNpcAnimation, NPC_Herringway, ANIM_Herringway_IdleCarry) + KillThread(LVarA) + Call(RemoveItemEntity, MV_PresentItemID) + ExecWait(N(EVS_CloseMayorsOfficeDoor)) + Set(GB_StoryProgress, STORY_CH7_MAYOR_MURDER_SOLVED) + Exec(N(EVS_SetupMusic)) + Wait(30 * DT) + Call(SpeakToPlayer, NPC_MayorPenguin, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 5, MSG_CH7_0032) + Call(GetNpcPos, NPC_MayorPenguin, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(250.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(30 * DT) + Call(SpeakToPlayer, NPC_MayorPenguin, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, MSG_CH7_0033) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(1) + Call(SpeakToPlayer, NPC_MayorPenguin, ANIM_MayorPenguin_Talk, ANIM_MayorPenguin_Idle, 0, MSG_CH7_0034) + Call(SetNpcFlagBits, NPC_MayorPenguin, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcPos, NPC_PenguinPatrol, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_Herringway, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_Herringway, NPC_FLAG_INACTIVE, TRUE) + Call(EnableNpcShadow, NPC_Herringway, FALSE) + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Set(MV_DialogueState_Penguin1, 0) + Set(MV_DialogueState_Penguin2, 0) + Set(MV_DialogueState_Penguin3, 0) + Set(MV_DialogueState_Penguin4, 0) + Call(SetNpcFlagBits, NPC_MayorPenguin, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(SetNpcFlagBits, NPC_MayorPenguinWife, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(SetNpcPos, NPC_Penguin_09, NPC_DISPOSE_LOCATION) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_sam/sam_01/sam_01_6_entity.c b/src/world/area_sam/sam_01/sam_01_6_entity.c index 669f29e2f95..99e6e252e62 100644 --- a/src/world/area_sam/sam_01/sam_01_6_entity.c +++ b/src/world/area_sam/sam_01/sam_01_6_entity.c @@ -8,18 +8,18 @@ EvtScript N(EVS_OpenChest_AttackFXE) = EVT_OPEN_CHEST_BADGE(ITEM_ATTACK_FX_E, GF #define NAME_SUFFIX EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 95, 0, -180, 270, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_SAM01_Chest_AttackFXE) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenChest_AttackFXE_Entity))) - EVT_CALL(SetEntityCullMode, 1) - EVT_IF_LT(GB_StoryProgress, STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(MakeItemEntity, ITEM_PRESENT, -325, 0, -240, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(MV_PresentItemID, LVar0) - EVT_END_IF - EVT_CALL(MakeItemEntity, ITEM_SNOWMAN_BUCKET, NPC_DISPOSE_LOCATION, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(MV_BucketItemID, LVar0) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), -110, 0, 0, 0, MODEL_o341, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_SAM01_HiddenPanel) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Chest), 95, 0, -180, 270, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_SAM01_Chest_AttackFXE) + Call(AssignScript, Ref(N(EVS_OpenChest_AttackFXE_Entity))) + Call(SetEntityCullMode, 1) + IfLt(GB_StoryProgress, STORY_CH7_MAYOR_MURDER_SOLVED) + Call(MakeItemEntity, ITEM_PRESENT, -325, 0, -240, ITEM_SPAWN_MODE_DECORATION, 0) + Set(MV_PresentItemID, LVar0) + EndIf + Call(MakeItemEntity, ITEM_SNOWMAN_BUCKET, NPC_DISPOSE_LOCATION, ITEM_SPAWN_MODE_DECORATION, 0) + Set(MV_BucketItemID, LVar0) + Call(MakeEntity, Ref(Entity_HiddenPanel), -110, 0, 0, 0, MODEL_o341, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_SAM01_HiddenPanel) + Return + End }; diff --git a/src/world/area_sam/sam_02/sam_02_1_music.c b/src/world/area_sam/sam_02/sam_02_1_music.c index 2be18a13f61..704abecc999 100644 --- a/src/world/area_sam/sam_02/sam_02_1_music.c +++ b/src/world/area_sam/sam_02/sam_02_1_music.c @@ -1,20 +1,20 @@ #include "sam_02.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_CALL(SetMusicTrack, 0, SONG_SHIVER_CITY, 0, 8) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(SetMusicTrack, 0, SONG_PENGUIN_MYSTERY, 0, 8) - EVT_CASE_GE(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(SetMusicTrack, 0, SONG_SHIVER_CITY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + Call(SetMusicTrack, 0, SONG_SHIVER_CITY, 0, 8) + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(SetMusicTrack, 0, SONG_PENGUIN_MYSTERY, 0, 8) + CaseGe(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(SetMusicTrack, 0, SONG_SHIVER_CITY, 0, 8) + EndSwitch + Return + End }; EvtScript N(EVS_PlayRestingSong) = { - EVT_CALL(SetMusicTrack, 0, SONG_TAKING_REST, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TAKING_REST, 0, 8) + Return + End }; diff --git a/src/world/area_sam/sam_02/sam_02_2_main.c b/src/world/area_sam/sam_02/sam_02_2_main.c index 74da5eed9f3..6a2d11f5a1a 100644 --- a/src/world/area_sam/sam_02/sam_02_2_main.c +++ b/src/world/area_sam/sam_02/sam_02_2_main.c @@ -37,129 +37,129 @@ EvtScript N(EVS_ExitWalk_sam_01_0) = EVT_EXIT_WALK(60, sam_02_ENTRY_0, "sam_01", EvtScript N(EVS_ExitWalk_sam_11_0) = EVT_EXIT_WALK(60, sam_02_ENTRY_1, "sam_11", sam_11_ENTRY_0); EvtScript N(EVS_GotoMap_tik_17_1) = { - EVT_CALL(GotoMap, EVT_PTR("tik_17"), tik_17_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("tik_17"), tik_17_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitPipe_tik_17_1) = EVT_EXIT_PIPE_VERTICAL(sam_02_ENTRY_2, COLLIDER_ttd, N(EVS_GotoMap_tik_17_1)); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sam_01_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sam_11_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_IF_LT(GB_StoryProgress, STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitPipe_tik_17_1)), TRIGGER_FLOOR_TOUCH, COLLIDER_ttd, 1, 0) - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitPipe_tik_17_1)), TRIGGER_FLOOR_TOUCH, COLLIDER_ttd, 1, 0) - EVT_END_IF - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sam_01_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sam_11_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + IfLt(GB_StoryProgress, STORY_CH7_MAYOR_MURDER_MYSTERY) + BindTrigger(Ref(N(EVS_ExitPipe_tik_17_1)), TRIGGER_FLOOR_TOUCH, COLLIDER_ttd, 1, 0) + EndIf + IfGe(GB_StoryProgress, STORY_CH7_MAYOR_MURDER_SOLVED) + BindTrigger(Ref(N(EVS_ExitPipe_tik_17_1)), TRIGGER_FLOOR_TOUCH, COLLIDER_ttd, 1, 0) + EndIf + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(sam_02_ENTRY_2) - EVT_IF_EQ(GF_SAM01_Visited, FALSE) - EVT_SET(GF_SAM01_Visited, TRUE) - EVT_SET(GB_StoryProgress, STORY_CH7_ARRIVED_AT_SHIVER_CITY) - EVT_END_IF + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(sam_02_ENTRY_2) + IfEq(GF_SAM01_Visited, FALSE) + Set(GF_SAM01_Visited, TRUE) + Set(GB_StoryProgress, STORY_CH7_ARRIVED_AT_SHIVER_CITY) + EndIf EVT_ENTER_PIPE_VERTICAL(N(EVS_BindExitTriggers)) - EVT_WAIT(1) - EVT_CASE_EQ(sam_02_ENTRY_3) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(SetPlayerPos, 650, 0, 50) - EVT_WAIT(1) - EVT_THREAD - EVT_CALL(PlaySoundAtPlayer, SOUND_FALL_LONG, SOUND_SPACE_DEFAULT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Thrown) - EVT_CALL(PlayerJump1, 450, 0, 50, 30) - EVT_CALL(PlaySoundAtPlayer, SOUND_TRIP, SOUND_SPACE_DEFAULT) - EVT_CALL(PlayerJump1, 440, 0, 50, 5) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 3, EVT_FLOAT(1.0)) - EVT_WAIT(30) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_DustOff) - EVT_WAIT(7) - EVT_CALL(PlaySoundAtPlayer, SOUND_DUST_OFF, SOUND_SPACE_DEFAULT) - EVT_WAIT(8) - EVT_CALL(PlaySoundAtPlayer, SOUND_DUST_OFF, SOUND_SPACE_DEFAULT) - EVT_WAIT(15) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(1) - EVT_EXEC_WAIT(N(EVS_BindExitTriggers)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_END_THREAD - EVT_CASE_DEFAULT - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Wait(1) + CaseEq(sam_02_ENTRY_3) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerJumpscale, Float(1.0)) + Call(SetPlayerPos, 650, 0, 50) + Wait(1) + Thread + Call(PlaySoundAtPlayer, SOUND_FALL_LONG, SOUND_SPACE_DEFAULT) + Call(SetPlayerAnimation, ANIM_MarioW2_Thrown) + Call(PlayerJump1, 450, 0, 50, 30) + Call(PlaySoundAtPlayer, SOUND_TRIP, SOUND_SPACE_DEFAULT) + Call(PlayerJump1, 440, 0, 50, 5) + Call(ShakeCam, CAM_DEFAULT, 0, 3, Float(1.0)) + Wait(30) + Call(SetPlayerAnimation, ANIM_Mario1_DustOff) + Wait(7) + Call(PlaySoundAtPlayer, SOUND_DUST_OFF, SOUND_SPACE_DEFAULT) + Wait(8) + Call(PlaySoundAtPlayer, SOUND_DUST_OFF, SOUND_SPACE_DEFAULT) + Wait(15) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(1) + ExecWait(N(EVS_BindExitTriggers)) + Call(DisablePlayerInput, FALSE) + Call(DisablePlayerPhysics, FALSE) + EndThread + CaseDefault + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + EndSwitch + Return + End }; #include "../common/ManageSnowfall.inc.c" EvtScript N(EVS_TexPan_Fire) = { - EVT_CALL(EnableTexPanning, MODEL_hi1, TRUE) - EVT_THREAD + Call(EnableTexPanning, MODEL_hi1, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 50, 50, -70, 300) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHIVER_CITY) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_SET(GF_MAP_ShiverCity, TRUE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(MysteryNPCs))) - EVT_CASE_GE(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_ManageSnowfall)) - EVT_EXEC(N(EVS_TexPan_Fire)) - EVT_EXEC_WAIT(N(EVS_SetupRooms)) - EVT_EXEC_WAIT(N(EVS_SetupShop)) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_ki, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o505, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_kabe, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_tumori, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o506, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o507, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o508, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o523, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o524, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilie, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deiliw, SURFACE_TYPE_SNOW) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_SHIVER_CITY) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Set(GF_MAP_ShiverCity, TRUE) + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(MakeNpcs, FALSE, Ref(N(MysteryNPCs))) + CaseGe(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + EndSwitch + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupMusic)) + Exec(N(EVS_ManageSnowfall)) + Exec(N(EVS_TexPan_Fire)) + ExecWait(N(EVS_SetupRooms)) + ExecWait(N(EVS_SetupShop)) + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_ki, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o505, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_kabe, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_tumori, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o506, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o507, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o508, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o523, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o524, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilie, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deiliw, SURFACE_TYPE_SNOW) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_sam/sam_02/sam_02_3_rooms.c b/src/world/area_sam/sam_02/sam_02_3_rooms.c index cf5dcb45ab8..63109a2c13f 100644 --- a/src/world/area_sam/sam_02/sam_02_3_rooms.c +++ b/src/world/area_sam/sam_02/sam_02_3_rooms.c @@ -1,110 +1,110 @@ #include "sam_02.h" EvtScript N(EVS_SetDoorRot_LeftHouse) = { - EVT_CALL(RotateModel, MODEL_c_doa, LVar0, 0, -1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_c_doa, LVar0, 0, -1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_LeftHouse) = { - EVT_CALL(RotateGroup, MODEL_mc_sita, LVar0, 1, 0, 0) - EVT_IF_GT(LVar0, 89) - EVT_CALL(SetGroupVisibility, MODEL_mc_sita, MODEL_GROUP_HIDDEN) - EVT_END_IF - EVT_IF_LT(LVar0, 89) - EVT_CALL(SetGroupVisibility, MODEL_mc_sita, MODEL_GROUP_VISIBLE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(RotateGroup, MODEL_mc_sita, LVar0, 1, 0, 0) + IfGt(LVar0, 89) + Call(SetGroupVisibility, MODEL_mc_sita, MODEL_GROUP_HIDDEN) + EndIf + IfLt(LVar0, 89) + Call(SetGroupVisibility, MODEL_mc_sita, MODEL_GROUP_VISIBLE) + EndIf + Return + End }; EvtScript N(EVS_DropDoor_LeftHouse) = { - EVT_CALL(RotateModel, MODEL_c_doa, LVar0, 1, 0, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_c_doa, LVar0, 1, 0, 0) + Return + End }; EvtScript N(EVS_RoomListener_LeftHouse) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_SET(AF_SAM_Snowing, FALSE) - EVT_CALL(SetGroupVisibility, MODEL_m_naiso, MODEL_GROUP_VISIBLE) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_SET(AF_SAM_Snowing, TRUE) - EVT_CALL(SetGroupVisibility, MODEL_m_naiso, MODEL_GROUP_HIDDEN) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Set(AF_SAM_Snowing, FALSE) + Call(SetGroupVisibility, MODEL_m_naiso, MODEL_GROUP_VISIBLE) + CaseEq(ROOM_UPDATE_EXIT_END) + Set(AF_SAM_Snowing, TRUE) + Call(SetGroupVisibility, MODEL_m_naiso, MODEL_GROUP_HIDDEN) + EndSwitch + Return + End }; EvtScript N(EVS_SetDoorRot_Shop) = { - EVT_CALL(RotateModel, MODEL_o382, LVar0, 0, -1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o382, LVar0, 0, -1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_Shop) = { - EVT_CALL(RotateGroup, MODEL_t_ue, LVar0, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_t_sita, LVar0, 0, 0, -1) - EVT_IF_GT(LVar0, 89) - EVT_CALL(SetGroupVisibility, MODEL_t_sita, MODEL_GROUP_HIDDEN) - EVT_END_IF - EVT_IF_LT(LVar0, 89) - EVT_CALL(SetGroupVisibility, MODEL_t_sita, MODEL_GROUP_VISIBLE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(RotateGroup, MODEL_t_ue, LVar0, 0, 0, 1) + Call(RotateGroup, MODEL_t_sita, LVar0, 0, 0, -1) + IfGt(LVar0, 89) + Call(SetGroupVisibility, MODEL_t_sita, MODEL_GROUP_HIDDEN) + EndIf + IfLt(LVar0, 89) + Call(SetGroupVisibility, MODEL_t_sita, MODEL_GROUP_VISIBLE) + EndIf + Return + End }; EvtScript N(EVS_RoomListener_Shop) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_SET(AF_SAM_Snowing, FALSE) - EVT_CALL(SetGroupVisibility, MODEL_t_naiso, MODEL_GROUP_VISIBLE) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_BEGIN) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CASE_GE(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_END_SWITCH - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_SET(AF_SAM_Snowing, TRUE) - EVT_CALL(SetGroupVisibility, MODEL_t_naiso, MODEL_GROUP_HIDDEN) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Set(AF_SAM_Snowing, FALSE) + Call(SetGroupVisibility, MODEL_t_naiso, MODEL_GROUP_VISIBLE) + CaseEq(ROOM_UPDATE_EXIT_BEGIN) + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + CaseGe(STORY_CH7_MAYOR_MURDER_SOLVED) + EndSwitch + CaseEq(ROOM_UPDATE_EXIT_END) + Set(AF_SAM_Snowing, TRUE) + Call(SetGroupVisibility, MODEL_t_naiso, MODEL_GROUP_HIDDEN) + EndSwitch + Return + End }; EvtScript N(EVS_SetDoorRot_ToadHouse) = { - EVT_CALL(RotateModel, MODEL_k_doa, LVar0, 0, -1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_k_doa, LVar0, 0, -1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_ToadHouse) = { - EVT_CALL(RotateGroup, MODEL_mk_ue, LVar0, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_mk_sita, LVar0, 0, 0, -1) - EVT_IF_GT(LVar0, 89) - EVT_CALL(SetGroupVisibility, MODEL_mk_sita, MODEL_GROUP_HIDDEN) - EVT_END_IF - EVT_IF_LT(LVar0, 89) - EVT_CALL(SetGroupVisibility, MODEL_mk_sita, MODEL_GROUP_VISIBLE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(RotateGroup, MODEL_mk_ue, LVar0, 0, 0, 1) + Call(RotateGroup, MODEL_mk_sita, LVar0, 0, 0, -1) + IfGt(LVar0, 89) + Call(SetGroupVisibility, MODEL_mk_sita, MODEL_GROUP_HIDDEN) + EndIf + IfLt(LVar0, 89) + Call(SetGroupVisibility, MODEL_mk_sita, MODEL_GROUP_VISIBLE) + EndIf + Return + End }; EvtScript N(EVS_RoomListener_ToadHouse) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_SET(AF_SAM_Snowing, FALSE) - EVT_CALL(SetGroupVisibility, MODEL_k_naisou, MODEL_GROUP_VISIBLE) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_SET(AF_SAM_Snowing, TRUE) - EVT_CALL(SetGroupVisibility, MODEL_k_naisou, MODEL_GROUP_HIDDEN) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Set(AF_SAM_Snowing, FALSE) + Call(SetGroupVisibility, MODEL_k_naisou, MODEL_GROUP_VISIBLE) + CaseEq(ROOM_UPDATE_EXIT_END) + Set(AF_SAM_Snowing, TRUE) + Call(SetGroupVisibility, MODEL_k_naisou, MODEL_GROUP_HIDDEN) + EndSwitch + Return + End }; s32 N(InteriorNPCs_LeftHouse)[] = { @@ -124,41 +124,41 @@ s32 N(InteriorNPCs_ToadHouse)[] = { EvtScript N(EVS_SetupRooms) = { // left house - EVT_CALL(SetGroupVisibility, MODEL_m_naiso, MODEL_GROUP_HIDDEN) - EVT_CALL(CreateMapRoom, + Call(SetGroupVisibility, MODEL_m_naiso, MODEL_GROUP_HIDDEN) + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_LEFT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_LeftHouse)), - EVT_PTR(N(EVS_SetWallRot_LeftHouse)), - EVT_PTR(N(EVS_DropDoor_LeftHouse)), - EVT_PTR(N(EVS_RoomListener_LeftHouse)), + Ref(N(EVS_SetDoorRot_LeftHouse)), + Ref(N(EVS_SetWallRot_LeftHouse)), + Ref(N(EVS_DropDoor_LeftHouse)), + Ref(N(EVS_RoomListener_LeftHouse)), COLLIDER_c_doa, COLLIDER_o470, MODEL_min, - EVT_PTR(N(InteriorNPCs_LeftHouse))) + Ref(N(InteriorNPCs_LeftHouse))) // shop - EVT_CALL(SetGroupVisibility, MODEL_t_naiso, MODEL_GROUP_HIDDEN) - EVT_CALL(CreateMapRoom, + Call(SetGroupVisibility, MODEL_t_naiso, MODEL_GROUP_HIDDEN) + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_1, ROOM_DOOR_LEFT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_Shop)), - EVT_PTR(N(EVS_SetWallRot_Shop)), + Ref(N(EVS_SetDoorRot_Shop)), + Ref(N(EVS_SetWallRot_Shop)), NULL, - EVT_PTR(N(EVS_RoomListener_Shop)), + Ref(N(EVS_RoomListener_Shop)), COLLIDER_o382, COLLIDER_o471, MODEL_ten, - EVT_PTR(N(InteriorNPCs_Shop))) + Ref(N(InteriorNPCs_Shop))) // toad house - EVT_CALL(SetGroupVisibility, MODEL_k_naisou, MODEL_GROUP_HIDDEN) - EVT_CALL(CreateMapRoom, + Call(SetGroupVisibility, MODEL_k_naisou, MODEL_GROUP_HIDDEN) + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_LEFT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_ToadHouse)), - EVT_PTR(N(EVS_SetWallRot_ToadHouse)), + Ref(N(EVS_SetDoorRot_ToadHouse)), + Ref(N(EVS_SetWallRot_ToadHouse)), NULL, - EVT_PTR(N(EVS_RoomListener_ToadHouse)), + Ref(N(EVS_RoomListener_ToadHouse)), COLLIDER_k_doa, COLLIDER_o472, MODEL_kino, - EVT_PTR(N(InteriorNPCs_ToadHouse))) - EVT_RETURN - EVT_END + Ref(N(InteriorNPCs_ToadHouse))) + Return + End }; diff --git a/src/world/area_sam/sam_02/sam_02_4_npc.c b/src/world/area_sam/sam_02/sam_02_4_npc.c index a57dd2dd66e..9f2f2c77d44 100644 --- a/src/world/area_sam/sam_02/sam_02_4_npc.c +++ b/src/world/area_sam/sam_02/sam_02_4_npc.c @@ -20,359 +20,359 @@ #include "world/common/complete/Quizmo.inc.c" EvtScript N(EVS_NpcInteract_Penguin_ShopOwner) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_EXEC_WAIT(EVS_ShopOwnerDialog) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_006A) - EVT_CASE_GE(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_EXEC_WAIT(EVS_ShopOwnerDialog) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + ExecWait(EVS_ShopOwnerDialog) + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_006A) + CaseGe(STORY_CH7_MAYOR_MURDER_SOLVED) + ExecWait(EVS_ShopOwnerDialog) + EndSwitch + Return + End }; EvtScript N(EVS_NpcIdle_Penguin_ShopOwner) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_ToadHouse_SetDialogue) = { - EVT_SET(LVar0, MSG_CH7_006B) - EVT_SET(LVar8, MSG_CH7_006C) - EVT_SET(LVar1, MSG_CH7_006D) - EVT_SET(LVar2, MSG_CH7_006E) - EVT_SET(LVar3, MSG_CH7_006F) - EVT_IF_GE(GB_StoryProgress, STORY_CH7_UNLOCKED_SHIVER_MOUNTAIN) - EVT_IF_LT(GB_StoryProgress, STORY_CH8_OPENED_PATH_TO_STAR_WAY) - EVT_IF_EQ(GF_SAM02_MushroomPresents, FALSE) - EVT_SET(LVar3, MSG_CH7_0070) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVar0, MSG_CH7_006B) + Set(LVar8, MSG_CH7_006C) + Set(LVar1, MSG_CH7_006D) + Set(LVar2, MSG_CH7_006E) + Set(LVar3, MSG_CH7_006F) + IfGe(GB_StoryProgress, STORY_CH7_UNLOCKED_SHIVER_MOUNTAIN) + IfLt(GB_StoryProgress, STORY_CH8_OPENED_PATH_TO_STAR_WAY) + IfEq(GF_SAM02_MushroomPresents, FALSE) + Set(LVar3, MSG_CH7_0070) + EndIf + EndIf + EndIf + Return + End }; EvtScript N(EVS_ToadHouse_GetInBed) = { - EVT_EXEC(N(EVS_PlayRestingSong)) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, 294, -213, 0) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(N(ToadHouse_CamSetFOV), 0, 40) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 65, -36) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 111) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 549, -5) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 315, -171) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 23) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_CALL(PlayerMoveTo, 274, -270, 0) - EVT_CALL(InterpPlayerYaw, 229, 1) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetPlayerImgFXFlags, IMGFX_FLAG_800) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_GET_IN_BED, 1, 1, 0) - EVT_THREAD - EVT_WAIT(60) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) - EVT_END_THREAD - EVT_WAIT(20) - EVT_THREAD - EVT_WAIT(81) - EVT_CALL(N(ToadHouse_CamSetFOV), 0, 25) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_PlayRestingSong)) + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, 294, -213, 0) + Thread + Wait(15) + Call(N(ToadHouse_CamSetFOV), 0, 40) + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamPitch, CAM_DEFAULT, 65, -36) + Call(SetCamDistance, CAM_DEFAULT, 111) + Call(SetCamPosA, CAM_DEFAULT, 549, -5) + Call(SetCamPosB, CAM_DEFAULT, 315, -171) + Call(SetCamPosC, CAM_DEFAULT, 0, 23) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Call(PlayerMoveTo, 274, -270, 0) + Call(InterpPlayerYaw, 229, 1) + Call(HidePlayerShadow, TRUE) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetPlayerImgFXFlags, IMGFX_FLAG_800) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_GET_IN_BED, 1, 1, 0) + Thread + Wait(60) + Call(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) + EndThread + Wait(20) + Thread + Wait(81) + Call(N(ToadHouse_CamSetFOV), 0, 25) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + EndThread + Return + End }; EvtScript N(EVS_ToadHouse_ReturnFromRest) = { - EVT_IF_EQ(GF_SAM02_Item_IcedPotato, TRUE) - EVT_SET(MF_SkipIcedPotato, FALSE) - EVT_SET(GF_SAM02_Item_IcedPotato, FALSE) - EVT_END_IF - EVT_IF_EQ(MF_SkipIcedPotato, FALSE) - EVT_SET(MF_SkipIcedPotato, TRUE) - EVT_CALL(MakeItemEntity, ITEM_ICED_POTATO, 349, 25, -280, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SAM02_Item_IcedPotato) - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH7_UNLOCKED_SHIVER_MOUNTAIN) - EVT_IF_LT(GB_StoryProgress, STORY_CH8_OPENED_PATH_TO_STAR_WAY) - EVT_IF_EQ(GF_SAM02_MushroomPresents, FALSE) - EVT_SET(GF_SAM02_MushroomPresents, TRUE) - EVT_EXEC(N(EVS_MakeToadHouseGifts)) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(HidePlayerShadow, FALSE) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetPlayerPos, 277, 0, -256) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, 336, -199, 0) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + IfEq(GF_SAM02_Item_IcedPotato, TRUE) + Set(MF_SkipIcedPotato, FALSE) + Set(GF_SAM02_Item_IcedPotato, FALSE) + EndIf + IfEq(MF_SkipIcedPotato, FALSE) + Set(MF_SkipIcedPotato, TRUE) + Call(MakeItemEntity, ITEM_ICED_POTATO, 349, 25, -280, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SAM02_Item_IcedPotato) + EndIf + IfGe(GB_StoryProgress, STORY_CH7_UNLOCKED_SHIVER_MOUNTAIN) + IfLt(GB_StoryProgress, STORY_CH8_OPENED_PATH_TO_STAR_WAY) + IfEq(GF_SAM02_MushroomPresents, FALSE) + Set(GF_SAM02_MushroomPresents, TRUE) + Exec(N(EVS_MakeToadHouseGifts)) + EndIf + EndIf + EndIf + Call(HidePlayerShadow, FALSE) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetPlayerPos, 277, 0, -256) + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, 336, -199, 0) + Exec(N(EVS_SetupMusic)) + Return + End }; EvtScript N(EVS_NpcInteract_Penguin_02) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_SWITCH(MV_DialogueState_Penguin2) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0071) - EVT_SET(MV_DialogueState_Penguin2, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0072) - EVT_SET(MV_DialogueState_Penguin2, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_SWITCH(MV_DialogueState_Penguin2) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0073) - EVT_SET(MV_DialogueState_Penguin2, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0074) - EVT_SET(MV_DialogueState_Penguin2, 0) - EVT_END_SWITCH - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0075) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + Switch(MV_DialogueState_Penguin2) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0071) + Set(MV_DialogueState_Penguin2, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0072) + Set(MV_DialogueState_Penguin2, 0) + EndSwitch + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Switch(MV_DialogueState_Penguin2) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0073) + Set(MV_DialogueState_Penguin2, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0074) + Set(MV_DialogueState_Penguin2, 0) + EndSwitch + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0075) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Penguin_03) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_SWITCH(MV_DialogueState_Penguin3) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0076) - EVT_SET(MV_DialogueState_Penguin3, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0077) - EVT_SET(MV_DialogueState_Penguin3, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_SWITCH(MV_DialogueState_Penguin3) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0078) - EVT_SET(MV_DialogueState_Penguin3, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0079) - EVT_SET(MV_DialogueState_Penguin3, 0) - EVT_END_SWITCH - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_007A) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + Switch(MV_DialogueState_Penguin3) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0076) + Set(MV_DialogueState_Penguin3, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0077) + Set(MV_DialogueState_Penguin3, 0) + EndSwitch + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Switch(MV_DialogueState_Penguin3) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0078) + Set(MV_DialogueState_Penguin3, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0079) + Set(MV_DialogueState_Penguin3, 0) + EndSwitch + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_007A) + EndSwitch + Return + End }; EvtScript N(EVS_NpcIdle_Penguin_04) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInteract_Penguin_04) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_SWITCH(MV_DialogueState_Penguin4) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_007B) - EVT_SET(MV_DialogueState_Penguin4, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_007C) - EVT_SET(MV_DialogueState_Penguin4, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_SWITCH(MV_DialogueState_Penguin4) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_007D) - EVT_SET(MV_DialogueState_Penguin4, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_007E) - EVT_SET(MV_DialogueState_Penguin4, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_SWITCH(MV_DialogueState_Penguin4) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_007F) - EVT_SET(MV_DialogueState_Penguin4, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0080) - EVT_SET(MV_DialogueState_Penguin4, 0) - EVT_END_SWITCH - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0081) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + Switch(MV_DialogueState_Penguin4) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_007B) + Set(MV_DialogueState_Penguin4, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_007C) + Set(MV_DialogueState_Penguin4, 0) + EndSwitch + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Switch(MV_DialogueState_Penguin4) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_007D) + Set(MV_DialogueState_Penguin4, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_007E) + Set(MV_DialogueState_Penguin4, 0) + EndSwitch + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Switch(MV_DialogueState_Penguin4) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_007F) + Set(MV_DialogueState_Penguin4, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0080) + Set(MV_DialogueState_Penguin4, 0) + EndSwitch + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0081) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Penguin_05) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_SWITCH(MV_DialogueState_Penguin5) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0082) - EVT_SET(MV_DialogueState_Penguin5, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0083) - EVT_SET(MV_DialogueState_Penguin5, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_SWITCH(MV_DialogueState_Penguin5) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0084) - EVT_SET(MV_DialogueState_Penguin5, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0085) - EVT_SET(MV_DialogueState_Penguin5, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_SWITCH(MV_DialogueState_Penguin5) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0086) - EVT_SET(MV_DialogueState_Penguin5, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0087) - EVT_SET(MV_DialogueState_Penguin5, 0) - EVT_END_SWITCH - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0088) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + Switch(MV_DialogueState_Penguin5) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0082) + Set(MV_DialogueState_Penguin5, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0083) + Set(MV_DialogueState_Penguin5, 0) + EndSwitch + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Switch(MV_DialogueState_Penguin5) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0084) + Set(MV_DialogueState_Penguin5, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0085) + Set(MV_DialogueState_Penguin5, 0) + EndSwitch + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Switch(MV_DialogueState_Penguin5) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0086) + Set(MV_DialogueState_Penguin5, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0087) + Set(MV_DialogueState_Penguin5, 0) + EndSwitch + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0088) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Penguin_06) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_SWITCH(MV_DialogueState_Penguin6) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0089) - EVT_SET(MV_DialogueState_Penguin6, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_008A) - EVT_SET(MV_DialogueState_Penguin6, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_SWITCH(MV_DialogueState_Penguin6) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_008B) - EVT_SET(MV_DialogueState_Penguin6, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_008C) - EVT_SET(MV_DialogueState_Penguin6, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_SWITCH(MV_DialogueState_Penguin6) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_008D) - EVT_SET(MV_DialogueState_Penguin6, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_008E) - EVT_SET(MV_DialogueState_Penguin6, 0) - EVT_END_SWITCH - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_008F) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + Switch(MV_DialogueState_Penguin6) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0089) + Set(MV_DialogueState_Penguin6, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_008A) + Set(MV_DialogueState_Penguin6, 0) + EndSwitch + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Switch(MV_DialogueState_Penguin6) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_008B) + Set(MV_DialogueState_Penguin6, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_008C) + Set(MV_DialogueState_Penguin6, 0) + EndSwitch + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Switch(MV_DialogueState_Penguin6) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_008D) + Set(MV_DialogueState_Penguin6, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_008E) + Set(MV_DialogueState_Penguin6, 0) + EndSwitch + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_008F) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Penguin_07) = { - EVT_CALL(FindKeyItem, ITEM_FIRST_DEGREE_CARD, LVar1) - EVT_CALL(FindKeyItem, ITEM_SECOND_DEGREE_CARD, LVar2) - EVT_CALL(FindKeyItem, ITEM_THIRD_DEGREE_CARD, LVar3) - EVT_CALL(FindKeyItem, ITEM_FOURTH_DEGREE_CARD, LVar4) - EVT_CALL(FindKeyItem, ITEM_DIPLOMA, LVar5) - EVT_IF_NE(LVar1, -1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0091) - EVT_RETURN - EVT_END_IF - EVT_IF_NE(LVar2, -1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0092) - EVT_RETURN - EVT_END_IF - EVT_IF_NE(LVar3, -1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0093) - EVT_RETURN - EVT_END_IF - EVT_IF_NE(LVar4, -1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0094) - EVT_RETURN - EVT_END_IF - EVT_IF_NE(LVar5, -1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0095) - EVT_RETURN - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0090) - EVT_RETURN - EVT_END + Call(FindKeyItem, ITEM_FIRST_DEGREE_CARD, LVar1) + Call(FindKeyItem, ITEM_SECOND_DEGREE_CARD, LVar2) + Call(FindKeyItem, ITEM_THIRD_DEGREE_CARD, LVar3) + Call(FindKeyItem, ITEM_FOURTH_DEGREE_CARD, LVar4) + Call(FindKeyItem, ITEM_DIPLOMA, LVar5) + IfNe(LVar1, -1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0091) + Return + EndIf + IfNe(LVar2, -1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0092) + Return + EndIf + IfNe(LVar3, -1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0093) + Return + EndIf + IfNe(LVar4, -1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0094) + Return + EndIf + IfNe(LVar5, -1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0095) + Return + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0090) + Return + End }; EvtScript N(EVS_NpcInit_Penguin_ShopOwner) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Penguin_ShopOwner))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Penguin_ShopOwner))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Penguin_ShopOwner))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Penguin_ShopOwner))) + Return + End }; EvtScript N(EVS_NpcInit_ShiverToad) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ToadHouseKeeper))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ToadHouseKeeper))) + Return + End }; EvtScript N(EVS_NpcInit_Penguin_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Penguin_02))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Penguin_02))) + Return + End }; EvtScript N(EVS_NpcInit_Penguin_03) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Penguin_03))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Penguin_03))) + Return + End }; EvtScript N(EVS_NpcInit_Penguin_04) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Penguin_04))) - EVT_IF_GE(GB_StoryProgress, STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_IF_LT(GB_StoryProgress, STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(SetNpcPos, NPC_SELF, 0, 30, 280) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Penguin_04))) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Penguin_04))) + IfGe(GB_StoryProgress, STORY_CH7_MAYOR_MURDER_MYSTERY) + IfLt(GB_StoryProgress, STORY_CH7_MAYOR_MURDER_SOLVED) + Call(SetNpcPos, NPC_SELF, 0, 30, 280) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Penguin_04))) + EndIf + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Penguin_05) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Penguin_05))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Penguin_05))) + Return + End }; EvtScript N(EVS_NpcInit_Penguin_06) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Penguin_06))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Penguin_06))) + Return + End }; EvtScript N(EVS_NpcInit_Penguin_07) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Penguin_07))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Penguin_07))) + Return + End }; NpcData N(NpcData_Townsfolk)[] = { diff --git a/src/world/area_sam/sam_02/sam_02_5_entity.c b/src/world/area_sam/sam_02/sam_02_5_entity.c index 608b599d321..b68e0a69af4 100644 --- a/src/world/area_sam/sam_02/sam_02_5_entity.c +++ b/src/world/area_sam/sam_02/sam_02_5_entity.c @@ -2,20 +2,20 @@ #include "entity.h" EvtScript N(EVS_MakeToadHouseGifts) = { - EVT_IF_EQ(GF_SAM02_MushroomPresents, TRUE) - EVT_CALL(MakeItemEntity, ITEM_ULTRA_SHROOM, 350, 0, -120, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SAM02_Item_UltraShroom) - EVT_CALL(MakeItemEntity, ITEM_MUSHROOM, 330, 0, -100, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SAM02_Item_MushroomA) - EVT_CALL(MakeItemEntity, ITEM_MUSHROOM, 330, 0, -140, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SAM02_Item_MushroomB) - EVT_CALL(MakeItemEntity, ITEM_MUSHROOM, 370, 0, -100, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SAM02_Item_MushroomC) - EVT_CALL(MakeItemEntity, ITEM_MUSHROOM, 370, 0, -140, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SAM02_Item_MushroomD) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_SAM02_MushroomPresents, TRUE) + Call(MakeItemEntity, ITEM_ULTRA_SHROOM, 350, 0, -120, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SAM02_Item_UltraShroom) + Call(MakeItemEntity, ITEM_MUSHROOM, 330, 0, -100, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SAM02_Item_MushroomA) + Call(MakeItemEntity, ITEM_MUSHROOM, 330, 0, -140, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SAM02_Item_MushroomB) + Call(MakeItemEntity, ITEM_MUSHROOM, 370, 0, -100, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SAM02_Item_MushroomC) + Call(MakeItemEntity, ITEM_MUSHROOM, 370, 0, -140, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SAM02_Item_MushroomD) + EndIf + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 160, 60, 200, 0, MAKE_ENTITY_END) - EVT_EXEC(N(EVS_MakeToadHouseGifts)) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_SavePoint), 160, 60, 200, 0, MAKE_ENTITY_END) + Exec(N(EVS_MakeToadHouseGifts)) + Return + End }; diff --git a/src/world/area_sam/sam_02/sam_02_6_shop.c b/src/world/area_sam/sam_02/sam_02_6_shop.c index 68c294499cd..03cf28fdfc6 100644 --- a/src/world/area_sam/sam_02/sam_02_6_shop.c +++ b/src/world/area_sam/sam_02/sam_02_6_shop.c @@ -58,14 +58,14 @@ s32 N(UnknownData)[] = { }; EvtScript N(EVS_OnBuy) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(SHOP_BUY_RESULT_CANCEL) - EVT_CASE_EQ(SHOP_BUY_RESULT_4) - EVT_CASE_EQ(SHOP_BUY_RESULT_OK) - EVT_CASE_EQ(SHOP_BUY_RESULT_2) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(SHOP_BUY_RESULT_CANCEL) + CaseEq(SHOP_BUY_RESULT_4) + CaseEq(SHOP_BUY_RESULT_OK) + CaseEq(SHOP_BUY_RESULT_2) + EndSwitch + Return + End }; ShopItemLocation N(ItemPositions)[] = { @@ -86,21 +86,21 @@ ShopOwner N(Owner) = { }; EvtScript N(EVS_SetupShop) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o512, COLLIDER_FLAGS_UPPER_MASK) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o433, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o434, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o435, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o436, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o437, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o438, COLLIDER_FLAGS_UPPER_MASK) - EVT_CASE_GE(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o512, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_SWITCH - EVT_CALL(MakeShop, EVT_PTR(N(ItemPositions)), EVT_PTR(N(Inventory)), EVT_PTR(N(PriceList)), ITEM_ENTITY_FLAG_TOSS_LOWER) - EVT_CALL(MakeShopOwner, EVT_PTR(N(Owner))) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o512, COLLIDER_FLAGS_UPPER_MASK) + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o433, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o434, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o435, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o436, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o437, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o438, COLLIDER_FLAGS_UPPER_MASK) + CaseGe(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o512, COLLIDER_FLAGS_UPPER_MASK) + EndSwitch + Call(MakeShop, Ref(N(ItemPositions)), Ref(N(Inventory)), Ref(N(PriceList)), ITEM_ENTITY_FLAG_TOSS_LOWER) + Call(MakeShopOwner, Ref(N(Owner))) + Return + End }; diff --git a/src/world/area_sam/sam_03/sam_03_1_music.c b/src/world/area_sam/sam_03/sam_03_1_music.c index 03af141d2bb..f59eff8fbbd 100644 --- a/src/world/area_sam/sam_03/sam_03_1_music.c +++ b/src/world/area_sam/sam_03/sam_03_1_music.c @@ -1,7 +1,7 @@ #include "sam_03.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_SHIVER_SNOWFIELD, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_SHIVER_SNOWFIELD, 0, 8) + Return + End }; diff --git a/src/world/area_sam/sam_03/sam_03_2_main.c b/src/world/area_sam/sam_03/sam_03_2_main.c index fb9d54b8289..e9cb185e894 100644 --- a/src/world/area_sam/sam_03/sam_03_2_main.c +++ b/src/world/area_sam/sam_03/sam_03_2_main.c @@ -5,32 +5,32 @@ EvtScript N(EVS_ExitWalk_sam_11_1) = EVT_EXIT_WALK(60, sam_03_ENTRY_0, "sam_11", EvtScript N(EVS_ExitWalk_sam_04_0) = EVT_EXIT_WALK(60, sam_03_ENTRY_1, "sam_04", sam_04_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sam_11_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sam_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sam_11_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sam_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHIVER_SNOWFIELD) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_SET(GF_MAP_ShiverSnowfield, TRUE) - EVT_CALL(EnableModel, MODEL_o44, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o44, COLLIDER_FLAGS_UPPER_MASK) - EVT_IF_LT(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(BeforeNPCs))) - EVT_ELSE - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(AfterNPCs))) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_PLAY_EFFECT(EFFECT_SNOWFALL, 0, 32) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_road, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilie, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deiliw, SURFACE_TYPE_SNOW) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_SHIVER_SNOWFIELD) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Set(GF_MAP_ShiverSnowfield, TRUE) + Call(EnableModel, MODEL_o44, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o44, COLLIDER_FLAGS_UPPER_MASK) + IfLt(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) + Call(MakeNpcs, FALSE, Ref(N(BeforeNPCs))) + Else + Call(MakeNpcs, FALSE, Ref(N(AfterNPCs))) + EndIf + ExecWait(N(EVS_SetupMusic)) + PlayEffect(EFFECT_SNOWFALL, 0, 32) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_road, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilie, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deiliw, SURFACE_TYPE_SNOW) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; diff --git a/src/world/area_sam/sam_03/sam_03_3_npc1.c b/src/world/area_sam/sam_03/sam_03_3_npc1.c index 9d1727df0a7..41a57a8b247 100644 --- a/src/world/area_sam/sam_03/sam_03_3_npc1.c +++ b/src/world/area_sam/sam_03/sam_03_3_npc1.c @@ -10,137 +10,137 @@ API_CALLABLE(N(GetAngleToPlayer)) { } EvtScript N(EVS_NpcIdle_JrTroopa) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH7_DEFEATED_JR_TROOPA) - EVT_RETURN - EVT_END_IF - EVT_LABEL(11) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_IF_LT(LVar0, 400) - EVT_GOTO(11) - EVT_END_IF - EVT_CALL(InterruptUsePartner) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetMusicTrack, 0, SONG_JR_TROOPA_THEME, 0, 8) - EVT_CALL(SpeakToPlayer, NPC_JrTroopa, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle, 0, MSG_CH7_00D8) - EVT_CALL(SetNpcJumpscale, NPC_JrTroopa, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_JrTroopa, 520, 0, -68, 20 * DT) - EVT_CALL(PlayerFaceNpc, NPC_JrTroopa, FALSE) - EVT_WAIT(15 * DT) - EVT_CALL(GetNpcPos, NPC_JrTroopa, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -20) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(225.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-8.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_JrTroopa, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_Idle, 0, MSG_CH7_00D9) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_JrTroopa, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle, 0, MSG_CH7_00DA) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_JrTroopa, LVar3, LVar4, LVar5) - EVT_CALL(GetDist2D, LVar6, LVar0, LVar2, LVar3, LVar5) - EVT_MULF(LVar6, EVT_FLOAT(0.7)) - EVT_CALL(N(GetAngleToPlayer)) - EVT_CALL(AddVectorPolar, LVar3, LVar5, LVar6, LVar0) - EVT_CALL(SetNpcSpeed, NPC_JrTroopa, EVT_FLOAT(4.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_JrTroopa_Charge) - EVT_THREAD - EVT_CALL(NpcMoveTo, NPC_JrTroopa, LVar3, LVar5, 0) - EVT_END_THREAD - EVT_CALL(StartBossBattle, SONG_JR_TROOPA_BATTLE) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH7_DEFEATED_JR_TROOPA) + Return + EndIf + Label(11) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + IfLt(LVar0, 400) + Goto(11) + EndIf + Call(InterruptUsePartner) + Call(DisablePlayerInput, TRUE) + Call(SetMusicTrack, 0, SONG_JR_TROOPA_THEME, 0, 8) + Call(SpeakToPlayer, NPC_JrTroopa, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle, 0, MSG_CH7_00D8) + Call(SetNpcJumpscale, NPC_JrTroopa, Float(1.0)) + Call(NpcJump0, NPC_JrTroopa, 520, 0, -68, 20 * DT) + Call(PlayerFaceNpc, NPC_JrTroopa, FALSE) + Wait(15 * DT) + Call(GetNpcPos, NPC_JrTroopa, LVar0, LVar1, LVar2) + Add(LVar0, -20) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(225.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-8.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_JrTroopa, ANIM_JrTroopa_PointTalk, ANIM_JrTroopa_Idle, 0, MSG_CH7_00D9) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_JrTroopa, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle, 0, MSG_CH7_00DA) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_JrTroopa, LVar3, LVar4, LVar5) + Call(GetDist2D, LVar6, LVar0, LVar2, LVar3, LVar5) + MulF(LVar6, Float(0.7)) + Call(N(GetAngleToPlayer)) + Call(AddVectorPolar, LVar3, LVar5, LVar6, LVar0) + Call(SetNpcSpeed, NPC_JrTroopa, Float(4.0 / DT)) + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_JrTroopa_Charge) + Thread + Call(NpcMoveTo, NPC_JrTroopa, LVar3, LVar5, 0) + EndThread + Call(StartBossBattle, SONG_JR_TROOPA_BATTLE) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Return + End }; EvtScript N(EVS_NpcInteract_JrTroopa) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Defeated, ANIM_JrTroopa_Defeated, 5, MSG_CH7_00DF) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Defeated, ANIM_JrTroopa_Defeated, 5, MSG_CH7_00DF) + Return + End }; EvtScript N(EVS_NpcHit_JrTroopaHitbox) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_PARTNER) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Hurt, ANIM_JrTroopa_Collapse, 5, MSG_CH7_00DF) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseOrEq(ENCOUNTER_TRIGGER_JUMP) + CaseOrEq(ENCOUNTER_TRIGGER_HAMMER) + CaseOrEq(ENCOUNTER_TRIGGER_PARTNER) + Call(DisablePlayerInput, TRUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Hurt, ANIM_JrTroopa_Collapse, 5, MSG_CH7_00DF) + Call(DisablePlayerInput, FALSE) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_NpcDefeat_JrTroopa) = { - EVT_CALL(ClearDefeatedEnemies) - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_SET(GB_StoryProgress, STORY_CH7_DEFEATED_JR_TROOPA) - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_JrTroopa_Defeated) - EVT_CALL(SetNpcAnimation, NPC_JrTroopa_Hitbox, ANIM_JrTroopa_Defeated) - EVT_CALL(GetNpcPos, NPC_JrTroopa, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(200.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_WAIT(5 * DT) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_JrTroopa, ANIM_JrTroopa_Defeated, ANIM_JrTroopa_Defeated, 5, MSG_CH7_00DF) - EVT_CALL(GetNpcPos, NPC_JrTroopa, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_JrTroopa_Hitbox, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcCollisionSize, NPC_JrTroopa, 26, 24) - EVT_CALL(SetNpcCollisionSize, NPC_JrTroopa_Hitbox, 26, 24) - EVT_CALL(SetNpcFlagBits, NPC_JrTroopa_Hitbox, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_JrTroopa))) - EVT_CALL(BindNpcHit, NPC_JrTroopa_Hitbox, EVT_PTR(N(EVS_NpcHit_JrTroopaHitbox))) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(ClearDefeatedEnemies) + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Set(GB_StoryProgress, STORY_CH7_DEFEATED_JR_TROOPA) + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_JrTroopa_Defeated) + Call(SetNpcAnimation, NPC_JrTroopa_Hitbox, ANIM_JrTroopa_Defeated) + Call(GetNpcPos, NPC_JrTroopa, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(200.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Wait(5 * DT) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + EndThread + Call(SpeakToPlayer, NPC_JrTroopa, ANIM_JrTroopa_Defeated, ANIM_JrTroopa_Defeated, 5, MSG_CH7_00DF) + Call(GetNpcPos, NPC_JrTroopa, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_JrTroopa_Hitbox, LVar0, LVar1, LVar2) + Call(SetNpcCollisionSize, NPC_JrTroopa, 26, 24) + Call(SetNpcCollisionSize, NPC_JrTroopa_Hitbox, 26, 24) + Call(SetNpcFlagBits, NPC_JrTroopa_Hitbox, NPC_FLAG_INVISIBLE, TRUE) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_JrTroopa))) + Call(BindNpcHit, NPC_JrTroopa_Hitbox, Ref(N(EVS_NpcHit_JrTroopaHitbox))) + Exec(N(EVS_SetupMusic)) + Call(DisablePlayerInput, FALSE) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_JrTroopa) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_JrTroopa))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_JrTroopa))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_DEFEATED_JR_TROOPA) - EVT_CALL(SetNpcPos, NPC_JrTroopa, 600, 0, -65) - EVT_CASE_GE(STORY_CH7_DEFEATED_JR_TROOPA) - EVT_CALL(SetNpcPos, NPC_JrTroopa, 399, 6, -100) - EVT_CALL(SetNpcAnimation, NPC_JrTroopa, ANIM_JrTroopa_Collapse) - EVT_CALL(EnableModel, MODEL_o44, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o44, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_JrTroopa))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_JrTroopa))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_DEFEATED_JR_TROOPA) + Call(SetNpcPos, NPC_JrTroopa, 600, 0, -65) + CaseGe(STORY_CH7_DEFEATED_JR_TROOPA) + Call(SetNpcPos, NPC_JrTroopa, 399, 6, -100) + Call(SetNpcAnimation, NPC_JrTroopa, ANIM_JrTroopa_Collapse) + Call(EnableModel, MODEL_o44, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o44, COLLIDER_FLAGS_UPPER_MASK) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_JrTroopaHitbox) = { - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Return + End }; // first Jr Troopa is for interacting with player, the second is 'hostile' and can respond to being hit diff --git a/src/world/area_sam/sam_04/sam_04_1_music.c b/src/world/area_sam/sam_04/sam_04_1_music.c index df9a6b71430..7f296e95218 100644 --- a/src/world/area_sam/sam_04/sam_04_1_music.c +++ b/src/world/area_sam/sam_04/sam_04_1_music.c @@ -1,7 +1,7 @@ #include "sam_04.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_SHIVER_SNOWFIELD, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_SHIVER_SNOWFIELD, 0, 8) + Return + End }; diff --git a/src/world/area_sam/sam_04/sam_04_2_main.c b/src/world/area_sam/sam_04/sam_04_2_main.c index 12c6af1d32a..3f603d728ca 100644 --- a/src/world/area_sam/sam_04/sam_04_2_main.c +++ b/src/world/area_sam/sam_04/sam_04_2_main.c @@ -5,88 +5,88 @@ EvtScript N(EVS_ExitWalk_sam_05_0) = EVT_EXIT_WALK(60, sam_04_ENTRY_1, "sam_05", EvtScript N(EVS_ExitWalk_sam_07_0) = EVT_EXIT_WALK(60, sam_04_ENTRY_2, "sam_07", sam_07_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sam_03_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sam_05_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sam_07_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sam_03_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sam_05_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sam_07_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_LT(LVar0, sam_04_ENTRY_3) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_ELSE - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfLt(LVar0, sam_04_ENTRY_3) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Else + EndIf + Return + End }; #include "common/foliage.inc.c" EvtScript N(EVS_KnockAwayTreePart) = { - EVT_CALL(MakeLerp, 0, 255, 20, EASING_QUARTIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, LVar2, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(EnableModel, LVar2, FALSE) - EVT_RETURN - EVT_END + Call(MakeLerp, 0, 255, 20, EASING_QUARTIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, LVar2, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(EnableModel, LVar2, FALSE) + Return + End }; // script causes a crash if player picks up the item before it is killed EvtScript N(EVS_TetherItemToDummyNpc) = { - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_LetterDummy, LVar0, LVar1, LVar2) - EVT_CALL(SetItemPos, MV_LetterItemID, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetNpcPos, NPC_LetterDummy, LVar0, LVar1, LVar2) + Call(SetItemPos, MV_LetterItemID, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_OnShakeTree2) = { - EVT_SWITCH(MV_TreeHitCount) - EVT_CASE_EQ(0) - EVT_ADD(MV_TreeHitCount, 1) - EVT_SET(LVar2, MODEL_ki2_1) - EVT_EXEC_WAIT(N(EVS_KnockAwayTreePart)) - EVT_CASE_EQ(1) - EVT_ADD(MV_TreeHitCount, 1) - EVT_SET(LVar2, MODEL_ki2_2) - EVT_EXEC_WAIT(N(EVS_KnockAwayTreePart)) - EVT_CASE_EQ(2) - EVT_ADD(MV_TreeHitCount, 1) - EVT_SET(LVar2, MODEL_ki2_3) - EVT_EXEC_WAIT(N(EVS_KnockAwayTreePart)) - EVT_CASE_EQ(3) - EVT_IF_EQ(GF_SAM04_Item_Letter05, FALSE) - EVT_IF_EQ(MV_DroppedLetter, FALSE) - EVT_SET(MV_DroppedLetter, TRUE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_LetterDummy, -290, 70, 110) - EVT_EXEC_GET_TID(N(EVS_TetherItemToDummyNpc), LVarA) - EVT_IF_LE(LVar0, -295) - EVT_SET(LVar0, -268) - EVT_ELSE - EVT_SET(LVar0, -316) - EVT_END_IF - EVT_CALL(SetNpcJumpscale, NPC_LetterDummy, EVT_FLOAT(2.0)) - EVT_CALL(NpcJump0, NPC_LetterDummy, LVar0, 0, 141, 20) - EVT_KILL_THREAD(LVarA) - EVT_WAIT(1) - EVT_CALL(SetNpcPos, NPC_LetterDummy, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(MV_TreeHitCount) + CaseEq(0) + Add(MV_TreeHitCount, 1) + Set(LVar2, MODEL_ki2_1) + ExecWait(N(EVS_KnockAwayTreePart)) + CaseEq(1) + Add(MV_TreeHitCount, 1) + Set(LVar2, MODEL_ki2_2) + ExecWait(N(EVS_KnockAwayTreePart)) + CaseEq(2) + Add(MV_TreeHitCount, 1) + Set(LVar2, MODEL_ki2_3) + ExecWait(N(EVS_KnockAwayTreePart)) + CaseEq(3) + IfEq(GF_SAM04_Item_Letter05, FALSE) + IfEq(MV_DroppedLetter, FALSE) + Set(MV_DroppedLetter, TRUE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_LetterDummy, -290, 70, 110) + ExecGetTID(N(EVS_TetherItemToDummyNpc), LVarA) + IfLe(LVar0, -295) + Set(LVar0, -268) + Else + Set(LVar0, -316) + EndIf + Call(SetNpcJumpscale, NPC_LetterDummy, Float(2.0)) + Call(NpcJump0, NPC_LetterDummy, LVar0, 0, 141, 20) + KillThread(LVarA) + Wait(1) + Call(SetNpcPos, NPC_LetterDummy, NPC_DISPOSE_LOCATION) + EndIf + EndIf + EndSwitch + Return + End }; FoliageModelList N(Tree1_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_ki1); @@ -162,37 +162,37 @@ BombTrigger N(BombPos_Tree6) = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHIVER_SNOWFIELD) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_PLAY_EFFECT(EFFECT_SNOWFALL, 0, 40) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_ground, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilie, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilin, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilisw, SURFACE_TYPE_SNOW) - EVT_EXEC_WAIT(N(EVS_SetupSnowmen)) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_miki1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_miki2, 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_miki3, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree3)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree4))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_miki4, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree4)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree5))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_miki5, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree5)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree6))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_miki6, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree6)), 1, 0) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_SHIVER_SNOWFIELD) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupMusic)) + PlayEffect(EFFECT_SNOWFALL, 0, 40) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_ground, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilie, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilin, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilisw, SURFACE_TYPE_SNOW) + ExecWait(N(EVS_SetupSnowmen)) + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_miki1, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_miki2, 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree3))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_miki3, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree3)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree4))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_miki4, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree4)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree5))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_miki5, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree5)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree6))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_miki6, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree6)), 1, 0) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_sam/sam_04/sam_04_3_snowmen.c b/src/world/area_sam/sam_04/sam_04_3_snowmen.c index 86850e54af6..c75cfa1f019 100644 --- a/src/world/area_sam/sam_04/sam_04_3_snowmen.c +++ b/src/world/area_sam/sam_04/sam_04_3_snowmen.c @@ -38,428 +38,428 @@ s32* N(SnowmanModelSets)[] = { }; EvtScript N(EVS_SetSnowmanPosition) = { - EVT_CALL(SetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_USE_BUF(EVT_PTR(N(SnowmanModelSets))) - EVT_ADD(LVar0, 1) - EVT_LOOP(LVar0) - EVT_BUF_READ1(LVar4) - EVT_END_LOOP - EVT_USE_BUF(LVar4) - EVT_BUF_READ1(LVar4) - EVT_CALL(TranslateModel, LVar4, LVar1, LVar2, LVar3) - EVT_BUF_READ1(LVar4) - EVT_CALL(TranslateModel, LVar4, LVar1, LVar2, LVar3) - EVT_BUF_READ1(LVar4) - EVT_CALL(TranslateModel, LVar4, LVar1, LVar2, LVar3) - EVT_BUF_READ1(LVar4) - EVT_CALL(TranslateModel, LVar4, LVar1, LVar2, LVar3) - EVT_RETURN - EVT_END + Call(SetNpcPos, LVar0, LVar1, LVar2, LVar3) + UseBuf(Ref(N(SnowmanModelSets))) + Add(LVar0, 1) + Loop(LVar0) + BufRead1(LVar4) + EndLoop + UseBuf(LVar4) + BufRead1(LVar4) + Call(TranslateModel, LVar4, LVar1, LVar2, LVar3) + BufRead1(LVar4) + Call(TranslateModel, LVar4, LVar1, LVar2, LVar3) + BufRead1(LVar4) + Call(TranslateModel, LVar4, LVar1, LVar2, LVar3) + BufRead1(LVar4) + Call(TranslateModel, LVar4, LVar1, LVar2, LVar3) + Return + End }; EvtScript N(EVS_SnowmanJump) = { - EVT_THREAD - EVT_SET(LVarA, LVar0) - EVT_USE_BUF(EVT_PTR(N(SnowmanModelSets))) - EVT_ADD(LVarA, 1) - EVT_LOOP(LVarA) - EVT_BUF_READ1(LVarB) - EVT_END_LOOP - EVT_USE_BUF(LVarB) - EVT_BUF_READ4(LVarC, LVarD, LVarE, LVarF) - EVT_ADD(LVar4, 1) - EVT_LOOP(LVar4) - EVT_CALL(GetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(TranslateModel, LVarC, LVar1, LVar2, LVar3) - EVT_CALL(TranslateModel, LVarD, LVar1, LVar2, LVar3) - EVT_CALL(TranslateModel, LVarE, LVar1, LVar2, LVar3) - EVT_CALL(TranslateModel, LVarF, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcJumpscale, LVar0, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, LVar0, LVar1, LVar2, LVar3, LVar4) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, LVar1, LVar2, LVar3, 0) - EVT_RETURN - EVT_END + Thread + Set(LVarA, LVar0) + UseBuf(Ref(N(SnowmanModelSets))) + Add(LVarA, 1) + Loop(LVarA) + BufRead1(LVarB) + EndLoop + UseBuf(LVarB) + BufRead4(LVarC, LVarD, LVarE, LVarF) + Add(LVar4, 1) + Loop(LVar4) + Call(GetNpcPos, LVar0, LVar1, LVar2, LVar3) + Call(TranslateModel, LVarC, LVar1, LVar2, LVar3) + Call(TranslateModel, LVarD, LVar1, LVar2, LVar3) + Call(TranslateModel, LVarE, LVar1, LVar2, LVar3) + Call(TranslateModel, LVarF, LVar1, LVar2, LVar3) + Wait(1) + EndLoop + EndThread + Call(SetNpcJumpscale, LVar0, Float(1.0)) + Call(NpcJump0, LVar0, LVar1, LVar2, LVar3, LVar4) + PlayEffect(EFFECT_LANDING_DUST, 4, LVar1, LVar2, LVar3, 0) + Return + End }; EvtScript N(EVS_SnowmanMove) = { - EVT_CALL(GetNpcPos, LVar0, LVar5, LVar6, LVar7) - EVT_SETF(LVar8, LVar1) - EVT_SETF(LVar9, LVar2) - EVT_SETF(LVarA, LVar3) - EVT_SETF(LVarB, LVar4) - EVT_SUBF(LVar8, LVar5) - EVT_SUBF(LVar9, LVar6) - EVT_SUBF(LVarA, LVar7) - EVT_DIVF(LVar8, LVarB) - EVT_DIVF(LVar9, LVarB) - EVT_DIVF(LVarA, LVarB) - EVT_LOOP(LVarB) - EVT_ADDF(LVar5, LVar8) - EVT_ADDF(LVar6, LVar9) - EVT_ADDF(LVar7, LVarA) - EVT_SETF(LVar1, LVar5) - EVT_SETF(LVar2, LVar6) - EVT_SETF(LVar3, LVar7) - EVT_SET(LVar4, 20) - EVT_EXEC_WAIT(N(EVS_SnowmanJump)) - EVT_CALL(PlaySoundAtNpc, LVar0, SOUND_SAM_SNOWMAN_JUMP, SOUND_SPACE_DEFAULT) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(GetNpcPos, LVar0, LVar5, LVar6, LVar7) + SetF(LVar8, LVar1) + SetF(LVar9, LVar2) + SetF(LVarA, LVar3) + SetF(LVarB, LVar4) + SubF(LVar8, LVar5) + SubF(LVar9, LVar6) + SubF(LVarA, LVar7) + DivF(LVar8, LVarB) + DivF(LVar9, LVarB) + DivF(LVarA, LVarB) + Loop(LVarB) + AddF(LVar5, LVar8) + AddF(LVar6, LVar9) + AddF(LVar7, LVarA) + SetF(LVar1, LVar5) + SetF(LVar2, LVar6) + SetF(LVar3, LVar7) + Set(LVar4, 20) + ExecWait(N(EVS_SnowmanJump)) + Call(PlaySoundAtNpc, LVar0, SOUND_SAM_SNOWMAN_JUMP, SOUND_SPACE_DEFAULT) + EndLoop + Return + End }; EvtScript N(EVS_Scene_SnowmenSpeak) = { - EVT_WAIT(20 * DT) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(GetNpcPos, NPC_Snowman_03, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-8.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(10.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Snowman_03, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH7_011B) - EVT_CALL(GetNpcPos, NPC_Snowman_06, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(15 * DT) - EVT_CALL(SpeakToPlayer, NPC_Snowman_06, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH7_011C) - EVT_ELSE - EVT_CALL(GetNpcPos, NPC_Snowman_06, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-8.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(10.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Snowman_06, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH7_011C) - EVT_CALL(GetNpcPos, NPC_Snowman_03, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(15 * DT) - EVT_CALL(SpeakToPlayer, NPC_Snowman_03, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH7_011B) - EVT_END_IF - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, -140) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, -100) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH7_011D, 160, 40) - EVT_CALL(SetNpcFlagBits, NPC_Snowman_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Snowman_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Snowman_03, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Snowman_04, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Snowman_05, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Snowman_06, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_WAIT(1) - EVT_THREAD - EVT_WAIT(22 * DT) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(N(SetAngleClamped), LVar3, LVar0, LVar2, 0, 0) - EVT_CALL(GetDist2D, LVar4, LVar0, LVar2, 0, 0) - EVT_SETF(LVar5, LVar4) - EVT_DIVF(LVar5, EVT_FLOAT(5.0)) - EVT_SETF(LVar8, LVar3) - EVT_SUBF(LVar8, EVT_FLOAT(90.0)) - EVT_LOOP(4) - EVT_CALL(AddVectorPolar, LVar0, LVar2, LVar5, LVar3) - EVT_SETF(LVar6, LVar0) - EVT_SETF(LVar7, LVar2) - EVT_CALL(AddVectorPolar, LVar6, LVar7, EVT_FLOAT(20.0), LVar8) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(2.0)) - EVT_CALL(PlayerJump1, LVar6, 0, LVar7, 16 * DT) - EVT_ADDF(LVar8, EVT_FLOAT(180.0)) - EVT_WAIT(6 * DT) - EVT_END_LOOP - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(2.0 / DT)) - EVT_CALL(PlayerJump1, 0, 0, 0, 16 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(InterpPlayerYaw, 0, 0) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(110 * DT) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump1, NPC_PARTNER, 50, 0, 0, 22) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_WAIT(110 * DT) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(22 * DT) - EVT_LOOP(5) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 6 * DT, EVT_FLOAT(2.0)) - EVT_WAIT(16 * DT) - EVT_END_LOOP - EVT_END_THREAD - EVT_SET(LVar0, NPC_Snowman_01) - EVT_SETF(LVar1, EVT_FLOAT(-175.0)) - EVT_SETF(LVar2, EVT_FLOAT(0.0)) - EVT_SETF(LVar3, EVT_FLOAT(-180.0)) - EVT_SETF(LVar4, EVT_FLOAT(5.0)) - EVT_EXEC(N(EVS_SnowmanMove)) - EVT_SET(LVar0, NPC_Snowman_02) - EVT_SETF(LVar1, EVT_FLOAT(-125.0)) - EVT_SETF(LVar2, EVT_FLOAT(0.0)) - EVT_SETF(LVar3, EVT_FLOAT(-220.0)) - EVT_SETF(LVar4, EVT_FLOAT(5.0)) - EVT_EXEC(N(EVS_SnowmanMove)) - EVT_SET(LVar0, NPC_Snowman_03) - EVT_SETF(LVar1, EVT_FLOAT(-75.0)) - EVT_SETF(LVar2, EVT_FLOAT(0.0)) - EVT_SETF(LVar3, EVT_FLOAT(-260.0)) - EVT_SETF(LVar4, EVT_FLOAT(5.0)) - EVT_EXEC(N(EVS_SnowmanMove)) - EVT_SET(LVar0, NPC_Snowman_04) - EVT_SETF(LVar1, EVT_FLOAT(75.0)) - EVT_SETF(LVar2, EVT_FLOAT(0.0)) - EVT_SETF(LVar3, EVT_FLOAT(-260.0)) - EVT_SETF(LVar4, EVT_FLOAT(5.0)) - EVT_EXEC(N(EVS_SnowmanMove)) - EVT_SET(LVar0, NPC_Snowman_05) - EVT_SETF(LVar1, EVT_FLOAT(125.0)) - EVT_SETF(LVar2, EVT_FLOAT(0.0)) - EVT_SETF(LVar3, EVT_FLOAT(-220.0)) - EVT_SETF(LVar4, EVT_FLOAT(5.0)) - EVT_EXEC(N(EVS_SnowmanMove)) - EVT_WAIT(1) - EVT_SET(LVar0, NPC_Snowman_06) - EVT_SETF(LVar1, EVT_FLOAT(175.0)) - EVT_SETF(LVar2, EVT_FLOAT(0.0)) - EVT_SETF(LVar3, EVT_FLOAT(-180.0)) - EVT_SETF(LVar4, EVT_FLOAT(5.0)) - EVT_EXEC_WAIT(N(EVS_SnowmanMove)) - EVT_WAIT(80 * DT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 200, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(10) - EVT_SET(LVar0, -150) - EVT_LOOP(6) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, LVar0, 0, -260, 0) - EVT_ADD(LVar0, 60) - EVT_END_LOOP - EVT_WAIT(20 * DT) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(40 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, -240) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, -240) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_CALL(PlaySoundAt, SOUND_SAM_SNOWMEN_RAISE_WALL, SOUND_SPACE_DEFAULT, 0, 0, -300) - EVT_CALL(MakeLerp, 0, 100, 200 * DT, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o65, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o64, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o66, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(60 * DT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 100, EVT_FLOAT(0.3)) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetModelCenter, MODEL_o65) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, LVar0, 0, LVar2, 0) - EVT_CALL(GetModelCenter, MODEL_o64) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, LVar0, 0, LVar2, 0) - EVT_END_THREAD - EVT_CALL(PlaySoundAt, SOUND_SAM_SNOWMEN_OPEN_PASSAGE, SOUND_SPACE_DEFAULT, 0, 0, -300) - EVT_CALL(MakeLerp, 0, 80, 100 * DT, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o65, 0, 100, 0) - EVT_CALL(TranslateModel, MODEL_o64, 0, 100, 0) - EVT_CALL(RotateModel, MODEL_o65, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o64, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(60 * DT) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(10.0)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(30 * DT) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH7_011E, 160, 40) - EVT_CALL(EnablePartnerAI) - EVT_CALL(UpdateColliderTransform, COLLIDER_o78) - EVT_CALL(UpdateColliderTransform, COLLIDER_o79) - EVT_CALL(UpdateColliderTransform, COLLIDER_o80) - EVT_CALL(SetNpcFlagBits, NPC_Snowman_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Snowman_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Snowman_03, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Snowman_04, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Snowman_05, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Snowman_06, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(BindNpcInteract, NPC_Snowman_01, NULL) - EVT_CALL(BindNpcInteract, NPC_Snowman_02, NULL) - EVT_CALL(BindNpcInteract, NPC_Snowman_03, NULL) - EVT_CALL(BindNpcInteract, NPC_Snowman_04, NULL) - EVT_CALL(BindNpcInteract, NPC_Snowman_05, NULL) - EVT_CALL(BindNpcInteract, NPC_Snowman_06, NULL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o103, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o106, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o118, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o119, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o120, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o121, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o122, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GB_StoryProgress, STORY_CH7_UNLOCKED_SHIVER_MOUNTAIN) - EVT_RETURN - EVT_END + Wait(20 * DT) + IfEq(LVar0, 0) + Call(GetNpcPos, NPC_Snowman_03, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-8.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(10.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Snowman_03, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH7_011B) + Call(GetNpcPos, NPC_Snowman_06, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(15 * DT) + Call(SpeakToPlayer, NPC_Snowman_06, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH7_011C) + Else + Call(GetNpcPos, NPC_Snowman_06, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-8.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(10.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Snowman_06, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH7_011C) + Call(GetNpcPos, NPC_Snowman_03, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(15 * DT) + Call(SpeakToPlayer, NPC_Snowman_03, ANIM_Toad_Red_Idle, ANIM_Toad_Red_Idle, 0, MSG_CH7_011B) + EndIf + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, -140) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, -100) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(ShowMessageAtScreenPos, MSG_CH7_011D, 160, 40) + Call(SetNpcFlagBits, NPC_Snowman_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Snowman_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Snowman_03, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Snowman_04, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Snowman_05, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Snowman_06, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Wait(1) + Thread + Wait(22 * DT) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(N(SetAngleClamped), LVar3, LVar0, LVar2, 0, 0) + Call(GetDist2D, LVar4, LVar0, LVar2, 0, 0) + SetF(LVar5, LVar4) + DivF(LVar5, Float(5.0)) + SetF(LVar8, LVar3) + SubF(LVar8, Float(90.0)) + Loop(4) + Call(AddVectorPolar, LVar0, LVar2, LVar5, LVar3) + SetF(LVar6, LVar0) + SetF(LVar7, LVar2) + Call(AddVectorPolar, LVar6, LVar7, Float(20.0), LVar8) + Call(SetPlayerJumpscale, Float(2.0)) + Call(PlayerJump1, LVar6, 0, LVar7, 16 * DT) + AddF(LVar8, Float(180.0)) + Wait(6 * DT) + EndLoop + Call(SetPlayerJumpscale, Float(2.0 / DT)) + Call(PlayerJump1, 0, 0, 0, 16 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(InterpPlayerYaw, 0, 0) + Call(DisablePlayerPhysics, FALSE) + EndThread + Thread + Wait(110 * DT) + Call(DisablePartnerAI, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.0)) + Call(NpcJump1, NPC_PARTNER, 50, 0, 0, 22) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Wait(110 * DT) + EndThread + Thread + Wait(22 * DT) + Loop(5) + Call(ShakeCam, CAM_DEFAULT, 0, 6 * DT, Float(2.0)) + Wait(16 * DT) + EndLoop + EndThread + Set(LVar0, NPC_Snowman_01) + SetF(LVar1, Float(-175.0)) + SetF(LVar2, Float(0.0)) + SetF(LVar3, Float(-180.0)) + SetF(LVar4, Float(5.0)) + Exec(N(EVS_SnowmanMove)) + Set(LVar0, NPC_Snowman_02) + SetF(LVar1, Float(-125.0)) + SetF(LVar2, Float(0.0)) + SetF(LVar3, Float(-220.0)) + SetF(LVar4, Float(5.0)) + Exec(N(EVS_SnowmanMove)) + Set(LVar0, NPC_Snowman_03) + SetF(LVar1, Float(-75.0)) + SetF(LVar2, Float(0.0)) + SetF(LVar3, Float(-260.0)) + SetF(LVar4, Float(5.0)) + Exec(N(EVS_SnowmanMove)) + Set(LVar0, NPC_Snowman_04) + SetF(LVar1, Float(75.0)) + SetF(LVar2, Float(0.0)) + SetF(LVar3, Float(-260.0)) + SetF(LVar4, Float(5.0)) + Exec(N(EVS_SnowmanMove)) + Set(LVar0, NPC_Snowman_05) + SetF(LVar1, Float(125.0)) + SetF(LVar2, Float(0.0)) + SetF(LVar3, Float(-220.0)) + SetF(LVar4, Float(5.0)) + Exec(N(EVS_SnowmanMove)) + Wait(1) + Set(LVar0, NPC_Snowman_06) + SetF(LVar1, Float(175.0)) + SetF(LVar2, Float(0.0)) + SetF(LVar3, Float(-180.0)) + SetF(LVar4, Float(5.0)) + ExecWait(N(EVS_SnowmanMove)) + Wait(80 * DT) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 200, Float(1.0)) + EndThread + Thread + Loop(10) + Set(LVar0, -150) + Loop(6) + PlayEffect(EFFECT_LANDING_DUST, 4, LVar0, 0, -260, 0) + Add(LVar0, 60) + EndLoop + Wait(20 * DT) + EndLoop + EndThread + Thread + Wait(40 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, -240) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, -240) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Call(PlaySoundAt, SOUND_SAM_SNOWMEN_RAISE_WALL, SOUND_SPACE_DEFAULT, 0, 0, -300) + Call(MakeLerp, 0, 100, 200 * DT, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o65, 0, LVar0, 0) + Call(TranslateModel, MODEL_o64, 0, LVar0, 0) + Call(TranslateModel, MODEL_o66, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Wait(60 * DT) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 100, Float(0.3)) + EndThread + Thread + Call(GetModelCenter, MODEL_o65) + PlayEffect(EFFECT_LANDING_DUST, 4, LVar0, 0, LVar2, 0) + Call(GetModelCenter, MODEL_o64) + PlayEffect(EFFECT_LANDING_DUST, 4, LVar0, 0, LVar2, 0) + EndThread + Call(PlaySoundAt, SOUND_SAM_SNOWMEN_OPEN_PASSAGE, SOUND_SPACE_DEFAULT, 0, 0, -300) + Call(MakeLerp, 0, 80, 100 * DT, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o65, 0, 100, 0) + Call(TranslateModel, MODEL_o64, 0, 100, 0) + Call(RotateModel, MODEL_o65, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o64, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Wait(60 * DT) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(10.0)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Wait(30 * DT) + Call(ShowMessageAtScreenPos, MSG_CH7_011E, 160, 40) + Call(EnablePartnerAI) + Call(UpdateColliderTransform, COLLIDER_o78) + Call(UpdateColliderTransform, COLLIDER_o79) + Call(UpdateColliderTransform, COLLIDER_o80) + Call(SetNpcFlagBits, NPC_Snowman_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcFlagBits, NPC_Snowman_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcFlagBits, NPC_Snowman_03, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcFlagBits, NPC_Snowman_04, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcFlagBits, NPC_Snowman_05, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcFlagBits, NPC_Snowman_06, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(BindNpcInteract, NPC_Snowman_01, NULL) + Call(BindNpcInteract, NPC_Snowman_02, NULL) + Call(BindNpcInteract, NPC_Snowman_03, NULL) + Call(BindNpcInteract, NPC_Snowman_04, NULL) + Call(BindNpcInteract, NPC_Snowman_05, NULL) + Call(BindNpcInteract, NPC_Snowman_06, NULL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o103, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o106, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o118, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o119, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o120, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o121, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o122, COLLIDER_FLAGS_UPPER_MASK) + Set(GB_StoryProgress, STORY_CH7_UNLOCKED_SHIVER_MOUNTAIN) + Return + End }; EvtScript N(EVS_SetupSnowmen) = { - EVT_CALL(CloneModel, MODEL_d_me, CLONED_MODEL(0)) - EVT_CALL(CloneModel, MODEL_body, CLONED_MODEL(1)) - EVT_CALL(CloneModel, MODEL_baketu, CLONED_MODEL(2)) - EVT_CALL(CloneModel, MODEL_mafu, CLONED_MODEL(3)) - EVT_CALL(CloneModel, MODEL_d_me, CLONED_MODEL(4)) - EVT_CALL(CloneModel, MODEL_body, CLONED_MODEL(5)) - EVT_CALL(CloneModel, MODEL_baketu, CLONED_MODEL(6)) - EVT_CALL(CloneModel, MODEL_mafu, CLONED_MODEL(7)) - EVT_CALL(CloneModel, MODEL_d_me, CLONED_MODEL(8)) - EVT_CALL(CloneModel, MODEL_body, CLONED_MODEL(9)) - EVT_CALL(CloneModel, MODEL_baketu, CLONED_MODEL(10)) - EVT_CALL(CloneModel, MODEL_mafu, CLONED_MODEL(11)) - EVT_CALL(CloneModel, MODEL_d_me, CLONED_MODEL(12)) - EVT_CALL(CloneModel, MODEL_body, CLONED_MODEL(13)) - EVT_CALL(CloneModel, MODEL_baketu, CLONED_MODEL(14)) - EVT_CALL(CloneModel, MODEL_mafu, CLONED_MODEL(15)) - EVT_CALL(CloneModel, MODEL_d_me, CLONED_MODEL(16)) - EVT_CALL(CloneModel, MODEL_body, CLONED_MODEL(17)) - EVT_CALL(CloneModel, MODEL_baketu, CLONED_MODEL(18)) - EVT_CALL(CloneModel, MODEL_mafu, CLONED_MODEL(19)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o87, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o88, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o89, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o103, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o104, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o105, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o106, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o118, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o119, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o120, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o121, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o122, COLLIDER_FLAGS_UPPER_MASK) - EVT_IF_LT(GB_StoryProgress, STORY_CH7_UNLOCKED_SHIVER_MOUNTAIN) - EVT_SET(LVar0, NPC_Snowman_01) - EVT_SET(LVar1, -150) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, -270) - EVT_EXEC_WAIT(N(EVS_SetSnowmanPosition)) - EVT_SET(LVar0, NPC_Snowman_02) - EVT_SET(LVar1, -90) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, -270) - EVT_EXEC_WAIT(N(EVS_SetSnowmanPosition)) - EVT_SET(LVar0, NPC_Snowman_03) - EVT_SET(LVar1, -30) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, -270) - EVT_EXEC_WAIT(N(EVS_SetSnowmanPosition)) - EVT_SET(LVar0, NPC_Snowman_04) - EVT_SET(LVar1, 30) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, -270) - EVT_EXEC_WAIT(N(EVS_SetSnowmanPosition)) - EVT_SET(LVar0, NPC_Snowman_05) - EVT_SET(LVar1, 90) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, -270) - EVT_EXEC_WAIT(N(EVS_SetSnowmanPosition)) - EVT_SET(LVar0, NPC_Snowman_06) - EVT_SET(LVar1, 150) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, -270) - EVT_EXEC_WAIT(N(EVS_SetSnowmanPosition)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o103, COLLIDER_FLAGS_UPPER_MASK) - EVT_ELSE - EVT_SET(LVar0, NPC_Snowman_01) - EVT_SET(LVar1, -175) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, -180) - EVT_EXEC_WAIT(N(EVS_SetSnowmanPosition)) - EVT_SET(LVar0, NPC_Snowman_02) - EVT_SET(LVar1, -125) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, -220) - EVT_EXEC_WAIT(N(EVS_SetSnowmanPosition)) - EVT_SET(LVar0, NPC_Snowman_03) - EVT_SET(LVar1, -75) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, -260) - EVT_EXEC_WAIT(N(EVS_SetSnowmanPosition)) - EVT_SET(LVar0, NPC_Snowman_04) - EVT_SET(LVar1, 75) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, -260) - EVT_EXEC_WAIT(N(EVS_SetSnowmanPosition)) - EVT_SET(LVar0, NPC_Snowman_05) - EVT_SET(LVar1, 125) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, -220) - EVT_EXEC_WAIT(N(EVS_SetSnowmanPosition)) - EVT_SET(LVar0, NPC_Snowman_06) - EVT_SET(LVar1, 175) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, -180) - EVT_EXEC_WAIT(N(EVS_SetSnowmanPosition)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o106, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o118, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o119, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o120, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o121, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o122, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_IF_EQ(GF_SAM04_PlacedScarf, FALSE) - EVT_CALL(EnableModel, CLONED_MODEL(11), FALSE) - EVT_END_IF - EVT_IF_EQ(GF_SAM04_PlacedBucket, FALSE) - EVT_CALL(EnableModel, MODEL_baketu, FALSE) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ttn, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ParentColliderToModel, COLLIDER_o78, MODEL_o65) - EVT_CALL(ParentColliderToModel, COLLIDER_o79, MODEL_o64) - EVT_CALL(ParentColliderToModel, COLLIDER_o80, MODEL_o66) - EVT_IF_GE(GB_StoryProgress, STORY_CH7_UNLOCKED_SHIVER_MOUNTAIN) - EVT_CALL(TranslateModel, MODEL_o65, 0, 100, 0) - EVT_CALL(TranslateModel, MODEL_o64, 0, 100, 0) - EVT_CALL(TranslateModel, MODEL_o66, 0, 100, 0) - EVT_CALL(RotateModel, MODEL_o65, 80, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o64, 80, 0, -1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o78) - EVT_CALL(UpdateColliderTransform, COLLIDER_o79) - EVT_CALL(UpdateColliderTransform, COLLIDER_o80) - EVT_CALL(BindNpcInteract, NPC_Snowman_01, 0) - EVT_CALL(BindNpcInteract, NPC_Snowman_02, 0) - EVT_CALL(BindNpcInteract, NPC_Snowman_03, 0) - EVT_CALL(BindNpcInteract, NPC_Snowman_04, 0) - EVT_CALL(BindNpcInteract, NPC_Snowman_05, 0) - EVT_CALL(BindNpcInteract, NPC_Snowman_06, 0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(CloneModel, MODEL_d_me, CLONED_MODEL(0)) + Call(CloneModel, MODEL_body, CLONED_MODEL(1)) + Call(CloneModel, MODEL_baketu, CLONED_MODEL(2)) + Call(CloneModel, MODEL_mafu, CLONED_MODEL(3)) + Call(CloneModel, MODEL_d_me, CLONED_MODEL(4)) + Call(CloneModel, MODEL_body, CLONED_MODEL(5)) + Call(CloneModel, MODEL_baketu, CLONED_MODEL(6)) + Call(CloneModel, MODEL_mafu, CLONED_MODEL(7)) + Call(CloneModel, MODEL_d_me, CLONED_MODEL(8)) + Call(CloneModel, MODEL_body, CLONED_MODEL(9)) + Call(CloneModel, MODEL_baketu, CLONED_MODEL(10)) + Call(CloneModel, MODEL_mafu, CLONED_MODEL(11)) + Call(CloneModel, MODEL_d_me, CLONED_MODEL(12)) + Call(CloneModel, MODEL_body, CLONED_MODEL(13)) + Call(CloneModel, MODEL_baketu, CLONED_MODEL(14)) + Call(CloneModel, MODEL_mafu, CLONED_MODEL(15)) + Call(CloneModel, MODEL_d_me, CLONED_MODEL(16)) + Call(CloneModel, MODEL_body, CLONED_MODEL(17)) + Call(CloneModel, MODEL_baketu, CLONED_MODEL(18)) + Call(CloneModel, MODEL_mafu, CLONED_MODEL(19)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o87, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o88, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o89, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o103, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o104, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o105, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o106, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o118, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o119, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o120, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o121, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o122, COLLIDER_FLAGS_UPPER_MASK) + IfLt(GB_StoryProgress, STORY_CH7_UNLOCKED_SHIVER_MOUNTAIN) + Set(LVar0, NPC_Snowman_01) + Set(LVar1, -150) + Set(LVar2, 0) + Set(LVar3, -270) + ExecWait(N(EVS_SetSnowmanPosition)) + Set(LVar0, NPC_Snowman_02) + Set(LVar1, -90) + Set(LVar2, 0) + Set(LVar3, -270) + ExecWait(N(EVS_SetSnowmanPosition)) + Set(LVar0, NPC_Snowman_03) + Set(LVar1, -30) + Set(LVar2, 0) + Set(LVar3, -270) + ExecWait(N(EVS_SetSnowmanPosition)) + Set(LVar0, NPC_Snowman_04) + Set(LVar1, 30) + Set(LVar2, 0) + Set(LVar3, -270) + ExecWait(N(EVS_SetSnowmanPosition)) + Set(LVar0, NPC_Snowman_05) + Set(LVar1, 90) + Set(LVar2, 0) + Set(LVar3, -270) + ExecWait(N(EVS_SetSnowmanPosition)) + Set(LVar0, NPC_Snowman_06) + Set(LVar1, 150) + Set(LVar2, 0) + Set(LVar3, -270) + ExecWait(N(EVS_SetSnowmanPosition)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o103, COLLIDER_FLAGS_UPPER_MASK) + Else + Set(LVar0, NPC_Snowman_01) + Set(LVar1, -175) + Set(LVar2, 0) + Set(LVar3, -180) + ExecWait(N(EVS_SetSnowmanPosition)) + Set(LVar0, NPC_Snowman_02) + Set(LVar1, -125) + Set(LVar2, 0) + Set(LVar3, -220) + ExecWait(N(EVS_SetSnowmanPosition)) + Set(LVar0, NPC_Snowman_03) + Set(LVar1, -75) + Set(LVar2, 0) + Set(LVar3, -260) + ExecWait(N(EVS_SetSnowmanPosition)) + Set(LVar0, NPC_Snowman_04) + Set(LVar1, 75) + Set(LVar2, 0) + Set(LVar3, -260) + ExecWait(N(EVS_SetSnowmanPosition)) + Set(LVar0, NPC_Snowman_05) + Set(LVar1, 125) + Set(LVar2, 0) + Set(LVar3, -220) + ExecWait(N(EVS_SetSnowmanPosition)) + Set(LVar0, NPC_Snowman_06) + Set(LVar1, 175) + Set(LVar2, 0) + Set(LVar3, -180) + ExecWait(N(EVS_SetSnowmanPosition)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o106, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o118, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o119, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o120, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o121, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o122, COLLIDER_FLAGS_UPPER_MASK) + EndIf + IfEq(GF_SAM04_PlacedScarf, FALSE) + Call(EnableModel, CLONED_MODEL(11), FALSE) + EndIf + IfEq(GF_SAM04_PlacedBucket, FALSE) + Call(EnableModel, MODEL_baketu, FALSE) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ttn, COLLIDER_FLAGS_UPPER_MASK) + Call(ParentColliderToModel, COLLIDER_o78, MODEL_o65) + Call(ParentColliderToModel, COLLIDER_o79, MODEL_o64) + Call(ParentColliderToModel, COLLIDER_o80, MODEL_o66) + IfGe(GB_StoryProgress, STORY_CH7_UNLOCKED_SHIVER_MOUNTAIN) + Call(TranslateModel, MODEL_o65, 0, 100, 0) + Call(TranslateModel, MODEL_o64, 0, 100, 0) + Call(TranslateModel, MODEL_o66, 0, 100, 0) + Call(RotateModel, MODEL_o65, 80, 0, 1, 0) + Call(RotateModel, MODEL_o64, 80, 0, -1, 0) + Call(UpdateColliderTransform, COLLIDER_o78) + Call(UpdateColliderTransform, COLLIDER_o79) + Call(UpdateColliderTransform, COLLIDER_o80) + Call(BindNpcInteract, NPC_Snowman_01, 0) + Call(BindNpcInteract, NPC_Snowman_02, 0) + Call(BindNpcInteract, NPC_Snowman_03, 0) + Call(BindNpcInteract, NPC_Snowman_04, 0) + Call(BindNpcInteract, NPC_Snowman_05, 0) + Call(BindNpcInteract, NPC_Snowman_06, 0) + EndIf + Return + End }; diff --git a/src/world/area_sam/sam_04/sam_04_4_npc.c b/src/world/area_sam/sam_04/sam_04_4_npc.c index 5a4291972f4..9da95430621 100644 --- a/src/world/area_sam/sam_04/sam_04_4_npc.c +++ b/src/world/area_sam/sam_04/sam_04_4_npc.c @@ -24,199 +24,199 @@ s32 N(ScarfList)[] = { }; EvtScript N(EVS_NpcInteract_Snowman_01) = { - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_Snowman, 160, 40) - EVT_RETURN - EVT_END + Call(ShowMessageAtScreenPos, MSG_Menus_Inspect_Snowman, 160, 40) + Return + End }; EvtScript N(EVS_NpcInteract_Snowman_02) = { - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_Snowman, 160, 40) - EVT_RETURN - EVT_END + Call(ShowMessageAtScreenPos, MSG_Menus_Inspect_Snowman, 160, 40) + Return + End }; EvtScript N(EVS_NpcInteract_Snowman_04) = { - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_Snowman, 160, 40) - EVT_RETURN - EVT_END + Call(ShowMessageAtScreenPos, MSG_Menus_Inspect_Snowman, 160, 40) + Return + End }; EvtScript N(EVS_NpcInteract_Snowman_05) = { - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_Snowman, 160, 40) - EVT_RETURN - EVT_END + Call(ShowMessageAtScreenPos, MSG_Menus_Inspect_Snowman, 160, 40) + Return + End }; EvtScript N(EVS_ItemPrompt_Scarf) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(FindKeyItem, ITEM_SNOWMAN_SCARF, LVar0) - EVT_IF_NE(LVar0, -1) - EVT_CALL(ShowKeyChoicePopup) - EVT_CALL(CloseChoicePopup) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CASE_EQ(-1) - EVT_CASE_DEFAULT - EVT_SET(GF_SAM04_PlacedScarf, TRUE) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(EnableModel, CLONED_MODEL(11), TRUE) - EVT_IF_EQ(GF_SAM04_PlacedBucket, TRUE) - EVT_CALL(GetNpcPos, NPC_Snowman_03, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 30) - EVT_ADD(LVar2, 20) - EVT_CALL(PlaySoundAt, SOUND_STAR_SPIRIT_CAST_A, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 10) - EVT_WAIT(20) - EVT_CALL(PlaySound, SOUND_CHIME_SOLVED_PUZZLE) - EVT_SET(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_Scene_SnowmenSpeak)) - EVT_END_IF - EVT_END_SWITCH - EVT_ELSE - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_Snowman, 160, 40) - EVT_END_IF - EVT_UNBIND - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(FindKeyItem, ITEM_SNOWMAN_SCARF, LVar0) + IfNe(LVar0, -1) + Call(ShowKeyChoicePopup) + Call(CloseChoicePopup) + Switch(LVar0) + CaseEq(0) + CaseEq(-1) + CaseDefault + Set(GF_SAM04_PlacedScarf, TRUE) + Call(RemoveKeyItemAt, LVar1) + Call(EnableModel, CLONED_MODEL(11), TRUE) + IfEq(GF_SAM04_PlacedBucket, TRUE) + Call(GetNpcPos, NPC_Snowman_03, LVar0, LVar1, LVar2) + Add(LVar1, 30) + Add(LVar2, 20) + Call(PlaySoundAt, SOUND_STAR_SPIRIT_CAST_A, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 10) + Wait(20) + Call(PlaySound, SOUND_CHIME_SOLVED_PUZZLE) + Set(LVar0, 0) + ExecWait(N(EVS_Scene_SnowmenSpeak)) + EndIf + EndSwitch + Else + Call(ShowMessageAtScreenPos, MSG_Menus_Inspect_Snowman, 160, 40) + EndIf + Unbind + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_Snowman_03) = { - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_ItemPrompt_Scarf)), TRIGGER_FORCE_ACTIVATE, 0, EVT_PTR(N(ScarfList)), 0, 1) - EVT_RETURN - EVT_END + BindPadlock(Ref(N(EVS_ItemPrompt_Scarf)), TRIGGER_FORCE_ACTIVATE, 0, Ref(N(ScarfList)), 0, 1) + Return + End }; EvtScript N(EVS_ItemPrompt_Bucket) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(FindKeyItem, ITEM_SNOWMAN_BUCKET, LVar0) - EVT_IF_NE(LVar0, -1) - EVT_CALL(ShowKeyChoicePopup) - EVT_CALL(CloseChoicePopup) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CASE_EQ(-1) - EVT_CASE_DEFAULT - EVT_SET(GF_SAM04_PlacedBucket, TRUE) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(EnableModel, MODEL_baketu, TRUE) - EVT_IF_EQ(GF_SAM04_PlacedScarf, TRUE) - EVT_CALL(GetNpcPos, NPC_Snowman_06, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 60) - EVT_ADD(LVar2, 20) - EVT_CALL(PlaySoundAt, SOUND_STAR_SPIRIT_CAST_A, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 10) - EVT_WAIT(20) - EVT_CALL(PlaySound, SOUND_CHIME_SOLVED_PUZZLE) - EVT_SET(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_Scene_SnowmenSpeak)) - EVT_END_IF - EVT_END_SWITCH - EVT_ELSE - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_Snowman, 160, 40) - EVT_END_IF - EVT_UNBIND - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(FindKeyItem, ITEM_SNOWMAN_BUCKET, LVar0) + IfNe(LVar0, -1) + Call(ShowKeyChoicePopup) + Call(CloseChoicePopup) + Switch(LVar0) + CaseEq(0) + CaseEq(-1) + CaseDefault + Set(GF_SAM04_PlacedBucket, TRUE) + Call(RemoveKeyItemAt, LVar1) + Call(EnableModel, MODEL_baketu, TRUE) + IfEq(GF_SAM04_PlacedScarf, TRUE) + Call(GetNpcPos, NPC_Snowman_06, LVar0, LVar1, LVar2) + Add(LVar1, 60) + Add(LVar2, 20) + Call(PlaySoundAt, SOUND_STAR_SPIRIT_CAST_A, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SPARKLES, 0, LVar0, LVar1, LVar2, 10) + Wait(20) + Call(PlaySound, SOUND_CHIME_SOLVED_PUZZLE) + Set(LVar0, 1) + ExecWait(N(EVS_Scene_SnowmenSpeak)) + EndIf + EndSwitch + Else + Call(ShowMessageAtScreenPos, MSG_Menus_Inspect_Snowman, 160, 40) + EndIf + Unbind + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_Snowman_06) = { - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_ItemPrompt_Bucket)), TRIGGER_FORCE_ACTIVATE, 0, EVT_PTR(N(BucketList)), 0, 1) - EVT_RETURN - EVT_END + BindPadlock(Ref(N(EVS_ItemPrompt_Bucket)), TRIGGER_FORCE_ACTIVATE, 0, Ref(N(BucketList)), 0, 1) + Return + End }; EvtScript N(EVS_NpcIdle_Snowman_01) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcIdle_Snowman_02) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcIdle_Snowman_03) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcIdle_Snowman_04) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcIdle_Snowman_05) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcIdle_Snowman_06) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInit_Snowman_01) = { -EVT_END_IF -EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Snowman_01))) -EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Snowman_01))) -EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_10000000, TRUE) -EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) -EVT_RETURN -EVT_END +EndIf +Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Snowman_01))) +Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Snowman_01))) +Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_10000000, TRUE) +Call(EnableNpcShadow, NPC_SELF, FALSE) +Return +End }; EvtScript N(EVS_NpcInit_Snowman_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Snowman_02))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Snowman_02))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_10000000, TRUE) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Snowman_02))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Snowman_02))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_10000000, TRUE) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Snowman_03) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Snowman_03))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Snowman_03))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_10000000, TRUE) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Snowman_03))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Snowman_03))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_10000000, TRUE) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Snowman_04) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Snowman_04))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Snowman_04))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_10000000, TRUE) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Snowman_04))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Snowman_04))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_10000000, TRUE) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Snowman_05) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Snowman_05))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Snowman_05))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_10000000, TRUE) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Snowman_05))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Snowman_05))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_10000000, TRUE) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Snowman_06) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Snowman_06))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Snowman_06))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_10000000, TRUE) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Snowman_06))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Snowman_06))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_10000000, TRUE) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Dummy) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_10000000, TRUE) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_10000000, TRUE) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Return + End }; NpcData N(NpcData_Snowmen)[] = { diff --git a/src/world/area_sam/sam_04/sam_04_5_entity.c b/src/world/area_sam/sam_04/sam_04_5_entity.c index b41503d3a7d..0775a85f3c1 100644 --- a/src/world/area_sam/sam_04/sam_04_5_entity.c +++ b/src/world/area_sam/sam_04/sam_04_5_entity.c @@ -2,11 +2,11 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 40, 0, 400, 0, MODEL_ground, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_SAM04_HiddenPanel) - EVT_CALL(MakeItemEntity, ITEM_LETTER_TO_MAYOR_PENGUIN, -290, 70, 110, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SAM04_Item_Letter05) - EVT_SET(MV_LetterItemID, LVar0) - EVT_CALL(MakeItemEntity, ITEM_REPEL_GEL, 426, 0, -172, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SAM04_Item_RepelGel) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HiddenPanel), 40, 0, 400, 0, MODEL_ground, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_SAM04_HiddenPanel) + Call(MakeItemEntity, ITEM_LETTER_TO_MAYOR_PENGUIN, -290, 70, 110, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SAM04_Item_Letter05) + Set(MV_LetterItemID, LVar0) + Call(MakeItemEntity, ITEM_REPEL_GEL, 426, 0, -172, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SAM04_Item_RepelGel) + Return + End }; diff --git a/src/world/area_sam/sam_05/sam_05_1_music.c b/src/world/area_sam/sam_05/sam_05_1_music.c index b66eff7c9e8..56881a5cb41 100644 --- a/src/world/area_sam/sam_05/sam_05_1_music.c +++ b/src/world/area_sam/sam_05/sam_05_1_music.c @@ -1,7 +1,7 @@ #include "sam_05.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_SHIVER_SNOWFIELD, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_SHIVER_SNOWFIELD, 0, 8) + Return + End }; diff --git a/src/world/area_sam/sam_05/sam_05_2_main.c b/src/world/area_sam/sam_05/sam_05_2_main.c index 12813baff0c..5287c615cf4 100644 --- a/src/world/area_sam/sam_05/sam_05_2_main.c +++ b/src/world/area_sam/sam_05/sam_05_2_main.c @@ -5,33 +5,33 @@ EvtScript N(EVS_ExitWalk_sam_04_1) = EVT_EXIT_WALK(60, sam_05_ENTRY_0, "sam_04", EvtScript N(EVS_ExitWalk_sam_06_0) = EVT_EXIT_WALK(60, sam_05_ENTRY_1, "sam_06", sam_06_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sam_04_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sam_06_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sam_04_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sam_06_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHIVER_SNOWFIELD) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_IF_LT(GB_StoryProgress, STORY_CH7_DEFEATED_MONSTAR) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(BeforeNPCs))) - EVT_ELSE - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(AfterNPCs))) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_PLAY_EFFECT(EFFECT_SNOWFALL, 0, 120) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_ground, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o55, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o59, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o60, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilie, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deiliw, SURFACE_TYPE_SNOW) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_SHIVER_SNOWFIELD) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + IfLt(GB_StoryProgress, STORY_CH7_DEFEATED_MONSTAR) + Call(MakeNpcs, FALSE, Ref(N(BeforeNPCs))) + Else + Call(MakeNpcs, FALSE, Ref(N(AfterNPCs))) + EndIf + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupMusic)) + PlayEffect(EFFECT_SNOWFALL, 0, 120) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_ground, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o55, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o59, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o60, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilie, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deiliw, SURFACE_TYPE_SNOW) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; diff --git a/src/world/area_sam/sam_05/sam_05_3_entity.c b/src/world/area_sam/sam_05/sam_05_3_entity.c index 7c7e6a45885..f41401f1028 100644 --- a/src/world/area_sam/sam_05/sam_05_3_entity.c +++ b/src/world/area_sam/sam_05/sam_05_3_entity.c @@ -2,9 +2,9 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_LETTER_TO_MERLOW, 100, 0, -100, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SAM05_Item_Letter06) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 490, 140, -75, 0, ITEM_STOP_WATCH, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SAM05_HiddenItem_StopWatch) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_LETTER_TO_MERLOW, 100, 0, -100, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SAM05_Item_Letter06) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 490, 140, -75, 0, ITEM_STOP_WATCH, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SAM05_HiddenItem_StopWatch) + Return + End }; diff --git a/src/world/area_sam/sam_05/sam_05_4_npc.c b/src/world/area_sam/sam_05/sam_05_4_npc.c index bbf4eabea9c..0834ac5e65f 100644 --- a/src/world/area_sam/sam_05/sam_05_4_npc.c +++ b/src/world/area_sam/sam_05/sam_05_4_npc.c @@ -16,30 +16,30 @@ NpcSettings N(NpcSettings_Monstar) = { #include "world/common/enemy/FrostPiranha.inc.c" EvtScript N(EVS_NpcAI_Monstar) = { - EVT_LABEL(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_RETURN - EVT_END + Label(0) + Call(GetSelfVar, 0, LVar0) + Wait(1) + IfEq(LVar0, 0) + Goto(0) + EndIf + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Return + End }; extern EvtScript N(EVS_NpcAux_Monstar); EvtScript N(EVS_NpcDefeat_Monstar) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(SetNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_Monstar))) - EVT_EXEC_WAIT(N(EVS_Scene_MonstarDefeated)) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_CALL(ClearDefeatedEnemies) - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(SetNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_Monstar))) + ExecWait(N(EVS_Scene_MonstarDefeated)) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Call(ClearDefeatedEnemies) + Return + End }; INCLUDE_IMG("world/area_sam/sam_05/monstar.png", sam_05_monstar_png); @@ -112,32 +112,32 @@ API_CALLABLE(N(CheckSkipInput)) { } EvtScript N(EVS_NpcAux_Monstar) = { - EVT_CALL(N(UpdateMonstarSpriteEffects)) - EVT_RETURN - EVT_END + Call(N(UpdateMonstarSpriteEffects)) + Return + End }; EvtScript N(EVS_NpcInit_Monstar) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcVar, NPC_Monstar, 3, 255) - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_Monstar))) - EVT_IF_GE(GB_StoryProgress, STORY_CH7_DEFEATED_MONSTAR) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_ELSE - EVT_EXEC(N(EVS_Scene_MonstarAppears)) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Monstar))) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Monstar))) - EVT_END_IF - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(SetNpcVar, NPC_Monstar, 3, 255) + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_Monstar))) + IfGe(GB_StoryProgress, STORY_CH7_DEFEATED_MONSTAR) + Call(RemoveNpc, NPC_SELF) + Else + Exec(N(EVS_Scene_MonstarAppears)) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Monstar))) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_Monstar))) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_StarKid) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Twink_Shout) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Twink_Shout) + Return + End }; AnimID N(ExtraAnims_Monstar)[] = { diff --git a/src/world/area_sam/sam_05/sam_05_5_scenes.c b/src/world/area_sam/sam_05/sam_05_5_scenes.c index abda4ad6212..5a564cc8a98 100644 --- a/src/world/area_sam/sam_05/sam_05_5_scenes.c +++ b/src/world/area_sam/sam_05/sam_05_5_scenes.c @@ -2,101 +2,101 @@ #include "effects.h" EvtScript N(EVS_Scene_MonstarAppears) = { - EVT_SET(LFlag0, FALSE) - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_IF_LT(LVar0, 450) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterruptUsePartner) - EVT_CALL(SetMusicTrack, 0, SONG_MONSTAR_THEME, 0, 8) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH7_00E0, 160, 40) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Monstar_Idle1) - EVT_CALL(SetNpcPos, NPC_Monstar, 635, 85, 0) - EVT_CALL(NpcMoveTo, NPC_Monstar, 615, 0, 10 * DT) - EVT_LABEL(2) - EVT_CALL(GetNpcPos, NPC_Monstar, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-15.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_ADD(LVar0, -25) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(SetNpcPos, NPC_Monstar, 615, 85, 0) - EVT_WAIT(1) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_Monstar, ANIM_Monstar_Talk, ANIM_Monstar_Idle1, 256, 50, 100, MSG_CH7_00E1) - EVT_CALL(SetPlayerPos, 495, 80, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Monstar, LVar3, LVar4, LVar5) - EVT_ADDF(LVar0, LVar3) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_DIVF(LVar0, EVT_FLOAT(2.0)) - EVT_DIVF(LVar1, EVT_FLOAT(2.0)) - EVT_DIVF(LVar2, EVT_FLOAT(2.0)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(425.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-9.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(5 * DT) - EVT_CALL(SpeakToPlayer, NPC_Monstar, ANIM_Monstar_Talk, ANIM_Monstar_Idle1, 256, 0, 100, MSG_CH7_00E2) - EVT_CALL(ShowChoice, MSG_Choice_0015) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ContinueSpeech, NPC_Monstar, ANIM_Monstar_HappyTalk, ANIM_Monstar_HappyTalk, 256, 0, 100, MSG_CH7_00E3) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(450.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-5.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Monstar_Idle1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_LABEL(4) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_WAIT(1) - EVT_IF_GT(LVar3, LVar0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterruptUsePartner) - EVT_CALL(SetMusicTrack, 0, SONG_MONSTAR_THEME, 0, 8) - EVT_GOTO(2) - EVT_END_IF - EVT_IF_GT(LVar3, 420) - EVT_GOTO(4) - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_Monstar, NPC_DISPOSE_LOCATION) - EVT_SET(LFlag0, FALSE) - EVT_GOTO(0) - EVT_ELSE - EVT_CALL(CloseMessage) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Monstar_RearUp) - EVT_CALL(GetNpcPos, NPC_Monstar, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -35) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-12.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Monstar, ANIM_Monstar_RearUp, ANIM_Monstar_RearUp, 256, 0, 200, MSG_CH7_00E4) - EVT_CALL(SetNpcVar, NPC_Monstar, 0, 1) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LFlag0, FALSE) + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + IfLt(LVar0, 450) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Call(InterruptUsePartner) + Call(SetMusicTrack, 0, SONG_MONSTAR_THEME, 0, 8) + Call(ShowMessageAtScreenPos, MSG_CH7_00E0, 160, 40) + Call(SetNpcAnimation, NPC_SELF, ANIM_Monstar_Idle1) + Call(SetNpcPos, NPC_Monstar, 635, 85, 0) + Call(NpcMoveTo, NPC_Monstar, 615, 0, 10 * DT) + Label(2) + Call(GetNpcPos, NPC_Monstar, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(250.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-15.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Add(LVar0, -25) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + IfEq(LFlag0, FALSE) + Call(SetNpcPos, NPC_Monstar, 615, 85, 0) + Wait(1) + Set(LFlag0, TRUE) + EndIf + Call(SpeakToPlayer, NPC_Monstar, ANIM_Monstar_Talk, ANIM_Monstar_Idle1, 256, 50, 100, MSG_CH7_00E1) + Call(SetPlayerPos, 495, 80, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Monstar, LVar3, LVar4, LVar5) + AddF(LVar0, LVar3) + AddF(LVar1, LVar4) + AddF(LVar2, LVar5) + DivF(LVar0, Float(2.0)) + DivF(LVar1, Float(2.0)) + DivF(LVar2, Float(2.0)) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(425.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-9.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(5 * DT) + Call(SpeakToPlayer, NPC_Monstar, ANIM_Monstar_Talk, ANIM_Monstar_Idle1, 256, 0, 100, MSG_CH7_00E2) + Call(ShowChoice, MSG_Choice_0015) + IfEq(LVar0, 0) + Call(ContinueSpeech, NPC_Monstar, ANIM_Monstar_HappyTalk, ANIM_Monstar_HappyTalk, 256, 0, 100, MSG_CH7_00E3) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(450.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-5.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcAnimation, NPC_SELF, ANIM_Monstar_Idle1) + Exec(N(EVS_SetupMusic)) + Call(DisablePlayerInput, FALSE) + Label(4) + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Wait(1) + IfGt(LVar3, LVar0) + Call(DisablePlayerInput, TRUE) + Call(InterruptUsePartner) + Call(SetMusicTrack, 0, SONG_MONSTAR_THEME, 0, 8) + Goto(2) + EndIf + IfGt(LVar3, 420) + Goto(4) + EndIf + Call(SetNpcPos, NPC_Monstar, NPC_DISPOSE_LOCATION) + Set(LFlag0, FALSE) + Goto(0) + Else + Call(CloseMessage) + Call(SetNpcAnimation, NPC_SELF, ANIM_Monstar_RearUp) + Call(GetNpcPos, NPC_Monstar, LVar0, LVar1, LVar2) + Add(LVar0, -35) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-12.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Monstar, ANIM_Monstar_RearUp, ANIM_Monstar_RearUp, 256, 0, 200, MSG_CH7_00E4) + Call(SetNpcVar, NPC_Monstar, 0, 1) + EndIf + Return + End }; // npcID followed by initial pos Vec3i @@ -131,148 +131,148 @@ Vec3f N(RelativeFleePath)[] = { }; EvtScript N(EVS_StarKid_LookAroundPanic) = { - EVT_CALL(RandInt, 4, LVar0) - EVT_WAIT(LVar0) - EVT_LOOP(0) - EVT_CALL(InterpNpcYaw, LVarA, 90, 0) - EVT_WAIT(7 * DT) - EVT_CALL(InterpNpcYaw, LVarA, 270, 0) - EVT_WAIT(7 * DT) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(RandInt, 4, LVar0) + Wait(LVar0) + Loop(0) + Call(InterpNpcYaw, LVarA, 90, 0) + Wait(7 * DT) + Call(InterpNpcYaw, LVarA, 270, 0) + Wait(7 * DT) + EndLoop + Return + End }; EvtScript N(EVS_StarKid_RunAway) = { - EVT_IF_EQ(LVarA, NPC_StarKid_01) - EVT_ADD(LVarB, 40 * DT) - EVT_END_IF - EVT_EXEC_GET_TID(N(EVS_StarKid_LookAroundPanic), LVar9) - EVT_ADD(LVarB, 20 * DT) - EVT_WAIT(LVarB) - EVT_KILL_THREAD(LVar9) - EVT_CALL(PlaySoundAtNpc, LVarA, SOUND_STAR_KID_FLYING, SOUND_SPACE_DEFAULT) - EVT_CALL(GetNpcPos, LVarA, LVar7, LVar8, LVar9) - EVT_CALL(LoadPath, 60 * DT, EVT_PTR(N(RelativeFleePath)), ARRAY_COUNT(N(RelativeFleePath)), EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_ADD(LVar1, LVar7) - EVT_ADD(LVar2, LVar8) - EVT_ADD(LVar3, LVar9) - EVT_CALL(SetNpcPos, LVarA, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetNpcPos, LVarA, NPC_DISPOSE_LOCATION) - EVT_CALL(EnableNpcShadow, LVar0, FALSE) - EVT_RETURN - EVT_END + IfEq(LVarA, NPC_StarKid_01) + Add(LVarB, 40 * DT) + EndIf + ExecGetTID(N(EVS_StarKid_LookAroundPanic), LVar9) + Add(LVarB, 20 * DT) + Wait(LVarB) + KillThread(LVar9) + Call(PlaySoundAtNpc, LVarA, SOUND_STAR_KID_FLYING, SOUND_SPACE_DEFAULT) + Call(GetNpcPos, LVarA, LVar7, LVar8, LVar9) + Call(LoadPath, 60 * DT, Ref(N(RelativeFleePath)), ARRAY_COUNT(N(RelativeFleePath)), EASING_LINEAR) + Label(0) + Call(GetNextPathPos) + Add(LVar1, LVar7) + Add(LVar2, LVar8) + Add(LVar3, LVar9) + Call(SetNpcPos, LVarA, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(0) + EndIf + Call(SetNpcPos, LVarA, NPC_DISPOSE_LOCATION) + Call(EnableNpcShadow, LVar0, FALSE) + Return + End }; EvtScript N(EVS_StarKid_SpawnSparkles) = { - EVT_LOOP(20) - EVT_CALL(RandInt, 80, LVar0) - EVT_CALL(RandInt, 80, LVar1) - EVT_ADD(LVar0, 575) - EVT_ADD(LVar1, 89) - EVT_ADD(LVar2, 0) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 1, LVar0, LVar1, LVar2, 7) - EVT_WAIT(2) - EVT_CALL(RandInt, 80, LVar0) - EVT_CALL(RandInt, 80, LVar1) - EVT_ADD(LVar0, 575) - EVT_ADD(LVar1, 89) - EVT_ADD(LVar2, 0) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 1, LVar0, LVar1, LVar2, 7) - EVT_WAIT(3) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(20) + Call(RandInt, 80, LVar0) + Call(RandInt, 80, LVar1) + Add(LVar0, 575) + Add(LVar1, 89) + Add(LVar2, 0) + PlayEffect(EFFECT_SPARKLES, 1, LVar0, LVar1, LVar2, 7) + Wait(2) + Call(RandInt, 80, LVar0) + Call(RandInt, 80, LVar1) + Add(LVar0, 575) + Add(LVar1, 89) + Add(LVar2, 0) + PlayEffect(EFFECT_SPARKLES, 1, LVar0, LVar1, LVar2, 7) + Wait(3) + EndLoop + Return + End }; EvtScript N(EVS_StarKidsFlee) = { - EVT_USE_BUF(EVT_PTR(N(StarKidList))) - EVT_LOOP(0) - EVT_BUF_READ4(LVar0, LVar1, LVar2, LVar3) - EVT_IF_EQ(LVar0, -1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_END_LOOP - EVT_CALL(PlaySoundAtNpc, NPC_Monstar, SOUND_MONSTAR_BREAKS_APART, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_CALL(NpcMoveTo, NPC_Monstar, 615, -5, 10 * DT) - EVT_END_THREAD - EVT_EXEC(N(EVS_StarKid_SpawnSparkles)) - EVT_CALL(MakeLerp, 220, 0, 90, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcVar, NPC_Monstar, 3, LVar0) - EVT_SET(LVar2, 255) - EVT_SUB(LVar2, LVar0) - EVT_USE_BUF(EVT_PTR(N(StarKidList))) - EVT_LOOP(0) - EVT_BUF_READ4(LVarA, LVar9, LVar9, LVar9) - EVT_IF_EQ(LVarA, -1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(SetNpcImgFXParams, LVarA, IMGFX_SET_ALPHA, LVar2, 0, 0, 0) - EVT_END_LOOP - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_Monstar, NPC_DISPOSE_LOCATION) - EVT_WAIT(10 * DT) - EVT_USE_BUF(EVT_PTR(N(StarKidList))) - EVT_SET(LVarB, 0) - EVT_LOOP(0) - EVT_BUF_READ4(LVarA, LVar9, LVar9, LVar9) - EVT_IF_EQ(LVarA, -1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_EXEC(N(EVS_StarKid_RunAway)) - EVT_ADD(LVarB, 1) - EVT_END_LOOP - EVT_WAIT(100 * DT) - EVT_RETURN - EVT_END + UseBuf(Ref(N(StarKidList))) + Loop(0) + BufRead4(LVar0, LVar1, LVar2, LVar3) + IfEq(LVar0, -1) + BreakLoop + EndIf + Call(SetNpcPos, LVar0, LVar1, LVar2, LVar3) + EndLoop + Call(PlaySoundAtNpc, NPC_Monstar, SOUND_MONSTAR_BREAKS_APART, SOUND_SPACE_DEFAULT) + Thread + Call(NpcMoveTo, NPC_Monstar, 615, -5, 10 * DT) + EndThread + Exec(N(EVS_StarKid_SpawnSparkles)) + Call(MakeLerp, 220, 0, 90, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(SetNpcVar, NPC_Monstar, 3, LVar0) + Set(LVar2, 255) + Sub(LVar2, LVar0) + UseBuf(Ref(N(StarKidList))) + Loop(0) + BufRead4(LVarA, LVar9, LVar9, LVar9) + IfEq(LVarA, -1) + BreakLoop + EndIf + Call(SetNpcImgFXParams, LVarA, IMGFX_SET_ALPHA, LVar2, 0, 0, 0) + EndLoop + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(SetNpcPos, NPC_Monstar, NPC_DISPOSE_LOCATION) + Wait(10 * DT) + UseBuf(Ref(N(StarKidList))) + Set(LVarB, 0) + Loop(0) + BufRead4(LVarA, LVar9, LVar9, LVar9) + IfEq(LVarA, -1) + BreakLoop + EndIf + Exec(N(EVS_StarKid_RunAway)) + Add(LVarB, 1) + EndLoop + Wait(100 * DT) + Return + End }; EvtScript N(EVS_Scene_MonstarDefeated) = { - EVT_CALL(ClearDefeatedEnemies) - EVT_CALL(SetNpcFlagBits, NPC_Monstar, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcPos, NPC_Monstar, 615, 87, -4) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Monstar_Flail) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Monstar, LVar3, LVar4, LVar5) - EVT_ADDF(LVar0, LVar3) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_DIVF(LVar0, EVT_FLOAT(2.0)) - EVT_DIVF(LVar1, EVT_FLOAT(2.0)) - EVT_DIVF(LVar2, EVT_FLOAT(2.0)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(375.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-9.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Monstar, ANIM_Monstar_Flail, ANIM_Monstar_Flail, 256, 170, 150, MSG_CH7_00E8) - EVT_EXEC_WAIT(N(EVS_StarKidsFlee)) - EVT_SET(GB_StoryProgress, STORY_CH7_DEFEATED_MONSTAR) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(450.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-5.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(ClearDefeatedEnemies) + Call(SetNpcFlagBits, NPC_Monstar, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcPos, NPC_Monstar, 615, 87, -4) + Call(SetNpcAnimation, NPC_SELF, ANIM_Monstar_Flail) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Monstar, LVar3, LVar4, LVar5) + AddF(LVar0, LVar3) + AddF(LVar1, LVar4) + AddF(LVar2, LVar5) + DivF(LVar0, Float(2.0)) + DivF(LVar1, Float(2.0)) + DivF(LVar2, Float(2.0)) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(375.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-9.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Monstar, ANIM_Monstar_Flail, ANIM_Monstar_Flail, 256, 170, 150, MSG_CH7_00E8) + ExecWait(N(EVS_StarKidsFlee)) + Set(GB_StoryProgress, STORY_CH7_DEFEATED_MONSTAR) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(450.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-5.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Exec(N(EVS_SetupMusic)) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_sam/sam_06/sam_06_1_music.c b/src/world/area_sam/sam_06/sam_06_1_music.c index 252492e522b..f0f3af24642 100644 --- a/src/world/area_sam/sam_06/sam_06_1_music.c +++ b/src/world/area_sam/sam_06/sam_06_1_music.c @@ -1,13 +1,13 @@ #include "sam_06.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_STARBORN_VALLEY, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_STARBORN_VALLEY, 0, 8) + Return + End }; EvtScript N(EVS_PlayRestingSong) = { - EVT_CALL(SetMusicTrack, 0, SONG_TAKING_REST, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TAKING_REST, 0, 8) + Return + End }; diff --git a/src/world/area_sam/sam_06/sam_06_2_main.c b/src/world/area_sam/sam_06/sam_06_2_main.c index 3372d257ebe..c6a5900c6d4 100644 --- a/src/world/area_sam/sam_06/sam_06_2_main.c +++ b/src/world/area_sam/sam_06/sam_06_2_main.c @@ -75,98 +75,98 @@ EvtScript N(EVS_ExitWalk_sam_05_1) = EVT_EXIT_WALK(60, sam_06_ENTRY_0, "sam_05", MAP_RODATA_PAD(1, exits); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sam_05_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sam_05_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) + Return + End }; #include "../common/ManageSnowfall.inc.c" EvtScript N(EVS_TexPan_Fire) = { - EVT_CALL(EnableTexPanning, MODEL_hi1, TRUE) - EVT_CALL(EnableTexPanning, MODEL_hi2, TRUE) - EVT_CALL(EnableTexPanning, MODEL_hi3, TRUE) - EVT_THREAD + Call(EnableTexPanning, MODEL_hi1, TRUE) + Call(EnableTexPanning, MODEL_hi2, TRUE) + Call(EnableTexPanning, MODEL_hi3, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 50, 50, -70, 300) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_STARBORN_VALLEY) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_SET(GF_MAP_StarbornValley, TRUE) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(ClearDefeatedEnemies) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_ManageSnowfall)) - EVT_EXEC(N(EVS_TexPan_Fire)) - EVT_EXEC_WAIT(N(EVS_SetupRooms)) - EVT_CALL(SetRenderMode, MODEL_h_yuki2, RENDER_MODE_SURFACE_XLU_ZB_ZUPD) - EVT_CALL(SetRenderMode, MODEL_khm_y2, RENDER_MODE_SURFACE_XLU_ZB_ZUPD) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_ground, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilisw, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_kabe, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o262, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o263, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o264, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o265, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o266, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o267, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o268, SURFACE_TYPE_SNOW) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree3)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree4))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree4)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree5))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o225, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree5)), 1, 0) - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_WAIT(1) - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_END_IF - EVT_THREAD - EVT_SET(LVar2, 0) - EVT_LABEL(0) - EVT_CALL(MakeLerp, 100, 90, 5, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_MULF(LVar0, EVT_FLOAT(0.01)) - EVT_ADD(LVar2, 8) - EVT_MOD(LVar2, 360) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(MakeLerp, 90, 100, 5, EASING_LINEAR) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_MULF(LVar0, EVT_FLOAT(0.01)) - EVT_ADD(LVar2, 8) - EVT_MOD(LVar2, 360) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_GOTO(0) - EVT_END_THREAD - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_STARBORN_VALLEY) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Set(GF_MAP_StarbornValley, TRUE) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(ClearDefeatedEnemies) + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupMusic)) + Exec(N(EVS_ManageSnowfall)) + Exec(N(EVS_TexPan_Fire)) + ExecWait(N(EVS_SetupRooms)) + Call(SetRenderMode, MODEL_h_yuki2, RENDER_MODE_SURFACE_XLU_ZB_ZUPD) + Call(SetRenderMode, MODEL_khm_y2, RENDER_MODE_SURFACE_XLU_ZB_ZUPD) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_ground, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilisw, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_kabe, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o262, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o263, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o264, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o265, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o266, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o267, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o268, SURFACE_TYPE_SNOW) + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree3))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree3)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree4))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree4)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree5))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o225, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree5)), 1, 0) + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Wait(1) + Else + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + EndIf + Thread + Set(LVar2, 0) + Label(0) + Call(MakeLerp, 100, 90, 5, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + MulF(LVar0, Float(0.01)) + Add(LVar2, 8) + Mod(LVar2, 360) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(MakeLerp, 90, 100, 5, EASING_LINEAR) + Label(2) + Call(UpdateLerp) + MulF(LVar0, Float(0.01)) + Add(LVar2, 8) + Mod(LVar2, 360) + Wait(1) + IfEq(LVar1, 1) + Goto(2) + EndIf + Goto(0) + EndThread + Return + End }; diff --git a/src/world/area_sam/sam_06/sam_06_3_rooms.c b/src/world/area_sam/sam_06/sam_06_3_rooms.c index 4e00b2749f7..4d18c18d78f 100644 --- a/src/world/area_sam/sam_06/sam_06_3_rooms.c +++ b/src/world/area_sam/sam_06/sam_06_3_rooms.c @@ -1,117 +1,117 @@ #include "sam_06.h" EvtScript N(EVS_SetDoorRot_ToadHouse) = { - EVT_CALL(RotateModel, MODEL_khm_doa, LVar0, 0, -1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_khm_doa, LVar0, 0, -1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_ToadHouse) = { - EVT_CALL(RotateGroup, MODEL_khm_yane, LVar0, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_khm_sita, LVar0, 0, 0, -1) - EVT_IF_GT(LVar0, 89) - EVT_CALL(SetGroupVisibility, MODEL_khm_sita, MODEL_GROUP_HIDDEN) - EVT_END_IF - EVT_IF_LT(LVar0, 89) - EVT_CALL(SetGroupVisibility, MODEL_khm_sita, MODEL_GROUP_VISIBLE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(RotateGroup, MODEL_khm_yane, LVar0, 0, 0, 1) + Call(RotateGroup, MODEL_khm_sita, LVar0, 0, 0, -1) + IfGt(LVar0, 89) + Call(SetGroupVisibility, MODEL_khm_sita, MODEL_GROUP_HIDDEN) + EndIf + IfLt(LVar0, 89) + Call(SetGroupVisibility, MODEL_khm_sita, MODEL_GROUP_VISIBLE) + EndIf + Return + End }; EvtScript N(EVS_RoomListener_ToadHouse) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_SET(AF_SAM_Snowing, FALSE) - EVT_CALL(SetGroupVisibility, MODEL_kh_naiso, MODEL_GROUP_VISIBLE) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_SET(AF_SAM_Snowing, TRUE) - EVT_CALL(SetGroupVisibility, MODEL_kh_naiso, MODEL_GROUP_HIDDEN) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Set(AF_SAM_Snowing, FALSE) + Call(SetGroupVisibility, MODEL_kh_naiso, MODEL_GROUP_VISIBLE) + CaseEq(ROOM_UPDATE_EXIT_END) + Set(AF_SAM_Snowing, TRUE) + Call(SetGroupVisibility, MODEL_kh_naiso, MODEL_GROUP_HIDDEN) + EndSwitch + Return + End }; EvtScript N(EVS_SetDoorRot_MerleHouse) = { - EVT_CALL(RotateModel, MODEL_km_doa, LVar0, 0, -1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_km_doa, LVar0, 0, -1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_MerleHouse) = { - EVT_CALL(RotateGroup, MODEL_km_yane, LVar0, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_km_sita, LVar0, 0, 0, -1) - EVT_IF_GT(LVar0, 89) - EVT_CALL(SetGroupVisibility, MODEL_km_sita, MODEL_GROUP_HIDDEN) - EVT_END_IF - EVT_IF_LT(LVar0, 89) - EVT_CALL(SetGroupVisibility, MODEL_km_sita, MODEL_GROUP_VISIBLE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(RotateGroup, MODEL_km_yane, LVar0, 0, 0, 1) + Call(RotateGroup, MODEL_km_sita, LVar0, 0, 0, -1) + IfGt(LVar0, 89) + Call(SetGroupVisibility, MODEL_km_sita, MODEL_GROUP_HIDDEN) + EndIf + IfLt(LVar0, 89) + Call(SetGroupVisibility, MODEL_km_sita, MODEL_GROUP_VISIBLE) + EndIf + Return + End }; EvtScript N(EVS_RoomListener_MerleHouse) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_SET(AF_SAM_Snowing, FALSE) - EVT_CALL(SetGroupVisibility, MODEL_k_naiso, MODEL_GROUP_VISIBLE) - EVT_CALL(EnableModel, MODEL_k_naiso, TRUE) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_BEGIN) - EVT_IF_LT(GB_StoryProgress, STORY_CH7_GOT_SNOWMAN_SCARF) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_END_IF - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_SET(AF_SAM_Snowing, TRUE) - EVT_CALL(SetGroupVisibility, MODEL_k_naiso, MODEL_GROUP_HIDDEN) - EVT_IF_LT(GB_StoryProgress, STORY_CH7_GOT_SNOWMAN_SCARF) - EVT_EXEC_WAIT(N(EVS_Scene_Merle_OneLastThing)) - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Set(AF_SAM_Snowing, FALSE) + Call(SetGroupVisibility, MODEL_k_naiso, MODEL_GROUP_VISIBLE) + Call(EnableModel, MODEL_k_naiso, TRUE) + CaseEq(ROOM_UPDATE_EXIT_BEGIN) + IfLt(GB_StoryProgress, STORY_CH7_GOT_SNOWMAN_SCARF) + Call(DisablePlayerInput, TRUE) + EndIf + CaseEq(ROOM_UPDATE_EXIT_END) + Set(AF_SAM_Snowing, TRUE) + Call(SetGroupVisibility, MODEL_k_naiso, MODEL_GROUP_HIDDEN) + IfLt(GB_StoryProgress, STORY_CH7_GOT_SNOWMAN_SCARF) + ExecWait(N(EVS_Scene_Merle_OneLastThing)) + EndIf + EndSwitch + Return + End }; EvtScript N(EVS_SetDoorRot_CookHouse) = { - EVT_CALL(RotateModel, MODEL_o122, LVar0, 0, -1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o122, LVar0, 0, -1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_CookHouse) = { - EVT_CALL(RotateGroup, MODEL_hm_yane, LVar0, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_hm_sita, LVar0, 0, 0, -1) - EVT_IF_GT(LVar0, 89) - EVT_CALL(SetGroupVisibility, MODEL_hm_sita, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_hm_yane, MODEL_GROUP_HIDDEN) - EVT_CALL(EnableModel, MODEL_h_yuki1, FALSE) - EVT_CALL(EnableModel, MODEL_h_yuki2, FALSE) - EVT_CALL(EnableModel, MODEL_hm_entotu, FALSE) - EVT_CALL(EnableModel, MODEL_hm_ento2, FALSE) - EVT_END_IF - EVT_IF_LT(LVar0, 89) - EVT_CALL(SetGroupVisibility, MODEL_hm_sita, MODEL_GROUP_VISIBLE) - EVT_CALL(SetGroupVisibility, MODEL_hm_yane, MODEL_GROUP_VISIBLE) - EVT_CALL(EnableModel, MODEL_h_yuki1, TRUE) - EVT_CALL(EnableModel, MODEL_h_yuki2, TRUE) - EVT_CALL(EnableModel, MODEL_hm_entotu, TRUE) - EVT_CALL(EnableModel, MODEL_hm_ento2, TRUE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(RotateGroup, MODEL_hm_yane, LVar0, 0, 0, 1) + Call(RotateGroup, MODEL_hm_sita, LVar0, 0, 0, -1) + IfGt(LVar0, 89) + Call(SetGroupVisibility, MODEL_hm_sita, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_hm_yane, MODEL_GROUP_HIDDEN) + Call(EnableModel, MODEL_h_yuki1, FALSE) + Call(EnableModel, MODEL_h_yuki2, FALSE) + Call(EnableModel, MODEL_hm_entotu, FALSE) + Call(EnableModel, MODEL_hm_ento2, FALSE) + EndIf + IfLt(LVar0, 89) + Call(SetGroupVisibility, MODEL_hm_sita, MODEL_GROUP_VISIBLE) + Call(SetGroupVisibility, MODEL_hm_yane, MODEL_GROUP_VISIBLE) + Call(EnableModel, MODEL_h_yuki1, TRUE) + Call(EnableModel, MODEL_h_yuki2, TRUE) + Call(EnableModel, MODEL_hm_entotu, TRUE) + Call(EnableModel, MODEL_hm_ento2, TRUE) + EndIf + Return + End }; EvtScript N(EVS_RoomListener_CookHouse) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_SET(AF_SAM_Snowing, FALSE) - EVT_CALL(SetGroupVisibility, MODEL_h_naiso, MODEL_GROUP_VISIBLE) - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_SET(AF_SAM_Snowing, TRUE) - EVT_CALL(SetGroupVisibility, MODEL_h_naiso, MODEL_GROUP_HIDDEN) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Set(AF_SAM_Snowing, FALSE) + Call(SetGroupVisibility, MODEL_h_naiso, MODEL_GROUP_VISIBLE) + CaseEq(ROOM_UPDATE_EXIT_END) + Set(AF_SAM_Snowing, TRUE) + Call(SetGroupVisibility, MODEL_h_naiso, MODEL_GROUP_HIDDEN) + EndSwitch + Return + End }; s32 N(InteriorNPCs_ToadHouse)[] = { @@ -134,41 +134,41 @@ s32 N(InteriorNPCs_CookHouse)[] = { EvtScript N(EVS_SetupRooms) = { // toad house - EVT_CALL(SetGroupVisibility, MODEL_kh_naiso, MODEL_GROUP_HIDDEN) - EVT_CALL(CreateMapRoom, + Call(SetGroupVisibility, MODEL_kh_naiso, MODEL_GROUP_HIDDEN) + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_LEFT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_ToadHouse)), - EVT_PTR(N(EVS_SetWallRot_ToadHouse)), + Ref(N(EVS_SetDoorRot_ToadHouse)), + Ref(N(EVS_SetWallRot_ToadHouse)), NULL, - EVT_PTR(N(EVS_RoomListener_ToadHouse)), + Ref(N(EVS_RoomListener_ToadHouse)), COLLIDER_kh_d1, COLLIDER_kh_d2, MODEL_kinohuse, - EVT_PTR(N(InteriorNPCs_ToadHouse))) + Ref(N(InteriorNPCs_ToadHouse))) // merle's house - EVT_CALL(SetGroupVisibility, MODEL_k_naiso, MODEL_GROUP_HIDDEN) - EVT_CALL(CreateMapRoom, + Call(SetGroupVisibility, MODEL_k_naiso, MODEL_GROUP_HIDDEN) + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_LEFT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_MerleHouse)), - EVT_PTR(N(EVS_SetWallRot_MerleHouse)), + Ref(N(EVS_SetDoorRot_MerleHouse)), + Ref(N(EVS_SetWallRot_MerleHouse)), NULL, - EVT_PTR(N(EVS_RoomListener_MerleHouse)), + Ref(N(EVS_RoomListener_MerleHouse)), COLLIDER_k_d1, COLLIDER_k_d2, MODEL_k, - EVT_PTR(N(InteriorNPCs_MerleHouse))) + Ref(N(InteriorNPCs_MerleHouse))) // cooking house - EVT_CALL(SetGroupVisibility, MODEL_h_naiso, MODEL_GROUP_HIDDEN) - EVT_CALL(CreateMapRoom, + Call(SetGroupVisibility, MODEL_h_naiso, MODEL_GROUP_HIDDEN) + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_LEFT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_CookHouse)), - EVT_PTR(N(EVS_SetWallRot_CookHouse)), + Ref(N(EVS_SetDoorRot_CookHouse)), + Ref(N(EVS_SetWallRot_CookHouse)), NULL, - EVT_PTR(N(EVS_RoomListener_CookHouse)), + Ref(N(EVS_RoomListener_CookHouse)), COLLIDER_h_doa1, COLLIDER_h_doa2, MODEL_hakun, - EVT_PTR(N(InteriorNPCs_CookHouse))) - EVT_RETURN - EVT_END + Ref(N(InteriorNPCs_CookHouse))) + Return + End }; diff --git a/src/world/area_sam/sam_06/sam_06_4_npc.c b/src/world/area_sam/sam_06/sam_06_4_npc.c index 440b861c99d..d5895677ad4 100644 --- a/src/world/area_sam/sam_06/sam_06_4_npc.c +++ b/src/world/area_sam/sam_06/sam_06_4_npc.c @@ -13,9 +13,9 @@ MobileAISettings N(AISettings_Ninji_Wander) = { }; EvtScript N(EVS_NpcAI_Ninji_Wander) = { - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_Ninji_Wander))) - EVT_RETURN - EVT_END + Call(BasicAI_Main, Ref(N(AISettings_Ninji_Wander))) + Return + End }; NpcSettings N(NpcSettings_Ninji_Wander) = { @@ -34,9 +34,9 @@ MobileAISettings N(AISettings_ShiverToad_Wander) = { }; EvtScript N(EVS_NpcAI_ShiverToad_Wander) = { - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_ShiverToad_Wander))) - EVT_RETURN - EVT_END + Call(BasicAI_Main, Ref(N(AISettings_ShiverToad_Wander))) + Return + End }; NpcSettings N(NpcSettings_ShiverToad_Wander) = { @@ -87,198 +87,198 @@ s32 N(LetterList_FrostT)[] = { }; EvtScript N(EVS_LetterPrompt_FrostT) = { - EVT_CALL(N(LetterDelivery_Init), + Call(N(LetterDelivery_Init), NPC_ShiverToad_03, ANIM_ShiverToad_Green_Talk, ANIM_ShiverToad_Green_Idle, ITEM_LETTER_CHAIN_FROST_T, ITEM_LETTER_CHAIN_GOOMPAPA_2, MSG_CH7_00FE, MSG_CH7_00FF, MSG_CH7_0100, MSG_CH7_0101, - EVT_PTR(N(LetterList_FrostT))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) - EVT_RETURN - EVT_END + Ref(N(LetterList_FrostT))) + ExecWait(N(EVS_DoLetterDelivery)) + Return + End }; EvtScript N(EVS_NpcInteract_Merle) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_UNLOCKED_SHIVER_MOUNTAIN) - EVT_CALL(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00F4) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00F5) - EVT_CASE_GE(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_IF_EQ(GF_SAM06_Merle_HeardLongerMessage, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00F6) - EVT_SET(GF_SAM06_Merle_HeardLongerMessage, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00F7) - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_UNLOCKED_SHIVER_MOUNTAIN) + Call(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00F4) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00F5) + CaseGe(STORY_CH7_STAR_SPRIT_DEPARTED) + IfEq(GF_SAM06_Merle_HeardLongerMessage, FALSE) + Call(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00F6) + Set(GF_SAM06_Merle_HeardLongerMessage, TRUE) + Else + Call(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00F7) + EndIf + EndSwitch + Return + End }; EvtScript N(EVS_Merle_CarryScarf) = { - EVT_LABEL(0) - EVT_CALL(GetNpcPos, NPC_Merle, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_ADD(LVar1, 15) - EVT_CALL(GetNpcYaw, NPC_Merle, LVar3) - EVT_IF_GE(LVar3, 90) - EVT_IF_LE(LVar3, 270) - EVT_ADD(LVar2, 10) - EVT_ELSE - EVT_ADD(LVar2, -10) - EVT_END_IF - EVT_ELSE - EVT_ADD(LVar2, -10) - EVT_END_IF - EVT_CALL(SetItemPos, MV_ScarfItemID, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetNpcPos, NPC_Merle, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Add(LVar1, 15) + Call(GetNpcYaw, NPC_Merle, LVar3) + IfGe(LVar3, 90) + IfLe(LVar3, 270) + Add(LVar2, 10) + Else + Add(LVar2, -10) + EndIf + Else + Add(LVar2, -10) + EndIf + Call(SetItemPos, MV_ScarfItemID, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_Merle_HandOverScarf) = { - EVT_SET(LVar4, 10) - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_Merle, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 5) - EVT_ADD(LVar1, 15) - EVT_CALL(GetNpcYaw, NPC_Merle, LVar3) - EVT_IF_GE(LVar3, 90) - EVT_IF_LE(LVar3, 270) - EVT_ADD(LVar2, LVar4) - EVT_ELSE - EVT_SUB(LVar2, LVar4) - EVT_END_IF - EVT_ELSE - EVT_SUB(LVar2, LVar4) - EVT_END_IF - EVT_CALL(SetItemPos, MV_ScarfItemID, LVar0, LVar1, LVar2) - EVT_ADD(LVar4, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(LVar4, 10) + Loop(10) + Call(GetNpcPos, NPC_Merle, LVar0, LVar1, LVar2) + Add(LVar0, 5) + Add(LVar1, 15) + Call(GetNpcYaw, NPC_Merle, LVar3) + IfGe(LVar3, 90) + IfLe(LVar3, 270) + Add(LVar2, LVar4) + Else + Sub(LVar2, LVar4) + EndIf + Else + Sub(LVar2, LVar4) + EndIf + Call(SetItemPos, MV_ScarfItemID, LVar0, LVar1, LVar2) + Add(LVar4, 1) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_Scene_Merle_Greeting) = { - EVT_CALL(WaitForPlayerInputEnabled) - EVT_WAIT(1) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_EQ(LVar0, PARTNER_LAKILESTER) - EVT_CALL(InterruptUsePartner) - EVT_CALL(WaitForPlayerTouchingFloor) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PlayerMoveTo, -240, 300, 0) - EVT_CALL(PlayerFaceNpc, NPC_Merle, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00E9) - EVT_CALL(GetNpcPos, NPC_Merle, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00EA) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -250, 0, 300) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -250, 0, 300) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(500.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcAnimation, NPC_Merle, ANIM_Merle_Walk) - EVT_CALL(SetNpcSpeed, NPC_Merle, EVT_FLOAT(3.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Merle, -110, 300, 0) - EVT_CALL(SetNpcAnimation, NPC_Merle, ANIM_Merle_Idle) - EVT_CALL(GetAngleToPlayer, NPC_Merle, LVar0) - EVT_CALL(InterpNpcYaw, NPC_Merle, LVar0, 0) - EVT_CALL(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00EB) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_SET(AF_SAM_05, TRUE) - EVT_SET(GB_StoryProgress, STORY_CH7_ARRIVED_AT_STARBORN_VALLEY) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_SET(MF_MerleReady, FALSE) - EVT_THREAD - EVT_CALL(BindNpcInteract, NPC_Merle, 0) - EVT_CALL(SetNpcFlagBits, NPC_Merle, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Merle, ANIM_Merle_Walk) - EVT_CALL(SetNpcSpeed, NPC_Merle, EVT_FLOAT(2.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Merle, -78, 287, 0) - EVT_CALL(SetNpcJumpscale, NPC_Merle, EVT_FLOAT(0.5)) - EVT_CALL(NpcJump0, NPC_Merle, -25, 20, 253, 17) - EVT_CALL(SetNpcAnimation, NPC_Merle, ANIM_Merle_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Merle, ANIM_Merle_Walk) - EVT_CALL(NpcJump0, NPC_Merle, -40, 45, 188, 17) - EVT_CALL(SetNpcAnimation, NPC_Merle, ANIM_Merle_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Merle, ANIM_Merle_Walk) - EVT_CALL(NpcMoveTo, NPC_Merle, -90, 190, 0) - EVT_CALL(SetNpcAnimation, NPC_Merle, ANIM_Merle_Idle) - EVT_SET(MF_MerleReady, TRUE) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(WaitForPlayerInputEnabled) + Wait(1) + Call(GetPartnerInUse, LVar0) + IfEq(LVar0, PARTNER_LAKILESTER) + Call(InterruptUsePartner) + Call(WaitForPlayerTouchingFloor) + EndIf + Call(DisablePlayerInput, TRUE) + Call(SetPlayerSpeed, Float(3.0 / DT)) + Call(PlayerMoveTo, -240, 300, 0) + Call(PlayerFaceNpc, NPC_Merle, FALSE) + Call(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00E9) + Call(GetNpcPos, NPC_Merle, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(250.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-7.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00EA) + Call(UseSettingsFrom, CAM_DEFAULT, -250, 0, 300) + Call(SetPanTarget, CAM_DEFAULT, -250, 0, 300) + Call(SetCamDistance, CAM_DEFAULT, Float(500.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetNpcAnimation, NPC_Merle, ANIM_Merle_Walk) + Call(SetNpcSpeed, NPC_Merle, Float(3.0 / DT)) + Call(NpcMoveTo, NPC_Merle, -110, 300, 0) + Call(SetNpcAnimation, NPC_Merle, ANIM_Merle_Idle) + Call(GetAngleToPlayer, NPC_Merle, LVar0) + Call(InterpNpcYaw, NPC_Merle, LVar0, 0) + Call(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00EB) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Set(AF_SAM_05, TRUE) + Set(GB_StoryProgress, STORY_CH7_ARRIVED_AT_STARBORN_VALLEY) + Call(DisablePlayerInput, FALSE) + Set(MF_MerleReady, FALSE) + Thread + Call(BindNpcInteract, NPC_Merle, 0) + Call(SetNpcFlagBits, NPC_Merle, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_Merle, ANIM_Merle_Walk) + Call(SetNpcSpeed, NPC_Merle, Float(2.0 / DT)) + Call(NpcMoveTo, NPC_Merle, -78, 287, 0) + Call(SetNpcJumpscale, NPC_Merle, Float(0.5)) + Call(NpcJump0, NPC_Merle, -25, 20, 253, 17) + Call(SetNpcAnimation, NPC_Merle, ANIM_Merle_Idle) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Merle, ANIM_Merle_Walk) + Call(NpcJump0, NPC_Merle, -40, 45, 188, 17) + Call(SetNpcAnimation, NPC_Merle, ANIM_Merle_Idle) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Merle, ANIM_Merle_Walk) + Call(NpcMoveTo, NPC_Merle, -90, 190, 0) + Call(SetNpcAnimation, NPC_Merle, ANIM_Merle_Idle) + Set(MF_MerleReady, TRUE) + EndThread + Return + End }; EvtScript N(EVS_Scene_Merle_WaitingOnHill) = { - EVT_LABEL(60) - EVT_CALL(GetPlayerActionState, LVar0) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, ACTION_STATE_JUMP) - EVT_GOTO(60) - EVT_END_IF - EVT_IF_EQ(LVar0, ACTION_STATE_FALLING) - EVT_GOTO(60) - EVT_END_IF - EVT_IF_LT(LVar1, -60) - EVT_GOTO(60) - EVT_END_IF - EVT_IF_LT(LVar2, 20) - EVT_GOTO(60) - EVT_END_IF - EVT_IF_GT(LVar3, 300) - EVT_GOTO(60) - EVT_END_IF - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_EQ(LVar0, PARTNER_LAKILESTER) - EVT_CALL(InterruptUsePartner) - EVT_CALL(WaitForPlayerTouchingFloor) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_EQ(MF_MerleReady, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlayerFaceNpc, NPC_Merle, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00EC) - EVT_SET(GB_StoryProgress, STORY_CH7_MERLE_APOLOGIZED) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_SET(MF_MerleReady, FALSE) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Merle, ANIM_Merle_Walk) - EVT_CALL(NpcMoveTo, NPC_Merle, -110, 145, 0) - EVT_CALL(NpcJump0, NPC_Merle, -131, 60, 91, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Merle, ANIM_Merle_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Merle, ANIM_Merle_Walk) - EVT_CALL(NpcJump0, NPC_Merle, -117, 90, 7, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Merle, ANIM_Merle_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Merle, ANIM_Merle_Walk) - EVT_CALL(NpcMoveTo, NPC_Merle, 0, -143, 0) - EVT_CALL(InterpNpcYaw, NPC_Merle, 270, 0) - EVT_CALL(SetNpcAnimation, NPC_Merle, ANIM_Merle_Idle) - EVT_SET(MF_MerleReady, TRUE) - EVT_END_THREAD - EVT_RETURN - EVT_END + Label(60) + Call(GetPlayerActionState, LVar0) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, ACTION_STATE_JUMP) + Goto(60) + EndIf + IfEq(LVar0, ACTION_STATE_FALLING) + Goto(60) + EndIf + IfLt(LVar1, -60) + Goto(60) + EndIf + IfLt(LVar2, 20) + Goto(60) + EndIf + IfGt(LVar3, 300) + Goto(60) + EndIf + Call(GetPartnerInUse, LVar0) + IfEq(LVar0, PARTNER_LAKILESTER) + Call(InterruptUsePartner) + Call(WaitForPlayerTouchingFloor) + EndIf + Call(DisablePlayerInput, TRUE) + Loop(0) + Wait(1) + IfEq(MF_MerleReady, TRUE) + BreakLoop + EndIf + EndLoop + Call(PlayerFaceNpc, NPC_Merle, FALSE) + Call(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00EC) + Set(GB_StoryProgress, STORY_CH7_MERLE_APOLOGIZED) + Call(DisablePlayerInput, FALSE) + Set(MF_MerleReady, FALSE) + Thread + Call(SetNpcAnimation, NPC_Merle, ANIM_Merle_Walk) + Call(NpcMoveTo, NPC_Merle, -110, 145, 0) + Call(NpcJump0, NPC_Merle, -131, 60, 91, 20 * DT) + Call(SetNpcAnimation, NPC_Merle, ANIM_Merle_Idle) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Merle, ANIM_Merle_Walk) + Call(NpcJump0, NPC_Merle, -117, 90, 7, 20 * DT) + Call(SetNpcAnimation, NPC_Merle, ANIM_Merle_Idle) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Merle, ANIM_Merle_Walk) + Call(NpcMoveTo, NPC_Merle, 0, -143, 0) + Call(InterpNpcYaw, NPC_Merle, 270, 0) + Call(SetNpcAnimation, NPC_Merle, ANIM_Merle_Idle) + Set(MF_MerleReady, TRUE) + EndThread + Return + End }; API_CALLABLE(N(func_80242538_D223C8)) { @@ -317,581 +317,581 @@ API_CALLABLE(N(func_80242538_D223C8)) { } EvtScript N(EVS_Scene_Merle_EnterHouse) = { - EVT_CALL(AwaitPlayerApproach, 0, -140, 60) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_EQ(LVar0, PARTNER_LAKILESTER) - EVT_CALL(InterruptUsePartner) - EVT_CALL(WaitForPlayerTouchingFloor) - EVT_END_IF - EVT_CALL(WaitForPlayerTouchingFloor) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_EQ(MF_MerleReady, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(MF_MerleReady, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00ED) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Merle, ANIM_Merle_Walk) - EVT_CALL(SetNpcSpeed, NPC_Merle, EVT_FLOAT(3.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Merle, 27, -120, 0) - EVT_END_THREAD - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PlayerMoveTo, 15, -90, 0) - EVT_CALL(SetGroupVisibility, MODEL_k_naiso, MODEL_GROUP_VISIBLE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_k_d1, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 90, 10, EASING_QUADRATIC_OUT) - EVT_LABEL(70) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_km_doa, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(70) - EVT_END_IF - EVT_SET(AF_SAM_Snowing, FALSE) - EVT_CALL(SetGroupVisibility, MODEL_k_naiso, MODEL_GROUP_VISIBLE) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Merle, ANIM_Merle_Walk) - EVT_CALL(SetNpcSpeed, NPC_Merle, EVT_FLOAT(4.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_Merle, 0, -330, 0) - EVT_CALL(SetNpcAnimation, NPC_Merle, ANIM_Merle_Idle) - EVT_END_THREAD - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.8 / DT)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_k_d1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_k_d2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlayerMoveTo, 0, -200, 0) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_SET(LVarF, MODEL_k) - EVT_CALL(SetNpcFlagBits, NPC_Merle, NPC_FLAG_HIDING, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_StarKid_03, NPC_FLAG_HIDING, TRUE) - EVT_CALL(N(func_80242538_D223C8)) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 0, 90, 10, EASING_QUADRATIC_IN) - EVT_LABEL(71) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_km_yane, LVar0, 0, 0, 1) - EVT_CALL(RotateGroup, MODEL_km_sita, LVar0, 0, 0, -1) - EVT_SET(LVar2, 90) - EVT_SUB(LVar2, LVar0) - EVT_CALL(RotateModel, MODEL_km_doa, LVar2, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(71) - EVT_END_IF - EVT_CALL(SetGroupVisibility, MODEL_km_sita, MODEL_GROUP_HIDDEN) - EVT_CALL(PlaySoundAtCollider, COLLIDER_k_d1, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_CALL(PlayerMoveTo, 0, -240, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_k_d1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_k_d2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(30 * DT) - EVT_CALL(GetAngleToPlayer, NPC_Merle, LVar0) - EVT_CALL(InterpNpcYaw, NPC_Merle, LVar0, 0) - EVT_CALL(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00EE) - EVT_CALL(GetNpcPos, NPC_Merle, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(200.7), EVT_FLOAT(-321.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(0.7), EVT_FLOAT(-321.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(21.0), EVT_FLOAT(-14.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(5 * DT) - EVT_CALL(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00EF) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00F0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(275.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(200.7), EVT_FLOAT(-250.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(0.7), EVT_FLOAT(-250.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(21.0), EVT_FLOAT(-14.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetNpcSpeed, NPC_Merle, EVT_FLOAT(2.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_Merle, ANIM_Merle_Walk) - EVT_EXEC_GET_TID(N(EVS_Merle_CarryScarf), LVarA) - EVT_CALL(NpcMoveTo, NPC_Merle, 0, -275, 0) - EVT_KILL_THREAD(LVarA) - EVT_EXEC_GET_TID(N(EVS_Merle_HandOverScarf), LVarA) - EVT_WAIT(20 * DT) - EVT_KILL_THREAD(LVarA) - EVT_CALL(SetItemPos, MV_ScarfItemID, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcAnimation, NPC_Merle, ANIM_Merle_Idle) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) + Call(AwaitPlayerApproach, 0, -140, 60) + Call(GetPartnerInUse, LVar0) + IfEq(LVar0, PARTNER_LAKILESTER) + Call(InterruptUsePartner) + Call(WaitForPlayerTouchingFloor) + EndIf + Call(WaitForPlayerTouchingFloor) + Call(DisablePlayerInput, TRUE) + Loop(0) + Wait(1) + IfEq(MF_MerleReady, TRUE) + BreakLoop + EndIf + EndLoop + Set(MF_MerleReady, FALSE) + Call(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00ED) + Thread + Call(SetNpcAnimation, NPC_Merle, ANIM_Merle_Walk) + Call(SetNpcSpeed, NPC_Merle, Float(3.0 / DT)) + Call(NpcMoveTo, NPC_Merle, 27, -120, 0) + EndThread + Call(SetPlayerSpeed, Float(3.0 / DT)) + Call(PlayerMoveTo, 15, -90, 0) + Call(SetGroupVisibility, MODEL_k_naiso, MODEL_GROUP_VISIBLE) + Call(PlaySoundAtCollider, COLLIDER_k_d1, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 90, 10, EASING_QUADRATIC_OUT) + Label(70) + Call(UpdateLerp) + Call(RotateModel, MODEL_km_doa, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(70) + EndIf + Set(AF_SAM_Snowing, FALSE) + Call(SetGroupVisibility, MODEL_k_naiso, MODEL_GROUP_VISIBLE) + Thread + Call(SetNpcAnimation, NPC_Merle, ANIM_Merle_Walk) + Call(SetNpcSpeed, NPC_Merle, Float(4.0 / DT)) + Call(NpcMoveTo, NPC_Merle, 0, -330, 0) + Call(SetNpcAnimation, NPC_Merle, ANIM_Merle_Idle) + EndThread + Call(SetCamSpeed, CAM_DEFAULT, Float(1.8 / DT)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_k_d1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_k_d2, COLLIDER_FLAGS_UPPER_MASK) + Call(PlayerMoveTo, 0, -200, 0) + Thread + Set(LVar0, 0) + Set(LVarF, MODEL_k) + Call(SetNpcFlagBits, NPC_Merle, NPC_FLAG_HIDING, FALSE) + Call(SetNpcFlagBits, NPC_StarKid_03, NPC_FLAG_HIDING, TRUE) + Call(N(func_80242538_D223C8)) + EndThread + Thread + Call(MakeLerp, 0, 90, 10, EASING_QUADRATIC_IN) + Label(71) + Call(UpdateLerp) + Call(RotateGroup, MODEL_km_yane, LVar0, 0, 0, 1) + Call(RotateGroup, MODEL_km_sita, LVar0, 0, 0, -1) + Set(LVar2, 90) + Sub(LVar2, LVar0) + Call(RotateModel, MODEL_km_doa, LVar2, 0, -1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(71) + EndIf + Call(SetGroupVisibility, MODEL_km_sita, MODEL_GROUP_HIDDEN) + Call(PlaySoundAtCollider, COLLIDER_k_d1, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + EndThread + Call(PlayerMoveTo, 0, -240, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_k_d1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_k_d2, COLLIDER_FLAGS_UPPER_MASK) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Wait(30 * DT) + Call(GetAngleToPlayer, NPC_Merle, LVar0) + Call(InterpNpcYaw, NPC_Merle, LVar0, 0) + Call(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00EE) + Call(GetNpcPos, NPC_Merle, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(250.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(200.7), Float(-321.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(0.7), Float(-321.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(21.0), Float(-14.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(5 * DT) + Call(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00EF) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00F0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(275.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(200.7), Float(-250.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(0.7), Float(-250.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(21.0), Float(-14.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetNpcSpeed, NPC_Merle, Float(2.0 / DT)) + Call(SetNpcAnimation, NPC_Merle, ANIM_Merle_Walk) + ExecGetTID(N(EVS_Merle_CarryScarf), LVarA) + Call(NpcMoveTo, NPC_Merle, 0, -275, 0) + KillThread(LVarA) + ExecGetTID(N(EVS_Merle_HandOverScarf), LVarA) + Wait(20 * DT) + KillThread(LVarA) + Call(SetItemPos, MV_ScarfItemID, NPC_DISPOSE_LOCATION) + Call(SetNpcAnimation, NPC_Merle, ANIM_Merle_Idle) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) EVT_GIVE_KEY_REWARD(ITEM_SNOWMAN_SCARF) - EVT_CALL(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00F1) - EVT_WAIT(10 * DT) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(200.7), EVT_FLOAT(-321.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(0.7), EVT_FLOAT(-321.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.7)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetNpcSpeed, NPC_Merle, EVT_FLOAT(2.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_Merle, ANIM_Merle_Walk) - EVT_CALL(NpcMoveTo, NPC_Merle, 0, -330, 0) - EVT_CALL(SetNpcAnimation, NPC_Merle, ANIM_Merle_Idle) - EVT_CALL(GetAngleToPlayer, NPC_Merle, LVar0) - EVT_CALL(InterpNpcYaw, NPC_Merle, LVar0, 0) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(15 * DT) - EVT_CALL(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00F2) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(BindNpcInteract, NPC_Merle, EVT_PTR(N(EVS_NpcInteract_Merle))) - EVT_CALL(SetNpcFlagBits, NPC_Merle, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00F1) + Wait(10 * DT) + Call(SetCamPosA, CAM_DEFAULT, Float(200.7), Float(-321.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(0.7), Float(-321.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.7)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetNpcSpeed, NPC_Merle, Float(2.0 / DT)) + Call(SetNpcAnimation, NPC_Merle, ANIM_Merle_Walk) + Call(NpcMoveTo, NPC_Merle, 0, -330, 0) + Call(SetNpcAnimation, NPC_Merle, ANIM_Merle_Idle) + Call(GetAngleToPlayer, NPC_Merle, LVar0) + Call(InterpNpcYaw, NPC_Merle, LVar0, 0) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(15 * DT) + Call(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00F2) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(BindNpcInteract, NPC_Merle, Ref(N(EVS_NpcInteract_Merle))) + Call(SetNpcFlagBits, NPC_Merle, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcIdle_Merle) = { - EVT_WAIT(3) - EVT_IF_LT(GB_StoryProgress, STORY_CH7_ARRIVED_AT_STARBORN_VALLEY) - EVT_EXEC_WAIT(N(EVS_Scene_Merle_Greeting)) - EVT_EXEC_WAIT(N(EVS_Scene_Merle_WaitingOnHill)) - EVT_EXEC_WAIT(N(EVS_Scene_Merle_EnterHouse)) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GB_StoryProgress, STORY_CH7_ARRIVED_AT_STARBORN_VALLEY) - EVT_CALL(SetNpcPos, NPC_Merle, -90, 45, 190) - EVT_CALL(InterpNpcYaw, NPC_Merle, 270, 0) - EVT_SET(MF_MerleReady, TRUE) - EVT_EXEC_WAIT(N(EVS_Scene_Merle_WaitingOnHill)) - EVT_EXEC_WAIT(N(EVS_Scene_Merle_EnterHouse)) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GB_StoryProgress, STORY_CH7_MERLE_APOLOGIZED) - EVT_CALL(SetNpcPos, NPC_Merle, 0, 90, -143) - EVT_CALL(InterpNpcYaw, NPC_Merle, 270, 0) - EVT_SET(MF_MerleReady, TRUE) - EVT_EXEC_WAIT(N(EVS_Scene_Merle_EnterHouse)) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + Wait(3) + IfLt(GB_StoryProgress, STORY_CH7_ARRIVED_AT_STARBORN_VALLEY) + ExecWait(N(EVS_Scene_Merle_Greeting)) + ExecWait(N(EVS_Scene_Merle_WaitingOnHill)) + ExecWait(N(EVS_Scene_Merle_EnterHouse)) + Return + EndIf + IfEq(GB_StoryProgress, STORY_CH7_ARRIVED_AT_STARBORN_VALLEY) + Call(SetNpcPos, NPC_Merle, -90, 45, 190) + Call(InterpNpcYaw, NPC_Merle, 270, 0) + Set(MF_MerleReady, TRUE) + ExecWait(N(EVS_Scene_Merle_WaitingOnHill)) + ExecWait(N(EVS_Scene_Merle_EnterHouse)) + Return + EndIf + IfEq(GB_StoryProgress, STORY_CH7_MERLE_APOLOGIZED) + Call(SetNpcPos, NPC_Merle, 0, 90, -143) + Call(InterpNpcYaw, NPC_Merle, 270, 0) + Set(MF_MerleReady, TRUE) + ExecWait(N(EVS_Scene_Merle_EnterHouse)) + Return + EndIf + Return + End }; EvtScript N(EVS_Scene_Merle_OneLastThing) = { - EVT_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(3.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_PARTNER, -28, -80, 0) - EVT_CALL(EnablePartnerAI) - EVT_END_THREAD - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PlayerMoveTo, 0, -100, 0) - EVT_CALL(SetGroupVisibility, MODEL_k_naiso, MODEL_GROUP_VISIBLE) - EVT_CALL(SetGroupVisibility, MODEL_km_sita, MODEL_GROUP_VISIBLE) - EVT_CALL(SetNpcPos, NPC_Merle, 0, 90, -180) - EVT_CALL(PlaySoundAtCollider, COLLIDER_k_d1, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 90, 10, EASING_QUADRATIC_IN) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_km_doa, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetNpcSpeed, NPC_Merle, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_Merle, ANIM_Merle_Walk) - EVT_CALL(NpcMoveTo, NPC_Merle, 40, -140, 0) - EVT_CALL(SetNpcAnimation, NPC_Merle, ANIM_Merle_Idle) - EVT_CALL(MakeLerp, 90, 0, 10, EASING_QUADRATIC_IN) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_km_doa, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, COLLIDER_k_d1, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetGroupVisibility, MODEL_k_naiso, MODEL_GROUP_HIDDEN) - EVT_CALL(GetNpcPos, NPC_Merle, LVar0, LVar1, LVar2) - EVT_CALL(PlayerFaceNpc, NPC_Merle, FALSE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Merle, 0) - EVT_CALL(EnablePartnerAI) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00F3) - EVT_CALL(SetGroupVisibility, MODEL_k_naiso, MODEL_GROUP_VISIBLE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_k_d1, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 90, 10, EASING_QUADRATIC_IN) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_km_doa, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_CALL(SetNpcSpeed, NPC_Merle, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_Merle, ANIM_Merle_Walk) - EVT_CALL(NpcMoveTo, NPC_Merle, 0, -180, 0) - EVT_THREAD - EVT_CALL(NpcMoveTo, NPC_Merle, 0, -300, 0) - EVT_CALL(SetNpcAnimation, NPC_Merle, ANIM_Merle_Idle) - EVT_END_THREAD - EVT_CALL(MakeLerp, 90, 0, 10, EASING_QUADRATIC_IN) - EVT_LABEL(3) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_km_doa, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(3) - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, COLLIDER_k_d1, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetGroupVisibility, MODEL_k_naiso, MODEL_GROUP_HIDDEN) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_SET(AF_SAM_05, FALSE) - EVT_SET(GB_StoryProgress, STORY_CH7_GOT_SNOWMAN_SCARF) - EVT_RETURN - EVT_END + Thread + Call(DisablePartnerAI, 0) + Call(SetNpcSpeed, NPC_PARTNER, Float(3.0 / DT)) + Call(NpcMoveTo, NPC_PARTNER, -28, -80, 0) + Call(EnablePartnerAI) + EndThread + Call(SetPlayerSpeed, Float(3.0 / DT)) + Call(PlayerMoveTo, 0, -100, 0) + Call(SetGroupVisibility, MODEL_k_naiso, MODEL_GROUP_VISIBLE) + Call(SetGroupVisibility, MODEL_km_sita, MODEL_GROUP_VISIBLE) + Call(SetNpcPos, NPC_Merle, 0, 90, -180) + Call(PlaySoundAtCollider, COLLIDER_k_d1, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 90, 10, EASING_QUADRATIC_IN) + Label(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_km_doa, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(SetNpcSpeed, NPC_Merle, Float(3.0 / DT)) + Call(SetNpcAnimation, NPC_Merle, ANIM_Merle_Walk) + Call(NpcMoveTo, NPC_Merle, 40, -140, 0) + Call(SetNpcAnimation, NPC_Merle, ANIM_Merle_Idle) + Call(MakeLerp, 90, 0, 10, EASING_QUADRATIC_IN) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_km_doa, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(PlaySoundAtCollider, COLLIDER_k_d1, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Call(SetGroupVisibility, MODEL_k_naiso, MODEL_GROUP_HIDDEN) + Call(GetNpcPos, NPC_Merle, LVar0, LVar1, LVar2) + Call(PlayerFaceNpc, NPC_Merle, FALSE) + Call(DisablePartnerAI, 0) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Merle, 0) + Call(EnablePartnerAI) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Merle, ANIM_Merle_Talk, ANIM_Merle_Idle, 0, MSG_CH7_00F3) + Call(SetGroupVisibility, MODEL_k_naiso, MODEL_GROUP_VISIBLE) + Call(PlaySoundAtCollider, COLLIDER_k_d1, SOUND_BASIC_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 90, 10, EASING_QUADRATIC_IN) + Label(2) + Call(UpdateLerp) + Call(RotateModel, MODEL_km_doa, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(2) + EndIf + Call(SetNpcSpeed, NPC_Merle, Float(3.0 / DT)) + Call(SetNpcAnimation, NPC_Merle, ANIM_Merle_Walk) + Call(NpcMoveTo, NPC_Merle, 0, -180, 0) + Thread + Call(NpcMoveTo, NPC_Merle, 0, -300, 0) + Call(SetNpcAnimation, NPC_Merle, ANIM_Merle_Idle) + EndThread + Call(MakeLerp, 90, 0, 10, EASING_QUADRATIC_IN) + Label(3) + Call(UpdateLerp) + Call(RotateModel, MODEL_km_doa, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(3) + EndIf + Call(PlaySoundAtCollider, COLLIDER_k_d1, SOUND_BASIC_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Call(SetGroupVisibility, MODEL_k_naiso, MODEL_GROUP_HIDDEN) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Set(AF_SAM_05, FALSE) + Set(GB_StoryProgress, STORY_CH7_GOT_SNOWMAN_SCARF) + Return + End }; EvtScript N(EVS_NpcInteract_ShiverToad_01) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ShiverToad_Red_Talk, ANIM_ShiverToad_Red_Idle, 0, MSG_CH7_00F8) - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ShiverToad_Red_Talk, ANIM_ShiverToad_Red_Idle, 0, MSG_CH7_00F9) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_ShiverToad_Red_Talk, ANIM_ShiverToad_Red_Idle, 0, MSG_CH7_00F8) + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_ShiverToad_Red_Talk, ANIM_ShiverToad_Red_Idle, 0, MSG_CH7_00F9) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_ShiverToad_02) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ShiverToad_Blue_Talk, ANIM_ShiverToad_Blue_Idle, 0, MSG_CH7_00FA) - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ShiverToad_Blue_Talk, ANIM_ShiverToad_Blue_Idle, 0, MSG_CH7_00FB) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_ShiverToad_Blue_Talk, ANIM_ShiverToad_Blue_Idle, 0, MSG_CH7_00FA) + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_ShiverToad_Blue_Talk, ANIM_ShiverToad_Blue_Idle, 0, MSG_CH7_00FB) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_ShiverToad_03) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ShiverToad_Green_Talk, ANIM_ShiverToad_Green_Idle, 0, MSG_CH7_00FC) - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ShiverToad_Green_Talk, ANIM_ShiverToad_Green_Idle, 0, MSG_CH7_00FD) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_LetterPrompt_FrostT)) - EVT_IF_NE(LVarC, 0) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_ShiverToad_Green_Talk, ANIM_ShiverToad_Green_Idle, 0, MSG_CH7_00FC) + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_ShiverToad_Green_Talk, ANIM_ShiverToad_Green_Idle, 0, MSG_CH7_00FD) + EndSwitch + ExecWait(N(EVS_LetterPrompt_FrostT)) + IfNe(LVarC, 0) + Return + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Ninji_01) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Ninji_Talk, ANIM_Ninji_Idle, 0, MSG_CH7_0102) - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Ninji_Talk, ANIM_Ninji_Idle, 0, MSG_CH7_0103) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Ninji_Talk, ANIM_Ninji_Idle, 0, MSG_CH7_0102) + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Ninji_Talk, ANIM_Ninji_Idle, 0, MSG_CH7_0103) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Ninji_02) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Ninji_Talk, ANIM_Ninji_Idle, 0, MSG_CH7_0104) - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Ninji_Talk, ANIM_Ninji_Idle, 0, MSG_CH7_0105) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Ninji_Talk, ANIM_Ninji_Idle, 0, MSG_CH7_0104) + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Ninji_Talk, ANIM_Ninji_Idle, 0, MSG_CH7_0105) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Ninji_03) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Ninji_Talk, ANIM_Ninji_Idle, 0, MSG_CH7_0106) - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Ninji_Talk, ANIM_Ninji_Idle, 0, MSG_CH7_0107) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Ninji_Talk, ANIM_Ninji_Idle, 0, MSG_CH7_0106) + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Ninji_Talk, ANIM_Ninji_Idle, 0, MSG_CH7_0107) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Ninji_04) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Ninji_Talk, ANIM_Ninji_Idle, 0, MSG_CH7_0114) - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Ninji_Talk, ANIM_Ninji_Idle, 0, MSG_CH7_0115) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Ninji_Talk, ANIM_Ninji_Idle, 0, MSG_CH7_0114) + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Ninji_Talk, ANIM_Ninji_Idle, 0, MSG_CH7_0115) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_StarKid_01) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_CH7_0108) - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_CH7_0109) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_CH7_0108) + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_CH7_0109) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_StarKid_02) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_CH7_010A) - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_CH7_010B) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_CH7_010A) + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_CH7_010B) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_StarKid_03) = { - EVT_IF_EQ(GF_SAM06_FoundSidewaysStarKid, FALSE) - EVT_SET(GF_SAM06_FoundSidewaysStarKid, TRUE) - EVT_CALL(MakeLerp, 90, 360, 20, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_CH7_010C) - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_CH7_010D) - EVT_END_SWITCH - EVT_RETURN - EVT_END + IfEq(GF_SAM06_FoundSidewaysStarKid, FALSE) + Set(GF_SAM06_FoundSidewaysStarKid, TRUE) + Call(MakeLerp, 90, 360, 20, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_SELF, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndIf + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_CH7_010C) + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_CH7_010D) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_StarKid_04) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_CH7_010E) - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_CH7_010F) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_CH7_010E) + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_CH7_010F) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_StarKid_05) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_CH7_0110) - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_CH7_0111) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_CH7_0110) + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_CH7_0111) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_StarKid_06) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_CH7_0112) - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_CH7_0113) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_CH7_0112) + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, MSG_CH7_0113) + EndSwitch + Return + End }; EvtScript N(EVS_ToadHouse_SetDialogue) = { - EVT_SET(LVar0, MSG_CH7_0116) - EVT_SET(LVar8, MSG_CH7_0117) - EVT_SET(LVar1, MSG_CH7_0118) - EVT_SET(LVar2, MSG_CH7_0119) - EVT_SET(LVar3, MSG_CH7_011A) - EVT_RETURN - EVT_END + Set(LVar0, MSG_CH7_0116) + Set(LVar8, MSG_CH7_0117) + Set(LVar1, MSG_CH7_0118) + Set(LVar2, MSG_CH7_0119) + Set(LVar3, MSG_CH7_011A) + Return + End }; EvtScript N(EVS_ToadHouse_GetInBed) = { - EVT_EXEC(N(EVS_PlayRestingSong)) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, -336, -48, 0) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(N(ToadHouse_CamSetFOV), 0, EVT_FLOAT(40.0)) - EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(50.0), EVT_FLOAT(-16.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(111.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-92.0), EVT_FLOAT(94.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(-318.1), EVT_FLOAT(-35.5)) - EVT_CALL(SetCamPosC, CAM_DEFAULT, EVT_FLOAT(-641.0), EVT_FLOAT(122.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_CALL(PlayerMoveTo, -347, -114, 0) - EVT_CALL(InterpPlayerYaw, 229, 1) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetPlayerImgFXFlags, IMGFX_FLAG_800) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_GET_IN_BED, 1, 1, 0) - EVT_THREAD - EVT_WAIT(60) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) - EVT_END_THREAD - EVT_WAIT(20) - EVT_THREAD - EVT_WAIT(81) - EVT_CALL(N(ToadHouse_CamSetFOV), 0, 25) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_PlayRestingSong)) + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, -336, -48, 0) + Thread + Wait(15) + Call(N(ToadHouse_CamSetFOV), 0, Float(40.0)) + Call(SetCamType, CAM_DEFAULT, 4, FALSE) + Call(SetCamPitch, CAM_DEFAULT, Float(50.0), Float(-16.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(111.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(-92.0), Float(94.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(-318.1), Float(-35.5)) + Call(SetCamPosC, CAM_DEFAULT, Float(-641.0), Float(122.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Call(PlayerMoveTo, -347, -114, 0) + Call(InterpPlayerYaw, 229, 1) + Call(HidePlayerShadow, TRUE) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetPlayerImgFXFlags, IMGFX_FLAG_800) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_GET_IN_BED, 1, 1, 0) + Thread + Wait(60) + Call(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) + EndThread + Wait(20) + Thread + Wait(81) + Call(N(ToadHouse_CamSetFOV), 0, 25) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + EndThread + Return + End }; EvtScript N(EVS_ToadHouse_ReturnFromRest) = { - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(HidePlayerShadow, FALSE) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(PlayerMoveTo, -347, -114, 0) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, -309, -16, 0) - EVT_RETURN - EVT_END + Exec(N(EVS_SetupMusic)) + Call(HidePlayerShadow, FALSE) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) + Call(PlayerMoveTo, -347, -114, 0) + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, -309, -16, 0) + Return + End }; EvtScript N(EVS_NpcInit_Merle) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Merle))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Merle))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_GOT_SNOWMAN_SCARF) - EVT_CALL(SetNpcPos, NPC_SELF, -200, 0, 300) - EVT_CASE_GE(STORY_CH7_GOT_SNOWMAN_SCARF) - EVT_CALL(SetNpcPos, NPC_SELF, 0, 90, -300) - EVT_CALL(InterpNpcYaw, NPC_SELF, 180, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Merle))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Merle))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_GOT_SNOWMAN_SCARF) + Call(SetNpcPos, NPC_SELF, -200, 0, 300) + CaseGe(STORY_CH7_GOT_SNOWMAN_SCARF) + Call(SetNpcPos, NPC_SELF, 0, 90, -300) + Call(InterpNpcYaw, NPC_SELF, 180, 0) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_ShiverToad_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ShiverToad_01))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ShiverToad_01))) + Return + End }; EvtScript N(EVS_NpcInit_ShiverToad_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ShiverToad_02))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ShiverToad_02))) + Return + End }; EvtScript N(EVS_NpcInit_ShiverToad_03) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ShiverToad_03))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ShiverToad_03))) + Return + End }; EvtScript N(EVS_NpcInit_Ninji_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Ninji_01))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Ninji_01))) + Return + End }; EvtScript N(EVS_NpcInit_Ninji_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Ninji_02))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Ninji_02))) + Return + End }; EvtScript N(EVS_NpcInit_Ninji_03) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Ninji_03))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Ninji_03))) + Return + End }; EvtScript N(EVS_NpcInit_Ninji_04) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Ninji_04))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Ninji_04))) + Return + End }; EvtScript N(EVS_NpcInit_StarKid_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_StarKid_01))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_StarKid_01))) + Return + End }; EvtScript N(EVS_NpcInit_StarKid_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_StarKid_02))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_StarKid_02))) + Return + End }; EvtScript N(EVS_NpcInit_StarKid_03) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_StarKid_03))) - EVT_IF_EQ(GF_SAM06_FoundSidewaysStarKid, FALSE) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 90, 0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_StarKid_03))) + IfEq(GF_SAM06_FoundSidewaysStarKid, FALSE) + Call(SetNpcRotation, NPC_SELF, 0, 90, 0) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_StarKid_04) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_StarKid_04))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_StarKid_04))) + Return + End }; EvtScript N(EVS_NpcInit_StarKid_05) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_StarKid_05))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_StarKid_05))) + Return + End }; EvtScript N(EVS_NpcInit_StarKid_06) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_StarKid_06))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_StarKid_06))) + Return + End }; EvtScript N(EVS_NpcInit_ShiverToad_04) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_ToadHouseKeeper))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_ToadHouseKeeper))) + Return + End }; NpcData N(NpcData_Merle)[] = { diff --git a/src/world/area_sam/sam_06/sam_06_5_entity.c b/src/world/area_sam/sam_06/sam_06_5_entity.c index 12ff687622f..78865b7c32a 100644 --- a/src/world/area_sam/sam_06/sam_06_5_entity.c +++ b/src/world/area_sam/sam_06/sam_06_5_entity.c @@ -2,9 +2,9 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), -250, 120, 140, 0, MAKE_ENTITY_END) - EVT_CALL(MakeItemEntity, ITEM_SNOWMAN_SCARF, NPC_DISPOSE_LOCATION, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(MV_ScarfItemID, LVar0) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_SavePoint), -250, 120, 140, 0, MAKE_ENTITY_END) + Call(MakeItemEntity, ITEM_SNOWMAN_SCARF, NPC_DISPOSE_LOCATION, ITEM_SPAWN_MODE_DECORATION, 0) + Set(MV_ScarfItemID, LVar0) + Return + End }; diff --git a/src/world/area_sam/sam_07/sam_07_1_music.c b/src/world/area_sam/sam_07/sam_07_1_music.c index a080f949afb..6d592dacbf3 100644 --- a/src/world/area_sam/sam_07/sam_07_1_music.c +++ b/src/world/area_sam/sam_07/sam_07_1_music.c @@ -1,7 +1,7 @@ #include "sam_07.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_SHIVER_MOUNTAIN, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_SHIVER_MOUNTAIN, 0, 8) + Return + End }; diff --git a/src/world/area_sam/sam_07/sam_07_2_main.c b/src/world/area_sam/sam_07/sam_07_2_main.c index 8f45fe9da23..db251b4493a 100644 --- a/src/world/area_sam/sam_07/sam_07_2_main.c +++ b/src/world/area_sam/sam_07/sam_07_2_main.c @@ -4,42 +4,42 @@ EvtScript N(EVS_ExitWalk_sam_04_2) = EVT_EXIT_WALK(60, sam_07_ENTRY_0, "sam_04", EvtScript N(EVS_ExitWalk_sam_08_0) = EVT_EXIT_WALK(60, sam_07_ENTRY_1, "sam_08", sam_08_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sam_04_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sam_08_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sam_04_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sam_08_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHIVER_MOUNTAIN) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_SET(GF_MAP_ShiverMountain, TRUE) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_EXEC_WAIT(N(EVS_SetupPit)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_yuka, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o119, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o126, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o127, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deiliw, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilie, SURFACE_TYPE_SNOW) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_SHIVER_MOUNTAIN) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Set(GF_MAP_ShiverMountain, TRUE) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupMusic)) + ExecWait(N(EVS_SetupPit)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_yuka, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o119, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o126, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o127, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deiliw, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilie, SURFACE_TYPE_SNOW) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_sam/sam_07/sam_07_3_entity.c b/src/world/area_sam/sam_07/sam_07_3_entity.c index 2cc7942fc72..6affd46568f 100644 --- a/src/world/area_sam/sam_07/sam_07_3_entity.c +++ b/src/world/area_sam/sam_07/sam_07_3_entity.c @@ -2,19 +2,19 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_SAM07_FloorRaised, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_GreenStompSwitch), -945, -179, -75, 0, MAKE_ENTITY_END) - EVT_SET(MV_SwitchEntityID, LVar0) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_UseGreenSwitch))) - EVT_ELSE - EVT_CALL(MakeEntity, EVT_PTR(Entity_GreenStompSwitch), -945, 1, -75, 0, MAKE_ENTITY_END) - EVT_SET(MV_SwitchEntityID, LVar0) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_UseGreenSwitch))) - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 810, 330, -120, 90, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 810, 360, -120, 90, ITEM_ULTRA_SHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SAM07_HiddenItem_UltraShroom) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), -1350, -60, -120, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + IfEq(GF_SAM07_FloorRaised, FALSE) + Call(MakeEntity, Ref(Entity_GreenStompSwitch), -945, -179, -75, 0, MAKE_ENTITY_END) + Set(MV_SwitchEntityID, LVar0) + Call(AssignScript, Ref(N(EVS_UseGreenSwitch))) + Else + Call(MakeEntity, Ref(Entity_GreenStompSwitch), -945, 1, -75, 0, MAKE_ENTITY_END) + Set(MV_SwitchEntityID, LVar0) + Call(AssignScript, Ref(N(EVS_UseGreenSwitch))) + EndIf + Call(MakeEntity, Ref(Entity_BrickBlock), 810, 330, -120, 90, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 810, 360, -120, 90, ITEM_ULTRA_SHROOM, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SAM07_HiddenItem_UltraShroom) + Call(MakeEntity, Ref(Entity_SavePoint), -1350, -60, -120, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_sam/sam_07/sam_07_4_frozen_pit.c b/src/world/area_sam/sam_07/sam_07_4_frozen_pit.c index 88aa3dc8dc6..78041a6114c 100644 --- a/src/world/area_sam/sam_07/sam_07_4_frozen_pit.c +++ b/src/world/area_sam/sam_07/sam_07_4_frozen_pit.c @@ -138,98 +138,98 @@ API_CALLABLE(N(AwaitPlayerNotPoundingFloor)) { #include "world/common/EnableCameraFollowPlayerY.inc.c" EvtScript N(EVS_BreakIce) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_o116, SOUND_ICE_SHATTER, 0) - EVT_CALL(N(AnimateIceShattering)) - EVT_LOOP(10) - EVT_CALL(SetGroupVisibility, MODEL_move1, MODEL_GROUP_VISIBLE) - EVT_WAIT(1) - EVT_CALL(SetGroupVisibility, MODEL_move1, MODEL_GROUP_HIDDEN) - EVT_CALL(EnableModel, MODEL_m1_yuka, TRUE) - EVT_CALL(EnableModel, MODEL_m1_kabe, TRUE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_o116, SOUND_ICE_SHATTER, 0) + Call(N(AnimateIceShattering)) + Loop(10) + Call(SetGroupVisibility, MODEL_move1, MODEL_GROUP_VISIBLE) + Wait(1) + Call(SetGroupVisibility, MODEL_move1, MODEL_GROUP_HIDDEN) + Call(EnableModel, MODEL_m1_yuka, TRUE) + Call(EnableModel, MODEL_m1_kabe, TRUE) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_TouchFloor_FragileIce) = { - EVT_CALL(GetPlayerActionState, LVar0) - EVT_IF_NE(LVar0, ACTION_STATE_SPIN_POUND) - EVT_IF_NE(LVar0, ACTION_STATE_TORNADO_POUND) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(GF_SAM07_IceBroken, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_SAM07_IceBroken, TRUE) - EVT_WAIT(5) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o116, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_BreakIce)) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(GetPlayerActionState, LVar0) + IfNe(LVar0, ACTION_STATE_SPIN_POUND) + IfNe(LVar0, ACTION_STATE_TORNADO_POUND) + Return + EndIf + EndIf + IfEq(GF_SAM07_IceBroken, TRUE) + Return + EndIf + Set(GF_SAM07_IceBroken, TRUE) + Wait(5) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o116, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_BreakIce)) + Unbind + Return + End }; EvtScript N(EVS_Blast_FragileIce) = { - EVT_IF_EQ(GF_SAM07_IceBroken, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_SAM07_IceBroken, TRUE) - EVT_WAIT(5) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o116, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_BreakIce)) - EVT_UNBIND - EVT_RETURN - EVT_END + IfEq(GF_SAM07_IceBroken, TRUE) + Return + EndIf + Set(GF_SAM07_IceBroken, TRUE) + Wait(5) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o116, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_BreakIce)) + Unbind + Return + End }; EvtScript N(EVS_UseGreenSwitch) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(GetEntityPosition), MV_SwitchEntityID, LVar7, LVar8, LVar9) - EVT_IF_EQ(GF_SAM07_FloorRaised, FALSE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_m1_yuka, SOUND_SAM07_RAISE_FLOOR, 0) - EVT_SUB(LVar8, -180) - EVT_CALL(MakeLerp, -180, 0, 120, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_m1_yuka, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_m1_kabe, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_m1_yuka) - EVT_ADD(LVar0, LVar8) - EVT_CALL(N(SetEntityPositionF), MV_SwitchEntityID, LVar7, LVar0, LVar9) - EVT_CALL(N(EnableCameraFollowPlayerY)) - EVT_WAIT(1) - EVT_CALL(N(AwaitPlayerNotPoundingFloor), COLLIDER_m1_yuka, ENTITY_COLLIDER_ID(0)) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(EnableModel, MODEL_o135, TRUE) - EVT_CALL(EnableModel, MODEL_o137, FALSE) - EVT_SET(GF_SAM07_FloorRaised, TRUE) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_o137, TRUE) - EVT_CALL(EnableModel, MODEL_o135, FALSE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_m1_yuka, SOUND_SAM07_LOWER_FLOOR, 0) - EVT_CALL(MakeLerp, 0, -180, 120, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_m1_yuka, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_m1_kabe, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_m1_yuka) - EVT_ADD(LVar0, LVar8) - EVT_CALL(N(SetEntityPositionF), MV_SwitchEntityID, LVar7, LVar0, LVar9) - EVT_CALL(N(EnableCameraFollowPlayerY)) - EVT_WAIT(1) - EVT_CALL(N(AwaitPlayerNotPoundingFloor), COLLIDER_m1_yuka, ENTITY_COLLIDER_ID(0)) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_SET(GF_SAM07_FloorRaised, FALSE) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(N(GetEntityPosition), MV_SwitchEntityID, LVar7, LVar8, LVar9) + IfEq(GF_SAM07_FloorRaised, FALSE) + Call(PlaySoundAtCollider, COLLIDER_m1_yuka, SOUND_SAM07_RAISE_FLOOR, 0) + Sub(LVar8, -180) + Call(MakeLerp, -180, 0, 120, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_m1_yuka, 0, LVar0, 0) + Call(TranslateModel, MODEL_m1_kabe, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_m1_yuka) + Add(LVar0, LVar8) + Call(N(SetEntityPositionF), MV_SwitchEntityID, LVar7, LVar0, LVar9) + Call(N(EnableCameraFollowPlayerY)) + Wait(1) + Call(N(AwaitPlayerNotPoundingFloor), COLLIDER_m1_yuka, ENTITY_COLLIDER_ID(0)) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(EnableModel, MODEL_o135, TRUE) + Call(EnableModel, MODEL_o137, FALSE) + Set(GF_SAM07_FloorRaised, TRUE) + Else + Call(EnableModel, MODEL_o137, TRUE) + Call(EnableModel, MODEL_o135, FALSE) + Call(PlaySoundAtCollider, COLLIDER_m1_yuka, SOUND_SAM07_LOWER_FLOOR, 0) + Call(MakeLerp, 0, -180, 120, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(TranslateModel, MODEL_m1_yuka, 0, LVar0, 0) + Call(TranslateModel, MODEL_m1_kabe, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_m1_yuka) + Add(LVar0, LVar8) + Call(N(SetEntityPositionF), MV_SwitchEntityID, LVar7, LVar0, LVar9) + Call(N(EnableCameraFollowPlayerY)) + Wait(1) + Call(N(AwaitPlayerNotPoundingFloor), COLLIDER_m1_yuka, ENTITY_COLLIDER_ID(0)) + IfEq(LVar1, 1) + Goto(1) + EndIf + Set(GF_SAM07_FloorRaised, FALSE) + EndIf + Call(DisablePlayerInput, FALSE) + Return + End }; BombTriggerF N(BombPos_Ice) = { @@ -238,31 +238,31 @@ BombTriggerF N(BombPos_Ice) = { }; EvtScript N(EVS_SetupPit) = { - EVT_CALL(EnableGroup, MODEL_g72, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_m1_kabe, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ParentColliderToModel, COLLIDER_m1_yuka, MODEL_m1_yuka) - EVT_CALL(ParentColliderToModel, COLLIDER_o116, MODEL_m1_yuka) - EVT_IF_EQ(GF_SAM07_IceBroken, FALSE) - EVT_CALL(EnableModel, MODEL_o137, TRUE) - EVT_CALL(TranslateGroup, MODEL_move1, 0, -180, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_m1_yuka) - EVT_CALL(UpdateColliderTransform, COLLIDER_o116) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_TouchFloor_FragileIce)), TRIGGER_FLOOR_TOUCH, COLLIDER_o116, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Blast_FragileIce)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Ice)), 1, 0) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o116, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetGroupVisibility, MODEL_move1, MODEL_GROUP_HIDDEN) - EVT_CALL(EnableModel, MODEL_m1_yuka, TRUE) - EVT_CALL(EnableModel, MODEL_m1_kabe, TRUE) - EVT_CALL(EnableModel, MODEL_o135, TRUE) - EVT_IF_EQ(GF_SAM07_FloorRaised, FALSE) - EVT_CALL(EnableModel, MODEL_o137, TRUE) - EVT_CALL(TranslateGroup, MODEL_move1, 0, -180, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_m1_yuka) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_o135, TRUE) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(EnableGroup, MODEL_g72, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_m1_kabe, COLLIDER_FLAGS_UPPER_MASK) + Call(ParentColliderToModel, COLLIDER_m1_yuka, MODEL_m1_yuka) + Call(ParentColliderToModel, COLLIDER_o116, MODEL_m1_yuka) + IfEq(GF_SAM07_IceBroken, FALSE) + Call(EnableModel, MODEL_o137, TRUE) + Call(TranslateGroup, MODEL_move1, 0, -180, 0) + Call(UpdateColliderTransform, COLLIDER_m1_yuka) + Call(UpdateColliderTransform, COLLIDER_o116) + BindTrigger(Ref(N(EVS_TouchFloor_FragileIce)), TRIGGER_FLOOR_TOUCH, COLLIDER_o116, 1, 0) + BindTrigger(Ref(N(EVS_Blast_FragileIce)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Ice)), 1, 0) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o116, COLLIDER_FLAGS_UPPER_MASK) + Call(SetGroupVisibility, MODEL_move1, MODEL_GROUP_HIDDEN) + Call(EnableModel, MODEL_m1_yuka, TRUE) + Call(EnableModel, MODEL_m1_kabe, TRUE) + Call(EnableModel, MODEL_o135, TRUE) + IfEq(GF_SAM07_FloorRaised, FALSE) + Call(EnableModel, MODEL_o137, TRUE) + Call(TranslateGroup, MODEL_move1, 0, -180, 0) + Call(UpdateColliderTransform, COLLIDER_m1_yuka) + Else + Call(EnableModel, MODEL_o135, TRUE) + EndIf + EndIf + Return + End }; diff --git a/src/world/area_sam/sam_08/sam_08_1_music.c b/src/world/area_sam/sam_08/sam_08_1_music.c index 437a34fdf9d..86cebdaac74 100644 --- a/src/world/area_sam/sam_08/sam_08_1_music.c +++ b/src/world/area_sam/sam_08/sam_08_1_music.c @@ -1,7 +1,7 @@ #include "sam_08.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_SHIVER_MOUNTAIN, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_SHIVER_MOUNTAIN, 0, 8) + Return + End }; diff --git a/src/world/area_sam/sam_08/sam_08_2_main.c b/src/world/area_sam/sam_08/sam_08_2_main.c index e22bbd0a50d..72da81e4311 100644 --- a/src/world/area_sam/sam_08/sam_08_2_main.c +++ b/src/world/area_sam/sam_08/sam_08_2_main.c @@ -4,31 +4,31 @@ EvtScript N(EVS_ExitWalk_sam_07_1) = EVT_EXIT_WALK(60, sam_08_ENTRY_0, "sam_07", EvtScript N(EVS_ExitWalk_sam_09_0) = EVT_EXIT_WALK(60, sam_08_ENTRY_1, "sam_09", sam_09_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sam_07_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sam_09_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sam_07_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sam_09_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHIVER_MOUNTAIN) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_yuka, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_kaidan, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o51, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o52, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o54, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deiliw, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilie, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o47, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC_WAIT(N(EVS_SetupBridge)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_SHIVER_MOUNTAIN) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupMusic)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_yuka, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_kaidan, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o51, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o52, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o54, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deiliw, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilie, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o47, COLLIDER_FLAGS_UPPER_MASK) + ExecWait(N(EVS_SetupBridge)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; diff --git a/src/world/area_sam/sam_08/sam_08_3_entity.c b/src/world/area_sam/sam_08/sam_08_3_entity.c index b99e15e5577..44777def351 100644 --- a/src/world/area_sam/sam_08/sam_08_3_entity.c +++ b/src/world/area_sam/sam_08/sam_08_3_entity.c @@ -7,11 +7,11 @@ EvtScript N(EVS_MakeEntities) = { EVT_MAKE_SUPER_BLOCK(-800, 210, -130, 0) - EVT_CALL(MakeItemEntity, ITEM_PEBBLE, -770, -240, 30, ITEM_SPAWN_MODE_FIXED_SPAWN_ALWAYS_NEVER_VANISH, 0) - EVT_IF_LT(GB_StoryProgress, STORY_CH7_DEFEATED_FIRST_DUPLIGHOST) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueSwitch), -960, -120, -37, 0, MAKE_ENTITY_END) - EVT_CALL(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_SAM_06)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_PEBBLE, -770, -240, 30, ITEM_SPAWN_MODE_FIXED_SPAWN_ALWAYS_NEVER_VANISH, 0) + IfLt(GB_StoryProgress, STORY_CH7_DEFEATED_FIRST_DUPLIGHOST) + Call(MakeEntity, Ref(Entity_BlueSwitch), -960, -120, -37, 0, MAKE_ENTITY_END) + Call(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_SAM_06)) + EndIf + Return + End }; diff --git a/src/world/area_sam/sam_08/sam_08_4_npc.c b/src/world/area_sam/sam_08/sam_08_4_npc.c index 8ef1307249f..73fdeccf74b 100644 --- a/src/world/area_sam/sam_08/sam_08_4_npc.c +++ b/src/world/area_sam/sam_08/sam_08_4_npc.c @@ -18,109 +18,109 @@ NpcSettings N(NpcSettings_Duplighost) = { #include "world/common/enemy/FrostClubba_Multi.inc.c" EvtScript N(EVS_NpcInteract_TrueKooperA) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_012B) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_012B) + Return + End }; EvtScript N(EVS_NpcHit_TrueKooperB) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_EXEC_WAIT(N(EVS_Scene_HitTrueKooper)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + ExecWait(N(EVS_Scene_HitTrueKooper)) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_FakeKooperA) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_012A) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_012A) + Return + End }; EvtScript N(EVS_NpcHit_FakeKooperB) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_EXEC_WAIT(N(EVS_Scene_HitFakeKooper)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_HAMMER) + ExecWait(N(EVS_Scene_HitFakeKooper)) + EndSwitch + Return + End }; EvtScript N(EVS_NpcIdle_Duplighost) = { - EVT_LABEL(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_RETURN - EVT_END + Label(0) + Call(GetSelfVar, 0, LVar0) + Wait(1) + IfEq(LVar0, 0) + Goto(0) + EndIf + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Return + End }; EvtScript N(EVS_NpcDefeat_Duplighost) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(SetNpcFlagBits, NPC_Duplighost, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcSpeed, NPC_Duplighost, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetNpcJumpscale, NPC_Duplighost, EVT_FLOAT(1.5)) - EVT_CALL(SetNpcAnimation, NPC_Duplighost, ANIM_Duplighost_Anim04) - EVT_CALL(GetNpcPos, NPC_Duplighost, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 50) - EVT_CALL(PlaySoundAtNpc, NPC_Duplighost, SOUND_DUPLIGHOST_STEP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Duplighost, LVar0, LVar1, LVar2, 13 * DT) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_ADD(LVar0, 50) - EVT_CALL(PlaySoundAtNpc, NPC_Duplighost, SOUND_DUPLIGHOST_STEP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Duplighost, LVar0, LVar1, LVar2, 13 * DT) - EVT_ADD(LVar0, 50) - EVT_CALL(PlaySoundAtNpc, NPC_Duplighost, SOUND_DUPLIGHOST_STEP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Duplighost, LVar0, LVar1, LVar2, 13 * DT) - EVT_SET(GB_StoryProgress, STORY_CH7_DEFEATED_FIRST_DUPLIGHOST) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_CHANGE_PARTNER | PS_FLAG_NO_PARTNER_USAGE, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o47, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ADD(LVar0, 50) - EVT_CALL(PlaySoundAtNpc, NPC_Duplighost, SOUND_DUPLIGHOST_STEP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_Duplighost, LVar0, LVar1, LVar2, 20 * DT) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(SetNpcFlagBits, NPC_Duplighost, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcSpeed, NPC_Duplighost, Float(3.0 / DT)) + Call(SetNpcJumpscale, NPC_Duplighost, Float(1.5)) + Call(SetNpcAnimation, NPC_Duplighost, ANIM_Duplighost_Anim04) + Call(GetNpcPos, NPC_Duplighost, LVar0, LVar1, LVar2) + Add(LVar0, 50) + Call(PlaySoundAtNpc, NPC_Duplighost, SOUND_DUPLIGHOST_STEP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Duplighost, LVar0, LVar1, LVar2, 13 * DT) + Call(InterpPlayerYaw, 90, 0) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + Add(LVar0, 50) + Call(PlaySoundAtNpc, NPC_Duplighost, SOUND_DUPLIGHOST_STEP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Duplighost, LVar0, LVar1, LVar2, 13 * DT) + Add(LVar0, 50) + Call(PlaySoundAtNpc, NPC_Duplighost, SOUND_DUPLIGHOST_STEP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Duplighost, LVar0, LVar1, LVar2, 13 * DT) + Set(GB_StoryProgress, STORY_CH7_DEFEATED_FIRST_DUPLIGHOST) + Call(SetPlayerFlagBits, PS_FLAG_NO_CHANGE_PARTNER | PS_FLAG_NO_PARTNER_USAGE, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o47, COLLIDER_FLAGS_UPPER_MASK) + Call(DisablePlayerInput, FALSE) + Add(LVar0, 50) + Call(PlaySoundAtNpc, NPC_Duplighost, SOUND_DUPLIGHOST_STEP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_Duplighost, LVar0, LVar1, LVar2, 20 * DT) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_TrueKooperA) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_TrueKooperA))) - EVT_IF_GE(GB_StoryProgress, STORY_CH7_DEFEATED_FIRST_DUPLIGHOST) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_TrueKooperA))) + IfGe(GB_StoryProgress, STORY_CH7_DEFEATED_FIRST_DUPLIGHOST) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_RealKooperA) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_FakeKooperA))) - EVT_IF_GE(GB_StoryProgress, STORY_CH7_DEFEATED_FIRST_DUPLIGHOST) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_FakeKooperA))) + IfGe(GB_StoryProgress, STORY_CH7_DEFEATED_FIRST_DUPLIGHOST) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Duplighost) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Duplighost))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Duplighost))) - EVT_IF_GE(GB_StoryProgress, STORY_CH7_DEFEATED_FIRST_DUPLIGHOST) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Duplighost))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Duplighost))) + IfGe(GB_StoryProgress, STORY_CH7_DEFEATED_FIRST_DUPLIGHOST) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_Ambush)[] = { @@ -208,47 +208,47 @@ NpcData N(NpcData_Ambush)[] = { }; EvtScript N(EVS_NpcIdle_TrueKooperB) = { - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_Kooper_01A, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetNpcPos, NPC_Kooper_01A, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcInit_TrueKooperB) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_PASSIVE, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TrueKooperB))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_TrueKooperB))) - EVT_IF_GE(GB_StoryProgress, STORY_CH7_DEFEATED_FIRST_DUPLIGHOST) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_PASSIVE, 0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_TrueKooperB))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_TrueKooperB))) + IfGe(GB_StoryProgress, STORY_CH7_DEFEATED_FIRST_DUPLIGHOST) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcIdle_FakeKooperB) = { - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_Kooper_02A, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetNpcPos, NPC_Kooper_02A, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcInit_FakeKooperB) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_PASSIVE, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_FakeKooperB))) - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_FakeKooperB))) - EVT_IF_GE(GB_StoryProgress, STORY_CH7_DEFEATED_FIRST_DUPLIGHOST) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_PASSIVE, 0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_FakeKooperB))) + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_FakeKooperB))) + IfGe(GB_StoryProgress, STORY_CH7_DEFEATED_FIRST_DUPLIGHOST) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_Hittable)[] = { diff --git a/src/world/area_sam/sam_08/sam_08_5_scenes.c b/src/world/area_sam/sam_08/sam_08_5_scenes.c index 8b82734b810..3c46945343a 100644 --- a/src/world/area_sam/sam_08/sam_08_5_scenes.c +++ b/src/world/area_sam/sam_08/sam_08_5_scenes.c @@ -25,562 +25,562 @@ API_CALLABLE(N(StartFightingRumble)) { } EvtScript N(EVS_TwoKoopesFightingFX) = { - EVT_CALL(PlaySoundAtNpc, NPC_Kooper_01A, SOUND_LOOP_FIGHTING, SOUND_SPACE_DEFAULT) - EVT_LOOP(0) - EVT_CALL(N(StartFightingRumble), 80, 10) - EVT_CALL(GetNpcPos, NPC_Kooper_01A, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 3) - EVT_CALL(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) - EVT_CALL(N(AdjustFightingSoundsPos), LVar0, LVar1, LVar2) - EVT_WAIT(6 * DT) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(PlaySoundAtNpc, NPC_Kooper_01A, SOUND_LOOP_FIGHTING, SOUND_SPACE_DEFAULT) + Loop(0) + Call(N(StartFightingRumble), 80, 10) + Call(GetNpcPos, NPC_Kooper_01A, LVar0, LVar1, LVar2) + Add(LVar2, 3) + Call(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) + Call(N(AdjustFightingSoundsPos), LVar0, LVar1, LVar2) + Wait(6 * DT) + EndLoop + Return + End }; EvtScript N(EVS_Scene_ImposterAppears) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o47, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o47, COLLIDER_FLAG_IGNORE_SHELL) - EVT_THREAD - EVT_CALL(EnableModel, MODEL_m1_kabe, TRUE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_m1_kabe, SOUND_SAM08_RAISE_FLOOR, 0) - EVT_CALL(MakeLerp, -120, 0, 60 * DT, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_move1, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_m1_kabe) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Kooper_01A, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Kooper_02A, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(EnableNpcShadow, NPC_PARTNER, FALSE) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar2, LVar3, LVar4) - EVT_CALL(GetPlayerPos, LVar5, LVar6, LVar7) - EVT_THREAD - EVT_CALL(SetNpcPos, NPC_Kooper_01A, LVar2, LVar3, LVar4) - EVT_SUB(LVar5, 30) - EVT_CALL(MakeLerp, LVar2, LVar5, 20 * DT, EASING_QUADRATIC_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, NPC_Kooper_01A, LVar0, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(SetNpcPos, NPC_Kooper_02A, LVar2, LVar3, LVar4) - EVT_SUB(LVar5, 60) - EVT_CALL(MakeLerp, LVar2, LVar5, 20 * DT, EASING_QUADRATIC_OUT) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, NPC_Kooper_02A, LVar0, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_WAIT(70 * DT) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_INACTIVE, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Kooper_01A, ANIM_WorldKooper_Idle) - EVT_CALL(SetNpcAnimation, NPC_Kooper_02A, ANIM_WorldKooper_Idle) - EVT_CALL(InterpNpcYaw, NPC_Kooper_01A, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_Kooper_02A, 90, 0) - EVT_WAIT(15 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Kooper_02A, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_Kooper_02A, EMOTE_QUESTION, 45, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(15 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Kooper_01A, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_Kooper_01A, EMOTE_QUESTION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(15 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, 0, EMOTE_QUESTION, -45, 20, EMOTER_PLAYER, 0, 0, 0, 0) - EVT_WAIT(15 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Kooper_02A, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_Kooper_02A, EMOTE_QUESTION, 45, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(15 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Kooper_01A, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_Kooper_01A, EMOTE_QUESTION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_Idle, ANIM_WorldKooper_Idle, 5, MSG_CH7_011F) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Kooper_01A, ANIM_WorldKooper_Jump) - EVT_CALL(SetNpcJumpscale, NPC_Kooper_01A, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump1, NPC_Kooper_01A, -1062, -120, -37, 15 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kooper_01A, ANIM_WorldKooper_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Kooper_02A, ANIM_WorldKooper_Jump) - EVT_CALL(SetNpcJumpscale, NPC_Kooper_02A, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump1, NPC_Kooper_02A, -1172, -120, -37, 15 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kooper_02A, ANIM_WorldKooper_Idle) - EVT_END_THREAD - EVT_WAIT(5 * DT) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH7_0120, 160, 40) - EVT_WAIT(20 * DT) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(GetNpcPos, NPC_Kooper_01A, LVar1, LVar2, LVar3) - EVT_CALL(GetPlayerPos, LVar4, LVar5, LVar6) - EVT_ADD(LVar1, LVar4) - EVT_ADD(LVar2, LVar5) - EVT_ADD(LVar3, LVar6) - EVT_DIVF(LVar1, EVT_FLOAT(2.0)) - EVT_DIVF(LVar2, EVT_FLOAT(2.0)) - EVT_DIVF(LVar3, EVT_FLOAT(2.0)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar1, LVar2, LVar3) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar1, LVar2, LVar3) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-8.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlayerFaceNpc, NPC_Kooper_01A, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_TalkHappy, ANIM_WorldKooper_Idle, 0, MSG_CH7_0121) - EVT_CALL(GetNpcPos, NPC_Kooper_02A, LVar7, LVar8, LVar9) - EVT_ADD(LVar7, LVar4) - EVT_ADD(LVar8, LVar5) - EVT_ADD(LVar9, LVar6) - EVT_DIVF(LVar7, EVT_FLOAT(2.0)) - EVT_DIVF(LVar8, EVT_FLOAT(2.0)) - EVT_DIVF(LVar9, EVT_FLOAT(2.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar7, LVar8, LVar9) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.5 / DT)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlayerFaceNpc, NPC_Kooper_02A, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Kooper_02A, ANIM_WorldKooper_TalkHappy, ANIM_WorldKooper_Idle, 0, MSG_CH7_0122) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar1, LVar2, LVar3) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlayerFaceNpc, NPC_Kooper_01A, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_TalkHappy, ANIM_WorldKooper_Idle, 0, MSG_CH7_0123) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar7, LVar8, LVar9) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlayerFaceNpc, NPC_Kooper_02A, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Kooper_02A, ANIM_WorldKooper_TalkHappy, ANIM_WorldKooper_Idle, 0, MSG_CH7_0124) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar1, LVar2, LVar3) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlayerFaceNpc, NPC_Kooper_01A, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_TalkHappy, ANIM_WorldKooper_Idle, 0, MSG_CH7_0125) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar7, LVar8, LVar9) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlayerFaceNpc, NPC_Kooper_02A, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Kooper_02A, ANIM_WorldKooper_TalkHappy, ANIM_WorldKooper_Idle, 0, MSG_CH7_0126) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar1, LVar2, LVar3) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlayerFaceNpc, NPC_Kooper_01A, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_TalkHappy, ANIM_WorldKooper_Idle, 0, MSG_CH7_0127) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlayerFaceNpc, NPC_Kooper_02A, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Kooper_02A, ANIM_WorldKooper_TalkHappy, ANIM_WorldKooper_Idle, 0, MSG_CH7_0128) - EVT_CALL(PlayerFaceNpc, NPC_Kooper_01A, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_TalkHappy, ANIM_WorldKooper_Idle, 0, MSG_CH7_0129) - EVT_CALL(SetNpcFlagBits, NPC_Kooper_01A, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Kooper_02A, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_CHANGE_PARTNER | PS_FLAG_NO_PARTNER_USAGE, TRUE) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o47, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o47, COLLIDER_FLAG_IGNORE_SHELL) + Thread + Call(EnableModel, MODEL_m1_kabe, TRUE) + Call(PlaySoundAtCollider, COLLIDER_m1_kabe, SOUND_SAM08_RAISE_FLOOR, 0) + Call(MakeLerp, -120, 0, 60 * DT, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_move1, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_m1_kabe) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + EndThread + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_INVISIBLE, TRUE) + Call(SetNpcFlagBits, NPC_Kooper_01A, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Kooper_02A, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(EnableNpcShadow, NPC_PARTNER, FALSE) + Call(GetNpcPos, NPC_PARTNER, LVar2, LVar3, LVar4) + Call(GetPlayerPos, LVar5, LVar6, LVar7) + Thread + Call(SetNpcPos, NPC_Kooper_01A, LVar2, LVar3, LVar4) + Sub(LVar5, 30) + Call(MakeLerp, LVar2, LVar5, 20 * DT, EASING_QUADRATIC_OUT) + Label(1) + Call(UpdateLerp) + Call(SetNpcPos, NPC_Kooper_01A, LVar0, LVar3, LVar4) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + EndThread + Call(SetNpcPos, NPC_Kooper_02A, LVar2, LVar3, LVar4) + Sub(LVar5, 60) + Call(MakeLerp, LVar2, LVar5, 20 * DT, EASING_QUADRATIC_OUT) + Label(2) + Call(UpdateLerp) + Call(SetNpcPos, NPC_Kooper_02A, LVar0, LVar3, LVar4) + Wait(1) + IfEq(LVar1, 1) + Goto(2) + EndIf + Call(InterpPlayerYaw, 270, 0) + Wait(70 * DT) + Call(DisablePartnerAI, 0) + Call(SetNpcPos, NPC_PARTNER, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_INACTIVE, TRUE) + Call(SetNpcAnimation, NPC_Kooper_01A, ANIM_WorldKooper_Idle) + Call(SetNpcAnimation, NPC_Kooper_02A, ANIM_WorldKooper_Idle) + Call(InterpNpcYaw, NPC_Kooper_01A, 270, 0) + Call(InterpNpcYaw, NPC_Kooper_02A, 90, 0) + Wait(15 * DT) + Call(PlaySoundAtNpc, NPC_Kooper_02A, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_Kooper_02A, EMOTE_QUESTION, 45, 20, EMOTER_NPC, 0, 0, 0, 0) + Wait(15 * DT) + Call(PlaySoundAtNpc, NPC_Kooper_01A, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_Kooper_01A, EMOTE_QUESTION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) + Wait(15 * DT) + Call(PlaySoundAtPlayer, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) + Call(ShowEmote, 0, EMOTE_QUESTION, -45, 20, EMOTER_PLAYER, 0, 0, 0, 0) + Wait(15 * DT) + Call(PlaySoundAtNpc, NPC_Kooper_02A, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_Kooper_02A, EMOTE_QUESTION, 45, 20, EMOTER_NPC, 0, 0, 0, 0) + Wait(15 * DT) + Call(PlaySoundAtNpc, NPC_Kooper_01A, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_Kooper_01A, EMOTE_QUESTION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) + Call(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_Idle, ANIM_WorldKooper_Idle, 5, MSG_CH7_011F) + Thread + Call(SetNpcAnimation, NPC_Kooper_01A, ANIM_WorldKooper_Jump) + Call(SetNpcJumpscale, NPC_Kooper_01A, Float(1.0)) + Call(NpcJump1, NPC_Kooper_01A, -1062, -120, -37, 15 * DT) + Call(SetNpcAnimation, NPC_Kooper_01A, ANIM_WorldKooper_Idle) + EndThread + Thread + Call(SetNpcAnimation, NPC_Kooper_02A, ANIM_WorldKooper_Jump) + Call(SetNpcJumpscale, NPC_Kooper_02A, Float(1.0)) + Call(NpcJump1, NPC_Kooper_02A, -1172, -120, -37, 15 * DT) + Call(SetNpcAnimation, NPC_Kooper_02A, ANIM_WorldKooper_Idle) + EndThread + Wait(5 * DT) + Call(ShowMessageAtScreenPos, MSG_CH7_0120, 160, 40) + Wait(20 * DT) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(GetNpcPos, NPC_Kooper_01A, LVar1, LVar2, LVar3) + Call(GetPlayerPos, LVar4, LVar5, LVar6) + Add(LVar1, LVar4) + Add(LVar2, LVar5) + Add(LVar3, LVar6) + DivF(LVar1, Float(2.0)) + DivF(LVar2, Float(2.0)) + DivF(LVar3, Float(2.0)) + Call(UseSettingsFrom, CAM_DEFAULT, LVar1, LVar2, LVar3) + Call(SetPanTarget, CAM_DEFAULT, LVar1, LVar2, LVar3) + Call(SetCamDistance, CAM_DEFAULT, Float(250.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-8.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlayerFaceNpc, NPC_Kooper_01A, FALSE) + Call(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_TalkHappy, ANIM_WorldKooper_Idle, 0, MSG_CH7_0121) + Call(GetNpcPos, NPC_Kooper_02A, LVar7, LVar8, LVar9) + Add(LVar7, LVar4) + Add(LVar8, LVar5) + Add(LVar9, LVar6) + DivF(LVar7, Float(2.0)) + DivF(LVar8, Float(2.0)) + DivF(LVar9, Float(2.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar7, LVar8, LVar9) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.5 / DT)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlayerFaceNpc, NPC_Kooper_02A, FALSE) + Call(SpeakToPlayer, NPC_Kooper_02A, ANIM_WorldKooper_TalkHappy, ANIM_WorldKooper_Idle, 0, MSG_CH7_0122) + Call(SetPanTarget, CAM_DEFAULT, LVar1, LVar2, LVar3) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlayerFaceNpc, NPC_Kooper_01A, FALSE) + Call(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_TalkHappy, ANIM_WorldKooper_Idle, 0, MSG_CH7_0123) + Call(SetPanTarget, CAM_DEFAULT, LVar7, LVar8, LVar9) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlayerFaceNpc, NPC_Kooper_02A, FALSE) + Call(SpeakToPlayer, NPC_Kooper_02A, ANIM_WorldKooper_TalkHappy, ANIM_WorldKooper_Idle, 0, MSG_CH7_0124) + Call(SetPanTarget, CAM_DEFAULT, LVar1, LVar2, LVar3) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlayerFaceNpc, NPC_Kooper_01A, FALSE) + Call(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_TalkHappy, ANIM_WorldKooper_Idle, 0, MSG_CH7_0125) + Call(SetPanTarget, CAM_DEFAULT, LVar7, LVar8, LVar9) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlayerFaceNpc, NPC_Kooper_02A, FALSE) + Call(SpeakToPlayer, NPC_Kooper_02A, ANIM_WorldKooper_TalkHappy, ANIM_WorldKooper_Idle, 0, MSG_CH7_0126) + Call(SetPanTarget, CAM_DEFAULT, LVar1, LVar2, LVar3) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlayerFaceNpc, NPC_Kooper_01A, FALSE) + Call(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_TalkHappy, ANIM_WorldKooper_Idle, 0, MSG_CH7_0127) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlayerFaceNpc, NPC_Kooper_02A, FALSE) + Call(SpeakToPlayer, NPC_Kooper_02A, ANIM_WorldKooper_TalkHappy, ANIM_WorldKooper_Idle, 0, MSG_CH7_0128) + Call(PlayerFaceNpc, NPC_Kooper_01A, FALSE) + Call(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_TalkHappy, ANIM_WorldKooper_Idle, 0, MSG_CH7_0129) + Call(SetNpcFlagBits, NPC_Kooper_01A, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcFlagBits, NPC_Kooper_02A, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(DisablePlayerInput, FALSE) + Call(SetPlayerFlagBits, PS_FLAG_NO_CHANGE_PARTNER | PS_FLAG_NO_PARTNER_USAGE, TRUE) + Unbind + Return + End }; EvtScript N(EVS_Scene_HitTrueKooper) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Kooper_01A, ANIM_WorldKooper_Hurt) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kooper_01A, ANIM_WorldKooper_Idle) - EVT_CALL(GetNpcPos, NPC_Kooper_02A, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Kooper_01A, LVar3, LVar4, LVar5) - EVT_ADDF(LVar0, LVar3) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_DIVF(LVar0, 2) - EVT_DIVF(LVar1, 2) - EVT_DIVF(LVar2, 2) - EVT_SETF(LVar6, LVar0) - EVT_SETF(LVar7, LVar1) - EVT_SETF(LVar8, LVar2) - EVT_ADDF(LVar0, LVar3) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_DIVF(LVar0, EVT_FLOAT(2.0)) - EVT_DIVF(LVar1, EVT_FLOAT(2.0)) - EVT_DIVF(LVar2, EVT_FLOAT(2.0)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-8.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_TalkSad, ANIM_WorldKooper_StillSad, 0, MSG_CH7_012C) - EVT_CALL(GetNpcPos, NPC_Kooper_02A, LVar0, LVar1, LVar2) - EVT_SETF(LVar3, LVar6) - EVT_SETF(LVar4, LVar7) - EVT_SETF(LVar5, LVar8) - EVT_ADDF(LVar3, LVar0) - EVT_ADDF(LVar4, LVar1) - EVT_ADDF(LVar5, LVar2) - EVT_DIVF(LVar3, EVT_FLOAT(2.0)) - EVT_DIVF(LVar4, EVT_FLOAT(2.0)) - EVT_DIVF(LVar5, EVT_FLOAT(2.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.5 / DT)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlayerFaceNpc, NPC_Kooper_02A, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Kooper_02A, ANIM_WorldKooper_CelebrateLoop, ANIM_WorldKooper_Idle, 0, MSG_CH7_012D) - EVT_CALL(GetNpcPos, NPC_Kooper_01A, LVar0, LVar1, LVar2) - EVT_SETF(LVar3, LVar6) - EVT_SETF(LVar4, LVar7) - EVT_SETF(LVar5, LVar8) - EVT_ADDF(LVar3, LVar0) - EVT_ADDF(LVar4, LVar1) - EVT_ADDF(LVar5, LVar2) - EVT_DIVF(LVar3, EVT_FLOAT(2.0)) - EVT_DIVF(LVar4, EVT_FLOAT(2.0)) - EVT_DIVF(LVar5, EVT_FLOAT(2.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_TalkSad, ANIM_WorldKooper_StillSad, 0, MSG_CH7_012E) - EVT_CALL(GetNpcPos, NPC_Kooper_02A, LVar0, LVar1, LVar2) - EVT_SETF(LVar3, LVar6) - EVT_SETF(LVar4, LVar7) - EVT_SETF(LVar5, LVar8) - EVT_ADDF(LVar3, LVar0) - EVT_ADDF(LVar4, LVar1) - EVT_ADDF(LVar5, LVar2) - EVT_DIVF(LVar3, EVT_FLOAT(2.0)) - EVT_DIVF(LVar4, EVT_FLOAT(2.0)) - EVT_DIVF(LVar5, EVT_FLOAT(2.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.5 / DT)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Kooper_02A, ANIM_WorldKooper_TalkHappy, ANIM_WorldKooper_Idle, 0, MSG_CH7_012F) - EVT_CALL(SetNpcFlagBits, NPC_Kooper_01A, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Kooper_02A, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(GetNpcPos, NPC_Kooper_01A, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Kooper_02A, LVar3, LVar4, LVar5) - EVT_CALL(GetAngleBetweenNPCs, NPC_Kooper_01A, NPC_Kooper_02A, LVar9) - EVT_CALL(GetDist2D, LVarA, LVar0, LVar2, LVar3, LVar5) - EVT_MULF(LVarA, EVT_FLOAT(0.6)) - EVT_CALL(AddVectorPolar, LVar0, LVar2, LVarA, LVar9) - EVT_CALL(SetNpcJumpscale, NPC_Kooper_01A, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcAnimation, NPC_Kooper_01A, ANIM_WorldKooper_Jump) - EVT_CALL(NpcJump0, NPC_Kooper_01A, LVar0, LVar1, LVar2, 20 * DT) - EVT_CALL(NpcJump0, NPC_Kooper_01A, LVar3, LVar4, LVar5, 10 * DT) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_Kooper_01A, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC_GET_TID(N(EVS_TwoKoopesFightingFX), MV_KoopersFightingScript) - EVT_THREAD - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PlayerMoveTo, LVar6, LVar8, 0) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_Kooper_01A, ANIM_WorldKooper_Run) - EVT_CALL(SetNpcAnimation, NPC_Kooper_02A, ANIM_WorldKooper_Run) - EVT_CALL(PlayerFaceNpc, NPC_Kooper_01A, FALSE) - EVT_LOOP(3) - EVT_CALL(GetNpcYaw, NPC_Kooper_01A, LVar0) - EVT_ADD(LVar0, 180) - EVT_CALL(InterpNpcYaw, NPC_Kooper_01A, LVar0, 0) - EVT_CALL(GetNpcYaw, NPC_Kooper_02A, LVar0) - EVT_ADD(LVar0, 180) - EVT_CALL(InterpNpcYaw, NPC_Kooper_02A, LVar0, 0) - EVT_CALL(GetNpcPos, NPC_Kooper_01A, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 3) - EVT_CALL(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) - EVT_WAIT(5 * DT) - EVT_END_LOOP - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, -30) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Kooper_01A, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump1, NPC_Kooper_01A, LVar0, LVar1, LVar2, 20 * DT) - EVT_END_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Kooper_02A, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump1, NPC_Kooper_02A, LVar0, LVar1, LVar2, 20 * DT) - EVT_CALL(PlayerFaceNpc, NPC_Kooper_01A, FALSE) - EVT_LOOP(3) - EVT_CALL(GetNpcYaw, NPC_Kooper_01A, LVar0) - EVT_ADD(LVar0, 180) - EVT_CALL(InterpNpcYaw, NPC_Kooper_01A, LVar0, 0) - EVT_CALL(GetNpcYaw, NPC_Kooper_02A, LVar0) - EVT_ADD(LVar0, 180) - EVT_CALL(InterpNpcYaw, NPC_Kooper_02A, LVar0, 0) - EVT_CALL(GetNpcPos, NPC_Kooper_01A, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 3) - EVT_CALL(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) - EVT_WAIT(5 * DT) - EVT_END_LOOP - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 55) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Kooper_01A, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump1, NPC_Kooper_01A, LVar0, LVar1, LVar2, 20 * DT) - EVT_END_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Kooper_02A, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump1, NPC_Kooper_02A, LVar0, LVar1, LVar2, 20 * DT) - EVT_CALL(PlayerFaceNpc, NPC_Kooper_01A, FALSE) - EVT_LOOP(5) - EVT_CALL(GetNpcYaw, NPC_Kooper_01A, LVar0) - EVT_ADD(LVar0, 180) - EVT_CALL(InterpNpcYaw, NPC_Kooper_01A, LVar0, 0) - EVT_CALL(GetNpcYaw, NPC_Kooper_02A, LVar0) - EVT_ADD(LVar0, 180) - EVT_CALL(InterpNpcYaw, NPC_Kooper_02A, LVar0, 0) - EVT_CALL(GetNpcPos, NPC_Kooper_01A, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 3) - EVT_CALL(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) - EVT_WAIT(4 * DT) - EVT_END_LOOP - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_ADD(LVar2, 30) - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Kooper_01A, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump1, NPC_Kooper_01A, LVar0, LVar1, LVar2, 20 * DT) - EVT_END_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Kooper_02A, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump1, NPC_Kooper_02A, LVar0, LVar1, LVar2, 20 * DT) - EVT_CALL(PlayerFaceNpc, NPC_Kooper_01A, FALSE) - EVT_LOOP(6) - EVT_CALL(GetNpcYaw, NPC_Kooper_01A, LVar0) - EVT_ADD(LVar0, 180) - EVT_CALL(InterpNpcYaw, NPC_Kooper_01A, LVar0, 0) - EVT_CALL(GetNpcYaw, NPC_Kooper_02A, LVar0) - EVT_ADD(LVar0, 180) - EVT_CALL(InterpNpcYaw, NPC_Kooper_02A, LVar0, 0) - EVT_CALL(GetNpcPos, NPC_Kooper_01A, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 3) - EVT_CALL(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) - EVT_WAIT(6 * DT) - EVT_END_LOOP - EVT_CALL(StopSound, SOUND_LOOP_FIGHTING) - EVT_KILL_THREAD(MV_KoopersFightingScript) - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_GT(LVar0, 50) - EVT_THREAD - EVT_CALL(InterpNpcYaw, NPC_Kooper_01A, 270, 0) - EVT_CALL(SetNpcJumpscale, NPC_Kooper_01A, EVT_FLOAT(2.0)) - EVT_CALL(NpcJump1, NPC_Kooper_01A, -1062, -120, -37, 15 * DT) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(InterpNpcYaw, NPC_Kooper_02A, 90, 0) - EVT_CALL(SetNpcJumpscale, NPC_Kooper_02A, EVT_FLOAT(2.0)) - EVT_CALL(NpcJump1, NPC_Kooper_02A, -1172, -120, -37, 15 * DT) - EVT_END_THREAD - EVT_ELSE - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_CALL(InterpNpcYaw, NPC_Kooper_01A, 90, 0) - EVT_CALL(SetNpcJumpscale, NPC_Kooper_01A, EVT_FLOAT(2.0)) - EVT_CALL(NpcJump1, NPC_Kooper_01A, -1172, -120, -37, 15 * DT) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(InterpNpcYaw, NPC_Kooper_02A, 270, 0) - EVT_CALL(SetNpcJumpscale, NPC_Kooper_02A, EVT_FLOAT(2.0)) - EVT_CALL(NpcJump1, NPC_Kooper_02A, -1062, -120, -37, 15 * DT) - EVT_END_THREAD - EVT_END_IF - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcAnimation, NPC_Kooper_01A, ANIM_WorldKooper_Idle) - EVT_CALL(SetNpcAnimation, NPC_Kooper_02A, ANIM_WorldKooper_Idle) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Kooper_01A, LVar3, LVar4, LVar5) - EVT_ADDF(LVar3, LVar0) - EVT_ADDF(LVar4, LVar1) - EVT_ADDF(LVar5, LVar2) - EVT_DIVF(LVar3, EVT_FLOAT(2.0)) - EVT_DIVF(LVar4, EVT_FLOAT(2.0)) - EVT_DIVF(LVar5, EVT_FLOAT(2.0)) - EVT_CALL(GetNpcPos, NPC_Kooper_02A, LVar6, LVar7, LVar8) - EVT_ADDF(LVar6, LVar0) - EVT_ADDF(LVar7, LVar1) - EVT_ADDF(LVar8, LVar2) - EVT_DIVF(LVar6, EVT_FLOAT(2.0)) - EVT_DIVF(LVar7, EVT_FLOAT(2.0)) - EVT_DIVF(LVar8, EVT_FLOAT(2.0)) - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_GT(LVar0, 50) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(205.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlayerFaceNpc, NPC_Kooper_01A, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_0125) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar6, LVar7, LVar8) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.5 / DT)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlayerFaceNpc, NPC_Kooper_02A, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Kooper_02A, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_0124) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlayerFaceNpc, NPC_Kooper_01A, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_0127) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar6, LVar7, LVar8) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlayerFaceNpc, NPC_Kooper_02A, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Kooper_02A, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_0126) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlayerFaceNpc, NPC_Kooper_01A, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_0129) - EVT_CALL(PlayerFaceNpc, NPC_Kooper_02A, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Kooper_02A, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_0128) - EVT_ELSE - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar6, LVar7, LVar8) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar6, LVar7, LVar8) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(205.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlayerFaceNpc, NPC_Kooper_02A, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Kooper_02A, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_0124) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlayerFaceNpc, NPC_Kooper_01A, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_0125) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar6, LVar7, LVar8) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlayerFaceNpc, NPC_Kooper_02A, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Kooper_02A, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_0126) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlayerFaceNpc, NPC_Kooper_01A, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_0127) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PlayerFaceNpc, NPC_Kooper_02A, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Kooper_02A, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_0128) - EVT_CALL(PlayerFaceNpc, NPC_Kooper_01A, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_0129) - EVT_END_IF - EVT_CALL(SetNpcFlagBits, NPC_Kooper_01A, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Kooper_02A, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_CHANGE_PARTNER | PS_FLAG_NO_PARTNER_USAGE, TRUE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(SetNpcAnimation, NPC_Kooper_01A, ANIM_WorldKooper_Hurt) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_Kooper_01A, ANIM_WorldKooper_Idle) + Call(GetNpcPos, NPC_Kooper_02A, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Kooper_01A, LVar3, LVar4, LVar5) + AddF(LVar0, LVar3) + AddF(LVar1, LVar4) + AddF(LVar2, LVar5) + DivF(LVar0, 2) + DivF(LVar1, 2) + DivF(LVar2, 2) + SetF(LVar6, LVar0) + SetF(LVar7, LVar1) + SetF(LVar8, LVar2) + AddF(LVar0, LVar3) + AddF(LVar1, LVar4) + AddF(LVar2, LVar5) + DivF(LVar0, Float(2.0)) + DivF(LVar1, Float(2.0)) + DivF(LVar2, Float(2.0)) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(250.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-8.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_TalkSad, ANIM_WorldKooper_StillSad, 0, MSG_CH7_012C) + Call(GetNpcPos, NPC_Kooper_02A, LVar0, LVar1, LVar2) + SetF(LVar3, LVar6) + SetF(LVar4, LVar7) + SetF(LVar5, LVar8) + AddF(LVar3, LVar0) + AddF(LVar4, LVar1) + AddF(LVar5, LVar2) + DivF(LVar3, Float(2.0)) + DivF(LVar4, Float(2.0)) + DivF(LVar5, Float(2.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.5 / DT)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlayerFaceNpc, NPC_Kooper_02A, FALSE) + Call(SpeakToPlayer, NPC_Kooper_02A, ANIM_WorldKooper_CelebrateLoop, ANIM_WorldKooper_Idle, 0, MSG_CH7_012D) + Call(GetNpcPos, NPC_Kooper_01A, LVar0, LVar1, LVar2) + SetF(LVar3, LVar6) + SetF(LVar4, LVar7) + SetF(LVar5, LVar8) + AddF(LVar3, LVar0) + AddF(LVar4, LVar1) + AddF(LVar5, LVar2) + DivF(LVar3, Float(2.0)) + DivF(LVar4, Float(2.0)) + DivF(LVar5, Float(2.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_TalkSad, ANIM_WorldKooper_StillSad, 0, MSG_CH7_012E) + Call(GetNpcPos, NPC_Kooper_02A, LVar0, LVar1, LVar2) + SetF(LVar3, LVar6) + SetF(LVar4, LVar7) + SetF(LVar5, LVar8) + AddF(LVar3, LVar0) + AddF(LVar4, LVar1) + AddF(LVar5, LVar2) + DivF(LVar3, Float(2.0)) + DivF(LVar4, Float(2.0)) + DivF(LVar5, Float(2.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.5 / DT)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Kooper_02A, ANIM_WorldKooper_TalkHappy, ANIM_WorldKooper_Idle, 0, MSG_CH7_012F) + Call(SetNpcFlagBits, NPC_Kooper_01A, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Kooper_02A, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(GetNpcPos, NPC_Kooper_01A, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Kooper_02A, LVar3, LVar4, LVar5) + Call(GetAngleBetweenNPCs, NPC_Kooper_01A, NPC_Kooper_02A, LVar9) + Call(GetDist2D, LVarA, LVar0, LVar2, LVar3, LVar5) + MulF(LVarA, Float(0.6)) + Call(AddVectorPolar, LVar0, LVar2, LVarA, LVar9) + Call(SetNpcJumpscale, NPC_Kooper_01A, Float(1.0)) + Call(SetNpcAnimation, NPC_Kooper_01A, ANIM_WorldKooper_Jump) + Call(NpcJump0, NPC_Kooper_01A, LVar0, LVar1, LVar2, 20 * DT) + Call(NpcJump0, NPC_Kooper_01A, LVar3, LVar4, LVar5, 10 * DT) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(GetNpcPos, NPC_Kooper_01A, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + ExecGetTID(N(EVS_TwoKoopesFightingFX), MV_KoopersFightingScript) + Thread + Call(SetPlayerSpeed, Float(3.0 / DT)) + Call(PlayerMoveTo, LVar6, LVar8, 0) + EndThread + Call(SetNpcAnimation, NPC_Kooper_01A, ANIM_WorldKooper_Run) + Call(SetNpcAnimation, NPC_Kooper_02A, ANIM_WorldKooper_Run) + Call(PlayerFaceNpc, NPC_Kooper_01A, FALSE) + Loop(3) + Call(GetNpcYaw, NPC_Kooper_01A, LVar0) + Add(LVar0, 180) + Call(InterpNpcYaw, NPC_Kooper_01A, LVar0, 0) + Call(GetNpcYaw, NPC_Kooper_02A, LVar0) + Add(LVar0, 180) + Call(InterpNpcYaw, NPC_Kooper_02A, LVar0, 0) + Call(GetNpcPos, NPC_Kooper_01A, LVar0, LVar1, LVar2) + Add(LVar2, 3) + Call(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) + Wait(5 * DT) + EndLoop + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar2, -30) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Call(SetNpcJumpscale, NPC_Kooper_01A, Float(1.0)) + Call(NpcJump1, NPC_Kooper_01A, LVar0, LVar1, LVar2, 20 * DT) + EndThread + Call(SetNpcJumpscale, NPC_Kooper_02A, Float(1.0)) + Call(NpcJump1, NPC_Kooper_02A, LVar0, LVar1, LVar2, 20 * DT) + Call(PlayerFaceNpc, NPC_Kooper_01A, FALSE) + Loop(3) + Call(GetNpcYaw, NPC_Kooper_01A, LVar0) + Add(LVar0, 180) + Call(InterpNpcYaw, NPC_Kooper_01A, LVar0, 0) + Call(GetNpcYaw, NPC_Kooper_02A, LVar0) + Add(LVar0, 180) + Call(InterpNpcYaw, NPC_Kooper_02A, LVar0, 0) + Call(GetNpcPos, NPC_Kooper_01A, LVar0, LVar1, LVar2) + Add(LVar2, 3) + Call(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) + Wait(5 * DT) + EndLoop + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 55) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Thread + Call(SetNpcJumpscale, NPC_Kooper_01A, Float(0.0)) + Call(NpcJump1, NPC_Kooper_01A, LVar0, LVar1, LVar2, 20 * DT) + EndThread + Call(SetNpcJumpscale, NPC_Kooper_02A, Float(0.0)) + Call(NpcJump1, NPC_Kooper_02A, LVar0, LVar1, LVar2, 20 * DT) + Call(PlayerFaceNpc, NPC_Kooper_01A, FALSE) + Loop(5) + Call(GetNpcYaw, NPC_Kooper_01A, LVar0) + Add(LVar0, 180) + Call(InterpNpcYaw, NPC_Kooper_01A, LVar0, 0) + Call(GetNpcYaw, NPC_Kooper_02A, LVar0) + Add(LVar0, 180) + Call(InterpNpcYaw, NPC_Kooper_02A, LVar0, 0) + Call(GetNpcPos, NPC_Kooper_01A, LVar0, LVar1, LVar2) + Add(LVar2, 3) + Call(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) + Wait(4 * DT) + EndLoop + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Add(LVar2, 30) + Thread + Call(SetNpcJumpscale, NPC_Kooper_01A, Float(1.0)) + Call(NpcJump1, NPC_Kooper_01A, LVar0, LVar1, LVar2, 20 * DT) + EndThread + Call(SetNpcJumpscale, NPC_Kooper_02A, Float(1.0)) + Call(NpcJump1, NPC_Kooper_02A, LVar0, LVar1, LVar2, 20 * DT) + Call(PlayerFaceNpc, NPC_Kooper_01A, FALSE) + Loop(6) + Call(GetNpcYaw, NPC_Kooper_01A, LVar0) + Add(LVar0, 180) + Call(InterpNpcYaw, NPC_Kooper_01A, LVar0, 0) + Call(GetNpcYaw, NPC_Kooper_02A, LVar0) + Add(LVar0, 180) + Call(InterpNpcYaw, NPC_Kooper_02A, LVar0, 0) + Call(GetNpcPos, NPC_Kooper_01A, LVar0, LVar1, LVar2) + Add(LVar2, 3) + Call(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) + Wait(6 * DT) + EndLoop + Call(StopSound, SOUND_LOOP_FIGHTING) + KillThread(MV_KoopersFightingScript) + Call(RandInt, 100, LVar0) + IfGt(LVar0, 50) + Thread + Call(InterpNpcYaw, NPC_Kooper_01A, 270, 0) + Call(SetNpcJumpscale, NPC_Kooper_01A, Float(2.0)) + Call(NpcJump1, NPC_Kooper_01A, -1062, -120, -37, 15 * DT) + EndThread + Thread + Call(InterpNpcYaw, NPC_Kooper_02A, 90, 0) + Call(SetNpcJumpscale, NPC_Kooper_02A, Float(2.0)) + Call(NpcJump1, NPC_Kooper_02A, -1172, -120, -37, 15 * DT) + EndThread + Else + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Thread + Call(InterpNpcYaw, NPC_Kooper_01A, 90, 0) + Call(SetNpcJumpscale, NPC_Kooper_01A, Float(2.0)) + Call(NpcJump1, NPC_Kooper_01A, -1172, -120, -37, 15 * DT) + EndThread + Thread + Call(InterpNpcYaw, NPC_Kooper_02A, 270, 0) + Call(SetNpcJumpscale, NPC_Kooper_02A, Float(2.0)) + Call(NpcJump1, NPC_Kooper_02A, -1062, -120, -37, 15 * DT) + EndThread + EndIf + Wait(30 * DT) + Call(SetNpcAnimation, NPC_Kooper_01A, ANIM_WorldKooper_Idle) + Call(SetNpcAnimation, NPC_Kooper_02A, ANIM_WorldKooper_Idle) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Kooper_01A, LVar3, LVar4, LVar5) + AddF(LVar3, LVar0) + AddF(LVar4, LVar1) + AddF(LVar5, LVar2) + DivF(LVar3, Float(2.0)) + DivF(LVar4, Float(2.0)) + DivF(LVar5, Float(2.0)) + Call(GetNpcPos, NPC_Kooper_02A, LVar6, LVar7, LVar8) + AddF(LVar6, LVar0) + AddF(LVar7, LVar1) + AddF(LVar8, LVar2) + DivF(LVar6, Float(2.0)) + DivF(LVar7, Float(2.0)) + DivF(LVar8, Float(2.0)) + Call(RandInt, 100, LVar0) + IfGt(LVar0, 50) + Call(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetCamDistance, CAM_DEFAULT, Float(205.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-9.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlayerFaceNpc, NPC_Kooper_01A, FALSE) + Call(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_0125) + Call(SetPanTarget, CAM_DEFAULT, LVar6, LVar7, LVar8) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.5 / DT)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlayerFaceNpc, NPC_Kooper_02A, FALSE) + Call(SpeakToPlayer, NPC_Kooper_02A, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_0124) + Call(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlayerFaceNpc, NPC_Kooper_01A, FALSE) + Call(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_0127) + Call(SetPanTarget, CAM_DEFAULT, LVar6, LVar7, LVar8) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlayerFaceNpc, NPC_Kooper_02A, FALSE) + Call(SpeakToPlayer, NPC_Kooper_02A, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_0126) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlayerFaceNpc, NPC_Kooper_01A, FALSE) + Call(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_0129) + Call(PlayerFaceNpc, NPC_Kooper_02A, FALSE) + Call(SpeakToPlayer, NPC_Kooper_02A, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_0128) + Else + Call(UseSettingsFrom, CAM_DEFAULT, LVar6, LVar7, LVar8) + Call(SetPanTarget, CAM_DEFAULT, LVar6, LVar7, LVar8) + Call(SetCamDistance, CAM_DEFAULT, Float(205.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-9.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlayerFaceNpc, NPC_Kooper_02A, FALSE) + Call(SpeakToPlayer, NPC_Kooper_02A, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_0124) + Call(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlayerFaceNpc, NPC_Kooper_01A, FALSE) + Call(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_0125) + Call(SetPanTarget, CAM_DEFAULT, LVar6, LVar7, LVar8) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlayerFaceNpc, NPC_Kooper_02A, FALSE) + Call(SpeakToPlayer, NPC_Kooper_02A, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_0126) + Call(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlayerFaceNpc, NPC_Kooper_01A, FALSE) + Call(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_0127) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PlayerFaceNpc, NPC_Kooper_02A, FALSE) + Call(SpeakToPlayer, NPC_Kooper_02A, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_0128) + Call(PlayerFaceNpc, NPC_Kooper_01A, FALSE) + Call(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH7_0129) + EndIf + Call(SetNpcFlagBits, NPC_Kooper_01A, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcFlagBits, NPC_Kooper_02A, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(DisablePlayerInput, FALSE) + Call(SetPlayerFlagBits, PS_FLAG_NO_CHANGE_PARTNER | PS_FLAG_NO_PARTNER_USAGE, TRUE) + Return + End }; EvtScript N(EVS_Scene_HitFakeKooper) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-8.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetNpcAnimation, NPC_Kooper_02A, ANIM_WorldKooper_Hurt) - EVT_WAIT(20 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Kooper_02A, SOUND_GHOST_TRANSFORM, SOUND_SPACE_DEFAULT) - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_Kooper_02A, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 3) - EVT_CALL(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) - EVT_WAIT(5 * DT) - EVT_END_LOOP - EVT_CALL(PlaySoundAtNpc, NPC_Kooper_02A, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcPos, NPC_Kooper_02A, NPC_DISPOSE_LOCATION) - EVT_CALL(EnableNpcShadow, NPC_Kooper_02A, FALSE) - EVT_CALL(SetNpcPos, NPC_Duplighost, LVar0, LVar1, LVar2) - EVT_CALL(MakeLerp, 0, 2880, 40 * DT, EASING_QUADRATIC_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Duplighost, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetAngleToPlayer, NPC_Duplighost, LVar0) - EVT_CALL(InterpNpcYaw, NPC_Duplighost, LVar0, 0) - EVT_THREAD - EVT_SET(MF_KooperDoneMoving, FALSE) - EVT_CALL(GetAngleToNPC, NPC_Kooper_01A, LVar0) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_CALL(AddVectorPolar, LVar1, LVar3, EVT_FLOAT(40.0), LVar0) - EVT_CALL(SetNpcSpeed, NPC_Kooper_01A, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_Kooper_01A, ANIM_WorldKooper_Run) - EVT_CALL(SetNpcFlagBits, NPC_Kooper_01A, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(NpcMoveTo, NPC_Kooper_01A, LVar1, LVar3, 0) - EVT_CALL(SetNpcAnimation, NPC_Kooper_01A, ANIM_WorldKooper_Idle) - EVT_SET(MF_KooperDoneMoving, TRUE) - EVT_END_THREAD - EVT_CALL(PlayerFaceNpc, NPC_Duplighost, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Duplighost, ANIM_Duplighost_Anim05, ANIM_Duplighost_Anim02, 0, MSG_CH7_0130) - EVT_LABEL(0) - EVT_IF_EQ(MF_KooperDoneMoving, FALSE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 5, MSG_CH7_0131) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Duplighost, ANIM_Duplighost_Anim05, ANIM_Duplighost_Anim02, 0, MSG_CH7_0132) - EVT_CALL(SetNpcAnimation, NPC_Duplighost, ANIM_Duplighost_Anim06) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(GetNpcPos, NPC_Kooper_01A, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Kooper_01A, NPC_DISPOSE_LOCATION) - EVT_CALL(EnableNpcShadow, NPC_Kooper_01A, FALSE) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcYaw, NPC_Kooper_01A, LVar0) - EVT_CALL(SetNpcYaw, NPC_PARTNER, LVar0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_INVISIBLE | NPC_FLAG_INACTIVE, FALSE) - EVT_CALL(EnableNpcShadow, NPC_PARTNER, TRUE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(SetNpcVar, NPC_Duplighost, 0, 1) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(250.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-8.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetNpcAnimation, NPC_Kooper_02A, ANIM_WorldKooper_Hurt) + Wait(20 * DT) + Call(PlaySoundAtNpc, NPC_Kooper_02A, SOUND_GHOST_TRANSFORM, SOUND_SPACE_DEFAULT) + Loop(10) + Call(GetNpcPos, NPC_Kooper_02A, LVar0, LVar1, LVar2) + Add(LVar2, 3) + Call(N(PlayBigSmokePuff), LVar0, LVar1, LVar2) + Wait(5 * DT) + EndLoop + Call(PlaySoundAtNpc, NPC_Kooper_02A, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) + Call(SetNpcPos, NPC_Kooper_02A, NPC_DISPOSE_LOCATION) + Call(EnableNpcShadow, NPC_Kooper_02A, FALSE) + Call(SetNpcPos, NPC_Duplighost, LVar0, LVar1, LVar2) + Call(MakeLerp, 0, 2880, 40 * DT, EASING_QUADRATIC_OUT) + Label(1) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Duplighost, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(GetAngleToPlayer, NPC_Duplighost, LVar0) + Call(InterpNpcYaw, NPC_Duplighost, LVar0, 0) + Thread + Set(MF_KooperDoneMoving, FALSE) + Call(GetAngleToNPC, NPC_Kooper_01A, LVar0) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + Call(AddVectorPolar, LVar1, LVar3, Float(40.0), LVar0) + Call(SetNpcSpeed, NPC_Kooper_01A, Float(3.0 / DT)) + Call(SetNpcAnimation, NPC_Kooper_01A, ANIM_WorldKooper_Run) + Call(SetNpcFlagBits, NPC_Kooper_01A, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(NpcMoveTo, NPC_Kooper_01A, LVar1, LVar3, 0) + Call(SetNpcAnimation, NPC_Kooper_01A, ANIM_WorldKooper_Idle) + Set(MF_KooperDoneMoving, TRUE) + EndThread + Call(PlayerFaceNpc, NPC_Duplighost, FALSE) + Call(SpeakToPlayer, NPC_Duplighost, ANIM_Duplighost_Anim05, ANIM_Duplighost_Anim02, 0, MSG_CH7_0130) + Label(0) + IfEq(MF_KooperDoneMoving, FALSE) + Wait(1) + Goto(0) + EndIf + Call(SpeakToPlayer, NPC_Kooper_01A, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 5, MSG_CH7_0131) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Duplighost, ANIM_Duplighost_Anim05, ANIM_Duplighost_Anim02, 0, MSG_CH7_0132) + Call(SetNpcAnimation, NPC_Duplighost, ANIM_Duplighost_Anim06) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(GetNpcPos, NPC_Kooper_01A, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Kooper_01A, NPC_DISPOSE_LOCATION) + Call(EnableNpcShadow, NPC_Kooper_01A, FALSE) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(GetNpcYaw, NPC_Kooper_01A, LVar0) + Call(SetNpcYaw, NPC_PARTNER, LVar0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_INVISIBLE | NPC_FLAG_INACTIVE, FALSE) + Call(EnableNpcShadow, NPC_PARTNER, TRUE) + Call(EnablePartnerAI) + Call(SetNpcVar, NPC_Duplighost, 0, 1) + Return + End }; EvtScript N(EVS_SetupBridge) = { - EVT_CALL(ParentColliderToModel, COLLIDER_m1_kabe, MODEL_m1_kabe) - EVT_IF_LT(GB_StoryProgress, STORY_CH7_DEFEATED_FIRST_DUPLIGHOST) - EVT_CALL(TranslateGroup, MODEL_move1, 0, -120, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_m1_kabe) - EVT_CALL(EnableModel, MODEL_m1_kabe, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Scene_ImposterAppears)), TRIGGER_AREA_FLAG_SET, AF_SAM_06, 1, 0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(ParentColliderToModel, COLLIDER_m1_kabe, MODEL_m1_kabe) + IfLt(GB_StoryProgress, STORY_CH7_DEFEATED_FIRST_DUPLIGHOST) + Call(TranslateGroup, MODEL_move1, 0, -120, 0) + Call(UpdateColliderTransform, COLLIDER_m1_kabe) + Call(EnableModel, MODEL_m1_kabe, FALSE) + BindTrigger(Ref(N(EVS_Scene_ImposterAppears)), TRIGGER_AREA_FLAG_SET, AF_SAM_06, 1, 0) + EndIf + Return + End }; diff --git a/src/world/area_sam/sam_09/sam_09_1_music.c b/src/world/area_sam/sam_09/sam_09_1_music.c index 6556de6cef0..b38a2ee77b4 100644 --- a/src/world/area_sam/sam_09/sam_09_1_music.c +++ b/src/world/area_sam/sam_09/sam_09_1_music.c @@ -1,7 +1,7 @@ #include "sam_09.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_SHIVER_MOUNTAIN, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_SHIVER_MOUNTAIN, 0, 8) + Return + End }; diff --git a/src/world/area_sam/sam_09/sam_09_2_main.c b/src/world/area_sam/sam_09/sam_09_2_main.c index 759010a9cfc..2d158c6ce68 100644 --- a/src/world/area_sam/sam_09/sam_09_2_main.c +++ b/src/world/area_sam/sam_09/sam_09_2_main.c @@ -5,25 +5,25 @@ EvtScript N(EVS_ExitWalk_sam_08_1) = EVT_EXIT_WALK(60, sam_09_ENTRY_0, "sam_08", EvtScript N(EVS_ExitWalk_sam_10_0) = EVT_EXIT_WALK(60, sam_09_ENTRY_1, "sam_10", sam_10_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sam_08_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sam_10_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sam_08_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sam_10_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHIVER_MOUNTAIN) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_yuka, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deiliw, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilie, SURFACE_TYPE_SNOW) - EVT_EXEC_WAIT(N(EVS_SetupSockets)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_SHIVER_MOUNTAIN) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupMusic)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_yuka, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deiliw, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilie, SURFACE_TYPE_SNOW) + ExecWait(N(EVS_SetupSockets)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; diff --git a/src/world/area_sam/sam_09/sam_09_3_entity.c b/src/world/area_sam/sam_09/sam_09_3_entity.c index 1ec0ffedf7c..c8808687aa2 100644 --- a/src/world/area_sam/sam_09/sam_09_3_entity.c +++ b/src/world/area_sam/sam_09/sam_09_3_entity.c @@ -2,6 +2,6 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/area_sam/sam_09/sam_09_4_sockets.c b/src/world/area_sam/sam_09/sam_09_4_sockets.c index a35eb477b16..7916ff1b87c 100644 --- a/src/world/area_sam/sam_09/sam_09_4_sockets.c +++ b/src/world/area_sam/sam_09/sam_09_4_sockets.c @@ -81,247 +81,247 @@ API_CALLABLE(N(CreateConsumableItemList)) { } EvtScript N(EVS_PlaceItemInSocket) = { - EVT_CALL(PlaySoundAtCollider, LVar4, SOUND_SAM_RAISE_BARRIER, 0) - EVT_CALL(MakeLerp, 0, 130, 30 * DT, EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, LVar2, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, LVar4, SOUND_SAM_RAISE_BARRIER, 0) + Call(MakeLerp, 0, 130, 30 * DT, EASING_LINEAR) + Label(0) + Call(UpdateLerp) + Call(TranslateModel, LVar2, 0, LVar0, 0) + Call(UpdateColliderTransform, LVar4) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Return + End }; EvtScript N(EVS_TakeItemFromSocket) = { - EVT_CALL(PlaySoundAtCollider, LVar4, SOUND_SAM_LOWER_BARRIER, 0) - EVT_CALL(MakeLerp, 130, 0, 30 * DT, EASING_CUBIC_IN) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, LVar2, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, LVar4, SOUND_SAM_BARRIER_THUD, 0) - EVT_CALL(GetModelCenter, LVar2) - EVT_SET(LVar3, LVar2) - EVT_SET(LVar4, LVar2) - EVT_ADD(LVar3, 30) - EVT_SUB(LVar4, 30) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 3, LVar0, 0, LVar2, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 3, LVar0, 0, LVar3, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 3, LVar0, 0, LVar4, 0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, LVar4, SOUND_SAM_LOWER_BARRIER, 0) + Call(MakeLerp, 130, 0, 30 * DT, EASING_CUBIC_IN) + Label(0) + Call(UpdateLerp) + Call(TranslateModel, LVar2, 0, LVar0, 0) + Call(UpdateColliderTransform, LVar4) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(PlaySoundAtCollider, LVar4, SOUND_SAM_BARRIER_THUD, 0) + Call(GetModelCenter, LVar2) + Set(LVar3, LVar2) + Set(LVar4, LVar2) + Add(LVar3, 30) + Sub(LVar4, 30) + PlayEffect(EFFECT_LANDING_DUST, 3, LVar0, 0, LVar2, 0) + PlayEffect(EFFECT_LANDING_DUST, 3, LVar0, 0, LVar3, 0) + PlayEffect(EFFECT_LANDING_DUST, 3, LVar0, 0, LVar4, 0) + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(1.0)) + Return + End }; EvtScript N(EVS_UseSocket1) = { - EVT_IF_EQ(MV_Socket1_ItemID, -1) - EVT_CALL(ShowConsumableChoicePopup) - EVT_CALL(CloseChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_SAM09_PlaceItemTip, 160, 40) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_RETURN - EVT_END_IF - EVT_SET(MV_Socket1_ItemID, LVar0) - EVT_CALL(N(SerializeItemIDs)) - EVT_CALL(RemoveItem, LVar0, LVar2) - EVT_CALL(MakeItemEntity, LVar0, -385, 30, -50, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(MV_Socket1_ItemEntityID, LVar0) - EVT_SET(LVar2, MODEL_m1_kabe) - EVT_SET(LVar4, COLLIDER_o55) - EVT_EXEC_WAIT(N(EVS_PlaceItemInSocket)) - EVT_RETURN - EVT_ELSE - EVT_SET(LVar0, MV_Socket1_ItemEntityID) - EVT_CALL(N(GetItemIDFromItemEntity), LVar0) - EVT_CALL(N(GetItemName), LVar0) - EVT_CALL(SetMessageText, LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_PickUpPrompt, 160, 40) - EVT_CALL(ShowChoice, MSG_Choice_000D) - EVT_CALL(CloseMessage) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(AddItem, MV_Socket1_ItemID, LVar0) - EVT_IF_EQ(LVar0, -1) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_CantCarryMore, 160, 40) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(GetItemIDFromItemEntity), MV_Socket1_ItemEntityID) - EVT_CALL(RemoveItemEntity, MV_Socket1_ItemEntityID) - EVT_SET(MV_Socket1_ItemID, -1) - EVT_CALL(N(SerializeItemIDs)) - EVT_CALL(ShowGotItem, LVar0, FALSE, ITEM_PICKUP_FLAG_UNIQUE) - EVT_SET(LVar2, MODEL_m1_kabe) - EVT_SET(LVar4, COLLIDER_o55) - EVT_EXEC_WAIT(N(EVS_TakeItemFromSocket)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MV_Socket1_ItemID, -1) + Call(ShowConsumableChoicePopup) + Call(CloseChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_SAM09_PlaceItemTip, 160, 40) + Return + EndIf + IfEq(LVar0, -1) + Return + EndIf + Set(MV_Socket1_ItemID, LVar0) + Call(N(SerializeItemIDs)) + Call(RemoveItem, LVar0, LVar2) + Call(MakeItemEntity, LVar0, -385, 30, -50, ITEM_SPAWN_MODE_DECORATION, 0) + Set(MV_Socket1_ItemEntityID, LVar0) + Set(LVar2, MODEL_m1_kabe) + Set(LVar4, COLLIDER_o55) + ExecWait(N(EVS_PlaceItemInSocket)) + Return + Else + Set(LVar0, MV_Socket1_ItemEntityID) + Call(N(GetItemIDFromItemEntity), LVar0) + Call(N(GetItemName), LVar0) + Call(SetMessageText, LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_Inspect_PickUpPrompt, 160, 40) + Call(ShowChoice, MSG_Choice_000D) + Call(CloseMessage) + IfEq(LVar0, 0) + Call(AddItem, MV_Socket1_ItemID, LVar0) + IfEq(LVar0, -1) + Call(ShowMessageAtScreenPos, MSG_Menus_Inspect_CantCarryMore, 160, 40) + Return + EndIf + Call(N(GetItemIDFromItemEntity), MV_Socket1_ItemEntityID) + Call(RemoveItemEntity, MV_Socket1_ItemEntityID) + Set(MV_Socket1_ItemID, -1) + Call(N(SerializeItemIDs)) + Call(ShowGotItem, LVar0, FALSE, ITEM_PICKUP_FLAG_UNIQUE) + Set(LVar2, MODEL_m1_kabe) + Set(LVar4, COLLIDER_o55) + ExecWait(N(EVS_TakeItemFromSocket)) + Return + EndIf + EndIf + Return + End }; EvtScript N(EVS_UseSocket2) = { - EVT_IF_EQ(MV_Socket2_ItemID, -1) - EVT_CALL(ShowConsumableChoicePopup) - EVT_CALL(CloseChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_SAM09_PlaceItemTip, 160, 40) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_RETURN - EVT_END_IF - EVT_SET(MV_Socket2_ItemID, LVar0) - EVT_CALL(N(SerializeItemIDs)) - EVT_CALL(RemoveItem, LVar0, LVar2) - EVT_CALL(MakeItemEntity, LVar0, -35, 30, -50, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(MV_Socket2_ItemEntityID, LVar0) - EVT_SET(LVar2, MODEL_m2_kabe) - EVT_SET(LVar4, COLLIDER_o54) - EVT_EXEC_WAIT(N(EVS_PlaceItemInSocket)) - EVT_RETURN - EVT_ELSE - EVT_SET(LVar0, MV_Socket2_ItemEntityID) - EVT_CALL(N(GetItemIDFromItemEntity), LVar0) - EVT_CALL(N(GetItemName), LVar0) - EVT_CALL(SetMessageText, LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_PickUpPrompt, 160, 40) - EVT_CALL(ShowChoice, MSG_Choice_000D) - EVT_CALL(CloseMessage) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(AddItem, MV_Socket2_ItemID, LVar0) - EVT_IF_EQ(LVar0, -1) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_CantCarryMore, 160, 40) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(GetItemIDFromItemEntity), MV_Socket2_ItemEntityID) - EVT_CALL(RemoveItemEntity, MV_Socket2_ItemEntityID) - EVT_SET(MV_Socket2_ItemID, -1) - EVT_CALL(N(SerializeItemIDs)) - EVT_CALL(ShowGotItem, LVar0, FALSE, ITEM_PICKUP_FLAG_UNIQUE) - EVT_SET(LVar2, MODEL_m2_kabe) - EVT_SET(LVar4, COLLIDER_o54) - EVT_EXEC_WAIT(N(EVS_TakeItemFromSocket)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MV_Socket2_ItemID, -1) + Call(ShowConsumableChoicePopup) + Call(CloseChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_SAM09_PlaceItemTip, 160, 40) + Return + EndIf + IfEq(LVar0, -1) + Return + EndIf + Set(MV_Socket2_ItemID, LVar0) + Call(N(SerializeItemIDs)) + Call(RemoveItem, LVar0, LVar2) + Call(MakeItemEntity, LVar0, -35, 30, -50, ITEM_SPAWN_MODE_DECORATION, 0) + Set(MV_Socket2_ItemEntityID, LVar0) + Set(LVar2, MODEL_m2_kabe) + Set(LVar4, COLLIDER_o54) + ExecWait(N(EVS_PlaceItemInSocket)) + Return + Else + Set(LVar0, MV_Socket2_ItemEntityID) + Call(N(GetItemIDFromItemEntity), LVar0) + Call(N(GetItemName), LVar0) + Call(SetMessageText, LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_Inspect_PickUpPrompt, 160, 40) + Call(ShowChoice, MSG_Choice_000D) + Call(CloseMessage) + IfEq(LVar0, 0) + Call(AddItem, MV_Socket2_ItemID, LVar0) + IfEq(LVar0, -1) + Call(ShowMessageAtScreenPos, MSG_Menus_Inspect_CantCarryMore, 160, 40) + Return + EndIf + Call(N(GetItemIDFromItemEntity), MV_Socket2_ItemEntityID) + Call(RemoveItemEntity, MV_Socket2_ItemEntityID) + Set(MV_Socket2_ItemID, -1) + Call(N(SerializeItemIDs)) + Call(ShowGotItem, LVar0, FALSE, ITEM_PICKUP_FLAG_UNIQUE) + Set(LVar2, MODEL_m2_kabe) + Set(LVar4, COLLIDER_o54) + ExecWait(N(EVS_TakeItemFromSocket)) + Return + EndIf + EndIf + Return + End }; EvtScript N(EVS_UseSocket3) = { - EVT_IF_EQ(MV_Socket3_ItemID, -1) - EVT_CALL(ShowConsumableChoicePopup) - EVT_CALL(CloseChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_SAM09_PlaceItemTip, 160, 40) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_RETURN - EVT_END_IF - EVT_SET(MV_Socket3_ItemID, LVar0) - EVT_CALL(N(SerializeItemIDs)) - EVT_CALL(RemoveItem, LVar0, LVar2) - EVT_CALL(MakeItemEntity, LVar0, 265, 30, -50, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(MV_Socket3_ItemEntityID, LVar0) - EVT_SET(LVar2, MODEL_m3_kabe) - EVT_SET(LVar4, COLLIDER_o53) - EVT_EXEC_WAIT(N(EVS_PlaceItemInSocket)) - EVT_RETURN - EVT_ELSE - EVT_SET(LVar0, MV_Socket3_ItemEntityID) - EVT_CALL(N(GetItemIDFromItemEntity), LVar0) - EVT_CALL(N(GetItemName), LVar0) - EVT_CALL(SetMessageText, LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_PickUpPrompt, 160, 40) - EVT_CALL(ShowChoice, MSG_Choice_000D) - EVT_CALL(CloseMessage) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(AddItem, MV_Socket3_ItemID, LVar0) - EVT_IF_EQ(LVar0, -1) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_Inspect_CantCarryMore, 160, 40) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(GetItemIDFromItemEntity), MV_Socket3_ItemEntityID) - EVT_CALL(RemoveItemEntity, MV_Socket3_ItemEntityID) - EVT_SET(MV_Socket3_ItemID, -1) - EVT_CALL(N(SerializeItemIDs)) - EVT_CALL(ShowGotItem, LVar0, FALSE, ITEM_PICKUP_FLAG_UNIQUE) - EVT_SET(LVar2, MODEL_m3_kabe) - EVT_SET(LVar4, COLLIDER_o53) - EVT_EXEC_WAIT(N(EVS_TakeItemFromSocket)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MV_Socket3_ItemID, -1) + Call(ShowConsumableChoicePopup) + Call(CloseChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_SAM09_PlaceItemTip, 160, 40) + Return + EndIf + IfEq(LVar0, -1) + Return + EndIf + Set(MV_Socket3_ItemID, LVar0) + Call(N(SerializeItemIDs)) + Call(RemoveItem, LVar0, LVar2) + Call(MakeItemEntity, LVar0, 265, 30, -50, ITEM_SPAWN_MODE_DECORATION, 0) + Set(MV_Socket3_ItemEntityID, LVar0) + Set(LVar2, MODEL_m3_kabe) + Set(LVar4, COLLIDER_o53) + ExecWait(N(EVS_PlaceItemInSocket)) + Return + Else + Set(LVar0, MV_Socket3_ItemEntityID) + Call(N(GetItemIDFromItemEntity), LVar0) + Call(N(GetItemName), LVar0) + Call(SetMessageText, LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_Inspect_PickUpPrompt, 160, 40) + Call(ShowChoice, MSG_Choice_000D) + Call(CloseMessage) + IfEq(LVar0, 0) + Call(AddItem, MV_Socket3_ItemID, LVar0) + IfEq(LVar0, -1) + Call(ShowMessageAtScreenPos, MSG_Menus_Inspect_CantCarryMore, 160, 40) + Return + EndIf + Call(N(GetItemIDFromItemEntity), MV_Socket3_ItemEntityID) + Call(RemoveItemEntity, MV_Socket3_ItemEntityID) + Set(MV_Socket3_ItemID, -1) + Call(N(SerializeItemIDs)) + Call(ShowGotItem, LVar0, FALSE, ITEM_PICKUP_FLAG_UNIQUE) + Set(LVar2, MODEL_m3_kabe) + Set(LVar4, COLLIDER_o53) + ExecWait(N(EVS_TakeItemFromSocket)) + Return + EndIf + EndIf + Return + End }; EvtScript N(EVS_Interact_ItemSockets) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_LABEL(0) - EVT_CALL(GetPlayerActionState, LVar0) - EVT_WAIT(1) - EVT_IF_NE(LVar0, ACTION_STATE_IDLE) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_IF_LT(LVar1, -150) - EVT_EXEC_WAIT(N(EVS_UseSocket1)) - EVT_ELSE - EVT_IF_LT(LVar1, 100) - EVT_EXEC_WAIT(N(EVS_UseSocket2)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_UseSocket3)) - EVT_END_IF - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Label(0) + Call(GetPlayerActionState, LVar0) + Wait(1) + IfNe(LVar0, ACTION_STATE_IDLE) + Goto(0) + EndIf + Call(GetPlayerPos, LVar1, LVar2, LVar3) + IfLt(LVar1, -150) + ExecWait(N(EVS_UseSocket1)) + Else + IfLt(LVar1, 100) + ExecWait(N(EVS_UseSocket2)) + Else + ExecWait(N(EVS_UseSocket3)) + EndIf + EndIf + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SetupSockets) = { - EVT_CALL(ParentColliderToModel, COLLIDER_o55, MODEL_m1_kabe) - EVT_CALL(ParentColliderToModel, COLLIDER_o54, MODEL_m2_kabe) - EVT_CALL(ParentColliderToModel, COLLIDER_o53, MODEL_m3_kabe) - EVT_IF_EQ(GF_SAM09_Visited, FALSE) - EVT_SET(GF_SAM09_Visited, TRUE) - EVT_SET(MV_Socket1_ItemID, ITEM_SHOOTING_STAR) - EVT_SET(MV_Socket2_ItemID, ITEM_SNOWMAN_DOLL) - EVT_SET(MV_Socket3_ItemID, ITEM_THUNDER_RAGE) - EVT_CALL(N(SerializeItemIDs)) - EVT_END_IF - EVT_CALL(N(DeserializeItemIDs)) - EVT_IF_NE(MV_Socket1_ItemID, -1) - EVT_CALL(TranslateModel, MODEL_m1_kabe, 0, 130, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o55) - EVT_CALL(MakeItemEntity, MV_Socket1_ItemID, -385, 30, -50, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(MV_Socket1_ItemEntityID, LVar0) - EVT_END_IF - EVT_IF_NE(MV_Socket2_ItemID, -1) - EVT_CALL(TranslateModel, MODEL_m2_kabe, 0, 130, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o54) - EVT_CALL(MakeItemEntity, MV_Socket2_ItemID, -35, 30, -50, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(MV_Socket2_ItemEntityID, LVar0) - EVT_END_IF - EVT_IF_NE(MV_Socket3_ItemID, -1) - EVT_CALL(TranslateModel, MODEL_m3_kabe, 0, 130, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o53) - EVT_CALL(MakeItemEntity, MV_Socket3_ItemID, 265, 30, -50, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(MV_Socket3_ItemEntityID, LVar0) - EVT_END_IF - EVT_CALL(N(CreateConsumableItemList)) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_Interact_ItemSockets)), TRIGGER_WALL_PRESS_A, COLLIDER_hako, LVar0, 0, 1) - EVT_RETURN - EVT_END + Call(ParentColliderToModel, COLLIDER_o55, MODEL_m1_kabe) + Call(ParentColliderToModel, COLLIDER_o54, MODEL_m2_kabe) + Call(ParentColliderToModel, COLLIDER_o53, MODEL_m3_kabe) + IfEq(GF_SAM09_Visited, FALSE) + Set(GF_SAM09_Visited, TRUE) + Set(MV_Socket1_ItemID, ITEM_SHOOTING_STAR) + Set(MV_Socket2_ItemID, ITEM_SNOWMAN_DOLL) + Set(MV_Socket3_ItemID, ITEM_THUNDER_RAGE) + Call(N(SerializeItemIDs)) + EndIf + Call(N(DeserializeItemIDs)) + IfNe(MV_Socket1_ItemID, -1) + Call(TranslateModel, MODEL_m1_kabe, 0, 130, 0) + Call(UpdateColliderTransform, COLLIDER_o55) + Call(MakeItemEntity, MV_Socket1_ItemID, -385, 30, -50, ITEM_SPAWN_MODE_DECORATION, 0) + Set(MV_Socket1_ItemEntityID, LVar0) + EndIf + IfNe(MV_Socket2_ItemID, -1) + Call(TranslateModel, MODEL_m2_kabe, 0, 130, 0) + Call(UpdateColliderTransform, COLLIDER_o54) + Call(MakeItemEntity, MV_Socket2_ItemID, -35, 30, -50, ITEM_SPAWN_MODE_DECORATION, 0) + Set(MV_Socket2_ItemEntityID, LVar0) + EndIf + IfNe(MV_Socket3_ItemID, -1) + Call(TranslateModel, MODEL_m3_kabe, 0, 130, 0) + Call(UpdateColliderTransform, COLLIDER_o53) + Call(MakeItemEntity, MV_Socket3_ItemID, 265, 30, -50, ITEM_SPAWN_MODE_DECORATION, 0) + Set(MV_Socket3_ItemEntityID, LVar0) + EndIf + Call(N(CreateConsumableItemList)) + BindPadlock(Ref(N(EVS_Interact_ItemSockets)), TRIGGER_WALL_PRESS_A, COLLIDER_hako, LVar0, 0, 1) + Return + End }; diff --git a/src/world/area_sam/sam_10/sam_10_1_music.c b/src/world/area_sam/sam_10/sam_10_1_music.c index abc20aade2e..ecd7c27681a 100644 --- a/src/world/area_sam/sam_10/sam_10_1_music.c +++ b/src/world/area_sam/sam_10/sam_10_1_music.c @@ -1,7 +1,7 @@ #include "sam_10.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_SHIVER_MOUNTAIN, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_SHIVER_MOUNTAIN, 0, 8) + Return + End }; diff --git a/src/world/area_sam/sam_10/sam_10_2_main.c b/src/world/area_sam/sam_10/sam_10_2_main.c index 8dfa9f91f63..9e06c37c6b1 100644 --- a/src/world/area_sam/sam_10/sam_10_2_main.c +++ b/src/world/area_sam/sam_10/sam_10_2_main.c @@ -7,40 +7,40 @@ EvtScript N(EVS_ExitWalk_sam_12_0) = EVT_EXIT_WALK(60, sam_10_ENTRY_2, "sam_12", MAP_RODATA_PAD(1, exits); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sam_09_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_pra_01_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sam_12_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilia, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sam_09_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_pra_01_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sam_12_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilia, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_IF_LT(LVar0, sam_10_ENTRY_3) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_ELSE - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(GetEntryID, LVar0) + IfLt(LVar0, sam_10_ENTRY_3) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Else + EndIf + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHIVER_MOUNTAIN) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_EXEC_WAIT(N(EVS_SetupStairs)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_SHIVER_MOUNTAIN) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupMusic)) + ExecWait(N(EVS_SetupStairs)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_sam/sam_10/sam_10_3_entity.c b/src/world/area_sam/sam_10/sam_10_3_entity.c index a43f15853f5..41d0ab8cadd 100644 --- a/src/world/area_sam/sam_10/sam_10_3_entity.c +++ b/src/world/area_sam/sam_10/sam_10_3_entity.c @@ -9,14 +9,14 @@ s32** N(varStash) = NULL; EvtScript N(EVS_Chest_ShowGotItem) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_FULL) - EVT_WAIT(40) - EVT_CALL(ShowGotItem, LVar0, FALSE, 0) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_FULL) + Wait(40) + Call(ShowGotItem, LVar0, FALSE, 0) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + Return + End }; API_CALLABLE(N(SetStarStoneItemScale)) { @@ -25,19 +25,19 @@ API_CALLABLE(N(SetStarStoneItemScale)) { } EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_RedBlock), 775, 540, -50, 0, ITEM_MEGA_JUMP, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SAM10_BadgeBlock_MegaJump) - EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, -160, 300, -110, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SAM10_Item_StarPiece) - EVT_IF_LT(GB_StoryProgress, STORY_CH7_RAISED_FROZEN_STAIRS) - EVT_CALL(DropResizableItemEntity, ITEM_STAR_STONE, NPC_DISPOSE_LOCATION, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_CALL(N(SetStarStoneItemScale)) - EVT_SET(MV_StarStoneItemID, LVar0) - EVT_ELSE - EVT_CALL(DropResizableItemEntity, ITEM_STAR_STONE, -117, 179, -55, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_CALL(N(SetStarStoneItemScale)) - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), -250, 870, -210, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), 770, 1200, -225, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_RedBlock), 775, 540, -50, 0, ITEM_MEGA_JUMP, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SAM10_BadgeBlock_MegaJump) + Call(MakeItemEntity, ITEM_STAR_PIECE, -160, 300, -110, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SAM10_Item_StarPiece) + IfLt(GB_StoryProgress, STORY_CH7_RAISED_FROZEN_STAIRS) + Call(DropResizableItemEntity, ITEM_STAR_STONE, NPC_DISPOSE_LOCATION, ITEM_SPAWN_MODE_DECORATION, 0) + Call(N(SetStarStoneItemScale)) + Set(MV_StarStoneItemID, LVar0) + Else + Call(DropResizableItemEntity, ITEM_STAR_STONE, -117, 179, -55, ITEM_SPAWN_MODE_DECORATION, 0) + Call(N(SetStarStoneItemScale)) + EndIf + Call(MakeEntity, Ref(Entity_SavePoint), -250, 870, -210, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HeartBlock), 770, 1200, -225, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_sam/sam_10/sam_10_4_stairs.c b/src/world/area_sam/sam_10/sam_10_4_stairs.c index bc3e1d7333c..83994eb358e 100644 --- a/src/world/area_sam/sam_10/sam_10_4_stairs.c +++ b/src/world/area_sam/sam_10/sam_10_4_stairs.c @@ -43,166 +43,166 @@ API_CALLABLE(N(GetCamPointsNearPlayer)) { } EvtScript N(EVS_ItemPrompt_StarStoneSocket) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(FindKeyItem, ITEM_STAR_STONE, LVar0) - EVT_IF_NE(LVar0, -1) - EVT_CALL(ShowKeyChoicePopup) - EVT_CALL(CloseChoicePopup) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_CASE_EQ(-1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_END_SWITCH - EVT_ELSE - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_SAM10_PlaceItemTip, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetItemPos, MV_StarStoneItemID, -117, 179, -32) - EVT_CALL(PlaySoundAt, SOUND_SAM_PLACE_STAR_STONE, SOUND_SPACE_DEFAULT, -117, 179, -32) - EVT_WAIT(30) - EVT_THREAD - EVT_CALL(MakeLerp, -32, -55, 100 * DT, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(SetItemPos, MV_StarStoneItemID, -117, 179, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(PlaySoundAtCollider, COLLIDER_o61, SOUND_SAM_STAIRS_ACTIVATE, 0) - EVT_CALL(MakeLerp, 0, -23, 100 * DT, EASING_COS_IN_OUT) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g51, 0, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_CALL(UpdateColliderTransform, COLLIDER_o61) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o89, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(600.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(2.0), EVT_FLOAT(5.0)) - EVT_CALL(N(GetCamPointsNearPlayer)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, LVar0, LVar1) - EVT_CALL(SetCamPosB, CAM_DEFAULT, LVar2, LVar3) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(30) - EVT_CALL(PlaySound, SOUND_SAM_STAIRS_LOUD_THUD) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(3.0)) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 3, -20, -20, -66, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 3, 20, -20, -66, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 3, 60, -20, -66, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 3, 100, -20, -66, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 3, 140, -20, -66, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 3, 180, -20, -66, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 3, 220, -20, -66, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 3, 240, -20, -66, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 3, 280, -20, -66, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 3, -20, -20, -166, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 3, 20, -20, -166, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 3, 60, -20, -166, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 3, 100, -20, -166, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 3, 140, -20, -166, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 3, 180, -20, -166, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 3, 220, -20, -166, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 3, 240, -20, -166, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 3, 280, -20, -166, 0) - EVT_WAIT(20) - EVT_CALL(SetGroupVisibility, MODEL_move1, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_move2, MODEL_GROUP_VISIBLE) - EVT_CALL(SetGroupVisibility, MODEL_move3, MODEL_GROUP_HIDDEN) - EVT_CALL(PlaySound, SOUND_LOOP_SAM_STAIRS_RISE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 600, EVT_FLOAT(0.15)) - EVT_END_THREAD - EVT_SET(LVar2, 0) - EVT_USE_BUF(EVT_PTR(N(StaircaseStepsData))) - EVT_LOOP(30) - EVT_ADD(LVar2, 1) - EVT_BUF_READ2(LVar3, LVar4) - EVT_THREAD - EVT_SET(LVar5, LVar4) - EVT_DIV(LVar5, -2) - EVT_CALL(MakeLerp, LVar4, 0, LVar5, EASING_LINEAR) - EVT_LABEL(3) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, LVar3, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(3) - EVT_END_IF - EVT_IF_EQ(LVar2, 30) - EVT_CALL(PlaySound, SOUND_SAM_STAIRS_FINAL_THUD) - EVT_CALL(StopSound, SOUND_LOOP_SAM_STAIRS_RISE) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(2.0)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0)) - EVT_SET(LVarB, LVar0) - EVT_CALL(GetModelCenter, LVar3) - EVT_SET(LVarA, -20) - EVT_SUB(LVarA, LVarB) - EVT_ELSE - EVT_CALL(PlaySoundAt, SOUND_SAM_ICE_STEP_THUD, SOUND_SPACE_DEFAULT, LVar0, LVarA, LVar2) - EVT_MOD(LVar2, 3) - EVT_IF_EQ(LVar2, 0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_END_IF - EVT_END_THREAD - EVT_END_LOOP - EVT_WAIT(150) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 140, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_CALL(MakeLerp, 150, 1050, 200, EASING_LINEAR) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 150, 150, -70) - EVT_LABEL(100) - EVT_CALL(UpdateLerp) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 150, LVar0, -70) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(750.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(10.0), EVT_FLOAT(-14.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(100) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(480) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_m1_kabe, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_m2_kabe, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_m2_yuka, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_move2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetGroupVisibility, MODEL_move1, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_move2, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_move3, MODEL_GROUP_VISIBLE) - EVT_SET(GB_StoryProgress, STORY_CH7_RAISED_FROZEN_STAIRS) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(FindKeyItem, ITEM_STAR_STONE, LVar0) + IfNe(LVar0, -1) + Call(ShowKeyChoicePopup) + Call(CloseChoicePopup) + Switch(LVar0) + CaseEq(0) + Call(DisablePlayerInput, FALSE) + Return + CaseEq(-1) + Call(DisablePlayerInput, FALSE) + Return + CaseDefault + Call(RemoveKeyItemAt, LVar1) + EndSwitch + Else + Call(ShowMessageAtScreenPos, MSG_Menus_SAM10_PlaceItemTip, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + EndIf + Call(SetItemPos, MV_StarStoneItemID, -117, 179, -32) + Call(PlaySoundAt, SOUND_SAM_PLACE_STAR_STONE, SOUND_SPACE_DEFAULT, -117, 179, -32) + Wait(30) + Thread + Call(MakeLerp, -32, -55, 100 * DT, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(SetItemPos, MV_StarStoneItemID, -117, 179, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + EndThread + Call(PlaySoundAtCollider, COLLIDER_o61, SOUND_SAM_STAIRS_ACTIVATE, 0) + Call(MakeLerp, 0, -23, 100 * DT, EASING_COS_IN_OUT) + Label(2) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g51, 0, 0, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(2) + EndIf + Call(UpdateColliderTransform, COLLIDER_o61) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o89, COLLIDER_FLAGS_UPPER_MASK) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(600.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(2.0), Float(5.0)) + Call(N(GetCamPointsNearPlayer)) + Call(SetCamPosA, CAM_DEFAULT, LVar0, LVar1) + Call(SetCamPosB, CAM_DEFAULT, LVar2, LVar3) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(30) + Call(PlaySound, SOUND_SAM_STAIRS_LOUD_THUD) + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(3.0)) + PlayEffect(EFFECT_LANDING_DUST, 3, -20, -20, -66, 0) + PlayEffect(EFFECT_LANDING_DUST, 3, 20, -20, -66, 0) + PlayEffect(EFFECT_LANDING_DUST, 3, 60, -20, -66, 0) + PlayEffect(EFFECT_LANDING_DUST, 3, 100, -20, -66, 0) + PlayEffect(EFFECT_LANDING_DUST, 3, 140, -20, -66, 0) + PlayEffect(EFFECT_LANDING_DUST, 3, 180, -20, -66, 0) + PlayEffect(EFFECT_LANDING_DUST, 3, 220, -20, -66, 0) + PlayEffect(EFFECT_LANDING_DUST, 3, 240, -20, -66, 0) + PlayEffect(EFFECT_LANDING_DUST, 3, 280, -20, -66, 0) + PlayEffect(EFFECT_LANDING_DUST, 3, -20, -20, -166, 0) + PlayEffect(EFFECT_LANDING_DUST, 3, 20, -20, -166, 0) + PlayEffect(EFFECT_LANDING_DUST, 3, 60, -20, -166, 0) + PlayEffect(EFFECT_LANDING_DUST, 3, 100, -20, -166, 0) + PlayEffect(EFFECT_LANDING_DUST, 3, 140, -20, -166, 0) + PlayEffect(EFFECT_LANDING_DUST, 3, 180, -20, -166, 0) + PlayEffect(EFFECT_LANDING_DUST, 3, 220, -20, -166, 0) + PlayEffect(EFFECT_LANDING_DUST, 3, 240, -20, -166, 0) + PlayEffect(EFFECT_LANDING_DUST, 3, 280, -20, -166, 0) + Wait(20) + Call(SetGroupVisibility, MODEL_move1, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_move2, MODEL_GROUP_VISIBLE) + Call(SetGroupVisibility, MODEL_move3, MODEL_GROUP_HIDDEN) + Call(PlaySound, SOUND_LOOP_SAM_STAIRS_RISE) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 600, Float(0.15)) + EndThread + Set(LVar2, 0) + UseBuf(Ref(N(StaircaseStepsData))) + Loop(30) + Add(LVar2, 1) + BufRead2(LVar3, LVar4) + Thread + Set(LVar5, LVar4) + Div(LVar5, -2) + Call(MakeLerp, LVar4, 0, LVar5, EASING_LINEAR) + Label(3) + Call(UpdateLerp) + Call(TranslateGroup, LVar3, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(3) + EndIf + IfEq(LVar2, 30) + Call(PlaySound, SOUND_SAM_STAIRS_FINAL_THUD) + Call(StopSound, SOUND_LOOP_SAM_STAIRS_RISE) + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(3.0)) + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(2.0)) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.0)) + Set(LVarB, LVar0) + Call(GetModelCenter, LVar3) + Set(LVarA, -20) + Sub(LVarA, LVarB) + Else + Call(PlaySoundAt, SOUND_SAM_ICE_STEP_THUD, SOUND_SPACE_DEFAULT, LVar0, LVarA, LVar2) + Mod(LVar2, 3) + IfEq(LVar2, 0) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.0)) + EndIf + EndIf + EndThread + EndLoop + Wait(150) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, 140, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Call(MakeLerp, 150, 1050, 200, EASING_LINEAR) + Call(UseSettingsFrom, CAM_DEFAULT, 150, 150, -70) + Label(100) + Call(UpdateLerp) + Call(SetPanTarget, CAM_DEFAULT, 150, LVar0, -70) + Call(SetCamDistance, CAM_DEFAULT, Float(750.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(10.0), Float(-14.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(1) + IfEq(LVar1, 1) + Goto(100) + EndIf + EndThread + Wait(480) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_m1_kabe, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_m2_kabe, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_m2_yuka, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_move2, COLLIDER_FLAGS_UPPER_MASK) + Call(SetGroupVisibility, MODEL_move1, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_move2, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_move3, MODEL_GROUP_VISIBLE) + Set(GB_StoryProgress, STORY_CH7_RAISED_FROZEN_STAIRS) + Call(DisablePlayerInput, FALSE) + Unbind + Return + End }; BombTrigger N(BombPos_Wall) = { @@ -211,21 +211,21 @@ BombTrigger N(BombPos_Wall) = { }; EvtScript N(EVS_BlastWall) = { - EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 2, 135, 11, 1, 10, 30) - EVT_CALL(EnableModel, MODEL_a_oku, TRUE) - EVT_LOOP(10) - EVT_CALL(EnableModel, MODEL_a_kabe, TRUE) - EVT_CALL(EnableModel, MODEL_a_hibi, TRUE) - EVT_WAIT(1) - EVT_CALL(EnableModel, MODEL_a_kabe, FALSE) - EVT_CALL(EnableModel, MODEL_a_hibi, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tta, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GF_SAM10_BombedWall, TRUE) - EVT_UNBIND - EVT_RETURN - EVT_END + PlayEffect(EFFECT_BOMBETTE_BREAKING, 2, 135, 11, 1, 10, 30) + Call(EnableModel, MODEL_a_oku, TRUE) + Loop(10) + Call(EnableModel, MODEL_a_kabe, TRUE) + Call(EnableModel, MODEL_a_hibi, TRUE) + Wait(1) + Call(EnableModel, MODEL_a_kabe, FALSE) + Call(EnableModel, MODEL_a_hibi, FALSE) + Wait(1) + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tta, COLLIDER_FLAGS_UPPER_MASK) + Set(GF_SAM10_BombedWall, TRUE) + Unbind + Return + End }; s32 N(StarStoneList)[] = { @@ -234,46 +234,46 @@ s32 N(StarStoneList)[] = { }; EvtScript N(EVS_SetupStairs) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_yuka, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o79, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o80, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o81, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o86, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deiliw, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilie, SURFACE_TYPE_SNOW) - EVT_CALL(ParentColliderToModel, COLLIDER_o61, MODEL_kouri) - EVT_IF_LT(GB_StoryProgress, STORY_CH7_RAISED_FROZEN_STAIRS) - EVT_CALL(SetGroupVisibility, MODEL_move2, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_move3, MODEL_GROUP_HIDDEN) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_m2_kabe, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_m2_yuka, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_move2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_m1_kabe, SURFACE_TYPE_SNOW) - EVT_USE_BUF(EVT_PTR(N(StaircaseStepsData))) - EVT_LOOP(30) - EVT_BUF_READ2(LVarA, LVarB) - EVT_CALL(TranslateGroup, LVarA, 0, LVarB, 0) - EVT_END_LOOP - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_ItemPrompt_StarStoneSocket)), TRIGGER_WALL_PRESS_A, COLLIDER_o61, EVT_PTR(N(StarStoneList)), 0, 1) - EVT_ELSE - EVT_CALL(TranslateGroup, MODEL_g51, 0, 0, -23) - EVT_CALL(UpdateColliderTransform, COLLIDER_o61) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o89, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetGroupVisibility, MODEL_move1, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_move2, MODEL_GROUP_HIDDEN) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_m1_kabe, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH7_GOT_STAR_STONE) - EVT_SET(GF_SAM10_BombedWall, TRUE) - EVT_END_IF - EVT_IF_EQ(GF_SAM10_BombedWall, FALSE) - EVT_CALL(EnableModel, MODEL_a_oku, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BlastWall)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Wall)), 1, 0) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_a_kabe, FALSE) - EVT_CALL(EnableModel, MODEL_a_hibi, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tta, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_yuka, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o79, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o80, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o81, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o86, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deiliw, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilie, SURFACE_TYPE_SNOW) + Call(ParentColliderToModel, COLLIDER_o61, MODEL_kouri) + IfLt(GB_StoryProgress, STORY_CH7_RAISED_FROZEN_STAIRS) + Call(SetGroupVisibility, MODEL_move2, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_move3, MODEL_GROUP_HIDDEN) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_m2_kabe, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_m2_yuka, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_move2, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_m1_kabe, SURFACE_TYPE_SNOW) + UseBuf(Ref(N(StaircaseStepsData))) + Loop(30) + BufRead2(LVarA, LVarB) + Call(TranslateGroup, LVarA, 0, LVarB, 0) + EndLoop + BindPadlock(Ref(N(EVS_ItemPrompt_StarStoneSocket)), TRIGGER_WALL_PRESS_A, COLLIDER_o61, Ref(N(StarStoneList)), 0, 1) + Else + Call(TranslateGroup, MODEL_g51, 0, 0, -23) + Call(UpdateColliderTransform, COLLIDER_o61) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o89, COLLIDER_FLAGS_UPPER_MASK) + Call(SetGroupVisibility, MODEL_move1, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_move2, MODEL_GROUP_HIDDEN) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_m1_kabe, COLLIDER_FLAGS_UPPER_MASK) + EndIf + IfGe(GB_StoryProgress, STORY_CH7_GOT_STAR_STONE) + Set(GF_SAM10_BombedWall, TRUE) + EndIf + IfEq(GF_SAM10_BombedWall, FALSE) + Call(EnableModel, MODEL_a_oku, FALSE) + BindTrigger(Ref(N(EVS_BlastWall)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Wall)), 1, 0) + Else + Call(EnableModel, MODEL_a_kabe, FALSE) + Call(EnableModel, MODEL_a_hibi, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tta, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Return + End }; diff --git a/src/world/area_sam/sam_11/sam_11_1_music.c b/src/world/area_sam/sam_11/sam_11_1_music.c index f3efef28fb3..bd856d633e8 100644 --- a/src/world/area_sam/sam_11/sam_11_1_music.c +++ b/src/world/area_sam/sam_11/sam_11_1_music.c @@ -1,14 +1,14 @@ #include "sam_11.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_CALL(SetMusicTrack, 0, SONG_SHIVER_CITY, 0, 8) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(SetMusicTrack, 0, SONG_PENGUIN_MYSTERY, 0, 8) - EVT_CASE_GE(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(SetMusicTrack, 0, SONG_SHIVER_CITY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + Call(SetMusicTrack, 0, SONG_SHIVER_CITY, 0, 8) + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(SetMusicTrack, 0, SONG_PENGUIN_MYSTERY, 0, 8) + CaseGe(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(SetMusicTrack, 0, SONG_SHIVER_CITY, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/area_sam/sam_11/sam_11_2_main.c b/src/world/area_sam/sam_11/sam_11_2_main.c index 53df28444fd..16e9b71cc5f 100644 --- a/src/world/area_sam/sam_11/sam_11_2_main.c +++ b/src/world/area_sam/sam_11/sam_11_2_main.c @@ -1,12 +1,12 @@ #include "sam_11.h" EvtScript N(EVS_LoadPondAnimation) = { - EVT_CALL(LoadAnimatedModel, 0, EVT_PTR(N(ShatterPondSkeleton))) - EVT_CALL(PlayModelAnimation, 0, EVT_PTR(N(AS_ShatterPond))) - EVT_CALL(SetAnimatedModelRootPosition, 0, 0, 0, 0) - EVT_CALL(SetAnimatedModelRenderMode, 0, RENDER_MODE_SURFACE_OPA) - EVT_RETURN - EVT_END + Call(LoadAnimatedModel, 0, Ref(N(ShatterPondSkeleton))) + Call(PlayModelAnimation, 0, Ref(N(AS_ShatterPond))) + Call(SetAnimatedModelRootPosition, 0, 0, 0, 0) + Call(SetAnimatedModelRenderMode, 0, RENDER_MODE_SURFACE_OPA) + Return + End }; #include "common/foliage.inc.c" @@ -51,94 +51,94 @@ BombTrigger N(BombPos_Tree3) = { }; EvtScript N(EVS_ExitWalk_sam_02_1) = { - EVT_IF_EQ(MV_ThrownOut, 1) - EVT_RETURN - EVT_END_IF - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(UseExitHeading, 60, sam_11_ENTRY_0) - EVT_EXEC(ExitWalk) - EVT_CALL(GotoMap, EVT_PTR("sam_02"), sam_02_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + IfEq(MV_ThrownOut, 1) + Return + EndIf + SetGroup(EVT_GROUP_1B) + Call(UseExitHeading, 60, sam_11_ENTRY_0) + Exec(ExitWalk) + Call(GotoMap, Ref("sam_02"), sam_02_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_sam_03_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_IF_LT(GB_StoryProgress, STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_SAM11_LeftTown, TRUE) - EVT_CALL(UseExitHeading, 60, sam_11_ENTRY_1) - EVT_EXEC(ExitWalk) - EVT_CALL(GotoMap, EVT_PTR("sam_03"), sam_03_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + IfLt(GB_StoryProgress, STORY_CH7_MAYOR_MURDER_SOLVED) + Return + EndIf + Set(GF_SAM11_LeftTown, TRUE) + Call(UseExitHeading, 60, sam_11_ENTRY_1) + Exec(ExitWalk) + Call(GotoMap, Ref("sam_03"), sam_03_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sam_02_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sam_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sam_02_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sam_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; #include "../common/ManageSnowfall.inc.c" EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHIVER_CITY) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, sam_11_ENTRY_2) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(EpilogueNPCs))) - EVT_CALL(FadeInMusic, 0, SONG_SHIVER_CITY, 0, 3000, 0, 127) - EVT_RETURN - EVT_LABEL(10) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(BeforeNPCs))) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(MysteryNPCs))) - EVT_CASE_GE(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(AfterNPCs))) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o621, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(SetRenderMode, MODEL_o583, RENDER_MODE_SURFACE_XLU_LAYER2) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_ManageSnowfall)) - EVT_EXEC_WAIT(N(EVS_SetupRooms)) - EVT_EXEC_WAIT(N(EVS_SetupPond)) - EVT_EXEC_WAIT(N(EVS_SetupStaircase)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o595, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o653, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o664, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o677, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o678, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_tumori, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_g_yuki2, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_suimen, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilie, SURFACE_TYPE_SNOW) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deiliw, SURFACE_TYPE_SNOW) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_miki4, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_miki5, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree3)), 1, 0) - EVT_CALL(InitAnimatedModels) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, sam_11_ENTRY_2) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_END_IF - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_SHIVER_CITY) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(GetEntryID, LVar0) + IfNe(LVar0, sam_11_ENTRY_2) + Goto(10) + EndIf + Call(MakeNpcs, FALSE, Ref(N(EpilogueNPCs))) + Call(FadeInMusic, 0, SONG_SHIVER_CITY, 0, 3000, 0, 127) + Return + Label(10) + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + Call(MakeNpcs, FALSE, Ref(N(BeforeNPCs))) + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(MakeNpcs, FALSE, Ref(N(MysteryNPCs))) + CaseGe(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(MakeNpcs, FALSE, Ref(N(AfterNPCs))) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o621, COLLIDER_FLAGS_UPPER_MASK) + EndSwitch + ExecWait(N(EVS_MakeEntities)) + Call(SetRenderMode, MODEL_o583, RENDER_MODE_SURFACE_XLU_LAYER2) + ExecWait(N(EVS_SetupMusic)) + Exec(N(EVS_ManageSnowfall)) + ExecWait(N(EVS_SetupRooms)) + ExecWait(N(EVS_SetupPond)) + ExecWait(N(EVS_SetupStaircase)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o595, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o653, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o664, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o677, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o678, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_tumori, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_g_yuki2, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_suimen, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilie, SURFACE_TYPE_SNOW) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deiliw, SURFACE_TYPE_SNOW) + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_miki4, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree3))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_miki5, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree3)), 1, 0) + Call(InitAnimatedModels) + Call(GetEntryID, LVar0) + IfNe(LVar0, sam_11_ENTRY_2) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + EndIf + Return + End }; diff --git a/src/world/area_sam/sam_11/sam_11_3_rooms.c b/src/world/area_sam/sam_11/sam_11_3_rooms.c index ca97eccc977..115f9556049 100644 --- a/src/world/area_sam/sam_11/sam_11_3_rooms.c +++ b/src/world/area_sam/sam_11/sam_11_3_rooms.c @@ -1,109 +1,109 @@ #include "sam_11.h" EvtScript N(EVS_SetDoorRot_LeftHouse) = { - EVT_CALL(RotateModel, MODEL_o541, LVar0, 0, -1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o541, LVar0, 0, -1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_LeftHouse) = { - EVT_CALL(RotateGroup, MODEL_g_ue, LVar0, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_g_sita, LVar0, 1, 0, 0) - EVT_IF_GT(LVar0, 89) - EVT_CALL(SetGroupVisibility, MODEL_g_ue, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_g_sita, MODEL_GROUP_HIDDEN) - EVT_END_IF - EVT_IF_LT(LVar0, 89) - EVT_CALL(SetGroupVisibility, MODEL_g_ue, MODEL_GROUP_VISIBLE) - EVT_CALL(SetGroupVisibility, MODEL_g_sita, MODEL_GROUP_VISIBLE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(RotateGroup, MODEL_g_ue, LVar0, 1, 0, 0) + Call(RotateGroup, MODEL_g_sita, LVar0, 1, 0, 0) + IfGt(LVar0, 89) + Call(SetGroupVisibility, MODEL_g_ue, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_g_sita, MODEL_GROUP_HIDDEN) + EndIf + IfLt(LVar0, 89) + Call(SetGroupVisibility, MODEL_g_ue, MODEL_GROUP_VISIBLE) + Call(SetGroupVisibility, MODEL_g_sita, MODEL_GROUP_VISIBLE) + EndIf + Return + End }; EvtScript N(EVS_DropDoor_LeftHouse) = { - EVT_CALL(RotateModel, MODEL_o541, LVar0, 1, 0, 0) - EVT_IF_GT(LVar0, 89) - EVT_END_IF - EVT_IF_LT(LVar0, 89) - EVT_END_IF - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o541, LVar0, 1, 0, 0) + IfGt(LVar0, 89) + EndIf + IfLt(LVar0, 89) + EndIf + Return + End }; EvtScript N(EVS_RoomListener_LeftHouse) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_UPDATE_ENTER_BEGIN) - EVT_SET(AF_SAM_Snowing, FALSE) - EVT_CALL(SetGroupVisibility, MODEL_g_naiso, MODEL_GROUP_VISIBLE) - EVT_IF_LT(GB_StoryProgress, STORY_CH7_SPOKE_WITH_HERRINGWAY) - EVT_ELSE - EVT_CALL(EnableModel, MODEL_ana, FALSE) - EVT_END_IF - EVT_CASE_EQ(ROOM_UPDATE_EXIT_BEGIN) - EVT_IF_EQ(GB_StoryProgress, STORY_CH7_SPOKE_WITH_HERRINGWAY) - EVT_IF_EQ(GF_SAM11_LeftHerringwaysHouse, FALSE) - EVT_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(MakeLerp, 0, 255, 20, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcImgFXParams, NPC_Herringway, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Herringway, ANIM_Herringway_Walk) - EVT_CALL(PlayerFaceNpc, NPC_Herringway, FALSE) - EVT_CALL(NpcMoveTo, NPC_Herringway, -500, 0, 50 * DT) - EVT_CALL(SetNpcFlagBits, NPC_Herringway, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcPos, NPC_Herringway, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_END_IF - EVT_END_IF - EVT_CASE_EQ(ROOM_UPDATE_EXIT_END) - EVT_SET(AF_SAM_Snowing, TRUE) - EVT_CALL(SetGroupVisibility, MODEL_g_naiso, MODEL_GROUP_HIDDEN) - EVT_CALL(EnableModel, MODEL_gn_dan1, TRUE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH7_SPOKE_WITH_HERRINGWAY) - EVT_IF_EQ(GF_SAM11_LeftHerringwaysHouse, FALSE) - EVT_THREAD - EVT_END_THREAD - EVT_SET(GF_SAM11_LeftHerringwaysHouse, TRUE) - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(ROOM_UPDATE_ENTER_BEGIN) + Set(AF_SAM_Snowing, FALSE) + Call(SetGroupVisibility, MODEL_g_naiso, MODEL_GROUP_VISIBLE) + IfLt(GB_StoryProgress, STORY_CH7_SPOKE_WITH_HERRINGWAY) + Else + Call(EnableModel, MODEL_ana, FALSE) + EndIf + CaseEq(ROOM_UPDATE_EXIT_BEGIN) + IfEq(GB_StoryProgress, STORY_CH7_SPOKE_WITH_HERRINGWAY) + IfEq(GF_SAM11_LeftHerringwaysHouse, FALSE) + Thread + Wait(30 * DT) + Call(MakeLerp, 0, 255, 20, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcImgFXParams, NPC_Herringway, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(10 * DT) + Call(SetNpcAnimation, NPC_Herringway, ANIM_Herringway_Walk) + Call(PlayerFaceNpc, NPC_Herringway, FALSE) + Call(NpcMoveTo, NPC_Herringway, -500, 0, 50 * DT) + Call(SetNpcFlagBits, NPC_Herringway, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcPos, NPC_Herringway, NPC_DISPOSE_LOCATION) + EndThread + EndIf + EndIf + CaseEq(ROOM_UPDATE_EXIT_END) + Set(AF_SAM_Snowing, TRUE) + Call(SetGroupVisibility, MODEL_g_naiso, MODEL_GROUP_HIDDEN) + Call(EnableModel, MODEL_gn_dan1, TRUE) + IfEq(GB_StoryProgress, STORY_CH7_SPOKE_WITH_HERRINGWAY) + IfEq(GF_SAM11_LeftHerringwaysHouse, FALSE) + Thread + EndThread + Set(GF_SAM11_LeftHerringwaysHouse, TRUE) + EndIf + EndIf + EndSwitch + Return + End }; EvtScript N(EVS_SetDoorRot_RightHouse) = { - EVT_CALL(RotateModel, MODEL_o540, LVar0, 0, -1, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o540, LVar0, 0, -1, 0) + Return + End }; EvtScript N(EVS_SetWallRot_RightHouse) = { - EVT_CALL(RotateGroup, MODEL_s_ue, LVar0, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_s_sita, LVar0, 1, 0, 0) - EVT_IF_GT(LVar0, 89) - EVT_CALL(SetGroupVisibility, MODEL_s_ue, MODEL_GROUP_HIDDEN) - EVT_CALL(SetGroupVisibility, MODEL_s_sita, MODEL_GROUP_HIDDEN) - EVT_END_IF - EVT_IF_LT(LVar0, 89) - EVT_CALL(SetGroupVisibility, MODEL_s_ue, MODEL_GROUP_VISIBLE) - EVT_CALL(SetGroupVisibility, MODEL_s_sita, MODEL_GROUP_VISIBLE) - EVT_END_IF - EVT_RETURN - EVT_END + Call(RotateGroup, MODEL_s_ue, LVar0, 1, 0, 0) + Call(RotateGroup, MODEL_s_sita, LVar0, 1, 0, 0) + IfGt(LVar0, 89) + Call(SetGroupVisibility, MODEL_s_ue, MODEL_GROUP_HIDDEN) + Call(SetGroupVisibility, MODEL_s_sita, MODEL_GROUP_HIDDEN) + EndIf + IfLt(LVar0, 89) + Call(SetGroupVisibility, MODEL_s_ue, MODEL_GROUP_VISIBLE) + Call(SetGroupVisibility, MODEL_s_sita, MODEL_GROUP_VISIBLE) + EndIf + Return + End }; EvtScript N(EVS_DropDoor_RightHouse) = { - EVT_CALL(RotateModel, MODEL_o540, LVar0, 1, 0, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o540, LVar0, 1, 0, 0) + Return + End }; @@ -116,44 +116,44 @@ s32 N(KeyList)[] = { #include "world/common/todo/GetEntityPosition.inc.c" EvtScript N(EVS_UnlockPrompt_LeftHouse) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SUSPEND_GROUP(EVT_GROUP_01) - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_CALL(CloseChoicePopup) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_RETURN - EVT_END_IF - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(CloseChoicePopup) - EVT_SET(GF_SAM11_UnlockedDoor, TRUE) - EVT_CALL(N(GetEntityPosition), MV_PadlockEntityID, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_SET(LVar0, MV_PadlockEntityID) - EVT_CALL(N(RemovePadlock)) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_UNBIND - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + SuspendGroup(EVT_GROUP_01) + Call(ShowKeyChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) + Call(CloseChoicePopup) + ResumeGroup(EVT_GROUP_01) + Return + EndIf + IfEq(LVar0, -1) + Call(CloseChoicePopup) + ResumeGroup(EVT_GROUP_01) + Return + EndIf + Call(RemoveKeyItemAt, LVar1) + Call(CloseChoicePopup) + Set(GF_SAM11_UnlockedDoor, TRUE) + Call(N(GetEntityPosition), MV_PadlockEntityID, LVar0, LVar1, LVar2) + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Set(LVar0, MV_PadlockEntityID) + Call(N(RemovePadlock)) + ResumeGroup(EVT_GROUP_01) + Unbind + Return + End }; EvtScript N(EVS_RoomListener_RightHouse) = { - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SET(AF_SAM_Snowing, FALSE) - EVT_CALL(SetGroupVisibility, MODEL_s_naiso, MODEL_GROUP_VISIBLE) - EVT_CASE_EQ(3) - EVT_SET(AF_SAM_Snowing, TRUE) - EVT_CALL(SetGroupVisibility, MODEL_s_naiso, MODEL_GROUP_HIDDEN) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(LVar0) + CaseEq(0) + Set(AF_SAM_Snowing, FALSE) + Call(SetGroupVisibility, MODEL_s_naiso, MODEL_GROUP_VISIBLE) + CaseEq(3) + Set(AF_SAM_Snowing, TRUE) + Call(SetGroupVisibility, MODEL_s_naiso, MODEL_GROUP_HIDDEN) + EndSwitch + Return + End }; s32 N(InteriorNPCs_LeftHouse)[] = { @@ -169,80 +169,80 @@ s32 N(InteriorNPCs_RightHouse)[] = { EvtScript N(EVS_SetupLockedHouse) = { // lower right house - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_LEFT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_RightHouse)), - EVT_PTR(N(EVS_SetWallRot_RightHouse)), - EVT_PTR(N(EVS_DropDoor_RightHouse)), - EVT_PTR(N(EVS_RoomListener_RightHouse)), + Ref(N(EVS_SetDoorRot_RightHouse)), + Ref(N(EVS_SetWallRot_RightHouse)), + Ref(N(EVS_DropDoor_RightHouse)), + Ref(N(EVS_RoomListener_RightHouse)), COLLIDER_o540, COLLIDER_o591, MODEL_sou, - EVT_PTR(N(InteriorNPCs_RightHouse))) - EVT_RETURN - EVT_END + Ref(N(InteriorNPCs_RightHouse))) + Return + End }; EvtScript N(EVS_SetupRooms) = { - EVT_CALL(SetGroupVisibility, MODEL_g_naiso, MODEL_GROUP_HIDDEN) - EVT_CALL(EnableModel, MODEL_gn_dan1, TRUE) + Call(SetGroupVisibility, MODEL_g_naiso, MODEL_GROUP_HIDDEN) + Call(EnableModel, MODEL_gn_dan1, TRUE) // lower left house - EVT_CALL(CreateMapRoom, + Call(CreateMapRoom, PACK_ROOM_FLAGS(VIS_GROUP_0, ROOM_DOOR_LEFT_HINGE_OPENS_OUT), - EVT_PTR(N(EVS_SetDoorRot_LeftHouse)), - EVT_PTR(N(EVS_SetWallRot_LeftHouse)), - EVT_PTR(N(EVS_DropDoor_LeftHouse)), - EVT_PTR(N(EVS_RoomListener_LeftHouse)), + Ref(N(EVS_SetDoorRot_LeftHouse)), + Ref(N(EVS_SetWallRot_LeftHouse)), + Ref(N(EVS_DropDoor_LeftHouse)), + Ref(N(EVS_RoomListener_LeftHouse)), COLLIDER_o541, COLLIDER_o590, MODEL_gon, - EVT_PTR(N(InteriorNPCs_LeftHouse))) - EVT_CALL(SetGroupVisibility, MODEL_s_naiso, MODEL_GROUP_HIDDEN) - EVT_IF_EQ(GF_SAM11_UnlockedDoor, TRUE) - EVT_EXEC_WAIT(N(EVS_SetupLockedHouse)) - EVT_ELSE - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_UnlockPrompt_LeftHouse)), TRIGGER_WALL_PRESS_A, - EVT_ENTITY_INDEX(0), EVT_PTR(N(KeyList)), 0, 1) - EVT_END_IF - EVT_RETURN - EVT_END + Ref(N(InteriorNPCs_LeftHouse))) + Call(SetGroupVisibility, MODEL_s_naiso, MODEL_GROUP_HIDDEN) + IfEq(GF_SAM11_UnlockedDoor, TRUE) + ExecWait(N(EVS_SetupLockedHouse)) + Else + BindPadlock(Ref(N(EVS_UnlockPrompt_LeftHouse)), TRIGGER_WALL_PRESS_A, + EVT_ENTITY_INDEX(0), Ref(N(KeyList)), 0, 1) + EndIf + Return + End }; EvtScript N(EVS_HideRightHouse) = { - EVT_SET(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_DropDoor_RightHouse)) - EVT_SET(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_SetWallRot_RightHouse)) - EVT_SET(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_SetDoorRot_RightHouse)) - EVT_SET(LVar0, ROOM_UPDATE_EXIT_END) - EVT_EXEC_WAIT(N(EVS_RoomListener_RightHouse)) - EVT_RETURN - EVT_END + Set(LVar0, 0) + ExecWait(N(EVS_DropDoor_RightHouse)) + Set(LVar0, 0) + ExecWait(N(EVS_SetWallRot_RightHouse)) + Set(LVar0, 0) + ExecWait(N(EVS_SetDoorRot_RightHouse)) + Set(LVar0, ROOM_UPDATE_EXIT_END) + ExecWait(N(EVS_RoomListener_RightHouse)) + Return + End }; EvtScript N(EVS_RevealRightHouse) = { - EVT_SET(LVar0, ROOM_UPDATE_ENTER_BEGIN) - EVT_EXEC_WAIT(N(EVS_RoomListener_RightHouse)) - EVT_SET(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_SetDoorRot_RightHouse)) - EVT_SET(LVar0, 90) - EVT_EXEC_WAIT(N(EVS_SetWallRot_RightHouse)) - EVT_SET(LVar0, 90) - EVT_EXEC_WAIT(N(EVS_DropDoor_RightHouse)) - EVT_RETURN - EVT_END + Set(LVar0, ROOM_UPDATE_ENTER_BEGIN) + ExecWait(N(EVS_RoomListener_RightHouse)) + Set(LVar0, 0) + ExecWait(N(EVS_SetDoorRot_RightHouse)) + Set(LVar0, 90) + ExecWait(N(EVS_SetWallRot_RightHouse)) + Set(LVar0, 90) + ExecWait(N(EVS_DropDoor_RightHouse)) + Return + End }; EvtScript N(EVS_RevealLeftHouse) = { - EVT_SET(LVar0, ROOM_UPDATE_ENTER_BEGIN) - EVT_EXEC_WAIT(N(EVS_RoomListener_LeftHouse)) - EVT_SET(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_SetDoorRot_LeftHouse)) - EVT_SET(LVar0, 90) - EVT_EXEC_WAIT(N(EVS_SetWallRot_LeftHouse)) - EVT_SET(LVar0, 90) - EVT_EXEC_WAIT(N(EVS_DropDoor_LeftHouse)) - EVT_RETURN - EVT_END + Set(LVar0, ROOM_UPDATE_ENTER_BEGIN) + ExecWait(N(EVS_RoomListener_LeftHouse)) + Set(LVar0, 0) + ExecWait(N(EVS_SetDoorRot_LeftHouse)) + Set(LVar0, 90) + ExecWait(N(EVS_SetWallRot_LeftHouse)) + Set(LVar0, 90) + ExecWait(N(EVS_DropDoor_LeftHouse)) + Return + End }; diff --git a/src/world/area_sam/sam_11/sam_11_4_entity.c b/src/world/area_sam/sam_11/sam_11_4_entity.c index 9fe394678f7..c20bb9986a2 100644 --- a/src/world/area_sam/sam_11/sam_11_4_entity.c +++ b/src/world/area_sam/sam_11/sam_11_4_entity.c @@ -118,321 +118,321 @@ API_CALLABLE(N(MonitorCurrenFloor)) { } EvtScript N(EVS_OnExitRightHouse) = { - EVT_EXEC_WAIT(N(EVS_RevealRightHouse)) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, MODEL_sou) - EVT_SET(LVar2, 90) - EVT_CALL(N(UpdateHouseShowHide)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_RevealRightHouse)) + Set(LVar0, 0) + Set(LVar1, MODEL_sou) + Set(LVar2, 90) + Call(N(UpdateHouseShowHide)) + Return + End }; EvtScript N(EVS_OnEnterRightHouse) = { - EVT_SET(LVar0, 1) - EVT_SET(LVar1, MODEL_sou) - EVT_SET(LVar2, 32) - EVT_CALL(N(UpdateHouseShowHide)) - EVT_RETURN - EVT_END + Set(LVar0, 1) + Set(LVar1, MODEL_sou) + Set(LVar2, 32) + Call(N(UpdateHouseShowHide)) + Return + End }; EvtScript N(EVS_OnEnterLeftHouse) = { - EVT_SET(LVar0, 0) - EVT_SET(LVar1, MODEL_gon) - EVT_SET(LVar2, 32) - EVT_CALL(N(UpdateHouseShowHide)) - EVT_RETURN - EVT_END + Set(LVar0, 0) + Set(LVar1, MODEL_gon) + Set(LVar2, 32) + Call(N(UpdateHouseShowHide)) + Return + End }; EvtScript N(EVS_SetEntityHideMode_LeftHouse) = { - EVT_CALL(N(SetEntityHideMode1)) - EVT_WAIT(1) - EVT_CALL(N(SetEntityHideMode2)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Call(N(SetEntityHideMode1)) + Wait(1) + Call(N(SetEntityHideMode2)) + Wait(1) + Return + End }; EvtScript N(EVS_SetEntityHideMode_Outside) = { - EVT_CALL(N(SetEntityHideMode0)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Call(N(SetEntityHideMode0)) + Wait(1) + Return + End }; EvtScript N(EVS_TetherCamToPlayerCappedY) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GE(LVar1, LVar3) - EVT_SET(LVar1, LVar3) - EVT_END_IF - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGe(LVar1, LVar3) + Set(LVar1, LVar3) + EndIf + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_TouchFloor_RightRoof) = { - EVT_CALL(N(IsPlayerInputDisabled)) - EVT_IF_EQ(LVar0, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(InterruptUsePartner) - EVT_WAIT(20) - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_SpinJump) - EVT_CALL(SetZoneEnabled, ZONE_s, FALSE) - EVT_WAIT(1) - EVT_CALL(SetZoneEnabled, ZONE_gon, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_sou, FALSE) - EVT_CALL(N(EnableCameraFollowPlayerY)) - EVT_SET(LVar3, 500) - EVT_EXEC_GET_TID(N(EVS_TetherCamToPlayerCappedY), LVarA) - EVT_CALL(PlaySoundAtPlayer, SOUND_SLIDE, SOUND_SPACE_DEFAULT) - EVT_CALL(N(MovePlayerAlongRoofSlide)) - EVT_CALL(StopSound, SOUND_SLIDE) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.5)) - EVT_CALL(PlayerJump, -150, 325, -300, 40) - EVT_CALL(ShakeCam, CAM_DEFAULT, 1, 5, EVT_FLOAT(1.0)) - EVT_CALL(SetZoneEnabled, ZONE_s, TRUE) - EVT_CALL(SetZoneEnabled, ZONE_gon, TRUE) - EVT_CALL(SetZoneEnabled, ZONE_sou, TRUE) - EVT_CALL(N(DisableCameraFollowPlayerY)) - EVT_KILL_THREAD(LVarA) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_RETURN - EVT_END + Call(N(IsPlayerInputDisabled)) + IfEq(LVar0, TRUE) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, PARTNER_NONE) + Call(InterruptUsePartner) + Wait(20) + EndIf + Wait(1) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Wait(1) + Call(SetPlayerAnimation, ANIM_Mario1_SpinJump) + Call(SetZoneEnabled, ZONE_s, FALSE) + Wait(1) + Call(SetZoneEnabled, ZONE_gon, FALSE) + Call(SetZoneEnabled, ZONE_sou, FALSE) + Call(N(EnableCameraFollowPlayerY)) + Set(LVar3, 500) + ExecGetTID(N(EVS_TetherCamToPlayerCappedY), LVarA) + Call(PlaySoundAtPlayer, SOUND_SLIDE, SOUND_SPACE_DEFAULT) + Call(N(MovePlayerAlongRoofSlide)) + Call(StopSound, SOUND_SLIDE) + Call(SetPlayerJumpscale, Float(0.5)) + Call(PlayerJump, -150, 325, -300, 40) + Call(ShakeCam, CAM_DEFAULT, 1, 5, Float(1.0)) + Call(SetZoneEnabled, ZONE_s, TRUE) + Call(SetZoneEnabled, ZONE_gon, TRUE) + Call(SetZoneEnabled, ZONE_sou, TRUE) + Call(N(DisableCameraFollowPlayerY)) + KillThread(LVarA) + Call(DisablePlayerInput, FALSE) + Call(DisablePlayerPhysics, FALSE) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Return + End }; EvtScript N(EVS_SpawnChimneySmokeAtPlayer) = { - EVT_CALL(PlaySoundAtPlayer, SOUND_FIREPLACE_BURST, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, LVar1, LVar2, LVar3, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar1, LVar2, LVar3, 20, 10, 0, 40) - EVT_END_THREAD - EVT_LOOP(7) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(RandInt, 30, LVar3) - EVT_CALL(RandInt, 30, LVar4) - EVT_ADD(LVar0, -15) - EVT_ADD(LVar2, 10) - EVT_ADD(LVar0, LVar3) - EVT_ADD(LVar1, LVar4) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, 1, 20) - EVT_WAIT(6) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(PlaySoundAtPlayer, SOUND_FIREPLACE_BURST, SOUND_SPACE_DEFAULT) + Thread + Call(GetPlayerPos, LVar1, LVar2, LVar3) + PlayEffect(EFFECT_LANDING_DUST, 4, LVar1, LVar2, LVar3, 0) + EndThread + Thread + Call(GetPlayerPos, LVar1, LVar2, LVar3) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar1, LVar2, LVar3, 20, 10, 0, 40) + EndThread + Loop(7) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(RandInt, 30, LVar3) + Call(RandInt, 30, LVar4) + Add(LVar0, -15) + Add(LVar2, 10) + Add(LVar0, LVar3) + Add(LVar1, LVar4) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, 1, 20) + Wait(6) + EndLoop + Return + End }; EvtScript N(EVS_TouchFloor_LeftRoof) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, -215) - EVT_RETURN - EVT_END_IF - EVT_IF_GT(LVar0, -205) - EVT_RETURN - EVT_END_IF - EVT_IF_LT(LVar2, -390) - EVT_RETURN - EVT_END_IF - EVT_IF_GT(LVar2, -375) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(IsPlayerInputDisabled)) - EVT_IF_EQ(LVar0, TRUE) - EVT_RETURN - EVT_END_IF + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, -215) + Return + EndIf + IfGt(LVar0, -205) + Return + EndIf + IfLt(LVar2, -390) + Return + EndIf + IfGt(LVar2, -375) + Return + EndIf + Call(N(IsPlayerInputDisabled)) + IfEq(LVar0, TRUE) + Return + EndIf // fall down the chimney - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(InterruptUsePartner) - EVT_WAIT(20) - EVT_END_IF - EVT_CALL(DisablePartnerAI, 0) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerPos, -210, LVar1, -380) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_WAIT(30) - EVT_LOOP(10) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 5) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPlayerPos, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_PARTNER, NPC_DISPOSE_LOCATION) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtPlayer, SOUND_TRIP, SOUND_SPACE_DEFAULT) - EVT_CALL(ShakeCam, CAM_DEFAULT, 1, 10, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(SetNpcPos, NPC_PARTNER, -214, 150, -375) - EVT_CALL(SetPlayerPos, -214, 150, -370) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Burnt) - EVT_WAIT(10) - EVT_EXEC(N(EVS_SpawnChimneySmokeAtPlayer)) - EVT_EXEC_WAIT(N(EVS_RevealLeftHouse)) - EVT_EXEC_WAIT(N(EVS_SetEntityHideMode_LeftHouse)) - EVT_EXEC(N(EVS_OnEnterLeftHouse)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(200.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-165.0), EVT_FLOAT(-140.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-12.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(40) - EVT_IF_GE(GB_StoryProgress, STORY_CH7_SPOKE_WITH_HERRINGWAY) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_RETURN - EVT_END_IF - EVT_CALL(NpcFacePlayer, NPC_Herringway, 0) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Herringway, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH7_00CC) - EVT_CALL(GetNpcPos, NPC_Herringway, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(200.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-224.0), EVT_FLOAT(-132.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(-127.0), EVT_FLOAT(-314.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Herringway, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH7_00CD) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_WAIT(1) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, PARTNER_NONE) + Call(InterruptUsePartner) + Wait(20) + EndIf + Call(DisablePartnerAI, 0) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerPos, -210, LVar1, -380) + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + Wait(30) + Loop(10) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar1, 5) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(SetPlayerPos, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_PARTNER, NPC_DISPOSE_LOCATION) + Wait(20) + Call(PlaySoundAtPlayer, SOUND_TRIP, SOUND_SPACE_DEFAULT) + Call(ShakeCam, CAM_DEFAULT, 1, 10, Float(1.0)) + Wait(10) + Call(SetNpcPos, NPC_PARTNER, -214, 150, -375) + Call(SetPlayerPos, -214, 150, -370) + Call(SetPlayerAnimation, ANIM_Mario1_Burnt) + Wait(10) + Exec(N(EVS_SpawnChimneySmokeAtPlayer)) + ExecWait(N(EVS_RevealLeftHouse)) + ExecWait(N(EVS_SetEntityHideMode_LeftHouse)) + Exec(N(EVS_OnEnterLeftHouse)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(200.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(-165.0), Float(-140.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-12.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(40) + IfGe(GB_StoryProgress, STORY_CH7_SPOKE_WITH_HERRINGWAY) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Call(EnablePartnerAI) + Return + EndIf + Call(NpcFacePlayer, NPC_Herringway, 0) + Wait(10) + Call(SpeakToPlayer, NPC_Herringway, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH7_00CC) + Call(GetNpcPos, NPC_Herringway, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(200.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(-224.0), Float(-132.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(-127.0), Float(-314.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-9.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Herringway, ANIM_Toad_Red_Talk, ANIM_Toad_Red_Idle, 0, MSG_CH7_00CD) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Wait(1) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Call(DisablePlayerPhysics, FALSE) + Call(EnablePartnerAI) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Return + End }; EvtScript N(EVS_LandOnRightRoof) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_IF_EQ(MF_Unk_00, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(MF_Unk_00, TRUE) - EVT_LABEL(10) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetPlayerActionState, LVar3) - EVT_WAIT(1) - EVT_IF_LE(LVar0, 190) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_GE(LVar0, 230) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_LE(LVar1, 350) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_GE(LVar1, 373) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_LE(LVar2, -335) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_GE(LVar2, -303) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_EQ(MF_UsingSpring, FALSE) - EVT_GOTO(10) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_SetEntityHideMode_LeftHouse)) - EVT_EXEC(N(EVS_OnExitRightHouse)) - EVT_SET(MF_Unk_00, FALSE) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + IfEq(MF_Unk_00, TRUE) + Return + EndIf + Set(MF_Unk_00, TRUE) + Label(10) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetPlayerActionState, LVar3) + Wait(1) + IfLe(LVar0, 190) + Goto(10) + EndIf + IfGe(LVar0, 230) + Goto(10) + EndIf + IfLe(LVar1, 350) + Goto(10) + EndIf + IfGe(LVar1, 373) + Goto(10) + EndIf + IfLe(LVar2, -335) + Goto(10) + EndIf + IfGe(LVar2, -303) + Goto(10) + EndIf + IfEq(MF_UsingSpring, FALSE) + Goto(10) + EndIf + ExecWait(N(EVS_SetEntityHideMode_LeftHouse)) + Exec(N(EVS_OnExitRightHouse)) + Set(MF_Unk_00, FALSE) + Return + End }; EvtScript N(EVS_UseSpring) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAUNCH) - EVT_IF_EQ(MV_CurrentFloor, 1) - EVT_SET(LVar3, 500) - EVT_EXEC_GET_TID(N(EVS_TetherCamToPlayerCappedY), LVarA) - EVT_EXEC_WAIT(N(EVS_SetEntityHideMode_Outside)) - EVT_SET(MF_UsingSpring, FALSE) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.5)) - EVT_CALL(PlayerJump, 175, 385, -310, 35) - EVT_SET(MF_UsingSpring, TRUE) - EVT_EXEC(N(EVS_LandOnRightRoof)) - EVT_EXEC_WAIT(N(EVS_OnEnterRightHouse)) - EVT_ELSE - EVT_SET(LVar3, 175) - EVT_EXEC_GET_TID(N(EVS_TetherCamToPlayerCappedY), LVarA) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7)) - EVT_CALL(PlayerJump, 160, 150, -310, 25) - EVT_END_IF - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_KILL_THREAD(LVarA) - EVT_WAIT(2) - EVT_IF_EQ(MV_CurrentFloor, 1) - EVT_EXEC_WAIT(N(EVS_HideRightHouse)) - EVT_END_IF - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAUNCH) + IfEq(MV_CurrentFloor, 1) + Set(LVar3, 500) + ExecGetTID(N(EVS_TetherCamToPlayerCappedY), LVarA) + ExecWait(N(EVS_SetEntityHideMode_Outside)) + Set(MF_UsingSpring, FALSE) + Call(SetPlayerJumpscale, Float(0.5)) + Call(PlayerJump, 175, 385, -310, 35) + Set(MF_UsingSpring, TRUE) + Exec(N(EVS_LandOnRightRoof)) + ExecWait(N(EVS_OnEnterRightHouse)) + Else + Set(LVar3, 175) + ExecGetTID(N(EVS_TetherCamToPlayerCappedY), LVarA) + Call(SetPlayerJumpscale, Float(0.7)) + Call(PlayerJump, 160, 150, -310, 25) + EndIf + Call(SetPlayerActionState, ACTION_STATE_IDLE) + KillThread(LVarA) + Wait(2) + IfEq(MV_CurrentFloor, 1) + ExecWait(N(EVS_HideRightHouse)) + EndIf + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Interact_Padlock) = { - EVT_EXEC_WAIT(N(EVS_SetupLockedHouse)) - EVT_SET(GF_SAM11_UnlockedDoor, TRUE) - EVT_RETURN - EVT_END + ExecWait(N(EVS_SetupLockedHouse)) + Set(GF_SAM11_UnlockedDoor, TRUE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_SAM11_UnlockedDoor, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), 153, 8, -145, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_Interact_Padlock))) - EVT_SET(MV_PadlockEntityID, LVar0) - EVT_END_IF - EVT_THREAD - EVT_CALL(N(MonitorCurrenFloor)) - EVT_END_THREAD - EVT_CALL(MakeEntity, EVT_PTR(Entity_ScriptSpring), 224, 150, -328, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_UseSpring))) - EVT_CALL(SetEntityCullMode, 1) - EVT_SET(MF_Unk_00, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_TouchFloor_RightRoof)), TRIGGER_FLOOR_TOUCH, COLLIDER_o570, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_TouchFloor_LeftRoof)), TRIGGER_FLOOR_TOUCH, COLLIDER_g_yuki2, 1, 0) - EVT_CALL(MakeItemEntity, ITEM_WAREHOUSE_KEY, 0, -60, 220, ITEM_SPAWN_MODE_KEY, GF_SAM11_Item_WarehouseKey) - EVT_RETURN - EVT_END + IfEq(GF_SAM11_UnlockedDoor, FALSE) + Call(MakeEntity, Ref(Entity_Padlock), 153, 8, -145, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_Interact_Padlock))) + Set(MV_PadlockEntityID, LVar0) + EndIf + Thread + Call(N(MonitorCurrenFloor)) + EndThread + Call(MakeEntity, Ref(Entity_ScriptSpring), 224, 150, -328, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_UseSpring))) + Call(SetEntityCullMode, 1) + Set(MF_Unk_00, FALSE) + BindTrigger(Ref(N(EVS_TouchFloor_RightRoof)), TRIGGER_FLOOR_TOUCH, COLLIDER_o570, 1, 0) + BindTrigger(Ref(N(EVS_TouchFloor_LeftRoof)), TRIGGER_FLOOR_TOUCH, COLLIDER_g_yuki2, 1, 0) + Call(MakeItemEntity, ITEM_WAREHOUSE_KEY, 0, -60, 220, ITEM_SPAWN_MODE_KEY, GF_SAM11_Item_WarehouseKey) + Return + End }; diff --git a/src/world/area_sam/sam_11/sam_11_5_npc.c b/src/world/area_sam/sam_11/sam_11_5_npc.c index 5d5940d449c..e11a25afcab 100644 --- a/src/world/area_sam/sam_11/sam_11_5_npc.c +++ b/src/world/area_sam/sam_11/sam_11_5_npc.c @@ -81,465 +81,465 @@ API_CALLABLE(N(SetInvitationLetterScale)) { } EvtScript N(EVS_NpcInteract_PenguinPatrol) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_SWITCH(MV_DialogueState_Patrol) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_00B9) - EVT_SET(MV_DialogueState_Patrol, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_00BA) - EVT_SET(MV_DialogueState_Patrol, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CASE_LT(STORY_CH7_DEFEATED_JR_TROOPA) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_00BB) - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_00BC) - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_00BD) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + Switch(MV_DialogueState_Patrol) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_00B9) + Set(MV_DialogueState_Patrol, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_00BA) + Set(MV_DialogueState_Patrol, 0) + EndSwitch + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + CaseLt(STORY_CH7_DEFEATED_JR_TROOPA) + Call(SpeakToPlayer, NPC_SELF, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_00BB) + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_00BC) + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_00BD) + EndSwitch + Return + End }; EvtScript N(EVS_NpcIdle_PenguinPatrol) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInteract_PenguinSentry) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00C7) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00C8) - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_IF_EQ(GF_SAM11_LeftTown, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00C9) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00CA) - EVT_END_IF - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00CB) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00C7) + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00C8) + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + IfEq(GF_SAM11_LeftTown, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00C9) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00CA) + EndIf + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00CB) + EndSwitch + Return + End }; EvtScript N(EVS_NpcIdle_PenguinSentry) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(N(SetInitialSentryPosition)) - EVT_LOOP(0) - EVT_CALL(N(UpdateSentryPosition)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(N(SetInitialSentryPosition)) + Loop(0) + Call(N(UpdateSentryPosition)) + Wait(1) + EndLoop + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Herringway) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_SPOKE_WITH_HERRINGWAY) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Herringway_Talk, ANIM_Herringway_Idle, 0, MSG_CH7_00CE) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(5 * DT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_ADDF(LVar0, LVar3) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_DIVF(LVar0, EVT_FLOAT(2.0)) - EVT_DIVF(LVar1, EVT_FLOAT(2.0)) - EVT_DIVF(LVar2, EVT_FLOAT(2.0)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-224.0), EVT_FLOAT(-132.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(-127.0), EVT_FLOAT(-314.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetPlayerPos, -137, 150, -340) - EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE) - EVT_CALL(SetNpcPos, NPC_PARTNER, -170, 150, -350) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_SELF, 0) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Herringway_Talk, ANIM_Herringway_Idle, 0, MSG_CH7_00CF) - EVT_WAIT(5 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Thinking) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Herringway_Talk, ANIM_Herringway_Idle, 0, MSG_CH7_00D0) - EVT_WAIT(20 * DT) - EVT_THREAD - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_LOOP(30) - EVT_CALL(PlayerFaceNpc, NPC_Herringway, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Herringway_Walk) - EVT_CALL(NpcMoveTo, NPC_SELF, -235, -355, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Herringway_Idle) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_WAIT(20 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Herringway_Talk, ANIM_Herringway_Idle, 0, MSG_CH7_00D1) - EVT_WAIT(15 * DT) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(0.5)) - EVT_EXEC_WAIT(N(EVS_LowerStaircase)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Herringway_Talk, ANIM_Herringway_Idle, 0, MSG_CH7_00D2) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Herringway_Walk) - EVT_CALL(NpcMoveTo, NPC_SELF, -215, -245, 0) - EVT_THREAD - EVT_CALL(NpcMoveTo, NPC_SELF, -215, -184, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Herringway_Idle) - EVT_CALL(SetNpcPos, NPC_SELF, -217, 0, -38) - EVT_END_THREAD - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_ALPHA, 0, 0, 0, 0) - EVT_SET(GB_StoryProgress, STORY_CH7_SPOKE_WITH_HERRINGWAY) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Herringway_Talk, ANIM_Herringway_Idle, 0, MSG_CH7_00D3) - EVT_CASE_LT(STORY_CH7_DEFEATED_JR_TROOPA) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Herringway_Talk, ANIM_Herringway_Idle, 0, MSG_CH7_00D5) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Herringway_Talk, ANIM_Herringway_Idle, 0, MSG_CH7_00D6) - EVT_CASE_GE(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Herringway_Talk, ANIM_Herringway_Idle, 0, MSG_CH7_00D7) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_SPOKE_WITH_HERRINGWAY) + Wait(30 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_Herringway_Talk, ANIM_Herringway_Idle, 0, MSG_CH7_00CE) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(5 * DT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + AddF(LVar0, LVar3) + AddF(LVar1, LVar4) + AddF(LVar2, LVar5) + DivF(LVar0, Float(2.0)) + DivF(LVar1, Float(2.0)) + DivF(LVar2, Float(2.0)) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-9.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(250.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(-224.0), Float(-132.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(-127.0), Float(-314.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetPlayerPos, -137, 150, -340) + Call(PlayerFaceNpc, NPC_SELF, FALSE) + Call(SetNpcPos, NPC_PARTNER, -170, 150, -350) + Call(NpcFaceNpc, NPC_PARTNER, NPC_SELF, 0) + Call(NpcFacePlayer, NPC_SELF, 0) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_Herringway_Talk, ANIM_Herringway_Idle, 0, MSG_CH7_00CF) + Wait(5 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Thinking) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SpeakToPlayer, NPC_SELF, ANIM_Herringway_Talk, ANIM_Herringway_Idle, 0, MSG_CH7_00D0) + Wait(20 * DT) + Thread + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Loop(30) + Call(PlayerFaceNpc, NPC_Herringway, FALSE) + Wait(1) + EndLoop + EndThread + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcSpeed, NPC_SELF, Float(3.0 / DT)) + Call(SetNpcAnimation, NPC_SELF, ANIM_Herringway_Walk) + Call(NpcMoveTo, NPC_SELF, -235, -355, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Herringway_Idle) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Wait(20 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_Herringway_Talk, ANIM_Herringway_Idle, 0, MSG_CH7_00D1) + Wait(15 * DT) + Call(ShakeCam, CAM_DEFAULT, 0, 20, Float(0.5)) + ExecWait(N(EVS_LowerStaircase)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Herringway_Talk, ANIM_Herringway_Idle, 0, MSG_CH7_00D2) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Herringway_Walk) + Call(NpcMoveTo, NPC_SELF, -215, -245, 0) + Thread + Call(NpcMoveTo, NPC_SELF, -215, -184, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Herringway_Idle) + Call(SetNpcPos, NPC_SELF, -217, 0, -38) + EndThread + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_ALPHA, 0, 0, 0, 0) + Set(GB_StoryProgress, STORY_CH7_SPOKE_WITH_HERRINGWAY) + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Herringway_Talk, ANIM_Herringway_Idle, 0, MSG_CH7_00D3) + CaseLt(STORY_CH7_DEFEATED_JR_TROOPA) + Call(SpeakToPlayer, NPC_SELF, ANIM_Herringway_Talk, ANIM_Herringway_Idle, 0, MSG_CH7_00D5) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Herringway_Talk, ANIM_Herringway_Idle, 0, MSG_CH7_00D6) + CaseGe(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Herringway_Talk, ANIM_Herringway_Idle, 0, MSG_CH7_00D7) + EndSwitch + Return + End }; EvtScript N(EVS_NpcIdle_Herringway) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInteract_Penguin_02) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_SWITCH(MV_DialogueState_Penguin2) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0096) - EVT_SET(MV_DialogueState_Penguin2, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0097) - EVT_SET(MV_DialogueState_Penguin2, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_SWITCH(MV_DialogueState_Penguin2) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0098) - EVT_SET(MV_DialogueState_Penguin2, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0099) - EVT_SET(MV_DialogueState_Penguin2, 0) - EVT_END_SWITCH - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_009A) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + Switch(MV_DialogueState_Penguin2) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0096) + Set(MV_DialogueState_Penguin2, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0097) + Set(MV_DialogueState_Penguin2, 0) + EndSwitch + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Switch(MV_DialogueState_Penguin2) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0098) + Set(MV_DialogueState_Penguin2, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_0099) + Set(MV_DialogueState_Penguin2, 0) + EndSwitch + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_009A) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Penguin_03) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_SWITCH(MV_DialogueState_Penguin3) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_009B) - EVT_SET(MV_DialogueState_Penguin3, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_009C) - EVT_SET(MV_DialogueState_Penguin3, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_SWITCH(MV_DialogueState_Penguin3) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_009D) - EVT_SET(MV_DialogueState_Penguin3, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Celebrate, ANIM_Penguin_Idle, 0, MSG_CH7_009E) - EVT_SET(MV_DialogueState_Penguin3, 0) - EVT_END_SWITCH - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_009F) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + Switch(MV_DialogueState_Penguin3) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_009B) + Set(MV_DialogueState_Penguin3, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_009C) + Set(MV_DialogueState_Penguin3, 0) + EndSwitch + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Switch(MV_DialogueState_Penguin3) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_009D) + Set(MV_DialogueState_Penguin3, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Celebrate, ANIM_Penguin_Idle, 0, MSG_CH7_009E) + Set(MV_DialogueState_Penguin3, 0) + EndSwitch + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_009F) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Penguin_04) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_SWITCH(MV_DialogueState_Penguin4) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00A0) - EVT_SET(MV_DialogueState_Penguin4, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00A1) - EVT_SET(MV_DialogueState_Penguin4, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_IF_EQ(GF_SAM11_UnlockedDoor, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00A2) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00A3) - EVT_END_IF - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_SWITCH(MV_DialogueState_Penguin4) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00A4) - EVT_SET(MV_DialogueState_Penguin4, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00A5) - EVT_SET(MV_DialogueState_Penguin4, 0) - EVT_END_SWITCH - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00A6) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + Switch(MV_DialogueState_Penguin4) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00A0) + Set(MV_DialogueState_Penguin4, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00A1) + Set(MV_DialogueState_Penguin4, 0) + EndSwitch + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + IfEq(GF_SAM11_UnlockedDoor, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00A2) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00A3) + EndIf + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Switch(MV_DialogueState_Penguin4) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00A4) + Set(MV_DialogueState_Penguin4, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00A5) + Set(MV_DialogueState_Penguin4, 0) + EndSwitch + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00A6) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Penguin_05) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_SWITCH(MV_DialogueState_Penguin5) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00A7) - EVT_SET(MV_DialogueState_Penguin5, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00A8) - EVT_SET(MV_DialogueState_Penguin5, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH7_SPOKE_WITH_HERRINGWAY) - EVT_SWITCH(MV_DialogueState_Penguin5) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00A9) - EVT_SET(MV_DialogueState_Penguin5, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00AA) - EVT_SET(MV_DialogueState_Penguin5, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00AB) - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_SWITCH(MV_DialogueState_Penguin5) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00AC) - EVT_SET(MV_DialogueState_Penguin5, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00AD) - EVT_SET(MV_DialogueState_Penguin5, 0) - EVT_END_SWITCH - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00AE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + Switch(MV_DialogueState_Penguin5) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00A7) + Set(MV_DialogueState_Penguin5, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00A8) + Set(MV_DialogueState_Penguin5, 0) + EndSwitch + CaseLt(STORY_CH7_SPOKE_WITH_HERRINGWAY) + Switch(MV_DialogueState_Penguin5) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00A9) + Set(MV_DialogueState_Penguin5, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00AA) + Set(MV_DialogueState_Penguin5, 0) + EndSwitch + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00AB) + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Switch(MV_DialogueState_Penguin5) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00AC) + Set(MV_DialogueState_Penguin5, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00AD) + Set(MV_DialogueState_Penguin5, 0) + EndSwitch + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00AE) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Penguin_06) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_SWITCH(MV_DialogueState_Penguin6) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00AF) - EVT_SET(MV_DialogueState_Penguin6, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00B0) - EVT_SET(MV_DialogueState_Penguin6, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_SWITCH(MV_DialogueState_Penguin6) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00B1) - EVT_SET(MV_DialogueState_Penguin6, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00B2) - EVT_SET(MV_DialogueState_Penguin6, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_SWITCH(MV_DialogueState_Penguin6) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00B3) - EVT_SET(MV_DialogueState_Penguin6, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00B4) - EVT_SET(MV_DialogueState_Penguin6, 0) - EVT_END_SWITCH - EVT_CASE_GE(STORY_CH7_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00B5) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + Switch(MV_DialogueState_Penguin6) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00AF) + Set(MV_DialogueState_Penguin6, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00B0) + Set(MV_DialogueState_Penguin6, 0) + EndSwitch + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Switch(MV_DialogueState_Penguin6) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00B1) + Set(MV_DialogueState_Penguin6, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00B2) + Set(MV_DialogueState_Penguin6, 0) + EndSwitch + CaseLt(STORY_CH7_STAR_SPIRIT_RESCUED) + Switch(MV_DialogueState_Penguin6) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00B3) + Set(MV_DialogueState_Penguin6, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00B4) + Set(MV_DialogueState_Penguin6, 0) + EndSwitch + CaseGe(STORY_CH7_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_Penguin_Talk, ANIM_Penguin_Idle, 0, MSG_CH7_00B5) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Toadette_01) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_SHATTERED_FROZEN_POND) - EVT_CALL(SpeakToPlayer, NPC_Toadette_01, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 5, MSG_CH7_00BE) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Toadette_02, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 5, MSG_CH7_00BF) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Toadette_03, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 5, MSG_CH7_00C0) - EVT_CASE_LT(STORY_CH7_ARRIVED_AT_STARBORN_VALLEY) - EVT_CALL(SpeakToPlayer, NPC_Toadette_01, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 5, MSG_CH7_00C1) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Toadette_02, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 5, MSG_CH7_00C2) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Toadette_03, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 5, MSG_CH7_00C3) - EVT_CASE_LT(STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(SpeakToPlayer, NPC_Toadette_01, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 5, MSG_CH7_00C4) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Toadette_02, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 5, MSG_CH7_00C5) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Toadette_03, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 5, MSG_CH7_00C6) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_SHATTERED_FROZEN_POND) + Call(SpeakToPlayer, NPC_Toadette_01, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 5, MSG_CH7_00BE) + Wait(10) + Call(SpeakToPlayer, NPC_Toadette_02, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 5, MSG_CH7_00BF) + Wait(10) + Call(SpeakToPlayer, NPC_Toadette_03, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 5, MSG_CH7_00C0) + CaseLt(STORY_CH7_ARRIVED_AT_STARBORN_VALLEY) + Call(SpeakToPlayer, NPC_Toadette_01, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 5, MSG_CH7_00C1) + Wait(10) + Call(SpeakToPlayer, NPC_Toadette_02, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 5, MSG_CH7_00C2) + Wait(10) + Call(SpeakToPlayer, NPC_Toadette_03, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 5, MSG_CH7_00C3) + CaseLt(STORY_CH7_STAR_SPRIT_DEPARTED) + Call(SpeakToPlayer, NPC_Toadette_01, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 5, MSG_CH7_00C4) + Wait(10) + Call(SpeakToPlayer, NPC_Toadette_02, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 5, MSG_CH7_00C5) + Wait(10) + Call(SpeakToPlayer, NPC_Toadette_03, ANIM_Toadette_Pink_Talk, ANIM_Toadette_Pink_Idle, 5, MSG_CH7_00C6) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Toadette_03) = { - EVT_EXEC_WAIT(N(EVS_NpcInteract_Toadette_01)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_NpcInteract_Toadette_01)) + Return + End }; EvtScript N(EVS_NpcInteract_Toadette_02) = { - EVT_EXEC_WAIT(N(EVS_NpcInteract_Toadette_01)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_NpcInteract_Toadette_01)) + Return + End }; EvtScript N(EVS_NpcInit_PenguinPatrol) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_PenguinPatrol))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_PenguinPatrol))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_CASE_GE(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_PenguinPatrol))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_PenguinPatrol))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(RemoveNpc, NPC_SELF) + CaseGe(STORY_CH7_MAYOR_MURDER_SOLVED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_PenguinSentry) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_PenguinSentry))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_PenguinSentry))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CASE_GE(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(SetNpcPos, NPC_SELF, 420, 0, -51) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_PenguinSentry))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_PenguinSentry))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + CaseGe(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(SetNpcPos, NPC_SELF, 420, 0, -51) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Herringway) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Herringway))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Herringway))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_SPOKE_WITH_HERRINGWAY) - EVT_CALL(SetNpcPos, NPC_SELF, -110, 150, -323) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INACTIVE, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CASE_GE(STORY_CH7_MAYOR_MURDER_SOLVED) - EVT_CALL(SetNpcPos, NPC_SELF, -110, 150, -323) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Herringway))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Herringway))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_SPOKE_WITH_HERRINGWAY) + Call(SetNpcPos, NPC_SELF, -110, 150, -323) + CaseLt(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INACTIVE, TRUE) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + CaseGe(STORY_CH7_MAYOR_MURDER_SOLVED) + Call(SetNpcPos, NPC_SELF, -110, 150, -323) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Penguin_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Penguin_02))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_CASE_DEFAULT - EVT_IF_EQ(GF_SAM11_LeftTown, FALSE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Penguin_02))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + CaseDefault + IfEq(GF_SAM11_LeftTown, FALSE) + Call(RemoveNpc, NPC_SELF) + EndIf + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Penguin_03) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Penguin_03))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_CASE_DEFAULT - EVT_IF_EQ(GF_SAM11_LeftTown, FALSE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Penguin_03))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_MAYOR_MURDER_MYSTERY) + CaseDefault + IfEq(GF_SAM11_LeftTown, FALSE) + Call(RemoveNpc, NPC_SELF) + EndIf + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Penguin_04) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Penguin_04))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Penguin_04))) + Return + End }; EvtScript N(EVS_NpcInit_Penguin_05) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Penguin_05))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Penguin_05))) + Return + End }; EvtScript N(EVS_NpcInit_Penguin_06) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Penguin_06))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Penguin_06))) + Return + End }; EvtScript N(EVS_NpcInit_Toadette_01) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toadette_01))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toadette_01))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Toadette_02) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toadette_02))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toadette_02))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Toadette_03) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Toadette_03))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH7_STAR_SPRIT_DEPARTED) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Toadette_03))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_Townsfolk)[] = { @@ -758,228 +758,228 @@ NpcData N(NpcData_Tourists)[] = { }; EvtScript N(EVS_Scene_EpilogueDelivery) = { - EVT_CALL(SetNpcPos, NPC_Kolorado, 140, 0, -48) - EVT_CALL(SetNpcPos, NPC_Kooper, 75, 0, -48) - EVT_CALL(SetNpcPos, NPC_Archeologist_01, 103, 0, -87) - EVT_CALL(SetNpcPos, NPC_Archeologist_02, 45, 0, -87) - EVT_CALL(SetNpcSpeed, NPC_Kolorado, EVT_FLOAT(2.0)) - EVT_CALL(SetNpcSpeed, NPC_Kooper, EVT_FLOAT(2.0)) - EVT_CALL(SetNpcSpeed, NPC_Archeologist_01, EVT_FLOAT(2.0)) - EVT_CALL(SetNpcSpeed, NPC_Archeologist_02, EVT_FLOAT(2.0)) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Kooper, ANIM_WorldKooper_Walk) - EVT_CALL(NpcMoveTo, NPC_Kooper, 148, -48, 0) - EVT_CALL(NpcMoveTo, NPC_Kooper, 263, 26, 0) - EVT_CALL(NpcMoveTo, NPC_Kooper, 308, 26, 0) - EVT_CALL(SetNpcAnimation, NPC_Kooper, ANIM_WorldKooper_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Archeologist_01, ANIM_Archeologist_Walk) - EVT_CALL(NpcMoveTo, NPC_Archeologist_01, 148, -87, 0) - EVT_CALL(NpcMoveTo, NPC_Archeologist_01, 263, -13, 0) - EVT_CALL(NpcMoveTo, NPC_Archeologist_01, 331, -13, 0) - EVT_CALL(SetNpcAnimation, NPC_Archeologist_01, ANIM_Archeologist_Idle) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Archeologist_02, ANIM_Archeologist_Walk) - EVT_CALL(NpcMoveTo, NPC_Archeologist_02, 148, -87, 0) - EVT_CALL(NpcMoveTo, NPC_Archeologist_02, 263, -13, 0) - EVT_CALL(NpcMoveTo, NPC_Archeologist_02, 283, -13, 0) - EVT_CALL(SetNpcAnimation, NPC_Archeologist_02, ANIM_Archeologist_Idle) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Walk) - EVT_CALL(NpcMoveTo, NPC_Kolorado, 148, -48, 0) - EVT_CALL(NpcMoveTo, NPC_Kolorado, 263, 26, 0) - EVT_CALL(NpcMoveTo, NPC_Kolorado, 358, 26, 0) - EVT_CALL(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Idle) - EVT_WAIT(30) - EVT_CALL(InterpNpcYaw, NPC_Kolorado, 270, 0) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Kolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 5, MSG_Outro_0017) - EVT_CALL(SpeakToPlayer, NPC_Kooper, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 5, MSG_Outro_0018) - EVT_THREAD - EVT_WAIT(25) - EVT_CALL(InterpNpcYaw, NPC_Kooper, 270, 0) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(28) - EVT_CALL(InterpNpcYaw, NPC_Archeologist_01, 270, 0) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(32) - EVT_CALL(InterpNpcYaw, NPC_Archeologist_02, 270, 0) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(35) - EVT_CALL(InterpNpcYaw, NPC_Kolorado, 270, 0) - EVT_END_THREAD - EVT_CALL(SetNpcSpeed, NPC_Parakarry, EVT_FLOAT(3.0)) - EVT_CALL(SetNpcPos, NPC_Parakarry, 140, 115, 26) - EVT_CALL(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 5, MSG_Outro_0019) - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 310, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 310, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(-300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Walk) - EVT_CALL(NpcFlyTo, NPC_Parakarry, 270, 15, 26, 50, 0, EASING_LINEAR) - EVT_CALL(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Idle) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_Kooper, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 5, MSG_Outro_001A) - EVT_CALL(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 5, MSG_Outro_001B) - EVT_THREAD - EVT_CALL(DropResizableItemEntity, ITEM_LETTER_TO_KOLORADO, NPC_DISPOSE_LOCATION, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_CALL(N(SetInvitationLetterScale)) - EVT_LOOP(20) - EVT_CALL(GetNpcPos, NPC_Parakarry, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, 16) - EVT_ADD(LVar2, 4) - EVT_ADD(LVar3, 10) - EVT_CALL(SetItemPos, LVar0, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(73) - EVT_CALL(RemoveItemEntity, LVar0) - EVT_END_THREAD - EVT_CALL(NpcFlyTo, NPC_Parakarry, 280, 5, 26, 20, -5, EASING_LINEAR) - EVT_WAIT(35) - EVT_CALL(NpcFlyTo, NPC_Parakarry, 270, 15, 26, 20, -5, EASING_LINEAR) - EVT_CALL(InterpNpcYaw, NPC_Parakarry, 90, 0) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_Kooper, ANIM_WorldKooper_Read) - EVT_WAIT(50) - EVT_CALL(SetNpcAnimation, NPC_Kooper, ANIM_WorldKooper_Idle) - EVT_WAIT(30) - EVT_CALL(SpeakToPlayer, NPC_Kooper, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 5, MSG_Outro_001C) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(InterpNpcYaw, NPC_Kooper, 90, 0) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Kolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 5, MSG_Outro_001D) - EVT_CALL(SpeakToPlayer, NPC_Kooper, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 5, MSG_Outro_001E) - EVT_WAIT(20) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(InterpNpcYaw, NPC_Parakarry, 270, 0) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_Kooper, ANIM_WorldKooper_CelebrateLoop) - EVT_CALL(InterpNpcYaw, NPC_Kooper, 270, 0) - EVT_WAIT(10) - EVT_CALL(SetNpcSpeed, NPC_Kooper, EVT_FLOAT(8.0)) - EVT_CALL(NpcMoveTo, NPC_Kooper, 75, -48, 0) - EVT_CALL(SetNpcPos, NPC_Kooper, NPC_DISPOSE_LOCATION) - EVT_CALL(InterpNpcYaw, NPC_Parakarry, 90, 0) - EVT_WAIT(30) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(InterpNpcYaw, NPC_Archeologist_01, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_Archeologist_02, 90, 0) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 5, MSG_Outro_001F) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Panic) - EVT_CALL(SetNpcJumpscale, NPC_Kolorado, EVT_FLOAT(2.0)) - EVT_CALL(GetNpcPos, NPC_Kolorado, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Kolorado, LVar0, LVar1, LVar2, 5) - EVT_CALL(SpeakToPlayer, NPC_Kolorado, ANIM_Kolorado_Shout, ANIM_Kolorado_Yell, 5, MSG_Outro_0020) - EVT_WAIT(10) - EVT_CALL(SetNpcSpeed, NPC_Kolorado, EVT_FLOAT(8.0)) - EVT_CALL(NpcMoveTo, NPC_Kolorado, 75, -48, 0) - EVT_CALL(SetNpcPos, NPC_Kolorado, NPC_DISPOSE_LOCATION) - EVT_THREAD - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 325, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 325, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(-450.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Walk) - EVT_CALL(NpcFlyTo, NPC_Parakarry, 180, 115, 26, 50, 0, EASING_LINEAR) - EVT_CALL(SetNpcPos, NPC_Parakarry, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(InterpNpcYaw, NPC_Archeologist_01, 270, 0) - EVT_WAIT(18) - EVT_CALL(InterpNpcYaw, NPC_Archeologist_01, 90, 0) - EVT_WAIT(8) - EVT_CALL(InterpNpcYaw, NPC_Archeologist_01, 270, 0) - EVT_WAIT(8) - EVT_CALL(InterpNpcYaw, NPC_Archeologist_01, 90, 0) - EVT_WAIT(8) - EVT_CALL(InterpNpcYaw, NPC_Archeologist_01, 270, 0) - EVT_WAIT(8) - EVT_CALL(InterpNpcYaw, NPC_Archeologist_01, 90, 0) - EVT_WAIT(8) - EVT_CALL(InterpNpcYaw, NPC_Archeologist_01, 270, 0) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_Archeologist_01, ANIM_Archeologist_Walk) - EVT_CALL(SetNpcSpeed, NPC_Archeologist_01, EVT_FLOAT(2.0)) - EVT_CALL(NpcMoveTo, NPC_Archeologist_01, 103, -87, 0) - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(InterpNpcYaw, NPC_Archeologist_02, 90, 0) - EVT_WAIT(18) - EVT_CALL(InterpNpcYaw, NPC_Archeologist_02, 270, 0) - EVT_WAIT(8) - EVT_CALL(InterpNpcYaw, NPC_Archeologist_02, 90, 0) - EVT_WAIT(8) - EVT_CALL(InterpNpcYaw, NPC_Archeologist_02, 270, 0) - EVT_WAIT(8) - EVT_CALL(InterpNpcYaw, NPC_Archeologist_02, 90, 0) - EVT_WAIT(8) - EVT_CALL(InterpNpcYaw, NPC_Archeologist_02, 270, 0) - EVT_WAIT(8) - EVT_CALL(InterpNpcYaw, NPC_Archeologist_02, 90, 0) - EVT_WAIT(30) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_Archeologist_02, ANIM_Archeologist_Walk) - EVT_CALL(SetNpcSpeed, NPC_Archeologist_02, EVT_FLOAT(2.0)) - EVT_CALL(NpcMoveTo, NPC_Archeologist_02, 45, -87, 0) - EVT_END_THREAD - EVT_WAIT(30) - EVT_CALL(FadeOutMusic, 0, 1000) - EVT_CALL(GotoMap, EVT_PTR("kmr_20"), kmr_20_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Kolorado, 140, 0, -48) + Call(SetNpcPos, NPC_Kooper, 75, 0, -48) + Call(SetNpcPos, NPC_Archeologist_01, 103, 0, -87) + Call(SetNpcPos, NPC_Archeologist_02, 45, 0, -87) + Call(SetNpcSpeed, NPC_Kolorado, Float(2.0)) + Call(SetNpcSpeed, NPC_Kooper, Float(2.0)) + Call(SetNpcSpeed, NPC_Archeologist_01, Float(2.0)) + Call(SetNpcSpeed, NPC_Archeologist_02, Float(2.0)) + Thread + Call(SetNpcAnimation, NPC_Kooper, ANIM_WorldKooper_Walk) + Call(NpcMoveTo, NPC_Kooper, 148, -48, 0) + Call(NpcMoveTo, NPC_Kooper, 263, 26, 0) + Call(NpcMoveTo, NPC_Kooper, 308, 26, 0) + Call(SetNpcAnimation, NPC_Kooper, ANIM_WorldKooper_Idle) + EndThread + Thread + Call(SetNpcAnimation, NPC_Archeologist_01, ANIM_Archeologist_Walk) + Call(NpcMoveTo, NPC_Archeologist_01, 148, -87, 0) + Call(NpcMoveTo, NPC_Archeologist_01, 263, -13, 0) + Call(NpcMoveTo, NPC_Archeologist_01, 331, -13, 0) + Call(SetNpcAnimation, NPC_Archeologist_01, ANIM_Archeologist_Idle) + EndThread + Thread + Call(SetNpcAnimation, NPC_Archeologist_02, ANIM_Archeologist_Walk) + Call(NpcMoveTo, NPC_Archeologist_02, 148, -87, 0) + Call(NpcMoveTo, NPC_Archeologist_02, 263, -13, 0) + Call(NpcMoveTo, NPC_Archeologist_02, 283, -13, 0) + Call(SetNpcAnimation, NPC_Archeologist_02, ANIM_Archeologist_Idle) + EndThread + Call(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Walk) + Call(NpcMoveTo, NPC_Kolorado, 148, -48, 0) + Call(NpcMoveTo, NPC_Kolorado, 263, 26, 0) + Call(NpcMoveTo, NPC_Kolorado, 358, 26, 0) + Call(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Idle) + Wait(30) + Call(InterpNpcYaw, NPC_Kolorado, 270, 0) + Wait(10) + Call(SpeakToPlayer, NPC_Kolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 5, MSG_Outro_0017) + Call(SpeakToPlayer, NPC_Kooper, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 5, MSG_Outro_0018) + Thread + Wait(25) + Call(InterpNpcYaw, NPC_Kooper, 270, 0) + EndThread + Thread + Wait(28) + Call(InterpNpcYaw, NPC_Archeologist_01, 270, 0) + EndThread + Thread + Wait(32) + Call(InterpNpcYaw, NPC_Archeologist_02, 270, 0) + EndThread + Thread + Wait(35) + Call(InterpNpcYaw, NPC_Kolorado, 270, 0) + EndThread + Call(SetNpcSpeed, NPC_Parakarry, Float(3.0)) + Call(SetNpcPos, NPC_Parakarry, 140, 115, 26) + Call(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 5, MSG_Outro_0019) + Thread + Wait(20) + Call(UseSettingsFrom, CAM_DEFAULT, 310, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 310, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(-300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-7.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Call(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Walk) + Call(NpcFlyTo, NPC_Parakarry, 270, 15, 26, 50, 0, EASING_LINEAR) + Call(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Idle) + Wait(20) + Call(SpeakToPlayer, NPC_Kooper, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 5, MSG_Outro_001A) + Call(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 5, MSG_Outro_001B) + Thread + Call(DropResizableItemEntity, ITEM_LETTER_TO_KOLORADO, NPC_DISPOSE_LOCATION, ITEM_SPAWN_MODE_DECORATION, 0) + Call(N(SetInvitationLetterScale)) + Loop(20) + Call(GetNpcPos, NPC_Parakarry, LVar1, LVar2, LVar3) + Add(LVar1, 16) + Add(LVar2, 4) + Add(LVar3, 10) + Call(SetItemPos, LVar0, LVar1, LVar2, LVar3) + Wait(1) + EndLoop + Wait(73) + Call(RemoveItemEntity, LVar0) + EndThread + Call(NpcFlyTo, NPC_Parakarry, 280, 5, 26, 20, -5, EASING_LINEAR) + Wait(35) + Call(NpcFlyTo, NPC_Parakarry, 270, 15, 26, 20, -5, EASING_LINEAR) + Call(InterpNpcYaw, NPC_Parakarry, 90, 0) + Wait(30) + Call(SetNpcAnimation, NPC_Kooper, ANIM_WorldKooper_Read) + Wait(50) + Call(SetNpcAnimation, NPC_Kooper, ANIM_WorldKooper_Idle) + Wait(30) + Call(SpeakToPlayer, NPC_Kooper, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 5, MSG_Outro_001C) + Thread + Wait(10) + Call(InterpNpcYaw, NPC_Kooper, 90, 0) + EndThread + Call(SpeakToPlayer, NPC_Kolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 5, MSG_Outro_001D) + Call(SpeakToPlayer, NPC_Kooper, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 5, MSG_Outro_001E) + Wait(20) + Thread + Wait(10) + Call(InterpNpcYaw, NPC_Parakarry, 270, 0) + EndThread + Call(SetNpcAnimation, NPC_Kooper, ANIM_WorldKooper_CelebrateLoop) + Call(InterpNpcYaw, NPC_Kooper, 270, 0) + Wait(10) + Call(SetNpcSpeed, NPC_Kooper, Float(8.0)) + Call(NpcMoveTo, NPC_Kooper, 75, -48, 0) + Call(SetNpcPos, NPC_Kooper, NPC_DISPOSE_LOCATION) + Call(InterpNpcYaw, NPC_Parakarry, 90, 0) + Wait(30) + Thread + Wait(10) + Call(InterpNpcYaw, NPC_Archeologist_01, 90, 0) + Call(InterpNpcYaw, NPC_Archeologist_02, 90, 0) + EndThread + Call(SpeakToPlayer, NPC_Parakarry, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 5, MSG_Outro_001F) + Wait(10) + Call(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Panic) + Call(SetNpcJumpscale, NPC_Kolorado, Float(2.0)) + Call(GetNpcPos, NPC_Kolorado, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Kolorado, LVar0, LVar1, LVar2, 5) + Call(SpeakToPlayer, NPC_Kolorado, ANIM_Kolorado_Shout, ANIM_Kolorado_Yell, 5, MSG_Outro_0020) + Wait(10) + Call(SetNpcSpeed, NPC_Kolorado, Float(8.0)) + Call(NpcMoveTo, NPC_Kolorado, 75, -48, 0) + Call(SetNpcPos, NPC_Kolorado, NPC_DISPOSE_LOCATION) + Thread + Call(UseSettingsFrom, CAM_DEFAULT, 325, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 325, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(-450.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-7.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Thread + Call(SetNpcAnimation, NPC_Parakarry, ANIM_WorldParakarry_Walk) + Call(NpcFlyTo, NPC_Parakarry, 180, 115, 26, 50, 0, EASING_LINEAR) + Call(SetNpcPos, NPC_Parakarry, NPC_DISPOSE_LOCATION) + EndThread + Thread + Wait(10) + Call(InterpNpcYaw, NPC_Archeologist_01, 270, 0) + Wait(18) + Call(InterpNpcYaw, NPC_Archeologist_01, 90, 0) + Wait(8) + Call(InterpNpcYaw, NPC_Archeologist_01, 270, 0) + Wait(8) + Call(InterpNpcYaw, NPC_Archeologist_01, 90, 0) + Wait(8) + Call(InterpNpcYaw, NPC_Archeologist_01, 270, 0) + Wait(8) + Call(InterpNpcYaw, NPC_Archeologist_01, 90, 0) + Wait(8) + Call(InterpNpcYaw, NPC_Archeologist_01, 270, 0) + Wait(30) + Call(SetNpcAnimation, NPC_Archeologist_01, ANIM_Archeologist_Walk) + Call(SetNpcSpeed, NPC_Archeologist_01, Float(2.0)) + Call(NpcMoveTo, NPC_Archeologist_01, 103, -87, 0) + EndThread + Wait(10) + Call(InterpNpcYaw, NPC_Archeologist_02, 90, 0) + Wait(18) + Call(InterpNpcYaw, NPC_Archeologist_02, 270, 0) + Wait(8) + Call(InterpNpcYaw, NPC_Archeologist_02, 90, 0) + Wait(8) + Call(InterpNpcYaw, NPC_Archeologist_02, 270, 0) + Wait(8) + Call(InterpNpcYaw, NPC_Archeologist_02, 90, 0) + Wait(8) + Call(InterpNpcYaw, NPC_Archeologist_02, 270, 0) + Wait(8) + Call(InterpNpcYaw, NPC_Archeologist_02, 90, 0) + Wait(30) + Thread + Call(SetNpcAnimation, NPC_Archeologist_02, ANIM_Archeologist_Walk) + Call(SetNpcSpeed, NPC_Archeologist_02, Float(2.0)) + Call(NpcMoveTo, NPC_Archeologist_02, 45, -87, 0) + EndThread + Wait(30) + Call(FadeOutMusic, 0, 1000) + Call(GotoMap, Ref("kmr_20"), kmr_20_ENTRY_3) + Wait(100) + Return + End }; MAP_RODATA_PAD(1, exits); EvtScript N(EVS_NpcInit_Kolorado) = { - EVT_CALL(SetNpcPos, NPC_Parakarry, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_Kooper, 120, 0, 70) - EVT_CALL(SetNpcPos, NPC_Kolorado, 120, 0, 70) - EVT_CALL(SetNpcPos, NPC_Archeologist_01, 120, 0, 70) - EVT_CALL(SetNpcPos, NPC_Archeologist_02, 120, 0, 70) - EVT_CALL(SetNpcFlagBits, NPC_Parakarry, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Kooper, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Kolorado, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Archeologist_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Archeologist_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Parakarry, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Kooper, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Kolorado, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Archeologist_01, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Archeologist_02, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerPos, NPC_DISPOSE_LOCATION) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_Scene_EpilogueDelivery))) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Parakarry, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_Kooper, 120, 0, 70) + Call(SetNpcPos, NPC_Kolorado, 120, 0, 70) + Call(SetNpcPos, NPC_Archeologist_01, 120, 0, 70) + Call(SetNpcPos, NPC_Archeologist_02, 120, 0, 70) + Call(SetNpcFlagBits, NPC_Parakarry, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Kooper, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Kolorado, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Archeologist_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Archeologist_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Parakarry, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_Kooper, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_Kolorado, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_Archeologist_01, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_Archeologist_02, NPC_FLAG_GRAVITY, FALSE) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerPos, NPC_DISPOSE_LOCATION) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_Scene_EpilogueDelivery))) + Return + End }; EvtScript N(EVS_NpcInit_Archeologist_01) = { - EVT_RETURN - EVT_END + Return + End }; NpcData N(NpcData_Epilogue)[] = { diff --git a/src/world/area_sam/sam_11/sam_11_6_pond.c b/src/world/area_sam/sam_11/sam_11_6_pond.c index dc0553a8c00..c729deaa2f4 100644 --- a/src/world/area_sam/sam_11/sam_11_6_pond.c +++ b/src/world/area_sam/sam_11/sam_11_6_pond.c @@ -93,344 +93,344 @@ s32 N(IcebergBobbingOffsets)[] = { }; EvtScript N(EVS_UpdateIceberg) = { - EVT_CALL(RandInt, 10, LVar0) - EVT_WAIT(LVar0) - EVT_USE_BUF(EVT_PTR(N(IcebergBobbingOffsets))) - EVT_LOOP(0) - EVT_BUF_READ1(LVar0) - EVT_IF_EQ(LVar0, 0x8000) - EVT_CALL(RandInt, 10, LVar0) - EVT_WAIT(LVar0) - EVT_USE_BUF(EVT_PTR(N(IcebergBobbingOffsets))) - EVT_BUF_READ1(LVar0) - EVT_END_IF - EVT_CALL(TranslateModel, LVarA, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(RandInt, 10, LVar0) + Wait(LVar0) + UseBuf(Ref(N(IcebergBobbingOffsets))) + Loop(0) + BufRead1(LVar0) + IfEq(LVar0, 0x8000) + Call(RandInt, 10, LVar0) + Wait(LVar0) + UseBuf(Ref(N(IcebergBobbingOffsets))) + BufRead1(LVar0) + EndIf + Call(TranslateModel, LVarA, 0, LVar0, 0) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_SetupIcebergs) = { - EVT_SET(LVarA, MODEL_o773) - EVT_EXEC(N(EVS_UpdateIceberg)) - EVT_SET(LVarA, MODEL_o775) - EVT_EXEC(N(EVS_UpdateIceberg)) - EVT_SET(LVarA, MODEL_o777) - EVT_EXEC(N(EVS_UpdateIceberg)) - EVT_SET(LVarA, MODEL_o778) - EVT_EXEC(N(EVS_UpdateIceberg)) - EVT_SET(LVarA, MODEL_o779) - EVT_EXEC(N(EVS_UpdateIceberg)) - EVT_SET(LVarA, MODEL_o780) - EVT_EXEC(N(EVS_UpdateIceberg)) - EVT_RETURN - EVT_END + Set(LVarA, MODEL_o773) + Exec(N(EVS_UpdateIceberg)) + Set(LVarA, MODEL_o775) + Exec(N(EVS_UpdateIceberg)) + Set(LVarA, MODEL_o777) + Exec(N(EVS_UpdateIceberg)) + Set(LVarA, MODEL_o778) + Exec(N(EVS_UpdateIceberg)) + Set(LVarA, MODEL_o779) + Exec(N(EVS_UpdateIceberg)) + Set(LVarA, MODEL_o780) + Exec(N(EVS_UpdateIceberg)) + Return + End }; EvtScript N(EVS_DamageFrozenPond_Before) = { - EVT_IF_EQ(MV_CantDamagePond, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(MV_CantDamagePond, TRUE) - EVT_ADD(GB_SAM11_FrozenPondDamage, 1) - EVT_SWITCH(GB_SAM11_FrozenPondDamage) - EVT_CASE_EQ(1) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_suimen, SOUND_SAM_POND_CRACK_1, 0) - EVT_CALL(EnableModel, MODEL_ice01, FALSE) - EVT_CALL(EnableModel, MODEL_ice02, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_PenguinPatrol, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Run) - EVT_CALL(GetNpcPos, NPC_PenguinPatrol, LVar7, LVar8, LVar9) - EVT_CALL(SetNpcSpeed, NPC_PenguinPatrol, EVT_FLOAT(9.0)) - EVT_CALL(NpcMoveTo, NPC_PenguinPatrol, -207, 110, 0) - EVT_CALL(GetAngleToNPC, NPC_PenguinPatrol, LVar0) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_CALL(AddVectorPolar, LVar1, LVar3, EVT_FLOAT(40.0), LVar0) - EVT_CALL(NpcMoveTo, NPC_PenguinPatrol, LVar1, LVar3, 0) - EVT_CALL(PlayerFaceNpc, NPC_PenguinPatrol, FALSE) - EVT_CALL(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_00B6) - EVT_CALL(NpcMoveTo, NPC_PenguinPatrol, -207, 110, 0) - EVT_CALL(NpcMoveTo, NPC_PenguinPatrol, LVar7, LVar9, 0) - EVT_CALL(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Idle) - EVT_CALL(SetNpcFlagBits, NPC_PenguinPatrol, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CASE_EQ(2) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterruptUsePartner) - EVT_CALL(PlaySoundAtCollider, COLLIDER_suimen, SOUND_SAM_POND_CRACK_2, 0) - EVT_CALL(EnableModel, MODEL_ice02, FALSE) - EVT_CALL(EnableModel, MODEL_ice03, TRUE) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(PlaySoundAtNpc, NPC_PenguinPatrol, SOUND_PENGUIN_WHISTLE, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_CALL(SetNpcFlagBits, NPC_PenguinPatrol, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Run) - EVT_CALL(GetNpcPos, NPC_PenguinPatrol, LVar7, LVar8, LVar9) - EVT_CALL(SetNpcSpeed, NPC_PenguinPatrol, EVT_FLOAT(9.0)) - EVT_CALL(NpcMoveTo, NPC_PenguinPatrol, -207, 110, 0) - EVT_CALL(GetAngleToNPC, NPC_PenguinPatrol, LVar0) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_CALL(AddVectorPolar, LVar1, LVar3, EVT_FLOAT(40.0), LVar0) - EVT_CALL(NpcMoveTo, NPC_PenguinPatrol, LVar1, LVar3, 0) - EVT_CALL(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Idle) - EVT_CALL(PlayerFaceNpc, NPC_PenguinPatrol, FALSE) - EVT_CALL(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_00B7) - EVT_CALL(SetNpcFlagBits, NPC_PenguinPatrol, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Walk) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 20) - EVT_CALL(NpcMoveTo, NPC_PenguinPatrol, LVar0, LVar2, 0) - EVT_THREAD - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(PlaySoundAtPlayer, SOUND_DRAG_PLAYER, SOUND_SPACE_DEFAULT) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Thrown) - EVT_SET(MF_Unk_01, FALSE) - EVT_LOOP(0) - EVT_IF_EQ(MF_Unk_01, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(GetAngleToPlayer, NPC_PenguinPatrol, LVar0) - EVT_CALL(GetNpcPos, NPC_PenguinPatrol, LVar1, LVar2, LVar3) - EVT_CALL(AddVectorPolar, LVar1, LVar3, EVT_FLOAT(20.0), LVar0) - EVT_CALL(SetPlayerPos, LVar1, 0, LVar3) - EVT_CALL(N(SetDraggingPlayerPosY)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetNpcSpeed, NPC_PenguinPatrol, EVT_FLOAT(3.8)) - EVT_CALL(NpcMoveTo, NPC_PenguinPatrol, -207, 110, 0) - EVT_CALL(NpcMoveTo, NPC_PenguinPatrol, -450, 0, 0) - EVT_SET(MF_Unk_01, TRUE) - EVT_CALL(StopSound, SOUND_DRAG_PLAYER) - EVT_CALL(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Idle) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Surprise) - EVT_CALL(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_00B8) - EVT_CALL(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Walk) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 45) - EVT_CALL(NpcMoveTo, NPC_PenguinPatrol, LVar0, LVar2, 0) - EVT_CALL(InterpNpcYaw, NPC_PenguinPatrol, 270, 0) - EVT_WAIT(10) - EVT_ADD(LVar0, -20) - EVT_CALL(NpcMoveTo, NPC_PenguinPatrol, LVar0, LVar2, 0) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtNpc, NPC_PenguinPatrol, SOUND_TOSS_PLAYER, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_SET(MV_ThrownOut, 1) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Thrown) - EVT_CALL(PlayerJump1, -680, 50, 0, 30) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Idle) - EVT_CALL(SetNpcFlagBits, NPC_PenguinPatrol, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_GRAVITY, FALSE) - EVT_WAIT(15) - EVT_SET(GB_SAM11_FrozenPondDamage, 0) - EVT_CALL(GotoMap, EVT_PTR("sam_02"), sam_02_ENTRY_3) - EVT_END_SWITCH - EVT_RETURN - EVT_END + IfEq(MV_CantDamagePond, TRUE) + Return + EndIf + Set(MV_CantDamagePond, TRUE) + Add(GB_SAM11_FrozenPondDamage, 1) + Switch(GB_SAM11_FrozenPondDamage) + CaseEq(1) + Call(DisablePlayerInput, TRUE) + Call(PlaySoundAtCollider, COLLIDER_suimen, SOUND_SAM_POND_CRACK_1, 0) + Call(EnableModel, MODEL_ice01, FALSE) + Call(EnableModel, MODEL_ice02, TRUE) + Call(SetNpcFlagBits, NPC_PenguinPatrol, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Run) + Call(GetNpcPos, NPC_PenguinPatrol, LVar7, LVar8, LVar9) + Call(SetNpcSpeed, NPC_PenguinPatrol, Float(9.0)) + Call(NpcMoveTo, NPC_PenguinPatrol, -207, 110, 0) + Call(GetAngleToNPC, NPC_PenguinPatrol, LVar0) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + Call(AddVectorPolar, LVar1, LVar3, Float(40.0), LVar0) + Call(NpcMoveTo, NPC_PenguinPatrol, LVar1, LVar3, 0) + Call(PlayerFaceNpc, NPC_PenguinPatrol, FALSE) + Call(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_00B6) + Call(NpcMoveTo, NPC_PenguinPatrol, -207, 110, 0) + Call(NpcMoveTo, NPC_PenguinPatrol, LVar7, LVar9, 0) + Call(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Idle) + Call(SetNpcFlagBits, NPC_PenguinPatrol, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_GRAVITY, FALSE) + Call(DisablePlayerInput, FALSE) + CaseEq(2) + Call(DisablePlayerInput, TRUE) + Call(InterruptUsePartner) + Call(PlaySoundAtCollider, COLLIDER_suimen, SOUND_SAM_POND_CRACK_2, 0) + Call(EnableModel, MODEL_ice02, FALSE) + Call(EnableModel, MODEL_ice03, TRUE) + Thread + Wait(10) + Call(PlaySoundAtNpc, NPC_PenguinPatrol, SOUND_PENGUIN_WHISTLE, SOUND_SPACE_DEFAULT) + EndThread + Call(SetNpcFlagBits, NPC_PenguinPatrol, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Run) + Call(GetNpcPos, NPC_PenguinPatrol, LVar7, LVar8, LVar9) + Call(SetNpcSpeed, NPC_PenguinPatrol, Float(9.0)) + Call(NpcMoveTo, NPC_PenguinPatrol, -207, 110, 0) + Call(GetAngleToNPC, NPC_PenguinPatrol, LVar0) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + Call(AddVectorPolar, LVar1, LVar3, Float(40.0), LVar0) + Call(NpcMoveTo, NPC_PenguinPatrol, LVar1, LVar3, 0) + Call(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Idle) + Call(PlayerFaceNpc, NPC_PenguinPatrol, FALSE) + Call(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_00B7) + Call(SetNpcFlagBits, NPC_PenguinPatrol, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Walk) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar0, 20) + Call(NpcMoveTo, NPC_PenguinPatrol, LVar0, LVar2, 0) + Thread + Call(DisablePlayerPhysics, TRUE) + Call(PlaySoundAtPlayer, SOUND_DRAG_PLAYER, SOUND_SPACE_DEFAULT) + Call(InterpPlayerYaw, 90, 0) + Call(SetPlayerAnimation, ANIM_MarioW2_Thrown) + Set(MF_Unk_01, FALSE) + Loop(0) + IfEq(MF_Unk_01, TRUE) + BreakLoop + EndIf + Call(GetAngleToPlayer, NPC_PenguinPatrol, LVar0) + Call(GetNpcPos, NPC_PenguinPatrol, LVar1, LVar2, LVar3) + Call(AddVectorPolar, LVar1, LVar3, Float(20.0), LVar0) + Call(SetPlayerPos, LVar1, 0, LVar3) + Call(N(SetDraggingPlayerPosY)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + Call(SetNpcSpeed, NPC_PenguinPatrol, Float(3.8)) + Call(NpcMoveTo, NPC_PenguinPatrol, -207, 110, 0) + Call(NpcMoveTo, NPC_PenguinPatrol, -450, 0, 0) + Set(MF_Unk_01, TRUE) + Call(StopSound, SOUND_DRAG_PLAYER) + Call(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Idle) + Call(SetPlayerAnimation, ANIM_MarioW2_Surprise) + Call(SpeakToPlayer, NPC_PenguinPatrol, ANIM_PenguinPatrol_Talk, ANIM_PenguinPatrol_Idle, 0, MSG_CH7_00B8) + Call(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Walk) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 45) + Call(NpcMoveTo, NPC_PenguinPatrol, LVar0, LVar2, 0) + Call(InterpNpcYaw, NPC_PenguinPatrol, 270, 0) + Wait(10) + Add(LVar0, -20) + Call(NpcMoveTo, NPC_PenguinPatrol, LVar0, LVar2, 0) + Wait(10) + Call(PlaySoundAtNpc, NPC_PenguinPatrol, SOUND_TOSS_PLAYER, SOUND_SPACE_DEFAULT) + Thread + Set(MV_ThrownOut, 1) + Call(SetPlayerJumpscale, Float(1.0)) + Call(SetPlayerAnimation, ANIM_MarioW2_Thrown) + Call(PlayerJump1, -680, 50, 0, 30) + EndThread + Call(SetNpcAnimation, NPC_PenguinPatrol, ANIM_PenguinPatrol_Idle) + Call(SetNpcFlagBits, NPC_PenguinPatrol, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_GRAVITY, FALSE) + Wait(15) + Set(GB_SAM11_FrozenPondDamage, 0) + Call(GotoMap, Ref("sam_02"), sam_02_ENTRY_3) + EndSwitch + Return + End }; EvtScript N(EVS_BlastPond_Before) = { - EVT_CALL(N(GetBombetteExplodeGround), LVar0) - EVT_IF_NE(LVar0, COLLIDER_suimen) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LE(LVar0, -280) - EVT_RETURN - EVT_END_IF - EVT_IF_GE(LVar0, 280) - EVT_RETURN - EVT_END_IF - EVT_IF_LE(LVar2, -60) - EVT_RETURN - EVT_END_IF - EVT_IF_GE(LVar2, 460) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_DamageFrozenPond_Before)) - EVT_WAIT(60) - EVT_SET(MV_CantDamagePond, FALSE) - EVT_RETURN - EVT_END + Call(N(GetBombetteExplodeGround), LVar0) + IfNe(LVar0, COLLIDER_suimen) + Return + EndIf + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLe(LVar0, -280) + Return + EndIf + IfGe(LVar0, 280) + Return + EndIf + IfLe(LVar2, -60) + Return + EndIf + IfGe(LVar2, 460) + Return + EndIf + ExecWait(N(EVS_DamageFrozenPond_Before)) + Wait(60) + Set(MV_CantDamagePond, FALSE) + Return + End }; EvtScript N(EVS_TouchPond_Before) = { - EVT_CALL(GetPlayerActionState, LVar0) - EVT_IF_NE(LVar0, ACTION_STATE_SPIN_POUND) - EVT_IF_NE(LVar0, ACTION_STATE_TORNADO_POUND) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_DamageFrozenPond_Before)) - EVT_LABEL(0) - EVT_CALL(GetPlayerActionState, LVar0) - EVT_WAIT(1) - EVT_IF_NE(LVar0, ACTION_STATE_IDLE) - EVT_GOTO(0) - EVT_END_IF - EVT_SET(MV_CantDamagePond, FALSE) - EVT_RETURN - EVT_END + Call(GetPlayerActionState, LVar0) + IfNe(LVar0, ACTION_STATE_SPIN_POUND) + IfNe(LVar0, ACTION_STATE_TORNADO_POUND) + Return + EndIf + EndIf + ExecWait(N(EVS_DamageFrozenPond_Before)) + Label(0) + Call(GetPlayerActionState, LVar0) + Wait(1) + IfNe(LVar0, ACTION_STATE_IDLE) + Goto(0) + EndIf + Set(MV_CantDamagePond, FALSE) + Return + End }; EvtScript N(EVS_DamageFrozenPond_After) = { - EVT_IF_EQ(MV_CantDamagePond, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(MV_CantDamagePond, TRUE) - EVT_ADD(GB_SAM11_FrozenPondDamage, 1) - EVT_IF_NE(GB_SAM11_FrozenPondDamage, 3) - EVT_SWITCH(GB_SAM11_FrozenPondDamage) - EVT_CASE_EQ(1) - EVT_CALL(PlaySoundAtCollider, COLLIDER_suimen, SOUND_SAM_POND_CRACK_1, 0) - EVT_CALL(EnableModel, MODEL_ice01, FALSE) - EVT_CALL(EnableModel, MODEL_ice02, TRUE) - EVT_CASE_EQ(2) - EVT_CALL(PlaySoundAtCollider, COLLIDER_suimen, SOUND_SAM_POND_CRACK_2, 0) - EVT_CALL(EnableModel, MODEL_ice02, FALSE) - EVT_CALL(EnableModel, MODEL_ice03, TRUE) - EVT_END_SWITCH - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterruptUsePartner) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(1.0)) - EVT_CALL(IsPlayerWithin, 0, 210, 240, LVarA) - EVT_IF_EQ(LVarA, 1) - EVT_THREAD - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.5)) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SitIdle) - EVT_CALL(PlayerJump1, 247, 0, 225, 30) - EVT_CALL(PlayerJump1, 257, 0, 225, 8) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtNpc, NPC_PARTNER, SOUND_FALL_LONG, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(1.5)) - EVT_CALL(NpcJump1, NPC_PARTNER, 265, 0, 225, 30) - EVT_CALL(PlaySoundAtNpc, NPC_PARTNER, SOUND_TRIP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump1, NPC_PARTNER, 275, 0, 225, 8) - EVT_CALL(EnablePartnerAI) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_LOOP(30) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar1, LVar5) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar1, LVar5) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_END_THREAD - EVT_END_IF - EVT_CALL(PlaySoundAt, SOUND_SAM_POND_SHATTER, SOUND_SPACE_DEFAULT, 0, 60, 220) - EVT_CALL(N(SpawnIceShards)) - EVT_CALL(EnableModel, MODEL_ice03, FALSE) - EVT_CALL(SetGroupVisibility, MODEL_ice04, MODEL_GROUP_VISIBLE) - EVT_CALL(EnableGroup, MODEL_sui, TRUE) - EVT_CALL(EnableGroup, MODEL_g279, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o583, TRUE) - EVT_THREAD + IfEq(MV_CantDamagePond, TRUE) + Return + EndIf + Set(MV_CantDamagePond, TRUE) + Add(GB_SAM11_FrozenPondDamage, 1) + IfNe(GB_SAM11_FrozenPondDamage, 3) + Switch(GB_SAM11_FrozenPondDamage) + CaseEq(1) + Call(PlaySoundAtCollider, COLLIDER_suimen, SOUND_SAM_POND_CRACK_1, 0) + Call(EnableModel, MODEL_ice01, FALSE) + Call(EnableModel, MODEL_ice02, TRUE) + CaseEq(2) + Call(PlaySoundAtCollider, COLLIDER_suimen, SOUND_SAM_POND_CRACK_2, 0) + Call(EnableModel, MODEL_ice02, FALSE) + Call(EnableModel, MODEL_ice03, TRUE) + EndSwitch + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(InterruptUsePartner) + Call(ShakeCam, CAM_DEFAULT, 0, 20, Float(1.0)) + Call(IsPlayerWithin, 0, 210, 240, LVarA) + IfEq(LVarA, 1) + Thread + Call(SetPlayerJumpscale, Float(1.5)) + Call(SetPlayerAnimation, ANIM_MarioW2_SitIdle) + Call(PlayerJump1, 247, 0, 225, 30) + Call(PlayerJump1, 257, 0, 225, 8) + EndThread + Thread + Call(DisablePartnerAI, 0) + Wait(1) + Call(PlaySoundAtNpc, NPC_PARTNER, SOUND_FALL_LONG, SOUND_SPACE_DEFAULT) + Call(SetNpcJumpscale, NPC_PARTNER, Float(1.5)) + Call(NpcJump1, NPC_PARTNER, 265, 0, 225, 30) + Call(PlaySoundAtNpc, NPC_PARTNER, SOUND_TRIP, SOUND_SPACE_DEFAULT) + Call(NpcJump1, NPC_PARTNER, 275, 0, 225, 8) + Call(EnablePartnerAI) + EndThread + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Loop(30) + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Call(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar1, LVar5) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar3, LVar1, LVar5) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + EndLoop + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + EndThread + EndIf + Call(PlaySoundAt, SOUND_SAM_POND_SHATTER, SOUND_SPACE_DEFAULT, 0, 60, 220) + Call(N(SpawnIceShards)) + Call(EnableModel, MODEL_ice03, FALSE) + Call(SetGroupVisibility, MODEL_ice04, MODEL_GROUP_VISIBLE) + Call(EnableGroup, MODEL_sui, TRUE) + Call(EnableGroup, MODEL_g279, TRUE) + Call(EnableTexPanning, MODEL_o583, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 70, 60, 60, -100) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_EXEC(N(EVS_LoadPondAnimation)) - EVT_WAIT(60) - EVT_CALL(SetGroupVisibility, MODEL_ice04, MODEL_GROUP_HIDDEN) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_ike, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilitp, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o657, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o658, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o660, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o661, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o662, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o663, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o356, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilitp, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o356, COLLIDER_FLAG_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitp, COLLIDER_FLAG_IGNORE_SHELL | COLLIDER_FLAG_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_suimen, SURFACE_TYPE_WATER) - EVT_EXEC(N(EVS_SetupIcebergs)) - EVT_SET(GB_SAM11_FrozenPondDamage, 4) - EVT_SET(GB_StoryProgress, STORY_CH7_SHATTERED_FROZEN_POND) - EVT_IF_EQ(LVarA, 1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_DustOff) - EVT_WAIT(7) - EVT_CALL(PlaySoundAtPlayer, SOUND_DUST_OFF, SOUND_SPACE_DEFAULT) - EVT_WAIT(8) - EVT_CALL(PlaySoundAtPlayer, SOUND_DUST_OFF, SOUND_SPACE_DEFAULT) - EVT_WAIT(15) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(1) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Exec(N(EVS_LoadPondAnimation)) + Wait(60) + Call(SetGroupVisibility, MODEL_ice04, MODEL_GROUP_HIDDEN) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_ike, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilitp, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o657, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o658, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o660, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o661, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o662, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o663, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o356, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilitp, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o356, COLLIDER_FLAG_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitp, COLLIDER_FLAG_IGNORE_SHELL | COLLIDER_FLAG_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_suimen, SURFACE_TYPE_WATER) + Exec(N(EVS_SetupIcebergs)) + Set(GB_SAM11_FrozenPondDamage, 4) + Set(GB_StoryProgress, STORY_CH7_SHATTERED_FROZEN_POND) + IfEq(LVarA, 1) + Call(SetPlayerAnimation, ANIM_Mario1_DustOff) + Wait(7) + Call(PlaySoundAtPlayer, SOUND_DUST_OFF, SOUND_SPACE_DEFAULT) + Wait(8) + Call(PlaySoundAtPlayer, SOUND_DUST_OFF, SOUND_SPACE_DEFAULT) + Wait(15) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(1) + EndIf + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_BlastPond_After) = { - EVT_CALL(N(GetBombetteExplodeGround), LVar0) - EVT_IF_NE(LVar0, COLLIDER_suimen) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LE(LVar0, -280) - EVT_RETURN - EVT_END_IF - EVT_IF_GE(LVar0, 280) - EVT_RETURN - EVT_END_IF - EVT_IF_LE(LVar2, -60) - EVT_RETURN - EVT_END_IF - EVT_IF_GE(LVar2, 460) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_DamageFrozenPond_After)) - EVT_WAIT(60) - EVT_SET(MV_CantDamagePond, FALSE) - EVT_RETURN - EVT_END + Call(N(GetBombetteExplodeGround), LVar0) + IfNe(LVar0, COLLIDER_suimen) + Return + EndIf + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLe(LVar0, -280) + Return + EndIf + IfGe(LVar0, 280) + Return + EndIf + IfLe(LVar2, -60) + Return + EndIf + IfGe(LVar2, 460) + Return + EndIf + ExecWait(N(EVS_DamageFrozenPond_After)) + Wait(60) + Set(MV_CantDamagePond, FALSE) + Return + End }; EvtScript N(EVS_TouchPond_After) = { - EVT_IF_EQ(GB_SAM11_FrozenPondDamage, 4) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPlayerActionState, LVar0) - EVT_IF_NE(LVar0, ACTION_STATE_SPIN_POUND) - EVT_IF_NE(LVar0, ACTION_STATE_TORNADO_POUND) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_DamageFrozenPond_After)) - EVT_LABEL(0) - EVT_CALL(GetPlayerActionState, LVar0) - EVT_WAIT(1) - EVT_IF_NE(LVar0, ACTION_STATE_IDLE) - EVT_GOTO(0) - EVT_END_IF - EVT_SET(MV_CantDamagePond, FALSE) - EVT_RETURN - EVT_END + IfEq(GB_SAM11_FrozenPondDamage, 4) + Return + EndIf + Call(GetPlayerActionState, LVar0) + IfNe(LVar0, ACTION_STATE_SPIN_POUND) + IfNe(LVar0, ACTION_STATE_TORNADO_POUND) + Return + EndIf + EndIf + ExecWait(N(EVS_DamageFrozenPond_After)) + Label(0) + Call(GetPlayerActionState, LVar0) + Wait(1) + IfNe(LVar0, ACTION_STATE_IDLE) + Goto(0) + EndIf + Set(MV_CantDamagePond, FALSE) + Return + End }; // @bug radius is f32 here, should be s32 @@ -440,86 +440,86 @@ BombTriggerF N(BombTrigger_Pond) = { }; EvtScript N(EVS_SetupPond) = { - EVT_CALL(EnableGroup, MODEL_sui, FALSE) - EVT_CALL(EnableGroup, MODEL_g279, FALSE) - EVT_CALL(EnableModel, MODEL_ice00, FALSE) - EVT_CALL(EnableModel, MODEL_ice01, FALSE) - EVT_CALL(EnableModel, MODEL_ice02, FALSE) - EVT_CALL(EnableModel, MODEL_ice03, FALSE) - EVT_CALL(SetGroupVisibility, MODEL_ice04, MODEL_GROUP_HIDDEN) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o657, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o658, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o660, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o661, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o662, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o663, COLLIDER_FLAGS_UPPER_MASK) - EVT_IF_LT(GB_StoryProgress, STORY_CH7_SHATTERED_FROZEN_POND) - EVT_SWITCH(GB_SAM11_FrozenPondDamage) - EVT_CASE_EQ(0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ike, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_ice01, TRUE) - EVT_CASE_EQ(1) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ike, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_ice02, TRUE) - EVT_CASE_EQ(2) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ike, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_ice03, TRUE) - EVT_CASE_EQ(3) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ike, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetGroupVisibility, MODEL_ice04, MODEL_GROUP_VISIBLE) - EVT_CASE_EQ(4) - EVT_CALL(EnableGroup, MODEL_sui, TRUE) - EVT_CALL(EnableGroup, MODEL_g279, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o583, TRUE) - EVT_THREAD + Call(EnableGroup, MODEL_sui, FALSE) + Call(EnableGroup, MODEL_g279, FALSE) + Call(EnableModel, MODEL_ice00, FALSE) + Call(EnableModel, MODEL_ice01, FALSE) + Call(EnableModel, MODEL_ice02, FALSE) + Call(EnableModel, MODEL_ice03, FALSE) + Call(SetGroupVisibility, MODEL_ice04, MODEL_GROUP_HIDDEN) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o657, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o658, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o660, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o661, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o662, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o663, COLLIDER_FLAGS_UPPER_MASK) + IfLt(GB_StoryProgress, STORY_CH7_SHATTERED_FROZEN_POND) + Switch(GB_SAM11_FrozenPondDamage) + CaseEq(0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ike, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_ice01, TRUE) + CaseEq(1) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ike, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_ice02, TRUE) + CaseEq(2) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ike, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_ice03, TRUE) + CaseEq(3) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ike, COLLIDER_FLAGS_UPPER_MASK) + Call(SetGroupVisibility, MODEL_ice04, MODEL_GROUP_VISIBLE) + CaseEq(4) + Call(EnableGroup, MODEL_sui, TRUE) + Call(EnableGroup, MODEL_g279, TRUE) + Call(EnableTexPanning, MODEL_o583, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 70, 60, 60, -100) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o657, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o658, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o660, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o661, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o662, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o663, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_SetupIcebergs)) - EVT_END_SWITCH - EVT_ELSE - EVT_CALL(EnableGroup, MODEL_sui, TRUE) - EVT_CALL(EnableGroup, MODEL_g279, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o583, TRUE) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o657, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o658, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o660, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o661, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o662, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o663, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_SetupIcebergs)) + EndSwitch + Else + Call(EnableGroup, MODEL_sui, TRUE) + Call(EnableGroup, MODEL_g279, TRUE) + Call(EnableTexPanning, MODEL_o583, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 70, 60, 60, -100) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o657, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o658, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o660, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o661, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o662, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o663, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_SetupIcebergs)) - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH7_MAYOR_MURDER_MYSTERY) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BlastPond_Before)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombTrigger_Pond)), 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_TouchPond_Before)), TRIGGER_FLOOR_TOUCH, COLLIDER_suimen, 1, 0) - EVT_ELSE - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BlastPond_After)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombTrigger_Pond)), 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_TouchPond_After)), TRIGGER_FLOOR_TOUCH, COLLIDER_suimen, 1, 0) - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH7_SHATTERED_FROZEN_POND) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitp, COLLIDER_FLAGS_UPPER_MASK) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o356, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilitp, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o356, COLLIDER_FLAG_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitp, COLLIDER_FLAG_IGNORE_SHELL | COLLIDER_FLAG_DOCK_WALL) - EVT_END_IF - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o657, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o658, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o660, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o661, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o662, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o663, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_SetupIcebergs)) + EndIf + IfLt(GB_StoryProgress, STORY_CH7_MAYOR_MURDER_MYSTERY) + BindTrigger(Ref(N(EVS_BlastPond_Before)), TRIGGER_POINT_BOMB, Ref(N(BombTrigger_Pond)), 1, 0) + BindTrigger(Ref(N(EVS_TouchPond_Before)), TRIGGER_FLOOR_TOUCH, COLLIDER_suimen, 1, 0) + Else + BindTrigger(Ref(N(EVS_BlastPond_After)), TRIGGER_POINT_BOMB, Ref(N(BombTrigger_Pond)), 1, 0) + BindTrigger(Ref(N(EVS_TouchPond_After)), TRIGGER_FLOOR_TOUCH, COLLIDER_suimen, 1, 0) + EndIf + IfLt(GB_StoryProgress, STORY_CH7_SHATTERED_FROZEN_POND) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitp, COLLIDER_FLAGS_UPPER_MASK) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o356, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_deilitp, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o356, COLLIDER_FLAG_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitp, COLLIDER_FLAG_IGNORE_SHELL | COLLIDER_FLAG_DOCK_WALL) + EndIf + Return + End }; diff --git a/src/world/area_sam/sam_11/sam_11_7_staircase.c b/src/world/area_sam/sam_11/sam_11_7_staircase.c index 46997233c70..fceaacbffa4 100644 --- a/src/world/area_sam/sam_11/sam_11_7_staircase.c +++ b/src/world/area_sam/sam_11/sam_11_7_staircase.c @@ -1,99 +1,99 @@ #include "sam_11.h" EvtScript N(EVS_LowerStaircase) = { - EVT_CALL(EnableModel, MODEL_ana, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ana, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(TranslateModel, MODEL_o733, 0, 0, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o525, COLLIDER_FLAGS_UPPER_MASK) - EVT_THREAD - EVT_CALL(PlaySoundAtCollider, COLLIDER_o525, SOUND_SAM_DROP_STAIR, 0) - EVT_WAIT(11) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o525, SOUND_SAM_DROP_STAIR, 0) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o525, SOUND_SAM_DROP_STAIR, 0) - EVT_WAIT(11) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o525, SOUND_SAM_DROP_STAIR, 0) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o525, SOUND_SAM_DROP_STAIR, 0) - EVT_WAIT(11) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o525, SOUND_SAM_DROP_STAIR, 0) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o525, SOUND_SAM_DROP_STAIR, 0) - EVT_WAIT(11) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o525, SOUND_SAM_DROP_STAIR, 0) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o525, SOUND_SAM_DROP_STAIR, 0) - EVT_WAIT(11) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o525, SOUND_SAM_DROP_STAIR, 0) - EVT_WAIT(1) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 25, 0, 12, EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o769, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 50, 0, 24, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o729, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 75, 0, 36, EASING_LINEAR) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o730, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 100, 0, 48, EASING_LINEAR) - EVT_LABEL(3) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o731, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(3) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(1) - EVT_CALL(MakeLerp, 125, 0, 60, EASING_LINEAR) - EVT_LABEL(4) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o732, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(4) - EVT_END_IF - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_ana, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ana, COLLIDER_FLAGS_UPPER_MASK) + Call(TranslateModel, MODEL_o733, 0, 0, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o525, COLLIDER_FLAGS_UPPER_MASK) + Thread + Call(PlaySoundAtCollider, COLLIDER_o525, SOUND_SAM_DROP_STAIR, 0) + Wait(11) + Call(PlaySoundAtCollider, COLLIDER_o525, SOUND_SAM_DROP_STAIR, 0) + Wait(1) + Call(PlaySoundAtCollider, COLLIDER_o525, SOUND_SAM_DROP_STAIR, 0) + Wait(11) + Call(PlaySoundAtCollider, COLLIDER_o525, SOUND_SAM_DROP_STAIR, 0) + Wait(1) + Call(PlaySoundAtCollider, COLLIDER_o525, SOUND_SAM_DROP_STAIR, 0) + Wait(11) + Call(PlaySoundAtCollider, COLLIDER_o525, SOUND_SAM_DROP_STAIR, 0) + Wait(1) + Call(PlaySoundAtCollider, COLLIDER_o525, SOUND_SAM_DROP_STAIR, 0) + Wait(11) + Call(PlaySoundAtCollider, COLLIDER_o525, SOUND_SAM_DROP_STAIR, 0) + Wait(1) + Call(PlaySoundAtCollider, COLLIDER_o525, SOUND_SAM_DROP_STAIR, 0) + Wait(11) + Call(PlaySoundAtCollider, COLLIDER_o525, SOUND_SAM_DROP_STAIR, 0) + Wait(1) + EndThread + Thread + Call(MakeLerp, 25, 0, 12, EASING_LINEAR) + Label(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o769, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + EndThread + Thread + Call(MakeLerp, 50, 0, 24, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o729, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + EndThread + Thread + Call(MakeLerp, 75, 0, 36, EASING_LINEAR) + Label(2) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o730, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(2) + EndIf + EndThread + Thread + Call(MakeLerp, 100, 0, 48, EASING_LINEAR) + Label(3) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o731, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(3) + EndIf + EndThread + Wait(1) + Call(MakeLerp, 125, 0, 60, EASING_LINEAR) + Label(4) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o732, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(4) + EndIf + Return + End }; EvtScript N(EVS_SetupStaircase) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_SPOKE_WITH_HERRINGWAY) - EVT_CALL(TranslateModel, MODEL_o769, 0, 25, 0) - EVT_CALL(TranslateModel, MODEL_o729, 0, 50, 0) - EVT_CALL(TranslateModel, MODEL_o730, 0, 75, 0) - EVT_CALL(TranslateModel, MODEL_o731, 0, 100, 0) - EVT_CALL(TranslateModel, MODEL_o732, 0, 125, 0) - EVT_CALL(TranslateModel, MODEL_o733, NPC_DISPOSE_LOCATION) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o525, COLLIDER_FLAGS_UPPER_MASK) - EVT_CASE_GE(STORY_CH7_SPOKE_WITH_HERRINGWAY) - EVT_CALL(EnableModel, MODEL_ana, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ana, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_SPOKE_WITH_HERRINGWAY) + Call(TranslateModel, MODEL_o769, 0, 25, 0) + Call(TranslateModel, MODEL_o729, 0, 50, 0) + Call(TranslateModel, MODEL_o730, 0, 75, 0) + Call(TranslateModel, MODEL_o731, 0, 100, 0) + Call(TranslateModel, MODEL_o732, 0, 125, 0) + Call(TranslateModel, MODEL_o733, NPC_DISPOSE_LOCATION) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o525, COLLIDER_FLAGS_UPPER_MASK) + CaseGe(STORY_CH7_SPOKE_WITH_HERRINGWAY) + Call(EnableModel, MODEL_ana, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ana, COLLIDER_FLAGS_UPPER_MASK) + EndSwitch + Return + End }; diff --git a/src/world/area_sam/sam_12/sam_12_1_music.c b/src/world/area_sam/sam_12/sam_12_1_music.c index 9b1f818197c..dfdeaf74475 100644 --- a/src/world/area_sam/sam_12/sam_12_1_music.c +++ b/src/world/area_sam/sam_12/sam_12_1_music.c @@ -1,7 +1,7 @@ #include "sam_12.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_MERLAR_THEME, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_MERLAR_THEME, 0, 8) + Return + End }; diff --git a/src/world/area_sam/sam_12/sam_12_2_main.c b/src/world/area_sam/sam_12/sam_12_2_main.c index cc6371993e3..6db783bed57 100644 --- a/src/world/area_sam/sam_12/sam_12_2_main.c +++ b/src/world/area_sam/sam_12/sam_12_2_main.c @@ -3,25 +3,25 @@ EvtScript N(EVS_ExitWalk_sam_10_2) = EVT_EXIT_WALK_NOK(60, sam_12_ENTRY_0, "sam_10", sam_10_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sam_10_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sam_10_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_SHIVER_MOUNTAIN) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_LT(GB_StoryProgress, STORY_CH7_GOT_STAR_STONE) - EVT_EXEC(N(EVS_Scene_MeetMerlar)) - EVT_END_IF - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_SHIVER_MOUNTAIN) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupMusic)) + IfLt(GB_StoryProgress, STORY_CH7_GOT_STAR_STONE) + Exec(N(EVS_Scene_MeetMerlar)) + EndIf + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Return + End }; diff --git a/src/world/area_sam/sam_12/sam_12_3_npc.c b/src/world/area_sam/sam_12/sam_12_3_npc.c index 0222a1d6ed1..30ea2f1c015 100644 --- a/src/world/area_sam/sam_12/sam_12_3_npc.c +++ b/src/world/area_sam/sam_12/sam_12_3_npc.c @@ -3,11 +3,11 @@ #include "world/common/npc/Merlar.inc.c" EvtScript N(EVS_NpcInit_Merlar) = { - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_Merlar))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Merlar))) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_Merlar))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Merlar))) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Return + End }; NpcData N(NpcData_Merlar) = { diff --git a/src/world/area_sam/sam_12/sam_12_4_scenes.c b/src/world/area_sam/sam_12/sam_12_4_scenes.c index 223cc82de3f..3cdadd03ddd 100644 --- a/src/world/area_sam/sam_12/sam_12_4_scenes.c +++ b/src/world/area_sam/sam_12/sam_12_4_scenes.c @@ -49,213 +49,213 @@ API_CALLABLE(N(SpawnSleepBubble)) { } s32 N(FlickeringStaticAmts)[] = { - EVT_FLOAT(50.0), - EVT_FLOAT(80.0), - EVT_FLOAT(70.0), - EVT_FLOAT(60.0), - EVT_FLOAT(50.0), + Float(50.0), + Float(80.0), + Float(70.0), + Float(60.0), + Float(50.0), }; EvtScript N(EVS_MerlarFlickering) = { - EVT_LABEL(0) - EVT_CALL(RandInt, 90, LVar0) - EVT_ADD(LVar0, 30) - EVT_WAIT(LVar0) - EVT_CALL(RandInt, 100, LVar1) - EVT_IF_LT(LVar1, 80) - EVT_SET(LVar1, 1) - EVT_ELSE - EVT_SET(LVar1, 2) - EVT_END_IF - EVT_LOOP(LVar1) - EVT_USE_BUF(EVT_PTR(N(FlickeringStaticAmts))) - EVT_LOOP(5) - EVT_BUF_READ1(LVar0) - EVT_CALL(SetNpcImgFXParams, NPC_Merlar, IMGFX_HOLOGRAM, EVT_FLOAT(0.0), LVar0, EVT_FLOAT(200.0), EVT_FLOAT(100.0)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcImgFXParams, NPC_Merlar, IMGFX_HOLOGRAM, EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(100.0)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(RandInt, 90, LVar0) + Add(LVar0, 30) + Wait(LVar0) + Call(RandInt, 100, LVar1) + IfLt(LVar1, 80) + Set(LVar1, 1) + Else + Set(LVar1, 2) + EndIf + Loop(LVar1) + UseBuf(Ref(N(FlickeringStaticAmts))) + Loop(5) + BufRead1(LVar0) + Call(SetNpcImgFXParams, NPC_Merlar, IMGFX_HOLOGRAM, Float(0.0), LVar0, Float(200.0), Float(100.0)) + Wait(1) + EndLoop + Call(SetNpcImgFXParams, NPC_Merlar, IMGFX_HOLOGRAM, Float(0.0), Float(0.0), Float(0.0), Float(100.0)) + Wait(1) + EndLoop + Goto(0) + Return + End }; EvtScript N(EVS_SpawnStarStoneSparkles) = { - EVT_CALL(PlaySoundAt, SOUND_STAR_SPIRIT_DEPART_1, SOUND_SPACE_DEFAULT, 230, 30, 0) - EVT_LABEL(0) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 2, 230, 30, 0, 30) - EVT_WAIT(20) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(PlaySoundAt, SOUND_STAR_SPIRIT_DEPART_1, SOUND_SPACE_DEFAULT, 230, 30, 0) + Label(0) + PlayEffect(EFFECT_SPARKLES, 2, 230, 30, 0, 30) + Wait(20) + Goto(0) + Return + End }; EvtScript N(EVS_SpawnMerlarSparkles) = { - EVT_CALL(PlaySoundAtNpc, NPC_Merlar, SOUND_MERLAR_APPEARS, SOUND_SPACE_DEFAULT) - EVT_CALL(GetNpcPos, NPC_Merlar, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 30) - EVT_LOOP(8) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 2, LVar0, LVar1, LVar2, 30) - EVT_WAIT(10) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(PlaySoundAtNpc, NPC_Merlar, SOUND_MERLAR_APPEARS, SOUND_SPACE_DEFAULT) + Call(GetNpcPos, NPC_Merlar, LVar0, LVar1, LVar2) + Add(LVar1, 30) + Loop(8) + PlayEffect(EFFECT_SPARKLES, 2, LVar0, LVar1, LVar2, 30) + Wait(10) + EndLoop + Return + End }; EvtScript N(EVS_MarioSleeping) = { - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) - EVT_LOOP(0) - EVT_CALL(PlaySoundAtPlayer, SOUND_SNORE_INHALE_A, SOUND_SPACE_DEFAULT) - EVT_WAIT(60) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetPlayerAnimation, ANIM_MarioW2_SleepStanding) + Loop(0) + Call(PlaySoundAtPlayer, SOUND_SNORE_INHALE_A, SOUND_SPACE_DEFAULT) + Wait(60) + EndLoop + Return + End }; #define LOOPCOUNT_1 ((s32)(5 * DT) * 10) #define LOOPCOUNT_2 ((s32)(10 * DT) * 10) EvtScript N(EVS_Scene_MeetMerlar) = { - EVT_LABEL(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_IF_LT(LVar0, 0) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(InterruptUsePartner) - EVT_WAIT(20) - EVT_END_IF - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 160, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 160, 0, 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PlayerMoveTo, 90, 0, 0) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20 * DT) - EVT_EXEC_GET_TID(N(EVS_SpawnStarStoneSparkles), LVar9) - EVT_WAIT(100 * DT) - EVT_CALL(SetNpcPos, NPC_Merlar, 200, 50, 0) - EVT_EXEC(N(EVS_SpawnMerlarSparkles)) - EVT_CALL(PlaySoundAtNpc, NPC_Merlar, SOUND_RECEIVE_STAR_POWER, SOUND_SPACE_DEFAULT) - EVT_SETF(LVar0, EVT_FLOAT(0.0)) - EVT_LOOP(LOOPCOUNT_2) - EVT_ADDF(LVar0, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcImgFXParams, NPC_Merlar, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_EXEC_GET_TID(N(EVS_MerlarFlickering), LVar8) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToPlayer, NPC_Merlar, ANIM_Merlar_Talk, ANIM_Merlar_Hover, 0, MSG_CH7_0133) - EVT_CALL(GetNpcPos, NPC_Merlar, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(225.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(500.0), EVT_FLOAT(60.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Merlar, ANIM_Merlar_Talk, ANIM_Merlar_Hover, 0, MSG_CH7_0134) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 160, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-10.0)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Merlar, ANIM_Merlar_Talk, ANIM_Merlar_Hover, 0, MSG_CH7_0135) - EVT_EXEC_GET_TID(N(EVS_MarioSleeping), LVarA) - EVT_CALL(EndSpeech, NPC_Merlar, ANIM_Merlar_Talk, ANIM_Merlar_Hover, 0) - EVT_SETF(LVar0, EVT_FLOAT(0.0)) - EVT_LOOP(LOOPCOUNT_1) - EVT_ADDF(LVar0, EVT_FLOAT(255.0 / LOOPCOUNT_1)) - EVT_CALL(N(SetScreenFadeAmount), LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(N(SpawnSleepBubble), -90, 6, -5, 2, 0, LVar7) - EVT_THREAD - EVT_SET(MF_DoneFadingIn, FALSE) - EVT_SETF(LVar0, EVT_FLOAT(255.0)) - EVT_LOOP(LOOPCOUNT_2) - EVT_ADDF(LVar0, EVT_FLOAT(-255.0 / LOOPCOUNT_2)) - EVT_CALL(N(SetScreenFadeAmount), LVar0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(MF_DoneFadingIn, TRUE) - EVT_END_THREAD - EVT_CALL(ContinueSpeech, NPC_Merlar, ANIM_Merlar_Talk, ANIM_Merlar_Hover, 0, MSG_CH7_0136) - EVT_LABEL(6) - EVT_IF_EQ(MF_DoneFadingIn, FALSE) - EVT_WAIT(1) - EVT_GOTO(6) - EVT_END_IF - EVT_WAIT(30 * DT) - EVT_CALL(RemoveEffect, LVar7) - EVT_KILL_THREAD(LVarA) - EVT_CALL(PlaySoundAtPlayer, SOUND_SNAP_AWAKE_A, SOUND_SPACE_DEFAULT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_JoltAwake) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(30 * DT) - EVT_CALL(GetNpcPos, NPC_Merlar, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(225.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(500.0), EVT_FLOAT(60.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Merlar, ANIM_Merlar_Talk, ANIM_Merlar_Hover, 0, MSG_CH7_0137) - EVT_WAIT(30 * DT) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 230, 0, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(230.0), EVT_FLOAT(60.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_LOOP(5) - EVT_CALL(N(PlayRisingBubble), 232, 31, 0) - EVT_WAIT(10) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(10) - EVT_SETF(LVar0, EVT_FLOAT(0.0)) - EVT_LOOP(LOOPCOUNT_1) - EVT_ADDF(LVar0, EVT_FLOAT(31.0 / LOOPCOUNT_1)) - EVT_CALL(N(SetItemPositionF), MV_StarStoneItemID, EVT_FLOAT(230.0), LVar0, EVT_FLOAT(0.0)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPanTarget, CAM_DEFAULT, 160, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Merlar, ANIM_Merlar_Talk, ANIM_Merlar_Hover, 0, MSG_CH7_0138) - EVT_KILL_THREAD(LVar8) - EVT_KILL_THREAD(LVar9) - EVT_THREAD - EVT_SET(LVar0, 30) - EVT_LOOP(5) - EVT_SUB(LVar0, 5) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 2, 230, 30, 0, LVar0) - EVT_WAIT(20) - EVT_END_LOOP - EVT_END_THREAD - EVT_SETF(LVar0, EVT_FLOAT(100.0)) - EVT_LOOP(LOOPCOUNT_2) - EVT_ADDF(LVar0, EVT_FLOAT(-100.0 / LOOPCOUNT_2)) - EVT_CALL(SetNpcImgFXParams, NPC_Merlar, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_Merlar, NPC_DISPOSE_LOCATION) - EVT_SET(GB_StoryProgress, STORY_CH7_GOT_STAR_STONE) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Label(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + IfLt(LVar0, 0) + Goto(1) + EndIf + Call(DisablePlayerInput, TRUE) + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, PARTNER_NONE) + Call(InterruptUsePartner) + Wait(20) + EndIf + Call(UseSettingsFrom, CAM_DEFAULT, 160, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 160, 0, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetPlayerSpeed, Float(3.0 / DT)) + Call(PlayerMoveTo, 90, 0, 0) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20 * DT) + ExecGetTID(N(EVS_SpawnStarStoneSparkles), LVar9) + Wait(100 * DT) + Call(SetNpcPos, NPC_Merlar, 200, 50, 0) + Exec(N(EVS_SpawnMerlarSparkles)) + Call(PlaySoundAtNpc, NPC_Merlar, SOUND_RECEIVE_STAR_POWER, SOUND_SPACE_DEFAULT) + SetF(LVar0, Float(0.0)) + Loop(LOOPCOUNT_2) + AddF(LVar0, Float(1.0)) + Call(SetNpcImgFXParams, NPC_Merlar, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + EndLoop + ExecGetTID(N(EVS_MerlarFlickering), LVar8) + Wait(30 * DT) + Call(SpeakToPlayer, NPC_Merlar, ANIM_Merlar_Talk, ANIM_Merlar_Hover, 0, MSG_CH7_0133) + Call(GetNpcPos, NPC_Merlar, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(225.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-7.5)) + Call(SetCamPosB, CAM_DEFAULT, Float(500.0), Float(60.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Merlar, ANIM_Merlar_Talk, ANIM_Merlar_Hover, 0, MSG_CH7_0134) + Call(SetPanTarget, CAM_DEFAULT, 160, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-10.0)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Merlar, ANIM_Merlar_Talk, ANIM_Merlar_Hover, 0, MSG_CH7_0135) + ExecGetTID(N(EVS_MarioSleeping), LVarA) + Call(EndSpeech, NPC_Merlar, ANIM_Merlar_Talk, ANIM_Merlar_Hover, 0) + SetF(LVar0, Float(0.0)) + Loop(LOOPCOUNT_1) + AddF(LVar0, Float(255.0 / LOOPCOUNT_1)) + Call(N(SetScreenFadeAmount), LVar0) + Wait(1) + EndLoop + Call(N(SpawnSleepBubble), -90, 6, -5, 2, 0, LVar7) + Thread + Set(MF_DoneFadingIn, FALSE) + SetF(LVar0, Float(255.0)) + Loop(LOOPCOUNT_2) + AddF(LVar0, Float(-255.0 / LOOPCOUNT_2)) + Call(N(SetScreenFadeAmount), LVar0) + Wait(1) + EndLoop + Set(MF_DoneFadingIn, TRUE) + EndThread + Call(ContinueSpeech, NPC_Merlar, ANIM_Merlar_Talk, ANIM_Merlar_Hover, 0, MSG_CH7_0136) + Label(6) + IfEq(MF_DoneFadingIn, FALSE) + Wait(1) + Goto(6) + EndIf + Wait(30 * DT) + Call(RemoveEffect, LVar7) + KillThread(LVarA) + Call(PlaySoundAtPlayer, SOUND_SNAP_AWAKE_A, SOUND_SPACE_DEFAULT) + Call(SetPlayerAnimation, ANIM_MarioW2_JoltAwake) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(30 * DT) + Call(GetNpcPos, NPC_Merlar, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(225.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-7.5)) + Call(SetCamPosB, CAM_DEFAULT, Float(500.0), Float(60.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Merlar, ANIM_Merlar_Talk, ANIM_Merlar_Hover, 0, MSG_CH7_0137) + Wait(30 * DT) + Call(SetPanTarget, CAM_DEFAULT, 230, 0, 0) + Call(SetCamPosB, CAM_DEFAULT, Float(230.0), Float(60.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Loop(5) + Call(N(PlayRisingBubble), 232, 31, 0) + Wait(10) + EndLoop + EndThread + Wait(10) + SetF(LVar0, Float(0.0)) + Loop(LOOPCOUNT_1) + AddF(LVar0, Float(31.0 / LOOPCOUNT_1)) + Call(N(SetItemPositionF), MV_StarStoneItemID, Float(230.0), LVar0, Float(0.0)) + Wait(1) + EndLoop + Call(SetPanTarget, CAM_DEFAULT, 160, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-10.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Merlar, ANIM_Merlar_Talk, ANIM_Merlar_Hover, 0, MSG_CH7_0138) + KillThread(LVar8) + KillThread(LVar9) + Thread + Set(LVar0, 30) + Loop(5) + Sub(LVar0, 5) + PlayEffect(EFFECT_SPARKLES, 2, 230, 30, 0, LVar0) + Wait(20) + EndLoop + EndThread + SetF(LVar0, Float(100.0)) + Loop(LOOPCOUNT_2) + AddF(LVar0, Float(-100.0 / LOOPCOUNT_2)) + Call(SetNpcImgFXParams, NPC_Merlar, IMGFX_SET_ALPHA, LVar0, 0, 0, 0) + Wait(1) + EndLoop + Call(SetNpcPos, NPC_Merlar, NPC_DISPOSE_LOCATION) + Set(GB_StoryProgress, STORY_CH7_GOT_STAR_STONE) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_sam/sam_12/sam_12_5_entity.c b/src/world/area_sam/sam_12/sam_12_5_entity.c index f7a45b8bfbe..d2b8b920f6b 100644 --- a/src/world/area_sam/sam_12/sam_12_5_entity.c +++ b/src/world/area_sam/sam_12/sam_12_5_entity.c @@ -3,13 +3,13 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH7_GOT_STAR_STONE) - EVT_CALL(MakeItemEntity, ITEM_STAR_STONE, 230, 0, 0, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SAM12_Item_StarStone) - EVT_SET(MV_StarStoneItemID, LVar0) - EVT_CASE_GE(STORY_CH7_GOT_STAR_STONE) - EVT_CALL(MakeItemEntity, ITEM_STAR_STONE, 230, 31, 0, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SAM12_Item_StarStone) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH7_GOT_STAR_STONE) + Call(MakeItemEntity, ITEM_STAR_STONE, 230, 0, 0, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SAM12_Item_StarStone) + Set(MV_StarStoneItemID, LVar0) + CaseGe(STORY_CH7_GOT_STAR_STONE) + Call(MakeItemEntity, ITEM_STAR_STONE, 230, 31, 0, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SAM12_Item_StarStone) + EndSwitch + Return + End }; diff --git a/src/world/area_sbk/sbk_00/sbk_00_1_main.c b/src/world/area_sbk/sbk_00/sbk_00_1_main.c index 522a9c4a904..ef135c3cba3 100644 --- a/src/world/area_sbk/sbk_00/sbk_00_1_main.c +++ b/src/world/area_sbk/sbk_00/sbk_00_1_main.c @@ -6,25 +6,25 @@ EvtScript N(EVS_ExitWalk_sbk_01_0) = EVT_EXIT_WALK(60, sbk_00_ENTRY_1, "sbk_01", EvtScript N(EVS_ExitWalk_sbk_10_2) = EVT_EXIT_WALK(60, sbk_00_ENTRY_3, "sbk_10", sbk_10_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_01_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_10_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_01_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_10_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_00/sbk_00_3_entity.c b/src/world/area_sbk/sbk_00/sbk_00_3_entity.c index 02325a58f5f..e7d020371d3 100644 --- a/src/world/area_sbk/sbk_00/sbk_00_3_entity.c +++ b/src/world/area_sbk/sbk_00/sbk_00_3_entity.c @@ -2,10 +2,10 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -230, 0, 155, 0, ITEM_FRIGHT_JAR, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK00_ItemBlock_FrightJar) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 160, 0, 205, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK00_ItemBlock_Coin) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_YellowBlock), -230, 0, 155, 0, ITEM_FRIGHT_JAR, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK00_ItemBlock_FrightJar) + Call(MakeEntity, Ref(Entity_YellowBlock), 160, 0, 205, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK00_ItemBlock_Coin) + Return + End }; diff --git a/src/world/area_sbk/sbk_01/sbk_01_1_main.c b/src/world/area_sbk/sbk_01/sbk_01_1_main.c index e3ff5e89104..a467561d7f3 100644 --- a/src/world/area_sbk/sbk_01/sbk_01_1_main.c +++ b/src/world/area_sbk/sbk_01/sbk_01_1_main.c @@ -25,25 +25,25 @@ EvtScript N(EVS_ExitWalk_sbk_02_0) = EVT_EXIT_WALK(60, sbk_01_ENTRY_1, "sbk_02", EvtScript N(EVS_ExitWalk_sbk_11_2) = EVT_EXIT_WALK(60, sbk_01_ENTRY_3, "sbk_11", sbk_11_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_00_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_02_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_11_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_00_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_02_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_11_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_02/sbk_02_1_music.c b/src/world/area_sbk/sbk_02/sbk_02_1_music.c index 28d9e8aeb7e..0f508141fbd 100644 --- a/src/world/area_sbk/sbk_02/sbk_02_1_music.c +++ b/src/world/area_sbk/sbk_02/sbk_02_1_music.c @@ -1,14 +1,14 @@ #include "sbk_02.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(sbk_02_ENTRY_6) - EVT_CASE_OR_EQ(sbk_02_ENTRY_7) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseOrEq(sbk_02_ENTRY_6) + CaseOrEq(sbk_02_ENTRY_7) + CaseDefault + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/world/area_sbk/sbk_02/sbk_02_2_main.c b/src/world/area_sbk/sbk_02/sbk_02_2_main.c index b0578337ecf..ae8549862e8 100644 --- a/src/world/area_sbk/sbk_02/sbk_02_2_main.c +++ b/src/world/area_sbk/sbk_02/sbk_02_2_main.c @@ -7,70 +7,70 @@ EvtScript N(EVS_ExitWalk_sbk_12_2) = EVT_EXIT_WALK(60, sbk_02_ENTRY_3, "sbk_12", EvtScript N(EVS_ExitWalk_isk_01_0) = EVT_EXIT_WALK(60, sbk_02_ENTRY_4, "isk_01", isk_01_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_01_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_12_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_isk_01_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_01_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_12_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_isk_01_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(sbk_02_ENTRY_5) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_OR_EQ(sbk_02_ENTRY_6) - EVT_CASE_OR_EQ(sbk_02_ENTRY_7) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(sbk_02_ENTRY_5) + Exec(N(EVS_BindExitTriggers)) + CaseOrEq(sbk_02_ENTRY_6) + CaseOrEq(sbk_02_ENTRY_7) + Exec(N(EVS_BindExitTriggers)) + EndCaseGroup + CaseDefault + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_IF_LT(GB_StoryProgress, STORY_CH2_UNCOVERED_DRY_DRY_RUINS) - EVT_PLAY_EFFECT(EFFECT_SUN, 0, 0, 0, 0, 0, 0, 0) - EVT_SET(MV_Unk_00, LVarF) - EVT_END_IF - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_BEGAN_PEACH_MISSION) - EVT_CALL(SetMusicTrack, 0, SONG_STAR_SPIRIT_THEME, 1, 8) - EVT_ELSE - EVT_EXEC(N(EVS_SetupMusic)) - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(sbk_02_ENTRY_6) - EVT_CASE_OR_EQ(sbk_02_ENTRY_7) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_EXEC_WAIT(N(EVS_SetupRuins)) - EVT_END_SWITCH - EVT_EXEC(N(EVS_EnterMap)) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(sbk_02_ENTRY_5) - EVT_WAIT(65) - EVT_CASE_OR_EQ(sbk_02_ENTRY_6) - EVT_CASE_OR_EQ(sbk_02_ENTRY_7) - EVT_EXEC(N(EVS_Ruins_Arise_Continued)) - EVT_WAIT(3) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_WAIT(1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + IfLt(GB_StoryProgress, STORY_CH2_UNCOVERED_DRY_DRY_RUINS) + PlayEffect(EFFECT_SUN, 0, 0, 0, 0, 0, 0, 0) + Set(MV_Unk_00, LVarF) + EndIf + IfEq(GB_StoryProgress, STORY_CH2_BEGAN_PEACH_MISSION) + Call(SetMusicTrack, 0, SONG_STAR_SPIRIT_THEME, 1, 8) + Else + Exec(N(EVS_SetupMusic)) + EndIf + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseOrEq(sbk_02_ENTRY_6) + CaseOrEq(sbk_02_ENTRY_7) + EndCaseGroup + CaseDefault + ExecWait(N(EVS_SetupRuins)) + EndSwitch + Exec(N(EVS_EnterMap)) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(sbk_02_ENTRY_5) + Wait(65) + CaseOrEq(sbk_02_ENTRY_6) + CaseOrEq(sbk_02_ENTRY_7) + Exec(N(EVS_Ruins_Arise_Continued)) + Wait(3) + EndCaseGroup + CaseDefault + Wait(1) + EndSwitch + Return + End }; diff --git a/src/world/area_sbk/sbk_02/sbk_02_3_ruins.c b/src/world/area_sbk/sbk_02/sbk_02_3_ruins.c index a15af0fe2a5..61fabc90496 100644 --- a/src/world/area_sbk/sbk_02/sbk_02_3_ruins.c +++ b/src/world/area_sbk/sbk_02/sbk_02_3_ruins.c @@ -61,27 +61,27 @@ s32 N(PedestalKeyList)[] = { }; EvtScript N(EVS_Pedestal_Sink) = { - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, 0, 0, 0, 20, 10, 0, 60) - EVT_PLAY_EFFECT(EFFECT_DUST, 2, 0, 0, 0, 60) - EVT_CALL(PlaySoundAtCollider, COLLIDER_iwa, SOUND_SBK_RUINS_PEDESTAL_SINK, SOUND_SPACE_DEFAULT) - EVT_SET(LVar2, 0) - EVT_CALL(MakeLerp, 0, -50, 50, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_point_iwa, LVar2, 0, 1, 0) - EVT_CALL(TranslateModel, MODEL_point_iwa, 0, LVar0, 0) - EVT_SUB(LVar2, 10) - EVT_ADDF(LVar3, EVT_FLOAT(0.2)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_iwa, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_point_iwa, FALSE) - EVT_CALL(PlaySound, SOUND_LOOP_SBK_RUINS_WHIRLWIND) - EVT_RETURN - EVT_END + PlayEffect(EFFECT_SMOKE_IMPACT, 0, 0, 0, 0, 20, 10, 0, 60) + PlayEffect(EFFECT_DUST, 2, 0, 0, 0, 60) + Call(PlaySoundAtCollider, COLLIDER_iwa, SOUND_SBK_RUINS_PEDESTAL_SINK, SOUND_SPACE_DEFAULT) + Set(LVar2, 0) + Call(MakeLerp, 0, -50, 50, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_point_iwa, LVar2, 0, 1, 0) + Call(TranslateModel, MODEL_point_iwa, 0, LVar0, 0) + Sub(LVar2, 10) + AddF(LVar3, Float(0.2)) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_iwa, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_point_iwa, FALSE) + Call(PlaySound, SOUND_LOOP_SBK_RUINS_WHIRLWIND) + Return + End }; s32 N(ModelList_Solid)[] = { @@ -93,643 +93,643 @@ s32 N(ModelList_Translucent)[] = { }; EvtScript N(EVS_DarkenEnvironment) = { - EVT_CALL(N(SetModelTintMode), APPLY_TINT_BG, NULL, ENV_TINT_REMAP) - EVT_CALL(N(SetModelTintMode), APPLY_TINT_GROUPS, -1, ENV_TINT_REMAP) - EVT_CALL(N(SetModelTintMode), APPLY_TINT_GROUPS, EVT_PTR(N(ModelList_Solid)), ENV_TINT_NONE) - EVT_CALL(N(SetModelTintMode), APPLY_TINT_MODELS, EVT_PTR(N(ModelList_Translucent)), ENV_TINT_NONE) - EVT_CALL(N(InterpWorldEnvColor), 255, 255, 255, 0, 0, 0, 0) - EVT_WAIT(1) - EVT_CALL(N(InterpWorldEnvColor), 44, 32, 177, 0, 0, 0, 60) - EVT_RETURN - EVT_END + Call(N(SetModelTintMode), APPLY_TINT_BG, NULL, ENV_TINT_REMAP) + Call(N(SetModelTintMode), APPLY_TINT_GROUPS, -1, ENV_TINT_REMAP) + Call(N(SetModelTintMode), APPLY_TINT_GROUPS, Ref(N(ModelList_Solid)), ENV_TINT_NONE) + Call(N(SetModelTintMode), APPLY_TINT_MODELS, Ref(N(ModelList_Translucent)), ENV_TINT_NONE) + Call(N(InterpWorldEnvColor), 255, 255, 255, 0, 0, 0, 0) + Wait(1) + Call(N(InterpWorldEnvColor), 44, 32, 177, 0, 0, 0, 60) + Return + End }; EvtScript N(EVS_TexPan_SandRing) = { - EVT_CALL(SetRenderMode, MODEL_o225, RENDER_MODE_SURFACE_XLU_LAYER2) - EVT_CALL(EnableTexPanning, MODEL_o225, TRUE) - EVT_CALL(EnableTexPanning, CLONED_MODEL(0), TRUE) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_AUX, LVar1, LVar2) - EVT_ADD(LVar0, 6000) - EVT_ADD(LVar1, 5000) - EVT_ADD(LVar2, 4000) - EVT_IF_GT(LVar0, 0x20000) - EVT_SUB(LVar0, 0x20000) - EVT_END_IF - EVT_IF_GT(LVar1, 0x20000) - EVT_SUB(LVar1, 0x20000) - EVT_END_IF - EVT_IF_GT(LVar2, 0x20000) - EVT_SUB(LVar2, 0x20000) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetRenderMode, MODEL_o225, RENDER_MODE_SURFACE_XLU_LAYER2) + Call(EnableTexPanning, MODEL_o225, TRUE) + Call(EnableTexPanning, CLONED_MODEL(0), TRUE) + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Loop(0) + Call(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, LVar0, 0) + Call(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_AUX, LVar1, LVar2) + Add(LVar0, 6000) + Add(LVar1, 5000) + Add(LVar2, 4000) + IfGt(LVar0, 0x20000) + Sub(LVar0, 0x20000) + EndIf + IfGt(LVar1, 0x20000) + Sub(LVar1, 0x20000) + EndIf + IfGt(LVar2, 0x20000) + Sub(LVar2, 0x20000) + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_SandRing_Appear) = { - EVT_CALL(EnableModel, MODEL_o225, TRUE) - EVT_SET(LVar2, 0) - EVT_SET(LVar0, -100) - EVT_LOOP(100) - EVT_SET(LVar3, LVar2) - EVT_DIVF(LVar3, 80) - EVT_CALL(ScaleModel, MODEL_o225, LVar3, EVT_FLOAT(1.0), LVar3) - EVT_CALL(TranslateModel, MODEL_o225, 0, LVar0, 0) - EVT_ADD(LVar0, 1) - EVT_ADD(LVar2, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(0) - EVT_CALL(ScaleModel, MODEL_o225, LVar3, EVT_FLOAT(1.0), LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_o225, TRUE) + Set(LVar2, 0) + Set(LVar0, -100) + Loop(100) + Set(LVar3, LVar2) + DivF(LVar3, 80) + Call(ScaleModel, MODEL_o225, LVar3, Float(1.0), LVar3) + Call(TranslateModel, MODEL_o225, 0, LVar0, 0) + Add(LVar0, 1) + Add(LVar2, 1) + Wait(1) + EndLoop + Loop(0) + Call(ScaleModel, MODEL_o225, LVar3, Float(1.0), LVar3) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_SandRingClone_Appear) = { - EVT_WAIT(10) - EVT_CALL(EnableModel, CLONED_MODEL(0), TRUE) - EVT_SET(LVar2, 0) - EVT_SET(LVar0, -100) - EVT_LOOP(100) - EVT_SET(LVar3, LVar2) - EVT_DIVF(LVar3, 110) - EVT_CALL(ScaleModel, CLONED_MODEL(0), LVar3, EVT_FLOAT(1.0), LVar3) - EVT_CALL(TranslateModel, CLONED_MODEL(0), 0, LVar0, 0) - EVT_ADD(LVar0, 1) - EVT_ADD(LVar2, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(0) - EVT_CALL(ScaleModel, CLONED_MODEL(0), LVar3, EVT_FLOAT(1.0), LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Wait(10) + Call(EnableModel, CLONED_MODEL(0), TRUE) + Set(LVar2, 0) + Set(LVar0, -100) + Loop(100) + Set(LVar3, LVar2) + DivF(LVar3, 110) + Call(ScaleModel, CLONED_MODEL(0), LVar3, Float(1.0), LVar3) + Call(TranslateModel, CLONED_MODEL(0), 0, LVar0, 0) + Add(LVar0, 1) + Add(LVar2, 1) + Wait(1) + EndLoop + Loop(0) + Call(ScaleModel, CLONED_MODEL(0), LVar3, Float(1.0), LVar3) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_SandRing_Vanish) = { - EVT_CALL(EnableModel, MODEL_o225, TRUE) - EVT_SET(LVar0, 0) - EVT_SET(LVar2, 100) - EVT_SETF(LVar3, EVT_FLOAT(1.25)) - EVT_LOOP(20) - EVT_CALL(ScaleModel, MODEL_o225, LVar3, EVT_FLOAT(1.0), LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(70) - EVT_SET(LVar3, LVar2) - EVT_DIVF(LVar3, 80) - EVT_CALL(ScaleModel, MODEL_o225, LVar3, LVar3, LVar3) - EVT_CALL(TranslateModel, MODEL_o225, 0, LVar0, 0) - EVT_SUB(LVar0, 2) - EVT_ADD(LVar2, 5) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EnableModel, MODEL_o225, FALSE) - EVT_RETURN - EVT_END + Call(EnableModel, MODEL_o225, TRUE) + Set(LVar0, 0) + Set(LVar2, 100) + SetF(LVar3, Float(1.25)) + Loop(20) + Call(ScaleModel, MODEL_o225, LVar3, Float(1.0), LVar3) + Wait(1) + EndLoop + Loop(70) + Set(LVar3, LVar2) + DivF(LVar3, 80) + Call(ScaleModel, MODEL_o225, LVar3, LVar3, LVar3) + Call(TranslateModel, MODEL_o225, 0, LVar0, 0) + Sub(LVar0, 2) + Add(LVar2, 5) + Wait(1) + EndLoop + Call(EnableModel, MODEL_o225, FALSE) + Return + End }; EvtScript N(EVS_SandRingClone_Vanish) = { - EVT_WAIT(10) - EVT_CALL(EnableModel, CLONED_MODEL(0), TRUE) - EVT_SET(LVar0, 0) - EVT_SET(LVar2, 100) - EVT_SETF(LVar3, EVT_FLOAT(0.909)) - EVT_LOOP(20) - EVT_CALL(ScaleModel, CLONED_MODEL(0), LVar3, EVT_FLOAT(1.0), LVar3) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(70) - EVT_SET(LVar3, LVar2) - EVT_DIVF(LVar3, 110) - EVT_CALL(ScaleModel, CLONED_MODEL(0), LVar3, LVar3, LVar3) - EVT_CALL(TranslateModel, CLONED_MODEL(0), 0, LVar0, 0) - EVT_SUB(LVar0, 2) - EVT_ADD(LVar2, 5) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EnableModel, CLONED_MODEL(0), FALSE) - EVT_RETURN - EVT_END + Wait(10) + Call(EnableModel, CLONED_MODEL(0), TRUE) + Set(LVar0, 0) + Set(LVar2, 100) + SetF(LVar3, Float(0.909)) + Loop(20) + Call(ScaleModel, CLONED_MODEL(0), LVar3, Float(1.0), LVar3) + Wait(1) + EndLoop + Loop(70) + Set(LVar3, LVar2) + DivF(LVar3, 110) + Call(ScaleModel, CLONED_MODEL(0), LVar3, LVar3, LVar3) + Call(TranslateModel, CLONED_MODEL(0), 0, LVar0, 0) + Sub(LVar0, 2) + Add(LVar2, 5) + Wait(1) + EndLoop + Call(EnableModel, CLONED_MODEL(0), FALSE) + Return + End }; EvtScript N(EVS_LightRays_Appear) = { - EVT_CHILD_THREAD - EVT_CALL(EnableTexPanning, MODEL_upper_light, TRUE) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) - EVT_ADD(LVar0, 2500) - EVT_IF_GT(LVar0, 0x8000) - EVT_SUB(LVar0, 0x8000) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(EnableModel, MODEL_upper_light, TRUE) - EVT_SET(LVar0, -200) - EVT_SET(LVar1, 0) - EVT_LOOP(200) - EVT_CALL(TranslateModel, MODEL_upper_light, 0, LVar0, 0) - EVT_ADD(LVar0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + ChildThread + Call(EnableTexPanning, MODEL_upper_light, TRUE) + Set(LVar0, 0) + Loop(0) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) + Add(LVar0, 2500) + IfGt(LVar0, 0x8000) + Sub(LVar0, 0x8000) + EndIf + Wait(1) + EndLoop + EndChildThread + Call(EnableModel, MODEL_upper_light, TRUE) + Set(LVar0, -200) + Set(LVar1, 0) + Loop(200) + Call(TranslateModel, MODEL_upper_light, 0, LVar0, 0) + Add(LVar0, 1) + Wait(1) + EndLoop + Loop(0) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_LightRays_Vanish) = { - EVT_CHILD_THREAD - EVT_CALL(EnableTexPanning, MODEL_upper_light, TRUE) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) - EVT_ADD(LVar0, 2500) - EVT_IF_GT(LVar0, 0x8000) - EVT_SUB(LVar0, 0x8000) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(EnableModel, MODEL_upper_light, TRUE) - EVT_SET(LVar0, 0) - EVT_CALL(TranslateModel, MODEL_upper_light, 0, LVar0, 0) - EVT_WAIT(10) - EVT_LOOP(100) - EVT_CALL(TranslateModel, MODEL_upper_light, 0, LVar0, 0) - EVT_SUB(LVar0, 2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + ChildThread + Call(EnableTexPanning, MODEL_upper_light, TRUE) + Set(LVar0, 0) + Loop(0) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) + Add(LVar0, 2500) + IfGt(LVar0, 0x8000) + Sub(LVar0, 0x8000) + EndIf + Wait(1) + EndLoop + EndChildThread + Call(EnableModel, MODEL_upper_light, TRUE) + Set(LVar0, 0) + Call(TranslateModel, MODEL_upper_light, 0, LVar0, 0) + Wait(10) + Loop(100) + Call(TranslateModel, MODEL_upper_light, 0, LVar0, 0) + Sub(LVar0, 2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_Ruins_Arise) = { - EVT_CALL(MakeTransformGroup, MODEL_ruins) - EVT_CALL(EnableGroup, MODEL_ruins, TRUE) - EVT_THREAD - EVT_CALL(EnableTexPanning, MODEL_o232, TRUE) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LOOP(600) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, 0, LVar0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_AUX, LVar1, LVar2) - EVT_ADD(LVar0, 200) - EVT_ADD(LVar1, -200) - EVT_ADD(LVar2, 700) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EnableModel, MODEL_o232, FALSE) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(20) - EVT_LOOP(30) - EVT_CALL(RandInt, 290, LVar0) - EVT_ADD(LVar0, -110) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, 0, -35, 20, 10, 0, 60) - EVT_PLAY_EFFECT(EFFECT_DUST, 2, LVar0, 0, -35, 60) - EVT_WAIT(10) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(20) - EVT_LOOP(15) - EVT_CALL(RandInt, 180, LVar0) - EVT_ADD(LVar0, 170) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, 0, -300, 20, 10, 0, 60) - EVT_PLAY_EFFECT(EFFECT_DUST, 2, LVar0, 0, -300, 60) - EVT_WAIT(20) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(100) - EVT_LOOP(5) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, -180, 0, 260, 20, 10, 0, 60) - EVT_PLAY_EFFECT(EFFECT_DUST, 2, -180, 0, 260, 60) - EVT_WAIT(40) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(110) - EVT_LOOP(4) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, 180, 0, 260, 20, 10, 0, 60) - EVT_PLAY_EFFECT(EFFECT_DUST, 2, 180, 0, 260, 60) - EVT_WAIT(50) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(PlaySound, SOUND_LOOP_SBK_RUINS_RISING) - EVT_CALL(MakeLerp, -310, 0, 310, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_ruins, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(MakeTransformGroup, MODEL_ruins) + Call(EnableGroup, MODEL_ruins, TRUE) + Thread + Call(EnableTexPanning, MODEL_o232, TRUE) + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Loop(600) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, 0, LVar0) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_AUX, LVar1, LVar2) + Add(LVar0, 200) + Add(LVar1, -200) + Add(LVar2, 700) + Wait(1) + EndLoop + Call(EnableModel, MODEL_o232, FALSE) + EndThread + Thread + Wait(20) + Loop(30) + Call(RandInt, 290, LVar0) + Add(LVar0, -110) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, 0, -35, 20, 10, 0, 60) + PlayEffect(EFFECT_DUST, 2, LVar0, 0, -35, 60) + Wait(10) + EndLoop + EndThread + Thread + Wait(20) + Loop(15) + Call(RandInt, 180, LVar0) + Add(LVar0, 170) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, 0, -300, 20, 10, 0, 60) + PlayEffect(EFFECT_DUST, 2, LVar0, 0, -300, 60) + Wait(20) + EndLoop + EndThread + Thread + Wait(100) + Loop(5) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, -180, 0, 260, 20, 10, 0, 60) + PlayEffect(EFFECT_DUST, 2, -180, 0, 260, 60) + Wait(40) + EndLoop + EndThread + Thread + Wait(110) + Loop(4) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, 180, 0, 260, 20, 10, 0, 60) + PlayEffect(EFFECT_DUST, 2, 180, 0, 260, 60) + Wait(50) + EndLoop + EndThread + Call(PlaySound, SOUND_LOOP_SBK_RUINS_RISING) + Call(MakeLerp, -310, 0, 310, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_ruins, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_Ruins_FinishRising) = { - EVT_CALL(MakeTransformGroup, MODEL_ruins) - EVT_CALL(EnableGroup, MODEL_ruins, TRUE) - EVT_THREAD - EVT_CALL(EnableTexPanning, MODEL_o232, TRUE) - EVT_SET(LVar0, 60000) - EVT_SET(LVar1, -60000) - EVT_SET(LVar2, 210000) - EVT_LOOP(300) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, 0, LVar0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_AUX, LVar1, LVar2) - EVT_ADD(LVar0, 200) - EVT_ADD(LVar1, -200) - EVT_ADD(LVar2, 700) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EnableModel, MODEL_o232, FALSE) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(10) - EVT_CALL(RandInt, 290, LVar0) - EVT_ADD(LVar0, -110) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, 0, -35, 20, 10, 0, 60) - EVT_PLAY_EFFECT(EFFECT_DUST, 2, LVar0, 0, -35, 60) - EVT_WAIT(10) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10) - EVT_LOOP(5) - EVT_CALL(RandInt, 180, LVar0) - EVT_ADD(LVar0, 170) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, 0, -300, 20, 10, 0, 60) - EVT_PLAY_EFFECT(EFFECT_DUST, 2, LVar0, 0, -300, 60) - EVT_WAIT(20) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(3) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, -180, 0, 260, 20, 10, 0, 60) - EVT_PLAY_EFFECT(EFFECT_DUST, 2, -180, 0, 260, 60) - EVT_WAIT(40) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10) - EVT_LOOP(2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, 180, 0, 260, 20, 10, 0, 60) - EVT_PLAY_EFFECT(EFFECT_DUST, 2, 180, 0, 260, 60) - EVT_WAIT(50) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(MakeLerp, -20, 0, 20, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_ruins, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(MakeTransformGroup, MODEL_ruins) + Call(EnableGroup, MODEL_ruins, TRUE) + Thread + Call(EnableTexPanning, MODEL_o232, TRUE) + Set(LVar0, 60000) + Set(LVar1, -60000) + Set(LVar2, 210000) + Loop(300) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, 0, LVar0) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_AUX, LVar1, LVar2) + Add(LVar0, 200) + Add(LVar1, -200) + Add(LVar2, 700) + Wait(1) + EndLoop + Call(EnableModel, MODEL_o232, FALSE) + EndThread + Thread + Loop(10) + Call(RandInt, 290, LVar0) + Add(LVar0, -110) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, 0, -35, 20, 10, 0, 60) + PlayEffect(EFFECT_DUST, 2, LVar0, 0, -35, 60) + Wait(10) + EndLoop + EndThread + Thread + Wait(10) + Loop(5) + Call(RandInt, 180, LVar0) + Add(LVar0, 170) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, 0, -300, 20, 10, 0, 60) + PlayEffect(EFFECT_DUST, 2, LVar0, 0, -300, 60) + Wait(20) + EndLoop + EndThread + Thread + Loop(3) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, -180, 0, 260, 20, 10, 0, 60) + PlayEffect(EFFECT_DUST, 2, -180, 0, 260, 60) + Wait(40) + EndLoop + EndThread + Thread + Wait(10) + Loop(2) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, 180, 0, 260, 20, 10, 0, 60) + PlayEffect(EFFECT_DUST, 2, 180, 0, 260, 60) + Wait(50) + EndLoop + EndThread + Call(MakeLerp, -20, 0, 20, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_ruins, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(1.0)) + Return + End }; EvtScript N(EVS_SetChompStatueRotation) = { - EVT_CALL(RotateGroup, MODEL_c_wang, LVar0, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_d_wang, LVar0, 0, 1, 0) - EVT_SET(LVar2, 0) - EVT_SUB(LVar2, LVar0) - EVT_CALL(RotateGroup, MODEL_a_wang, LVar2, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_b_wang, LVar2, 0, 1, 0) - EVT_RETURN - EVT_END + Call(RotateGroup, MODEL_c_wang, LVar0, 0, 1, 0) + Call(RotateGroup, MODEL_d_wang, LVar0, 0, 1, 0) + Set(LVar2, 0) + Sub(LVar2, LVar0) + Call(RotateGroup, MODEL_a_wang, LVar2, 0, 1, 0) + Call(RotateGroup, MODEL_b_wang, LVar2, 0, 1, 0) + Return + End }; EvtScript N(EVS_InterpChompStatueRotation) = { - EVT_CALL(MakeLerp, 180, 0, 60, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_EXEC_WAIT(N(EVS_SetChompStatueRotation)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(MakeLerp, 180, 0, 60, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + ExecWait(N(EVS_SetChompStatueRotation)) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_Doors_Open) = { - EVT_CALL(MakeLerp, 0, 60, 180, EASING_QUADRATIC_IN) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o168, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o177, LVar0, 0, 1, 0) - EVT_CALL(TranslateModel, MODEL_o169, -20, 0, 0) - EVT_CALL(TranslateModel, MODEL_o178, -20, 0, 0) - EVT_CALL(RotateModel, MODEL_o169, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o178, LVar0, 0, 1, 0) - EVT_CALL(TranslateModel, MODEL_o169, 20, 0, 0) - EVT_CALL(TranslateModel, MODEL_o178, 20, 0, 0) - EVT_CALL(RotateModel, MODEL_o130, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o176, LVar0, 0, 1, 0) - EVT_CALL(TranslateModel, MODEL_o175, -20, 0, 0) - EVT_CALL(TranslateModel, MODEL_o129, -20, 0, 0) - EVT_CALL(RotateModel, MODEL_o175, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o129, LVar0, 0, 1, 0) - EVT_CALL(TranslateModel, MODEL_o175, 20, 0, 0) - EVT_CALL(TranslateModel, MODEL_o129, 20, 0, 0) - EVT_SET(LVar2, 0) - EVT_SUB(LVar2, LVar0) - EVT_CALL(RotateModel, MODEL_o141, LVar2, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o174, LVar2, 0, 1, 0) - EVT_CALL(TranslateModel, MODEL_o140, 20, 0, 0) - EVT_CALL(TranslateModel, MODEL_o173, 20, 0, 0) - EVT_CALL(RotateModel, MODEL_o140, LVar2, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o173, LVar2, 0, 1, 0) - EVT_CALL(TranslateModel, MODEL_o140, -20, 0, 0) - EVT_CALL(TranslateModel, MODEL_o173, -20, 0, 0) - EVT_CALL(RotateModel, MODEL_o157, LVar2, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o171, LVar2, 0, 1, 0) - EVT_CALL(TranslateModel, MODEL_o158, 20, 0, 0) - EVT_CALL(TranslateModel, MODEL_o172, 20, 0, 0) - EVT_CALL(RotateModel, MODEL_o158, LVar2, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o172, LVar2, 0, 1, 0) - EVT_CALL(TranslateModel, MODEL_o158, -20, 0, 0) - EVT_CALL(TranslateModel, MODEL_o172, -20, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(MakeLerp, 0, 60, 180, EASING_QUADRATIC_OUT) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o169, -20, 0, 0) - EVT_CALL(TranslateModel, MODEL_o178, -20, 0, 0) - EVT_CALL(RotateModel, MODEL_o169, 60, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o178, 60, 0, 1, 0) - EVT_CALL(TranslateModel, MODEL_o169, 20, 0, 0) - EVT_CALL(TranslateModel, MODEL_o178, 20, 0, 0) - EVT_CALL(RotateModel, MODEL_o169, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o178, LVar0, 0, 1, 0) - EVT_CALL(TranslateModel, MODEL_o175, -20, 0, 0) - EVT_CALL(TranslateModel, MODEL_o129, -20, 0, 0) - EVT_CALL(RotateModel, MODEL_o175, 60, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o129, 60, 0, 1, 0) - EVT_CALL(TranslateModel, MODEL_o175, 20, 0, 0) - EVT_CALL(TranslateModel, MODEL_o129, 20, 0, 0) - EVT_CALL(RotateModel, MODEL_o175, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o129, LVar0, 0, 1, 0) - EVT_SET(LVar2, 0) - EVT_SUB(LVar2, LVar0) - EVT_CALL(TranslateModel, MODEL_o140, 20, 0, 0) - EVT_CALL(TranslateModel, MODEL_o173, 20, 0, 0) - EVT_CALL(RotateModel, MODEL_o140, -60, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o173, -60, 0, 1, 0) - EVT_CALL(TranslateModel, MODEL_o140, -20, 0, 0) - EVT_CALL(TranslateModel, MODEL_o173, -20, 0, 0) - EVT_CALL(RotateModel, MODEL_o140, LVar2, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o173, LVar2, 0, 1, 0) - EVT_CALL(TranslateModel, MODEL_o158, 20, 0, 0) - EVT_CALL(TranslateModel, MODEL_o172, 20, 0, 0) - EVT_CALL(RotateModel, MODEL_o158, -60, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o172, -60, 0, 1, 0) - EVT_CALL(TranslateModel, MODEL_o158, -20, 0, 0) - EVT_CALL(TranslateModel, MODEL_o172, -20, 0, 0) - EVT_CALL(RotateModel, MODEL_o158, LVar2, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o172, LVar2, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeLerp, 0, 60, 180, EASING_QUADRATIC_IN) + Label(10) + Call(UpdateLerp) + Call(RotateModel, MODEL_o168, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o177, LVar0, 0, 1, 0) + Call(TranslateModel, MODEL_o169, -20, 0, 0) + Call(TranslateModel, MODEL_o178, -20, 0, 0) + Call(RotateModel, MODEL_o169, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o178, LVar0, 0, 1, 0) + Call(TranslateModel, MODEL_o169, 20, 0, 0) + Call(TranslateModel, MODEL_o178, 20, 0, 0) + Call(RotateModel, MODEL_o130, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o176, LVar0, 0, 1, 0) + Call(TranslateModel, MODEL_o175, -20, 0, 0) + Call(TranslateModel, MODEL_o129, -20, 0, 0) + Call(RotateModel, MODEL_o175, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o129, LVar0, 0, 1, 0) + Call(TranslateModel, MODEL_o175, 20, 0, 0) + Call(TranslateModel, MODEL_o129, 20, 0, 0) + Set(LVar2, 0) + Sub(LVar2, LVar0) + Call(RotateModel, MODEL_o141, LVar2, 0, 1, 0) + Call(RotateModel, MODEL_o174, LVar2, 0, 1, 0) + Call(TranslateModel, MODEL_o140, 20, 0, 0) + Call(TranslateModel, MODEL_o173, 20, 0, 0) + Call(RotateModel, MODEL_o140, LVar2, 0, 1, 0) + Call(RotateModel, MODEL_o173, LVar2, 0, 1, 0) + Call(TranslateModel, MODEL_o140, -20, 0, 0) + Call(TranslateModel, MODEL_o173, -20, 0, 0) + Call(RotateModel, MODEL_o157, LVar2, 0, 1, 0) + Call(RotateModel, MODEL_o171, LVar2, 0, 1, 0) + Call(TranslateModel, MODEL_o158, 20, 0, 0) + Call(TranslateModel, MODEL_o172, 20, 0, 0) + Call(RotateModel, MODEL_o158, LVar2, 0, 1, 0) + Call(RotateModel, MODEL_o172, LVar2, 0, 1, 0) + Call(TranslateModel, MODEL_o158, -20, 0, 0) + Call(TranslateModel, MODEL_o172, -20, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(MakeLerp, 0, 60, 180, EASING_QUADRATIC_OUT) + Label(20) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o169, -20, 0, 0) + Call(TranslateModel, MODEL_o178, -20, 0, 0) + Call(RotateModel, MODEL_o169, 60, 0, 1, 0) + Call(RotateModel, MODEL_o178, 60, 0, 1, 0) + Call(TranslateModel, MODEL_o169, 20, 0, 0) + Call(TranslateModel, MODEL_o178, 20, 0, 0) + Call(RotateModel, MODEL_o169, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o178, LVar0, 0, 1, 0) + Call(TranslateModel, MODEL_o175, -20, 0, 0) + Call(TranslateModel, MODEL_o129, -20, 0, 0) + Call(RotateModel, MODEL_o175, 60, 0, 1, 0) + Call(RotateModel, MODEL_o129, 60, 0, 1, 0) + Call(TranslateModel, MODEL_o175, 20, 0, 0) + Call(TranslateModel, MODEL_o129, 20, 0, 0) + Call(RotateModel, MODEL_o175, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o129, LVar0, 0, 1, 0) + Set(LVar2, 0) + Sub(LVar2, LVar0) + Call(TranslateModel, MODEL_o140, 20, 0, 0) + Call(TranslateModel, MODEL_o173, 20, 0, 0) + Call(RotateModel, MODEL_o140, -60, 0, 1, 0) + Call(RotateModel, MODEL_o173, -60, 0, 1, 0) + Call(TranslateModel, MODEL_o140, -20, 0, 0) + Call(TranslateModel, MODEL_o173, -20, 0, 0) + Call(RotateModel, MODEL_o140, LVar2, 0, 1, 0) + Call(RotateModel, MODEL_o173, LVar2, 0, 1, 0) + Call(TranslateModel, MODEL_o158, 20, 0, 0) + Call(TranslateModel, MODEL_o172, 20, 0, 0) + Call(RotateModel, MODEL_o158, -60, 0, 1, 0) + Call(RotateModel, MODEL_o172, -60, 0, 1, 0) + Call(TranslateModel, MODEL_o158, -20, 0, 0) + Call(TranslateModel, MODEL_o172, -20, 0, 0) + Call(RotateModel, MODEL_o158, LVar2, 0, 1, 0) + Call(RotateModel, MODEL_o172, LVar2, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Return + End }; EvtScript N(EVS_Steps_Arise) = { - EVT_CALL(EnableGroup, MODEL_step, TRUE) - EVT_CALL(MakeLerp, -310, 0, 310, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_step, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(EnableGroup, MODEL_step, TRUE) + Call(MakeLerp, -310, 0, 310, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_step, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_Steps_FinishRising) = { - EVT_CALL(EnableGroup, MODEL_step, TRUE) - EVT_CALL(MakeLerp, -20, 0, 20, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_step, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(EnableGroup, MODEL_step, TRUE) + Call(MakeLerp, -20, 0, 20, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_step, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_Steps_Unfold) = { - EVT_CALL(PlaySoundAt, SOUND_SBK_RUINS_STEPS_UNFOLD, SOUND_SPACE_DEFAULT, 0, 39, -80) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, -180, 180, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o106, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o107, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o100, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o105, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, 61, 2, -83, 20, 10, 0, 60) - EVT_PLAY_EFFECT(EFFECT_DUST, 2, 61, 2, -83, 60) - EVT_WAIT(3) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, -61, 2, -83, 20, 10, 0, 60) - EVT_PLAY_EFFECT(EFFECT_DUST, 2, -61, 2, -83, 60) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(PlaySoundAt, SOUND_SBK_RUINS_STEPS_UNFOLD, SOUND_SPACE_DEFAULT, 0, 39, -80) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(0.2)) + EndThread + Call(MakeLerp, 0, -180, 180, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o106, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o107, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o100, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o105, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + PlayEffect(EFFECT_SMOKE_IMPACT, 0, 61, 2, -83, 20, 10, 0, 60) + PlayEffect(EFFECT_DUST, 2, 61, 2, -83, 60) + Wait(3) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, -61, 2, -83, 20, 10, 0, 60) + PlayEffect(EFFECT_DUST, 2, -61, 2, -83, 60) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.0)) + Return + End }; EvtScript N(EVS_OnInteract_Pedestal) = { - EVT_CALL(DisablePulseStone, TRUE) - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_LE(LVar0, 0) - EVT_CALL(CloseChoicePopup) - EVT_CALL(DisablePulseStone, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(func_802CF56C, 1) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(CloseChoicePopup) - EVT_SET(GB_StoryProgress, STORY_CH2_UNCOVERED_DRY_DRY_RUINS) - EVT_CALL(N(HideSun)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_RUINS_APPEAR, 1, 8) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 210, 0, 137) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(150.0), EVT_FLOAT(500.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(-450.0), EVT_FLOAT(-500.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(500.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.2)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(10) - EVT_SET(LVar0, 180) - EVT_EXEC_WAIT(N(EVS_SetChompStatueRotation)) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 120, EVT_FLOAT(0.2)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 300, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 300, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_EXEC(N(EVS_Pedestal_Sink)) - EVT_WAIT(30) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 0) - EVT_SET(LVar0, -80) - EVT_SET(LFlag0, FALSE) - EVT_ELSE - EVT_SET(LVar0, 80) - EVT_SET(LFlag0, TRUE) - EVT_END_IF - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, LVar0, 80, 0) - EVT_CALL(FacePlayerTowardPoint, 0, 0, 0) - EVT_END_THREAD - EVT_EXEC(N(EVS_DarkenEnvironment)) - EVT_WAIT(30) - EVT_CALL(CloneModel, MODEL_o225, CLONED_MODEL(0)) - EVT_EXEC(N(EVS_TexPan_SandRing)) - EVT_EXEC(N(EVS_SandRing_Appear)) - EVT_EXEC(N(EVS_SandRingClone_Appear)) - EVT_WAIT(100) - EVT_EXEC(N(EVS_LightRays_Appear)) - EVT_WAIT(150) - EVT_EXEC(N(EVS_Ruins_Arise)) - EVT_EXEC(N(EVS_Steps_Arise)) - EVT_WAIT(100) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(8.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.2)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(80) - EVT_EXEC(N(EVS_InterpChompStatueRotation)) - EVT_WAIT(60) - EVT_WAIT(50) - EVT_IF_EQ(LFlag0, FALSE) - EVT_CALL(GotoMap, EVT_PTR("sbk_30"), sbk_30_ENTRY_4) - EVT_ELSE - EVT_CALL(GotoMap, EVT_PTR("sbk_30"), sbk_30_ENTRY_5) - EVT_END_IF - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePulseStone, TRUE) + Call(ShowKeyChoicePopup) + IfLe(LVar0, 0) + Call(CloseChoicePopup) + Call(DisablePulseStone, FALSE) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(func_802CF56C, 1) + Call(RemoveKeyItemAt, LVar1) + Call(CloseChoicePopup) + Set(GB_StoryProgress, STORY_CH2_UNCOVERED_DRY_DRY_RUINS) + Call(N(HideSun)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_RUINS_APPEAR, 1, 8) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 210, 0, 137) + Call(SetCamPosA, CAM_DEFAULT, Float(150.0), Float(500.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(-450.0), Float(-500.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-7.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(500.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.2)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(10) + Set(LVar0, 180) + ExecWait(N(EVS_SetChompStatueRotation)) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 120, Float(0.2)) + Call(ShakeCam, CAM_DEFAULT, 0, 300, Float(0.5)) + Call(ShakeCam, CAM_DEFAULT, 0, 300, Float(0.2)) + EndThread + Exec(N(EVS_Pedestal_Sink)) + Wait(30) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, 0) + Set(LVar0, -80) + Set(LFlag0, FALSE) + Else + Set(LVar0, 80) + Set(LFlag0, TRUE) + EndIf + Thread + Wait(10) + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, LVar0, 80, 0) + Call(FacePlayerTowardPoint, 0, 0, 0) + EndThread + Exec(N(EVS_DarkenEnvironment)) + Wait(30) + Call(CloneModel, MODEL_o225, CLONED_MODEL(0)) + Exec(N(EVS_TexPan_SandRing)) + Exec(N(EVS_SandRing_Appear)) + Exec(N(EVS_SandRingClone_Appear)) + Wait(100) + Exec(N(EVS_LightRays_Appear)) + Wait(150) + Exec(N(EVS_Ruins_Arise)) + Exec(N(EVS_Steps_Arise)) + Wait(100) + Call(SetCamPitch, CAM_DEFAULT, Float(8.0), Float(-9.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.2)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(80) + Exec(N(EVS_InterpChompStatueRotation)) + Wait(60) + Wait(50) + IfEq(LFlag0, FALSE) + Call(GotoMap, Ref("sbk_30"), sbk_30_ENTRY_4) + Else + Call(GotoMap, Ref("sbk_30"), sbk_30_ENTRY_5) + EndIf + Wait(100) + Return + End }; EvtScript N(EVS_SetupRuins) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(EnableGroup, MODEL_day_version, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ruin, COLLIDER_FLAGS_UPPER_MASK) - EVT_CASE_LT(STORY_CH2_UNCOVERED_DRY_DRY_RUINS) - EVT_CALL(EnableGroup, MODEL_day_version, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ruin, COLLIDER_FLAGS_UPPER_MASK) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_OnInteract_Pedestal)), TRIGGER_WALL_PRESS_A, COLLIDER_iwa, EVT_PTR(N(PedestalKeyList)), 0, 1) - EVT_CASE_DEFAULT - EVT_CALL(EnableModel, MODEL_point_iwa, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_pikapika, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_SWITCH - EVT_CALL(EnableGroup, MODEL_ruins, FALSE) - EVT_CALL(EnableGroup, MODEL_step, FALSE) - EVT_CALL(EnableModel, MODEL_upper_light, FALSE) - EVT_CALL(EnableModel, MODEL_o225, FALSE) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_GOT_PULSE_STONE) + Call(EnableGroup, MODEL_day_version, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ruin, COLLIDER_FLAGS_UPPER_MASK) + CaseLt(STORY_CH2_UNCOVERED_DRY_DRY_RUINS) + Call(EnableGroup, MODEL_day_version, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ruin, COLLIDER_FLAGS_UPPER_MASK) + BindPadlock(Ref(N(EVS_OnInteract_Pedestal)), TRIGGER_WALL_PRESS_A, COLLIDER_iwa, Ref(N(PedestalKeyList)), 0, 1) + CaseDefault + Call(EnableModel, MODEL_point_iwa, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_pikapika, COLLIDER_FLAGS_UPPER_MASK) + EndSwitch + Call(EnableGroup, MODEL_ruins, FALSE) + Call(EnableGroup, MODEL_step, FALSE) + Call(EnableModel, MODEL_upper_light, FALSE) + Call(EnableModel, MODEL_o225, FALSE) + Return + End }; EvtScript N(EVS_Ruins_Arise_Continued) = { - EVT_CALL(PlaySound, SOUND_SBK_RUINS_FINISH_RISING) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(func_802CF56C, 1) - EVT_CALL(FacePlayerTowardPoint, 0, 0, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_iwa, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_point_iwa, FALSE) - EVT_CALL(EnableGroup, MODEL_day_version, FALSE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 400, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 210, 0, 137) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(150.0), EVT_FLOAT(500.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(-450.0), EVT_FLOAT(-500.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(8.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(500.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(N(SetModelTintMode), APPLY_TINT_BG, NULL, ENV_TINT_REMAP) - EVT_CALL(N(SetModelTintMode), APPLY_TINT_GROUPS, -1, ENV_TINT_REMAP) - EVT_CALL(N(SetModelTintMode), APPLY_TINT_GROUPS, EVT_PTR(N(ModelList_Solid)), ENV_TINT_NONE) - EVT_CALL(N(SetModelTintMode), APPLY_TINT_MODELS, EVT_PTR(N(ModelList_Translucent)), ENV_TINT_NONE) - EVT_CALL(N(InterpWorldEnvColor), 44, 32, 177, 0, 0, 0, 0) - EVT_EXEC(N(EVS_Ruins_FinishRising)) - EVT_EXEC(N(EVS_Steps_FinishRising)) - EVT_CALL(CloneModel, MODEL_o225, CLONED_MODEL(0)) - EVT_EXEC(N(EVS_TexPan_SandRing)) - EVT_EXEC(N(EVS_SandRing_Vanish)) - EVT_EXEC(N(EVS_SandRingClone_Vanish)) - EVT_WAIT(20) - EVT_EXEC(N(EVS_LightRays_Vanish)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(4.0), EVT_FLOAT(-6.5)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(790.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.2)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(100) - EVT_EXEC(N(EVS_Doors_Open)) - EVT_WAIT(100) - EVT_EXEC_WAIT(N(EVS_Steps_Unfold)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_ruin, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(60) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(func_802CF56C, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(PlaySound, SOUND_SBK_RUINS_FINISH_RISING) + Call(DisablePlayerInput, TRUE) + Call(func_802CF56C, 1) + Call(FacePlayerTowardPoint, 0, 0, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_iwa, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_point_iwa, FALSE) + Call(EnableGroup, MODEL_day_version, FALSE) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 400, Float(0.2)) + EndThread + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 210, 0, 137) + Call(SetCamPosA, CAM_DEFAULT, Float(150.0), Float(500.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(-450.0), Float(-500.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(8.0), Float(-9.0)) + Call(SetCamDistance, CAM_DEFAULT, Float(500.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(N(SetModelTintMode), APPLY_TINT_BG, NULL, ENV_TINT_REMAP) + Call(N(SetModelTintMode), APPLY_TINT_GROUPS, -1, ENV_TINT_REMAP) + Call(N(SetModelTintMode), APPLY_TINT_GROUPS, Ref(N(ModelList_Solid)), ENV_TINT_NONE) + Call(N(SetModelTintMode), APPLY_TINT_MODELS, Ref(N(ModelList_Translucent)), ENV_TINT_NONE) + Call(N(InterpWorldEnvColor), 44, 32, 177, 0, 0, 0, 0) + Exec(N(EVS_Ruins_FinishRising)) + Exec(N(EVS_Steps_FinishRising)) + Call(CloneModel, MODEL_o225, CLONED_MODEL(0)) + Exec(N(EVS_TexPan_SandRing)) + Exec(N(EVS_SandRing_Vanish)) + Exec(N(EVS_SandRingClone_Vanish)) + Wait(20) + Exec(N(EVS_LightRays_Vanish)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetCamPitch, CAM_DEFAULT, Float(4.0), Float(-6.5)) + Call(SetCamDistance, CAM_DEFAULT, Float(790.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.2)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(100) + Exec(N(EVS_Doors_Open)) + Wait(100) + ExecWait(N(EVS_Steps_Unfold)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_ruin, COLLIDER_FLAGS_UPPER_MASK) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(60) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(func_802CF56C, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_sbk/sbk_02/sbk_02_4_npc.c b/src/world/area_sbk/sbk_02/sbk_02_4_npc.c index ccfabca6dcf..426470b54ce 100644 --- a/src/world/area_sbk/sbk_02/sbk_02_4_npc.c +++ b/src/world/area_sbk/sbk_02/sbk_02_4_npc.c @@ -10,22 +10,22 @@ #include "world/common/complete/GiveReward.inc.c" EvtScript N(EVS_NpcIdle_Mamar) = { - EVT_LOOP(0) - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Loop(10) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 1) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Loop(10) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 1) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndLoop + Return + End }; API_CALLABLE(N(UpgradeStarPowerCh2)) { @@ -37,155 +37,155 @@ API_CALLABLE(N(UpgradeStarPowerCh2)) { } EvtScript N(EVS_Scene_RescuedMamar) = { - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(func_802CF56C, 2) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar0) - EVT_ADD(LVar3, -50) - EVT_SET(LVar4, LVar1) - EVT_ADD(LVar4, 26) - EVT_CALL(SetNpcPos, NPC_Mamar, LVar3, LVar4, LVar2) - EVT_CALL(PlayerFaceNpc, NPC_Mamar, FALSE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 600) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(WaitForPlayerInputEnabled) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.5 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Mamar, ANIM_WorldMamar_TalkHappy, ANIM_WorldMamar_Idle, SPEECH_FLAG_200, MSG_CH2_00EB) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 18, -9) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(MakeLerp, 0, 360, 10 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Mamar, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(EnableNpcAI, NPC_Mamar, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_Leap) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_UsePower) - EVT_CALL(PlaySoundAtPlayer, SOUND_RECEIVE_STAR_POWER, SOUND_SPACE_DEFAULT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar1) - EVT_ADD(LVar1, 50) - EVT_ADD(LVar2, 10) - EVT_ADD(LVar3, 30) - EVT_LOOP(5) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 20) - EVT_WAIT(6 * DT) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 1, LVar0, LVar3, LVar2, 20) - EVT_WAIT(6 * DT) - EVT_END_LOOP - EVT_WAIT(20 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_GET_STAR_POWER_WAVE, SOUND_SPACE_DEFAULT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 30) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_Idle) - EVT_CALL(EnableNpcAI, NPC_Mamar, TRUE) - EVT_CALL(N(UpgradeStarPowerCh2)) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0192, 160, 40) - EVT_WAIT(10 * DT) - EVT_CALL(GetNpcPos, NPC_Mamar, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Mamar, ANIM_WorldMamar_TalkHappy, ANIM_WorldMamar_Idle, SPEECH_FLAG_200, MSG_CH2_00EC) - EVT_WAIT(10 * DT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Mamar, LVar3, LVar4, LVar5) - EVT_ADD(LVar0, LVar3) - EVT_DIV(LVar0, 2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Mamar, ANIM_WorldMamar_TalkHappy, ANIM_WorldMamar_Idle, SPEECH_FLAG_200, MSG_CH2_00ED) - EVT_CALL(SetNpcFlagBits, NPC_Mamar, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) - EVT_THREAD - EVT_LOOP(25) - EVT_CALL(GetNpcPos, NPC_Mamar, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 20, 0, 0, 0, 0, 0, 0, 0, 0) - EVT_WAIT(4 * DT) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 1800) - EVT_CALL(MakeLerp, LVar2, LVar3, 100, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Mamar, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Mamar, LVar2, LVar3, LVar4) - EVT_SET(LVar5, LVar3) - EVT_ADD(LVar5, 180) - EVT_CALL(MakeLerp, LVar3, LVar5, 100 * DT, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, NPC_Mamar, LVar2, LVar0, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_Mamar, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(15 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Mamar, SOUND_STAR_SPIRIT_DEPART_1, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_WAIT(90 * DT) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_SET(GB_StoryProgress, STORY_CH2_STAR_SPRIT_DEPARTED) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePartnerAI, 0) + Call(func_802CF56C, 2) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar3, LVar0) + Add(LVar3, -50) + Set(LVar4, LVar1) + Add(LVar4, 26) + Call(SetNpcPos, NPC_Mamar, LVar3, LVar4, LVar2) + Call(PlayerFaceNpc, NPC_Mamar, FALSE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, 0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 600) + Call(SetCamPitch, CAM_DEFAULT, Float(18.0), Float(-9.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(WaitForPlayerInputEnabled) + Call(DisablePlayerInput, TRUE) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.5 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Mamar, ANIM_WorldMamar_TalkHappy, ANIM_WorldMamar_Idle, SPEECH_FLAG_200, MSG_CH2_00EB) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, 18, -9) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(MakeLerp, 0, 360, 10 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Mamar, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(EnableNpcAI, NPC_Mamar, FALSE) + Call(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_Leap) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_UsePower) + Call(PlaySoundAtPlayer, SOUND_RECEIVE_STAR_POWER, SOUND_SPACE_DEFAULT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar3, LVar1) + Add(LVar1, 50) + Add(LVar2, 10) + Add(LVar3, 30) + Loop(5) + PlayEffect(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 20) + Wait(6 * DT) + PlayEffect(EFFECT_SPARKLES, 1, LVar0, LVar3, LVar2, 20) + Wait(6 * DT) + EndLoop + Wait(20 * DT) + Call(PlaySoundAtPlayer, SOUND_GET_STAR_POWER_WAVE, SOUND_SPACE_DEFAULT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 20) + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 30) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetNpcAnimation, NPC_Mamar, ANIM_WorldMamar_Idle) + Call(EnableNpcAI, NPC_Mamar, TRUE) + Call(N(UpgradeStarPowerCh2)) + Call(ShowMessageAtScreenPos, MSG_Menus_0192, 160, 40) + Wait(10 * DT) + Call(GetNpcPos, NPC_Mamar, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(250.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10) + Call(SpeakToPlayer, NPC_Mamar, ANIM_WorldMamar_TalkHappy, ANIM_WorldMamar_Idle, SPEECH_FLAG_200, MSG_CH2_00EC) + Wait(10 * DT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Mamar, LVar3, LVar4, LVar5) + Add(LVar0, LVar3) + Div(LVar0, 2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Mamar, ANIM_WorldMamar_TalkHappy, ANIM_WorldMamar_Idle, SPEECH_FLAG_200, MSG_CH2_00ED) + Call(SetNpcFlagBits, NPC_Mamar, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) + Thread + Loop(25) + Call(GetNpcPos, NPC_Mamar, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 20, 0, 0, 0, 0, 0, 0, 0, 0) + Wait(4 * DT) + EndLoop + EndThread + Thread + Set(LVar2, 0) + Set(LVar3, 1800) + Call(MakeLerp, LVar2, LVar3, 100, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Mamar, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(GetNpcPos, NPC_Mamar, LVar2, LVar3, LVar4) + Set(LVar5, LVar3) + Add(LVar5, 180) + Call(MakeLerp, LVar3, LVar5, 100 * DT, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetNpcPos, NPC_Mamar, LVar2, LVar0, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcPos, NPC_Mamar, NPC_DISPOSE_LOCATION) + EndThread + Thread + Wait(15 * DT) + Call(PlaySoundAtNpc, NPC_Mamar, SOUND_STAR_SPIRIT_DEPART_1, SOUND_SPACE_DEFAULT) + EndThread + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Wait(90 * DT) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Set(GB_StoryProgress, STORY_CH2_STAR_SPRIT_DEPARTED) + Exec(N(EVS_SetupMusic)) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Mamar) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, sbk_02_ENTRY_5) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Mamar))) - EVT_EXEC(N(EVS_Scene_RescuedMamar)) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, sbk_02_ENTRY_5) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Mamar))) + Exec(N(EVS_Scene_RescuedMamar)) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; API_CALLABLE(N(CheckTradeEventTime)) { @@ -200,56 +200,56 @@ API_CALLABLE(N(GetTradeEventItemCount)) { } EvtScript N(EVS_NpcInteract_TradingToad) = { - EVT_SET(LVar0, 5) - EVT_CALL(N(CheckTradeEventTime)) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_CH2_00EE) - EVT_WAIT(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 1, 1, 1, 1) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_SET(GF_TradingEvent2_Active, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(GetTradeEventItemCount)) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_CH2_00EF) - EVT_RETURN - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_CH2_00F0) + Set(LVar0, 5) + Call(N(CheckTradeEventTime)) + IfEq(LVar0, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_CH2_00EE) + Wait(10) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 1, 1, 1, 1) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Set(GF_TradingEvent2_Active, FALSE) + Return + EndIf + Call(N(GetTradeEventItemCount)) + IfEq(LVar0, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_CH2_00EF) + Return + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_CH2_00F0) EVT_CHOOSE_ANY_CONSUMABLE(2) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(-1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_CH2_00F4) - EVT_RETURN - EVT_CASE_EQ(ITEM_NUTTY_CAKE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_CH2_00F1) + Switch(LVar0) + CaseEq(-1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_CH2_00F4) + Return + CaseEq(ITEM_NUTTY_CAKE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_CH2_00F1) EVT_GIVE_CONSUMABLE_REWARD(ITEM_MAPLE_SUPER) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_CH2_00F2) - EVT_WAIT(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) - EVT_PLAY_EFFECT(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 1, 1, 1, 1) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_SET(GF_TradingEvent2_Active, FALSE) - EVT_ADD(GB_TradingEvent_Count, 1) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_CH2_00F3) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_CH2_00F2) + Wait(10) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SMOKE_BURST, SOUND_SPACE_DEFAULT) + PlayEffect(EFFECT_BIG_SMOKE_PUFF, LVar0, LVar1, LVar2, 1, 1, 1, 1) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Set(GF_TradingEvent2_Active, FALSE) + Add(GB_TradingEvent_Count, 1) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Toad_Pink_Talk, ANIM_Toad_Pink_Idle, 0, MSG_CH2_00F3) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_TradingToad) = { - EVT_IF_NE(GF_TradingEvent2_Active, FALSE) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_TradingToad))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfNe(GF_TradingEvent2_Active, FALSE) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_TradingToad))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_Mamar) = { diff --git a/src/world/area_sbk/sbk_02/sbk_02_5_entity.c b/src/world/area_sbk/sbk_02/sbk_02_5_entity.c index 2a9f34afa74..45befded2f0 100644 --- a/src/world/area_sbk/sbk_02/sbk_02_5_entity.c +++ b/src/world/area_sbk/sbk_02/sbk_02_5_entity.c @@ -2,9 +2,9 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH2_UNCOVERED_DRY_DRY_RUINS) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), -240, 60, -200, 0, 6, MAKE_ENTITY_END) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH2_UNCOVERED_DRY_DRY_RUINS) + Call(MakeEntity, Ref(Entity_HeartBlock), -240, 60, -200, 0, 6, MAKE_ENTITY_END) + EndIf + Return + End }; diff --git a/src/world/area_sbk/sbk_03/sbk_03_1_main.c b/src/world/area_sbk/sbk_03/sbk_03_1_main.c index b28621cfbd3..8e4d5d28559 100644 --- a/src/world/area_sbk/sbk_03/sbk_03_1_main.c +++ b/src/world/area_sbk/sbk_03/sbk_03_1_main.c @@ -25,25 +25,25 @@ EvtScript N(EVS_ExitWalk_sbk_04_0) = EVT_EXIT_WALK(60, sbk_03_ENTRY_1, "sbk_04", EvtScript N(EVS_ExitWalk_sbk_13_2) = EVT_EXIT_WALK(60, sbk_03_ENTRY_3, "sbk_13", sbk_13_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_02_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_13_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_02_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_13_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_04/sbk_04_1_main.c b/src/world/area_sbk/sbk_04/sbk_04_1_main.c index 4ef4a7c1443..7eeebdc6f05 100644 --- a/src/world/area_sbk/sbk_04/sbk_04_1_main.c +++ b/src/world/area_sbk/sbk_04/sbk_04_1_main.c @@ -25,25 +25,25 @@ EvtScript N(EVS_ExitWalk_sbk_05_0) = EVT_EXIT_WALK(60, sbk_04_ENTRY_1, "sbk_05", EvtScript N(EVS_ExitWalk_sbk_14_2) = EVT_EXIT_WALK(60, sbk_04_ENTRY_3, "sbk_14", sbk_14_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_03_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_05_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_14_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_03_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_05_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_14_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_05/sbk_05_1_main.c b/src/world/area_sbk/sbk_05/sbk_05_1_main.c index 4022569af15..16bd8b08ee9 100644 --- a/src/world/area_sbk/sbk_05/sbk_05_1_main.c +++ b/src/world/area_sbk/sbk_05/sbk_05_1_main.c @@ -27,39 +27,39 @@ EvtScript N(EVS_ExitWalk_sbk_06_0) = EVT_EXIT_WALK(60, sbk_05_ENTRY_1, "sbk_06", EvtScript N(EVS_ExitWalk_sbk_15_2) = EVT_EXIT_WALK(60, sbk_05_ENTRY_3, "sbk_15", sbk_15_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_04_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_06_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_15_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_04_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_06_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_15_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(D_80240268_930F58) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(sbk_05_ENTRY_4) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_DEFAULT - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(sbk_05_ENTRY_4) + Exec(N(EVS_BindExitTriggers)) + CaseDefault + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_EXEC(N(D_80240268_930F58)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Exec(N(D_80240268_930F58)) + Wait(1) + Return + End }; diff --git a/src/world/area_sbk/sbk_05/sbk_05_2_entity.c b/src/world/area_sbk/sbk_05/sbk_05_2_entity.c index b8cc3262bed..d8787c0eaea 100644 --- a/src/world/area_sbk/sbk_05/sbk_05_2_entity.c +++ b/src/world/area_sbk/sbk_05/sbk_05_2_entity.c @@ -1,7 +1,7 @@ #include "sbk_05.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_FIRE_FLOWER, -100, 0, -445, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SBK05_Item_FireFlower) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_FIRE_FLOWER, -100, 0, -445, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SBK05_Item_FireFlower) + Return + End }; diff --git a/src/world/area_sbk/sbk_06/sbk_06_1_main.c b/src/world/area_sbk/sbk_06/sbk_06_1_main.c index e164f0e95be..62557e525b7 100644 --- a/src/world/area_sbk/sbk_06/sbk_06_1_main.c +++ b/src/world/area_sbk/sbk_06/sbk_06_1_main.c @@ -26,26 +26,26 @@ EvtScript N(EVS_ExitWalk_sbk_05_1) = EVT_EXIT_WALK(60, sbk_06_ENTRY_0, "sbk_05", EvtScript N(EVS_ExitWalk_sbk_16_2) = EVT_EXIT_WALK(60, sbk_06_ENTRY_3, "sbk_16", sbk_16_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_05_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_16_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_05_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_16_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Exec(N(EVS_SetupFoliage)) + Return + End }; diff --git a/src/world/area_sbk/sbk_06/sbk_06_3_foliage.c b/src/world/area_sbk/sbk_06/sbk_06_3_foliage.c index 7a97b9a7607..5b8a1e029db 100644 --- a/src/world/area_sbk/sbk_06/sbk_06_3_foliage.c +++ b/src/world/area_sbk/sbk_06/sbk_06_3_foliage.c @@ -29,9 +29,9 @@ BombTrigger N(BombPos_Tree1) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o191, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o191, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Return + End }; diff --git a/src/world/area_sbk/sbk_06/sbk_06_4_entity.c b/src/world/area_sbk/sbk_06/sbk_06_4_entity.c index d45131d675b..c4b792cc006 100644 --- a/src/world/area_sbk/sbk_06/sbk_06_4_entity.c +++ b/src/world/area_sbk/sbk_06/sbk_06_4_entity.c @@ -2,13 +2,13 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), 135, 60, -205, 0, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK06_MultiCoinBrick) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), -20, 60, -250, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 220, 60, 65, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 90, 60, 220, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), -70, 60, 100, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), -370, 60, 150, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_MulticoinBlock), 135, 60, -205, 0, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK06_MultiCoinBrick) + Call(MakeEntity, Ref(Entity_BrickBlock), -20, 60, -250, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), 220, 60, 65, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), 90, 60, 220, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), -70, 60, 100, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), -370, 60, 150, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_sbk/sbk_10/sbk_10_1_main.c b/src/world/area_sbk/sbk_10/sbk_10_1_main.c index 1d5f910c48f..3b096201d7a 100644 --- a/src/world/area_sbk/sbk_10/sbk_10_1_main.c +++ b/src/world/area_sbk/sbk_10/sbk_10_1_main.c @@ -25,25 +25,25 @@ EvtScript N(EVS_ExitWalk_sbk_00_3) = EVT_EXIT_WALK(60, sbk_10_ENTRY_2, "sbk_00", EvtScript N(EVS_ExitWalk_sbk_20_2) = EVT_EXIT_WALK(60, sbk_10_ENTRY_3, "sbk_20", sbk_20_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_11_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_00_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_20_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_11_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_00_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_20_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_10/sbk_10_2_entity.c b/src/world/area_sbk/sbk_10/sbk_10_2_entity.c index 67c8dad39b9..6f70bef9d17 100644 --- a/src/world/area_sbk/sbk_10/sbk_10_2_entity.c +++ b/src/world/area_sbk/sbk_10/sbk_10_2_entity.c @@ -2,8 +2,8 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 315, 93, 60, 0, ITEM_THUNDER_RAGE, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK10_HiddenItem_ThunderRage) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 315, 93, 60, 0, ITEM_THUNDER_RAGE, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK10_HiddenItem_ThunderRage) + Return + End }; diff --git a/src/world/area_sbk/sbk_11/sbk_11_1_main.c b/src/world/area_sbk/sbk_11/sbk_11_1_main.c index e014ab02673..011264c0e91 100644 --- a/src/world/area_sbk/sbk_11/sbk_11_1_main.c +++ b/src/world/area_sbk/sbk_11/sbk_11_1_main.c @@ -26,26 +26,26 @@ EvtScript N(EVS_ExitWalk_sbk_01_3) = EVT_EXIT_WALK(60, sbk_11_ENTRY_2, "sbk_01", EvtScript N(EVS_ExitWalk_sbk_21_2) = EVT_EXIT_WALK(60, sbk_11_ENTRY_3, "sbk_21", sbk_21_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_10_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_12_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_01_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_21_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_10_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_12_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_01_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_21_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_12/sbk_12_1_main.c b/src/world/area_sbk/sbk_12/sbk_12_1_main.c index c37b3a20846..66e00e78d28 100644 --- a/src/world/area_sbk/sbk_12/sbk_12_1_main.c +++ b/src/world/area_sbk/sbk_12/sbk_12_1_main.c @@ -26,26 +26,26 @@ EvtScript N(EVS_ExitWalk_sbk_02_3) = EVT_EXIT_WALK(60, sbk_12_ENTRY_2, "sbk_02", EvtScript N(EVS_ExitWalk_sbk_22_2) = EVT_EXIT_WALK(60, sbk_12_ENTRY_3, "sbk_22", sbk_22_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_11_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_13_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_02_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_22_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_11_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_13_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_02_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_22_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_13/sbk_13_1_main.c b/src/world/area_sbk/sbk_13/sbk_13_1_main.c index a3262065b18..4057217fd05 100644 --- a/src/world/area_sbk/sbk_13/sbk_13_1_main.c +++ b/src/world/area_sbk/sbk_13/sbk_13_1_main.c @@ -26,26 +26,26 @@ EvtScript N(EVS_ExitWalk_sbk_03_3) = EVT_EXIT_WALK(60, sbk_13_ENTRY_2, "sbk_03", EvtScript N(EVS_ExitWalk_sbk_23_2) = EVT_EXIT_WALK(60, sbk_13_ENTRY_3, "sbk_23", sbk_23_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_12_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_14_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_03_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_23_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_12_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_14_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_03_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_23_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_14/sbk_14_1_main.c b/src/world/area_sbk/sbk_14/sbk_14_1_main.c index e42b76fcb5c..cb37697d249 100644 --- a/src/world/area_sbk/sbk_14/sbk_14_1_main.c +++ b/src/world/area_sbk/sbk_14/sbk_14_1_main.c @@ -28,39 +28,39 @@ EvtScript N(EVS_ExitWalk_sbk_04_3) = EVT_EXIT_WALK(60, sbk_14_ENTRY_2, "sbk_04", EvtScript N(EVS_ExitWalk_sbk_24_2) = EVT_EXIT_WALK(60, sbk_14_ENTRY_3, "sbk_24", sbk_24_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_13_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_15_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_04_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_24_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_13_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_15_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_04_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_24_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(D_802402C0_9369A0) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(sbk_14_ENTRY_4) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_DEFAULT - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(sbk_14_ENTRY_4) + Exec(N(EVS_BindExitTriggers)) + CaseDefault + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_EXEC(N(D_802402C0_9369A0)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Exec(N(D_802402C0_9369A0)) + Wait(1) + Return + End }; diff --git a/src/world/area_sbk/sbk_14/sbk_14_2_entity.c b/src/world/area_sbk/sbk_14/sbk_14_2_entity.c index 093a27cc94c..cefb461f64e 100644 --- a/src/world/area_sbk/sbk_14/sbk_14_2_entity.c +++ b/src/world/area_sbk/sbk_14/sbk_14_2_entity.c @@ -15,23 +15,23 @@ TweesterPath* N(D_80240474_936B54)[] = { }; EvtScript N(D_8024047C_936B5C) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(GotoMap, EVT_PTR("sbk_05"), sbk_05_ENTRY_4) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(GotoMap, Ref("sbk_05"), sbk_05_ENTRY_4) + Wait(100) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Tweester), 327, 0, 8, 0, EVT_PTR(N(D_80240474_936B54)), MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(D_8024047C_936B5C))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), 0, 60, -100, 0, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK14_MultiCoinBrick) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -240, 0, 215, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK14_ItemBlock_Coin) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 220, 0, 150, 0, ITEM_HONEY_SYRUP, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK14_ItemBlock_HoneySyrup) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Tweester), 327, 0, 8, 0, Ref(N(D_80240474_936B54)), MAKE_ENTITY_END) + Call(AssignScript, Ref(N(D_8024047C_936B5C))) + Call(MakeEntity, Ref(Entity_MulticoinBlock), 0, 60, -100, 0, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK14_MultiCoinBrick) + Call(MakeEntity, Ref(Entity_YellowBlock), -240, 0, 215, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK14_ItemBlock_Coin) + Call(MakeEntity, Ref(Entity_YellowBlock), 220, 0, 150, 0, ITEM_HONEY_SYRUP, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK14_ItemBlock_HoneySyrup) + Return + End }; diff --git a/src/world/area_sbk/sbk_15/sbk_15_1_main.c b/src/world/area_sbk/sbk_15/sbk_15_1_main.c index 8ed17bd9c27..0af25ba3d2f 100644 --- a/src/world/area_sbk/sbk_15/sbk_15_1_main.c +++ b/src/world/area_sbk/sbk_15/sbk_15_1_main.c @@ -26,26 +26,26 @@ EvtScript N(EVS_ExitWalk_sbk_05_3) = EVT_EXIT_WALK(60, sbk_15_ENTRY_2, "sbk_05", EvtScript N(EVS_ExitWalk_sbk_25_2) = EVT_EXIT_WALK(60, sbk_15_ENTRY_3, "sbk_25", sbk_25_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_14_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_16_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_05_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_25_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_14_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_16_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_05_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_25_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_16/sbk_16_1_main.c b/src/world/area_sbk/sbk_16/sbk_16_1_main.c index caf51c323fa..5ff3c02d6fe 100644 --- a/src/world/area_sbk/sbk_16/sbk_16_1_main.c +++ b/src/world/area_sbk/sbk_16/sbk_16_1_main.c @@ -25,25 +25,25 @@ EvtScript N(EVS_ExitWalk_sbk_06_3) = EVT_EXIT_WALK(60, sbk_16_ENTRY_2, "sbk_06", EvtScript N(EVS_ExitWalk_sbk_26_2) = EVT_EXIT_WALK(60, sbk_16_ENTRY_3, "sbk_26", sbk_26_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_15_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_06_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_26_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_15_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_06_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_26_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Exec(N(EVS_SetupFoliage)) + Return + End }; diff --git a/src/world/area_sbk/sbk_16/sbk_16_2_foliage.c b/src/world/area_sbk/sbk_16/sbk_16_2_foliage.c index 86ccc50d4ef..d40e5b031f4 100644 --- a/src/world/area_sbk/sbk_16/sbk_16_2_foliage.c +++ b/src/world/area_sbk/sbk_16/sbk_16_2_foliage.c @@ -29,12 +29,12 @@ BombTrigger N(BombPos_Tree2) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o191, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o193, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o191, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o193, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Return + End }; diff --git a/src/world/area_sbk/sbk_20/sbk_20_1_main.c b/src/world/area_sbk/sbk_20/sbk_20_1_main.c index 7c3a52c8d14..55d0f6a3069 100644 --- a/src/world/area_sbk/sbk_20/sbk_20_1_main.c +++ b/src/world/area_sbk/sbk_20/sbk_20_1_main.c @@ -27,26 +27,26 @@ EvtScript N(EVS_ExitWalk_sbk_10_3) = EVT_EXIT_WALK(60, sbk_20_ENTRY_2, "sbk_10", EvtScript N(EVS_ExitWalk_sbk_30_2) = EVT_EXIT_WALK(60, sbk_20_ENTRY_3, "sbk_30", sbk_30_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_21_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_10_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_30_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_21_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_10_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_30_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_20/sbk_20_2_entity.c b/src/world/area_sbk/sbk_20/sbk_20_2_entity.c index 3699338d319..496f3bc9130 100644 --- a/src/world/area_sbk/sbk_20/sbk_20_2_entity.c +++ b/src/world/area_sbk/sbk_20/sbk_20_2_entity.c @@ -3,52 +3,52 @@ #include "entity.h" EvtScript N(EVS_OnHitInertBlock) = { - EVT_ADD(MV_BlockHitCounter, 1) - EVT_SWITCH(MV_BlockHitCounter) - EVT_CASE_EQ(1) - EVT_IF_EQ(GF_SBK20_ItemBlock_Mushroom, FALSE) - EVT_CALL(PlaySound, SOUND_CHIME_SOLVED_PUZZLE) - EVT_CALL(PlaySoundAt, SOUND_SPAWN_BLOCK, SOUND_SPACE_DEFAULT, -80, 60, -200) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, -80, 73, -200, 10) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -80, 60, -200, 0, ITEM_MUSHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK20_ItemBlock_Mushroom) - EVT_END_IF - EVT_CASE_EQ(10) - EVT_IF_EQ(GF_SBK20_ItemBlock_SuperShroom, FALSE) - EVT_CALL(PlaySound, SOUND_CHIME_SOLVED_PUZZLE) - EVT_CALL(PlaySoundAt, SOUND_SPAWN_BLOCK, SOUND_SPACE_DEFAULT, -180, 60, -200) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, -180, 73, -200, 10) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -180, 60, -200, 0, ITEM_SUPER_SHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK20_ItemBlock_SuperShroom) - EVT_END_IF - EVT_CASE_EQ(100) - EVT_IF_EQ(GF_SBK20_ItemBlock_UltraShroom, FALSE) - EVT_CALL(PlaySound, SOUND_CHIME_SOLVED_PUZZLE) - EVT_CALL(PlaySoundAt, SOUND_SPAWN_BLOCK, SOUND_SPACE_DEFAULT, -130, 60, -150) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 0, -130, 73, -150, 10) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -130, 60, -150, 0, ITEM_ULTRA_SHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK20_ItemBlock_UltraShroom) - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Add(MV_BlockHitCounter, 1) + Switch(MV_BlockHitCounter) + CaseEq(1) + IfEq(GF_SBK20_ItemBlock_Mushroom, FALSE) + Call(PlaySound, SOUND_CHIME_SOLVED_PUZZLE) + Call(PlaySoundAt, SOUND_SPAWN_BLOCK, SOUND_SPACE_DEFAULT, -80, 60, -200) + PlayEffect(EFFECT_SPARKLES, 0, -80, 73, -200, 10) + Call(MakeEntity, Ref(Entity_YellowBlock), -80, 60, -200, 0, ITEM_MUSHROOM, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK20_ItemBlock_Mushroom) + EndIf + CaseEq(10) + IfEq(GF_SBK20_ItemBlock_SuperShroom, FALSE) + Call(PlaySound, SOUND_CHIME_SOLVED_PUZZLE) + Call(PlaySoundAt, SOUND_SPAWN_BLOCK, SOUND_SPACE_DEFAULT, -180, 60, -200) + PlayEffect(EFFECT_SPARKLES, 0, -180, 73, -200, 10) + Call(MakeEntity, Ref(Entity_YellowBlock), -180, 60, -200, 0, ITEM_SUPER_SHROOM, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK20_ItemBlock_SuperShroom) + EndIf + CaseEq(100) + IfEq(GF_SBK20_ItemBlock_UltraShroom, FALSE) + Call(PlaySound, SOUND_CHIME_SOLVED_PUZZLE) + Call(PlaySoundAt, SOUND_SPAWN_BLOCK, SOUND_SPACE_DEFAULT, -130, 60, -150) + PlayEffect(EFFECT_SPARKLES, 0, -130, 73, -150, 10) + Call(MakeEntity, Ref(Entity_YellowBlock), -130, 60, -150, 0, ITEM_ULTRA_SHROOM, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK20_ItemBlock_UltraShroom) + EndIf + EndSwitch + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_InertYellowBlock), -130, 0, -200, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnHitInertBlock))) - EVT_IF_EQ(GF_SBK20_ItemBlock_Mushroom, TRUE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -80, 60, -200, 0, ITEM_MUSHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK20_ItemBlock_Mushroom) - EVT_END_IF - EVT_IF_EQ(GF_SBK20_ItemBlock_SuperShroom, TRUE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -180, 60, -200, 0, ITEM_SUPER_SHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK20_ItemBlock_SuperShroom) - EVT_END_IF - EVT_IF_EQ(GF_SBK20_ItemBlock_UltraShroom, TRUE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -130, 60, -150, 0, ITEM_ULTRA_SHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK20_ItemBlock_UltraShroom) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_InertYellowBlock), -130, 0, -200, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnHitInertBlock))) + IfEq(GF_SBK20_ItemBlock_Mushroom, TRUE) + Call(MakeEntity, Ref(Entity_YellowBlock), -80, 60, -200, 0, ITEM_MUSHROOM, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK20_ItemBlock_Mushroom) + EndIf + IfEq(GF_SBK20_ItemBlock_SuperShroom, TRUE) + Call(MakeEntity, Ref(Entity_YellowBlock), -180, 60, -200, 0, ITEM_SUPER_SHROOM, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK20_ItemBlock_SuperShroom) + EndIf + IfEq(GF_SBK20_ItemBlock_UltraShroom, TRUE) + Call(MakeEntity, Ref(Entity_YellowBlock), -130, 60, -150, 0, ITEM_ULTRA_SHROOM, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK20_ItemBlock_UltraShroom) + EndIf + Return + End }; diff --git a/src/world/area_sbk/sbk_21/sbk_21_1_main.c b/src/world/area_sbk/sbk_21/sbk_21_1_main.c index 29b937886dc..4371c65b2af 100644 --- a/src/world/area_sbk/sbk_21/sbk_21_1_main.c +++ b/src/world/area_sbk/sbk_21/sbk_21_1_main.c @@ -25,25 +25,25 @@ EvtScript N(EVS_ExitWalk_sbk_11_3) = EVT_EXIT_WALK(60, sbk_21_ENTRY_2, "sbk_11", EvtScript N(EVS_ExitWalk_sbk_31_2) = EVT_EXIT_WALK(60, sbk_21_ENTRY_3, "sbk_31", sbk_31_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_20_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_22_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_11_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_31_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_20_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_22_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_11_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_31_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_22/sbk_22_1_main.c b/src/world/area_sbk/sbk_22/sbk_22_1_main.c index a8de3a2fad8..11a6cdb5590 100644 --- a/src/world/area_sbk/sbk_22/sbk_22_1_main.c +++ b/src/world/area_sbk/sbk_22/sbk_22_1_main.c @@ -27,27 +27,27 @@ EvtScript N(EVS_ExitWalk_sbk_12_3) = EVT_EXIT_WALK(60, sbk_22_ENTRY_2, "sbk_12", EvtScript N(EVS_ExitWalk_sbk_32_2) = EVT_EXIT_WALK(60, sbk_22_ENTRY_3, "sbk_32", sbk_32_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_21_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_23_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_12_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_32_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_21_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_23_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_12_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_32_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_22/sbk_22_3_entity.c b/src/world/area_sbk/sbk_22/sbk_22_3_entity.c index 030e94a8ae7..4ccd77cca3d 100644 --- a/src/world/area_sbk/sbk_22/sbk_22_3_entity.c +++ b/src/world/area_sbk/sbk_22/sbk_22_3_entity.c @@ -2,16 +2,16 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -225, 0, -225, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK22_ItemBlock_CoinA) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -225, 0, 225, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK22_ItemBlock_CoinB) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 225, 0, -225, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK22_ItemBlock_CoinC) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 225, 0, 225, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK22_ItemBlock_CoinD) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 0, 0, 0, 0, ITEM_FIRE_FLOWER, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK22_ItemBlock_FireFlower) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_YellowBlock), -225, 0, -225, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK22_ItemBlock_CoinA) + Call(MakeEntity, Ref(Entity_YellowBlock), -225, 0, 225, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK22_ItemBlock_CoinB) + Call(MakeEntity, Ref(Entity_YellowBlock), 225, 0, -225, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK22_ItemBlock_CoinC) + Call(MakeEntity, Ref(Entity_YellowBlock), 225, 0, 225, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK22_ItemBlock_CoinD) + Call(MakeEntity, Ref(Entity_YellowBlock), 0, 0, 0, 0, ITEM_FIRE_FLOWER, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK22_ItemBlock_FireFlower) + Return + End }; diff --git a/src/world/area_sbk/sbk_23/sbk_23_1_main.c b/src/world/area_sbk/sbk_23/sbk_23_1_main.c index 87bc2dba774..1fb57f97327 100644 --- a/src/world/area_sbk/sbk_23/sbk_23_1_main.c +++ b/src/world/area_sbk/sbk_23/sbk_23_1_main.c @@ -26,26 +26,26 @@ EvtScript N(EVS_ExitWalk_sbk_13_3) = EVT_EXIT_WALK(60, sbk_23_ENTRY_2, "sbk_13", EvtScript N(EVS_ExitWalk_sbk_33_2) = EVT_EXIT_WALK(60, sbk_23_ENTRY_3, "sbk_33", sbk_33_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_22_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_24_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_13_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_33_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_22_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_24_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_13_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_33_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_23/sbk_23_2_entity.c b/src/world/area_sbk/sbk_23/sbk_23_2_entity.c index 273788a4b86..b7628351b1c 100644 --- a/src/world/area_sbk/sbk_23/sbk_23_2_entity.c +++ b/src/world/area_sbk/sbk_23/sbk_23_2_entity.c @@ -15,17 +15,17 @@ TweesterPath* N(D_802403F4_93AB54)[] = { }; EvtScript N(D_802403FC_93AB5C) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(GotoMap, EVT_PTR("sbk_14"), sbk_14_ENTRY_4) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(GotoMap, Ref("sbk_14"), sbk_14_ENTRY_4) + Wait(100) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Tweester), 327, 0, 8, 0, EVT_PTR(N(D_802403F4_93AB54)), MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(D_802403FC_93AB5C))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Tweester), 327, 0, 8, 0, Ref(N(D_802403F4_93AB54)), MAKE_ENTITY_END) + Call(AssignScript, Ref(N(D_802403FC_93AB5C))) + Return + End }; diff --git a/src/world/area_sbk/sbk_24/sbk_24_1_main.c b/src/world/area_sbk/sbk_24/sbk_24_1_main.c index 315ce63e687..c7eaaeff105 100644 --- a/src/world/area_sbk/sbk_24/sbk_24_1_main.c +++ b/src/world/area_sbk/sbk_24/sbk_24_1_main.c @@ -29,40 +29,40 @@ EvtScript N(EVS_ExitWalk_sbk_14_3) = EVT_EXIT_WALK(60, sbk_24_ENTRY_2, "sbk_14", EvtScript N(EVS_ExitWalk_sbk_34_2) = EVT_EXIT_WALK(60, sbk_24_ENTRY_3, "sbk_34", sbk_34_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_23_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_25_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_14_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_34_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_23_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_25_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_14_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_34_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(D_80240600_93B230) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(sbk_24_ENTRY_4) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_DEFAULT - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(sbk_24_ENTRY_4) + Exec(N(EVS_BindExitTriggers)) + CaseDefault + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_EXEC(N(D_80240600_93B230)) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Exec(N(D_80240600_93B230)) + Wait(1) + Exec(N(EVS_SetupFoliage)) + Return + End }; diff --git a/src/world/area_sbk/sbk_24/sbk_24_3_entity.c b/src/world/area_sbk/sbk_24/sbk_24_3_entity.c index 676b94b65ec..191cfee3fa6 100644 --- a/src/world/area_sbk/sbk_24/sbk_24_3_entity.c +++ b/src/world/area_sbk/sbk_24/sbk_24_3_entity.c @@ -2,8 +2,8 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenRedBlock), 340, 60, -170, 0, ITEM_RUNAWAY_PAY, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK24_HiddenBadge_RunawayPay) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HiddenRedBlock), 340, 60, -170, 0, ITEM_RUNAWAY_PAY, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK24_HiddenBadge_RunawayPay) + Return + End }; diff --git a/src/world/area_sbk/sbk_24/sbk_24_4_foliage.c b/src/world/area_sbk/sbk_24/sbk_24_4_foliage.c index 841a9386fd1..b779e47c344 100644 --- a/src/world/area_sbk/sbk_24/sbk_24_4_foliage.c +++ b/src/world/area_sbk/sbk_24/sbk_24_4_foliage.c @@ -42,15 +42,15 @@ BombTrigger N(BombPos_Tree3) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o49, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o81, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o82, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree3)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o49, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o81, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree3))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o82, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree3)), 1, 0) + Return + End }; diff --git a/src/world/area_sbk/sbk_25/sbk_25_1_main.c b/src/world/area_sbk/sbk_25/sbk_25_1_main.c index e5f6c74871c..7d801b1c71b 100644 --- a/src/world/area_sbk/sbk_25/sbk_25_1_main.c +++ b/src/world/area_sbk/sbk_25/sbk_25_1_main.c @@ -28,28 +28,28 @@ EvtScript N(EVS_ExitWalk_sbk_15_3) = EVT_EXIT_WALK(60, sbk_25_ENTRY_2, "sbk_15", EvtScript N(EVS_ExitWalk_sbk_35_2) = EVT_EXIT_WALK(60, sbk_25_ENTRY_3, "sbk_35", sbk_35_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_24_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_26_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_15_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_35_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_24_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_26_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_15_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_35_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Exec(N(EVS_SetupFoliage)) + Return + End }; diff --git a/src/world/area_sbk/sbk_25/sbk_25_3_foliage.c b/src/world/area_sbk/sbk_25/sbk_25_3_foliage.c index 0c49ab77e4f..dca40cf343f 100644 --- a/src/world/area_sbk/sbk_25/sbk_25_3_foliage.c +++ b/src/world/area_sbk/sbk_25/sbk_25_3_foliage.c @@ -29,12 +29,12 @@ BombTrigger N(BombPos_Tree2) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o197, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o199, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o197, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o199, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Return + End }; diff --git a/src/world/area_sbk/sbk_25/sbk_25_4_entity.c b/src/world/area_sbk/sbk_25/sbk_25_4_entity.c index d59742e4d22..edfcb88463a 100644 --- a/src/world/area_sbk/sbk_25/sbk_25_4_entity.c +++ b/src/world/area_sbk/sbk_25/sbk_25_4_entity.c @@ -2,15 +2,15 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), 0, 60, -100, 0, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK25_MultiCoinBrickA) - EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), 120, 60, 185, 0, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK25_MultiCoinBrickB) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), -300, 60, -80, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), -240, 60, 230, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), -75, 60, 295, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), -75, 60, -360, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 270, 60, -150, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_MulticoinBlock), 0, 60, -100, 0, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK25_MultiCoinBrickA) + Call(MakeEntity, Ref(Entity_MulticoinBlock), 120, 60, 185, 0, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK25_MultiCoinBrickB) + Call(MakeEntity, Ref(Entity_BrickBlock), -300, 60, -80, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), -240, 60, 230, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), -75, 60, 295, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), -75, 60, -360, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), 270, 60, -150, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_sbk/sbk_26/sbk_26_1_main.c b/src/world/area_sbk/sbk_26/sbk_26_1_main.c index ff04ca0cccc..b89515adf62 100644 --- a/src/world/area_sbk/sbk_26/sbk_26_1_main.c +++ b/src/world/area_sbk/sbk_26/sbk_26_1_main.c @@ -26,26 +26,26 @@ EvtScript N(EVS_ExitWalk_sbk_16_3) = EVT_EXIT_WALK(60, sbk_26_ENTRY_2, "sbk_16", EvtScript N(EVS_ExitWalk_sbk_36_2) = EVT_EXIT_WALK(60, sbk_26_ENTRY_3, "sbk_36", sbk_36_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_25_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_16_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_36_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_25_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_16_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_36_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Exec(N(EVS_SetupFoliage)) + Return + End }; diff --git a/src/world/area_sbk/sbk_26/sbk_26_3_foliage.c b/src/world/area_sbk/sbk_26/sbk_26_3_foliage.c index 0315af3a126..fe49f92d6a3 100644 --- a/src/world/area_sbk/sbk_26/sbk_26_3_foliage.c +++ b/src/world/area_sbk/sbk_26/sbk_26_3_foliage.c @@ -29,9 +29,9 @@ BombTrigger N(BombPos_Tree1) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o191, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o191, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Return + End }; diff --git a/src/world/area_sbk/sbk_30/sbk_30_1_music.c b/src/world/area_sbk/sbk_30/sbk_30_1_music.c index 198a7551811..20f2d753b64 100644 --- a/src/world/area_sbk/sbk_30/sbk_30_1_music.c +++ b/src/world/area_sbk/sbk_30/sbk_30_1_music.c @@ -1,15 +1,15 @@ #include "sbk_30.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(sbk_30_ENTRY_4) - EVT_CASE_OR_EQ(sbk_30_ENTRY_5) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseOrEq(sbk_30_ENTRY_4) + CaseOrEq(sbk_30_ENTRY_5) + EndCaseGroup + CaseDefault + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/world/area_sbk/sbk_30/sbk_30_2_main.c b/src/world/area_sbk/sbk_30/sbk_30_2_main.c index 906a0cde50e..57f483e5be6 100644 --- a/src/world/area_sbk/sbk_30/sbk_30_2_main.c +++ b/src/world/area_sbk/sbk_30/sbk_30_2_main.c @@ -10,91 +10,91 @@ EvtScript N(EVS_ExitWalk_sbk_20_3) = EVT_EXIT_WALK(60, sbk_30_ENTRY_2, "sbk_20", EvtScript N(EVS_ExitWalk_sbk_40_2) = EVT_EXIT_WALK(60, sbk_30_ENTRY_3, "sbk_40", sbk_40_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_99_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_31_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_20_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_40_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_99_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_31_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_20_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_40_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(sbk_30_ENTRY_0) - EVT_IF_EQ(GF_SBK30_Visited, FALSE) - EVT_SET(GF_SBK30_Visited, TRUE) - EVT_SET(GB_StoryProgress, STORY_CH2_ARRIVED_AT_DRY_DRY_DESERT) - EVT_END_IF - EVT_CASE_EQ(sbk_30_ENTRY_1) - EVT_CASE_EQ(sbk_30_ENTRY_2) - EVT_CASE_EQ(sbk_30_ENTRY_3) - EVT_CASE_EQ(sbk_30_ENTRY_4) - EVT_RETURN - EVT_END_SWITCH - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(sbk_30_ENTRY_0) + IfEq(GF_SBK30_Visited, FALSE) + Set(GF_SBK30_Visited, TRUE) + Set(GB_StoryProgress, STORY_CH2_ARRIVED_AT_DRY_DRY_DESERT) + EndIf + CaseEq(sbk_30_ENTRY_1) + CaseEq(sbk_30_ENTRY_2) + CaseEq(sbk_30_ENTRY_3) + CaseEq(sbk_30_ENTRY_4) + Return + EndSwitch + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; EvtScript N(EVS_Scene_RuinsRising) = { - EVT_CALL(PlaySound, SOUND_LOOP_SBK_RUINS_RISING_DISTANT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 193, 0, -237) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 193, 0, -237) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(N(SetModelTintMode), APPLY_TINT_BG, NULL, ENV_TINT_REMAP) - EVT_CALL(N(SetModelTintMode), APPLY_TINT_GROUPS, -1, ENV_TINT_REMAP) - EVT_CALL(N(SetModelTintParams), ENV_TINT_REMAP, 44, 32, 177, 0, 0, 0, 0, 0, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 300, EVT_FLOAT(0.25)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(60) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, sbk_30_ENTRY_4) - EVT_CALL(GotoMap, EVT_PTR("dro_01"), dro_01_ENTRY_3) - EVT_ELSE - EVT_CALL(GotoMap, EVT_PTR("dro_01"), dro_01_ENTRY_4) - EVT_END_IF - EVT_WAIT(100) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(PlaySound, SOUND_LOOP_SBK_RUINS_RISING_DISTANT) + Call(UseSettingsFrom, CAM_DEFAULT, 193, 0, -237) + Call(SetPanTarget, CAM_DEFAULT, 193, 0, -237) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(N(SetModelTintMode), APPLY_TINT_BG, NULL, ENV_TINT_REMAP) + Call(N(SetModelTintMode), APPLY_TINT_GROUPS, -1, ENV_TINT_REMAP) + Call(N(SetModelTintParams), ENV_TINT_REMAP, 44, 32, 177, 0, 0, 0, 0, 0, 0) + Call(DisablePlayerInput, TRUE) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 300, Float(0.25)) + EndThread + Thread + Wait(60) + Call(GetEntryID, LVar0) + IfEq(LVar0, sbk_30_ENTRY_4) + Call(GotoMap, Ref("dro_01"), dro_01_ENTRY_3) + Else + Call(GotoMap, Ref("dro_01"), dro_01_ENTRY_4) + EndIf + Wait(100) + EndThread + Return + End }; MAP_RODATA_PAD(1, exits); // can be fixed with subalign 16 for this map EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_IF_LT(GB_StoryProgress, STORY_UNUSED_FFFFFFCC) - EVT_CALL(EnableGroup, MODEL_g28, FALSE) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_ELSE - EVT_CALL(EnableGroup, MODEL_g23, FALSE) - EVT_CALL(EnableGroup, MODEL_sakji_tent, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_Default, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetZoneEnabled, ZONE_o25, FALSE) - EVT_END_IF - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(sbk_30_ENTRY_4) - EVT_CASE_OR_EQ(sbk_30_ENTRY_5) - EVT_EXEC_WAIT(N(EVS_Scene_RuinsRising)) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(N(SpawnSunEffect)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + IfLt(GB_StoryProgress, STORY_UNUSED_FFFFFFCC) + Call(EnableGroup, MODEL_g28, FALSE) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Else + Call(EnableGroup, MODEL_g23, FALSE) + Call(EnableGroup, MODEL_sakji_tent, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_Default, COLLIDER_FLAGS_UPPER_MASK) + Call(SetZoneEnabled, ZONE_o25, FALSE) + EndIf + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Exec(N(EVS_SetupFoliage)) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseOrEq(sbk_30_ENTRY_4) + CaseOrEq(sbk_30_ENTRY_5) + ExecWait(N(EVS_Scene_RuinsRising)) + EndCaseGroup + CaseDefault + Call(N(SpawnSunEffect)) + EndSwitch + Return + End }; diff --git a/src/world/area_sbk/sbk_30/sbk_30_3_npc.c b/src/world/area_sbk/sbk_30/sbk_30_3_npc.c index 382547c06ed..2b973b7231e 100644 --- a/src/world/area_sbk/sbk_30/sbk_30_3_npc.c +++ b/src/world/area_sbk/sbk_30/sbk_30_3_npc.c @@ -30,22 +30,22 @@ s32 N(LetterList)[] = { }; EvtScript N(EVS_DeliveryPrompt) = { - EVT_CALL(N(LetterDelivery_Init), + Call(N(LetterDelivery_Init), NPC_Kolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, ITEM_LETTER_TO_KOLORADO, ITEM_NONE, MSG_CH2_004A, MSG_CH2_004B, MSG_CH2_004C, MSG_CH2_004D, - EVT_PTR(N(LetterList))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) - EVT_RETURN - EVT_END + Ref(N(LetterList))) + ExecWait(N(EVS_DoLetterDelivery)) + Return + End }; EvtScript N(EVS_DeliveryReward) = { - EVT_IF_EQ(LVarC, DELIVERY_ACCEPTED) + IfEq(LVarC, DELIVERY_ACCEPTED) EVT_GIVE_STAR_PIECE() - EVT_END_IF - EVT_RETURN - EVT_END + EndIf + Return + End }; s32 N(ArtifactList)[] = { @@ -54,243 +54,243 @@ s32 N(ArtifactList)[] = { }; EvtScript N(EVS_ArtifactPrompt) = { - EVT_SET(GF_SBK_GaveArtifactToKolorado, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_0044) + Set(GF_SBK_GaveArtifactToKolorado, TRUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_0044) EVT_GIVE_STAR_PIECE() - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_0045) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_0045) + Return + End }; EvtScript N(EVS_NpcInteract_Kolorado) = { - EVT_CALL(GetNpcAnimation, NPC_SELF, LVar9) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) - EVT_IF_EQ(GF_SBK30_Met_Kolorado, FALSE) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4.0), 0, EVT_FLOAT(300.0), EVT_FLOAT(15.0), EVT_FLOAT(-7.5)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_0037) - EVT_CALL(ResetCam, CAM_DEFAULT, 4) - EVT_SET(GF_SBK30_Met_Kolorado, TRUE) - EVT_GOTO(50) - EVT_END_IF - EVT_IF_EQ(GF_SBK_GaveArtifactToKolorado, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_0046) - EVT_GOTO(50) - EVT_END_IF - EVT_CALL(HasKeyItem, ITEM_ARTIFACT, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_IF_EQ(GF_SBK_KeptArtifactFromKolorado, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_0043) - EVT_ELSE - EVT_SET(GF_SBK_KeptArtifactFromKolorado, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_0040) - EVT_END_IF + Call(GetNpcAnimation, NPC_SELF, LVar9) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) + IfEq(GF_SBK30_Met_Kolorado, FALSE) + Call(AdjustCam, CAM_DEFAULT, Float(4.0), 0, Float(300.0), Float(15.0), Float(-7.5)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_0037) + Call(ResetCam, CAM_DEFAULT, 4) + Set(GF_SBK30_Met_Kolorado, TRUE) + Goto(50) + EndIf + IfEq(GF_SBK_GaveArtifactToKolorado, TRUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_0046) + Goto(50) + EndIf + Call(HasKeyItem, ITEM_ARTIFACT, LVar0) + IfEq(LVar0, 1) + IfEq(GF_SBK_KeptArtifactFromKolorado, TRUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_0043) + Else + Set(GF_SBK_KeptArtifactFromKolorado, TRUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_0040) + EndIf EVT_CHOOSE_KEY_ITEM_FROM(N(ArtifactList)) - EVT_SWITCH(LVar0) - EVT_CASE_GE(1) - EVT_EXEC_WAIT(N(EVS_ArtifactPrompt)) - EVT_GOTO(50) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_0041) + Switch(LVar0) + CaseGe(1) + ExecWait(N(EVS_ArtifactPrompt)) + Goto(50) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_0041) EVT_CHOOSE_KEY_ITEM_FROM(N(ArtifactList)) - EVT_SWITCH(LVar0) - EVT_CASE_GE(1) - EVT_EXEC_WAIT(N(EVS_ArtifactPrompt)) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_0042) - EVT_GOTO(50) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST) - EVT_IF_EQ(GF_DRO02_Sheek_SpokeTo, FALSE) - EVT_IF_EQ(AF_SBK_04, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_0039) - EVT_SET(AF_SBK_04, TRUE) - EVT_GOTO(50) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_003A) - EVT_GOTO(50) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(GF_DRO02_Sheek_AskedAboutRuins, FALSE) - EVT_IF_EQ(AF_SBK_05, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_003B) - EVT_SET(GF_SBK30_Kolorado_SharedRumorAboutMoustafa, TRUE) - EVT_SET(AF_SBK_05, TRUE) - EVT_GOTO(50) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_003C) - EVT_GOTO(50) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(GF_SBK30_Kolorado_SharedRumorAboutMoustafa, TRUE) - EVT_IF_EQ(GF_DRO02_Sheek_AskedAboutMoustafa, FALSE) - EVT_IF_EQ(AF_SBK_06, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_003D) - EVT_SET(AF_SBK_06, TRUE) - EVT_GOTO(50) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_003E) - EVT_GOTO(50) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_003F) - EVT_GOTO(50) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_0038) - EVT_LABEL(50) - EVT_LABEL(90) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_EQ(LVar0, PARTNER_KOOPER) - EVT_IF_EQ(GF_SBK30_KooperMetKolorado, FALSE) - EVT_SET(GF_SBK30_KooperMetKolorado, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToNpc, NPC_PARTNER, ANIM_WorldKooper_CelebrateLoop, ANIM_WorldKooper_Idle, 0, NPC_SELF, MSG_CH2_0047) - EVT_CALL(SpeakToNpc, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, NPC_PARTNER, MSG_CH2_0048) - EVT_CALL(SpeakToNpc, NPC_PARTNER, ANIM_WorldKooper_CelebrateLoop, ANIM_WorldKooper_Idle, 0, NPC_SELF, MSG_CH2_0049) - EVT_CALL(EnablePartnerAI) - EVT_END_IF - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, LVar9) - EVT_EXEC_WAIT(N(EVS_DeliveryPrompt)) - EVT_EXEC_WAIT(N(EVS_DeliveryReward)) - EVT_IF_NE(LVarC, 0) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + Switch(LVar0) + CaseGe(1) + ExecWait(N(EVS_ArtifactPrompt)) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_0042) + Goto(50) + EndSwitch + EndSwitch + EndIf + IfGe(GB_StoryProgress, STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST) + IfEq(GF_DRO02_Sheek_SpokeTo, FALSE) + IfEq(AF_SBK_04, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_0039) + Set(AF_SBK_04, TRUE) + Goto(50) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_003A) + Goto(50) + EndIf + EndIf + IfEq(GF_DRO02_Sheek_AskedAboutRuins, FALSE) + IfEq(AF_SBK_05, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_003B) + Set(GF_SBK30_Kolorado_SharedRumorAboutMoustafa, TRUE) + Set(AF_SBK_05, TRUE) + Goto(50) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_003C) + Goto(50) + EndIf + EndIf + IfEq(GF_SBK30_Kolorado_SharedRumorAboutMoustafa, TRUE) + IfEq(GF_DRO02_Sheek_AskedAboutMoustafa, FALSE) + IfEq(AF_SBK_06, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_003D) + Set(AF_SBK_06, TRUE) + Goto(50) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_003E) + Goto(50) + EndIf + EndIf + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_003F) + Goto(50) + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH2_0038) + Label(50) + Label(90) + Call(GetCurrentPartnerID, LVar0) + IfEq(LVar0, PARTNER_KOOPER) + IfEq(GF_SBK30_KooperMetKolorado, FALSE) + Set(GF_SBK30_KooperMetKolorado, TRUE) + Call(DisablePartnerAI, 0) + Call(SpeakToNpc, NPC_PARTNER, ANIM_WorldKooper_CelebrateLoop, ANIM_WorldKooper_Idle, 0, NPC_SELF, MSG_CH2_0047) + Call(SpeakToNpc, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, NPC_PARTNER, MSG_CH2_0048) + Call(SpeakToNpc, NPC_PARTNER, ANIM_WorldKooper_CelebrateLoop, ANIM_WorldKooper_Idle, 0, NPC_SELF, MSG_CH2_0049) + Call(EnablePartnerAI) + EndIf + EndIf + Call(SetNpcAnimation, NPC_SELF, LVar9) + ExecWait(N(EVS_DeliveryPrompt)) + ExecWait(N(EVS_DeliveryReward)) + IfNe(LVarC, 0) + Return + EndIf + Return + End }; EvtScript N(EVS_NpcIdle_Kolorado) = { - EVT_LOOP(0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) - EVT_WAIT(15) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) - EVT_CALL(NpcMoveTo, NPC_SELF, 97, -179, 120) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) - EVT_WAIT(15) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) - EVT_CALL(NpcMoveTo, NPC_SELF, 200, -100, 120) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) + Wait(15) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) + Call(NpcMoveTo, NPC_SELF, 97, -179, 120) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) + Wait(15) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) + Call(NpcMoveTo, NPC_SELF, 200, -100, 120) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_KoloradoPanic) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(4.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, 145, -145, 0) - EVT_LABEL(0) - EVT_CALL(RandInt, 30, LVar0) - EVT_ADD(LVar0, 1) - EVT_WAIT(LVar0) - EVT_CALL(GetNpcYaw, NPC_SELF, LVar0) - EVT_ADD(LVar0, 180) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 5) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) + Call(SetNpcSpeed, NPC_SELF, Float(4.0)) + Call(NpcMoveTo, NPC_SELF, 145, -145, 0) + Label(0) + Call(RandInt, 30, LVar0) + Add(LVar0, 1) + Wait(LVar0) + Call(GetNpcYaw, NPC_SELF, LVar0) + Add(LVar0, 180) + Call(InterpNpcYaw, NPC_SELF, LVar0, 5) + Goto(0) + Return + End }; EvtScript N(EVS_NpcInit_Kolorado) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(sbk_30_ENTRY_4) - EVT_CASE_OR_EQ(sbk_30_ENTRY_5) - EVT_CALL(SetNpcPos, NPC_SELF, 210, 0, -210) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_KoloradoPanic))) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Kolorado))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Kolorado))) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseOrEq(sbk_30_ENTRY_4) + CaseOrEq(sbk_30_ENTRY_5) + Call(SetNpcPos, NPC_SELF, 210, 0, -210) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_KoloradoPanic))) + EndCaseGroup + CaseDefault + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Kolorado))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Kolorado))) + EndSwitch + Return + End }; EvtScript N(EVS_NpcIdle_Archeologist_01) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Archeologist_Talk) - EVT_LABEL(0) - EVT_CALL(RandInt, 50, LVar0) - EVT_ADD(LVar0, 1) - EVT_WAIT(LVar0) - EVT_CALL(GetNpcYaw, NPC_SELF, LVar0) - EVT_ADD(LVar0, 180) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 5) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_Archeologist_Talk) + Label(0) + Call(RandInt, 50, LVar0) + Add(LVar0, 1) + Wait(LVar0) + Call(GetNpcYaw, NPC_SELF, LVar0) + Add(LVar0, 180) + Call(InterpNpcYaw, NPC_SELF, LVar0, 5) + Goto(0) + Return + End }; EvtScript N(EVS_NpcInteract_Archeologist_01) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_GOT_PULSE_STONE) - EVT_IF_EQ(AF_SBK_02, FALSE) - EVT_SET(LVar0, MSG_CH2_004E) - EVT_SET(AF_SBK_02, TRUE) - EVT_ELSE - EVT_SET(LVar0, MSG_CH2_004F) - EVT_SET(AF_SBK_02, FALSE) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_IF_EQ(GF_SBK_GaveArtifactToKolorado, FALSE) - EVT_SET(LVar0, MSG_CH2_0050) - EVT_ELSE - EVT_SET(LVar0, MSG_CH2_0051) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Archeologist_Talk, ANIM_Archeologist_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_GOT_PULSE_STONE) + IfEq(AF_SBK_02, FALSE) + Set(LVar0, MSG_CH2_004E) + Set(AF_SBK_02, TRUE) + Else + Set(LVar0, MSG_CH2_004F) + Set(AF_SBK_02, FALSE) + EndIf + CaseDefault + IfEq(GF_SBK_GaveArtifactToKolorado, FALSE) + Set(LVar0, MSG_CH2_0050) + Else + Set(LVar0, MSG_CH2_0051) + EndIf + EndSwitch + Call(SpeakToPlayer, NPC_SELF, ANIM_Archeologist_Talk, ANIM_Archeologist_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_Archeologist_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Archeologist_01))) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(sbk_30_ENTRY_4) - EVT_CASE_OR_EQ(sbk_30_ENTRY_5) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Archeologist_01))) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Archeologist_01))) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseOrEq(sbk_30_ENTRY_4) + CaseOrEq(sbk_30_ENTRY_5) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Archeologist_01))) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Archeologist_02) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_GOT_PULSE_STONE) - EVT_IF_EQ(AF_SBK_03, FALSE) - EVT_SET(LVar0, MSG_CH2_0052) - EVT_SET(AF_SBK_03, TRUE) - EVT_ELSE - EVT_SET(LVar0, MSG_CH2_0053) - EVT_SET(AF_SBK_03, FALSE) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_IF_EQ(GF_SBK_GaveArtifactToKolorado, FALSE) - EVT_SET(LVar0, MSG_CH2_0054) - EVT_ELSE - EVT_SET(LVar0, MSG_CH2_0055) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Archeologist_Talk, ANIM_Archeologist_Idle, 0, LVar0) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_GOT_PULSE_STONE) + IfEq(AF_SBK_03, FALSE) + Set(LVar0, MSG_CH2_0052) + Set(AF_SBK_03, TRUE) + Else + Set(LVar0, MSG_CH2_0053) + Set(AF_SBK_03, FALSE) + EndIf + CaseDefault + IfEq(GF_SBK_GaveArtifactToKolorado, FALSE) + Set(LVar0, MSG_CH2_0054) + Else + Set(LVar0, MSG_CH2_0055) + EndIf + EndSwitch + Call(SpeakToPlayer, NPC_SELF, ANIM_Archeologist_Talk, ANIM_Archeologist_Idle, 0, LVar0) + Return + End }; EvtScript N(EVS_NpcInit_Archeologist_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Archeologist_02))) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(sbk_30_ENTRY_4) - EVT_CASE_OR_EQ(sbk_30_ENTRY_5) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Archeologist_01))) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Archeologist_02))) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseOrEq(sbk_30_ENTRY_4) + CaseOrEq(sbk_30_ENTRY_5) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Archeologist_01))) + EndCaseGroup + EndSwitch + Return + End }; NpcData N(NpcData_Archeologist_02)[] = { diff --git a/src/world/area_sbk/sbk_30/sbk_30_4_foliage.c b/src/world/area_sbk/sbk_30/sbk_30_4_foliage.c index 7c82972527d..73a71d4df39 100644 --- a/src/world/area_sbk/sbk_30/sbk_30_4_foliage.c +++ b/src/world/area_sbk/sbk_30/sbk_30_4_foliage.c @@ -35,13 +35,13 @@ BombTrigger N(BombPos_Tree) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_IF_LT(GB_StoryProgress, STORY_UNUSED_FFFFFFCC) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o84, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree)), 1, 0) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_UNUSED_FFFFFFCC) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + Else + Set(LVar0, Ref(N(ShakeTree_Tree1))) + EndIf + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o84, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree)), 1, 0) + Return + End }; diff --git a/src/world/area_sbk/sbk_31/sbk_31_1_main.c b/src/world/area_sbk/sbk_31/sbk_31_1_main.c index a3876963fdd..5d2ebee18fb 100644 --- a/src/world/area_sbk/sbk_31/sbk_31_1_main.c +++ b/src/world/area_sbk/sbk_31/sbk_31_1_main.c @@ -26,26 +26,26 @@ EvtScript N(EVS_ExitWalk_sbk_21_3) = EVT_EXIT_WALK(60, sbk_31_ENTRY_2, "sbk_21", EvtScript N(EVS_ExitWalk_sbk_41_2) = EVT_EXIT_WALK(60, sbk_31_ENTRY_3, "sbk_41", sbk_41_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_30_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_32_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_21_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_41_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_30_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_32_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_21_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_41_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_32/sbk_32_1_main.c b/src/world/area_sbk/sbk_32/sbk_32_1_main.c index 61bae26b5da..1ee61c762ad 100644 --- a/src/world/area_sbk/sbk_32/sbk_32_1_main.c +++ b/src/world/area_sbk/sbk_32/sbk_32_1_main.c @@ -27,39 +27,39 @@ EvtScript N(EVS_ExitWalk_sbk_22_3) = EVT_EXIT_WALK(60, sbk_32_ENTRY_2, "sbk_22", EvtScript N(EVS_ExitWalk_sbk_42_2) = EVT_EXIT_WALK(60, sbk_32_ENTRY_3, "sbk_42", sbk_42_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_31_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_33_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_22_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_42_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_31_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_33_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_22_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_42_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(sbk_32_ENTRY_4) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_DEFAULT - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(sbk_32_ENTRY_4) + Exec(N(EVS_BindExitTriggers)) + CaseDefault + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_sbk/sbk_33/sbk_33_1_entity.c b/src/world/area_sbk/sbk_33/sbk_33_1_entity.c index e6260b67126..6f2c9777574 100644 --- a/src/world/area_sbk/sbk_33/sbk_33_1_entity.c +++ b/src/world/area_sbk/sbk_33/sbk_33_1_entity.c @@ -15,19 +15,19 @@ TweesterPath* N(TweesterPaths)[] = { }; EvtScript N(D_802400FC_945ACC) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(GotoMap, EVT_PTR("sbk_24"), sbk_24_ENTRY_4) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(GotoMap, Ref("sbk_24"), sbk_24_ENTRY_4) + Wait(100) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 0, 0, 225, 0, MODEL_stage, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_SBK33_HiddenPanel) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Tweester), 327, 0, 8, 0, EVT_PTR(N(TweesterPaths)), MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(D_802400FC_945ACC))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HiddenPanel), 0, 0, 225, 0, MODEL_stage, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_SBK33_HiddenPanel) + Call(MakeEntity, Ref(Entity_Tweester), 327, 0, 8, 0, Ref(N(TweesterPaths)), MAKE_ENTITY_END) + Call(AssignScript, Ref(N(D_802400FC_945ACC))) + Return + End }; diff --git a/src/world/area_sbk/sbk_33/sbk_33_2_main.c b/src/world/area_sbk/sbk_33/sbk_33_2_main.c index ec118858fa3..caeb321ea80 100644 --- a/src/world/area_sbk/sbk_33/sbk_33_2_main.c +++ b/src/world/area_sbk/sbk_33/sbk_33_2_main.c @@ -10,26 +10,26 @@ EvtScript N(EVS_ExitWalk_sbk_23_3) = EVT_EXIT_WALK(60, sbk_33_ENTRY_2, "sbk_23", EvtScript N(EVS_ExitWalk_sbk_43_2) = EVT_EXIT_WALK(60, sbk_33_ENTRY_3, "sbk_43", sbk_43_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_32_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_34_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_23_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_43_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_32_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_34_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_23_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_43_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_34/sbk_34_1_main.c b/src/world/area_sbk/sbk_34/sbk_34_1_main.c index cf7b1dfea8f..6392a9a5c71 100644 --- a/src/world/area_sbk/sbk_34/sbk_34_1_main.c +++ b/src/world/area_sbk/sbk_34/sbk_34_1_main.c @@ -27,27 +27,27 @@ EvtScript N(EVS_ExitWalk_sbk_24_3) = EVT_EXIT_WALK(60, sbk_34_ENTRY_2, "sbk_24", EvtScript N(EVS_ExitWalk_sbk_44_2) = EVT_EXIT_WALK(60, sbk_34_ENTRY_3, "sbk_44", sbk_44_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_33_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_35_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_24_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_44_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_33_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_35_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_24_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_44_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Exec(N(EVS_SetupFoliage)) + Return + End }; diff --git a/src/world/area_sbk/sbk_34/sbk_34_2_npc.c b/src/world/area_sbk/sbk_34/sbk_34_2_npc.c index 0d262a57aca..76b8af392c2 100644 --- a/src/world/area_sbk/sbk_34/sbk_34_2_npc.c +++ b/src/world/area_sbk/sbk_34/sbk_34_2_npc.c @@ -14,67 +14,67 @@ s32 N(LetterList_Nomadimouse)[] = { }; EvtScript N(EVS_Nomadimouse_LetterDelivery) = { - EVT_CALL(N(LetterDelivery_Init), + Call(N(LetterDelivery_Init), NPC_Nomadimouse, ANIM_Nomadimouse_Talk, ANIM_Nomadimouse_Idle, ITEM_LETTER_TO_NOMADIMOUSE, ITEM_NONE, MSG_CH2_005B, MSG_CH2_005C, MSG_CH2_005D, MSG_CH2_005E, - EVT_PTR(N(LetterList_Nomadimouse))) - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) - EVT_RETURN - EVT_END + Ref(N(LetterList_Nomadimouse))) + ExecWait(N(EVS_DoLetterDelivery)) + Return + End }; EvtScript N(EVS_LetterReward_Nomadimouse) = { - EVT_IF_EQ(LVarC, DELIVERY_ACCEPTED) + IfEq(LVarC, DELIVERY_ACCEPTED) EVT_GIVE_STAR_PIECE() - EVT_END_IF - EVT_RETURN - EVT_END + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Nomadimouse) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST) - EVT_IF_EQ(GF_SBK34_Met_Nomadimouse, FALSE) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4.0), 0, EVT_FLOAT(250.0), EVT_FLOAT(15.0), EVT_FLOAT(-6.0)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Nomadimouse_Talk, ANIM_Nomadimouse_Idle, 0, MSG_CH2_0056) - EVT_SET(GF_SBK34_Met_Nomadimouse, TRUE) - EVT_CALL(ResetCam, CAM_DEFAULT, 4) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Nomadimouse_Talk, ANIM_Nomadimouse_Idle, 0, MSG_CH2_0057) - EVT_END_IF - EVT_CASE_LT(STORY_CH2_UNCOVERED_DRY_DRY_RUINS) - EVT_IF_EQ(GF_SBK34_Met_Nomadimouse, FALSE) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4.0), 0, EVT_FLOAT(250.0), EVT_FLOAT(15.0), EVT_FLOAT(-6.0)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Nomadimouse_Talk, ANIM_Nomadimouse_Idle, 0, MSG_CH2_0058) - EVT_SET(GF_SBK34_Met_Nomadimouse, TRUE) - EVT_CALL(ResetCam, CAM_DEFAULT, 4) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Nomadimouse_Talk, ANIM_Nomadimouse_Idle, 0, MSG_CH2_0059) - EVT_END_IF - EVT_CASE_GE(STORY_CH2_UNCOVERED_DRY_DRY_RUINS) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Nomadimouse_Talk, ANIM_Nomadimouse_Idle, 0, MSG_CH2_005A) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_Nomadimouse_LetterDelivery)) - EVT_EXEC_WAIT(N(EVS_LetterReward_Nomadimouse)) - EVT_IF_NE(LVarC, 0) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST) + IfEq(GF_SBK34_Met_Nomadimouse, FALSE) + Call(AdjustCam, CAM_DEFAULT, Float(4.0), 0, Float(250.0), Float(15.0), Float(-6.0)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Nomadimouse_Talk, ANIM_Nomadimouse_Idle, 0, MSG_CH2_0056) + Set(GF_SBK34_Met_Nomadimouse, TRUE) + Call(ResetCam, CAM_DEFAULT, 4) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Nomadimouse_Talk, ANIM_Nomadimouse_Idle, 0, MSG_CH2_0057) + EndIf + CaseLt(STORY_CH2_UNCOVERED_DRY_DRY_RUINS) + IfEq(GF_SBK34_Met_Nomadimouse, FALSE) + Call(AdjustCam, CAM_DEFAULT, Float(4.0), 0, Float(250.0), Float(15.0), Float(-6.0)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Nomadimouse_Talk, ANIM_Nomadimouse_Idle, 0, MSG_CH2_0058) + Set(GF_SBK34_Met_Nomadimouse, TRUE) + Call(ResetCam, CAM_DEFAULT, 4) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Nomadimouse_Talk, ANIM_Nomadimouse_Idle, 0, MSG_CH2_0059) + EndIf + CaseGe(STORY_CH2_UNCOVERED_DRY_DRY_RUINS) + Call(SpeakToPlayer, NPC_SELF, ANIM_Nomadimouse_Talk, ANIM_Nomadimouse_Idle, 0, MSG_CH2_005A) + EndSwitch + ExecWait(N(EVS_Nomadimouse_LetterDelivery)) + ExecWait(N(EVS_LetterReward_Nomadimouse)) + IfNe(LVarC, 0) + Return + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Nomadimouse) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Nomadimouse))) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Nomadimouse_Idle) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Nomadimouse))) + Call(SetNpcAnimation, NPC_SELF, ANIM_Nomadimouse_Idle) + Return + End }; EvtScript N(EVS_NpcInit_Sack) = { - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Nomadimouse_Sack) - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_SELF, ANIM_Nomadimouse_Sack) + Return + End }; NpcData N(NpcData_Nomadimouse)[] = { diff --git a/src/world/area_sbk/sbk_34/sbk_34_3_foliage.c b/src/world/area_sbk/sbk_34/sbk_34_3_foliage.c index a6491c72b45..e0713c2829b 100644 --- a/src/world/area_sbk/sbk_34/sbk_34_3_foliage.c +++ b/src/world/area_sbk/sbk_34/sbk_34_3_foliage.c @@ -29,9 +29,9 @@ BombTrigger N(BombPos_Tree1) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o201, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o201, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Return + End }; diff --git a/src/world/area_sbk/sbk_35/sbk_35_1_main.c b/src/world/area_sbk/sbk_35/sbk_35_1_main.c index c07adf15556..072aa130907 100644 --- a/src/world/area_sbk/sbk_35/sbk_35_1_main.c +++ b/src/world/area_sbk/sbk_35/sbk_35_1_main.c @@ -27,27 +27,27 @@ EvtScript N(EVS_ExitWalk_sbk_25_3) = EVT_EXIT_WALK(60, sbk_35_ENTRY_2, "sbk_25", EvtScript N(EVS_ExitWalk_sbk_45_2) = EVT_EXIT_WALK(60, sbk_35_ENTRY_3, "sbk_45", sbk_45_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_34_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_36_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_25_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_45_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_34_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_36_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_25_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_45_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Exec(N(EVS_SetupFoliage)) + Return + End }; diff --git a/src/world/area_sbk/sbk_35/sbk_35_3_foliage.c b/src/world/area_sbk/sbk_35/sbk_35_3_foliage.c index 05e3b54cbca..6800076e439 100644 --- a/src/world/area_sbk/sbk_35/sbk_35_3_foliage.c +++ b/src/world/area_sbk/sbk_35/sbk_35_3_foliage.c @@ -55,15 +55,15 @@ BombTrigger N(BombPos_Tree3) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o191, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o193, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o195, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree3)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o191, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o193, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree3))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o195, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree3)), 1, 0) + Return + End }; diff --git a/src/world/area_sbk/sbk_36/sbk_36_1_main.c b/src/world/area_sbk/sbk_36/sbk_36_1_main.c index b288443de2e..8f25d26f1f9 100644 --- a/src/world/area_sbk/sbk_36/sbk_36_1_main.c +++ b/src/world/area_sbk/sbk_36/sbk_36_1_main.c @@ -27,27 +27,27 @@ EvtScript N(EVS_ExitWalk_sbk_26_3) = EVT_EXIT_WALK(60, sbk_36_ENTRY_2, "sbk_26", EvtScript N(EVS_ExitWalk_sbk_46_2) = EVT_EXIT_WALK(60, sbk_36_ENTRY_3, "sbk_46", sbk_46_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_35_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_dro_01_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_26_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_46_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_35_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_dro_01_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_26_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_46_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Exec(N(EVS_SetupFoliage)) + Return + End }; diff --git a/src/world/area_sbk/sbk_36/sbk_36_2_foliage.c b/src/world/area_sbk/sbk_36/sbk_36_2_foliage.c index ab4c11b44d8..ebf084a1a10 100644 --- a/src/world/area_sbk/sbk_36/sbk_36_2_foliage.c +++ b/src/world/area_sbk/sbk_36/sbk_36_2_foliage.c @@ -173,33 +173,33 @@ BombTrigger N(BombPos_Tree9) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o205, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o203, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o207, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree3)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree4))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o201, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree4)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree5))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o199, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree5)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree6))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o197, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree6)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree7))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o191, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree7)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree8))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o195, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree8)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree9))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o193, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree9)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o205, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o203, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree3))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o207, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree3)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree4))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o201, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree4)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree5))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o199, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree5)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree6))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o197, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree6)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree7))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o191, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree7)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree8))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o195, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree8)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree9))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o193, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree9)), 1, 0) + Return + End }; diff --git a/src/world/area_sbk/sbk_36/sbk_36_3_entity.c b/src/world/area_sbk/sbk_36/sbk_36_3_entity.c index e4149a6acd9..af1aaf0d2a2 100644 --- a/src/world/area_sbk/sbk_36/sbk_36_3_entity.c +++ b/src/world/area_sbk/sbk_36/sbk_36_3_entity.c @@ -2,19 +2,19 @@ #include "entity.h" EvtScript N(ReadSign) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_017A, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_017A, 160, 40) + Call(DisablePlayerInput, FALSE) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Signpost), 410, 0, -75, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(ReadSign))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Signpost), 410, 0, -75, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(ReadSign))) + Return + End }; diff --git a/src/world/area_sbk/sbk_40/sbk_40_1_main.c b/src/world/area_sbk/sbk_40/sbk_40_1_main.c index 8df53af0344..16815251b40 100644 --- a/src/world/area_sbk/sbk_40/sbk_40_1_main.c +++ b/src/world/area_sbk/sbk_40/sbk_40_1_main.c @@ -26,26 +26,26 @@ EvtScript N(EVS_ExitWalk_sbk_30_3) = EVT_EXIT_WALK(60, sbk_40_ENTRY_2, "sbk_30", EvtScript N(EVS_ExitWalk_sbk_50_2) = EVT_EXIT_WALK(60, sbk_40_ENTRY_3, "sbk_50", sbk_50_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_41_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_30_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_50_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_41_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_30_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_50_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_40/sbk_40_3_entity.c b/src/world/area_sbk/sbk_40/sbk_40_3_entity.c index 3653635d547..c99550f08e7 100644 --- a/src/world/area_sbk/sbk_40/sbk_40_3_entity.c +++ b/src/world/area_sbk/sbk_40/sbk_40_3_entity.c @@ -2,11 +2,11 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), 0, 60, -100, 0, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK40_MultiCoinBrick) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 165, 60, -300, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 110, 60, 130, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), -110, 60, 200, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_MulticoinBlock), 0, 60, -100, 0, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK40_MultiCoinBrick) + Call(MakeEntity, Ref(Entity_BrickBlock), 165, 60, -300, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), 110, 60, 130, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), -110, 60, 200, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_sbk/sbk_41/sbk_41_1_main.c b/src/world/area_sbk/sbk_41/sbk_41_1_main.c index 0554f3dead8..6d679d9c426 100644 --- a/src/world/area_sbk/sbk_41/sbk_41_1_main.c +++ b/src/world/area_sbk/sbk_41/sbk_41_1_main.c @@ -26,26 +26,26 @@ EvtScript N(EVS_ExitWalk_sbk_31_3) = EVT_EXIT_WALK(60, sbk_41_ENTRY_2, "sbk_31", EvtScript N(EVS_ExitWalk_sbk_51_2) = EVT_EXIT_WALK(60, sbk_41_ENTRY_3, "sbk_51", sbk_51_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_40_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_42_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_31_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_51_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_40_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_42_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_31_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_51_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_41/sbk_41_2_entity.c b/src/world/area_sbk/sbk_41/sbk_41_2_entity.c index 9a6a6f6486b..4be25b161e1 100644 --- a/src/world/area_sbk/sbk_41/sbk_41_2_entity.c +++ b/src/world/area_sbk/sbk_41/sbk_41_2_entity.c @@ -15,17 +15,17 @@ TweesterPath* N(TweesterPaths)[] = { }; EvtScript N(EVS_RideTweester) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(GotoMap, EVT_PTR("sbk_32"), sbk_32_ENTRY_4) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(GotoMap, Ref("sbk_32"), sbk_32_ENTRY_4) + Wait(100) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Tweester), 327, 0, 8, 0, EVT_PTR(N(TweesterPaths)), MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_RideTweester))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Tweester), 327, 0, 8, 0, Ref(N(TweesterPaths)), MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_RideTweester))) + Return + End }; diff --git a/src/world/area_sbk/sbk_42/sbk_42_1_main.c b/src/world/area_sbk/sbk_42/sbk_42_1_main.c index a8ca2e4e92f..e5016f4f531 100644 --- a/src/world/area_sbk/sbk_42/sbk_42_1_main.c +++ b/src/world/area_sbk/sbk_42/sbk_42_1_main.c @@ -26,26 +26,26 @@ EvtScript N(EVS_ExitWalk_sbk_32_3) = EVT_EXIT_WALK(60, sbk_42_ENTRY_2, "sbk_32", EvtScript N(EVS_ExitWalk_sbk_52_2) = EVT_EXIT_WALK(60, sbk_42_ENTRY_3, "sbk_52", sbk_52_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_41_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_43_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_32_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_52_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_41_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_43_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_32_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_52_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_43/sbk_43_1_main.c b/src/world/area_sbk/sbk_43/sbk_43_1_main.c index 9f17fa85335..497b6e7de81 100644 --- a/src/world/area_sbk/sbk_43/sbk_43_1_main.c +++ b/src/world/area_sbk/sbk_43/sbk_43_1_main.c @@ -27,26 +27,26 @@ EvtScript N(EVS_ExitWalk_sbk_33_3) = EVT_EXIT_WALK(60, sbk_43_ENTRY_2, "sbk_33", EvtScript N(EVS_ExitWalk_sbk_53_2) = EVT_EXIT_WALK(60, sbk_43_ENTRY_3, "sbk_53", sbk_53_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_42_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_44_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_33_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_53_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_42_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_44_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_33_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_53_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_43/sbk_43_2_entity.c b/src/world/area_sbk/sbk_43/sbk_43_2_entity.c index 7cfa6ebf873..4c0a84a9ad2 100644 --- a/src/world/area_sbk/sbk_43/sbk_43_2_entity.c +++ b/src/world/area_sbk/sbk_43/sbk_43_2_entity.c @@ -2,8 +2,8 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 0, 0, 0, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK43_ItemBlock_Coin) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_YellowBlock), 0, 0, 0, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK43_ItemBlock_Coin) + Return + End }; diff --git a/src/world/area_sbk/sbk_44/sbk_44_1_main.c b/src/world/area_sbk/sbk_44/sbk_44_1_main.c index f877d5faeed..4d1f451f564 100644 --- a/src/world/area_sbk/sbk_44/sbk_44_1_main.c +++ b/src/world/area_sbk/sbk_44/sbk_44_1_main.c @@ -26,26 +26,26 @@ EvtScript N(EVS_ExitWalk_sbk_34_3) = EVT_EXIT_WALK(60, sbk_44_ENTRY_2, "sbk_34", EvtScript N(EVS_ExitWalk_sbk_54_2) = EVT_EXIT_WALK(60, sbk_44_ENTRY_3, "sbk_54", sbk_54_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_43_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_45_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_34_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_54_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_43_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_45_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_34_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_54_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_45/sbk_45_1_main.c b/src/world/area_sbk/sbk_45/sbk_45_1_main.c index fe28af5cba6..01982b4dd26 100644 --- a/src/world/area_sbk/sbk_45/sbk_45_1_main.c +++ b/src/world/area_sbk/sbk_45/sbk_45_1_main.c @@ -27,39 +27,39 @@ EvtScript N(EVS_ExitWalk_sbk_35_3) = EVT_EXIT_WALK(60, sbk_45_ENTRY_2, "sbk_35", EvtScript N(EVS_ExitWalk_sbk_55_2) = EVT_EXIT_WALK(60, sbk_45_ENTRY_3, "sbk_55", sbk_55_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_44_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_46_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_35_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_55_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_44_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_46_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_35_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_55_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(sbk_45_ENTRY_4) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_DEFAULT - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(sbk_45_ENTRY_4) + Exec(N(EVS_BindExitTriggers)) + CaseDefault + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_sbk/sbk_45/sbk_45_2_entity.c b/src/world/area_sbk/sbk_45/sbk_45_2_entity.c index 0ee943781f4..34877ea9cc3 100644 --- a/src/world/area_sbk/sbk_45/sbk_45_2_entity.c +++ b/src/world/area_sbk/sbk_45/sbk_45_2_entity.c @@ -3,10 +3,10 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), -255, 55, -145, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), -375, 80, -145, 0, MAKE_ENTITY_END) - EVT_CALL(MakeItemEntity, ITEM_STOP_WATCH, -375, 105, -145, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_SBK45_Item_StopWatch) - EVT_CALL(MakeItemEntity, ITEM_SPIN_ATTACK, 193, 79, -345, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SBK45_Item_SpinAttack) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_BrickBlock), -255, 55, -145, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), -375, 80, -145, 0, MAKE_ENTITY_END) + Call(MakeItemEntity, ITEM_STOP_WATCH, -375, 105, -145, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_SBK45_Item_StopWatch) + Call(MakeItemEntity, ITEM_SPIN_ATTACK, 193, 79, -345, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SBK45_Item_SpinAttack) + Return + End }; diff --git a/src/world/area_sbk/sbk_46/sbk_46_1_main.c b/src/world/area_sbk/sbk_46/sbk_46_1_main.c index 58f2aef039d..56757dfcb69 100644 --- a/src/world/area_sbk/sbk_46/sbk_46_1_main.c +++ b/src/world/area_sbk/sbk_46/sbk_46_1_main.c @@ -27,27 +27,27 @@ EvtScript N(EVS_ExitWalk_sbk_36_3) = EVT_EXIT_WALK(60, sbk_46_ENTRY_2, "sbk_36", EvtScript N(EVS_ExitWalk_sbk_56_2) = EVT_EXIT_WALK(60, sbk_46_ENTRY_3, "sbk_56", sbk_56_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_45_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_36_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_56_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_45_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_36_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_56_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Exec(N(EVS_SetupFoliage)) + Return + End }; diff --git a/src/world/area_sbk/sbk_46/sbk_46_3_foliage.c b/src/world/area_sbk/sbk_46/sbk_46_3_foliage.c index 64457d20cb1..e7294d51188 100644 --- a/src/world/area_sbk/sbk_46/sbk_46_3_foliage.c +++ b/src/world/area_sbk/sbk_46/sbk_46_3_foliage.c @@ -55,15 +55,15 @@ BombTrigger N(BombPos_Tree3) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o193, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o195, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o191, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree3)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o193, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o195, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree3))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o191, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree3)), 1, 0) + Return + End }; diff --git a/src/world/area_sbk/sbk_46/sbk_46_4_entity.c b/src/world/area_sbk/sbk_46/sbk_46_4_entity.c index cb7d21194f7..292fde3f5eb 100644 --- a/src/world/area_sbk/sbk_46/sbk_46_4_entity.c +++ b/src/world/area_sbk/sbk_46/sbk_46_4_entity.c @@ -3,10 +3,10 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 0, 0, 0, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK46_ItemBlock_Coin) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 0, 85, 0, 0, ITEM_LIFE_SHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK46_HiddenItem_LifeShroom) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_YellowBlock), 0, 0, 0, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK46_ItemBlock_Coin) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 0, 85, 0, 0, ITEM_LIFE_SHROOM, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK46_HiddenItem_LifeShroom) + Return + End }; diff --git a/src/world/area_sbk/sbk_50/sbk_50_1_main.c b/src/world/area_sbk/sbk_50/sbk_50_1_main.c index 6454ecf3ffa..a12c9e56886 100644 --- a/src/world/area_sbk/sbk_50/sbk_50_1_main.c +++ b/src/world/area_sbk/sbk_50/sbk_50_1_main.c @@ -24,24 +24,24 @@ EvtScript N(EVS_ExitWalk_sbk_40_3) = EVT_EXIT_WALK(60, sbk_50_ENTRY_2, "sbk_40", EvtScript N(EVS_ExitWalk_sbk_60_2) = EVT_EXIT_WALK(60, sbk_50_ENTRY_3, "sbk_60", sbk_60_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_51_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_40_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_60_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_51_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_40_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_60_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_51/sbk_51_1_main.c b/src/world/area_sbk/sbk_51/sbk_51_1_main.c index 4f1ca5fd6c0..cb5d72a7987 100644 --- a/src/world/area_sbk/sbk_51/sbk_51_1_main.c +++ b/src/world/area_sbk/sbk_51/sbk_51_1_main.c @@ -26,26 +26,26 @@ EvtScript N(EVS_ExitWalk_sbk_61_2) = EVT_EXIT_WALK(60, sbk_51_ENTRY_3, "sbk_61", #include "world/common/todo/SpawnSunEffect.inc.c" EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_50_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_52_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_41_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_61_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_50_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_52_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_41_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_61_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_52/sbk_52_1_main.c b/src/world/area_sbk/sbk_52/sbk_52_1_main.c index 055583603c0..6a196cdee46 100644 --- a/src/world/area_sbk/sbk_52/sbk_52_1_main.c +++ b/src/world/area_sbk/sbk_52/sbk_52_1_main.c @@ -26,26 +26,26 @@ EvtScript N(EVS_ExitWalk_sbk_42_3) = EVT_EXIT_WALK(60, sbk_52_ENTRY_2, "sbk_42", EvtScript N(EVS_ExitWalk_sbk_62_2) = EVT_EXIT_WALK(60, sbk_52_ENTRY_3, "sbk_62", sbk_62_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_51_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_53_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_42_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_62_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_51_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_53_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_42_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_62_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_52/sbk_52_2_entity.c b/src/world/area_sbk/sbk_52/sbk_52_2_entity.c index 77cafb8ef68..8a0b2ebd0a2 100644 --- a/src/world/area_sbk/sbk_52/sbk_52_2_entity.c +++ b/src/world/area_sbk/sbk_52/sbk_52_2_entity.c @@ -2,10 +2,10 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), 0, 60, -100, 0, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK52_MultiCoinBrick) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 80, 60, 270, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), -210, 60, 165, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_MulticoinBlock), 0, 60, -100, 0, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK52_MultiCoinBrick) + Call(MakeEntity, Ref(Entity_BrickBlock), 80, 60, 270, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), -210, 60, 165, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_sbk/sbk_53/sbk_53_1_main.c b/src/world/area_sbk/sbk_53/sbk_53_1_main.c index 64fa4b1cbfc..644eb479e35 100644 --- a/src/world/area_sbk/sbk_53/sbk_53_1_main.c +++ b/src/world/area_sbk/sbk_53/sbk_53_1_main.c @@ -26,26 +26,26 @@ EvtScript N(EVS_ExitWalk_sbk_43_3) = EVT_EXIT_WALK(60, sbk_53_ENTRY_2, "sbk_43", EvtScript N(EVS_ExitWalk_sbk_63_2) = EVT_EXIT_WALK(60, sbk_53_ENTRY_3, "sbk_63", sbk_63_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_52_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_54_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_43_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_63_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_52_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_54_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_43_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_63_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_54/sbk_54_1_main.c b/src/world/area_sbk/sbk_54/sbk_54_1_main.c index 4deafe1d8bd..66d0e5948b3 100644 --- a/src/world/area_sbk/sbk_54/sbk_54_1_main.c +++ b/src/world/area_sbk/sbk_54/sbk_54_1_main.c @@ -26,26 +26,26 @@ EvtScript N(EVS_ExitWalk_sbk_44_3) = EVT_EXIT_WALK(60, sbk_54_ENTRY_2, "sbk_44", EvtScript N(EVS_ExitWalk_sbk_64_2) = EVT_EXIT_WALK(60, sbk_54_ENTRY_3, "sbk_64", sbk_64_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_53_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_55_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_44_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_64_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_53_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_55_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_44_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_64_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_54/sbk_54_2_entity.c b/src/world/area_sbk/sbk_54/sbk_54_2_entity.c index ead4d9add31..81da2498ecd 100644 --- a/src/world/area_sbk/sbk_54/sbk_54_2_entity.c +++ b/src/world/area_sbk/sbk_54/sbk_54_2_entity.c @@ -15,17 +15,17 @@ TweesterPath* N(TweesterPaths)[] = { }; EvtScript N(EVS_RideTweester) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(GotoMap, EVT_PTR("sbk_45"), sbk_45_ENTRY_4) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(GotoMap, Ref("sbk_45"), sbk_45_ENTRY_4) + Wait(100) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Tweester), 327, 0, 8, 0, EVT_PTR(N(TweesterPaths)), MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_RideTweester))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Tweester), 327, 0, 8, 0, Ref(N(TweesterPaths)), MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_RideTweester))) + Return + End }; diff --git a/src/world/area_sbk/sbk_55/sbk_55_1_main.c b/src/world/area_sbk/sbk_55/sbk_55_1_main.c index 4cb0502d979..b8bab1a3a71 100644 --- a/src/world/area_sbk/sbk_55/sbk_55_1_main.c +++ b/src/world/area_sbk/sbk_55/sbk_55_1_main.c @@ -28,28 +28,28 @@ EvtScript N(EVS_ExitWalk_sbk_45_3) = EVT_EXIT_WALK(60, sbk_55_ENTRY_2, "sbk_45", EvtScript N(EVS_ExitWalk_sbk_65_2) = EVT_EXIT_WALK(60, sbk_55_ENTRY_3, "sbk_65", sbk_65_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_54_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_56_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_45_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_65_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_54_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_56_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_45_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_65_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Exec(N(EVS_SetupFoliage)) + Return + End }; diff --git a/src/world/area_sbk/sbk_55/sbk_55_3_foliage.c b/src/world/area_sbk/sbk_55/sbk_55_3_foliage.c index 8ca4578f2d3..508b22ec98f 100644 --- a/src/world/area_sbk/sbk_55/sbk_55_3_foliage.c +++ b/src/world/area_sbk/sbk_55/sbk_55_3_foliage.c @@ -29,9 +29,9 @@ BombTrigger N(BombPos_Tree1) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o191, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o191, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Return + End }; diff --git a/src/world/area_sbk/sbk_55/sbk_55_4_entity.c b/src/world/area_sbk/sbk_55/sbk_55_4_entity.c index 4977ee9f6e7..80c8d20b534 100644 --- a/src/world/area_sbk/sbk_55/sbk_55_4_entity.c +++ b/src/world/area_sbk/sbk_55/sbk_55_4_entity.c @@ -2,9 +2,9 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), 0, 60, -100, 0, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK55_MultiCoinBrick) - EVT_CALL(MakeItemEntity, ITEM_TASTY_TONIC, 420, 0, 168, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SBK55_Item_TastyTonic) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_MulticoinBlock), 0, 60, -100, 0, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK55_MultiCoinBrick) + Call(MakeItemEntity, ITEM_TASTY_TONIC, 420, 0, 168, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_SBK55_Item_TastyTonic) + Return + End }; diff --git a/src/world/area_sbk/sbk_56/sbk_56_1_main.c b/src/world/area_sbk/sbk_56/sbk_56_1_main.c index 32862b64c00..14b3d7cb76d 100644 --- a/src/world/area_sbk/sbk_56/sbk_56_1_main.c +++ b/src/world/area_sbk/sbk_56/sbk_56_1_main.c @@ -33,78 +33,78 @@ API_CALLABLE(N(StopOasisSongVariation)) { } EvtScript N(EVS_ExitWalk_sbk_55_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(UseExitHeading, 60, sbk_56_ENTRY_0) - EVT_EXEC(ExitWalk) - EVT_CALL(N(StopOasisSongVariation)) - EVT_CALL(GotoMap, EVT_PTR("sbk_55"), sbk_55_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(UseExitHeading, 60, sbk_56_ENTRY_0) + Exec(ExitWalk) + Call(N(StopOasisSongVariation)) + Call(GotoMap, Ref("sbk_55"), sbk_55_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_sbk_46_3) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(UseExitHeading, 60, sbk_56_ENTRY_2) - EVT_EXEC(ExitWalk) - EVT_CALL(N(StopOasisSongVariation)) - EVT_CALL(GotoMap, EVT_PTR("sbk_46"), sbk_46_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(UseExitHeading, 60, sbk_56_ENTRY_2) + Exec(ExitWalk) + Call(N(StopOasisSongVariation)) + Call(GotoMap, Ref("sbk_46"), sbk_46_ENTRY_3) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_sbk_66_2) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(UseExitHeading, 60, sbk_56_ENTRY_3) - EVT_EXEC(ExitWalk) - EVT_CALL(N(StopOasisSongVariation)) - EVT_CALL(GotoMap, EVT_PTR("sbk_66"), sbk_66_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(UseExitHeading, 60, sbk_56_ENTRY_3) + Exec(ExitWalk) + Call(N(StopOasisSongVariation)) + Call(GotoMap, Ref("sbk_66"), sbk_66_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_55_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_46_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_66_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_55_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_46_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_66_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0) + Return + End }; EvtScript N(EVS_TexPan_Water) = { - EVT_CALL(EnableTexPanning, MODEL_o49, TRUE) - EVT_SET(LVar0, 0) - EVT_LABEL(10) - EVT_SET(LVar1, 0) - EVT_SUB(LVar1, LVar0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, LVar0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, LVar1) - EVT_ADD(LVar0, 80) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Call(EnableTexPanning, MODEL_o49, TRUE) + Set(LVar0, 0) + Label(10) + Set(LVar1, 0) + Sub(LVar1, LVar0) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, LVar0) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, LVar1) + Add(LVar0, 80) + Wait(1) + Goto(10) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(N(SpawnSunEffect)) - EVT_EXEC(N(EVS_TexPan_Water)) - EVT_CALL(MakeTransformGroup, MODEL_sui) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_CALL(N(StartOasisSongVariation)) - EVT_CALL(PlaySound, SOUND_LOOP_SBK_OASIS_WATER) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Call(N(SpawnSunEffect)) + Exec(N(EVS_TexPan_Water)) + Call(MakeTransformGroup, MODEL_sui) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Call(N(StartOasisSongVariation)) + Call(PlaySound, SOUND_LOOP_SBK_OASIS_WATER) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Exec(N(EVS_SetupFoliage)) + Return + End }; diff --git a/src/world/area_sbk/sbk_56/sbk_56_2_entity.c b/src/world/area_sbk/sbk_56/sbk_56_2_entity.c index ce184a4e67c..93639a40b7b 100644 --- a/src/world/area_sbk/sbk_56/sbk_56_2_entity.c +++ b/src/world/area_sbk/sbk_56/sbk_56_2_entity.c @@ -7,8 +7,8 @@ #include "world/common/entity/SuperBlock.inc.c" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), 300, 60, 0, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HeartBlock), 300, 60, 0, 0, MAKE_ENTITY_END) EVT_MAKE_SUPER_BLOCK(-50, 60, 275, 0) - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/area_sbk/sbk_56/sbk_56_3_foliage.c b/src/world/area_sbk/sbk_56/sbk_56_3_foliage.c index da2883feb68..7b1418390f2 100644 --- a/src/world/area_sbk/sbk_56/sbk_56_3_foliage.c +++ b/src/world/area_sbk/sbk_56/sbk_56_3_foliage.c @@ -187,40 +187,40 @@ BombTrigger N(BombPos_Tree10) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(GF_SBK56_Tree1_Lemon, FALSE) - EVT_SET(GF_SBK56_UnusedA, FALSE) - EVT_SET(GF_SBK56_Tree2_Lime, FALSE) - EVT_SET(GF_SBK56_UnusedB, FALSE) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_remon, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_rim, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_y_miki, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree3)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree4))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o67, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree4)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree5))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o68, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree5)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree6))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o69, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree6)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree7))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o70, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree7)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree8))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o71, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree8)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree9))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o72, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree9)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree10))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o73, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree10)), 1, 0) - EVT_RETURN - EVT_END + Set(GF_SBK56_Tree1_Lemon, FALSE) + Set(GF_SBK56_UnusedA, FALSE) + Set(GF_SBK56_Tree2_Lime, FALSE) + Set(GF_SBK56_UnusedB, FALSE) + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_remon, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_rim, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree3))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_y_miki, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree3)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree4))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o67, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree4)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree5))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o68, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree5)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree6))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o69, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree6)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree7))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o70, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree7)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree8))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o71, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree8)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree9))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o72, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree9)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree10))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o73, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree10)), 1, 0) + Return + End }; diff --git a/src/world/area_sbk/sbk_60/sbk_60_1_main.c b/src/world/area_sbk/sbk_60/sbk_60_1_main.c index 917b8333ab7..22284c58c77 100644 --- a/src/world/area_sbk/sbk_60/sbk_60_1_main.c +++ b/src/world/area_sbk/sbk_60/sbk_60_1_main.c @@ -24,24 +24,24 @@ EvtScript N(EVS_ExitWalk_sbk_61_0) = EVT_EXIT_WALK(60, sbk_60_ENTRY_1, "sbk_61", EvtScript N(EVS_ExitWalk_sbk_50_3) = EVT_EXIT_WALK(60, sbk_60_ENTRY_2, "sbk_50", sbk_50_ENTRY_3); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_61_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_50_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_61_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_50_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_61/sbk_61_1_main.c b/src/world/area_sbk/sbk_61/sbk_61_1_main.c index 222aaf489bb..92f2706ca81 100644 --- a/src/world/area_sbk/sbk_61/sbk_61_1_main.c +++ b/src/world/area_sbk/sbk_61/sbk_61_1_main.c @@ -26,25 +26,25 @@ EvtScript N(EVS_ExitWalk_sbk_62_0) = EVT_EXIT_WALK(60, sbk_61_ENTRY_1, "sbk_62", EvtScript N(EVS_ExitWalk_sbk_51_3) = EVT_EXIT_WALK(60, sbk_61_ENTRY_2, "sbk_51", sbk_51_ENTRY_3); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_60_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_62_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_51_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_60_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_62_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_51_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_61/sbk_61_2_entity.c b/src/world/area_sbk/sbk_61/sbk_61_2_entity.c index 43cc53e5ad8..d9fd07ddb0e 100644 --- a/src/world/area_sbk/sbk_61/sbk_61_2_entity.c +++ b/src/world/area_sbk/sbk_61/sbk_61_2_entity.c @@ -2,8 +2,8 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenRedBlock), 0, 90, 0, 180, ITEM_ATTACK_FX_C, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK61_HiddenBadge_AttackFXC) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HiddenRedBlock), 0, 90, 0, 180, ITEM_ATTACK_FX_C, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK61_HiddenBadge_AttackFXC) + Return + End }; diff --git a/src/world/area_sbk/sbk_62/sbk_62_1_main.c b/src/world/area_sbk/sbk_62/sbk_62_1_main.c index 38b743b8d75..d9cc6adfd81 100644 --- a/src/world/area_sbk/sbk_62/sbk_62_1_main.c +++ b/src/world/area_sbk/sbk_62/sbk_62_1_main.c @@ -25,25 +25,25 @@ EvtScript N(EVS_ExitWalk_sbk_63_0) = EVT_EXIT_WALK(60, sbk_62_ENTRY_1, "sbk_63", EvtScript N(EVS_ExitWalk_sbk_52_3) = EVT_EXIT_WALK(60, sbk_62_ENTRY_2, "sbk_52", sbk_52_ENTRY_3); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_61_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_63_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_52_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_61_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_63_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_52_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_63/sbk_63_1_main.c b/src/world/area_sbk/sbk_63/sbk_63_1_main.c index 3d667cb0d73..fa7cea9556c 100644 --- a/src/world/area_sbk/sbk_63/sbk_63_1_main.c +++ b/src/world/area_sbk/sbk_63/sbk_63_1_main.c @@ -25,25 +25,25 @@ EvtScript N(EVS_ExitWalk_sbk_64_0) = EVT_EXIT_WALK(60, sbk_63_ENTRY_1, "sbk_64", EvtScript N(EVS_ExitWalk_sbk_53_3) = EVT_EXIT_WALK(60, sbk_63_ENTRY_2, "sbk_53", sbk_53_ENTRY_3); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_62_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_64_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_53_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_62_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_64_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_53_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_64/sbk_64_1_main.c b/src/world/area_sbk/sbk_64/sbk_64_1_main.c index 6922373e618..da022bbe68f 100644 --- a/src/world/area_sbk/sbk_64/sbk_64_1_main.c +++ b/src/world/area_sbk/sbk_64/sbk_64_1_main.c @@ -25,25 +25,25 @@ EvtScript N(EVS_ExitWalk_sbk_65_0) = EVT_EXIT_WALK(60, sbk_64_ENTRY_1, "sbk_65", EvtScript N(EVS_ExitWalk_sbk_54_3) = EVT_EXIT_WALK(60, sbk_64_ENTRY_2, "sbk_54", sbk_54_ENTRY_3); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_63_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_65_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_54_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_63_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_65_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_54_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_64/sbk_64_2_entity.c b/src/world/area_sbk/sbk_64/sbk_64_2_entity.c index 6970ef7a8d0..58c55b08b33 100644 --- a/src/world/area_sbk/sbk_64/sbk_64_2_entity.c +++ b/src/world/area_sbk/sbk_64/sbk_64_2_entity.c @@ -2,8 +2,8 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 0, 0, 0, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK64_ItemBlock_Coin) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_YellowBlock), 0, 0, 0, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK64_ItemBlock_Coin) + Return + End }; diff --git a/src/world/area_sbk/sbk_65/sbk_65_1_main.c b/src/world/area_sbk/sbk_65/sbk_65_1_main.c index 237106410d4..47b619779bc 100644 --- a/src/world/area_sbk/sbk_65/sbk_65_1_main.c +++ b/src/world/area_sbk/sbk_65/sbk_65_1_main.c @@ -24,24 +24,24 @@ EvtScript N(EVS_ExitWalk_sbk_66_0) = EVT_EXIT_WALK(60, sbk_65_ENTRY_1, "sbk_66", EvtScript N(EVS_ExitWalk_sbk_55_3) = EVT_EXIT_WALK(60, sbk_65_ENTRY_2, "sbk_55", sbk_55_ENTRY_3); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_64_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_66_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_55_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_64_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_66_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_55_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; diff --git a/src/world/area_sbk/sbk_66/sbk_66_1_main.c b/src/world/area_sbk/sbk_66/sbk_66_1_main.c index a22f2633fab..99f51bcd52f 100644 --- a/src/world/area_sbk/sbk_66/sbk_66_1_main.c +++ b/src/world/area_sbk/sbk_66/sbk_66_1_main.c @@ -26,26 +26,26 @@ EvtScript N(EVS_ExitWalk_sbk_65_1) = EVT_EXIT_WALK(60, sbk_66_ENTRY_0, "sbk_65", EvtScript N(EVS_ExitWalk_sbk_56_3) = EVT_EXIT_WALK(60, sbk_66_ENTRY_2, "sbk_56", sbk_56_ENTRY_3); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_65_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_56_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_sbk_65_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_56_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_IF_EQ(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) - EVT_CALL(DisablePulseStone, FALSE) - EVT_END_IF - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(N(SpawnSunEffect)) - EVT_CALL(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + IfEq(GB_StoryProgress, STORY_CH2_GOT_PULSE_STONE) + Call(DisablePulseStone, FALSE) + EndIf + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(N(SpawnSunEffect)) + Call(SetMusicTrack, 0, SONG_DRY_DRY_DESERT, 0, 8) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Exec(N(EVS_SetupFoliage)) + Return + End }; diff --git a/src/world/area_sbk/sbk_66/sbk_66_3_foliage.c b/src/world/area_sbk/sbk_66/sbk_66_3_foliage.c index 3db3f6b20db..6f49b76e861 100644 --- a/src/world/area_sbk/sbk_66/sbk_66_3_foliage.c +++ b/src/world/area_sbk/sbk_66/sbk_66_3_foliage.c @@ -55,15 +55,15 @@ BombTrigger N(BombTrigger_Tree3) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o180, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombTrigger_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o182, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombTrigger_Tree2)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o184, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombTrigger_Tree3)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o180, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombTrigger_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o182, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombTrigger_Tree2)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree3))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o184, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombTrigger_Tree3)), 1, 0) + Return + End }; diff --git a/src/world/area_sbk/sbk_66/sbk_66_4_entity.c b/src/world/area_sbk/sbk_66/sbk_66_4_entity.c index ef671ac0219..de5ffe8a200 100644 --- a/src/world/area_sbk/sbk_66/sbk_66_4_entity.c +++ b/src/world/area_sbk/sbk_66/sbk_66_4_entity.c @@ -2,18 +2,18 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), -80, 60, -200, 0, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK66_MultiCoinBrickA) - EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), 80, 60, -200, 0, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK66_MultiCoinBrickB) - EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), 160, 60, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK66_MultiCoinBrickC) - EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), -160, 60, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK66_MultiCoinBrickD) - EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), -60, 60, 200, 0, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK66_MultiCoinBrickE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), 60, 60, 200, 0, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_SBK66_MultiCoinBrickF) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_MulticoinBlock), -80, 60, -200, 0, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK66_MultiCoinBrickA) + Call(MakeEntity, Ref(Entity_MulticoinBlock), 80, 60, -200, 0, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK66_MultiCoinBrickB) + Call(MakeEntity, Ref(Entity_MulticoinBlock), 160, 60, 0, 0, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK66_MultiCoinBrickC) + Call(MakeEntity, Ref(Entity_MulticoinBlock), -160, 60, 0, 0, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK66_MultiCoinBrickD) + Call(MakeEntity, Ref(Entity_MulticoinBlock), -60, 60, 200, 0, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK66_MultiCoinBrickE) + Call(MakeEntity, Ref(Entity_MulticoinBlock), 60, 60, 200, 0, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_SBK66_MultiCoinBrickF) + Return + End }; diff --git a/src/world/area_sbk/sbk_99/sbk_99_1_main.c b/src/world/area_sbk/sbk_99/sbk_99_1_main.c index 730bf1e575f..316a3edbcb6 100644 --- a/src/world/area_sbk/sbk_99/sbk_99_1_main.c +++ b/src/world/area_sbk/sbk_99/sbk_99_1_main.c @@ -20,38 +20,38 @@ EvtScript N(EVS_ExitWalk_iwa_04_1) = EVT_EXIT_WALK(60, sbk_99_ENTRY_0, "iwa_04", EvtScript N(EVS_ExitWalk_sbk_30_0) = EVT_EXIT_WALK(60, sbk_99_ENTRY_1, "sbk_30", sbk_30_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_iwa_04_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_sbk_30_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_iwa_04_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_sbk_30_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_MINIMAL() - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 152, 240) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_SET(GF_MAP_DryDryDesert, TRUE) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(SetMusicTrack, 0, SONG_MT_RUGGED, 0, 8) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_DRY_DRY_DESERT) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_MINIMAL() + Call(SetCamBGColor, CAM_DEFAULT, 0, 152, 240) + Call(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Set(GF_MAP_DryDryDesert, TRUE) + ExecWait(N(EVS_MakeEntities)) + Call(SetMusicTrack, 0, SONG_MT_RUGGED, 0, 8) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_sbk/sbk_99/sbk_99_2_entity.c b/src/world/area_sbk/sbk_99/sbk_99_2_entity.c index 2ee44b924cf..950a33412a8 100644 --- a/src/world/area_sbk/sbk_99/sbk_99_2_entity.c +++ b/src/world/area_sbk/sbk_99/sbk_99_2_entity.c @@ -2,8 +2,8 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 145, 60, -375, 45, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), 88, 60, -324, 40, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_SavePoint), 145, 60, -375, 45, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HeartBlock), 88, 60, -324, 40, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_tik/common/DripVolumes.inc.c b/src/world/area_tik/common/DripVolumes.inc.c index 5c751df27fe..db3f2a1f002 100644 --- a/src/world/area_tik/common/DripVolumes.inc.c +++ b/src/world/area_tik/common/DripVolumes.inc.c @@ -55,139 +55,139 @@ API_CALLABLE(N(CheckDripCollisionWithNPC)) { } EvtScript N(EVS_UpdateDripSplash) = { - EVT_SET(LVar1, ArrayVar(5)) - EVT_ADD(LVar1, 1) - EVT_SET(LVar2, ArrayVar(0)) - EVT_SET(LVar3, ArrayVar(1)) - EVT_SET(LVar4, ArrayVar(5)) - EVT_ADD(LVar4, 2) - EVT_SET(LVar5, ArrayVar(0)) - EVT_SET(LVar6, ArrayVar(1)) - EVT_SET(LVar7, ArrayVar(5)) - EVT_ADD(LVar7, 3) - EVT_SET(LVar8, ArrayVar(0)) - EVT_SET(LVar9, ArrayVar(1)) - EVT_SET(LVarA, ArrayVar(5)) - EVT_ADD(LVarA, 4) - EVT_SET(LVarB, ArrayVar(0)) - EVT_SET(LVarC, ArrayVar(1)) - EVT_CALL(EnableModel, LVar1, TRUE) - EVT_CALL(EnableModel, LVar4, TRUE) - EVT_CALL(EnableModel, LVar7, TRUE) - EVT_CALL(EnableModel, LVarA, TRUE) - EVT_LOOP(5) - EVT_ADD(LVar0, 1) - EVT_ADD(LVar2, 1) - EVT_ADD(LVar3, 1) - EVT_CALL(TranslateModel, LVar1, LVar2, LVar0, LVar3) - EVT_CALL(ScaleModel, LVar1, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_ADD(LVar5, -1) - EVT_ADD(LVar6, 1) - EVT_CALL(TranslateModel, LVar4, LVar5, LVar0, LVar6) - EVT_CALL(ScaleModel, LVar4, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_ADD(LVar8, 1) - EVT_ADD(LVar9, -1) - EVT_CALL(TranslateModel, LVar7, LVar8, LVar0, LVar9) - EVT_CALL(ScaleModel, LVar7, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_ADD(LVarB, -1) - EVT_ADD(LVarC, -1) - EVT_CALL(TranslateModel, LVarA, LVarB, LVar0, LVarC) - EVT_CALL(ScaleModel, LVarA, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(5) - EVT_ADD(LVar0, -1) - EVT_ADD(LVar2, 1) - EVT_ADD(LVar3, 1) - EVT_CALL(TranslateModel, LVar1, LVar2, LVar0, LVar3) - EVT_CALL(ScaleModel, LVar1, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_ADD(LVar5, -1) - EVT_ADD(LVar6, 1) - EVT_CALL(TranslateModel, LVar4, LVar5, LVar0, LVar6) - EVT_CALL(ScaleModel, LVar4, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_ADD(LVar8, 1) - EVT_ADD(LVar9, -1) - EVT_CALL(TranslateModel, LVar7, LVar8, LVar0, LVar9) - EVT_CALL(ScaleModel, LVar7, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_ADD(LVarB, -1) - EVT_ADD(LVarC, -1) - EVT_CALL(TranslateModel, LVarA, LVarB, LVar0, LVarC) - EVT_CALL(ScaleModel, LVarA, EVT_FLOAT(0.5), EVT_FLOAT(0.5), EVT_FLOAT(0.5)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EnableModel, LVar1, FALSE) - EVT_CALL(EnableModel, LVar4, FALSE) - EVT_CALL(EnableModel, LVar7, FALSE) - EVT_CALL(EnableModel, LVarA, FALSE) - EVT_RETURN - EVT_END + Set(LVar1, ArrayVar(5)) + Add(LVar1, 1) + Set(LVar2, ArrayVar(0)) + Set(LVar3, ArrayVar(1)) + Set(LVar4, ArrayVar(5)) + Add(LVar4, 2) + Set(LVar5, ArrayVar(0)) + Set(LVar6, ArrayVar(1)) + Set(LVar7, ArrayVar(5)) + Add(LVar7, 3) + Set(LVar8, ArrayVar(0)) + Set(LVar9, ArrayVar(1)) + Set(LVarA, ArrayVar(5)) + Add(LVarA, 4) + Set(LVarB, ArrayVar(0)) + Set(LVarC, ArrayVar(1)) + Call(EnableModel, LVar1, TRUE) + Call(EnableModel, LVar4, TRUE) + Call(EnableModel, LVar7, TRUE) + Call(EnableModel, LVarA, TRUE) + Loop(5) + Add(LVar0, 1) + Add(LVar2, 1) + Add(LVar3, 1) + Call(TranslateModel, LVar1, LVar2, LVar0, LVar3) + Call(ScaleModel, LVar1, Float(0.5), Float(0.5), Float(0.5)) + Add(LVar5, -1) + Add(LVar6, 1) + Call(TranslateModel, LVar4, LVar5, LVar0, LVar6) + Call(ScaleModel, LVar4, Float(0.5), Float(0.5), Float(0.5)) + Add(LVar8, 1) + Add(LVar9, -1) + Call(TranslateModel, LVar7, LVar8, LVar0, LVar9) + Call(ScaleModel, LVar7, Float(0.5), Float(0.5), Float(0.5)) + Add(LVarB, -1) + Add(LVarC, -1) + Call(TranslateModel, LVarA, LVarB, LVar0, LVarC) + Call(ScaleModel, LVarA, Float(0.5), Float(0.5), Float(0.5)) + Wait(1) + EndLoop + Loop(5) + Add(LVar0, -1) + Add(LVar2, 1) + Add(LVar3, 1) + Call(TranslateModel, LVar1, LVar2, LVar0, LVar3) + Call(ScaleModel, LVar1, Float(0.5), Float(0.5), Float(0.5)) + Add(LVar5, -1) + Add(LVar6, 1) + Call(TranslateModel, LVar4, LVar5, LVar0, LVar6) + Call(ScaleModel, LVar4, Float(0.5), Float(0.5), Float(0.5)) + Add(LVar8, 1) + Add(LVar9, -1) + Call(TranslateModel, LVar7, LVar8, LVar0, LVar9) + Call(ScaleModel, LVar7, Float(0.5), Float(0.5), Float(0.5)) + Add(LVarB, -1) + Add(LVarC, -1) + Call(TranslateModel, LVarA, LVarB, LVar0, LVarC) + Call(ScaleModel, LVarA, Float(0.5), Float(0.5), Float(0.5)) + Wait(1) + EndLoop + Call(EnableModel, LVar1, FALSE) + Call(EnableModel, LVar4, FALSE) + Call(EnableModel, LVar7, FALSE) + Call(EnableModel, LVarA, FALSE) + Return + End }; EvtScript N(EVS_UpdateDripVolume) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_USE_ARRAY(LVarA) - EVT_SET(LVar5, ArrayVar(5)) - EVT_LOOP(5) - EVT_CALL(CloneModel, DROPLET_MODEL, LVar5) - EVT_CALL(TranslateModel, LVar5, ArrayVar(0), ArrayVar(2), ArrayVar(1)) - EVT_ADD(LVar5, 1) - EVT_END_LOOP - EVT_LABEL(0) - EVT_CALL(RandInt, 200, LVar0) - EVT_ADD(LVar0, 50) - EVT_WAIT(LVar0) - EVT_CALL(EnableModel, ArrayVar(5), TRUE) - EVT_CALL(MakeLerp, ArrayVar(2), ArrayVar(3), ArrayVar(4), EASING_QUADRATIC_IN) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, ArrayVar(5), ArrayVar(0), LVar0, ArrayVar(1)) - EVT_WAIT(1) - EVT_CALL(N(CheckDripCollisionWithNPC), ArrayVar(5)) - EVT_IF_EQ(LVar2, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_LABEL(10) - EVT_CALL(EnableModel, ArrayVar(5), FALSE) - EVT_CALL(PlaySound, SOUND_DRIP) - EVT_EXEC_WAIT(N(EVS_UpdateDripSplash)) - EVT_GOTO(0) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + UseArray(LVarA) + Set(LVar5, ArrayVar(5)) + Loop(5) + Call(CloneModel, DROPLET_MODEL, LVar5) + Call(TranslateModel, LVar5, ArrayVar(0), ArrayVar(2), ArrayVar(1)) + Add(LVar5, 1) + EndLoop + Label(0) + Call(RandInt, 200, LVar0) + Add(LVar0, 50) + Wait(LVar0) + Call(EnableModel, ArrayVar(5), TRUE) + Call(MakeLerp, ArrayVar(2), ArrayVar(3), ArrayVar(4), EASING_QUADRATIC_IN) + Label(1) + Call(UpdateLerp) + Call(TranslateModel, ArrayVar(5), ArrayVar(0), LVar0, ArrayVar(1)) + Wait(1) + Call(N(CheckDripCollisionWithNPC), ArrayVar(5)) + IfEq(LVar2, 1) + Goto(10) + EndIf + IfEq(LVar1, 1) + Goto(1) + EndIf + Label(10) + Call(EnableModel, ArrayVar(5), FALSE) + Call(PlaySound, SOUND_DRIP) + ExecWait(N(EVS_UpdateDripSplash)) + Goto(0) + Return + End }; EvtScript N(EVS_CreateDripVolumes) = { - EVT_SET(LVarF, CLONED_MODEL(0)) - EVT_USE_BUF(LVar0) - EVT_BUF_READ1(LVar1) - EVT_LOOP(LVar1) - EVT_BUF_READ4(LVar2, LVar3, LVar4, LVar5) - EVT_BUF_READ3(LVar6, LVar7, LVar8) - EVT_BUF_READ1(LVar9) - EVT_LOOP(LVar9) - EVT_MALLOC_ARRAY(6, LVarA) - EVT_USE_ARRAY(LVarA) - EVT_CALL(RandInt, LVar4, LVarB) - EVT_CALL(RandInt, LVar5, LVarC) - EVT_SET(LVarD, LVar2) - EVT_SET(LVarE, LVar3) - EVT_ADD(LVarD, LVarB) - EVT_ADD(LVarE, LVarC) - EVT_SET(ArrayVar(0), LVarD) - EVT_SET(ArrayVar(1), LVarE) - EVT_SET(ArrayVar(2), LVar6) - EVT_SET(ArrayVar(3), LVar7) - EVT_SET(ArrayVar(4), LVar8) - EVT_SET(ArrayVar(5), LVarF) - EVT_EXEC(N(EVS_UpdateDripVolume)) - EVT_ADD(LVarF, 5) - EVT_END_LOOP - EVT_END_LOOP - EVT_CALL(EnableModel, DROPLET_MODEL, FALSE) - EVT_RETURN - EVT_END + Set(LVarF, CLONED_MODEL(0)) + UseBuf(LVar0) + BufRead1(LVar1) + Loop(LVar1) + BufRead4(LVar2, LVar3, LVar4, LVar5) + BufRead3(LVar6, LVar7, LVar8) + BufRead1(LVar9) + Loop(LVar9) + MallocArray(6, LVarA) + UseArray(LVarA) + Call(RandInt, LVar4, LVarB) + Call(RandInt, LVar5, LVarC) + Set(LVarD, LVar2) + Set(LVarE, LVar3) + Add(LVarD, LVarB) + Add(LVarE, LVarC) + Set(ArrayVar(0), LVarD) + Set(ArrayVar(1), LVarE) + Set(ArrayVar(2), LVar6) + Set(ArrayVar(3), LVar7) + Set(ArrayVar(4), LVar8) + Set(ArrayVar(5), LVarF) + Exec(N(EVS_UpdateDripVolume)) + Add(LVarF, 5) + EndLoop + EndLoop + Call(EnableModel, DROPLET_MODEL, FALSE) + Return + End }; typedef struct DripVolume { diff --git a/src/world/area_tik/common/Flotsam.inc.c b/src/world/area_tik/common/Flotsam.inc.c index 89affaf3d5f..a3821a03a65 100644 --- a/src/world/area_tik/common/Flotsam.inc.c +++ b/src/world/area_tik/common/Flotsam.inc.c @@ -1,26 +1,26 @@ #include "common.h" EvtScript N(EVS_Flotsam_Bobbing) = { - EVT_LOOP(0) - EVT_CALL(MakeLerp, 0, -10, 25, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, LVar2, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, -10, 0, 30, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, LVar2, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(MakeLerp, 0, -10, 25, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, LVar2, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, -10, 0, 30, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, LVar2, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + Return + End }; diff --git a/src/world/area_tik/tik_01/tik_01_1_music.c b/src/world/area_tik/tik_01/tik_01_1_music.c index 8ddfb707e42..5def19fb991 100644 --- a/src/world/area_tik/tik_01/tik_01_1_music.c +++ b/src/world/area_tik/tik_01/tik_01_1_music.c @@ -1,13 +1,13 @@ #include "tik_01.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) + Return + End }; EvtScript N(EVS_PlayBlooperSong) = { - EVT_CALL(SetMusicTrack, 0, SONG_BLOOPER_THEME, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BLOOPER_THEME, 0, 8) + Return + End }; diff --git a/src/world/area_tik/tik_01/tik_01_2_main.c b/src/world/area_tik/tik_01/tik_01_2_main.c index 018dfade11f..67a7069d340 100644 --- a/src/world/area_tik/tik_01/tik_01_2_main.c +++ b/src/world/area_tik/tik_01/tik_01_2_main.c @@ -9,54 +9,54 @@ EvtScript N(EVS_ExitWalk_tik_06_0) = EVT_EXIT_WALK(60, tik_01_ENTRY_0, "tik_06", EvtScript N(EVS_ExitWalk_tik_03_0) = EVT_EXIT_WALK(60, tik_01_ENTRY_1, "tik_03", tik_03_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_06_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_tik_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_tik_06_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) - EVT_CALL(SetSpriteShading, SHADING_TIK_01) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(PlaySound, SOUND_LOOP_TIK01_WATER) - EVT_CALL(EnableTexPanning, MODEL_nagare1, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) + Call(SetSpriteShading, SHADING_TIK_01) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Call(PlaySound, SOUND_LOOP_TIK01_WATER) + Call(EnableTexPanning, MODEL_nagare1, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 50, 200, 110, 500) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_mizu, TRUE) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(EnableTexPanning, MODEL_mizu, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( 0, -200, -100, -500) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_mizu2, TRUE) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(EnableTexPanning, MODEL_mizu2, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_3) TEX_PAN_PARAMS_STEP( 0, -250, -100, -500) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_EXEC(N(EVS_SetupDrips)) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_LT(LVar0, tik_01_ENTRY_2) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_ELSE - EVT_SET(LVarA, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(N(EVS_Pipe_EnterVertical)) - EVT_END_IF - EVT_WAIT(1) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Exec(N(EVS_SetupDrips)) + Call(GetEntryID, LVar0) + IfLt(LVar0, tik_01_ENTRY_2) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Else + Set(LVarA, Ref(N(EVS_BindExitTriggers))) + Exec(N(EVS_Pipe_EnterVertical)) + EndIf + Wait(1) + Return + End }; diff --git a/src/world/area_tik/tik_01/tik_01_3_drips.c b/src/world/area_tik/tik_01/tik_01_3_drips.c index 6fb77b50d0d..8a350c803da 100644 --- a/src/world/area_tik/tik_01/tik_01_3_drips.c +++ b/src/world/area_tik/tik_01/tik_01_3_drips.c @@ -18,8 +18,8 @@ DripVolumeList N(DripVolumes) = { }; EvtScript N(EVS_SetupDrips) = { - EVT_SET(LVar0, EVT_PTR(N(DripVolumes))) - EVT_EXEC(N(EVS_CreateDripVolumes)) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(DripVolumes))) + Exec(N(EVS_CreateDripVolumes)) + Return + End }; diff --git a/src/world/area_tik/tik_01/tik_01_4_entity.c b/src/world/area_tik/tik_01/tik_01_4_entity.c index 000137d4634..68698f3a787 100644 --- a/src/world/area_tik/tik_01/tik_01_4_entity.c +++ b/src/world/area_tik/tik_01/tik_01_4_entity.c @@ -4,85 +4,85 @@ #include "world/common/todo/SetEntityPosition.inc.c" EvtScript N(EVS_SpawnSwitch) = { - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_ADD(LVar2, -75) - EVT_CALL(PlaySoundAt, SOUND_FALL_QUICK, SOUND_SPACE_DEFAULT, LVar2, 200, 25) - EVT_CALL(MakeLerp, 200, -10, 25, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetEntityPosition), MV_Unk_01, LVar2, LVar0, 25) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAt, SOUND_OBJECT_LAND, SOUND_SPACE_DEFAULT, LVar2, LVar0, 25) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Add(LVar2, -75) + Call(PlaySoundAt, SOUND_FALL_QUICK, SOUND_SPACE_DEFAULT, LVar2, 200, 25) + Call(MakeLerp, 200, -10, 25, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(N(SetEntityPosition), MV_Unk_01, LVar2, LVar0, 25) + IfEq(LVar1, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(PlaySoundAt, SOUND_OBJECT_LAND, SOUND_SPACE_DEFAULT, LVar2, LVar0, 25) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.0)) + Wait(10) + Return + End }; EvtScript N(EVS_SmashBlock) = { - EVT_SET(GF_TIK01_Hammer2Block, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o64, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Set(GF_TIK01_Hammer2Block, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o64, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_GotoMap_kmr_02_3) = { - EVT_CALL(GotoMap, EVT_PTR("kmr_02"), kmr_02_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("kmr_02"), kmr_02_ENTRY_3) + Wait(100) + Return + End }; EvtScript N(EVS_GotoMap_nok_02_2) = { - EVT_CALL(GotoMap, EVT_PTR("nok_02"), nok_02_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("nok_02"), nok_02_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_GotoMap_dro_01_2) = { - EVT_CALL(GotoMap, EVT_PTR("dro_01"), dro_01_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("dro_01"), dro_01_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_OnSwitchActivate) = { - EVT_WAIT(10) - EVT_CALL(PlaySound, SOUND_GROW) - EVT_SET(GF_TIK01_WarpPipes, TRUE) - EVT_UNBIND - EVT_RETURN - EVT_END + Wait(10) + Call(PlaySound, SOUND_GROW) + Set(GF_TIK01_WarpPipes, TRUE) + Unbind + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_TIK01_Hammer2Block, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer2Block), -240, -10, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_SmashBlock))) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o64, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o63, COLLIDER_FLAGS_UPPER_MASK) - EVT_IF_EQ(GF_TIK01_WarpPipes, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueSwitch), NPC_DISPOSE_LOCATION, 0, MAKE_ENTITY_END) - EVT_CALL(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_TIK_03)) - EVT_SET(MV_Unk_01, LVar0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnSwitchActivate)), TRIGGER_AREA_FLAG_SET, AF_TIK_03, 1, 0) - EVT_IF_EQ(GF_TIK01_Defeated_Blooper, TRUE) - EVT_CALL(N(SetEntityPosition), MV_Unk_01, 125, -10, 25) - EVT_END_IF - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueWarpPipe), 150, -10, -82, 0, tik_01_ENTRY_2, - EVT_PTR(N(EVS_GotoMap_kmr_02_3)), EVT_INDEX_OF_GAME_FLAG(GF_TIK01_WarpPipes), MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueWarpPipe), 50, -10, -82, 0, tik_01_ENTRY_3, - EVT_PTR(N(EVS_GotoMap_nok_02_2)), EVT_INDEX_OF_GAME_FLAG(GF_TIK01_WarpPipes), MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueWarpPipe), -50, -10, -82, 0, tik_01_ENTRY_4, - EVT_PTR(N(EVS_GotoMap_dro_01_2)), EVT_INDEX_OF_GAME_FLAG(GF_TIK01_WarpPipes), MAKE_ENTITY_END) - EVT_RETURN - EVT_END + IfEq(GF_TIK01_Hammer2Block, FALSE) + Call(MakeEntity, Ref(Entity_Hammer2Block), -240, -10, 0, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_SmashBlock))) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o64, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o63, COLLIDER_FLAGS_UPPER_MASK) + IfEq(GF_TIK01_WarpPipes, FALSE) + Call(MakeEntity, Ref(Entity_BlueSwitch), NPC_DISPOSE_LOCATION, 0, MAKE_ENTITY_END) + Call(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_TIK_03)) + Set(MV_Unk_01, LVar0) + BindTrigger(Ref(N(EVS_OnSwitchActivate)), TRIGGER_AREA_FLAG_SET, AF_TIK_03, 1, 0) + IfEq(GF_TIK01_Defeated_Blooper, TRUE) + Call(N(SetEntityPosition), MV_Unk_01, 125, -10, 25) + EndIf + EndIf + Call(MakeEntity, Ref(Entity_BlueWarpPipe), 150, -10, -82, 0, tik_01_ENTRY_2, + Ref(N(EVS_GotoMap_kmr_02_3)), EVT_INDEX_OF_GAME_FLAG(GF_TIK01_WarpPipes), MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BlueWarpPipe), 50, -10, -82, 0, tik_01_ENTRY_3, + Ref(N(EVS_GotoMap_nok_02_2)), EVT_INDEX_OF_GAME_FLAG(GF_TIK01_WarpPipes), MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BlueWarpPipe), -50, -10, -82, 0, tik_01_ENTRY_4, + Ref(N(EVS_GotoMap_dro_01_2)), EVT_INDEX_OF_GAME_FLAG(GF_TIK01_WarpPipes), MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_tik/tik_01/tik_01_5_npc.c b/src/world/area_tik/tik_01/tik_01_5_npc.c index 8ab26d5e145..9dcb0ed69a3 100644 --- a/src/world/area_tik/tik_01/tik_01_5_npc.c +++ b/src/world/area_tik/tik_01/tik_01_5_npc.c @@ -3,88 +3,88 @@ #include "world/common/enemy/Blooper.inc.c" EvtScript N(EVS_NpcIdle_Blooper) = { - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 200) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC(N(EVS_PlayBlooperSong)) - EVT_CALL(ShowMessageAtScreenPos, MSG_MGM_0000, 160, 40) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Blooper_Anim01) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -75) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, 150, 0) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_BLOOPER_MOVE, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_LARGE_ACTOR_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcFlyTo, NPC_SELF, LVar0, 0, 0, 10, 0, EASING_QUADRATIC_IN) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Blooper_Anim0C) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0)) - EVT_WAIT(15) - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_RETURN - EVT_END + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, 200) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(DisablePlayerInput, TRUE) + Exec(N(EVS_PlayBlooperSong)) + Call(ShowMessageAtScreenPos, MSG_MGM_0000, 160, 40) + Wait(20) + Call(SetNpcAnimation, NPC_SELF, ANIM_Blooper_Anim01) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, -75) + Call(SetNpcPos, NPC_SELF, LVar0, 150, 0) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_BLOOPER_MOVE, SOUND_SPACE_DEFAULT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_LARGE_ACTOR_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcFlyTo, NPC_SELF, LVar0, 0, 0, 10, 0, EASING_QUADRATIC_IN) + Call(SetNpcAnimation, NPC_SELF, ANIM_Blooper_Anim0C) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.0)) + Wait(15) + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Return + End }; EvtScript N(EVS_NpcDefeat_Blooper) = { - EVT_WAIT(5) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Blooper_Anim04) - EVT_CALL(MakeLerp, 0, 6 * 360, 40, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_BLOOPER_FALL, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_LARGE_ACTOR_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(NpcFlyTo, NPC_SELF, LVar0, 150, 0, 15, 0, EASING_QUADRATIC_IN) - EVT_WAIT(5) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_WAIT(15) - EVT_EXEC_WAIT(N(EVS_SpawnSwitch)) - EVT_IF_EQ(GF_TIK_DefeatedOneBlooper, FALSE) - EVT_SET(GF_TIK_DefeatedOneBlooper, TRUE) - EVT_ELSE - EVT_SET(GF_TIK_DefeatedTwoBloopers, TRUE) - EVT_END_IF - EVT_SET(GF_TIK01_Defeated_Blooper, TRUE) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + Wait(5) + Thread + Call(SetNpcAnimation, NPC_SELF, ANIM_Blooper_Anim04) + Call(MakeLerp, 0, 6 * 360, 40, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_SELF, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(PlaySoundAtNpc, NPC_SELF, SOUND_BLOOPER_FALL, SOUND_SPACE_DEFAULT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_LARGE_ACTOR_JUMP, SOUND_SPACE_DEFAULT) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(NpcFlyTo, NPC_SELF, LVar0, 150, 0, 15, 0, EASING_QUADRATIC_IN) + Wait(5) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Wait(15) + ExecWait(N(EVS_SpawnSwitch)) + IfEq(GF_TIK_DefeatedOneBlooper, FALSE) + Set(GF_TIK_DefeatedOneBlooper, TRUE) + Else + Set(GF_TIK_DefeatedTwoBloopers, TRUE) + EndIf + Set(GF_TIK01_Defeated_Blooper, TRUE) + Exec(N(EVS_SetupMusic)) + Call(DisablePlayerInput, FALSE) + Call(RemoveNpc, NPC_SELF) + Return + End }; EvtScript N(EVS_NpcInit_Blooper) = { - EVT_IF_EQ(GF_TIK01_Defeated_Blooper, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Blooper))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Blooper))) - EVT_IF_EQ(GF_TIK_DefeatedOneBlooper, FALSE) - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(0.75), EVT_FLOAT(0.75), EVT_FLOAT(0.75)) - EVT_CALL(N(GetBlooperBattleID), 0) - EVT_ELSE - EVT_IF_EQ(GF_TIK_DefeatedTwoBloopers, FALSE) - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(1.25), EVT_FLOAT(1.25), EVT_FLOAT(1.25)) - EVT_CALL(N(GetBlooperBattleID), 1) - EVT_ELSE - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(2.0), EVT_FLOAT(2.0), EVT_FLOAT(2.0)) - EVT_CALL(N(GetBlooperBattleID), 2) - EVT_END_IF - EVT_END_IF - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_TIK01_Defeated_Blooper, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Blooper))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Blooper))) + IfEq(GF_TIK_DefeatedOneBlooper, FALSE) + Call(SetNpcScale, NPC_SELF, Float(0.75), Float(0.75), Float(0.75)) + Call(N(GetBlooperBattleID), 0) + Else + IfEq(GF_TIK_DefeatedTwoBloopers, FALSE) + Call(SetNpcScale, NPC_SELF, Float(1.25), Float(1.25), Float(1.25)) + Call(N(GetBlooperBattleID), 1) + Else + Call(SetNpcScale, NPC_SELF, Float(2.0), Float(2.0), Float(2.0)) + Call(N(GetBlooperBattleID), 2) + EndIf + EndIf + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_Blooper) = { diff --git a/src/world/area_tik/tik_02/tik_02_1_music.c b/src/world/area_tik/tik_02/tik_02_1_music.c index 8cc7950edf1..230339fca0b 100644 --- a/src/world/area_tik/tik_02/tik_02_1_music.c +++ b/src/world/area_tik/tik_02/tik_02_1_music.c @@ -1,13 +1,13 @@ #include "tik_02.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) + Return + End }; EvtScript N(EVS_PlayBlooperSong) = { - EVT_CALL(SetMusicTrack, 0, SONG_BLOOPER_THEME, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BLOOPER_THEME, 0, 8) + Return + End }; diff --git a/src/world/area_tik/tik_02/tik_02_2_main.c b/src/world/area_tik/tik_02/tik_02_2_main.c index 352797d2239..f3d1ddcdfdc 100644 --- a/src/world/area_tik/tik_02/tik_02_2_main.c +++ b/src/world/area_tik/tik_02/tik_02_2_main.c @@ -5,57 +5,57 @@ EvtScript N(EVS_ExitWalk_tik_18_1) = EVT_EXIT_WALK(60, tik_02_ENTRY_0, "tik_18", tik_18_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_18_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_tik_18_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) - EVT_CALL(SetSpriteShading, SHADING_TIK_02) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(PlaySound, SOUND_LOOP_TIK02_WATER) - EVT_CALL(PlaySoundAtF, SOUND_LOOP_TIK02_FLOW2, SOUND_SPACE_WITH_DEPTH, -230, -180, 120) - EVT_CALL(PlaySoundAtF, SOUND_LOOP_TIK02_FLOW3, SOUND_SPACE_WITH_DEPTH, 20, -180, 120) - EVT_EXEC(N(EVS_SetupDrips)) - EVT_CALL(EnableTexPanning, MODEL_nagare1, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) + Call(SetSpriteShading, SHADING_TIK_02) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Call(PlaySound, SOUND_LOOP_TIK02_WATER) + Call(PlaySoundAtF, SOUND_LOOP_TIK02_FLOW2, SOUND_SPACE_WITH_DEPTH, -230, -180, 120) + Call(PlaySoundAtF, SOUND_LOOP_TIK02_FLOW3, SOUND_SPACE_WITH_DEPTH, 20, -180, 120) + Exec(N(EVS_SetupDrips)) + Call(EnableTexPanning, MODEL_nagare1, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 50, 200, 110, 500) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_mizu, TRUE) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(EnableTexPanning, MODEL_mizu, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( 0, -200, -100, -500) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_mizu2, TRUE) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(EnableTexPanning, MODEL_mizu2, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_3) TEX_PAN_PARAMS_STEP( 0, -250, -100, -500) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_taki, TRUE) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(EnableTexPanning, MODEL_taki, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_4) TEX_PAN_PARAMS_STEP( -50, -900, -70,-1200) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; diff --git a/src/world/area_tik/tik_02/tik_02_3_entity.c b/src/world/area_tik/tik_02/tik_02_3_entity.c index 87892c62fd2..10c1719628e 100644 --- a/src/world/area_tik/tik_02/tik_02_3_entity.c +++ b/src/world/area_tik/tik_02/tik_02_3_entity.c @@ -6,9 +6,9 @@ EvtScript N(EVS_OpenChest) = EVT_OPEN_CHEST_BADGE(ITEM_SHRINK_STOMP, GF_TIK02_Chest_ShrinkStomp); EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 280, -10, 0, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_TIK02_Chest_ShrinkStomp) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenChest))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Chest), 280, -10, 0, 0, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_TIK02_Chest_ShrinkStomp) + Call(AssignScript, Ref(N(EVS_OpenChest))) + Return + End }; diff --git a/src/world/area_tik/tik_02/tik_02_4_drips.c b/src/world/area_tik/tik_02/tik_02_4_drips.c index 1577fac2002..2b7906c4565 100644 --- a/src/world/area_tik/tik_02/tik_02_4_drips.c +++ b/src/world/area_tik/tik_02/tik_02_4_drips.c @@ -26,8 +26,8 @@ DripVolumeList N(DripVolumes) = { }; EvtScript N(EVS_SetupDrips) = { - EVT_SET(LVar0, EVT_PTR(N(DripVolumes))) - EVT_EXEC(N(EVS_CreateDripVolumes)) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(DripVolumes))) + Exec(N(EVS_CreateDripVolumes)) + Return + End }; diff --git a/src/world/area_tik/tik_02/tik_02_5_npc.c b/src/world/area_tik/tik_02/tik_02_5_npc.c index 06541e6a844..44a8526601f 100644 --- a/src/world/area_tik/tik_02/tik_02_5_npc.c +++ b/src/world/area_tik/tik_02/tik_02_5_npc.c @@ -3,106 +3,106 @@ #include "world/common/enemy/Blooper.inc.c" EvtScript N(EVS_NpcIdle_Blooper) = { - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, 65) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC(N(EVS_PlayBlooperSong)) - EVT_CALL(ShowMessageAtScreenPos, MSG_MGM_0000, 160, 40) - EVT_THREAD - EVT_CALL(InterpPlayerYaw, 315, 0) - EVT_WAIT(50) - EVT_CALL(InterpPlayerYaw, 45, 0) - EVT_END_THREAD - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -25, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -25, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 140, LVar1, LVar2) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_BLOOPER_MOVE, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_LARGE_ACTOR_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcPos, NPC_SELF, -100, -300, -120) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Blooper_Anim01) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_SELF, 175, 0, 0, 40) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Blooper_Anim0C) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0)) - EVT_WAIT(15) - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_RETURN - EVT_END + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar0, 65) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(DisablePlayerInput, TRUE) + Exec(N(EVS_PlayBlooperSong)) + Call(ShowMessageAtScreenPos, MSG_MGM_0000, 160, 40) + Thread + Call(InterpPlayerYaw, 315, 0) + Wait(50) + Call(InterpPlayerYaw, 45, 0) + EndThread + Call(UseSettingsFrom, CAM_DEFAULT, -25, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, -25, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20) + Thread + Wait(10) + Call(SetPanTarget, CAM_DEFAULT, 140, LVar1, LVar2) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndThread + Call(PlaySoundAtNpc, NPC_SELF, SOUND_BLOOPER_MOVE, SOUND_SPACE_DEFAULT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_LARGE_ACTOR_JUMP, SOUND_SPACE_DEFAULT) + Call(SetNpcPos, NPC_SELF, -100, -300, -120) + Call(SetNpcAnimation, NPC_SELF, ANIM_Blooper_Anim01) + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Call(NpcJump0, NPC_SELF, 175, 0, 0, 40) + Call(SetNpcAnimation, NPC_SELF, ANIM_Blooper_Anim0C) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.0)) + Wait(15) + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Return + End }; EvtScript N(EVS_NpcDefeat_Blooper) = { - EVT_WAIT(5) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Blooper_Anim04) - EVT_CALL(MakeLerp, 0, 6 * 360, 40, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, LVar0, 0) - EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_BLOOPER_FALL, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_LARGE_ACTOR_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_CALL(NpcJump0, NPC_SELF, -100, -300, -120, 40) - EVT_WAIT(1) - EVT_IF_EQ(GF_TIK_DefeatedOneBlooper, FALSE) - EVT_SET(GF_TIK_DefeatedOneBlooper, TRUE) - EVT_ELSE - EVT_SET(GF_TIK_DefeatedTwoBloopers, TRUE) - EVT_END_IF - EVT_SET(GF_TIK02_Defeated_Blooper, TRUE) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + Wait(5) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndThread + Thread + Call(SetNpcAnimation, NPC_SELF, ANIM_Blooper_Anim04) + Call(MakeLerp, 0, 6 * 360, 40, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_SELF, 0, LVar0, 0) + Call(PlayerFaceNpc, NPC_SELF, FALSE) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(PlaySoundAtNpc, NPC_SELF, SOUND_BLOOPER_FALL, SOUND_SPACE_DEFAULT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_LARGE_ACTOR_JUMP, SOUND_SPACE_DEFAULT) + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Call(NpcJump0, NPC_SELF, -100, -300, -120, 40) + Wait(1) + IfEq(GF_TIK_DefeatedOneBlooper, FALSE) + Set(GF_TIK_DefeatedOneBlooper, TRUE) + Else + Set(GF_TIK_DefeatedTwoBloopers, TRUE) + EndIf + Set(GF_TIK02_Defeated_Blooper, TRUE) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Exec(N(EVS_SetupMusic)) + Call(DisablePlayerInput, FALSE) + Call(RemoveNpc, NPC_SELF) + Return + End }; EvtScript N(EVS_NpcInit_Blooper) = { - EVT_IF_EQ(GF_TIK02_Defeated_Blooper, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Blooper))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Blooper))) - EVT_IF_EQ(GF_TIK_DefeatedOneBlooper, FALSE) - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(0.75), EVT_FLOAT(0.75), EVT_FLOAT(0.75)) - EVT_CALL(N(GetBlooperBattleID), 0) - EVT_ELSE - EVT_IF_EQ(GF_TIK_DefeatedTwoBloopers, FALSE) - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(1.25), EVT_FLOAT(1.25), EVT_FLOAT(1.25)) - EVT_CALL(N(GetBlooperBattleID), 1) - EVT_ELSE - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(2.0), EVT_FLOAT(2.0), EVT_FLOAT(2.0)) - EVT_CALL(N(GetBlooperBattleID), 2) - EVT_END_IF - EVT_END_IF - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_TIK02_Defeated_Blooper, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Blooper))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Blooper))) + IfEq(GF_TIK_DefeatedOneBlooper, FALSE) + Call(SetNpcScale, NPC_SELF, Float(0.75), Float(0.75), Float(0.75)) + Call(N(GetBlooperBattleID), 0) + Else + IfEq(GF_TIK_DefeatedTwoBloopers, FALSE) + Call(SetNpcScale, NPC_SELF, Float(1.25), Float(1.25), Float(1.25)) + Call(N(GetBlooperBattleID), 1) + Else + Call(SetNpcScale, NPC_SELF, Float(2.0), Float(2.0), Float(2.0)) + Call(N(GetBlooperBattleID), 2) + EndIf + EndIf + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_Blooper) = { diff --git a/src/world/area_tik/tik_03/tik_03_1_music.c b/src/world/area_tik/tik_03/tik_03_1_music.c index 2aacb997ddb..a336647667c 100644 --- a/src/world/area_tik/tik_03/tik_03_1_music.c +++ b/src/world/area_tik/tik_03/tik_03_1_music.c @@ -1,7 +1,7 @@ #include "tik_03.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) + Return + End }; diff --git a/src/world/area_tik/tik_03/tik_03_2_main.c b/src/world/area_tik/tik_03/tik_03_2_main.c index 33b889a54af..1d9883e4a97 100644 --- a/src/world/area_tik/tik_03/tik_03_2_main.c +++ b/src/world/area_tik/tik_03/tik_03_2_main.c @@ -7,84 +7,84 @@ EvtScript N(EVS_ExitWalk_tik_01_1) = EVT_EXIT_WALK(60, tik_03_ENTRY_0, "tik_01", tik_01_ENTRY_1); EvtScript N(EVS_GotoMap_tik_04_2) = { - EVT_CALL(GotoMap, EVT_PTR("tik_04"), tik_04_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("tik_04"), tik_04_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_ExitPipe_tik_04_2) = EVT_EXIT_PIPE_HORIZONTAL(tik_03_ENTRY_1, COLLIDER_o46, N(EVS_GotoMap_tik_04_2)); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_01_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitPipe_tik_04_2)), TRIGGER_WALL_PUSH, COLLIDER_o46, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_tik_01_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitPipe_tik_04_2)), TRIGGER_WALL_PUSH, COLLIDER_o46, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(tik_03_ENTRY_1) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(tik_03_ENTRY_1) EVT_ENTER_PIPE_HORIZONTAL(COLLIDER_o46, N(EVS_BindExitTriggers)) - EVT_CASE_DEFAULT - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + CaseDefault + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) - EVT_CALL(SetSpriteShading, SHADING_TIK_03) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupDrips)) - EVT_CALL(EnableTexPanning, MODEL_nagare, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) + Call(SetSpriteShading, SHADING_TIK_03) + SetUP_CAMERA_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupDrips)) + Call(EnableTexPanning, MODEL_nagare, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 50, 200, 110, 500) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_mizu, TRUE) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(EnableTexPanning, MODEL_mizu, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( 0, -200, -100, -500) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_mizu2, TRUE) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(EnableTexPanning, MODEL_mizu2, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_3) TEX_PAN_PARAMS_STEP( 0, -250, -100, -500) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_taki, TRUE) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(EnableTexPanning, MODEL_taki, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_4) TEX_PAN_PARAMS_STEP( -50, -900, -70,-1200) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_EXEC(N(EVS_SetupPlatforms)) - EVT_CALL(GetDemoState, LVar0) - EVT_IF_NE(LVar0, DEMO_STATE_NONE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitPipe_tik_04_2)), TRIGGER_WALL_PUSH, COLLIDER_o46, 1, 0) - EVT_EXEC_WAIT(N(EVS_PlayDemoScene)) - EVT_RETURN - EVT_END_IF - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(PlaySound, SOUND_LOOP_TIK03_WATER) - EVT_CALL(PlaySoundAtF, SOUND_LOOP_TIK03_FLOW1, SOUND_SPACE_WITH_DEPTH, -10, -20, 120) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Exec(N(EVS_SetupPlatforms)) + Call(GetDemoState, LVar0) + IfNe(LVar0, DEMO_STATE_NONE) + BindTrigger(Ref(N(EVS_ExitPipe_tik_04_2)), TRIGGER_WALL_PUSH, COLLIDER_o46, 1, 0) + ExecWait(N(EVS_PlayDemoScene)) + Return + EndIf + Exec(N(EVS_SetupMusic)) + Call(PlaySound, SOUND_LOOP_TIK03_WATER) + Call(PlaySoundAtF, SOUND_LOOP_TIK03_FLOW1, SOUND_SPACE_WITH_DEPTH, -10, -20, 120) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_tik/tik_03/tik_03_3_drips.c b/src/world/area_tik/tik_03/tik_03_3_drips.c index 222f2f519c2..f107a08de3b 100644 --- a/src/world/area_tik/tik_03/tik_03_3_drips.c +++ b/src/world/area_tik/tik_03/tik_03_3_drips.c @@ -26,8 +26,8 @@ DripVolumeList N(DripVolumes) = { }; EvtScript N(EVS_SetupDrips) = { - EVT_SET(LVar0, EVT_PTR(N(DripVolumes))) - EVT_EXEC(N(EVS_CreateDripVolumes)) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(DripVolumes))) + Exec(N(EVS_CreateDripVolumes)) + Return + End }; diff --git a/src/world/area_tik/tik_03/tik_03_4_platforms.c b/src/world/area_tik/tik_03/tik_03_4_platforms.c index c597f656fd5..1a29dcc86c0 100644 --- a/src/world/area_tik/tik_03/tik_03_4_platforms.c +++ b/src/world/area_tik/tik_03/tik_03_4_platforms.c @@ -23,74 +23,74 @@ API_CALLABLE(N(PausePlatformsDuringPound)) { } EvtScript N(EVS_UpdatePlatform) = { - EVT_SET_GROUP(EVT_GROUP_EF) - EVT_CALL(ParentColliderToModel, LVarB, LVarA) - EVT_SETF(LVar0, EVT_FLOAT(0.0)) - EVT_SETF(LVarD, EVT_FLOAT(-300.0)) - EVT_SUBF(LVarD, LVarC) - EVT_LABEL(0) - EVT_SETF(LVar1, LVarC) - EVT_SUBF(LVar0, EVT_FLOAT(80.0)) - EVT_LABEL(1) - EVT_CALL(N(PausePlatformsDuringPound)) - EVT_ADDF(LVar0, EVT_FLOAT(1.5)) - EVT_ADDF(LVar1, EVT_FLOAT(1.5)) - EVT_CALL(TranslateModel, LVarA, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, LVarB) - EVT_WAIT(1) - EVT_IF_LT(LVar1, EVT_FLOAT(100.0)) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(TranslateModel, LVarA, 0, LVarD, 0) - EVT_SETF(LVar0, LVarD) - EVT_SETF(LVarC, EVT_FLOAT(-300.0)) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_EF) + Call(ParentColliderToModel, LVarB, LVarA) + SetF(LVar0, Float(0.0)) + SetF(LVarD, Float(-300.0)) + SubF(LVarD, LVarC) + Label(0) + SetF(LVar1, LVarC) + SubF(LVar0, Float(80.0)) + Label(1) + Call(N(PausePlatformsDuringPound)) + AddF(LVar0, Float(1.5)) + AddF(LVar1, Float(1.5)) + Call(TranslateModel, LVarA, 0, LVar0, 0) + Call(UpdateColliderTransform, LVarB) + Wait(1) + IfLt(LVar1, Float(100.0)) + Goto(1) + EndIf + Call(TranslateModel, LVarA, 0, LVarD, 0) + SetF(LVar0, LVarD) + SetF(LVarC, Float(-300.0)) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_CreatePlatform1) = { - EVT_SET(LVarA, MODEL_erb) - EVT_SET(LVarB, COLLIDER_1) - EVT_SET(LVarC, 20) - EVT_EXEC_WAIT(N(EVS_UpdatePlatform)) - EVT_RETURN - EVT_END + Set(LVarA, MODEL_erb) + Set(LVarB, COLLIDER_1) + Set(LVarC, 20) + ExecWait(N(EVS_UpdatePlatform)) + Return + End }; EvtScript N(EVS_CreatePlatform2) = { - EVT_SET(LVarA, MODEL_o40) - EVT_SET(LVarB, COLLIDER_3) - EVT_SET(LVarC, -80) - EVT_EXEC_WAIT(N(EVS_UpdatePlatform)) - EVT_RETURN - EVT_END + Set(LVarA, MODEL_o40) + Set(LVarB, COLLIDER_3) + Set(LVarC, -80) + ExecWait(N(EVS_UpdatePlatform)) + Return + End }; EvtScript N(EVS_CreatePlatform3) = { - EVT_SET(LVarA, MODEL_o41) - EVT_SET(LVarB, COLLIDER_4) - EVT_SET(LVarC, -170) - EVT_EXEC_WAIT(N(EVS_UpdatePlatform)) - EVT_RETURN - EVT_END + Set(LVarA, MODEL_o41) + Set(LVarB, COLLIDER_4) + Set(LVarC, -170) + ExecWait(N(EVS_UpdatePlatform)) + Return + End }; EvtScript N(EVS_CreatePlatform4) = { - EVT_SET(LVarA, MODEL_o39) - EVT_SET(LVarB, COLLIDER_2) - EVT_SET(LVarC, -270) - EVT_EXEC_WAIT(N(EVS_UpdatePlatform)) - EVT_RETURN - EVT_END + Set(LVarA, MODEL_o39) + Set(LVarB, COLLIDER_2) + Set(LVarC, -270) + ExecWait(N(EVS_UpdatePlatform)) + Return + End }; EvtScript N(EVS_SetupPlatforms) = { - EVT_EXEC(N(EVS_CreatePlatform1)) - EVT_EXEC(N(EVS_CreatePlatform2)) - EVT_EXEC(N(EVS_CreatePlatform3)) - EVT_EXEC(N(EVS_CreatePlatform4)) - EVT_RETURN - EVT_END + Exec(N(EVS_CreatePlatform1)) + Exec(N(EVS_CreatePlatform2)) + Exec(N(EVS_CreatePlatform3)) + Exec(N(EVS_CreatePlatform4)) + Return + End }; diff --git a/src/world/area_tik/tik_03/tik_03_5_entity.c b/src/world/area_tik/tik_03/tik_03_5_entity.c index b81c665be48..34549c599ab 100644 --- a/src/world/area_tik/tik_03/tik_03_5_entity.c +++ b/src/world/area_tik/tik_03/tik_03_5_entity.c @@ -2,12 +2,12 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 200, 50, -75, 0, ITEM_SNOWMAN_DOLL, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_TIK03_ItemBlock_SnowmanDoll) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 140, 50, -75, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_TIK03_ItemBlock_CoinA) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 260, 50, -75, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_TIK03_ItemBlock_CoinB) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_YellowBlock), 200, 50, -75, 0, ITEM_SNOWMAN_DOLL, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_TIK03_ItemBlock_SnowmanDoll) + Call(MakeEntity, Ref(Entity_YellowBlock), 140, 50, -75, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_TIK03_ItemBlock_CoinA) + Call(MakeEntity, Ref(Entity_YellowBlock), 260, 50, -75, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_TIK03_ItemBlock_CoinB) + Return + End }; diff --git a/src/world/area_tik/tik_03/tik_03_6_demo.c b/src/world/area_tik/tik_03/tik_03_6_demo.c index 7bf270895c4..0a2ee557091 100644 --- a/src/world/area_tik/tik_03/tik_03_6_demo.c +++ b/src/world/area_tik/tik_03/tik_03_6_demo.c @@ -7,45 +7,45 @@ API_CALLABLE(N(ChangePartnerFollowState)) { } EvtScript N(EVS_ProvideDemoInputs) = { - EVT_CALL(DemoJoystickXY, -85, -1) - EVT_WAIT(32) - EVT_CALL(DemoSetButtons, BUTTON_A) - EVT_WAIT(7) - EVT_CALL(DemoSetButtons, 0) - EVT_WAIT(20) - EVT_CALL(DemoSetButtons, BUTTON_A) - EVT_WAIT(30) - EVT_CALL(DemoSetButtons, 0) - EVT_WAIT(15) - EVT_CALL(N(ChangePartnerFollowState)) - EVT_WAIT(15) - EVT_IF_EQ(GF_DemoSceneDone, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_DemoSceneDone, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("tik_03"), tik_03_ENTRY_2, TRANSITION_END_DEMO_SCENE_BLACK) - EVT_WAIT(110) - EVT_RETURN - EVT_END + Call(DemoJoystickXY, -85, -1) + Wait(32) + Call(DemoSetButtons, BUTTON_A) + Wait(7) + Call(DemoSetButtons, 0) + Wait(20) + Call(DemoSetButtons, BUTTON_A) + Wait(30) + Call(DemoSetButtons, 0) + Wait(15) + Call(N(ChangePartnerFollowState)) + Wait(15) + IfEq(GF_DemoSceneDone, TRUE) + Return + EndIf + Set(GF_DemoSceneDone, TRUE) + Call(GotoMapSpecial, Ref("tik_03"), tik_03_ENTRY_2, TRANSITION_END_DEMO_SCENE_BLACK) + Wait(110) + Return + End }; EvtScript N(EVS_MonitorDemoState) = { - EVT_WAIT(10) - EVT_LOOP(0) - EVT_CALL(GetDemoState, LVar0) - EVT_IF_EQ(LVar0, DEMO_STATE_CHANGE_MAP) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(GF_DemoSceneDone, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_DemoSceneDone, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("tik_03"), tik_03_ENTRY_2, TRANSITION_END_DEMO_SCENE_WHITE) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Wait(10) + Loop(0) + Call(GetDemoState, LVar0) + IfEq(LVar0, DEMO_STATE_CHANGE_MAP) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(GF_DemoSceneDone, TRUE) + Return + EndIf + Set(GF_DemoSceneDone, TRUE) + Call(GotoMapSpecial, Ref("tik_03"), tik_03_ENTRY_2, TRANSITION_END_DEMO_SCENE_WHITE) + Wait(100) + Return + End }; s32 N(DemoInitState) = { @@ -78,10 +78,10 @@ API_CALLABLE(N(SetupDemoScene)) { } EvtScript N(EVS_PlayDemoScene) = { - EVT_CALL(N(SetupDemoScene)) - EVT_SET(GF_DemoSceneDone, FALSE) - EVT_EXEC(N(EVS_MonitorDemoState)) - EVT_EXEC(N(EVS_ProvideDemoInputs)) - EVT_RETURN - EVT_END + Call(N(SetupDemoScene)) + Set(GF_DemoSceneDone, FALSE) + Exec(N(EVS_MonitorDemoState)) + Exec(N(EVS_ProvideDemoInputs)) + Return + End }; diff --git a/src/world/area_tik/tik_04/tik_04_1_music.c b/src/world/area_tik/tik_04/tik_04_1_music.c index 586e1311896..d454d5aa32f 100644 --- a/src/world/area_tik/tik_04/tik_04_1_music.c +++ b/src/world/area_tik/tik_04/tik_04_1_music.c @@ -1,7 +1,7 @@ #include "tik_04.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) + Return + End }; diff --git a/src/world/area_tik/tik_04/tik_04_2_main.c b/src/world/area_tik/tik_04/tik_04_2_main.c index 064cd5fc560..064f4792484 100644 --- a/src/world/area_tik/tik_04/tik_04_2_main.c +++ b/src/world/area_tik/tik_04/tik_04_2_main.c @@ -8,59 +8,59 @@ EvtScript N(EVS_ExitWalk_tik_05_0) = EVT_EXIT_WALK(60, tik_04_ENTRY_0, "tik_05", EvtScript N(EVS_ExitWalk_tik_07_0) = EVT_EXIT_WALK(60, tik_04_ENTRY_1, "tik_07", tik_07_ENTRY_0); EvtScript N(EVS_GotoMap_tik_03_1) = { - EVT_CALL(GotoMap, EVT_PTR("tik_03"), tik_03_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("tik_03"), tik_03_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitPipe_tik_03_1) = EVT_EXIT_PIPE_HORIZONTAL(tik_04_ENTRY_2, COLLIDER_ttd, N(EVS_GotoMap_tik_03_1)); EvtScript N(EVS_GotoMap_tik_12_0) = { - EVT_CALL(GotoMap, EVT_PTR("tik_12"), tik_12_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("tik_12"), tik_12_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitPipe_tik_12_0) = EVT_EXIT_PIPE_VERTICAL(tik_04_ENTRY_3, COLLIDER_ttd2, N(EVS_GotoMap_tik_12_0)); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_05_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_07_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitPipe_tik_03_1)), TRIGGER_WALL_PUSH, COLLIDER_ttd, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitPipe_tik_12_0)), TRIGGER_FLOOR_TOUCH, COLLIDER_ttd2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_tik_05_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_tik_07_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitPipe_tik_03_1)), TRIGGER_WALL_PUSH, COLLIDER_ttd, 1, 0) + BindTrigger(Ref(N(EVS_ExitPipe_tik_12_0)), TRIGGER_FLOOR_TOUCH, COLLIDER_ttd2, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) - EVT_CALL(SetSpriteShading, SHADING_TIK_04) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_SetupDrips)) - EVT_CALL(EnableTexPanning, MODEL_mizu, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) + Call(SetSpriteShading, SHADING_TIK_04) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_SetupDrips)) + Call(EnableTexPanning, MODEL_mizu, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( 0, -200, -100, -500) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_EXEC(N(EVS_SetupPlatforms)) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(tik_04_ENTRY_2) + Exec(N(EVS_UpdateTexturePan)) + EndThread + Exec(N(EVS_SetupPlatforms)) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(tik_04_ENTRY_2) EVT_ENTER_PIPE_HORIZONTAL(COLLIDER_ttd, N(EVS_BindExitTriggers)) - EVT_CASE_EQ(tik_04_ENTRY_3) + CaseEq(tik_04_ENTRY_3) EVT_ENTER_PIPE_VERTICAL(N(EVS_BindExitTriggers)) - EVT_CASE_DEFAULT - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_RETURN - EVT_END + CaseDefault + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Wait(1) + Return + End }; diff --git a/src/world/area_tik/tik_04/tik_04_3_drips.c b/src/world/area_tik/tik_04/tik_04_3_drips.c index 48d05189597..1b466778880 100644 --- a/src/world/area_tik/tik_04/tik_04_3_drips.c +++ b/src/world/area_tik/tik_04/tik_04_3_drips.c @@ -26,8 +26,8 @@ DripVolumeList N(DripVolumes) = { }; EvtScript N(EVS_SetupDrips) = { - EVT_SET(LVar0, EVT_PTR(N(DripVolumes))) - EVT_EXEC(N(EVS_CreateDripVolumes)) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(DripVolumes))) + Exec(N(EVS_CreateDripVolumes)) + Return + End }; diff --git a/src/world/area_tik/tik_04/tik_04_4_platforms.c b/src/world/area_tik/tik_04/tik_04_4_platforms.c index 5183488a595..1f864b33c5b 100644 --- a/src/world/area_tik/tik_04/tik_04_4_platforms.c +++ b/src/world/area_tik/tik_04/tik_04_4_platforms.c @@ -75,80 +75,80 @@ API_CALLABLE(N(PausePlatformsDuringPound)) { } EvtScript N(EVS_UpdatePlatforms) = { - EVT_CALL(N(GetFloorCollider), LVarA) - EVT_SETF(LVar0, EVT_FLOAT(0.0)) - EVT_LABEL(0) - EVT_CALL(N(PausePlatformsDuringPound)) - EVT_CALL(TranslateModel, LVar1, 10, LVar0, 0) - EVT_CALL(UpdateColliderTransform, LVar3) - EVT_SETF(LVar5, LVar0) - EVT_MULF(LVar5, EVT_FLOAT(-1.0)) - EVT_ADDF(LVar5, EVT_FLOAT(30.0)) - EVT_CALL(TranslateModel, LVar2, -10, LVar5, 0) - EVT_CALL(UpdateColliderTransform, LVar4) - EVT_SUBF(LVar0, EVT_FLOAT(0.5)) - EVT_IF_LT(LVar0, EVT_FLOAT(-120.0)) - EVT_ADDF(LVar0, EVT_FLOAT(0.5)) - EVT_END_IF - EVT_USE_ARRAY(MV_Unk_00) - EVT_CALL(N(UpdatePlatformShadows)) - EVT_WAIT(1) - EVT_CALL(N(GetFloorCollider), LVarB) - EVT_CALL(GetPlayerActionState, LVarC) - EVT_IF_EQ(LVarB, LVar3) - EVT_IF_NE(LVarC, ACTION_STATE_JUMP) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_LABEL(1) - EVT_CALL(N(PausePlatformsDuringPound)) - EVT_ADDF(LVar0, EVT_FLOAT(0.5)) - EVT_CALL(TranslateModel, LVar1, 10, LVar0, 0) - EVT_CALL(UpdateColliderTransform, LVar3) - EVT_SETF(LVar5, LVar0) - EVT_MULF(LVar5, EVT_FLOAT(-1.0)) - EVT_ADDF(LVar5, EVT_FLOAT(30.0)) - EVT_CALL(TranslateModel, LVar2, -10, LVar5, 0) - EVT_CALL(UpdateColliderTransform, LVar4) - EVT_USE_ARRAY(MV_Unk_00) - EVT_CALL(N(UpdatePlatformShadows)) - EVT_WAIT(1) - EVT_CALL(N(GetFloorCollider), LVarB) - EVT_CALL(GetPlayerActionState, LVarC) - EVT_IF_EQ(LVarB, LVar3) - EVT_IF_NE(LVarC, ACTION_STATE_JUMP) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_IF_LT(LVar0, 0) - EVT_GOTO(1) - EVT_END_IF - EVT_RETURN - EVT_END + Call(N(GetFloorCollider), LVarA) + SetF(LVar0, Float(0.0)) + Label(0) + Call(N(PausePlatformsDuringPound)) + Call(TranslateModel, LVar1, 10, LVar0, 0) + Call(UpdateColliderTransform, LVar3) + SetF(LVar5, LVar0) + MulF(LVar5, Float(-1.0)) + AddF(LVar5, Float(30.0)) + Call(TranslateModel, LVar2, -10, LVar5, 0) + Call(UpdateColliderTransform, LVar4) + SubF(LVar0, Float(0.5)) + IfLt(LVar0, Float(-120.0)) + AddF(LVar0, Float(0.5)) + EndIf + UseArray(MV_Unk_00) + Call(N(UpdatePlatformShadows)) + Wait(1) + Call(N(GetFloorCollider), LVarB) + Call(GetPlayerActionState, LVarC) + IfEq(LVarB, LVar3) + IfNe(LVarC, ACTION_STATE_JUMP) + Goto(0) + EndIf + EndIf + Label(1) + Call(N(PausePlatformsDuringPound)) + AddF(LVar0, Float(0.5)) + Call(TranslateModel, LVar1, 10, LVar0, 0) + Call(UpdateColliderTransform, LVar3) + SetF(LVar5, LVar0) + MulF(LVar5, Float(-1.0)) + AddF(LVar5, Float(30.0)) + Call(TranslateModel, LVar2, -10, LVar5, 0) + Call(UpdateColliderTransform, LVar4) + UseArray(MV_Unk_00) + Call(N(UpdatePlatformShadows)) + Wait(1) + Call(N(GetFloorCollider), LVarB) + Call(GetPlayerActionState, LVarC) + IfEq(LVarB, LVar3) + IfNe(LVarC, ACTION_STATE_JUMP) + Goto(0) + EndIf + EndIf + IfLt(LVar0, 0) + Goto(1) + EndIf + Return + End }; EvtScript N(EVS_OnTouchPlatform) = { - EVT_SET(LVar1, MODEL_erb1) - EVT_SET(LVar2, MODEL_erb2) - EVT_SET(LVar3, COLLIDER_erb1) - EVT_SET(LVar4, COLLIDER_erb2) - EVT_EXEC_WAIT(N(EVS_UpdatePlatforms)) - EVT_RETURN - EVT_END + Set(LVar1, MODEL_erb1) + Set(LVar2, MODEL_erb2) + Set(LVar3, COLLIDER_erb1) + Set(LVar4, COLLIDER_erb2) + ExecWait(N(EVS_UpdatePlatforms)) + Return + End }; EvtScript N(EVS_SetupPlatforms) = { - EVT_CALL(ParentColliderToModel, COLLIDER_erb1, MODEL_erb1) - EVT_CALL(ParentColliderToModel, COLLIDER_erb2, MODEL_erb2) - EVT_CALL(TranslateModel, MODEL_erb1, 10, 0, 0) - EVT_CALL(TranslateModel, MODEL_erb2, -10, 30, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_erb1) - EVT_CALL(UpdateColliderTransform, COLLIDER_erb2) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouchPlatform)), TRIGGER_FLOOR_TOUCH, COLLIDER_erb1, 1, 0) - EVT_MALLOC_ARRAY(2, MV_Unk_00) - EVT_USE_ARRAY(MV_Unk_00) - EVT_CALL(N(CreatePlatformShadows)) - EVT_CALL(N(UpdatePlatformShadows)) - EVT_RETURN - EVT_END + Call(ParentColliderToModel, COLLIDER_erb1, MODEL_erb1) + Call(ParentColliderToModel, COLLIDER_erb2, MODEL_erb2) + Call(TranslateModel, MODEL_erb1, 10, 0, 0) + Call(TranslateModel, MODEL_erb2, -10, 30, 0) + Call(UpdateColliderTransform, COLLIDER_erb1) + Call(UpdateColliderTransform, COLLIDER_erb2) + BindTrigger(Ref(N(EVS_OnTouchPlatform)), TRIGGER_FLOOR_TOUCH, COLLIDER_erb1, 1, 0) + MallocArray(2, MV_Unk_00) + UseArray(MV_Unk_00) + Call(N(CreatePlatformShadows)) + Call(N(UpdatePlatformShadows)) + Return + End }; diff --git a/src/world/area_tik/tik_04/tik_04_5_npc.c b/src/world/area_tik/tik_04/tik_04_5_npc.c index 67b148685a0..a444c1d93f6 100644 --- a/src/world/area_tik/tik_04/tik_04_5_npc.c +++ b/src/world/area_tik/tik_04/tik_04_5_npc.c @@ -3,45 +3,45 @@ #include "world/common/enemy/SpikedGloomba_Wander.inc.c" EvtScript N(EVS_NpcIdle_SpikedGloomba) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(tik_04_ENTRY_0) - EVT_CALL(SetNpcPos, NPC_SELF, 280, -10, 0) - EVT_CASE_EQ(tik_04_ENTRY_1) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_SpikedGloomba_Wander))) - EVT_RETURN - EVT_CASE_EQ(tik_04_ENTRY_2) - EVT_CALL(SetNpcPos, NPC_SELF, 280, -10, 0) - EVT_CASE_EQ(tik_04_ENTRY_3) - EVT_CALL(SetNpcPos, NPC_SELF, 360, -10, 0) - EVT_END_SWITCH - EVT_LABEL(100) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, -30) - EVT_WAIT(1) - EVT_GOTO(100) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_SpikedGoomba_Dark_Run) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING | NPC_FLAG_NO_SHADOW_RAYCAST, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcSpeed, NPC_SELF, 2) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, 55, 0, 0) - EVT_ELSE - EVT_WAIT(14) - EVT_CALL(NpcMoveTo, NPC_SELF, 60, 0, 0) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_SpikedGoomba_Dark_Idle) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_SpikedGloomba_Wander))) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(tik_04_ENTRY_0) + Call(SetNpcPos, NPC_SELF, 280, -10, 0) + CaseEq(tik_04_ENTRY_1) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_SpikedGloomba_Wander))) + Return + CaseEq(tik_04_ENTRY_2) + Call(SetNpcPos, NPC_SELF, 280, -10, 0) + CaseEq(tik_04_ENTRY_3) + Call(SetNpcPos, NPC_SELF, 360, -10, 0) + EndSwitch + Label(100) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, -30) + Wait(1) + Goto(100) + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_SpikedGoomba_Dark_Run) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING | NPC_FLAG_NO_SHADOW_RAYCAST, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcSpeed, NPC_SELF, 2) + Call(GetSelfNpcID, LVar0) + IfEq(LVar0, 0) + Call(NpcMoveTo, NPC_SELF, 55, 0, 0) + Else + Wait(14) + Call(NpcMoveTo, NPC_SELF, 60, 0, 0) + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_SpikedGoomba_Dark_Idle) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_SpikedGloomba_Wander))) + Return + End }; EvtScript N(EVS_NpcInit_SpikedGloomba) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_SpikedGloomba))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_SpikedGloomba))) + Return + End }; NpcData N(NpcData_SpikedGloomba_01) = { diff --git a/src/world/area_tik/tik_05/tik_05_1_music.c b/src/world/area_tik/tik_05/tik_05_1_music.c index 7201da9677f..a3b652d8690 100644 --- a/src/world/area_tik/tik_05/tik_05_1_music.c +++ b/src/world/area_tik/tik_05/tik_05_1_music.c @@ -1,7 +1,7 @@ #include "tik_05.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) + Return + End }; diff --git a/src/world/area_tik/tik_05/tik_05_2_main.c b/src/world/area_tik/tik_05/tik_05_2_main.c index 6f2876f82f6..ba9304b3d34 100644 --- a/src/world/area_tik/tik_05/tik_05_2_main.c +++ b/src/world/area_tik/tik_05/tik_05_2_main.c @@ -5,40 +5,40 @@ EvtScript N(EVS_ExitWalk_tik_04_0) = EVT_EXIT_WALK(60, tik_05_ENTRY_0, "tik_04", tik_04_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_tik_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) - EVT_CALL(SetSpriteShading, SHADING_TIK_05) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(PlaySound, SOUND_LOOP_TIK05_WATER) - EVT_CALL(PlaySoundAtF, SOUND_LOOP_TIK05_FLOW1, SOUND_SPACE_WITH_DEPTH, -85, -20, 120) - EVT_EXEC(N(EVS_SetupDrips)) - EVT_CALL(EnableTexPanning, MODEL_nagare, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) + Call(SetSpriteShading, SHADING_TIK_05) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Call(PlaySound, SOUND_LOOP_TIK05_WATER) + Call(PlaySoundAtF, SOUND_LOOP_TIK05_FLOW1, SOUND_SPACE_WITH_DEPTH, -85, -20, 120) + Exec(N(EVS_SetupDrips)) + Call(EnableTexPanning, MODEL_nagare, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 50, 200, 110, 500) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_taki, TRUE) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(EnableTexPanning, MODEL_taki, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_4) TEX_PAN_PARAMS_STEP( -50, -900, -70,-1200) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; diff --git a/src/world/area_tik/tik_05/tik_05_3_drips.c b/src/world/area_tik/tik_05/tik_05_3_drips.c index a37e5db900f..c5dd138891d 100644 --- a/src/world/area_tik/tik_05/tik_05_3_drips.c +++ b/src/world/area_tik/tik_05/tik_05_3_drips.c @@ -18,8 +18,8 @@ DripVolumeList N(DripVolumes) = { }; EvtScript N(EVS_SetupDrips) = { - EVT_SET(LVar0, EVT_PTR(N(DripVolumes))) - EVT_EXEC(N(EVS_CreateDripVolumes)) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(DripVolumes))) + Exec(N(EVS_CreateDripVolumes)) + Return + End }; diff --git a/src/world/area_tik/tik_05/tik_05_4_entity.c b/src/world/area_tik/tik_05/tik_05_4_entity.c index 06162b61c05..d71f0f00229 100644 --- a/src/world/area_tik/tik_05/tik_05_4_entity.c +++ b/src/world/area_tik/tik_05/tik_05_4_entity.c @@ -20,54 +20,54 @@ API_CALLABLE(N(PlaySpringAnimation)) { #include "world/common/todo/SetEntityPosition.inc.c" EvtScript N(EVS_BreakBlock_DropSpring) = { - EVT_IF_EQ(GF_TIK05_SpringBrick, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_TIK05_SpringBrick, TRUE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar5, 25) - EVT_CALL(MakeLerp, 75, 105, 8, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetEntityPosition), MV_Unk_00, LVar5, LVar0, 0) - EVT_WAIT(1) - EVT_SUB(LVar5, 2) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, LVar0, -10, 22, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetEntityPosition), MV_Unk_00, LVar5, LVar0, 0) - EVT_WAIT(1) - EVT_SUB(LVar5, 2) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAt, SOUND_OBJECT_LAND, SOUND_SPACE_DEFAULT, LVar5, LVar0, 0) - EVT_CALL(PlaySoundAt, SOUND_SPRING, SOUND_SPACE_DEFAULT, LVar5, LVar0, 0) - EVT_CALL(N(PlaySpringAnimation), MV_Unk_00) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + IfEq(GF_TIK05_SpringBrick, TRUE) + Return + EndIf + Set(GF_TIK05_SpringBrick, TRUE) + Call(DisablePlayerInput, TRUE) + Set(LVar5, 25) + Call(MakeLerp, 75, 105, 8, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(N(SetEntityPosition), MV_Unk_00, LVar5, LVar0, 0) + Wait(1) + Sub(LVar5, 2) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, LVar0, -10, 22, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(N(SetEntityPosition), MV_Unk_00, LVar5, LVar0, 0) + Wait(1) + Sub(LVar5, 2) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAt, SOUND_OBJECT_LAND, SOUND_SPACE_DEFAULT, LVar5, LVar0, 0) + Call(PlaySoundAt, SOUND_SPRING, SOUND_SPACE_DEFAULT, LVar5, LVar0, 0) + Call(N(PlaySpringAnimation), MV_Unk_00) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_OpenChest) = EVT_OPEN_CHEST_BADGE(ITEM_POWER_SMASH1, GF_TIK05_Chest_PowerSmash1); EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), -185, 60, -25, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_TIK05_Chest_PowerSmash1) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenChest))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 25, 50, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_BreakBlock_DropSpring))) - EVT_IF_EQ(GF_TIK05_SpringBrick, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SimpleSpring), 25, 75, 0, 0, 100, MAKE_ENTITY_END) - EVT_SET(MV_Unk_00, LVar0) - EVT_ELSE - EVT_CALL(MakeEntity, EVT_PTR(Entity_SimpleSpring), -35, -10, 0, 0, 100, MAKE_ENTITY_END) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Chest), -185, 60, -25, 0, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_TIK05_Chest_PowerSmash1) + Call(AssignScript, Ref(N(EVS_OpenChest))) + Call(MakeEntity, Ref(Entity_BrickBlock), 25, 50, 0, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_BreakBlock_DropSpring))) + IfEq(GF_TIK05_SpringBrick, FALSE) + Call(MakeEntity, Ref(Entity_SimpleSpring), 25, 75, 0, 0, 100, MAKE_ENTITY_END) + Set(MV_Unk_00, LVar0) + Else + Call(MakeEntity, Ref(Entity_SimpleSpring), -35, -10, 0, 0, 100, MAKE_ENTITY_END) + EndIf + Return + End }; diff --git a/src/world/area_tik/tik_06/tik_06_1_music.c b/src/world/area_tik/tik_06/tik_06_1_music.c index fe33bf80876..7029e4e5585 100644 --- a/src/world/area_tik/tik_06/tik_06_1_music.c +++ b/src/world/area_tik/tik_06/tik_06_1_music.c @@ -1,7 +1,7 @@ #include "tik_06.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) + Return + End }; diff --git a/src/world/area_tik/tik_06/tik_06_2_main.c b/src/world/area_tik/tik_06/tik_06_2_main.c index 9e9fb051ab5..5fa6e230ad7 100644 --- a/src/world/area_tik/tik_06/tik_06_2_main.c +++ b/src/world/area_tik/tik_06/tik_06_2_main.c @@ -8,107 +8,107 @@ EvtScript N(EVS_ExitWalk_tik_01_0) = EVT_EXIT_WALK(60, tik_06_ENTRY_0, "tik_01", EvtScript N(EVS_ExitWalk_tik_18_0) = EVT_EXIT_WALK(60, tik_06_ENTRY_1, "tik_18", tik_18_ENTRY_0); EvtScript N(EVS_GotoMap_mac_02_4) = { - EVT_CALL(GotoMap, EVT_PTR("mac_02"), mac_02_ENTRY_4) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("mac_02"), mac_02_ENTRY_4) + Wait(100) + Return + End }; EvtScript N(EVS_OnEnterPipe_Upward) = EVT_EXIT_PIPE_HORIZONTAL(tik_06_ENTRY_3, COLLIDER_o89, N(EVS_GotoMap_mac_02_4)); EvtScript N(EVS_GotoMap_tik_08_3) = { - EVT_CALL(GotoMap, EVT_PTR("tik_08"), tik_08_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("tik_08"), tik_08_ENTRY_3) + Wait(100) + Return + End }; EvtScript N(EVS_OnEnterPipe_Downward) = EVT_EXIT_PIPE_VERTICAL(tik_06_ENTRY_2, COLLIDER_o57, N(EVS_GotoMap_tik_08_3)); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_01_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_18_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnEnterPipe_Upward)), TRIGGER_WALL_PUSH, COLLIDER_o89, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnEnterPipe_Downward)), TRIGGER_FLOOR_TOUCH, COLLIDER_o57, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_tik_01_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_tik_18_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_OnEnterPipe_Upward)), TRIGGER_WALL_PUSH, COLLIDER_o89, 1, 0) + BindTrigger(Ref(N(EVS_OnEnterPipe_Downward)), TRIGGER_FLOOR_TOUCH, COLLIDER_o57, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(tik_06_ENTRY_2) - EVT_SET(LVarA, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(N(EVS_Pipe_EnterVertical)) - EVT_CASE_EQ(tik_06_ENTRY_3) - EVT_SET(LVarA, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_SET(LVarB, COLLIDER_o89) - EVT_EXEC(N(EVS_Pipe_EnterHorizontal)) - EVT_CASE_DEFAULT - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(tik_06_ENTRY_2) + Set(LVarA, Ref(N(EVS_BindExitTriggers))) + Exec(N(EVS_Pipe_EnterVertical)) + CaseEq(tik_06_ENTRY_3) + Set(LVarA, Ref(N(EVS_BindExitTriggers))) + Set(LVarB, COLLIDER_o89) + Exec(N(EVS_Pipe_EnterHorizontal)) + CaseDefault + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) - EVT_CALL(SetSpriteShading, SHADING_TIK_06) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_SET(GF_MAP_ToadTownTunnels, TRUE) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(PlaySound, SOUND_LOOP_TIK06_WATER) - EVT_CALL(PlaySoundAtF, SOUND_LOOP_TIK06_FLOW2, SOUND_SPACE_WITH_DEPTH, -85, -180, 120) - EVT_CALL(PlaySoundAtF, SOUND_LOOP_TIK06_FLOW3, SOUND_SPACE_WITH_DEPTH, -25, -140, -130) - EVT_CALL(PlaySoundAtF, SOUND_LOOP_TIK06_FLOW4, SOUND_SPACE_WITH_DEPTH, -35, -180, 130) - EVT_EXEC(N(EVS_SetupDrips)) - EVT_CALL(EnableTexPanning, MODEL_nagare1, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) + Call(SetSpriteShading, SHADING_TIK_06) + SetUP_CAMERA_NO_LEAD() + Set(GF_MAP_ToadTownTunnels, TRUE) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Call(PlaySound, SOUND_LOOP_TIK06_WATER) + Call(PlaySoundAtF, SOUND_LOOP_TIK06_FLOW2, SOUND_SPACE_WITH_DEPTH, -85, -180, 120) + Call(PlaySoundAtF, SOUND_LOOP_TIK06_FLOW3, SOUND_SPACE_WITH_DEPTH, -25, -140, -130) + Call(PlaySoundAtF, SOUND_LOOP_TIK06_FLOW4, SOUND_SPACE_WITH_DEPTH, -35, -180, 130) + Exec(N(EVS_SetupDrips)) + Call(EnableTexPanning, MODEL_nagare1, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 50, 200, 110, 500) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_mizu, TRUE) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(EnableTexPanning, MODEL_mizu, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( 0, -200, -100, -500) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_mizu2, TRUE) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(EnableTexPanning, MODEL_mizu2, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_3) TEX_PAN_PARAMS_STEP( 0, -250, -100, -500) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_taki, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o72, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o73, TRUE) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(EnableTexPanning, MODEL_taki, TRUE) + Call(EnableTexPanning, MODEL_o72, TRUE) + Call(EnableTexPanning, MODEL_o73, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_4) TEX_PAN_PARAMS_STEP( -50, -900, -70,-1200) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_SET(GF_MAC01_RowfBadgesChosen, FALSE) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Set(GF_MAC01_RowfBadgesChosen, FALSE) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_tik/tik_06/tik_06_3_drips.c b/src/world/area_tik/tik_06/tik_06_3_drips.c index 26215927459..5f1725d52e9 100644 --- a/src/world/area_tik/tik_06/tik_06_3_drips.c +++ b/src/world/area_tik/tik_06/tik_06_3_drips.c @@ -26,8 +26,8 @@ DripVolumeList N(DripVolumes) = { }; EvtScript N(EVS_SetupDrips) = { - EVT_SET(LVar0, EVT_PTR(N(DripVolumes))) - EVT_EXEC(N(EVS_CreateDripVolumes)) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(DripVolumes))) + Exec(N(EVS_CreateDripVolumes)) + Return + End }; diff --git a/src/world/area_tik/tik_06/tik_06_4_entity.c b/src/world/area_tik/tik_06/tik_06_4_entity.c index b01c0a98d1f..4847bb056d2 100644 --- a/src/world/area_tik/tik_06/tik_06_4_entity.c +++ b/src/world/area_tik/tik_06/tik_06_4_entity.c @@ -2,71 +2,71 @@ #include "entity.h" EvtScript N(EVS_MonitorPlayerFallDown) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_IF_GT(LVar0, -230) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_GE(LVar1, -10) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(func_802CA988, CAM_DEFAULT, LVar2, LVar3, LVar4, LVar5) - EVT_LABEL(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_IF_GT(LVar1, -70) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("tik_08"), tik_08_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + IfGt(LVar0, -230) + Goto(0) + EndIf + IfGe(LVar1, -10) + Goto(0) + EndIf + Call(func_802CA988, CAM_DEFAULT, LVar2, LVar3, LVar4, LVar5) + Label(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + IfGt(LVar1, -70) + Goto(1) + EndIf + Call(GotoMap, Ref("tik_08"), tik_08_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_OnPound_BoardedFloor) = { - EVT_SET(GF_TIK02_BoardedFloor, TRUE) - EVT_EXEC(N(EVS_MonitorPlayerFallDown)) - EVT_RETURN - EVT_END + Set(GF_TIK02_BoardedFloor, TRUE) + Exec(N(EVS_MonitorPlayerFallDown)) + Return + End }; EvtScript N(EVS_OnSmash_Block1) = { - EVT_SET(GF_TIK02_Hammer1Block, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o93, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Set(GF_TIK02_Hammer1Block, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o93, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_OnSmash_Block2) = { - EVT_SET(GF_TIK02_Hammer2Block, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o90, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Set(GF_TIK02_Hammer2Block, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o90, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 120, 50, -75, 0, MAKE_ENTITY_END) - EVT_CALL(EnableModel, MODEL_o49, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o49, COLLIDER_FLAGS_UPPER_MASK) - EVT_IF_EQ(GF_TIK02_BoardedFloor, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BoardedFloor), -359, -10, -9, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnPound_BoardedFloor))) - EVT_ELSE - EVT_EXEC(N(EVS_MonitorPlayerFallDown)) - EVT_END_IF - EVT_IF_EQ(GF_TIK02_Hammer1Block, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer1Block), 190, -10, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnSmash_Block1))) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o93, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_IF_EQ(GF_TIK02_Hammer2Block, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer2Block), -540, -10, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnSmash_Block2))) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o90, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_SavePoint), 120, 50, -75, 0, MAKE_ENTITY_END) + Call(EnableModel, MODEL_o49, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o49, COLLIDER_FLAGS_UPPER_MASK) + IfEq(GF_TIK02_BoardedFloor, FALSE) + Call(MakeEntity, Ref(Entity_BoardedFloor), -359, -10, -9, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnPound_BoardedFloor))) + Else + Exec(N(EVS_MonitorPlayerFallDown)) + EndIf + IfEq(GF_TIK02_Hammer1Block, FALSE) + Call(MakeEntity, Ref(Entity_Hammer1Block), 190, -10, 0, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnSmash_Block1))) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o93, COLLIDER_FLAGS_UPPER_MASK) + EndIf + IfEq(GF_TIK02_Hammer2Block, FALSE) + Call(MakeEntity, Ref(Entity_Hammer2Block), -540, -10, 0, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnSmash_Block2))) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o90, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Return + End }; diff --git a/src/world/area_tik/tik_07/tik_07_1_music.c b/src/world/area_tik/tik_07/tik_07_1_music.c index 89bd2c04a06..b5997884851 100644 --- a/src/world/area_tik/tik_07/tik_07_1_music.c +++ b/src/world/area_tik/tik_07/tik_07_1_music.c @@ -1,7 +1,7 @@ #include "tik_07.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) + Return + End }; diff --git a/src/world/area_tik/tik_07/tik_07_2_main.c b/src/world/area_tik/tik_07/tik_07_2_main.c index 1baa6fe7397..316c0a75611 100644 --- a/src/world/area_tik/tik_07/tik_07_2_main.c +++ b/src/world/area_tik/tik_07/tik_07_2_main.c @@ -5,48 +5,48 @@ EvtScript N(EVS_ExitWalk_tik_04_1) = EVT_EXIT_WALK(60, tik_07_ENTRY_0, "tik_04", tik_04_ENTRY_1); EvtScript N(EVS_GotoMap_tik_07_2) = { - EVT_CALL(GotoMap, EVT_PTR("tik_07"), tik_07_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("tik_07"), tik_07_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_GotoMap_tik_07_1) = { - EVT_CALL(GotoMap, EVT_PTR("tik_07"), tik_07_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("tik_07"), tik_07_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_tik_07_2) = EVT_EXIT_PIPE_VERTICAL(tik_07_ENTRY_1, COLLIDER_dokan_e1, N(EVS_GotoMap_tik_07_2)); EvtScript N(EVS_ExitWalk_tik_07_1) = EVT_EXIT_PIPE_VERTICAL(tik_07_ENTRY_2, COLLIDER_dokan_e2, N(EVS_GotoMap_tik_07_1)); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_04_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_07_2)), TRIGGER_FLOOR_TOUCH, COLLIDER_dokan_e1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_07_1)), TRIGGER_FLOOR_TOUCH, COLLIDER_dokan_e2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_tik_04_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_tik_07_2)), TRIGGER_FLOOR_TOUCH, COLLIDER_dokan_e1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_tik_07_1)), TRIGGER_FLOOR_TOUCH, COLLIDER_dokan_e2, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) - EVT_CALL(SetSpriteShading, SHADING_TIK_07) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_SetupDrips)) - EVT_EXEC(N(EVS_SetupPlatforms)) - EVT_WAIT(1) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, tik_07_ENTRY_0) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_ELSE + Set(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) + Call(SetSpriteShading, SHADING_TIK_07) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_SetupDrips)) + Exec(N(EVS_SetupPlatforms)) + Wait(1) + Call(GetEntryID, LVar0) + IfEq(LVar0, tik_07_ENTRY_0) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Else EVT_ENTER_PIPE_VERTICAL(N(EVS_BindExitTriggers)) - EVT_END_IF - EVT_WAIT(1) - EVT_RETURN - EVT_END + EndIf + Wait(1) + Return + End }; diff --git a/src/world/area_tik/tik_07/tik_07_3_entity.c b/src/world/area_tik/tik_07/tik_07_3_entity.c index ea65891f08c..2a55477b72c 100644 --- a/src/world/area_tik/tik_07/tik_07_3_entity.c +++ b/src/world/area_tik/tik_07/tik_07_3_entity.c @@ -6,8 +6,8 @@ #include "world/common/entity/SuperBlock.inc.c" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 306, 90, -104, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_TIK07_Item_StarPiece) + Call(MakeItemEntity, ITEM_STAR_PIECE, 306, 90, -104, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_TIK07_Item_StarPiece) EVT_MAKE_SUPER_BLOCK(820, 70, -5, 0) - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/area_tik/tik_07/tik_07_4_drips.c b/src/world/area_tik/tik_07/tik_07_4_drips.c index a964d2ba366..72af293534a 100644 --- a/src/world/area_tik/tik_07/tik_07_4_drips.c +++ b/src/world/area_tik/tik_07/tik_07_4_drips.c @@ -34,8 +34,8 @@ DripVolumeList N(DripVolumes) = { }; EvtScript N(EVS_SetupDrips) = { - EVT_SET(LVar0, EVT_PTR(N(DripVolumes))) - EVT_EXEC(N(EVS_CreateDripVolumes)) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(DripVolumes))) + Exec(N(EVS_CreateDripVolumes)) + Return + End }; diff --git a/src/world/area_tik/tik_07/tik_07_5_platforms.c b/src/world/area_tik/tik_07/tik_07_5_platforms.c index 2f700c46daf..813d9838db6 100644 --- a/src/world/area_tik/tik_07/tik_07_5_platforms.c +++ b/src/world/area_tik/tik_07/tik_07_5_platforms.c @@ -23,74 +23,74 @@ API_CALLABLE(N(PausePlatformsDuringPound)) { } EvtScript N(EVS_UpdatePlatform) = { - EVT_SET_GROUP(EVT_GROUP_EF) - EVT_CALL(ParentColliderToModel, LVarB, LVarA) - EVT_SETF(LVar0, EVT_FLOAT(0.0)) - EVT_SETF(LVarD, EVT_FLOAT(-90.0)) - EVT_SUBF(LVarD, LVarC) - EVT_LABEL(0) - EVT_SETF(LVar1, LVarC) - EVT_LABEL(1) - EVT_CALL(N(PausePlatformsDuringPound)) - EVT_ADDF(LVar0, EVT_FLOAT(1.5)) - EVT_ADDF(LVar1, EVT_FLOAT(1.5)) - EVT_CALL(TranslateModel, LVarA, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, LVarB) - EVT_WAIT(1) - EVT_IF_LT(LVar1, EVT_FLOAT(310.0)) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(TranslateModel, LVarA, 0, LVarD, 0) - EVT_SETF(LVar0, LVarD) - EVT_SETF(LVarC, EVT_FLOAT(-90.0)) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_EF) + Call(ParentColliderToModel, LVarB, LVarA) + SetF(LVar0, Float(0.0)) + SetF(LVarD, Float(-90.0)) + SubF(LVarD, LVarC) + Label(0) + SetF(LVar1, LVarC) + Label(1) + Call(N(PausePlatformsDuringPound)) + AddF(LVar0, Float(1.5)) + AddF(LVar1, Float(1.5)) + Call(TranslateModel, LVarA, 0, LVar0, 0) + Call(UpdateColliderTransform, LVarB) + Wait(1) + IfLt(LVar1, Float(310.0)) + Goto(1) + EndIf + Call(TranslateModel, LVarA, 0, LVarD, 0) + SetF(LVar0, LVarD) + SetF(LVarC, Float(-90.0)) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_CreatePlatform1) = { - EVT_SET(LVarA, MODEL_o32) - EVT_SET(LVarB, COLLIDER_o32) - EVT_SET(LVarC, 110) - EVT_EXEC_WAIT(N(EVS_UpdatePlatform)) - EVT_RETURN - EVT_END + Set(LVarA, MODEL_o32) + Set(LVarB, COLLIDER_o32) + Set(LVarC, 110) + ExecWait(N(EVS_UpdatePlatform)) + Return + End }; EvtScript N(EVS_CreatePlatform2) = { - EVT_SET(LVarA, MODEL_o31) - EVT_SET(LVarB, COLLIDER_o31) - EVT_SET(LVarC, 10) - EVT_EXEC_WAIT(N(EVS_UpdatePlatform)) - EVT_RETURN - EVT_END + Set(LVarA, MODEL_o31) + Set(LVarB, COLLIDER_o31) + Set(LVarC, 10) + ExecWait(N(EVS_UpdatePlatform)) + Return + End }; EvtScript N(EVS_CreatePlatform3) = { - EVT_SET(LVarA, MODEL_o33) - EVT_SET(LVarB, COLLIDER_o33) - EVT_SET(LVarC, -90) - EVT_EXEC_WAIT(N(EVS_UpdatePlatform)) - EVT_RETURN - EVT_END + Set(LVarA, MODEL_o33) + Set(LVarB, COLLIDER_o33) + Set(LVarC, -90) + ExecWait(N(EVS_UpdatePlatform)) + Return + End }; EvtScript N(EVS_CreatePlatform4) = { - EVT_SET(LVarA, MODEL_o34) - EVT_SET(LVarB, COLLIDER_o34) - EVT_SET(LVarC, -190) - EVT_EXEC_WAIT(N(EVS_UpdatePlatform)) - EVT_RETURN - EVT_END + Set(LVarA, MODEL_o34) + Set(LVarB, COLLIDER_o34) + Set(LVarC, -190) + ExecWait(N(EVS_UpdatePlatform)) + Return + End }; EvtScript N(EVS_SetupPlatforms) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o48, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_CreatePlatform1)) - EVT_EXEC(N(EVS_CreatePlatform2)) - EVT_EXEC(N(EVS_CreatePlatform3)) - EVT_EXEC(N(EVS_CreatePlatform4)) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o48, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_CreatePlatform1)) + Exec(N(EVS_CreatePlatform2)) + Exec(N(EVS_CreatePlatform3)) + Exec(N(EVS_CreatePlatform4)) + Return + End }; diff --git a/src/world/area_tik/tik_08/tik_08_1_music.c b/src/world/area_tik/tik_08/tik_08_1_music.c index 8de69840c84..8e7967718bf 100644 --- a/src/world/area_tik/tik_08/tik_08_1_music.c +++ b/src/world/area_tik/tik_08/tik_08_1_music.c @@ -1,13 +1,13 @@ #include "tik_08.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) + Return + End }; EvtScript N(EVS_PlayBlooperSong) = { - EVT_CALL(SetMusicTrack, 0, SONG_BLOOPER_THEME, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_BLOOPER_THEME, 0, 8) + Return + End }; diff --git a/src/world/area_tik/tik_08/tik_08_2_main.c b/src/world/area_tik/tik_08/tik_08_2_main.c index d7c84c6648d..2ff638e06f4 100644 --- a/src/world/area_tik/tik_08/tik_08_2_main.c +++ b/src/world/area_tik/tik_08/tik_08_2_main.c @@ -8,78 +8,78 @@ EvtScript N(EVS_ExitWalk_tik_09_1) = EVT_EXIT_WALK(60, tik_08_ENTRY_0, "tik_09", EvtScript N(EVS_ExitWalk_tik_20_0) = EVT_EXIT_WALK(60, tik_08_ENTRY_1, "tik_20", tik_20_ENTRY_0); EvtScript N(EVS_GotoMap_tik_06_2) = { - EVT_CALL(GotoMap, EVT_PTR("tik_06"), tik_06_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("tik_06"), tik_06_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_ExitPipe_tik_06_2) = EVT_EXIT_PIPE_HORIZONTAL(tik_06_ENTRY_3, COLLIDER_ttd, N(EVS_GotoMap_tik_06_2)); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_09_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_20_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_ttd, COLLIDER_FLAGS_UPPER_MASK) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitPipe_tik_06_2)), TRIGGER_WALL_PUSH, COLLIDER_ttd, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_tik_09_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_tik_20_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_ttd, COLLIDER_FLAGS_UPPER_MASK) + BindTrigger(Ref(N(EVS_ExitPipe_tik_06_2)), TRIGGER_WALL_PUSH, COLLIDER_ttd, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) - EVT_CALL(SetSpriteShading, SHADING_TIK_08) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(PlaySound, SOUND_LOOP_TIK08_WATER) - EVT_CALL(PlaySoundAtF, SOUND_LOOP_TIK08_FLOW1, SOUND_SPACE_WITH_DEPTH, -30, -30, -85) - EVT_EXEC(N(EVS_SetupDrips)) - EVT_CALL(EnableTexPanning, MODEL_nagare1, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o92, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) + Call(SetSpriteShading, SHADING_TIK_08) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Call(PlaySound, SOUND_LOOP_TIK08_WATER) + Call(PlaySoundAtF, SOUND_LOOP_TIK08_FLOW1, SOUND_SPACE_WITH_DEPTH, -30, -30, -85) + Exec(N(EVS_SetupDrips)) + Call(EnableTexPanning, MODEL_nagare1, TRUE) + Call(EnableTexPanning, MODEL_o92, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 70, 100, 100, 130) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_taki, TRUE) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(EnableTexPanning, MODEL_taki, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_4) TEX_PAN_PARAMS_STEP( -50, -900, -70,-1200) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_takib, TRUE) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(EnableTexPanning, MODEL_takib, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_5) TEX_PAN_PARAMS_STEP( 0,-1400,-2600, -60) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o77, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o75, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o77, COLLIDER_FLAG_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o75, COLLIDER_FLAG_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_suimen, SURFACE_TYPE_WATER) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ttd, COLLIDER_FLAGS_UPPER_MASK) - EVT_WAIT(1) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(tik_08_ENTRY_2) - EVT_EXEC_WAIT(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(tik_08_ENTRY_4) + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o77, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o75, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o77, COLLIDER_FLAG_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o75, COLLIDER_FLAG_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_suimen, SURFACE_TYPE_WATER) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ttd, COLLIDER_FLAGS_UPPER_MASK) + Wait(1) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(tik_08_ENTRY_2) + ExecWait(N(EVS_BindExitTriggers)) + CaseEq(tik_08_ENTRY_4) EVT_ENTER_PIPE_VERTICAL(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(tik_08_ENTRY_3) + CaseEq(tik_08_ENTRY_3) EVT_ENTER_PIPE_HORIZONTAL(COLLIDER_ttd, N(EVS_BindExitTriggers)) - EVT_CASE_DEFAULT - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_RETURN - EVT_END + CaseDefault + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Wait(1) + Return + End }; diff --git a/src/world/area_tik/tik_08/tik_08_3_drips.c b/src/world/area_tik/tik_08/tik_08_3_drips.c index 9e66a47054f..b6880d00f18 100644 --- a/src/world/area_tik/tik_08/tik_08_3_drips.c +++ b/src/world/area_tik/tik_08/tik_08_3_drips.c @@ -26,8 +26,8 @@ DripVolumeList N(DripVolumes) = { }; EvtScript N(EVS_SetupDrips) = { - EVT_SET(LVar0, EVT_PTR(N(DripVolumes))) - EVT_EXEC(N(EVS_CreateDripVolumes)) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(DripVolumes))) + Exec(N(EVS_CreateDripVolumes)) + Return + End }; diff --git a/src/world/area_tik/tik_08/tik_08_4_entity.c b/src/world/area_tik/tik_08/tik_08_4_entity.c index 48c7a0979bd..23ead43fc4a 100644 --- a/src/world/area_tik/tik_08/tik_08_4_entity.c +++ b/src/world/area_tik/tik_08/tik_08_4_entity.c @@ -4,50 +4,50 @@ #include "world/common/todo/SetEntityPosition.inc.c" EvtScript N(EVS_SpawnSwitch) = { - EVT_CALL(PlaySoundAt, SOUND_FALL_QUICK, SOUND_SPACE_DEFAULT, 90, 200, 100) - EVT_CALL(MakeLerp, 200, -10, 25, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetEntityPosition), MV_BlueSwitch, 90, LVar0, 100) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAt, SOUND_OBJECT_LAND, SOUND_SPACE_DEFAULT, 90, LVar0, 100) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_RETURN - EVT_END + Call(PlaySoundAt, SOUND_FALL_QUICK, SOUND_SPACE_DEFAULT, 90, 200, 100) + Call(MakeLerp, 200, -10, 25, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(N(SetEntityPosition), MV_BlueSwitch, 90, LVar0, 100) + IfEq(LVar1, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(PlaySoundAt, SOUND_OBJECT_LAND, SOUND_SPACE_DEFAULT, 90, LVar0, 100) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.0)) + Wait(10) + Return + End }; EvtScript N(EVS_GotoMap_jan_03_3) = { - EVT_CALL(GotoMap, EVT_PTR("jan_03"), jan_03_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("jan_03"), jan_03_ENTRY_3) + Wait(100) + Return + End }; EvtScript N(EVS_OnSwitchActivate) = { - EVT_WAIT(10) - EVT_CALL(PlaySound, SOUND_GROW) - EVT_SET(GF_TIK08_WarpPipe, TRUE) - EVT_UNBIND - EVT_RETURN - EVT_END + Wait(10) + Call(PlaySound, SOUND_GROW) + Set(GF_TIK08_WarpPipe, TRUE) + Unbind + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_TIK08_WarpPipe, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueSwitch), NPC_DISPOSE_LOCATION, 0, MAKE_ENTITY_END) - EVT_CALL(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_TIK_04)) - EVT_SET(MV_BlueSwitch, LVar0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnSwitchActivate)), TRIGGER_AREA_FLAG_SET, AF_TIK_04, 1, 0) - EVT_IF_EQ(GF_TIK08_Defeated_Blooper, TRUE) - EVT_CALL(N(SetEntityPosition), MV_BlueSwitch, 90, -10, 100) - EVT_END_IF - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueWarpPipe), 95, -10, -88, 0, tik_08_ENTRY_4, EVT_PTR(N(EVS_GotoMap_jan_03_3)), EVT_INDEX_OF_GAME_FLAG(GF_TIK08_WarpPipe), MAKE_ENTITY_END) - EVT_RETURN - EVT_END + IfEq(GF_TIK08_WarpPipe, FALSE) + Call(MakeEntity, Ref(Entity_BlueSwitch), NPC_DISPOSE_LOCATION, 0, MAKE_ENTITY_END) + Call(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_TIK_04)) + Set(MV_BlueSwitch, LVar0) + BindTrigger(Ref(N(EVS_OnSwitchActivate)), TRIGGER_AREA_FLAG_SET, AF_TIK_04, 1, 0) + IfEq(GF_TIK08_Defeated_Blooper, TRUE) + Call(N(SetEntityPosition), MV_BlueSwitch, 90, -10, 100) + EndIf + EndIf + Call(MakeEntity, Ref(Entity_BlueWarpPipe), 95, -10, -88, 0, tik_08_ENTRY_4, Ref(N(EVS_GotoMap_jan_03_3)), EVT_INDEX_OF_GAME_FLAG(GF_TIK08_WarpPipe), MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_tik/tik_08/tik_08_5_npc.c b/src/world/area_tik/tik_08/tik_08_5_npc.c index 4aa8a9f9f6b..4dbe74015f5 100644 --- a/src/world/area_tik/tik_08/tik_08_5_npc.c +++ b/src/world/area_tik/tik_08/tik_08_5_npc.c @@ -5,103 +5,103 @@ #include "world/common/enemy/Blooper.inc.c" EvtScript N(EVS_NpcIdle_Blooper) = { - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(N(GetFloorCollider), LVar0) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_IF_EQ(LVar0, 11) - EVT_IF_GE(LVar2, -20) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC(N(EVS_PlayBlooperSong)) - EVT_CALL(ShowMessageAtScreenPos, MSG_MGM_0000, 160, 40) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -25, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -25, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_BLOOPER_MOVE, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_LARGE_ACTOR_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, -250, -60, 15, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, NPC_SELF, -40, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LOOP(6) - EVT_CALL(SetNpcPos, NPC_SELF, -40, -57, 0) - EVT_WAIT(1) - EVT_CALL(SetNpcPos, NPC_SELF, -40, -60, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(5) - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_RETURN - EVT_END + Loop(0) + Wait(1) + Call(N(GetFloorCollider), LVar0) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + IfEq(LVar0, 11) + IfGe(LVar2, -20) + BreakLoop + EndIf + EndIf + EndLoop + Call(DisablePlayerInput, TRUE) + Exec(N(EVS_PlayBlooperSong)) + Call(ShowMessageAtScreenPos, MSG_MGM_0000, 160, 40) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, -25, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, -25, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(InterpPlayerYaw, 270, 0) + Wait(20) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_BLOOPER_MOVE, SOUND_SPACE_DEFAULT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_LARGE_ACTOR_JUMP, SOUND_SPACE_DEFAULT) + Call(MakeLerp, -250, -60, 15, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetNpcPos, NPC_SELF, -40, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Loop(6) + Call(SetNpcPos, NPC_SELF, -40, -57, 0) + Wait(1) + Call(SetNpcPos, NPC_SELF, -40, -60, 0) + Wait(1) + EndLoop + Wait(5) + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Return + End }; EvtScript N(EVS_NpcDefeat_Blooper) = { - EVT_WAIT(5) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Blooper_Anim04) - EVT_CALL(MakeLerp, 0, 6 * 360, 40, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_BLOOPER_FALL, SOUND_SPACE_DEFAULT) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_LARGE_ACTOR_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcFlyTo, NPC_SELF, -40, -250, 0, 40, 0, EASING_LINEAR) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC_WAIT(N(EVS_SpawnSwitch)) - EVT_IF_EQ(GF_TIK_DefeatedOneBlooper, FALSE) - EVT_SET(GF_TIK_DefeatedOneBlooper, TRUE) - EVT_ELSE - EVT_SET(GF_TIK_DefeatedTwoBloopers, TRUE) - EVT_END_IF - EVT_SET(GF_TIK08_Defeated_Blooper, TRUE) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + Wait(5) + Thread + Call(SetNpcAnimation, NPC_SELF, ANIM_Blooper_Anim04) + Call(MakeLerp, 0, 6 * 360, 40, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_SELF, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(PlaySoundAtNpc, NPC_SELF, SOUND_BLOOPER_FALL, SOUND_SPACE_DEFAULT) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_LARGE_ACTOR_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcFlyTo, NPC_SELF, -40, -250, 0, 40, 0, EASING_LINEAR) + Call(ResetCam, CAM_DEFAULT, Float(1.0)) + ExecWait(N(EVS_SpawnSwitch)) + IfEq(GF_TIK_DefeatedOneBlooper, FALSE) + Set(GF_TIK_DefeatedOneBlooper, TRUE) + Else + Set(GF_TIK_DefeatedTwoBloopers, TRUE) + EndIf + Set(GF_TIK08_Defeated_Blooper, TRUE) + Exec(N(EVS_SetupMusic)) + Call(DisablePlayerInput, FALSE) + Call(RemoveNpc, NPC_SELF) + Return + End }; EvtScript N(EVS_NpcInit_Blooper) = { - EVT_IF_EQ(GF_TIK08_Defeated_Blooper, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Blooper))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Blooper))) - EVT_IF_EQ(GF_TIK_DefeatedOneBlooper, FALSE) - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(0.75), EVT_FLOAT(0.75), EVT_FLOAT(0.75)) - EVT_CALL(N(GetBlooperBattleID), 0) - EVT_ELSE - EVT_IF_EQ(GF_TIK_DefeatedTwoBloopers, FALSE) - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(1.25), EVT_FLOAT(1.25), EVT_FLOAT(1.25)) - EVT_CALL(N(GetBlooperBattleID), 1) - EVT_ELSE - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(2.0), EVT_FLOAT(2.0), EVT_FLOAT(2.0)) - EVT_CALL(N(GetBlooperBattleID), 2) - EVT_END_IF - EVT_END_IF - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_TIK08_Defeated_Blooper, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Blooper))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Blooper))) + IfEq(GF_TIK_DefeatedOneBlooper, FALSE) + Call(SetNpcScale, NPC_SELF, Float(0.75), Float(0.75), Float(0.75)) + Call(N(GetBlooperBattleID), 0) + Else + IfEq(GF_TIK_DefeatedTwoBloopers, FALSE) + Call(SetNpcScale, NPC_SELF, Float(1.25), Float(1.25), Float(1.25)) + Call(N(GetBlooperBattleID), 1) + Else + Call(SetNpcScale, NPC_SELF, Float(2.0), Float(2.0), Float(2.0)) + Call(N(GetBlooperBattleID), 2) + EndIf + EndIf + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_Blooper) = { diff --git a/src/world/area_tik/tik_09/tik_09_1_music.c b/src/world/area_tik/tik_09/tik_09_1_music.c index 0fce685e493..92d9180eaa3 100644 --- a/src/world/area_tik/tik_09/tik_09_1_music.c +++ b/src/world/area_tik/tik_09/tik_09_1_music.c @@ -1,7 +1,7 @@ #include "tik_09.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) + Return + End }; diff --git a/src/world/area_tik/tik_09/tik_09_2_main.c b/src/world/area_tik/tik_09/tik_09_2_main.c index ac0f4a3a62e..5daf4216d67 100644 --- a/src/world/area_tik/tik_09/tik_09_2_main.c +++ b/src/world/area_tik/tik_09/tik_09_2_main.c @@ -5,130 +5,130 @@ #include "world/common/atomic/TexturePan.inc.c" EvtScript N(EVS_CloseGates) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(PlaySound, SOUND_CHIME_BEGIN_AMBUSH) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o59, SOUND_LARGE_GATE_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 60, 0, 25, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_ew_kousi, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_ee_kousi, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_o59, SOUND_LARGE_GATE_CLOSE, SOUND_SPACE_DEFAULT) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o58, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o59, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_WAIT(1) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(PlaySound, SOUND_CHIME_BEGIN_AMBUSH) + Call(PlaySoundAtCollider, COLLIDER_o59, SOUND_LARGE_GATE_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 60, 0, 25, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_ew_kousi, 0, LVar0, 0) + Call(TranslateModel, MODEL_ee_kousi, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_o59, SOUND_LARGE_GATE_CLOSE, SOUND_SPACE_DEFAULT) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.0)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o58, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o59, COLLIDER_FLAGS_UPPER_MASK) + Call(DisablePlayerInput, FALSE) + Wait(1) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + End }; EvtScript N(EVS_ExitWalk_tik_10_0) = EVT_EXIT_WALK(60, tik_09_ENTRY_0, "tik_10", tik_10_ENTRY_0); EvtScript N(EVS_ExitWalk_tik_08_0) = EVT_EXIT_WALK(60, tik_09_ENTRY_1, "tik_08", tik_08_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_10_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_08_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_tik_10_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_tik_08_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, tik_09_ENTRY_2) + Call(DisablePlayerInput, TRUE) + Call(GetEntryID, LVar0) + IfEq(LVar0, tik_09_ENTRY_2) EVT_ENTER_PIPE_VERTICAL(N(EVS_BindExitTriggers)) - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC_WAIT(EnterWalk) - EVT_IF_EQ(GF_TIK09_Defeated_Ambush, FALSE) - EVT_EXEC_WAIT(N(EVS_CloseGates)) - EVT_END_IF - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Else + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + ExecWait(EnterWalk) + IfEq(GF_TIK09_Defeated_Ambush, FALSE) + ExecWait(N(EVS_CloseGates)) + EndIf + EndIf + Call(DisablePlayerInput, FALSE) + Return + End }; #include "../common/Flotsam.inc.c" EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) - EVT_CALL(SetSpriteShading, SHADING_TIK_09) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(PlaySound, SOUND_LOOP_TIK09_WATER) - EVT_CALL(PlaySoundAtF, SOUND_LOOP_TIK09_FLOW2, SOUND_SPACE_WITH_DEPTH, -190, -20, -120) - EVT_CALL(PlaySoundAtF, SOUND_LOOP_TIK09_FLOW4, SOUND_SPACE_WITH_DEPTH, 50, -20, -120) - EVT_CALL(PlaySoundAtF, SOUND_LOOP_TIK09_FLOW3, SOUND_SPACE_WITH_DEPTH, 290, -20, -120) - EVT_EXEC(N(EVS_SetupDrips)) - EVT_CALL(EnableTexPanning, MODEL_nagare, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o84, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o85, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o86, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) + Call(SetSpriteShading, SHADING_TIK_09) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Call(PlaySound, SOUND_LOOP_TIK09_WATER) + Call(PlaySoundAtF, SOUND_LOOP_TIK09_FLOW2, SOUND_SPACE_WITH_DEPTH, -190, -20, -120) + Call(PlaySoundAtF, SOUND_LOOP_TIK09_FLOW4, SOUND_SPACE_WITH_DEPTH, 50, -20, -120) + Call(PlaySoundAtF, SOUND_LOOP_TIK09_FLOW3, SOUND_SPACE_WITH_DEPTH, 290, -20, -120) + Exec(N(EVS_SetupDrips)) + Call(EnableTexPanning, MODEL_nagare, TRUE) + Call(EnableTexPanning, MODEL_o84, TRUE) + Call(EnableTexPanning, MODEL_o85, TRUE) + Call(EnableTexPanning, MODEL_o86, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 70, 100, 100, 130) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_taki, TRUE) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(EnableTexPanning, MODEL_taki, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_4) TEX_PAN_PARAMS_STEP( -50, -900, -70,-1200) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_takib, TRUE) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(EnableTexPanning, MODEL_takib, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_5) TEX_PAN_PARAMS_STEP( 0,-1400,-2600, -60) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_nagare2, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o87, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o88, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o89, TRUE) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(EnableTexPanning, MODEL_nagare2, TRUE) + Call(EnableTexPanning, MODEL_o87, TRUE) + Call(EnableTexPanning, MODEL_o88, TRUE) + Call(EnableTexPanning, MODEL_o89, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_6) TEX_PAN_PARAMS_STEP( 200, 400, 250, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetRenderMode, MODEL_o90, RENDER_MODE_SURFACE_XLU_LAYER2) - EVT_CALL(SetRenderMode, MODEL_nagab, RENDER_MODE_SURFACE_XLU_LAYER2) - EVT_THREAD - EVT_SET(LVar2, MODEL_bin) - EVT_EXEC(N(EVS_Flotsam_Bobbing)) - EVT_WAIT(5) - EVT_SET(LVar2, MODEL_kan1) - EVT_EXEC(N(EVS_Flotsam_Bobbing)) - EVT_WAIT(5) - EVT_SET(LVar2, MODEL_kan2) - EVT_EXEC(N(EVS_Flotsam_Bobbing)) - EVT_END_THREAD - EVT_CALL(TranslateModel, MODEL_ew_kousi, 0, 60, 0) - EVT_CALL(TranslateModel, MODEL_ee_kousi, 0, 60, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o58, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o59, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ClearAmbientSounds, 250) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetRenderMode, MODEL_o90, RENDER_MODE_SURFACE_XLU_LAYER2) + Call(SetRenderMode, MODEL_nagab, RENDER_MODE_SURFACE_XLU_LAYER2) + Thread + Set(LVar2, MODEL_bin) + Exec(N(EVS_Flotsam_Bobbing)) + Wait(5) + Set(LVar2, MODEL_kan1) + Exec(N(EVS_Flotsam_Bobbing)) + Wait(5) + Set(LVar2, MODEL_kan2) + Exec(N(EVS_Flotsam_Bobbing)) + EndThread + Call(TranslateModel, MODEL_ew_kousi, 0, 60, 0) + Call(TranslateModel, MODEL_ee_kousi, 0, 60, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o58, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o59, COLLIDER_FLAGS_UPPER_MASK) + Call(ClearAmbientSounds, 250) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_tik/tik_09/tik_09_3_drips.c b/src/world/area_tik/tik_09/tik_09_3_drips.c index 2d38564d594..cbfb6c4064b 100644 --- a/src/world/area_tik/tik_09/tik_09_3_drips.c +++ b/src/world/area_tik/tik_09/tik_09_3_drips.c @@ -18,8 +18,8 @@ DripVolumeList N(DripVolumes) = { }; EvtScript N(EVS_SetupDrips) = { - EVT_SET(LVar0, EVT_PTR(N(DripVolumes))) - EVT_EXEC(N(EVS_CreateDripVolumes)) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(DripVolumes))) + Exec(N(EVS_CreateDripVolumes)) + Return + End }; diff --git a/src/world/area_tik/tik_09/tik_09_4_entity.c b/src/world/area_tik/tik_09/tik_09_4_entity.c index da7d9f4c509..6aac3d5cbdf 100644 --- a/src/world/area_tik/tik_09/tik_09_4_entity.c +++ b/src/world/area_tik/tik_09/tik_09_4_entity.c @@ -4,71 +4,71 @@ #include "world/common/todo/SetEntityPosition.inc.c" EvtScript N(EVS_SpawnSwitch) = { - EVT_CALL(AwaitPlayerLeave, -10, 10, 50) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, 8) - EVT_LOOP(0) - EVT_CALL(GetPlayerActionState, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, ACTION_STATE_IDLE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(InterpCamTargetPos, 0, 1, -10, -10, 10, 20) - EVT_CALL(PlaySound, SOUND_CHIME_SOLVED_PUZZLE) - EVT_CALL(PlaySoundAt, SOUND_FALL_QUICK, SOUND_SPACE_DEFAULT, -10, 200, 10) - EVT_CALL(MakeLerp, 200, -10, 25, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetEntityPosition), MV_Unk_00, -10, LVar0, 10) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAt, SOUND_OBJECT_LAND, SOUND_SPACE_DEFAULT, -10, LVar0, 10) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(InterpCamTargetPos, 0, 1, LVar0, LVar1, LVar2, 20) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(AwaitPlayerLeave, -10, 10, 50) + Call(DisablePlayerInput, TRUE) + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, 8) + Loop(0) + Call(GetPlayerActionState, LVar0) + Wait(1) + IfEq(LVar0, ACTION_STATE_IDLE) + BreakLoop + EndIf + EndLoop + EndIf + Call(DisablePlayerPhysics, TRUE) + Call(InterpCamTargetPos, 0, 1, -10, -10, 10, 20) + Call(PlaySound, SOUND_CHIME_SOLVED_PUZZLE) + Call(PlaySoundAt, SOUND_FALL_QUICK, SOUND_SPACE_DEFAULT, -10, 200, 10) + Call(MakeLerp, 200, -10, 25, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(N(SetEntityPosition), MV_Unk_00, -10, LVar0, 10) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAt, SOUND_OBJECT_LAND, SOUND_SPACE_DEFAULT, -10, LVar0, 10) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.0)) + Wait(10) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(InterpCamTargetPos, 0, 1, LVar0, LVar1, LVar2, 20) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_GotoMap_mim_11_3) = { - EVT_CALL(GotoMap, EVT_PTR("mim_11"), mim_11_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("mim_11"), mim_11_ENTRY_3) + Wait(100) + Return + End }; EvtScript N(EVS_PlayRisingPipeSound) = { - EVT_WAIT(10) - EVT_CALL(PlaySound, SOUND_GROW) - EVT_SET(GF_TIK09_WarpPipe, TRUE) - EVT_UNBIND - EVT_RETURN - EVT_END + Wait(10) + Call(PlaySound, SOUND_GROW) + Set(GF_TIK09_WarpPipe, TRUE) + Unbind + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_TIK09_WarpPipe, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueSwitch), NPC_DISPOSE_LOCATION, 0, MAKE_ENTITY_END) - EVT_CALL(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_TIK_05)) - EVT_SET(MV_Unk_00, LVar0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_PlayRisingPipeSound)), TRIGGER_AREA_FLAG_SET, AF_TIK_05, 1, 0) - EVT_IF_EQ(GF_TIK09_Defeated_Ambush, TRUE) - EVT_CALL(N(SetEntityPosition), MV_Unk_00, -10, -10, 10) - EVT_END_IF - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueWarpPipe), -30, -10, -40, 0, tik_09_ENTRY_2, EVT_PTR(N(EVS_GotoMap_mim_11_3)), EVT_INDEX_OF_GAME_FLAG(GF_TIK09_WarpPipe), MAKE_ENTITY_END) - EVT_RETURN - EVT_END + IfEq(GF_TIK09_WarpPipe, FALSE) + Call(MakeEntity, Ref(Entity_BlueSwitch), NPC_DISPOSE_LOCATION, 0, MAKE_ENTITY_END) + Call(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_TIK_05)) + Set(MV_Unk_00, LVar0) + BindTrigger(Ref(N(EVS_PlayRisingPipeSound)), TRIGGER_AREA_FLAG_SET, AF_TIK_05, 1, 0) + IfEq(GF_TIK09_Defeated_Ambush, TRUE) + Call(N(SetEntityPosition), MV_Unk_00, -10, -10, 10) + EndIf + EndIf + Call(MakeEntity, Ref(Entity_BlueWarpPipe), -30, -10, -40, 0, tik_09_ENTRY_2, Ref(N(EVS_GotoMap_mim_11_3)), EVT_INDEX_OF_GAME_FLAG(GF_TIK09_WarpPipe), MAKE_ENTITY_END) + Return + End }; MAP_RODATA_PAD(1,entity); diff --git a/src/world/area_tik/tik_09/tik_09_5_npc.c b/src/world/area_tik/tik_09/tik_09_5_npc.c index 4b65ab43c45..550ef8b7191 100644 --- a/src/world/area_tik/tik_09/tik_09_5_npc.c +++ b/src/world/area_tik/tik_09/tik_09_5_npc.c @@ -5,48 +5,48 @@ #include "world/common/util/GetDefeatedEnemyCount.inc.c" EvtScript N(EVS_OpenGates) = { - EVT_CALL(MakeLerp, 0, 60, 25, EASING_COS_IN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_ew_kousi, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_ee_kousi, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o58, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o59, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Call(MakeLerp, 0, 60, 25, EASING_COS_IN_OUT) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_ew_kousi, 0, LVar0, 0) + Call(TranslateModel, MODEL_ee_kousi, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o58, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o59, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_NpcDefeat_DarkTroopa) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(N(GetDefeatedEnemyCount), LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_SET(GF_TIK09_Defeated_Ambush, TRUE) - EVT_EXEC(N(EVS_SpawnSwitch)) - EVT_EXEC(N(EVS_OpenGates)) - EVT_END_IF - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(N(GetDefeatedEnemyCount), LVar0) + IfEq(LVar0, 1) + Set(GF_TIK09_Defeated_Ambush, TRUE) + Exec(N(EVS_SpawnSwitch)) + Exec(N(EVS_OpenGates)) + EndIf + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_DarkTroopa) = { - EVT_IF_EQ(GF_TIK09_Defeated_Ambush, FALSE) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_DarkTroopa))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_TIK09_Defeated_Ambush, FALSE) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_DarkTroopa))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_KoopaTroopa_01) = { diff --git a/src/world/area_tik/tik_10/tik_10_1_music.c b/src/world/area_tik/tik_10/tik_10_1_music.c index b1562e76d22..d415a6d4f5e 100644 --- a/src/world/area_tik/tik_10/tik_10_1_music.c +++ b/src/world/area_tik/tik_10/tik_10_1_music.c @@ -1,7 +1,7 @@ #include "tik_10.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) + Return + End }; diff --git a/src/world/area_tik/tik_10/tik_10_2_main.c b/src/world/area_tik/tik_10/tik_10_2_main.c index f06f3518fb7..d94bdde1921 100644 --- a/src/world/area_tik/tik_10/tik_10_2_main.c +++ b/src/world/area_tik/tik_10/tik_10_2_main.c @@ -5,30 +5,30 @@ EvtScript N(EVS_ExitWalk_tik_09_0) = EVT_EXIT_WALK(60, tik_10_ENTRY_0, "tik_09", tik_09_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_09_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_tik_09_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) - EVT_CALL(SetSpriteShading, SHADING_TIK_10) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(PlaySound, SOUND_LOOP_TIK10_WATER) - EVT_EXEC(N(EVS_SetupDrips)) - EVT_CALL(EnableTexPanning, MODEL_nagare, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) + Call(SetSpriteShading, SHADING_TIK_10) + SetUP_CAMERA_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Call(PlaySound, SOUND_LOOP_TIK10_WATER) + Exec(N(EVS_SetupDrips)) + Call(EnableTexPanning, MODEL_nagare, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 50, 200, 110, 500) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; diff --git a/src/world/area_tik/tik_10/tik_10_3_drips.c b/src/world/area_tik/tik_10/tik_10_3_drips.c index 2e72d6afe91..e9702d4340a 100644 --- a/src/world/area_tik/tik_10/tik_10_3_drips.c +++ b/src/world/area_tik/tik_10/tik_10_3_drips.c @@ -26,8 +26,8 @@ DripVolumeList N(DripVolumes) = { }; EvtScript N(EVS_SetupDrips) = { - EVT_SET(LVar0, EVT_PTR(N(DripVolumes))) - EVT_EXEC(N(EVS_CreateDripVolumes)) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(DripVolumes))) + Exec(N(EVS_CreateDripVolumes)) + Return + End }; diff --git a/src/world/area_tik/tik_10/tik_10_4_entity.c b/src/world/area_tik/tik_10/tik_10_4_entity.c index 652f20e38c9..6d40f9098f3 100644 --- a/src/world/area_tik/tik_10/tik_10_4_entity.c +++ b/src/world/area_tik/tik_10/tik_10_4_entity.c @@ -7,17 +7,17 @@ EvtScript N(EVS_MakeEntities) = { EVT_MAKE_SUPER_BLOCK(-140, 160, -40, 0) - EVT_CALL(CreatePushBlockGrid, 0, 7, 6, -64, -15, -94, 0) - EVT_CALL(SetPushBlock, 0, 1, 4, PUSH_GRID_BLOCK) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), -52, 70, -32, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_TIK10_HiddenItem_CoinA) - EVT_CALL(UseDynamicShadow, TRUE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 23, 70, -32, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_TIK10_HiddenItem_CoinB) - EVT_CALL(UseDynamicShadow, TRUE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 98, 70, -32, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_TIK10_HiddenItem_CoinC) - EVT_CALL(UseDynamicShadow, TRUE) - EVT_RETURN - EVT_END + Call(CreatePushBlockGrid, 0, 7, 6, -64, -15, -94, 0) + Call(SetPushBlock, 0, 1, 4, PUSH_GRID_BLOCK) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), -52, 70, -32, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_TIK10_HiddenItem_CoinA) + Call(UseDynamicShadow, TRUE) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 23, 70, -32, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_TIK10_HiddenItem_CoinB) + Call(UseDynamicShadow, TRUE) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 98, 70, -32, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_TIK10_HiddenItem_CoinC) + Call(UseDynamicShadow, TRUE) + Return + End }; diff --git a/src/world/area_tik/tik_12/tik_12_1_music.c b/src/world/area_tik/tik_12/tik_12_1_music.c index 4e58d9c5787..6a513d12676 100644 --- a/src/world/area_tik/tik_12/tik_12_1_music.c +++ b/src/world/area_tik/tik_12/tik_12_1_music.c @@ -1,7 +1,7 @@ #include "tik_12.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) + Return + End }; diff --git a/src/world/area_tik/tik_12/tik_12_2_main.c b/src/world/area_tik/tik_12/tik_12_2_main.c index e2f0ca291dc..cc5d0a393d9 100644 --- a/src/world/area_tik/tik_12/tik_12_2_main.c +++ b/src/world/area_tik/tik_12/tik_12_2_main.c @@ -5,40 +5,40 @@ #include "world/common/atomic/TexturePan.inc.c" EvtScript N(EVS_GotoMap_tik_04_3) = { - EVT_CALL(GotoMap, EVT_PTR("tik_04"), tik_04_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("tik_04"), tik_04_ENTRY_3) + Wait(100) + Return + End }; EvtScript N(EVS_ExitPipe_tik_04_3) = EVT_EXIT_PIPE_HORIZONTAL(tik_12_ENTRY_0, COLLIDER_o48, N(EVS_GotoMap_tik_04_3)); EvtScript N(EVS_BindExitTriggers) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o48, COLLIDER_FLAGS_UPPER_MASK) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitPipe_tik_04_3)), TRIGGER_WALL_PUSH, COLLIDER_o48, 1, 0) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o48, COLLIDER_FLAGS_UPPER_MASK) + BindTrigger(Ref(N(EVS_ExitPipe_tik_04_3)), TRIGGER_WALL_PUSH, COLLIDER_o48, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) - EVT_CALL(SetSpriteShading, SHADING_TIK_12) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_SetupDrips)) - EVT_CALL(EnableTexPanning, MODEL_mizu, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) + Call(SetSpriteShading, SHADING_TIK_12) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_SetupDrips)) + Call(EnableTexPanning, MODEL_mizu, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( 0, -200, -100, -500) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o48, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o48, COLLIDER_FLAGS_UPPER_MASK) EVT_ENTER_PIPE_HORIZONTAL(COLLIDER_o48, N(EVS_BindExitTriggers)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Wait(1) + Return + End }; diff --git a/src/world/area_tik/tik_12/tik_12_3_drips.c b/src/world/area_tik/tik_12/tik_12_3_drips.c index 8dd0bc051f3..9bf2e7c0b74 100644 --- a/src/world/area_tik/tik_12/tik_12_3_drips.c +++ b/src/world/area_tik/tik_12/tik_12_3_drips.c @@ -18,8 +18,8 @@ DripVolumeList N(DripVolumes) = { }; EvtScript N(EVS_SetupDrips) = { - EVT_SET(LVar0, EVT_PTR(N(DripVolumes))) - EVT_EXEC(N(EVS_CreateDripVolumes)) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(DripVolumes))) + Exec(N(EVS_CreateDripVolumes)) + Return + End }; diff --git a/src/world/area_tik/tik_12/tik_12_4_entity.c b/src/world/area_tik/tik_12/tik_12_4_entity.c index f7d1420fd49..1f2a9508d1c 100644 --- a/src/world/area_tik/tik_12/tik_12_4_entity.c +++ b/src/world/area_tik/tik_12/tik_12_4_entity.c @@ -12,14 +12,14 @@ s32** N(varStash) = NULL; EvtScript N(EVS_Chest_ShowGotItem) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_FULL) - EVT_WAIT(40) - EVT_CALL(ShowGotItem, LVar0, FALSE, 0) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_FULL) + Wait(40) + Call(ShowGotItem, LVar0, FALSE, 0) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + Return + End }; MAP_RODATA_PAD(1,unk); @@ -31,27 +31,27 @@ MAP_RODATA_PAD(1,unk); #include "world/common/entity/SuperBlock.inc.c" EvtScript N(EVS_SmashBlockA) = { - EVT_SET(GF_TIK12_Hammer3BlockA, TRUE) - EVT_RETURN - EVT_END + Set(GF_TIK12_Hammer3BlockA, TRUE) + Return + End }; EvtScript N(EVS_SmashBlockB) = { - EVT_SET(GF_TIK12_Hammer3BlockB, TRUE) - EVT_RETURN - EVT_END + Set(GF_TIK12_Hammer3BlockB, TRUE) + Return + End }; EvtScript N(EVS_MakeEntities) = { EVT_MAKE_SUPER_BLOCK(240, 0, -40, 0) - EVT_IF_EQ(GF_TIK12_Hammer3BlockA, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer3Block), 140, -135, 55, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_SmashBlockA))) - EVT_END_IF - EVT_IF_EQ(GF_TIK12_Hammer3BlockB, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer3Block), 140, -135, 105, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_SmashBlockB))) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_TIK12_Hammer3BlockA, FALSE) + Call(MakeEntity, Ref(Entity_Hammer3Block), 140, -135, 55, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_SmashBlockA))) + EndIf + IfEq(GF_TIK12_Hammer3BlockB, FALSE) + Call(MakeEntity, Ref(Entity_Hammer3Block), 140, -135, 105, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_SmashBlockB))) + EndIf + Return + End }; diff --git a/src/world/area_tik/tik_14/tik_14_1_music.c b/src/world/area_tik/tik_14/tik_14_1_music.c index bebe3262427..4c3c5742d8c 100644 --- a/src/world/area_tik/tik_14/tik_14_1_music.c +++ b/src/world/area_tik/tik_14/tik_14_1_music.c @@ -1,7 +1,7 @@ #include "tik_14.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) + Return + End }; diff --git a/src/world/area_tik/tik_14/tik_14_2_main.c b/src/world/area_tik/tik_14/tik_14_2_main.c index 0680595ea19..757f96f1fcb 100644 --- a/src/world/area_tik/tik_14/tik_14_2_main.c +++ b/src/world/area_tik/tik_14/tik_14_2_main.c @@ -7,53 +7,53 @@ EvtScript N(EVS_ExitWalk_tik_15_0) = EVT_EXIT_WALK(60, tik_14_ENTRY_1, "tik_15", tik_15_ENTRY_0); EvtScript N(EVS_GotoMap_tik_21_2) = { - EVT_CALL(GotoMap, EVT_PTR("tik_21"), tik_21_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("tik_21"), tik_21_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_ExitPipe_tik_21_2) = EVT_EXIT_PIPE_HORIZONTAL(tik_14_ENTRY_0, COLLIDER_o47, N(EVS_GotoMap_tik_21_2)); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitPipe_tik_21_2)), TRIGGER_WALL_PUSH, COLLIDER_o47, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_15_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o47, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitPipe_tik_21_2)), TRIGGER_WALL_PUSH, COLLIDER_o47, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_tik_15_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o47, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(tik_14_ENTRY_0) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(tik_14_ENTRY_0) EVT_ENTER_PIPE_HORIZONTAL(COLLIDER_o47, N(EVS_BindExitTriggers)) - EVT_CASE_EQ(tik_14_ENTRY_1) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + CaseEq(tik_14_ENTRY_1) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) - EVT_CALL(SetSpriteShading, SHADING_TIK_14) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_SetupDrips)) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(EnableTexPanning, MODEL_mizu, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) + Call(SetSpriteShading, SHADING_TIK_14) + SetUP_CAMERA_NO_LEAD() + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_SetupDrips)) + ExecWait(N(EVS_MakeEntities)) + Call(EnableTexPanning, MODEL_mizu, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( 0, -200, -100, -500) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o47, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o47, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_tik/tik_14/tik_14_3_drips.c b/src/world/area_tik/tik_14/tik_14_3_drips.c index b6c104c2f8b..c4c7839624f 100644 --- a/src/world/area_tik/tik_14/tik_14_3_drips.c +++ b/src/world/area_tik/tik_14/tik_14_3_drips.c @@ -18,8 +18,8 @@ DripVolumeList N(DripVolumes) = { }; EvtScript N(EVS_SetupDrips) = { - EVT_SET(LVar0, EVT_PTR(N(DripVolumes))) - EVT_EXEC(N(EVS_CreateDripVolumes)) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(DripVolumes))) + Exec(N(EVS_CreateDripVolumes)) + Return + End }; diff --git a/src/world/area_tik/tik_14/tik_14_4_entity.c b/src/world/area_tik/tik_14/tik_14_4_entity.c index c01f986f5e3..badf6bfb0c7 100644 --- a/src/world/area_tik/tik_14/tik_14_4_entity.c +++ b/src/world/area_tik/tik_14/tik_14_4_entity.c @@ -8,27 +8,27 @@ BombTrigger N(BombPos_Wall) = { }; EvtScript N(EVS_OnBlast_Wall) = { - EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 0, 9, 0, 1, 10, 30) - EVT_LOOP(10) - EVT_CALL(EnableModel, MODEL_a_kabe, TRUE) - EVT_WAIT(1) - EVT_CALL(EnableModel, MODEL_a_kabe, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GF_TIK14_BombedWall, TRUE) - EVT_UNBIND - EVT_RETURN - EVT_END + PlayEffect(EFFECT_BOMBETTE_BREAKING, 0, 9, 0, 1, 10, 30) + Loop(10) + Call(EnableModel, MODEL_a_kabe, TRUE) + Wait(1) + Call(EnableModel, MODEL_a_kabe, FALSE) + Wait(1) + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) + Set(GF_TIK14_BombedWall, TRUE) + Unbind + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_TIK14_BombedWall, TRUE) - EVT_CALL(EnableModel, MODEL_a_kabe, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) - EVT_ELSE - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnBlast_Wall)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Wall)), 1, 0) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_TIK14_BombedWall, TRUE) + Call(EnableModel, MODEL_a_kabe, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) + Else + BindTrigger(Ref(N(EVS_OnBlast_Wall)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Wall)), 1, 0) + EndIf + Return + End }; diff --git a/src/world/area_tik/tik_15/tik_15_1_music.c b/src/world/area_tik/tik_15/tik_15_1_music.c index 7b8513cd04a..41a72953158 100644 --- a/src/world/area_tik/tik_15/tik_15_1_music.c +++ b/src/world/area_tik/tik_15/tik_15_1_music.c @@ -1,7 +1,7 @@ #include "tik_15.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) + Return + End }; diff --git a/src/world/area_tik/tik_15/tik_15_2_main.c b/src/world/area_tik/tik_15/tik_15_2_main.c index 696f36f78d0..0c4160178aa 100644 --- a/src/world/area_tik/tik_15/tik_15_2_main.c +++ b/src/world/area_tik/tik_15/tik_15_2_main.c @@ -7,45 +7,45 @@ EvtScript N(EVS_ExitWalk_tik_14_1) = EVT_EXIT_WALK(60, tik_15_ENTRY_0, "tik_14", tik_14_ENTRY_1); EvtScript N(EVS_GotoMap_mac_02_5) = { - EVT_CALL(GotoMap, EVT_PTR("mac_02"), mac_02_ENTRY_5) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("mac_02"), mac_02_ENTRY_5) + Wait(100) + Return + End }; EvtScript N(EVS_ExitPipe_mac_02_5) = EVT_EXIT_PIPE_HORIZONTAL(tik_15_ENTRY_1, COLLIDER_o59, N(EVS_GotoMap_mac_02_5)); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_14_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitPipe_mac_02_5)), TRIGGER_WALL_PUSH, COLLIDER_o59, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_tik_14_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitPipe_mac_02_5)), TRIGGER_WALL_PUSH, COLLIDER_o59, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) - EVT_CALL(SetSpriteShading, SHADING_TIK_15) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_SetupDrips)) - EVT_CALL(EnableTexPanning, MODEL_mizu, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) + Call(SetSpriteShading, SHADING_TIK_15) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_SetupDrips)) + Call(EnableTexPanning, MODEL_mizu, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( 0, -200, -100, -500) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, tik_15_ENTRY_1) + Exec(N(EVS_UpdateTexturePan)) + EndThread + ExecWait(N(EVS_MakeEntities)) + Call(GetEntryID, LVar0) + IfEq(LVar0, tik_15_ENTRY_1) EVT_ENTER_PIPE_HORIZONTAL(COLLIDER_o59, N(EVS_BindExitTriggers)) - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_IF - EVT_WAIT(1) - EVT_RETURN - EVT_END + Else + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndIf + Wait(1) + Return + End }; diff --git a/src/world/area_tik/tik_15/tik_15_3_entity.c b/src/world/area_tik/tik_15/tik_15_3_entity.c index 718bed66d6c..4f355a2249e 100644 --- a/src/world/area_tik/tik_15/tik_15_3_entity.c +++ b/src/world/area_tik/tik_15/tik_15_3_entity.c @@ -8,27 +8,27 @@ BombTrigger N(BombPos_Wall) = { }; EvtScript N(EVS_OnBlast_Wall) = { - EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 0, 18, 0, 1, 10, 30) - EVT_LOOP(10) - EVT_CALL(EnableModel, MODEL_a_kabe, TRUE) - EVT_WAIT(1) - EVT_CALL(EnableModel, MODEL_a_kabe, FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GF_TIK14_BombedWall, TRUE) - EVT_UNBIND - EVT_RETURN - EVT_END + PlayEffect(EFFECT_BOMBETTE_BREAKING, 0, 18, 0, 1, 10, 30) + Loop(10) + Call(EnableModel, MODEL_a_kabe, TRUE) + Wait(1) + Call(EnableModel, MODEL_a_kabe, FALSE) + Wait(1) + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) + Set(GF_TIK14_BombedWall, TRUE) + Unbind + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_TIK14_BombedWall, TRUE) - EVT_CALL(EnableModel, MODEL_a_kabe, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) - EVT_ELSE - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnBlast_Wall)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Wall)), 1, 0) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_TIK14_BombedWall, TRUE) + Call(EnableModel, MODEL_a_kabe, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) + Else + BindTrigger(Ref(N(EVS_OnBlast_Wall)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Wall)), 1, 0) + EndIf + Return + End }; diff --git a/src/world/area_tik/tik_15/tik_15_4_drips.c b/src/world/area_tik/tik_15/tik_15_4_drips.c index e1492f33adf..e4ee509c68b 100644 --- a/src/world/area_tik/tik_15/tik_15_4_drips.c +++ b/src/world/area_tik/tik_15/tik_15_4_drips.c @@ -18,8 +18,8 @@ DripVolumeList N(DripVolumes) = { }; EvtScript N(EVS_SetupDrips) = { - EVT_SET(LVar0, EVT_PTR(N(DripVolumes))) - EVT_EXEC(N(EVS_CreateDripVolumes)) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(DripVolumes))) + Exec(N(EVS_CreateDripVolumes)) + Return + End }; diff --git a/src/world/area_tik/tik_15/tik_15_5_npc.c b/src/world/area_tik/tik_15/tik_15_5_npc.c index d1389cfcde2..ecf863b6e1d 100644 --- a/src/world/area_tik/tik_15/tik_15_5_npc.c +++ b/src/world/area_tik/tik_15/tik_15_5_npc.c @@ -59,71 +59,71 @@ API_CALLABLE(N(CheckPlayerHasEnoughCoins)) { } EvtScript N(EVS_NpcInteract_RipCheato) = { - EVT_IF_EQ(AF_TIK_02, FALSE) - EVT_IF_EQ(GF_TIK15_Met_RipCheato, FALSE) - EVT_SET(LVar0, MSG_MGM_0001) - EVT_SET(GF_TIK15_Met_RipCheato, TRUE) - EVT_ELSE - EVT_SET(LVar0, MSG_MGM_0002) - EVT_END_IF - EVT_SET(AF_TIK_02, TRUE) - EVT_ELSE - EVT_SET(LVar0, MSG_MGM_0003) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_RipCheato, ANIM_RipCheato_Talk, ANIM_RipCheato_Idle, 0, LVar0) - EVT_LABEL(0) - EVT_CALL(ShowCoinCounter, TRUE) - EVT_CALL(ShowChoice, MSG_Choice_0001) - EVT_IF_NE(LVar0, 0) - EVT_CALL(ShowCoinCounter, FALSE) - EVT_CALL(ContinueSpeech, NPC_RipCheato, ANIM_RipCheato_Talk, ANIM_RipCheato_Idle, 0, MSG_MGM_0005) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(CheckPlayerHasEnoughCoins), LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowCoinCounter, FALSE) - EVT_CALL(ContinueSpeech, NPC_RipCheato, ANIM_RipCheato_Talk, ANIM_RipCheato_Idle, 0, MSG_MGM_0006) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar0, GB_TIK15_RipCheato_PurchaseCount) - EVT_CALL(N(GetNextCheatoItem)) - EVT_SWITCH(LVarA) - EVT_CASE_EQ(CHEATO_TYPE_STAR_PIECE) - EVT_CALL(AddCoin, -RIP_CHEATO_COST) - EVT_CALL(ShowCoinCounter, FALSE) - EVT_CALL(EndSpeech, NPC_RipCheato, ANIM_RipCheato_Talk, ANIM_RipCheato_Idle, 0) + IfEq(AF_TIK_02, FALSE) + IfEq(GF_TIK15_Met_RipCheato, FALSE) + Set(LVar0, MSG_MGM_0001) + Set(GF_TIK15_Met_RipCheato, TRUE) + Else + Set(LVar0, MSG_MGM_0002) + EndIf + Set(AF_TIK_02, TRUE) + Else + Set(LVar0, MSG_MGM_0003) + EndIf + Call(SpeakToPlayer, NPC_RipCheato, ANIM_RipCheato_Talk, ANIM_RipCheato_Idle, 0, LVar0) + Label(0) + Call(ShowCoinCounter, TRUE) + Call(ShowChoice, MSG_Choice_0001) + IfNe(LVar0, 0) + Call(ShowCoinCounter, FALSE) + Call(ContinueSpeech, NPC_RipCheato, ANIM_RipCheato_Talk, ANIM_RipCheato_Idle, 0, MSG_MGM_0005) + Return + EndIf + Call(N(CheckPlayerHasEnoughCoins), LVar0) + IfEq(LVar0, 0) + Call(ShowCoinCounter, FALSE) + Call(ContinueSpeech, NPC_RipCheato, ANIM_RipCheato_Talk, ANIM_RipCheato_Idle, 0, MSG_MGM_0006) + Return + EndIf + Set(LVar0, GB_TIK15_RipCheato_PurchaseCount) + Call(N(GetNextCheatoItem)) + Switch(LVarA) + CaseEq(CHEATO_TYPE_STAR_PIECE) + Call(AddCoin, -RIP_CHEATO_COST) + Call(ShowCoinCounter, FALSE) + Call(EndSpeech, NPC_RipCheato, ANIM_RipCheato_Talk, ANIM_RipCheato_Idle, 0) EVT_GIVE_STAR_PIECE() - EVT_CASE_EQ(CHEATO_TYPE_BADGE) - EVT_CALL(AddCoin, -RIP_CHEATO_COST) - EVT_CALL(ShowCoinCounter, FALSE) - EVT_CALL(EndSpeech, NPC_RipCheato, ANIM_RipCheato_Talk, ANIM_RipCheato_Idle, 0) + CaseEq(CHEATO_TYPE_BADGE) + Call(AddCoin, -RIP_CHEATO_COST) + Call(ShowCoinCounter, FALSE) + Call(EndSpeech, NPC_RipCheato, ANIM_RipCheato_Talk, ANIM_RipCheato_Idle, 0) EVT_GIVE_BADGE_REWARD(ITEM_BUMP_ATTACK) - EVT_CASE_EQ(CHEATO_TYPE_CONSUMABLE) - EVT_CALL(N(CheckPlayerHasEnoughRoom)) - EVT_IF_LE(LVar0, 0) - EVT_CALL(ShowCoinCounter, FALSE) - EVT_CALL(ContinueSpeech, NPC_RipCheato, ANIM_RipCheato_Talk, ANIM_RipCheato_Idle, 0, MSG_MGM_0007) - EVT_RETURN - EVT_END_IF - EVT_CALL(AddCoin, -RIP_CHEATO_COST) - EVT_CALL(ShowCoinCounter, FALSE) - EVT_CALL(EndSpeech, NPC_RipCheato, ANIM_RipCheato_Talk, ANIM_RipCheato_Idle, 0) + CaseEq(CHEATO_TYPE_CONSUMABLE) + Call(N(CheckPlayerHasEnoughRoom)) + IfLe(LVar0, 0) + Call(ShowCoinCounter, FALSE) + Call(ContinueSpeech, NPC_RipCheato, ANIM_RipCheato_Talk, ANIM_RipCheato_Idle, 0, MSG_MGM_0007) + Return + EndIf + Call(AddCoin, -RIP_CHEATO_COST) + Call(ShowCoinCounter, FALSE) + Call(EndSpeech, NPC_RipCheato, ANIM_RipCheato_Talk, ANIM_RipCheato_Idle, 0) EVT_GIVE_CONSUMABLE_REWARD_ALT(LVarB) - EVT_END_SWITCH - EVT_IF_LT(GB_TIK15_RipCheato_PurchaseCount, 10) - EVT_ADD(GB_TIK15_RipCheato_PurchaseCount, 1) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_RipCheato, ANIM_RipCheato_Talk, ANIM_RipCheato_Idle, 0, MSG_MGM_0004) - EVT_GOTO(0) - EVT_RETURN - EVT_END + EndSwitch + IfLt(GB_TIK15_RipCheato_PurchaseCount, 10) + Add(GB_TIK15_RipCheato_PurchaseCount, 1) + EndIf + Call(SpeakToPlayer, NPC_RipCheato, ANIM_RipCheato_Talk, ANIM_RipCheato_Idle, 0, MSG_MGM_0004) + Goto(0) + Return + End }; EvtScript N(EVS_NpcInit_RipCheato) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_RipCheato))) - EVT_SET(AF_TIK_02, FALSE) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_RipCheato))) + Set(AF_TIK_02, FALSE) + Return + End }; NpcData N(NpcData_RipCheato) = { diff --git a/src/world/area_tik/tik_17/tik_17_1_music.c b/src/world/area_tik/tik_17/tik_17_1_music.c index 82aafa74cc1..7a436600b2a 100644 --- a/src/world/area_tik/tik_17/tik_17_1_music.c +++ b/src/world/area_tik/tik_17/tik_17_1_music.c @@ -6,11 +6,11 @@ API_CALLABLE(N(AdjustTrackVolumes)) { } EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(N(AdjustTrackVolumes)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) + Thread + Wait(30) + Call(N(AdjustTrackVolumes)) + EndThread + Return + End }; diff --git a/src/world/area_tik/tik_17/tik_17_2_entity.c b/src/world/area_tik/tik_17/tik_17_2_entity.c index df81e381473..75ca63d04f9 100644 --- a/src/world/area_tik/tik_17/tik_17_2_entity.c +++ b/src/world/area_tik/tik_17/tik_17_2_entity.c @@ -7,6 +7,6 @@ EvtScript N(EVS_MakeEntities) = { EVT_MAKE_SUPER_BLOCK(-130, 50, 0, 0) - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/area_tik/tik_17/tik_17_3_main.c b/src/world/area_tik/tik_17/tik_17_3_main.c index 5cfa504970b..9471d0bb1b4 100644 --- a/src/world/area_tik/tik_17/tik_17_3_main.c +++ b/src/world/area_tik/tik_17/tik_17_3_main.c @@ -5,59 +5,59 @@ #include "world/common/atomic/TexturePan.inc.c" EvtScript N(EVS_GotoMap_sam_02_2) = { - EVT_IF_EQ(GF_StartedChapter7, FALSE) - EVT_SET(GF_StartedChapter7, TRUE) - EVT_CALL(FadeOutMusic, 0, 1500) - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_22"), kmr_22_ENTRY_7, TRANSITION_BEGIN_OR_END_CHAPTER) - EVT_WAIT(100) - EVT_RETURN - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("sam_02"), sam_02_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + IfEq(GF_StartedChapter7, FALSE) + Set(GF_StartedChapter7, TRUE) + Call(FadeOutMusic, 0, 1500) + Call(GotoMapSpecial, Ref("kmr_22"), kmr_22_ENTRY_7, TRANSITION_BEGIN_OR_END_CHAPTER) + Wait(100) + Return + EndIf + Call(GotoMap, Ref("sam_02"), sam_02_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_ExitPipe_sam_02_2) = EVT_EXIT_PIPE_HORIZONTAL(tik_17_ENTRY_1, COLLIDER_o105, N(EVS_GotoMap_sam_02_2)); EvtScript N(EVS_GotoMap_tik_22_1) = { - EVT_CALL(GotoMap, EVT_PTR("tik_22"), tik_22_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("tik_22"), tik_22_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitPipe_tik_22_1) = EVT_EXIT_PIPE_VERTICAL(tik_17_ENTRY_0, COLLIDER_o58, N(EVS_GotoMap_tik_22_1)); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitPipe_sam_02_2)), TRIGGER_WALL_PUSH, COLLIDER_o105, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitPipe_tik_22_1)), TRIGGER_FLOOR_TOUCH, COLLIDER_o58, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitPipe_sam_02_2)), TRIGGER_WALL_PUSH, COLLIDER_o105, 1, 0) + BindTrigger(Ref(N(EVS_ExitPipe_tik_22_1)), TRIGGER_FLOOR_TOUCH, COLLIDER_o58, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_WAIT(1) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, tik_17_ENTRY_0) + Set(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Wait(1) + Call(GetEntryID, LVar0) + IfNe(LVar0, tik_17_ENTRY_0) EVT_ENTER_PIPE_HORIZONTAL(COLLIDER_o105, N(EVS_BindExitTriggers)) - EVT_ELSE + Else EVT_ENTER_PIPE_VERTICAL(N(EVS_BindExitTriggers)) - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(SetTexPanner, MODEL_kiri, TEX_PANNER_1) - EVT_THREAD + EndIf + Wait(1) + Call(SetTexPanner, MODEL_kiri, TEX_PANNER_1) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( -300, 0, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; diff --git a/src/world/area_tik/tik_18/tik_18_1_music.c b/src/world/area_tik/tik_18/tik_18_1_music.c index a1d87e91f8e..00686cabd79 100644 --- a/src/world/area_tik/tik_18/tik_18_1_music.c +++ b/src/world/area_tik/tik_18/tik_18_1_music.c @@ -1,7 +1,7 @@ #include "tik_18.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) + Return + End }; diff --git a/src/world/area_tik/tik_18/tik_18_2_main.c b/src/world/area_tik/tik_18/tik_18_2_main.c index 765ba723afc..a86a39c15fc 100644 --- a/src/world/area_tik/tik_18/tik_18_2_main.c +++ b/src/world/area_tik/tik_18/tik_18_2_main.c @@ -6,50 +6,50 @@ EvtScript N(EVS_ExitWalk_tik_06_1) = EVT_EXIT_WALK(60, tik_18_ENTRY_0, "tik_06", EvtScript N(EVS_ExitWalk_tik_02_0) = EVT_EXIT_WALK(60, tik_18_ENTRY_1, "tik_02", tik_02_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_06_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_02_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_tik_06_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_tik_02_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) - EVT_CALL(SetSpriteShading, SHADING_TIK_18) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o44, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o45, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_SetupDrips)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(PlaySound, SOUND_LOOP_TIK18_WATER) - EVT_CALL(EnableTexPanning, MODEL_nagare, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) + Call(SetSpriteShading, SHADING_TIK_18) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o44, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o45, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_SetupDrips)) + Exec(N(EVS_SetupMusic)) + Call(PlaySound, SOUND_LOOP_TIK18_WATER) + Call(EnableTexPanning, MODEL_nagare, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 50, 200, 110, 500) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_mizu, TRUE) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(EnableTexPanning, MODEL_mizu, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( 0, -200, -100, -500) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_mizu2, TRUE) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(EnableTexPanning, MODEL_mizu2, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_3) TEX_PAN_PARAMS_STEP( 0, -250, -100, -500) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; diff --git a/src/world/area_tik/tik_18/tik_18_3_drips.c b/src/world/area_tik/tik_18/tik_18_3_drips.c index 1a36efccd85..85111e34060 100644 --- a/src/world/area_tik/tik_18/tik_18_3_drips.c +++ b/src/world/area_tik/tik_18/tik_18_3_drips.c @@ -18,8 +18,8 @@ DripVolumeList N(DripVolumes) = { }; EvtScript N(EVS_SetupDrips) = { - EVT_SET(LVar0, EVT_PTR(N(DripVolumes))) - EVT_EXEC(N(EVS_CreateDripVolumes)) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(DripVolumes))) + Exec(N(EVS_CreateDripVolumes)) + Return + End }; diff --git a/src/world/area_tik/tik_18/tik_18_4_npc.c b/src/world/area_tik/tik_18/tik_18_4_npc.c index 581b4406729..8d1261e5809 100644 --- a/src/world/area_tik/tik_18/tik_18_4_npc.c +++ b/src/world/area_tik/tik_18/tik_18_4_npc.c @@ -5,50 +5,50 @@ EvtScript N(EVS_NpcIdle_SpikedGloomba) = { // wait for activation from block breaking - EVT_LABEL(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_FALSE(LVar0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_SpikedGoomba_Dark_Sleep) - EVT_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_AI_FOUND_PLAYER_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, -90, 0, 10, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_SELF, LVar0, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetNpcPos, NPC_SELF, LVarA, LVarB, LVarC) - EVT_CALL(MakeLerp, 0, 360, 15, EASING_LINEAR) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, 0) - EVT_END_THREAD - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.7)) - EVT_CALL(NpcJump0, NPC_SELF, 190, -10, -10, 25) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_SpikedGoomba_Dark_Laugh) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_SpikedGoomba_Dark_Idle) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_SpikedGloomba_Wander))) - EVT_RETURN - EVT_END + Label(0) + Call(GetSelfVar, 0, LVar0) + IfFalse(LVar0) + Wait(1) + Goto(0) + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_SpikedGoomba_Dark_Sleep) + Thread + Call(PlaySoundAtNpc, NPC_SELF, SOUND_AI_FOUND_PLAYER_JUMP, SOUND_SPACE_DEFAULT) + Call(MakeLerp, -90, 0, 10, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_SELF, LVar0, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(GetNpcPos, NPC_SELF, LVarA, LVarB, LVarC) + Call(MakeLerp, 0, 360, 15, EASING_LINEAR) + Label(2) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_SELF, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(2) + EndIf + Call(SetNpcRotation, NPC_SELF, 0, 0, 0) + EndThread + Call(SetNpcJumpscale, NPC_SELF, Float(0.7)) + Call(NpcJump0, NPC_SELF, 190, -10, -10, 25) + Call(SetNpcAnimation, NPC_SELF, ANIM_SpikedGoomba_Dark_Laugh) + Wait(20) + Call(SetNpcAnimation, NPC_SELF, ANIM_SpikedGoomba_Dark_Idle) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_SpikedGloomba_Wander))) + Return + End }; EvtScript N(EVS_NpcInit_SpikedGloomba) = { - EVT_CALL(SetNpcPos, NPC_SELF, 150, 76, -63) - EVT_CALL(SetNpcRotation, NPC_SELF, -85, 0, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_SpikedGloomba))) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, 150, 76, -63) + Call(SetNpcRotation, NPC_SELF, -85, 0, 0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_SpikedGloomba))) + Return + End }; NpcData N(NpcData_Gloomba) = { diff --git a/src/world/area_tik/tik_18/tik_18_5_entity.c b/src/world/area_tik/tik_18/tik_18_5_entity.c index 8b1bf444f82..34f8964e3ee 100644 --- a/src/world/area_tik/tik_18/tik_18_5_entity.c +++ b/src/world/area_tik/tik_18/tik_18_5_entity.c @@ -11,23 +11,23 @@ API_CALLABLE(N(WakeSpikedGoomba)) { } EvtScript N(EVS_OnBreakBlock) = { - EVT_CALL(N(WakeSpikedGoomba)) - EVT_RETURN - EVT_END + Call(N(WakeSpikedGoomba)) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 200, 50, -75, 0, ITEM_SUPER_SHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_TIK18_HiddenItem_SuperShroom) - EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), 0, 50, -75, 0, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_TIK18_MultiCoinBrick) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), -100, 50, -75, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), -50, 50, -75, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 50, 50, -75, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 100, 50, -75, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 250, 50, -75, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 150, 50, -75, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBreakBlock))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 200, 50, -75, 0, ITEM_SUPER_SHROOM, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_TIK18_HiddenItem_SuperShroom) + Call(MakeEntity, Ref(Entity_MulticoinBlock), 0, 50, -75, 0, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_TIK18_MultiCoinBrick) + Call(MakeEntity, Ref(Entity_BrickBlock), -100, 50, -75, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), -50, 50, -75, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), 50, 50, -75, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), 100, 50, -75, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), 250, 50, -75, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), 150, 50, -75, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnBreakBlock))) + Return + End }; diff --git a/src/world/area_tik/tik_19/tik_19_1_music.c b/src/world/area_tik/tik_19/tik_19_1_music.c index ce8f4aeb38f..75bcfbfd1fd 100644 --- a/src/world/area_tik/tik_19/tik_19_1_music.c +++ b/src/world/area_tik/tik_19/tik_19_1_music.c @@ -1,7 +1,7 @@ #include "tik_19.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) + Return + End }; diff --git a/src/world/area_tik/tik_19/tik_19_2_main.c b/src/world/area_tik/tik_19/tik_19_2_main.c index 08ab449d5fc..2228f0f7299 100644 --- a/src/world/area_tik/tik_19/tik_19_2_main.c +++ b/src/world/area_tik/tik_19/tik_19_2_main.c @@ -5,58 +5,58 @@ #include "world/common/atomic/TexturePan.inc.c" EvtScript N(EVS_GotoMap_mac_00_3) = { - EVT_CALL(GotoMap, EVT_PTR("mac_00"), mac_00_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("mac_00"), mac_00_ENTRY_3) + Wait(100) + Return + End }; EvtScript N(EVS_ExitPipe_mac_00_3) = EVT_EXIT_PIPE_HORIZONTAL(tik_19_ENTRY_0, COLLIDER_ttd, N(EVS_GotoMap_mac_00_3)); EvtScript N(EVS_BindExitTriggers) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_ttd, COLLIDER_FLAGS_UPPER_MASK) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitPipe_mac_00_3)), TRIGGER_WALL_PUSH, COLLIDER_ttd, 1, 0) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_ttd, COLLIDER_FLAGS_UPPER_MASK) + BindTrigger(Ref(N(EVS_ExitPipe_mac_00_3)), TRIGGER_WALL_PUSH, COLLIDER_ttd, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(PlaySound, SOUND_LOOP_TIK19_WATER) - EVT_CALL(PlaySoundAtF, SOUND_LOOP_TIK19_FLOW3, SOUND_SPACE_WITH_DEPTH, 0, -20, 30) - EVT_CALL(PlaySoundAtF, SOUND_LOOP_TIK19_FLOW4, SOUND_SPACE_WITH_DEPTH, 270, -20, 30) - EVT_CALL(EnableTexPanning, MODEL_nagare, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Call(PlaySound, SOUND_LOOP_TIK19_WATER) + Call(PlaySoundAtF, SOUND_LOOP_TIK19_FLOW3, SOUND_SPACE_WITH_DEPTH, 0, -20, 30) + Call(PlaySoundAtF, SOUND_LOOP_TIK19_FLOW4, SOUND_SPACE_WITH_DEPTH, 270, -20, 30) + Call(EnableTexPanning, MODEL_nagare, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 70, 100, 100, 130) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_taki, TRUE) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(EnableTexPanning, MODEL_taki, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_4) TEX_PAN_PARAMS_STEP( -50, -900, -70,-1200) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_takib, TRUE) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(EnableTexPanning, MODEL_takib, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_5) TEX_PAN_PARAMS_STEP( 0,-1400,-2600, -60) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetRenderMode, MODEL_nagare, RENDER_MODE_SURFACE_XLU_LAYER2) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ttd, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetRenderMode, MODEL_nagare, RENDER_MODE_SURFACE_XLU_LAYER2) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ttd, COLLIDER_FLAGS_UPPER_MASK) EVT_ENTER_PIPE_HORIZONTAL(COLLIDER_ttd, N(EVS_BindExitTriggers)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Wait(1) + Return + End }; diff --git a/src/world/area_tik/tik_19/tik_19_3_entity.c b/src/world/area_tik/tik_19/tik_19_3_entity.c index 523028d580c..a923948e6d4 100644 --- a/src/world/area_tik/tik_19/tik_19_3_entity.c +++ b/src/world/area_tik/tik_19/tik_19_3_entity.c @@ -7,6 +7,6 @@ EvtScript N(EVS_MakeEntities) = { EVT_MAKE_SUPER_BLOCK(760, 75, -10, 0) - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/area_tik/tik_20/tik_20_1_music.c b/src/world/area_tik/tik_20/tik_20_1_music.c index 9b0feca3a43..88af19c7308 100644 --- a/src/world/area_tik/tik_20/tik_20_1_music.c +++ b/src/world/area_tik/tik_20/tik_20_1_music.c @@ -1,7 +1,7 @@ #include "tik_20.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) + Return + End }; diff --git a/src/world/area_tik/tik_20/tik_20_2_main.c b/src/world/area_tik/tik_20/tik_20_2_main.c index e00e074d5f1..4a8ee89d38a 100644 --- a/src/world/area_tik/tik_20/tik_20_2_main.c +++ b/src/world/area_tik/tik_20/tik_20_2_main.c @@ -8,20 +8,20 @@ EvtScript N(EVS_ExitWalk_tik_08_1) = EVT_EXIT_WALK(60, tik_20_ENTRY_0, "tik_08", EvtScript N(EVS_ExitWalk_tik_21_0) = EVT_EXIT_WALK(60, tik_20_ENTRY_1, "tik_21", tik_21_ENTRY_0); EvtScript N(EVS_GotoMap_tik_23_1) = { - EVT_CALL(GotoMap, EVT_PTR("tik_23"), tik_23_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("tik_23"), tik_23_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ExitPipe_tik_23_1) = EVT_EXIT_PIPE_VERTICAL(tik_20_ENTRY_2, COLLIDER_o109, N(EVS_GotoMap_tik_23_1)); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_08_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_21_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitPipe_tik_23_1)), TRIGGER_FLOOR_TOUCH, COLLIDER_o109, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_tik_08_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_tik_21_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitPipe_tik_23_1)), TRIGGER_FLOOR_TOUCH, COLLIDER_o109, 1, 0) + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -56,10 +56,10 @@ DripVolumeList N(DripVolumes) = { }; EvtScript N(EVS_SetupDrips) = { - EVT_SET(LVar0, EVT_PTR(N(DripVolumes))) - EVT_EXEC(N(EVS_CreateDripVolumes)) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(DripVolumes))) + Exec(N(EVS_CreateDripVolumes)) + Return + End }; MAP_RODATA_PAD(1,unk); @@ -67,49 +67,49 @@ MAP_RODATA_PAD(1,unk); #include "../common/Flotsam.inc.c" EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) - EVT_CALL(SetSpriteShading, SHADING_TIK_20) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_toge, SURFACE_TYPE_SPIKES) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(PlaySound, SOUND_LOOP_TIK20_WATER) - EVT_EXEC(N(EVS_SetupDrips)) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) + Call(SetSpriteShading, SHADING_TIK_20) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_toge, SURFACE_TYPE_SPIKES) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + Exec(N(EVS_SetupMusic)) + Call(PlaySound, SOUND_LOOP_TIK20_WATER) + Exec(N(EVS_SetupDrips)) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_0) TEX_PAN_PARAMS_STEP( 70, 100, 100, 130) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(SetTexPanner, MODEL_nagare, 0) - EVT_THREAD - EVT_SET(LVar2, MODEL_bin) - EVT_EXEC(N(EVS_Flotsam_Bobbing)) - EVT_WAIT(5) - EVT_SET(LVar2, MODEL_kan1) - EVT_EXEC(N(EVS_Flotsam_Bobbing)) - EVT_WAIT(5) - EVT_SET(LVar2, MODEL_kan2) - EVT_EXEC(N(EVS_Flotsam_Bobbing)) - EVT_END_THREAD - EVT_WAIT(1) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(tik_20_ENTRY_0) - EVT_CASE_OR_EQ(tik_20_ENTRY_1) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_CASE_GROUP - EVT_CASE_EQ(tik_20_ENTRY_2) + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(SetTexPanner, MODEL_nagare, 0) + Thread + Set(LVar2, MODEL_bin) + Exec(N(EVS_Flotsam_Bobbing)) + Wait(5) + Set(LVar2, MODEL_kan1) + Exec(N(EVS_Flotsam_Bobbing)) + Wait(5) + Set(LVar2, MODEL_kan2) + Exec(N(EVS_Flotsam_Bobbing)) + EndThread + Wait(1) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseOrEq(tik_20_ENTRY_0) + CaseOrEq(tik_20_ENTRY_1) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndCaseGroup + CaseEq(tik_20_ENTRY_2) EVT_ENTER_PIPE_VERTICAL(N(EVS_BindExitTriggers)) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_WAIT(1) - EVT_RETURN - EVT_END + EndCaseGroup + EndSwitch + Wait(1) + Return + End }; diff --git a/src/world/area_tik/tik_20/tik_20_4_entity.c b/src/world/area_tik/tik_20/tik_20_4_entity.c index ecae9101cdd..45105ba30f7 100644 --- a/src/world/area_tik/tik_20/tik_20_4_entity.c +++ b/src/world/area_tik/tik_20/tik_20_4_entity.c @@ -2,8 +2,8 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 475, 70, -100, 0, ITEM_SHOOTING_STAR, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_TIK20_ItemBlock_ShootingStar) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_YellowBlock), 475, 70, -100, 0, ITEM_SHOOTING_STAR, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_TIK20_ItemBlock_ShootingStar) + Return + End }; diff --git a/src/world/area_tik/tik_21/tik_21_1_music.c b/src/world/area_tik/tik_21/tik_21_1_music.c index a3a792f00bf..408f27baf07 100644 --- a/src/world/area_tik/tik_21/tik_21_1_music.c +++ b/src/world/area_tik/tik_21/tik_21_1_music.c @@ -1,7 +1,7 @@ #include "tik_21.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) + Return + End }; diff --git a/src/world/area_tik/tik_21/tik_21_2_main.c b/src/world/area_tik/tik_21/tik_21_2_main.c index 3de75502bc3..fcdff09f1f1 100644 --- a/src/world/area_tik/tik_21/tik_21_2_main.c +++ b/src/world/area_tik/tik_21/tik_21_2_main.c @@ -7,67 +7,67 @@ EvtScript N(EVS_ExitWalk_tik_20_1) = EVT_EXIT_WALK(60, tik_21_ENTRY_0, "tik_20", tik_20_ENTRY_1); EvtScript N(EVS_ExitDoors_tik_22_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, tik_21_ENTRY_1) - EVT_SET(LVar1, COLLIDER_tte) - EVT_SET(LVar2, MODEL_o46) - EVT_SET(LVar3, MODEL_o47) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("tik_22"), tik_22_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerInput, TRUE) + Set(LVar0, tik_21_ENTRY_1) + Set(LVar1, COLLIDER_tte) + Set(LVar2, MODEL_o46) + Set(LVar3, MODEL_o47) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("tik_22"), tik_22_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_GotoMap_tik_14_0) = { - EVT_CALL(GotoMap, EVT_PTR("tik_14"), tik_14_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("tik_14"), tik_14_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitPipe_tik_14_0) = EVT_EXIT_PIPE_VERTICAL(tik_21_ENTRY_2, COLLIDER_o49, N(EVS_GotoMap_tik_14_0)); EvtScript N(EVS_ShowMessage_DoorLocked) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0177, 160, 40) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_Menus_0177, 160, 40) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_20_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_IF_GE(GB_StoryProgress, STORY_CH7_INVITED_TO_STARBORN_VALLEY) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_tik_22_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_ELSE - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShowMessage_DoorLocked)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitPipe_tik_14_0)), TRIGGER_FLOOR_TOUCH, COLLIDER_o49, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_tik_20_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + IfGe(GB_StoryProgress, STORY_CH7_INVITED_TO_STARBORN_VALLEY) + BindTrigger(Ref(N(EVS_ExitDoors_tik_22_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + Else + BindTrigger(Ref(N(EVS_ShowMessage_DoorLocked)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + EndIf + BindTrigger(Ref(N(EVS_ExitPipe_tik_14_0)), TRIGGER_FLOOR_TOUCH, COLLIDER_o49, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(tik_21_ENTRY_0) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(tik_21_ENTRY_1) - EVT_SET(LVar2, MODEL_o46) - EVT_SET(LVar3, MODEL_o47) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(tik_21_ENTRY_2) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(tik_21_ENTRY_0) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseEq(tik_21_ENTRY_1) + Set(LVar2, MODEL_o46) + Set(LVar3, MODEL_o47) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(tik_21_ENTRY_2) EVT_ENTER_PIPE_VERTICAL(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_RETURN - EVT_END + EndSwitch + Wait(1) + Return + End }; #define DROPLET_MODEL MODEL_sizuku @@ -96,30 +96,30 @@ DripVolumeList N(DripVolumes) = { }; EvtScript N(EVS_SetupDrips) = { - EVT_SET(LVar0, EVT_PTR(N(DripVolumes))) - EVT_EXEC(N(EVS_CreateDripVolumes)) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(DripVolumes))) + Exec(N(EVS_CreateDripVolumes)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) - EVT_CALL(SetSpriteShading, SHADING_TIK_21) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_EXEC(N(EVS_SetupDrips)) - EVT_CALL(SetTexPanner, MODEL_mizu, 0) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) + Call(SetSpriteShading, SHADING_TIK_21) + SetUP_CAMERA_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Exec(N(EVS_SetupDrips)) + Call(SetTexPanner, MODEL_mizu, 0) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_0) TEX_PAN_PARAMS_STEP( 0, -200, -100, -500) TEX_PAN_PARAMS_FREQ( 0, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_WAIT(1) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Wait(1) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_tik/tik_21/tik_21_3_entity.c b/src/world/area_tik/tik_21/tik_21_3_entity.c index df22321c367..34db35723e1 100644 --- a/src/world/area_tik/tik_21/tik_21_3_entity.c +++ b/src/world/area_tik/tik_21/tik_21_3_entity.c @@ -2,16 +2,16 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -157, -45, 0, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_TIK21_ItemBlock_Coin) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), -82, -45, 0, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_TIK21_HiddenItem_CoinA) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), -7, -45, 0, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_TIK21_HiddenItem_CoinB) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 68, -45, 0, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_TIK21_HiddenItem_CoinC) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 142, -45, 0, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_TIK21_HiddenItem_CoinD) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_YellowBlock), -157, -45, 0, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_TIK21_ItemBlock_Coin) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), -82, -45, 0, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_TIK21_HiddenItem_CoinA) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), -7, -45, 0, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_TIK21_HiddenItem_CoinB) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 68, -45, 0, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_TIK21_HiddenItem_CoinC) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 142, -45, 0, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_TIK21_HiddenItem_CoinD) + Return + End }; diff --git a/src/world/area_tik/tik_22/tik_22_1_music.c b/src/world/area_tik/tik_22/tik_22_1_music.c index 4ea4c7ebdf3..1981b900584 100644 --- a/src/world/area_tik/tik_22/tik_22_1_music.c +++ b/src/world/area_tik/tik_22/tik_22_1_music.c @@ -6,11 +6,11 @@ API_CALLABLE(N(AdjustTrackVolumes)) { } EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(N(AdjustTrackVolumes)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) + Thread + Wait(30) + Call(N(AdjustTrackVolumes)) + EndThread + Return + End }; diff --git a/src/world/area_tik/tik_22/tik_22_2_main.c b/src/world/area_tik/tik_22/tik_22_2_main.c index d41eddeaf19..b7b71893a02 100644 --- a/src/world/area_tik/tik_22/tik_22_2_main.c +++ b/src/world/area_tik/tik_22/tik_22_2_main.c @@ -10,51 +10,51 @@ API_CALLABLE(N(ResetTrackVolumes)) { } EvtScript N(EVS_ExitDoors_tik_21_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(ResetTrackVolumes)) - EVT_SET(LVar0, tik_22_ENTRY_0) - EVT_SET(LVar1, COLLIDER_tte) - EVT_SET(LVar2, MODEL_o46) - EVT_SET(LVar3, MODEL_o47) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("tik_21"), tik_21_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Call(N(ResetTrackVolumes)) + Set(LVar0, tik_22_ENTRY_0) + Set(LVar1, COLLIDER_tte) + Set(LVar2, MODEL_o46) + Set(LVar3, MODEL_o47) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("tik_21"), tik_21_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_GotoMap_tik_17_0) = { - EVT_CALL(GotoMap, EVT_PTR("tik_17"), tik_17_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("tik_17"), tik_17_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_ExitPipe_tik_17_0) = EVT_EXIT_PIPE_VERTICAL(tik_22_ENTRY_1, COLLIDER_o61, N(EVS_GotoMap_tik_17_0)); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_tik_21_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitPipe_tik_17_0)), TRIGGER_FLOOR_TOUCH, COLLIDER_o61, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_tik_21_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + BindTrigger(Ref(N(EVS_ExitPipe_tik_17_0)), TRIGGER_FLOOR_TOUCH, COLLIDER_o61, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(tik_22_ENTRY_0) - EVT_SET(LVar2, MODEL_o46) - EVT_SET(LVar3, MODEL_o47) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(tik_22_ENTRY_1) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(tik_22_ENTRY_0) + Set(LVar2, MODEL_o46) + Set(LVar3, MODEL_o47) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(tik_22_ENTRY_1) EVT_ENTER_PIPE_VERTICAL(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_RETURN - EVT_END + EndSwitch + Wait(1) + Return + End }; #define DROPLET_MODEL MODEL_sizuku @@ -83,29 +83,29 @@ DripVolumeList N(DripVolumes) = { }; EvtScript N(EVS_SetupDrips) = { - EVT_SET(LVar0, EVT_PTR(N(DripVolumes))) - EVT_EXEC(N(EVS_CreateDripVolumes)) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(DripVolumes))) + Exec(N(EVS_CreateDripVolumes)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) - EVT_CALL(SetSpriteShading, SHADING_TIK_22) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC) - EVT_EXEC(N(EVS_SetupDrips)) - EVT_CALL(SetTexPanner, MODEL_mizu, 0) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) + Call(SetSpriteShading, SHADING_TIK_22) + SetUP_CAMERA_NO_LEAD() + Exec(N(EVS_SetupMusic)) + Call(UseDoorSounds, DOOR_SOUNDS_BASIC) + Exec(N(EVS_SetupDrips)) + Call(SetTexPanner, MODEL_mizu, 0) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_0) TEX_PAN_PARAMS_STEP( 0, -200, -100, -500) TEX_PAN_PARAMS_FREQ( 0, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_WAIT(1) - EVT_EXEC(N(EVS_EnterMap)) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Wait(1) + Exec(N(EVS_EnterMap)) + Return + End }; diff --git a/src/world/area_tik/tik_23/tik_23_1_music.c b/src/world/area_tik/tik_23/tik_23_1_music.c index 2701d8d8afe..a9bc90ba7f3 100644 --- a/src/world/area_tik/tik_23/tik_23_1_music.c +++ b/src/world/area_tik/tik_23/tik_23_1_music.c @@ -1,7 +1,7 @@ #include "tik_23.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) + Return + End }; diff --git a/src/world/area_tik/tik_23/tik_23_2_main.c b/src/world/area_tik/tik_23/tik_23_2_main.c index e06c2a77730..f619be14efc 100644 --- a/src/world/area_tik/tik_23/tik_23_2_main.c +++ b/src/world/area_tik/tik_23/tik_23_2_main.c @@ -7,19 +7,19 @@ EvtScript N(EVS_ExitWalk_tik_24_1) = EVT_EXIT_WALK(60, tik_23_ENTRY_0, "tik_24", tik_24_ENTRY_1); EvtScript N(EVS_GotoMap_tik_20_2) = { - EVT_CALL(GotoMap, EVT_PTR("tik_20"), tik_20_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("tik_20"), tik_20_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_ExitPipe_tik_20_2) = EVT_EXIT_PIPE_HORIZONTAL(tik_23_ENTRY_1, COLLIDER_ttd, N(EVS_GotoMap_tik_20_2)); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_24_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitPipe_tik_20_2)), TRIGGER_WALL_PUSH, COLLIDER_ttd, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_tik_24_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitPipe_tik_20_2)), TRIGGER_WALL_PUSH, COLLIDER_ttd, 1, 0) + Return + End }; #define DROPLET_MODEL MODEL_sizuku @@ -48,52 +48,52 @@ DripVolumeList N(DripVolumes) = { }; EvtScript N(EVS_SetupDrips) = { - EVT_SET(LVar0, EVT_PTR(N(DripVolumes))) - EVT_EXEC(N(EVS_CreateDripVolumes)) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(DripVolumes))) + Exec(N(EVS_CreateDripVolumes)) + Return + End }; #include "../common/Flotsam.inc.c" EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) - EVT_CALL(SetSpriteShading, SHADING_TIK_23) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, tik_23_ENTRY_1) + Set(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) + Call(SetSpriteShading, SHADING_TIK_23) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(GetEntryID, LVar0) + IfEq(LVar0, tik_23_ENTRY_1) EVT_ENTER_PIPE_HORIZONTAL(COLLIDER_ttd, N(EVS_BindExitTriggers)) - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_IF - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(PlaySound, SOUND_LOOP_TIK23_WATER) - EVT_EXEC_WAIT(N(EVS_SetupDrips)) - EVT_CALL(SetTexPanner, MODEL_nagare1, 0) - EVT_CALL(SetTexPanner, MODEL_o97, 0) - EVT_CALL(SetTexPanner, MODEL_o98, 0) - EVT_CALL(SetTexPanner, MODEL_o99, 0) - EVT_THREAD + Else + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndIf + Wait(1) + Exec(N(EVS_SetupMusic)) + Call(PlaySound, SOUND_LOOP_TIK23_WATER) + ExecWait(N(EVS_SetupDrips)) + Call(SetTexPanner, MODEL_nagare1, 0) + Call(SetTexPanner, MODEL_o97, 0) + Call(SetTexPanner, MODEL_o98, 0) + Call(SetTexPanner, MODEL_o99, 0) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_0) TEX_PAN_PARAMS_STEP( 70, -100, 100, -130) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar2, MODEL_bin) - EVT_EXEC(N(EVS_Flotsam_Bobbing)) - EVT_WAIT(5) - EVT_SET(LVar2, MODEL_kan1) - EVT_EXEC(N(EVS_Flotsam_Bobbing)) - EVT_WAIT(5) - EVT_SET(LVar2, MODEL_kan2) - EVT_EXEC(N(EVS_Flotsam_Bobbing)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread + Set(LVar2, MODEL_bin) + Exec(N(EVS_Flotsam_Bobbing)) + Wait(5) + Set(LVar2, MODEL_kan1) + Exec(N(EVS_Flotsam_Bobbing)) + Wait(5) + Set(LVar2, MODEL_kan2) + Exec(N(EVS_Flotsam_Bobbing)) + EndThread + Return + End }; diff --git a/src/world/area_tik/tik_23/tik_23_3_entity.c b/src/world/area_tik/tik_23/tik_23_3_entity.c index 95ec05233c9..ed69bce27dc 100644 --- a/src/world/area_tik/tik_23/tik_23_3_entity.c +++ b/src/world/area_tik/tik_23/tik_23_3_entity.c @@ -2,27 +2,27 @@ #include "entity.h" EvtScript N(EVS_OnSmashBlock) = { - EVT_SET(GF_TIK23_Hammer2Block, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o102, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Set(GF_TIK23_Hammer2Block, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o102, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_TIK23_Hammer2Block, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer2Block), -280, -20, -20, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnSmashBlock))) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o102, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), -75, 40, -120, 0, ITEM_MAPLE_SYRUP, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_TIK23_HiddenItem_MapleSyrup) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 175, 40, 0, 0, ITEM_STOP_WATCH, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_TIK23_HiddenItem_StopWatch) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), -250, 40, -100, 0, ITEM_VOLT_SHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_TIK23_HiddenItem_VoltShroom) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -200, 40, -100, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_TIK23_ItemBlock_Coin) - EVT_RETURN - EVT_END + IfEq(GF_TIK23_Hammer2Block, FALSE) + Call(MakeEntity, Ref(Entity_Hammer2Block), -280, -20, -20, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnSmashBlock))) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o102, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), -75, 40, -120, 0, ITEM_MAPLE_SYRUP, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_TIK23_HiddenItem_MapleSyrup) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 175, 40, 0, 0, ITEM_STOP_WATCH, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_TIK23_HiddenItem_StopWatch) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), -250, 40, -100, 0, ITEM_VOLT_SHROOM, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_TIK23_HiddenItem_VoltShroom) + Call(MakeEntity, Ref(Entity_YellowBlock), -200, 40, -100, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_TIK23_ItemBlock_Coin) + Return + End }; diff --git a/src/world/area_tik/tik_24/tik_24_1_music.c b/src/world/area_tik/tik_24/tik_24_1_music.c index 0d38cdb97c0..2cd5edb0253 100644 --- a/src/world/area_tik/tik_24/tik_24_1_music.c +++ b/src/world/area_tik/tik_24/tik_24_1_music.c @@ -1,7 +1,7 @@ #include "tik_24.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) + Return + End }; diff --git a/src/world/area_tik/tik_24/tik_24_2_main.c b/src/world/area_tik/tik_24/tik_24_2_main.c index ab2db6ab339..86081121d36 100644 --- a/src/world/area_tik/tik_24/tik_24_2_main.c +++ b/src/world/area_tik/tik_24/tik_24_2_main.c @@ -9,48 +9,48 @@ EvtScript N(EVS_ExitWalk_tik_25_0) = EVT_EXIT_WALK(60, tik_24_ENTRY_0, STR_TIK_2 EvtScript N(EVS_ExitWalk_tik_23_0) = EVT_EXIT_WALK(60, tik_24_ENTRY_1, STR_TIK_23, tik_23_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_25_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_23_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_tik_25_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_tik_23_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) - EVT_CALL(SetSpriteShading, SHADING_TIK_24) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupDrips)) - EVT_CALL(EnableTexPanning, MODEL_nagare, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) + Call(SetSpriteShading, SHADING_TIK_24) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupDrips)) + Call(EnableTexPanning, MODEL_nagare, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 50, 200, 110, 500) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_mizu, TRUE) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(EnableTexPanning, MODEL_mizu, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( 0, -200, -100, -500) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_mizu2, TRUE) - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(EnableTexPanning, MODEL_mizu2, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_3) TEX_PAN_PARAMS_STEP( 0, -250, -100, -500) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(PlaySound, SOUND_LOOP_TIK24_WATER) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Exec(N(EVS_SetupMusic)) + Call(PlaySound, SOUND_LOOP_TIK24_WATER) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; diff --git a/src/world/area_tik/tik_24/tik_24_3_drips.c b/src/world/area_tik/tik_24/tik_24_3_drips.c index 5a10c3b102b..f6b6142a3b9 100644 --- a/src/world/area_tik/tik_24/tik_24_3_drips.c +++ b/src/world/area_tik/tik_24/tik_24_3_drips.c @@ -18,8 +18,8 @@ DripVolumeList N(DripVolumes) = { }; EvtScript N(EVS_SetupDrips) = { - EVT_SET(LVar0, EVT_PTR(N(DripVolumes))) - EVT_EXEC(N(EVS_CreateDripVolumes)) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(DripVolumes))) + Exec(N(EVS_CreateDripVolumes)) + Return + End }; diff --git a/src/world/area_tik/tik_24/tik_24_4_entity.c b/src/world/area_tik/tik_24/tik_24_4_entity.c index 03dd75f05c6..924a9396c74 100644 --- a/src/world/area_tik/tik_24/tik_24_4_entity.c +++ b/src/world/area_tik/tik_24/tik_24_4_entity.c @@ -2,30 +2,30 @@ #include "entity.h" EvtScript N(EVS_OnSmashBlock) = { - EVT_SET(GF_TIK24_Hammer3Block, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o44, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Set(GF_TIK24_Hammer3Block, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o44, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_TIK24_Hammer3Block, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer3Block), -240, -10, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnSmashBlock))) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o44, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o45, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 50, 80, -75, 0, ITEM_LIFE_SHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_TIK24_HiddenItem_LifeShroom) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -50, 80, -75, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_TIK24_ItemBlock_CoinA) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 150, 80, -75, 0, ITEM_COIN, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_TIK24_ItemBlock_CoinB) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), -100, 80, -75, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 0, 80, -75, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 100, 80, -75, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 200, 80, -75, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + IfEq(GF_TIK24_Hammer3Block, FALSE) + Call(MakeEntity, Ref(Entity_Hammer3Block), -240, -10, 0, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnSmashBlock))) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o44, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o45, COLLIDER_FLAGS_UPPER_MASK) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 50, 80, -75, 0, ITEM_LIFE_SHROOM, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_TIK24_HiddenItem_LifeShroom) + Call(MakeEntity, Ref(Entity_YellowBlock), -50, 80, -75, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_TIK24_ItemBlock_CoinA) + Call(MakeEntity, Ref(Entity_YellowBlock), 150, 80, -75, 0, ITEM_COIN, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_TIK24_ItemBlock_CoinB) + Call(MakeEntity, Ref(Entity_BrickBlock), -100, 80, -75, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), 0, 80, -75, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), 100, 80, -75, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), 200, 80, -75, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_tik/tik_25/tik_25_1_music.c b/src/world/area_tik/tik_25/tik_25_1_music.c index b8a90797d45..138baaa07f8 100644 --- a/src/world/area_tik/tik_25/tik_25_1_music.c +++ b/src/world/area_tik/tik_25/tik_25_1_music.c @@ -1,15 +1,15 @@ #include "tik_25.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_TOAD_TOWN_TUNNELS, 0, 8) + Return + End }; EvtScript N(EVS_PlayUpgradeSong) = { - EVT_CALL(PushSong, SONG_ITEM_UPGRADE, 1) - EVT_WAIT(130) - EVT_CALL(PopSong) - EVT_RETURN - EVT_END + Call(PushSong, SONG_ITEM_UPGRADE, 1) + Wait(130) + Call(PopSong) + Return + End }; diff --git a/src/world/area_tik/tik_25/tik_25_2_main.c b/src/world/area_tik/tik_25/tik_25_2_main.c index be9831a902d..84a45a9a9d6 100644 --- a/src/world/area_tik/tik_25/tik_25_2_main.c +++ b/src/world/area_tik/tik_25/tik_25_2_main.c @@ -5,9 +5,9 @@ EvtScript N(EVS_ExitWalk_tik_24_0) = EVT_EXIT_WALK(60, tik_25_ENTRY_0, "tik_24", tik_24_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tik_24_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_tik_24_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + Return + End }; #define DROPLET_MODEL MODEL_sizuku @@ -36,30 +36,30 @@ DripVolumeList N(DripVolumes) = { }; EvtScript N(EVS_SetupDrips) = { - EVT_SET(LVar0, EVT_PTR(N(DripVolumes))) - EVT_EXEC(N(EVS_CreateDripVolumes)) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(DripVolumes))) + Exec(N(EVS_CreateDripVolumes)) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) - EVT_CALL(SetSpriteShading, SHADING_TIK_25) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_SetupDrips)) - EVT_CALL(SetTexPanner, MODEL_mizu, 0) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_TOAD_TOWN_TUNNELS) + Call(SetSpriteShading, SHADING_TIK_25) + SetUP_CAMERA_NO_LEAD() + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_SetupDrips)) + Call(SetTexPanner, MODEL_mizu, 0) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_0) TEX_PAN_PARAMS_STEP( 0, -200, -100, -500) TEX_PAN_PARAMS_FREQ( 0, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; diff --git a/src/world/area_tik/tik_25/tik_25_3_entity.c b/src/world/area_tik/tik_25/tik_25_3_entity.c index f3a7b015adb..d5517159036 100644 --- a/src/world/area_tik/tik_25/tik_25_3_entity.c +++ b/src/world/area_tik/tik_25/tik_25_3_entity.c @@ -11,111 +11,111 @@ API_CALLABLE(N(DismissGotItem)) { #include "world/common/util/PlaySpringReboundAnimation.inc.c" EvtScript N(EVS_SetupGiantChest_UltraBoots) = { - EVT_IF_EQ(GF_TIK25_GiantChest, FALSE) - EVT_LABEL(10) - EVT_IF_EQ(GF_TIK25_GiantChest, FALSE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_WAIT(60) - EVT_EXEC(N(EVS_PlayUpgradeSong)) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0187, 160, 40) - EVT_CALL(N(DismissGotItem)) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_TIK25_GiantChest, FALSE) + Label(10) + IfEq(GF_TIK25_GiantChest, FALSE) + Wait(1) + Goto(10) + EndIf + Wait(60) + Exec(N(EVS_PlayUpgradeSong)) + Call(ShowMessageAtScreenPos, MSG_Menus_0187, 160, 40) + Call(N(DismissGotItem)) + EndIf + Return + End }; EvtScript N(EVS_OnBreakBlock_SpringR) = { - EVT_IF_EQ(GF_TIK25_SpringBrickA, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_TIK25_SpringBrickA, TRUE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar5, 210) - EVT_CALL(MakeLerp, -50, -20, 8, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetEntityPosition), MV_EntityID_SpringR, LVar5, LVar0, 0) - EVT_WAIT(1) - EVT_SUB(LVar5, 2) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, LVar0, -135, 22, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetEntityPosition), MV_EntityID_SpringR, LVar5, LVar0, 0) - EVT_WAIT(1) - EVT_SUB(LVar5, 2) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAt, SOUND_OBJECT_LAND, SOUND_SPACE_DEFAULT, LVar5, LVar0, 0) - EVT_CALL(PlaySoundAt, SOUND_SPRING, SOUND_SPACE_DEFAULT, LVar5, LVar0, 0) - EVT_CALL(N(PlaySpringReboundAnimation), MV_EntityID_SpringR) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + IfEq(GF_TIK25_SpringBrickA, TRUE) + Return + EndIf + Set(GF_TIK25_SpringBrickA, TRUE) + Call(DisablePlayerInput, TRUE) + Set(LVar5, 210) + Call(MakeLerp, -50, -20, 8, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(N(SetEntityPosition), MV_EntityID_SpringR, LVar5, LVar0, 0) + Wait(1) + Sub(LVar5, 2) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, LVar0, -135, 22, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(N(SetEntityPosition), MV_EntityID_SpringR, LVar5, LVar0, 0) + Wait(1) + Sub(LVar5, 2) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAt, SOUND_OBJECT_LAND, SOUND_SPACE_DEFAULT, LVar5, LVar0, 0) + Call(PlaySoundAt, SOUND_SPRING, SOUND_SPACE_DEFAULT, LVar5, LVar0, 0) + Call(N(PlaySpringReboundAnimation), MV_EntityID_SpringR) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_OnBreakBlock_SpringL) = { - EVT_IF_EQ(GF_TIK25_SpringBrickB, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_TIK25_SpringBrickB, TRUE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar5, -120) - EVT_CALL(MakeLerp, -20, 10, 8, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetEntityPosition), MV_EntityID_SpringL, LVar5, LVar0, 0) - EVT_WAIT(1) - EVT_ADD(LVar5, 2) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, LVar0, -135, 22, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetEntityPosition), MV_EntityID_SpringL, LVar5, LVar0, 0) - EVT_WAIT(1) - EVT_ADD(LVar5, 2) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAt, SOUND_OBJECT_LAND, SOUND_SPACE_DEFAULT, LVar5, LVar0, 0) - EVT_CALL(PlaySoundAt, SOUND_SPRING, SOUND_SPACE_DEFAULT, LVar5, LVar0, 0) - EVT_CALL(N(PlaySpringReboundAnimation), MV_EntityID_SpringL) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + IfEq(GF_TIK25_SpringBrickB, TRUE) + Return + EndIf + Set(GF_TIK25_SpringBrickB, TRUE) + Call(DisablePlayerInput, TRUE) + Set(LVar5, -120) + Call(MakeLerp, -20, 10, 8, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(N(SetEntityPosition), MV_EntityID_SpringL, LVar5, LVar0, 0) + Wait(1) + Add(LVar5, 2) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, LVar0, -135, 22, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(N(SetEntityPosition), MV_EntityID_SpringL, LVar5, LVar0, 0) + Wait(1) + Add(LVar5, 2) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAt, SOUND_OBJECT_LAND, SOUND_SPACE_DEFAULT, LVar5, LVar0, 0) + Call(PlaySoundAt, SOUND_SPRING, SOUND_SPACE_DEFAULT, LVar5, LVar0, 0) + Call(N(PlaySpringReboundAnimation), MV_EntityID_SpringL) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_GiantChest), -270, -90, 0, 90, ITEM_ULTRA_BOOTS, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_TIK25_GiantChest) - EVT_EXEC(N(EVS_SetupGiantChest_UltraBoots)) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 210, -75, -20, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBreakBlock_SpringR))) - EVT_IF_EQ(GF_TIK25_SpringBrickA, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SimpleSpring), 210, -50, -20, 0, 100, MAKE_ENTITY_END) - EVT_SET(MV_EntityID_SpringR, LVar0) - EVT_ELSE - EVT_CALL(MakeEntity, EVT_PTR(Entity_SimpleSpring), 150, -135, -20, 0, 100, MAKE_ENTITY_END) - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), -120, -45, -20, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBreakBlock_SpringL))) - EVT_IF_EQ(GF_TIK25_SpringBrickB, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SimpleSpring), -120, -20, -20, 0, 100, MAKE_ENTITY_END) - EVT_SET(MV_EntityID_SpringL, LVar0) - EVT_ELSE - EVT_CALL(MakeEntity, EVT_PTR(Entity_SimpleSpring), -60, -135, -20, 0, 100, MAKE_ENTITY_END) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_GiantChest), -270, -90, 0, 90, ITEM_ULTRA_BOOTS, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_TIK25_GiantChest) + Exec(N(EVS_SetupGiantChest_UltraBoots)) + Call(MakeEntity, Ref(Entity_BrickBlock), 210, -75, -20, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnBreakBlock_SpringR))) + IfEq(GF_TIK25_SpringBrickA, FALSE) + Call(MakeEntity, Ref(Entity_SimpleSpring), 210, -50, -20, 0, 100, MAKE_ENTITY_END) + Set(MV_EntityID_SpringR, LVar0) + Else + Call(MakeEntity, Ref(Entity_SimpleSpring), 150, -135, -20, 0, 100, MAKE_ENTITY_END) + EndIf + Call(MakeEntity, Ref(Entity_BrickBlock), -120, -45, -20, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnBreakBlock_SpringL))) + IfEq(GF_TIK25_SpringBrickB, FALSE) + Call(MakeEntity, Ref(Entity_SimpleSpring), -120, -20, -20, 0, 100, MAKE_ENTITY_END) + Set(MV_EntityID_SpringL, LVar0) + Else + Call(MakeEntity, Ref(Entity_SimpleSpring), -60, -135, -20, 0, 100, MAKE_ENTITY_END) + EndIf + Return + End }; diff --git a/src/world/area_trd/trd_00/trd_00_0_header.c b/src/world/area_trd/trd_00/trd_00_0_header.c index 33714c9a915..b1ff3b250d1 100644 --- a/src/world/area_trd/trd_00/trd_00_0_header.c +++ b/src/world/area_trd/trd_00/trd_00_0_header.c @@ -20,17 +20,17 @@ MapSettings N(settings) = { }; EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH1_ARRIVED_AT_KOOPA_FORTRESS) - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_FORTRESS, 1, 8) - EVT_CALL(PlaySound, SOUND_LOOP_TRD_WATER_EXT) - EVT_CASE_EQ(STORY_CH1_BEGAN_PEACH_MISSION) - EVT_CALL(SetMusicTrack, 0, SONG_STAR_SPIRIT_THEME, 1, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) - EVT_CALL(PlaySound, SOUND_LOOP_TRD_WATER_EXT) - EVT_END_SWITCH - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH1_ARRIVED_AT_KOOPA_FORTRESS) + Call(SetMusicTrack, 0, SONG_KOOPA_FORTRESS, 1, 8) + Call(PlaySound, SOUND_LOOP_TRD_WATER_EXT) + CaseEq(STORY_CH1_BEGAN_PEACH_MISSION) + Call(SetMusicTrack, 0, SONG_STAR_SPIRIT_THEME, 1, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_PLEASANT_PATH, 0, 8) + Call(PlaySound, SOUND_LOOP_TRD_WATER_EXT) + EndSwitch + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Return + End }; diff --git a/src/world/area_trd/trd_00/trd_00_1_main.c b/src/world/area_trd/trd_00/trd_00_1_main.c index 54688b2d5ea..3666418cf5b 100644 --- a/src/world/area_trd/trd_00/trd_00_1_main.c +++ b/src/world/area_trd/trd_00/trd_00_1_main.c @@ -15,146 +15,146 @@ EvtScript N(EVS_ExitWalk_trd_05_2) = EVT_EXIT_WALK(60, trd_00_ENTRY_3, "trd_05", EvtScript N(EVS_ExitWalk_nok_15_2) = EVT_EXIT_WALK(60, trd_00_ENTRY_4, "nok_15", nok_15_ENTRY_2); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_nok_15_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_01_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tt2, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_05_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tt3, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_trd_05_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili5, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_nok_15_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilit, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_nok_15_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_trd_01_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tt2, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_trd_05_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tt3, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_trd_05_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili5, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_nok_15_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilit, 1, 0) + Return + End }; EvtScript N(D_80240B34_99A7A4) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerPos,NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_PARTNER, NPC_DISPOSE_LOCATION) - EVT_THREAD - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -730, 0, 400) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 20, 0, 400) - EVT_CALL(SetCamDistance, CAM_DEFAULT, -1000) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 18, EVT_FLOAT(-20.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -480, 0, 400) - EVT_CALL(SetCamDistance, CAM_DEFAULT, -1300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 18, EVT_FLOAT(-11.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.8)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(5) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_END_THREAD - EVT_WAIT(82) - EVT_CALL(SetPlayerPos, -1041, 0, 204) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Walk) - EVT_CALL(SetNpcPos, NPC_PARTNER, -1041, 0, 204) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(PlayerMoveTo, -900, 200, 30) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerPos,NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_PARTNER, NPC_DISPOSE_LOCATION) + Thread + Call(UseSettingsFrom, CAM_DEFAULT, -730, 0, 400) + Call(SetPanTarget, CAM_DEFAULT, 20, 0, 400) + Call(SetCamDistance, CAM_DEFAULT, -1000) + Call(SetCamPitch, CAM_DEFAULT, 18, Float(-20.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetPanTarget, CAM_DEFAULT, -480, 0, 400) + Call(SetCamDistance, CAM_DEFAULT, -1300) + Call(SetCamPitch, CAM_DEFAULT, 18, Float(-11.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.8)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(5) + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + EndThread + Wait(82) + Call(SetPlayerPos, -1041, 0, 204) + Call(SetPlayerAnimation, ANIM_Mario1_Walk) + Call(SetNpcPos, NPC_PARTNER, -1041, 0, 204) + Call(DisablePlayerPhysics, FALSE) + Call(PlayerMoveTo, -900, 200, 30) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SUSPEND_GROUP(EVT_GROUP_01) - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(trd_00_ENTRY_0) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_ARRIVED_AT_KOOPA_FORTRESS) - EVT_SET(GB_StoryProgress, STORY_CH1_ARRIVED_AT_KOOPA_FORTRESS) - EVT_EXEC_WAIT(N(D_80240B34_99A7A4)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_IF - EVT_CASE_EQ(trd_00_ENTRY_1) - EVT_SET(LVar2, MODEL_o62) - EVT_SET(LVar3, MODEL_doa) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(trd_00_ENTRY_2) - EVT_SET(LVar2, MODEL_o70) - EVT_SET(LVar3, MODEL_o69) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(trd_00_ENTRY_3) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(trd_00_ENTRY_4) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(trd_00_ENTRY_5) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + SuspendGroup(EVT_GROUP_01) + Call(GetLoadType, LVar1) + IfEq(LVar1, 1) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(trd_00_ENTRY_0) + IfLt(GB_StoryProgress, STORY_CH1_ARRIVED_AT_KOOPA_FORTRESS) + Set(GB_StoryProgress, STORY_CH1_ARRIVED_AT_KOOPA_FORTRESS) + ExecWait(N(D_80240B34_99A7A4)) + Exec(N(EVS_BindExitTriggers)) + Else + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndIf + CaseEq(trd_00_ENTRY_1) + Set(LVar2, MODEL_o62) + Set(LVar3, MODEL_doa) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(trd_00_ENTRY_2) + Set(LVar2, MODEL_o70) + Set(LVar3, MODEL_o69) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(trd_00_ENTRY_3) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseEq(trd_00_ENTRY_4) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseEq(trd_00_ENTRY_5) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + ResumeGroup(EVT_GROUP_01) + Return + End }; EvtScript N(EVS_TexPan_WaterEdge) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, MODEL_ue, TEX_PANNER_1) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LABEL(10) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, 0) - EVT_ADD(LVar0, 100) - EVT_SUB(LVar1, 100) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, MODEL_ue, TEX_PANNER_1) + Set(LVar0, 0) + Set(LVar1, 0) + Label(10) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, 0) + Add(LVar0, 100) + Sub(LVar1, 100) + Wait(1) + Goto(10) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_KOOPA_BROS_FORTRESS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_SET(GF_MAP_KoopaBrosFortress, TRUE) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(trd_00_ENTRY_0) - EVT_CASE_OR_EQ(trd_00_ENTRY_1) - EVT_CASE_OR_EQ(trd_00_ENTRY_4) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_TexPan_WaterEdge)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_WAIT(1) - EVT_IF_EQ(GF_TRD05_BombedWall, FALSE) - EVT_CALL(SetGroupVisibility, MODEL_g21, MODEL_GROUP_HIDDEN) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt5, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetGroupVisibility, MODEL_ana, MODEL_GROUP_HIDDEN) - EVT_END_IF - EVT_EXEC(N(EVS_EnterMap)) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, trd_00_ENTRY_5) - EVT_WAIT(65) - EVT_ELSE - EVT_WAIT(1) - EVT_END_IF - EVT_CALL(EnableTexPanning, MODEL_o125, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_KOOPA_BROS_FORTRESS) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Set(GF_MAP_KoopaBrosFortress, TRUE) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(trd_00_ENTRY_0) + CaseOrEq(trd_00_ENTRY_1) + CaseOrEq(trd_00_ENTRY_4) + EndSwitch + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_TexPan_WaterEdge)) + Exec(N(EVS_SetupMusic)) + Wait(1) + IfEq(GF_TRD05_BombedWall, FALSE) + Call(SetGroupVisibility, MODEL_g21, MODEL_GROUP_HIDDEN) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt5, COLLIDER_FLAGS_UPPER_MASK) + Call(SetGroupVisibility, MODEL_ana, MODEL_GROUP_HIDDEN) + EndIf + Exec(N(EVS_EnterMap)) + Call(GetEntryID, LVar0) + IfEq(LVar0, trd_00_ENTRY_5) + Wait(65) + Else + Wait(1) + EndIf + Call(EnableTexPanning, MODEL_o125, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( 0, 90, -60, -70) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; diff --git a/src/world/area_trd/trd_00/trd_00_2_entity.c b/src/world/area_trd/trd_00/trd_00_2_entity.c index 413bfb1f745..3562de41279 100644 --- a/src/world/area_trd/trd_00/trd_00_2_entity.c +++ b/src/world/area_trd/trd_00/trd_00_2_entity.c @@ -7,14 +7,14 @@ EvtScript N(EVS_OpenChest_Refund) = EVT_OPEN_CHEST_BADGE(ITEM_REFUND, GF_TRD00_C EvtScript N(EVS_OpenChest_FPPlus) = EVT_OPEN_CHEST_BADGE(ITEM_FP_PLUS_B, GF_TRD00_Chest_FPPlusB); EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 810, 0, -50, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_TRD00_Chest_Refund) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenChest_Refund))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), -750, 200, -125, 0, 0, MAKE_ENTITY_END) - EVT_CALL(AssignChestFlag, GF_TRD00_Chest_FPPlusB) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenChest_FPPlus))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), -920, 60, 80, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 325, 60, 220, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Chest), 810, 0, -50, 0, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_TRD00_Chest_Refund) + Call(AssignScript, Ref(N(EVS_OpenChest_Refund))) + Call(MakeEntity, Ref(Entity_Chest), -750, 200, -125, 0, 0, MAKE_ENTITY_END) + Call(AssignChestFlag, GF_TRD00_Chest_FPPlusB) + Call(AssignScript, Ref(N(EVS_OpenChest_FPPlus))) + Call(MakeEntity, Ref(Entity_SavePoint), -920, 60, 80, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_SavePoint), 325, 60, 220, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_trd/trd_00/trd_00_3_npc.c b/src/world/area_trd/trd_00/trd_00_3_npc.c index c32fc975cc5..6024a0ef5bc 100644 --- a/src/world/area_trd/trd_00/trd_00_3_npc.c +++ b/src/world/area_trd/trd_00/trd_00_3_npc.c @@ -25,284 +25,284 @@ NpcSettings N(NpcSettings_KoopaBros) = { #include "world/common/npc/StarSpirit.inc.c" EvtScript N(EVS_NpcIdle_KoopaBros) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(AwaitPlayerApproach, -580, 276, 50) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) - EVT_THREAD - EVT_CALL(PlaySoundAtCollider, COLLIDER_tt2, SOUND_METAL_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 100, 10, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o62, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_doa, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(DisablePlayerInput, TRUE) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -570, 0, 173) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Black_Run) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(4.5 / DT)) - EVT_CALL(NpcMoveTo, NPC_SELF, -556, 180, 0) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_ANIM, IMGFX_ANIM_STARTLE, 2, 1, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Black_Shock) - EVT_WAIT(12 * DT) - EVT_CALL(SetNpcImgFXParams, NPC_SELF, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Black_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_KoopaBros_Black_Talk, ANIM_KoopaBros_Black_Idle, 0, MSG_CH1_00D2) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Black_Walk) - EVT_CALL(InterpNpcYaw, NPC_SELF, 45, 2) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_RUN_AWAY_BUILDUP, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Black_Run) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.8)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 8 * DT) - EVT_WAIT(8 * DT) - EVT_WAIT(12 * DT) - EVT_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_RUN_AWAY, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(8.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_SELF, -496, 101, 0) - EVT_END_THREAD - EVT_WAIT(10 * DT) - EVT_THREAD - EVT_WAIT(8) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(MakeLerp, 100, 0, 10, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o62, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_doa, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, COLLIDER_tt2, SOUND_METAL_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_WAIT(10 * DT) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.5 / DT)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_SET(GB_StoryProgress, STORY_CH1_SPOTTED_BY_KOOPA_BROS) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) + Call(AwaitPlayerApproach, -580, 276, 50) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) + Thread + Call(PlaySoundAtCollider, COLLIDER_tt2, SOUND_METAL_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 100, 10, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o62, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_doa, LVar0, 0, 1, 0) + Wait(1) + IfNe(LVar1, 0) + Goto(0) + EndIf + EndThread + Call(DisablePlayerInput, TRUE) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(SetPanTarget, CAM_DEFAULT, -570, 0, 173) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Black_Run) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(SetNpcSpeed, NPC_SELF, Float(4.5 / DT)) + Call(NpcMoveTo, NPC_SELF, -556, 180, 0) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_SET_ANIM, IMGFX_ANIM_STARTLE, 2, 1, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Black_Shock) + Wait(12 * DT) + Call(SetNpcImgFXParams, NPC_SELF, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Black_Idle) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_KoopaBros_Black_Talk, ANIM_KoopaBros_Black_Idle, 0, MSG_CH1_00D2) + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Black_Walk) + Call(InterpNpcYaw, NPC_SELF, 45, 2) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_RUN_AWAY_BUILDUP, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Black_Run) + Call(SetNpcJumpscale, NPC_SELF, Float(0.8)) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 8 * DT) + Wait(8 * DT) + Wait(12 * DT) + Thread + Call(PlaySoundAtNpc, NPC_SELF, SOUND_RUN_AWAY, SOUND_SPACE_DEFAULT) + Call(SetNpcSpeed, NPC_SELF, Float(8.0 / DT)) + Call(NpcMoveTo, NPC_SELF, -496, 101, 0) + EndThread + Wait(10 * DT) + Thread + Wait(8) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.0)) + EndThread + Call(MakeLerp, 100, 0, 10, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(RotateModel, MODEL_o62, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_doa, LVar0, 0, 1, 0) + Wait(1) + IfNe(LVar1, 0) + Goto(1) + EndIf + Call(PlaySoundAtCollider, COLLIDER_tt2, SOUND_METAL_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Wait(10 * DT) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.5 / DT)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(DisablePlayerInput, FALSE) + Set(GB_StoryProgress, STORY_CH1_SPOTTED_BY_KOOPA_BROS) + Call(RemoveNpc, NPC_SELF) + Return + End }; EvtScript N(EVS_NpcInit_KoopaBros) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_KoopaBros))) - EVT_IF_GE(GB_StoryProgress, STORY_CH1_SPOTTED_BY_KOOPA_BROS) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_KoopaBros))) + IfGe(GB_StoryProgress, STORY_CH1_SPOTTED_BY_KOOPA_BROS) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcIdle_Eldstar) = { - EVT_LOOP(0) - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Loop(10) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 1) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Loop(10) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 1) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_NpcDefeat_Eldstar) = { - EVT_CALL(SetSelfVar, 0, 1) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 1) + Return + End }; EvtScript N(D_80241DA4_99BA14) = { - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(func_802CF56C, 2) - EVT_CALL(SetNpcPos, NPC_Eldstar, -567, 26, 236) - EVT_CALL(PlayerFaceNpc, NPC_Eldstar, FALSE) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Eldstar, 0) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -527, 0, 216) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -527, 0, 216) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(475.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(WaitForPlayerInputEnabled) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(40 * DT) - EVT_CALL(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 512, MSG_CH1_010D) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(MakeLerp, 0, 360, 10 * DT, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Eldstar, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(EnableNpcAI, NPC_Eldstar, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Eldstar, ANIM_WorldEldstar_Leap) - EVT_WAIT(20 * DT) - EVT_CALL(PlaySoundAtPlayer, SOUND_RECEIVE_STAR_POWER, SOUND_SPACE_DEFAULT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_UsePower) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar1) - EVT_ADD(LVar0, 5) - EVT_ADD(LVar1, 50) - EVT_ADD(LVar2, 10) - EVT_ADD(LVar3, 30) - EVT_LOOP(6) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 20) - EVT_WAIT(6 * DT) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 1, LVar0, LVar3, LVar2, 20) - EVT_WAIT(6 * DT) - EVT_END_LOOP - EVT_WAIT(20 * DT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(PlaySoundAtPlayer, SOUND_GET_STAR_POWER_WAVE, SOUND_SPACE_DEFAULT) - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 30) - EVT_WAIT(40 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetNpcAnimation, NPC_Eldstar, ANIM_WorldEldstar_Idle) - EVT_CALL(EnableNpcAI, NPC_Eldstar, TRUE) - EVT_CALL(N(UpgradeStarPowerCh1)) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0191, 160, 40) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 512, MSG_CH1_010E) - EVT_CALL(ShowChoice, MSG_Choice_0013) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(ContinueSpeech, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 512, MSG_CH1_010F) - EVT_CALL(ShowChoice, MSG_Choice_0013) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(ContinueSpeech, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 512, MSG_CH1_0110) - EVT_GOTO(10) - EVT_END_IF - EVT_END_IF - EVT_CALL(ContinueSpeech, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 512, MSG_CH1_0111) - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(StartBattle) - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(FullyRestoreSP) - EVT_CALL(N(SyncStatusBar)) - EVT_LABEL(10) - EVT_WAIT(30 * DT) - EVT_CALL(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 512, MSG_CH1_0112) - EVT_WAIT(10 * DT) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -527, 0, 216) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 512, MSG_CH1_0113) - EVT_CALL(SetNpcFlagBits, NPC_Eldstar, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) - EVT_THREAD - EVT_LOOP(25) - EVT_CALL(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 20) - EVT_WAIT(4 * DT) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 0x00000708) - EVT_CALL(MakeLerp, LVar2, LVar3, 100 * DT, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Eldstar, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Eldstar, LVar2, LVar3, LVar4) - EVT_SET(LVar5, LVar3) - EVT_ADD(LVar5, 180) - EVT_CALL(MakeLerp, LVar3, LVar5, 100 * DT, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, NPC_Eldstar, LVar2, LVar0, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_Eldstar, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(15 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_Eldstar, SOUND_STAR_SPIRIT_DEPART_1, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_WAIT(90 * DT) - EVT_CALL(ResetCam, CAM_DEFAULT, 3) - EVT_WAIT(20 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_SET(GB_StoryProgress, STORY_CH1_STAR_SPRIT_DEPARTED) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePartnerAI, 0) + Call(func_802CF56C, 2) + Call(SetNpcPos, NPC_Eldstar, -567, 26, 236) + Call(PlayerFaceNpc, NPC_Eldstar, FALSE) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Eldstar, 0) + Call(UseSettingsFrom, CAM_DEFAULT, -527, 0, 216) + Call(SetPanTarget, CAM_DEFAULT, -527, 0, 216) + Call(SetCamDistance, CAM_DEFAULT, Float(475.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(WaitForPlayerInputEnabled) + Call(DisablePlayerInput, TRUE) + Wait(40 * DT) + Call(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 512, MSG_CH1_010D) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(18.0), Float(-9.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(MakeLerp, 0, 360, 10 * DT, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Eldstar, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(EnableNpcAI, NPC_Eldstar, FALSE) + Call(SetNpcAnimation, NPC_Eldstar, ANIM_WorldEldstar_Leap) + Wait(20 * DT) + Call(PlaySoundAtPlayer, SOUND_RECEIVE_STAR_POWER, SOUND_SPACE_DEFAULT) + Call(SetPlayerAnimation, ANIM_Mario1_UsePower) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar3, LVar1) + Add(LVar0, 5) + Add(LVar1, 50) + Add(LVar2, 10) + Add(LVar3, 30) + Loop(6) + PlayEffect(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 20) + Wait(6 * DT) + PlayEffect(EFFECT_SPARKLES, 1, LVar0, LVar3, LVar2, 20) + Wait(6 * DT) + EndLoop + Wait(20 * DT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(PlaySoundAtPlayer, SOUND_GET_STAR_POWER_WAVE, SOUND_SPACE_DEFAULT) + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 30) + Wait(40 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetNpcAnimation, NPC_Eldstar, ANIM_WorldEldstar_Idle) + Call(EnableNpcAI, NPC_Eldstar, TRUE) + Call(N(UpgradeStarPowerCh1)) + Call(ShowMessageAtScreenPos, MSG_Menus_0191, 160, 40) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 512, MSG_CH1_010E) + Call(ShowChoice, MSG_Choice_0013) + IfEq(LVar0, 1) + Call(ContinueSpeech, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 512, MSG_CH1_010F) + Call(ShowChoice, MSG_Choice_0013) + IfEq(LVar0, 1) + Call(ContinueSpeech, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 512, MSG_CH1_0110) + Goto(10) + EndIf + EndIf + Call(ContinueSpeech, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 512, MSG_CH1_0111) + Call(SetSelfVar, 0, 0) + Call(StartBattle) + Loop(0) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(FullyRestoreSP) + Call(N(SyncStatusBar)) + Label(10) + Wait(30 * DT) + Call(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(250.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 512, MSG_CH1_0112) + Wait(10 * DT) + Call(SetPanTarget, CAM_DEFAULT, -527, 0, 216) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(18.0), Float(-9.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_Eldstar, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle, 512, MSG_CH1_0113) + Call(SetNpcFlagBits, NPC_Eldstar, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) + Thread + Loop(25) + Call(GetNpcPos, NPC_Eldstar, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 20) + Wait(4 * DT) + EndLoop + EndThread + Thread + Set(LVar2, 0) + Set(LVar3, 0x00000708) + Call(MakeLerp, LVar2, LVar3, 100 * DT, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Eldstar, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(GetNpcPos, NPC_Eldstar, LVar2, LVar3, LVar4) + Set(LVar5, LVar3) + Add(LVar5, 180) + Call(MakeLerp, LVar3, LVar5, 100 * DT, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetNpcPos, NPC_Eldstar, LVar2, LVar0, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcPos, NPC_Eldstar, NPC_DISPOSE_LOCATION) + EndThread + Thread + Wait(15 * DT) + Call(PlaySoundAtNpc, NPC_Eldstar, SOUND_STAR_SPIRIT_DEPART_1, SOUND_SPACE_DEFAULT) + EndThread + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Wait(90 * DT) + Call(ResetCam, CAM_DEFAULT, 3) + Wait(20 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Set(GB_StoryProgress, STORY_CH1_STAR_SPRIT_DEPARTED) + Exec(N(EVS_SetupMusic)) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Eldstar) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, trd_00_ENTRY_5) - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_ELSE - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Eldstar))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Eldstar))) - EVT_EXEC(N(D_80241DA4_99BA14)) - EVT_END_IF - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, trd_00_ENTRY_5) + Call(GetLoadType, LVar1) + IfEq(LVar1, 1) + Call(RemoveNpc, NPC_SELF) + Else + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Eldstar))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Eldstar))) + Exec(N(D_80241DA4_99BA14)) + EndIf + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_KoopaBros) = { diff --git a/src/world/area_trd/trd_01/trd_01_0_header.c b/src/world/area_trd/trd_01/trd_01_0_header.c index a4101695510..fc58297c3ff 100644 --- a/src/world/area_trd/trd_01/trd_01_0_header.c +++ b/src/world/area_trd/trd_01/trd_01_0_header.c @@ -17,8 +17,8 @@ MapSettings N(settings) = { }; EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_FORTRESS, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_KOOPA_FORTRESS, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Return + End }; diff --git a/src/world/area_trd/trd_01/trd_01_1_main.c b/src/world/area_trd/trd_01/trd_01_1_main.c index ab01ce1798d..265cb01a1aa 100644 --- a/src/world/area_trd/trd_01/trd_01_1_main.c +++ b/src/world/area_trd/trd_01/trd_01_1_main.c @@ -10,30 +10,30 @@ extern NpcGroupList N(DefaultNPCs); #include "world/common/atomic/TexturePan.inc.c" EvtScript N(EVS_EnterMap) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SUSPEND_GROUP(EVT_GROUP_01) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(trd_01_ENTRY_0) - EVT_SET(LVar2, MODEL_ew_doa) - EVT_SET(LVar3, MODEL_ew_doa2) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(trd_01_ENTRY_1) - EVT_SET(LVar2, MODEL_e2_doa) - EVT_SET(LVar3, MODEL_e2_doa2) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(trd_01_ENTRY_2) - EVT_SET(LVar2, MODEL_e3_doa) - EVT_SET(LVar3, MODEL_e3_doa2) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(trd_01_ENTRY_3) - EVT_SET(LVar2, MODEL_e4_doa) - EVT_SET(LVar3, MODEL_e4_doa2) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_END_SWITCH - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + SuspendGroup(EVT_GROUP_01) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(trd_01_ENTRY_0) + Set(LVar2, MODEL_ew_doa) + Set(LVar3, MODEL_ew_doa2) + ExecWait(EnterDoubleDoor) + CaseEq(trd_01_ENTRY_1) + Set(LVar2, MODEL_e2_doa) + Set(LVar3, MODEL_e2_doa2) + ExecWait(EnterDoubleDoor) + CaseEq(trd_01_ENTRY_2) + Set(LVar2, MODEL_e3_doa) + Set(LVar3, MODEL_e3_doa2) + ExecWait(EnterDoubleDoor) + CaseEq(trd_01_ENTRY_3) + Set(LVar2, MODEL_e4_doa) + Set(LVar3, MODEL_e4_doa2) + ExecWait(EnterDoubleDoor) + EndSwitch + ResumeGroup(EVT_GROUP_01) + Return + End }; EvtScript N(EVS_ExitDoors_trd_00_1) = EVT_EXIT_DOUBLE_DOOR(trd_01_ENTRY_0, "trd_00", trd_00_ENTRY_1, COLLIDER_ttw, MODEL_ew_doa, MODEL_ew_doa2); @@ -42,255 +42,255 @@ EvtScript N(EVS_ExitDoors_trd_02_2) = EVT_EXIT_DOUBLE_DOOR(trd_01_ENTRY_2, "trd_ EvtScript N(EVS_ExitDoors_trd_09_0) = EVT_EXIT_DOUBLE_DOOR(trd_01_ENTRY_3, "trd_09", trd_09_ENTRY_0, COLLIDER_tte3, MODEL_e4_doa, MODEL_e4_doa2); EvtScript N(EVS_Scene_RaiseStairs) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(GB_StoryProgress, STORY_CH1_RAISED_SUBMERGED_STAIRS) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_WAIT(1) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_WAIT(20 * DT) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 220) - EVT_SET(LVar2, 255) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 18, 12) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.4 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o162, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetGroupVisibility, MODEL_move_saku, MODEL_GROUP_HIDDEN) - EVT_CALL(PlaySound, SOUND_LOOP_TRD_FLOWING_WATER) - EVT_CHILD_THREAD - EVT_SET_GROUP(EVT_GROUP_00) - EVT_WAIT(4 * DT) - EVT_CALL(EnableModel, MODEL_sui1, TRUE) - EVT_CALL(EnableModel, MODEL_sui2, TRUE) - EVT_CALL(EnableTexPanning, MODEL_sui1, TRUE) - EVT_CALL(EnableTexPanning, MODEL_sui2, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o145, TRUE) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 0) - EVT_SET(LVar4, 0) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, 0) - EVT_SET(LVar7, 0) - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar0, LVar1) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_AUX, LVar2, LVar3) - EVT_CALL(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, LVar4, LVar5) - EVT_CALL(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_AUX, LVar6, LVar7) - EVT_CALL(SetTexPanOffset, TEX_PANNER_4, TEX_PANNER_MAIN, LVar8, LVar9) - EVT_CALL(SetTexPanOffset, TEX_PANNER_4, TEX_PANNER_AUX, LVarA, LVarB) - EVT_ADD(LVar0, -600) - EVT_ADD(LVar1, -600) - EVT_ADD(LVar2, -300) - EVT_ADD(LVar3, -300) - EVT_ADD(LVar4, 140) - EVT_ADD(LVar5, -600) - EVT_ADD(LVar6, -30) - EVT_ADD(LVar7, -600) - EVT_ADD(LVar8, 100) - EVT_ADD(LVar9, -600) - EVT_ADD(LVarA, -100) - EVT_ADD(LVarB, -300) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_THREAD - EVT_CALL(PlaySound, SOUND_LOOP_TRD_RAISE_STAIRS) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10 * DT, EVT_FLOAT(4.0)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20 * DT, EVT_FLOAT(0.7)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 250 * DT, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30 * DT, EVT_FLOAT(0.5)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10 * DT, EVT_FLOAT(1.2)) - EVT_CALL(StopSound, SOUND_LOOP_TRD_RAISE_STAIRS) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(50 * DT) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, 500, LVar2) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_KoopaTroopa_02, LVar4, LVar5, LVar6) - EVT_CALL(SetNpcPos, NPC_KoopaTroopa_02, LVar4, -27, LVar6) - EVT_WAIT(100 * DT) - EVT_CALL(MakeLerp, -27, 300, 210 * DT, EASING_QUADRATIC_OUT) - EVT_LOOP(210 * DT) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, NPC_KoopaTroopa_02, LVar4, LVar0, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaTroopa_02, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_KoopaTroopa_02, EMOTE_QUESTION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(120 * DT) - EVT_CALL(SetNpcAnimation, NPC_KoopaTroopa_02, ANIM_KoopaTroopa_ShellExit) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_KoopaTroopa_02, ANIM_KoopaTroopa_Panic) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaTroopa_02, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_KoopaTroopa_02, EMOTE_EXCLAMATION, 0, 15, EMOTER_NPC, 0, 0, 0, 0) - EVT_LOOP(4) - EVT_CALL(InterpNpcYaw, NPC_KoopaTroopa_02, 270, 0) - EVT_WAIT(20 * DT) - EVT_CALL(InterpNpcYaw, NPC_KoopaTroopa_02, 90, 0) - EVT_WAIT(15 * DT) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(210 * DT) - EVT_SET(NPC_KoopaTroopa_02_DonePanic, TRUE) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_KoopaTroopa_03, LVar4, LVar5, LVar6) - EVT_CALL(SetNpcPos, NPC_KoopaTroopa_03, LVar4, -27, LVar6) - EVT_WAIT(85 * DT) - EVT_CALL(MakeLerp, -27, 350, 215 * DT, EASING_QUADRATIC_OUT) - EVT_LOOP(215 * DT) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, NPC_KoopaTroopa_03, LVar4, LVar0, LVar6) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(25 * DT) - EVT_CALL(ShowEmote, NPC_KoopaTroopa_03, EMOTE_QUESTION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(120 * DT) - EVT_CALL(SetNpcAnimation, NPC_KoopaTroopa_03, ANIM_KoopaTroopa_ShellExit) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_KoopaTroopa_03, ANIM_KoopaTroopa_Panic) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaTroopa_03, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_KoopaTroopa_03, EMOTE_EXCLAMATION, 0, 15, EMOTER_NPC, 0, 0, 0, 0) - EVT_LOOP(4) - EVT_CALL(InterpNpcYaw, NPC_KoopaTroopa_03, 270, 0) - EVT_WAIT(20 * DT) - EVT_CALL(InterpNpcYaw, NPC_KoopaTroopa_03, 90, 0) - EVT_WAIT(15 * DT) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(180 * DT) - EVT_SET(NPC_KoopaTroopa_03_DonePanic, TRUE) - EVT_END_THREAD - EVT_CALL(MakeLerp, -450, 0, 300 * DT, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_dan, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_k_soku, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_k_kusari, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o158) - EVT_SET(LVar2, LVar0) - EVT_ADD(LVar2, 400) - EVT_IF_GE(LVar2, -20) - EVT_IF_EQ(LFlag0, FALSE) - EVT_SET(LFlag0, TRUE) - EVT_CALL(PlaySound, SOUND_TRD_WATER_SPLASH) - EVT_CALL(EnableModel, MODEL_o145, TRUE) - EVT_END_IF - EVT_END_IF - EVT_SET(LVar2, LVar0) - EVT_ADD(LVar2, 375) - EVT_IF_GE(LVar2, -20) - EVT_IF_EQ(LFlag1, FALSE) - EVT_SET(LFlag1, TRUE) - EVT_CALL(PlaySound, SOUND_TRD_WATER_SPLASH) - EVT_CALL(TranslateModel, MODEL_o145, 50, 0, 0) - EVT_END_IF - EVT_END_IF - EVT_SET(LVar2, LVar0) - EVT_ADD(LVar2, 350) - EVT_IF_GE(LVar2, -20) - EVT_IF_EQ(LFlag2, FALSE) - EVT_SET(LFlag2, TRUE) - EVT_CALL(PlaySound, SOUND_TRD_WATER_SPLASH) - EVT_CALL(TranslateModel, MODEL_o145, 100, 0, 0) - EVT_END_IF - EVT_END_IF - EVT_SET(LVar2, LVar0) - EVT_ADD(LVar2, 325) - EVT_IF_GE(LVar2, -20) - EVT_IF_EQ(LFlag3, FALSE) - EVT_SET(LFlag3, TRUE) - EVT_CALL(PlaySound, SOUND_TRD_WATER_SPLASH) - EVT_CALL(TranslateModel, MODEL_o145, 150, 0, 0) - EVT_END_IF - EVT_END_IF - EVT_SET(LVar2, LVar0) - EVT_ADD(LVar2, 299) - EVT_IF_GE(LVar2, -20) - EVT_IF_EQ(LFlag4, FALSE) - EVT_SET(LFlag4, TRUE) - EVT_CALL(PlaySound, SOUND_TRD_WATER_SPLASH) - EVT_CALL(TranslateModel, MODEL_o145, 200, 0, 0) - EVT_END_IF - EVT_END_IF - EVT_SET(LVar2, LVar0) - EVT_ADD(LVar2, 273) - EVT_IF_GE(LVar2, -20) - EVT_IF_EQ(LFlag5, FALSE) - EVT_SET(LFlag5, TRUE) - EVT_CALL(PlaySound, SOUND_TRD_WATER_SPLASH) - EVT_CALL(TranslateModel, MODEL_o145, 250, 0, 0) - EVT_END_IF - EVT_END_IF - EVT_SET(LVar2, LVar0) - EVT_ADD(LVar2, 245) - EVT_IF_GE(LVar2, -20) - EVT_IF_EQ(LFlag6, FALSE) - EVT_SET(LFlag6, TRUE) - EVT_CALL(PlaySound, SOUND_TRD_WATER_SPLASH) - EVT_CALL(TranslateModel, MODEL_o145, 300, 0, 0) - EVT_END_IF - EVT_END_IF - EVT_SET(LVar2, LVar0) - EVT_ADD(LVar2, 220) - EVT_IF_GE(LVar2, -20) - EVT_IF_EQ(LFlag7, FALSE) - EVT_SET(LFlag7, TRUE) - EVT_CALL(PlaySound, SOUND_TRD_WATER_SPLASH) - EVT_CALL(EnableModel, MODEL_o145, FALSE) - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(30 * DT) - EVT_THREAD - EVT_WAIT(28 * DT) - EVT_CALL(EnableModel, MODEL_sui1, FALSE) - EVT_CALL(EnableModel, MODEL_sui2, FALSE) - EVT_END_THREAD - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 220, 255) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(1.5 / DT)) - EVT_CALL(StopSound, SOUND_LOOP_TRD_FLOWING_WATER) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Set(GB_StoryProgress, STORY_CH1_RAISED_SUBMERGED_STAIRS) + SetGroup(EVT_GROUP_00) + Wait(1) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Wait(20 * DT) + Set(LVar0, 0) + Set(LVar1, 220) + Set(LVar2, 255) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamPitch, CAM_DEFAULT, 18, 12) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.4 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10 * DT) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o162, COLLIDER_FLAGS_UPPER_MASK) + Call(SetGroupVisibility, MODEL_move_saku, MODEL_GROUP_HIDDEN) + Call(PlaySound, SOUND_LOOP_TRD_FLOWING_WATER) + ChildThread + SetGroup(EVT_GROUP_00) + Wait(4 * DT) + Call(EnableModel, MODEL_sui1, TRUE) + Call(EnableModel, MODEL_sui2, TRUE) + Call(EnableTexPanning, MODEL_sui1, TRUE) + Call(EnableTexPanning, MODEL_sui2, TRUE) + Call(EnableTexPanning, MODEL_o145, TRUE) + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Set(LVar3, 0) + Set(LVar4, 0) + Set(LVar5, 0) + Set(LVar6, 0) + Set(LVar7, 0) + Loop(0) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar0, LVar1) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_AUX, LVar2, LVar3) + Call(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, LVar4, LVar5) + Call(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_AUX, LVar6, LVar7) + Call(SetTexPanOffset, TEX_PANNER_4, TEX_PANNER_MAIN, LVar8, LVar9) + Call(SetTexPanOffset, TEX_PANNER_4, TEX_PANNER_AUX, LVarA, LVarB) + Add(LVar0, -600) + Add(LVar1, -600) + Add(LVar2, -300) + Add(LVar3, -300) + Add(LVar4, 140) + Add(LVar5, -600) + Add(LVar6, -30) + Add(LVar7, -600) + Add(LVar8, 100) + Add(LVar9, -600) + Add(LVarA, -100) + Add(LVarB, -300) + Wait(1) + EndLoop + EndChildThread + Thread + Call(PlaySound, SOUND_LOOP_TRD_RAISE_STAIRS) + Call(ShakeCam, CAM_DEFAULT, 0, 10 * DT, Float(4.0)) + Call(ShakeCam, CAM_DEFAULT, 0, 20 * DT, Float(0.7)) + Call(ShakeCam, CAM_DEFAULT, 0, 250 * DT, Float(1.0)) + Call(ShakeCam, CAM_DEFAULT, 0, 30 * DT, Float(0.5)) + Call(ShakeCam, CAM_DEFAULT, 0, 10 * DT, Float(1.2)) + Call(StopSound, SOUND_LOOP_TRD_RAISE_STAIRS) + EndThread + Thread + Wait(50 * DT) + Call(SetPanTarget, CAM_DEFAULT, LVar0, 500, LVar2) + EndThread + Thread + Call(GetNpcPos, NPC_KoopaTroopa_02, LVar4, LVar5, LVar6) + Call(SetNpcPos, NPC_KoopaTroopa_02, LVar4, -27, LVar6) + Wait(100 * DT) + Call(MakeLerp, -27, 300, 210 * DT, EASING_QUADRATIC_OUT) + Loop(210 * DT) + Call(UpdateLerp) + Call(SetNpcPos, NPC_KoopaTroopa_02, LVar4, LVar0, LVar6) + Wait(1) + EndLoop + EndThread + Thread + Wait(20 * DT) + Call(PlaySoundAtNpc, NPC_KoopaTroopa_02, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_KoopaTroopa_02, EMOTE_QUESTION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) + Wait(120 * DT) + Call(SetNpcAnimation, NPC_KoopaTroopa_02, ANIM_KoopaTroopa_ShellExit) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_KoopaTroopa_02, ANIM_KoopaTroopa_Panic) + Call(PlaySoundAtNpc, NPC_KoopaTroopa_02, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_KoopaTroopa_02, EMOTE_EXCLAMATION, 0, 15, EMOTER_NPC, 0, 0, 0, 0) + Loop(4) + Call(InterpNpcYaw, NPC_KoopaTroopa_02, 270, 0) + Wait(20 * DT) + Call(InterpNpcYaw, NPC_KoopaTroopa_02, 90, 0) + Wait(15 * DT) + EndLoop + EndThread + Thread + Wait(210 * DT) + Set(NPC_KoopaTroopa_02_DonePanic, TRUE) + EndThread + Thread + Call(GetNpcPos, NPC_KoopaTroopa_03, LVar4, LVar5, LVar6) + Call(SetNpcPos, NPC_KoopaTroopa_03, LVar4, -27, LVar6) + Wait(85 * DT) + Call(MakeLerp, -27, 350, 215 * DT, EASING_QUADRATIC_OUT) + Loop(215 * DT) + Call(UpdateLerp) + Call(SetNpcPos, NPC_KoopaTroopa_03, LVar4, LVar0, LVar6) + Wait(1) + EndLoop + EndThread + Thread + Wait(25 * DT) + Call(ShowEmote, NPC_KoopaTroopa_03, EMOTE_QUESTION, 0, 20, EMOTER_NPC, 0, 0, 0, 0) + Wait(120 * DT) + Call(SetNpcAnimation, NPC_KoopaTroopa_03, ANIM_KoopaTroopa_ShellExit) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_KoopaTroopa_03, ANIM_KoopaTroopa_Panic) + Call(PlaySoundAtNpc, NPC_KoopaTroopa_03, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_KoopaTroopa_03, EMOTE_EXCLAMATION, 0, 15, EMOTER_NPC, 0, 0, 0, 0) + Loop(4) + Call(InterpNpcYaw, NPC_KoopaTroopa_03, 270, 0) + Wait(20 * DT) + Call(InterpNpcYaw, NPC_KoopaTroopa_03, 90, 0) + Wait(15 * DT) + EndLoop + EndThread + Thread + Wait(180 * DT) + Set(NPC_KoopaTroopa_03_DonePanic, TRUE) + EndThread + Call(MakeLerp, -450, 0, 300 * DT, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_dan, 0, LVar0, 0) + Call(TranslateModel, MODEL_k_soku, 0, LVar0, 0) + Call(TranslateModel, MODEL_k_kusari, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o158) + Set(LVar2, LVar0) + Add(LVar2, 400) + IfGe(LVar2, -20) + IfEq(LFlag0, FALSE) + Set(LFlag0, TRUE) + Call(PlaySound, SOUND_TRD_WATER_SPLASH) + Call(EnableModel, MODEL_o145, TRUE) + EndIf + EndIf + Set(LVar2, LVar0) + Add(LVar2, 375) + IfGe(LVar2, -20) + IfEq(LFlag1, FALSE) + Set(LFlag1, TRUE) + Call(PlaySound, SOUND_TRD_WATER_SPLASH) + Call(TranslateModel, MODEL_o145, 50, 0, 0) + EndIf + EndIf + Set(LVar2, LVar0) + Add(LVar2, 350) + IfGe(LVar2, -20) + IfEq(LFlag2, FALSE) + Set(LFlag2, TRUE) + Call(PlaySound, SOUND_TRD_WATER_SPLASH) + Call(TranslateModel, MODEL_o145, 100, 0, 0) + EndIf + EndIf + Set(LVar2, LVar0) + Add(LVar2, 325) + IfGe(LVar2, -20) + IfEq(LFlag3, FALSE) + Set(LFlag3, TRUE) + Call(PlaySound, SOUND_TRD_WATER_SPLASH) + Call(TranslateModel, MODEL_o145, 150, 0, 0) + EndIf + EndIf + Set(LVar2, LVar0) + Add(LVar2, 299) + IfGe(LVar2, -20) + IfEq(LFlag4, FALSE) + Set(LFlag4, TRUE) + Call(PlaySound, SOUND_TRD_WATER_SPLASH) + Call(TranslateModel, MODEL_o145, 200, 0, 0) + EndIf + EndIf + Set(LVar2, LVar0) + Add(LVar2, 273) + IfGe(LVar2, -20) + IfEq(LFlag5, FALSE) + Set(LFlag5, TRUE) + Call(PlaySound, SOUND_TRD_WATER_SPLASH) + Call(TranslateModel, MODEL_o145, 250, 0, 0) + EndIf + EndIf + Set(LVar2, LVar0) + Add(LVar2, 245) + IfGe(LVar2, -20) + IfEq(LFlag6, FALSE) + Set(LFlag6, TRUE) + Call(PlaySound, SOUND_TRD_WATER_SPLASH) + Call(TranslateModel, MODEL_o145, 300, 0, 0) + EndIf + EndIf + Set(LVar2, LVar0) + Add(LVar2, 220) + IfGe(LVar2, -20) + IfEq(LFlag7, FALSE) + Set(LFlag7, TRUE) + Call(PlaySound, SOUND_TRD_WATER_SPLASH) + Call(EnableModel, MODEL_o145, FALSE) + EndIf + EndIf + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(30 * DT) + Thread + Wait(28 * DT) + Call(EnableModel, MODEL_sui1, FALSE) + Call(EnableModel, MODEL_sui2, FALSE) + EndThread + Call(UseSettingsFrom, CAM_DEFAULT, 0, 220, 255) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(ResetCam, CAM_DEFAULT, Float(1.5 / DT)) + Call(StopSound, SOUND_LOOP_TRD_FLOWING_WATER) + Call(DisablePlayerInput, FALSE) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Unbind + Return + End }; EvtScript N(EVS_TexPan_Water) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, MODEL_suimenn, TEX_PANNER_1) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LABEL(10) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, 0) - EVT_ADD(LVar0, 100) - EVT_SUB(LVar1, 100) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, MODEL_suimenn, TEX_PANNER_1) + Set(LVar0, 0) + Set(LVar1, 0) + Label(10) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, 0) + Add(LVar0, 100) + Sub(LVar1, 100) + Wait(1) + Goto(10) + Return + End }; s32 N(KeyList)[] = { @@ -299,47 +299,47 @@ s32 N(KeyList)[] = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_KOOPA_BROS_FORTRESS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_TexPan_Water)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_00_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_IF_EQ(GF_TRD01_UnlockedDoor, FALSE) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_UnlockDoors)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(KeyList)), 0, 1) - EVT_ELSE - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_02_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_02_2)), TRIGGER_WALL_PRESS_A, COLLIDER_tte2, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_09_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte3, 1, 0) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(AF_TRD01_RaiseStairs, FALSE) - EVT_CALL(ParentColliderToModel, COLLIDER_o158, MODEL_dan) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_RAISED_SUBMERGED_STAIRS) - EVT_SET(LVar0, -450) - EVT_CALL(TranslateModel, MODEL_dan, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_k_soku, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_k_kusari, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o158) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Scene_RaiseStairs)), TRIGGER_AREA_FLAG_SET, AF_TRD01_RaiseStairs, 0, 0) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o162, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetGroupVisibility, MODEL_move_saku, MODEL_GROUP_HIDDEN) - EVT_END_IF - EVT_CALL(EnableModel, MODEL_sui1, FALSE) - EVT_CALL(EnableModel, MODEL_sui2, FALSE) - EVT_CALL(EnableModel, MODEL_o145, FALSE) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_CALL(EnableTexPanning, MODEL_suimenn, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_KOOPA_BROS_FORTRESS) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_TexPan_Water)) + BindTrigger(Ref(N(EVS_ExitDoors_trd_00_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + IfEq(GF_TRD01_UnlockedDoor, FALSE) + BindPadlock(Ref(N(EVS_UnlockDoors)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), Ref(N(KeyList)), 0, 1) + Else + BindTrigger(Ref(N(EVS_ExitDoors_trd_02_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + EndIf + BindTrigger(Ref(N(EVS_ExitDoors_trd_02_2)), TRIGGER_WALL_PRESS_A, COLLIDER_tte2, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_trd_09_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte3, 1, 0) + Exec(N(EVS_SetupMusic)) + Set(AF_TRD01_RaiseStairs, FALSE) + Call(ParentColliderToModel, COLLIDER_o158, MODEL_dan) + IfLt(GB_StoryProgress, STORY_CH1_RAISED_SUBMERGED_STAIRS) + Set(LVar0, -450) + Call(TranslateModel, MODEL_dan, 0, LVar0, 0) + Call(TranslateModel, MODEL_k_soku, 0, LVar0, 0) + Call(TranslateModel, MODEL_k_kusari, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o158) + BindTrigger(Ref(N(EVS_Scene_RaiseStairs)), TRIGGER_AREA_FLAG_SET, AF_TRD01_RaiseStairs, 0, 0) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o162, COLLIDER_FLAGS_UPPER_MASK) + Call(SetGroupVisibility, MODEL_move_saku, MODEL_GROUP_HIDDEN) + EndIf + Call(EnableModel, MODEL_sui1, FALSE) + Call(EnableModel, MODEL_sui2, FALSE) + Call(EnableModel, MODEL_o145, FALSE) + Exec(N(EVS_EnterMap)) + Wait(1) + Call(EnableTexPanning, MODEL_suimenn, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 0, 90, -60, -70) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; diff --git a/src/world/area_trd/trd_01/trd_01_2_entity.c b/src/world/area_trd/trd_01/trd_01_2_entity.c index 43fd9d53562..cf42a368458 100644 --- a/src/world/area_trd/trd_01/trd_01_2_entity.c +++ b/src/world/area_trd/trd_01/trd_01_2_entity.c @@ -4,80 +4,80 @@ extern EvtScript N(EVS_ExitDoors_trd_02_0); EvtScript N(EVS_FocusCamOnLock) = { - EVT_LABEL(0) - EVT_IF_EQ(GF_TRD01_Item_FortressKey, TRUE) - EVT_CALL(AwaitPlayerApproach, 320, 0, 40) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 220, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 300, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) - EVT_CALL(GetCamPosA, CAM_DEFAULT, LVar0, LVar1) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-64.0), LVar1) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(AwaitPlayerLeave, 320, 0, 60) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + IfEq(GF_TRD01_Item_FortressKey, TRUE) + Call(AwaitPlayerApproach, 320, 0, 40) + Call(UseSettingsFrom, CAM_DEFAULT, 220, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 300, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(350.0)) + Call(GetCamPosA, CAM_DEFAULT, LVar0, LVar1) + Call(SetCamPosA, CAM_DEFAULT, Float(-64.0), LVar1) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(AwaitPlayerLeave, 320, 0, 60) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + EndIf + Wait(1) + Goto(0) + Return + End }; #include "world/common/todo/RemovePadlock.inc.c" #include "world/common/todo/GetEntityPosition.inc.c" EvtScript N(EVS_UnlockDoors) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SUSPEND_GROUP(EVT_GROUP_01) - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_CALL(CloseChoicePopup) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_RETURN - EVT_END_IF - EVT_CALL(FindKeyItem, ITEM_KOOPA_FORTRESS_KEY, LVar0) - EVT_CALL(RemoveKeyItemAt, LVar0) - EVT_CALL(CloseChoicePopup) - EVT_SET(GF_TRD01_UnlockedDoor, TRUE) - EVT_CALL(N(GetEntityPosition), MV_Padlock_EntityIndex, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_SET(LVar0, MV_Padlock_EntityIndex) - EVT_CALL(N(RemovePadlock)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_UNBIND - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + SuspendGroup(EVT_GROUP_01) + Call(ShowKeyChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) + Call(CloseChoicePopup) + ResumeGroup(EVT_GROUP_01) + Return + EndIf + IfEq(LVar0, -1) + Call(CloseChoicePopup) + ResumeGroup(EVT_GROUP_01) + Return + EndIf + Call(FindKeyItem, ITEM_KOOPA_FORTRESS_KEY, LVar0) + Call(RemoveKeyItemAt, LVar0) + Call(CloseChoicePopup) + Set(GF_TRD01_UnlockedDoor, TRUE) + Call(N(GetEntityPosition), MV_Padlock_EntityIndex, LVar0, LVar1, LVar2) + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Set(LVar0, MV_Padlock_EntityIndex) + Call(N(RemovePadlock)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + ResumeGroup(EVT_GROUP_01) + Unbind + Return + End }; EvtScript N(EVS_BindLockTrigger) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_02_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_trd_02_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_TRD01_UnlockedDoor, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), 315, 8, 0, -80, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_BindLockTrigger))) - EVT_SET(MV_Padlock_EntityIndex, LVar0) - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH1_RAISED_SUBMERGED_STAIRS) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueSwitch), 0, 220, 255, 0, MAKE_ENTITY_END) - EVT_CALL(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_TRD01_RaiseStairs)) - EVT_END_IF - EVT_CALL(MakeItemEntity, ITEM_SMASH_CHARGE, -268, 656, -40, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_TRD01_Item_SmashCharge) - EVT_IF_EQ(GF_TRD01_Defeated_KoopaGuard, TRUE) - EVT_IF_EQ(GF_TRD01_Item_FortressKey, FALSE) - EVT_CALL(MakeItemEntity, ITEM_KOOPA_FORTRESS_KEY, 254, 0, 30, ITEM_SPAWN_MODE_KEY, GF_TRD01_Item_FortressKey) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_TRD01_UnlockedDoor, FALSE) + Call(MakeEntity, Ref(Entity_Padlock), 315, 8, 0, -80, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_BindLockTrigger))) + Set(MV_Padlock_EntityIndex, LVar0) + EndIf + IfLt(GB_StoryProgress, STORY_CH1_RAISED_SUBMERGED_STAIRS) + Call(MakeEntity, Ref(Entity_BlueSwitch), 0, 220, 255, 0, MAKE_ENTITY_END) + Call(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_TRD01_RaiseStairs)) + EndIf + Call(MakeItemEntity, ITEM_SMASH_CHARGE, -268, 656, -40, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_TRD01_Item_SmashCharge) + IfEq(GF_TRD01_Defeated_KoopaGuard, TRUE) + IfEq(GF_TRD01_Item_FortressKey, FALSE) + Call(MakeItemEntity, ITEM_KOOPA_FORTRESS_KEY, 254, 0, 30, ITEM_SPAWN_MODE_KEY, GF_TRD01_Item_FortressKey) + EndIf + EndIf + Return + End }; diff --git a/src/world/area_trd/trd_01/trd_01_3_npc.c b/src/world/area_trd/trd_01/trd_01_3_npc.c index edf57079957..daecd253347 100644 --- a/src/world/area_trd/trd_01/trd_01_3_npc.c +++ b/src/world/area_trd/trd_01/trd_01_3_npc.c @@ -21,127 +21,127 @@ API_CALLABLE(N(SetNewWanderCenterPos)) { } EvtScript N(EVS_NpcIdle_KoopaTroopa_02) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetNpcPos, NPC_SELF, 45, -30, 20) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, -70, -30, -20) - EVT_END_IF - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(GetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) - EVT_LABEL(0) - EVT_CALL(MakeLerp, EVT_FLOAT(-2.0), EVT_FLOAT(2.0), 30, EASING_COS_IN_OUT) - EVT_LABEL(10) - EVT_IF_EQ(GB_StoryProgress, STORY_CH1_RAISED_SUBMERGED_STAIRS) - EVT_GOTO(100) - EVT_END_IF - EVT_CALL(UpdateLerp) - EVT_SET(LVar5, LVar3) - EVT_ADD(LVar5, LVar0) - EVT_CALL(SetNpcPos, NPC_SELF, LVar2, LVar5, LVar4) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(10) - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(MakeLerp, EVT_FLOAT(2.0), EVT_FLOAT(-2.0), 30, EASING_COS_IN_OUT) - EVT_LABEL(20) - EVT_IF_EQ(GB_StoryProgress, STORY_CH1_RAISED_SUBMERGED_STAIRS) - EVT_GOTO(100) - EVT_END_IF - EVT_CALL(UpdateLerp) - EVT_SET(LVar5, LVar3) - EVT_ADD(LVar5, LVar0) - EVT_CALL(SetNpcPos, NPC_SELF, LVar2, LVar5, LVar4) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(20) - EVT_END_IF - EVT_WAIT(5) - EVT_GOTO(0) - EVT_CALL(EnableNpcShadow, NPC_SELF, TRUE) - EVT_LABEL(100) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_IF_EQ(NPC_KoopaTroopa_02_DonePanic, FALSE) - EVT_WAIT(1) - EVT_GOTO(100) - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(NPC_KoopaTroopa_03_DonePanic, FALSE) - EVT_WAIT(1) - EVT_GOTO(100) - EVT_END_IF - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING, FALSE) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(3.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, 190, 20, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, 245, 75, 0) - EVT_ELSE - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(3.6)) - EVT_CALL(NpcMoveTo, NPC_SELF, 210, -20, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, 260, 25, 0) - EVT_END_IF - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(1.5)) - EVT_CALL(N(SetNewWanderCenterPos)) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_KoopaTroopa_Wander))) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(GetSelfNpcID, LVar0) + IfEq(LVar0, 1) + Call(SetNpcPos, NPC_SELF, 45, -30, 20) + Else + Call(SetNpcPos, NPC_SELF, -70, -30, -20) + EndIf + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(GetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) + Label(0) + Call(MakeLerp, Float(-2.0), Float(2.0), 30, EASING_COS_IN_OUT) + Label(10) + IfEq(GB_StoryProgress, STORY_CH1_RAISED_SUBMERGED_STAIRS) + Goto(100) + EndIf + Call(UpdateLerp) + Set(LVar5, LVar3) + Add(LVar5, LVar0) + Call(SetNpcPos, NPC_SELF, LVar2, LVar5, LVar4) + Wait(1) + IfNe(LVar1, 0) + Goto(10) + EndIf + Wait(5) + Call(MakeLerp, Float(2.0), Float(-2.0), 30, EASING_COS_IN_OUT) + Label(20) + IfEq(GB_StoryProgress, STORY_CH1_RAISED_SUBMERGED_STAIRS) + Goto(100) + EndIf + Call(UpdateLerp) + Set(LVar5, LVar3) + Add(LVar5, LVar0) + Call(SetNpcPos, NPC_SELF, LVar2, LVar5, LVar4) + Wait(1) + IfNe(LVar1, 0) + Goto(20) + EndIf + Wait(5) + Goto(0) + Call(EnableNpcShadow, NPC_SELF, TRUE) + Label(100) + Call(GetSelfNpcID, LVar0) + IfEq(LVar0, 1) + IfEq(NPC_KoopaTroopa_02_DonePanic, FALSE) + Wait(1) + Goto(100) + EndIf + Else + IfEq(NPC_KoopaTroopa_03_DonePanic, FALSE) + Wait(1) + Goto(100) + EndIf + EndIf + Wait(10) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING, FALSE) + Call(GetSelfNpcID, LVar0) + IfEq(LVar0, 1) + Call(SetNpcSpeed, NPC_SELF, Float(3.0)) + Call(NpcMoveTo, NPC_SELF, 190, 20, 0) + Call(NpcMoveTo, NPC_SELF, 245, 75, 0) + Else + Call(SetNpcSpeed, NPC_SELF, Float(3.6)) + Call(NpcMoveTo, NPC_SELF, 210, -20, 0) + Call(NpcMoveTo, NPC_SELF, 260, 25, 0) + EndIf + Call(SetNpcSpeed, NPC_SELF, Float(1.5)) + Call(N(SetNewWanderCenterPos)) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_FLYING, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_KoopaTroopa_Wander))) + Return + End }; EvtScript N(EVS_NpcInit_KoopaTroopa_02) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH1_RAISED_SUBMERGED_STAIRS) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_KoopaTroopa_02))) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaTroopa_Floating) - EVT_ELSE - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetNpcPos, NPC_SELF, 240, 220, 130) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, 80, 220, 265) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH1_RAISED_SUBMERGED_STAIRS) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_KoopaTroopa_02))) + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaTroopa_Floating) + Else + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Call(GetSelfNpcID, LVar0) + IfEq(LVar0, 1) + Call(SetNpcPos, NPC_SELF, 240, 220, 130) + Else + Call(SetNpcPos, NPC_SELF, 80, 220, 265) + EndIf + EndIf + Return + End }; EvtScript N(EVS_NpcDefeat_KoopaTroopa_01) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_SET(GF_TRD01_Defeated_KoopaGuard, TRUE) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(PlaySound, SOUND_CHIME_SOLVED_PUZZLE) - EVT_CALL(MakeItemEntity, ITEM_KOOPA_FORTRESS_KEY, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_TOSS_NEVER_VANISH, GF_TRD01_Item_FortressKey) - EVT_EXEC(N(EVS_FocusCamOnLock)) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Set(GF_TRD01_Defeated_KoopaGuard, TRUE) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(PlaySound, SOUND_CHIME_SOLVED_PUZZLE) + Call(MakeItemEntity, ITEM_KOOPA_FORTRESS_KEY, LVar0, LVar1, LVar2, ITEM_SPAWN_MODE_TOSS_NEVER_VANISH, GF_TRD01_Item_FortressKey) + Exec(N(EVS_FocusCamOnLock)) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_KoopaTroopa_01) = { - EVT_IF_EQ(GF_TRD01_Defeated_KoopaGuard, TRUE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_KoopaTroopa_01))) - EVT_RETURN - EVT_END + IfEq(GF_TRD01_Defeated_KoopaGuard, TRUE) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_KoopaTroopa_01))) + Return + End }; NpcData N(NpcData_KoopaTroopa_01) = { diff --git a/src/world/area_trd/trd_02/trd_02_0_header.c b/src/world/area_trd/trd_02/trd_02_0_header.c index 798cb16036d..8fcffd34ef2 100644 --- a/src/world/area_trd/trd_02/trd_02_0_header.c +++ b/src/world/area_trd/trd_02/trd_02_0_header.c @@ -18,8 +18,8 @@ MapSettings N(settings) = { }; EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_FORTRESS, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_KOOPA_FORTRESS, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Return + End }; diff --git a/src/world/area_trd/trd_02/trd_02_1_main.c b/src/world/area_trd/trd_02/trd_02_1_main.c index e890e7a1d27..03a2486b59c 100644 --- a/src/world/area_trd/trd_02/trd_02_1_main.c +++ b/src/world/area_trd/trd_02/trd_02_1_main.c @@ -13,109 +13,109 @@ EvtScript N(EVS_ExitDoors_trd_03_2) = EVT_EXIT_DOUBLE_DOOR(trd_02_ENTRY_3, "trd_ EvtScript N(EVS_ExitWalk_trd_03_4) = EVT_EXIT_WALK(40, trd_02_ENTRY_4, "trd_03", trd_03_ENTRY_4); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_trd_03_4)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilia, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_trd_03_4)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilia, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SUSPEND_GROUP(EVT_GROUP_01) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(trd_02_ENTRY_0) - EVT_SET(LVar2, MODEL_o6) - EVT_SET(LVar3, MODEL_o7) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(trd_02_ENTRY_1) - EVT_SET(LVar2, MODEL_o9) - EVT_SET(LVar3, MODEL_o8) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(trd_02_ENTRY_2) - EVT_SET(LVar2, MODEL_o13) - EVT_SET(LVar3, MODEL_o12) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(trd_02_ENTRY_3) - EVT_SET(LVar2, MODEL_o10) - EVT_SET(LVar3, MODEL_o11) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(trd_02_ENTRY_4) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + SuspendGroup(EVT_GROUP_01) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(trd_02_ENTRY_0) + Set(LVar2, MODEL_o6) + Set(LVar3, MODEL_o7) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(trd_02_ENTRY_1) + Set(LVar2, MODEL_o9) + Set(LVar3, MODEL_o8) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(trd_02_ENTRY_2) + Set(LVar2, MODEL_o13) + Set(LVar3, MODEL_o12) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(trd_02_ENTRY_3) + Set(LVar2, MODEL_o10) + Set(LVar3, MODEL_o11) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(trd_02_ENTRY_4) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + ResumeGroup(EVT_GROUP_01) + Return + End }; EvtScript N(EVS_Scene_LowerStairs) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, 0) - EVT_SUSPEND_GROUP(EVT_GROUP_01) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(30) - EVT_CALL(SetGroupVisibility, MODEL_move_saku, MODEL_GROUP_HIDDEN) - EVT_CALL(PlaySound, SOUND_LOOP_TRD_02_LOWER_STAIRS) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(0.7)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 320, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(0.7)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(0.4)) - EVT_END_THREAD - EVT_WAIT(20) - EVT_THREAD - EVT_LOOP(5) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 150) - EVT_PLAY_EFFECT(EFFECT_DUST, 0, LVar0, LVar1, LVar2, 40) - EVT_CALL(RandInt, 20, LVar0) - EVT_ADD(LVar0, 20) - EVT_WAIT(LVar0) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(7) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_CALL(RandInt, 200, LVar4) - EVT_SUB(LVar4, 100) - EVT_CALL(RandInt, 200, LVar5) - EVT_SUB(LVar5, 100) - EVT_ADD(LVar1, LVar4) - EVT_ADD(LVar2, 200) - EVT_ADD(LVar3, LVar5) - EVT_PLAY_EFFECT(EFFECT_SHATTERING_STONES, 0, LVar1, LVar2, LVar3, 187) - EVT_CALL(RandInt, 30, LVar0) - EVT_ADD(LVar0, 30) - EVT_WAIT(LVar0) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(20) - EVT_CALL(MakeLerp, 187, 0, 300, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_dan, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_k_soku, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_kusari, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(UpdateColliderTransform, COLLIDER_o54) - EVT_CALL(UpdateColliderTransform, COLLIDER_o55) - EVT_CALL(UpdateColliderTransform, COLLIDER_o65) - EVT_CALL(StopSound, SOUND_LOOP_TRD_02_LOWER_STAIRS) - EVT_CALL(PlaySound, SOUND_TRD_02_STAIRS_LOWERED) - EVT_SET(GB_StoryProgress, STORY_CH1_LOWERED_SECOND_STAIRS) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetTimeFreezeMode, 0) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_UNBIND - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, 0) + SuspendGroup(EVT_GROUP_01) + Call(DisablePlayerInput, TRUE) + Wait(30) + Call(SetGroupVisibility, MODEL_move_saku, MODEL_GROUP_HIDDEN) + Call(PlaySound, SOUND_LOOP_TRD_02_LOWER_STAIRS) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(0.7)) + Call(ShakeCam, CAM_DEFAULT, 0, 320, Float(1.0)) + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(0.7)) + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(0.4)) + EndThread + Wait(20) + Thread + Loop(5) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 150) + PlayEffect(EFFECT_DUST, 0, LVar0, LVar1, LVar2, 40) + Call(RandInt, 20, LVar0) + Add(LVar0, 20) + Wait(LVar0) + EndLoop + EndThread + Thread + Loop(7) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + Call(RandInt, 200, LVar4) + Sub(LVar4, 100) + Call(RandInt, 200, LVar5) + Sub(LVar5, 100) + Add(LVar1, LVar4) + Add(LVar2, 200) + Add(LVar3, LVar5) + PlayEffect(EFFECT_SHATTERING_STONES, 0, LVar1, LVar2, LVar3, 187) + Call(RandInt, 30, LVar0) + Add(LVar0, 30) + Wait(LVar0) + EndLoop + EndThread + Wait(20) + Call(MakeLerp, 187, 0, 300, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_dan, 0, LVar0, 0) + Call(TranslateModel, MODEL_k_soku, 0, LVar0, 0) + Call(TranslateModel, MODEL_kusari, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(UpdateColliderTransform, COLLIDER_o54) + Call(UpdateColliderTransform, COLLIDER_o55) + Call(UpdateColliderTransform, COLLIDER_o65) + Call(StopSound, SOUND_LOOP_TRD_02_LOWER_STAIRS) + Call(PlaySound, SOUND_TRD_02_STAIRS_LOWERED) + Set(GB_StoryProgress, STORY_CH1_LOWERED_SECOND_STAIRS) + Call(DisablePlayerInput, FALSE) + Call(SetTimeFreezeMode, 0) + ResumeGroup(EVT_GROUP_01) + Unbind + Return + End }; BombTrigger N(D_8024240C_9A33EC) = { @@ -124,22 +124,22 @@ BombTrigger N(D_8024240C_9A33EC) = { }; EvtScript N(D_8024241C_9A33FC) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SUSPEND_GROUP(EVT_GROUP_01) - EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 0, 17, 11, 1, 10, 30) - EVT_CALL(EnableModel, MODEL_anaaki, TRUE) - EVT_LOOP(10) - EVT_CALL(SetGroupVisibility, MODEL_g14, MODEL_GROUP_VISIBLE) - EVT_WAIT(1) - EVT_CALL(SetGroupVisibility, MODEL_g14, MODEL_GROUP_HIDDEN) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tta, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GF_TRD02_BombedWall, TRUE) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_UNBIND - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + SuspendGroup(EVT_GROUP_01) + PlayEffect(EFFECT_BOMBETTE_BREAKING, 0, 17, 11, 1, 10, 30) + Call(EnableModel, MODEL_anaaki, TRUE) + Loop(10) + Call(SetGroupVisibility, MODEL_g14, MODEL_GROUP_VISIBLE) + Wait(1) + Call(SetGroupVisibility, MODEL_g14, MODEL_GROUP_HIDDEN) + Wait(1) + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tta, COLLIDER_FLAGS_UPPER_MASK) + Set(GF_TRD02_BombedWall, TRUE) + ResumeGroup(EVT_GROUP_01) + Unbind + Return + End }; s32 N(D_8024252C_9A350C)[] = { @@ -148,47 +148,47 @@ s32 N(D_8024252C_9A350C)[] = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_KOOPA_BROS_FORTRESS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_01_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_03_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_IF_EQ(GF_TRD02_UnlockedDoor, FALSE) - EVT_BIND_PADLOCK(EVT_PTR(N(D_80242890_9A3870)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(D_8024252C_9A350C)), 0, 1) - EVT_ELSE - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_01_2)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw2, 1, 0) - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_03_2)), TRIGGER_WALL_PRESS_A, COLLIDER_tte2, 1, 0) - EVT_IF_EQ(GF_TRD02_BombedWall, FALSE) - EVT_CALL(EnableModel, MODEL_anaaki, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(D_8024241C_9A33FC)), TRIGGER_POINT_BOMB, EVT_PTR(N(D_8024240C_9A33EC)), 1, 0) - EVT_ELSE - EVT_CALL(SetGroupVisibility, MODEL_g14, MODEL_GROUP_HIDDEN) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tta, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(AF_TRD02_LowerStairs, FALSE) - EVT_CALL(ParentColliderToModel, COLLIDER_o55, MODEL_dan) - EVT_CALL(ParentColliderToModel, COLLIDER_o54, MODEL_k_soku) - EVT_CALL(ParentColliderToModel, COLLIDER_o65, MODEL_kusari) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_LOWERED_SECOND_STAIRS) - EVT_CALL(TranslateModel, MODEL_dan, 0, 187, 0) - EVT_CALL(TranslateModel, MODEL_k_soku, 0, 187, 0) - EVT_CALL(TranslateModel, MODEL_kusari, 0, 187, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o55) - EVT_CALL(UpdateColliderTransform, COLLIDER_o54) - EVT_CALL(UpdateColliderTransform, COLLIDER_o65) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Scene_LowerStairs)), TRIGGER_AREA_FLAG_SET, AF_TRD02_LowerStairs, 1, 0) - EVT_ELSE - EVT_CALL(UpdateColliderTransform, COLLIDER_o55) - EVT_CALL(UpdateColliderTransform, COLLIDER_o54) - EVT_CALL(UpdateColliderTransform, COLLIDER_o65) - EVT_CALL(SetGroupVisibility, MODEL_move_saku, MODEL_GROUP_HIDDEN) - EVT_END_IF - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_KOOPA_BROS_FORTRESS) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + BindTrigger(Ref(N(EVS_ExitDoors_trd_01_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_trd_03_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + IfEq(GF_TRD02_UnlockedDoor, FALSE) + BindPadlock(Ref(N(D_80242890_9A3870)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), Ref(N(D_8024252C_9A350C)), 0, 1) + Else + BindTrigger(Ref(N(EVS_ExitDoors_trd_01_2)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw2, 1, 0) + EndIf + BindTrigger(Ref(N(EVS_ExitDoors_trd_03_2)), TRIGGER_WALL_PRESS_A, COLLIDER_tte2, 1, 0) + IfEq(GF_TRD02_BombedWall, FALSE) + Call(EnableModel, MODEL_anaaki, FALSE) + BindTrigger(Ref(N(D_8024241C_9A33FC)), TRIGGER_POINT_BOMB, Ref(N(D_8024240C_9A33EC)), 1, 0) + Else + Call(SetGroupVisibility, MODEL_g14, MODEL_GROUP_HIDDEN) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tta, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Exec(N(EVS_SetupMusic)) + Set(AF_TRD02_LowerStairs, FALSE) + Call(ParentColliderToModel, COLLIDER_o55, MODEL_dan) + Call(ParentColliderToModel, COLLIDER_o54, MODEL_k_soku) + Call(ParentColliderToModel, COLLIDER_o65, MODEL_kusari) + IfLt(GB_StoryProgress, STORY_CH1_LOWERED_SECOND_STAIRS) + Call(TranslateModel, MODEL_dan, 0, 187, 0) + Call(TranslateModel, MODEL_k_soku, 0, 187, 0) + Call(TranslateModel, MODEL_kusari, 0, 187, 0) + Call(UpdateColliderTransform, COLLIDER_o55) + Call(UpdateColliderTransform, COLLIDER_o54) + Call(UpdateColliderTransform, COLLIDER_o65) + BindTrigger(Ref(N(EVS_Scene_LowerStairs)), TRIGGER_AREA_FLAG_SET, AF_TRD02_LowerStairs, 1, 0) + Else + Call(UpdateColliderTransform, COLLIDER_o55) + Call(UpdateColliderTransform, COLLIDER_o54) + Call(UpdateColliderTransform, COLLIDER_o65) + Call(SetGroupVisibility, MODEL_move_saku, MODEL_GROUP_HIDDEN) + EndIf + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_trd/trd_02/trd_02_2_entity.c b/src/world/area_trd/trd_02/trd_02_2_entity.c index 4e3cbd79d65..1736248915b 100644 --- a/src/world/area_trd/trd_02/trd_02_2_entity.c +++ b/src/world/area_trd/trd_02/trd_02_2_entity.c @@ -7,49 +7,49 @@ extern EvtScript N(EVS_ExitDoors_trd_01_2); #include "world/common/todo/GetEntityPosition.inc.c" EvtScript N(D_80242890_9A3870) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SUSPEND_GROUP(EVT_GROUP_01) - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_CALL(CloseChoicePopup) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_RETURN - EVT_END_IF - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(CloseChoicePopup) - EVT_SET(GF_TRD02_UnlockedDoor, TRUE) - EVT_CALL(N(GetEntityPosition), MV_Padlock_EntityIndex, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_SET(LVar0, MV_Padlock_EntityIndex) - EVT_CALL(N(RemovePadlock)) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_UNBIND - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + SuspendGroup(EVT_GROUP_01) + Call(ShowKeyChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) + Call(CloseChoicePopup) + ResumeGroup(EVT_GROUP_01) + Return + EndIf + IfEq(LVar0, -1) + Call(CloseChoicePopup) + ResumeGroup(EVT_GROUP_01) + Return + EndIf + Call(RemoveKeyItemAt, LVar1) + Call(CloseChoicePopup) + Set(GF_TRD02_UnlockedDoor, TRUE) + Call(N(GetEntityPosition), MV_Padlock_EntityIndex, LVar0, LVar1, LVar2) + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Set(LVar0, MV_Padlock_EntityIndex) + Call(N(RemovePadlock)) + ResumeGroup(EVT_GROUP_01) + Unbind + Return + End }; EvtScript N(EVS_BindLockTrigger) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_01_2)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_trd_01_2)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw2, 1, 0) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_TRD02_UnlockedDoor, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), -265, 195, -55, 80, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_BindLockTrigger))) - EVT_SET(MV_Padlock_EntityIndex, LVar0) - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH1_LOWERED_SECOND_STAIRS) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueSwitch), 10, 187, 100, 0, MAKE_ENTITY_END) - EVT_CALL(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_TRD02_LowerStairs)) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_TRD02_UnlockedDoor, FALSE) + Call(MakeEntity, Ref(Entity_Padlock), -265, 195, -55, 80, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_BindLockTrigger))) + Set(MV_Padlock_EntityIndex, LVar0) + EndIf + IfLt(GB_StoryProgress, STORY_CH1_LOWERED_SECOND_STAIRS) + Call(MakeEntity, Ref(Entity_BlueSwitch), 10, 187, 100, 0, MAKE_ENTITY_END) + Call(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_TRD02_LowerStairs)) + EndIf + Return + End }; diff --git a/src/world/area_trd/trd_03/trd_03_0_header.c b/src/world/area_trd/trd_03/trd_03_0_header.c index 54523b0907f..7ee25cc6997 100644 --- a/src/world/area_trd/trd_03/trd_03_0_header.c +++ b/src/world/area_trd/trd_03/trd_03_0_header.c @@ -18,22 +18,22 @@ MapSettings N(settings) = { }; EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_FORTRESS, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_KOOPA_FORTRESS, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Return + End }; EvtScript N(EVS_StartKoopaBrosTheme) = { - EVT_CALL(FadeInMusic, 1, SONG_KOOPA_BROS_INTERLUDE, 0, 3000, 0, 127) - EVT_CALL(FadeOutMusic, 0, 3000) - EVT_RETURN - EVT_END + Call(FadeInMusic, 1, SONG_KOOPA_BROS_INTERLUDE, 0, 3000, 0, 127) + Call(FadeOutMusic, 0, 3000) + Return + End }; EvtScript N(EVS_EndKoopaBrosTheme) = { - EVT_CALL(FadeInMusic, 0, SONG_KOOPA_FORTRESS, 0, 3000, 0, 127) - EVT_CALL(FadeOutMusic, 1, 3000) - EVT_RETURN - EVT_END + Call(FadeInMusic, 0, SONG_KOOPA_FORTRESS, 0, 3000, 0, 127) + Call(FadeOutMusic, 1, 3000) + Return + End }; diff --git a/src/world/area_trd/trd_03/trd_03_1_main.c b/src/world/area_trd/trd_03/trd_03_1_main.c index af0da5fd9db..9fc069f3a33 100644 --- a/src/world/area_trd/trd_03/trd_03_1_main.c +++ b/src/world/area_trd/trd_03/trd_03_1_main.c @@ -34,44 +34,44 @@ EvtScript N(EVS_ExitDoors_trd_04_2) = EVT_EXIT_DOUBLE_DOOR(trd_03_ENTRY_3, "trd_ EvtScript N(EVS_ExitDoors_trd_02_4) = EVT_EXIT_WALK(40, trd_03_ENTRY_4, "trd_02", trd_02_ENTRY_4); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_02_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_04_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_02_3)), TRIGGER_WALL_PRESS_A, COLLIDER_ttwo, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_04_2)), TRIGGER_WALL_PRESS_A, COLLIDER_tteo, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_02_4)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_trd_02_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_trd_04_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_trd_02_3)), TRIGGER_WALL_PRESS_A, COLLIDER_ttwo, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_trd_04_2)), TRIGGER_WALL_PRESS_A, COLLIDER_tteo, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_trd_02_4)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(trd_03_ENTRY_0) - EVT_SET(LVar2, MODEL_d1) - EVT_SET(LVar3, MODEL_d2) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(trd_03_ENTRY_1) - EVT_SET(LVar2, MODEL_d3) - EVT_SET(LVar3, MODEL_d4) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(trd_03_ENTRY_2) - EVT_SET(LVar2, MODEL_o33) - EVT_SET(LVar3, MODEL_o34) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(trd_03_ENTRY_3) - EVT_SET(LVar2, MODEL_o31) - EVT_SET(LVar3, MODEL_o32) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(trd_03_ENTRY_4) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(trd_03_ENTRY_0) + Set(LVar2, MODEL_d1) + Set(LVar3, MODEL_d2) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(trd_03_ENTRY_1) + Set(LVar2, MODEL_d3) + Set(LVar3, MODEL_d4) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(trd_03_ENTRY_2) + Set(LVar2, MODEL_o33) + Set(LVar3, MODEL_o34) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(trd_03_ENTRY_3) + Set(LVar2, MODEL_o31) + Set(LVar3, MODEL_o32) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(trd_03_ENTRY_4) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + Return + End }; BombTrigger N(BombPos_MiddleCell) = { @@ -85,157 +85,157 @@ BombTrigger N(BombPos_RightCell) = { }; EvtScript N(EVS_BombWall_MiddleCell) = { - EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 0, 40, 10, 1, 10, 30) - EVT_CALL(EnableModel, MODEL_nk2, TRUE) - EVT_LOOP(10) - EVT_CALL(SetGroupVisibility, MODEL_ana2, MODEL_GROUP_VISIBLE) - EVT_WAIT(1) - EVT_CALL(SetGroupVisibility, MODEL_ana2, MODEL_GROUP_HIDDEN) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt2, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GF_TRD03_BombedCenterCell, TRUE) - EVT_UNBIND - EVT_RETURN - EVT_END + PlayEffect(EFFECT_BOMBETTE_BREAKING, 0, 40, 10, 1, 10, 30) + Call(EnableModel, MODEL_nk2, TRUE) + Loop(10) + Call(SetGroupVisibility, MODEL_ana2, MODEL_GROUP_VISIBLE) + Wait(1) + Call(SetGroupVisibility, MODEL_ana2, MODEL_GROUP_HIDDEN) + Wait(1) + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit2, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt2, COLLIDER_FLAGS_UPPER_MASK) + Set(GF_TRD03_BombedCenterCell, TRUE) + Unbind + Return + End }; EvtScript N(EVS_BombWall_RightCell) = { - EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 0, 43, 10, 1, 10, 30) - EVT_CALL(EnableModel, MODEL_nk3, TRUE) - EVT_LOOP(10) - EVT_CALL(SetGroupVisibility, MODEL_ana3, MODEL_GROUP_VISIBLE) - EVT_WAIT(1) - EVT_CALL(SetGroupVisibility, MODEL_ana3, MODEL_GROUP_HIDDEN) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit3, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GF_TRD03_BombedRightCell, TRUE) - EVT_UNBIND - EVT_RETURN - EVT_END + PlayEffect(EFFECT_BOMBETTE_BREAKING, 0, 43, 10, 1, 10, 30) + Call(EnableModel, MODEL_nk3, TRUE) + Loop(10) + Call(SetGroupVisibility, MODEL_ana3, MODEL_GROUP_VISIBLE) + Wait(1) + Call(SetGroupVisibility, MODEL_ana3, MODEL_GROUP_HIDDEN) + Wait(1) + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit3, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK) + Set(GF_TRD03_BombedRightCell, TRUE) + Unbind + Return + End }; EvtScript N(EVS_HiddenDoor) = { - EVT_SET(LVarB, 0) - EVT_SETF(LVarC, EVT_FLOAT(0.0)) - EVT_SET(LVarD, 0) - EVT_SET(LVarE, 0) - EVT_CALL(CloneModel, MODEL_rou2, CLONED_MODEL(0)) - EVT_CALL(EnableModel, CLONED_MODEL(0), FALSE) - EVT_CALL(ParentColliderToModel, COLLIDER_o84, CLONED_MODEL(0)) - EVT_CALL(CloneModel, MODEL_rou2, CLONED_MODEL(1)) - EVT_CALL(EnableModel, CLONED_MODEL(1), FALSE) - EVT_CALL(ParentColliderToModel, COLLIDER_o85, CLONED_MODEL(1)) - EVT_LABEL(0) - EVT_IF_EQ(LVarD, 0) - EVT_CALL(N(GetHiddenDoorPushDirection), LVar0) - EVT_SWITCH(LVar0) + Set(LVarB, 0) + SetF(LVarC, Float(0.0)) + Set(LVarD, 0) + Set(LVarE, 0) + Call(CloneModel, MODEL_rou2, CLONED_MODEL(0)) + Call(EnableModel, CLONED_MODEL(0), FALSE) + Call(ParentColliderToModel, COLLIDER_o84, CLONED_MODEL(0)) + Call(CloneModel, MODEL_rou2, CLONED_MODEL(1)) + Call(EnableModel, CLONED_MODEL(1), FALSE) + Call(ParentColliderToModel, COLLIDER_o85, CLONED_MODEL(1)) + Label(0) + IfEq(LVarD, 0) + Call(N(GetHiddenDoorPushDirection), LVar0) + Switch(LVar0) // pushing left on COLLIDER_o84 - EVT_CASE_EQ(1) - EVT_CALL(N(GetFrameCounter), LVar1) - EVT_SUB(LVar1, LVarA) - EVT_IF_EQ(LVar1, 1) - EVT_ADD(LVarB, 1) - EVT_SUBF(LVarC, EVT_FLOAT(0.1)) - EVT_ELSE - EVT_SET(LVarB, 0) - EVT_END_IF - EVT_IF_GT(LVarB, 15) - EVT_SET(LVarB, 0) - EVT_SET(LVarD, 8) - EVT_END_IF - EVT_IF_LT(LVarC, -3) - EVT_SET(LVarD, 8) - EVT_END_IF + CaseEq(1) + Call(N(GetFrameCounter), LVar1) + Sub(LVar1, LVarA) + IfEq(LVar1, 1) + Add(LVarB, 1) + SubF(LVarC, Float(0.1)) + Else + Set(LVarB, 0) + EndIf + IfGt(LVarB, 15) + Set(LVarB, 0) + Set(LVarD, 8) + EndIf + IfLt(LVarC, -3) + Set(LVarD, 8) + EndIf // pushing right on COLLIDER_o85 - EVT_CASE_EQ(2) - EVT_SET(LVarD, -8) + CaseEq(2) + Set(LVarD, -8) // not pushing - EVT_CASE_DEFAULT - EVT_SET(LVarB, 0) - EVT_IF_LT(LVarC, 0) - EVT_ADDF(LVarC, EVT_FLOAT(0.2)) - EVT_IF_GT(LVarC, 0) - EVT_SETF(LVarC, EVT_FLOAT(0.0)) - EVT_END_IF - EVT_ELSE - EVT_SUBF(LVarC, EVT_FLOAT(0.2)) - EVT_IF_LT(LVarC, 0) - EVT_SETF(LVarC, EVT_FLOAT(0.0)) - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o84, 0x7FFFFFFF) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o85, 0x7FFFFFFF) - EVT_CALL(TranslateModel, CLONED_MODEL(0), LVarC, 0, 0) - EVT_CALL(TranslateModel, CLONED_MODEL(1), LVarC, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o84) - EVT_CALL(UpdateColliderTransform, COLLIDER_o85) - EVT_ELSE - EVT_SETF(LVarC, EVT_FLOAT(0.0)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o84, 0x7FFFFFFF) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o85, 0x7FFFFFFF) - EVT_IF_GT(LVarD, 0) - EVT_SUB(LVarD, 1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SETF(LVar3, LVarD) - EVT_MULF(LVar3, EVT_FLOAT(1.8)) - EVT_SUBF(LVar0, LVar3) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_ELSE - EVT_ADD(LVarD, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(N(GetFrameCounter), LVarA) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + CaseDefault + Set(LVarB, 0) + IfLt(LVarC, 0) + AddF(LVarC, Float(0.2)) + IfGt(LVarC, 0) + SetF(LVarC, Float(0.0)) + EndIf + Else + SubF(LVarC, Float(0.2)) + IfLt(LVarC, 0) + SetF(LVarC, Float(0.0)) + EndIf + EndIf + EndSwitch + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o84, 0x7FFFFFFF) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o85, 0x7FFFFFFF) + Call(TranslateModel, CLONED_MODEL(0), LVarC, 0, 0) + Call(TranslateModel, CLONED_MODEL(1), LVarC, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o84) + Call(UpdateColliderTransform, COLLIDER_o85) + Else + SetF(LVarC, Float(0.0)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o84, 0x7FFFFFFF) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o85, 0x7FFFFFFF) + IfGt(LVarD, 0) + Sub(LVarD, 1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + SetF(LVar3, LVarD) + MulF(LVar3, Float(1.8)) + SubF(LVar0, LVar3) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Else + Add(LVarD, 1) + EndIf + EndIf + Call(N(GetFrameCounter), LVarA) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_KOOPA_BROS_FORTRESS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_KOOPA_BROS_HID_KEY) - EVT_EXEC(N(EVS_Scene_GreenKoopaBros)) - EVT_ELSE - EVT_EXEC(N(EVS_EnterMap)) - EVT_END_IF - EVT_IF_EQ(GF_TRD02_BombedWall, FALSE) - EVT_CALL(EnableModel, MODEL_nk1, FALSE) - EVT_ELSE - EVT_CALL(SetGroupVisibility, MODEL_ana1, MODEL_GROUP_HIDDEN) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_IF_EQ(GF_TRD03_BombedCenterCell, FALSE) - EVT_CALL(EnableModel, MODEL_nk2, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BombWall_MiddleCell)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_MiddleCell)), 1, 0) - EVT_ELSE - EVT_CALL(SetGroupVisibility, MODEL_ana2, MODEL_GROUP_HIDDEN) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt2, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_IF_EQ(GF_TRD03_BombedRightCell, FALSE) - EVT_CALL(EnableModel, MODEL_nk3, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BombWall_RightCell)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_RightCell)), 1, 0) - EVT_ELSE - EVT_CALL(SetGroupVisibility, MODEL_ana3, MODEL_GROUP_HIDDEN) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit3, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_EXEC(N(EVS_SetupMusic)) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_KOOPA_BROS_HID_KEY) - EVT_CALL(TranslateModel, MODEL_0ri, 0, 100, -1) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_InitializePlatforms)) - EVT_EXEC(N(EVS_HiddenDoor)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_KOOPA_BROS_FORTRESS) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + IfLt(GB_StoryProgress, STORY_CH1_KOOPA_BROS_HID_KEY) + Exec(N(EVS_Scene_GreenKoopaBros)) + Else + Exec(N(EVS_EnterMap)) + EndIf + IfEq(GF_TRD02_BombedWall, FALSE) + Call(EnableModel, MODEL_nk1, FALSE) + Else + Call(SetGroupVisibility, MODEL_ana1, MODEL_GROUP_HIDDEN) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) + EndIf + IfEq(GF_TRD03_BombedCenterCell, FALSE) + Call(EnableModel, MODEL_nk2, FALSE) + BindTrigger(Ref(N(EVS_BombWall_MiddleCell)), TRIGGER_POINT_BOMB, Ref(N(BombPos_MiddleCell)), 1, 0) + Else + Call(SetGroupVisibility, MODEL_ana2, MODEL_GROUP_HIDDEN) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit2, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt2, COLLIDER_FLAGS_UPPER_MASK) + EndIf + IfEq(GF_TRD03_BombedRightCell, FALSE) + Call(EnableModel, MODEL_nk3, FALSE) + BindTrigger(Ref(N(EVS_BombWall_RightCell)), TRIGGER_POINT_BOMB, Ref(N(BombPos_RightCell)), 1, 0) + Else + Call(SetGroupVisibility, MODEL_ana3, MODEL_GROUP_HIDDEN) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilit3, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Exec(N(EVS_SetupMusic)) + IfLt(GB_StoryProgress, STORY_CH1_KOOPA_BROS_HID_KEY) + Call(TranslateModel, MODEL_0ri, 0, 100, -1) + EndIf + ExecWait(N(EVS_InitializePlatforms)) + Exec(N(EVS_HiddenDoor)) + Return + End }; diff --git a/src/world/area_trd/trd_03/trd_03_2_entity.c b/src/world/area_trd/trd_03/trd_03_2_entity.c index 4cfb0554912..316c79c09a9 100644 --- a/src/world/area_trd/trd_03/trd_03_2_entity.c +++ b/src/world/area_trd/trd_03/trd_03_2_entity.c @@ -5,14 +5,14 @@ extern EvtScript N(EVS_TogglePlatforms_LeftSwitch); extern EvtScript N(EVS_TogglePlatforms_RightSwitch); EvtScript N(EVS_MakeEntities) = { - EVT_SET(MV_PlatformsExtended, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_RedSwitch), -315, 120, -100, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_TogglePlatforms_LeftSwitch))) - EVT_CALL(MakeEntity, EVT_PTR(Entity_RedSwitch), 210, 120, -100, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_TogglePlatforms_RightSwitch))) - EVT_CALL(MakeItemEntity, ITEM_KOOPA_FORTRESS_KEY, -580, 0, -60, ITEM_SPAWN_MODE_KEY, GF_TRD03_Item_FortressKeyA) - EVT_CALL(MakeItemEntity, ITEM_KOOPA_FORTRESS_KEY, 470, 0, -60, ITEM_SPAWN_MODE_KEY, GF_TRD03_Item_FortressKeyB) - EVT_CALL(MakeItemEntity, ITEM_POWER_BOUNCE, -50, 0, -60, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_TRD03_Item_PowerBounce) - EVT_RETURN - EVT_END + Set(MV_PlatformsExtended, FALSE) + Call(MakeEntity, Ref(Entity_RedSwitch), -315, 120, -100, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_TogglePlatforms_LeftSwitch))) + Call(MakeEntity, Ref(Entity_RedSwitch), 210, 120, -100, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_TogglePlatforms_RightSwitch))) + Call(MakeItemEntity, ITEM_KOOPA_FORTRESS_KEY, -580, 0, -60, ITEM_SPAWN_MODE_KEY, GF_TRD03_Item_FortressKeyA) + Call(MakeItemEntity, ITEM_KOOPA_FORTRESS_KEY, 470, 0, -60, ITEM_SPAWN_MODE_KEY, GF_TRD03_Item_FortressKeyB) + Call(MakeItemEntity, ITEM_POWER_BOUNCE, -50, 0, -60, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_TRD03_Item_PowerBounce) + Return + End }; diff --git a/src/world/area_trd/trd_03/trd_03_3_npc.c b/src/world/area_trd/trd_03/trd_03_3_npc.c index b073ffba6da..00e4711bf8c 100644 --- a/src/world/area_trd/trd_03/trd_03_3_npc.c +++ b/src/world/area_trd/trd_03/trd_03_3_npc.c @@ -17,167 +17,167 @@ NpcSettings N(NpcSettings_KoopaBros) = { #include "world/common/enemy/Bobomb_Wander.inc.c" EvtScript N(EVS_Scene_GreenKoopaBros) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_EXEC(N(EVS_StartKoopaBrosTheme)) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, -720, 0, 75) - EVT_CALL(SetPlayerPos, -700, 0, 80) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros, ANIM_KoopaBros_Green_IdleCrouch) - EVT_CALL(SetNpcPos, NPC_KoopaBros, -570, 0, -57) - EVT_CALL(InterpNpcYaw, NPC_KoopaBros, 270, 0) - EVT_THREAD - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -607, 0, 80) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 320) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -607, 0, 80) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros, ANIM_KoopaBros_Green_Idle) - EVT_WAIT(15 * DT) - EVT_CALL(InterpNpcYaw, NPC_KoopaBros, 90, 0) - EVT_WAIT(3 * DT) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros, ANIM_KoopaBros_Green_Run) - EVT_CALL(SetNpcSpeed, NPC_KoopaBros, EVT_FLOAT(2.6 / DT)) - EVT_CALL(NpcMoveTo, NPC_KoopaBros, -555, 20, 0) - EVT_CALL(InterpNpcYaw, NPC_KoopaTroopa_01, 270, 0) - EVT_WAIT(15 * DT) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros, ANIM_KoopaBros_Green_Idle) - EVT_WAIT(2 * DT) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros, ANIM_KoopaBros_Green_Talk) - EVT_WAIT(25 * DT) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros, ANIM_KoopaBros_Green_Idle) - EVT_CALL(SetNpcAnimation, NPC_KoopaTroopa_01, ANIM_KoopaTroopa_Salute) - EVT_WAIT(25 * DT) - EVT_CALL(SetNpcAnimation, NPC_KoopaTroopa_01, ANIM_KoopaTroopa_Idle) - EVT_THREAD - EVT_CALL(PlaySoundAtCollider, COLLIDER_ori1, SOUND_LARGE_GATE_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 100, 0, 40 * DT, EASING_QUADRATIC_IN) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_0ri, 0, LVar0, -1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, COLLIDER_ori1, SOUND_LARGE_GATE_CLOSE, SOUND_SPACE_DEFAULT) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0)) - EVT_WAIT(10 * DT) - EVT_END_THREAD - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros, ANIM_KoopaBros_Green_Run) - EVT_CALL(SetNpcSpeed, NPC_KoopaBros, EVT_FLOAT(2.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_KoopaBros, -550, 70, 0) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros, ANIM_KoopaBros_Green_Idle) - EVT_WAIT(15 * DT) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_KoopaBros, ANIM_KoopaBros_Green_Talk, ANIM_KoopaBros_Green_Idle, 5, MSG_CH1_00D3) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_WAIT(10 * DT) - EVT_CALL(PlaySoundAtCollider, COLLIDER_ttw, SOUND_METAL_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 80, 10, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_d1, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_d2, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(EnablePartnerAI) - EVT_CALL(SetPlayerPos, -647, 0, 80) - EVT_EXEC_WAIT(N(EVS_EnterMap)) - EVT_CALL(InterpNpcYaw, NPC_KoopaBros, 270, 5) - EVT_CALL(SetNpcImgFXParams, NPC_KoopaBros, IMGFX_SET_ANIM, IMGFX_ANIM_STARTLE, 2, 1, 0) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros, ANIM_KoopaBros_Green_Shock) - EVT_WAIT(12 * DT) - EVT_CALL(SetNpcImgFXParams, NPC_KoopaBros, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros, ANIM_KoopaBros_Green_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_KoopaBros, ANIM_KoopaBros_Green_Talk, ANIM_KoopaBros_Green_Idle, 0, MSG_CH1_00D4) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros, ANIM_KoopaBros_Green_Walk) - EVT_CALL(InterpNpcYaw, NPC_KoopaBros, 45, 2) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaBros, SOUND_RUN_AWAY_BUILDUP, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros, ANIM_KoopaBros_Green_Run) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBros, EVT_FLOAT(0.8)) - EVT_CALL(GetNpcPos, NPC_KoopaBros, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_KoopaBros, LVar0, LVar1, LVar2, 8 * DT) - EVT_WAIT(8 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaBros, SOUND_RUN_AWAY, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcSpeed, NPC_KoopaBros, EVT_FLOAT(8.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_KoopaBros, -300, 70, 0) - EVT_SET(GB_StoryProgress, STORY_CH1_KOOPA_BROS_HID_KEY) - EVT_CALL(RemoveNpc, NPC_KoopaBros) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_EXEC(N(EVS_EndKoopaBrosTheme)) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Exec(N(EVS_StartKoopaBrosTheme)) + Call(DisablePartnerAI, 0) + Call(SetNpcPos, NPC_PARTNER, -720, 0, 75) + Call(SetPlayerPos, -700, 0, 80) + Call(SetNpcAnimation, NPC_KoopaBros, ANIM_KoopaBros_Green_IdleCrouch) + Call(SetNpcPos, NPC_KoopaBros, -570, 0, -57) + Call(InterpNpcYaw, NPC_KoopaBros, 270, 0) + Thread + Call(UseSettingsFrom, CAM_DEFAULT, -607, 0, 80) + Call(SetCamDistance, CAM_DEFAULT, 320) + Call(SetPanTarget, CAM_DEFAULT, -607, 0, 80) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Wait(10 * DT) + Call(SetNpcAnimation, NPC_KoopaBros, ANIM_KoopaBros_Green_Idle) + Wait(15 * DT) + Call(InterpNpcYaw, NPC_KoopaBros, 90, 0) + Wait(3 * DT) + Call(SetNpcAnimation, NPC_KoopaBros, ANIM_KoopaBros_Green_Run) + Call(SetNpcSpeed, NPC_KoopaBros, Float(2.6 / DT)) + Call(NpcMoveTo, NPC_KoopaBros, -555, 20, 0) + Call(InterpNpcYaw, NPC_KoopaTroopa_01, 270, 0) + Wait(15 * DT) + Call(SetNpcAnimation, NPC_KoopaBros, ANIM_KoopaBros_Green_Idle) + Wait(2 * DT) + Call(SetNpcAnimation, NPC_KoopaBros, ANIM_KoopaBros_Green_Talk) + Wait(25 * DT) + Call(SetNpcAnimation, NPC_KoopaBros, ANIM_KoopaBros_Green_Idle) + Call(SetNpcAnimation, NPC_KoopaTroopa_01, ANIM_KoopaTroopa_Salute) + Wait(25 * DT) + Call(SetNpcAnimation, NPC_KoopaTroopa_01, ANIM_KoopaTroopa_Idle) + Thread + Call(PlaySoundAtCollider, COLLIDER_ori1, SOUND_LARGE_GATE_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 100, 0, 40 * DT, EASING_QUADRATIC_IN) + Label(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_0ri, 0, LVar0, -1) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(PlaySoundAtCollider, COLLIDER_ori1, SOUND_LARGE_GATE_CLOSE, SOUND_SPACE_DEFAULT) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.0)) + Wait(10 * DT) + EndThread + Wait(10 * DT) + Call(SetNpcAnimation, NPC_KoopaBros, ANIM_KoopaBros_Green_Run) + Call(SetNpcSpeed, NPC_KoopaBros, Float(2.0 / DT)) + Call(NpcMoveTo, NPC_KoopaBros, -550, 70, 0) + Call(SetNpcAnimation, NPC_KoopaBros, ANIM_KoopaBros_Green_Idle) + Wait(15 * DT) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_KoopaBros, ANIM_KoopaBros_Green_Talk, ANIM_KoopaBros_Green_Idle, 5, MSG_CH1_00D3) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Wait(10 * DT) + Call(PlaySoundAtCollider, COLLIDER_ttw, SOUND_METAL_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 80, 10, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(RotateModel, MODEL_d1, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_d2, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(EnablePartnerAI) + Call(SetPlayerPos, -647, 0, 80) + ExecWait(N(EVS_EnterMap)) + Call(InterpNpcYaw, NPC_KoopaBros, 270, 5) + Call(SetNpcImgFXParams, NPC_KoopaBros, IMGFX_SET_ANIM, IMGFX_ANIM_STARTLE, 2, 1, 0) + Call(SetNpcAnimation, NPC_KoopaBros, ANIM_KoopaBros_Green_Shock) + Wait(12 * DT) + Call(SetNpcImgFXParams, NPC_KoopaBros, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetNpcAnimation, NPC_KoopaBros, ANIM_KoopaBros_Green_Idle) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_KoopaBros, ANIM_KoopaBros_Green_Talk, ANIM_KoopaBros_Green_Idle, 0, MSG_CH1_00D4) + Call(SetNpcAnimation, NPC_KoopaBros, ANIM_KoopaBros_Green_Walk) + Call(InterpNpcYaw, NPC_KoopaBros, 45, 2) + Call(PlaySoundAtNpc, NPC_KoopaBros, SOUND_RUN_AWAY_BUILDUP, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_KoopaBros, ANIM_KoopaBros_Green_Run) + Call(SetNpcJumpscale, NPC_KoopaBros, Float(0.8)) + Call(GetNpcPos, NPC_KoopaBros, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_KoopaBros, LVar0, LVar1, LVar2, 8 * DT) + Wait(8 * DT) + Call(PlaySoundAtNpc, NPC_KoopaBros, SOUND_RUN_AWAY, SOUND_SPACE_DEFAULT) + Call(SetNpcSpeed, NPC_KoopaBros, Float(8.0 / DT)) + Call(NpcMoveTo, NPC_KoopaBros, -300, 70, 0) + Set(GB_StoryProgress, STORY_CH1_KOOPA_BROS_HID_KEY) + Call(RemoveNpc, NPC_KoopaBros) + Call(DisablePlayerInput, FALSE) + Exec(N(EVS_EndKoopaBrosTheme)) + Return + End }; EvtScript N(EVS_NpcInit_KoopaBros) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH1_KOOPA_BROS_HID_KEY) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH1_KOOPA_BROS_HID_KEY) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcIdle_KoopaTroopa_01) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_KOOPA_BROS_HID_KEY) - EVT_GOTO(0) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaTroopa_Walk) - EVT_WAIT(10) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_KoopaTroopa_Wander))) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + IfLt(GB_StoryProgress, STORY_CH1_KOOPA_BROS_HID_KEY) + Goto(0) + EndIf + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaTroopa_Walk) + Wait(10) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_KoopaTroopa_Wander))) + Return + End }; EvtScript N(EVS_NpcInit_KoopaTroopa_01) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_KoopaTroopa_01))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_KoopaTroopa_01))) + Return + End }; EvtScript N(EVS_NpcIdle_KoopaTroopa_02) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_IF_LT(LVar0, -150) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaTroopa_Salute) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 15) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaTroopa_Walk) - EVT_LABEL(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_IF_LT(LVar0, -100) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaTroopa_Run) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(7.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, 35, -130, 0) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(NpcMoveTo, NPC_SELF, 90, -130, 0) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(NpcMoveTo, NPC_SELF, 105, 10, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaTroopa_Walk) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_KoopaTroopa_Wander))) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + IfLt(LVar0, -150) + Goto(0) + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaTroopa_Salute) + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 15) + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaTroopa_Walk) + Label(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + IfLt(LVar0, -100) + Goto(1) + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaTroopa_Run) + Call(SetNpcSpeed, NPC_SELF, Float(7.0)) + Call(NpcMoveTo, NPC_SELF, 35, -130, 0) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(NpcMoveTo, NPC_SELF, 90, -130, 0) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(NpcMoveTo, NPC_SELF, 105, 10, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaTroopa_Walk) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_KoopaTroopa_Wander))) + Return + End }; EvtScript N(EVS_NpcInit_KoopaTroopa_02) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_KoopaTroopa_02))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_KoopaTroopa_02))) + Return + End }; NpcData N(NpcData_KoopaBros) = { diff --git a/src/world/area_trd/trd_03/trd_03_4_puzzle.c b/src/world/area_trd/trd_03/trd_03_4_puzzle.c index 5ebd702915d..75ac08b5f30 100644 --- a/src/world/area_trd/trd_03/trd_03_4_puzzle.c +++ b/src/world/area_trd/trd_03/trd_03_4_puzzle.c @@ -17,257 +17,257 @@ API_CALLABLE(N(GetLeftRightPoints)) { } EvtScript N(EVS_InitializePlatforms) = { - EVT_CALL(TranslateModel, MODEL_1, 0, 0, FLOOR_RETRACT_LENGTH) - EVT_CALL(TranslateModel, MODEL_2, 0, 0, FLOOR_RETRACT_LENGTH) - EVT_CALL(TranslateModel, MODEL_3, 0, 0, FLOOR_RETRACT_LENGTH) - EVT_CALL(TranslateModel, MODEL_4, 0, 0, FLOOR_RETRACT_LENGTH) - EVT_CALL(TranslateModel, MODEL_5, 0, 0, WALL_RETRACT_LENGTH) - EVT_CALL(TranslateModel, MODEL_6, 0, 0, WALL_RETRACT_LENGTH) - EVT_CALL(TranslateModel, MODEL_7, 0, 0, WALL_RETRACT_LENGTH) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_2, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_3, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_4, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o75, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o74, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o73, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(MV_PlatformsExtended, FALSE) - EVT_RETURN - EVT_END + Call(TranslateModel, MODEL_1, 0, 0, FLOOR_RETRACT_LENGTH) + Call(TranslateModel, MODEL_2, 0, 0, FLOOR_RETRACT_LENGTH) + Call(TranslateModel, MODEL_3, 0, 0, FLOOR_RETRACT_LENGTH) + Call(TranslateModel, MODEL_4, 0, 0, FLOOR_RETRACT_LENGTH) + Call(TranslateModel, MODEL_5, 0, 0, WALL_RETRACT_LENGTH) + Call(TranslateModel, MODEL_6, 0, 0, WALL_RETRACT_LENGTH) + Call(TranslateModel, MODEL_7, 0, 0, WALL_RETRACT_LENGTH) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_2, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_3, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_4, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o75, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o74, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o73, COLLIDER_FLAGS_UPPER_MASK) + Set(MV_PlatformsExtended, FALSE) + Return + End }; EvtScript N(EVS_RetractPlatform) = { - EVT_CALL(MakeLerp, 0, LVar8, 7, EASING_CUBIC_IN) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, LVar9, 0, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVar7, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlaySound, SOUND_TRD_PUZZLE_PLATFORM_THUD) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 2, EVT_FLOAT(0.3)) - EVT_RETURN - EVT_END + Call(MakeLerp, 0, LVar8, 7, EASING_CUBIC_IN) + Label(0) + Call(UpdateLerp) + Call(TranslateModel, LVar9, 0, 0, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVar7, COLLIDER_FLAGS_UPPER_MASK) + Call(PlaySound, SOUND_TRD_PUZZLE_PLATFORM_THUD) + Call(ShakeCam, CAM_DEFAULT, 0, 2, Float(0.3)) + Return + End }; EvtScript N(EVS_ExtendPlatform) = { - EVT_CALL(MakeLerp, LVar8, 0, 7, EASING_CUBIC_IN) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, LVar9, 0, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, LVar7, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlaySound, SOUND_TRD_PUZZLE_PLATFORM_THUD) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 2, EVT_FLOAT(0.3)) - EVT_RETURN - EVT_END + Call(MakeLerp, LVar8, 0, 7, EASING_CUBIC_IN) + Label(0) + Call(UpdateLerp) + Call(TranslateModel, LVar9, 0, 0, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, LVar7, COLLIDER_FLAGS_UPPER_MASK) + Call(PlaySound, SOUND_TRD_PUZZLE_PLATFORM_THUD) + Call(ShakeCam, CAM_DEFAULT, 0, 2, Float(0.3)) + Return + End }; EvtScript N(EVS_TogglePlatforms_LeftSwitch) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_LABEL(123) - EVT_CALL(GetPlayerActionState, LVar0) - EVT_WAIT(1) - EVT_IF_NE(LVar0, ACTION_STATE_IDLE) - EVT_GOTO(123) - EVT_END_IF - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -315, 120, -50) - EVT_CALL(N(GetLeftRightPoints), -315, -100, 60) - EVT_CALL(SetCamPosA, CAM_DEFAULT, LVar0, LVar1) - EVT_CALL(SetCamPosB, CAM_DEFAULT, LVar2, LVar3) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.5 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(15 * DT) - EVT_IF_EQ(MV_PlatformsExtended, FALSE) - EVT_SET(LVar7, COLLIDER_o73) - EVT_SET(LVar8, WALL_RETRACT_LENGTH) - EVT_SET(LVar9, MODEL_7) - EVT_EXEC(N(EVS_ExtendPlatform)) - EVT_WAIT(9 * DT) - EVT_SET(LVar7, COLLIDER_4) - EVT_SET(LVar8, FLOOR_RETRACT_LENGTH) - EVT_SET(LVar9, MODEL_4) - EVT_EXEC(N(EVS_ExtendPlatform)) - EVT_WAIT(9 * DT) - EVT_SET(LVar7, COLLIDER_3) - EVT_SET(LVar8, FLOOR_RETRACT_LENGTH) - EVT_SET(LVar9, MODEL_3) - EVT_EXEC(N(EVS_ExtendPlatform)) - EVT_WAIT(9 * DT) - EVT_SET(LVar7, COLLIDER_o74) - EVT_SET(LVar8, WALL_RETRACT_LENGTH) - EVT_SET(LVar9, MODEL_6) - EVT_EXEC(N(EVS_ExtendPlatform)) - EVT_WAIT(9 * DT) - EVT_SET(LVar7, COLLIDER_2) - EVT_SET(LVar8, FLOOR_RETRACT_LENGTH) - EVT_SET(LVar9, MODEL_2) - EVT_EXEC(N(EVS_ExtendPlatform)) - EVT_WAIT(9 * DT) - EVT_SET(LVar7, COLLIDER_1) - EVT_SET(LVar8, FLOOR_RETRACT_LENGTH) - EVT_SET(LVar9, MODEL_1) - EVT_EXEC(N(EVS_ExtendPlatform)) - EVT_WAIT(9 * DT) - EVT_SET(LVar7, COLLIDER_o75) - EVT_SET(LVar8, WALL_RETRACT_LENGTH) - EVT_SET(LVar9, MODEL_5) - EVT_EXEC(N(EVS_ExtendPlatform)) - EVT_WAIT(9 * DT) - EVT_SET(MV_PlatformsExtended, TRUE) - EVT_ELSE - EVT_SET(LVar7, COLLIDER_o75) - EVT_SET(LVar8, WALL_RETRACT_LENGTH) - EVT_SET(LVar9, MODEL_5) - EVT_EXEC(N(EVS_RetractPlatform)) - EVT_WAIT(9 * DT) - EVT_SET(LVar7, COLLIDER_1) - EVT_SET(LVar8, FLOOR_RETRACT_LENGTH) - EVT_SET(LVar9, MODEL_1) - EVT_EXEC(N(EVS_RetractPlatform)) - EVT_WAIT(9 * DT) - EVT_SET(LVar7, COLLIDER_2) - EVT_SET(LVar8, FLOOR_RETRACT_LENGTH) - EVT_SET(LVar9, MODEL_2) - EVT_EXEC(N(EVS_RetractPlatform)) - EVT_WAIT(9 * DT) - EVT_SET(LVar7, COLLIDER_o74) - EVT_SET(LVar8, WALL_RETRACT_LENGTH) - EVT_SET(LVar9, MODEL_6) - EVT_EXEC(N(EVS_RetractPlatform)) - EVT_WAIT(9 * DT) - EVT_SET(LVar7, COLLIDER_3) - EVT_SET(LVar8, FLOOR_RETRACT_LENGTH) - EVT_SET(LVar9, MODEL_3) - EVT_EXEC(N(EVS_RetractPlatform)) - EVT_WAIT(9 * DT) - EVT_SET(LVar7, COLLIDER_4) - EVT_SET(LVar8, FLOOR_RETRACT_LENGTH) - EVT_SET(LVar9, MODEL_4) - EVT_EXEC(N(EVS_RetractPlatform)) - EVT_WAIT(9 * DT) - EVT_SET(LVar7, COLLIDER_o73) - EVT_SET(LVar8, WALL_RETRACT_LENGTH) - EVT_SET(LVar9, MODEL_7) - EVT_EXEC(N(EVS_RetractPlatform)) - EVT_WAIT(9 * DT) - EVT_SET(MV_PlatformsExtended, FALSE) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.5 / DT)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Label(123) + Call(GetPlayerActionState, LVar0) + Wait(1) + IfNe(LVar0, ACTION_STATE_IDLE) + Goto(123) + EndIf + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, -315, 120, -50) + Call(N(GetLeftRightPoints), -315, -100, 60) + Call(SetCamPosA, CAM_DEFAULT, LVar0, LVar1) + Call(SetCamPosB, CAM_DEFAULT, LVar2, LVar3) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.5 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(15 * DT) + IfEq(MV_PlatformsExtended, FALSE) + Set(LVar7, COLLIDER_o73) + Set(LVar8, WALL_RETRACT_LENGTH) + Set(LVar9, MODEL_7) + Exec(N(EVS_ExtendPlatform)) + Wait(9 * DT) + Set(LVar7, COLLIDER_4) + Set(LVar8, FLOOR_RETRACT_LENGTH) + Set(LVar9, MODEL_4) + Exec(N(EVS_ExtendPlatform)) + Wait(9 * DT) + Set(LVar7, COLLIDER_3) + Set(LVar8, FLOOR_RETRACT_LENGTH) + Set(LVar9, MODEL_3) + Exec(N(EVS_ExtendPlatform)) + Wait(9 * DT) + Set(LVar7, COLLIDER_o74) + Set(LVar8, WALL_RETRACT_LENGTH) + Set(LVar9, MODEL_6) + Exec(N(EVS_ExtendPlatform)) + Wait(9 * DT) + Set(LVar7, COLLIDER_2) + Set(LVar8, FLOOR_RETRACT_LENGTH) + Set(LVar9, MODEL_2) + Exec(N(EVS_ExtendPlatform)) + Wait(9 * DT) + Set(LVar7, COLLIDER_1) + Set(LVar8, FLOOR_RETRACT_LENGTH) + Set(LVar9, MODEL_1) + Exec(N(EVS_ExtendPlatform)) + Wait(9 * DT) + Set(LVar7, COLLIDER_o75) + Set(LVar8, WALL_RETRACT_LENGTH) + Set(LVar9, MODEL_5) + Exec(N(EVS_ExtendPlatform)) + Wait(9 * DT) + Set(MV_PlatformsExtended, TRUE) + Else + Set(LVar7, COLLIDER_o75) + Set(LVar8, WALL_RETRACT_LENGTH) + Set(LVar9, MODEL_5) + Exec(N(EVS_RetractPlatform)) + Wait(9 * DT) + Set(LVar7, COLLIDER_1) + Set(LVar8, FLOOR_RETRACT_LENGTH) + Set(LVar9, MODEL_1) + Exec(N(EVS_RetractPlatform)) + Wait(9 * DT) + Set(LVar7, COLLIDER_2) + Set(LVar8, FLOOR_RETRACT_LENGTH) + Set(LVar9, MODEL_2) + Exec(N(EVS_RetractPlatform)) + Wait(9 * DT) + Set(LVar7, COLLIDER_o74) + Set(LVar8, WALL_RETRACT_LENGTH) + Set(LVar9, MODEL_6) + Exec(N(EVS_RetractPlatform)) + Wait(9 * DT) + Set(LVar7, COLLIDER_3) + Set(LVar8, FLOOR_RETRACT_LENGTH) + Set(LVar9, MODEL_3) + Exec(N(EVS_RetractPlatform)) + Wait(9 * DT) + Set(LVar7, COLLIDER_4) + Set(LVar8, FLOOR_RETRACT_LENGTH) + Set(LVar9, MODEL_4) + Exec(N(EVS_RetractPlatform)) + Wait(9 * DT) + Set(LVar7, COLLIDER_o73) + Set(LVar8, WALL_RETRACT_LENGTH) + Set(LVar9, MODEL_7) + Exec(N(EVS_RetractPlatform)) + Wait(9 * DT) + Set(MV_PlatformsExtended, FALSE) + EndIf + Wait(10) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.5 / DT)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_TogglePlatforms_RightSwitch) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_LABEL(123) - EVT_CALL(GetPlayerActionState, LVar0) - EVT_WAIT(1) - EVT_IF_NE(LVar0, ACTION_STATE_IDLE) - EVT_GOTO(123) - EVT_END_IF - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 210, 120, -50) - EVT_CALL(N(GetLeftRightPoints), 210, -100, -60) - EVT_CALL(SetCamPosA, CAM_DEFAULT, LVar0, LVar1) - EVT_CALL(SetCamPosB, CAM_DEFAULT, LVar2, LVar3) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.5 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(15 * DT) - EVT_IF_EQ(MV_PlatformsExtended, FALSE) - EVT_SET(LVar7, COLLIDER_o75) - EVT_SET(LVar8, WALL_RETRACT_LENGTH) - EVT_SET(LVar9, MODEL_5) - EVT_EXEC(N(EVS_ExtendPlatform)) - EVT_WAIT(9 * DT) - EVT_SET(LVar7, COLLIDER_1) - EVT_SET(LVar8, FLOOR_RETRACT_LENGTH) - EVT_SET(LVar9, MODEL_1) - EVT_EXEC(N(EVS_ExtendPlatform)) - EVT_WAIT(9 * DT) - EVT_SET(LVar7, COLLIDER_2) - EVT_SET(LVar8, FLOOR_RETRACT_LENGTH) - EVT_SET(LVar9, MODEL_2) - EVT_EXEC(N(EVS_ExtendPlatform)) - EVT_WAIT(9 * DT) - EVT_SET(LVar7, COLLIDER_o74) - EVT_SET(LVar8, WALL_RETRACT_LENGTH) - EVT_SET(LVar9, MODEL_6) - EVT_EXEC(N(EVS_ExtendPlatform)) - EVT_WAIT(9 * DT) - EVT_SET(LVar7, COLLIDER_3) - EVT_SET(LVar8, FLOOR_RETRACT_LENGTH) - EVT_SET(LVar9, MODEL_3) - EVT_EXEC(N(EVS_ExtendPlatform)) - EVT_WAIT(9 * DT) - EVT_SET(LVar7, COLLIDER_4) - EVT_SET(LVar8, FLOOR_RETRACT_LENGTH) - EVT_SET(LVar9, MODEL_4) - EVT_EXEC(N(EVS_ExtendPlatform)) - EVT_WAIT(9 * DT) - EVT_SET(LVar7, COLLIDER_o73) - EVT_SET(LVar8, WALL_RETRACT_LENGTH) - EVT_SET(LVar9, MODEL_7) - EVT_EXEC(N(EVS_ExtendPlatform)) - EVT_WAIT(9 * DT) - EVT_SET(MV_PlatformsExtended, TRUE) - EVT_ELSE - EVT_SET(LVar7, COLLIDER_o73) - EVT_SET(LVar8, WALL_RETRACT_LENGTH) - EVT_SET(LVar9, MODEL_7) - EVT_EXEC(N(EVS_RetractPlatform)) - EVT_WAIT(9 * DT) - EVT_SET(LVar7, COLLIDER_4) - EVT_SET(LVar8, FLOOR_RETRACT_LENGTH) - EVT_SET(LVar9, MODEL_4) - EVT_EXEC(N(EVS_RetractPlatform)) - EVT_WAIT(9 * DT) - EVT_SET(LVar7, COLLIDER_3) - EVT_SET(LVar8, FLOOR_RETRACT_LENGTH) - EVT_SET(LVar9, MODEL_3) - EVT_EXEC(N(EVS_RetractPlatform)) - EVT_WAIT(9 * DT) - EVT_SET(LVar7, COLLIDER_o74) - EVT_SET(LVar8, WALL_RETRACT_LENGTH) - EVT_SET(LVar9, MODEL_6) - EVT_EXEC(N(EVS_RetractPlatform)) - EVT_WAIT(9 * DT) - EVT_SET(LVar7, COLLIDER_2) - EVT_SET(LVar8, FLOOR_RETRACT_LENGTH) - EVT_SET(LVar9, MODEL_2) - EVT_EXEC(N(EVS_RetractPlatform)) - EVT_WAIT(9 * DT) - EVT_SET(LVar7, COLLIDER_1) - EVT_SET(LVar8, FLOOR_RETRACT_LENGTH) - EVT_SET(LVar9, MODEL_1) - EVT_EXEC(N(EVS_RetractPlatform)) - EVT_WAIT(9 * DT) - EVT_SET(LVar7, COLLIDER_o75) - EVT_SET(LVar8, WALL_RETRACT_LENGTH) - EVT_SET(LVar9, MODEL_5) - EVT_EXEC(N(EVS_RetractPlatform)) - EVT_WAIT(9 * DT) - EVT_SET(MV_PlatformsExtended, FALSE) - EVT_END_IF - EVT_WAIT(10) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.5 / DT)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Label(123) + Call(GetPlayerActionState, LVar0) + Wait(1) + IfNe(LVar0, ACTION_STATE_IDLE) + Goto(123) + EndIf + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 210, 120, -50) + Call(N(GetLeftRightPoints), 210, -100, -60) + Call(SetCamPosA, CAM_DEFAULT, LVar0, LVar1) + Call(SetCamPosB, CAM_DEFAULT, LVar2, LVar3) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.5 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(15 * DT) + IfEq(MV_PlatformsExtended, FALSE) + Set(LVar7, COLLIDER_o75) + Set(LVar8, WALL_RETRACT_LENGTH) + Set(LVar9, MODEL_5) + Exec(N(EVS_ExtendPlatform)) + Wait(9 * DT) + Set(LVar7, COLLIDER_1) + Set(LVar8, FLOOR_RETRACT_LENGTH) + Set(LVar9, MODEL_1) + Exec(N(EVS_ExtendPlatform)) + Wait(9 * DT) + Set(LVar7, COLLIDER_2) + Set(LVar8, FLOOR_RETRACT_LENGTH) + Set(LVar9, MODEL_2) + Exec(N(EVS_ExtendPlatform)) + Wait(9 * DT) + Set(LVar7, COLLIDER_o74) + Set(LVar8, WALL_RETRACT_LENGTH) + Set(LVar9, MODEL_6) + Exec(N(EVS_ExtendPlatform)) + Wait(9 * DT) + Set(LVar7, COLLIDER_3) + Set(LVar8, FLOOR_RETRACT_LENGTH) + Set(LVar9, MODEL_3) + Exec(N(EVS_ExtendPlatform)) + Wait(9 * DT) + Set(LVar7, COLLIDER_4) + Set(LVar8, FLOOR_RETRACT_LENGTH) + Set(LVar9, MODEL_4) + Exec(N(EVS_ExtendPlatform)) + Wait(9 * DT) + Set(LVar7, COLLIDER_o73) + Set(LVar8, WALL_RETRACT_LENGTH) + Set(LVar9, MODEL_7) + Exec(N(EVS_ExtendPlatform)) + Wait(9 * DT) + Set(MV_PlatformsExtended, TRUE) + Else + Set(LVar7, COLLIDER_o73) + Set(LVar8, WALL_RETRACT_LENGTH) + Set(LVar9, MODEL_7) + Exec(N(EVS_RetractPlatform)) + Wait(9 * DT) + Set(LVar7, COLLIDER_4) + Set(LVar8, FLOOR_RETRACT_LENGTH) + Set(LVar9, MODEL_4) + Exec(N(EVS_RetractPlatform)) + Wait(9 * DT) + Set(LVar7, COLLIDER_3) + Set(LVar8, FLOOR_RETRACT_LENGTH) + Set(LVar9, MODEL_3) + Exec(N(EVS_RetractPlatform)) + Wait(9 * DT) + Set(LVar7, COLLIDER_o74) + Set(LVar8, WALL_RETRACT_LENGTH) + Set(LVar9, MODEL_6) + Exec(N(EVS_RetractPlatform)) + Wait(9 * DT) + Set(LVar7, COLLIDER_2) + Set(LVar8, FLOOR_RETRACT_LENGTH) + Set(LVar9, MODEL_2) + Exec(N(EVS_RetractPlatform)) + Wait(9 * DT) + Set(LVar7, COLLIDER_1) + Set(LVar8, FLOOR_RETRACT_LENGTH) + Set(LVar9, MODEL_1) + Exec(N(EVS_RetractPlatform)) + Wait(9 * DT) + Set(LVar7, COLLIDER_o75) + Set(LVar8, WALL_RETRACT_LENGTH) + Set(LVar9, MODEL_5) + Exec(N(EVS_RetractPlatform)) + Wait(9 * DT) + Set(MV_PlatformsExtended, FALSE) + EndIf + Wait(10) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.5 / DT)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_trd/trd_04/trd_04_0_header.c b/src/world/area_trd/trd_04/trd_04_0_header.c index b695d7f7ac7..91bbfb8f747 100644 --- a/src/world/area_trd/trd_04/trd_04_0_header.c +++ b/src/world/area_trd/trd_04/trd_04_0_header.c @@ -19,8 +19,8 @@ MapSettings N(settings) = { }; EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_FORTRESS, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_KOOPA_FORTRESS, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Return + End }; diff --git a/src/world/area_trd/trd_04/trd_04_1_main.c b/src/world/area_trd/trd_04/trd_04_1_main.c index a47ee9e19e9..724dedf5d98 100644 --- a/src/world/area_trd/trd_04/trd_04_1_main.c +++ b/src/world/area_trd/trd_04/trd_04_1_main.c @@ -34,242 +34,242 @@ s32 N(KeyList)[] = { }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_03_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw2, 1, 0) - EVT_IF_EQ(GF_TRD04_UnlockedLowerDoor, FALSE) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_UnlockLowerRightDoors)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(KeyList)), 0, 1) - EVT_ELSE - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_05_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte2, 1, 0) - EVT_END_IF - EVT_IF_EQ(GF_TRD04_UnlockedUpperDoor, FALSE) - EVT_IF_EQ(GF_TRD04_UnlockedLowerDoor, TRUE) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_UnlockUpperLeftDoors)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(KeyList)), 0, 1) - EVT_END_IF - EVT_ELSE - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_03_3)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw3, 1, 0) - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_05_3)), TRIGGER_WALL_PRESS_A, COLLIDER_tte3, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_trd_07_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_06_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_trd_03_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw2, 1, 0) + IfEq(GF_TRD04_UnlockedLowerDoor, FALSE) + BindPadlock(Ref(N(EVS_UnlockLowerRightDoors)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), Ref(N(KeyList)), 0, 1) + Else + BindTrigger(Ref(N(EVS_ExitDoors_trd_05_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte2, 1, 0) + EndIf + IfEq(GF_TRD04_UnlockedUpperDoor, FALSE) + IfEq(GF_TRD04_UnlockedLowerDoor, TRUE) + BindPadlock(Ref(N(EVS_UnlockUpperLeftDoors)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), Ref(N(KeyList)), 0, 1) + EndIf + Else + BindTrigger(Ref(N(EVS_ExitDoors_trd_03_3)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw3, 1, 0) + EndIf + BindTrigger(Ref(N(EVS_ExitDoors_trd_05_3)), TRIGGER_WALL_PRESS_A, COLLIDER_tte3, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_trd_07_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_trd_06_1)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SUSPEND_GROUP(EVT_GROUP_01) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(trd_04_ENTRY_0) - EVT_SET(LVar2, MODEL_o6) - EVT_SET(LVar3, MODEL_o7) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(trd_04_ENTRY_1) - EVT_SET(LVar2, MODEL_o9) - EVT_SET(LVar3, MODEL_o8) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(trd_04_ENTRY_2) - EVT_SET(LVar2, MODEL_o13) - EVT_SET(LVar3, MODEL_o12) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(trd_04_ENTRY_3) - EVT_SET(LVar2, MODEL_o10) - EVT_SET(LVar3, MODEL_o11) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(trd_04_ENTRY_4) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(trd_04_ENTRY_5) - EVT_SET(LVar2, MODEL_o29) - EVT_SET(LVar3, MODEL_o28) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + SetGroup(EVT_GROUP_00) + SuspendGroup(EVT_GROUP_01) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(trd_04_ENTRY_0) + Set(LVar2, MODEL_o6) + Set(LVar3, MODEL_o7) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(trd_04_ENTRY_1) + Set(LVar2, MODEL_o9) + Set(LVar3, MODEL_o8) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(trd_04_ENTRY_2) + Set(LVar2, MODEL_o13) + Set(LVar3, MODEL_o12) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(trd_04_ENTRY_3) + Set(LVar2, MODEL_o10) + Set(LVar3, MODEL_o11) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(trd_04_ENTRY_4) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseEq(trd_04_ENTRY_5) + Set(LVar2, MODEL_o29) + Set(LVar3, MODEL_o28) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + ResumeGroup(EVT_GROUP_01) + Return + End }; EvtScript N(EVS_Scene_LowerStairs) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SUSPEND_GROUP(EVT_GROUP_01) - EVT_SET(GB_StoryProgress, STORY_CH1_LOWERED_FIRST_STAIRS) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(30 * DT) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10 * DT, EVT_FLOAT(0.7)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 320 * DT, EVT_FLOAT(1.0)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10 * DT, EVT_FLOAT(0.7)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10 * DT, EVT_FLOAT(0.4)) - EVT_END_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(EnableModel, MODEL_o6, FALSE) - EVT_CALL(EnableModel, MODEL_o7, FALSE) - EVT_CALL(EnableModel, MODEL_bero2, FALSE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -50, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -50, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(540.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 15, -6) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -30, -60) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetPlayerPos, -185, 0, -36) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, -163, 0, -12) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_CALL(PlaySound, SOUND_LOOP_TRD_04_LOWER_STAIRS) - EVT_WAIT(20 * DT) - EVT_THREAD - EVT_LOOP(5) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 150) - EVT_PLAY_EFFECT(EFFECT_DUST, 0, LVar0, LVar1, LVar2, 40) - EVT_CALL(RandInt, 20 * DT, LVar0) - EVT_ADD(LVar0, 20 * DT) - EVT_WAIT(LVar0) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(7) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_CALL(RandInt, 200, LVar4) - EVT_SUB(LVar4, 100) - EVT_CALL(RandInt, 100, LVar5) - EVT_SUB(LVar5, 100) - EVT_ADD(LVar1, LVar4) - EVT_ADD(LVar2, 200) - EVT_ADD(LVar3, LVar5) - EVT_PLAY_EFFECT(EFFECT_SHATTERING_STONES, 0, LVar1, LVar2, LVar3) - EVT_CALL(RandInt, 30 * DT, LVar0) - EVT_ADD(LVar0, 30 * DT) - EVT_WAIT(LVar0) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_WAIT(10 * DT) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_WAIT(15 * DT) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_WAIT(12 * DT) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_WAIT(18 * DT) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_WAIT(29 * DT) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_WAIT(13 * DT) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_WAIT(15 * DT) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_WAIT(17 * DT) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_WAIT(18 * DT) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_WAIT(17 * DT) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_END_THREAD - EVT_WAIT(20 * DT) - EVT_CALL(MakeLerp, 187, 0, 300 * DT, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_k_sokumen, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_k_dan, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_k_kusari, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(UpdateColliderTransform, COLLIDER_o86) - EVT_CALL(UpdateColliderTransform, COLLIDER_o87) - EVT_CALL(StopSound, SOUND_LOOP_TRD_04_LOWER_STAIRS) - EVT_CALL(PlaySound, SOUND_TRD_04_STAIRS_LOWERED) - EVT_WAIT(50 * DT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, 0, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -169, 130) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 18, -6) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(EnableModel, MODEL_o6, TRUE) - EVT_CALL(EnableModel, MODEL_o7, TRUE) - EVT_CALL(EnableModel, MODEL_bero2, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_UNBIND - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + SuspendGroup(EVT_GROUP_01) + Set(GB_StoryProgress, STORY_CH1_LOWERED_FIRST_STAIRS) + Call(DisablePlayerInput, TRUE) + Wait(30 * DT) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 10 * DT, Float(0.7)) + Call(ShakeCam, CAM_DEFAULT, 0, 320 * DT, Float(1.0)) + Call(ShakeCam, CAM_DEFAULT, 0, 10 * DT, Float(0.7)) + Call(ShakeCam, CAM_DEFAULT, 0, 10 * DT, Float(0.4)) + EndThread + Wait(30 * DT) + Call(EnableModel, MODEL_o6, FALSE) + Call(EnableModel, MODEL_o7, FALSE) + Call(EnableModel, MODEL_bero2, FALSE) + Call(UseSettingsFrom, CAM_DEFAULT, -50, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, -50, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, Float(540.0)) + Call(SetCamPitch, CAM_DEFAULT, 15, -6) + Call(SetCamPosA, CAM_DEFAULT, -30, -60) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetPlayerPos, -185, 0, -36) + Call(InterpPlayerYaw, 90, 0) + Call(SetNpcPos, NPC_PARTNER, -163, 0, -12) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + Call(PlaySound, SOUND_LOOP_TRD_04_LOWER_STAIRS) + Wait(20 * DT) + Thread + Loop(5) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 150) + PlayEffect(EFFECT_DUST, 0, LVar0, LVar1, LVar2, 40) + Call(RandInt, 20 * DT, LVar0) + Add(LVar0, 20 * DT) + Wait(LVar0) + EndLoop + EndThread + Thread + Loop(7) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + Call(RandInt, 200, LVar4) + Sub(LVar4, 100) + Call(RandInt, 100, LVar5) + Sub(LVar5, 100) + Add(LVar1, LVar4) + Add(LVar2, 200) + Add(LVar3, LVar5) + PlayEffect(EFFECT_SHATTERING_STONES, 0, LVar1, LVar2, LVar3) + Call(RandInt, 30 * DT, LVar0) + Add(LVar0, 30 * DT) + Wait(LVar0) + EndLoop + EndThread + Thread + Call(InterpPlayerYaw, 270, 0) + Wait(10 * DT) + Call(InterpPlayerYaw, 90, 0) + Wait(15 * DT) + Call(InterpPlayerYaw, 270, 0) + Wait(12 * DT) + Call(InterpPlayerYaw, 90, 0) + Wait(18 * DT) + Call(InterpPlayerYaw, 270, 0) + Wait(29 * DT) + Call(InterpPlayerYaw, 90, 0) + EndThread + Thread + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + Wait(13 * DT) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + Wait(15 * DT) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + Wait(17 * DT) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + Wait(18 * DT) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + Wait(17 * DT) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + EndThread + Wait(20 * DT) + Call(MakeLerp, 187, 0, 300 * DT, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_k_sokumen, 0, LVar0, 0) + Call(TranslateModel, MODEL_k_dan, 0, LVar0, 0) + Call(TranslateModel, MODEL_k_kusari, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(UpdateColliderTransform, COLLIDER_o86) + Call(UpdateColliderTransform, COLLIDER_o87) + Call(StopSound, SOUND_LOOP_TRD_04_LOWER_STAIRS) + Call(PlaySound, SOUND_TRD_04_STAIRS_LOWERED) + Wait(50 * DT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, 0, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(SetCamPosA, CAM_DEFAULT, -169, 130) + Call(SetCamPitch, CAM_DEFAULT, 18, -6) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(2) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(EnableModel, MODEL_o6, TRUE) + Call(EnableModel, MODEL_o7, TRUE) + Call(EnableModel, MODEL_bero2, TRUE) + Call(DisablePlayerInput, FALSE) + ResumeGroup(EVT_GROUP_01) + Unbind + Return + End }; EvtScript N(EVS_TexPan_Water) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, MODEL_suimen, TEX_PANNER_1) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LABEL(10) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, 0) - EVT_ADD(LVar0, 100) - EVT_SUB(LVar1, 100) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, MODEL_suimen, TEX_PANNER_1) + Set(LVar0, 0) + Set(LVar1, 0) + Label(10) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, 0) + Add(LVar0, 100) + Sub(LVar1, 100) + Wait(1) + Goto(10) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_KOOPA_BROS_FORTRESS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(SetRenderMode, MODEL_suimen, RENDER_MODE_SURFACE_XLU_LAYER2) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_LOWERED_FIRST_STAIRS) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(NpcGroupBefore))) - EVT_ELSE - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(NpcGroupAfter))) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_SET(AF_TRD04_LowerStairs, FALSE) - EVT_CALL(ParentColliderToModel, COLLIDER_o86, MODEL_k_dan) - EVT_CALL(ParentColliderToModel, COLLIDER_o87, MODEL_k_dan) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_LOWERED_FIRST_STAIRS) - EVT_CALL(TranslateModel, MODEL_k_sokumen, 0, 187, 0) - EVT_CALL(TranslateModel, MODEL_k_dan, 0, 187, 0) - EVT_CALL(TranslateModel, MODEL_k_kusari, 0, 187, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o86) - EVT_CALL(UpdateColliderTransform, COLLIDER_o87) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Scene_LowerStairs)), TRIGGER_AREA_FLAG_SET, AF_TRD04_LowerStairs, 1, 0) - EVT_END_IF - EVT_EXEC(N(EVS_TexPan_Water)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ttw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_o34, FALSE) - EVT_CALL(EnableModel, MODEL_dai, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_dai, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_CALL(EnableTexPanning, MODEL_suimen, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_KOOPA_BROS_FORTRESS) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Call(SetRenderMode, MODEL_suimen, RENDER_MODE_SURFACE_XLU_LAYER2) + IfLt(GB_StoryProgress, STORY_CH1_LOWERED_FIRST_STAIRS) + Call(MakeNpcs, TRUE, Ref(N(NpcGroupBefore))) + Else + Call(MakeNpcs, TRUE, Ref(N(NpcGroupAfter))) + EndIf + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Set(AF_TRD04_LowerStairs, FALSE) + Call(ParentColliderToModel, COLLIDER_o86, MODEL_k_dan) + Call(ParentColliderToModel, COLLIDER_o87, MODEL_k_dan) + IfLt(GB_StoryProgress, STORY_CH1_LOWERED_FIRST_STAIRS) + Call(TranslateModel, MODEL_k_sokumen, 0, 187, 0) + Call(TranslateModel, MODEL_k_dan, 0, 187, 0) + Call(TranslateModel, MODEL_k_kusari, 0, 187, 0) + Call(UpdateColliderTransform, COLLIDER_o86) + Call(UpdateColliderTransform, COLLIDER_o87) + BindTrigger(Ref(N(EVS_Scene_LowerStairs)), TRIGGER_AREA_FLAG_SET, AF_TRD04_LowerStairs, 1, 0) + EndIf + Exec(N(EVS_TexPan_Water)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ttw, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_o34, FALSE) + Call(EnableModel, MODEL_dai, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_dai, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_EnterMap)) + Wait(1) + Call(EnableTexPanning, MODEL_suimen, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 0, 90, -60, -70) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; diff --git a/src/world/area_trd/trd_04/trd_04_2_entity.c b/src/world/area_trd/trd_04/trd_04_2_entity.c index f8577fbbba8..caf7d8e34f4 100644 --- a/src/world/area_trd/trd_04/trd_04_2_entity.c +++ b/src/world/area_trd/trd_04/trd_04_2_entity.c @@ -33,128 +33,128 @@ s32 N(missing_80244D70_4D70)[] = { }; EvtScript N(EVS_UnlockUpperLeftDoors) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SUSPEND_GROUP(EVT_GROUP_01) - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_CALL(CloseChoicePopup) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_RETURN - EVT_END_IF - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(CloseChoicePopup) - EVT_SET(GF_TRD04_UnlockedUpperDoor, TRUE) - EVT_CALL(N(GetEntityPosition), MV_Unk_00, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_SET(LVar0, MV_Unk_00) - EVT_CALL(N(RemovePadlock)) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_UNBIND - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + SuspendGroup(EVT_GROUP_01) + Call(ShowKeyChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) + Call(CloseChoicePopup) + ResumeGroup(EVT_GROUP_01) + Return + EndIf + IfEq(LVar0, -1) + Call(CloseChoicePopup) + ResumeGroup(EVT_GROUP_01) + Return + EndIf + Call(RemoveKeyItemAt, LVar1) + Call(CloseChoicePopup) + Set(GF_TRD04_UnlockedUpperDoor, TRUE) + Call(N(GetEntityPosition), MV_Unk_00, LVar0, LVar1, LVar2) + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Set(LVar0, MV_Unk_00) + Call(N(RemovePadlock)) + ResumeGroup(EVT_GROUP_01) + Unbind + Return + End }; EvtScript N(EVS_UnlockLowerRightDoors) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SUSPEND_GROUP(EVT_GROUP_01) - EVT_CALL(ShowKeyChoicePopup) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) - EVT_CALL(CloseChoicePopup) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(LVar0, -1) - EVT_CALL(CloseChoicePopup) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_RETURN - EVT_END_IF - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(CloseChoicePopup) - EVT_SET(GF_TRD04_UnlockedLowerDoor, TRUE) - EVT_CALL(N(GetEntityPosition), MV_Unk_01, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_SET(LVar0, MV_Unk_01) - EVT_CALL(N(RemovePadlock)) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_UNBIND - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + SuspendGroup(EVT_GROUP_01) + Call(ShowKeyChoicePopup) + IfEq(LVar0, 0) + Call(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40) + Call(CloseChoicePopup) + ResumeGroup(EVT_GROUP_01) + Return + EndIf + IfEq(LVar0, -1) + Call(CloseChoicePopup) + ResumeGroup(EVT_GROUP_01) + Return + EndIf + Call(RemoveKeyItemAt, LVar1) + Call(CloseChoicePopup) + Set(GF_TRD04_UnlockedLowerDoor, TRUE) + Call(N(GetEntityPosition), MV_Unk_01, LVar0, LVar1, LVar2) + Call(PlaySoundAt, SOUND_USE_KEY, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Set(LVar0, MV_Unk_01) + Call(N(RemovePadlock)) + ResumeGroup(EVT_GROUP_01) + Unbind + Return + End }; EvtScript N(EVS_Padlock_LowerDoors) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_05_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_trd_05_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte2, 1, 0) + Return + End }; EvtScript N(EVS_Padlock_UpperDoors) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_03_3)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw3, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_trd_03_3)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw3, 1, 0) + Return + End }; EvtScript N(EVS_DropSwitch) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(40 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -188, 0, -43) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -188, 0, -43) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(510.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(3 * DT) - EVT_CALL(PlaySoundAt, SOUND_FALL_QUICK, SOUND_SPACE_DEFAULT, -180, 175, -35) - EVT_CALL(MakeLerp, 175, 0, 20 * DT, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetEntityPosition), MV_EntityID_Switch, -180, LVar0, -35) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(PlaySoundAt, SOUND_OBJECT_LAND, SOUND_SPACE_DEFAULT, -180, 0, -35) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0)) - EVT_WAIT(20 * DT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, 0, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0 / DT)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(2) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Wait(40 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, -188, 0, -43) + Call(SetPanTarget, CAM_DEFAULT, -188, 0, -43) + Call(SetCamDistance, CAM_DEFAULT, Float(510.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(3 * DT) + Call(PlaySoundAt, SOUND_FALL_QUICK, SOUND_SPACE_DEFAULT, -180, 175, -35) + Call(MakeLerp, 175, 0, 20 * DT, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(N(SetEntityPosition), MV_EntityID_Switch, -180, LVar0, -35) + IfEq(LVar1, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(PlaySoundAt, SOUND_OBJECT_LAND, SOUND_SPACE_DEFAULT, -180, 0, -35) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.0)) + Wait(20 * DT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, 0, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0 / DT)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(2) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_TRD04_UnlockedLowerDoor, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), 265, 8, 90, -80, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_Padlock_LowerDoors))) - EVT_SET(MV_Unk_01, LVar0) - EVT_END_IF - EVT_IF_EQ(GF_TRD04_UnlockedUpperDoor, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), -265, 195, -55, 80, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_Padlock_UpperDoors))) - EVT_SET(MV_Unk_00, LVar0) - EVT_END_IF - EVT_IF_LE(GB_StoryProgress, STORY_CH1_DEFEATED_BASEMENT_GUARD) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BlueSwitch), NPC_DISPOSE_LOCATION, 0, MAKE_ENTITY_END) - EVT_CALL(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_TRD04_LowerStairs)) - EVT_SET(MV_EntityID_Switch, LVar0) - EVT_IF_EQ(GB_StoryProgress, STORY_CH1_DEFEATED_BASEMENT_GUARD) - EVT_CALL(N(SetEntityPosition), MV_EntityID_Switch, -180, 0, -35) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_TRD04_UnlockedLowerDoor, FALSE) + Call(MakeEntity, Ref(Entity_Padlock), 265, 8, 90, -80, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_Padlock_LowerDoors))) + Set(MV_Unk_01, LVar0) + EndIf + IfEq(GF_TRD04_UnlockedUpperDoor, FALSE) + Call(MakeEntity, Ref(Entity_Padlock), -265, 195, -55, 80, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_Padlock_UpperDoors))) + Set(MV_Unk_00, LVar0) + EndIf + IfLe(GB_StoryProgress, STORY_CH1_DEFEATED_BASEMENT_GUARD) + Call(MakeEntity, Ref(Entity_BlueSwitch), NPC_DISPOSE_LOCATION, 0, MAKE_ENTITY_END) + Call(AssignSwitchFlag, EVT_INDEX_OF_AREA_FLAG(AF_TRD04_LowerStairs)) + Set(MV_EntityID_Switch, LVar0) + IfEq(GB_StoryProgress, STORY_CH1_DEFEATED_BASEMENT_GUARD) + Call(N(SetEntityPosition), MV_EntityID_Switch, -180, 0, -35) + EndIf + EndIf + Return + End }; diff --git a/src/world/area_trd/trd_04/trd_04_3_npc.c b/src/world/area_trd/trd_04/trd_04_3_npc.c index b554c61af0e..41d5d8e9134 100644 --- a/src/world/area_trd/trd_04/trd_04_3_npc.c +++ b/src/world/area_trd/trd_04/trd_04_3_npc.c @@ -7,27 +7,27 @@ extern EvtScript N(EVS_DropSwitch); #include "world/common/enemy/Paratroopa.inc.c" EvtScript N(EVS_NpcDefeat_KoopaTroopa) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_SET(GB_StoryProgress, STORY_CH1_DEFEATED_BASEMENT_GUARD) - EVT_THREAD - EVT_CALL(DoNpcDefeat) - EVT_END_THREAD - EVT_EXEC_WAIT(N(EVS_DropSwitch)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Set(GB_StoryProgress, STORY_CH1_DEFEATED_BASEMENT_GUARD) + Thread + Call(DoNpcDefeat) + EndThread + ExecWait(N(EVS_DropSwitch)) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_KoopaTroopa) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH1_DEFEATED_BASEMENT_GUARD) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_KoopaTroopa))) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH1_DEFEATED_BASEMENT_GUARD) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_KoopaTroopa))) + Return + End }; NpcData N(NpcData_KoopaTroopa_Wander) = { diff --git a/src/world/area_trd/trd_05/trd_05_0_header.c b/src/world/area_trd/trd_05/trd_05_0_header.c index a85a34150d2..dd8c74ead3c 100644 --- a/src/world/area_trd/trd_05/trd_05_0_header.c +++ b/src/world/area_trd/trd_05/trd_05_0_header.c @@ -17,22 +17,22 @@ MapSettings N(settings) = { }; EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_FORTRESS, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_KOOPA_FORTRESS, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Return + End }; EvtScript N(EVS_StartKoopaBrosTheme) = { - EVT_CALL(FadeInMusic, 1, SONG_KOOPA_BROS_INTERLUDE, 0, 3000, 0, 127) - EVT_CALL(FadeOutMusic, 0, 3000) - EVT_RETURN - EVT_END + Call(FadeInMusic, 1, SONG_KOOPA_BROS_INTERLUDE, 0, 3000, 0, 127) + Call(FadeOutMusic, 0, 3000) + Return + End }; EvtScript N(EVS_EndKoopaBrosTheme) = { - EVT_CALL(FadeInMusic, 0, SONG_KOOPA_FORTRESS, 0, 3000, 0, 127) - EVT_CALL(FadeOutMusic, 1, 3000) - EVT_RETURN - EVT_END + Call(FadeInMusic, 0, SONG_KOOPA_FORTRESS, 0, 3000, 0, 127) + Call(FadeOutMusic, 1, 3000) + Return + End }; diff --git a/src/world/area_trd/trd_05/trd_05_1_main.c b/src/world/area_trd/trd_05/trd_05_1_main.c index 2d9c7b50c1b..d4913e0a92f 100644 --- a/src/world/area_trd/trd_05/trd_05_1_main.c +++ b/src/world/area_trd/trd_05/trd_05_1_main.c @@ -17,41 +17,41 @@ EvtScript N(EVS_ExitWalk_trd_00_3) = EVT_EXIT_WALK(60, trd_05_ENTRY_2, "trd_00", EvtScript N(EVS_ExitDoors_trd_04_3) = EVT_EXIT_DOUBLE_DOOR(trd_05_ENTRY_3, "trd_04", trd_04_ENTRY_3, COLLIDER_ttw2, MODEL_doa7, MODEL_doa8); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_04_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_trd_00_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_00_2)), TRIGGER_WALL_PRESS_A, COLLIDER_ttse, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_04_3)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_trd_04_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_trd_00_3)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_trd_00_2)), TRIGGER_WALL_PRESS_A, COLLIDER_ttse, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_trd_04_3)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw2, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SUSPEND_GROUP(EVT_GROUP_01) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(trd_05_ENTRY_0) - EVT_SET(LVar2, MODEL_doa2) - EVT_SET(LVar3, MODEL_doa1) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(trd_05_ENTRY_1) - EVT_SET(LVar2, MODEL_doa4) - EVT_SET(LVar3, MODEL_doa6) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(trd_05_ENTRY_2) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(trd_05_ENTRY_3) - EVT_SET(LVar2, MODEL_doa7) - EVT_SET(LVar3, MODEL_doa8) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + SuspendGroup(EVT_GROUP_01) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(trd_05_ENTRY_0) + Set(LVar2, MODEL_doa2) + Set(LVar3, MODEL_doa1) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(trd_05_ENTRY_1) + Set(LVar2, MODEL_doa4) + Set(LVar3, MODEL_doa6) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + CaseEq(trd_05_ENTRY_2) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseEq(trd_05_ENTRY_3) + Set(LVar2, MODEL_doa7) + Set(LVar3, MODEL_doa8) + ExecWait(EnterDoubleDoor) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + ResumeGroup(EVT_GROUP_01) + Return + End }; BombTrigger N(BombPos_Wall) = { @@ -60,67 +60,67 @@ BombTrigger N(BombPos_Wall) = { }; EvtScript N(EVS_BombWall) = { - EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 0, 29, 0, 1, 10, 30) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SUSPEND_GROUP(EVT_GROUP_01) - EVT_CALL(SetGroupVisibility, MODEL_ana2, MODEL_GROUP_VISIBLE) - EVT_LOOP(10) - EVT_CALL(SetGroupVisibility, MODEL_ana3, MODEL_GROUP_VISIBLE) - EVT_WAIT(1) - EVT_CALL(SetGroupVisibility, MODEL_ana3, MODEL_GROUP_HIDDEN) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GF_TRD05_BombedWall, TRUE) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_UNBIND - EVT_RETURN - EVT_END + PlayEffect(EFFECT_BOMBETTE_BREAKING, 0, 29, 0, 1, 10, 30) + SetGroup(EVT_GROUP_00) + SuspendGroup(EVT_GROUP_01) + Call(SetGroupVisibility, MODEL_ana2, MODEL_GROUP_VISIBLE) + Loop(10) + Call(SetGroupVisibility, MODEL_ana3, MODEL_GROUP_VISIBLE) + Wait(1) + Call(SetGroupVisibility, MODEL_ana3, MODEL_GROUP_HIDDEN) + Wait(1) + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) + Set(GF_TRD05_BombedWall, TRUE) + ResumeGroup(EVT_GROUP_01) + Unbind + Return + End }; EvtScript N(EVS_TexPan_Water) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, MODEL_suimen, TEX_PANNER_1) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LABEL(10) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, 0) - EVT_ADD(LVar0, 100) - EVT_SUB(LVar1, 100) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, MODEL_suimen, TEX_PANNER_1) + Set(LVar0, 0) + Set(LVar1, 0) + Label(10) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, 0) + Add(LVar0, 100) + Sub(LVar1, 100) + Wait(1) + Goto(10) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_KOOPA_BROS_FORTRESS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_IF_EQ(GF_TRD05_BombedWall, FALSE) - EVT_CALL(SetGroupVisibility, MODEL_ana2, MODEL_GROUP_HIDDEN) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BombWall)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Wall)), 1, 0) - EVT_ELSE - EVT_CALL(SetGroupVisibility, MODEL_ana3, MODEL_GROUP_HIDDEN) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_TexPan_Water)) - EVT_CALL(EnableModel, MODEL_o95, FALSE) - EVT_CALL(EnableModel, MODEL_o96, FALSE) - EVT_CALL(SetGroupVisibility, MODEL_kesu, MODEL_GROUP_HIDDEN) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o103, COLLIDER_FLAGS_UPPER_MASK) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_KOOPA_BROS_SET_TRAP) - EVT_WAIT(10) - EVT_CALL(N(SetMapChangeFadeRate)) - EVT_EXEC(N(EVS_KoopaBros_SetTrap)) - EVT_ELSE - EVT_EXEC(N(EVS_EnterMap)) - EVT_END_IF - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_KOOPA_BROS_FORTRESS) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + IfEq(GF_TRD05_BombedWall, FALSE) + Call(SetGroupVisibility, MODEL_ana2, MODEL_GROUP_HIDDEN) + BindTrigger(Ref(N(EVS_BombWall)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Wall)), 1, 0) + Else + Call(SetGroupVisibility, MODEL_ana3, MODEL_GROUP_HIDDEN) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_TexPan_Water)) + Call(EnableModel, MODEL_o95, FALSE) + Call(EnableModel, MODEL_o96, FALSE) + Call(SetGroupVisibility, MODEL_kesu, MODEL_GROUP_HIDDEN) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o103, COLLIDER_FLAGS_UPPER_MASK) + IfLt(GB_StoryProgress, STORY_CH1_KOOPA_BROS_SET_TRAP) + Wait(10) + Call(N(SetMapChangeFadeRate)) + Exec(N(EVS_KoopaBros_SetTrap)) + Else + Exec(N(EVS_EnterMap)) + EndIf + Wait(1) + Return + End }; diff --git a/src/world/area_trd/trd_05/trd_05_2_entity.c b/src/world/area_trd/trd_05/trd_05_2_entity.c index 0e2846f54fc..6f097fd9819 100644 --- a/src/world/area_trd/trd_05/trd_05_2_entity.c +++ b/src/world/area_trd/trd_05/trd_05_2_entity.c @@ -4,10 +4,10 @@ extern EvtScript N(EVS_OnHitTrapTrigger); EvtScript N(EVS_MakeEntities) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH1_MARIO_ACTIVATED_TRAP) - EVT_CALL(MakeEntity, EVT_PTR(Entity_TriggerBlock), -70, 300, -15, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnHitTrapTrigger))) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH1_MARIO_ACTIVATED_TRAP) + Call(MakeEntity, Ref(Entity_TriggerBlock), -70, 300, -15, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnHitTrapTrigger))) + EndIf + Return + End }; diff --git a/src/world/area_trd/trd_05/trd_05_3_trap.c b/src/world/area_trd/trd_05/trd_05_3_trap.c index 0dd18eed83c..bf2c389a478 100644 --- a/src/world/area_trd/trd_05/trd_05_3_trap.c +++ b/src/world/area_trd/trd_05/trd_05_3_trap.c @@ -146,225 +146,225 @@ Vec3f N(UnusedPath)[] = { }; EvtScript N(EVS_PlayerFalling) = { - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySound, SOUND_PAPER_GLIDE_1) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 0, 150, 45, EASING_COS_IN_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetFallingSpriteRot), 0, EVT_FLOAT(0.0), EVT_FLOAT(0.0), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar4, LVar5, LVar6) - EVT_CALL(SetPlayerPos, NPC_DISPOSE_LOCATION) - EVT_CALL(LoadPath, 45, EVT_PTR(N(FallPath)), ARRAY_COUNT(N(FallPath)), EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_ADDF(LVar3, LVar6) - EVT_CALL(N(SetFallingSpritePos), LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_SETF(LVar4, LVar1) - EVT_SETF(LVar5, LVar2) - EVT_SETF(LVar6, LVar3) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySound, SOUND_PAPER_GLIDE_1) - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, 100, 30, EASING_QUADRATIC_IN) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar7, EVT_FLOAT(-1.0)) - EVT_SETF(LVar8, EVT_FLOAT(-1.7315)) - EVT_SETF(LVar9, EVT_FLOAT(0.0)) - EVT_MULF(LVar7, LVar0) - EVT_MULF(LVar8, LVar0) - EVT_MULF(LVar9, LVar0) - EVT_ADDF(LVar7, LVar4) - EVT_ADDF(LVar8, LVar5) - EVT_ADDF(LVar9, LVar6) - EVT_CALL(N(SetFallingSpritePos), LVar7, LVar8, LVar9) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(SetPlayerPos, LVar7, LVar8, LVar9) - EVT_RETURN - EVT_END + Thread + Wait(5) + Call(PlaySound, SOUND_PAPER_GLIDE_1) + EndThread + Thread + Call(MakeLerp, 0, 150, 45, EASING_COS_IN_OUT) + Label(10) + Call(UpdateLerp) + Call(N(SetFallingSpriteRot), 0, Float(0.0), Float(0.0), LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + EndThread + Wait(1) + Call(GetPlayerPos, LVar4, LVar5, LVar6) + Call(SetPlayerPos, NPC_DISPOSE_LOCATION) + Call(LoadPath, 45, Ref(N(FallPath)), ARRAY_COUNT(N(FallPath)), EASING_COS_IN_OUT) + Label(0) + Call(GetNextPathPos) + AddF(LVar1, LVar4) + AddF(LVar2, LVar5) + AddF(LVar3, LVar6) + Call(N(SetFallingSpritePos), LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(0) + EndIf + SetF(LVar4, LVar1) + SetF(LVar5, LVar2) + SetF(LVar6, LVar3) + Thread + Wait(5) + Call(PlaySound, SOUND_PAPER_GLIDE_1) + EndThread + Call(MakeLerp, 0, 100, 30, EASING_QUADRATIC_IN) + Label(1) + Call(UpdateLerp) + SetF(LVar7, Float(-1.0)) + SetF(LVar8, Float(-1.7315)) + SetF(LVar9, Float(0.0)) + MulF(LVar7, LVar0) + MulF(LVar8, LVar0) + MulF(LVar9, LVar0) + AddF(LVar7, LVar4) + AddF(LVar8, LVar5) + AddF(LVar9, LVar6) + Call(N(SetFallingSpritePos), LVar7, LVar8, LVar9) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(SetPlayerPos, LVar7, LVar8, LVar9) + Return + End }; EvtScript N(EVS_PartnerFalling) = { - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySound, SOUND_PAPER_GLIDE_2) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 0, -135, 45, EASING_COS_IN_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_PARTNER, EVT_FLOAT(0.0), EVT_FLOAT(0.0), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(1) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar4, LVar5, LVar6) - EVT_CALL(LoadPath, 45, EVT_PTR(N(FallPath)), ARRAY_COUNT(N(FallPath)), EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_MULF(LVar1, EVT_FLOAT(-1.0)) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_ADDF(LVar3, LVar6) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySound, SOUND_PAPER_GLIDE_2) - EVT_END_THREAD - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar4, LVar5, LVar6) - EVT_CALL(MakeLerp, 0, 100, 30, EASING_QUADRATIC_IN) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar7, EVT_FLOAT(1.0)) - EVT_SETF(LVar8, EVT_FLOAT(-2.0)) - EVT_SETF(LVar9, EVT_FLOAT(0.0)) - EVT_MULF(LVar7, LVar0) - EVT_MULF(LVar8, LVar0) - EVT_MULF(LVar9, LVar0) - EVT_ADDF(LVar7, LVar4) - EVT_ADDF(LVar8, LVar5) - EVT_ADDF(LVar9, LVar6) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar7, LVar8, LVar9) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar7, LVar8, LVar9) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Thread + Wait(5) + Call(PlaySound, SOUND_PAPER_GLIDE_2) + EndThread + Thread + Call(MakeLerp, 0, -135, 45, EASING_COS_IN_OUT) + Label(10) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_PARTNER, Float(0.0), Float(0.0), LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + EndThread + Wait(1) + Call(GetNpcPos, NPC_PARTNER, LVar4, LVar5, LVar6) + Call(LoadPath, 45, Ref(N(FallPath)), ARRAY_COUNT(N(FallPath)), EASING_COS_IN_OUT) + Label(0) + Call(GetNextPathPos) + MulF(LVar1, Float(-1.0)) + AddF(LVar1, LVar4) + AddF(LVar2, LVar5) + AddF(LVar3, LVar6) + Call(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(0) + EndIf + Call(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) + Thread + Wait(5) + Call(PlaySound, SOUND_PAPER_GLIDE_2) + EndThread + Call(GetNpcPos, NPC_PARTNER, LVar4, LVar5, LVar6) + Call(MakeLerp, 0, 100, 30, EASING_QUADRATIC_IN) + Label(1) + Call(UpdateLerp) + SetF(LVar7, Float(1.0)) + SetF(LVar8, Float(-2.0)) + SetF(LVar9, Float(0.0)) + MulF(LVar7, LVar0) + MulF(LVar8, LVar0) + MulF(LVar9, LVar0) + AddF(LVar7, LVar4) + AddF(LVar8, LVar5) + AddF(LVar9, LVar6) + Call(SetNpcPos, NPC_PARTNER, LVar7, LVar8, LVar9) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(SetNpcPos, NPC_PARTNER, LVar7, LVar8, LVar9) + Return + End }; EvtScript N(EVS_OnHitTrapTrigger) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_LABEL(10) - EVT_CALL(GetPlayerActionState, LVar0) - EVT_WAIT(1) - EVT_IF_NE(LVar0, ACTION_STATE_IDLE) - EVT_GOTO(10) - EVT_END_IF - EVT_LOOP(0) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(10) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -10) - EVT_ADD(LVar2, -5) - EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 10) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(EnableModel, MODEL_o101, FALSE) - EVT_CALL(EnableModel, MODEL_o95, TRUE) - EVT_CALL(EnableModel, MODEL_o96, TRUE) - EVT_CALL(SetGroupVisibility, MODEL_kesu, MODEL_GROUP_VISIBLE) - EVT_CALL(PlaySound, SOUND_OPEN_TRAPDOOR) - EVT_CALL(MakeLerp, 0, 90, 30, EASING_COS_SLOW_OVERSHOOT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o95, LVar0, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o96, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(InterpPlayerYaw, 270, 1) - EVT_WAIT(10) - EVT_CALL(InterpPlayerYaw, 90, 1) - EVT_WAIT(15) - EVT_CALL(InterpPlayerYaw, 270, 1) - EVT_WAIT(3) - EVT_CALL(InterpPlayerYaw, 90, 1) - EVT_WAIT(3) - EVT_CALL(InterpPlayerYaw, 270, 1) - EVT_WAIT(3) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Flail) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_HURT) - EVT_WAIT(15) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_WAIT(5) - EVT_THREAD - EVT_CALL(N(InitializeFallingSprite)) - EVT_EXEC_WAIT(N(EVS_PlayerFalling)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_PartnerFalling)) - EVT_END_THREAD - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o82, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar2, LVar3, LVar4) - EVT_SET(LVar5, LVar3) - EVT_SUB(LVar5, 200) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar2, LVar5, LVar4) - EVT_CALL(PanToTarget, CAM_DEFAULT, EVT_FLOAT(0.5), 1) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_MARIO_ACTIVATED_TRAP) - EVT_WAIT(60) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(N(DeleteFallingSprite)) - EVT_CALL(SetNpcPos, NPC_KoopaBros_01, -250, 240, -25) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Walk) - EVT_CALL(SetNpcSpeed, NPC_KoopaBros_01, EVT_FLOAT(3.0)) - EVT_CALL(NpcMoveTo, NPC_KoopaBros_01, -150, -25, 0) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_ThumbsUp) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Idle) - EVT_WAIT(5) - EVT_CALL(SpeakToPlayer, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Talk, ANIM_KoopaBros_Yellow_Idle, 5, MSG_CH1_00D7) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetNpcSpeed, NPC_KoopaBros_01, EVT_FLOAT(2.5)) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Walk) - EVT_CALL(NpcMoveTo, NPC_KoopaBros_01, -200, -25, 0) - EVT_END_THREAD - EVT_WAIT(20) - EVT_SET(GB_StoryProgress, STORY_CH1_MARIO_ACTIVATED_TRAP) - EVT_ELSE - EVT_WAIT(20) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("trd_06"), trd_06_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Label(10) + Call(GetPlayerActionState, LVar0) + Wait(1) + IfNe(LVar0, ACTION_STATE_IDLE) + Goto(10) + EndIf + Loop(0) + Call(GetPartnerInUse, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Wait(10) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Thread + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, -10) + Add(LVar2, -5) + Call(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 10) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + EndThread + Wait(10) + Call(EnableModel, MODEL_o101, FALSE) + Call(EnableModel, MODEL_o95, TRUE) + Call(EnableModel, MODEL_o96, TRUE) + Call(SetGroupVisibility, MODEL_kesu, MODEL_GROUP_VISIBLE) + Call(PlaySound, SOUND_OPEN_TRAPDOOR) + Call(MakeLerp, 0, 90, 30, EASING_COS_SLOW_OVERSHOOT) + Label(0) + Call(UpdateLerp) + Call(RotateModel, MODEL_o95, LVar0, 0, 0, -1) + Call(RotateModel, MODEL_o96, LVar0, 0, 0, 1) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(InterpPlayerYaw, 270, 1) + Wait(10) + Call(InterpPlayerYaw, 90, 1) + Wait(15) + Call(InterpPlayerYaw, 270, 1) + Wait(3) + Call(InterpPlayerYaw, 90, 1) + Wait(3) + Call(InterpPlayerYaw, 270, 1) + Wait(3) + Wait(10) + Call(SetPlayerAnimation, ANIM_MarioW2_Flail) + Wait(5) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_HURT) + Wait(15) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Wait(5) + Thread + Call(N(InitializeFallingSprite)) + ExecWait(N(EVS_PlayerFalling)) + EndThread + Thread + Wait(10) + ExecWait(N(EVS_PartnerFalling)) + EndThread + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o82, COLLIDER_FLAGS_UPPER_MASK) + Call(UseSettingsFrom, CAM_DEFAULT, LVar2, LVar3, LVar4) + Set(LVar5, LVar3) + Sub(LVar5, 200) + Call(SetPanTarget, CAM_DEFAULT, LVar2, LVar5, LVar4) + Call(PanToTarget, CAM_DEFAULT, Float(0.5), 1) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + IfLt(GB_StoryProgress, STORY_CH1_MARIO_ACTIVATED_TRAP) + Wait(60) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(N(DeleteFallingSprite)) + Call(SetNpcPos, NPC_KoopaBros_01, -250, 240, -25) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Walk) + Call(SetNpcSpeed, NPC_KoopaBros_01, Float(3.0)) + Call(NpcMoveTo, NPC_KoopaBros_01, -150, -25, 0) + Wait(5) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_ThumbsUp) + Wait(20) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Idle) + Wait(5) + Call(SpeakToPlayer, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Talk, ANIM_KoopaBros_Yellow_Idle, 5, MSG_CH1_00D7) + Thread + Wait(10) + Call(SetNpcSpeed, NPC_KoopaBros_01, Float(2.5)) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Walk) + Call(NpcMoveTo, NPC_KoopaBros_01, -200, -25, 0) + EndThread + Wait(20) + Set(GB_StoryProgress, STORY_CH1_MARIO_ACTIVATED_TRAP) + Else + Wait(20) + EndIf + Call(GotoMap, Ref("trd_06"), trd_06_ENTRY_0) + Wait(100) + Return + End }; diff --git a/src/world/area_trd/trd_05/trd_05_4_npc.c b/src/world/area_trd/trd_05/trd_05_4_npc.c index 8132f4e6a1e..7d950004b16 100644 --- a/src/world/area_trd/trd_05/trd_05_4_npc.c +++ b/src/world/area_trd/trd_05/trd_05_4_npc.c @@ -19,186 +19,186 @@ NpcSettings N(NpcSettings_KoopaBros) = { }; EvtScript N(EVS_KoopaBros_SetTrap) = { - EVT_EXEC(N(EVS_StartKoopaBrosTheme)) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetPlayerPos, -350, 0, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, -350, 0, 0) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -70, 240, -10) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -70, 240, -10) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Idle) - EVT_THREAD - EVT_LOOP(8) - EVT_CALL(SetNpcImgFXParams, NPC_KoopaBros_01, IMGFX_SET_ALPHA, 0, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_KoopaBros_02, IMGFX_SET_ALPHA, 255, 0, 0, 0) - EVT_WAIT(6 * DT) - EVT_CALL(SetNpcImgFXParams, NPC_KoopaBros_01, IMGFX_SET_ALPHA, 255, 0, 0, 0) - EVT_CALL(SetNpcImgFXParams, NPC_KoopaBros_02, IMGFX_SET_ALPHA, 0, 0, 0, 0) - EVT_WAIT(6 * DT) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(8) - EVT_WAIT(5 * DT) - EVT_CALL(GetNpcPos, NPC_KoopaBros_02, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 8) - EVT_CALL(N(MakeHammerDust)) - EVT_WAIT(5 * DT) - EVT_CALL(GetNpcPos, NPC_KoopaBros_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 8) - EVT_CALL(N(MakeHammerDust)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(PlaySound, SOUND_TRD_POUNDING_HIGH) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Yellow_Hammering) - EVT_CALL(SetNpcPos, NPC_KoopaBros_02, -100, 240, 30) - EVT_CALL(SetNpcYaw, NPC_KoopaBros_02, 90) - EVT_WAIT(15 * DT) - EVT_CALL(PlaySound, SOUND_TRD_POUNDING_LOW) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Yellow_Hammering) - EVT_CALL(SetNpcPos, NPC_KoopaBros_02, -35, 240, -75) - EVT_CALL(SetNpcYaw, NPC_KoopaBros_02, 270) - EVT_WAIT(15 * DT) - EVT_CALL(PlaySound, SOUND_TRD_POUNDING_HIGH) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Yellow_Hammering) - EVT_CALL(SetNpcPos, NPC_KoopaBros_02, -40, 240, 10) - EVT_CALL(SetNpcYaw, NPC_KoopaBros_02, 270) - EVT_WAIT(15 * DT) - EVT_CALL(PlaySound, SOUND_TRD_POUNDING_LOW) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Yellow_Hammering) - EVT_CALL(SetNpcPos, NPC_KoopaBros_02, -110, 240, -20) - EVT_CALL(SetNpcYaw, NPC_KoopaBros_02, 90) - EVT_WAIT(15 * DT) - EVT_CALL(PlaySound, SOUND_TRD_POUNDING_HIGH) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Yellow_Hammering) - EVT_CALL(SetNpcPos, NPC_KoopaBros_02, -90, 240, 30) - EVT_CALL(SetNpcYaw, NPC_KoopaBros_02, 90) - EVT_WAIT(15 * DT) - EVT_CALL(PlaySound, SOUND_TRD_POUNDING_LOW) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Yellow_Hammering) - EVT_CALL(SetNpcPos, NPC_KoopaBros_02, -30, 240, -50) - EVT_CALL(SetNpcYaw, NPC_KoopaBros_02, 270) - EVT_WAIT(15 * DT) - EVT_CALL(SetNpcPos, NPC_KoopaBros_02, 0, -500, 0) - EVT_END_THREAD - EVT_CALL(SetNpcPos, NPC_KoopaBros_01, -45, 240, -30) - EVT_CALL(SetNpcYaw, NPC_KoopaBros_01, 270) - EVT_WAIT(1) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBros_01, EVT_FLOAT(1.6)) - EVT_CALL(NpcJump0, NPC_KoopaBros_01, -45, 240, -30, 6 * DT) - EVT_CALL(NpcJump0, NPC_KoopaBros_01, -45, 240, -30, 6 * DT) - EVT_CALL(SetNpcPos, NPC_KoopaBros_01, -120, 240, 20) - EVT_CALL(SetNpcYaw, NPC_KoopaBros_01, 90) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_PointForward) - EVT_WAIT(15 * DT) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Idle) - EVT_CALL(SetNpcPos, NPC_KoopaBros_01, -110, 240, -70) - EVT_CALL(SetNpcYaw, NPC_KoopaBros_01, 90) - EVT_WAIT(1) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBros_01, EVT_FLOAT(1.6)) - EVT_CALL(NpcJump0, NPC_KoopaBros_01, -110, 240, -70, 6 * DT) - EVT_CALL(NpcJump0, NPC_KoopaBros_01, -110, 240, -70, 6 * DT) - EVT_CALL(SetNpcPos, NPC_KoopaBros_01, -35, 240, -51) - EVT_CALL(SetNpcYaw, NPC_KoopaBros_01, 270) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_PointForward) - EVT_WAIT(14 * DT) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Idle) - EVT_CALL(SetNpcPos, NPC_KoopaBros_01, -45, 240, -25) - EVT_CALL(SetNpcYaw, NPC_KoopaBros_01, 270) - EVT_WAIT(1) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBros_01, EVT_FLOAT(1.6)) - EVT_CALL(NpcJump0, NPC_KoopaBros_01, -45, 240, -25, 6 * DT) - EVT_CALL(NpcJump0, NPC_KoopaBros_01, -45, 240, -25, 6 * DT) - EVT_WAIT(1) - EVT_CALL(SetNpcPos, NPC_KoopaBros_01, -120, 240, 20) - EVT_CALL(SetNpcYaw, NPC_KoopaBros_01, 90) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_PointForward) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcPos, NPC_KoopaBros_01, -120, 240, 20) - EVT_CALL(SetNpcYaw, NPC_KoopaBros_01, 90) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_ThumbsUp) - EVT_WAIT(26 * DT) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Walk) - EVT_CALL(SetNpcSpeed, NPC_KoopaBros_01, EVT_FLOAT(4.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_KoopaBros_01, -25, -15, 0) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(InterpNpcYaw, NPC_KoopaBros_01, 270, 4) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_IdleCrouch) - EVT_WAIT(25 * DT) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Walk) - EVT_CALL(SetNpcSpeed, NPC_KoopaBros_01, EVT_FLOAT(4.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_KoopaBros_01, -122, -15, 0) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Idle) - EVT_WAIT(3 * DT) - EVT_CALL(InterpNpcYaw, NPC_KoopaBros_01, 90, 5) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Talk, ANIM_KoopaBros_Yellow_Idle, 5, MSG_CH1_00D5) - EVT_CALL(GetNpcPos, NPC_KoopaBros_01, LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAtNpc, NPC_KoopaBros_01, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_KoopaBros_01, EMOTE_EXCLAMATION, 0, 25, EMOTER_POS, LVar0, LVar1, LVar2, 40) - EVT_WAIT(25 * DT) - EVT_CALL(InterpNpcYaw, NPC_KoopaBros_01, 270, 2) - EVT_WAIT(7 * DT) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_IdleCrouch) - EVT_WAIT(25 * DT) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Idle) - EVT_CALL(GetNpcPos, NPC_KoopaBros_01, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBros_01, EVT_FLOAT(3.0)) - EVT_CALL(NpcJump0, NPC_KoopaBros_01, LVar0, LVar1, LVar2, 5 * DT) - EVT_CALL(SpeakToPlayer, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Talk, ANIM_KoopaBros_Yellow_Idle, 0, MSG_CH1_00D6) - EVT_CALL(PlaySound, SOUND_RUN_AWAY_BUILDUP) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Run) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBros_01, EVT_FLOAT(0.8)) - EVT_CALL(GetNpcPos, NPC_KoopaBros_01, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_KoopaBros_01, LVar0, LVar1, LVar2, 8 * DT) - EVT_WAIT(8 * DT) - EVT_CALL(PlaySound, SOUND_RUN_AWAY) - EVT_CALL(SetNpcSpeed, NPC_KoopaBros_01, EVT_FLOAT(8.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_KoopaBros_01, -400, -10, 0) - EVT_EXEC(N(EVS_EndKoopaBrosTheme)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -270, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -270, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcPos, NPC_KoopaBros_01, NPC_DISPOSE_LOCATION) - EVT_CALL(PlaySound, SOUND_METAL_DOOR_OPEN) - EVT_CALL(MakeLerp, 0, 80, 10, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_doa2, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_doa1, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(SetPlayerPos, -310, 0, 0) - EVT_EXEC_WAIT(N(EVS_EnterMap)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_SET(GB_StoryProgress, STORY_CH1_KOOPA_BROS_SET_TRAP) - EVT_RETURN - EVT_END + Exec(N(EVS_StartKoopaBrosTheme)) + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(SetPlayerPos, -350, 0, 0) + Call(SetNpcPos, NPC_PARTNER, -350, 0, 0) + Call(UseSettingsFrom, CAM_DEFAULT, -70, 240, -10) + Call(SetPanTarget, CAM_DEFAULT, -70, 240, -10) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Idle) + Thread + Loop(8) + Call(SetNpcImgFXParams, NPC_KoopaBros_01, IMGFX_SET_ALPHA, 0, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_KoopaBros_02, IMGFX_SET_ALPHA, 255, 0, 0, 0) + Wait(6 * DT) + Call(SetNpcImgFXParams, NPC_KoopaBros_01, IMGFX_SET_ALPHA, 255, 0, 0, 0) + Call(SetNpcImgFXParams, NPC_KoopaBros_02, IMGFX_SET_ALPHA, 0, 0, 0, 0) + Wait(6 * DT) + EndLoop + EndThread + Thread + Loop(8) + Wait(5 * DT) + Call(GetNpcPos, NPC_KoopaBros_02, LVar0, LVar1, LVar2) + Add(LVar1, 8) + Call(N(MakeHammerDust)) + Wait(5 * DT) + Call(GetNpcPos, NPC_KoopaBros_01, LVar0, LVar1, LVar2) + Add(LVar1, 8) + Call(N(MakeHammerDust)) + Wait(1) + EndLoop + EndThread + Thread + Call(PlaySound, SOUND_TRD_POUNDING_HIGH) + Call(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Yellow_Hammering) + Call(SetNpcPos, NPC_KoopaBros_02, -100, 240, 30) + Call(SetNpcYaw, NPC_KoopaBros_02, 90) + Wait(15 * DT) + Call(PlaySound, SOUND_TRD_POUNDING_LOW) + Call(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Yellow_Hammering) + Call(SetNpcPos, NPC_KoopaBros_02, -35, 240, -75) + Call(SetNpcYaw, NPC_KoopaBros_02, 270) + Wait(15 * DT) + Call(PlaySound, SOUND_TRD_POUNDING_HIGH) + Call(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Yellow_Hammering) + Call(SetNpcPos, NPC_KoopaBros_02, -40, 240, 10) + Call(SetNpcYaw, NPC_KoopaBros_02, 270) + Wait(15 * DT) + Call(PlaySound, SOUND_TRD_POUNDING_LOW) + Call(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Yellow_Hammering) + Call(SetNpcPos, NPC_KoopaBros_02, -110, 240, -20) + Call(SetNpcYaw, NPC_KoopaBros_02, 90) + Wait(15 * DT) + Call(PlaySound, SOUND_TRD_POUNDING_HIGH) + Call(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Yellow_Hammering) + Call(SetNpcPos, NPC_KoopaBros_02, -90, 240, 30) + Call(SetNpcYaw, NPC_KoopaBros_02, 90) + Wait(15 * DT) + Call(PlaySound, SOUND_TRD_POUNDING_LOW) + Call(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Yellow_Hammering) + Call(SetNpcPos, NPC_KoopaBros_02, -30, 240, -50) + Call(SetNpcYaw, NPC_KoopaBros_02, 270) + Wait(15 * DT) + Call(SetNpcPos, NPC_KoopaBros_02, 0, -500, 0) + EndThread + Call(SetNpcPos, NPC_KoopaBros_01, -45, 240, -30) + Call(SetNpcYaw, NPC_KoopaBros_01, 270) + Wait(1) + Call(SetNpcJumpscale, NPC_KoopaBros_01, Float(1.6)) + Call(NpcJump0, NPC_KoopaBros_01, -45, 240, -30, 6 * DT) + Call(NpcJump0, NPC_KoopaBros_01, -45, 240, -30, 6 * DT) + Call(SetNpcPos, NPC_KoopaBros_01, -120, 240, 20) + Call(SetNpcYaw, NPC_KoopaBros_01, 90) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_PointForward) + Wait(15 * DT) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Idle) + Call(SetNpcPos, NPC_KoopaBros_01, -110, 240, -70) + Call(SetNpcYaw, NPC_KoopaBros_01, 90) + Wait(1) + Call(SetNpcJumpscale, NPC_KoopaBros_01, Float(1.6)) + Call(NpcJump0, NPC_KoopaBros_01, -110, 240, -70, 6 * DT) + Call(NpcJump0, NPC_KoopaBros_01, -110, 240, -70, 6 * DT) + Call(SetNpcPos, NPC_KoopaBros_01, -35, 240, -51) + Call(SetNpcYaw, NPC_KoopaBros_01, 270) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_PointForward) + Wait(14 * DT) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Idle) + Call(SetNpcPos, NPC_KoopaBros_01, -45, 240, -25) + Call(SetNpcYaw, NPC_KoopaBros_01, 270) + Wait(1) + Call(SetNpcJumpscale, NPC_KoopaBros_01, Float(1.6)) + Call(NpcJump0, NPC_KoopaBros_01, -45, 240, -25, 6 * DT) + Call(NpcJump0, NPC_KoopaBros_01, -45, 240, -25, 6 * DT) + Wait(1) + Call(SetNpcPos, NPC_KoopaBros_01, -120, 240, 20) + Call(SetNpcYaw, NPC_KoopaBros_01, 90) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_PointForward) + Wait(20 * DT) + Call(SetNpcPos, NPC_KoopaBros_01, -120, 240, 20) + Call(SetNpcYaw, NPC_KoopaBros_01, 90) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_ThumbsUp) + Wait(26 * DT) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Idle) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Walk) + Call(SetNpcSpeed, NPC_KoopaBros_01, Float(4.0 / DT)) + Call(NpcMoveTo, NPC_KoopaBros_01, -25, -15, 0) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Idle) + Wait(10 * DT) + Call(InterpNpcYaw, NPC_KoopaBros_01, 270, 4) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_IdleCrouch) + Wait(25 * DT) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Idle) + Wait(10 * DT) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Walk) + Call(SetNpcSpeed, NPC_KoopaBros_01, Float(4.0 / DT)) + Call(NpcMoveTo, NPC_KoopaBros_01, -122, -15, 0) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Idle) + Wait(3 * DT) + Call(InterpNpcYaw, NPC_KoopaBros_01, 90, 5) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Talk, ANIM_KoopaBros_Yellow_Idle, 5, MSG_CH1_00D5) + Call(GetNpcPos, NPC_KoopaBros_01, LVar0, LVar1, LVar2) + Call(PlaySoundAtNpc, NPC_KoopaBros_01, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_KoopaBros_01, EMOTE_EXCLAMATION, 0, 25, EMOTER_POS, LVar0, LVar1, LVar2, 40) + Wait(25 * DT) + Call(InterpNpcYaw, NPC_KoopaBros_01, 270, 2) + Wait(7 * DT) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_IdleCrouch) + Wait(25 * DT) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Idle) + Call(GetNpcPos, NPC_KoopaBros_01, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_KoopaBros_01, Float(3.0)) + Call(NpcJump0, NPC_KoopaBros_01, LVar0, LVar1, LVar2, 5 * DT) + Call(SpeakToPlayer, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Talk, ANIM_KoopaBros_Yellow_Idle, 0, MSG_CH1_00D6) + Call(PlaySound, SOUND_RUN_AWAY_BUILDUP) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Yellow_Run) + Call(SetNpcJumpscale, NPC_KoopaBros_01, Float(0.8)) + Call(GetNpcPos, NPC_KoopaBros_01, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_KoopaBros_01, LVar0, LVar1, LVar2, 8 * DT) + Wait(8 * DT) + Call(PlaySound, SOUND_RUN_AWAY) + Call(SetNpcSpeed, NPC_KoopaBros_01, Float(8.0 / DT)) + Call(NpcMoveTo, NPC_KoopaBros_01, -400, -10, 0) + Exec(N(EVS_EndKoopaBrosTheme)) + Call(UseSettingsFrom, CAM_DEFAULT, -270, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, -270, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetNpcPos, NPC_KoopaBros_01, NPC_DISPOSE_LOCATION) + Call(PlaySound, SOUND_METAL_DOOR_OPEN) + Call(MakeLerp, 0, 80, 10, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(RotateModel, MODEL_doa2, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_doa1, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(DisablePlayerInput, FALSE) + Call(EnablePartnerAI) + Call(SetPlayerPos, -310, 0, 0) + ExecWait(N(EVS_EnterMap)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Set(GB_StoryProgress, STORY_CH1_KOOPA_BROS_SET_TRAP) + Return + End }; EvtScript N(EVS_NpcInit_KoopaBros) = { - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_IF_GE(GB_StoryProgress, STORY_CH1_MARIO_ACTIVATED_TRAP) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(InterpNpcYaw, NPC_SELF, 90, 0) + IfGe(GB_StoryProgress, STORY_CH1_MARIO_ACTIVATED_TRAP) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_KoopaBros)[] = { diff --git a/src/world/area_trd/trd_06/trd_06_0_header.c b/src/world/area_trd/trd_06/trd_06_0_header.c index b58974e0712..1bba28d4251 100644 --- a/src/world/area_trd/trd_06/trd_06_0_header.c +++ b/src/world/area_trd/trd_06/trd_06_0_header.c @@ -17,27 +17,27 @@ MapSettings N(settings) = { }; EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_GE(trd_06_ENTRY_2) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_FORTRESS, 0, 8) - EVT_END_SWITCH - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseGe(trd_06_ENTRY_2) + CaseDefault + Call(SetMusicTrack, 0, SONG_KOOPA_FORTRESS, 0, 8) + EndSwitch + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Return + End }; EvtScript N(EVS_PushSong) = { - EVT_CALL(PushSong, SONG_NEW_PARTNER, 0) - EVT_RETURN - EVT_END + Call(PushSong, SONG_NEW_PARTNER, 0) + Return + End }; EvtScript N(EVS_PopSong) = { - EVT_CALL(FadeOutMusic, 0, 500) - EVT_WAIT(15) - EVT_CALL(PopSong) - EVT_RETURN - EVT_END + Call(FadeOutMusic, 0, 500) + Wait(15) + Call(PopSong) + Return + End }; diff --git a/src/world/area_trd/trd_06/trd_06_1_main.c b/src/world/area_trd/trd_06/trd_06_1_main.c index 7b489eb6d16..1cfaab2fb4f 100644 --- a/src/world/area_trd/trd_06/trd_06_1_main.c +++ b/src/world/area_trd/trd_06/trd_06_1_main.c @@ -17,26 +17,26 @@ EvtScript N(EVS_ExitDoors_trd_04_5) = EVT_EXIT_DOUBLE_DOOR(trd_06_ENTRY_1, "trd_ MAP_RODATA_PAD(1,unk); // fixed if map uses subalign 16 EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(trd_06_ENTRY_0) - EVT_EXEC(N(EVS_Scene_FallIntoCell)) - EVT_CASE_EQ(trd_06_ENTRY_1) - EVT_SET(LVar2, MODEL_o93) - EVT_SET(LVar3, MODEL_o94) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_LE(trd_06_ENTRY_3) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetPlayerPos, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_PARTNER, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_INACTIVE, TRUE) - EVT_CALL(EnableNpcShadow, NPC_PARTNER, FALSE) - EVT_EXEC(N(EVS_Scene_ImprisonedKoopaBros)) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(trd_06_ENTRY_0) + Exec(N(EVS_Scene_FallIntoCell)) + CaseEq(trd_06_ENTRY_1) + Set(LVar2, MODEL_o93) + Set(LVar3, MODEL_o94) + ExecWait(EnterDoubleDoor) + CaseLe(trd_06_ENTRY_3) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Call(SetPlayerPos, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_PARTNER, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_INACTIVE, TRUE) + Call(EnableNpcShadow, NPC_PARTNER, FALSE) + Exec(N(EVS_Scene_ImprisonedKoopaBros)) + EndSwitch + Return + End }; BombTrigger N(BombPos_CellWall) = { @@ -45,139 +45,139 @@ BombTrigger N(BombPos_CellWall) = { }; EvtScript N(EVS_BombWall_Cell) = { - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_CHANGE_PARTNER | PS_FLAG_NO_PARTNER_USAGE, TRUE) - EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 0, 19, 19, 1, 10, 30) - EVT_CALL(SetGroupVisibility, MODEL_ana, MODEL_GROUP_VISIBLE) - EVT_LOOP(10) - EVT_CALL(SetGroupVisibility, MODEL_ana2, MODEL_GROUP_VISIBLE) - EVT_WAIT(1) - EVT_CALL(SetGroupVisibility, MODEL_ana2, MODEL_GROUP_HIDDEN) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitse, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ttse, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(WaitForPlayerInputEnabled) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(GF_TRD06_BombedWall, TRUE) - EVT_WAIT(60 * DT) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 110) - EVT_IF_LT(LVar2, 140) - EVT_WAIT(25 * DT) - EVT_CALL(SetNpcFlagBits, NPC_Bobomb_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Bobomb_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Bobomb_03, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Bobomb_04, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, 110, 140, 0) - EVT_CALL(PlayerFaceNpc, NPC_PARTNER, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Bobomb_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Bobomb_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Bobomb_03, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Bobomb_04, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_END_IF - EVT_END_IF - EVT_END_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_WorldBombette_Walk) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(3.5 / DT)) + Call(SetPlayerFlagBits, PS_FLAG_NO_CHANGE_PARTNER | PS_FLAG_NO_PARTNER_USAGE, TRUE) + PlayEffect(EFFECT_BOMBETTE_BREAKING, 0, 19, 19, 1, 10, 30) + Call(SetGroupVisibility, MODEL_ana, MODEL_GROUP_VISIBLE) + Loop(10) + Call(SetGroupVisibility, MODEL_ana2, MODEL_GROUP_VISIBLE) + Wait(1) + Call(SetGroupVisibility, MODEL_ana2, MODEL_GROUP_HIDDEN) + Wait(1) + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitse, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ttse, COLLIDER_FLAGS_UPPER_MASK) + Call(WaitForPlayerInputEnabled) + Call(DisablePlayerInput, TRUE) + Set(GF_TRD06_BombedWall, TRUE) + Wait(60 * DT) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, 110) + IfLt(LVar2, 140) + Wait(25 * DT) + Call(SetNpcFlagBits, NPC_Bobomb_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Bobomb_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Bobomb_03, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Bobomb_04, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, 110, 140, 0) + Call(PlayerFaceNpc, NPC_PARTNER, FALSE) + Call(SetNpcFlagBits, NPC_Bobomb_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcFlagBits, NPC_Bobomb_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcFlagBits, NPC_Bobomb_03, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcFlagBits, NPC_Bobomb_04, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + EndIf + EndIf + EndThread + Call(DisablePartnerAI, 0) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_WorldBombette_Walk) + Call(SetNpcSpeed, NPC_PARTNER, Float(3.5 / DT)) #if !VERSION_PAL - EVT_CALL(NpcMoveTo, NPC_PARTNER, 156, 156, 0) + Call(NpcMoveTo, NPC_PARTNER, 156, 156, 0) #endif - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_WorldBombette_Idle) - EVT_WAIT(30 * DT) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_00E2) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_WAIT(20 * DT) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_00E3) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_CHANGE_PARTNER | PS_FLAG_NO_PARTNER_USAGE, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_THREAD - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_IF_LT(LVar2, 200) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_GT(LVar0, -120) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetNpcVar, NPC_Jailer_KoopaTroopa, 0, 1) - EVT_END_THREAD - EVT_UNBIND - EVT_RETURN - EVT_END + Call(SetNpcAnimation, NPC_PARTNER, ANIM_WorldBombette_Idle) + Wait(30 * DT) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_00E2) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + Wait(20 * DT) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_00E3) + Call(SetPlayerFlagBits, PS_FLAG_NO_CHANGE_PARTNER | PS_FLAG_NO_PARTNER_USAGE, FALSE) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Thread + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + IfLt(LVar2, 200) + Goto(0) + EndIf + IfGt(LVar0, -120) + Goto(0) + EndIf + Call(SetNpcVar, NPC_Jailer_KoopaTroopa, 0, 1) + EndThread + Unbind + Return + End }; EvtScript N(EVS_TexPan_Water) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, MODEL_suimen, TEX_PANNER_1) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LABEL(10) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, 0) - EVT_ADD(LVar0, 100) - EVT_SUB(LVar1, 100) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, MODEL_suimen, TEX_PANNER_1) + Set(LVar0, 0) + Set(LVar1, 0) + Label(10) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, 0) + Add(LVar0, 100) + Sub(LVar1, 100) + Wait(1) + Goto(10) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_KOOPA_BROS_FORTRESS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH1_DEFEATED_KOOPA_BROS) - EVT_CALL(EnableModel, MODEL_o97, FALSE) - EVT_CALL(EnableModel, MODEL_o98, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o109, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_SWITCH - EVT_IF_GE(GB_StoryProgress, STORY_CH1_DEFEATED_DUNGEON_GUARDS) - EVT_SET(GF_TRD06_BombedWall, TRUE) - EVT_END_IF - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH1_DEFEATED_KOOPA_BROS) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(NpcGroup_Prisoners))) - EVT_CALL(SetGroupVisibility, MODEL_g27, MODEL_GROUP_HIDDEN) - EVT_CASE_LT(STORY_CH1_DEFEATED_JR_TROOPA) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(NpcGroup_KoopaBros))) - EVT_END_SWITCH - EVT_WAIT(2) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_04_5)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) //@bug unterminated switch - EVT_IF_LE(LVar0, trd_06_ENTRY_1) - EVT_IF_EQ(GF_TRD06_BombedWall, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BombWall_Cell)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_CellWall)), 1, 0) - EVT_CALL(SetGroupVisibility, MODEL_ana, MODEL_GROUP_HIDDEN) - EVT_ELSE - EVT_CALL(SetGroupVisibility, MODEL_ana2, MODEL_GROUP_HIDDEN) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitse, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ttse, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_ELSE - EVT_CALL(SetGroupVisibility, MODEL_ana, MODEL_GROUP_HIDDEN) - EVT_END_IF - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_TexPan_Water)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_CALL(EnableTexPanning, MODEL_suimen, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_KOOPA_BROS_FORTRESS) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_NO_LEAD() + Switch(GB_StoryProgress) + CaseLt(STORY_CH1_DEFEATED_KOOPA_BROS) + Call(EnableModel, MODEL_o97, FALSE) + Call(EnableModel, MODEL_o98, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o109, COLLIDER_FLAGS_UPPER_MASK) + EndSwitch + IfGe(GB_StoryProgress, STORY_CH1_DEFEATED_DUNGEON_GUARDS) + Set(GF_TRD06_BombedWall, TRUE) + EndIf + Switch(GB_StoryProgress) + CaseLt(STORY_CH1_DEFEATED_KOOPA_BROS) + Call(MakeNpcs, TRUE, Ref(N(NpcGroup_Prisoners))) + Call(SetGroupVisibility, MODEL_g27, MODEL_GROUP_HIDDEN) + CaseLt(STORY_CH1_DEFEATED_JR_TROOPA) + Call(MakeNpcs, TRUE, Ref(N(NpcGroup_KoopaBros))) + EndSwitch + Wait(2) + ExecWait(N(EVS_MakeEntities)) + BindTrigger(Ref(N(EVS_ExitDoors_trd_04_5)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + Call(GetEntryID, LVar0) + Switch(LVar0) //@bug unterminated switch + IfLe(LVar0, trd_06_ENTRY_1) + IfEq(GF_TRD06_BombedWall, FALSE) + BindTrigger(Ref(N(EVS_BombWall_Cell)), TRIGGER_POINT_BOMB, Ref(N(BombPos_CellWall)), 1, 0) + Call(SetGroupVisibility, MODEL_ana, MODEL_GROUP_HIDDEN) + Else + Call(SetGroupVisibility, MODEL_ana2, MODEL_GROUP_HIDDEN) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitse, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ttse, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Else + Call(SetGroupVisibility, MODEL_ana, MODEL_GROUP_HIDDEN) + EndIf + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_TexPan_Water)) + Exec(N(EVS_EnterMap)) + Wait(1) + Call(EnableTexPanning, MODEL_suimen, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 0, 90, -60, -70) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; diff --git a/src/world/area_trd/trd_06/trd_06_2_falling.c b/src/world/area_trd/trd_06/trd_06_2_falling.c index 10b9b99529c..b9a3eb4d6f5 100644 --- a/src/world/area_trd/trd_06/trd_06_2_falling.c +++ b/src/world/area_trd/trd_06/trd_06_2_falling.c @@ -167,193 +167,193 @@ Vec3f N(FallPath)[] = { }; EvtScript N(EVS_PlayerFalling) = { - EVT_CALL(SetPlayerPos, 0, 130, 0) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySound, SOUND_PAPER_GLIDE_1) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 180, 210, 25, EASING_QUADRATIC_IN) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetFallingSpriteRot), 0, EVT_FLOAT(0.0), EVT_FLOAT(0.0), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar4, LVar5, LVar6) - EVT_CALL(LoadPath, 30, EVT_PTR(N(FallPath)), ARRAY_COUNT(N(FallPath)), EASING_QUADRATIC_IN) - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_ADDF(LVar3, LVar6) - EVT_CALL(N(SetFallingSpritePos), LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(PlaySound, SOUND_HIT_SPIKE) - EVT_ADD(LVar2, -1000) - EVT_CALL(SetPlayerPos, LVar1, LVar2, LVar3) - EVT_RETURN - EVT_END + Call(SetPlayerPos, 0, 130, 0) + Thread + Wait(5) + Call(PlaySound, SOUND_PAPER_GLIDE_1) + EndThread + Thread + Call(MakeLerp, 180, 210, 25, EASING_QUADRATIC_IN) + Label(10) + Call(UpdateLerp) + Call(N(SetFallingSpriteRot), 0, Float(0.0), Float(0.0), LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + EndThread + Wait(1) + Call(GetPlayerPos, LVar4, LVar5, LVar6) + Call(LoadPath, 30, Ref(N(FallPath)), ARRAY_COUNT(N(FallPath)), EASING_QUADRATIC_IN) + Label(0) + Call(GetNextPathPos) + AddF(LVar1, LVar4) + AddF(LVar2, LVar5) + AddF(LVar3, LVar6) + Call(N(SetFallingSpritePos), LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(0) + EndIf + Call(PlaySound, SOUND_HIT_SPIKE) + Add(LVar2, -1000) + Call(SetPlayerPos, LVar1, LVar2, LVar3) + Return + End }; EvtScript N(EVS_PartnerFalling) = { - EVT_CALL(N(InitializeFallingPartner)) - EVT_CALL(SetNpcPos, NPC_PARTNER, 0, LVar0, 0) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(PlaySound, SOUND_PAPER_GLIDE_2) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 180, 150, 25, EASING_QUADRATIC_IN) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_PARTNER, 0, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(1) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar4, LVar5, LVar6) - EVT_CALL(LoadPath, 30, EVT_PTR(N(FallPath)), ARRAY_COUNT(N(FallPath)), EASING_QUADRATIC_IN) - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_ADDF(LVar3, LVar6) - EVT_MULF(LVar1, EVT_FLOAT(-1.0)) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(PlaySound, SOUND_HIT_SPIKE) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) - EVT_RETURN - EVT_END + Call(N(InitializeFallingPartner)) + Call(SetNpcPos, NPC_PARTNER, 0, LVar0, 0) + Thread + Wait(5) + Call(PlaySound, SOUND_PAPER_GLIDE_2) + EndThread + Thread + Call(MakeLerp, 180, 150, 25, EASING_QUADRATIC_IN) + Label(10) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_PARTNER, 0, 0, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + EndThread + Wait(1) + Call(GetNpcPos, NPC_PARTNER, LVar4, LVar5, LVar6) + Call(LoadPath, 30, Ref(N(FallPath)), ARRAY_COUNT(N(FallPath)), EASING_QUADRATIC_IN) + Label(0) + Call(GetNextPathPos) + AddF(LVar1, LVar4) + AddF(LVar2, LVar5) + AddF(LVar3, LVar6) + MulF(LVar1, Float(-1.0)) + Call(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(0) + EndIf + Call(PlaySound, SOUND_HIT_SPIKE) + Call(SetNpcPos, NPC_PARTNER, LVar1, LVar2, LVar3) + Return + End }; EvtScript N(EVS_Unused_GetUp) = { - EVT_CALL(N(InitializeGetUp)) - EVT_THREAD - EVT_LOOP(11) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 1000) - EVT_CALL(N(SetFallingSpritePos), LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(MakeLerp, 210, 360, 10, EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetFallingSpriteRot), 0, EVT_FLOAT(0.0), EVT_FLOAT(0.0), LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(1) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(PlayerJump, LVar0, -1000, LVar2, 10) - EVT_THREAD - EVT_CALL(MakeLerp, 150, 0, 10, EASING_COS_IN_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_PARTNER, 0, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(1) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, 0, LVar2, 10) - EVT_RETURN - EVT_END + Call(N(InitializeGetUp)) + Thread + Loop(11) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 1000) + Call(N(SetFallingSpritePos), LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + Thread + Call(MakeLerp, 210, 360, 10, EASING_COS_IN_OUT) + Label(0) + Call(UpdateLerp) + Call(N(SetFallingSpriteRot), 0, Float(0.0), Float(0.0), LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + EndThread + Wait(1) + Call(SetPlayerJumpscale, Float(1.0)) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(PlayerJump, LVar0, -1000, LVar2, 10) + Thread + Call(MakeLerp, 150, 0, 10, EASING_COS_IN_OUT) + Label(1) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_PARTNER, 0, 0, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + EndThread + Wait(1) + Call(SetNpcJumpscale, NPC_PARTNER, Float(1.0)) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_PARTNER, LVar0, 0, LVar2, 10) + Return + End }; EvtScript N(EVS_Scene_FallIntoCell) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 300, -500) - EVT_CALL(SetCamPosB, CAM_DEFAULT, -100, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 360) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(InterpPlayerYaw, 270, 1) - EVT_CALL(SetPlayerPos, 0, 300, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, 0, 300, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_INACTIVE, TRUE) - EVT_WAIT(30) - EVT_CALL(N(InitializeFallingSprite)) - EVT_EXEC_WAIT(N(EVS_PlayerFalling)) - EVT_CALL(InterpNpcYaw, NPC_Bombette, 90, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_INACTIVE | NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_EXEC_WAIT(N(EVS_PartnerFalling)) - EVT_CALL(InterpNpcYaw, NPC_Bombette, 270, 0) - EVT_WAIT(20) - EVT_CALL(InterpNpcYaw, NPC_Bombette, 90, 0) - EVT_CALL(SpeakToPlayer, NPC_Bombette, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_00D8) - EVT_CALL(N(EnableFallingAnimation)) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(N(DeleteFallingSprite)) - EVT_THREAD - EVT_CALL(SetNpcRotation, NPC_PARTNER, 0, 0, 0) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, 0, LVar2, 10) - EVT_END_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 1000) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(PlayerJump, LVar0, 0, LVar2, 10) - EVT_WAIT(15) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_IF_LT(GB_StoryProgress, STORY_CH1_BOMBETTE_JOINED_PARTY) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, 3) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 27, 0, 30) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) - EVT_CALL(NpcMoveTo, NPC_PARTNER, -21, 47, 10) - EVT_CALL(NpcMoveTo, NPC_PARTNER, 50, 35, 15) - EVT_CALL(NpcMoveTo, NPC_PARTNER, 73, 22, 10) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(GetAngleToNPC, NPC_Bombette, LVar0) - EVT_CALL(InterpPlayerYaw, LVar0, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, LVar0, 0) - EVT_WAIT(1) - EVT_CALL(SpeakToPlayer, NPC_Bombette, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_00D9) - EVT_THREAD - EVT_WAIT(5 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_CALL(EndSpeech, NPC_Bombette, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0 / DT)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcVar, NPC_Bombette, 0, 1) - EVT_END_IF - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPosA, CAM_DEFAULT, 300, -500) + Call(SetCamPosB, CAM_DEFAULT, -100, 0) + Call(SetCamDistance, CAM_DEFAULT, 360) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(DisablePartnerAI, 0) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(InterpPlayerYaw, 270, 1) + Call(SetPlayerPos, 0, 300, 0) + Call(SetNpcPos, NPC_PARTNER, 0, 300, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_INACTIVE, TRUE) + Wait(30) + Call(N(InitializeFallingSprite)) + ExecWait(N(EVS_PlayerFalling)) + Call(InterpNpcYaw, NPC_Bombette, 90, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_INACTIVE | NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + ExecWait(N(EVS_PartnerFalling)) + Call(InterpNpcYaw, NPC_Bombette, 270, 0) + Wait(20) + Call(InterpNpcYaw, NPC_Bombette, 90, 0) + Call(SpeakToPlayer, NPC_Bombette, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_00D8) + Call(N(EnableFallingAnimation)) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(N(DeleteFallingSprite)) + Thread + Call(SetNpcRotation, NPC_PARTNER, 0, 0, 0) + Call(SetNpcJumpscale, NPC_PARTNER, Float(1.0)) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_PARTNER, LVar0, 0, LVar2, 10) + EndThread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 1000) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerJumpscale, Float(1.0)) + Call(PlayerJump, LVar0, 0, LVar2, 10) + Wait(15) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(DisablePlayerPhysics, FALSE) + IfLt(GB_StoryProgress, STORY_CH1_BOMBETTE_JOINED_PARTY) + Call(SetCamSpeed, CAM_DEFAULT, 3) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetPanTarget, CAM_DEFAULT, 27, 0, 30) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) + Call(NpcMoveTo, NPC_PARTNER, -21, 47, 10) + Call(NpcMoveTo, NPC_PARTNER, 50, 35, 15) + Call(NpcMoveTo, NPC_PARTNER, 73, 22, 10) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(GetAngleToNPC, NPC_Bombette, LVar0) + Call(InterpPlayerYaw, LVar0, 0) + Call(InterpNpcYaw, NPC_PARTNER, LVar0, 0) + Wait(1) + Call(SpeakToPlayer, NPC_Bombette, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_00D9) + Thread + Wait(5 * DT) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(30 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndThread + Call(EndSpeech, NPC_Bombette, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0 / DT)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetNpcVar, NPC_Bombette, 0, 1) + EndIf + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/area_trd/trd_06/trd_06_3_npc_prisoners.c b/src/world/area_trd/trd_06/trd_06_3_npc_prisoners.c index 9e4d3736460..aae678cb871 100644 --- a/src/world/area_trd/trd_06/trd_06_3_npc_prisoners.c +++ b/src/world/area_trd/trd_06/trd_06_3_npc_prisoners.c @@ -25,318 +25,318 @@ NpcSettings N(NpcSettings_KoopaTroopa) = { }; EvtScript N(EVS_Bombette_DemonstrateAbility) = { - EVT_CALL(SetPanTarget, CAM_DEFAULT, 96, 0, 129) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.6 / DT)) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_WorldBombette_Walk) - EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(3.0 / DT)) - EVT_CALL(NpcMoveTo, NPC_PARTNER, 124, 129, 0) - EVT_CALL(GetAngleToPlayer, NPC_PARTNER, LVar0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, LVar0, 5) - EVT_END_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PlayerMoveTo, 96, 129, 0) - EVT_CALL(GetAngleToNPC, NPC_PARTNER, LVar0) - EVT_CALL(InterpPlayerYaw, LVar0, 5) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_00E1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_RETURN - EVT_END + Call(SetPanTarget, CAM_DEFAULT, 96, 0, 129) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.6 / DT)) + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Thread + Call(SetNpcAnimation, NPC_PARTNER, ANIM_WorldBombette_Walk) + Call(SetNpcSpeed, NPC_PARTNER, Float(3.0 / DT)) + Call(NpcMoveTo, NPC_PARTNER, 124, 129, 0) + Call(GetAngleToPlayer, NPC_PARTNER, LVar0) + Call(InterpNpcYaw, NPC_PARTNER, LVar0, 5) + EndThread + Wait(30 * DT) + Call(SetPlayerSpeed, Float(3.0 / DT)) + Call(PlayerMoveTo, 96, 129, 0) + Call(GetAngleToNPC, NPC_PARTNER, LVar0) + Call(InterpPlayerYaw, LVar0, 5) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_00E1) + Call(DisablePlayerInput, FALSE) + Call(EnablePartnerAI) + Return + End }; EvtScript N(EVS_NpcInteract_Bombette) = { - EVT_THREAD - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(5.0 / DT), 0, EVT_FLOAT(300.0), EVT_FLOAT(18.0), EVT_FLOAT(-7.0)) - EVT_END_THREAD - EVT_CALL(GetAngleToPlayer, NPC_SELF, LVar0) - EVT_IF_LT(LVar0, 180) - EVT_SET(LVar1, 27) - EVT_ELSE - EVT_SET(LVar1, -27) - EVT_END_IF - EVT_CALL(GetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) - EVT_CALL(GetPlayerPos, LVarA, LVarB, LVarC) - EVT_SUB(LVarA, LVar2) - EVT_IF_LT(LVarA, 0) - EVT_MUL(LVarA, -1) - EVT_END_IF - EVT_IF_LT(LVarA, 20) - EVT_ADD(LVar2, LVar1) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PlayerMoveTo, LVar2, LVar4, 0) - EVT_CALL(PlayerFaceNpc, NPC_Bombette, 3) - EVT_END_IF - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_IF_EQ(GF_TRD06_Met_Bombette, FALSE) - EVT_SET(GF_TRD06_Met_Bombette, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_00DA) - EVT_WAIT(10 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(ShowChoice, MSG_Choice_000D) - EVT_IF_NE(LVar0, 0) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_00DB) - EVT_END_IF - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_00DC) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(ShowChoice, MSG_Choice_000D) - EVT_IF_NE(LVar0, 0) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_00DD) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.8)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 15 * DT) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_00DE) - EVT_CALL(N(ChangeNpcToPartner), NPC_Bombette, PARTNER_BOMBETTE) - EVT_SET(GB_StoryProgress, STORY_CH1_BOMBETTE_JOINED_PARTY) - EVT_CALL(N(LoadPartyImage)) - EVT_EXEC(N(EVS_PushSong)) - EVT_WAIT(15 * DT) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_018B, 160, 40) - EVT_EXEC(N(EVS_PopSong)) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_00DF) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_WAIT(15 * DT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(25 * DT) - EVT_CALL(PlaySoundAtNpc, NPC_PARTNER, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_PARTNER, EMOTE_EXCLAMATION, -45, 30, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(40 * DT) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_00E0) - EVT_EXEC_WAIT(N(EVS_Bombette_DemonstrateAbility)) - EVT_END_IF - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(5.0 / DT)) - EVT_RETURN - EVT_END + Thread + Call(AdjustCam, CAM_DEFAULT, Float(5.0 / DT), 0, Float(300.0), Float(18.0), Float(-7.0)) + EndThread + Call(GetAngleToPlayer, NPC_SELF, LVar0) + IfLt(LVar0, 180) + Set(LVar1, 27) + Else + Set(LVar1, -27) + EndIf + Call(GetNpcPos, NPC_SELF, LVar2, LVar3, LVar4) + Call(GetPlayerPos, LVarA, LVarB, LVarC) + Sub(LVarA, LVar2) + IfLt(LVarA, 0) + Mul(LVarA, -1) + EndIf + IfLt(LVarA, 20) + Add(LVar2, LVar1) + Call(SetPlayerSpeed, Float(3.0 / DT)) + Call(PlayerMoveTo, LVar2, LVar4, 0) + Call(PlayerFaceNpc, NPC_Bombette, 3) + EndIf + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + IfEq(GF_TRD06_Met_Bombette, FALSE) + Set(GF_TRD06_Met_Bombette, TRUE) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_00DA) + Wait(10 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + Call(EndSpeech, NPC_SELF, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(ShowChoice, MSG_Choice_000D) + IfNe(LVar0, 0) + Call(ContinueSpeech, NPC_SELF, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_00DB) + EndIf + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_00DC) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(ShowChoice, MSG_Choice_000D) + IfNe(LVar0, 0) + Call(ContinueSpeech, NPC_SELF, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_00DD) + EndIf + EndIf + IfEq(LVar0, 0) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcJumpscale, NPC_SELF, Float(0.8)) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 15 * DT) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(ContinueSpeech, NPC_SELF, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_00DE) + Call(N(ChangeNpcToPartner), NPC_Bombette, PARTNER_BOMBETTE) + Set(GB_StoryProgress, STORY_CH1_BOMBETTE_JOINED_PARTY) + Call(N(LoadPartyImage)) + Exec(N(EVS_PushSong)) + Wait(15 * DT) + Call(ShowMessageAtScreenPos, MSG_Menus_018B, 160, 40) + Exec(N(EVS_PopSong)) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_00DF) + Wait(1) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + Wait(15 * DT) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(25 * DT) + Call(PlaySoundAtNpc, NPC_PARTNER, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_PARTNER, EMOTE_EXCLAMATION, -45, 30, EMOTER_NPC, 0, 0, 0, 0) + Wait(40 * DT) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH1_00E0) + ExecWait(N(EVS_Bombette_DemonstrateAbility)) + EndIf + Call(ResetCam, CAM_DEFAULT, Float(5.0 / DT)) + Return + End }; EvtScript N(EVS_NpcInit_Bombette) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH1_BOMBETTE_JOINED_PARTY) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_ELSE - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bombette))) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH1_BOMBETTE_JOINED_PARTY) + Call(RemoveNpc, NPC_SELF) + Else + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bombette))) + EndIf + Return + End }; EvtScript N(EVS_NpcIdle_KoopaTroopa) = { - EVT_LABEL(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(PlaySoundAtCollider, COLLIDER_ttw, SOUND_METAL_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, 90, 15, EASING_COS_IN_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o93, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o94, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_Jailer_KoopaTroopa, -350, 0, 0) - EVT_CALL(SetNpcPos, NPC_Jailer_Bobomb_01, -370, 0, 0) - EVT_CALL(SetNpcPos, NPC_Jailer_Bobomb_02, -390, 0, 0) - EVT_CALL(SetNpcSpeed, NPC_Jailer_KoopaTroopa, EVT_FLOAT(4.0 / DT)) - EVT_CALL(SetNpcSpeed, NPC_Jailer_Bobomb_01, EVT_FLOAT(4.0 / DT)) - EVT_CALL(SetNpcSpeed, NPC_Jailer_Bobomb_02, EVT_FLOAT(4.0 / DT)) - EVT_CALL(SetNpcAnimation, NPC_Jailer_KoopaTroopa, ANIM_KoopaTroopa_Run) - EVT_CALL(SetNpcAnimation, NPC_Jailer_Bobomb_01, ANIM_Bobomb_Run) - EVT_CALL(SetNpcAnimation, NPC_Jailer_Bobomb_02, ANIM_Bobomb_Run) - EVT_CALL(SetNpcFlagBits, NPC_Jailer_KoopaTroopa, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Jailer_Bobomb_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Jailer_Bobomb_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_THREAD - EVT_CALL(NpcMoveTo, NPC_Jailer_KoopaTroopa, -237, 0, 0) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(NpcMoveTo, NPC_Jailer_Bobomb_01, -274, 25, 0) - EVT_END_THREAD - EVT_WAIT(15) - EVT_CALL(NpcMoveTo, NPC_Jailer_Bobomb_02, -266, -15, 0) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -260, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -260, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetNpcAnimation, NPC_Jailer_Bobomb_01, ANIM_Bobomb_Idle) - EVT_CALL(SetNpcAnimation, NPC_Jailer_Bobomb_02, ANIM_Bobomb_Idle) - EVT_CALL(SpeakToPlayer, NPC_Jailer_KoopaTroopa, ANIM_KoopaTroopa_Run, ANIM_KoopaTroopa_Idle, 0, MSG_CH1_00F0) - EVT_CALL(SetNpcAnimation, NPC_Jailer_Bobomb_01, ANIM_Bobomb_Run) - EVT_CALL(SetNpcAnimation, NPC_Jailer_Bobomb_02, ANIM_Bobomb_Run) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_THREAD - EVT_WAIT(60) - EVT_CALL(MakeLerp, 90, 0, 15, EASING_COS_IN_OUT) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o93, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o94, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(PlaySoundAtCollider, COLLIDER_ttw, SOUND_METAL_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(NpcMoveTo, NPC_Jailer_KoopaTroopa, -233, 147, 0) - EVT_CALL(NpcMoveTo, NPC_Jailer_KoopaTroopa, -167, 218, 0) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(NpcMoveTo, NPC_Jailer_Bobomb_01, -254, 144, 0) - EVT_CALL(NpcMoveTo, NPC_Jailer_Bobomb_01, -203, 222, 0) - EVT_END_THREAD - EVT_WAIT(15 * DT) - EVT_CALL(NpcMoveTo, NPC_Jailer_Bobomb_02, -265, 0, 0) - EVT_CALL(NpcMoveTo, NPC_Jailer_Bobomb_02, -186, 175, 0) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcJumpscale, NPC_Jailer_KoopaTroopa, EVT_FLOAT(1.0)) - EVT_CALL(GetNpcPos, NPC_Jailer_KoopaTroopa, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Jailer_KoopaTroopa, LVar0, LVar1, LVar2, 10 * DT) - EVT_CALL(SetNpcAnimation, NPC_Jailer_Bobomb_01, ANIM_Bobomb_Idle) - EVT_CALL(SetNpcAnimation, NPC_Jailer_Bobomb_02, ANIM_Bobomb_Idle) - EVT_CALL(SpeakToPlayer, NPC_Jailer_KoopaTroopa, ANIM_KoopaTroopa_Run, ANIM_KoopaTroopa_Idle, 0, MSG_CH1_00F1) - EVT_CALL(SetNpcAnimation, NPC_Jailer_Bobomb_01, ANIM_Bobomb_Run) - EVT_CALL(SetNpcAnimation, NPC_Jailer_Bobomb_02, ANIM_Bobomb_Run) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_RETURN - EVT_END + Label(0) + Call(GetSelfVar, 0, LVar0) + Wait(1) + IfEq(LVar0, 0) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Call(PlaySoundAtCollider, COLLIDER_ttw, SOUND_METAL_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, 90, 15, EASING_COS_IN_OUT) + Label(10) + Call(UpdateLerp) + Call(RotateModel, MODEL_o93, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_o94, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(SetNpcPos, NPC_Jailer_KoopaTroopa, -350, 0, 0) + Call(SetNpcPos, NPC_Jailer_Bobomb_01, -370, 0, 0) + Call(SetNpcPos, NPC_Jailer_Bobomb_02, -390, 0, 0) + Call(SetNpcSpeed, NPC_Jailer_KoopaTroopa, Float(4.0 / DT)) + Call(SetNpcSpeed, NPC_Jailer_Bobomb_01, Float(4.0 / DT)) + Call(SetNpcSpeed, NPC_Jailer_Bobomb_02, Float(4.0 / DT)) + Call(SetNpcAnimation, NPC_Jailer_KoopaTroopa, ANIM_KoopaTroopa_Run) + Call(SetNpcAnimation, NPC_Jailer_Bobomb_01, ANIM_Bobomb_Run) + Call(SetNpcAnimation, NPC_Jailer_Bobomb_02, ANIM_Bobomb_Run) + Call(SetNpcFlagBits, NPC_Jailer_KoopaTroopa, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Jailer_Bobomb_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Jailer_Bobomb_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Thread + Call(NpcMoveTo, NPC_Jailer_KoopaTroopa, -237, 0, 0) + EndThread + Thread + Wait(10) + Call(NpcMoveTo, NPC_Jailer_Bobomb_01, -274, 25, 0) + EndThread + Wait(15) + Call(NpcMoveTo, NPC_Jailer_Bobomb_02, -266, -15, 0) + Call(UseSettingsFrom, CAM_DEFAULT, -260, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, -260, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetNpcAnimation, NPC_Jailer_Bobomb_01, ANIM_Bobomb_Idle) + Call(SetNpcAnimation, NPC_Jailer_Bobomb_02, ANIM_Bobomb_Idle) + Call(SpeakToPlayer, NPC_Jailer_KoopaTroopa, ANIM_KoopaTroopa_Run, ANIM_KoopaTroopa_Idle, 0, MSG_CH1_00F0) + Call(SetNpcAnimation, NPC_Jailer_Bobomb_01, ANIM_Bobomb_Run) + Call(SetNpcAnimation, NPC_Jailer_Bobomb_02, ANIM_Bobomb_Run) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Thread + Wait(60) + Call(MakeLerp, 90, 0, 15, EASING_COS_IN_OUT) + Label(20) + Call(UpdateLerp) + Call(RotateModel, MODEL_o93, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_o94, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Call(PlaySoundAtCollider, COLLIDER_ttw, SOUND_METAL_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + EndThread + Thread + Call(NpcMoveTo, NPC_Jailer_KoopaTroopa, -233, 147, 0) + Call(NpcMoveTo, NPC_Jailer_KoopaTroopa, -167, 218, 0) + EndThread + Thread + Call(NpcMoveTo, NPC_Jailer_Bobomb_01, -254, 144, 0) + Call(NpcMoveTo, NPC_Jailer_Bobomb_01, -203, 222, 0) + EndThread + Wait(15 * DT) + Call(NpcMoveTo, NPC_Jailer_Bobomb_02, -265, 0, 0) + Call(NpcMoveTo, NPC_Jailer_Bobomb_02, -186, 175, 0) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetNpcJumpscale, NPC_Jailer_KoopaTroopa, Float(1.0)) + Call(GetNpcPos, NPC_Jailer_KoopaTroopa, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Jailer_KoopaTroopa, LVar0, LVar1, LVar2, 10 * DT) + Call(SetNpcAnimation, NPC_Jailer_Bobomb_01, ANIM_Bobomb_Idle) + Call(SetNpcAnimation, NPC_Jailer_Bobomb_02, ANIM_Bobomb_Idle) + Call(SpeakToPlayer, NPC_Jailer_KoopaTroopa, ANIM_KoopaTroopa_Run, ANIM_KoopaTroopa_Idle, 0, MSG_CH1_00F1) + Call(SetNpcAnimation, NPC_Jailer_Bobomb_01, ANIM_Bobomb_Run) + Call(SetNpcAnimation, NPC_Jailer_Bobomb_02, ANIM_Bobomb_Run) + Call(DisablePlayerInput, FALSE) + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Return + End }; EvtScript N(EVS_NpcDefeat_KoopaTroopa) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_SET(GB_StoryProgress, STORY_CH1_DEFEATED_DUNGEON_GUARDS) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Set(GB_StoryProgress, STORY_CH1_DEFEATED_DUNGEON_GUARDS) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_LOST) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_KoopaTroopa) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_KoopaTroopa))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_KoopaTroopa))) - EVT_IF_GE(GB_StoryProgress, STORY_CH1_DEFEATED_DUNGEON_GUARDS) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_KoopaTroopa))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_KoopaTroopa))) + IfGe(GB_StoryProgress, STORY_CH1_DEFEATED_DUNGEON_GUARDS) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Bobomb_Jailer) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH1_DEFEATED_DUNGEON_GUARDS) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH1_DEFEATED_DUNGEON_GUARDS) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Bobomb_01) = { - EVT_IF_EQ(GF_TRD06_BombedWall, FALSE) - EVT_IF_EQ(AF_TRD_MetPrisoner1, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_00E4) - EVT_SET(AF_TRD_MetPrisoner1, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_00E5) - EVT_SET(AF_TRD_MetPrisoner1, FALSE) - EVT_END_IF - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_00E6) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_TRD06_BombedWall, FALSE) + IfEq(AF_TRD_MetPrisoner1, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_00E4) + Set(AF_TRD_MetPrisoner1, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_00E5) + Set(AF_TRD_MetPrisoner1, FALSE) + EndIf + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Red_Talk, ANIM_WorldBobomb_Red_Idle, 0, MSG_CH1_00E6) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Bobomb_02) = { - EVT_IF_EQ(GF_TRD06_BombedWall, FALSE) - EVT_IF_EQ(AF_TRD_MetPrisoner2, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, MSG_CH1_00E7) - EVT_SET(AF_TRD_MetPrisoner2, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, MSG_CH1_00E8) - EVT_SET(AF_TRD_MetPrisoner2, FALSE) - EVT_END_IF - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, MSG_CH1_00E9) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_TRD06_BombedWall, FALSE) + IfEq(AF_TRD_MetPrisoner2, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, MSG_CH1_00E7) + Set(AF_TRD_MetPrisoner2, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, MSG_CH1_00E8) + Set(AF_TRD_MetPrisoner2, FALSE) + EndIf + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Blue_Talk, ANIM_WorldBobomb_Blue_Idle, 0, MSG_CH1_00E9) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Bobomb_03) = { - EVT_IF_EQ(GF_TRD06_BombedWall, FALSE) - EVT_IF_EQ(AF_TRD_MetPrisoner3, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, MSG_CH1_00EA) - EVT_SET(AF_TRD_MetPrisoner3, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, MSG_CH1_00EB) - EVT_SET(AF_TRD_MetPrisoner3, FALSE) - EVT_END_IF - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, MSG_CH1_00EC) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_TRD06_BombedWall, FALSE) + IfEq(AF_TRD_MetPrisoner3, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, MSG_CH1_00EA) + Set(AF_TRD_MetPrisoner3, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, MSG_CH1_00EB) + Set(AF_TRD_MetPrisoner3, FALSE) + EndIf + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, MSG_CH1_00EC) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Bobomb_04) = { - EVT_IF_EQ(GF_TRD06_BombedWall, FALSE) - EVT_IF_EQ(AF_TRD_MetPrisoner4, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, MSG_CH1_00ED) - EVT_SET(AF_TRD_MetPrisoner4, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, MSG_CH1_00EE) - EVT_SET(AF_TRD_MetPrisoner4, FALSE) - EVT_END_IF - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, MSG_CH1_00EF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_TRD06_BombedWall, FALSE) + IfEq(AF_TRD_MetPrisoner4, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, MSG_CH1_00ED) + Set(AF_TRD_MetPrisoner4, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, MSG_CH1_00EE) + Set(AF_TRD_MetPrisoner4, FALSE) + EndIf + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldBobomb_Green_Talk, ANIM_WorldBobomb_Green_Idle, 0, MSG_CH1_00EF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Bobomb_01) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bobomb_01))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bobomb_01))) + Return + End }; EvtScript N(EVS_NpcInit_Bobomb_02) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bobomb_02))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bobomb_02))) + Return + End }; EvtScript N(EVS_NpcInit_Bobomb_03) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bobomb_03))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bobomb_03))) + Return + End }; EvtScript N(EVS_NpcInit_Bobomb_04) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bobomb_04))) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bobomb_04))) + Return + End }; NpcData N(NpcData_Bombette) = { diff --git a/src/world/area_trd/trd_06/trd_06_4_npc_koopa_bros.c b/src/world/area_trd/trd_06/trd_06_4_npc_koopa_bros.c index 00d130252cb..76abb1b8909 100644 --- a/src/world/area_trd/trd_06/trd_06_4_npc_koopa_bros.c +++ b/src/world/area_trd/trd_06/trd_06_4_npc_koopa_bros.c @@ -11,9 +11,9 @@ MobileAISettings N(AISettings_KoopaBros) = { }; EvtScript N(EVS_NpcAI_KoopaBros) = { - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_KoopaBros))) - EVT_RETURN - EVT_END + Call(BasicAI_Main, Ref(N(AISettings_KoopaBros))) + Return + End }; NpcSettings N(NpcSettings_KoopaBros) = { @@ -32,18 +32,18 @@ NpcSettings N(NpcSettings_Unused) = { }; EvtScript N(EVS_Scene_ImprisonedKoopaBros) = { - EVT_WAIT(60) - EVT_CALL(EnableNpcAI, NPC_KoopaBros_Red, FALSE) - EVT_CALL(SpeakToPlayer, NPC_KoopaBros_Red, ANIM_KoopaBros_Red_Dizzy, ANIM_KoopaBros_Red_Dizzy, 0, MSG_CH1_010C) - EVT_CALL(EnableNpcAI, NPC_KoopaBros_Red, TRUE) - EVT_WAIT(30) - EVT_CALL(FadeOutMusic, 0, 2000) - EVT_WAIT(30) - EVT_CALL(GetEntryID, LVar0) - EVT_CALL(GotoMap, EVT_PTR("trd_10"), trd_10_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Wait(60) + Call(EnableNpcAI, NPC_KoopaBros_Red, FALSE) + Call(SpeakToPlayer, NPC_KoopaBros_Red, ANIM_KoopaBros_Red_Dizzy, ANIM_KoopaBros_Red_Dizzy, 0, MSG_CH1_010C) + Call(EnableNpcAI, NPC_KoopaBros_Red, TRUE) + Wait(30) + Call(FadeOutMusic, 0, 2000) + Wait(30) + Call(GetEntryID, LVar0) + Call(GotoMap, Ref("trd_10"), trd_10_ENTRY_1) + Wait(100) + Return + End }; NpcData N(NpcData_KoopaBros)[] = { diff --git a/src/world/area_trd/trd_06/trd_06_5_entity.c b/src/world/area_trd/trd_06/trd_06_5_entity.c index b6b86a31a76..a1f399548fa 100644 --- a/src/world/area_trd/trd_06/trd_06_5_entity.c +++ b/src/world/area_trd/trd_06/trd_06_5_entity.c @@ -2,7 +2,7 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), -150, 60, 100, 0, 6, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HeartBlock), -150, 60, 100, 0, 6, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_trd/trd_07/trd_07_0_header.c b/src/world/area_trd/trd_07/trd_07_0_header.c index 9f398b250cb..76d1a903308 100644 --- a/src/world/area_trd/trd_07/trd_07_0_header.c +++ b/src/world/area_trd/trd_07/trd_07_0_header.c @@ -15,8 +15,8 @@ MapSettings N(settings) = { }; EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_FORTRESS, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_KOOPA_FORTRESS, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Return + End }; diff --git a/src/world/area_trd/trd_07/trd_07_1_main.c b/src/world/area_trd/trd_07/trd_07_1_main.c index 5ded0d0a606..633404a18ea 100644 --- a/src/world/area_trd/trd_07/trd_07_1_main.c +++ b/src/world/area_trd/trd_07/trd_07_1_main.c @@ -10,46 +10,46 @@ EvtScript N(EVS_ExitWalk_trd_08_0) = EVT_EXIT_WALK(60, trd_07_ENTRY_1, "trd_08", EvtScript N(EVS_ExitWalk_trd_04_4) = EVT_EXIT_WALK(60, trd_07_ENTRY_0, "trd_04", trd_04_ENTRY_4); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_trd_08_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_trd_04_4)), TRIGGER_FLOOR_ABOVE, COLLIDER_tte, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_trd_08_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_trd_04_4)), TRIGGER_FLOOR_ABOVE, COLLIDER_tte, 1, 0) + Return + End }; EvtScript N(EVS_TexPan_1) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LABEL(10) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, 0) - EVT_ADD(LVar0, 100) - EVT_SUB(LVar1, 100) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Set(LVar0, 0) + Set(LVar1, 0) + Label(10) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, 0) + Add(LVar0, 100) + Sub(LVar1, 100) + Wait(1) + Goto(10) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_KOOPA_BROS_FORTRESS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_TexPan_1)) - EVT_EXEC_WAIT(N(EVS_SetupMagicDoors)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC_GET_TID(EnterWalk, MV_EnterWalkScriptID) - EVT_WAIT(1) - EVT_CALL(EnableTexPanning, MODEL_suimen2, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_KOOPA_BROS_FORTRESS) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_TexPan_1)) + ExecWait(N(EVS_SetupMagicDoors)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + ExecGetTID(EnterWalk, MV_EnterWalkScriptID) + Wait(1) + Call(EnableTexPanning, MODEL_suimen2, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 0, 90, -60, -70) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; diff --git a/src/world/area_trd/trd_07/trd_07_2_npc.c b/src/world/area_trd/trd_07/trd_07_2_npc.c index d3c3de73b95..051ff70f6ff 100644 --- a/src/world/area_trd/trd_07/trd_07_2_npc.c +++ b/src/world/area_trd/trd_07/trd_07_2_npc.c @@ -8,33 +8,33 @@ extern EvtScript N(EVS_RestoreMagicDoors); #include "world/common/util/GetDefeatedEnemyCount.inc.c" EvtScript N(EVS_NpcDefeat_KoopaTroopa) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(N(GetDefeatedEnemyCount), LVar0) - EVT_IF_EQ(LVar0, 1) // ??? - EVT_SET(GF_TRD07_Defeated_DungeonAmbush, TRUE) - EVT_EXEC(N(EVS_RestoreMagicDoors)) - EVT_END_IF - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(OnPlayerFled, 0) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(N(GetDefeatedEnemyCount), LVar0) + IfEq(LVar0, 1) // ??? + Set(GF_TRD07_Defeated_DungeonAmbush, TRUE) + Exec(N(EVS_RestoreMagicDoors)) + EndIf + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_FLED) + Call(OnPlayerFled, 0) + CaseEq(OUTCOME_ENEMY_FLED) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_KoopaTroopa) = { - EVT_CALL(SetSelfEnemyFlags, ENEMY_FLAG_NO_DROPS) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_KoopaTroopa))) - EVT_IF_EQ(GF_TRD07_Defeated_DungeonAmbush, TRUE) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetSelfEnemyFlags, ENEMY_FLAG_NO_DROPS) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_KoopaTroopa))) + IfEq(GF_TRD07_Defeated_DungeonAmbush, TRUE) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_KoopaTroopa) = { diff --git a/src/world/area_trd/trd_07/trd_07_3_magic_doors.c b/src/world/area_trd/trd_07/trd_07_3_magic_doors.c index 9810f351599..8b9add7f765 100644 --- a/src/world/area_trd/trd_07/trd_07_3_magic_doors.c +++ b/src/world/area_trd/trd_07/trd_07_3_magic_doors.c @@ -7,10 +7,10 @@ API_CALLABLE(N(GetPointsWithCamRelativeOffset)) { f32 posZ = evt_get_float_variable(script, *args++); f32 angle = evt_get_float_variable(script, *args++); - script->varTable[0] = EVT_FLOAT_TO_FIXED(posX + (sin_deg(clamp_angle(gCameras[CAM_DEFAULT].curYaw + angle + 270.0f)) * 1000.0f)); - script->varTable[1] = EVT_FLOAT_TO_FIXED(posZ - (cos_deg(clamp_angle(gCameras[CAM_DEFAULT].curYaw + angle + 270.0f)) * 1000.0f)); - script->varTable[2] = EVT_FLOAT_TO_FIXED(posX + (sin_deg(clamp_angle(gCameras[CAM_DEFAULT].curYaw + angle + 90.0f)) * 1000.0f)); - script->varTable[3] = EVT_FLOAT_TO_FIXED(posZ - (cos_deg(clamp_angle(gCameras[CAM_DEFAULT].curYaw + angle + 90.0f)) * 1000.0f)); + script->varTable[0] = Float_TO_FIXED(posX + (sin_deg(clamp_angle(gCameras[CAM_DEFAULT].curYaw + angle + 270.0f)) * 1000.0f)); + script->varTable[1] = Float_TO_FIXED(posZ - (cos_deg(clamp_angle(gCameras[CAM_DEFAULT].curYaw + angle + 270.0f)) * 1000.0f)); + script->varTable[2] = Float_TO_FIXED(posX + (sin_deg(clamp_angle(gCameras[CAM_DEFAULT].curYaw + angle + 90.0f)) * 1000.0f)); + script->varTable[3] = Float_TO_FIXED(posZ - (cos_deg(clamp_angle(gCameras[CAM_DEFAULT].curYaw + angle + 90.0f)) * 1000.0f)); return ApiStatus_DONE2; } @@ -27,284 +27,284 @@ API_CALLABLE(N(SpawnMovingDoorDust)) { // LVar0 = modelID EvtScript N(EVS_AnimateDoorRaising) = { - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(PlaySound, SOUND_TRD_MAGIC_DOOR_JUMP) - EVT_END_THREAD - EVT_THREAD + Thread + Wait(20) + Call(PlaySound, SOUND_TRD_MAGIC_DOOR_JUMP) + EndThread + Thread // input LVar0 ignored in this thread - EVT_CALL(MakeLerp, 100, 120, 20, EASING_QUADRATIC_IN) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SETF(MV_DoorScaleZ, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(MakeLerp, 120, 80, 20, EASING_QUADRATIC_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SETF(MV_DoorScaleZ, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(MakeLerp, 80, 100, 20, EASING_QUADRATIC_IN) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SETF(MV_DoorScaleZ, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_END_THREAD - EVT_THREAD + Call(MakeLerp, 100, 120, 20, EASING_QUADRATIC_IN) + Label(0) + Call(UpdateLerp) + DivF(LVar0, Float(100.0)) + SetF(MV_DoorScaleZ, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(MakeLerp, 120, 80, 20, EASING_QUADRATIC_OUT) + Label(1) + Call(UpdateLerp) + DivF(LVar0, Float(100.0)) + SetF(MV_DoorScaleZ, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(MakeLerp, 80, 100, 20, EASING_QUADRATIC_IN) + Label(2) + Call(UpdateLerp) + DivF(LVar0, Float(100.0)) + SetF(MV_DoorScaleZ, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(2) + EndIf + EndThread + Thread // input LVar0 ignored in this thread - EVT_CALL(MakeLerp, 100, 80, 20, EASING_QUADRATIC_IN) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SETF(MV_DoorScaleY, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(MakeLerp, 80, 120, 20, EASING_QUADRATIC_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SETF(MV_DoorScaleY, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(MakeLerp, 120, 100, 20, EASING_QUADRATIC_IN) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SETF(MV_DoorScaleY, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_END_THREAD - EVT_SETF(MV_DoorScaleZ, EVT_FLOAT(1.0)) - EVT_SETF(MV_DoorScaleY, EVT_FLOAT(1.0)) - EVT_THREAD + Call(MakeLerp, 100, 80, 20, EASING_QUADRATIC_IN) + Label(0) + Call(UpdateLerp) + DivF(LVar0, Float(100.0)) + SetF(MV_DoorScaleY, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(MakeLerp, 80, 120, 20, EASING_QUADRATIC_OUT) + Label(1) + Call(UpdateLerp) + DivF(LVar0, Float(100.0)) + SetF(MV_DoorScaleY, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(MakeLerp, 120, 100, 20, EASING_QUADRATIC_IN) + Label(2) + Call(UpdateLerp) + DivF(LVar0, Float(100.0)) + SetF(MV_DoorScaleY, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(2) + EndIf + EndThread + SetF(MV_DoorScaleZ, Float(1.0)) + SetF(MV_DoorScaleY, Float(1.0)) + Thread // input LVar0 used in this thread! - EVT_SET(LVar9, LVar0) - EVT_LOOP(20) - EVT_CALL(ScaleGroup, LVar9, EVT_FLOAT(1.0), MV_DoorScaleY, MV_DoorScaleZ) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(MakeLerp, 0, 80, 30, EASING_QUADRATIC_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, LVar9, 0, LVar0, 0) - EVT_CALL(ScaleGroup, LVar9, EVT_FLOAT(1.0), MV_DoorScaleY, MV_DoorScaleZ) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(MakeLerp, 80, 70, 10, EASING_QUADRATIC_IN) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, LVar9, 0, LVar0, 0) - EVT_CALL(ScaleGroup, LVar9, EVT_FLOAT(1.0), MV_DoorScaleY, MV_DoorScaleZ) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(61) - EVT_RETURN - EVT_END + Set(LVar9, LVar0) + Loop(20) + Call(ScaleGroup, LVar9, Float(1.0), MV_DoorScaleY, MV_DoorScaleZ) + Wait(1) + EndLoop + Call(MakeLerp, 0, 80, 30, EASING_QUADRATIC_OUT) + Label(1) + Call(UpdateLerp) + Call(TranslateGroup, LVar9, 0, LVar0, 0) + Call(ScaleGroup, LVar9, Float(1.0), MV_DoorScaleY, MV_DoorScaleZ) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(MakeLerp, 80, 70, 10, EASING_QUADRATIC_IN) + Label(2) + Call(UpdateLerp) + Call(TranslateGroup, LVar9, 0, LVar0, 0) + Call(ScaleGroup, LVar9, Float(1.0), MV_DoorScaleY, MV_DoorScaleZ) + Wait(1) + IfEq(LVar1, 1) + Goto(2) + EndIf + EndThread + Wait(61) + Return + End }; // LVar0 = modelID EvtScript N(EVS_AnimateDoorLowering) = { - EVT_SET(LVar9, LVar0) - EVT_CALL(MakeLerp, 70, 0, 20, EASING_CUBIC_IN) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, LVar9, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(PlaySound, SOUND_TRD_MAGIC_DOOR_LAND) - EVT_IF_EQ(LVar9, MODEL_migi) - EVT_CALL(N(SpawnMovingDoorDust), 270, 0, 40, 270) - EVT_CALL(N(SpawnMovingDoorDust), 270, 0, -40, 270) - EVT_ELSE - EVT_CALL(N(SpawnMovingDoorDust), -255, 0, 40, 90) - EVT_CALL(N(SpawnMovingDoorDust), -255, 0, -40, 90) - EVT_END_IF - EVT_CALL(MakeLerp, 0, 20, 10, EASING_QUADRATIC_OUT) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, LVar9, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(MakeLerp, 20, 0, 10, EASING_QUADRATIC_IN) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, LVar9, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_CALL(PlaySound, SOUND_TRD_MAGIC_DOOR_LAND) - EVT_IF_EQ(LVar9, MODEL_migi) - EVT_CALL(N(SpawnMovingDoorDust), 270, 0, 40, 270) - EVT_CALL(N(SpawnMovingDoorDust), 270, 0, -40, 270) - EVT_ELSE - EVT_CALL(N(SpawnMovingDoorDust), -255, 0, 40, 90) - EVT_CALL(N(SpawnMovingDoorDust), -255, 0, -40, 90) - EVT_END_IF - EVT_CALL(MakeLerp, 0, 10, 5, EASING_QUADRATIC_OUT) - EVT_LABEL(3) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, LVar9, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(3) - EVT_END_IF - EVT_CALL(MakeLerp, 10, 0, 5, EASING_QUADRATIC_IN) - EVT_LABEL(4) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, LVar9, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(4) - EVT_END_IF - EVT_CALL(PlaySound, SOUND_TRD_MAGIC_DOOR_LAND) - EVT_IF_EQ(LVar9, MODEL_migi) - EVT_CALL(N(SpawnMovingDoorDust), 270, 0, 40, 270) - EVT_CALL(N(SpawnMovingDoorDust), 270, 0, -40, 270) - EVT_CALL(EnableModel, MODEL_o44, FALSE) - EVT_ELSE - EVT_CALL(N(SpawnMovingDoorDust), -255, 0, 40, 90) - EVT_CALL(N(SpawnMovingDoorDust), -255, 0, -40, 90) - EVT_CALL(EnableModel, MODEL_o43, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVar9, LVar0) + Call(MakeLerp, 70, 0, 20, EASING_CUBIC_IN) + Label(0) + Call(UpdateLerp) + Call(TranslateGroup, LVar9, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(PlaySound, SOUND_TRD_MAGIC_DOOR_LAND) + IfEq(LVar9, MODEL_migi) + Call(N(SpawnMovingDoorDust), 270, 0, 40, 270) + Call(N(SpawnMovingDoorDust), 270, 0, -40, 270) + Else + Call(N(SpawnMovingDoorDust), -255, 0, 40, 90) + Call(N(SpawnMovingDoorDust), -255, 0, -40, 90) + EndIf + Call(MakeLerp, 0, 20, 10, EASING_QUADRATIC_OUT) + Label(1) + Call(UpdateLerp) + Call(TranslateGroup, LVar9, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + Call(MakeLerp, 20, 0, 10, EASING_QUADRATIC_IN) + Label(2) + Call(UpdateLerp) + Call(TranslateGroup, LVar9, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(2) + EndIf + Call(PlaySound, SOUND_TRD_MAGIC_DOOR_LAND) + IfEq(LVar9, MODEL_migi) + Call(N(SpawnMovingDoorDust), 270, 0, 40, 270) + Call(N(SpawnMovingDoorDust), 270, 0, -40, 270) + Else + Call(N(SpawnMovingDoorDust), -255, 0, 40, 90) + Call(N(SpawnMovingDoorDust), -255, 0, -40, 90) + EndIf + Call(MakeLerp, 0, 10, 5, EASING_QUADRATIC_OUT) + Label(3) + Call(UpdateLerp) + Call(TranslateGroup, LVar9, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(3) + EndIf + Call(MakeLerp, 10, 0, 5, EASING_QUADRATIC_IN) + Label(4) + Call(UpdateLerp) + Call(TranslateGroup, LVar9, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(4) + EndIf + Call(PlaySound, SOUND_TRD_MAGIC_DOOR_LAND) + IfEq(LVar9, MODEL_migi) + Call(N(SpawnMovingDoorDust), 270, 0, 40, 270) + Call(N(SpawnMovingDoorDust), 270, 0, -40, 270) + Call(EnableModel, MODEL_o44, FALSE) + Else + Call(N(SpawnMovingDoorDust), -255, 0, 40, 90) + Call(N(SpawnMovingDoorDust), -255, 0, -40, 90) + Call(EnableModel, MODEL_o43, FALSE) + EndIf + Return + End }; EvtScript N(EVS_RaiseMagicDoors) = { // for for enter walk scrip to complete - EVT_LABEL(10) - EVT_IS_THREAD_RUNNING(MV_EnterWalkScriptID, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SUSPEND_GROUP(EVT_GROUP_01) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(PlaySound, SOUND_CHIME_BEGIN_AMBUSH) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(N(GetPointsWithCamRelativeOffset), LVar0, LVar2, EVT_FLOAT(30.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, LVar0, LVar1) - EVT_CALL(SetCamPosB, CAM_DEFAULT, LVar2, LVar3) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(EnableModel, MODEL_o44, TRUE) - EVT_SET(LVar0, MODEL_migi) - EVT_EXEC_WAIT(N(EVS_AnimateDoorRaising)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, 400) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(N(GetPointsWithCamRelativeOffset), LVar0, LVar2, EVT_FLOAT(-60.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, LVar0, LVar1) - EVT_CALL(SetCamPosB, CAM_DEFAULT, LVar2, LVar3) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(EnableModel, MODEL_o43, TRUE) - EVT_SET(LVar0, MODEL_hidari) - EVT_EXEC_WAIT(N(EVS_AnimateDoorRaising)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_ttw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END + Label(10) + IsThreadRunning(MV_EnterWalkScriptID, LVar0) + IfEq(LVar0, 1) + Wait(1) + Goto(10) + EndIf + SetGroup(EVT_GROUP_00) + SuspendGroup(EVT_GROUP_01) + Call(DisablePlayerInput, TRUE) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(PlaySound, SOUND_CHIME_BEGIN_AMBUSH) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(N(GetPointsWithCamRelativeOffset), LVar0, LVar2, Float(30.0)) + Call(SetCamPosA, CAM_DEFAULT, LVar0, LVar1) + Call(SetCamPosB, CAM_DEFAULT, LVar2, LVar3) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(EnableModel, MODEL_o44, TRUE) + Set(LVar0, MODEL_migi) + ExecWait(N(EVS_AnimateDoorRaising)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar0, 400) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(N(GetPointsWithCamRelativeOffset), LVar0, LVar2, Float(-60.0)) + Call(SetCamPosA, CAM_DEFAULT, LVar0, LVar1) + Call(SetCamPosB, CAM_DEFAULT, LVar2, LVar3) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(EnableModel, MODEL_o43, TRUE) + Set(LVar0, MODEL_hidari) + ExecWait(N(EVS_AnimateDoorRaising)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_ttw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Call(DisablePlayerInput, FALSE) + ResumeGroup(EVT_GROUP_01) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + End }; EvtScript N(EVS_LowerMagicDoors) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(15) - EVT_CALL(PlaySound, SOUND_CHIME_SOLVED_PUZZLE) - EVT_WAIT(15) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(DisablePlayerInput, TRUE) + Wait(15) + Call(PlaySound, SOUND_CHIME_SOLVED_PUZZLE) + Wait(15) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) EVT_VEC3I_SET(LVar0, 220, 0, 0) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(N(GetPointsWithCamRelativeOffset), LVar0, LVar2, EVT_FLOAT(30.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, LVar0, LVar1) - EVT_CALL(SetCamPosB, CAM_DEFAULT, LVar2, LVar3) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_SET(LVar0, MODEL_migi) - EVT_EXEC_WAIT(N(EVS_AnimateDoorLowering)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_WAIT(1) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(N(GetPointsWithCamRelativeOffset), LVar0, LVar2, Float(30.0)) + Call(SetCamPosA, CAM_DEFAULT, LVar0, LVar1) + Call(SetCamPosB, CAM_DEFAULT, LVar2, LVar3) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Set(LVar0, MODEL_migi) + ExecWait(N(EVS_AnimateDoorLowering)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Wait(1) EVT_VEC3I_SET(LVar0, 220, 0, 0) - EVT_SUB(LVar0, 400) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(N(GetPointsWithCamRelativeOffset), LVar0, LVar2, EVT_FLOAT(-60.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, LVar0, LVar1) - EVT_CALL(SetCamPosB, CAM_DEFAULT, LVar2, LVar3) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_SET(LVar0, MODEL_hidari) - EVT_EXEC_WAIT(N(EVS_AnimateDoorLowering)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ttw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_END + Sub(LVar0, 400) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(N(GetPointsWithCamRelativeOffset), LVar0, LVar2, Float(-60.0)) + Call(SetCamPosA, CAM_DEFAULT, LVar0, LVar1) + Call(SetCamPosB, CAM_DEFAULT, LVar2, LVar3) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Set(LVar0, MODEL_hidari) + ExecWait(N(EVS_AnimateDoorLowering)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ttw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Call(DisablePlayerInput, FALSE) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + End }; EvtScript N(EVS_RestoreMagicDoors) = { - EVT_EXEC(N(EVS_LowerMagicDoors)) - EVT_RETURN - EVT_END + Exec(N(EVS_LowerMagicDoors)) + Return + End }; EvtScript N(EVS_SetupMagicDoors) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ttw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_o44, FALSE) - EVT_CALL(EnableModel, MODEL_o43, FALSE) - EVT_IF_EQ(GF_TRD07_Defeated_DungeonAmbush, FALSE) - EVT_EXEC(N(EVS_RaiseMagicDoors)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ttw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_o44, FALSE) + Call(EnableModel, MODEL_o43, FALSE) + IfEq(GF_TRD07_Defeated_DungeonAmbush, FALSE) + Exec(N(EVS_RaiseMagicDoors)) + EndIf + Return + End }; diff --git a/src/world/area_trd/trd_08/trd_08_0_header.c b/src/world/area_trd/trd_08/trd_08_0_header.c index ccc9d83b40c..91990f428da 100644 --- a/src/world/area_trd/trd_08/trd_08_0_header.c +++ b/src/world/area_trd/trd_08/trd_08_0_header.c @@ -14,8 +14,8 @@ MapSettings N(settings) = { }; EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_FORTRESS, 0, 8) - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_KOOPA_FORTRESS, 0, 8) + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Return + End }; diff --git a/src/world/area_trd/trd_08/trd_08_1_main.c b/src/world/area_trd/trd_08/trd_08_1_main.c index ad2341c8ec1..dbb73504d8a 100644 --- a/src/world/area_trd/trd_08/trd_08_1_main.c +++ b/src/world/area_trd/trd_08/trd_08_1_main.c @@ -9,48 +9,48 @@ extern NpcGroupList N(DefaultNPCs); EvtScript N(EVS_ExitWalk_trd_07_1) = EVT_EXIT_WALK(60, trd_08_ENTRY_0, "trd_07", trd_07_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_trd_07_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_trd_07_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_TexPan_Water) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, MODEL_suimen, TEX_PANNER_1) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LABEL(10) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, 0) - EVT_ADD(LVar0, 100) - EVT_SUB(LVar1, 100) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, MODEL_suimen, TEX_PANNER_1) + Set(LVar0, 0) + Set(LVar1, 0) + Label(10) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, 0) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_AUX, LVar1, 0) + Add(LVar0, 100) + Sub(LVar1, 100) + Wait(1) + Goto(10) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_KOOPA_BROS_FORTRESS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_ALT_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_TexPan_Water)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_o36, FALSE) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_CALL(EnableTexPanning, MODEL_suimen, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_KOOPA_BROS_FORTRESS) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_ALT_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_TexPan_Water)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tte, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_o36, FALSE) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Call(EnableTexPanning, MODEL_suimen, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 0, 90, -60, -70) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; diff --git a/src/world/area_trd/trd_08/trd_08_2_entity.c b/src/world/area_trd/trd_08/trd_08_2_entity.c index 19397a14a66..b3dc98240da 100644 --- a/src/world/area_trd/trd_08/trd_08_2_entity.c +++ b/src/world/area_trd/trd_08/trd_08_2_entity.c @@ -1,7 +1,7 @@ #include "trd_08.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_KOOPA_FORTRESS_KEY, -500, 16, 0, ITEM_SPAWN_MODE_KEY, GF_TRD08_Item_FortressKey) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_KOOPA_FORTRESS_KEY, -500, 16, 0, ITEM_SPAWN_MODE_KEY, GF_TRD08_Item_FortressKey) + Return + End }; diff --git a/src/world/area_trd/trd_08/trd_08_3_npc.c b/src/world/area_trd/trd_08/trd_08_3_npc.c index 5dfe90e3e3f..848c921625c 100644 --- a/src/world/area_trd/trd_08/trd_08_3_npc.c +++ b/src/world/area_trd/trd_08/trd_08_3_npc.c @@ -10,54 +10,54 @@ s32 N(FireBar_Sounds)[] = { }; EvtScript N(EVS_FireBar_Defeated) = { - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_LOOP(15) - EVT_LOOP(LVar1) - EVT_CALL(SetNpcFlagBits, LVar0, NPC_FLAG_INVISIBLE, TRUE) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_WAIT(1) - EVT_SET(LVar0, LVarA) - EVT_SET(LVar1, LVarB) - EVT_LOOP(LVar1) - EVT_CALL(SetNpcFlagBits, LVar0, NPC_FLAG_INVISIBLE, FALSE) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_WAIT(1) - EVT_SET(LVar0, LVarA) - EVT_SET(LVar1, LVarB) - EVT_END_LOOP - EVT_CALL(GetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(PlaySoundAt, SOUND_SEQ_FIRE_BAR_DEAD, SOUND_SPACE_DEFAULT, LVar1, LVar2, LVar3) - EVT_LOOP(10) - EVT_CALL(GetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(RandInt, 50, LVar4) - EVT_SUB(LVar4, 25) - EVT_CALL(RandInt, 30, LVar5) - EVT_ADD(LVar1, LVar4) - EVT_ADD(LVar2, LVar5) - EVT_PLAY_EFFECT(EFFECT_00, LVar1, LVar2, LVar3, 1, 20, 3, 2) - EVT_END_LOOP - EVT_IF_EQ(LVarA, NPC_FireBar_1A) - EVT_IF_EQ(AF_TRD08_FireBar1_Coins, FALSE) - EVT_SET(AF_TRD08_FireBar1_Coins, TRUE) - EVT_LOOP(10) - EVT_CALL(MakeItemEntity, ITEM_COIN, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) - EVT_END_LOOP - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVarA, NPC_FireBar_2A) - EVT_IF_EQ(AF_TRD08_FireBar2_Coins, FALSE) - EVT_SET(AF_TRD08_FireBar2_Coins, TRUE) - EVT_LOOP(10) - EVT_CALL(MakeItemEntity, ITEM_COIN, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) - EVT_END_LOOP - EVT_END_IF - EVT_END_IF - EVT_CALL(RemoveEncounter, LVarA) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Set(LVarB, LVar1) + Loop(15) + Loop(LVar1) + Call(SetNpcFlagBits, LVar0, NPC_FLAG_INVISIBLE, TRUE) + Add(LVar0, 1) + EndLoop + Wait(1) + Set(LVar0, LVarA) + Set(LVar1, LVarB) + Loop(LVar1) + Call(SetNpcFlagBits, LVar0, NPC_FLAG_INVISIBLE, FALSE) + Add(LVar0, 1) + EndLoop + Wait(1) + Set(LVar0, LVarA) + Set(LVar1, LVarB) + EndLoop + Call(GetNpcPos, LVar0, LVar1, LVar2, LVar3) + Call(PlaySoundAt, SOUND_SEQ_FIRE_BAR_DEAD, SOUND_SPACE_DEFAULT, LVar1, LVar2, LVar3) + Loop(10) + Call(GetNpcPos, LVar0, LVar1, LVar2, LVar3) + Call(RandInt, 50, LVar4) + Sub(LVar4, 25) + Call(RandInt, 30, LVar5) + Add(LVar1, LVar4) + Add(LVar2, LVar5) + PlayEffect(EFFECT_00, LVar1, LVar2, LVar3, 1, 20, 3, 2) + EndLoop + IfEq(LVarA, NPC_FireBar_1A) + IfEq(AF_TRD08_FireBar1_Coins, FALSE) + Set(AF_TRD08_FireBar1_Coins, TRUE) + Loop(10) + Call(MakeItemEntity, ITEM_COIN, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) + EndLoop + EndIf + EndIf + IfEq(LVarA, NPC_FireBar_2A) + IfEq(AF_TRD08_FireBar2_Coins, FALSE) + Set(AF_TRD08_FireBar2_Coins, TRUE) + Loop(10) + Call(MakeItemEntity, ITEM_COIN, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) + EndLoop + EndIf + EndIf + Call(RemoveEncounter, LVarA) + Return + End }; FireBarAISettings N(AISettings_FireBar_01) = { @@ -77,31 +77,31 @@ FireBarAISettings N(AISettings_FireBar_02) = { }; EvtScript N(EVS_NpcAuxAI_00) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, 0, TRUE) - EVT_CALL(EnableNpcShadow, NPC_SELF, TRUE) - EVT_THREAD - EVT_CALL(RandInt, 5, LVar0) - EVT_ADD(LVar0, 1) - EVT_WAIT(LVar0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Fire_Brighest_Still) - EVT_WAIT(1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Fire_Brighest_Burn) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcFlagBits, NPC_SELF, 0, TRUE) + Call(EnableNpcShadow, NPC_SELF, TRUE) + Thread + Call(RandInt, 5, LVar0) + Add(LVar0, 1) + Wait(LVar0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Fire_Brighest_Still) + Wait(1) + Call(SetNpcAnimation, NPC_SELF, ANIM_Fire_Brighest_Burn) + EndThread + Return + End }; EvtScript N(EVS_NpcAI_FireBar_01) = { - EVT_CALL(N(FireBarAI_Main), EVT_PTR(N(AISettings_FireBar_01))) - EVT_RETURN - EVT_END + Call(N(FireBarAI_Main), Ref(N(AISettings_FireBar_01))) + Return + End }; EvtScript N(EVS_NpcAI_FireBar_02) = { - EVT_CALL(N(FireBarAI_Main), EVT_PTR(N(AISettings_FireBar_02))) - EVT_RETURN - EVT_END + Call(N(FireBarAI_Main), Ref(N(AISettings_FireBar_02))) + Return + End }; NpcSettings N(NpcSettings_FireBar_01) = { diff --git a/src/world/area_trd/trd_09/trd_09_0_header.c b/src/world/area_trd/trd_09/trd_09_0_header.c index b1eaa6e37bc..eff7325e5ff 100644 --- a/src/world/area_trd/trd_09/trd_09_0_header.c +++ b/src/world/area_trd/trd_09/trd_09_0_header.c @@ -17,16 +17,16 @@ MapSettings N(settings) = { }; EvtScript N(EVS_SetupMusic) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH1_KOOPA_BROS_FIRING_BLASTERS) - EVT_IF_EQ(GF_TRD09_Defeated_BillBlasters, FALSE) - EVT_CALL(SetMusicTrack, 0, SONG_BULLET_BILL_ASSAULT, 0, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_FORTRESS, 0, 8) - EVT_END_IF - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_FORTRESS, 0, 8) - EVT_END_IF - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH1_KOOPA_BROS_FIRING_BLASTERS) + IfEq(GF_TRD09_Defeated_BillBlasters, FALSE) + Call(SetMusicTrack, 0, SONG_BULLET_BILL_ASSAULT, 0, 8) + Else + Call(SetMusicTrack, 0, SONG_KOOPA_FORTRESS, 0, 8) + EndIf + Else + Call(SetMusicTrack, 0, SONG_KOOPA_FORTRESS, 0, 8) + EndIf + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Return + End }; diff --git a/src/world/area_trd/trd_09/trd_09_1_main.c b/src/world/area_trd/trd_09/trd_09_1_main.c index bbbdb11364b..7f7b327b42a 100644 --- a/src/world/area_trd/trd_09/trd_09_1_main.c +++ b/src/world/area_trd/trd_09/trd_09_1_main.c @@ -12,59 +12,59 @@ EvtScript N(EVS_ExitDoors_trd_10_0) = EVT_EXIT_DOUBLE_DOOR(trd_09_ENTRY_1, "trd_ COLLIDER_tt4, MODEL_o60, MODEL_o65); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_01_3)), TRIGGER_WALL_PRESS_A, COLLIDER_tt5, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_10_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tt4, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_trd_01_3)), TRIGGER_WALL_PRESS_A, COLLIDER_tt5, 1, 0) + BindTrigger(Ref(N(EVS_ExitDoors_trd_10_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tt4, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SUSPEND_GROUP(EVT_GROUP_01) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(trd_09_ENTRY_0) - EVT_SET(LVar2, MODEL_o67) - EVT_SET(LVar3, MODEL_o63) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(trd_09_ENTRY_1) - EVT_SET(LVar2, MODEL_o60) - EVT_SET(LVar3, MODEL_o65) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_END_SWITCH - EVT_RESUME_GROUP(EVT_GROUP_01) - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + SetGroup(EVT_GROUP_00) + SuspendGroup(EVT_GROUP_01) + Exec(N(EVS_BindExitTriggers)) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(trd_09_ENTRY_0) + Set(LVar2, MODEL_o67) + Set(LVar3, MODEL_o63) + ExecWait(EnterDoubleDoor) + CaseEq(trd_09_ENTRY_1) + Set(LVar2, MODEL_o60) + Set(LVar3, MODEL_o65) + ExecWait(EnterDoubleDoor) + EndSwitch + ResumeGroup(EVT_GROUP_01) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_KOOPA_BROS_FORTRESS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(GetDemoState, LVar0) - EVT_IF_NE(LVar0, DEMO_STATE_NONE) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DemoNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_PlayDemoScene)) - EVT_RETURN - EVT_END_IF - EVT_IF_LE(GB_StoryProgress, STORY_CH1_DEFEATED_KOOPA_BROS) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_END_IF - EVT_IF_EQ(GF_TRD09_Defeated_BillBlasters, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o85, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_KOOPA_BROS_FORTRESS) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(GetDemoState, LVar0) + IfNe(LVar0, DEMO_STATE_NONE) + Call(MakeNpcs, TRUE, Ref(N(DemoNPCs))) + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_PlayDemoScene)) + Return + EndIf + IfLe(GB_StoryProgress, STORY_CH1_DEFEATED_KOOPA_BROS) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + EndIf + IfEq(GF_TRD09_Defeated_BillBlasters, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o85, COLLIDER_FLAGS_UPPER_MASK) + EndIf + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_EnterMap)) + Wait(1) + Return + End }; diff --git a/src/world/area_trd/trd_09/trd_09_2_entity.c b/src/world/area_trd/trd_09/trd_09_2_entity.c index 7ffc9a77780..7d13cff9451 100644 --- a/src/world/area_trd/trd_09/trd_09_2_entity.c +++ b/src/world/area_trd/trd_09/trd_09_2_entity.c @@ -2,20 +2,20 @@ #include "entity.h" EvtScript N(EVS_BombRock) = { - EVT_SET(GF_TRD09_BombedRock, TRUE) - EVT_RETURN - EVT_END + Set(GF_TRD09_BombedRock, TRUE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_TRD09_BombedRock, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BombableRock2), -470, -75, 139, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_BombRock))) - EVT_END_IF - EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), 1400, -15, 135, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 1490, -15, 135, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -540, -15, 135, 0, ITEM_MAPLE_SYRUP, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_TRD09_ItemBlock_MapleSyrup) - EVT_RETURN - EVT_END + IfEq(GF_TRD09_BombedRock, FALSE) + Call(MakeEntity, Ref(Entity_BombableRock2), -470, -75, 139, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_BombRock))) + EndIf + Call(MakeEntity, Ref(Entity_HeartBlock), 1400, -15, 135, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_SavePoint), 1490, -15, 135, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_YellowBlock), -540, -15, 135, 0, ITEM_MAPLE_SYRUP, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_TRD09_ItemBlock_MapleSyrup) + Return + End }; diff --git a/src/world/area_trd/trd_09/trd_09_3_npc.c b/src/world/area_trd/trd_09/trd_09_3_npc.c index e95cdbdc991..68504bcd08a 100644 --- a/src/world/area_trd/trd_09/trd_09_3_npc.c +++ b/src/world/area_trd/trd_09/trd_09_3_npc.c @@ -25,111 +25,111 @@ API_CALLABLE(N(GetBulletBillVar)) { } EvtScript N(EVS_NpcAuxAI_BillBlaster) = { - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_ACTIVE_WHILE_OFFSCREEN, 1) - EVT_RETURN - EVT_END + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_ACTIVE_WHILE_OFFSCREEN, 1) + Return + End }; EvtScript N(D_80240844_9BDEA4) = { - EVT_LABEL(0) - EVT_SETF(LVar0, EVT_FLOAT(400.0)) - EVT_SET(LVar1, 1) - EVT_CALL(GetNpcYaw, NPC_SELF, LVar2) - EVT_SET(LVar3, 10) - EVT_SET(LVarA, ANIM_BillBlaster_Idle) - EVT_SET(LVarB, ANIM_BillBlaster_Idle) - EVT_EXEC_WAIT(EVS_800936C0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_BillBlaster_Fire) - EVT_WAIT(15) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcYaw, NPC_SELF, LVar3) - EVT_CALL(AddVectorPolar, LVar0, LVar2, EVT_FLOAT(20.0), LVar3) - EVT_ADD(LVar1, 12) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_BillBlaster_Idle) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_ADD(LVar0, 1) - EVT_CALL(SetNpcVar, LVar0, 0, 1) - EVT_LABEL(1) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_ADD(LVar0, 1) - EVT_CALL(GetNpcVar, LVar0, 0, LVar1) - EVT_IF_EQ(LVar1, 0) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(RandInt, 30, LVar0) - EVT_ADD(LVar0, 30) - EVT_WAIT(LVar0) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + SetF(LVar0, Float(400.0)) + Set(LVar1, 1) + Call(GetNpcYaw, NPC_SELF, LVar2) + Set(LVar3, 10) + Set(LVarA, ANIM_BillBlaster_Idle) + Set(LVarB, ANIM_BillBlaster_Idle) + ExecWait(EVS_800936C0) + Call(SetNpcAnimation, NPC_SELF, ANIM_BillBlaster_Fire) + Wait(15) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(GetNpcYaw, NPC_SELF, LVar3) + Call(AddVectorPolar, LVar0, LVar2, Float(20.0), LVar3) + Add(LVar1, 12) + Call(SetNpcAnimation, NPC_SELF, ANIM_BillBlaster_Idle) + Call(GetSelfNpcID, LVar0) + Add(LVar0, 1) + Call(SetNpcVar, LVar0, 0, 1) + Label(1) + Call(GetSelfNpcID, LVar0) + Add(LVar0, 1) + Call(GetNpcVar, LVar0, 0, LVar1) + IfEq(LVar1, 0) + Wait(1) + Goto(1) + EndIf + Call(RandInt, 30, LVar0) + Add(LVar0, 30) + Wait(LVar0) + Goto(0) + Return + End }; EvtScript N(EVS_NpcHit_BillBlaster) = { - EVT_CALL(SetBattleMusic, SONG_SPECIAL_BATTLE) - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_NONE) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_PARTNER) - EVT_SET(LVar0, ANIM_BillBlaster_Hurt) - EVT_EXEC_WAIT(EVS_NpcHitRecoil) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_SPIN) - EVT_THREAD - EVT_CALL(func_800458CC, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LVarA, 0) - EVT_LOOP(30) - EVT_ADD(LVarA, 40) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, LVarA, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_IF - EVT_END_THREAD - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetBattleMusic, SONG_SPECIAL_BATTLE) + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_NONE) + CaseOrEq(ENCOUNTER_TRIGGER_JUMP) + CaseOrEq(ENCOUNTER_TRIGGER_HAMMER) + CaseOrEq(ENCOUNTER_TRIGGER_PARTNER) + Set(LVar0, ANIM_BillBlaster_Hurt) + ExecWait(EVS_NpcHitRecoil) + CaseEq(ENCOUNTER_TRIGGER_SPIN) + Thread + Call(func_800458CC, LVar0) + IfEq(LVar0, 0) + Set(LVarA, 0) + Loop(30) + Add(LVarA, 40) + Call(SetNpcRotation, NPC_SELF, 0, LVarA, 0) + Wait(1) + EndLoop + EndIf + EndThread + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(D_80240B80_9BE1E0) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_FLED) + CaseEq(OUTCOME_ENEMY_FLED) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; EvtScript N(EVS_NpcAuxAI_BulletBill) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(D_80240C1C_9BE27C) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(D_80240C2C_9BE28C) = { - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, 0) - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(DoNpcDefeat) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetNpcRotation, NPC_SELF, 0, 0, 0) + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(DoNpcDefeat) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + CaseEq(OUTCOME_PLAYER_FLED) + CaseEq(OUTCOME_ENEMY_FLED) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndSwitch + Return + End }; NpcSettings N(missing_80240CE4) = { @@ -155,313 +155,313 @@ NpcSettings N(missing_80240D10) = { }; EvtScript N(EVS_NpcAuxAI_KoopaBros_Red) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH1_KOOPA_BROS_FIRING_BLASTERS) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH1_KOOPA_BROS_FIRING_BLASTERS) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcAI_KoopaBros_Red) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_IF_LT(LVar0, -370) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(20 * DT) - EVT_CALL(FadeOutMusic, 0, 2000 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 1300, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 1490, 0, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 1466, EVT_FLOAT(41.6)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.5 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20 * DT) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 1466, EVT_FLOAT(41.6)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 1490, 60, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 25, -9) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(20 * DT) - EVT_CALL(PlaySound, SOUND_METAL_DOOR_OPEN) - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_BROS_THEME, 0, 8) - EVT_CALL(MakeLerp, 0, 110, 10, EASING_COS_IN_OUT) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o60, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o65, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_CALL(SetNpcVar, NPC_KoopaBros_Green, 0, 1) - EVT_CALL(SetNpcVar, NPC_KoopaBros_Yellow, 0, 1) - EVT_CALL(SetNpcVar, NPC_KoopaBros_Black, 0, 1) - EVT_WAIT(60 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Red_Run) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.8)) - EVT_CALL(NpcMoveTo, NPC_SELF, 1490, 0, 0) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_KoopaBros_Red_PointForward, ANIM_KoopaBros_Red_PointForward, 0, MSG_CH1_00F2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 1300, 0, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 1466, EVT_FLOAT(41.6)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 1250, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Red_Land) - EVT_CALL(NpcJump0, NPC_SELF, 1440, 30, 0, 20 * DT) - EVT_CALL(NpcJump0, NPC_SELF, 1380, 0, 0, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Red_Run) - EVT_CALL(NpcMoveTo, NPC_SELF, 1360, 0, 0) - EVT_WAIT(20 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Red_Idle) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_KoopaBros_Red_PointForward, ANIM_KoopaBros_Red_PointForward, 0, MSG_CH1_00F3) - EVT_CALL(SetNpcVar, NPC_KoopaBros_Green, 0, 2) - EVT_CALL(SetNpcVar, NPC_KoopaBros_Yellow, 0, 2) - EVT_CALL(SetNpcVar, NPC_KoopaBros_Black, 0, 2) - EVT_CALL(SetSelfVar, 0, 1) - EVT_CALL(SetMusicTrack, 0, SONG_BULLET_BILL_ASSAULT, 0, 8) - EVT_WAIT(60 * DT) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 1300, 0, 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.5 / DT)) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0 / DT)) - EVT_SET(GB_StoryProgress, STORY_CH1_KOOPA_BROS_FIRING_BLASTERS) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(RotateModel, MODEL_o60, 0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o65, 0, 0, 1, 0) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + IfLt(LVar0, -370) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Wait(20 * DT) + Call(FadeOutMusic, 0, 2000 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, 1300, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 1490, 0, 0) + Call(SetCamPosB, CAM_DEFAULT, 1466, Float(41.6)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.5 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20 * DT) + Call(SetCamPosB, CAM_DEFAULT, 1466, Float(41.6)) + Call(SetPanTarget, CAM_DEFAULT, 1490, 60, 0) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, 25, -9) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(20 * DT) + Call(PlaySound, SOUND_METAL_DOOR_OPEN) + Call(SetMusicTrack, 0, SONG_KOOPA_BROS_THEME, 0, 8) + Call(MakeLerp, 0, 110, 10, EASING_COS_IN_OUT) + Label(2) + Call(UpdateLerp) + Call(RotateModel, MODEL_o60, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_o65, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(2) + EndIf + Call(SetNpcVar, NPC_KoopaBros_Green, 0, 1) + Call(SetNpcVar, NPC_KoopaBros_Yellow, 0, 1) + Call(SetNpcVar, NPC_KoopaBros_Black, 0, 1) + Wait(60 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Red_Run) + Call(SetNpcSpeed, NPC_SELF, Float(3.0 / DT)) + Call(SetNpcJumpscale, NPC_SELF, Float(0.8)) + Call(NpcMoveTo, NPC_SELF, 1490, 0, 0) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_SELF, ANIM_KoopaBros_Red_PointForward, ANIM_KoopaBros_Red_PointForward, 0, MSG_CH1_00F2) + Call(UseSettingsFrom, CAM_DEFAULT, 1300, 0, 0) + Call(SetCamPosB, CAM_DEFAULT, 1466, Float(41.6)) + Call(SetPanTarget, CAM_DEFAULT, 1250, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Red_Land) + Call(NpcJump0, NPC_SELF, 1440, 30, 0, 20 * DT) + Call(NpcJump0, NPC_SELF, 1380, 0, 0, 20 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Red_Run) + Call(NpcMoveTo, NPC_SELF, 1360, 0, 0) + Wait(20 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Red_Idle) + Call(SpeakToPlayer, NPC_SELF, ANIM_KoopaBros_Red_PointForward, ANIM_KoopaBros_Red_PointForward, 0, MSG_CH1_00F3) + Call(SetNpcVar, NPC_KoopaBros_Green, 0, 2) + Call(SetNpcVar, NPC_KoopaBros_Yellow, 0, 2) + Call(SetNpcVar, NPC_KoopaBros_Black, 0, 2) + Call(SetSelfVar, 0, 1) + Call(SetMusicTrack, 0, SONG_BULLET_BILL_ASSAULT, 0, 8) + Wait(60 * DT) + Call(UseSettingsFrom, CAM_DEFAULT, 1300, 0, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.5 / DT)) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0 / DT)) + Set(GB_StoryProgress, STORY_CH1_KOOPA_BROS_FIRING_BLASTERS) + Call(DisablePlayerInput, FALSE) + Call(RotateModel, MODEL_o60, 0, 0, -1, 0) + Call(RotateModel, MODEL_o65, 0, 0, 1, 0) + Call(RemoveNpc, NPC_SELF) + Return + End }; EvtScript N(EVS_NpcAuxAI_KoopaBros_Black) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH1_KOOPA_BROS_FIRING_BLASTERS) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH1_KOOPA_BROS_FIRING_BLASTERS) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcAuxAI_KoopaBros_Yellow) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH1_KOOPA_BROS_FIRING_BLASTERS) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH1_KOOPA_BROS_FIRING_BLASTERS) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcAuxAI_KoopaBros_Green) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH1_KOOPA_BROS_FIRING_BLASTERS) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH1_KOOPA_BROS_FIRING_BLASTERS) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcAI_KoopaBros_Black) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_LABEL(10) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Black_Run) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.8)) - EVT_CALL(NpcMoveTo, NPC_SELF, 1520, 20, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Black_Land) - EVT_CALL(NpcJump0, NPC_SELF, 1470, 30, 30, 20 * DT) - EVT_CALL(NpcJump0, NPC_SELF, 1410, 0, 40, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Black_Run) - EVT_CALL(NpcMoveTo, NPC_SELF, 1330, 50, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Black_StillCrouch) - EVT_LABEL(20) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Black_PointForward) - EVT_WAIT(100 * DT) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Label(10) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Wait(1) + Goto(10) + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Black_Run) + Call(SetNpcSpeed, NPC_SELF, Float(3.0 / DT)) + Call(SetNpcJumpscale, NPC_SELF, Float(0.8)) + Call(NpcMoveTo, NPC_SELF, 1520, 20, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Black_Land) + Call(NpcJump0, NPC_SELF, 1470, 30, 30, 20 * DT) + Call(NpcJump0, NPC_SELF, 1410, 0, 40, 20 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Black_Run) + Call(NpcMoveTo, NPC_SELF, 1330, 50, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Black_StillCrouch) + Label(20) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 1) + Wait(1) + Goto(20) + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Black_PointForward) + Wait(100 * DT) + Call(RemoveNpc, NPC_SELF) + Return + End }; EvtScript N(EVS_NpcAI_KoopaBros_Yellow) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_LABEL(10) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Yellow_Run) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.8)) - EVT_CALL(NpcMoveTo, NPC_SELF, 1505, 5, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Yellow_Land) - EVT_CALL(NpcJump0, NPC_SELF, 1455, 30, 5, 20 * DT) - EVT_CALL(NpcJump0, NPC_SELF, 1395, 0, 5, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Yellow_Run) - EVT_CALL(NpcMoveTo, NPC_SELF, 1315, 5, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Yellow_StillCrouch) - EVT_LABEL(20) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Yellow_PointForward) - EVT_WAIT(100 * DT) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Label(10) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Wait(1) + Goto(10) + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Yellow_Run) + Call(SetNpcSpeed, NPC_SELF, Float(3.0 / DT)) + Call(SetNpcJumpscale, NPC_SELF, Float(0.8)) + Call(NpcMoveTo, NPC_SELF, 1505, 5, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Yellow_Land) + Call(NpcJump0, NPC_SELF, 1455, 30, 5, 20 * DT) + Call(NpcJump0, NPC_SELF, 1395, 0, 5, 20 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Yellow_Run) + Call(NpcMoveTo, NPC_SELF, 1315, 5, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Yellow_StillCrouch) + Label(20) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 1) + Wait(1) + Goto(20) + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Yellow_PointForward) + Wait(100 * DT) + Call(RemoveNpc, NPC_SELF) + Return + End }; EvtScript N(EVS_NpcAI_KoopaBros_Green) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_LABEL(10) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Green_Run) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(3.0 / DT)) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.8)) - EVT_CALL(NpcMoveTo, NPC_SELF, 1490, -10, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Green_Land) - EVT_CALL(NpcJump0, NPC_SELF, 1440, 30, -20, 20 * DT) - EVT_CALL(NpcJump0, NPC_SELF, 1380, 0, -30, 20 * DT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Green_Run) - EVT_CALL(NpcMoveTo, NPC_SELF, 1300, -40, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Green_StillCrouch) - EVT_LABEL(20) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Green_PointForward) - EVT_WAIT(100 * DT) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Label(10) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Wait(1) + Goto(10) + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Green_Run) + Call(SetNpcSpeed, NPC_SELF, Float(3.0 / DT)) + Call(SetNpcJumpscale, NPC_SELF, Float(0.8)) + Call(NpcMoveTo, NPC_SELF, 1490, -10, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Green_Land) + Call(NpcJump0, NPC_SELF, 1440, 30, -20, 20 * DT) + Call(NpcJump0, NPC_SELF, 1380, 0, -30, 20 * DT) + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Green_Run) + Call(NpcMoveTo, NPC_SELF, 1300, -40, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Green_StillCrouch) + Label(20) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 1) + Wait(1) + Goto(20) + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_KoopaBros_Green_PointForward) + Wait(100 * DT) + Call(RemoveNpc, NPC_SELF) + Return + End }; EvtScript N(EVS_NpcAI_BillBlaster) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH1_KOOPA_BROS_FIRING_BLASTERS) - EVT_LABEL(100) - EVT_CALL(GetNpcVar, NPC_KoopaBros_Red, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(100) - EVT_END_IF - EVT_END_IF - EVT_LABEL(0) - EVT_SET(LVarA, NPC_BulletBill_01) - EVT_LOOP(10) + IfLt(GB_StoryProgress, STORY_CH1_KOOPA_BROS_FIRING_BLASTERS) + Label(100) + Call(GetNpcVar, NPC_KoopaBros_Red, 0, LVar0) + IfEq(LVar0, 0) + Wait(1) + Goto(100) + EndIf + EndIf + Label(0) + Set(LVarA, NPC_BulletBill_01) + Loop(10) // if the bullet bill does not have an assigned owner, assign ourself and fire - EVT_CALL(N(GetBulletBillVar), LVarA, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_CALL(SetNpcVar, LVarA, 0, LVar0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_BillBlaster_Fire) - EVT_WAIT(15) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_BillBlaster_Idle) - EVT_CALL(RandInt, 100, LVar0) - EVT_ADD(LVar0, 60) - EVT_WAIT(LVar0) - EVT_END_IF - EVT_ADD(LVarA, 1) - EVT_END_LOOP - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(N(GetBulletBillVar), LVarA, 0, LVar0) + IfEq(LVar0, 0) + Call(GetSelfNpcID, LVar0) + Call(SetNpcVar, LVarA, 0, LVar0) + Call(SetNpcAnimation, NPC_SELF, ANIM_BillBlaster_Fire) + Wait(15) + Call(SetNpcAnimation, NPC_SELF, ANIM_BillBlaster_Idle) + Call(RandInt, 100, LVar0) + Add(LVar0, 60) + Wait(LVar0) + EndIf + Add(LVarA, 1) + EndLoop + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_NpcAI_BulletBill) = { - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_ACTIVE_WHILE_OFFSCREEN, 1) - EVT_LABEL(1) - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SelfEnemyOverrideSyncPos, 0) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_LABEL(2) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_BulletBill_Fire) - EVT_CALL(EnableNpcShadow, NPC_SELF, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) - EVT_CALL(SelfEnemyOverrideSyncPos, 1) - EVT_CALL(GetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(GetNpcYaw, LVar0, LVar4) - EVT_CALL(AddVectorPolar, LVar1, LVar3, EVT_FLOAT(14.0), LVar4) - EVT_ADD(LVar2, 11) - EVT_CALL(SetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar4, 0) - EVT_CALL(func_80045838, -1, SOUND_BLASTER_FIRE, SOUND_PARAM_MORE_QUIET) - EVT_SET(LVarA, LVar1) - EVT_SUB(LVarA, 10) - EVT_SET(LVarB, LVar2) - EVT_ADD(LVarB, 5) - EVT_SET(LVarC, LVar3) - EVT_ADD(LVarC, 3) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, LVarA, LVarB, LVarC, 0, 0) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(6.0)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(NPC_BillBlaster_01) - EVT_CALL(NpcMoveTo, NPC_SELF, -437, LVar3, 0) - EVT_CASE_EQ(NPC_BillBlaster_02) - EVT_CALL(NpcMoveTo, NPC_SELF, -460, LVar3, 0) - EVT_CASE_EQ(NPC_BillBlaster_03) - EVT_CALL(NpcMoveTo, NPC_SELF, -450, LVar3, 0) - EVT_END_SWITCH - EVT_CALL(func_80045838, -1, SOUND_SEQ_BULLET_BILL_EXPLODE, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_BulletBill_Hurt) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 5) - EVT_ADD(LVar2, 1) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, EVT_FLOAT(0.05), 20) - EVT_ADD(LVar2, 1) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 0, LVar0, LVar1, LVar2, EVT_FLOAT(1.2), 25) - EVT_WAIT(3) - EVT_GOTO(1) - EVT_RETURN - EVT_END + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_ACTIVE_WHILE_OFFSCREEN, 1) + Label(1) + Call(SetSelfVar, 0, 0) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SelfEnemyOverrideSyncPos, 0) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Label(2) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Wait(1) + Goto(2) + EndIf + Wait(15) + Call(SetNpcAnimation, NPC_SELF, ANIM_BulletBill_Fire) + Call(EnableNpcShadow, NPC_SELF, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) + Call(SelfEnemyOverrideSyncPos, 1) + Call(GetNpcPos, LVar0, LVar1, LVar2, LVar3) + Call(GetNpcYaw, LVar0, LVar4) + Call(AddVectorPolar, LVar1, LVar3, Float(14.0), LVar4) + Add(LVar2, 11) + Call(SetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) + Call(InterpNpcYaw, NPC_SELF, LVar4, 0) + Call(func_80045838, -1, SOUND_BLASTER_FIRE, SOUND_PARAM_MORE_QUIET) + Set(LVarA, LVar1) + Sub(LVarA, 10) + Set(LVarB, LVar2) + Add(LVarB, 5) + Set(LVarC, LVar3) + Add(LVarC, 3) + PlayEffect(EFFECT_WALKING_DUST, 2, LVarA, LVarB, LVarC, 0, 0) + Call(SetNpcSpeed, NPC_SELF, Float(6.0)) + Switch(LVar0) + CaseEq(NPC_BillBlaster_01) + Call(NpcMoveTo, NPC_SELF, -437, LVar3, 0) + CaseEq(NPC_BillBlaster_02) + Call(NpcMoveTo, NPC_SELF, -460, LVar3, 0) + CaseEq(NPC_BillBlaster_03) + Call(NpcMoveTo, NPC_SELF, -450, LVar3, 0) + EndSwitch + Call(func_80045838, -1, SOUND_SEQ_BULLET_BILL_EXPLODE, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_BulletBill_Hurt) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 5) + Add(LVar2, 1) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, Float(0.05), 20) + Add(LVar2, 1) + PlayEffect(EFFECT_RING_BLAST, 0, LVar0, LVar1, LVar2, Float(1.2), 25) + Wait(3) + Goto(1) + Return + End }; EvtScript N(EVS_NpcDefeat_BulletBill) = { - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, 0) - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_THREAD - EVT_WAIT(20) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_BulletBill))) - EVT_END_THREAD - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(OnPlayerFled, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetNpcRotation, NPC_SELF, 0, 0, 0) + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Thread + Wait(20) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_BulletBill))) + EndThread + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_FLED) + Call(OnPlayerFled, 0) + EndSwitch + Return + End }; NpcSettings N(NpcSettings_KoopaBros_Red) = { @@ -526,21 +526,21 @@ NpcSettings N(NpcSettings_BulletBill) = { }; EvtScript N(EVS_NpcDefeat_BillBlaster) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o85, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GF_TRD09_Defeated_BillBlasters, TRUE) - EVT_CALL(DoNpcDefeat) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o85, COLLIDER_FLAGS_UPPER_MASK) + Set(GF_TRD09_Defeated_BillBlasters, TRUE) + Call(DoNpcDefeat) + Return + End }; EvtScript N(EVS_NpcInit_BillBlaster) = { - EVT_IF_EQ(GF_TRD09_Defeated_BillBlasters, FALSE) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_BillBlaster))) - EVT_ELSE - EVT_CALL(RemoveEncounter, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_TRD09_Defeated_BillBlasters, FALSE) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_BillBlaster))) + Else + Call(RemoveEncounter, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_BillBlasters)[] = { @@ -677,18 +677,18 @@ NpcGroupList N(DefaultNPCs) = { }; EvtScript N(EVS_NpcIdle_BulletBill_Demo) = { - EVT_CALL(GetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(6.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, -460, LVar3, 0) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) + Call(SetNpcSpeed, NPC_SELF, Float(6.0)) + Call(NpcMoveTo, NPC_SELF, -460, LVar3, 0) + Return + End }; EvtScript N(EVS_NpcInit_BulletBill_Demo) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_BulletBill_Demo))) - EVT_CALL(SelfEnemyOverrideSyncPos, 1) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_BulletBill_Demo))) + Call(SelfEnemyOverrideSyncPos, 1) + Return + End }; NpcData N(NpcData_BulletBill_Demo1) = { diff --git a/src/world/area_trd/trd_09/trd_09_4_demo.c b/src/world/area_trd/trd_09/trd_09_4_demo.c index 342ecd9e819..e855a1f0f32 100644 --- a/src/world/area_trd/trd_09/trd_09_4_demo.c +++ b/src/world/area_trd/trd_09/trd_09_4_demo.c @@ -2,77 +2,77 @@ #include "world/partners.h" EvtScript N(EVS_ProvideDemoInputs) = { - EVT_WAIT(5) - EVT_CALL(DemoJoystickXY, 78, 0) - EVT_WAIT(11) - EVT_CALL(DemoJoystickXY, 79, 1) - EVT_CALL(DemoSetButtons, BUTTON_A) - EVT_WAIT(7) - EVT_CALL(DemoSetButtons, 0) - EVT_WAIT(34) - EVT_CALL(DemoSetButtons, BUTTON_A) - EVT_WAIT(4) - EVT_CALL(DemoSetButtons, 0) - EVT_WAIT(9) - EVT_CALL(DemoJoystickXY, 78, 1) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 76, 6) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 71, 31) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 66, 51) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 63, 60) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 63, 61) - EVT_WAIT(7) - EVT_CALL(DemoJoystickXY, 64, 61) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 65, 59) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 65, 56) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 67, 45) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 71, 28) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 75, 14) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 77, 6) - EVT_WAIT(1) - EVT_CALL(DemoJoystickXY, 78, 2) - EVT_WAIT(13) - EVT_CALL(DemoJoystickXY, 78, 3) - EVT_CALL(DemoSetButtons, BUTTON_A) - EVT_WAIT(9) - EVT_CALL(DemoSetButtons, 0) - EVT_IF_EQ(GF_DemoSceneDone, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_DemoSceneDone, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("trd_09"), trd_09_ENTRY_2, TRANSITION_END_DEMO_SCENE_BLACK) - EVT_WAIT(123) - EVT_RETURN - EVT_END + Wait(5) + Call(DemoJoystickXY, 78, 0) + Wait(11) + Call(DemoJoystickXY, 79, 1) + Call(DemoSetButtons, BUTTON_A) + Wait(7) + Call(DemoSetButtons, 0) + Wait(34) + Call(DemoSetButtons, BUTTON_A) + Wait(4) + Call(DemoSetButtons, 0) + Wait(9) + Call(DemoJoystickXY, 78, 1) + Wait(1) + Call(DemoJoystickXY, 76, 6) + Wait(1) + Call(DemoJoystickXY, 71, 31) + Wait(1) + Call(DemoJoystickXY, 66, 51) + Wait(1) + Call(DemoJoystickXY, 63, 60) + Wait(1) + Call(DemoJoystickXY, 63, 61) + Wait(7) + Call(DemoJoystickXY, 64, 61) + Wait(1) + Call(DemoJoystickXY, 65, 59) + Wait(1) + Call(DemoJoystickXY, 65, 56) + Wait(1) + Call(DemoJoystickXY, 67, 45) + Wait(1) + Call(DemoJoystickXY, 71, 28) + Wait(1) + Call(DemoJoystickXY, 75, 14) + Wait(1) + Call(DemoJoystickXY, 77, 6) + Wait(1) + Call(DemoJoystickXY, 78, 2) + Wait(13) + Call(DemoJoystickXY, 78, 3) + Call(DemoSetButtons, BUTTON_A) + Wait(9) + Call(DemoSetButtons, 0) + IfEq(GF_DemoSceneDone, TRUE) + Return + EndIf + Set(GF_DemoSceneDone, TRUE) + Call(GotoMapSpecial, Ref("trd_09"), trd_09_ENTRY_2, TRANSITION_END_DEMO_SCENE_BLACK) + Wait(123) + Return + End }; EvtScript N(EVS_MonitorDemoState) = { - EVT_WAIT(10) - EVT_LOOP(0) - EVT_CALL(GetDemoState, LVar0) - EVT_IF_EQ(LVar0, DEMO_STATE_CHANGE_MAP) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_EQ(GF_DemoSceneDone, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_DemoSceneDone, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("trd_09"), trd_09_ENTRY_2, TRANSITION_END_DEMO_SCENE_WHITE) - EVT_WAIT(113) - EVT_RETURN - EVT_END + Wait(10) + Loop(0) + Call(GetDemoState, LVar0) + IfEq(LVar0, DEMO_STATE_CHANGE_MAP) + BreakLoop + EndIf + Wait(1) + EndLoop + IfEq(GF_DemoSceneDone, TRUE) + Return + EndIf + Set(GF_DemoSceneDone, TRUE) + Call(GotoMapSpecial, Ref("trd_09"), trd_09_ENTRY_2, TRANSITION_END_DEMO_SCENE_WHITE) + Wait(113) + Return + End }; s32 N(DemoInitState) = 0; @@ -105,11 +105,11 @@ API_CALLABLE(N(SetupDemoScene)) { } EvtScript N(EVS_PlayDemoScene) = { - EVT_CALL(N(SetupDemoScene)) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 90) - EVT_SET(GF_DemoSceneDone, FALSE) - EVT_EXEC(N(EVS_MonitorDemoState)) - EVT_EXEC(N(EVS_ProvideDemoInputs)) - EVT_RETURN - EVT_END + Call(N(SetupDemoScene)) + Call(SetNpcYaw, NPC_PARTNER, 90) + Set(GF_DemoSceneDone, FALSE) + Exec(N(EVS_MonitorDemoState)) + Exec(N(EVS_ProvideDemoInputs)) + Return + End }; diff --git a/src/world/area_trd/trd_10/trd_10_0_header.c b/src/world/area_trd/trd_10/trd_10_0_header.c index bbc1cf27c0e..2fe1a4b2cd0 100644 --- a/src/world/area_trd/trd_10/trd_10_0_header.c +++ b/src/world/area_trd/trd_10/trd_10_0_header.c @@ -15,15 +15,15 @@ MapSettings N(settings) = { }; EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH1_DEFEATED_KOOPA_BROS) - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_BROS_THEME, 1, 8) - EVT_CASE_EQ(STORY_CH1_DEFEATED_KOOPA_BROS) - EVT_CALL(FadeOutMusic, 0, 500) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_FORTRESS, 0, 8) - EVT_END_SWITCH - EVT_CALL(UseDoorSounds, DOOR_SOUNDS_METAL) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH1_DEFEATED_KOOPA_BROS) + Call(SetMusicTrack, 0, SONG_KOOPA_BROS_THEME, 1, 8) + CaseEq(STORY_CH1_DEFEATED_KOOPA_BROS) + Call(FadeOutMusic, 0, 500) + CaseDefault + Call(SetMusicTrack, 0, SONG_KOOPA_FORTRESS, 0, 8) + EndSwitch + Call(UseDoorSounds, DOOR_SOUNDS_METAL) + Return + End }; diff --git a/src/world/area_trd/trd_10/trd_10_1_main.c b/src/world/area_trd/trd_10/trd_10_1_main.c index bb7cde312a3..778fbc1277a 100644 --- a/src/world/area_trd/trd_10/trd_10_1_main.c +++ b/src/world/area_trd/trd_10/trd_10_1_main.c @@ -15,138 +15,138 @@ API_CALLABLE(N(SetMapChangeFadeRate)) { } EvtScript N(EVS_BossDefeated) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_CH1_KOOPA_BROS_FIRING_BLASTERS) - EVT_SET(GB_StoryProgress, STORY_CH1_DEFEATED_KOOPA_BROS) - EVT_CALL(GotoMap, EVT_PTR("trd_06"), trd_06_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_CASE_EQ(STORY_CH1_DEFEATED_KOOPA_BROS) - EVT_SET(LVar0, 1) - EVT_CALL(GetEntryID, LVar1) - EVT_IF_EQ(LVar1, trd_10_ENTRY_1) - EVT_SET(LVar0, 0) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_RETURN - EVT_END_SWITCH - EVT_IF_EQ(LVar0, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -135, 85, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.6)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -135, 30, 0) + Switch(GB_StoryProgress) + CaseEq(STORY_CH1_KOOPA_BROS_FIRING_BLASTERS) + Set(GB_StoryProgress, STORY_CH1_DEFEATED_KOOPA_BROS) + Call(GotoMap, Ref("trd_06"), trd_06_ENTRY_2) + Wait(100) + Return + CaseEq(STORY_CH1_DEFEATED_KOOPA_BROS) + Set(LVar0, 1) + Call(GetEntryID, LVar1) + IfEq(LVar1, trd_10_ENTRY_1) + Set(LVar0, 0) + EndIf + CaseDefault + Return + EndSwitch + IfEq(LVar0, 0) + Call(DisablePlayerInput, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, -135, 85, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.6)) + Call(SetPanTarget, CAM_DEFAULT, -135, 30, 0) EVT_SPIRIT_ADJUST_CAM(10000) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(N(StarSpiritEffectFunc2), 0, 180, -135, 10, 0, -135, 85, 0, 30, 0) - EVT_THREAD - EVT_CALL(N(StarSpiritEffectFunc3)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(PlaySound, SOUND_LOOP_STAR_ORB_RISING) - EVT_CALL(N(StarSpiritEffectFunc1)) - EVT_CALL(StopSound, SOUND_LOOP_STAR_ORB_RISING) - EVT_CALL(PlaySoundAt, SOUND_STAR_ORB_BURST, SOUND_SPACE_DEFAULT, -135, 85, 0) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(45) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(180) - EVT_WAIT(115) - EVT_CALL(PlaySoundAt, SOUND_STAR_CARD_APPEARS, SOUND_SPACE_DEFAULT, -135, 85, 0) - EVT_END_THREAD - EVT_CALL(N(StarSpiritEffectFunc4), 1) - EVT_THREAD - EVT_WAIT(80) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_ADD(LVar1, 100) - EVT_CALL(SetCamDistance, CAM_DEFAULT, LVar1) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -135, 0, 0) - EVT_CALL(N(StarSpiritEffectFunc4), 2) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar2, LVar3, LVar4) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar2, LVar3, LVar4) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ELSE - EVT_CALL(N(StarSpiritEffectFunc5), 0, -135, 30, 0, 0) - EVT_THREAD - EVT_CALL(N(StarSpiritEffectFunc6)) - EVT_END_THREAD - EVT_WAIT(1) - EVT_END_IF - EVT_CALL(N(StarSpiritEffectFunc4), 3) - EVT_CALL(PlaySoundAtPlayer, SOUND_RESCUE_STAR_SPIRIT, SOUND_SPACE_DEFAULT) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(GB_StoryProgress, STORY_CH1_STAR_SPIRIT_RESCUED) - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_23"), kmr_23_ENTRY_0, TRANSITION_GET_STAR_CARD) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(N(StarSpiritEffectFunc2), 0, 180, -135, 10, 0, -135, 85, 0, 30, 0) + Thread + Call(N(StarSpiritEffectFunc3)) + EndThread + Thread + Wait(1) + Call(PlaySound, SOUND_LOOP_STAR_ORB_RISING) + Call(N(StarSpiritEffectFunc1)) + Call(StopSound, SOUND_LOOP_STAR_ORB_RISING) + Call(PlaySoundAt, SOUND_STAR_ORB_BURST, SOUND_SPACE_DEFAULT, -135, 85, 0) + EndThread + Thread + Wait(45) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + EndThread + Thread + Wait(180) + Wait(115) + Call(PlaySoundAt, SOUND_STAR_CARD_APPEARS, SOUND_SPACE_DEFAULT, -135, 85, 0) + EndThread + Call(N(StarSpiritEffectFunc4), 1) + Thread + Wait(80) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndThread + Add(LVar1, 100) + Call(SetCamDistance, CAM_DEFAULT, LVar1) + Call(SetPanTarget, CAM_DEFAULT, -135, 0, 0) + Call(N(StarSpiritEffectFunc4), 2) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Call(UseSettingsFrom, CAM_DEFAULT, LVar2, LVar3, LVar4) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar2, LVar3, LVar4) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Else + Call(N(StarSpiritEffectFunc5), 0, -135, 30, 0, 0) + Thread + Call(N(StarSpiritEffectFunc6)) + EndThread + Wait(1) + EndIf + Call(N(StarSpiritEffectFunc4), 3) + Call(PlaySoundAtPlayer, SOUND_RESCUE_STAR_SPIRIT, SOUND_SPACE_DEFAULT) + Call(DisablePlayerInput, TRUE) + Set(GB_StoryProgress, STORY_CH1_STAR_SPIRIT_RESCUED) + Call(GotoMapSpecial, Ref("kmr_23"), kmr_23_ENTRY_0, TRANSITION_GET_STAR_CARD) + Wait(100) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(trd_10_ENTRY_0) - EVT_SET(LVar2, MODEL_o192) - EVT_SET(LVar3, MODEL_o191) - EVT_EXEC_WAIT(EnterDoubleDoor) - EVT_CASE_EQ(trd_10_ENTRY_1) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, -253, 0, 0) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 90) - EVT_WAIT(3) - EVT_CALL(EnablePartnerAI) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(trd_10_ENTRY_0) + Set(LVar2, MODEL_o192) + Set(LVar3, MODEL_o191) + ExecWait(EnterDoubleDoor) + CaseEq(trd_10_ENTRY_1) + Call(DisablePartnerAI, 0) + Call(SetNpcPos, NPC_PARTNER, -253, 0, 0) + Call(SetNpcYaw, NPC_PARTNER, 90) + Wait(3) + Call(EnablePartnerAI) + EndSwitch + Return + End }; EvtScript N(EVS_ExitDoors_trd_09_1) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, trd_10_ENTRY_0) - EVT_SET(LVar1, COLLIDER_ttw) - EVT_SET(LVar2, MODEL_o192) - EVT_SET(LVar3, MODEL_o191) - EVT_EXEC(ExitDoubleDoor) - EVT_WAIT(17) - EVT_CALL(GotoMap, EVT_PTR("trd_09"), trd_09_ENTRY_1) - EVT_END_IF //@bug unmatched endif - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerInput, TRUE) + Set(LVar0, trd_10_ENTRY_0) + Set(LVar1, COLLIDER_ttw) + Set(LVar2, MODEL_o192) + Set(LVar3, MODEL_o191) + Exec(ExitDoubleDoor) + Wait(17) + Call(GotoMap, Ref("trd_09"), trd_09_ENTRY_1) + EndIf //@bug unmatched endif + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_trd_09_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitDoors_trd_09_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_KOOPA_BROS_FORTRESS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(N(SetMapChangeFadeRate)) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_InitFakeBowser)) - EVT_EXEC(N(EVS_SetupFakeBowser)) - EVT_IF_EQ(GB_StoryProgress, STORY_CH1_DEFEATED_KOOPA_BROS) - EVT_EXEC(N(EVS_BossDefeated)) - EVT_END_IF - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH1_DEFEATED_KOOPA_BROS) - EVT_EXEC(N(EVS_EnterMap)) - EVT_END_IF - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_KOOPA_BROS_FORTRESS) + Call(SetSpriteShading, SHADING_NONE) + Call(N(SetMapChangeFadeRate)) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_InitFakeBowser)) + Exec(N(EVS_SetupFakeBowser)) + IfEq(GB_StoryProgress, STORY_CH1_DEFEATED_KOOPA_BROS) + Exec(N(EVS_BossDefeated)) + EndIf + Exec(N(EVS_BindExitTriggers)) + Exec(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH1_DEFEATED_KOOPA_BROS) + Exec(N(EVS_EnterMap)) + EndIf + Wait(1) + Return + End }; diff --git a/src/world/area_trd/trd_10/trd_10_2_npc.c b/src/world/area_trd/trd_10/trd_10_2_npc.c index f51d742dd2c..e0c67755c34 100644 --- a/src/world/area_trd/trd_10/trd_10_2_npc.c +++ b/src/world/area_trd/trd_10/trd_10_2_npc.c @@ -12,275 +12,275 @@ API_CALLABLE(N(IsPartnerBombette)) { } EvtScript N(EVS_NpcAuxAI_KoopaBros_01) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH1_DEFEATED_KOOPA_BROS) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH1_DEFEATED_KOOPA_BROS) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + Return + End }; EvtScript N(EVS_NpcAux_KoopaBros_01) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcAI_KoopaBros_01) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetPlayerPos, -333, 0, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, -363, 0, 0) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -240, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -240, -170, 0) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 18, -3) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -240, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -240, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.2 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, EVT_FLOAT(0.5), 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(PlaySound, SOUND_METAL_DOOR_OPEN) - EVT_CALL(MakeLerp, 0, 80, 10, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o192, LVar0, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o191, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0 / DT)) - EVT_CALL(PlayerMoveTo, -220, 0, 0) - EVT_CALL(MakeLerp, -80, 0, 10, EASING_LINEAR) - EVT_LABEL(11) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o192, LVar0, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o191, LVar0, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(11) - EVT_END_IF - EVT_CALL(PlaySound, SOUND_METAL_DOOR_CLOSE) - EVT_CALL(SetNpcPos, NPC_KoopaBros_01, -32, 0, 0) - EVT_CALL(NpcMoveTo, NPC_KoopaBros_01, -88, 0, 15 * DT) - EVT_WAIT(10 * DT) - EVT_CALL(SetNpcImgFXParams, NPC_KoopaBros_01, IMGFX_SET_ANIM, IMGFX_ANIM_STARTLE, 2, 1, 0) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Black_Shock) - EVT_WAIT(12 * DT) - EVT_CALL(SetNpcImgFXParams, NPC_KoopaBros_01, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Black_Idle) - EVT_WAIT(10 * DT) - EVT_CALL(SpeakToPlayer, NPC_KoopaBros_01, ANIM_KoopaBros_Black_Walk, ANIM_KoopaBros_Black_Idle, 0, MSG_CH1_00F4) - EVT_CALL(SetNpcPos, NPC_KoopaBros_02, -32, 0, 0) - EVT_CALL(NpcMoveTo, NPC_KoopaBros_02, -64, 0, 10 * DT) - EVT_CALL(SpeakToPlayer, NPC_KoopaBros_02, ANIM_KoopaBros_Red_Walk, ANIM_KoopaBros_Red_Idle, 0, MSG_CH1_00F5) - EVT_CALL(NpcMoveTo, NPC_KoopaBros_02, 0, 0, 10 * DT) - EVT_CALL(InterpNpcYaw, NPC_KoopaBros_01, -10, 4) - EVT_CALL(NpcMoveTo, NPC_KoopaBros_01, 0, 0, 10 * DT) - EVT_WAIT(30 * DT) - EVT_CALL(SetNpcPos, NPC_KoopaBros_01, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_KoopaBros_01, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_KoopaBros_01, NPC_FLAG_HAS_SHADOW, FALSE) - EVT_CALL(SetNpcPos, NPC_KoopaBros_02, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_KoopaBros_03, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_KoopaBros_04, NPC_DISPOSE_LOCATION) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH1_00F6, 300, 100) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH1_00F7, 300, 100) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH1_00F8, 300, 100) - EVT_CALL(PlaySoundAt, SOUND_DISTANT_THUD, SOUND_SPACE_DEFAULT, 0, 0, 0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(1.0)) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH1_00F9, 300, 100) - EVT_WAIT(30 * DT) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH1_00FA, 300, 100) - EVT_WAIT(30 * DT) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH1_00FB, 300, 100) - EVT_WAIT(10 * DT) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH1_00FC, 300, 100) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -160, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -160, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.2 / DT)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_SET(AF_TRD_FakeBowserRevealed, TRUE) - EVT_WAIT(60 * DT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetNpcPos, NPC_KoopaBros_01, -155, 0, 0) - EVT_CALL(StartBossBattle, SONG_FAKE_BOWSER_BATTLE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(SetPlayerPos, -333, 0, 0) + Call(SetNpcPos, NPC_PARTNER, -363, 0, 0) + Call(UseSettingsFrom, CAM_DEFAULT, -240, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, -240, -170, 0) + Call(SetCamPitch, CAM_DEFAULT, 18, -3) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(UseSettingsFrom, CAM_DEFAULT, -240, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, -240, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.2 / DT)) + Call(PanToTarget, CAM_DEFAULT, Float(0.5), 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(PlaySound, SOUND_METAL_DOOR_OPEN) + Call(MakeLerp, 0, 80, 10, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(RotateModel, MODEL_o192, LVar0, 0, -1, 0) + Call(RotateModel, MODEL_o191, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(SetPlayerSpeed, Float(3.0 / DT)) + Call(PlayerMoveTo, -220, 0, 0) + Call(MakeLerp, -80, 0, 10, EASING_LINEAR) + Label(11) + Call(UpdateLerp) + Call(RotateModel, MODEL_o192, LVar0, 0, 1, 0) + Call(RotateModel, MODEL_o191, LVar0, 0, -1, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(11) + EndIf + Call(PlaySound, SOUND_METAL_DOOR_CLOSE) + Call(SetNpcPos, NPC_KoopaBros_01, -32, 0, 0) + Call(NpcMoveTo, NPC_KoopaBros_01, -88, 0, 15 * DT) + Wait(10 * DT) + Call(SetNpcImgFXParams, NPC_KoopaBros_01, IMGFX_SET_ANIM, IMGFX_ANIM_STARTLE, 2, 1, 0) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Black_Shock) + Wait(12 * DT) + Call(SetNpcImgFXParams, NPC_KoopaBros_01, IMGFX_CLEAR, 0, 0, 0, 0) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Black_Idle) + Wait(10 * DT) + Call(SpeakToPlayer, NPC_KoopaBros_01, ANIM_KoopaBros_Black_Walk, ANIM_KoopaBros_Black_Idle, 0, MSG_CH1_00F4) + Call(SetNpcPos, NPC_KoopaBros_02, -32, 0, 0) + Call(NpcMoveTo, NPC_KoopaBros_02, -64, 0, 10 * DT) + Call(SpeakToPlayer, NPC_KoopaBros_02, ANIM_KoopaBros_Red_Walk, ANIM_KoopaBros_Red_Idle, 0, MSG_CH1_00F5) + Call(NpcMoveTo, NPC_KoopaBros_02, 0, 0, 10 * DT) + Call(InterpNpcYaw, NPC_KoopaBros_01, -10, 4) + Call(NpcMoveTo, NPC_KoopaBros_01, 0, 0, 10 * DT) + Wait(30 * DT) + Call(SetNpcPos, NPC_KoopaBros_01, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_KoopaBros_01, NPC_FLAG_INVISIBLE, TRUE) + Call(SetNpcFlagBits, NPC_KoopaBros_01, NPC_FLAG_HAS_SHADOW, FALSE) + Call(SetNpcPos, NPC_KoopaBros_02, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_KoopaBros_03, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_KoopaBros_04, NPC_DISPOSE_LOCATION) + Call(ShowMessageAtScreenPos, MSG_CH1_00F6, 300, 100) + Call(ShowMessageAtScreenPos, MSG_CH1_00F7, 300, 100) + Call(ShowMessageAtScreenPos, MSG_CH1_00F8, 300, 100) + Call(PlaySoundAt, SOUND_DISTANT_THUD, SOUND_SPACE_DEFAULT, 0, 0, 0) + Call(ShakeCam, CAM_DEFAULT, 0, 20, Float(1.0)) + Call(ShowMessageAtScreenPos, MSG_CH1_00F9, 300, 100) + Wait(30 * DT) + Call(ShowMessageAtScreenPos, MSG_CH1_00FA, 300, 100) + Wait(30 * DT) + Call(ShowMessageAtScreenPos, MSG_CH1_00FB, 300, 100) + Wait(10 * DT) + Call(ShowMessageAtScreenPos, MSG_CH1_00FC, 300, 100) + Call(UseSettingsFrom, CAM_DEFAULT, -160, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, -160, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.2 / DT)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Set(AF_TRD_FakeBowserRevealed, TRUE) + Wait(60 * DT) + Call(DisablePlayerInput, FALSE) + Call(SetNpcPos, NPC_KoopaBros_01, -155, 0, 0) + Call(StartBossBattle, SONG_FAKE_BOWSER_BATTLE) + Return + End }; EvtScript N(EVS_NpcHit_KoopaBros_01) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInteract_KoopaBros_01) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcDefeat_KoopaBros_01) = { - EVT_CALL(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAG_2, TRUE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcPos, NPC_KoopaBros_01, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_KoopaBros_01, NPC_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_KoopaBros_01, NPC_FLAG_HAS_SHADOW, TRUE) - EVT_CALL(SetMusicTrack, 0, SONG_KOOPA_BROS_INTERLUDE, 0, 8) - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(EnableGroup, MODEL_nise_koppa, FALSE) - EVT_CALL(SetNpcPos, NPC_KoopaBros_01, -170, 30, -55) - EVT_CALL(SetNpcPos, NPC_KoopaBros_02, -150, 30, 55) - EVT_CALL(SetNpcPos, NPC_KoopaBros_03, -130, 30, -55) - EVT_CALL(SetNpcPos, NPC_KoopaBros_04, -110, 30, 55) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Black_Launched) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Red_Launched) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_03, ANIM_KoopaBros_Yellow_Launched) - EVT_CALL(SetNpcAnimation, NPC_KoopaBros_04, ANIM_KoopaBros_Green_Launched) - EVT_WAIT(1) - EVT_THREAD - EVT_WAIT(30 * DT) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH1_010B, 160, 40) - EVT_END_THREAD - EVT_CALL(SetNpcJumpscale, NPC_KoopaBros_01, EVT_FLOAT(0.3)) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBros_02, EVT_FLOAT(0.3)) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBros_03, EVT_FLOAT(0.3)) - EVT_CALL(SetNpcJumpscale, NPC_KoopaBros_04, EVT_FLOAT(0.3)) - EVT_THREAD - EVT_CALL(NpcJump0, NPC_KoopaBros_01, -170, -400, -200, 75) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(NpcJump0, NPC_KoopaBros_02, -150, -400, 200, 75) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(NpcJump0, NPC_KoopaBros_03, -130, -400, -200, 75) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(NpcJump0, NPC_KoopaBros_04, -110, -400, 200, 75) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(165 * DT) - EVT_EXEC(N(EVS_BossDefeated)) - EVT_WAIT(1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_THREAD - EVT_WAIT(120) - EVT_CALL(PlaySoundAt, SOUND_DISTANT_THUD, SOUND_SPACE_DEFAULT, 0, 0, 0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 15, EVT_FLOAT(0.5)) - EVT_WAIT(15) - EVT_SET(GF_TRD10_Defeated_KoopaBros, TRUE) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAG_2, TRUE) + Call(DisablePlayerInput, TRUE) + Call(SetNpcPos, NPC_KoopaBros_01, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_KoopaBros_01, NPC_FLAG_INVISIBLE, FALSE) + Call(SetNpcFlagBits, NPC_KoopaBros_01, NPC_FLAG_HAS_SHADOW, TRUE) + Call(SetMusicTrack, 0, SONG_KOOPA_BROS_INTERLUDE, 0, 8) + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(EnableGroup, MODEL_nise_koppa, FALSE) + Call(SetNpcPos, NPC_KoopaBros_01, -170, 30, -55) + Call(SetNpcPos, NPC_KoopaBros_02, -150, 30, 55) + Call(SetNpcPos, NPC_KoopaBros_03, -130, 30, -55) + Call(SetNpcPos, NPC_KoopaBros_04, -110, 30, 55) + Call(SetNpcAnimation, NPC_KoopaBros_01, ANIM_KoopaBros_Black_Launched) + Call(SetNpcAnimation, NPC_KoopaBros_02, ANIM_KoopaBros_Red_Launched) + Call(SetNpcAnimation, NPC_KoopaBros_03, ANIM_KoopaBros_Yellow_Launched) + Call(SetNpcAnimation, NPC_KoopaBros_04, ANIM_KoopaBros_Green_Launched) + Wait(1) + Thread + Wait(30 * DT) + Call(ShowMessageAtScreenPos, MSG_CH1_010B, 160, 40) + EndThread + Call(SetNpcJumpscale, NPC_KoopaBros_01, Float(0.3)) + Call(SetNpcJumpscale, NPC_KoopaBros_02, Float(0.3)) + Call(SetNpcJumpscale, NPC_KoopaBros_03, Float(0.3)) + Call(SetNpcJumpscale, NPC_KoopaBros_04, Float(0.3)) + Thread + Call(NpcJump0, NPC_KoopaBros_01, -170, -400, -200, 75) + EndThread + Thread + Call(NpcJump0, NPC_KoopaBros_02, -150, -400, 200, 75) + EndThread + Thread + Call(NpcJump0, NPC_KoopaBros_03, -130, -400, -200, 75) + EndThread + Thread + Call(NpcJump0, NPC_KoopaBros_04, -110, -400, 200, 75) + EndThread + Thread + Wait(165 * DT) + Exec(N(EVS_BossDefeated)) + Wait(1) + Call(DisablePlayerInput, FALSE) + EndThread + Wait(120) + Call(PlaySoundAt, SOUND_DISTANT_THUD, SOUND_SPACE_DEFAULT, 0, 0, 0) + Call(ShakeCam, CAM_DEFAULT, 0, 15, Float(0.5)) + Wait(15) + Set(GF_TRD10_Defeated_KoopaBros, TRUE) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcAuxAI_KoopaBros_02) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH1_DEFEATED_KOOPA_BROS) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH1_DEFEATED_KOOPA_BROS) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + Return + End }; EvtScript N(EVS_NpcAux_KoopaBros_02) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcAI_KoopaBros_02) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcHit_KoopaBros_02) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInteract_KoopaBros_02) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcDefeat_KoopaBros_02) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcAuxAI_KoopaBros_03) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH1_DEFEATED_KOOPA_BROS) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH1_DEFEATED_KOOPA_BROS) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + Return + End }; EvtScript N(EVS_NpcAux_KoopaBros_03) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcAI_KoopaBros_03) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcHit_KoopaBros_03) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInteract_KoopaBros_03) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcDefeat_KoopaBros_03) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcAuxAI_KoopaBros_04) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH1_DEFEATED_KOOPA_BROS) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH1_DEFEATED_KOOPA_BROS) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + Return + End }; EvtScript N(EVS_NpcAux_KoopaBros_04) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcAI_KoopaBros_04) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcHit_KoopaBros_04) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInteract_KoopaBros_04) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcDefeat_KoopaBros_04) = { - EVT_RETURN - EVT_END + Return + End }; NpcSettings N(NpcSettings_KoopaBros_01) = { diff --git a/src/world/area_trd/trd_10/trd_10_3_fake_bowser.c b/src/world/area_trd/trd_10/trd_10_3_fake_bowser.c index 3e5e99a6274..69c7a5ba1a4 100644 --- a/src/world/area_trd/trd_10/trd_10_3_fake_bowser.c +++ b/src/world/area_trd/trd_10/trd_10_3_fake_bowser.c @@ -1,73 +1,73 @@ #include "trd_10.h" EvtScript N(EVS_InitFakeBowser) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_HideFakeBowser) = { - EVT_CALL(EnableGroup, MODEL_atama, FALSE) - EVT_CALL(EnableGroup, MODEL_left_arm, FALSE) - EVT_CALL(EnableGroup, MODEL_shippo, FALSE) - EVT_CALL(EnableGroup, MODEL_dou, FALSE) - EVT_CALL(EnableGroup, MODEL_koura, FALSE) - EVT_CALL(EnableGroup, MODEL_koma1, FALSE) - EVT_CALL(EnableGroup, MODEL_koma2, FALSE) - EVT_CALL(EnableModel, MODEL_o171, FALSE) - EVT_CALL(EnableModel, MODEL_o172, FALSE) - EVT_CALL(EnableModel, MODEL_o183, FALSE) - EVT_CALL(EnableModel, MODEL_o118, FALSE) - EVT_CALL(EnableModel, MODEL_o120, FALSE) - EVT_CALL(EnableModel, MODEL_o165, FALSE) - EVT_RETURN - EVT_END + Call(EnableGroup, MODEL_atama, FALSE) + Call(EnableGroup, MODEL_left_arm, FALSE) + Call(EnableGroup, MODEL_shippo, FALSE) + Call(EnableGroup, MODEL_dou, FALSE) + Call(EnableGroup, MODEL_koura, FALSE) + Call(EnableGroup, MODEL_koma1, FALSE) + Call(EnableGroup, MODEL_koma2, FALSE) + Call(EnableModel, MODEL_o171, FALSE) + Call(EnableModel, MODEL_o172, FALSE) + Call(EnableModel, MODEL_o183, FALSE) + Call(EnableModel, MODEL_o118, FALSE) + Call(EnableModel, MODEL_o120, FALSE) + Call(EnableModel, MODEL_o165, FALSE) + Return + End }; EvtScript N(EVS_SetModelsPos) = { - EVT_CALL(TranslateGroup, MODEL_atama, LVar0, 0, 0) - EVT_CALL(TranslateGroup, MODEL_left_arm, LVar0, 0, 0) - EVT_CALL(TranslateGroup, MODEL_shippo, LVar0, 0, 0) - EVT_CALL(TranslateGroup, MODEL_dou, LVar0, 0, 0) - EVT_CALL(TranslateGroup, MODEL_koura, LVar0, 0, 0) - EVT_CALL(TranslateGroup, MODEL_koma1, LVar0, 0, 0) - EVT_CALL(TranslateGroup, MODEL_koma2, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o171, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o172, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o183, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o118, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o120, LVar0, 0, 0) - EVT_CALL(TranslateModel, MODEL_o165, LVar0, 0, 0) - EVT_RETURN - EVT_END + Call(TranslateGroup, MODEL_atama, LVar0, 0, 0) + Call(TranslateGroup, MODEL_left_arm, LVar0, 0, 0) + Call(TranslateGroup, MODEL_shippo, LVar0, 0, 0) + Call(TranslateGroup, MODEL_dou, LVar0, 0, 0) + Call(TranslateGroup, MODEL_koura, LVar0, 0, 0) + Call(TranslateGroup, MODEL_koma1, LVar0, 0, 0) + Call(TranslateGroup, MODEL_koma2, LVar0, 0, 0) + Call(TranslateModel, MODEL_o171, LVar0, 0, 0) + Call(TranslateModel, MODEL_o172, LVar0, 0, 0) + Call(TranslateModel, MODEL_o183, LVar0, 0, 0) + Call(TranslateModel, MODEL_o118, LVar0, 0, 0) + Call(TranslateModel, MODEL_o120, LVar0, 0, 0) + Call(TranslateModel, MODEL_o165, LVar0, 0, 0) + Return + End }; EvtScript N(EVS_RevealFakeBowser) = { - EVT_SET(LVar0, 100) - EVT_EXEC_WAIT(N(EVS_SetModelsPos)) - EVT_SET(AF_TRD_FakeBowserRevealed, FALSE) - EVT_LABEL(0) - EVT_IF_EQ(AF_TRD_FakeBowserRevealed, FALSE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(MakeLerp, 100, -100, 60 * DT, EASING_QUADRATIC_OUT) - EVT_CALL(PlaySoundAt, SOUND_FAKE_BOWSER_LONG_WALK, SOUND_SPACE_DEFAULT, 50, 0, 0) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_EXEC_WAIT(N(EVS_SetModelsPos)) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(10) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVar0, 100) + ExecWait(N(EVS_SetModelsPos)) + Set(AF_TRD_FakeBowserRevealed, FALSE) + Label(0) + IfEq(AF_TRD_FakeBowserRevealed, FALSE) + Wait(1) + Goto(0) + EndIf + Call(MakeLerp, 100, -100, 60 * DT, EASING_QUADRATIC_OUT) + Call(PlaySoundAt, SOUND_FAKE_BOWSER_LONG_WALK, SOUND_SPACE_DEFAULT, 50, 0, 0) + Label(10) + Call(UpdateLerp) + ExecWait(N(EVS_SetModelsPos)) + IfNe(LVar1, 0) + Goto(10) + EndIf + Return + End }; EvtScript N(EVS_SetupFakeBowser) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH1_DEFEATED_KOOPA_BROS) - EVT_EXEC(N(EVS_HideFakeBowser)) - EVT_ELSE - EVT_EXEC(N(EVS_RevealFakeBowser)) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH1_DEFEATED_KOOPA_BROS) + Exec(N(EVS_HideFakeBowser)) + Else + Exec(N(EVS_RevealFakeBowser)) + EndIf + Return + End }; diff --git a/src/world/area_tst/tst_01/tst_01_1_main.c b/src/world/area_tst/tst_01/tst_01_1_main.c index a3201df4f3c..e7c7a90e910 100644 --- a/src/world/area_tst/tst_01/tst_01_1_main.c +++ b/src/world/area_tst/tst_01/tst_01_1_main.c @@ -25,26 +25,26 @@ MapSettings N(settings) = { }; EvtScript N(EVS_GotoMap_machi_7) = { - EVT_CALL(GotoMap, EVT_PTR("machi"), machi_ENTRY_7) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("machi"), machi_ENTRY_7) + Wait(100) + Return + End }; EvtScript N(EVS_GotoMap_tst_02_0) = { - EVT_CALL(GotoMap, EVT_PTR("tst_02"), tst_02_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("tst_02"), tst_02_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TESTING) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_GotoMap_machi_7)), TRIGGER_WALL_PUSH, COLLIDER_deilitw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_GotoMap_tst_02_0)), TRIGGER_WALL_PUSH, COLLIDER_deilite, 1, 0) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TESTING) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + ExecWait(N(EVS_MakeEntities)) + BindTrigger(Ref(N(EVS_GotoMap_machi_7)), TRIGGER_WALL_PUSH, COLLIDER_deilitw, 1, 0) + BindTrigger(Ref(N(EVS_GotoMap_tst_02_0)), TRIGGER_WALL_PUSH, COLLIDER_deilite, 1, 0) + Return + End }; diff --git a/src/world/area_tst/tst_01/tst_01_2_entity.c b/src/world/area_tst/tst_01/tst_01_2_entity.c index 6867f99d2ad..877a3f8daf2 100644 --- a/src/world/area_tst/tst_01/tst_01_2_entity.c +++ b/src/world/area_tst/tst_01/tst_01_2_entity.c @@ -2,12 +2,12 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 136, 80, 63, 0, ITEM_FLOWER_POINT, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 190, 0, 63, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 201, 60, -20, 0, ITEM_HEART, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 230, 60, -20, 0, ITEM_HEART, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenRedBlock), 258, 60, -20, 0, ITEM_FLOWER_POINT, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_RedBlock), 315, 60, 63, 0, ITEM_FLOWER_POINT, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_YellowBlock), 136, 80, 63, 0, ITEM_FLOWER_POINT, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_YellowBlock), 190, 0, 63, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 201, 60, -20, 0, ITEM_HEART, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 230, 60, -20, 0, ITEM_HEART, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HiddenRedBlock), 258, 60, -20, 0, ITEM_FLOWER_POINT, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_RedBlock), 315, 60, 63, 0, ITEM_FLOWER_POINT, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_tst/tst_02/tst_02_1_main.c b/src/world/area_tst/tst_02/tst_02_1_main.c index 6314b5587bc..138517cf3e8 100644 --- a/src/world/area_tst/tst_02/tst_02_1_main.c +++ b/src/world/area_tst/tst_02/tst_02_1_main.c @@ -24,26 +24,26 @@ MapSettings N(settings) = { }; EvtScript N(EVS_GotoMap_tst_01_1) = { - EVT_CALL(GotoMap, EVT_PTR("tst_01"), tst_01_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("tst_01"), tst_01_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_GotoMap_tst_03_0) = { - EVT_CALL(GotoMap, EVT_PTR("tst_03"), tst_03_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("tst_03"), tst_03_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TESTING) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_GotoMap_tst_01_1)), TRIGGER_WALL_PUSH, COLLIDER_deilitw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_GotoMap_tst_03_0)), TRIGGER_WALL_PUSH, COLLIDER_deilite, 1, 0) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TESTING) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + ExecWait(N(EVS_MakeEntities)) + BindTrigger(Ref(N(EVS_GotoMap_tst_01_1)), TRIGGER_WALL_PUSH, COLLIDER_deilitw, 1, 0) + BindTrigger(Ref(N(EVS_GotoMap_tst_03_0)), TRIGGER_WALL_PUSH, COLLIDER_deilite, 1, 0) + Return + End }; diff --git a/src/world/area_tst/tst_02/tst_02_2_entity.c b/src/world/area_tst/tst_02/tst_02_2_entity.c index aca07249c0b..18c8184e8d1 100644 --- a/src/world/area_tst/tst_02/tst_02_2_entity.c +++ b/src/world/area_tst/tst_02/tst_02_2_entity.c @@ -2,13 +2,13 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_InertYellowBlock), 90, 70, -210, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_InertYellowBlock), 130, 80, -210, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_InertYellowBlock), 170, 90, -210, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_InertYellowBlock), 210, 100, -210, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_InertYellowBlock), 250, 110, -210, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_GiantChest), 193, 0, -38, -20, ITEM_NONE, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 130, 0, -38, -20, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_InertYellowBlock), 90, 70, -210, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_InertYellowBlock), 130, 80, -210, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_InertYellowBlock), 170, 90, -210, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_InertYellowBlock), 210, 100, -210, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_InertYellowBlock), 250, 110, -210, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_GiantChest), 193, 0, -38, -20, ITEM_NONE, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_Chest), 130, 0, -38, -20, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_tst/tst_03/tst_03_1_main.c b/src/world/area_tst/tst_03/tst_03_1_main.c index bcf545ccbdb..14ef2fc08ea 100644 --- a/src/world/area_tst/tst_03/tst_03_1_main.c +++ b/src/world/area_tst/tst_03/tst_03_1_main.c @@ -24,33 +24,33 @@ MapSettings N(settings) = { }; EvtScript N(EVS_GotoMap_tst_02_1) = { - EVT_CALL(GotoMap, EVT_PTR("tst_02"), tst_02_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("tst_02"), tst_02_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_GotoMap_tst_04_0) = { - EVT_CALL(GotoMap, EVT_PTR("tst_04"), tst_04_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("tst_04"), tst_04_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TESTING) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_GotoMap_tst_02_1)), TRIGGER_WALL_PUSH, COLLIDER_deilitw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_GotoMap_tst_04_0)), TRIGGER_WALL_PUSH, COLLIDER_deilite, 1, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_puku, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_pukut, SURFACE_TYPE_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_puku, COLLIDER_FLAG_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_pukut, COLLIDER_FLAG_DOCK_WALL) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o264, SURFACE_TYPE_WATER) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o265, SURFACE_TYPE_SPIKES) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o236, SURFACE_TYPE_LAVA) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TESTING) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + ExecWait(N(EVS_MakeEntities)) + BindTrigger(Ref(N(EVS_GotoMap_tst_02_1)), TRIGGER_WALL_PUSH, COLLIDER_deilitw, 1, 0) + BindTrigger(Ref(N(EVS_GotoMap_tst_04_0)), TRIGGER_WALL_PUSH, COLLIDER_deilite, 1, 0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_puku, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_pukut, SURFACE_TYPE_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_puku, COLLIDER_FLAG_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_pukut, COLLIDER_FLAG_DOCK_WALL) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o264, SURFACE_TYPE_WATER) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o265, SURFACE_TYPE_SPIKES) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o236, SURFACE_TYPE_LAVA) + Return + End }; diff --git a/src/world/area_tst/tst_03/tst_03_2_entity.c b/src/world/area_tst/tst_03/tst_03_2_entity.c index 153ce2067d8..25bd6da6c76 100644 --- a/src/world/area_tst/tst_03/tst_03_2_entity.c +++ b/src/world/area_tst/tst_03/tst_03_2_entity.c @@ -2,27 +2,27 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_RedBlock), 567, 60, 100, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenRedBlock), 623, 60, 100, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_InertYellowBlock), 300, 60, -50, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BrickBlock), 360, 80, -50, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), 420, 80, -50, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 480, 80, -50, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_TriggerBlock), 540, 80, -50, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 600, 60, -50, 0, ITEM_MUSHROOM, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SuperBlock), 300, 60, 160, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), 420, 60, 160, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 480, 60, 160, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_PowBlock), 644, 60, 118, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer1BlockTiny), 460, 0, 50, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer1BlockTiny), 460, 25, 50, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer2BlockTiny), 490, 0, 50, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer3BlockTiny), 520, 0, 50, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_PowBlock), 644, 60, 118, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BoardedFloor), 416, 0, 232, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_WoodenCrate), 336, 0, 232, 0, -1, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_WoodenCrate), 270, 0, 232, 0, ITEM_MUSHROOM, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_WoodenCrate), 270, 30, 232, 0, ITEM_MUSHROOM, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_RedBlock), 567, 60, 100, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HiddenRedBlock), 623, 60, 100, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_InertYellowBlock), 300, 60, -50, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BrickBlock), 360, 80, -50, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_MulticoinBlock), 420, 80, -50, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_YellowBlock), 480, 80, -50, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_TriggerBlock), 540, 80, -50, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 600, 60, -50, 0, ITEM_MUSHROOM, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_SuperBlock), 300, 60, 160, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HeartBlock), 420, 60, 160, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_SavePoint), 480, 60, 160, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_PowBlock), 644, 60, 118, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_Hammer1BlockTiny), 460, 0, 50, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_Hammer1BlockTiny), 460, 25, 50, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_Hammer2BlockTiny), 490, 0, 50, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_Hammer3BlockTiny), 520, 0, 50, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_PowBlock), 644, 60, 118, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_BoardedFloor), 416, 0, 232, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_WoodenCrate), 336, 0, 232, 0, -1, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_WoodenCrate), 270, 0, 232, 0, ITEM_MUSHROOM, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_WoodenCrate), 270, 30, 232, 0, ITEM_MUSHROOM, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_tst/tst_04/tst_04_1_main.c b/src/world/area_tst/tst_04/tst_04_1_main.c index a2850371f4d..a0ffa5dcf5b 100644 --- a/src/world/area_tst/tst_04/tst_04_1_main.c +++ b/src/world/area_tst/tst_04/tst_04_1_main.c @@ -79,96 +79,96 @@ MapSettings N(settings) = { }; EvtScript N(EVS_GotoMap_tst_03_1) = { - EVT_CALL(GotoMap, EVT_PTR("tst_03"), tst_03_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(GotoMap, Ref("tst_03"), tst_03_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_UpdateMovingFloor) = { - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, 100, 50, EASING_COS_IN_OUT) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o5, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o5) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(MakeLerp, 100, 0, 50, EASING_COS_IN_OUT) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_o5, 0, LVar0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o5) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(MakeLerp, 0, 100, 50, EASING_COS_IN_OUT) + Label(10) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o5, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o5) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Call(MakeLerp, 100, 0, 50, EASING_COS_IN_OUT) + Label(20) + Call(UpdateLerp) + Call(TranslateModel, MODEL_o5, 0, LVar0, 0) + Call(UpdateColliderTransform, COLLIDER_o5) + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_UpdateSpinningFloor) = { - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, 360, 360, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o3, LVar0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o3) - EVT_CALL(N(PushGoompaTest)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_GOTO(0) - EVT_CALL(MakeLerp, 20, -20, 40, EASING_COS_IN_OUT) - EVT_LABEL(20) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o3, LVar0, 0, 0, 1) - EVT_CALL(UpdateColliderTransform, COLLIDER_o3) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(MakeLerp, 0, 360, 360, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(RotateModel, MODEL_o3, LVar0, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_o3) + Call(N(PushGoompaTest)) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Goto(0) + Call(MakeLerp, 20, -20, 40, EASING_COS_IN_OUT) + Label(20) + Call(UpdateLerp) + Call(RotateModel, MODEL_o3, LVar0, 0, 0, 1) + Call(UpdateColliderTransform, COLLIDER_o3) + Wait(1) + IfEq(LVar1, 1) + Goto(20) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_UpdateSpinningWall) = { - EVT_LABEL(0) - EVT_CALL(MakeLerp, 0, 360, 360, EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, MODEL_o1, LVar0, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(MakeLerp, 0, 360, 360, EASING_LINEAR) + Label(10) + Call(UpdateLerp) + Call(RotateModel, MODEL_o1, LVar0, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_o1) + Wait(1) + IfEq(LVar1, 1) + Goto(10) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TESTING) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_GotoMap_tst_03_1)), TRIGGER_WALL_PUSH, COLLIDER_deilitw, 1, 0) - EVT_CALL(ParentColliderToModel, COLLIDER_o5, MODEL_o5) - EVT_CALL(ParentColliderToModel, COLLIDER_o3, MODEL_o3) - EVT_CALL(ParentColliderToModel, COLLIDER_o1, MODEL_o1) - EVT_CALL(ParentColliderToModel, COLLIDER_o2, MODEL_o2) - EVT_CALL(ParentColliderToModel, COLLIDER_o18, MODEL_o18) - EVT_EXEC(N(EVS_UpdateMovingFloor)) - EVT_EXEC(N(EVS_UpdateSpinningFloor)) - EVT_EXEC(N(EVS_UpdateSpinningWall)) - EVT_EXEC(N(EVS_SetupReflection)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TESTING) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + BindTrigger(Ref(N(EVS_GotoMap_tst_03_1)), TRIGGER_WALL_PUSH, COLLIDER_deilitw, 1, 0) + Call(ParentColliderToModel, COLLIDER_o5, MODEL_o5) + Call(ParentColliderToModel, COLLIDER_o3, MODEL_o3) + Call(ParentColliderToModel, COLLIDER_o1, MODEL_o1) + Call(ParentColliderToModel, COLLIDER_o2, MODEL_o2) + Call(ParentColliderToModel, COLLIDER_o18, MODEL_o18) + Exec(N(EVS_UpdateMovingFloor)) + Exec(N(EVS_UpdateSpinningFloor)) + Exec(N(EVS_UpdateSpinningWall)) + Exec(N(EVS_SetupReflection)) + Return + End }; diff --git a/src/world/area_tst/tst_04/tst_04_2_entity.c b/src/world/area_tst/tst_04/tst_04_2_entity.c index 57d88fe496a..a723a9fba7a 100644 --- a/src/world/area_tst/tst_04/tst_04_2_entity.c +++ b/src/world/area_tst/tst_04/tst_04_2_entity.c @@ -2,7 +2,7 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_RedSwitch), 0, 0, 300, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_RedSwitch), 0, 0, 300, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_tst/tst_04/tst_04_3_reflection.c b/src/world/area_tst/tst_04/tst_04_3_reflection.c index 693f7bc0b37..537c8dd08f6 100644 --- a/src/world/area_tst/tst_04/tst_04_3_reflection.c +++ b/src/world/area_tst/tst_04/tst_04_3_reflection.c @@ -107,10 +107,10 @@ API_CALLABLE(N(SetupAnimatedModel)) { } EvtScript N(EVS_SetupReflection) = { - EVT_CALL(N(SetupAnimatedModel)) - EVT_MALLOC_ARRAY(16, LVarA) - EVT_CALL(N(EnablePlayerReflection)) - EVT_CALL(N(EnablePartnerReflection)) - EVT_RETURN - EVT_END + Call(N(SetupAnimatedModel)) + MallocArray(16, LVarA) + Call(N(EnablePlayerReflection)) + Call(N(EnablePartnerReflection)) + Return + End }; diff --git a/src/world/area_tst/tst_04/tst_04_4_npc.c b/src/world/area_tst/tst_04/tst_04_4_npc.c index b4c37f20b5d..ef3caa2ccad 100644 --- a/src/world/area_tst/tst_04/tst_04_4_npc.c +++ b/src/world/area_tst/tst_04/tst_04_4_npc.c @@ -6,35 +6,35 @@ API_CALLABLE(N(DisableOwnerShadow)) { } EvtScript N(EVS_NpcAuxAI_Goompa) = { - EVT_CALL(N(DisableOwnerShadow)) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) - EVT_RETURN - EVT_END + Call(N(DisableOwnerShadow)) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) + Return + End }; EvtScript N(EVS_NpcAux_Goompa) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcAI_Goompa) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcHit_Goompa) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInteract_Goompa) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcDefeat_Goompa) = { - EVT_RETURN - EVT_END + Return + End }; NpcSettings N(NpcSettings_Goompa) = { diff --git a/src/world/area_tst/tst_10/tst_10_1_main.c b/src/world/area_tst/tst_10/tst_10_1_main.c index 8e70b468e07..5e346a2b3af 100644 --- a/src/world/area_tst/tst_10/tst_10_1_main.c +++ b/src/world/area_tst/tst_10/tst_10_1_main.c @@ -20,87 +20,87 @@ MapSettings N(settings) = { // note: sets DisablePlayerInput, but does not use EVT_GROUP_1B EvtScript N(EVS_ExitWalk_tst_10_2) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseExitHeading, 60, tst_10_ENTRY_0) - EVT_EXEC(ExitWalk) - EVT_CALL(GotoMap, EVT_PTR("tst_10"), tst_10_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(UseExitHeading, 60, tst_10_ENTRY_0) + Exec(ExitWalk) + Call(GotoMap, Ref("tst_10"), tst_10_ENTRY_2) + Wait(100) + Return + End }; // note: sets DisablePlayerInput, but does not use EVT_GROUP_1B EvtScript N(EVS_ExitWalk_tst_10_3) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseExitHeading, 60, tst_10_ENTRY_1) - EVT_EXEC(ExitWalk) - EVT_CALL(GotoMap, EVT_PTR("tst_10"), tst_10_ENTRY_3) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(UseExitHeading, 60, tst_10_ENTRY_1) + Exec(ExitWalk) + Call(GotoMap, Ref("tst_10"), tst_10_ENTRY_3) + Wait(100) + Return + End }; // note: sets DisablePlayerInput, but does not use EVT_GROUP_1B EvtScript N(EVS_ExitWalk_tst_10_0) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseExitHeading, 60, tst_10_ENTRY_2) - EVT_EXEC(ExitWalk) - EVT_CALL(GotoMap, EVT_PTR("tst_10"), tst_10_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(UseExitHeading, 60, tst_10_ENTRY_2) + Exec(ExitWalk) + Call(GotoMap, Ref("tst_10"), tst_10_ENTRY_0) + Wait(100) + Return + End }; // note: sets DisablePlayerInput, but does not use EVT_GROUP_1B EvtScript N(EVS_ExitWalk_tst_10_1) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseExitHeading, 60, tst_10_ENTRY_3) - EVT_EXEC(ExitWalk) - EVT_CALL(GotoMap, EVT_PTR("tst_10"), tst_10_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(UseExitHeading, 60, tst_10_ENTRY_3) + Exec(ExitWalk) + Call(GotoMap, Ref("tst_10"), tst_10_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_DisableExitCameraZones) = { - EVT_CALL(SetZoneEnabled, ZONE_north, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_west, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_south, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_east, FALSE) - EVT_SET(AF_TST_00, FALSE) - EVT_RETURN - EVT_END + Call(SetZoneEnabled, ZONE_north, FALSE) + Call(SetZoneEnabled, ZONE_west, FALSE) + Call(SetZoneEnabled, ZONE_south, FALSE) + Call(SetZoneEnabled, ZONE_east, FALSE) + Set(AF_TST_00, FALSE) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tst_10_2)), TRIGGER_FLOOR_TOUCH, COLLIDER_deilin, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tst_10_3)), TRIGGER_FLOOR_TOUCH, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tst_10_0)), TRIGGER_FLOOR_TOUCH, COLLIDER_deilis, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_tst_10_1)), TRIGGER_FLOOR_TOUCH, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_tst_10_2)), TRIGGER_FLOOR_TOUCH, COLLIDER_deilin, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_tst_10_3)), TRIGGER_FLOOR_TOUCH, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_tst_10_0)), TRIGGER_FLOOR_TOUCH, COLLIDER_deilis, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_tst_10_1)), TRIGGER_FLOOR_TOUCH, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TESTING) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_IF_EQ(AF_TST_00, TRUE) - EVT_CALL(SetZoneEnabled, ZONE_north, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_west, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_south, FALSE) - EVT_CALL(SetZoneEnabled, ZONE_east, FALSE) - EVT_SET(AF_TST_00, FALSE) - EVT_ELSE - EVT_SET(AF_TST_00, TRUE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_DisableExitCameraZones)), TRIGGER_FLOOR_TOUCH, COLLIDER_change, 1, 0) - EVT_END_IF - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TESTING) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + ExecWait(N(EVS_MakeEntities)) + IfEq(AF_TST_00, TRUE) + Call(SetZoneEnabled, ZONE_north, FALSE) + Call(SetZoneEnabled, ZONE_west, FALSE) + Call(SetZoneEnabled, ZONE_south, FALSE) + Call(SetZoneEnabled, ZONE_east, FALSE) + Set(AF_TST_00, FALSE) + Else + Set(AF_TST_00, TRUE) + BindTrigger(Ref(N(EVS_DisableExitCameraZones)), TRIGGER_FLOOR_TOUCH, COLLIDER_change, 1, 0) + EndIf + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Return + End }; TweesterPath N(DefaultTweesterPath) = { @@ -120,8 +120,8 @@ TweesterPath N(DefaultTweesterPath) = { }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), -13, 60, -50, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), -111, 0, -55, 0, MODEL_o137, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HeartBlock), -13, 60, -50, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HiddenPanel), -111, 0, -55, 0, MODEL_o137, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/area_tst/tst_11/tst_11_1_main.c b/src/world/area_tst/tst_11/tst_11_1_main.c index 3db76056a36..23b3740a6d9 100644 --- a/src/world/area_tst/tst_11/tst_11_1_main.c +++ b/src/world/area_tst/tst_11/tst_11_1_main.c @@ -14,10 +14,10 @@ MapSettings N(settings) = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TESTING) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_EXEC(N(EVS_SetupReflections)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TESTING) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Exec(N(EVS_SetupReflections)) + Return + End }; diff --git a/src/world/area_tst/tst_11/tst_11_2_extra.c b/src/world/area_tst/tst_11/tst_11_2_extra.c index 11a4c87c9c1..982a2546259 100644 --- a/src/world/area_tst/tst_11/tst_11_2_extra.c +++ b/src/world/area_tst/tst_11/tst_11_2_extra.c @@ -148,10 +148,10 @@ void N(test_reflection_worker_partner)(void) { } EvtScript N(EVS_SetupReflections) = { - EVT_MALLOC_ARRAY(16, LVarA) - EVT_CALL(N(EnableWallReflectionTest)) - EVT_CALL(N(EnableFloorReflectionTest)) - EVT_CALL(N(PartnerReflectTest)) - EVT_RETURN - EVT_END + MallocArray(16, LVarA) + Call(N(EnableWallReflectionTest)) + Call(N(EnableFloorReflectionTest)) + Call(N(PartnerReflectTest)) + Return + End }; diff --git a/src/world/area_tst/tst_12/tst_12_1_main.c b/src/world/area_tst/tst_12/tst_12_1_main.c index 5454495d109..aa2163c4f24 100644 --- a/src/world/area_tst/tst_12/tst_12_1_main.c +++ b/src/world/area_tst/tst_12/tst_12_1_main.c @@ -15,65 +15,65 @@ MapSettings N(settings) = { }; EvtScript N(D_80240050_B1D340) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_SET(LVarD, LVar3) - EVT_SET(LVarE, LVar4) - EVT_SUB(LVarC, LVar0) - EVT_SUB(LVarD, LVar1) - EVT_SETF(LVar0, LVarC) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SETF(LVarF, EVT_FLOAT(100.0)) - EVT_DIVF(LVarF, LVar0) - EVT_ADD(LVarF, 11) - EVT_SET(LVar5, 200) - EVT_DIV(LVar5, LVarF) - EVT_ADD(LVar5, 1) - EVT_LOOP(LVar5) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_CALL(RandInt, 199, LVar2) - EVT_SET(LVar3, 210) - EVT_SUB(LVar3, LVar2) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_ADD(LVar2, LVarE) - EVT_PLAY_EFFECT(EFFECT_FLOATING_FLOWER, LVar0, LVar2, LVar1, LVar3) - EVT_END_LOOP - EVT_WAIT(LVarF) - EVT_LABEL(0) - EVT_CALL(RandInt, LVarC, LVar0) - EVT_CALL(RandInt, LVarD, LVar1) - EVT_ADD(LVar0, LVarA) - EVT_ADD(LVar1, LVarB) - EVT_PLAY_EFFECT(EFFECT_FLOATING_FLOWER, LVar0, LVarE, LVar1, 200) - EVT_WAIT(LVarF) - EVT_GOTO(0) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0B) + Set(LVarA, LVar0) + Set(LVarB, LVar1) + Set(LVarC, LVar2) + Set(LVarD, LVar3) + Set(LVarE, LVar4) + Sub(LVarC, LVar0) + Sub(LVarD, LVar1) + SetF(LVar0, LVarC) + DivF(LVar0, Float(100.0)) + SetF(LVarF, Float(100.0)) + DivF(LVarF, LVar0) + Add(LVarF, 11) + Set(LVar5, 200) + Div(LVar5, LVarF) + Add(LVar5, 1) + Loop(LVar5) + Call(RandInt, LVarC, LVar0) + Call(RandInt, LVarD, LVar1) + Call(RandInt, 199, LVar2) + Set(LVar3, 210) + Sub(LVar3, LVar2) + Add(LVar0, LVarA) + Add(LVar1, LVarB) + Add(LVar2, LVarE) + PlayEffect(EFFECT_FLOATING_FLOWER, LVar0, LVar2, LVar1, LVar3) + EndLoop + Wait(LVarF) + Label(0) + Call(RandInt, LVarC, LVar0) + Call(RandInt, LVarD, LVar1) + Add(LVar0, LVarA) + Add(LVar1, LVarB) + PlayEffect(EFFECT_FLOATING_FLOWER, LVar0, LVarE, LVar1, 200) + Wait(LVarF) + Goto(0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TESTING) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o92, SURFACE_TYPE_FLOWERS) - EVT_SET(LVar0, 544) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 100) - EVT_SET(LVar3, 386) - EVT_SET(LVar4, 174) - EVT_SET(LVar5, 40) - EVT_EXEC(N(D_80240050_B1D340)) - EVT_SET(LVar0, 327) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 24) - EVT_SET(LVar3, 89) - EVT_SET(LVar4, 252) - EVT_SET(LVar5, 40) - EVT_EXEC(N(D_80240050_B1D340)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TESTING) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o92, SURFACE_TYPE_FLOWERS) + Set(LVar0, 544) + Set(LVar1, 0) + Set(LVar2, 100) + Set(LVar3, 386) + Set(LVar4, 174) + Set(LVar5, 40) + Exec(N(D_80240050_B1D340)) + Set(LVar0, 327) + Set(LVar1, 0) + Set(LVar2, 24) + Set(LVar3, 89) + Set(LVar4, 252) + Set(LVar5, 40) + Exec(N(D_80240050_B1D340)) + Return + End }; diff --git a/src/world/area_tst/tst_13/tst_13_1_main.c b/src/world/area_tst/tst_13/tst_13_1_main.c index 11d839b6c2c..e5fc3f0b724 100644 --- a/src/world/area_tst/tst_13/tst_13_1_main.c +++ b/src/world/area_tst/tst_13/tst_13_1_main.c @@ -20,68 +20,68 @@ MapSettings N(settings) = { #include "world/common/atomic/BetaFloorPanels.inc.c" EvtScript N(EVS_NpcAuxAI_00) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInteract_00) = { - EVT_CALL(SetNpcSprite, NPC_SELF, ANIM_WorldBombette_Idle) - EVT_RETURN - EVT_END + Call(SetNpcSprite, NPC_SELF, ANIM_WorldBombette_Idle) + Return + End }; EvtScript N(EVS_NpcInteract_01) = { - EVT_CALL(SetNpcSprite, NPC_SELF, ANIM_WorldParakarry_Idle) - EVT_RETURN - EVT_END + Call(SetNpcSprite, NPC_SELF, ANIM_WorldParakarry_Idle) + Return + End }; EvtScript N(EVS_NpcInteract_02) = { - EVT_CALL(SetNpcSprite, NPC_SELF, ANIM_WorldBow_Idle) - EVT_RETURN - EVT_END + Call(SetNpcSprite, NPC_SELF, ANIM_WorldBow_Idle) + Return + End }; EvtScript N(EVS_NpcInteract_03) = { - EVT_CALL(SetNpcSprite, NPC_SELF, ANIM_WorldWatt_Idle) - EVT_RETURN - EVT_END + Call(SetNpcSprite, NPC_SELF, ANIM_WorldWatt_Idle) + Return + End }; EvtScript N(EVS_NpcInteract_04) = { - EVT_CALL(SetNpcSprite, NPC_SELF, ANIM_WorldSushie_Idle) - EVT_RETURN - EVT_END + Call(SetNpcSprite, NPC_SELF, ANIM_WorldSushie_Idle) + Return + End }; EvtScript N(EVS_NpcInteract_05) = { - EVT_CALL(SetNpcSprite, NPC_SELF, ANIM_WorldLakilester_Idle) - EVT_RETURN - EVT_END + Call(SetNpcSprite, NPC_SELF, ANIM_WorldLakilester_Idle) + Return + End }; EvtScript N(EVS_NpcInteract_06) = { - EVT_CALL(SetNpcSprite, NPC_SELF, ANIM_WorldLakilester_Idle) - EVT_RETURN - EVT_END + Call(SetNpcSprite, NPC_SELF, ANIM_WorldLakilester_Idle) + Return + End }; EvtScript N(EVS_NpcInteract_07) = { - EVT_CALL(SetNpcSprite, NPC_SELF, ANIM_WorldLakilester_Idle) - EVT_RETURN - EVT_END + Call(SetNpcSprite, NPC_SELF, ANIM_WorldLakilester_Idle) + Return + End }; EvtScript N(EVS_NpcInteract_08) = { - EVT_CALL(SetNpcSprite, NPC_SELF, ANIM_WorldGoombario_Idle) - EVT_RETURN - EVT_END + Call(SetNpcSprite, NPC_SELF, ANIM_WorldGoombario_Idle) + Return + End }; EvtScript N(EVS_NpcInteract_09) = { - EVT_CALL(SetNpcSprite, NPC_SELF, ANIM_WorldKooper_Idle) - EVT_RETURN - EVT_END + Call(SetNpcSprite, NPC_SELF, ANIM_WorldKooper_Idle) + Return + End }; NpcSettings N(NpcSettings_00) = { @@ -313,16 +313,16 @@ s32 N(BetaPanelData)[] = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TESTING) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_SET(LVar0, EVT_PTR(N(BetaPanelData))) - EVT_EXEC(N(EVS_BetaPanel_Setup)) - EVT_CALL(SetModelCustomGfx, MODEL_o152, CUSTOM_GFX_0, -1) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_0, 0, EVT_PTR(N(build_gfx_floor))) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TESTING) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Set(LVar0, Ref(N(BetaPanelData))) + Exec(N(EVS_BetaPanel_Setup)) + Call(SetModelCustomGfx, MODEL_o152, CUSTOM_GFX_0, -1) + Call(SetCustomGfxBuilders, CUSTOM_GFX_0, 0, Ref(N(build_gfx_floor))) + Return + End }; diff --git a/src/world/area_tst/tst_20/tst_20_1_main.c b/src/world/area_tst/tst_20/tst_20_1_main.c index 3c477c9c4a2..589d28e7578 100644 --- a/src/world/area_tst/tst_20/tst_20_1_main.c +++ b/src/world/area_tst/tst_20/tst_20_1_main.c @@ -13,10 +13,10 @@ MapSettings N(settings) = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_TESTING) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_TESTING) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Return + End }; diff --git a/src/world/common/atomic/BetaFloorPanels.inc.c b/src/world/common/atomic/BetaFloorPanels.inc.c index 63694d3eb15..e9c0f0c995a 100644 --- a/src/world/common/atomic/BetaFloorPanels.inc.c +++ b/src/world/common/atomic/BetaFloorPanels.inc.c @@ -44,157 +44,157 @@ API_CALLABLE(N(CheckShouldFlipFloor)) { // breakable panels EvtScript N(EVS_BetaBreakFloor_Setup) = { - EVT_USE_BUF(LVar0) - EVT_MALLOC_ARRAY(6, LVarA) - EVT_BUF_READ1(LVar0) // modelID - EVT_SET(ArrayVar(0), LVar0) - EVT_BUF_READ1(LVar0) // colliderID - EVT_SET(ArrayVar(1), LVar0) - EVT_BUF_READ1(LVar0) // posX - EVT_SET(ArrayVar(2), LVar0) - EVT_BUF_READ1(LVar0) // posZ - EVT_SET(ArrayVar(3), LVar0) - EVT_BUF_READ1(LVar0) // radius - EVT_SET(ArrayVar(4), LVar0) - EVT_BUF_READ1(LVar0) // callback event - EVT_SET(ArrayVar(5), LVar0) - EVT_SET(LVar0, LVarA) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BetaBreakFloor_Touch)), TRIGGER_FLOOR_TOUCH, ArrayVar(0), 1, 0) - EVT_RETURN - EVT_END + UseBuf(LVar0) + MallocArray(6, LVarA) + BufRead1(LVar0) // modelID + Set(ArrayVar(0), LVar0) + BufRead1(LVar0) // colliderID + Set(ArrayVar(1), LVar0) + BufRead1(LVar0) // posX + Set(ArrayVar(2), LVar0) + BufRead1(LVar0) // posZ + Set(ArrayVar(3), LVar0) + BufRead1(LVar0) // radius + Set(ArrayVar(4), LVar0) + BufRead1(LVar0) // callback event + Set(ArrayVar(5), LVar0) + Set(LVar0, LVarA) + BindTrigger(Ref(N(EVS_BetaBreakFloor_Touch)), TRIGGER_FLOOR_TOUCH, ArrayVar(0), 1, 0) + Return + End }; EvtScript N(EVS_BetaBreakFloor_Touch) = { - EVT_USE_ARRAY(LVar0) - EVT_CALL(N(CheckShouldBreakFloor)) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_LOOP(5) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, ArrayVar(0), COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, ArrayVar(1), TRUE) - EVT_WAIT(1) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, ArrayVar(0), COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, ArrayVar(1), FALSE) - EVT_WAIT(1) - EVT_END_LOOP - EVT_IF_NE(ArrayVar(5), 0) - EVT_EXEC_WAIT(ArrayVar(5)) - EVT_END_IF - EVT_RETURN - EVT_END + UseArray(LVar0) + Call(N(CheckShouldBreakFloor)) + IfEq(LVar0, 0) + Return + EndIf + Loop(5) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, ArrayVar(0), COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, ArrayVar(1), TRUE) + Wait(1) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, ArrayVar(0), COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, ArrayVar(1), FALSE) + Wait(1) + EndLoop + IfNe(ArrayVar(5), 0) + ExecWait(ArrayVar(5)) + EndIf + Return + End }; // flippable panels EvtScript N(EVS_BetaPanel_Setup) = { - EVT_USE_BUF(LVar0) - EVT_MALLOC_ARRAY(6, LVar9) - EVT_BUF_READ1(LVar1) // modelID - EVT_SET(ArrayVar(0), LVar1) - EVT_BUF_READ1(LVar1) // colliderID - EVT_SET(ArrayVar(1), LVar1) - EVT_BUF_READ1(LVar1) // posX - EVT_SET(ArrayVar(2), LVar1) - EVT_BUF_READ1(LVar1) // posY - EVT_SET(ArrayVar(3), LVar1) - EVT_BUF_READ1(LVar1) // posZ - EVT_SET(ArrayVar(4), LVar1) - EVT_BUF_READ1(LVar1) // itemID - EVT_SET(ArrayVar(5), LVar1) - EVT_CALL(ParentColliderToModel, ArrayVar(1), ArrayVar(0)) - EVT_LABEL(0) - EVT_LABEL(1) - EVT_CALL(GetPlayerActionState, LVarA) - EVT_IF_EQ(LVarA, ACTION_STATE_SPIN_JUMP) - EVT_GOTO(2) - EVT_END_IF - EVT_IF_EQ(LVarA, ACTION_STATE_TORNADO_JUMP) - EVT_GOTO(2) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_LABEL(2) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_NE(LVar2, ArrayVar(3)) - EVT_GOTO(2) - EVT_END_IF - EVT_CALL(N(CheckShouldFlipFloor)) - EVT_IF_EQ(LVar0, 1) - EVT_EXEC_WAIT(N(EVS_BetaPanel_PoundAtop)) - EVT_END_IF - EVT_IF_EQ(LVar0, 2) - EVT_EXEC_WAIT(N(EVS_BetaPanel_PoundNearby)) - EVT_END_IF - EVT_LABEL(3) - EVT_CALL(GetPlayerActionState, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, ACTION_STATE_SPIN_JUMP) - EVT_GOTO(3) - EVT_END_IF - EVT_IF_EQ(LVar0, ACTION_STATE_TORNADO_JUMP) - EVT_GOTO(3) - EVT_END_IF - EVT_GOTO(0) - EVT_RETURN - EVT_END + UseBuf(LVar0) + MallocArray(6, LVar9) + BufRead1(LVar1) // modelID + Set(ArrayVar(0), LVar1) + BufRead1(LVar1) // colliderID + Set(ArrayVar(1), LVar1) + BufRead1(LVar1) // posX + Set(ArrayVar(2), LVar1) + BufRead1(LVar1) // posY + Set(ArrayVar(3), LVar1) + BufRead1(LVar1) // posZ + Set(ArrayVar(4), LVar1) + BufRead1(LVar1) // itemID + Set(ArrayVar(5), LVar1) + Call(ParentColliderToModel, ArrayVar(1), ArrayVar(0)) + Label(0) + Label(1) + Call(GetPlayerActionState, LVarA) + IfEq(LVarA, ACTION_STATE_SPIN_JUMP) + Goto(2) + EndIf + IfEq(LVarA, ACTION_STATE_TORNADO_JUMP) + Goto(2) + EndIf + Wait(1) + Goto(0) + Label(2) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + Wait(1) + IfNe(LVar2, ArrayVar(3)) + Goto(2) + EndIf + Call(N(CheckShouldFlipFloor)) + IfEq(LVar0, 1) + ExecWait(N(EVS_BetaPanel_PoundAtop)) + EndIf + IfEq(LVar0, 2) + ExecWait(N(EVS_BetaPanel_PoundNearby)) + EndIf + Label(3) + Call(GetPlayerActionState, LVar0) + Wait(1) + IfEq(LVar0, ACTION_STATE_SPIN_JUMP) + Goto(3) + EndIf + IfEq(LVar0, ACTION_STATE_TORNADO_JUMP) + Goto(3) + EndIf + Goto(0) + Return + End }; EvtScript N(EVS_BetaPanel_PoundAtop) = { - EVT_USE_ARRAY(LVar9) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_CALL(MakeLerp, 0, 5, 3, EASING_QUADRATIC_IN) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, ArrayVar(0), 0, LVar0, 0) - EVT_SET(LVar5, LVar3) - EVT_ADD(LVar5, LVar0) - EVT_CALL(SetPlayerPos, LVar2, LVar5, LVar4) - EVT_CALL(UpdateColliderTransform, ArrayVar(1)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_CALL(MakeLerp, 5, 0, 3, EASING_QUADRATIC_IN) - EVT_LABEL(3) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, ArrayVar(0), 0, LVar0, 0) - EVT_SET(LVar5, LVar3) - EVT_ADD(LVar5, LVar0) - EVT_CALL(SetPlayerPos, LVar2, LVar5, LVar4) - EVT_CALL(UpdateColliderTransform, ArrayVar(1)) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(3) - EVT_END_IF - EVT_RETURN - EVT_END + UseArray(LVar9) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Call(MakeLerp, 0, 5, 3, EASING_QUADRATIC_IN) + Label(2) + Call(UpdateLerp) + Call(TranslateModel, ArrayVar(0), 0, LVar0, 0) + Set(LVar5, LVar3) + Add(LVar5, LVar0) + Call(SetPlayerPos, LVar2, LVar5, LVar4) + Call(UpdateColliderTransform, ArrayVar(1)) + Wait(1) + IfEq(LVar1, 1) + Goto(2) + EndIf + Call(MakeLerp, 5, 0, 3, EASING_QUADRATIC_IN) + Label(3) + Call(UpdateLerp) + Call(TranslateModel, ArrayVar(0), 0, LVar0, 0) + Set(LVar5, LVar3) + Add(LVar5, LVar0) + Call(SetPlayerPos, LVar2, LVar5, LVar4) + Call(UpdateColliderTransform, ArrayVar(1)) + Wait(1) + IfEq(LVar1, 1) + Goto(3) + EndIf + Return + End }; EvtScript N(EVS_BetaPanel_PoundNearby) = { - EVT_USE_ARRAY(LVar9) - EVT_CALL(MakeItemEntity, ArrayVar(5), ArrayVar(2), ArrayVar(3), ArrayVar(4), ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) - EVT_SET(LVar2, 0) - EVT_CALL(MakeLerp, 0, 150, 19, EASING_QUADRATIC_OUT) - EVT_LABEL(2) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, ArrayVar(0), 0, LVar0, 0) - EVT_ADD(LVar2, 45) - EVT_CALL(RotateModel, ArrayVar(0), LVar2, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(2) - EVT_END_IF - EVT_CALL(MakeLerp, 150, 0, 19, EASING_QUADRATIC_OUT) - EVT_LABEL(3) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, ArrayVar(0), 0, LVar0, 0) - EVT_ADD(LVar2, 45) - EVT_CALL(RotateModel, ArrayVar(0), LVar2, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(3) - EVT_END_IF - EVT_RETURN - EVT_END + UseArray(LVar9) + Call(MakeItemEntity, ArrayVar(5), ArrayVar(2), ArrayVar(3), ArrayVar(4), ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) + Set(LVar2, 0) + Call(MakeLerp, 0, 150, 19, EASING_QUADRATIC_OUT) + Label(2) + Call(UpdateLerp) + Call(TranslateModel, ArrayVar(0), 0, LVar0, 0) + Add(LVar2, 45) + Call(RotateModel, ArrayVar(0), LVar2, 1, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(2) + EndIf + Call(MakeLerp, 150, 0, 19, EASING_QUADRATIC_OUT) + Label(3) + Call(UpdateLerp) + Call(TranslateModel, ArrayVar(0), 0, LVar0, 0) + Add(LVar2, 45) + Call(RotateModel, ArrayVar(0), LVar2, 1, 0, 0) + Wait(1) + IfEq(LVar1, 1) + Goto(3) + EndIf + Return + End }; diff --git a/src/world/common/atomic/CreateDarkness.inc.c b/src/world/common/atomic/CreateDarkness.inc.c index 779da10a831..ab1945ce139 100644 --- a/src/world/common/atomic/CreateDarkness.inc.c +++ b/src/world/common/atomic/CreateDarkness.inc.c @@ -44,9 +44,9 @@ API_CALLABLE(N(DarkRoomUpdate)) { } EvtScript N(EVS_CreateDarkness) = { - EVT_THREAD - EVT_CALL(N(DarkRoomUpdate)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + Call(N(DarkRoomUpdate)) + EndThread + Return + End }; diff --git a/src/world/common/atomic/MarioSalute.inc.c b/src/world/common/atomic/MarioSalute.inc.c index df5b30b4cbb..1f2295d5050 100644 --- a/src/world/common/atomic/MarioSalute.inc.c +++ b/src/world/common/atomic/MarioSalute.inc.c @@ -2,10 +2,10 @@ #include "sprite/player.h" EvtScript N(EVS_MarioSalute) = { - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(20) - EVT_RETURN - EVT_END + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(1) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(20) + Return + End }; diff --git a/src/world/common/atomic/TexturePan.h b/src/world/common/atomic/TexturePan.h index b511002b587..071eb13f161 100644 --- a/src/world/common/atomic/TexturePan.h +++ b/src/world/common/atomic/TexturePan.h @@ -1,22 +1,22 @@ #define TEX_PAN_PARAMS_ID(panID) \ - EVT_SET(LVar0, (panID)) + Set(LVar0, (panID)) #define TEX_PAN_PARAMS_STEP(main_step_du, main_step_dv, aux_step_du, aux_step_dv) \ - EVT_SET(LVar1, (main_step_du)) \ - EVT_SET(LVar2, (main_step_dv)) \ - EVT_SET(LVar3, (aux_step_du)) \ - EVT_SET(LVar4, (aux_step_dv)) + Set(LVar1, (main_step_du)) \ + Set(LVar2, (main_step_dv)) \ + Set(LVar3, (aux_step_du)) \ + Set(LVar4, (aux_step_dv)) #define TEX_PAN_PARAMS_FREQ(main_freq_u, main_freq_v, aux_freq_u, aux_freq_v) \ - EVT_SET(LVar5, (main_freq_u)) \ - EVT_SET(LVar6, (main_freq_v)) \ - EVT_SET(LVar7, (aux_freq_u)) \ - EVT_SET(LVar8, (aux_freq_v)) + Set(LVar5, (main_freq_u)) \ + Set(LVar6, (main_freq_v)) \ + Set(LVar7, (aux_freq_u)) \ + Set(LVar8, (aux_freq_v)) #define TEX_PAN_PARAMS_INIT(main_init_u, main_init_v, aux_init_u, aux_init_v) \ - EVT_SET(LVar9, (main_init_u)) \ - EVT_SET(LVarA, (main_init_v)) \ - EVT_SET(LVarB, (aux_init_u)) \ - EVT_SET(LVarC, (aux_init_v)) \ + Set(LVar9, (main_init_u)) \ + Set(LVarA, (main_init_v)) \ + Set(LVarB, (aux_init_u)) \ + Set(LVarC, (aux_init_v)) \ extern EvtScript N(EVS_UpdateTexturePan); diff --git a/src/world/common/atomic/TexturePan.inc.c b/src/world/common/atomic/TexturePan.inc.c index 75dfce61703..20ee1ddac4c 100644 --- a/src/world/common/atomic/TexturePan.inc.c +++ b/src/world/common/atomic/TexturePan.inc.c @@ -110,19 +110,19 @@ API_CALLABLE(N(UpdateTexturePanStepped)) { } EvtScript N(EVS_UpdateTexturePan) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_IF_EQ(LVar5, 1) - EVT_IF_EQ(LVar6, 1) - EVT_IF_EQ(LVar7, 1) - EVT_IF_EQ(LVar8, 1) - EVT_CALL(N(UpdateTexturePanSmooth)) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(N(UpdateTexturePanStepped)) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + IfEq(LVar5, 1) + IfEq(LVar6, 1) + IfEq(LVar7, 1) + IfEq(LVar8, 1) + Call(N(UpdateTexturePanSmooth)) + Return + EndIf + EndIf + EndIf + EndIf + Call(N(UpdateTexturePanStepped)) + Return + End }; diff --git a/src/world/common/atomic/ToadHouse.data.inc.c b/src/world/common/atomic/ToadHouse.data.inc.c index 81da00243ed..923200cce14 100644 --- a/src/world/common/atomic/ToadHouse.data.inc.c +++ b/src/world/common/atomic/ToadHouse.data.inc.c @@ -7,37 +7,37 @@ extern EvtScript N(EVS_ToadHouse_ReturnFromRest); extern EvtScript N(EVS_ToadHouse_GetInBed); EvtScript N(EVS_ToadHouse_Unk1) = { - EVT_CALL(EnableModel, LVar4, FALSE) - EVT_CALL(EnableModel, LVar5, TRUE) - EVT_CALL(RotateModel, LVar6, 0, 0, 0, 1) - EVT_CALL(RotateModel, LVar7, 0, 0, 0, 1) - EVT_RETURN - EVT_END + Call(EnableModel, LVar4, FALSE) + Call(EnableModel, LVar5, TRUE) + Call(RotateModel, LVar6, 0, 0, 0, 1) + Call(RotateModel, LVar7, 0, 0, 0, 1) + Return + End }; EvtScript N(EVS_ToadHouse_Unk2) = { - EVT_SET(LVar9, LVar7) - EVT_SET(LVar8, LVar6) - EVT_SET(LVar7, LVar5) - EVT_SET(LVar6, LVar4) - EVT_WAIT(70) - EVT_CALL(EnableModel, LVar6, FALSE) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(EnableModel, LVar6, TRUE) - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, 180, 20, EASING_CUBIC_IN) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, LVar8, LVar0, 0, 0, -1) - EVT_CALL(RotateModel, LVar9, LVar0, 0, 0, -1) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(EnableModel, LVar7, FALSE) - EVT_RETURN - EVT_END + Set(LVar9, LVar7) + Set(LVar8, LVar6) + Set(LVar7, LVar5) + Set(LVar6, LVar4) + Wait(70) + Call(EnableModel, LVar6, FALSE) + Thread + Wait(5) + Call(EnableModel, LVar6, TRUE) + EndThread + Call(MakeLerp, 0, 180, 20, EASING_CUBIC_IN) + Label(1) + Call(UpdateLerp) + Call(RotateModel, LVar8, LVar0, 0, 0, -1) + Call(RotateModel, LVar9, LVar0, 0, 0, -1) + IfEq(LVar1, 1) + Wait(1) + Goto(1) + EndIf + Call(EnableModel, LVar7, FALSE) + Return + End }; #ifndef TOADHOUSE_ANIM_TALK @@ -49,67 +49,67 @@ EvtScript N(EVS_ToadHouse_Unk2) = { #endif EvtScript N(EVS_NpcInteract_ToadHouseKeeper) = { - EVT_CALL(N(ToadHouse_InitScreenOverlay), 0, 0, 0) - EVT_EXEC_WAIT(N(EVS_ToadHouse_SetDialogue)) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar9, LVar1) - EVT_SET(LVarA, LVar2) - EVT_SET(LVarB, LVar3) - EVT_CALL(N(ToadHouse_DoesPlayerNeedSleep)) - EVT_IF_EQ(LVar1, 0) - EVT_SET(LVar8, LVar0) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, TOADHOUSE_ANIM_TALK, TOADHOUSE_ANIM_IDLE, 0, LVar8) - EVT_CALL(ShowChoice, MSG_Choice_0006) - EVT_WAIT(3) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(ContinueSpeech, NPC_SELF, TOADHOUSE_ANIM_TALK, TOADHOUSE_ANIM_IDLE, 0, LVar9) - EVT_RETURN - EVT_END_IF - EVT_CALL(ContinueSpeech, NPC_SELF, TOADHOUSE_ANIM_TALK, TOADHOUSE_ANIM_IDLE, 0, LVarA) - EVT_CALL(SetPlayerJumpscale, 1) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(N(ToadHouse_DisableStatusBar)) - EVT_IF_NE(LVar4, 0) - EVT_EXEC(N(EVS_ToadHouse_Unk2)) - EVT_END_IF - EVT_CALL(N(ToadHouse_PutPartnerAway), LVarA) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(EVS_ToadHouse_GetInBed)) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 255, 60, EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(ToadHouse_UpdateScreenOverlay), 3, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(FullyRestoreHPandFP) - EVT_CALL(FullyRestoreSP) - EVT_IF_NE(LVar4, 0) - EVT_EXEC(N(EVS_ToadHouse_Unk1)) - EVT_END_IF - EVT_CALL(N(ToadHouse_GetPartnerBackOut), LVarA) - EVT_WAIT(45) - EVT_CALL(MakeLerp, 255, 0, 30, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(N(ToadHouse_UpdateScreenOverlay), 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(105) - EVT_EXEC_WAIT(N(EVS_ToadHouse_ReturnFromRest)) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, TOADHOUSE_ANIM_TALK, TOADHOUSE_ANIM_IDLE, 0, LVarB) - EVT_CALL(N(ToadHouse_ShowWorldStatusBar)) - EVT_RETURN - EVT_END + Call(N(ToadHouse_InitScreenOverlay), 0, 0, 0) + ExecWait(N(EVS_ToadHouse_SetDialogue)) + IfEq(LVar0, 0) + Return + EndIf + Set(LVar9, LVar1) + Set(LVarA, LVar2) + Set(LVarB, LVar3) + Call(N(ToadHouse_DoesPlayerNeedSleep)) + IfEq(LVar1, 0) + Set(LVar8, LVar0) + EndIf + Call(SpeakToPlayer, NPC_SELF, TOADHOUSE_ANIM_TALK, TOADHOUSE_ANIM_IDLE, 0, LVar8) + Call(ShowChoice, MSG_Choice_0006) + Wait(3) + IfEq(LVar0, 1) + Call(ContinueSpeech, NPC_SELF, TOADHOUSE_ANIM_TALK, TOADHOUSE_ANIM_IDLE, 0, LVar9) + Return + EndIf + Call(ContinueSpeech, NPC_SELF, TOADHOUSE_ANIM_TALK, TOADHOUSE_ANIM_IDLE, 0, LVarA) + Call(SetPlayerJumpscale, 1) + Call(DisablePlayerPhysics, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(N(ToadHouse_DisableStatusBar)) + IfNe(LVar4, 0) + Exec(N(EVS_ToadHouse_Unk2)) + EndIf + Call(N(ToadHouse_PutPartnerAway), LVarA) + Wait(20) + ExecWait(N(EVS_ToadHouse_GetInBed)) + Thread + Call(MakeLerp, 0, 255, 60, EASING_LINEAR) + Label(0) + Call(UpdateLerp) + Call(N(ToadHouse_UpdateScreenOverlay), 3, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(FullyRestoreHPandFP) + Call(FullyRestoreSP) + IfNe(LVar4, 0) + Exec(N(EVS_ToadHouse_Unk1)) + EndIf + Call(N(ToadHouse_GetPartnerBackOut), LVarA) + Wait(45) + Call(MakeLerp, 255, 0, 30, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(N(ToadHouse_UpdateScreenOverlay), 0, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + EndThread + Wait(105) + ExecWait(N(EVS_ToadHouse_ReturnFromRest)) + Call(DisablePlayerPhysics, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SpeakToPlayer, NPC_SELF, TOADHOUSE_ANIM_TALK, TOADHOUSE_ANIM_IDLE, 0, LVarB) + Call(N(ToadHouse_ShowWorldStatusBar)) + Return + End }; diff --git a/src/world/common/atomic/ToadHouseHos.data.inc.c b/src/world/common/atomic/ToadHouseHos.data.inc.c index 015b544a4ca..660dba48216 100644 --- a/src/world/common/atomic/ToadHouseHos.data.inc.c +++ b/src/world/common/atomic/ToadHouseHos.data.inc.c @@ -7,101 +7,101 @@ extern EvtScript N(EVS_ToadHouse_ReturnFromRest); extern EvtScript N(EVS_ToadHouse_GetInBed); EvtScript N(8024AC14) = { - EVT_CALL(EnableModel, LVar4, FALSE) - EVT_CALL(EnableModel, LVar5, TRUE) - EVT_CALL(RotateModel, LVar6, 0, 0, 0, 1) - EVT_CALL(RotateModel, LVar7, 0, 0, 0, 1) - EVT_RETURN - EVT_END + Call(EnableModel, LVar4, FALSE) + Call(EnableModel, LVar5, TRUE) + Call(RotateModel, LVar6, 0, 0, 0, 1) + Call(RotateModel, LVar7, 0, 0, 0, 1) + Return + End }; EvtScript N(8024AC8C) = { - EVT_SET(LVar9, LVar7) - EVT_SET(LVar8, LVar6) - EVT_SET(LVar7, LVar5) - EVT_SET(LVar6, LVar4) - EVT_WAIT(70) - EVT_CALL(EnableModel, LVar6, FALSE) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(EnableModel, LVar6, TRUE) - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, 180, 20, EASING_CUBIC_IN) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateModel, LVar8, LVar0, 0, 0, -1) - EVT_CALL(RotateModel, LVar9, LVar0, 0, 0, -1) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(EnableModel, LVar7, FALSE) - EVT_RETURN - EVT_END + Set(LVar9, LVar7) + Set(LVar8, LVar6) + Set(LVar7, LVar5) + Set(LVar6, LVar4) + Wait(70) + Call(EnableModel, LVar6, FALSE) + Thread + Wait(5) + Call(EnableModel, LVar6, TRUE) + EndThread + Call(MakeLerp, 0, 180, 20, EASING_CUBIC_IN) + Label(1) + Call(UpdateLerp) + Call(RotateModel, LVar8, LVar0, 0, 0, -1) + Call(RotateModel, LVar9, LVar0, 0, 0, -1) + IfEq(LVar1, 1) + Wait(1) + Goto(1) + EndIf + Call(EnableModel, LVar7, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_ToadHouseKeeper) = { - EVT_CALL(N(ToadHouse_InitScreenOverlay), 0, 0, 0) - EVT_EXEC_WAIT(N(EVS_ToadHouse_SetDialogue)) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar9, LVar1) - EVT_SET(LVarA, LVar2) - EVT_SET(LVarB, LVar3) - EVT_CALL(N(ToadHouse_DoesPlayerNeedSleep)) - EVT_IF_EQ(LVar1, 0) - EVT_SET(LVar8, LVar0) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, LVar8) - EVT_CALL(ShowChoice, MSG_Choice_0006) - EVT_WAIT(3) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, LVar9) - EVT_RETURN - EVT_END_IF - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, LVarA) - EVT_CALL(SetPlayerJumpscale, 1) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(N(ToadHouse_DisableStatusBar)) - EVT_IF_NE(LVar4, 0) - EVT_EXEC(N(8024AC8C)) - EVT_END_IF - EVT_CALL(N(ToadHouse_PutPartnerAway), LVarA) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(EVS_ToadHouse_GetInBed)) - EVT_THREAD - EVT_CALL(MakeLerp, 0, 255, 60, EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(ToadHouse_UpdateScreenOverlay), 3, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(FullyRestoreHPandFP) - EVT_CALL(FullyRestoreSP) - EVT_IF_NE(LVar4, 0) - EVT_EXEC(N(8024AC14)) - EVT_END_IF - EVT_CALL(N(ToadHouse_GetPartnerBackOut), LVarA) - EVT_WAIT(45) - EVT_CALL(MakeLerp, 255, 0, 30, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(N(ToadHouse_UpdateScreenOverlay), 0, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(105) - EVT_EXEC_WAIT(N(EVS_ToadHouse_ReturnFromRest)) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, LVarB) - EVT_CALL(N(ToadHouse_ShowWorldStatusBar)) - EVT_RETURN - EVT_END + Call(N(ToadHouse_InitScreenOverlay), 0, 0, 0) + ExecWait(N(EVS_ToadHouse_SetDialogue)) + IfEq(LVar0, 0) + Return + EndIf + Set(LVar9, LVar1) + Set(LVarA, LVar2) + Set(LVarB, LVar3) + Call(N(ToadHouse_DoesPlayerNeedSleep)) + IfEq(LVar1, 0) + Set(LVar8, LVar0) + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, LVar8) + Call(ShowChoice, MSG_Choice_0006) + Wait(3) + IfEq(LVar0, 1) + Call(ContinueSpeech, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, LVar9) + Return + EndIf + Call(ContinueSpeech, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, LVarA) + Call(SetPlayerJumpscale, 1) + Call(DisablePlayerPhysics, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(N(ToadHouse_DisableStatusBar)) + IfNe(LVar4, 0) + Exec(N(8024AC8C)) + EndIf + Call(N(ToadHouse_PutPartnerAway), LVarA) + Wait(20) + ExecWait(N(EVS_ToadHouse_GetInBed)) + Thread + Call(MakeLerp, 0, 255, 60, EASING_LINEAR) + Label(0) + Call(UpdateLerp) + Call(N(ToadHouse_UpdateScreenOverlay), 3, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Call(FullyRestoreHPandFP) + Call(FullyRestoreSP) + IfNe(LVar4, 0) + Exec(N(8024AC14)) + EndIf + Call(N(ToadHouse_GetPartnerBackOut), LVarA) + Wait(45) + Call(MakeLerp, 255, 0, 30, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(N(ToadHouse_UpdateScreenOverlay), 0, LVar0) + Wait(1) + IfEq(LVar1, 1) + Goto(1) + EndIf + EndThread + Wait(105) + ExecWait(N(EVS_ToadHouse_ReturnFromRest)) + Call(DisablePlayerPhysics, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, LVarB) + Call(N(ToadHouse_ShowWorldStatusBar)) + Return + End }; diff --git a/src/world/common/complete/GiveReward.inc.c b/src/world/common/complete/GiveReward.inc.c index 8fd36cb4707..d8a72968ff5 100644 --- a/src/world/common/complete/GiveReward.inc.c +++ b/src/world/common/complete/GiveReward.inc.c @@ -31,60 +31,60 @@ API_CALLABLE(N(StashVars)) { #include "world/common/todo/GetItemName.inc.c" EvtScript N(GiveItemReward) = { - EVT_CALL(ShowGotItem, LVar0, ITEM_TYPE_KEY, 0) - EVT_RETURN - EVT_RETURN - EVT_END + Call(ShowGotItem, LVar0, ITEM_TYPE_KEY, 0) + Return + Return + End }; EvtScript N(GiveCoinReward) = { - EVT_CALL(ShowGotItem, LVar0, ITEM_TYPE_KEY, ITEM_PICKUP_FLAG_1_COIN) - EVT_RETURN - EVT_RETURN - EVT_END + Call(ShowGotItem, LVar0, ITEM_TYPE_KEY, ITEM_PICKUP_FLAG_1_COIN) + Return + Return + End }; #define EVT_GIVE_KEY_REWARD(itemID) \ - EVT_SET(LVar0, itemID) \ - EVT_SET(LVar1, ITEM_TYPE_KEY) \ - EVT_EXEC_WAIT(N(GiveItemReward)) \ - EVT_CALL(AddKeyItem, itemID) + Set(LVar0, itemID) \ + Set(LVar1, ITEM_TYPE_KEY) \ + ExecWait(N(GiveItemReward)) \ + Call(AddKeyItem, itemID) #define EVT_GIVE_BADGE_REWARD(itemID) \ - EVT_SET(LVar0, itemID) \ - EVT_SET(LVar1, ITEM_TYPE_BADGE) \ - EVT_EXEC_WAIT(N(GiveItemReward)) \ - EVT_CALL(AddBadge, itemID, LVar0) + Set(LVar0, itemID) \ + Set(LVar1, ITEM_TYPE_BADGE) \ + ExecWait(N(GiveItemReward)) \ + Call(AddBadge, itemID, LVar0) #define EVT_GIVE_BADGE_REWARD_ALT(itemID, outIdx) \ - EVT_SET(LVar0, itemID) \ - EVT_SET(LVar1, ITEM_TYPE_BADGE) \ - EVT_EXEC_WAIT(N(GiveItemReward)) \ - EVT_CALL(AddBadge, LVar0, outIdx) + Set(LVar0, itemID) \ + Set(LVar1, ITEM_TYPE_BADGE) \ + ExecWait(N(GiveItemReward)) \ + Call(AddBadge, LVar0, outIdx) #define EVT_GIVE_CONSUMABLE_REWARD(itemID) \ - EVT_SET(LVar0, itemID) \ - EVT_SET(LVar1, ITEM_TYPE_CONSUMABLE) \ - EVT_EXEC_WAIT(N(GiveItemReward)) \ - EVT_CALL(AddItem, LVar0, LVar1) + Set(LVar0, itemID) \ + Set(LVar1, ITEM_TYPE_CONSUMABLE) \ + ExecWait(N(GiveItemReward)) \ + Call(AddItem, LVar0, LVar1) #define EVT_GIVE_CONSUMABLE_REWARD_ALT(itemID) \ - EVT_SET(LVar0, itemID) \ - EVT_SET(LVar1, ITEM_TYPE_CONSUMABLE) \ - EVT_EXEC_WAIT(N(GiveItemReward)) \ - EVT_CALL(AddItem, itemID, LVar0) + Set(LVar0, itemID) \ + Set(LVar1, ITEM_TYPE_CONSUMABLE) \ + ExecWait(N(GiveItemReward)) \ + Call(AddItem, itemID, LVar0) #define EVT_GIVE_STAR_PIECE() \ - EVT_SET(LVar0, ITEM_STAR_PIECE) \ - EVT_SET(LVar1, ITEM_TYPE_STAR_PIECE) \ - EVT_EXEC_WAIT(N(GiveItemReward)) \ - EVT_CALL(AddStarPieces, 1) + Set(LVar0, ITEM_STAR_PIECE) \ + Set(LVar1, ITEM_TYPE_STAR_PIECE) \ + ExecWait(N(GiveItemReward)) \ + Call(AddStarPieces, 1) #define EVT_GIVE_COIN() \ - EVT_SET(LVar0, ITEM_COIN) \ - EVT_SET(LVar1, 0) \ - EVT_EXEC_WAIT(N(GiveCoinReward)) \ - EVT_CALL(AddCoin, 1) + Set(LVar0, ITEM_COIN) \ + Set(LVar1, 0) \ + ExecWait(N(GiveCoinReward)) \ + Call(AddCoin, 1) #endif diff --git a/src/world/common/complete/KeyItemChoice.inc.c b/src/world/common/complete/KeyItemChoice.inc.c index 4bd8f035caa..c7171769656 100644 --- a/src/world/common/complete/KeyItemChoice.inc.c +++ b/src/world/common/complete/KeyItemChoice.inc.c @@ -44,46 +44,46 @@ API_CALLABLE(N(ItemChoice_SaveSelected)) { #include "world/common/atomic/MakeKeyChoice.inc.c" EvtScript N(EVS_KeyItemChoicePopup) = { - EVT_SET(LVar9, LVar1) - EVT_CALL(ShowKeyChoicePopup) - EVT_SET(LVarA, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CASE_EQ(-1) - EVT_CASE_DEFAULT - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_CALL(N(AddPlayerHandsOffset), LVar3, LVar4, LVar5) - EVT_BITWISE_OR_CONST(LVar0, ITEM_VIS_GROUP(ITEM_NONE, 5)) - EVT_CALL(MakeItemEntity, LVar0, LVar3, LVar4, LVar5, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_TakeItem) - EVT_WAIT(30) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(RemoveItemEntity, LVar0) - EVT_END_SWITCH - EVT_CALL(N(ItemChoice_SaveSelected), LVarA) - EVT_CALL(CloseChoicePopup) - EVT_UNBIND - EVT_RETURN - EVT_END + Set(LVar9, LVar1) + Call(ShowKeyChoicePopup) + Set(LVarA, LVar0) + Switch(LVar0) + CaseEq(0) + CaseEq(-1) + CaseDefault + Call(RemoveKeyItemAt, LVar1) + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Call(N(AddPlayerHandsOffset), LVar3, LVar4, LVar5) + BitwiseOrConst(LVar0, ITEM_VIS_GROUP(ITEM_NONE, 5)) + Call(MakeItemEntity, LVar0, LVar3, LVar4, LVar5, ITEM_SPAWN_MODE_DECORATION, 0) + Call(SetPlayerAnimation, ANIM_MarioW1_TakeItem) + Wait(30) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(RemoveItemEntity, LVar0) + EndSwitch + Call(N(ItemChoice_SaveSelected), LVarA) + Call(CloseChoicePopup) + Unbind + Return + End }; EvtScript N(EVS_ChooseKeyItem) = { - EVT_CALL(N(BuildKeyItemChoiceList), LVar0) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_KeyItemChoicePopup)), TRIGGER_FORCE_ACTIVATE, 0, EVT_PTR(N(KeyItemChoiceList)), 0, 1) - EVT_CALL(N(ItemChoice_WaitForSelection), LVar0) - EVT_RETURN - EVT_END + Call(N(BuildKeyItemChoiceList), LVar0) + BindPadlock(Ref(N(EVS_KeyItemChoicePopup)), TRIGGER_FORCE_ACTIVATE, 0, Ref(N(KeyItemChoiceList)), 0, 1) + Call(N(ItemChoice_WaitForSelection), LVar0) + Return + End }; #define EVT_CHOOSE_ANY_KEY_ITEM() \ - EVT_SET(LVar0, NULL) \ - EVT_SET(LVar1, 0) \ - EVT_EXEC_WAIT(N(EVS_ChooseKeyItem)) + Set(LVar0, NULL) \ + Set(LVar1, 0) \ + ExecWait(N(EVS_ChooseKeyItem)) #define EVT_CHOOSE_KEY_ITEM_FROM(itemList) \ - EVT_SET(LVar0, EVT_PTR(itemList)) \ - EVT_SET(LVar1, 0) \ - EVT_EXEC_WAIT(N(EVS_ChooseKeyItem)) + Set(LVar0, Ref(itemList)) \ + Set(LVar1, 0) \ + ExecWait(N(EVS_ChooseKeyItem)) #endif diff --git a/src/world/common/complete/LetterDelivery.inc.c b/src/world/common/complete/LetterDelivery.inc.c index a825c4d8d5c..54107212fc9 100644 --- a/src/world/common/complete/LetterDelivery.inc.c +++ b/src/world/common/complete/LetterDelivery.inc.c @@ -65,146 +65,146 @@ API_CALLABLE(N(LetterDelivery_RestoreNpcAnim)) { } EvtScript N(EVS_LetterDelivery_CarryLetter) = { - EVT_LOOP(0) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar3, LVar4, LVar5) - EVT_CALL(N(LetterDelivery_CalcLetterPos), LVar3, LVar4, LVar5) - EVT_CALL(SetItemPos, LVar0, LVar3, LVar4, LVar5) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetNpcPos, NPC_PARTNER, LVar3, LVar4, LVar5) + Call(N(LetterDelivery_CalcLetterPos), LVar3, LVar4, LVar5) + Call(SetItemPos, LVar0, LVar3, LVar4, LVar5) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_LetterDelivery_ItemPrompt) = { - EVT_SET(LVar9, LVar1) - EVT_CALL(ShowKeyChoicePopup) - EVT_SET(LVarA, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CASE_EQ(-1) - EVT_CASE_DEFAULT - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar3, LVar4, LVar5) - EVT_CALL(N(LetterDelivery_CalcLetterPos), LVar3, LVar4, LVar5) - EVT_BITWISE_OR_CONST(LVar0, VIS_GROUP_5 << 16) - EVT_CALL(MakeItemEntity, LVar0, LVar3, LVar4, LVar5, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_EXEC_GET_TID(N(EVS_LetterDelivery_CarryLetter), LVarA) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_WorldParakarry_Walk) - EVT_CALL(GetAngleBetweenNPCs, LVar9, NPC_PARTNER, LVarB) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar3, LVar4, LVar5) - EVT_CALL(GetNpcPos, LVar9, LVar6, LVar7, LVar8) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_IF_LE(LVarB, 180) - EVT_ADD(LVar6, 20) - EVT_ELSE - EVT_ADD(LVar6, -20) - EVT_END_IF - EVT_ADD(LVar7, 10) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump1, NPC_PARTNER, LVar6, LVar7, LVar8, 20) - EVT_KILL_THREAD(LVarA) - EVT_CALL(RemoveItemEntity, LVar0) - EVT_WAIT(20) - EVT_CALL(GetNpcYaw, NPC_PARTNER, LVarA) - EVT_ADD(LVarA, 180) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, LVarA, 0) - EVT_WAIT(5) - EVT_CALL(NpcJump1, NPC_PARTNER, LVar3, LVar4, LVar5, 20) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_WorldParakarry_Idle) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, LVar9, 0) - EVT_WAIT(5) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_WAIT(5) - EVT_END_SWITCH - EVT_CALL(N(ItemChoice_SaveSelected), LVarA) - EVT_CALL(CloseChoicePopup) - EVT_UNBIND - EVT_RETURN - EVT_END + Set(LVar9, LVar1) + Call(ShowKeyChoicePopup) + Set(LVarA, LVar0) + Switch(LVar0) + CaseEq(0) + CaseEq(-1) + CaseDefault + Call(RemoveKeyItemAt, LVar1) + Call(DisablePartnerAI, 0) + Call(GetNpcPos, NPC_PARTNER, LVar3, LVar4, LVar5) + Call(N(LetterDelivery_CalcLetterPos), LVar3, LVar4, LVar5) + BitwiseOrConst(LVar0, VIS_GROUP_5 << 16) + Call(MakeItemEntity, LVar0, LVar3, LVar4, LVar5, ITEM_SPAWN_MODE_DECORATION, 0) + ExecGetTID(N(EVS_LetterDelivery_CarryLetter), LVarA) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_WorldParakarry_Walk) + Call(GetAngleBetweenNPCs, LVar9, NPC_PARTNER, LVarB) + Call(GetNpcPos, NPC_PARTNER, LVar3, LVar4, LVar5) + Call(GetNpcPos, LVar9, LVar6, LVar7, LVar8) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + IfLe(LVarB, 180) + Add(LVar6, 20) + Else + Add(LVar6, -20) + EndIf + Add(LVar7, 10) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.0)) + Call(NpcJump1, NPC_PARTNER, LVar6, LVar7, LVar8, 20) + KillThread(LVarA) + Call(RemoveItemEntity, LVar0) + Wait(20) + Call(GetNpcYaw, NPC_PARTNER, LVarA) + Add(LVarA, 180) + Call(InterpNpcYaw, NPC_PARTNER, LVarA, 0) + Wait(5) + Call(NpcJump1, NPC_PARTNER, LVar3, LVar4, LVar5, 20) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_WorldParakarry_Idle) + Call(NpcFaceNpc, NPC_PARTNER, LVar9, 0) + Wait(5) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(EnablePartnerAI) + Wait(5) + EndSwitch + Call(N(ItemChoice_SaveSelected), LVarA) + Call(CloseChoicePopup) + Unbind + Return + End }; EvtScript N(EVS_ShowLetterChoice) = { - EVT_SET(LVar0, LVarB) - EVT_SET(LVar1, LVar2) - EVT_CALL(N(BuildKeyItemChoiceList), LVar0) - EVT_BIND_PADLOCK(N(EVS_LetterDelivery_ItemPrompt), TRIGGER_FORCE_ACTIVATE, 0, EVT_PTR(N(KeyItemChoiceList)), 0, 1) - EVT_CALL(N(ItemChoice_WaitForSelection), LVar0) - EVT_RETURN - EVT_END + Set(LVar0, LVarB) + Set(LVar1, LVar2) + Call(N(BuildKeyItemChoiceList), LVar0) + BindPadlock(N(EVS_LetterDelivery_ItemPrompt), TRIGGER_FORCE_ACTIVATE, 0, Ref(N(KeyItemChoiceList)), 0, 1) + Call(N(ItemChoice_WaitForSelection), LVar0) + Return + End }; // returns DeliveryResult on LVarC EvtScript N(EVS_DoLetterDelivery) = { - EVT_SET(LVarC, DELIVERY_NOT_POSSIBLE) - EVT_IF_LT(GB_StoryProgress, STORY_CH2_PARAKARRY_JOINED_PARTY) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(LetterDelivery_SaveNpcAnim)) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_CALL(FindKeyItem, LVar5, LVar1) - EVT_IF_EQ(LVar0, PARTNER_PARAKARRY) - EVT_IF_NE(LVar1, -1) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(PlayerFaceNpc, LVar2, FALSE) - EVT_WAIT(1) - EVT_CALL(GetNpcPos, LVar2, LVarD, LVar0, LVarE) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVarD, LVarE, LVarF) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0)) - EVT_ADD(LVar0, 10) - EVT_CALL(NpcJump1, NPC_PARTNER, LVarD, LVar0, LVarF, 10) - EVT_CALL(SpeakToNpc, NPC_PARTNER, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, LVar2, LVar7) - EVT_CALL(EnablePartnerAI) - EVT_EXEC_WAIT(N(EVS_ShowLetterChoice)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(-1) - EVT_CALL(DisablePartnerAI, 0) - EVT_WAIT(1) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 5, LVar8) - EVT_CALL(EnablePartnerAI) - EVT_SET(LVarC, DELIVERY_REJECTED) - EVT_CASE_DEFAULT - EVT_CALL(DisablePartnerAI, 0) - EVT_WAIT(1) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 5, LVar9) - EVT_IF_NE(LVarA, 0) - EVT_CALL(SpeakToPlayer, LVar2, LVar3, LVar4, 0, LVarA) - EVT_END_IF - EVT_CALL(EnablePartnerAI) - EVT_IF_NE(LVar6, ITEM_NONE) + Set(LVarC, DELIVERY_NOT_POSSIBLE) + IfLt(GB_StoryProgress, STORY_CH2_PARAKARRY_JOINED_PARTY) + Return + EndIf + Call(N(LetterDelivery_SaveNpcAnim)) + Call(GetCurrentPartnerID, LVar0) + Call(FindKeyItem, LVar5, LVar1) + IfEq(LVar0, PARTNER_PARAKARRY) + IfNe(LVar1, -1) + Call(DisablePartnerAI, 0) + Call(PlayerFaceNpc, LVar2, FALSE) + Wait(1) + Call(GetNpcPos, LVar2, LVarD, LVar0, LVarE) + Call(GetNpcPos, NPC_PARTNER, LVarD, LVarE, LVarF) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.0)) + Add(LVar0, 10) + Call(NpcJump1, NPC_PARTNER, LVarD, LVar0, LVarF, 10) + Call(SpeakToNpc, NPC_PARTNER, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, LVar2, LVar7) + Call(EnablePartnerAI) + ExecWait(N(EVS_ShowLetterChoice)) + Switch(LVar0) + CaseEq(-1) + Call(DisablePartnerAI, 0) + Wait(1) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 5, LVar8) + Call(EnablePartnerAI) + Set(LVarC, DELIVERY_REJECTED) + CaseDefault + Call(DisablePartnerAI, 0) + Wait(1) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 5, LVar9) + IfNe(LVarA, 0) + Call(SpeakToPlayer, LVar2, LVar3, LVar4, 0, LVarA) + EndIf + Call(EnablePartnerAI) + IfNe(LVar6, ITEM_NONE) EVT_GIVE_KEY_REWARD(LVar6) - EVT_END_IF - EVT_SET(LVarC, DELIVERY_ACCEPTED) - EVT_END_SWITCH - EVT_END_IF - EVT_END_IF - EVT_CALL(N(LetterDelivery_RestoreNpcAnim)) - EVT_RETURN - EVT_END + EndIf + Set(LVarC, DELIVERY_ACCEPTED) + EndSwitch + EndIf + EndIf + Call(N(LetterDelivery_RestoreNpcAnim)) + Return + End }; #define EVT_LETTER_PROMPT(npcName, npcID, animTalk, animIdle, msg1, msg2, ms3, msg4, itemID, itemList) \ EvtScript N(EVS_LetterPrompt_##npcName) = { \ - EVT_CALL(N(LetterDelivery_Init), \ + Call(N(LetterDelivery_Init), \ npcID, animTalk, animIdle, \ itemID, ITEM_NONE, \ msg1, msg2, ms3, msg4, \ - EVT_PTR(itemList)) \ - EVT_EXEC_WAIT(N(EVS_DoLetterDelivery)) \ - EVT_RETURN \ - EVT_END \ + Ref(itemList)) \ + ExecWait(N(EVS_DoLetterDelivery)) \ + Return \ + End \ } #define EVT_LETTER_REWARD(npcName) \ EvtScript N(EVS_LetterReward_##npcName) = { \ - EVT_IF_EQ(LVarC, DELIVERY_ACCEPTED) \ + IfEq(LVarC, DELIVERY_ACCEPTED) \ EVT_GIVE_STAR_PIECE() \ - EVT_END_IF \ - EVT_RETURN \ - EVT_END \ + EndIf \ + Return \ + End \ } #define EVT_LETTER_CHECK(npcName) \ - EVT_EXEC_WAIT(N(EVS_LetterPrompt_##npcName)) \ - EVT_EXEC_WAIT(N(EVS_LetterReward_##npcName)) + ExecWait(N(EVS_LetterPrompt_##npcName)) \ + ExecWait(N(EVS_LetterReward_##npcName)) diff --git a/src/world/common/complete/NormalItemChoice.inc.c b/src/world/common/complete/NormalItemChoice.inc.c index cf6530bf457..1f430e9d596 100644 --- a/src/world/common/complete/NormalItemChoice.inc.c +++ b/src/world/common/complete/NormalItemChoice.inc.c @@ -61,45 +61,45 @@ API_CALLABLE(N(BuildItemChoiceList)) { } EvtScript N(EVS_ItemChoicePopup) = { - EVT_SET(LVar9, LVar1) - EVT_CALL(ShowConsumableChoicePopup) - EVT_SET(LVarA, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CASE_EQ(-1) - EVT_CASE_DEFAULT - EVT_CALL(RemoveItemAt, LVar1) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_CALL(N(AddPlayerHandsOffset), LVar3, LVar4, LVar5) - EVT_CALL(MakeItemEntity, LVar0, LVar3, LVar4, LVar5, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_TakeItem) - EVT_WAIT(30) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(RemoveItemEntity, LVar0) - EVT_END_SWITCH - EVT_CALL(N(ItemChoice_SaveSelected), LVarA) - EVT_CALL(CloseChoicePopup) - EVT_UNBIND - EVT_RETURN - EVT_END + Set(LVar9, LVar1) + Call(ShowConsumableChoicePopup) + Set(LVarA, LVar0) + Switch(LVar0) + CaseEq(0) + CaseEq(-1) + CaseDefault + Call(RemoveItemAt, LVar1) + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Call(N(AddPlayerHandsOffset), LVar3, LVar4, LVar5) + Call(MakeItemEntity, LVar0, LVar3, LVar4, LVar5, ITEM_SPAWN_MODE_DECORATION, 0) + Call(SetPlayerAnimation, ANIM_MarioW1_TakeItem) + Wait(30) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(RemoveItemEntity, LVar0) + EndSwitch + Call(N(ItemChoice_SaveSelected), LVarA) + Call(CloseChoicePopup) + Unbind + Return + End }; EvtScript N(EVS_ChooseItem) = { - EVT_CALL(N(BuildItemChoiceList), LVar0) - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_ItemChoicePopup)), TRIGGER_FORCE_ACTIVATE, 0, EVT_PTR(N(ItemChoice_List)), 0, 1) - EVT_CALL(N(ItemChoice_WaitForSelection), LVar0) - EVT_RETURN - EVT_END + Call(N(BuildItemChoiceList), LVar0) + BindPadlock(Ref(N(EVS_ItemChoicePopup)), TRIGGER_FORCE_ACTIVATE, 0, Ref(N(ItemChoice_List)), 0, 1) + Call(N(ItemChoice_WaitForSelection), LVar0) + Return + End }; #define EVT_CHOOSE_ANY_CONSUMABLE(unkMode) \ - EVT_SET(LVar0, NULL) \ - EVT_SET(LVar1, unkMode) \ - EVT_EXEC_WAIT(N(EVS_ChooseItem)) + Set(LVar0, NULL) \ + Set(LVar1, unkMode) \ + ExecWait(N(EVS_ChooseItem)) #define EVT_CHOOSE_CONSUMABLE_FROM(itemList, unkMode) \ - EVT_SET(LVar0, EVT_PTR(itemList)) \ - EVT_SET(LVar1, unkMode) \ - EVT_EXEC_WAIT(N(EVS_ChooseItem)) + Set(LVar0, Ref(itemList)) \ + Set(LVar1, unkMode) \ + ExecWait(N(EVS_ChooseItem)) #endif diff --git a/src/world/common/complete/Quizmo.inc.c b/src/world/common/complete/Quizmo.inc.c index b238e5363e3..3dfc464536d 100644 --- a/src/world/common/complete/Quizmo.inc.c +++ b/src/world/common/complete/Quizmo.inc.c @@ -455,7 +455,7 @@ API_CALLABLE(N(Quizmo_GetCamVfov)) { Bytecode* args = script->ptrReadPos; s32 cameraID = evt_get_variable(script, *args++); - evt_set_variable(script, *args++, EVT_FLOAT_TO_FIXED(gCameras[cameraID].vfov)); + evt_set_variable(script, *args++, Float_TO_FIXED(gCameras[cameraID].vfov)); return ApiStatus_DONE2; } @@ -563,642 +563,642 @@ API_CALLABLE(N(Quizmo_CreateWorker)) { } EvtScript N(EVS_Quizmo_Exit) = { - EVT_CALL(N(Quizmo_ShouldQuizmoLeave)) - EVT_IF_LE(LVar0, 1) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 300) - EVT_CALL(SetNpcJumpscale, NPC_SELF, 1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_ChuckQuizmo_Vanish) - EVT_WAIT(40) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + Call(N(Quizmo_ShouldQuizmoLeave)) + IfLe(LVar0, 1) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 300) + Call(SetNpcJumpscale, NPC_SELF, 1) + Call(SetNpcAnimation, NPC_SELF, ANIM_ChuckQuizmo_Vanish) + Wait(40) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; EvtScript N(EVS_Quizmo_SetQuizCamera) = { - EVT_CALL(N(Quizmo_GetCamVfov), 0, QUIZ_ARRAY_SAVED_FOV) - EVT_CALL(N(Quizmo_SetCamVfov), 0, 25) //TODO - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2) - EVT_CALL(GetCamType, 0, LVar1, LVar2) - EVT_CALL(SetCamType, 0, LVar1, 0) - EVT_CALL(GetCamDistance, 0, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_SETF(LVar0, 370) - EVT_ELSE - EVT_SETF(LVar0, -370) - EVT_END_IF - EVT_CALL(SetCamDistance, 0, LVar0) - EVT_CALL(GetCamPitch, 0, LVar0, LVar1) - EVT_SETF(LVar0, EVT_FLOAT(13.0)) - EVT_SETF(LVar1, EVT_FLOAT(-10.0)) - EVT_CALL(SetCamPitch, 0, LVar0, LVar1) - EVT_CALL(PanToTarget, 0, 0, 1) - EVT_CALL(SetCamLeadPlayer, 0, 0) - EVT_RETURN - EVT_END + Call(N(Quizmo_GetCamVfov), 0, QUIZ_ARRAY_SAVED_FOV) + Call(N(Quizmo_SetCamVfov), 0, 25) //TODO + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPanTarget, 0, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, 0, LVar0, LVar1, LVar2) + Call(GetCamType, 0, LVar1, LVar2) + Call(SetCamType, 0, LVar1, 0) + Call(GetCamDistance, 0, LVar0) + IfGt(LVar0, 0) + SetF(LVar0, 370) + Else + SetF(LVar0, -370) + EndIf + Call(SetCamDistance, 0, LVar0) + Call(GetCamPitch, 0, LVar0, LVar1) + SetF(LVar0, Float(13.0)) + SetF(LVar1, Float(-10.0)) + Call(SetCamPitch, 0, LVar0, LVar1) + Call(PanToTarget, 0, 0, 1) + Call(SetCamLeadPlayer, 0, 0) + Return + End }; EvtScript N(EVS_Quizmo_OtherCamScript) = { - EVT_CALL(GetNpcPos, CHUCK_QUIZMO_NPC_ID, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 30) - EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2) - EVT_CALL(GetCamDistance, 0, LVar0) - EVT_IF_GT(LVar0, 0) - EVT_SETF(LVar0, 17) - EVT_ELSE - EVT_SETF(LVar0, -17) - EVT_END_IF - EVT_CALL(SetCamDistance, 0, LVar0) - EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0)) - EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0)) - EVT_CALL(SetCamSpeed, 0, 1) - EVT_RETURN - EVT_END + Call(GetNpcPos, CHUCK_QUIZMO_NPC_ID, LVar0, LVar1, LVar2) + Add(LVar1, 30) + Call(SetPanTarget, 0, LVar0, LVar1, LVar2) + Call(GetCamDistance, 0, LVar0) + IfGt(LVar0, 0) + SetF(LVar0, 17) + Else + SetF(LVar0, -17) + EndIf + Call(SetCamDistance, 0, LVar0) + Call(SetCamSpeed, 0, Float(90.0)) + Call(WaitForCam, 0, Float(1.0)) + Call(SetCamSpeed, 0, 1) + Return + End }; EvtScript N(EVS_Quizmo_ResetCamera) = { - EVT_CALL(N(Quizmo_SetCamVfov), 0, QUIZ_ARRAY_SAVED_FOV) - EVT_CALL(PanToTarget, 0, 0, 0) - EVT_RETURN - EVT_END + Call(N(Quizmo_SetCamVfov), 0, QUIZ_ARRAY_SAVED_FOV) + Call(PanToTarget, 0, 0, 0) + Return + End }; EvtScript N(EVS_Quizmo_MovePlayerToPodium) = { - EVT_WAIT(20) - EVT_CALL(N(Quizmo_AddViewRelativeOffset), QUIZ_ARRAY_ORIGIN_X, QUIZ_ARRAY_ORIGIN_Z, 83, LVar0, LVar1) - EVT_THREAD - EVT_SETF(LVar2, 0) - EVT_LOOP(60) - EVT_SETF(LVar3, LVar0) - EVT_SETF(LVar4, LVar1) - EVT_MULF(LVar3, LVar2) - EVT_MULF(LVar4, LVar2) - EVT_DIVF(LVar3, 60) - EVT_DIVF(LVar4, 60) - EVT_ADDF(LVar3, QUIZ_ARRAY_ORIGIN_X) - EVT_ADDF(LVar4, QUIZ_ARRAY_ORIGIN_Z) - EVT_CALL(SetPlayerPos, LVar3, QUIZ_ARRAY_ORIGIN_Y, LVar4) - EVT_ADDF(LVar2, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SETF(LVar3, LVar0) - EVT_SETF(LVar4, LVar1) - EVT_ADDF(LVar3, QUIZ_ARRAY_ORIGIN_X) - EVT_ADDF(LVar4, QUIZ_ARRAY_ORIGIN_Z) - EVT_CALL(SetPlayerPos, LVar3, QUIZ_ARRAY_ORIGIN_Y, LVar4) - EVT_END_THREAD - EVT_CALL(N(Quizmo_SpinPlayer)) - EVT_CALL(FacePlayerTowardPoint, QUIZ_ARRAY_ORIGIN_X, QUIZ_ARRAY_ORIGIN_Z, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_RETURN - EVT_END + Wait(20) + Call(N(Quizmo_AddViewRelativeOffset), QUIZ_ARRAY_ORIGIN_X, QUIZ_ARRAY_ORIGIN_Z, 83, LVar0, LVar1) + Thread + SetF(LVar2, 0) + Loop(60) + SetF(LVar3, LVar0) + SetF(LVar4, LVar1) + MulF(LVar3, LVar2) + MulF(LVar4, LVar2) + DivF(LVar3, 60) + DivF(LVar4, 60) + AddF(LVar3, QUIZ_ARRAY_ORIGIN_X) + AddF(LVar4, QUIZ_ARRAY_ORIGIN_Z) + Call(SetPlayerPos, LVar3, QUIZ_ARRAY_ORIGIN_Y, LVar4) + AddF(LVar2, 1) + Wait(1) + EndLoop + SetF(LVar3, LVar0) + SetF(LVar4, LVar1) + AddF(LVar3, QUIZ_ARRAY_ORIGIN_X) + AddF(LVar4, QUIZ_ARRAY_ORIGIN_Z) + Call(SetPlayerPos, LVar3, QUIZ_ARRAY_ORIGIN_Y, LVar4) + EndThread + Call(N(Quizmo_SpinPlayer)) + Call(FacePlayerTowardPoint, QUIZ_ARRAY_ORIGIN_X, QUIZ_ARRAY_ORIGIN_Z, 0) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Return + End }; EvtScript N(EVS_Quizmo_MovePartnerToPodium) = { - EVT_CALL(GetNpcPos, NPC_PARTNER, LVarA, LVarB, LVarC) - EVT_CALL(N(Quizmo_AddViewRelativeOffset), LVarA, LVarC, 108, LVar0, LVar1) - EVT_SETF(LVar5, QUIZ_ARRAY_ORIGIN_Y) - EVT_SUBF(LVar5, LVarB) - EVT_THREAD - EVT_CALL(N(Quizmo_UpdatePartnerPosition)) - EVT_SETF(LVar3, LVar0) - EVT_SETF(LVar4, LVar1) - EVT_SETF(LVar6, LVar5) - EVT_ADDF(LVar3, LVarA) - EVT_ADDF(LVar4, LVarC) - EVT_ADDF(LVar6, LVarB) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar3, LVar6, LVar4) - EVT_END_THREAD - EVT_CALL(N(Quizmo_SpinPartner)) - EVT_CALL(NpcFacePlayer, NPC_PARTNER, 0) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_PARTNER, LVarA, LVarB, LVarC) + Call(N(Quizmo_AddViewRelativeOffset), LVarA, LVarC, 108, LVar0, LVar1) + SetF(LVar5, QUIZ_ARRAY_ORIGIN_Y) + SubF(LVar5, LVarB) + Thread + Call(N(Quizmo_UpdatePartnerPosition)) + SetF(LVar3, LVar0) + SetF(LVar4, LVar1) + SetF(LVar6, LVar5) + AddF(LVar3, LVarA) + AddF(LVar4, LVarC) + AddF(LVar6, LVarB) + Call(SetNpcPos, NPC_PARTNER, LVar3, LVar6, LVar4) + EndThread + Call(N(Quizmo_SpinPartner)) + Call(NpcFacePlayer, NPC_PARTNER, 0) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Return + End }; EvtScript N(EVS_Quizmo_MoveQuizmoToMicrophone) = { - EVT_CALL(GetNpcPos, CHUCK_QUIZMO_NPC_ID, LVarA, LVarB, LVarC) - EVT_CALL(N(Quizmo_AddViewRelativeOffset), LVarA, LVarC, -70, LVar0, LVar1) - EVT_THREAD - EVT_SETF(LVar2, 0) - EVT_LOOP(60) - EVT_SETF(LVar3, LVar0) - EVT_SETF(LVar4, LVar1) - EVT_MULF(LVar3, LVar2) - EVT_MULF(LVar4, LVar2) - EVT_DIVF(LVar3, 60) - EVT_DIVF(LVar4, 60) - EVT_ADDF(LVar3, LVarA) - EVT_ADDF(LVar4, LVarC) - EVT_CALL(SetNpcPos, CHUCK_QUIZMO_NPC_ID, LVar3, QUIZ_ARRAY_ORIGIN_Y, LVar4) - EVT_ADDF(LVar2, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(60) - EVT_CALL(NpcFacePlayer, CHUCK_QUIZMO_NPC_ID, 0) - EVT_CALL(SetNpcAnimation, CHUCK_QUIZMO_NPC_ID, ANIM_ChuckQuizmo_Idle) - EVT_RETURN - EVT_END + Call(GetNpcPos, CHUCK_QUIZMO_NPC_ID, LVarA, LVarB, LVarC) + Call(N(Quizmo_AddViewRelativeOffset), LVarA, LVarC, -70, LVar0, LVar1) + Thread + SetF(LVar2, 0) + Loop(60) + SetF(LVar3, LVar0) + SetF(LVar4, LVar1) + MulF(LVar3, LVar2) + MulF(LVar4, LVar2) + DivF(LVar3, 60) + DivF(LVar4, 60) + AddF(LVar3, LVarA) + AddF(LVar4, LVarC) + Call(SetNpcPos, CHUCK_QUIZMO_NPC_ID, LVar3, QUIZ_ARRAY_ORIGIN_Y, LVar4) + AddF(LVar2, 1) + Wait(1) + EndLoop + EndThread + Wait(60) + Call(NpcFacePlayer, CHUCK_QUIZMO_NPC_ID, 0) + Call(SetNpcAnimation, CHUCK_QUIZMO_NPC_ID, ANIM_ChuckQuizmo_Idle) + Return + End }; EvtScript N(EVS_Quizmo_SetCharacterPositons) = { - EVT_EXEC(N(EVS_Quizmo_MovePlayerToPodium)) - EVT_EXEC(N(EVS_Quizmo_MovePartnerToPodium)) - EVT_EXEC_WAIT(N(EVS_Quizmo_MoveQuizmoToMicrophone)) - EVT_RETURN - EVT_END + Exec(N(EVS_Quizmo_MovePlayerToPodium)) + Exec(N(EVS_Quizmo_MovePartnerToPodium)) + ExecWait(N(EVS_Quizmo_MoveQuizmoToMicrophone)) + Return + End }; EvtScript N(EVS_Quizmo_PlayerThinking) = { - EVT_LOOP(0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Question) - EVT_WAIT(20) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(SetPlayerAnimation, ANIM_Mario1_Question) + Wait(20) + EndLoop + Return + End }; EvtScript N(EVS_Quizmo_PlayerHitBuzzer) = { - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Throw) - EVT_WAIT(15) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_RETURN - EVT_END + Call(SetPlayerAnimation, ANIM_Mario1_Throw) + Wait(15) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Return + End }; EvtScript N(EVS_Quizmo_PlayerReaction_RightAnswer) = { - EVT_LOOP(0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_BeforeJump) - EVT_WAIT(2) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Jump) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 3) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, 2) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, 1) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, 1) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, 0) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, 0) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, 0) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, 0) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Fall) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 0) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, 0) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, 0) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, -1) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, -1) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, -2) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, -3) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Land) - EVT_WAIT(2) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_BeforeJump) - EVT_WAIT(2) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Jump) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 3) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, 2) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, 1) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, 1) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, 0) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, 0) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, 0) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, 0) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Fall) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 0) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, 0) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, 0) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, -1) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, -1) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, -2) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, -3) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Land) - EVT_WAIT(2) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_BeforeJump) - EVT_WAIT(2) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Jump) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 3) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, 2) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, 1) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, 1) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, 0) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, 0) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, 0) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, 0) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Fall) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 0) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, 0) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, 0) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, -1) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, -1) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, -2) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar1, -3) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Land) - EVT_WAIT(2) - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetPlayerPos, LVar0, QUIZ_ARRAY_ORIGIN_Y, LVar2) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Loop(0) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(1) + Call(SetPlayerAnimation, ANIM_Mario1_BeforeJump) + Wait(2) + Call(SetPlayerAnimation, ANIM_Mario1_Jump) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 3) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, 2) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, 1) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, 1) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, 0) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, 0) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, 0) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, 0) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Call(SetPlayerAnimation, ANIM_Mario1_Fall) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 0) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, 0) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, 0) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, -1) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, -1) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, -2) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, -3) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Call(SetPlayerAnimation, ANIM_Mario1_Land) + Wait(2) + Wait(1) + Call(SetPlayerAnimation, ANIM_Mario1_BeforeJump) + Wait(2) + Call(SetPlayerAnimation, ANIM_Mario1_Jump) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 3) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, 2) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, 1) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, 1) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, 0) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, 0) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, 0) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, 0) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Call(SetPlayerAnimation, ANIM_Mario1_Fall) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 0) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, 0) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, 0) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, -1) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, -1) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, -2) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, -3) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Call(SetPlayerAnimation, ANIM_Mario1_Land) + Wait(2) + Wait(1) + Call(SetPlayerAnimation, ANIM_Mario1_BeforeJump) + Wait(2) + Call(SetPlayerAnimation, ANIM_Mario1_Jump) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 3) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, 2) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, 1) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, 1) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, 0) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, 0) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, 0) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, 0) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Call(SetPlayerAnimation, ANIM_Mario1_Fall) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 0) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, 0) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, 0) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, -1) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, -1) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, -2) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar1, -3) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + Call(SetPlayerAnimation, ANIM_Mario1_Land) + Wait(2) + EndLoop + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetPlayerPos, LVar0, QUIZ_ARRAY_ORIGIN_Y, LVar2) + Wait(1) + Return + End }; EvtScript N(EVS_Quizmo_PlayerReaction_WrongAnswer) = { - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_VacantStare) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetPlayerAnimation, ANIM_Mario1_VacantStare) + Loop(0) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_Quizmo_ReturnPlayerToOriginalPos) = { - EVT_THREAD - EVT_CALL(N(Quizmo_AddViewRelativeOffset), QUIZ_ARRAY_ORIGIN_X, QUIZ_ARRAY_ORIGIN_Z, 25, LVar0, LVar1) - EVT_SETF(LVar2, QUIZ_ARRAY_ORIGIN_X) - EVT_ADDF(LVar2, LVar0) - EVT_SETF(LVar3, QUIZ_ARRAY_ORIGIN_Z) - EVT_ADDF(LVar3, LVar1) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) - EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar2, LVar3, 40) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_END_THREAD - EVT_CALL(PlayerMoveTo, QUIZ_ARRAY_ORIGIN_X, QUIZ_ARRAY_ORIGIN_Z, 40) - EVT_RETURN - EVT_END + Thread + Call(N(Quizmo_AddViewRelativeOffset), QUIZ_ARRAY_ORIGIN_X, QUIZ_ARRAY_ORIGIN_Z, 25, LVar0, LVar1) + SetF(LVar2, QUIZ_ARRAY_ORIGIN_X) + AddF(LVar2, LVar0) + SetF(LVar3, QUIZ_ARRAY_ORIGIN_Z) + AddF(LVar3, LVar1) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_WALK) + Call(NpcMoveTo, NPC_PARTNER, LVar2, LVar3, 40) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + EndThread + Call(PlayerMoveTo, QUIZ_ARRAY_ORIGIN_X, QUIZ_ARRAY_ORIGIN_Z, 40) + Return + End }; EvtScript N(EVS_Quizmo_RightAnswer) = { - EVT_EXEC_GET_TID(N(EVS_Quizmo_PlayerReaction_RightAnswer), LVar1) - EVT_WAIT(60) - EVT_KILL_THREAD(LVar1) - EVT_LOOP(5) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, -1) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(2) - EVT_END_LOOP - EVT_WAIT(20) - EVT_EXEC_WAIT(N(EVS_Quizmo_ReturnPlayerToOriginalPos)) - EVT_RETURN - EVT_END + ExecGetTID(N(EVS_Quizmo_PlayerReaction_RightAnswer), LVar1) + Wait(60) + KillThread(LVar1) + Loop(5) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, -1) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(2) + EndLoop + Wait(20) + ExecWait(N(EVS_Quizmo_ReturnPlayerToOriginalPos)) + Return + End }; EvtScript N(EVS_Quizmo_WrongAnswer) = { - EVT_EXEC_GET_TID(N(EVS_Quizmo_PlayerReaction_WrongAnswer), LVar1) - EVT_WAIT(60) - EVT_LOOP(5) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, -1) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(2) - EVT_END_LOOP - EVT_WAIT(20) - EVT_KILL_THREAD(LVar1) - EVT_EXEC_WAIT(N(EVS_Quizmo_ReturnPlayerToOriginalPos)) - EVT_RETURN - EVT_END + ExecGetTID(N(EVS_Quizmo_PlayerReaction_WrongAnswer), LVar1) + Wait(60) + Loop(5) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, -1) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(2) + EndLoop + Wait(20) + KillThread(LVar1) + ExecWait(N(EVS_Quizmo_ReturnPlayerToOriginalPos)) + Return + End }; EvtScript N(EVS_Quizmo_QuizMain) = { - EVT_IF_GT(GB_CompletedQuizzes, 63) - EVT_SET(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPlayerPos, QUIZ_ARRAY_ORIGIN_X, QUIZ_ARRAY_ORIGIN_Y, QUIZ_ARRAY_ORIGIN_Z) - EVT_CALL(NpcFacePlayer, NPC_SELF, 16) - EVT_IF_EQ(GB_CompletedQuizzes, 63) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ChuckQuizmo_Talk, ANIM_ChuckQuizmo_Idle, 0, MSG_MGM_000A) - EVT_ELSE - EVT_IF_EQ(GF_Met_ChuckQuizmo, 1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ChuckQuizmo_Talk, ANIM_ChuckQuizmo_Idle, 0, MSG_MGM_0009) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ChuckQuizmo_Talk, ANIM_ChuckQuizmo_Idle, 0, MSG_MGM_0008) - EVT_SET(GF_Met_ChuckQuizmo, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(ShowChoice, MSG_Choice_000D) - EVT_IF_EQ(LVar0, 1) - EVT_CALL(ContinueSpeech, -1, ANIM_ChuckQuizmo_Talk, ANIM_ChuckQuizmo_Idle, 0, MSG_MGM_000C) - EVT_EXEC_WAIT(N(EVS_Quizmo_Exit)) - EVT_SET(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_SET(GF_Quizmo_TakingQuiz, 1) - EVT_CALL(N(Quizmo_HideEntities)) - EVT_CALL(N(Quizmo_HideWorld)) - EVT_EXEC(N(EVS_Quizmo_SetQuizCamera)) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, CHUCK_QUIZMO_NPC_ID, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, CHUCK_QUIZMO_NPC_ID, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_EXEC_GET_TID(N(EVS_Quizmo_SetCharacterPositons), LVar1) - EVT_CALL(ContinueSpeech, -1, ANIM_ChuckQuizmo_Talk, ANIM_ChuckQuizmo_Idle, 0, MSG_MGM_000B) - EVT_CALL(PlaySound, SOUND_LRAW_AUDIENCE_MURMUR) - EVT_LOOP(0) - EVT_IS_THREAD_RUNNING(LVar1, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(N(Quizmo_CreateStage)) - EVT_LOOP(5) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 1) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(2) - EVT_END_LOOP - EVT_SET(LVar0, MSG_QuizQuestion_01) - EVT_ADD(LVar0, GB_CompletedQuizzes) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ChuckQuizmo_OpenHat, ANIM_ChuckQuizmo_CloseHat, 0, LVar0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Question) - EVT_SET(LVar0, MSG_QuizChoice_01) - EVT_ADD(LVar0, GB_CompletedQuizzes) - EVT_CALL(PlaySound, SOUND_LRAW_QUIZ_TICKING) - EVT_CALL(ShowChoice, LVar0) - EVT_KILL_THREAD(LVar1) - EVT_CALL(StopSound, SOUND_LRAW_QUIZ_TICKING) - EVT_EXEC(N(EVS_Quizmo_PlayerHitBuzzer)) - EVT_WAIT(15) - EVT_CALL(PlaySound, SOUND_QUIZ_BUZZER) - EVT_CALL(N(Quizmo_UnkStageEffectMode), LVar0) - EVT_SET(QUIZ_ARRAY_ANSWER_RESULT, 0) - EVT_CALL(N(Quizmo_CreateWorker)) - EVT_WAIT(40) - EVT_CALL(N(Quizmo_UpdateRecords)) - EVT_THREAD - EVT_WAIT(110) - EVT_CALL(CloseChoice) - EVT_SET(QUIZ_ARRAY_ANSWER_RESULT, 0) - EVT_END_THREAD - EVT_IF_EQ(LVar0, 1) - EVT_CALL(SetNpcAnimation, CHUCK_QUIZMO_NPC_ID, ANIM_ChuckQuizmo_OpenCorrect) - EVT_SET(QUIZ_ARRAY_ANSWER_RESULT, 1) - EVT_THREAD - EVT_CALL(N(Quizmo_SetStageLightsDelay), 1) - EVT_WAIT(6) - EVT_WAIT(6) - EVT_WAIT(6) - EVT_CALL(N(Quizmo_SetStageLightsDelay), 2) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(PlaySound, SOUND_APPROVE) - EVT_WAIT(6) - EVT_CALL(PlaySound, SOUND_APPROVE) - EVT_WAIT(6) - EVT_CALL(PlaySound, SOUND_APPROVE) - EVT_WAIT(6) - EVT_CALL(PlaySound, SOUND_APPROVE) - EVT_END_THREAD - EVT_CALL(PlaySound, SOUND_AUDIENCE_CHEER) - EVT_CALL(N(Quizmo_SetVannaAnim_Clap)) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 50) - EVT_CALL(N(Quizmo_AddViewRelativeOffset), 0, 0, 83, LVar0, LVar2) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_CONFETTI, 4, LVar0, LVar1, LVar2, 1, 60) - EVT_WAIT(15) - EVT_ADD(LVar1, -3) - EVT_CALL(N(Quizmo_AddViewRelativeOffset), 0, 0, 58, LVar0, LVar2) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_CONFETTI, 4, LVar0, LVar1, LVar2, 1, 60) - EVT_WAIT(15) - EVT_ADD(LVar1, 30) - EVT_CALL(N(Quizmo_AddViewRelativeOffset), 0, 0, 93, LVar0, LVar2) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_CONFETTI, 4, LVar0, LVar1, LVar2, 1, 60) - EVT_WAIT(15) - EVT_END_THREAD - EVT_WAIT(20) - EVT_EXEC_GET_TID(N(EVS_Quizmo_RightAnswer), LVar1) - EVT_ADD(GB_CompletedQuizzes, 1) - EVT_IF_GT(GB_CompletedQuizzes, 63) - EVT_CALL(ContinueSpeech, -1, -1, -1, 0, MSG_MGM_0010) - EVT_CALL(SetNpcAnimation, CHUCK_QUIZMO_NPC_ID, ANIM_ChuckQuizmo_CloseHat) - EVT_LOOP(0) - EVT_IS_THREAD_RUNNING(LVar1, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, CHUCK_QUIZMO_NPC_ID, ANIM_ChuckQuizmo_OpenHat) - EVT_SET(LVar0, ITEM_STAR_PIECE) - EVT_SET(LVar1, 3) - EVT_EXEC_WAIT(N(GiveItemReward)) - EVT_CALL(AddStarPieces, 1) - EVT_CALL(N(Quizmo_SetStageLightsDelay), 15) - EVT_CALL(N(Quizmo_SetVannaAnim_Idle)) - EVT_CALL(SetMessageValue, GB_CompletedQuizzes, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ChuckQuizmo_Talk, ANIM_ChuckQuizmo_Idle, 0, MSG_MGM_0011) - EVT_ELSE - EVT_CALL(ContinueSpeech, -1, -1, -1, 0, MSG_MGM_000E) - EVT_CALL(SetNpcAnimation, CHUCK_QUIZMO_NPC_ID, ANIM_ChuckQuizmo_CloseHat) - EVT_LOOP(0) - EVT_IS_THREAD_RUNNING(LVar1, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, CHUCK_QUIZMO_NPC_ID, ANIM_ChuckQuizmo_OpenHat) - EVT_SET(LVar0, ITEM_STAR_PIECE) - EVT_SET(LVar1, 1) - EVT_EXEC_WAIT(N(GiveItemReward)) - EVT_CALL(AddStarPieces, 1) - EVT_CALL(N(Quizmo_SetStageLightsDelay), 15) - EVT_CALL(N(Quizmo_SetVannaAnim_Idle)) - EVT_CALL(SetMessageValue, GB_CompletedQuizzes, 0) - EVT_IF_EQ(GB_CompletedQuizzes, 1) - EVT_CALL(SetMessageText, EVT_PTR(MessageSingular), 1) - EVT_ELSE + IfGt(GB_CompletedQuizzes, 63) + Set(LVar0, 0) + Return + EndIf + Call(GetPlayerPos, QUIZ_ARRAY_ORIGIN_X, QUIZ_ARRAY_ORIGIN_Y, QUIZ_ARRAY_ORIGIN_Z) + Call(NpcFacePlayer, NPC_SELF, 16) + IfEq(GB_CompletedQuizzes, 63) + Call(SpeakToPlayer, NPC_SELF, ANIM_ChuckQuizmo_Talk, ANIM_ChuckQuizmo_Idle, 0, MSG_MGM_000A) + Else + IfEq(GF_Met_ChuckQuizmo, 1) + Call(SpeakToPlayer, NPC_SELF, ANIM_ChuckQuizmo_Talk, ANIM_ChuckQuizmo_Idle, 0, MSG_MGM_0009) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_ChuckQuizmo_Talk, ANIM_ChuckQuizmo_Idle, 0, MSG_MGM_0008) + Set(GF_Met_ChuckQuizmo, 1) + EndIf + EndIf + Call(ShowChoice, MSG_Choice_000D) + IfEq(LVar0, 1) + Call(ContinueSpeech, -1, ANIM_ChuckQuizmo_Talk, ANIM_ChuckQuizmo_Idle, 0, MSG_MGM_000C) + ExecWait(N(EVS_Quizmo_Exit)) + Set(LVar0, 0) + Return + EndIf + Set(GF_Quizmo_TakingQuiz, 1) + Call(N(Quizmo_HideEntities)) + Call(N(Quizmo_HideWorld)) + Exec(N(EVS_Quizmo_SetQuizCamera)) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, CHUCK_QUIZMO_NPC_ID, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, CHUCK_QUIZMO_NPC_ID, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + ExecGetTID(N(EVS_Quizmo_SetCharacterPositons), LVar1) + Call(ContinueSpeech, -1, ANIM_ChuckQuizmo_Talk, ANIM_ChuckQuizmo_Idle, 0, MSG_MGM_000B) + Call(PlaySound, SOUND_LRAW_AUDIENCE_MURMUR) + Loop(0) + IsThreadRunning(LVar1, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(N(Quizmo_CreateStage)) + Loop(5) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 1) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(2) + EndLoop + Set(LVar0, MSG_QuizQuestion_01) + Add(LVar0, GB_CompletedQuizzes) + Call(SpeakToPlayer, NPC_SELF, ANIM_ChuckQuizmo_OpenHat, ANIM_ChuckQuizmo_CloseHat, 0, LVar0) + Call(SetPlayerAnimation, ANIM_Mario1_Question) + Set(LVar0, MSG_QuizChoice_01) + Add(LVar0, GB_CompletedQuizzes) + Call(PlaySound, SOUND_LRAW_QUIZ_TICKING) + Call(ShowChoice, LVar0) + KillThread(LVar1) + Call(StopSound, SOUND_LRAW_QUIZ_TICKING) + Exec(N(EVS_Quizmo_PlayerHitBuzzer)) + Wait(15) + Call(PlaySound, SOUND_QUIZ_BUZZER) + Call(N(Quizmo_UnkStageEffectMode), LVar0) + Set(QUIZ_ARRAY_ANSWER_RESULT, 0) + Call(N(Quizmo_CreateWorker)) + Wait(40) + Call(N(Quizmo_UpdateRecords)) + Thread + Wait(110) + Call(CloseChoice) + Set(QUIZ_ARRAY_ANSWER_RESULT, 0) + EndThread + IfEq(LVar0, 1) + Call(SetNpcAnimation, CHUCK_QUIZMO_NPC_ID, ANIM_ChuckQuizmo_OpenCorrect) + Set(QUIZ_ARRAY_ANSWER_RESULT, 1) + Thread + Call(N(Quizmo_SetStageLightsDelay), 1) + Wait(6) + Wait(6) + Wait(6) + Call(N(Quizmo_SetStageLightsDelay), 2) + EndThread + Thread + Call(PlaySound, SOUND_APPROVE) + Wait(6) + Call(PlaySound, SOUND_APPROVE) + Wait(6) + Call(PlaySound, SOUND_APPROVE) + Wait(6) + Call(PlaySound, SOUND_APPROVE) + EndThread + Call(PlaySound, SOUND_AUDIENCE_CHEER) + Call(N(Quizmo_SetVannaAnim_Clap)) + Thread + Wait(15) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 50) + Call(N(Quizmo_AddViewRelativeOffset), 0, 0, 83, LVar0, LVar2) + PlayEffect(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_CONFETTI, 4, LVar0, LVar1, LVar2, 1, 60) + Wait(15) + Add(LVar1, -3) + Call(N(Quizmo_AddViewRelativeOffset), 0, 0, 58, LVar0, LVar2) + PlayEffect(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_CONFETTI, 4, LVar0, LVar1, LVar2, 1, 60) + Wait(15) + Add(LVar1, 30) + Call(N(Quizmo_AddViewRelativeOffset), 0, 0, 93, LVar0, LVar2) + PlayEffect(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_CONFETTI, 4, LVar0, LVar1, LVar2, 1, 60) + Wait(15) + EndThread + Wait(20) + ExecGetTID(N(EVS_Quizmo_RightAnswer), LVar1) + Add(GB_CompletedQuizzes, 1) + IfGt(GB_CompletedQuizzes, 63) + Call(ContinueSpeech, -1, -1, -1, 0, MSG_MGM_0010) + Call(SetNpcAnimation, CHUCK_QUIZMO_NPC_ID, ANIM_ChuckQuizmo_CloseHat) + Loop(0) + IsThreadRunning(LVar1, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetNpcAnimation, CHUCK_QUIZMO_NPC_ID, ANIM_ChuckQuizmo_OpenHat) + Set(LVar0, ITEM_STAR_PIECE) + Set(LVar1, 3) + ExecWait(N(GiveItemReward)) + Call(AddStarPieces, 1) + Call(N(Quizmo_SetStageLightsDelay), 15) + Call(N(Quizmo_SetVannaAnim_Idle)) + Call(SetMessageValue, GB_CompletedQuizzes, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_ChuckQuizmo_Talk, ANIM_ChuckQuizmo_Idle, 0, MSG_MGM_0011) + Else + Call(ContinueSpeech, -1, -1, -1, 0, MSG_MGM_000E) + Call(SetNpcAnimation, CHUCK_QUIZMO_NPC_ID, ANIM_ChuckQuizmo_CloseHat) + Loop(0) + IsThreadRunning(LVar1, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(SetNpcAnimation, CHUCK_QUIZMO_NPC_ID, ANIM_ChuckQuizmo_OpenHat) + Set(LVar0, ITEM_STAR_PIECE) + Set(LVar1, 1) + ExecWait(N(GiveItemReward)) + Call(AddStarPieces, 1) + Call(N(Quizmo_SetStageLightsDelay), 15) + Call(N(Quizmo_SetVannaAnim_Idle)) + Call(SetMessageValue, GB_CompletedQuizzes, 0) + IfEq(GB_CompletedQuizzes, 1) + Call(SetMessageText, Ref(MessageSingular), 1) + Else #if VERSION_PAL - EVT_CALL(GetLanguage, LVar0) - EVT_IF_EQ(LVar0, LANGUAGE_DE) - EVT_CALL(SetMessageText, EVT_PTR(MessagePlural_de), 1) - EVT_ELSE - EVT_CALL(SetMessageText, EVT_PTR(MessagePlural), 1) - EVT_END_IF + Call(GetLanguage, LVar0) + IfEq(LVar0, LANGUAGE_DE) + Call(SetMessageText, Ref(MessagePlural_de), 1) + Else + Call(SetMessageText, Ref(MessagePlural), 1) + EndIf #else - EVT_CALL(SetMessageText, EVT_PTR(MessagePlural), 1) + Call(SetMessageText, Ref(MessagePlural), 1) #endif - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_ChuckQuizmo_Talk, ANIM_ChuckQuizmo_Idle, 0, MSG_MGM_000F) - EVT_END_IF - EVT_SET(LVar0, 1) - EVT_ELSE - EVT_CALL(SetNpcAnimation, CHUCK_QUIZMO_NPC_ID, ANIM_ChuckQuizmo_OpenWrong) - EVT_SET(QUIZ_ARRAY_ANSWER_RESULT, 2) - EVT_CALL(PlaySound, SOUND_MENU_ERROR) - EVT_CALL(PlaySound, SOUND_AUDIENCE_BOO) - EVT_EXEC_GET_TID(N(EVS_Quizmo_WrongAnswer), LVar1) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_PLAY_EFFECT(EFFECT_WINDY_LEAVES, 0, LVar2, LVar3, LVar4) - EVT_CALL(ContinueSpeech, -1, -1, -1, 0, MSG_MGM_000D) - EVT_CALL(SetNpcAnimation, CHUCK_QUIZMO_NPC_ID, ANIM_ChuckQuizmo_CloseWrong) - EVT_LOOP(0) - EVT_IS_THREAD_RUNNING(LVar1, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(LVar0, 0) - EVT_END_IF - EVT_CALL(N(Quizmo_UnkStageEffectMode), -1) - EVT_CALL(EnablePartnerAI) - EVT_THREAD - EVT_WAIT(30) - EVT_CALL(PlaySound, SOUND_QUIZMO_VANISH) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(45) - EVT_CALL(StopSound, SOUND_LRAW_AUDIENCE_MURMUR) - EVT_END_THREAD - EVT_CALL(N(Quizmo_SetVannaAnim_Wave)) - EVT_CALL(N(Quizmo_DestroyEffects)) - EVT_EXEC_WAIT(N(EVS_Quizmo_Exit)) - EVT_EXEC(N(EVS_Quizmo_ResetCamera)) - EVT_CALL(N(Quizmo_FadeInWorld)) - EVT_CALL(N(Quizmo_ShowEntities)) - EVT_SET(GF_Quizmo_TakingQuiz, 0) - EVT_RETURN - EVT_END + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_ChuckQuizmo_Talk, ANIM_ChuckQuizmo_Idle, 0, MSG_MGM_000F) + EndIf + Set(LVar0, 1) + Else + Call(SetNpcAnimation, CHUCK_QUIZMO_NPC_ID, ANIM_ChuckQuizmo_OpenWrong) + Set(QUIZ_ARRAY_ANSWER_RESULT, 2) + Call(PlaySound, SOUND_MENU_ERROR) + Call(PlaySound, SOUND_AUDIENCE_BOO) + ExecGetTID(N(EVS_Quizmo_WrongAnswer), LVar1) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + PlayEffect(EFFECT_WINDY_LEAVES, 0, LVar2, LVar3, LVar4) + Call(ContinueSpeech, -1, -1, -1, 0, MSG_MGM_000D) + Call(SetNpcAnimation, CHUCK_QUIZMO_NPC_ID, ANIM_ChuckQuizmo_CloseWrong) + Loop(0) + IsThreadRunning(LVar1, LVar0) + IfEq(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Set(LVar0, 0) + EndIf + Call(N(Quizmo_UnkStageEffectMode), -1) + Call(EnablePartnerAI) + Thread + Wait(30) + Call(PlaySound, SOUND_QUIZMO_VANISH) + EndThread + Thread + Wait(45) + Call(StopSound, SOUND_LRAW_AUDIENCE_MURMUR) + EndThread + Call(N(Quizmo_SetVannaAnim_Wave)) + Call(N(Quizmo_DestroyEffects)) + ExecWait(N(EVS_Quizmo_Exit)) + Exec(N(EVS_Quizmo_ResetCamera)) + Call(N(Quizmo_FadeInWorld)) + Call(N(Quizmo_ShowEntities)) + Set(GF_Quizmo_TakingQuiz, 0) + Return + End }; EvtScript N(EVS_Quizmo_NPC_OtherAI) = { - EVT_CALL(N(Quizmo_ShouldAppear)) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_NO_SPRITE, FALSE) - EVT_CALL(SetNpcSprite, -1, ANIM_ChuckQuizmo_Idle) - EVT_CALL(N(Quizmo_RenderInit)) - EVT_RETURN - EVT_END + Call(N(Quizmo_ShouldAppear)) + IfEq(LVar0, 0) + Return + EndIf + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_NO_SPRITE, FALSE) + Call(SetNpcSprite, -1, ANIM_ChuckQuizmo_Idle) + Call(N(Quizmo_RenderInit)) + Return + End }; EvtScript N(EVS_Quizmo_NPC_Interact) = { - EVT_USE_ARRAY(EVT_PTR(N(Quizmo_ScriptArray))) - EVT_SET(GF_Quizmo_ChangedLocation, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_MOVEMENT_LOCKED, 1) - EVT_EXEC_WAIT(N(EVS_Quizmo_QuizMain)) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_MOVEMENT_LOCKED, 0) - EVT_RETURN - EVT_END + UseArray(Ref(N(Quizmo_ScriptArray))) + Set(GF_Quizmo_ChangedLocation, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerFlagBits, PS_FLAG_MOVEMENT_LOCKED, 1) + ExecWait(N(EVS_Quizmo_QuizMain)) + Call(DisablePlayerPhysics, FALSE) + Call(SetPlayerFlagBits, PS_FLAG_MOVEMENT_LOCKED, 0) + Return + End }; EvtScript N(EVS_Quizmo_NPC_Aux) = { - EVT_CALL(N(Quizmo_NPC_Aux_Impl)) - EVT_RETURN - EVT_END + Call(N(Quizmo_NPC_Aux_Impl)) + Return + End }; MobileAISettings N(Quizmo_MobileAISettings) = { @@ -1210,9 +1210,9 @@ MobileAISettings N(Quizmo_MobileAISettings) = { }; EvtScript N(EVS_Quizmo_Npc_AI) = { - EVT_CALL(BasicAI_Main, EVT_PTR(N(Quizmo_MobileAISettings))) - EVT_RETURN - EVT_END + Call(BasicAI_Main, Ref(N(Quizmo_MobileAISettings))) + Return + End }; // primary quizmo NpcSettings diff --git a/src/world/common/enemy/AlbinoDino.inc.c b/src/world/common/enemy/AlbinoDino.inc.c index f5c3263c5c0..2c3f10dc90f 100644 --- a/src/world/common/enemy/AlbinoDino.inc.c +++ b/src/world/common/enemy/AlbinoDino.inc.c @@ -1,8 +1,8 @@ #include "AlbinoDino.h" EvtScript N(EVS_NpcAuxAI_AlbinoDino) = { - EVT_RETURN - EVT_END + Return + End }; NpcSettings N(NpcSettings_AlbinoDino) = { diff --git a/src/world/common/enemy/AmazyDayzee.inc.c b/src/world/common/enemy/AmazyDayzee.inc.c index bf0f2eae7ea..02934100ff6 100644 --- a/src/world/common/enemy/AmazyDayzee.inc.c +++ b/src/world/common/enemy/AmazyDayzee.inc.c @@ -18,21 +18,21 @@ MobileAISettings N(AISettings_AmazyDayzee) = { }; EvtScript N(EVS_NpcAI_AmazyDayzee) = { - EVT_CALL(N(AvoidPlayerAI_Main), EVT_PTR(N(AISettings_AmazyDayzee))) - EVT_RETURN - EVT_END + Call(N(AvoidPlayerAI_Main), Ref(N(AISettings_AmazyDayzee))) + Return + End }; EvtScript N(EVS_NpcAux_AmazyDayzee) = { - EVT_LABEL(0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 30) - EVT_SUB(LVar2, 2) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 30) - EVT_WAIT(15) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 30) + Sub(LVar2, 2) + PlayEffect(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 30) + Wait(15) + Goto(0) + Return + End }; NpcSettings N(NpcSettings_AmazyDayzee) = { diff --git a/src/world/common/enemy/Bandit.inc.c b/src/world/common/enemy/Bandit.inc.c index 072badbb10d..816970ea676 100644 --- a/src/world/common/enemy/Bandit.inc.c +++ b/src/world/common/enemy/Bandit.inc.c @@ -41,14 +41,14 @@ API_CALLABLE(N(Bandit_TetherStolenCoin)) { } EvtScript N(EVS_Bandit_CreateStolenCoin) = { - EVT_SET(LVarA, LVar0) - EVT_CALL(GetNpcPos, LVarA, LVar1, LVar2, LVar3) - EVT_ADD(LVar2, 30) - EVT_CALL(MakeItemEntity, ITEM_COIN, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_CALL(N(Bandit_TetherStolenCoin), LVarA, LVar0, HAS_COIN_FLAG) - EVT_CALL(RemoveItemEntity, LVar0) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Call(GetNpcPos, LVarA, LVar1, LVar2, LVar3) + Add(LVar2, 30) + Call(MakeItemEntity, ITEM_COIN, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_DECORATION, 0) + Call(N(Bandit_TetherStolenCoin), LVarA, LVar0, HAS_COIN_FLAG) + Call(RemoveItemEntity, LVar0) + Return + End }; MobileAISettings N(AISettings_Bandit) = { @@ -66,46 +66,46 @@ MobileAISettings N(AISettings_Bandit) = { }; EvtScript N(EVS_NpcAI_Bandit) = { - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_Bandit))) - EVT_RETURN - EVT_END + Call(BasicAI_Main, Ref(N(AISettings_Bandit))) + Return + End }; EvtScript N(EVS_NpcDefeat_Bandit) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(OnPlayerFled, 0) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(HAS_COIN_FLAG, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Bandit_IdleHolding) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_EXEC(N(EVS_Bandit_CreateStolenCoin)) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_CALL(GetPlayerPos, LVar7, LVar8, LVar9) - EVT_ADD(LVar7, 20) - EVT_CALL(NpcJump0, NPC_SELF, LVar7, 0, LVar9, 6) - EVT_ADD(LVar7, 20) - EVT_CALL(NpcJump0, NPC_SELF, LVar7, 0, LVar9, 6) - EVT_CALL(GetNpcYaw, NPC_SELF, LVar0) - EVT_ADD(LVar0, 180) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 5) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Bandit_RunHolding) - EVT_WAIT(10) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(16.0)) - EVT_ADD(LVar7, 200) - EVT_CALL(NpcMoveTo, NPC_SELF, LVar7, LVar9, 0) - EVT_SET(HAS_COIN_FLAG, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_FLED) + Call(OnPlayerFled, 0) + CaseEq(OUTCOME_ENEMY_FLED) + Call(DisablePlayerInput, TRUE) + Set(HAS_COIN_FLAG, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Bandit_IdleHolding) + Call(GetSelfNpcID, LVar0) + Exec(N(EVS_Bandit_CreateStolenCoin)) + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Call(GetPlayerPos, LVar7, LVar8, LVar9) + Add(LVar7, 20) + Call(NpcJump0, NPC_SELF, LVar7, 0, LVar9, 6) + Add(LVar7, 20) + Call(NpcJump0, NPC_SELF, LVar7, 0, LVar9, 6) + Call(GetNpcYaw, NPC_SELF, LVar0) + Add(LVar0, 180) + Call(InterpNpcYaw, NPC_SELF, LVar0, 5) + Call(SetNpcAnimation, NPC_SELF, ANIM_Bandit_RunHolding) + Wait(10) + Call(SetNpcSpeed, NPC_SELF, Float(16.0)) + Add(LVar7, 200) + Call(NpcMoveTo, NPC_SELF, LVar7, LVar9, 0) + Set(HAS_COIN_FLAG, FALSE) + Call(DisablePlayerInput, FALSE) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; NpcSettings N(NpcSettings_Bandit) = { diff --git a/src/world/common/enemy/Bobomb_Guard.inc.c b/src/world/common/enemy/Bobomb_Guard.inc.c index 61370d1b0d6..aa292ab6770 100644 --- a/src/world/common/enemy/Bobomb_Guard.inc.c +++ b/src/world/common/enemy/Bobomb_Guard.inc.c @@ -16,9 +16,9 @@ GuardAISettings N(AISettings_Bobomb_Guard) = { }; EvtScript N(EVS_NpcAI_Bobomb_Guard) = { - EVT_CALL(N(GuardAI_Main), EVT_PTR(N(AISettings_Bobomb_Guard))) - EVT_RETURN - EVT_END + Call(N(GuardAI_Main), Ref(N(AISettings_Bobomb_Guard))) + Return + End }; NpcSettings N(NpcSettings_Bobomb_Guard) = { diff --git a/src/world/common/enemy/Bobomb_Wander.inc.c b/src/world/common/enemy/Bobomb_Wander.inc.c index 819e1e166f5..2e94e9a011f 100644 --- a/src/world/common/enemy/Bobomb_Wander.inc.c +++ b/src/world/common/enemy/Bobomb_Wander.inc.c @@ -17,9 +17,9 @@ MobileAISettings N(AISettings_Bobomb) = { }; EvtScript N(EVS_NpcAI_Bobomb_Wander) = { - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_Bobomb))) - EVT_RETURN - EVT_END + Call(BasicAI_Main, Ref(N(AISettings_Bobomb))) + Return + End }; NpcSettings N(NpcSettings_Bobomb_Wander) = { diff --git a/src/world/common/enemy/Bzzap.inc.c b/src/world/common/enemy/Bzzap.inc.c index 5e86f806f26..c508971fbf1 100644 --- a/src/world/common/enemy/Bzzap.inc.c +++ b/src/world/common/enemy/Bzzap.inc.c @@ -18,13 +18,13 @@ MobileAISettings N(AISettings_Bzzap) = { }; EvtScript N(EVS_NpcAI_Bzzap) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetSelfVar, 5, -630) - EVT_CALL(SetSelfVar, 6, 50) - EVT_CALL(SetSelfVar, 1, 200) - EVT_CALL(N(FlyingAI_Main), EVT_PTR(N(AISettings_Bzzap))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Call(SetSelfVar, 5, -630) + Call(SetSelfVar, 6, 50) + Call(SetSelfVar, 1, 200) + Call(N(FlyingAI_Main), Ref(N(AISettings_Bzzap))) + Return + End }; NpcSettings N(NpcSettings_Bzzap) = { diff --git a/src/world/common/enemy/Cleft.inc.c b/src/world/common/enemy/Cleft.inc.c index fed1e0d069b..4b71bbf8418 100644 --- a/src/world/common/enemy/Cleft.inc.c +++ b/src/world/common/enemy/Cleft.inc.c @@ -18,9 +18,9 @@ MobileAISettings N(AISettings_Cleft) = { }; EvtScript N(EVS_NpcAI_Cleft) = { - EVT_CALL(N(CleftAI_Main), EVT_PTR(N(AISettings_Cleft)), 16) - EVT_RETURN - EVT_END + Call(N(CleftAI_Main), Ref(N(AISettings_Cleft)), 16) + Return + End }; NpcSettings N(NpcSettings_Cleft) = { diff --git a/src/world/common/enemy/Clubba_Multi.inc.c b/src/world/common/enemy/Clubba_Multi.inc.c index 76ef0031825..e3d7dd30ad1 100644 --- a/src/world/common/enemy/Clubba_Multi.inc.c +++ b/src/world/common/enemy/Clubba_Multi.inc.c @@ -1,19 +1,19 @@ #include "Clubba.h" EvtScript N(EVS_NpcDefeat_Clubba) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(OnPlayerFled, 1) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(RemoveNpc, NPC_SELF) + CaseEq(OUTCOME_PLAYER_FLED) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(OnPlayerFled, 1) + CaseEq(OUTCOME_ENEMY_FLED) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; AnimID N(ExtraAnims_Clubba)[] = { @@ -53,13 +53,13 @@ MobileAISettings N(AISettings_Clubba_Wander) = { }; EvtScript N(EVS_NpcAI_Clubba_Wander) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetSelfVar, 1, 5) - EVT_CALL(SetSelfVar, 2, 8) - EVT_CALL(SetSelfVar, 3, 12) - EVT_CALL(N(WanderMeleeAI_Main), EVT_PTR(N(AISettings_Clubba_Wander))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Call(SetSelfVar, 1, 5) + Call(SetSelfVar, 2, 8) + Call(SetSelfVar, 3, 12) + Call(N(WanderMeleeAI_Main), Ref(N(AISettings_Clubba_Wander))) + Return + End }; NpcSettings N(NpcSettings_Clubba_Wander) = { @@ -93,13 +93,13 @@ MobileAISettings N(AISettings_Clubba_Patrol) = { }; EvtScript N(EVS_NpcAI_Clubba_Patrol) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetSelfVar, 1, 5) - EVT_CALL(SetSelfVar, 2, 8) - EVT_CALL(SetSelfVar, 3, 12) - EVT_CALL(N(ClubbaPatrolAI_Main), EVT_PTR(N(AISettings_Clubba_Patrol))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Call(SetSelfVar, 1, 5) + Call(SetSelfVar, 2, 8) + Call(SetSelfVar, 3, 12) + Call(N(ClubbaPatrolAI_Main), Ref(N(AISettings_Clubba_Patrol))) + Return + End }; NpcSettings N(NpcSettings_Clubba_Patrol) = { @@ -133,13 +133,13 @@ MobileAISettings N(AISettings_Clubba_Napping) = { }; EvtScript N(EVS_NpcAI_Clubba_Napping) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetSelfVar, 1, 10) - EVT_CALL(SetSelfVar, 2, 14) - EVT_CALL(SetSelfVar, 3, 18) - EVT_CALL(N(ClubbaNappingAI_Main), EVT_PTR(N(AISettings_Clubba_Napping))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Call(SetSelfVar, 1, 10) + Call(SetSelfVar, 2, 14) + Call(SetSelfVar, 3, 18) + Call(N(ClubbaNappingAI_Main), Ref(N(AISettings_Clubba_Napping))) + Return + End }; NpcSettings N(NpcSettings_Clubba_Napping) = { @@ -156,16 +156,16 @@ NpcSettings N(NpcSettings_Clubba_Napping) = { #include "world/common/enemy/ai/MeleeHitbox.inc.c" EvtScript N(EVS_NpcAI_Clubba_Hitbox) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetSelfVar, 0, 4) - EVT_CALL(SetSelfVar, 1, 32) - EVT_CALL(SetSelfVar, 2, 50) - EVT_CALL(SetSelfVar, 3, 32) - EVT_CALL(SetSelfVar, 4, 3) - EVT_CALL(SetSelfVar, 15, SOUND_CLUBBA_SWING) - EVT_CALL(N(MeleeHitbox_Main)) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetSelfVar, 0, 4) + Call(SetSelfVar, 1, 32) + Call(SetSelfVar, 2, 50) + Call(SetSelfVar, 3, 32) + Call(SetSelfVar, 4, 3) + Call(SetSelfVar, 15, SOUND_CLUBBA_SWING) + Call(N(MeleeHitbox_Main)) + Return + End }; NpcSettings N(NpcSettings_Clubba_Hitbox) = { diff --git a/src/world/common/enemy/CrazyDayzee.inc.c b/src/world/common/enemy/CrazyDayzee.inc.c index a67351ccc9a..330f22a245e 100644 --- a/src/world/common/enemy/CrazyDayzee.inc.c +++ b/src/world/common/enemy/CrazyDayzee.inc.c @@ -16,9 +16,9 @@ MobileAISettings N(AISettings_CrazyDayzee) = { }; EvtScript N(EVS_NpcAI_CrazyDayzee) = { - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_CrazyDayzee))) - EVT_RETURN - EVT_END + Call(BasicAI_Main, Ref(N(AISettings_CrazyDayzee))) + Return + End }; NpcSettings N(NpcSettings_CrazyDayzee) = { diff --git a/src/world/common/enemy/DarkTroopa_Wander.inc.c b/src/world/common/enemy/DarkTroopa_Wander.inc.c index 67519ec09f4..95b384edf81 100644 --- a/src/world/common/enemy/DarkTroopa_Wander.inc.c +++ b/src/world/common/enemy/DarkTroopa_Wander.inc.c @@ -17,13 +17,13 @@ MobileAISettings N(AISettings_DarkTroopa_Wander) = { }; EvtScript N(EVS_NpcAI_DarkTroopa_Wander) = { - EVT_CALL(SetSelfVar, 2, 6) - EVT_CALL(SetSelfVar, 3, 4) - EVT_CALL(SetSelfVar, 5, 13) - EVT_CALL(SetSelfVar, 7, 1) - EVT_CALL(N(TackleAI_Main), EVT_PTR(N(AISettings_DarkTroopa_Wander))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 2, 6) + Call(SetSelfVar, 3, 4) + Call(SetSelfVar, 5, 13) + Call(SetSelfVar, 7, 1) + Call(N(TackleAI_Main), Ref(N(AISettings_DarkTroopa_Wander))) + Return + End }; NpcSettings N(NpcSettings_DarkTroopa_Wander) = { diff --git a/src/world/common/enemy/DryBones.inc.c b/src/world/common/enemy/DryBones.inc.c index 7855e889511..d7ecf7b97ff 100644 --- a/src/world/common/enemy/DryBones.inc.c +++ b/src/world/common/enemy/DryBones.inc.c @@ -4,20 +4,20 @@ #include "world/common/todo/GetEncounterEnemyIsOwner.inc.c" EvtScript N(EVS_NpcDefeat_ThrownBone) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(SetSelfVar, 0, 5) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(OnPlayerFled, 1) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(SetSelfVar, 0, 5) + Call(RemoveNpc, NPC_SELF) + CaseEq(OUTCOME_PLAYER_FLED) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(OnPlayerFled, 1) + CaseEq(OUTCOME_ENEMY_FLED) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; MobileAISettings N(AISettings_DryBones) = { @@ -34,13 +34,13 @@ MobileAISettings N(AISettings_DryBones) = { }; EvtScript N(EVS_NpcAI_DryBones) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetSelfVar, 1, 15) - EVT_CALL(SetSelfVar, 2, 10) - EVT_CALL(SetSelfVar, 3, 2) - EVT_CALL(N(RangedAttackAI_Main), EVT_PTR(N(AISettings_DryBones))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Call(SetSelfVar, 1, 15) + Call(SetSelfVar, 2, 10) + Call(SetSelfVar, 3, 2) + Call(N(RangedAttackAI_Main), Ref(N(AISettings_DryBones))) + Return + End }; NpcSettings N(NpcSettings_DryBones) = { @@ -60,51 +60,51 @@ MobileAISettings N(AISettings_ThrownBone) = { }; EvtScript N(EVS_NpcAI_ThrownBone) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetSelfVar, 1, 3) - EVT_CALL(SetSelfVar, 2, 15) - EVT_CALL(SetSelfVar, 3, 15) - EVT_CALL(N(ProjectileAI_Main), EVT_PTR(N(AISettings_ThrownBone))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Call(SetSelfVar, 1, 3) + Call(SetSelfVar, 2, 15) + Call(SetSelfVar, 3, 15) + Call(N(ProjectileAI_Main), Ref(N(AISettings_ThrownBone))) + Return + End }; EvtScript N(EVS_NoAI_ThrownBone) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcHit_ThrownBone) = { - EVT_CALL(N(GetEncounterEnemyIsOwner)) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NoAI_ThrownBone))) - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_SPIN) - EVT_CALL(SetSelfVar, 0, 3) - EVT_CALL(N(ProjectileAI_Reflect)) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_PARTNER) - EVT_CALL(SetSelfVar, 0, 4) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2, 0, 0) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(SetSelfVar, 0, 0) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(SetBattleAsScripted) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_ThrownBone))) - EVT_RETURN - EVT_END + Call(N(GetEncounterEnemyIsOwner)) + IfEq(LVar0, 0) + Return + EndIf + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NoAI_ThrownBone))) + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseOrEq(ENCOUNTER_TRIGGER_HAMMER) + CaseOrEq(ENCOUNTER_TRIGGER_SPIN) + Call(SetSelfVar, 0, 3) + Call(N(ProjectileAI_Reflect)) + IfEq(LVar0, 0) + Return + EndIf + EndCaseGroup + CaseOrEq(ENCOUNTER_TRIGGER_JUMP) + CaseOrEq(ENCOUNTER_TRIGGER_PARTNER) + Call(SetSelfVar, 0, 4) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2, 0, 0) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(SetSelfVar, 0, 0) + EndCaseGroup + CaseDefault + Call(SetBattleAsScripted) + EndCaseGroup + EndSwitch + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_ThrownBone))) + Return + End }; NpcSettings N(NpcSettings_ThrownBone) = { diff --git a/src/world/common/enemy/Duplighost_Patrol.inc.c b/src/world/common/enemy/Duplighost_Patrol.inc.c index c5789b9a2cd..22940b822c2 100644 --- a/src/world/common/enemy/Duplighost_Patrol.inc.c +++ b/src/world/common/enemy/Duplighost_Patrol.inc.c @@ -14,9 +14,9 @@ MobileAISettings N(AISettings_Duplighost_Patrol) = { }; EvtScript N(EVS_NpcAI_Duplighost_Patrol) = { - EVT_CALL(N(PatrolNoAttackAI_Main), EVT_PTR(N(AISettings_Duplighost_Patrol))) - EVT_RETURN - EVT_END + Call(N(PatrolNoAttackAI_Main), Ref(N(AISettings_Duplighost_Patrol))) + Return + End }; NpcSettings N(NpcSettings_Duplighost_Patrol) = { diff --git a/src/world/common/enemy/Duplighost_Wander.inc.c b/src/world/common/enemy/Duplighost_Wander.inc.c index dc1465dd6b7..b7a97a2ab50 100644 --- a/src/world/common/enemy/Duplighost_Wander.inc.c +++ b/src/world/common/enemy/Duplighost_Wander.inc.c @@ -14,9 +14,9 @@ MobileAISettings N(AISettings_Duplighost_Wander) = { }; EvtScript N(EVS_NpcAI_Duplighost_Wander) = { - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_Duplighost_Wander))) - EVT_RETURN - EVT_END + Call(BasicAI_Main, Ref(N(AISettings_Duplighost_Wander))) + Return + End }; NpcSettings N(NpcSettings_Duplighost_Wander) = { diff --git a/src/world/common/enemy/Ember.inc.c b/src/world/common/enemy/Ember.inc.c index abbbcbeecf1..c6cb8f0a2f8 100644 --- a/src/world/common/enemy/Ember.inc.c +++ b/src/world/common/enemy/Ember.inc.c @@ -16,13 +16,13 @@ MobileAISettings N(AISettings_Ember) = { }; EvtScript N(EVS_NpcAI_Ember) = { - EVT_CALL(SetSelfVar, 0, 1) - EVT_CALL(SetSelfVar, 5, 0) - EVT_CALL(SetSelfVar, 6, 0) - EVT_CALL(SetSelfVar, 1, 0) - EVT_CALL(N(FlyingNoAttackAI_Main), EVT_PTR(N(AISettings_Ember))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 1) + Call(SetSelfVar, 5, 0) + Call(SetSelfVar, 6, 0) + Call(SetSelfVar, 1, 0) + Call(N(FlyingNoAttackAI_Main), Ref(N(AISettings_Ember))) + Return + End }; NpcSettings N(NpcSettings_Ember) = { diff --git a/src/world/common/enemy/FlyingMagikoopa.inc.c b/src/world/common/enemy/FlyingMagikoopa.inc.c index bf5befccd73..21c0e8ef890 100644 --- a/src/world/common/enemy/FlyingMagikoopa.inc.c +++ b/src/world/common/enemy/FlyingMagikoopa.inc.c @@ -18,24 +18,24 @@ MobileAISettings N(AISettings_FlyingMagikoopa) = { }; EvtScript N(EVS_NpcAI_FlyingMagikoopa) = { - EVT_CALL(N(FlyingMagikoopaAI_Main), EVT_PTR(N(AISettings_FlyingMagikoopa))) - EVT_RETURN - EVT_END + Call(N(FlyingMagikoopaAI_Main), Ref(N(AISettings_FlyingMagikoopa))) + Return + End }; EvtScript N(EVS_NpcDefeat_FlyingMagikoopa) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(OnPlayerFled, 0) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_FLED) + Call(OnPlayerFled, 0) + CaseEq(OUTCOME_ENEMY_FLED) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; NpcSettings N(NpcSettings_FlyingMagikoopa) = { @@ -59,50 +59,50 @@ AnimID N(ExtraAnims_FlyingMagikoopa)[] = { }; EvtScript N(EVS_NpcAuxAI_FlyingMagikoopa_AltHitbox) = { - EVT_CALL(SetSelfVar, 1, 10) - EVT_CALL(SetSelfVar, 2, 40) - EVT_RETURN - EVT_END + Call(SetSelfVar, 1, 10) + Call(SetSelfVar, 2, 40) + Return + End }; EvtScript N(EVS_NpcAuxAI_FlyingMagikoopa_Hitbox) = { - EVT_CALL(SetSelfVar, 1, 0) - EVT_CALL(SetSelfVar, 2, 55) - EVT_RETURN - EVT_END + Call(SetSelfVar, 1, 0) + Call(SetSelfVar, 2, 55) + Return + End }; EvtScript N(EVS_NpcAI_FlyingMagikoopa_Hitbox) = { - EVT_CALL(N(MagikoopaAI_SpellMain)) - EVT_RETURN - EVT_END + Call(N(MagikoopaAI_SpellMain)) + Return + End }; EvtScript N(EVS_NpcHit_FlyingMagikoopa_Hitbox) = { - EVT_CALL(N(FlyingMagikoopaAI_OnHitInit)) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(FlyingMagikoopaAI_OnHit)) - EVT_EXEC(EnemyNpcHit) - EVT_RETURN - EVT_END + Call(N(FlyingMagikoopaAI_OnHitInit)) + IfEq(LVar0, 0) + Return + EndIf + Call(N(FlyingMagikoopaAI_OnHit)) + Exec(EnemyNpcHit) + Return + End }; EvtScript N(EVS_NpcDefeat_FlyingMagikoopa_Hitbox) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(OnPlayerFled, 1) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(RemoveNpc, NPC_SELF) + CaseEq(OUTCOME_PLAYER_FLED) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(OnPlayerFled, 1) + CaseEq(OUTCOME_ENEMY_FLED) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; NpcSettings N(NpcSettings_FlyingMagikoopa_AltHitbox) = { diff --git a/src/world/common/enemy/ForestFuzzy_Wander.inc.c b/src/world/common/enemy/ForestFuzzy_Wander.inc.c index b9b7fc1515f..a26dcc17244 100644 --- a/src/world/common/enemy/ForestFuzzy_Wander.inc.c +++ b/src/world/common/enemy/ForestFuzzy_Wander.inc.c @@ -16,10 +16,10 @@ MobileAISettings N(AISettings_ForestFuzzy_Wander) = { }; EvtScript N(EVS_NpcAI_ForestFuzzy_Wander) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(N(HoppingAI_Main), EVT_PTR(N(AISettings_ForestFuzzy_Wander)), 1) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(N(HoppingAI_Main), Ref(N(AISettings_ForestFuzzy_Wander)), 1) + Return + End }; NpcSettings N(NpcSettings_ForestFuzzy_Wander) = { diff --git a/src/world/common/enemy/FrostClubba_Multi.inc.c b/src/world/common/enemy/FrostClubba_Multi.inc.c index 365e3f37326..237267e942f 100644 --- a/src/world/common/enemy/FrostClubba_Multi.inc.c +++ b/src/world/common/enemy/FrostClubba_Multi.inc.c @@ -1,19 +1,19 @@ #include "FrostClubba.h" EvtScript N(EVS_NpcDefeat_FrostClubba) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(OnPlayerFled, 1) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(RemoveNpc, NPC_SELF) + CaseEq(OUTCOME_PLAYER_FLED) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(OnPlayerFled, 1) + CaseEq(OUTCOME_ENEMY_FLED) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; AnimID N(ExtraAnims_FrostClubba)[] = { @@ -53,13 +53,13 @@ MobileAISettings N(AISettings_FrostClubba_Wander) = { }; EvtScript N(EVS_NpcAI_FrostClubba_Wander) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetSelfVar, 1, 3) - EVT_CALL(SetSelfVar, 2, 7) - EVT_CALL(SetSelfVar, 3, 6) - EVT_CALL(N(WanderMeleeAI_Main), EVT_PTR(N(AISettings_FrostClubba_Wander))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Call(SetSelfVar, 1, 3) + Call(SetSelfVar, 2, 7) + Call(SetSelfVar, 3, 6) + Call(N(WanderMeleeAI_Main), Ref(N(AISettings_FrostClubba_Wander))) + Return + End }; NpcSettings N(NpcSettings_FrostClubba_Wander) = { @@ -91,13 +91,13 @@ MobileAISettings N(AISettings_FrostClubba_Patrol) = { }; EvtScript N(EVS_NpcAI_FrostClubba_Patrol) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetSelfVar, 1, 3) - EVT_CALL(SetSelfVar, 2, 7) - EVT_CALL(SetSelfVar, 3, 6) - EVT_CALL(N(ClubbaPatrolAI_Main), EVT_PTR(N(AISettings_FrostClubba_Patrol))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Call(SetSelfVar, 1, 3) + Call(SetSelfVar, 2, 7) + Call(SetSelfVar, 3, 6) + Call(N(ClubbaPatrolAI_Main), Ref(N(AISettings_FrostClubba_Patrol))) + Return + End }; NpcSettings N(NpcSettings_FrostClubba_Patrol) = { @@ -131,13 +131,13 @@ MobileAISettings N(AISettings_FrostClubba_Napping) = { }; EvtScript N(EVS_NpcAI_FrostClubba_Napping) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetSelfVar, 1, 10) - EVT_CALL(SetSelfVar, 2, 14) - EVT_CALL(SetSelfVar, 3, 18) - EVT_CALL(N(ClubbaNappingAI_Main), EVT_PTR(N(AISettings_FrostClubba_Napping))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Call(SetSelfVar, 1, 10) + Call(SetSelfVar, 2, 14) + Call(SetSelfVar, 3, 18) + Call(N(ClubbaNappingAI_Main), Ref(N(AISettings_FrostClubba_Napping))) + Return + End }; NpcSettings N(NpcSettings_FrostClubba_Napping) = { @@ -154,16 +154,16 @@ NpcSettings N(NpcSettings_FrostClubba_Napping) = { #include "world/common/enemy/ai/MeleeHitbox.inc.c" EvtScript N(EVS_NpcAI_FrostClubba_Hitbox) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetSelfVar, 0, 4) - EVT_CALL(SetSelfVar, 1, 32) - EVT_CALL(SetSelfVar, 2, 48) - EVT_CALL(SetSelfVar, 3, 30) - EVT_CALL(SetSelfVar, 4, 3) - EVT_CALL(SetSelfVar, 15, SOUND_CLUBBA_SWING) - EVT_CALL(N(MeleeHitbox_Main)) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetSelfVar, 0, 4) + Call(SetSelfVar, 1, 32) + Call(SetSelfVar, 2, 48) + Call(SetSelfVar, 3, 30) + Call(SetSelfVar, 4, 3) + Call(SetSelfVar, 15, SOUND_CLUBBA_SWING) + Call(N(MeleeHitbox_Main)) + Return + End }; NpcSettings N(NpcSettings_FrostClubba_Hitbox) = { diff --git a/src/world/common/enemy/FrostPiranha.inc.c b/src/world/common/enemy/FrostPiranha.inc.c index 9dd397b6529..6ddfbcbb79d 100644 --- a/src/world/common/enemy/FrostPiranha.inc.c +++ b/src/world/common/enemy/FrostPiranha.inc.c @@ -12,18 +12,18 @@ MobileAISettings N(AISettings_FrostPiranha) = { }; EvtScript N(EVS_NpcAI_FrostPiranha) = { - EVT_CALL(SetSelfVar, 7, 1) - EVT_CALL(SetSelfVar, 8, 10) - EVT_CALL(SetSelfVar, 9, 9) - EVT_CALL(SetSelfVar, 10, 12) - EVT_CALL(SetSelfVar, 11, 7) - EVT_CALL(SetSelfVar, 12, 30) - EVT_CALL(SetSelfVar, 13, 15) - EVT_CALL(SetSelfVar, 14, 18) - EVT_CALL(SetSelfVar, 15, 15) - EVT_CALL(N(PiranhaPlantAI_Main), EVT_PTR(N(AISettings_FrostPiranha))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 7, 1) + Call(SetSelfVar, 8, 10) + Call(SetSelfVar, 9, 9) + Call(SetSelfVar, 10, 12) + Call(SetSelfVar, 11, 7) + Call(SetSelfVar, 12, 30) + Call(SetSelfVar, 13, 15) + Call(SetSelfVar, 14, 18) + Call(SetSelfVar, 15, 15) + Call(N(PiranhaPlantAI_Main), Ref(N(AISettings_FrostPiranha))) + Return + End }; NpcSettings N(NpcSettings_FrostPiranha) = { @@ -36,29 +36,29 @@ NpcSettings N(NpcSettings_FrostPiranha) = { }; EvtScript N(EVS_NpcAI_FrostPiranha_Hitbox) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetSelfVar, 0, 14) - EVT_CALL(SetSelfVar, 1, 28) - EVT_CALL(SetSelfVar, 4, 3) - EVT_CALL(SetSelfVar, 15, SOUND_PIRANHA_BITE) - EVT_CALL(N(MeleeHitbox_Main)) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetSelfVar, 0, 14) + Call(SetSelfVar, 1, 28) + Call(SetSelfVar, 4, 3) + Call(SetSelfVar, 15, SOUND_PIRANHA_BITE) + Call(N(MeleeHitbox_Main)) + Return + End }; EvtScript N(EVS_802425A8) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_NONE) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_PARTNER) - EVT_CALL(GetSelfAnimationFromTable, ENEMY_ANIM_INDEX_HIT, LVar0) - EVT_EXEC_WAIT(EVS_NpcHitRecoil) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_NONE) + CaseOrEq(ENCOUNTER_TRIGGER_JUMP) + CaseOrEq(ENCOUNTER_TRIGGER_HAMMER) + CaseOrEq(ENCOUNTER_TRIGGER_PARTNER) + Call(GetSelfAnimationFromTable, ENEMY_ANIM_INDEX_HIT, LVar0) + ExecWait(EVS_NpcHitRecoil) + EndCaseGroup + EndSwitch + Return + End }; NpcSettings N(NpcSettings_FrostPiranha_Hitbox) = { diff --git a/src/world/common/enemy/Fuzzy_Wander.inc.c b/src/world/common/enemy/Fuzzy_Wander.inc.c index c1d01e528b5..6114b4161d5 100644 --- a/src/world/common/enemy/Fuzzy_Wander.inc.c +++ b/src/world/common/enemy/Fuzzy_Wander.inc.c @@ -16,10 +16,10 @@ MobileAISettings N(AISettings_Fuzzy_Wander) = { }; EvtScript N(EVS_NpcAI_Fuzzy_Wander) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(N(HoppingAI_Main), EVT_PTR(N(AISettings_Fuzzy_Wander)), 0) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(N(HoppingAI_Main), Ref(N(AISettings_Fuzzy_Wander)), 0) + Return + End }; NpcSettings N(NpcSettings_Fuzzy_Wander) = { diff --git a/src/world/common/enemy/Gloomba_Wander.inc.c b/src/world/common/enemy/Gloomba_Wander.inc.c index 6d367387184..a63f7a6e724 100644 --- a/src/world/common/enemy/Gloomba_Wander.inc.c +++ b/src/world/common/enemy/Gloomba_Wander.inc.c @@ -12,9 +12,9 @@ MobileAISettings N(AISettings_Gloomba_Wander) = { }; EvtScript N(EVS_NpcAI_Gloomba_Wander) = { - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_Gloomba_Wander))) - EVT_RETURN - EVT_END + Call(BasicAI_Main, Ref(N(AISettings_Gloomba_Wander))) + Return + End }; NpcSettings N(NpcSettings_Gloomba_Wander) = { diff --git a/src/world/common/enemy/GoombaBros_Guard.inc.c b/src/world/common/enemy/GoombaBros_Guard.inc.c index 8d591209508..939ec8ef7a4 100644 --- a/src/world/common/enemy/GoombaBros_Guard.inc.c +++ b/src/world/common/enemy/GoombaBros_Guard.inc.c @@ -13,9 +13,9 @@ GuardAISettings N(AISettings_GoombaBros_Guard) = { }; EvtScript N(EVS_NpcAI_GoombaBros_Guard) = { - EVT_CALL(N(GuardAI_Main), EVT_PTR(N(AISettings_GoombaBros_Guard))) - EVT_RETURN - EVT_END + Call(N(GuardAI_Main), Ref(N(AISettings_GoombaBros_Guard))) + Return + End }; NpcSettings N(NpcSettings_GoombaBros_Guard) = { diff --git a/src/world/common/enemy/Goomba_Wander.inc.c b/src/world/common/enemy/Goomba_Wander.inc.c index bfd7542425e..48f54a39f72 100644 --- a/src/world/common/enemy/Goomba_Wander.inc.c +++ b/src/world/common/enemy/Goomba_Wander.inc.c @@ -14,9 +14,9 @@ MobileAISettings N(AISettings_Goomba_Wander) = { }; EvtScript N(EVS_NpcAI_Goomba_Wander) = { - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_Goomba_Wander))) - EVT_RETURN - EVT_END + Call(BasicAI_Main, Ref(N(AISettings_Goomba_Wander))) + Return + End }; NpcSettings N(NpcSettings_Goomba_Wander) = { diff --git a/src/world/common/enemy/GrooveGuy.inc.c b/src/world/common/enemy/GrooveGuy.inc.c index 3d03b4f0d40..f58d68ae7b3 100644 --- a/src/world/common/enemy/GrooveGuy.inc.c +++ b/src/world/common/enemy/GrooveGuy.inc.c @@ -16,9 +16,9 @@ MobileAISettings N(AISettings_GrooveGuy) = { }; EvtScript N(EVS_NpcAI_GrooveGuy) = { - EVT_CALL(N(GrooveGuyAI_Main), EVT_PTR(N(AISettings_GrooveGuy))) - EVT_RETURN - EVT_END + Call(N(GrooveGuyAI_Main), Ref(N(AISettings_GrooveGuy))) + Return + End }; NpcSettings N(NpcSettings_GrooveGuy) = { diff --git a/src/world/common/enemy/Gulpit.inc.c b/src/world/common/enemy/Gulpit.inc.c index 1b1650f2ba0..ebf04d88875 100644 --- a/src/world/common/enemy/Gulpit.inc.c +++ b/src/world/common/enemy/Gulpit.inc.c @@ -18,13 +18,13 @@ MobileAISettings N(AISettings_Gulpit) = { }; EvtScript N(EVS_NpcAI_Gulpit) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetSelfVar, 1, 5) - EVT_CALL(SetSelfVar, 2, 13) - EVT_CALL(SetSelfVar, 3, 30) - EVT_CALL(N(WanderMeleeAI_Main), EVT_PTR(N(AISettings_Gulpit))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Call(SetSelfVar, 1, 5) + Call(SetSelfVar, 2, 13) + Call(SetSelfVar, 3, 30) + Call(N(WanderMeleeAI_Main), Ref(N(AISettings_Gulpit))) + Return + End }; NpcSettings N(NpcSettings_Gulpit) = { @@ -37,16 +37,16 @@ NpcSettings N(NpcSettings_Gulpit) = { }; EvtScript N(EVS_NpcAI_Gulpit_Hitbox) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetSelfVar, 0, 6) - EVT_CALL(SetSelfVar, 1, 28) - EVT_CALL(SetSelfVar, 2, 55) - EVT_CALL(SetSelfVar, 3, 32) - EVT_CALL(SetSelfVar, 4, 10) - EVT_CALL(SetSelfVar, 15, 0) - EVT_CALL(N(MeleeHitbox_Main)) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetSelfVar, 0, 6) + Call(SetSelfVar, 1, 28) + Call(SetSelfVar, 2, 55) + Call(SetSelfVar, 3, 32) + Call(SetSelfVar, 4, 10) + Call(SetSelfVar, 15, 0) + Call(N(MeleeHitbox_Main)) + Return + End }; NpcSettings N(NpcSettings_Gulpit_Hitbox) = { diff --git a/src/world/common/enemy/HammerBros_Wander.inc.c b/src/world/common/enemy/HammerBros_Wander.inc.c index 3953de5854d..74a14de3654 100644 --- a/src/world/common/enemy/HammerBros_Wander.inc.c +++ b/src/world/common/enemy/HammerBros_Wander.inc.c @@ -5,20 +5,20 @@ #include "world/common/todo/GetEncounterEnemyIsOwner.inc.c" EvtScript N(EVS_NpcDefeat_HammerBros_Hammer) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(SetSelfVar, 0, 5) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(OnPlayerFled, 1) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(SetSelfVar, 0, 5) + Call(RemoveNpc, NPC_SELF) + CaseEq(OUTCOME_PLAYER_FLED) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(OnPlayerFled, 1) + CaseEq(OUTCOME_ENEMY_FLED) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; MobileAISettings N(AISettings_HammerBros) = { @@ -36,13 +36,13 @@ MobileAISettings N(AISettings_HammerBros) = { }; EvtScript N(EVS_NpcAI_HammerBros) = { - EVT_CALL(SetSelfVar, 0, 70) - EVT_CALL(SetSelfVar, 1, 3) - EVT_CALL(SetSelfVar, 2, 3) - EVT_CALL(SetSelfVar, 3, 6) - EVT_CALL(N(RangedAttackAI_Main), EVT_PTR(N(AISettings_HammerBros))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 70) + Call(SetSelfVar, 1, 3) + Call(SetSelfVar, 2, 3) + Call(SetSelfVar, 3, 6) + Call(N(RangedAttackAI_Main), Ref(N(AISettings_HammerBros))) + Return + End }; NpcSettings N(NpcSettings_HammerBros_Wander) = { @@ -62,50 +62,50 @@ MobileAISettings N(AISettings_HammerBros_Hammer) = { }; EvtScript N(EVS_NpcAI_HammerBros_Hammer) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetSelfVar, 1, 3) - EVT_CALL(SetSelfVar, 2, 20) - EVT_CALL(N(ProjectileAI_Main), EVT_PTR(N(AISettings_HammerBros_Hammer))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Call(SetSelfVar, 1, 3) + Call(SetSelfVar, 2, 20) + Call(N(ProjectileAI_Main), Ref(N(AISettings_HammerBros_Hammer))) + Return + End }; EvtScript N(EVS_NoAI_HammerBros_Hammer) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcHit_HammerBros_Hammer) = { - EVT_CALL(N(GetEncounterEnemyIsOwner)) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NoAI_HammerBros_Hammer))) - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_SPIN) - EVT_CALL(SetSelfVar, 0, 3) - EVT_CALL(N(ProjectileAI_Reflect)) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_PARTNER) - EVT_CALL(SetSelfVar, 0, 4) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2, 0, 0) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(SetSelfVar, 0, 0) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(SetBattleAsScripted) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_HammerBros_Hammer))) - EVT_RETURN - EVT_END + Call(N(GetEncounterEnemyIsOwner)) + IfEq(LVar0, 0) + Return + EndIf + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NoAI_HammerBros_Hammer))) + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseOrEq(ENCOUNTER_TRIGGER_HAMMER) + CaseOrEq(ENCOUNTER_TRIGGER_SPIN) + Call(SetSelfVar, 0, 3) + Call(N(ProjectileAI_Reflect)) + IfEq(LVar0, 0) + Return + EndIf + EndCaseGroup + CaseOrEq(ENCOUNTER_TRIGGER_JUMP) + CaseOrEq(ENCOUNTER_TRIGGER_PARTNER) + Call(SetSelfVar, 0, 4) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2, 0, 0) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(SetSelfVar, 0, 0) + EndCaseGroup + CaseDefault + Call(SetBattleAsScripted) + EndCaseGroup + EndSwitch + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_HammerBros_Hammer))) + Return + End }; NpcSettings N(NpcSettings_HammerBros_Hammer) = { diff --git a/src/world/common/enemy/HeartPlant.inc.c b/src/world/common/enemy/HeartPlant.inc.c index 487f3770bf0..227caf662c9 100644 --- a/src/world/common/enemy/HeartPlant.inc.c +++ b/src/world/common/enemy/HeartPlant.inc.c @@ -5,39 +5,39 @@ extern EvtScript N(EVS_NpcInteract_HeartPlant); EvtScript N(EVS_NpcAuxAI_HeartPlant) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetSelfVar, 1, 0) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetSelfVar, 0, 0) + Call(SetSelfVar, 1, 0) + Return + End }; EvtScript N(EVS_HeartPlant_RebindInteractAfterDelay) = { - EVT_WAIT(45) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_HeartPlant))) - EVT_RETURN - EVT_END + Wait(45) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_HeartPlant))) + Return + End }; EvtScript N(EVS_NpcInteract_HeartPlant) = { - EVT_CALL(GetSelfVar, 1, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(SetSelfVar, 1, 1) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_HEART_PLANT, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HeartPlant_Anim00) - EVT_WAIT(1) - EVT_CALL(N(HeartPlant_SpawnHeart)) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HeartPlant_Anim01) - EVT_THREAD - EVT_CALL(BindNpcInteract, NPC_SELF, NULL) - EVT_EXEC(N(EVS_HeartPlant_RebindInteractAfterDelay)) - EVT_WAIT(45) - EVT_CALL(SetSelfVar, 1, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HeartPlant_Anim00) - EVT_END_THREAD - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetSelfVar, 1, LVar0) + IfEq(LVar0, 0) + Call(SetSelfVar, 1, 1) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_HEART_PLANT, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_SELF, ANIM_HeartPlant_Anim00) + Wait(1) + Call(N(HeartPlant_SpawnHeart)) + Call(SetNpcAnimation, NPC_SELF, ANIM_HeartPlant_Anim01) + Thread + Call(BindNpcInteract, NPC_SELF, NULL) + Exec(N(EVS_HeartPlant_RebindInteractAfterDelay)) + Wait(45) + Call(SetSelfVar, 1, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_HeartPlant_Anim00) + EndThread + EndIf + Return + End }; NpcSettings N(NpcSettings_HeartPlant) = { diff --git a/src/world/common/enemy/HurtPlant.inc.c b/src/world/common/enemy/HurtPlant.inc.c index 1e6be34c5e2..bfc881c9ea1 100644 --- a/src/world/common/enemy/HurtPlant.inc.c +++ b/src/world/common/enemy/HurtPlant.inc.c @@ -2,52 +2,52 @@ #include "sprite/player.h" EvtScript N(EVS_NpcAI_HurtPlant) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HurtPlant_Anim01) - EVT_CALL(SetSelfVar, 0, 0) - EVT_LABEL(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HurtPlant_Anim08) - EVT_WAIT(15) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_HURT_PLANT_SHRIEK, SOUND_SPACE_DEFAULT) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_HurtPlant_Anim02) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_CALL(StartBattle) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_HurtPlant_Anim01) + Call(SetSelfVar, 0, 0) + Label(0) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Wait(1) + Goto(0) + EndIf + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(DisablePlayerInput, TRUE) + Call(NpcFacePlayer, NPC_SELF, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_HurtPlant_Anim08) + Wait(15) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_HURT_PLANT_SHRIEK, SOUND_SPACE_DEFAULT) + Wait(10) + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + Wait(5) + Call(SetNpcAnimation, NPC_SELF, ANIM_HurtPlant_Anim02) + Call(DisablePlayerInput, FALSE) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Call(StartBattle) + Return + End }; EvtScript N(EVS_NpcInteract_HurtPlant) = { - EVT_CALL(SetSelfVar, 0, 1) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 1) + Return + End }; EvtScript N(EVS_NpcDefeat_HurtPlant) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_HurtPlant))) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_FLED) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_HurtPlant))) + CaseEq(OUTCOME_ENEMY_FLED) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; NpcSettings N(NpcSettings_HurtPlant) = { diff --git a/src/world/common/enemy/HyperCleft.inc.c b/src/world/common/enemy/HyperCleft.inc.c index e7d3ef621e9..ce74b8e347b 100644 --- a/src/world/common/enemy/HyperCleft.inc.c +++ b/src/world/common/enemy/HyperCleft.inc.c @@ -17,9 +17,9 @@ MobileAISettings N(AISettings_HyperCleft) = { }; EvtScript N(EVS_NpcAI_HyperCleft) = { - EVT_CALL(N(CleftAI_Main), EVT_PTR(N(AISettings_HyperCleft)), 8) - EVT_RETURN - EVT_END + Call(N(CleftAI_Main), Ref(N(AISettings_HyperCleft)), 8) + Return + End }; NpcSettings N(NpcSettings_HyperCleft) = { diff --git a/src/world/common/enemy/HyperGoomba_Patrol.inc.c b/src/world/common/enemy/HyperGoomba_Patrol.inc.c index 1f60cf1b92f..fb64f0168f2 100644 --- a/src/world/common/enemy/HyperGoomba_Patrol.inc.c +++ b/src/world/common/enemy/HyperGoomba_Patrol.inc.c @@ -18,9 +18,9 @@ MobileAISettings N(AISettings_HyperGoomba_Patrol) = { }; EvtScript N(EVS_NpcAI_HyperGoomba_Patrol) = { - EVT_CALL(N(PatrolNoAttackAI_Main), EVT_PTR(N(AISettings_HyperGoomba_Patrol))) - EVT_RETURN - EVT_END + Call(N(PatrolNoAttackAI_Main), Ref(N(AISettings_HyperGoomba_Patrol))) + Return + End }; NpcSettings N(NpcSettings_HyperGoomba_Patrol) = { diff --git a/src/world/common/enemy/HyperGoomba_Wander.inc.c b/src/world/common/enemy/HyperGoomba_Wander.inc.c index 89994da1b1e..47bb92c4de0 100644 --- a/src/world/common/enemy/HyperGoomba_Wander.inc.c +++ b/src/world/common/enemy/HyperGoomba_Wander.inc.c @@ -16,9 +16,9 @@ MobileAISettings N(AISettings_HyperGoomba) = { }; EvtScript N(EVS_NpcAI_HyperGoomba) = { - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_HyperGoomba))) - EVT_RETURN - EVT_END + Call(BasicAI_Main, Ref(N(AISettings_HyperGoomba))) + Return + End }; NpcSettings N(NpcSettings_HyperGoomba) = { diff --git a/src/world/common/enemy/HyperParagoomba.inc.c b/src/world/common/enemy/HyperParagoomba.inc.c index 400b57c7367..81edbec0cab 100644 --- a/src/world/common/enemy/HyperParagoomba.inc.c +++ b/src/world/common/enemy/HyperParagoomba.inc.c @@ -16,13 +16,13 @@ MobileAISettings N(AISettings_HyperParagoomba) = { }; EvtScript N(EVS_NpcAI_HyperParagoomba) = { - EVT_CALL(SetSelfVar, 0, 1) - EVT_CALL(SetSelfVar, 5, -850) - EVT_CALL(SetSelfVar, 6, 60) - EVT_CALL(SetSelfVar, 1, 700) - EVT_CALL(N(FlyingAI_Main), EVT_PTR(N(AISettings_HyperParagoomba))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 1) + Call(SetSelfVar, 5, -850) + Call(SetSelfVar, 6, 60) + Call(SetSelfVar, 1, 700) + Call(N(FlyingAI_Main), Ref(N(AISettings_HyperParagoomba))) + Return + End }; NpcSettings N(NpcSettings_HyperParagoomba) = { diff --git a/src/world/common/enemy/JungleFuzzy_Wander.inc.c b/src/world/common/enemy/JungleFuzzy_Wander.inc.c index e1e17e9edcf..a846bf8a83e 100644 --- a/src/world/common/enemy/JungleFuzzy_Wander.inc.c +++ b/src/world/common/enemy/JungleFuzzy_Wander.inc.c @@ -16,10 +16,10 @@ MobileAISettings N(AISettings_JungleFuzzy_Wander) = { }; EvtScript N(EVS_NpcAI_JungleFuzzy_Wander) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(N(HoppingAI_Main), EVT_PTR(N(AISettings_JungleFuzzy_Wander)), 2) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(N(HoppingAI_Main), Ref(N(AISettings_JungleFuzzy_Wander)), 2) + Return + End }; NpcSettings N(NpcSettings_JungleFuzzy_Wander) = { diff --git a/src/world/common/enemy/Kammy_Guard.inc.c b/src/world/common/enemy/Kammy_Guard.inc.c index a96da79124b..516dec4b2de 100644 --- a/src/world/common/enemy/Kammy_Guard.inc.c +++ b/src/world/common/enemy/Kammy_Guard.inc.c @@ -11,9 +11,9 @@ GuardAISettings N(AISettings_Kammy_Guard) = { }; EvtScript N(EVS_NpcAI_Kammy_Guard) = { - EVT_CALL(N(GuardAI_Main), EVT_PTR(N(AISettings_Kammy_Guard))) - EVT_RETURN - EVT_END + Call(N(GuardAI_Main), Ref(N(AISettings_Kammy_Guard))) + Return + End }; NpcSettings N(NpcSettings_Kammy_Guard) = { diff --git a/src/world/common/enemy/KoopaTroopa_Patrol.inc.c b/src/world/common/enemy/KoopaTroopa_Patrol.inc.c index c6be4f04c6b..5a96e36a7cb 100644 --- a/src/world/common/enemy/KoopaTroopa_Patrol.inc.c +++ b/src/world/common/enemy/KoopaTroopa_Patrol.inc.c @@ -16,12 +16,12 @@ MobileAISettings N(AISettings_KoopaTroopa_Patrol) = { }; EvtScript N(EVS_NpcAI_KoopaTroopa_Patrol) = { - EVT_CALL(SetSelfVar, 2, 8) - EVT_CALL(SetSelfVar, 3, 12) - EVT_CALL(SetSelfVar, 5, 10) - EVT_CALL(N(KoopaPatrolAI_Main), EVT_PTR(N(AISettings_KoopaTroopa_Patrol))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 2, 8) + Call(SetSelfVar, 3, 12) + Call(SetSelfVar, 5, 10) + Call(N(KoopaPatrolAI_Main), Ref(N(AISettings_KoopaTroopa_Patrol))) + Return + End }; NpcSettings N(NpcSettings_KoopaTroopa_Patrol) = { diff --git a/src/world/common/enemy/KoopaTroopa_Wander.inc.c b/src/world/common/enemy/KoopaTroopa_Wander.inc.c index 408ea3d1dc0..33299ef415b 100644 --- a/src/world/common/enemy/KoopaTroopa_Wander.inc.c +++ b/src/world/common/enemy/KoopaTroopa_Wander.inc.c @@ -16,13 +16,13 @@ MobileAISettings N(AISettings_KoopaTroopa_Wander) = { }; EvtScript N(EVS_NpcAI_KoopaTroopa_Wander) = { - EVT_CALL(SetSelfVar, 2, 8) - EVT_CALL(SetSelfVar, 3, 12) - EVT_CALL(SetSelfVar, 5, 10) - EVT_CALL(SetSelfVar, 7, 0) - EVT_CALL(N(TackleAI_Main), EVT_PTR(N(AISettings_KoopaTroopa_Wander))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 2, 8) + Call(SetSelfVar, 3, 12) + Call(SetSelfVar, 5, 10) + Call(SetSelfVar, 7, 0) + Call(N(TackleAI_Main), Ref(N(AISettings_KoopaTroopa_Wander))) + Return + End }; NpcSettings N(NpcSettings_KoopaTroopa_Wander) = { diff --git a/src/world/common/enemy/Koopatrol_Patrol.inc.c b/src/world/common/enemy/Koopatrol_Patrol.inc.c index 8a5b34584f1..4c3f8e81967 100644 --- a/src/world/common/enemy/Koopatrol_Patrol.inc.c +++ b/src/world/common/enemy/Koopatrol_Patrol.inc.c @@ -16,12 +16,12 @@ MobileAISettings N(AISettings_Koopatrol_Patrol) = { }; EvtScript N(EVS_NpcAI_Koopatrol_Patrol) = { - EVT_CALL(SetSelfVar, 2, 8) - EVT_CALL(SetSelfVar, 3, 15) - EVT_CALL(SetSelfVar, 5, 10) - EVT_CALL(N(KoopaPatrolAI_Main), EVT_PTR(N(AISettings_Koopatrol_Patrol))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 2, 8) + Call(SetSelfVar, 3, 15) + Call(SetSelfVar, 5, 10) + Call(N(KoopaPatrolAI_Main), Ref(N(AISettings_Koopatrol_Patrol))) + Return + End }; NpcSettings N(NpcSettings_Koopatrol_Patrol) = { diff --git a/src/world/common/enemy/Koopatrol_Wander.inc.c b/src/world/common/enemy/Koopatrol_Wander.inc.c index 0e834745de1..7f5bc83a5ab 100644 --- a/src/world/common/enemy/Koopatrol_Wander.inc.c +++ b/src/world/common/enemy/Koopatrol_Wander.inc.c @@ -16,13 +16,13 @@ MobileAISettings N(AISettings_Koopatrol_Wander) = { }; EvtScript N(EVS_NpcAI_Koopatrol_Wander) = { - EVT_CALL(SetSelfVar, 2, 5) - EVT_CALL(SetSelfVar, 3, 4) - EVT_CALL(SetSelfVar, 5, 10) - EVT_CALL(SetSelfVar, 7, 5) - EVT_CALL(N(TackleAI_Main), EVT_PTR(N(AISettings_Koopatrol_Wander))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 2, 5) + Call(SetSelfVar, 3, 4) + Call(SetSelfVar, 5, 10) + Call(SetSelfVar, 7, 5) + Call(N(TackleAI_Main), Ref(N(AISettings_Koopatrol_Wander))) + Return + End }; NpcSettings N(NpcSettings_Koopatrol_Wander) = { diff --git a/src/world/common/enemy/Lakitu_SpinySpawner.inc.c b/src/world/common/enemy/Lakitu_SpinySpawner.inc.c index 503a3da93a6..8bae3b2f81d 100644 --- a/src/world/common/enemy/Lakitu_SpinySpawner.inc.c +++ b/src/world/common/enemy/Lakitu_SpinySpawner.inc.c @@ -20,15 +20,15 @@ MobileAISettings N(AISettings_Lakitu_SpinySpawner) = { EvtScript N(EVS_NpcAI_Lakitu_SpinySpawner) = { #ifdef DEBUG_LAKITU - EVT_DEBUG_LOG(EVT_PTR("JUGEMU MOVE")) + EVT_DEBUG_LOG(Ref("JUGEMU MOVE")) #endif - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetSelfVar, 5, -650) - EVT_CALL(SetSelfVar, 6, 30) - EVT_CALL(SetSelfVar, 1, 400) - EVT_CALL(N(LakituAI_Main), EVT_PTR(N(AISettings_Lakitu_SpinySpawner))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Call(SetSelfVar, 5, -650) + Call(SetSelfVar, 6, 30) + Call(SetSelfVar, 1, 400) + Call(N(LakituAI_Main), Ref(N(AISettings_Lakitu_SpinySpawner))) + Return + End }; NpcSettings N(NpcSettings_Lakitu_SpinySpawner) = { @@ -56,33 +56,33 @@ MobileAISettings N(AISettings_SpawnedSpiny) = { }; EvtScript N(EVS_NpcAI_SpawnedSpiny) = { - EVT_CALL(SetSelfVar, 2, 3) - EVT_CALL(SetSelfVar, 3, 18) - EVT_CALL(SetSelfVar, 5, 3) - EVT_CALL(SetSelfVar, 7, 4) + Call(SetSelfVar, 2, 3) + Call(SetSelfVar, 3, 18) + Call(SetSelfVar, 5, 3) + Call(SetSelfVar, 7, 4) #ifdef DEBUG_LAKITU - EVT_DEBUG_LOG(EVT_PTR("TOGEZO TYPE1 : NORMAL MOVE")) + EVT_DEBUG_LOG(Ref("TOGEZO TYPE1 : NORMAL MOVE")) #endif - EVT_CALL(N(SpinyAI_Main), EVT_PTR(N(AISettings_SpawnedSpiny))) - EVT_RETURN - EVT_END + Call(N(SpinyAI_Main), Ref(N(AISettings_SpawnedSpiny))) + Return + End }; EvtScript N(EVS_NpcDefeat_SpawnedSpiny) = { - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, 0) - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(SetSelfVar, 10, 100) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(OnPlayerFled, 0) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetNpcRotation, NPC_SELF, 0, 0, 0) + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(SetSelfVar, 10, 100) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_FLED) + Call(OnPlayerFled, 0) + CaseEq(OUTCOME_ENEMY_FLED) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; NpcSettings N(NpcSettings_SpawnedSpiny) = { diff --git a/src/world/common/enemy/LavaBubble.inc.c b/src/world/common/enemy/LavaBubble.inc.c index 1fdf737e9dc..deb3fbc2d63 100644 --- a/src/world/common/enemy/LavaBubble.inc.c +++ b/src/world/common/enemy/LavaBubble.inc.c @@ -16,13 +16,13 @@ MobileAISettings N(AISettings_LavaBubble) = { }; EvtScript N(EVS_NpcAI_LavaBubble) = { - EVT_CALL(SetSelfVar, 0, 1) - EVT_CALL(SetSelfVar, 5, 0) - EVT_CALL(SetSelfVar, 6, 0) - EVT_CALL(SetSelfVar, 1, 150) - EVT_CALL(N(FlyingNoAttackAI_Main), EVT_PTR(N(AISettings_LavaBubble))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 1) + Call(SetSelfVar, 5, 0) + Call(SetSelfVar, 6, 0) + Call(SetSelfVar, 1, 150) + Call(N(FlyingNoAttackAI_Main), Ref(N(AISettings_LavaBubble))) + Return + End }; NpcSettings N(NpcSettings_LavaBubble) = { diff --git a/src/world/common/enemy/MBush.inc.c b/src/world/common/enemy/MBush.inc.c index 767b830b21b..93378293e3a 100644 --- a/src/world/common/enemy/MBush.inc.c +++ b/src/world/common/enemy/MBush.inc.c @@ -2,88 +2,88 @@ #include "sprite/player.h" EvtScript N(EVS_NpcAI_MBush) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MBush_Anim00) - EVT_CALL(SetSelfVar, 0, 0) - EVT_LABEL(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SEARCH_BUSH, SOUND_SPACE_DEFAULT) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetSelfVar, 10, LVar0) - EVT_CALL(SetSelfVar, 11, LVar1) - EVT_CALL(SetSelfVar, 12, LVar2) - EVT_ADD(LVar0, 2) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_SUB(LVar0, 3) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar0, 2) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_SUB(LVar0, 3) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_ADD(LVar0, 2) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MBush_Anim03) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(6) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_END_THREAD - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(EnableNpcShadow, NPC_SELF, TRUE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 25) - EVT_SUB(LVar2, 5) - EVT_CALL(NpcJump1, NPC_SELF, LVar0, LVar1, LVar2, 15) - EVT_WAIT(4) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MBush_Anim07) - EVT_WAIT(2) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(StartBattle) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_MBush_Anim00) + Call(SetSelfVar, 0, 0) + Label(0) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Wait(1) + Goto(0) + EndIf + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(DisablePlayerInput, TRUE) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SEARCH_BUSH, SOUND_SPACE_DEFAULT) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(SetSelfVar, 10, LVar0) + Call(SetSelfVar, 11, LVar1) + Call(SetSelfVar, 12, LVar2) + Add(LVar0, 2) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + Sub(LVar0, 3) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar0, 2) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + Sub(LVar0, 3) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + Add(LVar0, 2) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + Thread + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_MBush_Anim03) + EndThread + Thread + Wait(6) + Call(InterpPlayerYaw, 90, 0) + EndThread + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(EnableNpcShadow, NPC_SELF, TRUE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 25) + Sub(LVar2, 5) + Call(NpcJump1, NPC_SELF, LVar0, LVar1, LVar2, 15) + Wait(4) + Call(SetNpcAnimation, NPC_SELF, ANIM_MBush_Anim07) + Wait(2) + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Call(DisablePlayerInput, FALSE) + Call(StartBattle) }; // fallthrough :( EvtScript N(EVS_NpcInteract_MBush) = { - EVT_CALL(SetSelfVar, 0, 1) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 1) + Return + End }; EvtScript N(EVS_NpcDefeat_MBush) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MBush_Anim05) - EVT_CALL(GetSelfVar, 10, LVar0) - EVT_CALL(GetSelfVar, 11, LVar1) - EVT_CALL(GetSelfVar, 12, LVar2) - EVT_CALL(NpcJump1, NPC_SELF, LVar0, LVar1, LVar2, 8) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MBush_Anim00) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_MBush))) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_FLED) + Call(SetNpcAnimation, NPC_SELF, ANIM_MBush_Anim05) + Call(GetSelfVar, 10, LVar0) + Call(GetSelfVar, 11, LVar1) + Call(GetSelfVar, 12, LVar2) + Call(NpcJump1, NPC_SELF, LVar0, LVar1, LVar2, 8) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_MBush_Anim00) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_MBush))) + CaseEq(OUTCOME_ENEMY_FLED) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; NpcSettings N(NpcSettings_MBush) = { diff --git a/src/world/common/enemy/Magikoopa.inc.c b/src/world/common/enemy/Magikoopa.inc.c index ba5112f4ecd..be4c3143d1a 100644 --- a/src/world/common/enemy/Magikoopa.inc.c +++ b/src/world/common/enemy/Magikoopa.inc.c @@ -30,38 +30,38 @@ MobileAISettings N(AISettings_Magikoopa) = { }; EvtScript N(EVS_NpcAI_Magikoopa) = { - EVT_CALL(N(MagikoopaAI_Main), EVT_PTR(N(AISettings_Magikoopa))) - EVT_RETURN - EVT_END + Call(N(MagikoopaAI_Main), Ref(N(AISettings_Magikoopa))) + Return + End }; EvtScript N(EVS_NpcHit_Magikoopa) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_NONE) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_PARTNER) - EVT_CALL(GetSelfAnimationFromTable, ENEMY_ANIM_INDEX_HIT, LVar0) - EVT_EXEC_WAIT(EVS_NpcHitRecoil) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_NONE) + CaseOrEq(ENCOUNTER_TRIGGER_JUMP) + CaseOrEq(ENCOUNTER_TRIGGER_HAMMER) + CaseOrEq(ENCOUNTER_TRIGGER_PARTNER) + Call(GetSelfAnimationFromTable, ENEMY_ANIM_INDEX_HIT, LVar0) + ExecWait(EVS_NpcHitRecoil) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_NpcDefeat_Magikoopa) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(N(MagikoopaAI_OnPlayerWon)) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(N(MagikoopaAI_OnPlayerFled)) - EVT_CALL(OnPlayerFled, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(N(MagikoopaAI_OnPlayerWon)) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_FLED) + Call(N(MagikoopaAI_OnPlayerFled)) + Call(OnPlayerFled, 0) + EndSwitch + Return + End }; NpcSettings N(NpcSettings_Magikoopa) = { @@ -85,50 +85,50 @@ AnimID N(ExtraAnims_Magikoopa)[] = { }; EvtScript N(EVS_NpcAuxAI_Magikoopa_GroundHitbox) = { - EVT_CALL(SetSelfVar, 1, 10) - EVT_CALL(SetSelfVar, 2, 40) - EVT_RETURN - EVT_END + Call(SetSelfVar, 1, 10) + Call(SetSelfVar, 2, 40) + Return + End }; EvtScript N(EVS_NpcAuxAI_Magikoopa_FlyingHitbox) = { - EVT_CALL(SetSelfVar, 1, 0) - EVT_CALL(SetSelfVar, 2, 55) - EVT_RETURN - EVT_END + Call(SetSelfVar, 1, 0) + Call(SetSelfVar, 2, 55) + Return + End }; EvtScript N(EVS_NpcAI_Magikoopa_Hitbox) = { - EVT_CALL(N(MagikoopaAI_SpellMain)) - EVT_RETURN - EVT_END + Call(N(MagikoopaAI_SpellMain)) + Return + End }; EvtScript N(EVS_NpcHit_Magikoopa_Hitbox) = { - EVT_CALL(N(MagikoopaAI_OnHitInit)) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(MagikoopaAI_OnHit)) - EVT_EXEC(EnemyNpcHit) - EVT_RETURN - EVT_END + Call(N(MagikoopaAI_OnHitInit)) + IfEq(LVar0, 0) + Return + EndIf + Call(N(MagikoopaAI_OnHit)) + Exec(EnemyNpcHit) + Return + End }; EvtScript N(EVS_NpcDefeat_Magikoopa_Hitbox) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(OnPlayerFled, 1) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(RemoveNpc, NPC_SELF) + CaseEq(OUTCOME_PLAYER_FLED) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(OnPlayerFled, 1) + CaseEq(OUTCOME_ENEMY_FLED) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; NpcSettings N(NpcSettings_Magikoopa_GroundHitbox) = { diff --git a/src/world/common/enemy/MontyMole_GroundAmbush.inc.c b/src/world/common/enemy/MontyMole_GroundAmbush.inc.c index cedf4ad0b17..eb1333f4757 100644 --- a/src/world/common/enemy/MontyMole_GroundAmbush.inc.c +++ b/src/world/common/enemy/MontyMole_GroundAmbush.inc.c @@ -1,24 +1,24 @@ #include "MontyMole.h" EvtScript N(EVS_NpcAuxAI_MontyMole_GroundAmbush) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INACTIVE, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 30) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INACTIVE, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 30) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Return + End }; EvtScript N(EVS_NpcAuxAI_MontyMole_GroundAmbush_Hole) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 30) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MontyMole_Anim12) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 30) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(SetNpcAnimation, NPC_SELF, ANIM_MontyMole_Anim12) + Return + End }; MobileAISettings N(AISettings_MontyMole_GroundAmbush) = { @@ -37,37 +37,37 @@ MobileAISettings N(AISettings_MontyMole_GroundAmbush) = { }; EvtScript N(EVS_NpcAI_MontyMole_GroundAmbush) = { - EVT_CALL(func_800445D4, LVar0) - EVT_IF_EQ(LVar0, 100) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_DISABLE_AI, 1) - EVT_LABEL(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(IsPlayerWithin, LVar0, LVar2, 80, LVar3) - EVT_IF_NE(LVar3, 1) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GetSelfNpcID, LVar0) - EVT_ADD(LVar0, 1) - EVT_CALL(GetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_ADD(LVar2, 30) - EVT_CALL(SetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INACTIVE, FALSE) - EVT_CALL(EnableNpcShadow, NPC_SELF, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MontyMole_Anim0E) - EVT_CALL(GetNpcPos, NPC_SELF, LVar4, LVar5, LVar6) - EVT_ADD(LVar5, 30) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_MOLE_POP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar4, LVar5, LVar6, 20) - EVT_CALL(SetNpcPos, LVar0, NPC_DISPOSE_LOCATION) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_DISABLE_AI, 0) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_BEGIN_WITH_CHASING, 1) - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_MontyMole_GroundAmbush))) - EVT_RETURN - EVT_END + Call(func_800445D4, LVar0) + IfEq(LVar0, 100) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_DISABLE_AI, 1) + Label(10) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(IsPlayerWithin, LVar0, LVar2, 80, LVar3) + IfNe(LVar3, 1) + Wait(1) + Goto(10) + EndIf + Call(GetSelfNpcID, LVar0) + Add(LVar0, 1) + Call(GetNpcPos, LVar0, LVar1, LVar2, LVar3) + Add(LVar2, 30) + Call(SetNpcPos, LVar0, LVar1, LVar2, LVar3) + Wait(1) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INACTIVE, FALSE) + Call(EnableNpcShadow, NPC_SELF, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_MontyMole_Anim0E) + Call(GetNpcPos, NPC_SELF, LVar4, LVar5, LVar6) + Add(LVar5, 30) + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_MOLE_POP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar4, LVar5, LVar6, 20) + Call(SetNpcPos, LVar0, NPC_DISPOSE_LOCATION) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_DISABLE_AI, 0) + Call(NpcFacePlayer, NPC_SELF, 0) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_BEGIN_WITH_CHASING, 1) + Call(BasicAI_Main, Ref(N(AISettings_MontyMole_GroundAmbush))) + Return + End }; NpcSettings N(NpcSettings_MontyMole_GroundAmbush) = { diff --git a/src/world/common/enemy/MontyMole_StoneThrower.inc.c b/src/world/common/enemy/MontyMole_StoneThrower.inc.c index aacf1fbdd07..2af1336ea6d 100644 --- a/src/world/common/enemy/MontyMole_StoneThrower.inc.c +++ b/src/world/common/enemy/MontyMole_StoneThrower.inc.c @@ -7,20 +7,20 @@ #include "world/common/todo/GetEncounterEnemyIsOwner.inc.c" EvtScript N(EVS_NpcDefeat_MontyMole_Stone) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(SetSelfVar, 0, 5) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(OnPlayerFled, 1) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(SetSelfVar, 0, 5) + Call(RemoveNpc, NPC_SELF) + CaseEq(OUTCOME_PLAYER_FLED) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(OnPlayerFled, 1) + CaseEq(OUTCOME_ENEMY_FLED) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; MobileAISettings N(AISettings_MontyMole_StoneThrower) = { @@ -34,15 +34,15 @@ MobileAISettings N(AISettings_MontyMole_StoneThrower) = { }; EvtScript N(EVS_NpcAI_MontyMole_StoneThrower) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_200000, TRUE) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_LABEL(0) - EVT_CALL(RandInt, 15, LVar0) - EVT_ADD(LVar0, 15) - EVT_WAIT(LVar0) - EVT_CALL(N(MontyMoleAI_Main), EVT_PTR(N(AISettings_MontyMole_StoneThrower))) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_200000, TRUE) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Label(0) + Call(RandInt, 15, LVar0) + Add(LVar0, 15) + Wait(LVar0) + Call(N(MontyMoleAI_Main), Ref(N(AISettings_MontyMole_StoneThrower))) + Return + End }; NpcSettings N(NpcSettings_MontyMole_StoneThrower) = { @@ -63,51 +63,51 @@ MobileAISettings N(AISettings_MontyMole_Stone) = { }; EvtScript N(EVS_NpcAI_MontyMole_Stone) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetSelfVar, 1, 0) - EVT_CALL(SetSelfVar, 2, 17) - EVT_CALL(SetSelfVar, 3, 17) - EVT_CALL(N(ProjectileAI_Main), EVT_PTR(N(AISettings_MontyMole_Stone))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Call(SetSelfVar, 1, 0) + Call(SetSelfVar, 2, 17) + Call(SetSelfVar, 3, 17) + Call(N(ProjectileAI_Main), Ref(N(AISettings_MontyMole_Stone))) + Return + End }; EvtScript N(EVS_NpcHit_MontyMole_Stone_DoNothing) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcHit_MontyMole_Stone) = { - EVT_CALL(N(GetEncounterEnemyIsOwner)) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcHit_MontyMole_Stone_DoNothing))) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_SPIN) - EVT_CALL(SetSelfVar, 0, 3) - EVT_CALL(N(ProjectileAI_Reflect)) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_CALL(SetSelfVar, 0, 4) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2, 0, 0) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(SetSelfVar, 0, 0) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(SetBattleAsScripted) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_MontyMole_Stone))) - EVT_RETURN - EVT_END + Call(N(GetEncounterEnemyIsOwner)) + IfEq(LVar0, 0) + Return + EndIf + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcHit_MontyMole_Stone_DoNothing))) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseOrEq(ENCOUNTER_TRIGGER_HAMMER) + CaseOrEq(ENCOUNTER_TRIGGER_SPIN) + Call(SetSelfVar, 0, 3) + Call(N(ProjectileAI_Reflect)) + IfEq(LVar0, 0) + Return + EndIf + EndCaseGroup + CaseEq(ENCOUNTER_TRIGGER_JUMP) + Call(SetSelfVar, 0, 4) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2, 0, 0) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(SetSelfVar, 0, 0) + EndCaseGroup + CaseDefault + Call(SetBattleAsScripted) + EndCaseGroup + EndSwitch + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_MontyMole_Stone))) + Return + End }; NpcSettings N(NpcSettings_MontyMole_Stone) = { diff --git a/src/world/common/enemy/MontyMole_WallAmbush.inc.c b/src/world/common/enemy/MontyMole_WallAmbush.inc.c index f1f238094df..96604c2946f 100644 --- a/src/world/common/enemy/MontyMole_WallAmbush.inc.c +++ b/src/world/common/enemy/MontyMole_WallAmbush.inc.c @@ -1,24 +1,24 @@ #include "MontyMole.h" EvtScript N(EVS_NpcAuxAI_MontyMole_WallAmbush) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INACTIVE, TRUE) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 50) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INACTIVE, TRUE) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Sub(LVar2, 50) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Return + End }; EvtScript N(EVS_NpcAuxAI_MontyMole_WallAmbush_Hole) = { - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 50) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MontyMole_Anim13) - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Sub(LVar2, 50) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(SetNpcAnimation, NPC_SELF, ANIM_MontyMole_Anim13) + Return + End }; MobileAISettings N(AISettings_MontyMole_WallAmbush) = { @@ -37,47 +37,47 @@ MobileAISettings N(AISettings_MontyMole_WallAmbush) = { }; EvtScript N(EVS_NpcAI_MontyMole_WallAmbush) = { - EVT_CALL(func_800445D4, LVar0) - EVT_IF_EQ(LVar0, 100) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_DISABLE_AI, 1) - EVT_LABEL(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 130) - EVT_CALL(IsPlayerWithin, LVar0, LVar2, 80, LVar3) - EVT_IF_NE(LVar3, 1) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GetSelfNpcID, LVar0) - EVT_ADD(LVar0, 1) - EVT_CALL(GetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_ADD(LVar2, 30) - EVT_ADD(LVar3, 50) - EVT_CALL(SetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INACTIVE, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(EnableNpcShadow, NPC_SELF, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MontyMole_Anim0E) - EVT_CALL(SetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) - EVT_SUB(LVar2, 30) - EVT_ADD(LVar3, 80) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.7)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_MOLE_POP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar1, LVar2, LVar3, 20) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_DISABLE_AI, 0) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_BEGIN_WITH_CHASING, 1) - EVT_END_IF - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_MontyMole_WallAmbush))) - EVT_RETURN - EVT_END + Call(func_800445D4, LVar0) + IfEq(LVar0, 100) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_DISABLE_AI, 1) + Label(10) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar2, 130) + Call(IsPlayerWithin, LVar0, LVar2, 80, LVar3) + IfNe(LVar3, 1) + Wait(1) + Goto(10) + EndIf + Call(GetSelfNpcID, LVar0) + Add(LVar0, 1) + Call(GetNpcPos, LVar0, LVar1, LVar2, LVar3) + Add(LVar2, 30) + Add(LVar3, 50) + Call(SetNpcPos, LVar0, LVar1, LVar2, LVar3) + Wait(1) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INACTIVE, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(EnableNpcShadow, NPC_SELF, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_MontyMole_Anim0E) + Call(SetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) + Sub(LVar2, 30) + Add(LVar3, 80) + Call(SetNpcJumpscale, NPC_SELF, Float(0.7)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_MOLE_POP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar1, LVar2, LVar3, 20) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_DISABLE_AI, 0) + Call(NpcFacePlayer, NPC_SELF, 0) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_BEGIN_WITH_CHASING, 1) + EndIf + Call(BasicAI_Main, Ref(N(AISettings_MontyMole_WallAmbush))) + Return + End }; EvtScript N(EVS_NpcAI_MontyMole_WallAmbush_Hole_Unused) = { - EVT_RETURN - EVT_END + Return + End }; NpcSettings N(NpcSettings_MontyMole_WallAmbush) = { diff --git a/src/world/common/enemy/Paragloomba_Wander.inc.c b/src/world/common/enemy/Paragloomba_Wander.inc.c index faf032e980f..cf17e6e2b94 100644 --- a/src/world/common/enemy/Paragloomba_Wander.inc.c +++ b/src/world/common/enemy/Paragloomba_Wander.inc.c @@ -14,13 +14,13 @@ MobileAISettings N(AISettings_Paragloomba_Wander) = { }; EvtScript N(EVS_NpcAI_Paragloomba_Wander) = { - EVT_CALL(SetSelfVar, 0, 1) - EVT_CALL(SetSelfVar, 5, -850) - EVT_CALL(SetSelfVar, 6, 60) - EVT_CALL(SetSelfVar, 1, 600) - EVT_CALL(N(FlyingAI_Main), EVT_PTR(N(AISettings_Paragloomba_Wander))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 1) + Call(SetSelfVar, 5, -850) + Call(SetSelfVar, 6, 60) + Call(SetSelfVar, 1, 600) + Call(N(FlyingAI_Main), Ref(N(AISettings_Paragloomba_Wander))) + Return + End }; NpcSettings N(NpcSettings_Paragloomba_Wander) = { diff --git a/src/world/common/enemy/Paragoomba_Wander.inc.c b/src/world/common/enemy/Paragoomba_Wander.inc.c index b100b1617ae..a6b1c5225f3 100644 --- a/src/world/common/enemy/Paragoomba_Wander.inc.c +++ b/src/world/common/enemy/Paragoomba_Wander.inc.c @@ -16,13 +16,13 @@ MobileAISettings N(AISettings_Paragoomba_Wander) = { }; EvtScript N(EVS_NpcAI_Paragoomba_Wander) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetSelfVar, 5, -500) - EVT_CALL(SetSelfVar, 6, 21) - EVT_CALL(SetSelfVar, 1, 580) - EVT_CALL(N(FlyingAI_Main), EVT_PTR(N(AISettings_Paragoomba_Wander))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Call(SetSelfVar, 5, -500) + Call(SetSelfVar, 6, 21) + Call(SetSelfVar, 1, 580) + Call(N(FlyingAI_Main), Ref(N(AISettings_Paragoomba_Wander))) + Return + End }; NpcSettings N(NpcSettings_Paragoomba_Wander) = { diff --git a/src/world/common/enemy/Paratroopa.inc.c b/src/world/common/enemy/Paratroopa.inc.c index 88222d74f9f..cc6e3a9bb48 100644 --- a/src/world/common/enemy/Paratroopa.inc.c +++ b/src/world/common/enemy/Paratroopa.inc.c @@ -18,13 +18,13 @@ MobileAISettings N(AISettings_ParaTroopa) = { }; EvtScript N(EVS_NpcAI_ParaTroopa) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetSelfVar, 5, -650) - EVT_CALL(SetSelfVar, 6, 30) - EVT_CALL(SetSelfVar, 1, 600) - EVT_CALL(N(ParatroopaAI_Main), EVT_PTR(N(AISettings_ParaTroopa))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Call(SetSelfVar, 5, -650) + Call(SetSelfVar, 6, 30) + Call(SetSelfVar, 1, 600) + Call(N(ParatroopaAI_Main), Ref(N(AISettings_ParaTroopa))) + Return + End }; NpcSettings N(NpcSettings_ParaTroopa) = { diff --git a/src/world/common/enemy/PiranhaPlant.inc.c b/src/world/common/enemy/PiranhaPlant.inc.c index 2c3ee47ca5c..1e3a06a5aeb 100644 --- a/src/world/common/enemy/PiranhaPlant.inc.c +++ b/src/world/common/enemy/PiranhaPlant.inc.c @@ -12,18 +12,18 @@ MobileAISettings N(AISettings_PiranhaPlant) = { }; EvtScript N(EVS_NpcAI_PiranhaPlant) = { - EVT_CALL(SetSelfVar, 7, 0) - EVT_CALL(SetSelfVar, 8, 12) - EVT_CALL(SetSelfVar, 9, 11) - EVT_CALL(SetSelfVar, 10, 14) - EVT_CALL(SetSelfVar, 11, 9) - EVT_CALL(SetSelfVar, 12, 25) - EVT_CALL(SetSelfVar, 13, -1) - EVT_CALL(SetSelfVar, 14, 10) - EVT_CALL(SetSelfVar, 15, 15) - EVT_CALL(N(PiranhaPlantAI_Main), EVT_PTR(N(AISettings_PiranhaPlant))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 7, 0) + Call(SetSelfVar, 8, 12) + Call(SetSelfVar, 9, 11) + Call(SetSelfVar, 10, 14) + Call(SetSelfVar, 11, 9) + Call(SetSelfVar, 12, 25) + Call(SetSelfVar, 13, -1) + Call(SetSelfVar, 14, 10) + Call(SetSelfVar, 15, 15) + Call(N(PiranhaPlantAI_Main), Ref(N(AISettings_PiranhaPlant))) + Return + End }; NpcSettings N(NpcSettings_PiranhaPlant) = { @@ -36,29 +36,29 @@ NpcSettings N(NpcSettings_PiranhaPlant) = { }; EvtScript N(EVS_NpcAI_PiranhaPlant_Hitbox) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetSelfVar, 0, 10) - EVT_CALL(SetSelfVar, 1, 18) - EVT_CALL(SetSelfVar, 4, 3) - EVT_CALL(SetSelfVar, 15, SOUND_PIRANHA_BITE) - EVT_CALL(N(MeleeHitbox_Main)) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetSelfVar, 0, 10) + Call(SetSelfVar, 1, 18) + Call(SetSelfVar, 4, 3) + Call(SetSelfVar, 15, SOUND_PIRANHA_BITE) + Call(N(MeleeHitbox_Main)) + Return + End }; EvtScript N(EVS_8024411C) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_NONE) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_PARTNER) - EVT_CALL(GetSelfAnimationFromTable, ENEMY_ANIM_INDEX_HIT, LVar0) - EVT_EXEC_WAIT(EVS_NpcHitRecoil) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_NONE) + CaseOrEq(ENCOUNTER_TRIGGER_JUMP) + CaseOrEq(ENCOUNTER_TRIGGER_HAMMER) + CaseOrEq(ENCOUNTER_TRIGGER_PARTNER) + Call(GetSelfAnimationFromTable, ENEMY_ANIM_INDEX_HIT, LVar0) + ExecWait(EVS_NpcHitRecoil) + EndCaseGroup + EndSwitch + Return + End }; NpcSettings N(NpcSettings_PiranhaPlant_Hitbox) = { diff --git a/src/world/common/enemy/Pokey.inc.c b/src/world/common/enemy/Pokey.inc.c index 75fa8634ddf..3bab502ca8e 100644 --- a/src/world/common/enemy/Pokey.inc.c +++ b/src/world/common/enemy/Pokey.inc.c @@ -19,10 +19,10 @@ MobileAISettings N(AISettings_Pokey) = { }; EvtScript N(EVS_NpcAI_Pokey) = { - EVT_CALL(N(SetPokeyInstigatorValue)) - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_Pokey))) - EVT_RETURN - EVT_END + Call(N(SetPokeyInstigatorValue)) + Call(BasicAI_Main, Ref(N(AISettings_Pokey))) + Return + End }; NpcSettings N(NpcSettings_Pokey) = { diff --git a/src/world/common/enemy/PokeyMummy.inc.c b/src/world/common/enemy/PokeyMummy.inc.c index e6bf55a2a2a..7d53f76efda 100644 --- a/src/world/common/enemy/PokeyMummy.inc.c +++ b/src/world/common/enemy/PokeyMummy.inc.c @@ -16,10 +16,10 @@ MobileAISettings N(AISettings_PokeyMummy) = { }; EvtScript N(EVS_NpcAI_PokeyMummy) = { - EVT_CALL(N(SetInstigatorValue_3)) - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_PokeyMummy))) - EVT_RETURN - EVT_END + Call(N(SetInstigatorValue_3)) + Call(BasicAI_Main, Ref(N(AISettings_PokeyMummy))) + Return + End }; NpcSettings N(NpcSettings_PokeyMummy) = { diff --git a/src/world/common/enemy/PutridPiranha.inc.c b/src/world/common/enemy/PutridPiranha.inc.c index 1c7a62550e2..3b732e3233b 100644 --- a/src/world/common/enemy/PutridPiranha.inc.c +++ b/src/world/common/enemy/PutridPiranha.inc.c @@ -12,18 +12,18 @@ MobileAISettings N(AISettings_PutridPiranha) = { }; EvtScript N(EVS_NpcAI_PutridPiranha) = { - EVT_CALL(SetSelfVar, 7, 1) - EVT_CALL(SetSelfVar, 8, 10) - EVT_CALL(SetSelfVar, 9, 9) - EVT_CALL(SetSelfVar, 10, 12) - EVT_CALL(SetSelfVar, 11, 7) - EVT_CALL(SetSelfVar, 12, 30) - EVT_CALL(SetSelfVar, 13, 15) - EVT_CALL(SetSelfVar, 14, 18) - EVT_CALL(SetSelfVar, 15, 15) - EVT_CALL(N(PiranhaPlantAI_Main), EVT_PTR(N(AISettings_PutridPiranha))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 7, 1) + Call(SetSelfVar, 8, 10) + Call(SetSelfVar, 9, 9) + Call(SetSelfVar, 10, 12) + Call(SetSelfVar, 11, 7) + Call(SetSelfVar, 12, 30) + Call(SetSelfVar, 13, 15) + Call(SetSelfVar, 14, 18) + Call(SetSelfVar, 15, 15) + Call(N(PiranhaPlantAI_Main), Ref(N(AISettings_PutridPiranha))) + Return + End }; NpcSettings N(NpcSettings_PutridPiranha) = { @@ -36,29 +36,29 @@ NpcSettings N(NpcSettings_PutridPiranha) = { }; EvtScript N(EVS_NpcAI_PutridPiranha_Hitbox) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetSelfVar, 0, 14) - EVT_CALL(SetSelfVar, 1, 28) - EVT_CALL(SetSelfVar, 4, 3) - EVT_CALL(SetSelfVar, 15, SOUND_PIRANHA_BITE) - EVT_CALL(N(MeleeHitbox_Main)) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetSelfVar, 0, 14) + Call(SetSelfVar, 1, 28) + Call(SetSelfVar, 4, 3) + Call(SetSelfVar, 15, SOUND_PIRANHA_BITE) + Call(N(MeleeHitbox_Main)) + Return + End }; EvtScript N(EVS_80244090) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_NONE) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_PARTNER) - EVT_CALL(GetSelfAnimationFromTable, ENEMY_ANIM_INDEX_HIT, LVar0) - EVT_EXEC_WAIT(EVS_NpcHitRecoil) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_NONE) + CaseOrEq(ENCOUNTER_TRIGGER_JUMP) + CaseOrEq(ENCOUNTER_TRIGGER_HAMMER) + CaseOrEq(ENCOUNTER_TRIGGER_PARTNER) + Call(GetSelfAnimationFromTable, ENEMY_ANIM_INDEX_HIT, LVar0) + ExecWait(EVS_NpcHitRecoil) + EndCaseGroup + EndSwitch + Return + End }; NpcSettings N(NpcSettings_PutridPiranha_Hitbox) = { diff --git a/src/world/common/enemy/PyroGuy.inc.c b/src/world/common/enemy/PyroGuy.inc.c index fcb7ac6af4e..3cb931c96fa 100644 --- a/src/world/common/enemy/PyroGuy.inc.c +++ b/src/world/common/enemy/PyroGuy.inc.c @@ -16,9 +16,9 @@ MobileAISettings N(AISettings_PyroGuy) = { }; EvtScript N(EVS_NpcAI_PyroGuy) = { - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_PyroGuy))) - EVT_RETURN - EVT_END + Call(BasicAI_Main, Ref(N(AISettings_PyroGuy))) + Return + End }; NpcSettings N(NpcSettings_PyroGuy) = { diff --git a/src/world/common/enemy/RuffPuff.inc.c b/src/world/common/enemy/RuffPuff.inc.c index 572bc8b0638..e33955faabf 100644 --- a/src/world/common/enemy/RuffPuff.inc.c +++ b/src/world/common/enemy/RuffPuff.inc.c @@ -17,13 +17,13 @@ MobileAISettings N(AISettings_RuffPuff) = { }; EvtScript N(EVS_NpcAI_RuffPuff) = { - EVT_CALL(SetSelfVar, 0, 1) - EVT_CALL(SetSelfVar, 5, 0) - EVT_CALL(SetSelfVar, 6, 0) - EVT_CALL(SetSelfVar, 1, 600) - EVT_CALL(N(FlyingNoAttackAI_Main), EVT_PTR(N(AISettings_RuffPuff))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 1) + Call(SetSelfVar, 5, 0) + Call(SetSelfVar, 6, 0) + Call(SetSelfVar, 1, 600) + Call(N(FlyingNoAttackAI_Main), Ref(N(AISettings_RuffPuff))) + Return + End }; NpcSettings N(NpcSettings_RuffPuff) = { diff --git a/src/world/common/enemy/Sentinel.inc.c b/src/world/common/enemy/Sentinel.inc.c index 09eada3df22..ac6a845be0b 100644 --- a/src/world/common/enemy/Sentinel.inc.c +++ b/src/world/common/enemy/Sentinel.inc.c @@ -5,10 +5,10 @@ #include "world/common/enemy/ai/SentinelAI.inc.c" EvtScript N(EVS_NpcAuxAI_Sentinel) = { - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_CANT_INTERACT | ENEMY_FLAG_IGNORE_PARTNER | ENEMY_FLAG_IGNORE_SPIN, 1) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_DONT_UPDATE_SHADOW_Y | NPC_FLAG_JUMPING, TRUE) - EVT_RETURN - EVT_END + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_CANT_INTERACT | ENEMY_FLAG_IGNORE_PARTNER | ENEMY_FLAG_IGNORE_SPIN, 1) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION | NPC_FLAG_DONT_UPDATE_SHADOW_Y | NPC_FLAG_JUMPING, TRUE) + Return + End }; MobileAISettings N(AISettings_Sentinel) = { @@ -25,91 +25,91 @@ MobileAISettings N(AISettings_Sentinel) = { }; EvtScript N(EVS_NpcAI_Sentinel) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetSelfVar, 5, -650) - EVT_CALL(SetSelfVar, 6, 30) - EVT_CALL(SetSelfVar, 1, 600) - EVT_CALL(N(SentinelAI_Main), EVT_PTR(N(AISettings_Sentinel))) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(2) - EVT_LABEL(20) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar4, LVar2) - EVT_CALL(GetPlayerActionState, LVar0) - EVT_IF_NE(LVar0, ACTION_STATE_IDLE) - EVT_WAIT(1) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(InterruptUsePartner) - EVT_CALL(DisablePartnerAI, 0) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar2, 2) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(func_80045838, -1, SOUND_SENTINEL_PICKUP, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Sentinel_Anim08) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Flail) - EVT_WAIT(10) - EVT_CALL(func_80045838, -1, SOUND_LRAW_SENTINEL_ALARM | SOUND_ID_TRIGGER_CHANGE_SOUND, 0) - EVT_THREAD - EVT_LOOP(100) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 1) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_TALK) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10) - EVT_END_THREAD - EVT_WAIT(30) - EVT_CALL(GotoMap, EVT_PTR("dgb_00"), dgb_00_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Call(SetSelfVar, 5, -650) + Call(SetSelfVar, 6, 30) + Call(SetSelfVar, 1, 600) + Call(N(SentinelAI_Main), Ref(N(AISettings_Sentinel))) + Call(DisablePlayerInput, TRUE) + Wait(2) + Label(20) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + Call(SetNpcPos, NPC_SELF, LVar0, LVar4, LVar2) + Call(GetPlayerActionState, LVar0) + IfNe(LVar0, ACTION_STATE_IDLE) + Wait(1) + Goto(20) + EndIf + Call(DisablePlayerPhysics, TRUE) + Call(InterruptUsePartner) + Call(DisablePartnerAI, 0) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Add(LVar2, 2) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(func_80045838, -1, SOUND_SENTINEL_PICKUP, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Sentinel_Anim08) + Wait(10) + Call(SetPlayerAnimation, ANIM_MarioW2_Flail) + Wait(10) + Call(func_80045838, -1, SOUND_LRAW_SENTINEL_ALARM | SOUND_ID_TRIGGER_CHANGE_SOUND, 0) + Thread + Loop(100) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 1) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 1) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + Thread + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_TALK) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10) + EndThread + Wait(30) + Call(GotoMap, Ref("dgb_00"), dgb_00_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_UnusedSentinelOnHit) = { - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_NONE) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_PARTNER) - EVT_CALL(GetSelfAnimationFromTable, ENEMY_ANIM_INDEX_HIT, LVar0) - EVT_EXEC_WAIT(EVS_NpcHitRecoil) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_NONE) + CaseOrEq(ENCOUNTER_TRIGGER_JUMP) + CaseOrEq(ENCOUNTER_TRIGGER_HAMMER) + CaseOrEq(ENCOUNTER_TRIGGER_PARTNER) + Call(GetSelfAnimationFromTable, ENEMY_ANIM_INDEX_HIT, LVar0) + ExecWait(EVS_NpcHitRecoil) + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_UnusedSentinelDefeat) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; NpcSettings N(NpcSettings_Sentinel) = { diff --git a/src/world/common/enemy/ShyGuy_AvoidPlayer.inc.c b/src/world/common/enemy/ShyGuy_AvoidPlayer.inc.c index c87cd93f5b1..eab2ea0b247 100644 --- a/src/world/common/enemy/ShyGuy_AvoidPlayer.inc.c +++ b/src/world/common/enemy/ShyGuy_AvoidPlayer.inc.c @@ -16,9 +16,9 @@ MobileAISettings N(AISettings_ShyGuy_AvoidPlayer) = { }; EvtScript N(EVS_NpcAI_ShyGuy_AvoidPlayer) = { - EVT_CALL(N(AvoidPlayerAI_Main), EVT_PTR(N(AISettings_ShyGuy_AvoidPlayer))) - EVT_RETURN - EVT_END + Call(N(AvoidPlayerAI_Main), Ref(N(AISettings_ShyGuy_AvoidPlayer))) + Return + End }; NpcSettings N(NpcSettings_ShyGuy_AvoidPlayer) = { diff --git a/src/world/common/enemy/ShyGuy_Guard.inc.c b/src/world/common/enemy/ShyGuy_Guard.inc.c index d3406c9b00d..d359ba0e219 100644 --- a/src/world/common/enemy/ShyGuy_Guard.inc.c +++ b/src/world/common/enemy/ShyGuy_Guard.inc.c @@ -15,9 +15,9 @@ GuardAISettings N(AISettings_ShyGuy_Guard) = { }; EvtScript N(EVS_NpcAI_ShyGuy_Guard) = { - EVT_CALL(N(GuardAI_Main), EVT_PTR(N(AISettings_ShyGuy_Guard))) - EVT_RETURN - EVT_END + Call(N(GuardAI_Main), Ref(N(AISettings_ShyGuy_Guard))) + Return + End }; NpcSettings N(NpcSettings_ShyGuy_Guard) = { diff --git a/src/world/common/enemy/ShyGuy_Patrol.inc.c b/src/world/common/enemy/ShyGuy_Patrol.inc.c index d6540091322..0715a243867 100644 --- a/src/world/common/enemy/ShyGuy_Patrol.inc.c +++ b/src/world/common/enemy/ShyGuy_Patrol.inc.c @@ -17,15 +17,15 @@ MobileAISettings N(AISettings_ShyGuy_Patrol) = { }; EvtScript N(EVS_NpcAI_ShyGuy_Patrol) = { - EVT_CALL(N(ShyGuyPatrolAI_Main), EVT_PTR(N(AISettings_ShyGuy_Patrol))) - EVT_RETURN - EVT_END + Call(N(ShyGuyPatrolAI_Main), Ref(N(AISettings_ShyGuy_Patrol))) + Return + End }; EvtScript N(EVS_NpcAI_ShyGuy_Patrol_Passive) = { - EVT_CALL(N(PatrolNoAttackAI_Main), EVT_PTR(N(AISettings_ShyGuy_Patrol))) - EVT_RETURN - EVT_END + Call(N(PatrolNoAttackAI_Main), Ref(N(AISettings_ShyGuy_Patrol))) + Return + End }; NpcSettings N(NpcSettings_ShyGuy_Patrol) = { diff --git a/src/world/common/enemy/ShyGuy_Wander.inc.c b/src/world/common/enemy/ShyGuy_Wander.inc.c index 717020e9e0c..9d4ae8e41da 100644 --- a/src/world/common/enemy/ShyGuy_Wander.inc.c +++ b/src/world/common/enemy/ShyGuy_Wander.inc.c @@ -18,9 +18,9 @@ MobileAISettings N(AISettings_ShyGuy_Wander) = { }; EvtScript N(EVS_NpcAI_ShyGuy_Wander) = { - EVT_CALL(N(ShyGuyWanderAI_Main), EVT_PTR(N(AISettings_ShyGuy_Wander))) - EVT_RETURN - EVT_END + Call(N(ShyGuyWanderAI_Main), Ref(N(AISettings_ShyGuy_Wander))) + Return + End }; NpcSettings N(NpcSettings_ShyGuy_Wander) = { diff --git a/src/world/common/enemy/SkyGuy.inc.c b/src/world/common/enemy/SkyGuy.inc.c index d6e3b06219f..b99d6ba2c16 100644 --- a/src/world/common/enemy/SkyGuy.inc.c +++ b/src/world/common/enemy/SkyGuy.inc.c @@ -16,13 +16,13 @@ MobileAISettings N(AISettings_SkyGuy) = { }; EvtScript N(EVS_NpcAI_SkyGuy) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetSelfVar, 5, -650) - EVT_CALL(SetSelfVar, 6, 30) - EVT_CALL(SetSelfVar, 1, 600) - EVT_CALL(N(FlyingAI_Main), EVT_PTR(N(AISettings_SkyGuy))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Call(SetSelfVar, 5, -650) + Call(SetSelfVar, 6, 30) + Call(SetSelfVar, 1, 600) + Call(N(FlyingAI_Main), Ref(N(AISettings_SkyGuy))) + Return + End }; NpcSettings N(NpcSettings_SkyGuy) = { diff --git a/src/world/common/enemy/SpearGuy_Patrol.inc.c b/src/world/common/enemy/SpearGuy_Patrol.inc.c index 18eac07ba60..1c36ff16b66 100644 --- a/src/world/common/enemy/SpearGuy_Patrol.inc.c +++ b/src/world/common/enemy/SpearGuy_Patrol.inc.c @@ -11,9 +11,9 @@ MobileAISettings N(AISettings_SpearGuy_Patrol) = { }; EvtScript N(EVS_NpcAI_SpearGuy_Patrol) = { - EVT_CALL(N(PatrolNoAttackAI_Main), EVT_PTR(N(AISettings_SpearGuy_Patrol))) - EVT_RETURN - EVT_END + Call(N(PatrolNoAttackAI_Main), Ref(N(AISettings_SpearGuy_Patrol))) + Return + End }; NpcSettings N(NpcSettings_SpearGuy_Patrol) = { diff --git a/src/world/common/enemy/SpearGuy_Wander.inc.c b/src/world/common/enemy/SpearGuy_Wander.inc.c index 7eed48b2562..189ff242d9e 100644 --- a/src/world/common/enemy/SpearGuy_Wander.inc.c +++ b/src/world/common/enemy/SpearGuy_Wander.inc.c @@ -21,19 +21,19 @@ AnimID N(ExtraAnims_SpearGuy_Hitbox)[] = { }; EvtScript N(EVS_NpcDefeat_SpearGuy_Hitbox) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(OnPlayerFled, 1) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(RemoveNpc, NPC_SELF) + CaseEq(OUTCOME_PLAYER_FLED) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(OnPlayerFled, 1) + CaseEq(OUTCOME_ENEMY_FLED) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; MobileAISettings N(AISettings_SpearGuy_Wander) = { @@ -51,13 +51,13 @@ MobileAISettings N(AISettings_SpearGuy_Wander) = { }; EvtScript N(EVS_NpcAI_SpearGuy_Wander) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetSelfVar, 1, 5) - EVT_CALL(SetSelfVar, 2, 12) - EVT_CALL(SetSelfVar, 3, 9) - EVT_CALL(N(SpearGuyAI_Main), EVT_PTR(N(AISettings_SpearGuy_Wander))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Call(SetSelfVar, 1, 5) + Call(SetSelfVar, 2, 12) + Call(SetSelfVar, 3, 9) + Call(N(SpearGuyAI_Main), Ref(N(AISettings_SpearGuy_Wander))) + Return + End }; NpcSettings N(NpcSettings_SpearGuy_Wander) = { @@ -70,16 +70,16 @@ NpcSettings N(NpcSettings_SpearGuy_Wander) = { }; EvtScript N(EVS_NpcAI_SpearGuy_Hitbox) = { - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_CALL(SetSelfVar, 0, 4) - EVT_CALL(SetSelfVar, 1, 22) - EVT_CALL(SetSelfVar, 2, 40) - EVT_CALL(SetSelfVar, 3, 28) - EVT_CALL(SetSelfVar, 4, 1) - EVT_CALL(SetSelfVar, 15, 0) - EVT_CALL(N(MeleeHitbox_Main)) - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_SELF, FALSE) + Call(SetSelfVar, 0, 4) + Call(SetSelfVar, 1, 22) + Call(SetSelfVar, 2, 40) + Call(SetSelfVar, 3, 28) + Call(SetSelfVar, 4, 1) + Call(SetSelfVar, 15, 0) + Call(N(MeleeHitbox_Main)) + Return + End }; NpcSettings N(NpcSettings_SpearGuy_Hitbox) = { diff --git a/src/world/common/enemy/SpikeTop.inc.c b/src/world/common/enemy/SpikeTop.inc.c index bbd70078053..2a922c4170c 100644 --- a/src/world/common/enemy/SpikeTop.inc.c +++ b/src/world/common/enemy/SpikeTop.inc.c @@ -16,13 +16,13 @@ MobileAISettings N(AISettings_BuzzyBeetle) = { }; EvtScript N(EVS_NpcAI_BuzzyBeetle) = { - EVT_CALL(SetSelfVar, 2, 5) - EVT_CALL(SetSelfVar, 3, 2) - EVT_CALL(SetSelfVar, 5, 5) - EVT_CALL(SetSelfVar, 7, 2) - EVT_CALL(N(TackleAI_Main), EVT_PTR(N(AISettings_BuzzyBeetle))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 2, 5) + Call(SetSelfVar, 3, 2) + Call(SetSelfVar, 5, 5) + Call(SetSelfVar, 7, 2) + Call(N(TackleAI_Main), Ref(N(AISettings_BuzzyBeetle))) + Return + End }; MobileAISettings N(AISettings_SpikeTop) = { @@ -39,13 +39,13 @@ MobileAISettings N(AISettings_SpikeTop) = { }; EvtScript N(EVS_NpcAI_SpikeTop) = { - EVT_CALL(SetSelfVar, 2, 4) - EVT_CALL(SetSelfVar, 3, 10) - EVT_CALL(SetSelfVar, 5, 4) - EVT_CALL(SetSelfVar, 7, 3) - EVT_CALL(N(TackleAI_Main), EVT_PTR(N(AISettings_SpikeTop))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 2, 4) + Call(SetSelfVar, 3, 10) + Call(SetSelfVar, 5, 4) + Call(SetSelfVar, 7, 3) + Call(N(TackleAI_Main), Ref(N(AISettings_SpikeTop))) + Return + End }; MobileAISettings N(AISettings_BonyBeetle) = { @@ -60,33 +60,33 @@ MobileAISettings N(AISettings_BonyBeetle) = { }; EvtScript N(EVS_NpcAI_BonyBeetle) = { - EVT_CALL(SetSelfVar, 2, 3) - EVT_CALL(SetSelfVar, 3, 8) - EVT_CALL(SetSelfVar, 5, 6) - EVT_CALL(SetSelfVar, 7, 6) - EVT_CALL(N(TackleAI_Main), EVT_PTR(N(AISettings_BonyBeetle))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 2, 3) + Call(SetSelfVar, 3, 8) + Call(SetSelfVar, 5, 6) + Call(SetSelfVar, 7, 6) + Call(N(TackleAI_Main), Ref(N(AISettings_BonyBeetle))) + Return + End }; #include "world/common/todo/AwaitPlayerNearNpc.inc.c" EvtScript N(EVS_NpcAI_BuzzyBeetle_Ceiling) = { - EVT_CALL(N(func_80240814_97BE44)) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_BuzzyBeetle_Anim0F) - EVT_CALL(N(AwaitPlayerNearNpc)) - EVT_CALL(SelfEnemyOverrideSyncPos, 1) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_BuzzyBeetle_Anim00) - EVT_CALL(N(func_802408B4_97BEE4)) - EVT_CALL(SelfEnemyOverrideSyncPos, 0) - EVT_CALL(SetSelfVar, 2, 5) - EVT_CALL(SetSelfVar, 3, 2) - EVT_CALL(SetSelfVar, 5, 5) - EVT_CALL(SetSelfVar, 7, 2) - EVT_CALL(N(TackleAI_Main), EVT_PTR(N(AISettings_BuzzyBeetle))) - EVT_RETURN - EVT_END + Call(N(func_80240814_97BE44)) + Call(SetNpcAnimation, NPC_SELF, ANIM_BuzzyBeetle_Anim0F) + Call(N(AwaitPlayerNearNpc)) + Call(SelfEnemyOverrideSyncPos, 1) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_GRAVITY, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_BuzzyBeetle_Anim00) + Call(N(func_802408B4_97BEE4)) + Call(SelfEnemyOverrideSyncPos, 0) + Call(SetSelfVar, 2, 5) + Call(SetSelfVar, 3, 2) + Call(SetSelfVar, 5, 5) + Call(SetSelfVar, 7, 2) + Call(N(TackleAI_Main), Ref(N(AISettings_BuzzyBeetle))) + Return + End }; NpcSettings N(NpcSettings_BuzzyBeetle) = { diff --git a/src/world/common/enemy/SpikedGloomba_Wander.inc.c b/src/world/common/enemy/SpikedGloomba_Wander.inc.c index 6e4b039f529..fd46e35acb2 100644 --- a/src/world/common/enemy/SpikedGloomba_Wander.inc.c +++ b/src/world/common/enemy/SpikedGloomba_Wander.inc.c @@ -12,9 +12,9 @@ MobileAISettings N(AISettings_SpikedGloomba_Wander) = { }; EvtScript N(EVS_NpcAI_SpikedGloomba_Wander) = { - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_SpikedGloomba_Wander))) - EVT_RETURN - EVT_END + Call(BasicAI_Main, Ref(N(AISettings_SpikedGloomba_Wander))) + Return + End }; NpcSettings N(NpcSettings_SpikedGloomba_Wander) = { diff --git a/src/world/common/enemy/SpikedGoomba_Patrol.inc.c b/src/world/common/enemy/SpikedGoomba_Patrol.inc.c index c437246f59f..8c1a5f91b32 100644 --- a/src/world/common/enemy/SpikedGoomba_Patrol.inc.c +++ b/src/world/common/enemy/SpikedGoomba_Patrol.inc.c @@ -16,9 +16,9 @@ MobileAISettings N(AISettings_SpikedGoomba_Patrol) = { }; EvtScript N(EVS_NpcAI_SpikedGoomba_Patrol) = { - EVT_CALL(N(PatrolNoAttackAI_Main), EVT_PTR(N(AISettings_SpikedGoomba_Patrol))) - EVT_RETURN - EVT_END + Call(N(PatrolNoAttackAI_Main), Ref(N(AISettings_SpikedGoomba_Patrol))) + Return + End }; NpcSettings N(NpcSettings_SpikedGoomba_Patrol) = { diff --git a/src/world/common/enemy/SpikedGoomba_Wander.inc.c b/src/world/common/enemy/SpikedGoomba_Wander.inc.c index 44712b75cbc..8edf3049709 100644 --- a/src/world/common/enemy/SpikedGoomba_Wander.inc.c +++ b/src/world/common/enemy/SpikedGoomba_Wander.inc.c @@ -14,9 +14,9 @@ MobileAISettings N(AISettings_SpikedGoomba_Wander) = { }; EvtScript N(EVS_NpcAI_SpikedGoomba_Wander) = { - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_SpikedGoomba_Wander))) - EVT_RETURN - EVT_END + Call(BasicAI_Main, Ref(N(AISettings_SpikedGoomba_Wander))) + Return + End }; NpcSettings N(NpcSettings_SpikedGoomba_Wander) = { diff --git a/src/world/common/enemy/Spiny.inc.c b/src/world/common/enemy/Spiny.inc.c index 6e3cc3baec6..3613df74957 100644 --- a/src/world/common/enemy/Spiny.inc.c +++ b/src/world/common/enemy/Spiny.inc.c @@ -16,13 +16,13 @@ MobileAISettings N(AISettings_Spiny) = { }; EvtScript N(EVS_NpcAI_Spiny) = { - EVT_CALL(SetSelfVar, 2, 3) - EVT_CALL(SetSelfVar, 3, 18) - EVT_CALL(SetSelfVar, 5, 3) - EVT_CALL(SetSelfVar, 7, 4) - EVT_CALL(N(TackleAI_Main), EVT_PTR(N(AISettings_Spiny))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 2, 3) + Call(SetSelfVar, 3, 18) + Call(SetSelfVar, 5, 3) + Call(SetSelfVar, 7, 4) + Call(N(TackleAI_Main), Ref(N(AISettings_Spiny))) + Return + End }; NpcSettings N(NpcSettings_Spiny) = { diff --git a/src/world/common/enemy/SpyGuy.inc.c b/src/world/common/enemy/SpyGuy.inc.c index fc23e5cf3d5..d1698fa9a6d 100644 --- a/src/world/common/enemy/SpyGuy.inc.c +++ b/src/world/common/enemy/SpyGuy.inc.c @@ -10,20 +10,20 @@ API_CALLABLE(N(SetSpyGuyInstigatorValue)) { #include "world/common/todo/GetEncounterEnemyIsOwner.inc.c" EvtScript N(EVS_NpcDefeat_SpyGuyRock) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(SetSelfVar, 0, 5) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(OnPlayerFled, 1) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(SetSelfVar, 0, 5) + Call(RemoveNpc, NPC_SELF) + CaseEq(OUTCOME_PLAYER_FLED) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(OnPlayerFled, 1) + CaseEq(OUTCOME_ENEMY_FLED) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; MobileAISettings N(AISettings_SpyGuy) = { @@ -42,14 +42,14 @@ MobileAISettings N(AISettings_SpyGuy) = { }; EvtScript N(EVS_NpcAI_SpyGuy) = { - EVT_CALL(N(SetSpyGuyInstigatorValue)) - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetSelfVar, 1, 12) - EVT_CALL(SetSelfVar, 2, 5) - EVT_CALL(SetSelfVar, 3, 2) - EVT_CALL(N(RangedAttackAI_Main), EVT_PTR(N(AISettings_SpyGuy))) - EVT_RETURN - EVT_END + Call(N(SetSpyGuyInstigatorValue)) + Call(SetSelfVar, 0, 0) + Call(SetSelfVar, 1, 12) + Call(SetSelfVar, 2, 5) + Call(SetSelfVar, 3, 2) + Call(N(RangedAttackAI_Main), Ref(N(AISettings_SpyGuy))) + Return + End }; NpcSettings N(NpcSettings_SpyGuy) = { @@ -69,51 +69,51 @@ MobileAISettings N(AISettings_SpyGuyRock) = { }; EvtScript N(EVS_NpcAI_SpyGuyRock_Projectile) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetSelfVar, 1, 0) - EVT_CALL(SetSelfVar, 2, 12) - EVT_CALL(SetSelfVar, 3, 13) - EVT_CALL(N(ProjectileAI_Main), EVT_PTR(N(AISettings_SpyGuyRock))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Call(SetSelfVar, 1, 0) + Call(SetSelfVar, 2, 12) + Call(SetSelfVar, 3, 13) + Call(N(ProjectileAI_Main), Ref(N(AISettings_SpyGuyRock))) + Return + End }; EvtScript N(EVS_NpcAI_SpyGuyRock_Projectile_None) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcHit_SpyGuyRock) = { - EVT_CALL(N(GetEncounterEnemyIsOwner)) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_SpyGuyRock_Projectile_None))) - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_SPIN) - EVT_CALL(SetSelfVar, 0, 3) - EVT_CALL(N(ProjectileAI_Reflect)) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_PARTNER) - EVT_CALL(SetSelfVar, 0, 4) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2, 0, 0) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(SetSelfVar, 0, 0) - EVT_END_CASE_GROUP - EVT_CASE_DEFAULT - EVT_CALL(SetBattleAsScripted) - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_SpyGuyRock_Projectile))) - EVT_RETURN - EVT_END + Call(N(GetEncounterEnemyIsOwner)) + IfEq(LVar0, 0) + Return + EndIf + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_SpyGuyRock_Projectile_None))) + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseOrEq(ENCOUNTER_TRIGGER_HAMMER) + CaseOrEq(ENCOUNTER_TRIGGER_SPIN) + Call(SetSelfVar, 0, 3) + Call(N(ProjectileAI_Reflect)) + IfEq(LVar0, 0) + Return + EndIf + EndCaseGroup + CaseOrEq(ENCOUNTER_TRIGGER_JUMP) + CaseOrEq(ENCOUNTER_TRIGGER_PARTNER) + Call(SetSelfVar, 0, 4) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_WALKING_DUST, 2, LVar0, LVar1, LVar2, 0, 0) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(SetSelfVar, 0, 0) + EndCaseGroup + CaseDefault + Call(SetBattleAsScripted) + EndCaseGroup + EndSwitch + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_SpyGuyRock_Projectile))) + Return + End }; NpcSettings N(NpcSettings_SpyGuyRock) = { diff --git a/src/world/common/enemy/StoneChomp.inc.c b/src/world/common/enemy/StoneChomp.inc.c index f1d7ec7fc94..0a5094ec431 100644 --- a/src/world/common/enemy/StoneChomp.inc.c +++ b/src/world/common/enemy/StoneChomp.inc.c @@ -124,9 +124,9 @@ API_CALLABLE(N(StoneChompFXC)) { } EvtScript N(EVS_NpcAuxAI_StoneChomp) = { - EVT_CALL(N(StoneChompFXA)) - EVT_RETURN - EVT_END + Call(N(StoneChompFXA)) + Return + End }; MobileAISettings N(AISettings_StoneChomp) = { @@ -143,57 +143,57 @@ MobileAISettings N(AISettings_StoneChomp) = { }; EvtScript N(EVS_NpcAI_StoneChomp) = { - EVT_CHILD_THREAD - EVT_LOOP(0) - EVT_CALL(N(StoneChompFXB)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_CALL(N(StoneChompAI_Main), EVT_PTR(N(AISettings_StoneChomp))) - EVT_RETURN - EVT_END + ChildThread + Loop(0) + Call(N(StoneChompFXB)) + Wait(1) + EndLoop + EndChildThread + Call(GetSelfVar, 0, LVar0) + Call(N(StoneChompAI_Main), Ref(N(AISettings_StoneChomp))) + Return + End }; EvtScript N(EVS_NpcHit_StoneChomp) = { - EVT_CALL(SetBattleMusic, SONG_SPECIAL_BATTLE) - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_NONE) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_JUMP) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_HAMMER) - EVT_CASE_OR_EQ(ENCOUNTER_TRIGGER_PARTNER) - EVT_CALL(GetSelfAnimationFromTable, ENEMY_ANIM_INDEX_HIT, LVar0) - EVT_EXEC_WAIT(EVS_NpcHitRecoil) - EVT_CASE_EQ(ENCOUNTER_TRIGGER_SPIN) - EVT_THREAD - EVT_CALL(func_800458CC, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LVarA, 0) - EVT_LOOP(30) - EVT_ADD(LVarA, 40) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, LVarA, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_IF - EVT_END_THREAD - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SetBattleMusic, SONG_SPECIAL_BATTLE) + Call(GetOwnerEncounterTrigger, LVar0) + Switch(LVar0) + CaseEq(ENCOUNTER_TRIGGER_NONE) + CaseOrEq(ENCOUNTER_TRIGGER_JUMP) + CaseOrEq(ENCOUNTER_TRIGGER_HAMMER) + CaseOrEq(ENCOUNTER_TRIGGER_PARTNER) + Call(GetSelfAnimationFromTable, ENEMY_ANIM_INDEX_HIT, LVar0) + ExecWait(EVS_NpcHitRecoil) + CaseEq(ENCOUNTER_TRIGGER_SPIN) + Thread + Call(func_800458CC, LVar0) + IfEq(LVar0, 0) + Set(LVarA, 0) + Loop(30) + Add(LVarA, 40) + Call(SetNpcRotation, NPC_SELF, 0, LVarA, 0) + Wait(1) + EndLoop + EndIf + EndThread + EndCaseGroup + EndSwitch + Return + End }; EvtScript N(EVS_NpcDefeat_StoneChomp) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(N(StoneChompFXC)) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(N(StoneChompFXC)) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; NpcSettings N(NpcSettings_StoneChomp) = { diff --git a/src/world/common/enemy/Swooper.inc.c b/src/world/common/enemy/Swooper.inc.c index ab9cfd54e58..41ca632d690 100644 --- a/src/world/common/enemy/Swooper.inc.c +++ b/src/world/common/enemy/Swooper.inc.c @@ -16,9 +16,9 @@ MobileAISettings N(AISettings_Swooper) = { }; EvtScript N(EVS_NpcAI_Swooper) = { - EVT_CALL(N(SwooperAI_Main), EVT_PTR(N(AISettings_Swooper))) - EVT_RETURN - EVT_END + Call(N(SwooperAI_Main), Ref(N(AISettings_Swooper))) + Return + End }; MobileAISettings N(AISettings_Swoopula) = { @@ -35,9 +35,9 @@ MobileAISettings N(AISettings_Swoopula) = { }; EvtScript N(EVS_NpcAI_Swoopula) = { - EVT_CALL(N(SwooperAI_Main), EVT_PTR(N(AISettings_Swoopula))) - EVT_RETURN - EVT_END + Call(N(SwooperAI_Main), Ref(N(AISettings_Swoopula))) + Return + End }; NpcSettings N(NpcSettings_Swooper) = { diff --git a/src/world/common/enemy/TubbaBlubba_Patrol.inc.c b/src/world/common/enemy/TubbaBlubba_Patrol.inc.c index ffc3fb88474..ad5fcfdf310 100644 --- a/src/world/common/enemy/TubbaBlubba_Patrol.inc.c +++ b/src/world/common/enemy/TubbaBlubba_Patrol.inc.c @@ -17,9 +17,9 @@ MobileAISettings N(AISettings_Tubba_Patrol) = { }; EvtScript N(EVS_NpcAI_Tubba_Patrol) = { - EVT_CALL(N(PatrolNoAttackAI_Main), EVT_PTR(N(AISettings_Tubba_Patrol))) - EVT_RETURN - EVT_END + Call(N(PatrolNoAttackAI_Main), Ref(N(AISettings_Tubba_Patrol))) + Return + End }; NpcSettings N(NpcSettings_TubbaBlubba_Patrol) = { diff --git a/src/world/common/enemy/ai/GenericHitboxDefeat.inc.c b/src/world/common/enemy/ai/GenericHitboxDefeat.inc.c index 98fbc7e8ceb..bc25252dd3b 100644 --- a/src/world/common/enemy/ai/GenericHitboxDefeat.inc.c +++ b/src/world/common/enemy/ai/GenericHitboxDefeat.inc.c @@ -4,19 +4,19 @@ #include "common.h" EvtScript N(EVS_GenericHitboxDefeat) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(OnPlayerFled, 1) - EVT_CASE_EQ(OUTCOME_ENEMY_FLED) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(RemoveNpc, NPC_SELF) + CaseEq(OUTCOME_PLAYER_FLED) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(OnPlayerFled, 1) + CaseEq(OUTCOME_ENEMY_FLED) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_FLED, 1) + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; #endif diff --git a/src/world/common/entity/Chest.inc.c b/src/world/common/entity/Chest.inc.c index 3a553cecfa6..c619c9efc7e 100644 --- a/src/world/common/entity/Chest.inc.c +++ b/src/world/common/entity/Chest.inc.c @@ -8,63 +8,63 @@ s32** N(varStash) = NULL; EvtScript N(EVS_Chest_ShowGotItem) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_FULL) - EVT_WAIT(40) - EVT_CALL(ShowGotItem, LVar0, FALSE, 0) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_RETURN - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_FULL) + Wait(40) + Call(ShowGotItem, LVar0, FALSE, 0) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Return + Return + End }; EvtScript N(EVS_Chest_GetItem) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(LVar0, LVarA) - EVT_IF_NE(LVarA, ITEM_NONE) - EVT_EXEC_WAIT(N(EVS_Chest_ShowGotItem)) - EVT_END_IF - EVT_SWITCH(LVarB) - EVT_CASE_EQ(ITEM_TYPE_CONSUMABLE) - EVT_CALL(AddItem, LVarA, LVar0) - EVT_CASE_EQ(ITEM_TYPE_KEY) - EVT_CALL(AddKeyItem, LVarA) - EVT_CASE_EQ(ITEM_TYPE_BADGE) - EVT_CALL(AddBadge, LVarA, LVar0) - EVT_END_SWITCH - EVT_WAIT(15) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Set(LVar0, LVarA) + IfNe(LVarA, ITEM_NONE) + ExecWait(N(EVS_Chest_ShowGotItem)) + EndIf + Switch(LVarB) + CaseEq(ITEM_TYPE_CONSUMABLE) + Call(AddItem, LVarA, LVar0) + CaseEq(ITEM_TYPE_KEY) + Call(AddKeyItem, LVarA) + CaseEq(ITEM_TYPE_BADGE) + Call(AddBadge, LVarA, LVar0) + EndSwitch + Wait(15) + Call(DisablePlayerInput, FALSE) + Return + End }; #define EVT_OPEN_CHEST_CONSUMABLE(item, flag) \ { \ - EVT_SET(LVarA, item) \ - EVT_SET(LVarB, ITEM_TYPE_CONSUMABLE) \ - EVT_SET(flag, TRUE) \ - EVT_EXEC_WAIT(N(EVS_Chest_GetItem)) \ - EVT_RETURN \ - EVT_END \ + Set(LVarA, item) \ + Set(LVarB, ITEM_TYPE_CONSUMABLE) \ + Set(flag, TRUE) \ + ExecWait(N(EVS_Chest_GetItem)) \ + Return \ + End \ } #define EVT_OPEN_CHEST_KEY(item, flag) \ { \ - EVT_SET(LVarA, item) \ - EVT_SET(LVarB, ITEM_TYPE_KEY) \ - EVT_SET(flag, TRUE) \ - EVT_EXEC_WAIT(N(EVS_Chest_GetItem)) \ - EVT_RETURN \ - EVT_END \ + Set(LVarA, item) \ + Set(LVarB, ITEM_TYPE_KEY) \ + Set(flag, TRUE) \ + ExecWait(N(EVS_Chest_GetItem)) \ + Return \ + End \ } #define EVT_OPEN_CHEST_BADGE(item, flag) \ { \ - EVT_SET(LVarA, item) \ - EVT_SET(LVarB, ITEM_TYPE_BADGE) \ - EVT_SET(flag, TRUE) \ - EVT_EXEC_WAIT(N(EVS_Chest_GetItem)) \ - EVT_RETURN \ - EVT_END \ + Set(LVarA, item) \ + Set(LVarB, ITEM_TYPE_BADGE) \ + Set(flag, TRUE) \ + ExecWait(N(EVS_Chest_GetItem)) \ + Return \ + End \ } diff --git a/src/world/common/entity/Pipe.inc.c b/src/world/common/entity/Pipe.inc.c index 015014daf60..5d7485eb894 100644 --- a/src/world/common/entity/Pipe.inc.c +++ b/src/world/common/entity/Pipe.inc.c @@ -7,34 +7,34 @@ #define EVT_EXIT_PIPE_HORIZONTAL(entry, collider, script) \ { \ - EVT_SET_GROUP(EVT_GROUP_1B) \ - EVT_SET(LVarA, entry) \ - EVT_SET(LVarB, collider) \ - EVT_SET(LVarC, EVT_PTR(script)) \ - EVT_EXEC_WAIT(N(EVS_Pipe_ExitHorizontal)) \ - EVT_RETURN \ - EVT_END \ + SetGroup(EVT_GROUP_1B) \ + Set(LVarA, entry) \ + Set(LVarB, collider) \ + Set(LVarC, Ref(script)) \ + ExecWait(N(EVS_Pipe_ExitHorizontal)) \ + Return \ + End \ } #define EVT_EXIT_PIPE_VERTICAL(entry, collider, script) \ { \ - EVT_SET_GROUP(EVT_GROUP_1B) \ - EVT_SET(LVarA, entry) \ - EVT_SET(LVarB, collider) \ - EVT_SET(LVarC, EVT_PTR(script)) \ - EVT_EXEC_WAIT(N(EVS_Pipe_ExitVertical)) \ - EVT_RETURN \ - EVT_END \ + SetGroup(EVT_GROUP_1B) \ + Set(LVarA, entry) \ + Set(LVarB, collider) \ + Set(LVarC, Ref(script)) \ + ExecWait(N(EVS_Pipe_ExitVertical)) \ + Return \ + End \ } #define EVT_ENTER_PIPE_HORIZONTAL(collider, bindExitsScript) \ - EVT_SET(LVarA, EVT_PTR(bindExitsScript)) \ - EVT_SET(LVarB, collider) \ - EVT_EXEC(N(EVS_Pipe_EnterHorizontal)) + Set(LVarA, Ref(bindExitsScript)) \ + Set(LVarB, collider) \ + Exec(N(EVS_Pipe_EnterHorizontal)) #define EVT_ENTER_PIPE_VERTICAL(bindExitsScript) \ - EVT_SET(LVarA, EVT_PTR(bindExitsScript)) \ - EVT_EXEC(N(EVS_Pipe_EnterVertical)) + Set(LVarA, Ref(bindExitsScript)) \ + Exec(N(EVS_Pipe_EnterVertical)) // ---------------------------------------------------------------- // Implementation @@ -113,238 +113,238 @@ API_CALLABLE(N(Pipe_GetPointAheadOfPlayer)) { extern EvtScript N(EVS_Pipe_ExitVertical_Impl); EvtScript N(EVS_Pipe_EnterVertical) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Still) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(EnableNpcShadow, NPC_PARTNER, FALSE) - EVT_CALL(SetNpcPos, NPC_PARTNER, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_CALL(GetEntryID, LVar0) - EVT_CALL(N(Pipe_GetEntryPos)) - EVT_SUB(LVar2, 40) - EVT_CALL(SetPlayerPos, LVar1, LVar2, LVar3) - EVT_CALL(InterpPlayerYaw, LVar4, 0) - EVT_CALL(PlaySound, SOUND_ENTER_PIPE) - EVT_CALL(SetPlayerImgFXFlags, IMGFX_FLAG_REVERSE_ANIM) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Still, IMGFX_SET_ANIM, IMGFX_ANIM_VERTICAL_PIPE_CURL, 1, 1, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_LOOP(40) - EVT_ADD(LVar1, 1) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(3) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_THREAD - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 3) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_INVISIBLE, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(EnableNpcShadow, NPC_PARTNER, TRUE) - EVT_END_THREAD - EVT_END_IF - EVT_WAIT(2) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Still, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(HidePlayerShadow, FALSE) - EVT_LABEL(0) - EVT_CALL(N(Pipe_GetCurrentFloor)) - EVT_WAIT(1) - EVT_IF_NE(LVar0, -1) - EVT_GOTO(0) - EVT_END_IF - EVT_EXEC(LVarA) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Call(HidePlayerShadow, TRUE) + Call(SetPlayerAnimation, ANIM_Mario1_Still) + Call(GetCurrentPartnerID, LVar0) + IfNe(LVar0, PARTNER_NONE) + Call(EnableNpcShadow, NPC_PARTNER, FALSE) + Call(SetNpcPos, NPC_PARTNER, NPC_DISPOSE_LOCATION) + EndIf + Call(GetEntryID, LVar0) + Call(N(Pipe_GetEntryPos)) + Sub(LVar2, 40) + Call(SetPlayerPos, LVar1, LVar2, LVar3) + Call(InterpPlayerYaw, LVar4, 0) + Call(PlaySound, SOUND_ENTER_PIPE) + Call(SetPlayerImgFXFlags, IMGFX_FLAG_REVERSE_ANIM) + Call(UpdatePlayerImgFX, ANIM_Mario1_Still, IMGFX_SET_ANIM, IMGFX_ANIM_VERTICAL_PIPE_CURL, 1, 1, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Loop(40) + Add(LVar1, 1) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Wait(3) + Call(GetCurrentPartnerID, LVar0) + IfNe(LVar0, PARTNER_NONE) + Thread + Call(DisablePartnerAI, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar2, 3) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_INVISIBLE, FALSE) + Call(EnablePartnerAI) + Call(EnableNpcShadow, NPC_PARTNER, TRUE) + EndThread + EndIf + Wait(2) + Call(UpdatePlayerImgFX, ANIM_Mario1_Still, IMGFX_CLEAR, 0, 0, 0, 0) + Wait(1) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Call(HidePlayerShadow, FALSE) + Label(0) + Call(N(Pipe_GetCurrentFloor)) + Wait(1) + IfNe(LVar0, -1) + Goto(0) + EndIf + Exec(LVarA) + Return + End }; EvtScript N(EVS_Pipe_EnterHorizontal) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVarB, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(GetEntryID, LVar0) - EVT_CALL(N(Pipe_GetEntryPos)) - EVT_SET(LVar5, LVar1) - EVT_SET(LVar6, LVar2) - EVT_SET(LVar7, LVar3) - EVT_ADD(LVar2, 2) - EVT_CALL(SetPlayerPos, LVar1, LVar2, LVar3) - EVT_CALL(InterpPlayerYaw, LVar4, 0) - EVT_IF_EQ(LVar4, 90) - EVT_ADD(LVar5, 40) - EVT_ELSE - EVT_SUB(LVar5, 40) - EVT_END_IF - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar5, LVar6, LVar7) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar5, LVar6, LVar7) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(EnableNpcShadow, NPC_PARTNER, FALSE) - EVT_CALL(SetNpcPos, NPC_PARTNER, NPC_DISPOSE_LOCATION) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, LVar0, 0) - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(PlaySound, SOUND_ENTER_PIPE) - EVT_THREAD - EVT_WAIT(25) - EVT_CALL(HidePlayerShadow, FALSE) - EVT_END_THREAD - EVT_CALL(SetPlayerImgFXFlags, IMGFX_FLAG_REVERSE_ANIM | IMGFX_FLAG_800) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_HORIZONTAL_PIPE_CURL, 1, 1, 0) - EVT_LOOP(40) - EVT_CALL(N(Pipe_GetPointAheadOfPlayer), EVT_FLOAT(1.0)) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 3) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(EnableNpcShadow, NPC_PARTNER, TRUE) - EVT_CALL(EnablePartnerAI) - EVT_END_THREAD - EVT_END_IF - EVT_WAIT(5) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) - EVT_CALL(ModifyColliderFlags, 1, LVarB, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_EXEC(LVarA) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(HidePlayerShadow, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVarB, COLLIDER_FLAGS_UPPER_MASK) + Call(GetEntryID, LVar0) + Call(N(Pipe_GetEntryPos)) + Set(LVar5, LVar1) + Set(LVar6, LVar2) + Set(LVar7, LVar3) + Add(LVar2, 2) + Call(SetPlayerPos, LVar1, LVar2, LVar3) + Call(InterpPlayerYaw, LVar4, 0) + IfEq(LVar4, 90) + Add(LVar5, 40) + Else + Sub(LVar5, 40) + EndIf + Call(UseSettingsFrom, CAM_DEFAULT, LVar5, LVar6, LVar7) + Call(SetPanTarget, CAM_DEFAULT, LVar5, LVar6, LVar7) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(GetCurrentPartnerID, LVar0) + IfNe(LVar0, PARTNER_NONE) + Call(DisablePartnerAI, 0) + Call(EnableNpcShadow, NPC_PARTNER, FALSE) + Call(SetNpcPos, NPC_PARTNER, NPC_DISPOSE_LOCATION) + Call(InterpNpcYaw, NPC_PARTNER, LVar0, 0) + EndIf + Wait(1) + Call(PlaySound, SOUND_ENTER_PIPE) + Thread + Wait(25) + Call(HidePlayerShadow, FALSE) + EndThread + Call(SetPlayerImgFXFlags, IMGFX_FLAG_REVERSE_ANIM | IMGFX_FLAG_800) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_HORIZONTAL_PIPE_CURL, 1, 1, 0) + Loop(40) + Call(N(Pipe_GetPointAheadOfPlayer), Float(1.0)) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Call(GetCurrentPartnerID, LVar0) + IfNe(LVar0, PARTNER_NONE) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar2, 3) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(EnableNpcShadow, NPC_PARTNER, TRUE) + Call(EnablePartnerAI) + EndThread + EndIf + Wait(5) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_CLEAR, 0, 0, 0, 0) + Call(ModifyColliderFlags, 1, LVarB, COLLIDER_FLAGS_UPPER_MASK) + Call(DisablePlayerInput, FALSE) + Call(DisablePlayerPhysics, FALSE) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Exec(LVarA) + Return + End }; EvtScript N(EVS_Pipe_ExitVertical) = { - EVT_CALL(N(Pipe_AwaitDownInput)) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(GetCurrentPartnerID, LVar1) - EVT_IF_NE(LVar1, PARTNER_WATT) - EVT_RETURN - EVT_ELSE - EVT_CALL(InterruptUsePartner) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_END_IF - EVT_ELSE - EVT_CALL(DisablePlayerInput, TRUE) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_Pipe_ExitVertical_Impl)) - EVT_RETURN - EVT_END + Call(N(Pipe_AwaitDownInput)) + IfEq(LVar0, 0) + Return + EndIf + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, PARTNER_NONE) + Call(GetCurrentPartnerID, LVar1) + IfNe(LVar1, PARTNER_WATT) + Return + Else + Call(InterruptUsePartner) + Call(DisablePlayerInput, TRUE) + EndIf + Else + Call(DisablePlayerInput, TRUE) + EndIf + ExecWait(N(EVS_Pipe_ExitVertical_Impl)) + Return + End }; EvtScript N(EVS_Pipe_ExitVertical_Impl) = { - EVT_CALL(N(Pipe_SetAnimFlag)) - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_SET(LVar0, LVarA) - EVT_CALL(N(Pipe_GetEntryPos)) - EVT_CALL(PlayerMoveTo, LVar1, LVar3, 3) - EVT_SET(LVar0, LVarA) - EVT_CALL(N(Pipe_GetEntryPos)) - EVT_CALL(SetPlayerPos, LVar1, LVar2, LVar3) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, TRUE) - EVT_CALL(N(Pipe_GetCameraYaw)) - EVT_CALL(InterpPlayerYaw, LVar0, 0) - EVT_WAIT(2) - EVT_CALL(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, FALSE) - EVT_CALL(PlaySound, SOUND_ENTER_PIPE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_THREAD - EVT_WAIT(4) - EVT_LOOP(40) - EVT_SUB(LVar1, 1) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetPlayerImgFXFlags, IMGFX_FLAG_800) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_VERTICAL_PIPE_CURL, 1, 1, 0) - EVT_WAIT(25) - EVT_EXEC_WAIT(LVarC) - EVT_RETURN - EVT_END + Call(N(Pipe_SetAnimFlag)) + SetGroup(EVT_GROUP_1B) + Call(DisablePlayerPhysics, TRUE) + Call(HidePlayerShadow, TRUE) + Set(LVar0, LVarA) + Call(N(Pipe_GetEntryPos)) + Call(PlayerMoveTo, LVar1, LVar3, 3) + Set(LVar0, LVarA) + Call(N(Pipe_GetEntryPos)) + Call(SetPlayerPos, LVar1, LVar2, LVar3) + Call(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, TRUE) + Call(N(Pipe_GetCameraYaw)) + Call(InterpPlayerYaw, LVar0, 0) + Wait(2) + Call(SetPlayerFlagBits, PS_FLAG_NO_FLIPPING, FALSE) + Call(PlaySound, SOUND_ENTER_PIPE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Thread + Wait(4) + Loop(40) + Sub(LVar1, 1) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + Call(SetPlayerImgFXFlags, IMGFX_FLAG_800) + Call(UpdatePlayerImgFX, ANIM_Mario1_Idle, IMGFX_SET_ANIM, IMGFX_ANIM_VERTICAL_PIPE_CURL, 1, 1, 0) + Wait(25) + ExecWait(LVarC) + Return + End }; EvtScript N(EVS_Pipe_ExitHorizontal) = { - EVT_CALL(IsPlayerOnValidFloor, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPlayerActionState, LVar0) - EVT_IF_EQ(LVar0, ACTION_STATE_SPIN) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(GetCurrentPartnerID, LVar1) - EVT_IF_NE(LVar1, PARTNER_WATT) - EVT_RETURN - EVT_ELSE - EVT_CALL(InterruptUsePartner) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_END_IF - EVT_ELSE - EVT_CALL(DisablePlayerInput, TRUE) - EVT_END_IF - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(N(Pipe_SetAnimFlag)) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVarB, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, LVarA) - EVT_CALL(N(Pipe_GetEntryPos)) - EVT_SET(LVar5, LVar1) - EVT_SET(LVar6, LVar2) - EVT_ADD(LVar6, 2) - EVT_SET(LVar7, LVar3) - EVT_SET(LVar8, LVar4) - EVT_ADD(LVar8, 180) - EVT_IF_GE(LVar4, 360) - EVT_SUB(LVar4, 360) - EVT_END_IF - EVT_CALL(InterpPlayerYaw, LVar8, 1) - EVT_WAIT(1) - EVT_CALL(PlaySound, SOUND_ENTER_PIPE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerPos, LVar0, LVar6, LVar7) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Still) - EVT_CALL(SetPlayerImgFXFlags, IMGFX_FLAG_800) - EVT_CALL(UpdatePlayerImgFX, ANIM_Mario1_Still, IMGFX_SET_ANIM, IMGFX_ANIM_HORIZONTAL_PIPE_CURL, 1, 1, 0) - EVT_THREAD - EVT_WAIT(8) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(3) - EVT_LOOP(40) - EVT_CALL(N(Pipe_GetPointAheadOfPlayer), EVT_FLOAT(1.0)) - EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(25) - EVT_EXEC_WAIT(LVarC) - EVT_RETURN - EVT_END + Call(IsPlayerOnValidFloor, LVar0) + IfEq(LVar0, FALSE) + Return + EndIf + Call(GetPlayerActionState, LVar0) + IfEq(LVar0, ACTION_STATE_SPIN) + Return + EndIf + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, PARTNER_NONE) + Call(GetCurrentPartnerID, LVar1) + IfNe(LVar1, PARTNER_WATT) + Return + Else + Call(InterruptUsePartner) + Call(DisablePlayerInput, TRUE) + EndIf + Else + Call(DisablePlayerInput, TRUE) + EndIf + SetGroup(EVT_GROUP_1B) + Call(N(Pipe_SetAnimFlag)) + Call(DisablePlayerPhysics, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, LVarB, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, LVarA) + Call(N(Pipe_GetEntryPos)) + Set(LVar5, LVar1) + Set(LVar6, LVar2) + Add(LVar6, 2) + Set(LVar7, LVar3) + Set(LVar8, LVar4) + Add(LVar8, 180) + IfGe(LVar4, 360) + Sub(LVar4, 360) + EndIf + Call(InterpPlayerYaw, LVar8, 1) + Wait(1) + Call(PlaySound, SOUND_ENTER_PIPE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerPos, LVar0, LVar6, LVar7) + Call(SetPlayerAnimation, ANIM_Mario1_Still) + Call(SetPlayerImgFXFlags, IMGFX_FLAG_800) + Call(UpdatePlayerImgFX, ANIM_Mario1_Still, IMGFX_SET_ANIM, IMGFX_ANIM_HORIZONTAL_PIPE_CURL, 1, 1, 0) + Thread + Wait(8) + Call(HidePlayerShadow, TRUE) + EndThread + Thread + Wait(3) + Loop(40) + Call(N(Pipe_GetPointAheadOfPlayer), Float(1.0)) + Call(SetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndThread + Wait(25) + ExecWait(LVarC) + Return + End }; diff --git a/src/world/common/entity/SuperBlock.inc.c b/src/world/common/entity/SuperBlock.inc.c index 0808b2e1804..f233ea18d8b 100644 --- a/src/world/common/entity/SuperBlock.inc.c +++ b/src/world/common/entity/SuperBlock.inc.c @@ -22,10 +22,10 @@ // use this in an EvtScript calling MakeEntity for this super block // expects SUPER_BLOCK_GAMEFLAG and SUPER_BLOCK_MAPVAR to be valid #define EVT_MAKE_SUPER_BLOCK(x, y, z, angle) \ - EVT_CALL(MakeEntity, EVT_PTR(Entity_SuperBlock), x, y, z, angle, MAKE_ENTITY_END)\ - EVT_SET(SUPER_BLOCK_MAPVAR, LVar0)\ - EVT_CALL(AssignBlockFlag, SUPER_BLOCK_GAMEFLAG)\ - EVT_CALL(AssignScript, EVT_PTR(N(SuperBlock_OnHit))) + Call(MakeEntity, Ref(Entity_SuperBlock), x, y, z, angle, MAKE_ENTITY_END)\ + Set(SUPER_BLOCK_MAPVAR, LVar0)\ + Call(AssignBlockFlag, SUPER_BLOCK_GAMEFLAG)\ + Call(AssignScript, Ref(N(SuperBlock_OnHit))) // ---------------------------------------------------------------- // Implementation @@ -436,117 +436,117 @@ API_CALLABLE(N(SuperBlock_WaitForPlayerToLand)) { } EvtScript N(SuperBlock_ShowUpgradeEffects) = { - EVT_WAIT(10 * DT) - EVT_CALL(PlaySound, SOUND_RELEASE_ENERGY) - EVT_CALL(N(SuperBlock_GatherEnergyFX), SUPER_BLOCK_MAPVAR) - EVT_WAIT(85 * DT) - EVT_THREAD - EVT_CALL(PlaySound, SOUND_GATHER_ENERGY) - EVT_CALL(N(SuperBlock_WhiteScreenFlash), 70, 70) - EVT_WAIT(27 * DT) - EVT_CALL(PlaySound, SOUND_GROW) - EVT_CALL(N(SuperBlock_WhiteScreenFlash), 50, 50) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(3) - EVT_CALL(N(SuperBlock_HideBlockContent), SUPER_BLOCK_MAPVAR) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(47 * DT) - EVT_CALL(N(SuperBlock_RadiateFaintEnergyFX)) - EVT_CALL(N(SuperBlock_PartnerSparkles2)) - EVT_WAIT(5 * DT) - EVT_CALL(N(SuperBlock_PartnerSparkles4)) - EVT_WAIT(5 * DT) - EVT_CALL(N(SuperBlock_PartnerSparkles2)) - EVT_END_THREAD - EVT_WAIT(3) - EVT_CALL(N(SuperBlock_AnimateEnergyOrbs), SUPER_BLOCK_MAPVAR) - EVT_WAIT(30 * DT) - EVT_RETURN - EVT_END + Wait(10 * DT) + Call(PlaySound, SOUND_RELEASE_ENERGY) + Call(N(SuperBlock_GatherEnergyFX), SUPER_BLOCK_MAPVAR) + Wait(85 * DT) + Thread + Call(PlaySound, SOUND_GATHER_ENERGY) + Call(N(SuperBlock_WhiteScreenFlash), 70, 70) + Wait(27 * DT) + Call(PlaySound, SOUND_GROW) + Call(N(SuperBlock_WhiteScreenFlash), 50, 50) + EndThread + Thread + Wait(3) + Call(N(SuperBlock_HideBlockContent), SUPER_BLOCK_MAPVAR) + EndThread + Thread + Wait(47 * DT) + Call(N(SuperBlock_RadiateFaintEnergyFX)) + Call(N(SuperBlock_PartnerSparkles2)) + Wait(5 * DT) + Call(N(SuperBlock_PartnerSparkles4)) + Wait(5 * DT) + Call(N(SuperBlock_PartnerSparkles2)) + EndThread + Wait(3) + Call(N(SuperBlock_AnimateEnergyOrbs), SUPER_BLOCK_MAPVAR) + Wait(30 * DT) + Return + End }; EvtScript N(SuperBlock_OnHit) = { - EVT_IF_EQ(SUPER_BLOCK_GAMEFLAG, 1) - EVT_RETURN - EVT_END_IF - EVT_CALL(IsStartingConversation, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_RETURN - EVT_END_IF - EVT_CALL(N(SuperBlock_WaitForPlayerToLand)) - EVT_IF_EQ(LVar0, 1) - EVT_RETURN - EVT_END_IF - EVT_CALL(ModifyGlobalOverrideFlags, 1, GLOBAL_OVERRIDES_CANT_PICK_UP_ITEMS) - EVT_CALL(N(SuperBlock_SetOverride40)) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(N(SuperBlock_StartGlowEffect), SUPER_BLOCK_MAPVAR, LVar9) - EVT_CALL(FindKeyItem, ITEM_ULTRA_STONE, LVarC) - EVT_CALL(N(SuperBlock_CountEligiblePartners)) - EVT_IF_EQ(LVar0, -1) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00DC, 160, 40) - EVT_WAIT(10) - EVT_CALL(N(SuperBlock_EndGlowEffect), LVar9) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(ModifyGlobalOverrideFlags, 0, GLOBAL_OVERRIDES_CANT_PICK_UP_ITEMS) - EVT_CALL(N(SuperBlock_ClearOverride40)) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GF_Tutorial_SuperBlock, 0) - EVT_SET(GF_Tutorial_SuperBlock, 1) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00DA, 160, 40) - EVT_ELSE - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00DB, 160, 40) - EVT_END_IF - EVT_CALL(N(SuperBlock_ShowSelectPartnerMenu)) - EVT_IF_EQ(LVar0, -1) - EVT_CALL(N(SuperBlock_EndGlowEffect), LVar9) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(ModifyGlobalOverrideFlags, 0, GLOBAL_OVERRIDES_CANT_PICK_UP_ITEMS) - EVT_CALL(N(SuperBlock_ClearOverride40)) - EVT_RETURN - EVT_END_IF - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_CALL(EnablePartnerAI) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_NE(LVar0, LVarB) - EVT_CALL(N(SuperBlock_SwitchToPartner), LVarB) - EVT_ELSE - EVT_CALL(func_802CF56C, 2) - EVT_END_IF - EVT_WAIT(10 * DT) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00DF, 160, 40) - EVT_CALL(ShowChoice, MSG_Choice_000D) - EVT_CALL(CloseMessage) - EVT_IF_NE(LVar0, 0) - EVT_CALL(N(SuperBlock_EndGlowEffect), LVar9) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(ModifyGlobalOverrideFlags, 0, GLOBAL_OVERRIDES_CANT_PICK_UP_ITEMS) - EVT_CALL(N(SuperBlock_ClearOverride40)) - EVT_RETURN - EVT_END_IF - EVT_EXEC_WAIT(N(SuperBlock_ShowUpgradeEffects)) - EVT_CALL(N(SuperBlock_GetPartnerRank), LVarB, LVarD) - EVT_SET(SUPER_BLOCK_GAMEFLAG, 1) - EVT_CALL(N(SuperBlock_EndGlowEffect), LVar9) - EVT_CALL(N(SuperBlock_LoadCurrentPartnerName)) - EVT_IF_EQ(LVarD, 1) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00DD, 160, 40) - EVT_ELSE - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00DE, 160, 40) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(ModifyGlobalOverrideFlags, 0, GLOBAL_OVERRIDES_CANT_PICK_UP_ITEMS) - EVT_CALL(N(SuperBlock_ClearOverride40)) - EVT_RETURN - EVT_END + IfEq(SUPER_BLOCK_GAMEFLAG, 1) + Return + EndIf + Call(IsStartingConversation, LVar0) + IfEq(LVar0, 1) + Return + EndIf + Call(N(SuperBlock_WaitForPlayerToLand)) + IfEq(LVar0, 1) + Return + EndIf + Call(ModifyGlobalOverrideFlags, 1, GLOBAL_OVERRIDES_CANT_PICK_UP_ITEMS) + Call(N(SuperBlock_SetOverride40)) + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(N(SuperBlock_StartGlowEffect), SUPER_BLOCK_MAPVAR, LVar9) + Call(FindKeyItem, ITEM_ULTRA_STONE, LVarC) + Call(N(SuperBlock_CountEligiblePartners)) + IfEq(LVar0, -1) + Call(ShowMessageAtScreenPos, MSG_Menus_00DC, 160, 40) + Wait(10) + Call(N(SuperBlock_EndGlowEffect), LVar9) + Call(DisablePlayerInput, FALSE) + Call(EnablePartnerAI) + Call(ModifyGlobalOverrideFlags, 0, GLOBAL_OVERRIDES_CANT_PICK_UP_ITEMS) + Call(N(SuperBlock_ClearOverride40)) + Return + EndIf + IfEq(GF_Tutorial_SuperBlock, 0) + Set(GF_Tutorial_SuperBlock, 1) + Call(ShowMessageAtScreenPos, MSG_Menus_00DA, 160, 40) + Else + Call(ShowMessageAtScreenPos, MSG_Menus_00DB, 160, 40) + EndIf + Call(N(SuperBlock_ShowSelectPartnerMenu)) + IfEq(LVar0, -1) + Call(N(SuperBlock_EndGlowEffect), LVar9) + Call(DisablePlayerInput, FALSE) + Call(EnablePartnerAI) + Call(ModifyGlobalOverrideFlags, 0, GLOBAL_OVERRIDES_CANT_PICK_UP_ITEMS) + Call(N(SuperBlock_ClearOverride40)) + Return + EndIf + Set(LVarA, LVar0) + Set(LVarB, LVar1) + Call(EnablePartnerAI) + Call(GetCurrentPartnerID, LVar0) + IfNe(LVar0, LVarB) + Call(N(SuperBlock_SwitchToPartner), LVarB) + Else + Call(func_802CF56C, 2) + EndIf + Wait(10 * DT) + Call(ShowMessageAtScreenPos, MSG_Menus_00DF, 160, 40) + Call(ShowChoice, MSG_Choice_000D) + Call(CloseMessage) + IfNe(LVar0, 0) + Call(N(SuperBlock_EndGlowEffect), LVar9) + Call(DisablePlayerInput, FALSE) + Call(EnablePartnerAI) + Call(ModifyGlobalOverrideFlags, 0, GLOBAL_OVERRIDES_CANT_PICK_UP_ITEMS) + Call(N(SuperBlock_ClearOverride40)) + Return + EndIf + ExecWait(N(SuperBlock_ShowUpgradeEffects)) + Call(N(SuperBlock_GetPartnerRank), LVarB, LVarD) + Set(SUPER_BLOCK_GAMEFLAG, 1) + Call(N(SuperBlock_EndGlowEffect), LVar9) + Call(N(SuperBlock_LoadCurrentPartnerName)) + IfEq(LVarD, 1) + Call(ShowMessageAtScreenPos, MSG_Menus_00DD, 160, 40) + Else + Call(ShowMessageAtScreenPos, MSG_Menus_00DE, 160, 40) + EndIf + Call(DisablePlayerInput, FALSE) + Call(EnablePartnerAI) + Call(ModifyGlobalOverrideFlags, 0, GLOBAL_OVERRIDES_CANT_PICK_UP_ITEMS) + Call(N(SuperBlock_ClearOverride40)) + Return + End }; diff --git a/src/world/common/npc/Boo_Patrol.inc.c b/src/world/common/npc/Boo_Patrol.inc.c index bd5ecf460c4..94605a0b0d3 100644 --- a/src/world/common/npc/Boo_Patrol.inc.c +++ b/src/world/common/npc/Boo_Patrol.inc.c @@ -110,9 +110,9 @@ MobileAISettings N(AISettings_Boo_Patrol) = { }; EvtScript N(EVS_NpcAI_Boo_Patrol) = { - EVT_CALL(N(BooPatrolAI_Main), EVT_PTR(N(AISettings_Boo_Patrol))) - EVT_RETURN - EVT_END + Call(N(BooPatrolAI_Main), Ref(N(AISettings_Boo_Patrol))) + Return + End }; NpcSettings N(NpcSettings_Boo_Patrol) = { diff --git a/src/world/common/npc/Boo_Wander.inc.c b/src/world/common/npc/Boo_Wander.inc.c index 10a27fe6784..0e89f0da6f6 100644 --- a/src/world/common/npc/Boo_Wander.inc.c +++ b/src/world/common/npc/Boo_Wander.inc.c @@ -9,9 +9,9 @@ MobileAISettings N(AISettings_BooWander) = { }; EvtScript N(EVS_NpcAI_Boo_Wander) = { - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_BooWander))) - EVT_RETURN - EVT_END + Call(BasicAI_Main, Ref(N(AISettings_BooWander))) + Return + End }; NpcSettings N(NpcSettings_Boo_Wander) = { diff --git a/src/world/common/npc/Bubulb.inc.c b/src/world/common/npc/Bubulb.inc.c index 301577c45fe..2407b79d12b 100644 --- a/src/world/common/npc/Bubulb.inc.c +++ b/src/world/common/npc/Bubulb.inc.c @@ -2,8 +2,8 @@ #include "Bubulb.h" EvtScript N(EVS_NpcAuxAI_Bubulb) = { - EVT_RETURN - EVT_END + Return + End }; NpcSettings N(NpcSettings_Bubulb) = { diff --git a/src/world/common/npc/Bubulb_Patrol.inc.c b/src/world/common/npc/Bubulb_Patrol.inc.c index 0676b2ef31f..ab2092fec1e 100644 --- a/src/world/common/npc/Bubulb_Patrol.inc.c +++ b/src/world/common/npc/Bubulb_Patrol.inc.c @@ -12,9 +12,9 @@ MobileAISettings N(AISettings_Bubulb_Patrol) = { }; EvtScript N(EVS_NpcAI_Bubulb_Patrol) = { - EVT_CALL(N(PatrolNoAttackAI_Main), EVT_PTR(N(AISettings_Bubulb_Patrol))) - EVT_RETURN - EVT_END + Call(N(PatrolNoAttackAI_Main), Ref(N(AISettings_Bubulb_Patrol))) + Return + End }; NpcSettings N(NpcSettings_Bubulb_Patrol) = { diff --git a/src/world/common/npc/Dryite_Patrol.inc.c b/src/world/common/npc/Dryite_Patrol.inc.c index 7e4b6610209..627f588a1b7 100644 --- a/src/world/common/npc/Dryite_Patrol.inc.c +++ b/src/world/common/npc/Dryite_Patrol.inc.c @@ -11,9 +11,9 @@ MobileAISettings N(AISettings_Dryite_Patrol) = { }; EvtScript N(EVS_NpcAI_Dryite_Patrol) = { - EVT_CALL(N(PatrolNoAttackAI_Main), EVT_PTR(N(AISettings_Dryite_Patrol))) - EVT_RETURN - EVT_END + Call(N(PatrolNoAttackAI_Main), Ref(N(AISettings_Dryite_Patrol))) + Return + End }; NpcSettings N(NpcSettings_Dryite_Patrol) = { diff --git a/src/world/common/npc/Dryite_Wander.inc.c b/src/world/common/npc/Dryite_Wander.inc.c index 8cec3c21277..37814b0c0ba 100644 --- a/src/world/common/npc/Dryite_Wander.inc.c +++ b/src/world/common/npc/Dryite_Wander.inc.c @@ -9,9 +9,9 @@ MobileAISettings N(AISettings_Dryite_Wander) = { }; EvtScript N(EVS_NpcAI_Dryite_Wander) = { - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_Dryite_Wander))) - EVT_RETURN - EVT_END + Call(BasicAI_Main, Ref(N(AISettings_Dryite_Wander))) + Return + End }; NpcSettings N(NpcSettings_Dryite_Wander) = { diff --git a/src/world/common/npc/GoombaFamily_Wander.inc.c b/src/world/common/npc/GoombaFamily_Wander.inc.c index 9fd0c53f6aa..3a56195f4d8 100644 --- a/src/world/common/npc/GoombaFamily_Wander.inc.c +++ b/src/world/common/npc/GoombaFamily_Wander.inc.c @@ -9,9 +9,9 @@ MobileAISettings N(AISettings_GoombaFamily_Wander) = { }; EvtScript N(EVS_NpcAI_GoombaFamily_Wander) = { - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_GoombaFamily_Wander))) - EVT_RETURN - EVT_END + Call(BasicAI_Main, Ref(N(AISettings_GoombaFamily_Wander))) + Return + End }; NpcSettings N(NpcSettings_GoombaFamily_Wander) = { diff --git a/src/world/common/npc/KoopaWithoutShell_Patrol.inc.c b/src/world/common/npc/KoopaWithoutShell_Patrol.inc.c index 728855dafbc..84b05c345bf 100644 --- a/src/world/common/npc/KoopaWithoutShell_Patrol.inc.c +++ b/src/world/common/npc/KoopaWithoutShell_Patrol.inc.c @@ -12,9 +12,9 @@ MobileAISettings N(AISettings_KoopaWithoutShell_Patrol) = { }; EvtScript N(EVS_NpcAI_KoopaWithoutShell_Patrol) = { - EVT_CALL(N(PatrolNoAttackAI_Main), EVT_PTR(N(AISettings_KoopaWithoutShell_Patrol))) - EVT_RETURN - EVT_END + Call(N(PatrolNoAttackAI_Main), Ref(N(AISettings_KoopaWithoutShell_Patrol))) + Return + End }; NpcSettings N(NpcSettings_KoopaWithoutShell_Patrol) = { diff --git a/src/world/common/npc/KoopaWithoutShell_Wander.inc.c b/src/world/common/npc/KoopaWithoutShell_Wander.inc.c index 6218961ef24..6758b30ca61 100644 --- a/src/world/common/npc/KoopaWithoutShell_Wander.inc.c +++ b/src/world/common/npc/KoopaWithoutShell_Wander.inc.c @@ -10,9 +10,9 @@ MobileAISettings N(AISettings_KoopaWithoutShell_Wander) = { }; EvtScript N(EVS_NpcAI_KoopaWithoutShell_Wander) = { - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_KoopaWithoutShell_Wander))) - EVT_RETURN - EVT_END + Call(BasicAI_Main, Ref(N(AISettings_KoopaWithoutShell_Wander))) + Return + End }; NpcSettings N(NpcSettings_KoopaWithoutShell_Wander) = { diff --git a/src/world/common/npc/Koopa_Wander.inc.c b/src/world/common/npc/Koopa_Wander.inc.c index 3fb45ea51e0..61499cf8b56 100644 --- a/src/world/common/npc/Koopa_Wander.inc.c +++ b/src/world/common/npc/Koopa_Wander.inc.c @@ -10,9 +10,9 @@ MobileAISettings N(AISettings_Koopa_Wander) = { }; EvtScript N(EVS_NpcAI_Koopa_Wander) = { - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_Koopa_Wander))) - EVT_RETURN - EVT_END + Call(BasicAI_Main, Ref(N(AISettings_Koopa_Wander))) + Return + End }; NpcSettings N(NpcSettings_Koopa_Wander) = { diff --git a/src/world/common/npc/Merlar.inc.c b/src/world/common/npc/Merlar.inc.c index 8ccd4fe2778..f5cd221a420 100644 --- a/src/world/common/npc/Merlar.inc.c +++ b/src/world/common/npc/Merlar.inc.c @@ -14,8 +14,8 @@ API_CALLABLE(N(AddMerlarHoverMotion)) { } EvtScript N(EVS_NpcAuxAI_Merlar) = { - EVT_RETURN - EVT_END + Return + End }; NpcSettings N(NpcSettings_Merlar) = { @@ -26,12 +26,12 @@ NpcSettings N(NpcSettings_Merlar) = { }; EvtScript N(EVS_NpcAux_Merlar) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcIdle_Merlar) = { - EVT_CALL(N(AddMerlarHoverMotion)) - EVT_RETURN - EVT_END + Call(N(AddMerlarHoverMotion)) + Return + End }; diff --git a/src/world/common/npc/Penguin_Wander.inc.c b/src/world/common/npc/Penguin_Wander.inc.c index 96f228fe527..c03e73e86f7 100644 --- a/src/world/common/npc/Penguin_Wander.inc.c +++ b/src/world/common/npc/Penguin_Wander.inc.c @@ -10,9 +10,9 @@ MobileAISettings N(AISettings_Penguin_Wander) = { }; EvtScript N(EVS_NpcAI_Penguin_Wander) = { - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_Penguin_Wander))) - EVT_RETURN - EVT_END + Call(BasicAI_Main, Ref(N(AISettings_Penguin_Wander))) + Return + End }; NpcSettings N(NpcSettings_Penguin_Wander) = { diff --git a/src/world/common/npc/RaphaelRaven.inc.c b/src/world/common/npc/RaphaelRaven.inc.c index af8ae7010af..e53cc360ccb 100644 --- a/src/world/common/npc/RaphaelRaven.inc.c +++ b/src/world/common/npc/RaphaelRaven.inc.c @@ -1,9 +1,9 @@ #include "RaphaelRaven.h" EvtScript N(EVS_NpcAuxAI_RaphaelRaven) = { - EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(1.5), EVT_FLOAT(1.5), EVT_FLOAT(1.5)) - EVT_RETURN - EVT_END + Call(SetNpcScale, NPC_SELF, Float(1.5), Float(1.5), Float(1.5)) + Return + End }; NpcSettings N(NpcSettings_RaphaelRaven) = { diff --git a/src/world/common/npc/StarRod.inc.c b/src/world/common/npc/StarRod.inc.c index ce1b07f1514..dd4f1cac329 100644 --- a/src/world/common/npc/StarRod.inc.c +++ b/src/world/common/npc/StarRod.inc.c @@ -1,8 +1,8 @@ #include "StarRod.h" EvtScript N(EVS_NpcAuxAI_StarRod) = { - EVT_RETURN - EVT_END + Return + End }; NpcSettings N(NpcSettings_StarRod) = { diff --git a/src/world/common/npc/StarSpirit_Wander.inc.c b/src/world/common/npc/StarSpirit_Wander.inc.c index 7aa30dcb2a1..f533ab4b7b2 100644 --- a/src/world/common/npc/StarSpirit_Wander.inc.c +++ b/src/world/common/npc/StarSpirit_Wander.inc.c @@ -11,13 +11,13 @@ MobileAISettings N(AISettings_StarSpirit_Wander) = { }; EvtScript N(EVS_NpcAI_StarSpirit_Wander) = { - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(SetSelfVar, 5, 0) - EVT_CALL(SetSelfVar, 6, 0) - EVT_CALL(SetSelfVar, 1, 200) - EVT_CALL(N(FlyingAI_Main), EVT_PTR(N(AISettings_StarSpirit_Wander))) - EVT_RETURN - EVT_END + Call(SetSelfVar, 0, 0) + Call(SetSelfVar, 5, 0) + Call(SetSelfVar, 6, 0) + Call(SetSelfVar, 1, 200) + Call(N(FlyingAI_Main), Ref(N(AISettings_StarSpirit_Wander))) + Return + End }; NpcSettings N(NpcSettings_StarSpirit_Wander) = { diff --git a/src/world/common/npc/Toad_Guard.inc.c b/src/world/common/npc/Toad_Guard.inc.c index 4dd31dc60a5..0f6cc28479f 100644 --- a/src/world/common/npc/Toad_Guard.inc.c +++ b/src/world/common/npc/Toad_Guard.inc.c @@ -9,9 +9,9 @@ GuardAISettings N(AISettings_Toad_Guard) = { }; EvtScript N(EVS_NpcAI_Toad_Guard) = { - EVT_CALL(N(GuardAI_Main), EVT_PTR(N(AISettings_Toad_Guard))) - EVT_RETURN - EVT_END + Call(N(GuardAI_Main), Ref(N(AISettings_Toad_Guard))) + Return + End }; NpcSettings N(NpcSettings_Toad_Guard) = { diff --git a/src/world/common/npc/Toad_Patrol.inc.c b/src/world/common/npc/Toad_Patrol.inc.c index 74eed23e7e6..887f96970d8 100644 --- a/src/world/common/npc/Toad_Patrol.inc.c +++ b/src/world/common/npc/Toad_Patrol.inc.c @@ -11,9 +11,9 @@ MobileAISettings N(AISettings_Toad_Patrol) = { }; EvtScript N(EVS_NpcAI_Toad_Patrol) = { - EVT_CALL(N(PatrolNoAttackAI_Main), EVT_PTR(N(AISettings_Toad_Patrol))) - EVT_RETURN - EVT_END + Call(N(PatrolNoAttackAI_Main), Ref(N(AISettings_Toad_Patrol))) + Return + End }; NpcSettings N(NpcSettings_Toad_Patrol) = { diff --git a/src/world/common/npc/Toad_Wander.inc.c b/src/world/common/npc/Toad_Wander.inc.c index a276ac2880f..67e16d788d6 100644 --- a/src/world/common/npc/Toad_Wander.inc.c +++ b/src/world/common/npc/Toad_Wander.inc.c @@ -9,9 +9,9 @@ MobileAISettings N(AISettings_Toad_Wander) = { }; EvtScript N(EVS_NpcAI_Toad_Wander) = { - EVT_CALL(BasicAI_Main, EVT_PTR(N(AISettings_Toad_Wander))) - EVT_RETURN - EVT_END + Call(BasicAI_Main, Ref(N(AISettings_Toad_Wander))) + Return + End }; NpcSettings N(NpcSettings_Toad_Wander) = { diff --git a/src/world/common/npc/TrainToad.inc.c b/src/world/common/npc/TrainToad.inc.c index bb5327b818e..251e682d3f0 100644 --- a/src/world/common/npc/TrainToad.inc.c +++ b/src/world/common/npc/TrainToad.inc.c @@ -1,8 +1,8 @@ #include "TrainToad.h" EvtScript N(EVS_NpcAuxAI_TrainToad) = { - EVT_RETURN - EVT_END + Return + End }; NpcSettings N(NpcSettings_TrainToad) = { diff --git a/src/world/common/npc/TubbasHeart.inc.c b/src/world/common/npc/TubbasHeart.inc.c index 1f0d409a873..fc8725c9f10 100644 --- a/src/world/common/npc/TubbasHeart.inc.c +++ b/src/world/common/npc/TubbasHeart.inc.c @@ -1,13 +1,13 @@ #include "TubbasHeart.h" EvtScript N(EVS_NpcAuxAI_TubbasHeart) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcDefeat_TubbasHeart) = { - EVT_RETURN - EVT_END + Return + End }; NpcSettings N(NpcSettings_TubbasHeart) = { diff --git a/src/world/common/npc/YoshiKid_Patrol.inc.c b/src/world/common/npc/YoshiKid_Patrol.inc.c index d27142de372..a382a39af66 100644 --- a/src/world/common/npc/YoshiKid_Patrol.inc.c +++ b/src/world/common/npc/YoshiKid_Patrol.inc.c @@ -11,9 +11,9 @@ MobileAISettings N(AISettings_YoshiKid_Patrol) = { }; EvtScript N(EVS_NpcAI_YoshiKid_Patrol) = { - EVT_CALL(N(PatrolNoAttackAI_Main), EVT_PTR(N(AISettings_YoshiKid_Patrol))) - EVT_RETURN - EVT_END + Call(N(PatrolNoAttackAI_Main), Ref(N(AISettings_YoshiKid_Patrol))) + Return + End }; NpcSettings N(NpcSettings_YoshiKid_Patrol) = { diff --git a/src/world/common/npc/Yoshi_Patrol.inc.c b/src/world/common/npc/Yoshi_Patrol.inc.c index 8e3637c0d78..1035e2729e8 100644 --- a/src/world/common/npc/Yoshi_Patrol.inc.c +++ b/src/world/common/npc/Yoshi_Patrol.inc.c @@ -11,9 +11,9 @@ MobileAISettings N(AISettings_Yoshi_Patrol) = { }; EvtScript N(EVS_NpcAI_Yoshi_Patrol) = { - EVT_CALL(N(PatrolNoAttackAI_Main), EVT_PTR(N(AISettings_Yoshi_Patrol))) - EVT_RETURN - EVT_END + Call(N(PatrolNoAttackAI_Main), Ref(N(AISettings_Yoshi_Patrol))) + Return + End }; NpcSettings N(NpcSettings_Yoshi_Patrol) = { diff --git a/src/world/common/todo/StarSpiritEffectFunc.inc.c b/src/world/common/todo/StarSpiritEffectFunc.inc.c index 119d86388b5..fa890d405ed 100644 --- a/src/world/common/todo/StarSpiritEffectFunc.inc.c +++ b/src/world/common/todo/StarSpiritEffectFunc.inc.c @@ -8,13 +8,13 @@ // seems to be a macro in the original based on usage #define EVT_SPIRIT_ADJUST_CAM(pitch) \ - EVT_CALL(GetCamDistance, CAM_DEFAULT, LVar1) \ - EVT_SUB(LVar1, 100) \ - EVT_CALL(SetCamDistance, CAM_DEFAULT, LVar1) \ - EVT_IF_NE(pitch, 10000) \ - EVT_CALL(GetCamPitch, CAM_DEFAULT, LVar2, LVar3) \ - EVT_CALL(SetCamPitch, CAM_DEFAULT, LVar2, pitch) \ - EVT_END_IF + Call(GetCamDistance, CAM_DEFAULT, LVar1) \ + Sub(LVar1, 100) \ + Call(SetCamDistance, CAM_DEFAULT, LVar1) \ + IfNe(pitch, 10000) \ + Call(GetCamPitch, CAM_DEFAULT, LVar2, LVar3) \ + Call(SetCamPitch, CAM_DEFAULT, LVar2, pitch) \ + EndIf API_CALLABLE(N(StarSpiritEffectFunc1)) { StarSpiritData* ptr = script->varTablePtr[0]; diff --git a/src/world/dead/area_flo/flo_00/flo_00_1_music.c b/src/world/dead/area_flo/flo_00/flo_00_1_music.c index e85365b7c3f..0747c927406 100644 --- a/src/world/dead/area_flo/flo_00/flo_00_1_music.c +++ b/src/world/dead/area_flo/flo_00/flo_00_1_music.c @@ -1,37 +1,37 @@ #include "flo_00.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(flo_00_ENTRY_8) - EVT_IF_NE(AF_FLO_RidingBeanstalk, FALSE) - EVT_CALL(SetMusicTrack, 0, SONG_MAGIC_BEANSTALK, 1, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_IF - EVT_CASE_EQ(flo_00_ENTRY_9) - EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) - EVT_CASE_EQ(flo_00_ENTRY_A) - EVT_CALL(SetMusicTrack, 0, SONG_STAR_SPIRIT_THEME, 1, 8) - EVT_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_STAR_SPRIT_DEPARTED) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_THREAD - EVT_CASE_EQ(flo_00_ENTRY_B) - EVT_CALL(FadeInMusic, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 3000, 0, 127) - EVT_CASE_DEFAULT - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(flo_00_ENTRY_8) + IfNe(AF_FLO_RidingBeanstalk, FALSE) + Call(SetMusicTrack, 0, SONG_MAGIC_BEANSTALK, 1, 8) + Else + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndIf + CaseEq(flo_00_ENTRY_9) + Call(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) + CaseEq(flo_00_ENTRY_A) + Call(SetMusicTrack, 0, SONG_STAR_SPIRIT_THEME, 1, 8) + Thread + Loop(0) + Wait(1) + IfGe(GB_StoryProgress, STORY_CH6_STAR_SPRIT_DEPARTED) + BreakLoop + EndIf + EndLoop + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndThread + CaseEq(flo_00_ENTRY_B) + Call(FadeInMusic, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 3000, 0, 127) + CaseDefault + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndSwitch + EndSwitch + Return + End }; diff --git a/src/world/dead/area_flo/flo_00/flo_00_2_main.c b/src/world/dead/area_flo/flo_00/flo_00_2_main.c index 77761c7612a..9a5b2e36896 100644 --- a/src/world/dead/area_flo/flo_00/flo_00_2_main.c +++ b/src/world/dead/area_flo/flo_00/flo_00_2_main.c @@ -9,73 +9,73 @@ API_CALLABLE(N(SpawnSunEffect)) { } EvtScript N(EVS_Wisterwood_Exit) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlayerMoveTo, 30, -170, 10) - EVT_CALL(InterpPlayerYaw, 0, 0) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittn, SOUND_WOODEN_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, -100, 20, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g27, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(func_802D2C14, 1) - EVT_CALL(PlayerMoveTo, 0, -310, 30) - EVT_CALL(func_802D2C14, 0) - EVT_IF_EQ(GB_StoryProgress, STORY_CH6_STAR_SPRIT_DEPARTED) - EVT_SET(GB_StoryProgress, STORY_CH6_RETURNED_TO_TOAD_TOWN) - EVT_END_IF - EVT_CALL(MakeLerp, -100, 0, 30, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g27, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittn, SOUND_WOODEN_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_CALL(GotoMap, EVT_PTR("mac_01"), mac_01_ENTRY_5) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK) + Call(PlayerMoveTo, 30, -170, 10) + Call(InterpPlayerYaw, 0, 0) + Call(PlaySoundAtCollider, COLLIDER_deilittn, SOUND_WOODEN_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, -100, 20, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g27, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(func_802D2C14, 1) + Call(PlayerMoveTo, 0, -310, 30) + Call(func_802D2C14, 0) + IfEq(GB_StoryProgress, STORY_CH6_STAR_SPRIT_DEPARTED) + Set(GB_StoryProgress, STORY_CH6_RETURNED_TO_TOAD_TOWN) + EndIf + Call(MakeLerp, -100, 0, 30, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g27, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_deilittn, SOUND_WOODEN_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Call(GotoMap, Ref("mac_01"), mac_01_ENTRY_5) + Wait(100) + Return + End }; EvtScript N(EVS_Wisterwood_Enter) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(InterpPlayerYaw, 180, 0) - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittn, SOUND_WOODEN_DOOR_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeLerp, 0, -100, 30, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g27, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(func_802D2C14, 1) - EVT_CALL(PlayerMoveTo, 0, -135, 30) - EVT_CALL(func_802D2C14, 0) - EVT_CALL(MakeLerp, -100, 0, 30, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(RotateGroup, MODEL_g27, LVar0, 0, 1, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittn, SOUND_WOODEN_DOOR_CLOSE, SOUND_SPACE_DEFAULT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK) + Call(InterpPlayerYaw, 180, 0) + Call(PlaySoundAtCollider, COLLIDER_deilittn, SOUND_WOODEN_DOOR_OPEN, SOUND_SPACE_DEFAULT) + Call(MakeLerp, 0, -100, 30, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g27, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(func_802D2C14, 1) + Call(PlayerMoveTo, 0, -135, 30) + Call(func_802D2C14, 0) + Call(MakeLerp, -100, 0, 30, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(RotateGroup, MODEL_g27, LVar0, 0, 1, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(PlaySoundAtCollider, COLLIDER_deilittn, SOUND_WOODEN_DOOR_CLOSE, SOUND_SPACE_DEFAULT) + Call(DisablePlayerInput, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_ExitWalk_flo_14_0) = EVT_EXIT_WALK(60, flo_00_ENTRY_1, "flo_14", flo_14_ENTRY_0); @@ -88,132 +88,132 @@ EvtScript N(EVS_ExitWalk_flo_08_0) = EVT_EXIT_WALK(60, flo_00_ENTRY_6, "flo_08", MAP_RODATA_PAD(1, exits); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_14_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_23_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_25_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_16_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_09_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_08_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_14_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_flo_23_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_flo_25_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_flo_16_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_flo_09_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_flo_08_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0) + Return + End }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_ELSE - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, flo_00_ENTRY_8) - EVT_SET(AF_FLO_RidingBeanstalk, FALSE) - EVT_END_IF - EVT_SWITCH(LVar0) - EVT_CASE_EQ(flo_00_ENTRY_0) - EVT_THREAD - EVT_EXEC_WAIT(N(EVS_Wisterwood_Enter)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_THREAD - EVT_CASE_RANGE(flo_00_ENTRY_1, flo_00_ENTRY_6) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(flo_00_ENTRY_7) - EVT_THREAD - EVT_EXEC_WAIT(N(EVS_Scene_BeanstalkGrewRemark)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_THREAD - EVT_CASE_EQ(flo_00_ENTRY_8) - EVT_THREAD - EVT_EXEC_WAIT(N(EVS_Enter_Beanstalk)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_THREAD - EVT_CASE_EQ(flo_00_ENTRY_9) - EVT_EXEC(N(EVS_Scene_SunReturns)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(flo_00_ENTRY_A) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(flo_00_ENTRY_B) - EVT_EXEC(N(EVS_Scene_Epilogue)) - EVT_END_SWITCH - EVT_END_IF - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Interact_Wisterwood)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittn, 1, 0) - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Else + Call(GetEntryID, LVar0) + IfNe(LVar0, flo_00_ENTRY_8) + Set(AF_FLO_RidingBeanstalk, FALSE) + EndIf + Switch(LVar0) + CaseEq(flo_00_ENTRY_0) + Thread + ExecWait(N(EVS_Wisterwood_Enter)) + Exec(N(EVS_BindExitTriggers)) + EndThread + CaseRange(flo_00_ENTRY_1, flo_00_ENTRY_6) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseEq(flo_00_ENTRY_7) + Thread + ExecWait(N(EVS_Scene_BeanstalkGrewRemark)) + Exec(N(EVS_BindExitTriggers)) + EndThread + CaseEq(flo_00_ENTRY_8) + Thread + ExecWait(N(EVS_Enter_Beanstalk)) + Exec(N(EVS_BindExitTriggers)) + EndThread + CaseEq(flo_00_ENTRY_9) + Exec(N(EVS_Scene_SunReturns)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseEq(flo_00_ENTRY_A) + Exec(N(EVS_BindExitTriggers)) + CaseEq(flo_00_ENTRY_B) + Exec(N(EVS_Scene_Epilogue)) + EndSwitch + EndIf + BindTrigger(Ref(N(EVS_Interact_Wisterwood)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittn, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_SET(GF_MAP_FlowerFields, TRUE) - EVT_IF_LT(GB_StoryProgress, STORY_CH6_GREW_MAGIC_BEANSTALK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_SET(GF_MAC01_RowfBadgesChosen, FALSE) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, flo_00_ENTRY_B) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(EpilogueNPCs))) - EVT_ELSE - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(ParentColliderToModel, COLLIDER_o240, MODEL_o142) - EVT_EXEC(N(EVS_SetupBeanstalk)) - EVT_EXEC(N(EVS_SetupBeanPatch)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o129, SURFACE_TYPE_FLOWERS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o363, SURFACE_TYPE_FLOWERS) + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + Set(GF_MAP_FlowerFields, TRUE) + IfLt(GB_StoryProgress, STORY_CH6_GREW_MAGIC_BEANSTALK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Set(GF_MAC01_RowfBadgesChosen, FALSE) + Call(GetEntryID, LVar0) + IfEq(LVar0, flo_00_ENTRY_B) + Call(MakeNpcs, FALSE, Ref(N(EpilogueNPCs))) + Else + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + EndIf + ExecWait(N(EVS_MakeEntities)) + Call(ParentColliderToModel, COLLIDER_o240, MODEL_o142) + Exec(N(EVS_SetupBeanstalk)) + Exec(N(EVS_SetupBeanPatch)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o129, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o363, SURFACE_TYPE_FLOWERS) EVT_FLOWER_SPAWN_REGION( 150, -270, 410, 170, 0) EVT_FLOWER_SPAWN_REGION( 115, -450, 250, -270, 0) EVT_FLOWER_SPAWN_REGION( -330, 220, 45, 410, 0) EVT_FLOWER_SPAWN_REGION( -420, -260, -140, 160, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitse, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitne, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitsw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitnw, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_EnterMap)) - EVT_CALL(GetLoadType, LVar1) - EVT_IF_NE(LVar1, LOAD_FROM_FILE_SELECT) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, flo_00_ENTRY_A) - EVT_WAIT(65) - EVT_END_IF - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitse, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitne, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitsw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitnw, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_EnterMap)) + Call(GetLoadType, LVar1) + IfNe(LVar1, LOAD_FROM_FILE_SELECT) + Call(GetEntryID, LVar0) + IfEq(LVar0, flo_00_ENTRY_A) + Wait(65) + EndIf + EndIf + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf // thread to manage wisterwood blinking - EVT_THREAD - EVT_CALL(EnableTexPanning, MODEL_o47, TRUE) - EVT_SET(LVar0, 0) - EVT_LABEL(0) - EVT_CALL(RandInt, 300, LVar1) - EVT_ADD(LVar1, 100) - EVT_CALL(RandInt, 1, LVar2) - EVT_ADD(LVar2, 1) - EVT_WAIT(LVar1) - EVT_LOOP(LVar2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x8000, 0) - EVT_WAIT(2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x10000, 0) - EVT_WAIT(2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x18000, 0) - EVT_CALL(RandInt, 5, LVar3) - EVT_ADD(LVar3, 2) - EVT_WAIT(LVar3) - EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x10000, 0) - EVT_WAIT(2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x8000, 0) - EVT_WAIT(2) - EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, 0, 0) - EVT_CALL(RandInt, 5, LVar3) - EVT_ADD(LVar3, 2) - EVT_WAIT(LVar3) - EVT_END_LOOP - EVT_GOTO(0) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + Call(EnableTexPanning, MODEL_o47, TRUE) + Set(LVar0, 0) + Label(0) + Call(RandInt, 300, LVar1) + Add(LVar1, 100) + Call(RandInt, 1, LVar2) + Add(LVar2, 1) + Wait(LVar1) + Loop(LVar2) + Call(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x8000, 0) + Wait(2) + Call(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x10000, 0) + Wait(2) + Call(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x18000, 0) + Call(RandInt, 5, LVar3) + Add(LVar3, 2) + Wait(LVar3) + Call(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x10000, 0) + Wait(2) + Call(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x8000, 0) + Wait(2) + Call(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, 0, 0) + Call(RandInt, 5, LVar3) + Add(LVar3, 2) + Wait(LVar3) + EndLoop + Goto(0) + EndThread + Return + End }; diff --git a/src/world/dead/area_flo/flo_00/flo_00_3_npc.c b/src/world/dead/area_flo/flo_00/flo_00_3_npc.c index cba11331517..dcc93bc419f 100644 --- a/src/world/dead/area_flo/flo_00/flo_00_3_npc.c +++ b/src/world/dead/area_flo/flo_00/flo_00_3_npc.c @@ -20,603 +20,603 @@ API_CALLABLE(N(UpgradeStarPowerCh6)) { } EvtScript N(EVS_Scene_SunReturns) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 50, 0, -200) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 50, 0, -200) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 700) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(10.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -27, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -50) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_00C4, 0, 50, -200) - EVT_WAIT(10) - EVT_CALL(GotoMap, EVT_PTR("flo_07"), flo_07_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, 50, 0, -200) + Call(SetPanTarget, CAM_DEFAULT, 50, 0, -200) + Call(SetCamDistance, CAM_DEFAULT, 700) + Call(SetCamPitch, CAM_DEFAULT, Float(10.0), Float(-11.0)) + Call(SetCamPosA, CAM_DEFAULT, -27, 0) + Call(SetCamPosB, CAM_DEFAULT, 0, -50) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20) + Call(ShowMessageAtWorldPos, MSG_CH6_00C4, 0, 50, -200) + Wait(10) + Call(GotoMap, Ref("flo_07"), flo_07_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_Wisterwood_Introduction) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, -170) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, -170) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-8.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(75) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH6_0000, 160, 40) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.5)) - EVT_CALL(PlayerJump1, LVar0, LVar1, LVar2, 12) - EVT_WAIT(10) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_WAIT(15) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_WAIT(15) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 800) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-5.8)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -2, 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(15) - EVT_CALL(SpeakToPlayer, NPC_Dummy_Wisterwood, -1, -1, 5, MSG_CH6_0001) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(InterpPlayerYaw, 350, 0) - EVT_WAIT(15) - EVT_CALL(ContinueSpeech, NPC_Dummy_Wisterwood, -1, -1, 5, MSG_CH6_0002) - EVT_WAIT(10) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 333) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(9.0), EVT_FLOAT(-22.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -2, 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(EnablePartnerAI) - EVT_CALL(func_802D2C14, 1) - EVT_WAIT(10) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0003, 0, 70, -200) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(16.5), EVT_FLOAT(-11.8)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 525) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -14, 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0004, 0, 50, -200) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(9.0), EVT_FLOAT(-22.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 333) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -2, 0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0005, 0, 70, -200) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_SET(GB_StoryProgress, STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_CALL(func_802D2C14, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, -170) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, -170) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-8.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(75) + Call(ShowMessageAtScreenPos, MSG_CH6_0000, 160, 40) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetPlayerJumpscale, Float(1.5)) + Call(PlayerJump1, LVar0, LVar1, LVar2, 12) + Wait(10) + Call(DisablePartnerAI, 0) + Call(InterpPlayerYaw, 270, 0) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + Wait(15) + Call(InterpPlayerYaw, 90, 0) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + Wait(15) + Call(SetCamDistance, CAM_DEFAULT, 800) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-5.8)) + Call(SetCamPosA, CAM_DEFAULT, -2, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(15) + Call(SpeakToPlayer, NPC_Dummy_Wisterwood, -1, -1, 5, MSG_CH6_0001) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(InterpPlayerYaw, 350, 0) + Wait(15) + Call(ContinueSpeech, NPC_Dummy_Wisterwood, -1, -1, 5, MSG_CH6_0002) + Wait(10) + Call(SetCamDistance, CAM_DEFAULT, 333) + Call(SetCamPitch, CAM_DEFAULT, Float(9.0), Float(-22.0)) + Call(SetCamPosA, CAM_DEFAULT, -2, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(EnablePartnerAI) + Call(func_802D2C14, 1) + Wait(10) + Call(ShowMessageAtWorldPos, MSG_CH6_0003, 0, 70, -200) + Call(SetCamPitch, CAM_DEFAULT, Float(16.5), Float(-11.8)) + Call(SetCamDistance, CAM_DEFAULT, 525) + Call(SetCamPosA, CAM_DEFAULT, -14, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(20) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(ShowMessageAtWorldPos, MSG_CH6_0004, 0, 50, -200) + Call(SetCamPitch, CAM_DEFAULT, Float(9.0), Float(-22.0)) + Call(SetCamDistance, CAM_DEFAULT, 333) + Call(SetCamPosA, CAM_DEFAULT, -2, 0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10) + Call(ShowMessageAtWorldPos, MSG_CH6_0005, 0, 70, -200) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Set(GB_StoryProgress, STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Call(func_802D2C14, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Interact_Wisterwood) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(2) - EVT_CALL(GetPlayerActionState, LVar3) - EVT_SET(LVar4, 0) - EVT_IF_EQ(LVar3, ACTION_STATE_IDLE) - EVT_ADD(LVar4, 1) - EVT_END_IF - EVT_IF_EQ(LVar3, ACTION_STATE_WALK) - EVT_ADD(LVar4, 1) - EVT_END_IF - EVT_IF_EQ(LVar3, ACTION_STATE_RUN) - EVT_ADD(LVar4, 1) - EVT_END_IF - EVT_IF_EQ(LVar4, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0006, 0, 50, -200) - EVT_SET(GB_StoryProgress, STORY_CH6_WISTERWOOD_GAVE_HINT) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH6_RETURNED_TO_TOAD_TOWN) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_000D, 0, 50, -200) - EVT_CALL(ShowChoice, MSG_Choice_001F) - EVT_WAIT(10) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN) - EVT_CALL(SwitchMessage, MSG_CH6_000E) - EVT_CASE_LT(STORY_CH6_GOT_FERTILE_SOIL) - EVT_CALL(SwitchMessage, MSG_CH6_000F) - EVT_CASE_LT(STORY_CH6_FILLED_SPRING_WITH_WATER) - EVT_CALL(SwitchMessage, MSG_CH6_0010) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SwitchMessage, MSG_CH6_0011) - EVT_CASE_LT(STORY_CH6_GREW_MAGIC_BEANSTALK) - EVT_CALL(SwitchMessage, MSG_CH6_0007) - EVT_CASE_LT(STORY_CH6_BEGAN_PEACH_MISSION) - EVT_CALL(SwitchMessage, MSG_CH6_0012) - EVT_CASE_DEFAULT - EVT_CALL(SwitchMessage, MSG_CH6_0013) - EVT_END_SWITCH - EVT_CASE_EQ(1) - EVT_CALL(CloseMessage) - EVT_EXEC(N(EVS_Wisterwood_Exit)) - EVT_RETURN - EVT_CASE_EQ(2) - EVT_CALL(CloseMessage) - EVT_END_SWITCH - EVT_ELSE - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0014, 0, 50, -200) - EVT_CALL(ShowChoice, MSG_Choice_001F) - EVT_WAIT(10) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(SwitchMessage, MSG_CH6_0015) - EVT_CASE_EQ(1) - EVT_CALL(CloseMessage) - EVT_EXEC(N(EVS_Wisterwood_Exit)) - EVT_RETURN - EVT_CASE_EQ(2) - EVT_CALL(CloseMessage) - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Wait(2) + Call(GetPlayerActionState, LVar3) + Set(LVar4, 0) + IfEq(LVar3, ACTION_STATE_IDLE) + Add(LVar4, 1) + EndIf + IfEq(LVar3, ACTION_STATE_WALK) + Add(LVar4, 1) + EndIf + IfEq(LVar3, ACTION_STATE_RUN) + Add(LVar4, 1) + EndIf + IfEq(LVar4, 0) + Call(DisablePlayerInput, FALSE) + Return + EndIf + IfEq(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(ShowMessageAtWorldPos, MSG_CH6_0006, 0, 50, -200) + Set(GB_StoryProgress, STORY_CH6_WISTERWOOD_GAVE_HINT) + Call(DisablePlayerInput, FALSE) + Return + EndIf + IfLt(GB_StoryProgress, STORY_CH6_RETURNED_TO_TOAD_TOWN) + Call(ShowMessageAtWorldPos, MSG_CH6_000D, 0, 50, -200) + Call(ShowChoice, MSG_Choice_001F) + Wait(10) + Switch(LVar0) + CaseEq(0) + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_GOT_MAGICAL_BEAN) + Call(SwitchMessage, MSG_CH6_000E) + CaseLt(STORY_CH6_GOT_FERTILE_SOIL) + Call(SwitchMessage, MSG_CH6_000F) + CaseLt(STORY_CH6_FILLED_SPRING_WITH_WATER) + Call(SwitchMessage, MSG_CH6_0010) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SwitchMessage, MSG_CH6_0011) + CaseLt(STORY_CH6_GREW_MAGIC_BEANSTALK) + Call(SwitchMessage, MSG_CH6_0007) + CaseLt(STORY_CH6_BEGAN_PEACH_MISSION) + Call(SwitchMessage, MSG_CH6_0012) + CaseDefault + Call(SwitchMessage, MSG_CH6_0013) + EndSwitch + CaseEq(1) + Call(CloseMessage) + Exec(N(EVS_Wisterwood_Exit)) + Return + CaseEq(2) + Call(CloseMessage) + EndSwitch + Else + Call(ShowMessageAtWorldPos, MSG_CH6_0014, 0, 50, -200) + Call(ShowChoice, MSG_Choice_001F) + Wait(10) + Switch(LVar0) + CaseEq(0) + Call(SwitchMessage, MSG_CH6_0015) + CaseEq(1) + Call(CloseMessage) + Exec(N(EVS_Wisterwood_Exit)) + Return + CaseEq(2) + Call(CloseMessage) + EndSwitch + EndIf + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Wisterwood_Farewell) = { - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(90.0), 0, 600, EVT_FLOAT(21.0), EVT_FLOAT(-12.0)) - EVT_WAIT(20) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_000B, 0, 50, -200) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, -30) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(25.0), EVT_FLOAT(-25.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_000C, 0, 50, -200) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_RETURN - EVT_END + Call(AdjustCam, CAM_DEFAULT, Float(90.0), 0, 600, Float(21.0), Float(-12.0)) + Wait(20) + Call(ShowMessageAtWorldPos, MSG_CH6_000B, 0, 50, -200) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, -30) + Call(SetCamDistance, CAM_DEFAULT, 250) + Call(SetCamPitch, CAM_DEFAULT, Float(25.0), Float(-25.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10) + Call(ShowMessageAtWorldPos, MSG_CH6_000C, 0, 50, -200) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Return + End }; EvtScript N(EVS_NpcInit_Wisterwood) = { - EVT_CALL(EnableGroup, MODEL_ha, FALSE) - EVT_CALL(EnableGroup, MODEL_tuta, FALSE) - EVT_CALL(EnableGroup, MODEL_g54, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, 50, 70, -230) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE) - EVT_IF_LT(GB_StoryProgress, STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) - EVT_EXEC(N(EVS_Wisterwood_Introduction)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(EnableGroup, MODEL_ha, FALSE) + Call(EnableGroup, MODEL_tuta, FALSE) + Call(EnableGroup, MODEL_g54, FALSE) + Call(SetNpcPos, NPC_SELF, 50, 70, -230) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, TRUE) + Call(EnableNpcShadow, NPC_SELF, FALSE) + IfLt(GB_StoryProgress, STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) + Exec(N(EVS_Wisterwood_Introduction)) + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Bubulb1) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_CH6_0016) - EVT_CASE_LT(STORY_CH6_GOT_FERTILE_SOIL) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_CH6_0017) - EVT_CASE_LT(STORY_CH6_FILLED_SPRING_WITH_WATER) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_CH6_0018) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_CH6_0019) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SWITCH(AF_FLO_PinkBubulbDialogueToggle) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_HappyTalk, ANIM_Bubulb_Pink_HappyGentle, 0, MSG_CH6_001A) - EVT_SET(AF_FLO_PinkBubulbDialogueToggle, TRUE) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_HappyTalk, ANIM_Bubulb_Pink_HappyGentle, 0, MSG_CH6_001B) - EVT_SET(AF_FLO_PinkBubulbDialogueToggle, FALSE) - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_HappyTalk, ANIM_Bubulb_Pink_HappyGentle, 0, MSG_CH6_001C) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_GOT_MAGICAL_BEAN) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_CH6_0016) + CaseLt(STORY_CH6_GOT_FERTILE_SOIL) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_CH6_0017) + CaseLt(STORY_CH6_FILLED_SPRING_WITH_WATER) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_CH6_0018) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_CH6_0019) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Switch(AF_FLO_PinkBubulbDialogueToggle) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_HappyTalk, ANIM_Bubulb_Pink_HappyGentle, 0, MSG_CH6_001A) + Set(AF_FLO_PinkBubulbDialogueToggle, TRUE) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_HappyTalk, ANIM_Bubulb_Pink_HappyGentle, 0, MSG_CH6_001B) + Set(AF_FLO_PinkBubulbDialogueToggle, FALSE) + EndSwitch + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_HappyTalk, ANIM_Bubulb_Pink_HappyGentle, 0, MSG_CH6_001C) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Bubulb2) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_001D) - EVT_CASE_LT(STORY_CH6_GOT_FERTILE_SOIL) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_001E) - EVT_CASE_LT(STORY_CH6_FILLED_SPRING_WITH_WATER) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_001F) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_0020) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SWITCH(AF_FLO_PurpleBubulbDialogueToggle) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_0021) - EVT_SET(AF_FLO_PurpleBubulbDialogueToggle, TRUE) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_0022) - EVT_SET(AF_FLO_PurpleBubulbDialogueToggle, FALSE) - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_0023) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_GOT_MAGICAL_BEAN) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_001D) + CaseLt(STORY_CH6_GOT_FERTILE_SOIL) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_001E) + CaseLt(STORY_CH6_FILLED_SPRING_WITH_WATER) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_001F) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_0020) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Switch(AF_FLO_PurpleBubulbDialogueToggle) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_0021) + Set(AF_FLO_PurpleBubulbDialogueToggle, TRUE) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_0022) + Set(AF_FLO_PurpleBubulbDialogueToggle, FALSE) + EndSwitch + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_0023) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Bubulb_03) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH6_0024) - EVT_CASE_LT(STORY_CH6_GOT_FERTILE_SOIL) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH6_0025) - EVT_CASE_LT(STORY_CH6_FILLED_SPRING_WITH_WATER) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH6_0026) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH6_0027) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SWITCH(AF_FLO_GreenBubulbDialogueToggle) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_HappyTalk, ANIM_Bubulb_Green_HappyGentle, 0, MSG_CH6_0028) - EVT_SET(AF_FLO_GreenBubulbDialogueToggle, TRUE) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_HappyTalk, ANIM_Bubulb_Green_HappyGentle, 0, MSG_CH6_0029) - EVT_SET(AF_FLO_GreenBubulbDialogueToggle, FALSE) - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_HappyTalk, ANIM_Bubulb_Green_HappyGentle, 0, MSG_CH6_002A) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_GOT_MAGICAL_BEAN) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH6_0024) + CaseLt(STORY_CH6_GOT_FERTILE_SOIL) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH6_0025) + CaseLt(STORY_CH6_FILLED_SPRING_WITH_WATER) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH6_0026) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH6_0027) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Switch(AF_FLO_GreenBubulbDialogueToggle) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_HappyTalk, ANIM_Bubulb_Green_HappyGentle, 0, MSG_CH6_0028) + Set(AF_FLO_GreenBubulbDialogueToggle, TRUE) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_HappyTalk, ANIM_Bubulb_Green_HappyGentle, 0, MSG_CH6_0029) + Set(AF_FLO_GreenBubulbDialogueToggle, FALSE) + EndSwitch + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_HappyTalk, ANIM_Bubulb_Green_HappyGentle, 0, MSG_CH6_002A) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Bubulb_04) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH6_002B) - EVT_CASE_LT(STORY_CH6_GOT_FERTILE_SOIL) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH6_002C) - EVT_CASE_LT(STORY_CH6_FILLED_SPRING_WITH_WATER) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH6_002D) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH6_002E) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SWITCH(AF_FLO_YellowBubulbDialogueToggle) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_HappyTalk, ANIM_Bubulb_Yellow_HappyGentle, 0, MSG_CH6_002F) - EVT_SET(AF_FLO_YellowBubulbDialogueToggle, TRUE) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_HappyTalk, ANIM_Bubulb_Yellow_HappyGentle, 0, MSG_CH6_0030) - EVT_SET(AF_FLO_YellowBubulbDialogueToggle, FALSE) - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_HappyTalk, ANIM_Bubulb_Yellow_HappyGentle, 0, MSG_CH6_0031) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_GOT_MAGICAL_BEAN) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH6_002B) + CaseLt(STORY_CH6_GOT_FERTILE_SOIL) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH6_002C) + CaseLt(STORY_CH6_FILLED_SPRING_WITH_WATER) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH6_002D) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH6_002E) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Switch(AF_FLO_YellowBubulbDialogueToggle) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_HappyTalk, ANIM_Bubulb_Yellow_HappyGentle, 0, MSG_CH6_002F) + Set(AF_FLO_YellowBubulbDialogueToggle, TRUE) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_HappyTalk, ANIM_Bubulb_Yellow_HappyGentle, 0, MSG_CH6_0030) + Set(AF_FLO_YellowBubulbDialogueToggle, FALSE) + EndSwitch + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_HappyTalk, ANIM_Bubulb_Yellow_HappyGentle, 0, MSG_CH6_0031) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Bubulb_01) = { - EVT_SET(AF_FLO_PinkBubulbDialogueToggle, FALSE) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bubulb1))) - EVT_RETURN - EVT_END + Set(AF_FLO_PinkBubulbDialogueToggle, FALSE) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bubulb1))) + Return + End }; EvtScript N(EVS_NpcInit_Bubulb_02) = { - EVT_SET(AF_FLO_PurpleBubulbDialogueToggle, FALSE) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bubulb2))) - EVT_RETURN - EVT_END + Set(AF_FLO_PurpleBubulbDialogueToggle, FALSE) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bubulb2))) + Return + End }; EvtScript N(EVS_NpcInit_Bubulb_03) = { - EVT_SET(AF_FLO_GreenBubulbDialogueToggle, FALSE) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bubulb_03))) - EVT_RETURN - EVT_END + Set(AF_FLO_GreenBubulbDialogueToggle, FALSE) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bubulb_03))) + Return + End }; EvtScript N(EVS_NpcInit_Bubulb_04) = { - EVT_SET(AF_FLO_YellowBubulbDialogueToggle, FALSE) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bubulb_04))) - EVT_RETURN - EVT_END + Set(AF_FLO_YellowBubulbDialogueToggle, FALSE) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Bubulb_04))) + Return + End }; EvtScript N(EVS_NpcInteract_Tolielup) = { - EVT_IF_EQ(GF_FLO00_Met_Tolielup, FALSE) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4.0), -30, 300, EVT_FLOAT(20.0), EVT_FLOAT(-9.5)) - EVT_SET(GF_FLO00_Met_Tolielup, TRUE) - EVT_END_IF - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN) - EVT_SWITCH(AB_FLO_TolielupDialogue) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0035) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AB_FLO_TolielupDialogue, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0038) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AB_FLO_TolielupDialogue, 2) - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0039) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AB_FLO_TolielupDialogue, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH6_GOT_CRYSTAL_BERRY) - EVT_SWITCH(AB_FLO_TolielupDialogue) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0036) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AB_FLO_TolielupDialogue, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0038) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AB_FLO_TolielupDialogue, 2) - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0039) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AB_FLO_TolielupDialogue, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_SWITCH(AB_FLO_TolielupDialogue) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0037) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AB_FLO_TolielupDialogue, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0038) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AB_FLO_TolielupDialogue, 2) - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0039) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AB_FLO_TolielupDialogue, 0) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_SWITCH(AB_FLO_TolielupDialogue) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0039) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_SET(AB_FLO_TolielupDialogue, 1) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0038) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_END_SWITCH - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_003A) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) - EVT_END_SWITCH - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_RETURN - EVT_END + IfEq(GF_FLO00_Met_Tolielup, FALSE) + Call(AdjustCam, CAM_DEFAULT, Float(4.0), -30, 300, Float(20.0), Float(-9.5)) + Set(GF_FLO00_Met_Tolielup, TRUE) + EndIf + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_GOT_MAGICAL_BEAN) + Switch(AB_FLO_TolielupDialogue) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0035) + Call(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + Set(AB_FLO_TolielupDialogue, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0038) + Call(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + Set(AB_FLO_TolielupDialogue, 2) + CaseEq(2) + Call(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0039) + Call(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + Set(AB_FLO_TolielupDialogue, 0) + EndSwitch + CaseLt(STORY_CH6_GOT_CRYSTAL_BERRY) + Switch(AB_FLO_TolielupDialogue) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0036) + Call(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + Set(AB_FLO_TolielupDialogue, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0038) + Call(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + Set(AB_FLO_TolielupDialogue, 2) + CaseEq(2) + Call(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0039) + Call(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + Set(AB_FLO_TolielupDialogue, 0) + EndSwitch + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Switch(AB_FLO_TolielupDialogue) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0037) + Call(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + Set(AB_FLO_TolielupDialogue, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0038) + Call(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + Set(AB_FLO_TolielupDialogue, 2) + CaseEq(2) + Call(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0039) + Call(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + Set(AB_FLO_TolielupDialogue, 0) + EndSwitch + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + Switch(AB_FLO_TolielupDialogue) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0039) + Call(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + Set(AB_FLO_TolielupDialogue, 1) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0038) + Call(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + EndSwitch + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_003A) + Call(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0) + EndSwitch + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + Return + End }; EvtScript N(EVS_NpcInit_Tolielup) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Tolielup))) - EVT_CALL(SetNpcCollisionSize, NPC_SELF, 65, 50) - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Tolielup))) + Call(SetNpcCollisionSize, NPC_SELF, 65, 50) + Return + End }; EvtScript N(EVS_NpcIdle_Klevar) = { - EVT_LOOP(0) - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LOOP(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Loop(10) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Sub(LVar1, 1) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Loop(10) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar1, 1) + Call(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_Scene_RescuedKlevar) = { - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(func_802CF56C, 2) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar0) - EVT_ADD(LVar3, -50) - EVT_SET(LVar4, LVar1) - EVT_ADD(LVar4, 26) - EVT_CALL(SetNpcPos, NPC_Klevar, LVar3, LVar4, LVar2) - EVT_CALL(PlayerFaceNpc, NPC_Klevar, FALSE) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Klevar, 0) - EVT_ADD(LVar0, -25) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(475.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 18, -8) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_CALL(WaitForPlayerInputEnabled) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(40) - EVT_CALL(SpeakToPlayer, NPC_Klevar, ANIM_WorldKlevar_Talk, ANIM_WorldKlevar_Idle, SPEECH_FLAG_200, MSG_CH6_00D8) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, 18, -9) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(MakeLerp, 0, 360, 10, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Klevar, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(EnableNpcAI, NPC_Klevar, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Leap) - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_UsePower) - EVT_CALL(PlaySoundAtPlayer, SOUND_RECEIVE_STAR_POWER, SOUND_SPACE_DEFAULT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SET(LVar3, LVar1) - EVT_ADD(LVar1, 50) - EVT_ADD(LVar2, 10) - EVT_ADD(LVar3, 30) - EVT_LOOP(5) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 20) - EVT_WAIT(6) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 1, LVar0, LVar3, LVar2, 20) - EVT_WAIT(6) - EVT_END_LOOP - EVT_WAIT(20) - EVT_CALL(PlaySoundAtPlayer, SOUND_GET_STAR_POWER_WAVE, SOUND_SPACE_DEFAULT) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 30) - EVT_WAIT(30) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Idle) - EVT_CALL(EnableNpcAI, NPC_Klevar, TRUE) - EVT_CALL(N(UpgradeStarPowerCh6)) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0196, 160, 40) - EVT_WAIT(10) - EVT_CALL(GetNpcPos, NPC_Klevar, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Klevar, ANIM_WorldKlevar_Talk, ANIM_WorldKlevar_Idle, SPEECH_FLAG_200, MSG_CH6_00D9) - EVT_WAIT(10) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, -25) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Klevar, ANIM_WorldKlevar_Talk, ANIM_WorldKlevar_Idle, SPEECH_FLAG_200, MSG_CH6_00DA) - EVT_CALL(SetNpcFlagBits, NPC_Klevar, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) - EVT_THREAD - EVT_LOOP(25) - EVT_CALL(GetNpcPos, NPC_Klevar, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 20) - EVT_WAIT(4) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 1800) - EVT_CALL(MakeLerp, LVar2, LVar3, 100, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Klevar, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_Klevar, LVar2, LVar3, LVar4) - EVT_SET(LVar5, LVar3) - EVT_ADD(LVar5, 180) - EVT_CALL(MakeLerp, LVar3, LVar5, 100, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcPos, NPC_Klevar, LVar2, LVar0, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_Klevar, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySoundAtNpc, NPC_Klevar, SOUND_STAR_SPIRIT_DEPART_1, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_WAIT(110) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_SET(GB_StoryProgress, STORY_CH6_STAR_SPRIT_DEPARTED) - EVT_EXEC_WAIT(N(EVS_Wisterwood_Farewell)) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePartnerAI, 0) + Call(func_802CF56C, 2) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar3, LVar0) + Add(LVar3, -50) + Set(LVar4, LVar1) + Add(LVar4, 26) + Call(SetNpcPos, NPC_Klevar, LVar3, LVar4, LVar2) + Call(PlayerFaceNpc, NPC_Klevar, FALSE) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Klevar, 0) + Add(LVar0, -25) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(475.0)) + Call(SetCamPitch, CAM_DEFAULT, 18, -8) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Call(WaitForPlayerInputEnabled) + Call(DisablePlayerInput, TRUE) + Wait(40) + Call(SpeakToPlayer, NPC_Klevar, ANIM_WorldKlevar_Talk, ANIM_WorldKlevar_Idle, SPEECH_FLAG_200, MSG_CH6_00D8) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamPitch, CAM_DEFAULT, 18, -9) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(MakeLerp, 0, 360, 10, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Klevar, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(EnableNpcAI, NPC_Klevar, FALSE) + Call(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Leap) + Wait(20) + Call(SetPlayerAnimation, ANIM_Mario1_UsePower) + Call(PlaySoundAtPlayer, SOUND_RECEIVE_STAR_POWER, SOUND_SPACE_DEFAULT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Set(LVar3, LVar1) + Add(LVar1, 50) + Add(LVar2, 10) + Add(LVar3, 30) + Loop(5) + PlayEffect(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 20) + Wait(6) + PlayEffect(EFFECT_SPARKLES, 1, LVar0, LVar3, LVar2, 20) + Wait(6) + EndLoop + Wait(20) + Call(PlaySoundAtPlayer, SOUND_GET_STAR_POWER_WAVE, SOUND_SPACE_DEFAULT) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 20) + PlayEffect(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 30) + Wait(30) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Idle) + Call(EnableNpcAI, NPC_Klevar, TRUE) + Call(N(UpgradeStarPowerCh6)) + Call(ShowMessageAtScreenPos, MSG_Menus_0196, 160, 40) + Wait(10) + Call(GetNpcPos, NPC_Klevar, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(250.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10) + Call(SpeakToPlayer, NPC_Klevar, ANIM_WorldKlevar_Talk, ANIM_WorldKlevar_Idle, SPEECH_FLAG_200, MSG_CH6_00D9) + Wait(10) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, -25) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(300.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10) + Call(SpeakToPlayer, NPC_Klevar, ANIM_WorldKlevar_Talk, ANIM_WorldKlevar_Idle, SPEECH_FLAG_200, MSG_CH6_00DA) + Call(SetNpcFlagBits, NPC_Klevar, NPC_FLAG_IGNORE_CAMERA_FOR_YAW, TRUE) + Thread + Loop(25) + Call(GetNpcPos, NPC_Klevar, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 20) + Wait(4) + EndLoop + EndThread + Thread + Set(LVar2, 0) + Set(LVar3, 1800) + Call(MakeLerp, LVar2, LVar3, 100, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Klevar, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(GetNpcPos, NPC_Klevar, LVar2, LVar3, LVar4) + Set(LVar5, LVar3) + Add(LVar5, 180) + Call(MakeLerp, LVar3, LVar5, 100, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(SetNpcPos, NPC_Klevar, LVar2, LVar0, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcPos, NPC_Klevar, NPC_DISPOSE_LOCATION) + EndThread + Thread + Wait(15) + Call(PlaySoundAtNpc, NPC_Klevar, SOUND_STAR_SPIRIT_DEPART_1, SOUND_SPACE_DEFAULT) + EndThread + Wait(10) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Wait(110) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Set(GB_StoryProgress, STORY_CH6_STAR_SPRIT_DEPARTED) + ExecWait(N(EVS_Wisterwood_Farewell)) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Klevar) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_NE(LVar1, 1) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, flo_00_ENTRY_A) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Klevar))) - EVT_EXEC(N(EVS_Scene_RescuedKlevar)) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfNe(LVar1, 1) + Call(GetEntryID, LVar0) + IfEq(LVar0, flo_00_ENTRY_A) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Klevar))) + Exec(N(EVS_Scene_RescuedKlevar)) + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + EndIf + Return + End }; EvtScript N(EVS_NpcInteract_Lakilulu) = { - EVT_IF_LE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0032) - EVT_ELSE - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_EQ(LVar0, PARTNER_LAKILESTER) - EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0032) - EVT_WAIT(10) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Shout, ANIM_WorldLakilester_IdleTough, 5, MSG_CH6_0033) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_WorldLakilester_Idle) - EVT_CALL(EndSpeech, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5) - EVT_CALL(EnablePartnerAI) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0034) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfLe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0032) + Else + Call(GetCurrentPartnerID, LVar0) + IfEq(LVar0, PARTNER_LAKILESTER) + Call(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0032) + Wait(10) + Call(DisablePartnerAI, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Shout, ANIM_WorldLakilester_IdleTough, 5, MSG_CH6_0033) + Call(SetNpcAnimation, NPC_PARTNER, ANIM_WorldLakilester_Idle) + Call(EndSpeech, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5) + Call(EnablePartnerAI) + Else + Call(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0034) + EndIf + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Lakilulu) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lakilulu))) - EVT_CALL(SetNpcCollisionSize, NPC_SELF, 36, 28) - EVT_CALL(SetNpcPos, NPC_SELF, -200, 15, -300) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Lakilulu))) + Call(SetNpcCollisionSize, NPC_SELF, 36, 28) + Call(SetNpcPos, NPC_SELF, -200, 15, -300) + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; NpcData N(NpcData_Wisterwood) = { diff --git a/src/world/dead/area_flo/flo_00/flo_00_4_epilogue.c b/src/world/dead/area_flo/flo_00/flo_00_4_epilogue.c index 5771b2d6f17..0390dae9b57 100644 --- a/src/world/dead/area_flo/flo_00/flo_00_4_epilogue.c +++ b/src/world/dead/area_flo/flo_00/flo_00_4_epilogue.c @@ -16,63 +16,63 @@ Vec3f N(D_80245E88_CA3DA8)[] = { }; EvtScript N(EVS_Scene_Epilogue) = { - EVT_CALL(SetPlayerPos, -400, 0, 200) - EVT_CALL(SetNpcPos, NPC_PARTNER, -380, 0, 200) - EVT_CALL(func_802CF56C, 2) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) + Call(SetPlayerPos, -400, 0, 200) + Call(SetNpcPos, NPC_PARTNER, -380, 0, 200) + Call(func_802CF56C, 2) + Call(DisablePartnerAI, 0) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) EVT_VEC3I_SET(LVar0, 230, 0, 350) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(17.5), EVT_FLOAT(35.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -50) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(70) - EVT_CALL(InterpNpcYaw, NPC_Lakilester_Epilogue, 90, 0) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Lakilester_Epilogue, ANIM_WorldLakilester_Talk) - EVT_WAIT(40) - EVT_CALL(SetNpcAnimation, NPC_Lakilester_Epilogue, ANIM_WorldLakilester_Idle) - EVT_CALL(SetNpcAnimation, NPC_Parakarry_Epilogue, ANIM_WorldParakarry_Talk) - EVT_WAIT(40) - EVT_CALL(SetNpcAnimation, NPC_Parakarry_Epilogue, ANIM_WorldParakarry_Idle) - EVT_CALL(InterpNpcYaw, NPC_Parakarry_Epilogue, 90, 0) - EVT_CALL(NpcFlyTo, NPC_Parakarry_Epilogue, 400, 200, 287, 80, -5, EASING_LINEAR) - EVT_CALL(InterpNpcYaw, NPC_Lakilester_Epilogue, 270, 0) - EVT_WAIT(40) - EVT_CALL(FadeOutMusic, 0, 1000) - EVT_CALL(GotoMap, EVT_PTR("sam_11"), sam_11_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-10.0)) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(SetCamPosA, CAM_DEFAULT, Float(17.5), Float(35.0)) + Call(SetCamPosB, CAM_DEFAULT, 0, -50) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(70) + Call(InterpNpcYaw, NPC_Lakilester_Epilogue, 90, 0) + Wait(10) + Call(SetNpcAnimation, NPC_Lakilester_Epilogue, ANIM_WorldLakilester_Talk) + Wait(40) + Call(SetNpcAnimation, NPC_Lakilester_Epilogue, ANIM_WorldLakilester_Idle) + Call(SetNpcAnimation, NPC_Parakarry_Epilogue, ANIM_WorldParakarry_Talk) + Wait(40) + Call(SetNpcAnimation, NPC_Parakarry_Epilogue, ANIM_WorldParakarry_Idle) + Call(InterpNpcYaw, NPC_Parakarry_Epilogue, 90, 0) + Call(NpcFlyTo, NPC_Parakarry_Epilogue, 400, 200, 287, 80, -5, EASING_LINEAR) + Call(InterpNpcYaw, NPC_Lakilester_Epilogue, 270, 0) + Wait(40) + Call(FadeOutMusic, 0, 1000) + Call(GotoMap, Ref("sam_11"), sam_11_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_NpcInit_Lakilester_Epilogue) = { - EVT_CALL(SetPlayerPos, -400, 0, 200) - EVT_CALL(SetNpcPos, NPC_PARTNER, -380, 0, 200) - EVT_CALL(SetNpcPos, NPC_Lakilester_Epilogue, 196, 20, 354) - EVT_CALL(SetNpcYaw, NPC_Lakilester_Epilogue, 270) - EVT_RETURN - EVT_END + Call(SetPlayerPos, -400, 0, 200) + Call(SetNpcPos, NPC_PARTNER, -380, 0, 200) + Call(SetNpcPos, NPC_Lakilester_Epilogue, 196, 20, 354) + Call(SetNpcYaw, NPC_Lakilester_Epilogue, 270) + Return + End }; EvtScript N(EVS_NpcInit_Lakilulu_Epilogue) = { - EVT_CALL(SetNpcPos, NPC_Lakilulu_Epilogue, 163, 20, 370) - EVT_CALL(SetNpcYaw, NPC_Lakilulu_Epilogue, 90) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Lakilulu_Epilogue, 163, 20, 370) + Call(SetNpcYaw, NPC_Lakilulu_Epilogue, 90) + Return + End }; EvtScript N(EVS_NpcInit_Parakarry_Epilogue) = { - EVT_CALL(SetNpcPos, NPC_Parakarry_Epilogue, 266, 20, 322) - EVT_CALL(SetNpcYaw, NPC_Parakarry_Epilogue, 270) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Parakarry_Epilogue, 266, 20, 322) + Call(SetNpcYaw, NPC_Parakarry_Epilogue, 270) + Return + End }; NpcData N(NpcData_Lakilester_Epilogue)[] = { diff --git a/src/world/dead/area_flo/flo_00/flo_00_5_beanstalk.c b/src/world/dead/area_flo/flo_00/flo_00_5_beanstalk.c index a3bd8f4bf7d..5e861706191 100644 --- a/src/world/dead/area_flo/flo_00/flo_00_5_beanstalk.c +++ b/src/world/dead/area_flo/flo_00/flo_00_5_beanstalk.c @@ -61,396 +61,396 @@ API_CALLABLE(N(EnableWorldStatusBar)) { } EvtScript N(EVS_SetExteriorVineGrowth) = { - EVT_SETF(LVar1, LVar0) // input: expect range from -700 (no growth) to 0 (fully grown) - EVT_SUBF(LVar1, EVT_FLOAT(-700.0)) - EVT_DIVF(LVar1, EVT_FLOAT(100.0)) - EVT_SETF(LVar2, LVar1) - EVT_MULF(LVar2, EVT_FLOAT(100.0)) - EVT_IF_GT(LVar2, 100) - EVT_SETF(LVar1, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CALL(ScaleGroup, MODEL_g35, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o117, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o141, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o140, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o138, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o139, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o143, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o144, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o145, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o146, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o188, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o187, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o186, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o185, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o182, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o183, LVar1, 1, LVar1) - EVT_CALL(ScaleModel, MODEL_o181, LVar1, 1, LVar1) - EVT_CALL(TranslateGroup, MODEL_g35, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o117, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o141, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o140, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o138, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o139, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o143, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o144, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o145, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o146, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o188, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o187, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o186, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o185, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o182, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o183, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_o181, 0, LVar0, 0) - EVT_SETF(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-12.0)) - EVT_CALL(RotateGroup, MODEL_g35, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o117, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o141, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o140, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o138, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o139, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o143, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o144, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o145, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o146, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o188, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o187, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o186, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o185, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o182, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o183, LVar1, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o181, LVar1, 0, 1, 0) - EVT_CALL(TranslateModel, MODEL_o117, EVT_FLOAT(8.122), EVT_FLOAT(56.153), EVT_FLOAT(1.166)) - EVT_CALL(TranslateModel, MODEL_o141, EVT_FLOAT(-6.8779296875), EVT_FLOAT(91.153), EVT_FLOAT(1.166)) - EVT_CALL(TranslateModel, MODEL_o140, EVT_FLOAT(13.122), EVT_FLOAT(106.153), EVT_FLOAT(1.166)) - EVT_CALL(TranslateModel, MODEL_o138, EVT_FLOAT(-9.8779296875), EVT_FLOAT(136.153), EVT_FLOAT(1.166)) - EVT_CALL(TranslateModel, MODEL_o139, EVT_FLOAT(-7.8779296875), EVT_FLOAT(201.153), EVT_FLOAT(1.166)) - EVT_CALL(TranslateModel, MODEL_o143, EVT_FLOAT(13.122), EVT_FLOAT(221.153), EVT_FLOAT(1.166)) - EVT_CALL(TranslateModel, MODEL_o144, EVT_FLOAT(8.127), EVT_FLOAT(261.229), EVT_FLOAT(1.166)) - EVT_CALL(TranslateModel, MODEL_o145, EVT_FLOAT(-12.8779296875), EVT_FLOAT(266.153), EVT_FLOAT(1.166)) - EVT_CALL(TranslateModel, MODEL_o146, EVT_FLOAT(8.122), EVT_FLOAT(316.153), EVT_FLOAT(-13.833984375)) - EVT_CALL(TranslateModel, MODEL_o188, EVT_FLOAT(-10.943359375), EVT_FLOAT(391.153), EVT_FLOAT(10.566)) - EVT_CALL(TranslateModel, MODEL_o187, EVT_FLOAT(-7.001953125), EVT_FLOAT(456.153), EVT_FLOAT(0.947)) - EVT_CALL(TranslateModel, MODEL_o186, EVT_FLOAT(12.998), EVT_FLOAT(471.153), EVT_FLOAT(0.947)) - EVT_CALL(TranslateModel, MODEL_o185, EVT_FLOAT(-10.001953125), EVT_FLOAT(501.153), EVT_FLOAT(0.947)) - EVT_CALL(TranslateModel, MODEL_o182, EVT_FLOAT(8.003), EVT_FLOAT(536.229), EVT_FLOAT(0.947)) - EVT_CALL(TranslateModel, MODEL_o183, EVT_FLOAT(12.998), EVT_FLOAT(586.153), EVT_FLOAT(0.947)) - EVT_CALL(TranslateModel, MODEL_o181, EVT_FLOAT(-13.001953125), EVT_FLOAT(631.153), EVT_FLOAT(0.947)) - EVT_SETF(LVar1, LVar0) - EVT_SUBF(LVar1, EVT_FLOAT(-700.0)) - EVT_DIVF(LVar1, EVT_FLOAT(300.0)) - EVT_SETF(LVar2, LVar1) - EVT_MULF(LVar2, EVT_FLOAT(100.0)) - EVT_IF_GT(LVar2, 100) - EVT_SETF(LVar1, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CALL(ScaleModel, MODEL_o117, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o141, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o140, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o138, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o139, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o143, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o144, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o145, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o146, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o188, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o187, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o186, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o185, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o182, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o183, LVar1, LVar1, LVar1) - EVT_CALL(ScaleModel, MODEL_o181, LVar1, LVar1, LVar1) - EVT_CALL(TranslateModel, MODEL_o117, EVT_FLOAT(-8.12109375), EVT_FLOAT(-56.15234375), EVT_FLOAT(-1.1650390625)) - EVT_CALL(TranslateModel, MODEL_o141, EVT_FLOAT(6.879), EVT_FLOAT(-91.15234375), EVT_FLOAT(-1.1650390625)) - EVT_CALL(TranslateModel, MODEL_o140, EVT_FLOAT(-13.12109375), EVT_FLOAT(-106.15234375), EVT_FLOAT(-1.1650390625)) - EVT_CALL(TranslateModel, MODEL_o138, EVT_FLOAT(9.879), EVT_FLOAT(-136.15234375), EVT_FLOAT(-1.1650390625)) - EVT_CALL(TranslateModel, MODEL_o139, EVT_FLOAT(7.879), EVT_FLOAT(-201.15234375), EVT_FLOAT(-1.1650390625)) - EVT_CALL(TranslateModel, MODEL_o143, EVT_FLOAT(-13.12109375), EVT_FLOAT(-221.15234375), EVT_FLOAT(-1.1650390625)) - EVT_CALL(TranslateModel, MODEL_o144, EVT_FLOAT(-8.1259765625), EVT_FLOAT(-261.228515625), EVT_FLOAT(-1.1650390625)) - EVT_CALL(TranslateModel, MODEL_o145, EVT_FLOAT(12.879), EVT_FLOAT(-266.15234375), EVT_FLOAT(-1.1650390625)) - EVT_CALL(TranslateModel, MODEL_o146, EVT_FLOAT(-8.12109375), EVT_FLOAT(-316.15234375), EVT_FLOAT(13.835)) - EVT_CALL(TranslateModel, MODEL_o188, EVT_FLOAT(10.944), EVT_FLOAT(-391.15234375), EVT_FLOAT(-10.5654296875)) - EVT_CALL(TranslateModel, MODEL_o187, EVT_FLOAT(7.003), EVT_FLOAT(-456.15234375), EVT_FLOAT(-0.9462890625)) - EVT_CALL(TranslateModel, MODEL_o186, EVT_FLOAT(-12.9970703125), EVT_FLOAT(-471.15234375), EVT_FLOAT(-0.9462890625)) - EVT_CALL(TranslateModel, MODEL_o185, EVT_FLOAT(10.003), EVT_FLOAT(-501.15234375), EVT_FLOAT(-0.9462890625)) - EVT_CALL(TranslateModel, MODEL_o182, EVT_FLOAT(-8.001953125), EVT_FLOAT(-536.228515625), EVT_FLOAT(-0.9462890625)) - EVT_CALL(TranslateModel, MODEL_o183, EVT_FLOAT(-12.9970703125), EVT_FLOAT(-586.15234375), EVT_FLOAT(-0.9462890625)) - EVT_CALL(TranslateModel, MODEL_o181, EVT_FLOAT(13.003), EVT_FLOAT(-631.15234375), EVT_FLOAT(-0.9462890625)) - EVT_RETURN - EVT_END + SetF(LVar1, LVar0) // input: expect range from -700 (no growth) to 0 (fully grown) + SubF(LVar1, Float(-700.0)) + DivF(LVar1, Float(100.0)) + SetF(LVar2, LVar1) + MulF(LVar2, Float(100.0)) + IfGt(LVar2, 100) + SetF(LVar1, Float(1.0)) + EndIf + Call(ScaleGroup, MODEL_g35, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o117, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o141, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o140, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o138, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o139, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o143, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o144, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o145, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o146, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o188, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o187, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o186, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o185, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o182, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o183, LVar1, 1, LVar1) + Call(ScaleModel, MODEL_o181, LVar1, 1, LVar1) + Call(TranslateGroup, MODEL_g35, 0, LVar0, 0) + Call(TranslateModel, MODEL_o117, 0, LVar0, 0) + Call(TranslateModel, MODEL_o141, 0, LVar0, 0) + Call(TranslateModel, MODEL_o140, 0, LVar0, 0) + Call(TranslateModel, MODEL_o138, 0, LVar0, 0) + Call(TranslateModel, MODEL_o139, 0, LVar0, 0) + Call(TranslateModel, MODEL_o143, 0, LVar0, 0) + Call(TranslateModel, MODEL_o144, 0, LVar0, 0) + Call(TranslateModel, MODEL_o145, 0, LVar0, 0) + Call(TranslateModel, MODEL_o146, 0, LVar0, 0) + Call(TranslateModel, MODEL_o188, 0, LVar0, 0) + Call(TranslateModel, MODEL_o187, 0, LVar0, 0) + Call(TranslateModel, MODEL_o186, 0, LVar0, 0) + Call(TranslateModel, MODEL_o185, 0, LVar0, 0) + Call(TranslateModel, MODEL_o182, 0, LVar0, 0) + Call(TranslateModel, MODEL_o183, 0, LVar0, 0) + Call(TranslateModel, MODEL_o181, 0, LVar0, 0) + SetF(LVar1, LVar0) + MulF(LVar1, Float(-12.0)) + Call(RotateGroup, MODEL_g35, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o117, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o141, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o140, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o138, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o139, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o143, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o144, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o145, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o146, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o188, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o187, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o186, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o185, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o182, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o183, LVar1, 0, 1, 0) + Call(RotateModel, MODEL_o181, LVar1, 0, 1, 0) + Call(TranslateModel, MODEL_o117, Float(8.122), Float(56.153), Float(1.166)) + Call(TranslateModel, MODEL_o141, Float(-6.8779296875), Float(91.153), Float(1.166)) + Call(TranslateModel, MODEL_o140, Float(13.122), Float(106.153), Float(1.166)) + Call(TranslateModel, MODEL_o138, Float(-9.8779296875), Float(136.153), Float(1.166)) + Call(TranslateModel, MODEL_o139, Float(-7.8779296875), Float(201.153), Float(1.166)) + Call(TranslateModel, MODEL_o143, Float(13.122), Float(221.153), Float(1.166)) + Call(TranslateModel, MODEL_o144, Float(8.127), Float(261.229), Float(1.166)) + Call(TranslateModel, MODEL_o145, Float(-12.8779296875), Float(266.153), Float(1.166)) + Call(TranslateModel, MODEL_o146, Float(8.122), Float(316.153), Float(-13.833984375)) + Call(TranslateModel, MODEL_o188, Float(-10.943359375), Float(391.153), Float(10.566)) + Call(TranslateModel, MODEL_o187, Float(-7.001953125), Float(456.153), Float(0.947)) + Call(TranslateModel, MODEL_o186, Float(12.998), Float(471.153), Float(0.947)) + Call(TranslateModel, MODEL_o185, Float(-10.001953125), Float(501.153), Float(0.947)) + Call(TranslateModel, MODEL_o182, Float(8.003), Float(536.229), Float(0.947)) + Call(TranslateModel, MODEL_o183, Float(12.998), Float(586.153), Float(0.947)) + Call(TranslateModel, MODEL_o181, Float(-13.001953125), Float(631.153), Float(0.947)) + SetF(LVar1, LVar0) + SubF(LVar1, Float(-700.0)) + DivF(LVar1, Float(300.0)) + SetF(LVar2, LVar1) + MulF(LVar2, Float(100.0)) + IfGt(LVar2, 100) + SetF(LVar1, Float(1.0)) + EndIf + Call(ScaleModel, MODEL_o117, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o141, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o140, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o138, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o139, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o143, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o144, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o145, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o146, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o188, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o187, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o186, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o185, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o182, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o183, LVar1, LVar1, LVar1) + Call(ScaleModel, MODEL_o181, LVar1, LVar1, LVar1) + Call(TranslateModel, MODEL_o117, Float(-8.12109375), Float(-56.15234375), Float(-1.1650390625)) + Call(TranslateModel, MODEL_o141, Float(6.879), Float(-91.15234375), Float(-1.1650390625)) + Call(TranslateModel, MODEL_o140, Float(-13.12109375), Float(-106.15234375), Float(-1.1650390625)) + Call(TranslateModel, MODEL_o138, Float(9.879), Float(-136.15234375), Float(-1.1650390625)) + Call(TranslateModel, MODEL_o139, Float(7.879), Float(-201.15234375), Float(-1.1650390625)) + Call(TranslateModel, MODEL_o143, Float(-13.12109375), Float(-221.15234375), Float(-1.1650390625)) + Call(TranslateModel, MODEL_o144, Float(-8.1259765625), Float(-261.228515625), Float(-1.1650390625)) + Call(TranslateModel, MODEL_o145, Float(12.879), Float(-266.15234375), Float(-1.1650390625)) + Call(TranslateModel, MODEL_o146, Float(-8.12109375), Float(-316.15234375), Float(13.835)) + Call(TranslateModel, MODEL_o188, Float(10.944), Float(-391.15234375), Float(-10.5654296875)) + Call(TranslateModel, MODEL_o187, Float(7.003), Float(-456.15234375), Float(-0.9462890625)) + Call(TranslateModel, MODEL_o186, Float(-12.9970703125), Float(-471.15234375), Float(-0.9462890625)) + Call(TranslateModel, MODEL_o185, Float(10.003), Float(-501.15234375), Float(-0.9462890625)) + Call(TranslateModel, MODEL_o182, Float(-8.001953125), Float(-536.228515625), Float(-0.9462890625)) + Call(TranslateModel, MODEL_o183, Float(-12.9970703125), Float(-586.15234375), Float(-0.9462890625)) + Call(TranslateModel, MODEL_o181, Float(13.003), Float(-631.15234375), Float(-0.9462890625)) + Return + End }; EvtScript N(EVS_SetInteriorVineGrowth) = { - EVT_SETF(LVar1, LVar0) // input: expect range from -700 (no growth) to 0 (fully grown) - EVT_SUBF(LVar1, EVT_FLOAT(-700.0)) - EVT_DIVF(LVar1, EVT_FLOAT(100.0)) - EVT_SETF(LVar2, LVar1) - EVT_MULF(LVar2, EVT_FLOAT(100.0)) - EVT_IF_GT(LVar2, 100) - EVT_SETF(LVar1, EVT_FLOAT(1.0)) - EVT_END_IF - EVT_CALL(ScaleGroup, MODEL_g37, LVar1, 1, LVar1) - EVT_CALL(TranslateGroup, MODEL_g37, 0, LVar0, 0) - EVT_SETF(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-12.0)) - EVT_CALL(RotateGroup, MODEL_g37, LVar1, 0, 1, 0) - EVT_RETURN - EVT_END + SetF(LVar1, LVar0) // input: expect range from -700 (no growth) to 0 (fully grown) + SubF(LVar1, Float(-700.0)) + DivF(LVar1, Float(100.0)) + SetF(LVar2, LVar1) + MulF(LVar2, Float(100.0)) + IfGt(LVar2, 100) + SetF(LVar1, Float(1.0)) + EndIf + Call(ScaleGroup, MODEL_g37, LVar1, 1, LVar1) + Call(TranslateGroup, MODEL_g37, 0, LVar0, 0) + SetF(LVar1, LVar0) + MulF(LVar1, Float(-12.0)) + Call(RotateGroup, MODEL_g37, LVar1, 0, 1, 0) + Return + End }; EvtScript N(EVS_SetSproutGrowth) = { - EVT_CALL(TranslateModel, MODEL_o147, EVT_FLOAT(9.5), EVT_FLOAT(12.0), EVT_FLOAT(15.0)) - EVT_CALL(TranslateModel, MODEL_o149, EVT_FLOAT(-9.5), EVT_FLOAT(12.0), EVT_FLOAT(15.0)) - EVT_CALL(TranslateModel, MODEL_o148, EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(17.0)) - EVT_SETF(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(90.0)) - EVT_CALL(RotateModel, MODEL_o147, LVar1, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o149, LVar1, 0, 0, 1) - EVT_CALL(TranslateModel, MODEL_o147, EVT_FLOAT(-9.5), EVT_FLOAT(-12.0), EVT_FLOAT(-15.0)) - EVT_CALL(TranslateModel, MODEL_o149, EVT_FLOAT(9.5), EVT_FLOAT(-12.0), EVT_FLOAT(-15.0)) - EVT_CALL(TranslateModel, MODEL_o148, EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(-17.0)) - EVT_CALL(ScaleModel, MODEL_o147, LVar0, LVar0, LVar0) - EVT_CALL(ScaleModel, MODEL_o149, LVar0, LVar0, LVar0) - EVT_CALL(ScaleModel, MODEL_o148, LVar0, LVar0, LVar0) - EVT_RETURN - EVT_END + Call(TranslateModel, MODEL_o147, Float(9.5), Float(12.0), Float(15.0)) + Call(TranslateModel, MODEL_o149, Float(-9.5), Float(12.0), Float(15.0)) + Call(TranslateModel, MODEL_o148, Float(0.0), Float(0.0), Float(17.0)) + SetF(LVar1, LVar0) + MulF(LVar1, Float(90.0)) + Call(RotateModel, MODEL_o147, LVar1, 0, 0, -1) + Call(RotateModel, MODEL_o149, LVar1, 0, 0, 1) + Call(TranslateModel, MODEL_o147, Float(-9.5), Float(-12.0), Float(-15.0)) + Call(TranslateModel, MODEL_o149, Float(9.5), Float(-12.0), Float(-15.0)) + Call(TranslateModel, MODEL_o148, Float(0.0), Float(0.0), Float(-17.0)) + Call(ScaleModel, MODEL_o147, LVar0, LVar0, LVar0) + Call(ScaleModel, MODEL_o149, LVar0, LVar0, LVar0) + Call(ScaleModel, MODEL_o148, LVar0, LVar0, LVar0) + Return + End }; EvtScript N(EVS_SetBigLeafGrowth) = { - EVT_CALL(ScaleModel, MODEL_o142, LVar0, LVar0, LVar0) - EVT_SETF(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(90.0)) - EVT_ADDF(LVar1, EVT_FLOAT(-90.0)) - EVT_CALL(RotateModel, MODEL_o142, LVar1, 1, 0, 0) - EVT_RETURN - EVT_END + Call(ScaleModel, MODEL_o142, LVar0, LVar0, LVar0) + SetF(LVar1, LVar0) + MulF(LVar1, Float(90.0)) + AddF(LVar1, Float(-90.0)) + Call(RotateModel, MODEL_o142, LVar1, 1, 0, 0) + Return + End }; EvtScript N(EVS_SetBigLeafPosition) = { - EVT_SETF(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-3.0)) - EVT_CALL(TranslateModel, MODEL_o142, EVT_FLOAT(-0.26), LVar0, EVT_FLOAT(1.477)) - EVT_CALL(RotateModel, MODEL_o142, LVar1, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o240) - EVT_RETURN - EVT_END + SetF(LVar1, LVar0) + MulF(LVar1, Float(-3.0)) + Call(TranslateModel, MODEL_o142, Float(-0.26), LVar0, Float(1.477)) + Call(RotateModel, MODEL_o142, LVar1, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_o240) + Return + End }; EvtScript N(EVS_Exit_Beanstalk) = { - EVT_IF_EQ(AF_FLO_RidingBeanstalk, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterruptUsePartner) - EVT_WAIT(15) - EVT_CALL(DisablePartnerAI, 0) - EVT_SET(AF_FLO_RidingBeanstalk, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK) - EVT_VEC3I_SET(LVar9, EVT_FLOAT(-59.0), EVT_FLOAT(22.0), EVT_FLOAT(125.0)) // target player pos - EVT_VEC3I_SET(LVarC, EVT_FLOAT(-55.0), EVT_FLOAT(24.0), EVT_FLOAT(145.0)) // target partner pos - EVT_CALL(PlayerMoveTo, LVar9, LVarB, 8) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump0, NPC_PARTNER, LVarC, LVarD, LVarE, 5) - EVT_CALL(PlaySound, SOUND_FLO_RIDE_BEANSTALK_UP_LOOP) - EVT_CALL(SetMusicTrack, 0, SONG_MAGIC_BEANSTALK, 1, 8) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Walk) - EVT_CALL(N(GetPlayerAngles), LVar3, LVar4) - EVT_SWITCH(LVar4) - EVT_CASE_LT(90) - EVT_SET(AF_FLO_BeanstalkFacingRight, FALSE) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_CASE_GE(270) - EVT_SET(AF_FLO_BeanstalkFacingRight, TRUE) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_END_SWITCH - EVT_CALL(TranslateModel, MODEL_o142, EVT_FLOAT(-0.26), EVT_FLOAT(2.0), EVT_FLOAT(1.477)) - EVT_CALL(UpdateColliderTransform, COLLIDER_o240) - EVT_SET(MV_BeanstalkSceneSync, FALSE) - EVT_THREAD - EVT_SET(LVarF, 0) - EVT_LOOP(0) - EVT_ADD(LVarF, 1) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, 0, 700, 800, 0, 0) - EVT_EXEC(N(EVS_SetBigLeafPosition)) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(-3.0)) - EVT_SETF(LVar3, LVar0) - EVT_CALL(N(PlayerRideBeanstalk)) - EVT_CALL(N(PartnerRideBeanstalk)) - EVT_IF_EQ(LVarF, 350) - EVT_SET(MV_BeanstalkSceneSync, TRUE) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_LABEL(10) - EVT_IF_EQ(MV_BeanstalkSceneSync, FALSE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("flo_19"), flo_19_ENTRY_3) - EVT_WAIT(100) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(AF_FLO_RidingBeanstalk, FALSE) + Call(DisablePlayerInput, TRUE) + Call(InterruptUsePartner) + Wait(15) + Call(DisablePartnerAI, 0) + Set(AF_FLO_RidingBeanstalk, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK) + EVT_VEC3I_SET(LVar9, Float(-59.0), Float(22.0), Float(125.0)) // target player pos + EVT_VEC3I_SET(LVarC, Float(-55.0), Float(24.0), Float(145.0)) // target partner pos + Call(PlayerMoveTo, LVar9, LVarB, 8) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.0)) + Call(NpcJump0, NPC_PARTNER, LVarC, LVarD, LVarE, 5) + Call(PlaySound, SOUND_FLO_RIDE_BEANSTALK_UP_LOOP) + Call(SetMusicTrack, 0, SONG_MAGIC_BEANSTALK, 1, 8) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(SetPlayerAnimation, ANIM_Mario1_Walk) + Call(N(GetPlayerAngles), LVar3, LVar4) + Switch(LVar4) + CaseLt(90) + Set(AF_FLO_BeanstalkFacingRight, FALSE) + Call(InterpPlayerYaw, 90, 0) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + CaseGe(270) + Set(AF_FLO_BeanstalkFacingRight, TRUE) + Call(InterpPlayerYaw, 270, 0) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + EndSwitch + Call(TranslateModel, MODEL_o142, Float(-0.26), Float(2.0), Float(1.477)) + Call(UpdateColliderTransform, COLLIDER_o240) + Set(MV_BeanstalkSceneSync, FALSE) + Thread + Set(LVarF, 0) + Loop(0) + Add(LVarF, 1) + Call(N(CosInterpMinMax), LVarF, LVar0, 0, 700, 800, 0, 0) + Exec(N(EVS_SetBigLeafPosition)) + SetF(LVar2, LVar0) + MulF(LVar2, Float(-3.0)) + SetF(LVar3, LVar0) + Call(N(PlayerRideBeanstalk)) + Call(N(PartnerRideBeanstalk)) + IfEq(LVarF, 350) + Set(MV_BeanstalkSceneSync, TRUE) + EndIf + Wait(1) + EndLoop + EndThread + Label(10) + IfEq(MV_BeanstalkSceneSync, FALSE) + Wait(1) + Goto(10) + EndIf + Call(GotoMap, Ref("flo_19"), flo_19_ENTRY_3) + Wait(100) + EndIf + Return + End }; EvtScript N(EVS_Enter_Beanstalk) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_SET(LVar9, EVT_FLOAT(-59.0)) - EVT_SET(LVarA, EVT_FLOAT(22.0)) - EVT_SET(LVarB, EVT_FLOAT(125.0)) - EVT_SET(LVarC, EVT_FLOAT(-55.0)) - EVT_SET(LVarD, EVT_FLOAT(23.0)) - EVT_SET(LVarE, EVT_FLOAT(145.0)) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Walk) - EVT_SWITCH(AF_FLO_BeanstalkFacingRight) - EVT_CASE_EQ(0) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_CASE_EQ(1) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_END_SWITCH - EVT_END_THREAD - EVT_CALL(TranslateModel, MODEL_o142, EVT_FLOAT(-0.26), EVT_FLOAT(2.0), EVT_FLOAT(1.477)) - EVT_CALL(UpdateColliderTransform, COLLIDER_o240) - EVT_SET(LVarF, 0) - EVT_LOOP(120) - EVT_ADD(LVarF, 1) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, 70, 0, 120, 0, 0) - EVT_EXEC(N(EVS_SetBigLeafPosition)) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(-3.0)) - EVT_SETF(LVar3, LVar0) - EVT_CALL(N(PlayerRideBeanstalk)) - EVT_CALL(N(PartnerRideBeanstalk)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EnablePartnerAI) - EVT_CALL(ClearPartnerMoveHistory, NPC_PARTNER) - EVT_CALL(SetPlayerJumpscale, 1) - EVT_CALL(PlayerJump, 10, 0, 110, 20) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_WAIT(5) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(AF_FLO_RidingBeanstalk, FALSE) - EVT_CALL(StopSound, SOUND_FLO_RIDE_BEANSTALK_DOWN_LOOP) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Set(LVar9, Float(-59.0)) + Set(LVarA, Float(22.0)) + Set(LVarB, Float(125.0)) + Set(LVarC, Float(-55.0)) + Set(LVarD, Float(23.0)) + Set(LVarE, Float(145.0)) + Thread + Wait(5) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(SetPlayerAnimation, ANIM_Mario1_Walk) + Switch(AF_FLO_BeanstalkFacingRight) + CaseEq(0) + Call(InterpPlayerYaw, 90, 0) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + CaseEq(1) + Call(InterpPlayerYaw, 270, 0) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + EndSwitch + EndThread + Call(TranslateModel, MODEL_o142, Float(-0.26), Float(2.0), Float(1.477)) + Call(UpdateColliderTransform, COLLIDER_o240) + Set(LVarF, 0) + Loop(120) + Add(LVarF, 1) + Call(N(CosInterpMinMax), LVarF, LVar0, 70, 0, 120, 0, 0) + Exec(N(EVS_SetBigLeafPosition)) + SetF(LVar2, LVar0) + MulF(LVar2, Float(-3.0)) + SetF(LVar3, LVar0) + Call(N(PlayerRideBeanstalk)) + Call(N(PartnerRideBeanstalk)) + Wait(1) + EndLoop + Call(EnablePartnerAI) + Call(ClearPartnerMoveHistory, NPC_PARTNER) + Call(SetPlayerJumpscale, 1) + Call(PlayerJump, 10, 0, 110, 20) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(InterpPlayerYaw, 90, 0) + Wait(5) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK) + Set(AF_FLO_RidingBeanstalk, FALSE) + Call(StopSound, SOUND_FLO_RIDE_BEANSTALK_DOWN_LOOP) + ExecWait(N(EVS_SetupMusic)) + Call(ResetCam, CAM_DEFAULT, Float(1.0)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Scene_BeanstalkGrowing) = { - EVT_CALL(PlaySoundAtCollider, COLLIDER_o261, SOUND_FLO_BEANSTALK_START_GROWING, SOUND_SPACE_DEFAULT) - EVT_SET(LVarF, 0) - EVT_LOOP(100) - EVT_ADD(LVarF, 1) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, 0, EVT_FLOAT(1.0), 100, 0, 0) - EVT_EXEC(N(EVS_SetSproutGrowth)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(MV_BeanstalkSceneSync, FALSE) - EVT_THREAD - EVT_SET(LVarF, 0) - EVT_LOOP(1200) - EVT_ADD(LVarF, 1) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, -700, 0, 1200, 0, 0) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(1.0)) - EVT_SETF(LVar0, LVar2) - EVT_EXEC(N(EVS_SetExteriorVineGrowth)) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(1.0)) - EVT_SETF(LVar0, LVar2) - EVT_EXEC(N(EVS_SetInteriorVineGrowth)) - EVT_SWITCH(LVarF) - EVT_CASE_EQ(200) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_CASE_EQ(250) - EVT_SET(LVar0, -60) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 65) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(12.5), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 800) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -200, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -300) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CASE_DEFAULT - EVT_END_SWITCH - EVT_IF_GT(LVarF, 550) - EVT_SET(MV_BeanstalkSceneSync, TRUE) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_LABEL(10) - EVT_IF_EQ(MV_BeanstalkSceneSync, FALSE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(FadeInMusic, 0, SONG_CLOUDY_CLIMB, 0, 3000, 0, 127) - EVT_CALL(FadeOutMusic, 1, 3000) - EVT_CALL(GotoMap, EVT_PTR("flo_19"), flo_19_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(PlaySoundAtCollider, COLLIDER_o261, SOUND_FLO_BEANSTALK_START_GROWING, SOUND_SPACE_DEFAULT) + Set(LVarF, 0) + Loop(100) + Add(LVarF, 1) + Call(N(CosInterpMinMax), LVarF, LVar0, 0, Float(1.0), 100, 0, 0) + Exec(N(EVS_SetSproutGrowth)) + Wait(1) + EndLoop + Set(MV_BeanstalkSceneSync, FALSE) + Thread + Set(LVarF, 0) + Loop(1200) + Add(LVarF, 1) + Call(N(CosInterpMinMax), LVarF, LVar0, -700, 0, 1200, 0, 0) + SetF(LVar2, LVar0) + MulF(LVar2, Float(1.0)) + SetF(LVar0, LVar2) + Exec(N(EVS_SetExteriorVineGrowth)) + SetF(LVar2, LVar0) + MulF(LVar2, Float(1.0)) + SetF(LVar0, LVar2) + Exec(N(EVS_SetInteriorVineGrowth)) + Switch(LVarF) + CaseEq(200) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + CaseEq(250) + Set(LVar0, -60) + Set(LVar1, 0) + Set(LVar2, 65) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(12.5), Float(-7.0)) + Call(SetCamDistance, CAM_DEFAULT, 800) + Call(SetCamPosA, CAM_DEFAULT, -200, 0) + Call(SetCamPosB, CAM_DEFAULT, 0, -300) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + CaseDefault + EndSwitch + IfGt(LVarF, 550) + Set(MV_BeanstalkSceneSync, TRUE) + EndIf + Wait(1) + EndLoop + EndThread + Label(10) + IfEq(MV_BeanstalkSceneSync, FALSE) + Wait(1) + Goto(10) + EndIf + Call(FadeInMusic, 0, SONG_CLOUDY_CLIMB, 0, 3000, 0, 127) + Call(FadeOutMusic, 1, 3000) + Call(GotoMap, Ref("flo_19"), flo_19_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_Scene_BeanstalkGrewRemark) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterpPlayerYaw, 200, 0) - EVT_CALL(SetPlayerPos, -60, 0, 30) - EVT_CALL(NpcFacePlayer, NPC_PARTNER, 1) - EVT_CALL(SetNpcPos, NPC_PARTNER, -20, 0, 10) - EVT_SET(LVar0, -60) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 65) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(12.5), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 800) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -200, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -300) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_SET(LVarF, 0) - EVT_LOOP(5) - EVT_ADD(LVarF, 20) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, EVT_FLOAT(0.0), EVT_FLOAT(1.0), 100, 0, 0) - EVT_EXEC(N(EVS_SetBigLeafGrowth)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o240, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_000A, 0, 50, -200) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(InterpPlayerYaw, 200, 0) + Call(SetPlayerPos, -60, 0, 30) + Call(NpcFacePlayer, NPC_PARTNER, 1) + Call(SetNpcPos, NPC_PARTNER, -20, 0, 10) + Set(LVar0, -60) + Set(LVar1, 0) + Set(LVar2, 65) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(12.5), Float(-7.0)) + Call(SetCamDistance, CAM_DEFAULT, 800) + Call(SetCamPosA, CAM_DEFAULT, -200, 0) + Call(SetCamPosB, CAM_DEFAULT, 0, -300) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Set(LVarF, 0) + Loop(5) + Add(LVarF, 20) + Call(N(CosInterpMinMax), LVarF, LVar0, Float(0.0), Float(1.0), 100, 0, 0) + Exec(N(EVS_SetBigLeafGrowth)) + Wait(1) + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o240, COLLIDER_FLAGS_UPPER_MASK) + Call(ShowMessageAtWorldPos, MSG_CH6_000A, 0, 50, -200) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Call(DisablePlayerInput, FALSE) + Return + End }; s32 N(BeanstalkIngredients)[] = { @@ -461,209 +461,209 @@ s32 N(BeanstalkIngredients)[] = { }; EvtScript N(EVS_BeanPatch_ItemPrompt) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(FacePlayerTowardPoint, -85, 85, 0) - EVT_CALL(func_802CF56C, 2) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_IF_EQ(GF_FLO00_PlacedFertileSoil, FALSE) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_LABEL(10) - EVT_CALL(ShowKeyChoicePopup) - EVT_SET(LVar2, LVar0) - EVT_SWITCH(LVar2) - EVT_CASE_LE(ITEM_NONE) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_CALL(AwaitPlayerLeave, -85, 85, 28) - EVT_RETURN - EVT_CASE_EQ(ITEM_FERTILE_SOIL) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_PlaceItem) - EVT_WAIT(5) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(MakeItemEntity, ITEM_FERTILE_SOIL, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(MV_BeanstalkItemEntity, LVar0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Still) - EVT_WAIT(20) - EVT_CASE_DEFAULT - EVT_SWITCH(AF_FLO_PlatingInstructionsToggle) - EVT_CASE_EQ(0) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0008, 0, 10, -200) - EVT_SET(AF_FLO_PlatingInstructionsToggle, TRUE) - EVT_CASE_DEFAULT - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0009, 0, 10, -200) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_IF_NE(LVar2, 89) - EVT_GOTO(10) - EVT_END_IF - EVT_SET(GF_FLO00_PlacedFertileSoil, TRUE) - EVT_END_IF - EVT_IF_EQ(GF_FLO00_PlacedMagicalBean, FALSE) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_LABEL(20) - EVT_CALL(ShowKeyChoicePopup) - EVT_SET(LVar2, LVar0) - EVT_SWITCH(LVar2) - EVT_CASE_LE(ITEM_NONE) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_CALL(AwaitPlayerLeave, -85, 85, 28) - EVT_RETURN - EVT_CASE_EQ(ITEM_MAGICAL_BEAN) - EVT_CALL(RemoveItemEntity, MV_BeanstalkItemEntity) - EVT_WAIT(5) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_PlaceItem) - EVT_WAIT(5) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(MakeItemEntity, ITEM_MAGICAL_BEAN, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(MV_BeanstalkItemEntity, LVar0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Still) - EVT_WAIT(20) - EVT_CASE_DEFAULT - EVT_SWITCH(AF_FLO_PlatingInstructionsToggle) - EVT_CASE_EQ(0) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0008, 0, 10, -200) - EVT_SET(AF_FLO_PlatingInstructionsToggle, TRUE) - EVT_CASE_DEFAULT - EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0009, 0, 10, -200) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_IF_NE(LVar2, 88) - EVT_GOTO(20) - EVT_END_IF - EVT_SET(GF_FLO00_PlacedMagicalBean, TRUE) - EVT_END_IF - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_LABEL(30) - EVT_CALL(ShowKeyChoicePopup) - EVT_SET(LVar2, LVar0) - EVT_SWITCH(LVar2) - EVT_CASE_LE(ITEM_NONE) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_CALL(AwaitPlayerLeave, -85, 85, 28) - EVT_RETURN - EVT_CASE_EQ(ITEM_MIRACLE_WATER) - EVT_CALL(RemoveItemEntity, MV_BeanstalkItemEntity) - EVT_WAIT(5) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_PlaceItem) - EVT_WAIT(5) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(N(SyncStatusBar)) - EVT_CALL(MakeItemEntity, ITEM_MIRACLE_WATER, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(MV_BeanstalkItemEntity, LVar0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Still) - EVT_WAIT(30) - EVT_CALL(RemoveItemEntity, MV_BeanstalkItemEntity) - EVT_WAIT(30) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlayerMoveTo, -60, 30, 20) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(InterpPlayerYaw, 200, 0) - EVT_CALL(func_802CF56C, 2) - EVT_WAIT(60) - EVT_CALL(FadeInMusic, 1, SONG_MAGIC_BEANSTALK, 0, 3000, 0, 127) - EVT_CALL(FadeOutMusic, 0, 3000) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -85, 0, 75) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -85, 0, 75) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC_WAIT(N(EVS_Scene_BeanstalkGrowing)) - EVT_END_SWITCH - EVT_IF_NE(LVar2, 90) - EVT_GOTO(30) - EVT_END_IF - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(FacePlayerTowardPoint, -85, 85, 0) + Call(func_802CF56C, 2) + Call(DisablePlayerInput, FALSE) + IfEq(GF_FLO00_PlacedFertileSoil, FALSE) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Label(10) + Call(ShowKeyChoicePopup) + Set(LVar2, LVar0) + Switch(LVar2) + CaseLe(ITEM_NONE) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Call(AwaitPlayerLeave, -85, 85, 28) + Return + CaseEq(ITEM_FERTILE_SOIL) + Call(SetPlayerAnimation, ANIM_MarioW1_PlaceItem) + Wait(5) + Call(RemoveKeyItemAt, LVar1) + Call(MakeItemEntity, ITEM_FERTILE_SOIL, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0) + Set(MV_BeanstalkItemEntity, LVar0) + Call(SetPlayerAnimation, ANIM_Mario1_Still) + Wait(20) + CaseDefault + Switch(AF_FLO_PlatingInstructionsToggle) + CaseEq(0) + Call(ShowMessageAtWorldPos, MSG_CH6_0008, 0, 10, -200) + Set(AF_FLO_PlatingInstructionsToggle, TRUE) + CaseDefault + Call(ShowMessageAtWorldPos, MSG_CH6_0009, 0, 10, -200) + EndSwitch + EndSwitch + Call(DisablePlayerInput, FALSE) + Call(DisablePlayerPhysics, FALSE) + IfNe(LVar2, 89) + Goto(10) + EndIf + Set(GF_FLO00_PlacedFertileSoil, TRUE) + EndIf + IfEq(GF_FLO00_PlacedMagicalBean, FALSE) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Label(20) + Call(ShowKeyChoicePopup) + Set(LVar2, LVar0) + Switch(LVar2) + CaseLe(ITEM_NONE) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Call(AwaitPlayerLeave, -85, 85, 28) + Return + CaseEq(ITEM_MAGICAL_BEAN) + Call(RemoveItemEntity, MV_BeanstalkItemEntity) + Wait(5) + Call(SetPlayerAnimation, ANIM_MarioW1_PlaceItem) + Wait(5) + Call(RemoveKeyItemAt, LVar1) + Call(MakeItemEntity, ITEM_MAGICAL_BEAN, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0) + Set(MV_BeanstalkItemEntity, LVar0) + Call(SetPlayerAnimation, ANIM_Mario1_Still) + Wait(20) + CaseDefault + Switch(AF_FLO_PlatingInstructionsToggle) + CaseEq(0) + Call(ShowMessageAtWorldPos, MSG_CH6_0008, 0, 10, -200) + Set(AF_FLO_PlatingInstructionsToggle, TRUE) + CaseDefault + Call(ShowMessageAtWorldPos, MSG_CH6_0009, 0, 10, -200) + EndSwitch + EndSwitch + Call(DisablePlayerInput, FALSE) + Call(DisablePlayerPhysics, FALSE) + IfNe(LVar2, 88) + Goto(20) + EndIf + Set(GF_FLO00_PlacedMagicalBean, TRUE) + EndIf + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Label(30) + Call(ShowKeyChoicePopup) + Set(LVar2, LVar0) + Switch(LVar2) + CaseLe(ITEM_NONE) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Call(AwaitPlayerLeave, -85, 85, 28) + Return + CaseEq(ITEM_MIRACLE_WATER) + Call(RemoveItemEntity, MV_BeanstalkItemEntity) + Wait(5) + Call(SetPlayerAnimation, ANIM_MarioW1_PlaceItem) + Wait(5) + Call(RemoveKeyItemAt, LVar1) + Call(N(SyncStatusBar)) + Call(MakeItemEntity, ITEM_MIRACLE_WATER, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0) + Set(MV_BeanstalkItemEntity, LVar0) + Call(SetPlayerAnimation, ANIM_Mario1_Still) + Wait(30) + Call(RemoveItemEntity, MV_BeanstalkItemEntity) + Wait(30) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) + Call(PlayerMoveTo, -60, 30, 20) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK) + Call(InterpPlayerYaw, 200, 0) + Call(func_802CF56C, 2) + Wait(60) + Call(FadeInMusic, 1, SONG_MAGIC_BEANSTALK, 0, 3000, 0, 127) + Call(FadeOutMusic, 0, 3000) + Call(UseSettingsFrom, CAM_DEFAULT, -85, 0, 75) + Call(SetPanTarget, CAM_DEFAULT, -85, 0, 75) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-6.0)) + Call(SetCamDistance, CAM_DEFAULT, 250) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + ExecWait(N(EVS_Scene_BeanstalkGrowing)) + EndSwitch + IfNe(LVar2, 90) + Goto(30) + EndIf + Return + End }; EvtScript N(EVS_BeanPatch_TryInteract) = { - EVT_LABEL(0) - EVT_CALL(IsPlayerWithin, -85, 85, 20, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_ELSE - EVT_CALL(IsPlayerOnValidFloor, LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(N(DisableStatusBar)) - EVT_EXEC_WAIT(N(EVS_BeanPatch_ItemPrompt)) - EVT_CALL(N(EnableWorldStatusBar)) - EVT_RETURN - EVT_END + Label(0) + Call(IsPlayerWithin, -85, 85, 20, LVar0) + IfEq(LVar0, 0) + Return + Else + Call(IsPlayerOnValidFloor, LVar0) + IfEq(LVar0, FALSE) + Wait(1) + Goto(0) + EndIf + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, PARTNER_NONE) + Return + EndIf + EndIf + Call(N(DisableStatusBar)) + ExecWait(N(EVS_BeanPatch_ItemPrompt)) + Call(N(EnableWorldStatusBar)) + Return + End }; EvtScript N(EVS_SetupBeanPatch) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH6_GREW_MAGIC_BEANSTALK) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_EQ(GB_StoryProgress, STORY_CH6_WISTERWOOD_GAVE_HINT) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_IF_EQ(GF_FLO00_PlacedFertileSoil, TRUE) - EVT_IF_EQ(GF_FLO00_PlacedMagicalBean, FALSE) - EVT_CALL(MakeItemEntity, ITEM_FERTILE_SOIL, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_ELSE - EVT_CALL(MakeItemEntity, ITEM_MAGICAL_BEAN, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_END_IF - EVT_SET(MV_BeanstalkItemEntity, LVar0) - EVT_END_IF - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_BeanPatch_TryInteract)), TRIGGER_FORCE_ACTIVATE, 0, EVT_PTR(N(BeanstalkIngredients)), 0, 1) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH6_GREW_MAGIC_BEANSTALK) + Loop(0) + Wait(1) + IfEq(GB_StoryProgress, STORY_CH6_WISTERWOOD_GAVE_HINT) + BreakLoop + EndIf + EndLoop + IfEq(GF_FLO00_PlacedFertileSoil, TRUE) + IfEq(GF_FLO00_PlacedMagicalBean, FALSE) + Call(MakeItemEntity, ITEM_FERTILE_SOIL, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0) + Else + Call(MakeItemEntity, ITEM_MAGICAL_BEAN, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0) + EndIf + Set(MV_BeanstalkItemEntity, LVar0) + EndIf + BindPadlock(Ref(N(EVS_BeanPatch_TryInteract)), TRIGGER_FORCE_ACTIVATE, 0, Ref(N(BeanstalkIngredients)), 0, 1) + EndIf + Return + End }; EvtScript N(EVS_SetupBeanstalk) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Exit_Beanstalk)), TRIGGER_FLOOR_TOUCH, COLLIDER_o240, 1, 0) - EVT_CALL(EnableGroup, MODEL_ha, TRUE) - EVT_CALL(EnableGroup, MODEL_tuta, TRUE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_CH6_WISTERWOOD_GAVE_HINT) - EVT_SET(LVar0, -700) - EVT_EXEC(N(EVS_SetExteriorVineGrowth)) - EVT_EXEC(N(EVS_SetInteriorVineGrowth)) - EVT_SET(LVar0, 0) - EVT_EXEC(N(EVS_SetSproutGrowth)) - EVT_SET(LVar0, 0) - EVT_EXEC(N(EVS_SetBigLeafGrowth)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o240, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) - EVT_CASE_GE(STORY_CH6_GREW_MAGIC_BEANSTALK) - EVT_SET(LVar0, 1) - EVT_EXEC(N(EVS_SetSproutGrowth)) - EVT_SET(LVar0, 1) - EVT_EXEC(N(EVS_SetBigLeafGrowth)) - EVT_CASE_DEFAULT - EVT_SET(LVar0, -700) - EVT_EXEC(N(EVS_SetExteriorVineGrowth)) - EVT_EXEC(N(EVS_SetInteriorVineGrowth)) - EVT_SET(LVar0, 0) - EVT_EXEC(N(EVS_SetSproutGrowth)) - EVT_SET(LVar0, 0) - EVT_EXEC(N(EVS_SetBigLeafGrowth)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o240, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_SWITCH - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_Exit_Beanstalk)), TRIGGER_FLOOR_TOUCH, COLLIDER_o240, 1, 0) + Call(EnableGroup, MODEL_ha, TRUE) + Call(EnableGroup, MODEL_tuta, TRUE) + Switch(GB_StoryProgress) + CaseEq(STORY_CH6_WISTERWOOD_GAVE_HINT) + Set(LVar0, -700) + Exec(N(EVS_SetExteriorVineGrowth)) + Exec(N(EVS_SetInteriorVineGrowth)) + Set(LVar0, 0) + Exec(N(EVS_SetSproutGrowth)) + Set(LVar0, 0) + Exec(N(EVS_SetBigLeafGrowth)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o240, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) + CaseGe(STORY_CH6_GREW_MAGIC_BEANSTALK) + Set(LVar0, 1) + Exec(N(EVS_SetSproutGrowth)) + Set(LVar0, 1) + Exec(N(EVS_SetBigLeafGrowth)) + CaseDefault + Set(LVar0, -700) + Exec(N(EVS_SetExteriorVineGrowth)) + Exec(N(EVS_SetInteriorVineGrowth)) + Set(LVar0, 0) + Exec(N(EVS_SetSproutGrowth)) + Set(LVar0, 0) + Exec(N(EVS_SetBigLeafGrowth)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o240, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK) + EndSwitch + Return + End }; diff --git a/src/world/dead/area_flo/flo_00/flo_00_6_entity.c b/src/world/dead/area_flo/flo_00/flo_00_6_entity.c index 99bbcada6e0..f5578c5ba1e 100644 --- a/src/world/dead/area_flo/flo_00/flo_00_6_entity.c +++ b/src/world/dead/area_flo/flo_00/flo_00_6_entity.c @@ -2,9 +2,9 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_IF_LT(GB_StoryProgress, STORY_EPILOGUE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 110, 60, -100, 0, MAKE_ENTITY_END) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_EPILOGUE) + Call(MakeEntity, Ref(Entity_SavePoint), 110, 60, -100, 0, MAKE_ENTITY_END) + EndIf + Return + End }; diff --git a/src/world/dead/area_flo/flo_03/flo_03_1_music.c b/src/world/dead/area_flo/flo_03/flo_03_1_music.c index ec976c9d85f..42435085978 100644 --- a/src/world/dead/area_flo/flo_03/flo_03_1_music.c +++ b/src/world/dead/area_flo/flo_03/flo_03_1_music.c @@ -1,45 +1,45 @@ #include "flo_03.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, flo_03_ENTRY_2) - EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) - EVT_ELSE - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LE(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_IF_EQ(GF_FLO03_DefeatedAll_MontyMoles, FALSE) - EVT_CALL(SetMusicTrack, 0, SONG_MONTY_MOLE_ASSAULT, 0, 8) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_END_IF - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, flo_03_ENTRY_2) + Call(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) + Else + Switch(GB_StoryProgress) + CaseLe(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + IfEq(GF_FLO03_DefeatedAll_MontyMoles, FALSE) + Call(SetMusicTrack, 0, SONG_MONTY_MOLE_ASSAULT, 0, 8) + Else + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + EndIf + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndSwitch + EndIf + Return + End }; EvtScript N(EVS_PushFlowerSong) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_IF_EQ(GF_FLO03_DefeatedAll_MontyMoles, TRUE) - EVT_CALL(PushSong, SONG_FLOWER_NPC_THEME, 0) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + IfEq(GF_FLO03_DefeatedAll_MontyMoles, TRUE) + Call(PushSong, SONG_FLOWER_NPC_THEME, 0) + EndIf + EndIf + Return + End }; EvtScript N(EVS_PopSong) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_IF_EQ(GF_FLO03_DefeatedAll_MontyMoles, TRUE) - EVT_CALL(FadeOutMusic, 0, 250) - EVT_WAIT(10) - EVT_CALL(PopSong) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + IfEq(GF_FLO03_DefeatedAll_MontyMoles, TRUE) + Call(FadeOutMusic, 0, 250) + Wait(10) + Call(PopSong) + EndIf + EndIf + Return + End }; diff --git a/src/world/dead/area_flo/flo_03/flo_03_2_main.c b/src/world/dead/area_flo/flo_03/flo_03_2_main.c index 081f622d37c..1d9923491b9 100644 --- a/src/world/dead/area_flo/flo_03/flo_03_2_main.c +++ b/src/world/dead/area_flo/flo_03/flo_03_2_main.c @@ -12,40 +12,40 @@ EvtScript N(EVS_ExitWalk_flo_09_1) = EVT_EXIT_WALK(60, flo_03_ENTRY_0, "flo_09", EvtScript N(EVS_ExitWalk_flo_22_0) = EVT_EXIT_WALK(60, flo_03_ENTRY_1, "flo_22", flo_22_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_09_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_22_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_09_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_flo_22_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_SET(AF_FLO_TreeDrop_RedBerry1, FALSE) - EVT_SET(AF_FLO_TreeDrop_RedBerry2, FALSE) - EVT_SET(AB_FLO_PetuniaDialogue, 0) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC_WAIT(N(EVS_SetupMoles)) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_EXEC(N(EVS_EmptyEntityHandler)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o160, SURFACE_TYPE_FLOWERS) + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + Set(AF_FLO_TreeDrop_RedBerry1, FALSE) + Set(AF_FLO_TreeDrop_RedBerry2, FALSE) + Set(AB_FLO_PetuniaDialogue, 0) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + ExecWait(N(EVS_SetupMoles)) + Exec(N(EVS_SetupFoliage)) + Exec(N(EVS_EmptyEntityHandler)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o160, SURFACE_TYPE_FLOWERS) EVT_FLOWER_SPAWN_REGION( -145, -335, 182, -180, 0) EVT_FLOWER_SPAWN_REGION( 200, -170, 310, 150, 0) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, flo_03_ENTRY_2) - EVT_EXEC(N(EVS_Scene_SunReturns)) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, flo_03_ENTRY_2) + Exec(N(EVS_Scene_SunReturns)) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndIf + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Return + End }; diff --git a/src/world/dead/area_flo/flo_03/flo_03_3_npc.c b/src/world/dead/area_flo/flo_03/flo_03_3_npc.c index cc29bf9ef83..9557efe04d6 100644 --- a/src/world/dead/area_flo/flo_03/flo_03_3_npc.c +++ b/src/world/dead/area_flo/flo_03/flo_03_3_npc.c @@ -40,27 +40,27 @@ Vec3i N(BurrowLocations_Mole_04)[] = { }; EvtScript N(EVS_Scene_SunReturns) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetNpcYaw, NPC_Petunia, 90) - EVT_CALL(GetNpcPos, NPC_Petunia, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-9.5)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, -27, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -50) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_Petunia, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_00C8) - EVT_CALL(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Dance) - EVT_WAIT(10) - EVT_CALL(GotoMap, EVT_PTR("flo_18"), flo_18_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetNpcYaw, NPC_Petunia, 90) + Call(GetNpcPos, NPC_Petunia, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-9.5)) + Call(SetCamPosA, CAM_DEFAULT, -27, 0) + Call(SetCamPosB, CAM_DEFAULT, 0, -50) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20) + Call(SpeakToPlayer, NPC_Petunia, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_00C8) + Call(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Dance) + Wait(10) + Call(GotoMap, Ref("flo_18"), flo_18_ENTRY_1) + Wait(100) + Return + End }; API_CALLABLE(N(HideBehindTree)) { @@ -119,666 +119,666 @@ API_CALLABLE(N(HideBehindTree)) { } EvtScript N(EVS_NpcAI_Dayzee) = { - EVT_CALL(N(HideBehindTree)) - EVT_RETURN - EVT_END + Call(N(HideBehindTree)) + Return + End }; EvtScript N(EVS_NpcDefeat_Dayzee) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_SET(GF_FLO03_Defeated_Dayzee, TRUE) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Set(GF_FLO03_Defeated_Dayzee, TRUE) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_FocusCamBetween) = { - EVT_CALL(GetPlayerPos, LVar3, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, LVar3) - EVT_DIV(LVar0, 2) - EVT_CALL(SetCamProperties, CAM_DEFAULT, LVar4, LVar0, LVar1, LVar2, 300, EVT_FLOAT(20.0), EVT_FLOAT(-9.5)) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar3, LVar1, LVar2) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar0, LVar3) + Div(LVar0, 2) + Call(SetCamProperties, CAM_DEFAULT, LVar4, LVar0, LVar1, LVar2, 300, Float(20.0), Float(-9.5)) + Return + End }; EvtScript N(EVS_NpcInteract_Petunia) = { - EVT_EXEC_WAIT(N(EVS_PushFlowerSong)) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_SET(MV_PauseBurrowing, TRUE) - EVT_SET(LVar4, EVT_FLOAT(3.5)) - EVT_EXEC_WAIT(N(EVS_FocusCamBetween)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0050) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Petunia_Angry) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0051) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim12) - EVT_CALL(SetNpcYaw, NPC_MontyMole_01, 270) - EVT_CALL(GetNpcPos, NPC_MontyMole_01, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-8.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 200) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim16) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_MontyMole_01, EMOTE_QUESTION, -45, 30, EMOTER_NPC, 0, 0, 0, 0) - EVT_CALL(GetNpcPos, NPC_MontyMole_02, LVar0, LVar1, LVar2) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0052) - EVT_CALL(SetNpcYaw, NPC_MontyMole_02, 90) - EVT_CALL(SetNpcPos, NPC_MontyMole_02, NPC_DISPOSE_LOCATION) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 200) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-8.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim00) - EVT_WAIT(20) - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_02, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcPos, NPC_MontyMole_02, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim10) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0053) - EVT_CALL(SetNpcYaw, NPC_MontyMole_03, 270) - EVT_CALL(GetNpcPos, NPC_MontyMole_03, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 200) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-8.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim14) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0054) - EVT_CALL(SetNpcYaw, NPC_MontyMole_04, 270) - EVT_CALL(GetNpcPos, NPC_MontyMole_04, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 200) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-9.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim06) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim07) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim08) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim16) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0055) - EVT_CALL(SetNpcPos, NPC_Dayzee, -233, 0, -217) - EVT_CALL(GetNpcPos, NPC_Dayzee, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-9.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcAnimation, NPC_Dayzee, ANIM_Dayzee_Anim0D) - EVT_CALL(PlaySoundAtNpc, NPC_Dayzee, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_Dayzee, EMOTE_EXCLAMATION, 45, 30, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(15) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0056) - EVT_SET(LVar4, EVT_FLOAT(90.0)) - EVT_EXEC_WAIT(N(EVS_FocusCamBetween)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0057) - EVT_CALL(SetEnemyFlagBits, NPC_Dayzee, ENEMY_FLAG_PASSIVE, 0) - EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_01, ENEMY_FLAG_PASSIVE, 0) - EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_02, ENEMY_FLAG_PASSIVE, 0) - EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_03, ENEMY_FLAG_PASSIVE, 0) - EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_04, ENEMY_FLAG_PASSIVE, 0) - EVT_CALL(BindNpcAI, NPC_Dayzee, EVT_PTR(N(EVS_NpcAI_Dayzee))) - EVT_SET(MV_PauseBurrowing, FALSE) - EVT_SET(MV_NextBurrowTriggerRadius, 60) - EVT_SET(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_CASE_EQ(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_IF_EQ(GF_FLO03_DefeatedAll_MontyMoles, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0058) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Petunia_Angry) - EVT_ELSE - EVT_SET(LVar4, EVT_FLOAT(3.5)) - EVT_EXEC_WAIT(N(EVS_FocusCamBetween)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_HappyTalk, ANIM_Petunia_Dance, 0, MSG_CH6_0059) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Petunia_GiveItem) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Petunia_Idle) + ExecWait(N(EVS_PushFlowerSong)) + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + Set(MV_PauseBurrowing, TRUE) + Set(LVar4, Float(3.5)) + ExecWait(N(EVS_FocusCamBetween)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0050) + Call(SetNpcAnimation, NPC_SELF, ANIM_Petunia_Angry) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + Wait(20) + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0051) + Call(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim12) + Call(SetNpcYaw, NPC_MontyMole_01, 270) + Call(GetNpcPos, NPC_MontyMole_01, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-8.0)) + Call(SetCamDistance, CAM_DEFAULT, 200) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20) + Call(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim16) + Wait(10) + Call(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_EMOTE_QUESTION, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_MontyMole_01, EMOTE_QUESTION, -45, 30, EMOTER_NPC, 0, 0, 0, 0) + Call(GetNpcPos, NPC_MontyMole_02, LVar0, LVar1, LVar2) + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0052) + Call(SetNpcYaw, NPC_MontyMole_02, 90) + Call(SetNpcPos, NPC_MontyMole_02, NPC_DISPOSE_LOCATION) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 200) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-8.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim00) + Wait(20) + Call(PlaySoundAtNpc, NPC_MontyMole_02, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) + Call(SetNpcPos, NPC_MontyMole_02, LVar0, LVar1, LVar2) + Call(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim10) + Wait(20) + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0053) + Call(SetNpcYaw, NPC_MontyMole_03, 270) + Call(GetNpcPos, NPC_MontyMole_03, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 200) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-8.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20) + Call(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim14) + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0054) + Call(SetNpcYaw, NPC_MontyMole_04, 270) + Call(GetNpcPos, NPC_MontyMole_04, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 200) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-9.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim06) + Wait(20) + Call(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim07) + Wait(20) + Call(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim08) + Wait(20) + Call(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim16) + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0055) + Call(SetNpcPos, NPC_Dayzee, -233, 0, -217) + Call(GetNpcPos, NPC_Dayzee, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-9.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetNpcAnimation, NPC_Dayzee, ANIM_Dayzee_Anim0D) + Call(PlaySoundAtNpc, NPC_Dayzee, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_Dayzee, EMOTE_EXCLAMATION, 45, 30, EMOTER_NPC, 0, 0, 0, 0) + Wait(15) + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0056) + Set(LVar4, Float(90.0)) + ExecWait(N(EVS_FocusCamBetween)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0057) + Call(SetEnemyFlagBits, NPC_Dayzee, ENEMY_FLAG_PASSIVE, 0) + Call(SetEnemyFlagBits, NPC_MontyMole_01, ENEMY_FLAG_PASSIVE, 0) + Call(SetEnemyFlagBits, NPC_MontyMole_02, ENEMY_FLAG_PASSIVE, 0) + Call(SetEnemyFlagBits, NPC_MontyMole_03, ENEMY_FLAG_PASSIVE, 0) + Call(SetEnemyFlagBits, NPC_MontyMole_04, ENEMY_FLAG_PASSIVE, 0) + Call(BindNpcAI, NPC_Dayzee, Ref(N(EVS_NpcAI_Dayzee))) + Set(MV_PauseBurrowing, FALSE) + Set(MV_NextBurrowTriggerRadius, 60) + Set(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + CaseEq(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + IfEq(GF_FLO03_DefeatedAll_MontyMoles, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0058) + Call(SetNpcAnimation, NPC_SELF, ANIM_Petunia_Angry) + Else + Set(LVar4, Float(3.5)) + ExecWait(N(EVS_FocusCamBetween)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_HappyTalk, ANIM_Petunia_Dance, 0, MSG_CH6_0059) + Call(EndSpeech, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Petunia_GiveItem) + Wait(20) + Call(SetNpcAnimation, NPC_SELF, ANIM_Petunia_Idle) EVT_GIVE_KEY_REWARD(ITEM_MAGICAL_BEAN) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005A) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0) - EVT_SET(GB_StoryProgress, STORY_CH6_GOT_MAGICAL_BEAN) - EVT_END_IF - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005B) - EVT_CASE_LT(STORY_CH6_RETURNED_TO_TOAD_TOWN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005C) - EVT_CASE_DEFAULT - EVT_IF_EQ(AB_FLO_PetuniaDialogue, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005D) - EVT_SET(AB_FLO_PetuniaDialogue, 1) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005E) - EVT_END_IF - EVT_END_SWITCH - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(8.0)) - EVT_EXEC_WAIT(N(EVS_PopSong)) - EVT_RETURN - EVT_END + Wait(20) + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005A) + Call(EndSpeech, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0) + Set(GB_StoryProgress, STORY_CH6_GOT_MAGICAL_BEAN) + EndIf + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005B) + CaseLt(STORY_CH6_RETURNED_TO_TOAD_TOWN) + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005C) + CaseDefault + IfEq(AB_FLO_PetuniaDialogue, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005D) + Set(AB_FLO_PetuniaDialogue, 1) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005E) + EndIf + EndSwitch + Call(ResetCam, CAM_DEFAULT, Float(8.0)) + ExecWait(N(EVS_PopSong)) + Return + End }; EvtScript N(EVS_NpcInit_Petunia) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Petunia))) - EVT_IF_EQ(GF_FLO03_DefeatedAll_MontyMoles, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Angry) - EVT_ELSE - EVT_CALL(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Idle) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Petunia))) + IfEq(GF_FLO03_DefeatedAll_MontyMoles, FALSE) + Call(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Angry) + Else + Call(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Idle) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Dayzee) = { - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Dayzee))) - EVT_CALL(EnableNpcShadow, NPC_Dayzee, FALSE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_CALL(SetNpcPos, NPC_Dayzee, NPC_DISPOSE_LOCATION) - EVT_CASE_DEFAULT - EVT_IF_EQ(GF_FLO03_Defeated_Dayzee, FALSE) - EVT_CALL(SetEnemyFlagBits, NPC_Dayzee, ENEMY_FLAG_PASSIVE, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Dayzee))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_Dayzee, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Dayzee))) + Call(EnableNpcShadow, NPC_Dayzee, FALSE) + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + Call(SetNpcPos, NPC_Dayzee, NPC_DISPOSE_LOCATION) + CaseDefault + IfEq(GF_FLO03_Defeated_Dayzee, FALSE) + Call(SetEnemyFlagBits, NPC_Dayzee, ENEMY_FLAG_PASSIVE, 0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcAI_Dayzee))) + Else + Call(SetNpcPos, NPC_Dayzee, NPC_DISPOSE_LOCATION) + EndIf + EndSwitch + Return + End }; EvtScript N(EVS_SetupMoles) = { - EVT_SET(MV_PauseBurrowing, FALSE) - EVT_SET(MV_NextBurrowTime_Mole_01, 0) - EVT_SET(MV_NextBurrowTime_Mole_02, 0) - EVT_SET(MV_NextBurrowTime_Mole_03, 0) - EVT_SET(MV_NextBurrowTime_Mole_04, 0) - EVT_SET(MV_NextBurrowTriggerRadius, 100) - EVT_RETURN - EVT_END + Set(MV_PauseBurrowing, FALSE) + Set(MV_NextBurrowTime_Mole_01, 0) + Set(MV_NextBurrowTime_Mole_02, 0) + Set(MV_NextBurrowTime_Mole_03, 0) + Set(MV_NextBurrowTime_Mole_04, 0) + Set(MV_NextBurrowTriggerRadius, 100) + Return + End }; EvtScript N(EVS_NpcDefeat_MontyMole) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) // record defeat - EVT_CALL(GetSelfNpcID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(NPC_MontyMole_01) - EVT_SET(GF_FLO03_Defeated_MontyMoleA, TRUE) - EVT_CASE_EQ(NPC_MontyMole_02) - EVT_SET(GF_FLO03_Defeated_MontyMoleB, TRUE) - EVT_CASE_EQ(NPC_MontyMole_03) - EVT_SET(GF_FLO03_Defeated_MontyMoleC, TRUE) - EVT_CASE_EQ(NPC_MontyMole_04) - EVT_SET(GF_FLO03_Defeated_MontyMoleD, TRUE) - EVT_END_SWITCH + Call(GetSelfNpcID, LVar0) + Switch(LVar0) + CaseEq(NPC_MontyMole_01) + Set(GF_FLO03_Defeated_MontyMoleA, TRUE) + CaseEq(NPC_MontyMole_02) + Set(GF_FLO03_Defeated_MontyMoleB, TRUE) + CaseEq(NPC_MontyMole_03) + Set(GF_FLO03_Defeated_MontyMoleC, TRUE) + CaseEq(NPC_MontyMole_04) + Set(GF_FLO03_Defeated_MontyMoleD, TRUE) + EndSwitch // count number of defeated moles - EVT_SET(LVar0, 0) - EVT_ADD(LVar0, GF_FLO03_Defeated_MontyMoleA) - EVT_ADD(LVar0, GF_FLO03_Defeated_MontyMoleB) - EVT_ADD(LVar0, GF_FLO03_Defeated_MontyMoleC) - EVT_ADD(LVar0, GF_FLO03_Defeated_MontyMoleD) + Set(LVar0, 0) + Add(LVar0, GF_FLO03_Defeated_MontyMoleA) + Add(LVar0, GF_FLO03_Defeated_MontyMoleB) + Add(LVar0, GF_FLO03_Defeated_MontyMoleC) + Add(LVar0, GF_FLO03_Defeated_MontyMoleD) // end the mole-hunting minigame if all 4 are defeated - EVT_IF_NE(LVar0, 4) - EVT_CALL(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Angry) - EVT_ELSE - EVT_CALL(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Idle) - EVT_SET(GF_FLO03_DefeatedAll_MontyMoles, TRUE) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_END_IF - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MontyMole_Dark_Anim01) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MontyMole_Dark_Anim01) - EVT_END_SWITCH - EVT_RETURN - EVT_END + IfNe(LVar0, 4) + Call(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Angry) + Else + Call(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Idle) + Set(GF_FLO03_DefeatedAll_MontyMoles, TRUE) + ExecWait(N(EVS_SetupMusic)) + EndIf + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_LOST) + Call(SetNpcAnimation, NPC_SELF, ANIM_MontyMole_Dark_Anim01) + CaseEq(OUTCOME_PLAYER_FLED) + Call(SetNpcAnimation, NPC_SELF, ANIM_MontyMole_Dark_Anim01) + EndSwitch + Return + End }; EvtScript N(EVS_NpcHit_MontyMole) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_DEBUG_LOG(EVT_PTR("touch_choro\n")) - EVT_CALL(GetOwnerEncounterTrigger, LVar0) - EVT_DEBUG_PRINT_VAR(LVar0) - EVT_IF_NE(LVar0, ENCOUNTER_TRIGGER_NONE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MontyMole_Dark_Anim05) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + EVT_DEBUG_LOG(Ref("touch_choro\n")) + Call(GetOwnerEncounterTrigger, LVar0) + DebugPrintVar(LVar0) + IfNe(LVar0, ENCOUNTER_TRIGGER_NONE) + Call(SetNpcAnimation, NPC_SELF, ANIM_MontyMole_Dark_Anim05) + EndIf + EndIf + Return + End }; EvtScript N(EVS_NpcIdle_MontyMole_01) = { #define LV_ShouldBurrow LVar3 - EVT_LOOP(0) - EVT_IF_EQ(MV_NextBurrowTime_Mole_01, 0) - EVT_IF_EQ(AF_FLO_IsUnderground_Mole_01, TRUE) - EVT_GOTO(0) - EVT_END_IF - EVT_SET(LV_ShouldBurrow, TRUE) - EVT_ELSE - EVT_LABEL(0) - EVT_CALL(GetNpcPos, NPC_MontyMole_01, LVar0, LVar1, LVar2) - EVT_CALL(IsPlayerWithin, LVar0, LVar2, MV_NextBurrowTriggerRadius, LV_ShouldBurrow) - EVT_END_IF - EVT_CALL(GetPartnerInUse, LVar9) - EVT_IF_EQ(LVar9, PARTNER_BOW) - EVT_SET(LVar3, FALSE) - EVT_END_IF - EVT_IF_EQ(MV_PauseBurrowing, TRUE) - EVT_SET(LV_ShouldBurrow, FALSE) - EVT_END_IF - EVT_IF_EQ(LV_ShouldBurrow, TRUE) - EVT_IF_EQ(AF_FLO_IsUnderground_Mole_01, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_MontyMole_01, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_CALL(NpcFacePlayer, NPC_MontyMole_01, 1) - EVT_WAIT(1) - EVT_SET(AF_FLO_IsUnderground_Mole_01, TRUE) - EVT_IF_NE(MV_NextBurrowTime_Mole_01, 0) - EVT_IF_LT(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_SET(LVar1, 4) - EVT_ELSE - EVT_SET(LVar1, 10) - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_MontyMole_01, EMOTE_EXCLAMATION, 0, LVar1, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(LVar1) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 1) - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_BURROW_DIG, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim11) - EVT_WAIT(20) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleA, FALSE) - EVT_CALL(SetNpcPos, NPC_MontyMole_01, 0, -50, 0) - EVT_END_IF - EVT_WAIT(45) - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(AF_FLO_IsUnderground_Mole_01, TRUE) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleA, FALSE) - EVT_CALL(RandInt, ARRAY_COUNT(N(BurrowLocations_Mole_01)) - 1, LVar0) - EVT_ADD(LVar0, 1) - EVT_USE_BUF(EVT_PTR(N(BurrowLocations_Mole_01))) - EVT_LOOP(LVar0) - EVT_BUF_READ3(LVar1, LVar2, LVar3) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_MontyMole_01, LVar1, LVar2, LVar3) - EVT_END_IF - EVT_CALL(SetNpcFlagBits, NPC_MontyMole_01, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_SET(AF_FLO_IsUnderground_Mole_01, FALSE) - EVT_CALL(NpcFacePlayer, NPC_MontyMole_01, 1) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim10) - EVT_WAIT(10) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 0) - EVT_CALL(RandInt, 30, LVar0) - EVT_ADD(LVar0, 60) - EVT_SET(MV_NextBurrowTime_Mole_01, LVar0) - EVT_ELSE - EVT_IF_GT(MV_NextBurrowTime_Mole_01, 0) - EVT_SUB(MV_NextBurrowTime_Mole_01, 1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + IfEq(MV_NextBurrowTime_Mole_01, 0) + IfEq(AF_FLO_IsUnderground_Mole_01, TRUE) + Goto(0) + EndIf + Set(LV_ShouldBurrow, TRUE) + Else + Label(0) + Call(GetNpcPos, NPC_MontyMole_01, LVar0, LVar1, LVar2) + Call(IsPlayerWithin, LVar0, LVar2, MV_NextBurrowTriggerRadius, LV_ShouldBurrow) + EndIf + Call(GetPartnerInUse, LVar9) + IfEq(LVar9, PARTNER_BOW) + Set(LVar3, FALSE) + EndIf + IfEq(MV_PauseBurrowing, TRUE) + Set(LV_ShouldBurrow, FALSE) + EndIf + IfEq(LV_ShouldBurrow, TRUE) + IfEq(AF_FLO_IsUnderground_Mole_01, FALSE) + Call(SetNpcFlagBits, NPC_MontyMole_01, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Call(NpcFacePlayer, NPC_MontyMole_01, 1) + Wait(1) + Set(AF_FLO_IsUnderground_Mole_01, TRUE) + IfNe(MV_NextBurrowTime_Mole_01, 0) + IfLt(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + Set(LVar1, 4) + Else + Set(LVar1, 10) + EndIf + Call(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_MontyMole_01, EMOTE_EXCLAMATION, 0, LVar1, EMOTER_NPC, 0, 0, 0, 0) + Wait(LVar1) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 1) + EndIf + Call(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_BURROW_DIG, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim11) + Wait(20) + IfEq(GF_FLO03_Defeated_MontyMoleA, FALSE) + Call(SetNpcPos, NPC_MontyMole_01, 0, -50, 0) + EndIf + Wait(45) + EndIf + Else + IfEq(AF_FLO_IsUnderground_Mole_01, TRUE) + IfEq(GF_FLO03_Defeated_MontyMoleA, FALSE) + Call(RandInt, ARRAY_COUNT(N(BurrowLocations_Mole_01)) - 1, LVar0) + Add(LVar0, 1) + UseBuf(Ref(N(BurrowLocations_Mole_01))) + Loop(LVar0) + BufRead3(LVar1, LVar2, LVar3) + EndLoop + Call(SetNpcPos, NPC_MontyMole_01, LVar1, LVar2, LVar3) + EndIf + Call(SetNpcFlagBits, NPC_MontyMole_01, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Set(AF_FLO_IsUnderground_Mole_01, FALSE) + Call(NpcFacePlayer, NPC_MontyMole_01, 1) + Wait(1) + Call(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim10) + Wait(10) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 0) + Call(RandInt, 30, LVar0) + Add(LVar0, 60) + Set(MV_NextBurrowTime_Mole_01, LVar0) + Else + IfGt(MV_NextBurrowTime_Mole_01, 0) + Sub(MV_NextBurrowTime_Mole_01, 1) + EndIf + EndIf + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_MontyMole_02) = { #define LV_ShouldBurrow LVar3 - EVT_LOOP(0) - EVT_IF_EQ(MV_NextBurrowTime_Mole_02, 0) - EVT_IF_EQ(AF_FLO_IsUnderground_Mole_02, TRUE) - EVT_GOTO(0) - EVT_END_IF - EVT_SET(LV_ShouldBurrow, TRUE) - EVT_ELSE - EVT_LABEL(0) - EVT_CALL(GetNpcPos, NPC_MontyMole_02, LVar0, LVar1, LVar2) - EVT_CALL(IsPlayerWithin, LVar0, LVar2, MV_NextBurrowTriggerRadius, LV_ShouldBurrow) - EVT_END_IF - EVT_CALL(GetPartnerInUse, LVar9) - EVT_IF_EQ(LVar9, PARTNER_BOW) - EVT_SET(LV_ShouldBurrow, FALSE) - EVT_END_IF - EVT_IF_EQ(MV_PauseBurrowing, TRUE) - EVT_SET(LV_ShouldBurrow, FALSE) - EVT_END_IF - EVT_IF_EQ(LV_ShouldBurrow, TRUE) - EVT_IF_EQ(AF_FLO_IsUnderground_Mole_02, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_MontyMole_02, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_CALL(NpcFacePlayer, NPC_MontyMole_02, 1) - EVT_WAIT(1) - EVT_SET(AF_FLO_IsUnderground_Mole_02, TRUE) - EVT_IF_NE(MV_NextBurrowTime_Mole_02, 0) - EVT_IF_LT(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_SET(LVar1, 4) - EVT_ELSE - EVT_SET(LVar1, 10) - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_02, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_MontyMole_02, EMOTE_EXCLAMATION, 0, LVar1, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(LVar1) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 1) - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_02, SOUND_BURROW_DIG, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim11) - EVT_WAIT(20) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleB, FALSE) - EVT_CALL(SetNpcPos, NPC_MontyMole_02, 0, -50, 0) - EVT_END_IF - EVT_WAIT(45) - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(AF_FLO_IsUnderground_Mole_02, TRUE) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleB, FALSE) - EVT_CALL(RandInt, ARRAY_COUNT(N(BurrowLocations_Mole_02)) - 1, LVar0) - EVT_ADD(LVar0, 1) - EVT_USE_BUF(EVT_PTR(N(BurrowLocations_Mole_02))) - EVT_LOOP(LVar0) - EVT_BUF_READ3(LVar1, LVar2, LVar3) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_MontyMole_02, LVar1, LVar2, LVar3) - EVT_END_IF - EVT_CALL(SetNpcFlagBits, NPC_MontyMole_02, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_SET(AF_FLO_IsUnderground_Mole_02, FALSE) - EVT_CALL(NpcFacePlayer, NPC_MontyMole_02, 1) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_02, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim10) - EVT_WAIT(10) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 0) - EVT_CALL(RandInt, 35, LVar0) - EVT_ADD(LVar0, 55) - EVT_SET(MV_NextBurrowTime_Mole_02, LVar0) - EVT_ELSE - EVT_IF_GT(MV_NextBurrowTime_Mole_02, 0) - EVT_SUB(MV_NextBurrowTime_Mole_02, 1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + IfEq(MV_NextBurrowTime_Mole_02, 0) + IfEq(AF_FLO_IsUnderground_Mole_02, TRUE) + Goto(0) + EndIf + Set(LV_ShouldBurrow, TRUE) + Else + Label(0) + Call(GetNpcPos, NPC_MontyMole_02, LVar0, LVar1, LVar2) + Call(IsPlayerWithin, LVar0, LVar2, MV_NextBurrowTriggerRadius, LV_ShouldBurrow) + EndIf + Call(GetPartnerInUse, LVar9) + IfEq(LVar9, PARTNER_BOW) + Set(LV_ShouldBurrow, FALSE) + EndIf + IfEq(MV_PauseBurrowing, TRUE) + Set(LV_ShouldBurrow, FALSE) + EndIf + IfEq(LV_ShouldBurrow, TRUE) + IfEq(AF_FLO_IsUnderground_Mole_02, FALSE) + Call(SetNpcFlagBits, NPC_MontyMole_02, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Call(NpcFacePlayer, NPC_MontyMole_02, 1) + Wait(1) + Set(AF_FLO_IsUnderground_Mole_02, TRUE) + IfNe(MV_NextBurrowTime_Mole_02, 0) + IfLt(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + Set(LVar1, 4) + Else + Set(LVar1, 10) + EndIf + Call(PlaySoundAtNpc, NPC_MontyMole_02, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_MontyMole_02, EMOTE_EXCLAMATION, 0, LVar1, EMOTER_NPC, 0, 0, 0, 0) + Wait(LVar1) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 1) + EndIf + Call(PlaySoundAtNpc, NPC_MontyMole_02, SOUND_BURROW_DIG, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim11) + Wait(20) + IfEq(GF_FLO03_Defeated_MontyMoleB, FALSE) + Call(SetNpcPos, NPC_MontyMole_02, 0, -50, 0) + EndIf + Wait(45) + EndIf + Else + IfEq(AF_FLO_IsUnderground_Mole_02, TRUE) + IfEq(GF_FLO03_Defeated_MontyMoleB, FALSE) + Call(RandInt, ARRAY_COUNT(N(BurrowLocations_Mole_02)) - 1, LVar0) + Add(LVar0, 1) + UseBuf(Ref(N(BurrowLocations_Mole_02))) + Loop(LVar0) + BufRead3(LVar1, LVar2, LVar3) + EndLoop + Call(SetNpcPos, NPC_MontyMole_02, LVar1, LVar2, LVar3) + EndIf + Call(SetNpcFlagBits, NPC_MontyMole_02, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Set(AF_FLO_IsUnderground_Mole_02, FALSE) + Call(NpcFacePlayer, NPC_MontyMole_02, 1) + Wait(1) + Call(PlaySoundAtNpc, NPC_MontyMole_02, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim10) + Wait(10) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 0) + Call(RandInt, 35, LVar0) + Add(LVar0, 55) + Set(MV_NextBurrowTime_Mole_02, LVar0) + Else + IfGt(MV_NextBurrowTime_Mole_02, 0) + Sub(MV_NextBurrowTime_Mole_02, 1) + EndIf + EndIf + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_MontyMole_03) = { #define LV_ShouldBurrow LVar3 - EVT_LOOP(0) - EVT_IF_EQ(MV_NextBurrowTime_Mole_03, 0) - EVT_IF_EQ(AF_FLO_IsUnderground_Mole_03, TRUE) - EVT_GOTO(0) - EVT_END_IF - EVT_SET(LV_ShouldBurrow, TRUE) - EVT_ELSE - EVT_LABEL(0) - EVT_CALL(GetNpcPos, NPC_MontyMole_03, LVar0, LVar1, LVar2) - EVT_CALL(IsPlayerWithin, LVar0, LVar2, MV_NextBurrowTriggerRadius, LV_ShouldBurrow) - EVT_END_IF - EVT_CALL(GetPartnerInUse, LVar9) - EVT_IF_EQ(LVar9, PARTNER_BOW) - EVT_SET(LV_ShouldBurrow, FALSE) - EVT_END_IF - EVT_IF_EQ(MV_PauseBurrowing, TRUE) - EVT_SET(LV_ShouldBurrow, FALSE) - EVT_END_IF - EVT_IF_EQ(LV_ShouldBurrow, TRUE) - EVT_IF_EQ(AF_FLO_IsUnderground_Mole_03, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_MontyMole_03, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_CALL(NpcFacePlayer, NPC_MontyMole_03, 1) - EVT_WAIT(1) - EVT_SET(AF_FLO_IsUnderground_Mole_03, TRUE) - EVT_IF_NE(MV_NextBurrowTime_Mole_03, 0) - EVT_IF_LT(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_SET(LVar1, 4) - EVT_ELSE - EVT_SET(LVar1, 10) - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_03, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_MontyMole_03, EMOTE_EXCLAMATION, 0, LVar1, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(LVar1) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 1) - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_03, SOUND_BURROW_DIG, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim11) - EVT_WAIT(20) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleC, FALSE) - EVT_CALL(SetNpcPos, NPC_MontyMole_03, 0, -50, 0) - EVT_END_IF - EVT_WAIT(45) - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(AF_FLO_IsUnderground_Mole_03, TRUE) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleC, FALSE) - EVT_CALL(RandInt, ARRAY_COUNT(N(BurrowLocations_Mole_03)) - 1, LVar0) - EVT_ADD(LVar0, 1) - EVT_USE_BUF(EVT_PTR(N(BurrowLocations_Mole_03))) - EVT_LOOP(LVar0) - EVT_BUF_READ3(LVar1, LVar2, LVar3) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_MontyMole_03, LVar1, LVar2, LVar3) - EVT_END_IF - EVT_CALL(SetNpcFlagBits, NPC_MontyMole_03, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_SET(AF_FLO_IsUnderground_Mole_03, FALSE) - EVT_CALL(NpcFacePlayer, NPC_MontyMole_03, 1) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_03, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim10) - EVT_WAIT(10) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 0) - EVT_CALL(RandInt, 40, LVar0) - EVT_ADD(LVar0, 50) - EVT_SET(MV_NextBurrowTime_Mole_03, LVar0) - EVT_ELSE - EVT_IF_GT(MV_NextBurrowTime_Mole_03, 0) - EVT_SUB(MV_NextBurrowTime_Mole_03, 1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + IfEq(MV_NextBurrowTime_Mole_03, 0) + IfEq(AF_FLO_IsUnderground_Mole_03, TRUE) + Goto(0) + EndIf + Set(LV_ShouldBurrow, TRUE) + Else + Label(0) + Call(GetNpcPos, NPC_MontyMole_03, LVar0, LVar1, LVar2) + Call(IsPlayerWithin, LVar0, LVar2, MV_NextBurrowTriggerRadius, LV_ShouldBurrow) + EndIf + Call(GetPartnerInUse, LVar9) + IfEq(LVar9, PARTNER_BOW) + Set(LV_ShouldBurrow, FALSE) + EndIf + IfEq(MV_PauseBurrowing, TRUE) + Set(LV_ShouldBurrow, FALSE) + EndIf + IfEq(LV_ShouldBurrow, TRUE) + IfEq(AF_FLO_IsUnderground_Mole_03, FALSE) + Call(SetNpcFlagBits, NPC_MontyMole_03, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Call(NpcFacePlayer, NPC_MontyMole_03, 1) + Wait(1) + Set(AF_FLO_IsUnderground_Mole_03, TRUE) + IfNe(MV_NextBurrowTime_Mole_03, 0) + IfLt(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + Set(LVar1, 4) + Else + Set(LVar1, 10) + EndIf + Call(PlaySoundAtNpc, NPC_MontyMole_03, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_MontyMole_03, EMOTE_EXCLAMATION, 0, LVar1, EMOTER_NPC, 0, 0, 0, 0) + Wait(LVar1) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 1) + EndIf + Call(PlaySoundAtNpc, NPC_MontyMole_03, SOUND_BURROW_DIG, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim11) + Wait(20) + IfEq(GF_FLO03_Defeated_MontyMoleC, FALSE) + Call(SetNpcPos, NPC_MontyMole_03, 0, -50, 0) + EndIf + Wait(45) + EndIf + Else + IfEq(AF_FLO_IsUnderground_Mole_03, TRUE) + IfEq(GF_FLO03_Defeated_MontyMoleC, FALSE) + Call(RandInt, ARRAY_COUNT(N(BurrowLocations_Mole_03)) - 1, LVar0) + Add(LVar0, 1) + UseBuf(Ref(N(BurrowLocations_Mole_03))) + Loop(LVar0) + BufRead3(LVar1, LVar2, LVar3) + EndLoop + Call(SetNpcPos, NPC_MontyMole_03, LVar1, LVar2, LVar3) + EndIf + Call(SetNpcFlagBits, NPC_MontyMole_03, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Set(AF_FLO_IsUnderground_Mole_03, FALSE) + Call(NpcFacePlayer, NPC_MontyMole_03, 1) + Wait(1) + Call(PlaySoundAtNpc, NPC_MontyMole_03, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim10) + Wait(10) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 0) + Call(RandInt, 40, LVar0) + Add(LVar0, 50) + Set(MV_NextBurrowTime_Mole_03, LVar0) + Else + IfGt(MV_NextBurrowTime_Mole_03, 0) + Sub(MV_NextBurrowTime_Mole_03, 1) + EndIf + EndIf + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_MontyMole_04) = { #define LV_ShouldBurrow LVar3 - EVT_LOOP(0) - EVT_IF_EQ(MV_NextBurrowTime_Mole_04, 0) - EVT_IF_EQ(AF_FLO_IsUnderground_Mole_04, TRUE) - EVT_GOTO(0) - EVT_END_IF - EVT_SET(LV_ShouldBurrow, TRUE) - EVT_ELSE - EVT_LABEL(0) - EVT_CALL(GetNpcPos, NPC_MontyMole_04, LVar0, LVar1, LVar2) - EVT_CALL(IsPlayerWithin, LVar0, LVar2, MV_NextBurrowTriggerRadius, LV_ShouldBurrow) - EVT_END_IF - EVT_CALL(GetPartnerInUse, LVar9) - EVT_IF_EQ(LVar9, PARTNER_BOW) - EVT_SET(LV_ShouldBurrow, FALSE) - EVT_END_IF - EVT_IF_EQ(MV_PauseBurrowing, TRUE) - EVT_SET(LV_ShouldBurrow, FALSE) - EVT_END_IF - EVT_IF_EQ(LV_ShouldBurrow, TRUE) - EVT_IF_EQ(AF_FLO_IsUnderground_Mole_04, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_MontyMole_04, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_CALL(NpcFacePlayer, NPC_MontyMole_04, 1) - EVT_WAIT(1) - EVT_SET(AF_FLO_IsUnderground_Mole_04, TRUE) - EVT_IF_NE(MV_NextBurrowTime_Mole_04, 0) - EVT_IF_LT(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_SET(LVar1, 4) - EVT_ELSE - EVT_SET(LVar1, 10) - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_04, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_MontyMole_04, EMOTE_EXCLAMATION, 0, LVar1, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(LVar1) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 1) - EVT_END_IF - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_04, SOUND_BURROW_DIG, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim11) - EVT_WAIT(20) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleD, FALSE) - EVT_CALL(SetNpcPos, NPC_MontyMole_04, 0, -50, 0) - EVT_END_IF - EVT_WAIT(45) - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(AF_FLO_IsUnderground_Mole_04, TRUE) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleD, FALSE) - EVT_CALL(RandInt, ARRAY_COUNT(N(BurrowLocations_Mole_04)) - 1, LVar0) - EVT_ADD(LVar0, 1) - EVT_USE_BUF(EVT_PTR(N(BurrowLocations_Mole_04))) - EVT_LOOP(LVar0) - EVT_BUF_READ3(LVar1, LVar2, LVar3) - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_MontyMole_04, LVar1, LVar2, LVar3) - EVT_END_IF - EVT_CALL(SetNpcFlagBits, NPC_MontyMole_04, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) - EVT_SET(AF_FLO_IsUnderground_Mole_04, FALSE) - EVT_CALL(NpcFacePlayer, NPC_MontyMole_04, 1) - EVT_WAIT(1) - EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_04, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim10) - EVT_WAIT(10) - EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 0) - EVT_CALL(RandInt, 45, LVar0) - EVT_ADD(LVar0, 45) - EVT_SET(MV_NextBurrowTime_Mole_04, LVar0) - EVT_ELSE - EVT_IF_GT(MV_NextBurrowTime_Mole_04, 0) - EVT_SUB(MV_NextBurrowTime_Mole_04, 1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + IfEq(MV_NextBurrowTime_Mole_04, 0) + IfEq(AF_FLO_IsUnderground_Mole_04, TRUE) + Goto(0) + EndIf + Set(LV_ShouldBurrow, TRUE) + Else + Label(0) + Call(GetNpcPos, NPC_MontyMole_04, LVar0, LVar1, LVar2) + Call(IsPlayerWithin, LVar0, LVar2, MV_NextBurrowTriggerRadius, LV_ShouldBurrow) + EndIf + Call(GetPartnerInUse, LVar9) + IfEq(LVar9, PARTNER_BOW) + Set(LV_ShouldBurrow, FALSE) + EndIf + IfEq(MV_PauseBurrowing, TRUE) + Set(LV_ShouldBurrow, FALSE) + EndIf + IfEq(LV_ShouldBurrow, TRUE) + IfEq(AF_FLO_IsUnderground_Mole_04, FALSE) + Call(SetNpcFlagBits, NPC_MontyMole_04, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Call(NpcFacePlayer, NPC_MontyMole_04, 1) + Wait(1) + Set(AF_FLO_IsUnderground_Mole_04, TRUE) + IfNe(MV_NextBurrowTime_Mole_04, 0) + IfLt(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + Set(LVar1, 4) + Else + Set(LVar1, 10) + EndIf + Call(PlaySoundAtNpc, NPC_MontyMole_04, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_MontyMole_04, EMOTE_EXCLAMATION, 0, LVar1, EMOTER_NPC, 0, 0, 0, 0) + Wait(LVar1) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 1) + EndIf + Call(PlaySoundAtNpc, NPC_MontyMole_04, SOUND_BURROW_DIG, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim11) + Wait(20) + IfEq(GF_FLO03_Defeated_MontyMoleD, FALSE) + Call(SetNpcPos, NPC_MontyMole_04, 0, -50, 0) + EndIf + Wait(45) + EndIf + Else + IfEq(AF_FLO_IsUnderground_Mole_04, TRUE) + IfEq(GF_FLO03_Defeated_MontyMoleD, FALSE) + Call(RandInt, ARRAY_COUNT(N(BurrowLocations_Mole_04)) - 1, LVar0) + Add(LVar0, 1) + UseBuf(Ref(N(BurrowLocations_Mole_04))) + Loop(LVar0) + BufRead3(LVar1, LVar2, LVar3) + EndLoop + Call(SetNpcPos, NPC_MontyMole_04, LVar1, LVar2, LVar3) + EndIf + Call(SetNpcFlagBits, NPC_MontyMole_04, NPC_FLAG_FLYING | NPC_FLAG_IGNORE_WORLD_COLLISION | NPC_FLAG_IGNORE_ENTITY_COLLISION, TRUE) + Set(AF_FLO_IsUnderground_Mole_04, FALSE) + Call(NpcFacePlayer, NPC_MontyMole_04, 1) + Wait(1) + Call(PlaySoundAtNpc, NPC_MontyMole_04, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim10) + Wait(10) + Call(SetSelfEnemyFlagBits, ENEMY_FLAG_100000 | ENEMY_FLAG_IGNORE_TOUCH | ENEMY_FLAG_IGNORE_JUMP | ENEMY_FLAG_IGNORE_HAMMER | ENEMY_FLAG_IGNORE_PARTNER, 0) + Call(RandInt, 45, LVar0) + Add(LVar0, 45) + Set(MV_NextBurrowTime_Mole_04, LVar0) + Else + IfGt(MV_NextBurrowTime_Mole_04, 0) + Sub(MV_NextBurrowTime_Mole_04, 1) + EndIf + EndIf + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcInit_MontyMole_01) = { - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_MontyMole))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_MontyMole))) - EVT_CALL(EnableNpcShadow, NPC_MontyMole_01, FALSE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_01))) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim10) - EVT_CASE_EQ(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleA, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_01))) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim10) - EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_01, ENEMY_FLAG_PASSIVE, 0) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_MontyMole_01, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetNpcPos, NPC_MontyMole_01, NPC_DISPOSE_LOCATION) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_MontyMole))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_MontyMole))) + Call(EnableNpcShadow, NPC_MontyMole_01, FALSE) + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_MontyMole_01))) + Call(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim10) + CaseEq(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + IfEq(GF_FLO03_Defeated_MontyMoleA, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_MontyMole_01))) + Call(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim10) + Call(SetEnemyFlagBits, NPC_MontyMole_01, ENEMY_FLAG_PASSIVE, 0) + Else + Call(SetNpcPos, NPC_MontyMole_01, NPC_DISPOSE_LOCATION) + EndIf + CaseDefault + Call(SetNpcPos, NPC_MontyMole_01, NPC_DISPOSE_LOCATION) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_MontyMole_02) = { - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_MontyMole))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_MontyMole))) - EVT_CALL(EnableNpcShadow, NPC_MontyMole_02, FALSE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_02))) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim10) - EVT_CASE_EQ(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleB, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_02))) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim10) - EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_02, ENEMY_FLAG_PASSIVE, 0) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_MontyMole_02, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetNpcPos, NPC_MontyMole_02, NPC_DISPOSE_LOCATION) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_MontyMole))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_MontyMole))) + Call(EnableNpcShadow, NPC_MontyMole_02, FALSE) + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_MontyMole_02))) + Call(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim10) + CaseEq(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + IfEq(GF_FLO03_Defeated_MontyMoleB, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_MontyMole_02))) + Call(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim10) + Call(SetEnemyFlagBits, NPC_MontyMole_02, ENEMY_FLAG_PASSIVE, 0) + Else + Call(SetNpcPos, NPC_MontyMole_02, NPC_DISPOSE_LOCATION) + EndIf + CaseDefault + Call(SetNpcPos, NPC_MontyMole_02, NPC_DISPOSE_LOCATION) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_MontyMole_03) = { - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_MontyMole))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_MontyMole))) - EVT_CALL(EnableNpcShadow, NPC_MontyMole_03, FALSE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_03))) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim10) - EVT_CASE_EQ(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleC, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_03))) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim10) - EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_03, ENEMY_FLAG_PASSIVE, 0) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_MontyMole_03, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetNpcPos, NPC_MontyMole_03, NPC_DISPOSE_LOCATION) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_MontyMole))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_MontyMole))) + Call(EnableNpcShadow, NPC_MontyMole_03, FALSE) + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_MontyMole_03))) + Call(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim10) + CaseEq(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + IfEq(GF_FLO03_Defeated_MontyMoleC, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_MontyMole_03))) + Call(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim10) + Call(SetEnemyFlagBits, NPC_MontyMole_03, ENEMY_FLAG_PASSIVE, 0) + Else + Call(SetNpcPos, NPC_MontyMole_03, NPC_DISPOSE_LOCATION) + EndIf + CaseDefault + Call(SetNpcPos, NPC_MontyMole_03, NPC_DISPOSE_LOCATION) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_MontyMole_04) = { - EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_MontyMole))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_MontyMole))) - EVT_CALL(EnableNpcShadow, NPC_MontyMole_04, FALSE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_04))) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim10) - EVT_CASE_EQ(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) - EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleD, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_04))) - EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim10) - EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_04, ENEMY_FLAG_PASSIVE, 0) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_MontyMole_04, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SetNpcPos, NPC_MontyMole_04, NPC_DISPOSE_LOCATION) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcHit, NPC_SELF, Ref(N(EVS_NpcHit_MontyMole))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_MontyMole))) + Call(EnableNpcShadow, NPC_MontyMole_04, FALSE) + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_MontyMole_04))) + Call(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim10) + CaseEq(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) + IfEq(GF_FLO03_Defeated_MontyMoleD, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_MontyMole_04))) + Call(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim10) + Call(SetEnemyFlagBits, NPC_MontyMole_04, ENEMY_FLAG_PASSIVE, 0) + Else + Call(SetNpcPos, NPC_MontyMole_04, NPC_DISPOSE_LOCATION) + EndIf + CaseDefault + Call(SetNpcPos, NPC_MontyMole_04, NPC_DISPOSE_LOCATION) + EndSwitch + Return + End }; NpcData N(NpcData_Petunia) = { diff --git a/src/world/dead/area_flo/flo_03/flo_03_4_foliage.c b/src/world/dead/area_flo/flo_03/flo_03_4_foliage.c index 09bae8673f3..0a707f59a36 100644 --- a/src/world/dead/area_flo/flo_03/flo_03_4_foliage.c +++ b/src/world/dead/area_flo/flo_03/flo_03_4_foliage.c @@ -35,11 +35,11 @@ BombTrigger N(BombPos_Tree1) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(AF_FLO_TreeDrop_RedBerry1, FALSE) - EVT_SET(AF_FLO_TreeDrop_RedBerry2, FALSE) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o242, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_RETURN - EVT_END + Set(AF_FLO_TreeDrop_RedBerry1, FALSE) + Set(AF_FLO_TreeDrop_RedBerry2, FALSE) + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o242, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Return + End }; diff --git a/src/world/dead/area_flo/flo_03/flo_03_5_entity.c b/src/world/dead/area_flo/flo_03/flo_03_5_entity.c index 3afdd35e570..d9c6511a832 100644 --- a/src/world/dead/area_flo/flo_03/flo_03_5_entity.c +++ b/src/world/dead/area_flo/flo_03/flo_03_5_entity.c @@ -2,13 +2,13 @@ #include "entity.h" EvtScript N(EVS_EmptyEntityHandler) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), -175, 0, 150, 0, MODEL_o56, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_FLO03_HiddenPanel) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HiddenPanel), -175, 0, 150, 0, MODEL_o56, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_FLO03_HiddenPanel) + Return + End }; diff --git a/src/world/dead/area_flo/flo_07/flo_07_1_music.c b/src/world/dead/area_flo/flo_07/flo_07_1_music.c index 0bf6139960d..c0e51e32bfb 100644 --- a/src/world/dead/area_flo/flo_07/flo_07_1_music.c +++ b/src/world/dead/area_flo/flo_07/flo_07_1_music.c @@ -1,32 +1,32 @@ #include "flo_07.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, flo_07_ENTRY_1) - EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) - EVT_ELSE - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(PlaySound, SOUND_LOOP_FLO_WATER_FLOW_1) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, flo_07_ENTRY_1) + Call(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) + Else + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndSwitch + EndIf + Call(PlaySound, SOUND_LOOP_FLO_WATER_FLOW_1) + Return + End }; EvtScript N(EVS_PushFlowerSong) = { - EVT_CALL(PushSong, SONG_FLOWER_NPC_THEME, 1) - EVT_RETURN - EVT_END + Call(PushSong, SONG_FLOWER_NPC_THEME, 1) + Return + End }; EvtScript N(EVS_PopSong) = { - EVT_CALL(FadeOutMusic, 0, 250) - EVT_WAIT(10) - EVT_CALL(PopSong) - EVT_RETURN - EVT_END + Call(FadeOutMusic, 0, 250) + Wait(10) + Call(PopSong) + Return + End }; diff --git a/src/world/dead/area_flo/flo_07/flo_07_2_main.c b/src/world/dead/area_flo/flo_07/flo_07_2_main.c index 6cd2bff8ab4..0cda123c215 100644 --- a/src/world/dead/area_flo/flo_07/flo_07_2_main.c +++ b/src/world/dead/area_flo/flo_07/flo_07_2_main.c @@ -9,9 +9,9 @@ EvtScript N(EVS_ExitWalk_flo_25_1) = EVT_EXIT_WALK(60, flo_07_ENTRY_0, "flo_25", flo_25_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_25_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_25_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; API_CALLABLE(N(CreateCrystalTreeSparkles)) { @@ -27,50 +27,50 @@ API_CALLABLE(N(CreateCrystalTreeSparkles)) { } EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_SET(AF_FLO_MadeCrystalBerry, FALSE) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_SetupFoliage)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o76, SURFACE_TYPE_FLOWERS) + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + Set(AF_FLO_MadeCrystalBerry, FALSE) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_SetupFoliage)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o76, SURFACE_TYPE_FLOWERS) EVT_FLOWER_SPAWN_REGION( 297, -95, 383, -65, 0 ) EVT_FLOWER_SPAWN_REGION( 293, 71, 378, 113, 0 ) EVT_FLOWER_SPAWN_REGION( 21, -346, 147, -242, 20 ) EVT_FLOWER_SPAWN_REGION( -350, -190, -81, -106, 0 ) EVT_FLOWER_SPAWN_REGION( -380, 85, -95, 150, 0 ) - EVT_CALL(EnableTexPanning, MODEL_o51, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o36, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o37, TRUE) - EVT_THREAD + Call(EnableTexPanning, MODEL_o51, TRUE) + Call(EnableTexPanning, MODEL_o36, TRUE) + Call(EnableTexPanning, MODEL_o37, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( -100, 100, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_3) TEX_PAN_PARAMS_STEP( 0,-1200, 0, 0) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, flo_07_ENTRY_1) - EVT_EXEC(N(EVS_Scene_SunReturns)) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC(N(EVS_TryKickingPlayerOut)) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_CALL(N(CreateCrystalTreeSparkles)) - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(GetEntryID, LVar0) + IfEq(LVar0, flo_07_ENTRY_1) + Exec(N(EVS_Scene_SunReturns)) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Exec(N(EVS_TryKickingPlayerOut)) + EndIf + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Call(N(CreateCrystalTreeSparkles)) + Return + End }; diff --git a/src/world/dead/area_flo/flo_07/flo_07_3_npc.c b/src/world/dead/area_flo/flo_07/flo_07_3_npc.c index 1eb92c982c7..960fc853e8c 100644 --- a/src/world/dead/area_flo/flo_07/flo_07_3_npc.c +++ b/src/world/dead/area_flo/flo_07/flo_07_3_npc.c @@ -7,206 +7,206 @@ #include "world/common/complete/GiveReward.inc.c" EvtScript N(EVS_Scene_SunReturns) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(GetNpcPos, NPC_Posie, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(11.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_00C5) - EVT_WAIT(10) - EVT_CALL(GotoMap, EVT_PTR("flo_10"), flo_10_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(GetNpcPos, NPC_Posie, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, Float(11.0), Float(-11.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20) + Call(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_00C5) + Wait(10) + Call(GotoMap, Ref("flo_10"), flo_10_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_ShakeGround) = { - EVT_LABEL(0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 1, EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(ShakeCam, CAM_DEFAULT, 0, 1, Float(1.0)) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_MakeCrystalBerry) = { - EVT_IF_EQ(AF_FLO_MadeCrystalBerry, TRUE) - EVT_RETURN - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0068) - EVT_THREAD - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.0), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_CALL(PlaySound, SOUND_LOOP_RUMBLE) - EVT_EXEC_GET_TID(N(EVS_ShakeGround), MV_GroundShakingScript) - EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Strain, ANIM_Posie_Strain, 0, MSG_CH6_0069) - EVT_KILL_THREAD(MV_GroundShakingScript) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.0), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(8.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SUB(LVar0, LVar2) - EVT_IF_LT(LVar0, -250) - EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -225, 100, -25, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_FLO07_Item_CrystalBerry) - EVT_ELSE - EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -265, 100, 54, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_FLO07_Item_CrystalBerry) - EVT_SET(GF_FLO07_CrystalBerryFellOnLeftSide, TRUE) - EVT_END_IF - EVT_CALL(PlaySound, SOUND_LRAW_RUMBLE | SOUND_ID_TRIGGER_CHANGE_SOUND) - EVT_CALL(StopTrackingSoundPos, SOUND_LRAW_RUMBLE) - EVT_SET(AF_FLO_MadeCrystalBerry, TRUE) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_006A) - EVT_SET(GB_StoryProgress, STORY_CH6_GOT_CRYSTAL_BERRY) - EVT_RETURN - EVT_END + IfEq(AF_FLO_MadeCrystalBerry, TRUE) + Return + EndIf + Call(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0068) + Thread + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, Float(18.0), Float(-7.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Call(PlaySound, SOUND_LOOP_RUMBLE) + ExecGetTID(N(EVS_ShakeGround), MV_GroundShakingScript) + Call(SpeakToPlayer, NPC_Posie, ANIM_Posie_Strain, ANIM_Posie_Strain, 0, MSG_CH6_0069) + KillThread(MV_GroundShakingScript) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(SetCamPitch, CAM_DEFAULT, Float(18.0), Float(-7.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(8.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Sub(LVar0, LVar2) + IfLt(LVar0, -250) + Call(MakeItemEntity, ITEM_CRYSTAL_BERRY, -225, 100, -25, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_FLO07_Item_CrystalBerry) + Else + Call(MakeItemEntity, ITEM_CRYSTAL_BERRY, -265, 100, 54, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_FLO07_Item_CrystalBerry) + Set(GF_FLO07_CrystalBerryFellOnLeftSide, TRUE) + EndIf + Call(PlaySound, SOUND_LRAW_RUMBLE | SOUND_ID_TRIGGER_CHANGE_SOUND) + Call(StopTrackingSoundPos, SOUND_LRAW_RUMBLE) + Set(AF_FLO_MadeCrystalBerry, TRUE) + Wait(20) + Call(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_006A) + Set(GB_StoryProgress, STORY_CH6_GOT_CRYSTAL_BERRY) + Return + End }; EvtScript N(EVS_NpcInteract_Posie) = { - EVT_EXEC_WAIT(N(EVS_PushFlowerSong)) - EVT_CALL(NpcFacePlayer, NPC_SELF, 1) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN) - EVT_IF_EQ(AF_FLO_PoiseHintDialogue, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0070) - EVT_SET(AF_FLO_PoiseHintDialogue, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0071) - EVT_END_IF - EVT_CASE_LT(STORY_CH6_GOT_FERTILE_SOIL) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4.0), 0, EVT_FLOAT(350.0), EVT_FLOAT(18.0), EVT_FLOAT(-7.5)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0065) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Posie_GiveItem) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Posie_Still) + ExecWait(N(EVS_PushFlowerSong)) + Call(NpcFacePlayer, NPC_SELF, 1) + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_GOT_MAGICAL_BEAN) + IfEq(AF_FLO_PoiseHintDialogue, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0070) + Set(AF_FLO_PoiseHintDialogue, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0071) + EndIf + CaseLt(STORY_CH6_GOT_FERTILE_SOIL) + Call(AdjustCam, CAM_DEFAULT, Float(4.0), 0, Float(350.0), Float(18.0), Float(-7.5)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0065) + Call(SetNpcAnimation, NPC_SELF, ANIM_Posie_GiveItem) + Wait(20) + Call(SetNpcAnimation, NPC_SELF, ANIM_Posie_Still) EVT_GIVE_KEY_REWARD(ITEM_FERTILE_SOIL) - EVT_SET(GB_StoryProgress, STORY_CH6_GOT_FERTILE_SOIL) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0066) - EVT_IF_EQ(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE) - EVT_EXEC_WAIT(N(EVS_MakeCrystalBerry)) - EVT_END_IF - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CASE_LT(STORY_CH6_GOT_CRYSTAL_BERRY) - EVT_IF_EQ(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE) - EVT_IF_EQ(AF_FLO_MadeCrystalBerry, FALSE) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4.0), 0, EVT_FLOAT(350.0), EVT_FLOAT(18.0), EVT_FLOAT(-7.5)) - EVT_EXEC_WAIT(N(EVS_MakeCrystalBerry)) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0072) - EVT_END_IF - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0072) - EVT_END_IF - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_IF_EQ(GF_FLO07_Item_CrystalBerry, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0072) - EVT_ELSE - EVT_IF_LT(GB_StoryProgress, STORY_CH6_GOT_WATER_STONE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0073) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0074) - EVT_END_IF - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0075) - EVT_END_IF - EVT_CASE_LT(STORY_CH6_RETURNED_TO_TOAD_TOWN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0076) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0077) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_PopSong)) - EVT_RETURN - EVT_END + Set(GB_StoryProgress, STORY_CH6_GOT_FERTILE_SOIL) + Call(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0066) + IfEq(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE) + ExecWait(N(EVS_MakeCrystalBerry)) + EndIf + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + CaseLt(STORY_CH6_GOT_CRYSTAL_BERRY) + IfEq(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE) + IfEq(AF_FLO_MadeCrystalBerry, FALSE) + Call(AdjustCam, CAM_DEFAULT, Float(4.0), 0, Float(350.0), Float(18.0), Float(-7.5)) + ExecWait(N(EVS_MakeCrystalBerry)) + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0072) + EndIf + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0072) + EndIf + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + IfEq(GF_FLO07_Item_CrystalBerry, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0072) + Else + IfLt(GB_StoryProgress, STORY_CH6_GOT_WATER_STONE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0073) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0074) + EndIf + Call(ContinueSpeech, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0075) + EndIf + CaseLt(STORY_CH6_RETURNED_TO_TOAD_TOWN) + Call(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0076) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0077) + EndSwitch + ExecWait(N(EVS_PopSong)) + Return + End }; EvtScript N(EVS_NpcInit_Posie) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH6_GOT_CRYSTAL_BERRY) - EVT_IF_EQ(GF_FLO07_Item_CrystalBerry, FALSE) - EVT_IF_EQ(GF_FLO07_CrystalBerryFellOnLeftSide, FALSE) - EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -225, 0, -25, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO07_Item_CrystalBerry) - EVT_ELSE - EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -265, 0, 54, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO07_Item_CrystalBerry) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_SET(AF_FLO_PoiseHintDialogue, FALSE) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Posie))) - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH6_GOT_CRYSTAL_BERRY) + IfEq(GF_FLO07_Item_CrystalBerry, FALSE) + IfEq(GF_FLO07_CrystalBerryFellOnLeftSide, FALSE) + Call(MakeItemEntity, ITEM_CRYSTAL_BERRY, -225, 0, -25, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO07_Item_CrystalBerry) + Else + Call(MakeItemEntity, ITEM_CRYSTAL_BERRY, -265, 0, 54, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO07_Item_CrystalBerry) + EndIf + EndIf + EndIf + Set(AF_FLO_PoiseHintDialogue, FALSE) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Posie))) + Return + End }; EvtScript N(EVS_TryKickingPlayerOut) = { - EVT_IF_NE(AB_FLO_PoiseKickedOutCount, 0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(10) - EVT_IF_LT(AB_FLO_PoiseKickedOutCount, 5) - EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_006E) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_CALL(PlayerMoveTo, 410, LVar3, 10) - EVT_ADD(AB_FLO_PoiseKickedOutCount, 1) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_006F) - EVT_SET(AB_FLO_PoiseKickedOutCount, 0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END + IfNe(AB_FLO_PoiseKickedOutCount, 0) + Call(DisablePlayerInput, TRUE) + Wait(10) + IfLt(AB_FLO_PoiseKickedOutCount, 5) + Call(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_006E) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + Call(PlayerMoveTo, 410, LVar3, 10) + Add(AB_FLO_PoiseKickedOutCount, 1) + Else + Call(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_006F) + Set(AB_FLO_PoiseKickedOutCount, 0) + EndIf + Call(DisablePlayerInput, FALSE) + EndIf + Return + End }; EvtScript N(EVS_OnHit_CrystalTree) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_LT(GB_StoryProgress, STORY_CH6_GOT_CRYSTAL_BERRY) - EVT_CALL(NpcFacePlayer, NPC_Posie, 1) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Confused, ANIM_Posie_Idle, 0, MSG_CH6_0067) - EVT_IF_EQ(GB_StoryProgress, STORY_CH6_GOT_FERTILE_SOIL) - EVT_IF_EQ(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -250, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -250, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_EXEC_WAIT(N(EVS_MakeCrystalBerry)) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_END_IF - EVT_END_IF - EVT_ELSE - EVT_IF_EQ(GF_FLO07_Item_CrystalBerry, FALSE) - EVT_CALL(NpcFacePlayer, NPC_Posie, 1) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Confused, ANIM_Posie_Idle, 0, MSG_CH6_0067) - EVT_ELSE - EVT_ADD(AB_FLO_CrystalTreeHitCount, 1) - EVT_SWITCH(AB_FLO_CrystalTreeHitCount) - EVT_CASE_LT(2) - EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_TalkAngry, ANIM_Posie_Idle, 0, MSG_CH6_006B) - EVT_CASE_LT(5) - EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_TalkAngry, ANIM_Posie_Idle, 0, MSG_CH6_006C) - EVT_CASE_GE(5) - EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_TalkAngry, ANIM_Posie_Idle, 0, MSG_CH6_006D) - EVT_SET(AB_FLO_PoiseKickedOutCount, 1) - EVT_CALL(GotoMap, EVT_PTR("flo_25"), flo_25_ENTRY_1) - EVT_WAIT(100) - EVT_END_SWITCH - EVT_END_IF - EVT_END_IF - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + IfLt(GB_StoryProgress, STORY_CH6_GOT_CRYSTAL_BERRY) + Call(NpcFacePlayer, NPC_Posie, 1) + Wait(10) + Call(SpeakToPlayer, NPC_Posie, ANIM_Posie_Confused, ANIM_Posie_Idle, 0, MSG_CH6_0067) + IfEq(GB_StoryProgress, STORY_CH6_GOT_FERTILE_SOIL) + IfEq(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, -250, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, -250, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + ExecWait(N(EVS_MakeCrystalBerry)) + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + EndIf + EndIf + Else + IfEq(GF_FLO07_Item_CrystalBerry, FALSE) + Call(NpcFacePlayer, NPC_Posie, 1) + Wait(10) + Call(SpeakToPlayer, NPC_Posie, ANIM_Posie_Confused, ANIM_Posie_Idle, 0, MSG_CH6_0067) + Else + Add(AB_FLO_CrystalTreeHitCount, 1) + Switch(AB_FLO_CrystalTreeHitCount) + CaseLt(2) + Call(SpeakToPlayer, NPC_Posie, ANIM_Posie_TalkAngry, ANIM_Posie_Idle, 0, MSG_CH6_006B) + CaseLt(5) + Call(SpeakToPlayer, NPC_Posie, ANIM_Posie_TalkAngry, ANIM_Posie_Idle, 0, MSG_CH6_006C) + CaseGe(5) + Call(SpeakToPlayer, NPC_Posie, ANIM_Posie_TalkAngry, ANIM_Posie_Idle, 0, MSG_CH6_006D) + Set(AB_FLO_PoiseKickedOutCount, 1) + Call(GotoMap, Ref("flo_25"), flo_25_ENTRY_1) + Wait(100) + EndSwitch + EndIf + EndIf + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + Call(DisablePlayerInput, FALSE) + Return + End }; FoliageModelList N(CrystalTree_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o6, MODEL_o7, MODEL_o8); @@ -224,11 +224,11 @@ BombTrigger N(BombPos_CrystalTree) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_CrystalTree))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o5, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_CrystalTree)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_CrystalTree))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o5, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_CrystalTree)), 1, 0) + Return + End }; NpcData N(NpcData_Posie) = { diff --git a/src/world/dead/area_flo/flo_08/flo_08_1_music.c b/src/world/dead/area_flo/flo_08/flo_08_1_music.c index 7c2bbc4f0f5..2611463150b 100644 --- a/src/world/dead/area_flo/flo_08/flo_08_1_music.c +++ b/src/world/dead/area_flo/flo_08/flo_08_1_music.c @@ -1,12 +1,12 @@ #include "flo_08.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/dead/area_flo/flo_08/flo_08_2_entity.c b/src/world/dead/area_flo/flo_08/flo_08_2_entity.c index 9504762b66a..10353001c00 100644 --- a/src/world/dead/area_flo/flo_08/flo_08_2_entity.c +++ b/src/world/dead/area_flo/flo_08/flo_08_2_entity.c @@ -7,7 +7,7 @@ EvtScript N(EVS_MakeEntities) = { EVT_MAKE_SUPER_BLOCK(-780, 120, -110, 0) - EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 510, 0, -90, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO08_Item_StarPiece) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_STAR_PIECE, 510, 0, -90, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO08_Item_StarPiece) + Return + End }; diff --git a/src/world/dead/area_flo/flo_08/flo_08_3_main.c b/src/world/dead/area_flo/flo_08/flo_08_3_main.c index 7cb2e7b3461..397bf3f9d86 100644 --- a/src/world/dead/area_flo/flo_08/flo_08_3_main.c +++ b/src/world/dead/area_flo/flo_08/flo_08_3_main.c @@ -12,10 +12,10 @@ EvtScript N(EVS_ExitWalk_flo_00_6) = EVT_EXIT_WALK(60, flo_08_ENTRY_0, "flo_00", EvtScript N(EVS_ExitWalk_flo_24_0) = EVT_EXIT_WALK(60, flo_08_ENTRY_1, "flo_24", flo_24_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_00_6)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_24_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_00_6)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_flo_24_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -26,58 +26,58 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupVines)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o114, SURFACE_TYPE_SPIKES) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_o25, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o27, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o31, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o33, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o35, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o37, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o55, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o28, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o32, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o34, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o36, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o38, TRUE) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LABEL(0) - EVT_ADD(LVar0, 140) - EVT_IF_GT(LVar0, 0x10000) - EVT_ADD(LVar0, -0x10000) - EVT_END_IF - EVT_CALL(SetTexPanOffset, 1, 0, LVar0, 0) - EVT_ADD(LVar1, -200) - EVT_IF_LT(LVar1, 0) - EVT_ADD(LVar1, 0x10000) - EVT_END_IF - EVT_CALL(SetTexPanOffset, 2, 0, LVar1, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_THREAD - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o129, SURFACE_TYPE_FLOWERS) + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupVines)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o114, SURFACE_TYPE_SPIKES) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + Call(EnableTexPanning, MODEL_o25, TRUE) + Call(EnableTexPanning, MODEL_o27, TRUE) + Call(EnableTexPanning, MODEL_o31, TRUE) + Call(EnableTexPanning, MODEL_o33, TRUE) + Call(EnableTexPanning, MODEL_o35, TRUE) + Call(EnableTexPanning, MODEL_o37, TRUE) + Call(EnableTexPanning, MODEL_o55, TRUE) + Call(EnableTexPanning, MODEL_o28, TRUE) + Call(EnableTexPanning, MODEL_o32, TRUE) + Call(EnableTexPanning, MODEL_o34, TRUE) + Call(EnableTexPanning, MODEL_o36, TRUE) + Call(EnableTexPanning, MODEL_o38, TRUE) + Thread + Set(LVar0, 0) + Set(LVar1, 0) + Label(0) + Add(LVar0, 140) + IfGt(LVar0, 0x10000) + Add(LVar0, -0x10000) + EndIf + Call(SetTexPanOffset, 1, 0, LVar0, 0) + Add(LVar1, -200) + IfLt(LVar1, 0) + Add(LVar1, 0x10000) + EndIf + Call(SetTexPanOffset, 2, 0, LVar1, 0) + Wait(1) + Goto(0) + EndThread + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o129, SURFACE_TYPE_FLOWERS) EVT_FLOWER_SPAWN_REGION(140, -137, 340, -60, 0) EVT_FLOWER_SPAWN_REGION(450, -137, 590, -60, 0) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_RETURN - EVT_END + Exec(N(EVS_SetupFoliage)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Return + End }; diff --git a/src/world/dead/area_flo/flo_08/flo_08_4_npc.c b/src/world/dead/area_flo/flo_08/flo_08_4_npc.c index 5a4fb8405c9..62c07e089da 100644 --- a/src/world/dead/area_flo/flo_08/flo_08_4_npc.c +++ b/src/world/dead/area_flo/flo_08/flo_08_4_npc.c @@ -11,151 +11,151 @@ static s32 N(FlowerGuard_ItemChoiceList)[ITEM_NUM_CONSUMABLES + 1]; #include "world/area_flo/common/ItemChoice_FlowerGuard.inc.c" EvtScript N(EVS_NpcInteract_GateFlower) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_EQ(GF_FLO08_GaveYellowBerry, FALSE) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.5), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Talk, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0042) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Thinking) - EVT_CALL(N(FlowerGuard_MakeItemList)) + Call(DisablePlayerInput, TRUE) + IfEq(GF_FLO08_GaveYellowBerry, FALSE) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(SetCamPitch, CAM_DEFAULT, Float(18.5), Float(-7.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Talk, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0042) + Call(SetPlayerAnimation, ANIM_Mario1_Thinking) + Call(N(FlowerGuard_MakeItemList)) EVT_CHOOSE_CONSUMABLE_FROM(N(FlowerGuard_ItemChoiceList), 0) - EVT_SWITCH(LVar0) - EVT_CASE_LE(0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Still) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Talk, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0043) - EVT_CASE_DEFAULT - EVT_SET(LVar8, LVar0) - EVT_CALL(N(FlowerGuard_JudgeItemTastiness), LVar0) - EVT_CALL(MakeItemEntity, LVar8, -695, 20, -29, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVar7, LVar0) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_EAT_OR_DRINK, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Eat) - EVT_WAIT(20) - EVT_CALL(RemoveItemEntity, LVar7) - EVT_SWITCH(LVar8) - EVT_CASE_EQ(160) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Chew, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0046) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_APPROVE, SOUND_SPACE_DEFAULT) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_GateFlower_Yellow_HappyTalk, ANIM_GateFlower_Yellow_HappyIdle, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_OpenGate) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o96, SOUND_METAL_GATE_OPEN, SOUND_SPACE_DEFAULT) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o96, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(MakeLerp, 0, 100, 30, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar8, LVar0) - EVT_SETF(LVar9, LVar0) - EVT_MULF(LVar8, EVT_FLOAT(0.5)) - EVT_MULF(LVar9, EVT_FLOAT(1.2)) - EVT_CALL(RotateModel, MODEL_o69, LVar8, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o70, LVar8, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o71, LVar8, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o148, LVar9, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o149, LVar9, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o150, LVar9, 0, -1, 0) - EVT_WAIT(1) - EVT_IF_NE(LVar1, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_HappyDance) - EVT_SET(GF_FLO08_GaveYellowBerry, TRUE) - EVT_CASE_EQ(159) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Chew, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0045) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Idle) - EVT_CASE_EQ(158) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Chew, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0045) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Idle) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Chew, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0044) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Disgust) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_SPIT_OUT, SOUND_SPACE_DEFAULT) - EVT_CALL(MakeItemEntity, LVar8, 125, 20, 0, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVar7, LVar0) - EVT_WAIT(5) - EVT_CALL(GetAngleToPlayer, NPC_SELF, LVar0) - EVT_IF_LT(LVar0, 180) - EVT_CALL(MakeLerp, 0, 100, 7, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, EVT_FLOAT(-0.5)) - EVT_SETF(LVar3, EVT_FLOAT(-0.2)) - EVT_SETF(LVar4, EVT_FLOAT(0.9)) - EVT_MULF(LVar2, LVar0) - EVT_MULF(LVar3, LVar0) - EVT_MULF(LVar4, LVar0) - EVT_ADDF(LVar2, EVT_FLOAT(-700.0)) - EVT_ADDF(LVar3, EVT_FLOAT(15.0)) - EVT_ADDF(LVar4, EVT_FLOAT(-25.0)) - EVT_CALL(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_ELSE - EVT_CALL(MakeLerp, 0, 100, 7, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, EVT_FLOAT(0.5)) - EVT_SETF(LVar3, EVT_FLOAT(-0.2)) - EVT_SETF(LVar4, EVT_FLOAT(0.9)) - EVT_MULF(LVar2, LVar0) - EVT_MULF(LVar3, LVar0) - EVT_MULF(LVar4, LVar0) - EVT_ADDF(LVar2, EVT_FLOAT(-690.0)) - EVT_ADDF(LVar3, EVT_FLOAT(15.0)) - EVT_ADDF(LVar4, EVT_FLOAT(-25.0)) - EVT_CALL(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Idle) - EVT_CALL(RemoveItemEntity, LVar7) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Idle) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_GateFlower_Yellow_Talk, ANIM_GateFlower_Yellow_Idle, 0) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_THREAD - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(6.0)) - EVT_END_THREAD - EVT_WAIT(10) - EVT_ELSE - EVT_IF_LT(GB_StoryProgress, STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_HappyTalk, ANIM_GateFlower_Yellow_HappyIdle, 0, MSG_CH6_0047) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_HappyTalk, ANIM_GateFlower_Yellow_HappyIdle, 0, MSG_CH6_0048) - EVT_END_IF - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END + Switch(LVar0) + CaseLe(0) + Call(SetPlayerAnimation, ANIM_Mario1_Still) + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Talk, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0043) + CaseDefault + Set(LVar8, LVar0) + Call(N(FlowerGuard_JudgeItemTastiness), LVar0) + Call(MakeItemEntity, LVar8, -695, 20, -29, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVar7, LVar0) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_EAT_OR_DRINK, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Eat) + Wait(20) + Call(RemoveItemEntity, LVar7) + Switch(LVar8) + CaseEq(160) + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Chew, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0046) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_APPROVE, SOUND_SPACE_DEFAULT) + Call(EndSpeech, NPC_SELF, ANIM_GateFlower_Yellow_HappyTalk, ANIM_GateFlower_Yellow_HappyIdle, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_OpenGate) + Call(PlaySoundAtCollider, COLLIDER_o96, SOUND_METAL_GATE_OPEN, SOUND_SPACE_DEFAULT) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o96, COLLIDER_FLAGS_UPPER_MASK) + Call(MakeLerp, 0, 100, 30, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + SetF(LVar8, LVar0) + SetF(LVar9, LVar0) + MulF(LVar8, Float(0.5)) + MulF(LVar9, Float(1.2)) + Call(RotateModel, MODEL_o69, LVar8, 0, 1, 0) + Call(RotateModel, MODEL_o70, LVar8, 0, 1, 0) + Call(RotateModel, MODEL_o71, LVar8, 0, 1, 0) + Call(RotateModel, MODEL_o148, LVar9, 0, -1, 0) + Call(RotateModel, MODEL_o149, LVar9, 0, -1, 0) + Call(RotateModel, MODEL_o150, LVar9, 0, -1, 0) + Wait(1) + IfNe(LVar1, 1) + BreakLoop + EndIf + EndLoop + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_HappyDance) + Set(GF_FLO08_GaveYellowBerry, TRUE) + CaseEq(159) + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Chew, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0045) + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Idle) + CaseEq(158) + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Chew, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0045) + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Idle) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Chew, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0044) + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Disgust) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_SPIT_OUT, SOUND_SPACE_DEFAULT) + Call(MakeItemEntity, LVar8, 125, 20, 0, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVar7, LVar0) + Wait(5) + Call(GetAngleToPlayer, NPC_SELF, LVar0) + IfLt(LVar0, 180) + Call(MakeLerp, 0, 100, 7, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, Float(-0.5)) + SetF(LVar3, Float(-0.2)) + SetF(LVar4, Float(0.9)) + MulF(LVar2, LVar0) + MulF(LVar3, LVar0) + MulF(LVar4, LVar0) + AddF(LVar2, Float(-700.0)) + AddF(LVar3, Float(15.0)) + AddF(LVar4, Float(-25.0)) + Call(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Else + Call(MakeLerp, 0, 100, 7, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + SetF(LVar2, Float(0.5)) + SetF(LVar3, Float(-0.2)) + SetF(LVar4, Float(0.9)) + MulF(LVar2, LVar0) + MulF(LVar3, LVar0) + MulF(LVar4, LVar0) + AddF(LVar2, Float(-690.0)) + AddF(LVar3, Float(15.0)) + AddF(LVar4, Float(-25.0)) + Call(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Idle) + Call(RemoveItemEntity, LVar7) + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Idle) + Call(EndSpeech, NPC_SELF, ANIM_GateFlower_Yellow_Talk, ANIM_GateFlower_Yellow_Idle, 0) + EndSwitch + EndSwitch + Thread + Call(ResetCam, CAM_DEFAULT, Float(6.0)) + EndThread + Wait(10) + Else + IfLt(GB_StoryProgress, STORY_CH6_STAR_SPIRIT_RESCUED) + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_HappyTalk, ANIM_GateFlower_Yellow_HappyIdle, 0, MSG_CH6_0047) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_HappyTalk, ANIM_GateFlower_Yellow_HappyIdle, 0, MSG_CH6_0048) + EndIf + EndIf + Call(DisablePlayerInput, FALSE) + Unbind + Return + End }; EvtScript N(EVS_NpcInit_GateFlower) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_GateFlower))) - EVT_IF_EQ(GF_FLO08_GaveYellowBerry, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_HappyDance) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o96, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(RotateModel, MODEL_o69, 50, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o70, 50, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o71, 50, 0, 1, 0) - EVT_CALL(RotateModel, MODEL_o148, 120, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o149, 120, 0, -1, 0) - EVT_CALL(RotateModel, MODEL_o150, 120, 0, -1, 0) - EVT_END_IF - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_GateFlower))) + IfEq(GF_FLO08_GaveYellowBerry, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_HappyDance) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o96, COLLIDER_FLAGS_UPPER_MASK) + Call(RotateModel, MODEL_o69, 50, 0, 1, 0) + Call(RotateModel, MODEL_o70, 50, 0, 1, 0) + Call(RotateModel, MODEL_o71, 50, 0, 1, 0) + Call(RotateModel, MODEL_o148, 120, 0, -1, 0) + Call(RotateModel, MODEL_o149, 120, 0, -1, 0) + Call(RotateModel, MODEL_o150, 120, 0, -1, 0) + EndIf + Return + End }; NpcData N(NpcData_GateFlower) = { @@ -332,24 +332,24 @@ NpcData N(NpcData_Dayzee_07) = { }; EvtScript N(EVS_NpcInit_AmazyDayzee) = { - EVT_THREAD - EVT_WAIT(2) - EVT_CALL(GetNpcPointer, NPC_Dayzee_02, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_RETURN - EVT_END_IF - EVT_CALL(RandInt, 100, LVar0) - EVT_IF_LT(LVar0, 30) - EVT_CALL(SetNpcFlagBits, NPC_Dayzee_02, NPC_FLAG_INVISIBLE | NPC_FLAG_INACTIVE, TRUE) - EVT_CALL(SetNpcPos, NPC_Dayzee_02, NPC_DISPOSE_LOCATION) - EVT_ELSE - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_INACTIVE, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + Wait(2) + Call(GetNpcPointer, NPC_Dayzee_02, LVar0) + IfEq(LVar0, 0) + Call(RemoveNpc, NPC_SELF) + Return + EndIf + Call(RandInt, 100, LVar0) + IfLt(LVar0, 30) + Call(SetNpcFlagBits, NPC_Dayzee_02, NPC_FLAG_INVISIBLE | NPC_FLAG_INACTIVE, TRUE) + Call(SetNpcPos, NPC_Dayzee_02, NPC_DISPOSE_LOCATION) + Else + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE | NPC_FLAG_INACTIVE, TRUE) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + EndThread + Return + End }; NpcData N(NpcData_AmazyDayzee) = { diff --git a/src/world/dead/area_flo/flo_08/flo_08_5_foliage.c b/src/world/dead/area_flo/flo_08/flo_08_5_foliage.c index f9f1fafcf23..7955e91f6e0 100644 --- a/src/world/dead/area_flo/flo_08/flo_08_5_foliage.c +++ b/src/world/dead/area_flo/flo_08/flo_08_5_foliage.c @@ -35,11 +35,11 @@ BombTrigger N(BombPos_Tree1) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(AF_FLO_TreeDrop_BlueBerry1, FALSE) - EVT_SET(AF_FLO_TreeDrop_BlueBerry2, FALSE) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o172, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_RETURN - EVT_END + Set(AF_FLO_TreeDrop_BlueBerry1, FALSE) + Set(AF_FLO_TreeDrop_BlueBerry2, FALSE) + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o172, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Return + End }; diff --git a/src/world/dead/area_flo/flo_08/flo_08_6_vines.c b/src/world/dead/area_flo/flo_08/flo_08_6_vines.c index f4237b91cca..3aa693a8493 100644 --- a/src/world/dead/area_flo/flo_08/flo_08_6_vines.c +++ b/src/world/dead/area_flo/flo_08/flo_08_6_vines.c @@ -12,6 +12,6 @@ EvtScript N(EVS_SetupVines) = { EVT_DROPPING_VINE(ITEM_NONE, MODEL_o82, MODEL_o83, MODEL_o84, MODEL_o85) EVT_DROPPING_VINE(ITEM_NONE, MODEL_o88, MODEL_o89, MODEL_o90, MODEL_o91) EVT_DROPPING_VINE(ITEM_STINKY_HERB, MODEL_o159, MODEL_o158, MODEL_o160, MODEL_o161) - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/dead/area_flo/flo_09/flo_09_1_music.c b/src/world/dead/area_flo/flo_09/flo_09_1_music.c index effb8d484c5..495a8fcceaf 100644 --- a/src/world/dead/area_flo/flo_09/flo_09_1_music.c +++ b/src/world/dead/area_flo/flo_09/flo_09_1_music.c @@ -1,12 +1,12 @@ #include "flo_09.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/dead/area_flo/flo_09/flo_09_2_main.c b/src/world/dead/area_flo/flo_09/flo_09_2_main.c index 147ff980379..4dbb8dda2d6 100644 --- a/src/world/dead/area_flo/flo_09/flo_09_2_main.c +++ b/src/world/dead/area_flo/flo_09/flo_09_2_main.c @@ -12,34 +12,34 @@ EvtScript N(EVS_ExitWalk_flo_00_5) = EVT_EXIT_WALK(60, flo_09_ENTRY_0, "flo_00", EvtScript N(EVS_ExitWalk_flo_03_0) = EVT_EXIT_WALK(60, flo_09_ENTRY_1, "flo_03", flo_03_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_00_5)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_00_5)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_flo_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_SetupVines)) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o104, SURFACE_TYPE_FLOWERS) + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Exec(N(EVS_SetupVines)) + Exec(N(EVS_SetupFoliage)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o104, SURFACE_TYPE_FLOWERS) EVT_FLOWER_SPAWN_REGION( -511, -4, -319, 10, 0) EVT_FLOWER_SPAWN_REGION( -302, 77, -32, 116, 0) EVT_FLOWER_SPAWN_REGION( 51, 18, 141, 127, 0) EVT_FLOWER_SPAWN_REGION( 234, 38, 502, 98, 0) EVT_FLOWER_SPAWN_REGION( -525, -163, -400, -80, 60) EVT_FLOWER_SPAWN_REGION( -346, -148, 517, -91, 60) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Return + End }; diff --git a/src/world/dead/area_flo/flo_09/flo_09_3_vines.c b/src/world/dead/area_flo/flo_09/flo_09_3_vines.c index e06ef052228..e55204649c6 100644 --- a/src/world/dead/area_flo/flo_09/flo_09_3_vines.c +++ b/src/world/dead/area_flo/flo_09/flo_09_3_vines.c @@ -14,6 +14,6 @@ EvtScript N(EVS_SetupVines) = { EVT_DROPPING_VINE(ITEM_NONE, MODEL_o84, MODEL_o85, MODEL_o86, MODEL_o87) EVT_DROPPING_VINE(ITEM_NONE, MODEL_o96, MODEL_o97, MODEL_o98, MODEL_o99) EVT_DROPPING_VINE(ITEM_NONE, MODEL_o92, MODEL_o93, MODEL_o94, MODEL_o95) - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/dead/area_flo/flo_09/flo_09_4_foliage.c b/src/world/dead/area_flo/flo_09/flo_09_4_foliage.c index 7c8ce0c3137..24467e8022a 100644 --- a/src/world/dead/area_flo/flo_09/flo_09_4_foliage.c +++ b/src/world/dead/area_flo/flo_09/flo_09_4_foliage.c @@ -3,55 +3,55 @@ #include "common/foliage.inc.c" EvtScript N(EVS_SpawnBzzap) = { - EVT_CALL(GetNpcPos, NPC_Bzzap_02, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar1, 0) - EVT_CALL(GetModelCenter, LVar9) - EVT_ADD(LVar2, 35) - EVT_CALL(SetNpcPos, NPC_Bzzap_02, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_Bzzap_02, LVar0, LVar1, LVar2) + IfLt(LVar1, 0) + Call(GetModelCenter, LVar9) + Add(LVar2, 35) + Call(SetNpcPos, NPC_Bzzap_02, LVar0, LVar1, LVar2) + EndIf + Return + End }; EvtScript N(EVS_OnShakeTree1) = { - EVT_IF_EQ(GF_FLO09_Item_HappyFlowerB, FALSE) - EVT_IF_EQ(AB_FLO_TreePuzzle_SecondCorrect, 1) - EVT_CALL(MakeItemEntity, ITEM_HAPPY_FLOWER_B, -250, 100, 0, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_FLO09_Item_HappyFlowerB) - EVT_ELSE - EVT_SET(LVar9, MODEL_o10) - EVT_EXEC(N(EVS_SpawnBzzap)) - EVT_END_IF - EVT_SET(AB_FLO_TreePuzzle_FirstCorrect, 0) - EVT_SET(AB_FLO_TreePuzzle_SecondCorrect, 0) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_FLO09_Item_HappyFlowerB, FALSE) + IfEq(AB_FLO_TreePuzzle_SecondCorrect, 1) + Call(MakeItemEntity, ITEM_HAPPY_FLOWER_B, -250, 100, 0, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_FLO09_Item_HappyFlowerB) + Else + Set(LVar9, MODEL_o10) + Exec(N(EVS_SpawnBzzap)) + EndIf + Set(AB_FLO_TreePuzzle_FirstCorrect, 0) + Set(AB_FLO_TreePuzzle_SecondCorrect, 0) + EndIf + Return + End }; EvtScript N(EVS_OnShakeTree2) = { - EVT_IF_EQ(GF_FLO09_Item_HappyFlowerB, FALSE) - EVT_SET(AB_FLO_TreePuzzle_FirstCorrect, 1) - EVT_SET(AB_FLO_TreePuzzle_SecondCorrect, 0) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_FLO09_Item_HappyFlowerB, FALSE) + Set(AB_FLO_TreePuzzle_FirstCorrect, 1) + Set(AB_FLO_TreePuzzle_SecondCorrect, 0) + EndIf + Return + End }; EvtScript N(EVS_OnShakeTree3) = { - EVT_IF_EQ(GF_FLO09_Item_HappyFlowerB, FALSE) - EVT_IF_EQ(AB_FLO_TreePuzzle_FirstCorrect, 1) - EVT_IF_EQ(AB_FLO_TreePuzzle_SecondCorrect, 0) - EVT_SET(AB_FLO_TreePuzzle_SecondCorrect, 1) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_SET(LVar9, MODEL_o13) - EVT_EXEC(N(EVS_SpawnBzzap)) - EVT_SET(AB_FLO_TreePuzzle_FirstCorrect, 0) - EVT_SET(AB_FLO_TreePuzzle_SecondCorrect, 0) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_FLO09_Item_HappyFlowerB, FALSE) + IfEq(AB_FLO_TreePuzzle_FirstCorrect, 1) + IfEq(AB_FLO_TreePuzzle_SecondCorrect, 0) + Set(AB_FLO_TreePuzzle_SecondCorrect, 1) + Return + EndIf + EndIf + Set(LVar9, MODEL_o13) + Exec(N(EVS_SpawnBzzap)) + Set(AB_FLO_TreePuzzle_FirstCorrect, 0) + Set(AB_FLO_TreePuzzle_SecondCorrect, 0) + EndIf + Return + End }; FoliageModelList N(Tree1_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o11, MODEL_o12); @@ -97,17 +97,17 @@ BombTrigger N(BombPos_Tree3) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(AB_FLO_TreePuzzle_FirstCorrect, 0) - EVT_SET(AB_FLO_TreePuzzle_SecondCorrect, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o10, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o3, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0) - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree3))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o13, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree3)), 1, 0) - EVT_RETURN - EVT_END + Set(AB_FLO_TreePuzzle_FirstCorrect, 0) + Set(AB_FLO_TreePuzzle_SecondCorrect, 0) + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o10, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree2))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o3, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree2)), 1, 0) + Set(LVar0, Ref(N(ShakeTree_Tree3))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o13, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree3)), 1, 0) + Return + End }; diff --git a/src/world/dead/area_flo/flo_09/flo_09_5_npc.c b/src/world/dead/area_flo/flo_09/flo_09_5_npc.c index daecb4b311f..1a6afb2f3d3 100644 --- a/src/world/dead/area_flo/flo_09/flo_09_5_npc.c +++ b/src/world/dead/area_flo/flo_09/flo_09_5_npc.c @@ -11,51 +11,51 @@ NpcSettings N(NpcSettings_Bzzap_02) = { }; EvtScript N(EVS_NpcAI_Bzzap_02) = { - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar1, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_SELF, 0) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, 50, LVar2, 15) - EVT_CALL(SetSelfVar, 0, 1) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Bzzap))) - EVT_END_IF - EVT_CASE_EQ(2) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(25) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) - EVT_CALL(SetSelfVar, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetSelfVar, 0, LVar0) + Switch(LVar0) + CaseEq(0) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + IfGt(LVar1, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_SELF, 0) + Call(NpcJump0, NPC_SELF, LVar0, 50, LVar2, 15) + Call(SetSelfVar, 0, 1) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_Bzzap))) + EndIf + CaseEq(2) + Call(DisablePlayerInput, TRUE) + Wait(25) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_INVISIBLE, FALSE) + Call(SetSelfVar, 0, 0) + Call(DisablePlayerInput, FALSE) + EndSwitch + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_NpcDefeat_Bzzap_02) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(SetSelfVar, 0, 2) - EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Bzzap_02))) - EVT_CALL(DoNpcDefeat) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(SetSelfVar, 0, 2) + Call(BindNpcAI, NPC_SELF, Ref(N(EVS_NpcAI_Bzzap_02))) + Call(DoNpcDefeat) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Bzzap_02) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Bzzap_02))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Bzzap_02))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcAI_Bzzap_02))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Bzzap_02))) + Return + End }; NpcData N(NpcData_Dayzee_01) = { diff --git a/src/world/dead/area_flo/flo_10/flo_10_1_music.c b/src/world/dead/area_flo/flo_10/flo_10_1_music.c index 5289a4af6f2..4760bd6a6c8 100644 --- a/src/world/dead/area_flo/flo_10/flo_10_1_music.c +++ b/src/world/dead/area_flo/flo_10/flo_10_1_music.c @@ -1,34 +1,34 @@ #include "flo_10.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, flo_10_ENTRY_1) - EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) - EVT_ELSE - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_END_IF - EVT_IF_GE(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER) - EVT_CALL(PlaySound, SOUND_LOOP_FLO_WATER_FLOW_2) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, flo_10_ENTRY_1) + Call(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) + Else + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndSwitch + EndIf + IfGe(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER) + Call(PlaySound, SOUND_LOOP_FLO_WATER_FLOW_2) + EndIf + Return + End }; EvtScript N(EVS_PushFlowerSong) = { - EVT_CALL(PushSong, SONG_FLOWER_NPC_THEME, 2) - EVT_RETURN - EVT_END + Call(PushSong, SONG_FLOWER_NPC_THEME, 2) + Return + End }; EvtScript N(EVS_PopSong) = { - EVT_CALL(FadeOutMusic, 0, 250) - EVT_WAIT(10) - EVT_CALL(PopSong) - EVT_RETURN - EVT_END + Call(FadeOutMusic, 0, 250) + Wait(10) + Call(PopSong) + Return + End }; diff --git a/src/world/dead/area_flo/flo_10/flo_10_2_entity.c b/src/world/dead/area_flo/flo_10/flo_10_2_entity.c index 7b5a111cd02..fa94ddec39f 100644 --- a/src/world/dead/area_flo/flo_10/flo_10_2_entity.c +++ b/src/world/dead/area_flo/flo_10/flo_10_2_entity.c @@ -1,9 +1,9 @@ #include "flo_10.h" EvtScript N(EVS_MakeEntities) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER) - EVT_CALL(MakeItemEntity, ITEM_WATER_STONE, 0, -60, 6, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER) + Call(MakeItemEntity, ITEM_WATER_STONE, 0, -60, 6, ITEM_SPAWN_MODE_DECORATION, 0) + EndIf + Return + End }; diff --git a/src/world/dead/area_flo/flo_10/flo_10_3_main.c b/src/world/dead/area_flo/flo_10/flo_10_3_main.c index e5c253b0614..b8f68b4c546 100644 --- a/src/world/dead/area_flo/flo_10/flo_10_3_main.c +++ b/src/world/dead/area_flo/flo_10/flo_10_3_main.c @@ -11,43 +11,43 @@ API_CALLABLE(N(SpawnSunEffect)) { EvtScript N(EVS_ExitWalk_flo_24_1) = EVT_EXIT_WALK(60, flo_10_ENTRY_0, "flo_24", flo_24_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_24_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_24_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_EXEC(N(EVS_SetupWaterStoneSocket)) - EVT_EXEC(N(EVS_SetupFountain)) - EVT_EXEC(N(EVS_SetupWaterEffect)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o80, SURFACE_TYPE_FLOWERS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o93, SURFACE_TYPE_FLOWERS) + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupFoliage)) + Exec(N(EVS_SetupWaterStoneSocket)) + Exec(N(EVS_SetupFountain)) + Exec(N(EVS_SetupWaterEffect)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o80, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o93, SURFACE_TYPE_FLOWERS) EVT_FLOWER_SPAWN_REGION( -265, 247, 199, 313, 0) EVT_FLOWER_SPAWN_REGION( -300, -275, -140, -185, 0) EVT_FLOWER_SPAWN_REGION( 263, -248, 362, 146, 0) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(flo_10_ENTRY_1) - EVT_EXEC(N(EVS_Scene_SunReturns)) - EVT_CASE_EQ(flo_10_ENTRY_2) - EVT_EXEC(N(EVS_Scene_PostReleaseFountain)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_DEFAULT - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(flo_10_ENTRY_1) + Exec(N(EVS_Scene_SunReturns)) + CaseEq(flo_10_ENTRY_2) + Exec(N(EVS_Scene_PostReleaseFountain)) + Exec(N(EVS_BindExitTriggers)) + CaseDefault + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndSwitch + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Return + End }; diff --git a/src/world/dead/area_flo/flo_10/flo_10_4_fountain.c b/src/world/dead/area_flo/flo_10/flo_10_4_fountain.c index 62def281bb2..a33f53ae99e 100644 --- a/src/world/dead/area_flo/flo_10/flo_10_4_fountain.c +++ b/src/world/dead/area_flo/flo_10/flo_10_4_fountain.c @@ -7,309 +7,309 @@ #include "world/common/atomic/TexturePan.inc.c" EvtScript N(EVS_RaiseFountain) = { - EVT_CALL(MakeLerp, -50, 170, 385, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g22, 0, LVar0, 0) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeLerp, -50, 170, 385, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g22, 0, LVar0, 0) + IfEq(LVar1, 1) + Wait(1) + Goto(1) + EndIf + Return + End }; EvtScript N(EVS_GrowFountain) = { - EVT_CALL(MakeLerp, 0, 100, 90, EASING_QUADRATIC_IN) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, LVar0) - EVT_SETF(LVar3, LVar0) - EVT_DIVF(LVar2, EVT_FLOAT(333.0)) - EVT_DIVF(LVar3, EVT_FLOAT(100.0)) - EVT_ADDF(LVar2, EVT_FLOAT(0.703)) - EVT_CALL(ScaleGroup, MODEL_g22, LVar2, LVar3, LVar2) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeLerp, 0, 100, 90, EASING_QUADRATIC_IN) + Label(1) + Call(UpdateLerp) + SetF(LVar2, LVar0) + SetF(LVar3, LVar0) + DivF(LVar2, Float(333.0)) + DivF(LVar3, Float(100.0)) + AddF(LVar2, Float(0.703)) + Call(ScaleGroup, MODEL_g22, LVar2, LVar3, LVar2) + IfEq(LVar1, 1) + Wait(1) + Goto(1) + EndIf + Return + End }; EvtScript N(EVS_TexPan_Rainbow) = { - EVT_CALL(EnableTexPanning, MODEL_o73, TRUE) - EVT_THREAD + Call(EnableTexPanning, MODEL_o73, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_A) TEX_PAN_PARAMS_STEP( -150, 0, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; EvtScript N(EVS_EnableRainbow) = { - EVT_WAIT(60) - EVT_CALL(EnableModel, MODEL_o73, TRUE) - EVT_EXEC(N(EVS_TexPan_Rainbow)) - EVT_RETURN - EVT_END + Wait(60) + Call(EnableModel, MODEL_o73, TRUE) + Exec(N(EVS_TexPan_Rainbow)) + Return + End }; EvtScript N(EVS_RaiseLily) = { - EVT_WAIT(80) - EVT_CALL(EnableNpcShadow, NPC_Lily, FALSE) - EVT_CALL(GetNpcPos, NPC_Lily, LVar3, LVar4, LVar5) - EVT_CALL(MakeLerp, 10, 55, 108, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(LVar6, LVar4) - EVT_ADD(LVar6, LVar0) - EVT_ADD(LVar6, -10) - EVT_CALL(SetNpcPos, NPC_Lily, LVar3, LVar6, LVar5) - EVT_CALL(TranslateGroup, MODEL_g31, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Wait(80) + Call(EnableNpcShadow, NPC_Lily, FALSE) + Call(GetNpcPos, NPC_Lily, LVar3, LVar4, LVar5) + Call(MakeLerp, 10, 55, 108, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Set(LVar6, LVar4) + Add(LVar6, LVar0) + Add(LVar6, -10) + Call(SetNpcPos, NPC_Lily, LVar3, LVar6, LVar5) + Call(TranslateGroup, MODEL_g31, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_RaisePlayer) = { - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_WAIT(40) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SitIdle) - EVT_CALL(GetPlayerPos, LVar2, LVar0, LVar3) - EVT_CALL(MakeLerp, -50, 90, 60, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar2, EVT_FLOAT(1.2)) - EVT_DIVF(LVar3, EVT_FLOAT(1.2)) - EVT_CALL(SetPlayerPos, LVar2, LVar0, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 90, 270, 280, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetPlayerPos, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerPhysics, TRUE) + Wait(40) + Call(SetPlayerAnimation, ANIM_MarioW2_SitIdle) + Call(GetPlayerPos, LVar2, LVar0, LVar3) + Call(MakeLerp, -50, 90, 60, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + DivF(LVar2, Float(1.2)) + DivF(LVar3, Float(1.2)) + Call(SetPlayerPos, LVar2, LVar0, LVar3) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 90, 270, 280, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(SetPlayerPos, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerPhysics, FALSE) + Return + End }; EvtScript N(EVS_RaiseCamera) = { - EVT_WAIT(80) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.7)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(25.0), EVT_FLOAT(-22.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Wait(80) + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Call(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.7)) + Call(SetCamPitch, CAM_DEFAULT, Float(25.0), Float(-22.0)) + Call(SetCamDistance, CAM_DEFAULT, 450) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_UnleashFountain) = { - EVT_CALL(DisablePartnerAI, 0) - EVT_EXEC(N(EVS_RaiseFountain)) - EVT_EXEC(N(EVS_GrowFountain)) - EVT_EXEC(N(EVS_EnableRainbow)) - EVT_EXEC(N(EVS_RaiseLily)) - EVT_EXEC(N(EVS_RaisePlayer)) - EVT_EXEC(N(EVS_RaiseCamera)) - EVT_RETURN - EVT_END + Call(DisablePartnerAI, 0) + Exec(N(EVS_RaiseFountain)) + Exec(N(EVS_GrowFountain)) + Exec(N(EVS_EnableRainbow)) + Exec(N(EVS_RaiseLily)) + Exec(N(EVS_RaisePlayer)) + Exec(N(EVS_RaiseCamera)) + Return + End }; EvtScript N(EVS_LowerFountain) = { - EVT_CALL(MakeLerp, 170, 75, 150, EASING_LINEAR) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g22, 0, LVar0, 0) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeLerp, 170, 75, 150, EASING_LINEAR) + Label(1) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g22, 0, LVar0, 0) + IfEq(LVar1, 1) + Wait(1) + Goto(1) + EndIf + Return + End }; EvtScript N(EVS_ShrinkFountain) = { - EVT_CALL(MakeLerp, 100, 15, 150, EASING_QUADRATIC_IN) - EVT_LABEL(1) - EVT_CALL(UpdateLerp) - EVT_SETF(LVar2, LVar0) - EVT_SETF(LVar3, LVar0) - EVT_DIVF(LVar2, EVT_FLOAT(333.0)) - EVT_DIVF(LVar3, EVT_FLOAT(100.0)) - EVT_ADDF(LVar2, EVT_FLOAT(0.703)) - EVT_CALL(ScaleGroup, MODEL_g22, LVar2, LVar3, LVar2) - EVT_IF_EQ(LVar1, 1) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeLerp, 100, 15, 150, EASING_QUADRATIC_IN) + Label(1) + Call(UpdateLerp) + SetF(LVar2, LVar0) + SetF(LVar3, LVar0) + DivF(LVar2, Float(333.0)) + DivF(LVar3, Float(100.0)) + AddF(LVar2, Float(0.703)) + Call(ScaleGroup, MODEL_g22, LVar2, LVar3, LVar2) + IfEq(LVar1, 1) + Wait(1) + Goto(1) + EndIf + Return + End }; EvtScript N(EVS_FountainSlowing) = { - EVT_EXEC(N(EVS_LowerFountain)) - EVT_EXEC(N(EVS_ShrinkFountain)) - EVT_RETURN - EVT_END + Exec(N(EVS_LowerFountain)) + Exec(N(EVS_ShrinkFountain)) + Return + End }; EvtScript N(EVS_Scene_ReleaseFountain) = { - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Still) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 600) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(EnableGroup, MODEL_g22, TRUE) - EVT_CALL(TranslateGroup, MODEL_g22, 0, -50, 0) - EVT_CALL(ScaleGroup, MODEL_g22, 0, 0, 0) - EVT_CALL(EnableGroup, MODEL_g31, TRUE) - EVT_EXEC_WAIT(N(EVS_UnleashFountain)) - EVT_WAIT(20) - EVT_CALL(PlaySound, SOUND_LOOP_FLO_RELEASE_FOUNTAIN) - EVT_WAIT(360) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Flail) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.2)) - EVT_CALL(PlayerJump1, -100, -10, -172, 75) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0)) - EVT_EXEC_WAIT(N(EVS_FountainSlowing)) - EVT_WAIT(60) - EVT_CALL(GotoMap, EVT_PTR("flo_24"), flo_24_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Wait(20) + Call(SetPlayerAnimation, ANIM_Mario1_Still) + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Call(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(SetCamDistance, CAM_DEFAULT, 600) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(EnableGroup, MODEL_g22, TRUE) + Call(TranslateGroup, MODEL_g22, 0, -50, 0) + Call(ScaleGroup, MODEL_g22, 0, 0, 0) + Call(EnableGroup, MODEL_g31, TRUE) + ExecWait(N(EVS_UnleashFountain)) + Wait(20) + Call(PlaySound, SOUND_LOOP_FLO_RELEASE_FOUNTAIN) + Wait(360) + Call(InterpPlayerYaw, 90, 0) + Call(SetPlayerAnimation, ANIM_MarioW2_Flail) + Call(SetPlayerJumpscale, Float(0.2)) + Call(PlayerJump1, -100, -10, -172, 75) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(1.0)) + ExecWait(N(EVS_FountainSlowing)) + Wait(60) + Call(GotoMap, Ref("flo_24"), flo_24_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_Scene_PostReleaseFountain) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerPos, -100, -10, -172) - EVT_CALL(InterpPlayerYaw, 150, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Fallen) - EVT_CALL(SetNpcPos, NPC_PARTNER, -129, 9, -177) - EVT_CALL(EnablePartnerAI) - EVT_CALL(ClearPartnerMoveHistory, NPC_PARTNER) - EVT_CALL(EnableGroup, MODEL_water, TRUE) - EVT_CALL(EnableGroup, MODEL_g2, FALSE) - EVT_CALL(EnableGroup, MODEL_g12, FALSE) - EVT_CALL(EnableGroup, MODEL_g31, FALSE) - EVT_CALL(SetNpcPos, NPC_Lily, -57, -20, -105) - EVT_CALL(InterpNpcYaw, NPC_Lily, 90, 0) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(90.0), 0, 450, EVT_FLOAT(25.0), EVT_FLOAT(-6.0)) - EVT_WAIT(30) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_GetUp) - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(10) - EVT_EXEC_WAIT(N(EVS_PushFlowerSong)) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Lily, ANIM_Lily_Talk, ANIM_Lily_Idle, 5, MSG_CH6_0082) - EVT_CALL(NpcFacePlayer, NPC_Lily, 1) - EVT_CALL(SpeakToPlayer, NPC_Lily, ANIM_Lily_TalkHappy, ANIM_Lily_IdleHappy, 0, MSG_CH6_0083) - EVT_CALL(SetNpcAnimation, NPC_Lily, ANIM_Lily_GiveItem) - EVT_WAIT(20) - EVT_CALL(SetNpcAnimation, NPC_Lily, ANIM_Lily_Idle) + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerPos, -100, -10, -172) + Call(InterpPlayerYaw, 150, 0) + Call(SetPlayerAnimation, ANIM_Mario1_Fallen) + Call(SetNpcPos, NPC_PARTNER, -129, 9, -177) + Call(EnablePartnerAI) + Call(ClearPartnerMoveHistory, NPC_PARTNER) + Call(EnableGroup, MODEL_water, TRUE) + Call(EnableGroup, MODEL_g2, FALSE) + Call(EnableGroup, MODEL_g12, FALSE) + Call(EnableGroup, MODEL_g31, FALSE) + Call(SetNpcPos, NPC_Lily, -57, -20, -105) + Call(InterpNpcYaw, NPC_Lily, 90, 0) + Call(AdjustCam, CAM_DEFAULT, Float(90.0), 0, 450, Float(25.0), Float(-6.0)) + Wait(30) + Call(SetPlayerAnimation, ANIM_Mario1_GetUp) + Wait(20) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(10) + ExecWait(N(EVS_PushFlowerSong)) + Wait(10) + Call(SpeakToPlayer, NPC_Lily, ANIM_Lily_Talk, ANIM_Lily_Idle, 5, MSG_CH6_0082) + Call(NpcFacePlayer, NPC_Lily, 1) + Call(SpeakToPlayer, NPC_Lily, ANIM_Lily_TalkHappy, ANIM_Lily_IdleHappy, 0, MSG_CH6_0083) + Call(SetNpcAnimation, NPC_Lily, ANIM_Lily_GiveItem) + Wait(20) + Call(SetNpcAnimation, NPC_Lily, ANIM_Lily_Idle) EVT_GIVE_KEY_REWARD(ITEM_MIRACLE_WATER) - EVT_CALL(SpeakToPlayer, NPC_Lily, ANIM_Lily_TalkHappy, ANIM_Lily_IdleHappy, 0, MSG_CH6_0084) - EVT_CALL(EndSpeech, NPC_Lily, ANIM_Lily_Talk, ANIM_Lily_Idle, 0) - EVT_CALL(SetNpcAnimation, NPC_Lily, ANIM_Lily_Idle) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_EXEC_WAIT(N(EVS_PopSong)) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_Lily, ANIM_Lily_TalkHappy, ANIM_Lily_IdleHappy, 0, MSG_CH6_0084) + Call(EndSpeech, NPC_Lily, ANIM_Lily_Talk, ANIM_Lily_Idle, 0) + Call(SetNpcAnimation, NPC_Lily, ANIM_Lily_Idle) + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + ExecWait(N(EVS_PopSong)) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_SetupFountain) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER) - EVT_CALL(EnableGroup, MODEL_water, FALSE) - EVT_CALL(EnableGroup, MODEL_g12, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_water, COLLIDER_FLAGS_UPPER_MASK) - EVT_ELSE - EVT_CALL(EnableGroup, MODEL_g2, FALSE) - EVT_CALL(EnableGroup, MODEL_g12, FALSE) - EVT_CALL(EnableGroup, MODEL_g31, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o83, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o86, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o87, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_CALL(EnableTexPanning, MODEL_o25, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o40, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o78, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o77, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o118, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o119, TRUE) - EVT_THREAD + IfLt(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER) + Call(EnableGroup, MODEL_water, FALSE) + Call(EnableGroup, MODEL_g12, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_water, COLLIDER_FLAGS_UPPER_MASK) + Else + Call(EnableGroup, MODEL_g2, FALSE) + Call(EnableGroup, MODEL_g12, FALSE) + Call(EnableGroup, MODEL_g31, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o83, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o86, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o87, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Call(EnableTexPanning, MODEL_o25, TRUE) + Call(EnableTexPanning, MODEL_o40, TRUE) + Call(EnableTexPanning, MODEL_o78, TRUE) + Call(EnableTexPanning, MODEL_o77, TRUE) + Call(EnableTexPanning, MODEL_o118, TRUE) + Call(EnableTexPanning, MODEL_o119, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 0,-2000, 0, 0) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_3) TEX_PAN_PARAMS_STEP( -100, 80, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_5) TEX_PAN_PARAMS_STEP(-1000, 2000, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_6) TEX_PAN_PARAMS_STEP( 0,-2000, 0, 0) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_8) TEX_PAN_PARAMS_STEP( 0,-1500, 0, 0) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_9) TEX_PAN_PARAMS_STEP( 0,-1000, 0, 0) TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_IF_GE(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER) - EVT_EXEC(N(EVS_TexPan_Rainbow)) - EVT_END_IF - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + IfGe(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER) + Exec(N(EVS_TexPan_Rainbow)) + EndIf + Return + End }; diff --git a/src/world/dead/area_flo/flo_10/flo_10_5_npc.c b/src/world/dead/area_flo/flo_10/flo_10_5_npc.c index b79b0ab7a60..d5137a68abb 100644 --- a/src/world/dead/area_flo/flo_10/flo_10_5_npc.c +++ b/src/world/dead/area_flo/flo_10/flo_10_5_npc.c @@ -4,23 +4,23 @@ #include "world/common/npc/Lily.inc.c" EvtScript N(EVS_Scene_SunReturns) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetNpcPos, NPC_Lily, 60, 0, 55) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_Lily, ANIM_Lily_Talk, ANIM_Lily_Idle, 0, MSG_CH6_00C6) - EVT_WAIT(10) - EVT_CALL(GotoMap, EVT_PTR("flo_12"), flo_12_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetNpcPos, NPC_Lily, 60, 0, 55) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, 450) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-6.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20) + Call(SpeakToPlayer, NPC_Lily, ANIM_Lily_Talk, ANIM_Lily_Idle, 0, MSG_CH6_00C6) + Wait(10) + Call(GotoMap, Ref("flo_12"), flo_12_ENTRY_1) + Wait(100) + Return + End }; s32 N(KeyList)[] = { @@ -29,174 +29,174 @@ s32 N(KeyList)[] = { }; EvtScript N(EVS_OnInteract_WaterStoneSocket) = { - EVT_IF_EQ(GF_FLO10_ShowedLilyTheWaterStone, TRUE) - EVT_CALL(GetPartnerInUse, LVarA) - EVT_IF_NE(LVarA, 0) - EVT_CALL(AwaitPlayerLeave, 0, 0, 19) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) - EVT_CALL(ShowKeyChoicePopup) - EVT_SET(LVar2, LVar0) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(-1) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Lily, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 0, MSG_CH6_0081) - EVT_CASE_DEFAULT - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_CALL(PlayerMoveTo, -17, -17, 20) - EVT_CALL(func_802CF56C, 2) - EVT_CALL(InterpPlayerYaw, 100, 1) - EVT_WAIT(10) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(1.0), 0, 450, EVT_FLOAT(25.0), EVT_FLOAT(-6.0)) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_PlaceItem) - EVT_CALL(RemoveKeyItemAt, LVar1) - EVT_CALL(MakeItemEntity, ITEM_WATER_STONE, 0, -60, 6, ITEM_SPAWN_MODE_DECORATION, 0) - EVT_SET(LVarA, LVar0) - EVT_CALL(CloseChoicePopup) - EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL) - EVT_EXEC_WAIT(N(EVS_Scene_ReleaseFountain)) - EVT_END_SWITCH - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(AwaitPlayerLeave, 0, 0, 19) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_FLO10_ShowedLilyTheWaterStone, TRUE) + Call(GetPartnerInUse, LVarA) + IfNe(LVarA, 0) + Call(AwaitPlayerLeave, 0, 0, 19) + Return + EndIf + Call(DisablePlayerInput, TRUE) + SetGroup(EVT_GROUP_00) + Call(SetTimeFreezeMode, TIME_FREEZE_PARTIAL) + Call(ShowKeyChoicePopup) + Set(LVar2, LVar0) + Switch(LVar2) + CaseEq(-1) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + Wait(10) + Call(SpeakToPlayer, NPC_Lily, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 0, MSG_CH6_0081) + CaseDefault + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Call(PlayerMoveTo, -17, -17, 20) + Call(func_802CF56C, 2) + Call(InterpPlayerYaw, 100, 1) + Wait(10) + Call(AdjustCam, CAM_DEFAULT, Float(1.0), 0, 450, Float(25.0), Float(-6.0)) + Wait(10) + Call(SetPlayerAnimation, ANIM_MarioW1_PlaceItem) + Call(RemoveKeyItemAt, LVar1) + Call(MakeItemEntity, ITEM_WATER_STONE, 0, -60, 6, ITEM_SPAWN_MODE_DECORATION, 0) + Set(LVarA, LVar0) + Call(CloseChoicePopup) + Call(SetTimeFreezeMode, TIME_FREEZE_NORMAL) + ExecWait(N(EVS_Scene_ReleaseFountain)) + EndSwitch + Call(DisablePlayerInput, FALSE) + Call(AwaitPlayerLeave, 0, 0, 19) + EndIf + Return + End }; EvtScript N(EVS_SetupWaterStoneSocket) = { - EVT_BIND_PADLOCK(EVT_PTR(N(EVS_OnInteract_WaterStoneSocket)), TRIGGER_FLOOR_TOUCH, COLLIDER_o83, EVT_PTR(N(KeyList)), 0, 1) - EVT_RETURN - EVT_END + BindPadlock(Ref(N(EVS_OnInteract_WaterStoneSocket)), TRIGGER_FLOOR_TOUCH, COLLIDER_o83, Ref(N(KeyList)), 0, 1) + Return + End }; EvtScript N(EVS_MovePlayerToTalk) = { - EVT_WAIT(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_IF_LT(LVar5, LVar2) - EVT_SET(LVar6, 30) - EVT_ELSE - EVT_SET(LVar6, 20) - EVT_END_IF - EVT_SET(LVar1, LVar0) - EVT_SET(LVar4, LVar0) - EVT_SUB(LVar1, LVar6) - EVT_ADD(LVar4, LVar6) - EVT_SWITCH(LVar3) - EVT_CASE_RANGE(LVar1, LVar4) - EVT_THREAD - EVT_IF_LT(LVar3, LVar0) - EVT_SUB(LVar0, 40) - EVT_ELSE - EVT_ADD(LVar0, 40) - EVT_END_IF - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(PlayerMoveTo, LVar0, LVar5, 15) - EVT_CALL(PlayerFaceNpc, NPC_Lily, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_END_THREAD - EVT_END_SWITCH - EVT_RETURN - EVT_END + Wait(10) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(GetPlayerPos, LVar3, LVar4, LVar5) + IfLt(LVar5, LVar2) + Set(LVar6, 30) + Else + Set(LVar6, 20) + EndIf + Set(LVar1, LVar0) + Set(LVar4, LVar0) + Sub(LVar1, LVar6) + Add(LVar4, LVar6) + Switch(LVar3) + CaseRange(LVar1, LVar4) + Thread + IfLt(LVar3, LVar0) + Sub(LVar0, 40) + Else + Add(LVar0, 40) + EndIf + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(PlayerMoveTo, LVar0, LVar5, 15) + Call(PlayerFaceNpc, NPC_Lily, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + EndThread + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Lily) = { - EVT_EXEC_WAIT(N(EVS_PushFlowerSong)) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN) - EVT_EXEC(N(EVS_MovePlayerToTalk)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 325) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(23.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 5, MSG_CH6_0078) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Lily_DreadLoop, ANIM_Lily_Dread, 5) - EVT_CASE_LT(STORY_CH6_GOT_WATER_STONE) - EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, FALSE) - EVT_EXEC(N(EVS_MovePlayerToTalk)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 325) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(23.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 5, MSG_CH6_0079) - EVT_CALL(NpcFacePlayer, NPC_SELF, 1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Lily_Idle) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 15, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(15) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_Idle, ANIM_Lily_Idle, 0, MSG_CH6_007A) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Lily_Dread, ANIM_Lily_Idle, 0) - EVT_CALL(GetPlayerTargetYaw, LVar0) - EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 1) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 5, MSG_CH6_007B) - EVT_CALL(NpcFacePlayer, NPC_SELF, 1) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 0, MSG_CH6_007C) - EVT_CALL(ShowChoice, MSG_Choice_0011) - EVT_WAIT(10) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Lily_TalkHappy, ANIM_Lily_IdleHappy, 0, MSG_CH6_007D) - EVT_CASE_EQ(1) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 0, MSG_CH6_007E) - EVT_END_SWITCH - EVT_WAIT(10) - EVT_SET(GF_FLO10_LilyRequestedWaterStone, TRUE) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_400000, 0) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 5, MSG_CH6_007F) - EVT_END_IF - EVT_CASE_LT(STORY_CH6_FILLED_SPRING_WITH_WATER) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 0, MSG_CH6_0080) - EVT_SET(GF_FLO10_ShowedLilyTheWaterStone, TRUE) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 0, MSG_CH6_0085) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 0) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 0) - EVT_CASE_LT(STORY_CH6_RETURNED_TO_TOAD_TOWN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkHappy, ANIM_Lily_IdleHappy, 0, MSG_CH6_0086) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 0, MSG_CH6_0087) - EVT_END_SWITCH - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_EXEC_WAIT(N(EVS_PopSong)) - EVT_RETURN - EVT_END + ExecWait(N(EVS_PushFlowerSong)) + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_GOT_MAGICAL_BEAN) + Exec(N(EVS_MovePlayerToTalk)) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 325) + Call(SetCamPitch, CAM_DEFAULT, Float(23.0), Float(-9.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 5, MSG_CH6_0078) + Call(EndSpeech, NPC_SELF, ANIM_Lily_DreadLoop, ANIM_Lily_Dread, 5) + CaseLt(STORY_CH6_GOT_WATER_STONE) + IfEq(GF_FLO10_LilyRequestedWaterStone, FALSE) + Exec(N(EVS_MovePlayerToTalk)) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 325) + Call(SetCamPitch, CAM_DEFAULT, Float(23.0), Float(-9.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 5, MSG_CH6_0079) + Call(NpcFacePlayer, NPC_SELF, 1) + Call(SetNpcAnimation, NPC_SELF, ANIM_Lily_Idle) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 15, EMOTER_NPC, 0, 0, 0, 0) + Wait(15) + Call(SpeakToPlayer, NPC_SELF, ANIM_Lily_Idle, ANIM_Lily_Idle, 0, MSG_CH6_007A) + Call(EndSpeech, NPC_SELF, ANIM_Lily_Dread, ANIM_Lily_Idle, 0) + Call(GetPlayerTargetYaw, LVar0) + Call(InterpNpcYaw, NPC_SELF, LVar0, 1) + Wait(20) + Call(SpeakToPlayer, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 5, MSG_CH6_007B) + Call(NpcFacePlayer, NPC_SELF, 1) + Wait(20) + Call(SpeakToPlayer, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 0, MSG_CH6_007C) + Call(ShowChoice, MSG_Choice_0011) + Wait(10) + Switch(LVar0) + CaseEq(0) + Call(ContinueSpeech, NPC_SELF, ANIM_Lily_TalkHappy, ANIM_Lily_IdleHappy, 0, MSG_CH6_007D) + CaseEq(1) + Call(ContinueSpeech, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 0, MSG_CH6_007E) + EndSwitch + Wait(10) + Set(GF_FLO10_LilyRequestedWaterStone, TRUE) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_400000, 0) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 5, MSG_CH6_007F) + EndIf + CaseLt(STORY_CH6_FILLED_SPRING_WITH_WATER) + Call(SpeakToPlayer, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 0, MSG_CH6_0080) + Set(GF_FLO10_ShowedLilyTheWaterStone, TRUE) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 0, MSG_CH6_0085) + Call(EndSpeech, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 0) + Call(EndSpeech, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 0) + CaseLt(STORY_CH6_RETURNED_TO_TOAD_TOWN) + Call(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkHappy, ANIM_Lily_IdleHappy, 0, MSG_CH6_0086) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 0, MSG_CH6_0087) + EndSwitch + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + ExecWait(N(EVS_PopSong)) + Return + End }; EvtScript N(EVS_NpcInit_Lily) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lily))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_GOT_WATER_STONE) - EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Lily_IdlePlead) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 1) - EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_400000, 1) - EVT_END_IF - EVT_CASE_EQ(STORY_CH6_GOT_WATER_STONE) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 1) - EVT_CASE_GE(STORY_CH6_FILLED_SPRING_WITH_WATER) - EVT_CALL(SetNpcPos, NPC_SELF, -67, -20, -105) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Lily))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_GOT_WATER_STONE) + IfEq(GF_FLO10_LilyRequestedWaterStone, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Lily_IdlePlead) + Call(InterpNpcYaw, NPC_SELF, 90, 1) + Call(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAG_400000, 1) + EndIf + CaseEq(STORY_CH6_GOT_WATER_STONE) + Call(InterpNpcYaw, NPC_SELF, 270, 1) + CaseGe(STORY_CH6_FILLED_SPRING_WITH_WATER) + Call(SetNpcPos, NPC_SELF, -67, -20, -105) + EndSwitch + Return + End }; NpcData N(NpcData_Lily) = { diff --git a/src/world/dead/area_flo/flo_10/flo_10_6_waterfx.c b/src/world/dead/area_flo/flo_10/flo_10_6_waterfx.c index ea4eaaf4c20..5786268c336 100644 --- a/src/world/dead/area_flo/flo_10/flo_10_6_waterfx.c +++ b/src/world/dead/area_flo/flo_10/flo_10_6_waterfx.c @@ -8,8 +8,8 @@ s32 N(WavePhase) = { // unused wavy distortion effect for edge water -- unclear how it would have been used EvtScript N(EVS_SetupWaterEffect) = { - EVT_RETURN - EVT_END + Return + End }; void N(UnkModelFunc000)(s32 x1, s32 y1, s32 x2, s32 y2) { diff --git a/src/world/dead/area_flo/flo_10/flo_10_7_foliage.c b/src/world/dead/area_flo/flo_10/flo_10_7_foliage.c index dd7b4ee3b3a..c5c8957ffe6 100644 --- a/src/world/dead/area_flo/flo_10/flo_10_7_foliage.c +++ b/src/world/dead/area_flo/flo_10/flo_10_7_foliage.c @@ -29,9 +29,9 @@ BombTrigger N(BombPos_Tree1) = { }; EvtScript N(EVS_SetupFoliage) = { - EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1))) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o85, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0) - EVT_RETURN - EVT_END + Set(LVar0, Ref(N(ShakeTree_Tree1))) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o85, 1, 0) + BindTrigger(Ref(N(EVS_ShakeTree)), TRIGGER_POINT_BOMB, Ref(N(BombPos_Tree1)), 1, 0) + Return + End }; diff --git a/src/world/dead/area_flo/flo_11/flo_11_1_music.c b/src/world/dead/area_flo/flo_11/flo_11_1_music.c index 0fe004dc968..eb4e98a91ab 100644 --- a/src/world/dead/area_flo/flo_11/flo_11_1_music.c +++ b/src/world/dead/area_flo/flo_11/flo_11_1_music.c @@ -1,12 +1,12 @@ #include "flo_11.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/dead/area_flo/flo_11/flo_11_2_main.c b/src/world/dead/area_flo/flo_11/flo_11_2_main.c index 7dbe5b44af3..6eaa1a4166b 100644 --- a/src/world/dead/area_flo/flo_11/flo_11_2_main.c +++ b/src/world/dead/area_flo/flo_11/flo_11_2_main.c @@ -14,80 +14,80 @@ EvtScript N(EVS_ExitWalk_flo_23_1) = EVT_EXIT_WALK(60, flo_11_ENTRY_0, "flo_23", EvtScript N(EVS_ExitWalk_flo_12_0) = EVT_EXIT_WALK(60, flo_11_ENTRY_1, "flo_12", flo_12_ENTRY_0); // template for GotoMap exits used with pipes in the maze -#define EVT_GOTO_MAP(mapName, entry) \ +#define Goto_MAP(mapName, entry) \ { \ - EVT_SET_GROUP(EVT_GROUP_1B) \ - EVT_CALL(GotoMap, EVT_PTR(mapName), entry) \ - EVT_WAIT(100) \ - EVT_RETURN \ - EVT_END \ + SetGroup(EVT_GROUP_1B) \ + Call(GotoMap, Ref(mapName), entry) \ + Wait(100) \ + Return \ + End \ } // template for binding the event for the generic EVS_OnEnterPipe -#define EVT_SETUP_PIPE(entry, collider, exitScript) \ - EVT_SET(LVar0, entry) \ - EVT_SET(LVar1, collider) \ - EVT_SET(LVar2, EVT_PTR(exitScript)) \ - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnEnterPipe)), TRIGGER_FLOOR_TOUCH, LVar1, 1, 0) +#define SetUP_PIPE(entry, collider, exitScript) \ + Set(LVar0, entry) \ + Set(LVar1, collider) \ + Set(LVar2, Ref(exitScript)) \ + BindTrigger(Ref(N(EVS_OnEnterPipe)), TRIGGER_FLOOR_TOUCH, LVar1, 1, 0) -EvtScript N(EVS_GotoMap_flo_11_5) = EVT_GOTO_MAP("flo_11", flo_11_ENTRY_5); -EvtScript N(EVS_GotoMap_flo_11_6) = EVT_GOTO_MAP("flo_11", flo_11_ENTRY_6); -EvtScript N(EVS_GotoMap_flo_11_7) = EVT_GOTO_MAP("flo_11", flo_11_ENTRY_7); -EvtScript N(EVS_GotoMap_flo_11_2) = EVT_GOTO_MAP("flo_11", flo_11_ENTRY_2); -EvtScript N(EVS_GotoMap_flo_11_3) = EVT_GOTO_MAP("flo_11", flo_11_ENTRY_3); -EvtScript N(EVS_GotoMap_flo_11_4) = EVT_GOTO_MAP("flo_11", flo_11_ENTRY_4); +EvtScript N(EVS_GotoMap_flo_11_5) = Goto_MAP("flo_11", flo_11_ENTRY_5); +EvtScript N(EVS_GotoMap_flo_11_6) = Goto_MAP("flo_11", flo_11_ENTRY_6); +EvtScript N(EVS_GotoMap_flo_11_7) = Goto_MAP("flo_11", flo_11_ENTRY_7); +EvtScript N(EVS_GotoMap_flo_11_2) = Goto_MAP("flo_11", flo_11_ENTRY_2); +EvtScript N(EVS_GotoMap_flo_11_3) = Goto_MAP("flo_11", flo_11_ENTRY_3); +EvtScript N(EVS_GotoMap_flo_11_4) = Goto_MAP("flo_11", flo_11_ENTRY_4); EvtScript N(EVS_OnEnterPipe) = { - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_SET(LVarC, LVar2) - EVT_EXEC_WAIT(N(EVS_Pipe_ExitVertical)) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Set(LVarB, LVar1) + Set(LVarC, LVar2) + ExecWait(N(EVS_Pipe_ExitVertical)) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_12_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_23_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_SETUP_PIPE(flo_11_ENTRY_2, COLLIDER_o91, N(EVS_GotoMap_flo_11_5)) // link 2 <--> 5 - EVT_SETUP_PIPE(flo_11_ENTRY_3, COLLIDER_o92, N(EVS_GotoMap_flo_11_6)) // link 3 <--> 6 - EVT_SETUP_PIPE(flo_11_ENTRY_4, COLLIDER_o93, N(EVS_GotoMap_flo_11_7)) // link 4 <--> 7 - EVT_SETUP_PIPE(flo_11_ENTRY_5, COLLIDER_o94, N(EVS_GotoMap_flo_11_2)) // link 2 <--> 5 - EVT_SETUP_PIPE(flo_11_ENTRY_6, COLLIDER_o95, N(EVS_GotoMap_flo_11_3)) // link 3 <--> 6 - EVT_SETUP_PIPE(flo_11_ENTRY_7, COLLIDER_o96, N(EVS_GotoMap_flo_11_4)) // link 4 <--> 7 - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_12_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_flo_23_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + SetUP_PIPE(flo_11_ENTRY_2, COLLIDER_o91, N(EVS_GotoMap_flo_11_5)) // link 2 <--> 5 + SetUP_PIPE(flo_11_ENTRY_3, COLLIDER_o92, N(EVS_GotoMap_flo_11_6)) // link 3 <--> 6 + SetUP_PIPE(flo_11_ENTRY_4, COLLIDER_o93, N(EVS_GotoMap_flo_11_7)) // link 4 <--> 7 + SetUP_PIPE(flo_11_ENTRY_5, COLLIDER_o94, N(EVS_GotoMap_flo_11_2)) // link 2 <--> 5 + SetUP_PIPE(flo_11_ENTRY_6, COLLIDER_o95, N(EVS_GotoMap_flo_11_3)) // link 3 <--> 6 + SetUP_PIPE(flo_11_ENTRY_7, COLLIDER_o96, N(EVS_GotoMap_flo_11_4)) // link 4 <--> 7 + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(func_80044238, 7) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_LE(LVar0, flo_11_ENTRY_1) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC(N(EVS_Scene_LakituAmbush)) - EVT_WAIT(1) - EVT_ELSE - EVT_SET(LVarA, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(N(EVS_Pipe_EnterVertical)) - EVT_WAIT(1) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o90, SURFACE_TYPE_HEDGES) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o104, SURFACE_TYPE_HEDGES) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o105, SURFACE_TYPE_HEDGES) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o109, SURFACE_TYPE_HEDGES) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + Call(func_80044238, 7) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Call(GetEntryID, LVar0) + IfLe(LVar0, flo_11_ENTRY_1) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Exec(N(EVS_Scene_LakituAmbush)) + Wait(1) + Else + Set(LVarA, Ref(N(EVS_BindExitTriggers))) + Exec(N(EVS_Pipe_EnterVertical)) + Wait(1) + EndIf + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o90, SURFACE_TYPE_HEDGES) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o104, SURFACE_TYPE_HEDGES) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o105, SURFACE_TYPE_HEDGES) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o109, SURFACE_TYPE_HEDGES) + Return + End }; diff --git a/src/world/dead/area_flo/flo_11/flo_11_3_npc.c b/src/world/dead/area_flo/flo_11/flo_11_3_npc.c index e9af8835998..0645202e0dc 100644 --- a/src/world/dead/area_flo/flo_11/flo_11_3_npc.c +++ b/src/world/dead/area_flo/flo_11/flo_11_3_npc.c @@ -65,307 +65,307 @@ Vec3f N(FlightPath_Lakitu_02_Flee)[] = { }; EvtScript N(EVS_PlayFlightSounds) = { - EVT_LOOP(0) - EVT_CALL(PlaySound, SOUND_FLIGHT) - EVT_WAIT(LVar0) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(PlaySound, SOUND_FLIGHT) + Wait(LVar0) + EndLoop + Return + End }; EvtScript N(EVS_LakitusFlying_Search) = { - EVT_SET(LVar0, 5) - EVT_EXEC_GET_TID(N(EVS_PlayFlightSounds), MV_FlyingSoundsScript) - EVT_THREAD - EVT_CALL(LoadPath, 160, EVT_PTR(N(FlightPath_Lakitu_01_Search)), + Set(LVar0, 5) + ExecGetTID(N(EVS_PlayFlightSounds), MV_FlyingSoundsScript) + Thread + Call(LoadPath, 160, Ref(N(FlightPath_Lakitu_01_Search)), ARRAY_COUNT(N(FlightPath_Lakitu_01_Search)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Lakitu_01, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(LoadPath, 160, EVT_PTR(N(FlightPath_Lakitu_02_Search)), + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Lakitu_01, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(LoadPath, 160, Ref(N(FlightPath_Lakitu_02_Search)), ARRAY_COUNT(N(FlightPath_Lakitu_02_Search)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Lakitu_02, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(MV_LakituSearchSync, 1) - EVT_RETURN - EVT_END + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Lakitu_02, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Set(MV_LakituSearchSync, 1) + Return + End }; EvtScript N(EVS_LakitusFlying_Gather) = { - EVT_THREAD - EVT_CALL(LoadPath, 30, EVT_PTR(N(FlightPath_Lakitu_01_Gather)), + Thread + Call(LoadPath, 30, Ref(N(FlightPath_Lakitu_01_Gather)), ARRAY_COUNT(N(FlightPath_Lakitu_01_Gather)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Lakitu_01, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(LoadPath, 45, EVT_PTR(N(FlightPath_Lakitu_02_Gather)), + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Lakitu_01, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(LoadPath, 45, Ref(N(FlightPath_Lakitu_02_Gather)), ARRAY_COUNT(N(FlightPath_Lakitu_02_Gather)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Lakitu_02, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_KILL_THREAD(MV_FlyingSoundsScript) - EVT_RETURN - EVT_END + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Lakitu_02, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + KillThread(MV_FlyingSoundsScript) + Return + End }; EvtScript N(EVS_LakitusFlying_Attack) = { - EVT_SET(LVar0, 4) - EVT_EXEC_GET_TID(N(EVS_PlayFlightSounds), MV_FlyingSoundsScript) - EVT_THREAD - EVT_CALL(LoadPath, 35, EVT_PTR(N(FlightPath_Lakitu_01_Attack)), + Set(LVar0, 4) + ExecGetTID(N(EVS_PlayFlightSounds), MV_FlyingSoundsScript) + Thread + Call(LoadPath, 35, Ref(N(FlightPath_Lakitu_01_Attack)), ARRAY_COUNT(N(FlightPath_Lakitu_01_Attack)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Lakitu_01, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(LoadPath, 35, EVT_PTR(N(FlightPath_Lakitu_02_Attack)), + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Lakitu_01, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + EndThread + Call(LoadPath, 35, Ref(N(FlightPath_Lakitu_02_Attack)), ARRAY_COUNT(N(FlightPath_Lakitu_02_Attack)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Lakitu_02, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Lakitu_02, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_LakitusFlying_Flee) = { - EVT_THREAD - EVT_CALL(LoadPath, 40, EVT_PTR(N(FlightPath_Lakitu_01_Flee)), + Thread + Call(LoadPath, 40, Ref(N(FlightPath_Lakitu_01_Flee)), ARRAY_COUNT(N(FlightPath_Lakitu_01_Flee)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Lakitu_01, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_Lakitu_01, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_CALL(LoadPath, 40, EVT_PTR(N(FlightPath_Lakitu_02_Flee)), + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Lakitu_01, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcPos, NPC_Lakitu_01, NPC_DISPOSE_LOCATION) + EndThread + Call(LoadPath, 40, Ref(N(FlightPath_Lakitu_02_Flee)), ARRAY_COUNT(N(FlightPath_Lakitu_02_Flee)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Lakitu_02, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_Lakitu_02, NPC_DISPOSE_LOCATION) - EVT_WAIT(40) - EVT_KILL_THREAD(MV_FlyingSoundsScript) - EVT_RETURN - EVT_END + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Lakitu_02, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcPos, NPC_Lakitu_02, NPC_DISPOSE_LOCATION) + Wait(40) + KillThread(MV_FlyingSoundsScript) + Return + End }; EvtScript N(EVS_Scene_LakituAmbush) = { - EVT_IF_EQ(GF_FLO11_Defeated_Lakitus, TRUE) - EVT_RETURN - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH6_GOT_MAGICAL_BEAN) - EVT_RETURN - EVT_END_IF - EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_Lakitu_01, 460, 200, -240) - EVT_CALL(SetNpcPos, NPC_Lakitu_02, -100, 200, -50) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 440) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(MV_LakituSearchSync, 0) - EVT_EXEC(N(EVS_LakitusFlying_Search)) - EVT_CALL(SetCamType, CAM_DEFAULT, 1, FALSE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(25.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_SET(LVar0, 270) - EVT_SET(LVar1, 100) - EVT_SET(LVar2, -87) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(14.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 87, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -50) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 87, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(30) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 150) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-16.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_EQ(MV_LakituSearchSync, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(NpcFaceNpc, NPC_Lakitu_01, NPC_Lakitu_02, 1) - EVT_CALL(NpcFaceNpc, NPC_Lakitu_02, NPC_Lakitu_01, 1) - EVT_EXEC(N(EVS_LakitusFlying_Gather)) - EVT_WAIT(30) - EVT_CALL(SpeakToPlayer, NPC_Lakitu_01, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0, MSG_CH6_0088) - EVT_CALL(NpcFaceNpc, NPC_Lakitu_02, NPC_Lakitu_01, 1) - EVT_CALL(SpeakToPlayer, NPC_Lakitu_02, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0, MSG_CH6_0089) - EVT_CALL(InterpNpcYaw, NPC_Lakitu_01, 0, 1) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_Lakitu_01, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0, MSG_CH6_008A) - EVT_CALL(SpeakToPlayer, NPC_Lakitu_02, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0, MSG_CH6_008B) - EVT_CALL(SetCamType, CAM_DEFAULT, 1, FALSE) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(14.0), EVT_FLOAT(-11.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 87, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -50) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC(N(EVS_LakitusFlying_Attack)) - EVT_CALL(SetNpcVar, NPC_Lakitu_01, 0, 1) - EVT_RETURN - EVT_END + IfEq(GF_FLO11_Defeated_Lakitus, TRUE) + Return + EndIf + IfLt(GB_StoryProgress, STORY_CH6_GOT_MAGICAL_BEAN) + Return + EndIf + IfEq(GF_FLO10_LilyRequestedWaterStone, FALSE) + Return + EndIf + Call(SetNpcPos, NPC_Lakitu_01, 460, 200, -240) + Call(SetNpcPos, NPC_Lakitu_02, -100, 200, -50) + Loop(0) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, 440) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, TRUE) + Set(MV_LakituSearchSync, 0) + Exec(N(EVS_LakitusFlying_Search)) + Call(SetCamType, CAM_DEFAULT, 1, FALSE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(25.0), Float(-7.0)) + Call(SetCamDistance, CAM_DEFAULT, 450) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20) + Set(LVar0, 270) + Set(LVar1, 100) + Set(LVar2, -87) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamPitch, CAM_DEFAULT, Float(14.0), Float(-11.0)) + Call(SetCamPosA, CAM_DEFAULT, 87, 0) + Call(SetCamPosB, CAM_DEFAULT, 0, -50) + Call(SetCamPosC, CAM_DEFAULT, 87, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(30) + Call(SetCamDistance, CAM_DEFAULT, 150) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-16.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Loop(0) + Wait(1) + IfEq(MV_LakituSearchSync, 1) + BreakLoop + EndIf + EndLoop + Call(NpcFaceNpc, NPC_Lakitu_01, NPC_Lakitu_02, 1) + Call(NpcFaceNpc, NPC_Lakitu_02, NPC_Lakitu_01, 1) + Exec(N(EVS_LakitusFlying_Gather)) + Wait(30) + Call(SpeakToPlayer, NPC_Lakitu_01, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0, MSG_CH6_0088) + Call(NpcFaceNpc, NPC_Lakitu_02, NPC_Lakitu_01, 1) + Call(SpeakToPlayer, NPC_Lakitu_02, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0, MSG_CH6_0089) + Call(InterpNpcYaw, NPC_Lakitu_01, 0, 1) + Wait(20) + Call(SpeakToPlayer, NPC_Lakitu_01, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0, MSG_CH6_008A) + Call(SpeakToPlayer, NPC_Lakitu_02, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0, MSG_CH6_008B) + Call(SetCamType, CAM_DEFAULT, 1, FALSE) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(14.0), Float(-11.0)) + Call(SetCamDistance, CAM_DEFAULT, 450) + Call(SetCamPosA, CAM_DEFAULT, 87, 0) + Call(SetCamPosB, CAM_DEFAULT, 0, -50) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Exec(N(EVS_LakitusFlying_Attack)) + Call(SetNpcVar, NPC_Lakitu_01, 0, 1) + Return + End }; EvtScript N(EVS_NpcIdle_Lakitu_01) = { - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_THREAD - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4.0), 0, 1000, EVT_FLOAT(14.0), EVT_FLOAT(-11.0)) - EVT_END_THREAD - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_RETURN - EVT_END + Loop(0) + Call(GetSelfVar, 0, LVar0) + IfNe(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Thread + Call(AdjustCam, CAM_DEFAULT, Float(4.0), 0, 1000, Float(14.0), Float(-11.0)) + EndThread + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Return + End }; EvtScript N(EVS_NpcDefeat_Lakitu_01) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(SetNpcPos, NPC_Lakitu_01, 400, 20, -40) - EVT_CALL(SetNpcPos, NPC_Lakitu_02, 400, 20, 40) - EVT_CALL(InterpNpcYaw, NPC_Lakitu_01, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_Lakitu_02, 270, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, -60) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 900) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(24.0), EVT_FLOAT(-4.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-95.0), EVT_FLOAT(0.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(0.0), EVT_FLOAT(-50.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC_WAIT(N(EVS_LakitusFlying_Flee)) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_SET(GF_FLO11_Defeated_Lakitus, TRUE) - EVT_SET(MV_LakituAmbushState, 1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(SetNpcPos, NPC_Lakitu_01, 400, 20, -40) + Call(SetNpcPos, NPC_Lakitu_02, 400, 20, 40) + Call(InterpNpcYaw, NPC_Lakitu_01, 270, 0) + Call(InterpNpcYaw, NPC_Lakitu_02, 270, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar2, -60) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 900) + Call(SetCamPitch, CAM_DEFAULT, Float(24.0), Float(-4.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(-95.0), Float(0.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(0.0), Float(-50.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + ExecWait(N(EVS_LakitusFlying_Flee)) + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + Set(GF_FLO11_Defeated_Lakitus, TRUE) + Set(MV_LakituAmbushState, 1) + Call(DisablePlayerInput, FALSE) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcDefeat_Lakitu_02) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_LABEL(0) - EVT_IF_EQ(MV_LakituAmbushState, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Label(0) + IfEq(MV_LakituAmbushState, 0) + Wait(1) + Goto(0) + EndIf + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Lakitu_01) = { - EVT_CALL(SetNpcPos, NPC_Lakitu_01, NPC_DISPOSE_LOCATION) - EVT_IF_EQ(GF_FLO11_Defeated_Lakitus, FALSE) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_GOT_MAGICAL_BEAN) - EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, TRUE) - EVT_SET(MV_LakituAmbushState, 0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Lakitu_01))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Lakitu_01))) - EVT_CALL(SetNpcPos, NPC_Lakitu_01, 350, 120, -220) - EVT_CALL(InterpNpcYaw, NPC_Lakitu_01, 270, 1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Lakitu_01, NPC_DISPOSE_LOCATION) + IfEq(GF_FLO11_Defeated_Lakitus, FALSE) + IfGe(GB_StoryProgress, STORY_CH6_GOT_MAGICAL_BEAN) + IfEq(GF_FLO10_LilyRequestedWaterStone, TRUE) + Set(MV_LakituAmbushState, 0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Lakitu_01))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Lakitu_01))) + Call(SetNpcPos, NPC_Lakitu_01, 350, 120, -220) + Call(InterpNpcYaw, NPC_Lakitu_01, 270, 1) + EndIf + EndIf + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Lakitu_02) = { - EVT_CALL(SetNpcPos, NPC_Lakitu_02, NPC_DISPOSE_LOCATION) - EVT_IF_EQ(GF_FLO11_Defeated_Lakitus, FALSE) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_GOT_MAGICAL_BEAN) - EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, TRUE) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Lakitu_02))) - EVT_CALL(SetNpcPos, NPC_Lakitu_02, 200, 110, 29) - EVT_CALL(InterpNpcYaw, NPC_Lakitu_02, 0, 1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Lakitu_02, NPC_DISPOSE_LOCATION) + IfEq(GF_FLO11_Defeated_Lakitus, FALSE) + IfGe(GB_StoryProgress, STORY_CH6_GOT_MAGICAL_BEAN) + IfEq(GF_FLO10_LilyRequestedWaterStone, TRUE) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Lakitu_02))) + Call(SetNpcPos, NPC_Lakitu_02, 200, 110, 29) + Call(InterpNpcYaw, NPC_Lakitu_02, 0, 1) + EndIf + EndIf + EndIf + Return + End }; NpcData N(NpcData_Lakitus)[] = { diff --git a/src/world/dead/area_flo/flo_11/flo_11_4_entity.c b/src/world/dead/area_flo/flo_11/flo_11_4_entity.c index a0b15ab008c..a40eeeb9b59 100644 --- a/src/world/dead/area_flo/flo_11/flo_11_4_entity.c +++ b/src/world/dead/area_flo/flo_11/flo_11_4_entity.c @@ -2,8 +2,8 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), -220, 60, -75, 0, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_FLO11_MultiCoinBrick) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_MulticoinBlock), -220, 60, -75, 0, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_FLO11_MultiCoinBrick) + Return + End }; diff --git a/src/world/dead/area_flo/flo_12/flo_12_1_music.c b/src/world/dead/area_flo/flo_12/flo_12_1_music.c index 8acf9d369b1..2ad1e5a598c 100644 --- a/src/world/dead/area_flo/flo_12/flo_12_1_music.c +++ b/src/world/dead/area_flo/flo_12/flo_12_1_music.c @@ -1,31 +1,31 @@ #include "flo_12.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, flo_12_ENTRY_1) - EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) - EVT_ELSE - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, flo_12_ENTRY_1) + Call(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) + Else + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndSwitch + EndIf + Return + End }; EvtScript N(EVS_PushFlowerSong) = { - EVT_CALL(PushSong, SONG_FLOWER_NPC_THEME, 3) - EVT_RETURN - EVT_END + Call(PushSong, SONG_FLOWER_NPC_THEME, 3) + Return + End }; EvtScript N(EVS_PopMusic) = { - EVT_CALL(FadeOutMusic, 0, 250) - EVT_WAIT(10) - EVT_CALL(PopSong) - EVT_RETURN - EVT_END + Call(FadeOutMusic, 0, 250) + Wait(10) + Call(PopSong) + Return + End }; diff --git a/src/world/dead/area_flo/flo_12/flo_12_2_main.c b/src/world/dead/area_flo/flo_12/flo_12_2_main.c index 529ca96df44..329ff393f92 100644 --- a/src/world/dead/area_flo/flo_12/flo_12_2_main.c +++ b/src/world/dead/area_flo/flo_12/flo_12_2_main.c @@ -11,34 +11,34 @@ API_CALLABLE(N(SpawnSunEffect)) { EvtScript N(EVS_ExitWalk_flo_11_1) = EVT_EXIT_WALK(60, flo_12_ENTRY_0, "flo_11", flo_11_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_11_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_11_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_SET(AF_FLO_GivenCrystalBerry, FALSE) - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o180, SURFACE_TYPE_FLOWERS) + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + Set(AF_FLO_GivenCrystalBerry, FALSE) + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o180, SURFACE_TYPE_FLOWERS) EVT_FLOWER_SPAWN_REGION( -65, -210, 90, -110, 0) EVT_FLOWER_SPAWN_REGION( -200, 130, -80, 170, 0) EVT_FLOWER_SPAWN_REGION( -270, -80, -225, 125, 0) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, flo_12_ENTRY_1) - EVT_EXEC(N(EVS_Scene_SunReturns)) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, flo_12_ENTRY_1) + Exec(N(EVS_Scene_SunReturns)) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndIf + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Return + End }; diff --git a/src/world/dead/area_flo/flo_12/flo_12_3_npc.c b/src/world/dead/area_flo/flo_12/flo_12_3_npc.c index 5f5cb0c4f7e..e169ccbf2a5 100644 --- a/src/world/dead/area_flo/flo_12/flo_12_3_npc.c +++ b/src/world/dead/area_flo/flo_12/flo_12_3_npc.c @@ -15,178 +15,178 @@ s32 N(KeyList)[] = { }; EvtScript N(EVS_Scene_SunReturns) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(GetNpcPos, NPC_Rosie, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-9.5)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -50) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(20) - EVT_CALL(SpeakToPlayer, NPC_Rosie, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_00C7) - EVT_WAIT(10) - EVT_CALL(GotoMap, EVT_PTR("flo_03"), flo_03_ENTRY_2) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(GetNpcPos, NPC_Rosie, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-9.5)) + Call(SetCamPosA, CAM_DEFAULT, 0, 0) + Call(SetCamPosB, CAM_DEFAULT, 0, -50) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(20) + Call(SpeakToPlayer, NPC_Rosie, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_00C7) + Wait(10) + Call(GotoMap, Ref("flo_03"), flo_03_ENTRY_2) + Wait(100) + Return + End }; EvtScript N(EVS_PlayerApproachRosie) = { - EVT_WAIT(10) - EVT_CALL(SetNpcFlagBits, NPC_Rosie, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(PlayerMoveTo, -5, 20, 20) - EVT_CALL(SetNpcFlagBits, NPC_Rosie, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(PlayerFaceNpc, NPC_Rosie, TRUE) - EVT_RETURN - EVT_END + Wait(10) + Call(SetNpcFlagBits, NPC_Rosie, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(PlayerMoveTo, -5, 20, 20) + Call(SetNpcFlagBits, NPC_Rosie, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(PlayerFaceNpc, NPC_Rosie, TRUE) + Return + End }; EvtScript N(EVS_PlayerApproachRosieAndItem) = { - EVT_WAIT(10) - EVT_CALL(SetNpcFlagBits, NPC_Rosie, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(PlayerMoveTo, -5, 20, 20) - EVT_CALL(SetNpcFlagBits, NPC_Rosie, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(PlayerFaceNpc, NPC_Rosie, TRUE) - EVT_RETURN - EVT_END + Wait(10) + Call(SetNpcFlagBits, NPC_Rosie, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(PlayerMoveTo, -5, 20, 20) + Call(SetNpcFlagBits, NPC_Rosie, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(PlayerFaceNpc, NPC_Rosie, TRUE) + Return + End }; EvtScript N(EVS_NpcInteract_Rosie) = { - EVT_EXEC_WAIT(N(EVS_PushFlowerSong)) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_GOT_CRYSTAL_BERRY) - EVT_SWITCH(GF_FLO12_Met_Rosie) - EVT_CASE_EQ(0) - EVT_EXEC(N(EVS_PlayerApproachRosie)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(4.0), LVar0, LVar1, LVar2, 325, EVT_FLOAT(19.0), EVT_FLOAT(-9.5)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_Talk, ANIM_Rosie_Idle, 5, MSG_CH6_008C) - EVT_CALL(ShowChoice, MSG_Choice_0011) - EVT_WAIT(10) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Rosie_Talk, ANIM_Rosie_Idle, 5, MSG_CH6_008D) - EVT_CASE_EQ(1) - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Rosie_Talk, ANIM_Rosie_Idle, 5, MSG_CH6_008E) - EVT_END_SWITCH - EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rosie_TakeOut) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rosie_IdleHold) - EVT_CALL(MakeItemEntity, ITEM_WATER_STONE, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, 0x00000564) - EVT_WAIT(10) - EVT_SWITCH(GF_FLO10_LilyRequestedWaterStone) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_TalkHold, 5, MSG_CH6_008F) - EVT_CASE_EQ(1) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_CarryRun) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_TalkHold, 5, MSG_CH6_008F) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_TakeItem) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0091) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Pray) - EVT_WAIT(40) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0092) - EVT_SET(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE) - EVT_END_SWITCH - EVT_SET(GF_FLO12_Met_Rosie, TRUE) - EVT_CASE_EQ(1) - EVT_SWITCH(GF_FLO12_RosieRequestedSomethingBeautiful) - EVT_CASE_EQ(0) - EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, TRUE) - EVT_EXEC(N(EVS_PlayerApproachRosieAndItem)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_TalkHold, 5, MSG_CH6_0090) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW1_TakeItem) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0091) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Pray) - EVT_WAIT(40) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0092) - EVT_SET(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_TalkHold, 5, MSG_CH6_0090) - EVT_END_IF - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0093) - EVT_END_SWITCH - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH6_GOT_WATER_STONE) - EVT_CALL(FindKeyItem, ITEM_CRYSTAL_BERRY, LVar0) - EVT_IF_NE(LVar0, -1) - EVT_EXEC(N(EVS_PlayerApproachRosieAndItem)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(4.0), LVar0, LVar1, LVar2, 325, EVT_FLOAT(19.0), EVT_FLOAT(-9.5)) - EVT_END_IF - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0094) + ExecWait(N(EVS_PushFlowerSong)) + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_GOT_CRYSTAL_BERRY) + Switch(GF_FLO12_Met_Rosie) + CaseEq(0) + Exec(N(EVS_PlayerApproachRosie)) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(SetCamProperties, CAM_DEFAULT, Float(4.0), LVar0, LVar1, LVar2, 325, Float(19.0), Float(-9.5)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_Talk, ANIM_Rosie_Idle, 5, MSG_CH6_008C) + Call(ShowChoice, MSG_Choice_0011) + Wait(10) + Switch(LVar0) + CaseEq(0) + Call(ContinueSpeech, NPC_SELF, ANIM_Rosie_Talk, ANIM_Rosie_Idle, 5, MSG_CH6_008D) + CaseEq(1) + Call(ContinueSpeech, NPC_SELF, ANIM_Rosie_Talk, ANIM_Rosie_Idle, 5, MSG_CH6_008E) + EndSwitch + Call(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Rosie_TakeOut) + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_Rosie_IdleHold) + Call(MakeItemEntity, ITEM_WATER_STONE, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, 0x00000564) + Wait(10) + Switch(GF_FLO10_LilyRequestedWaterStone) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_TalkHold, 5, MSG_CH6_008F) + CaseEq(1) + Call(SetPlayerAnimation, ANIM_MarioW1_CarryRun) + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_TalkHold, 5, MSG_CH6_008F) + Call(SetPlayerAnimation, ANIM_MarioW1_TakeItem) + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0091) + Call(SetPlayerAnimation, ANIM_Mario1_Pray) + Wait(40) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0092) + Set(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE) + EndSwitch + Set(GF_FLO12_Met_Rosie, TRUE) + CaseEq(1) + Switch(GF_FLO12_RosieRequestedSomethingBeautiful) + CaseEq(0) + IfEq(GF_FLO10_LilyRequestedWaterStone, TRUE) + Exec(N(EVS_PlayerApproachRosieAndItem)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_TalkHold, 5, MSG_CH6_0090) + Call(SetPlayerAnimation, ANIM_MarioW1_TakeItem) + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0091) + Call(SetPlayerAnimation, ANIM_Mario1_Pray) + Wait(40) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0092) + Set(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_TalkHold, 5, MSG_CH6_0090) + EndIf + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0093) + EndSwitch + EndSwitch + CaseLt(STORY_CH6_GOT_WATER_STONE) + Call(FindKeyItem, ITEM_CRYSTAL_BERRY, LVar0) + IfNe(LVar0, -1) + Exec(N(EVS_PlayerApproachRosieAndItem)) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(SetCamProperties, CAM_DEFAULT, Float(4.0), LVar0, LVar1, LVar2, 325, Float(19.0), Float(-9.5)) + EndIf + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0094) EVT_CHOOSE_KEY_ITEM_FROM(N(KeyList)) - EVT_SWITCH(LVar0) - EVT_CASE_LE(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0093) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0095) - EVT_CALL(RemoveItemEntity, LVar7) - EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, EVT_INDEX_OF_GAME_FLAG(GF_FLO12_HeldItemPickup)) + Switch(LVar0) + CaseLe(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0093) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0095) + Call(RemoveItemEntity, LVar7) + Call(MakeItemEntity, ITEM_CRYSTAL_BERRY, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, EVT_INDEX_OF_GAME_FLAG(GF_FLO12_HeldItemPickup)) EVT_GIVE_KEY_REWARD(ITEM_WATER_STONE) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0096) - EVT_SET(AF_FLO_GivenCrystalBerry, TRUE) - EVT_SET(GB_StoryProgress, STORY_CH6_GOT_WATER_STONE) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_SWITCH(AF_FLO_GivenCrystalBerry) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0097) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0096) - EVT_END_SWITCH - EVT_CASE_LT(STORY_CH6_RETURNED_TO_TOAD_TOWN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0098) - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0099) - EVT_END_SWITCH - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_EXEC_WAIT(N(EVS_PopMusic)) - EVT_RETURN - EVT_END + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0096) + Set(AF_FLO_GivenCrystalBerry, TRUE) + Set(GB_StoryProgress, STORY_CH6_GOT_WATER_STONE) + EndSwitch + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Switch(AF_FLO_GivenCrystalBerry) + CaseEq(0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0097) + CaseEq(1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0096) + EndSwitch + CaseLt(STORY_CH6_RETURNED_TO_TOAD_TOWN) + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0098) + CaseDefault + Call(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0099) + EndSwitch + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + ExecWait(N(EVS_PopMusic)) + Return + End }; EvtScript N(EVS_NpcInit_Rosie) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Rosie))) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 35) - EVT_CALL(SetNpcPos, NPC_Dummy, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_INVISIBLE, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_HAS_SHADOW, TRUE) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_GOT_CRYSTAL_BERRY) - EVT_IF_EQ(GF_FLO12_Met_Rosie, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rosie_IdleHold) - EVT_CALL(MakeItemEntity, ITEM_WATER_STONE, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, EVT_INDEX_OF_GAME_FLAG(GF_FLO12_HeldItemPickup)) - EVT_SET(LVarA, LVar0) - EVT_END_IF - EVT_CASE_LT(STORY_CH6_GOT_WATER_STONE) - EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rosie_IdleHold) - EVT_CALL(MakeItemEntity, ITEM_WATER_STONE, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, EVT_INDEX_OF_GAME_FLAG(GF_FLO12_HeldItemPickup)) - EVT_SET(LVarA, LVar0) - EVT_CASE_DEFAULT - EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rosie_IdleHold) - EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, EVT_INDEX_OF_GAME_FLAG(GF_FLO12_HeldItemPickup)) - EVT_SET(LVarA, LVar0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Rosie))) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar0, 35) + Call(SetNpcPos, NPC_Dummy, LVar0, LVar1, LVar2) + Call(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_INVISIBLE, TRUE) + Call(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_HAS_SHADOW, TRUE) + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_GOT_CRYSTAL_BERRY) + IfEq(GF_FLO12_Met_Rosie, TRUE) + Call(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Rosie_IdleHold) + Call(MakeItemEntity, ITEM_WATER_STONE, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, EVT_INDEX_OF_GAME_FLAG(GF_FLO12_HeldItemPickup)) + Set(LVarA, LVar0) + EndIf + CaseLt(STORY_CH6_GOT_WATER_STONE) + Call(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Rosie_IdleHold) + Call(MakeItemEntity, ITEM_WATER_STONE, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, EVT_INDEX_OF_GAME_FLAG(GF_FLO12_HeldItemPickup)) + Set(LVarA, LVar0) + CaseDefault + Call(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Rosie_IdleHold) + Call(MakeItemEntity, ITEM_CRYSTAL_BERRY, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, EVT_INDEX_OF_GAME_FLAG(GF_FLO12_HeldItemPickup)) + Set(LVarA, LVar0) + EndSwitch + Return + End }; NpcData N(NpcData_Rosie)[] = { diff --git a/src/world/dead/area_flo/flo_13/flo_13_1_music.c b/src/world/dead/area_flo/flo_13/flo_13_1_music.c index 01494355457..4750aeb400a 100644 --- a/src/world/dead/area_flo/flo_13/flo_13_1_music.c +++ b/src/world/dead/area_flo/flo_13/flo_13_1_music.c @@ -1,59 +1,59 @@ #include "flo_13.h" EvtScript N(EVS_PlaySongForPlayerPos) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, -500) - EVT_GOTO(10) - EVT_END_IF - EVT_LABEL(0) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, -500) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_LABEL(10) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_SUN_TOWER_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_SUN_TOWER_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar0, -500) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, -500) + Goto(10) + EndIf + Label(0) + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndSwitch + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, -500) + BreakLoop + EndIf + Wait(1) + EndLoop + Label(10) + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_SUN_TOWER_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_SUN_TOWER_SUNNY, 0, 8) + EndSwitch + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar0, -500) + BreakLoop + EndIf + Wait(1) + EndLoop + Goto(0) + Return + End }; EvtScript N(EVS_SetupMusic) = { - EVT_EXEC(N(EVS_PlaySongForPlayerPos)) - EVT_RETURN - EVT_END + Exec(N(EVS_PlaySongForPlayerPos)) + Return + End }; EvtScript N(EVS_PushPartnerSong) = { - EVT_CALL(SetMusicTrack, 0, SONG_NEW_PARTNER, 0, 8) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_NEW_PARTNER, 0, 8) + Return + End }; EvtScript N(EVS_PopSong) = { - EVT_CALL(FadeOutMusic, 0, 500) - EVT_WAIT(15) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_RETURN - EVT_END + Call(FadeOutMusic, 0, 500) + Wait(15) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + Return + End }; diff --git a/src/world/dead/area_flo/flo_13/flo_13_2_entity.c b/src/world/dead/area_flo/flo_13/flo_13_2_entity.c index e2ce62e5e01..1f6db154c22 100644 --- a/src/world/dead/area_flo/flo_13/flo_13_2_entity.c +++ b/src/world/dead/area_flo/flo_13/flo_13_2_entity.c @@ -2,20 +2,20 @@ #include "entity.h" EvtScript N(EVS_OnBlast_Rock) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o85, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o85, COLLIDER_FLAGS_UPPER_MASK) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_MEGA_SMASH, -61, 60, -85, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO13_Item_MegaSmash) - EVT_CALL(MakeItemEntity, ITEM_SHOOTING_STAR, 128, 0, 157, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO13_Item_ShootingStar) - EVT_IF_EQ(GF_FLO13_Item_MegaSmash, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BombableRock), -160, 160, -90, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBlast_Rock))) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o85, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_MEGA_SMASH, -61, 60, -85, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO13_Item_MegaSmash) + Call(MakeItemEntity, ITEM_SHOOTING_STAR, 128, 0, 157, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO13_Item_ShootingStar) + IfEq(GF_FLO13_Item_MegaSmash, FALSE) + Call(MakeEntity, Ref(Entity_BombableRock), -160, 160, -90, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnBlast_Rock))) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o85, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Return + End }; diff --git a/src/world/dead/area_flo/flo_13/flo_13_3_main.c b/src/world/dead/area_flo/flo_13/flo_13_3_main.c index 342dcdddf37..02fc22d2ad7 100644 --- a/src/world/dead/area_flo/flo_13/flo_13_3_main.c +++ b/src/world/dead/area_flo/flo_13/flo_13_3_main.c @@ -11,33 +11,33 @@ EvtScript N(EVS_ExitWalk_flo_14_1) = EVT_EXIT_WALK(60, flo_13_ENTRY_0, "flo_14", EvtScript N(EVS_ExitWalk_flo_15_0) = EVT_EXIT_WALK(60, flo_13_ENTRY_1, "flo_15", flo_15_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_15_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_14_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_15_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_flo_14_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o48, SURFACE_TYPE_FLOWERS) + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o48, SURFACE_TYPE_FLOWERS) EVT_FLOWER_SPAWN_REGION( 274, -137, 583, -64, 0) EVT_FLOWER_SPAWN_REGION( 433, 108, 580, 169, 0) EVT_FLOWER_SPAWN_REGION( -460, 90, -125, 130, 0) EVT_FLOWER_SPAWN_REGION( -420, -130, -260, -90, 0) EVT_FLOWER_SPAWN_REGION( -220, -137, 0, -50, 160) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Return + End }; diff --git a/src/world/dead/area_flo/flo_13/flo_13_4_npc.c b/src/world/dead/area_flo/flo_13/flo_13_4_npc.c index e85c1a2816d..cab0222f1db 100644 --- a/src/world/dead/area_flo/flo_13/flo_13_4_npc.c +++ b/src/world/dead/area_flo/flo_13/flo_13_4_npc.c @@ -95,503 +95,503 @@ Vec3f N(FlightPath_LakiluluDeparts)[] = { }; EvtScript N(EVS_Lakliester_ManageYaw) = { - EVT_CALL(GetNpcPos, NPC_Lakilester, LVar0, LVar1, LVar2) - EVT_LABEL(0) - EVT_CALL(GetNpcPos, NPC_Lakilester, LVar3, LVar4, LVar5) - EVT_CALL(N(UnkFunc42)) - EVT_CALL(InterpNpcYaw, NPC_Lakilester, LVarA, 0) - EVT_SET(LVar0, LVar3) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_CALL(GetAngleBetweenNPCs, NPC_PARTNER, NPC_Lakilester, LVarA) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, LVarA, 0) - EVT_CALL(PlayerFaceNpc, NPC_Lakilester, FALSE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_Lakilester, LVar0, LVar1, LVar2) + Label(0) + Call(GetNpcPos, NPC_Lakilester, LVar3, LVar4, LVar5) + Call(N(UnkFunc42)) + Call(InterpNpcYaw, NPC_Lakilester, LVarA, 0) + Set(LVar0, LVar3) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Call(GetAngleBetweenNPCs, NPC_PARTNER, NPC_Lakilester, LVarA) + Call(InterpNpcYaw, NPC_PARTNER, LVarA, 0) + Call(PlayerFaceNpc, NPC_Lakilester, FALSE) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_Laklilulu_ManageYaw) = { - EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) - EVT_LABEL(0) - EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar3, LVar4, LVar5) - EVT_CALL(N(UnkFunc42)) - EVT_CALL(InterpNpcYaw, NPC_Lakilulu, LVarA, 0) - EVT_SET(LVar0, LVar3) - EVT_SET(LVar1, LVar4) - EVT_SET(LVar2, LVar5) - EVT_CALL(GetAngleBetweenNPCs, NPC_PARTNER, NPC_Lakilulu, LVarA) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, LVarA, 0) - EVT_IF_LT(GB_StoryProgress, STORY_CH6_LAKILESTER_JOINED_PARTY) - EVT_CALL(GetAngleBetweenNPCs, NPC_Lakilester, NPC_Lakilulu, LVarB) - EVT_CALL(InterpNpcYaw, NPC_Lakilester, LVarB, 0) - EVT_END_IF - EVT_CALL(PlayerFaceNpc, NPC_Lakilulu, FALSE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + Label(0) + Call(GetNpcPos, NPC_Lakilulu, LVar3, LVar4, LVar5) + Call(N(UnkFunc42)) + Call(InterpNpcYaw, NPC_Lakilulu, LVarA, 0) + Set(LVar0, LVar3) + Set(LVar1, LVar4) + Set(LVar2, LVar5) + Call(GetAngleBetweenNPCs, NPC_PARTNER, NPC_Lakilulu, LVarA) + Call(InterpNpcYaw, NPC_PARTNER, LVarA, 0) + IfLt(GB_StoryProgress, STORY_CH6_LAKILESTER_JOINED_PARTY) + Call(GetAngleBetweenNPCs, NPC_Lakilester, NPC_Lakilulu, LVarB) + Call(InterpNpcYaw, NPC_Lakilester, LVarB, 0) + EndIf + Call(PlayerFaceNpc, NPC_Lakilulu, FALSE) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_LakiluluAndSpiny_HoverBobbing) = { - EVT_SET(MV_LakiluluSpinySceneState, 0) - EVT_LOOP(0) - EVT_LOOP(2) - EVT_CALL(GetNpcPos, NPC_Lakilulu_Spiny, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_Lakilulu_Spiny, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) - EVT_WAIT(2) - EVT_END_LOOP - EVT_WAIT(1) - EVT_LOOP(2) - EVT_CALL(GetNpcPos, NPC_Lakilulu_Spiny, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, -1) - EVT_CALL(SetNpcPos, NPC_Lakilulu_Spiny, LVar0, LVar1, LVar2) - EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, -1) - EVT_CALL(SetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) - EVT_WAIT(2) - EVT_END_LOOP - EVT_WAIT(1) - EVT_IF_EQ(MV_LakiluluSpinySceneState, 1) - EVT_SET(MV_LakiluluSpinySceneState, 2) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Set(MV_LakiluluSpinySceneState, 0) + Loop(0) + Loop(2) + Call(GetNpcPos, NPC_Lakilulu_Spiny, LVar0, LVar1, LVar2) + Add(LVar1, 1) + Call(SetNpcPos, NPC_Lakilulu_Spiny, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + Add(LVar1, 1) + Call(SetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + Wait(2) + EndLoop + Wait(1) + Loop(2) + Call(GetNpcPos, NPC_Lakilulu_Spiny, LVar0, LVar1, LVar2) + Add(LVar1, -1) + Call(SetNpcPos, NPC_Lakilulu_Spiny, LVar0, LVar1, LVar2) + Call(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + Add(LVar1, -1) + Call(SetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + Wait(2) + EndLoop + Wait(1) + IfEq(MV_LakiluluSpinySceneState, 1) + Set(MV_LakiluluSpinySceneState, 2) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_Lakilulu_SpinyToss) = { - EVT_EXEC(N(EVS_LakiluluAndSpiny_HoverBobbing)) - EVT_CALL(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Lift) - EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, -5) - EVT_ADD(LVar2, 30) - EVT_ADD(LVar3, 2) - EVT_CALL(SetNpcYaw, NPC_Lakilulu_Spiny, 270) - EVT_CALL(SetNpcPos, NPC_Lakilulu_Spiny, LVar1, LVar2, LVar3) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_END_THREAD - EVT_CALL(ContinueSpeech, NPC_Lakilulu, -1, -1, SPEECH_FLAG_200, MSG_CH6_00A8) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(EndSpeech, NPC_Lakilulu, -1, -1, SPEECH_FLAG_200) - EVT_END_THREAD - EVT_SET(MV_LakiluluSpinySceneState, 1) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_EQ(MV_LakiluluSpinySceneState, 2) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Throw) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, 5) - EVT_ADD(LVar2, 20) - EVT_CALL(SetNpcJumpscale, NPC_Lakilulu_Spiny, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump0, NPC_Lakilulu_Spiny, LVar1, LVar2, LVar3, 7) - EVT_ADD(LVar1, -100) - EVT_ADD(LVar2, 10) - EVT_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Lakilulu_Spiny, EVT_FLOAT(1.5)) - EVT_CALL(NpcJump0, NPC_Lakilulu_Spiny, LVar1, LVar2, LVar3, 15) - EVT_CALL(SetNpcPos, NPC_Lakilulu_Spiny, NPC_DISPOSE_LOCATION) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(2.0)) - EVT_END_THREAD - EVT_CALL(PlaySoundAtPlayer, SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_DEFAULT) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Hurt) - EVT_SET(LVar0, 90) - EVT_LOOP(20) - EVT_ADD(LVar0, 144) - EVT_IF_GT(LVar0, 359) - EVT_SUB(LVar0, 360) - EVT_END_IF - EVT_CALL(InterpPlayerYaw, LVar0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Still) - EVT_CALL(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Idle) - EVT_RETURN - EVT_END + Exec(N(EVS_LakiluluAndSpiny_HoverBobbing)) + Call(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Lift) + Call(GetNpcPos, NPC_Lakilulu, LVar1, LVar2, LVar3) + Add(LVar1, -5) + Add(LVar2, 30) + Add(LVar3, 2) + Call(SetNpcYaw, NPC_Lakilulu_Spiny, 270) + Call(SetNpcPos, NPC_Lakilulu_Spiny, LVar1, LVar2, LVar3) + Thread + Wait(5) + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + EndThread + Call(ContinueSpeech, NPC_Lakilulu, -1, -1, SPEECH_FLAG_200, MSG_CH6_00A8) + Thread + Wait(15) + Call(EndSpeech, NPC_Lakilulu, -1, -1, SPEECH_FLAG_200) + EndThread + Set(MV_LakiluluSpinySceneState, 1) + Loop(0) + Wait(1) + IfEq(MV_LakiluluSpinySceneState, 2) + BreakLoop + EndIf + EndLoop + Call(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Throw) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + Add(LVar1, 5) + Add(LVar2, 20) + Call(SetNpcJumpscale, NPC_Lakilulu_Spiny, Float(0.0)) + Call(NpcJump0, NPC_Lakilulu_Spiny, LVar1, LVar2, LVar3, 7) + Add(LVar1, -100) + Add(LVar2, 10) + Thread + Call(SetNpcJumpscale, NPC_Lakilulu_Spiny, Float(1.5)) + Call(NpcJump0, NPC_Lakilulu_Spiny, LVar1, LVar2, LVar3, 15) + Call(SetNpcPos, NPC_Lakilulu_Spiny, NPC_DISPOSE_LOCATION) + EndThread + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(2.0)) + EndThread + Call(PlaySoundAtPlayer, SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_DEFAULT) + Call(SetPlayerAnimation, ANIM_Mario1_Hurt) + Set(LVar0, 90) + Loop(20) + Add(LVar0, 144) + IfGt(LVar0, 359) + Sub(LVar0, 360) + EndIf + Call(InterpPlayerYaw, LVar0, 1) + Wait(1) + EndLoop + Call(SetPlayerAnimation, ANIM_Mario1_Still) + Call(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Idle) + Return + End }; EvtScript N(EVS_NpcIdle_Lakilester) = { - EVT_IF_NE(GB_StoryProgress, STORY_CH6_SPOKE_WITH_THE_SUN) - EVT_RETURN - EVT_END_IF - EVT_CALL(AwaitPlayerApproach, 200, 20, 275) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetNpcPos, NPC_Lakilester, -250, 120, 45) - EVT_CALL(SetMusicTrack, 0, SONG_LAKILESTER_THEME, 0, 8) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH6_00A0, 160, 40) - EVT_CALL(InterruptUsePartner) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_WAIT(20) - EVT_CALL(InterpPlayerYaw, 270, 1) - EVT_WAIT(20) - EVT_CALL(InterpPlayerYaw, 90, 1) - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Still) - EVT_CALL(func_802CF56C, 2) - EVT_CALL(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Run) - EVT_THREAD - EVT_CALL(N(PlayLakilesterFlightSounds)) - EVT_END_THREAD - EVT_EXEC_GET_TID(N(EVS_Lakliester_ManageYaw), LVar9) - EVT_CALL(LoadPath, 80, EVT_PTR(N(FlightPath_LakilesterAmbush)), ARRAY_COUNT(N(FlightPath_LakilesterAmbush)), EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Lakilester, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_KILL_THREAD(LVar9) - EVT_CALL(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Idle) - EVT_CALL(PlayerFaceNpc, NPC_Lakilester, FALSE) - EVT_WAIT(15) - EVT_CALL(GetNpcPos, NPC_Lakilester, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 200) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.0), EVT_FLOAT(-8.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_CALL(PlayerMoveTo, -75, 65, 10) - EVT_CALL(PlayerFaceNpc, NPC_Lakilester, FALSE) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00A1) - EVT_CALL(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Run) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Idle) - EVT_THREAD - EVT_CALL(SetCamDistance, CAM_DEFAULT, 1000) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_RETURN - EVT_END + IfNe(GB_StoryProgress, STORY_CH6_SPOKE_WITH_THE_SUN) + Return + EndIf + Call(AwaitPlayerApproach, 200, 20, 275) + Call(DisablePlayerInput, TRUE) + Call(SetNpcPos, NPC_Lakilester, -250, 120, 45) + Call(SetMusicTrack, 0, SONG_LAKILESTER_THEME, 0, 8) + Call(ShowMessageAtScreenPos, MSG_CH6_00A0, 160, 40) + Call(InterruptUsePartner) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Wait(20) + Call(InterpPlayerYaw, 270, 1) + Wait(20) + Call(InterpPlayerYaw, 90, 1) + Wait(20) + Call(SetPlayerAnimation, ANIM_Mario1_Still) + Call(func_802CF56C, 2) + Call(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Run) + Thread + Call(N(PlayLakilesterFlightSounds)) + EndThread + ExecGetTID(N(EVS_Lakliester_ManageYaw), LVar9) + Call(LoadPath, 80, Ref(N(FlightPath_LakilesterAmbush)), ARRAY_COUNT(N(FlightPath_LakilesterAmbush)), EASING_LINEAR) + Label(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Lakilester, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(0) + EndIf + KillThread(LVar9) + Call(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Idle) + Call(PlayerFaceNpc, NPC_Lakilester, FALSE) + Wait(15) + Call(GetNpcPos, NPC_Lakilester, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 200) + Call(SetCamPitch, CAM_DEFAULT, Float(18.0), Float(-8.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Call(PlayerMoveTo, -75, 65, 10) + Call(PlayerFaceNpc, NPC_Lakilester, FALSE) + EndThread + Call(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00A1) + Call(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Run) + Wait(10) + Call(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Idle) + Thread + Call(SetCamDistance, CAM_DEFAULT, 1000) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-6.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndThread + Call(DisablePlayerInput, FALSE) + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Return + End }; EvtScript N(EVS_Lakilulu_FlyAway) = { - EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) - EVT_CALL(AwaitPlayerLeave, LVar0, LVar2, 120) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, 0, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(5.5), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(NpcFaceNpc, NPC_Lakilulu, NPC_Lakilester, 1) - EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_00B4) - EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Lakilulu, 1) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 600) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(10.0), EVT_FLOAT(-8.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 130, -200) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_CALL(N(PlayLakiluluFlightSounds), 55) - EVT_END_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Lakilulu, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_EXEC_GET_TID(N(EVS_Laklilulu_ManageYaw), LVar9) - EVT_CALL(LoadPath, 55, EVT_PTR(N(FlightPath_LakiluluDeparts)), ARRAY_COUNT(N(FlightPath_LakiluluDeparts)), EASING_LINEAR) - EVT_LABEL(20) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Lakilulu, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_KILL_THREAD(LVar9) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_CALL(BringPartnerOut, PARTNER_LAKILESTER) - EVT_IF_NE(LVar0, PARTNER_LAKILESTER) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0)) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar2, 20) - EVT_ADD(LVar3, 20) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar1, LVar2, LVar3, 30) - EVT_END_IF - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_WAIT(5) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5, MSG_CH6_00B5) - EVT_CALL(EnablePartnerAI) - EVT_CALL(PutPartnerAway) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + Call(AwaitPlayerLeave, LVar0, LVar2, 120) + Call(DisablePlayerInput, TRUE) + Call(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, 0, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 250) + Call(SetCamPitch, CAM_DEFAULT, Float(5.5), Float(-7.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(NpcFaceNpc, NPC_Lakilulu, NPC_Lakilester, 1) + Call(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_00B4) + Call(NpcFaceNpc, NPC_PARTNER, NPC_Lakilulu, 1) + Call(SetCamDistance, CAM_DEFAULT, 600) + Call(SetCamPitch, CAM_DEFAULT, Float(10.0), Float(-8.0)) + Call(SetCamPosA, CAM_DEFAULT, 0, 0) + Call(SetCamPosB, CAM_DEFAULT, 130, -200) + Call(SetCamPosC, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Call(N(PlayLakiluluFlightSounds), 55) + EndThread + Call(SetNpcFlagBits, NPC_Lakilulu, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + ExecGetTID(N(EVS_Laklilulu_ManageYaw), LVar9) + Call(LoadPath, 55, Ref(N(FlightPath_LakiluluDeparts)), ARRAY_COUNT(N(FlightPath_LakiluluDeparts)), EASING_LINEAR) + Label(20) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Lakilulu, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(20) + EndIf + KillThread(LVar9) + Call(GetCurrentPartnerID, LVar0) + Call(BringPartnerOut, PARTNER_LAKILESTER) + IfNe(LVar0, PARTNER_LAKILESTER) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.0)) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + Add(LVar1, 20) + Add(LVar2, 20) + Add(LVar3, 20) + Call(NpcJump0, NPC_PARTNER, LVar1, LVar2, LVar3, 30) + EndIf + Call(DisablePartnerAI, 0) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + Wait(5) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5, MSG_CH6_00B5) + Call(EnablePartnerAI) + Call(PutPartnerAway) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Scene_LakilesterDefeated) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(30) - EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_TiredTalk, ANIM_WorldLakilester_Tired, 0, MSG_CH6_00A2) - EVT_CALL(SetNpcPos, NPC_Lakilulu, -290, 120, 45) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldLakilester_Idle) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_WAIT(20) - EVT_CALL(InterpPlayerYaw, 270, 1) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 5, MSG_CH6_00A3) - EVT_CALL(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Panic) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 500) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(5.5), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 130, -200) - EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(1) - EVT_THREAD - EVT_CALL(SetCamDistance, CAM_DEFAULT, 400) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 130, 60) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_THREAD - EVT_CALL(N(PlayLakiluluFlightSounds), 80) - EVT_END_THREAD - EVT_EXEC_GET_TID(N(EVS_Laklilulu_ManageYaw), LVar9) - EVT_CALL(LoadPath, 80, EVT_PTR(N(FlightPath_LakiluluArrives)), ARRAY_COUNT(N(FlightPath_LakiluluArrives)), EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Lakilulu, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_KILL_THREAD(LVar9) - EVT_CALL(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_ConcernedNod) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Still) - EVT_WAIT(20) - EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(5.5), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00A4) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Shout, ANIM_Lakilulu_Shout, 0, MSG_CH6_00A5) - EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Shout, ANIM_WorldLakilester_IdleTough, 0, MSG_CH6_00A6) - EVT_CALL(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Idle) - EVT_CALL(EndSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(10.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_LABEL(10) - EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_ConcernedTalk, ANIM_Lakilulu_ConcernedNod, 0, MSG_CH6_00A7) - EVT_CALL(ShowChoice, MSG_Choice_0020) - EVT_IF_NE(LVar0, 0) - EVT_EXEC_WAIT(N(EVS_Lakilulu_SpinyToss)) - EVT_WAIT(10) - EVT_GOTO(10) - EVT_ELSE - EVT_CALL(ContinueSpeech, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_00A9) - EVT_CALL(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Idle) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Still) - EVT_WAIT(20) - EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 250) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Shout, ANIM_WorldLakilester_IdleTough, 0, MSG_CH6_00AA) - EVT_CALL(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Idle) - EVT_CALL(EndSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 40) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Shout, ANIM_WorldLakilester_IdleTough, 0, MSG_CH6_00AB) - EVT_WAIT(10) - EVT_CALL(ShowChoice, MSG_Choice_0021) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(-1) - EVT_CASE_EQ(0) - EVT_CALL(ContinueSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00AC) - EVT_CASE_EQ(1) - EVT_CALL(ContinueSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00AD) - EVT_CASE_EQ(2) - EVT_CALL(ContinueSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00AE) - EVT_CASE_EQ(3) - EVT_CALL(ContinueSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00AF) - EVT_END_SWITCH - EVT_END_IF - EVT_CALL(InterpNpcYaw, NPC_Lakilulu, 90, 1) - EVT_CALL(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_ConcernedNod) - EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_ConcernedTalk, ANIM_Lakilulu_ConcernedNod, 5, MSG_CH6_00B0) - EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00B1) - EVT_WAIT(15) - EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_ConcernedTalk, ANIM_Lakilulu_ConcernedNod, 5, MSG_CH6_00B2) - EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00B3) - EVT_WAIT(10) - EVT_THREAD - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_END_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 30) - EVT_CALL(SetNpcSpeed, NPC_Lakilester, EVT_FLOAT(3.5)) - EVT_CALL(NpcMoveTo, NPC_Lakilester, LVar0, 60, 0) - EVT_CALL(N(ChangeNpcToPartner), 0, 8) - EVT_CALL(N(LoadPartyImage)) - EVT_EXEC(N(EVS_PushPartnerSong)) - EVT_WAIT(15) - EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0190, 160, 40) - EVT_EXEC(N(EVS_PopSong)) - EVT_WAIT(10) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_SET(GB_StoryProgress, STORY_CH6_LAKILESTER_JOINED_PARTY) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_EXEC_WAIT(N(EVS_Lakilulu_FlyAway)) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Wait(30) + Call(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_TiredTalk, ANIM_WorldLakilester_Tired, 0, MSG_CH6_00A2) + Call(SetNpcPos, NPC_Lakilulu, -290, 120, 45) + Thread + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldLakilester_Idle) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Wait(20) + Call(InterpPlayerYaw, 270, 1) + EndThread + Call(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 5, MSG_CH6_00A3) + Call(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Panic) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, 500) + Call(SetCamPitch, CAM_DEFAULT, Float(5.5), Float(-6.0)) + Call(SetCamPosA, CAM_DEFAULT, 0, 0) + Call(SetCamPosB, CAM_DEFAULT, 130, -200) + Call(SetCamPosC, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(1) + Thread + Call(SetCamDistance, CAM_DEFAULT, 400) + Call(SetCamPosB, CAM_DEFAULT, 130, 60) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndThread + Thread + Call(N(PlayLakiluluFlightSounds), 80) + EndThread + ExecGetTID(N(EVS_Laklilulu_ManageYaw), LVar9) + Call(LoadPath, 80, Ref(N(FlightPath_LakiluluArrives)), ARRAY_COUNT(N(FlightPath_LakiluluArrives)), EASING_LINEAR) + Label(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Lakilulu, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(0) + EndIf + KillThread(LVar9) + Call(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_ConcernedNod) + Call(SetPlayerAnimation, ANIM_Mario1_Still) + Wait(20) + Call(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 250) + Call(SetCamPitch, CAM_DEFAULT, Float(5.5), Float(-7.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00A4) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Shout, ANIM_Lakilulu_Shout, 0, MSG_CH6_00A5) + Call(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 250) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Shout, ANIM_WorldLakilester_IdleTough, 0, MSG_CH6_00A6) + Call(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Idle) + Call(EndSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(SetCamSpeed, CAM_DEFAULT, Float(10.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Label(10) + Call(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_ConcernedTalk, ANIM_Lakilulu_ConcernedNod, 0, MSG_CH6_00A7) + Call(ShowChoice, MSG_Choice_0020) + IfNe(LVar0, 0) + ExecWait(N(EVS_Lakilulu_SpinyToss)) + Wait(10) + Goto(10) + Else + Call(ContinueSpeech, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_00A9) + Call(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Idle) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + Wait(10) + Call(SetPlayerAnimation, ANIM_Mario1_Still) + Wait(20) + Call(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 250) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Shout, ANIM_WorldLakilester_IdleTough, 0, MSG_CH6_00AA) + Call(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Idle) + Call(EndSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 40) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10) + Call(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Shout, ANIM_WorldLakilester_IdleTough, 0, MSG_CH6_00AB) + Wait(10) + Call(ShowChoice, MSG_Choice_0021) + Switch(LVar0) + CaseEq(-1) + CaseEq(0) + Call(ContinueSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00AC) + CaseEq(1) + Call(ContinueSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00AD) + CaseEq(2) + Call(ContinueSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00AE) + CaseEq(3) + Call(ContinueSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00AF) + EndSwitch + EndIf + Call(InterpNpcYaw, NPC_Lakilulu, 90, 1) + Call(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_ConcernedNod) + Call(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_ConcernedTalk, ANIM_Lakilulu_ConcernedNod, 5, MSG_CH6_00B0) + Call(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00B1) + Wait(15) + Call(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_ConcernedTalk, ANIM_Lakilulu_ConcernedNod, 5, MSG_CH6_00B2) + Call(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00B3) + Wait(10) + Thread + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + EndThread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 30) + Call(SetNpcSpeed, NPC_Lakilester, Float(3.5)) + Call(NpcMoveTo, NPC_Lakilester, LVar0, 60, 0) + Call(N(ChangeNpcToPartner), 0, 8) + Call(N(LoadPartyImage)) + Exec(N(EVS_PushPartnerSong)) + Wait(15) + Call(ShowMessageAtScreenPos, MSG_Menus_0190, 160, 40) + Exec(N(EVS_PopSong)) + Wait(10) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Set(GB_StoryProgress, STORY_CH6_LAKILESTER_JOINED_PARTY) + Call(EnablePartnerAI) + Call(DisablePlayerInput, FALSE) + ExecWait(N(EVS_Lakilulu_FlyAway)) + Return + End }; EvtScript N(EVS_NpcDefeat_Lakilester) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldLakilester_Tired) - EVT_CALL(SetCamType, CAM_DEFAULT, 6, TRUE) - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar1, LVar2) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, LVar3) - EVT_DIV(LVar0, 2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-7.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC(N(EVS_Scene_LakilesterDefeated)) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldLakilester_Tired) + Call(SetCamType, CAM_DEFAULT, 6, TRUE) + Call(GetNpcPos, NPC_SELF, LVar3, LVar1, LVar2) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, LVar3) + Div(LVar0, 2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-7.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Exec(N(EVS_Scene_LakilesterDefeated)) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInteract_Lakilulu) = { - EVT_IF_LE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0032) - EVT_ELSE - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_IF_NE(LVar0, PARTNER_LAKILESTER) - EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0034) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0032) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfLe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0032) + Else + Call(GetCurrentPartnerID, LVar0) + IfNe(LVar0, PARTNER_LAKILESTER) + Call(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0034) + Else + Call(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0032) + EndIf + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Lakilester) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH6_LAKILESTER_JOINED_PARTY) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Lakilester))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Lakilester))) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH6_LAKILESTER_JOINED_PARTY) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Lakilester))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Lakilester))) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Lakilulu) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lakilulu))) - EVT_CALL(SetNpcCollisionSize, NPC_SELF, 36, 28) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetNpcPos, NPC_SELF, -50, 180, -50) - EVT_END_IF - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Lakilulu))) + Call(SetNpcCollisionSize, NPC_SELF, 36, 28) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetNpcPos, NPC_SELF, -50, 180, -50) + EndIf + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Lakilulu_Spiny) = { - EVT_CALL(SetNpcPos, NPC_Lakilulu_Spiny, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcAnimation, NPC_Lakilulu_Spiny, ANIM_Lakilulu_Spiny) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Lakilulu_Spiny, NPC_DISPOSE_LOCATION) + Call(SetNpcAnimation, NPC_Lakilulu_Spiny, ANIM_Lakilulu_Spiny) + Return + End }; EvtScript N(EVS_NpcInit_Lakitu) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH6_SPOKE_WITH_THE_SUN) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH6_SPOKE_WITH_THE_SUN) + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Spiny) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH6_SPOKE_WITH_THE_SUN) - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_CALL(SetSelfVar, 13, 1) - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH6_SPOKE_WITH_THE_SUN) + Call(RemoveNpc, NPC_SELF) + EndIf + Call(SetSelfVar, 13, 1) + Return + End }; NpcData N(NpcData_Lakilester) = { diff --git a/src/world/dead/area_flo/flo_14/flo_14_1_music.c b/src/world/dead/area_flo/flo_14/flo_14_1_music.c index b59f8bf4e91..8a64cc9f69d 100644 --- a/src/world/dead/area_flo/flo_14/flo_14_1_music.c +++ b/src/world/dead/area_flo/flo_14/flo_14_1_music.c @@ -1,12 +1,12 @@ #include "flo_14.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/dead/area_flo/flo_14/flo_14_2_main.c b/src/world/dead/area_flo/flo_14/flo_14_2_main.c index a96c80b1e31..ec6e2d41029 100644 --- a/src/world/dead/area_flo/flo_14/flo_14_2_main.c +++ b/src/world/dead/area_flo/flo_14/flo_14_2_main.c @@ -12,10 +12,10 @@ EvtScript N(EVS_ExitWalk_flo_00_1) = EVT_EXIT_WALK(60, flo_14_ENTRY_0, "flo_00", EvtScript N(EVS_ExitWalk_flo_13_0) = EVT_EXIT_WALK(60, flo_14_ENTRY_1, "flo_13", flo_13_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_13_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_00_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_13_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_flo_00_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -34,64 +34,64 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_MakeEntities)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o114, SURFACE_TYPE_SPIKES) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_o39, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o41, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o43, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o49, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o51, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o55, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o123, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o125, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o127, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o129, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o131, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o133, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o135, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o40, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o44, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o48, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o52, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o54, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o124, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o126, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o128, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o130, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o132, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o134, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o136, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Exec(N(EVS_MakeEntities)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o114, SURFACE_TYPE_SPIKES) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + Call(EnableTexPanning, MODEL_o39, TRUE) + Call(EnableTexPanning, MODEL_o41, TRUE) + Call(EnableTexPanning, MODEL_o43, TRUE) + Call(EnableTexPanning, MODEL_o49, TRUE) + Call(EnableTexPanning, MODEL_o51, TRUE) + Call(EnableTexPanning, MODEL_o55, TRUE) + Call(EnableTexPanning, MODEL_o123, TRUE) + Call(EnableTexPanning, MODEL_o125, TRUE) + Call(EnableTexPanning, MODEL_o127, TRUE) + Call(EnableTexPanning, MODEL_o129, TRUE) + Call(EnableTexPanning, MODEL_o131, TRUE) + Call(EnableTexPanning, MODEL_o133, TRUE) + Call(EnableTexPanning, MODEL_o135, TRUE) + Call(EnableTexPanning, MODEL_o40, TRUE) + Call(EnableTexPanning, MODEL_o44, TRUE) + Call(EnableTexPanning, MODEL_o48, TRUE) + Call(EnableTexPanning, MODEL_o52, TRUE) + Call(EnableTexPanning, MODEL_o54, TRUE) + Call(EnableTexPanning, MODEL_o124, TRUE) + Call(EnableTexPanning, MODEL_o126, TRUE) + Call(EnableTexPanning, MODEL_o128, TRUE) + Call(EnableTexPanning, MODEL_o130, TRUE) + Call(EnableTexPanning, MODEL_o132, TRUE) + Call(EnableTexPanning, MODEL_o134, TRUE) + Call(EnableTexPanning, MODEL_o136, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( 140, 0, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( -200, 0, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_EXEC(N(EVS_SetupBubbles)) - EVT_EXEC(N(EVS_SetupLogBridges)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Exec(N(EVS_SetupBubbles)) + Exec(N(EVS_SetupLogBridges)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Return + End }; diff --git a/src/world/dead/area_flo/flo_14/flo_14_3_bubbles.c b/src/world/dead/area_flo/flo_14/flo_14_3_bubbles.c index cc9e138e326..47dd8ff83ef 100644 --- a/src/world/dead/area_flo/flo_14/flo_14_3_bubbles.c +++ b/src/world/dead/area_flo/flo_14/flo_14_3_bubbles.c @@ -8,37 +8,37 @@ s32 N(BlowingBubbles) = FALSE; EvtScript N(EVS_BubbleUpdateCamera) = { - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(MakeLerp, LVar1, 48, 15, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar2, LVar0, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, 48, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(MakeLerp, LVar1, 48, 15, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Call(SetCamTarget, CAM_DEFAULT, LVar2, LVar0, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetCamTarget, CAM_DEFAULT, LVar0, 48, LVar2) + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_TetherParterToPlayer) = { - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar2, -5) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Add(LVar2, -5) + Call(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Wait(1) + EndLoop + Return + End }; API_CALLABLE(N(SavePartnerFlags)) { @@ -84,121 +84,121 @@ Vec3f N(BubbleFlightPath)[] = { }; EvtScript N(EVS_BubbleFollowPath) = { - EVT_WAIT(20) - EVT_CALL(PlaySound, SOUND_LOOP_BUBBLE_DRIFT) - EVT_CALL(LoadPath, 165, EVT_PTR(N(BubbleFlightPath)), ARRAY_COUNT(N(BubbleFlightPath)), EASING_COS_IN_OUT) - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(TranslateModel, MODEL_o167, LVar1, LVar2, LVar3) - EVT_ADD(LVar2, -27) - EVT_ADD(LVar3, -10) - EVT_CALL(SetPlayerPos, LVar1, LVar2, LVar3) - EVT_CALL(N(UpdateBubbleSoundPos), LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(StopSound, SOUND_LOOP_BUBBLE_DRIFT) - EVT_RETURN - EVT_END + Wait(20) + Call(PlaySound, SOUND_LOOP_BUBBLE_DRIFT) + Call(LoadPath, 165, Ref(N(BubbleFlightPath)), ARRAY_COUNT(N(BubbleFlightPath)), EASING_COS_IN_OUT) + Label(0) + Call(GetNextPathPos) + Call(TranslateModel, MODEL_o167, LVar1, LVar2, LVar3) + Add(LVar2, -27) + Add(LVar3, -10) + Call(SetPlayerPos, LVar1, LVar2, LVar3) + Call(N(UpdateBubbleSoundPos), LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(0) + EndIf + Call(StopSound, SOUND_LOOP_BUBBLE_DRIFT) + Return + End }; EvtScript N(EVS_RideBigBubble) = { - EVT_CALL(IsPlayerWithin, 531, 81, 30, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, PARTNER_NONE) - EVT_CALL(InterruptUsePartner) - EVT_WAIT(20) - EVT_END_IF - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(GetModelCenter, MODEL_o167) - EVT_THREAD - EVT_ADD(LVar2, -10) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.2)) - EVT_CALL(PlayerJump, 531, 48, LVar2, 10) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(5) - EVT_ADD(LVar2, -15) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.2)) - EVT_CALL(NpcJump0, NPC_PARTNER, 531, 68, LVar2, 10) - EVT_END_THREAD - EVT_EXEC_GET_TID(N(EVS_BubbleUpdateCamera), MV_BubbleCamScript) - EVT_WAIT(15) - EVT_CALL(N(SavePartnerFlags)) - EVT_IF_TRUE(LVarE) - EVT_EXEC_GET_TID(N(EVS_TetherParterToPlayer), LVarE) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_BubbleFollowPath)) - EVT_IF_TRUE(LVarE) - EVT_KILL_THREAD(LVarE) - EVT_CALL(N(RestorePartnerFlags)) - EVT_END_IF - EVT_CALL(GetModelCenter, MODEL_o167) - EVT_PLAY_EFFECT(EFFECT_FIREWORK, 0, LVar0, LVar1, LVar2, 2, 0) - EVT_CALL(PlaySoundAt, SOUND_BUBBLE_BURST, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(ClearPartnerMoveHistory, NPC_PARTNER) - EVT_CALL(EnableModel, MODEL_o167, FALSE) - EVT_SET(AF_FLO_BigBubbleReady, FALSE) - EVT_KILL_THREAD(MV_BubbleCamScript) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE) - EVT_CALL(EnablePartnerAI) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END + Call(IsPlayerWithin, 531, 81, 30, LVar0) + IfEq(LVar0, 0) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, PARTNER_NONE) + Call(InterruptUsePartner) + Wait(20) + EndIf + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(GetModelCenter, MODEL_o167) + Thread + Add(LVar2, -10) + Call(SetPlayerJumpscale, Float(0.2)) + Call(PlayerJump, 531, 48, LVar2, 10) + Call(SetPlayerActionState, ACTION_STATE_LAND) + EndThread + Thread + Wait(5) + Add(LVar2, -15) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.2)) + Call(NpcJump0, NPC_PARTNER, 531, 68, LVar2, 10) + EndThread + ExecGetTID(N(EVS_BubbleUpdateCamera), MV_BubbleCamScript) + Wait(15) + Call(N(SavePartnerFlags)) + IfTrue(LVarE) + ExecGetTID(N(EVS_TetherParterToPlayer), LVarE) + EndIf + ExecWait(N(EVS_BubbleFollowPath)) + IfTrue(LVarE) + KillThread(LVarE) + Call(N(RestorePartnerFlags)) + EndIf + Call(GetModelCenter, MODEL_o167) + PlayEffect(EFFECT_FIREWORK, 0, LVar0, LVar1, LVar2, 2, 0) + Call(PlaySoundAt, SOUND_BUBBLE_BURST, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + Call(ClearPartnerMoveHistory, NPC_PARTNER) + Call(EnableModel, MODEL_o167, FALSE) + Set(AF_FLO_BigBubbleReady, FALSE) + KillThread(MV_BubbleCamScript) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE) + Call(EnablePartnerAI) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Unbind + Return + End }; EvtScript N(EVS_BlowBigBubble) = { - EVT_CALL(PlaySoundAt, SOUND_FLO_BLOW_BUBBLE, SOUND_SPACE_DEFAULT, 591, 55, 121) - EVT_CALL(EnableModel, MODEL_o167, TRUE) - EVT_SETF(LVar2, EVT_FLOAT(1.0)) - EVT_SETF(LVar4, EVT_FLOAT(0.0)) - EVT_SETF(LVar5, EVT_FLOAT(0.0)) - EVT_SETF(LVar6, EVT_FLOAT(0.0)) - EVT_SET(LVar7, -30) - EVT_SET(LVar8, 20) - EVT_DIVF(LVar7, EVT_FLOAT(90.0)) - EVT_DIVF(LVar8, EVT_FLOAT(90.0)) - EVT_SET(LVar9, 180) - EVT_LOOP(LVar9) - EVT_CALL(TranslateModel, MODEL_o167, 591, 55, 121) - EVT_SETF(LVar3, LVar2) - EVT_DIVF(LVar3, 10) - EVT_CALL(ScaleModel, MODEL_o167, LVar3, LVar3, LVar3) - EVT_CALL(TranslateModel, MODEL_o167, LVar4, LVar5, LVar6) - EVT_ADDF(LVar2, EVT_FLOAT(0.05)) - EVT_IF_GT(LVar9, 90) - EVT_ADDF(LVar4, LVar7) - EVT_ADDF(LVar5, LVar8) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(LVar7, -30) - EVT_SET(LVar8, -40) - EVT_DIVF(LVar7, EVT_FLOAT(60.0)) - EVT_DIVF(LVar8, EVT_FLOAT(60.0)) - EVT_LOOP(60) - EVT_CALL(TranslateModel, MODEL_o167, 591, 55, 121) - EVT_CALL(ScaleModel, MODEL_o167, LVar3, LVar3, LVar3) - EVT_CALL(TranslateModel, MODEL_o167, LVar4, LVar5, LVar6) - EVT_ADDF(LVar4, LVar7) - EVT_ADDF(LVar6, LVar8) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(AF_FLO_BlowingBigBubble, FALSE) - EVT_SET(AF_FLO_BigBubbleReady, TRUE) - EVT_RETURN - EVT_END + Call(PlaySoundAt, SOUND_FLO_BLOW_BUBBLE, SOUND_SPACE_DEFAULT, 591, 55, 121) + Call(EnableModel, MODEL_o167, TRUE) + SetF(LVar2, Float(1.0)) + SetF(LVar4, Float(0.0)) + SetF(LVar5, Float(0.0)) + SetF(LVar6, Float(0.0)) + Set(LVar7, -30) + Set(LVar8, 20) + DivF(LVar7, Float(90.0)) + DivF(LVar8, Float(90.0)) + Set(LVar9, 180) + Loop(LVar9) + Call(TranslateModel, MODEL_o167, 591, 55, 121) + SetF(LVar3, LVar2) + DivF(LVar3, 10) + Call(ScaleModel, MODEL_o167, LVar3, LVar3, LVar3) + Call(TranslateModel, MODEL_o167, LVar4, LVar5, LVar6) + AddF(LVar2, Float(0.05)) + IfGt(LVar9, 90) + AddF(LVar4, LVar7) + AddF(LVar5, LVar8) + EndIf + Wait(1) + EndLoop + Set(LVar7, -30) + Set(LVar8, -40) + DivF(LVar7, Float(60.0)) + DivF(LVar8, Float(60.0)) + Loop(60) + Call(TranslateModel, MODEL_o167, 591, 55, 121) + Call(ScaleModel, MODEL_o167, LVar3, LVar3, LVar3) + Call(TranslateModel, MODEL_o167, LVar4, LVar5, LVar6) + AddF(LVar4, LVar7) + AddF(LVar6, LVar8) + Wait(1) + EndLoop + Set(AF_FLO_BlowingBigBubble, FALSE) + Set(AF_FLO_BigBubbleReady, TRUE) + Return + End }; f32 N(BubblePhase) = 0.0f; @@ -291,70 +291,70 @@ void N(gfx_build_bubble_flower)(void) { } EvtScript N(EVS_ManageBlownBubble) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_SET(LVarF, LVar0) - EVT_LABEL(0) - EVT_IF_EQ(AF_FLO_PauseBlowingBubbles, TRUE) - EVT_WAIT(10) - EVT_GOTO(0) - EVT_END_IF - EVT_USE_BUF(EVT_PTR(N(BlowingBubbles))) - EVT_BUF_READ1(LVar0) - EVT_IF_EQ(LVar0, FALSE) - EVT_CALL(RandInt, 10, LVar0) - EVT_ADD(LVar0, 1) - EVT_WAIT(LVar0) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(EnableModel, LVarF, TRUE) - EVT_CALL(RandInt, 4, LVar0) - EVT_ADDF(LVar0, EVT_FLOAT(4.0)) - EVT_MULF(LVar0, EVT_FLOAT(-1.0)) - EVT_SETF(LVar1, EVT_FLOAT(2.0)) - EVT_SETF(LVar2, LVar0) - EVT_DIVF(LVar2, EVT_FLOAT(10.0)) - EVT_SETF(LVar3, EVT_FLOAT(0.4)) - EVT_SETF(LVar4, EVT_FLOAT(591.0)) - EVT_SETF(LVar5, EVT_FLOAT(60.0)) - EVT_SETF(LVar6, EVT_FLOAT(121.0)) - EVT_CALL(RandInt, 3, LVar7) - EVT_ADDF(LVar7, EVT_FLOAT(3.0)) - EVT_MULF(LVar7, EVT_FLOAT(0.04)) - EVT_SETF(LVar9, LVar7) - EVT_DIVF(LVar9, EVT_FLOAT(5.0)) - EVT_CALL(RandInt, 50, LVar8) - EVT_ADD(LVar8, 50) - EVT_LOOP(LVar8) - EVT_SETF(LVarE, LVar2) - EVT_SUBF(LVarE, LVar0) - EVT_MULF(LVarE, EVT_FLOAT(0.046)) - EVT_ADDF(LVar0, LVarE) - EVT_SETF(LVarE, LVar3) - EVT_SUBF(LVarE, LVar1) - EVT_MULF(LVarE, EVT_FLOAT(0.046)) - EVT_ADDF(LVar1, LVarE) - EVT_ADDF(LVar4, LVar0) - EVT_ADDF(LVar5, LVar1) - EVT_SETF(LVarE, LVar7) - EVT_SUBF(LVarE, LVar9) - EVT_MULF(LVarE, EVT_FLOAT(0.203)) - EVT_ADDF(LVar9, LVarE) - EVT_CALL(TranslateModel, LVarF, LVar4, LVar5, LVar6) - EVT_CALL(ScaleModel, LVarF, LVar9, LVar9, LVar9) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EnableModel, LVarF, FALSE) - EVT_GOTO(0) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Set(LVarF, LVar0) + Label(0) + IfEq(AF_FLO_PauseBlowingBubbles, TRUE) + Wait(10) + Goto(0) + EndIf + UseBuf(Ref(N(BlowingBubbles))) + BufRead1(LVar0) + IfEq(LVar0, FALSE) + Call(RandInt, 10, LVar0) + Add(LVar0, 1) + Wait(LVar0) + Goto(0) + EndIf + Call(EnableModel, LVarF, TRUE) + Call(RandInt, 4, LVar0) + AddF(LVar0, Float(4.0)) + MulF(LVar0, Float(-1.0)) + SetF(LVar1, Float(2.0)) + SetF(LVar2, LVar0) + DivF(LVar2, Float(10.0)) + SetF(LVar3, Float(0.4)) + SetF(LVar4, Float(591.0)) + SetF(LVar5, Float(60.0)) + SetF(LVar6, Float(121.0)) + Call(RandInt, 3, LVar7) + AddF(LVar7, Float(3.0)) + MulF(LVar7, Float(0.04)) + SetF(LVar9, LVar7) + DivF(LVar9, Float(5.0)) + Call(RandInt, 50, LVar8) + Add(LVar8, 50) + Loop(LVar8) + SetF(LVarE, LVar2) + SubF(LVarE, LVar0) + MulF(LVarE, Float(0.046)) + AddF(LVar0, LVarE) + SetF(LVarE, LVar3) + SubF(LVarE, LVar1) + MulF(LVarE, Float(0.046)) + AddF(LVar1, LVarE) + AddF(LVar4, LVar0) + AddF(LVar5, LVar1) + SetF(LVarE, LVar7) + SubF(LVarE, LVar9) + MulF(LVarE, Float(0.203)) + AddF(LVar9, LVarE) + Call(TranslateModel, LVarF, LVar4, LVar5, LVar6) + Call(ScaleModel, LVarF, LVar9, LVar9, LVar9) + Wait(1) + EndLoop + Call(EnableModel, LVarF, FALSE) + Goto(0) + Return + End }; EvtScript N(EVS_SetupBubbles) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o129, SURFACE_TYPE_FLOWERS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o155, SURFACE_TYPE_FLOWERS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o156, SURFACE_TYPE_FLOWERS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o157, SURFACE_TYPE_FLOWERS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o158, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o129, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o155, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o156, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o157, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o158, SURFACE_TYPE_FLOWERS) EVT_FLOWER_SPAWN_REGION( -730, -130, -470, -70, 0) EVT_FLOWER_SPAWN_REGION( -730, 70, -470, 140, 0) EVT_FLOWER_SPAWN_REGION( -280, 130, -110, -70, 0) @@ -363,40 +363,40 @@ EvtScript N(EVS_SetupBubbles) = { EVT_DROPPING_VINE(ITEM_NONE, MODEL_o82, MODEL_o83, MODEL_o84, MODEL_o85) EVT_DROPPING_VINE(ITEM_NONE, MODEL_o78, MODEL_o79, MODEL_o80, MODEL_o81) EVT_DROPPING_VINE(ITEM_NONE, MODEL_o88, MODEL_o89, MODEL_o90, MODEL_o91) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o113, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(CloneModel, MODEL_o169, CLONED_MODEL(1)) - EVT_CALL(CloneModel, MODEL_o169, CLONED_MODEL(2)) - EVT_CALL(CloneModel, MODEL_o169, CLONED_MODEL(3)) - EVT_CALL(CloneModel, MODEL_o169, CLONED_MODEL(4)) - EVT_CALL(CloneModel, MODEL_o169, CLONED_MODEL(5)) - EVT_CALL(EnableModel, MODEL_o167, FALSE) - EVT_CALL(EnableModel, MODEL_o169, FALSE) - EVT_CALL(EnableModel, CLONED_MODEL(1), FALSE) - EVT_CALL(EnableModel, CLONED_MODEL(2), FALSE) - EVT_CALL(EnableModel, CLONED_MODEL(3), FALSE) - EVT_CALL(EnableModel, CLONED_MODEL(4), FALSE) - EVT_CALL(EnableModel, CLONED_MODEL(5), FALSE) - EVT_SET(LVar0, CLONED_MODEL(1)) - EVT_EXEC(N(EVS_ManageBlownBubble)) - EVT_SET(LVar0, CLONED_MODEL(2)) - EVT_EXEC(N(EVS_ManageBlownBubble)) - EVT_SET(LVar0, CLONED_MODEL(3)) - EVT_EXEC(N(EVS_ManageBlownBubble)) - EVT_SET(LVar0, CLONED_MODEL(4)) - EVT_EXEC(N(EVS_ManageBlownBubble)) - EVT_SET(LVar0, CLONED_MODEL(5)) - EVT_EXEC(N(EVS_ManageBlownBubble)) - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_0, MODEL_o167, TRUE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_1, EVT_PTR(N(gfx_build_big_bubble)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_o167, CUSTOM_GFX_1, -1) - EVT_CALL(SetModelCustomGfx, CLONED_MODEL(1), CUSTOM_GFX_1, -1) - EVT_CALL(SetModelCustomGfx, CLONED_MODEL(2), CUSTOM_GFX_1, -1) - EVT_CALL(SetModelCustomGfx, CLONED_MODEL(3), CUSTOM_GFX_1, -1) - EVT_CALL(SetModelCustomGfx, CLONED_MODEL(4), CUSTOM_GFX_1, -1) - EVT_CALL(SetModelCustomGfx, CLONED_MODEL(5), CUSTOM_GFX_1, -1) - EVT_CALL(MakeLocalVertexCopy, VTX_COPY_1, MODEL_o57, TRUE) - EVT_CALL(SetCustomGfxBuilders, CUSTOM_GFX_2, EVT_PTR(N(gfx_build_bubble_flower)), NULL) - EVT_CALL(SetModelCustomGfx, MODEL_o57, CUSTOM_GFX_2, -1) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o113, COLLIDER_FLAGS_UPPER_MASK) + Call(CloneModel, MODEL_o169, CLONED_MODEL(1)) + Call(CloneModel, MODEL_o169, CLONED_MODEL(2)) + Call(CloneModel, MODEL_o169, CLONED_MODEL(3)) + Call(CloneModel, MODEL_o169, CLONED_MODEL(4)) + Call(CloneModel, MODEL_o169, CLONED_MODEL(5)) + Call(EnableModel, MODEL_o167, FALSE) + Call(EnableModel, MODEL_o169, FALSE) + Call(EnableModel, CLONED_MODEL(1), FALSE) + Call(EnableModel, CLONED_MODEL(2), FALSE) + Call(EnableModel, CLONED_MODEL(3), FALSE) + Call(EnableModel, CLONED_MODEL(4), FALSE) + Call(EnableModel, CLONED_MODEL(5), FALSE) + Set(LVar0, CLONED_MODEL(1)) + Exec(N(EVS_ManageBlownBubble)) + Set(LVar0, CLONED_MODEL(2)) + Exec(N(EVS_ManageBlownBubble)) + Set(LVar0, CLONED_MODEL(3)) + Exec(N(EVS_ManageBlownBubble)) + Set(LVar0, CLONED_MODEL(4)) + Exec(N(EVS_ManageBlownBubble)) + Set(LVar0, CLONED_MODEL(5)) + Exec(N(EVS_ManageBlownBubble)) + Call(MakeLocalVertexCopy, VTX_COPY_0, MODEL_o167, TRUE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_1, Ref(N(gfx_build_big_bubble)), NULL) + Call(SetModelCustomGfx, MODEL_o167, CUSTOM_GFX_1, -1) + Call(SetModelCustomGfx, CLONED_MODEL(1), CUSTOM_GFX_1, -1) + Call(SetModelCustomGfx, CLONED_MODEL(2), CUSTOM_GFX_1, -1) + Call(SetModelCustomGfx, CLONED_MODEL(3), CUSTOM_GFX_1, -1) + Call(SetModelCustomGfx, CLONED_MODEL(4), CUSTOM_GFX_1, -1) + Call(SetModelCustomGfx, CLONED_MODEL(5), CUSTOM_GFX_1, -1) + Call(MakeLocalVertexCopy, VTX_COPY_1, MODEL_o57, TRUE) + Call(SetCustomGfxBuilders, CUSTOM_GFX_2, Ref(N(gfx_build_bubble_flower)), NULL) + Call(SetModelCustomGfx, MODEL_o57, CUSTOM_GFX_2, -1) + Return + End }; diff --git a/src/world/dead/area_flo/flo_14/flo_14_4_npc.c b/src/world/dead/area_flo/flo_14/flo_14_4_npc.c index 17fcad43fa8..5c718ac1a08 100644 --- a/src/world/dead/area_flo/flo_14/flo_14_4_npc.c +++ b/src/world/dead/area_flo/flo_14/flo_14_4_npc.c @@ -20,61 +20,61 @@ s32 N(KeyList)[] = { }; EvtScript N(EVS_NpcInteract_BubbleFlower) = { - EVT_IF_EQ(AF_FLO_BigBubbleReady, TRUE) - EVT_SET(AF_FLO_PauseBlowingBubbles, TRUE) - EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0063) - EVT_SET(AF_FLO_PauseBlowingBubbles, FALSE) - EVT_RETURN - EVT_END_IF - EVT_SET(AF_FLO_PauseBlowingBubbles, TRUE) - EVT_IF_EQ(GF_FLO14_GaveBerryToBubblePlant, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_005F) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0060) - EVT_END_IF - EVT_CALL(FindItem, ITEM_BUBBLE_BERRY, LVar0) - EVT_IF_NE(LVar0, -1) + IfEq(AF_FLO_BigBubbleReady, TRUE) + Set(AF_FLO_PauseBlowingBubbles, TRUE) + Call(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0063) + Set(AF_FLO_PauseBlowingBubbles, FALSE) + Return + EndIf + Set(AF_FLO_PauseBlowingBubbles, TRUE) + IfEq(GF_FLO14_GaveBerryToBubblePlant, FALSE) + Call(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_005F) + Else + Call(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0060) + EndIf + Call(FindItem, ITEM_BUBBLE_BERRY, LVar0) + IfNe(LVar0, -1) EVT_CHOOSE_CONSUMABLE_FROM(N(KeyList), 0) - EVT_IF_EQ(LVar0, -1) - EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0064) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0061) - EVT_SET(AF_FLO_BlowingBigBubble, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(PlayerMoveTo, 555, 110, 20) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(func_802CF56C, 2) - EVT_WAIT(5) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(1.0), 0, 350, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_EXEC(N(EVS_BlowBigBubble)) - EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0062) - EVT_THREAD - EVT_WAIT(40) - EVT_CALL(InterpPlayerYaw, 315, 0) - EVT_END_THREAD - EVT_LABEL(10) - EVT_IF_EQ(AF_FLO_BigBubbleReady, FALSE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 5, MSG_CH6_0063) - EVT_SET(GF_FLO14_GaveBerryToBubblePlant, TRUE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_RideBigBubble)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o154, 1, 0) - EVT_END_IF - EVT_END_IF - EVT_SET(AF_FLO_PauseBlowingBubbles, FALSE) - EVT_RETURN - EVT_END + IfEq(LVar0, -1) + Call(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0064) + Else + Call(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0061) + Set(AF_FLO_BlowingBigBubble, TRUE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(PlayerMoveTo, 555, 110, 20) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(InterpPlayerYaw, 90, 0) + Call(func_802CF56C, 2) + Wait(5) + Call(AdjustCam, CAM_DEFAULT, Float(1.0), 0, 350, Float(17.0), Float(-6.0)) + Exec(N(EVS_BlowBigBubble)) + Call(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0062) + Thread + Wait(40) + Call(InterpPlayerYaw, 315, 0) + EndThread + Label(10) + IfEq(AF_FLO_BigBubbleReady, FALSE) + Wait(1) + Goto(10) + EndIf + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + Call(SpeakToPlayer, NPC_SELF, -1, -1, 5, MSG_CH6_0063) + Set(GF_FLO14_GaveBerryToBubblePlant, TRUE) + BindTrigger(Ref(N(EVS_RideBigBubble)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o154, 1, 0) + EndIf + EndIf + Set(AF_FLO_PauseBlowingBubbles, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_BubbleFlower) = { - EVT_SET(AF_FLO_BlowingBigBubble, FALSE) - EVT_SET(AF_FLO_BigBubbleReady, FALSE) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_BubbleFlower))) - EVT_RETURN - EVT_END + Set(AF_FLO_BlowingBigBubble, FALSE) + Set(AF_FLO_BigBubbleReady, FALSE) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_BubbleFlower))) + Return + End }; // uses a dummy bubulb for collision diff --git a/src/world/dead/area_flo/flo_14/flo_14_5_entity.c b/src/world/dead/area_flo/flo_14/flo_14_5_entity.c index 4e3f160f74e..2e6362ee384 100644 --- a/src/world/dead/area_flo/flo_14/flo_14_5_entity.c +++ b/src/world/dead/area_flo/flo_14/flo_14_5_entity.c @@ -1,7 +1,7 @@ #include "flo_14.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 675, 60, -100, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO14_Item_StarPiece) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_STAR_PIECE, 675, 60, -100, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO14_Item_StarPiece) + Return + End }; diff --git a/src/world/dead/area_flo/flo_14/flo_14_6_logs.c b/src/world/dead/area_flo/flo_14/flo_14_6_logs.c index dd376b0b88a..a0125ed5df2 100644 --- a/src/world/dead/area_flo/flo_14/flo_14_6_logs.c +++ b/src/world/dead/area_flo/flo_14/flo_14_6_logs.c @@ -5,6 +5,6 @@ EvtScript N(EVS_SetupLogBridges) = { EVT_MAKE_LOG_BRIDGE(COLLIDER_o162, COLLIDER_o166, MODEL_o15, MODEL_o16, MV_RotAngle_Log_01, MV_RotVelocity_Log_01) EVT_MAKE_LOG_BRIDGE(COLLIDER_o161, COLLIDER_o167, MODEL_o17, MODEL_o18, MV_RotAngle_Log_02, MV_RotVelocity_Log_02) - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/dead/area_flo/flo_15/flo_15_1_music.c b/src/world/dead/area_flo/flo_15/flo_15_1_music.c index d0d926c1847..4d1969911b7 100644 --- a/src/world/dead/area_flo/flo_15/flo_15_1_music.c +++ b/src/world/dead/area_flo/flo_15/flo_15_1_music.c @@ -1,17 +1,17 @@ #include "flo_15.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, flo_15_ENTRY_1) - EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) - EVT_ELSE - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_SUN_TOWER_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_SUN_TOWER_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, flo_15_ENTRY_1) + Call(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8) + Else + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_SUN_TOWER_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_SUN_TOWER_SUNNY, 0, 8) + EndSwitch + EndIf + Return + End }; diff --git a/src/world/dead/area_flo/flo_15/flo_15_2_main.c b/src/world/dead/area_flo/flo_15/flo_15_2_main.c index 4dbee813c06..94a9de2f228 100644 --- a/src/world/dead/area_flo/flo_15/flo_15_2_main.c +++ b/src/world/dead/area_flo/flo_15/flo_15_2_main.c @@ -3,29 +3,29 @@ EvtScript N(EVS_ExitWalk_flo_13_1) = EVT_EXIT_WALK(60, flo_15_ENTRY_0, "flo_13", flo_13_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_13_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_13_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, flo_15_ENTRY_1) - EVT_EXEC(N(EVS_Scene_SunReturns)) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g58, COLLIDER_FLAGS_UPPER_MASK) - EVT_EXEC(N(EVS_MonitorFallingStairs)) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Call(GetEntryID, LVar0) + IfEq(LVar0, flo_15_ENTRY_1) + Exec(N(EVS_Scene_SunReturns)) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g58, COLLIDER_FLAGS_UPPER_MASK) + Exec(N(EVS_MonitorFallingStairs)) + ExecWait(N(EVS_SetupMusic)) + Return + End }; diff --git a/src/world/dead/area_flo/flo_15/flo_15_3_npc.c b/src/world/dead/area_flo/flo_15/flo_15_3_npc.c index 46228e6fa35..6c955de56cc 100644 --- a/src/world/dead/area_flo/flo_15/flo_15_3_npc.c +++ b/src/world/dead/area_flo/flo_15/flo_15_3_npc.c @@ -4,198 +4,198 @@ #include "world/common/npc/Sun.inc.c" EvtScript N(EVS_Sun_AnimateBobbing) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_SET(LVar3, 7) - EVT_SET(LVar4, 5) - EVT_ELSE - EVT_SET(LVar3, 15) - EVT_SET(LVar4, 1) - EVT_END_IF - EVT_LOOP(0) - EVT_SET(LVar5, LVar3) - EVT_LOOP(LVar5) - EVT_CALL(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 1) - EVT_CALL(SetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Sun_02, LVar0, LVar1, LVar2) - EVT_WAIT(LVar4) - EVT_END_LOOP - EVT_SET(LVar5, LVar3) - EVT_LOOP(LVar5) - EVT_CALL(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, -1) - EVT_CALL(SetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_Sun_02, LVar0, LVar1, LVar2) - EVT_WAIT(LVar4) - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Set(LVar3, 7) + Set(LVar4, 5) + Else + Set(LVar3, 15) + Set(LVar4, 1) + EndIf + Loop(0) + Set(LVar5, LVar3) + Loop(LVar5) + Call(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) + Add(LVar1, 1) + Call(SetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Sun_02, LVar0, LVar1, LVar2) + Wait(LVar4) + EndLoop + Set(LVar5, LVar3) + Loop(LVar5) + Call(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) + Add(LVar1, -1) + Call(SetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_Sun_02, LVar0, LVar1, LVar2) + Wait(LVar4) + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_Scene_SunReturns) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetNpcPos, NPC_Sun_01, 0, 270, 0) - EVT_CALL(SetNpcPos, NPC_Sun_02, NPC_DISPOSE_LOCATION) - EVT_WAIT(1) - EVT_CALL(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 1050) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(10.0), EVT_FLOAT(4.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-10.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(6.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkJoy, ANIM_Sun_TalkJoy, SPEECH_FLAG_200 | 5, MSG_CH6_00C3) - EVT_CALL(SetNpcAnimation, NPC_Sun_01, ANIM_Sun_TalkJoy) - EVT_THREAD - EVT_CALL(SetCamDistance, CAM_DEFAULT, 1000) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_END_THREAD - EVT_WAIT(15) - EVT_CALL(SetNpcJumpscale, NPC_Sun_01, EVT_FLOAT(0.0)) - EVT_CALL(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 400) - EVT_CALL(NpcJump0, NPC_Sun_01, LVar0, LVar1, LVar2, 40) - EVT_CALL(GotoMap, EVT_PTR("flo_00"), flo_00_ENTRY_9) - EVT_WAIT(70) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetNpcPos, NPC_Sun_01, 0, 270, 0) + Call(SetNpcPos, NPC_Sun_02, NPC_DISPOSE_LOCATION) + Wait(1) + Call(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 1050) + Call(SetCamPitch, CAM_DEFAULT, Float(10.0), Float(4.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-10.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(6.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkJoy, ANIM_Sun_TalkJoy, SPEECH_FLAG_200 | 5, MSG_CH6_00C3) + Call(SetNpcAnimation, NPC_Sun_01, ANIM_Sun_TalkJoy) + Thread + Call(SetCamDistance, CAM_DEFAULT, 1000) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + EndThread + Wait(15) + Call(SetNpcJumpscale, NPC_Sun_01, Float(0.0)) + Call(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) + Add(LVar1, 400) + Call(NpcJump0, NPC_Sun_01, LVar0, LVar1, LVar2, 40) + Call(GotoMap, Ref("flo_00"), flo_00_ENTRY_9) + Wait(70) + Return + End }; EvtScript N(EVS_NpcAux_Sun_02) = { - EVT_CALL(SetNpcRotationPivot, NPC_Sun_02, 48) - EVT_LOOP(0) - EVT_CALL(MakeLerp, -30, 30, 20, EASING_SIN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Sun_02, 0, 0, LVar0) - EVT_CALL(GetNpcPos, NPC_Sun_01, LVar2, LVar3, LVar4) - EVT_CALL(SetNpcPos, NPC_Sun_02, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 30, -30, 20, EASING_SIN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(SetNpcRotation, NPC_Sun_02, 0, 0, LVar0) - EVT_CALL(GetNpcPos, NPC_Sun_01, LVar2, LVar3, LVar4) - EVT_CALL(SetNpcPos, NPC_Sun_02, LVar2, LVar3, LVar4) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(SetNpcRotationPivot, NPC_Sun_02, 48) + Loop(0) + Call(MakeLerp, -30, 30, 20, EASING_SIN_OUT) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Sun_02, 0, 0, LVar0) + Call(GetNpcPos, NPC_Sun_01, LVar2, LVar3, LVar4) + Call(SetNpcPos, NPC_Sun_02, LVar2, LVar3, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 30, -30, 20, EASING_SIN_OUT) + Loop(0) + Call(UpdateLerp) + Call(SetNpcRotation, NPC_Sun_02, 0, 0, LVar0) + Call(GetNpcPos, NPC_Sun_01, LVar2, LVar3, LVar4) + Call(SetNpcPos, NPC_Sun_02, LVar2, LVar3, LVar4) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_Sun_DescendFromSky) = { - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar1, 220) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlayerFaceNpc, NPC_Sun_01, FALSE) - EVT_END_THREAD - EVT_CALL(SetNpcJumpscale, NPC_Sun_01, EVT_FLOAT(0.0)) - EVT_CALL(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) - EVT_SUB(LVar1, 400) - EVT_CALL(NpcJump0, NPC_Sun_01, LVar0, 275, LVar2, 30) - EVT_EXEC_GET_TID(N(EVS_Sun_AnimateBobbing), LVar9) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_EQ(AF_FLO_MetTheSun, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(10) - EVT_KILL_THREAD(LVar9) - EVT_CALL(SetNpcFlagBits, NPC_Sun_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_Sun_01, LVar0, 450, LVar2, 30) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_UNBIND - EVT_RETURN - EVT_END + Loop(0) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar1, 220) + BreakLoop + EndIf + EndLoop + Thread + Wait(15) + Call(PlayerFaceNpc, NPC_Sun_01, FALSE) + EndThread + Call(SetNpcJumpscale, NPC_Sun_01, Float(0.0)) + Call(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) + Sub(LVar1, 400) + Call(NpcJump0, NPC_Sun_01, LVar0, 275, LVar2, 30) + ExecGetTID(N(EVS_Sun_AnimateBobbing), LVar9) + Loop(0) + Wait(1) + IfEq(AF_FLO_MetTheSun, TRUE) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, TRUE) + Wait(10) + KillThread(LVar9) + Call(SetNpcFlagBits, NPC_Sun_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_Sun_01, LVar0, 450, LVar2, 30) + Call(DisablePlayerInput, FALSE) + Unbind + Return + End }; EvtScript N(EVS_NpcInteract_Sun_01) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_SPOKE_WITH_THE_SUN) - EVT_CALL(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009A) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Thinking) - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) - EVT_WAIT(20) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009B) - EVT_SET(GB_StoryProgress, STORY_CH6_SPOKE_WITH_THE_SUN) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009C) - EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED) - EVT_IF_EQ(GF_FLO15_SunThankedPlayer, FALSE) - EVT_CALL(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009D) - EVT_SET(GF_FLO15_SunThankedPlayer, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009E) - EVT_END_IF - EVT_CASE_DEFAULT - EVT_CALL(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009F) - EVT_END_SWITCH - EVT_SET(AF_FLO_MetTheSun, TRUE) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_SPOKE_WITH_THE_SUN) + Call(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009A) + Call(SetPlayerAnimation, ANIM_Mario1_Thinking) + Wait(20) + Call(SetPlayerAnimation, ANIM_MarioW2_SpeakUp) + Wait(20) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009B) + Set(GB_StoryProgress, STORY_CH6_SPOKE_WITH_THE_SUN) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009C) + CaseLt(STORY_CH6_STAR_SPIRIT_RESCUED) + IfEq(GF_FLO15_SunThankedPlayer, FALSE) + Call(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009D) + Set(GF_FLO15_SunThankedPlayer, TRUE) + Else + Call(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009E) + EndIf + CaseDefault + Call(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009F) + EndSwitch + Set(AF_FLO_MetTheSun, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_Sun_01) = { - EVT_CALL(SetNpcCollisionSize, NPC_Sun_01, 64, 40) - EVT_CALL(EnableNpcShadow, NPC_Sun_01, FALSE) - EVT_IF_LT(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetNpcPos, NPC_Sun_01, 0, 270, 0) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Sun_01))) - EVT_EXEC(N(EVS_Sun_AnimateBobbing)) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_Sun_01, 0, 450, 0) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Sun_01))) - EVT_SET(AF_FLO_MetTheSun, FALSE) - EVT_EXEC(N(EVS_Sun_DescendFromSky)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetNpcCollisionSize, NPC_Sun_01, 64, 40) + Call(EnableNpcShadow, NPC_Sun_01, FALSE) + IfLt(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetNpcPos, NPC_Sun_01, 0, 270, 0) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Sun_01))) + Exec(N(EVS_Sun_AnimateBobbing)) + Else + Call(SetNpcPos, NPC_Sun_01, 0, 450, 0) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Sun_01))) + Set(AF_FLO_MetTheSun, FALSE) + Exec(N(EVS_Sun_DescendFromSky)) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Sun_02) = { - EVT_CALL(EnableNpcShadow, NPC_Sun_02, FALSE) - EVT_CALL(SetNpcAnimation, NPC_Sun_02, ANIM_Sun_FireIdle) - EVT_CALL(SetNpcPaletteSwapMode, NPC_Sun_01, NPC_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) - EVT_CALL(SetNpcPaletteSwapMode, NPC_Sun_02, NPC_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) - EVT_CALL(SetNpcPaletteSwapping, NPC_Sun_01, 0, 1, 5, 5, 13, 5, 0, 0) - EVT_CALL(SetNpcPaletteSwapping, NPC_Sun_02, 0, 1, 5, 5, 13, 5, 0, 0) - EVT_IF_LT(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetNpcPos, NPC_Sun_02, 0, 270, -5) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_Sun_02, 0, 450, -5) - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_Sun_02))) - EVT_END_IF - EVT_RETURN - EVT_END + Call(EnableNpcShadow, NPC_Sun_02, FALSE) + Call(SetNpcAnimation, NPC_Sun_02, ANIM_Sun_FireIdle) + Call(SetNpcPaletteSwapMode, NPC_Sun_01, NPC_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) + Call(SetNpcPaletteSwapMode, NPC_Sun_02, NPC_PAL_ADJUST_BLEND_PALETTES_VARYING_INTERVALS) + Call(SetNpcPaletteSwapping, NPC_Sun_01, 0, 1, 5, 5, 13, 5, 0, 0) + Call(SetNpcPaletteSwapping, NPC_Sun_02, 0, 1, 5, 5, 13, 5, 0, 0) + IfLt(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetNpcPos, NPC_Sun_02, 0, 270, -5) + Else + Call(SetNpcPos, NPC_Sun_02, 0, 450, -5) + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_Sun_02))) + EndIf + Return + End }; NpcData N(NpcData_Sun)[] = { diff --git a/src/world/dead/area_flo/flo_15/flo_15_4_entity.c b/src/world/dead/area_flo/flo_15/flo_15_4_entity.c index 21223931588..33cf79abfae 100644 --- a/src/world/dead/area_flo/flo_15/flo_15_4_entity.c +++ b/src/world/dead/area_flo/flo_15/flo_15_4_entity.c @@ -2,16 +2,16 @@ #include "entity.h" EvtScript N(EVS_OnBlast_Rock) = { - EVT_SET(GF_FLO15_BombedRock, TRUE) - EVT_RETURN - EVT_END + Set(GF_FLO15_BombedRock, TRUE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_FLO15_BombedRock, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_BombableRock), -180, 0, -18, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBlast_Rock))) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_FLO15_BombedRock, FALSE) + Call(MakeEntity, Ref(Entity_BombableRock), -180, 0, -18, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnBlast_Rock))) + EndIf + Return + End }; diff --git a/src/world/dead/area_flo/flo_15/flo_15_5_stairs.c b/src/world/dead/area_flo/flo_15/flo_15_5_stairs.c index 242bfcf2700..1a6e165e3b2 100644 --- a/src/world/dead/area_flo/flo_15/flo_15_5_stairs.c +++ b/src/world/dead/area_flo/flo_15/flo_15_5_stairs.c @@ -2,71 +2,71 @@ #include "effects.h" s32 N(ShakeCamParams)[] = { - 10, EVT_FLOAT(0.6), - 13, EVT_FLOAT(0.75), - 16, EVT_FLOAT(0.9), - 19, EVT_FLOAT(1.05), - 22, EVT_FLOAT(1.2), - 25, EVT_FLOAT(1.05), - 24, EVT_FLOAT(0.9), - 25, EVT_FLOAT(0.75), - 24, EVT_FLOAT(0.6), - 10, EVT_FLOAT(1.7), + 10, Float(0.6), + 13, Float(0.75), + 16, Float(0.9), + 19, Float(1.05), + 22, Float(1.2), + 25, Float(1.05), + 24, Float(0.9), + 25, Float(0.75), + 24, Float(0.6), + 10, Float(1.7), }; EvtScript N(EVS_MonitorFallingStairs) = { - EVT_IF_EQ(GF_FLO15_BombedRock, FALSE) - EVT_LABEL(0) - EVT_IF_EQ(GF_FLO15_BombedRock, FALSE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_THREAD - EVT_USE_BUF(EVT_PTR(N(ShakeCamParams))) - EVT_LOOP(10) - EVT_BUF_READ2(LVar1, LVar2) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, LVar1, LVar2) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -170, 0, 35) - EVT_CALL(SetPanTarget, CAM_DEFAULT, -170, 0, 35) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 600) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(25.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-50.0), EVT_FLOAT(25.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_WAIT(100) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, -180, 0, -15, 0) - EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, -190, 0, -35, 0) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(6) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o175, SOUND_FLO_STAIRS_LOWERING, SOUND_SPACE_DEFAULT) - EVT_WAIT(20) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, -50, 120, EASING_CUBIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g20, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g54, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_g58, COLLIDER_FLAGS_UPPER_MASK) - EVT_WAIT(15) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g54, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_g58, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(TranslateGroup, MODEL_g20, 0, -50, 0) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_FLO15_BombedRock, FALSE) + Label(0) + IfEq(GF_FLO15_BombedRock, FALSE) + Wait(1) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Thread + UseBuf(Ref(N(ShakeCamParams))) + Loop(10) + BufRead2(LVar1, LVar2) + Call(ShakeCam, CAM_DEFAULT, 0, LVar1, LVar2) + EndLoop + EndThread + Call(UseSettingsFrom, CAM_DEFAULT, -170, 0, 35) + Call(SetPanTarget, CAM_DEFAULT, -170, 0, 35) + Call(SetCamDistance, CAM_DEFAULT, 600) + Call(SetCamPitch, CAM_DEFAULT, Float(25.0), Float(-9.0)) + Call(SetCamPosA, CAM_DEFAULT, Float(-50.0), Float(25.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Wait(100) + PlayEffect(EFFECT_LANDING_DUST, 4, -180, 0, -15, 0) + PlayEffect(EFFECT_LANDING_DUST, 4, -190, 0, -35, 0) + EndThread + Thread + Loop(6) + Call(PlaySoundAtCollider, COLLIDER_o175, SOUND_FLO_STAIRS_LOWERING, SOUND_SPACE_DEFAULT) + Wait(20) + EndLoop + EndThread + Call(MakeLerp, 0, -50, 120, EASING_CUBIC_IN) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g20, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g54, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_g58, COLLIDER_FLAGS_UPPER_MASK) + Wait(15) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Call(DisablePlayerInput, FALSE) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g54, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_g58, COLLIDER_FLAGS_UPPER_MASK) + Call(TranslateGroup, MODEL_g20, 0, -50, 0) + EndIf + Return + End }; diff --git a/src/world/dead/area_flo/flo_16/flo_16_1_music.c b/src/world/dead/area_flo/flo_16/flo_16_1_music.c index 720dbd0fab5..0ddb4dff52f 100644 --- a/src/world/dead/area_flo/flo_16/flo_16_1_music.c +++ b/src/world/dead/area_flo/flo_16/flo_16_1_music.c @@ -1,12 +1,12 @@ #include "flo_16.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/dead/area_flo/flo_16/flo_16_2_main.c b/src/world/dead/area_flo/flo_16/flo_16_2_main.c index 4666ff1eaa3..8cf53b87d7d 100644 --- a/src/world/dead/area_flo/flo_16/flo_16_2_main.c +++ b/src/world/dead/area_flo/flo_16/flo_16_2_main.c @@ -10,10 +10,10 @@ EvtScript N(EVS_ExitWalk_flo_00_4) = EVT_EXIT_WALK(60, flo_16_ENTRY_0, "flo_00", EvtScript N(EVS_ExitWalk_flo_17_0) = EVT_EXIT_WALK(60, flo_16_ENTRY_1, "flo_17", flo_17_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_00_4)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_17_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_00_4)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_flo_17_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -23,52 +23,52 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupVines)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o174, SURFACE_TYPE_SPIKES) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_o59, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o142, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o58, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o136, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o146, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o143, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o135, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o138, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o139, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o140, TRUE) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LABEL(0) - EVT_ADD(LVar0, 140) - EVT_IF_GT(LVar0, 0x10000) - EVT_ADD(LVar0, -0x10000) - EVT_END_IF - EVT_CALL(SetTexPanOffset, 1, 0, LVar0, 0) - EVT_ADD(LVar1, -200) - EVT_IF_LT(LVar1, 0) - EVT_ADD(LVar1, 0x10000) - EVT_END_IF - EVT_CALL(SetTexPanOffset, 2, 0, LVar1, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_THREAD - EVT_EXEC(N(EVS_SetupPillarPuzzle)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupVines)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o174, SURFACE_TYPE_SPIKES) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + Call(EnableTexPanning, MODEL_o59, TRUE) + Call(EnableTexPanning, MODEL_o142, TRUE) + Call(EnableTexPanning, MODEL_o58, TRUE) + Call(EnableTexPanning, MODEL_o136, TRUE) + Call(EnableTexPanning, MODEL_o146, TRUE) + Call(EnableTexPanning, MODEL_o143, TRUE) + Call(EnableTexPanning, MODEL_o135, TRUE) + Call(EnableTexPanning, MODEL_o138, TRUE) + Call(EnableTexPanning, MODEL_o139, TRUE) + Call(EnableTexPanning, MODEL_o140, TRUE) + Thread + Set(LVar0, 0) + Set(LVar1, 0) + Label(0) + Add(LVar0, 140) + IfGt(LVar0, 0x10000) + Add(LVar0, -0x10000) + EndIf + Call(SetTexPanOffset, 1, 0, LVar0, 0) + Add(LVar1, -200) + IfLt(LVar1, 0) + Add(LVar1, 0x10000) + EndIf + Call(SetTexPanOffset, 2, 0, LVar1, 0) + Wait(1) + Goto(0) + EndThread + Exec(N(EVS_SetupPillarPuzzle)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Return + End }; diff --git a/src/world/dead/area_flo/flo_16/flo_16_3_vines.c b/src/world/dead/area_flo/flo_16/flo_16_3_vines.c index c82feafbb3a..a97c740fe00 100644 --- a/src/world/dead/area_flo/flo_16/flo_16_3_vines.c +++ b/src/world/dead/area_flo/flo_16/flo_16_3_vines.c @@ -5,13 +5,13 @@ #include "world/area_flo/common/DroppingVine.inc.c" EvtScript N(EVS_SetupVines) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o214, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o214, SURFACE_TYPE_FLOWERS) EVT_FLOWER_SPAWN_REGION( -740, -140, -260, -55, 100) EVT_FLOWER_SPAWN_REGION( 250, -140, 725, -55, 180) EVT_DROPPING_VINE(ITEM_NONE, MODEL_o199, MODEL_o200, MODEL_o201, MODEL_o202) EVT_DROPPING_VINE(ITEM_STINKY_HERB, MODEL_o203, MODEL_o204, MODEL_o205, MODEL_o206) EVT_DROPPING_VINE(ITEM_NONE, MODEL_o209, MODEL_o210, MODEL_o211, MODEL_o212) EVT_DROPPING_VINE(ITEM_NONE, MODEL_o213, MODEL_o214, MODEL_o215, MODEL_o216) - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/dead/area_flo/flo_16/flo_16_4_entity.c b/src/world/dead/area_flo/flo_16/flo_16_4_entity.c index 4139b4c35da..0591236a772 100644 --- a/src/world/dead/area_flo/flo_16/flo_16_4_entity.c +++ b/src/world/dead/area_flo/flo_16/flo_16_4_entity.c @@ -6,29 +6,29 @@ #include "world/common/entity/SuperBlock.inc.c" EvtScript N(EVS_TetherCameraToPlayer) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_UseSpring) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAUNCH) - EVT_WAIT(2) - EVT_CALL(GetPlayerPos, LVar7, LVar8, LVar9) - EVT_EXEC_GET_TID(N(EVS_TetherCameraToPlayer), LVarA) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7)) - EVT_CALL(PlayerJump, 450, 180, -120, 30) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAUNCH) + Wait(2) + Call(GetPlayerPos, LVar7, LVar8, LVar9) + ExecGetTID(N(EVS_TetherCameraToPlayer), LVarA) + Call(SetPlayerJumpscale, Float(0.7)) + Call(PlayerJump, 450, 180, -120, 30) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; API_CALLABLE(N(IsPlayerPounding)) { @@ -40,28 +40,28 @@ API_CALLABLE(N(IsPlayerPounding)) { } EvtScript N(EVS_MonitorCeilingPound) = { - EVT_IF_EQ(AF_FLO16_FoundHiddenStarPiece, FALSE) - EVT_CALL(N(IsPlayerPounding)) - EVT_IF_EQ(LVar0, 0) - EVT_RETURN - EVT_END_IF - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_SWITCH(LVar0) - EVT_CASE_RANGE(620, 660) - EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 640, 145, -100, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_FLO16_Item_StarPiece) - EVT_SET(AF_FLO16_FoundHiddenStarPiece, TRUE) - EVT_END_SWITCH - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(AF_FLO16_FoundHiddenStarPiece, FALSE) + Call(N(IsPlayerPounding)) + IfEq(LVar0, 0) + Return + EndIf + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Switch(LVar0) + CaseRange(620, 660) + Call(MakeItemEntity, ITEM_STAR_PIECE, 640, 145, -100, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_FLO16_Item_StarPiece) + Set(AF_FLO16_FoundHiddenStarPiece, TRUE) + EndSwitch + EndIf + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_SET(AF_FLO16_FoundHiddenStarPiece, FALSE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_MonitorCeilingPound)), TRIGGER_FLOOR_TOUCH, COLLIDER_o214, 1, 0) + Set(AF_FLO16_FoundHiddenStarPiece, FALSE) + BindTrigger(Ref(N(EVS_MonitorCeilingPound)), TRIGGER_FLOOR_TOUCH, COLLIDER_o214, 1, 0) EVT_MAKE_SUPER_BLOCK(350, 240, -100, 0) - EVT_CALL(MakeEntity, EVT_PTR(Entity_ScriptSpring), 472, 100, -100, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_UseSpring))) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_ScriptSpring), 472, 100, -100, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_UseSpring))) + Return + End }; diff --git a/src/world/dead/area_flo/flo_16/flo_16_6_puzzle.c b/src/world/dead/area_flo/flo_16/flo_16_6_puzzle.c index c8409edde77..b151a14deb6 100644 --- a/src/world/dead/area_flo/flo_16/flo_16_6_puzzle.c +++ b/src/world/dead/area_flo/flo_16/flo_16_6_puzzle.c @@ -9,227 +9,227 @@ API_CALLABLE(N(CheckForPoundInput)) { } EvtScript N(EVS_OnTouch_RedPillar) = { - EVT_CALL(N(CheckForPoundInput)) - EVT_IF_EQ(LVar0, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_EQ(AF_FLO_RaisedRedPillar, FALSE) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, 50) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 180) - EVT_SET(AF_FLO_RaisedRedPillar, TRUE) - EVT_ELSE - EVT_SET(LVar5, 50) - EVT_SET(LVar6, 0) - EVT_SET(LVar7, 180) - EVT_SET(LVar8, 0) - EVT_SET(AF_FLO_RaisedRedPillar, FALSE) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(PlaySound, SOUND_FLO_MOVE_PILLAR) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30, EVT_FLOAT(0.8)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_CALL(MakeLerp, LVar5, LVar6, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_g81, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_g82, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_g85, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_g86, 0, LVar0, 0) - EVT_CALL(RotateGroup, MODEL_g82, LVar7, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_g86, LVar7, 1, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o242) - EVT_CALL(UpdateColliderTransform, COLLIDER_o250) - EVT_CALL(UpdateColliderTransform, COLLIDER_o244) - EVT_CALL(UpdateColliderTransform, COLLIDER_o252) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, FALSE) - EVT_WAIT(10) - EVT_CALL(MakeLerp, LVar7, LVar8, 15, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_g81, 0, LVar6, 0) - EVT_CALL(TranslateGroup, MODEL_g82, 0, LVar6, 0) - EVT_CALL(TranslateModel, MODEL_g85, 0, LVar6, 0) - EVT_CALL(TranslateGroup, MODEL_g86, 0, LVar6, 0) - EVT_CALL(RotateGroup, MODEL_g82, LVar0, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_g86, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(N(CheckForPoundInput)) + IfEq(LVar0, FALSE) + Return + EndIf + Call(DisablePlayerInput, TRUE) + IfEq(AF_FLO_RaisedRedPillar, FALSE) + Set(LVar5, 0) + Set(LVar6, 50) + Set(LVar7, 0) + Set(LVar8, 180) + Set(AF_FLO_RaisedRedPillar, TRUE) + Else + Set(LVar5, 50) + Set(LVar6, 0) + Set(LVar7, 180) + Set(LVar8, 0) + Set(AF_FLO_RaisedRedPillar, FALSE) + EndIf + Wait(15) + Call(PlaySound, SOUND_FLO_MOVE_PILLAR) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 30, Float(0.8)) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(0.2)) + EndThread + Call(MakeLerp, LVar5, LVar6, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_g81, 0, LVar0, 0) + Call(TranslateGroup, MODEL_g82, 0, LVar0, 0) + Call(TranslateModel, MODEL_g85, 0, LVar0, 0) + Call(TranslateGroup, MODEL_g86, 0, LVar0, 0) + Call(RotateGroup, MODEL_g82, LVar7, 1, 0, 0) + Call(RotateGroup, MODEL_g86, LVar7, 1, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o242) + Call(UpdateColliderTransform, COLLIDER_o250) + Call(UpdateColliderTransform, COLLIDER_o244) + Call(UpdateColliderTransform, COLLIDER_o252) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, FALSE) + Wait(10) + Call(MakeLerp, LVar7, LVar8, 15, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_g81, 0, LVar6, 0) + Call(TranslateGroup, MODEL_g82, 0, LVar6, 0) + Call(TranslateModel, MODEL_g85, 0, LVar6, 0) + Call(TranslateGroup, MODEL_g86, 0, LVar6, 0) + Call(RotateGroup, MODEL_g82, LVar0, 1, 0, 0) + Call(RotateGroup, MODEL_g86, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_OnTouch_GreenPillar) = { - EVT_CALL(N(CheckForPoundInput)) - EVT_IF_EQ(LVar0, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_EQ(AF_FLO_RaisedGreenPillar, FALSE) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, 50) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 180) - EVT_SET(AF_FLO_RaisedGreenPillar, TRUE) - EVT_ELSE - EVT_SET(LVar5, 50) - EVT_SET(LVar6, 0) - EVT_SET(LVar7, 180) - EVT_SET(LVar8, 0) - EVT_SET(AF_FLO_RaisedGreenPillar, FALSE) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(PlaySound, SOUND_FLO_MOVE_PILLAR) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30, EVT_FLOAT(0.8)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_CALL(MakeLerp, LVar5, LVar6, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_g83, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_g84, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_g87, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_g88, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_g91, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_g92, 0, LVar0, 0) - EVT_CALL(RotateGroup, MODEL_g84, LVar7, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_g88, LVar7, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_g92, LVar7, 1, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o243) - EVT_CALL(UpdateColliderTransform, COLLIDER_o251) - EVT_CALL(UpdateColliderTransform, COLLIDER_o245) - EVT_CALL(UpdateColliderTransform, COLLIDER_o253) - EVT_CALL(UpdateColliderTransform, COLLIDER_o247) - EVT_CALL(UpdateColliderTransform, COLLIDER_o255) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, FALSE) - EVT_WAIT(10) - EVT_CALL(MakeLerp, LVar7, LVar8, 15, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_g83, 0, LVar6, 0) - EVT_CALL(TranslateGroup, MODEL_g84, 0, LVar6, 0) - EVT_CALL(TranslateModel, MODEL_g87, 0, LVar6, 0) - EVT_CALL(TranslateGroup, MODEL_g88, 0, LVar6, 0) - EVT_CALL(TranslateModel, MODEL_g91, 0, LVar6, 0) - EVT_CALL(TranslateGroup, MODEL_g92, 0, LVar6, 0) - EVT_CALL(RotateGroup, MODEL_g84, LVar0, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_g88, LVar0, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_g92, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(N(CheckForPoundInput)) + IfEq(LVar0, FALSE) + Return + EndIf + Call(DisablePlayerInput, TRUE) + IfEq(AF_FLO_RaisedGreenPillar, FALSE) + Set(LVar5, 0) + Set(LVar6, 50) + Set(LVar7, 0) + Set(LVar8, 180) + Set(AF_FLO_RaisedGreenPillar, TRUE) + Else + Set(LVar5, 50) + Set(LVar6, 0) + Set(LVar7, 180) + Set(LVar8, 0) + Set(AF_FLO_RaisedGreenPillar, FALSE) + EndIf + Wait(15) + Call(PlaySound, SOUND_FLO_MOVE_PILLAR) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 30, Float(0.8)) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(0.2)) + EndThread + Call(MakeLerp, LVar5, LVar6, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_g83, 0, LVar0, 0) + Call(TranslateGroup, MODEL_g84, 0, LVar0, 0) + Call(TranslateModel, MODEL_g87, 0, LVar0, 0) + Call(TranslateGroup, MODEL_g88, 0, LVar0, 0) + Call(TranslateModel, MODEL_g91, 0, LVar0, 0) + Call(TranslateGroup, MODEL_g92, 0, LVar0, 0) + Call(RotateGroup, MODEL_g84, LVar7, 1, 0, 0) + Call(RotateGroup, MODEL_g88, LVar7, 1, 0, 0) + Call(RotateGroup, MODEL_g92, LVar7, 1, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o243) + Call(UpdateColliderTransform, COLLIDER_o251) + Call(UpdateColliderTransform, COLLIDER_o245) + Call(UpdateColliderTransform, COLLIDER_o253) + Call(UpdateColliderTransform, COLLIDER_o247) + Call(UpdateColliderTransform, COLLIDER_o255) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, FALSE) + Wait(10) + Call(MakeLerp, LVar7, LVar8, 15, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_g83, 0, LVar6, 0) + Call(TranslateGroup, MODEL_g84, 0, LVar6, 0) + Call(TranslateModel, MODEL_g87, 0, LVar6, 0) + Call(TranslateGroup, MODEL_g88, 0, LVar6, 0) + Call(TranslateModel, MODEL_g91, 0, LVar6, 0) + Call(TranslateGroup, MODEL_g92, 0, LVar6, 0) + Call(RotateGroup, MODEL_g84, LVar0, 1, 0, 0) + Call(RotateGroup, MODEL_g88, LVar0, 1, 0, 0) + Call(RotateGroup, MODEL_g92, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_OnTouch_PurplePillar) = { - EVT_CALL(N(CheckForPoundInput)) - EVT_IF_EQ(LVar0, FALSE) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_IF_EQ(AF_FLO_LoweredPurplePillar, FALSE) - EVT_SET(LVar5, 0) - EVT_SET(LVar6, -50) - EVT_SET(LVar7, 0) - EVT_SET(LVar8, 180) - EVT_SET(AF_FLO_LoweredPurplePillar, TRUE) - EVT_ELSE - EVT_SET(LVar5, -50) - EVT_SET(LVar6, 0) - EVT_SET(LVar7, 180) - EVT_SET(LVar8, 0) - EVT_SET(AF_FLO_LoweredPurplePillar, FALSE) - EVT_END_IF - EVT_WAIT(15) - EVT_CALL(PlaySound, SOUND_FLO_MOVE_PILLAR) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30, EVT_FLOAT(0.8)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.2)) - EVT_END_THREAD - EVT_CALL(MakeLerp, LVar5, LVar6, 30, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_g89, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_g90, 0, LVar0, 0) - EVT_CALL(TranslateModel, MODEL_g93, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_g94, 0, LVar0, 0) - EVT_CALL(RotateGroup, MODEL_g90, LVar7, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_g94, LVar7, 1, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o246) - EVT_CALL(UpdateColliderTransform, COLLIDER_o254) - EVT_CALL(UpdateColliderTransform, COLLIDER_o248) - EVT_CALL(UpdateColliderTransform, COLLIDER_o256) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, FALSE) - EVT_WAIT(10) - EVT_CALL(MakeLerp, LVar7, LVar8, 15, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_g89, 0, LVar6, 0) - EVT_CALL(TranslateGroup, MODEL_g90, 0, LVar6, 0) - EVT_CALL(TranslateModel, MODEL_g93, 0, LVar6, 0) - EVT_CALL(TranslateGroup, MODEL_g94, 0, LVar6, 0) - EVT_CALL(RotateGroup, MODEL_g90, LVar0, 1, 0, 0) - EVT_CALL(RotateGroup, MODEL_g94, LVar0, 1, 0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(N(CheckForPoundInput)) + IfEq(LVar0, FALSE) + Return + EndIf + Call(DisablePlayerInput, TRUE) + IfEq(AF_FLO_LoweredPurplePillar, FALSE) + Set(LVar5, 0) + Set(LVar6, -50) + Set(LVar7, 0) + Set(LVar8, 180) + Set(AF_FLO_LoweredPurplePillar, TRUE) + Else + Set(LVar5, -50) + Set(LVar6, 0) + Set(LVar7, 180) + Set(LVar8, 0) + Set(AF_FLO_LoweredPurplePillar, FALSE) + EndIf + Wait(15) + Call(PlaySound, SOUND_FLO_MOVE_PILLAR) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 30, Float(0.8)) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(0.2)) + EndThread + Call(MakeLerp, LVar5, LVar6, 30, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_g89, 0, LVar0, 0) + Call(TranslateGroup, MODEL_g90, 0, LVar0, 0) + Call(TranslateModel, MODEL_g93, 0, LVar0, 0) + Call(TranslateGroup, MODEL_g94, 0, LVar0, 0) + Call(RotateGroup, MODEL_g90, LVar7, 1, 0, 0) + Call(RotateGroup, MODEL_g94, LVar7, 1, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o246) + Call(UpdateColliderTransform, COLLIDER_o254) + Call(UpdateColliderTransform, COLLIDER_o248) + Call(UpdateColliderTransform, COLLIDER_o256) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, FALSE) + Wait(10) + Call(MakeLerp, LVar7, LVar8, 15, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_g89, 0, LVar6, 0) + Call(TranslateGroup, MODEL_g90, 0, LVar6, 0) + Call(TranslateModel, MODEL_g93, 0, LVar6, 0) + Call(TranslateGroup, MODEL_g94, 0, LVar6, 0) + Call(RotateGroup, MODEL_g90, LVar0, 1, 0, 0) + Call(RotateGroup, MODEL_g94, LVar0, 1, 0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_SetupPillarPuzzle) = { - EVT_SET(AF_FLO_RaisedRedPillar, FALSE) - EVT_SET(AF_FLO_RaisedGreenPillar, FALSE) - EVT_SET(AF_FLO_LoweredPurplePillar, FALSE) - EVT_CALL(ParentColliderToModel, COLLIDER_o242, MODEL_g81) - EVT_CALL(ParentColliderToModel, COLLIDER_o250, MODEL_g81) - EVT_CALL(ParentColliderToModel, COLLIDER_o243, MODEL_g83) - EVT_CALL(ParentColliderToModel, COLLIDER_o251, MODEL_g83) - EVT_CALL(ParentColliderToModel, COLLIDER_o244, MODEL_g85) - EVT_CALL(ParentColliderToModel, COLLIDER_o252, MODEL_g85) - EVT_CALL(ParentColliderToModel, COLLIDER_o245, MODEL_g87) - EVT_CALL(ParentColliderToModel, COLLIDER_o253, MODEL_g87) - EVT_CALL(ParentColliderToModel, COLLIDER_o246, MODEL_g89) - EVT_CALL(ParentColliderToModel, COLLIDER_o254, MODEL_g89) - EVT_CALL(ParentColliderToModel, COLLIDER_o247, MODEL_g91) - EVT_CALL(ParentColliderToModel, COLLIDER_o255, MODEL_g91) - EVT_CALL(ParentColliderToModel, COLLIDER_o248, MODEL_g93) - EVT_CALL(ParentColliderToModel, COLLIDER_o256, MODEL_g93) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_RedPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o242, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_GreenPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o243, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_RedPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o244, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_GreenPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o245, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_PurplePillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o246, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_GreenPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o247, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_PurplePillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o248, 1, 0) - EVT_RETURN - EVT_END + Set(AF_FLO_RaisedRedPillar, FALSE) + Set(AF_FLO_RaisedGreenPillar, FALSE) + Set(AF_FLO_LoweredPurplePillar, FALSE) + Call(ParentColliderToModel, COLLIDER_o242, MODEL_g81) + Call(ParentColliderToModel, COLLIDER_o250, MODEL_g81) + Call(ParentColliderToModel, COLLIDER_o243, MODEL_g83) + Call(ParentColliderToModel, COLLIDER_o251, MODEL_g83) + Call(ParentColliderToModel, COLLIDER_o244, MODEL_g85) + Call(ParentColliderToModel, COLLIDER_o252, MODEL_g85) + Call(ParentColliderToModel, COLLIDER_o245, MODEL_g87) + Call(ParentColliderToModel, COLLIDER_o253, MODEL_g87) + Call(ParentColliderToModel, COLLIDER_o246, MODEL_g89) + Call(ParentColliderToModel, COLLIDER_o254, MODEL_g89) + Call(ParentColliderToModel, COLLIDER_o247, MODEL_g91) + Call(ParentColliderToModel, COLLIDER_o255, MODEL_g91) + Call(ParentColliderToModel, COLLIDER_o248, MODEL_g93) + Call(ParentColliderToModel, COLLIDER_o256, MODEL_g93) + BindTrigger(Ref(N(EVS_OnTouch_RedPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o242, 1, 0) + BindTrigger(Ref(N(EVS_OnTouch_GreenPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o243, 1, 0) + BindTrigger(Ref(N(EVS_OnTouch_RedPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o244, 1, 0) + BindTrigger(Ref(N(EVS_OnTouch_GreenPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o245, 1, 0) + BindTrigger(Ref(N(EVS_OnTouch_PurplePillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o246, 1, 0) + BindTrigger(Ref(N(EVS_OnTouch_GreenPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o247, 1, 0) + BindTrigger(Ref(N(EVS_OnTouch_PurplePillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o248, 1, 0) + Return + End }; diff --git a/src/world/dead/area_flo/flo_17/flo_17_1_music.c b/src/world/dead/area_flo/flo_17/flo_17_1_music.c index 1424ce37ccf..47ad5d845c1 100644 --- a/src/world/dead/area_flo/flo_17/flo_17_1_music.c +++ b/src/world/dead/area_flo/flo_17/flo_17_1_music.c @@ -1,12 +1,12 @@ #include "flo_17.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) + CaseDefault + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/dead/area_flo/flo_17/flo_17_2_main.c b/src/world/dead/area_flo/flo_17/flo_17_2_main.c index 653361d1f07..999ce583bc9 100644 --- a/src/world/dead/area_flo/flo_17/flo_17_2_main.c +++ b/src/world/dead/area_flo/flo_17/flo_17_2_main.c @@ -12,10 +12,10 @@ EvtScript N(EVS_ExitWalk_flo_16_1) = EVT_EXIT_WALK(60, flo_17_ENTRY_0, "flo_16", EvtScript N(EVS_ExitWalk_flo_18_0) = EVT_EXIT_WALK(60, flo_17_ENTRY_1, "flo_18", flo_18_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_16_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_18_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_16_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_flo_18_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -42,89 +42,89 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_SetupLogBridges)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o116, SURFACE_TYPE_FLOWERS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o117, SURFACE_TYPE_FLOWERS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o121, SURFACE_TYPE_FLOWERS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o124, SURFACE_TYPE_FLOWERS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o126, SURFACE_TYPE_FLOWERS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o128, SURFACE_TYPE_FLOWERS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o129, SURFACE_TYPE_FLOWERS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o132, SURFACE_TYPE_FLOWERS) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o133, SURFACE_TYPE_FLOWERS) + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_SetupLogBridges)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o116, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o117, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o121, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o124, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o126, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o128, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o129, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o132, SURFACE_TYPE_FLOWERS) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o133, SURFACE_TYPE_FLOWERS) EVT_FLOWER_SPAWN_REGION( -736, -137, -522, -118, 0) EVT_FLOWER_SPAWN_REGION( -728, 76, -496, 137, 0) EVT_FLOWER_SPAWN_REGION( -160, -117, -92, -54, 0) EVT_FLOWER_SPAWN_REGION( 76, -124, 150, -55, 0) EVT_FLOWER_SPAWN_REGION( 192, 60, 309, 133, 0) EVT_FLOWER_SPAWN_REGION( 488, 46, 733, 137, 0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o103, SURFACE_TYPE_SPIKES) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_o34, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o36, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o37, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o40, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o41, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o44, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o45, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o47, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o48, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o51, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o52, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o55, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o23, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o25, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o26, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o29, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o30, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o33, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o35, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o38, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o39, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o42, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o43, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o46, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o49, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o50, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o53, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o54, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o24, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o27, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o28, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o31, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o32, TRUE) - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LABEL(0) - EVT_ADD(LVar0, 140) - EVT_IF_GT(LVar0, 0x10000) - EVT_ADD(LVar0, -0x10000) - EVT_END_IF - EVT_CALL(SetTexPanOffset, 1, 0, LVar0, 0) - EVT_ADD(LVar1, -200) - EVT_IF_LT(LVar1, 0) - EVT_ADD(LVar1, 0x10000) - EVT_END_IF - EVT_CALL(SetTexPanOffset, 2, 0, LVar1, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_THREAD - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o103, SURFACE_TYPE_SPIKES) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + Call(EnableTexPanning, MODEL_o34, TRUE) + Call(EnableTexPanning, MODEL_o36, TRUE) + Call(EnableTexPanning, MODEL_o37, TRUE) + Call(EnableTexPanning, MODEL_o40, TRUE) + Call(EnableTexPanning, MODEL_o41, TRUE) + Call(EnableTexPanning, MODEL_o44, TRUE) + Call(EnableTexPanning, MODEL_o45, TRUE) + Call(EnableTexPanning, MODEL_o47, TRUE) + Call(EnableTexPanning, MODEL_o48, TRUE) + Call(EnableTexPanning, MODEL_o51, TRUE) + Call(EnableTexPanning, MODEL_o52, TRUE) + Call(EnableTexPanning, MODEL_o55, TRUE) + Call(EnableTexPanning, MODEL_o23, TRUE) + Call(EnableTexPanning, MODEL_o25, TRUE) + Call(EnableTexPanning, MODEL_o26, TRUE) + Call(EnableTexPanning, MODEL_o29, TRUE) + Call(EnableTexPanning, MODEL_o30, TRUE) + Call(EnableTexPanning, MODEL_o33, TRUE) + Call(EnableTexPanning, MODEL_o35, TRUE) + Call(EnableTexPanning, MODEL_o38, TRUE) + Call(EnableTexPanning, MODEL_o39, TRUE) + Call(EnableTexPanning, MODEL_o42, TRUE) + Call(EnableTexPanning, MODEL_o43, TRUE) + Call(EnableTexPanning, MODEL_o46, TRUE) + Call(EnableTexPanning, MODEL_o49, TRUE) + Call(EnableTexPanning, MODEL_o50, TRUE) + Call(EnableTexPanning, MODEL_o53, TRUE) + Call(EnableTexPanning, MODEL_o54, TRUE) + Call(EnableTexPanning, MODEL_o24, TRUE) + Call(EnableTexPanning, MODEL_o27, TRUE) + Call(EnableTexPanning, MODEL_o28, TRUE) + Call(EnableTexPanning, MODEL_o31, TRUE) + Call(EnableTexPanning, MODEL_o32, TRUE) + Thread + Set(LVar0, 0) + Set(LVar1, 0) + Label(0) + Add(LVar0, 140) + IfGt(LVar0, 0x10000) + Add(LVar0, -0x10000) + EndIf + Call(SetTexPanOffset, 1, 0, LVar0, 0) + Add(LVar1, -200) + IfLt(LVar1, 0) + Add(LVar1, 0x10000) + EndIf + Call(SetTexPanOffset, 2, 0, LVar1, 0) + Wait(1) + Goto(0) + EndThread + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Return + End }; diff --git a/src/world/dead/area_flo/flo_17/flo_17_3_logs.c b/src/world/dead/area_flo/flo_17/flo_17_3_logs.c index 673b60e0474..4a8fa7424c6 100644 --- a/src/world/dead/area_flo/flo_17/flo_17_3_logs.c +++ b/src/world/dead/area_flo/flo_17/flo_17_3_logs.c @@ -6,6 +6,6 @@ EvtScript N(EVS_SetupLogBridges) = { EVT_MAKE_LOG_BRIDGE(COLLIDER_o22, COLLIDER_o138, MODEL_o19, MODEL_o20, MV_RotAngle_Log_01, MV_RotVelocity_Log_01) EVT_MAKE_LOG_BRIDGE(COLLIDER_o15, COLLIDER_o139, MODEL_o17, MODEL_o18, MV_RotAngle_Log_02, MV_RotVelocity_Log_02) EVT_MAKE_LOG_BRIDGE(COLLIDER_o13, COLLIDER_o140, MODEL_o11, MODEL_o12, MV_RotAngle_Log_03, MV_RotVelocity_Log_03) - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/dead/area_flo/flo_17/flo_17_5_entity.c b/src/world/dead/area_flo/flo_17/flo_17_5_entity.c index 4e42cf8abb9..7c1c3760a9e 100644 --- a/src/world/dead/area_flo/flo_17/flo_17_5_entity.c +++ b/src/world/dead/area_flo/flo_17/flo_17_5_entity.c @@ -2,9 +2,9 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenYellowBlock), 660, 60, -115, 0, ITEM_THUNDER_RAGE, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_FLO17_HiddenItem_ThunderRage) - EVT_CALL(MakeItemEntity, ITEM_LETTER_TO_MINH_T, -245, 0, 105, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO17_Item_Letter09) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HiddenYellowBlock), 660, 60, -115, 0, ITEM_THUNDER_RAGE, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_FLO17_HiddenItem_ThunderRage) + Call(MakeItemEntity, ITEM_LETTER_TO_MINH_T, -245, 0, 105, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO17_Item_Letter09) + Return + End }; diff --git a/src/world/dead/area_flo/flo_18/flo_18_1_music.c b/src/world/dead/area_flo/flo_18/flo_18_1_music.c index d6983650817..445a9842290 100644 --- a/src/world/dead/area_flo/flo_18/flo_18_1_music.c +++ b/src/world/dead/area_flo/flo_18/flo_18_1_music.c @@ -1,13 +1,13 @@ #include "flo_18.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(SetMusicTrack, 0, SONG_PUFF_PUFF_MACHINE, 0, 8) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o126, SOUND_LOOP_PUFF_PUFF_MACHINE, SOUND_SPACE_DEFAULT) - EVT_CASE_DEFAULT - EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseLt(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(SetMusicTrack, 0, SONG_PUFF_PUFF_MACHINE, 0, 8) + Call(PlaySoundAtCollider, COLLIDER_o126, SOUND_LOOP_PUFF_PUFF_MACHINE, SOUND_SPACE_DEFAULT) + CaseDefault + Call(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) + EndSwitch + Return + End }; diff --git a/src/world/dead/area_flo/flo_18/flo_18_2_main.c b/src/world/dead/area_flo/flo_18/flo_18_2_main.c index 4de072b0f96..607467b709b 100644 --- a/src/world/dead/area_flo/flo_18/flo_18_2_main.c +++ b/src/world/dead/area_flo/flo_18/flo_18_2_main.c @@ -11,9 +11,9 @@ API_CALLABLE(N(SpawnSunEffect)) { EvtScript N(EVS_ExitWalk_flo_17_1) = EVT_EXIT_WALK(60, flo_18_ENTRY_0, "flo_17", flo_17_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_17_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_17_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0) + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -24,56 +24,56 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_SetupFoliage)) - EVT_EXEC(N(EVS_SetupMachine)) - EVT_EXEC(N(EVS_SetupMachineDamageReactions)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o44, SURFACE_TYPE_SPIKES) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_CALL(EnableTexPanning, MODEL_o48, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o50, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o52, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o54, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o58, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o60, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o49, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o51, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o53, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o57, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o59, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_FLOWER_FIELDS) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, FALSE, Ref(N(DefaultNPCs))) + Exec(N(EVS_SetupFoliage)) + Exec(N(EVS_SetupMachine)) + Exec(N(EVS_SetupMachineDamageReactions)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o44, SURFACE_TYPE_SPIKES) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + Call(EnableTexPanning, MODEL_o48, TRUE) + Call(EnableTexPanning, MODEL_o50, TRUE) + Call(EnableTexPanning, MODEL_o52, TRUE) + Call(EnableTexPanning, MODEL_o54, TRUE) + Call(EnableTexPanning, MODEL_o58, TRUE) + Call(EnableTexPanning, MODEL_o60, TRUE) + Call(EnableTexPanning, MODEL_o49, TRUE) + Call(EnableTexPanning, MODEL_o51, TRUE) + Call(EnableTexPanning, MODEL_o53, TRUE) + Call(EnableTexPanning, MODEL_o57, TRUE) + Call(EnableTexPanning, MODEL_o59, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( -140, 0, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( -200, 0, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, flo_18_ENTRY_0) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_ELSE - EVT_EXEC(N(EVS_Scene_LakilesterLikesBeingGood)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(GetEntryID, LVar0) + IfEq(LVar0, flo_18_ENTRY_0) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Else + Exec(N(EVS_Scene_LakilesterLikesBeingGood)) + Exec(N(EVS_BindExitTriggers)) + EndIf + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Return + End }; diff --git a/src/world/dead/area_flo/flo_18/flo_18_3_machine.c b/src/world/dead/area_flo/flo_18/flo_18_3_machine.c index 6b124427e26..53c23f5b17c 100644 --- a/src/world/dead/area_flo/flo_18/flo_18_3_machine.c +++ b/src/world/dead/area_flo/flo_18/flo_18_3_machine.c @@ -22,471 +22,471 @@ API_CALLABLE(N(SetMachineLightningColor)) { } EvtScript N(EVS_AnimateMachineLightning) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_LOOP(0) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, EVT_FLOAT(-16.0), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(80.9), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(0.5), 6) - EVT_CALL(N(SetMachineLightningColor)) - EVT_WAIT(4) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, EVT_FLOAT(80.9), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(-16.0), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(0.5), 6) - EVT_CALL(N(SetMachineLightningColor)) - EVT_WAIT(4) - EVT_IF_GE(GB_FLO18_MachineDamage_Right, 3) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(LVar0, 6) - EVT_LOOP(5) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, EVT_FLOAT(-16.0), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(80.9), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(0.5), 6) - EVT_CALL(N(SetMachineLightningColor)) - EVT_WAIT(LVar0) - EVT_ADD(LVar0, 2) - EVT_PLAY_EFFECT(EFFECT_LIGHTNING_BOLT, 0, EVT_FLOAT(80.9), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(-16.0), EVT_FLOAT(102.0), EVT_FLOAT(-4.1), EVT_FLOAT(0.5), 6) - EVT_CALL(N(SetMachineLightningColor)) - EVT_WAIT(LVar0) - EVT_ADD(LVar0, 2) - EVT_END_LOOP - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0B) + Loop(0) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, Float(-16.0), Float(102.0), Float(-4.1), Float(80.9), Float(102.0), Float(-4.1), Float(0.5), 6) + Call(N(SetMachineLightningColor)) + Wait(4) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, Float(80.9), Float(102.0), Float(-4.1), Float(-16.0), Float(102.0), Float(-4.1), Float(0.5), 6) + Call(N(SetMachineLightningColor)) + Wait(4) + IfGe(GB_FLO18_MachineDamage_Right, 3) + BreakLoop + EndIf + EndLoop + Set(LVar0, 6) + Loop(5) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, Float(-16.0), Float(102.0), Float(-4.1), Float(80.9), Float(102.0), Float(-4.1), Float(0.5), 6) + Call(N(SetMachineLightningColor)) + Wait(LVar0) + Add(LVar0, 2) + PlayEffect(EFFECT_LIGHTNING_BOLT, 0, Float(80.9), Float(102.0), Float(-4.1), Float(-16.0), Float(102.0), Float(-4.1), Float(0.5), 6) + Call(N(SetMachineLightningColor)) + Wait(LVar0) + Add(LVar0, 2) + EndLoop + Return + End }; #include "common/CosInterpMinMax.inc.c" EvtScript N(EVS_UpdateSmokeParticle) = { - EVT_CALL(EnableModel, LVarF, TRUE) - EVT_SET(LVarE, 159) - EVT_LOOP(LVarE) - EVT_ADDF(LVar3, 0) - EVT_ADDF(LVar4, EVT_FLOAT(0.0)) - EVT_SETF(LVar5, EVT_FLOAT(0.01)) - EVT_ADDF(LVar0, LVar3) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_MULF(LVar6, EVT_FLOAT(1.01)) - EVT_ADDF(LVar7, EVT_FLOAT(0.01)) - EVT_SETF(LVar8, LVar6) - EVT_CALL(N(CosInterpMinMax), LVarE, LVarA, EVT_FLOAT(0.0), EVT_FLOAT(0.203), 15, 0, 0) - EVT_ADDF(LVar8, LVarA) - EVT_SETF(LVar9, LVar7) - EVT_CALL(N(CosInterpMinMax), LVarE, LVarA, EVT_FLOAT(0.0), EVT_FLOAT(0.203), 20, 0, 90) - EVT_ADDF(LVar9, LVarA) - EVT_SETF(LVarA, LVar0) - EVT_MULF(LVarA, EVT_FLOAT(10.0)) - EVT_CALL(TranslateModel, LVarF, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, LVarF, LVar8, LVar9, 1) - EVT_CALL(RotateModel, LVarF, LVarA, 0, 0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(EnableModel, LVarF, FALSE) - EVT_RETURN - EVT_END + Call(EnableModel, LVarF, TRUE) + Set(LVarE, 159) + Loop(LVarE) + AddF(LVar3, 0) + AddF(LVar4, Float(0.0)) + SetF(LVar5, Float(0.01)) + AddF(LVar0, LVar3) + AddF(LVar1, LVar4) + AddF(LVar2, LVar5) + MulF(LVar6, Float(1.01)) + AddF(LVar7, Float(0.01)) + SetF(LVar8, LVar6) + Call(N(CosInterpMinMax), LVarE, LVarA, Float(0.0), Float(0.203), 15, 0, 0) + AddF(LVar8, LVarA) + SetF(LVar9, LVar7) + Call(N(CosInterpMinMax), LVarE, LVarA, Float(0.0), Float(0.203), 20, 0, 90) + AddF(LVar9, LVarA) + SetF(LVarA, LVar0) + MulF(LVarA, Float(10.0)) + Call(TranslateModel, LVarF, LVar0, LVar1, LVar2) + Call(ScaleModel, LVarF, LVar8, LVar9, 1) + Call(RotateModel, LVarF, LVarA, 0, 0, 1) + Wait(1) + EndLoop + Call(EnableModel, LVarF, FALSE) + Return + End }; EvtScript N(EVS_ManageSmoke) = { - EVT_SET(LVarE, 0) - EVT_LABEL(0) - EVT_IF_GE(GB_FLO18_MachineDamage_Right, 3) - EVT_RETURN - EVT_END_IF - EVT_SETF(LVar0, EVT_FLOAT(132.0)) - EVT_SETF(LVar1, EVT_FLOAT(90.0)) - EVT_SETF(LVar2, EVT_FLOAT(-30.0)) - EVT_CALL(RandInt, 100, LVar3) - EVT_ADDF(LVar3, -50) - EVT_DIVF(LVar3, EVT_FLOAT(200.0)) - EVT_SETF(LVar4, EVT_FLOAT(1.0)) - EVT_SETF(LVar5, 0) - EVT_SETF(LVar6, EVT_FLOAT(0.296)) - EVT_SETF(LVar7, EVT_FLOAT(0.296)) - EVT_SET(LVarF, LVarE) - EVT_ADD(LVarF, CLONED_MODEL(0)) - EVT_EXEC(N(EVS_UpdateSmokeParticle)) - EVT_ADD(LVarE, 1) - EVT_IF_GE(LVarE, 16) - EVT_SET(LVarE, 0) - EVT_END_IF - EVT_WAIT(10) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Set(LVarE, 0) + Label(0) + IfGe(GB_FLO18_MachineDamage_Right, 3) + Return + EndIf + SetF(LVar0, Float(132.0)) + SetF(LVar1, Float(90.0)) + SetF(LVar2, Float(-30.0)) + Call(RandInt, 100, LVar3) + AddF(LVar3, -50) + DivF(LVar3, Float(200.0)) + SetF(LVar4, Float(1.0)) + SetF(LVar5, 0) + SetF(LVar6, Float(0.296)) + SetF(LVar7, Float(0.296)) + Set(LVarF, LVarE) + Add(LVarF, CLONED_MODEL(0)) + Exec(N(EVS_UpdateSmokeParticle)) + Add(LVarE, 1) + IfGe(LVarE, 16) + Set(LVarE, 0) + EndIf + Wait(10) + Goto(0) + Return + End }; EvtScript N(EVS_ShakeMachine) = { - EVT_IF_EQ(MF_MachineShaking, TRUE) - EVT_RETURN - EVT_END_IF - EVT_SET(MF_MachineShaking, TRUE) - EVT_SET(LVarF, 0) - EVT_LOOP(12) - EVT_CALL(RandInt, 80, LVar0) - EVT_SUB(LVar0, 40) - EVT_CALL(RandInt, 50, LVar1) - EVT_CALL(RandInt, 50, LVar2) - EVT_SUB(LVar2, 25) - EVT_PLAY_EFFECT(EFFECT_00, LVar0, LVar1, LVar2, 5, 10, 1, 1) - EVT_ADD(LVarF, 1) - EVT_CALL(N(CosInterpMinMax), LVarF, LVarE, EVT_FLOAT(1.0), EVT_FLOAT(1.093), 2, 0, 0) - EVT_CALL(N(CosInterpMinMax), LVarF, LVarD, EVT_FLOAT(1.093), EVT_FLOAT(1.0), 2, 0, 0) - EVT_SETF(LVar0, LVarE) - EVT_SETF(LVar1, LVarD) - EVT_SETF(LVar2, LVarE) - EVT_IF_EQ(GB_FLO18_MachineDamage_Left, 0) - EVT_CALL(ScaleModel, MODEL_o115, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o116, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_IF_EQ(GB_FLO18_MachineDamage_Right, 0) - EVT_CALL(ScaleModel, MODEL_o117, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o118, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_IF_LE(GB_FLO18_MachineDamage_Left, 1) - EVT_CALL(ScaleModel, MODEL_o119, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_IF_LE(GB_FLO18_MachineDamage_Left, 2) - EVT_IF_LE(GB_FLO18_MachineDamage_Right, 1) - EVT_CALL(ScaleModel, MODEL_o120, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o121, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o122, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o123, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o124, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_END_IF - EVT_CALL(ScaleModel, MODEL_o113, LVar0, LVar1, LVar2) - EVT_IF_LE(GB_FLO18_MachineDamage_Left, 2) - EVT_IF_LE(GB_FLO18_MachineDamage_Right, 2) - EVT_CALL(ScaleModel, MODEL_o100, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o99, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o125, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_END_IF - EVT_CALL(ScaleModel, MODEL_o92, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o93, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o94, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o95, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o91, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o114, LVar0, LVar1, LVar2) - EVT_SUBF(LVar0, EVT_FLOAT(1.046)) - EVT_MULF(LVar0, EVT_FLOAT(100.0)) - EVT_IF_EQ(GB_FLO18_MachineDamage_Left, 0) - EVT_CALL(RotateModel, MODEL_o115, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o116, LVar0, 0, 0, 1) - EVT_END_IF - EVT_IF_EQ(GB_FLO18_MachineDamage_Right, 0) - EVT_CALL(RotateModel, MODEL_o117, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o118, LVar0, 0, 0, 1) - EVT_END_IF - EVT_IF_LE(GB_FLO18_MachineDamage_Left, 1) - EVT_CALL(RotateModel, MODEL_o119, LVar0, 0, 0, 1) - EVT_END_IF - EVT_IF_LE(GB_FLO18_MachineDamage_Left, 2) - EVT_IF_LE(GB_FLO18_MachineDamage_Right, 1) - EVT_CALL(RotateModel, MODEL_o120, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o121, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o122, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o123, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o124, LVar0, 0, 0, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(RotateModel, MODEL_o113, LVar0, 0, 0, 1) - EVT_IF_LE(GB_FLO18_MachineDamage_Left, 2) - EVT_IF_LE(GB_FLO18_MachineDamage_Right, 2) - EVT_CALL(RotateModel, MODEL_o100, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o99, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o125, LVar0, 0, 0, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(RotateModel, MODEL_o92, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o93, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o94, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o95, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o91, LVar0, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o114, LVar0, 0, 0, 1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SETF(LVar0, 1) - EVT_SETF(LVar1, 1) - EVT_SETF(LVar2, 1) - EVT_IF_EQ(GB_FLO18_MachineDamage_Left, 0) - EVT_CALL(ScaleModel, MODEL_o115, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o116, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_IF_EQ(GB_FLO18_MachineDamage_Right, 0) - EVT_CALL(ScaleModel, MODEL_o117, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o118, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_IF_LE(GB_FLO18_MachineDamage_Left, 1) - EVT_CALL(ScaleModel, MODEL_o119, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_IF_LE(GB_FLO18_MachineDamage_Left, 2) - EVT_IF_LE(GB_FLO18_MachineDamage_Right, 1) - EVT_CALL(ScaleModel, MODEL_o120, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o121, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o122, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o123, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o124, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_END_IF - EVT_CALL(ScaleModel, MODEL_o113, LVar0, LVar1, LVar2) - EVT_IF_LE(GB_FLO18_MachineDamage_Left, 2) - EVT_IF_LE(GB_FLO18_MachineDamage_Right, 2) - EVT_CALL(ScaleModel, MODEL_o100, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o99, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o125, LVar0, LVar1, LVar2) - EVT_END_IF - EVT_END_IF - EVT_CALL(ScaleModel, MODEL_o92, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o93, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o94, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o95, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o91, LVar0, LVar1, LVar2) - EVT_CALL(ScaleModel, MODEL_o114, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_SET(MF_MachineShaking, FALSE) - EVT_RETURN - EVT_END + IfEq(MF_MachineShaking, TRUE) + Return + EndIf + Set(MF_MachineShaking, TRUE) + Set(LVarF, 0) + Loop(12) + Call(RandInt, 80, LVar0) + Sub(LVar0, 40) + Call(RandInt, 50, LVar1) + Call(RandInt, 50, LVar2) + Sub(LVar2, 25) + PlayEffect(EFFECT_00, LVar0, LVar1, LVar2, 5, 10, 1, 1) + Add(LVarF, 1) + Call(N(CosInterpMinMax), LVarF, LVarE, Float(1.0), Float(1.093), 2, 0, 0) + Call(N(CosInterpMinMax), LVarF, LVarD, Float(1.093), Float(1.0), 2, 0, 0) + SetF(LVar0, LVarE) + SetF(LVar1, LVarD) + SetF(LVar2, LVarE) + IfEq(GB_FLO18_MachineDamage_Left, 0) + Call(ScaleModel, MODEL_o115, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o116, LVar0, LVar1, LVar2) + EndIf + IfEq(GB_FLO18_MachineDamage_Right, 0) + Call(ScaleModel, MODEL_o117, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o118, LVar0, LVar1, LVar2) + EndIf + IfLe(GB_FLO18_MachineDamage_Left, 1) + Call(ScaleModel, MODEL_o119, LVar0, LVar1, LVar2) + EndIf + IfLe(GB_FLO18_MachineDamage_Left, 2) + IfLe(GB_FLO18_MachineDamage_Right, 1) + Call(ScaleModel, MODEL_o120, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o121, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o122, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o123, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o124, LVar0, LVar1, LVar2) + EndIf + EndIf + Call(ScaleModel, MODEL_o113, LVar0, LVar1, LVar2) + IfLe(GB_FLO18_MachineDamage_Left, 2) + IfLe(GB_FLO18_MachineDamage_Right, 2) + Call(ScaleModel, MODEL_o100, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o99, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o125, LVar0, LVar1, LVar2) + EndIf + EndIf + Call(ScaleModel, MODEL_o92, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o93, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o94, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o95, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o91, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o114, LVar0, LVar1, LVar2) + SubF(LVar0, Float(1.046)) + MulF(LVar0, Float(100.0)) + IfEq(GB_FLO18_MachineDamage_Left, 0) + Call(RotateModel, MODEL_o115, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o116, LVar0, 0, 0, 1) + EndIf + IfEq(GB_FLO18_MachineDamage_Right, 0) + Call(RotateModel, MODEL_o117, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o118, LVar0, 0, 0, 1) + EndIf + IfLe(GB_FLO18_MachineDamage_Left, 1) + Call(RotateModel, MODEL_o119, LVar0, 0, 0, 1) + EndIf + IfLe(GB_FLO18_MachineDamage_Left, 2) + IfLe(GB_FLO18_MachineDamage_Right, 1) + Call(RotateModel, MODEL_o120, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o121, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o122, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o123, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o124, LVar0, 0, 0, 1) + EndIf + EndIf + Call(RotateModel, MODEL_o113, LVar0, 0, 0, 1) + IfLe(GB_FLO18_MachineDamage_Left, 2) + IfLe(GB_FLO18_MachineDamage_Right, 2) + Call(RotateModel, MODEL_o100, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o99, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o125, LVar0, 0, 0, 1) + EndIf + EndIf + Call(RotateModel, MODEL_o92, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o93, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o94, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o95, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o91, LVar0, 0, 0, 1) + Call(RotateModel, MODEL_o114, LVar0, 0, 0, 1) + Wait(1) + EndLoop + SetF(LVar0, 1) + SetF(LVar1, 1) + SetF(LVar2, 1) + IfEq(GB_FLO18_MachineDamage_Left, 0) + Call(ScaleModel, MODEL_o115, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o116, LVar0, LVar1, LVar2) + EndIf + IfEq(GB_FLO18_MachineDamage_Right, 0) + Call(ScaleModel, MODEL_o117, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o118, LVar0, LVar1, LVar2) + EndIf + IfLe(GB_FLO18_MachineDamage_Left, 1) + Call(ScaleModel, MODEL_o119, LVar0, LVar1, LVar2) + EndIf + IfLe(GB_FLO18_MachineDamage_Left, 2) + IfLe(GB_FLO18_MachineDamage_Right, 1) + Call(ScaleModel, MODEL_o120, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o121, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o122, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o123, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o124, LVar0, LVar1, LVar2) + EndIf + EndIf + Call(ScaleModel, MODEL_o113, LVar0, LVar1, LVar2) + IfLe(GB_FLO18_MachineDamage_Left, 2) + IfLe(GB_FLO18_MachineDamage_Right, 2) + Call(ScaleModel, MODEL_o100, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o99, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o125, LVar0, LVar1, LVar2) + EndIf + EndIf + Call(ScaleModel, MODEL_o92, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o93, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o94, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o95, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o91, LVar0, LVar1, LVar2) + Call(ScaleModel, MODEL_o114, LVar0, LVar1, LVar2) + Wait(1) + Set(MF_MachineShaking, FALSE) + Return + End }; EvtScript N(EVS_DamagedLeftOnce) = { - EVT_SETF(LVar0, 0) - EVT_SETF(LVar1, 0) - EVT_SETF(LVar2, 0) - EVT_SETF(LVar3, EVT_FLOAT(-1.0)) - EVT_SETF(LVar4, EVT_FLOAT(0.0)) - EVT_SETF(LVar5, EVT_FLOAT(3.0)) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o130, SOUND_PUFF_PUFF_PART_BREAKS, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_LOOP(300) - EVT_ADDF(LVar4, EVT_FLOAT(-0.5)) - EVT_ADDF(LVar5, EVT_FLOAT(0.093)) - EVT_ADDF(LVar0, LVar3) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_IF_LT(LVar1, -10) - EVT_SETF(LVar1, EVT_FLOAT(-10.0)) - EVT_SETF(LVar3, EVT_FLOAT(0.0)) - EVT_SETF(LVar4, EVT_FLOAT(0.0)) - EVT_IF_GE(LVar2, 80) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(TranslateModel, MODEL_o115, -78, 19, 2) - EVT_CALL(TranslateModel, MODEL_o116, -78, 19, 2) - EVT_CALL(TranslateModel, MODEL_o115, LVar0, LVar1, 0) - EVT_CALL(TranslateModel, MODEL_o116, LVar0, LVar1, 0) - EVT_CALL(RotateModel, MODEL_o115, LVar2, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o116, LVar2, 0, 0, 1) - EVT_CALL(TranslateModel, MODEL_o115, 78, -19, -2) - EVT_CALL(TranslateModel, MODEL_o116, 78, -19, -2) - EVT_WAIT(1) -EVT_END_LOOP -EVT_LABEL(0) -EVT_WAIT(30) -EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o130, COLLIDER_FLAGS_UPPER_MASK) -EVT_RETURN -EVT_END + SetF(LVar0, 0) + SetF(LVar1, 0) + SetF(LVar2, 0) + SetF(LVar3, Float(-1.0)) + SetF(LVar4, Float(0.0)) + SetF(LVar5, Float(3.0)) + Thread + Wait(10) + Call(PlaySoundAtCollider, COLLIDER_o130, SOUND_PUFF_PUFF_PART_BREAKS, SOUND_SPACE_DEFAULT) + EndThread + Loop(300) + AddF(LVar4, Float(-0.5)) + AddF(LVar5, Float(0.093)) + AddF(LVar0, LVar3) + AddF(LVar1, LVar4) + AddF(LVar2, LVar5) + IfLt(LVar1, -10) + SetF(LVar1, Float(-10.0)) + SetF(LVar3, Float(0.0)) + SetF(LVar4, Float(0.0)) + IfGe(LVar2, 80) + Goto(0) + EndIf + EndIf + EndIf + Call(TranslateModel, MODEL_o115, -78, 19, 2) + Call(TranslateModel, MODEL_o116, -78, 19, 2) + Call(TranslateModel, MODEL_o115, LVar0, LVar1, 0) + Call(TranslateModel, MODEL_o116, LVar0, LVar1, 0) + Call(RotateModel, MODEL_o115, LVar2, 0, 0, 1) + Call(RotateModel, MODEL_o116, LVar2, 0, 0, 1) + Call(TranslateModel, MODEL_o115, 78, -19, -2) + Call(TranslateModel, MODEL_o116, 78, -19, -2) + Wait(1) +EndLoop +Label(0) +Wait(30) +Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o130, COLLIDER_FLAGS_UPPER_MASK) +Return +End }; EvtScript N(EVS_DamagedRightOnce) = { - EVT_SETF(LVar0, 0) - EVT_SETF(LVar1, 0) - EVT_SETF(LVar2, 0) - EVT_SETF(LVar3, EVT_FLOAT(0.0)) - EVT_SETF(LVar4, EVT_FLOAT(0.0)) - EVT_SETF(LVar5, EVT_FLOAT(-5.0)) - EVT_THREAD - EVT_WAIT(12) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o175, SOUND_PUFF_PUFF_PANEL_BREAKS, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_LOOP(300) - EVT_ADDF(LVar4, EVT_FLOAT(-0.5)) - EVT_ADDF(LVar0, LVar3) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_IF_LT(LVar2, -45) - EVT_SET(LVar5, 5) - EVT_END_IF - EVT_IF_GT(LVar2, 0) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 5) - EVT_END_IF - EVT_IF_LT(LVar1, -25) - EVT_SET(LVar4, 0) - EVT_SET(LVar1, -25) - EVT_END_IF - EVT_IF_GT(LVar0, 90) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(TranslateModel, MODEL_o117, 50, 28, 27) - EVT_CALL(TranslateModel, MODEL_o118, 50, 28, 27) - EVT_CALL(TranslateModel, MODEL_o117, 0, LVar1, 1) - EVT_CALL(TranslateModel, MODEL_o118, 0, LVar1, 1) - EVT_CALL(RotateModel, MODEL_o117, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o118, LVar0, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o117, LVar2, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_o118, LVar2, 0, 0, 1) - EVT_CALL(TranslateModel, MODEL_o117, -50, -28, -27) - EVT_CALL(TranslateModel, MODEL_o118, -50, -28, -27) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LABEL(0) - EVT_WAIT(30) - EVT_RETURN - EVT_END + SetF(LVar0, 0) + SetF(LVar1, 0) + SetF(LVar2, 0) + SetF(LVar3, Float(0.0)) + SetF(LVar4, Float(0.0)) + SetF(LVar5, Float(-5.0)) + Thread + Wait(12) + Call(PlaySoundAtCollider, COLLIDER_o175, SOUND_PUFF_PUFF_PANEL_BREAKS, SOUND_SPACE_DEFAULT) + EndThread + Loop(300) + AddF(LVar4, Float(-0.5)) + AddF(LVar0, LVar3) + AddF(LVar1, LVar4) + AddF(LVar2, LVar5) + IfLt(LVar2, -45) + Set(LVar5, 5) + EndIf + IfGt(LVar2, 0) + Set(LVar2, 0) + Set(LVar3, 5) + EndIf + IfLt(LVar1, -25) + Set(LVar4, 0) + Set(LVar1, -25) + EndIf + IfGt(LVar0, 90) + Goto(0) + EndIf + Call(TranslateModel, MODEL_o117, 50, 28, 27) + Call(TranslateModel, MODEL_o118, 50, 28, 27) + Call(TranslateModel, MODEL_o117, 0, LVar1, 1) + Call(TranslateModel, MODEL_o118, 0, LVar1, 1) + Call(RotateModel, MODEL_o117, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o118, LVar0, 1, 0, 0) + Call(RotateModel, MODEL_o117, LVar2, 0, 0, 1) + Call(RotateModel, MODEL_o118, LVar2, 0, 0, 1) + Call(TranslateModel, MODEL_o117, -50, -28, -27) + Call(TranslateModel, MODEL_o118, -50, -28, -27) + Wait(1) + EndLoop + Label(0) + Wait(30) + Return + End }; EvtScript N(EVS_DamagedLeftTwice) = { - EVT_SETF(LVar2, 0) - EVT_SETF(LVar1, 0) - EVT_SETF(LVar0, 0) - EVT_SETF(LVar5, EVT_FLOAT(0.0)) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o174, SOUND_PUFF_PUFF_PANEL_BREAKS, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_LOOP(300) - EVT_ADDF(LVar5, EVT_FLOAT(0.5)) - EVT_ADDF(LVar2, LVar5) - EVT_IF_GE(LVar2, 80) - EVT_SETF(LVar2, 80) - EVT_MULF(LVar5, EVT_FLOAT(-0.5)) - EVT_IF_EQ(LVar5, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_CALL(TranslateModel, MODEL_o119, -55, 5, 16) - EVT_CALL(TranslateModel, MODEL_o119, LVar0, LVar1, 0) - EVT_CALL(RotateModel, MODEL_o119, LVar2, 0, 0, 1) - EVT_CALL(TranslateModel, MODEL_o119, 55, -5, -16) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LABEL(0) - EVT_WAIT(30) - EVT_RETURN - EVT_END + SetF(LVar2, 0) + SetF(LVar1, 0) + SetF(LVar0, 0) + SetF(LVar5, Float(0.0)) + Thread + Wait(15) + Call(PlaySoundAtCollider, COLLIDER_o174, SOUND_PUFF_PUFF_PANEL_BREAKS, SOUND_SPACE_DEFAULT) + EndThread + Loop(300) + AddF(LVar5, Float(0.5)) + AddF(LVar2, LVar5) + IfGe(LVar2, 80) + SetF(LVar2, 80) + MulF(LVar5, Float(-0.5)) + IfEq(LVar5, 0) + Goto(0) + EndIf + EndIf + Call(TranslateModel, MODEL_o119, -55, 5, 16) + Call(TranslateModel, MODEL_o119, LVar0, LVar1, 0) + Call(RotateModel, MODEL_o119, LVar2, 0, 0, 1) + Call(TranslateModel, MODEL_o119, 55, -5, -16) + Wait(1) + EndLoop + Label(0) + Wait(30) + Return + End }; EvtScript N(EVS_DamagedRightTwice) = { - EVT_SETF(LVar2, 0) - EVT_SETF(LVar1, 0) - EVT_SETF(LVar0, 0) - EVT_SETF(LVar5, EVT_FLOAT(0.0)) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o127, SOUND_PUFF_PUFF_PANEL_BREAKS, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_LOOP(300) - EVT_ADDF(LVar5, EVT_FLOAT(0.5)) - EVT_ADDF(LVar2, LVar5) - EVT_IF_GE(LVar2, 80) - EVT_SETF(LVar2, 80) - EVT_MULF(LVar5, EVT_FLOAT(-0.5)) - EVT_IF_EQ(LVar5, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_CALL(TranslateModel, MODEL_o122, 60, 0, 16) - EVT_CALL(RotateModel, MODEL_o122, LVar2, 0, 0, -1) - EVT_CALL(TranslateModel, MODEL_o122, -60, 0, -16) - EVT_CALL(TranslateModel, MODEL_o120, 0, 0, 27) - EVT_CALL(TranslateModel, MODEL_o121, 0, 0, 27) - EVT_CALL(RotateModel, MODEL_o120, LVar2, 1, 0, 0) - EVT_CALL(RotateModel, MODEL_o121, LVar2, 1, 0, 0) - EVT_CALL(TranslateModel, MODEL_o120, 0, 0, -27) - EVT_CALL(TranslateModel, MODEL_o121, 0, 0, -27) - EVT_CALL(TranslateModel, MODEL_o123, 0, 0, -41) - EVT_CALL(TranslateModel, MODEL_o124, 0, 0, -41) - EVT_CALL(RotateModel, MODEL_o123, LVar2, -1, 0, 0) - EVT_CALL(RotateModel, MODEL_o124, LVar2, -1, 0, 0) - EVT_CALL(TranslateModel, MODEL_o123, 0, 0, 41) - EVT_CALL(TranslateModel, MODEL_o124, 0, 0, 41) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LABEL(0) - EVT_WAIT(30) - EVT_RETURN - EVT_END + SetF(LVar2, 0) + SetF(LVar1, 0) + SetF(LVar0, 0) + SetF(LVar5, Float(0.0)) + Thread + Wait(15) + Call(PlaySoundAtCollider, COLLIDER_o127, SOUND_PUFF_PUFF_PANEL_BREAKS, SOUND_SPACE_DEFAULT) + EndThread + Loop(300) + AddF(LVar5, Float(0.5)) + AddF(LVar2, LVar5) + IfGe(LVar2, 80) + SetF(LVar2, 80) + MulF(LVar5, Float(-0.5)) + IfEq(LVar5, 0) + Goto(0) + EndIf + EndIf + Call(TranslateModel, MODEL_o122, 60, 0, 16) + Call(RotateModel, MODEL_o122, LVar2, 0, 0, -1) + Call(TranslateModel, MODEL_o122, -60, 0, -16) + Call(TranslateModel, MODEL_o120, 0, 0, 27) + Call(TranslateModel, MODEL_o121, 0, 0, 27) + Call(RotateModel, MODEL_o120, LVar2, 1, 0, 0) + Call(RotateModel, MODEL_o121, LVar2, 1, 0, 0) + Call(TranslateModel, MODEL_o120, 0, 0, -27) + Call(TranslateModel, MODEL_o121, 0, 0, -27) + Call(TranslateModel, MODEL_o123, 0, 0, -41) + Call(TranslateModel, MODEL_o124, 0, 0, -41) + Call(RotateModel, MODEL_o123, LVar2, -1, 0, 0) + Call(RotateModel, MODEL_o124, LVar2, -1, 0, 0) + Call(TranslateModel, MODEL_o123, 0, 0, 41) + Call(TranslateModel, MODEL_o124, 0, 0, 41) + Wait(1) + EndLoop + Label(0) + Wait(30) + Return + End }; EvtScript N(EVS_BreakSmokestack) = { - EVT_SETF(LVar0, 0) - EVT_SETF(LVar1, 0) - EVT_SETF(LVar2, 0) - EVT_SETF(LVar3, EVT_FLOAT(-1.0)) - EVT_SETF(LVar4, EVT_FLOAT(0.0)) - EVT_SETF(LVar5, EVT_FLOAT(3.0)) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o131, SOUND_PUFF_PUFF_PART_BREAKS, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_LOOP(300) - EVT_ADDF(LVar4, EVT_FLOAT(-0.5)) - EVT_ADDF(LVar5, EVT_FLOAT(0.093)) - EVT_ADDF(LVar0, LVar3) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_IF_LT(LVar1, -25) - EVT_SETF(LVar1, EVT_FLOAT(-25.0)) - EVT_SETF(LVar3, EVT_FLOAT(0.0)) - EVT_SETF(LVar4, EVT_FLOAT(0.0)) - EVT_IF_GE(LVar2, 80) - EVT_GOTO(0) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_CALL(TranslateModel, MODEL_o100, 124, 17, 3) - EVT_CALL(TranslateModel, MODEL_o100, LVar0, LVar1, 0) - EVT_CALL(RotateModel, MODEL_o100, LVar2, 0, 0, -1) - EVT_CALL(TranslateModel, MODEL_o100, -124, -17, -3) - EVT_WAIT(1) -EVT_END_LOOP -EVT_LABEL(0) -EVT_RETURN -EVT_END + SetF(LVar0, 0) + SetF(LVar1, 0) + SetF(LVar2, 0) + SetF(LVar3, Float(-1.0)) + SetF(LVar4, Float(0.0)) + SetF(LVar5, Float(3.0)) + Thread + Wait(15) + Call(PlaySoundAtCollider, COLLIDER_o131, SOUND_PUFF_PUFF_PART_BREAKS, SOUND_SPACE_DEFAULT) + EndThread + Loop(300) + AddF(LVar4, Float(-0.5)) + AddF(LVar5, Float(0.093)) + AddF(LVar0, LVar3) + AddF(LVar1, LVar4) + AddF(LVar2, LVar5) + IfLt(LVar1, -25) + SetF(LVar1, Float(-25.0)) + SetF(LVar3, Float(0.0)) + SetF(LVar4, Float(0.0)) + IfGe(LVar2, 80) + Goto(0) + EndIf + EndIf + EndIf + Call(TranslateModel, MODEL_o100, 124, 17, 3) + Call(TranslateModel, MODEL_o100, LVar0, LVar1, 0) + Call(RotateModel, MODEL_o100, LVar2, 0, 0, -1) + Call(TranslateModel, MODEL_o100, -124, -17, -3) + Wait(1) +EndLoop +Label(0) +Return +End }; EvtScript N(EVS_BreakAntenna) = { - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o131, COLLIDER_FLAGS_UPPER_MASK) - EVT_SETF(LVar0, 0) - EVT_SETF(LVar1, 0) - EVT_SETF(LVar2, 0) - EVT_SETF(LVar3, EVT_FLOAT(3.0)) - EVT_SETF(LVar4, EVT_FLOAT(1.0)) - EVT_SETF(LVar5, EVT_FLOAT(5.0)) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o126, SOUND_PUFF_PUFF_PART_BREAKS, SOUND_SPACE_DEFAULT) - EVT_END_THREAD - EVT_LOOP(300) - EVT_ADDF(LVar4, EVT_FLOAT(-0.5)) - EVT_ADDF(LVar0, LVar3) - EVT_ADDF(LVar1, LVar4) - EVT_ADDF(LVar2, LVar5) - EVT_IF_LE(LVar1, -40) - EVT_SETF(LVar1, -40) - EVT_MULF(LVar4, EVT_FLOAT(-0.5)) - EVT_IF_LE(LVar4, 1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_IF - EVT_IF_GE(LVar2, 60) - EVT_SETF(LVar2, 60) - EVT_SETF(LVar5, 0) - EVT_END_IF - EVT_CALL(TranslateModel, MODEL_o99, -34, 50, 10) - EVT_CALL(TranslateModel, MODEL_o125, -34, 50, 10) - EVT_CALL(TranslateModel, MODEL_o99, 0, LVar1, LVar0) - EVT_CALL(RotateModel, MODEL_o99, LVar2, 0, 0, 1) - EVT_CALL(TranslateModel, MODEL_o125, 0, LVar1, LVar0) - EVT_CALL(RotateModel, MODEL_o125, LVar2, 0, 0, 1) - EVT_CALL(TranslateModel, MODEL_o99, 34, -50, -10) - EVT_CALL(TranslateModel, MODEL_o125, 34, -50, -10) - EVT_WAIT(1) - EVT_END_LOOP - EVT_LABEL(1) - EVT_WAIT(30) - EVT_RETURN - EVT_END + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o131, COLLIDER_FLAGS_UPPER_MASK) + SetF(LVar0, 0) + SetF(LVar1, 0) + SetF(LVar2, 0) + SetF(LVar3, Float(3.0)) + SetF(LVar4, Float(1.0)) + SetF(LVar5, Float(5.0)) + Thread + Wait(15) + Call(PlaySoundAtCollider, COLLIDER_o126, SOUND_PUFF_PUFF_PART_BREAKS, SOUND_SPACE_DEFAULT) + EndThread + Loop(300) + AddF(LVar4, Float(-0.5)) + AddF(LVar0, LVar3) + AddF(LVar1, LVar4) + AddF(LVar2, LVar5) + IfLe(LVar1, -40) + SetF(LVar1, -40) + MulF(LVar4, Float(-0.5)) + IfLe(LVar4, 1) + Goto(1) + EndIf + EndIf + IfGe(LVar2, 60) + SetF(LVar2, 60) + SetF(LVar5, 0) + EndIf + Call(TranslateModel, MODEL_o99, -34, 50, 10) + Call(TranslateModel, MODEL_o125, -34, 50, 10) + Call(TranslateModel, MODEL_o99, 0, LVar1, LVar0) + Call(RotateModel, MODEL_o99, LVar2, 0, 0, 1) + Call(TranslateModel, MODEL_o125, 0, LVar1, LVar0) + Call(RotateModel, MODEL_o125, LVar2, 0, 0, 1) + Call(TranslateModel, MODEL_o99, 34, -50, -10) + Call(TranslateModel, MODEL_o125, 34, -50, -10) + Wait(1) + EndLoop + Label(1) + Wait(30) + Return + End }; Vec3i N(SmokeBurstPositions)[] = { @@ -502,128 +502,128 @@ Vec3i N(SmokeBurstPositions)[] = { EvtScript N(EVS_DamageMachine) = { #define LABEL_DONE 0 - EVT_DEBUG_PRINT_VAR(LVar0) - EVT_SET(LVarA, LVar0) // in: damage part - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, -210) - EVT_RETURN - EVT_END_IF - EVT_CALL(PlaySound, SOUND_PUFF_PUFF_SMASH) - EVT_EXEC_WAIT(N(EVS_ShakeMachine)) - EVT_DEBUG_PRINT_VAR(LVarA) - EVT_SET(LVar0, LVarA) - EVT_IF_LT(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) - EVT_SET(MF_HitGuardedMachine, TRUE) - EVT_RETURN - EVT_END_IF - EVT_DEBUG_PRINT_VAR(MF_MachineBeingDamaged) - EVT_IF_EQ(MF_MachineBeingDamaged, TRUE) - EVT_RETURN - EVT_END_IF + DebugPrintVar(LVar0) + Set(LVarA, LVar0) // in: damage part + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, -210) + Return + EndIf + Call(PlaySound, SOUND_PUFF_PUFF_SMASH) + ExecWait(N(EVS_ShakeMachine)) + DebugPrintVar(LVarA) + Set(LVar0, LVarA) + IfLt(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) + Set(MF_HitGuardedMachine, TRUE) + Return + EndIf + DebugPrintVar(MF_MachineBeingDamaged) + IfEq(MF_MachineBeingDamaged, TRUE) + Return + EndIf // check damage type - EVT_SET(MF_MachineBeingDamaged, TRUE) - EVT_IF_GT(LVar0, DAMAGE_PART_PROTRUSTIONS) - EVT_GOTO(LABEL_DONE) - EVT_END_IF - EVT_IF_EQ(LVar0, DAMAGE_PART_PROTRUSTIONS) - EVT_GOTO(11) - EVT_END_IF - EVT_IF_EQ(LVar0, DAMAGE_PART_LEFT_SIDE) - EVT_LABEL(11) - EVT_IF_EQ(GB_FLO18_MachineDamage_Left, 0) - EVT_SET(GB_FLO18_MachineDamage_Left, 1) - EVT_EXEC(N(EVS_DamagedLeftOnce)) - EVT_GOTO(LABEL_DONE) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVar0, DAMAGE_PART_RIGHT_SIDE) - EVT_IF_EQ(GB_FLO18_MachineDamage_Right, 0) - EVT_SET(GB_FLO18_MachineDamage_Right, 1) - EVT_EXEC(N(EVS_DamagedRightOnce)) - EVT_GOTO(LABEL_DONE) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVar0, DAMAGE_PART_LEFT_SIDE) - EVT_IF_EQ(GB_FLO18_MachineDamage_Left, 1) - EVT_SET(GB_FLO18_MachineDamage_Left, 2) - EVT_EXEC(N(EVS_DamagedLeftTwice)) - EVT_GOTO(LABEL_DONE) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(GB_FLO18_MachineDamage_Left, 2) - EVT_IF_EQ(GB_FLO18_MachineDamage_Right, 1) - EVT_SET(GB_FLO18_MachineDamage_Right, 2) - EVT_EXEC(N(EVS_DamagedRightTwice)) - EVT_GOTO(LABEL_DONE) - EVT_END_IF - EVT_END_IF + Set(MF_MachineBeingDamaged, TRUE) + IfGt(LVar0, DAMAGE_PART_PROTRUSTIONS) + Goto(LABEL_DONE) + EndIf + IfEq(LVar0, DAMAGE_PART_PROTRUSTIONS) + Goto(11) + EndIf + IfEq(LVar0, DAMAGE_PART_LEFT_SIDE) + Label(11) + IfEq(GB_FLO18_MachineDamage_Left, 0) + Set(GB_FLO18_MachineDamage_Left, 1) + Exec(N(EVS_DamagedLeftOnce)) + Goto(LABEL_DONE) + EndIf + EndIf + IfEq(LVar0, DAMAGE_PART_RIGHT_SIDE) + IfEq(GB_FLO18_MachineDamage_Right, 0) + Set(GB_FLO18_MachineDamage_Right, 1) + Exec(N(EVS_DamagedRightOnce)) + Goto(LABEL_DONE) + EndIf + EndIf + IfEq(LVar0, DAMAGE_PART_LEFT_SIDE) + IfEq(GB_FLO18_MachineDamage_Left, 1) + Set(GB_FLO18_MachineDamage_Left, 2) + Exec(N(EVS_DamagedLeftTwice)) + Goto(LABEL_DONE) + EndIf + EndIf + IfEq(GB_FLO18_MachineDamage_Left, 2) + IfEq(GB_FLO18_MachineDamage_Right, 1) + Set(GB_FLO18_MachineDamage_Right, 2) + Exec(N(EVS_DamagedRightTwice)) + Goto(LABEL_DONE) + EndIf + EndIf // check if machine is fully broken (2 damage to each side) - EVT_IF_EQ(GB_FLO18_MachineDamage_Left, 2) - EVT_IF_EQ(GB_FLO18_MachineDamage_Right, 2) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 40, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 40, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_SET(GB_FLO18_MachineDamage_Right, 3) - EVT_EXEC_WAIT(N(EVS_ShakeMachine)) - EVT_EXEC_WAIT(N(EVS_ShakeMachine)) - EVT_EXEC_WAIT(N(EVS_ShakeMachine)) - EVT_WAIT(30) - EVT_CALL(GetModelCenter, MODEL_o113) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, 50, LVar2, 100, 20, 0, 30) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, 30, LVar2, 120, 20, 0, 30) - EVT_PLAY_EFFECT(EFFECT_SMOKE_IMPACT, 0, LVar0, 10, LVar2, 100, 20, 0, 30) - EVT_WAIT(15) - EVT_THREAD - EVT_SET(LVar3, 6) - EVT_USE_BUF(EVT_PTR(N(SmokeBurstPositions))) - EVT_LOOP(ARRAY_COUNT(N(SmokeBurstPositions))) - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAt, SOUND_FLO_PUFF_PUFF_SMOKE_BURST, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, 1, 6) - EVT_WAIT(2) - EVT_ADD(LVar1, 5) - EVT_CALL(PlaySoundAt, SOUND_FLO_PUFF_PUFF_SMOKE_BURST, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, 2, 15) - EVT_WAIT(LVar3) - EVT_ADD(LVar3, 1) - EVT_END_LOOP - EVT_SETF(LVar4, EVT_FLOAT(2.0)) - EVT_LOOP(2) - EVT_USE_BUF(EVT_PTR(N(SmokeBurstPositions))) - EVT_LOOP(ARRAY_COUNT(N(SmokeBurstPositions))) - EVT_BUF_READ3(LVar0, LVar1, LVar2) - EVT_CALL(PlaySoundAt, SOUND_FLO_PUFF_PUFF_SMOKE_BURST, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, 1, 25) - EVT_WAIT(LVar3) - EVT_ADD(LVar3, LVar4) - EVT_ADDF(LVar4, EVT_FLOAT(0.5)) - EVT_END_LOOP - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(PlaySoundAt, SOUND_FLO_PUFF_PUFF_EXPLODE, SOUND_SPACE_DEFAULT, 70, 40, 10) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 0, 70, 40, 10, EVT_FLOAT(3.0), 30) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(1.0)) - EVT_CALL(PlaySoundAt, SOUND_FLO_PUFF_PUFF_EXPLODE, SOUND_SPACE_DEFAULT, 0, 30, 30) - EVT_PLAY_EFFECT(EFFECT_RING_BLAST, 0, 0, 30, 30, EVT_FLOAT(4.0), 40) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(2.0)) - EVT_EXEC_WAIT(N(EVS_BreakSmokestack)) - EVT_CALL(PlaySoundAtCollider, COLLIDER_o126, SOUND_LRAW_PUFF_PUFF_MACHINE | SOUND_ID_TRIGGER_CHANGE_SOUND, SOUND_SPACE_DEFAULT) - EVT_CALL(FadeOutMusic, 0, 1000) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_WAIT(30) - EVT_EXEC_WAIT(N(EVS_BreakAntenna)) - EVT_SET(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(GotoMap, EVT_PTR("flo_15"), flo_15_ENTRY_1) - EVT_WAIT(70) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_LABEL(LABEL_DONE) - EVT_SET(MF_MachineBeingDamaged, FALSE) - EVT_RETURN - EVT_END + IfEq(GB_FLO18_MachineDamage_Left, 2) + IfEq(GB_FLO18_MachineDamage_Right, 2) + Call(DisablePlayerInput, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, 40, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 40, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Set(GB_FLO18_MachineDamage_Right, 3) + ExecWait(N(EVS_ShakeMachine)) + ExecWait(N(EVS_ShakeMachine)) + ExecWait(N(EVS_ShakeMachine)) + Wait(30) + Call(GetModelCenter, MODEL_o113) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, 50, LVar2, 100, 20, 0, 30) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, 30, LVar2, 120, 20, 0, 30) + PlayEffect(EFFECT_SMOKE_IMPACT, 0, LVar0, 10, LVar2, 100, 20, 0, 30) + Wait(15) + Thread + Set(LVar3, 6) + UseBuf(Ref(N(SmokeBurstPositions))) + Loop(ARRAY_COUNT(N(SmokeBurstPositions))) + BufRead3(LVar0, LVar1, LVar2) + Call(PlaySoundAt, SOUND_FLO_PUFF_PUFF_SMOKE_BURST, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, 1, 6) + Wait(2) + Add(LVar1, 5) + Call(PlaySoundAt, SOUND_FLO_PUFF_PUFF_SMOKE_BURST, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, 2, 15) + Wait(LVar3) + Add(LVar3, 1) + EndLoop + SetF(LVar4, Float(2.0)) + Loop(2) + UseBuf(Ref(N(SmokeBurstPositions))) + Loop(ARRAY_COUNT(N(SmokeBurstPositions))) + BufRead3(LVar0, LVar1, LVar2) + Call(PlaySoundAt, SOUND_FLO_PUFF_PUFF_SMOKE_BURST, SOUND_SPACE_DEFAULT, LVar0, LVar1, LVar2) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, 1, 25) + Wait(LVar3) + Add(LVar3, LVar4) + AddF(LVar4, Float(0.5)) + EndLoop + EndLoop + EndThread + Call(PlaySoundAt, SOUND_FLO_PUFF_PUFF_EXPLODE, SOUND_SPACE_DEFAULT, 70, 40, 10) + PlayEffect(EFFECT_RING_BLAST, 0, 70, 40, 10, Float(3.0), 30) + Call(ShakeCam, CAM_DEFAULT, 0, 20, Float(1.0)) + Call(PlaySoundAt, SOUND_FLO_PUFF_PUFF_EXPLODE, SOUND_SPACE_DEFAULT, 0, 30, 30) + PlayEffect(EFFECT_RING_BLAST, 0, 0, 30, 30, Float(4.0), 40) + Call(ShakeCam, CAM_DEFAULT, 0, 20, Float(2.0)) + ExecWait(N(EVS_BreakSmokestack)) + Call(PlaySoundAtCollider, COLLIDER_o126, SOUND_LRAW_PUFF_PUFF_MACHINE | SOUND_ID_TRIGGER_CHANGE_SOUND, SOUND_SPACE_DEFAULT) + Call(FadeOutMusic, 0, 1000) + Call(DisablePlayerPhysics, TRUE) + Wait(30) + ExecWait(N(EVS_BreakAntenna)) + Set(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(GotoMap, Ref("flo_15"), flo_15_ENTRY_1) + Wait(70) + Return + EndIf + EndIf + Label(LABEL_DONE) + Set(MF_MachineBeingDamaged, FALSE) + Return + End }; BombTrigger N(Machine_BombTrigger_01) = { @@ -647,124 +647,124 @@ BombTrigger N(Machine_BombTrigger_04) = { }; EvtScript N(EVS_SetupMachine) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(EnableModel, MODEL_o101, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o130, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_o115, FALSE) - EVT_CALL(EnableModel, MODEL_o116, FALSE) - EVT_CALL(EnableModel, MODEL_o117, FALSE) - EVT_CALL(EnableModel, MODEL_o118, FALSE) - EVT_CALL(EnableModel, MODEL_o119, FALSE) - EVT_CALL(EnableModel, MODEL_o120, FALSE) - EVT_CALL(EnableModel, MODEL_o121, FALSE) - EVT_CALL(EnableModel, MODEL_o122, FALSE) - EVT_CALL(EnableModel, MODEL_o123, FALSE) - EVT_CALL(EnableModel, MODEL_o124, FALSE) - EVT_CALL(EnableModel, MODEL_o100, FALSE) - EVT_CALL(EnableModel, MODEL_o99, FALSE) - EVT_CALL(EnableModel, MODEL_o125, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o131, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END_IF - EVT_EXEC(N(EVS_AnimateMachineLightning)) - EVT_CALL(EnableModel, MODEL_o101, FALSE) - EVT_IF_GE(GB_FLO18_MachineDamage_Left, 1) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o130, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnableModel, MODEL_o115, FALSE) - EVT_CALL(EnableModel, MODEL_o116, FALSE) - EVT_END_IF - EVT_IF_GE(GB_FLO18_MachineDamage_Right, 1) - EVT_CALL(EnableModel, MODEL_o117, FALSE) - EVT_CALL(EnableModel, MODEL_o118, FALSE) - EVT_END_IF - EVT_IF_GE(GB_FLO18_MachineDamage_Left, 2) - EVT_CALL(EnableModel, MODEL_o119, FALSE) - EVT_END_IF - EVT_IF_GE(GB_FLO18_MachineDamage_Right, 2) - EVT_CALL(EnableModel, MODEL_o120, FALSE) - EVT_CALL(EnableModel, MODEL_o121, FALSE) - EVT_CALL(EnableModel, MODEL_o122, FALSE) - EVT_CALL(EnableModel, MODEL_o123, FALSE) - EVT_CALL(EnableModel, MODEL_o124, FALSE) - EVT_END_IF - EVT_IF_GE(GB_FLO18_MachineDamage_Right, 3) - EVT_CALL(EnableModel, MODEL_o100, FALSE) - EVT_CALL(EnableModel, MODEL_o99, FALSE) - EVT_CALL(EnableModel, MODEL_o125, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o131, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar0, DAMAGE_PART_LEFT_SIDE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_DamageMachine)), TRIGGER_WALL_HAMMER, COLLIDER_o174, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_DamageMachine)), TRIGGER_POINT_BOMB, EVT_PTR(N(Machine_BombTrigger_01)), 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_DamageMachine)), TRIGGER_POINT_BOMB, EVT_PTR(N(Machine_BombTrigger_02)), 1, 0) - EVT_SET(LVar0, DAMAGE_PART_RIGHT_SIDE) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_DamageMachine)), TRIGGER_WALL_HAMMER, COLLIDER_o127, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_DamageMachine)), TRIGGER_POINT_BOMB, EVT_PTR(N(Machine_BombTrigger_03)), 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_DamageMachine)), TRIGGER_POINT_BOMB, EVT_PTR(N(Machine_BombTrigger_04)), 1, 0) - EVT_SET(LVar0, DAMAGE_PART_LEVER) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_DamageMachine)), TRIGGER_WALL_HAMMER, COLLIDER_o130, 1, 0) - EVT_SET(LVar0, DAMAGE_PART_SMOKE_STACK) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_DamageMachine)), TRIGGER_WALL_HAMMER, COLLIDER_o131, 1, 0) - EVT_SET(LVar0, 0) - EVT_LOOP(16) - EVT_SET(LVar1, LVar0) - EVT_ADD(LVar1, CLONED_MODEL(0)) - EVT_ADD(LVar0, 1) - EVT_CALL(CloneModel, MODEL_o101, LVar1) - EVT_CALL(EnableModel, LVar1, FALSE) - EVT_END_LOOP - EVT_EXEC(N(EVS_ManageSmoke)) - EVT_CALL(EnableTexPanning, MODEL_o92, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o93, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o94, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o95, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o91, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o99, TRUE) - EVT_THREAD - EVT_SETF(LVarE, EVT_FLOAT(1.0)) - EVT_LABEL(0) - EVT_IF_GE(GB_FLO18_MachineDamage_Right, 3) - EVT_MULF(LVarE, EVT_FLOAT(0.953)) - EVT_END_IF - EVT_ADDF(LVarF, LVarE) - EVT_IF_EQ(LVarF, 1080) - EVT_SETF(LVarF, 0) - EVT_END_IF - EVT_SET(LVar0, LVarF) - EVT_DIV(LVar0, 9) - EVT_MOD(LVar0, 4) - EVT_MUL(LVar0, 0x4000) - EVT_SET(LVar1, LVarF) - EVT_DIV(LVar1, 4) - EVT_MOD(LVar1, 2) - EVT_MUL(LVar1, 0x4000) - EVT_SET(LVar2, LVarF) - EVT_DIV(LVar2, 5) - EVT_MOD(LVar2, 2) - EVT_MUL(LVar2, 0x4000) - EVT_SET(LVar3, LVarF) - EVT_DIV(LVar3, 6) - EVT_MOD(LVar3, 2) - EVT_MUL(LVar3, 0x4000) - EVT_SET(LVar4, LVarF) - EVT_DIV(LVar4, 2) - EVT_MOD(LVar4, 2) - EVT_MUL(LVar4, 0x8000) - EVT_SET(LVar5, LVarF) - EVT_DIV(LVar5, 8) - EVT_MOD(LVar5, 2) - EVT_MUL(LVar5, 0x4000) - EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, LVar1, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_E, TEX_PANNER_MAIN, LVar2, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_F, TEX_PANNER_MAIN, LVar3, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_B, TEX_PANNER_MAIN, LVar4, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_A, TEX_PANNER_MAIN, LVar5, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_9, TEX_PANNER_MAIN, LVar5, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_THREAD - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(EnableModel, MODEL_o101, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o130, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_o115, FALSE) + Call(EnableModel, MODEL_o116, FALSE) + Call(EnableModel, MODEL_o117, FALSE) + Call(EnableModel, MODEL_o118, FALSE) + Call(EnableModel, MODEL_o119, FALSE) + Call(EnableModel, MODEL_o120, FALSE) + Call(EnableModel, MODEL_o121, FALSE) + Call(EnableModel, MODEL_o122, FALSE) + Call(EnableModel, MODEL_o123, FALSE) + Call(EnableModel, MODEL_o124, FALSE) + Call(EnableModel, MODEL_o100, FALSE) + Call(EnableModel, MODEL_o99, FALSE) + Call(EnableModel, MODEL_o125, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o131, COLLIDER_FLAGS_UPPER_MASK) + Return + EndIf + Exec(N(EVS_AnimateMachineLightning)) + Call(EnableModel, MODEL_o101, FALSE) + IfGe(GB_FLO18_MachineDamage_Left, 1) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o130, COLLIDER_FLAGS_UPPER_MASK) + Call(EnableModel, MODEL_o115, FALSE) + Call(EnableModel, MODEL_o116, FALSE) + EndIf + IfGe(GB_FLO18_MachineDamage_Right, 1) + Call(EnableModel, MODEL_o117, FALSE) + Call(EnableModel, MODEL_o118, FALSE) + EndIf + IfGe(GB_FLO18_MachineDamage_Left, 2) + Call(EnableModel, MODEL_o119, FALSE) + EndIf + IfGe(GB_FLO18_MachineDamage_Right, 2) + Call(EnableModel, MODEL_o120, FALSE) + Call(EnableModel, MODEL_o121, FALSE) + Call(EnableModel, MODEL_o122, FALSE) + Call(EnableModel, MODEL_o123, FALSE) + Call(EnableModel, MODEL_o124, FALSE) + EndIf + IfGe(GB_FLO18_MachineDamage_Right, 3) + Call(EnableModel, MODEL_o100, FALSE) + Call(EnableModel, MODEL_o99, FALSE) + Call(EnableModel, MODEL_o125, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o131, COLLIDER_FLAGS_UPPER_MASK) + Return + EndIf + Set(LVar0, DAMAGE_PART_LEFT_SIDE) + BindTrigger(Ref(N(EVS_DamageMachine)), TRIGGER_WALL_HAMMER, COLLIDER_o174, 1, 0) + BindTrigger(Ref(N(EVS_DamageMachine)), TRIGGER_POINT_BOMB, Ref(N(Machine_BombTrigger_01)), 1, 0) + BindTrigger(Ref(N(EVS_DamageMachine)), TRIGGER_POINT_BOMB, Ref(N(Machine_BombTrigger_02)), 1, 0) + Set(LVar0, DAMAGE_PART_RIGHT_SIDE) + BindTrigger(Ref(N(EVS_DamageMachine)), TRIGGER_WALL_HAMMER, COLLIDER_o127, 1, 0) + BindTrigger(Ref(N(EVS_DamageMachine)), TRIGGER_POINT_BOMB, Ref(N(Machine_BombTrigger_03)), 1, 0) + BindTrigger(Ref(N(EVS_DamageMachine)), TRIGGER_POINT_BOMB, Ref(N(Machine_BombTrigger_04)), 1, 0) + Set(LVar0, DAMAGE_PART_LEVER) + BindTrigger(Ref(N(EVS_DamageMachine)), TRIGGER_WALL_HAMMER, COLLIDER_o130, 1, 0) + Set(LVar0, DAMAGE_PART_SMOKE_STACK) + BindTrigger(Ref(N(EVS_DamageMachine)), TRIGGER_WALL_HAMMER, COLLIDER_o131, 1, 0) + Set(LVar0, 0) + Loop(16) + Set(LVar1, LVar0) + Add(LVar1, CLONED_MODEL(0)) + Add(LVar0, 1) + Call(CloneModel, MODEL_o101, LVar1) + Call(EnableModel, LVar1, FALSE) + EndLoop + Exec(N(EVS_ManageSmoke)) + Call(EnableTexPanning, MODEL_o92, TRUE) + Call(EnableTexPanning, MODEL_o93, TRUE) + Call(EnableTexPanning, MODEL_o94, TRUE) + Call(EnableTexPanning, MODEL_o95, TRUE) + Call(EnableTexPanning, MODEL_o91, TRUE) + Call(EnableTexPanning, MODEL_o99, TRUE) + Thread + SetF(LVarE, Float(1.0)) + Label(0) + IfGe(GB_FLO18_MachineDamage_Right, 3) + MulF(LVarE, Float(0.953)) + EndIf + AddF(LVarF, LVarE) + IfEq(LVarF, 1080) + SetF(LVarF, 0) + EndIf + Set(LVar0, LVarF) + Div(LVar0, 9) + Mod(LVar0, 4) + Mul(LVar0, 0x4000) + Set(LVar1, LVarF) + Div(LVar1, 4) + Mod(LVar1, 2) + Mul(LVar1, 0x4000) + Set(LVar2, LVarF) + Div(LVar2, 5) + Mod(LVar2, 2) + Mul(LVar2, 0x4000) + Set(LVar3, LVarF) + Div(LVar3, 6) + Mod(LVar3, 2) + Mul(LVar3, 0x4000) + Set(LVar4, LVarF) + Div(LVar4, 2) + Mod(LVar4, 2) + Mul(LVar4, 0x8000) + Set(LVar5, LVarF) + Div(LVar5, 8) + Mod(LVar5, 2) + Mul(LVar5, 0x4000) + Call(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, LVar0, 0) + Call(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, LVar1, 0) + Call(SetTexPanOffset, TEX_PANNER_E, TEX_PANNER_MAIN, LVar2, 0) + Call(SetTexPanOffset, TEX_PANNER_F, TEX_PANNER_MAIN, LVar3, 0) + Call(SetTexPanOffset, TEX_PANNER_B, TEX_PANNER_MAIN, LVar4, 0) + Call(SetTexPanOffset, TEX_PANNER_A, TEX_PANNER_MAIN, LVar5, 0) + Call(SetTexPanOffset, TEX_PANNER_9, TEX_PANNER_MAIN, LVar5, 0) + Wait(1) + Goto(0) + EndThread + Return + End }; diff --git a/src/world/dead/area_flo/flo_18/flo_18_4_npc.c b/src/world/dead/area_flo/flo_18/flo_18_4_npc.c index 500822b0399..b55861e1338 100644 --- a/src/world/dead/area_flo/flo_18/flo_18_4_npc.c +++ b/src/world/dead/area_flo/flo_18/flo_18_4_npc.c @@ -55,414 +55,414 @@ Vec3f N(RetreatPath_Lakitu_03)[] = { }; EvtScript N(EVS_Scene_LakilesterLikesBeingGood) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetPlayerPos, 30, 0, 50) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(SetNpcPos, NPC_PARTNER, 65, 0, 50) - EVT_WAIT(30) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(8.0), 0, 300, EVT_FLOAT(19.0), EVT_FLOAT(-8.5)) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_CALL(BringPartnerOut, PARTNER_LAKILESTER) - EVT_IF_NE(LVar0, PARTNER_LAKILESTER) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0)) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar2, 20) - EVT_ADD(LVar3, 20) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar1, LVar2, LVar3, 30) - EVT_END_IF - EVT_CALL(PlayerFaceNpc, NPC_PARTNER, FALSE) - EVT_CALL(NpcFacePlayer, NPC_PARTNER, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5, MSG_CH6_00C9) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_NodYes) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Still) - EVT_WAIT(20) - EVT_CALL(EnablePartnerAI) - EVT_CALL(PutPartnerAway) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(SetPlayerPos, 30, 0, 50) + Call(InterpPlayerYaw, 90, 0) + Call(SetNpcPos, NPC_PARTNER, 65, 0, 50) + Wait(30) + Call(AdjustCam, CAM_DEFAULT, Float(8.0), 0, 300, Float(19.0), Float(-8.5)) + Call(GetCurrentPartnerID, LVar0) + Call(BringPartnerOut, PARTNER_LAKILESTER) + IfNe(LVar0, PARTNER_LAKILESTER) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.0)) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + Add(LVar1, 20) + Add(LVar2, 20) + Add(LVar3, 20) + Call(NpcJump0, NPC_PARTNER, LVar1, LVar2, LVar3, 30) + EndIf + Call(PlayerFaceNpc, NPC_PARTNER, FALSE) + Call(NpcFacePlayer, NPC_PARTNER, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5, MSG_CH6_00C9) + Call(SetPlayerAnimation, ANIM_Mario1_NodYes) + Wait(10) + Call(SetPlayerAnimation, ANIM_Mario1_Still) + Wait(20) + Call(EnablePartnerAI) + Call(PutPartnerAway) + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_GangRetreat) = { - EVT_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_FlyingMagikoopa, SOUND_FLO_MAGIKOOPA_FLY_AWAY, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcFlagBits, NPC_FlyingMagikoopa, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(InterpNpcYaw, NPC_FlyingMagikoopa, 270, 0) - EVT_CALL(LoadPath, 60, EVT_PTR(N(RetreatPath_Magikoopa)), ARRAY_COUNT(N(RetreatPath_Magikoopa)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_FlyingMagikoopa, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_NE(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(15) - EVT_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_Lakitu_01, SOUND_FLO_LAKITU_FLY_AWAY, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcFlagBits, NPC_Lakitu_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(InterpNpcYaw, NPC_Lakitu_01, 270, 0) - EVT_CALL(LoadPath, 60, EVT_PTR(N(RetreatPath_Lakitu_01)), ARRAY_COUNT(N(RetreatPath_Lakitu_01)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Lakitu_01, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_NE(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Lakitu_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(InterpNpcYaw, NPC_Lakitu_02, 270, 0) - EVT_CALL(LoadPath, 70, EVT_PTR(N(RetreatPath_Lakitu_02)), ARRAY_COUNT(N(RetreatPath_Lakitu_02)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Lakitu_02, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_NE(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(PlaySoundAtNpc, NPC_Lakitu_03, SOUND_FLO_LAKITU_FLY_AWAY, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcFlagBits, NPC_Lakitu_03, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(InterpNpcYaw, NPC_Lakitu_03, 270, 0) - EVT_CALL(LoadPath, 80, EVT_PTR(N(RetreatPath_Lakitu_03)), ARRAY_COUNT(N(RetreatPath_Lakitu_03)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Lakitu_03, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_NE(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Thread + Call(PlaySoundAtNpc, NPC_FlyingMagikoopa, SOUND_FLO_MAGIKOOPA_FLY_AWAY, SOUND_SPACE_DEFAULT) + Call(SetNpcFlagBits, NPC_FlyingMagikoopa, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(InterpNpcYaw, NPC_FlyingMagikoopa, 270, 0) + Call(LoadPath, 60, Ref(N(RetreatPath_Magikoopa)), ARRAY_COUNT(N(RetreatPath_Magikoopa)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_FlyingMagikoopa, LVar1, LVar2, LVar3) + Wait(1) + IfNe(LVar0, 1) + BreakLoop + EndIf + EndLoop + EndThread + Wait(15) + Thread + Call(PlaySoundAtNpc, NPC_Lakitu_01, SOUND_FLO_LAKITU_FLY_AWAY, SOUND_SPACE_DEFAULT) + Call(SetNpcFlagBits, NPC_Lakitu_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(InterpNpcYaw, NPC_Lakitu_01, 270, 0) + Call(LoadPath, 60, Ref(N(RetreatPath_Lakitu_01)), ARRAY_COUNT(N(RetreatPath_Lakitu_01)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Lakitu_01, LVar1, LVar2, LVar3) + Wait(1) + IfNe(LVar0, 1) + BreakLoop + EndIf + EndLoop + EndThread + Thread + Call(SetNpcFlagBits, NPC_Lakitu_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(InterpNpcYaw, NPC_Lakitu_02, 270, 0) + Call(LoadPath, 70, Ref(N(RetreatPath_Lakitu_02)), ARRAY_COUNT(N(RetreatPath_Lakitu_02)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Lakitu_02, LVar1, LVar2, LVar3) + Wait(1) + IfNe(LVar0, 1) + BreakLoop + EndIf + EndLoop + EndThread + Call(PlaySoundAtNpc, NPC_Lakitu_03, SOUND_FLO_LAKITU_FLY_AWAY, SOUND_SPACE_DEFAULT) + Call(SetNpcFlagBits, NPC_Lakitu_03, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(InterpNpcYaw, NPC_Lakitu_03, 270, 0) + Call(LoadPath, 80, Ref(N(RetreatPath_Lakitu_03)), ARRAY_COUNT(N(RetreatPath_Lakitu_03)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Lakitu_03, LVar1, LVar2, LVar3) + Wait(1) + IfNe(LVar0, 1) + BreakLoop + EndIf + EndLoop + Return + End }; EvtScript N(EVS_ChargeAtPlayer) = { - EVT_WAIT(5) - EVT_CALL(IsPlayerWithin, 40, 0, 200, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_SET(LVar3, 45) - EVT_ELSE - EVT_SET(LVar3, 25) - EVT_END_IF - EVT_SET(LVar4, LVar3) - EVT_ADD(LVar4, -5) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar2, -61) - EVT_CHILD_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Lakitu_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(NpcMoveTo, NPC_Lakitu_01, LVar0, 55, LVar3) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Lakitu_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(NpcMoveTo, NPC_Lakitu_02, LVar0, 55, LVar3) - EVT_END_CHILD_THREAD - EVT_CHILD_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Lakitu_03, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(NpcMoveTo, NPC_Lakitu_03, LVar0, 55, LVar3) - EVT_END_CHILD_THREAD - EVT_WAIT(LVar4) - EVT_END_IF - EVT_RETURN - EVT_END + Wait(5) + Call(IsPlayerWithin, 40, 0, 200, LVar0) + IfEq(LVar0, 0) + Set(LVar3, 45) + Else + Set(LVar3, 25) + EndIf + Set(LVar4, LVar3) + Add(LVar4, -5) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar2, -61) + ChildThread + Call(SetNpcFlagBits, NPC_Lakitu_01, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(NpcMoveTo, NPC_Lakitu_01, LVar0, 55, LVar3) + EndChildThread + ChildThread + Call(SetNpcFlagBits, NPC_Lakitu_02, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(NpcMoveTo, NPC_Lakitu_02, LVar0, 55, LVar3) + EndChildThread + ChildThread + Call(SetNpcFlagBits, NPC_Lakitu_03, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(NpcMoveTo, NPC_Lakitu_03, LVar0, 55, LVar3) + EndChildThread + Wait(LVar4) + EndIf + Return + End }; EvtScript N(EVS_Scene_GangDefeated) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_PARTNER, 65, LVar1, 80) - EVT_CALL(SetNpcYaw, NPC_PARTNER, 270) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(8.0), 0, 450, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_CALL(SpeakToPlayer, NPC_FlyingMagikoopa, ANIM_FlyingMagikoopa_Yellow_Anim09, ANIM_FlyingMagikoopa_Yellow_Anim01, 0, MSG_CH6_00BB) - EVT_WAIT(20) - EVT_EXEC(N(EVS_GangRetreat)) - EVT_WAIT(80) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(8.0), 0, 300, EVT_FLOAT(19.0), EVT_FLOAT(-8.5)) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_CALL(BringPartnerOut, PARTNER_LAKILESTER) - EVT_IF_NE(LVar0, PARTNER_LAKILESTER) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0)) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar2, 20) - EVT_ADD(LVar3, 20) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar1, LVar2, LVar3, 30) - EVT_END_IF - EVT_CALL(NpcFacePlayer, NPC_PARTNER, 0) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5, MSG_CH6_00C1) - EVT_CALL(EnablePartnerAI) - EVT_WAIT(20) - EVT_CALL(PutPartnerAway) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_SET(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(AwaitPlayerApproach, -250, 0, 50) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetCurrentPartnerID, LVar0) - EVT_CALL(BringPartnerOut, PARTNER_LAKILESTER) - EVT_IF_NE(LVar0, PARTNER_LAKILESTER) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0)) - EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3) - EVT_ADD(LVar1, 20) - EVT_ADD(LVar2, 20) - EVT_ADD(LVar3, 20) - EVT_CALL(NpcJump0, NPC_PARTNER, LVar1, LVar2, LVar3, 30) - EVT_END_IF - EVT_CALL(PlayerFaceNpc, NPC_PARTNER, FALSE) - EVT_CALL(NpcFacePlayer, NPC_PARTNER, 0) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5, MSG_CH6_00C2) - EVT_CALL(EnablePartnerAI) - EVT_CALL(PutPartnerAway) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePartnerAI, 0) + Call(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_PARTNER, 65, LVar1, 80) + Call(SetNpcYaw, NPC_PARTNER, 270) + Call(AdjustCam, CAM_DEFAULT, Float(8.0), 0, 450, Float(17.0), Float(-6.0)) + Call(SpeakToPlayer, NPC_FlyingMagikoopa, ANIM_FlyingMagikoopa_Yellow_Anim09, ANIM_FlyingMagikoopa_Yellow_Anim01, 0, MSG_CH6_00BB) + Wait(20) + Exec(N(EVS_GangRetreat)) + Wait(80) + Call(AdjustCam, CAM_DEFAULT, Float(8.0), 0, 300, Float(19.0), Float(-8.5)) + Call(GetCurrentPartnerID, LVar0) + Call(BringPartnerOut, PARTNER_LAKILESTER) + IfNe(LVar0, PARTNER_LAKILESTER) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.0)) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + Add(LVar1, 20) + Add(LVar2, 20) + Add(LVar3, 20) + Call(NpcJump0, NPC_PARTNER, LVar1, LVar2, LVar3, 30) + EndIf + Call(NpcFacePlayer, NPC_PARTNER, 0) + Call(DisablePartnerAI, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5, MSG_CH6_00C1) + Call(EnablePartnerAI) + Wait(20) + Call(PutPartnerAway) + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + Set(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) + Call(DisablePlayerInput, FALSE) + Call(AwaitPlayerApproach, -250, 0, 50) + Call(DisablePlayerInput, TRUE) + Call(GetCurrentPartnerID, LVar0) + Call(BringPartnerOut, PARTNER_LAKILESTER) + IfNe(LVar0, PARTNER_LAKILESTER) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.0)) + Call(GetPlayerPos, LVar1, LVar2, LVar3) + Add(LVar1, 20) + Add(LVar2, 20) + Add(LVar3, 20) + Call(NpcJump0, NPC_PARTNER, LVar1, LVar2, LVar3, 30) + EndIf + Call(PlayerFaceNpc, NPC_PARTNER, FALSE) + Call(NpcFacePlayer, NPC_PARTNER, 0) + Call(DisablePartnerAI, 0) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5, MSG_CH6_00C2) + Call(EnablePartnerAI) + Call(PutPartnerAway) + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcIdle_Magikoopa) = { - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(10) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 1000) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE) - EVT_RETURN - EVT_END + Loop(0) + Call(GetSelfVar, 0, LVar0) + IfNe(LVar0, 0) + BreakLoop + EndIf + Wait(1) + EndLoop + Call(DisablePlayerInput, TRUE) + Wait(10) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, 1000) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-6.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(DisablePlayerInput, FALSE) + Call(StartBossBattle, SONG_SPECIAL_BATTLE) + Return + End }; EvtScript N(EVS_NpcDefeat_Lakitu) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_IF_EQ(LVar0, 3) - EVT_CALL(SetNpcPos, NPC_Magikoopa, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_FlyingMagikoopa, -55, 15, 35) - EVT_CALL(GetNpcYaw, NPC_Magikoopa, LVar0) - EVT_CALL(SetNpcYaw, NPC_FlyingMagikoopa, 90) - EVT_CALL(InterpPlayerYaw, 180, 0) - EVT_CALL(SetPlayerPos, 30, 0, 80) - EVT_CALL(SetNpcYaw, NPC_Lakitu_01, 90) - EVT_CALL(SetNpcPos, NPC_Lakitu_01, -20, 15, 30) - EVT_CALL(SetNpcYaw, NPC_Lakitu_02, 270) - EVT_CALL(SetNpcPos, NPC_Lakitu_02, 65, 15, 30) - EVT_CALL(SetNpcYaw, NPC_Lakitu_03, 270) - EVT_CALL(SetNpcPos, NPC_Lakitu_03, 120, 15, 30) - EVT_EXEC(N(EVS_Scene_GangDefeated)) - EVT_END_IF - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(GetSelfNpcID, LVar0) + IfEq(LVar0, 3) + Call(SetNpcPos, NPC_Magikoopa, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_FlyingMagikoopa, -55, 15, 35) + Call(GetNpcYaw, NPC_Magikoopa, LVar0) + Call(SetNpcYaw, NPC_FlyingMagikoopa, 90) + Call(InterpPlayerYaw, 180, 0) + Call(SetPlayerPos, 30, 0, 80) + Call(SetNpcYaw, NPC_Lakitu_01, 90) + Call(SetNpcPos, NPC_Lakitu_01, -20, 15, 30) + Call(SetNpcYaw, NPC_Lakitu_02, 270) + Call(SetNpcPos, NPC_Lakitu_02, 65, 15, 30) + Call(SetNpcYaw, NPC_Lakitu_03, 270) + Call(SetNpcPos, NPC_Lakitu_03, 120, 15, 30) + Exec(N(EVS_Scene_GangDefeated)) + EndIf + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_ReactionFacePlayer) = { - EVT_SWITCH(MV_ReactingNpc) - EVT_CASE_EQ(0) - EVT_CALL(NpcFacePlayer, NPC_Magikoopa, 1) - EVT_CASE_EQ(1) - EVT_CALL(NpcFacePlayer, NPC_Lakitu_01, 1) - EVT_CASE_EQ(2) - EVT_CALL(NpcFacePlayer, NPC_Lakitu_02, 1) - EVT_CASE_EQ(3) - EVT_CALL(NpcFacePlayer, NPC_Lakitu_03, 1) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(MV_ReactingNpc) + CaseEq(0) + Call(NpcFacePlayer, NPC_Magikoopa, 1) + CaseEq(1) + Call(NpcFacePlayer, NPC_Lakitu_01, 1) + CaseEq(2) + Call(NpcFacePlayer, NPC_Lakitu_02, 1) + CaseEq(3) + Call(NpcFacePlayer, NPC_Lakitu_03, 1) + EndSwitch + Return + End }; EvtScript N(EVS_FirstReactionDialogue) = { - EVT_SWITCH(MV_ReactingNpc) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_Magikoopa, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 16, MSG_CH6_00B9) - EVT_CALL(InterpNpcYaw, NPC_Magikoopa, 90, 0) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_Lakitu_01, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00BF) - EVT_CALL(InterpNpcYaw, NPC_Lakitu_01, 90, 0) - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, NPC_Lakitu_02, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00BF) - EVT_CALL(InterpNpcYaw, NPC_Lakitu_02, 270, 0) - EVT_CASE_EQ(3) - EVT_CALL(SpeakToPlayer, NPC_Lakitu_03, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00BF) - EVT_CALL(InterpNpcYaw, NPC_Lakitu_03, 270, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(MV_ReactingNpc) + CaseEq(0) + Call(SpeakToPlayer, NPC_Magikoopa, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 16, MSG_CH6_00B9) + Call(InterpNpcYaw, NPC_Magikoopa, 90, 0) + CaseEq(1) + Call(SpeakToPlayer, NPC_Lakitu_01, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00BF) + Call(InterpNpcYaw, NPC_Lakitu_01, 90, 0) + CaseEq(2) + Call(SpeakToPlayer, NPC_Lakitu_02, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00BF) + Call(InterpNpcYaw, NPC_Lakitu_02, 270, 0) + CaseEq(3) + Call(SpeakToPlayer, NPC_Lakitu_03, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00BF) + Call(InterpNpcYaw, NPC_Lakitu_03, 270, 0) + EndSwitch + Return + End }; EvtScript N(EVS_SecondReactionDialogue) = { - EVT_SWITCH(MV_ReactingNpc) - EVT_CASE_EQ(0) - EVT_CALL(SpeakToPlayer, NPC_Magikoopa, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 16, MSG_CH6_00BA) - EVT_CASE_EQ(1) - EVT_CALL(SpeakToPlayer, NPC_Lakitu_01, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00C0) - EVT_CASE_EQ(2) - EVT_CALL(SpeakToPlayer, NPC_Lakitu_02, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00C0) - EVT_CASE_EQ(3) - EVT_CALL(SpeakToPlayer, NPC_Lakitu_03, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00C0) - EVT_END_SWITCH - EVT_CALL(SetNpcVar, NPC_Magikoopa, 0, 1) - EVT_WAIT(5) - EVT_EXEC(N(EVS_ChargeAtPlayer)) - EVT_RETURN - EVT_END + Switch(MV_ReactingNpc) + CaseEq(0) + Call(SpeakToPlayer, NPC_Magikoopa, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 16, MSG_CH6_00BA) + CaseEq(1) + Call(SpeakToPlayer, NPC_Lakitu_01, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00C0) + CaseEq(2) + Call(SpeakToPlayer, NPC_Lakitu_02, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00C0) + CaseEq(3) + Call(SpeakToPlayer, NPC_Lakitu_03, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 16, MSG_CH6_00C0) + EndSwitch + Call(SetNpcVar, NPC_Magikoopa, 0, 1) + Wait(5) + Exec(N(EVS_ChargeAtPlayer)) + Return + End }; EvtScript N(EVS_GenericHitReaction) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(func_802D2C14, 1) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(8.0), 0, 300, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_EXEC_WAIT(N(EVS_ReactionFacePlayer)) - EVT_SWITCH(AB_FLO_GuardedMachineHitCount) - EVT_CASE_EQ(0) - EVT_EXEC_WAIT(N(EVS_FirstReactionDialogue)) - EVT_ADD(AB_FLO_GuardedMachineHitCount, 1) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CASE_EQ(1) - EVT_EXEC_WAIT(N(EVS_SecondReactionDialogue)) - EVT_END_SWITCH - EVT_CALL(func_802D2C14, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(func_802D2C14, 1) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(AdjustCam, CAM_DEFAULT, Float(8.0), 0, 300, Float(17.0), Float(-6.0)) + ExecWait(N(EVS_ReactionFacePlayer)) + Switch(AB_FLO_GuardedMachineHitCount) + CaseEq(0) + ExecWait(N(EVS_FirstReactionDialogue)) + Add(AB_FLO_GuardedMachineHitCount, 1) + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + CaseEq(1) + ExecWait(N(EVS_SecondReactionDialogue)) + EndSwitch + Call(func_802D2C14, 0) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_HitReaction_Magikoopa) = { - EVT_IF_EQ(MV_ReactingNpc, -1) - EVT_SET(MV_ReactingNpc, 0) - EVT_EXEC_WAIT(N(EVS_GenericHitReaction)) - EVT_SET(MV_ReactingNpc, -1) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MV_ReactingNpc, -1) + Set(MV_ReactingNpc, 0) + ExecWait(N(EVS_GenericHitReaction)) + Set(MV_ReactingNpc, -1) + EndIf + Return + End }; EvtScript N(EVS_HitReaction_Lakitu_01) = { - EVT_IF_EQ(MV_ReactingNpc, -1) - EVT_SET(MV_ReactingNpc, 1) - EVT_EXEC_WAIT(N(EVS_GenericHitReaction)) - EVT_SET(MV_ReactingNpc, -1) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MV_ReactingNpc, -1) + Set(MV_ReactingNpc, 1) + ExecWait(N(EVS_GenericHitReaction)) + Set(MV_ReactingNpc, -1) + EndIf + Return + End }; EvtScript N(EVS_HitReaction_Lakitu_02) = { - EVT_IF_EQ(MV_ReactingNpc, -1) - EVT_SET(MV_ReactingNpc, 2) - EVT_EXEC_WAIT(N(EVS_GenericHitReaction)) - EVT_SET(MV_ReactingNpc, -1) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MV_ReactingNpc, -1) + Set(MV_ReactingNpc, 2) + ExecWait(N(EVS_GenericHitReaction)) + Set(MV_ReactingNpc, -1) + EndIf + Return + End }; EvtScript N(EVS_HitReaction_Lakitu_03) = { - EVT_IF_EQ(MV_ReactingNpc, -1) - EVT_SET(MV_ReactingNpc, 3) - EVT_EXEC_WAIT(N(EVS_GenericHitReaction)) - EVT_SET(MV_ReactingNpc, -1) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MV_ReactingNpc, -1) + Set(MV_ReactingNpc, 3) + ExecWait(N(EVS_GenericHitReaction)) + Set(MV_ReactingNpc, -1) + EndIf + Return + End }; EvtScript N(EVS_GenericBombReaction) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) - EVT_RETURN - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(8.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 300) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC_WAIT(N(EVS_ReactionFacePlayer)) - EVT_IF_EQ(AB_FLO_GuardedMachineHitCount, 0) - EVT_EXEC_WAIT(N(EVS_FirstReactionDialogue)) - EVT_ADD(AB_FLO_GuardedMachineHitCount, 1) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_ELSE - EVT_EXEC_WAIT(N(EVS_SecondReactionDialogue)) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) + Return + EndIf + Call(DisablePlayerInput, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(8.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-6.0)) + Call(SetCamDistance, CAM_DEFAULT, 300) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + ExecWait(N(EVS_ReactionFacePlayer)) + IfEq(AB_FLO_GuardedMachineHitCount, 0) + ExecWait(N(EVS_FirstReactionDialogue)) + Add(AB_FLO_GuardedMachineHitCount, 1) + Call(ResetCam, CAM_DEFAULT, Float(4.0)) + Else + ExecWait(N(EVS_SecondReactionDialogue)) + EndIf + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_BombReaction_Magikoopa) = { - EVT_IF_EQ(MV_ReactingNpc, -1) - EVT_SET(MV_ReactingNpc, 0) - EVT_CALL(GetNpcPos, NPC_Magikoopa, LVar0, LVar1, LVar2) - EVT_EXEC_WAIT(N(EVS_GenericBombReaction)) - EVT_SET(MV_ReactingNpc, -1) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MV_ReactingNpc, -1) + Set(MV_ReactingNpc, 0) + Call(GetNpcPos, NPC_Magikoopa, LVar0, LVar1, LVar2) + ExecWait(N(EVS_GenericBombReaction)) + Set(MV_ReactingNpc, -1) + EndIf + Return + End }; EvtScript N(EVS_BombReaction_Lakitu_01) = { - EVT_IF_EQ(MV_ReactingNpc, -1) - EVT_SET(MV_ReactingNpc, 1) - EVT_CALL(GetNpcPos, NPC_Lakitu_01, LVar0, LVar1, LVar2) - EVT_EXEC_WAIT(N(EVS_GenericBombReaction)) - EVT_SET(MV_ReactingNpc, -1) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MV_ReactingNpc, -1) + Set(MV_ReactingNpc, 1) + Call(GetNpcPos, NPC_Lakitu_01, LVar0, LVar1, LVar2) + ExecWait(N(EVS_GenericBombReaction)) + Set(MV_ReactingNpc, -1) + EndIf + Return + End }; EvtScript N(EVS_BombReaction_Lakitu_02) = { - EVT_IF_EQ(MV_ReactingNpc, -1) - EVT_SET(MV_ReactingNpc, 2) - EVT_CALL(GetNpcPos, NPC_Lakitu_02, LVar0, LVar1, LVar2) - EVT_EXEC_WAIT(N(EVS_GenericBombReaction)) - EVT_SET(MV_ReactingNpc, -1) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MV_ReactingNpc, -1) + Set(MV_ReactingNpc, 2) + Call(GetNpcPos, NPC_Lakitu_02, LVar0, LVar1, LVar2) + ExecWait(N(EVS_GenericBombReaction)) + Set(MV_ReactingNpc, -1) + EndIf + Return + End }; EvtScript N(EVS_BombReaction_Lakitu_03) = { - EVT_IF_EQ(MV_ReactingNpc, -1) - EVT_SET(MV_ReactingNpc, 3) - EVT_CALL(GetNpcPos, NPC_Lakitu_03, LVar0, LVar1, LVar2) - EVT_EXEC_WAIT(N(EVS_GenericBombReaction)) - EVT_SET(MV_ReactingNpc, -1) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(MV_ReactingNpc, -1) + Set(MV_ReactingNpc, 3) + Call(GetNpcPos, NPC_Lakitu_03, LVar0, LVar1, LVar2) + ExecWait(N(EVS_GenericBombReaction)) + Set(MV_ReactingNpc, -1) + EndIf + Return + End }; BombTrigger N(Npc_BombTrigger_01) = { @@ -486,116 +486,116 @@ BombTrigger N(Npc_BombTrigger_04) = { }; EvtScript N(EVS_SetupMachineDamageReactions) = { - EVT_SET(MV_ReactingNpc, -1) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_HitReaction_Magikoopa)), TRIGGER_WALL_HAMMER, COLLIDER_o174, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_HitReaction_Magikoopa)), TRIGGER_WALL_HAMMER, COLLIDER_o130, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BombReaction_Magikoopa)), TRIGGER_POINT_BOMB, EVT_PTR(N(Npc_BombTrigger_02)), 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BombReaction_Lakitu_01)), TRIGGER_POINT_BOMB, EVT_PTR(N(Npc_BombTrigger_01)), 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_HitReaction_Lakitu_02)), TRIGGER_WALL_HAMMER, COLLIDER_o127, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BombReaction_Lakitu_02)), TRIGGER_POINT_BOMB, EVT_PTR(N(Npc_BombTrigger_03)), 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_HitReaction_Lakitu_03)), TRIGGER_WALL_HAMMER, COLLIDER_o131, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BombReaction_Lakitu_03)), TRIGGER_POINT_BOMB, EVT_PTR(N(Npc_BombTrigger_04)), 1, 0) - EVT_RETURN - EVT_END + Set(MV_ReactingNpc, -1) + BindTrigger(Ref(N(EVS_HitReaction_Magikoopa)), TRIGGER_WALL_HAMMER, COLLIDER_o174, 1, 0) + BindTrigger(Ref(N(EVS_HitReaction_Magikoopa)), TRIGGER_WALL_HAMMER, COLLIDER_o130, 1, 0) + BindTrigger(Ref(N(EVS_BombReaction_Magikoopa)), TRIGGER_POINT_BOMB, Ref(N(Npc_BombTrigger_02)), 1, 0) + BindTrigger(Ref(N(EVS_BombReaction_Lakitu_01)), TRIGGER_POINT_BOMB, Ref(N(Npc_BombTrigger_01)), 1, 0) + BindTrigger(Ref(N(EVS_HitReaction_Lakitu_02)), TRIGGER_WALL_HAMMER, COLLIDER_o127, 1, 0) + BindTrigger(Ref(N(EVS_BombReaction_Lakitu_02)), TRIGGER_POINT_BOMB, Ref(N(Npc_BombTrigger_03)), 1, 0) + BindTrigger(Ref(N(EVS_HitReaction_Lakitu_03)), TRIGGER_WALL_HAMMER, COLLIDER_o131, 1, 0) + BindTrigger(Ref(N(EVS_BombReaction_Lakitu_03)), TRIGGER_POINT_BOMB, Ref(N(Npc_BombTrigger_04)), 1, 0) + Return + End }; EvtScript N(EVS_NpcInteract_Lakitu) = { - EVT_SWITCH(AB_FLO_GuardLakituTalkCount) - EVT_CASE_EQ(0) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_IF_EQ(LVar0, 3) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 5, MSG_CH6_00B6) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 5, MSG_CH6_00BC) - EVT_END_IF - EVT_ADD(AB_FLO_GuardLakituTalkCount, 1) - EVT_CASE_EQ(1) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_IF_EQ(LVar0, 3) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 5, MSG_CH6_00B7) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 5, MSG_CH6_00BD) - EVT_END_IF - EVT_ADD(AB_FLO_GuardLakituTalkCount, 1) - EVT_CASE_EQ(2) - EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(8.0), 0, 300, EVT_FLOAT(19.0), EVT_FLOAT(-9.0)) - EVT_CALL(GetSelfNpcID, LVar0) - EVT_IF_EQ(LVar0, 3) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 5, MSG_CH6_00B8) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_WAIT(15) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 0) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 5, MSG_CH6_00BE) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_WAIT(15) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0) - EVT_END_IF - EVT_CALL(SetNpcVar, NPC_Magikoopa, 0, 1) - EVT_WAIT(5) - EVT_EXEC(N(EVS_ChargeAtPlayer)) - EVT_CALL(BindNpcInteract, NPC_Lakitu_01, 0) - EVT_CALL(BindNpcInteract, NPC_Lakitu_02, 0) - EVT_CALL(BindNpcInteract, NPC_Lakitu_03, 0) - EVT_CALL(BindNpcInteract, NPC_Magikoopa, 0) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Switch(AB_FLO_GuardLakituTalkCount) + CaseEq(0) + Call(GetSelfNpcID, LVar0) + IfEq(LVar0, 3) + Call(SpeakToPlayer, NPC_SELF, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 5, MSG_CH6_00B6) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 5, MSG_CH6_00BC) + EndIf + Add(AB_FLO_GuardLakituTalkCount, 1) + CaseEq(1) + Call(GetSelfNpcID, LVar0) + IfEq(LVar0, 3) + Call(SpeakToPlayer, NPC_SELF, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 5, MSG_CH6_00B7) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 5, MSG_CH6_00BD) + EndIf + Add(AB_FLO_GuardLakituTalkCount, 1) + CaseEq(2) + Call(AdjustCam, CAM_DEFAULT, Float(8.0), 0, 300, Float(19.0), Float(-9.0)) + Call(GetSelfNpcID, LVar0) + IfEq(LVar0, 3) + Call(SpeakToPlayer, NPC_SELF, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 5, MSG_CH6_00B8) + Call(NpcFacePlayer, NPC_SELF, 0) + Wait(15) + Call(EndSpeech, NPC_SELF, ANIM_Magikoopa_Yellow_Anim02, ANIM_Magikoopa_Yellow_Anim01, 0) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 5, MSG_CH6_00BE) + Call(NpcFacePlayer, NPC_SELF, 0) + Wait(15) + Call(EndSpeech, NPC_SELF, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0) + EndIf + Call(SetNpcVar, NPC_Magikoopa, 0, 1) + Wait(5) + Exec(N(EVS_ChargeAtPlayer)) + Call(BindNpcInteract, NPC_Lakitu_01, 0) + Call(BindNpcInteract, NPC_Lakitu_02, 0) + Call(BindNpcInteract, NPC_Lakitu_03, 0) + Call(BindNpcInteract, NPC_Magikoopa, 0) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_Magikoopa) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Magikoopa))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lakitu))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Lakitu))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Magikoopa))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Lakitu))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Lakitu))) + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_FlyingMagikoopa) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Lakitu))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Lakitu))) + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Lakitu_01) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lakitu))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Lakitu))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Lakitu))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Lakitu))) + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Lakitu_02) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lakitu))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Lakitu))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Lakitu))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Lakitu))) + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Lakitu_03) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lakitu))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Lakitu))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Lakitu))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_Lakitu))) + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; NpcData N(NpcData_MachineGang)[] = { diff --git a/src/world/dead/area_flo/flo_18/flo_18_5_foliage.c b/src/world/dead/area_flo/flo_18/flo_18_5_foliage.c index 611317396b5..74ddcc7eb85 100644 --- a/src/world/dead/area_flo/flo_18/flo_18_5_foliage.c +++ b/src/world/dead/area_flo/flo_18/flo_18_5_foliage.c @@ -3,6 +3,6 @@ #include "common/foliage.inc.c" EvtScript N(EVS_SetupFoliage) = { - EVT_RETURN - EVT_END + Return + End }; diff --git a/src/world/dead/area_flo/flo_19/flo_19_1_music.c b/src/world/dead/area_flo/flo_19/flo_19_1_music.c index 07cbb890ac3..4b39d4f5a0b 100644 --- a/src/world/dead/area_flo/flo_19/flo_19_1_music.c +++ b/src/world/dead/area_flo/flo_19/flo_19_1_music.c @@ -1,23 +1,23 @@ #include "flo_19.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_OR_EQ(flo_19_ENTRY_0) - EVT_CASE_OR_EQ(flo_19_ENTRY_1) - EVT_CALL(SetMusicTrack, 0, SONG_CLOUDY_CLIMB, 0, 8) - EVT_END_CASE_GROUP - EVT_CASE_OR_EQ(flo_19_ENTRY_2) - EVT_CASE_OR_EQ(7) - EVT_END_CASE_GROUP - EVT_CASE_EQ(flo_19_ENTRY_3) - EVT_IF_NE(AF_FLO_RidingBeanstalk, FALSE) - EVT_ELSE - EVT_CALL(FadeOutMusic, 1, 3000) - EVT_CALL(FadeInMusic, 0, SONG_CLOUDY_CLIMB, 0, 3000, 0, 127) - EVT_END_IF - EVT_END_CASE_GROUP - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseOrEq(flo_19_ENTRY_0) + CaseOrEq(flo_19_ENTRY_1) + Call(SetMusicTrack, 0, SONG_CLOUDY_CLIMB, 0, 8) + EndCaseGroup + CaseOrEq(flo_19_ENTRY_2) + CaseOrEq(7) + EndCaseGroup + CaseEq(flo_19_ENTRY_3) + IfNe(AF_FLO_RidingBeanstalk, FALSE) + Else + Call(FadeOutMusic, 1, 3000) + Call(FadeInMusic, 0, SONG_CLOUDY_CLIMB, 0, 3000, 0, 127) + EndIf + EndCaseGroup + EndSwitch + Return + End }; diff --git a/src/world/dead/area_flo/flo_19/flo_19_2_entity.c b/src/world/dead/area_flo/flo_19/flo_19_2_entity.c index 2747d4affc2..ecf3e5e6502 100644 --- a/src/world/dead/area_flo/flo_19/flo_19_2_entity.c +++ b/src/world/dead/area_flo/flo_19/flo_19_2_entity.c @@ -1,7 +1,7 @@ #include "flo_19.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeItemEntity, ITEM_S_JUMP_CHG, -200, 160, -213, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO19_Item_SJumpChg) - EVT_RETURN - EVT_END + Call(MakeItemEntity, ITEM_S_JUMP_CHG, -200, 160, -213, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO19_Item_SJumpChg) + Return + End }; diff --git a/src/world/dead/area_flo/flo_19/flo_19_3_main.c b/src/world/dead/area_flo/flo_19/flo_19_3_main.c index 07e32fea50e..cf699664ff2 100644 --- a/src/world/dead/area_flo/flo_19/flo_19_3_main.c +++ b/src/world/dead/area_flo/flo_19/flo_19_3_main.c @@ -9,71 +9,71 @@ API_CALLABLE(N(SpawnSunEffect)) { } EvtScript N(EVS_ExitWalk_flo_21_0) = { - EVT_SET_GROUP(EVT_GROUP_1B) - EVT_CALL(UseExitHeading, 60, flo_19_ENTRY_1) - EVT_EXEC(ExitWalk) - EVT_CALL(GotoMap, 0x80243000, flo_21_ENTRY_0) // raw pointer to missing string "flo_21" - EVT_WAIT(100) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_1B) + Call(UseExitHeading, 60, flo_19_ENTRY_1) + Exec(ExitWalk) + Call(GotoMap, 0x80243000, flo_21_ENTRY_0) // raw pointer to missing string "flo_21" + Wait(100) + Return + End }; EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_21_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_flo_21_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_CLOUDY_CLIMB) - EVT_CALL(SetSpriteShading, SHADING_NONE) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_SETUP_CAMERA_DEFAULT() - EVT_SET(GF_MAP_CloudyClimb, TRUE) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(ParentColliderToModel, COLLIDER_o117, MODEL_o142) - EVT_CALL(HidePlayerShadow, TRUE) - EVT_EXEC(0x80242FD0) // raw pointer to missing N(EVS_SetupBeanstalk) - EVT_EXEC(0x80241780) // raw pointer to missing N(EVS_SetupClouds) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o122, SURFACE_TYPE_CLOUD) - EVT_CALL(EnableTexPanning, MODEL_o59, TRUE) - EVT_CALL(EnableTexPanning, MODEL_o60, TRUE) - EVT_THREAD + Set(GB_WorldLocation, LOCATION_CLOUDY_CLIMB) + Call(SetSpriteShading, SHADING_NONE) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + SetUP_CAMERA_DEFAULT() + Set(GF_MAP_CloudyClimb, TRUE) + ExecWait(N(EVS_MakeEntities)) + Call(ParentColliderToModel, COLLIDER_o117, MODEL_o142) + Call(HidePlayerShadow, TRUE) + Exec(0x80242FD0) // raw pointer to missing N(EVS_SetupBeanstalk) + Exec(0x80241780) // raw pointer to missing N(EVS_SetupClouds) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o122, SURFACE_TYPE_CLOUD) + Call(EnableTexPanning, MODEL_o59, TRUE) + Call(EnableTexPanning, MODEL_o60, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( -120, 0, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( -90, 0, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 0, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_CALL(GetEntryID, LVar0) - EVT_IF_NE(LVar0, flo_19_ENTRY_3) - EVT_SET(AF_FLO_RidingBeanstalk, FALSE) - EVT_END_IF - EVT_SWITCH(LVar0) - EVT_CASE_EQ(flo_19_ENTRY_0) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(flo_19_ENTRY_1) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_CASE_EQ(flo_19_ENTRY_2) - EVT_EXEC(0x80242A2C) // raw pointer to missing N(EVS_Scene_BeanstalkGrowing) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_CASE_EQ(flo_19_ENTRY_3) - EVT_EXEC(0x80241CC4) // raw pointer to missing N(EVS_Enter_Beanstalk) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_SWITCH - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) - EVT_CALL(N(SpawnSunEffect)) - EVT_END_IF - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Call(GetEntryID, LVar0) + IfNe(LVar0, flo_19_ENTRY_3) + Set(AF_FLO_RidingBeanstalk, FALSE) + EndIf + Switch(LVar0) + CaseEq(flo_19_ENTRY_0) + Exec(N(EVS_BindExitTriggers)) + CaseEq(flo_19_ENTRY_1) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + CaseEq(flo_19_ENTRY_2) + Exec(0x80242A2C) // raw pointer to missing N(EVS_Scene_BeanstalkGrowing) + Exec(N(EVS_BindExitTriggers)) + CaseEq(flo_19_ENTRY_3) + Exec(0x80241CC4) // raw pointer to missing N(EVS_Enter_Beanstalk) + Exec(N(EVS_BindExitTriggers)) + EndSwitch + ExecWait(N(EVS_SetupMusic)) + IfGe(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) + Call(N(SpawnSunEffect)) + EndIf + Return + End }; diff --git a/src/world/dead/area_flo/flo_19/flo_19_4_clouds.c b/src/world/dead/area_flo/flo_19/flo_19_4_clouds.c index befe61628de..89625c016e2 100644 --- a/src/world/dead/area_flo/flo_19/flo_19_4_clouds.c +++ b/src/world/dead/area_flo/flo_19/flo_19_4_clouds.c @@ -25,97 +25,97 @@ API_CALLABLE(N(CosInterpAbsMinMax)) { } EvtScript N(EVS_AnimatePlatforms) = { - EVT_SET_GROUP(EVT_GROUP_EF) - EVT_SET(LVarF, 0) - EVT_LABEL(0) - EVT_SETF(LVar0, EVT_FLOAT(-215.4375)) - EVT_SETF(LVar1, EVT_FLOAT(128.593)) - EVT_SETF(LVar2, EVT_FLOAT(-200.0)) - EVT_ADDF(LVar1, MV_Distortion_Platform_01) - EVT_CALL(TranslateGroup, MODEL_g17, LVar0, LVar1, LVar2) - EVT_SETF(LVar0, EVT_FLOAT(-79.86)) - EVT_CALL(N(CosInterpAbsMinMax), LVarF, LVar1, EVT_FLOAT(5.0), EVT_FLOAT(136.765), 300, 0, 0) - EVT_SETF(LVar2, EVT_FLOAT(-200.0)) - EVT_ADDF(LVar1, MV_Distortion_Platform_02) - EVT_CALL(TranslateGroup, MODEL_g21, LVar0, LVar1, LVar2) - EVT_SETF(LVar0, EVT_FLOAT(-364.265625)) - EVT_CALL(N(CosInterpAbsMinMax), LVarF, LVar1, EVT_FLOAT(5.0), EVT_FLOAT(106.765), 300, 0, 0) - EVT_SETF(LVar2, EVT_FLOAT(10.0)) - EVT_ADDF(LVar1, MV_Distortion_Platform_03) - EVT_CALL(TranslateGroup, MODEL_g22, LVar0, LVar1, LVar2) - EVT_SETF(LVar0, EVT_FLOAT(295.734)) - EVT_CALL(N(CosInterpAbsMinMax), LVarF, LVar1, EVT_FLOAT(65.0), EVT_FLOAT(86.984), 200, 0, 0) - EVT_SETF(LVar2, EVT_FLOAT(-80.0)) - EVT_ADDF(LVar1, MV_Distortion_Platform_04) - EVT_CALL(TranslateGroup, MODEL_g23, LVar0, LVar1, LVar2) - EVT_CALL(N(CosInterpAbsMinMax), LVarF, LVar2, EVT_FLOAT(0.968), EVT_FLOAT(1.031), 15, 0, 0) - EVT_CALL(N(CosInterpAbsMinMax), LVarF, LVar3, EVT_FLOAT(1.031), EVT_FLOAT(0.968), 15, 0, 0) - EVT_SETF(LVar0, MV_Distortion_Platform_01) - EVT_SETF(LVar1, MV_Distortion_Platform_01) - EVT_MULF(LVar0, EVT_FLOAT(-0.02)) - EVT_MULF(LVar1, EVT_FLOAT(0.04)) - EVT_ADDF(LVar0, LVar2) - EVT_ADDF(LVar1, LVar3) - EVT_CALL(ScaleGroup, MODEL_g17, LVar0, LVar1, 1) - EVT_SETF(LVar0, MV_Distortion_Platform_02) - EVT_SETF(LVar1, MV_Distortion_Platform_02) - EVT_MULF(LVar0, EVT_FLOAT(-0.02)) - EVT_MULF(LVar1, EVT_FLOAT(0.04)) - EVT_ADDF(LVar0, LVar2) - EVT_ADDF(LVar1, LVar3) - EVT_CALL(ScaleGroup, MODEL_g21, LVar0, LVar1, 1) - EVT_SETF(LVar0, MV_Distortion_Platform_03) - EVT_SETF(LVar1, MV_Distortion_Platform_03) - EVT_MULF(LVar0, EVT_FLOAT(-0.02)) - EVT_MULF(LVar1, EVT_FLOAT(0.04)) - EVT_ADDF(LVar0, LVar2) - EVT_ADDF(LVar1, LVar3) - EVT_CALL(ScaleGroup, MODEL_g22, LVar0, LVar1, 1) - EVT_SETF(LVar0, MV_Distortion_Platform_04) - EVT_SETF(LVar1, MV_Distortion_Platform_04) - EVT_MULF(LVar0, EVT_FLOAT(-0.02)) - EVT_MULF(LVar1, EVT_FLOAT(0.04)) - EVT_ADDF(LVar0, LVar2) - EVT_ADDF(LVar1, LVar3) - EVT_CALL(ScaleGroup, MODEL_g23, LVar0, LVar1, 1) - EVT_CALL(UpdateColliderTransform, COLLIDER_o77) - EVT_CALL(UpdateColliderTransform, COLLIDER_o78) - EVT_CALL(UpdateColliderTransform, COLLIDER_o76) - EVT_CALL(UpdateColliderTransform, COLLIDER_o79) - EVT_ADD(LVarF, 1) - EVT_IF_GE(LVarF, 1200) - EVT_SET(LVarF, 0) - EVT_END_IF - EVT_SETF(LVar0, LVarA) - // the rest of the script is cut off halfway through the next EVT_SETF cmd + SetGroup(EVT_GROUP_EF) + Set(LVarF, 0) + Label(0) + SetF(LVar0, Float(-215.4375)) + SetF(LVar1, Float(128.593)) + SetF(LVar2, Float(-200.0)) + AddF(LVar1, MV_Distortion_Platform_01) + Call(TranslateGroup, MODEL_g17, LVar0, LVar1, LVar2) + SetF(LVar0, Float(-79.86)) + Call(N(CosInterpAbsMinMax), LVarF, LVar1, Float(5.0), Float(136.765), 300, 0, 0) + SetF(LVar2, Float(-200.0)) + AddF(LVar1, MV_Distortion_Platform_02) + Call(TranslateGroup, MODEL_g21, LVar0, LVar1, LVar2) + SetF(LVar0, Float(-364.265625)) + Call(N(CosInterpAbsMinMax), LVarF, LVar1, Float(5.0), Float(106.765), 300, 0, 0) + SetF(LVar2, Float(10.0)) + AddF(LVar1, MV_Distortion_Platform_03) + Call(TranslateGroup, MODEL_g22, LVar0, LVar1, LVar2) + SetF(LVar0, Float(295.734)) + Call(N(CosInterpAbsMinMax), LVarF, LVar1, Float(65.0), Float(86.984), 200, 0, 0) + SetF(LVar2, Float(-80.0)) + AddF(LVar1, MV_Distortion_Platform_04) + Call(TranslateGroup, MODEL_g23, LVar0, LVar1, LVar2) + Call(N(CosInterpAbsMinMax), LVarF, LVar2, Float(0.968), Float(1.031), 15, 0, 0) + Call(N(CosInterpAbsMinMax), LVarF, LVar3, Float(1.031), Float(0.968), 15, 0, 0) + SetF(LVar0, MV_Distortion_Platform_01) + SetF(LVar1, MV_Distortion_Platform_01) + MulF(LVar0, Float(-0.02)) + MulF(LVar1, Float(0.04)) + AddF(LVar0, LVar2) + AddF(LVar1, LVar3) + Call(ScaleGroup, MODEL_g17, LVar0, LVar1, 1) + SetF(LVar0, MV_Distortion_Platform_02) + SetF(LVar1, MV_Distortion_Platform_02) + MulF(LVar0, Float(-0.02)) + MulF(LVar1, Float(0.04)) + AddF(LVar0, LVar2) + AddF(LVar1, LVar3) + Call(ScaleGroup, MODEL_g21, LVar0, LVar1, 1) + SetF(LVar0, MV_Distortion_Platform_03) + SetF(LVar1, MV_Distortion_Platform_03) + MulF(LVar0, Float(-0.02)) + MulF(LVar1, Float(0.04)) + AddF(LVar0, LVar2) + AddF(LVar1, LVar3) + Call(ScaleGroup, MODEL_g22, LVar0, LVar1, 1) + SetF(LVar0, MV_Distortion_Platform_04) + SetF(LVar1, MV_Distortion_Platform_04) + MulF(LVar0, Float(-0.02)) + MulF(LVar1, Float(0.04)) + AddF(LVar0, LVar2) + AddF(LVar1, LVar3) + Call(ScaleGroup, MODEL_g23, LVar0, LVar1, 1) + Call(UpdateColliderTransform, COLLIDER_o77) + Call(UpdateColliderTransform, COLLIDER_o78) + Call(UpdateColliderTransform, COLLIDER_o76) + Call(UpdateColliderTransform, COLLIDER_o79) + Add(LVarF, 1) + IfGe(LVarF, 1200) + Set(LVarF, 0) + EndIf + SetF(LVar0, LVarA) + // the rest of the script is cut off halfway through the next SetF cmd /* - EVT_SETF(LVar1, LVarB) - EVT_SETF(LVar2, LVarC) - EVT_SETF(LVar3, LVarD) - EVT_MULF(LVar0, EVT_FLOAT(-0.046875)) - EVT_MULF(LVar1, EVT_FLOAT(-0.09375)) - EVT_MULF(LVar2, EVT_FLOAT(-0.09375)) - EVT_MULF(LVar3, EVT_FLOAT(-0.09375)) - EVT_ADDF(MV_Distortion_Platform_01, LVar0) - EVT_ADDF(MV_Distortion_Platform_02, LVar1) - EVT_ADDF(MV_Distortion_Platform_03, LVar2) - EVT_ADDF(MV_Distortion_Platform_04, LVar3) - EVT_MULF(MV_Distortion_Platform_01, EVT_FLOAT(0.843)) - EVT_MULF(MV_Distortion_Platform_02, EVT_FLOAT(0.843)) - EVT_MULF(MV_Distortion_Platform_03, EVT_FLOAT(0.843)) - EVT_MULF(MV_Distortion_Platform_04, EVT_FLOAT(0.843)) - EVT_ADDF(LVarA, MV_Distortion_Platform_01) - EVT_ADDF(LVarB, MV_Distortion_Platform_02) - EVT_ADDF(LVarC, MV_Distortion_Platform_03) - EVT_ADDF(LVarD, MV_Distortion_Platform_04) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + SetF(LVar1, LVarB) + SetF(LVar2, LVarC) + SetF(LVar3, LVarD) + MulF(LVar0, Float(-0.046875)) + MulF(LVar1, Float(-0.09375)) + MulF(LVar2, Float(-0.09375)) + MulF(LVar3, Float(-0.09375)) + AddF(MV_Distortion_Platform_01, LVar0) + AddF(MV_Distortion_Platform_02, LVar1) + AddF(MV_Distortion_Platform_03, LVar2) + AddF(MV_Distortion_Platform_04, LVar3) + MulF(MV_Distortion_Platform_01, Float(0.843)) + MulF(MV_Distortion_Platform_02, Float(0.843)) + MulF(MV_Distortion_Platform_03, Float(0.843)) + MulF(MV_Distortion_Platform_04, Float(0.843)) + AddF(LVarA, MV_Distortion_Platform_01) + AddF(LVarB, MV_Distortion_Platform_02) + AddF(LVarC, MV_Distortion_Platform_03) + AddF(LVarD, MV_Distortion_Platform_04) + Wait(1) + Goto(0) + Return + End */ }; -// half of EVT_SETF(LVar1, LVarB) +// half of SetF(LVar1, LVarB) s32 N(EVS_AnimatePlatforms_Fragment)[] = { EVT_OP_SETF, 2, }; @@ -123,80 +123,80 @@ s32 N(EVS_AnimatePlatforms_Fragment)[] = { // remaining data is truncated /* EvtScript N(EVS_AddPlayerWeight_Platform_01) = { - EVT_THREAD - EVT_ADDF(MV_Distortion_Platform_01, EVT_FLOAT(-1.5)) - EVT_WAIT(1) - EVT_ADDF(MV_Distortion_Platform_01, EVT_FLOAT(-1.5)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + AddF(MV_Distortion_Platform_01, Float(-1.5)) + Wait(1) + AddF(MV_Distortion_Platform_01, Float(-1.5)) + EndThread + Return + End }; EvtScript N(EVS_AddPlayerWeight_Platform_02) = { - EVT_THREAD - EVT_ADDF(MV_Distortion_Platform_02, EVT_FLOAT(-1.5)) - EVT_WAIT(1) - EVT_ADDF(MV_Distortion_Platform_02, EVT_FLOAT(-1.5)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + AddF(MV_Distortion_Platform_02, Float(-1.5)) + Wait(1) + AddF(MV_Distortion_Platform_02, Float(-1.5)) + EndThread + Return + End }; EvtScript N(EVS_AddPlayerWeight_Platform_03) = { - EVT_THREAD - EVT_ADDF(MV_Distortion_Platform_03, EVT_FLOAT(-1.5)) - EVT_WAIT(1) - EVT_ADDF(MV_Distortion_Platform_03, EVT_FLOAT(-1.5)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + AddF(MV_Distortion_Platform_03, Float(-1.5)) + Wait(1) + AddF(MV_Distortion_Platform_03, Float(-1.5)) + EndThread + Return + End }; EvtScript N(EVS_AddPlayerWeight_Platform_04) = { - EVT_THREAD - EVT_ADDF(MV_Distortion_Platform_04, EVT_FLOAT(-1.5)) - EVT_WAIT(1) - EVT_ADDF(MV_Distortion_Platform_04, EVT_FLOAT(-1.5)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Thread + AddF(MV_Distortion_Platform_04, Float(-1.5)) + Wait(1) + AddF(MV_Distortion_Platform_04, Float(-1.5)) + EndThread + Return + End }; EvtScript N(EVS_SetupClouds) = { - EVT_CALL(ParentColliderToModel, COLLIDER_o77, MODEL_g17) - EVT_CALL(ParentColliderToModel, COLLIDER_o78, MODEL_g21) - EVT_CALL(ParentColliderToModel, COLLIDER_o76, MODEL_g22) - EVT_CALL(ParentColliderToModel, COLLIDER_o79, MODEL_g23) - EVT_CALL(SetModelFlags, MODEL_g17, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_CALL(SetModelFlags, MODEL_g21, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_CALL(SetModelFlags, MODEL_g22, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_CALL(SetModelFlags, MODEL_g23, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) - EVT_EXEC(N(EVS_AnimatePlatforms)) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_AddPlayerWeight_Platform_01)), TRIGGER_FLOOR_TOUCH, COLLIDER_o77, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_AddPlayerWeight_Platform_02)), TRIGGER_FLOOR_TOUCH, COLLIDER_o78, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_AddPlayerWeight_Platform_03)), TRIGGER_FLOOR_TOUCH, COLLIDER_o76, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_AddPlayerWeight_Platform_04)), TRIGGER_FLOOR_TOUCH, COLLIDER_o79, 1, 0) - EVT_THREAD - EVT_SET(LVarF, 0) - EVT_LABEL(0) - EVT_CALL(N(CosInterpAbsMinMax), LVarF, LVar0, EVT_FLOAT(0.968), EVT_FLOAT(1.031), 15, 0, 0) - EVT_CALL(N(CosInterpAbsMinMax), LVarF, LVar1, EVT_FLOAT(1.031), EVT_FLOAT(0.968), 15, 0, 0) - EVT_CALL(ScaleModel, MODEL_o73, LVar1, LVar0, 1) - EVT_CALL(ScaleModel, MODEL_o74, LVar1, LVar0, 1) - EVT_CALL(ScaleModel, MODEL_o75, LVar0, LVar1, 1) - EVT_CALL(ScaleModel, MODEL_o76, LVar0, LVar1, 1) - EVT_CALL(ScaleModel, MODEL_o77, LVar0, LVar1, 1) - EVT_CALL(ScaleModel, MODEL_o78, LVar1, LVar0, 1) - EVT_CALL(ScaleModel, MODEL_o45, LVar0, LVar1, 1) - EVT_CALL(ScaleModel, MODEL_o56, LVar0, LVar1, 1) - EVT_ADD(LVarF, 1) - EVT_IF_GE(LVarF, 30) - EVT_SET(LVarF, 0) - EVT_END_IF - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_THREAD - EVT_RETURN - EVT_END + Call(ParentColliderToModel, COLLIDER_o77, MODEL_g17) + Call(ParentColliderToModel, COLLIDER_o78, MODEL_g21) + Call(ParentColliderToModel, COLLIDER_o76, MODEL_g22) + Call(ParentColliderToModel, COLLIDER_o79, MODEL_g23) + Call(SetModelFlags, MODEL_g17, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Call(SetModelFlags, MODEL_g21, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Call(SetModelFlags, MODEL_g22, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Call(SetModelFlags, MODEL_g23, MODEL_FLAG_USE_CAMERA_UNK_MATRIX, TRUE) + Exec(N(EVS_AnimatePlatforms)) + BindTrigger(Ref(N(EVS_AddPlayerWeight_Platform_01)), TRIGGER_FLOOR_TOUCH, COLLIDER_o77, 1, 0) + BindTrigger(Ref(N(EVS_AddPlayerWeight_Platform_02)), TRIGGER_FLOOR_TOUCH, COLLIDER_o78, 1, 0) + BindTrigger(Ref(N(EVS_AddPlayerWeight_Platform_03)), TRIGGER_FLOOR_TOUCH, COLLIDER_o76, 1, 0) + BindTrigger(Ref(N(EVS_AddPlayerWeight_Platform_04)), TRIGGER_FLOOR_TOUCH, COLLIDER_o79, 1, 0) + Thread + Set(LVarF, 0) + Label(0) + Call(N(CosInterpAbsMinMax), LVarF, LVar0, Float(0.968), Float(1.031), 15, 0, 0) + Call(N(CosInterpAbsMinMax), LVarF, LVar1, Float(1.031), Float(0.968), 15, 0, 0) + Call(ScaleModel, MODEL_o73, LVar1, LVar0, 1) + Call(ScaleModel, MODEL_o74, LVar1, LVar0, 1) + Call(ScaleModel, MODEL_o75, LVar0, LVar1, 1) + Call(ScaleModel, MODEL_o76, LVar0, LVar1, 1) + Call(ScaleModel, MODEL_o77, LVar0, LVar1, 1) + Call(ScaleModel, MODEL_o78, LVar1, LVar0, 1) + Call(ScaleModel, MODEL_o45, LVar0, LVar1, 1) + Call(ScaleModel, MODEL_o56, LVar0, LVar1, 1) + Add(LVarF, 1) + IfGe(LVarF, 30) + Set(LVarF, 0) + EndIf + Wait(1) + Goto(0) + EndThread + Return + End }; */ diff --git a/src/world/dead/area_flo/flo_19/flo_19_5_beanstalk.c b/src/world/dead/area_flo/flo_19/flo_19_5_beanstalk.c index 1f38af879db..417a9c0cbb7 100644 --- a/src/world/dead/area_flo/flo_19/flo_19_5_beanstalk.c +++ b/src/world/dead/area_flo/flo_19/flo_19_5_beanstalk.c @@ -54,343 +54,343 @@ API_CALLABLE(N(SetScreenFadeAmount)) { // all data in this file is truncated /* EvtScript N(EVS_FadeOutToBlack) = { - EVT_SET(LVar0, 0) - EVT_LABEL(10) - EVT_CALL(N(SetScreenFadeAmount)) - EVT_ADD(LVar0, 25) - EVT_WAIT(1) - EVT_IF_LT(LVar0, 255) - EVT_GOTO(10) - EVT_END_IF - EVT_SET(LVar0, 255) - EVT_CALL(N(SetScreenFadeAmount)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(LVar0, 0) + Label(10) + Call(N(SetScreenFadeAmount)) + Add(LVar0, 25) + Wait(1) + IfLt(LVar0, 255) + Goto(10) + EndIf + Set(LVar0, 255) + Call(N(SetScreenFadeAmount)) + Wait(1) + Return + End }; EvtScript N(EVS_FadeInFromBlack) = { - EVT_SET(LVar0, 255) - EVT_LABEL(10) - EVT_CALL(N(SetScreenFadeAmount)) - EVT_SUB(LVar0, 25) - EVT_WAIT(1) - EVT_IF_GT(LVar0, 0) - EVT_GOTO(10) - EVT_END_IF - EVT_SET(LVar0, 0) - EVT_CALL(N(SetScreenFadeAmount)) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Set(LVar0, 255) + Label(10) + Call(N(SetScreenFadeAmount)) + Sub(LVar0, 25) + Wait(1) + IfGt(LVar0, 0) + Goto(10) + EndIf + Set(LVar0, 0) + Call(N(SetScreenFadeAmount)) + Wait(1) + Return + End }; EvtScript N(EVS_SetExteriorVineGrowth) = { - EVT_CALL(TranslateGroup, MODEL_g83, 0, LVar0, 0) - EVT_CALL(TranslateGroup, MODEL_ha, 0, LVar0, 0) - EVT_SETF(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-12.0)) - EVT_CALL(RotateGroup, MODEL_g83, LVar1, 0, 1, 0) - EVT_CALL(RotateGroup, MODEL_ha, LVar1, 0, 1, 0) - EVT_RETURN - EVT_END + Call(TranslateGroup, MODEL_g83, 0, LVar0, 0) + Call(TranslateGroup, MODEL_ha, 0, LVar0, 0) + SetF(LVar1, LVar0) + MulF(LVar1, Float(-12.0)) + Call(RotateGroup, MODEL_g83, LVar1, 0, 1, 0) + Call(RotateGroup, MODEL_ha, LVar1, 0, 1, 0) + Return + End }; EvtScript N(EVS_SetInteriorVineGrowth) = { - EVT_CALL(TranslateGroup, MODEL_g84, 0, LVar0, 0) - EVT_SETF(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-12.0)) - EVT_CALL(RotateGroup, MODEL_g84, LVar1, 0, 1, 0) - EVT_RETURN - EVT_END + Call(TranslateGroup, MODEL_g84, 0, LVar0, 0) + SetF(LVar1, LVar0) + MulF(LVar1, Float(-12.0)) + Call(RotateGroup, MODEL_g84, LVar1, 0, 1, 0) + Return + End }; EvtScript N(EVS_Enter_Beanstalk) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o108, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o122, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(SetCamType, CAM_DEFAULT, 1, FALSE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(11.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(EnableGroup, MODEL_g16, FALSE) - EVT_CALL(EnableGroup, MODEL_g2, FALSE) - EVT_CALL(EnableGroup, MODEL_g3, FALSE) - EVT_CALL(EnableGroup, MODEL_g19, FALSE) - EVT_CALL(EnableGroup, MODEL_g93, FALSE) - EVT_CALL(EnableGroup, MODEL_g15, FALSE) - EVT_CALL(EnableGroup, MODEL_g25, FALSE) - EVT_SET(LVar9, EVT_FLOAT(45.0)) - EVT_SET(LVarA, EVT_FLOAT(28.0)) - EVT_SET(LVarB, EVT_FLOAT(5.0)) - EVT_SET(LVarC, EVT_FLOAT(60.0)) - EVT_SET(LVarD, EVT_FLOAT(28.0)) - EVT_SET(LVarE, EVT_FLOAT(10.0)) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Walk) - EVT_SWITCH(AF_FLO_BeanstalkFacingRight) - EVT_CASE_EQ(0) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_CASE_EQ(1) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_END_SWITCH - EVT_END_THREAD - EVT_CALL(TranslateModel, MODEL_o142, EVT_FLOAT(1.313), EVT_FLOAT(3.0), EVT_FLOAT(-0.56640625)) - EVT_CALL(UpdateColliderTransform, COLLIDER_o117) - EVT_THREAD - EVT_SET(AF_FLO_BeanstalkFadedOut, FALSE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Walk) - EVT_WAIT(200) - EVT_EXEC_WAIT(N(EVS_FadeOutToBlack)) - EVT_SET(AF_FLO_BeanstalkFadedOut, TRUE) - EVT_WAIT(10) - EVT_CALL(EnableGroup, MODEL_g16, TRUE) - EVT_CALL(EnableGroup, MODEL_g2, TRUE) - EVT_CALL(EnableGroup, MODEL_g3, TRUE) - EVT_CALL(EnableGroup, MODEL_g19, TRUE) - EVT_CALL(EnableGroup, MODEL_g93, TRUE) - EVT_CALL(EnableGroup, MODEL_g15, TRUE) - EVT_CALL(EnableGroup, MODEL_g25, TRUE) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 450) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-6.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC_WAIT(N(EVS_FadeInFromBlack)) - EVT_WAIT(20) - EVT_SET(AF_FLO_BeanstalkFadedOut, FALSE) - EVT_END_THREAD - EVT_SET(LVarF, 0) - EVT_LOOP(344) - EVT_ADD(LVarF, 1) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, -210, 0, 344, 0, 0) - EVT_SETF(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-3.0)) - EVT_CALL(TranslateModel, MODEL_o142, EVT_FLOAT(1.313), LVar0, EVT_FLOAT(-0.56640625)) - EVT_CALL(RotateModel, MODEL_o142, LVar1, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o117) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(-3.0)) - EVT_SETF(LVar3, LVar0) - EVT_CALL(N(PlayerRideBeanstalk)) - EVT_CALL(N(PartnerRideBeanstalk)) - EVT_LABEL(11) - EVT_WAIT(1) - EVT_IF_EQ(AF_FLO_BeanstalkFadedOut, TRUE) - EVT_GOTO(11) - EVT_END_IF - EVT_END_LOOP - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o108, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o122, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(EnablePartnerAI) - EVT_CALL(ClearPartnerMoveHistory, NPC_PARTNER) - EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0)) - EVT_CALL(PlayerJump, 100, 0, 60, 20) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_WAIT(5) - EVT_SET(AF_FLO_RidingBeanstalk, FALSE) - EVT_CALL(StopSound, SOUND_FLO_RIDE_BEANSTALK_UP_LOOP) - EVT_EXEC_WAIT(N(EVS_SetupMusic)) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o108, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o122, COLLIDER_FLAGS_UPPER_MASK) + Call(SetCamType, CAM_DEFAULT, 1, FALSE) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(11.0)) + Call(SetCamPosA, CAM_DEFAULT, 0, 0) + Call(SetCamPosB, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(EnableGroup, MODEL_g16, FALSE) + Call(EnableGroup, MODEL_g2, FALSE) + Call(EnableGroup, MODEL_g3, FALSE) + Call(EnableGroup, MODEL_g19, FALSE) + Call(EnableGroup, MODEL_g93, FALSE) + Call(EnableGroup, MODEL_g15, FALSE) + Call(EnableGroup, MODEL_g25, FALSE) + Set(LVar9, Float(45.0)) + Set(LVarA, Float(28.0)) + Set(LVarB, Float(5.0)) + Set(LVarC, Float(60.0)) + Set(LVarD, Float(28.0)) + Set(LVarE, Float(10.0)) + Thread + Wait(5) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(SetPlayerAnimation, ANIM_Mario1_Walk) + Switch(AF_FLO_BeanstalkFacingRight) + CaseEq(0) + Call(InterpPlayerYaw, 90, 0) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + CaseEq(1) + Call(InterpPlayerYaw, 270, 0) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + EndSwitch + EndThread + Call(TranslateModel, MODEL_o142, Float(1.313), Float(3.0), Float(-0.56640625)) + Call(UpdateColliderTransform, COLLIDER_o117) + Thread + Set(AF_FLO_BeanstalkFadedOut, FALSE) + Call(SetPlayerAnimation, ANIM_Mario1_Walk) + Wait(200) + ExecWait(N(EVS_FadeOutToBlack)) + Set(AF_FLO_BeanstalkFadedOut, TRUE) + Wait(10) + Call(EnableGroup, MODEL_g16, TRUE) + Call(EnableGroup, MODEL_g2, TRUE) + Call(EnableGroup, MODEL_g3, TRUE) + Call(EnableGroup, MODEL_g19, TRUE) + Call(EnableGroup, MODEL_g93, TRUE) + Call(EnableGroup, MODEL_g15, TRUE) + Call(EnableGroup, MODEL_g25, TRUE) + Call(SetCamDistance, CAM_DEFAULT, 450) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(-6.0)) + Call(SetCamPosA, CAM_DEFAULT, 0, 0) + Call(SetCamPosB, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + ExecWait(N(EVS_FadeInFromBlack)) + Wait(20) + Set(AF_FLO_BeanstalkFadedOut, FALSE) + EndThread + Set(LVarF, 0) + Loop(344) + Add(LVarF, 1) + Call(N(CosInterpMinMax), LVarF, LVar0, -210, 0, 344, 0, 0) + SetF(LVar1, LVar0) + MulF(LVar1, Float(-3.0)) + Call(TranslateModel, MODEL_o142, Float(1.313), LVar0, Float(-0.56640625)) + Call(RotateModel, MODEL_o142, LVar1, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_o117) + SetF(LVar2, LVar0) + MulF(LVar2, Float(-3.0)) + SetF(LVar3, LVar0) + Call(N(PlayerRideBeanstalk)) + Call(N(PartnerRideBeanstalk)) + Label(11) + Wait(1) + IfEq(AF_FLO_BeanstalkFadedOut, TRUE) + Goto(11) + EndIf + EndLoop + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o108, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o122, COLLIDER_FLAGS_UPPER_MASK) + Call(EnablePartnerAI) + Call(ClearPartnerMoveHistory, NPC_PARTNER) + Call(SetPlayerJumpscale, Float(1.0)) + Call(PlayerJump, 100, 0, 60, 20) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(InterpPlayerYaw, 90, 0) + Wait(5) + Set(AF_FLO_RidingBeanstalk, FALSE) + Call(StopSound, SOUND_FLO_RIDE_BEANSTALK_UP_LOOP) + ExecWait(N(EVS_SetupMusic)) + Call(ResetCam, CAM_DEFAULT, Float(1.0)) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_Exit_Beanstalk) = { - EVT_IF_EQ(AF_FLO_RidingBeanstalk, FALSE) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(InterruptUsePartner) - EVT_WAIT(15) - EVT_CALL(DisablePartnerAI, 0) - EVT_SET(AF_FLO_RidingBeanstalk, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o108, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o122, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(LVar9, EVT_FLOAT(45.0)) - EVT_SET(LVarA, EVT_FLOAT(28.0)) - EVT_SET(LVarB, EVT_FLOAT(5.0)) - EVT_SET(LVarC, EVT_FLOAT(60.0)) - EVT_SET(LVarD, EVT_FLOAT(28.0)) - EVT_SET(LVarE, EVT_FLOAT(10.0)) - EVT_CALL(PlayerMoveTo, LVar9, LVarB, 8) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0)) - EVT_CALL(NpcJump0, NPC_PARTNER, LVarC, LVarD, LVarE, 5) - EVT_CALL(PlaySound, SOUND_FLO_RIDE_BEANSTALK_DOWN_LOOP) - EVT_CALL(SetMusicTrack, 0, SONG_MAGIC_BEANSTALK, 1, 8) - EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Walk) - EVT_CALL(N(GetPlayerAngles), LVar3, LVar4) - EVT_SWITCH(LVar4) - EVT_CASE_LT(90) - EVT_SET(AF_FLO_BeanstalkFacingRight, FALSE) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_CASE_GE(270) - EVT_SET(AF_FLO_BeanstalkFacingRight, TRUE) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_END_SWITCH - EVT_CALL(TranslateModel, MODEL_o142, EVT_FLOAT(1.313), EVT_FLOAT(3.0), EVT_FLOAT(-0.56640625)) - EVT_CALL(UpdateColliderTransform, COLLIDER_o117) - EVT_SET(MV_BeanstalkSceneSync, FALSE) - EVT_THREAD - EVT_SET(AF_FLO_BeanstalkFadedOut, FALSE) - EVT_WAIT(120) - EVT_SET(AF_FLO_BeanstalkFadedOut, TRUE) - EVT_WAIT(20) - EVT_EXEC_WAIT(N(EVS_FadeOutToBlack)) - EVT_WAIT(10) - EVT_CALL(EnableGroup, MODEL_g16, FALSE) - EVT_CALL(EnableGroup, MODEL_g2, FALSE) - EVT_CALL(EnableGroup, MODEL_g3, FALSE) - EVT_CALL(EnableGroup, MODEL_g19, FALSE) - EVT_CALL(EnableGroup, MODEL_g93, FALSE) - EVT_CALL(EnableGroup, MODEL_g15, FALSE) - EVT_CALL(EnableGroup, MODEL_g25, FALSE) - EVT_CALL(SetCamType, CAM_DEFAULT, 1, FALSE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 350) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(7.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_SET(AF_FLO_BeanstalkFadedOut, FALSE) - EVT_EXEC_WAIT(N(EVS_FadeInFromBlack)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVarF, 0) - EVT_LOOP(344) - EVT_ADD(LVarF, 1) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, 0, -210, 344, 0, 0) - EVT_SETF(LVar1, LVar0) - EVT_MULF(LVar1, EVT_FLOAT(-3.0)) - EVT_CALL(TranslateModel, MODEL_o142, EVT_FLOAT(1.313), LVar0, EVT_FLOAT(-0.56640625)) - EVT_CALL(RotateModel, MODEL_o142, LVar1, 0, 1, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o117) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(-3.0)) - EVT_SETF(LVar3, LVar0) - EVT_CALL(N(PlayerRideBeanstalk)) - EVT_CALL(N(PartnerRideBeanstalk)) - EVT_IF_EQ(LVarF, 300) - EVT_SET(MV_BeanstalkSceneSync, TRUE) - EVT_END_IF - EVT_LABEL(11) - EVT_WAIT(1) - EVT_IF_EQ(AF_FLO_BeanstalkFadedOut, TRUE) - EVT_GOTO(11) - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_LABEL(10) - EVT_IF_EQ(MV_BeanstalkSceneSync, FALSE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(GotoMap, EVT_PTR("flo_00"), flo_00_ENTRY_8) - EVT_WAIT(100) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(AF_FLO_RidingBeanstalk, FALSE) + Call(DisablePlayerInput, TRUE) + Call(InterruptUsePartner) + Wait(15) + Call(DisablePartnerAI, 0) + Set(AF_FLO_RidingBeanstalk, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o108, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o122, COLLIDER_FLAGS_UPPER_MASK) + Set(LVar9, Float(45.0)) + Set(LVarA, Float(28.0)) + Set(LVarB, Float(5.0)) + Set(LVarC, Float(60.0)) + Set(LVarD, Float(28.0)) + Set(LVarE, Float(10.0)) + Call(PlayerMoveTo, LVar9, LVarB, 8) + Call(SetNpcJumpscale, NPC_PARTNER, Float(0.0)) + Call(NpcJump0, NPC_PARTNER, LVarC, LVarD, LVarE, 5) + Call(PlaySound, SOUND_FLO_RIDE_BEANSTALK_DOWN_LOOP) + Call(SetMusicTrack, 0, SONG_MAGIC_BEANSTALK, 1, 8) + Call(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_IDLE) + Call(SetPlayerAnimation, ANIM_Mario1_Walk) + Call(N(GetPlayerAngles), LVar3, LVar4) + Switch(LVar4) + CaseLt(90) + Set(AF_FLO_BeanstalkFacingRight, FALSE) + Call(InterpPlayerYaw, 90, 0) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + CaseGe(270) + Set(AF_FLO_BeanstalkFacingRight, TRUE) + Call(InterpPlayerYaw, 270, 0) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + EndSwitch + Call(TranslateModel, MODEL_o142, Float(1.313), Float(3.0), Float(-0.56640625)) + Call(UpdateColliderTransform, COLLIDER_o117) + Set(MV_BeanstalkSceneSync, FALSE) + Thread + Set(AF_FLO_BeanstalkFadedOut, FALSE) + Wait(120) + Set(AF_FLO_BeanstalkFadedOut, TRUE) + Wait(20) + ExecWait(N(EVS_FadeOutToBlack)) + Wait(10) + Call(EnableGroup, MODEL_g16, FALSE) + Call(EnableGroup, MODEL_g2, FALSE) + Call(EnableGroup, MODEL_g3, FALSE) + Call(EnableGroup, MODEL_g19, FALSE) + Call(EnableGroup, MODEL_g93, FALSE) + Call(EnableGroup, MODEL_g15, FALSE) + Call(EnableGroup, MODEL_g25, FALSE) + Call(SetCamType, CAM_DEFAULT, 1, FALSE) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, 350) + Call(SetCamPitch, CAM_DEFAULT, Float(17.0), Float(7.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Set(AF_FLO_BeanstalkFadedOut, FALSE) + ExecWait(N(EVS_FadeInFromBlack)) + EndThread + Thread + Set(LVarF, 0) + Loop(344) + Add(LVarF, 1) + Call(N(CosInterpMinMax), LVarF, LVar0, 0, -210, 344, 0, 0) + SetF(LVar1, LVar0) + MulF(LVar1, Float(-3.0)) + Call(TranslateModel, MODEL_o142, Float(1.313), LVar0, Float(-0.56640625)) + Call(RotateModel, MODEL_o142, LVar1, 0, 1, 0) + Call(UpdateColliderTransform, COLLIDER_o117) + SetF(LVar2, LVar0) + MulF(LVar2, Float(-3.0)) + SetF(LVar3, LVar0) + Call(N(PlayerRideBeanstalk)) + Call(N(PartnerRideBeanstalk)) + IfEq(LVarF, 300) + Set(MV_BeanstalkSceneSync, TRUE) + EndIf + Label(11) + Wait(1) + IfEq(AF_FLO_BeanstalkFadedOut, TRUE) + Goto(11) + EndIf + EndLoop + EndThread + Label(10) + IfEq(MV_BeanstalkSceneSync, FALSE) + Wait(1) + Goto(10) + EndIf + Call(GotoMap, Ref("flo_00"), flo_00_ENTRY_8) + Wait(100) + EndIf + Return + End }; EvtScript N(EVS_Scene_BeanstalkGrowing) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(EnableModel, MODEL_o142, FALSE) - EVT_CALL(EnableGroup, MODEL_g16, FALSE) - EVT_CALL(EnableGroup, MODEL_g2, FALSE) - EVT_CALL(EnableGroup, MODEL_g3, FALSE) - EVT_CALL(EnableGroup, MODEL_g19, FALSE) - EVT_CALL(EnableGroup, MODEL_g93, FALSE) - EVT_CALL(EnableGroup, MODEL_g15, FALSE) - EVT_CALL(EnableGroup, MODEL_g25, FALSE) - EVT_CALL(SetCamType, CAM_DEFAULT, 1, FALSE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 800) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(-20.0), EVT_FLOAT(8.5)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_SET(LVarF, 100) - EVT_SET(MV_BeanstalkGrowthProgress, LVarF) - EVT_SET(AF_FLO_BeanstalkGrowing, FALSE) - EVT_LOOP(400) - EVT_IF_EQ(AF_FLO_BeanstalkGrowing, FALSE) - EVT_IF_GT(MV_BeanstalkGrowthProgress, 400) - EVT_CALL(EnableGroup, MODEL_tuta, FALSE) - EVT_CALL(EnableGroup, MODEL_ha, FALSE) - EVT_CALL(EnableGroup, MODEL_g16, TRUE) - EVT_CALL(EnableGroup, MODEL_g2, TRUE) - EVT_CALL(EnableGroup, MODEL_g3, TRUE) - EVT_CALL(EnableGroup, MODEL_g19, TRUE) - EVT_CALL(EnableGroup, MODEL_g93, TRUE) - EVT_CALL(EnableGroup, MODEL_g15, TRUE) - EVT_CALL(EnableGroup, MODEL_g25, TRUE) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 1000) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(45.0), EVT_FLOAT(-3.0)) - EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_SET(LVarF, 150) - EVT_THREAD - EVT_WAIT(5) - EVT_CALL(EnableGroup, MODEL_tuta, TRUE) - EVT_CALL(EnableGroup, MODEL_ha, TRUE) - EVT_CALL(EnableModel, MODEL_o142, FALSE) - EVT_WAIT(48) - EVT_PLAY_EFFECT(EFFECT_CLOUD_PUFF, 0, 22, 15, 0) - EVT_WAIT(10) - EVT_PLAY_EFFECT(EFFECT_CLOUD_PUFF, 0, 22, 15, 0) - EVT_END_THREAD - EVT_SET(AF_FLO_BeanstalkGrowing, TRUE) - EVT_END_IF - EVT_END_IF - EVT_ADD(LVarF, 1) - EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, -350, 0, 400, 0, 0) - EVT_SETF(MV_BeanstalkGrowthProgress, LVarF) - EVT_MULF(MV_BeanstalkGrowthProgress, EVT_FLOAT(1.6)) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(1.0)) - EVT_SETF(LVar0, LVar2) - EVT_EXEC(N(EVS_SetExteriorVineGrowth)) - EVT_SETF(LVar2, LVar0) - EVT_MULF(LVar2, EVT_FLOAT(1.0)) - EVT_SETF(LVar0, LVar2) - EVT_EXEC(N(EVS_SetInteriorVineGrowth)) - EVT_WAIT(1) - EVT_END_LOOP - EVT_WAIT(15) - EVT_SET(GB_StoryProgress, STORY_CH6_GREW_MAGIC_BEANSTALK) - EVT_CALL(GotoMap, EVT_PTR("flo_00"), flo_00_ENTRY_7) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(EnableModel, MODEL_o142, FALSE) + Call(EnableGroup, MODEL_g16, FALSE) + Call(EnableGroup, MODEL_g2, FALSE) + Call(EnableGroup, MODEL_g3, FALSE) + Call(EnableGroup, MODEL_g19, FALSE) + Call(EnableGroup, MODEL_g93, FALSE) + Call(EnableGroup, MODEL_g15, FALSE) + Call(EnableGroup, MODEL_g25, FALSE) + Call(SetCamType, CAM_DEFAULT, 1, FALSE) + Call(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0) + Call(SetPanTarget, CAM_DEFAULT, 0, 0, 0) + Call(SetCamDistance, CAM_DEFAULT, 800) + Call(SetCamPitch, CAM_DEFAULT, Float(-20.0), Float(8.5)) + Call(SetCamPosA, CAM_DEFAULT, 0, 0) + Call(SetCamPosB, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Set(LVarF, 100) + Set(MV_BeanstalkGrowthProgress, LVarF) + Set(AF_FLO_BeanstalkGrowing, FALSE) + Loop(400) + IfEq(AF_FLO_BeanstalkGrowing, FALSE) + IfGt(MV_BeanstalkGrowthProgress, 400) + Call(EnableGroup, MODEL_tuta, FALSE) + Call(EnableGroup, MODEL_ha, FALSE) + Call(EnableGroup, MODEL_g16, TRUE) + Call(EnableGroup, MODEL_g2, TRUE) + Call(EnableGroup, MODEL_g3, TRUE) + Call(EnableGroup, MODEL_g19, TRUE) + Call(EnableGroup, MODEL_g93, TRUE) + Call(EnableGroup, MODEL_g15, TRUE) + Call(EnableGroup, MODEL_g25, TRUE) + Call(SetCamDistance, CAM_DEFAULT, 1000) + Call(SetCamPitch, CAM_DEFAULT, Float(45.0), Float(-3.0)) + Call(SetCamPosA, CAM_DEFAULT, 0, 0) + Call(SetCamPosB, CAM_DEFAULT, 0, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Set(LVarF, 150) + Thread + Wait(5) + Call(EnableGroup, MODEL_tuta, TRUE) + Call(EnableGroup, MODEL_ha, TRUE) + Call(EnableModel, MODEL_o142, FALSE) + Wait(48) + PlayEffect(EFFECT_CLOUD_PUFF, 0, 22, 15, 0) + Wait(10) + PlayEffect(EFFECT_CLOUD_PUFF, 0, 22, 15, 0) + EndThread + Set(AF_FLO_BeanstalkGrowing, TRUE) + EndIf + EndIf + Add(LVarF, 1) + Call(N(CosInterpMinMax), LVarF, LVar0, -350, 0, 400, 0, 0) + SetF(MV_BeanstalkGrowthProgress, LVarF) + MulF(MV_BeanstalkGrowthProgress, Float(1.6)) + SetF(LVar2, LVar0) + MulF(LVar2, Float(1.0)) + SetF(LVar0, LVar2) + Exec(N(EVS_SetExteriorVineGrowth)) + SetF(LVar2, LVar0) + MulF(LVar2, Float(1.0)) + SetF(LVar0, LVar2) + Exec(N(EVS_SetInteriorVineGrowth)) + Wait(1) + EndLoop + Wait(15) + Set(GB_StoryProgress, STORY_CH6_GREW_MAGIC_BEANSTALK) + Call(GotoMap, Ref("flo_00"), flo_00_ENTRY_7) + Return + End }; EvtScript N(EVS_SetupBeanstalk) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Exit_Beanstalk)), TRIGGER_FLOOR_TOUCH, COLLIDER_o117, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_Exit_Beanstalk)), TRIGGER_FLOOR_TOUCH, COLLIDER_o117, 1, 0) + Return + End }; */ diff --git a/src/world/dead/area_kzn/kzn_11/kzn_11_1_main.c b/src/world/dead/area_kzn/kzn_11/kzn_11_1_main.c index b6dc2267115..3ff38dedc73 100644 --- a/src/world/dead/area_kzn/kzn_11/kzn_11_1_main.c +++ b/src/world/dead/area_kzn/kzn_11/kzn_11_1_main.c @@ -6,42 +6,42 @@ EvtScript N(EVS_ExitWalk_kzn_10_1) = EVT_EXIT_WALK(60, kzn_11_ENTRY_0, "kzn_10", EvtScript N(EVS_ExitWalk_kzn_17_0) = EVT_EXIT_WALK(60, kzn_11_ENTRY_1, "kzn_17", kzn_17_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kzn_10_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kzn_17_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kzn_10_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kzn_17_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + Return + End }; EvtScript N(EVS_StartTexPanners_Lava) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, MODEL_yougan1_1, TEX_PANNER_2) - EVT_CALL(EnableTexPanning, MODEL_toro, TRUE) - EVT_CALL(EnableTexPanning, MODEL_poko, TRUE) - EVT_THREAD + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, MODEL_yougan1_1, TEX_PANNER_2) + Call(EnableTexPanning, MODEL_toro, TRUE) + Call(EnableTexPanning, MODEL_poko, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( 200, 0, 400, -100) TEX_PAN_PARAMS_FREQ( 1, 0, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_5) TEX_PAN_PARAMS_STEP( 300, -500, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread // animate lava bubbles (real ones, not the enemies) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, LVar0, 0) - EVT_ADD(LVar0, 0x8000) - EVT_WAIT(6) - EVT_END_LOOP - EVT_END_THREAD - EVT_RETURN - EVT_END + Set(LVar0, 0) + Loop(0) + Call(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, LVar0, 0) + Add(LVar0, 0x8000) + Wait(6) + EndLoop + EndThread + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -53,35 +53,35 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_LAVALAVA) - EVT_CALL(SetSpriteShading, SHADING_KZN_11) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_CALL(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_1) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o175, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o176, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o177, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o178, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o156, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o179, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o180, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o181, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_pp1, SURFACE_TYPE_LAVA) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_pp2, SURFACE_TYPE_LAVA) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_EXEC(N(EVS_StartTexPanners_Lava)) - EVT_SET(LVar0, MODEL_kem1) - EVT_EXEC(N(EVS_StartTexPanner_SmokeLeft)) - EVT_SET(LVar0, MODEL_kem2) - EVT_EXEC(N(EVS_StartTexPanner_SmokeRight)) - EVT_EXEC(N(EVS_UpdateLeftPlatform)) - EVT_EXEC(N(EVS_UpdateRightPlatform)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_LAVALAVA) + Call(SetSpriteShading, SHADING_KZN_11) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Call(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) + Call(PlayAmbientSounds, AMBIENT_LAVA_1) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o175, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o176, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o177, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o178, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o156, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o179, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o180, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o181, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_pp1, SURFACE_TYPE_LAVA) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_pp2, SURFACE_TYPE_LAVA) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + Exec(N(EVS_StartTexPanners_Lava)) + Set(LVar0, MODEL_kem1) + Exec(N(EVS_StartTexPanner_SmokeLeft)) + Set(LVar0, MODEL_kem2) + Exec(N(EVS_StartTexPanner_SmokeRight)) + Exec(N(EVS_UpdateLeftPlatform)) + Exec(N(EVS_UpdateRightPlatform)) + Return + End }; diff --git a/src/world/dead/area_kzn/kzn_11/kzn_11_2_platforms.c b/src/world/dead/area_kzn/kzn_11/kzn_11_2_platforms.c index 3f0a7ca6509..85733123bf3 100644 --- a/src/world/dead/area_kzn/kzn_11/kzn_11_2_platforms.c +++ b/src/world/dead/area_kzn/kzn_11/kzn_11_2_platforms.c @@ -40,131 +40,131 @@ API_CALLABLE(N(IsPartnerLakilester)) { } EvtScript N(EVS_UpdateLeftPlatform) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_CALL(ParentColliderToModel, COLLIDER_o67, MODEL_o67) - EVT_CALL(ParentColliderToModel, COLLIDER_o68, MODEL_o68) - EVT_CALL(ParentColliderToModel, COLLIDER_o69, MODEL_o69) - EVT_SET(LVar0, 60) - EVT_SET(LVar3, 0) - EVT_LOOP(0) - EVT_CALL(MakeLerp, LVar0, -60, 120, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g7, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o67) - EVT_CALL(UpdateColliderTransform, COLLIDER_o68) - EVT_CALL(UpdateColliderTransform, COLLIDER_o69) - EVT_SET(LVar4, LVar0) - EVT_SUB(LVar4, LVar3) - EVT_SET(LVar3, LVar0) - EVT_CALL(N(AddPushVelocity), LVar4, 26, 25) - EVT_IF_LT(LVar0, -45) - EVT_CALL(N(IsPartnerLakilester)) - EVT_IF_EQ(LVar9, 1) - EVT_CALL(N(GetCurrentFloor), LVar2) - EVT_IF_EQ(LVar2, COLLIDER_pp1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_CALL(MakeLerp, LVar0, 60, 120, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g7, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o67) - EVT_CALL(UpdateColliderTransform, COLLIDER_o68) - EVT_CALL(UpdateColliderTransform, COLLIDER_o69) - EVT_SET(LVar4, LVar0) - EVT_SUB(LVar4, LVar3) - EVT_SET(LVar3, LVar0) - EVT_CALL(N(AddPushVelocity), LVar4, 26, 25) - EVT_IF_GT(LVar0, 45) - EVT_CALL(N(IsPartnerLakilester)) - EVT_IF_EQ(LVar9, 1) - EVT_CALL(N(GetCurrentFloor), LVar2) - EVT_IF_EQ(LVar2, COLLIDER_pp2) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_END_LOOP - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0B) + Call(ParentColliderToModel, COLLIDER_o67, MODEL_o67) + Call(ParentColliderToModel, COLLIDER_o68, MODEL_o68) + Call(ParentColliderToModel, COLLIDER_o69, MODEL_o69) + Set(LVar0, 60) + Set(LVar3, 0) + Loop(0) + Call(MakeLerp, LVar0, -60, 120, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g7, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o67) + Call(UpdateColliderTransform, COLLIDER_o68) + Call(UpdateColliderTransform, COLLIDER_o69) + Set(LVar4, LVar0) + Sub(LVar4, LVar3) + Set(LVar3, LVar0) + Call(N(AddPushVelocity), LVar4, 26, 25) + IfLt(LVar0, -45) + Call(N(IsPartnerLakilester)) + IfEq(LVar9, 1) + Call(N(GetCurrentFloor), LVar2) + IfEq(LVar2, COLLIDER_pp1) + BreakLoop + EndIf + EndIf + EndIf + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(20) + Call(MakeLerp, LVar0, 60, 120, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g7, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o67) + Call(UpdateColliderTransform, COLLIDER_o68) + Call(UpdateColliderTransform, COLLIDER_o69) + Set(LVar4, LVar0) + Sub(LVar4, LVar3) + Set(LVar3, LVar0) + Call(N(AddPushVelocity), LVar4, 26, 25) + IfGt(LVar0, 45) + Call(N(IsPartnerLakilester)) + IfEq(LVar9, 1) + Call(N(GetCurrentFloor), LVar2) + IfEq(LVar2, COLLIDER_pp2) + BreakLoop + EndIf + EndIf + EndIf + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(20) + EndLoop + Return + End }; EvtScript N(EVS_UpdateRightPlatform) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_CALL(ParentColliderToModel, COLLIDER_o26, MODEL_o26) - EVT_CALL(ParentColliderToModel, COLLIDER_o27, MODEL_o27) - EVT_CALL(ParentColliderToModel, COLLIDER_o28, MODEL_o28) - EVT_SET(LVar0, 135) - EVT_SET(LVar3, 0) - EVT_LOOP(0) - EVT_CALL(MakeLerp, LVar0, -60, 195, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g14, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o26) - EVT_CALL(UpdateColliderTransform, COLLIDER_o27) - EVT_CALL(UpdateColliderTransform, COLLIDER_o28) - EVT_SET(LVar4, LVar0) - EVT_SUB(LVar4, LVar3) - EVT_SET(LVar3, LVar0) - EVT_CALL(N(AddPushVelocity), LVar4, 30, 29) - EVT_IF_LT(LVar0, -45) - EVT_CALL(N(IsPartnerLakilester)) - EVT_IF_EQ(LVar9, 1) - EVT_CALL(N(GetCurrentFloor), LVar2) - EVT_IF_EQ(LVar2, COLLIDER_pp1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_CALL(MakeLerp, LVar0, 135, 195, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateGroup, MODEL_g14, LVar0, 0, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_o26) - EVT_CALL(UpdateColliderTransform, COLLIDER_o27) - EVT_CALL(UpdateColliderTransform, COLLIDER_o28) - EVT_SET(LVar4, LVar0) - EVT_SUB(LVar4, LVar3) - EVT_SET(LVar3, LVar0) - EVT_CALL(N(AddPushVelocity), LVar4, 30, 29) - EVT_IF_GT(LVar0, 120) - EVT_CALL(N(IsPartnerLakilester)) - EVT_IF_EQ(LVar9, 1) - EVT_CALL(N(GetCurrentFloor), LVar2) - EVT_IF_EQ(LVar2, COLLIDER_pp2) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_WAIT(20) - EVT_END_LOOP - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0B) + Call(ParentColliderToModel, COLLIDER_o26, MODEL_o26) + Call(ParentColliderToModel, COLLIDER_o27, MODEL_o27) + Call(ParentColliderToModel, COLLIDER_o28, MODEL_o28) + Set(LVar0, 135) + Set(LVar3, 0) + Loop(0) + Call(MakeLerp, LVar0, -60, 195, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g14, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o26) + Call(UpdateColliderTransform, COLLIDER_o27) + Call(UpdateColliderTransform, COLLIDER_o28) + Set(LVar4, LVar0) + Sub(LVar4, LVar3) + Set(LVar3, LVar0) + Call(N(AddPushVelocity), LVar4, 30, 29) + IfLt(LVar0, -45) + Call(N(IsPartnerLakilester)) + IfEq(LVar9, 1) + Call(N(GetCurrentFloor), LVar2) + IfEq(LVar2, COLLIDER_pp1) + BreakLoop + EndIf + EndIf + EndIf + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(20) + Call(MakeLerp, LVar0, 135, 195, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Call(TranslateGroup, MODEL_g14, LVar0, 0, 0) + Call(UpdateColliderTransform, COLLIDER_o26) + Call(UpdateColliderTransform, COLLIDER_o27) + Call(UpdateColliderTransform, COLLIDER_o28) + Set(LVar4, LVar0) + Sub(LVar4, LVar3) + Set(LVar3, LVar0) + Call(N(AddPushVelocity), LVar4, 30, 29) + IfGt(LVar0, 120) + Call(N(IsPartnerLakilester)) + IfEq(LVar9, 1) + Call(N(GetCurrentFloor), LVar2) + IfEq(LVar2, COLLIDER_pp2) + BreakLoop + EndIf + EndIf + EndIf + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Wait(20) + EndLoop + Return + End }; diff --git a/src/world/dead/area_kzn/kzn_11/kzn_11_3_npc.c b/src/world/dead/area_kzn/kzn_11/kzn_11_3_npc.c index 12dcda2270a..23e865ced27 100644 --- a/src/world/dead/area_kzn/kzn_11/kzn_11_3_npc.c +++ b/src/world/dead/area_kzn/kzn_11/kzn_11_3_npc.c @@ -12,62 +12,62 @@ s32 N(FireBar_Sounds)[] = { }; EvtScript N(EVS_FireBar_Defeated) = { - EVT_SET(LVarA, LVar0) - EVT_SET(LVarB, LVar1) - EVT_LOOP(15) - EVT_LOOP(LVar1) - EVT_CALL(SetNpcFlagBits, LVar0, NPC_FLAG_INVISIBLE, TRUE) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_WAIT(1) - EVT_SET(LVar0, LVarA) - EVT_SET(LVar1, LVarB) - EVT_LOOP(LVar1) - EVT_CALL(SetNpcFlagBits, LVar0, NPC_FLAG_INVISIBLE, FALSE) - EVT_ADD(LVar0, 1) - EVT_END_LOOP - EVT_WAIT(1) - EVT_SET(LVar0, LVarA) - EVT_SET(LVar1, LVarB) - EVT_END_LOOP - EVT_CALL(GetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(PlaySoundAt, SOUND_SEQ_FIRE_BAR_DEAD, SOUND_SPACE_DEFAULT, LVar1, LVar2, LVar3) - EVT_LOOP(10) - EVT_CALL(GetNpcPos, LVar0, LVar1, LVar2, LVar3) - EVT_CALL(RandInt, 50, LVar4) - EVT_SUB(LVar4, 25) - EVT_CALL(RandInt, 30, LVar5) - EVT_ADD(LVar1, LVar4) - EVT_ADD(LVar2, LVar5) - EVT_PLAY_EFFECT(EFFECT_00, LVar1, LVar2, LVar3, 1, 20, 3, 2) - EVT_END_LOOP - EVT_IF_EQ(LVarA, NPC_FireBar_1A) - EVT_IF_EQ(AF_KZN11_FireBar1_Coins, FALSE) - EVT_SET(AF_KZN11_FireBar1_Coins, TRUE) - EVT_LOOP(10) - EVT_CALL(MakeItemEntity, ITEM_COIN, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) - EVT_END_LOOP - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVarA, NPC_FireBar_2A) - EVT_IF_EQ(AF_KZN11_FireBar2_Coins, FALSE) - EVT_SET(AF_KZN11_FireBar2_Coins, TRUE) - EVT_LOOP(10) - EVT_CALL(MakeItemEntity, ITEM_COIN, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) - EVT_END_LOOP - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVarA, NPC_FireBar_3A) - EVT_IF_EQ(AF_KZN11_FireBar3_Coins, FALSE) - EVT_SET(AF_KZN11_FireBar3_Coins, TRUE) - EVT_LOOP(10) - EVT_CALL(MakeItemEntity, ITEM_COIN, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) - EVT_END_LOOP - EVT_END_IF - EVT_END_IF - EVT_CALL(RemoveEncounter, LVarA) - EVT_RETURN - EVT_END + Set(LVarA, LVar0) + Set(LVarB, LVar1) + Loop(15) + Loop(LVar1) + Call(SetNpcFlagBits, LVar0, NPC_FLAG_INVISIBLE, TRUE) + Add(LVar0, 1) + EndLoop + Wait(1) + Set(LVar0, LVarA) + Set(LVar1, LVarB) + Loop(LVar1) + Call(SetNpcFlagBits, LVar0, NPC_FLAG_INVISIBLE, FALSE) + Add(LVar0, 1) + EndLoop + Wait(1) + Set(LVar0, LVarA) + Set(LVar1, LVarB) + EndLoop + Call(GetNpcPos, LVar0, LVar1, LVar2, LVar3) + Call(PlaySoundAt, SOUND_SEQ_FIRE_BAR_DEAD, SOUND_SPACE_DEFAULT, LVar1, LVar2, LVar3) + Loop(10) + Call(GetNpcPos, LVar0, LVar1, LVar2, LVar3) + Call(RandInt, 50, LVar4) + Sub(LVar4, 25) + Call(RandInt, 30, LVar5) + Add(LVar1, LVar4) + Add(LVar2, LVar5) + PlayEffect(EFFECT_00, LVar1, LVar2, LVar3, 1, 20, 3, 2) + EndLoop + IfEq(LVarA, NPC_FireBar_1A) + IfEq(AF_KZN11_FireBar1_Coins, FALSE) + Set(AF_KZN11_FireBar1_Coins, TRUE) + Loop(10) + Call(MakeItemEntity, ITEM_COIN, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) + EndLoop + EndIf + EndIf + IfEq(LVarA, NPC_FireBar_2A) + IfEq(AF_KZN11_FireBar2_Coins, FALSE) + Set(AF_KZN11_FireBar2_Coins, TRUE) + Loop(10) + Call(MakeItemEntity, ITEM_COIN, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) + EndLoop + EndIf + EndIf + IfEq(LVarA, NPC_FireBar_3A) + IfEq(AF_KZN11_FireBar3_Coins, FALSE) + Set(AF_KZN11_FireBar3_Coins, TRUE) + Loop(10) + Call(MakeItemEntity, ITEM_COIN, LVar1, LVar2, LVar3, ITEM_SPAWN_MODE_TOSS_SPAWN_ALWAYS, 0) + EndLoop + EndIf + EndIf + Call(RemoveEncounter, LVarA) + Return + End }; FireBarAISettings N(AISettings_FireBar_01) = { @@ -95,21 +95,21 @@ FireBarAISettings N(AISettings_FireBar_03) = { }; EvtScript N(EVS_NpcAI_FireBar_01) = { - EVT_CALL(N(FireBarAI_Main), EVT_PTR(N(AISettings_FireBar_01))) - EVT_RETURN - EVT_END + Call(N(FireBarAI_Main), Ref(N(AISettings_FireBar_01))) + Return + End }; EvtScript N(EVS_NpcAI_FireBar_02) = { - EVT_CALL(N(FireBarAI_Main), EVT_PTR(N(AISettings_FireBar_02))) - EVT_RETURN - EVT_END + Call(N(FireBarAI_Main), Ref(N(AISettings_FireBar_02))) + Return + End }; EvtScript N(EVS_NpcAI_FireBar_03) = { - EVT_CALL(N(FireBarAI_Main), EVT_PTR(N(AISettings_FireBar_03))) - EVT_RETURN - EVT_END + Call(N(FireBarAI_Main), Ref(N(AISettings_FireBar_03))) + Return + End }; NpcSettings N(NpcSettings_FireBar_01) = { diff --git a/src/world/dead/area_kzn/kzn_17/kzn_17_1_main.c b/src/world/dead/area_kzn/kzn_17/kzn_17_1_main.c index b7445d8d40a..7e21b479ef9 100644 --- a/src/world/dead/area_kzn/kzn_17/kzn_17_1_main.c +++ b/src/world/dead/area_kzn/kzn_17/kzn_17_1_main.c @@ -6,30 +6,30 @@ EvtScript N(EVS_ExitWalk_kzn_11_1) = EVT_EXIT_WALK(60, kzn_17_ENTRY_0, "kzn_11", EvtScript N(EVS_ExitWalk_kzn_18_0) = EVT_EXIT_WALK(60, kzn_17_ENTRY_1, "kzn_18", kzn_18_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kzn_11_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kzn_18_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kzn_11_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kzn_18_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_LAVALAVA) - EVT_CALL(SetSpriteShading, SHADING_KZN_17) - EVT_CALL(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) - EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) - EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_CALL(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_1) - EVT_EXEC(N(EVS_SetupSpinyTromp)) - EVT_SET(LVar0, MODEL_kem1) - EVT_EXEC(N(EVS_StartTexPanner_SmokeLeft)) - EVT_SET(LVar0, MODEL_kem2) - EVT_EXEC(N(EVS_StartTexPanner_SmokeRight)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_LAVALAVA) + Call(SetSpriteShading, SHADING_KZN_17) + Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) + Call(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) + Call(SetCamEnabled, CAM_DEFAULT, TRUE) + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + Call(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) + Call(PlayAmbientSounds, AMBIENT_LAVA_1) + Exec(N(EVS_SetupSpinyTromp)) + Set(LVar0, MODEL_kem1) + Exec(N(EVS_StartTexPanner_SmokeLeft)) + Set(LVar0, MODEL_kem2) + Exec(N(EVS_StartTexPanner_SmokeRight)) + Return + End }; diff --git a/src/world/dead/area_kzn/kzn_17/kzn_17_2_entity.c b/src/world/dead/area_kzn/kzn_17/kzn_17_2_entity.c index 180a9592d8f..740c9180c07 100644 --- a/src/world/dead/area_kzn/kzn_17/kzn_17_2_entity.c +++ b/src/world/dead/area_kzn/kzn_17/kzn_17_2_entity.c @@ -9,78 +9,78 @@ s32 N(Unused_80243610_3610)[] = { }; EvtScript N(EVS_OnBreakBlockA) = { - EVT_SET(GF_KZN17_Hammer3BlockA, TRUE) - EVT_RETURN - EVT_END + Set(GF_KZN17_Hammer3BlockA, TRUE) + Return + End }; EvtScript N(EVS_OnBreakBlockB) = { - EVT_SET(GF_KZN17_Hammer3BlockB, TRUE) - EVT_RETURN - EVT_END + Set(GF_KZN17_Hammer3BlockB, TRUE) + Return + End }; EvtScript N(EVS_OnBreakBlockC) = { - EVT_SET(GF_KZN17_Hammer3BlockC, TRUE) - EVT_RETURN - EVT_END + Set(GF_KZN17_Hammer3BlockC, TRUE) + Return + End }; EvtScript N(EVS_OnBreakBlockD) = { - EVT_SET(GF_KZN17_Hammer3BlockD, TRUE) - EVT_RETURN - EVT_END + Set(GF_KZN17_Hammer3BlockD, TRUE) + Return + End }; EvtScript N(EVS_OnBreakBlockE) = { - EVT_SET(GF_KZN17_Hammer3BlockE, TRUE) - EVT_RETURN - EVT_END + Set(GF_KZN17_Hammer3BlockE, TRUE) + Return + End }; EvtScript N(EVS_OnBreakBlockF) = { - EVT_SET(GF_KZN17_Hammer3BlockF, TRUE) - EVT_RETURN - EVT_END + Set(GF_KZN17_Hammer3BlockF, TRUE) + Return + End }; EvtScript N(EVS_OnBreakBlockG) = { - EVT_SET(GF_KZN17_Hammer3BlockG, TRUE) - EVT_RETURN - EVT_END + Set(GF_KZN17_Hammer3BlockG, TRUE) + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_IF_EQ(GF_KZN17_Hammer3BlockA, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer3Block), -195, 50, 27, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBreakBlockA))) - EVT_END_IF - EVT_IF_EQ(GF_KZN17_Hammer3BlockB, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer3Block), -245, 60, 27, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBreakBlockB))) - EVT_END_IF - EVT_IF_EQ(GF_KZN17_Hammer3BlockC, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer3Block), -295, 70, 27, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBreakBlockC))) - EVT_END_IF - EVT_IF_EQ(GF_KZN17_Hammer3BlockD, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer3Block), -345, 80, 27, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBreakBlockD))) - EVT_END_IF - EVT_IF_EQ(GF_KZN17_Hammer3BlockE, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer3Block), -395, 90, 27, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBreakBlockE))) - EVT_END_IF - EVT_IF_EQ(GF_KZN17_Hammer3BlockF, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer3Block), -445, 100, 27, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBreakBlockF))) - EVT_END_IF - EVT_IF_EQ(GF_KZN17_Hammer3BlockG, FALSE) - EVT_CALL(MakeEntity, EVT_PTR(Entity_Hammer3Block), -495, 110, 27, 0, MAKE_ENTITY_END) - EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBreakBlockG))) - EVT_END_IF - EVT_CALL(CreatePushBlockGrid, 0, 29, 2, -119, -3, 5, 0) - EVT_CALL(SetPushBlock, 0, 28, 1, PUSH_GRID_BLOCK) - EVT_RETURN - EVT_END + IfEq(GF_KZN17_Hammer3BlockA, FALSE) + Call(MakeEntity, Ref(Entity_Hammer3Block), -195, 50, 27, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnBreakBlockA))) + EndIf + IfEq(GF_KZN17_Hammer3BlockB, FALSE) + Call(MakeEntity, Ref(Entity_Hammer3Block), -245, 60, 27, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnBreakBlockB))) + EndIf + IfEq(GF_KZN17_Hammer3BlockC, FALSE) + Call(MakeEntity, Ref(Entity_Hammer3Block), -295, 70, 27, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnBreakBlockC))) + EndIf + IfEq(GF_KZN17_Hammer3BlockD, FALSE) + Call(MakeEntity, Ref(Entity_Hammer3Block), -345, 80, 27, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnBreakBlockD))) + EndIf + IfEq(GF_KZN17_Hammer3BlockE, FALSE) + Call(MakeEntity, Ref(Entity_Hammer3Block), -395, 90, 27, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnBreakBlockE))) + EndIf + IfEq(GF_KZN17_Hammer3BlockF, FALSE) + Call(MakeEntity, Ref(Entity_Hammer3Block), -445, 100, 27, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnBreakBlockF))) + EndIf + IfEq(GF_KZN17_Hammer3BlockG, FALSE) + Call(MakeEntity, Ref(Entity_Hammer3Block), -495, 110, 27, 0, MAKE_ENTITY_END) + Call(AssignScript, Ref(N(EVS_OnBreakBlockG))) + EndIf + Call(CreatePushBlockGrid, 0, 29, 2, -119, -3, 5, 0) + Call(SetPushBlock, 0, 28, 1, PUSH_GRID_BLOCK) + Return + End }; diff --git a/src/world/dead/area_kzn/kzn_17/kzn_17_3_npc.c b/src/world/dead/area_kzn/kzn_17/kzn_17_3_npc.c index 3db2bf098c1..64fd3bda82b 100644 --- a/src/world/dead/area_kzn/kzn_17/kzn_17_3_npc.c +++ b/src/world/dead/area_kzn/kzn_17/kzn_17_3_npc.c @@ -33,104 +33,104 @@ Vec3f N(KoloradoThrownPath)[] = { }; EvtScript N(EVS_Kolorado_TrompPanic) = { - EVT_CALL(SetNpcPos, NPC_Kolorado, 447, 0, 39) - EVT_CALL(SetNpcYaw, NPC_Kolorado, 270) - EVT_CALL(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Panic) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Kolorado, 447, 0, 39) + Call(SetNpcYaw, NPC_Kolorado, 270) + Call(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Panic) + Return + End }; EvtScript N(EVS_Kolorado_TrompImpact) = { - EVT_CALL(SetEnemyFlagBits, NPC_Kolorado, ENEMY_FLAG_400000, 1) - EVT_CALL(SetNpcRotationPivot, NPC_Kolorado, 13) - EVT_CALL(SetNpcRotation, NPC_Kolorado, 0, 0, 250) - EVT_CALL(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_HurtStill) - EVT_CALL(SetNpcImgFXParams, NPC_Kolorado, IMGFX_SET_WAVY, EVT_FLOAT(3.0), EVT_FLOAT(3.0), 0, 0) - EVT_CALL(PlaySoundAtNpc, NPC_Kolorado, SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_DEFAULT) - EVT_THREAD - EVT_CALL(SetNpcCollisionSize, NPC_Kolorado, 20, 24) - EVT_CALL(LoadPath, 30, EVT_PTR(N(KoloradoThrownPath)), ARRAY_COUNT(N(KoloradoThrownPath)), EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Kolorado, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_Kolorado, ANIM_Kolorado_HurtStill, ANIM_Kolorado_HurtStill, 5, MSG_CH5_00F9) - EVT_RETURN - EVT_END + Call(SetEnemyFlagBits, NPC_Kolorado, ENEMY_FLAG_400000, 1) + Call(SetNpcRotationPivot, NPC_Kolorado, 13) + Call(SetNpcRotation, NPC_Kolorado, 0, 0, 250) + Call(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_HurtStill) + Call(SetNpcImgFXParams, NPC_Kolorado, IMGFX_SET_WAVY, Float(3.0), Float(3.0), 0, 0) + Call(PlaySoundAtNpc, NPC_Kolorado, SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_DEFAULT) + Thread + Call(SetNpcCollisionSize, NPC_Kolorado, 20, 24) + Call(LoadPath, 30, Ref(N(KoloradoThrownPath)), ARRAY_COUNT(N(KoloradoThrownPath)), EASING_LINEAR) + Label(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Kolorado, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(0) + EndIf + EndThread + Call(SpeakToPlayer, NPC_Kolorado, ANIM_Kolorado_HurtStill, ANIM_Kolorado_HurtStill, 5, MSG_CH5_00F9) + Return + End }; EvtScript N(EVS_Kolorado_HurtInit) = { - EVT_CALL(SetNpcPos, NPC_Kolorado, 447, 0, 70) - EVT_CALL(SetNpcYaw, NPC_Kolorado, 270) - EVT_CALL(SetEnemyFlagBits, NPC_Kolorado, ENEMY_FLAG_400000, 1) - EVT_CALL(SetNpcRotationPivot, NPC_Kolorado, 13) - EVT_CALL(SetNpcRotation, NPC_Kolorado, 0, 0, 250) - EVT_CALL(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_HurtStill) - EVT_CALL(SetNpcImgFXParams, NPC_Kolorado, IMGFX_SET_WAVY, EVT_FLOAT(3.0), EVT_FLOAT(3.0), 0, 0) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Kolorado, 447, 0, 70) + Call(SetNpcYaw, NPC_Kolorado, 270) + Call(SetEnemyFlagBits, NPC_Kolorado, ENEMY_FLAG_400000, 1) + Call(SetNpcRotationPivot, NPC_Kolorado, 13) + Call(SetNpcRotation, NPC_Kolorado, 0, 0, 250) + Call(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_HurtStill) + Call(SetNpcImgFXParams, NPC_Kolorado, IMGFX_SET_WAVY, Float(3.0), Float(3.0), 0, 0) + Return + End }; EvtScript N(EVS_NpcIdle_Kolorado) = { - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 605) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH5_00F7, 160, 40) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, 290, 0, 30) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(5.0)) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) - EVT_CALL(NpcMoveTo, NPC_SELF, 640, 80, 0) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Yell) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Yell, 0, MSG_CH5_00F8) - EVT_SET(GB_StoryProgress, STORY_CH5_KOLORADO_AT_DEAD_END) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, 605) + Wait(1) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Call(ShowMessageAtScreenPos, MSG_CH5_00F7, 160, 40) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcPos, NPC_SELF, 290, 0, 30) + Call(SetNpcSpeed, NPC_SELF, Float(5.0)) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) + Call(NpcMoveTo, NPC_SELF, 640, 80, 0) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Yell) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Yell, 0, MSG_CH5_00F8) + Set(GB_StoryProgress, STORY_CH5_KOLORADO_AT_DEAD_END) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_Kolorado) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH5_HIDDEN_PASSAGE_OPEN) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Yell, 0, MSG_CH5_00FC) - EVT_EXEC_WAIT(N(EVS_LetterPrompt_Kolorado1)) - EVT_EXEC_WAIT(N(EVS_LetterReward_Kolorado)) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_HurtStill, 5, MSG_CH5_00FA) - EVT_EXEC_WAIT(N(EVS_LetterPrompt_Kolorado2)) - EVT_EXEC_WAIT(N(EVS_LetterReward_Kolorado)) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH5_HIDDEN_PASSAGE_OPEN) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Yell, 0, MSG_CH5_00FC) + ExecWait(N(EVS_LetterPrompt_Kolorado1)) + ExecWait(N(EVS_LetterReward_Kolorado)) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_HurtStill, 5, MSG_CH5_00FA) + ExecWait(N(EVS_LetterPrompt_Kolorado2)) + ExecWait(N(EVS_LetterReward_Kolorado)) + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Kolorado) = { - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Kolorado))) - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_KOLORADO_AT_DEAD_END) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Kolorado))) - EVT_RETURN - EVT_CASE_LT(STORY_CH5_HIDDEN_PASSAGE_OPEN) - EVT_CALL(SetNpcPos, NPC_SELF, 640, 0, 80) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Yell) - EVT_RETURN - EVT_CASE_EQ(STORY_CH5_HIDDEN_PASSAGE_OPEN) - EVT_CALL(SetNpcCollisionSize, NPC_Kolorado, 20, 24) - EVT_EXEC(N(EVS_Kolorado_HurtInit)) - EVT_RETURN - EVT_CASE_DEFAULT - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Kolorado))) + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_KOLORADO_AT_DEAD_END) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Kolorado))) + Return + CaseLt(STORY_CH5_HIDDEN_PASSAGE_OPEN) + Call(SetNpcPos, NPC_SELF, 640, 0, 80) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Yell) + Return + CaseEq(STORY_CH5_HIDDEN_PASSAGE_OPEN) + Call(SetNpcCollisionSize, NPC_Kolorado, 20, 24) + Exec(N(EVS_Kolorado_HurtInit)) + Return + CaseDefault + Call(RemoveNpc, NPC_SELF) + EndSwitch + Return + End }; NpcData N(NpcData_Kolorado) = { diff --git a/src/world/dead/area_kzn/kzn_17/kzn_17_4_tromp.c b/src/world/dead/area_kzn/kzn_17/kzn_17_4_tromp.c index cc2d1bb3f9a..387956e3f93 100644 --- a/src/world/dead/area_kzn/kzn_17/kzn_17_4_tromp.c +++ b/src/world/dead/area_kzn/kzn_17/kzn_17_4_tromp.c @@ -7,149 +7,149 @@ #include "world/area_kzn/common/SpinyTromp.inc.c" EvtScript N(EVS_SpinyTromp_ManageCamera) = { - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 500) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(10.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_LOOP(0) - EVT_IF_EQ(AF_KZN_Tromp2_ShakingDone, FALSE) - EVT_IF_LT(MV_TrompPosX, 550) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(MV_TrompPosX, LVar0) - EVT_ADD(LVar0, MV_TrompPosX) - EVT_DIV(LVar0, 2) - EVT_ELSE - EVT_SET(LVar0, MV_TrompPosX) - EVT_END_IF - EVT_ADD(LVar1, 55) - EVT_SET(LVar2, LVar1) - EVT_CALL(N(UnkFunc46)) - EVT_SUB(LVar2, 55) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar2, 30) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Call(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetCamDistance, CAM_DEFAULT, 500) + Call(SetCamSpeed, CAM_DEFAULT, Float(10.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Loop(0) + IfEq(AF_KZN_Tromp2_ShakingDone, FALSE) + IfLt(MV_TrompPosX, 550) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(MV_TrompPosX, LVar0) + Add(LVar0, MV_TrompPosX) + Div(LVar0, 2) + Else + Set(LVar0, MV_TrompPosX) + EndIf + Add(LVar1, 55) + Set(LVar2, LVar1) + Call(N(UnkFunc46)) + Sub(LVar2, 55) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar2, 30) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndIf + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_SpinyTromp_ShakeCam) = { - EVT_LOOP(0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30, EVT_FLOAT(1.0)) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(ShakeCam, CAM_DEFAULT, 0, 30, Float(1.0)) + EndLoop + Return + End }; EvtScript N(EVS_SetupSpinyTromp) = { - EVT_SET_GROUP(EVT_GROUP_EF) - EVT_IF_GE(GB_StoryProgress, STORY_CH5_HIDDEN_PASSAGE_OPEN) - EVT_CALL(SetGroupVisibility, MODEL_goron, MODEL_GROUP_HIDDEN) - EVT_CALL(EnableModel, MODEL_me, FALSE) - EVT_CALL(EnableModel, MODEL_mae, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_gogo, COLLIDER_FLAGS_UPPER_MASK) - EVT_RETURN - EVT_END_IF - EVT_CALL(EnableModel, MODEL_ato, FALSE) - EVT_SET(AF_KZN_Tromp2_HitKolorado, FALSE) - EVT_SET(AF_KZN_Tromp2_ShakingDone, FALSE) - EVT_SET(AF_KZN_TrompHitPlayer, FALSE) - EVT_SET(AF_KZN_TrompRollingDone, FALSE) - EVT_SET(AF_KZN_Tromp2_StopPlayer, FALSE) - EVT_SET(LVar0, -583) - EVT_SET(LVar2, 165) - EVT_CALL(TranslateGroup, MODEL_goron, LVar0, LVar2, 30) - EVT_CALL(TranslateModel, MODEL_me, LVar0, LVar2, 30) - EVT_LABEL(0) - EVT_WAIT(1) - EVT_IF_EQ(GF_KZN17_Hammer3BlockG, FALSE) - EVT_GOTO(0) - EVT_END_IF - EVT_EXEC_GET_TID(N(EVS_SpinyTromp_ManageCamera), LVarA) - EVT_EXEC(N(EVS_Kolorado_TrompPanic)) - EVT_EXEC_GET_TID(N(EVS_SpinyTromp_ShakeCam), MV_ScreenShakeTID) - EVT_CALL(PlaySound, SOUND_LOOP_TROMP_ROLL) - EVT_SET(LVar3, 0) - EVT_CALL(MakeLerp, -583, 750, 270, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(UnkFunc46)) - EVT_CALL(N(UnkFunc51), LVar0, LVar1, LVar2) - EVT_SET(MV_TrompPosX, LVar0) - EVT_ADD(MV_TrompPosX, 20) - EVT_CALL(TranslateGroup, MODEL_goron, LVar0, LVar2, 30) - EVT_CALL(TranslateModel, MODEL_me, LVar0, LVar2, 30) - EVT_CALL(RotateGroup, MODEL_goron, LVar3, 0, 0, 1) - EVT_CALL(RotateModel, MODEL_me, LVar3, 0, 0, 1) - EVT_CALL(N(UnkFunc49)) - EVT_CALL(TranslateModel, MODEL_me, LVar5, LVar6, 30) - EVT_CALL(N(UnkFunc50)) - EVT_IF_EQ(AF_KZN_Tromp2_StopPlayer, FALSE) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar3, LVar1, LVar2) - EVT_SUB(LVar3, 20) - EVT_IF_LT(LVar3, LVar0) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_SET(AF_KZN_Tromp2_StopPlayer, TRUE) - EVT_LABEL(12) - EVT_WAIT(1) - EVT_IF_NE(AF_KZN_Tromp2_StopPlayer, FALSE) - EVT_GOTO(12) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_END_IF - EVT_END_THREAD - EVT_END_IF - EVT_IF_EQ(AF_KZN_Tromp2_HitKolorado, FALSE) - EVT_IF_GT(LVar0, 430) - EVT_EXEC(N(EVS_Kolorado_TrompImpact)) - EVT_SET(AF_KZN_Tromp2_HitKolorado, TRUE) - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(AF_KZN_Tromp2_ShakingDone, FALSE) - EVT_IF_GT(LVar0, 630) - EVT_KILL_THREAD(MV_ScreenShakeTID) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_gogo, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlaySoundAtCollider, COLLIDER_gogo, SOUND_TROMP_CRASH, SOUND_SPACE_DEFAULT) - EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 2, 32, 32, 1, 10, 45) - EVT_CALL(EnableModel, MODEL_mae, FALSE) - EVT_CALL(EnableModel, MODEL_ato, TRUE) - EVT_THREAD - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(3.0)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(1.7)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.5)) - EVT_END_THREAD - EVT_SET(AF_KZN_Tromp2_ShakingDone, TRUE) - EVT_END_IF - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(N(SpinyTromp_CheckDist)) - EVT_IF_LT(LVar4, 80) - EVT_IF_EQ(AF_KZN_TrompHitPlayer, FALSE) - EVT_CALL(N(SpinyTromp_GetActingPartner)) - EVT_IF_NE(LVar0, PARTNER_BOW) - EVT_SET(AF_KZN_TrompHitPlayer, TRUE) - EVT_EXEC(N(D_80240D10_C7EE90)) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_SET(GB_StoryProgress, STORY_CH5_HIDDEN_PASSAGE_OPEN) - EVT_WAIT(50) - EVT_CALL(StopSound, SOUND_LOOP_TROMP_ROLL) - EVT_CALL(SetGroupVisibility, MODEL_goron, MODEL_GROUP_HIDDEN) - EVT_CALL(EnableModel, MODEL_me, FALSE) - EVT_KILL_THREAD(LVarA) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_SET(AF_KZN_Tromp2_StopPlayer, FALSE) - EVT_SET(AF_KZN_TrompRollingDone, TRUE) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_EF) + IfGe(GB_StoryProgress, STORY_CH5_HIDDEN_PASSAGE_OPEN) + Call(SetGroupVisibility, MODEL_goron, MODEL_GROUP_HIDDEN) + Call(EnableModel, MODEL_me, FALSE) + Call(EnableModel, MODEL_mae, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_gogo, COLLIDER_FLAGS_UPPER_MASK) + Return + EndIf + Call(EnableModel, MODEL_ato, FALSE) + Set(AF_KZN_Tromp2_HitKolorado, FALSE) + Set(AF_KZN_Tromp2_ShakingDone, FALSE) + Set(AF_KZN_TrompHitPlayer, FALSE) + Set(AF_KZN_TrompRollingDone, FALSE) + Set(AF_KZN_Tromp2_StopPlayer, FALSE) + Set(LVar0, -583) + Set(LVar2, 165) + Call(TranslateGroup, MODEL_goron, LVar0, LVar2, 30) + Call(TranslateModel, MODEL_me, LVar0, LVar2, 30) + Label(0) + Wait(1) + IfEq(GF_KZN17_Hammer3BlockG, FALSE) + Goto(0) + EndIf + ExecGetTID(N(EVS_SpinyTromp_ManageCamera), LVarA) + Exec(N(EVS_Kolorado_TrompPanic)) + ExecGetTID(N(EVS_SpinyTromp_ShakeCam), MV_ScreenShakeTID) + Call(PlaySound, SOUND_LOOP_TROMP_ROLL) + Set(LVar3, 0) + Call(MakeLerp, -583, 750, 270, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(N(UnkFunc46)) + Call(N(UnkFunc51), LVar0, LVar1, LVar2) + Set(MV_TrompPosX, LVar0) + Add(MV_TrompPosX, 20) + Call(TranslateGroup, MODEL_goron, LVar0, LVar2, 30) + Call(TranslateModel, MODEL_me, LVar0, LVar2, 30) + Call(RotateGroup, MODEL_goron, LVar3, 0, 0, 1) + Call(RotateModel, MODEL_me, LVar3, 0, 0, 1) + Call(N(UnkFunc49)) + Call(TranslateModel, MODEL_me, LVar5, LVar6, 30) + Call(N(UnkFunc50)) + IfEq(AF_KZN_Tromp2_StopPlayer, FALSE) + Thread + Call(GetPlayerPos, LVar3, LVar1, LVar2) + Sub(LVar3, 20) + IfLt(LVar3, LVar0) + Call(DisablePlayerInput, TRUE) + Set(AF_KZN_Tromp2_StopPlayer, TRUE) + Label(12) + Wait(1) + IfNe(AF_KZN_Tromp2_StopPlayer, FALSE) + Goto(12) + EndIf + Call(DisablePlayerInput, FALSE) + EndIf + EndThread + EndIf + IfEq(AF_KZN_Tromp2_HitKolorado, FALSE) + IfGt(LVar0, 430) + Exec(N(EVS_Kolorado_TrompImpact)) + Set(AF_KZN_Tromp2_HitKolorado, TRUE) + EndIf + EndIf + IfEq(AF_KZN_Tromp2_ShakingDone, FALSE) + IfGt(LVar0, 630) + KillThread(MV_ScreenShakeTID) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_gogo, COLLIDER_FLAGS_UPPER_MASK) + Call(PlaySoundAtCollider, COLLIDER_gogo, SOUND_TROMP_CRASH, SOUND_SPACE_DEFAULT) + PlayEffect(EFFECT_BOMBETTE_BREAKING, 2, 32, 32, 1, 10, 45) + Call(EnableModel, MODEL_mae, FALSE) + Call(EnableModel, MODEL_ato, TRUE) + Thread + Call(ShakeCam, CAM_DEFAULT, 0, 20, Float(3.0)) + Call(ShakeCam, CAM_DEFAULT, 0, 10, Float(1.7)) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(0.5)) + EndThread + Set(AF_KZN_Tromp2_ShakingDone, TRUE) + EndIf + EndIf + Wait(1) + Call(N(SpinyTromp_CheckDist)) + IfLt(LVar4, 80) + IfEq(AF_KZN_TrompHitPlayer, FALSE) + Call(N(SpinyTromp_GetActingPartner)) + IfNe(LVar0, PARTNER_BOW) + Set(AF_KZN_TrompHitPlayer, TRUE) + Exec(N(D_80240D10_C7EE90)) + EndIf + EndIf + EndIf + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Set(GB_StoryProgress, STORY_CH5_HIDDEN_PASSAGE_OPEN) + Wait(50) + Call(StopSound, SOUND_LOOP_TROMP_ROLL) + Call(SetGroupVisibility, MODEL_goron, MODEL_GROUP_HIDDEN) + Call(EnableModel, MODEL_me, FALSE) + KillThread(LVarA) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Set(AF_KZN_Tromp2_StopPlayer, FALSE) + Set(AF_KZN_TrompRollingDone, TRUE) + Return + End }; diff --git a/src/world/dead/area_kzn/kzn_18/kzn_18_1_main.c b/src/world/dead/area_kzn/kzn_18/kzn_18_1_main.c index 64681217031..d8b9583eb35 100644 --- a/src/world/dead/area_kzn/kzn_18/kzn_18_1_main.c +++ b/src/world/dead/area_kzn/kzn_18/kzn_18_1_main.c @@ -10,44 +10,44 @@ EvtScript N(EVS_ExitWalk_kzn_19_0) = EVT_EXIT_WALK(60, kzn_18_ENTRY_1, "kzn_19", EvtScript N(EVS_ExitWalk_kzn_19_1) = EVT_EXIT_WALK(60, kzn_18_ENTRY_2, "kzn_19", kzn_19_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(N(EVS_ExitWalk_kzn_17_1), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) - EVT_BIND_TRIGGER(N(EVS_ExitWalk_kzn_19_0), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_BIND_TRIGGER(N(EVS_ExitWalk_kzn_19_1), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(N(EVS_ExitWalk_kzn_17_1), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) + BindTrigger(N(EVS_ExitWalk_kzn_19_0), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + BindTrigger(N(EVS_ExitWalk_kzn_19_1), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + Return + End }; EvtScript N(EVS_StartTexPanners_Lava) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(EnableTexPanning, MODEL_yougan1_1, TRUE) - EVT_CALL(EnableTexPanning, MODEL_off1, TRUE) - EVT_CALL(EnableTexPanning, MODEL_toro, TRUE) - EVT_CALL(EnableTexPanning, MODEL_poko, TRUE) - EVT_THREAD + SetGroup(EVT_GROUP_00) + Call(EnableTexPanning, MODEL_yougan1_1, TRUE) + Call(EnableTexPanning, MODEL_off1, TRUE) + Call(EnableTexPanning, MODEL_toro, TRUE) + Call(EnableTexPanning, MODEL_poko, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( 200, 0, 400, -100) TEX_PAN_PARAMS_FREQ( 1, 0, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_5) TEX_PAN_PARAMS_STEP( 300, -500, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread // animate lava bubbles (real ones, not the enemies) - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, LVar0, 0) - EVT_ADD(LVar0, 0x8000) - EVT_WAIT(6) - EVT_END_LOOP - EVT_END_THREAD - EVT_RETURN - EVT_END + Set(LVar0, 0) + Loop(0) + Call(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, LVar0, 0) + Add(LVar0, 0x8000) + Wait(6) + EndLoop + EndThread + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -56,46 +56,46 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(EVS_EnterMap) = { - EVT_CALL(GetLoadType, LVar1) - EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT) - EVT_EXEC(EnterSavePoint) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar0, N(EVS_BindExitTriggers)) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_RETURN - EVT_END + Call(GetLoadType, LVar1) + IfEq(LVar1, LOAD_FROM_FILE_SELECT) + Exec(EnterSavePoint) + Exec(N(EVS_BindExitTriggers)) + Return + EndIf + Set(LVar0, N(EVS_BindExitTriggers)) + Exec(EnterWalk) + Wait(1) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_LAVALAVA) - EVT_CALL(SetSpriteShading, SHADING_KZN_18) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_EXEC(N(EVS_EnterMap)) - EVT_CALL(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_1) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) - EVT_CALL(EnableModel, MODEL_off1, FALSE) - EVT_CALL(EnableModel, MODEL_o506, FALSE) - EVT_CALL(EnableModel, MODEL_o509, FALSE) - EVT_CALL(EnableModel, MODEL_o511, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_off1, COLLIDER_FLAGS_UPPER_MASK) - EVT_ELSE - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_off2, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_off1, SURFACE_TYPE_LAVA) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_EXEC(N(EVS_StartTexPanners_Lava)) - EVT_SET(LVar0, MODEL_kem1) - EVT_EXEC(N(EVS_StartTexPanner_SmokeLeft)) - EVT_SET(LVar0, MODEL_kem2) - EVT_EXEC(N(EVS_StartTexPanner_SmokeRight)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_LAVALAVA) + Call(SetSpriteShading, SHADING_KZN_18) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Exec(N(EVS_EnterMap)) + Call(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) + Call(PlayAmbientSounds, AMBIENT_LAVA_1) + IfLt(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) + Call(EnableModel, MODEL_off1, FALSE) + Call(EnableModel, MODEL_o506, FALSE) + Call(EnableModel, MODEL_o509, FALSE) + Call(EnableModel, MODEL_o511, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_off1, COLLIDER_FLAGS_UPPER_MASK) + Else + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_off2, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_off1, SURFACE_TYPE_LAVA) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + Exec(N(EVS_StartTexPanners_Lava)) + Set(LVar0, MODEL_kem1) + Exec(N(EVS_StartTexPanner_SmokeLeft)) + Set(LVar0, MODEL_kem2) + Exec(N(EVS_StartTexPanner_SmokeRight)) + Return + End }; diff --git a/src/world/dead/area_kzn/kzn_18/kzn_18_2_npc.c b/src/world/dead/area_kzn/kzn_18/kzn_18_2_npc.c index 9594e9d3f25..a2277210dcf 100644 --- a/src/world/dead/area_kzn/kzn_18/kzn_18_2_npc.c +++ b/src/world/dead/area_kzn/kzn_18/kzn_18_2_npc.c @@ -8,139 +8,139 @@ #include "world/common/todo/GetFloorCollider.inc.c" EvtScript N(EVS_NpcIdle_Kolorado) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH5_KOLORADO_RAN_AHEAD) - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, -125) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_SET(GB_StoryProgress, STORY_CH5_KOLORADO_RAN_AHEAD) - EVT_CALL(SetNpcPos, NPC_SELF, -280, 250, -360) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar2, -340) - EVT_SET(LVar2, -320) - EVT_ELSE - EVT_SET(LVar2, -360) - EVT_END_IF - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(10.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, 185, LVar2, 0) - EVT_CALL(NpcFacePlayer, NPC_SELF, 4) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, 185, 250, -340) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_END_IF - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(N(GetFloorCollider), LVar0) - EVT_IF_EQ(LVar0, COLLIDER_o442) - EVT_BREAK_LOOP - EVT_END_IF - EVT_IF_EQ(LVar0, COLLIDER_o405) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(400.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Yell, 0, MSG_CH5_00FD) - EVT_WAIT(15) - EVT_SET(MV_KoloradoJumpDone, FALSE) - EVT_THREAD - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.0)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 10) - EVT_CALL(SetNpcYaw, NPC_SELF, 90) - EVT_SET(MV_KoloradoJumpDone, TRUE) - EVT_END_THREAD - EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_00FE) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_EQ(MV_KoloradoJumpDone, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 420, 250, -350) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Run) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, 530, -360, 0) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_WAIT(15) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_SET(GB_StoryProgress, STORY_CH5_KOLORADO_IN_TREASURE_ROOM) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH5_KOLORADO_RAN_AHEAD) + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, -125) + Wait(1) + Goto(0) + EndIf + Set(GB_StoryProgress, STORY_CH5_KOLORADO_RAN_AHEAD) + Call(SetNpcPos, NPC_SELF, -280, 250, -360) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar2, -340) + Set(LVar2, -320) + Else + Set(LVar2, -360) + EndIf + Call(SetNpcSpeed, NPC_SELF, Float(10.0)) + Call(NpcMoveTo, NPC_SELF, 185, LVar2, 0) + Call(NpcFacePlayer, NPC_SELF, 4) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) + Else + Call(SetNpcPos, NPC_SELF, 185, 250, -340) + Call(SetNpcYaw, NPC_SELF, 270) + EndIf + Loop(0) + Wait(1) + Call(N(GetFloorCollider), LVar0) + IfEq(LVar0, COLLIDER_o442) + BreakLoop + EndIf + IfEq(LVar0, COLLIDER_o405) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, TRUE) + Call(GetPlayerPos, LVar3, LVar4, LVar5) + Call(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetCamDistance, CAM_DEFAULT, Float(400.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-7.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Yell, 0, MSG_CH5_00FD) + Wait(15) + Set(MV_KoloradoJumpDone, FALSE) + Thread + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(SetNpcJumpscale, NPC_SELF, Float(2.0)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 10) + Call(SetNpcYaw, NPC_SELF, 90) + Set(MV_KoloradoJumpDone, TRUE) + EndThread + Call(ContinueSpeech, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_00FE) + Loop(0) + Wait(1) + IfEq(MV_KoloradoJumpDone, TRUE) + BreakLoop + EndIf + EndLoop + Call(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetPanTarget, CAM_DEFAULT, 420, 250, -350) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Run) + Call(SetNpcSpeed, NPC_SELF, Float(5.0)) + Call(NpcMoveTo, NPC_SELF, 530, -360, 0) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Wait(15) + Call(ResetCam, CAM_DEFAULT, Float(3.0)) + Set(GB_StoryProgress, STORY_CH5_KOLORADO_IN_TREASURE_ROOM) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Kolorado) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH5_KOLORADO_IN_TREASURE_ROOM) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Kolorado))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH5_KOLORADO_IN_TREASURE_ROOM) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Kolorado))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; EvtScript N(EVS_NpcIdle_Piranha) = { - EVT_LABEL(0) - EVT_WAIT(1) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar1, 100) - EVT_GOTO(0) - EVT_END_IF - EVT_IF_LT(LVar0, 100) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(N(DisableCameraLeadingPlayer)) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 285, 25, 35) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 400) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(10) - EVT_CALL(SetNpcPos, NPC_SELF, 285, 25, 35) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_LargePiranha_Putrid_Anim17) - EVT_WAIT(30) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_LargePiranha_Putrid_Anim01) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_LargePiranha_Putrid_Anim04, ANIM_LargePiranha_Putrid_Anim01, 0, MSG_CH5_00FF) - EVT_WAIT(10) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_BURROW_DIG, SOUND_SPACE_DEFAULT) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_LargePiranha_Putrid_Anim18) - EVT_WAIT(25) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(N(EnableCameraLeadingPlayer)) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_SET(GF_KZN18_IntruderAlert, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Label(0) + Wait(1) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfGt(LVar1, 100) + Goto(0) + EndIf + IfLt(LVar0, 100) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Call(N(DisableCameraLeadingPlayer)) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, 285, 25, 35) + Call(SetCamDistance, CAM_DEFAULT, 400) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(10) + Call(SetNpcPos, NPC_SELF, 285, 25, 35) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_BURROW_SURFACE, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_SELF, ANIM_LargePiranha_Putrid_Anim17) + Wait(30) + Call(SetNpcAnimation, NPC_SELF, ANIM_LargePiranha_Putrid_Anim01) + Call(SpeakToPlayer, NPC_SELF, ANIM_LargePiranha_Putrid_Anim04, ANIM_LargePiranha_Putrid_Anim01, 0, MSG_CH5_00FF) + Wait(10) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_BURROW_DIG, SOUND_SPACE_DEFAULT) + Call(SetNpcAnimation, NPC_SELF, ANIM_LargePiranha_Putrid_Anim18) + Wait(25) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(N(EnableCameraLeadingPlayer)) + Call(ResetCam, CAM_DEFAULT, Float(3.0)) + Set(GF_KZN18_IntruderAlert, TRUE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInit_Piranha) = { - EVT_IF_EQ(GF_KZN18_IntruderAlert, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Piranha))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_KZN18_IntruderAlert, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Piranha))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_Kolorado) = { diff --git a/src/world/dead/area_kzn/kzn_18/kzn_18_3_entity.c b/src/world/dead/area_kzn/kzn_18/kzn_18_3_entity.c index 5051a0e0563..a610b71a2a2 100644 --- a/src/world/dead/area_kzn/kzn_18/kzn_18_3_entity.c +++ b/src/world/dead/area_kzn/kzn_18/kzn_18_3_entity.c @@ -2,10 +2,10 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), 250, 250, -225, 0, MODEL_o380, MAKE_ENTITY_END) - EVT_CALL(AssignPanelFlag, GF_KZN18_HiddenPanel) - EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), -420, 85, -80, 0, MAKE_ENTITY_END) - EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), 350, 310, -250, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_HiddenPanel), 250, 250, -225, 0, MODEL_o380, MAKE_ENTITY_END) + Call(AssignPanelFlag, GF_KZN18_HiddenPanel) + Call(MakeEntity, Ref(Entity_SavePoint), -420, 85, -80, 0, MAKE_ENTITY_END) + Call(MakeEntity, Ref(Entity_HeartBlock), 350, 310, -250, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/dead/area_kzn/kzn_19/kzn_19_1_music.c b/src/world/dead/area_kzn/kzn_19/kzn_19_1_music.c index 3ac45c73494..4b10dcc2263 100644 --- a/src/world/dead/area_kzn/kzn_19/kzn_19_1_music.c +++ b/src/world/dead/area_kzn/kzn_19/kzn_19_1_music.c @@ -1,20 +1,20 @@ #include "kzn_19.h" EvtScript N(EVS_SetupMusic) = { - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_CH5_DEFEATED_LAVA_PIRANHA) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kzn_19_ENTRY_1) - EVT_CALL(FadeOutMusic, 0, 500) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_1) - EVT_RETURN - EVT_END_IF - EVT_END_IF //@bug extra endif - EVT_CASE_GE(STORY_CH5_MT_LAVA_LAVA_ERUPTING) - EVT_CALL(PlaySound, SOUND_LOOP_RUMBLE) - EVT_END_SWITCH - EVT_CALL(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_1) - EVT_RETURN - EVT_END + Switch(GB_StoryProgress) + CaseEq(STORY_CH5_DEFEATED_LAVA_PIRANHA) + Call(GetEntryID, LVar0) + IfEq(LVar0, kzn_19_ENTRY_1) + Call(FadeOutMusic, 0, 500) + Call(PlayAmbientSounds, AMBIENT_LAVA_1) + Return + EndIf + EndIf //@bug extra endif + CaseGe(STORY_CH5_MT_LAVA_LAVA_ERUPTING) + Call(PlaySound, SOUND_LOOP_RUMBLE) + EndSwitch + Call(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) + Call(PlayAmbientSounds, AMBIENT_LAVA_1) + Return + End }; diff --git a/src/world/dead/area_kzn/kzn_19/kzn_19_2_main.c b/src/world/dead/area_kzn/kzn_19/kzn_19_2_main.c index 018ba5e1933..7281c860b1f 100644 --- a/src/world/dead/area_kzn/kzn_19/kzn_19_2_main.c +++ b/src/world/dead/area_kzn/kzn_19/kzn_19_2_main.c @@ -8,82 +8,82 @@ EvtScript N(EVS_TrySpawningStarCard) = { // determine if card should be spawned - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_EQ(STORY_CH5_KOLORADO_IN_TREASURE_ROOM) - EVT_SET(LVar0, FALSE) - EVT_IF_EQ(MV_BossDefeated, FALSE) - EVT_RETURN - EVT_END_IF - EVT_SET(GB_StoryProgress, STORY_CH5_DEFEATED_LAVA_PIRANHA) - EVT_CASE_EQ(STORY_CH5_DEFEATED_LAVA_PIRANHA) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kzn_19_ENTRY_3) - EVT_RETURN - EVT_END_IF - EVT_SET(LVar0, TRUE) - EVT_CASE_DEFAULT - EVT_RETURN - EVT_END_SWITCH - EVT_IF_EQ(LVar0, 0) + Switch(GB_StoryProgress) + CaseEq(STORY_CH5_KOLORADO_IN_TREASURE_ROOM) + Set(LVar0, FALSE) + IfEq(MV_BossDefeated, FALSE) + Return + EndIf + Set(GB_StoryProgress, STORY_CH5_DEFEATED_LAVA_PIRANHA) + CaseEq(STORY_CH5_DEFEATED_LAVA_PIRANHA) + Call(GetEntryID, LVar0) + IfEq(LVar0, kzn_19_ENTRY_3) + Return + EndIf + Set(LVar0, TRUE) + CaseDefault + Return + EndSwitch + IfEq(LVar0, 0) // card appearing scene - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 185, 110, -30) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.44)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 185, 55, -30) + Call(DisablePlayerInput, TRUE) + Call(UseSettingsFrom, CAM_DEFAULT, 185, 110, -30) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.44)) + Call(SetPanTarget, CAM_DEFAULT, 185, 55, -30) EVT_SPIRIT_ADJUST_CAM(10000) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(N(StarSpiritEffectFunc2), 4, 180, 304, 15, -54, 185, 110, -30, 55, 25) - EVT_THREAD - EVT_CALL(N(StarSpiritEffectFunc3)) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(PlaySound, SOUND_LOOP_STAR_ORB_RISING) - EVT_CALL(N(StarSpiritEffectFunc1)) - EVT_CALL(StopSound, SOUND_LOOP_STAR_ORB_RISING) - EVT_CALL(PlaySoundAt, SOUND_STAR_ORB_BURST, SOUND_SPACE_DEFAULT, 185, 110, -30) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(45) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(180) - EVT_WAIT(115) - EVT_CALL(PlaySoundAt, SOUND_STAR_CARD_APPEARS, SOUND_SPACE_DEFAULT, 185, 110, -30) - EVT_END_THREAD - EVT_CALL(N(StarSpiritEffectFunc4), 1) - EVT_THREAD - EVT_WAIT(80) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_ADD(LVar1, 100) - EVT_CALL(SetCamDistance, CAM_DEFAULT, LVar1) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 185, 25, -30) - EVT_CALL(N(StarSpiritEffectFunc4), 2) - EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar2, LVar3, LVar4) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar2, LVar3, LVar4) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_ELSE + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(N(StarSpiritEffectFunc2), 4, 180, 304, 15, -54, 185, 110, -30, 55, 25) + Thread + Call(N(StarSpiritEffectFunc3)) + EndThread + Thread + Wait(1) + Call(PlaySound, SOUND_LOOP_STAR_ORB_RISING) + Call(N(StarSpiritEffectFunc1)) + Call(StopSound, SOUND_LOOP_STAR_ORB_RISING) + Call(PlaySoundAt, SOUND_STAR_ORB_BURST, SOUND_SPACE_DEFAULT, 185, 110, -30) + EndThread + Thread + Wait(45) + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + EndThread + Thread + Wait(180) + Wait(115) + Call(PlaySoundAt, SOUND_STAR_CARD_APPEARS, SOUND_SPACE_DEFAULT, 185, 110, -30) + EndThread + Call(N(StarSpiritEffectFunc4), 1) + Thread + Wait(80) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndThread + Add(LVar1, 100) + Call(SetCamDistance, CAM_DEFAULT, LVar1) + Call(SetPanTarget, CAM_DEFAULT, 185, 25, -30) + Call(N(StarSpiritEffectFunc4), 2) + Call(GetPlayerPos, LVar2, LVar3, LVar4) + Call(UseSettingsFrom, CAM_DEFAULT, LVar2, LVar3, LVar4) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(SetPanTarget, CAM_DEFAULT, LVar2, LVar3, LVar4) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 0) + Call(DisablePlayerInput, FALSE) + Else // just make the card spawn - EVT_CALL(N(StarSpiritEffectFunc5), 4, 185, 55, -30, 25) - EVT_THREAD - EVT_CALL(N(StarSpiritEffectFunc6)) - EVT_END_THREAD - EVT_WAIT(1) - EVT_END_IF + Call(N(StarSpiritEffectFunc5), 4, 185, 55, -30, 25) + Thread + Call(N(StarSpiritEffectFunc6)) + EndThread + Wait(1) + EndIf // wait for pickup - EVT_CALL(N(StarSpiritEffectFunc4), 3) - EVT_CALL(PlaySoundAtPlayer, SOUND_RESCUE_STAR_SPIRIT, SOUND_SPACE_DEFAULT) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_23"), kmr_23_ENTRY_4, TRANSITION_GET_STAR_CARD) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Call(N(StarSpiritEffectFunc4), 3) + Call(PlaySoundAtPlayer, SOUND_RESCUE_STAR_SPIRIT, SOUND_SPACE_DEFAULT) + Call(DisablePlayerInput, TRUE) + Call(GotoMapSpecial, Ref("kmr_23"), kmr_23_ENTRY_4, TRANSITION_GET_STAR_CARD) + Wait(100) + Return + End }; EvtScript N(EVS_ExitWalk_kzn_18_1) = EVT_EXIT_WALK(60, kzn_19_ENTRY_0, "kzn_18", kzn_18_ENTRY_1); @@ -91,131 +91,131 @@ EvtScript N(EVS_ExitWalk_kzn_18_2) = EVT_EXIT_WALK(60, kzn_19_ENTRY_1, "kzn_18", EvtScript N(EVS_ExitWalk_kzn_20_0) = EVT_EXIT_WALK(60, kzn_19_ENTRY_2, "kzn_20", kzn_20_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kzn_18_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kzn_18_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_kzn_20_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(Ref(N(EVS_ExitWalk_kzn_18_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili3, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kzn_18_2)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(Ref(N(EVS_ExitWalk_kzn_20_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + Return + End }; EvtScript N(EVS_StartTexPanners_Lava) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, MODEL_yougan1_1, TEX_PANNER_2) - EVT_CALL(EnableTexPanning, MODEL_toro, TRUE) - EVT_CALL(EnableTexPanning, MODEL_poko, TRUE) - EVT_CALL(SetTexPanner, MODEL_poko1, TEX_PANNER_E) - EVT_THREAD + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, MODEL_yougan1_1, TEX_PANNER_2) + Call(EnableTexPanning, MODEL_toro, TRUE) + Call(EnableTexPanning, MODEL_poko, TRUE) + Call(SetTexPanner, MODEL_poko1, TEX_PANNER_E) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_2) TEX_PAN_PARAMS_STEP( 200, 0, 400, -100) TEX_PAN_PARAMS_FREQ( 1, 0, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_5) TEX_PAN_PARAMS_STEP( 300, -500, 0, 0) TEX_PAN_PARAMS_FREQ( 1, 1, 0, 0) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, LVar0, 0) - EVT_ADD(LVar0, 0x8000) - EVT_WAIT(6) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_SET(LVar0, 0) - EVT_LOOP(0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_E, TEX_PANNER_MAIN, LVar0, 0) - EVT_ADD(LVar0, 0x8000) - EVT_WAIT(4) - EVT_END_LOOP - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Thread + Set(LVar0, 0) + Loop(0) + Call(SetTexPanOffset, TEX_PANNER_D, TEX_PANNER_MAIN, LVar0, 0) + Add(LVar0, 0x8000) + Wait(6) + EndLoop + EndThread + Thread + Set(LVar0, 0) + Loop(0) + Call(SetTexPanOffset, TEX_PANNER_E, TEX_PANNER_MAIN, LVar0, 0) + Add(LVar0, 0x8000) + Wait(4) + EndLoop + EndThread + Return + End }; EvtScript N(EVS_UpdateLavaWaves) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_LOOP(0) - EVT_CALL(MakeLerp, 0, 180, 40, EASING_COS_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SUBF(LVar0, EVT_FLOAT(0.9)) - EVT_CALL(ScaleModel, MODEL_yougan1_1, 1, LVar0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 180, 0, 40, EASING_SIN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SUBF(LVar0, EVT_FLOAT(0.9)) - EVT_CALL(ScaleModel, MODEL_yougan1_1, 1, LVar0, 1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Loop(0) + Call(MakeLerp, 0, 180, 40, EASING_COS_IN) + Loop(0) + Call(UpdateLerp) + DivF(LVar0, Float(100.0)) + SubF(LVar0, Float(0.9)) + Call(ScaleModel, MODEL_yougan1_1, 1, LVar0, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 180, 0, 40, EASING_SIN_OUT) + Loop(0) + Call(UpdateLerp) + DivF(LVar0, Float(100.0)) + SubF(LVar0, Float(0.9)) + Call(ScaleModel, MODEL_yougan1_1, 1, LVar0, 1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_LAVALAVA) - EVT_CALL(SetSpriteShading, SHADING_KZN_19) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kzn_19_ENTRY_3) - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(EscapeNPCs))) - EVT_ELSE - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(BossNPCs))) - EVT_END_IF - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kzn_19_ENTRY_3) - EVT_THREAD - EVT_EXEC_WAIT(N(EVS_Misstar_Escape)) - EVT_EXEC(N(EVS_BindExitTriggers)) - EVT_END_THREAD - EVT_ELSE - EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers))) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_END_IF - EVT_SWITCH(GB_StoryProgress) - EVT_CASE_LT(STORY_CH5_DEFEATED_LAVA_PIRANHA) - EVT_CALL(EnableGroup, MODEL_ato, FALSE) - EVT_CALL(EnableGroup, MODEL_naka, FALSE) - EVT_CALL(EnableGroup, MODEL_g93, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ato, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_hoshi_ato, COLLIDER_FLAGS_UPPER_MASK) - EVT_CASE_EQ(STORY_CH5_DEFEATED_LAVA_PIRANHA) - EVT_CALL(EnableGroup, MODEL_mae, FALSE) - EVT_CALL(EnableGroup, MODEL_g93, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mae, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_hoshi_ato, COLLIDER_FLAGS_UPPER_MASK) - EVT_CASE_GT(STORY_CH5_DEFEATED_LAVA_PIRANHA) - EVT_CALL(EnableGroup, MODEL_mae, FALSE) - EVT_CALL(EnableGroup, MODEL_naka, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mae, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_SWITCH - EVT_EXEC(N(EVS_StartTexPanners_Lava)) - EVT_SET(LVar0, MODEL_kem1) - EVT_EXEC(N(EVS_StartTexPanner_SmokeLeft)) - EVT_SET(LVar0, MODEL_kem2) - EVT_EXEC(N(EVS_StartTexPanner_SmokeRight)) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_UpdateLavaWaves)) - EVT_EXEC(N(EVS_UpdateEruption)) - EVT_EXEC(N(EVS_TrySpawningStarCard)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_LAVALAVA) + Call(SetSpriteShading, SHADING_KZN_19) + SetUP_CAMERA_DEFAULT() + Call(GetEntryID, LVar0) + IfEq(LVar0, kzn_19_ENTRY_3) + Call(MakeNpcs, TRUE, Ref(N(EscapeNPCs))) + Else + Call(MakeNpcs, TRUE, Ref(N(BossNPCs))) + EndIf + ExecWait(N(EVS_MakeEntities)) + Call(GetEntryID, LVar0) + IfEq(LVar0, kzn_19_ENTRY_3) + Thread + ExecWait(N(EVS_Misstar_Escape)) + Exec(N(EVS_BindExitTriggers)) + EndThread + Else + Set(LVar0, Ref(N(EVS_BindExitTriggers))) + Exec(EnterWalk) + Wait(1) + EndIf + Switch(GB_StoryProgress) + CaseLt(STORY_CH5_DEFEATED_LAVA_PIRANHA) + Call(EnableGroup, MODEL_ato, FALSE) + Call(EnableGroup, MODEL_naka, FALSE) + Call(EnableGroup, MODEL_g93, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_ato, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_hoshi_ato, COLLIDER_FLAGS_UPPER_MASK) + CaseEq(STORY_CH5_DEFEATED_LAVA_PIRANHA) + Call(EnableGroup, MODEL_mae, FALSE) + Call(EnableGroup, MODEL_g93, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mae, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_hoshi_ato, COLLIDER_FLAGS_UPPER_MASK) + CaseGt(STORY_CH5_DEFEATED_LAVA_PIRANHA) + Call(EnableGroup, MODEL_mae, FALSE) + Call(EnableGroup, MODEL_naka, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mae, COLLIDER_FLAGS_UPPER_MASK) + EndSwitch + Exec(N(EVS_StartTexPanners_Lava)) + Set(LVar0, MODEL_kem1) + Exec(N(EVS_StartTexPanner_SmokeLeft)) + Set(LVar0, MODEL_kem2) + Exec(N(EVS_StartTexPanner_SmokeRight)) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_UpdateLavaWaves)) + Exec(N(EVS_UpdateEruption)) + Exec(N(EVS_TrySpawningStarCard)) + Return + End }; diff --git a/src/world/dead/area_kzn/kzn_19/kzn_19_4_npc.c b/src/world/dead/area_kzn/kzn_19/kzn_19_4_npc.c index a008c7b6522..05ca63e6eea 100644 --- a/src/world/dead/area_kzn/kzn_19/kzn_19_4_npc.c +++ b/src/world/dead/area_kzn/kzn_19/kzn_19_4_npc.c @@ -350,91 +350,91 @@ EVT_LETTER_PROMPT(Kolorado, NPC_Kolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle EVT_LETTER_REWARD(Kolorado); EvtScript N(EVS_NpcIdle_Kolorado) = { - EVT_IF_EQ(GF_KZN19_KoloradoDeadEnd, FALSE) - EVT_LABEL(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar0, 300) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(NpcFacePlayer, NPC_SELF, 4) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0100) - EVT_SET(GF_KZN19_KoloradoDeadEnd, TRUE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(SetSelfVar, 0, 0) - EVT_LABEL(5) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_WAIT(30) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_WAIT(30) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_GOTO(5) - EVT_END_IF - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GF_KZN19_KoloradoDeadEnd, FALSE) + Label(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + IfLt(LVar0, 300) + Wait(1) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Call(NpcFacePlayer, NPC_SELF, 4) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0100) + Set(GF_KZN19_KoloradoDeadEnd, TRUE) + Call(DisablePlayerInput, FALSE) + Call(SetSelfVar, 0, 0) + Label(5) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Wait(30) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Wait(30) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Goto(5) + EndIf + EndIf + Return + End }; EvtScript N(EVS_Kolorado_Escape) = { - EVT_LABEL(0) - EVT_IF_EQ(MV_BossDefeated, FALSE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(60) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcPos, NPC_SELF, 70, 25, 60) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(4.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, 170, 0, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, 280, 70, 0) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Panic, ANIM_Kolorado_Yell, 0, MSG_CH5_0107) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 450, 25, -20) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 450, 25, -20) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(NpcMoveTo, NPC_SELF, 535, -60, 0) - EVT_WAIT(20) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 304, 25, -35) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SetNpcAux, NPC_LavaPiranhaHead, 0) - EVT_WAIT(10) - EVT_CALL(FadeOutMusic, 0, 1500) - EVT_EXEC(N(EVS_TrySpawningStarCard)) - EVT_WAIT(30) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Label(0) + IfEq(MV_BossDefeated, FALSE) + Wait(1) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Wait(60) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcPos, NPC_SELF, 70, 25, 60) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) + Call(SetNpcSpeed, NPC_SELF, Float(4.0)) + Call(NpcMoveTo, NPC_SELF, 170, 0, 0) + Call(NpcMoveTo, NPC_SELF, 280, 70, 0) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Panic, ANIM_Kolorado_Yell, 0, MSG_CH5_0107) + Call(UseSettingsFrom, CAM_DEFAULT, 450, 25, -20) + Call(SetPanTarget, CAM_DEFAULT, 450, 25, -20) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(NpcMoveTo, NPC_SELF, 535, -60, 0) + Wait(20) + Call(SetPanTarget, CAM_DEFAULT, 304, 25, -35) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SetNpcAux, NPC_LavaPiranhaHead, 0) + Wait(10) + Call(FadeOutMusic, 0, 1500) + Exec(N(EVS_TrySpawningStarCard)) + Wait(30) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_Kolorado) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_TalkSad, ANIM_Kolorado_IdleSad, 0, MSG_CH5_0101) - EVT_CALL(SetSelfVar, 0, 1) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_TalkSad, ANIM_Kolorado_IdleSad, 0, MSG_CH5_0101) + Call(SetSelfVar, 0, 1) EVT_LETTER_CHECK(Kolorado) - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_NpcInit_Kolorado) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH5_DEFEATED_LAVA_PIRANHA) - EVT_CALL(GetEntryID, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(kzn_19_ENTRY_0) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Kolorado))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Kolorado))) - EVT_CASE_EQ(kzn_19_ENTRY_1) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_Kolorado_Escape))) - EVT_END_SWITCH - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH5_DEFEATED_LAVA_PIRANHA) + Call(GetEntryID, LVar0) + Switch(LVar0) + CaseEq(kzn_19_ENTRY_0) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Kolorado))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Kolorado))) + CaseEq(kzn_19_ENTRY_1) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_Kolorado_Escape))) + EndSwitch + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; Vec3f N(FlightPath)[] = { @@ -446,56 +446,56 @@ Vec3f N(FlightPath)[] = { }; EvtScript N(EVS_Misstar_Escape) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetPlayerPos, 185, 25, -35) - EVT_CALL(SetNpcPos, NPC_PARTNER, 155, 25, -35) - EVT_CALL(SetNpcPos, NPC_Misstar, 250, 40, -35) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 217, 25, -35) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 217, 25, -35) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 380) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(12.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_WAIT(30) - EVT_SET(AF_KZN_BossRoomFloorBroken, TRUE) - EVT_CALL(PlaySound, SOUND_LOOP_RUMBLE) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_NE(AF_KZN_BossRoomFloorBroken, TRUE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0) - EVT_CALL(GetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_Misstar, ANIM_WorldMisstar_Talk, ANIM_WorldMisstar_Idle, 0, MSG_CH5_0109) - EVT_WAIT(10) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 370, 25, 70) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.8)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(InterpNpcYaw, NPC_Misstar, 90, 0) - EVT_CALL(LoadPath, 45, EVT_PTR(N(FlightPath)), ARRAY_COUNT(N(FlightPath)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_Misstar, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetNpcPos, NPC_Misstar, NPC_DISPOSE_LOCATION) - EVT_WAIT(15) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_SET(GB_StoryProgress, STORY_CH5_MT_LAVA_LAVA_ERUPTING) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(SetPlayerPos, 185, 25, -35) + Call(SetNpcPos, NPC_PARTNER, 155, 25, -35) + Call(SetNpcPos, NPC_Misstar, 250, 40, -35) + Call(UseSettingsFrom, CAM_DEFAULT, 217, 25, -35) + Call(SetPanTarget, CAM_DEFAULT, 217, 25, -35) + Call(SetCamDistance, CAM_DEFAULT, 380) + Call(SetCamPitch, CAM_DEFAULT, Float(12.0), Float(-7.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Wait(30) + Set(AF_KZN_BossRoomFloorBroken, TRUE) + Call(PlaySound, SOUND_LOOP_RUMBLE) + Loop(0) + Wait(1) + IfNe(AF_KZN_BossRoomFloorBroken, TRUE) + BreakLoop + EndIf + EndLoop + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Call(InterpPlayerYaw, 90, 0) + Call(InterpNpcYaw, NPC_PARTNER, 90, 0) + Call(GetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Wait(10) + Call(SpeakToPlayer, NPC_Misstar, ANIM_WorldMisstar_Talk, ANIM_WorldMisstar_Idle, 0, MSG_CH5_0109) + Wait(10) + Call(SetPanTarget, CAM_DEFAULT, 370, 25, 70) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.8)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(InterpNpcYaw, NPC_Misstar, 90, 0) + Call(LoadPath, 45, Ref(N(FlightPath)), ARRAY_COUNT(N(FlightPath)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_Misstar, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(SetNpcPos, NPC_Misstar, NPC_DISPOSE_LOCATION) + Wait(15) + Call(ResetCam, CAM_DEFAULT, Float(3.0)) + Set(GB_StoryProgress, STORY_CH5_MT_LAVA_LAVA_ERUPTING) + Call(DisablePlayerInput, FALSE) + Return + End }; API_CALLABLE(N(LoadAnimationFromTable)) { @@ -533,439 +533,439 @@ API_CALLABLE(N(LoadAnimationFromTable)) { } EvtScript N(EVS_PlayVinesAnim_Emerge) = { - EVT_THREAD - EVT_CALL(N(LoadAnimationFromTable), VINE_0, 15) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_CALL(SetAnimatedModelRootPosition, VINE_0, 220, 20, -40) - EVT_CALL(N(LoadAnimationFromTable), VINE_3, 36) - EVT_CALL(PlayModelAnimation, VINE_3, VINE_3_BASE) - EVT_CALL(SetAnimatedModelRootPosition, VINE_3, 220, 20, -40) - EVT_WAIT(59) - EVT_CALL(N(LoadAnimationFromTable), VINE_0, 0) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_CALL(N(LoadAnimationFromTable), VINE_3, 34) - EVT_CALL(PlayModelAnimation, VINE_3, VINE_3_BASE) - EVT_END_THREAD - EVT_WAIT(5) - EVT_THREAD - EVT_CALL(N(LoadAnimationFromTable), VINE_1, 32) - EVT_CALL(PlayModelAnimation, VINE_1, VINE_1_BASE) - EVT_CALL(SetAnimatedModelRootPosition, VINE_1, 220, 20, -40) - EVT_WAIT(59) - EVT_CALL(N(LoadAnimationFromTable), VINE_1, 31) - EVT_CALL(PlayModelAnimation, VINE_1, VINE_1_BASE) - EVT_END_THREAD - EVT_WAIT(7) - EVT_CALL(N(LoadAnimationFromTable), VINE_2, 32) - EVT_CALL(PlayModelAnimation, VINE_2, VINE_2_BASE) - EVT_CALL(SetAnimatedModelRootPosition, VINE_2, 270, 34, -20) - EVT_WAIT(62) - EVT_CALL(N(LoadAnimationFromTable), VINE_2, 31) - EVT_CALL(PlayModelAnimation, VINE_2, VINE_2_BASE) - EVT_RETURN - EVT_END + Thread + Call(N(LoadAnimationFromTable), VINE_0, 15) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Call(SetAnimatedModelRootPosition, VINE_0, 220, 20, -40) + Call(N(LoadAnimationFromTable), VINE_3, 36) + Call(PlayModelAnimation, VINE_3, VINE_3_BASE) + Call(SetAnimatedModelRootPosition, VINE_3, 220, 20, -40) + Wait(59) + Call(N(LoadAnimationFromTable), VINE_0, 0) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Call(N(LoadAnimationFromTable), VINE_3, 34) + Call(PlayModelAnimation, VINE_3, VINE_3_BASE) + EndThread + Wait(5) + Thread + Call(N(LoadAnimationFromTable), VINE_1, 32) + Call(PlayModelAnimation, VINE_1, VINE_1_BASE) + Call(SetAnimatedModelRootPosition, VINE_1, 220, 20, -40) + Wait(59) + Call(N(LoadAnimationFromTable), VINE_1, 31) + Call(PlayModelAnimation, VINE_1, VINE_1_BASE) + EndThread + Wait(7) + Call(N(LoadAnimationFromTable), VINE_2, 32) + Call(PlayModelAnimation, VINE_2, VINE_2_BASE) + Call(SetAnimatedModelRootPosition, VINE_2, 270, 34, -20) + Wait(62) + Call(N(LoadAnimationFromTable), VINE_2, 31) + Call(PlayModelAnimation, VINE_2, VINE_2_BASE) + Return + End }; EvtScript N(EVS_PlayVinesAnim_Idle) = { - EVT_CALL(N(LoadAnimationFromTable), VINE_0, 0) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_CALL(N(LoadAnimationFromTable), VINE_1, 31) - EVT_CALL(PlayModelAnimation, VINE_1, VINE_1_BASE) - EVT_CALL(N(LoadAnimationFromTable), VINE_3, 34) - EVT_CALL(PlayModelAnimation, VINE_3, VINE_3_BASE) - EVT_WAIT(10) - EVT_CALL(N(LoadAnimationFromTable), VINE_2, 31) - EVT_CALL(PlayModelAnimation, VINE_2, VINE_2_BASE) - EVT_RETURN - EVT_END + Call(N(LoadAnimationFromTable), VINE_0, 0) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Call(N(LoadAnimationFromTable), VINE_1, 31) + Call(PlayModelAnimation, VINE_1, VINE_1_BASE) + Call(N(LoadAnimationFromTable), VINE_3, 34) + Call(PlayModelAnimation, VINE_3, VINE_3_BASE) + Wait(10) + Call(N(LoadAnimationFromTable), VINE_2, 31) + Call(PlayModelAnimation, VINE_2, VINE_2_BASE) + Return + End }; EvtScript N(EVS_PlayVinesAnim_Talk) = { - EVT_CALL(N(LoadAnimationFromTable), VINE_0, 17) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_RETURN - EVT_END + Call(N(LoadAnimationFromTable), VINE_0, 17) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Return + End }; EvtScript N(EVS_PlayVinesAnim_Defeat) = { - EVT_CALL(N(LoadAnimationFromTable), VINE_0, 16) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_CALL(N(LoadAnimationFromTable), VINE_1, 33) - EVT_CALL(PlayModelAnimation, VINE_1, VINE_1_BASE) - EVT_CALL(N(LoadAnimationFromTable), VINE_2, 33) - EVT_CALL(PlayModelAnimation, VINE_2, VINE_2_BASE) - EVT_CALL(N(LoadAnimationFromTable), VINE_3, 35) - EVT_CALL(PlayModelAnimation, VINE_3, VINE_3_BASE) - EVT_RETURN - EVT_END + Call(N(LoadAnimationFromTable), VINE_0, 16) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Call(N(LoadAnimationFromTable), VINE_1, 33) + Call(PlayModelAnimation, VINE_1, VINE_1_BASE) + Call(N(LoadAnimationFromTable), VINE_2, 33) + Call(PlayModelAnimation, VINE_2, VINE_2_BASE) + Call(N(LoadAnimationFromTable), VINE_3, 35) + Call(PlayModelAnimation, VINE_3, VINE_3_BASE) + Return + End }; EvtScript N(EVS_NpcIdle_LavaPiranha) = { - EVT_LOOP(0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_WAIT(1) - EVT_IF_GT(LVar0, 150) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(SetMusicTrack, 0, SONG_LAVA_PIRANHA_THEME, 0, 8) - EVT_CALL(LoadAnimatedModel, VINE_0, EVT_PTR(N(AnimModel_MainHeadVine))) - EVT_CALL(N(LoadAnimationFromTable), VINE_0, 0) - EVT_CALL(PlayModelAnimation, VINE_0, VINE_0_BASE) - EVT_CALL(SetAnimatedModelRootPosition, VINE_0, 220, -100, -40) - EVT_CALL(SetAnimatorFlags, VINE_0, MODEL_ANIMATOR_FLAG_HIDDEN, 1) - EVT_CALL(LoadAnimatedModel, VINE_1, EVT_PTR(N(AnimModel_SideHeadVine))) - EVT_CALL(N(LoadAnimationFromTable), VINE_1, 31) - EVT_CALL(PlayModelAnimation, VINE_1, VINE_1_BASE) - EVT_CALL(SetAnimatedModelRootPosition, VINE_1, 220, -100, -40) - EVT_CALL(SetAnimatorFlags, VINE_1, MODEL_ANIMATOR_FLAG_HIDDEN, 1) - EVT_CALL(LoadAnimatedModel, VINE_2, EVT_PTR(N(AnimModel_SideHeadVine))) - EVT_CALL(N(LoadAnimationFromTable), VINE_2, 31) - EVT_CALL(PlayModelAnimation, VINE_2, VINE_2_BASE) - EVT_CALL(SetAnimatedModelRootPosition, VINE_2, 270, -100, -20) - EVT_CALL(SetAnimatorFlags, VINE_2, MODEL_ANIMATOR_FLAG_HIDDEN, 1) - EVT_CALL(LoadAnimatedModel, VINE_3, EVT_PTR(N(AnimModel_ExtraVine))) - EVT_CALL(N(LoadAnimationFromTable), VINE_3, 34) - EVT_CALL(PlayModelAnimation, VINE_3, VINE_3_BASE) - EVT_CALL(SetAnimatedModelRootPosition, VINE_3, 220, -100, -40) - EVT_CALL(SetAnimatorFlags, VINE_3, MODEL_ANIMATOR_FLAG_HIDDEN, 1) - EVT_CALL(N(CreateVineRenderer)) - EVT_CALL(SetSelfVar, 1, 1) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_THREAD - EVT_WAIT(15) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 300, 25, -20) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 300, 25, -20) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-9.5)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_END_THREAD - EVT_CALL(MakeLerp, 0, 40, 80, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_poko, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_THREAD - EVT_CALL(InterruptUsePartner) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, 200, -30, 0) - EVT_CALL(InterpPlayerYaw, 90, 0) - EVT_END_THREAD - EVT_CALL(PlaySoundAt, SOUND_LAVA_PIRANHA_EMERGE, SOUND_SPACE_DEFAULT, 330, 25, -50) - EVT_EXEC(N(EVS_PlayVinesAnim_Emerge)) - EVT_WAIT(59) - EVT_THREAD - EVT_CALL(MakeLerp, 40, 0, 80, EASING_QUADRATIC_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(TranslateModel, MODEL_poko, 0, LVar0, 0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_WAIT(40) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 235, 25, -20) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 235, 25, -20) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(420.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(10.0), EVT_FLOAT(-10.7)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_EXEC(N(EVS_PlayVinesAnim_Talk)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_LavaPiranha_Anim0E, ANIM_LavaPiranha_Anim03, 768, -30, 30, MSG_CH5_0102) - EVT_EXEC(N(EVS_PlayVinesAnim_Idle)) - EVT_WAIT(10) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_LavaPiranha_Anim0E, ANIM_LavaPiranha_Anim03, 256, -30, 30) - EVT_EXEC(N(EVS_PlayVinesAnim_Talk)) - EVT_WAIT(30) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_LavaPiranha_Anim0E, ANIM_LavaPiranha_Anim03, 768, -30, 30, MSG_CH5_0103) - EVT_EXEC(N(EVS_PlayVinesAnim_Idle)) - EVT_WAIT(10) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_LavaPiranha_Anim0E, ANIM_LavaPiranha_Anim03, 768, -30, 30) - EVT_EXEC(N(EVS_PlayVinesAnim_Talk)) - EVT_WAIT(10) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_LavaPiranha_Anim0E, ANIM_LavaPiranha_Anim03, 768, -30, 30) - EVT_EXEC(N(EVS_PlayVinesAnim_Idle)) - EVT_WAIT(10) - EVT_CALL(EndSpeech, NPC_SELF, ANIM_LavaPiranha_Anim0E, ANIM_LavaPiranha_Anim03, 768, -30, 30) - EVT_CHILD_THREAD - EVT_SET(LVar0, 20) - EVT_LOOP(3) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, LVar0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_SUB(LVar0, 2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(440.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, LVar0) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_SUB(LVar0, 2) - EVT_END_LOOP - EVT_END_CHILD_THREAD - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(StartBossBattle, SONG_LAVA_PIRANHA_BATTLE) - EVT_RETURN - EVT_END + Loop(0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Wait(1) + IfGt(LVar0, 150) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerInput, TRUE) + Call(SetMusicTrack, 0, SONG_LAVA_PIRANHA_THEME, 0, 8) + Call(LoadAnimatedModel, VINE_0, Ref(N(AnimModel_MainHeadVine))) + Call(N(LoadAnimationFromTable), VINE_0, 0) + Call(PlayModelAnimation, VINE_0, VINE_0_BASE) + Call(SetAnimatedModelRootPosition, VINE_0, 220, -100, -40) + Call(SetAnimatorFlags, VINE_0, MODEL_ANIMATOR_FLAG_HIDDEN, 1) + Call(LoadAnimatedModel, VINE_1, Ref(N(AnimModel_SideHeadVine))) + Call(N(LoadAnimationFromTable), VINE_1, 31) + Call(PlayModelAnimation, VINE_1, VINE_1_BASE) + Call(SetAnimatedModelRootPosition, VINE_1, 220, -100, -40) + Call(SetAnimatorFlags, VINE_1, MODEL_ANIMATOR_FLAG_HIDDEN, 1) + Call(LoadAnimatedModel, VINE_2, Ref(N(AnimModel_SideHeadVine))) + Call(N(LoadAnimationFromTable), VINE_2, 31) + Call(PlayModelAnimation, VINE_2, VINE_2_BASE) + Call(SetAnimatedModelRootPosition, VINE_2, 270, -100, -20) + Call(SetAnimatorFlags, VINE_2, MODEL_ANIMATOR_FLAG_HIDDEN, 1) + Call(LoadAnimatedModel, VINE_3, Ref(N(AnimModel_ExtraVine))) + Call(N(LoadAnimationFromTable), VINE_3, 34) + Call(PlayModelAnimation, VINE_3, VINE_3_BASE) + Call(SetAnimatedModelRootPosition, VINE_3, 220, -100, -40) + Call(SetAnimatorFlags, VINE_3, MODEL_ANIMATOR_FLAG_HIDDEN, 1) + Call(N(CreateVineRenderer)) + Call(SetSelfVar, 1, 1) + Call(InterpPlayerYaw, 90, 0) + Thread + Wait(15) + Call(UseSettingsFrom, CAM_DEFAULT, 300, 25, -20) + Call(SetPanTarget, CAM_DEFAULT, 300, 25, -20) + Call(SetCamDistance, CAM_DEFAULT, Float(350.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-9.5)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + EndThread + Call(MakeLerp, 0, 40, 80, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_poko, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Thread + Call(InterruptUsePartner) + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, 200, -30, 0) + Call(InterpPlayerYaw, 90, 0) + EndThread + Call(PlaySoundAt, SOUND_LAVA_PIRANHA_EMERGE, SOUND_SPACE_DEFAULT, 330, 25, -50) + Exec(N(EVS_PlayVinesAnim_Emerge)) + Wait(59) + Thread + Call(MakeLerp, 40, 0, 80, EASING_QUADRATIC_OUT) + Loop(0) + Call(UpdateLerp) + Call(TranslateModel, MODEL_poko, 0, LVar0, 0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread + Wait(40) + Call(UseSettingsFrom, CAM_DEFAULT, 235, 25, -20) + Call(SetPanTarget, CAM_DEFAULT, 235, 25, -20) + Call(SetCamDistance, CAM_DEFAULT, Float(420.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(10.0), Float(-10.7)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Exec(N(EVS_PlayVinesAnim_Talk)) + Call(SpeakToPlayer, NPC_SELF, ANIM_LavaPiranha_Anim0E, ANIM_LavaPiranha_Anim03, 768, -30, 30, MSG_CH5_0102) + Exec(N(EVS_PlayVinesAnim_Idle)) + Wait(10) + Call(EndSpeech, NPC_SELF, ANIM_LavaPiranha_Anim0E, ANIM_LavaPiranha_Anim03, 256, -30, 30) + Exec(N(EVS_PlayVinesAnim_Talk)) + Wait(30) + Call(SpeakToPlayer, NPC_SELF, ANIM_LavaPiranha_Anim0E, ANIM_LavaPiranha_Anim03, 768, -30, 30, MSG_CH5_0103) + Exec(N(EVS_PlayVinesAnim_Idle)) + Wait(10) + Call(EndSpeech, NPC_SELF, ANIM_LavaPiranha_Anim0E, ANIM_LavaPiranha_Anim03, 768, -30, 30) + Exec(N(EVS_PlayVinesAnim_Talk)) + Wait(10) + Call(EndSpeech, NPC_SELF, ANIM_LavaPiranha_Anim0E, ANIM_LavaPiranha_Anim03, 768, -30, 30) + Exec(N(EVS_PlayVinesAnim_Idle)) + Wait(10) + Call(EndSpeech, NPC_SELF, ANIM_LavaPiranha_Anim0E, ANIM_LavaPiranha_Anim03, 768, -30, 30) + ChildThread + Set(LVar0, 20) + Loop(3) + Call(SetCamDistance, CAM_DEFAULT, Float(250.0)) + Call(SetCamSpeed, CAM_DEFAULT, LVar0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Sub(LVar0, 2) + Call(SetCamDistance, CAM_DEFAULT, Float(440.0)) + Call(SetCamSpeed, CAM_DEFAULT, LVar0) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Sub(LVar0, 2) + EndLoop + EndChildThread + Call(DisablePlayerInput, FALSE) + Call(StartBossBattle, SONG_LAVA_PIRANHA_BATTLE) + Return + End }; EvtScript N(EVS_NpcAux_LavaPiranha) = { - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_USE_ARRAY(LVar0) - EVT_LOOP(0) - EVT_CALL(GetSelfVar, 1, LVar0) - EVT_IF_EQ(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_LABEL(0) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_LavaPiranhaHead, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcRotation, NPC_LavaPiranhaHead, LVar0, 0, LVar2) - EVT_CALL(N(MarkVineInterpolationDirty)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 0, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 90) - EVT_CALL(N(SetVineBoneRot), VINE_0, 0, LVar0, 0, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 0, 1, 1, 1) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 1, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 1, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 1, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 9, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 2, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 9, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 2, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 3, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 3, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 8, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 4, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 8, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 4, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 5, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 5, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 7, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 6, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 7, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 6, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 7, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 7, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 7, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_0, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_0, 8, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_0, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_0, 8, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_0, 8, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_LavaBud_01, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcRotation, NPC_LavaBud_01, LVar0, 0, LVar2) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_1, 0, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 90) - EVT_CALL(N(SetVineBoneRot), VINE_1, 0, LVar0, 0, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_1, 0, 1, 1, 1) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 4, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 2) - EVT_CALL(N(SetVineBonePos), VINE_1, 1, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_1, 1, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_1, 1, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 7, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_1, 2, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 7, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_1, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_1, 2, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_1, 3, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_1, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_1, 3, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_1, 4, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_1, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_1, 4, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_1, 5, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_1, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_1, 5, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_1, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_1, 6, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_1, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_1, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_1, 6, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcPos, NPC_LavaBud_02, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcRotation, NPC_LavaBud_02, LVar0, 0, LVar2) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_2, 0, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, 90) - EVT_CALL(N(SetVineBoneRot), VINE_2, 0, LVar0, 0, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_2, 0, 1, 1, 1) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 4, LVar0, LVar1, LVar2) - EVT_SUB(LVar2, 2) - EVT_CALL(N(SetVineBonePos), VINE_2, 1, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_2, 1, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_2, 1, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 7, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_2, 2, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 7, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_2, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_2, 2, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_2, 3, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_2, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_2, 3, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_2, 4, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_2, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_2, 4, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_2, 5, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_2, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_2, 5, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_2, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_2, 6, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_2, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_2, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_2, 6, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_3, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_3, 0, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_3, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_3, 0, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_3, 0, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_3, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_3, 1, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_3, 6, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_3, 1, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_3, 1, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_3, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_3, 2, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_3, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_3, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_3, 2, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_3, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_3, 3, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_3, 5, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_3, 3, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_3, 3, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_CALL(GetAnimatedPositionByTreeIndex, VINE_3, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBonePos), VINE_3, 4, LVar0, LVar1, LVar2) - EVT_CALL(GetAnimatedRotationByTreeIndex, VINE_3, 2, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneRot), VINE_3, 4, LVar0, LVar1, LVar2) - EVT_CALL(N(SetVineBoneScale), VINE_3, 4, EVT_FLOAT(0.714), EVT_FLOAT(0.714), EVT_FLOAT(1.0)) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_RETURN - EVT_END + Call(GetSelfVar, 0, LVar0) + UseArray(LVar0) + Loop(0) + Call(GetSelfVar, 1, LVar0) + IfEq(LVar0, 1) + BreakLoop + EndIf + Wait(1) + EndLoop + Label(0) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_LavaPiranhaHead, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) + Call(SetNpcRotation, NPC_LavaPiranhaHead, LVar0, 0, LVar2) + Call(N(MarkVineInterpolationDirty)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 0, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 10, LVar0, LVar1, LVar2) + Add(LVar2, 90) + Call(N(SetVineBoneRot), VINE_0, 0, LVar0, 0, LVar2) + Call(N(SetVineBoneScale), VINE_0, 0, 1, 1, 1) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 1, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 1, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 1, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 9, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 2, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 9, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 2, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 3, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 3, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 8, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 4, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 8, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 4, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 5, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 5, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 7, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 6, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 7, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 6, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 7, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 7, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 7, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_0, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_0, 8, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_0, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_0, 8, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_0, 8, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_LavaBud_01, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) + Call(SetNpcRotation, NPC_LavaBud_01, LVar0, 0, LVar2) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_1, 0, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 8, LVar0, LVar1, LVar2) + Add(LVar2, 90) + Call(N(SetVineBoneRot), VINE_1, 0, LVar0, 0, LVar2) + Call(N(SetVineBoneScale), VINE_1, 0, 1, 1, 1) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 4, LVar0, LVar1, LVar2) + Sub(LVar2, 2) + Call(N(SetVineBonePos), VINE_1, 1, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_1, 1, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_1, 1, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 7, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_1, 2, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 7, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_1, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_1, 2, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_1, 3, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_1, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_1, 3, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_1, 4, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_1, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_1, 4, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_1, 5, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_1, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_1, 5, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_1, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_1, 6, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_1, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_1, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_1, 6, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) + Call(SetNpcPos, NPC_LavaBud_02, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) + Call(SetNpcRotation, NPC_LavaBud_02, LVar0, 0, LVar2) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_2, 0, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 8, LVar0, LVar1, LVar2) + Add(LVar2, 90) + Call(N(SetVineBoneRot), VINE_2, 0, LVar0, 0, LVar2) + Call(N(SetVineBoneScale), VINE_2, 0, 1, 1, 1) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 4, LVar0, LVar1, LVar2) + Sub(LVar2, 2) + Call(N(SetVineBonePos), VINE_2, 1, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_2, 1, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_2, 1, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 7, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_2, 2, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 7, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_2, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_2, 2, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_2, 3, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_2, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_2, 3, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_2, 4, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_2, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_2, 4, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_2, 5, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_2, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_2, 5, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_2, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_2, 6, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_2, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_2, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_2, 6, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_3, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_3, 0, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_3, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_3, 0, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_3, 0, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_3, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_3, 1, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_3, 6, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_3, 1, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_3, 1, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_3, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_3, 2, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_3, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_3, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_3, 2, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_3, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_3, 3, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_3, 5, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_3, 3, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_3, 3, Float(0.714), Float(0.714), Float(1.0)) + Call(GetAnimatedPositionByTreeIndex, VINE_3, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBonePos), VINE_3, 4, LVar0, LVar1, LVar2) + Call(GetAnimatedRotationByTreeIndex, VINE_3, 2, LVar0, LVar1, LVar2) + Call(N(SetVineBoneRot), VINE_3, 4, LVar0, LVar1, LVar2) + Call(N(SetVineBoneScale), VINE_3, 4, Float(0.714), Float(0.714), Float(1.0)) + Wait(1) + Goto(0) + Return + End }; EvtScript N(EVS_NpcDefeat_LavaPiranha) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CALL(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAG_2, TRUE) - EVT_CALL(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) - EVT_CALL(SetPlayerPos, 125, 25, -35) - EVT_CALL(SetNpcPos, NPC_PARTNER, 100, 25, -35) - EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 125, 25, -35) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 205, 25, -35) - EVT_CALL(SetCamDistance, CAM_DEFAULT, 470) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(16.0), EVT_FLOAT(-8.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(EnableGroup, MODEL_ato, TRUE) - EVT_CALL(EnableGroup, MODEL_naka, TRUE) - EVT_CALL(EnableGroup, MODEL_mae, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_ato, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mae, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlaySoundAt, SOUND_LAVA_PIRANHA_DEFEAT, SOUND_SPACE_DEFAULT, 330, 25, -50) - EVT_EXEC(N(EVS_PlayVinesAnim_Defeat)) - EVT_WAIT(1) - EVT_CALL(SetNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_LavaPiranha))) - EVT_SET(MV_BossDefeated, TRUE) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + Call(SetEncounterStatusFlags, ENCOUNTER_STATUS_FLAG_2, TRUE) + Call(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) + Call(SetPlayerPos, 125, 25, -35) + Call(SetNpcPos, NPC_PARTNER, 100, 25, -35) + Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) + Call(UseSettingsFrom, CAM_DEFAULT, 125, 25, -35) + Call(SetPanTarget, CAM_DEFAULT, 205, 25, -35) + Call(SetCamDistance, CAM_DEFAULT, 470) + Call(SetCamPitch, CAM_DEFAULT, Float(16.0), Float(-8.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(EnableGroup, MODEL_ato, TRUE) + Call(EnableGroup, MODEL_naka, TRUE) + Call(EnableGroup, MODEL_mae, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_ato, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_mae, COLLIDER_FLAGS_UPPER_MASK) + Call(PlaySoundAt, SOUND_LAVA_PIRANHA_DEFEAT, SOUND_SPACE_DEFAULT, 330, 25, -50) + Exec(N(EVS_PlayVinesAnim_Defeat)) + Wait(1) + Call(SetNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_LavaPiranha))) + Set(MV_BossDefeated, TRUE) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_LavaPiranha) = { - EVT_CALL(GetEntryID, LVar0) - EVT_IF_EQ(LVar0, kzn_19_ENTRY_1) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_DEFEATED_LAVA_PIRANHA) - EVT_CALL(SetNpcAnimation, NPC_LavaPiranhaHead, ANIM_LavaPiranha_Anim03) - EVT_CALL(SetNpcAnimation, NPC_LavaBud_01, ANIM_LavaBud_Anim03) - EVT_CALL(SetNpcAnimation, NPC_LavaBud_02, ANIM_LavaBud_Anim03) - EVT_MALLOC_ARRAY(64, LVar0) - EVT_CALL(SetSelfVar, 0, LVar0) - EVT_USE_ARRAY(LVar0) - EVT_CALL(SetSelfVar, 1, 0) - EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_LavaPiranha))) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_LavaPiranha))) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_LavaPiranha))) - EVT_RETURN - EVT_END_IF - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_05, NPC_DISPOSE_LOCATION) - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_RETURN - EVT_END + Call(GetEntryID, LVar0) + IfEq(LVar0, kzn_19_ENTRY_1) + IfLt(GB_StoryProgress, STORY_CH5_DEFEATED_LAVA_PIRANHA) + Call(SetNpcAnimation, NPC_LavaPiranhaHead, ANIM_LavaPiranha_Anim03) + Call(SetNpcAnimation, NPC_LavaBud_01, ANIM_LavaBud_Anim03) + Call(SetNpcAnimation, NPC_LavaBud_02, ANIM_LavaBud_Anim03) + MallocArray(64, LVar0) + Call(SetSelfVar, 0, LVar0) + UseArray(LVar0) + Call(SetSelfVar, 1, 0) + Call(BindNpcAux, NPC_SELF, Ref(N(EVS_NpcAux_LavaPiranha))) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_LavaPiranha))) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_LavaPiranha))) + Return + EndIf + EndIf + Call(SetNpcPos, NPC_05, NPC_DISPOSE_LOCATION) + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Return + End }; EvtScript N(EVS_NpcDefeat_LavaBud) = { - EVT_CALL(GetBattleOutcome, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(OUTCOME_PLAYER_WON) - EVT_CASE_EQ(OUTCOME_PLAYER_LOST) - EVT_CASE_EQ(OUTCOME_PLAYER_FLED) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(GetBattleOutcome, LVar0) + Switch(LVar0) + CaseEq(OUTCOME_PLAYER_WON) + CaseEq(OUTCOME_PLAYER_LOST) + CaseEq(OUTCOME_PLAYER_FLED) + EndSwitch + Return + End }; EvtScript N(EVS_NpcInit_LavaBud) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH5_DEFEATED_LAVA_PIRANHA) - EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_LavaBud))) - EVT_ELSE - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH5_DEFEATED_LAVA_PIRANHA) + Call(BindNpcDefeat, NPC_SELF, Ref(N(EVS_NpcDefeat_LavaBud))) + Else + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + EndIf + Return + End }; NpcData N(NpcData_Kolorado) = { diff --git a/src/world/dead/area_kzn/kzn_19/kzn_19_5_eruption.c b/src/world/dead/area_kzn/kzn_19/kzn_19_5_eruption.c index 1041f2fbfb9..645ef13a296 100644 --- a/src/world/dead/area_kzn/kzn_19/kzn_19_5_eruption.c +++ b/src/world/dead/area_kzn/kzn_19/kzn_19_5_eruption.c @@ -2,91 +2,91 @@ #include "sprite/player.h" EvtScript N(EVS_CrackFloor) = { - EVT_CALL(EnableGroup, MODEL_naka, FALSE) - EVT_CALL(EnableGroup, MODEL_g93, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_hoshi_ato, COLLIDER_FLAGS_UPPER_MASK) - EVT_SETF(LVar0, 0) - EVT_THREAD - EVT_LOOP(60) - EVT_ADDF(LVar0, EVT_FLOAT(0.334)) - EVT_CALL(RotateModel, MODEL_o2, LVar0, 0, 0, -1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(60) - EVT_ADDF(LVar0, EVT_FLOAT(0.5)) - EVT_CALL(RotateModel, MODEL_o3, LVar0, 0, 0, -1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(60) - EVT_ADDF(LVar0, EVT_FLOAT(0.25)) - EVT_CALL(RotateModel, MODEL_o4, LVar0, 0, 0, -1) - EVT_WAIT(1) - EVT_END_LOOP - EVT_END_THREAD - EVT_LOOP(120) - EVT_SUBF(LVar0, EVT_FLOAT(0.25)) - EVT_CALL(TranslateModel, MODEL_o6, 0, LVar0, 0) - EVT_WAIT(1) - EVT_END_LOOP - EVT_SET(AF_KZN_BossRoomFloorBroken, FALSE) - EVT_RETURN - EVT_END + Call(EnableGroup, MODEL_naka, FALSE) + Call(EnableGroup, MODEL_g93, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_hoshi_ato, COLLIDER_FLAGS_UPPER_MASK) + SetF(LVar0, 0) + Thread + Loop(60) + AddF(LVar0, Float(0.334)) + Call(RotateModel, MODEL_o2, LVar0, 0, 0, -1) + Wait(1) + EndLoop + EndThread + Thread + Loop(60) + AddF(LVar0, Float(0.5)) + Call(RotateModel, MODEL_o3, LVar0, 0, 0, -1) + Wait(1) + EndLoop + EndThread + Thread + Loop(60) + AddF(LVar0, Float(0.25)) + Call(RotateModel, MODEL_o4, LVar0, 0, 0, -1) + Wait(1) + EndLoop + EndThread + Loop(120) + SubF(LVar0, Float(0.25)) + Call(TranslateModel, MODEL_o6, 0, LVar0, 0) + Wait(1) + EndLoop + Set(AF_KZN_BossRoomFloorBroken, FALSE) + Return + End }; EvtScript N(EVS_SetFloorCracked) = { - EVT_CALL(RotateModel, MODEL_o2, 20, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o3, 30, 0, 0, -1) - EVT_CALL(RotateModel, MODEL_o4, 15, 0, 0, -1) - EVT_CALL(TranslateModel, MODEL_o6, 0, -30, 0) - EVT_RETURN - EVT_END + Call(RotateModel, MODEL_o2, 20, 0, 0, -1) + Call(RotateModel, MODEL_o3, 30, 0, 0, -1) + Call(RotateModel, MODEL_o4, 15, 0, 0, -1) + Call(TranslateModel, MODEL_o6, 0, -30, 0) + Return + End }; EvtScript N(EVS_UpdateEruption) = { - EVT_SET(AF_KZN_BossRoomFloorBroken, FALSE) - EVT_IF_GE(GB_StoryProgress, STORY_CH5_STAR_SPRIT_DEPARTED) - EVT_RETURN - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH5_MT_LAVA_LAVA_ERUPTING) + Set(AF_KZN_BossRoomFloorBroken, FALSE) + IfGe(GB_StoryProgress, STORY_CH5_STAR_SPRIT_DEPARTED) + Return + EndIf + IfLt(GB_StoryProgress, STORY_CH5_MT_LAVA_LAVA_ERUPTING) // wait for card pickup - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_NE(AF_KZN_BossRoomFloorBroken, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP + Loop(0) + Wait(1) + IfNe(AF_KZN_BossRoomFloorBroken, FALSE) + BreakLoop + EndIf + EndLoop // begin eruption effects - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(2.0)) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 170, 25, 0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.5)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 25, EVT_FLOAT(2.0)) - EVT_CALL(InterpPlayerYaw, 270, 0) - EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_EXEC(N(EVS_CrackFloor)) - EVT_CALL(MakeLerp, 200, 50, 75, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 1, LVar0) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_ELSE + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(2.0)) + Call(SetPanTarget, CAM_DEFAULT, 170, 25, 0) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.5)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(ShakeCam, CAM_DEFAULT, 0, 25, Float(2.0)) + Call(InterpPlayerYaw, 270, 0) + Call(InterpNpcYaw, NPC_PARTNER, 270, 0) + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + Exec(N(EVS_CrackFloor)) + Call(MakeLerp, 200, 50, 75, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + DivF(LVar0, Float(100.0)) + Call(ShakeCam, CAM_DEFAULT, 0, 1, LVar0) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Else // GB_StoryProgress == STORY_CH5_MT_LAVA_LAVA_ERUPTING - EVT_EXEC(N(EVS_SetFloorCracked)) - EVT_END_IF - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_hoshi, COLLIDER_FLAGS_UPPER_MASK) - EVT_LOOP(0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.5)) - EVT_END_LOOP - EVT_RETURN - EVT_END + Exec(N(EVS_SetFloorCracked)) + EndIf + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_hoshi, COLLIDER_FLAGS_UPPER_MASK) + Loop(0) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(0.5)) + EndLoop + Return + End }; diff --git a/src/world/dead/area_kzn/kzn_19/kzn_19_6_entity.c b/src/world/dead/area_kzn/kzn_19/kzn_19_6_entity.c index cba4279f9b8..4a63c167eef 100644 --- a/src/world/dead/area_kzn/kzn_19/kzn_19_6_entity.c +++ b/src/world/dead/area_kzn/kzn_19/kzn_19_6_entity.c @@ -2,10 +2,10 @@ #include "entity.h" EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -170, 310, -340, 0, ITEM_SUPER_SHROOM, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KZN19_ItemBlock_SuperShroom) - EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -70, 310, -340, 0, ITEM_MAPLE_SYRUP, MAKE_ENTITY_END) - EVT_CALL(AssignBlockFlag, GF_KZN19_ItemBlock_MapleSyrup) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_YellowBlock), -170, 310, -340, 0, ITEM_SUPER_SHROOM, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KZN19_ItemBlock_SuperShroom) + Call(MakeEntity, Ref(Entity_YellowBlock), -70, 310, -340, 0, ITEM_MAPLE_SYRUP, MAKE_ENTITY_END) + Call(AssignBlockFlag, GF_KZN19_ItemBlock_MapleSyrup) + Return + End }; diff --git a/src/world/dead/area_kzn/kzn_20/kzn_20_1_music.c b/src/world/dead/area_kzn/kzn_20/kzn_20_1_music.c index 3ab10abfac2..ab6df8c382f 100644 --- a/src/world/dead/area_kzn/kzn_20/kzn_20_1_music.c +++ b/src/world/dead/area_kzn/kzn_20/kzn_20_1_music.c @@ -1,16 +1,16 @@ #include "kzn_20.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH5_MT_LAVA_LAVA_ERUPTING) - EVT_CALL(PlaySound, SOUND_LOOP_RUMBLE) - EVT_END_IF - EVT_IF_LT(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) - EVT_CALL(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_3) - EVT_ELSE - EVT_CALL(SetMusicTrack, 0, SONG_VOLCANO_ESCAPE, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_1) - EVT_END_IF - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH5_MT_LAVA_LAVA_ERUPTING) + Call(PlaySound, SOUND_LOOP_RUMBLE) + EndIf + IfLt(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) + Call(SetMusicTrack, 0, SONG_MT_LAVALAVA, 0, 8) + Call(PlayAmbientSounds, AMBIENT_LAVA_3) + Else + Call(SetMusicTrack, 0, SONG_VOLCANO_ESCAPE, 0, 8) + Call(PlayAmbientSounds, AMBIENT_LAVA_1) + EndIf + Return + End }; diff --git a/src/world/dead/area_kzn/kzn_20/kzn_20_2_main.c b/src/world/dead/area_kzn/kzn_20/kzn_20_2_main.c index 00150c5d61c..aa269bfdca3 100644 --- a/src/world/dead/area_kzn/kzn_20/kzn_20_2_main.c +++ b/src/world/dead/area_kzn/kzn_20/kzn_20_2_main.c @@ -7,24 +7,24 @@ EvtScript N(EVS_ExitWalk_kzn_19_2) = EVT_EXIT_WALK(60, kzn_20_ENTRY_0, "kzn_19", EvtScript N(EVS_ExitWalk_kzn_22_0) = EVT_EXIT_WALK(60, kzn_20_ENTRY_1, "kzn_22", kzn_22_ENTRY_0); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(N(EVS_ExitWalk_kzn_19_2), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) - EVT_BIND_TRIGGER(N(EVS_ExitWalk_kzn_22_0), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(N(EVS_ExitWalk_kzn_19_2), TRIGGER_FLOOR_ABOVE, COLLIDER_deili1, 1, 0) + BindTrigger(N(EVS_ExitWalk_kzn_22_0), TRIGGER_FLOOR_ABOVE, COLLIDER_deili2, 1, 0) + Return + End }; EvtScript N(EVS_UpdateTexPan_Lava) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(EnableTexPanning, MODEL_yu, TRUE) - EVT_THREAD + SetGroup(EVT_GROUP_00) + Call(EnableTexPanning, MODEL_yu, TRUE) + Thread TEX_PAN_PARAMS_ID(TEX_PANNER_1) TEX_PAN_PARAMS_STEP( -700, 700, 200, -300) TEX_PAN_PARAMS_FREQ( 1, 1, 1, 1) TEX_PAN_PARAMS_INIT( 0, 0, 0, 0) - EVT_EXEC(N(EVS_UpdateTexturePan)) - EVT_END_THREAD - EVT_RETURN - EVT_END + Exec(N(EVS_UpdateTexturePan)) + EndThread + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -34,117 +34,117 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(EVS_DetermineLavaLevel) = { - EVT_LOOP(0) - EVT_IF_GE(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) - EVT_LABEL(1) - EVT_IF_LT(MV_LavaPosOffset, 110) - EVT_SUBF(MV_WaveScaleOffset, EVT_FLOAT(0.01)) - EVT_ADDF(MV_PosScaleCoeff, EVT_FLOAT(0.01)) - EVT_LOOP(5) - EVT_ADDF(MV_LavaPosOffset, EVT_FLOAT(0.75)) - EVT_WAIT(9) - EVT_END_LOOP - EVT_ELSE - EVT_BREAK_LOOP - EVT_END_IF - EVT_GOTO(1) - EVT_END_IF - EVT_WAIT(1) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + IfGe(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) + Label(1) + IfLt(MV_LavaPosOffset, 110) + SubF(MV_WaveScaleOffset, Float(0.01)) + AddF(MV_PosScaleCoeff, Float(0.01)) + Loop(5) + AddF(MV_LavaPosOffset, Float(0.75)) + Wait(9) + EndLoop + Else + BreakLoop + EndIf + Goto(1) + EndIf + Wait(1) + EndLoop + Return + End }; EvtScript N(EVS_InterruptPartnersInLava) = { - EVT_LOOP(0) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetModelCenter, MODEL_yu) - EVT_CALL(GetPlayerPos, LVar0, LVar3, LVar2) - EVT_IF_LT(LVar3, LVar1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(GetCurrentPartnerID, LVar1) - EVT_IF_NE(LVar1, PARTNER_LAKILESTER) - EVT_CALL(InterruptUsePartner) - EVT_CALL(SetPlayerActionState, ACTION_STATE_HIT_LAVA) - EVT_WAIT(30) - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Loop(0) + Wait(1) + Call(GetModelCenter, MODEL_yu) + Call(GetPlayerPos, LVar0, LVar3, LVar2) + IfLt(LVar3, LVar1) + BreakLoop + EndIf + EndLoop + Call(GetCurrentPartnerID, LVar1) + IfNe(LVar1, PARTNER_LAKILESTER) + Call(InterruptUsePartner) + Call(SetPlayerActionState, ACTION_STATE_HIT_LAVA) + Wait(30) + EndIf + EndLoop + Return + End }; EvtScript N(EVS_UpdateLavaWaves) = { - EVT_SET_GROUP(EVT_GROUP_EF) - EVT_CALL(EnableModel, MODEL_yu, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_yu, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ParentColliderToModel, COLLIDER_yu, MODEL_yu) - EVT_LABEL(0) - EVT_IF_EQ(AF_KZN_RumblingIntensified, FALSE) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(EnableModel, MODEL_yu, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_yu, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_yu, SURFACE_TYPE_LAVA) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_IF_LT(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) - EVT_SETF(MV_LavaPosOffset, 35) - EVT_SETF(MV_WaveScaleOffset, EVT_FLOAT(1.2)) - EVT_SETF(MV_PosScaleCoeff, EVT_FLOAT(-1.2)) - EVT_ELSE - EVT_SETF(MV_LavaPosOffset, 110) - EVT_SETF(MV_WaveScaleOffset, EVT_FLOAT(1.0)) - EVT_SETF(MV_PosScaleCoeff, EVT_FLOAT(-1.0)) - EVT_END_IF - EVT_EXEC(N(EVS_DetermineLavaLevel)) - EVT_EXEC(N(EVS_InterruptPartnersInLava)) - EVT_LOOP(0) - EVT_CALL(MakeLerp, 0, 260, 30, EASING_COS_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SUBF(LVar0, MV_WaveScaleOffset) - EVT_SETF(LVar3, MV_LavaPosOffset) - EVT_SETF(LVar4, MV_LavaPosOffset) - EVT_DIVF(LVar3, MV_PosScaleCoeff) - EVT_MULF(LVar3, LVar0) - EVT_ADDF(LVar4, LVar3) // = PosOffset + Scale * (PosOffset / PosScaleCoeff) - EVT_CALL(TranslateModel, MODEL_yu, 0, LVar4, 0) - EVT_CALL(ScaleModel, MODEL_yu, 1, LVar0, 1) - EVT_CALL(TranslateModel, MODEL_yu, 0, MV_LavaPosOffset, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_yu) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 260, 0, 60, EASING_SIN_OUT) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_SUBF(LVar0, MV_WaveScaleOffset) - EVT_SETF(LVar3, MV_LavaPosOffset) - EVT_SETF(LVar4, MV_LavaPosOffset) - EVT_DIVF(LVar3, MV_PosScaleCoeff) - EVT_MULF(LVar3, LVar0) - EVT_ADDF(LVar4, LVar3) - EVT_CALL(TranslateModel, MODEL_yu, 0, LVar4, 0) - EVT_CALL(ScaleModel, MODEL_yu, 1, LVar0, 1) - EVT_CALL(TranslateModel, MODEL_yu, 0, MV_LavaPosOffset, 0) - EVT_CALL(UpdateColliderTransform, COLLIDER_yu) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_EF) + Call(EnableModel, MODEL_yu, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_yu, COLLIDER_FLAGS_UPPER_MASK) + Call(ParentColliderToModel, COLLIDER_yu, MODEL_yu) + Label(0) + IfEq(AF_KZN_RumblingIntensified, FALSE) + Wait(1) + Goto(0) + EndIf + Call(EnableModel, MODEL_yu, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_yu, COLLIDER_FLAGS_UPPER_MASK) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_yu, SURFACE_TYPE_LAVA) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + IfLt(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) + SetF(MV_LavaPosOffset, 35) + SetF(MV_WaveScaleOffset, Float(1.2)) + SetF(MV_PosScaleCoeff, Float(-1.2)) + Else + SetF(MV_LavaPosOffset, 110) + SetF(MV_WaveScaleOffset, Float(1.0)) + SetF(MV_PosScaleCoeff, Float(-1.0)) + EndIf + Exec(N(EVS_DetermineLavaLevel)) + Exec(N(EVS_InterruptPartnersInLava)) + Loop(0) + Call(MakeLerp, 0, 260, 30, EASING_COS_IN) + Loop(0) + Call(UpdateLerp) + DivF(LVar0, Float(100.0)) + SubF(LVar0, MV_WaveScaleOffset) + SetF(LVar3, MV_LavaPosOffset) + SetF(LVar4, MV_LavaPosOffset) + DivF(LVar3, MV_PosScaleCoeff) + MulF(LVar3, LVar0) + AddF(LVar4, LVar3) // = PosOffset + Scale * (PosOffset / PosScaleCoeff) + Call(TranslateModel, MODEL_yu, 0, LVar4, 0) + Call(ScaleModel, MODEL_yu, 1, LVar0, 1) + Call(TranslateModel, MODEL_yu, 0, MV_LavaPosOffset, 0) + Call(UpdateColliderTransform, COLLIDER_yu) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 260, 0, 60, EASING_SIN_OUT) + Loop(0) + Call(UpdateLerp) + DivF(LVar0, Float(100.0)) + SubF(LVar0, MV_WaveScaleOffset) + SetF(LVar3, MV_LavaPosOffset) + SetF(LVar4, MV_LavaPosOffset) + DivF(LVar3, MV_PosScaleCoeff) + MulF(LVar3, LVar0) + AddF(LVar4, LVar3) + Call(TranslateModel, MODEL_yu, 0, LVar4, 0) + Call(ScaleModel, MODEL_yu, 1, LVar0, 1) + Call(TranslateModel, MODEL_yu, 0, MV_LavaPosOffset, 0) + Call(UpdateColliderTransform, COLLIDER_yu) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndLoop + Return + End }; BombTrigger N(WeakWallBombTrigger) = { @@ -153,35 +153,35 @@ BombTrigger N(WeakWallBombTrigger) = { }; EvtScript N(EVS_OnBreakWall) = { - EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 0, 2, 2, 1, 10, 30) - EVT_CALL(EnableGroup, MODEL_bom_mae, FALSE) - EVT_CALL(EnableGroup, MODEL_bom_ato, TRUE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) - EVT_SET(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) - EVT_UNBIND - EVT_RETURN - EVT_END + PlayEffect(EFFECT_BOMBETTE_BREAKING, 0, 2, 2, 1, 10, 30) + Call(EnableGroup, MODEL_bom_mae, FALSE) + Call(EnableGroup, MODEL_bom_ato, TRUE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) + Set(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) + Unbind + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_LAVALAVA) - EVT_CALL(SetSpriteShading, SHADING_KZN_20) - EVT_SETUP_CAMERA_NO_LEAD() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_SET(LVar0, N(EVS_BindExitTriggers)) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_EXEC(N(EVS_ShakingWorld)) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) - EVT_CALL(EnableGroup, MODEL_bom_ato, FALSE) - EVT_BIND_TRIGGER(N(EVS_OnBreakWall), TRIGGER_POINT_BOMB, EVT_PTR(N(WeakWallBombTrigger)), 1, 0) - EVT_ELSE - EVT_CALL(EnableGroup, MODEL_bom_mae, FALSE) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) - EVT_END_IF - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_UpdateLavaWaves)) - EVT_EXEC(N(EVS_UpdateTexPan_Lava)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_LAVALAVA) + Call(SetSpriteShading, SHADING_KZN_20) + SetUP_CAMERA_NO_LEAD() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Set(LVar0, N(EVS_BindExitTriggers)) + Exec(EnterWalk) + Wait(1) + Exec(N(EVS_ShakingWorld)) + IfLt(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) + Call(EnableGroup, MODEL_bom_ato, FALSE) + BindTrigger(N(EVS_OnBreakWall), TRIGGER_POINT_BOMB, Ref(N(WeakWallBombTrigger)), 1, 0) + Else + Call(EnableGroup, MODEL_bom_mae, FALSE) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) + EndIf + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_UpdateLavaWaves)) + Exec(N(EVS_UpdateTexPan_Lava)) + Return + End }; diff --git a/src/world/dead/area_kzn/kzn_20/kzn_20_3_npc.c b/src/world/dead/area_kzn/kzn_20/kzn_20_3_npc.c index 44452e523b6..0b34250ade7 100644 --- a/src/world/dead/area_kzn/kzn_20/kzn_20_3_npc.c +++ b/src/world/dead/area_kzn/kzn_20/kzn_20_3_npc.c @@ -33,56 +33,56 @@ EVT_LETTER_PROMPT(Kolorado, NPC_Kolorado, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle EVT_LETTER_REWARD(Kolorado); EvtScript N(EVS_SpawnFallingDust) = { - EVT_SET_GROUP(EVT_GROUP_0B) - EVT_LOOP(0) - EVT_CALL(RandInt, 100, LVar0) - EVT_SUB(LVar0, 100) - EVT_PLAY_EFFECT(EFFECT_DUST, 1, LVar0, 350, 0, 60) - EVT_CALL(RandInt, 100, LVar0) - EVT_WAIT(30) - EVT_PLAY_EFFECT(EFFECT_DUST, 1, LVar0, 350, 0, 60) - EVT_WAIT(30) - EVT_END_LOOP - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0B) + Loop(0) + Call(RandInt, 100, LVar0) + Sub(LVar0, 100) + PlayEffect(EFFECT_DUST, 1, LVar0, 350, 0, 60) + Call(RandInt, 100, LVar0) + Wait(30) + PlayEffect(EFFECT_DUST, 1, LVar0, 350, 0, 60) + Wait(30) + EndLoop + Return + End }; EvtScript N(EVS_ShakingWorld) = { - EVT_SET_GROUP(EVT_GROUP_0A) - EVT_IF_GE(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) - EVT_EXEC(N(EVS_SpawnFallingDust)) - EVT_ELSE - EVT_LOOP(0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 2, EVT_FLOAT(0.5)) - EVT_IF_NE(AF_KZN_RumblingIntensified, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_EXEC(N(EVS_SpawnFallingDust)) - EVT_CALL(MakeLerp, 20, 250, 5, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 3, LVar0) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(MakeLerp, 250, 30, 60, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_DIVF(LVar0, EVT_FLOAT(100.0)) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, LVar0) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_IF - EVT_LOOP(0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.5)) - EVT_END_LOOP - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_0A) + IfGe(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) + Exec(N(EVS_SpawnFallingDust)) + Else + Loop(0) + Call(ShakeCam, CAM_DEFAULT, 0, 2, Float(0.5)) + IfNe(AF_KZN_RumblingIntensified, FALSE) + BreakLoop + EndIf + EndLoop + Exec(N(EVS_SpawnFallingDust)) + Call(MakeLerp, 20, 250, 5, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + DivF(LVar0, Float(100.0)) + Call(ShakeCam, CAM_DEFAULT, 0, 3, LVar0) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(MakeLerp, 250, 30, 60, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + DivF(LVar0, Float(100.0)) + Call(ShakeCam, CAM_DEFAULT, 0, 5, LVar0) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndIf + Loop(0) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(0.5)) + EndLoop + Return + End }; s32 N(Kolorado_Wander1)[] = { @@ -104,63 +104,63 @@ s32 N(Kolorado_Wander2)[] = { }; EvtScript N(EVS_Kolorado_CalmIdle) = { - EVT_SET_GROUP(EVT_GROUP_EF) - EVT_LABEL(0) - EVT_CALL(RandInt, 1, LVar1) - EVT_IF_EQ(LVar1, 0) - EVT_USE_BUF(N(Kolorado_Wander1)) - EVT_ELSE - EVT_USE_BUF(N(Kolorado_Wander2)) - EVT_END_IF - EVT_LABEL(10) - EVT_BUF_READ3(LVar1, LVar2, LVar3) - EVT_IF_EQ(LVar1, -1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(SetNpcSpeed, NPC_Kolorado, LVar1) - EVT_CALL(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Walk) - EVT_CALL(NpcMoveTo, NPC_Kolorado, LVar2, LVar3, 0) - EVT_BUF_READ1(LVar2) - EVT_CALL(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Idle) - EVT_WAIT(5) - EVT_CALL(RandInt, 2, LVar4) - EVT_ADD(LVar4, 1) - EVT_LOOP(LVar4) - EVT_CALL(GetNpcYaw, NPC_Kolorado, LVar5) - EVT_ADD(LVar5, 180) - EVT_IF_GT(LVar5, 360) - EVT_SUB(LVar5, 360) - EVT_END_IF - EVT_CALL(InterpNpcYaw, NPC_Kolorado, LVar5, 1) - EVT_WAIT(20) - EVT_END_LOOP - EVT_WAIT(LVar2) - EVT_GOTO(10) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_EF) + Label(0) + Call(RandInt, 1, LVar1) + IfEq(LVar1, 0) + UseBuf(N(Kolorado_Wander1)) + Else + UseBuf(N(Kolorado_Wander2)) + EndIf + Label(10) + BufRead3(LVar1, LVar2, LVar3) + IfEq(LVar1, -1) + Goto(0) + EndIf + Call(SetNpcSpeed, NPC_Kolorado, LVar1) + Call(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Walk) + Call(NpcMoveTo, NPC_Kolorado, LVar2, LVar3, 0) + BufRead1(LVar2) + Call(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Idle) + Wait(5) + Call(RandInt, 2, LVar4) + Add(LVar4, 1) + Loop(LVar4) + Call(GetNpcYaw, NPC_Kolorado, LVar5) + Add(LVar5, 180) + IfGt(LVar5, 360) + Sub(LVar5, 360) + EndIf + Call(InterpNpcYaw, NPC_Kolorado, LVar5, 1) + Wait(20) + EndLoop + Wait(LVar2) + Goto(10) + Return + End }; EvtScript N(EVS_KoloradoBurned_PlayerReaction) = { - EVT_CALL(GetPlayerPos, LVar0, LVar3, LVar2) - EVT_ADD(LVar3, 30) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcPos, NPC_Kolorado, LVar0, LVar1, LVar2) - EVT_IF_GT(LVar1, LVar3) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_LookUp) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcPos, NPC_Kolorado, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar1, LVar3) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVar0, LVar3, LVar2) + Add(LVar3, 30) + Loop(0) + Wait(1) + Call(GetNpcPos, NPC_Kolorado, LVar0, LVar1, LVar2) + IfGt(LVar1, LVar3) + BreakLoop + EndIf + EndLoop + Call(SetPlayerAnimation, ANIM_Mario1_LookUp) + Loop(0) + Wait(1) + Call(GetNpcPos, NPC_Kolorado, LVar0, LVar1, LVar2) + IfLt(LVar1, LVar3) + BreakLoop + EndIf + EndLoop + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Return + End }; API_CALLABLE(N(func_80240A68_C96998)) { @@ -169,176 +169,176 @@ API_CALLABLE(N(func_80240A68_C96998)) { } EvtScript N(EVS_NpcIdle_Kolorado) = { - EVT_EXEC_GET_TID(N(EVS_Kolorado_CalmIdle), LVar9) + ExecGetTID(N(EVS_Kolorado_CalmIdle), LVar9) // wait for scene to begin - EVT_LABEL(0) - EVT_WAIT(1) - EVT_IF_NE(MV_SceneState, SCENE_STATE_BEGIN) - EVT_GOTO(0) - EVT_END_IF - EVT_KILL_THREAD(LVar9) - EVT_WAIT(10) + Label(0) + Wait(1) + IfNe(MV_SceneState, SCENE_STATE_BEGIN) + Goto(0) + EndIf + KillThread(LVar9) + Wait(10) // cutscene actions - EVT_LABEL(10) - EVT_SWITCH(MV_SceneState) - EVT_CASE_EQ(SCENE_STATE_BEGIN) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 1) - EVT_CALL(SetNpcPos, NPC_SELF, -30, 100, 40) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.0)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, -25, 125, -20, 10) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 20, 150, 5, 10) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(3.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, 40, 35, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_010A) - EVT_SET(MV_SceneState, SCENE_STATE_STARFISH_REMARK) - EVT_CASE_EQ(SCENE_STATE_KOLORADO_LOOKS_AROUND) - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_ADD(LVar3, -30) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 4) - EVT_WAIT(10) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 4) - EVT_WAIT(10) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 4) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(2.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, 20, 0, 0) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, -35, 125, -20, 12) - EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(1.0)) - EVT_LABEL(25) - EVT_CALL(NpcMoveTo, NPC_SELF, -15, -20, 0) - EVT_CALL(NpcMoveTo, NPC_SELF, -40, -20, 0) - EVT_IF_EQ(AF_KZN20_SceneSync, FALSE) - EVT_WAIT(1) - EVT_GOTO(25) - EVT_END_IF - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 5, MSG_CH5_010B) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 15, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(15) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.5)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_CALL(NpcJump0, NPC_SELF, LVar3, LVar4, LVar5, 8) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) - EVT_THREAD - EVT_WAIT(8) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_END_THREAD - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 5, MSG_CH5_010C) - EVT_SET(AF_KZN_RumblingIntensified, TRUE) - EVT_CALL(SetMusicTrack, 0, SONG_VOLCANO_ESCAPE, 0, 8) - EVT_WAIT(20) - EVT_THREAD - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Flail) - EVT_WAIT(60) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_END_THREAD - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Yell) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Yell, 0, MSG_CH5_010D) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.0)) - EVT_SET(MV_SceneState, SCENE_STATE_KOLORADO_WENT_BACK) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, -30, 100, 40, 10) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, -15, 75, 80, 10) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 35, 50, 120, 10) - EVT_CASE_EQ(SCENE_STATE_KOLORADO_WARNED) - EVT_CALL(N(func_80240A68_C96998)) - EVT_EXEC(N(EVS_KoloradoBurned_PlayerReaction)) - EVT_THREAD - EVT_CALL(PlayerFaceNpc, NPC_SELF, FALSE) - EVT_CALL(ShowMessageAtScreenPos, MSG_CH5_010F, 160, 40) - EVT_END_THREAD - EVT_THREAD - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_ADD(LVar2, -10) - EVT_PLAY_EFFECT(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, 1, 10) - EVT_IF_EQ(MV_SceneState, SCENE_STATE_KOLORADO_BURNED) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Hurt) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.8)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_TOUCH_LAVA, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump1, NPC_SELF, LVar0, LVar1, LVar2, 60) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) - EVT_SET(MV_SceneState, SCENE_STATE_KOLORADO_BURNED) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 100, 25, 100) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 100, 25, 100) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(450.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Panic, ANIM_Kolorado_Panic, 0, MSG_CH5_0110) - EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_SET(MV_SceneState, SCENE_STATE_MISSTAR_SPEAKS) - EVT_CASE_EQ(SCENE_STATE_KOLORADO_RETURN) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) - EVT_CALL(SetNpcPos, NPC_SELF, -30, 100, 40) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.0)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, -25, 125, -20, 10) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, 20, 150, 5, 8) - EVT_SET(MV_SceneState, SCENE_STATE_SEARCH_FOR_EXIT) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(3.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, 75, -30, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) - EVT_END_SWITCH - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Label(10) + Switch(MV_SceneState) + CaseEq(SCENE_STATE_BEGIN) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) + Call(InterpNpcYaw, NPC_SELF, 90, 1) + Call(SetNpcPos, NPC_SELF, -30, 100, 40) + Call(SetNpcJumpscale, NPC_SELF, Float(2.0)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, -25, 125, -20, 10) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 20, 150, 5, 10) + Call(SetNpcSpeed, NPC_SELF, Float(3.0)) + Call(NpcMoveTo, NPC_SELF, 40, 35, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_010A) + Set(MV_SceneState, SCENE_STATE_STARFISH_REMARK) + CaseEq(SCENE_STATE_KOLORADO_LOOKS_AROUND) + Call(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + Call(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) + Add(LVar3, -30) + Call(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetCamDistance, CAM_DEFAULT, Float(250.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(InterpNpcYaw, NPC_SELF, 270, 4) + Wait(10) + Call(InterpNpcYaw, NPC_SELF, 90, 4) + Wait(10) + Call(InterpNpcYaw, NPC_SELF, 270, 4) + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) + Call(SetNpcSpeed, NPC_SELF, Float(2.0)) + Call(NpcMoveTo, NPC_SELF, 20, 0, 0) + Call(SetNpcJumpscale, NPC_SELF, Float(1.0)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, -35, 125, -20, 12) + Call(PlayerFaceNpc, NPC_SELF, FALSE) + Call(SetNpcSpeed, NPC_SELF, Float(1.0)) + Label(25) + Call(NpcMoveTo, NPC_SELF, -15, -20, 0) + Call(NpcMoveTo, NPC_SELF, -40, -20, 0) + IfEq(AF_KZN20_SceneSync, FALSE) + Wait(1) + Goto(25) + EndIf + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 5, MSG_CH5_010B) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 15, EMOTER_NPC, 0, 0, 0, 0) + Wait(15) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) + Call(SetNpcJumpscale, NPC_SELF, Float(1.5)) + Call(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + Call(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + Call(NpcJump0, NPC_SELF, LVar3, LVar4, LVar5, 8) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) + Thread + Wait(8) + Call(NpcFacePlayer, NPC_SELF, 0) + EndThread + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 5, MSG_CH5_010C) + Set(AF_KZN_RumblingIntensified, TRUE) + Call(SetMusicTrack, 0, SONG_VOLCANO_ESCAPE, 0, 8) + Wait(20) + Thread + Call(SetPlayerAnimation, ANIM_Mario1_Flail) + Wait(60) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + EndThread + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Yell) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Yell, 0, MSG_CH5_010D) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) + Call(SetNpcJumpscale, NPC_SELF, Float(2.0)) + Set(MV_SceneState, SCENE_STATE_KOLORADO_WENT_BACK) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, -30, 100, 40, 10) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, -15, 75, 80, 10) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 35, 50, 120, 10) + CaseEq(SCENE_STATE_KOLORADO_WARNED) + Call(N(func_80240A68_C96998)) + Exec(N(EVS_KoloradoBurned_PlayerReaction)) + Thread + Call(PlayerFaceNpc, NPC_SELF, FALSE) + Call(ShowMessageAtScreenPos, MSG_CH5_010F, 160, 40) + EndThread + Thread + Loop(0) + Wait(1) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Add(LVar2, -10) + PlayEffect(EFFECT_SMOKE_BURST, 0, LVar0, LVar1, LVar2, 1, 10) + IfEq(MV_SceneState, SCENE_STATE_KOLORADO_BURNED) + BreakLoop + EndIf + EndLoop + EndThread + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Hurt) + Call(SetNpcJumpscale, NPC_SELF, Float(0.8)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_TOUCH_LAVA, SOUND_SPACE_DEFAULT) + Call(NpcJump1, NPC_SELF, LVar0, LVar1, LVar2, 60) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) + Set(MV_SceneState, SCENE_STATE_KOLORADO_BURNED) + Call(UseSettingsFrom, CAM_DEFAULT, 100, 25, 100) + Call(SetPanTarget, CAM_DEFAULT, 100, 25, 100) + Call(SetCamDistance, CAM_DEFAULT, Float(450.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-7.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Panic, ANIM_Kolorado_Panic, 0, MSG_CH5_0110) + Call(ResetCam, CAM_DEFAULT, Float(90.0)) + Set(MV_SceneState, SCENE_STATE_MISSTAR_SPEAKS) + CaseEq(SCENE_STATE_KOLORADO_RETURN) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Walk) + Call(SetNpcPos, NPC_SELF, -30, 100, 40) + Call(SetNpcJumpscale, NPC_SELF, Float(2.0)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, -25, 125, -20, 10) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, 20, 150, 5, 8) + Set(MV_SceneState, SCENE_STATE_SEARCH_FOR_EXIT) + Call(SetNpcSpeed, NPC_SELF, Float(3.0)) + Call(NpcMoveTo, NPC_SELF, 75, -30, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Idle) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, FALSE) + EndSwitch + Wait(1) + Goto(10) + Return + End }; EvtScript N(EVS_NpcInteract_Kolorado) = { - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar1, 100) - EVT_CALL(EnableNpcAI, NPC_SELF, FALSE) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0108) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + IfLt(LVar1, 100) + Call(EnableNpcAI, NPC_SELF, FALSE) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Talk, ANIM_Kolorado_Idle, 0, MSG_CH5_0108) EVT_LETTER_CHECK(Kolorado) - EVT_CALL(EnableNpcAI, NPC_SELF, TRUE) - EVT_ELSE - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Yell, 0, MSG_CH5_0113) + Call(EnableNpcAI, NPC_SELF, TRUE) + Else + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Yell, 0, MSG_CH5_0113) EVT_LETTER_CHECK(Kolorado) - EVT_END_IF - EVT_RETURN - EVT_END + EndIf + Return + End }; EvtScript N(EVS_NpcInit_Kolorado) = { - EVT_IF_LT(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Kolorado))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Kolorado))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfLt(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Kolorado))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Kolorado))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; Vec3f N(FlightPath1)[] = { @@ -369,161 +369,161 @@ API_CALLABLE(N(GetFloorCollider)) { } EvtScript N(EVS_Scene_Misstar) = { - EVT_IF_EQ(AF_KZN20_MisstarFlightDone, FALSE) - EVT_CALL(SetNpcPos, NPC_SELF, -120, 70, 45) - EVT_WAIT(30) - EVT_SET(AF_KZN20_MisstarFlightDone, TRUE) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_CALL(LoadPath, 60, EVT_PTR(N(FlightPath1)), ARRAY_COUNT(N(FlightPath1)), EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_NE(LVar0, 1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_END_IF + IfEq(AF_KZN20_MisstarFlightDone, FALSE) + Call(SetNpcPos, NPC_SELF, -120, 70, 45) + Wait(30) + Set(AF_KZN20_MisstarFlightDone, TRUE) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Call(LoadPath, 60, Ref(N(FlightPath1)), ARRAY_COUNT(N(FlightPath1)), EASING_LINEAR) + Loop(0) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) + Wait(1) + IfNe(LVar0, 1) + BreakLoop + EndIf + EndLoop + Call(InterpNpcYaw, NPC_SELF, 270, 0) + EndIf // wait for player to reach the top of the stairs - EVT_LABEL(0) - EVT_CALL(N(GetFloorCollider), LVar0) - EVT_IF_NE(LVar0, COLLIDER_o870) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(10) - EVT_THREAD - EVT_WAIT(10) - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(2.0)) - EVT_CALL(PlayerMoveTo, 60, 0, 0) - EVT_END_THREAD - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_SET(AF_KZN_RumblingIntensified, FALSE) - EVT_SET(MV_SceneState, SCENE_STATE_BEGIN) - EVT_LABEL(10) - EVT_SWITCH(MV_SceneState) - EVT_CASE_EQ(SCENE_STATE_STARFISH_REMARK) - EVT_SET(AF_KZN20_SceneSync, FALSE) - EVT_THREAD - EVT_WAIT(30) - EVT_SET(MV_SceneState, SCENE_STATE_KOLORADO_LOOKS_AROUND) - EVT_END_THREAD - EVT_SET(AF_KZN20_SceneSync, TRUE) - EVT_CASE_EQ(SCENE_STATE_KOLORADO_WENT_BACK) - EVT_THREAD - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_SET(MV_SceneState, SCENE_STATE_KOLORADO_CAM_SYNC) - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldMisstar_TalkAngry, ANIM_WorldMisstar_IdleAngry, 5, MSG_CH5_010E) - EVT_LABEL(30) - EVT_IF_EQ(MV_SceneState, SCENE_STATE_KOLORADO_WENT_BACK) - EVT_WAIT(1) - EVT_GOTO(30) - EVT_END_IF - EVT_SET(MV_SceneState, SCENE_STATE_KOLORADO_WARNED) - EVT_CASE_EQ(SCENE_STATE_MISSTAR_SPEAKS) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldMisstar_TalkAngry, ANIM_WorldMisstar_IdleAngry, 0, MSG_CH5_0111) - EVT_SET(MV_SceneState, SCENE_STATE_KOLORADO_RETURN) - EVT_CASE_EQ(SCENE_STATE_SEARCH_FOR_EXIT) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_WAIT(15) - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_WAIT(15) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_WAIT(15) - EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(3.0)) - EVT_CALL(NpcMoveTo, NPC_SELF, 145, -10, 0) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) - EVT_CALL(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 15, EMOTER_NPC, 0, 0, 0, 0) - EVT_WAIT(20) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, -30, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldMisstar_Back) - EVT_CALL(SetNpcJumpscale, NPC_SELF, 0) - EVT_CALL(NpcJump0, NPC_SELF, 170, 170, 50, 20) - EVT_WAIT(5) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, -60, 0) - EVT_CALL(SetNpcYaw, NPC_SELF, 270) - EVT_CALL(NpcJump0, NPC_SELF, 145, 170, -10, 15) - EVT_WAIT(10) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldMisstar_IdleAngry) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, 0) - EVT_CALL(NpcJump1, NPC_SELF, 145, 160, -10, 5) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldMisstar_TalkAngry, ANIM_WorldMisstar_IdleAngry, 0, MSG_CH5_0112) - EVT_CALL(NpcFacePlayer, NPC_SELF, 0) - EVT_SET(MV_SceneState, SCENE_STATE_DONE) - EVT_END_SWITCH - EVT_IF_NE(MV_SceneState, SCENE_STATE_DONE) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(DisablePlayerInput, FALSE) - EVT_LABEL(90) - EVT_IF_LT(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) - EVT_WAIT(1) - EVT_GOTO(90) - EVT_END_IF - EVT_CALL(DisablePlayerInput, TRUE) - EVT_WAIT(40) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) - EVT_THREAD - EVT_CALL(SetNpcFlagBits, NPC_Kolorado, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Panic) - EVT_CALL(SetNpcSpeed, NPC_Kolorado, EVT_FLOAT(5.0)) - EVT_CALL(NpcMoveTo, NPC_Kolorado, 305, 0, 0) - EVT_CALL(RemoveNpc, NPC_Kolorado) - EVT_END_THREAD - EVT_WAIT(30) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.5)) - EVT_CALL(NpcJump0, NPC_SELF, 145, 195, -10, 5) - EVT_WAIT(5) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldMisstar_Panic, ANIM_WorldMisstar_IdleAngry, 0, MSG_CH5_0115) - EVT_WAIT(5) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_CALL(LoadPath, 30, EVT_PTR(N(FlightPath2)), ARRAY_COUNT(N(FlightPath2)), EASING_LINEAR) - EVT_LABEL(91) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(91) - EVT_END_IF - EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Label(0) + Call(N(GetFloorCollider), LVar0) + IfNe(LVar0, COLLIDER_o870) + Wait(1) + Goto(0) + EndIf + Call(DisablePlayerInput, TRUE) + Wait(10) + Thread + Wait(10) + Call(SetPlayerSpeed, Float(2.0)) + Call(PlayerMoveTo, 60, 0, 0) + EndThread + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(350.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(3.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Set(AF_KZN_RumblingIntensified, FALSE) + Set(MV_SceneState, SCENE_STATE_BEGIN) + Label(10) + Switch(MV_SceneState) + CaseEq(SCENE_STATE_STARFISH_REMARK) + Set(AF_KZN20_SceneSync, FALSE) + Thread + Wait(30) + Set(MV_SceneState, SCENE_STATE_KOLORADO_LOOKS_AROUND) + EndThread + Set(AF_KZN20_SceneSync, TRUE) + CaseEq(SCENE_STATE_KOLORADO_WENT_BACK) + Thread + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + Call(SetCamDistance, CAM_DEFAULT, Float(350.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(4.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Set(MV_SceneState, SCENE_STATE_KOLORADO_CAM_SYNC) + EndThread + Wait(10) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldMisstar_TalkAngry, ANIM_WorldMisstar_IdleAngry, 5, MSG_CH5_010E) + Label(30) + IfEq(MV_SceneState, SCENE_STATE_KOLORADO_WENT_BACK) + Wait(1) + Goto(30) + EndIf + Set(MV_SceneState, SCENE_STATE_KOLORADO_WARNED) + CaseEq(SCENE_STATE_MISSTAR_SPEAKS) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldMisstar_TalkAngry, ANIM_WorldMisstar_IdleAngry, 0, MSG_CH5_0111) + Set(MV_SceneState, SCENE_STATE_KOLORADO_RETURN) + CaseEq(SCENE_STATE_SEARCH_FOR_EXIT) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Wait(15) + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Wait(15) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Wait(15) + Call(SetNpcSpeed, NPC_SELF, Float(3.0)) + Call(NpcMoveTo, NPC_SELF, 145, -10, 0) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_EMOTE_IDEA, SOUND_SPACE_DEFAULT) + Call(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 15, EMOTER_NPC, 0, 0, 0, 0) + Wait(20) + Call(SetNpcRotation, NPC_SELF, 0, -30, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldMisstar_Back) + Call(SetNpcJumpscale, NPC_SELF, 0) + Call(NpcJump0, NPC_SELF, 170, 170, 50, 20) + Wait(5) + Call(SetNpcRotation, NPC_SELF, 0, -60, 0) + Call(SetNpcYaw, NPC_SELF, 270) + Call(NpcJump0, NPC_SELF, 145, 170, -10, 15) + Wait(10) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldMisstar_IdleAngry) + Call(SetNpcRotation, NPC_SELF, 0, 0, 0) + Call(NpcJump1, NPC_SELF, 145, 160, -10, 5) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldMisstar_TalkAngry, ANIM_WorldMisstar_IdleAngry, 0, MSG_CH5_0112) + Call(NpcFacePlayer, NPC_SELF, 0) + Set(MV_SceneState, SCENE_STATE_DONE) + EndSwitch + IfNe(MV_SceneState, SCENE_STATE_DONE) + Wait(1) + Goto(10) + EndIf + Call(DisablePlayerInput, FALSE) + Label(90) + IfLt(GB_StoryProgress, STORY_CH5_OPENED_ESCAPE_ROUTE) + Wait(1) + Goto(90) + EndIf + Call(DisablePlayerInput, TRUE) + Wait(40) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt1, COLLIDER_FLAGS_UPPER_MASK) + Thread + Call(SetNpcFlagBits, NPC_Kolorado, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Panic) + Call(SetNpcSpeed, NPC_Kolorado, Float(5.0)) + Call(NpcMoveTo, NPC_Kolorado, 305, 0, 0) + Call(RemoveNpc, NPC_Kolorado) + EndThread + Wait(30) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcJumpscale, NPC_SELF, Float(0.5)) + Call(NpcJump0, NPC_SELF, 145, 195, -10, 5) + Wait(5) + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldMisstar_Panic, ANIM_WorldMisstar_IdleAngry, 0, MSG_CH5_0115) + Wait(5) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Call(LoadPath, 30, Ref(N(FlightPath2)), ARRAY_COUNT(N(FlightPath2)), EASING_LINEAR) + Label(91) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(91) + EndIf + Call(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript N(EVS_NpcInteract_Misstar) = { - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldMisstar_TalkAngry, ANIM_WorldMisstar_IdleAngry, 0, MSG_CH5_0114) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, NPC_SELF, ANIM_WorldMisstar_TalkAngry, ANIM_WorldMisstar_IdleAngry, 0, MSG_CH5_0114) + Return + End }; EvtScript N(EVS_NpcInit_Misstar) = { - EVT_IF_EQ(GB_StoryProgress, STORY_CH5_MT_LAVA_LAVA_ERUPTING) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldMisstar_IdleAngry) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_Scene_Misstar))) - EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Misstar))) - EVT_ELSE - EVT_CALL(RemoveNpc, NPC_SELF) - EVT_END_IF - EVT_RETURN - EVT_END + IfEq(GB_StoryProgress, STORY_CH5_MT_LAVA_LAVA_ERUPTING) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldMisstar_IdleAngry) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_Scene_Misstar))) + Call(BindNpcInteract, NPC_SELF, Ref(N(EVS_NpcInteract_Misstar))) + Else + Call(RemoveNpc, NPC_SELF) + EndIf + Return + End }; NpcData N(NpcData_Kolorado) = { diff --git a/src/world/dead/area_kzn/kzn_22/kzn_22_1_music.c b/src/world/dead/area_kzn/kzn_22/kzn_22_1_music.c index 4a82776367e..5b7d73a3a8e 100644 --- a/src/world/dead/area_kzn/kzn_22/kzn_22_1_music.c +++ b/src/world/dead/area_kzn/kzn_22/kzn_22_1_music.c @@ -1,11 +1,11 @@ #include "kzn_22.h" EvtScript N(EVS_SetupMusic) = { - EVT_IF_GE(GB_StoryProgress, STORY_CH5_MT_LAVA_LAVA_ERUPTING) - EVT_CALL(PlaySound, SOUND_LOOP_RUMBLE) - EVT_END_IF - EVT_CALL(SetMusicTrack, 0, SONG_VOLCANO_ESCAPE, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_4) - EVT_RETURN - EVT_END + IfGe(GB_StoryProgress, STORY_CH5_MT_LAVA_LAVA_ERUPTING) + Call(PlaySound, SOUND_LOOP_RUMBLE) + EndIf + Call(SetMusicTrack, 0, SONG_VOLCANO_ESCAPE, 0, 8) + Call(PlayAmbientSounds, AMBIENT_LAVA_4) + Return + End }; diff --git a/src/world/dead/area_kzn/kzn_22/kzn_22_2_main.c b/src/world/dead/area_kzn/kzn_22/kzn_22_2_main.c index f7ff94243a4..d0ac5f6405b 100644 --- a/src/world/dead/area_kzn/kzn_22/kzn_22_2_main.c +++ b/src/world/dead/area_kzn/kzn_22/kzn_22_2_main.c @@ -5,63 +5,63 @@ EvtScript N(EVS_ExitWalk_kzn_20_1) = EVT_EXIT_WALK_FIXED(60, kzn_22_ENTRY_0, "kzn_20", kzn_20_ENTRY_1); EvtScript N(EVS_BindExitTriggers) = { - EVT_BIND_TRIGGER(N(EVS_ExitWalk_kzn_20_1), TRIGGER_FLOOR_TOUCH, COLLIDER_deili1, 1, 0) - EVT_RETURN - EVT_END + BindTrigger(N(EVS_ExitWalk_kzn_20_1), TRIGGER_FLOOR_TOUCH, COLLIDER_deili1, 1, 0) + Return + End }; EvtScript N(EVS_UpdateTexPan_LavaRiver) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(EnableTexPanning, MODEL_yougan1_1, TRUE) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_LABEL(10) - EVT_CALL(SetTexPanOffset, TEX_PANNER_6, TEX_PANNER_MAIN, LVar0, 0) - EVT_CALL(SetTexPanOffset, TEX_PANNER_6, TEX_PANNER_AUX, LVar1, LVar2) - EVT_ADD(LVar0, -1100) - EVT_ADD(LVar1, 300) - EVT_ADD(LVar2, -500) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(EnableTexPanning, MODEL_yougan1_1, TRUE) + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Label(10) + Call(SetTexPanOffset, TEX_PANNER_6, TEX_PANNER_MAIN, LVar0, 0) + Call(SetTexPanOffset, TEX_PANNER_6, TEX_PANNER_AUX, LVar1, LVar2) + Add(LVar0, -1100) + Add(LVar1, 300) + Add(LVar2, -500) + Wait(1) + Goto(10) + Return + End }; EvtScript N(EVS_UpdateTexPan_LavaFall) = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(EnableTexPanning, MODEL_yougan2_2, TRUE) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_LABEL(10) - EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, LVar1) - EVT_ADD(LVar0, 300) - EVT_ADD(LVar1, -500) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(EnableTexPanning, MODEL_yougan2_2, TRUE) + Set(LVar0, 0) + Set(LVar1, 0) + Label(10) + Call(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, LVar0, LVar1) + Add(LVar0, 300) + Add(LVar1, -500) + Wait(1) + Goto(10) + Return + End }; EvtScript N(EVS_InterruptPartnersInLava) = { - EVT_LOOP(0) - EVT_LOOP(0) - EVT_WAIT(1) - EVT_CALL(GetModelCenter, MODEL_yu) - EVT_CALL(GetPlayerPos, LVar0, LVar3, LVar2) - EVT_IF_LT(LVar3, LVar1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(GetCurrentPartnerID, LVar1) - EVT_IF_NE(LVar1, PARTNER_LAKILESTER) - EVT_CALL(InterruptUsePartner) - EVT_CALL(SetPlayerActionState, ACTION_STATE_HIT_LAVA) - EVT_WAIT(30) - EVT_END_IF - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Loop(0) + Wait(1) + Call(GetModelCenter, MODEL_yu) + Call(GetPlayerPos, LVar0, LVar3, LVar2) + IfLt(LVar3, LVar1) + BreakLoop + EndIf + EndLoop + Call(GetCurrentPartnerID, LVar1) + IfNe(LVar1, PARTNER_LAKILESTER) + Call(InterruptUsePartner) + Call(SetPlayerActionState, ACTION_STATE_HIT_LAVA) + Wait(30) + EndIf + EndLoop + Return + End }; API_CALLABLE(N(GetFloorCollider1)) { @@ -73,61 +73,61 @@ API_CALLABLE(N(GetFloorCollider1)) { } EvtScript N(EVS_UpdateLavaLevel) = { - EVT_SET_GROUP(EVT_GROUP_EF) - EVT_CALL(SetTexPanner, MODEL_yu1, TEX_PANNER_2) - EVT_CALL(SetTexPanner, MODEL_yu, TEX_PANNER_2) - EVT_CALL(EnableModel, MODEL_yu, FALSE) - EVT_CALL(ParentColliderToModel, COLLIDER_o591, MODEL_yu) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 0) - EVT_SETF(LVar4, EVT_FLOAT(0.0)) - EVT_SETF(LVar5, EVT_FLOAT(0.0)) - EVT_SET(LVarA, 0) - EVT_LABEL(10) + SetGroup(EVT_GROUP_EF) + Call(SetTexPanner, MODEL_yu1, TEX_PANNER_2) + Call(SetTexPanner, MODEL_yu, TEX_PANNER_2) + Call(EnableModel, MODEL_yu, FALSE) + Call(ParentColliderToModel, COLLIDER_o591, MODEL_yu) + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Set(LVar3, 0) + SetF(LVar4, Float(0.0)) + SetF(LVar5, Float(0.0)) + Set(LVarA, 0) + Label(10) // update lava texture panning - EVT_CALL(UpdateColliderTransform, COLLIDER_o591) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar0, LVar1) - EVT_CALL(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_AUX, LVar2, LVar3) - EVT_SUB(LVar0, 700) - EVT_ADD(LVar1, 700) - EVT_ADD(LVar2, 200) - EVT_SUB(LVar3, 300) + Call(UpdateColliderTransform, COLLIDER_o591) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_MAIN, LVar0, LVar1) + Call(SetTexPanOffset, TEX_PANNER_2, TEX_PANNER_AUX, LVar2, LVar3) + Sub(LVar0, 700) + Add(LVar1, 700) + Add(LVar2, 200) + Sub(LVar3, 300) // update lava level - EVT_SWITCH(LVarA) - EVT_CASE_EQ(0) + Switch(LVarA) + CaseEq(0) // state 0: wait for player to stand on one of the steps - EVT_CALL(N(GetFloorCollider1), LVar0) - EVT_IF_EQ(LVar0, COLLIDER_o357) - EVT_EXEC(N(EVS_InterruptPartnersInLava)) - EVT_CALL(EnableModel, MODEL_yu, TRUE) - EVT_CALL(EnableModel, MODEL_yu1, FALSE) - EVT_SET(LVarA, 10) // set state to 10 - EVT_END_IF - EVT_CASE_EQ(10) + Call(N(GetFloorCollider1), LVar0) + IfEq(LVar0, COLLIDER_o357) + Exec(N(EVS_InterruptPartnersInLava)) + Call(EnableModel, MODEL_yu, TRUE) + Call(EnableModel, MODEL_yu1, FALSE) + Set(LVarA, 10) // set state to 10 + EndIf + CaseEq(10) // state 10: raise the lava level - EVT_IF_LT(LVar4, 140) - EVT_SET(LVar5, EVT_FLOAT(1.5)) - EVT_ELSE - EVT_IF_EQ(AF_KZN22_FlewAway, FALSE) - EVT_SET(LVar5, EVT_FLOAT(0.0)) - EVT_ELSE - EVT_IF_LT(LVar4, 285) - EVT_SET(LVar5, EVT_FLOAT(2.8)) - EVT_ELSE - EVT_SET(LVar5, EVT_FLOAT(0.0)) - EVT_SET(LVarA, -1) - EVT_END_IF - EVT_END_IF - EVT_END_IF - EVT_END_SWITCH - EVT_ADDF(LVar4, LVar5) - EVT_CALL(TranslateModel, MODEL_yu, 0, LVar4, 0) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + IfLt(LVar4, 140) + Set(LVar5, Float(1.5)) + Else + IfEq(AF_KZN22_FlewAway, FALSE) + Set(LVar5, Float(0.0)) + Else + IfLt(LVar4, 285) + Set(LVar5, Float(2.8)) + Else + Set(LVar5, Float(0.0)) + Set(LVarA, -1) + EndIf + EndIf + EndIf + EndSwitch + AddF(LVar4, LVar5) + Call(TranslateModel, MODEL_yu, 0, LVar4, 0) + Wait(1) + Goto(10) + Return + End }; LavaReset N(SafeFloorColliders)[] = { @@ -137,26 +137,26 @@ LavaReset N(SafeFloorColliders)[] = { }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_LAVALAVA) - EVT_CALL(SetSpriteShading, SHADING_KZN_22) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC_WAIT(N(EVS_MakeEntities)) - EVT_SET(LVar0, N(EVS_BindExitTriggers)) - EVT_EXEC(EnterWalk) - EVT_WAIT(1) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o591, SURFACE_TYPE_LAVA) - EVT_THREAD - EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders))) - EVT_END_THREAD - EVT_EXEC(N(EVS_UpdateTexPan_LavaRiver)) - EVT_EXEC(N(EVS_UpdateTexPan_LavaFall)) - EVT_EXEC(N(EVS_UpdateLavaLevel)) - EVT_SET(LVar0, MODEL_kem1) - EVT_EXEC(N(EVS_StartTexPanner_SmokeLeft)) - EVT_SET(LVar0, MODEL_kem2) - EVT_EXEC(N(EVS_StartTexPanner_SmokeRight)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_LAVALAVA) + Call(SetSpriteShading, SHADING_KZN_22) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + ExecWait(N(EVS_MakeEntities)) + Set(LVar0, N(EVS_BindExitTriggers)) + Exec(EnterWalk) + Wait(1) + Exec(N(EVS_SetupMusic)) + Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o591, SURFACE_TYPE_LAVA) + Thread + Call(ResetFromLava, Ref(N(SafeFloorColliders))) + EndThread + Exec(N(EVS_UpdateTexPan_LavaRiver)) + Exec(N(EVS_UpdateTexPan_LavaFall)) + Exec(N(EVS_UpdateLavaLevel)) + Set(LVar0, MODEL_kem1) + Exec(N(EVS_StartTexPanner_SmokeLeft)) + Set(LVar0, MODEL_kem2) + Exec(N(EVS_StartTexPanner_SmokeRight)) + Return + End }; diff --git a/src/world/dead/area_kzn/kzn_22/kzn_22_3_entity.c b/src/world/dead/area_kzn/kzn_22/kzn_22_3_entity.c index ad4522bafcf..4b1dd82f65c 100644 --- a/src/world/dead/area_kzn/kzn_22/kzn_22_3_entity.c +++ b/src/world/dead/area_kzn/kzn_22/kzn_22_3_entity.c @@ -2,12 +2,12 @@ #include "entity.h" EvtScript N(EVS_OpenChest) = { - EVT_RETURN - EVT_END + Return + End }; EvtScript N(EVS_MakeEntities) = { - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 480, 235, 175, 0, 0, MAKE_ENTITY_END) - EVT_RETURN - EVT_END + Call(MakeEntity, Ref(Entity_Chest), 480, 235, 175, 0, 0, MAKE_ENTITY_END) + Return + End }; diff --git a/src/world/dead/area_kzn/kzn_22/kzn_22_4_npc.c b/src/world/dead/area_kzn/kzn_22/kzn_22_4_npc.c index 6af8c485a98..700b4939daa 100644 --- a/src/world/dead/area_kzn/kzn_22/kzn_22_4_npc.c +++ b/src/world/dead/area_kzn/kzn_22/kzn_22_4_npc.c @@ -18,71 +18,71 @@ API_CALLABLE(N(func_8024036C_C9A56C)) { #include "world/common/npc/StarSpirit.inc.c" EvtScript N(EVS_ShakeScreen) = { - EVT_LOOP(0) - EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.5)) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Call(ShakeCam, CAM_DEFAULT, 0, 5, Float(0.5)) + EndLoop + Return + End }; EvtScript N(EVS_NpcIdle_Kolorado) = { - EVT_EXEC(N(EVS_ShakeScreen)) - EVT_LABEL(0) + Exec(N(EVS_ShakeScreen)) + Label(0) // wait for player to reach top of stairs - EVT_CALL(N(GetFloorCollider2), LVar0) - EVT_IF_NE(LVar0, COLLIDER_o544) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF + Call(N(GetFloorCollider2), LVar0) + IfNe(LVar0, COLLIDER_o544) + Wait(1) + Goto(0) + EndIf // start scene (but wait for player to stop being hurt if they fell in the lava) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetPlayerAnimation, LVar0) - EVT_IF_EQ(LVar0, ANIM_MarioW2_Thrown) - EVT_WAIT(35) - EVT_END_IF - EVT_WAIT(10) -EVT_END_IF //@bug unmatched endif - EVT_CALL(PlayerFaceNpc, NPC_Kolorado, FALSE) - EVT_SET(AF_KZN23_SceneStarted, TRUE) - EVT_THREAD - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(DisablePlayerInput, TRUE) + Call(GetPlayerAnimation, LVar0) + IfEq(LVar0, ANIM_MarioW2_Thrown) + Wait(35) + EndIf + Wait(10) +EndIf //@bug unmatched endif + Call(PlayerFaceNpc, NPC_Kolorado, FALSE) + Set(AF_KZN23_SceneStarted, TRUE) + Thread + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) // repeatedly jump for the treasure chest - EVT_LABEL(1) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.0)) - EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 15) - EVT_IF_EQ(AF_KZN23_GrabbedKolorado, FALSE) - EVT_WAIT(1) - EVT_GOTO(1) - EVT_END_IF - EVT_END_THREAD - EVT_WAIT(10) - EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(350.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-4.0)) - EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(480.0), EVT_FLOAT(299.6)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_THREAD - EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0)) - EVT_CALL(PlayerMoveTo, 250, 210, 0) - EVT_END_THREAD - EVT_WAIT(20) - EVT_CALL(ShowMessageAtWorldPos, MSG_CH5_0116, 440, 240, 165) - EVT_WAIT(20) - EVT_SET(AF_KZN23_MessageClosed, TRUE) - EVT_RETURN - EVT_END + Label(1) + Call(SetNpcJumpscale, NPC_SELF, Float(2.0)) + Call(PlaySoundAtNpc, NPC_SELF, SOUND_NPC_JUMP, SOUND_SPACE_DEFAULT) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 15) + IfEq(AF_KZN23_GrabbedKolorado, FALSE) + Wait(1) + Goto(1) + EndIf + EndThread + Wait(10) + Call(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5) + Call(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5) + Call(SetCamDistance, CAM_DEFAULT, Float(350.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-4.0)) + Call(SetCamPosB, CAM_DEFAULT, Float(480.0), Float(299.6)) + Call(SetCamSpeed, CAM_DEFAULT, Float(5.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Thread + Call(SetPlayerSpeed, Float(3.0)) + Call(PlayerMoveTo, 250, 210, 0) + EndThread + Wait(20) + Call(ShowMessageAtWorldPos, MSG_CH5_0116, 440, 240, 165) + Wait(20) + Set(AF_KZN23_MessageClosed, TRUE) + Return + End }; EvtScript N(EVS_NpcInit_Kolorado) = { - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Kolorado))) - EVT_RETURN - EVT_END + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Kolorado))) + Return + End }; Vec3f N(FlightPath1)[] = { @@ -119,148 +119,148 @@ Vec3f N(FlightPath3)[] = { }; EvtScript N(EVS_ControlCamera) = { - EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 400, 150, 200) - EVT_CALL(SetPanTarget, CAM_DEFAULT, 400, 150, 200) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(390.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-9.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_LABEL(10) - EVT_WAIT(1) - EVT_IF_EQ(AF_KZN23_GrabbedKolorado, FALSE) - EVT_GOTO(10) - EVT_END_IF - EVT_CALL(SetPanTarget, CAM_DEFAULT, 300, 150, 170) - EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(450.0)) - EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-7.0)) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.3)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_LABEL(20) - EVT_WAIT(1) - EVT_IF_EQ(AF_KZN22_FlewAway, FALSE) - EVT_GOTO(20) - EVT_END_IF - EVT_CALL(SetPanTarget, CAM_DEFAULT, 368, 310, 170) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.8)) - EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0)) - EVT_RETURN - EVT_END + Call(UseSettingsFrom, CAM_DEFAULT, 400, 150, 200) + Call(SetPanTarget, CAM_DEFAULT, 400, 150, 200) + Call(SetCamDistance, CAM_DEFAULT, Float(390.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-9.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(2.0)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Label(10) + Wait(1) + IfEq(AF_KZN23_GrabbedKolorado, FALSE) + Goto(10) + EndIf + Call(SetPanTarget, CAM_DEFAULT, 300, 150, 170) + Call(SetCamDistance, CAM_DEFAULT, Float(450.0)) + Call(SetCamPitch, CAM_DEFAULT, Float(15.0), Float(-7.0)) + Call(SetCamSpeed, CAM_DEFAULT, Float(1.3)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Label(20) + Wait(1) + IfEq(AF_KZN22_FlewAway, FALSE) + Goto(20) + EndIf + Call(SetPanTarget, CAM_DEFAULT, 368, 310, 170) + Call(SetCamSpeed, CAM_DEFAULT, Float(0.8)) + Call(PanToTarget, CAM_DEFAULT, 0, 1) + Call(WaitForCam, CAM_DEFAULT, Float(1.0)) + Return + End }; EvtScript N(EVS_SetCharacterPositions) = { - EVT_CALL(SetNpcPos, NPC_Misstar, LVar4, LVar2, LVar3) - EVT_ADD(LVar4, 10) - EVT_SUB(LVar3, 5) - EVT_CALL(SetNpcPos, NPC_Kolorado, LVar4, LVar2, LVar3) - EVT_IF_EQ(AF_KZN23_GrabbedPlayer, TRUE) - EVT_SUB(LVar4, 20) - EVT_ADD(LVar3, 10) - EVT_CALL(SetPlayerPos, LVar4, LVar2, LVar3) - EVT_ADD(LVar2, 20) - EVT_ADD(LVar3, -5) - EVT_CALL(SetNpcPos, NPC_PARTNER, LVar4, LVar2, LVar3) - EVT_END_IF - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_Misstar, LVar4, LVar2, LVar3) + Add(LVar4, 10) + Sub(LVar3, 5) + Call(SetNpcPos, NPC_Kolorado, LVar4, LVar2, LVar3) + IfEq(AF_KZN23_GrabbedPlayer, TRUE) + Sub(LVar4, 20) + Add(LVar3, 10) + Call(SetPlayerPos, LVar4, LVar2, LVar3) + Add(LVar2, 20) + Add(LVar3, -5) + Call(SetNpcPos, NPC_PARTNER, LVar4, LVar2, LVar3) + EndIf + Return + End }; EvtScript N(EVS_Scene_Misstar) = { - EVT_LOOP(0) - EVT_WAIT(1) - EVT_IF_NE(AF_KZN23_MessageClosed, FALSE) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_CALL(SetNpcFlagBits, NPC_Kolorado, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) - EVT_EXEC(N(EVS_ControlCamera)) - EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(3.0)) - EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) - EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 10) - EVT_WAIT(5) - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_CALL(LoadPath, 35, EVT_PTR(N(FlightPath1)), ARRAY_COUNT(N(FlightPath1)), EASING_LINEAR) - EVT_LABEL(10) - EVT_CALL(GetNextPathPos) - EVT_CALL(SetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(10) - EVT_END_IF - EVT_SET(AF_KZN23_GrabbedKolorado, TRUE) - EVT_CALL(SetNpcRotationPivot, NPC_Kolorado, 10) - EVT_CALL(SetNpcRotation, NPC_Kolorado, 0, 0, 180) - EVT_CALL(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Panic) - EVT_THREAD - EVT_WAIT(32) - EVT_CALL(SetPlayerJumpscale, 0) - EVT_CALL(PlayerJump, 245, 171, 176, 8) - EVT_END_THREAD - EVT_THREAD - EVT_WAIT(32) - EVT_CALL(SetNpcJumpscale, NPC_PARTNER, 0) - EVT_CALL(NpcJump0, NPC_PARTNER, 245, 191, 171, 8) - EVT_END_THREAD - EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0) - EVT_CALL(LoadPath, 40, EVT_PTR(N(FlightPath2)), ARRAY_COUNT(N(FlightPath2)), EASING_LINEAR) - EVT_LABEL(20) - EVT_CALL(GetNextPathPos) - EVT_SET(LVar4, LVar1) - EVT_EXEC_WAIT(N(EVS_SetCharacterPositions)) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(20) - EVT_END_IF - EVT_SET(AF_KZN23_GrabbedPlayer, TRUE) - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Carried) - EVT_THREAD - EVT_WAIT(25) - EVT_SET(AF_KZN22_FlewAway, TRUE) - EVT_CALL(N(func_8024036C_C9A56C)) - EVT_END_THREAD - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 0) - EVT_CALL(LoadPath, 70, EVT_PTR(N(FlightPath3)), ARRAY_COUNT(N(FlightPath3)), EASING_LINEAR) - EVT_LABEL(21) - EVT_CALL(GetNextPathPos) - EVT_SET(LVar4, LVar1) - EVT_EXEC_WAIT(N(EVS_SetCharacterPositions)) - EVT_IF_EQ(LVar0, 1) - EVT_GOTO(21) - EVT_END_IF - EVT_WAIT(1) - EVT_CALL(MakeLerp, 300, 500, 20, EASING_CUBIC_IN) - EVT_CALL(GetNpcPos, NPC_SELF, LVar5, LVar2, LVar6) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SET(LVar4, LVar5) - EVT_SET(LVar2, LVar0) - EVT_SET(LVar3, LVar6) - EVT_EXEC_WAIT(N(EVS_SetCharacterPositions)) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(GotoMap, EVT_PTR("kzn_23"), kzn_23_ENTRY_0) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Loop(0) + Wait(1) + IfNe(AF_KZN23_MessageClosed, FALSE) + BreakLoop + EndIf + EndLoop + Call(DisablePlayerPhysics, TRUE) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(SetNpcFlagBits, NPC_SELF, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Call(SetNpcFlagBits, NPC_Kolorado, NPC_FLAG_IGNORE_PLAYER_COLLISION, TRUE) + Exec(N(EVS_ControlCamera)) + Call(SetNpcJumpscale, NPC_SELF, Float(3.0)) + Call(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2) + Call(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 10) + Wait(5) + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Call(LoadPath, 35, Ref(N(FlightPath1)), ARRAY_COUNT(N(FlightPath1)), EASING_LINEAR) + Label(10) + Call(GetNextPathPos) + Call(SetNpcPos, NPC_SELF, LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 1) + Goto(10) + EndIf + Set(AF_KZN23_GrabbedKolorado, TRUE) + Call(SetNpcRotationPivot, NPC_Kolorado, 10) + Call(SetNpcRotation, NPC_Kolorado, 0, 0, 180) + Call(SetNpcAnimation, NPC_Kolorado, ANIM_Kolorado_Panic) + Thread + Wait(32) + Call(SetPlayerJumpscale, 0) + Call(PlayerJump, 245, 171, 176, 8) + EndThread + Thread + Wait(32) + Call(SetNpcJumpscale, NPC_PARTNER, 0) + Call(NpcJump0, NPC_PARTNER, 245, 191, 171, 8) + EndThread + Call(InterpNpcYaw, NPC_SELF, 270, 0) + Call(LoadPath, 40, Ref(N(FlightPath2)), ARRAY_COUNT(N(FlightPath2)), EASING_LINEAR) + Label(20) + Call(GetNextPathPos) + Set(LVar4, LVar1) + ExecWait(N(EVS_SetCharacterPositions)) + IfEq(LVar0, 1) + Goto(20) + EndIf + Set(AF_KZN23_GrabbedPlayer, TRUE) + Wait(1) + Call(SetPlayerAnimation, ANIM_MarioW2_Carried) + Thread + Wait(25) + Set(AF_KZN22_FlewAway, TRUE) + Call(N(func_8024036C_C9A56C)) + EndThread + Call(InterpNpcYaw, NPC_SELF, 90, 0) + Call(LoadPath, 70, Ref(N(FlightPath3)), ARRAY_COUNT(N(FlightPath3)), EASING_LINEAR) + Label(21) + Call(GetNextPathPos) + Set(LVar4, LVar1) + ExecWait(N(EVS_SetCharacterPositions)) + IfEq(LVar0, 1) + Goto(21) + EndIf + Wait(1) + Call(MakeLerp, 300, 500, 20, EASING_CUBIC_IN) + Call(GetNpcPos, NPC_SELF, LVar5, LVar2, LVar6) + Loop(0) + Call(UpdateLerp) + Set(LVar4, LVar5) + Set(LVar2, LVar0) + Set(LVar3, LVar6) + ExecWait(N(EVS_SetCharacterPositions)) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + Call(GotoMap, Ref("kzn_23"), kzn_23_ENTRY_0) + Wait(100) + Return + End }; EvtScript N(EVS_NpcInit_Misstar) = { - EVT_CALL(SetNpcPos, NPC_SELF, 300, 180, 80) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldMisstar_IdleAngry) - EVT_SET(AF_KZN23_SceneStarted, FALSE) - EVT_SET(AF_KZN23_MessageClosed, FALSE) - EVT_SET(AF_KZN23_GrabbedKolorado, FALSE) - EVT_SET(AF_KZN23_GrabbedPlayer, FALSE) - EVT_SET(AF_KZN22_FlewAway, FALSE) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_Scene_Misstar))) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, 300, 180, 80) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldMisstar_IdleAngry) + Set(AF_KZN23_SceneStarted, FALSE) + Set(AF_KZN23_MessageClosed, FALSE) + Set(AF_KZN23_GrabbedKolorado, FALSE) + Set(AF_KZN23_GrabbedPlayer, FALSE) + Set(AF_KZN22_FlewAway, FALSE) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_Scene_Misstar))) + Return + End }; NpcData N(NpcData_Kolorado) = { diff --git a/src/world/dead/area_kzn/kzn_23/kzn_23_1_music.c b/src/world/dead/area_kzn/kzn_23/kzn_23_1_music.c index 147f1ecdb12..4f604418233 100644 --- a/src/world/dead/area_kzn/kzn_23/kzn_23_1_music.c +++ b/src/world/dead/area_kzn/kzn_23/kzn_23_1_music.c @@ -1,8 +1,8 @@ #include "kzn_23.h" EvtScript N(EVS_SetupMusic) = { - EVT_CALL(SetMusicTrack, 0, SONG_VOLCANO_ESCAPE, 0, 8) - EVT_CALL(PlayAmbientSounds, AMBIENT_LAVA_5) - EVT_RETURN - EVT_END + Call(SetMusicTrack, 0, SONG_VOLCANO_ESCAPE, 0, 8) + Call(PlayAmbientSounds, AMBIENT_LAVA_5) + Return + End }; diff --git a/src/world/dead/area_kzn/kzn_23/kzn_23_2_main.c b/src/world/dead/area_kzn/kzn_23/kzn_23_2_main.c index eefb3ce317e..1fde0e765d4 100644 --- a/src/world/dead/area_kzn/kzn_23/kzn_23_2_main.c +++ b/src/world/dead/area_kzn/kzn_23/kzn_23_2_main.c @@ -10,67 +10,67 @@ s32 N(LavaFluctuationOffsets)[] = { // overlay a sinusoidal offset to the lava level EvtScript N(EVS_ModulateLavaLevel) = { - EVT_LOOP(0) - EVT_USE_BUF(N(LavaFluctuationOffsets)) - EVT_LOOP(ARRAY_COUNT(N(LavaFluctuationOffsets))) - EVT_BUF_READ1(LVar1) - EVT_ADD(MV_LavaLevel, LVar1) - EVT_WAIT(3) - EVT_END_LOOP - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + UseBuf(N(LavaFluctuationOffsets)) + Loop(ARRAY_COUNT(N(LavaFluctuationOffsets))) + BufRead1(LVar1) + Add(MV_LavaLevel, LVar1) + Wait(3) + EndLoop + EndLoop + Return + End }; EvtScript N(EVS_RaiseLava) = { - EVT_EXEC(N(EVS_ModulateLavaLevel)) - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetTexPanner, MODEL_yu, TEX_PANNER_0) - EVT_SET(LVar0, 0) - EVT_SET(LVar1, 0) - EVT_SET(LVar2, 0) - EVT_SET(LVar3, 0) - EVT_SET(MV_LavaLevel, -105) - EVT_SET(LVar5, 40) - EVT_CALL(TranslateModel, MODEL_yu, 0, MV_LavaLevel, 0) - EVT_WAIT(6) - EVT_LABEL(10) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, LVar0, LVar1) - EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_AUX, LVar2, LVar3) - EVT_SUB(LVar0, 700) - EVT_ADD(LVar1, 700) - EVT_ADD(LVar2, 200) - EVT_SUB(LVar3, 300) - EVT_IF_EQ(LVar5, 40) - EVT_IF_LT(MV_LavaLevel, 2700) - EVT_ADD(MV_LavaLevel, 20) - EVT_ELSE - EVT_SUB(LVar5, 1) - EVT_END_IF - EVT_ELSE - EVT_IF_NE(LVar5, 0) - EVT_SUB(LVar5, 1) - EVT_SUB(MV_LavaLevel, 1) - EVT_END_IF - EVT_END_IF - EVT_CALL(TranslateModel, MODEL_yu, 0, MV_LavaLevel, 0) - EVT_WAIT(1) - EVT_GOTO(10) - EVT_RETURN - EVT_END + Exec(N(EVS_ModulateLavaLevel)) + SetGroup(EVT_GROUP_00) + Call(SetTexPanner, MODEL_yu, TEX_PANNER_0) + Set(LVar0, 0) + Set(LVar1, 0) + Set(LVar2, 0) + Set(LVar3, 0) + Set(MV_LavaLevel, -105) + Set(LVar5, 40) + Call(TranslateModel, MODEL_yu, 0, MV_LavaLevel, 0) + Wait(6) + Label(10) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, LVar0, LVar1) + Call(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_AUX, LVar2, LVar3) + Sub(LVar0, 700) + Add(LVar1, 700) + Add(LVar2, 200) + Sub(LVar3, 300) + IfEq(LVar5, 40) + IfLt(MV_LavaLevel, 2700) + Add(MV_LavaLevel, 20) + Else + Sub(LVar5, 1) + EndIf + Else + IfNe(LVar5, 0) + Sub(LVar5, 1) + Sub(MV_LavaLevel, 1) + EndIf + EndIf + Call(TranslateModel, MODEL_yu, 0, MV_LavaLevel, 0) + Wait(1) + Goto(10) + Return + End }; EvtScript N(EVS_Main) = { - EVT_SET(GB_WorldLocation, LOCATION_MT_LAVALAVA) - EVT_CALL(SetSpriteShading, SHADING_KZN_23) - EVT_SETUP_CAMERA_DEFAULT() - EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs))) - EVT_EXEC(N(EVS_SetupMusic)) - EVT_EXEC(N(EVS_RaiseLava)) - EVT_SET(LVar0, MODEL_kem1) - EVT_EXEC(N(EVS_StartTexPanner_SmokeLeft)) - EVT_SET(LVar0, MODEL_kem2) - EVT_EXEC(N(EVS_StartTexPanner_SmokeRight)) - EVT_RETURN - EVT_END + Set(GB_WorldLocation, LOCATION_MT_LAVALAVA) + Call(SetSpriteShading, SHADING_KZN_23) + SetUP_CAMERA_DEFAULT() + Call(MakeNpcs, TRUE, Ref(N(DefaultNPCs))) + Exec(N(EVS_SetupMusic)) + Exec(N(EVS_RaiseLava)) + Set(LVar0, MODEL_kem1) + Exec(N(EVS_StartTexPanner_SmokeLeft)) + Set(LVar0, MODEL_kem2) + Exec(N(EVS_StartTexPanner_SmokeRight)) + Return + End }; diff --git a/src/world/dead/area_kzn/kzn_23/kzn_23_3_npc.c b/src/world/dead/area_kzn/kzn_23/kzn_23_3_npc.c index 343d753d5b1..7691d0da993 100644 --- a/src/world/dead/area_kzn/kzn_23/kzn_23_3_npc.c +++ b/src/world/dead/area_kzn/kzn_23/kzn_23_3_npc.c @@ -73,35 +73,35 @@ API_CALLABLE(N(AnimateChestSize)) { #include "world/common/npc/StarSpirit.inc.c" EvtScript N(EVS_NpcIdle_Kolorado) = { - EVT_WAIT(30) - EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Panic, 5, MSG_CH5_0117) - EVT_RETURN - EVT_END + Wait(30) + Call(SpeakToPlayer, NPC_SELF, ANIM_Kolorado_Shout, ANIM_Kolorado_Panic, 5, MSG_CH5_0117) + Return + End }; EvtScript N(EVS_NpcInit_Kolorado) = { - EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 1) - EVT_WAIT(1) - EVT_CALL(SetNpcRotationPivot, NPC_SELF, 10) - EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, 180) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Kolorado))) - EVT_RETURN - EVT_END + Call(InterpNpcYaw, NPC_SELF, 90, 1) + Wait(1) + Call(SetNpcRotationPivot, NPC_SELF, 10) + Call(SetNpcRotation, NPC_SELF, 0, 0, 180) + Call(SetNpcAnimation, NPC_SELF, ANIM_Kolorado_Panic) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_NpcIdle_Kolorado))) + Return + End }; EvtScript N(EVS_CameraFollowMisstar) = { - EVT_LABEL(0) - EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) - EVT_CALL(GetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 60) - EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) - EVT_IF_LT(LVar1, 2740) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Label(0) + Call(SetCamSpeed, CAM_DEFAULT, Float(90.0)) + Call(GetNpcPos, NPC_Misstar, LVar0, LVar1, LVar2) + Add(LVar1, 60) + Call(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2) + IfLt(LVar1, 2740) + Wait(1) + Goto(0) + EndIf + Return + End }; Vec3f N(PyroclastPathA)[] = { @@ -139,141 +139,141 @@ s32 N(SoundXPositions)[] = { }; EvtScript N(EVS_PlayPyroclastSounds) = { - EVT_ADD(LVar0, 1) - EVT_USE_BUF(N(SoundXPositions)) - EVT_LOOP(LVar0) - EVT_BUF_READ1(LVar1) - EVT_END_LOOP - EVT_IF_EQ(AF_KZN23_UseAlternateSound, FALSE) - EVT_CALL(PlaySoundAt, SOUND_FLYING_PYROCLAST_1, SOUND_SPACE_DEFAULT, LVar1, 2800, 0) - EVT_SET(AF_KZN23_UseAlternateSound, TRUE) - EVT_ELSE - EVT_CALL(PlaySoundAt, SOUND_FLYING_PYROCLAST_2, SOUND_SPACE_DEFAULT, LVar1, 2800, 0) - EVT_SET(AF_KZN23_UseAlternateSound, FALSE) - EVT_END_IF - EVT_RETURN - EVT_END + Add(LVar0, 1) + UseBuf(N(SoundXPositions)) + Loop(LVar0) + BufRead1(LVar1) + EndLoop + IfEq(AF_KZN23_UseAlternateSound, FALSE) + Call(PlaySoundAt, SOUND_FLYING_PYROCLAST_1, SOUND_SPACE_DEFAULT, LVar1, 2800, 0) + Set(AF_KZN23_UseAlternateSound, TRUE) + Else + Call(PlaySoundAt, SOUND_FLYING_PYROCLAST_2, SOUND_SPACE_DEFAULT, LVar1, 2800, 0) + Set(AF_KZN23_UseAlternateSound, FALSE) + EndIf + Return + End }; EvtScript N(EVS_SpawnPyroclasts) = { - EVT_LOOP(0) - EVT_THREAD - EVT_CALL(RandInt, 3, LVar0) - EVT_EXEC(N(EVS_PlayPyroclastSounds)) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(0) - EVT_PLAY_EFFECT(EFFECT_65, 2, 50, 2650, -20, 1, 0) - EVT_SET(LVarE, LVarF) - EVT_CALL(LoadPath, 15, EVT_PTR(N(PyroclastPathA)), ARRAY_COUNT(N(PyroclastPathA)), EASING_QUADRATIC_OUT) - EVT_CASE_EQ(1) - EVT_PLAY_EFFECT(EFFECT_65, 2, -20, 2650, -20, 1, 0) - EVT_SET(LVarE, LVarF) - EVT_CALL(LoadPath, 10, EVT_PTR(N(PyroclastPathB)), ARRAY_COUNT(N(PyroclastPathB)), EASING_QUADRATIC_OUT) - EVT_CASE_EQ(2) - EVT_PLAY_EFFECT(EFFECT_65, 2, 10, 2650, -20, 1, 0) - EVT_SET(LVarE, LVarF) - EVT_CALL(LoadPath, 15, EVT_PTR(N(PyroclastPathC)), ARRAY_COUNT(N(PyroclastPathC)), EASING_QUADRATIC_OUT) - EVT_CASE_EQ(3) - EVT_PLAY_EFFECT(EFFECT_65, 2, -50, 2650, -20, 1, 0) - EVT_SET(LVarE, LVarF) - EVT_CALL(LoadPath, 20, EVT_PTR(N(PyroclastPathD)), ARRAY_COUNT(N(PyroclastPathD)), EASING_QUADRATIC_OUT) - EVT_END_SWITCH - EVT_CALL(RandInt, 1, LVar4) - EVT_IF_EQ(LVar4, 0) - EVT_SET(LVar4, -1) - EVT_END_IF - EVT_LOOP(0) - EVT_CALL(GetNextPathPos) - EVT_MUL(LVar1, LVar4) - EVT_CALL(N(SetPyroclastPos), LVar1, LVar2, LVar3) - EVT_WAIT(1) - EVT_IF_EQ(LVar0, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_CALL(DismissEffect, LVarE) - EVT_END_THREAD - EVT_WAIT(8) - EVT_END_LOOP - EVT_RETURN - EVT_END + Loop(0) + Thread + Call(RandInt, 3, LVar0) + Exec(N(EVS_PlayPyroclastSounds)) + Switch(LVar0) + CaseEq(0) + PlayEffect(EFFECT_65, 2, 50, 2650, -20, 1, 0) + Set(LVarE, LVarF) + Call(LoadPath, 15, Ref(N(PyroclastPathA)), ARRAY_COUNT(N(PyroclastPathA)), EASING_QUADRATIC_OUT) + CaseEq(1) + PlayEffect(EFFECT_65, 2, -20, 2650, -20, 1, 0) + Set(LVarE, LVarF) + Call(LoadPath, 10, Ref(N(PyroclastPathB)), ARRAY_COUNT(N(PyroclastPathB)), EASING_QUADRATIC_OUT) + CaseEq(2) + PlayEffect(EFFECT_65, 2, 10, 2650, -20, 1, 0) + Set(LVarE, LVarF) + Call(LoadPath, 15, Ref(N(PyroclastPathC)), ARRAY_COUNT(N(PyroclastPathC)), EASING_QUADRATIC_OUT) + CaseEq(3) + PlayEffect(EFFECT_65, 2, -50, 2650, -20, 1, 0) + Set(LVarE, LVarF) + Call(LoadPath, 20, Ref(N(PyroclastPathD)), ARRAY_COUNT(N(PyroclastPathD)), EASING_QUADRATIC_OUT) + EndSwitch + Call(RandInt, 1, LVar4) + IfEq(LVar4, 0) + Set(LVar4, -1) + EndIf + Loop(0) + Call(GetNextPathPos) + Mul(LVar1, LVar4) + Call(N(SetPyroclastPos), LVar1, LVar2, LVar3) + Wait(1) + IfEq(LVar0, 0) + BreakLoop + EndIf + EndLoop + Call(DismissEffect, LVarE) + EndThread + Wait(8) + EndLoop + Return + End }; EvtScript N(EVS_Scene_Misstar) = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND) - EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) - EVT_CALL(N(AllowCameraInterpY)) - EVT_EXEC(N(EVS_CameraFollowMisstar)) - EVT_CALL(SetSelfVar, 0, 0) - EVT_THREAD - EVT_WAIT(1) - EVT_CALL(SetPlayerAnimation, ANIM_MarioW2_Carried) - EVT_END_THREAD + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(SetPlayerActionState, ACTION_STATE_LAND) + Call(DisablePartnerAI, 0) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE) + Call(N(AllowCameraInterpY)) + Exec(N(EVS_CameraFollowMisstar)) + Call(SetSelfVar, 0, 0) + Thread + Wait(1) + Call(SetPlayerAnimation, ANIM_MarioW2_Carried) + EndThread // fly out of the volcano shaft - EVT_THREAD - EVT_CALL(MakeLerp, 0, 3090, 160, EASING_LINEAR) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_SUB(LVar0, 100) - EVT_CALL(SetNpcPos, NPC_SELF, 0, LVar0, 0) - EVT_CALL(SetNpcPos, NPC_Kolorado, 10, LVar0, -5) - EVT_CALL(SetPlayerPos, -10, LVar0, 5) - EVT_ADD(LVar0, 20) - EVT_CALL(SetNpcPos, NPC_PARTNER, -10, LVar0, 0) - EVT_IF_GT(LVar0, 2840) - EVT_CALL(SetSelfVar, 0, 1) - EVT_END_IF - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP - EVT_END_THREAD + Thread + Call(MakeLerp, 0, 3090, 160, EASING_LINEAR) + Loop(0) + Call(UpdateLerp) + Sub(LVar0, 100) + Call(SetNpcPos, NPC_SELF, 0, LVar0, 0) + Call(SetNpcPos, NPC_Kolorado, 10, LVar0, -5) + Call(SetPlayerPos, -10, LVar0, 5) + Add(LVar0, 20) + Call(SetNpcPos, NPC_PARTNER, -10, LVar0, 0) + IfGt(LVar0, 2840) + Call(SetSelfVar, 0, 1) + EndIf + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop + EndThread // wait for escape - EVT_LABEL(0) - EVT_CALL(GetSelfVar, 0, LVar0) - EVT_IF_EQ(LVar0, 0) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF + Label(0) + Call(GetSelfVar, 0, LVar0) + IfEq(LVar0, 0) + Wait(1) + Goto(0) + EndIf // make the pyroclasts + sounds - EVT_EXEC(N(EVS_SpawnPyroclasts)) - EVT_WAIT(35) + Exec(N(EVS_SpawnPyroclasts)) + Wait(35) // make the chest thrown from the volcano - EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), 0, 2650, 0, 148, MAKE_ENTITY_END) - EVT_SET(LVarA, LVar0) - EVT_THREAD - EVT_CALL(N(AnimateChestSize)) - EVT_END_THREAD - EVT_SET(LVar9, LVarA) - EVT_CALL(N(GetChestPosition), LVar9, LVar2, LVar3, LVar4) - EVT_CALL(MakeLerp, LVar3, 3000, 10, EASING_QUADRATIC_IN) - EVT_LOOP(0) - EVT_CALL(UpdateLerp) - EVT_CALL(N(SetChestPosition), LVar9, LVar2, LVar0, LVar4) - EVT_ADD(LVar2, -1) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 0) - EVT_BREAK_LOOP - EVT_END_IF - EVT_END_LOOP + Call(MakeEntity, Ref(Entity_Chest), 0, 2650, 0, 148, MAKE_ENTITY_END) + Set(LVarA, LVar0) + Thread + Call(N(AnimateChestSize)) + EndThread + Set(LVar9, LVarA) + Call(N(GetChestPosition), LVar9, LVar2, LVar3, LVar4) + Call(MakeLerp, LVar3, 3000, 10, EASING_QUADRATIC_IN) + Loop(0) + Call(UpdateLerp) + Call(N(SetChestPosition), LVar9, LVar2, LVar0, LVar4) + Add(LVar2, -1) + Wait(1) + IfEq(LVar1, 0) + BreakLoop + EndIf + EndLoop // end scene - EVT_WAIT(45) - EVT_CALL(GotoMap, EVT_PTR("jan_04"), jan_04_ENTRY_1) - EVT_WAIT(100) - EVT_RETURN - EVT_END + Wait(45) + Call(GotoMap, Ref("jan_04"), jan_04_ENTRY_1) + Wait(100) + Return + End }; EvtScript N(EVS_NpcInit_Misstar) = { - EVT_CALL(SetNpcPos, NPC_SELF, 0, -100, 0) - EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldMisstar_IdleAngry) - EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_Scene_Misstar))) - EVT_RETURN - EVT_END + Call(SetNpcPos, NPC_SELF, 0, -100, 0) + Call(SetNpcAnimation, NPC_SELF, ANIM_WorldMisstar_IdleAngry) + Call(BindNpcIdle, NPC_SELF, Ref(N(EVS_Scene_Misstar))) + Return + End }; NpcData N(NpcData_Kolorado) = { diff --git a/src/world/partner/bombette.c b/src/world/partner/bombette.c index 71c311e82b7..501ba389f08 100644 --- a/src/world/partner/bombette.c +++ b/src/world/partner/bombette.c @@ -85,9 +85,9 @@ API_CALLABLE(N(TakeOut)) { } EvtScript EVS_WorldBombette_TakeOut = { - EVT_CALL(N(TakeOut)) - EVT_RETURN - EVT_END + Call(N(TakeOut)) + Return + End }; BSS TweesterPhysics N(TweesterPhysicsData); @@ -178,9 +178,9 @@ API_CALLABLE(N(Update)) { } EvtScript EVS_WorldBombette_Update = { - EVT_CALL(N(Update)) - EVT_RETURN - EVT_END + Call(N(Update)) + Return + End }; void N(try_cancel_tweester)(Npc* npc) { @@ -569,9 +569,9 @@ API_CALLABLE(N(UseAbility)) { } EvtScript EVS_WorldBombette_UseAbility = { - EVT_CALL(N(UseAbility)) - EVT_RETURN - EVT_END + Call(N(UseAbility)) + Return + End }; API_CALLABLE(N(PutAway)) { @@ -589,9 +589,9 @@ API_CALLABLE(N(PutAway)) { } EvtScript EVS_WorldBombette_PutAway = { - EVT_CALL(N(PutAway)) - EVT_RETURN - EVT_END + Call(N(PutAway)) + Return + End }; s32 N(test_first_strike)(Npc* bombette, Npc* enemy) { diff --git a/src/world/partner/bow.c b/src/world/partner/bow.c index e56eb9c0175..219ff054d7e 100644 --- a/src/world/partner/bow.c +++ b/src/world/partner/bow.c @@ -39,9 +39,9 @@ API_CALLABLE(N(TakeOut)) { } EvtScript EVS_WorldBow_TakeOut = { - EVT_CALL(N(TakeOut)) - EVT_RETURN - EVT_END + Call(N(TakeOut)) + Return + End }; TweesterPhysics* N(TweesterPhysicsPtr) = &N(TweesterPhysicsData); @@ -126,9 +126,9 @@ API_CALLABLE(N(Update)) { } EvtScript EVS_WorldBow_Update = { - EVT_CALL(N(Update)) - EVT_RETURN - EVT_END + Call(N(Update)) + Return + End }; void N(try_cancel_tweester)(Npc* bow) { @@ -357,9 +357,9 @@ API_CALLABLE(N(UseAbility)) { } EvtScript EVS_WorldBow_UseAbility = { - EVT_CALL(N(UseAbility)) - EVT_RETURN - EVT_END + Call(N(UseAbility)) + Return + End }; void N(end_outta_sight_cleanup)(Npc* bow) { @@ -412,9 +412,9 @@ API_CALLABLE(N(PutAway)) { } EvtScript EVS_WorldBow_PutAway = { - EVT_CALL(N(PutAway)) - EVT_RETURN - EVT_END + Call(N(PutAway)) + Return + End }; void N(pre_battle)(Npc* bow) { diff --git a/src/world/partner/goombaria.c b/src/world/partner/goombaria.c index 32a3242c74c..3f0f0c4abb9 100644 --- a/src/world/partner/goombaria.c +++ b/src/world/partner/goombaria.c @@ -49,25 +49,25 @@ API_CALLABLE(N(PutAway)) { } EvtScript EVS_WorldGoombaria_TakeOut = { - EVT_CALL(N(TakeOut)) - EVT_RETURN - EVT_END + Call(N(TakeOut)) + Return + End }; EvtScript EVS_WorldGoombaria_Update = { - EVT_CALL(N(Update)) - EVT_RETURN - EVT_END + Call(N(Update)) + Return + End }; EvtScript EVS_WorldGoombaria_UseAbility = { - EVT_CALL(N(UseAbility)) - EVT_RETURN - EVT_END + Call(N(UseAbility)) + Return + End }; EvtScript EVS_WorldGoombaria_PutAway = { - EVT_CALL(N(PutAway)) - EVT_RETURN - EVT_END + Call(N(PutAway)) + Return + End }; diff --git a/src/world/partner/goombario.c b/src/world/partner/goombario.c index 28f91261ed1..ad9d4ce21e4 100644 --- a/src/world/partner/goombario.c +++ b/src/world/partner/goombario.c @@ -96,9 +96,9 @@ API_CALLABLE(N(TakeOut)) { } EvtScript EVS_WorldGoombario_TakeOut = { - EVT_CALL(N(TakeOut)) - EVT_RETURN - EVT_END + Call(N(TakeOut)) + Return + End }; TweesterPhysics* N(TweesterPhysicsPtr) = &N(TweesterPhysicsData); @@ -196,9 +196,9 @@ void N(try_cancel_tweester)(Npc* goombario) { } EvtScript EVS_WorldGoombario_Update = { - EVT_CALL(N(Update)) - EVT_RETURN - EVT_END + Call(N(Update)) + Return + End }; s32 N(can_open_menus)(Npc* goombario) { @@ -449,25 +449,25 @@ API_CALLABLE(N(TattleEnd)) { } EvtScript EVS_WorldGoombario_UseAbility = { - EVT_CALL(N(SelectTattleMsg)) + Call(N(SelectTattleMsg)) // abort without cleanup if failed to init - EVT_IF_EQ(LVar0, -1) - EVT_RETURN - EVT_END_IF + IfEq(LVar0, -1) + Return + EndIf // abort if no tattle message is available - EVT_IF_EQ(LVar0, MSG_NONE) - EVT_CALL(N(TattleEnd)) - EVT_RETURN - EVT_END_IF + IfEq(LVar0, MSG_NONE) + Call(N(TattleEnd)) + Return + EndIf // show message if VAR_SKIP is FALSE - EVT_IF_EQ(LVar1, FALSE) - EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, LVar0) - EVT_END_IF - EVT_WAIT(1) + IfEq(LVar1, FALSE) + Call(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, LVar0) + EndIf + Wait(1) // cleanup - EVT_CALL(N(TattleEnd)) - EVT_RETURN - EVT_END + Call(N(TattleEnd)) + Return + End }; API_CALLABLE(N(PutAway)) { @@ -485,9 +485,9 @@ API_CALLABLE(N(PutAway)) { } EvtScript EVS_WorldGoombario_PutAway = { - EVT_CALL(N(PutAway)) - EVT_RETURN - EVT_END + Call(N(PutAway)) + Return + End }; void N(pre_battle)(Npc* goombario) { diff --git a/src/world/partner/goompa.c b/src/world/partner/goompa.c index 7cb728b0980..5dd622ccbb5 100644 --- a/src/world/partner/goompa.c +++ b/src/world/partner/goompa.c @@ -24,9 +24,9 @@ API_CALLABLE(N(TakeOut)) { } EvtScript EVS_WorldGoompa_TakeOut = { - EVT_CALL(N(TakeOut)) - EVT_RETURN - EVT_END + Call(N(TakeOut)) + Return + End }; BSS TweesterPhysics N(TweesterPhysicsData); @@ -115,9 +115,9 @@ API_CALLABLE(N(Update)) { } EvtScript EVS_WorldGoompa_Update = { - EVT_CALL(N(Update)) - EVT_RETURN - EVT_END + Call(N(Update)) + Return + End }; void N(try_cancel_tweester)(Npc* goompa) { @@ -134,9 +134,9 @@ API_CALLABLE(N(UseAbility)) { } EvtScript EVS_WorldGoompa_UseAbility = { - EVT_CALL(N(UseAbility)) - EVT_RETURN - EVT_END + Call(N(UseAbility)) + Return + End }; API_CALLABLE(N(PutAway)) { @@ -154,7 +154,7 @@ API_CALLABLE(N(PutAway)) { } EvtScript EVS_WorldGoompa_PutAway = { - EVT_CALL(N(PutAway)) - EVT_RETURN - EVT_END + Call(N(PutAway)) + Return + End }; diff --git a/src/world/partner/kooper.c b/src/world/partner/kooper.c index fe51ae388de..0884ee2c3f3 100644 --- a/src/world/partner/kooper.c +++ b/src/world/partner/kooper.c @@ -92,9 +92,9 @@ API_CALLABLE(N(TakeOut)) { } EvtScript EVS_WorldKooper_TakeOut = { - EVT_CALL(N(TakeOut)) - EVT_RETURN - EVT_END + Call(N(TakeOut)) + Return + End }; BSS TweesterPhysics N(TweesterPhysicsData); @@ -193,9 +193,9 @@ void N(try_cancel_tweester)(Npc* kooper) { } EvtScript EVS_WorldKooper_Update = { - EVT_CALL(N(Update)) - EVT_RETURN - EVT_END + Call(N(Update)) + Return + End }; API_CALLABLE(N(UseAbility)) { @@ -646,9 +646,9 @@ API_CALLABLE(N(UseAbility)) { } EvtScript EVS_WorldKooper_UseAbility = { - EVT_CALL(N(UseAbility)) - EVT_RETURN - EVT_END + Call(N(UseAbility)) + Return + End }; API_CALLABLE(N(PutAway)) { @@ -662,9 +662,9 @@ API_CALLABLE(N(PutAway)) { } EvtScript EVS_WorldKooper_PutAway = { - EVT_CALL(N(PutAway)) - EVT_RETURN - EVT_END + Call(N(PutAway)) + Return + End }; s32 N(test_first_strike)(Npc* kooper, Npc* enemy) { diff --git a/src/world/partner/lakilester.c b/src/world/partner/lakilester.c index 68468722d17..5adb4cf8615 100644 --- a/src/world/partner/lakilester.c +++ b/src/world/partner/lakilester.c @@ -107,9 +107,9 @@ API_CALLABLE(N(TakeOut)) { } EvtScript EVS_WorldLakilester_TakeOut = { - EVT_CALL(N(TakeOut)) - EVT_RETURN - EVT_END + Call(N(TakeOut)) + Return + End }; BSS TweesterPhysics N(TweesterPhysicsData); @@ -198,9 +198,9 @@ API_CALLABLE(N(Update)) { } EvtScript EVS_WorldLakilester_Update = { - EVT_CALL(N(Update)) - EVT_RETURN - EVT_END + Call(N(Update)) + Return + End }; void N(try_cancel_tweester)(Npc* lakilester) { @@ -939,9 +939,9 @@ API_CALLABLE(N(UseAbility)) { } EvtScript EVS_WorldLakilester_UseAbility = { - EVT_CALL(N(UseAbility)) - EVT_RETURN - EVT_END + Call(N(UseAbility)) + Return + End }; API_CALLABLE(N(PutAway)) { @@ -1077,9 +1077,9 @@ API_CALLABLE(N(PutAway)) { } EvtScript EVS_WorldLakilester_PutAway = { - EVT_CALL(N(PutAway)) - EVT_RETURN - EVT_END + Call(N(PutAway)) + Return + End }; void N(pre_battle)(Npc* lakilester) { @@ -1207,9 +1207,9 @@ API_CALLABLE(N(EnterMap)) { } EvtScript EVS_WorldLakilester_EnterMap = { - EVT_CALL(N(EnterMap)) - EVT_RETURN - EVT_END + Call(N(EnterMap)) + Return + End }; MATCHING_BSS(0xB0); diff --git a/src/world/partner/parakarry.c b/src/world/partner/parakarry.c index 8bc27d66d08..093a255b755 100644 --- a/src/world/partner/parakarry.c +++ b/src/world/partner/parakarry.c @@ -54,9 +54,9 @@ API_CALLABLE(N(TakeOut)) { } EvtScript EVS_WorldParakarry_TakeOut = { - EVT_CALL(N(TakeOut)) - EVT_RETURN - EVT_END + Call(N(TakeOut)) + Return + End }; TweesterPhysics* N(TweesterPhysicsPtr) = &N(TweesterPhysicsData); @@ -145,9 +145,9 @@ API_CALLABLE(N(Update)) { } EvtScript EVS_WorldParakarry_Update = { - EVT_CALL(N(Update)) - EVT_RETURN - EVT_END + Call(N(Update)) + Return + End }; void N(try_cancel_tweester)(Npc* parakarry) { @@ -611,9 +611,9 @@ API_CALLABLE(N(UseAbility)) { } EvtScript EVS_WorldParakarry_UseAbility = { - EVT_CALL(N(UseAbility)) - EVT_RETURN - EVT_END + Call(N(UseAbility)) + Return + End }; API_CALLABLE(N(PutAway)) { @@ -631,9 +631,9 @@ API_CALLABLE(N(PutAway)) { } EvtScript EVS_WorldParakarry_PutAway = { - EVT_CALL(N(PutAway)) - EVT_RETURN - EVT_END + Call(N(PutAway)) + Return + End }; void N(pre_battle)(Npc* parakarry) { diff --git a/src/world/partner/sushie.c b/src/world/partner/sushie.c index e43f1c6d0b1..5a631703ff6 100644 --- a/src/world/partner/sushie.c +++ b/src/world/partner/sushie.c @@ -734,9 +734,9 @@ API_CALLABLE(N(UseAbility)) { } EvtScript EVS_WorldSushie_UseAbility = { - EVT_CALL(N(UseAbility)) - EVT_RETURN - EVT_END + Call(N(UseAbility)) + Return + End }; void N(init)(Npc* sushie) { @@ -765,9 +765,9 @@ API_CALLABLE(N(TakeOut)) { } EvtScript EVS_WorldSushie_TakeOut = { - EVT_CALL(N(TakeOut)) - EVT_RETURN - EVT_END + Call(N(TakeOut)) + Return + End }; TweesterPhysics* N(TweesterPhysicsPtr) = &N(TweesterPhysicsData); @@ -854,9 +854,9 @@ API_CALLABLE(N(Update)) { } EvtScript EVS_WorldSushie_Update = { - EVT_CALL(N(Update)) - EVT_RETURN - EVT_END + Call(N(Update)) + Return + End }; void N(try_cancel_tweester)(Npc* sushie) { @@ -880,9 +880,9 @@ API_CALLABLE(N(PutAway)) { } EvtScript EVS_WorldSushie_PutAway = { - EVT_CALL(N(PutAway)) - EVT_RETURN - EVT_END + Call(N(PutAway)) + Return + End }; void N(pre_battle)(Npc* sushie) { @@ -979,7 +979,7 @@ API_CALLABLE(N(EnterMap)) { } EvtScript EVS_WorldSushie_EnterMap = { - EVT_CALL(N(EnterMap)) - EVT_RETURN - EVT_END + Call(N(EnterMap)) + Return + End }; diff --git a/src/world/partner/twink.c b/src/world/partner/twink.c index 776ecdf1355..ef93401abcc 100644 --- a/src/world/partner/twink.c +++ b/src/world/partner/twink.c @@ -57,25 +57,25 @@ API_CALLABLE(N(PutAway)) { } EvtScript EVS_WorldTwink_TakeOut = { - EVT_CALL(N(TakeOut)) - EVT_RETURN - EVT_END + Call(N(TakeOut)) + Return + End }; EvtScript EVS_WorldTwink_Update = { - EVT_CALL(N(Update)) - EVT_RETURN - EVT_END + Call(N(Update)) + Return + End }; EvtScript EVS_WorldTwink_UseAbility = { - EVT_CALL(N(UseAbility)) - EVT_RETURN - EVT_END + Call(N(UseAbility)) + Return + End }; EvtScript EVS_WorldTwink_PutAway = { - EVT_CALL(N(PutAway)) - EVT_RETURN - EVT_END + Call(N(PutAway)) + Return + End }; diff --git a/src/world/partner/watt.c b/src/world/partner/watt.c index 2d1158225ce..e0a5995b37f 100644 --- a/src/world/partner/watt.c +++ b/src/world/partner/watt.c @@ -88,9 +88,9 @@ API_CALLABLE(N(TakeOut)) { } EvtScript EVS_WorldWatt_TakeOut = { - EVT_CALL(N(TakeOut)) - EVT_RETURN - EVT_END + Call(N(TakeOut)) + Return + End }; BSS TweesterPhysics N(TweesterPhysicsData); @@ -206,9 +206,9 @@ API_CALLABLE(N(Update)) { } EvtScript EVS_WorldWatt_Update = { - EVT_CALL(N(Update)) - EVT_RETURN - EVT_END + Call(N(Update)) + Return + End }; void N(try_cancel_tweester)(Npc* watt) { @@ -392,9 +392,9 @@ API_CALLABLE(N(UseAbility)) { } EvtScript EVS_WorldWatt_UseAbility = { - EVT_CALL(N(UseAbility)) - EVT_RETURN - EVT_END + Call(N(UseAbility)) + Return + End }; API_CALLABLE(N(PutAway)) { @@ -420,9 +420,9 @@ API_CALLABLE(N(PutAway)) { } EvtScript EVS_WorldWatt_PutAway = { - EVT_CALL(N(PutAway)) - EVT_RETURN - EVT_END + Call(N(PutAway)) + Return + End }; void N(pre_battle)(Npc* watt) { @@ -556,7 +556,7 @@ void N(sync_held_position)(void) { } EvtScript EVS_WorldWatt_EnterMap = { - EVT_CALL(N(EnterMap)) - EVT_RETURN - EVT_END + Call(N(EnterMap)) + Return + End }; diff --git a/src/world/script_api/enter_exit.c b/src/world/script_api/enter_exit.c index 91640a34e44..6354061a2a6 100644 --- a/src/world/script_api/enter_exit.c +++ b/src/world/script_api/enter_exit.c @@ -198,275 +198,275 @@ API_CALLABLE(SetupSplitDoubleDoors) { } EvtScript EnterWalk = { - EVT_CALL(ShortenPartnerTetherDistance) - EVT_CALL(CheckUsingRideablePartner) - EVT_CALL(UseEntryHeading, 60, 15) - EVT_IF_EQ(LVarA, 0) - EVT_CALL(TeleportPartnerToPlayer) - EVT_CALL(PlayerMoveTo, LVar1, LVar3, 15) - EVT_ELSE - EVT_SET(LVarF, LVar0) - EVT_SET(LVar0, 0) - EVT_SET(LVarC, 1) - EVT_SET(LVar4, 15) - EVT_EXEC_WAIT(LVarB) - EVT_SET(LVar0, LVarF) - EVT_END_IF - EVT_EXEC(LVar0) - EVT_CALL(func_802D2148) - EVT_CALL(ResetPartnerTetherDistance) - EVT_RETURN - EVT_END + Call(ShortenPartnerTetherDistance) + Call(CheckUsingRideablePartner) + Call(UseEntryHeading, 60, 15) + IfEq(LVarA, 0) + Call(TeleportPartnerToPlayer) + Call(PlayerMoveTo, LVar1, LVar3, 15) + Else + Set(LVarF, LVar0) + Set(LVar0, 0) + Set(LVarC, 1) + Set(LVar4, 15) + ExecWait(LVarB) + Set(LVar0, LVarF) + EndIf + Exec(LVar0) + Call(func_802D2148) + Call(ResetPartnerTetherDistance) + Return + End }; EvtScript EnterWalkShort = { - EVT_CALL(ShortenPartnerTetherDistance) - EVT_CALL(CheckUsingRideablePartner) - EVT_CALL(UseEntryHeading, 40, 15) - EVT_IF_EQ(LVarA, 0) - EVT_CALL(TeleportPartnerToPlayer) - EVT_CALL(PlayerMoveTo, LVar1, LVar3, 15) - EVT_ELSE - EVT_SET(LVarF, LVar0) - EVT_SET(LVar0, 0) - EVT_SET(LVarC, 1) - EVT_SET(LVar4, 15) - EVT_EXEC_WAIT(LVarB) - EVT_SET(LVar0, LVarF) - EVT_END_IF - EVT_EXEC(LVar0) - EVT_CALL(func_802D2148) - EVT_CALL(ResetPartnerTetherDistance) - EVT_RETURN - EVT_END + Call(ShortenPartnerTetherDistance) + Call(CheckUsingRideablePartner) + Call(UseEntryHeading, 40, 15) + IfEq(LVarA, 0) + Call(TeleportPartnerToPlayer) + Call(PlayerMoveTo, LVar1, LVar3, 15) + Else + Set(LVarF, LVar0) + Set(LVar0, 0) + Set(LVarC, 1) + Set(LVar4, 15) + ExecWait(LVarB) + Set(LVar0, LVarF) + EndIf + Exec(LVar0) + Call(func_802D2148) + Call(ResetPartnerTetherDistance) + Return + End }; EvtScript EnterWalkCustom = { - EVT_CALL(ShortenPartnerTetherDistance) - EVT_CALL(CheckUsingRideablePartner) - EVT_CALL(UseEntryHeading, LVar1, LVar4) - EVT_IF_EQ(LVarA, 0) - EVT_CALL(TeleportPartnerToPlayer) - EVT_CALL(PlayerMoveTo, LVar1, LVar3, LVar4) - EVT_ELSE - EVT_SET(LVarF, LVar0) - EVT_SET(LVar0, 0) - EVT_SET(LVarC, 1) - EVT_EXEC_WAIT(LVarB) - EVT_SET(LVar0, LVarF) - EVT_END_IF - EVT_EXEC(LVar0) - EVT_CALL(func_802D2148) - EVT_CALL(ResetPartnerTetherDistance) - EVT_RETURN - EVT_END + Call(ShortenPartnerTetherDistance) + Call(CheckUsingRideablePartner) + Call(UseEntryHeading, LVar1, LVar4) + IfEq(LVarA, 0) + Call(TeleportPartnerToPlayer) + Call(PlayerMoveTo, LVar1, LVar3, LVar4) + Else + Set(LVarF, LVar0) + Set(LVar0, 0) + Set(LVarC, 1) + ExecWait(LVarB) + Set(LVar0, LVarF) + EndIf + Exec(LVar0) + Call(func_802D2148) + Call(ResetPartnerTetherDistance) + Return + End }; EvtScript EnterPostPipe = { - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(ShortenPartnerTetherDistance) - EVT_CALL(CheckUsingRideablePartner) - EVT_CALL(EnterPlayerPostPipe) - EVT_CALL(ResetPartnerTetherDistance) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerPhysics, TRUE) + Call(ShortenPartnerTetherDistance) + Call(CheckUsingRideablePartner) + Call(EnterPlayerPostPipe) + Call(ResetPartnerTetherDistance) + Call(DisablePlayerPhysics, FALSE) + Return + End }; EvtScript EnterSavePoint = { - EVT_CALL(ShortenPartnerTetherDistance) - EVT_CALL(SetPlayerPositionFromSaveData) - EVT_CALL(ClearPartnerMoveHistory, NPC_PARTNER) - EVT_CALL(ResetPartnerTetherDistance) - EVT_RETURN - EVT_END + Call(ShortenPartnerTetherDistance) + Call(SetPlayerPositionFromSaveData) + Call(ClearPartnerMoveHistory, NPC_PARTNER) + Call(ResetPartnerTetherDistance) + Return + End }; EvtScript ExitWalk = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShortenPartnerTetherDistance) - EVT_CALL(CheckUsingRideablePartner) - EVT_IF_EQ(LVarA, 0) - EVT_CALL(PlayerMoveTo, LVar1, LVar3, 15) - EVT_ELSE - EVT_SET(LVar0, 0) - EVT_SET(LVarC, 0) - EVT_SET(LVar4, 15) - EVT_EXEC_WAIT(LVarB) - EVT_END_IF - EVT_CALL(ResetPartnerTetherDistance) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ShortenPartnerTetherDistance) + Call(CheckUsingRideablePartner) + IfEq(LVarA, 0) + Call(PlayerMoveTo, LVar1, LVar3, 15) + Else + Set(LVar0, 0) + Set(LVarC, 0) + Set(LVar4, 15) + ExecWait(LVarB) + EndIf + Call(ResetPartnerTetherDistance) + Return + End }; EvtScript ExitSingleDoor = { - EVT_CALL(SetupSingleDoor) - EVT_EXEC_WAIT(BaseExitDoor) - EVT_RETURN - EVT_END + Call(SetupSingleDoor) + ExecWait(BaseExitDoor) + Return + End }; EvtScript EnterSingleDoor = { - EVT_CALL(SetupSingleDoor) - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_RETURN - EVT_END + Call(SetupSingleDoor) + ExecWait(BaseEnterDoor) + Return + End }; EvtScript ExitSplitSingleDoor = { - EVT_CALL(SetupSplitSingleDoor) - EVT_EXEC_WAIT(BaseExitDoor) - EVT_RETURN - EVT_END + Call(SetupSplitSingleDoor) + ExecWait(BaseExitDoor) + Return + End }; EvtScript EnterSplitSingleDoor = { - EVT_CALL(SetupSplitSingleDoor) - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_RETURN - EVT_END + Call(SetupSplitSingleDoor) + ExecWait(BaseEnterDoor) + Return + End }; EvtScript ExitDoubleDoor = { - EVT_CALL(SetupDoubleDoors) - EVT_EXEC_WAIT(BaseExitDoor) - EVT_RETURN - EVT_END + Call(SetupDoubleDoors) + ExecWait(BaseExitDoor) + Return + End }; EvtScript EnterDoubleDoor = { - EVT_CALL(SetupDoubleDoors) - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_RETURN - EVT_END + Call(SetupDoubleDoors) + ExecWait(BaseEnterDoor) + Return + End }; EvtScript ExitSplitDoubleDoor = { - EVT_CALL(SetupSplitDoubleDoors) - EVT_EXEC_WAIT(BaseExitDoor) - EVT_RETURN - EVT_END + Call(SetupSplitDoubleDoors) + ExecWait(BaseExitDoor) + Return + End }; EvtScript EnterSplitDoubleDoor = { - EVT_CALL(SetupSplitDoubleDoors) - EVT_EXEC_WAIT(BaseEnterDoor) - EVT_RETURN - EVT_END + Call(SetupSplitDoubleDoors) + ExecWait(BaseEnterDoor) + Return + End }; EvtScript BaseExitDoor = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(ShortenPartnerTetherDistance) - EVT_SET(LVar9, LVar0) - EVT_CALL(GetEntryCoords, LVar0, LVarC, LVarD, LVarE, LVarB) - EVT_ADD(LVarB, 180) - EVT_CALL(InterpPlayerYaw, LVarB, 2) - EVT_CALL(ModifyColliderFlags, 0, LVar1, COLLIDER_FLAGS_UPPER_MASK) - EVT_CALL(PlaySoundAt, SOUND_DOOR_OPEN, SOUND_SPACE_DEFAULT, LVarC, LVarD, LVarE) - EVT_CALL(MakeLerp, 0, 80, 10, EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_USE_BUF(LVar2) - EVT_LOOP(0) - EVT_BUF_READ1(LVarA) - EVT_IF_EQ(LVarA, -1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(RotateModel, LVarA, LVar0, 0, 1, 0) - EVT_END_LOOP - EVT_USE_BUF(LVar3) - EVT_LOOP(0) - EVT_BUF_READ1(LVarA) - EVT_IF_EQ(LVarA, -1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(RotateModel, LVarA, LVar0, 0, -1, 0) - EVT_END_LOOP - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(UseExitHeading, 40, LVar9) - EVT_CALL(CheckUsingRideablePartner) - EVT_IF_EQ(LVarA, 0) - EVT_CALL(PlayerMoveTo, LVar1, LVar3, 15) - EVT_ELSE - EVT_SET(LVar0, 0) - EVT_SET(LVarC, 0) - EVT_SET(LVar4, 15) - EVT_EXEC_WAIT(LVarB) - EVT_END_IF - EVT_CALL(ResetPartnerTetherDistance) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(DisablePlayerPhysics, TRUE) + Call(ShortenPartnerTetherDistance) + Set(LVar9, LVar0) + Call(GetEntryCoords, LVar0, LVarC, LVarD, LVarE, LVarB) + Add(LVarB, 180) + Call(InterpPlayerYaw, LVarB, 2) + Call(ModifyColliderFlags, 0, LVar1, COLLIDER_FLAGS_UPPER_MASK) + Call(PlaySoundAt, SOUND_DOOR_OPEN, SOUND_SPACE_DEFAULT, LVarC, LVarD, LVarE) + Call(MakeLerp, 0, 80, 10, EASING_LINEAR) + Label(0) + Call(UpdateLerp) + UseBuf(LVar2) + Loop(0) + BufRead1(LVarA) + IfEq(LVarA, -1) + BreakLoop + EndIf + Call(RotateModel, LVarA, LVar0, 0, 1, 0) + EndLoop + UseBuf(LVar3) + Loop(0) + BufRead1(LVarA) + IfEq(LVarA, -1) + BreakLoop + EndIf + Call(RotateModel, LVarA, LVar0, 0, -1, 0) + EndLoop + Wait(1) + IfNe(LVar1, 0) + Goto(0) + EndIf + Call(UseExitHeading, 40, LVar9) + Call(CheckUsingRideablePartner) + IfEq(LVarA, 0) + Call(PlayerMoveTo, LVar1, LVar3, 15) + Else + Set(LVar0, 0) + Set(LVarC, 0) + Set(LVar4, 15) + ExecWait(LVarB) + EndIf + Call(ResetPartnerTetherDistance) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; EvtScript BaseEnterDoor = { - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(ShortenPartnerTetherDistance) - EVT_USE_BUF(LVar2) - EVT_LOOP(0) - EVT_BUF_READ1(LVarA) - EVT_IF_EQ(LVarA, -1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(RotateModel, LVarA, -80, 0, 1, 0) - EVT_END_LOOP - EVT_USE_BUF(LVar3) - EVT_LOOP(0) - EVT_BUF_READ1(LVarA) - EVT_IF_EQ(LVarA, -1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(RotateModel, LVarA, -80, 0, -1, 0) - EVT_END_LOOP - EVT_CALL(GetEntryCoords, LVar0, LVar7, LVar8, LVar9, LVarB) - EVT_CALL(InterpPlayerYaw, LVarB, 2) - EVT_CALL(CheckUsingRideablePartner) - EVT_IF_EQ(LVarA, 0) - EVT_CALL(TeleportPartnerToPlayer) - EVT_CALL(PlayerMoveToDoor, 10) - EVT_ELSE - EVT_SET(LVar0, 1) - EVT_SET(LVarC, 1) - EVT_SET(LVar4, 15) - EVT_EXEC_WAIT(LVarB) - EVT_END_IF - EVT_THREAD - EVT_WAIT(8) - EVT_CALL(PlaySoundAt, SOUND_DOOR_CLOSE, SOUND_SPACE_DEFAULT, LVar7, LVar8, LVar9) - EVT_END_THREAD - EVT_CALL(MakeLerp, -80, 0, 10, EASING_LINEAR) - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_USE_BUF(LVar2) - EVT_LOOP(0) - EVT_BUF_READ1(LVarA) - EVT_IF_EQ(LVarA, -1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(RotateModel, LVarA, LVar0, 0, 1, 0) - EVT_END_LOOP - EVT_USE_BUF(LVar3) - EVT_LOOP(0) - EVT_BUF_READ1(LVarA) - EVT_IF_EQ(LVarA, -1) - EVT_BREAK_LOOP - EVT_END_IF - EVT_CALL(RotateModel, LVarA, LVar0, 0, -1, 0) - EVT_END_LOOP - EVT_WAIT(1) - EVT_IF_NE(LVar1, 0) - EVT_GOTO(0) - EVT_END_IF - EVT_CALL(ResetPartnerTetherDistance) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Call(DisablePlayerInput, TRUE) + Call(ShortenPartnerTetherDistance) + UseBuf(LVar2) + Loop(0) + BufRead1(LVarA) + IfEq(LVarA, -1) + BreakLoop + EndIf + Call(RotateModel, LVarA, -80, 0, 1, 0) + EndLoop + UseBuf(LVar3) + Loop(0) + BufRead1(LVarA) + IfEq(LVarA, -1) + BreakLoop + EndIf + Call(RotateModel, LVarA, -80, 0, -1, 0) + EndLoop + Call(GetEntryCoords, LVar0, LVar7, LVar8, LVar9, LVarB) + Call(InterpPlayerYaw, LVarB, 2) + Call(CheckUsingRideablePartner) + IfEq(LVarA, 0) + Call(TeleportPartnerToPlayer) + Call(PlayerMoveToDoor, 10) + Else + Set(LVar0, 1) + Set(LVarC, 1) + Set(LVar4, 15) + ExecWait(LVarB) + EndIf + Thread + Wait(8) + Call(PlaySoundAt, SOUND_DOOR_CLOSE, SOUND_SPACE_DEFAULT, LVar7, LVar8, LVar9) + EndThread + Call(MakeLerp, -80, 0, 10, EASING_LINEAR) + Label(0) + Call(UpdateLerp) + UseBuf(LVar2) + Loop(0) + BufRead1(LVarA) + IfEq(LVarA, -1) + BreakLoop + EndIf + Call(RotateModel, LVarA, LVar0, 0, 1, 0) + EndLoop + UseBuf(LVar3) + Loop(0) + BufRead1(LVarA) + IfEq(LVarA, -1) + BreakLoop + EndIf + Call(RotateModel, LVarA, LVar0, 0, -1, 0) + EndLoop + Wait(1) + IfNe(LVar1, 0) + Goto(0) + EndIf + Call(ResetPartnerTetherDistance) + Call(DisablePlayerInput, FALSE) + Return + End }; MATCHING_BSS(0x7AB0); diff --git a/src/world/script_api/push_blocks.c b/src/world/script_api/push_blocks.c index af9060ef6e8..5523e0067a9 100644 --- a/src/world/script_api/push_blocks.c +++ b/src/world/script_api/push_blocks.c @@ -288,68 +288,68 @@ API_CALLABLE(IsEventForSourceRunning) { } EvtScript EVS_PushWall_PushBlock = { - EVT_SET(LVarA, LVar0) // grid system - EVT_SET(LVarB, LVar1) // block entity ID + Set(LVarA, LVar0) // grid system + Set(LVarB, LVar1) // block entity ID // check cell where the block will move to - EVT_CALL(FetchPushedBlockProperties) - EVT_CALL(FacePlayerTowardPoint, BLOCK_PROP_I, BLOCK_PROP_K, 0) - EVT_IF_NE(LVar9, PUSH_BLOCK_INVALID) - EVT_CALL(MovePlayerTowardBlock) - EVT_END_IF + Call(FetchPushedBlockProperties) + Call(FacePlayerTowardPoint, BLOCK_PROP_I, BLOCK_PROP_K, 0) + IfNe(LVar9, PUSH_BLOCK_INVALID) + Call(MovePlayerTowardBlock) + EndIf // try setting the player action state - EVT_SET(LVarC, 0) - EVT_CALL(CheckPlayerActionState, LVarD, ACTION_STATE_RUN) - EVT_IF_EQ(LVarD, FALSE) - EVT_CALL(CheckPlayerActionState, LVarD, ACTION_STATE_PUSHING_BLOCK) - EVT_IF_EQ(LVarD, FALSE) - EVT_RETURN - EVT_END_IF - EVT_END_IF + Set(LVarC, 0) + Call(CheckPlayerActionState, LVarD, ACTION_STATE_RUN) + IfEq(LVarD, FALSE) + Call(CheckPlayerActionState, LVarD, ACTION_STATE_PUSHING_BLOCK) + IfEq(LVarD, FALSE) + Return + EndIf + EndIf // cancel state change if the block can't be pushed - EVT_IF_NE(LVar9, PUSH_BLOCK_READY) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_RETURN - EVT_END_IF + IfNe(LVar9, PUSH_BLOCK_READY) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Return + EndIf // wait for 8 frames of pushing - EVT_SET(LVarC, 0) - EVT_LABEL(0) - EVT_ADD(LVarC, 1) - EVT_CALL(CanPlayerPushBlock) - EVT_IF_EQ(LVarD, TRUE) - EVT_GOTO(1) - EVT_END_IF - EVT_CALL(GetPlayerActionState, LVarD) - EVT_IF_EQ(LVarD, ACTION_STATE_JUMP) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_RETURN - EVT_LABEL(1) - EVT_CALL(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) - EVT_CALL(MovePlayerTowardBlock) - EVT_IF_LT(LVarC, 8) - EVT_WAIT(1) - EVT_GOTO(0) - EVT_END_IF + Set(LVarC, 0) + Label(0) + Add(LVarC, 1) + Call(CanPlayerPushBlock) + IfEq(LVarD, TRUE) + Goto(1) + EndIf + Call(GetPlayerActionState, LVarD) + IfEq(LVarD, ACTION_STATE_JUMP) + Return + EndIf + Call(SetPlayerActionState, ACTION_STATE_IDLE) + Return + Label(1) + Call(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK) + Call(MovePlayerTowardBlock) + IfLt(LVarC, 8) + Wait(1) + Goto(0) + EndIf // perform the push - EVT_CALL(ClearPushedBlockFromGrid) - EVT_CALL(PlaySound, SOUND_PUSH_BLOCK) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(UpdatePushBlockMotion) - EVT_CALL(FinishPushBlockMotion) - EVT_THREAD - EVT_WAIT(2) - EVT_CALL(CheckPlayerActionState, LVarD, ACTION_STATE_PUSHING_BLOCK) - EVT_IF_NE(LVarD, FALSE) - EVT_CALL(IsEventForSourceRunning, LVarD, EVT_PTR(EVS_PushWall_PushBlock)) - EVT_IF_EQ(LVarD, FALSE) - EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE) - EVT_END_IF - EVT_END_IF - EVT_END_THREAD - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_RETURN - EVT_END + Call(ClearPushedBlockFromGrid) + Call(PlaySound, SOUND_PUSH_BLOCK) + Call(DisablePlayerPhysics, TRUE) + Call(UpdatePushBlockMotion) + Call(FinishPushBlockMotion) + Thread + Wait(2) + Call(CheckPlayerActionState, LVarD, ACTION_STATE_PUSHING_BLOCK) + IfNe(LVarD, FALSE) + Call(IsEventForSourceRunning, LVarD, Ref(EVS_PushWall_PushBlock)) + IfEq(LVarD, FALSE) + Call(SetPlayerActionState, ACTION_STATE_IDLE) + EndIf + EndIf + EndThread + Call(DisablePlayerPhysics, FALSE) + Return + End }; API_CALLABLE(CreatePushBlockGrid) { diff --git a/src/world/script_api/rooms.c b/src/world/script_api/rooms.c index 467f95c8001..8f94667d75a 100644 --- a/src/world/script_api/rooms.c +++ b/src/world/script_api/rooms.c @@ -419,495 +419,495 @@ API_CALLABLE(GetDoorPtr) { } EvtScript EVS_RoomContentVisiblityToggle = { - EVT_CALL(RoomVisibilityToggleImpl) - EVT_RETURN - EVT_END + Call(RoomVisibilityToggleImpl) + Return + End }; EvtScript EVS_EnterRoom_MovePlayerA = { - EVT_CALL(GetPlayerPos, LVarB, LVarC, LVarD) - EVT_SET(LVarB, ROOM_DATA_ENTER_POS_AX) - EVT_SET(LVarD, ROOM_DATA_ENTER_POS_AZ) - EVT_CALL(PlayerMoveTo, ROOM_DATA_ENTER_POS_AX, ROOM_DATA_ENTER_POS_AZ, LVarE) - EVT_CALL(FacePlayerTowardPoint, ROOM_DATA_ENTER_POS_BX, ROOM_DATA_ENTER_POS_BZ, 0) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVarB, LVarC, LVarD) + Set(LVarB, ROOM_DATA_ENTER_POS_AX) + Set(LVarD, ROOM_DATA_ENTER_POS_AZ) + Call(PlayerMoveTo, ROOM_DATA_ENTER_POS_AX, ROOM_DATA_ENTER_POS_AZ, LVarE) + Call(FacePlayerTowardPoint, ROOM_DATA_ENTER_POS_BX, ROOM_DATA_ENTER_POS_BZ, 0) + Return + End }; EvtScript EVS_EnterRoom_MovePlayerB = { - EVT_CALL(SaveDoorPtr) - EVT_CALL(GetDoorData) - EVT_CALL(GetPlayerPos, LVarB, LVarC, LVarD) - EVT_SET(LVarB, ROOM_DATA_ENTER_POS_BX) - EVT_SET(LVarD, ROOM_DATA_ENTER_POS_BZ) - EVT_SET(LVarE, 20) - EVT_CALL(PlayerMoveTo, ROOM_DATA_ENTER_POS_BX, ROOM_DATA_ENTER_POS_BZ, LVarE) - EVT_RETURN - EVT_END + Call(SaveDoorPtr) + Call(GetDoorData) + Call(GetPlayerPos, LVarB, LVarC, LVarD) + Set(LVarB, ROOM_DATA_ENTER_POS_BX) + Set(LVarD, ROOM_DATA_ENTER_POS_BZ) + Set(LVarE, 20) + Call(PlayerMoveTo, ROOM_DATA_ENTER_POS_BX, ROOM_DATA_ENTER_POS_BZ, LVarE) + Return + End }; EvtScript EVS_EnterRoom_MoveCam = { - EVT_CALL(SetRoomCamMoveSpeed, EVT_FLOAT(1.796)) - EVT_CALL(GetPlayerPos, LVarB, LVarC, LVarD) - EVT_SET(LVarB, ROOM_DATA_ENTER_POS_BX) - EVT_SET(LVarD, ROOM_DATA_ENTER_POS_BZ) - EVT_SET(LVarE, 10) - EVT_CALL(InterpCamTargetPos, 0, 1, LVarB, LVarC, LVarD, LVarE) - EVT_CALL(SetRoomCamMoveSpeed, -1) - EVT_RETURN - EVT_END + Call(SetRoomCamMoveSpeed, Float(1.796)) + Call(GetPlayerPos, LVarB, LVarC, LVarD) + Set(LVarB, ROOM_DATA_ENTER_POS_BX) + Set(LVarD, ROOM_DATA_ENTER_POS_BZ) + Set(LVarE, 10) + Call(InterpCamTargetPos, 0, 1, LVarB, LVarC, LVarD, LVarE) + Call(SetRoomCamMoveSpeed, -1) + Return + End }; EvtScript EVS_ExitRoom_MovePlayerA = { - EVT_CALL(GetPlayerPos, LVarB, LVarC, LVarD) - EVT_SET(LVarB, ROOM_DATA_EXIT_POS_AX) - EVT_SET(LVarD, ROOM_DATA_EXIT_POS_AZ) - EVT_SET(LVarE, 10) - EVT_CALL(PlayerMoveTo, ROOM_DATA_EXIT_POS_AX, ROOM_DATA_EXIT_POS_AZ, LVarE) - EVT_CALL(FacePlayerTowardPoint, ROOM_DATA_EXIT_POS_BX, ROOM_DATA_EXIT_POS_BZ, 0) - EVT_RETURN - EVT_END + Call(GetPlayerPos, LVarB, LVarC, LVarD) + Set(LVarB, ROOM_DATA_EXIT_POS_AX) + Set(LVarD, ROOM_DATA_EXIT_POS_AZ) + Set(LVarE, 10) + Call(PlayerMoveTo, ROOM_DATA_EXIT_POS_AX, ROOM_DATA_EXIT_POS_AZ, LVarE) + Call(FacePlayerTowardPoint, ROOM_DATA_EXIT_POS_BX, ROOM_DATA_EXIT_POS_BZ, 0) + Return + End }; EvtScript EVS_ExitRoom_MovePlayerB = { - EVT_CALL(SaveDoorPtr) - EVT_CALL(GetDoorData) - EVT_CALL(GetPlayerPos, LVarB, LVarC, LVarD) - EVT_SET(LVarB, ROOM_DATA_EXIT_POS_BX) - EVT_SET(LVarD, ROOM_DATA_EXIT_POS_BZ) - EVT_SET(LVarE, 20) - EVT_CALL(PlayerMoveTo, ROOM_DATA_EXIT_POS_BX, ROOM_DATA_EXIT_POS_BZ, LVarE) - EVT_RETURN - EVT_END + Call(SaveDoorPtr) + Call(GetDoorData) + Call(GetPlayerPos, LVarB, LVarC, LVarD) + Set(LVarB, ROOM_DATA_EXIT_POS_BX) + Set(LVarD, ROOM_DATA_EXIT_POS_BZ) + Set(LVarE, 20) + Call(PlayerMoveTo, ROOM_DATA_EXIT_POS_BX, ROOM_DATA_EXIT_POS_BZ, LVarE) + Return + End }; EvtScript EVS_ExitRoom_MoveCam = { - EVT_CALL(SetRoomCamMoveSpeed, EVT_FLOAT(1.796)) - EVT_CALL(GetPlayerPos, LVarB, LVarC, LVarD) - EVT_SET(LVarB, ROOM_DATA_EXIT_POS_BX) - EVT_SET(LVarD, ROOM_DATA_EXIT_POS_BZ) - EVT_SET(LVarE, 10) - EVT_CALL(InterpCamTargetPos, 0, 1, LVarB, LVarC, LVarD, LVarE) - EVT_CALL(SetRoomCamMoveSpeed, -1) - EVT_RETURN - EVT_END + Call(SetRoomCamMoveSpeed, Float(1.796)) + Call(GetPlayerPos, LVarB, LVarC, LVarD) + Set(LVarB, ROOM_DATA_EXIT_POS_BX) + Set(LVarD, ROOM_DATA_EXIT_POS_BZ) + Set(LVarE, 10) + Call(InterpCamTargetPos, 0, 1, LVarB, LVarC, LVarD, LVarE) + Call(SetRoomCamMoveSpeed, -1) + Return + End }; EvtScript EVS_Default_AnimateDoorRot = { - EVT_CALL(SaveDoorPtr) - EVT_SET(LVar2, ROOM_DATA_EVT_OPEN_DOOR) - EVT_SET(LVar3, LVar0) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_MOVE_DOOR_ENTER_OPEN) - EVT_CALL(MakeLerp, 0, 90, 10, EASING_CUBIC_OUT) - EVT_CALL(PlayRoomDoorSound, SOUND_ROOM_DOOR_OPEN) - EVT_CASE_EQ(ROOM_MOVE_DOOR_ENTER_CLOSE) - EVT_CALL(MakeLerp, 90, 0, 10, EASING_CUBIC_IN) - EVT_CASE_EQ(ROOM_MOVE_DOOR_EXIT_OPEN) - EVT_CALL(MakeLerp, 0, 90, 10, EASING_CUBIC_OUT) - EVT_CALL(PlayRoomDoorSound, SOUND_ROOM_DOOR_OPEN) - EVT_CASE_EQ(ROOM_MOVE_DOOR_EXIT_CLOSE) - EVT_CALL(MakeLerp, 90, 0, 10, EASING_CUBIC_IN) - EVT_END_SWITCH - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_EXEC(LVar2) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_SWITCH(LVar3) - EVT_CASE_EQ(ROOM_MOVE_DOOR_ENTER_CLOSE) - EVT_CALL(PlayRoomDoorSound, SOUND_ROOM_DOOR_CLOSE) - EVT_CASE_EQ(ROOM_MOVE_DOOR_EXIT_CLOSE) - EVT_CALL(PlayRoomDoorSound, SOUND_ROOM_DOOR_CLOSE) - EVT_END_SWITCH - EVT_RETURN - EVT_END + Call(SaveDoorPtr) + Set(LVar2, ROOM_DATA_EVT_OPEN_DOOR) + Set(LVar3, LVar0) + Switch(LVar0) + CaseEq(ROOM_MOVE_DOOR_ENTER_OPEN) + Call(MakeLerp, 0, 90, 10, EASING_CUBIC_OUT) + Call(PlayRoomDoorSound, SOUND_ROOM_DOOR_OPEN) + CaseEq(ROOM_MOVE_DOOR_ENTER_CLOSE) + Call(MakeLerp, 90, 0, 10, EASING_CUBIC_IN) + CaseEq(ROOM_MOVE_DOOR_EXIT_OPEN) + Call(MakeLerp, 0, 90, 10, EASING_CUBIC_OUT) + Call(PlayRoomDoorSound, SOUND_ROOM_DOOR_OPEN) + CaseEq(ROOM_MOVE_DOOR_EXIT_CLOSE) + Call(MakeLerp, 90, 0, 10, EASING_CUBIC_IN) + EndSwitch + Label(0) + Call(UpdateLerp) + Exec(LVar2) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Switch(LVar3) + CaseEq(ROOM_MOVE_DOOR_ENTER_CLOSE) + Call(PlayRoomDoorSound, SOUND_ROOM_DOOR_CLOSE) + CaseEq(ROOM_MOVE_DOOR_EXIT_CLOSE) + Call(PlayRoomDoorSound, SOUND_ROOM_DOOR_CLOSE) + EndSwitch + Return + End }; EvtScript EVS_Default_AnimateWallRot = { - EVT_SET(LVar2, ROOM_DATA_EVT_MOVE_WALL) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_MOVE_WALL_OPEN) - EVT_CALL(MakeLerp, 0, 90, 20, EASING_CUBIC_OUT) - EVT_CASE_EQ(ROOM_MOVE_WALL_1) - EVT_CALL(MakeLerp, 90, 0, 20, EASING_CUBIC_IN) - EVT_CASE_EQ(ROOM_MOVE_WALL_2) - EVT_CALL(MakeLerp, 0, 90, 20, EASING_CUBIC_OUT) - EVT_CASE_EQ(ROOM_MOVE_WALL_CLOSE) - EVT_CALL(MakeLerp, 90, 0, 20, EASING_CUBIC_IN) - EVT_END_SWITCH - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_EXEC(LVar2) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVar2, ROOM_DATA_EVT_MOVE_WALL) + Switch(LVar0) + CaseEq(ROOM_MOVE_WALL_OPEN) + Call(MakeLerp, 0, 90, 20, EASING_CUBIC_OUT) + CaseEq(ROOM_MOVE_WALL_1) + Call(MakeLerp, 90, 0, 20, EASING_CUBIC_IN) + CaseEq(ROOM_MOVE_WALL_2) + Call(MakeLerp, 0, 90, 20, EASING_CUBIC_OUT) + CaseEq(ROOM_MOVE_WALL_CLOSE) + Call(MakeLerp, 90, 0, 20, EASING_CUBIC_IN) + EndSwitch + Label(0) + Call(UpdateLerp) + Exec(LVar2) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Return + End }; EvtScript EVS_Default_AnimateDropDoor = { - EVT_SET(LVar2, ROOM_DATA_EVT_DROP_DOOR) - EVT_SWITCH(LVar0) - EVT_CASE_EQ(ROOM_DROP_DOOR_ENTER) - EVT_CALL(MakeLerp, 0, 90, 20, EASING_CUBIC_IN) - EVT_CASE_EQ(ROOM_DROP_DOOR_1) - EVT_CALL(MakeLerp, 90, 0, 10, EASING_CUBIC_OUT) - EVT_CASE_EQ(ROOM_DROP_DOOR_2) - EVT_CALL(MakeLerp, 0, 90, 20, EASING_CUBIC_IN) - EVT_CASE_EQ(ROOM_DROP_DOOR_EXIT) - EVT_CALL(MakeLerp, 90, 0, 10, EASING_CUBIC_OUT) - EVT_END_SWITCH - EVT_LABEL(0) - EVT_CALL(UpdateLerp) - EVT_EXEC(LVar2) - EVT_WAIT(1) - EVT_IF_EQ(LVar1, 1) - EVT_GOTO(0) - EVT_END_IF - EVT_RETURN - EVT_END + Set(LVar2, ROOM_DATA_EVT_DROP_DOOR) + Switch(LVar0) + CaseEq(ROOM_DROP_DOOR_ENTER) + Call(MakeLerp, 0, 90, 20, EASING_CUBIC_IN) + CaseEq(ROOM_DROP_DOOR_1) + Call(MakeLerp, 90, 0, 10, EASING_CUBIC_OUT) + CaseEq(ROOM_DROP_DOOR_2) + Call(MakeLerp, 0, 90, 20, EASING_CUBIC_IN) + CaseEq(ROOM_DROP_DOOR_EXIT) + Call(MakeLerp, 90, 0, 10, EASING_CUBIC_OUT) + EndSwitch + Label(0) + Call(UpdateLerp) + Exec(LVar2) + Wait(1) + IfEq(LVar1, 1) + Goto(0) + EndIf + Return + End }; // executed from trigger activatation with MapRoom* stored in LVar1 EvtScript EVS_EnterRoomDoor = { - EVT_SET_GROUP(EVT_GROUP_00) + SetGroup(EVT_GROUP_00) // ensure valid player action state - EVT_CALL(GetPlayerActionState, LVar3) - EVT_SET(LVar4, 0) - EVT_IF_EQ(LVar3, ACTION_STATE_IDLE) - EVT_ADD(LVar4, 1) - EVT_END_IF - EVT_IF_EQ(LVar3, ACTION_STATE_WALK) - EVT_ADD(LVar4, 1) - EVT_END_IF - EVT_IF_EQ(LVar3, ACTION_STATE_RUN) - EVT_ADD(LVar4, 1) - EVT_END_IF - EVT_IF_EQ(LVar4, 0) - EVT_RETURN - EVT_END_IF + Call(GetPlayerActionState, LVar3) + Set(LVar4, 0) + IfEq(LVar3, ACTION_STATE_IDLE) + Add(LVar4, 1) + EndIf + IfEq(LVar3, ACTION_STATE_WALK) + Add(LVar4, 1) + EndIf + IfEq(LVar3, ACTION_STATE_RUN) + Add(LVar4, 1) + EndIf + IfEq(LVar4, 0) + Return + EndIf // initialize - EVT_CALL(SaveDoorPtr) - EVT_CALL(GetDoorState) - EVT_IF_NE(LVar0, ROOM_STATE_IDLE) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetDoorState, ROOM_STATE_ENTERING) - EVT_CALL(HideRoomNPCs) - EVT_CALL(UseRoomItemVisGroup) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePlayerInput, TRUE) + Call(SaveDoorPtr) + Call(GetDoorState) + IfNe(LVar0, ROOM_STATE_IDLE) + Return + EndIf + Call(SetDoorState, ROOM_STATE_ENTERING) + Call(HideRoomNPCs) + Call(UseRoomItemVisGroup) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePlayerInput, TRUE) // notify listener ROOM_UPDATE_ENTER_BEGIN - EVT_CALL(GetDoorData) - EVT_SET(LVar0, ROOM_UPDATE_ENTER_BEGIN) - EVT_IF_NE(ROOM_DATA_EVT_LISTENER, NULL) - EVT_EXEC_WAIT(ROOM_DATA_EVT_LISTENER) - EVT_END_IF - EVT_IF_EQ(LVar0, ROOM_UPDATE_REQUEST_CANCEL) - EVT_GOTO(1) - EVT_END_IF + Call(GetDoorData) + Set(LVar0, ROOM_UPDATE_ENTER_BEGIN) + IfNe(ROOM_DATA_EVT_LISTENER, NULL) + ExecWait(ROOM_DATA_EVT_LISTENER) + EndIf + IfEq(LVar0, ROOM_UPDATE_REQUEST_CANCEL) + Goto(1) + EndIf // adjust camera to face door - EVT_CALL(GetDoorData) - EVT_EXEC(EVS_EnterRoom_MoveCam) + Call(GetDoorData) + Exec(EVS_EnterRoom_MoveCam) // move player to door - EVT_CALL(GetDoorData) - EVT_BITWISE_AND_CONST(LVar2, ROOM_FLAGS_DOOR_TYPE_MASK) - EVT_SET(LVarE, 10) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(ROOM_DOOR_RIGHT_HINGE_OPENS_OUT) - EVT_EXEC_WAIT(EVS_EnterRoom_MovePlayerA) - EVT_CASE_EQ(ROOM_DOOR_LEFT_HINGE_OPENS_OUT) - EVT_EXEC_WAIT(EVS_EnterRoom_MovePlayerA) - EVT_CASE_EQ(ROOM_DOOR_STRAIGHT_THROUGH) - EVT_EXEC_WAIT(EVS_EnterRoom_MovePlayerA) - EVT_CASE_EQ(ROOM_LARGE_DOOR_RIGHT_HINGE_OPENS_OUT) - EVT_SET(LVarE, 20) - EVT_EXEC_WAIT(EVS_EnterRoom_MovePlayerA) - EVT_CASE_EQ(ROOM_LARGE_DOOR_LEFT_HINGE_OPENS_OUT) - EVT_SET(LVarE, 20) - EVT_EXEC_WAIT(EVS_EnterRoom_MovePlayerA) - EVT_END_SWITCH + Call(GetDoorData) + BitwiseAndConst(LVar2, ROOM_FLAGS_DOOR_TYPE_MASK) + Set(LVarE, 10) + Switch(LVar2) + CaseEq(ROOM_DOOR_RIGHT_HINGE_OPENS_OUT) + ExecWait(EVS_EnterRoom_MovePlayerA) + CaseEq(ROOM_DOOR_LEFT_HINGE_OPENS_OUT) + ExecWait(EVS_EnterRoom_MovePlayerA) + CaseEq(ROOM_DOOR_STRAIGHT_THROUGH) + ExecWait(EVS_EnterRoom_MovePlayerA) + CaseEq(ROOM_LARGE_DOOR_RIGHT_HINGE_OPENS_OUT) + Set(LVarE, 20) + ExecWait(EVS_EnterRoom_MovePlayerA) + CaseEq(ROOM_LARGE_DOOR_LEFT_HINGE_OPENS_OUT) + Set(LVarE, 20) + ExecWait(EVS_EnterRoom_MovePlayerA) + EndSwitch // reveal room interior and hide world - EVT_CALL(GetDoorData) - EVT_SET(LVar0, ROOM_VISIBILITY_SHOW) - EVT_CALL(GetDoorPtr) - EVT_IF_NE(ROOM_DATA_MODEL_ID, 0) - EVT_EXEC_GET_TID(EVS_RoomContentVisiblityToggle, LVar5) - EVT_CALL(SaveUseDoorScript, ROOM_SCRIPT_IDX_0, LVar5) - EVT_END_IF - EVT_CALL(SetEntityHideMode1) - EVT_IF_NE(ROOM_DATA_MODEL_ID, 0) - EVT_CALL(AwaitUseDoorScript, ROOM_SCRIPT_IDX_0) - EVT_END_IF + Call(GetDoorData) + Set(LVar0, ROOM_VISIBILITY_SHOW) + Call(GetDoorPtr) + IfNe(ROOM_DATA_MODEL_ID, 0) + ExecGetTID(EVS_RoomContentVisiblityToggle, LVar5) + Call(SaveUseDoorScript, ROOM_SCRIPT_IDX_0, LVar5) + EndIf + Call(SetEntityHideMode1) + IfNe(ROOM_DATA_MODEL_ID, 0) + Call(AwaitUseDoorScript, ROOM_SCRIPT_IDX_0) + EndIf // wall movement animation - EVT_CALL(GetDoorData) - EVT_SET(LVar0, ROOM_MOVE_WALL_OPEN) - EVT_BITWISE_AND_CONST(ROOM_DATA_FLAGS, ROOM_FLAG_CUSTOM_ANIM_WALL_ROT) - EVT_IF_NE(ROOM_DATA_EVT_MOVE_WALL, NULL) - EVT_IF_NE(ROOM_DATA_FLAGS, 0) - EVT_EXEC_GET_TID(ROOM_DATA_EVT_MOVE_WALL, LVar5) - EVT_ELSE - EVT_EXEC_GET_TID(EVS_Default_AnimateWallRot, LVar5) - EVT_END_IF - EVT_END_IF - EVT_IF_NE(ROOM_DATA_EVT_MOVE_WALL, NULL) - EVT_CALL(SaveUseDoorScript, ROOM_SCRIPT_IDX_0, LVar5) - EVT_END_IF + Call(GetDoorData) + Set(LVar0, ROOM_MOVE_WALL_OPEN) + BitwiseAndConst(ROOM_DATA_FLAGS, ROOM_FLAG_CUSTOM_ANIM_WALL_ROT) + IfNe(ROOM_DATA_EVT_MOVE_WALL, NULL) + IfNe(ROOM_DATA_FLAGS, 0) + ExecGetTID(ROOM_DATA_EVT_MOVE_WALL, LVar5) + Else + ExecGetTID(EVS_Default_AnimateWallRot, LVar5) + EndIf + EndIf + IfNe(ROOM_DATA_EVT_MOVE_WALL, NULL) + Call(SaveUseDoorScript, ROOM_SCRIPT_IDX_0, LVar5) + EndIf // open the door - EVT_SET(LVar0, ROOM_MOVE_DOOR_ENTER_OPEN) - EVT_BITWISE_AND_CONST(ROOM_DATA_FLAGS, ROOM_FLAG_CUSTOM_ANIM_OPEN_DOOR) - EVT_IF_NE(ROOM_DATA_FLAGS, 0) - EVT_EXEC_GET_TID(ROOM_DATA_EVT_OPEN_DOOR, LVar5) - EVT_ELSE - EVT_EXEC_GET_TID(EVS_Default_AnimateDoorRot, LVar5) - EVT_END_IF - EVT_CALL(SaveUseDoorScript, ROOM_SCRIPT_IDX_3, LVar5) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(AwaitUseDoorScript, ROOM_SCRIPT_IDX_3) + Set(LVar0, ROOM_MOVE_DOOR_ENTER_OPEN) + BitwiseAndConst(ROOM_DATA_FLAGS, ROOM_FLAG_CUSTOM_ANIM_OPEN_DOOR) + IfNe(ROOM_DATA_FLAGS, 0) + ExecGetTID(ROOM_DATA_EVT_OPEN_DOOR, LVar5) + Else + ExecGetTID(EVS_Default_AnimateDoorRot, LVar5) + EndIf + Call(SaveUseDoorScript, ROOM_SCRIPT_IDX_3, LVar5) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(AwaitUseDoorScript, ROOM_SCRIPT_IDX_3) // move party through the doorway - EVT_CALL(SetEntityHideMode2) - EVT_EXEC_GET_TID(EVS_EnterRoom_MovePlayerB, LVar7) - EVT_CALL(SaveUseDoorScript, ROOM_SCRIPT_IDX_3, LVar7) - EVT_WAIT(10) - EVT_CALL(SaveDoorPtr) - EVT_CALL(GetDoorData) - EVT_CALL(MovePartnerThroughDoor, ROOM_DATA_ENTER_POS_BX, ROOM_DATA_ENTER_POS_BZ) + Call(SetEntityHideMode2) + ExecGetTID(EVS_EnterRoom_MovePlayerB, LVar7) + Call(SaveUseDoorScript, ROOM_SCRIPT_IDX_3, LVar7) + Wait(10) + Call(SaveDoorPtr) + Call(GetDoorData) + Call(MovePartnerThroughDoor, ROOM_DATA_ENTER_POS_BX, ROOM_DATA_ENTER_POS_BZ) // allow input when movement is done - EVT_CALL(AwaitUseDoorScript, ROOM_SCRIPT_IDX_3) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(ResetPartnerMovement) + Call(AwaitUseDoorScript, ROOM_SCRIPT_IDX_3) + Call(DisablePlayerInput, FALSE) + Call(DisablePlayerPhysics, FALSE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(ResetPartnerMovement) // close the door - EVT_SET(LVar0, ROOM_MOVE_DOOR_ENTER_CLOSE) - EVT_BITWISE_AND_CONST(ROOM_DATA_FLAGS, ROOM_FLAG_CUSTOM_ANIM_OPEN_DOOR) - EVT_IF_NE(ROOM_DATA_FLAGS, 0) - EVT_EXEC_GET_TID(ROOM_DATA_EVT_OPEN_DOOR, LVar5) - EVT_ELSE - EVT_EXEC_GET_TID(EVS_Default_AnimateDoorRot, LVar5) - EVT_END_IF - EVT_CALL(SaveUseDoorScript, ROOM_SCRIPT_IDX_3, LVar5) + Set(LVar0, ROOM_MOVE_DOOR_ENTER_CLOSE) + BitwiseAndConst(ROOM_DATA_FLAGS, ROOM_FLAG_CUSTOM_ANIM_OPEN_DOOR) + IfNe(ROOM_DATA_FLAGS, 0) + ExecGetTID(ROOM_DATA_EVT_OPEN_DOOR, LVar5) + Else + ExecGetTID(EVS_Default_AnimateDoorRot, LVar5) + EndIf + Call(SaveUseDoorScript, ROOM_SCRIPT_IDX_3, LVar5) // drop the door - EVT_SET(LVar0, ROOM_DROP_DOOR_ENTER) - EVT_BITWISE_AND_CONST(ROOM_DATA_FLAGS, ROOM_FLAG_CUSTOM_ANIM_DROP_DOOR) - EVT_IF_NE(ROOM_DATA_EVT_DROP_DOOR, NULL) - EVT_CALL(AwaitUseDoorScript, ROOM_SCRIPT_IDX_3) - EVT_IF_NE(ROOM_DATA_FLAGS, 0) - EVT_EXEC_GET_TID(ROOM_DATA_EVT_DROP_DOOR, LVar5) - EVT_ELSE - EVT_EXEC_GET_TID(EVS_Default_AnimateDropDoor, LVar5) - EVT_END_IF - EVT_END_IF - EVT_IF_NE(ROOM_DATA_EVT_DROP_DOOR, NULL) - EVT_CALL(SaveUseDoorScript, ROOM_SCRIPT_IDX_1, LVar5) - EVT_END_IF + Set(LVar0, ROOM_DROP_DOOR_ENTER) + BitwiseAndConst(ROOM_DATA_FLAGS, ROOM_FLAG_CUSTOM_ANIM_DROP_DOOR) + IfNe(ROOM_DATA_EVT_DROP_DOOR, NULL) + Call(AwaitUseDoorScript, ROOM_SCRIPT_IDX_3) + IfNe(ROOM_DATA_FLAGS, 0) + ExecGetTID(ROOM_DATA_EVT_DROP_DOOR, LVar5) + Else + ExecGetTID(EVS_Default_AnimateDropDoor, LVar5) + EndIf + EndIf + IfNe(ROOM_DATA_EVT_DROP_DOOR, NULL) + Call(SaveUseDoorScript, ROOM_SCRIPT_IDX_1, LVar5) + EndIf // notify listener ROOM_UPDATE_ENTER_DONE - EVT_SET(LVar0, ROOM_UPDATE_ENTER_DONE) - EVT_IF_NE(ROOM_DATA_EVT_LISTENER, NULL) - EVT_EXEC_GET_TID(ROOM_DATA_EVT_LISTENER, LVar5) - EVT_END_IF - EVT_IF_NE(ROOM_DATA_EVT_LISTENER, NULL) - EVT_CALL(SaveUseDoorScript, ROOM_SCRIPT_IDX_2, LVar5) - EVT_END_IF - EVT_IF_NE(ROOM_DATA_EVT_LISTENER, NULL) - EVT_CALL(AwaitUseDoorScript, ROOM_SCRIPT_IDX_2) - EVT_END_IF + Set(LVar0, ROOM_UPDATE_ENTER_DONE) + IfNe(ROOM_DATA_EVT_LISTENER, NULL) + ExecGetTID(ROOM_DATA_EVT_LISTENER, LVar5) + EndIf + IfNe(ROOM_DATA_EVT_LISTENER, NULL) + Call(SaveUseDoorScript, ROOM_SCRIPT_IDX_2, LVar5) + EndIf + IfNe(ROOM_DATA_EVT_LISTENER, NULL) + Call(AwaitUseDoorScript, ROOM_SCRIPT_IDX_2) + EndIf // wait for all anim scripts - EVT_IF_NE(ROOM_DATA_EVT_MOVE_WALL, NULL) - EVT_CALL(AwaitUseDoorScript, ROOM_SCRIPT_IDX_0) - EVT_END_IF - EVT_IF_NE(ROOM_DATA_EVT_DROP_DOOR, NULL) - EVT_CALL(AwaitUseDoorScript, ROOM_SCRIPT_IDX_1) - EVT_END_IF + IfNe(ROOM_DATA_EVT_MOVE_WALL, NULL) + Call(AwaitUseDoorScript, ROOM_SCRIPT_IDX_0) + EndIf + IfNe(ROOM_DATA_EVT_DROP_DOOR, NULL) + Call(AwaitUseDoorScript, ROOM_SCRIPT_IDX_1) + EndIf // reset and return - EVT_CALL(SetDoorState, ROOM_STATE_IDLE) - EVT_RETURN + Call(SetDoorState, ROOM_STATE_IDLE) + Return // handle ROOM_UPDATE_REQUEST_CANCEL from callback to ROOM_UPDATE_ENTER_BEGIN - EVT_LABEL(1) - EVT_CALL(SetDoorState, ROOM_STATE_IDLE) - EVT_LABEL(0) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_RETURN - EVT_END + Label(1) + Call(SetDoorState, ROOM_STATE_IDLE) + Label(0) + Call(DisablePlayerInput, FALSE) + Call(DisablePlayerPhysics, FALSE) + Return + End }; // executed from trigger activatation with MapRoom* stored in LVar1 EvtScript EVS_ExitRoomDoor = { - EVT_SET_GROUP(EVT_GROUP_00) + SetGroup(EVT_GROUP_00) // ensure valid player action state - EVT_CALL(GetPlayerActionState, LVar3) - EVT_SET(LVar4, 0) - EVT_IF_EQ(LVar3, ACTION_STATE_IDLE) - EVT_ADD(LVar4, 1) - EVT_END_IF - EVT_IF_EQ(LVar3, ACTION_STATE_WALK) - EVT_ADD(LVar4, 1) - EVT_END_IF - EVT_IF_EQ(LVar3, ACTION_STATE_RUN) - EVT_ADD(LVar4, 1) - EVT_END_IF - EVT_IF_EQ(LVar4, 0) - EVT_RETURN - EVT_END_IF + Call(GetPlayerActionState, LVar3) + Set(LVar4, 0) + IfEq(LVar3, ACTION_STATE_IDLE) + Add(LVar4, 1) + EndIf + IfEq(LVar3, ACTION_STATE_WALK) + Add(LVar4, 1) + EndIf + IfEq(LVar3, ACTION_STATE_RUN) + Add(LVar4, 1) + EndIf + IfEq(LVar4, 0) + Return + EndIf // initialize - EVT_CALL(SaveDoorPtr) - EVT_CALL(GetDoorState) - EVT_IF_NE(LVar0, ROOM_STATE_IDLE) - EVT_RETURN - EVT_END_IF - EVT_CALL(SetDoorState, ROOM_STATE_EXITING) - EVT_CALL(DisablePlayerPhysics, TRUE) - EVT_CALL(DisablePlayerInput, TRUE) + Call(SaveDoorPtr) + Call(GetDoorState) + IfNe(LVar0, ROOM_STATE_IDLE) + Return + EndIf + Call(SetDoorState, ROOM_STATE_EXITING) + Call(DisablePlayerPhysics, TRUE) + Call(DisablePlayerInput, TRUE) // notify listener ROOM_UPDATE_EXIT_BEGIN - EVT_CALL(GetDoorData) - EVT_SET(LVar0, ROOM_UPDATE_EXIT_BEGIN) - EVT_IF_NE(ROOM_DATA_EVT_LISTENER, NULL) - EVT_EXEC_WAIT(ROOM_DATA_EVT_LISTENER) - EVT_END_IF - EVT_IF_EQ(LVar0, ROOM_UPDATE_REQUEST_CANCEL) - EVT_GOTO(1) - EVT_END_IF + Call(GetDoorData) + Set(LVar0, ROOM_UPDATE_EXIT_BEGIN) + IfNe(ROOM_DATA_EVT_LISTENER, NULL) + ExecWait(ROOM_DATA_EVT_LISTENER) + EndIf + IfEq(LVar0, ROOM_UPDATE_REQUEST_CANCEL) + Goto(1) + EndIf // adjust camera to face door - EVT_CALL(GetDoorData) - EVT_EXEC(EVS_ExitRoom_MoveCam) + Call(GetDoorData) + Exec(EVS_ExitRoom_MoveCam) // move player to door - EVT_CALL(GetDoorData) - EVT_BITWISE_AND_CONST(LVar2, ROOM_FLAGS_DOOR_TYPE_MASK) - EVT_SWITCH(LVar2) - EVT_CASE_EQ(ROOM_DOOR_RIGHT_HINGE_OPENS_IN) - EVT_EXEC_WAIT(EVS_ExitRoom_MovePlayerA) - EVT_CASE_EQ(ROOM_LARGE_DOOR_RIGHT_HINGE_OPENS_IN) - EVT_EXEC_WAIT(EVS_ExitRoom_MovePlayerA) - EVT_CASE_EQ(ROOM_DOOR_LEFT_HINGE_OPENS_IN) - EVT_EXEC_WAIT(EVS_ExitRoom_MovePlayerA) - EVT_END_SWITCH + Call(GetDoorData) + BitwiseAndConst(LVar2, ROOM_FLAGS_DOOR_TYPE_MASK) + Switch(LVar2) + CaseEq(ROOM_DOOR_RIGHT_HINGE_OPENS_IN) + ExecWait(EVS_ExitRoom_MovePlayerA) + CaseEq(ROOM_LARGE_DOOR_RIGHT_HINGE_OPENS_IN) + ExecWait(EVS_ExitRoom_MovePlayerA) + CaseEq(ROOM_DOOR_LEFT_HINGE_OPENS_IN) + ExecWait(EVS_ExitRoom_MovePlayerA) + EndSwitch // wall movement animation - EVT_CALL(GetDoorData) - EVT_CALL(GetDoorPtr) - EVT_SET(LVar0, ROOM_MOVE_WALL_CLOSE) - EVT_BITWISE_AND_CONST(LVar2, ROOM_FLAG_CUSTOM_ANIM_WALL_ROT) - EVT_IF_NE(ROOM_DATA_EVT_MOVE_WALL, NULL) - EVT_IF_NE(LVar2, 0) - EVT_EXEC_GET_TID(ROOM_DATA_EVT_MOVE_WALL, LVar5) - EVT_ELSE - EVT_EXEC_GET_TID(EVS_Default_AnimateWallRot, LVar5) - EVT_END_IF - EVT_END_IF - EVT_IF_NE(ROOM_DATA_EVT_MOVE_WALL, NULL) - EVT_CALL(SaveUseDoorScript, ROOM_SCRIPT_IDX_0, LVar5) - EVT_END_IF + Call(GetDoorData) + Call(GetDoorPtr) + Set(LVar0, ROOM_MOVE_WALL_CLOSE) + BitwiseAndConst(LVar2, ROOM_FLAG_CUSTOM_ANIM_WALL_ROT) + IfNe(ROOM_DATA_EVT_MOVE_WALL, NULL) + IfNe(LVar2, 0) + ExecGetTID(ROOM_DATA_EVT_MOVE_WALL, LVar5) + Else + ExecGetTID(EVS_Default_AnimateWallRot, LVar5) + EndIf + EndIf + IfNe(ROOM_DATA_EVT_MOVE_WALL, NULL) + Call(SaveUseDoorScript, ROOM_SCRIPT_IDX_0, LVar5) + EndIf // raise the door if its been dropped - EVT_SET(LVar0, ROOM_DROP_DOOR_EXIT) - EVT_BITWISE_AND_CONST(LVar2, ROOM_FLAG_CUSTOM_ANIM_DROP_DOOR) - EVT_IF_NE(ROOM_DATA_EVT_DROP_DOOR, NULL) - EVT_IF_NE(LVar2, 0) - EVT_EXEC_GET_TID(ROOM_DATA_EVT_DROP_DOOR, LVar5) - EVT_ELSE - EVT_EXEC_GET_TID(EVS_Default_AnimateDropDoor, LVar5) - EVT_END_IF - EVT_END_IF - EVT_IF_NE(ROOM_DATA_EVT_DROP_DOOR, NULL) - EVT_CALL(SaveUseDoorScript, ROOM_SCRIPT_IDX_1, LVar5) - EVT_END_IF - EVT_IF_NE(ROOM_DATA_EVT_DROP_DOOR, NULL) - EVT_CALL(AwaitUseDoorScript, ROOM_SCRIPT_IDX_1) - EVT_END_IF + Set(LVar0, ROOM_DROP_DOOR_EXIT) + BitwiseAndConst(LVar2, ROOM_FLAG_CUSTOM_ANIM_DROP_DOOR) + IfNe(ROOM_DATA_EVT_DROP_DOOR, NULL) + IfNe(LVar2, 0) + ExecGetTID(ROOM_DATA_EVT_DROP_DOOR, LVar5) + Else + ExecGetTID(EVS_Default_AnimateDropDoor, LVar5) + EndIf + EndIf + IfNe(ROOM_DATA_EVT_DROP_DOOR, NULL) + Call(SaveUseDoorScript, ROOM_SCRIPT_IDX_1, LVar5) + EndIf + IfNe(ROOM_DATA_EVT_DROP_DOOR, NULL) + Call(AwaitUseDoorScript, ROOM_SCRIPT_IDX_1) + EndIf // open the door - EVT_SET(LVar0, ROOM_MOVE_DOOR_EXIT_OPEN) - EVT_BITWISE_AND_CONST(LVar2, ROOM_FLAG_CUSTOM_ANIM_OPEN_DOOR) - EVT_IF_NE(LVar2, 0) - EVT_EXEC_GET_TID(ROOM_DATA_EVT_OPEN_DOOR, LVar5) - EVT_ELSE - EVT_EXEC_GET_TID(EVS_Default_AnimateDoorRot, LVar5) - EVT_END_IF - EVT_CALL(SaveUseDoorScript, ROOM_SCRIPT_IDX_1, LVar5) - EVT_CALL(AwaitUseDoorScript, ROOM_SCRIPT_IDX_1) + Set(LVar0, ROOM_MOVE_DOOR_EXIT_OPEN) + BitwiseAndConst(LVar2, ROOM_FLAG_CUSTOM_ANIM_OPEN_DOOR) + IfNe(LVar2, 0) + ExecGetTID(ROOM_DATA_EVT_OPEN_DOOR, LVar5) + Else + ExecGetTID(EVS_Default_AnimateDoorRot, LVar5) + EndIf + Call(SaveUseDoorScript, ROOM_SCRIPT_IDX_1, LVar5) + Call(AwaitUseDoorScript, ROOM_SCRIPT_IDX_1) // move party through the doorway - EVT_CALL(GetDoorPtr) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) - EVT_CALL(SaveDoorPtr) - EVT_CALL(GetDoorData) - EVT_CALL(MovePartnerThroughDoor, ROOM_DATA_EXIT_POS_BX, ROOM_DATA_EXIT_POS_BZ) - EVT_EXEC_GET_TID(EVS_ExitRoom_MovePlayerB, LVar5) - EVT_CALL(SaveUseDoorScript, ROOM_SCRIPT_IDX_1, LVar5) - EVT_CALL(SetEntityHideMode0) + Call(GetDoorPtr) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, TRUE) + Call(SaveDoorPtr) + Call(GetDoorData) + Call(MovePartnerThroughDoor, ROOM_DATA_EXIT_POS_BX, ROOM_DATA_EXIT_POS_BZ) + ExecGetTID(EVS_ExitRoom_MovePlayerB, LVar5) + Call(SaveUseDoorScript, ROOM_SCRIPT_IDX_1, LVar5) + Call(SetEntityHideMode0) // hide room interior and reveal world - EVT_SET(LVar0, ROOM_VISIBILITY_HIDE) - EVT_IF_NE(ROOM_DATA_MODEL_ID, 0) - EVT_EXEC_GET_TID(EVS_RoomContentVisiblityToggle, LVar5) - EVT_END_IF - EVT_IF_NE(ROOM_DATA_MODEL_ID, 0) - EVT_CALL(SaveUseDoorScript, ROOM_SCRIPT_IDX_2, LVar5) - EVT_END_IF - EVT_IF_NE(ROOM_DATA_MODEL_ID, 0) - EVT_CALL(AwaitUseDoorScript, ROOM_SCRIPT_IDX_2) - EVT_END_IF + Set(LVar0, ROOM_VISIBILITY_HIDE) + IfNe(ROOM_DATA_MODEL_ID, 0) + ExecGetTID(EVS_RoomContentVisiblityToggle, LVar5) + EndIf + IfNe(ROOM_DATA_MODEL_ID, 0) + Call(SaveUseDoorScript, ROOM_SCRIPT_IDX_2, LVar5) + EndIf + IfNe(ROOM_DATA_MODEL_ID, 0) + Call(AwaitUseDoorScript, ROOM_SCRIPT_IDX_2) + EndIf // allow input when movement is done - EVT_CALL(AwaitUseDoorScript, ROOM_SCRIPT_IDX_1) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) - EVT_CALL(ResetPartnerMovement) + Call(AwaitUseDoorScript, ROOM_SCRIPT_IDX_1) + Call(DisablePlayerInput, FALSE) + Call(DisablePlayerPhysics, FALSE) + Call(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_IGNORE_WORLD_COLLISION, FALSE) + Call(ResetPartnerMovement) // close the door - EVT_CALL(GetDoorData) - EVT_SET(LVar0, ROOM_MOVE_DOOR_EXIT_CLOSE) - EVT_BITWISE_AND_CONST(LVar2, ROOM_FLAG_CUSTOM_ANIM_OPEN_DOOR) - EVT_IF_NE(LVar2, 0) - EVT_EXEC_WAIT(ROOM_DATA_EVT_OPEN_DOOR) - EVT_ELSE - EVT_EXEC_WAIT(EVS_Default_AnimateDoorRot) - EVT_END_IF + Call(GetDoorData) + Set(LVar0, ROOM_MOVE_DOOR_EXIT_CLOSE) + BitwiseAndConst(LVar2, ROOM_FLAG_CUSTOM_ANIM_OPEN_DOOR) + IfNe(LVar2, 0) + ExecWait(ROOM_DATA_EVT_OPEN_DOOR) + Else + ExecWait(EVS_Default_AnimateDoorRot) + EndIf // notify listener ROOM_UPDATE_EXIT_END - EVT_CALL(GetDoorData) - EVT_SET(LVar0, ROOM_UPDATE_EXIT_END) - EVT_IF_NE(ROOM_DATA_EVT_LISTENER, NULL) - EVT_EXEC_WAIT(ROOM_DATA_EVT_LISTENER) - EVT_END_IF + Call(GetDoorData) + Set(LVar0, ROOM_UPDATE_EXIT_END) + IfNe(ROOM_DATA_EVT_LISTENER, NULL) + ExecWait(ROOM_DATA_EVT_LISTENER) + EndIf // reset and return - EVT_CALL(RevealHiddenRoomNPCs) - EVT_CALL(RestorePrevItemVisGroup) - EVT_CALL(SetDoorState, ROOM_STATE_IDLE) - EVT_RETURN + Call(RevealHiddenRoomNPCs) + Call(RestorePrevItemVisGroup) + Call(SetDoorState, ROOM_STATE_IDLE) + Return // handle ROOM_UPDATE_REQUEST_CANCEL from callback to ROOM_UPDATE_ENTER_BEGIN - EVT_LABEL(1) - EVT_CALL(SetDoorState, ROOM_STATE_IDLE) - EVT_LABEL(0) - EVT_CALL(DisablePlayerPhysics, FALSE) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_RETURN - EVT_END + Label(1) + Call(SetDoorState, ROOM_STATE_IDLE) + Label(0) + Call(DisablePlayerPhysics, FALSE) + Call(DisablePlayerInput, FALSE) + Return + End }; diff --git a/src/world/script_api/shops.c b/src/world/script_api/shops.c index 880e1d5bc76..5a30a99b5a1 100644 --- a/src/world/script_api/shops.c +++ b/src/world/script_api/shops.c @@ -16,62 +16,62 @@ API_CALLABLE(ShowShopPurchaseDialog); API_CALLABLE(ShowShopOwnerDialog); EvtScript EVS_ShopBeginSpeech = { - EVT_CALL(SpeakToPlayer, LVar1, LVar2, LVar3, 0, LVar0) - EVT_RETURN - EVT_END + Call(SpeakToPlayer, LVar1, LVar2, LVar3, 0, LVar0) + Return + End }; EvtScript EVS_ShopContinueSpeech = { - EVT_CALL(ContinueSpeech, LVar1, LVar2, LVar3, 0, LVar0) - EVT_RETURN - EVT_END + Call(ContinueSpeech, LVar1, LVar2, LVar3, 0, LVar0) + Return + End }; EvtScript EVS_ShopResetSpeech = { - EVT_CALL(EndSpeech, LVar1, LVar2, LVar3, 0) - EVT_CALL(SpeakToPlayer, LVar1, LVar2, LVar3, 0, LVar0) - EVT_RETURN - EVT_END + Call(EndSpeech, LVar1, LVar2, LVar3, 0) + Call(SpeakToPlayer, LVar1, LVar2, LVar3, 0, LVar0) + Return + End }; EvtScript EVS_ShopEndSpeech = { - EVT_CALL(EndSpeech, LVar0, LVar1, LVar2, 0) - EVT_RETURN - EVT_END + Call(EndSpeech, LVar0, LVar1, LVar2, 0) + Return + End }; EvtScript EVS_ShopItemInteract = { - EVT_CALL(GetPartnerInUse, LVar1) - EVT_IF_EQ(LVar1, PARTNER_NONE) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_EQ(LVar1, PARTNER_KOOPER) - EVT_GOTO(10) - EVT_END_IF - EVT_IF_EQ(LVar1, PARTNER_BOMBETTE) - EVT_GOTO(10) - EVT_END_IF - EVT_RETURN - EVT_LABEL(10) - EVT_CALL(CanInteractWithShopItem) - EVT_IF_FALSE(LVar2) - EVT_RETURN - EVT_END_IF - EVT_CALL(BeginShopItemInteraction, LVar0) - EVT_RETURN - EVT_END + Call(GetPartnerInUse, LVar1) + IfEq(LVar1, PARTNER_NONE) + Goto(10) + EndIf + IfEq(LVar1, PARTNER_KOOPER) + Goto(10) + EndIf + IfEq(LVar1, PARTNER_BOMBETTE) + Goto(10) + EndIf + Return + Label(10) + Call(CanInteractWithShopItem) + IfFalse(LVar2) + Return + EndIf + Call(BeginShopItemInteraction, LVar0) + Return + End }; EvtScript EVS_ShopPurchaseDialog = { - EVT_CALL(ShowShopPurchaseDialog, LVar0) - EVT_RETURN - EVT_END + Call(ShowShopPurchaseDialog, LVar0) + Return + End }; EvtScript EVS_ShopOwnerDialog = { - EVT_CALL(ShowShopOwnerDialog) - EVT_RETURN - EVT_END + Call(ShowShopOwnerDialog) + Return + End }; s32 shop_owner_begin_speech(s32 messageIndex) { diff --git a/src/world_use_item.c b/src/world_use_item.c index 9daf0df25e4..3b0a2b3bc50 100644 --- a/src/world_use_item.c +++ b/src/world_use_item.c @@ -106,103 +106,103 @@ API_CALLABLE(WorldItem_ConsumeItem) { } EvtScript EVS_WorldItem_ShowUsedItem = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_UsePower) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 45) - EVT_CALL(MakeItemEntity, LVarA, LVar0, LVar1, LVar2, 1, 0) - EVT_SET(LVarA, LVar0) - EVT_WAIT(15) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 20) - EVT_CALL(WorldItem_ShowUseSparkles, LVar0, LVar1, LVar2) - EVT_CALL(RemoveItemEntity, LVarA) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(SetPlayerAnimation, ANIM_Mario1_UsePower) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 45) + Call(MakeItemEntity, LVarA, LVar0, LVar1, LVar2, 1, 0) + Set(LVarA, LVar0) + Wait(15) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 20) + Call(WorldItem_ShowUseSparkles, LVar0, LVar1, LVar2) + Call(RemoveItemEntity, LVarA) + Return + End }; EvtScript EVS_WorldItem_PlayEatingSounds = { - EVT_THREAD - EVT_LOOP(4) - EVT_CALL(PlaySound, SOUND_EAT_OR_DRINK) - EVT_WAIT(10) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Eat) - EVT_WAIT(45) - EVT_RETURN - EVT_END + Thread + Loop(4) + Call(PlaySound, SOUND_EAT_OR_DRINK) + Wait(10) + EndLoop + EndThread + Call(SetPlayerAnimation, ANIM_Mario1_Eat) + Wait(45) + Return + End }; EvtScript EVS_WorldItem_PlayDrinkingSounds = { - EVT_THREAD - EVT_LOOP(4) - EVT_CALL(PlaySound, SOUND_EAT_OR_DRINK) - EVT_WAIT(10) - EVT_END_LOOP - EVT_END_THREAD - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Drink) - EVT_WAIT(45) - EVT_RETURN - EVT_END + Thread + Loop(4) + Call(PlaySound, SOUND_EAT_OR_DRINK) + Wait(10) + EndLoop + EndThread + Call(SetPlayerAnimation, ANIM_Mario1_Drink) + Wait(45) + Return + End }; EvtScript EVS_World_UseItem = { - EVT_SET_GROUP(EVT_GROUP_00) - EVT_CALL(DisablePlayerInput, TRUE) - EVT_CALL(GetPartnerInUse, LVar0) - EVT_IF_NE(LVar0, 0) - EVT_CALL(InterruptUsePartner) - EVT_WAIT(20) - EVT_END_IF - EVT_CALL(WorldItem_PauseTime) - EVT_CALL(WorldItem_GetItemProperties, LVarA) - EVT_EXEC_WAIT(EVS_WorldItem_ShowUsedItem) - EVT_IF_EQ(LVarD, 0) - EVT_EXEC_WAIT(EVS_WorldItem_PlayEatingSounds) - EVT_ELSE - EVT_EXEC_WAIT(EVS_WorldItem_PlayDrinkingSounds) - EVT_END_IF - EVT_IF_EQ(LVarF, 1) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_StickOutTongue) - EVT_END_IF - EVT_IF_GT(LVarB, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 0) - EVT_ADD(LVar1, 35) - EVT_CALL(WorldItem_ShowHPGain, LVar0, LVar1, LVar2, LVarB) - EVT_END_IF - EVT_IF_GT(LVarC, 0) - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar0, 20) - EVT_ADD(LVar1, 25) - EVT_CALL(WorldItem_ShowFPGain, LVar0, LVar1, LVar2, LVarC) - EVT_END_IF - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_ADD(LVar1, 25) - EVT_CALL(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, LVarB) - EVT_IF_NE(LVarB, 0) - EVT_CALL(WorldItem_RestoreHP, LVarB) - EVT_END_IF - EVT_IF_NE(LVarC, 0) - EVT_CALL(WorldItem_RestoreFP, LVarC) - EVT_END_IF - EVT_IF_EQ(LVarF, 0) - EVT_WAIT(10) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_ThumbsUp) - EVT_WAIT(30) - EVT_ELSE - EVT_WAIT(30) - EVT_END_IF - EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2) - EVT_CALL(ShowRecoveryShimmer, LVar0, LVar1, LVar2, LVarB) - EVT_CALL(SetPlayerAnimation, ANIM_Mario1_Idle) - EVT_WAIT(20) - EVT_CALL(WorldItem_ConsumeItem) - EVT_CALL(DisablePlayerInput, FALSE) - EVT_CALL(WorldItem_UnpauseTime) - EVT_RETURN - EVT_END + SetGroup(EVT_GROUP_00) + Call(DisablePlayerInput, TRUE) + Call(GetPartnerInUse, LVar0) + IfNe(LVar0, 0) + Call(InterruptUsePartner) + Wait(20) + EndIf + Call(WorldItem_PauseTime) + Call(WorldItem_GetItemProperties, LVarA) + ExecWait(EVS_WorldItem_ShowUsedItem) + IfEq(LVarD, 0) + ExecWait(EVS_WorldItem_PlayEatingSounds) + Else + ExecWait(EVS_WorldItem_PlayDrinkingSounds) + EndIf + IfEq(LVarF, 1) + Call(SetPlayerAnimation, ANIM_Mario1_StickOutTongue) + EndIf + IfGt(LVarB, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 0) + Add(LVar1, 35) + Call(WorldItem_ShowHPGain, LVar0, LVar1, LVar2, LVarB) + EndIf + IfGt(LVarC, 0) + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar0, 20) + Add(LVar1, 25) + Call(WorldItem_ShowFPGain, LVar0, LVar1, LVar2, LVarC) + EndIf + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Add(LVar1, 25) + Call(ShowStartRecoveryShimmer, LVar0, LVar1, LVar2, LVarB) + IfNe(LVarB, 0) + Call(WorldItem_RestoreHP, LVarB) + EndIf + IfNe(LVarC, 0) + Call(WorldItem_RestoreFP, LVarC) + EndIf + IfEq(LVarF, 0) + Wait(10) + Call(SetPlayerAnimation, ANIM_Mario1_ThumbsUp) + Wait(30) + Else + Wait(30) + EndIf + Call(GetPlayerPos, LVar0, LVar1, LVar2) + Call(ShowRecoveryShimmer, LVar0, LVar1, LVar2, LVarB) + Call(SetPlayerAnimation, ANIM_Mario1_Idle) + Wait(20) + Call(WorldItem_ConsumeItem) + Call(DisablePlayerInput, FALSE) + Call(WorldItem_UnpauseTime) + Return + End }; MATCHING_BSS(0x2700); diff --git a/tools/renames/0_evt_macros_remove_prefix_and_make_pascal_case.txt b/tools/renames/0_evt_macros_remove_prefix_and_make_pascal_case.txt new file mode 100644 index 00000000000..e8a5b743f93 --- /dev/null +++ b/tools/renames/0_evt_macros_remove_prefix_and_make_pascal_case.txt @@ -0,0 +1,96 @@ +EVT_RETURN Return +EVT_JUMP Jump +EVT_LABEL Label +EVT_GOTO Goto +EVT_LOOP Loop +EVT_END_LOOP EndLoop +EVT_BREAK_LOOP BreakLoop +EVT_WAIT Wait +EVT_WAIT_SECS WaitSecs +EVT_IF_EQ IfEq +EVT_IF_NE IfNe +EVT_IF_LT IfLt +EVT_IF_GT IfGt +EVT_IF_LE IfLe +EVT_IF_GE IfGe +EVT_IF_FLAG IfFlag +EVT_IF_NOT_FLAG IfNotFlag +EVT_ELSE Else +EVT_END_IF EndIf +EVT_SWITCH Switch +EVT_SWITCH_CONST SwitchConst +EVT_CASE_EQ CaseEq +EVT_CASE_NE CaseNe +EVT_CASE_LT CaseLt +EVT_CASE_GT CaseGt +EVT_CASE_LE CaseLe +EVT_CASE_GE CaseGe +EVT_CASE_DEFAULT CaseDefault +EVT_CASE_OR_EQ CaseOrEq +EVT_CASE_AND_EQ CaseAndEq +EVT_CASE_FLAG CaseFlag +EVT_END_CASE_GROUP EndCaseGroup +EVT_CASE_RANGE CaseRange +EVT_BREAK_SWITCH BreakSwitch +EVT_END_SWITCH EndSwitch +EVT_SET Set +EVT_SET_CONST SetConst +EVT_SETF SetF +EVT_ADD Add +EVT_SUB Sub +EVT_MUL Mul +EVT_DIV Div +EVT_MOD Mod +EVT_ADDF AddF +EVT_SUBF SubF +EVT_MULF MulF +EVT_DIVF DivF +EVT_USE_BUF UseBuf +EVT_BUF_READ1 BufRead1 +EVT_BUF_READ2 BufRead2 +EVT_BUF_READ3 BufRead3 +EVT_BUF_READ4 BufRead4 +EVT_BUF_PEEK BufPeek +EVT_USE_FBUF UseFBuf +EVT_FBUF_READ1 FBufRead1 +EVT_FBUF_READ2 FBufRead2 +EVT_FBUF_READ3 FBufRead3 +EVT_FBUF_READ4 FBufRead4 +EVT_FBUF_PEEK FBufPeek +EVT_USE_ARRAY UseArray +EVT_USE_FLAG_ARRAY UseFlagArray +EVT_MALLOC_ARRAY MallocArray +EVT_BITWISE_AND BitwiseAnd +EVT_BITWISE_AND_CONST BitwiseAndConst +EVT_BITWISE_OR BitwiseOr +EVT_BITWISE_OR_CONST BitwiseOrConst +EVT_EXEC Exec +EVT_EXEC_GET_TID ExecGetTID +EVT_EXEC_WAIT ExecWait +EVT_BIND_TRIGGER BindTrigger +EVT_BIND_PADLOCK BindPadlock +EVT_UNBIND Unbind +EVT_KILL_THREAD KillThread +EVT_SET_PRIORITY SetPriority +EVT_SET_TIMESCALE SetTimescale +EVT_SET_GROUP SetGroup +EVT_SUSPEND_GROUP SuspendGroup +EVT_RESUME_GROUP ResumeGroup +EVT_SUSPEND_OTHERS SuspendOthers +EVT_RESUME_OTHERS ResumeOthers +EVT_SUSPEND_THREAD SuspendThread +EVT_RESUME_THREAD ResumeThread +EVT_IS_THREAD_RUNNING IsThreadRunning +EVT_THREAD Thread +EVT_END_THREAD EndThread +EVT_CHILD_THREAD ChildThread +EVT_END_CHILD_THREAD EndChildThread +EVT_DEBUG_LOGF DebugLogf +EVT_DEBUG_PRINT_VAR DebugPrintVar +EVT_IF_TRUE IfTrue +EVT_IF_FALSE IfFalse +EVT_CALL Call +EVT_END End +EVT_PLAY_EFFECT PlayEffect +EVT_PTR Ref +EVT_FLOAT Float From 551e326a404e4783bf5104e6d04a9dbcd2655dd5 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Sat, 20 Jan 2024 16:05:26 +0000 Subject: [PATCH 5/6] rename PlayEffect function to PlayEffect_impl so it doesn't conflict with macro --- include/script_api/common.h | 3 ++- include/script_api/macros.h | 28 ++++++++++++++-------------- src/evt/fx_api.c | 2 +- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/include/script_api/common.h b/include/script_api/common.h index f4e6d79e24f..9792a60d076 100644 --- a/include/script_api/common.h +++ b/include/script_api/common.h @@ -1280,7 +1280,8 @@ API_CALLABLE(ShowSleepBubble); API_CALLABLE(SetSleepBubbleTimeLeft); /// @evtapi -API_CALLABLE(PlayEffect); +/// @see PlayEffect +API_CALLABLE(PlayEffect_impl); /// @} diff --git a/include/script_api/macros.h b/include/script_api/macros.h index cfa730b9b63..a20899bde6c 100644 --- a/include/script_api/macros.h +++ b/include/script_api/macros.h @@ -792,32 +792,32 @@ #define PlayEffect(args...) VFUNC(PlayEffect, args) #define PlayEffect1(effect) \ - Call(PlayEffect, effect, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) + Call(PlayEffect_impl, effect, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) #define PlayEffect2(effect, subtype) \ - Call(PlayEffect, effect, subtype, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) + Call(PlayEffect_impl, effect, subtype, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) #define PlayEffect3(effect, subtype, a) \ - Call(PlayEffect, effect, subtype, a, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) + Call(PlayEffect_impl, effect, subtype, a, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) #define PlayEffect4(effect, subtype, a, b) \ - Call(PlayEffect, effect, subtype, a, b, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) + Call(PlayEffect_impl, effect, subtype, a, b, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) #define PlayEffect5(effect, subtype, a, b, c) \ - Call(PlayEffect, effect, subtype, a, b, c, 0, 0, 0, 0, 0, 0, 0, 0, 0) + Call(PlayEffect_impl, effect, subtype, a, b, c, 0, 0, 0, 0, 0, 0, 0, 0, 0) #define PlayEffect6(effect, subtype, a, b, c, d) \ - Call(PlayEffect, effect, subtype, a, b, c, d, 0, 0, 0, 0, 0, 0, 0, 0) + Call(PlayEffect_impl, effect, subtype, a, b, c, d, 0, 0, 0, 0, 0, 0, 0, 0) #define PlayEffect7(effect, subtype, a, b, c, d, e) \ - Call(PlayEffect, effect, subtype, a, b, c, d, e, 0, 0, 0, 0, 0, 0, 0) + Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, 0, 0, 0, 0, 0, 0, 0) #define PlayEffect8(effect, subtype, a, b, c, d, e, f) \ - Call(PlayEffect, effect, subtype, a, b, c, d, e, f, 0, 0, 0, 0, 0, 0) + Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, f, 0, 0, 0, 0, 0, 0) #define PlayEffect9(effect, subtype, a, b, c, d, e, f, g) \ - Call(PlayEffect, effect, subtype, a, b, c, d, e, f, g, 0, 0, 0, 0, 0) + Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, f, g, 0, 0, 0, 0, 0) #define PlayEffect10(effect, subtype, a, b, c, d, e, f, g, h) \ - Call(PlayEffect, effect, subtype, a, b, c, d, e, f, g, h, 0, 0, 0, 0) + Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, f, g, h, 0, 0, 0, 0) #define PlayEffect11(effect, subtype, a, b, c, d, e, f, g, h, i) \ - Call(PlayEffect, effect, subtype, a, b, c, d, e, f, g, h, i, 0, 0, 0) + Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, f, g, h, i, 0, 0, 0) #define PlayEffect12(effect, subtype, a, b, c, d, e, f, g, h, i, j) \ - Call(PlayEffect, effect, subtype, a, b, c, d, e, f, g, h, i, j, 0, 0) + Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, f, g, h, i, j, 0, 0) #define PlayEffect13(effect, subtype, a, b, c, d, e, f, g, h, i, j, k) \ - Call(PlayEffect, effect, subtype, a, b, c, d, e, f, g, h, i, j, k, 0) + Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, f, g, h, i, j, k, 0) #define PlayEffect14(effect, subtype, a, b, c, d, e, f, g, h, i, j, k, l) \ - Call(PlayEffect, effect, subtype, a, b, c, d, e, f, g, h, i, j, k, l) + Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, f, g, h, i, j, k, l) #endif diff --git a/src/evt/fx_api.c b/src/evt/fx_api.c index b1421b01e4c..93b725324d9 100644 --- a/src/evt/fx_api.c +++ b/src/evt/fx_api.c @@ -307,7 +307,7 @@ API_CALLABLE(SetSleepBubbleTimeLeft) { return ApiStatus_DONE2; } -API_CALLABLE(PlayEffect) { +API_CALLABLE(PlayEffect_impl) { Bytecode* intArgs = script->ptrReadPos; Bytecode* floatArgs = script->ptrReadPos; Bytecode* args = script->ptrReadPos; From b8c438b08d148117cd22b9b07a0d9d4c992b8553 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Sat, 20 Jan 2024 16:12:52 +0000 Subject: [PATCH 6/6] dead_PlayEffect_impl --- include/dead.h | 2 +- ver/us/undefined_syms.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/dead.h b/include/dead.h index 1851fb6e024..d416b0df960 100644 --- a/include/dead.h +++ b/include/dead.h @@ -127,7 +127,7 @@ #define SetMusicTrack dead_SetMusicTrack #define FadeInMusic dead_FadeInMusic #define RandInt dead_RandInt -#define PlayEffect dead_PlayEffect +#define PlayEffect_impl dead_PlayEffect_impl #define DisablePlayerInput dead_DisablePlayerInput #define ModifyColliderFlags dead_ModifyColliderFlags #define PlayerMoveTo dead_PlayerMoveTo diff --git a/ver/us/undefined_syms.txt b/ver/us/undefined_syms.txt index f3dc2d1364a..927b249ac3a 100644 --- a/ver/us/undefined_syms.txt +++ b/ver/us/undefined_syms.txt @@ -365,7 +365,7 @@ dead_AddStarPieces = AddStarPieces + 0xD650; dead_ShowGotItem = ShowGotItem + 0xD650; dead_ShowEmote = ShowEmote + 0xD650; dead_DismissEffect = DismissEffect + 0xD650; -dead_PlayEffect = PlayEffect + 0xD650; +dead_PlayEffect_impl = PlayEffect_impl + 0xD650; dead_SetSpriteShading = SetSpriteShading + 0xD850; dead_entity_upgrade_block_hide_content = entity_upgrade_block_hide_content + 0xE470; dead_Entity_SavePoint = Entity_SavePoint + 0xE4B0;